From e5e9afb2f30979f15e2bd27d5a121de168778267 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Tue, 12 Dec 2017 14:35:49 -0800 Subject: [PATCH 001/448] Initial implementation (#1) --- README.md | 26 ++++++ lib/http_retry.dart | 99 ++++++++++++++++++++ pubspec.yaml | 16 ++++ test/http_retry_test.dart | 190 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 331 insertions(+) create mode 100644 README.md create mode 100644 lib/http_retry.dart create mode 100644 pubspec.yaml create mode 100644 test/http_retry_test.dart diff --git a/README.md b/README.md new file mode 100644 index 0000000000..da41cf2763 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +Middleware for the [`http`](https://pub.dartlang.org/packages/http) package that +transparently retries failing requests. + +To use this, just create an [`RetryClient`][RetryClient] that wraps the +underlying [`http.Client`][Client]: + +[RetryClient]: https://www.dartdocs.org/documentation/http_retry/latest/http_retry/RetryClient-class.html +[Client]: https://www.dartdocs.org/documentation/http/latest/http/Client-class.html + +```dart +import 'package:http/http.dart' as http; +import 'package:http_retry/http_retry.dart'; + +main() async { + var client = new RetryClient(new http.Client()); + print(await client.read("http://example.org")); + await client.close(); +} +``` + +By default, this retries any request whose response has status code 503 +Temporary Failure up to three retries. It waits 500ms before the first retry, +and increases the delay by 1.5x each time. All of this can be customized using +the [`new RetryClient()`][new RetryClient] constructor. + +[new RetryClient]: https://www.dartdocs.org/documentation/http_retry/latest/http_retry/RetryClient/RetryClient.html diff --git a/lib/http_retry.dart b/lib/http_retry.dart new file mode 100644 index 0000000000..03cebd845a --- /dev/null +++ b/lib/http_retry.dart @@ -0,0 +1,99 @@ +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:math' as math; + +import 'package:async/async.dart'; +import 'package:http/http.dart'; + +/// An HTTP client wrapper that automatically retries failing requests. +class RetryClient extends BaseClient { + /// The wrapped client. + final Client _inner; + + /// The number of times a request should be retried. + final int _retries; + + /// The callback that determines whether a request should be retried. + final bool Function(StreamedResponse) _when; + + /// The callback that determines how long to wait before retrying a request. + final Duration Function(int) _delay; + + /// Creates a client wrapping [inner] that retries HTTP requests. + /// + /// This retries a failing request [retries] times (3 by default). Note that + /// `n` retries means that the request will be sent at most `n + 1` times. + /// + /// By default, this retries requests whose responses have status code 503 + /// Temporary Failure. If [when] is passed, it retries any request for whose + /// response [when] returns `true`. + /// + /// By default, this waits 500ms between the original request and the first + /// retry, then increases the delay by 1.5x for each subsequent retry. If + /// [delay] is passed, it's used to determine the time to wait before the + /// given (zero-based) retry. + RetryClient(this._inner, + {int retries, + bool when(StreamedResponse response), + Duration delay(int retryCount)}) + : _retries = retries ?? 3, + _when = when ?? ((response) => response.statusCode == 503), + _delay = delay ?? + ((retryCount) => + new Duration(milliseconds: 500) * math.pow(1.5, retryCount)) { + RangeError.checkNotNegative(_retries, "retries"); + } + + /// Like [new RetryClient], but with a pre-computed list of [delays] + /// between each retry. + /// + /// This will retry a request at most `delays.length` times, using each delay + /// in order. It will wait for `delays[0]` after the initial request, + /// `delays[1]` after the first retry, and so on. + RetryClient.withDelays(Client inner, Iterable delays, + {bool when(StreamedResponse response)}) + : this._withDelays(inner, delays.toList(), when: when); + + RetryClient._withDelays(Client inner, List delays, + {bool when(StreamedResponse response)}) + : this(inner, + retries: delays.length, delay: (retryCount) => delays[retryCount]); + + Future send(BaseRequest request) async { + var splitter = new StreamSplitter(request.finalize()); + + var i = 0; + while (true) { + var response = await _inner.send(_copyRequest(request, splitter.split())); + if (i == _retries || !_when(response)) return response; + + // Make sure the response stream is listened to so that we don't leave + // dangling connections. + response.stream.listen((_) {}).cancel()?.catchError((_) {}); + await new Future.delayed(_delay(i)); + i++; + } + } + + /// Returns a copy of [original] with the given [body]. + StreamedRequest _copyRequest(BaseRequest original, Stream> body) { + var request = new StreamedRequest(original.method, original.url); + request.contentLength = original.contentLength; + request.followRedirects = original.followRedirects; + request.headers.addAll(original.headers); + request.maxRedirects = original.maxRedirects; + request.persistentConnection = original.persistentConnection; + + body.listen(request.sink.add, + onError: request.sink.addError, + onDone: request.sink.close, + cancelOnError: true); + + return request; + } + + void close() => _inner.close(); +} diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000000..6af9806c57 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,16 @@ +name: http_retry +version: 0.1.0-dev +description: HTTP client middleware that automatically retries requests. +author: Dart Team +homepage: https://github.com/dart-lang/http_retry + +environment: + sdk: '>=1.24.0 <2.0.0' + +dependencies: + async: ">=1.2.0 <=3.0.0" + http: "^0.11.0" + +dev_dependencies: + fake_async: "^0.1.2" + test: "^0.12.0" diff --git a/test/http_retry_test.dart b/test/http_retry_test.dart new file mode 100644 index 0000000000..3ba61b47d5 --- /dev/null +++ b/test/http_retry_test.dart @@ -0,0 +1,190 @@ +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +// for details. 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:fake_async/fake_async.dart'; +import 'package:http/http.dart'; +import 'package:http/testing.dart'; +import 'package:test/test.dart'; + +import 'package:http_retry/http_retry.dart'; + +void main() { + group("doesn't retry when", () { + test("a request has a non-503 error code", () async { + var client = new RetryClient(new MockClient( + expectAsync1((_) async => new Response("", 502), count: 1))); + var response = await client.get("http://example.org"); + expect(response.statusCode, equals(502)); + }); + + test("a request doesn't match when()", () async { + var client = new RetryClient( + new MockClient( + expectAsync1((_) async => new Response("", 503), count: 1)), + when: (_) => false); + var response = await client.get("http://example.org"); + expect(response.statusCode, equals(503)); + }); + + test("retries is 0", () async { + var client = new RetryClient( + new MockClient( + expectAsync1((_) async => new Response("", 503), count: 1)), + retries: 0); + var response = await client.get("http://example.org"); + expect(response.statusCode, equals(503)); + }); + }); + + test("retries on a 503 by default", () async { + var count = 0; + var client = new RetryClient( + new MockClient(expectAsync1((request) async { + count++; + return count < 2 ? new Response("", 503) : new Response("", 200); + }, count: 2)), + delay: (_) => Duration.ZERO); + + var response = await client.get("http://example.org"); + expect(response.statusCode, equals(200)); + }); + + test("retries on any request where when() returns true", () async { + var count = 0; + var client = new RetryClient( + new MockClient(expectAsync1((request) async { + count++; + return new Response("", 503, + headers: {"retry": count < 2 ? "true" : "false"}); + }, count: 2)), + when: (response) => response.headers["retry"] == "true", + delay: (_) => Duration.ZERO); + + var response = await client.get("http://example.org"); + expect(response.headers, containsPair("retry", "false")); + expect(response.statusCode, equals(503)); + }); + + test("retries three times by default", () async { + var client = new RetryClient( + new MockClient( + expectAsync1((_) async => new Response("", 503), count: 4)), + delay: (_) => Duration.ZERO); + var response = await client.get("http://example.org"); + expect(response.statusCode, equals(503)); + }); + + test("retries the given number of times", () async { + var client = new RetryClient( + new MockClient( + expectAsync1((_) async => new Response("", 503), count: 13)), + retries: 12, + delay: (_) => Duration.ZERO); + var response = await client.get("http://example.org"); + expect(response.statusCode, equals(503)); + }); + + test("waits 1.5x as long each time by default", () { + new FakeAsync().run((fake) { + var count = 0; + var client = new RetryClient(new MockClient(expectAsync1((_) async { + count++; + if (count == 1) { + expect(fake.elapsed, equals(Duration.ZERO)); + } else if (count == 2) { + expect(fake.elapsed, equals(new Duration(milliseconds: 500))); + } else if (count == 3) { + expect(fake.elapsed, equals(new Duration(milliseconds: 1250))); + } else if (count == 4) { + expect(fake.elapsed, equals(new Duration(milliseconds: 2375))); + } + + return new Response("", 503); + }, count: 4))); + + expect(client.get("http://example.org"), completes); + fake.elapse(new Duration(minutes: 10)); + }); + }); + + test("waits according to the delay parameter", () { + new FakeAsync().run((fake) { + var count = 0; + var client = new RetryClient( + new MockClient(expectAsync1((_) async { + count++; + if (count == 1) { + expect(fake.elapsed, equals(Duration.ZERO)); + } else if (count == 2) { + expect(fake.elapsed, equals(Duration.ZERO)); + } else if (count == 3) { + expect(fake.elapsed, equals(new Duration(seconds: 1))); + } else if (count == 4) { + expect(fake.elapsed, equals(new Duration(seconds: 3))); + } + + return new Response("", 503); + }, count: 4)), + delay: (requestCount) => new Duration(seconds: requestCount)); + + expect(client.get("http://example.org"), completes); + fake.elapse(new Duration(minutes: 10)); + }); + }); + + test("waits according to the delay list", () { + new FakeAsync().run((fake) { + var count = 0; + var client = new RetryClient.withDelays( + new MockClient(expectAsync1((_) async { + count++; + if (count == 1) { + expect(fake.elapsed, equals(Duration.ZERO)); + } else if (count == 2) { + expect(fake.elapsed, equals(new Duration(seconds: 1))); + } else if (count == 3) { + expect(fake.elapsed, equals(new Duration(seconds: 61))); + } else if (count == 4) { + expect(fake.elapsed, equals(new Duration(seconds: 73))); + } + + return new Response("", 503); + }, count: 4)), + [ + new Duration(seconds: 1), + new Duration(minutes: 1), + new Duration(seconds: 12) + ]); + + expect(client.get("http://example.org"), completes); + fake.elapse(new Duration(minutes: 10)); + }); + }); + + test("copies all request attributes for each attempt", () async { + var client = new RetryClient.withDelays( + new MockClient(expectAsync1((request) async { + expect(request.contentLength, equals(5)); + expect(request.followRedirects, isFalse); + expect(request.headers, containsPair("foo", "bar")); + expect(request.maxRedirects, equals(12)); + expect(request.method, equals("POST")); + expect(request.persistentConnection, isFalse); + expect(request.url, equals(Uri.parse("http://example.org"))); + expect(request.body, equals("hello")); + return new Response("", 503); + }, count: 2)), + [Duration.ZERO]); + + var request = new Request("POST", Uri.parse("http://example.org")); + request.body = "hello"; + request.followRedirects = false; + request.headers["foo"] = "bar"; + request.maxRedirects = 12; + request.persistentConnection = false; + + var response = await client.send(request); + expect(response.statusCode, equals(503)); + }); +} From 1ee1fb4ad6378a065074e4b8ff65ca6f74d43887 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Tue, 12 Dec 2017 14:51:55 -0800 Subject: [PATCH 002/448] Pass BaseResponse to when() This makes it clear that callers shouldn't try to read the response body in the callback. --- lib/http_retry.dart | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/http_retry.dart b/lib/http_retry.dart index 03cebd845a..b50d680670 100644 --- a/lib/http_retry.dart +++ b/lib/http_retry.dart @@ -17,7 +17,7 @@ class RetryClient extends BaseClient { final int _retries; /// The callback that determines whether a request should be retried. - final bool Function(StreamedResponse) _when; + final bool Function(BaseResponse) _when; /// The callback that determines how long to wait before retrying a request. final Duration Function(int) _delay; @@ -37,7 +37,7 @@ class RetryClient extends BaseClient { /// given (zero-based) retry. RetryClient(this._inner, {int retries, - bool when(StreamedResponse response), + bool when(BaseResponse response), Duration delay(int retryCount)}) : _retries = retries ?? 3, _when = when ?? ((response) => response.statusCode == 503), @@ -54,13 +54,15 @@ class RetryClient extends BaseClient { /// in order. It will wait for `delays[0]` after the initial request, /// `delays[1]` after the first retry, and so on. RetryClient.withDelays(Client inner, Iterable delays, - {bool when(StreamedResponse response)}) + {bool when(BaseResponse response)}) : this._withDelays(inner, delays.toList(), when: when); RetryClient._withDelays(Client inner, List delays, - {bool when(StreamedResponse response)}) + {bool when(BaseResponse response)}) : this(inner, - retries: delays.length, delay: (retryCount) => delays[retryCount]); + retries: delays.length, + delay: (retryCount) => delays[retryCount], + when: when); Future send(BaseRequest request) async { var splitter = new StreamSplitter(request.finalize()); From 2ba39781a9ebe4c106c2d896cd1e8fe3513b8608 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Tue, 12 Dec 2017 14:56:32 -0800 Subject: [PATCH 003/448] Add an onRetry() callback --- lib/http_retry.dart | 24 ++++++++++++++++++------ pubspec.yaml | 2 +- test/http_retry_test.dart | 17 +++++++++++++++++ 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/lib/http_retry.dart b/lib/http_retry.dart index b50d680670..4f30e03d3c 100644 --- a/lib/http_retry.dart +++ b/lib/http_retry.dart @@ -22,6 +22,9 @@ class RetryClient extends BaseClient { /// The callback that determines how long to wait before retrying a request. final Duration Function(int) _delay; + /// The callback to call to indicate that a request is being retried. + final void Function(BaseRequest, BaseResponse, int) _onRetry; + /// Creates a client wrapping [inner] that retries HTTP requests. /// /// This retries a failing request [retries] times (3 by default). Note that @@ -35,15 +38,20 @@ class RetryClient extends BaseClient { /// retry, then increases the delay by 1.5x for each subsequent retry. If /// [delay] is passed, it's used to determine the time to wait before the /// given (zero-based) retry. + /// + /// If [onRetry] is passed, it's called immediately before each retry so that + /// the client has a chance to perform side effects like logging. RetryClient(this._inner, {int retries, bool when(BaseResponse response), - Duration delay(int retryCount)}) + Duration delay(int retryCount), + void onRetry(BaseRequest request, BaseResponse response, int retryCount)}) : _retries = retries ?? 3, _when = when ?? ((response) => response.statusCode == 503), _delay = delay ?? ((retryCount) => - new Duration(milliseconds: 500) * math.pow(1.5, retryCount)) { + new Duration(milliseconds: 500) * math.pow(1.5, retryCount)), + _onRetry = onRetry { RangeError.checkNotNegative(_retries, "retries"); } @@ -54,15 +62,18 @@ class RetryClient extends BaseClient { /// in order. It will wait for `delays[0]` after the initial request, /// `delays[1]` after the first retry, and so on. RetryClient.withDelays(Client inner, Iterable delays, - {bool when(BaseResponse response)}) - : this._withDelays(inner, delays.toList(), when: when); + {bool when(BaseResponse response), + void onRetry(BaseRequest request, BaseResponse response, int retryCount)}) + : this._withDelays(inner, delays.toList(), when: when, onRetry: onRetry); RetryClient._withDelays(Client inner, List delays, - {bool when(BaseResponse response)}) + {bool when(BaseResponse response), + void onRetry(BaseRequest request, BaseResponse response, int retryCount)}) : this(inner, retries: delays.length, delay: (retryCount) => delays[retryCount], - when: when); + when: when, + onRetry: onRetry); Future send(BaseRequest request) async { var splitter = new StreamSplitter(request.finalize()); @@ -76,6 +87,7 @@ class RetryClient extends BaseClient { // dangling connections. response.stream.listen((_) {}).cancel()?.catchError((_) {}); await new Future.delayed(_delay(i)); + if (_onRetry != null) _onRetry(request, response, i); i++; } } diff --git a/pubspec.yaml b/pubspec.yaml index 6af9806c57..b2b3c7e7d3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http_retry -version: 0.1.0-dev +version: 0.1.0 description: HTTP client middleware that automatically retries requests. author: Dart Team homepage: https://github.com/dart-lang/http_retry diff --git a/test/http_retry_test.dart b/test/http_retry_test.dart index 3ba61b47d5..a0f4d30980 100644 --- a/test/http_retry_test.dart +++ b/test/http_retry_test.dart @@ -162,6 +162,23 @@ void main() { }); }); + test("calls onRetry for each retry", () async { + var count = 0; + var client = new RetryClient( + new MockClient( + expectAsync1((_) async => new Response("", 503), count: 3)), + retries: 2, + delay: (_) => Duration.ZERO, + onRetry: expectAsync3((request, response, retryCount) { + expect(request.url, equals(Uri.parse("http://example.org"))); + expect(response.statusCode, equals(503)); + expect(retryCount, equals(count)); + count++; + }, count: 2)); + var response = await client.get("http://example.org"); + expect(response.statusCode, equals(503)); + }); + test("copies all request attributes for each attempt", () async { var client = new RetryClient.withDelays( new MockClient(expectAsync1((request) async { From 128e710ca0acdc1c97612ad4ac416c58a29ee39d Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Tue, 20 Mar 2018 13:14:32 -0700 Subject: [PATCH 004/448] Add a whenError() callback to retry requests that error (#3) See dart-lang/pub#1826 --- CHANGELOG.md | 5 +++++ lib/http_retry.dart | 37 +++++++++++++++++++++++++++++-------- pubspec.yaml | 2 +- test/http_retry_test.dart | 25 +++++++++++++++++++++++++ 4 files changed, 60 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ced97680f8..d1aa1633dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.1.1 + +* Add a `whenError()` parameter to allow requests to be retried when they + encounter networking errors. + ## 0.1.0 * Initial version. diff --git a/lib/http_retry.dart b/lib/http_retry.dart index 4f30e03d3c..e1b08fdf88 100644 --- a/lib/http_retry.dart +++ b/lib/http_retry.dart @@ -19,6 +19,9 @@ class RetryClient extends BaseClient { /// The callback that determines whether a request should be retried. final bool Function(BaseResponse) _when; + /// The callback that determines whether a request when an error is thrown. + final bool Function(dynamic, StackTrace) _whenError; + /// The callback that determines how long to wait before retrying a request. final Duration Function(int) _delay; @@ -32,7 +35,8 @@ class RetryClient extends BaseClient { /// /// By default, this retries requests whose responses have status code 503 /// Temporary Failure. If [when] is passed, it retries any request for whose - /// response [when] returns `true`. + /// response [when] returns `true`. If [whenError] is passed, it also retries + /// any request that throws an error for which [whenError] returns `true`. /// /// By default, this waits 500ms between the original request and the first /// retry, then increases the delay by 1.5x for each subsequent retry. If @@ -40,14 +44,18 @@ class RetryClient extends BaseClient { /// given (zero-based) retry. /// /// If [onRetry] is passed, it's called immediately before each retry so that - /// the client has a chance to perform side effects like logging. + /// the client has a chance to perform side effects like logging. The + /// `response` parameter will be null if the request was retried due to an + /// error for which [whenError] returned `true`. RetryClient(this._inner, {int retries, bool when(BaseResponse response), + bool whenError(error, StackTrace stackTrace), Duration delay(int retryCount), void onRetry(BaseRequest request, BaseResponse response, int retryCount)}) : _retries = retries ?? 3, _when = when ?? ((response) => response.statusCode == 503), + _whenError = whenError ?? ((_, __) => false), _delay = delay ?? ((retryCount) => new Duration(milliseconds: 500) * math.pow(1.5, retryCount)), @@ -63,16 +71,20 @@ class RetryClient extends BaseClient { /// `delays[1]` after the first retry, and so on. RetryClient.withDelays(Client inner, Iterable delays, {bool when(BaseResponse response), + bool whenError(error, StackTrace stackTrace), void onRetry(BaseRequest request, BaseResponse response, int retryCount)}) - : this._withDelays(inner, delays.toList(), when: when, onRetry: onRetry); + : this._withDelays(inner, delays.toList(), + when: when, whenError: whenError, onRetry: onRetry); RetryClient._withDelays(Client inner, List delays, {bool when(BaseResponse response), + bool whenError(error, StackTrace stackTrace), void onRetry(BaseRequest request, BaseResponse response, int retryCount)}) : this(inner, retries: delays.length, delay: (retryCount) => delays[retryCount], when: when, + whenError: whenError, onRetry: onRetry); Future send(BaseRequest request) async { @@ -80,12 +92,21 @@ class RetryClient extends BaseClient { var i = 0; while (true) { - var response = await _inner.send(_copyRequest(request, splitter.split())); - if (i == _retries || !_when(response)) return response; + StreamedResponse response; + try { + response = await _inner.send(_copyRequest(request, splitter.split())); + } catch (error, stackTrace) { + if (i == _retries || !_whenError(error, stackTrace)) rethrow; + } + + if (response != null) { + if (i == _retries || !_when(response)) return response; + + // Make sure the response stream is listened to so that we don't leave + // dangling connections. + response.stream.listen((_) {}).cancel()?.catchError((_) {}); + } - // Make sure the response stream is listened to so that we don't leave - // dangling connections. - response.stream.listen((_) {}).cancel()?.catchError((_) {}); await new Future.delayed(_delay(i)); if (_onRetry != null) _onRetry(request, response, i); i++; diff --git a/pubspec.yaml b/pubspec.yaml index b2b3c7e7d3..030ad20fc7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http_retry -version: 0.1.0 +version: 0.1.1 description: HTTP client middleware that automatically retries requests. author: Dart Team homepage: https://github.com/dart-lang/http_retry diff --git a/test/http_retry_test.dart b/test/http_retry_test.dart index a0f4d30980..29ab172294 100644 --- a/test/http_retry_test.dart +++ b/test/http_retry_test.dart @@ -66,6 +66,31 @@ void main() { expect(response.statusCode, equals(503)); }); + test("retries on any request where whenError() returns true", () async { + var count = 0; + var client = new RetryClient( + new MockClient(expectAsync1((request) async { + count++; + if (count < 2) throw "oh no"; + return new Response("", 200); + }, count: 2)), + whenError: (error, _) => error == "oh no", + delay: (_) => Duration.ZERO); + + var response = await client.get("http://example.org"); + expect(response.statusCode, equals(200)); + }); + + test("doesn't retry a request where whenError() returns false", () async { + var count = 0; + var client = new RetryClient( + new MockClient(expectAsync1((request) async => throw "oh no")), + whenError: (error, _) => error == "oh yeah", + delay: (_) => Duration.ZERO); + + expect(client.get("http://example.org"), throwsA("oh no")); + }); + test("retries three times by default", () async { var client = new RetryClient( new MockClient( From 5e221f7d4b1f46575e63a1335db9517cf26a8ad0 Mon Sep 17 00:00:00 2001 From: "Lasse R.H. Nielsen" Date: Tue, 22 May 2018 15:03:57 +0200 Subject: [PATCH 005/448] Remove upper case constants (#4) * Remove usage of upper-case constants. * update SDK version * remove stable from Travis config --- .travis.yml | 4 +--- CHANGELOG.md | 4 ++++ pubspec.yaml | 4 ++-- test/http_retry_test.dart | 24 ++++++++++++------------ 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9124e035b5..3c6ac28985 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,6 @@ language: dart dart: - dev -- stable - # See https://docs.travis-ci.com/user/languages/dart/ for details. dart_task: - test: --platform vm @@ -19,7 +17,7 @@ dart_task: # them against each Dart version. matrix: include: - - dart: stable + - dart: dev dart_task: dartfmt - dart: dev dart_task: dartanalyzer diff --git a/CHANGELOG.md b/CHANGELOG.md index d1aa1633dd..f04571e193 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.1+1 + +* Updated SDK version to 2.0.0-dev.17.0 + ## 0.1.1 * Add a `whenError()` parameter to allow requests to be retried when they diff --git a/pubspec.yaml b/pubspec.yaml index 030ad20fc7..30eeb260c0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,11 +1,11 @@ name: http_retry -version: 0.1.1 +version: 0.1.1+1 description: HTTP client middleware that automatically retries requests. author: Dart Team homepage: https://github.com/dart-lang/http_retry environment: - sdk: '>=1.24.0 <2.0.0' + sdk: '>=2.0.0-dev.17.0 <2.0.0' dependencies: async: ">=1.2.0 <=3.0.0" diff --git a/test/http_retry_test.dart b/test/http_retry_test.dart index 29ab172294..952e1f2667 100644 --- a/test/http_retry_test.dart +++ b/test/http_retry_test.dart @@ -44,7 +44,7 @@ void main() { count++; return count < 2 ? new Response("", 503) : new Response("", 200); }, count: 2)), - delay: (_) => Duration.ZERO); + delay: (_) => Duration.zero); var response = await client.get("http://example.org"); expect(response.statusCode, equals(200)); @@ -59,7 +59,7 @@ void main() { headers: {"retry": count < 2 ? "true" : "false"}); }, count: 2)), when: (response) => response.headers["retry"] == "true", - delay: (_) => Duration.ZERO); + delay: (_) => Duration.zero); var response = await client.get("http://example.org"); expect(response.headers, containsPair("retry", "false")); @@ -75,7 +75,7 @@ void main() { return new Response("", 200); }, count: 2)), whenError: (error, _) => error == "oh no", - delay: (_) => Duration.ZERO); + delay: (_) => Duration.zero); var response = await client.get("http://example.org"); expect(response.statusCode, equals(200)); @@ -86,7 +86,7 @@ void main() { var client = new RetryClient( new MockClient(expectAsync1((request) async => throw "oh no")), whenError: (error, _) => error == "oh yeah", - delay: (_) => Duration.ZERO); + delay: (_) => Duration.zero); expect(client.get("http://example.org"), throwsA("oh no")); }); @@ -95,7 +95,7 @@ void main() { var client = new RetryClient( new MockClient( expectAsync1((_) async => new Response("", 503), count: 4)), - delay: (_) => Duration.ZERO); + delay: (_) => Duration.zero); var response = await client.get("http://example.org"); expect(response.statusCode, equals(503)); }); @@ -105,7 +105,7 @@ void main() { new MockClient( expectAsync1((_) async => new Response("", 503), count: 13)), retries: 12, - delay: (_) => Duration.ZERO); + delay: (_) => Duration.zero); var response = await client.get("http://example.org"); expect(response.statusCode, equals(503)); }); @@ -116,7 +116,7 @@ void main() { var client = new RetryClient(new MockClient(expectAsync1((_) async { count++; if (count == 1) { - expect(fake.elapsed, equals(Duration.ZERO)); + expect(fake.elapsed, equals(Duration.zero)); } else if (count == 2) { expect(fake.elapsed, equals(new Duration(milliseconds: 500))); } else if (count == 3) { @@ -140,9 +140,9 @@ void main() { new MockClient(expectAsync1((_) async { count++; if (count == 1) { - expect(fake.elapsed, equals(Duration.ZERO)); + expect(fake.elapsed, equals(Duration.zero)); } else if (count == 2) { - expect(fake.elapsed, equals(Duration.ZERO)); + expect(fake.elapsed, equals(Duration.zero)); } else if (count == 3) { expect(fake.elapsed, equals(new Duration(seconds: 1))); } else if (count == 4) { @@ -165,7 +165,7 @@ void main() { new MockClient(expectAsync1((_) async { count++; if (count == 1) { - expect(fake.elapsed, equals(Duration.ZERO)); + expect(fake.elapsed, equals(Duration.zero)); } else if (count == 2) { expect(fake.elapsed, equals(new Duration(seconds: 1))); } else if (count == 3) { @@ -193,7 +193,7 @@ void main() { new MockClient( expectAsync1((_) async => new Response("", 503), count: 3)), retries: 2, - delay: (_) => Duration.ZERO, + delay: (_) => Duration.zero, onRetry: expectAsync3((request, response, retryCount) { expect(request.url, equals(Uri.parse("http://example.org"))); expect(response.statusCode, equals(503)); @@ -217,7 +217,7 @@ void main() { expect(request.body, equals("hello")); return new Response("", 503); }, count: 2)), - [Duration.ZERO]); + [Duration.zero]); var request = new Request("POST", Uri.parse("http://example.org")); request.body = "hello"; From 5665567620b7b7d92a6ed8f2d7a9f680c395fcbe Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Thu, 19 Jul 2018 17:06:55 -0400 Subject: [PATCH 006/448] chore: set max SDK version to <3.0.0 (#5) --- .gitignore | 3 +-- .travis.yml | 19 +++++++------------ CHANGELOG.md | 6 +++++- analysis_options.yaml | 1 - pubspec.yaml | 13 +++++++------ test/http_retry_test.dart | 1 - 6 files changed, 20 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 5d53a966da..49ce72d76a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ +.dart_tool/ .packages -.pub/ -build/ pubspec.lock diff --git a/.travis.yml b/.travis.yml index 3c6ac28985..9d8258cc4c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,18 +9,13 @@ dart: - dev # See https://docs.travis-ci.com/user/languages/dart/ for details. dart_task: -- test: --platform vm -# Uncomment this line to run tests on the browser. -# - test: --platform firefox - -# Only run one instance of the formatter and the analyzer, rather than running -# them against each Dart version. -matrix: - include: - - dart: dev - dart_task: dartfmt - - dart: dev - dart_task: dartanalyzer + - dartfmt + - dartanalyzer + # TODO: reinstate tests once https://github.com/dart-lang/http_retry/issues/6 is fixed + # - test: --platform vm + # xvfb: false + # # Uncomment this line to run tests on the browser. + # - test: --platform firefox # Only building master means that we don't run two builds for each pull request. branches: diff --git a/CHANGELOG.md b/CHANGELOG.md index f04571e193..d7765f9e47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ +## 0.1.1+2 + +* Set max SDK version to `<3.0.0`, and adjust other dependencies. + ## 0.1.1+1 -* Updated SDK version to 2.0.0-dev.17.0 +* Update SDK version to 2.0.0-dev.17.0. ## 0.1.1 diff --git a/analysis_options.yaml b/analysis_options.yaml index a10d4c5a05..2e6cdca29c 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,2 +1 @@ analyzer: - strong-mode: true diff --git a/pubspec.yaml b/pubspec.yaml index 30eeb260c0..d9261a7326 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,16 +1,17 @@ name: http_retry -version: 0.1.1+1 +version: 0.1.1+2 + description: HTTP client middleware that automatically retries requests. author: Dart Team homepage: https://github.com/dart-lang/http_retry environment: - sdk: '>=2.0.0-dev.17.0 <2.0.0' + sdk: '>=2.0.0-dev.17.0 <3.0.0' dependencies: - async: ">=1.2.0 <=3.0.0" - http: "^0.11.0" + async: ^2.0.7 + http: ^0.11.0 dev_dependencies: - fake_async: "^0.1.2" - test: "^0.12.0" + fake_async: ^0.1.2 + test: ^1.2.0 diff --git a/test/http_retry_test.dart b/test/http_retry_test.dart index 952e1f2667..dc7bc19925 100644 --- a/test/http_retry_test.dart +++ b/test/http_retry_test.dart @@ -82,7 +82,6 @@ void main() { }); test("doesn't retry a request where whenError() returns false", () async { - var count = 0; var client = new RetryClient( new MockClient(expectAsync1((request) async => throw "oh no")), whenError: (error, _) => error == "oh yeah", From b49f2cdd19d6526c9f98b43108007a2a4438522a Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 20 Aug 2018 10:01:54 -0700 Subject: [PATCH 007/448] misc: fix dependency on fake_async (#8) --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index d9261a7326..ab20de217e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,5 +13,5 @@ dependencies: http: ^0.11.0 dev_dependencies: - fake_async: ^0.1.2 + fake_async: ^1.0.0 test: ^1.2.0 From f92171f3246ad8c1e41b024ef0fbeb34cf34e9b1 Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Thu, 13 Sep 2018 06:49:39 -0700 Subject: [PATCH 008/448] Make `package:http/http.dart` support all platforms (#198) Fixes https://github.com/dart-lang/http/issues/22 Adds config specific imports to make `package:http/http.dart` support all platforms, and allow the `Client` factory constructor to return a valid `Client` for the web platform. This should eliminate almost all need for the platform specific imports for consumers, although it does also add the `io_client.dart` public import. Passes presubmit internally, with edits in only 3 files (they use the IoClient constructor directly, and pass in an HttpClient). Externally build_runner now supports config specific imports as well, I am currently working on validating everything works as expected there with this change. ### New Features * The regular `Client` factory constructor is now usable anywhere that `dart:io` or `dart:html` are available, and will give you an `IoClient` or `BrowserClient` respectively. * The `package:http/http.dart` import is now safe to use on the web (or anywhere that either `dart:io` or `dart:html` are available). ### Breaking Changes * In order to use or reference the `IoClient` directly, you will need to import the new `package:http/io_client.dart` import. This is typically only necessary if you are passing a custom `HttpClient` instance to the constructor, in which case you are already giving up support for web. --- CHANGELOG.md | 17 +++++ lib/browser_client.dart | 105 +----------------------------- lib/http.dart | 1 - lib/io_client.dart | 5 ++ lib/src/browser_client.dart | 108 +++++++++++++++++++++++++++++++ lib/src/client.dart | 15 +++-- lib/src/client_stub.dart | 9 +++ lib/src/io_client.dart | 3 + lib/src/multipart_file.dart | 19 +++--- lib/src/multipart_file_io.dart | 23 +++++++ lib/src/multipart_file_stub.dart | 14 ++++ pubspec.yaml | 5 +- test/io/client_test.dart | 3 +- 13 files changed, 204 insertions(+), 123 deletions(-) create mode 100644 lib/io_client.dart create mode 100644 lib/src/browser_client.dart create mode 100644 lib/src/client_stub.dart create mode 100644 lib/src/multipart_file_io.dart create mode 100644 lib/src/multipart_file_stub.dart diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c1d1b02f4..d084ff77e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,20 @@ +## 0.12.0-dev + +### New Features + +* The regular `Client` factory constructor is now usable anywhere that `dart:io` + or `dart:html` are available, and will give you an `IoClient` or + `BrowserClient` respectively. +* The `package:http/http.dart` import is now safe to use on the web (or + anywhere that either `dart:io` or `dart:html` are available). + +### Breaking Changes + +* In order to use or reference the `IoClient` directly, you will need to import + the new `package:http/io_client.dart` import. This is typically only necessary + if you are passing a custom `HttpClient` instance to the constructor, in which + case you are already giving up support for web. + ## 0.11.3+17 * Use new Dart 2 constant names. This branch is only for allowing existing diff --git a/lib/browser_client.dart b/lib/browser_client.dart index f767390741..2cd0e5c7a4 100644 --- a/lib/browser_client.dart +++ b/lib/browser_client.dart @@ -2,107 +2,4 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; -import 'dart:html'; -import 'dart:typed_data'; - -import 'src/base_client.dart'; -import 'src/base_request.dart'; -import 'src/byte_stream.dart'; -import 'src/exception.dart'; -import 'src/streamed_response.dart'; - -// TODO(nweiz): Move this under src/, re-export from lib/http.dart, and use this -// automatically from [new Client] once sdk#24581 is fixed. - -/// A `dart:html`-based HTTP client that runs in the browser and is backed by -/// XMLHttpRequests. -/// -/// This client inherits some of the limitations of XMLHttpRequest. It ignores -/// the [BaseRequest.contentLength], [BaseRequest.persistentConnection], -/// [BaseRequest.followRedirects], and [BaseRequest.maxRedirects] fields. It is -/// also unable to stream requests or responses; a request will only be sent and -/// a response will only be returned once all the data is available. -class BrowserClient extends BaseClient { - /// The currently active XHRs. - /// - /// These are aborted if the client is closed. - final _xhrs = new Set(); - - /// Creates a new HTTP client. - BrowserClient(); - - /// Whether to send credentials such as cookies or authorization headers for - /// cross-site requests. - /// - /// Defaults to `false`. - bool withCredentials = false; - - /// Sends an HTTP request and asynchronously returns the response. - Future send(BaseRequest request) async { - var bytes = await request.finalize().toBytes(); - var xhr = new HttpRequest(); - _xhrs.add(xhr); - _openHttpRequest(xhr, request.method, request.url.toString(), asynch: true); - xhr.responseType = 'blob'; - xhr.withCredentials = withCredentials; - request.headers.forEach(xhr.setRequestHeader); - - var completer = new Completer(); - xhr.onLoad.first.then((_) { - // TODO(nweiz): Set the response type to "arraybuffer" when issue 18542 - // is fixed. - var blob = xhr.response == null ? new Blob([]) : xhr.response; - var reader = new FileReader(); - - reader.onLoad.first.then((_) { - var body = reader.result as Uint8List; - completer.complete(new StreamedResponse( - new ByteStream.fromBytes(body), xhr.status, - contentLength: body.length, - request: request, - headers: xhr.responseHeaders, - reasonPhrase: xhr.statusText)); - }); - - reader.onError.first.then((error) { - completer.completeError( - new ClientException(error.toString(), request.url), - StackTrace.current); - }); - - reader.readAsArrayBuffer(blob); - }); - - xhr.onError.first.then((_) { - // Unfortunately, the underlying XMLHttpRequest API doesn't expose any - // specific information about the error itself. - completer.completeError( - new ClientException("XMLHttpRequest error.", request.url), - StackTrace.current); - }); - - xhr.send(bytes); - - try { - return await completer.future; - } finally { - _xhrs.remove(xhr); - } - } - - // TODO(nweiz): Remove this when sdk#24637 is fixed. - void _openHttpRequest(HttpRequest request, String method, String url, - {bool asynch, String user, String password}) { - request.open(method, url, async: asynch, user: user, password: password); - } - - /// Closes the client. - /// - /// This terminates all active requests. - void close() { - for (var xhr in _xhrs) { - xhr.abort(); - } - } -} +export 'src/browser_client.dart' show BrowserClient; diff --git a/lib/http.dart b/lib/http.dart index 3e16285829..e682ed1a6a 100644 --- a/lib/http.dart +++ b/lib/http.dart @@ -16,7 +16,6 @@ export 'src/base_response.dart'; export 'src/byte_stream.dart'; export 'src/client.dart'; export 'src/exception.dart'; -export 'src/io_client.dart'; export 'src/multipart_file.dart'; export 'src/multipart_request.dart'; export 'src/request.dart'; diff --git a/lib/io_client.dart b/lib/io_client.dart new file mode 100644 index 0000000000..170acfba4e --- /dev/null +++ b/lib/io_client.dart @@ -0,0 +1,5 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +export 'src/io_client.dart' show IOClient; diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart new file mode 100644 index 0000000000..4f49ec7671 --- /dev/null +++ b/lib/src/browser_client.dart @@ -0,0 +1,108 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:html'; +import 'dart:typed_data'; + +import 'base_client.dart'; +import 'base_request.dart'; +import 'byte_stream.dart'; +import 'exception.dart'; +import 'streamed_response.dart'; + +/// Used from conditional imports, matches the definition in `client_stub.dart`. +BaseClient createClient() => BrowserClient(); + +/// A `dart:html`-based HTTP client that runs in the browser and is backed by +/// XMLHttpRequests. +/// +/// This client inherits some of the limitations of XMLHttpRequest. It ignores +/// the [BaseRequest.contentLength], [BaseRequest.persistentConnection], +/// [BaseRequest.followRedirects], and [BaseRequest.maxRedirects] fields. It is +/// also unable to stream requests or responses; a request will only be sent and +/// a response will only be returned once all the data is available. +class BrowserClient extends BaseClient { + /// The currently active XHRs. + /// + /// These are aborted if the client is closed. + final _xhrs = new Set(); + + /// Creates a new HTTP client. + BrowserClient(); + + /// Whether to send credentials such as cookies or authorization headers for + /// cross-site requests. + /// + /// Defaults to `false`. + bool withCredentials = false; + + /// Sends an HTTP request and asynchronously returns the response. + Future send(BaseRequest request) async { + var bytes = await request.finalize().toBytes(); + var xhr = new HttpRequest(); + _xhrs.add(xhr); + _openHttpRequest(xhr, request.method, request.url.toString(), asynch: true); + xhr.responseType = 'blob'; + xhr.withCredentials = withCredentials; + request.headers.forEach(xhr.setRequestHeader); + + var completer = new Completer(); + xhr.onLoad.first.then((_) { + // TODO(nweiz): Set the response type to "arraybuffer" when issue 18542 + // is fixed. + var blob = xhr.response == null ? new Blob([]) : xhr.response; + var reader = new FileReader(); + + reader.onLoad.first.then((_) { + var body = reader.result as Uint8List; + completer.complete(new StreamedResponse( + new ByteStream.fromBytes(body), xhr.status, + contentLength: body.length, + request: request, + headers: xhr.responseHeaders, + reasonPhrase: xhr.statusText)); + }); + + reader.onError.first.then((error) { + completer.completeError( + new ClientException(error.toString(), request.url), + StackTrace.current); + }); + + reader.readAsArrayBuffer(blob); + }); + + xhr.onError.first.then((_) { + // Unfortunately, the underlying XMLHttpRequest API doesn't expose any + // specific information about the error itself. + completer.completeError( + new ClientException("XMLHttpRequest error.", request.url), + StackTrace.current); + }); + + xhr.send(bytes); + + try { + return await completer.future; + } finally { + _xhrs.remove(xhr); + } + } + + // TODO(nweiz): Remove this when sdk#24637 is fixed. + void _openHttpRequest(HttpRequest request, String method, String url, + {bool asynch, String user, String password}) { + request.open(method, url, async: asynch, user: user, password: password); + } + + /// Closes the client. + /// + /// This terminates all active requests. + void close() { + for (var xhr in _xhrs) { + xhr.abort(); + } + } +} diff --git a/lib/src/client.dart b/lib/src/client.dart index bb78314c44..78ea0a18a8 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -8,7 +8,12 @@ import 'dart:typed_data'; import 'base_client.dart'; import 'base_request.dart'; -import 'io_client.dart'; +// ignore: uri_does_not_exist +import 'client_stub.dart' + // ignore: uri_does_not_exist + if (dart.library.html) 'browser_client.dart' + // ignore: uri_does_not_exist + if (dart.library.io) 'io_client.dart'; import 'response.dart'; import 'streamed_response.dart'; @@ -24,10 +29,10 @@ import 'streamed_response.dart'; abstract class Client { /// Creates a new client. /// - /// Currently this will create an [IOClient] if `dart:io` is available and - /// throw an [UnsupportedError] otherwise. In the future, it will create a - /// [BrowserClient] if `dart:html` is available. - factory Client() => new IOClient(); + /// Currently this will create an `IOClient` if `dart:io` is available and + /// a `BrowserClient` if `dart:html` is available, otherwise it will throw + /// an unsupported error. + factory Client() => createClient(); /// Sends an HTTP HEAD request with the given headers to the given URL, which /// can be a [Uri] or a [String]. diff --git a/lib/src/client_stub.dart b/lib/src/client_stub.dart new file mode 100644 index 0000000000..1a34d50d7e --- /dev/null +++ b/lib/src/client_stub.dart @@ -0,0 +1,9 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'base_client.dart'; + +/// Implemented in `browser_client.dart` and `io_client.dart`. +BaseClient createClient() => throw UnsupportedError( + 'Cannot create a client without dart:html or dart:io.'); diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index 403fe00340..53054f8b63 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -12,6 +12,9 @@ import 'base_request.dart'; import 'exception.dart'; import 'streamed_response.dart'; +/// Used from conditional imports, matches the definition in `client_stub.dart`. +BaseClient createClient() => IOClient(); + /// A `dart:io`-based HTTP client. /// /// This is the default client when running on the command line. diff --git a/lib/src/multipart_file.dart b/lib/src/multipart_file.dart index 32f2ada2eb..a173f67f68 100644 --- a/lib/src/multipart_file.dart +++ b/lib/src/multipart_file.dart @@ -4,15 +4,17 @@ import 'dart:async'; import 'dart:convert'; -import 'dart:io'; -import 'package:async/async.dart'; import 'package:http_parser/http_parser.dart'; -import 'package:path/path.dart' as path; import 'byte_stream.dart'; import 'utils.dart'; +// ignore: uri_does_not_exist +import 'multipart_file_stub.dart' + // ignore: uri_does_not_exist + if (dart.library.io) 'multipart_file_io.dart'; + /// A file to be uploaded as part of a [MultipartRequest]. This doesn't need to /// correspond to a physical file. class MultipartFile { @@ -87,14 +89,9 @@ class MultipartFile { /// Throws an [UnsupportedError] if `dart:io` isn't supported in this /// environment. static Future fromPath(String field, String filePath, - {String filename, MediaType contentType}) async { - if (filename == null) filename = path.basename(filePath); - var file = new File(filePath); - var length = await file.length(); - var stream = new ByteStream(DelegatingStream.typed(file.openRead())); - return new MultipartFile(field, stream, length, - filename: filename, contentType: contentType); - } + {String filename, MediaType contentType}) => + multipartFileFromPath(field, filePath, + filename: filename, contentType: contentType); // Finalizes the file in preparation for it being sent as part of a // [MultipartRequest]. This returns a [ByteStream] that should emit the body diff --git a/lib/src/multipart_file_io.dart b/lib/src/multipart_file_io.dart new file mode 100644 index 0000000000..c49998a3f3 --- /dev/null +++ b/lib/src/multipart_file_io.dart @@ -0,0 +1,23 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:async/async.dart'; +import 'package:http_parser/http_parser.dart'; +import 'package:path/path.dart' as p; + +import 'byte_stream.dart'; +import 'multipart_file.dart'; + +Future multipartFileFromPath(String field, String filePath, + {String filename, MediaType contentType}) async { + if (filename == null) filename = p.basename(filePath); + var file = new File(filePath); + var length = await file.length(); + var stream = new ByteStream(DelegatingStream.typed(file.openRead())); + return new MultipartFile(field, stream, length, + filename: filename, contentType: contentType); +} diff --git a/lib/src/multipart_file_stub.dart b/lib/src/multipart_file_stub.dart new file mode 100644 index 0000000000..b2304415fe --- /dev/null +++ b/lib/src/multipart_file_stub.dart @@ -0,0 +1,14 @@ +// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; + +import 'package:http_parser/http_parser.dart'; + +import 'multipart_file.dart'; + +Future multipartFileFromPath(String field, String filePath, + {String filename, MediaType contentType}) => + throw UnsupportedError( + 'MultipartFile is only supported where dart:io is available.'); diff --git a/pubspec.yaml b/pubspec.yaml index 36be5ad1bb..67730fef85 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.11.4-dev +version: 0.12.0-dev author: "Dart Team " homepage: https://github.com/dart-lang/http description: A composable, Future-based API for making HTTP requests. @@ -14,3 +14,6 @@ dependencies: dev_dependencies: test: ^1.3.0 + +dependency_overrides: + package_resolver: 1.0.4 diff --git a/test/io/client_test.dart b/test/io/client_test.dart index 410a87543c..04fca5ce1a 100644 --- a/test/io/client_test.dart +++ b/test/io/client_test.dart @@ -7,6 +7,7 @@ import 'dart:io'; import 'package:http/http.dart' as http; +import 'package:http/src/io_client.dart' as http_io; import 'package:test/test.dart'; import 'utils.dart'; @@ -56,7 +57,7 @@ void main() { expect( startServer().then((_) { var ioClient = new HttpClient(); - var client = new http.IOClient(ioClient); + var client = new http_io.IOClient(ioClient); var request = new http.StreamedRequest("POST", serverUrl); request.headers[HttpHeaders.contentTypeHeader] = 'application/json; charset=utf-8'; From c8b0cbc102eca73771fdcf1307d70fb40124e0fd Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Tue, 18 Sep 2018 10:14:39 -0700 Subject: [PATCH 009/448] prepare to release 0.12.0 (#199) --- CHANGELOG.md | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d084ff77e8..88e056b178 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.12.0-dev +## 0.12.0 ### New Features diff --git a/pubspec.yaml b/pubspec.yaml index 67730fef85..887059e979 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.12.0-dev +version: 0.12.0 author: "Dart Team " homepage: https://github.com/dart-lang/http description: A composable, Future-based API for making HTTP requests. From 7b7438411f38ff5a76e0a04d9606c28020904e15 Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Tue, 18 Sep 2018 10:40:02 -0700 Subject: [PATCH 010/448] remove override on package_resolver (#201) --- pubspec.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 887059e979..547ad18144 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,6 +14,3 @@ dependencies: dev_dependencies: test: ^1.3.0 - -dependency_overrides: - package_resolver: 1.0.4 From ec4ad98b4844326ba37370e49f6baa60b1756600 Mon Sep 17 00:00:00 2001 From: analogic Date: Mon, 8 Oct 2018 19:24:29 +0200 Subject: [PATCH 011/448] Fix a typo in example code (#205) --- lib/src/multipart_request.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index 76811431dd..78234cee4a 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -22,7 +22,7 @@ final _newlineRegExp = new RegExp(r"\r\n|\r|\n"); /// `multipart/form-data`. This value will override any value set by the user. /// /// var uri = Uri.parse("http://pub.dartlang.org/packages/create"); -/// var request = new http.MultipartRequest("POST", url); +/// var request = new http.MultipartRequest("POST", uri); /// request.fields['user'] = 'nweiz@google.com'; /// request.files.add(new http.MultipartFile.fromFile( /// 'package', From 09bc12ebf1ecfa2501c98e6741684b9fbf0b6a56 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 26 Oct 2018 09:48:09 -0700 Subject: [PATCH 012/448] Support the latest pkg:http, prepare for release (#9) --- CHANGELOG.md | 4 ++++ analysis_options.yaml | 1 - pubspec.yaml | 6 +++--- 3 files changed, 7 insertions(+), 4 deletions(-) delete mode 100644 analysis_options.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index d7765f9e47..9005ccddc5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.1+3 + +* Support the latest `pkg:http` release. + ## 0.1.1+2 * Set max SDK version to `<3.0.0`, and adjust other dependencies. diff --git a/analysis_options.yaml b/analysis_options.yaml deleted file mode 100644 index 2e6cdca29c..0000000000 --- a/analysis_options.yaml +++ /dev/null @@ -1 +0,0 @@ -analyzer: diff --git a/pubspec.yaml b/pubspec.yaml index ab20de217e..74168c4731 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,16 +1,16 @@ name: http_retry -version: 0.1.1+2 +version: 0.1.1+3 description: HTTP client middleware that automatically retries requests. author: Dart Team homepage: https://github.com/dart-lang/http_retry environment: - sdk: '>=2.0.0-dev.17.0 <3.0.0' + sdk: '>=2.0.0 <3.0.0' dependencies: async: ^2.0.7 - http: ^0.11.0 + http: '>=0.11.0 <0.13.0' dev_dependencies: fake_async: ^1.0.0 From 842fdb0ad19a49122204ac98226b7cbf5e66c972 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Fri, 14 Dec 2018 12:41:14 +0100 Subject: [PATCH 013/448] Update pubspec.yaml --- pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 547ad18144..31b2bf1c15 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,8 @@ name: http -version: 0.12.0 +version: 0.12.0+1 author: "Dart Team " homepage: https://github.com/dart-lang/http -description: A composable, Future-based API for making HTTP requests. +description: A composable, cross-platform, Future-based API for making HTTP requests. environment: sdk: ">=2.0.0-dev.61.0 <3.0.0" From e03faf96bc27fb7c985bfd1f77cde683389553d2 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Fri, 14 Dec 2018 12:44:43 +0100 Subject: [PATCH 014/448] Add badges --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 8d852914d4..acee763c26 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,9 @@ A composable, Future-based library for making HTTP requests. +[![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dartlang.org/packages/http) +[![Build Status](https://travis-ci.org/dart-lang/http.svg?branch=master)](https://travis-ci.org/dart-lang/http) + This package contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's platform-independent, and can be used on both the command-line and the browser. Currently the global utility functions From 138f45967475686a173e9fe85d6b4e32e873653e Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Fri, 14 Dec 2018 13:12:47 +0100 Subject: [PATCH 015/448] Add a small example --- example/main.dart | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 example/main.dart diff --git a/example/main.dart b/example/main.dart new file mode 100644 index 0000000000..159a4aa042 --- /dev/null +++ b/example/main.dart @@ -0,0 +1,19 @@ +import 'package:http/http.dart' as http; +import 'dart:convert' as convert; + +main(List arguments) { + // This example uses the Google Books API to search for books about http. + // https://developers.google.com/books/docs/overview + var url = "https://www.googleapis.com/books/v1/volumes?q={http}"; + + // Await the http get response, then decode the json-formatted responce. + http.get(url).then((response) { + if (response.statusCode == 200) { + var jsonResponse = convert.jsonDecode(response.body); + var itemCount = jsonResponse['totalItems']; + print("Number of books about http: $itemCount."); + } else { + print("Request failed with status: ${response.statusCode}."); + } + }); +} From 2b57ff77c6ec22c4ac193d3992d964412010817e Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Fri, 14 Dec 2018 13:14:19 +0100 Subject: [PATCH 016/448] Create pubspec.yaml --- example/pubspec.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 example/pubspec.yaml diff --git a/example/pubspec.yaml b/example/pubspec.yaml new file mode 100644 index 0000000000..d702f5c746 --- /dev/null +++ b/example/pubspec.yaml @@ -0,0 +1,8 @@ +name: httpexample +description: A sample http example. + +environment: + sdk: '>=2.0.0 <3.0.0' + +dependencies: + http: From 18c85e1c9dff429a4ed73650c8443b1ea88a2e87 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 14 Dec 2018 09:25:09 -0800 Subject: [PATCH 017/448] Remove gratuitous header in readme --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index acee763c26..666c8ef5c7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -# http - A composable, Future-based library for making HTTP requests. [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dartlang.org/packages/http) From 1da474351d91596e06106b77410507ad26dfee6a Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Wed, 2 Jan 2019 13:49:19 +0100 Subject: [PATCH 018/448] Review feedback --- example/main.dart | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/example/main.dart b/example/main.dart index 159a4aa042..1cabc5ca33 100644 --- a/example/main.dart +++ b/example/main.dart @@ -1,19 +1,18 @@ -import 'package:http/http.dart' as http; import 'dart:convert' as convert; +import 'package:http/http.dart' as http; -main(List arguments) { +main(List arguments) async { // This example uses the Google Books API to search for books about http. // https://developers.google.com/books/docs/overview var url = "https://www.googleapis.com/books/v1/volumes?q={http}"; // Await the http get response, then decode the json-formatted responce. - http.get(url).then((response) { - if (response.statusCode == 200) { - var jsonResponse = convert.jsonDecode(response.body); - var itemCount = jsonResponse['totalItems']; - print("Number of books about http: $itemCount."); - } else { - print("Request failed with status: ${response.statusCode}."); - } - }); + var response = await http.get(url); + if (response.statusCode == 200) { + var jsonResponse = convert.jsonDecode(response.body); + var itemCount = jsonResponse['totalItems']; + print("Number of books about http: $itemCount."); + } else { + print("Request failed with status: ${response.statusCode}."); + } } From afab00b7355e04dbbad30694796c9efe928d5c42 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Tue, 8 Jan 2019 16:38:05 +0100 Subject: [PATCH 019/448] Delete pubspec.yaml --- example/pubspec.yaml | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 example/pubspec.yaml diff --git a/example/pubspec.yaml b/example/pubspec.yaml deleted file mode 100644 index d702f5c746..0000000000 --- a/example/pubspec.yaml +++ /dev/null @@ -1,8 +0,0 @@ -name: httpexample -description: A sample http example. - -environment: - sdk: '>=2.0.0 <3.0.0' - -dependencies: - http: From b73dda8d0956cf740745faafac884625f56e9595 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 6 Mar 2019 12:15:12 -0800 Subject: [PATCH 020/448] Fix example in MulitpartRequest docs (#250) Fixes #140 - `MultipartFile.fromFile` does not exist, update to `fromPath`. - Use async/await. - Use single quotes consistently. --- lib/src/multipart_request.dart | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index 78234cee4a..12686695ad 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -24,13 +24,12 @@ final _newlineRegExp = new RegExp(r"\r\n|\r|\n"); /// var uri = Uri.parse("http://pub.dartlang.org/packages/create"); /// var request = new http.MultipartRequest("POST", uri); /// request.fields['user'] = 'nweiz@google.com'; -/// request.files.add(new http.MultipartFile.fromFile( +/// request.files.add(new http.MultipartFile.fromPath( /// 'package', -/// new File('build/package.tar.gz'), +/// 'build/package.tar.gz', /// contentType: new MediaType('application', 'x-tar')); -/// request.send().then((response) { -/// if (response.statusCode == 200) print("Uploaded!"); -/// }); +/// var response = await request.send(); +/// if (response.statusCode == 200) print('Uploaded!'); class MultipartRequest extends BaseRequest { /// The total length of the multipart boundaries used when building the /// request body. According to http://tools.ietf.org/html/rfc1341.html, this From fca1cd381efd3d7cc0737638d94bb32893c3f242 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 6 Mar 2019 12:34:17 -0800 Subject: [PATCH 021/448] Update README to match current behavior (#249) Closes #240 - Remove the browser specific sections and caveats - these are no longer necessary to call out since this package uses config specific imports. - Use single quoted strings consistently for style. - Update samples to use async/await. - Update doc links to point to the pub site. --- README.md | 63 ++++++++++++++++------------------------------------ pubspec.yaml | 2 +- 2 files changed, 20 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 666c8ef5c7..26b0b1a03d 100644 --- a/README.md +++ b/README.md @@ -5,26 +5,22 @@ A composable, Future-based library for making HTTP requests. This package contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's platform-independent, and can be used on -both the command-line and the browser. Currently the global utility functions -are unsupported on the browser; see "Using on the Browser" below. +both the command-line and the browser. ## Using -The easiest way to use this library is via the top-level functions, although -they currently only work on platforms where `dart:io` is available. They allow +The easiest way to use this library is via the top-level functions. They allow you to make individual HTTP requests with minimal hassle: ```dart import 'package:http/http.dart' as http; -var url = "http://example.com/whatsit/create"; -http.post(url, body: {"name": "doodle", "color": "blue"}) - .then((response) { - print("Response status: ${response.statusCode}"); - print("Response body: ${response.body}"); -}); +var url = 'http://example.com/whatsit/create'; +var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'}); +print('Response status: ${response.statusCode}'); +print('Response body: ${response.body}'); -http.read("http://example.com/foobar.txt").then(print); +print(await http.read('http://example.com/foobar.txt')); ``` If you're making multiple requests to the same server, you can keep open a @@ -33,29 +29,30 @@ If you do this, make sure to close the client when you're done: ```dart var client = new http.Client(); -client.post( - "http://example.com/whatsit/create", - body: {"name": "doodle", "color": "blue"}) - .then((response) => client.get(response.bodyFields['uri'])) - .then((response) => print(response.body)) - .whenComplete(client.close); +try { + var uriResponse = await client.post('http://example.com/whatsit/create', + body: {'name': 'doodle', 'color': 'blue'}); + print(await client.get(uriResponse.bodyFields['uri'])); +} finally { + client.close(); +} ``` You can also exert more fine-grained control over your requests and responses by creating [Request][] or [StreamedRequest][] objects yourself and passing them to [Client.send][]. -[Request]: https://www.dartdocs.org/documentation/http/latest/http/Request-class.html -[StreamedRequest]: https://www.dartdocs.org/documentation/http/latest/http/StreamedRequest-class.html -[Client.send]: https://www.dartdocs.org/documentation/http/latest/http/Client/send.html +[Request]: https://pub.dartlang.org/documentation/http/latest/http/Request-class.html +[StreamedRequest]: https://pub.dartlang.org/documentation/http/latest/http/StreamedRequest-class.html +[Client.send]: https://pub.dartlang.org/documentation/http/latest/http/Client/send.html This package is designed to be composable. This makes it easy for external libraries to work with one another to add behavior to it. Libraries wishing to add behavior should create a subclass of [BaseClient][] that wraps another [Client][] and adds the desired behavior: -[BaseClient]: https://www.dartdocs.org/documentation/http/latest/http/BaseClient-class.html -[Client]: https://www.dartdocs.org/documentation/http/latest/http/Client-class.html +[BaseClient]: https://pub.dartlang.org/documentation/http/latest/http/BaseClient-class.html +[Client]: https://pub.dartlang.org/documentation/http/latest/http/Client-class.html ```dart class UserAgentClient extends http.BaseClient { @@ -70,25 +67,3 @@ class UserAgentClient extends http.BaseClient { } } ``` - -## Using on the Browser - -The HTTP library can be used on the browser via the [BrowserClient][] class in -`package:http/browser_client.dart`. This client translates requests into -XMLHttpRequests. For example: - -[BrowserClient]: https://www.dartdocs.org/documentation/http/latest/http.browser_client/BrowserClient-class.html - -```dart -import 'dart:async'; -import 'package:http/browser_client.dart'; - -main() async { - var client = new BrowserClient(); - var url = '/whatsit/create'; - var response = - await client.post(url, body: {'name': 'doodle', 'color': 'blue'}); - print('Response status: ${response.statusCode}'); - print('Response body: ${response.body}'); -} -``` diff --git a/pubspec.yaml b/pubspec.yaml index 31b2bf1c15..9ef13174cf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.12.0+1 +version: 0.12.1-dev author: "Dart Team " homepage: https://github.com/dart-lang/http description: A composable, cross-platform, Future-based API for making HTTP requests. From 300f8c03e549465a31678c26261d14f50186b47f Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 13 Mar 2019 08:51:17 -0700 Subject: [PATCH 022/448] Test on oldest supported SDK on Travis (#257) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cfc0906199..79a9c47f06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: dart dart: - dev - - stable + - 2.0.0 dart_task: - test: --platform vm From 28e1ed79d881517142189d8740ec83ae88f160ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Wed, 13 Mar 2019 17:12:22 +0000 Subject: [PATCH 023/448] Fix linting warnings (#256) * Use = to separate a named parameter from its default value * Avoid return types on setters * Mark unused Future results with unawaited * Add pedantic analysis_options.yaml --- analysis_options.yaml | 1 + lib/src/base_response.dart | 6 +++--- lib/src/browser_client.dart | 10 ++++++---- lib/src/multipart_request.dart | 2 +- lib/src/response.dart | 12 ++++++------ lib/src/streamed_response.dart | 6 +++--- pubspec.yaml | 1 + 7 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 analysis_options.yaml diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000000..108d1058ac --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1 @@ +include: package:pedantic/analysis_options.yaml diff --git a/lib/src/base_response.dart b/lib/src/base_response.dart index 494f1a8329..46f72d5b15 100644 --- a/lib/src/base_response.dart +++ b/lib/src/base_response.dart @@ -39,9 +39,9 @@ abstract class BaseResponse { BaseResponse(this.statusCode, {this.contentLength, this.request, - this.headers: const {}, - this.isRedirect: false, - this.persistentConnection: true, + this.headers = const {}, + this.isRedirect = false, + this.persistentConnection = true, this.reasonPhrase}) { if (statusCode < 100) { throw new ArgumentError("Invalid status code $statusCode."); diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index 4f49ec7671..08225c2287 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -6,6 +6,8 @@ import 'dart:async'; import 'dart:html'; import 'dart:typed_data'; +import 'package:pedantic/pedantic.dart' show unawaited; + import 'base_client.dart'; import 'base_request.dart'; import 'byte_stream.dart'; @@ -49,7 +51,7 @@ class BrowserClient extends BaseClient { request.headers.forEach(xhr.setRequestHeader); var completer = new Completer(); - xhr.onLoad.first.then((_) { + unawaited(xhr.onLoad.first.then((_) { // TODO(nweiz): Set the response type to "arraybuffer" when issue 18542 // is fixed. var blob = xhr.response == null ? new Blob([]) : xhr.response; @@ -72,15 +74,15 @@ class BrowserClient extends BaseClient { }); reader.readAsArrayBuffer(blob); - }); + })); - xhr.onError.first.then((_) { + unawaited(xhr.onError.first.then((_) { // Unfortunately, the underlying XMLHttpRequest API doesn't expose any // specific information about the error itself. completer.completeError( new ClientException("XMLHttpRequest error.", request.url), StackTrace.current); - }); + })); xhr.send(bytes); diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index 12686695ad..00f410fe16 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -79,7 +79,7 @@ class MultipartRequest extends BaseRequest { return length + "--".length + _BOUNDARY_LENGTH + "--\r\n".length; } - void set contentLength(int value) { + set contentLength(int value) { throw new UnsupportedError("Cannot set the contentLength property of " "multipart requests."); } diff --git a/lib/src/response.dart b/lib/src/response.dart index 3c0323d217..cb43d80962 100644 --- a/lib/src/response.dart +++ b/lib/src/response.dart @@ -29,9 +29,9 @@ class Response extends BaseResponse { /// Creates a new HTTP response with a string body. Response(String body, int statusCode, {BaseRequest request, - Map headers: const {}, - bool isRedirect: false, - bool persistentConnection: true, + Map headers = const {}, + bool isRedirect = false, + bool persistentConnection = true, String reasonPhrase}) : this.bytes(_encodingForHeaders(headers).encode(body), statusCode, request: request, @@ -43,9 +43,9 @@ class Response extends BaseResponse { /// Create a new HTTP response with a byte array body. Response.bytes(List bodyBytes, int statusCode, {BaseRequest request, - Map headers: const {}, - bool isRedirect: false, - bool persistentConnection: true, + Map headers = const {}, + bool isRedirect = false, + bool persistentConnection = true, String reasonPhrase}) : bodyBytes = toUint8List(bodyBytes), super(statusCode, diff --git a/lib/src/streamed_response.dart b/lib/src/streamed_response.dart index d4cf8061e6..55f055ad44 100644 --- a/lib/src/streamed_response.dart +++ b/lib/src/streamed_response.dart @@ -21,9 +21,9 @@ class StreamedResponse extends BaseResponse { StreamedResponse(Stream> stream, int statusCode, {int contentLength, BaseRequest request, - Map headers: const {}, - bool isRedirect: false, - bool persistentConnection: true, + Map headers = const {}, + bool isRedirect = false, + bool persistentConnection = true, String reasonPhrase}) : this.stream = toByteStream(stream), super(statusCode, diff --git a/pubspec.yaml b/pubspec.yaml index 9ef13174cf..f764311f3d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,6 +11,7 @@ dependencies: async: ">=1.10.0 <3.0.0" http_parser: ">=0.0.1 <4.0.0" path: ">=0.9.0 <2.0.0" + pedantic: "^1.0.0" dev_dependencies: test: ^1.3.0 From 4d30fa91f4e2d5cadd1bc1b9581a827416567cdb Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 3 Apr 2019 12:03:44 -0700 Subject: [PATCH 024/448] Prepare to publish (#263) --- CHANGELOG.md | 4 ++++ pubspec.yaml | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88e056b178..6c376924ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.12.0+2 + +* Documentation fixes. + ## 0.12.0 ### New Features diff --git a/pubspec.yaml b/pubspec.yaml index f764311f3d..49acb7410f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,9 @@ name: http -version: 0.12.1-dev +version: 0.12.0+2 author: "Dart Team " homepage: https://github.com/dart-lang/http -description: A composable, cross-platform, Future-based API for making HTTP requests. +description: >- + A composable, cross-platform, Future-based API for making HTTP requests. environment: sdk: ">=2.0.0-dev.61.0 <3.0.0" From 2d06a419367c7ebd388561f45539f0f2e5ba2f45 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 11 Apr 2019 12:26:01 -0700 Subject: [PATCH 025/448] Add issue templates (#265) We get a _lot_ of issues that match the pattern of `FAILING_CONNECTION` or `FEAUTURE_REQUEST` which can't be solved in this repository. Document the common stuff to hopefully get fewer errant issues filed. --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 17 ++++++++++ .github/ISSUE_TEMPLATE/FAILING_CONNECTION.md | 34 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 18 +++++++++++ 3 files changed, 69 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/BUG_REPORT.md create mode 100644 .github/ISSUE_TEMPLATE/FAILING_CONNECTION.md create mode 100644 .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md new file mode 100644 index 0000000000..bb7556e31b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -0,0 +1,17 @@ +--- +name: I found a bug. +about: You found that something which is expected to work, doesn't. The same + capability works when using `dart:io` or `dart:html` directly. + +--- + + diff --git a/.github/ISSUE_TEMPLATE/FAILING_CONNECTION.md b/.github/ISSUE_TEMPLATE/FAILING_CONNECTION.md new file mode 100644 index 0000000000..5c510cc8d7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FAILING_CONNECTION.md @@ -0,0 +1,34 @@ +--- +name: An HTTP request fails when made through this client. +about: You are attempting to make a GET or POST and getting an unexpected + exception or status code. + +--- + +**This is not the repository you want to file issues in!** + +Note that a failing HTTP connection is almost certainly not caused by a bug in +`package:http`. + +This package is a wrapper around the clients [`dart:io` client][] and +[`dart:hmtl` request][] to give a unified interface. Before filing a bug here, +verify that the issue is not surfaced when using those interfaces directly. + +[`dart:io` client]: https://api.dartlang.org/stable/dart-io/HttpClient-class.html +[`dart:html` request]: https://api.dartlang.org/stable/dart-html/HttpRequest-class.html + +# Common problems: + +- A security policy prevents the connection. +- Running in an emulator that does not have outside internet access. +- Using Android and not requesting internet access in the [manifest][] + +[manifest]: https://github.com/flutter/flutter/issues/29688 + + +None of these problems are influenced by the code in this repo. + +# Diagnosing: + +- Attempt the request outside of Dart, for instance in a browser or with `curl`. +- Attempt the request with the `dart:io` or `dart:html` equivalent code paths. diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 0000000000..144c2538cf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,18 @@ +--- +name: I'd like a new feature. +about: You are using `package:http` and would like a new feature to make it + easier to make http requests. + +--- + + From dcf5b399d5a4aa102255747de00d62cdc08671d2 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 11 Apr 2019 14:59:51 -0700 Subject: [PATCH 026/448] Tweak formatting of template (#266) The default view the user will see is not markdown rendered - it's the text directly. Update formatting to look a bit nicer in that view since we don't care what the rendered view will look like - we don't expect the issue to get submitted. Also prefix numbers to the filenames to order the issues. --- .../ISSUE_TEMPLATE/1-FAILING_CONNECTION.md | 35 +++++++++++++++++++ .../{BUG_REPORT.md => 2-BUG_REPORT.md} | 0 ...EATURE_REQUEST.md => 3-FEATURE_REQUEST.md} | 0 .github/ISSUE_TEMPLATE/FAILING_CONNECTION.md | 34 ------------------ 4 files changed, 35 insertions(+), 34 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md rename .github/ISSUE_TEMPLATE/{BUG_REPORT.md => 2-BUG_REPORT.md} (100%) rename .github/ISSUE_TEMPLATE/{FEATURE_REQUEST.md => 3-FEATURE_REQUEST.md} (100%) delete mode 100644 .github/ISSUE_TEMPLATE/FAILING_CONNECTION.md diff --git a/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md b/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md new file mode 100644 index 0000000000..250d4cd542 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md @@ -0,0 +1,35 @@ +--- +name: An HTTP request fails when made through this client. +about: You are attempting to make a GET or POST and getting an unexpected + exception or status code. + +--- + +********************************************************** +**This is not the repository you want to file issues in!** +********************************************************** + +Note that a failing HTTP connection is almost certainly not caused by a bug in +package:http. + +This package is a wrapper around the HttpClient from dart:io and HttpRequest +from dart:html. Before filing a bug here verify that the issue is not surfaced +when using those interfaces directly. + +https://api.dartlang.org/stable/dart-io/HttpClient-class.html +https://api.dartlang.org/stable/dart-html/HttpRequest-class.html + +# Common problems: + +- A security policy prevents the connection. +- Running in an emulator that does not have outside internet access. +- Using Android and not requesting internet access in the manifest. + https://github.com/flutter/flutter/issues/29688 + + +None of these problems are influenced by the code in this repo. + +# Diagnosing: + +- Attempt the request outside of Dart, for instance in a browser or with `curl`. +- Attempt the request with the dart:io or dart:html equivalent code paths. diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md similarity index 100% rename from .github/ISSUE_TEMPLATE/BUG_REPORT.md rename to .github/ISSUE_TEMPLATE/2-BUG_REPORT.md diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md similarity index 100% rename from .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md rename to .github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md diff --git a/.github/ISSUE_TEMPLATE/FAILING_CONNECTION.md b/.github/ISSUE_TEMPLATE/FAILING_CONNECTION.md deleted file mode 100644 index 5c510cc8d7..0000000000 --- a/.github/ISSUE_TEMPLATE/FAILING_CONNECTION.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: An HTTP request fails when made through this client. -about: You are attempting to make a GET or POST and getting an unexpected - exception or status code. - ---- - -**This is not the repository you want to file issues in!** - -Note that a failing HTTP connection is almost certainly not caused by a bug in -`package:http`. - -This package is a wrapper around the clients [`dart:io` client][] and -[`dart:hmtl` request][] to give a unified interface. Before filing a bug here, -verify that the issue is not surfaced when using those interfaces directly. - -[`dart:io` client]: https://api.dartlang.org/stable/dart-io/HttpClient-class.html -[`dart:html` request]: https://api.dartlang.org/stable/dart-html/HttpRequest-class.html - -# Common problems: - -- A security policy prevents the connection. -- Running in an emulator that does not have outside internet access. -- Using Android and not requesting internet access in the [manifest][] - -[manifest]: https://github.com/flutter/flutter/issues/29688 - - -None of these problems are influenced by the code in this repo. - -# Diagnosing: - -- Attempt the request outside of Dart, for instance in a browser or with `curl`. -- Attempt the request with the `dart:io` or `dart:html` equivalent code paths. From b2a942fc61bd9b3c634cb7239d100e2e7ef26821 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 30 Apr 2019 08:53:40 -0700 Subject: [PATCH 027/448] Enable and fix lints, tweak SDK range and description (#272) --- .travis.yml | 8 ++- analysis_options.yaml | 5 ++ lib/http.dart | 2 +- lib/src/base_client.dart | 6 +- lib/src/base_request.dart | 12 ++-- lib/src/base_response.dart | 4 +- lib/src/boundary_characters.dart | 2 +- lib/src/browser_client.dart | 19 +++--- lib/src/byte_stream.dart | 8 +-- lib/src/io_client.dart | 8 +-- lib/src/mock_client.dart | 13 ++-- lib/src/multipart_file.dart | 12 ++-- lib/src/multipart_file_io.dart | 6 +- lib/src/multipart_request.dart | 14 ++--- lib/src/request.dart | 18 +++--- lib/src/response.dart | 6 +- lib/src/streamed_request.dart | 4 +- lib/src/utils.dart | 16 ++--- pubspec.yaml | 5 +- test/html/client_test.dart | 8 +-- test/html/streamed_request_test.dart | 8 +-- test/io/client_test.dart | 14 ++--- test/io/http_test.dart | 2 +- test/io/multipart_test.dart | 6 +- test/io/request_test.dart | 6 +- test/io/streamed_request_test.dart | 8 +-- test/io/utils.dart | 9 ++- test/mock_client_test.dart | 19 +++--- test/multipart_test.dart | 64 ++++++++++---------- test/request_test.dart | 90 ++++++++++++++-------------- test/response_test.dart | 20 +++---- test/streamed_request_test.dart | 6 +- test/utils.dart | 8 +-- 33 files changed, 220 insertions(+), 216 deletions(-) diff --git a/.travis.yml b/.travis.yml index 79a9c47f06..a7a9ec1cc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,13 @@ dart_task: # No parallelism on Firefox (-j 1) # Causes flakiness – need to investigate - test: --platform firefox -j 1 - - dartanalyzer + - dartanalyzer: --fatal-infos --fatal-warnings . + +matrix: + include: + # Only validate formatting using the dev release + - dart: dev + dart_task: dartfmt # Only building master means that we don't run two builds for each pull request. branches: diff --git a/analysis_options.yaml b/analysis_options.yaml index 108d1058ac..9da47a9105 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1 +1,6 @@ include: package:pedantic/analysis_options.yaml +linter: + rules: + - prefer_generic_function_type_aliases + - unnecessary_const + - unnecessary_new diff --git a/lib/http.dart b/lib/http.dart index e682ed1a6a..bb4dd73554 100644 --- a/lib/http.dart +++ b/lib/http.dart @@ -161,7 +161,7 @@ Future readBytes(url, {Map headers}) => _withClient((client) => client.readBytes(url, headers: headers)); Future _withClient(Future fn(Client client)) async { - var client = new Client(); + var client = Client(); try { return await fn(client); } finally { diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index 2a1f246dda..ff5b23d94b 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -150,7 +150,7 @@ abstract class BaseClient implements Client { String method, url, Map headers, [body, Encoding encoding]) async { if (url is String) url = Uri.parse(url); - var request = new Request(method, url); + var request = Request(method, url); if (headers != null) request.headers.addAll(headers); if (encoding != null) request.encoding = encoding; @@ -162,7 +162,7 @@ abstract class BaseClient implements Client { } else if (body is Map) { request.bodyFields = body.cast(); } else { - throw new ArgumentError('Invalid request body "$body".'); + throw ArgumentError('Invalid request body "$body".'); } } @@ -177,7 +177,7 @@ abstract class BaseClient implements Client { message = "$message: ${response.reasonPhrase}"; } if (url is String) url = Uri.parse(url); - throw new ClientException("$message.", url); + throw ClientException("$message.", url); } /// Closes the client and cleans up any resources associated with it. It's diff --git a/lib/src/base_request.dart b/lib/src/base_request.dart index e03d9e84af..0492724557 100644 --- a/lib/src/base_request.dart +++ b/lib/src/base_request.dart @@ -34,7 +34,7 @@ abstract class BaseRequest { set contentLength(int value) { if (value != null && value < 0) { - throw new ArgumentError("Invalid content length $value."); + throw ArgumentError("Invalid content length $value."); } _checkFinalized(); _contentLength = value; @@ -83,7 +83,7 @@ abstract class BaseRequest { /// Creates a new HTTP request. BaseRequest(this.method, this.url) - : headers = new LinkedHashMap( + : headers = LinkedHashMap( equals: (key1, key2) => key1.toLowerCase() == key2.toLowerCase(), hashCode: (key) => key.toLowerCase().hashCode); @@ -98,7 +98,7 @@ abstract class BaseRequest { /// change after the request headers are sent. ByteStream finalize() { // TODO(nweiz): freeze headers - if (finalized) throw new StateError("Can't finalize a finalized Request."); + if (finalized) throw StateError("Can't finalize a finalized Request."); _finalized = true; return null; } @@ -110,12 +110,12 @@ abstract class BaseRequest { /// the same server, you should use a single [Client] for all of those /// requests. Future send() async { - var client = new Client(); + var client = Client(); try { var response = await client.send(this); var stream = onDone(response.stream, client.close); - return new StreamedResponse(new ByteStream(stream), response.statusCode, + return StreamedResponse(ByteStream(stream), response.statusCode, contentLength: response.contentLength, request: response.request, headers: response.headers, @@ -131,7 +131,7 @@ abstract class BaseRequest { // Throws an error if this request has been finalized. void _checkFinalized() { if (!finalized) return; - throw new StateError("Can't modify a finalized Request."); + throw StateError("Can't modify a finalized Request."); } String toString() => "$method $url"; diff --git a/lib/src/base_response.dart b/lib/src/base_response.dart index 46f72d5b15..7c44eea0f0 100644 --- a/lib/src/base_response.dart +++ b/lib/src/base_response.dart @@ -44,9 +44,9 @@ abstract class BaseResponse { this.persistentConnection = true, this.reasonPhrase}) { if (statusCode < 100) { - throw new ArgumentError("Invalid status code $statusCode."); + throw ArgumentError("Invalid status code $statusCode."); } else if (contentLength != null && contentLength < 0) { - throw new ArgumentError("Invalid content length $contentLength."); + throw ArgumentError("Invalid content length $contentLength."); } } } diff --git a/lib/src/boundary_characters.dart b/lib/src/boundary_characters.dart index b9b79695c1..5f7ab3868e 100644 --- a/lib/src/boundary_characters.dart +++ b/lib/src/boundary_characters.dart @@ -9,7 +9,7 @@ /// /// [RFC 2046]: http://tools.ietf.org/html/rfc2046#section-5.1.1. /// [RFC 1521]: https://tools.ietf.org/html/rfc1521#section-4 -const List BOUNDARY_CHARACTERS = const [ +const List BOUNDARY_CHARACTERS = [ 43, 95, 45, diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index 08225c2287..d64d7e668d 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -29,7 +29,7 @@ class BrowserClient extends BaseClient { /// The currently active XHRs. /// /// These are aborted if the client is closed. - final _xhrs = new Set(); + final _xhrs = Set(); /// Creates a new HTTP client. BrowserClient(); @@ -43,24 +43,24 @@ class BrowserClient extends BaseClient { /// Sends an HTTP request and asynchronously returns the response. Future send(BaseRequest request) async { var bytes = await request.finalize().toBytes(); - var xhr = new HttpRequest(); + var xhr = HttpRequest(); _xhrs.add(xhr); _openHttpRequest(xhr, request.method, request.url.toString(), asynch: true); xhr.responseType = 'blob'; xhr.withCredentials = withCredentials; request.headers.forEach(xhr.setRequestHeader); - var completer = new Completer(); + var completer = Completer(); unawaited(xhr.onLoad.first.then((_) { // TODO(nweiz): Set the response type to "arraybuffer" when issue 18542 // is fixed. - var blob = xhr.response == null ? new Blob([]) : xhr.response; - var reader = new FileReader(); + var blob = xhr.response == null ? Blob([]) : xhr.response; + var reader = FileReader(); reader.onLoad.first.then((_) { var body = reader.result as Uint8List; - completer.complete(new StreamedResponse( - new ByteStream.fromBytes(body), xhr.status, + completer.complete(StreamedResponse( + ByteStream.fromBytes(body), xhr.status, contentLength: body.length, request: request, headers: xhr.responseHeaders, @@ -69,8 +69,7 @@ class BrowserClient extends BaseClient { reader.onError.first.then((error) { completer.completeError( - new ClientException(error.toString(), request.url), - StackTrace.current); + ClientException(error.toString(), request.url), StackTrace.current); }); reader.readAsArrayBuffer(blob); @@ -80,7 +79,7 @@ class BrowserClient extends BaseClient { // Unfortunately, the underlying XMLHttpRequest API doesn't expose any // specific information about the error itself. completer.completeError( - new ClientException("XMLHttpRequest error.", request.url), + ClientException("XMLHttpRequest error.", request.url), StackTrace.current); })); diff --git a/lib/src/byte_stream.dart b/lib/src/byte_stream.dart index 2fbd2a3066..0191a05cb9 100644 --- a/lib/src/byte_stream.dart +++ b/lib/src/byte_stream.dart @@ -13,13 +13,13 @@ class ByteStream extends StreamView> { /// Returns a single-subscription byte stream that will emit the given bytes /// in a single chunk. factory ByteStream.fromBytes(List bytes) => - new ByteStream(new Stream.fromIterable([bytes])); + ByteStream(Stream.fromIterable([bytes])); /// Collects the data of this stream in a [Uint8List]. Future toBytes() { - var completer = new Completer(); - var sink = new ByteConversionSink.withCallback( - (bytes) => completer.complete(new Uint8List.fromList(bytes))); + var completer = Completer(); + var sink = ByteConversionSink.withCallback( + (bytes) => completer.complete(Uint8List.fromList(bytes))); listen(sink.add, onError: completer.completeError, onDone: sink.close, diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index 53054f8b63..c5cdbbaa9c 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -23,7 +23,7 @@ class IOClient extends BaseClient { HttpClient _inner; /// Creates a new HTTP client. - IOClient([HttpClient inner]) : _inner = inner ?? new HttpClient(); + IOClient([HttpClient inner]) : _inner = inner ?? HttpClient(); /// Sends an HTTP request and asynchronously returns the response. Future send(BaseRequest request) async { @@ -49,9 +49,9 @@ class IOClient extends BaseClient { headers[key] = values.join(','); }); - return new StreamedResponse( + return StreamedResponse( DelegatingStream.typed>(response).handleError( - (error) => throw new ClientException(error.message, error.uri), + (error) => throw ClientException(error.message, error.uri), test: (error) => error is HttpException), response.statusCode, contentLength: @@ -62,7 +62,7 @@ class IOClient extends BaseClient { persistentConnection: response.persistentConnection, reasonPhrase: response.reasonPhrase); } on HttpException catch (error) { - throw new ClientException(error.message, error.uri); + throw ClientException(error.message, error.uri); } } diff --git a/lib/src/mock_client.dart b/lib/src/mock_client.dart index 039390beb7..2051911aa7 100644 --- a/lib/src/mock_client.dart +++ b/lib/src/mock_client.dart @@ -30,7 +30,7 @@ class MockClient extends BaseClient { MockClient(MockClientHandler fn) : this._((baseRequest, bodyStream) { return bodyStream.toBytes().then((bodyBytes) { - var request = new Request(baseRequest.method, baseRequest.url) + var request = Request(baseRequest.method, baseRequest.url) ..persistentConnection = baseRequest.persistentConnection ..followRedirects = baseRequest.followRedirects ..maxRedirects = baseRequest.maxRedirects @@ -40,9 +40,8 @@ class MockClient extends BaseClient { return fn(request); }).then((response) { - return new StreamedResponse( - new ByteStream.fromBytes(response.bodyBytes), - response.statusCode, + return StreamedResponse( + ByteStream.fromBytes(response.bodyBytes), response.statusCode, contentLength: response.contentLength, request: baseRequest, headers: response.headers, @@ -57,7 +56,7 @@ class MockClient extends BaseClient { MockClient.streaming(MockClientStreamHandler fn) : this._((request, bodyStream) { return fn(request, bodyStream).then((response) { - return new StreamedResponse(response.stream, response.statusCode, + return StreamedResponse(response.stream, response.statusCode, contentLength: response.contentLength, request: request, headers: response.headers, @@ -76,9 +75,9 @@ class MockClient extends BaseClient { /// A handler function that receives [StreamedRequest]s and sends /// [StreamedResponse]s. Note that [request] will be finalized. -typedef Future MockClientStreamHandler( +typedef MockClientStreamHandler = Future Function( BaseRequest request, ByteStream bodyStream); /// A handler function that receives [Request]s and sends [Response]s. Note that /// [request] will be finalized. -typedef Future MockClientHandler(Request request); +typedef MockClientHandler = Future Function(Request request); diff --git a/lib/src/multipart_file.dart b/lib/src/multipart_file.dart index a173f67f68..a3ca7fa9da 100644 --- a/lib/src/multipart_file.dart +++ b/lib/src/multipart_file.dart @@ -49,7 +49,7 @@ class MultipartFile { : this._stream = toByteStream(stream), this.contentType = contentType != null ? contentType - : new MediaType("application", "octet-stream"); + : MediaType("application", "octet-stream"); /// Creates a new [MultipartFile] from a byte array. /// @@ -57,8 +57,8 @@ class MultipartFile { /// future may be inferred from [filename]. factory MultipartFile.fromBytes(String field, List value, {String filename, MediaType contentType}) { - var stream = new ByteStream.fromBytes(value); - return new MultipartFile(field, stream, value.length, + var stream = ByteStream.fromBytes(value); + return MultipartFile(field, stream, value.length, filename: filename, contentType: contentType); } @@ -71,11 +71,11 @@ class MultipartFile { factory MultipartFile.fromString(String field, String value, {String filename, MediaType contentType}) { contentType = - contentType == null ? new MediaType("text", "plain") : contentType; + contentType == null ? MediaType("text", "plain") : contentType; var encoding = encodingForCharset(contentType.parameters['charset'], utf8); contentType = contentType.change(parameters: {'charset': encoding.name}); - return new MultipartFile.fromBytes(field, encoding.encode(value), + return MultipartFile.fromBytes(field, encoding.encode(value), filename: filename, contentType: contentType); } @@ -98,7 +98,7 @@ class MultipartFile { // of the file. The stream may be closed to indicate an empty file. ByteStream finalize() { if (isFinalized) { - throw new StateError("Can't finalize a finalized MultipartFile."); + throw StateError("Can't finalize a finalized MultipartFile."); } _isFinalized = true; return _stream; diff --git a/lib/src/multipart_file_io.dart b/lib/src/multipart_file_io.dart index c49998a3f3..fb63ab092a 100644 --- a/lib/src/multipart_file_io.dart +++ b/lib/src/multipart_file_io.dart @@ -15,9 +15,9 @@ import 'multipart_file.dart'; Future multipartFileFromPath(String field, String filePath, {String filename, MediaType contentType}) async { if (filename == null) filename = p.basename(filePath); - var file = new File(filePath); + var file = File(filePath); var length = await file.length(); - var stream = new ByteStream(DelegatingStream.typed(file.openRead())); - return new MultipartFile(field, stream, length, + var stream = ByteStream(DelegatingStream.typed(file.openRead())); + return MultipartFile(field, stream, length, filename: filename, contentType: contentType); } diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index 00f410fe16..e2a9714edf 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -12,7 +12,7 @@ import 'byte_stream.dart'; import 'multipart_file.dart'; import 'utils.dart'; -final _newlineRegExp = new RegExp(r"\r\n|\r|\n"); +final _newlineRegExp = RegExp(r"\r\n|\r|\n"); /// A `multipart/form-data` request. Such a request has both string [fields], /// which function as normal form fields, and (potentially streamed) binary @@ -36,7 +36,7 @@ class MultipartRequest extends BaseRequest { /// can't be longer than 70. static const int _BOUNDARY_LENGTH = 70; - static final Random _random = new Random(); + static final Random _random = Random(); /// The form fields to send for this request. final Map fields; @@ -80,7 +80,7 @@ class MultipartRequest extends BaseRequest { } set contentLength(int value) { - throw new UnsupportedError("Cannot set the contentLength property of " + throw UnsupportedError("Cannot set the contentLength property of " "multipart requests."); } @@ -92,7 +92,7 @@ class MultipartRequest extends BaseRequest { headers['content-type'] = 'multipart/form-data; boundary=$boundary'; super.finalize(); - var controller = new StreamController>(sync: true); + var controller = StreamController>(sync: true); void writeAscii(String string) { controller.add(utf8.encode(string)); @@ -120,7 +120,7 @@ class MultipartRequest extends BaseRequest { controller.close(); }); - return new ByteStream(controller.stream); + return ByteStream(controller.stream); } /// Returns the header string for a field. The return value is guaranteed to @@ -161,11 +161,11 @@ class MultipartRequest extends BaseRequest { /// Returns a randomly-generated multipart boundary string String _boundaryString() { var prefix = "dart-http-boundary-"; - var list = new List.generate( + var list = List.generate( _BOUNDARY_LENGTH - prefix.length, (index) => BOUNDARY_CHARACTERS[_random.nextInt(BOUNDARY_CHARACTERS.length)], growable: false); - return "$prefix${new String.fromCharCodes(list)}"; + return "$prefix${String.fromCharCodes(list)}"; } } diff --git a/lib/src/request.dart b/lib/src/request.dart index 8c638b18fc..f18959d8b2 100644 --- a/lib/src/request.dart +++ b/lib/src/request.dart @@ -21,7 +21,7 @@ class Request extends BaseRequest { int get contentLength => bodyBytes.length; set contentLength(int value) { - throw new UnsupportedError("Cannot set the contentLength property of " + throw UnsupportedError("Cannot set the contentLength property of " "non-streaming Request objects."); } @@ -85,7 +85,7 @@ class Request extends BaseRequest { bodyBytes = encoding.encode(value); var contentType = _contentType; if (contentType == null) { - _contentType = new MediaType("text", "plain", {'charset': encoding.name}); + _contentType = MediaType("text", "plain", {'charset': encoding.name}); } else if (!contentType.parameters.containsKey('charset')) { _contentType = contentType.change(parameters: {'charset': encoding.name}); } @@ -109,7 +109,7 @@ class Request extends BaseRequest { var contentType = _contentType; if (contentType == null || contentType.mimeType != "application/x-www-form-urlencoded") { - throw new StateError('Cannot access the body fields of a Request without ' + throw StateError('Cannot access the body fields of a Request without ' 'content-type "application/x-www-form-urlencoded".'); } @@ -119,9 +119,9 @@ class Request extends BaseRequest { set bodyFields(Map fields) { var contentType = _contentType; if (contentType == null) { - _contentType = new MediaType("application", "x-www-form-urlencoded"); + _contentType = MediaType("application", "x-www-form-urlencoded"); } else if (contentType.mimeType != "application/x-www-form-urlencoded") { - throw new StateError('Cannot set the body fields of a Request with ' + throw StateError('Cannot set the body fields of a Request with ' 'content-type "${contentType.mimeType}".'); } @@ -131,14 +131,14 @@ class Request extends BaseRequest { /// Creates a new HTTP request. Request(String method, Uri url) : _defaultEncoding = utf8, - _bodyBytes = new Uint8List(0), + _bodyBytes = Uint8List(0), super(method, url); /// Freezes all mutable fields and returns a single-subscription [ByteStream] /// containing the request body. ByteStream finalize() { super.finalize(); - return new ByteStream.fromBytes(bodyBytes); + return ByteStream.fromBytes(bodyBytes); } /// The `Content-Type` header of the request (if it exists) as a @@ -146,7 +146,7 @@ class Request extends BaseRequest { MediaType get _contentType { var contentType = headers['content-type']; if (contentType == null) return null; - return new MediaType.parse(contentType); + return MediaType.parse(contentType); } set _contentType(MediaType value) { @@ -156,6 +156,6 @@ class Request extends BaseRequest { /// Throw an error if this request has been finalized. void _checkFinalized() { if (!finalized) return; - throw new StateError("Can't modify a finalized Request."); + throw StateError("Can't modify a finalized Request."); } } diff --git a/lib/src/response.dart b/lib/src/response.dart index cb43d80962..bdc39d15ae 100644 --- a/lib/src/response.dart +++ b/lib/src/response.dart @@ -60,7 +60,7 @@ class Response extends BaseResponse { /// available from a [StreamedResponse]. static Future fromStream(StreamedResponse response) { return response.stream.toBytes().then((body) { - return new Response.bytes(body, response.statusCode, + return Response.bytes(body, response.statusCode, request: response.request, headers: response.headers, isRedirect: response.isRedirect, @@ -81,6 +81,6 @@ Encoding _encodingForHeaders(Map headers) => /// Defaults to `application/octet-stream`. MediaType _contentTypeForHeaders(Map headers) { var contentType = headers['content-type']; - if (contentType != null) return new MediaType.parse(contentType); - return new MediaType("application", "octet-stream"); + if (contentType != null) return MediaType.parse(contentType); + return MediaType("application", "octet-stream"); } diff --git a/lib/src/streamed_request.dart b/lib/src/streamed_request.dart index 289046a453..ba6ebc4afa 100644 --- a/lib/src/streamed_request.dart +++ b/lib/src/streamed_request.dart @@ -28,7 +28,7 @@ class StreamedRequest extends BaseRequest { /// Creates a new streaming request. StreamedRequest(String method, Uri url) - : _controller = new StreamController>(sync: true), + : _controller = StreamController>(sync: true), super(method, url); /// Freezes all mutable fields other than [stream] and returns a @@ -36,6 +36,6 @@ class StreamedRequest extends BaseRequest { /// [sink]. ByteStream finalize() { super.finalize(); - return new ByteStream(_controller.stream); + return ByteStream(_controller.stream); } } diff --git a/lib/src/utils.dart b/lib/src/utils.dart index 3f3e3180b8..07c64c35a6 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -53,12 +53,12 @@ Encoding encodingForCharset(String charset, [Encoding fallback = latin1]) { Encoding requiredEncodingForCharset(String charset) { var encoding = Encoding.getByName(charset); if (encoding != null) return encoding; - throw new FormatException('Unsupported encoding "$charset".'); + throw FormatException('Unsupported encoding "$charset".'); } /// A regular expression that matches strings that are composed entirely of /// ASCII-compatible characters. -final RegExp _ASCII_ONLY = new RegExp(r"^[\x00-\x7F]+$"); +final RegExp _ASCII_ONLY = RegExp(r"^[\x00-\x7F]+$"); /// Returns whether [string] is composed entirely of ASCII-compatible /// characters. @@ -71,23 +71,23 @@ Uint8List toUint8List(List input) { if (input is Uint8List) return input; if (input is TypedData) { // TODO(nweiz): remove "as" when issue 11080 is fixed. - return new Uint8List.view((input as TypedData).buffer); + return Uint8List.view((input as TypedData).buffer); } - return new Uint8List.fromList(input); + return Uint8List.fromList(input); } /// If [stream] is already a [ByteStream], returns it. Otherwise, wraps it in a /// [ByteStream]. ByteStream toByteStream(Stream> stream) { if (stream is ByteStream) return stream; - return new ByteStream(stream); + return ByteStream(stream); } /// Calls [onDone] once [stream] (a single-subscription [Stream]) is finished. /// The return value, also a single-subscription [Stream] should be used in /// place of [stream] after calling this method. Stream onDone(Stream stream, void onDone()) => - stream.transform(new StreamTransformer.fromHandlers(handleDone: (sink) { + stream.transform(StreamTransformer.fromHandlers(handleDone: (sink) { sink.close(); onDone(); })); @@ -96,7 +96,7 @@ Stream onDone(Stream stream, void onDone()) => /// Pipes all data and errors from [stream] into [sink]. When [stream] is done, /// [sink] is closed and the returned [Future] is completed. Future store(Stream stream, EventSink sink) { - var completer = new Completer(); + var completer = Completer(); stream.listen(sink.add, onError: sink.addError, onDone: () { sink.close(); completer.complete(); @@ -108,7 +108,7 @@ Future store(Stream stream, EventSink sink) { /// [stream] is done. Unlike [store], [sink] remains open after [stream] is /// done. Future writeStreamToSink(Stream stream, EventSink sink) { - var completer = new Completer(); + var completer = Completer(); stream.listen(sink.add, onError: sink.addError, onDone: () => completer.complete()); return completer.future; diff --git a/pubspec.yaml b/pubspec.yaml index 49acb7410f..47c3c48b34 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,11 +2,10 @@ name: http version: 0.12.0+2 author: "Dart Team " homepage: https://github.com/dart-lang/http -description: >- - A composable, cross-platform, Future-based API for making HTTP requests. +description: A composable, multi-platform, Future-based API for HTTP requests. environment: - sdk: ">=2.0.0-dev.61.0 <3.0.0" + sdk: ">=2.0.0 <3.0.0" dependencies: async: ">=1.10.0 <3.0.0" diff --git a/test/html/client_test.dart b/test/html/client_test.dart index 6fb2c6279b..8fe1c72e21 100644 --- a/test/html/client_test.dart +++ b/test/html/client_test.dart @@ -12,8 +12,8 @@ import 'utils.dart'; void main() { test('#send a StreamedRequest', () { - var client = new BrowserClient(); - var request = new http.StreamedRequest("POST", echoUrl); + var client = BrowserClient(); + var request = http.StreamedRequest("POST", echoUrl); expect( client.send(request).then((response) { @@ -26,9 +26,9 @@ void main() { }, skip: 'Need to fix server tests for browser'); test('#send with an invalid URL', () { - var client = new BrowserClient(); + var client = BrowserClient(); var url = Uri.parse('http://http.invalid'); - var request = new http.StreamedRequest("POST", url); + var request = http.StreamedRequest("POST", url); expect( client.send(request), throwsClientException("XMLHttpRequest error.")); diff --git a/test/html/streamed_request_test.dart b/test/html/streamed_request_test.dart index 662c3bac96..e28b313c74 100644 --- a/test/html/streamed_request_test.dart +++ b/test/html/streamed_request_test.dart @@ -13,23 +13,23 @@ import 'utils.dart'; void main() { group('contentLength', () { test("works when it's set", () { - var request = new http.StreamedRequest('POST', echoUrl); + var request = http.StreamedRequest('POST', echoUrl); request.contentLength = 10; request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); request.sink.close(); - return new BrowserClient().send(request).then((response) { + return BrowserClient().send(request).then((response) { expect(response.stream.toBytes(), completion(equals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))); }); }); test("works when it's not set", () { - var request = new http.StreamedRequest('POST', echoUrl); + var request = http.StreamedRequest('POST', echoUrl); request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); request.sink.close(); - return new BrowserClient().send(request).then((response) { + return BrowserClient().send(request).then((response) { expect(response.stream.toBytes(), completion(equals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))); }); diff --git a/test/io/client_test.dart b/test/io/client_test.dart index 04fca5ce1a..030144591a 100644 --- a/test/io/client_test.dart +++ b/test/io/client_test.dart @@ -18,8 +18,8 @@ void main() { test('#send a StreamedRequest', () { expect( startServer().then((_) { - var client = new http.Client(); - var request = new http.StreamedRequest("POST", serverUrl); + var client = http.Client(); + var request = http.StreamedRequest("POST", serverUrl); request.headers[HttpHeaders.contentTypeHeader] = 'application/json; charset=utf-8'; request.headers[HttpHeaders.userAgentHeader] = 'Dart'; @@ -56,9 +56,9 @@ void main() { test('#send a StreamedRequest with a custom client', () { expect( startServer().then((_) { - var ioClient = new HttpClient(); - var client = new http_io.IOClient(ioClient); - var request = new http.StreamedRequest("POST", serverUrl); + var ioClient = HttpClient(); + var client = http_io.IOClient(ioClient); + var request = http.StreamedRequest("POST", serverUrl); request.headers[HttpHeaders.contentTypeHeader] = 'application/json; charset=utf-8'; request.headers[HttpHeaders.userAgentHeader] = 'Dart'; @@ -95,9 +95,9 @@ void main() { test('#send with an invalid URL', () { expect( startServer().then((_) { - var client = new http.Client(); + var client = http.Client(); var url = Uri.parse('http://http.invalid'); - var request = new http.StreamedRequest("POST", url); + var request = http.StreamedRequest("POST", url); request.headers[HttpHeaders.contentTypeHeader] = 'application/json; charset=utf-8'; diff --git a/test/io/http_test.dart b/test/io/http_test.dart index 9eab1a7e34..41656a41a9 100644 --- a/test/io/http_test.dart +++ b/test/io/http_test.dart @@ -538,7 +538,7 @@ main() { 'X-Random-Header': 'Value', 'X-Other-Header': 'Other Value', 'User-Agent': 'Dart' - }).then((bytes) => new String.fromCharCodes(bytes)); + }).then((bytes) => String.fromCharCodes(bytes)); expect( future, diff --git a/test/io/multipart_test.dart b/test/io/multipart_test.dart index 58dbe365e1..eb42f00952 100644 --- a/test/io/multipart_test.dart +++ b/test/io/multipart_test.dart @@ -23,12 +23,12 @@ void main() { test('with a file from disk', () { expect( - new Future.sync(() { + Future.sync(() { var filePath = path.join(tempDir.path, 'test-file'); - new File(filePath).writeAsStringSync('hello'); + File(filePath).writeAsStringSync('hello'); return http.MultipartFile.fromPath('file', filePath); }).then((file) { - var request = new http.MultipartRequest('POST', dummyUrl); + var request = http.MultipartRequest('POST', dummyUrl); request.files.add(file); expect(request, bodyMatches(''' diff --git a/test/io/request_test.dart b/test/io/request_test.dart index 3b2d7e0509..bdae67730e 100644 --- a/test/io/request_test.dart +++ b/test/io/request_test.dart @@ -13,7 +13,7 @@ void main() { test('.send', () { expect( startServer().then((_) { - var request = new http.Request('POST', serverUrl); + var request = http.Request('POST', serverUrl); request.body = "hello"; request.headers['User-Agent'] = 'Dart'; @@ -40,7 +40,7 @@ void main() { test('#followRedirects', () { expect( startServer().then((_) { - var request = new http.Request('POST', serverUrl.resolve('/redirect')) + var request = http.Request('POST', serverUrl.resolve('/redirect')) ..followRedirects = false; var future = request.send().then((response) { expect(response.statusCode, equals(302)); @@ -55,7 +55,7 @@ void main() { test('#maxRedirects', () { expect( startServer().then((_) { - var request = new http.Request('POST', serverUrl.resolve('/loop?1')) + var request = http.Request('POST', serverUrl.resolve('/loop?1')) ..maxRedirects = 2; var future = request.send().catchError((error) { expect(error, isRedirectLimitExceededException); diff --git a/test/io/streamed_request_test.dart b/test/io/streamed_request_test.dart index 6609080a4e..233372690b 100644 --- a/test/io/streamed_request_test.dart +++ b/test/io/streamed_request_test.dart @@ -15,7 +15,7 @@ void main() { group('contentLength', () { test('controls the Content-Length header', () { return startServer().then((_) { - var request = new http.StreamedRequest('POST', serverUrl); + var request = http.StreamedRequest('POST', serverUrl); request.contentLength = 10; request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); request.sink.close(); @@ -31,7 +31,7 @@ void main() { test('defaults to sending no Content-Length', () { return startServer().then((_) { - var request = new http.StreamedRequest('POST', serverUrl); + var request = http.StreamedRequest('POST', serverUrl); request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); request.sink.close(); @@ -48,8 +48,8 @@ void main() { // Regression test. test('.send() with a response with no content length', () { return startServer().then((_) { - var request = new http.StreamedRequest( - 'GET', serverUrl.resolve('/no-content-length')); + var request = + http.StreamedRequest('GET', serverUrl.resolve('/no-content-length')); request.sink.close(); return request.send(); }).then((response) { diff --git a/test/io/utils.dart b/test/io/utils.dart index 56d1b22217..50e668bc84 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -59,7 +59,7 @@ Future startServer() { return; } - new ByteStream(request).toBytes().then((requestBodyBytes) { + ByteStream(request).toBytes().then((requestBodyBytes) { var outputEncoding; var encodingName = request.uri.queryParameters['response-encoding']; if (encodingName != null) { @@ -68,8 +68,8 @@ Future startServer() { outputEncoding = ascii; } - response.headers.contentType = new ContentType("application", "json", - charset: outputEncoding.name); + response.headers.contentType = + ContentType("application", "json", charset: outputEncoding.name); response.headers.set('single', 'value'); var requestBody; @@ -116,8 +116,7 @@ void stopServer() { } /// A matcher for functions that throw HttpException. -Matcher get throwsClientException => - throwsA(new TypeMatcher()); +Matcher get throwsClientException => throwsA(TypeMatcher()); /// A matcher for RedirectLimitExceededExceptions. final isRedirectLimitExceededException = const TypeMatcher() diff --git a/test/mock_client_test.dart b/test/mock_client_test.dart index ff0504d5d2..acd1007e11 100644 --- a/test/mock_client_test.dart +++ b/test/mock_client_test.dart @@ -13,9 +13,8 @@ import 'utils.dart'; void main() { test('handles a request', () { - var client = new MockClient((request) { - return new Future.value(new http.Response( - json.encode(request.bodyFields), 200, + var client = MockClient((request) { + return Future.value(http.Response(json.encode(request.bodyFields), 200, request: request, headers: {'content-type': 'application/json'})); }); @@ -28,20 +27,20 @@ void main() { }); test('handles a streamed request', () { - var client = new MockClient.streaming((request, bodyStream) { + var client = MockClient.streaming((request, bodyStream) { return bodyStream.bytesToString().then((bodyString) { - var controller = new StreamController>(sync: true); - new Future.sync(() { + var controller = StreamController>(sync: true); + Future.sync(() { controller.add('Request body was "$bodyString"'.codeUnits); controller.close(); }); - return new http.StreamedResponse(controller.stream, 200); + return http.StreamedResponse(controller.stream, 200); }); }); var uri = Uri.parse("http://example.com/foo"); - var request = new http.Request("POST", uri); + var request = http.Request("POST", uri); request.body = "hello, world"; var future = client .send(request) @@ -51,8 +50,8 @@ void main() { }); test('handles a request with no body', () { - var client = new MockClient((request) { - return new Future.value(new http.Response('you did it', 200)); + var client = MockClient((request) { + return Future.value(http.Response('you did it', 200)); }); expect(client.read("http://example.com/foo"), diff --git a/test/multipart_test.dart b/test/multipart_test.dart index 1f67116fd5..8b14197204 100644 --- a/test/multipart_test.dart +++ b/test/multipart_test.dart @@ -13,27 +13,26 @@ import 'utils.dart'; void main() { test('empty', () { - var request = new http.MultipartRequest('POST', dummyUrl); + var request = http.MultipartRequest('POST', dummyUrl); expect(request, bodyMatches(''' --{{boundary}}-- ''')); }); test('boundary characters', () { - var testBoundary = new String.fromCharCodes(BOUNDARY_CHARACTERS); - var contentType = - new MediaType.parse('text/plain; boundary=${testBoundary}'); + var testBoundary = String.fromCharCodes(BOUNDARY_CHARACTERS); + var contentType = MediaType.parse('text/plain; boundary=${testBoundary}'); var boundary = contentType.parameters['boundary']; expect(boundary, testBoundary); }); test('with fields and files', () { - var request = new http.MultipartRequest('POST', dummyUrl); + var request = http.MultipartRequest('POST', dummyUrl); request.fields['field1'] = 'value1'; request.fields['field2'] = 'value2'; - request.files.add(new http.MultipartFile.fromString("file1", "contents1", + request.files.add(http.MultipartFile.fromString("file1", "contents1", filename: "filename1.txt")); - request.files.add(new http.MultipartFile.fromString("file2", "contents2")); + request.files.add(http.MultipartFile.fromString("file2", "contents2")); expect(request, bodyMatches(''' --{{boundary}} @@ -59,7 +58,7 @@ void main() { }); test('with a unicode field name', () { - var request = new http.MultipartRequest('POST', dummyUrl); + var request = http.MultipartRequest('POST', dummyUrl); request.fields['fïēld'] = 'value'; expect(request, bodyMatches(''' @@ -72,7 +71,7 @@ void main() { }); test('with a field name with newlines', () { - var request = new http.MultipartRequest('POST', dummyUrl); + var request = http.MultipartRequest('POST', dummyUrl); request.fields['foo\nbar\rbaz\r\nbang'] = 'value'; expect(request, bodyMatches(''' @@ -85,7 +84,7 @@ void main() { }); test('with a field name with a quote', () { - var request = new http.MultipartRequest('POST', dummyUrl); + var request = http.MultipartRequest('POST', dummyUrl); request.fields['foo"bar'] = 'value'; expect(request, bodyMatches(''' @@ -98,7 +97,7 @@ void main() { }); test('with a unicode field value', () { - var request = new http.MultipartRequest('POST', dummyUrl); + var request = http.MultipartRequest('POST', dummyUrl); request.fields['field'] = 'vⱥlūe'; expect(request, bodyMatches(''' @@ -113,8 +112,8 @@ void main() { }); test('with a unicode filename', () { - var request = new http.MultipartRequest('POST', dummyUrl); - request.files.add(new http.MultipartFile.fromString('file', 'contents', + var request = http.MultipartRequest('POST', dummyUrl); + request.files.add(http.MultipartFile.fromString('file', 'contents', filename: 'fïlēname.txt')); expect(request, bodyMatches(''' @@ -128,8 +127,8 @@ void main() { }); test('with a filename with newlines', () { - var request = new http.MultipartRequest('POST', dummyUrl); - request.files.add(new http.MultipartFile.fromString('file', 'contents', + var request = http.MultipartRequest('POST', dummyUrl); + request.files.add(http.MultipartFile.fromString('file', 'contents', filename: 'foo\nbar\rbaz\r\nbang')); expect(request, bodyMatches(''' @@ -143,9 +142,9 @@ void main() { }); test('with a filename with a quote', () { - var request = new http.MultipartRequest('POST', dummyUrl); - request.files.add(new http.MultipartFile.fromString('file', 'contents', - filename: 'foo"bar')); + var request = http.MultipartRequest('POST', dummyUrl); + request.files.add( + http.MultipartFile.fromString('file', 'contents', filename: 'foo"bar')); expect(request, bodyMatches(''' --{{boundary}} @@ -158,9 +157,9 @@ void main() { }); test('with a string file with a content-type but no charset', () { - var request = new http.MultipartRequest('POST', dummyUrl); - var file = new http.MultipartFile.fromString('file', '{"hello": "world"}', - contentType: new MediaType('application', 'json')); + var request = http.MultipartRequest('POST', dummyUrl); + var file = http.MultipartFile.fromString('file', '{"hello": "world"}', + contentType: MediaType('application', 'json')); request.files.add(file); expect(request, bodyMatches(''' @@ -174,10 +173,10 @@ void main() { }); test('with a file with a iso-8859-1 body', () { - var request = new http.MultipartRequest('POST', dummyUrl); + var request = http.MultipartRequest('POST', dummyUrl); // "Ã¥" encoded as ISO-8859-1 and then read as UTF-8 results in "å". - var file = new http.MultipartFile.fromString('file', 'non-ascii: "Ã¥"', - contentType: new MediaType('text', 'plain', {'charset': 'iso-8859-1'})); + var file = http.MultipartFile.fromString('file', 'non-ascii: "Ã¥"', + contentType: MediaType('text', 'plain', {'charset': 'iso-8859-1'})); request.files.add(file); expect(request, bodyMatches(''' @@ -191,9 +190,9 @@ void main() { }); test('with a stream file', () { - var request = new http.MultipartRequest('POST', dummyUrl); - var controller = new StreamController>(sync: true); - request.files.add(new http.MultipartFile('file', controller.stream, 5)); + var request = http.MultipartRequest('POST', dummyUrl); + var controller = StreamController>(sync: true); + request.files.add(http.MultipartFile('file', controller.stream, 5)); expect(request, bodyMatches(''' --{{boundary}} @@ -209,9 +208,9 @@ void main() { }); test('with an empty stream file', () { - var request = new http.MultipartRequest('POST', dummyUrl); - var controller = new StreamController>(sync: true); - request.files.add(new http.MultipartFile('file', controller.stream, 0)); + var request = http.MultipartRequest('POST', dummyUrl); + var controller = StreamController>(sync: true); + request.files.add(http.MultipartFile('file', controller.stream, 0)); expect(request, bodyMatches(''' --{{boundary}} @@ -226,9 +225,8 @@ void main() { }); test('with a byte file', () { - var request = new http.MultipartRequest('POST', dummyUrl); - var file = - new http.MultipartFile.fromBytes('file', [104, 101, 108, 108, 111]); + var request = http.MultipartRequest('POST', dummyUrl); + var file = http.MultipartFile.fromBytes('file', [104, 101, 108, 108, 111]); request.files.add(file); expect(request, bodyMatches(''' diff --git a/test/request_test.dart b/test/request_test.dart index 3fc896791c..39243ca3c0 100644 --- a/test/request_test.dart +++ b/test/request_test.dart @@ -12,7 +12,7 @@ import 'utils.dart'; void main() { group('#contentLength', () { test('is computed from bodyBytes', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.bodyBytes = [1, 2, 3, 4, 5]; expect(request.contentLength, equals(5)); request.bodyBytes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; @@ -20,7 +20,7 @@ void main() { }); test('is computed from body', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.body = "hello"; expect(request.contentLength, equals(5)); request.body = "hello, world"; @@ -28,32 +28,32 @@ void main() { }); test('is not directly mutable', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); expect(() => request.contentLength = 50, throwsUnsupportedError); }); }); group('#encoding', () { test('defaults to utf-8', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); expect(request.encoding.name, equals(utf8.name)); }); test('can be set', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.encoding = latin1; expect(request.encoding.name, equals(latin1.name)); }); test('is based on the content-type charset if it exists', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'text/plain; charset=iso-8859-1'; expect(request.encoding.name, equals(latin1.name)); }); test('remains the default if the content-type charset is set and unset', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.encoding = latin1; request.headers['Content-Type'] = 'text/plain; charset=utf-8'; expect(request.encoding.name, equals(utf8.name)); @@ -63,7 +63,7 @@ void main() { }); test('throws an error if the content-type charset is unknown', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'text/plain; charset=not-a-real-charset'; expect(() => request.encoding, throwsFormatException); @@ -72,18 +72,18 @@ void main() { group('#bodyBytes', () { test('defaults to empty', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); expect(request.bodyBytes, isEmpty); }); test('can be set', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.bodyBytes = [104, 101, 108, 108, 111]; expect(request.bodyBytes, equals([104, 101, 108, 108, 111])); }); test('changes when body changes', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.body = "hello"; expect(request.bodyBytes, equals([104, 101, 108, 108, 111])); }); @@ -91,31 +91,31 @@ void main() { group('#body', () { test('defaults to empty', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); expect(request.body, isEmpty); }); test('can be set', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.body = "hello"; expect(request.body, equals("hello")); }); test('changes when bodyBytes changes', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.bodyBytes = [104, 101, 108, 108, 111]; expect(request.body, equals("hello")); }); test('is encoded according to the given encoding', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.encoding = latin1; request.body = "föøbãr"; expect(request.bodyBytes, equals([102, 246, 248, 98, 227, 114])); }); test('is decoded according to the given encoding', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.encoding = latin1; request.bodyBytes = [102, 246, 248, 98, 227, 114]; expect(request.body, equals("föøbãr")); @@ -124,36 +124,36 @@ void main() { group('#bodyFields', () { test("can't be read without setting the content-type", () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); expect(() => request.bodyFields, throwsStateError); }); test("can't be read with the wrong content-type", () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'text/plain'; expect(() => request.bodyFields, throwsStateError); }); test("can't be set with the wrong content-type", () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'text/plain'; expect(() => request.bodyFields = {}, throwsStateError); }); test('defaults to empty', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; expect(request.bodyFields, isEmpty); }); test('can be set with no content-type', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.bodyFields = {'hello': 'world'}; expect(request.bodyFields, equals({'hello': 'world'})); }); test('changes when body changes', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; request.body = 'key%201=value&key+2=other%2bvalue'; expect(request.bodyFields, @@ -161,7 +161,7 @@ void main() { }); test('is encoded according to the given encoding', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; request.encoding = latin1; request.bodyFields = {"föø": "bãr"}; @@ -169,7 +169,7 @@ void main() { }); test('is decoded according to the given encoding', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; request.encoding = latin1; request.body = 'f%F6%F8=b%E3r'; @@ -179,18 +179,18 @@ void main() { group('content-type header', () { test('defaults to empty', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); expect(request.headers['Content-Type'], isNull); }); test('defaults to empty if only encoding is set', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.encoding = latin1; expect(request.headers['Content-Type'], isNull); }); test('name is case insensitive', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['CoNtEnT-tYpE'] = 'application/json'; expect(request.headers, containsPair('content-type', 'application/json')); }); @@ -198,7 +198,7 @@ void main() { test( 'is set to application/x-www-form-urlencoded with charset utf-8 if ' 'bodyFields is set', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.bodyFields = {'hello': 'world'}; expect(request.headers['Content-Type'], equals('application/x-www-form-urlencoded; charset=utf-8')); @@ -207,7 +207,7 @@ void main() { test( 'is set to application/x-www-form-urlencoded with the given charset ' 'if bodyFields and encoding are set', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.encoding = latin1; request.bodyFields = {'hello': 'world'}; expect(request.headers['Content-Type'], @@ -217,7 +217,7 @@ void main() { test( 'is set to text/plain and the given encoding if body and encoding are ' 'both set', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.encoding = latin1; request.body = 'hello, world'; expect(request.headers['Content-Type'], @@ -225,7 +225,7 @@ void main() { }); test('is modified to include utf-8 if body is set', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'application/json'; request.body = '{"hello": "world"}'; expect(request.headers['Content-Type'], @@ -233,7 +233,7 @@ void main() { }); test('is modified to include the given encoding if encoding is set', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'application/json'; request.encoding = latin1; expect(request.headers['Content-Type'], @@ -241,7 +241,7 @@ void main() { }); test('has its charset overridden by an explicit encoding', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'application/json; charset=utf-8'; request.encoding = latin1; expect(request.headers['Content-Type'], @@ -249,7 +249,7 @@ void main() { }); test("doen't have its charset overridden by setting bodyFields", () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=iso-8859-1'; request.bodyFields = {'hello': 'world'}; @@ -258,7 +258,7 @@ void main() { }); test("doen't have its charset overridden by setting body", () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'application/json; charset=iso-8859-1'; request.body = '{"hello": "world"}'; expect(request.headers['Content-Type'], @@ -268,14 +268,14 @@ void main() { group('#finalize', () { test('returns a stream that emits the request body', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.body = "Hello, world!"; expect(request.finalize().bytesToString(), completion(equals("Hello, world!"))); }); test('freezes #persistentConnection', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.finalize(); expect(request.persistentConnection, isTrue); @@ -283,7 +283,7 @@ void main() { }); test('freezes #followRedirects', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.finalize(); expect(request.followRedirects, isTrue); @@ -291,7 +291,7 @@ void main() { }); test('freezes #maxRedirects', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.finalize(); expect(request.maxRedirects, equals(5)); @@ -299,7 +299,7 @@ void main() { }); test('freezes #encoding', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.finalize(); expect(request.encoding.name, equals(utf8.name)); @@ -307,7 +307,7 @@ void main() { }); test('freezes #bodyBytes', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.bodyBytes = [1, 2, 3]; request.finalize(); @@ -316,7 +316,7 @@ void main() { }); test('freezes #body', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.body = "hello"; request.finalize(); @@ -325,7 +325,7 @@ void main() { }); test('freezes #bodyFields', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.bodyFields = {"hello": "world"}; request.finalize(); @@ -334,7 +334,7 @@ void main() { }); test("can't be called twice", () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); request.finalize(); expect(request.finalize, throwsStateError); }); @@ -342,7 +342,7 @@ void main() { group('#toString()', () { test('includes the method and URL', () { - var request = new http.Request('POST', dummyUrl); + var request = http.Request('POST', dummyUrl); expect(request.toString(), 'POST $dummyUrl'); }); }); diff --git a/test/response_test.dart b/test/response_test.dart index 44707bf0de..110e5ecf64 100644 --- a/test/response_test.dart +++ b/test/response_test.dart @@ -10,12 +10,12 @@ import 'package:test/test.dart'; void main() { group('()', () { test('sets body', () { - var response = new http.Response("Hello, world!", 200); + var response = http.Response("Hello, world!", 200); expect(response.body, equals("Hello, world!")); }); test('sets bodyBytes', () { - var response = new http.Response("Hello, world!", 200); + var response = http.Response("Hello, world!", 200); expect( response.bodyBytes, equals( @@ -23,7 +23,7 @@ void main() { }); test('respects the inferred encoding', () { - var response = new http.Response("föøbãr", 200, + var response = http.Response("föøbãr", 200, headers: {'content-type': 'text/plain; charset=iso-8859-1'}); expect(response.bodyBytes, equals([102, 246, 248, 98, 227, 114])); }); @@ -31,17 +31,17 @@ void main() { group('.bytes()', () { test('sets body', () { - var response = new http.Response.bytes([104, 101, 108, 108, 111], 200); + var response = http.Response.bytes([104, 101, 108, 108, 111], 200); expect(response.body, equals("hello")); }); test('sets bodyBytes', () { - var response = new http.Response.bytes([104, 101, 108, 108, 111], 200); + var response = http.Response.bytes([104, 101, 108, 108, 111], 200); expect(response.bodyBytes, equals([104, 101, 108, 108, 111])); }); test('respects the inferred encoding', () { - var response = new http.Response.bytes([102, 246, 248, 98, 227, 114], 200, + var response = http.Response.bytes([102, 246, 248, 98, 227, 114], 200, headers: {'content-type': 'text/plain; charset=iso-8859-1'}); expect(response.body, equals("föøbãr")); }); @@ -49,9 +49,9 @@ void main() { group('.fromStream()', () { test('sets body', () { - var controller = new StreamController>(sync: true); + var controller = StreamController>(sync: true); var streamResponse = - new http.StreamedResponse(controller.stream, 200, contentLength: 13); + http.StreamedResponse(controller.stream, 200, contentLength: 13); var future = http.Response.fromStream(streamResponse) .then((response) => response.body); expect(future, completion(equals("Hello, world!"))); @@ -62,9 +62,9 @@ void main() { }); test('sets bodyBytes', () { - var controller = new StreamController>(sync: true); + var controller = StreamController>(sync: true); var streamResponse = - new http.StreamedResponse(controller.stream, 200, contentLength: 5); + http.StreamedResponse(controller.stream, 200, contentLength: 5); var future = http.Response.fromStream(streamResponse) .then((response) => response.bodyBytes); expect(future, completion(equals([104, 101, 108, 108, 111]))); diff --git a/test/streamed_request_test.dart b/test/streamed_request_test.dart index 6a86fcbf8d..ad384a5336 100644 --- a/test/streamed_request_test.dart +++ b/test/streamed_request_test.dart @@ -10,17 +10,17 @@ import 'utils.dart'; void main() { group('contentLength', () { test('defaults to null', () { - var request = new http.StreamedRequest('POST', dummyUrl); + var request = http.StreamedRequest('POST', dummyUrl); expect(request.contentLength, isNull); }); test('disallows negative values', () { - var request = new http.StreamedRequest('POST', dummyUrl); + var request = http.StreamedRequest('POST', dummyUrl); expect(() => request.contentLength = -1, throwsArgumentError); }); test('is frozen by finalize()', () { - var request = new http.StreamedRequest('POST', dummyUrl); + var request = http.StreamedRequest('POST', dummyUrl); request.finalize(); expect(() => request.contentLength = 10, throwsStateError); }); diff --git a/test/utils.dart b/test/utils.dart index c9819c630c..b92f284106 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -40,7 +40,7 @@ String cleanUpLiteral(String text) { /// A matcher that matches JSON that parses to a value that matches the inner /// matcher. -Matcher parse(matcher) => new _Parse(matcher); +Matcher parse(matcher) => _Parse(matcher); class _Parse extends Matcher { final Matcher _matcher; @@ -71,7 +71,7 @@ class _Parse extends Matcher { /// The string "{{boundary}}" in [pattern] will be replaced by the boundary /// string for the request, and LF newlines will be replaced with CRLF. /// Indentation will be normalized. -Matcher bodyMatches(String pattern) => new _BodyMatches(pattern); +Matcher bodyMatches(String pattern) => _BodyMatches(pattern); class _BodyMatches extends Matcher { final String _pattern; @@ -83,7 +83,7 @@ class _BodyMatches extends Matcher { var future = item.finalize().toBytes().then((bodyBytes) { var body = utf8.decode(bodyBytes); - var contentType = new MediaType.parse(item.headers['content-type']); + var contentType = MediaType.parse(item.headers['content-type']); var boundary = contentType.parameters['boundary']; var expected = cleanUpLiteral(_pattern) .replaceAll("\n", "\r\n") @@ -105,7 +105,7 @@ class _BodyMatches extends Matcher { /// /// [message] can be a String or a [Matcher]. Matcher isClientException(message) => predicate((error) { - expect(error, new TypeMatcher()); + expect(error, TypeMatcher()); expect(error.message, message); return true; }); From 3e307fe7926f1d84582cffe27c5ee40678696a08 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 5 May 2019 17:14:32 -0700 Subject: [PATCH 028/448] Test on oldest supported SDK, enable and fix many lints --- .travis.yml | 9 +-- analysis_options.yaml | 99 +++++++++++++++++++++++++++++++ lib/http_retry.dart | 17 +++--- pubspec.yaml | 1 + test/http_retry_test.dart | 122 ++++++++++++++++++-------------------- 5 files changed, 170 insertions(+), 78 deletions(-) create mode 100644 analysis_options.yaml diff --git a/.travis.yml b/.travis.yml index 9d8258cc4c..cae5503210 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,13 @@ language: dart -# By default, builds are run in containers. -# https://docs.travis-ci.com/user/getting-started/#Selecting-infrastructure-(optional) -# Set `sudo: true` to disable containers if you need to use sudo in your scripts. -# sudo: true - dart: +- 2.0.0 - dev -# See https://docs.travis-ci.com/user/languages/dart/ for details. + dart_task: - dartfmt - dartanalyzer + # TODO: reinstate tests once https://github.com/dart-lang/http_retry/issues/6 is fixed # - test: --platform vm # xvfb: false diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000000..815f3251de --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,99 @@ +include: package:pedantic/analysis_options.yaml +analyzer: + strong-mode: + implicit-casts: false + errors: + dead_code: error + override_on_non_overriding_method: error + unused_element: error + unused_import: error + unused_local_variable: error +linter: + rules: + - always_declare_return_types + - annotate_overrides + - avoid_bool_literals_in_conditional_expressions + - avoid_classes_with_only_static_members + - avoid_empty_else + - avoid_function_literals_in_foreach_calls + - avoid_init_to_null + - avoid_null_checks_in_equality_operators + - avoid_relative_lib_imports + - avoid_renaming_method_parameters + - avoid_return_types_on_setters + - avoid_returning_null + - avoid_returning_null_for_future + - avoid_returning_null_for_void + - avoid_returning_this + - avoid_shadowing_type_parameters + - avoid_single_cascade_in_expression_statements + - avoid_types_as_parameter_names + - avoid_unused_constructor_parameters + - await_only_futures + - camel_case_types + - cancel_subscriptions + #- cascade_invocations + - comment_references + - constant_identifier_names + - control_flow_in_finally + - directives_ordering + - empty_catches + - empty_constructor_bodies + - empty_statements + - file_names + - hash_and_equals + - implementation_imports + - invariant_booleans + - iterable_contains_unrelated_type + - join_return_with_assignment + - library_names + - library_prefixes + - list_remove_unrelated_type + - literal_only_boolean_expressions + - no_adjacent_strings_in_list + - no_duplicate_case_values + - non_constant_identifier_names + - null_closures + - omit_local_variable_types + - only_throw_errors + - overridden_fields + - package_api_docs + - package_names + - package_prefixed_library_names + - prefer_adjacent_string_concatenation + - prefer_collection_literals + - prefer_conditional_assignment + - prefer_const_constructors + - prefer_contains + - prefer_equal_for_default_values + - prefer_final_fields + #- prefer_final_locals + - prefer_generic_function_type_aliases + - prefer_initializing_formals + - prefer_interpolation_to_compose_strings + - prefer_is_empty + - prefer_is_not_empty + - prefer_null_aware_operators + #- prefer_single_quotes + - prefer_typing_uninitialized_variables + - recursive_getters + - slash_for_doc_comments + - test_types_in_equals + - throw_in_finally + - type_init_formals + - unawaited_futures + - unnecessary_await_in_return + - unnecessary_brace_in_string_interps + - unnecessary_const + - unnecessary_getters_setters + - unnecessary_lambdas + - unnecessary_new + - unnecessary_null_aware_assignments + - unnecessary_parenthesis + - unnecessary_statements + - unnecessary_this + - unrelated_type_equality_checks + #- use_function_type_syntax_for_parameters + - use_rethrow_when_possible + - valid_regexps + - void_checks diff --git a/lib/http_retry.dart b/lib/http_retry.dart index e1b08fdf88..5bb3695ecb 100644 --- a/lib/http_retry.dart +++ b/lib/http_retry.dart @@ -7,6 +7,7 @@ import 'dart:math' as math; import 'package:async/async.dart'; import 'package:http/http.dart'; +import 'package:pedantic/pedantic.dart'; /// An HTTP client wrapper that automatically retries failing requests. class RetryClient extends BaseClient { @@ -28,7 +29,7 @@ class RetryClient extends BaseClient { /// The callback to call to indicate that a request is being retried. final void Function(BaseRequest, BaseResponse, int) _onRetry; - /// Creates a client wrapping [inner] that retries HTTP requests. + /// Creates a client wrapping [_inner] that retries HTTP requests. /// /// This retries a failing request [retries] times (3 by default). Note that /// `n` retries means that the request will be sent at most `n + 1` times. @@ -58,7 +59,7 @@ class RetryClient extends BaseClient { _whenError = whenError ?? ((_, __) => false), _delay = delay ?? ((retryCount) => - new Duration(milliseconds: 500) * math.pow(1.5, retryCount)), + Duration(milliseconds: 500) * math.pow(1.5, retryCount)), _onRetry = onRetry { RangeError.checkNotNegative(_retries, "retries"); } @@ -87,11 +88,12 @@ class RetryClient extends BaseClient { whenError: whenError, onRetry: onRetry); + @override Future send(BaseRequest request) async { - var splitter = new StreamSplitter(request.finalize()); + var splitter = StreamSplitter(request.finalize()); var i = 0; - while (true) { + for (;;) { StreamedResponse response; try { response = await _inner.send(_copyRequest(request, splitter.split())); @@ -104,10 +106,10 @@ class RetryClient extends BaseClient { // Make sure the response stream is listened to so that we don't leave // dangling connections. - response.stream.listen((_) {}).cancel()?.catchError((_) {}); + unawaited(response.stream.listen((_) {}).cancel()?.catchError((_) {})); } - await new Future.delayed(_delay(i)); + await Future.delayed(_delay(i)); if (_onRetry != null) _onRetry(request, response, i); i++; } @@ -115,7 +117,7 @@ class RetryClient extends BaseClient { /// Returns a copy of [original] with the given [body]. StreamedRequest _copyRequest(BaseRequest original, Stream> body) { - var request = new StreamedRequest(original.method, original.url); + var request = StreamedRequest(original.method, original.url); request.contentLength = original.contentLength; request.followRedirects = original.followRedirects; request.headers.addAll(original.headers); @@ -130,5 +132,6 @@ class RetryClient extends BaseClient { return request; } + @override void close() => _inner.close(); } diff --git a/pubspec.yaml b/pubspec.yaml index 74168c4731..85743ad5bb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,6 +11,7 @@ environment: dependencies: async: ^2.0.7 http: '>=0.11.0 <0.13.0' + pedantic: ^1.0.0 dev_dependencies: fake_async: ^1.0.0 diff --git a/test/http_retry_test.dart b/test/http_retry_test.dart index dc7bc19925..b51ed1f86d 100644 --- a/test/http_retry_test.dart +++ b/test/http_retry_test.dart @@ -5,32 +5,29 @@ import 'package:fake_async/fake_async.dart'; import 'package:http/http.dart'; import 'package:http/testing.dart'; -import 'package:test/test.dart'; - import 'package:http_retry/http_retry.dart'; +import 'package:test/test.dart'; void main() { group("doesn't retry when", () { test("a request has a non-503 error code", () async { - var client = new RetryClient(new MockClient( - expectAsync1((_) async => new Response("", 502), count: 1))); + var client = RetryClient( + MockClient(expectAsync1((_) async => Response("", 502), count: 1))); var response = await client.get("http://example.org"); expect(response.statusCode, equals(502)); }); test("a request doesn't match when()", () async { - var client = new RetryClient( - new MockClient( - expectAsync1((_) async => new Response("", 503), count: 1)), + var client = RetryClient( + MockClient(expectAsync1((_) async => Response("", 503), count: 1)), when: (_) => false); var response = await client.get("http://example.org"); expect(response.statusCode, equals(503)); }); test("retries is 0", () async { - var client = new RetryClient( - new MockClient( - expectAsync1((_) async => new Response("", 503), count: 1)), + var client = RetryClient( + MockClient(expectAsync1((_) async => Response("", 503), count: 1)), retries: 0); var response = await client.get("http://example.org"); expect(response.statusCode, equals(503)); @@ -39,10 +36,10 @@ void main() { test("retries on a 503 by default", () async { var count = 0; - var client = new RetryClient( - new MockClient(expectAsync1((request) async { + var client = RetryClient( + MockClient(expectAsync1((request) async { count++; - return count < 2 ? new Response("", 503) : new Response("", 200); + return count < 2 ? Response("", 503) : Response("", 200); }, count: 2)), delay: (_) => Duration.zero); @@ -52,10 +49,10 @@ void main() { test("retries on any request where when() returns true", () async { var count = 0; - var client = new RetryClient( - new MockClient(expectAsync1((request) async { + var client = RetryClient( + MockClient(expectAsync1((request) async { count++; - return new Response("", 503, + return Response("", 503, headers: {"retry": count < 2 ? "true" : "false"}); }, count: 2)), when: (response) => response.headers["retry"] == "true", @@ -68,13 +65,14 @@ void main() { test("retries on any request where whenError() returns true", () async { var count = 0; - var client = new RetryClient( - new MockClient(expectAsync1((request) async { + var client = RetryClient( + MockClient(expectAsync1((request) async { count++; - if (count < 2) throw "oh no"; - return new Response("", 200); + if (count < 2) throw StateError("oh no"); + return Response("", 200); }, count: 2)), - whenError: (error, _) => error == "oh no", + whenError: (error, _) => + error is StateError && error.message == "oh no", delay: (_) => Duration.zero); var response = await client.get("http://example.org"); @@ -82,27 +80,26 @@ void main() { }); test("doesn't retry a request where whenError() returns false", () async { - var client = new RetryClient( - new MockClient(expectAsync1((request) async => throw "oh no")), + var client = RetryClient( + MockClient(expectAsync1((request) async => throw StateError("oh no"))), whenError: (error, _) => error == "oh yeah", delay: (_) => Duration.zero); - expect(client.get("http://example.org"), throwsA("oh no")); + expect(client.get("http://example.org"), + throwsA(isStateError.having((e) => e.message, 'message', "oh no"))); }); test("retries three times by default", () async { - var client = new RetryClient( - new MockClient( - expectAsync1((_) async => new Response("", 503), count: 4)), + var client = RetryClient( + MockClient(expectAsync1((_) async => Response("", 503), count: 4)), delay: (_) => Duration.zero); var response = await client.get("http://example.org"); expect(response.statusCode, equals(503)); }); test("retries the given number of times", () async { - var client = new RetryClient( - new MockClient( - expectAsync1((_) async => new Response("", 503), count: 13)), + var client = RetryClient( + MockClient(expectAsync1((_) async => Response("", 503), count: 13)), retries: 12, delay: (_) => Duration.zero); var response = await client.get("http://example.org"); @@ -110,87 +107,82 @@ void main() { }); test("waits 1.5x as long each time by default", () { - new FakeAsync().run((fake) { + FakeAsync().run((fake) { var count = 0; - var client = new RetryClient(new MockClient(expectAsync1((_) async { + var client = RetryClient(MockClient(expectAsync1((_) async { count++; if (count == 1) { expect(fake.elapsed, equals(Duration.zero)); } else if (count == 2) { - expect(fake.elapsed, equals(new Duration(milliseconds: 500))); + expect(fake.elapsed, equals(Duration(milliseconds: 500))); } else if (count == 3) { - expect(fake.elapsed, equals(new Duration(milliseconds: 1250))); + expect(fake.elapsed, equals(Duration(milliseconds: 1250))); } else if (count == 4) { - expect(fake.elapsed, equals(new Duration(milliseconds: 2375))); + expect(fake.elapsed, equals(Duration(milliseconds: 2375))); } - return new Response("", 503); + return Response("", 503); }, count: 4))); expect(client.get("http://example.org"), completes); - fake.elapse(new Duration(minutes: 10)); + fake.elapse(Duration(minutes: 10)); }); }); test("waits according to the delay parameter", () { - new FakeAsync().run((fake) { + FakeAsync().run((fake) { var count = 0; - var client = new RetryClient( - new MockClient(expectAsync1((_) async { + var client = RetryClient( + MockClient(expectAsync1((_) async { count++; if (count == 1) { expect(fake.elapsed, equals(Duration.zero)); } else if (count == 2) { expect(fake.elapsed, equals(Duration.zero)); } else if (count == 3) { - expect(fake.elapsed, equals(new Duration(seconds: 1))); + expect(fake.elapsed, equals(Duration(seconds: 1))); } else if (count == 4) { - expect(fake.elapsed, equals(new Duration(seconds: 3))); + expect(fake.elapsed, equals(Duration(seconds: 3))); } - return new Response("", 503); + return Response("", 503); }, count: 4)), - delay: (requestCount) => new Duration(seconds: requestCount)); + delay: (requestCount) => Duration(seconds: requestCount)); expect(client.get("http://example.org"), completes); - fake.elapse(new Duration(minutes: 10)); + fake.elapse(Duration(minutes: 10)); }); }); test("waits according to the delay list", () { - new FakeAsync().run((fake) { + FakeAsync().run((fake) { var count = 0; - var client = new RetryClient.withDelays( - new MockClient(expectAsync1((_) async { + var client = RetryClient.withDelays( + MockClient(expectAsync1((_) async { count++; if (count == 1) { expect(fake.elapsed, equals(Duration.zero)); } else if (count == 2) { - expect(fake.elapsed, equals(new Duration(seconds: 1))); + expect(fake.elapsed, equals(Duration(seconds: 1))); } else if (count == 3) { - expect(fake.elapsed, equals(new Duration(seconds: 61))); + expect(fake.elapsed, equals(Duration(seconds: 61))); } else if (count == 4) { - expect(fake.elapsed, equals(new Duration(seconds: 73))); + expect(fake.elapsed, equals(Duration(seconds: 73))); } - return new Response("", 503); + return Response("", 503); }, count: 4)), - [ - new Duration(seconds: 1), - new Duration(minutes: 1), - new Duration(seconds: 12) - ]); + [Duration(seconds: 1), Duration(minutes: 1), Duration(seconds: 12)]); expect(client.get("http://example.org"), completes); - fake.elapse(new Duration(minutes: 10)); + fake.elapse(Duration(minutes: 10)); }); }); test("calls onRetry for each retry", () async { var count = 0; - var client = new RetryClient( - new MockClient( - expectAsync1((_) async => new Response("", 503), count: 3)), + var client = RetryClient( + MockClient(expectAsync1((_) async => Response("", 503), count: 3)), retries: 2, delay: (_) => Duration.zero, onRetry: expectAsync3((request, response, retryCount) { @@ -204,8 +196,8 @@ void main() { }); test("copies all request attributes for each attempt", () async { - var client = new RetryClient.withDelays( - new MockClient(expectAsync1((request) async { + var client = RetryClient.withDelays( + MockClient(expectAsync1((request) async { expect(request.contentLength, equals(5)); expect(request.followRedirects, isFalse); expect(request.headers, containsPair("foo", "bar")); @@ -214,11 +206,11 @@ void main() { expect(request.persistentConnection, isFalse); expect(request.url, equals(Uri.parse("http://example.org"))); expect(request.body, equals("hello")); - return new Response("", 503); + return Response("", 503); }, count: 2)), [Duration.zero]); - var request = new Request("POST", Uri.parse("http://example.org")); + var request = Request("POST", Uri.parse("http://example.org")); request.body = "hello"; request.followRedirects = false; request.headers["foo"] = "bar"; From 3a0e452510f9cd69d1fd4afd82bc4fcc3b46d486 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 5 May 2019 17:16:13 -0700 Subject: [PATCH 029/448] enable tests --- .travis.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index cae5503210..2d9be65784 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,12 +7,9 @@ dart: dart_task: - dartfmt - dartanalyzer - - # TODO: reinstate tests once https://github.com/dart-lang/http_retry/issues/6 is fixed - # - test: --platform vm - # xvfb: false - # # Uncomment this line to run tests on the browser. - # - test: --platform firefox + - test: --platform vm + xvfb: false + - test: --platform firefox # Only building master means that we don't run two builds for each pull request. branches: From 0b2a41f22df8ca051b1c038d6e5e4fb703c51eb8 Mon Sep 17 00:00:00 2001 From: Jonas Finnemann Jensen Date: Thu, 23 May 2019 12:23:18 +0200 Subject: [PATCH 030/448] Use https:// in examples in README.md (#280) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 26b0b1a03d..28bef7c451 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,12 @@ you to make individual HTTP requests with minimal hassle: ```dart import 'package:http/http.dart' as http; -var url = 'http://example.com/whatsit/create'; +var url = 'https://example.com/whatsit/create'; var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'}); print('Response status: ${response.statusCode}'); print('Response body: ${response.body}'); -print(await http.read('http://example.com/foobar.txt')); +print(await http.read('https://example.com/foobar.txt')); ``` If you're making multiple requests to the same server, you can keep open a @@ -30,7 +30,7 @@ If you do this, make sure to close the client when you're done: ```dart var client = new http.Client(); try { - var uriResponse = await client.post('http://example.com/whatsit/create', + var uriResponse = await client.post('https://example.com/whatsit/create', body: {'name': 'doodle', 'color': 'blue'}); print(await client.get(uriResponse.bodyFields['uri'])); } finally { From 4402197fcd2984271748311aabd4af218b381aeb Mon Sep 17 00:00:00 2001 From: Alvin Konda Date: Sun, 26 May 2019 17:14:16 +0200 Subject: [PATCH 031/448] Update main.dart (#282) --- example/main.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/main.dart b/example/main.dart index 1cabc5ca33..7b3eaa9cb5 100644 --- a/example/main.dart +++ b/example/main.dart @@ -6,7 +6,7 @@ main(List arguments) async { // https://developers.google.com/books/docs/overview var url = "https://www.googleapis.com/books/v1/volumes?q={http}"; - // Await the http get response, then decode the json-formatted responce. + // Await the http get response, then decode the json-formatted response. var response = await http.get(url); if (response.statusCode == 200) { var jsonResponse = convert.jsonDecode(response.body); From 98bd1b6fe45f0eaabd366101cad90acb8b05d655 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 31 May 2019 10:01:45 -0700 Subject: [PATCH 032/448] fix urls --- README.md | 12 ++++++------ lib/src/multipart_request.dart | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 28bef7c451..679e609768 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ A composable, Future-based library for making HTTP requests. -[![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dartlang.org/packages/http) +[![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) [![Build Status](https://travis-ci.org/dart-lang/http.svg?branch=master)](https://travis-ci.org/dart-lang/http) This package contains a set of high-level functions and classes that make it @@ -42,17 +42,17 @@ You can also exert more fine-grained control over your requests and responses by creating [Request][] or [StreamedRequest][] objects yourself and passing them to [Client.send][]. -[Request]: https://pub.dartlang.org/documentation/http/latest/http/Request-class.html -[StreamedRequest]: https://pub.dartlang.org/documentation/http/latest/http/StreamedRequest-class.html -[Client.send]: https://pub.dartlang.org/documentation/http/latest/http/Client/send.html +[Request]: https://pub.dev/documentation/http/latest/http/Request-class.html +[StreamedRequest]: https://pub.dev/documentation/http/latest/http/StreamedRequest-class.html +[Client.send]: https://pub.dev/documentation/http/latest/http/Client/send.html This package is designed to be composable. This makes it easy for external libraries to work with one another to add behavior to it. Libraries wishing to add behavior should create a subclass of [BaseClient][] that wraps another [Client][] and adds the desired behavior: -[BaseClient]: https://pub.dartlang.org/documentation/http/latest/http/BaseClient-class.html -[Client]: https://pub.dartlang.org/documentation/http/latest/http/Client-class.html +[BaseClient]: https://pub.dev/documentation/http/latest/http/BaseClient-class.html +[Client]: https://pub.dev/documentation/http/latest/http/Client-class.html ```dart class UserAgentClient extends http.BaseClient { diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index e2a9714edf..e86466ea7a 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -21,7 +21,7 @@ final _newlineRegExp = RegExp(r"\r\n|\r|\n"); /// This request automatically sets the Content-Type header to /// `multipart/form-data`. This value will override any value set by the user. /// -/// var uri = Uri.parse("http://pub.dartlang.org/packages/create"); +/// var uri = Uri.parse("https://example.com/create"); /// var request = new http.MultipartRequest("POST", uri); /// request.fields['user'] = 'nweiz@google.com'; /// request.files.add(new http.MultipartFile.fromPath( From 7193bc85ae58cc98e4a155a4e6ba1fd9d8b681d4 Mon Sep 17 00:00:00 2001 From: mnordine Date: Fri, 28 Jun 2019 00:25:17 -0300 Subject: [PATCH 033/448] Fix typos (#287) --- test/request_test.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/request_test.dart b/test/request_test.dart index 39243ca3c0..fecb983023 100644 --- a/test/request_test.dart +++ b/test/request_test.dart @@ -248,7 +248,7 @@ void main() { equals('application/json; charset=iso-8859-1')); }); - test("doen't have its charset overridden by setting bodyFields", () { + test("doesn't have its charset overridden by setting bodyFields", () { var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=iso-8859-1'; @@ -257,7 +257,7 @@ void main() { equals('application/x-www-form-urlencoded; charset=iso-8859-1')); }); - test("doen't have its charset overridden by setting body", () { + test("doesn't have its charset overridden by setting body", () { var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'application/json; charset=iso-8859-1'; request.body = '{"hello": "world"}'; From a5223c56a2f16a214f99c97f737dde046d3393d4 Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Sat, 7 Sep 2019 04:37:54 +1200 Subject: [PATCH 034/448] Fix typo in package name (#299) --- .github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md index 144c2538cf..9c2f2adc61 100644 --- a/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md +++ b/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md @@ -13,6 +13,6 @@ about: You are using `package:http` and would like a new feature to make it Note that this package is designed to be cross-platform and we will only be able to add features which can be supported with _both_ `dart:io` and `dart:html`. If you're looking for a feature which is already supported by the - `daart:io` HttpClient constructor you can construct one manually and pass it + `dart:io` HttpClient constructor you can construct one manually and pass it to the IOClient constructor directly. --> From e25128c88c740d9b42f554f108cfe9ab8aff084e Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 11 Sep 2019 18:35:49 -0700 Subject: [PATCH 035/448] Fix syntax error in MultipartRequest code example (#302) Fixes #164 The primary syntax bug is a missing closing paren. This commit also fixes some style: - Use cascades in the sample code. - Use consistent single quotes in the sample code. - Use a blank line following the first sentence of all doc comments. - Delete some wholly redundant doc comments. - Rename a private constant to lower camel case. --- CHANGELOG.md | 4 +++ lib/src/multipart_request.dart | 62 +++++++++++++++++----------------- pubspec.yaml | 2 +- 3 files changed, 36 insertions(+), 32 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c376924ab..ed2977521c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.12.0+3 + +* Documentation fixes. + ## 0.12.0+2 * Documentation fixes. diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index e86466ea7a..ab0025dce6 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -14,53 +14,51 @@ import 'utils.dart'; final _newlineRegExp = RegExp(r"\r\n|\r|\n"); -/// A `multipart/form-data` request. Such a request has both string [fields], -/// which function as normal form fields, and (potentially streamed) binary -/// [files]. +/// A `multipart/form-data` request. +/// +/// Such a request has both string [fields], which function as normal form +/// fields, and (potentially streamed) binary [files]. /// /// This request automatically sets the Content-Type header to /// `multipart/form-data`. This value will override any value set by the user. /// -/// var uri = Uri.parse("https://example.com/create"); -/// var request = new http.MultipartRequest("POST", uri); -/// request.fields['user'] = 'nweiz@google.com'; -/// request.files.add(new http.MultipartFile.fromPath( -/// 'package', -/// 'build/package.tar.gz', -/// contentType: new MediaType('application', 'x-tar')); +/// var uri = Uri.parse('https://example.com/create'); +/// var request = http.MultipartRequest('POST', uri) +/// ..fields['user'] = 'nweiz@google.com' +/// ..files.add(http.MultipartFile.fromPath( +/// 'package', 'build/package.tar.gz', +/// contentType: MediaType('application', 'x-tar'))); /// var response = await request.send(); /// if (response.statusCode == 200) print('Uploaded!'); class MultipartRequest extends BaseRequest { /// The total length of the multipart boundaries used when building the - /// request body. According to http://tools.ietf.org/html/rfc1341.html, this - /// can't be longer than 70. - static const int _BOUNDARY_LENGTH = 70; + /// request body. + /// + /// According to http://tools.ietf.org/html/rfc1341.html, this can't be longer + /// than 70. + static const int _boundaryLength = 70; static final Random _random = Random(); /// The form fields to send for this request. - final Map fields; + final fields = {}; - /// The private version of [files]. - final List _files; + final _files = []; - /// Creates a new [MultipartRequest]. - MultipartRequest(String method, Uri url) - : fields = {}, - _files = [], - super(method, url); + MultipartRequest(String method, Uri url) : super(method, url); /// The list of files to upload for this request. List get files => _files; - /// The total length of the request body, in bytes. This is calculated from - /// [fields] and [files] and cannot be set manually. + /// The total length of the request body, in bytes. + /// + /// This is calculated from [fields] and [files] and cannot be set manually. int get contentLength { var length = 0; fields.forEach((name, value) { length += "--".length + - _BOUNDARY_LENGTH + + _boundaryLength + "\r\n".length + utf8.encode(_headerForField(name, value)).length + utf8.encode(value).length + @@ -69,14 +67,14 @@ class MultipartRequest extends BaseRequest { for (var file in _files) { length += "--".length + - _BOUNDARY_LENGTH + + _boundaryLength + "\r\n".length + utf8.encode(_headerForFile(file)).length + file.length + "\r\n".length; } - return length + "--".length + _BOUNDARY_LENGTH + "--\r\n".length; + return length + "--".length + _boundaryLength + "--\r\n".length; } set contentLength(int value) { @@ -123,8 +121,9 @@ class MultipartRequest extends BaseRequest { return ByteStream(controller.stream); } - /// Returns the header string for a field. The return value is guaranteed to - /// contain only ASCII characters. + /// Returns the header string for a field. + /// + /// The return value is guaranteed to contain only ASCII characters. String _headerForField(String name, String value) { var header = 'content-disposition: form-data; name="${_browserEncode(name)}"'; @@ -136,8 +135,9 @@ class MultipartRequest extends BaseRequest { return '$header\r\n\r\n'; } - /// Returns the header string for a file. The return value is guaranteed to - /// contain only ASCII characters. + /// Returns the header string for a file. + /// + /// The return value is guaranteed to contain only ASCII characters. String _headerForFile(MultipartFile file) { var header = 'content-type: ${file.contentType}\r\n' 'content-disposition: form-data; name="${_browserEncode(file.field)}"'; @@ -162,7 +162,7 @@ class MultipartRequest extends BaseRequest { String _boundaryString() { var prefix = "dart-http-boundary-"; var list = List.generate( - _BOUNDARY_LENGTH - prefix.length, + _boundaryLength - prefix.length, (index) => BOUNDARY_CHARACTERS[_random.nextInt(BOUNDARY_CHARACTERS.length)], growable: false); diff --git a/pubspec.yaml b/pubspec.yaml index 47c3c48b34..7f35e78efd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.12.0+2 +version: 0.12.0+3-dev author: "Dart Team " homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. From 5e45f534e25d6f0b557ba704da3999f374564d45 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 12 Sep 2019 10:55:07 -0700 Subject: [PATCH 036/448] Enable and fix lint annotate_overrides (#305) --- analysis_options.yaml | 1 + lib/src/base_client.dart | 10 ++++++++++ lib/src/base_request.dart | 3 ++- lib/src/browser_client.dart | 2 ++ lib/src/exception.dart | 1 + lib/src/io_client.dart | 2 ++ lib/src/mock_client.dart | 1 + lib/src/multipart_request.dart | 3 +++ lib/src/request.dart | 3 +++ lib/src/streamed_request.dart | 1 + lib/src/utils.dart | 3 +++ test/utils.dart | 4 ++++ 12 files changed, 33 insertions(+), 1 deletion(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 9da47a9105..164ed9c0d8 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,6 +1,7 @@ include: package:pedantic/analysis_options.yaml linter: rules: + - annotate_overrides - prefer_generic_function_type_aliases - unnecessary_const - unnecessary_new diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index ff5b23d94b..ab31376d1a 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -21,6 +21,7 @@ abstract class BaseClient implements Client { /// can be a [Uri] or a [String]. /// /// For more fine-grained control over the request, use [send] instead. + @override Future head(url, {Map headers}) => _sendUnstreamed("HEAD", url, headers); @@ -28,6 +29,7 @@ abstract class BaseClient implements Client { /// can be a [Uri] or a [String]. /// /// For more fine-grained control over the request, use [send] instead. + @override Future get(url, {Map headers}) => _sendUnstreamed("GET", url, headers); @@ -49,6 +51,7 @@ abstract class BaseClient implements Client { /// [encoding] defaults to UTF-8. /// /// For more fine-grained control over the request, use [send] instead. + @override Future post(url, {Map headers, body, Encoding encoding}) => _sendUnstreamed("POST", url, headers, body, encoding); @@ -71,6 +74,7 @@ abstract class BaseClient implements Client { /// [encoding] defaults to UTF-8. /// /// For more fine-grained control over the request, use [send] instead. + @override Future put(url, {Map headers, body, Encoding encoding}) => _sendUnstreamed("PUT", url, headers, body, encoding); @@ -93,6 +97,7 @@ abstract class BaseClient implements Client { /// [encoding] defaults to UTF-8. /// /// For more fine-grained control over the request, use [send] instead. + @override Future patch(url, {Map headers, body, Encoding encoding}) => _sendUnstreamed("PATCH", url, headers, body, encoding); @@ -101,6 +106,7 @@ abstract class BaseClient implements Client { /// which can be a [Uri] or a [String]. /// /// For more fine-grained control over the request, use [send] instead. + @override Future delete(url, {Map headers}) => _sendUnstreamed("DELETE", url, headers); @@ -113,6 +119,7 @@ abstract class BaseClient implements Client { /// /// For more fine-grained control over the request and response, use [send] or /// [get] instead. + @override Future read(url, {Map headers}) { return get(url, headers: headers).then((response) { _checkResponseSuccess(url, response); @@ -129,6 +136,7 @@ abstract class BaseClient implements Client { /// /// For more fine-grained control over the request and response, use [send] or /// [get] instead. + @override Future readBytes(url, {Map headers}) { return get(url, headers: headers).then((response) { _checkResponseSuccess(url, response); @@ -143,6 +151,7 @@ abstract class BaseClient implements Client { /// state of the stream; it could have data written to it asynchronously at a /// later point, or it could already be closed when it's returned. Any /// internal HTTP errors should be wrapped as [ClientException]s. + @override Future send(BaseRequest request); /// Sends a non-streaming [Request] and returns a non-streaming [Response]. @@ -183,5 +192,6 @@ abstract class BaseClient implements Client { /// Closes the client and cleans up any resources associated with it. It's /// important to close each client when it's done being used; failing to do so /// can cause the Dart process to hang. + @override void close() {} } diff --git a/lib/src/base_request.dart b/lib/src/base_request.dart index 0492724557..71995aa6ce 100644 --- a/lib/src/base_request.dart +++ b/lib/src/base_request.dart @@ -134,5 +134,6 @@ abstract class BaseRequest { throw StateError("Can't modify a finalized Request."); } - String toString() => "$method $url"; + @override + String toString() => '$method $url'; } diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index d64d7e668d..489178525a 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -41,6 +41,7 @@ class BrowserClient extends BaseClient { bool withCredentials = false; /// Sends an HTTP request and asynchronously returns the response. + @override Future send(BaseRequest request) async { var bytes = await request.finalize().toBytes(); var xhr = HttpRequest(); @@ -101,6 +102,7 @@ class BrowserClient extends BaseClient { /// Closes the client. /// /// This terminates all active requests. + @override void close() { for (var xhr in _xhrs) { xhr.abort(); diff --git a/lib/src/exception.dart b/lib/src/exception.dart index db2c2240a4..c92a861a5b 100644 --- a/lib/src/exception.dart +++ b/lib/src/exception.dart @@ -11,5 +11,6 @@ class ClientException implements Exception { ClientException(this.message, [this.uri]); + @override String toString() => message; } diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index c5cdbbaa9c..7f6d9187f4 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -26,6 +26,7 @@ class IOClient extends BaseClient { IOClient([HttpClient inner]) : _inner = inner ?? HttpClient(); /// Sends an HTTP request and asynchronously returns the response. + @override Future send(BaseRequest request) async { var stream = request.finalize(); @@ -68,6 +69,7 @@ class IOClient extends BaseClient { /// Closes the client. This terminates all active connections. If a client /// remains unclosed, the Dart process may not terminate. + @override void close() { if (_inner != null) _inner.close(force: true); _inner = null; diff --git a/lib/src/mock_client.dart b/lib/src/mock_client.dart index 2051911aa7..9350b1a682 100644 --- a/lib/src/mock_client.dart +++ b/lib/src/mock_client.dart @@ -67,6 +67,7 @@ class MockClient extends BaseClient { }); /// Sends a request. + @override Future send(BaseRequest request) async { var bodyStream = request.finalize(); return await _handler(request, bodyStream); diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index ab0025dce6..773b9bb2b5 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -53,6 +53,7 @@ class MultipartRequest extends BaseRequest { /// The total length of the request body, in bytes. /// /// This is calculated from [fields] and [files] and cannot be set manually. + @override int get contentLength { var length = 0; @@ -77,6 +78,7 @@ class MultipartRequest extends BaseRequest { return length + "--".length + _boundaryLength + "--\r\n".length; } + @override set contentLength(int value) { throw UnsupportedError("Cannot set the contentLength property of " "multipart requests."); @@ -84,6 +86,7 @@ class MultipartRequest extends BaseRequest { /// Freezes all mutable fields and returns a single-subscription [ByteStream] /// that will emit the request body. + @override ByteStream finalize() { // TODO(nweiz): freeze fields and files var boundary = _boundaryString(); diff --git a/lib/src/request.dart b/lib/src/request.dart index f18959d8b2..61262e897b 100644 --- a/lib/src/request.dart +++ b/lib/src/request.dart @@ -18,8 +18,10 @@ class Request extends BaseRequest { /// /// The content length cannot be set for [Request], since it's automatically /// calculated from [bodyBytes]. + @override int get contentLength => bodyBytes.length; + @override set contentLength(int value) { throw UnsupportedError("Cannot set the contentLength property of " "non-streaming Request objects."); @@ -136,6 +138,7 @@ class Request extends BaseRequest { /// Freezes all mutable fields and returns a single-subscription [ByteStream] /// containing the request body. + @override ByteStream finalize() { super.finalize(); return ByteStream.fromBytes(bodyBytes); diff --git a/lib/src/streamed_request.dart b/lib/src/streamed_request.dart index ba6ebc4afa..1a23a87563 100644 --- a/lib/src/streamed_request.dart +++ b/lib/src/streamed_request.dart @@ -34,6 +34,7 @@ class StreamedRequest extends BaseRequest { /// Freezes all mutable fields other than [stream] and returns a /// single-subscription [ByteStream] that emits the data being written to /// [sink]. + @override ByteStream finalize() { super.finalize(); return ByteStream(_controller.stream); diff --git a/lib/src/utils.dart b/lib/src/utils.dart index 07c64c35a6..164c1e5d57 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -121,13 +121,16 @@ class Pair { Pair(this.first, this.last); + @override String toString() => '($first, $last)'; + @override bool operator ==(other) { if (other is! Pair) return false; return other.first == first && other.last == last; } + @override int get hashCode => first.hashCode ^ last.hashCode; } diff --git a/test/utils.dart b/test/utils.dart index b92f284106..995a1bbffc 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -47,6 +47,7 @@ class _Parse extends Matcher { _Parse(this._matcher); + @override bool matches(item, Map matchState) { if (item is! String) return false; @@ -60,6 +61,7 @@ class _Parse extends Matcher { return _matcher.matches(parsed, matchState); } + @override Description describe(Description description) { return description .add('parses to a value that ') @@ -78,6 +80,7 @@ class _BodyMatches extends Matcher { _BodyMatches(this._pattern); + @override bool matches(item, Map matchState) { if (item is! http.MultipartRequest) return false; @@ -96,6 +99,7 @@ class _BodyMatches extends Matcher { return completes.matches(future, matchState); } + @override Description describe(Description description) { return description.add('has a body that matches "$_pattern"'); } From ea686651b86f150774a8167a71fdc7bb63877edf Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 12 Sep 2019 11:06:20 -0700 Subject: [PATCH 037/448] Enable and fix lint prefer_single_quotes (#304) --- analysis_options.yaml | 1 + example/main.dart | 6 +++--- lib/src/base_client.dart | 18 +++++++++--------- lib/src/base_request.dart | 2 +- lib/src/base_response.dart | 4 ++-- lib/src/browser_client.dart | 2 +- lib/src/multipart_file.dart | 4 ++-- lib/src/multipart_request.dart | 26 +++++++++++++------------- lib/src/request.dart | 12 ++++++------ lib/src/response.dart | 2 +- lib/src/utils.dart | 4 ++-- test/html/client_test.dart | 6 +++--- test/io/client_test.dart | 6 +++--- test/io/request_test.dart | 2 +- test/io/utils.dart | 4 ++-- test/mock_client_test.dart | 10 +++++----- test/multipart_test.dart | 6 +++--- test/request_test.dart | 34 +++++++++++++++++----------------- test/response_test.dart | 14 +++++++------- test/utils.dart | 4 ++-- 20 files changed, 84 insertions(+), 83 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 164ed9c0d8..6d41948338 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -3,5 +3,6 @@ linter: rules: - annotate_overrides - prefer_generic_function_type_aliases + - prefer_single_quotes - unnecessary_const - unnecessary_new diff --git a/example/main.dart b/example/main.dart index 7b3eaa9cb5..13f996fa21 100644 --- a/example/main.dart +++ b/example/main.dart @@ -4,15 +4,15 @@ import 'package:http/http.dart' as http; main(List arguments) async { // This example uses the Google Books API to search for books about http. // https://developers.google.com/books/docs/overview - var url = "https://www.googleapis.com/books/v1/volumes?q={http}"; + var url = 'https://www.googleapis.com/books/v1/volumes?q={http}'; // Await the http get response, then decode the json-formatted response. var response = await http.get(url); if (response.statusCode == 200) { var jsonResponse = convert.jsonDecode(response.body); var itemCount = jsonResponse['totalItems']; - print("Number of books about http: $itemCount."); + print('Number of books about http: $itemCount.'); } else { - print("Request failed with status: ${response.statusCode}."); + print('Request failed with status: ${response.statusCode}.'); } } diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index ab31376d1a..3fc7da9dbb 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -23,7 +23,7 @@ abstract class BaseClient implements Client { /// For more fine-grained control over the request, use [send] instead. @override Future head(url, {Map headers}) => - _sendUnstreamed("HEAD", url, headers); + _sendUnstreamed('HEAD', url, headers); /// Sends an HTTP GET request with the given headers to the given URL, which /// can be a [Uri] or a [String]. @@ -31,7 +31,7 @@ abstract class BaseClient implements Client { /// For more fine-grained control over the request, use [send] instead. @override Future get(url, {Map headers}) => - _sendUnstreamed("GET", url, headers); + _sendUnstreamed('GET', url, headers); /// Sends an HTTP POST request with the given headers and body to the given /// URL, which can be a [Uri] or a [String]. @@ -54,7 +54,7 @@ abstract class BaseClient implements Client { @override Future post(url, {Map headers, body, Encoding encoding}) => - _sendUnstreamed("POST", url, headers, body, encoding); + _sendUnstreamed('POST', url, headers, body, encoding); /// Sends an HTTP PUT request with the given headers and body to the given /// URL, which can be a [Uri] or a [String]. @@ -77,7 +77,7 @@ abstract class BaseClient implements Client { @override Future put(url, {Map headers, body, Encoding encoding}) => - _sendUnstreamed("PUT", url, headers, body, encoding); + _sendUnstreamed('PUT', url, headers, body, encoding); /// Sends an HTTP PATCH request with the given headers and body to the given /// URL, which can be a [Uri] or a [String]. @@ -100,7 +100,7 @@ abstract class BaseClient implements Client { @override Future patch(url, {Map headers, body, Encoding encoding}) => - _sendUnstreamed("PATCH", url, headers, body, encoding); + _sendUnstreamed('PATCH', url, headers, body, encoding); /// Sends an HTTP DELETE request with the given headers to the given URL, /// which can be a [Uri] or a [String]. @@ -108,7 +108,7 @@ abstract class BaseClient implements Client { /// For more fine-grained control over the request, use [send] instead. @override Future delete(url, {Map headers}) => - _sendUnstreamed("DELETE", url, headers); + _sendUnstreamed('DELETE', url, headers); /// Sends an HTTP GET request with the given headers to the given URL, which /// can be a [Uri] or a [String], and returns a Future that completes to the @@ -181,12 +181,12 @@ abstract class BaseClient implements Client { /// Throws an error if [response] is not successful. void _checkResponseSuccess(url, Response response) { if (response.statusCode < 400) return; - var message = "Request to $url failed with status ${response.statusCode}"; + var message = 'Request to $url failed with status ${response.statusCode}'; if (response.reasonPhrase != null) { - message = "$message: ${response.reasonPhrase}"; + message = '$message: ${response.reasonPhrase}'; } if (url is String) url = Uri.parse(url); - throw ClientException("$message.", url); + throw ClientException('$message.', url); } /// Closes the client and cleans up any resources associated with it. It's diff --git a/lib/src/base_request.dart b/lib/src/base_request.dart index 71995aa6ce..4c855888b0 100644 --- a/lib/src/base_request.dart +++ b/lib/src/base_request.dart @@ -34,7 +34,7 @@ abstract class BaseRequest { set contentLength(int value) { if (value != null && value < 0) { - throw ArgumentError("Invalid content length $value."); + throw ArgumentError('Invalid content length $value.'); } _checkFinalized(); _contentLength = value; diff --git a/lib/src/base_response.dart b/lib/src/base_response.dart index 7c44eea0f0..68e1a736e9 100644 --- a/lib/src/base_response.dart +++ b/lib/src/base_response.dart @@ -44,9 +44,9 @@ abstract class BaseResponse { this.persistentConnection = true, this.reasonPhrase}) { if (statusCode < 100) { - throw ArgumentError("Invalid status code $statusCode."); + throw ArgumentError('Invalid status code $statusCode.'); } else if (contentLength != null && contentLength < 0) { - throw ArgumentError("Invalid content length $contentLength."); + throw ArgumentError('Invalid content length $contentLength.'); } } } diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index 489178525a..b19f13a6e5 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -80,7 +80,7 @@ class BrowserClient extends BaseClient { // Unfortunately, the underlying XMLHttpRequest API doesn't expose any // specific information about the error itself. completer.completeError( - ClientException("XMLHttpRequest error.", request.url), + ClientException('XMLHttpRequest error.', request.url), StackTrace.current); })); diff --git a/lib/src/multipart_file.dart b/lib/src/multipart_file.dart index a3ca7fa9da..05db4cd704 100644 --- a/lib/src/multipart_file.dart +++ b/lib/src/multipart_file.dart @@ -49,7 +49,7 @@ class MultipartFile { : this._stream = toByteStream(stream), this.contentType = contentType != null ? contentType - : MediaType("application", "octet-stream"); + : MediaType('application', 'octet-stream'); /// Creates a new [MultipartFile] from a byte array. /// @@ -71,7 +71,7 @@ class MultipartFile { factory MultipartFile.fromString(String field, String value, {String filename, MediaType contentType}) { contentType = - contentType == null ? MediaType("text", "plain") : contentType; + contentType == null ? MediaType('text', 'plain') : contentType; var encoding = encodingForCharset(contentType.parameters['charset'], utf8); contentType = contentType.change(parameters: {'charset': encoding.name}); diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index 773b9bb2b5..0f15451e33 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -12,7 +12,7 @@ import 'byte_stream.dart'; import 'multipart_file.dart'; import 'utils.dart'; -final _newlineRegExp = RegExp(r"\r\n|\r|\n"); +final _newlineRegExp = RegExp(r'\r\n|\r|\n'); /// A `multipart/form-data` request. /// @@ -58,30 +58,30 @@ class MultipartRequest extends BaseRequest { var length = 0; fields.forEach((name, value) { - length += "--".length + + length += '--'.length + _boundaryLength + - "\r\n".length + + '\r\n'.length + utf8.encode(_headerForField(name, value)).length + utf8.encode(value).length + - "\r\n".length; + '\r\n'.length; }); for (var file in _files) { - length += "--".length + + length += '--'.length + _boundaryLength + - "\r\n".length + + '\r\n'.length + utf8.encode(_headerForFile(file)).length + file.length + - "\r\n".length; + '\r\n'.length; } - return length + "--".length + _boundaryLength + "--\r\n".length; + return length + '--'.length + _boundaryLength + '--\r\n'.length; } @override set contentLength(int value) { - throw UnsupportedError("Cannot set the contentLength property of " - "multipart requests."); + throw UnsupportedError('Cannot set the contentLength property of ' + 'multipart requests.'); } /// Freezes all mutable fields and returns a single-subscription [ByteStream] @@ -158,17 +158,17 @@ class MultipartRequest extends BaseRequest { // follow this at all. Instead, they URL-encode `\r`, `\n`, and `\r\n` as // `\r\n`; URL-encode `"`; and do nothing else (even for `%` or non-ASCII // characters). We follow their behavior. - return value.replaceAll(_newlineRegExp, "%0D%0A").replaceAll('"', "%22"); + return value.replaceAll(_newlineRegExp, '%0D%0A').replaceAll('"', '%22'); } /// Returns a randomly-generated multipart boundary string String _boundaryString() { - var prefix = "dart-http-boundary-"; + var prefix = 'dart-http-boundary-'; var list = List.generate( _boundaryLength - prefix.length, (index) => BOUNDARY_CHARACTERS[_random.nextInt(BOUNDARY_CHARACTERS.length)], growable: false); - return "$prefix${String.fromCharCodes(list)}"; + return '$prefix${String.fromCharCodes(list)}'; } } diff --git a/lib/src/request.dart b/lib/src/request.dart index 61262e897b..e3cff97cae 100644 --- a/lib/src/request.dart +++ b/lib/src/request.dart @@ -23,8 +23,8 @@ class Request extends BaseRequest { @override set contentLength(int value) { - throw UnsupportedError("Cannot set the contentLength property of " - "non-streaming Request objects."); + throw UnsupportedError('Cannot set the contentLength property of ' + 'non-streaming Request objects.'); } /// The default encoding to use when converting between [bodyBytes] and @@ -87,7 +87,7 @@ class Request extends BaseRequest { bodyBytes = encoding.encode(value); var contentType = _contentType; if (contentType == null) { - _contentType = MediaType("text", "plain", {'charset': encoding.name}); + _contentType = MediaType('text', 'plain', {'charset': encoding.name}); } else if (!contentType.parameters.containsKey('charset')) { _contentType = contentType.change(parameters: {'charset': encoding.name}); } @@ -110,7 +110,7 @@ class Request extends BaseRequest { Map get bodyFields { var contentType = _contentType; if (contentType == null || - contentType.mimeType != "application/x-www-form-urlencoded") { + contentType.mimeType != 'application/x-www-form-urlencoded') { throw StateError('Cannot access the body fields of a Request without ' 'content-type "application/x-www-form-urlencoded".'); } @@ -121,8 +121,8 @@ class Request extends BaseRequest { set bodyFields(Map fields) { var contentType = _contentType; if (contentType == null) { - _contentType = MediaType("application", "x-www-form-urlencoded"); - } else if (contentType.mimeType != "application/x-www-form-urlencoded") { + _contentType = MediaType('application', 'x-www-form-urlencoded'); + } else if (contentType.mimeType != 'application/x-www-form-urlencoded') { throw StateError('Cannot set the body fields of a Request with ' 'content-type "${contentType.mimeType}".'); } diff --git a/lib/src/response.dart b/lib/src/response.dart index bdc39d15ae..6d49b8a6bc 100644 --- a/lib/src/response.dart +++ b/lib/src/response.dart @@ -82,5 +82,5 @@ Encoding _encodingForHeaders(Map headers) => MediaType _contentTypeForHeaders(Map headers) { var contentType = headers['content-type']; if (contentType != null) return MediaType.parse(contentType); - return MediaType("application", "octet-stream"); + return MediaType('application', 'octet-stream'); } diff --git a/lib/src/utils.dart b/lib/src/utils.dart index 164c1e5d57..67aabe01ec 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -18,7 +18,7 @@ String mapToQuery(Map map, {Encoding encoding}) { Uri.encodeQueryComponent(key, encoding: encoding), Uri.encodeQueryComponent(value, encoding: encoding) ])); - return pairs.map((pair) => "${pair[0]}=${pair[1]}").join("&"); + return pairs.map((pair) => '${pair[0]}=${pair[1]}').join('&'); } /// Like [String.split], but only splits on the first occurrence of the pattern. @@ -58,7 +58,7 @@ Encoding requiredEncodingForCharset(String charset) { /// A regular expression that matches strings that are composed entirely of /// ASCII-compatible characters. -final RegExp _ASCII_ONLY = RegExp(r"^[\x00-\x7F]+$"); +final RegExp _ASCII_ONLY = RegExp(r'^[\x00-\x7F]+$'); /// Returns whether [string] is composed entirely of ASCII-compatible /// characters. diff --git a/test/html/client_test.dart b/test/html/client_test.dart index 8fe1c72e21..cd55d1d4a8 100644 --- a/test/html/client_test.dart +++ b/test/html/client_test.dart @@ -13,7 +13,7 @@ import 'utils.dart'; void main() { test('#send a StreamedRequest', () { var client = BrowserClient(); - var request = http.StreamedRequest("POST", echoUrl); + var request = http.StreamedRequest('POST', echoUrl); expect( client.send(request).then((response) { @@ -28,10 +28,10 @@ void main() { test('#send with an invalid URL', () { var client = BrowserClient(); var url = Uri.parse('http://http.invalid'); - var request = http.StreamedRequest("POST", url); + var request = http.StreamedRequest('POST', url); expect( - client.send(request), throwsClientException("XMLHttpRequest error.")); + client.send(request), throwsClientException('XMLHttpRequest error.')); request.sink.add('{"hello": "world"}'.codeUnits); request.sink.close(); diff --git a/test/io/client_test.dart b/test/io/client_test.dart index 030144591a..a77a026ec1 100644 --- a/test/io/client_test.dart +++ b/test/io/client_test.dart @@ -19,7 +19,7 @@ void main() { expect( startServer().then((_) { var client = http.Client(); - var request = http.StreamedRequest("POST", serverUrl); + var request = http.StreamedRequest('POST', serverUrl); request.headers[HttpHeaders.contentTypeHeader] = 'application/json; charset=utf-8'; request.headers[HttpHeaders.userAgentHeader] = 'Dart'; @@ -58,7 +58,7 @@ void main() { startServer().then((_) { var ioClient = HttpClient(); var client = http_io.IOClient(ioClient); - var request = http.StreamedRequest("POST", serverUrl); + var request = http.StreamedRequest('POST', serverUrl); request.headers[HttpHeaders.contentTypeHeader] = 'application/json; charset=utf-8'; request.headers[HttpHeaders.userAgentHeader] = 'Dart'; @@ -97,7 +97,7 @@ void main() { startServer().then((_) { var client = http.Client(); var url = Uri.parse('http://http.invalid'); - var request = http.StreamedRequest("POST", url); + var request = http.StreamedRequest('POST', url); request.headers[HttpHeaders.contentTypeHeader] = 'application/json; charset=utf-8'; diff --git a/test/io/request_test.dart b/test/io/request_test.dart index bdae67730e..bc980e3ac6 100644 --- a/test/io/request_test.dart +++ b/test/io/request_test.dart @@ -14,7 +14,7 @@ void main() { expect( startServer().then((_) { var request = http.Request('POST', serverUrl); - request.body = "hello"; + request.body = 'hello'; request.headers['User-Agent'] = 'Dart'; expect( diff --git a/test/io/utils.dart b/test/io/utils.dart index 50e668bc84..f30ebf2da0 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -20,7 +20,7 @@ Uri get serverUrl => Uri.parse('http://localhost:${_server.port}'); /// Starts a new HTTP server. Future startServer() { - return HttpServer.bind("localhost", 0).then((s) { + return HttpServer.bind('localhost', 0).then((s) { _server = s; s.listen((request) { var path = request.uri.path; @@ -69,7 +69,7 @@ Future startServer() { } response.headers.contentType = - ContentType("application", "json", charset: outputEncoding.name); + ContentType('application', 'json', charset: outputEncoding.name); response.headers.set('single', 'value'); var requestBody; diff --git a/test/mock_client_test.dart b/test/mock_client_test.dart index acd1007e11..3ec5ab009b 100644 --- a/test/mock_client_test.dart +++ b/test/mock_client_test.dart @@ -19,7 +19,7 @@ void main() { }); expect( - client.post("http://example.com/foo", body: { + client.post('http://example.com/foo', body: { 'field1': 'value1', 'field2': 'value2' }).then((response) => response.body), @@ -39,9 +39,9 @@ void main() { }); }); - var uri = Uri.parse("http://example.com/foo"); - var request = http.Request("POST", uri); - request.body = "hello, world"; + var uri = Uri.parse('http://example.com/foo'); + var request = http.Request('POST', uri); + request.body = 'hello, world'; var future = client .send(request) .then(http.Response.fromStream) @@ -54,7 +54,7 @@ void main() { return Future.value(http.Response('you did it', 200)); }); - expect(client.read("http://example.com/foo"), + expect(client.read('http://example.com/foo'), completion(equals('you did it'))); }); } diff --git a/test/multipart_test.dart b/test/multipart_test.dart index 8b14197204..e1259328cf 100644 --- a/test/multipart_test.dart +++ b/test/multipart_test.dart @@ -30,9 +30,9 @@ void main() { var request = http.MultipartRequest('POST', dummyUrl); request.fields['field1'] = 'value1'; request.fields['field2'] = 'value2'; - request.files.add(http.MultipartFile.fromString("file1", "contents1", - filename: "filename1.txt")); - request.files.add(http.MultipartFile.fromString("file2", "contents2")); + request.files.add(http.MultipartFile.fromString('file1', 'contents1', + filename: 'filename1.txt')); + request.files.add(http.MultipartFile.fromString('file2', 'contents2')); expect(request, bodyMatches(''' --{{boundary}} diff --git a/test/request_test.dart b/test/request_test.dart index fecb983023..8e19eb3549 100644 --- a/test/request_test.dart +++ b/test/request_test.dart @@ -21,9 +21,9 @@ void main() { test('is computed from body', () { var request = http.Request('POST', dummyUrl); - request.body = "hello"; + request.body = 'hello'; expect(request.contentLength, equals(5)); - request.body = "hello, world"; + request.body = 'hello, world'; expect(request.contentLength, equals(12)); }); @@ -84,7 +84,7 @@ void main() { test('changes when body changes', () { var request = http.Request('POST', dummyUrl); - request.body = "hello"; + request.body = 'hello'; expect(request.bodyBytes, equals([104, 101, 108, 108, 111])); }); }); @@ -97,20 +97,20 @@ void main() { test('can be set', () { var request = http.Request('POST', dummyUrl); - request.body = "hello"; - expect(request.body, equals("hello")); + request.body = 'hello'; + expect(request.body, equals('hello')); }); test('changes when bodyBytes changes', () { var request = http.Request('POST', dummyUrl); request.bodyBytes = [104, 101, 108, 108, 111]; - expect(request.body, equals("hello")); + expect(request.body, equals('hello')); }); test('is encoded according to the given encoding', () { var request = http.Request('POST', dummyUrl); request.encoding = latin1; - request.body = "föøbãr"; + request.body = 'föøbãr'; expect(request.bodyBytes, equals([102, 246, 248, 98, 227, 114])); }); @@ -118,7 +118,7 @@ void main() { var request = http.Request('POST', dummyUrl); request.encoding = latin1; request.bodyBytes = [102, 246, 248, 98, 227, 114]; - expect(request.body, equals("föøbãr")); + expect(request.body, equals('föøbãr')); }); }); @@ -164,7 +164,7 @@ void main() { var request = http.Request('POST', dummyUrl); request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; request.encoding = latin1; - request.bodyFields = {"föø": "bãr"}; + request.bodyFields = {'föø': 'bãr'}; expect(request.body, equals('f%F6%F8=b%E3r')); }); @@ -173,7 +173,7 @@ void main() { request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; request.encoding = latin1; request.body = 'f%F6%F8=b%E3r'; - expect(request.bodyFields, equals({"föø": "bãr"})); + expect(request.bodyFields, equals({'föø': 'bãr'})); }); }); @@ -269,9 +269,9 @@ void main() { group('#finalize', () { test('returns a stream that emits the request body', () { var request = http.Request('POST', dummyUrl); - request.body = "Hello, world!"; + request.body = 'Hello, world!'; expect(request.finalize().bytesToString(), - completion(equals("Hello, world!"))); + completion(equals('Hello, world!'))); }); test('freezes #persistentConnection', () { @@ -317,19 +317,19 @@ void main() { test('freezes #body', () { var request = http.Request('POST', dummyUrl); - request.body = "hello"; + request.body = 'hello'; request.finalize(); - expect(request.body, equals("hello")); - expect(() => request.body = "goodbye", throwsStateError); + expect(request.body, equals('hello')); + expect(() => request.body = 'goodbye', throwsStateError); }); test('freezes #bodyFields', () { var request = http.Request('POST', dummyUrl); - request.bodyFields = {"hello": "world"}; + request.bodyFields = {'hello': 'world'}; request.finalize(); - expect(request.bodyFields, equals({"hello": "world"})); + expect(request.bodyFields, equals({'hello': 'world'})); expect(() => request.bodyFields = {}, throwsStateError); }); diff --git a/test/response_test.dart b/test/response_test.dart index 110e5ecf64..69a8b9560e 100644 --- a/test/response_test.dart +++ b/test/response_test.dart @@ -10,12 +10,12 @@ import 'package:test/test.dart'; void main() { group('()', () { test('sets body', () { - var response = http.Response("Hello, world!", 200); - expect(response.body, equals("Hello, world!")); + var response = http.Response('Hello, world!', 200); + expect(response.body, equals('Hello, world!')); }); test('sets bodyBytes', () { - var response = http.Response("Hello, world!", 200); + var response = http.Response('Hello, world!', 200); expect( response.bodyBytes, equals( @@ -23,7 +23,7 @@ void main() { }); test('respects the inferred encoding', () { - var response = http.Response("föøbãr", 200, + var response = http.Response('föøbãr', 200, headers: {'content-type': 'text/plain; charset=iso-8859-1'}); expect(response.bodyBytes, equals([102, 246, 248, 98, 227, 114])); }); @@ -32,7 +32,7 @@ void main() { group('.bytes()', () { test('sets body', () { var response = http.Response.bytes([104, 101, 108, 108, 111], 200); - expect(response.body, equals("hello")); + expect(response.body, equals('hello')); }); test('sets bodyBytes', () { @@ -43,7 +43,7 @@ void main() { test('respects the inferred encoding', () { var response = http.Response.bytes([102, 246, 248, 98, 227, 114], 200, headers: {'content-type': 'text/plain; charset=iso-8859-1'}); - expect(response.body, equals("föøbãr")); + expect(response.body, equals('föøbãr')); }); }); @@ -54,7 +54,7 @@ void main() { http.StreamedResponse(controller.stream, 200, contentLength: 13); var future = http.Response.fromStream(streamResponse) .then((response) => response.body); - expect(future, completion(equals("Hello, world!"))); + expect(future, completion(equals('Hello, world!'))); controller.add([72, 101, 108, 108, 111, 44, 32]); controller.add([119, 111, 114, 108, 100, 33]); diff --git a/test/utils.dart b/test/utils.dart index 995a1bbffc..97a66d8e6a 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -89,8 +89,8 @@ class _BodyMatches extends Matcher { var contentType = MediaType.parse(item.headers['content-type']); var boundary = contentType.parameters['boundary']; var expected = cleanUpLiteral(_pattern) - .replaceAll("\n", "\r\n") - .replaceAll("{{boundary}}", boundary); + .replaceAll('\n', '\r\n') + .replaceAll('{{boundary}}', boundary); expect(body, equals(expected)); expect(item.contentLength, equals(bodyBytes.length)); From 74ae5819c743fdfec5d21bff1253274a97b448e5 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 12 Sep 2019 14:04:53 -0700 Subject: [PATCH 038/448] Enable a bunch of lints that are already clean (#306) These are all lints that are used in the build repo, the ones which have violations are commented out. --- analysis_options.yaml | 70 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/analysis_options.yaml b/analysis_options.yaml index 6d41948338..74f811ebaa 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -2,7 +2,77 @@ include: package:pedantic/analysis_options.yaml linter: rules: - annotate_overrides + - avoid_bool_literals_in_conditional_expressions + - avoid_classes_with_only_static_members + - avoid_empty_else + - avoid_function_literals_in_foreach_calls + - avoid_init_to_null + - avoid_null_checks_in_equality_operators + - avoid_relative_lib_imports + - avoid_renaming_method_parameters + - avoid_return_types_on_setters + - avoid_returning_null_for_void + - avoid_returning_this + - avoid_shadowing_type_parameters + - avoid_single_cascade_in_expression_statements + - avoid_types_as_parameter_names + - avoid_unused_constructor_parameters + - await_only_futures + - camel_case_types + # cascade_invocations + # comment_references + - control_flow_in_finally + - curly_braces_in_flow_control_structures + # directives_ordering + - empty_catches + - empty_constructor_bodies + - empty_statements + - file_names + - hash_and_equals + - invariant_booleans + - iterable_contains_unrelated_type + - library_names + - library_prefixes + - list_remove_unrelated_type + - no_adjacent_strings_in_list + - no_duplicate_case_values + # non_constant_identifier_names + - null_closures + - omit_local_variable_types + - only_throw_errors + - overridden_fields + - package_names + - package_prefixed_library_names + - prefer_adjacent_string_concatenation + # prefer_conditional_assignment + - prefer_contains + - prefer_equal_for_default_values + - prefer_final_fields - prefer_generic_function_type_aliases + - prefer_initializing_formals + - prefer_is_empty + - prefer_is_not_empty + - prefer_null_aware_operators - prefer_single_quotes + # prefer_typing_uninitialized_variables + - recursive_getters + - slash_for_doc_comments + - test_types_in_equals + - throw_in_finally + - type_init_formals + - unawaited_futures + # unnecessary_brace_in_string_interps - unnecessary_const + - unnecessary_getters_setters + - unnecessary_lambdas - unnecessary_new + - unnecessary_null_aware_assignments + - unnecessary_null_in_if_null_operators + - unnecessary_overrides + - unnecessary_parenthesis + - unnecessary_statements + # unnecessary_this + - unrelated_type_equality_checks + - use_rethrow_when_possible + - valid_regexps + - void_checks From bfbda569fe50b70eeb779372efc1241e6a8ebbbf Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 12 Sep 2019 15:42:15 -0700 Subject: [PATCH 039/448] Enable and fix lint cascade_invocations (#307) --- analysis_options.yaml | 2 +- lib/src/browser_client.dart | 5 +- lib/src/io_client.dart | 4 +- test/html/streamed_request_test.dart | 8 +- test/io/request_test.dart | 6 +- test/io/streamed_request_test.dart | 8 +- test/io/utils.dart | 43 +++++----- test/mock_client_test.dart | 8 +- test/multipart_test.dart | 5 +- test/request_test.dart | 116 ++++++++++++--------------- test/response_test.dart | 12 +-- test/streamed_request_test.dart | 3 +- 12 files changed, 107 insertions(+), 113 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 74f811ebaa..e32abd4664 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -19,7 +19,7 @@ linter: - avoid_unused_constructor_parameters - await_only_futures - camel_case_types - # cascade_invocations + - cascade_invocations # comment_references - control_flow_in_finally - curly_braces_in_flow_control_structures diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index b19f13a6e5..2f7f2aee40 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -47,8 +47,9 @@ class BrowserClient extends BaseClient { var xhr = HttpRequest(); _xhrs.add(xhr); _openHttpRequest(xhr, request.method, request.url.toString(), asynch: true); - xhr.responseType = 'blob'; - xhr.withCredentials = withCredentials; + xhr + ..responseType = 'blob' + ..withCredentials = withCredentials; request.headers.forEach(xhr.setRequestHeader); var completer = Completer(); diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index 7f6d9187f4..64579e7970 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -31,9 +31,7 @@ class IOClient extends BaseClient { var stream = request.finalize(); try { - var ioRequest = await _inner.openUrl(request.method, request.url); - - ioRequest + var ioRequest = (await _inner.openUrl(request.method, request.url)) ..followRedirects = request.followRedirects ..maxRedirects = request.maxRedirects ..contentLength = diff --git a/test/html/streamed_request_test.dart b/test/html/streamed_request_test.dart index e28b313c74..b2e7790950 100644 --- a/test/html/streamed_request_test.dart +++ b/test/html/streamed_request_test.dart @@ -13,10 +13,10 @@ import 'utils.dart'; void main() { group('contentLength', () { test("works when it's set", () { - var request = http.StreamedRequest('POST', echoUrl); - request.contentLength = 10; - request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - request.sink.close(); + var request = http.StreamedRequest('POST', echoUrl) + ..contentLength = 10 + ..sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) + ..sink.close(); return BrowserClient().send(request).then((response) { expect(response.stream.toBytes(), diff --git a/test/io/request_test.dart b/test/io/request_test.dart index bc980e3ac6..f689dce9e8 100644 --- a/test/io/request_test.dart +++ b/test/io/request_test.dart @@ -13,9 +13,9 @@ void main() { test('.send', () { expect( startServer().then((_) { - var request = http.Request('POST', serverUrl); - request.body = 'hello'; - request.headers['User-Agent'] = 'Dart'; + var request = http.Request('POST', serverUrl) + ..body = 'hello' + ..headers['User-Agent'] = 'Dart'; expect( request.send().then((response) { diff --git a/test/io/streamed_request_test.dart b/test/io/streamed_request_test.dart index 233372690b..960c684cfd 100644 --- a/test/io/streamed_request_test.dart +++ b/test/io/streamed_request_test.dart @@ -15,10 +15,10 @@ void main() { group('contentLength', () { test('controls the Content-Length header', () { return startServer().then((_) { - var request = http.StreamedRequest('POST', serverUrl); - request.contentLength = 10; - request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - request.sink.close(); + var request = http.StreamedRequest('POST', serverUrl) + ..contentLength = 10 + ..sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) + ..sink.close(); return request.send(); }).then((response) { diff --git a/test/io/utils.dart b/test/io/utils.dart index f30ebf2da0..8ea8f27672 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -27,35 +27,39 @@ Future startServer() { var response = request.response; if (path == '/error') { - response.statusCode = 400; - response.contentLength = 0; - response.close(); + response + ..statusCode = 400 + ..contentLength = 0 + ..close(); return; } if (path == '/loop') { var n = int.parse(request.uri.query); - response.statusCode = 302; - response.headers - .set('location', serverUrl.resolve('/loop?${n + 1}').toString()); - response.contentLength = 0; - response.close(); + response + ..statusCode = 302 + ..headers + .set('location', serverUrl.resolve('/loop?${n + 1}').toString()) + ..contentLength = 0 + ..close(); return; } if (path == '/redirect') { - response.statusCode = 302; - response.headers.set('location', serverUrl.resolve('/').toString()); - response.contentLength = 0; - response.close(); + response + ..statusCode = 302 + ..headers.set('location', serverUrl.resolve('/').toString()) + ..contentLength = 0 + ..close(); return; } if (path == '/no-content-length') { - response.statusCode = 200; - response.contentLength = -1; - response.write('body'); - response.close(); + response + ..statusCode = 200 + ..contentLength = -1 + ..write('body') + ..close(); return; } @@ -99,9 +103,10 @@ Future startServer() { }); var body = json.encode(content); - response.contentLength = body.length; - response.write(body); - response.close(); + response + ..contentLength = body.length + ..write(body) + ..close(); }); }); }); diff --git a/test/mock_client_test.dart b/test/mock_client_test.dart index 3ec5ab009b..7ab382d347 100644 --- a/test/mock_client_test.dart +++ b/test/mock_client_test.dart @@ -31,8 +31,9 @@ void main() { return bodyStream.bytesToString().then((bodyString) { var controller = StreamController>(sync: true); Future.sync(() { - controller.add('Request body was "$bodyString"'.codeUnits); - controller.close(); + controller + ..add('Request body was "$bodyString"'.codeUnits) + ..close(); }); return http.StreamedResponse(controller.stream, 200); @@ -40,8 +41,7 @@ void main() { }); var uri = Uri.parse('http://example.com/foo'); - var request = http.Request('POST', uri); - request.body = 'hello, world'; + var request = http.Request('POST', uri)..body = 'hello, world'; var future = client .send(request) .then(http.Response.fromStream) diff --git a/test/multipart_test.dart b/test/multipart_test.dart index e1259328cf..7f536f233c 100644 --- a/test/multipart_test.dart +++ b/test/multipart_test.dart @@ -203,8 +203,9 @@ void main() { --{{boundary}}-- ''')); - controller.add([104, 101, 108, 108, 111]); - controller.close(); + controller + ..add([104, 101, 108, 108, 111]) + ..close(); }); test('with an empty stream file', () { diff --git a/test/request_test.dart b/test/request_test.dart index 8e19eb3549..5b74bff593 100644 --- a/test/request_test.dart +++ b/test/request_test.dart @@ -12,16 +12,14 @@ import 'utils.dart'; void main() { group('#contentLength', () { test('is computed from bodyBytes', () { - var request = http.Request('POST', dummyUrl); - request.bodyBytes = [1, 2, 3, 4, 5]; + var request = http.Request('POST', dummyUrl)..bodyBytes = [1, 2, 3, 4, 5]; expect(request.contentLength, equals(5)); request.bodyBytes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; expect(request.contentLength, equals(10)); }); test('is computed from body', () { - var request = http.Request('POST', dummyUrl); - request.body = 'hello'; + var request = http.Request('POST', dummyUrl)..body = 'hello'; expect(request.contentLength, equals(5)); request.body = 'hello, world'; expect(request.contentLength, equals(12)); @@ -40,8 +38,7 @@ void main() { }); test('can be set', () { - var request = http.Request('POST', dummyUrl); - request.encoding = latin1; + var request = http.Request('POST', dummyUrl)..encoding = latin1; expect(request.encoding.name, equals(latin1.name)); }); @@ -53,9 +50,9 @@ void main() { test('remains the default if the content-type charset is set and unset', () { - var request = http.Request('POST', dummyUrl); - request.encoding = latin1; - request.headers['Content-Type'] = 'text/plain; charset=utf-8'; + var request = http.Request('POST', dummyUrl) + ..encoding = latin1 + ..headers['Content-Type'] = 'text/plain; charset=utf-8'; expect(request.encoding.name, equals(utf8.name)); request.headers.remove('Content-Type'); @@ -77,14 +74,13 @@ void main() { }); test('can be set', () { - var request = http.Request('POST', dummyUrl); - request.bodyBytes = [104, 101, 108, 108, 111]; + var request = http.Request('POST', dummyUrl) + ..bodyBytes = [104, 101, 108, 108, 111]; expect(request.bodyBytes, equals([104, 101, 108, 108, 111])); }); test('changes when body changes', () { - var request = http.Request('POST', dummyUrl); - request.body = 'hello'; + var request = http.Request('POST', dummyUrl)..body = 'hello'; expect(request.bodyBytes, equals([104, 101, 108, 108, 111])); }); }); @@ -96,28 +92,27 @@ void main() { }); test('can be set', () { - var request = http.Request('POST', dummyUrl); - request.body = 'hello'; + var request = http.Request('POST', dummyUrl)..body = 'hello'; expect(request.body, equals('hello')); }); test('changes when bodyBytes changes', () { - var request = http.Request('POST', dummyUrl); - request.bodyBytes = [104, 101, 108, 108, 111]; + var request = http.Request('POST', dummyUrl) + ..bodyBytes = [104, 101, 108, 108, 111]; expect(request.body, equals('hello')); }); test('is encoded according to the given encoding', () { - var request = http.Request('POST', dummyUrl); - request.encoding = latin1; - request.body = 'föøbãr'; + var request = http.Request('POST', dummyUrl) + ..encoding = latin1 + ..body = 'föøbãr'; expect(request.bodyBytes, equals([102, 246, 248, 98, 227, 114])); }); test('is decoded according to the given encoding', () { - var request = http.Request('POST', dummyUrl); - request.encoding = latin1; - request.bodyBytes = [102, 246, 248, 98, 227, 114]; + var request = http.Request('POST', dummyUrl) + ..encoding = latin1 + ..bodyBytes = [102, 246, 248, 98, 227, 114]; expect(request.body, equals('föøbãr')); }); }); @@ -147,8 +142,8 @@ void main() { }); test('can be set with no content-type', () { - var request = http.Request('POST', dummyUrl); - request.bodyFields = {'hello': 'world'}; + var request = http.Request('POST', dummyUrl) + ..bodyFields = {'hello': 'world'}; expect(request.bodyFields, equals({'hello': 'world'})); }); @@ -161,18 +156,18 @@ void main() { }); test('is encoded according to the given encoding', () { - var request = http.Request('POST', dummyUrl); - request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; - request.encoding = latin1; - request.bodyFields = {'föø': 'bãr'}; + var request = http.Request('POST', dummyUrl) + ..headers['Content-Type'] = 'application/x-www-form-urlencoded' + ..encoding = latin1 + ..bodyFields = {'föø': 'bãr'}; expect(request.body, equals('f%F6%F8=b%E3r')); }); test('is decoded according to the given encoding', () { - var request = http.Request('POST', dummyUrl); - request.headers['Content-Type'] = 'application/x-www-form-urlencoded'; - request.encoding = latin1; - request.body = 'f%F6%F8=b%E3r'; + var request = http.Request('POST', dummyUrl) + ..headers['Content-Type'] = 'application/x-www-form-urlencoded' + ..encoding = latin1 + ..body = 'f%F6%F8=b%E3r'; expect(request.bodyFields, equals({'föø': 'bãr'})); }); }); @@ -184,8 +179,7 @@ void main() { }); test('defaults to empty if only encoding is set', () { - var request = http.Request('POST', dummyUrl); - request.encoding = latin1; + var request = http.Request('POST', dummyUrl)..encoding = latin1; expect(request.headers['Content-Type'], isNull); }); @@ -198,8 +192,8 @@ void main() { test( 'is set to application/x-www-form-urlencoded with charset utf-8 if ' 'bodyFields is set', () { - var request = http.Request('POST', dummyUrl); - request.bodyFields = {'hello': 'world'}; + var request = http.Request('POST', dummyUrl) + ..bodyFields = {'hello': 'world'}; expect(request.headers['Content-Type'], equals('application/x-www-form-urlencoded; charset=utf-8')); }); @@ -207,9 +201,9 @@ void main() { test( 'is set to application/x-www-form-urlencoded with the given charset ' 'if bodyFields and encoding are set', () { - var request = http.Request('POST', dummyUrl); - request.encoding = latin1; - request.bodyFields = {'hello': 'world'}; + var request = http.Request('POST', dummyUrl) + ..encoding = latin1 + ..bodyFields = {'hello': 'world'}; expect(request.headers['Content-Type'], equals('application/x-www-form-urlencoded; charset=iso-8859-1')); }); @@ -217,9 +211,9 @@ void main() { test( 'is set to text/plain and the given encoding if body and encoding are ' 'both set', () { - var request = http.Request('POST', dummyUrl); - request.encoding = latin1; - request.body = 'hello, world'; + var request = http.Request('POST', dummyUrl) + ..encoding = latin1 + ..body = 'hello, world'; expect(request.headers['Content-Type'], equals('text/plain; charset=iso-8859-1')); }); @@ -268,74 +262,68 @@ void main() { group('#finalize', () { test('returns a stream that emits the request body', () { - var request = http.Request('POST', dummyUrl); - request.body = 'Hello, world!'; + var request = http.Request('POST', dummyUrl)..body = 'Hello, world!'; expect(request.finalize().bytesToString(), completion(equals('Hello, world!'))); }); test('freezes #persistentConnection', () { - var request = http.Request('POST', dummyUrl); - request.finalize(); + var request = http.Request('POST', dummyUrl)..finalize(); expect(request.persistentConnection, isTrue); expect(() => request.persistentConnection = false, throwsStateError); }); test('freezes #followRedirects', () { - var request = http.Request('POST', dummyUrl); - request.finalize(); + var request = http.Request('POST', dummyUrl)..finalize(); expect(request.followRedirects, isTrue); expect(() => request.followRedirects = false, throwsStateError); }); test('freezes #maxRedirects', () { - var request = http.Request('POST', dummyUrl); - request.finalize(); + var request = http.Request('POST', dummyUrl)..finalize(); expect(request.maxRedirects, equals(5)); expect(() => request.maxRedirects = 10, throwsStateError); }); test('freezes #encoding', () { - var request = http.Request('POST', dummyUrl); - request.finalize(); + var request = http.Request('POST', dummyUrl)..finalize(); expect(request.encoding.name, equals(utf8.name)); expect(() => request.encoding = ascii, throwsStateError); }); test('freezes #bodyBytes', () { - var request = http.Request('POST', dummyUrl); - request.bodyBytes = [1, 2, 3]; - request.finalize(); + var request = http.Request('POST', dummyUrl) + ..bodyBytes = [1, 2, 3] + ..finalize(); expect(request.bodyBytes, equals([1, 2, 3])); expect(() => request.bodyBytes = [4, 5, 6], throwsStateError); }); test('freezes #body', () { - var request = http.Request('POST', dummyUrl); - request.body = 'hello'; - request.finalize(); + var request = http.Request('POST', dummyUrl) + ..body = 'hello' + ..finalize(); expect(request.body, equals('hello')); expect(() => request.body = 'goodbye', throwsStateError); }); test('freezes #bodyFields', () { - var request = http.Request('POST', dummyUrl); - request.bodyFields = {'hello': 'world'}; - request.finalize(); + var request = http.Request('POST', dummyUrl) + ..bodyFields = {'hello': 'world'} + ..finalize(); expect(request.bodyFields, equals({'hello': 'world'})); expect(() => request.bodyFields = {}, throwsStateError); }); test("can't be called twice", () { - var request = http.Request('POST', dummyUrl); - request.finalize(); + var request = http.Request('POST', dummyUrl)..finalize(); expect(request.finalize, throwsStateError); }); }); diff --git a/test/response_test.dart b/test/response_test.dart index 69a8b9560e..9e55a83d1f 100644 --- a/test/response_test.dart +++ b/test/response_test.dart @@ -56,9 +56,10 @@ void main() { .then((response) => response.body); expect(future, completion(equals('Hello, world!'))); - controller.add([72, 101, 108, 108, 111, 44, 32]); - controller.add([119, 111, 114, 108, 100, 33]); - controller.close(); + controller + ..add([72, 101, 108, 108, 111, 44, 32]) + ..add([119, 111, 114, 108, 100, 33]) + ..close(); }); test('sets bodyBytes', () { @@ -69,8 +70,9 @@ void main() { .then((response) => response.bodyBytes); expect(future, completion(equals([104, 101, 108, 108, 111]))); - controller.add([104, 101, 108, 108, 111]); - controller.close(); + controller + ..add([104, 101, 108, 108, 111]) + ..close(); }); }); } diff --git a/test/streamed_request_test.dart b/test/streamed_request_test.dart index ad384a5336..c8c801d866 100644 --- a/test/streamed_request_test.dart +++ b/test/streamed_request_test.dart @@ -20,8 +20,7 @@ void main() { }); test('is frozen by finalize()', () { - var request = http.StreamedRequest('POST', dummyUrl); - request.finalize(); + var request = http.StreamedRequest('POST', dummyUrl)..finalize(); expect(() => request.contentLength = 10, throwsStateError); }); }); From 7a386880a953ae7b729f6fc15a44b213e3afb1bd Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 12 Sep 2019 16:05:58 -0700 Subject: [PATCH 040/448] Enable and fix lint directives_ordering (#309) --- analysis_options.yaml | 2 +- lib/src/multipart_file.dart | 3 +-- lib/src/streamed_request.dart | 2 +- lib/src/streamed_response.dart | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index e32abd4664..de5921b551 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -23,7 +23,7 @@ linter: # comment_references - control_flow_in_finally - curly_braces_in_flow_control_structures - # directives_ordering + - directives_ordering - empty_catches - empty_constructor_bodies - empty_statements diff --git a/lib/src/multipart_file.dart b/lib/src/multipart_file.dart index 05db4cd704..406aafe34a 100644 --- a/lib/src/multipart_file.dart +++ b/lib/src/multipart_file.dart @@ -8,12 +8,11 @@ import 'dart:convert'; import 'package:http_parser/http_parser.dart'; import 'byte_stream.dart'; -import 'utils.dart'; - // ignore: uri_does_not_exist import 'multipart_file_stub.dart' // ignore: uri_does_not_exist if (dart.library.io) 'multipart_file_io.dart'; +import 'utils.dart'; /// A file to be uploaded as part of a [MultipartRequest]. This doesn't need to /// correspond to a physical file. diff --git a/lib/src/streamed_request.dart b/lib/src/streamed_request.dart index 1a23a87563..9465e13ad7 100644 --- a/lib/src/streamed_request.dart +++ b/lib/src/streamed_request.dart @@ -4,8 +4,8 @@ import 'dart:async'; -import 'byte_stream.dart'; import 'base_request.dart'; +import 'byte_stream.dart'; /// An HTTP request where the request body is sent asynchronously after the /// connection has been established and the headers have been sent. diff --git a/lib/src/streamed_response.dart b/lib/src/streamed_response.dart index 55f055ad44..29ab1b074f 100644 --- a/lib/src/streamed_response.dart +++ b/lib/src/streamed_response.dart @@ -4,9 +4,9 @@ import 'dart:async'; -import 'byte_stream.dart'; -import 'base_response.dart'; import 'base_request.dart'; +import 'base_response.dart'; +import 'byte_stream.dart'; import 'utils.dart'; /// An HTTP response where the response body is received asynchronously after From 460e8a5248ec0e086f95d0c90c131559d8d2c649 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 12 Sep 2019 16:08:47 -0700 Subject: [PATCH 041/448] Enable and fix lint prefer_collection_literals (#310) Requires bumping the SDK to use set literals. This also fixes some annoyances with the analyzer in older SDK versions. --- .travis.yml | 2 +- analysis_options.yaml | 1 + lib/src/browser_client.dart | 2 +- pubspec.yaml | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index a7a9ec1cc7..7acc0b132b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: dart dart: - dev - - 2.0.0 + - 2.2.0 dart_task: - test: --platform vm diff --git a/analysis_options.yaml b/analysis_options.yaml index de5921b551..1bac99ac6e 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -48,6 +48,7 @@ linter: - prefer_contains - prefer_equal_for_default_values - prefer_final_fields + - prefer_collection_literals - prefer_generic_function_type_aliases - prefer_initializing_formals - prefer_is_empty diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index 2f7f2aee40..601a5608ed 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -29,7 +29,7 @@ class BrowserClient extends BaseClient { /// The currently active XHRs. /// /// These are aborted if the client is closed. - final _xhrs = Set(); + final _xhrs = {}; /// Creates a new HTTP client. BrowserClient(); diff --git a/pubspec.yaml b/pubspec.yaml index 7f35e78efd..17703eb1b5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. environment: - sdk: ">=2.0.0 <3.0.0" + sdk: ">=2.2.0 <3.0.0" dependencies: async: ">=1.10.0 <3.0.0" From 4e05dc895152119cb1339e2729c54d45cd83af51 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 12 Sep 2019 16:16:39 -0700 Subject: [PATCH 042/448] Refactor to null aware operators (#308) Search for any `== null` or `!= null` and where there is a null aware replacement, use it. In one place where we could have used `?.` refactor to add a null assignment within the conditional - it's an unmeasured micro-optimization but also one which is a common pattern used elsewhere. Enable the fixed lint prefer_conditional_assignment --- analysis_options.yaml | 2 +- lib/src/browser_client.dart | 2 +- lib/src/io_client.dart | 9 +++++---- lib/src/multipart_file.dart | 8 +++----- lib/src/multipart_file_io.dart | 2 +- lib/src/utils.dart | 11 ++++------- test/io/utils.dart | 12 ++++-------- 7 files changed, 19 insertions(+), 27 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 1bac99ac6e..543ea347b3 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -44,7 +44,7 @@ linter: - package_names - package_prefixed_library_names - prefer_adjacent_string_concatenation - # prefer_conditional_assignment + - prefer_conditional_assignment - prefer_contains - prefer_equal_for_default_values - prefer_final_fields diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index 601a5608ed..602523ce69 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -56,7 +56,7 @@ class BrowserClient extends BaseClient { unawaited(xhr.onLoad.first.then((_) { // TODO(nweiz): Set the response type to "arraybuffer" when issue 18542 // is fixed. - var blob = xhr.response == null ? Blob([]) : xhr.response; + var blob = xhr.response ?? Blob([]); var reader = FileReader(); reader.onLoad.first.then((_) { diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index 64579e7970..f38a9c4829 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -34,8 +34,7 @@ class IOClient extends BaseClient { var ioRequest = (await _inner.openUrl(request.method, request.url)) ..followRedirects = request.followRedirects ..maxRedirects = request.maxRedirects - ..contentLength = - request.contentLength == null ? -1 : request.contentLength + ..contentLength = (request?.contentLength ?? -1) ..persistentConnection = request.persistentConnection; request.headers.forEach((name, value) { ioRequest.headers.set(name, value); @@ -69,7 +68,9 @@ class IOClient extends BaseClient { /// remains unclosed, the Dart process may not terminate. @override void close() { - if (_inner != null) _inner.close(force: true); - _inner = null; + if (_inner != null) { + _inner.close(force: true); + _inner = null; + } } } diff --git a/lib/src/multipart_file.dart b/lib/src/multipart_file.dart index 406aafe34a..4f23c784c4 100644 --- a/lib/src/multipart_file.dart +++ b/lib/src/multipart_file.dart @@ -46,9 +46,8 @@ class MultipartFile { MultipartFile(this.field, Stream> stream, this.length, {this.filename, MediaType contentType}) : this._stream = toByteStream(stream), - this.contentType = contentType != null - ? contentType - : MediaType('application', 'octet-stream'); + this.contentType = + contentType ?? MediaType('application', 'octet-stream'); /// Creates a new [MultipartFile] from a byte array. /// @@ -69,8 +68,7 @@ class MultipartFile { /// the future may be inferred from [filename]. factory MultipartFile.fromString(String field, String value, {String filename, MediaType contentType}) { - contentType = - contentType == null ? MediaType('text', 'plain') : contentType; + contentType ??= MediaType('text', 'plain'); var encoding = encodingForCharset(contentType.parameters['charset'], utf8); contentType = contentType.change(parameters: {'charset': encoding.name}); diff --git a/lib/src/multipart_file_io.dart b/lib/src/multipart_file_io.dart index fb63ab092a..a84402fab0 100644 --- a/lib/src/multipart_file_io.dart +++ b/lib/src/multipart_file_io.dart @@ -14,7 +14,7 @@ import 'multipart_file.dart'; Future multipartFileFromPath(String field, String filePath, {String filename, MediaType contentType}) async { - if (filename == null) filename = p.basename(filePath); + filename ??= p.basename(filePath); var file = File(filePath); var length = await file.length(); var stream = ByteStream(DelegatingStream.typed(file.openRead())); diff --git a/lib/src/utils.dart b/lib/src/utils.dart index 67aabe01ec..c29ad6491c 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -43,18 +43,15 @@ List split1(String toSplit, String pattern) { /// [charset]. Encoding encodingForCharset(String charset, [Encoding fallback = latin1]) { if (charset == null) return fallback; - var encoding = Encoding.getByName(charset); - return encoding == null ? fallback : encoding; + return Encoding.getByName(charset) ?? fallback; } /// Returns the [Encoding] that corresponds to [charset]. Throws a /// [FormatException] if no [Encoding] was found that corresponds to [charset]. /// [charset] may not be null. -Encoding requiredEncodingForCharset(String charset) { - var encoding = Encoding.getByName(charset); - if (encoding != null) return encoding; - throw FormatException('Unsupported encoding "$charset".'); -} +Encoding requiredEncodingForCharset(String charset) => + Encoding.getByName(charset) ?? + (throw FormatException('Unsupported encoding "$charset".')); /// A regular expression that matches strings that are composed entirely of /// ASCII-compatible characters. diff --git a/test/io/utils.dart b/test/io/utils.dart index 8ea8f27672..9ab4deba68 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -64,13 +64,10 @@ Future startServer() { } ByteStream(request).toBytes().then((requestBodyBytes) { - var outputEncoding; var encodingName = request.uri.queryParameters['response-encoding']; - if (encodingName != null) { - outputEncoding = requiredEncodingForCharset(encodingName); - } else { - outputEncoding = ascii; - } + var outputEncoding = encodingName == null + ? ascii + : requiredEncodingForCharset(encodingName); response.headers.contentType = ContentType('application', 'json', charset: outputEncoding.name); @@ -79,8 +76,7 @@ Future startServer() { var requestBody; if (requestBodyBytes.isEmpty) { requestBody = null; - } else if (request.headers.contentType != null && - request.headers.contentType.charset != null) { + } else if (request.headers.contentType?.charset != null) { var encoding = requiredEncodingForCharset(request.headers.contentType.charset); requestBody = encoding.decode(requestBodyBytes); From 08be5b34938dbf45995bc6f8bac0cd94a1d00da2 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 12 Sep 2019 17:24:53 -0700 Subject: [PATCH 043/448] Enable and fix lint unnecessary_this (#314) --- analysis_options.yaml | 2 +- lib/src/multipart_file.dart | 5 ++--- lib/src/request.dart | 2 +- lib/src/streamed_response.dart | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 543ea347b3..54ab5cfc24 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -72,7 +72,7 @@ linter: - unnecessary_overrides - unnecessary_parenthesis - unnecessary_statements - # unnecessary_this + - unnecessary_this - unrelated_type_equality_checks - use_rethrow_when_possible - valid_regexps diff --git a/lib/src/multipart_file.dart b/lib/src/multipart_file.dart index 4f23c784c4..c063939d71 100644 --- a/lib/src/multipart_file.dart +++ b/lib/src/multipart_file.dart @@ -45,9 +45,8 @@ class MultipartFile { /// future may be inferred from [filename]. MultipartFile(this.field, Stream> stream, this.length, {this.filename, MediaType contentType}) - : this._stream = toByteStream(stream), - this.contentType = - contentType ?? MediaType('application', 'octet-stream'); + : _stream = toByteStream(stream), + contentType = contentType ?? MediaType('application', 'octet-stream'); /// Creates a new [MultipartFile] from a byte array. /// diff --git a/lib/src/request.dart b/lib/src/request.dart index e3cff97cae..0c6910d1c3 100644 --- a/lib/src/request.dart +++ b/lib/src/request.dart @@ -127,7 +127,7 @@ class Request extends BaseRequest { 'content-type "${contentType.mimeType}".'); } - this.body = mapToQuery(fields, encoding: encoding); + body = mapToQuery(fields, encoding: encoding); } /// Creates a new HTTP request. diff --git a/lib/src/streamed_response.dart b/lib/src/streamed_response.dart index 29ab1b074f..fc10470013 100644 --- a/lib/src/streamed_response.dart +++ b/lib/src/streamed_response.dart @@ -25,7 +25,7 @@ class StreamedResponse extends BaseResponse { bool isRedirect = false, bool persistentConnection = true, String reasonPhrase}) - : this.stream = toByteStream(stream), + : stream = toByteStream(stream), super(statusCode, contentLength: contentLength, request: request, From 13b3abc88e9b8d4cff758978e8440f4cdf3211f4 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 12 Sep 2019 17:25:02 -0700 Subject: [PATCH 044/448] Enable and fix lint unnecessary_brace_in_string_interps (#313) --- analysis_options.yaml | 2 +- test/multipart_test.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 54ab5cfc24..6e5c2b60c5 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -62,7 +62,7 @@ linter: - throw_in_finally - type_init_formals - unawaited_futures - # unnecessary_brace_in_string_interps + - unnecessary_brace_in_string_interps - unnecessary_const - unnecessary_getters_setters - unnecessary_lambdas diff --git a/test/multipart_test.dart b/test/multipart_test.dart index 7f536f233c..5bc12d24c0 100644 --- a/test/multipart_test.dart +++ b/test/multipart_test.dart @@ -21,7 +21,7 @@ void main() { test('boundary characters', () { var testBoundary = String.fromCharCodes(BOUNDARY_CHARACTERS); - var contentType = MediaType.parse('text/plain; boundary=${testBoundary}'); + var contentType = MediaType.parse('text/plain; boundary=$testBoundary'); var boundary = contentType.parameters['boundary']; expect(boundary, testBoundary); }); From 71acfd282aa56b5f784c59864a694d1bd198351b Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 12 Sep 2019 17:25:30 -0700 Subject: [PATCH 045/448] Enable and fix lint prefer_typing_uninitialized_variables (#312) --- analysis_options.yaml | 2 +- test/io/multipart_test.dart | 2 +- test/io/utils.dart | 2 +- test/utils.dart | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 6e5c2b60c5..27ed3cdcc9 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -55,7 +55,7 @@ linter: - prefer_is_not_empty - prefer_null_aware_operators - prefer_single_quotes - # prefer_typing_uninitialized_variables + - prefer_typing_uninitialized_variables - recursive_getters - slash_for_doc_comments - test_types_in_equals diff --git a/test/io/multipart_test.dart b/test/io/multipart_test.dart index eb42f00952..3ac9accbc5 100644 --- a/test/io/multipart_test.dart +++ b/test/io/multipart_test.dart @@ -14,7 +14,7 @@ import 'package:test/test.dart'; import 'utils.dart'; void main() { - var tempDir; + Directory tempDir; setUp(() { tempDir = Directory.systemTemp.createTempSync('http_test_'); }); diff --git a/test/io/utils.dart b/test/io/utils.dart index 9ab4deba68..857b0236fa 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -73,7 +73,7 @@ Future startServer() { ContentType('application', 'json', charset: outputEncoding.name); response.headers.set('single', 'value'); - var requestBody; + dynamic requestBody; if (requestBodyBytes.isEmpty) { requestBody = null; } else if (request.headers.contentType?.charset != null) { diff --git a/test/utils.dart b/test/utils.dart index 97a66d8e6a..8e78cbea86 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -51,7 +51,7 @@ class _Parse extends Matcher { bool matches(item, Map matchState) { if (item is! String) return false; - var parsed; + dynamic parsed; try { parsed = json.decode(item); } catch (e) { From 57ad7755e3a733fc544513696eca1e3e85880ec3 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 12 Sep 2019 17:25:43 -0700 Subject: [PATCH 046/448] Enable and fix lint non_constant_identifier_names (#311) --- analysis_options.yaml | 2 +- lib/src/utils.dart | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 27ed3cdcc9..e42fee88d0 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -36,7 +36,7 @@ linter: - list_remove_unrelated_type - no_adjacent_strings_in_list - no_duplicate_case_values - # non_constant_identifier_names + - non_constant_identifier_names - null_closures - omit_local_variable_types - only_throw_errors diff --git a/lib/src/utils.dart b/lib/src/utils.dart index c29ad6491c..dcdecbd9d8 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -55,11 +55,11 @@ Encoding requiredEncodingForCharset(String charset) => /// A regular expression that matches strings that are composed entirely of /// ASCII-compatible characters. -final RegExp _ASCII_ONLY = RegExp(r'^[\x00-\x7F]+$'); +final _asciiOnly = RegExp(r'^[\x00-\x7F]+$'); /// Returns whether [string] is composed entirely of ASCII-compatible /// characters. -bool isPlainAscii(String string) => _ASCII_ONLY.hasMatch(string); +bool isPlainAscii(String string) => _asciiOnly.hasMatch(string); /// Converts [input] into a [Uint8List]. /// From 2eef7ed13430add5fb4260c56315299148e75385 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 13 Sep 2019 10:53:36 -0700 Subject: [PATCH 047/448] Clean up doc comment style (#315) - Delete doc comments that add no new information. - Add some details to otherwise non-informative comments. - Consistently use a blank line following the first sentence. - Change some wording for style. - Remove unnecessary `new` in code examples. --- README.md | 2 +- lib/src/base_client.dart | 14 ++++++++------ lib/src/base_request.dart | 25 ++++++++++++++----------- lib/src/base_response.dart | 5 +---- lib/src/boundary_characters.dart | 9 +++++---- lib/src/browser_client.dart | 5 ++--- lib/src/client.dart | 21 +++++++++++---------- lib/src/io_client.dart | 11 ++++++----- lib/src/mock_client.dart | 18 +++++++++++------- lib/src/multipart_file.dart | 26 +++++++++++++++++--------- lib/src/request.dart | 31 ++++++++++++++++++------------- lib/src/response.dart | 17 ++++++++++------- lib/src/streamed_request.dart | 1 + lib/src/streamed_response.dart | 10 ++++++---- lib/src/utils.dart | 18 +++++++++++------- lib/testing.dart | 6 +++--- test/utils.dart | 1 + 17 files changed, 126 insertions(+), 94 deletions(-) diff --git a/README.md b/README.md index 679e609768..0d30875cee 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ persistent connection by using a [Client][] rather than making one-off requests. If you do this, make sure to close the client when you're done: ```dart -var client = new http.Client(); +var client = http.Client(); try { var uriResponse = await client.post('https://example.com/whatsit/create', body: {'name': 'doodle', 'color': 'blue'}); diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index 3fc7da9dbb..f19fb079a5 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -13,9 +13,10 @@ import 'request.dart'; import 'response.dart'; import 'streamed_response.dart'; -/// The abstract base class for an HTTP client. This is a mixin-style class; -/// subclasses only need to implement [send] and maybe [close], and then they -/// get various convenience methods for free. +/// The abstract base class for an HTTP client. +/// +/// This is a mixin-style class; subclasses only need to implement [send] and +/// maybe [close], and then they get various convenience methods for free. abstract class BaseClient implements Client { /// Sends an HTTP HEAD request with the given headers to the given URL, which /// can be a [Uri] or a [String]. @@ -189,9 +190,10 @@ abstract class BaseClient implements Client { throw ClientException('$message.', url); } - /// Closes the client and cleans up any resources associated with it. It's - /// important to close each client when it's done being used; failing to do so - /// can cause the Dart process to hang. + /// Closes the client and cleans up any resources associated with it. + /// + /// It's important to close each client when it's done being used; failing to + /// do so can cause the Dart process to hang. @override void close() {} } diff --git a/lib/src/base_request.dart b/lib/src/base_request.dart index 4c855888b0..544e436d4b 100644 --- a/lib/src/base_request.dart +++ b/lib/src/base_request.dart @@ -17,9 +17,10 @@ import 'utils.dart'; /// over the request properties. However, usually it's easier to use convenience /// methods like [get] or [BaseClient.get]. abstract class BaseRequest { - /// The HTTP method of the request. Most commonly "GET" or "POST", less - /// commonly "HEAD", "PUT", or "DELETE". Non-standard method names are also - /// supported. + /// The HTTP method of the request. + /// + /// Most commonly "GET" or "POST", less commonly "HEAD", "PUT", or "DELETE". + /// Non-standard method names are also supported. final String method; /// The URL to which the request will be sent. @@ -28,7 +29,7 @@ abstract class BaseRequest { /// The size of the request body, in bytes. /// /// This defaults to `null`, which indicates that the size of the request is - /// not known in advance. + /// not known in advance. May not be assigned a negative value. int get contentLength => _contentLength; int _contentLength; @@ -41,6 +42,7 @@ abstract class BaseRequest { } /// Whether a persistent connection should be maintained with the server. + /// /// Defaults to true. bool get persistentConnection => _persistentConnection; bool _persistentConnection = true; @@ -51,6 +53,7 @@ abstract class BaseRequest { } /// Whether the client should follow redirects while resolving this request. + /// /// Defaults to true. bool get followRedirects => _followRedirects; bool _followRedirects = true; @@ -61,6 +64,7 @@ abstract class BaseRequest { } /// The maximum number of redirects to follow when [followRedirects] is true. + /// /// If this number is exceeded the [BaseResponse] future will signal a /// [RedirectException]. Defaults to 5. int get maxRedirects => _maxRedirects; @@ -74,22 +78,21 @@ abstract class BaseRequest { // TODO(nweiz): automatically parse cookies from headers // TODO(nweiz): make this a HttpHeaders object - /// The headers for this request. final Map headers; - /// Whether the request has been finalized. + /// Whether [finalize] has been called. bool get finalized => _finalized; bool _finalized = false; - /// Creates a new HTTP request. BaseRequest(this.method, this.url) : headers = LinkedHashMap( equals: (key1, key2) => key1.toLowerCase() == key2.toLowerCase(), hashCode: (key) => key.toLowerCase().hashCode); - /// Finalizes the HTTP request in preparation for it being sent. This freezes - /// all mutable fields and returns a single-subscription [ByteStream] that - /// emits the body of the request. + /// Finalizes the HTTP request in preparation for it being sent. + /// + /// Freezes all mutable fields and returns a single-subscription [ByteStream] + /// that emits the body of the request. /// /// The base implementation of this returns null rather than a [ByteStream]; /// subclasses are responsible for creating the return value, which should be @@ -128,7 +131,7 @@ abstract class BaseRequest { } } - // Throws an error if this request has been finalized. + /// Throws an error if this request has been finalized. void _checkFinalized() { if (!finalized) return; throw StateError("Can't modify a finalized Request."); diff --git a/lib/src/base_response.dart b/lib/src/base_response.dart index 68e1a736e9..6e2fc13bff 100644 --- a/lib/src/base_response.dart +++ b/lib/src/base_response.dart @@ -12,7 +12,7 @@ abstract class BaseResponse { /// The (frozen) request that triggered this response. final BaseRequest request; - /// The status code of the response. + /// The HTTP status code for this response. final int statusCode; /// The reason phrase associated with the status code. @@ -26,16 +26,13 @@ abstract class BaseResponse { // TODO(nweiz): automatically parse cookies from headers // TODO(nweiz): make this a HttpHeaders object. - /// The headers for this response. final Map headers; - /// Whether this response is a redirect. final bool isRedirect; /// Whether the server requested that a persistent connection be maintained. final bool persistentConnection; - /// Creates a new HTTP response. BaseResponse(this.statusCode, {this.contentLength, this.request, diff --git a/lib/src/boundary_characters.dart b/lib/src/boundary_characters.dart index 5f7ab3868e..b647e40697 100644 --- a/lib/src/boundary_characters.dart +++ b/lib/src/boundary_characters.dart @@ -2,10 +2,11 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// All character codes that are valid in multipart boundaries. This is the -/// intersection of the characters allowed in the `bcharsnospace` production -/// defined in [RFC 2046][] and those allowed in the `token` production -/// defined in [RFC 1521][]. +/// All character codes that are valid in multipart boundaries. +/// +/// This is the intersection of the characters allowed in the `bcharsnospace` +/// production defined in [RFC 2046][] and those allowed in the `token` +/// production defined in [RFC 1521][]. /// /// [RFC 2046]: http://tools.ietf.org/html/rfc2046#section-5.1.1. /// [RFC 1521]: https://tools.ietf.org/html/rfc1521#section-4 diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index 602523ce69..597c7881f6 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -14,6 +14,8 @@ import 'byte_stream.dart'; import 'exception.dart'; import 'streamed_response.dart'; +/// Create a [BrowserClient]. +/// /// Used from conditional imports, matches the definition in `client_stub.dart`. BaseClient createClient() => BrowserClient(); @@ -31,9 +33,6 @@ class BrowserClient extends BaseClient { /// These are aborted if the client is closed. final _xhrs = {}; - /// Creates a new HTTP client. - BrowserClient(); - /// Whether to send credentials such as cookies or authorization headers for /// cross-site requests. /// diff --git a/lib/src/client.dart b/lib/src/client.dart index 78ea0a18a8..d877ce5413 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -18,20 +18,20 @@ import 'response.dart'; import 'streamed_response.dart'; /// The interface for HTTP clients that take care of maintaining persistent -/// connections across multiple requests to the same server. If you only need to -/// send a single request, it's usually easier to use [head], [get], [post], -/// [put], [patch], or [delete] instead. +/// connections across multiple requests to the same server. +/// +/// If you only need to send a single request, it's usually easier to use +/// [head], [get], [post], [put], [patch], or [delete] instead. /// /// When creating an HTTP client class with additional functionality, you must /// extend [BaseClient] rather than [Client]. In most cases, you can wrap /// another instance of [Client] and add functionality on top of that. This /// allows all classes implementing [Client] to be mutually composable. abstract class Client { - /// Creates a new client. + /// Creates a new platform appropriate client. /// - /// Currently this will create an `IOClient` if `dart:io` is available and - /// a `BrowserClient` if `dart:html` is available, otherwise it will throw - /// an unsupported error. + /// Creates an `IOClient` if `dart:io` is available and a `BrowserClient` if + /// `dart:html` is available, otherwise it will throw an unsupported error. factory Client() => createClient(); /// Sends an HTTP HEAD request with the given headers to the given URL, which @@ -140,8 +140,9 @@ abstract class Client { /// Sends an HTTP request and asynchronously returns the response. Future send(BaseRequest request); - /// Closes the client and cleans up any resources associated with it. It's - /// important to close each client when it's done being used; failing to do so - /// can cause the Dart process to hang. + /// Closes the client and cleans up any resources associated with it. + /// + /// It's important to close each client when it's done being used; failing to + /// do so can cause the Dart process to hang. void close(); } diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index f38a9c4829..f19594f475 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -12,17 +12,16 @@ import 'base_request.dart'; import 'exception.dart'; import 'streamed_response.dart'; +/// Create an [IOClient]. +/// /// Used from conditional imports, matches the definition in `client_stub.dart`. BaseClient createClient() => IOClient(); /// A `dart:io`-based HTTP client. -/// -/// This is the default client when running on the command line. class IOClient extends BaseClient { /// The underlying `dart:io` HTTP client. HttpClient _inner; - /// Creates a new HTTP client. IOClient([HttpClient inner]) : _inner = inner ?? HttpClient(); /// Sends an HTTP request and asynchronously returns the response. @@ -64,8 +63,10 @@ class IOClient extends BaseClient { } } - /// Closes the client. This terminates all active connections. If a client - /// remains unclosed, the Dart process may not terminate. + /// Closes the client. + /// + /// Terminates all active connections. If a client remains unclosed, the Dart + /// process may not terminate. @override void close() { if (_inner != null) { diff --git a/lib/src/mock_client.dart b/lib/src/mock_client.dart index 9350b1a682..6dc3a619a8 100644 --- a/lib/src/mock_client.dart +++ b/lib/src/mock_client.dart @@ -15,9 +15,11 @@ import 'streamed_response.dart'; // server APIs, MockClient should conform to it. /// A mock HTTP client designed for use when testing code that uses -/// [BaseClient]. This client allows you to define a handler callback for all -/// requests that are made through it so that you can mock a server without -/// having to send real HTTP requests. +/// [BaseClient]. +/// +/// This client allows you to define a handler callback for all requests that +/// are made through it so that you can mock a server without having to send +/// real HTTP requests. class MockClient extends BaseClient { /// The handler for receiving [StreamedRequest]s and sending /// [StreamedResponse]s. @@ -66,7 +68,6 @@ class MockClient extends BaseClient { }); }); - /// Sends a request. @override Future send(BaseRequest request) async { var bodyStream = request.finalize(); @@ -75,10 +76,13 @@ class MockClient extends BaseClient { } /// A handler function that receives [StreamedRequest]s and sends -/// [StreamedResponse]s. Note that [request] will be finalized. +/// [StreamedResponse]s. +/// +/// Note that [request] will be finalized. typedef MockClientStreamHandler = Future Function( BaseRequest request, ByteStream bodyStream); -/// A handler function that receives [Request]s and sends [Response]s. Note that -/// [request] will be finalized. +/// A handler function that receives [Request]s and sends [Response]s. +/// +/// Note that [request] will be finalized. typedef MockClientHandler = Future Function(Request request); diff --git a/lib/src/multipart_file.dart b/lib/src/multipart_file.dart index c063939d71..541664aaec 100644 --- a/lib/src/multipart_file.dart +++ b/lib/src/multipart_file.dart @@ -14,20 +14,27 @@ import 'multipart_file_stub.dart' if (dart.library.io) 'multipart_file_io.dart'; import 'utils.dart'; -/// A file to be uploaded as part of a [MultipartRequest]. This doesn't need to -/// correspond to a physical file. +/// A file to be uploaded as part of a [MultipartRequest]. +/// +/// This doesn't need to correspond to a physical file. class MultipartFile { /// The name of the form field for the file. final String field; - /// The size of the file in bytes. This must be known in advance, even if this - /// file is created from a [ByteStream]. + /// The size of the file in bytes. + /// + /// This must be known in advance, even if this file is created from a + /// [ByteStream]. final int length; - /// The basename of the file. May be null. + /// The basename of the file. + /// + /// May be null. final String filename; - /// The content-type of the file. Defaults to `application/octet-stream`. + /// The content-type of the file. + /// + /// Defaults to `application/octet-stream`. final MediaType contentType; /// The stream that will emit the file's contents. @@ -37,9 +44,10 @@ class MultipartFile { bool get isFinalized => _isFinalized; bool _isFinalized = false; - /// Creates a new [MultipartFile] from a chunked [Stream] of bytes. The length - /// of the file in bytes must be known in advance. If it's not, read the data - /// from the stream and use [MultipartFile.fromBytes] instead. + /// Creates a new [MultipartFile] from a chunked [Stream] of bytes. + /// + /// The length of the file in bytes must be known in advance. If it's not, + /// read the data from the stream and use [MultipartFile.fromBytes] instead. /// /// [contentType] currently defaults to `application/octet-stream`, but in the /// future may be inferred from [filename]. diff --git a/lib/src/request.dart b/lib/src/request.dart index 0c6910d1c3..d882d88cf1 100644 --- a/lib/src/request.dart +++ b/lib/src/request.dart @@ -28,12 +28,15 @@ class Request extends BaseRequest { } /// The default encoding to use when converting between [bodyBytes] and - /// [body]. This is only used if [encoding] hasn't been manually set and if - /// the content-type header has no encoding information. + /// [body]. + /// + /// This is only used if [encoding] hasn't been manually set and if the + /// content-type header has no encoding information. Encoding _defaultEncoding; - /// The encoding used for the request. This encoding is used when converting - /// between [bodyBytes] and [body]. + /// The encoding used for the request. + /// + /// This encoding is used when converting between [bodyBytes] and [body]. /// /// If the request has a `Content-Type` header and that header has a `charset` /// parameter, that parameter's value is used as the encoding. Otherwise, if @@ -62,8 +65,9 @@ class Request extends BaseRequest { } // TODO(nweiz): make this return a read-only view - /// The bytes comprising the body of the request. This is converted to and - /// from [body] using [encoding]. + /// The bytes comprising the body of the request. + /// + /// This is converted to and from [body] using [encoding]. /// /// This list should only be set, not be modified in place. Uint8List get bodyBytes => _bodyBytes; @@ -74,8 +78,9 @@ class Request extends BaseRequest { _bodyBytes = toUint8List(value); } - /// The body of the request as a string. This is converted to and from - /// [bodyBytes] using [encoding]. + /// The body of the request as a string. + /// + /// This is converted to and from [bodyBytes] using [encoding]. /// /// When this is set, if the request does not yet have a `Content-Type` /// header, one will be added with the type `text/plain`. Then the `charset` @@ -94,8 +99,10 @@ class Request extends BaseRequest { } /// The form-encoded fields in the body of the request as a map from field - /// names to values. The form-encoded body is converted to and from - /// [bodyBytes] using [encoding] (in the same way as [body]). + /// names to values. + /// + /// The form-encoded body is converted to and from [bodyBytes] using + /// [encoding] (in the same way as [body]). /// /// If the request doesn't have a `Content-Type` header of /// `application/x-www-form-urlencoded`, reading this will throw a @@ -130,7 +137,6 @@ class Request extends BaseRequest { body = mapToQuery(fields, encoding: encoding); } - /// Creates a new HTTP request. Request(String method, Uri url) : _defaultEncoding = utf8, _bodyBytes = Uint8List(0), @@ -144,8 +150,7 @@ class Request extends BaseRequest { return ByteStream.fromBytes(bodyBytes); } - /// The `Content-Type` header of the request (if it exists) as a - /// [MediaType]. + /// The `Content-Type` header of the request (if it exists) as a [MediaType]. MediaType get _contentType { var contentType = headers['content-type']; if (contentType == null) return null; diff --git a/lib/src/response.dart b/lib/src/response.dart index 6d49b8a6bc..1e4e4cdcdb 100644 --- a/lib/src/response.dart +++ b/lib/src/response.dart @@ -18,10 +18,12 @@ class Response extends BaseResponse { /// The bytes comprising the body of this response. final Uint8List bodyBytes; - /// The body of the response as a string. This is converted from [bodyBytes] - /// using the `charset` parameter of the `Content-Type` header field, if - /// available. If it's unavailable or if the encoding name is unknown, - /// [latin1] is used by default, as per [RFC 2616][]. + /// The body of the response as a string. + /// + /// This is converted from [bodyBytes] using the `charset` parameter of the + /// `Content-Type` header field, if available. If it's unavailable or if the + /// encoding name is unknown, [latin1] is used by default, as per + /// [RFC 2616][]. /// /// [RFC 2616]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html String get body => _encodingForHeaders(headers).decode(bodyBytes); @@ -70,9 +72,10 @@ class Response extends BaseResponse { } } -/// Returns the encoding to use for a response with the given headers. This -/// defaults to [latin1] if the headers don't specify a charset or -/// if that charset is unknown. +/// Returns the encoding to use for a response with the given headers. +/// +/// Defaults to [latin1] if the headers don't specify a charset or if that +/// charset is unknown. Encoding _encodingForHeaders(Map headers) => encodingForCharset(_contentTypeForHeaders(headers).parameters['charset']); diff --git a/lib/src/streamed_request.dart b/lib/src/streamed_request.dart index 9465e13ad7..2beab18a65 100644 --- a/lib/src/streamed_request.dart +++ b/lib/src/streamed_request.dart @@ -16,6 +16,7 @@ import 'byte_stream.dart'; /// [StreamedRequest.sink], and when the sink is closed the request will end. class StreamedRequest extends BaseRequest { /// The sink to which to write data that will be sent as the request body. + /// /// This may be safely written to before the request is sent; the data will be /// buffered. /// diff --git a/lib/src/streamed_response.dart b/lib/src/streamed_response.dart index fc10470013..b5b073f118 100644 --- a/lib/src/streamed_response.dart +++ b/lib/src/streamed_response.dart @@ -12,12 +12,14 @@ import 'utils.dart'; /// An HTTP response where the response body is received asynchronously after /// the headers have been received. class StreamedResponse extends BaseResponse { - /// The stream from which the response body data can be read. This should - /// always be a single-subscription stream. + /// The stream from which the response body data can be read. + /// + /// This should always be a single-subscription stream. final ByteStream stream; - /// Creates a new streaming response. [stream] should be a single-subscription - /// stream. + /// Creates a new streaming response. + /// + /// [stream] should be a single-subscription stream. StreamedResponse(Stream> stream, int statusCode, {int contentLength, BaseRequest request, diff --git a/lib/src/utils.dart b/lib/src/utils.dart index dcdecbd9d8..58c6fd2fb2 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -22,6 +22,7 @@ String mapToQuery(Map map, {Encoding encoding}) { } /// Like [String.split], but only splits on the first occurrence of the pattern. +/// /// This will always return an array of two elements or fewer. /// /// split1("foo,bar,baz", ","); //=> ["foo", "bar,baz"] @@ -38,16 +39,20 @@ List split1(String toSplit, String pattern) { ]; } -/// Returns the [Encoding] that corresponds to [charset]. Returns [fallback] if -/// [charset] is null or if no [Encoding] was found that corresponds to -/// [charset]. +/// Returns the [Encoding] that corresponds to [charset]. +/// +/// Returns [fallback] if [charset] is null or if no [Encoding] was found that +/// corresponds to [charset]. Encoding encodingForCharset(String charset, [Encoding fallback = latin1]) { if (charset == null) return fallback; return Encoding.getByName(charset) ?? fallback; } -/// Returns the [Encoding] that corresponds to [charset]. Throws a -/// [FormatException] if no [Encoding] was found that corresponds to [charset]. +/// Returns the [Encoding] that corresponds to [charset]. +/// +/// Throws a [FormatException] if no [Encoding] was found that corresponds to +/// [charset]. +/// /// [charset] may not be null. Encoding requiredEncodingForCharset(String charset) => Encoding.getByName(charset) ?? @@ -73,14 +78,13 @@ Uint8List toUint8List(List input) { return Uint8List.fromList(input); } -/// If [stream] is already a [ByteStream], returns it. Otherwise, wraps it in a -/// [ByteStream]. ByteStream toByteStream(Stream> stream) { if (stream is ByteStream) return stream; return ByteStream(stream); } /// Calls [onDone] once [stream] (a single-subscription [Stream]) is finished. +/// /// The return value, also a single-subscription [Stream] should be used in /// place of [stream] after calling this method. Stream onDone(Stream stream, void onDone()) => diff --git a/lib/testing.dart b/lib/testing.dart index d960f6e1e8..d5c13b6c19 100644 --- a/lib/testing.dart +++ b/lib/testing.dart @@ -11,11 +11,11 @@ /// import 'dart:convert'; /// import 'package:http/testing.dart'; /// -/// var client = new MockClient((request) async { +/// var client = MockClient((request) async { /// if (request.url.path != "/data.json") { -/// return new Response("", 404); +/// return Response("", 404); /// } -/// return new Response( +/// return Response( /// json.encode({ /// 'numbers': [1, 4, 15, 19, 214] /// }), diff --git a/test/utils.dart b/test/utils.dart index 8e78cbea86..f37f9a159e 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -70,6 +70,7 @@ class _Parse extends Matcher { } /// A matcher that validates the body of a multipart request after finalization. +/// /// The string "{{boundary}}" in [pattern] will be replaced by the boundary /// string for the request, and LF newlines will be replaced with CRLF. /// Indentation will be normalized. From 4c3af30054ac520a66f13bc2c535d2c60c32b49d Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 13 Sep 2019 11:19:29 -0700 Subject: [PATCH 048/448] Clean up some unused or underused utilities (#316) - Remove methods that have no calls. - Replace a call to `writeStreamToSink` with the built in `addStream`. - Replace a legacy style predicate matcher with a `TypeMatcher.having`. --- lib/src/multipart_request.dart | 5 ++- lib/src/utils.dart | 66 ---------------------------------- test/utils.dart | 12 ++----- 3 files changed, 4 insertions(+), 79 deletions(-) diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index 0f15451e33..e66e2d5d7e 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -109,11 +109,10 @@ class MultipartRequest extends BaseRequest { writeLine(); }); - Future.forEach(_files, (file) { + Future.forEach(_files, (MultipartFile file) { writeAscii('--$boundary\r\n'); writeAscii(_headerForFile(file)); - return writeStreamToSink(file.finalize(), controller) - .then((_) => writeLine()); + return controller.addStream(file.finalize()).then((_) => writeLine()); }).then((_) { // TODO(nweiz): pass any errors propagated through this future on to // the stream. See issue 3657. diff --git a/lib/src/utils.dart b/lib/src/utils.dart index 58c6fd2fb2..f24994ee57 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -21,24 +21,6 @@ String mapToQuery(Map map, {Encoding encoding}) { return pairs.map((pair) => '${pair[0]}=${pair[1]}').join('&'); } -/// Like [String.split], but only splits on the first occurrence of the pattern. -/// -/// This will always return an array of two elements or fewer. -/// -/// split1("foo,bar,baz", ","); //=> ["foo", "bar,baz"] -/// split1("foo", ","); //=> ["foo"] -/// split1("", ","); //=> [] -List split1(String toSplit, String pattern) { - if (toSplit.isEmpty) return []; - - var index = toSplit.indexOf(pattern); - if (index == -1) return [toSplit]; - return [ - toSplit.substring(0, index), - toSplit.substring(index + pattern.length) - ]; -} - /// Returns the [Encoding] that corresponds to [charset]. /// /// Returns [fallback] if [charset] is null or if no [Encoding] was found that @@ -92,51 +74,3 @@ Stream onDone(Stream stream, void onDone()) => sink.close(); onDone(); })); - -// TODO(nweiz): remove this when issue 7786 is fixed. -/// Pipes all data and errors from [stream] into [sink]. When [stream] is done, -/// [sink] is closed and the returned [Future] is completed. -Future store(Stream stream, EventSink sink) { - var completer = Completer(); - stream.listen(sink.add, onError: sink.addError, onDone: () { - sink.close(); - completer.complete(); - }); - return completer.future; -} - -/// Pipes all data and errors from [stream] into [sink]. Completes [Future] once -/// [stream] is done. Unlike [store], [sink] remains open after [stream] is -/// done. -Future writeStreamToSink(Stream stream, EventSink sink) { - var completer = Completer(); - stream.listen(sink.add, - onError: sink.addError, onDone: () => completer.complete()); - return completer.future; -} - -/// A pair of values. -class Pair { - E first; - F last; - - Pair(this.first, this.last); - - @override - String toString() => '($first, $last)'; - - @override - bool operator ==(other) { - if (other is! Pair) return false; - return other.first == first && other.last == last; - } - - @override - int get hashCode => first.hashCode ^ last.hashCode; -} - -/// Configures [future] so that its result (success or exception) is passed on -/// to [completer]. -void chainToCompleter(Future future, Completer completer) { - future.then(completer.complete, onError: completer.completeError); -} diff --git a/test/utils.dart b/test/utils.dart index f37f9a159e..44cf12d49a 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -106,17 +106,9 @@ class _BodyMatches extends Matcher { } } -/// A matcher that matches a [http.ClientException] with the given [message]. -/// -/// [message] can be a String or a [Matcher]. -Matcher isClientException(message) => predicate((error) { - expect(error, TypeMatcher()); - expect(error.message, message); - return true; - }); - /// A matcher that matches function or future that throws a /// [http.ClientException] with the given [message]. /// /// [message] can be a String or a [Matcher]. -Matcher throwsClientException(message) => throwsA(isClientException(message)); +Matcher throwsClientException(message) => throwsA( + isA().having((e) => e.message, 'message', message)); From 33a2696dc50a13650dd4a91a38c5d3cc16a5cd39 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 13 Sep 2019 12:43:45 -0700 Subject: [PATCH 049/448] Fix a broken test for redirects (#317) This test added a `.catchError` callback with some expects, but the `Future` was completing normally so the callback and expects never ran. The reason the response came back successfully was that the IO client does not consider a `302` to be a redirect when the method is `'POST'`. https://github.com/dart-lang/sdk/blob/ed9e89ea388e4bc0142bf6e967d4ca11999bdfdc/sdk/lib/_http/http_impl.dart#L355-L365 - Refactor to async/await to clean up the noise of `.then`, `.whenComplete`, and `.catchError` and make the logic easier to follow. - Switch the request type to `'GET'` so that the exception occurs. - Move server starting and stopping to a `setUp` and `tearDown`. - Fix the expectation to look for the wrapped `ClientException` instead of the exception thrown by the IO client. We also lose the underlying exception and have only the message so we can't check the length of the `redirects` field. - Remove the now unused test utility to get a matcher on the old exception type. --- test/io/request_test.dart | 87 +++++++++++++++++---------------------- test/io/utils.dart | 8 ---- 2 files changed, 37 insertions(+), 58 deletions(-) diff --git a/test/io/request_test.dart b/test/io/request_test.dart index f689dce9e8..a6bb35d757 100644 --- a/test/io/request_test.dart +++ b/test/io/request_test.dart @@ -10,61 +10,48 @@ import 'package:test/test.dart'; import 'utils.dart'; void main() { - test('.send', () { - expect( - startServer().then((_) { - var request = http.Request('POST', serverUrl) - ..body = 'hello' - ..headers['User-Agent'] = 'Dart'; + setUp(startServer); - expect( - request.send().then((response) { - expect(response.statusCode, equals(200)); - return response.stream.bytesToString(); - }).whenComplete(stopServer), - completion(parse(equals({ - 'method': 'POST', - 'path': '/', - 'headers': { - 'content-type': ['text/plain; charset=utf-8'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'content-length': ['5'] - }, - 'body': 'hello' - })))); - }), - completes); - }); + tearDown(stopServer); + + test('send happy case', () async { + final request = http.Request('GET', serverUrl) + ..body = 'hello' + ..headers['User-Agent'] = 'Dart'; + + final response = await request.send(); - test('#followRedirects', () { + expect(response.statusCode, equals(200)); + final bytesString = await response.stream.bytesToString(); expect( - startServer().then((_) { - var request = http.Request('POST', serverUrl.resolve('/redirect')) - ..followRedirects = false; - var future = request.send().then((response) { - expect(response.statusCode, equals(302)); - }); - expect( - future.catchError((_) {}).then((_) => stopServer()), completes); - expect(future, completes); - }), - completes); + bytesString, + parse(equals({ + 'method': 'GET', + 'path': '/', + 'headers': { + 'content-type': ['text/plain; charset=utf-8'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'content-length': ['5'] + }, + 'body': 'hello', + }))); + }); + + test('without redirects', () async { + final request = http.Request('GET', serverUrl.resolve('/redirect')) + ..followRedirects = false; + final response = await request.send(); + + expect(response.statusCode, equals(302)); }); - test('#maxRedirects', () { + test('exceeding max redirects', () async { + final request = http.Request('GET', serverUrl.resolve('/loop?1')) + ..maxRedirects = 2; expect( - startServer().then((_) { - var request = http.Request('POST', serverUrl.resolve('/loop?1')) - ..maxRedirects = 2; - var future = request.send().catchError((error) { - expect(error, isRedirectLimitExceededException); - expect(error.redirects.length, equals(2)); - }); - expect( - future.catchError((_) {}).then((_) => stopServer()), completes); - expect(future, completes); - }), - completes); + request.send(), + throwsA(isA() + .having((e) => e.message, 'message', 'Redirect limit exceeded'))); }); } diff --git a/test/io/utils.dart b/test/io/utils.dart index 857b0236fa..7e94396026 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -119,14 +119,6 @@ void stopServer() { /// A matcher for functions that throw HttpException. Matcher get throwsClientException => throwsA(TypeMatcher()); -/// A matcher for RedirectLimitExceededExceptions. -final isRedirectLimitExceededException = const TypeMatcher() - .having((e) => e.message, 'message', 'Redirect limit exceeded'); - -/// A matcher for functions that throw RedirectLimitExceededException. -final Matcher throwsRedirectLimitExceededException = - throwsA(isRedirectLimitExceededException); - /// A matcher for functions that throw SocketException. final Matcher throwsSocketException = throwsA(const TypeMatcher()); From 7ad02251c76c47140deeb366c1e9cb7c10d577a8 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 13 Sep 2019 14:44:02 -0700 Subject: [PATCH 050/448] Add a test for a successful redirect (#318) --- test/io/request_test.dart | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/io/request_test.dart b/test/io/request_test.dart index a6bb35d757..97555f9782 100644 --- a/test/io/request_test.dart +++ b/test/io/request_test.dart @@ -46,6 +46,15 @@ void main() { expect(response.statusCode, equals(302)); }); + test('with redirects', () async { + final request = http.Request('GET', serverUrl.resolve('/redirect')); + final response = await request.send(); + + expect(response.statusCode, equals(200)); + final bytesString = await response.stream.bytesToString(); + expect(bytesString, parse(containsPair('path', '/'))); + }); + test('exceeding max redirects', () async { final request = http.Request('GET', serverUrl.resolve('/loop?1')) ..maxRedirects = 2; From be908b581d01969600b2634731040abdabd32cb4 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 13 Sep 2019 14:52:42 -0700 Subject: [PATCH 051/448] Drop an obsolete hack for async as argument name (#319) This was working around a bug where in an `async` method you couldn't use `async` as a named argument in a call. Bump min SDK to `2.4.0`, it fixes the analyzer bug. --- .travis.yml | 2 +- lib/src/browser_client.dart | 8 +------- pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7acc0b132b..f0dd98daaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: dart dart: - dev - - 2.2.0 + - 2.4.0 dart_task: - test: --platform vm diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index 597c7881f6..76c613df09 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -45,8 +45,8 @@ class BrowserClient extends BaseClient { var bytes = await request.finalize().toBytes(); var xhr = HttpRequest(); _xhrs.add(xhr); - _openHttpRequest(xhr, request.method, request.url.toString(), asynch: true); xhr + ..open(request.method, '${request.url}', async: true) ..responseType = 'blob' ..withCredentials = withCredentials; request.headers.forEach(xhr.setRequestHeader); @@ -93,12 +93,6 @@ class BrowserClient extends BaseClient { } } - // TODO(nweiz): Remove this when sdk#24637 is fixed. - void _openHttpRequest(HttpRequest request, String method, String url, - {bool asynch, String user, String password}) { - request.open(method, url, async: asynch, user: user, password: password); - } - /// Closes the client. /// /// This terminates all active requests. diff --git a/pubspec.yaml b/pubspec.yaml index 17703eb1b5..270e395487 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. environment: - sdk: ">=2.2.0 <3.0.0" + sdk: ">=2.4.0 <3.0.0" dependencies: async: ">=1.10.0 <3.0.0" From 2cda015e18aec51263eb157b02fda052f3f00aee Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 16 Sep 2019 14:18:16 -0700 Subject: [PATCH 052/448] Add missing await in doc (#323) `http.MultipartFile.fromPath` returns a `Future`. --- lib/src/multipart_request.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index e66e2d5d7e..79a971fc22 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -25,7 +25,7 @@ final _newlineRegExp = RegExp(r'\r\n|\r|\n'); /// var uri = Uri.parse('https://example.com/create'); /// var request = http.MultipartRequest('POST', uri) /// ..fields['user'] = 'nweiz@google.com' -/// ..files.add(http.MultipartFile.fromPath( +/// ..files.add(await http.MultipartFile.fromPath( /// 'package', 'build/package.tar.gz', /// contentType: MediaType('application', 'x-tar'))); /// var response = await request.send(); From c21a3ac60f79ce35c960f76ead88f64a24685596 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 16 Sep 2019 16:33:46 -0700 Subject: [PATCH 053/448] Refactor tests to async/await (#322) --- test/html/client_test.dart | 18 +- test/html/streamed_request_test.dart | 19 +- test/io/client_test.dart | 168 +++--- test/io/http_test.dart | 867 ++++++++++++--------------- test/io/multipart_test.dart | 22 +- test/io/streamed_request_test.dart | 65 +- test/io/utils.dart | 104 ++-- test/mock_client_test.dart | 52 +- test/response_test.dart | 26 +- test/utils.dart | 27 +- 10 files changed, 605 insertions(+), 763 deletions(-) diff --git a/test/html/client_test.dart b/test/html/client_test.dart index cd55d1d4a8..ffbbff65cf 100644 --- a/test/html/client_test.dart +++ b/test/html/client_test.dart @@ -11,18 +11,20 @@ import 'package:test/test.dart'; import 'utils.dart'; void main() { - test('#send a StreamedRequest', () { + test('#send a StreamedRequest', () async { var client = BrowserClient(); var request = http.StreamedRequest('POST', echoUrl); - expect( - client.send(request).then((response) { - return response.stream.bytesToString(); - }).whenComplete(client.close), - completion(equals('{"hello": "world"}'))); + var responseFuture = client.send(request); + request.sink + ..add('{"hello": "world"}'.codeUnits) + ..close(); - request.sink.add('{"hello": "world"}'.codeUnits); - request.sink.close(); + var response = await responseFuture; + var bytesString = await response.stream.bytesToString(); + client.close(); + + expect(bytesString, equals('{"hello": "world"}')); }, skip: 'Need to fix server tests for browser'); test('#send with an invalid URL', () { diff --git a/test/html/streamed_request_test.dart b/test/html/streamed_request_test.dart index b2e7790950..22130840df 100644 --- a/test/html/streamed_request_test.dart +++ b/test/html/streamed_request_test.dart @@ -12,27 +12,26 @@ import 'utils.dart'; void main() { group('contentLength', () { - test("works when it's set", () { + test("works when it's set", () async { var request = http.StreamedRequest('POST', echoUrl) ..contentLength = 10 ..sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) ..sink.close(); - return BrowserClient().send(request).then((response) { - expect(response.stream.toBytes(), - completion(equals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))); - }); + final response = await BrowserClient().send(request); + + expect(await response.stream.toBytes(), + equals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])); }); - test("works when it's not set", () { + test("works when it's not set", () async { var request = http.StreamedRequest('POST', echoUrl); request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); request.sink.close(); - return BrowserClient().send(request).then((response) { - expect(response.stream.toBytes(), - completion(equals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]))); - }); + final response = await BrowserClient().send(request); + expect(await response.stream.toBytes(), + equals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])); }); }, skip: 'Need to fix server tests for browser'); } diff --git a/test/io/client_test.dart b/test/io/client_test.dart index a77a026ec1..f8c83f76a8 100644 --- a/test/io/client_test.dart +++ b/test/io/client_test.dart @@ -13,99 +13,97 @@ import 'package:test/test.dart'; import 'utils.dart'; void main() { + setUp(startServer); + tearDown(stopServer); - test('#send a StreamedRequest', () { + test('#send a StreamedRequest', () async { + var client = http.Client(); + var request = http.StreamedRequest('POST', serverUrl) + ..headers[HttpHeaders.contentTypeHeader] = + 'application/json; charset=utf-8' + ..headers[HttpHeaders.userAgentHeader] = 'Dart'; + + var responseFuture = client.send(request); + request + ..sink.add('{"hello": "world"}'.codeUnits) + ..sink.close(); + + var response = await responseFuture; + + expect(response.request, equals(request)); + expect(response.statusCode, equals(200)); + expect(response.headers['single'], equals('value')); + // dart:io internally normalizes outgoing headers so that they never + // have multiple headers with the same name, so there's no way to test + // whether we handle that case correctly. + + var bytesString = await response.stream.bytesToString(); + client.close(); expect( - startServer().then((_) { - var client = http.Client(); - var request = http.StreamedRequest('POST', serverUrl); - request.headers[HttpHeaders.contentTypeHeader] = - 'application/json; charset=utf-8'; - request.headers[HttpHeaders.userAgentHeader] = 'Dart'; - - expect( - client.send(request).then((response) { - expect(response.request, equals(request)); - expect(response.statusCode, equals(200)); - expect(response.headers['single'], equals('value')); - // dart:io internally normalizes outgoing headers so that they never - // have multiple headers with the same name, so there's no way to test - // whether we handle that case correctly. - - return response.stream.bytesToString(); - }).whenComplete(client.close), - completion(parse(equals({ - 'method': 'POST', - 'path': '/', - 'headers': { - 'content-type': ['application/json; charset=utf-8'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'transfer-encoding': ['chunked'] - }, - 'body': '{"hello": "world"}' - })))); - - request.sink.add('{"hello": "world"}'.codeUnits); - request.sink.close(); - }), - completes); + bytesString, + parse(equals({ + 'method': 'POST', + 'path': '/', + 'headers': { + 'content-type': ['application/json; charset=utf-8'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'transfer-encoding': ['chunked'] + }, + 'body': '{"hello": "world"}' + }))); }); - test('#send a StreamedRequest with a custom client', () { + test('#send a StreamedRequest with a custom client', () async { + var ioClient = HttpClient(); + var client = http_io.IOClient(ioClient); + var request = http.StreamedRequest('POST', serverUrl) + ..headers[HttpHeaders.contentTypeHeader] = + 'application/json; charset=utf-8' + ..headers[HttpHeaders.userAgentHeader] = 'Dart'; + + var responseFuture = client.send(request); + request + ..sink.add('{"hello": "world"}'.codeUnits) + ..sink.close(); + + var response = await responseFuture; + + expect(response.request, equals(request)); + expect(response.statusCode, equals(200)); + expect(response.headers['single'], equals('value')); + // dart:io internally normalizes outgoing headers so that they never + // have multiple headers with the same name, so there's no way to test + // whether we handle that case correctly. + + var bytesString = await response.stream.bytesToString(); + client.close(); expect( - startServer().then((_) { - var ioClient = HttpClient(); - var client = http_io.IOClient(ioClient); - var request = http.StreamedRequest('POST', serverUrl); - request.headers[HttpHeaders.contentTypeHeader] = - 'application/json; charset=utf-8'; - request.headers[HttpHeaders.userAgentHeader] = 'Dart'; - - expect( - client.send(request).then((response) { - expect(response.request, equals(request)); - expect(response.statusCode, equals(200)); - expect(response.headers['single'], equals('value')); - // dart:io internally normalizes outgoing headers so that they never - // have multiple headers with the same name, so there's no way to test - // whether we handle that case correctly. - - return response.stream.bytesToString(); - }).whenComplete(client.close), - completion(parse(equals({ - 'method': 'POST', - 'path': '/', - 'headers': { - 'content-type': ['application/json; charset=utf-8'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'transfer-encoding': ['chunked'] - }, - 'body': '{"hello": "world"}' - })))); - - request.sink.add('{"hello": "world"}'.codeUnits); - request.sink.close(); - }), - completes); + bytesString, + parse(equals({ + 'method': 'POST', + 'path': '/', + 'headers': { + 'content-type': ['application/json; charset=utf-8'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'transfer-encoding': ['chunked'] + }, + 'body': '{"hello": "world"}' + }))); }); test('#send with an invalid URL', () { - expect( - startServer().then((_) { - var client = http.Client(); - var url = Uri.parse('http://http.invalid'); - var request = http.StreamedRequest('POST', url); - request.headers[HttpHeaders.contentTypeHeader] = - 'application/json; charset=utf-8'; - - expect(client.send(request), throwsSocketException); - - request.sink.add('{"hello": "world"}'.codeUnits); - request.sink.close(); - }), - completes); + var client = http.Client(); + var url = Uri.parse('http://http.invalid'); + var request = http.StreamedRequest('POST', url); + request.headers[HttpHeaders.contentTypeHeader] = + 'application/json; charset=utf-8'; + + expect(client.send(request), throwsSocketException); + + request.sink.add('{"hello": "world"}'.codeUnits); + request.sink.close(); }); } diff --git a/test/io/http_test.dart b/test/io/http_test.dart index 41656a41a9..ac96010c9c 100644 --- a/test/io/http_test.dart +++ b/test/io/http_test.dart @@ -11,559 +11,434 @@ import 'utils.dart'; main() { group('http.', () { + setUp(startServer); + tearDown(stopServer); - test('head', () { - expect( - startServer().then((_) { - expect( - http.head(serverUrl).then((response) { - expect(response.statusCode, equals(200)); - expect(response.body, equals('')); - }), - completes); - }), - completes); + test('head', () async { + var response = await http.head(serverUrl); + expect(response.statusCode, equals(200)); + expect(response.body, equals('')); }); - test('get', () { + test('get', () async { + var response = await http.get(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http.get(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }).then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'GET', - 'path': '/', - 'headers': { - 'content-length': ['0'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'GET', + 'path': '/', + 'headers': { + 'content-length': ['0'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + }, + }))); }); - test('post', () { + test('post', () async { + var response = await http.post(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'Content-Type': 'text/plain', + 'User-Agent': 'Dart' + }); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http.post(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'Content-Type': 'text/plain', - 'User-Agent': 'Dart' - }).then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'POST', - 'path': '/', - 'headers': { - 'accept-encoding': ['gzip'], - 'content-length': ['0'], - 'content-type': ['text/plain'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - } - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'POST', + 'path': '/', + 'headers': { + 'accept-encoding': ['gzip'], + 'content-length': ['0'], + 'content-type': ['text/plain'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + } + }))); }); - test('post with string', () { + test('post with string', () async { + var response = await http.post(serverUrl, + headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }, + body: 'request body'); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http - .post(serverUrl, - headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }, - body: 'request body') - .then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'POST', - 'path': '/', - 'headers': { - 'content-type': ['text/plain; charset=utf-8'], - 'content-length': ['12'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - 'body': 'request body' - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'POST', + 'path': '/', + 'headers': { + 'content-type': ['text/plain; charset=utf-8'], + 'content-length': ['12'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + }, + 'body': 'request body' + }))); }); - test('post with bytes', () { + test('post with bytes', () async { + var response = await http.post(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }, body: [ + 104, + 101, + 108, + 108, + 111 + ]); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http.post(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }, body: [ - 104, - 101, - 108, - 108, - 111 - ]).then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'POST', - 'path': '/', - 'headers': { - 'content-length': ['5'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - 'body': [104, 101, 108, 108, 111] - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'POST', + 'path': '/', + 'headers': { + 'content-length': ['5'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + }, + 'body': [104, 101, 108, 108, 111] + }))); }); - test('post with fields', () { + test('post with fields', () async { + var response = await http.post(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }, body: { + 'some-field': 'value', + 'other-field': 'other value' + }); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http.post(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }, body: { - 'some-field': 'value', - 'other-field': 'other value' - }).then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'POST', - 'path': '/', - 'headers': { - 'content-type': [ - 'application/x-www-form-urlencoded; charset=utf-8' - ], - 'content-length': ['40'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - 'body': 'some-field=value&other-field=other+value' - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'POST', + 'path': '/', + 'headers': { + 'content-type': [ + 'application/x-www-form-urlencoded; charset=utf-8' + ], + 'content-length': ['40'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + }, + 'body': 'some-field=value&other-field=other+value' + }))); }); - test('put', () { + test('put', () async { + var response = await http.put(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'Content-Type': 'text/plain', + 'User-Agent': 'Dart' + }); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http.put(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'Content-Type': 'text/plain', - 'User-Agent': 'Dart' - }).then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'PUT', - 'path': '/', - 'headers': { - 'accept-encoding': ['gzip'], - 'content-length': ['0'], - 'content-type': ['text/plain'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - } - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'PUT', + 'path': '/', + 'headers': { + 'accept-encoding': ['gzip'], + 'content-length': ['0'], + 'content-type': ['text/plain'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + } + }))); }); - test('put with string', () { + test('put with string', () async { + var response = await http.put(serverUrl, + headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }, + body: 'request body'); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http - .put(serverUrl, - headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }, - body: 'request body') - .then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'PUT', - 'path': '/', - 'headers': { - 'content-type': ['text/plain; charset=utf-8'], - 'content-length': ['12'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - 'body': 'request body' - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'PUT', + 'path': '/', + 'headers': { + 'content-type': ['text/plain; charset=utf-8'], + 'content-length': ['12'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + }, + 'body': 'request body' + }))); }); - test('put with bytes', () { + test('put with bytes', () async { + var response = await http.put(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }, body: [ + 104, + 101, + 108, + 108, + 111 + ]); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http.put(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }, body: [ - 104, - 101, - 108, - 108, - 111 - ]).then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'PUT', - 'path': '/', - 'headers': { - 'content-length': ['5'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - 'body': [104, 101, 108, 108, 111] - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'PUT', + 'path': '/', + 'headers': { + 'content-length': ['5'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + }, + 'body': [104, 101, 108, 108, 111] + }))); }); - test('put with fields', () { + test('put with fields', () async { + var response = await http.put(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }, body: { + 'some-field': 'value', + 'other-field': 'other value' + }); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http.put(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }, body: { - 'some-field': 'value', - 'other-field': 'other value' - }).then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'PUT', - 'path': '/', - 'headers': { - 'content-type': [ - 'application/x-www-form-urlencoded; charset=utf-8' - ], - 'content-length': ['40'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - 'body': 'some-field=value&other-field=other+value' - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'PUT', + 'path': '/', + 'headers': { + 'content-type': [ + 'application/x-www-form-urlencoded; charset=utf-8' + ], + 'content-length': ['40'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + }, + 'body': 'some-field=value&other-field=other+value' + }))); }); - test('patch', () { + test('patch', () async { + var response = await http.patch(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'Content-Type': 'text/plain', + 'User-Agent': 'Dart' + }); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http.patch(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'Content-Type': 'text/plain', - 'User-Agent': 'Dart' - }).then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'PATCH', - 'path': '/', - 'headers': { - 'accept-encoding': ['gzip'], - 'content-length': ['0'], - 'content-type': ['text/plain'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - } - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'PATCH', + 'path': '/', + 'headers': { + 'accept-encoding': ['gzip'], + 'content-length': ['0'], + 'content-type': ['text/plain'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + } + }))); }); - test('patch with string', () { + test('patch with string', () async { + var response = await http.patch(serverUrl, + headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }, + body: 'request body'); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http - .patch(serverUrl, - headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }, - body: 'request body') - .then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'PATCH', - 'path': '/', - 'headers': { - 'content-type': ['text/plain; charset=utf-8'], - 'content-length': ['12'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - 'body': 'request body' - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'PATCH', + 'path': '/', + 'headers': { + 'content-type': ['text/plain; charset=utf-8'], + 'content-length': ['12'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + }, + 'body': 'request body' + }))); }); - test('patch with bytes', () { + test('patch with bytes', () async { + var response = await http.patch(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }, body: [ + 104, + 101, + 108, + 108, + 111 + ]); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http.patch(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }, body: [ - 104, - 101, - 108, - 108, - 111 - ]).then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'PATCH', - 'path': '/', - 'headers': { - 'content-length': ['5'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - 'body': [104, 101, 108, 108, 111] - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'PATCH', + 'path': '/', + 'headers': { + 'content-length': ['5'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + }, + 'body': [104, 101, 108, 108, 111] + }))); }); - test('patch with fields', () { + test('patch with fields', () async { + var response = await http.patch(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }, body: { + 'some-field': 'value', + 'other-field': 'other value' + }); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http.patch(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }, body: { - 'some-field': 'value', - 'other-field': 'other value' - }).then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'PATCH', - 'path': '/', - 'headers': { - 'content-type': [ - 'application/x-www-form-urlencoded; charset=utf-8' - ], - 'content-length': ['40'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - 'body': 'some-field=value&other-field=other+value' - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'PATCH', + 'path': '/', + 'headers': { + 'content-type': [ + 'application/x-www-form-urlencoded; charset=utf-8' + ], + 'content-length': ['40'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + }, + 'body': 'some-field=value&other-field=other+value' + }))); }); - test('delete', () { + test('delete', () async { + var response = await http.delete(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }); + expect(response.statusCode, equals(200)); expect( - startServer().then((_) { - expect( - http.delete(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }).then((response) { - expect(response.statusCode, equals(200)); - expect( - response.body, - parse(equals({ - 'method': 'DELETE', - 'path': '/', - 'headers': { - 'content-length': ['0'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - } - }))); - }), - completes); - }), - completes); + response.body, + parse(equals({ + 'method': 'DELETE', + 'path': '/', + 'headers': { + 'content-length': ['0'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + } + }))); }); - test('read', () { + test('read', () async { + var response = await http.read(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }); expect( - startServer().then((_) { - expect( - http.read(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }).then((val) => val), - completion(parse(equals({ - 'method': 'GET', - 'path': '/', - 'headers': { - 'content-length': ['0'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - })))); - }), - completes); + response, + parse(equals({ + 'method': 'GET', + 'path': '/', + 'headers': { + 'content-length': ['0'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + }, + }))); }); test('read throws an error for a 4** status code', () { - expect( - startServer().then((_) { - expect( - http.read(serverUrl.resolve('/error')), throwsClientException); - }), - completes); + expect(http.read(serverUrl.resolve('/error')), throwsClientException); }); - test('readBytes', () { - expect( - startServer().then((_) { - var future = http.readBytes(serverUrl, headers: { - 'X-Random-Header': 'Value', - 'X-Other-Header': 'Other Value', - 'User-Agent': 'Dart' - }).then((bytes) => String.fromCharCodes(bytes)); + test('readBytes', () async { + var bytes = await http.readBytes(serverUrl, headers: { + 'X-Random-Header': 'Value', + 'X-Other-Header': 'Other Value', + 'User-Agent': 'Dart' + }); - expect( - future, - completion(parse(equals({ - 'method': 'GET', - 'path': '/', - 'headers': { - 'content-length': ['0'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - })))); - }), - completes); + expect( + String.fromCharCodes(bytes), + parse(equals({ + 'method': 'GET', + 'path': '/', + 'headers': { + 'content-length': ['0'], + 'accept-encoding': ['gzip'], + 'user-agent': ['Dart'], + 'x-random-header': ['Value'], + 'x-other-header': ['Other Value'] + }, + }))); }); test('readBytes throws an error for a 4** status code', () { expect( - startServer().then((_) { - expect(http.readBytes(serverUrl.resolve('/error')), - throwsClientException); - }), - completes); + http.readBytes(serverUrl.resolve('/error')), throwsClientException); }); }); } diff --git a/test/io/multipart_test.dart b/test/io/multipart_test.dart index 3ac9accbc5..9128b2e4b9 100644 --- a/test/io/multipart_test.dart +++ b/test/io/multipart_test.dart @@ -4,7 +4,6 @@ @TestOn('vm') -import 'dart:async'; import 'dart:io'; import 'package:http/http.dart' as http; @@ -21,17 +20,14 @@ void main() { tearDown(() => tempDir.deleteSync(recursive: true)); - test('with a file from disk', () { - expect( - Future.sync(() { - var filePath = path.join(tempDir.path, 'test-file'); - File(filePath).writeAsStringSync('hello'); - return http.MultipartFile.fromPath('file', filePath); - }).then((file) { - var request = http.MultipartRequest('POST', dummyUrl); - request.files.add(file); - - expect(request, bodyMatches(''' + test('with a file from disk', () async { + var filePath = path.join(tempDir.path, 'test-file'); + File(filePath).writeAsStringSync('hello'); + var file = await http.MultipartFile.fromPath('file', filePath); + var request = http.MultipartRequest('POST', dummyUrl); + request.files.add(file); + + expect(request, bodyMatches(''' --{{boundary}} content-type: application/octet-stream content-disposition: form-data; name="file"; filename="test-file" @@ -39,7 +35,5 @@ void main() { hello --{{boundary}}-- ''')); - }), - completes); }); } diff --git a/test/io/streamed_request_test.dart b/test/io/streamed_request_test.dart index 960c684cfd..9dd5d3eb15 100644 --- a/test/io/streamed_request_test.dart +++ b/test/io/streamed_request_test.dart @@ -12,48 +12,41 @@ import 'package:test/test.dart'; import 'utils.dart'; void main() { + setUp(startServer); + + tearDown(stopServer); + group('contentLength', () { - test('controls the Content-Length header', () { - return startServer().then((_) { - var request = http.StreamedRequest('POST', serverUrl) - ..contentLength = 10 - ..sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) - ..sink.close(); - - return request.send(); - }).then((response) { - expect( - utf8.decodeStream(response.stream), - completion(parse(containsPair( - 'headers', containsPair('content-length', ['10']))))); - }).whenComplete(stopServer); + test('controls the Content-Length header', () async { + var request = http.StreamedRequest('POST', serverUrl) + ..contentLength = 10 + ..sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) + ..sink.close(); + + var response = await request.send(); + expect( + await utf8.decodeStream(response.stream), + parse( + containsPair('headers', containsPair('content-length', ['10'])))); }); - test('defaults to sending no Content-Length', () { - return startServer().then((_) { - var request = http.StreamedRequest('POST', serverUrl); - request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - request.sink.close(); - - return request.send(); - }).then((response) { - expect( - utf8.decodeStream(response.stream), - completion(parse( - containsPair('headers', isNot(contains('content-length')))))); - }).whenComplete(stopServer); + test('defaults to sending no Content-Length', () async { + var request = http.StreamedRequest('POST', serverUrl); + request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); + request.sink.close(); + + var response = await request.send(); + expect(await utf8.decodeStream(response.stream), + parse(containsPair('headers', isNot(contains('content-length'))))); }); }); // Regression test. - test('.send() with a response with no content length', () { - return startServer().then((_) { - var request = - http.StreamedRequest('GET', serverUrl.resolve('/no-content-length')); - request.sink.close(); - return request.send(); - }).then((response) { - expect(utf8.decodeStream(response.stream), completion(equals('body'))); - }).whenComplete(stopServer); + test('.send() with a response with no content length', () async { + var request = + http.StreamedRequest('GET', serverUrl.resolve('/no-content-length')); + request.sink.close(); + var response = await request.send(); + expect(await utf8.decodeStream(response.stream), equals('body')); }); } diff --git a/test/io/utils.dart b/test/io/utils.dart index 7e94396026..d057fa4c28 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -8,6 +8,7 @@ import 'dart:io'; import 'package:http/http.dart'; import 'package:http/src/utils.dart'; +import 'package:pedantic/pedantic.dart'; import 'package:test/test.dart'; export '../utils.dart'; @@ -19,18 +20,17 @@ HttpServer _server; Uri get serverUrl => Uri.parse('http://localhost:${_server.port}'); /// Starts a new HTTP server. -Future startServer() { - return HttpServer.bind('localhost', 0).then((s) { - _server = s; - s.listen((request) { +Future startServer() async { + _server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { var path = request.uri.path; var response = request.response; if (path == '/error') { response ..statusCode = 400 - ..contentLength = 0 - ..close(); + ..contentLength = 0; + unawaited(response.close()); return; } @@ -40,8 +40,8 @@ Future startServer() { ..statusCode = 302 ..headers .set('location', serverUrl.resolve('/loop?${n + 1}').toString()) - ..contentLength = 0 - ..close(); + ..contentLength = 0; + unawaited(response.close()); return; } @@ -49,8 +49,8 @@ Future startServer() { response ..statusCode = 302 ..headers.set('location', serverUrl.resolve('/').toString()) - ..contentLength = 0 - ..close(); + ..contentLength = 0; + unawaited(response.close()); return; } @@ -58,54 +58,52 @@ Future startServer() { response ..statusCode = 200 ..contentLength = -1 - ..write('body') - ..close(); + ..write('body'); + unawaited(response.close()); return; } - ByteStream(request).toBytes().then((requestBodyBytes) { - var encodingName = request.uri.queryParameters['response-encoding']; - var outputEncoding = encodingName == null - ? ascii - : requiredEncodingForCharset(encodingName); - - response.headers.contentType = - ContentType('application', 'json', charset: outputEncoding.name); - response.headers.set('single', 'value'); - - dynamic requestBody; - if (requestBodyBytes.isEmpty) { - requestBody = null; - } else if (request.headers.contentType?.charset != null) { - var encoding = - requiredEncodingForCharset(request.headers.contentType.charset); - requestBody = encoding.decode(requestBodyBytes); - } else { - requestBody = requestBodyBytes; - } - - var content = { - 'method': request.method, - 'path': request.uri.path, - 'headers': {} - }; - if (requestBody != null) content['body'] = requestBody; - request.headers.forEach((name, values) { - // These headers are automatically generated by dart:io, so we don't - // want to test them here. - if (name == 'cookie' || name == 'host') return; - - content['headers'][name] = values; - }); - - var body = json.encode(content); - response - ..contentLength = body.length - ..write(body) - ..close(); + var requestBodyBytes = await ByteStream(request).toBytes(); + var encodingName = request.uri.queryParameters['response-encoding']; + var outputEncoding = encodingName == null + ? ascii + : requiredEncodingForCharset(encodingName); + + response.headers.contentType = + ContentType('application', 'json', charset: outputEncoding.name); + response.headers.set('single', 'value'); + + dynamic requestBody; + if (requestBodyBytes.isEmpty) { + requestBody = null; + } else if (request.headers.contentType?.charset != null) { + var encoding = + requiredEncodingForCharset(request.headers.contentType.charset); + requestBody = encoding.decode(requestBodyBytes); + } else { + requestBody = requestBodyBytes; + } + + var content = { + 'method': request.method, + 'path': request.uri.path, + 'headers': {} + }; + if (requestBody != null) content['body'] = requestBody; + request.headers.forEach((name, values) { + // These headers are automatically generated by dart:io, so we don't + // want to test them here. + if (name == 'cookie' || name == 'host') return; + + content['headers'][name] = values; }); + + var body = json.encode(content); + response + ..contentLength = body.length + ..write(body); + unawaited(response.close()); }); - }); } /// Stops the current HTTP server. diff --git a/test/mock_client_test.dart b/test/mock_client_test.dart index 7ab382d347..cb7f152e6f 100644 --- a/test/mock_client_test.dart +++ b/test/mock_client_test.dart @@ -12,49 +12,35 @@ import 'package:test/test.dart'; import 'utils.dart'; void main() { - test('handles a request', () { - var client = MockClient((request) { - return Future.value(http.Response(json.encode(request.bodyFields), 200, - request: request, headers: {'content-type': 'application/json'})); - }); + test('handles a request', () async { + var client = MockClient((request) async => http.Response( + json.encode(request.bodyFields), 200, + request: request, headers: {'content-type': 'application/json'})); + var response = await client.post('http://example.com/foo', + body: {'field1': 'value1', 'field2': 'value2'}); expect( - client.post('http://example.com/foo', body: { - 'field1': 'value1', - 'field2': 'value2' - }).then((response) => response.body), - completion(parse(equals({'field1': 'value1', 'field2': 'value2'})))); + response.body, parse(equals({'field1': 'value1', 'field2': 'value2'}))); }); - test('handles a streamed request', () { - var client = MockClient.streaming((request, bodyStream) { - return bodyStream.bytesToString().then((bodyString) { - var controller = StreamController>(sync: true); - Future.sync(() { - controller - ..add('Request body was "$bodyString"'.codeUnits) - ..close(); - }); - - return http.StreamedResponse(controller.stream, 200); - }); + test('handles a streamed request', () async { + var client = MockClient.streaming((request, bodyStream) async { + var bodyString = await bodyStream.bytesToString(); + var stream = + Stream.fromIterable(['Request body was "$bodyString"'.codeUnits]); + return http.StreamedResponse(stream, 200); }); var uri = Uri.parse('http://example.com/foo'); var request = http.Request('POST', uri)..body = 'hello, world'; - var future = client - .send(request) - .then(http.Response.fromStream) - .then((response) => response.body); - expect(future, completion(equals('Request body was "hello, world"'))); + var streamedResponse = await client.send(request); + var response = await http.Response.fromStream(streamedResponse); + expect(response.body, equals('Request body was "hello, world"')); }); - test('handles a request with no body', () { - var client = MockClient((request) { - return Future.value(http.Response('you did it', 200)); - }); + test('handles a request with no body', () async { + var client = MockClient((_) async => http.Response('you did it', 200)); - expect(client.read('http://example.com/foo'), - completion(equals('you did it'))); + expect(await client.read('http://example.com/foo'), equals('you did it')); }); } diff --git a/test/response_test.dart b/test/response_test.dart index 9e55a83d1f..532b2276b2 100644 --- a/test/response_test.dart +++ b/test/response_test.dart @@ -5,6 +5,7 @@ import 'dart:async'; import 'package:http/http.dart' as http; +import 'package:pedantic/pedantic.dart'; import 'package:test/test.dart'; void main() { @@ -48,31 +49,26 @@ void main() { }); group('.fromStream()', () { - test('sets body', () { + test('sets body', () async { var controller = StreamController>(sync: true); var streamResponse = http.StreamedResponse(controller.stream, 200, contentLength: 13); - var future = http.Response.fromStream(streamResponse) - .then((response) => response.body); - expect(future, completion(equals('Hello, world!'))); - controller ..add([72, 101, 108, 108, 111, 44, 32]) - ..add([119, 111, 114, 108, 100, 33]) - ..close(); + ..add([119, 111, 114, 108, 100, 33]); + unawaited(controller.close()); + var response = await http.Response.fromStream(streamResponse); + expect(response.body, equals('Hello, world!')); }); - test('sets bodyBytes', () { + test('sets bodyBytes', () async { var controller = StreamController>(sync: true); var streamResponse = http.StreamedResponse(controller.stream, 200, contentLength: 5); - var future = http.Response.fromStream(streamResponse) - .then((response) => response.bodyBytes); - expect(future, completion(equals([104, 101, 108, 108, 111]))); - - controller - ..add([104, 101, 108, 108, 111]) - ..close(); + controller.add([104, 101, 108, 108, 111]); + unawaited(controller.close()); + var response = await http.Response.fromStream(streamResponse); + expect(response.bodyBytes, equals([104, 101, 108, 108, 111])); }); }); } diff --git a/test/utils.dart b/test/utils.dart index 44cf12d49a..cd6190c280 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -85,19 +85,20 @@ class _BodyMatches extends Matcher { bool matches(item, Map matchState) { if (item is! http.MultipartRequest) return false; - var future = item.finalize().toBytes().then((bodyBytes) { - var body = utf8.decode(bodyBytes); - var contentType = MediaType.parse(item.headers['content-type']); - var boundary = contentType.parameters['boundary']; - var expected = cleanUpLiteral(_pattern) - .replaceAll('\n', '\r\n') - .replaceAll('{{boundary}}', boundary); - - expect(body, equals(expected)); - expect(item.contentLength, equals(bodyBytes.length)); - }); - - return completes.matches(future, matchState); + return completes.matches(_checks(item), matchState); + } + + Future _checks(http.MultipartRequest item) async { + var bodyBytes = await item.finalize().toBytes(); + var body = utf8.decode(bodyBytes); + var contentType = MediaType.parse(item.headers['content-type']); + var boundary = contentType.parameters['boundary']; + var expected = cleanUpLiteral(_pattern) + .replaceAll('\n', '\r\n') + .replaceAll('{{boundary}}', boundary); + + expect(body, equals(expected)); + expect(item.contentLength, equals(bodyBytes.length)); } @override From 696ab82b919ac89f67f76adbde571de191c1207b Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 7 Oct 2019 09:56:11 -0700 Subject: [PATCH 054/448] Refactor to async/await (#328) Use an `async*` for `MultipartRequest.finalize()`. Refactor `.then` chains to async methods. Add test for error forwarding in multipart request. This relates to a TODO that had been solved but had not been removed. --- lib/src/base_client.dart | 18 +++++------ lib/src/mock_client.dart | 57 ++++++++++++++++------------------ lib/src/multipart_request.dart | 47 ++++++++++++---------------- lib/src/response.dart | 17 +++++----- test/multipart_test.dart | 7 +++++ 5 files changed, 69 insertions(+), 77 deletions(-) diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index f19fb079a5..3be18a842d 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -121,11 +121,10 @@ abstract class BaseClient implements Client { /// For more fine-grained control over the request and response, use [send] or /// [get] instead. @override - Future read(url, {Map headers}) { - return get(url, headers: headers).then((response) { - _checkResponseSuccess(url, response); - return response.body; - }); + Future read(url, {Map headers}) async { + final response = await get(url, headers: headers); + _checkResponseSuccess(url, response); + return response.body; } /// Sends an HTTP GET request with the given headers to the given URL, which @@ -138,11 +137,10 @@ abstract class BaseClient implements Client { /// For more fine-grained control over the request and response, use [send] or /// [get] instead. @override - Future readBytes(url, {Map headers}) { - return get(url, headers: headers).then((response) { - _checkResponseSuccess(url, response); - return response.bodyBytes; - }); + Future readBytes(url, {Map headers}) async { + final response = await get(url, headers: headers); + _checkResponseSuccess(url, response); + return response.bodyBytes; } /// Sends an HTTP request and asynchronously returns the response. diff --git a/lib/src/mock_client.dart b/lib/src/mock_client.dart index 6dc3a619a8..45030ab00a 100644 --- a/lib/src/mock_client.dart +++ b/lib/src/mock_client.dart @@ -30,42 +30,39 @@ class MockClient extends BaseClient { /// Creates a [MockClient] with a handler that receives [Request]s and sends /// [Response]s. MockClient(MockClientHandler fn) - : this._((baseRequest, bodyStream) { - return bodyStream.toBytes().then((bodyBytes) { - var request = Request(baseRequest.method, baseRequest.url) - ..persistentConnection = baseRequest.persistentConnection - ..followRedirects = baseRequest.followRedirects - ..maxRedirects = baseRequest.maxRedirects - ..headers.addAll(baseRequest.headers) - ..bodyBytes = bodyBytes - ..finalize(); + : this._((baseRequest, bodyStream) async { + final bodyBytes = await bodyStream.toBytes(); + var request = Request(baseRequest.method, baseRequest.url) + ..persistentConnection = baseRequest.persistentConnection + ..followRedirects = baseRequest.followRedirects + ..maxRedirects = baseRequest.maxRedirects + ..headers.addAll(baseRequest.headers) + ..bodyBytes = bodyBytes + ..finalize(); - return fn(request); - }).then((response) { - return StreamedResponse( - ByteStream.fromBytes(response.bodyBytes), response.statusCode, - contentLength: response.contentLength, - request: baseRequest, - headers: response.headers, - isRedirect: response.isRedirect, - persistentConnection: response.persistentConnection, - reasonPhrase: response.reasonPhrase); - }); + final response = await fn(request); + return StreamedResponse( + ByteStream.fromBytes(response.bodyBytes), response.statusCode, + contentLength: response.contentLength, + request: baseRequest, + headers: response.headers, + isRedirect: response.isRedirect, + persistentConnection: response.persistentConnection, + reasonPhrase: response.reasonPhrase); }); /// Creates a [MockClient] with a handler that receives [StreamedRequest]s and /// sends [StreamedResponse]s. MockClient.streaming(MockClientStreamHandler fn) - : this._((request, bodyStream) { - return fn(request, bodyStream).then((response) { - return StreamedResponse(response.stream, response.statusCode, - contentLength: response.contentLength, - request: request, - headers: response.headers, - isRedirect: response.isRedirect, - persistentConnection: response.persistentConnection, - reasonPhrase: response.reasonPhrase); - }); + : this._((request, bodyStream) async { + final response = await fn(request, bodyStream); + return StreamedResponse(response.stream, response.statusCode, + contentLength: response.contentLength, + request: request, + headers: response.headers, + isRedirect: response.isRedirect, + persistentConnection: response.persistentConnection, + reasonPhrase: response.reasonPhrase); }); @override diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index 79a971fc22..0cf13b438e 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -87,40 +87,31 @@ class MultipartRequest extends BaseRequest { /// Freezes all mutable fields and returns a single-subscription [ByteStream] /// that will emit the request body. @override - ByteStream finalize() { + ByteStream finalize() => ByteStream(_finalize()); + + Stream> _finalize() async* { // TODO(nweiz): freeze fields and files var boundary = _boundaryString(); headers['content-type'] = 'multipart/form-data; boundary=$boundary'; super.finalize(); - - var controller = StreamController>(sync: true); - - void writeAscii(String string) { - controller.add(utf8.encode(string)); + const line = [13, 10]; // \r\n + final separator = utf8.encode('--$boundary\r\n'); + final close = utf8.encode('--$boundary--\r\n'); + + for (var field in fields.entries) { + yield separator; + yield utf8.encode(_headerForField(field.key, field.value)); + yield utf8.encode(field.value); + yield line; } - writeUtf8(String string) => controller.add(utf8.encode(string)); - writeLine() => controller.add([13, 10]); // \r\n - - fields.forEach((name, value) { - writeAscii('--$boundary\r\n'); - writeAscii(_headerForField(name, value)); - writeUtf8(value); - writeLine(); - }); - - Future.forEach(_files, (MultipartFile file) { - writeAscii('--$boundary\r\n'); - writeAscii(_headerForFile(file)); - return controller.addStream(file.finalize()).then((_) => writeLine()); - }).then((_) { - // TODO(nweiz): pass any errors propagated through this future on to - // the stream. See issue 3657. - writeAscii('--$boundary--\r\n'); - controller.close(); - }); - - return ByteStream(controller.stream); + for (final file in _files) { + yield separator; + yield utf8.encode(_headerForFile(file)); + yield* file.finalize(); + yield line; + } + yield close; } /// Returns the header string for a field. diff --git a/lib/src/response.dart b/lib/src/response.dart index 1e4e4cdcdb..36d9614f9a 100644 --- a/lib/src/response.dart +++ b/lib/src/response.dart @@ -60,15 +60,14 @@ class Response extends BaseResponse { /// Creates a new HTTP response by waiting for the full body to become /// available from a [StreamedResponse]. - static Future fromStream(StreamedResponse response) { - return response.stream.toBytes().then((body) { - return Response.bytes(body, response.statusCode, - request: response.request, - headers: response.headers, - isRedirect: response.isRedirect, - persistentConnection: response.persistentConnection, - reasonPhrase: response.reasonPhrase); - }); + static Future fromStream(StreamedResponse response) async { + final body = await response.stream.toBytes(); + return Response.bytes(body, response.statusCode, + request: response.request, + headers: response.headers, + isRedirect: response.isRedirect, + persistentConnection: response.persistentConnection, + reasonPhrase: response.reasonPhrase); } } diff --git a/test/multipart_test.dart b/test/multipart_test.dart index 5bc12d24c0..52dcbc61b8 100644 --- a/test/multipart_test.dart +++ b/test/multipart_test.dart @@ -239,4 +239,11 @@ void main() { --{{boundary}}-- ''')); }); + + test('with a file that has an error', () async { + var file = http.MultipartFile( + 'file', Future>.error('error').asStream(), 1); + var request = http.MultipartRequest('POST', dummyUrl)..files.add(file); + expect(request.finalize().drain(), throwsA('error')); + }); } From 466867f528449bacdbbce2c18129e7eb6f0a8892 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 18 Nov 2019 13:24:48 -0800 Subject: [PATCH 055/448] Remove implicit casts (#344) --- analysis_options.yaml | 3 +++ lib/src/base_client.dart | 8 ++++---- lib/src/browser_client.dart | 2 +- lib/src/io_client.dart | 7 +++++-- test/utils.dart | 27 +++++++++++++++------------ 5 files changed, 28 insertions(+), 19 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index e42fee88d0..60a8ea8a36 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,7 @@ include: package:pedantic/analysis_options.yaml +analyzer: + strong-mode: + implicit-casts: false linter: rules: - annotate_overrides diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index 3be18a842d..007fe3722e 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -157,8 +157,7 @@ abstract class BaseClient implements Client { Future _sendUnstreamed( String method, url, Map headers, [body, Encoding encoding]) async { - if (url is String) url = Uri.parse(url); - var request = Request(method, url); + var request = Request(method, _fromUriOrString(url)); if (headers != null) request.headers.addAll(headers); if (encoding != null) request.encoding = encoding; @@ -184,8 +183,7 @@ abstract class BaseClient implements Client { if (response.reasonPhrase != null) { message = '$message: ${response.reasonPhrase}'; } - if (url is String) url = Uri.parse(url); - throw ClientException('$message.', url); + throw ClientException('$message.', _fromUriOrString(url)); } /// Closes the client and cleans up any resources associated with it. @@ -195,3 +193,5 @@ abstract class BaseClient implements Client { @override void close() {} } + +Uri _fromUriOrString(uri) => uri is String ? Uri.parse(uri) : uri as Uri; diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index 76c613df09..1fb25b5a3f 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -55,7 +55,7 @@ class BrowserClient extends BaseClient { unawaited(xhr.onLoad.first.then((_) { // TODO(nweiz): Set the response type to "arraybuffer" when issue 18542 // is fixed. - var blob = xhr.response ?? Blob([]); + var blob = xhr.response as Blob ?? Blob([]); var reader = FileReader(); reader.onLoad.first.then((_) { diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index f19594f475..402ce81b89 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -40,7 +40,9 @@ class IOClient extends BaseClient { }); var response = - await stream.pipe(DelegatingStreamConsumer.typed(ioRequest)); + await stream.pipe(DelegatingStreamConsumer.typed(ioRequest)) + as HttpClientResponse; + var headers = {}; response.headers.forEach((key, values) { headers[key] = values.join(','); @@ -48,7 +50,8 @@ class IOClient extends BaseClient { return StreamedResponse( DelegatingStream.typed>(response).handleError( - (error) => throw ClientException(error.message, error.uri), + (HttpException error) => + throw ClientException(error.message, error.uri), test: (error) => error is HttpException), response.statusCode, contentLength: diff --git a/test/utils.dart b/test/utils.dart index cd6190c280..6411b1aad1 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -40,7 +40,7 @@ String cleanUpLiteral(String text) { /// A matcher that matches JSON that parses to a value that matches the inner /// matcher. -Matcher parse(matcher) => _Parse(matcher); +Matcher parse(Matcher matcher) => _Parse(matcher); class _Parse extends Matcher { final Matcher _matcher; @@ -49,16 +49,17 @@ class _Parse extends Matcher { @override bool matches(item, Map matchState) { - if (item is! String) return false; - - dynamic parsed; - try { - parsed = json.decode(item); - } catch (e) { - return false; + if (item is String) { + dynamic parsed; + try { + parsed = json.decode(item); + } catch (e) { + return false; + } + + return _matcher.matches(parsed, matchState); } - - return _matcher.matches(parsed, matchState); + return false; } @override @@ -83,9 +84,11 @@ class _BodyMatches extends Matcher { @override bool matches(item, Map matchState) { - if (item is! http.MultipartRequest) return false; + if (item is http.MultipartRequest) { + return completes.matches(_checks(item), matchState); + } - return completes.matches(_checks(item), matchState); + return false; } Future _checks(http.MultipartRequest item) async { From 11237fe1ac0135dd21be388f8c216c513bbd475f Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 5 Dec 2019 11:17:45 -0800 Subject: [PATCH 056/448] Fix newly enforced package:pedantic lints (#348) - always_declare_return_types - use_function_type_syntax_for_parameters --- example/main.dart | 2 +- lib/http.dart | 2 +- lib/src/utils.dart | 2 +- test/io/http_test.dart | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/main.dart b/example/main.dart index 13f996fa21..e53008f97b 100644 --- a/example/main.dart +++ b/example/main.dart @@ -1,7 +1,7 @@ import 'dart:convert' as convert; import 'package:http/http.dart' as http; -main(List arguments) async { +void main(List arguments) async { // This example uses the Google Books API to search for books about http. // https://developers.google.com/books/docs/overview var url = 'https://www.googleapis.com/books/v1/volumes?q={http}'; diff --git a/lib/http.dart b/lib/http.dart index bb4dd73554..c7dc9bfdbc 100644 --- a/lib/http.dart +++ b/lib/http.dart @@ -160,7 +160,7 @@ Future read(url, {Map headers}) => Future readBytes(url, {Map headers}) => _withClient((client) => client.readBytes(url, headers: headers)); -Future _withClient(Future fn(Client client)) async { +Future _withClient(Future Function(Client) fn) async { var client = Client(); try { return await fn(client); diff --git a/lib/src/utils.dart b/lib/src/utils.dart index f24994ee57..9d0648e359 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -69,7 +69,7 @@ ByteStream toByteStream(Stream> stream) { /// /// The return value, also a single-subscription [Stream] should be used in /// place of [stream] after calling this method. -Stream onDone(Stream stream, void onDone()) => +Stream onDone(Stream stream, void Function() onDone) => stream.transform(StreamTransformer.fromHandlers(handleDone: (sink) { sink.close(); onDone(); diff --git a/test/io/http_test.dart b/test/io/http_test.dart index ac96010c9c..bfd5216165 100644 --- a/test/io/http_test.dart +++ b/test/io/http_test.dart @@ -9,7 +9,7 @@ import 'package:test/test.dart'; import 'utils.dart'; -main() { +void main() { group('http.', () { setUp(startServer); From b28ee1f8dd5863964041176c520f2bf3b4f04fa0 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 26 Dec 2019 11:30:19 -0800 Subject: [PATCH 057/448] Prepare to publish with more doc fixes (#349) The stale docs are getting noticed: #164 --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 270e395487..fa497de3f6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.12.0+3-dev +version: 0.12.0+3 author: "Dart Team " homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. From 78de17e8cef1ac242b1000b6ad779c3ceade99b6 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 26 Dec 2019 12:32:13 -0800 Subject: [PATCH 058/448] Drop the author field from pubspec (#350) This field is no longer used by pub. --- pubspec.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index fa497de3f6..57e6374262 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,5 @@ name: http version: 0.12.0+3 -author: "Dart Team " homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. From c449a9f6ffef760bbd35aeb16e45c88f1e132d5a Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 2 Jan 2020 11:02:18 -0800 Subject: [PATCH 059/448] Make a private final field with getter public (#356) --- CHANGELOG.md | 4 ++++ lib/src/multipart_request.dart | 10 ++++------ pubspec.yaml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed2977521c..119227f486 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.12.0+4-dev + +* Internal changes. + ## 0.12.0+3 * Documentation fixes. diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index 0cf13b438e..699c64321b 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -43,13 +43,11 @@ class MultipartRequest extends BaseRequest { /// The form fields to send for this request. final fields = {}; - final _files = []; + /// The list of files to upload for this request. + final files = []; MultipartRequest(String method, Uri url) : super(method, url); - /// The list of files to upload for this request. - List get files => _files; - /// The total length of the request body, in bytes. /// /// This is calculated from [fields] and [files] and cannot be set manually. @@ -66,7 +64,7 @@ class MultipartRequest extends BaseRequest { '\r\n'.length; }); - for (var file in _files) { + for (var file in files) { length += '--'.length + _boundaryLength + '\r\n'.length + @@ -105,7 +103,7 @@ class MultipartRequest extends BaseRequest { yield line; } - for (final file in _files) { + for (final file in files) { yield separator; yield utf8.encode(_headerForFile(file)); yield* file.finalize(); diff --git a/pubspec.yaml b/pubspec.yaml index 57e6374262..f14a504a2e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.12.0+3 +version: 0.12.0+4-dev homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. From 2c944ca40741df444a0d3416cabf55c3631f049c Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 3 Jan 2020 13:25:34 -0800 Subject: [PATCH 060/448] Synchronously finalize headers (#359) Fixes #351 An `async*` method is not started until after the stream has a listener, if a caller reads the headers before listening to the stream, they would see the value before they have been set. Move the header assignment and other finalization work to the wrapping method and keep the `async*` method handling only the stream content. --- CHANGELOG.md | 2 +- lib/src/multipart_request.dart | 12 +++++++----- test/io/client_test.dart | 15 +++++++++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 119227f486..c87e445e0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## 0.12.0+4-dev -* Internal changes. +* Fix a bug setting the `'content-type'` header in `MultipartRequest`. ## 0.12.0+3 diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index 699c64321b..4d89c6cfeb 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -85,13 +85,15 @@ class MultipartRequest extends BaseRequest { /// Freezes all mutable fields and returns a single-subscription [ByteStream] /// that will emit the request body. @override - ByteStream finalize() => ByteStream(_finalize()); - - Stream> _finalize() async* { - // TODO(nweiz): freeze fields and files - var boundary = _boundaryString(); + ByteStream finalize() { + // TODO: freeze fields and files + final boundary = _boundaryString(); headers['content-type'] = 'multipart/form-data; boundary=$boundary'; super.finalize(); + return ByteStream(_finalize(boundary)); + } + + Stream> _finalize(String boundary) async* { const line = [13, 10]; // \r\n final separator = utf8.encode('--$boundary\r\n'); final close = utf8.encode('--$boundary--\r\n'); diff --git a/test/io/client_test.dart b/test/io/client_test.dart index f8c83f76a8..25bbd6b42e 100644 --- a/test/io/client_test.dart +++ b/test/io/client_test.dart @@ -4,6 +4,7 @@ @TestOn('vm') +import 'dart:convert'; import 'dart:io'; import 'package:http/http.dart' as http; @@ -106,4 +107,18 @@ void main() { request.sink.add('{"hello": "world"}'.codeUnits); request.sink.close(); }); + + test('sends a MultipartRequest with correct content-type header', () async { + var client = http.Client(); + var request = http.MultipartRequest('POST', serverUrl); + + var response = await client.send(request); + + var bytesString = await response.stream.bytesToString(); + client.close(); + + var headers = jsonDecode(bytesString)['headers'] as Map; + var contentType = (headers['content-type'] as List).single; + expect(contentType, startsWith('multipart/form-data; boundary=')); + }); } From 0b5dc8ed5f32d0aa037fb6f84129c5219fc46162 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 6 Jan 2020 16:24:00 -0800 Subject: [PATCH 061/448] Prepare to publish (#360) --- CHANGELOG.md | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c87e445e0e..482e722c7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.12.0+4-dev +## 0.12.0+4 * Fix a bug setting the `'content-type'` header in `MultipartRequest`. diff --git a/pubspec.yaml b/pubspec.yaml index f14a504a2e..a44caff53c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.12.0+4-dev +version: 0.12.0+4 homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. From be6cde5e6cbb326679a556999095977ac241a6ac Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 14 Jan 2020 16:21:06 -0800 Subject: [PATCH 062/448] Remove usages of Delegating*.typed (#365) These usages all pass static type checking without being wrapped in extra layers. --- CHANGELOG.md | 4 ++++ lib/src/io_client.dart | 8 ++------ lib/src/multipart_file_io.dart | 3 +-- pubspec.yaml | 3 +-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 482e722c7c..747ea8d960 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.12.1-dev + +* Remove dependency on `package:async`. + ## 0.12.0+4 * Fix a bug setting the `'content-type'` header in `MultipartRequest`. diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index 402ce81b89..f60aafe021 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -5,8 +5,6 @@ import 'dart:async'; import 'dart:io'; -import 'package:async/async.dart'; - import 'base_client.dart'; import 'base_request.dart'; import 'exception.dart'; @@ -39,9 +37,7 @@ class IOClient extends BaseClient { ioRequest.headers.set(name, value); }); - var response = - await stream.pipe(DelegatingStreamConsumer.typed(ioRequest)) - as HttpClientResponse; + var response = await stream.pipe(ioRequest) as HttpClientResponse; var headers = {}; response.headers.forEach((key, values) { @@ -49,7 +45,7 @@ class IOClient extends BaseClient { }); return StreamedResponse( - DelegatingStream.typed>(response).handleError( + response.handleError( (HttpException error) => throw ClientException(error.message, error.uri), test: (error) => error is HttpException), diff --git a/lib/src/multipart_file_io.dart b/lib/src/multipart_file_io.dart index a84402fab0..c5581e34c0 100644 --- a/lib/src/multipart_file_io.dart +++ b/lib/src/multipart_file_io.dart @@ -5,7 +5,6 @@ import 'dart:async'; import 'dart:io'; -import 'package:async/async.dart'; import 'package:http_parser/http_parser.dart'; import 'package:path/path.dart' as p; @@ -17,7 +16,7 @@ Future multipartFileFromPath(String field, String filePath, filename ??= p.basename(filePath); var file = File(filePath); var length = await file.length(); - var stream = ByteStream(DelegatingStream.typed(file.openRead())); + var stream = ByteStream(file.openRead()); return MultipartFile(field, stream, length, filename: filename, contentType: contentType); } diff --git a/pubspec.yaml b/pubspec.yaml index a44caff53c..cf7587789d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.12.0+4 +version: 0.12.1-dev homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. @@ -7,7 +7,6 @@ environment: sdk: ">=2.4.0 <3.0.0" dependencies: - async: ">=1.10.0 <3.0.0" http_parser: ">=0.0.1 <4.0.0" path: ">=0.9.0 <2.0.0" pedantic: "^1.0.0" From f50fcddb6b839b5e4796663d5151d95a50bf549c Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 23 Feb 2020 13:21:41 -0800 Subject: [PATCH 063/448] Remove duplicate pedantic items --- analysis_options.yaml | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 815f3251de..e0b01ee21e 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,33 +1,26 @@ include: package:pedantic/analysis_options.yaml + analyzer: strong-mode: implicit-casts: false + errors: dead_code: error - override_on_non_overriding_method: error unused_element: error unused_import: error unused_local_variable: error + linter: rules: - - always_declare_return_types - - annotate_overrides - avoid_bool_literals_in_conditional_expressions - avoid_classes_with_only_static_members - - avoid_empty_else - avoid_function_literals_in_foreach_calls - - avoid_init_to_null - - avoid_null_checks_in_equality_operators - - avoid_relative_lib_imports - avoid_renaming_method_parameters - - avoid_return_types_on_setters - avoid_returning_null - avoid_returning_null_for_future - avoid_returning_null_for_void - avoid_returning_this - - avoid_shadowing_type_parameters - avoid_single_cascade_in_expression_statements - - avoid_types_as_parameter_names - avoid_unused_constructor_parameters - await_only_futures - camel_case_types @@ -37,8 +30,6 @@ linter: - constant_identifier_names - control_flow_in_finally - directives_ordering - - empty_catches - - empty_constructor_bodies - empty_statements - file_names - hash_and_equals @@ -46,54 +37,28 @@ linter: - invariant_booleans - iterable_contains_unrelated_type - join_return_with_assignment - - library_names - - library_prefixes - list_remove_unrelated_type - literal_only_boolean_expressions - no_adjacent_strings_in_list - - no_duplicate_case_values - non_constant_identifier_names - - null_closures - - omit_local_variable_types - only_throw_errors - overridden_fields - package_api_docs - package_names - package_prefixed_library_names - - prefer_adjacent_string_concatenation - - prefer_collection_literals - - prefer_conditional_assignment - prefer_const_constructors - - prefer_contains - - prefer_equal_for_default_values - - prefer_final_fields #- prefer_final_locals - - prefer_generic_function_type_aliases - prefer_initializing_formals - prefer_interpolation_to_compose_strings - - prefer_is_empty - - prefer_is_not_empty - prefer_null_aware_operators - #- prefer_single_quotes - prefer_typing_uninitialized_variables - - recursive_getters - - slash_for_doc_comments - test_types_in_equals - throw_in_finally - - type_init_formals - - unawaited_futures - unnecessary_await_in_return - unnecessary_brace_in_string_interps - - unnecessary_const - unnecessary_getters_setters - unnecessary_lambdas - - unnecessary_new - unnecessary_null_aware_assignments - unnecessary_parenthesis - unnecessary_statements - - unnecessary_this - - unrelated_type_equality_checks - #- use_function_type_syntax_for_parameters - - use_rethrow_when_possible - - valid_regexps - void_checks From 37eae78bbd8789ff5fcf754cb5ea08557d67b1ab Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 23 Feb 2020 13:32:55 -0800 Subject: [PATCH 064/448] enable and fix a number of lints --- analysis_options.yaml | 24 +++++- lib/http_retry.dart | 78 +++++++++-------- test/http_retry_test.dart | 174 +++++++++++++++++++------------------- 3 files changed, 156 insertions(+), 120 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index e0b01ee21e..8870dbb2ed 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -13,8 +13,11 @@ analyzer: linter: rules: - avoid_bool_literals_in_conditional_expressions + - avoid_catching_errors - avoid_classes_with_only_static_members - avoid_function_literals_in_foreach_calls + - avoid_private_typedef_functions + - avoid_redundant_argument_values - avoid_renaming_method_parameters - avoid_returning_null - avoid_returning_null_for_future @@ -22,10 +25,11 @@ linter: - avoid_returning_this - avoid_single_cascade_in_expression_statements - avoid_unused_constructor_parameters + - avoid_void_async - await_only_futures - camel_case_types - cancel_subscriptions - #- cascade_invocations + - cascade_invocations - comment_references - constant_identifier_names - control_flow_in_finally @@ -37,21 +41,34 @@ linter: - invariant_booleans - iterable_contains_unrelated_type - join_return_with_assignment + - lines_longer_than_80_chars - list_remove_unrelated_type - literal_only_boolean_expressions + - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list + - no_runtimeType_toString - non_constant_identifier_names - only_throw_errors - overridden_fields - package_api_docs - package_names - package_prefixed_library_names + - prefer_asserts_in_initializer_lists - prefer_const_constructors - #- prefer_final_locals + - prefer_const_declarations + - prefer_expression_function_bodies + - prefer_final_locals + - prefer_function_declarations_over_variables - prefer_initializing_formals + - prefer_inlined_adds - prefer_interpolation_to_compose_strings + - prefer_is_not_operator - prefer_null_aware_operators + - prefer_relative_imports - prefer_typing_uninitialized_variables + - prefer_void_to_null + - provide_deprecation_message + - sort_pub_dependencies - test_types_in_equals - throw_in_finally - unnecessary_await_in_return @@ -59,6 +76,9 @@ linter: - unnecessary_getters_setters - unnecessary_lambdas - unnecessary_null_aware_assignments + - unnecessary_overrides - unnecessary_parenthesis - unnecessary_statements + - unnecessary_string_interpolations + - use_string_buffers - void_checks diff --git a/lib/http_retry.dart b/lib/http_retry.dart index 5bb3695ecb..825b5a269d 100644 --- a/lib/http_retry.dart +++ b/lib/http_retry.dart @@ -48,20 +48,21 @@ class RetryClient extends BaseClient { /// the client has a chance to perform side effects like logging. The /// `response` parameter will be null if the request was retried due to an /// error for which [whenError] returned `true`. - RetryClient(this._inner, - {int retries, - bool when(BaseResponse response), - bool whenError(error, StackTrace stackTrace), - Duration delay(int retryCount), - void onRetry(BaseRequest request, BaseResponse response, int retryCount)}) - : _retries = retries ?? 3, + RetryClient( + this._inner, { + int retries, + bool Function(BaseResponse) when, + bool Function(Object, StackTrace) whenError, + Duration Function(int retryCount) delay, + void Function(BaseRequest, BaseResponse, int retryCount) onRetry, + }) : _retries = retries ?? 3, _when = when ?? ((response) => response.statusCode == 503), _whenError = whenError ?? ((_, __) => false), _delay = delay ?? ((retryCount) => - Duration(milliseconds: 500) * math.pow(1.5, retryCount)), + const Duration(milliseconds: 500) * math.pow(1.5, retryCount)), _onRetry = onRetry { - RangeError.checkNotNegative(_retries, "retries"); + RangeError.checkNotNegative(_retries, 'retries'); } /// Like [new RetryClient], but with a pre-computed list of [delays] @@ -70,27 +71,38 @@ class RetryClient extends BaseClient { /// This will retry a request at most `delays.length` times, using each delay /// in order. It will wait for `delays[0]` after the initial request, /// `delays[1]` after the first retry, and so on. - RetryClient.withDelays(Client inner, Iterable delays, - {bool when(BaseResponse response), - bool whenError(error, StackTrace stackTrace), - void onRetry(BaseRequest request, BaseResponse response, int retryCount)}) - : this._withDelays(inner, delays.toList(), - when: when, whenError: whenError, onRetry: onRetry); - - RetryClient._withDelays(Client inner, List delays, - {bool when(BaseResponse response), - bool whenError(error, StackTrace stackTrace), - void onRetry(BaseRequest request, BaseResponse response, int retryCount)}) - : this(inner, - retries: delays.length, - delay: (retryCount) => delays[retryCount], - when: when, - whenError: whenError, - onRetry: onRetry); + RetryClient.withDelays( + Client inner, + Iterable delays, { + bool Function(BaseResponse) when, + bool Function(Object, StackTrace) whenError, + void Function(BaseRequest, BaseResponse, int retryCount) onRetry, + }) : this._withDelays( + inner, + delays.toList(), + when: when, + whenError: whenError, + onRetry: onRetry, + ); + + RetryClient._withDelays( + Client inner, + List delays, { + bool Function(BaseResponse) when, + bool Function(Object, StackTrace) whenError, + void Function(BaseRequest, BaseResponse, int) onRetry, + }) : this( + inner, + retries: delays.length, + delay: (retryCount) => delays[retryCount], + when: when, + whenError: whenError, + onRetry: onRetry, + ); @override Future send(BaseRequest request) async { - var splitter = StreamSplitter(request.finalize()); + final splitter = StreamSplitter(request.finalize()); var i = 0; for (;;) { @@ -117,12 +129,12 @@ class RetryClient extends BaseClient { /// Returns a copy of [original] with the given [body]. StreamedRequest _copyRequest(BaseRequest original, Stream> body) { - var request = StreamedRequest(original.method, original.url); - request.contentLength = original.contentLength; - request.followRedirects = original.followRedirects; - request.headers.addAll(original.headers); - request.maxRedirects = original.maxRedirects; - request.persistentConnection = original.persistentConnection; + final request = StreamedRequest(original.method, original.url) + ..contentLength = original.contentLength + ..followRedirects = original.followRedirects + ..headers.addAll(original.headers) + ..maxRedirects = original.maxRedirects + ..persistentConnection = original.persistentConnection; body.listen(request.sink.add, onError: request.sink.addError, diff --git a/test/http_retry_test.dart b/test/http_retry_test.dart index b51ed1f86d..bce4b738ff 100644 --- a/test/http_retry_test.dart +++ b/test/http_retry_test.dart @@ -10,129 +10,129 @@ import 'package:test/test.dart'; void main() { group("doesn't retry when", () { - test("a request has a non-503 error code", () async { - var client = RetryClient( - MockClient(expectAsync1((_) async => Response("", 502), count: 1))); - var response = await client.get("http://example.org"); + test('a request has a non-503 error code', () async { + final client = RetryClient( + MockClient(expectAsync1((_) async => Response('', 502), count: 1))); + final response = await client.get('http://example.org'); expect(response.statusCode, equals(502)); }); test("a request doesn't match when()", () async { - var client = RetryClient( - MockClient(expectAsync1((_) async => Response("", 503), count: 1)), + final client = RetryClient( + MockClient(expectAsync1((_) async => Response('', 503), count: 1)), when: (_) => false); - var response = await client.get("http://example.org"); + final response = await client.get('http://example.org'); expect(response.statusCode, equals(503)); }); - test("retries is 0", () async { - var client = RetryClient( - MockClient(expectAsync1((_) async => Response("", 503), count: 1)), + test('retries is 0', () async { + final client = RetryClient( + MockClient(expectAsync1((_) async => Response('', 503), count: 1)), retries: 0); - var response = await client.get("http://example.org"); + final response = await client.get('http://example.org'); expect(response.statusCode, equals(503)); }); }); - test("retries on a 503 by default", () async { + test('retries on a 503 by default', () async { var count = 0; - var client = RetryClient( + final client = RetryClient( MockClient(expectAsync1((request) async { count++; - return count < 2 ? Response("", 503) : Response("", 200); + return count < 2 ? Response('', 503) : Response('', 200); }, count: 2)), delay: (_) => Duration.zero); - var response = await client.get("http://example.org"); + final response = await client.get('http://example.org'); expect(response.statusCode, equals(200)); }); - test("retries on any request where when() returns true", () async { + test('retries on any request where when() returns true', () async { var count = 0; - var client = RetryClient( + final client = RetryClient( MockClient(expectAsync1((request) async { count++; - return Response("", 503, - headers: {"retry": count < 2 ? "true" : "false"}); + return Response('', 503, + headers: {'retry': count < 2 ? 'true' : 'false'}); }, count: 2)), - when: (response) => response.headers["retry"] == "true", + when: (response) => response.headers['retry'] == 'true', delay: (_) => Duration.zero); - var response = await client.get("http://example.org"); - expect(response.headers, containsPair("retry", "false")); + final response = await client.get('http://example.org'); + expect(response.headers, containsPair('retry', 'false')); expect(response.statusCode, equals(503)); }); - test("retries on any request where whenError() returns true", () async { + test('retries on any request where whenError() returns true', () async { var count = 0; - var client = RetryClient( + final client = RetryClient( MockClient(expectAsync1((request) async { count++; - if (count < 2) throw StateError("oh no"); - return Response("", 200); + if (count < 2) throw StateError('oh no'); + return Response('', 200); }, count: 2)), whenError: (error, _) => - error is StateError && error.message == "oh no", + error is StateError && error.message == 'oh no', delay: (_) => Duration.zero); - var response = await client.get("http://example.org"); + final response = await client.get('http://example.org'); expect(response.statusCode, equals(200)); }); test("doesn't retry a request where whenError() returns false", () async { - var client = RetryClient( - MockClient(expectAsync1((request) async => throw StateError("oh no"))), - whenError: (error, _) => error == "oh yeah", + final client = RetryClient( + MockClient(expectAsync1((request) async => throw StateError('oh no'))), + whenError: (error, _) => error == 'oh yeah', delay: (_) => Duration.zero); - expect(client.get("http://example.org"), - throwsA(isStateError.having((e) => e.message, 'message', "oh no"))); + expect(client.get('http://example.org'), + throwsA(isStateError.having((e) => e.message, 'message', 'oh no'))); }); - test("retries three times by default", () async { - var client = RetryClient( - MockClient(expectAsync1((_) async => Response("", 503), count: 4)), + test('retries three times by default', () async { + final client = RetryClient( + MockClient(expectAsync1((_) async => Response('', 503), count: 4)), delay: (_) => Duration.zero); - var response = await client.get("http://example.org"); + final response = await client.get('http://example.org'); expect(response.statusCode, equals(503)); }); - test("retries the given number of times", () async { - var client = RetryClient( - MockClient(expectAsync1((_) async => Response("", 503), count: 13)), + test('retries the given number of times', () async { + final client = RetryClient( + MockClient(expectAsync1((_) async => Response('', 503), count: 13)), retries: 12, delay: (_) => Duration.zero); - var response = await client.get("http://example.org"); + final response = await client.get('http://example.org'); expect(response.statusCode, equals(503)); }); - test("waits 1.5x as long each time by default", () { + test('waits 1.5x as long each time by default', () { FakeAsync().run((fake) { var count = 0; - var client = RetryClient(MockClient(expectAsync1((_) async { + final client = RetryClient(MockClient(expectAsync1((_) async { count++; if (count == 1) { expect(fake.elapsed, equals(Duration.zero)); } else if (count == 2) { - expect(fake.elapsed, equals(Duration(milliseconds: 500))); + expect(fake.elapsed, equals(const Duration(milliseconds: 500))); } else if (count == 3) { - expect(fake.elapsed, equals(Duration(milliseconds: 1250))); + expect(fake.elapsed, equals(const Duration(milliseconds: 1250))); } else if (count == 4) { - expect(fake.elapsed, equals(Duration(milliseconds: 2375))); + expect(fake.elapsed, equals(const Duration(milliseconds: 2375))); } - return Response("", 503); + return Response('', 503); }, count: 4))); - expect(client.get("http://example.org"), completes); - fake.elapse(Duration(minutes: 10)); + expect(client.get('http://example.org'), completes); + fake.elapse(const Duration(minutes: 10)); }); }); - test("waits according to the delay parameter", () { + test('waits according to the delay parameter', () { FakeAsync().run((fake) { var count = 0; - var client = RetryClient( + final client = RetryClient( MockClient(expectAsync1((_) async { count++; if (count == 1) { @@ -140,84 +140,88 @@ void main() { } else if (count == 2) { expect(fake.elapsed, equals(Duration.zero)); } else if (count == 3) { - expect(fake.elapsed, equals(Duration(seconds: 1))); + expect(fake.elapsed, equals(const Duration(seconds: 1))); } else if (count == 4) { - expect(fake.elapsed, equals(Duration(seconds: 3))); + expect(fake.elapsed, equals(const Duration(seconds: 3))); } - return Response("", 503); + return Response('', 503); }, count: 4)), delay: (requestCount) => Duration(seconds: requestCount)); - expect(client.get("http://example.org"), completes); - fake.elapse(Duration(minutes: 10)); + expect(client.get('http://example.org'), completes); + fake.elapse(const Duration(minutes: 10)); }); }); - test("waits according to the delay list", () { + test('waits according to the delay list', () { FakeAsync().run((fake) { var count = 0; - var client = RetryClient.withDelays( + final client = RetryClient.withDelays( MockClient(expectAsync1((_) async { count++; if (count == 1) { expect(fake.elapsed, equals(Duration.zero)); } else if (count == 2) { - expect(fake.elapsed, equals(Duration(seconds: 1))); + expect(fake.elapsed, equals(const Duration(seconds: 1))); } else if (count == 3) { - expect(fake.elapsed, equals(Duration(seconds: 61))); + expect(fake.elapsed, equals(const Duration(seconds: 61))); } else if (count == 4) { - expect(fake.elapsed, equals(Duration(seconds: 73))); + expect(fake.elapsed, equals(const Duration(seconds: 73))); } - return Response("", 503); + return Response('', 503); }, count: 4)), - [Duration(seconds: 1), Duration(minutes: 1), Duration(seconds: 12)]); - - expect(client.get("http://example.org"), completes); - fake.elapse(Duration(minutes: 10)); + const [ + Duration(seconds: 1), + Duration(minutes: 1), + Duration(seconds: 12) + ]); + + expect(client.get('http://example.org'), completes); + fake.elapse(const Duration(minutes: 10)); }); }); - test("calls onRetry for each retry", () async { + test('calls onRetry for each retry', () async { var count = 0; - var client = RetryClient( - MockClient(expectAsync1((_) async => Response("", 503), count: 3)), + final client = RetryClient( + MockClient(expectAsync1((_) async => Response('', 503), count: 3)), retries: 2, delay: (_) => Duration.zero, onRetry: expectAsync3((request, response, retryCount) { - expect(request.url, equals(Uri.parse("http://example.org"))); + expect(request.url, equals(Uri.parse('http://example.org'))); expect(response.statusCode, equals(503)); expect(retryCount, equals(count)); count++; }, count: 2)); - var response = await client.get("http://example.org"); + final response = await client.get('http://example.org'); expect(response.statusCode, equals(503)); }); - test("copies all request attributes for each attempt", () async { - var client = RetryClient.withDelays( + test('copies all request attributes for each attempt', () async { + final client = RetryClient.withDelays( MockClient(expectAsync1((request) async { expect(request.contentLength, equals(5)); expect(request.followRedirects, isFalse); - expect(request.headers, containsPair("foo", "bar")); + expect(request.headers, containsPair('foo', 'bar')); expect(request.maxRedirects, equals(12)); - expect(request.method, equals("POST")); + expect(request.method, equals('POST')); expect(request.persistentConnection, isFalse); - expect(request.url, equals(Uri.parse("http://example.org"))); - expect(request.body, equals("hello")); - return Response("", 503); + expect(request.url, equals(Uri.parse('http://example.org'))); + expect(request.body, equals('hello')); + return Response('', 503); }, count: 2)), [Duration.zero]); - var request = Request("POST", Uri.parse("http://example.org")); - request.body = "hello"; - request.followRedirects = false; - request.headers["foo"] = "bar"; - request.maxRedirects = 12; - request.persistentConnection = false; + final request = Request('POST', Uri.parse('http://example.org')) + ..body = 'hello' + ..followRedirects = false + ..headers['foo'] = 'bar' + ..maxRedirects = 12 + ..persistentConnection = false; - var response = await client.send(request); + final response = await client.send(request); expect(response.statusCode, equals(503)); }); } From 906674ce0de18c262fde55e9b509eca08f48ae9f Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 23 Feb 2020 13:35:29 -0800 Subject: [PATCH 065/448] Remove pubspec author and outdated URLs --- CHANGELOG.md | 4 ++++ README.md | 8 ++++---- pubspec.yaml | 3 +-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9005ccddc5..42b0565d8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.2 + +* Fix a number of lints affecting package maintenance score. + ## 0.1.1+3 * Support the latest `pkg:http` release. diff --git a/README.md b/README.md index da41cf2763..d2914a8e59 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -Middleware for the [`http`](https://pub.dartlang.org/packages/http) package that +Middleware for the [`http`](https://pub.dev/packages/http) package that transparently retries failing requests. To use this, just create an [`RetryClient`][RetryClient] that wraps the underlying [`http.Client`][Client]: -[RetryClient]: https://www.dartdocs.org/documentation/http_retry/latest/http_retry/RetryClient-class.html -[Client]: https://www.dartdocs.org/documentation/http/latest/http/Client-class.html +[RetryClient]: https://pub.dev/documentation/http_retry/latest/http_retry/RetryClient-class.html +[Client]: https://pub.dev/documentation/http/latest/http/Client-class.html ```dart import 'package:http/http.dart' as http; @@ -23,4 +23,4 @@ Temporary Failure up to three retries. It waits 500ms before the first retry, and increases the delay by 1.5x each time. All of this can be customized using the [`new RetryClient()`][new RetryClient] constructor. -[new RetryClient]: https://www.dartdocs.org/documentation/http_retry/latest/http_retry/RetryClient/RetryClient.html +[new RetryClient]: https://pub.dev/documentation/http_retry/latest/http_retry/RetryClient/RetryClient.html diff --git a/pubspec.yaml b/pubspec.yaml index 85743ad5bb..6b536f430f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,7 @@ name: http_retry -version: 0.1.1+3 +version: 0.1.2-dev description: HTTP client middleware that automatically retries requests. -author: Dart Team homepage: https://github.com/dart-lang/http_retry environment: From e95e2d63115552599202f5c9751c5c54966e92c6 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 23 Feb 2020 13:38:40 -0800 Subject: [PATCH 066/448] Add an example and fix example in readme --- .travis.yml | 2 +- CHANGELOG.md | 1 + README.md | 13 ++++++++----- example/example.dart | 15 +++++++++++++++ pubspec.yaml | 2 +- 5 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 example/example.dart diff --git a/.travis.yml b/.travis.yml index 2d9be65784..616efcd182 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: dart dart: -- 2.0.0 +- 2.1.0 - dev dart_task: diff --git a/CHANGELOG.md b/CHANGELOG.md index 42b0565d8e..30a8575684 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.1.2 * Fix a number of lints affecting package maintenance score. +* Update minimum Dart SDK to `2.1.0`. ## 0.1.1+3 diff --git a/README.md b/README.md index d2914a8e59..e86dbe6b2a 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,19 @@ underlying [`http.Client`][Client]: import 'package:http/http.dart' as http; import 'package:http_retry/http_retry.dart'; -main() async { - var client = new RetryClient(new http.Client()); - print(await client.read("http://example.org")); - await client.close(); +Future main() async { + final client = RetryClient(http.Client()); + try { + print(await client.read('http://example.org')); + } finally { + client.close(); + } } ``` By default, this retries any request whose response has status code 503 Temporary Failure up to three retries. It waits 500ms before the first retry, and increases the delay by 1.5x each time. All of this can be customized using -the [`new RetryClient()`][new RetryClient] constructor. +the [`RetryClient()`][new RetryClient] constructor. [new RetryClient]: https://pub.dev/documentation/http_retry/latest/http_retry/RetryClient/RetryClient.html diff --git a/example/example.dart b/example/example.dart new file mode 100644 index 0000000000..c024f9307d --- /dev/null +++ b/example/example.dart @@ -0,0 +1,15 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. 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:http/http.dart' as http; +import 'package:http_retry/http_retry.dart'; + +Future main() async { + final client = RetryClient(http.Client()); + try { + print(await client.read('http://example.org')); + } finally { + client.close(); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index 6b536f430f..0e6f9073c3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ description: HTTP client middleware that automatically retries requests. homepage: https://github.com/dart-lang/http_retry environment: - sdk: '>=2.0.0 <3.0.0' + sdk: '>=2.1.0 <3.0.0' dependencies: async: ^2.0.7 From a2ce4c0d81d7547cc643943f5534c6322428cab0 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 23 Feb 2020 13:44:01 -0800 Subject: [PATCH 067/448] Increase description length to be >= 60 characters --- pubspec.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 0e6f9073c3..87e0bb1350 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,8 @@ name: http_retry version: 0.1.2-dev -description: HTTP client middleware that automatically retries requests. +description: >- + A wrapper for package:http clients that automatically retries requests homepage: https://github.com/dart-lang/http_retry environment: From 882694b2958992de6d86873d2fb7d3a175fa1a63 Mon Sep 17 00:00:00 2001 From: Jamie West Date: Wed, 11 Mar 2020 16:29:07 -0700 Subject: [PATCH 068/448] add io_streamed_response (#388) Closes #387 Adds `IOStreamedResponse` which is now the type returned by `IOClient`. It adds a `detachSocket` method forwarding to the inner client. --- CHANGELOG.md | 3 +++ lib/io_client.dart | 1 + lib/src/io_client.dart | 9 ++++---- lib/src/io_streamed_response.dart | 37 +++++++++++++++++++++++++++++++ test/io/client_test.dart | 13 ++++++++++- 5 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 lib/src/io_streamed_response.dart diff --git a/CHANGELOG.md b/CHANGELOG.md index 747ea8d960..50fa3f64d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## 0.12.1-dev +* Add `IOStreamedResponse` which includes the ability to detach the socket. + When sending a request with an `IOClient` the response will be an + `IOStreamedResponse`. * Remove dependency on `package:async`. ## 0.12.0+4 diff --git a/lib/io_client.dart b/lib/io_client.dart index 170acfba4e..4c92b94c4e 100644 --- a/lib/io_client.dart +++ b/lib/io_client.dart @@ -3,3 +3,4 @@ // BSD-style license that can be found in the LICENSE file. export 'src/io_client.dart' show IOClient; +export 'src/io_streamed_response.dart' show IOStreamedResponse; diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index f60aafe021..85821e9b14 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -8,7 +8,7 @@ import 'dart:io'; import 'base_client.dart'; import 'base_request.dart'; import 'exception.dart'; -import 'streamed_response.dart'; +import 'io_streamed_response.dart'; /// Create an [IOClient]. /// @@ -24,7 +24,7 @@ class IOClient extends BaseClient { /// Sends an HTTP request and asynchronously returns the response. @override - Future send(BaseRequest request) async { + Future send(BaseRequest request) async { var stream = request.finalize(); try { @@ -44,7 +44,7 @@ class IOClient extends BaseClient { headers[key] = values.join(','); }); - return StreamedResponse( + return IOStreamedResponse( response.handleError( (HttpException error) => throw ClientException(error.message, error.uri), @@ -56,7 +56,8 @@ class IOClient extends BaseClient { headers: headers, isRedirect: response.isRedirect, persistentConnection: response.persistentConnection, - reasonPhrase: response.reasonPhrase); + reasonPhrase: response.reasonPhrase, + inner: response); } on HttpException catch (error) { throw ClientException(error.message, error.uri); } diff --git a/lib/src/io_streamed_response.dart b/lib/src/io_streamed_response.dart new file mode 100644 index 0000000000..fc69837b69 --- /dev/null +++ b/lib/src/io_streamed_response.dart @@ -0,0 +1,37 @@ +// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:io'; + +import 'base_request.dart'; +import 'streamed_response.dart'; + +/// An HTTP response where the response body is received asynchronously after +/// the headers have been received. +class IOStreamedResponse extends StreamedResponse { + final HttpClientResponse _inner; + + /// Creates a new streaming response. + /// + /// [stream] should be a single-subscription stream. + IOStreamedResponse(Stream> stream, int statusCode, + {int contentLength, + BaseRequest request, + Map headers = const {}, + bool isRedirect = false, + bool persistentConnection = true, + String reasonPhrase, + HttpClientResponse inner}) + : _inner = inner, + super(stream, statusCode, + contentLength: contentLength, + request: request, + headers: headers, + isRedirect: isRedirect, + persistentConnection: persistentConnection, + reasonPhrase: reasonPhrase); + + /// Detaches the underlying socket from the HTTP server. + Future detachSocket() async => _inner.detachSocket(); +} diff --git a/test/io/client_test.dart b/test/io/client_test.dart index 25bbd6b42e..e5bd66fa0a 100644 --- a/test/io/client_test.dart +++ b/test/io/client_test.dart @@ -8,7 +8,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:http/http.dart' as http; -import 'package:http/src/io_client.dart' as http_io; +import 'package:http/io_client.dart' as http_io; import 'package:test/test.dart'; import 'utils.dart'; @@ -121,4 +121,15 @@ void main() { var contentType = (headers['content-type'] as List).single; expect(contentType, startsWith('multipart/form-data; boundary=')); }); + + test('detachSocket returns a socket from an IOStreamedResponse', () async { + var ioClient = HttpClient(); + var client = http_io.IOClient(ioClient); + var request = http.Request('GET', serverUrl); + + var response = await client.send(request); + var socket = await response.detachSocket(); + + expect(socket, isNotNull); + }); } From a44c67fb01f57617d8f048b3528b1eb1c4045fc4 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 15 Mar 2020 15:19:30 -0700 Subject: [PATCH 069/448] Remove dartlang.org links (#395) --- .github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md | 4 ++-- test/utils.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md b/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md index 250d4cd542..88a61ae370 100644 --- a/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md +++ b/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md @@ -16,8 +16,8 @@ This package is a wrapper around the HttpClient from dart:io and HttpRequest from dart:html. Before filing a bug here verify that the issue is not surfaced when using those interfaces directly. -https://api.dartlang.org/stable/dart-io/HttpClient-class.html -https://api.dartlang.org/stable/dart-html/HttpRequest-class.html +https://api.dart.dev/stable/dart-io/HttpClient-class.html +https://api.dart.dev/stable/dart-html/HttpRequest-class.html # Common problems: diff --git a/test/utils.dart b/test/utils.dart index 6411b1aad1..290678f081 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -9,7 +9,7 @@ import 'package:http_parser/http_parser.dart'; import 'package:test/test.dart'; /// A dummy URL for constructing requests that won't be sent. -Uri get dummyUrl => Uri.parse('http://dartlang.org/'); +Uri get dummyUrl => Uri.parse('http://dart.dev/'); /// Removes eight spaces of leading indentation from a multiline string. /// From 579fc66d8825ba25e4ddbcee8117428284c40e44 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 27 Apr 2020 15:38:56 -0700 Subject: [PATCH 070/448] Prepare to publish (#410) --- CHANGELOG.md | 4 ++-- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50fa3f64d4..a171b31fca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ -## 0.12.1-dev +## 0.12.1 * Add `IOStreamedResponse` which includes the ability to detach the socket. - When sending a request with an `IOClient` the response will be an + When sending a request with an `IOClient` the response will be an `IOStreamedResponse`. * Remove dependency on `package:async`. diff --git a/pubspec.yaml b/pubspec.yaml index cf7587789d..a3e1f1c12d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.12.1-dev +version: 0.12.1 homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. From 209a22a41dd0dafc7ec9210d2e7fba5d06278c15 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Thu, 14 May 2020 20:18:51 +0200 Subject: [PATCH 071/448] Use more current platform terminology in README (#419) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0d30875cee..52b96416ae 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ A composable, Future-based library for making HTTP requests. [![Build Status](https://travis-ci.org/dart-lang/http.svg?branch=master)](https://travis-ci.org/dart-lang/http) This package contains a set of high-level functions and classes that make it -easy to consume HTTP resources. It's platform-independent, and can be used on -both the command-line and the browser. +easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, +and the browser. ## Using From ba4b680713a6fb9ed377b2141815db17afb4fa39 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 29 Jun 2020 07:39:18 -0700 Subject: [PATCH 072/448] Switch Travis-CI to use Chrome over Firefox (#436) Less flaky --- .travis.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index f0dd98daaf..6503749a81 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,7 @@ dart: - 2.4.0 dart_task: - - test: --platform vm - # No parallelism on Firefox (-j 1) - # Causes flakiness – need to investigate - - test: --platform firefox -j 1 + - test: --platform vm,chrome - dartanalyzer: --fatal-infos --fatal-warnings . matrix: From 90f62a0337335fdacf7a260f72fbe2af29713203 Mon Sep 17 00:00:00 2001 From: tbm98 <52562340+tbm98@users.noreply.github.com> Date: Tue, 30 Jun 2020 07:27:04 +0700 Subject: [PATCH 073/448] Fix example code in README.md (#435) Add missing `http` prefix to match surrounding code. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 52b96416ae..01d7ebb8d5 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ class UserAgentClient extends http.BaseClient { UserAgentClient(this.userAgent, this._inner); - Future send(BaseRequest request) { + Future send(http.BaseRequest request) { request.headers['user-agent'] = userAgent; return _inner.send(request); } From d5f2f30daa8bbc52d08b758db635f907845aaa52 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 14 Jul 2020 14:27:51 -0700 Subject: [PATCH 074/448] Pass a Function(dynamic) to stream.handleError (#429) Fixes #418 The argument type for `handleError` is `Function` to allow callbacks that do or don't take the `StackTrace` argument, so we don't get static checking. In either case the first argument is expected to allow `dynamic`. TODO: Add a test --- CHANGELOG.md | 5 +++++ lib/src/io_client.dart | 8 ++++---- pubspec.yaml | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a171b31fca..f9cc8654fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.12.2 + +* Fix error handler callback type for response stream errors to avoid masking + root causes. + ## 0.12.1 * Add `IOStreamedResponse` which includes the ability to detach the socket. diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index 85821e9b14..d4f166e786 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -45,10 +45,10 @@ class IOClient extends BaseClient { }); return IOStreamedResponse( - response.handleError( - (HttpException error) => - throw ClientException(error.message, error.uri), - test: (error) => error is HttpException), + response.handleError((error) { + final httpException = error as HttpException; + throw ClientException(httpException.message, httpException.uri); + }, test: (error) => error is HttpException), response.statusCode, contentLength: response.contentLength == -1 ? null : response.contentLength, diff --git a/pubspec.yaml b/pubspec.yaml index a3e1f1c12d..07fffd3ca4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.12.1 +version: 0.12.2 homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. From bf4350c051e022d78dbd6ef3de1e39f36764c2f4 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 16 Jul 2020 11:17:38 -0700 Subject: [PATCH 075/448] Delete some copy/paste docs (#444) These docs are copied from the `Client` class. When a method is an `@override` and has no doc, dartdoc will already duplicate the docs from the overridden method - there is no need to copy the docs manually. --- lib/src/base_client.dart | 89 ---------------------------------------- 1 file changed, 89 deletions(-) diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index 007fe3722e..fa8169b7ef 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -18,108 +18,32 @@ import 'streamed_response.dart'; /// This is a mixin-style class; subclasses only need to implement [send] and /// maybe [close], and then they get various convenience methods for free. abstract class BaseClient implements Client { - /// Sends an HTTP HEAD request with the given headers to the given URL, which - /// can be a [Uri] or a [String]. - /// - /// For more fine-grained control over the request, use [send] instead. @override Future head(url, {Map headers}) => _sendUnstreamed('HEAD', url, headers); - /// Sends an HTTP GET request with the given headers to the given URL, which - /// can be a [Uri] or a [String]. - /// - /// For more fine-grained control over the request, use [send] instead. @override Future get(url, {Map headers}) => _sendUnstreamed('GET', url, headers); - /// Sends an HTTP POST request with the given headers and body to the given - /// URL, which can be a [Uri] or a [String]. - /// - /// [body] sets the body of the request. It can be a [String], a [List] - /// or a [Map]. If it's a String, it's encoded using - /// [encoding] and used as the body of the request. The content-type of the - /// request will default to "text/plain". - /// - /// If [body] is a List, it's used as a list of bytes for the body of the - /// request. - /// - /// If [body] is a Map, it's encoded as form fields using [encoding]. The - /// content-type of the request will be set to - /// `"application/x-www-form-urlencoded"`; this cannot be overridden. - /// - /// [encoding] defaults to UTF-8. - /// - /// For more fine-grained control over the request, use [send] instead. @override Future post(url, {Map headers, body, Encoding encoding}) => _sendUnstreamed('POST', url, headers, body, encoding); - /// Sends an HTTP PUT request with the given headers and body to the given - /// URL, which can be a [Uri] or a [String]. - /// - /// [body] sets the body of the request. It can be a [String], a [List] - /// or a [Map]. If it's a String, it's encoded using - /// [encoding] and used as the body of the request. The content-type of the - /// request will default to "text/plain". - /// - /// If [body] is a List, it's used as a list of bytes for the body of the - /// request. - /// - /// If [body] is a Map, it's encoded as form fields using [encoding]. The - /// content-type of the request will be set to - /// `"application/x-www-form-urlencoded"`; this cannot be overridden. - /// - /// [encoding] defaults to UTF-8. - /// - /// For more fine-grained control over the request, use [send] instead. @override Future put(url, {Map headers, body, Encoding encoding}) => _sendUnstreamed('PUT', url, headers, body, encoding); - /// Sends an HTTP PATCH request with the given headers and body to the given - /// URL, which can be a [Uri] or a [String]. - /// - /// [body] sets the body of the request. It can be a [String], a [List] - /// or a [Map]. If it's a String, it's encoded using - /// [encoding] and used as the body of the request. The content-type of the - /// request will default to "text/plain". - /// - /// If [body] is a List, it's used as a list of bytes for the body of the - /// request. - /// - /// If [body] is a Map, it's encoded as form fields using [encoding]. The - /// content-type of the request will be set to - /// `"application/x-www-form-urlencoded"`; this cannot be overridden. - /// - /// [encoding] defaults to UTF-8. - /// - /// For more fine-grained control over the request, use [send] instead. @override Future patch(url, {Map headers, body, Encoding encoding}) => _sendUnstreamed('PATCH', url, headers, body, encoding); - /// Sends an HTTP DELETE request with the given headers to the given URL, - /// which can be a [Uri] or a [String]. - /// - /// For more fine-grained control over the request, use [send] instead. @override Future delete(url, {Map headers}) => _sendUnstreamed('DELETE', url, headers); - - /// Sends an HTTP GET request with the given headers to the given URL, which - /// can be a [Uri] or a [String], and returns a Future that completes to the - /// body of the response as a String. - /// - /// The Future will emit a [ClientException] if the response doesn't have a - /// success status code. - /// - /// For more fine-grained control over the request and response, use [send] or - /// [get] instead. @override Future read(url, {Map headers}) async { final response = await get(url, headers: headers); @@ -127,15 +51,6 @@ abstract class BaseClient implements Client { return response.body; } - /// Sends an HTTP GET request with the given headers to the given URL, which - /// can be a [Uri] or a [String], and returns a Future that completes to the - /// body of the response as a list of bytes. - /// - /// The Future will emit an [ClientException] if the response doesn't have a - /// success status code. - /// - /// For more fine-grained control over the request and response, use [send] or - /// [get] instead. @override Future readBytes(url, {Map headers}) async { final response = await get(url, headers: headers); @@ -186,10 +101,6 @@ abstract class BaseClient implements Client { throw ClientException('$message.', _fromUriOrString(url)); } - /// Closes the client and cleans up any resources associated with it. - /// - /// It's important to close each client when it's done being used; failing to - /// do so can cause the Dart process to hang. @override void close() {} } From 4de712ce19a5bcabb1ac53bc35b3c3b25c61bbb0 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 25 Aug 2020 20:57:15 -0700 Subject: [PATCH 076/448] CI: use Chrome over firefox (#15) --- .travis.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 616efcd182..45c4a8e2f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,11 +5,21 @@ dart: - dev dart_task: - - dartfmt - - dartanalyzer - test: --platform vm xvfb: false - - test: --platform firefox + - test: --platform chrome + +jobs: + include: + # Only validate formatting using the dev release + - dart: dev + dart_task: dartfmt + - dart: dev + dart_task: + dartanalyzer: --fatal-infos --fatal-warnings . + - dart: 2.8.4 + dart_task: + dartanalyzer: --fatal-warnings . # Only building master means that we don't run two builds for each pull request. branches: From 322394c6526dcf947646453681e0010e770d6ac6 Mon Sep 17 00:00:00 2001 From: Michael R Fairhurst Date: Thu, 24 Sep 2020 20:49:12 -0700 Subject: [PATCH 077/448] Remove unused dart:async imports (#470) Since Dart 2.1, Future and Stream have been exported from dart:core --- lib/http.dart | 1 - lib/src/base_client.dart | 1 - lib/src/base_request.dart | 1 - lib/src/client.dart | 1 - lib/src/mock_client.dart | 2 -- lib/src/multipart_file.dart | 1 - lib/src/multipart_file_io.dart | 1 - lib/src/multipart_file_stub.dart | 2 -- lib/src/multipart_request.dart | 1 - lib/src/response.dart | 1 - lib/src/streamed_response.dart | 2 -- 11 files changed, 14 deletions(-) diff --git a/lib/http.dart b/lib/http.dart index c7dc9bfdbc..5539cfa8eb 100644 --- a/lib/http.dart +++ b/lib/http.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. /// A composable, [Future]-based library for making HTTP requests. -import 'dart:async'; import 'dart:convert'; import 'dart:typed_data'; diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index fa8169b7ef..640afb869a 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:convert'; import 'dart:typed_data'; diff --git a/lib/src/base_request.dart b/lib/src/base_request.dart index 544e436d4b..93c545f634 100644 --- a/lib/src/base_request.dart +++ b/lib/src/base_request.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:collection'; import 'byte_stream.dart'; diff --git a/lib/src/client.dart b/lib/src/client.dart index d877ce5413..89b1b10c63 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:convert'; import 'dart:typed_data'; diff --git a/lib/src/mock_client.dart b/lib/src/mock_client.dart index 45030ab00a..1daa559b73 100644 --- a/lib/src/mock_client.dart +++ b/lib/src/mock_client.dart @@ -2,8 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; - import 'base_client.dart'; import 'base_request.dart'; import 'byte_stream.dart'; diff --git a/lib/src/multipart_file.dart b/lib/src/multipart_file.dart index 541664aaec..8e6642f001 100644 --- a/lib/src/multipart_file.dart +++ b/lib/src/multipart_file.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:convert'; import 'package:http_parser/http_parser.dart'; diff --git a/lib/src/multipart_file_io.dart b/lib/src/multipart_file_io.dart index c5581e34c0..bffc394b6b 100644 --- a/lib/src/multipart_file_io.dart +++ b/lib/src/multipart_file_io.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:io'; import 'package:http_parser/http_parser.dart'; diff --git a/lib/src/multipart_file_stub.dart b/lib/src/multipart_file_stub.dart index b2304415fe..30ed036c52 100644 --- a/lib/src/multipart_file_stub.dart +++ b/lib/src/multipart_file_stub.dart @@ -2,8 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; - import 'package:http_parser/http_parser.dart'; import 'multipart_file.dart'; diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index 4d89c6cfeb..7e5469b29f 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:convert'; import 'dart:math'; diff --git a/lib/src/response.dart b/lib/src/response.dart index 36d9614f9a..a88669eca2 100644 --- a/lib/src/response.dart +++ b/lib/src/response.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:convert'; import 'dart:typed_data'; diff --git a/lib/src/streamed_response.dart b/lib/src/streamed_response.dart index b5b073f118..a11386e8cb 100644 --- a/lib/src/streamed_response.dart +++ b/lib/src/streamed_response.dart @@ -2,8 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; - import 'base_request.dart'; import 'base_response.dart'; import 'byte_stream.dart'; From b4b7089da41ec122afd71c208d684d0b591ad9a6 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 29 Sep 2020 09:42:39 -0700 Subject: [PATCH 078/448] Enable null safety (#472) --- .travis.yml | 36 ++++++++++++++++++++----------- CHANGELOG.md | 13 +++++++++++ analysis_options.yaml | 4 ++++ lib/http.dart | 22 +++++++++---------- lib/src/base_client.dart | 28 +++++++++++++----------- lib/src/base_request.dart | 13 ++++++----- lib/src/base_response.dart | 8 +++---- lib/src/browser_client.dart | 11 ++++++---- lib/src/byte_stream.dart | 2 +- lib/src/client.dart | 25 ++++++++++----------- lib/src/exception.dart | 2 +- lib/src/io_client.dart | 10 ++++----- lib/src/io_streamed_response.dart | 16 ++++++++------ lib/src/multipart_file.dart | 17 ++++++--------- lib/src/multipart_file_io.dart | 2 +- lib/src/multipart_file_stub.dart | 2 +- lib/src/multipart_request.dart | 4 ++-- lib/src/request.dart | 16 ++++++++------ lib/src/response.dart | 8 +++---- lib/src/streamed_response.dart | 6 +++--- lib/src/utils.dart | 8 +++---- pubspec.yaml | 19 ++++++++++------ test/io/multipart_test.dart | 2 +- test/io/utils.dart | 8 +++---- test/utils.dart | 8 +++---- 25 files changed, 168 insertions(+), 122 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6503749a81..18de1e947d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,35 @@ language: dart dart: - - dev - - 2.4.0 +- dev -dart_task: - - test: --platform vm,chrome - - dartanalyzer: --fatal-infos --fatal-warnings . - -matrix: +jobs: include: - # Only validate formatting using the dev release - - dart: dev - dart_task: dartfmt + - stage: analyze_and_format + name: "Analyze" + os: linux + script: dartanalyzer --enable-experiment=non-nullable --fatal-warnings --fatal-infos . + - stage: analyze_and_format + name: "Format" + os: linux + script: dartfmt -n --set-exit-if-changed . + - stage: test + name: "Vm Tests" + os: linux + script: pub run --enable-experiment=non-nullable test -p vm + - stage: test + name: "Web Tests" + os: linux + script: pub run --enable-experiment=non-nullable test -p chrome + +stages: +- analyze_and_format +- test # Only building master means that we don't run two builds for each pull request. branches: only: [master] cache: - directories: - - $HOME/.pub-cache + directories: + - $HOME/.pub-cache diff --git a/CHANGELOG.md b/CHANGELOG.md index f9cc8654fe..9d294c1f10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## 0.13.0-nullsafety-dev + +Pre-release for the null safety migration of this package. + +Note that 0.12.3 may not be the final stable null safety release version, we +reserve the right to release it as a 0.13.0 breaking change. + +This release will be pinned to only allow pre-release sdk versions starting from +2.10.0-2.0.dev, which is the first version where this package will appear in the +null safety allow list. + +- Added `const` constructor to `ByteStream`. + ## 0.12.2 * Fix error handler callback type for response stream errors to avoid masking diff --git a/analysis_options.yaml b/analysis_options.yaml index 60a8ea8a36..e4a95424f2 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,7 +1,11 @@ include: package:pedantic/analysis_options.yaml + analyzer: strong-mode: implicit-casts: false + enable-experiment: + - non-nullable + linter: rules: - annotate_overrides diff --git a/lib/http.dart b/lib/http.dart index 5539cfa8eb..4f918831a8 100644 --- a/lib/http.dart +++ b/lib/http.dart @@ -30,7 +30,7 @@ export 'src/streamed_response.dart'; /// the same server, you should use a single [Client] for all of those requests. /// /// For more fine-grained control over the request, use [Request] instead. -Future head(url, {Map headers}) => +Future head(Object url, {Map? headers}) => _withClient((client) => client.head(url, headers: headers)); /// Sends an HTTP GET request with the given headers to the given URL, which can @@ -41,7 +41,7 @@ Future head(url, {Map headers}) => /// the same server, you should use a single [Client] for all of those requests. /// /// For more fine-grained control over the request, use [Request] instead. -Future get(url, {Map headers}) => +Future get(Object url, {Map? headers}) => _withClient((client) => client.get(url, headers: headers)); /// Sends an HTTP POST request with the given headers and body to the given URL, @@ -63,8 +63,8 @@ Future get(url, {Map headers}) => /// /// For more fine-grained control over the request, use [Request] or /// [StreamedRequest] instead. -Future post(url, - {Map headers, body, Encoding encoding}) => +Future post(Object url, + {Map? headers, Object? body, Encoding? encoding}) => _withClient((client) => client.post(url, headers: headers, body: body, encoding: encoding)); @@ -87,8 +87,8 @@ Future post(url, /// /// For more fine-grained control over the request, use [Request] or /// [StreamedRequest] instead. -Future put(url, - {Map headers, body, Encoding encoding}) => +Future put(Object url, + {Map? headers, Object? body, Encoding? encoding}) => _withClient((client) => client.put(url, headers: headers, body: body, encoding: encoding)); @@ -111,8 +111,8 @@ Future put(url, /// /// For more fine-grained control over the request, use [Request] or /// [StreamedRequest] instead. -Future patch(url, - {Map headers, body, Encoding encoding}) => +Future patch(Object url, + {Map? headers, Object? body, Encoding? encoding}) => _withClient((client) => client.patch(url, headers: headers, body: body, encoding: encoding)); @@ -124,7 +124,7 @@ Future patch(url, /// the same server, you should use a single [Client] for all of those requests. /// /// For more fine-grained control over the request, use [Request] instead. -Future delete(url, {Map headers}) => +Future delete(Object url, {Map? headers}) => _withClient((client) => client.delete(url, headers: headers)); /// Sends an HTTP GET request with the given headers to the given URL, which can @@ -140,7 +140,7 @@ Future delete(url, {Map headers}) => /// /// For more fine-grained control over the request and response, use [Request] /// instead. -Future read(url, {Map headers}) => +Future read(Object url, {Map? headers}) => _withClient((client) => client.read(url, headers: headers)); /// Sends an HTTP GET request with the given headers to the given URL, which can @@ -156,7 +156,7 @@ Future read(url, {Map headers}) => /// /// For more fine-grained control over the request and response, use [Request] /// instead. -Future readBytes(url, {Map headers}) => +Future readBytes(Object url, {Map? headers}) => _withClient((client) => client.readBytes(url, headers: headers)); Future _withClient(Future Function(Client) fn) async { diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index 640afb869a..c47bb1071a 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -18,40 +18,42 @@ import 'streamed_response.dart'; /// maybe [close], and then they get various convenience methods for free. abstract class BaseClient implements Client { @override - Future head(url, {Map headers}) => + Future head(Object url, {Map? headers}) => _sendUnstreamed('HEAD', url, headers); @override - Future get(url, {Map headers}) => + Future get(Object url, {Map? headers}) => _sendUnstreamed('GET', url, headers); @override - Future post(url, - {Map headers, body, Encoding encoding}) => + Future post(Object url, + {Map? headers, Object? body, Encoding? encoding}) => _sendUnstreamed('POST', url, headers, body, encoding); @override - Future put(url, - {Map headers, body, Encoding encoding}) => + Future put(Object url, + {Map? headers, Object? body, Encoding? encoding}) => _sendUnstreamed('PUT', url, headers, body, encoding); @override - Future patch(url, - {Map headers, body, Encoding encoding}) => + Future patch(Object url, + {Map? headers, Object? body, Encoding? encoding}) => _sendUnstreamed('PATCH', url, headers, body, encoding); @override - Future delete(url, {Map headers}) => + Future delete(Object url, {Map? headers}) => _sendUnstreamed('DELETE', url, headers); + @override - Future read(url, {Map headers}) async { + Future read(Object url, {Map? headers}) async { final response = await get(url, headers: headers); _checkResponseSuccess(url, response); return response.body; } @override - Future readBytes(url, {Map headers}) async { + Future readBytes(Object url, + {Map? headers}) async { final response = await get(url, headers: headers); _checkResponseSuccess(url, response); return response.bodyBytes; @@ -69,8 +71,8 @@ abstract class BaseClient implements Client { /// Sends a non-streaming [Request] and returns a non-streaming [Response]. Future _sendUnstreamed( - String method, url, Map headers, - [body, Encoding encoding]) async { + String method, url, Map? headers, + [body, Encoding? encoding]) async { var request = Request(method, _fromUriOrString(url)); if (headers != null) request.headers.addAll(headers); diff --git a/lib/src/base_request.dart b/lib/src/base_request.dart index 93c545f634..9d1db4b5b1 100644 --- a/lib/src/base_request.dart +++ b/lib/src/base_request.dart @@ -4,6 +4,8 @@ import 'dart:collection'; +import 'package:meta/meta.dart'; + import 'byte_stream.dart'; import 'client.dart'; import 'streamed_response.dart'; @@ -29,10 +31,10 @@ abstract class BaseRequest { /// /// This defaults to `null`, which indicates that the size of the request is /// not known in advance. May not be assigned a negative value. - int get contentLength => _contentLength; - int _contentLength; + int? get contentLength => _contentLength; + int? _contentLength; - set contentLength(int value) { + set contentLength(int? value) { if (value != null && value < 0) { throw ArgumentError('Invalid content length $value.'); } @@ -93,16 +95,17 @@ abstract class BaseRequest { /// Freezes all mutable fields and returns a single-subscription [ByteStream] /// that emits the body of the request. /// - /// The base implementation of this returns null rather than a [ByteStream]; + /// The base implementation of this returns an empty [ByteStream]; /// subclasses are responsible for creating the return value, which should be /// single-subscription to ensure that no data is dropped. They should also /// freeze any additional mutable fields they add that don't make sense to /// change after the request headers are sent. + @mustCallSuper ByteStream finalize() { // TODO(nweiz): freeze headers if (finalized) throw StateError("Can't finalize a finalized Request."); _finalized = true; - return null; + return const ByteStream(Stream.empty()); } /// Sends this request. diff --git a/lib/src/base_response.dart b/lib/src/base_response.dart index 6e2fc13bff..5040245fae 100644 --- a/lib/src/base_response.dart +++ b/lib/src/base_response.dart @@ -10,18 +10,18 @@ import 'base_request.dart'; /// they're returned by [BaseClient.send] or other HTTP client methods. abstract class BaseResponse { /// The (frozen) request that triggered this response. - final BaseRequest request; + final BaseRequest? request; /// The HTTP status code for this response. final int statusCode; /// The reason phrase associated with the status code. - final String reasonPhrase; + final String? reasonPhrase; /// The size of the response body, in bytes. /// /// If the size of the request is not known in advance, this is `null`. - final int contentLength; + final int? contentLength; // TODO(nweiz): automatically parse cookies from headers @@ -42,7 +42,7 @@ abstract class BaseResponse { this.reasonPhrase}) { if (statusCode < 100) { throw ArgumentError('Invalid status code $statusCode.'); - } else if (contentLength != null && contentLength < 0) { + } else if (contentLength != null && contentLength! < 0) { throw ArgumentError('Invalid content length $contentLength.'); } } diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index 1fb25b5a3f..3980bc0e26 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -52,16 +52,17 @@ class BrowserClient extends BaseClient { request.headers.forEach(xhr.setRequestHeader); var completer = Completer(); + + // TODO(kevmoo): Waiting on https://github.com/dart-lang/linter/issues/2185 + // ignore: void_checks unawaited(xhr.onLoad.first.then((_) { - // TODO(nweiz): Set the response type to "arraybuffer" when issue 18542 - // is fixed. - var blob = xhr.response as Blob ?? Blob([]); + var blob = xhr.response as Blob; var reader = FileReader(); reader.onLoad.first.then((_) { var body = reader.result as Uint8List; completer.complete(StreamedResponse( - ByteStream.fromBytes(body), xhr.status, + ByteStream.fromBytes(body), xhr.status!, contentLength: body.length, request: request, headers: xhr.responseHeaders, @@ -76,6 +77,8 @@ class BrowserClient extends BaseClient { reader.readAsArrayBuffer(blob); })); + // TODO(kevmoo): Waiting on https://github.com/dart-lang/linter/issues/2185 + // ignore: void_checks unawaited(xhr.onError.first.then((_) { // Unfortunately, the underlying XMLHttpRequest API doesn't expose any // specific information about the error itself. diff --git a/lib/src/byte_stream.dart b/lib/src/byte_stream.dart index 0191a05cb9..172db0d6c0 100644 --- a/lib/src/byte_stream.dart +++ b/lib/src/byte_stream.dart @@ -8,7 +8,7 @@ import 'dart:typed_data'; /// A stream of chunks of bytes representing a single piece of data. class ByteStream extends StreamView> { - ByteStream(Stream> stream) : super(stream); + const ByteStream(Stream> stream) : super(stream); /// Returns a single-subscription byte stream that will emit the given bytes /// in a single chunk. diff --git a/lib/src/client.dart b/lib/src/client.dart index 89b1b10c63..3a1c33efb0 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -7,11 +7,8 @@ import 'dart:typed_data'; import 'base_client.dart'; import 'base_request.dart'; -// ignore: uri_does_not_exist import 'client_stub.dart' - // ignore: uri_does_not_exist if (dart.library.html) 'browser_client.dart' - // ignore: uri_does_not_exist if (dart.library.io) 'io_client.dart'; import 'response.dart'; import 'streamed_response.dart'; @@ -37,13 +34,13 @@ abstract class Client { /// can be a [Uri] or a [String]. /// /// For more fine-grained control over the request, use [send] instead. - Future head(url, {Map headers}); + Future head(Object url, {Map? headers}); /// Sends an HTTP GET request with the given headers to the given URL, which /// can be a [Uri] or a [String]. /// /// For more fine-grained control over the request, use [send] instead. - Future get(url, {Map headers}); + Future get(Object url, {Map? headers}); /// Sends an HTTP POST request with the given headers and body to the given /// URL, which can be a [Uri] or a [String]. @@ -63,8 +60,8 @@ abstract class Client { /// [encoding] defaults to [utf8]. /// /// For more fine-grained control over the request, use [send] instead. - Future post(url, - {Map headers, body, Encoding encoding}); + Future post(Object url, + {Map? headers, Object? body, Encoding? encoding}); /// Sends an HTTP PUT request with the given headers and body to the given /// URL, which can be a [Uri] or a [String]. @@ -84,8 +81,8 @@ abstract class Client { /// [encoding] defaults to [utf8]. /// /// For more fine-grained control over the request, use [send] instead. - Future put(url, - {Map headers, body, Encoding encoding}); + Future put(Object url, + {Map? headers, Object? body, Encoding? encoding}); /// Sends an HTTP PATCH request with the given headers and body to the given /// URL, which can be a [Uri] or a [String]. @@ -105,14 +102,14 @@ abstract class Client { /// [encoding] defaults to [utf8]. /// /// For more fine-grained control over the request, use [send] instead. - Future patch(url, - {Map headers, body, Encoding encoding}); + Future patch(Object url, + {Map? headers, Object? body, Encoding? encoding}); /// Sends an HTTP DELETE request with the given headers to the given URL, /// which can be a [Uri] or a [String]. /// /// For more fine-grained control over the request, use [send] instead. - Future delete(url, {Map headers}); + Future delete(Object url, {Map? headers}); /// Sends an HTTP GET request with the given headers to the given URL, which /// can be a [Uri] or a [String], and returns a Future that completes to the @@ -123,7 +120,7 @@ abstract class Client { /// /// For more fine-grained control over the request and response, use [send] or /// [get] instead. - Future read(url, {Map headers}); + Future read(Object url, {Map? headers}); /// Sends an HTTP GET request with the given headers to the given URL, which /// can be a [Uri] or a [String], and returns a Future that completes to the @@ -134,7 +131,7 @@ abstract class Client { /// /// For more fine-grained control over the request and response, use [send] or /// [get] instead. - Future readBytes(url, {Map headers}); + Future readBytes(Object url, {Map? headers}); /// Sends an HTTP request and asynchronously returns the response. Future send(BaseRequest request); diff --git a/lib/src/exception.dart b/lib/src/exception.dart index c92a861a5b..5ac1a6441d 100644 --- a/lib/src/exception.dart +++ b/lib/src/exception.dart @@ -7,7 +7,7 @@ class ClientException implements Exception { final String message; /// The URL of the HTTP request or response that failed. - final Uri uri; + final Uri? uri; ClientException(this.message, [this.uri]); diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index d4f166e786..10539ce0a3 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -18,9 +18,9 @@ BaseClient createClient() => IOClient(); /// A `dart:io`-based HTTP client. class IOClient extends BaseClient { /// The underlying `dart:io` HTTP client. - HttpClient _inner; + HttpClient? _inner; - IOClient([HttpClient inner]) : _inner = inner ?? HttpClient(); + IOClient([HttpClient? inner]) : _inner = inner ?? HttpClient(); /// Sends an HTTP request and asynchronously returns the response. @override @@ -28,10 +28,10 @@ class IOClient extends BaseClient { var stream = request.finalize(); try { - var ioRequest = (await _inner.openUrl(request.method, request.url)) + var ioRequest = (await _inner!.openUrl(request.method, request.url)) ..followRedirects = request.followRedirects ..maxRedirects = request.maxRedirects - ..contentLength = (request?.contentLength ?? -1) + ..contentLength = (request.contentLength ?? -1) ..persistentConnection = request.persistentConnection; request.headers.forEach((name, value) { ioRequest.headers.set(name, value); @@ -70,7 +70,7 @@ class IOClient extends BaseClient { @override void close() { if (_inner != null) { - _inner.close(force: true); + _inner!.close(force: true); _inner = null; } } diff --git a/lib/src/io_streamed_response.dart b/lib/src/io_streamed_response.dart index fc69837b69..21744858b3 100644 --- a/lib/src/io_streamed_response.dart +++ b/lib/src/io_streamed_response.dart @@ -10,19 +10,21 @@ import 'streamed_response.dart'; /// An HTTP response where the response body is received asynchronously after /// the headers have been received. class IOStreamedResponse extends StreamedResponse { - final HttpClientResponse _inner; + final HttpClientResponse? _inner; /// Creates a new streaming response. /// /// [stream] should be a single-subscription stream. + /// + /// If [inner] is not provided, [detachSocket] will throw. IOStreamedResponse(Stream> stream, int statusCode, - {int contentLength, - BaseRequest request, + {int? contentLength, + BaseRequest? request, Map headers = const {}, bool isRedirect = false, bool persistentConnection = true, - String reasonPhrase, - HttpClientResponse inner}) + String? reasonPhrase, + HttpClientResponse? inner}) : _inner = inner, super(stream, statusCode, contentLength: contentLength, @@ -33,5 +35,7 @@ class IOStreamedResponse extends StreamedResponse { reasonPhrase: reasonPhrase); /// Detaches the underlying socket from the HTTP server. - Future detachSocket() async => _inner.detachSocket(); + /// + /// Will throw if `inner` was not set or `null` when `this` was created. + Future detachSocket() async => _inner!.detachSocket(); } diff --git a/lib/src/multipart_file.dart b/lib/src/multipart_file.dart index 8e6642f001..772493adb0 100644 --- a/lib/src/multipart_file.dart +++ b/lib/src/multipart_file.dart @@ -7,10 +7,7 @@ import 'dart:convert'; import 'package:http_parser/http_parser.dart'; import 'byte_stream.dart'; -// ignore: uri_does_not_exist -import 'multipart_file_stub.dart' - // ignore: uri_does_not_exist - if (dart.library.io) 'multipart_file_io.dart'; +import 'multipart_file_stub.dart' if (dart.library.io) 'multipart_file_io.dart'; import 'utils.dart'; /// A file to be uploaded as part of a [MultipartRequest]. @@ -28,8 +25,8 @@ class MultipartFile { /// The basename of the file. /// - /// May be null. - final String filename; + /// May be `null`. + final String? filename; /// The content-type of the file. /// @@ -51,7 +48,7 @@ class MultipartFile { /// [contentType] currently defaults to `application/octet-stream`, but in the /// future may be inferred from [filename]. MultipartFile(this.field, Stream> stream, this.length, - {this.filename, MediaType contentType}) + {this.filename, MediaType? contentType}) : _stream = toByteStream(stream), contentType = contentType ?? MediaType('application', 'octet-stream'); @@ -60,7 +57,7 @@ class MultipartFile { /// [contentType] currently defaults to `application/octet-stream`, but in the /// future may be inferred from [filename]. factory MultipartFile.fromBytes(String field, List value, - {String filename, MediaType contentType}) { + {String? filename, MediaType? contentType}) { var stream = ByteStream.fromBytes(value); return MultipartFile(field, stream, value.length, filename: filename, contentType: contentType); @@ -73,7 +70,7 @@ class MultipartFile { /// [contentType] currently defaults to `text/plain; charset=utf-8`, but in /// the future may be inferred from [filename]. factory MultipartFile.fromString(String field, String value, - {String filename, MediaType contentType}) { + {String? filename, MediaType? contentType}) { contentType ??= MediaType('text', 'plain'); var encoding = encodingForCharset(contentType.parameters['charset'], utf8); contentType = contentType.change(parameters: {'charset': encoding.name}); @@ -92,7 +89,7 @@ class MultipartFile { /// Throws an [UnsupportedError] if `dart:io` isn't supported in this /// environment. static Future fromPath(String field, String filePath, - {String filename, MediaType contentType}) => + {String? filename, MediaType? contentType}) => multipartFileFromPath(field, filePath, filename: filename, contentType: contentType); diff --git a/lib/src/multipart_file_io.dart b/lib/src/multipart_file_io.dart index bffc394b6b..1eaa918a2a 100644 --- a/lib/src/multipart_file_io.dart +++ b/lib/src/multipart_file_io.dart @@ -11,7 +11,7 @@ import 'byte_stream.dart'; import 'multipart_file.dart'; Future multipartFileFromPath(String field, String filePath, - {String filename, MediaType contentType}) async { + {String? filename, MediaType? contentType}) async { filename ??= p.basename(filePath); var file = File(filePath); var length = await file.length(); diff --git a/lib/src/multipart_file_stub.dart b/lib/src/multipart_file_stub.dart index 30ed036c52..326914b50d 100644 --- a/lib/src/multipart_file_stub.dart +++ b/lib/src/multipart_file_stub.dart @@ -7,6 +7,6 @@ import 'package:http_parser/http_parser.dart'; import 'multipart_file.dart'; Future multipartFileFromPath(String field, String filePath, - {String filename, MediaType contentType}) => + {String? filename, MediaType? contentType}) => throw UnsupportedError( 'MultipartFile is only supported where dart:io is available.'); diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index 7e5469b29f..faacd0b505 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -76,7 +76,7 @@ class MultipartRequest extends BaseRequest { } @override - set contentLength(int value) { + set contentLength(int? value) { throw UnsupportedError('Cannot set the contentLength property of ' 'multipart requests.'); } @@ -135,7 +135,7 @@ class MultipartRequest extends BaseRequest { 'content-disposition: form-data; name="${_browserEncode(file.field)}"'; if (file.filename != null) { - header = '$header; filename="${_browserEncode(file.filename)}"'; + header = '$header; filename="${_browserEncode(file.filename!)}"'; } return '$header\r\n\r\n'; } diff --git a/lib/src/request.dart b/lib/src/request.dart index d882d88cf1..bbb8448abe 100644 --- a/lib/src/request.dart +++ b/lib/src/request.dart @@ -22,7 +22,7 @@ class Request extends BaseRequest { int get contentLength => bodyBytes.length; @override - set contentLength(int value) { + set contentLength(int? value) { throw UnsupportedError('Cannot set the contentLength property of ' 'non-streaming Request objects.'); } @@ -50,10 +50,10 @@ class Request extends BaseRequest { /// charset parameter on that header. Encoding get encoding { if (_contentType == null || - !_contentType.parameters.containsKey('charset')) { + !_contentType!.parameters.containsKey('charset')) { return _defaultEncoding; } - return requiredEncodingForCharset(_contentType.parameters['charset']); + return requiredEncodingForCharset(_contentType!.parameters['charset']!); } set encoding(Encoding value) { @@ -151,14 +151,18 @@ class Request extends BaseRequest { } /// The `Content-Type` header of the request (if it exists) as a [MediaType]. - MediaType get _contentType { + MediaType? get _contentType { var contentType = headers['content-type']; if (contentType == null) return null; return MediaType.parse(contentType); } - set _contentType(MediaType value) { - headers['content-type'] = value.toString(); + set _contentType(MediaType? value) { + if (value == null) { + headers.remove('content-type'); + } else { + headers['content-type'] = value.toString(); + } } /// Throw an error if this request has been finalized. diff --git a/lib/src/response.dart b/lib/src/response.dart index a88669eca2..01899887a7 100644 --- a/lib/src/response.dart +++ b/lib/src/response.dart @@ -29,11 +29,11 @@ class Response extends BaseResponse { /// Creates a new HTTP response with a string body. Response(String body, int statusCode, - {BaseRequest request, + {BaseRequest? request, Map headers = const {}, bool isRedirect = false, bool persistentConnection = true, - String reasonPhrase}) + String? reasonPhrase}) : this.bytes(_encodingForHeaders(headers).encode(body), statusCode, request: request, headers: headers, @@ -43,11 +43,11 @@ class Response extends BaseResponse { /// Create a new HTTP response with a byte array body. Response.bytes(List bodyBytes, int statusCode, - {BaseRequest request, + {BaseRequest? request, Map headers = const {}, bool isRedirect = false, bool persistentConnection = true, - String reasonPhrase}) + String? reasonPhrase}) : bodyBytes = toUint8List(bodyBytes), super(statusCode, contentLength: bodyBytes.length, diff --git a/lib/src/streamed_response.dart b/lib/src/streamed_response.dart index a11386e8cb..e082dced0e 100644 --- a/lib/src/streamed_response.dart +++ b/lib/src/streamed_response.dart @@ -19,12 +19,12 @@ class StreamedResponse extends BaseResponse { /// /// [stream] should be a single-subscription stream. StreamedResponse(Stream> stream, int statusCode, - {int contentLength, - BaseRequest request, + {int? contentLength, + BaseRequest? request, Map headers = const {}, bool isRedirect = false, bool persistentConnection = true, - String reasonPhrase}) + String? reasonPhrase}) : stream = toByteStream(stream), super(statusCode, contentLength: contentLength, diff --git a/lib/src/utils.dart b/lib/src/utils.dart index 9d0648e359..e79108e88a 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -12,11 +12,11 @@ import 'byte_stream.dart'; /// /// mapToQuery({"foo": "bar", "baz": "bang"}); /// //=> "foo=bar&baz=bang" -String mapToQuery(Map map, {Encoding encoding}) { +String mapToQuery(Map map, {Encoding? encoding}) { var pairs = >[]; map.forEach((key, value) => pairs.add([ - Uri.encodeQueryComponent(key, encoding: encoding), - Uri.encodeQueryComponent(value, encoding: encoding) + Uri.encodeQueryComponent(key, encoding: encoding ?? utf8), + Uri.encodeQueryComponent(value, encoding: encoding ?? utf8) ])); return pairs.map((pair) => '${pair[0]}=${pair[1]}').join('&'); } @@ -25,7 +25,7 @@ String mapToQuery(Map map, {Encoding encoding}) { /// /// Returns [fallback] if [charset] is null or if no [Encoding] was found that /// corresponds to [charset]. -Encoding encodingForCharset(String charset, [Encoding fallback = latin1]) { +Encoding encodingForCharset(String? charset, [Encoding fallback = latin1]) { if (charset == null) return fallback; return Encoding.getByName(charset) ?? fallback; } diff --git a/pubspec.yaml b/pubspec.yaml index 07fffd3ca4..ec72d6e8c8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,15 +1,22 @@ name: http -version: 0.12.2 +version: 0.13.0-nullsafety-dev homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. environment: - sdk: ">=2.4.0 <3.0.0" + sdk: '>=2.10.0-2.0.dev <2.11.0' +# Cannot be published until null safety ships +publish_to: none dependencies: - http_parser: ">=0.0.1 <4.0.0" - path: ">=0.9.0 <2.0.0" - pedantic: "^1.0.0" + http_parser: ^3.2.0-nullsafety + meta: ^1.3.0-nullsafety.3 + path: ^1.8.0-nullsafety.1 + pedantic: ^1.10.0-nullsafety dev_dependencies: - test: ^1.3.0 + test: ^1.16.0-nullsafety.4 + +dependency_overrides: + http_parser: + git: https://github.com/dart-lang/http_parser diff --git a/test/io/multipart_test.dart b/test/io/multipart_test.dart index 9128b2e4b9..f2333f5322 100644 --- a/test/io/multipart_test.dart +++ b/test/io/multipart_test.dart @@ -13,7 +13,7 @@ import 'package:test/test.dart'; import 'utils.dart'; void main() { - Directory tempDir; + late Directory tempDir; setUp(() { tempDir = Directory.systemTemp.createTempSync('http_test_'); }); diff --git a/test/io/utils.dart b/test/io/utils.dart index d057fa4c28..7ad3325f8c 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -14,10 +14,10 @@ import 'package:test/test.dart'; export '../utils.dart'; /// The current server instance. -HttpServer _server; +HttpServer? _server; /// The URL for the current server instance. -Uri get serverUrl => Uri.parse('http://localhost:${_server.port}'); +Uri get serverUrl => Uri.parse('http://localhost:${_server!.port}'); /// Starts a new HTTP server. Future startServer() async { @@ -78,7 +78,7 @@ Future startServer() async { requestBody = null; } else if (request.headers.contentType?.charset != null) { var encoding = - requiredEncodingForCharset(request.headers.contentType.charset); + requiredEncodingForCharset(request.headers.contentType!.charset!); requestBody = encoding.decode(requestBodyBytes); } else { requestBody = requestBodyBytes; @@ -109,7 +109,7 @@ Future startServer() async { /// Stops the current HTTP server. void stopServer() { if (_server != null) { - _server.close(); + _server!.close(); _server = null; } } diff --git a/test/utils.dart b/test/utils.dart index 290678f081..ea7cbeb676 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -48,7 +48,7 @@ class _Parse extends Matcher { _Parse(this._matcher); @override - bool matches(item, Map matchState) { + bool matches(Object? item, Map matchState) { if (item is String) { dynamic parsed; try { @@ -83,7 +83,7 @@ class _BodyMatches extends Matcher { _BodyMatches(this._pattern); @override - bool matches(item, Map matchState) { + bool matches(Object? item, Map matchState) { if (item is http.MultipartRequest) { return completes.matches(_checks(item), matchState); } @@ -94,8 +94,8 @@ class _BodyMatches extends Matcher { Future _checks(http.MultipartRequest item) async { var bodyBytes = await item.finalize().toBytes(); var body = utf8.decode(bodyBytes); - var contentType = MediaType.parse(item.headers['content-type']); - var boundary = contentType.parameters['boundary']; + var contentType = MediaType.parse(item.headers['content-type']!); + var boundary = contentType.parameters['boundary']!; var expected = cleanUpLiteral(_pattern) .replaceAll('\n', '\r\n') .replaceAll('{{boundary}}', boundary); From c0dc559b138eac78df95e1ba5c604324ce5a05b4 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 29 Sep 2020 10:35:56 -0700 Subject: [PATCH 079/448] Add dependency override for pkg:test (#477) Because pkg:test does not allow pkg:http ^0.13.0 --- pubspec.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pubspec.yaml b/pubspec.yaml index ec72d6e8c8..241e03e619 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,5 +18,7 @@ dev_dependencies: test: ^1.16.0-nullsafety.4 dependency_overrides: + # Because pkg:test does not support pkg:http ^0.13.0 + test: ^1.16.0-nullsafety.5 http_parser: git: https://github.com/dart-lang/http_parser From 93c2b070b11dbbbd67003dec6c12397bd5c0b5c3 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 29 Sep 2020 16:45:15 -0700 Subject: [PATCH 080/448] Enabled and fix a number of lints (#478) --- analysis_options.yaml | 28 +++++++++++++++++++++++++++- lib/src/boundary_characters.dart | 2 +- lib/src/multipart_request.dart | 17 ++++++++--------- test/io/utils.dart | 3 ++- test/multipart_test.dart | 2 +- test/utils.dart | 14 +++++--------- 6 files changed, 44 insertions(+), 22 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index e4a95424f2..febd150688 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -10,11 +10,14 @@ linter: rules: - annotate_overrides - avoid_bool_literals_in_conditional_expressions + - avoid_catching_errors - avoid_classes_with_only_static_members - avoid_empty_else - avoid_function_literals_in_foreach_calls - avoid_init_to_null - avoid_null_checks_in_equality_operators + - avoid_private_typedef_functions + - avoid_redundant_argument_values - avoid_relative_lib_imports - avoid_renaming_method_parameters - avoid_return_types_on_setters @@ -28,6 +31,7 @@ linter: - camel_case_types - cascade_invocations # comment_references + - constant_identifier_names - control_flow_in_finally - curly_braces_in_flow_control_structures - directives_ordering @@ -36,13 +40,18 @@ linter: - empty_statements - file_names - hash_and_equals + - implementation_imports - invariant_booleans - iterable_contains_unrelated_type + - join_return_with_assignment - library_names - library_prefixes + - lines_longer_than_80_chars - list_remove_unrelated_type + - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_duplicate_case_values + - no_runtimeType_toString - non_constant_identifier_names - null_closures - omit_local_variable_types @@ -51,22 +60,36 @@ linter: - package_names - package_prefixed_library_names - prefer_adjacent_string_concatenation + - prefer_asserts_in_initializer_lists + - prefer_collection_literals - prefer_conditional_assignment + - prefer_const_constructors + - prefer_const_declarations - prefer_contains - prefer_equal_for_default_values + - prefer_expression_function_bodies - prefer_final_fields - - prefer_collection_literals + #- prefer_final_locals + - prefer_function_declarations_over_variables - prefer_generic_function_type_aliases - prefer_initializing_formals + - prefer_inlined_adds + - prefer_interpolation_to_compose_strings - prefer_is_empty - prefer_is_not_empty + - prefer_is_not_operator - prefer_null_aware_operators + - prefer_relative_imports - prefer_single_quotes - prefer_typing_uninitialized_variables + - prefer_void_to_null + - provide_deprecation_message - recursive_getters - slash_for_doc_comments + - sort_pub_dependencies - test_types_in_equals - throw_in_finally + - type_annotate_public_apis - type_init_formals - unawaited_futures - unnecessary_brace_in_string_interps @@ -79,8 +102,11 @@ linter: - unnecessary_overrides - unnecessary_parenthesis - unnecessary_statements + - unnecessary_string_interpolations - unnecessary_this - unrelated_type_equality_checks + - use_is_even_rather_than_modulo - use_rethrow_when_possible + - use_string_buffers - valid_regexps - void_checks diff --git a/lib/src/boundary_characters.dart b/lib/src/boundary_characters.dart index b647e40697..5dcc6013c1 100644 --- a/lib/src/boundary_characters.dart +++ b/lib/src/boundary_characters.dart @@ -10,7 +10,7 @@ /// /// [RFC 2046]: http://tools.ietf.org/html/rfc2046#section-5.1.1. /// [RFC 1521]: https://tools.ietf.org/html/rfc1521#section-4 -const List BOUNDARY_CHARACTERS = [ +const List boundaryCharacters = [ 43, 95, 45, diff --git a/lib/src/multipart_request.dart b/lib/src/multipart_request.dart index faacd0b505..9aeffa23eb 100644 --- a/lib/src/multipart_request.dart +++ b/lib/src/multipart_request.dart @@ -141,14 +141,13 @@ class MultipartRequest extends BaseRequest { } /// Encode [value] in the same way browsers do. - String _browserEncode(String value) { - // http://tools.ietf.org/html/rfc2388 mandates some complex encodings for - // field names and file names, but in practice user agents seem not to - // follow this at all. Instead, they URL-encode `\r`, `\n`, and `\r\n` as - // `\r\n`; URL-encode `"`; and do nothing else (even for `%` or non-ASCII - // characters). We follow their behavior. - return value.replaceAll(_newlineRegExp, '%0D%0A').replaceAll('"', '%22'); - } + String _browserEncode(String value) => + // http://tools.ietf.org/html/rfc2388 mandates some complex encodings for + // field names and file names, but in practice user agents seem not to + // follow this at all. Instead, they URL-encode `\r`, `\n`, and `\r\n` as + // `\r\n`; URL-encode `"`; and do nothing else (even for `%` or non-ASCII + // characters). We follow their behavior. + value.replaceAll(_newlineRegExp, '%0D%0A').replaceAll('"', '%22'); /// Returns a randomly-generated multipart boundary string String _boundaryString() { @@ -156,7 +155,7 @@ class MultipartRequest extends BaseRequest { var list = List.generate( _boundaryLength - prefix.length, (index) => - BOUNDARY_CHARACTERS[_random.nextInt(BOUNDARY_CHARACTERS.length)], + boundaryCharacters[_random.nextInt(boundaryCharacters.length)], growable: false); return '$prefix${String.fromCharCodes(list)}'; } diff --git a/test/io/utils.dart b/test/io/utils.dart index 7ad3325f8c..4f0302f370 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -115,7 +115,8 @@ void stopServer() { } /// A matcher for functions that throw HttpException. -Matcher get throwsClientException => throwsA(TypeMatcher()); +Matcher get throwsClientException => + throwsA(const TypeMatcher()); /// A matcher for functions that throw SocketException. final Matcher throwsSocketException = diff --git a/test/multipart_test.dart b/test/multipart_test.dart index 52dcbc61b8..0293232983 100644 --- a/test/multipart_test.dart +++ b/test/multipart_test.dart @@ -20,7 +20,7 @@ void main() { }); test('boundary characters', () { - var testBoundary = String.fromCharCodes(BOUNDARY_CHARACTERS); + var testBoundary = String.fromCharCodes(boundaryCharacters); var contentType = MediaType.parse('text/plain; boundary=$testBoundary'); var boundary = contentType.parameters['boundary']; expect(boundary, testBoundary); diff --git a/test/utils.dart b/test/utils.dart index ea7cbeb676..fc184c3511 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -63,11 +63,8 @@ class _Parse extends Matcher { } @override - Description describe(Description description) { - return description - .add('parses to a value that ') - .addDescriptionOf(_matcher); - } + Description describe(Description description) => + description.add('parses to a value that ').addDescriptionOf(_matcher); } /// A matcher that validates the body of a multipart request after finalization. @@ -105,14 +102,13 @@ class _BodyMatches extends Matcher { } @override - Description describe(Description description) { - return description.add('has a body that matches "$_pattern"'); - } + Description describe(Description description) => + description.add('has a body that matches "$_pattern"'); } /// A matcher that matches function or future that throws a /// [http.ClientException] with the given [message]. /// /// [message] can be a String or a [Matcher]. -Matcher throwsClientException(message) => throwsA( +Matcher throwsClientException(String message) => throwsA( isA().having((e) => e.message, 'message', message)); From e0017d27265923188f133903878d9933cb583f71 Mon Sep 17 00:00:00 2001 From: Maksym Motornyy Date: Thu, 5 Nov 2020 13:57:15 -0800 Subject: [PATCH 081/448] Migrate BrowserClient from blob to arraybuffer (#489) This allows BrowserClient to be used on Cobalt (which doesn't support blob in XHR). "blob" was used as a workaround for the Dart issue #18542. Since the issue is closed, using "arraybuffer" is more straightforward and efficient. --- CHANGELOG.md | 3 ++- lib/src/browser_client.dart | 28 ++++++++-------------------- pubspec.yaml | 2 +- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d294c1f10..353b11ba6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ This release will be pinned to only allow pre-release sdk versions starting from 2.10.0-2.0.dev, which is the first version where this package will appear in the null safety allow list. -- Added `const` constructor to `ByteStream`. +* Add `const` constructor to `ByteStream`. +* Migrate `BrowserClient` from `blob` to `arraybuffer`. ## 0.12.2 diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index 3980bc0e26..50c5d84179 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -47,7 +47,7 @@ class BrowserClient extends BaseClient { _xhrs.add(xhr); xhr ..open(request.method, '${request.url}', async: true) - ..responseType = 'blob' + ..responseType = 'arraybuffer' ..withCredentials = withCredentials; request.headers.forEach(xhr.setRequestHeader); @@ -56,25 +56,13 @@ class BrowserClient extends BaseClient { // TODO(kevmoo): Waiting on https://github.com/dart-lang/linter/issues/2185 // ignore: void_checks unawaited(xhr.onLoad.first.then((_) { - var blob = xhr.response as Blob; - var reader = FileReader(); - - reader.onLoad.first.then((_) { - var body = reader.result as Uint8List; - completer.complete(StreamedResponse( - ByteStream.fromBytes(body), xhr.status!, - contentLength: body.length, - request: request, - headers: xhr.responseHeaders, - reasonPhrase: xhr.statusText)); - }); - - reader.onError.first.then((error) { - completer.completeError( - ClientException(error.toString(), request.url), StackTrace.current); - }); - - reader.readAsArrayBuffer(blob); + var body = (xhr.response as ByteBuffer).asUint8List(); + completer.complete(StreamedResponse( + ByteStream.fromBytes(body), xhr.status!, + contentLength: body.length, + request: request, + headers: xhr.responseHeaders, + reasonPhrase: xhr.statusText)); })); // TODO(kevmoo): Waiting on https://github.com/dart-lang/linter/issues/2185 diff --git a/pubspec.yaml b/pubspec.yaml index 241e03e619..5fd3d7bf4c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. environment: - sdk: '>=2.10.0-2.0.dev <2.11.0' + sdk: '>=2.12.0-0 <2.13.0' # Cannot be published until null safety ships publish_to: none From d24a9bce042d65bc17cda1305aa38e72480299d1 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 9 Nov 2020 10:09:53 -0800 Subject: [PATCH 082/448] Prepare to publish null safe version (#496) --- pubspec.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 5fd3d7bf4c..be32615682 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,15 +1,13 @@ name: http -version: 0.13.0-nullsafety-dev +version: 0.13.0-nullsafety.0 homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. environment: - sdk: '>=2.12.0-0 <2.13.0' + sdk: '>=2.12.0-0 <3.0.0' -# Cannot be published until null safety ships -publish_to: none dependencies: - http_parser: ^3.2.0-nullsafety + http_parser: ^4.0.0-nullsafety meta: ^1.3.0-nullsafety.3 path: ^1.8.0-nullsafety.1 pedantic: ^1.10.0-nullsafety @@ -18,7 +16,6 @@ dev_dependencies: test: ^1.16.0-nullsafety.4 dependency_overrides: + http_parser: ^4.0.0-nullsafety # Because pkg:test does not support pkg:http ^0.13.0 test: ^1.16.0-nullsafety.5 - http_parser: - git: https://github.com/dart-lang/http_parser From f9c0e88a27cb3b9d21f1c7f5017dbab84c6ecb62 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 9 Nov 2020 10:18:55 -0800 Subject: [PATCH 083/448] fix doc comments (#497) --- analysis_options.yaml | 2 +- lib/http.dart | 3 +++ lib/src/base_client.dart | 1 + lib/src/base_request.dart | 5 ++++- lib/src/base_response.dart | 1 + lib/src/client.dart | 1 + lib/src/mock_client.dart | 1 + lib/src/multipart_file.dart | 1 + lib/src/streamed_request.dart | 8 ++++---- lib/testing.dart | 4 ++++ 10 files changed, 21 insertions(+), 6 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index febd150688..126c3b9a31 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -30,7 +30,7 @@ linter: - await_only_futures - camel_case_types - cascade_invocations - # comment_references + - comment_references - constant_identifier_names - control_flow_in_finally - curly_braces_in_flow_control_structures diff --git a/lib/http.dart b/lib/http.dart index 4f918831a8..0976043195 100644 --- a/lib/http.dart +++ b/lib/http.dart @@ -7,7 +7,10 @@ import 'dart:convert'; import 'dart:typed_data'; import 'src/client.dart'; +import 'src/exception.dart'; +import 'src/request.dart'; import 'src/response.dart'; +import 'src/streamed_request.dart'; export 'src/base_client.dart'; export 'src/base_request.dart'; diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index c47bb1071a..db70215304 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -6,6 +6,7 @@ import 'dart:convert'; import 'dart:typed_data'; import 'base_request.dart'; +import 'byte_stream.dart'; import 'client.dart'; import 'exception.dart'; import 'request.dart'; diff --git a/lib/src/base_request.dart b/lib/src/base_request.dart index 9d1db4b5b1..6380cb0bc9 100644 --- a/lib/src/base_request.dart +++ b/lib/src/base_request.dart @@ -6,6 +6,9 @@ import 'dart:collection'; import 'package:meta/meta.dart'; +import '../http.dart' show get; +import 'base_client.dart'; +import 'base_response.dart'; import 'byte_stream.dart'; import 'client.dart'; import 'streamed_response.dart'; @@ -67,7 +70,7 @@ abstract class BaseRequest { /// The maximum number of redirects to follow when [followRedirects] is true. /// /// If this number is exceeded the [BaseResponse] future will signal a - /// [RedirectException]. Defaults to 5. + /// `RedirectException`. Defaults to 5. int get maxRedirects => _maxRedirects; int _maxRedirects = 5; diff --git a/lib/src/base_response.dart b/lib/src/base_response.dart index 5040245fae..a09dcea4ed 100644 --- a/lib/src/base_response.dart +++ b/lib/src/base_response.dart @@ -2,6 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'base_client.dart'; import 'base_request.dart'; /// The base class for HTTP responses. diff --git a/lib/src/client.dart b/lib/src/client.dart index 3a1c33efb0..d289699f4c 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -10,6 +10,7 @@ import 'base_request.dart'; import 'client_stub.dart' if (dart.library.html) 'browser_client.dart' if (dart.library.io) 'io_client.dart'; +import 'exception.dart'; import 'response.dart'; import 'streamed_response.dart'; diff --git a/lib/src/mock_client.dart b/lib/src/mock_client.dart index 1daa559b73..abfcde20e3 100644 --- a/lib/src/mock_client.dart +++ b/lib/src/mock_client.dart @@ -7,6 +7,7 @@ import 'base_request.dart'; import 'byte_stream.dart'; import 'request.dart'; import 'response.dart'; +import 'streamed_request.dart'; import 'streamed_response.dart'; // TODO(nweiz): once Dart has some sort of Rack- or WSGI-like standard for diff --git a/lib/src/multipart_file.dart b/lib/src/multipart_file.dart index 772493adb0..c773098953 100644 --- a/lib/src/multipart_file.dart +++ b/lib/src/multipart_file.dart @@ -8,6 +8,7 @@ import 'package:http_parser/http_parser.dart'; import 'byte_stream.dart'; import 'multipart_file_stub.dart' if (dart.library.io) 'multipart_file_io.dart'; +import 'multipart_request.dart'; import 'utils.dart'; /// A file to be uploaded as part of a [MultipartRequest]. diff --git a/lib/src/streamed_request.dart b/lib/src/streamed_request.dart index 2beab18a65..7e94ef1386 100644 --- a/lib/src/streamed_request.dart +++ b/lib/src/streamed_request.dart @@ -4,6 +4,7 @@ import 'dart:async'; +import 'base_client.dart'; import 'base_request.dart'; import 'byte_stream.dart'; @@ -11,7 +12,7 @@ import 'byte_stream.dart'; /// connection has been established and the headers have been sent. /// /// When the request is sent via [BaseClient.send], only the headers and -/// whatever data has already been written to [StreamedRequest.stream] will be +/// whatever data has already been written to [StreamedRequest.sink] will be /// sent immediately. More data will be sent as soon as it's written to /// [StreamedRequest.sink], and when the sink is closed the request will end. class StreamedRequest extends BaseRequest { @@ -32,9 +33,8 @@ class StreamedRequest extends BaseRequest { : _controller = StreamController>(sync: true), super(method, url); - /// Freezes all mutable fields other than [stream] and returns a - /// single-subscription [ByteStream] that emits the data being written to - /// [sink]. + /// Freezes all mutable fields and returns a single-subscription [ByteStream] + /// that emits the data being written to [sink]. @override ByteStream finalize() { super.finalize(); diff --git a/lib/testing.dart b/lib/testing.dart index d5c13b6c19..07b5381d6e 100644 --- a/lib/testing.dart +++ b/lib/testing.dart @@ -22,4 +22,8 @@ /// 200, /// headers: {'content-type': 'application/json'}); /// }); +library http.testing; + +import 'src/mock_client.dart'; + export 'src/mock_client.dart'; From edc63c1d1469a0966185b33de908ed9c07d47a5d Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Mon, 9 Nov 2020 21:04:31 -0800 Subject: [PATCH 084/448] Remove unused dart:async imports. (#499) As of Dart 2.1, Future/Stream have been exported from dart:core. --- lib/src/io_client.dart | 1 - test/io/utils.dart | 1 - test/mock_client_test.dart | 1 - 3 files changed, 3 deletions(-) diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index 10539ce0a3..5ee66db0f8 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:io'; import 'base_client.dart'; diff --git a/test/io/utils.dart b/test/io/utils.dart index 4f0302f370..eb1234cc24 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:convert'; import 'dart:io'; diff --git a/test/mock_client_test.dart b/test/mock_client_test.dart index cb7f152e6f..3a18e34b55 100644 --- a/test/mock_client_test.dart +++ b/test/mock_client_test.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:convert'; import 'package:http/http.dart' as http; From 389d45b2f5b441fe6912b9b461ea2bd0b1a05775 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 12 Nov 2020 17:45:38 -0800 Subject: [PATCH 085/448] Delete .test_config (#500) --- .test_config | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 .test_config diff --git a/.test_config b/.test_config deleted file mode 100644 index 412fc5c5cf..0000000000 --- a/.test_config +++ /dev/null @@ -1,3 +0,0 @@ -{ - "test_package": true -} \ No newline at end of file From 3ad4375660c20a82e438333a705ce90395a259da Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 3 Dec 2020 11:14:37 -0800 Subject: [PATCH 086/448] Drop ignores for void_checks false positives (#504) The linked issue is resolved and this lint no longer surfaces here. --- lib/src/browser_client.dart | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index 50c5d84179..d1eb35c1f5 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -53,8 +53,6 @@ class BrowserClient extends BaseClient { var completer = Completer(); - // TODO(kevmoo): Waiting on https://github.com/dart-lang/linter/issues/2185 - // ignore: void_checks unawaited(xhr.onLoad.first.then((_) { var body = (xhr.response as ByteBuffer).asUint8List(); completer.complete(StreamedResponse( @@ -65,8 +63,6 @@ class BrowserClient extends BaseClient { reasonPhrase: xhr.statusText)); })); - // TODO(kevmoo): Waiting on https://github.com/dart-lang/linter/issues/2185 - // ignore: void_checks unawaited(xhr.onError.first.then((_) { // Unfortunately, the underlying XMLHttpRequest API doesn't expose any // specific information about the error itself. From 5af1ea7acddb80d2322cedf688e5886121676ddb Mon Sep 17 00:00:00 2001 From: Julian Date: Fri, 8 Jan 2021 22:59:35 +0100 Subject: [PATCH 087/448] Add optional body to delete (#439) The spec discourages but does not forbid a body. Allow a body argument without falling back on the `send` API since some servers may be designed specifically to require it. Closes #383, closes #206 --- CHANGELOG.md | 2 ++ lib/http.dart | 6 ++++-- lib/src/base_client.dart | 5 +++-- lib/src/client.dart | 3 ++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 353b11ba6d..e08586b2dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ null safety allow list. * Add `const` constructor to `ByteStream`. * Migrate `BrowserClient` from `blob` to `arraybuffer`. +* **Breaking** Added a `body` and `encoding` argument to `Client.delete`. This + is only breaking for implementations which override that method. ## 0.12.2 diff --git a/lib/http.dart b/lib/http.dart index 0976043195..7b42071401 100644 --- a/lib/http.dart +++ b/lib/http.dart @@ -127,8 +127,10 @@ Future patch(Object url, /// the same server, you should use a single [Client] for all of those requests. /// /// For more fine-grained control over the request, use [Request] instead. -Future delete(Object url, {Map? headers}) => - _withClient((client) => client.delete(url, headers: headers)); +Future delete(Object url, + {Map? headers, Object? body, Encoding? encoding}) => + _withClient((client) => + client.delete(url, headers: headers, body: body, encoding: encoding)); /// Sends an HTTP GET request with the given headers to the given URL, which can /// be a [Uri] or a [String], and returns a Future that completes to the body of diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index db70215304..52eae4baf5 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -42,8 +42,9 @@ abstract class BaseClient implements Client { _sendUnstreamed('PATCH', url, headers, body, encoding); @override - Future delete(Object url, {Map? headers}) => - _sendUnstreamed('DELETE', url, headers); + Future delete(Object url, + {Map? headers, Object? body, Encoding? encoding}) => + _sendUnstreamed('DELETE', url, headers, body, encoding); @override Future read(Object url, {Map? headers}) async { diff --git a/lib/src/client.dart b/lib/src/client.dart index d289699f4c..19c2a88726 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -110,7 +110,8 @@ abstract class Client { /// which can be a [Uri] or a [String]. /// /// For more fine-grained control over the request, use [send] instead. - Future delete(Object url, {Map? headers}); + Future delete(Object url, + {Map? headers, Object? body, Encoding? encoding}); /// Sends an HTTP GET request with the given headers to the given URL, which /// can be a [Uri] or a [String], and returns a Future that completes to the From 2cf47e722c6188373b9215d3fb1e284a94c54ef6 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 14 Jan 2021 11:18:13 -0800 Subject: [PATCH 088/448] Tighten argument types to Uri (#507) Closes #375 Make all arguments that were `Object` in order to allow either `String` or `Uri` accept only `Uri`. This gives better static checking for calling code. --- CHANGELOG.md | 2 ++ example/main.dart | 3 ++- lib/http.dart | 44 ++++++++++++++++---------------------- lib/src/base_client.dart | 27 +++++++++++------------ lib/src/client.dart | 42 ++++++++++++++++-------------------- test/mock_client_test.dart | 7 +++--- 6 files changed, 58 insertions(+), 67 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e08586b2dd..b88ea786fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ null safety allow list. * Add `const` constructor to `ByteStream`. * Migrate `BrowserClient` from `blob` to `arraybuffer`. +* **BREAKING** All APIs which previously allowed a `String` or `Uri` to be + passed now require a `Uri`. * **Breaking** Added a `body` and `encoding` argument to `Client.delete`. This is only breaking for implementations which override that method. diff --git a/example/main.dart b/example/main.dart index e53008f97b..d6b4997255 100644 --- a/example/main.dart +++ b/example/main.dart @@ -4,7 +4,8 @@ import 'package:http/http.dart' as http; void main(List arguments) async { // This example uses the Google Books API to search for books about http. // https://developers.google.com/books/docs/overview - var url = 'https://www.googleapis.com/books/v1/volumes?q={http}'; + var url = + Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'}); // Await the http get response, then decode the json-formatted response. var response = await http.get(url); diff --git a/lib/http.dart b/lib/http.dart index 7b42071401..1ea751eab1 100644 --- a/lib/http.dart +++ b/lib/http.dart @@ -25,30 +25,27 @@ export 'src/response.dart'; export 'src/streamed_request.dart'; export 'src/streamed_response.dart'; -/// Sends an HTTP HEAD request with the given headers to the given URL, which -/// can be a [Uri] or a [String]. +/// Sends an HTTP HEAD request with the given headers to the given URL. /// /// This automatically initializes a new [Client] and closes that client once /// the request is complete. If you're planning on making multiple requests to /// the same server, you should use a single [Client] for all of those requests. /// /// For more fine-grained control over the request, use [Request] instead. -Future head(Object url, {Map? headers}) => +Future head(Uri url, {Map? headers}) => _withClient((client) => client.head(url, headers: headers)); -/// Sends an HTTP GET request with the given headers to the given URL, which can -/// be a [Uri] or a [String]. +/// Sends an HTTP GET request with the given headers to the given URL. /// /// This automatically initializes a new [Client] and closes that client once /// the request is complete. If you're planning on making multiple requests to /// the same server, you should use a single [Client] for all of those requests. /// /// For more fine-grained control over the request, use [Request] instead. -Future get(Object url, {Map? headers}) => +Future get(Uri url, {Map? headers}) => _withClient((client) => client.get(url, headers: headers)); -/// Sends an HTTP POST request with the given headers and body to the given URL, -/// which can be a [Uri] or a [String]. +/// Sends an HTTP POST request with the given headers and body to the given URL. /// /// [body] sets the body of the request. It can be a [String], a [List] or /// a [Map]. If it's a String, it's encoded using [encoding] and @@ -66,13 +63,12 @@ Future get(Object url, {Map? headers}) => /// /// For more fine-grained control over the request, use [Request] or /// [StreamedRequest] instead. -Future post(Object url, +Future post(Uri url, {Map? headers, Object? body, Encoding? encoding}) => _withClient((client) => client.post(url, headers: headers, body: body, encoding: encoding)); -/// Sends an HTTP PUT request with the given headers and body to the given URL, -/// which can be a [Uri] or a [String]. +/// Sends an HTTP PUT request with the given headers and body to the given URL. /// /// [body] sets the body of the request. It can be a [String], a [List] or /// a [Map]. If it's a String, it's encoded using [encoding] and @@ -90,13 +86,13 @@ Future post(Object url, /// /// For more fine-grained control over the request, use [Request] or /// [StreamedRequest] instead. -Future put(Object url, +Future put(Uri url, {Map? headers, Object? body, Encoding? encoding}) => _withClient((client) => client.put(url, headers: headers, body: body, encoding: encoding)); /// Sends an HTTP PATCH request with the given headers and body to the given -/// URL, which can be a [Uri] or a [String]. +/// URL. /// /// [body] sets the body of the request. It can be a [String], a [List] or /// a [Map]. If it's a String, it's encoded using [encoding] and @@ -114,27 +110,25 @@ Future put(Object url, /// /// For more fine-grained control over the request, use [Request] or /// [StreamedRequest] instead. -Future patch(Object url, +Future patch(Uri url, {Map? headers, Object? body, Encoding? encoding}) => _withClient((client) => client.patch(url, headers: headers, body: body, encoding: encoding)); -/// Sends an HTTP DELETE request with the given headers to the given URL, which -/// can be a [Uri] or a [String]. +/// Sends an HTTP DELETE request with the given headers to the given URL. /// /// This automatically initializes a new [Client] and closes that client once /// the request is complete. If you're planning on making multiple requests to /// the same server, you should use a single [Client] for all of those requests. /// /// For more fine-grained control over the request, use [Request] instead. -Future delete(Object url, +Future delete(Uri url, {Map? headers, Object? body, Encoding? encoding}) => _withClient((client) => client.delete(url, headers: headers, body: body, encoding: encoding)); -/// Sends an HTTP GET request with the given headers to the given URL, which can -/// be a [Uri] or a [String], and returns a Future that completes to the body of -/// the response as a [String]. +/// Sends an HTTP GET request with the given headers to the given URL and +/// returns a Future that completes to the body of the response as a [String]. /// /// The Future will emit a [ClientException] if the response doesn't have a /// success status code. @@ -145,12 +139,12 @@ Future delete(Object url, /// /// For more fine-grained control over the request and response, use [Request] /// instead. -Future read(Object url, {Map? headers}) => +Future read(Uri url, {Map? headers}) => _withClient((client) => client.read(url, headers: headers)); -/// Sends an HTTP GET request with the given headers to the given URL, which can -/// be a [Uri] or a [String], and returns a Future that completes to the body of -/// the response as a list of bytes. +/// Sends an HTTP GET request with the given headers to the given URL and +/// returns a Future that completes to the body of the response as a list of +/// bytes. /// /// The Future will emit a [ClientException] if the response doesn't have a /// success status code. @@ -161,7 +155,7 @@ Future read(Object url, {Map? headers}) => /// /// For more fine-grained control over the request and response, use [Request] /// instead. -Future readBytes(Object url, {Map? headers}) => +Future readBytes(Uri url, {Map? headers}) => _withClient((client) => client.readBytes(url, headers: headers)); Future _withClient(Future Function(Client) fn) async { diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index 52eae4baf5..efb065f70e 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -19,43 +19,42 @@ import 'streamed_response.dart'; /// maybe [close], and then they get various convenience methods for free. abstract class BaseClient implements Client { @override - Future head(Object url, {Map? headers}) => + Future head(Uri url, {Map? headers}) => _sendUnstreamed('HEAD', url, headers); @override - Future get(Object url, {Map? headers}) => + Future get(Uri url, {Map? headers}) => _sendUnstreamed('GET', url, headers); @override - Future post(Object url, + Future post(Uri url, {Map? headers, Object? body, Encoding? encoding}) => _sendUnstreamed('POST', url, headers, body, encoding); @override - Future put(Object url, + Future put(Uri url, {Map? headers, Object? body, Encoding? encoding}) => _sendUnstreamed('PUT', url, headers, body, encoding); @override - Future patch(Object url, + Future patch(Uri url, {Map? headers, Object? body, Encoding? encoding}) => _sendUnstreamed('PATCH', url, headers, body, encoding); @override - Future delete(Object url, + Future delete(Uri url, {Map? headers, Object? body, Encoding? encoding}) => _sendUnstreamed('DELETE', url, headers, body, encoding); @override - Future read(Object url, {Map? headers}) async { + Future read(Uri url, {Map? headers}) async { final response = await get(url, headers: headers); _checkResponseSuccess(url, response); return response.body; } @override - Future readBytes(Object url, - {Map? headers}) async { + Future readBytes(Uri url, {Map? headers}) async { final response = await get(url, headers: headers); _checkResponseSuccess(url, response); return response.bodyBytes; @@ -73,9 +72,9 @@ abstract class BaseClient implements Client { /// Sends a non-streaming [Request] and returns a non-streaming [Response]. Future _sendUnstreamed( - String method, url, Map? headers, + String method, Uri url, Map? headers, [body, Encoding? encoding]) async { - var request = Request(method, _fromUriOrString(url)); + var request = Request(method, url); if (headers != null) request.headers.addAll(headers); if (encoding != null) request.encoding = encoding; @@ -95,17 +94,15 @@ abstract class BaseClient implements Client { } /// Throws an error if [response] is not successful. - void _checkResponseSuccess(url, Response response) { + void _checkResponseSuccess(Uri url, Response response) { if (response.statusCode < 400) return; var message = 'Request to $url failed with status ${response.statusCode}'; if (response.reasonPhrase != null) { message = '$message: ${response.reasonPhrase}'; } - throw ClientException('$message.', _fromUriOrString(url)); + throw ClientException('$message.', url); } @override void close() {} } - -Uri _fromUriOrString(uri) => uri is String ? Uri.parse(uri) : uri as Uri; diff --git a/lib/src/client.dart b/lib/src/client.dart index 19c2a88726..12695e7123 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -31,20 +31,18 @@ abstract class Client { /// `dart:html` is available, otherwise it will throw an unsupported error. factory Client() => createClient(); - /// Sends an HTTP HEAD request with the given headers to the given URL, which - /// can be a [Uri] or a [String]. + /// Sends an HTTP HEAD request with the given headers to the given URL. /// /// For more fine-grained control over the request, use [send] instead. - Future head(Object url, {Map? headers}); + Future head(Uri url, {Map? headers}); - /// Sends an HTTP GET request with the given headers to the given URL, which - /// can be a [Uri] or a [String]. + /// Sends an HTTP GET request with the given headers to the given URL. /// /// For more fine-grained control over the request, use [send] instead. - Future get(Object url, {Map? headers}); + Future get(Uri url, {Map? headers}); /// Sends an HTTP POST request with the given headers and body to the given - /// URL, which can be a [Uri] or a [String]. + /// URL. /// /// [body] sets the body of the request. It can be a [String], a [List] /// or a [Map]. If it's a String, it's encoded using @@ -61,11 +59,11 @@ abstract class Client { /// [encoding] defaults to [utf8]. /// /// For more fine-grained control over the request, use [send] instead. - Future post(Object url, + Future post(Uri url, {Map? headers, Object? body, Encoding? encoding}); /// Sends an HTTP PUT request with the given headers and body to the given - /// URL, which can be a [Uri] or a [String]. + /// URL. /// /// [body] sets the body of the request. It can be a [String], a [List] /// or a [Map]. If it's a String, it's encoded using @@ -82,11 +80,11 @@ abstract class Client { /// [encoding] defaults to [utf8]. /// /// For more fine-grained control over the request, use [send] instead. - Future put(Object url, + Future put(Uri url, {Map? headers, Object? body, Encoding? encoding}); /// Sends an HTTP PATCH request with the given headers and body to the given - /// URL, which can be a [Uri] or a [String]. + /// URL. /// /// [body] sets the body of the request. It can be a [String], a [List] /// or a [Map]. If it's a String, it's encoded using @@ -103,37 +101,35 @@ abstract class Client { /// [encoding] defaults to [utf8]. /// /// For more fine-grained control over the request, use [send] instead. - Future patch(Object url, + Future patch(Uri url, {Map? headers, Object? body, Encoding? encoding}); - /// Sends an HTTP DELETE request with the given headers to the given URL, - /// which can be a [Uri] or a [String]. + /// Sends an HTTP DELETE request with the given headers to the given URL. /// /// For more fine-grained control over the request, use [send] instead. - Future delete(Object url, + Future delete(Uri url, {Map? headers, Object? body, Encoding? encoding}); - /// Sends an HTTP GET request with the given headers to the given URL, which - /// can be a [Uri] or a [String], and returns a Future that completes to the - /// body of the response as a String. + /// Sends an HTTP GET request with the given headers to the given URL and + /// returns a Future that completes to the body of the response as a String. /// /// The Future will emit a [ClientException] if the response doesn't have a /// success status code. /// /// For more fine-grained control over the request and response, use [send] or /// [get] instead. - Future read(Object url, {Map? headers}); + Future read(Uri url, {Map? headers}); - /// Sends an HTTP GET request with the given headers to the given URL, which - /// can be a [Uri] or a [String], and returns a Future that completes to the - /// body of the response as a list of bytes. + /// Sends an HTTP GET request with the given headers to the given URL and + /// returns a Future that completes to the body of the response as a list of + /// bytes. /// /// The Future will emit a [ClientException] if the response doesn't have a /// success status code. /// /// For more fine-grained control over the request and response, use [send] or /// [get] instead. - Future readBytes(Object url, {Map? headers}); + Future readBytes(Uri url, {Map? headers}); /// Sends an HTTP request and asynchronously returns the response. Future send(BaseRequest request); diff --git a/test/mock_client_test.dart b/test/mock_client_test.dart index 3a18e34b55..db561c51d6 100644 --- a/test/mock_client_test.dart +++ b/test/mock_client_test.dart @@ -16,7 +16,7 @@ void main() { json.encode(request.bodyFields), 200, request: request, headers: {'content-type': 'application/json'})); - var response = await client.post('http://example.com/foo', + var response = await client.post(Uri.http('example.com', '/foo'), body: {'field1': 'value1', 'field2': 'value2'}); expect( response.body, parse(equals({'field1': 'value1', 'field2': 'value2'}))); @@ -30,7 +30,7 @@ void main() { return http.StreamedResponse(stream, 200); }); - var uri = Uri.parse('http://example.com/foo'); + var uri = Uri.http('example.com', '/foo'); var request = http.Request('POST', uri)..body = 'hello, world'; var streamedResponse = await client.send(request); var response = await http.Response.fromStream(streamedResponse); @@ -40,6 +40,7 @@ void main() { test('handles a request with no body', () async { var client = MockClient((_) async => http.Response('you did it', 200)); - expect(await client.read('http://example.com/foo'), equals('you did it')); + expect(await client.read(Uri.http('example.com', '/foo')), + equals('you did it')); }); } From f1949cfdf24f18c380afe4e970b8f6415c32a359 Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Wed, 27 Jan 2021 19:55:57 +0100 Subject: [PATCH 089/448] Migrate to GitHub Actions (#523) --- .github/workflows/test-package.yml | 64 ++++++++++++++++++++++++++++++ .travis.yml | 35 ---------------- README.md | 2 +- 3 files changed, 65 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/test-package.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml new file mode 100644 index 0000000000..0a2a874338 --- /dev/null +++ b/.github/workflows/test-package.yml @@ -0,0 +1,64 @@ +name: Dart CI + +on: + # Run on PRs and pushes to the default branch. + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + - cron: "0 0 * * 0" + +env: + PUB_ENVIRONMENT: bot.github + +jobs: + # Check code formatting and static analysis on a single OS (linux) + # against Dart dev. + analyze: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sdk: [dev] + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v0.3 + with: + sdk: ${{ matrix.sdk }} + - id: install + name: Install dependencies + run: dart pub get + - name: Check formatting + run: dart format --output=none --set-exit-if-changed . + if: always() && steps.install.outcome == 'success' + - name: Analyze code + run: dart analyze --fatal-infos + if: always() && steps.install.outcome == 'success' + + # Run tests on a matrix consisting of two dimensions: + # 1. OS: ubuntu-latest, (macos-latest, windows-latest) + # 2. release channel: dev + test: + needs: analyze + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + # Add macos-latest and/or windows-latest if relevant for this package. + os: [ubuntu-latest] + sdk: [dev] + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v0.3 + with: + sdk: ${{ matrix.sdk }} + - id: install + name: Install dependencies + run: dart pub get + - name: Run VM tests + run: dart test --platform vm + if: always() && steps.install.outcome == 'success' + - name: Run Chrome tests + run: dart test --platform chrome + if: always() && steps.install.outcome == 'success' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 18de1e947d..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: dart - -dart: -- dev - -jobs: - include: - - stage: analyze_and_format - name: "Analyze" - os: linux - script: dartanalyzer --enable-experiment=non-nullable --fatal-warnings --fatal-infos . - - stage: analyze_and_format - name: "Format" - os: linux - script: dartfmt -n --set-exit-if-changed . - - stage: test - name: "Vm Tests" - os: linux - script: pub run --enable-experiment=non-nullable test -p vm - - stage: test - name: "Web Tests" - os: linux - script: pub run --enable-experiment=non-nullable test -p chrome - -stages: -- analyze_and_format -- test - -# Only building master means that we don't run two builds for each pull request. -branches: - only: [master] - -cache: - directories: - - $HOME/.pub-cache diff --git a/README.md b/README.md index 01d7ebb8d5..3fc7427e0b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ A composable, Future-based library for making HTTP requests. [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) -[![Build Status](https://travis-ci.org/dart-lang/http.svg?branch=master)](https://travis-ci.org/dart-lang/http) +[![Build Status](https://github.com/dart-lang/http/workflows/Dart%20CI/badge.svg)](https://github.com/dart-lang/http/actions?query=workflow%3A"Dart+CI"+branch%3Amaster) This package contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, From a8cc8609f76930e92b362cdda8f47db64aba64e8 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 28 Jan 2021 16:23:30 -0800 Subject: [PATCH 090/448] Prepare to publish (#524) - Fix changelog version and remove wording about the allow list which does not apply anymore. - Drop overrides on `test` and `http_parser`. Add dev dependency and override on `shelf` which is the sole cause of an impossible solve. This will be resolved once shelf is published and `test` allows it. --- CHANGELOG.md | 14 +++----------- pubspec.yaml | 6 +++--- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b88ea786fe..06e88c2aef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,17 +1,9 @@ -## 0.13.0-nullsafety-dev - -Pre-release for the null safety migration of this package. - -Note that 0.12.3 may not be the final stable null safety release version, we -reserve the right to release it as a 0.13.0 breaking change. - -This release will be pinned to only allow pre-release sdk versions starting from -2.10.0-2.0.dev, which is the first version where this package will appear in the -null safety allow list. +## 0.13.0-nullsafety.0 +* Migrate to null safety. * Add `const` constructor to `ByteStream`. * Migrate `BrowserClient` from `blob` to `arraybuffer`. -* **BREAKING** All APIs which previously allowed a `String` or `Uri` to be +* **Breaking** All APIs which previously allowed a `String` or `Uri` to be passed now require a `Uri`. * **Breaking** Added a `body` and `encoding` argument to `Client.delete`. This is only breaking for implementations which override that method. diff --git a/pubspec.yaml b/pubspec.yaml index be32615682..bf9f9a3c64 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,9 +13,9 @@ dependencies: pedantic: ^1.10.0-nullsafety dev_dependencies: + shelf: any test: ^1.16.0-nullsafety.4 dependency_overrides: - http_parser: ^4.0.0-nullsafety - # Because pkg:test does not support pkg:http ^0.13.0 - test: ^1.16.0-nullsafety.5 + shelf: + git: git://github.com/dart-lang/shelf.git From d6310c14f38ad02294a6336a745f452d1fbb98b4 Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Mon, 1 Feb 2021 17:55:35 +0100 Subject: [PATCH 091/448] Migrate to GitHub Actions (#16) * Migrate to GitHub Actions * Delete .travis.yml * Update test-package.yml --- .github/workflows/test-package.yml | 91 ++++++++++++++++++++++++++++++ .travis.yml | 30 ---------- 2 files changed, 91 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/test-package.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml new file mode 100644 index 0000000000..229bbf8de4 --- /dev/null +++ b/.github/workflows/test-package.yml @@ -0,0 +1,91 @@ +name: Dart CI + +on: + # Run on PRs and pushes to the default branch. + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + - cron: "0 0 * * 0" + +env: + PUB_ENVIRONMENT: bot.github + +jobs: + # Check code formatting and static analysis on a single OS (linux) + # against Dart dev. + analyze: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sdk: [dev] + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v0.3 + with: + sdk: ${{ matrix.sdk }} + - id: install + name: Install dependencies + run: dart pub get + - name: Check formatting + run: dart format --output=none --set-exit-if-changed . + if: always() && steps.install.outcome == 'success' + - name: Analyze code + run: dart analyze --fatal-infos + if: always() && steps.install.outcome == 'success' + + # Run tests on a matrix consisting of two dimensions: + # 1. OS: ubuntu-latest, (macos-latest, windows-latest) + # 2. release channel: dev + test: + needs: analyze + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + # Add macos-latest and/or windows-latest if relevant for this package. + os: [ubuntu-latest] + sdk: [dev] + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v0.3 + with: + sdk: ${{ matrix.sdk }} + - id: install + name: Install dependencies + run: dart pub get + - name: Run VM tests + run: dart test --platform vm + if: always() && steps.install.outcome == 'success' + - name: Run Chrome tests + run: dart test --platform chrome + if: always() && steps.install.outcome == 'success' + + # Run tests on a matrix consisting of two dimensions: + # 1. OS: ubuntu-latest, (macos-latest, windows-latest) + # 2. release: 2.1.0 + test-legacy-sdk: + needs: analyze + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + # Add macos-latest and/or windows-latest if relevant for this package. + os: [ubuntu-latest] + sdk: [2.1.0] + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v0.3 + with: + sdk: ${{ matrix.sdk }} + - id: install + name: Install dependencies + run: pub get + - name: Run VM tests + run: pub run test --platform vm + if: always() && steps.install.outcome == 'success' + - name: Run Chrome tests + run: pub run test --platform chrome + if: always() && steps.install.outcome == 'success' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 45c4a8e2f0..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: dart - -dart: -- 2.1.0 -- dev - -dart_task: - - test: --platform vm - xvfb: false - - test: --platform chrome - -jobs: - include: - # Only validate formatting using the dev release - - dart: dev - dart_task: dartfmt - - dart: dev - dart_task: - dartanalyzer: --fatal-infos --fatal-warnings . - - dart: 2.8.4 - dart_task: - dartanalyzer: --fatal-warnings . - -# Only building master means that we don't run two builds for each pull request. -branches: - only: [master] - -cache: - directories: - - $HOME/.pub-cache From 869893d098641c7dc6b77063f77463784ba02ef0 Mon Sep 17 00:00:00 2001 From: Jacob MacDonald Date: Fri, 5 Feb 2021 12:56:26 -0800 Subject: [PATCH 092/448] stable null safety release (#526) --- CHANGELOG.md | 4 ++++ pubspec.yaml | 16 ++++++---------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06e88c2aef..7707e7460c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.13.0 + +* Stable null safety release. + ## 0.13.0-nullsafety.0 * Migrate to null safety. diff --git a/pubspec.yaml b/pubspec.yaml index bf9f9a3c64..9f9512bade 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.0-nullsafety.0 +version: 0.13.0 homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. @@ -7,15 +7,11 @@ environment: sdk: '>=2.12.0-0 <3.0.0' dependencies: - http_parser: ^4.0.0-nullsafety - meta: ^1.3.0-nullsafety.3 - path: ^1.8.0-nullsafety.1 - pedantic: ^1.10.0-nullsafety + http_parser: ^4.0.0 + meta: ^1.3.0 + path: ^1.8.0 + pedantic: ^1.10.0 dev_dependencies: - shelf: any + shelf: ^1.0.0-nullsafety.0 test: ^1.16.0-nullsafety.4 - -dependency_overrides: - shelf: - git: git://github.com/dart-lang/shelf.git From 4c0fef8b9e01f398d2145387def968797d07e162 Mon Sep 17 00:00:00 2001 From: Erik Pettersson Date: Tue, 9 Mar 2021 19:04:49 +0100 Subject: [PATCH 093/448] Pass URI instead of String in README (#535) Fixes #533 Use Uri.Parse to match the implementation --- CHANGELOG.md | 2 ++ README.md | 4 ++-- pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7707e7460c..c4d8c0778a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.13.1-dev + ## 0.13.0 * Stable null safety release. diff --git a/README.md b/README.md index 3fc7427e0b..bc3bbc16b6 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ you to make individual HTTP requests with minimal hassle: ```dart import 'package:http/http.dart' as http; -var url = 'https://example.com/whatsit/create'; +var url = Uri.parse('https://example.com/whatsit/create'); var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'}); print('Response status: ${response.statusCode}'); print('Response body: ${response.body}'); @@ -30,7 +30,7 @@ If you do this, make sure to close the client when you're done: ```dart var client = http.Client(); try { - var uriResponse = await client.post('https://example.com/whatsit/create', + var uriResponse = await client.post(Uri.parse('https://example.com/whatsit/create'), body: {'name': 'doodle', 'color': 'blue'}); print(await client.get(uriResponse.bodyFields['uri'])); } finally { diff --git a/pubspec.yaml b/pubspec.yaml index 9f9512bade..ca57b396ac 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.0 +version: 0.13.1-dev homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. From fe0cdd1d2c12d35eb79d13aa027e3f4eda8e5cd9 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 9 Mar 2021 13:13:41 -0800 Subject: [PATCH 094/448] Migrate to null safety (#17) Named arguments are non-nullable with a default instead of a null default. This means that code which was passing null through instead of omitting the argument will be broken, even in unsound mode. I don't expect any code was doing this, and this API is not one that should need to be wrapped with argument forwarding. --- .github/workflows/test-package.yml | 40 +++++------------------ CHANGELOG.md | 6 ++-- example/example.dart | 2 +- lib/http_retry.dart | 52 +++++++++++++++++------------- pubspec.yaml | 14 ++++---- test/http_retry_test.dart | 30 ++++++++--------- 6 files changed, 64 insertions(+), 80 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 229bbf8de4..e8ed4057bc 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -20,7 +20,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [dev] + sdk: [2.12.0, dev] steps: - uses: actions/checkout@v2 - uses: dart-lang/setup-dart@v0.3 @@ -31,14 +31,17 @@ jobs: run: dart pub get - name: Check formatting run: dart format --output=none --set-exit-if-changed . - if: always() && steps.install.outcome == 'success' + if: matrix.sdk == 'dev' && steps.install.outcome == 'success' - name: Analyze code run: dart analyze --fatal-infos - if: always() && steps.install.outcome == 'success' + if: matrix.sdk == 'dev' && steps.install.outcome == 'success' + - name: Analyze code + run: dart analyze --fatal-infos + if: matrix.sdk != 'dev' && steps.install.outcome == 'success' # Run tests on a matrix consisting of two dimensions: # 1. OS: ubuntu-latest, (macos-latest, windows-latest) - # 2. release channel: dev + # 2. release channel: oldest stable, dev test: needs: analyze runs-on: ${{ matrix.os }} @@ -47,7 +50,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [dev] + sdk: [2.12.0, dev] steps: - uses: actions/checkout@v2 - uses: dart-lang/setup-dart@v0.3 @@ -62,30 +65,3 @@ jobs: - name: Run Chrome tests run: dart test --platform chrome if: always() && steps.install.outcome == 'success' - - # Run tests on a matrix consisting of two dimensions: - # 1. OS: ubuntu-latest, (macos-latest, windows-latest) - # 2. release: 2.1.0 - test-legacy-sdk: - needs: analyze - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - # Add macos-latest and/or windows-latest if relevant for this package. - os: [ubuntu-latest] - sdk: [2.1.0] - steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.3 - with: - sdk: ${{ matrix.sdk }} - - id: install - name: Install dependencies - run: pub get - - name: Run VM tests - run: pub run test --platform vm - if: always() && steps.install.outcome == 'success' - - name: Run Chrome tests - run: pub run test --platform chrome - if: always() && steps.install.outcome == 'success' diff --git a/CHANGELOG.md b/CHANGELOG.md index 30a8575684..a4c55a5a31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,9 @@ -## 0.1.2 +## 0.2.0-dev +* Migrate to null safety. * Fix a number of lints affecting package maintenance score. -* Update minimum Dart SDK to `2.1.0`. +* **BREAKING** `null` may not be passed for most named arguments, instead the + argument must be omitted. ## 0.1.1+3 diff --git a/example/example.dart b/example/example.dart index c024f9307d..863c36e426 100644 --- a/example/example.dart +++ b/example/example.dart @@ -8,7 +8,7 @@ import 'package:http_retry/http_retry.dart'; Future main() async { final client = RetryClient(http.Client()); try { - print(await client.read('http://example.org')); + print(await client.read(Uri.http('example.org', ''))); } finally { client.close(); } diff --git a/lib/http_retry.dart b/lib/http_retry.dart index 825b5a269d..f9298d15d3 100644 --- a/lib/http_retry.dart +++ b/lib/http_retry.dart @@ -7,7 +7,6 @@ import 'dart:math' as math; import 'package:async/async.dart'; import 'package:http/http.dart'; -import 'package:pedantic/pedantic.dart'; /// An HTTP client wrapper that automatically retries failing requests. class RetryClient extends BaseClient { @@ -21,13 +20,13 @@ class RetryClient extends BaseClient { final bool Function(BaseResponse) _when; /// The callback that determines whether a request when an error is thrown. - final bool Function(dynamic, StackTrace) _whenError; + final bool Function(Object, StackTrace) _whenError; /// The callback that determines how long to wait before retrying a request. final Duration Function(int) _delay; /// The callback to call to indicate that a request is being retried. - final void Function(BaseRequest, BaseResponse, int) _onRetry; + final void Function(BaseRequest, BaseResponse?, int)? _onRetry; /// Creates a client wrapping [_inner] that retries HTTP requests. /// @@ -50,17 +49,15 @@ class RetryClient extends BaseClient { /// error for which [whenError] returned `true`. RetryClient( this._inner, { - int retries, - bool Function(BaseResponse) when, - bool Function(Object, StackTrace) whenError, - Duration Function(int retryCount) delay, - void Function(BaseRequest, BaseResponse, int retryCount) onRetry, - }) : _retries = retries ?? 3, - _when = when ?? ((response) => response.statusCode == 503), - _whenError = whenError ?? ((_, __) => false), - _delay = delay ?? - ((retryCount) => - const Duration(milliseconds: 500) * math.pow(1.5, retryCount)), + int retries = 3, + bool Function(BaseResponse) when = _defaultWhen, + bool Function(Object, StackTrace) whenError = _defaultWhenError, + Duration Function(int retryCount) delay = _defaultDelay, + void Function(BaseRequest, BaseResponse?, int retryCount)? onRetry, + }) : _retries = retries, + _when = when, + _whenError = whenError, + _delay = delay, _onRetry = onRetry { RangeError.checkNotNegative(_retries, 'retries'); } @@ -74,9 +71,9 @@ class RetryClient extends BaseClient { RetryClient.withDelays( Client inner, Iterable delays, { - bool Function(BaseResponse) when, - bool Function(Object, StackTrace) whenError, - void Function(BaseRequest, BaseResponse, int retryCount) onRetry, + bool Function(BaseResponse) when = _defaultWhen, + bool Function(Object, StackTrace) whenError = _defaultWhenError, + void Function(BaseRequest, BaseResponse?, int retryCount)? onRetry, }) : this._withDelays( inner, delays.toList(), @@ -88,9 +85,9 @@ class RetryClient extends BaseClient { RetryClient._withDelays( Client inner, List delays, { - bool Function(BaseResponse) when, - bool Function(Object, StackTrace) whenError, - void Function(BaseRequest, BaseResponse, int) onRetry, + required bool Function(BaseResponse) when, + required bool Function(Object, StackTrace) whenError, + required void Function(BaseRequest, BaseResponse?, int)? onRetry, }) : this( inner, retries: delays.length, @@ -106,7 +103,7 @@ class RetryClient extends BaseClient { var i = 0; for (;;) { - StreamedResponse response; + StreamedResponse? response; try { response = await _inner.send(_copyRequest(request, splitter.split())); } catch (error, stackTrace) { @@ -118,11 +115,11 @@ class RetryClient extends BaseClient { // Make sure the response stream is listened to so that we don't leave // dangling connections. - unawaited(response.stream.listen((_) {}).cancel()?.catchError((_) {})); + _unawaited(response.stream.listen((_) {}).cancel().catchError((_) {})); } await Future.delayed(_delay(i)); - if (_onRetry != null) _onRetry(request, response, i); + _onRetry?.call(request, response, i); i++; } } @@ -147,3 +144,12 @@ class RetryClient extends BaseClient { @override void close() => _inner.close(); } + +bool _defaultWhen(BaseResponse response) => response.statusCode == 503; + +bool _defaultWhenError(Object error, StackTrace stackTrace) => false; + +Duration _defaultDelay(int retryCount) => + const Duration(milliseconds: 500) * math.pow(1.5, retryCount); + +void _unawaited(Future? f) {} diff --git a/pubspec.yaml b/pubspec.yaml index 87e0bb1350..9988670df7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,18 +1,18 @@ name: http_retry -version: 0.1.2-dev +version: 0.2.0-dev description: >- A wrapper for package:http clients that automatically retries requests homepage: https://github.com/dart-lang/http_retry environment: - sdk: '>=2.1.0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' dependencies: - async: ^2.0.7 - http: '>=0.11.0 <0.13.0' - pedantic: ^1.0.0 + async: ^2.5.0 + http: ^0.13.0 dev_dependencies: - fake_async: ^1.0.0 - test: ^1.2.0 + fake_async: ^1.2.0 + pedantic: ^1.10.0 + test: ^1.16.0 diff --git a/test/http_retry_test.dart b/test/http_retry_test.dart index bce4b738ff..f61b00fb79 100644 --- a/test/http_retry_test.dart +++ b/test/http_retry_test.dart @@ -13,7 +13,7 @@ void main() { test('a request has a non-503 error code', () async { final client = RetryClient( MockClient(expectAsync1((_) async => Response('', 502), count: 1))); - final response = await client.get('http://example.org'); + final response = await client.get(Uri.http('example.org', '')); expect(response.statusCode, equals(502)); }); @@ -21,7 +21,7 @@ void main() { final client = RetryClient( MockClient(expectAsync1((_) async => Response('', 503), count: 1)), when: (_) => false); - final response = await client.get('http://example.org'); + final response = await client.get(Uri.http('example.org', '')); expect(response.statusCode, equals(503)); }); @@ -29,7 +29,7 @@ void main() { final client = RetryClient( MockClient(expectAsync1((_) async => Response('', 503), count: 1)), retries: 0); - final response = await client.get('http://example.org'); + final response = await client.get(Uri.http('example.org', '')); expect(response.statusCode, equals(503)); }); }); @@ -43,7 +43,7 @@ void main() { }, count: 2)), delay: (_) => Duration.zero); - final response = await client.get('http://example.org'); + final response = await client.get(Uri.http('example.org', '')); expect(response.statusCode, equals(200)); }); @@ -58,7 +58,7 @@ void main() { when: (response) => response.headers['retry'] == 'true', delay: (_) => Duration.zero); - final response = await client.get('http://example.org'); + final response = await client.get(Uri.http('example.org', '')); expect(response.headers, containsPair('retry', 'false')); expect(response.statusCode, equals(503)); }); @@ -75,7 +75,7 @@ void main() { error is StateError && error.message == 'oh no', delay: (_) => Duration.zero); - final response = await client.get('http://example.org'); + final response = await client.get(Uri.http('example.org', '')); expect(response.statusCode, equals(200)); }); @@ -85,7 +85,7 @@ void main() { whenError: (error, _) => error == 'oh yeah', delay: (_) => Duration.zero); - expect(client.get('http://example.org'), + expect(client.get(Uri.http('example.org', '')), throwsA(isStateError.having((e) => e.message, 'message', 'oh no'))); }); @@ -93,7 +93,7 @@ void main() { final client = RetryClient( MockClient(expectAsync1((_) async => Response('', 503), count: 4)), delay: (_) => Duration.zero); - final response = await client.get('http://example.org'); + final response = await client.get(Uri.http('example.org', '')); expect(response.statusCode, equals(503)); }); @@ -102,7 +102,7 @@ void main() { MockClient(expectAsync1((_) async => Response('', 503), count: 13)), retries: 12, delay: (_) => Duration.zero); - final response = await client.get('http://example.org'); + final response = await client.get(Uri.http('example.org', '')); expect(response.statusCode, equals(503)); }); @@ -124,7 +124,7 @@ void main() { return Response('', 503); }, count: 4))); - expect(client.get('http://example.org'), completes); + expect(client.get(Uri.http('example.org', '')), completes); fake.elapse(const Duration(minutes: 10)); }); }); @@ -149,7 +149,7 @@ void main() { }, count: 4)), delay: (requestCount) => Duration(seconds: requestCount)); - expect(client.get('http://example.org'), completes); + expect(client.get(Uri.http('example.org', '')), completes); fake.elapse(const Duration(minutes: 10)); }); }); @@ -178,7 +178,7 @@ void main() { Duration(seconds: 12) ]); - expect(client.get('http://example.org'), completes); + expect(client.get(Uri.http('example.org', '')), completes); fake.elapse(const Duration(minutes: 10)); }); }); @@ -190,12 +190,12 @@ void main() { retries: 2, delay: (_) => Duration.zero, onRetry: expectAsync3((request, response, retryCount) { - expect(request.url, equals(Uri.parse('http://example.org'))); - expect(response.statusCode, equals(503)); + expect(request.url, equals(Uri.http('example.org', ''))); + expect(response?.statusCode, equals(503)); expect(retryCount, equals(count)); count++; }, count: 2)); - final response = await client.get('http://example.org'); + final response = await client.get(Uri.http('example.org', '')); expect(response.statusCode, equals(503)); }); From 7d4ddc0546475ef8f0ae40dbd6dcf5321532106c Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 11 Mar 2021 12:58:53 -0800 Subject: [PATCH 095/448] Prepare to publish null safety release (#18) --- CHANGELOG.md | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4c55a5a31..5cc86fdd0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.2.0-dev +## 0.2.0 * Migrate to null safety. * Fix a number of lints affecting package maintenance score. diff --git a/pubspec.yaml b/pubspec.yaml index 9988670df7..908463eb29 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http_retry -version: 0.2.0-dev +version: 0.2.0 description: >- A wrapper for package:http clients that automatically retries requests From 02f043c81460ddfcce90c046c1762ec7a83473cb Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 19 Mar 2021 09:00:42 -0700 Subject: [PATCH 096/448] Prepare to publish (#543) This is worth publishing as a README update even though the code didn't change. --- CHANGELOG.md | 4 +++- pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c4d8c0778a..caa987edc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ -## 0.13.1-dev +## 0.13.1 + +* Fix code samples in `README` to pass a `Uri` instance. ## 0.13.0 diff --git a/pubspec.yaml b/pubspec.yaml index ca57b396ac..b20822684e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.1-dev +version: 0.13.1 homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. From 27c113d03eef7fd3746899f9a8b0f647d47a44fb Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 19 Mar 2021 09:21:08 -0700 Subject: [PATCH 097/448] Use stable SDK and dev deps (#544) --- pubspec.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index b20822684e..0b9505edb9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. environment: - sdk: '>=2.12.0-0 <3.0.0' + sdk: '>=2.12.0 <3.0.0' dependencies: http_parser: ^4.0.0 @@ -13,5 +13,5 @@ dependencies: pedantic: ^1.10.0 dev_dependencies: - shelf: ^1.0.0-nullsafety.0 - test: ^1.16.0-nullsafety.4 + shelf: ^1.1.0 + test: ^1.16.0 From 05884ad64cc14bbfd5279ca1f921a003178b37e3 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 19 Mar 2021 09:36:06 -0700 Subject: [PATCH 098/448] Add testing on Dart 2.12.0 (#545) --- .github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 0a2a874338..4f04450f6f 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [dev] + sdk: [2.12.0, dev] steps: - uses: actions/checkout@v2 - uses: dart-lang/setup-dart@v0.3 From 15078beb3ff1ab42146ad9c5fbeab4e858c61d16 Mon Sep 17 00:00:00 2001 From: Franklin Yow <58489007+franklinyow@users.noreply.github.com> Date: Mon, 5 Apr 2021 16:26:28 -0700 Subject: [PATCH 099/448] Update LICENSE (#554) Changes to comply with internal review --- LICENSE | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 5c60afea39..000cd7beca 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,5 @@ -Copyright 2014, the Dart project authors. All rights reserved. +Copyright 2014, the Dart project authors. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -9,7 +10,7 @@ met: copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. From 1c8aa5481923feb94f2201ecb1ddcdf11877f143 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 12 Apr 2021 20:22:23 -0700 Subject: [PATCH 100/448] Prepare to merge into package:http --- .github/workflows/test-package.yml | 67 ---------------------- .gitignore | 3 - AUTHORS | 6 -- CHANGELOG.md | 27 --------- CONTRIBUTING.md | 53 ------------------ LICENSE | 26 --------- analysis_options.yaml | 84 ---------------------------- example/{example.dart => retry.dart} | 0 lib/{http_retry.dart => retry.dart} | 0 pubspec.yaml | 18 ------ 10 files changed, 284 deletions(-) delete mode 100644 .github/workflows/test-package.yml delete mode 100644 .gitignore delete mode 100644 AUTHORS delete mode 100644 CHANGELOG.md delete mode 100644 CONTRIBUTING.md delete mode 100644 LICENSE delete mode 100644 analysis_options.yaml rename example/{example.dart => retry.dart} (100%) rename lib/{http_retry.dart => retry.dart} (100%) delete mode 100644 pubspec.yaml diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml deleted file mode 100644 index e8ed4057bc..0000000000 --- a/.github/workflows/test-package.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Dart CI - -on: - # Run on PRs and pushes to the default branch. - push: - branches: [ master ] - pull_request: - branches: [ master ] - schedule: - - cron: "0 0 * * 0" - -env: - PUB_ENVIRONMENT: bot.github - -jobs: - # Check code formatting and static analysis on a single OS (linux) - # against Dart dev. - analyze: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - sdk: [2.12.0, dev] - steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.3 - with: - sdk: ${{ matrix.sdk }} - - id: install - name: Install dependencies - run: dart pub get - - name: Check formatting - run: dart format --output=none --set-exit-if-changed . - if: matrix.sdk == 'dev' && steps.install.outcome == 'success' - - name: Analyze code - run: dart analyze --fatal-infos - if: matrix.sdk == 'dev' && steps.install.outcome == 'success' - - name: Analyze code - run: dart analyze --fatal-infos - if: matrix.sdk != 'dev' && steps.install.outcome == 'success' - - # Run tests on a matrix consisting of two dimensions: - # 1. OS: ubuntu-latest, (macos-latest, windows-latest) - # 2. release channel: oldest stable, dev - test: - needs: analyze - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - # Add macos-latest and/or windows-latest if relevant for this package. - os: [ubuntu-latest] - sdk: [2.12.0, dev] - steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.3 - with: - sdk: ${{ matrix.sdk }} - - id: install - name: Install dependencies - run: dart pub get - - name: Run VM tests - run: dart test --platform vm - if: always() && steps.install.outcome == 'success' - - name: Run Chrome tests - run: dart test --platform chrome - if: always() && steps.install.outcome == 'success' diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 49ce72d76a..0000000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.dart_tool/ -.packages -pubspec.lock diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index e8063a8cd6..0000000000 --- a/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -# Below is a list of people and organizations that have contributed -# to the project. Names should be added to the list like so: -# -# Name/Organization - -Google Inc. diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 5cc86fdd0f..0000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,27 +0,0 @@ -## 0.2.0 - -* Migrate to null safety. -* Fix a number of lints affecting package maintenance score. -* **BREAKING** `null` may not be passed for most named arguments, instead the - argument must be omitted. - -## 0.1.1+3 - -* Support the latest `pkg:http` release. - -## 0.1.1+2 - -* Set max SDK version to `<3.0.0`, and adjust other dependencies. - -## 0.1.1+1 - -* Update SDK version to 2.0.0-dev.17.0. - -## 0.1.1 - -* Add a `whenError()` parameter to allow requests to be retried when they - encounter networking errors. - -## 0.1.0 - -* Initial version. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 615b92ff96..0000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,53 +0,0 @@ -Want to contribute? Great! First, read this page (including the small print at -the end). - -### Before you contribute - -Before we can use your code, you must sign the -[Google Individual Contributor License Agreement][CLA] (CLA), which you can do -online. The CLA is necessary mainly because you own the copyright to your -changes, even after your contribution becomes part of our codebase, so we need -your permission to use and distribute your code. We also need to be sure of -various other things—for instance that you'll tell us if you know that your code -infringes on other people's patents. You don't have to sign the CLA until after -you've submitted your code for review and a member has approved it, but you must -do it before we can put your code into our codebase. - -Before you start working on a larger contribution, you should get in touch with -us first through the issue tracker with your idea so that we can help out and -possibly guide you. Coordinating up front makes it much easier to avoid -frustration later on. - -[CLA]: https://cla.developers.google.com/about/google-individual - -### Code reviews - -All submissions, including submissions by project members, require review. We -recommend [forking the repository][fork], making changes in your fork, and -[sending us a pull request][pr] so we can review the changes and merge them into -this repository. - -[fork]: https://help.github.com/articles/about-forks/ -[pr]: https://help.github.com/articles/creating-a-pull-request/ - -Functional changes will require tests to be added or changed. The tests live in -the `test/` directory, and are run with `pub run test`. If you need to create -new tests, use the existing tests as a guideline for what they should look like. - -Before you send your pull request, make sure all the tests pass! - -### File headers - -All files in the project must start with the following header. - - // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file - // for details. All rights reserved. Use of this source code is governed by a - // BSD-style license that can be found in the LICENSE file. - -### The small print - -Contributions made by corporations are covered by a different agreement than the -one above, the -[Software Grant and Corporate Contributor License Agreement][CCLA]. - -[CCLA]: https://developers.google.com/open-source/cla/corporate diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 389ce98563..0000000000 --- a/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright 2017, the Dart project authors. All rights reserved. -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google Inc. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/analysis_options.yaml b/analysis_options.yaml deleted file mode 100644 index 8870dbb2ed..0000000000 --- a/analysis_options.yaml +++ /dev/null @@ -1,84 +0,0 @@ -include: package:pedantic/analysis_options.yaml - -analyzer: - strong-mode: - implicit-casts: false - - errors: - dead_code: error - unused_element: error - unused_import: error - unused_local_variable: error - -linter: - rules: - - avoid_bool_literals_in_conditional_expressions - - avoid_catching_errors - - avoid_classes_with_only_static_members - - avoid_function_literals_in_foreach_calls - - avoid_private_typedef_functions - - avoid_redundant_argument_values - - avoid_renaming_method_parameters - - avoid_returning_null - - avoid_returning_null_for_future - - avoid_returning_null_for_void - - avoid_returning_this - - avoid_single_cascade_in_expression_statements - - avoid_unused_constructor_parameters - - avoid_void_async - - await_only_futures - - camel_case_types - - cancel_subscriptions - - cascade_invocations - - comment_references - - constant_identifier_names - - control_flow_in_finally - - directives_ordering - - empty_statements - - file_names - - hash_and_equals - - implementation_imports - - invariant_booleans - - iterable_contains_unrelated_type - - join_return_with_assignment - - lines_longer_than_80_chars - - list_remove_unrelated_type - - literal_only_boolean_expressions - - missing_whitespace_between_adjacent_strings - - no_adjacent_strings_in_list - - no_runtimeType_toString - - non_constant_identifier_names - - only_throw_errors - - overridden_fields - - package_api_docs - - package_names - - package_prefixed_library_names - - prefer_asserts_in_initializer_lists - - prefer_const_constructors - - prefer_const_declarations - - prefer_expression_function_bodies - - prefer_final_locals - - prefer_function_declarations_over_variables - - prefer_initializing_formals - - prefer_inlined_adds - - prefer_interpolation_to_compose_strings - - prefer_is_not_operator - - prefer_null_aware_operators - - prefer_relative_imports - - prefer_typing_uninitialized_variables - - prefer_void_to_null - - provide_deprecation_message - - sort_pub_dependencies - - test_types_in_equals - - throw_in_finally - - unnecessary_await_in_return - - unnecessary_brace_in_string_interps - - unnecessary_getters_setters - - unnecessary_lambdas - - unnecessary_null_aware_assignments - - unnecessary_overrides - - unnecessary_parenthesis - - unnecessary_statements - - unnecessary_string_interpolations - - use_string_buffers - - void_checks diff --git a/example/example.dart b/example/retry.dart similarity index 100% rename from example/example.dart rename to example/retry.dart diff --git a/lib/http_retry.dart b/lib/retry.dart similarity index 100% rename from lib/http_retry.dart rename to lib/retry.dart diff --git a/pubspec.yaml b/pubspec.yaml deleted file mode 100644 index 908463eb29..0000000000 --- a/pubspec.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: http_retry -version: 0.2.0 - -description: >- - A wrapper for package:http clients that automatically retries requests -homepage: https://github.com/dart-lang/http_retry - -environment: - sdk: '>=2.12.0 <3.0.0' - -dependencies: - async: ^2.5.0 - http: ^0.13.0 - -dev_dependencies: - fake_async: ^1.2.0 - pedantic: ^1.10.0 - test: ^1.16.0 From f4b08909d303c74baa6b04781f9391425397bca9 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 23 Apr 2021 10:10:45 -0700 Subject: [PATCH 101/448] CI update (#559) * fix directive sorting --- .github/workflows/test-package.yml | 4 ++-- test/html/client_test.dart | 3 +-- test/html/streamed_request_test.dart | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 4f04450f6f..cdc25d958a 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.3 + - uses: dart-lang/setup-dart@v1.0 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [2.12.0, dev] steps: - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.3 + - uses: dart-lang/setup-dart@v1.0 with: sdk: ${{ matrix.sdk }} - id: install diff --git a/test/html/client_test.dart b/test/html/client_test.dart index ffbbff65cf..22ed98654e 100644 --- a/test/html/client_test.dart +++ b/test/html/client_test.dart @@ -3,9 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('browser') - -import 'package:http/http.dart' as http; import 'package:http/browser_client.dart'; +import 'package:http/http.dart' as http; import 'package:test/test.dart'; import 'utils.dart'; diff --git a/test/html/streamed_request_test.dart b/test/html/streamed_request_test.dart index 22130840df..d4d495836a 100644 --- a/test/html/streamed_request_test.dart +++ b/test/html/streamed_request_test.dart @@ -3,9 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('browser') - -import 'package:http/http.dart' as http; import 'package:http/browser_client.dart'; +import 'package:http/http.dart' as http; import 'package:test/test.dart'; import 'utils.dart'; From 97ca5e974814748c79967b934cccff93d8c11df8 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 23 Apr 2021 10:54:25 -0700 Subject: [PATCH 102/448] enable avoid dynamic calls lint (#560) Co-authored-by: Nate Bosch --- CHANGELOG.md | 2 ++ analysis_options.yaml | 1 + example/main.dart | 4 +++- pubspec.yaml | 2 +- test/io/client_test.dart | 4 ++-- test/io/utils.dart | 17 ++++++++++------- 6 files changed, 19 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index caa987edc4..2750afd601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.13.2-dev + ## 0.13.1 * Fix code samples in `README` to pass a `Uri` instance. diff --git a/analysis_options.yaml b/analysis_options.yaml index 126c3b9a31..c2c719d1e0 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -12,6 +12,7 @@ linter: - avoid_bool_literals_in_conditional_expressions - avoid_catching_errors - avoid_classes_with_only_static_members + - avoid_dynamic_calls - avoid_empty_else - avoid_function_literals_in_foreach_calls - avoid_init_to_null diff --git a/example/main.dart b/example/main.dart index d6b4997255..34149188ba 100644 --- a/example/main.dart +++ b/example/main.dart @@ -1,4 +1,5 @@ import 'dart:convert' as convert; + import 'package:http/http.dart' as http; void main(List arguments) async { @@ -10,7 +11,8 @@ void main(List arguments) async { // Await the http get response, then decode the json-formatted response. var response = await http.get(url); if (response.statusCode == 200) { - var jsonResponse = convert.jsonDecode(response.body); + var jsonResponse = + convert.jsonDecode(response.body) as Map; var itemCount = jsonResponse['totalItems']; print('Number of books about http: $itemCount.'); } else { diff --git a/pubspec.yaml b/pubspec.yaml index 9ba4d71956..635b7953d8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.1 +version: 0.13.2-dev homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. diff --git a/test/io/client_test.dart b/test/io/client_test.dart index e5bd66fa0a..d856efba43 100644 --- a/test/io/client_test.dart +++ b/test/io/client_test.dart @@ -3,7 +3,6 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('vm') - import 'dart:convert'; import 'dart:io'; @@ -117,7 +116,8 @@ void main() { var bytesString = await response.stream.bytesToString(); client.close(); - var headers = jsonDecode(bytesString)['headers'] as Map; + var headers = (jsonDecode(bytesString) as Map)['headers'] + as Map; var contentType = (headers['content-type'] as List).single; expect(contentType, startsWith('multipart/form-data; boundary=')); }); diff --git a/test/io/utils.dart b/test/io/utils.dart index eb1234cc24..ac4414f05f 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -83,20 +83,23 @@ Future startServer() async { requestBody = requestBodyBytes; } - var content = { - 'method': request.method, - 'path': request.uri.path, - 'headers': {} - }; - if (requestBody != null) content['body'] = requestBody; + final headers = >{}; + request.headers.forEach((name, values) { // These headers are automatically generated by dart:io, so we don't // want to test them here. if (name == 'cookie' || name == 'host') return; - content['headers'][name] = values; + headers[name] = values; }); + var content = { + 'method': request.method, + 'path': request.uri.path, + if (requestBody != null) 'body': requestBody, + 'headers': headers, + }; + var body = json.encode(content); response ..contentLength = body.length From bc346414b9f24d5eea25fa29760e02b270c843a0 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 28 Apr 2021 09:36:37 -0700 Subject: [PATCH 103/448] Prepare to publish (#564) Add CHANGELOG entry for `retry.dart`. --- CHANGELOG.md | 5 ++++- pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2750afd601..be521adee3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ -## 0.13.2-dev +## 0.13.2 + +* Add `package:http/retry.dart` with `RetryClient`. This is the same + implementation as `package:http_retry` which will be discontinued. ## 0.13.1 diff --git a/pubspec.yaml b/pubspec.yaml index 635b7953d8..64a2e904f7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.2-dev +version: 0.13.2 homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. From d4f58a97cad0173468fcc8cac103d73ae24ae96b Mon Sep 17 00:00:00 2001 From: Alexander Aprelev Date: Thu, 29 Apr 2021 16:13:05 -0700 Subject: [PATCH 104/448] Remove expectation that GET without a body has content-length 0. (#565) See https://dart-review.googlesource.com/c/sdk/+/194881 --- CHANGELOG.md | 2 ++ pubspec.yaml | 2 +- test/io/http_test.dart | 63 ++++++++++++++++++++---------------------- 3 files changed, 33 insertions(+), 34 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index be521adee3..c7edf67600 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.13.3-dev + ## 0.13.2 * Add `package:http/retry.dart` with `RetryClient`. This is the same diff --git a/pubspec.yaml b/pubspec.yaml index 64a2e904f7..bd1d5475e7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.2 +version: 0.13.3-dev homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. diff --git a/test/io/http_test.dart b/test/io/http_test.dart index bfd5216165..960ad867fb 100644 --- a/test/io/http_test.dart +++ b/test/io/http_test.dart @@ -30,17 +30,16 @@ void main() { expect(response.statusCode, equals(200)); expect( response.body, - parse(equals({ - 'method': 'GET', - 'path': '/', - 'headers': { - 'content-length': ['0'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - }))); + parse(allOf( + containsPair('method', 'GET'), + containsPair('path', '/'), + containsPair( + 'headers', + allOf( + containsPair('accept-encoding', ['gzip']), + containsPair('user-agent', ['Dart']), + containsPair('x-random-header', ['Value']), + containsPair('x-other-header', ['Other Value'])))))); }); test('post', () async { @@ -397,17 +396,16 @@ void main() { }); expect( response, - parse(equals({ - 'method': 'GET', - 'path': '/', - 'headers': { - 'content-length': ['0'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - }))); + parse(allOf( + containsPair('method', 'GET'), + containsPair('path', '/'), + containsPair( + 'headers', + allOf( + containsPair('accept-encoding', ['gzip']), + containsPair('user-agent', ['Dart']), + containsPair('x-random-header', ['Value']), + containsPair('x-other-header', ['Other Value'])))))); }); test('read throws an error for a 4** status code', () { @@ -423,17 +421,16 @@ void main() { expect( String.fromCharCodes(bytes), - parse(equals({ - 'method': 'GET', - 'path': '/', - 'headers': { - 'content-length': ['0'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - }, - }))); + parse(allOf( + containsPair('method', 'GET'), + containsPair('path', '/'), + containsPair( + 'headers', + allOf( + containsPair('accept-encoding', ['gzip']), + containsPair('user-agent', ['Dart']), + containsPair('x-random-header', ['Value']), + containsPair('x-other-header', ['Other Value'])))))); }); test('readBytes throws an error for a 4** status code', () { From eb22dfd98eb7b90955f687feaa19d7a2deef1259 Mon Sep 17 00:00:00 2001 From: Marcin Niemira Date: Fri, 30 Apr 2021 10:50:54 +1000 Subject: [PATCH 105/448] Validate request methods against a regex (#512) Fixes #511 --- CHANGELOG.md | 2 ++ lib/src/base_request.dart | 13 +++++++++++-- test/request_test.dart | 6 ++++++ test/streamed_request_test.dart | 6 ++++++ 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7edf67600..e786f218c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## 0.13.3-dev +* Validate that the `method` parameter of BaseRequest is a valid "token". + ## 0.13.2 * Add `package:http/retry.dart` with `RetryClient`. This is the same diff --git a/lib/src/base_request.dart b/lib/src/base_request.dart index 6380cb0bc9..fd18bad332 100644 --- a/lib/src/base_request.dart +++ b/lib/src/base_request.dart @@ -88,8 +88,17 @@ abstract class BaseRequest { bool get finalized => _finalized; bool _finalized = false; - BaseRequest(this.method, this.url) - : headers = LinkedHashMap( + static final _tokenRE = RegExp(r"^[\w!#%&'*+\-.^`|~]+$"); + static String _validateMethod(String method) { + if (!_tokenRE.hasMatch(method)) { + throw ArgumentError.value(method, 'method', 'Not a valid method'); + } + return method; + } + + BaseRequest(String method, this.url) + : method = _validateMethod(method), + headers = LinkedHashMap( equals: (key1, key2) => key1.toLowerCase() == key2.toLowerCase(), hashCode: (key) => key.toLowerCase().hashCode); diff --git a/test/request_test.dart b/test/request_test.dart index 5b74bff593..59cb0988c5 100644 --- a/test/request_test.dart +++ b/test/request_test.dart @@ -334,4 +334,10 @@ void main() { expect(request.toString(), 'POST $dummyUrl'); }); }); + + group('#method', () { + test('must be a token', () { + expect(() => http.Request('LLAMA[0]', dummyUrl), throwsArgumentError); + }); + }); } diff --git a/test/streamed_request_test.dart b/test/streamed_request_test.dart index c8c801d866..4baa3e603e 100644 --- a/test/streamed_request_test.dart +++ b/test/streamed_request_test.dart @@ -24,4 +24,10 @@ void main() { expect(() => request.contentLength = 10, throwsStateError); }); }); + group('#method', () { + test('must be a token', () { + expect(() => http.StreamedRequest('SUPER LLAMA', dummyUrl), + throwsArgumentError); + }); + }); } From 6f5b3d013cb2aec69234b44692bd94aa39e14805 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 3 May 2021 12:14:31 -0700 Subject: [PATCH 106/448] Prepare to publish (#566) --- CHANGELOG.md | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e786f218c3..ff0b8c9e7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.13.3-dev +## 0.13.3 * Validate that the `method` parameter of BaseRequest is a valid "token". diff --git a/pubspec.yaml b/pubspec.yaml index bd1d5475e7..9d14110bcb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.3-dev +version: 0.13.3 homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. From 567d0e92e9c0013708e0208138cb0e386a580bfd Mon Sep 17 00:00:00 2001 From: Hamaad Siddiqui Date: Sun, 9 May 2021 02:09:45 +0500 Subject: [PATCH 107/448] Fix example code in README.md (#570) Adding missing Uri.parse( ) to statements --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c32450a0a..1421e9a994 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'}); print('Response status: ${response.statusCode}'); print('Response body: ${response.body}'); -print(await http.read('https://example.com/foobar.txt')); +print(await http.read(Uri.parse('https://example.com/foobar.txt'))); ``` If you're making multiple requests to the same server, you can keep open a @@ -84,7 +84,7 @@ import 'package:http/retry.dart'; Future main() async { final client = RetryClient(http.Client()); try { - print(await client.read('http://example.org')); + print(await client.read(Uri.parse('http://example.org'))); } finally { client.close(); } From b839a90e8575712e57e6ff6fa8fbdb679dc3893f Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 26 May 2021 07:34:48 -0700 Subject: [PATCH 108/448] Collapse `-nullsafety` version CHANGELOG (#575) --- CHANGELOG.md | 6 ++---- pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff0b8c9e7a..ab8a02203c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.13.4-dev + ## 0.13.3 * Validate that the `method` parameter of BaseRequest is a valid "token". @@ -13,10 +15,6 @@ ## 0.13.0 -* Stable null safety release. - -## 0.13.0-nullsafety.0 - * Migrate to null safety. * Add `const` constructor to `ByteStream`. * Migrate `BrowserClient` from `blob` to `arraybuffer`. diff --git a/pubspec.yaml b/pubspec.yaml index 9d14110bcb..cb7b2a66f1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.3 +version: 0.13.4-dev homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. From 4a0cf6e6e74b11093b63ac8e326144b2ceab950c Mon Sep 17 00:00:00 2001 From: Alexander Aprelev Date: Thu, 27 May 2021 08:58:51 -0700 Subject: [PATCH 109/448] Remove expectation that DELETE without a body has 'content-length:0' header. (#578) See https://dart-review.googlesource.com/c/sdk/+/194881 --- test/io/http_test.dart | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/test/io/http_test.dart b/test/io/http_test.dart index 960ad867fb..58b1d862df 100644 --- a/test/io/http_test.dart +++ b/test/io/http_test.dart @@ -375,17 +375,16 @@ void main() { expect(response.statusCode, equals(200)); expect( response.body, - parse(equals({ - 'method': 'DELETE', - 'path': '/', - 'headers': { - 'content-length': ['0'], - 'accept-encoding': ['gzip'], - 'user-agent': ['Dart'], - 'x-random-header': ['Value'], - 'x-other-header': ['Other Value'] - } - }))); + parse(allOf( + containsPair('method', 'DELETE'), + containsPair('path', '/'), + containsPair( + 'headers', + allOf( + containsPair('accept-encoding', ['gzip']), + containsPair('user-agent', ['Dart']), + containsPair('x-random-header', ['Value']), + containsPair('x-other-header', ['Other Value'])))))); }); test('read', () async { From e5dc06096e5f6e255e8a9f3783bb3a875d4e8e7e Mon Sep 17 00:00:00 2001 From: Guy Luz Date: Fri, 25 Jun 2021 01:08:40 +0300 Subject: [PATCH 110/448] Throw more specific exception for a request on a close IOClient (#584) Closes #581 --- CHANGELOG.md | 2 ++ lib/src/io_client.dart | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ab8a02203c..08a3a0b011 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## 0.13.4-dev +* Throw a more useful error when a client is used after it has been closed. + ## 0.13.3 * Validate that the `method` parameter of BaseRequest is a valid "token". diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index 5ee66db0f8..85d3681861 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -24,6 +24,11 @@ class IOClient extends BaseClient { /// Sends an HTTP request and asynchronously returns the response. @override Future send(BaseRequest request) async { + if (_inner == null) { + throw ClientException( + 'HTTP request failed. Client is already closed.', request.url); + } + var stream = request.finalize(); try { From 6a20ef2c551596b899698434a0e7eb05226ddf7d Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 15 Jul 2021 16:41:11 -0700 Subject: [PATCH 111/448] Remove example use of missing Response.bodyFields (#597) Closes #173 I don't think it is common for a server to respond with `form-data` formatted data. Instead use a more realistic example of the server responding with JSON. --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1421e9a994..fa4f19934b 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,12 @@ If you do this, make sure to close the client when you're done: ```dart var client = http.Client(); try { - var uriResponse = await client.post(Uri.parse('https://example.com/whatsit/create'), + var response = await client.post( + Uri.https('example.com', 'whatsit/create'), body: {'name': 'doodle', 'color': 'blue'}); - print(await client.get(uriResponse.bodyFields['uri'])); + var decodedResponse = jsonDecode(utf8.decode(response.bodyBytes)) as Map; + var uri = Uri.parse(decodedResponse['uri'] as String); + print(await client.get(uri)); } finally { client.close(); } From f67e541052e1218abebcae1518381368d1db0d46 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 15 Jul 2021 16:41:19 -0700 Subject: [PATCH 112/448] Use Stream.value for single element stream (#596) Avoids creating a single element list. --- lib/src/byte_stream.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/byte_stream.dart b/lib/src/byte_stream.dart index 172db0d6c0..eed1472bd0 100644 --- a/lib/src/byte_stream.dart +++ b/lib/src/byte_stream.dart @@ -13,7 +13,7 @@ class ByteStream extends StreamView> { /// Returns a single-subscription byte stream that will emit the given bytes /// in a single chunk. factory ByteStream.fromBytes(List bytes) => - ByteStream(Stream.fromIterable([bytes])); + ByteStream(Stream.value(bytes)); /// Collects the data of this stream in a [Uint8List]. Future toBytes() { From edc9256d2f00a8143b15a196dc66a85f427b4018 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 22 Jul 2021 11:47:43 -0700 Subject: [PATCH 113/448] Move from pedantic to lints package (#601) Add a local copy of `unawaited` until Dart 2.14 is stable. --- analysis_options.yaml | 4 +--- lib/src/browser_client.dart | 3 +-- lib/src/utils.dart | 3 +++ pubspec.yaml | 2 +- test/io/utils.dart | 1 - test/response_test.dart | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index c2c719d1e0..757bfaa26c 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,10 +1,8 @@ -include: package:pedantic/analysis_options.yaml +include: package:lints/recommended.yaml analyzer: strong-mode: implicit-casts: false - enable-experiment: - - non-nullable linter: rules: diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index d1eb35c1f5..f41d0ba15b 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -6,13 +6,12 @@ import 'dart:async'; import 'dart:html'; import 'dart:typed_data'; -import 'package:pedantic/pedantic.dart' show unawaited; - import 'base_client.dart'; import 'base_request.dart'; import 'byte_stream.dart'; import 'exception.dart'; import 'streamed_response.dart'; +import 'utils.dart' show unawaited; /// Create a [BrowserClient]. /// diff --git a/lib/src/utils.dart b/lib/src/utils.dart index e79108e88a..f03ffb740f 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -74,3 +74,6 @@ Stream onDone(Stream stream, void Function() onDone) => sink.close(); onDone(); })); + +// TODO: Remove after Dart 2.14 is stable +void unawaited(Future future) {} diff --git a/pubspec.yaml b/pubspec.yaml index cb7b2a66f1..1340d51ac1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,9 +11,9 @@ dependencies: http_parser: ^4.0.0 meta: ^1.3.0 path: ^1.8.0 - pedantic: ^1.10.0 dev_dependencies: fake_async: ^1.2.0 + lints: ^1.0.0 shelf: ^1.1.0 test: ^1.16.0 diff --git a/test/io/utils.dart b/test/io/utils.dart index ac4414f05f..5475f9762f 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -7,7 +7,6 @@ import 'dart:io'; import 'package:http/http.dart'; import 'package:http/src/utils.dart'; -import 'package:pedantic/pedantic.dart'; import 'package:test/test.dart'; export '../utils.dart'; diff --git a/test/response_test.dart b/test/response_test.dart index 532b2276b2..22a926d430 100644 --- a/test/response_test.dart +++ b/test/response_test.dart @@ -5,7 +5,7 @@ import 'dart:async'; import 'package:http/http.dart' as http; -import 'package:pedantic/pedantic.dart'; +import 'package:http/src/utils.dart' show unawaited; import 'package:test/test.dart'; void main() { From 438cca389a65548f2417ff55a6e95bea671fffda Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 1 Oct 2021 13:34:03 -0700 Subject: [PATCH 114/448] Require Dart 2.14, prepare to release v0.13.4 (#626) Removed unneeded utility function --- .github/workflows/test-package.yml | 2 +- CHANGELOG.md | 3 ++- lib/src/browser_client.dart | 1 - lib/src/utils.dart | 3 --- pubspec.yaml | 4 ++-- test/io/utils.dart | 1 + test/response_test.dart | 1 - 7 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index cdc25d958a..82602a8f78 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [2.12.0, dev] + sdk: [2.14.0, dev] steps: - uses: actions/checkout@v2 - uses: dart-lang/setup-dart@v1.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 08a3a0b011..18fc78d0f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ -## 0.13.4-dev +## 0.13.4 * Throw a more useful error when a client is used after it has been closed. +* Require Dart 2.14. ## 0.13.3 diff --git a/lib/src/browser_client.dart b/lib/src/browser_client.dart index f41d0ba15b..b046b01993 100644 --- a/lib/src/browser_client.dart +++ b/lib/src/browser_client.dart @@ -11,7 +11,6 @@ import 'base_request.dart'; import 'byte_stream.dart'; import 'exception.dart'; import 'streamed_response.dart'; -import 'utils.dart' show unawaited; /// Create a [BrowserClient]. /// diff --git a/lib/src/utils.dart b/lib/src/utils.dart index f03ffb740f..e79108e88a 100644 --- a/lib/src/utils.dart +++ b/lib/src/utils.dart @@ -74,6 +74,3 @@ Stream onDone(Stream stream, void Function() onDone) => sink.close(); onDone(); })); - -// TODO: Remove after Dart 2.14 is stable -void unawaited(Future future) {} diff --git a/pubspec.yaml b/pubspec.yaml index 1340d51ac1..014fd31c78 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,10 +1,10 @@ name: http -version: 0.13.4-dev +version: 0.13.4 homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. environment: - sdk: '>=2.12.0 <3.0.0' + sdk: '>=2.14.0 <3.0.0' dependencies: async: ^2.5.0 diff --git a/test/io/utils.dart b/test/io/utils.dart index 5475f9762f..d2208fbbed 100644 --- a/test/io/utils.dart +++ b/test/io/utils.dart @@ -2,6 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'dart:async'; import 'dart:convert'; import 'dart:io'; diff --git a/test/response_test.dart b/test/response_test.dart index 22a926d430..38061c1ef4 100644 --- a/test/response_test.dart +++ b/test/response_test.dart @@ -5,7 +5,6 @@ import 'dart:async'; import 'package:http/http.dart' as http; -import 'package:http/src/utils.dart' show unawaited; import 'package:test/test.dart'; void main() { From 3a17f35c33db4e8731c17de45948cf3123779cdd Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 4 Jan 2022 11:39:32 -0800 Subject: [PATCH 115/448] Enable strict language features (#653) Migrate from `implicit-casts: false` to `strict-casts: true` and enable `string-raw-types` and `strict-inference`. --- analysis_options.yaml | 6 ++++-- lib/retry.dart | 2 +- lib/src/base_client.dart | 2 +- lib/src/io_client.dart | 2 +- test/multipart_test.dart | 2 +- test/utils.dart | 4 ++-- 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 757bfaa26c..60f3b0732c 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,8 +1,10 @@ include: package:lints/recommended.yaml analyzer: - strong-mode: - implicit-casts: false + language: + strict-casts: true + strict-raw-types: true + strict-inference: true linter: rules: diff --git a/lib/retry.dart b/lib/retry.dart index 4d34a99c07..c6033190de 100644 --- a/lib/retry.dart +++ b/lib/retry.dart @@ -119,7 +119,7 @@ class RetryClient extends BaseClient { _unawaited(response.stream.listen((_) {}).cancel().catchError((_) {})); } - await Future.delayed(_delay(i)); + await Future.delayed(_delay(i)); _onRetry?.call(request, response, i); i++; } diff --git a/lib/src/base_client.dart b/lib/src/base_client.dart index efb065f70e..9020495b88 100644 --- a/lib/src/base_client.dart +++ b/lib/src/base_client.dart @@ -73,7 +73,7 @@ abstract class BaseClient implements Client { /// Sends a non-streaming [Request] and returns a non-streaming [Response]. Future _sendUnstreamed( String method, Uri url, Map? headers, - [body, Encoding? encoding]) async { + [Object? body, Encoding? encoding]) async { var request = Request(method, url); if (headers != null) request.headers.addAll(headers); diff --git a/lib/src/io_client.dart b/lib/src/io_client.dart index 85d3681861..b26ec0486b 100644 --- a/lib/src/io_client.dart +++ b/lib/src/io_client.dart @@ -49,7 +49,7 @@ class IOClient extends BaseClient { }); return IOStreamedResponse( - response.handleError((error) { + response.handleError((Object error) { final httpException = error as HttpException; throw ClientException(httpException.message, httpException.uri); }, test: (error) => error is HttpException), diff --git a/test/multipart_test.dart b/test/multipart_test.dart index 0293232983..951e99017a 100644 --- a/test/multipart_test.dart +++ b/test/multipart_test.dart @@ -244,6 +244,6 @@ void main() { var file = http.MultipartFile( 'file', Future>.error('error').asStream(), 1); var request = http.MultipartRequest('POST', dummyUrl)..files.add(file); - expect(request.finalize().drain(), throwsA('error')); + expect(request.finalize().drain(), throwsA('error')); }); } diff --git a/test/utils.dart b/test/utils.dart index fc184c3511..e3bf41102f 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -48,7 +48,7 @@ class _Parse extends Matcher { _Parse(this._matcher); @override - bool matches(Object? item, Map matchState) { + bool matches(Object? item, Map matchState) { if (item is String) { dynamic parsed; try { @@ -80,7 +80,7 @@ class _BodyMatches extends Matcher { _BodyMatches(this._pattern); @override - bool matches(Object? item, Map matchState) { + bool matches(Object? item, Map matchState) { if (item is http.MultipartRequest) { return completes.matches(_checks(item), matchState); } From 336da4574de5a12e8923efd3640b73f376adbcfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Sousa?= Date: Thu, 14 Apr 2022 17:58:04 -0300 Subject: [PATCH 116/448] Async support for when, whenError and onRetry (#679) Co-authored-by: Nate Bosch --- CHANGELOG.md | 4 ++++ lib/retry.dart | 32 +++++++++++++++++--------------- pubspec.yaml | 2 +- test/http_retry_test.dart | 28 ++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18fc78d0f9..06f44fb7b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.13.5-dev + +* Allow async callbacks in RetryClient. + ## 0.13.4 * Throw a more useful error when a client is used after it has been closed. diff --git a/lib/retry.dart b/lib/retry.dart index c6033190de..e2ca33f2a5 100644 --- a/lib/retry.dart +++ b/lib/retry.dart @@ -18,16 +18,16 @@ class RetryClient extends BaseClient { final int _retries; /// The callback that determines whether a request should be retried. - final bool Function(BaseResponse) _when; + final FutureOr Function(BaseResponse) _when; /// The callback that determines whether a request when an error is thrown. - final bool Function(Object, StackTrace) _whenError; + final FutureOr Function(Object, StackTrace) _whenError; /// The callback that determines how long to wait before retrying a request. final Duration Function(int) _delay; /// The callback to call to indicate that a request is being retried. - final void Function(BaseRequest, BaseResponse?, int)? _onRetry; + final FutureOr Function(BaseRequest, BaseResponse?, int)? _onRetry; /// Creates a client wrapping [_inner] that retries HTTP requests. /// @@ -51,10 +51,11 @@ class RetryClient extends BaseClient { RetryClient( this._inner, { int retries = 3, - bool Function(BaseResponse) when = _defaultWhen, - bool Function(Object, StackTrace) whenError = _defaultWhenError, + FutureOr Function(BaseResponse) when = _defaultWhen, + FutureOr Function(Object, StackTrace) whenError = _defaultWhenError, Duration Function(int retryCount) delay = _defaultDelay, - void Function(BaseRequest, BaseResponse?, int retryCount)? onRetry, + FutureOr Function(BaseRequest, BaseResponse?, int retryCount)? + onRetry, }) : _retries = retries, _when = when, _whenError = whenError, @@ -72,9 +73,10 @@ class RetryClient extends BaseClient { RetryClient.withDelays( Client inner, Iterable delays, { - bool Function(BaseResponse) when = _defaultWhen, - bool Function(Object, StackTrace) whenError = _defaultWhenError, - void Function(BaseRequest, BaseResponse?, int retryCount)? onRetry, + FutureOr Function(BaseResponse) when = _defaultWhen, + FutureOr Function(Object, StackTrace) whenError = _defaultWhenError, + FutureOr Function(BaseRequest, BaseResponse?, int retryCount)? + onRetry, }) : this._withDelays( inner, delays.toList(), @@ -86,9 +88,9 @@ class RetryClient extends BaseClient { RetryClient._withDelays( Client inner, List delays, { - required bool Function(BaseResponse) when, - required bool Function(Object, StackTrace) whenError, - required void Function(BaseRequest, BaseResponse?, int)? onRetry, + required FutureOr Function(BaseResponse) when, + required FutureOr Function(Object, StackTrace) whenError, + required FutureOr Function(BaseRequest, BaseResponse?, int)? onRetry, }) : this( inner, retries: delays.length, @@ -108,11 +110,11 @@ class RetryClient extends BaseClient { try { response = await _inner.send(_copyRequest(request, splitter.split())); } catch (error, stackTrace) { - if (i == _retries || !_whenError(error, stackTrace)) rethrow; + if (i == _retries || !await _whenError(error, stackTrace)) rethrow; } if (response != null) { - if (i == _retries || !_when(response)) return response; + if (i == _retries || !await _when(response)) return response; // Make sure the response stream is listened to so that we don't leave // dangling connections. @@ -120,7 +122,7 @@ class RetryClient extends BaseClient { } await Future.delayed(_delay(i)); - _onRetry?.call(request, response, i); + await _onRetry?.call(request, response, i); i++; } } diff --git a/pubspec.yaml b/pubspec.yaml index 014fd31c78..de2164854e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.4 +version: 0.13.5-dev homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. diff --git a/test/http_retry_test.dart b/test/http_retry_test.dart index faf35b3f48..42ff3b5198 100644 --- a/test/http_retry_test.dart +++ b/test/http_retry_test.dart @@ -224,4 +224,32 @@ void main() { final response = await client.send(request); expect(response.statusCode, equals(503)); }); + + test('async when, whenError and onRetry', () async { + final client = RetryClient( + MockClient(expectAsync1( + (request) async => request.headers['Authorization'] != null + ? Response('', 200) + : Response('', 401), + count: 2)), + retries: 1, + delay: (_) => Duration.zero, + when: (response) async { + await Future.delayed(const Duration(milliseconds: 500)); + return response.statusCode == 401; + }, + whenError: (error, stackTrace) async { + await Future.delayed(const Duration(milliseconds: 500)); + return false; + }, + onRetry: (request, response, retryCount) async { + expect(response?.statusCode, equals(401)); + await Future.delayed(const Duration(milliseconds: 500)); + request.headers['Authorization'] = 'Bearer TOKEN'; + }, + ); + + final response = await client.get(Uri.http('example.org', '')); + expect(response.statusCode, equals(200)); + }); } From 4f2eb79001e03273af1124925cd157ef261fe51c Mon Sep 17 00:00:00 2001 From: Teodor Ciuraru <83955640+teodor-appd@users.noreply.github.com> Date: Mon, 18 Apr 2022 20:58:53 +0300 Subject: [PATCH 117/448] Fix response request in MockClient (#657) Use the stub returned request field from the response. --- CHANGELOG.md | 3 +++ lib/src/mock_client.dart | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06f44fb7b8..6fdda5e06e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## 0.13.5-dev * Allow async callbacks in RetryClient. +* In `MockHttpClient` use the callback returned `Response.request` instead of + the argument value to give more control to the callback. This may be breaking + for callbacks which return incomplete Responses and relied on the default. ## 0.13.4 diff --git a/lib/src/mock_client.dart b/lib/src/mock_client.dart index abfcde20e3..bf2df40ee7 100644 --- a/lib/src/mock_client.dart +++ b/lib/src/mock_client.dart @@ -43,7 +43,7 @@ class MockClient extends BaseClient { return StreamedResponse( ByteStream.fromBytes(response.bodyBytes), response.statusCode, contentLength: response.contentLength, - request: baseRequest, + request: response.request, headers: response.headers, isRedirect: response.isRedirect, persistentConnection: response.persistentConnection, @@ -57,7 +57,7 @@ class MockClient extends BaseClient { final response = await fn(request, bodyStream); return StreamedResponse(response.stream, response.statusCode, contentLength: response.contentLength, - request: request, + request: response.request, headers: response.headers, isRedirect: response.isRedirect, persistentConnection: response.persistentConnection, From 0e8ec33c6ee0c8145856f536c3931a607fcdd3e1 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Wed, 20 Apr 2022 14:44:40 -0700 Subject: [PATCH 118/448] Switch from homepage to repository in pubspec (#687) --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index de2164854e..2689e46d44 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: http version: 0.13.5-dev -homepage: https://github.com/dart-lang/http description: A composable, multi-platform, Future-based API for HTTP requests. +repository: https://github.com/dart-lang/http environment: sdk: '>=2.14.0 <3.0.0' From a952829a82706e8be23175d48a0ac38cace00b17 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 23 May 2022 13:41:21 -0700 Subject: [PATCH 119/448] Separate the `post` description for "String" (#695) --- lib/src/client.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index 12695e7123..2223c8701a 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -45,9 +45,11 @@ abstract class Client { /// URL. /// /// [body] sets the body of the request. It can be a [String], a [List] - /// or a [Map]. If it's a String, it's encoded using - /// [encoding] and used as the body of the request. The content-type of the - /// request will default to "text/plain". + /// or a [Map]. + /// + /// If [body] is a String, it's encoded using [encoding] and used as the body + /// of the request. The content-type of the request will default to + /// "text/plain". /// /// If [body] is a List, it's used as a list of bytes for the body of the /// request. From e15b7225dcf4e1a6363ec25989c2908a0163b09d Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 25 May 2022 19:39:48 -0700 Subject: [PATCH 120/448] Use spawnHybrid for the stub server (#700) Move the in-process stub server from `test/io/utils.dart` to `test/stub_server.dart` as a `hybridMain`. This will allow spawning the server from the browser tests as well. The browser tests still do not work against this server. Separate out the change in how the server is started from the (potential) other changes with fixes. Update tests to use the new pattern - they call `startServer` and wait for the `serverUrl`. No explicit teardown is needed because the `spawnHybrid` call gets an implicit `addTearDown` which kills the isolate. Remove `test/io/utils.dart` entirely. Inline the definition of `throwsSocketException` at the single use site. Make the `message` argument to the other copy of `throwsClientException` optional and use it in place of the version that had been in `test/io/utils.dart`. --- pubspec.yaml | 1 + test/io/client_test.dart | 11 +-- test/io/http_test.dart | 15 ++-- test/io/multipart_test.dart | 2 +- test/io/request_test.dart | 9 ++- test/io/streamed_request_test.dart | 9 ++- test/io/utils.dart | 125 ----------------------------- test/stub_server.dart | 100 +++++++++++++++++++++++ test/utils.dart | 18 ++++- 9 files changed, 142 insertions(+), 148 deletions(-) delete mode 100644 test/io/utils.dart create mode 100644 test/stub_server.dart diff --git a/pubspec.yaml b/pubspec.yaml index 2689e46d44..0500d426b4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,4 +16,5 @@ dev_dependencies: fake_async: ^1.2.0 lints: ^1.0.0 shelf: ^1.1.0 + stream_channel: ^2.1.0 test: ^1.16.0 diff --git a/test/io/client_test.dart b/test/io/client_test.dart index d856efba43..2115e1c2df 100644 --- a/test/io/client_test.dart +++ b/test/io/client_test.dart @@ -10,12 +10,13 @@ import 'package:http/http.dart' as http; import 'package:http/io_client.dart' as http_io; import 'package:test/test.dart'; -import 'utils.dart'; +import '../utils.dart'; void main() { - setUp(startServer); - - tearDown(stopServer); + late Uri serverUrl; + setUpAll(() async { + serverUrl = await startServer(); + }); test('#send a StreamedRequest', () async { var client = http.Client(); @@ -101,7 +102,7 @@ void main() { request.headers[HttpHeaders.contentTypeHeader] = 'application/json; charset=utf-8'; - expect(client.send(request), throwsSocketException); + expect(client.send(request), throwsA(isA())); request.sink.add('{"hello": "world"}'.codeUnits); request.sink.close(); diff --git a/test/io/http_test.dart b/test/io/http_test.dart index 58b1d862df..7bdf7dad67 100644 --- a/test/io/http_test.dart +++ b/test/io/http_test.dart @@ -7,14 +7,15 @@ import 'package:http/http.dart' as http; import 'package:test/test.dart'; -import 'utils.dart'; +import '../utils.dart'; void main() { - group('http.', () { - setUp(startServer); - - tearDown(stopServer); + late Uri serverUrl; + setUpAll(() async { + serverUrl = await startServer(); + }); + group('http.', () { test('head', () async { var response = await http.head(serverUrl); expect(response.statusCode, equals(200)); @@ -408,7 +409,7 @@ void main() { }); test('read throws an error for a 4** status code', () { - expect(http.read(serverUrl.resolve('/error')), throwsClientException); + expect(http.read(serverUrl.resolve('/error')), throwsClientException()); }); test('readBytes', () async { @@ -434,7 +435,7 @@ void main() { test('readBytes throws an error for a 4** status code', () { expect( - http.readBytes(serverUrl.resolve('/error')), throwsClientException); + http.readBytes(serverUrl.resolve('/error')), throwsClientException()); }); }); } diff --git a/test/io/multipart_test.dart b/test/io/multipart_test.dart index f2333f5322..070ea5f3df 100644 --- a/test/io/multipart_test.dart +++ b/test/io/multipart_test.dart @@ -10,7 +10,7 @@ import 'package:http/http.dart' as http; import 'package:path/path.dart' as path; import 'package:test/test.dart'; -import 'utils.dart'; +import '../utils.dart'; void main() { late Directory tempDir; diff --git a/test/io/request_test.dart b/test/io/request_test.dart index 97555f9782..80a7f24170 100644 --- a/test/io/request_test.dart +++ b/test/io/request_test.dart @@ -7,12 +7,13 @@ import 'package:http/http.dart' as http; import 'package:test/test.dart'; -import 'utils.dart'; +import '../utils.dart'; void main() { - setUp(startServer); - - tearDown(stopServer); + late Uri serverUrl; + setUpAll(() async { + serverUrl = await startServer(); + }); test('send happy case', () async { final request = http.Request('GET', serverUrl) diff --git a/test/io/streamed_request_test.dart b/test/io/streamed_request_test.dart index 9dd5d3eb15..d82006847f 100644 --- a/test/io/streamed_request_test.dart +++ b/test/io/streamed_request_test.dart @@ -9,12 +9,13 @@ import 'dart:convert'; import 'package:http/http.dart' as http; import 'package:test/test.dart'; -import 'utils.dart'; +import '../utils.dart'; void main() { - setUp(startServer); - - tearDown(stopServer); + late Uri serverUrl; + setUpAll(() async { + serverUrl = await startServer(); + }); group('contentLength', () { test('controls the Content-Length header', () async { diff --git a/test/io/utils.dart b/test/io/utils.dart deleted file mode 100644 index d2208fbbed..0000000000 --- a/test/io/utils.dart +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'dart:async'; -import 'dart:convert'; -import 'dart:io'; - -import 'package:http/http.dart'; -import 'package:http/src/utils.dart'; -import 'package:test/test.dart'; - -export '../utils.dart'; - -/// The current server instance. -HttpServer? _server; - -/// The URL for the current server instance. -Uri get serverUrl => Uri.parse('http://localhost:${_server!.port}'); - -/// Starts a new HTTP server. -Future startServer() async { - _server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - var path = request.uri.path; - var response = request.response; - - if (path == '/error') { - response - ..statusCode = 400 - ..contentLength = 0; - unawaited(response.close()); - return; - } - - if (path == '/loop') { - var n = int.parse(request.uri.query); - response - ..statusCode = 302 - ..headers - .set('location', serverUrl.resolve('/loop?${n + 1}').toString()) - ..contentLength = 0; - unawaited(response.close()); - return; - } - - if (path == '/redirect') { - response - ..statusCode = 302 - ..headers.set('location', serverUrl.resolve('/').toString()) - ..contentLength = 0; - unawaited(response.close()); - return; - } - - if (path == '/no-content-length') { - response - ..statusCode = 200 - ..contentLength = -1 - ..write('body'); - unawaited(response.close()); - return; - } - - var requestBodyBytes = await ByteStream(request).toBytes(); - var encodingName = request.uri.queryParameters['response-encoding']; - var outputEncoding = encodingName == null - ? ascii - : requiredEncodingForCharset(encodingName); - - response.headers.contentType = - ContentType('application', 'json', charset: outputEncoding.name); - response.headers.set('single', 'value'); - - dynamic requestBody; - if (requestBodyBytes.isEmpty) { - requestBody = null; - } else if (request.headers.contentType?.charset != null) { - var encoding = - requiredEncodingForCharset(request.headers.contentType!.charset!); - requestBody = encoding.decode(requestBodyBytes); - } else { - requestBody = requestBodyBytes; - } - - final headers = >{}; - - request.headers.forEach((name, values) { - // These headers are automatically generated by dart:io, so we don't - // want to test them here. - if (name == 'cookie' || name == 'host') return; - - headers[name] = values; - }); - - var content = { - 'method': request.method, - 'path': request.uri.path, - if (requestBody != null) 'body': requestBody, - 'headers': headers, - }; - - var body = json.encode(content); - response - ..contentLength = body.length - ..write(body); - unawaited(response.close()); - }); -} - -/// Stops the current HTTP server. -void stopServer() { - if (_server != null) { - _server!.close(); - _server = null; - } -} - -/// A matcher for functions that throw HttpException. -Matcher get throwsClientException => - throwsA(const TypeMatcher()); - -/// A matcher for functions that throw SocketException. -final Matcher throwsSocketException = - throwsA(const TypeMatcher()); diff --git a/test/stub_server.dart b/test/stub_server.dart new file mode 100644 index 0000000000..a53f77d375 --- /dev/null +++ b/test/stub_server.dart @@ -0,0 +1,100 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:http/http.dart'; +import 'package:http/src/utils.dart'; +import 'package:stream_channel/stream_channel.dart'; + +void hybridMain(StreamChannel channel) async { + final server = await HttpServer.bind('localhost', 0); + final url = Uri.http('localhost:${server.port}', ''); + server.listen((request) async { + var path = request.uri.path; + var response = request.response; + + if (path == '/error') { + response + ..statusCode = 400 + ..contentLength = 0; + unawaited(response.close()); + return; + } + + if (path == '/loop') { + var n = int.parse(request.uri.query); + response + ..statusCode = 302 + ..headers.set('location', url.resolve('/loop?${n + 1}').toString()) + ..contentLength = 0; + unawaited(response.close()); + return; + } + + if (path == '/redirect') { + response + ..statusCode = 302 + ..headers.set('location', url.resolve('/').toString()) + ..contentLength = 0; + unawaited(response.close()); + return; + } + + if (path == '/no-content-length') { + response + ..statusCode = 200 + ..contentLength = -1 + ..write('body'); + unawaited(response.close()); + return; + } + + var requestBodyBytes = await ByteStream(request).toBytes(); + var encodingName = request.uri.queryParameters['response-encoding']; + var outputEncoding = + encodingName == null ? ascii : requiredEncodingForCharset(encodingName); + + response.headers.contentType = + ContentType('application', 'json', charset: outputEncoding.name); + response.headers.set('single', 'value'); + + dynamic requestBody; + if (requestBodyBytes.isEmpty) { + requestBody = null; + } else if (request.headers.contentType?.charset != null) { + var encoding = + requiredEncodingForCharset(request.headers.contentType!.charset!); + requestBody = encoding.decode(requestBodyBytes); + } else { + requestBody = requestBodyBytes; + } + + final headers = >{}; + + request.headers.forEach((name, values) { + // These headers are automatically generated by dart:io, so we don't + // want to test them here. + if (name == 'cookie' || name == 'host') return; + + headers[name] = values; + }); + + var content = { + 'method': request.method, + 'path': request.uri.path, + if (requestBody != null) 'body': requestBody, + 'headers': headers, + }; + + var body = json.encode(content); + response + ..contentLength = body.length + ..write(body); + unawaited(response.close()); + }); + channel.sink.add(server.port); +} diff --git a/test/utils.dart b/test/utils.dart index e3bf41102f..575df1a167 100644 --- a/test/utils.dart +++ b/test/utils.dart @@ -110,5 +110,19 @@ class _BodyMatches extends Matcher { /// [http.ClientException] with the given [message]. /// /// [message] can be a String or a [Matcher]. -Matcher throwsClientException(String message) => throwsA( - isA().having((e) => e.message, 'message', message)); +Matcher throwsClientException([String? message]) { + var exception = isA(); + if (message != null) { + exception = exception.having((e) => e.message, 'message', message); + } + return throwsA(exception); +} + +/// Spawn an isolate in the test runner with an http server. +/// +/// The server isolate will be killed on teardown. +Future startServer() async { + final channel = spawnHybridUri(Uri(path: '/test/stub_server.dart')); + final port = await channel.stream.first as int; + return Uri.http('localhost:$port', ''); +} From 8554d8b8b72f11546c4a8e780d52a8ef794713dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= Date: Tue, 31 May 2022 18:22:46 +0200 Subject: [PATCH 121/448] Fix head, get, post, etc. links in Client docs (#703) Fixes #698 --- lib/src/client.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index 2223c8701a..e1ee89a203 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -5,6 +5,8 @@ import 'dart:convert'; import 'dart:typed_data'; +import '../http.dart' as http; + import 'base_client.dart'; import 'base_request.dart'; import 'client_stub.dart' @@ -18,7 +20,8 @@ import 'streamed_response.dart'; /// connections across multiple requests to the same server. /// /// If you only need to send a single request, it's usually easier to use -/// [head], [get], [post], [put], [patch], or [delete] instead. +/// [http.head], [http.get], [http.post], [http.put], [http.patch], or +/// [http.delete] instead. /// /// When creating an HTTP client class with additional functionality, you must /// extend [BaseClient] rather than [Client]. In most cases, you can wrap From fac388cebffb3dcc286fff11d22c2d250aa6dc91 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 31 May 2022 09:51:44 -0700 Subject: [PATCH 122/448] Implement the ability to run a particular Client implementation in a Zone (#697) --- lib/http.dart | 2 +- lib/src/client.dart | 48 ++++++++++++++++++++++++++++++++-- test/io/client_test.dart | 40 ++++++++++++++++++++++++++++ test/io/http_test.dart | 56 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 143 insertions(+), 3 deletions(-) diff --git a/lib/http.dart b/lib/http.dart index 1ea751eab1..34eebbbd0a 100644 --- a/lib/http.dart +++ b/lib/http.dart @@ -16,7 +16,7 @@ export 'src/base_client.dart'; export 'src/base_request.dart'; export 'src/base_response.dart'; export 'src/byte_stream.dart'; -export 'src/client.dart'; +export 'src/client.dart' hide zoneClient; export 'src/exception.dart'; export 'src/multipart_file.dart'; export 'src/multipart_request.dart'; diff --git a/lib/src/client.dart b/lib/src/client.dart index e1ee89a203..56ddcbc300 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -2,11 +2,13 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'dart:async'; import 'dart:convert'; import 'dart:typed_data'; -import '../http.dart' as http; +import 'package:meta/meta.dart'; +import '../http.dart' as http; import 'base_client.dart'; import 'base_request.dart'; import 'client_stub.dart' @@ -32,7 +34,7 @@ abstract class Client { /// /// Creates an `IOClient` if `dart:io` is available and a `BrowserClient` if /// `dart:html` is available, otherwise it will throw an unsupported error. - factory Client() => createClient(); + factory Client() => zoneClient ?? createClient(); /// Sends an HTTP HEAD request with the given headers to the given URL. /// @@ -145,3 +147,45 @@ abstract class Client { /// do so can cause the Dart process to hang. void close(); } + +/// The [Client] for the current [Zone], if one has been set. +/// +/// NOTE: This property is explicitly hidden from the public API. +@internal +Client? get zoneClient { + final client = Zone.current[#_clientToken]; + return client == null ? null : (client as Client Function())(); +} + +/// Runs [body] in its own [Zone] with the [Client] returned by [clientFactory] +/// set as the default [Client]. +/// +/// For example: +/// +/// ``` +/// class MyAndroidHttpClient extends BaseClient { +/// @override +/// Future send(http.BaseRequest request) { +/// // your implementation here +/// } +/// } +/// +/// void main() { +/// Client client = Platform.isAndroid ? MyAndroidHttpClient() : Client(); +/// runWithClient(myFunction, () => client); +/// } +/// +/// void myFunction() { +/// // Uses the `Client` configured in `main`. +/// final response = await get(Uri.parse("https://www.example.com/")); +/// final client = Client(); +/// } +/// ``` +/// +/// The [Client] returned by [clientFactory] is used by the [Client.new] factory +/// and the convenience HTTP functions (e.g. [http.get]) +R runWithClient(R Function() body, Client Function() clientFactory, + {ZoneSpecification? zoneSpecification}) => + runZoned(body, + zoneValues: {#_clientToken: Zone.current.bindCallback(clientFactory)}, + zoneSpecification: zoneSpecification); diff --git a/test/io/client_test.dart b/test/io/client_test.dart index 2115e1c2df..d03a4bbee7 100644 --- a/test/io/client_test.dart +++ b/test/io/client_test.dart @@ -12,6 +12,20 @@ import 'package:test/test.dart'; import '../utils.dart'; +class TestClient extends http.BaseClient { + @override + Future send(http.BaseRequest request) { + throw UnimplementedError(); + } +} + +class TestClient2 extends http.BaseClient { + @override + Future send(http.BaseRequest request) { + throw UnimplementedError(); + } +} + void main() { late Uri serverUrl; setUpAll(() async { @@ -133,4 +147,30 @@ void main() { expect(socket, isNotNull); }); + + test('runWithClient', () { + http.Client client = + http.runWithClient(() => http.Client(), () => TestClient()); + expect(client, isA()); + }); + + test('runWithClient nested', () { + late final http.Client client; + late final http.Client nestedClient; + http.runWithClient(() { + http.runWithClient( + () => nestedClient = http.Client(), () => TestClient2()); + client = http.Client(); + }, () => TestClient()); + expect(client, isA()); + expect(nestedClient, isA()); + }); + + test('runWithClient recursion', () { + // Verify that calling the http.Client() factory inside nested Zones does + // not provoke an infinite recursion. + http.runWithClient(() { + http.runWithClient(() => http.Client(), () => http.Client()); + }, () => http.Client()); + }); } diff --git a/test/io/http_test.dart b/test/io/http_test.dart index 7bdf7dad67..a551230958 100644 --- a/test/io/http_test.dart +++ b/test/io/http_test.dart @@ -9,6 +9,13 @@ import 'package:test/test.dart'; import '../utils.dart'; +class TestClient extends http.BaseClient { + @override + Future send(http.BaseRequest request) { + throw UnimplementedError(); + } +} + void main() { late Uri serverUrl; setUpAll(() async { @@ -22,6 +29,13 @@ void main() { expect(response.body, equals('')); }); + test('head runWithClient', () { + expect( + () => http.runWithClient( + () => http.head(serverUrl), () => TestClient()), + throwsUnimplementedError); + }); + test('get', () async { var response = await http.get(serverUrl, headers: { 'X-Random-Header': 'Value', @@ -43,6 +57,13 @@ void main() { containsPair('x-other-header', ['Other Value'])))))); }); + test('get runWithClient', () { + expect( + () => + http.runWithClient(() => http.get(serverUrl), () => TestClient()), + throwsUnimplementedError); + }); + test('post', () async { var response = await http.post(serverUrl, headers: { 'X-Random-Header': 'Value', @@ -151,6 +172,13 @@ void main() { }))); }); + test('post runWithClient', () { + expect( + () => http.runWithClient( + () => http.post(serverUrl, body: 'testing'), () => TestClient()), + throwsUnimplementedError); + }); + test('put', () async { var response = await http.put(serverUrl, headers: { 'X-Random-Header': 'Value', @@ -259,6 +287,13 @@ void main() { }))); }); + test('put runWithClient', () { + expect( + () => http.runWithClient( + () => http.put(serverUrl, body: 'testing'), () => TestClient()), + throwsUnimplementedError); + }); + test('patch', () async { var response = await http.patch(serverUrl, headers: { 'X-Random-Header': 'Value', @@ -388,6 +423,13 @@ void main() { containsPair('x-other-header', ['Other Value'])))))); }); + test('patch runWithClient', () { + expect( + () => http.runWithClient( + () => http.patch(serverUrl, body: 'testing'), () => TestClient()), + throwsUnimplementedError); + }); + test('read', () async { var response = await http.read(serverUrl, headers: { 'X-Random-Header': 'Value', @@ -412,6 +454,13 @@ void main() { expect(http.read(serverUrl.resolve('/error')), throwsClientException()); }); + test('read runWithClient', () { + expect( + () => http.runWithClient( + () => http.read(serverUrl), () => TestClient()), + throwsUnimplementedError); + }); + test('readBytes', () async { var bytes = await http.readBytes(serverUrl, headers: { 'X-Random-Header': 'Value', @@ -437,5 +486,12 @@ void main() { expect( http.readBytes(serverUrl.resolve('/error')), throwsClientException()); }); + + test('readBytes runWithClient', () { + expect( + () => http.runWithClient( + () => http.readBytes(serverUrl), () => TestClient()), + throwsUnimplementedError); + }); }); } From d29a49d2cbf01b8b8515e1aa2dca6f0f0f30be9a Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 1 Jun 2022 10:35:06 -0700 Subject: [PATCH 123/448] Mono (#704) * Move http into a pkgs subdirectory. * Fix CI * Fix extra type info. * Create symlink to README. * Mark mono_repo outputs as generated Generated files show collapsed by default on github diff views to hide the noise in files that we don't hand edit. Co-authored-by: Nate Bosch --- .gitattributes | 2 + .github/workflows/dart.yml | 227 ++++++++++++++++++ .github/workflows/test-package.yml | 64 ----- README.md | 103 +------- mono_repo.yaml | 3 + CHANGELOG.md => pkgs/http/CHANGELOG.md | 0 LICENSE => pkgs/http/LICENSE | 0 pkgs/http/README.md | 102 ++++++++ {example => pkgs/http/example}/main.dart | 0 {example => pkgs/http/example}/retry.dart | 0 {lib => pkgs/http/lib}/browser_client.dart | 0 {lib => pkgs/http/lib}/http.dart | 0 {lib => pkgs/http/lib}/io_client.dart | 0 {lib => pkgs/http/lib}/retry.dart | 0 {lib => pkgs/http/lib}/src/base_client.dart | 0 {lib => pkgs/http/lib}/src/base_request.dart | 0 {lib => pkgs/http/lib}/src/base_response.dart | 0 .../http/lib}/src/boundary_characters.dart | 0 .../http/lib}/src/browser_client.dart | 0 {lib => pkgs/http/lib}/src/byte_stream.dart | 0 {lib => pkgs/http/lib}/src/client.dart | 0 {lib => pkgs/http/lib}/src/client_stub.dart | 0 {lib => pkgs/http/lib}/src/exception.dart | 0 {lib => pkgs/http/lib}/src/io_client.dart | 0 .../http/lib}/src/io_streamed_response.dart | 0 {lib => pkgs/http/lib}/src/mock_client.dart | 0 .../http/lib}/src/multipart_file.dart | 0 .../http/lib}/src/multipart_file_io.dart | 0 .../http/lib}/src/multipart_file_stub.dart | 0 .../http/lib}/src/multipart_request.dart | 0 {lib => pkgs/http/lib}/src/request.dart | 0 {lib => pkgs/http/lib}/src/response.dart | 0 .../http/lib}/src/streamed_request.dart | 0 .../http/lib}/src/streamed_response.dart | 0 {lib => pkgs/http/lib}/src/utils.dart | 0 {lib => pkgs/http/lib}/testing.dart | 0 pkgs/http/mono_pkg.yaml | 17 ++ pubspec.yaml => pkgs/http/pubspec.yaml | 0 .../http/test}/html/client_test.dart | 0 .../test}/html/streamed_request_test.dart | 0 {test => pkgs/http/test}/html/utils.dart | 0 {test => pkgs/http/test}/http_retry_test.dart | 0 {test => pkgs/http/test}/io/client_test.dart | 3 +- {test => pkgs/http/test}/io/http_test.dart | 0 .../http/test}/io/multipart_test.dart | 0 {test => pkgs/http/test}/io/request_test.dart | 0 .../http/test}/io/streamed_request_test.dart | 0 .../http/test}/mock_client_test.dart | 0 {test => pkgs/http/test}/multipart_test.dart | 0 {test => pkgs/http/test}/request_test.dart | 0 {test => pkgs/http/test}/response_test.dart | 0 .../http/test}/streamed_request_test.dart | 0 {test => pkgs/http/test}/stub_server.dart | 0 {test => pkgs/http/test}/utils.dart | 0 tool/ci.sh | 119 +++++++++ 55 files changed, 472 insertions(+), 168 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/dart.yml delete mode 100644 .github/workflows/test-package.yml mode change 100644 => 120000 README.md create mode 100644 mono_repo.yaml rename CHANGELOG.md => pkgs/http/CHANGELOG.md (100%) rename LICENSE => pkgs/http/LICENSE (100%) create mode 100644 pkgs/http/README.md rename {example => pkgs/http/example}/main.dart (100%) rename {example => pkgs/http/example}/retry.dart (100%) rename {lib => pkgs/http/lib}/browser_client.dart (100%) rename {lib => pkgs/http/lib}/http.dart (100%) rename {lib => pkgs/http/lib}/io_client.dart (100%) rename {lib => pkgs/http/lib}/retry.dart (100%) rename {lib => pkgs/http/lib}/src/base_client.dart (100%) rename {lib => pkgs/http/lib}/src/base_request.dart (100%) rename {lib => pkgs/http/lib}/src/base_response.dart (100%) rename {lib => pkgs/http/lib}/src/boundary_characters.dart (100%) rename {lib => pkgs/http/lib}/src/browser_client.dart (100%) rename {lib => pkgs/http/lib}/src/byte_stream.dart (100%) rename {lib => pkgs/http/lib}/src/client.dart (100%) rename {lib => pkgs/http/lib}/src/client_stub.dart (100%) rename {lib => pkgs/http/lib}/src/exception.dart (100%) rename {lib => pkgs/http/lib}/src/io_client.dart (100%) rename {lib => pkgs/http/lib}/src/io_streamed_response.dart (100%) rename {lib => pkgs/http/lib}/src/mock_client.dart (100%) rename {lib => pkgs/http/lib}/src/multipart_file.dart (100%) rename {lib => pkgs/http/lib}/src/multipart_file_io.dart (100%) rename {lib => pkgs/http/lib}/src/multipart_file_stub.dart (100%) rename {lib => pkgs/http/lib}/src/multipart_request.dart (100%) rename {lib => pkgs/http/lib}/src/request.dart (100%) rename {lib => pkgs/http/lib}/src/response.dart (100%) rename {lib => pkgs/http/lib}/src/streamed_request.dart (100%) rename {lib => pkgs/http/lib}/src/streamed_response.dart (100%) rename {lib => pkgs/http/lib}/src/utils.dart (100%) rename {lib => pkgs/http/lib}/testing.dart (100%) create mode 100644 pkgs/http/mono_pkg.yaml rename pubspec.yaml => pkgs/http/pubspec.yaml (100%) rename {test => pkgs/http/test}/html/client_test.dart (100%) rename {test => pkgs/http/test}/html/streamed_request_test.dart (100%) rename {test => pkgs/http/test}/html/utils.dart (100%) rename {test => pkgs/http/test}/http_retry_test.dart (100%) rename {test => pkgs/http/test}/io/client_test.dart (98%) rename {test => pkgs/http/test}/io/http_test.dart (100%) rename {test => pkgs/http/test}/io/multipart_test.dart (100%) rename {test => pkgs/http/test}/io/request_test.dart (100%) rename {test => pkgs/http/test}/io/streamed_request_test.dart (100%) rename {test => pkgs/http/test}/mock_client_test.dart (100%) rename {test => pkgs/http/test}/multipart_test.dart (100%) rename {test => pkgs/http/test}/request_test.dart (100%) rename {test => pkgs/http/test}/response_test.dart (100%) rename {test => pkgs/http/test}/streamed_request_test.dart (100%) rename {test => pkgs/http/test}/stub_server.dart (100%) rename {test => pkgs/http/test}/utils.dart (100%) create mode 100755 tool/ci.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..f189cdde73 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +.github/workflows/dart.yml linguist-generated=true +tool/ci.sh linguist-generated=true diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml new file mode 100644 index 0000000000..16cd83de09 --- /dev/null +++ b/.github/workflows/dart.yml @@ -0,0 +1,227 @@ +# Created with package:mono_repo v6.2.2 +name: Dart CI +on: + push: + branches: + - main + - master + pull_request: +defaults: + run: + shell: bash +env: + PUB_ENVIRONMENT: bot.github + +jobs: + job_001: + name: "analyze_and_format; Dart 2.14.0; `dart analyze --fatal-infos`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@v3 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:analyze" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - uses: dart-lang/setup-dart@v1.3 + with: + sdk: "2.14.0" + - id: checkout + uses: actions/checkout@v3 + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + run: dart pub upgrade + - name: "pkgs/http; dart analyze --fatal-infos" + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + run: dart analyze --fatal-infos + job_002: + name: "analyze_and_format; Dart dev; `dart analyze --fatal-infos`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@v3 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:analyze" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - uses: dart-lang/setup-dart@v1.3 + with: + sdk: dev + - id: checkout + uses: actions/checkout@v3 + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + run: dart pub upgrade + - name: "pkgs/http; dart analyze --fatal-infos" + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + run: dart analyze --fatal-infos + job_003: + name: "analyze_and_format; Dart dev; `dart format --output=none --set-exit-if-changed .`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@v3 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:format" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - uses: dart-lang/setup-dart@v1.3 + with: + sdk: dev + - id: checkout + uses: actions/checkout@v3 + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + run: dart pub upgrade + - name: "pkgs/http; dart format --output=none --set-exit-if-changed ." + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + run: "dart format --output=none --set-exit-if-changed ." + job_004: + name: "unit_test; Dart 2.14.0; `dart test --platform chrome`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@v3 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - uses: dart-lang/setup-dart@v1.3 + with: + sdk: "2.14.0" + - id: checkout + uses: actions/checkout@v3 + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + run: dart pub upgrade + - name: "pkgs/http; dart test --platform chrome" + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + run: dart test --platform chrome + needs: + - job_001 + - job_002 + - job_003 + job_005: + name: "unit_test; Dart 2.14.0; `dart test --platform vm`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@v3 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_0" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - uses: dart-lang/setup-dart@v1.3 + with: + sdk: "2.14.0" + - id: checkout + uses: actions/checkout@v3 + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + run: dart pub upgrade + - name: "pkgs/http; dart test --platform vm" + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + run: dart test --platform vm + needs: + - job_001 + - job_002 + - job_003 + job_006: + name: "unit_test; Dart dev; `dart test --platform chrome`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@v3 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - uses: dart-lang/setup-dart@v1.3 + with: + sdk: dev + - id: checkout + uses: actions/checkout@v3 + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + run: dart pub upgrade + - name: "pkgs/http; dart test --platform chrome" + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + run: dart test --platform chrome + needs: + - job_001 + - job_002 + - job_003 + job_007: + name: "unit_test; Dart dev; `dart test --platform vm`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@v3 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_0" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - uses: dart-lang/setup-dart@v1.3 + with: + sdk: dev + - id: checkout + uses: actions/checkout@v3 + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + run: dart pub upgrade + - name: "pkgs/http; dart test --platform vm" + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + run: dart test --platform vm + needs: + - job_001 + - job_002 + - job_003 diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml deleted file mode 100644 index 82602a8f78..0000000000 --- a/.github/workflows/test-package.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: Dart CI - -on: - # Run on PRs and pushes to the default branch. - push: - branches: [ master ] - pull_request: - branches: [ master ] - schedule: - - cron: "0 0 * * 0" - -env: - PUB_ENVIRONMENT: bot.github - -jobs: - # Check code formatting and static analysis on a single OS (linux) - # against Dart dev. - analyze: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - sdk: [dev] - steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v1.0 - with: - sdk: ${{ matrix.sdk }} - - id: install - name: Install dependencies - run: dart pub get - - name: Check formatting - run: dart format --output=none --set-exit-if-changed . - if: always() && steps.install.outcome == 'success' - - name: Analyze code - run: dart analyze --fatal-infos - if: always() && steps.install.outcome == 'success' - - # Run tests on a matrix consisting of two dimensions: - # 1. OS: ubuntu-latest, (macos-latest, windows-latest) - # 2. release channel: dev - test: - needs: analyze - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - # Add macos-latest and/or windows-latest if relevant for this package. - os: [ubuntu-latest] - sdk: [2.14.0, dev] - steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v1.0 - with: - sdk: ${{ matrix.sdk }} - - id: install - name: Install dependencies - run: dart pub get - - name: Run VM tests - run: dart test --platform vm - if: always() && steps.install.outcome == 'success' - - name: Run Chrome tests - run: dart test --platform chrome - if: always() && steps.install.outcome == 'success' diff --git a/README.md b/README.md deleted file mode 100644 index fa4f19934b..0000000000 --- a/README.md +++ /dev/null @@ -1,102 +0,0 @@ -A composable, Future-based library for making HTTP requests. - -[![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) -[![Build Status](https://github.com/dart-lang/http/workflows/Dart%20CI/badge.svg)](https://github.com/dart-lang/http/actions?query=workflow%3A"Dart+CI"+branch%3Amaster) - -This package contains a set of high-level functions and classes that make it -easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, -and the browser. - -## Using - -The easiest way to use this library is via the top-level functions. They allow -you to make individual HTTP requests with minimal hassle: - -```dart -import 'package:http/http.dart' as http; - -var url = Uri.parse('https://example.com/whatsit/create'); -var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'}); -print('Response status: ${response.statusCode}'); -print('Response body: ${response.body}'); - -print(await http.read(Uri.parse('https://example.com/foobar.txt'))); -``` - -If you're making multiple requests to the same server, you can keep open a -persistent connection by using a [Client][] rather than making one-off requests. -If you do this, make sure to close the client when you're done: - -```dart -var client = http.Client(); -try { - var response = await client.post( - Uri.https('example.com', 'whatsit/create'), - body: {'name': 'doodle', 'color': 'blue'}); - var decodedResponse = jsonDecode(utf8.decode(response.bodyBytes)) as Map; - var uri = Uri.parse(decodedResponse['uri'] as String); - print(await client.get(uri)); -} finally { - client.close(); -} -``` - -You can also exert more fine-grained control over your requests and responses by -creating [Request][] or [StreamedRequest][] objects yourself and passing them to -[Client.send][]. - -[Request]: https://pub.dev/documentation/http/latest/http/Request-class.html -[StreamedRequest]: https://pub.dev/documentation/http/latest/http/StreamedRequest-class.html -[Client.send]: https://pub.dev/documentation/http/latest/http/Client/send.html - -This package is designed to be composable. This makes it easy for external -libraries to work with one another to add behavior to it. Libraries wishing to -add behavior should create a subclass of [BaseClient][] that wraps another -[Client][] and adds the desired behavior: - -[BaseClient]: https://pub.dev/documentation/http/latest/http/BaseClient-class.html -[Client]: https://pub.dev/documentation/http/latest/http/Client-class.html - -```dart -class UserAgentClient extends http.BaseClient { - final String userAgent; - final http.Client _inner; - - UserAgentClient(this.userAgent, this._inner); - - Future send(http.BaseRequest request) { - request.headers['user-agent'] = userAgent; - return _inner.send(request); - } -} -``` - -## Retrying requests - -`package:http/retry.dart` provides a class [`RetryClient`][RetryClient] to wrap -an underlying [`http.Client`][Client] which transparently retries failing -requests. - -[RetryClient]: https://pub.dev/documentation/http/latest/retry/RetryClient-class.html -[Client]: https://pub.dev/documentation/http/latest/http/Client-class.html - -```dart -import 'package:http/http.dart' as http; -import 'package:http/retry.dart'; - -Future main() async { - final client = RetryClient(http.Client()); - try { - print(await client.read(Uri.parse('http://example.org'))); - } finally { - client.close(); - } -} -``` - -By default, this retries any request whose response has status code 503 -Temporary Failure up to three retries. It waits 500ms before the first retry, -and increases the delay by 1.5x each time. All of this can be customized using -the [`RetryClient()`][new RetryClient] constructor. - -[new RetryClient]: https://pub.dev/documentation/http/latest/retry/RetryClient/RetryClient.html diff --git a/README.md b/README.md new file mode 120000 index 0000000000..c89518d4d4 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +pkgs/http/README.md \ No newline at end of file diff --git a/mono_repo.yaml b/mono_repo.yaml new file mode 100644 index 0000000000..7dc1d9ed19 --- /dev/null +++ b/mono_repo.yaml @@ -0,0 +1,3 @@ +merge_stages: + - analyze_and_format + - unit_test diff --git a/CHANGELOG.md b/pkgs/http/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to pkgs/http/CHANGELOG.md diff --git a/LICENSE b/pkgs/http/LICENSE similarity index 100% rename from LICENSE rename to pkgs/http/LICENSE diff --git a/pkgs/http/README.md b/pkgs/http/README.md new file mode 100644 index 0000000000..fa4f19934b --- /dev/null +++ b/pkgs/http/README.md @@ -0,0 +1,102 @@ +A composable, Future-based library for making HTTP requests. + +[![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) +[![Build Status](https://github.com/dart-lang/http/workflows/Dart%20CI/badge.svg)](https://github.com/dart-lang/http/actions?query=workflow%3A"Dart+CI"+branch%3Amaster) + +This package contains a set of high-level functions and classes that make it +easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, +and the browser. + +## Using + +The easiest way to use this library is via the top-level functions. They allow +you to make individual HTTP requests with minimal hassle: + +```dart +import 'package:http/http.dart' as http; + +var url = Uri.parse('https://example.com/whatsit/create'); +var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'}); +print('Response status: ${response.statusCode}'); +print('Response body: ${response.body}'); + +print(await http.read(Uri.parse('https://example.com/foobar.txt'))); +``` + +If you're making multiple requests to the same server, you can keep open a +persistent connection by using a [Client][] rather than making one-off requests. +If you do this, make sure to close the client when you're done: + +```dart +var client = http.Client(); +try { + var response = await client.post( + Uri.https('example.com', 'whatsit/create'), + body: {'name': 'doodle', 'color': 'blue'}); + var decodedResponse = jsonDecode(utf8.decode(response.bodyBytes)) as Map; + var uri = Uri.parse(decodedResponse['uri'] as String); + print(await client.get(uri)); +} finally { + client.close(); +} +``` + +You can also exert more fine-grained control over your requests and responses by +creating [Request][] or [StreamedRequest][] objects yourself and passing them to +[Client.send][]. + +[Request]: https://pub.dev/documentation/http/latest/http/Request-class.html +[StreamedRequest]: https://pub.dev/documentation/http/latest/http/StreamedRequest-class.html +[Client.send]: https://pub.dev/documentation/http/latest/http/Client/send.html + +This package is designed to be composable. This makes it easy for external +libraries to work with one another to add behavior to it. Libraries wishing to +add behavior should create a subclass of [BaseClient][] that wraps another +[Client][] and adds the desired behavior: + +[BaseClient]: https://pub.dev/documentation/http/latest/http/BaseClient-class.html +[Client]: https://pub.dev/documentation/http/latest/http/Client-class.html + +```dart +class UserAgentClient extends http.BaseClient { + final String userAgent; + final http.Client _inner; + + UserAgentClient(this.userAgent, this._inner); + + Future send(http.BaseRequest request) { + request.headers['user-agent'] = userAgent; + return _inner.send(request); + } +} +``` + +## Retrying requests + +`package:http/retry.dart` provides a class [`RetryClient`][RetryClient] to wrap +an underlying [`http.Client`][Client] which transparently retries failing +requests. + +[RetryClient]: https://pub.dev/documentation/http/latest/retry/RetryClient-class.html +[Client]: https://pub.dev/documentation/http/latest/http/Client-class.html + +```dart +import 'package:http/http.dart' as http; +import 'package:http/retry.dart'; + +Future main() async { + final client = RetryClient(http.Client()); + try { + print(await client.read(Uri.parse('http://example.org'))); + } finally { + client.close(); + } +} +``` + +By default, this retries any request whose response has status code 503 +Temporary Failure up to three retries. It waits 500ms before the first retry, +and increases the delay by 1.5x each time. All of this can be customized using +the [`RetryClient()`][new RetryClient] constructor. + +[new RetryClient]: https://pub.dev/documentation/http/latest/retry/RetryClient/RetryClient.html diff --git a/example/main.dart b/pkgs/http/example/main.dart similarity index 100% rename from example/main.dart rename to pkgs/http/example/main.dart diff --git a/example/retry.dart b/pkgs/http/example/retry.dart similarity index 100% rename from example/retry.dart rename to pkgs/http/example/retry.dart diff --git a/lib/browser_client.dart b/pkgs/http/lib/browser_client.dart similarity index 100% rename from lib/browser_client.dart rename to pkgs/http/lib/browser_client.dart diff --git a/lib/http.dart b/pkgs/http/lib/http.dart similarity index 100% rename from lib/http.dart rename to pkgs/http/lib/http.dart diff --git a/lib/io_client.dart b/pkgs/http/lib/io_client.dart similarity index 100% rename from lib/io_client.dart rename to pkgs/http/lib/io_client.dart diff --git a/lib/retry.dart b/pkgs/http/lib/retry.dart similarity index 100% rename from lib/retry.dart rename to pkgs/http/lib/retry.dart diff --git a/lib/src/base_client.dart b/pkgs/http/lib/src/base_client.dart similarity index 100% rename from lib/src/base_client.dart rename to pkgs/http/lib/src/base_client.dart diff --git a/lib/src/base_request.dart b/pkgs/http/lib/src/base_request.dart similarity index 100% rename from lib/src/base_request.dart rename to pkgs/http/lib/src/base_request.dart diff --git a/lib/src/base_response.dart b/pkgs/http/lib/src/base_response.dart similarity index 100% rename from lib/src/base_response.dart rename to pkgs/http/lib/src/base_response.dart diff --git a/lib/src/boundary_characters.dart b/pkgs/http/lib/src/boundary_characters.dart similarity index 100% rename from lib/src/boundary_characters.dart rename to pkgs/http/lib/src/boundary_characters.dart diff --git a/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart similarity index 100% rename from lib/src/browser_client.dart rename to pkgs/http/lib/src/browser_client.dart diff --git a/lib/src/byte_stream.dart b/pkgs/http/lib/src/byte_stream.dart similarity index 100% rename from lib/src/byte_stream.dart rename to pkgs/http/lib/src/byte_stream.dart diff --git a/lib/src/client.dart b/pkgs/http/lib/src/client.dart similarity index 100% rename from lib/src/client.dart rename to pkgs/http/lib/src/client.dart diff --git a/lib/src/client_stub.dart b/pkgs/http/lib/src/client_stub.dart similarity index 100% rename from lib/src/client_stub.dart rename to pkgs/http/lib/src/client_stub.dart diff --git a/lib/src/exception.dart b/pkgs/http/lib/src/exception.dart similarity index 100% rename from lib/src/exception.dart rename to pkgs/http/lib/src/exception.dart diff --git a/lib/src/io_client.dart b/pkgs/http/lib/src/io_client.dart similarity index 100% rename from lib/src/io_client.dart rename to pkgs/http/lib/src/io_client.dart diff --git a/lib/src/io_streamed_response.dart b/pkgs/http/lib/src/io_streamed_response.dart similarity index 100% rename from lib/src/io_streamed_response.dart rename to pkgs/http/lib/src/io_streamed_response.dart diff --git a/lib/src/mock_client.dart b/pkgs/http/lib/src/mock_client.dart similarity index 100% rename from lib/src/mock_client.dart rename to pkgs/http/lib/src/mock_client.dart diff --git a/lib/src/multipart_file.dart b/pkgs/http/lib/src/multipart_file.dart similarity index 100% rename from lib/src/multipart_file.dart rename to pkgs/http/lib/src/multipart_file.dart diff --git a/lib/src/multipart_file_io.dart b/pkgs/http/lib/src/multipart_file_io.dart similarity index 100% rename from lib/src/multipart_file_io.dart rename to pkgs/http/lib/src/multipart_file_io.dart diff --git a/lib/src/multipart_file_stub.dart b/pkgs/http/lib/src/multipart_file_stub.dart similarity index 100% rename from lib/src/multipart_file_stub.dart rename to pkgs/http/lib/src/multipart_file_stub.dart diff --git a/lib/src/multipart_request.dart b/pkgs/http/lib/src/multipart_request.dart similarity index 100% rename from lib/src/multipart_request.dart rename to pkgs/http/lib/src/multipart_request.dart diff --git a/lib/src/request.dart b/pkgs/http/lib/src/request.dart similarity index 100% rename from lib/src/request.dart rename to pkgs/http/lib/src/request.dart diff --git a/lib/src/response.dart b/pkgs/http/lib/src/response.dart similarity index 100% rename from lib/src/response.dart rename to pkgs/http/lib/src/response.dart diff --git a/lib/src/streamed_request.dart b/pkgs/http/lib/src/streamed_request.dart similarity index 100% rename from lib/src/streamed_request.dart rename to pkgs/http/lib/src/streamed_request.dart diff --git a/lib/src/streamed_response.dart b/pkgs/http/lib/src/streamed_response.dart similarity index 100% rename from lib/src/streamed_response.dart rename to pkgs/http/lib/src/streamed_response.dart diff --git a/lib/src/utils.dart b/pkgs/http/lib/src/utils.dart similarity index 100% rename from lib/src/utils.dart rename to pkgs/http/lib/src/utils.dart diff --git a/lib/testing.dart b/pkgs/http/lib/testing.dart similarity index 100% rename from lib/testing.dart rename to pkgs/http/lib/testing.dart diff --git a/pkgs/http/mono_pkg.yaml b/pkgs/http/mono_pkg.yaml new file mode 100644 index 0000000000..8b6b5d1cb9 --- /dev/null +++ b/pkgs/http/mono_pkg.yaml @@ -0,0 +1,17 @@ +sdk: +- 2.14.0 +- dev + +stages: +- analyze_and_format: + - analyze: --fatal-infos + - format: + sdk: + - dev +- unit_test: + - test: --platform vm + os: + - linux + - test: --platform chrome + os: + - linux diff --git a/pubspec.yaml b/pkgs/http/pubspec.yaml similarity index 100% rename from pubspec.yaml rename to pkgs/http/pubspec.yaml diff --git a/test/html/client_test.dart b/pkgs/http/test/html/client_test.dart similarity index 100% rename from test/html/client_test.dart rename to pkgs/http/test/html/client_test.dart diff --git a/test/html/streamed_request_test.dart b/pkgs/http/test/html/streamed_request_test.dart similarity index 100% rename from test/html/streamed_request_test.dart rename to pkgs/http/test/html/streamed_request_test.dart diff --git a/test/html/utils.dart b/pkgs/http/test/html/utils.dart similarity index 100% rename from test/html/utils.dart rename to pkgs/http/test/html/utils.dart diff --git a/test/http_retry_test.dart b/pkgs/http/test/http_retry_test.dart similarity index 100% rename from test/http_retry_test.dart rename to pkgs/http/test/http_retry_test.dart diff --git a/test/io/client_test.dart b/pkgs/http/test/io/client_test.dart similarity index 98% rename from test/io/client_test.dart rename to pkgs/http/test/io/client_test.dart index d03a4bbee7..820aa66136 100644 --- a/test/io/client_test.dart +++ b/pkgs/http/test/io/client_test.dart @@ -149,8 +149,7 @@ void main() { }); test('runWithClient', () { - http.Client client = - http.runWithClient(() => http.Client(), () => TestClient()); + final client = http.runWithClient(() => http.Client(), () => TestClient()); expect(client, isA()); }); diff --git a/test/io/http_test.dart b/pkgs/http/test/io/http_test.dart similarity index 100% rename from test/io/http_test.dart rename to pkgs/http/test/io/http_test.dart diff --git a/test/io/multipart_test.dart b/pkgs/http/test/io/multipart_test.dart similarity index 100% rename from test/io/multipart_test.dart rename to pkgs/http/test/io/multipart_test.dart diff --git a/test/io/request_test.dart b/pkgs/http/test/io/request_test.dart similarity index 100% rename from test/io/request_test.dart rename to pkgs/http/test/io/request_test.dart diff --git a/test/io/streamed_request_test.dart b/pkgs/http/test/io/streamed_request_test.dart similarity index 100% rename from test/io/streamed_request_test.dart rename to pkgs/http/test/io/streamed_request_test.dart diff --git a/test/mock_client_test.dart b/pkgs/http/test/mock_client_test.dart similarity index 100% rename from test/mock_client_test.dart rename to pkgs/http/test/mock_client_test.dart diff --git a/test/multipart_test.dart b/pkgs/http/test/multipart_test.dart similarity index 100% rename from test/multipart_test.dart rename to pkgs/http/test/multipart_test.dart diff --git a/test/request_test.dart b/pkgs/http/test/request_test.dart similarity index 100% rename from test/request_test.dart rename to pkgs/http/test/request_test.dart diff --git a/test/response_test.dart b/pkgs/http/test/response_test.dart similarity index 100% rename from test/response_test.dart rename to pkgs/http/test/response_test.dart diff --git a/test/streamed_request_test.dart b/pkgs/http/test/streamed_request_test.dart similarity index 100% rename from test/streamed_request_test.dart rename to pkgs/http/test/streamed_request_test.dart diff --git a/test/stub_server.dart b/pkgs/http/test/stub_server.dart similarity index 100% rename from test/stub_server.dart rename to pkgs/http/test/stub_server.dart diff --git a/test/utils.dart b/pkgs/http/test/utils.dart similarity index 100% rename from test/utils.dart rename to pkgs/http/test/utils.dart diff --git a/tool/ci.sh b/tool/ci.sh new file mode 100755 index 0000000000..0706703ca4 --- /dev/null +++ b/tool/ci.sh @@ -0,0 +1,119 @@ +#!/bin/bash +# Created with package:mono_repo v6.2.2 + +# Support built in commands on windows out of the box. +# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") +# then "flutter" is called instead of "pub". +# This assumes that the Flutter SDK has been installed in a previous step. +function pub() { + if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then + command flutter pub "$@" + else + command dart pub "$@" + fi +} +# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") +# then "flutter" is called instead of "pub". +# This assumes that the Flutter SDK has been installed in a previous step. +function format() { + if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then + command flutter format "$@" + else + command dart format "$@" + fi +} +# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") +# then "flutter" is called instead of "pub". +# This assumes that the Flutter SDK has been installed in a previous step. +function analyze() { + if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then + command flutter analyze "$@" + else + command dart analyze "$@" + fi +} + +if [[ -z ${PKGS} ]]; then + echo -e '\033[31mPKGS environment variable must be set! - TERMINATING JOB\033[0m' + exit 64 +fi + +if [[ "$#" == "0" ]]; then + echo -e '\033[31mAt least one task argument must be provided! - TERMINATING JOB\033[0m' + exit 64 +fi + +SUCCESS_COUNT=0 +declare -a FAILURES + +for PKG in ${PKGS}; do + echo -e "\033[1mPKG: ${PKG}\033[22m" + EXIT_CODE=0 + pushd "${PKG}" >/dev/null || EXIT_CODE=$? + + if [[ ${EXIT_CODE} -ne 0 ]]; then + echo -e "\033[31mPKG: '${PKG}' does not exist - TERMINATING JOB\033[0m" + exit 64 + fi + + dart pub upgrade || EXIT_CODE=$? + + if [[ ${EXIT_CODE} -ne 0 ]]; then + echo -e "\033[31mPKG: ${PKG}; 'dart pub upgrade' - FAILED (${EXIT_CODE})\033[0m" + FAILURES+=("${PKG}; 'dart pub upgrade'") + else + for TASK in "$@"; do + EXIT_CODE=0 + echo + echo -e "\033[1mPKG: ${PKG}; TASK: ${TASK}\033[22m" + case ${TASK} in + analyze) + echo 'dart analyze --fatal-infos' + dart analyze --fatal-infos || EXIT_CODE=$? + ;; + format) + echo 'dart format --output=none --set-exit-if-changed .' + dart format --output=none --set-exit-if-changed . || EXIT_CODE=$? + ;; + test_0) + echo 'dart test --platform vm' + dart test --platform vm || EXIT_CODE=$? + ;; + test_1) + echo 'dart test --platform chrome' + dart test --platform chrome || EXIT_CODE=$? + ;; + *) + echo -e "\033[31mUnknown TASK '${TASK}' - TERMINATING JOB\033[0m" + exit 64 + ;; + esac + + if [[ ${EXIT_CODE} -ne 0 ]]; then + echo -e "\033[31mPKG: ${PKG}; TASK: ${TASK} - FAILED (${EXIT_CODE})\033[0m" + FAILURES+=("${PKG}; TASK: ${TASK}") + else + echo -e "\033[32mPKG: ${PKG}; TASK: ${TASK} - SUCCEEDED\033[0m" + SUCCESS_COUNT=$((SUCCESS_COUNT + 1)) + fi + + done + fi + + echo + echo -e "\033[32mSUCCESS COUNT: ${SUCCESS_COUNT}\033[0m" + + if [ ${#FAILURES[@]} -ne 0 ]; then + echo -e "\033[31mFAILURES: ${#FAILURES[@]}\033[0m" + for i in "${FAILURES[@]}"; do + echo -e "\033[31m $i\033[0m" + done + fi + + popd >/dev/null || exit 70 + echo +done + +if [ ${#FAILURES[@]} -ne 0 ]; then + exit 1 +fi From e36ba021fe3196a5ac9c60f2b3770df131696bd6 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 1 Jun 2022 14:00:29 -0700 Subject: [PATCH 124/448] Fix the repository page for monorepoization (#705) --- pkgs/http/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 0500d426b4..be066efbc0 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,7 +1,7 @@ name: http version: 0.13.5-dev description: A composable, multi-platform, Future-based API for HTTP requests. -repository: https://github.com/dart-lang/http +repository: https://github.com/dart-lang/http/tree/master/pkgs/http environment: sdk: '>=2.14.0 <3.0.0' From e8418d036a0030194767a0831ec71db6cd888b24 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 1 Jun 2022 16:12:19 -0700 Subject: [PATCH 125/448] Add a conformance test package for http Clients (#706) --- .github/workflows/dart.yml | 79 ++++-- README.md | 15 +- .../CHANGELOG.md | 3 + pkgs/http_client_conformance_tests/LICENSE | 27 ++ pkgs/http_client_conformance_tests/README.md | 34 +++ .../example/client_test.dart | 17 ++ .../lib/http_client_conformance_tests.dart | 35 +++ .../lib/src/redirect_tests.dart | 99 +++++++ .../lib/src/request_body_tests.dart | 264 ++++++++++++++++++ .../lib/src/request_headers_tests.dart | 93 ++++++ .../lib/src/response_body_tests.dart | 94 +++++++ .../lib/src/response_headers_tests.dart | 82 ++++++ .../mono_pkg.yaml | 14 + .../pubspec.yaml | 16 ++ .../test/io_client_test.dart | 15 + 15 files changed, 869 insertions(+), 18 deletions(-) mode change 120000 => 100644 README.md create mode 100644 pkgs/http_client_conformance_tests/CHANGELOG.md create mode 100644 pkgs/http_client_conformance_tests/LICENSE create mode 100644 pkgs/http_client_conformance_tests/README.md create mode 100644 pkgs/http_client_conformance_tests/example/client_test.dart create mode 100644 pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart create mode 100644 pkgs/http_client_conformance_tests/mono_pkg.yaml create mode 100644 pkgs/http_client_conformance_tests/pubspec.yaml create mode 100644 pkgs/http_client_conformance_tests/test/io_client_test.dart diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 16cd83de09..63701ad465 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -14,16 +14,16 @@ env: jobs: job_001: - name: "analyze_and_format; Dart 2.14.0; `dart analyze --fatal-infos`" + name: "analyze_and_format; Dart 2.14.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v3 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -41,17 +41,26 @@ jobs: if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http run: dart analyze --fatal-infos + - id: pkgs_http_client_conformance_tests_pub_upgrade + name: pkgs/http_client_conformance_tests; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart pub upgrade + - name: "pkgs/http_client_conformance_tests; dart analyze --fatal-infos" + if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart analyze --fatal-infos job_002: - name: "analyze_and_format; Dart dev; `dart analyze --fatal-infos`" + name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v3 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -69,17 +78,26 @@ jobs: if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http run: dart analyze --fatal-infos + - id: pkgs_http_client_conformance_tests_pub_upgrade + name: pkgs/http_client_conformance_tests; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart pub upgrade + - name: "pkgs/http_client_conformance_tests; dart analyze --fatal-infos" + if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart analyze --fatal-infos job_003: - name: "analyze_and_format; Dart dev; `dart format --output=none --set-exit-if-changed .`" + name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v3 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:format" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:format" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -97,8 +115,17 @@ jobs: if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http run: "dart format --output=none --set-exit-if-changed ." + - id: pkgs_http_client_conformance_tests_pub_upgrade + name: pkgs/http_client_conformance_tests; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart pub upgrade + - name: "pkgs/http_client_conformance_tests; dart format --output=none --set-exit-if-changed ." + if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: "dart format --output=none --set-exit-if-changed ." job_004: - name: "unit_test; Dart 2.14.0; `dart test --platform chrome`" + name: "unit_test; Dart 2.14.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -130,16 +157,16 @@ jobs: - job_002 - job_003 job_005: - name: "unit_test; Dart 2.14.0; `dart test --platform vm`" + name: "unit_test; Dart 2.14.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v3 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -157,12 +184,21 @@ jobs: if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http run: dart test --platform vm + - id: pkgs_http_client_conformance_tests_pub_upgrade + name: pkgs/http_client_conformance_tests; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart pub upgrade + - name: "pkgs/http_client_conformance_tests; dart test --platform vm" + if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart test --platform vm needs: - job_001 - job_002 - job_003 job_006: - name: "unit_test; Dart dev; `dart test --platform chrome`" + name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -194,16 +230,16 @@ jobs: - job_002 - job_003 job_007: - name: "unit_test; Dart dev; `dart test --platform vm`" + name: "unit_test; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v3 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -221,6 +257,15 @@ jobs: if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http run: dart test --platform vm + - id: pkgs_http_client_conformance_tests_pub_upgrade + name: pkgs/http_client_conformance_tests; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart pub upgrade + - name: "pkgs/http_client_conformance_tests; dart test --platform vm" + if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart test --platform vm needs: - job_001 - job_002 diff --git a/README.md b/README.md deleted file mode 120000 index c89518d4d4..0000000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -pkgs/http/README.md \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000000..a468bf69e6 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +A composable, Future-based library for making HTTP requests. + +[![Build Status](https://github.com/dart-lang/http/workflows/Dart%20CI/badge.svg)](https://github.com/dart-lang/http/actions?query=workflow%3A"Dart+CI"+branch%3Amaster) + +`package:http` contains a set of high-level functions and classes that make it +easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, +and the browser. + +## Packages + +| Package | Description | Version | +|---|---|---| +| [http](pkgs/http/) | A composable, Future-based library for making HTTP requests. | [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) | +| [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | Tests for `package:http` `Client` implementations. | [![pub package](https://img.shields.io/pub/v/http_client_conformance_tests.svg)](https://pub.dev/packages/http_client_conformance_tests) | diff --git a/pkgs/http_client_conformance_tests/CHANGELOG.md b/pkgs/http_client_conformance_tests/CHANGELOG.md new file mode 100644 index 0000000000..b78d64c626 --- /dev/null +++ b/pkgs/http_client_conformance_tests/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +- Initial version. diff --git a/pkgs/http_client_conformance_tests/LICENSE b/pkgs/http_client_conformance_tests/LICENSE new file mode 100644 index 0000000000..000cd7beca --- /dev/null +++ b/pkgs/http_client_conformance_tests/LICENSE @@ -0,0 +1,27 @@ +Copyright 2014, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pkgs/http_client_conformance_tests/README.md b/pkgs/http_client_conformance_tests/README.md new file mode 100644 index 0000000000..6f9b28fa14 --- /dev/null +++ b/pkgs/http_client_conformance_tests/README.md @@ -0,0 +1,34 @@ +A library that tests whether implementations of `package:http` +[`Client`'](https://pub.dev/documentation/http/latest/http/Client-class.html) +behave as expected. + +This package is intended to be used in the tests of packages that implement +`package:http` +[`Client`'](https://pub.dev/documentation/http/latest/http/Client-class.html). + +## Usage + +`package:http_client_conformance_tests` is meant to be used in the tests suite +of a `package:http` +[`Client`'](https://pub.dev/documentation/http/latest/http/Client-class.html) +like: + +```dart +import 'package:http/http.dart'; +import 'package:test/test.dart'; + +import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; + +class MyHttpClient extends BaseClient { + @override + Future send(BaseRequest request) async { + // Your implementation here. + } +} + +void main() { + group('client conformance tests', () { + testAll(MyHttpClient()); + }); +} +``` diff --git a/pkgs/http_client_conformance_tests/example/client_test.dart b/pkgs/http_client_conformance_tests/example/client_test.dart new file mode 100644 index 0000000000..87e90940f0 --- /dev/null +++ b/pkgs/http_client_conformance_tests/example/client_test.dart @@ -0,0 +1,17 @@ +import 'package:http/http.dart'; +import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; +import 'package:test/test.dart'; + +class MyHttpClient extends BaseClient { + @override + Future send(BaseRequest request) async { + // Your implementation here. + throw UnsupportedError('implement this method'); + } +} + +void main() { + group('client conformance tests', () { + testAll(MyHttpClient()); + }); +} diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart new file mode 100644 index 0000000000..befc1f79bf --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -0,0 +1,35 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:http/http.dart'; + +import 'src/redirect_tests.dart'; +import 'src/request_body_tests.dart'; +import 'src/request_headers_tests.dart'; +import 'src/response_body_tests.dart'; +import 'src/response_headers_tests.dart'; + +export 'src/redirect_tests.dart' show testRedirect; +export 'src/request_body_tests.dart' show testRequestBody; +export 'src/request_headers_tests.dart' show testRequestHeaders; +export 'src/response_body_tests.dart' show testResponseBody; +export 'src/response_headers_tests.dart' show testResponseHeaders; + +/// Runs the entire test suite against the given [Client]. +/// +/// If [canStreamRequestBody] is `false` then tests that assume that the +/// [Client] supports sending HTTP requests with unbounded body sizes will be +/// skipped. +// +/// If [canStreamResponseBody] is `false` then tests that assume that the +/// [Client] supports receiving HTTP responses with unbounded body sizes will +/// be skipped +void testAll(Client client, + {bool canStreamRequestBody = true, bool canStreamResponseBody = true}) { + testRequestBody(client, canStreamRequestBody: canStreamRequestBody); + testResponseBody(client, canStreamResponseBody: canStreamResponseBody); + testRequestHeaders(client); + testResponseHeaders(client); + testRedirect(client); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart new file mode 100644 index 0000000000..494266bbed --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart @@ -0,0 +1,99 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:http/http.dart'; +import 'package:test/test.dart'; + +/// Tests that the [Client] correctly implements HTTP redirect logic. +void testRedirect(Client client) async { + group('redirects', () { + late HttpServer server; + setUp(() async { + // URI | Redirects TO + // ===========|============== + // ".../loop" | ".../loop" + // ".../10" | ".../9" + // ".../9" | ".../8" + // ... | ... + // ".../1" | "/" + // "/" | + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + if (request.requestedUri.pathSegments.isEmpty) { + unawaited(request.response.close()); + } else if (request.requestedUri.pathSegments.last == 'loop') { + unawaited(request.response + .redirect(Uri.http('localhost:${server.port}', '/loop'))); + } else { + final n = int.parse(request.requestedUri.pathSegments.last); + final nextPath = n - 1 == 0 ? '' : '${n - 1}'; + unawaited(request.response + .redirect(Uri.http('localhost:${server.port}', '/$nextPath'))); + } + }); + }); + tearDown(() => server.close); + + test('disallow redirect', () async { + final request = Request('GET', Uri.http('localhost:${server.port}', '/1')) + ..followRedirects = false; + final response = await client.send(request); + expect(response.statusCode, 302); + expect(response.isRedirect, true); + }); + + test('allow redirect', () async { + final request = Request('GET', Uri.http('localhost:${server.port}', '/1')) + ..followRedirects = true; + final response = await client.send(request); + expect(response.statusCode, 200); + expect(response.isRedirect, false); + }); + + test('allow redirect, 0 maxRedirects, ', () async { + final request = Request('GET', Uri.http('localhost:${server.port}', '/1')) + ..followRedirects = true + ..maxRedirects = 0; + expect( + client.send(request), + throwsA(isA() + .having((e) => e.message, 'message', 'Redirect limit exceeded'))); + }, + skip: 'Re-enable after https://github.com/dart-lang/sdk/issues/49012 ' + 'is fixed'); + + test('exactly the right number of allowed redirects', () async { + final request = Request('GET', Uri.http('localhost:${server.port}', '/5')) + ..followRedirects = true + ..maxRedirects = 5; + final response = await client.send(request); + expect(response.statusCode, 200); + expect(response.isRedirect, false); + }); + + test('too many redirects', () async { + final request = Request('GET', Uri.http('localhost:${server.port}', '/6')) + ..followRedirects = true + ..maxRedirects = 5; + expect( + client.send(request), + throwsA(isA() + .having((e) => e.message, 'message', 'Redirect limit exceeded'))); + }); + + test('loop', () async { + final request = + Request('GET', Uri.http('localhost:${server.port}', '/loop')) + ..followRedirects = true + ..maxRedirects = 5; + expect( + client.send(request), + throwsA(isA().having((e) => e.message, 'message', + isIn(['Redirect loop detected', 'Redirect limit exceeded'])))); + }); + }); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart new file mode 100644 index 0000000000..056d349070 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart @@ -0,0 +1,264 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:http/http.dart'; +import 'package:test/test.dart'; + +class _Plus2Decoder extends Converter, String> { + @override + String convert(List input) => + const Utf8Decoder().convert(input.map((e) => e + 2).toList()); +} + +class _Plus2Encoder extends Converter> { + @override + List convert(String input) => + const Utf8Encoder().convert(input).map((e) => e - 2).toList(); +} + +/// An encoding, meant for testing, the just decrements input bytes by 2. +class _Plus2Encoding extends Encoding { + @override + Converter, String> get decoder => _Plus2Decoder(); + + @override + Converter> get encoder => _Plus2Encoder(); + + @override + String get name => 'plus2'; +} + +/// Tests that the [Client] correctly implements HTTP requests with bodies e.g. +/// 'POST'. +/// +/// If [canStreamRequestBody] is `false` then tests that assume that the +/// [Client] supports sending HTTP requests with unbounded body sizes will be +/// skipped. +void testRequestBody(Client client, {bool canStreamRequestBody = true}) { + group('request body', () { + test('client.post() with string body', () async { + late List? serverReceivedContentType; + late String serverReceivedBody; + + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + serverReceivedContentType = + request.headers[HttpHeaders.contentTypeHeader]; + serverReceivedBody = await const Utf8Decoder() + .bind(request) + .fold('', (p, e) => '$p$e'); + unawaited(request.response.close()); + }); + await client.post(Uri.http('localhost:${server.port}', ''), + body: 'Hello World!'); + + expect(serverReceivedContentType, ['text/plain; charset=utf-8']); + expect(serverReceivedBody, 'Hello World!'); + await server.close(); + }); + + test('client.post() with string body and custom encoding', () async { + late List? serverReceivedContentType; + late String serverReceivedBody; + + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + serverReceivedContentType = + request.headers[HttpHeaders.contentTypeHeader]; + serverReceivedBody = await const Utf8Decoder() + .bind(request) + .fold('', (p, e) => '$p$e'); + unawaited(request.response.close()); + }); + await client.post(Uri.http('localhost:${server.port}', ''), + body: 'Hello', encoding: _Plus2Encoding()); + + expect(serverReceivedContentType, ['text/plain; charset=plus2']); + expect(serverReceivedBody, 'Fcjjm'); + await server.close(); + }); + + test('client.post() with map body', () async { + late List? serverReceivedContentType; + late String serverReceivedBody; + + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + serverReceivedContentType = + request.headers[HttpHeaders.contentTypeHeader]; + serverReceivedBody = await const Utf8Decoder() + .bind(request) + .fold('', (p, e) => '$p$e'); + unawaited(request.response.close()); + }); + await client.post(Uri.http('localhost:${server.port}', ''), + body: {'key': 'value'}); + expect(serverReceivedContentType, + ['application/x-www-form-urlencoded; charset=utf-8']); + expect(serverReceivedBody, 'key=value'); + await server.close(); + }); + + test('client.post() with map body and encoding', () async { + late List? serverReceivedContentType; + late String serverReceivedBody; + + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + serverReceivedContentType = + request.headers[HttpHeaders.contentTypeHeader]; + serverReceivedBody = await const Utf8Decoder() + .bind(request) + .fold('', (p, e) => '$p$e'); + unawaited(request.response.close()); + }); + await client.post(Uri.http('localhost:${server.port}', ''), + body: {'key': 'value'}, encoding: _Plus2Encoding()); + expect(serverReceivedContentType, + ['application/x-www-form-urlencoded; charset=plus2']); + expect(serverReceivedBody, 'gau;r]hqa'); // key=value + await server.close(); + }); + + test('client.post() with List', () async { + late String serverReceivedBody; + + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + serverReceivedBody = await const Utf8Decoder() + .bind(request) + .fold('', (p, e) => '$p$e'); + unawaited(request.response.close()); + }); + await client.post(Uri.http('localhost:${server.port}', ''), + body: [1, 2, 3, 4, 5]); + + // RFC 2616 7.2.1 says that: + // Any HTTP/1.1 message containing an entity-body SHOULD include a + // Content-Type header field defining the media type of that body. + // But we didn't set one explicitly so don't verify what the server + // received. + expect(serverReceivedBody.codeUnits, [1, 2, 3, 4, 5]); + await server.close(); + }); + + test('client.post() with List and content-type', () async { + late List? serverReceivedContentType; + late String serverReceivedBody; + + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + serverReceivedContentType = + request.headers[HttpHeaders.contentTypeHeader]; + serverReceivedBody = await const Utf8Decoder() + .bind(request) + .fold('', (p, e) => '$p$e'); + unawaited(request.response.close()); + }); + await client.post(Uri.http('localhost:${server.port}', ''), + headers: {HttpHeaders.contentTypeHeader: 'image/png'}, + body: [1, 2, 3, 4, 5]); + + expect(serverReceivedContentType, ['image/png']); + expect(serverReceivedBody.codeUnits, [1, 2, 3, 4, 5]); + await server.close(); + }); + + test('client.post() with List with encoding', () async { + // Encoding should not affect binary payloads. + late String serverReceivedBody; + + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + serverReceivedBody = await const Utf8Decoder() + .bind(request) + .fold('', (p, e) => '$p$e'); + unawaited(request.response.close()); + }); + await client.post(Uri.http('localhost:${server.port}', ''), + body: [1, 2, 3, 4, 5], encoding: _Plus2Encoding()); + + // RFC 2616 7.2.1 says that: + // Any HTTP/1.1 message containing an entity-body SHOULD include a + // Content-Type header field defining the media type of that body. + // But we didn't set one explicitly so don't verify what the server + // received. + expect(serverReceivedBody.codeUnits, [1, 2, 3, 4, 5]); + await server.close(); + }); + + test('client.post() with List with encoding and content-type', + () async { + // Encoding should not affect the payload but it should affect the + // content-type. + late List? serverReceivedContentType; + late String serverReceivedBody; + + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + serverReceivedContentType = + request.headers[HttpHeaders.contentTypeHeader]; + serverReceivedBody = await const Utf8Decoder() + .bind(request) + .fold('', (p, e) => '$p$e'); + unawaited(request.response.close()); + }); + await client.post(Uri.http('localhost:${server.port}', ''), + headers: {HttpHeaders.contentTypeHeader: 'image/png'}, + body: [1, 2, 3, 4, 5], + encoding: _Plus2Encoding()); + + expect(serverReceivedContentType, ['image/png; charset=plus2']); + expect(serverReceivedBody.codeUnits, [1, 2, 3, 4, 5]); + await server.close(); + }); + + test('client.send() with StreamedRequest', () async { + // The client continuously streams data to the server until + // instructed to stop (by setting `clientWriting` to `false`). + // The server sets `serverWriting` to `false` after it has + // already received some data. + // + // This ensures that the client supports streamed data sends. + var lastReceived = 0; + var clientWriting = true; + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await const LineSplitter() + .bind(const Utf8Decoder().bind(request)) + .forEach((s) { + lastReceived = int.parse(s.trim()); + if (lastReceived < 1000) { + expect(clientWriting, true); + } else { + clientWriting = false; + } + }); + unawaited(request.response.close()); + }); + Stream count() async* { + var i = 0; + while (clientWriting) { + yield '${i++}\n'; + // Let the event loop run. + await Future.delayed(const Duration()); + } + } + + final request = + StreamedRequest('POST', Uri.http('localhost:${server.port}', '')); + const Utf8Encoder() + .bind(count()) + .listen(request.sink.add, onDone: request.sink.close); + await client.send(request); + + expect(lastReceived, greaterThanOrEqualTo(1000)); + await server.close(); + }, skip: canStreamRequestBody ? false : 'does not stream request bodies'); + }); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart new file mode 100644 index 0000000000..d5a6820b8a --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart @@ -0,0 +1,93 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:http/http.dart'; +import 'package:test/test.dart'; + +/// Tests that the [Client] correctly sends headers in the request. +void testRequestHeaders(Client client) async { + group('client headers', () { + test('single header', () async { + late HttpHeaders requestHeaders; + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + requestHeaders = request.headers; + unawaited(request.response.close()); + }); + await client.get(Uri.http('localhost:${server.port}', ''), + headers: {'foo': 'bar'}); + expect(requestHeaders['foo'], ['bar']); + await server.close(); + }); + + test('UPPER case header', () async { + late HttpHeaders requestHeaders; + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + requestHeaders = request.headers; + unawaited(request.response.close()); + }); + await client.get(Uri.http('localhost:${server.port}', ''), + headers: {'FOO': 'BAR'}); + // RFC 2616 14.44 states that header field names are case-insensive. + // http.Client canonicalizes field names into lower case. + expect(requestHeaders['foo'], ['BAR']); + await server.close(); + }); + + test('test headers different only in case', () async { + // RFC 2616 14.44 states that header field names are case-insensive. + late HttpHeaders requestHeaders; + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + requestHeaders = request.headers; + unawaited(request.response.close()); + }); + await client.get(Uri.http('localhost:${server.port}', ''), + headers: {'foo': 'bar', 'Foo': 'Bar'}); + expect(requestHeaders['foo']!.single, isIn(['bar', 'Bar'])); + await server.close(); + }); + + test('multiple headers', () async { + late HttpHeaders requestHeaders; + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + requestHeaders = request.headers; + unawaited(request.response.close()); + }); + // The `http.Client` API does not offer a way of sending the name field + // more than once. + await client.get(Uri.http('localhost:${server.port}', ''), + headers: {'fruit': 'apple', 'color': 'red'}); + expect(requestHeaders['fruit'], ['apple']); + expect(requestHeaders['color'], ['red']); + await server.close(); + }); + + test('multiple values per header', () async { + late HttpHeaders requestHeaders; + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + requestHeaders = request.headers; + unawaited(request.response.close()); + }); + // The `http.Client` API does not offer a way of sending the same field + // more than once. + await client.get(Uri.http('localhost:${server.port}', ''), + headers: {'list': 'apple, orange'}); + + expect(requestHeaders['list'], ['apple, orange']); + await server.close(); + }); + }); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart new file mode 100644 index 0000000000..54de1221a4 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart @@ -0,0 +1,94 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:http/http.dart'; +import 'package:test/test.dart'; + +/// Tests that the [Client] correctly implements HTTP responses with bodies. +/// +/// If [canStreamResponseBody] is `false` then tests that assume that the +/// [Client] supports receiving HTTP responses with unbounded body sizes will +/// be skipped +void testResponseBody(Client client, + {bool canStreamResponseBody = true}) async { + group('response body', () { + test('small response with content length', () async { + const message = 'Hello World!'; + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write(message); + await request.response.close(); + }); + final response = + await client.get(Uri.http('localhost:${server.port}', '')); + expect(response.body, message); + expect(response.bodyBytes, message.codeUnits); + expect(response.contentLength, message.length); + expect(response.headers['content-type'], 'text/plain'); + await server.close(); + }); + + test('small response streamed without content length', () async { + const message = 'Hello World!'; + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write(message); + await request.response.close(); + }); + final request = Request('GET', Uri.http('localhost:${server.port}', '')); + final response = await client.send(request); + expect(await response.stream.bytesToString(), message); + expect(response.contentLength, null); + expect(response.headers['content-type'], 'text/plain'); + await server.close(); + }); + + test('large response streamed without content length', () async { + // The server continuously streams data to the client until + // instructed to stop (by setting `serverWriting` to `false`). + // The client sets `serverWriting` to `false` after it has + // already received some data. + // + // This ensures that the client supports streamed responses. + var serverWriting = false; + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + serverWriting = true; + for (var i = 0; serverWriting; ++i) { + request.response.write('$i\n'); + await request.response.flush(); + // Let the event loop run. + await Future.delayed(const Duration()); + } + await request.response.close(); + }); + final request = Request('GET', Uri.http('localhost:${server.port}', '')); + final response = await client.send(request); + var lastReceived = 0; + await const LineSplitter() + .bind(const Utf8Decoder().bind(response.stream)) + .forEach((s) { + lastReceived = int.parse(s.trim()); + if (lastReceived < 1000) { + expect(serverWriting, true); + } else { + serverWriting = false; + } + }); + expect(response.headers['content-type'], 'text/plain'); + expect(lastReceived, greaterThanOrEqualTo(1000)); + await server.close(); + }, skip: canStreamResponseBody ? false : 'does not stream response bodies'); + }); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart new file mode 100644 index 0000000000..9ff0ee603e --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart @@ -0,0 +1,82 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:http/http.dart'; +import 'package:test/test.dart'; + +/// Tests that the [Client] correctly processes response headers e.g. +/// 'Content-Length'. +void testResponseHeaders(Client client) async { + group('server headers', () { + test('single header', () async { + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + var response = request.response; + response.headers.set('foo', 'bar'); + unawaited(response.close()); + }); + final response = + await client.get(Uri.http('localhost:${server.port}', '')); + expect(response.headers['foo'], 'bar'); + await server.close(); + }); + + test('UPPERCASE header', () async { + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + var response = request.response; + response.headers.set('FOO', 'BAR', preserveHeaderCase: true); + unawaited(response.close()); + }); + // RFC 2616 14.44 states that header field names are case-insensive. + // http.Client canonicalizes field names into lower case. + final response = + await client.get(Uri.http('localhost:${server.port}', '')); + expect(response.headers['foo'], 'BAR'); + await server.close(); + }); + + test('multiple headers', () async { + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + var response = request.response; + response.headers + ..set('field1', 'value1') + ..set('field2', 'value2') + ..set('field3', 'value3'); + unawaited(response.close()); + }); + final response = + await client.get(Uri.http('localhost:${server.port}', '')); + expect(response.headers['field1'], 'value1'); + expect(response.headers['field2'], 'value2'); + expect(response.headers['field3'], 'value3'); + await server.close(); + }); + + test('multiple values per header', () async { + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + var response = request.response; + // RFC 2616 14.44 states that header field names are case-insensive. + response.headers + ..add('list', 'apple') + ..add('list', 'orange') + ..add('List', 'banana'); + unawaited(response.close()); + }); + final response = + await client.get(Uri.http('localhost:${server.port}', '')); + expect(response.headers['list'], 'apple, orange, banana'); + await server.close(); + }); + }); +} diff --git a/pkgs/http_client_conformance_tests/mono_pkg.yaml b/pkgs/http_client_conformance_tests/mono_pkg.yaml new file mode 100644 index 0000000000..ccd02ba13f --- /dev/null +++ b/pkgs/http_client_conformance_tests/mono_pkg.yaml @@ -0,0 +1,14 @@ +sdk: +- 2.14.0 +- dev + +stages: +- analyze_and_format: + - analyze: --fatal-infos + - format: + sdk: + - dev +- unit_test: + - test: --platform vm + os: + - linux diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml new file mode 100644 index 0000000000..410e5cc73d --- /dev/null +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -0,0 +1,16 @@ +name: http_client_conformance_tests +description: > + A library that tests whether implementations of package:http Client behave + as expected. +version: 0.0.1-dev +repository: https://github.com/dart-lang/http/tree/master/pkgs/http_client_conformance_tests + +environment: + sdk: '>=2.14.0 <3.0.0' + +dependencies: + http: ^0.13.4 + test: ^1.21.1 + +dev_dependencies: + lints: ^1.0.0 diff --git a/pkgs/http_client_conformance_tests/test/io_client_test.dart b/pkgs/http_client_conformance_tests/test/io_client_test.dart new file mode 100644 index 0000000000..b9ab62c0ee --- /dev/null +++ b/pkgs/http_client_conformance_tests/test/io_client_test.dart @@ -0,0 +1,15 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:http/io_client.dart'; +import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; +import 'package:test/test.dart'; + +void main() { + final client = IOClient(); + + group('testAll', () { + testAll(client); + }); +} From 742ed6e64f7672d716fef462a26705f5250ec62d Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Thu, 2 Jun 2022 09:21:46 -0700 Subject: [PATCH 126/448] add a LICENSE file; tweaks to the readmes (#709) --- LICENSE | 27 +++++++++++++++++++ README.md | 8 +++--- pkgs/http/README.md | 6 ++--- pkgs/http_client_conformance_tests/README.md | 8 +++--- .../pubspec.yaml | 4 +-- 5 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000..000cd7beca --- /dev/null +++ b/LICENSE @@ -0,0 +1,27 @@ +Copyright 2014, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md index a468bf69e6..c6eae3c70b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ -A composable, Future-based library for making HTTP requests. - [![Build Status](https://github.com/dart-lang/http/workflows/Dart%20CI/badge.svg)](https://github.com/dart-lang/http/actions?query=workflow%3A"Dart+CI"+branch%3Amaster) +A composable, Future-based library for making HTTP requests. + `package:http` contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, and the browser. @@ -10,5 +10,5 @@ and the browser. | Package | Description | Version | |---|---|---| -| [http](pkgs/http/) | A composable, Future-based library for making HTTP requests. | [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) | -| [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | Tests for `package:http` `Client` implementations. | [![pub package](https://img.shields.io/pub/v/http_client_conformance_tests.svg)](https://pub.dev/packages/http_client_conformance_tests) | +| [http](pkgs/http/) | A composable, multi-platform, Future-based API for HTTP requests. | [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) | +| [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | A library that tests whether implementations of package:http's `Client` class behave as expected. | | diff --git a/pkgs/http/README.md b/pkgs/http/README.md index fa4f19934b..e7a3e0fc5e 100644 --- a/pkgs/http/README.md +++ b/pkgs/http/README.md @@ -1,7 +1,7 @@ -A composable, Future-based library for making HTTP requests. - [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) -[![Build Status](https://github.com/dart-lang/http/workflows/Dart%20CI/badge.svg)](https://github.com/dart-lang/http/actions?query=workflow%3A"Dart+CI"+branch%3Amaster) +[![package publisher](https://img.shields.io/pub/publisher/http.svg)](https://pub.dev/packages/http/publisher) + +A composable, Future-based library for making HTTP requests. This package contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, diff --git a/pkgs/http_client_conformance_tests/README.md b/pkgs/http_client_conformance_tests/README.md index 6f9b28fa14..73642a3fa8 100644 --- a/pkgs/http_client_conformance_tests/README.md +++ b/pkgs/http_client_conformance_tests/README.md @@ -1,16 +1,18 @@ +[![pub package](https://img.shields.io/pub/v/http_client_conformance_tests.svg)](https://pub.dev/packages/http_client_conformance_tests) + A library that tests whether implementations of `package:http` -[`Client`'](https://pub.dev/documentation/http/latest/http/Client-class.html) +[`Client`](https://pub.dev/documentation/http/latest/http/Client-class.html) behave as expected. This package is intended to be used in the tests of packages that implement `package:http` -[`Client`'](https://pub.dev/documentation/http/latest/http/Client-class.html). +[`Client`](https://pub.dev/documentation/http/latest/http/Client-class.html). ## Usage `package:http_client_conformance_tests` is meant to be used in the tests suite of a `package:http` -[`Client`'](https://pub.dev/documentation/http/latest/http/Client-class.html) +[`Client`](https://pub.dev/documentation/http/latest/http/Client-class.html) like: ```dart diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index 410e5cc73d..7b84597e90 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -1,7 +1,7 @@ name: http_client_conformance_tests description: > - A library that tests whether implementations of package:http Client behave - as expected. + A library that tests whether implementations of package:http's `Client` class + behave as expected. version: 0.0.1-dev repository: https://github.com/dart-lang/http/tree/master/pkgs/http_client_conformance_tests From 9ab218c26413d1e9db51f1715f899c6c5a3b7a87 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 2 Jun 2022 10:52:51 -0700 Subject: [PATCH 127/448] Use the Uri.http constructor in docs and tests (#707) Use `Uri.parse` when the string is completely opaque to the calling code. When the calling code is hardcoding the protocol, use the protocol specific constructor. --- pkgs/http/README.md | 6 +++--- pkgs/http/lib/src/client.dart | 2 +- pkgs/http/lib/src/multipart_request.dart | 2 +- pkgs/http/test/html/client_test.dart | 2 +- pkgs/http/test/http_retry_test.dart | 4 ++-- pkgs/http/test/io/client_test.dart | 2 +- pkgs/http/test/utils.dart | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/http/README.md b/pkgs/http/README.md index e7a3e0fc5e..c889f2b54a 100644 --- a/pkgs/http/README.md +++ b/pkgs/http/README.md @@ -15,12 +15,12 @@ you to make individual HTTP requests with minimal hassle: ```dart import 'package:http/http.dart' as http; -var url = Uri.parse('https://example.com/whatsit/create'); +var url = Uri.https('example.com', 'whatsit/create'); var response = await http.post(url, body: {'name': 'doodle', 'color': 'blue'}); print('Response status: ${response.statusCode}'); print('Response body: ${response.body}'); -print(await http.read(Uri.parse('https://example.com/foobar.txt'))); +print(await http.read(Uri.https('example.com', 'foobar.txt'))); ``` If you're making multiple requests to the same server, you can keep open a @@ -87,7 +87,7 @@ import 'package:http/retry.dart'; Future main() async { final client = RetryClient(http.Client()); try { - print(await client.read(Uri.parse('http://example.org'))); + print(await client.read(Uri.http('example.org', ''))); } finally { client.close(); } diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index 56ddcbc300..c75bcd88b7 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -177,7 +177,7 @@ Client? get zoneClient { /// /// void myFunction() { /// // Uses the `Client` configured in `main`. -/// final response = await get(Uri.parse("https://www.example.com/")); +/// final response = await get(Uri.https('www.example.com', '')); /// final client = Client(); /// } /// ``` diff --git a/pkgs/http/lib/src/multipart_request.dart b/pkgs/http/lib/src/multipart_request.dart index 9aeffa23eb..2cb81a1d8a 100644 --- a/pkgs/http/lib/src/multipart_request.dart +++ b/pkgs/http/lib/src/multipart_request.dart @@ -21,7 +21,7 @@ final _newlineRegExp = RegExp(r'\r\n|\r|\n'); /// This request automatically sets the Content-Type header to /// `multipart/form-data`. This value will override any value set by the user. /// -/// var uri = Uri.parse('https://example.com/create'); +/// var uri = Uri.https('example.com', 'create'); /// var request = http.MultipartRequest('POST', uri) /// ..fields['user'] = 'nweiz@google.com' /// ..files.add(await http.MultipartFile.fromPath( diff --git a/pkgs/http/test/html/client_test.dart b/pkgs/http/test/html/client_test.dart index 22ed98654e..24b20dc0e0 100644 --- a/pkgs/http/test/html/client_test.dart +++ b/pkgs/http/test/html/client_test.dart @@ -28,7 +28,7 @@ void main() { test('#send with an invalid URL', () { var client = BrowserClient(); - var url = Uri.parse('http://http.invalid'); + var url = Uri.http('http.invalid', ''); var request = http.StreamedRequest('POST', url); expect( diff --git a/pkgs/http/test/http_retry_test.dart b/pkgs/http/test/http_retry_test.dart index 42ff3b5198..da51154c4a 100644 --- a/pkgs/http/test/http_retry_test.dart +++ b/pkgs/http/test/http_retry_test.dart @@ -208,13 +208,13 @@ void main() { expect(request.maxRedirects, equals(12)); expect(request.method, equals('POST')); expect(request.persistentConnection, isFalse); - expect(request.url, equals(Uri.parse('http://example.org'))); + expect(request.url, equals(Uri.http('example.org', ''))); expect(request.body, equals('hello')); return Response('', 503); }, count: 2)), [Duration.zero]); - final request = Request('POST', Uri.parse('http://example.org')) + final request = Request('POST', Uri.http('example.org', '')) ..body = 'hello' ..followRedirects = false ..headers['foo'] = 'bar' diff --git a/pkgs/http/test/io/client_test.dart b/pkgs/http/test/io/client_test.dart index 820aa66136..80953c9ba4 100644 --- a/pkgs/http/test/io/client_test.dart +++ b/pkgs/http/test/io/client_test.dart @@ -111,7 +111,7 @@ void main() { test('#send with an invalid URL', () { var client = http.Client(); - var url = Uri.parse('http://http.invalid'); + var url = Uri.http('http.invalid', ''); var request = http.StreamedRequest('POST', url); request.headers[HttpHeaders.contentTypeHeader] = 'application/json; charset=utf-8'; diff --git a/pkgs/http/test/utils.dart b/pkgs/http/test/utils.dart index 575df1a167..d4c319f73f 100644 --- a/pkgs/http/test/utils.dart +++ b/pkgs/http/test/utils.dart @@ -9,7 +9,7 @@ import 'package:http_parser/http_parser.dart'; import 'package:test/test.dart'; /// A dummy URL for constructing requests that won't be sent. -Uri get dummyUrl => Uri.parse('http://dart.dev/'); +Uri get dummyUrl => Uri.http('dart.dev', ''); /// Removes eight spaces of leading indentation from a multiline string. /// From eb56c53162732bcc9d498d1658adfa403866591e Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 2 Jun 2022 15:10:35 -0700 Subject: [PATCH 128/448] Run the redirect tests against the browser client. (#708) --- .github/workflows/dart.yml | 30 ++++++-- .../lib/http_client_conformance_tests.dart | 9 ++- .../lib/src/redirect_server.dart | 45 +++++++++++ .../lib/src/redirect_tests.dart | 74 +++++++------------ .../mono_pkg.yaml | 3 + .../test/browser_client_test.dart | 17 +++++ .../test/io_client_test.dart | 2 + 7 files changed, 126 insertions(+), 54 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/redirect_server.dart create mode 100644 pkgs/http_client_conformance_tests/test/browser_client_test.dart diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 63701ad465..72a425ad93 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -125,16 +125,16 @@ jobs: working-directory: pkgs/http_client_conformance_tests run: "dart format --output=none --set-exit-if-changed ." job_004: - name: "unit_test; Dart 2.14.0; PKG: pkgs/http; `dart test --platform chrome`" + name: "unit_test; Dart 2.14.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v3 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -152,6 +152,15 @@ jobs: if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http run: dart test --platform chrome + - id: pkgs_http_client_conformance_tests_pub_upgrade + name: pkgs/http_client_conformance_tests; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart pub upgrade + - name: "pkgs/http_client_conformance_tests; dart test --platform chrome" + if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart test --platform chrome needs: - job_001 - job_002 @@ -198,16 +207,16 @@ jobs: - job_002 - job_003 job_006: - name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" + name: "unit_test; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v3 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -225,6 +234,15 @@ jobs: if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http run: dart test --platform chrome + - id: pkgs_http_client_conformance_tests_pub_upgrade + name: pkgs/http_client_conformance_tests; dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart pub upgrade + - name: "pkgs/http_client_conformance_tests; dart test --platform chrome" + if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + run: dart test --platform chrome needs: - job_001 - job_002 diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index befc1f79bf..2dc6e20efc 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -25,11 +25,16 @@ export 'src/response_headers_tests.dart' show testResponseHeaders; /// If [canStreamResponseBody] is `false` then tests that assume that the /// [Client] supports receiving HTTP responses with unbounded body sizes will /// be skipped +/// +/// If [redirectAlwaysAllowed] is `true` then tests that require the [Client] +/// to limit redirects will be skipped. void testAll(Client client, - {bool canStreamRequestBody = true, bool canStreamResponseBody = true}) { + {bool canStreamRequestBody = true, + bool canStreamResponseBody = true, + bool redirectAlwaysAllowed = false}) { testRequestBody(client, canStreamRequestBody: canStreamRequestBody); testResponseBody(client, canStreamResponseBody: canStreamResponseBody); testRequestHeaders(client); testResponseHeaders(client); - testRedirect(client); + testRedirect(client, redirectAlwaysAllowed: redirectAlwaysAllowed); } diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_server.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_server.dart new file mode 100644 index 0000000000..cf1fafddb8 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_server.dart @@ -0,0 +1,45 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server and sends the port back on the given channel. +/// +/// Quits when anything is received on the channel. +/// +/// URI | Redirects TO +/// ===========|============== +/// ".../loop" | ".../loop" +/// ".../10" | ".../9" +/// ".../9" | ".../8" +/// ... | ... +/// ".../1" | "/" +/// "/" | <200 return> +void hybridMain(StreamChannel channel) async { + late HttpServer server; + + server = await HttpServer.bind('localhost', 0) + ..listen((request) async { + request.response.headers.set('Access-Control-Allow-Origin', '*'); + if (request.requestedUri.pathSegments.isEmpty) { + unawaited(request.response.close()); + } else if (request.requestedUri.pathSegments.last == 'loop') { + unawaited(request.response + .redirect(Uri.http('localhost:${server.port}', '/loop'))); + } else { + final n = int.parse(request.requestedUri.pathSegments.last); + final nextPath = n - 1 == 0 ? '' : '${n - 1}'; + unawaited(request.response + .redirect(Uri.http('localhost:${server.port}', '/$nextPath'))); + } + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart index 494266bbed..3c38089b82 100644 --- a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart @@ -2,52 +2,35 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; -import 'dart:io'; - import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; /// Tests that the [Client] correctly implements HTTP redirect logic. -void testRedirect(Client client) async { +/// +/// If [redirectAlwaysAllowed] is `true` then tests that require the [Client] +/// to limit redirects will be skipped. +void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { group('redirects', () { - late HttpServer server; + late String host; + late StreamChannel httpServerChannel; + setUp(() async { - // URI | Redirects TO - // ===========|============== - // ".../loop" | ".../loop" - // ".../10" | ".../9" - // ".../9" | ".../8" - // ... | ... - // ".../1" | "/" - // "/" | - server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - if (request.requestedUri.pathSegments.isEmpty) { - unawaited(request.response.close()); - } else if (request.requestedUri.pathSegments.last == 'loop') { - unawaited(request.response - .redirect(Uri.http('localhost:${server.port}', '/loop'))); - } else { - final n = int.parse(request.requestedUri.pathSegments.last); - final nextPath = n - 1 == 0 ? '' : '${n - 1}'; - unawaited(request.response - .redirect(Uri.http('localhost:${server.port}', '/$nextPath'))); - } - }); + httpServerChannel = spawnHybridUri('../lib/src/redirect_server.dart'); + host = 'localhost:${await httpServerChannel.stream.first as int}'; }); - tearDown(() => server.close); + tearDown(() => httpServerChannel.sink.add(null)); test('disallow redirect', () async { - final request = Request('GET', Uri.http('localhost:${server.port}', '/1')) + final request = Request('GET', Uri.http(host, '/1')) ..followRedirects = false; final response = await client.send(request); expect(response.statusCode, 302); expect(response.isRedirect, true); - }); + }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : ''); test('allow redirect', () async { - final request = Request('GET', Uri.http('localhost:${server.port}', '/1')) + final request = Request('GET', Uri.http(host, '/1')) ..followRedirects = true; final response = await client.send(request); expect(response.statusCode, 200); @@ -55,7 +38,7 @@ void testRedirect(Client client) async { }); test('allow redirect, 0 maxRedirects, ', () async { - final request = Request('GET', Uri.http('localhost:${server.port}', '/1')) + final request = Request('GET', Uri.http(host, '/1')) ..followRedirects = true ..maxRedirects = 0; expect( @@ -67,33 +50,32 @@ void testRedirect(Client client) async { 'is fixed'); test('exactly the right number of allowed redirects', () async { - final request = Request('GET', Uri.http('localhost:${server.port}', '/5')) + final request = Request('GET', Uri.http(host, '/5')) ..followRedirects = true ..maxRedirects = 5; final response = await client.send(request); expect(response.statusCode, 200); expect(response.isRedirect, false); - }); + }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : ''); test('too many redirects', () async { - final request = Request('GET', Uri.http('localhost:${server.port}', '/6')) + final request = Request('GET', Uri.http(host, '/6')) ..followRedirects = true ..maxRedirects = 5; expect( client.send(request), throwsA(isA() .having((e) => e.message, 'message', 'Redirect limit exceeded'))); - }); + }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : ''); - test('loop', () async { - final request = - Request('GET', Uri.http('localhost:${server.port}', '/loop')) - ..followRedirects = true - ..maxRedirects = 5; - expect( - client.send(request), - throwsA(isA().having((e) => e.message, 'message', - isIn(['Redirect loop detected', 'Redirect limit exceeded'])))); - }); + test( + 'loop', + () async { + final request = Request('GET', Uri.http(host, '/loop')) + ..followRedirects = true + ..maxRedirects = 5; + expect(client.send(request), throwsA(isA())); + }, + ); }); } diff --git a/pkgs/http_client_conformance_tests/mono_pkg.yaml b/pkgs/http_client_conformance_tests/mono_pkg.yaml index ccd02ba13f..8b6b5d1cb9 100644 --- a/pkgs/http_client_conformance_tests/mono_pkg.yaml +++ b/pkgs/http_client_conformance_tests/mono_pkg.yaml @@ -12,3 +12,6 @@ stages: - test: --platform vm os: - linux + - test: --platform chrome + os: + - linux diff --git a/pkgs/http_client_conformance_tests/test/browser_client_test.dart b/pkgs/http_client_conformance_tests/test/browser_client_test.dart new file mode 100644 index 0000000000..d209b81604 --- /dev/null +++ b/pkgs/http_client_conformance_tests/test/browser_client_test.dart @@ -0,0 +1,17 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('browser') + +import 'package:http/browser_client.dart'; +import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; +import 'package:test/test.dart'; + +void main() { + final client = BrowserClient(); + + group('testAll', () { + testRedirect(client, redirectAlwaysAllowed: true); + }); +} diff --git a/pkgs/http_client_conformance_tests/test/io_client_test.dart b/pkgs/http_client_conformance_tests/test/io_client_test.dart index b9ab62c0ee..7a13aabbff 100644 --- a/pkgs/http_client_conformance_tests/test/io_client_test.dart +++ b/pkgs/http_client_conformance_tests/test/io_client_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +@TestOn('!js') + import 'package:http/io_client.dart'; import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; import 'package:test/test.dart'; From 1eee97deffdea9a7255e624f1473ddc445dc7140 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 3 Jun 2022 15:58:03 -0700 Subject: [PATCH 129/448] Run the request body tests against the browser client. (#711) --- .../lib/http_client_conformance_tests.dart | 5 +- .../lib/src/redirect_tests.dart | 19 +- .../lib/src/request_body_server.dart | 47 ++++ .../lib/src/request_body_streamed_server.dart | 42 ++++ .../lib/src/request_body_streamed_tests.dart | 63 ++++++ .../lib/src/request_body_tests.dart | 213 +++++------------- .../pubspec.yaml | 1 + .../test/browser_client_test.dart | 3 + 8 files changed, 222 insertions(+), 171 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_body_server.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index 2dc6e20efc..cd21e0f635 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -5,12 +5,14 @@ import 'package:http/http.dart'; import 'src/redirect_tests.dart'; +import 'src/request_body_streamed_tests.dart'; import 'src/request_body_tests.dart'; import 'src/request_headers_tests.dart'; import 'src/response_body_tests.dart'; import 'src/response_headers_tests.dart'; export 'src/redirect_tests.dart' show testRedirect; +export 'src/request_body_streamed_tests.dart' show testRequestBodyStreamed; export 'src/request_body_tests.dart' show testRequestBody; export 'src/request_headers_tests.dart' show testRequestHeaders; export 'src/response_body_tests.dart' show testResponseBody; @@ -32,7 +34,8 @@ void testAll(Client client, {bool canStreamRequestBody = true, bool canStreamResponseBody = true, bool redirectAlwaysAllowed = false}) { - testRequestBody(client, canStreamRequestBody: canStreamRequestBody); + testRequestBody(client); + testRequestBodyStreamed(client, canStreamRequestBody: canStreamRequestBody); testResponseBody(client, canStreamResponseBody: canStreamResponseBody); testRequestHeaders(client); testResponseHeaders(client); diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart index 3c38089b82..2e2fa0090f 100644 --- a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart @@ -2,6 +2,7 @@ // for details. 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:async/async.dart'; import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; @@ -12,14 +13,16 @@ import 'package:test/test.dart'; /// to limit redirects will be skipped. void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { group('redirects', () { - late String host; - late StreamChannel httpServerChannel; + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; - setUp(() async { + setUpAll(() async { httpServerChannel = spawnHybridUri('../lib/src/redirect_server.dart'); - host = 'localhost:${await httpServerChannel.stream.first as int}'; + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; }); - tearDown(() => httpServerChannel.sink.add(null)); + tearDownAll(() => httpServerChannel.sink.add(null)); test('disallow redirect', () async { final request = Request('GET', Uri.http(host, '/1')) @@ -27,7 +30,7 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { final response = await client.send(request); expect(response.statusCode, 302); expect(response.isRedirect, true); - }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : ''); + }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : false); test('allow redirect', () async { final request = Request('GET', Uri.http(host, '/1')) @@ -56,7 +59,7 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { final response = await client.send(request); expect(response.statusCode, 200); expect(response.isRedirect, false); - }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : ''); + }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : false); test('too many redirects', () async { final request = Request('GET', Uri.http(host, '/6')) @@ -66,7 +69,7 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { client.send(request), throwsA(isA() .having((e) => e.message, 'message', 'Redirect limit exceeded'))); - }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : ''); + }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : false); test( 'loop', diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_server.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_server.dart new file mode 100644 index 0000000000..03108c1db2 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_server.dart @@ -0,0 +1,47 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that captures the content type header and request +/// body. +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// On Request Received: +/// - send "Content-Type" header +/// - send request body +/// When Receive Anything: +/// - exit +void hybridMain(StreamChannel channel) async { + late HttpServer server; + + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + request.response.headers.set('Access-Control-Allow-Origin', '*'); + if (request.method == 'OPTIONS') { + // Handle a CORS preflight request: + // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests + request.response.headers + ..set('Access-Control-Allow-Methods', 'POST, DELETE') + ..set('Access-Control-Allow-Headers', 'Content-Type'); + } else { + channel.sink.add(request.headers[HttpHeaders.contentTypeHeader]); + final serverReceivedBody = + await const Utf8Decoder().bind(request).fold('', (p, e) => '$p$e'); + channel.sink.add(serverReceivedBody); + } + unawaited(request.response.close()); + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server.dart new file mode 100644 index 0000000000..a019591fdd --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server.dart @@ -0,0 +1,42 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that absorbes a request stream of integers and +/// signals the client to quit after 1000 have been received. +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// On Integer == 1000 received: +/// - send 1000 +/// When Receive Anything: +/// - exit +void hybridMain(StreamChannel channel) async { + late HttpServer server; + + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + request.response.headers.set('Access-Control-Allow-Origin', '*'); + await const LineSplitter() + .bind(const Utf8Decoder().bind(request)) + .forEach((s) { + final lastReceived = int.parse(s.trim()); + if (lastReceived == 1000) { + channel.sink.add(lastReceived); + } + }); + unawaited(request.response.close()); + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart new file mode 100644 index 0000000000..6547a52a47 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart @@ -0,0 +1,63 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; + +import 'package:async/async.dart'; +import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Tests that the [Client] correctly implements streamed request body +/// uploading. +/// +/// If [canStreamRequestBody] is `false` then tests that assume that the +/// [Client] supports sending HTTP requests with unbounded body sizes will be +/// skipped. +void testRequestBodyStreamed(Client client, + {bool canStreamRequestBody = true}) { + group('streamed requests', () { + late String host; + late StreamChannel httpServerChannel; + late StreamQueue httpServerQueue; + + setUp(() async { + httpServerChannel = + spawnHybridUri('../lib/src/request_body_streamed_server.dart'); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + tearDown(() => httpServerChannel.sink.add(null)); + + test('client.send() with StreamedRequest', () async { + // The client continuously streams data to the server until + // instructed to stop (by setting `clientWriting` to `false`). + // The server sets `serverWriting` to `false` after it has + // already received some data. + // + // This ensures that the client supports streamed data sends. + var lastReceived = 0; + + Stream count() async* { + var i = 0; + unawaited( + httpServerQueue.next.then((value) => lastReceived = value as int)); + do { + yield '${i++}\n'; + // Let the event loop run. + await Future.delayed(const Duration()); + } while (lastReceived < 1000); + } + + final request = StreamedRequest('POST', Uri.http(host, '')); + const Utf8Encoder() + .bind(count()) + .listen(request.sink.add, onDone: request.sink.close); + await client.send(request); + + expect(lastReceived, greaterThanOrEqualTo(1000)); + }); + }, skip: canStreamRequestBody ? false : 'does not stream request bodies'); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart index 056d349070..38d5afdeff 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart @@ -2,11 +2,11 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:convert'; -import 'dart:io'; +import 'package:async/async.dart'; import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; class _Plus2Decoder extends Converter, String> { @@ -35,108 +35,68 @@ class _Plus2Encoding extends Encoding { /// Tests that the [Client] correctly implements HTTP requests with bodies e.g. /// 'POST'. -/// -/// If [canStreamRequestBody] is `false` then tests that assume that the -/// [Client] supports sending HTTP requests with unbounded body sizes will be -/// skipped. -void testRequestBody(Client client, {bool canStreamRequestBody = true}) { +void testRequestBody(Client client) { group('request body', () { + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = spawnHybridUri('../lib/src/request_body_server.dart'); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + test('client.post() with string body', () async { - late List? serverReceivedContentType; - late String serverReceivedBody; - - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - serverReceivedContentType = - request.headers[HttpHeaders.contentTypeHeader]; - serverReceivedBody = await const Utf8Decoder() - .bind(request) - .fold('', (p, e) => '$p$e'); - unawaited(request.response.close()); - }); - await client.post(Uri.http('localhost:${server.port}', ''), - body: 'Hello World!'); + await client.post(Uri.http(host, ''), body: 'Hello World!'); + + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next; expect(serverReceivedContentType, ['text/plain; charset=utf-8']); expect(serverReceivedBody, 'Hello World!'); - await server.close(); }); test('client.post() with string body and custom encoding', () async { - late List? serverReceivedContentType; - late String serverReceivedBody; - - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - serverReceivedContentType = - request.headers[HttpHeaders.contentTypeHeader]; - serverReceivedBody = await const Utf8Decoder() - .bind(request) - .fold('', (p, e) => '$p$e'); - unawaited(request.response.close()); - }); - await client.post(Uri.http('localhost:${server.port}', ''), + await client.post(Uri.http(host, ''), body: 'Hello', encoding: _Plus2Encoding()); + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next; + expect(serverReceivedContentType, ['text/plain; charset=plus2']); expect(serverReceivedBody, 'Fcjjm'); - await server.close(); }); test('client.post() with map body', () async { - late List? serverReceivedContentType; - late String serverReceivedBody; - - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - serverReceivedContentType = - request.headers[HttpHeaders.contentTypeHeader]; - serverReceivedBody = await const Utf8Decoder() - .bind(request) - .fold('', (p, e) => '$p$e'); - unawaited(request.response.close()); - }); - await client.post(Uri.http('localhost:${server.port}', ''), - body: {'key': 'value'}); + await client.post(Uri.http(host, ''), body: {'key': 'value'}); + + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next; + expect(serverReceivedContentType, ['application/x-www-form-urlencoded; charset=utf-8']); expect(serverReceivedBody, 'key=value'); - await server.close(); }); test('client.post() with map body and encoding', () async { - late List? serverReceivedContentType; - late String serverReceivedBody; - - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - serverReceivedContentType = - request.headers[HttpHeaders.contentTypeHeader]; - serverReceivedBody = await const Utf8Decoder() - .bind(request) - .fold('', (p, e) => '$p$e'); - unawaited(request.response.close()); - }); - await client.post(Uri.http('localhost:${server.port}', ''), + await client.post(Uri.http(host, ''), body: {'key': 'value'}, encoding: _Plus2Encoding()); + + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next; + expect(serverReceivedContentType, ['application/x-www-form-urlencoded; charset=plus2']); expect(serverReceivedBody, 'gau;r]hqa'); // key=value - await server.close(); }); test('client.post() with List', () async { - late String serverReceivedBody; - - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - serverReceivedBody = await const Utf8Decoder() - .bind(request) - .fold('', (p, e) => '$p$e'); - unawaited(request.response.close()); - }); - await client.post(Uri.http('localhost:${server.port}', ''), - body: [1, 2, 3, 4, 5]); + await client.post(Uri.http(host, ''), body: [1, 2, 3, 4, 5]); + + await httpServerQueue.next; // Content-Type. + final serverReceivedBody = await httpServerQueue.next as String; // RFC 2616 7.2.1 says that: // Any HTTP/1.1 message containing an entity-body SHOULD include a @@ -144,121 +104,50 @@ void testRequestBody(Client client, {bool canStreamRequestBody = true}) { // But we didn't set one explicitly so don't verify what the server // received. expect(serverReceivedBody.codeUnits, [1, 2, 3, 4, 5]); - await server.close(); }); test('client.post() with List and content-type', () async { - late List? serverReceivedContentType; - late String serverReceivedBody; - - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - serverReceivedContentType = - request.headers[HttpHeaders.contentTypeHeader]; - serverReceivedBody = await const Utf8Decoder() - .bind(request) - .fold('', (p, e) => '$p$e'); - unawaited(request.response.close()); - }); - await client.post(Uri.http('localhost:${server.port}', ''), - headers: {HttpHeaders.contentTypeHeader: 'image/png'}, - body: [1, 2, 3, 4, 5]); + await client.post(Uri.http(host, ''), + headers: {'Content-Type': 'image/png'}, body: [1, 2, 3, 4, 5]); + + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next as String; expect(serverReceivedContentType, ['image/png']); expect(serverReceivedBody.codeUnits, [1, 2, 3, 4, 5]); - await server.close(); }); test('client.post() with List with encoding', () async { // Encoding should not affect binary payloads. - late String serverReceivedBody; - - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - serverReceivedBody = await const Utf8Decoder() - .bind(request) - .fold('', (p, e) => '$p$e'); - unawaited(request.response.close()); - }); - await client.post(Uri.http('localhost:${server.port}', ''), + await client.post(Uri.http(host, ''), body: [1, 2, 3, 4, 5], encoding: _Plus2Encoding()); + await httpServerQueue.next; // Content-Type. + final serverReceivedBody = await httpServerQueue.next as String; + // RFC 2616 7.2.1 says that: // Any HTTP/1.1 message containing an entity-body SHOULD include a // Content-Type header field defining the media type of that body. // But we didn't set one explicitly so don't verify what the server // received. expect(serverReceivedBody.codeUnits, [1, 2, 3, 4, 5]); - await server.close(); }); test('client.post() with List with encoding and content-type', () async { // Encoding should not affect the payload but it should affect the // content-type. - late List? serverReceivedContentType; - late String serverReceivedBody; - - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - serverReceivedContentType = - request.headers[HttpHeaders.contentTypeHeader]; - serverReceivedBody = await const Utf8Decoder() - .bind(request) - .fold('', (p, e) => '$p$e'); - unawaited(request.response.close()); - }); - await client.post(Uri.http('localhost:${server.port}', ''), - headers: {HttpHeaders.contentTypeHeader: 'image/png'}, + + await client.post(Uri.http(host, ''), + headers: {'Content-Type': 'image/png'}, body: [1, 2, 3, 4, 5], encoding: _Plus2Encoding()); + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next as String; + expect(serverReceivedContentType, ['image/png; charset=plus2']); expect(serverReceivedBody.codeUnits, [1, 2, 3, 4, 5]); - await server.close(); }); - - test('client.send() with StreamedRequest', () async { - // The client continuously streams data to the server until - // instructed to stop (by setting `clientWriting` to `false`). - // The server sets `serverWriting` to `false` after it has - // already received some data. - // - // This ensures that the client supports streamed data sends. - var lastReceived = 0; - var clientWriting = true; - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await const LineSplitter() - .bind(const Utf8Decoder().bind(request)) - .forEach((s) { - lastReceived = int.parse(s.trim()); - if (lastReceived < 1000) { - expect(clientWriting, true); - } else { - clientWriting = false; - } - }); - unawaited(request.response.close()); - }); - Stream count() async* { - var i = 0; - while (clientWriting) { - yield '${i++}\n'; - // Let the event loop run. - await Future.delayed(const Duration()); - } - } - - final request = - StreamedRequest('POST', Uri.http('localhost:${server.port}', '')); - const Utf8Encoder() - .bind(count()) - .listen(request.sink.add, onDone: request.sink.close); - await client.send(request); - - expect(lastReceived, greaterThanOrEqualTo(1000)); - await server.close(); - }, skip: canStreamRequestBody ? false : 'does not stream request bodies'); }); } diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index 7b84597e90..c59ce4f20e 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -9,6 +9,7 @@ environment: sdk: '>=2.14.0 <3.0.0' dependencies: + async: ^2.9.0 http: ^0.13.4 test: ^1.21.1 diff --git a/pkgs/http_client_conformance_tests/test/browser_client_test.dart b/pkgs/http_client_conformance_tests/test/browser_client_test.dart index d209b81604..99a827dec8 100644 --- a/pkgs/http_client_conformance_tests/test/browser_client_test.dart +++ b/pkgs/http_client_conformance_tests/test/browser_client_test.dart @@ -12,6 +12,9 @@ void main() { final client = BrowserClient(); group('testAll', () { + // TODO: Replace this with `testAll` when all tests support browser testing. + testRequestBody(client); testRedirect(client, redirectAlwaysAllowed: true); + testRequestBodyStreamed(client, canStreamRequestBody: false); }); } From f83ff08135a01656c300e109b85b9f2541afa312 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 6 Jun 2022 13:21:30 -0700 Subject: [PATCH 130/448] Add browser tests for the response body. (#712) --- .../lib/http_client_conformance_tests.dart | 4 + .../lib/src/response_body_server.dart | 31 +++++++ .../src/response_body_streamed_server.dart | 42 +++++++++ .../lib/src/response_body_streamed_test.dart | 54 +++++++++++ .../lib/src/response_body_tests.dart | 90 ++++++------------- .../test/browser_client_test.dart | 2 + 6 files changed, 158 insertions(+), 65 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_body_server.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index cd21e0f635..58457e88ae 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -8,6 +8,7 @@ import 'src/redirect_tests.dart'; import 'src/request_body_streamed_tests.dart'; import 'src/request_body_tests.dart'; import 'src/request_headers_tests.dart'; +import 'src/response_body_streamed_test.dart'; import 'src/response_body_tests.dart'; import 'src/response_headers_tests.dart'; @@ -15,6 +16,7 @@ export 'src/redirect_tests.dart' show testRedirect; export 'src/request_body_streamed_tests.dart' show testRequestBodyStreamed; export 'src/request_body_tests.dart' show testRequestBody; export 'src/request_headers_tests.dart' show testRequestHeaders; +export 'src/response_body_streamed_test.dart' show testResponseBodyStreamed; export 'src/response_body_tests.dart' show testResponseBody; export 'src/response_headers_tests.dart' show testResponseHeaders; @@ -37,6 +39,8 @@ void testAll(Client client, testRequestBody(client); testRequestBodyStreamed(client, canStreamRequestBody: canStreamRequestBody); testResponseBody(client, canStreamResponseBody: canStreamResponseBody); + testResponseBodyStreamed(client, + canStreamResponseBody: canStreamResponseBody); testRequestHeaders(client); testResponseHeaders(client); testRedirect(client, redirectAlwaysAllowed: redirectAlwaysAllowed); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_server.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_server.dart new file mode 100644 index 0000000000..238a4a17fa --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_server.dart @@ -0,0 +1,31 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that responds with "Hello World!" +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// When Receive Anything: +/// - exit +void hybridMain(StreamChannel channel) async { + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Access-Control-Allow-Origin', '*'); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World!'); + await request.response.close(); + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server.dart new file mode 100644 index 0000000000..5f211d6dec --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server.dart @@ -0,0 +1,42 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:async/async.dart'; +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that sends a stream of integers. +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// When Receive Anything: +/// - close current request +/// - exit server +void hybridMain(StreamChannel channel) async { + final channelQueue = StreamQueue(channel.stream); + var serverWriting = true; + + late HttpServer server; + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Access-Control-Allow-Origin', '*'); + request.response.headers.set('Content-Type', 'text/plain'); + serverWriting = true; + for (var i = 0; serverWriting; ++i) { + request.response.write('$i\n'); + await request.response.flush(); + // Let the event loop run. + await Future(() {}); + } + await request.response.close(); + unawaited(server.close()); + }); + + channel.sink.add(server.port); + unawaited(channelQueue.next.then((value) => serverWriting = false)); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart new file mode 100644 index 0000000000..31506c45ca --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart @@ -0,0 +1,54 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:convert'; + +import 'package:async/async.dart'; +import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Tests that the [Client] correctly implements HTTP responses with bodies of +/// unbounded size. +/// +/// If [canStreamResponseBody] is `false` then tests that assume that the +/// [Client] supports receiving HTTP responses with unbounded body sizes will +/// be skipped +void testResponseBodyStreamed(Client client, + {bool canStreamResponseBody = true}) async { + group('streamed response body', () { + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = + spawnHybridUri('../lib/src/response_body_streamed_server.dart'); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + + test('large response streamed without content length', () async { + // The server continuously streams data to the client until + // instructed to stop. + // + // This ensures that the client supports streamed responses. + + final request = Request('GET', Uri.http(host, '')); + final response = await client.send(request); + var lastReceived = 0; + await const LineSplitter() + .bind(const Utf8Decoder().bind(response.stream)) + .forEach((s) { + lastReceived = int.parse(s.trim()); + if (lastReceived == 1000) { + httpServerChannel.sink.add(true); + } + }); + expect(response.headers['content-type'], 'text/plain'); + expect(lastReceived, greaterThanOrEqualTo(1000)); + }, skip: canStreamResponseBody ? false : 'does not stream response bodies'); + }); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart index 54de1221a4..0555d7da67 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart @@ -2,11 +2,9 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; -import 'dart:convert'; -import 'dart:io'; - +import 'package:async/async.dart'; import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; /// Tests that the [Client] correctly implements HTTP responses with bodies. @@ -17,78 +15,40 @@ import 'package:test/test.dart'; void testResponseBody(Client client, {bool canStreamResponseBody = true}) async { group('response body', () { + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + const message = 'Hello World!'; + + setUpAll(() async { + httpServerChannel = + spawnHybridUri('../lib/src/response_body_server.dart'); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + test('small response with content length', () async { - const message = 'Hello World!'; - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await request.drain(); - request.response.headers.set('Content-Type', 'text/plain'); - request.response.write(message); - await request.response.close(); - }); - final response = - await client.get(Uri.http('localhost:${server.port}', '')); + final response = await client.get(Uri.http(host, '')); expect(response.body, message); expect(response.bodyBytes, message.codeUnits); expect(response.contentLength, message.length); expect(response.headers['content-type'], 'text/plain'); - await server.close(); }); test('small response streamed without content length', () async { - const message = 'Hello World!'; - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await request.drain(); - request.response.headers.set('Content-Type', 'text/plain'); - request.response.write(message); - await request.response.close(); - }); - final request = Request('GET', Uri.http('localhost:${server.port}', '')); + final request = Request('GET', Uri.http(host, '')); final response = await client.send(request); expect(await response.stream.bytesToString(), message); - expect(response.contentLength, null); + if (canStreamResponseBody) { + expect(response.contentLength, null); + } else { + // If the response body is small then the Client can emulate a streamed + // response without streaming. But `response.contentLength` may or + // may not be set. + expect(response.contentLength, isIn([null, 12])); + } expect(response.headers['content-type'], 'text/plain'); - await server.close(); }); - - test('large response streamed without content length', () async { - // The server continuously streams data to the client until - // instructed to stop (by setting `serverWriting` to `false`). - // The client sets `serverWriting` to `false` after it has - // already received some data. - // - // This ensures that the client supports streamed responses. - var serverWriting = false; - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await request.drain(); - request.response.headers.set('Content-Type', 'text/plain'); - serverWriting = true; - for (var i = 0; serverWriting; ++i) { - request.response.write('$i\n'); - await request.response.flush(); - // Let the event loop run. - await Future.delayed(const Duration()); - } - await request.response.close(); - }); - final request = Request('GET', Uri.http('localhost:${server.port}', '')); - final response = await client.send(request); - var lastReceived = 0; - await const LineSplitter() - .bind(const Utf8Decoder().bind(response.stream)) - .forEach((s) { - lastReceived = int.parse(s.trim()); - if (lastReceived < 1000) { - expect(serverWriting, true); - } else { - serverWriting = false; - } - }); - expect(response.headers['content-type'], 'text/plain'); - expect(lastReceived, greaterThanOrEqualTo(1000)); - await server.close(); - }, skip: canStreamResponseBody ? false : 'does not stream response bodies'); }); } diff --git a/pkgs/http_client_conformance_tests/test/browser_client_test.dart b/pkgs/http_client_conformance_tests/test/browser_client_test.dart index 99a827dec8..dfd3c32148 100644 --- a/pkgs/http_client_conformance_tests/test/browser_client_test.dart +++ b/pkgs/http_client_conformance_tests/test/browser_client_test.dart @@ -16,5 +16,7 @@ void main() { testRequestBody(client); testRedirect(client, redirectAlwaysAllowed: true); testRequestBodyStreamed(client, canStreamRequestBody: false); + testResponseBody(client, canStreamResponseBody: false); + testResponseBodyStreamed(client, canStreamResponseBody: false); }); } From 2cc2800e3f8c70c6a6b6c3f71bd187a931133241 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 6 Jun 2022 16:57:16 -0700 Subject: [PATCH 131/448] Set async min version to match pinned flutter version (#713) --- pkgs/http_client_conformance_tests/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index c59ce4f20e..bc52fd483d 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -9,7 +9,7 @@ environment: sdk: '>=2.14.0 <3.0.0' dependencies: - async: ^2.9.0 + async: ^2.8.2 http: ^0.13.4 test: ^1.21.1 From 21af543d835ddc73ab0e410fe83db62f0e9b44dc Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 7 Jun 2022 16:23:31 -0700 Subject: [PATCH 132/448] Support executing tests when run as a package (#714) --- .../lib/src/redirect_tests.dart | 4 ++- .../lib/src/request_body_streamed_tests.dart | 4 ++- .../lib/src/request_body_tests.dart | 4 ++- .../lib/src/response_body_streamed_test.dart | 4 ++- .../lib/src/response_body_tests.dart | 5 ++-- .../lib/src/utils.dart | 26 +++++++++++++++++++ 6 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/utils.dart diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart index 2e2fa0090f..c1d5e2da23 100644 --- a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart @@ -7,6 +7,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +import 'utils.dart'; + /// Tests that the [Client] correctly implements HTTP redirect logic. /// /// If [redirectAlwaysAllowed] is `true` then tests that require the [Client] @@ -18,7 +20,7 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { late final StreamQueue httpServerQueue; setUpAll(() async { - httpServerChannel = spawnHybridUri('../lib/src/redirect_server.dart'); + httpServerChannel = await startServer('redirect_server.dart'); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart index 6547a52a47..7f27c8bf41 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart @@ -10,6 +10,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +import 'utils.dart'; + /// Tests that the [Client] correctly implements streamed request body /// uploading. /// @@ -25,7 +27,7 @@ void testRequestBodyStreamed(Client client, setUp(() async { httpServerChannel = - spawnHybridUri('../lib/src/request_body_streamed_server.dart'); + await startServer('request_body_streamed_server.dart'); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart index 38d5afdeff..0843955e2b 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart @@ -9,6 +9,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +import 'utils.dart'; + class _Plus2Decoder extends Converter, String> { @override String convert(List input) => @@ -42,7 +44,7 @@ void testRequestBody(Client client) { late final StreamQueue httpServerQueue; setUpAll(() async { - httpServerChannel = spawnHybridUri('../lib/src/request_body_server.dart'); + httpServerChannel = await startServer('request_body_server.dart'); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart index 31506c45ca..ab861f2fe5 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart @@ -9,6 +9,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +import 'utils.dart'; + /// Tests that the [Client] correctly implements HTTP responses with bodies of /// unbounded size. /// @@ -24,7 +26,7 @@ void testResponseBodyStreamed(Client client, setUpAll(() async { httpServerChannel = - spawnHybridUri('../lib/src/response_body_streamed_server.dart'); + await startServer('response_body_streamed_server.dart'); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart index 0555d7da67..b5f0f750d2 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart @@ -7,6 +7,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +import 'utils.dart'; + /// Tests that the [Client] correctly implements HTTP responses with bodies. /// /// If [canStreamResponseBody] is `false` then tests that assume that the @@ -21,8 +23,7 @@ void testResponseBody(Client client, const message = 'Hello World!'; setUpAll(() async { - httpServerChannel = - spawnHybridUri('../lib/src/response_body_server.dart'); + httpServerChannel = await startServer('response_body_server.dart'); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/utils.dart b/pkgs/http_client_conformance_tests/lib/src/utils.dart new file mode 100644 index 0000000000..72307e60e8 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/utils.dart @@ -0,0 +1,26 @@ +import 'dart:isolate'; + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts a test server using a relative path name e.g. +/// 'redirect_server.dart'. +/// +/// See [spawnHybridUri]. +Future> startServer(String fileName) async { + try { + final fileUri = await Isolate.resolvePackageUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/$fileName')); + if (fileUri == null) { + throw StateError('The package could not be resolved'); + } + return spawnHybridUri(fileUri); + // ignore: avoid_catching_errors + } on UnsupportedError { + // The current runtime environment (probably browser) does not support + // `Isolate.resolvePackageUri` so try to use a relative path. This will + // *not* work if `http_client_conformance_tests` is used as a package. + return spawnHybridUri('../lib/src/$fileName'); + } +} From d09c8552a0f5cd740bf3389c4e1aa198f79d2d59 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 8 Jun 2022 17:21:03 -0700 Subject: [PATCH 133/448] A browser tests for request headers. (#715) --- .../lib/src/request_headers_server.dart | 45 +++++++++ .../lib/src/request_headers_tests.dart | 98 +++++++------------ .../test/browser_client_test.dart | 1 + 3 files changed, 84 insertions(+), 60 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_headers_server.dart diff --git a/pkgs/http_client_conformance_tests/lib/src/request_headers_server.dart b/pkgs/http_client_conformance_tests/lib/src/request_headers_server.dart new file mode 100644 index 0000000000..c443ad0034 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_headers_server.dart @@ -0,0 +1,45 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that captures the request headers. +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// On Request Received: +/// - send headers as Map> +/// When Receive Anything: +/// - exit +void hybridMain(StreamChannel channel) async { + late HttpServer server; + + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + request.response.headers.set('Access-Control-Allow-Origin', '*'); + if (request.method == 'OPTIONS') { + // Handle a CORS preflight request: + // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests + request.response.headers + ..set('Access-Control-Allow-Methods', 'GET') + ..set('Access-Control-Allow-Headers', '*'); + } else { + final headers = >{}; + request.headers.forEach((field, value) { + headers[field] = value; + }); + channel.sink.add(headers); + } + unawaited(request.response.close()); + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart index d5a6820b8a..ee5f4ede17 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart @@ -2,92 +2,70 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; -import 'dart:io'; - +import 'package:async/async.dart'; import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +import 'utils.dart'; + /// Tests that the [Client] correctly sends headers in the request. void testRequestHeaders(Client client) async { group('client headers', () { + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = await startServer('request_headers_server.dart'); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + test('single header', () async { - late HttpHeaders requestHeaders; - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await request.drain(); - requestHeaders = request.headers; - unawaited(request.response.close()); - }); - await client.get(Uri.http('localhost:${server.port}', ''), - headers: {'foo': 'bar'}); - expect(requestHeaders['foo'], ['bar']); - await server.close(); + await client.get(Uri.http(host, ''), headers: {'foo': 'bar'}); + + final headers = await httpServerQueue.next as Map; + expect(headers['foo'], ['bar']); }); test('UPPER case header', () async { - late HttpHeaders requestHeaders; - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await request.drain(); - requestHeaders = request.headers; - unawaited(request.response.close()); - }); - await client.get(Uri.http('localhost:${server.port}', ''), - headers: {'FOO': 'BAR'}); + await client.get(Uri.http(host, ''), headers: {'FOO': 'BAR'}); + + final headers = await httpServerQueue.next as Map; // RFC 2616 14.44 states that header field names are case-insensive. // http.Client canonicalizes field names into lower case. - expect(requestHeaders['foo'], ['BAR']); - await server.close(); + expect(headers['foo'], ['BAR']); }); test('test headers different only in case', () async { - // RFC 2616 14.44 states that header field names are case-insensive. - late HttpHeaders requestHeaders; - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await request.drain(); - requestHeaders = request.headers; - unawaited(request.response.close()); - }); - await client.get(Uri.http('localhost:${server.port}', ''), - headers: {'foo': 'bar', 'Foo': 'Bar'}); - expect(requestHeaders['foo']!.single, isIn(['bar', 'Bar'])); - await server.close(); + await client + .get(Uri.http(host, ''), headers: {'foo': 'bar', 'Foo': 'Bar'}); + + final headers = await httpServerQueue.next as Map; + // ignore: avoid_dynamic_calls + expect(headers['foo']!.single, isIn(['bar', 'Bar'])); }); test('multiple headers', () async { - late HttpHeaders requestHeaders; - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await request.drain(); - requestHeaders = request.headers; - unawaited(request.response.close()); - }); // The `http.Client` API does not offer a way of sending the name field // more than once. - await client.get(Uri.http('localhost:${server.port}', ''), - headers: {'fruit': 'apple', 'color': 'red'}); - expect(requestHeaders['fruit'], ['apple']); - expect(requestHeaders['color'], ['red']); - await server.close(); + await client + .get(Uri.http(host, ''), headers: {'fruit': 'apple', 'color': 'red'}); + + final headers = await httpServerQueue.next as Map; + expect(headers['fruit'], ['apple']); + expect(headers['color'], ['red']); }); test('multiple values per header', () async { - late HttpHeaders requestHeaders; - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await request.drain(); - requestHeaders = request.headers; - unawaited(request.response.close()); - }); // The `http.Client` API does not offer a way of sending the same field // more than once. - await client.get(Uri.http('localhost:${server.port}', ''), - headers: {'list': 'apple, orange'}); + await client.get(Uri.http(host, ''), headers: {'list': 'apple, orange'}); - expect(requestHeaders['list'], ['apple, orange']); - await server.close(); + final headers = await httpServerQueue.next as Map; + expect(headers['list'], ['apple, orange']); }); }); } diff --git a/pkgs/http_client_conformance_tests/test/browser_client_test.dart b/pkgs/http_client_conformance_tests/test/browser_client_test.dart index dfd3c32148..496b190c24 100644 --- a/pkgs/http_client_conformance_tests/test/browser_client_test.dart +++ b/pkgs/http_client_conformance_tests/test/browser_client_test.dart @@ -18,5 +18,6 @@ void main() { testRequestBodyStreamed(client, canStreamRequestBody: false); testResponseBody(client, canStreamResponseBody: false); testResponseBodyStreamed(client, canStreamResponseBody: false); + testRequestHeaders(client); }); } From ed8000203f9f9b704b00301e44d95ff965c23bd6 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 9 Jun 2022 11:01:02 -0700 Subject: [PATCH 134/448] Add browser support for response header tests. (#716) --- .../lib/src/response_headers_server.dart | 37 +++++++++ .../lib/src/response_headers_tests.dart | 80 +++++++------------ .../test/browser_client_test.dart | 11 +-- 3 files changed, 69 insertions(+), 59 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_headers_server.dart diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_server.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_server.dart new file mode 100644 index 0000000000..3f2d4d3f0f --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_server.dart @@ -0,0 +1,37 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:async/async.dart'; +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that returns custom headers. +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// On Request Received: +/// - load response header map from channel +/// - exit +void hybridMain(StreamChannel channel) async { + late HttpServer server; + final clientQueue = StreamQueue(channel.stream); + + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + request.response.headers.set('Access-Control-Allow-Origin', '*'); + request.response.headers.set('Access-Control-Expose-Headers', '*'); + + (await clientQueue.next as Map).forEach((key, value) => request + .response.headers + .set(key as String, value as String, preserveHeaderCase: true)); + + await request.response.close(); + unawaited(server.close()); + }); + + channel.sink.add(server.port); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart index 9ff0ee603e..2864bdaca7 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart @@ -2,81 +2,57 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; -import 'dart:io'; - +import 'package:async/async.dart'; import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; -/// Tests that the [Client] correctly processes response headers e.g. -/// 'Content-Length'. +import 'utils.dart'; + +/// Tests that the [Client] correctly processes response headers. void testResponseHeaders(Client client) async { group('server headers', () { + late String host; + late StreamChannel httpServerChannel; + late StreamQueue httpServerQueue; + + setUp(() async { + httpServerChannel = await startServer('response_headers_server.dart'); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + test('single header', () async { - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await request.drain(); - var response = request.response; - response.headers.set('foo', 'bar'); - unawaited(response.close()); - }); - final response = - await client.get(Uri.http('localhost:${server.port}', '')); + httpServerChannel.sink.add({'foo': 'bar'}); + + final response = await client.get(Uri.http(host, '')); expect(response.headers['foo'], 'bar'); - await server.close(); }); test('UPPERCASE header', () async { - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await request.drain(); - var response = request.response; - response.headers.set('FOO', 'BAR', preserveHeaderCase: true); - unawaited(response.close()); - }); + httpServerChannel.sink.add({'foo': 'BAR'}); + + final response = await client.get(Uri.http(host, '')); // RFC 2616 14.44 states that header field names are case-insensive. // http.Client canonicalizes field names into lower case. - final response = - await client.get(Uri.http('localhost:${server.port}', '')); expect(response.headers['foo'], 'BAR'); - await server.close(); }); test('multiple headers', () async { - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await request.drain(); - var response = request.response; - response.headers - ..set('field1', 'value1') - ..set('field2', 'value2') - ..set('field3', 'value3'); - unawaited(response.close()); - }); - final response = - await client.get(Uri.http('localhost:${server.port}', '')); + httpServerChannel.sink + .add({'field1': 'value1', 'field2': 'value2', 'field3': 'value3'}); + + final response = await client.get(Uri.http(host, '')); expect(response.headers['field1'], 'value1'); expect(response.headers['field2'], 'value2'); expect(response.headers['field3'], 'value3'); - await server.close(); }); test('multiple values per header', () async { - final server = (await HttpServer.bind('localhost', 0)) - ..listen((request) async { - await request.drain(); - var response = request.response; - // RFC 2616 14.44 states that header field names are case-insensive. - response.headers - ..add('list', 'apple') - ..add('list', 'orange') - ..add('List', 'banana'); - unawaited(response.close()); - }); - final response = - await client.get(Uri.http('localhost:${server.port}', '')); + httpServerChannel.sink.add({'list': 'apple, orange, banana'}); + + final response = await client.get(Uri.http(host, '')); expect(response.headers['list'], 'apple, orange, banana'); - await server.close(); }); }); } diff --git a/pkgs/http_client_conformance_tests/test/browser_client_test.dart b/pkgs/http_client_conformance_tests/test/browser_client_test.dart index 496b190c24..cbc484b038 100644 --- a/pkgs/http_client_conformance_tests/test/browser_client_test.dart +++ b/pkgs/http_client_conformance_tests/test/browser_client_test.dart @@ -12,12 +12,9 @@ void main() { final client = BrowserClient(); group('testAll', () { - // TODO: Replace this with `testAll` when all tests support browser testing. - testRequestBody(client); - testRedirect(client, redirectAlwaysAllowed: true); - testRequestBodyStreamed(client, canStreamRequestBody: false); - testResponseBody(client, canStreamResponseBody: false); - testResponseBodyStreamed(client, canStreamResponseBody: false); - testRequestHeaders(client); + testAll(client, + redirectAlwaysAllowed: true, + canStreamRequestBody: false, + canStreamResponseBody: false); }); } From 3c67c6b129200fb2452c26414f71f3e97c9d6ead Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 16 Jun 2022 12:36:12 -0700 Subject: [PATCH 135/448] Move conformance test invocation into package:http (#718) --- .github/workflows/dart.yml | 60 ++++--------------- pkgs/http/pubspec.yaml | 2 + .../test/html/client_conformance_test.dart} | 10 ++-- .../test/io/client_conformance_test.dart} | 6 +- pkgs/http_client_conformance_tests/README.md | 3 + .../lib/src/utils.dart | 21 ++----- .../mono_pkg.yaml | 7 --- .../pubspec.yaml | 2 +- 8 files changed, 29 insertions(+), 82 deletions(-) rename pkgs/{http_client_conformance_tests/test/browser_client_test.dart => http/test/html/client_conformance_test.dart} (73%) rename pkgs/{http_client_conformance_tests/test/io_client_test.dart => http/test/io/client_conformance_test.dart} (86%) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 72a425ad93..75cce2f66d 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -125,16 +125,16 @@ jobs: working-directory: pkgs/http_client_conformance_tests run: "dart format --output=none --set-exit-if-changed ." job_004: - name: "unit_test; Dart 2.14.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart test --platform chrome`" + name: "unit_test; Dart 2.14.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v3 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests + os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -152,30 +152,21 @@ jobs: if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http run: dart test --platform chrome - - id: pkgs_http_client_conformance_tests_pub_upgrade - name: pkgs/http_client_conformance_tests; dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http_client_conformance_tests - run: dart pub upgrade - - name: "pkgs/http_client_conformance_tests; dart test --platform chrome" - if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http_client_conformance_tests - run: dart test --platform chrome needs: - job_001 - job_002 - job_003 job_005: - name: "unit_test; Dart 2.14.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart test --platform vm`" + name: "unit_test; Dart 2.14.0; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v3 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests + os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -193,30 +184,21 @@ jobs: if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http run: dart test --platform vm - - id: pkgs_http_client_conformance_tests_pub_upgrade - name: pkgs/http_client_conformance_tests; dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http_client_conformance_tests - run: dart pub upgrade - - name: "pkgs/http_client_conformance_tests; dart test --platform vm" - if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http_client_conformance_tests - run: dart test --platform vm needs: - job_001 - job_002 - job_003 job_006: - name: "unit_test; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart test --platform chrome`" + name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v3 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -234,30 +216,21 @@ jobs: if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http run: dart test --platform chrome - - id: pkgs_http_client_conformance_tests_pub_upgrade - name: pkgs/http_client_conformance_tests; dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http_client_conformance_tests - run: dart pub upgrade - - name: "pkgs/http_client_conformance_tests; dart test --platform chrome" - if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http_client_conformance_tests - run: dart test --platform chrome needs: - job_001 - job_002 - job_003 job_007: - name: "unit_test; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart test --platform vm`" + name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@v3 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -275,15 +248,6 @@ jobs: if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http run: dart test --platform vm - - id: pkgs_http_client_conformance_tests_pub_upgrade - name: pkgs/http_client_conformance_tests; dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http_client_conformance_tests - run: dart pub upgrade - - name: "pkgs/http_client_conformance_tests; dart test --platform vm" - if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http_client_conformance_tests - run: dart test --platform vm needs: - job_001 - job_002 diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index be066efbc0..06fa0c94bf 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -14,6 +14,8 @@ dependencies: dev_dependencies: fake_async: ^1.2.0 + http_client_conformance_tests: + path: ../http_client_conformance_tests/ lints: ^1.0.0 shelf: ^1.1.0 stream_channel: ^2.1.0 diff --git a/pkgs/http_client_conformance_tests/test/browser_client_test.dart b/pkgs/http/test/html/client_conformance_test.dart similarity index 73% rename from pkgs/http_client_conformance_tests/test/browser_client_test.dart rename to pkgs/http/test/html/client_conformance_test.dart index cbc484b038..422b7cc2c0 100644 --- a/pkgs/http_client_conformance_tests/test/browser_client_test.dart +++ b/pkgs/http/test/html/client_conformance_test.dart @@ -11,10 +11,8 @@ import 'package:test/test.dart'; void main() { final client = BrowserClient(); - group('testAll', () { - testAll(client, - redirectAlwaysAllowed: true, - canStreamRequestBody: false, - canStreamResponseBody: false); - }); + testAll(client, + redirectAlwaysAllowed: true, + canStreamRequestBody: false, + canStreamResponseBody: false); } diff --git a/pkgs/http_client_conformance_tests/test/io_client_test.dart b/pkgs/http/test/io/client_conformance_test.dart similarity index 86% rename from pkgs/http_client_conformance_tests/test/io_client_test.dart rename to pkgs/http/test/io/client_conformance_test.dart index 7a13aabbff..0706031ec3 100644 --- a/pkgs/http_client_conformance_tests/test/io_client_test.dart +++ b/pkgs/http/test/io/client_conformance_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -@TestOn('!js') +@TestOn('vm') import 'package:http/io_client.dart'; import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; @@ -11,7 +11,5 @@ import 'package:test/test.dart'; void main() { final client = IOClient(); - group('testAll', () { - testAll(client); - }); + testAll(client); } diff --git a/pkgs/http_client_conformance_tests/README.md b/pkgs/http_client_conformance_tests/README.md index 73642a3fa8..e96e364654 100644 --- a/pkgs/http_client_conformance_tests/README.md +++ b/pkgs/http_client_conformance_tests/README.md @@ -34,3 +34,6 @@ void main() { }); } ``` + +**Note**: This package does not have it's own tests, instead it is +exercised by the tests in `package:http`. diff --git a/pkgs/http_client_conformance_tests/lib/src/utils.dart b/pkgs/http_client_conformance_tests/lib/src/utils.dart index 72307e60e8..4b52d9022c 100644 --- a/pkgs/http_client_conformance_tests/lib/src/utils.dart +++ b/pkgs/http_client_conformance_tests/lib/src/utils.dart @@ -1,4 +1,6 @@ -import 'dart:isolate'; +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; @@ -7,20 +9,7 @@ import 'package:test/test.dart'; /// 'redirect_server.dart'. /// /// See [spawnHybridUri]. -Future> startServer(String fileName) async { - try { - final fileUri = await Isolate.resolvePackageUri(Uri( +Future> startServer(String fileName) async => + spawnHybridUri(Uri( scheme: 'package', path: 'http_client_conformance_tests/src/$fileName')); - if (fileUri == null) { - throw StateError('The package could not be resolved'); - } - return spawnHybridUri(fileUri); - // ignore: avoid_catching_errors - } on UnsupportedError { - // The current runtime environment (probably browser) does not support - // `Isolate.resolvePackageUri` so try to use a relative path. This will - // *not* work if `http_client_conformance_tests` is used as a package. - return spawnHybridUri('../lib/src/$fileName'); - } -} diff --git a/pkgs/http_client_conformance_tests/mono_pkg.yaml b/pkgs/http_client_conformance_tests/mono_pkg.yaml index 8b6b5d1cb9..6a18a15c47 100644 --- a/pkgs/http_client_conformance_tests/mono_pkg.yaml +++ b/pkgs/http_client_conformance_tests/mono_pkg.yaml @@ -8,10 +8,3 @@ stages: - format: sdk: - dev -- unit_test: - - test: --platform vm - os: - - linux - - test: --platform chrome - os: - - linux diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index bc52fd483d..dd8ea26b22 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -11,7 +11,7 @@ environment: dependencies: async: ^2.8.2 http: ^0.13.4 - test: ^1.21.1 + test: ^1.21.2 dev_dependencies: lints: ^1.0.0 From 9687234a798d62d0930779ba60cce3d38c408ace Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 16 Jun 2022 13:09:16 -0700 Subject: [PATCH 136/448] Fixes #701 IOClient should always throw ClientException (#719) --- pkgs/http/lib/src/io_client.dart | 24 +++++++++++ .../lib/http_client_conformance_tests.dart | 2 + .../lib/src/server_errors_server.dart | 31 ++++++++++++++ .../lib/src/server_errors_test.dart | 41 +++++++++++++++++++ 4 files changed, 98 insertions(+) create mode 100644 pkgs/http_client_conformance_tests/lib/src/server_errors_server.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart diff --git a/pkgs/http/lib/src/io_client.dart b/pkgs/http/lib/src/io_client.dart index b26ec0486b..9663187300 100644 --- a/pkgs/http/lib/src/io_client.dart +++ b/pkgs/http/lib/src/io_client.dart @@ -14,6 +14,28 @@ import 'io_streamed_response.dart'; /// Used from conditional imports, matches the definition in `client_stub.dart`. BaseClient createClient() => IOClient(); +/// Exception thrown when the underlying [HttpClient] throws a +/// [SocketException]. +/// +/// Implemenents [SocketException] to avoid breaking existing users of +/// [IOClient] that may catch that exception. +class _ClientSocketException extends ClientException + implements SocketException { + final SocketException cause; + _ClientSocketException(SocketException e, Uri url) + : cause = e, + super(e.message, url); + + @override + InternetAddress? get address => cause.address; + + @override + OSError? get osError => cause.osError; + + @override + int? get port => cause.port; +} + /// A `dart:io`-based HTTP client. class IOClient extends BaseClient { /// The underlying `dart:io` HTTP client. @@ -62,6 +84,8 @@ class IOClient extends BaseClient { persistentConnection: response.persistentConnection, reasonPhrase: response.reasonPhrase, inner: response); + } on SocketException catch (error) { + throw _ClientSocketException(error, request.url); } on HttpException catch (error) { throw ClientException(error.message, error.uri); } diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index 58457e88ae..dfdc919ffa 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -11,6 +11,7 @@ import 'src/request_headers_tests.dart'; import 'src/response_body_streamed_test.dart'; import 'src/response_body_tests.dart'; import 'src/response_headers_tests.dart'; +import 'src/server_errors_test.dart'; export 'src/redirect_tests.dart' show testRedirect; export 'src/request_body_streamed_tests.dart' show testRequestBodyStreamed; @@ -44,4 +45,5 @@ void testAll(Client client, testRequestHeaders(client); testResponseHeaders(client); testRedirect(client, redirectAlwaysAllowed: redirectAlwaysAllowed); + testServerErrors(client); } diff --git a/pkgs/http_client_conformance_tests/lib/src/server_errors_server.dart b/pkgs/http_client_conformance_tests/lib/src/server_errors_server.dart new file mode 100644 index 0000000000..47470a41f4 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/server_errors_server.dart @@ -0,0 +1,31 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that disconnects before sending it's headers. +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// When Receive Anything: +/// - exit +void hybridMain(StreamChannel channel) async { + late HttpServer server; + + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + final socket = await request.response.detachSocket(writeHeaders: false); + socket.destroy(); + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart b/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart new file mode 100644 index 0000000000..076502f39a --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart @@ -0,0 +1,41 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +import 'utils.dart'; + +/// Tests that the [Client] correctly handles server errors. +void testServerErrors(Client client, + {bool redirectAlwaysAllowed = false}) async { + group('server errors', () { + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = await startServer('server_errors_server.dart'); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + + test('no such host', () async { + expect( + client.get(Uri.http('thisisnotahost', '')), + throwsA(isA() + .having((e) => e.uri, 'uri', Uri.http('thisisnotahost', '')))); + }); + + test('disconnect', () async { + expect( + client.get(Uri.http(host, '')), + throwsA(isA() + .having((e) => e.uri, 'uri', Uri.http(host, '')))); + }); + }); +} From 1c743ab6f03aba16b0b5fe8ddb43b21576266c6c Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 25 Jul 2022 13:04:32 -0700 Subject: [PATCH 137/448] add cron (#738) * Drop invariant booleans from lints * Add self-validate and weekly cron to CI Also used latest pkg:mono_repo --- .github/workflows/dart.yml | 84 +++++++++++++++++++++++++------------- analysis_options.yaml | 1 - mono_repo.yaml | 6 +++ tool/ci.sh | 2 +- 4 files changed, 63 insertions(+), 30 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 75cce2f66d..1ccc6edbac 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.2.2 +# Created with package:mono_repo v6.3.0 name: Dart CI on: push: @@ -6,19 +6,43 @@ on: - main - master pull_request: + schedule: + - cron: "0 0 * * 0" defaults: run: shell: bash env: PUB_ENVIRONMENT: bot.github +permissions: read-all jobs: job_001: + name: mono_repo self validate + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + with: + sdk: stable + - id: checkout + uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 + - name: mono_repo self validate + run: dart pub global activate mono_repo 6.3.0 + - name: mono_repo self validate + run: dart pub global run mono_repo generate --validate + job_002: name: "analyze_and_format; Dart 2.14.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v3 + uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" @@ -27,11 +51,11 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: "2.14.0" - id: checkout - uses: actions/checkout@v3 + uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" @@ -50,12 +74,12 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests run: dart analyze --fatal-infos - job_002: + job_003: name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v3 + uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" @@ -64,11 +88,11 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout - uses: actions/checkout@v3 + uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" @@ -87,12 +111,12 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests run: dart analyze --fatal-infos - job_003: + job_004: name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v3 + uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:format" @@ -101,11 +125,11 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout - uses: actions/checkout@v3 + uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" @@ -124,12 +148,12 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests run: "dart format --output=none --set-exit-if-changed ." - job_004: + job_005: name: "unit_test; Dart 2.14.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v3 + uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_1" @@ -138,11 +162,11 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: "2.14.0" - id: checkout - uses: actions/checkout@v3 + uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" @@ -156,12 +180,13 @@ jobs: - job_001 - job_002 - job_003 - job_005: + - job_004 + job_006: name: "unit_test; Dart 2.14.0; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v3 + uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_0" @@ -170,11 +195,11 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: "2.14.0" - id: checkout - uses: actions/checkout@v3 + uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" @@ -188,12 +213,13 @@ jobs: - job_001 - job_002 - job_003 - job_006: + - job_004 + job_007: name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v3 + uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_1" @@ -202,11 +228,11 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout - uses: actions/checkout@v3 + uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" @@ -220,12 +246,13 @@ jobs: - job_001 - job_002 - job_003 - job_007: + - job_004 + job_008: name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v3 + uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_0" @@ -234,11 +261,11 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@v1.3 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout - uses: actions/checkout@v3 + uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" @@ -252,3 +279,4 @@ jobs: - job_001 - job_002 - job_003 + - job_004 diff --git a/analysis_options.yaml b/analysis_options.yaml index 60f3b0732c..fc222d4fc2 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -42,7 +42,6 @@ linter: - file_names - hash_and_equals - implementation_imports - - invariant_booleans - iterable_contains_unrelated_type - join_return_with_assignment - library_names diff --git a/mono_repo.yaml b/mono_repo.yaml index 7dc1d9ed19..fea61aac43 100644 --- a/mono_repo.yaml +++ b/mono_repo.yaml @@ -1,3 +1,9 @@ +# See https://github.com/google/mono_repo.dart for details on this file +self_validate: analyze_and_format + +github: + cron: "0 0 * * 0" + merge_stages: - analyze_and_format - unit_test diff --git a/tool/ci.sh b/tool/ci.sh index 0706703ca4..0edee24259 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.2.2 +# Created with package:mono_repo v6.3.0 # Support built in commands on windows out of the box. # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") From 7b6aeb6243d1d15e28885742447a2a8f571b1816 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 3 Aug 2022 11:25:20 -0700 Subject: [PATCH 138/448] Merge the cupertino branch to master (#741) * Add a dart wrapper for Apple's Core Networking APIs. (#721) * Rename cupertinohttp to cupertino_http (#722) * Remove old cupertinohttp (#725) * Fix a bug where strongToStrongObjectsMapTable was not retained (#731) * Add the ability to download data into a file. (#732) * Fix diagram (#739) * Add flutter packaging to cupertino_http (#724) * Remove dart CLI build for cupertino_http (#740) * Remove vendored third-party * Run cupertino changes on the default branch * Update pkgs/cupertino_http/analysis_options.yaml Co-authored-by: Nate Bosch Co-authored-by: Michael Thomsen Co-authored-by: Nate Bosch --- .../ISSUE_TEMPLATE/1-FAILING_CONNECTION.md | 2 +- .github/ISSUE_TEMPLATE/2-BUG_REPORT.md | 2 +- .github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md | 2 +- .../4-CUPERTINO_HTTP_BUG_REPORT.md | 12 + .../5-CUPERTINO_HTTP_REQUEST.md | 11 + .github/workflows/cupertino.yml | 58 + pkgs/cupertino_http/.gitattributes | 5 + pkgs/cupertino_http/.gitignore | 1 + pkgs/cupertino_http/.metadata | 33 + pkgs/cupertino_http/DEVELOPMENT.md | 23 + pkgs/cupertino_http/LICENSE | 27 + pkgs/cupertino_http/README.md | 5 + pkgs/cupertino_http/analysis_options.yaml | 4 + pkgs/cupertino_http/cupertino_http.iml | 19 + pkgs/cupertino_http/example/.gitignore | 47 + pkgs/cupertino_http/example/README.md | 3 + .../example/analysis_options.yaml | 29 + .../client_conformance_test.dart | 18 + .../example/integration_test/data_test.dart | 41 + .../example/integration_test/error_test.dart | 15 + .../http_url_response_test.dart | 63 + .../integration_test/mutable_data_test.dart | 38 + .../mutable_url_request_test.dart | 61 + .../integration_test/url_request_test.dart | 43 + .../integration_test/url_response_test.dart | 39 + .../url_session_configuration_test.dart | 107 + .../url_session_delegate_test.dart | 453 + .../url_session_task_test.dart | 120 + .../integration_test/url_session_test.dart | 240 + .../example/integration_test/utils_test.dart | 50 + pkgs/cupertino_http/example/ios/.gitignore | 34 + .../ios/Flutter/AppFrameworkInfo.plist | 26 + .../example/ios/Flutter/Debug.xcconfig | 2 + .../example/ios/Flutter/Release.xcconfig | 2 + pkgs/cupertino_http/example/ios/Podfile | 41 + pkgs/cupertino_http/example/ios/Podfile.lock | 22 + .../ios/Runner.xcodeproj/project.pbxproj | 552 + .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 87 + .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../example/ios/Runner/AppDelegate.swift | 13 + .../AppIcon.appiconset/Contents.json | 122 + .../Icon-App-1024x1024@1x.png | Bin 0 -> 10932 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 0 -> 564 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 0 -> 1283 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 0 -> 1588 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 0 -> 1025 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 0 -> 1716 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 0 -> 1920 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 0 -> 1283 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 0 -> 1895 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 0 -> 2665 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 0 -> 2665 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 0 -> 3831 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 0 -> 1888 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 0 -> 3294 bytes .../Icon-App-83.5x83.5@2x.png | Bin 0 -> 3612 bytes .../LaunchImage.imageset/Contents.json | 23 + .../LaunchImage.imageset/LaunchImage.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/README.md | 5 + .../Runner/Base.lproj/LaunchScreen.storyboard | 37 + .../ios/Runner/Base.lproj/Main.storyboard | 26 + .../example/ios/Runner/Info.plist | 49 + .../ios/Runner/Runner-Bridging-Header.h | 1 + pkgs/cupertino_http/example/lib/main.dart | 154 + pkgs/cupertino_http/example/macos/.gitignore | 7 + .../macos/Flutter/Flutter-Debug.xcconfig | 2 + .../macos/Flutter/Flutter-Release.xcconfig | 2 + .../Flutter/GeneratedPluginRegistrant.swift | 10 + pkgs/cupertino_http/example/macos/Podfile | 40 + .../cupertino_http/example/macos/Podfile.lock | 22 + .../macos/Runner.xcodeproj/project.pbxproj | 632 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 87 + .../contents.xcworkspacedata | 10 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../example/macos/Runner/AppDelegate.swift | 9 + .../AppIcon.appiconset/Contents.json | 68 + .../AppIcon.appiconset/app_icon_1024.png | Bin 0 -> 46993 bytes .../AppIcon.appiconset/app_icon_128.png | Bin 0 -> 3276 bytes .../AppIcon.appiconset/app_icon_16.png | Bin 0 -> 1429 bytes .../AppIcon.appiconset/app_icon_256.png | Bin 0 -> 5933 bytes .../AppIcon.appiconset/app_icon_32.png | Bin 0 -> 1243 bytes .../AppIcon.appiconset/app_icon_512.png | Bin 0 -> 14800 bytes .../AppIcon.appiconset/app_icon_64.png | Bin 0 -> 1874 bytes .../macos/Runner/Base.lproj/MainMenu.xib | 343 + .../macos/Runner/Configs/AppInfo.xcconfig | 14 + .../macos/Runner/Configs/Debug.xcconfig | 2 + .../macos/Runner/Configs/Release.xcconfig | 2 + .../macos/Runner/Configs/Warnings.xcconfig | 13 + .../macos/Runner/DebugProfile.entitlements | 14 + .../example/macos/Runner/Info.plist | 32 + .../macos/Runner/MainFlutterWindow.swift | 15 + .../example/macos/Runner/Release.entitlements | 10 + pkgs/cupertino_http/example/pubspec.yaml | 101 + pkgs/cupertino_http/ffigen.yaml | 31 + pkgs/cupertino_http/img/architecture.svg | 1 + .../ios/Classes/CUPHTTPClientDelegate.m | 1 + .../ios/Classes/CUPHTTPForwardedDelegate.m | 1 + pkgs/cupertino_http/ios/Classes/dart_api_dl.c | 1 + .../cupertino_http/ios/cupertino_http.podspec | 29 + pkgs/cupertino_http/lib/cupertino_client.dart | 169 + pkgs/cupertino_http/lib/cupertino_http.dart | 947 + .../lib/src/native_cupertino_bindings.dart | 28895 ++++++++++++++++ pkgs/cupertino_http/lib/src/utils.dart | 80 + .../macos/Classes/CUPHTTPClientDelegate.m | 1 + .../macos/Classes/CUPHTTPForwardedDelegate.m | 1 + .../macos/Classes/dart_api_dl.c | 1 + .../macos/cupertino_http.podspec | 28 + pkgs/cupertino_http/pubspec.yaml | 29 + .../src/CUPHTTPClientDelegate.h | 63 + .../src/CUPHTTPClientDelegate.m | 218 + .../src/CUPHTTPForwardedDelegate.h | 108 + .../src/CUPHTTPForwardedDelegate.m | 142 + .../src/dart-sdk/include/dart_api.h | 3909 +++ .../src/dart-sdk/include/dart_api_dl.c | 59 + .../src/dart-sdk/include/dart_api_dl.h | 150 + .../src/dart-sdk/include/dart_native_api.h | 197 + .../src/dart-sdk/include/dart_tools_api.h | 526 + .../src/dart-sdk/include/dart_version.h | 16 + .../include/internal/dart_api_dl_impl.h | 21 + 127 files changed, 39888 insertions(+), 3 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md create mode 100644 .github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md create mode 100644 .github/workflows/cupertino.yml create mode 100644 pkgs/cupertino_http/.gitattributes create mode 100644 pkgs/cupertino_http/.gitignore create mode 100644 pkgs/cupertino_http/.metadata create mode 100644 pkgs/cupertino_http/DEVELOPMENT.md create mode 100644 pkgs/cupertino_http/LICENSE create mode 100644 pkgs/cupertino_http/README.md create mode 100644 pkgs/cupertino_http/analysis_options.yaml create mode 100644 pkgs/cupertino_http/cupertino_http.iml create mode 100644 pkgs/cupertino_http/example/.gitignore create mode 100644 pkgs/cupertino_http/example/README.md create mode 100644 pkgs/cupertino_http/example/analysis_options.yaml create mode 100644 pkgs/cupertino_http/example/integration_test/client_conformance_test.dart create mode 100644 pkgs/cupertino_http/example/integration_test/data_test.dart create mode 100644 pkgs/cupertino_http/example/integration_test/error_test.dart create mode 100644 pkgs/cupertino_http/example/integration_test/http_url_response_test.dart create mode 100644 pkgs/cupertino_http/example/integration_test/mutable_data_test.dart create mode 100644 pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart create mode 100644 pkgs/cupertino_http/example/integration_test/url_request_test.dart create mode 100644 pkgs/cupertino_http/example/integration_test/url_response_test.dart create mode 100644 pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart create mode 100644 pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart create mode 100644 pkgs/cupertino_http/example/integration_test/url_session_task_test.dart create mode 100644 pkgs/cupertino_http/example/integration_test/url_session_test.dart create mode 100644 pkgs/cupertino_http/example/integration_test/utils_test.dart create mode 100644 pkgs/cupertino_http/example/ios/.gitignore create mode 100644 pkgs/cupertino_http/example/ios/Flutter/AppFrameworkInfo.plist create mode 100644 pkgs/cupertino_http/example/ios/Flutter/Debug.xcconfig create mode 100644 pkgs/cupertino_http/example/ios/Flutter/Release.xcconfig create mode 100644 pkgs/cupertino_http/example/ios/Podfile create mode 100644 pkgs/cupertino_http/example/ios/Podfile.lock create mode 100644 pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.pbxproj create mode 100644 pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 pkgs/cupertino_http/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 pkgs/cupertino_http/example/ios/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 pkgs/cupertino_http/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 pkgs/cupertino_http/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 pkgs/cupertino_http/example/ios/Runner/AppDelegate.swift create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png create mode 100644 pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md create mode 100644 pkgs/cupertino_http/example/ios/Runner/Base.lproj/LaunchScreen.storyboard create mode 100644 pkgs/cupertino_http/example/ios/Runner/Base.lproj/Main.storyboard create mode 100644 pkgs/cupertino_http/example/ios/Runner/Info.plist create mode 100644 pkgs/cupertino_http/example/ios/Runner/Runner-Bridging-Header.h create mode 100644 pkgs/cupertino_http/example/lib/main.dart create mode 100644 pkgs/cupertino_http/example/macos/.gitignore create mode 100644 pkgs/cupertino_http/example/macos/Flutter/Flutter-Debug.xcconfig create mode 100644 pkgs/cupertino_http/example/macos/Flutter/Flutter-Release.xcconfig create mode 100644 pkgs/cupertino_http/example/macos/Flutter/GeneratedPluginRegistrant.swift create mode 100644 pkgs/cupertino_http/example/macos/Podfile create mode 100644 pkgs/cupertino_http/example/macos/Podfile.lock create mode 100644 pkgs/cupertino_http/example/macos/Runner.xcodeproj/project.pbxproj create mode 100644 pkgs/cupertino_http/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 pkgs/cupertino_http/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 pkgs/cupertino_http/example/macos/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 pkgs/cupertino_http/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 pkgs/cupertino_http/example/macos/Runner/AppDelegate.swift create mode 100644 pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png create mode 100644 pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png create mode 100644 pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png create mode 100644 pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png create mode 100644 pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png create mode 100644 pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png create mode 100644 pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png create mode 100644 pkgs/cupertino_http/example/macos/Runner/Base.lproj/MainMenu.xib create mode 100644 pkgs/cupertino_http/example/macos/Runner/Configs/AppInfo.xcconfig create mode 100644 pkgs/cupertino_http/example/macos/Runner/Configs/Debug.xcconfig create mode 100644 pkgs/cupertino_http/example/macos/Runner/Configs/Release.xcconfig create mode 100644 pkgs/cupertino_http/example/macos/Runner/Configs/Warnings.xcconfig create mode 100644 pkgs/cupertino_http/example/macos/Runner/DebugProfile.entitlements create mode 100644 pkgs/cupertino_http/example/macos/Runner/Info.plist create mode 100644 pkgs/cupertino_http/example/macos/Runner/MainFlutterWindow.swift create mode 100644 pkgs/cupertino_http/example/macos/Runner/Release.entitlements create mode 100644 pkgs/cupertino_http/example/pubspec.yaml create mode 100644 pkgs/cupertino_http/ffigen.yaml create mode 100644 pkgs/cupertino_http/img/architecture.svg create mode 100644 pkgs/cupertino_http/ios/Classes/CUPHTTPClientDelegate.m create mode 100644 pkgs/cupertino_http/ios/Classes/CUPHTTPForwardedDelegate.m create mode 100644 pkgs/cupertino_http/ios/Classes/dart_api_dl.c create mode 100644 pkgs/cupertino_http/ios/cupertino_http.podspec create mode 100644 pkgs/cupertino_http/lib/cupertino_client.dart create mode 100644 pkgs/cupertino_http/lib/cupertino_http.dart create mode 100644 pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart create mode 100644 pkgs/cupertino_http/lib/src/utils.dart create mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPClientDelegate.m create mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPForwardedDelegate.m create mode 100644 pkgs/cupertino_http/macos/Classes/dart_api_dl.c create mode 100644 pkgs/cupertino_http/macos/cupertino_http.podspec create mode 100644 pkgs/cupertino_http/pubspec.yaml create mode 100644 pkgs/cupertino_http/src/CUPHTTPClientDelegate.h create mode 100644 pkgs/cupertino_http/src/CUPHTTPClientDelegate.m create mode 100644 pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h create mode 100644 pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m create mode 100644 pkgs/cupertino_http/src/dart-sdk/include/dart_api.h create mode 100644 pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.c create mode 100644 pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.h create mode 100644 pkgs/cupertino_http/src/dart-sdk/include/dart_native_api.h create mode 100644 pkgs/cupertino_http/src/dart-sdk/include/dart_tools_api.h create mode 100644 pkgs/cupertino_http/src/dart-sdk/include/dart_version.h create mode 100644 pkgs/cupertino_http/src/dart-sdk/include/internal/dart_api_dl_impl.h diff --git a/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md b/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md index 88a61ae370..a3e93b6dd1 100644 --- a/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md +++ b/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md @@ -1,5 +1,5 @@ --- -name: An HTTP request fails when made through this client. +name: `package:http` ⟶ An HTTP request fails when made through this client. about: You are attempting to make a GET or POST and getting an unexpected exception or status code. diff --git a/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md b/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md index bb7556e31b..b4a8f41981 100644 --- a/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md @@ -1,5 +1,5 @@ --- -name: I found a bug. +name: `package:http` ⟶ I found a bug. about: You found that something which is expected to work, doesn't. The same capability works when using `dart:io` or `dart:html` directly. diff --git a/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md index 9c2f2adc61..c5182ee2a5 100644 --- a/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md +++ b/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md @@ -1,5 +1,5 @@ --- -name: I'd like a new feature. +name: `package:http` ⟶ I'd like a new feature. about: You are using `package:http` and would like a new feature to make it easier to make http requests. diff --git a/.github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md b/.github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md new file mode 100644 index 0000000000..fe428e8662 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md @@ -0,0 +1,12 @@ +--- +name: `package:cupertino_http` ⟶ I found a bug. +about: You found that something which is expected to work, doesn't. + +--- + + diff --git a/.github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md b/.github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md new file mode 100644 index 0000000000..30903b763f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md @@ -0,0 +1,11 @@ +--- +name: `package:cupertino_http` ⟶ I'd like a new feature. +about: You are using `package:cupertino_http` and would like a new feature to + make it easier to make http requests. + +--- + + diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml new file mode 100644 index 0000000000..00cd4a84b0 --- /dev/null +++ b/.github/workflows/cupertino.yml @@ -0,0 +1,58 @@ +name: package:cupertino_http CI + +on: + push: + branches: + - main + - master + pull_request: + schedule: + - cron: "0 0 * * 0" + +env: + PUB_ENVIRONMENT: bot.github + +jobs: + analyze: + name: Lint and static analysis + runs-on: ubuntu-latest + defaults: + run: + working-directory: pkgs/cupertino_http + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + # TODO: Change to 'stable' when a release version of flutter + # pins version 1.21.1 or later of 'package:test' + channel: 'master' + - id: install + name: Install dependencies + run: flutter pub get + - name: Check formatting + run: flutter format --output=none --set-exit-if-changed . + if: always() && steps.install.outcome == 'success' + - name: Analyze code + run: flutter analyze --fatal-infos + if: always() && steps.install.outcome == 'success' + + test: + # Test package:cupertino_http use flutter integration tests. + needs: analyze + name: "Build and test" + runs-on: macos-latest + defaults: + run: + working-directory: pkgs/cupertino_http/example + steps: + - uses: actions/checkout@v3 + - uses: futureware-tech/simulator-action@v1 + with: + model: 'iPhone 8' + - uses: subosito/flutter-action@v2 + with: + # TODO: Change to 'stable' when a release version of flutter + # pins version 1.21.1 or later of 'package:test' + channel: 'master' + - name: Run tests + run: flutter test integration_test/ diff --git a/pkgs/cupertino_http/.gitattributes b/pkgs/cupertino_http/.gitattributes new file mode 100644 index 0000000000..d1c5cc3aee --- /dev/null +++ b/pkgs/cupertino_http/.gitattributes @@ -0,0 +1,5 @@ +# ffigen generated code +lib/src/native_cupertino_bindings.dart linguist-generated + +# vendored Dart API code +src/dart-sdk/** linguist-vendored diff --git a/pkgs/cupertino_http/.gitignore b/pkgs/cupertino_http/.gitignore new file mode 100644 index 0000000000..567609b123 --- /dev/null +++ b/pkgs/cupertino_http/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/pkgs/cupertino_http/.metadata b/pkgs/cupertino_http/.metadata new file mode 100644 index 0000000000..8e66409c58 --- /dev/null +++ b/pkgs/cupertino_http/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled. + +version: + revision: cd41fdd495f6944ecd3506c21e94c6567b073278 + channel: stable + +project_type: plugin_ffi + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278 + base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278 + - platform: ios + create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278 + base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278 + - platform: macos + create_revision: cd41fdd495f6944ecd3506c21e94c6567b073278 + base_revision: cd41fdd495f6944ecd3506c21e94c6567b073278 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/pkgs/cupertino_http/DEVELOPMENT.md b/pkgs/cupertino_http/DEVELOPMENT.md new file mode 100644 index 0000000000..9c473ca60b --- /dev/null +++ b/pkgs/cupertino_http/DEVELOPMENT.md @@ -0,0 +1,23 @@ +# Development + +## Architecture + +![Architecture Diagram](./img/architecture.svg?raw=true) + +`package:cupertino_http` is organized into three components: +1. [bindings](lib/src/native_cupertino_bindings.dart) generated by + [ffigen](https://pub.dev/packages/ffigen) to relevant + [Foundation framework](https://developer.apple.com/documentation/foundation) + functionality. Configured using [`ffigen.yaml`](ffigen.yaml). +2. A [native helper library](src/) that fills gaps in the generated bindings. +3. Dart source that provides a high-level interface to the + [Foundation framework](https://developer.apple.com/documentation/foundation) + [URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). + +## Running the tests + +```shell +cd example +flutter test integration_test +``` + diff --git a/pkgs/cupertino_http/LICENSE b/pkgs/cupertino_http/LICENSE new file mode 100644 index 0000000000..e1785dd36f --- /dev/null +++ b/pkgs/cupertino_http/LICENSE @@ -0,0 +1,27 @@ +Copyright 2022, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pkgs/cupertino_http/README.md b/pkgs/cupertino_http/README.md new file mode 100644 index 0000000000..99dc24a42d --- /dev/null +++ b/pkgs/cupertino_http/README.md @@ -0,0 +1,5 @@ +A macOS/iOS Flutter plugin that provides access to the +[Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). + +See [DEVELOPMENT.md](DEVELOPMENT.md) for information on how to develop +the plugin itself. diff --git a/pkgs/cupertino_http/analysis_options.yaml b/pkgs/cupertino_http/analysis_options.yaml new file mode 100644 index 0000000000..5a27f84e32 --- /dev/null +++ b/pkgs/cupertino_http/analysis_options.yaml @@ -0,0 +1,4 @@ +include: ../../analysis_options.yaml + +analyzer: + exclude: [lib/src/native_cupertino_bindings.dart] diff --git a/pkgs/cupertino_http/cupertino_http.iml b/pkgs/cupertino_http/cupertino_http.iml new file mode 100644 index 0000000000..39cce21274 --- /dev/null +++ b/pkgs/cupertino_http/cupertino_http.iml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/cupertino_http/example/.gitignore b/pkgs/cupertino_http/example/.gitignore new file mode 100644 index 0000000000..a8e938c083 --- /dev/null +++ b/pkgs/cupertino_http/example/.gitignore @@ -0,0 +1,47 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/pkgs/cupertino_http/example/README.md b/pkgs/cupertino_http/example/README.md new file mode 100644 index 0000000000..f2838e8334 --- /dev/null +++ b/pkgs/cupertino_http/example/README.md @@ -0,0 +1,3 @@ +# cupertino_http_example + +Demonstrates how to use the cupertino_http plugin. diff --git a/pkgs/cupertino_http/example/analysis_options.yaml b/pkgs/cupertino_http/example/analysis_options.yaml new file mode 100644 index 0000000000..61b6c4de17 --- /dev/null +++ b/pkgs/cupertino_http/example/analysis_options.yaml @@ -0,0 +1,29 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at + # https://dart-lang.github.io/linter/lints/index.html. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart new file mode 100644 index 0000000000..cb09eaf83a --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart @@ -0,0 +1,18 @@ +import 'package:integration_test/integration_test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + // TODO: Re-enable when http_client_conformance_tests supports Flutter + // plugins + // + // group('defaultSessionConfiguration', () { + // testAll(CupertinoClient.defaultSessionConfiguration(), + // canStreamRequestBody: false); + // }); + // group('fromSessionConfiguration', () { + // final config = URLSessionConfiguration.ephemeralSessionConfiguration(); + // testAll(CupertinoClient.fromSessionConfiguration(config), + // canStreamRequestBody: false); + // }); +} diff --git a/pkgs/cupertino_http/example/integration_test/data_test.dart b/pkgs/cupertino_http/example/integration_test/data_test.dart new file mode 100644 index 0000000000..9ed6ee1e15 --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/data_test.dart @@ -0,0 +1,41 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:typed_data'; + +import 'package:cupertino_http/cupertino_http.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('empty data', () { + final data = Data.fromUint8List(Uint8List(0)); + + test('length', () => expect(data.length, 0)); + test('bytes', () => expect(data.bytes, Uint8List(0))); + test('toString', data.toString); // Just verify that there is no crash. + }); + + group('non-empty data', () { + final data = Data.fromUint8List(Uint8List.fromList([1, 2, 3, 4, 5])); + test('length', () => expect(data.length, 5)); + test( + 'bytes', () => expect(data.bytes, Uint8List.fromList([1, 2, 3, 4, 5]))); + test('toString', data.toString); // Just verify that there is no crash. + }); + + group('Data.fromData', () { + test('from empty', () { + final from = Data.fromUint8List(Uint8List(0)); + expect(Data.fromData(from).bytes, Uint8List.fromList([])); + }); + + test('from non-empty', () { + final from = Data.fromUint8List(Uint8List.fromList([1, 2, 3, 4, 5])); + expect(Data.fromData(from).bytes, Uint8List.fromList([1, 2, 3, 4, 5])); + }); + }); +} diff --git a/pkgs/cupertino_http/example/integration_test/error_test.dart b/pkgs/cupertino_http/example/integration_test/error_test.dart new file mode 100644 index 0000000000..4c7ad63dba --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/error_test.dart @@ -0,0 +1,15 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@Skip('Error tests cannot currently be written. See comments in this file.') + +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + // TODO(https://github.com/dart-lang/ffigen/issues/386): Implement tests + // when an initializer is callable. +} diff --git a/pkgs/cupertino_http/example/integration_test/http_url_response_test.dart b/pkgs/cupertino_http/example/integration_test/http_url_response_test.dart new file mode 100644 index 0000000000..ae3f5f883e --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/http_url_response_test.dart @@ -0,0 +1,63 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. 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:cupertino_http/cupertino_http.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('response', () { + late HttpServer server; + late HTTPURLResponse response; + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.statusCode = 211; + request.response.headers.set('Content-Type', 'text/fancy'); + request.response.headers.set('custom-header', 'custom-header-value'); + request.response.write('Hello World'); + await request.response.close(); + }); + final session = URLSession.sharedSession(); + final task = session.dataTaskWithRequest( + URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) + ..resume(); + while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + // Let the event loop run. + await Future(() {}); + } + response = task.response as HTTPURLResponse; + }); + tearDown(() { + server.close(); + }); + + test('mimeType', () async { + expect(response.mimeType, 'text/fancy'); + }); + test('statusCode', () async { + expect(response.statusCode, 211); + }); + test('expectedContentLength - no content-length header', () async { + expect(response.expectedContentLength, -1); + }); + + test('custom set header', () async { + expect(response.allHeaderFields['custom-header'], 'custom-header-value'); + }); + + test('unset header', () async { + expect(response.allHeaderFields['unset-header'], null); + }); + + test('toString', () async { + response.toString(); // Just verify that there is no crash. + }); + }); +} diff --git a/pkgs/cupertino_http/example/integration_test/mutable_data_test.dart b/pkgs/cupertino_http/example/integration_test/mutable_data_test.dart new file mode 100644 index 0000000000..2378e17751 --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/mutable_data_test.dart @@ -0,0 +1,38 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:typed_data'; + +import 'package:cupertino_http/cupertino_http.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('empty data', () { + final data = MutableData.empty(); + + test('length', () => expect(data.length, 0)); + test('bytes', () => expect(data.bytes, Uint8List(0))); + test('toString', data.toString); // Just verify that there is no crash. + }); + + group('appendBytes', () { + test('append no bytes', () { + final data = MutableData.empty()..appendBytes(Uint8List(0)); + expect(data.bytes, Uint8List(0)); + data.toString(); // Just verify that there is no crash. + }); + + test('append some bytes', () { + final data = MutableData.empty() + ..appendBytes(Uint8List.fromList([1, 2, 3, 4, 5])); + expect(data.bytes, Uint8List.fromList([1, 2, 3, 4, 5])); + data.appendBytes(Uint8List.fromList([6, 7, 8, 9, 10])); + expect(data.bytes, Uint8List.fromList([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])); + data.toString(); // Just verify that there is no crash. + }); + }); +} diff --git a/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart b/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart new file mode 100644 index 0000000000..b205271be5 --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart @@ -0,0 +1,61 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:typed_data'; + +import 'package:cupertino_http/cupertino_http.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('headers', () { + final uri = Uri.parse('http://www.example.com/foo?baz=3#bar'); + late MutableURLRequest request; + + setUp(() => request = MutableURLRequest.fromUrl(uri)); + + test('empty', () => expect(request.allHttpHeaderFields, null)); + test('add', () { + request.setValueForHttpHeaderField('header', 'value'); + expect(request.allHttpHeaderFields!['header'], 'value'); + request.toString(); // Just verify that there is no crash. + }); + }); + + group('body', () { + final uri = Uri.parse('http://www.example.com/foo?baz=3#bar'); + late MutableURLRequest request; + + setUp(() => request = MutableURLRequest.fromUrl(uri)); + + test('empty', () => expect(request.httpBody, null)); + test('set', () { + request.httpBody = Data.fromUint8List(Uint8List.fromList([1, 2, 3])); + expect(request.httpBody!.bytes, Uint8List.fromList([1, 2, 3])); + request.toString(); // Just verify that there is no crash. + }); + test('set to null', () { + request + ..httpBody = Data.fromUint8List(Uint8List.fromList([1, 2, 3])) + ..httpBody = null; + expect(request.httpBody, null); + }); + }); + + group('http method', () { + final uri = Uri.parse('http://www.example.com/foo?baz=3#bar'); + late MutableURLRequest request; + + setUp(() => request = MutableURLRequest.fromUrl(uri)); + + test('empty', () => expect(request.httpMethod, 'GET')); + test('set', () { + request.httpMethod = 'POST'; + expect(request.httpMethod, 'POST'); + request.toString(); // Just verify that there is no crash. + }); + }); +} diff --git a/pkgs/cupertino_http/example/integration_test/url_request_test.dart b/pkgs/cupertino_http/example/integration_test/url_request_test.dart new file mode 100644 index 0000000000..3a28c00094 --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/url_request_test.dart @@ -0,0 +1,43 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:cupertino_http/cupertino_http.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('fromUrl', () { + test('absolute URL', () { + final uri = Uri.parse('http://www.example.com/foo?baz=3#bar'); + final request = URLRequest.fromUrl(uri); + expect(request.url, uri); + expect(request.httpMethod, 'GET'); + expect(request.allHttpHeaderFields, null); + expect(request.httpBody, null); + request.toString(); // Just verify that there is no crash. + }); + + test('relative URL', () { + final uri = Uri.parse('/foo?baz=3#bar'); + final request = URLRequest.fromUrl(uri); + expect(request.url, uri); + expect(request.httpMethod, 'GET'); + expect(request.allHttpHeaderFields, null); + expect(request.httpBody, null); + request.toString(); // Just verify that there is no crash. + }); + + test('FTP URL', () { + final uri = Uri.parse('ftp://ftp.example.com/foo'); + final request = URLRequest.fromUrl(uri); + expect(request.url, uri); + expect(request.httpMethod, 'GET'); + expect(request.allHttpHeaderFields, null); + expect(request.httpBody, null); + request.toString(); // Just verify that there is no crash. + }); + }); +} diff --git a/pkgs/cupertino_http/example/integration_test/url_response_test.dart b/pkgs/cupertino_http/example/integration_test/url_response_test.dart new file mode 100644 index 0000000000..777ec68e6a --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/url_response_test.dart @@ -0,0 +1,39 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:cupertino_http/cupertino_http.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('response', () { + late URLResponse response; + setUp(() async { + final session = URLSession.sharedSession(); + final task = session.dataTaskWithRequest(URLRequest.fromUrl( + Uri.parse('data:text/fancy;charset=utf-8,Hello%20World'))) + ..resume(); + while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + // Let the event loop run. + await Future.delayed(const Duration()); + } + + response = task.response!; + }); + + test('mimeType', () async { + expect(response.mimeType, 'text/fancy'); + }); + + test('expectedContentLength ', () { + expect(response.expectedContentLength, 11); + }); + + test('toString', () { + response.toString(); // Just verify that there is no crash. + }); + }); +} diff --git a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart new file mode 100644 index 0000000000..9107442912 --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart @@ -0,0 +1,107 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:cupertino_http/cupertino_http.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void testProperties(URLSessionConfiguration config) { + group('properties', () { + test('allowsCellularAccess', () { + config.allowsCellularAccess = true; + expect(config.allowsCellularAccess, true); + config.allowsCellularAccess = false; + expect(config.allowsCellularAccess, false); + }); + test('allowsConstrainedNetworkAccess', () { + config.allowsConstrainedNetworkAccess = true; + expect(config.allowsConstrainedNetworkAccess, true); + config.allowsConstrainedNetworkAccess = false; + expect(config.allowsConstrainedNetworkAccess, false); + }); + test('allowsExpensiveNetworkAccess', () { + config.allowsExpensiveNetworkAccess = true; + expect(config.allowsExpensiveNetworkAccess, true); + config.allowsExpensiveNetworkAccess = false; + expect(config.allowsExpensiveNetworkAccess, false); + }); + test('discretionary', () { + config.discretionary = true; + expect(config.discretionary, true); + config.discretionary = false; + expect(config.discretionary, false); + }); + test('httpCookieAcceptPolicy', () { + config.httpCookieAcceptPolicy = + HTTPCookieAcceptPolicy.httpCookieAcceptPolicyAlways; + expect(config.httpCookieAcceptPolicy, + HTTPCookieAcceptPolicy.httpCookieAcceptPolicyAlways); + config.httpCookieAcceptPolicy = + HTTPCookieAcceptPolicy.httpCookieAcceptPolicyNever; + expect(config.httpCookieAcceptPolicy, + HTTPCookieAcceptPolicy.httpCookieAcceptPolicyNever); + }); + test('httpShouldSetCookies', () { + config.httpShouldSetCookies = true; + expect(config.httpShouldSetCookies, true); + config.httpShouldSetCookies = false; + expect(config.httpShouldSetCookies, false); + }); + test('httpShouldUsePipelining', () { + config.httpShouldUsePipelining = true; + expect(config.httpShouldUsePipelining, true); + config.httpShouldUsePipelining = false; + expect(config.httpShouldUsePipelining, false); + }); + test('sessionSendsLaunchEvents', () { + config.sessionSendsLaunchEvents = true; + expect(config.sessionSendsLaunchEvents, true); + config.sessionSendsLaunchEvents = false; + expect(config.sessionSendsLaunchEvents, false); + }); + test('shouldUseExtendedBackgroundIdleMode', () { + config.shouldUseExtendedBackgroundIdleMode = true; + expect(config.shouldUseExtendedBackgroundIdleMode, true); + config.shouldUseExtendedBackgroundIdleMode = false; + expect(config.shouldUseExtendedBackgroundIdleMode, false); + }); + test('timeoutIntervalForRequest', () { + config.timeoutIntervalForRequest = + const Duration(seconds: 15, microseconds: 23); + expect(config.timeoutIntervalForRequest, + const Duration(seconds: 15, microseconds: 23)); + }); + test('waitsForConnectivity', () { + config.waitsForConnectivity = true; + expect(config.waitsForConnectivity, true); + config.waitsForConnectivity = false; + expect(config.waitsForConnectivity, false); + }); + }); +} + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('backgroundSession', () { + final config = URLSessionConfiguration.backgroundSession('myid'); + + testProperties(config); + config.toString(); // Just verify that there is no crash. + }); + + group('defaultSessionConfiguration', () { + final config = URLSessionConfiguration.defaultSessionConfiguration(); + + testProperties(config); + config.toString(); // Just verify that there is no crash. + }); + + group('ephemeralSessionConfiguration', () { + final config = URLSessionConfiguration.ephemeralSessionConfiguration(); + + testProperties(config); + config.toString(); // Just verify that there is no crash. + }); +} diff --git a/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart new file mode 100644 index 0000000000..51024b82cc --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart @@ -0,0 +1,453 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:cupertino_http/cupertino_http.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void testOnComplete() { + group('onComplete', () { + late HttpServer server; + + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World'); + await request.response.close(); + }); + }); + tearDown(() { + server.close(); + }); + + test('success', () async { + final c = Completer(); + Error? actualError; + late URLSession actualSession; + late URLSessionTask actualTask; + + final session = URLSession.sessionWithConfiguration( + URLSessionConfiguration.defaultSessionConfiguration(), + onComplete: (s, t, e) { + actualSession = s; + actualTask = t; + actualError = e; + c.complete(); + }); + + final task = session.dataTaskWithRequest( + URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) + ..resume(); + await c.future; + + expect(actualSession, session); + expect(actualTask, task); + expect(actualError, null); + }); + + test('bad host', () async { + final c = Completer(); + Error? actualError; + late URLSession actualSession; + late URLSessionTask actualTask; + + final session = URLSession.sessionWithConfiguration( + URLSessionConfiguration.defaultSessionConfiguration(), + onComplete: (s, t, e) { + actualSession = s; + actualTask = t; + actualError = e; + c.complete(); + }); + + final task = session.dataTaskWithRequest( + URLRequest.fromUrl(Uri.https('does-not-exist', ''))) + ..resume(); + await c.future; + expect(actualSession, session); + expect(actualTask, task); + expect(actualError!.code, -1003); // kCFURLErrorCannotFindHost + }); + }); +} + +void testOnResponse() { + group('onResponse', () { + late HttpServer server; + + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World'); + await request.response.close(); + }); + }); + tearDown(() { + server.close(); + }); + + test('success', () async { + final c = Completer(); + late HTTPURLResponse actualResponse; + late URLSession actualSession; + late URLSessionTask actualTask; + + final session = URLSession.sessionWithConfiguration( + URLSessionConfiguration.defaultSessionConfiguration(), + onResponse: (s, t, r) { + actualSession = s; + actualTask = t; + actualResponse = r as HTTPURLResponse; + c.complete(); + return URLSessionResponseDisposition.urlSessionResponseAllow; + }); + + final task = session.dataTaskWithRequest( + URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) + ..resume(); + await c.future; + expect(actualSession, session); + expect(actualTask, task); + expect(actualResponse.statusCode, 200); + }); + + test('bad host', () async { + // `onResponse` should not be called because there was no valid response. + final c = Completer(); + var called = false; + + final session = URLSession.sessionWithConfiguration( + URLSessionConfiguration.defaultSessionConfiguration(), + onComplete: (session, task, error) => c.complete(), + onResponse: (s, t, r) { + called = true; + return URLSessionResponseDisposition.urlSessionResponseAllow; + }); + + session + .dataTaskWithRequest( + URLRequest.fromUrl(Uri.https('does-not-exist', ''))) + .resume(); + await c.future; + expect(called, false); + }); + }); +} + +void testOnData() { + group('onData', () { + late HttpServer server; + + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World'); + await request.response.close(); + }); + }); + tearDown(() { + server.close(); + }); + + test('success', () async { + final c = Completer(); + final actualData = MutableData.empty(); + late URLSession actualSession; + late URLSessionTask actualTask; + + final session = URLSession.sessionWithConfiguration( + URLSessionConfiguration.defaultSessionConfiguration(), + onComplete: (s, t, r) => c.complete(), + onData: (s, t, d) { + actualSession = s; + actualTask = t; + actualData.appendBytes(d.bytes); + }); + + final task = session.dataTaskWithRequest( + URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) + ..resume(); + await c.future; + expect(actualSession, session); + expect(actualTask, task); + expect(actualData.bytes, 'Hello World'.codeUnits); + }); + }); +} + +void testOnFinishedDownloading() { + group('onFinishedDownloading', () { + late HttpServer server; + + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World'); + await request.response.close(); + }); + }); + tearDown(() { + server.close(); + }); + + test('success', () async { + final c = Completer(); + late URLSession actualSession; + late URLSessionDownloadTask actualTask; + late String actualContent; + + final session = URLSession.sessionWithConfiguration( + URLSessionConfiguration.defaultSessionConfiguration(), + onComplete: (s, t, r) => c.complete(), + onFinishedDownloading: (s, t, uri) { + actualSession = s; + actualTask = t; + actualContent = File.fromUri(uri).readAsStringSync(); + }); + + final task = session.downloadTaskWithRequest( + URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) + ..resume(); + await c.future; + expect(actualSession, session); + expect(actualTask, task); + expect(actualContent, 'Hello World'); + }); + }); +} + +void testOnRedirect() { + group('onRedirect', () { + late HttpServer redirectServer; + + setUp(() async { + // URI | Redirects TO + // ===========|============== + // ".../10" | ".../9" + // ".../9" | ".../8" + // ... | ... + // ".../1" | "/" + // "/" | + redirectServer = await HttpServer.bind('localhost', 0) + ..listen((request) async { + if (request.requestedUri.pathSegments.isEmpty) { + unawaited(request.response.close()); + } else { + final n = int.parse(request.requestedUri.pathSegments.last); + final nextPath = n - 1 == 0 ? '' : '${n - 1}'; + unawaited(request.response.redirect(Uri.parse( + 'http://localhost:${redirectServer.port}/$nextPath'))); + } + }); + }); + tearDown(() { + redirectServer.close(); + }); + + test('disallow redirect', () async { + final config = URLSessionConfiguration.defaultSessionConfiguration(); + final session = URLSession.sessionWithConfiguration(config, + onRedirect: + (redirectSession, redirectTask, redirectResponse, newRequest) => + null); + final c = Completer(); + HTTPURLResponse? response; + Error? error; + + session.dataTaskWithCompletionHandler( + URLRequest.fromUrl( + Uri.parse('http://localhost:${redirectServer.port}/100')), + (d, r, e) { + response = r; + error = e; + c.complete(); + }).resume(); + await c.future; + + expect(response!.statusCode, 302); + expect(response!.allHeaderFields['Location'], + 'http://localhost:${redirectServer.port}/99'); + expect(error, null); + }); + + test('use preposed redirect request', () async { + final config = URLSessionConfiguration.defaultSessionConfiguration(); + final session = URLSession.sessionWithConfiguration(config, + onRedirect: + (redirectSession, redirectTask, redirectResponse, newRequest) => + newRequest); + final c = Completer(); + HTTPURLResponse? response; + Error? error; + + session.dataTaskWithCompletionHandler( + URLRequest.fromUrl( + Uri.parse('http://localhost:${redirectServer.port}/1')), + (d, r, e) { + response = r; + error = e; + c.complete(); + }).resume(); + await c.future; + + expect(response!.statusCode, 200); + expect(error, null); + }); + + test('use custom redirect request', () async { + final config = URLSessionConfiguration.defaultSessionConfiguration(); + final session = URLSession.sessionWithConfiguration( + config, + onRedirect: (redirectSession, redirectTask, redirectResponse, + newRequest) => + URLRequest.fromUrl( + Uri.parse('http://localhost:${redirectServer.port}/')), + ); + final c = Completer(); + HTTPURLResponse? response; + Error? error; + + session.dataTaskWithCompletionHandler( + URLRequest.fromUrl( + Uri.parse('http://localhost:${redirectServer.port}/100')), + (d, r, e) { + response = r; + error = e; + c.complete(); + }).resume(); + await c.future; + + expect(response!.statusCode, 200); + expect(error, null); + }); + + test('exception in http redirection', () async { + final config = URLSessionConfiguration.defaultSessionConfiguration(); + final session = URLSession.sessionWithConfiguration( + config, + onRedirect: + (redirectSession, redirectTask, redirectResponse, newRequest) { + throw UnimplementedError(); + }, + ); + final c = Completer(); + HTTPURLResponse? response; + // ignore: unused_local_variable + Error? error; + + session.dataTaskWithCompletionHandler( + URLRequest.fromUrl( + Uri.parse('http://localhost:${redirectServer.port}/100')), + (d, r, e) { + response = r; + error = e; + c.complete(); + }).resume(); + await c.future; + + expect(response!.statusCode, 302); + // TODO(https://github.com/dart-lang/ffigen/issues/386): Check that the + // error is set. + }, skip: 'Error not set for redirect exceptions.'); + + test('3 redirects', () async { + final config = URLSessionConfiguration.defaultSessionConfiguration(); + var redirectCounter = 0; + final session = URLSession.sessionWithConfiguration( + config, + onRedirect: + (redirectSession, redirectTask, redirectResponse, newRequest) { + expect(redirectResponse.statusCode, 302); + switch (redirectCounter) { + case 0: + expect(redirectResponse.allHeaderFields['Location'], + 'http://localhost:${redirectServer.port}/2'); + expect(newRequest.url, + Uri.parse('http://localhost:${redirectServer.port}/2')); + break; + case 1: + expect(redirectResponse.allHeaderFields['Location'], + 'http://localhost:${redirectServer.port}/1'); + expect(newRequest.url, + Uri.parse('http://localhost:${redirectServer.port}/1')); + break; + case 2: + expect(redirectResponse.allHeaderFields['Location'], + 'http://localhost:${redirectServer.port}/'); + expect(newRequest.url, + Uri.parse('http://localhost:${redirectServer.port}/')); + break; + } + ++redirectCounter; + return newRequest; + }, + ); + final c = Completer(); + HTTPURLResponse? response; + Error? error; + + session.dataTaskWithCompletionHandler( + URLRequest.fromUrl( + Uri.parse('http://localhost:${redirectServer.port}/3')), + (d, r, e) { + response = r; + error = e; + c.complete(); + }).resume(); + await c.future; + + expect(response!.statusCode, 200); + expect(error, null); + }); + + test('allow too many redirects', () async { + // The Foundation URL Loading System limits the number of redirects + // even when a redirect delegate is present and allows the redirect. + final config = URLSessionConfiguration.defaultSessionConfiguration(); + final session = URLSession.sessionWithConfiguration( + config, + onRedirect: + (redirectSession, redirectTask, redirectResponse, newRequest) => + newRequest, + ); + final c = Completer(); + HTTPURLResponse? response; + Error? error; + + session.dataTaskWithCompletionHandler( + URLRequest.fromUrl( + Uri.parse('http://localhost:${redirectServer.port}/100')), + (d, r, e) { + response = r; + error = e; + c.complete(); + }).resume(); + await c.future; + + expect(response, null); + expect(error!.code, -1007); // kCFURLErrorHTTPTooManyRedirects + }); + }); +} + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + testOnComplete(); + testOnResponse(); + testOnData(); + testOnRedirect(); + testOnFinishedDownloading(); +} diff --git a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart new file mode 100644 index 0000000000..2f5550f00c --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart @@ -0,0 +1,120 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. 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:cupertino_http/cupertino_http.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void testURLSessionTask( + URLSessionTask Function(URLSession session, Uri url) f) { + group('task states', () { + late HttpServer server; + late URLSessionTask task; + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World'); + await request.response.close(); + }); + final session = URLSession.sharedSession(); + task = f(session, Uri.parse('http://localhost:${server.port}')); + }); + tearDown(() { + task.cancel(); + server.close(); + }); + test('starts suspended', () { + expect(task.state, URLSessionTaskState.urlSessionTaskStateSuspended); + expect(task.response, null); + task.toString(); // Just verify that there is no crash. + }); + + test('resume to running', () { + task.resume(); + expect(task.state, URLSessionTaskState.urlSessionTaskStateRunning); + expect(task.response, null); + task.toString(); // Just verify that there is no crash. + }); + + test('cancel', () { + task.cancel(); + expect(task.state, URLSessionTaskState.urlSessionTaskStateCanceling); + expect(task.response, null); + task.toString(); // Just verify that there is no crash. + }); + + test('completed', () async { + task.resume(); + while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + // Let the event loop run. + await Future(() {}); + } + }); + }); + + group('task completed', () { + late HttpServer server; + late URLSessionTask task; + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World'); + await request.response.close(); + }); + final session = URLSession.sharedSession(); + task = session.dataTaskWithRequest( + URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) + ..resume(); + + while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + // Let the event loop run. + await Future(() {}); + } + }); + tearDown(() { + task.cancel(); + server.close(); + }); + + test('has response', () async { + expect(task.response, isA()); + }); + + test('countOfBytesExpectedToReceive - no content length set', () async { + expect(task.countOfBytesExpectedToReceive, -1); + }); + + test('countOfBytesReceived', () async { + expect(task.countOfBytesReceived, 11); + }); + + test('taskIdentifier', () { + task.taskIdentifier; // Just verify that there is no crash. + }); + + test('toString', () { + task.toString(); // Just verify that there is no crash. + }); + }); +} + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('data task', () { + testURLSessionTask( + (session, uri) => session.dataTaskWithRequest(URLRequest.fromUrl(uri))); + }); + + group('download task', () { + testURLSessionTask((session, uri) => + session.downloadTaskWithRequest(URLRequest.fromUrl(uri))); + }); +} diff --git a/pkgs/cupertino_http/example/integration_test/url_session_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_test.dart new file mode 100644 index 0000000000..3faa1b682b --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/url_session_test.dart @@ -0,0 +1,240 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:cupertino_http/cupertino_http.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void testDataTaskWithCompletionHandler(URLSession session) { + group('dataTaskWithCompletionHandler', () { + late HttpServer successServer; + late HttpServer failureServer; + late HttpServer redirectServer; + + setUp(() async { + successServer = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World'); + await request.response.close(); + }); + failureServer = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.statusCode = 500; + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World'); + await request.response.close(); + }); + // URI | Redirects TO + // ===========|============== + // ".../10" | ".../9" + // ".../9" | ".../8" + // ... | ... + // ".../1" | "/" + // "/" | + redirectServer = await HttpServer.bind('localhost', 0) + ..listen((request) async { + if (request.requestedUri.pathSegments.isEmpty) { + unawaited(request.response.close()); + } else { + final n = int.parse(request.requestedUri.pathSegments.last); + final nextPath = n - 1 == 0 ? '' : '${n - 1}'; + unawaited(request.response.redirect(Uri.parse( + 'http://localhost:${redirectServer.port}/$nextPath'))); + } + }); + }); + tearDown(() { + successServer.close(); + failureServer.close(); + redirectServer.close(); + }); + + test('success', () async { + final c = Completer(); + Data? data; + HTTPURLResponse? response; + Error? error; + + session.dataTaskWithCompletionHandler( + URLRequest.fromUrl( + Uri.parse('http://localhost:${successServer.port}')), (d, r, e) { + data = d; + response = r; + error = e; + c.complete(); + }).resume(); + await c.future; + + expect(data!.bytes, 'Hello World'.codeUnits); + expect(response!.statusCode, 200); + expect(error, null); + }); + + test('success no data', () async { + final c = Completer(); + Data? data; + HTTPURLResponse? response; + Error? error; + + final request = MutableURLRequest.fromUrl( + Uri.parse('http://localhost:${successServer.port}')) + ..httpMethod = 'HEAD'; + + session.dataTaskWithCompletionHandler(request, (d, r, e) { + data = d; + response = r; + error = e; + c.complete(); + }).resume(); + await c.future; + + expect(data, null); + expect(response!.statusCode, 200); + expect(error, null); + }); + + test('500 response', () async { + final c = Completer(); + Data? data; + HTTPURLResponse? response; + Error? error; + + session.dataTaskWithCompletionHandler( + URLRequest.fromUrl( + Uri.parse('http://localhost:${failureServer.port}')), (d, r, e) { + data = d; + response = r; + error = e; + c.complete(); + }).resume(); + await c.future; + + expect(data!.bytes, 'Hello World'.codeUnits); + expect(response!.statusCode, 500); + expect(error, null); + }); + + test('too many redirects', () async { + // Ensures that the delegate used to implement the completion handler + // does not interfere with the default redirect behavior. + final c = Completer(); + Data? data; + HTTPURLResponse? response; + Error? error; + + session.dataTaskWithCompletionHandler( + URLRequest.fromUrl( + Uri.parse('http://localhost:${redirectServer.port}/100')), + (d, r, e) { + data = d; + response = r; + error = e; + c.complete(); + }).resume(); + await c.future; + + expect(response, null); + expect(data, null); + expect(error!.code, -1007); // kCFURLErrorHTTPTooManyRedirects + }); + + test('unable to connect', () async { + final c = Completer(); + Data? data; + HTTPURLResponse? response; + Error? error; + + session.dataTaskWithCompletionHandler( + URLRequest.fromUrl(Uri.parse('http://this is not a valid URL')), + (d, r, e) { + data = d; + response = r; + error = e; + c.complete(); + }).resume(); + await c.future; + + expect(data, null); + expect(response, null); + expect(error!.code, -1003); // kCFURLErrorCannotFindHost + expect(error!.localizedRecoverySuggestion, null); + }); + }); +} + +void testURLSession(URLSession session) { + group('URLSession', () { + late HttpServer server; + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World'); + await request.response.close(); + }); + }); + tearDown(() { + server.close(); + }); + + test('dataTask', () async { + final task = session.dataTaskWithRequest( + URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) + ..resume(); + while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + // Let the event loop run. + await Future.delayed(const Duration()); + } + final response = task.response as HTTPURLResponse; + expect(response.statusCode, 200); + }); + + test('downloadTask', () async { + final task = session.downloadTaskWithRequest( + URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) + ..resume(); + while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + // Let the event loop run. + await Future.delayed(const Duration()); + } + final response = task.response as HTTPURLResponse; + expect(response.statusCode, 200); + }); + + testDataTaskWithCompletionHandler(session); + }); +} + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('sharedSession', () { + final session = URLSession.sharedSession(); + + test('configration', () { + expect(session.configuration, isA()); + }); + + testURLSession(session); + }); + + group('defaultSessionConfiguration', () { + final config = URLSessionConfiguration.defaultSessionConfiguration() + ..allowsCellularAccess = false; + final session = URLSession.sessionWithConfiguration(config); + + test('configration', () { + expect(session.configuration.allowsCellularAccess, false); + }); + + testURLSession(session); + }); +} diff --git a/pkgs/cupertino_http/example/integration_test/utils_test.dart b/pkgs/cupertino_http/example/integration_test/utils_test.dart new file mode 100644 index 0000000000..1bf1ca6f40 --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/utils_test.dart @@ -0,0 +1,50 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:cupertino_http/src/native_cupertino_bindings.dart' as ncb; +import 'package:cupertino_http/src/utils.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('toStringOrNull', () { + test('null input', () { + expect(toStringOrNull(null), null); + }); + + test('string input', () { + expect(toStringOrNull('Test'.toNSString(linkedLibs)), 'Test'); + }); + }); + + group('stringDictToMap', () { + test('empty input', () { + final d = ncb.NSMutableDictionary.new1(linkedLibs); + + expect(stringDictToMap(d), {}); + }); + + test('single string input', () { + final d = ncb.NSMutableDictionary.new1(linkedLibs) + ..setObject_forKey_( + 'value'.toNSString(linkedLibs), 'key'.toNSString(linkedLibs)); + + expect(stringDictToMap(d), {'key': 'value'}); + }); + + test('multiple string input', () { + final d = ncb.NSMutableDictionary.new1(linkedLibs) + ..setObject_forKey_( + 'value1'.toNSString(linkedLibs), 'key1'.toNSString(linkedLibs)) + ..setObject_forKey_( + 'value2'.toNSString(linkedLibs), 'key2'.toNSString(linkedLibs)) + ..setObject_forKey_( + 'value3'.toNSString(linkedLibs), 'key3'.toNSString(linkedLibs)); + expect(stringDictToMap(d), + {'key1': 'value1', 'key2': 'value2', 'key3': 'value3'}); + }); + }); +} diff --git a/pkgs/cupertino_http/example/ios/.gitignore b/pkgs/cupertino_http/example/ios/.gitignore new file mode 100644 index 0000000000..7a7f9873ad --- /dev/null +++ b/pkgs/cupertino_http/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/pkgs/cupertino_http/example/ios/Flutter/AppFrameworkInfo.plist b/pkgs/cupertino_http/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000000..8d4492f977 --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 9.0 + + diff --git a/pkgs/cupertino_http/example/ios/Flutter/Debug.xcconfig b/pkgs/cupertino_http/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000000..ec97fc6f30 --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/pkgs/cupertino_http/example/ios/Flutter/Release.xcconfig b/pkgs/cupertino_http/example/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000000..c4855bfe20 --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/pkgs/cupertino_http/example/ios/Podfile b/pkgs/cupertino_http/example/ios/Podfile new file mode 100644 index 0000000000..1e8c3c90a5 --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Podfile @@ -0,0 +1,41 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '9.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/pkgs/cupertino_http/example/ios/Podfile.lock b/pkgs/cupertino_http/example/ios/Podfile.lock new file mode 100644 index 0000000000..98987d7f87 --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Podfile.lock @@ -0,0 +1,22 @@ +PODS: + - cupertino_http (0.0.1): + - Flutter + - Flutter (1.0.0) + +DEPENDENCIES: + - cupertino_http (from `.symlinks/plugins/cupertino_http/ios`) + - Flutter (from `Flutter`) + +EXTERNAL SOURCES: + cupertino_http: + :path: ".symlinks/plugins/cupertino_http/ios" + Flutter: + :path: Flutter + +SPEC CHECKSUMS: + cupertino_http: 7fdd8aec600b85131eba4839c6a6d0a11f0cbfc3 + Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + +PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c + +COCOAPODS: 1.11.2 diff --git a/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.pbxproj b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..3794697a28 --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,552 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 7C206A9A3BC694039D2138A9 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72654D21143300D1CE8849F2 /* Pods_Runner.framework */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 72654D21143300D1CE8849F2 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 82A2867F10522723C33BF204 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B662A93036DFE0C27097C83D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + EF476BC9C6E400C9F137A2DD /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7C206A9A3BC694039D2138A9 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 22C15071A6751ECD9F9A0032 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 72654D21143300D1CE8849F2 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 74D0FD79A3AADBBB8D598F3C /* Pods */ = { + isa = PBXGroup; + children = ( + B662A93036DFE0C27097C83D /* Pods-Runner.debug.xcconfig */, + 82A2867F10522723C33BF204 /* Pods-Runner.release.xcconfig */, + EF476BC9C6E400C9F137A2DD /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 74D0FD79A3AADBBB8D598F3C /* Pods */, + 22C15071A6751ECD9F9A0032 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + F2CE40CE03FA321B6919E65A /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 472C20A7B7CCE2521353C0F4 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 472C20A7B7CCE2521353C0F4 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; + F2CE40CE03FA321B6919E65A /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = KBBRB9X88Q; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.cupertinoHttpExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = KBBRB9X88Q; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.cupertinoHttpExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = KBBRB9X88Q; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.cupertinoHttpExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/pkgs/cupertino_http/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..c87d15a335 --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/cupertino_http/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/pkgs/cupertino_http/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..21a3cc14c7 --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/pkgs/cupertino_http/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/pkgs/cupertino_http/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/pkgs/cupertino_http/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/pkgs/cupertino_http/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/pkgs/cupertino_http/example/ios/Runner/AppDelegate.swift b/pkgs/cupertino_http/example/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000000..70693e4a8c --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..d36b1fab2d --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..dc9ada4725e9b0ddb1deab583e5b5102493aa332 GIT binary patch literal 10932 zcmeHN2~<R zh`|8`A_PQ1nSu(UMFx?8j8PC!!VDphaL#`F42fd#7Vlc`zIE4n%Y~eiz4y1j|NDpi z?<@|pSJ-HM`qifhf@m%MamgwK83`XpBA<+azdF#2QsT{X@z0A9Bq>~TVErigKH1~P zRX-!h-f0NJ4Mh++{D}J+K>~~rq}d%o%+4dogzXp7RxX4C>Km5XEI|PAFDmo;DFm6G zzjVoB`@qW98Yl0Kvc-9w09^PrsobmG*Eju^=3f?0o-t$U)TL1B3;sZ^!++3&bGZ!o-*6w?;oOhf z=A+Qb$scV5!RbG+&2S}BQ6YH!FKb0``VVX~T$dzzeSZ$&9=X$3)_7Z{SspSYJ!lGE z7yig_41zpQ)%5dr4ff0rh$@ky3-JLRk&DK)NEIHecf9c*?Z1bUB4%pZjQ7hD!A0r-@NF(^WKdr(LXj|=UE7?gBYGgGQV zidf2`ZT@pzXf7}!NH4q(0IMcxsUGDih(0{kRSez&z?CFA0RVXsVFw3^u=^KMtt95q z43q$b*6#uQDLoiCAF_{RFc{!H^moH_cmll#Fc^KXi{9GDl{>%+3qyfOE5;Zq|6#Hb zp^#1G+z^AXfRKaa9HK;%b3Ux~U@q?xg<2DXP%6k!3E)PA<#4$ui8eDy5|9hA5&{?v z(-;*1%(1~-NTQ`Is1_MGdQ{+i*ccd96ab$R$T3=% zw_KuNF@vI!A>>Y_2pl9L{9h1-C6H8<)J4gKI6{WzGBi<@u3P6hNsXG=bRq5c+z;Gc3VUCe;LIIFDmQAGy+=mRyF++u=drBWV8-^>0yE9N&*05XHZpPlE zxu@?8(ZNy7rm?|<+UNe0Vs6&o?l`Pt>P&WaL~M&#Eh%`rg@Mbb)J&@DA-wheQ>hRV z<(XhigZAT z>=M;URcdCaiO3d^?H<^EiEMDV+7HsTiOhoaMX%P65E<(5xMPJKxf!0u>U~uVqnPN7T!X!o@_gs3Ct1 zlZ_$5QXP4{Aj645wG_SNT&6m|O6~Tsl$q?nK*)(`{J4b=(yb^nOATtF1_aS978$x3 zx>Q@s4i3~IT*+l{@dx~Hst21fR*+5}S1@cf>&8*uLw-0^zK(+OpW?cS-YG1QBZ5q! zgTAgivzoF#`cSz&HL>Ti!!v#?36I1*l^mkrx7Y|K6L#n!-~5=d3;K<;Zqi|gpNUn_ z_^GaQDEQ*jfzh;`j&KXb66fWEk1K7vxQIMQ_#Wu_%3 z4Oeb7FJ`8I>Px;^S?)}2+4D_83gHEq>8qSQY0PVP?o)zAv3K~;R$fnwTmI-=ZLK`= zTm+0h*e+Yfr(IlH3i7gUclNH^!MU>id$Jw>O?2i0Cila#v|twub21@e{S2v}8Z13( zNDrTXZVgris|qYm<0NU(tAPouG!QF4ZNpZPkX~{tVf8xY690JqY1NVdiTtW+NqyRP zZ&;T0ikb8V{wxmFhlLTQ&?OP7 z;(z*<+?J2~z*6asSe7h`$8~Se(@t(#%?BGLVs$p``;CyvcT?7Y!{tIPva$LxCQ&4W z6v#F*);|RXvI%qnoOY&i4S*EL&h%hP3O zLsrFZhv&Hu5tF$Lx!8(hs&?!Kx5&L(fdu}UI5d*wn~A`nPUhG&Rv z2#ixiJdhSF-K2tpVL=)5UkXRuPAFrEW}7mW=uAmtVQ&pGE-&az6@#-(Te^n*lrH^m@X-ftVcwO_#7{WI)5v(?>uC9GG{lcGXYJ~Q8q zbMFl7;t+kV;|;KkBW2!P_o%Czhw&Q(nXlxK9ak&6r5t_KH8#1Mr-*0}2h8R9XNkr zto5-b7P_auqTJb(TJlmJ9xreA=6d=d)CVbYP-r4$hDn5|TIhB>SReMfh&OVLkMk-T zYf%$taLF0OqYF?V{+6Xkn>iX@TuqQ?&cN6UjC9YF&%q{Ut3zv{U2)~$>-3;Dp)*(? zg*$mu8^i=-e#acaj*T$pNowo{xiGEk$%DusaQiS!KjJH96XZ-hXv+jk%ard#fu=@Q z$AM)YWvE^{%tDfK%nD49=PI|wYu}lYVbB#a7wtN^Nml@CE@{Gv7+jo{_V?I*jkdLD zJE|jfdrmVbkfS>rN*+`#l%ZUi5_bMS<>=MBDNlpiSb_tAF|Zy`K7kcp@|d?yaTmB^ zo?(vg;B$vxS|SszusORgDg-*Uitzdi{dUV+glA~R8V(?`3GZIl^egW{a919!j#>f` znL1o_^-b`}xnU0+~KIFLQ)$Q6#ym%)(GYC`^XM*{g zv3AM5$+TtDRs%`2TyR^$(hqE7Y1b&`Jd6dS6B#hDVbJlUXcG3y*439D8MrK!2D~6gn>UD4Imctb z+IvAt0iaW73Iq$K?4}H`7wq6YkTMm`tcktXgK0lKPmh=>h+l}Y+pDtvHnG>uqBA)l zAH6BV4F}v$(o$8Gfo*PB>IuaY1*^*`OTx4|hM8jZ?B6HY;F6p4{`OcZZ(us-RVwDx zUzJrCQlp@mz1ZFiSZ*$yX3c_#h9J;yBE$2g%xjmGF4ca z&yL`nGVs!Zxsh^j6i%$a*I3ZD2SoNT`{D%mU=LKaEwbN(_J5%i-6Va?@*>=3(dQy` zOv%$_9lcy9+(t>qohkuU4r_P=R^6ME+wFu&LA9tw9RA?azGhjrVJKy&8=*qZT5Dr8g--d+S8zAyJ$1HlW3Olryt`yE zFIph~Z6oF&o64rw{>lgZISC6p^CBer9C5G6yq%?8tC+)7*d+ib^?fU!JRFxynRLEZ zj;?PwtS}Ao#9whV@KEmwQgM0TVP{hs>dg(1*DiMUOKHdQGIqa0`yZnHk9mtbPfoLx zo;^V6pKUJ!5#n`w2D&381#5#_t}AlTGEgDz$^;u;-vxDN?^#5!zN9ngytY@oTv!nc zp1Xn8uR$1Z;7vY`-<*?DfPHB;x|GUi_fI9@I9SVRv1)qETbNU_8{5U|(>Du84qP#7 z*l9Y$SgA&wGbj>R1YeT9vYjZuC@|{rajTL0f%N@>3$DFU=`lSPl=Iv;EjuGjBa$Gw zHD-;%YOE@<-!7-Mn`0WuO3oWuL6tB2cpPw~Nvuj|KM@))ixuDK`9;jGMe2d)7gHin zS<>k@!x;!TJEc#HdL#RF(`|4W+H88d4V%zlh(7#{q2d0OQX9*FW^`^_<3r$kabWAB z$9BONo5}*(%kx zOXi-yM_cmB3>inPpI~)duvZykJ@^^aWzQ=eQ&STUa}2uT@lV&WoRzkUoE`rR0)`=l zFT%f|LA9fCw>`enm$p7W^E@U7RNBtsh{_-7vVz3DtB*y#*~(L9+x9*wn8VjWw|Q~q zKFsj1Yl>;}%MG3=PY`$g$_mnyhuV&~O~u~)968$0b2!Jkd;2MtAP#ZDYw9hmK_+M$ zb3pxyYC&|CuAbtiG8HZjj?MZJBFbt`ryf+c1dXFuC z0*ZQhBzNBd*}s6K_G}(|Z_9NDV162#y%WSNe|FTDDhx)K!c(mMJh@h87@8(^YdK$&d*^WQe8Z53 z(|@MRJ$Lk-&ii74MPIs80WsOFZ(NX23oR-?As+*aq6b?~62@fSVmM-_*cb1RzZ)`5$agEiL`-E9s7{GM2?(KNPgK1(+c*|-FKoy}X(D_b#etO|YR z(BGZ)0Ntfv-7R4GHoXp?l5g#*={S1{u-QzxCGng*oWr~@X-5f~RA14b8~B+pLKvr4 zfgL|7I>jlak9>D4=(i(cqYf7#318!OSR=^`xxvI!bBlS??`xxWeg?+|>MxaIdH1U~#1tHu zB{QMR?EGRmQ_l4p6YXJ{o(hh-7Tdm>TAX380TZZZyVkqHNzjUn*_|cb?T? zt;d2s-?B#Mc>T-gvBmQZx(y_cfkXZO~{N zT6rP7SD6g~n9QJ)8F*8uHxTLCAZ{l1Y&?6v)BOJZ)=R-pY=Y=&1}jE7fQ>USS}xP#exo57uND0i*rEk@$;nLvRB@u~s^dwRf?G?_enN@$t* zbL%JO=rV(3Ju8#GqUpeE3l_Wu1lN9Y{D4uaUe`g>zlj$1ER$6S6@{m1!~V|bYkhZA z%CvrDRTkHuajMU8;&RZ&itnC~iYLW4DVkP<$}>#&(`UO>!n)Po;Mt(SY8Yb`AS9lt znbX^i?Oe9r_o=?})IHKHoQGKXsps_SE{hwrg?6dMI|^+$CeC&z@*LuF+P`7LfZ*yr+KN8B4{Nzv<`A(wyR@!|gw{zB6Ha ziwPAYh)oJ(nlqSknu(8g9N&1hu0$vFK$W#mp%>X~AU1ay+EKWcFdif{% z#4!4aoVVJ;ULmkQf!ke2}3hqxLK>eq|-d7Ly7-J9zMpT`?dxo6HdfJA|t)?qPEVBDv z{y_b?4^|YA4%WW0VZd8C(ZgQzRI5(I^)=Ub`Y#MHc@nv0w-DaJAqsbEHDWG8Ia6ju zo-iyr*sq((gEwCC&^TYBWt4_@|81?=B-?#P6NMff(*^re zYqvDuO`K@`mjm_Jd;mW_tP`3$cS?R$jR1ZN09$YO%_iBqh5ftzSpMQQtxKFU=FYmP zeY^jph+g<4>YO;U^O>-NFLn~-RqlHvnZl2yd2A{Yc1G@Ga$d+Q&(f^tnPf+Z7serIU};17+2DU_f4Z z@GaPFut27d?!YiD+QP@)T=77cR9~MK@bd~pY%X(h%L={{OIb8IQmf-!xmZkm8A0Ga zQSWONI17_ru5wpHg3jI@i9D+_Y|pCqVuHJNdHUauTD=R$JcD2K_liQisqG$(sm=k9;L* z!L?*4B~ql7uioSX$zWJ?;q-SWXRFhz2Jt4%fOHA=Bwf|RzhwqdXGr78y$J)LR7&3T zE1WWz*>GPWKZ0%|@%6=fyx)5rzUpI;bCj>3RKzNG_1w$fIFCZ&UR0(7S?g}`&Pg$M zf`SLsz8wK82Vyj7;RyKmY{a8G{2BHG%w!^T|Njr!h9TO2LaP^_f22Q1=l$QiU84ao zHe_#{S6;qrC6w~7{y(hs-?-j?lbOfgH^E=XcSgnwW*eEz{_Z<_Px$?ny*JR5%f>l)FnDQ543{x%ZCiu33$Wg!pQFfT_}?5Q|_VSlIbLC`dpoMXL}9 zHfd9&47Mo(7D231gb+kjFxZHS4-m~7WurTH&doVX2KI5sU4v(sJ1@T9eCIKPjsqSr z)C01LsCxk=72-vXmX}CQD#BD;Cthymh&~=f$Q8nn0J<}ZrusBy4PvRNE}+1ceuj8u z0mW5k8fmgeLnTbWHGwfKA3@PdZxhn|PypR&^p?weGftrtCbjF#+zk_5BJh7;0`#Wr zgDpM_;Ax{jO##IrT`Oz;MvfwGfV$zD#c2xckpcXC6oou4ML~ezCc2EtnsQTB4tWNg z?4bkf;hG7IMfhgNI(FV5Gs4|*GyMTIY0$B=_*mso9Ityq$m^S>15>-?0(zQ<8Qy<_TjHE33(?_M8oaM zyc;NxzRVK@DL6RJnX%U^xW0Gpg(lXp(!uK1v0YgHjs^ZXSQ|m#lV7ip7{`C_J2TxPmfw%h$|%acrYHt)Re^PB%O&&=~a zhS(%I#+V>J-vjIib^<+s%ludY7y^C(P8nmqn9fp!i+?vr`bziDE=bx`%2W#Xyrj|i z!XQ4v1%L`m{7KT7q+LZNB^h8Ha2e=`Wp65^0;J00)_^G=au=8Yo;1b`CV&@#=jIBo zjN^JNVfYSs)+kDdGe7`1&8!?MQYKS?DuHZf3iogk_%#9E|5S zWeHrmAo>P;ejX7mwq#*}W25m^ZI+{(Z8fI?4jM_fffY0nok=+88^|*_DwcW>mR#e+ zX$F_KMdb6sRz!~7KkyN0G(3XQ+;z3X%PZ4gh;n-%62U<*VUKNv(D&Q->Na@Xb&u5Q3`3DGf+a8O5x7c#7+R+EAYl@R5us)CIw z7sT@_y~Ao@uL#&^LIh&QceqiT^+lb0YbFZt_SHOtWA%mgPEKVNvVgCsXy{5+zl*X8 zCJe)Q@y>wH^>l4;h1l^Y*9%-23TSmE>q5nI@?mt%n;Sj4Qq`Z+ib)a*a^cJc%E9^J zB;4s+K@rARbcBLT5P=@r;IVnBMKvT*)ew*R;&8vu%?Z&S>s?8?)3*YawM0P4!q$Kv zMmKh3lgE~&w&v%wVzH3Oe=jeNT=n@Y6J6TdHWTjXfX~-=1A1Bw`EW8rn}MqeI34nh zexFeA?&C3B2(E?0{drE@DA2pu(A#ElY&6el60Rn|Qpn-FkfQ8M93AfWIr)drgDFEU zghdWK)^71EWCP(@(=c4kfH1Y(4iugD4fve6;nSUpLT%!)MUHs1!zJYy4y||C+SwQ! z)KM&$7_tyM`sljP2fz6&Z;jxRn{Wup8IOUx8D4uh&(=O zx-7$a;U><*5L^!%xRlw)vAbh;sdlR||& ze}8_8%)c2Fwy=F&H|LM+p{pZB5DKTx>Y?F1N%BlZkXf!}JeGuMZk~LPi7{cidvUGB zAJ4LVeNV%XO>LTrklB#^-;8nb;}6l;1oW&WS=Mz*Az!4cqqQzbOSFq`$Q%PfD7srM zpKgP-D_0XPTRX*hAqeq0TDkJ;5HB1%$3Np)99#16c{ zJImlNL(npL!W|Gr_kxl1GVmF5&^$^YherS7+~q$p zt}{a=*RiD2Ikv6o=IM1kgc7zqpaZ;OB)P!1zz*i3{U()Dq#jG)egvK}@uFLa`oyWZ zf~=MV)|yJn`M^$N%ul5);JuQvaU1r2wt(}J_Qgyy`qWQI`hEeRX0uC@c1(dQ2}=U$ tNIIaX+dr)NRWXcxoR{>fqI{SF_dm1Ylv~=3YHI)h002ovPDHLkV1g(pWS;;4 literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..f091b6b0bca859a3f474b03065bef75ba58a9e4c GIT binary patch literal 1588 zcmV-42Fv-0P)C1SqPt}wig>|5Crh^=oyX$BK<}M8eLU3e2hGT;=G|!_SP)7zNI6fqUMB=)y zRAZ>eDe#*r`yDAVgB_R*LB*MAc)8(b{g{9McCXW!lq7r(btRoB9!8B-#AI6JMb~YFBEvdsV)`mEQO^&#eRKx@b&x- z5lZm*!WfD8oCLzfHGz#u7sT0^VLMI1MqGxF^v+`4YYnVYgk*=kU?HsSz{v({E3lb9 z>+xILjBN)t6`=g~IBOelGQ(O990@BfXf(DRI5I$qN$0Gkz-FSc$3a+2fX$AedL4u{ z4V+5Ong(9LiGcIKW?_352sR;LtDPmPJXI{YtT=O8=76o9;*n%_m|xo!i>7$IrZ-{l z-x3`7M}qzHsPV@$v#>H-TpjDh2UE$9g6sysUREDy_R(a)>=eHw-WAyfIN z*qb!_hW>G)Tu8nSw9yn#3wFMiLcfc4pY0ek1}8(NqkBR@t4{~oC>ryc-h_ByH(Cg5 z>ao-}771+xE3um9lWAY1FeQFxowa1(!J(;Jg*wrg!=6FdRX+t_<%z&d&?|Bn){>zm zZQj(aA_HeBY&OC^jj*)N`8fa^ePOU72VpInJoI1?`ty#lvlNzs(&MZX+R%2xS~5Kh zX*|AU4QE#~SgPzOXe9>tRj>hjU@c1k5Y_mW*Jp3fI;)1&g3j|zDgC+}2Q_v%YfDax z!?umcN^n}KYQ|a$Lr+51Nf9dkkYFSjZZjkma$0KOj+;aQ&721~t7QUKx61J3(P4P1 zstI~7-wOACnWP4=8oGOwz%vNDqD8w&Q`qcNGGrbbf&0s9L0De{4{mRS?o0MU+nR_! zrvshUau0G^DeMhM_v{5BuLjb#Hh@r23lDAk8oF(C+P0rsBpv85EP>4CVMx#04MOfG z;P%vktHcXwTj~+IE(~px)3*MY77e}p#|c>TD?sMatC0Tu4iKKJ0(X8jxQY*gYtxsC z(zYC$g|@+I+kY;dg_dE>scBf&bP1Nc@Hz<3R)V`=AGkc;8CXqdi=B4l2k|g;2%#m& z*jfX^%b!A8#bI!j9-0Fi0bOXl(-c^AB9|nQaE`*)Hw+o&jS9@7&Gov#HbD~#d{twV zXd^Tr^mWLfFh$@Dr$e;PBEz4(-2q1FF0}c;~B5sA}+Q>TOoP+t>wf)V9Iy=5ruQa;z)y zI9C9*oUga6=hxw6QasLPnee@3^Rr*M{CdaL5=R41nLs(AHk_=Y+A9$2&H(B7!_pURs&8aNw7?`&Z&xY_Ye z)~D5Bog^td-^QbUtkTirdyK^mTHAOuptDflut!#^lnKqU md>ggs(5nOWAqO?umG&QVYK#ibz}*4>0000U6E9hRK9^#O7(mu>ETqrXGsduA8$)?`v2seloOCza43C{NQ$$gAOH**MCn0Q?+L7dl7qnbRdqZ8LSVp1ItDxhxD?t@5_yHg6A8yI zC*%Wgg22K|8E#!~cTNYR~@Y9KepMPrrB8cABapAFa=`H+UGhkXUZV1GnwR1*lPyZ;*K(i~2gp|@bzp8}og7e*#% zEnr|^CWdVV!-4*Y_7rFvlww2Ze+>j*!Z!pQ?2l->4q#nqRu9`ELo6RMS5=br47g_X zRw}P9a7RRYQ%2Vsd0Me{_(EggTnuN6j=-?uFS6j^u69elMypu?t>op*wBx<=Wx8?( ztpe^(fwM6jJX7M-l*k3kEpWOl_Vk3@(_w4oc}4YF4|Rt=2V^XU?#Yz`8(e?aZ@#li0n*=g^qOcVpd-Wbok=@b#Yw zqn8u9a)z>l(1kEaPYZ6hwubN6i<8QHgsu0oE) ziJ(p;Wxm>sf!K+cw>R-(^Y2_bahB+&KI9y^);#0qt}t-$C|Bo71lHi{_+lg#f%RFy z0um=e3$K3i6K{U_4K!EX?F&rExl^W|G8Z8;`5z-k}OGNZ0#WVb$WCpQu-_YsiqKP?BB# vzVHS-CTUF4Ozn5G+mq_~Qqto~ahA+K`|lyv3(-e}00000NkvXXu0mjfd`9t{ literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..d0ef06e7edb86cdfe0d15b4b0d98334a86163658 GIT binary patch literal 1716 zcmds$`#;kQ7{|XelZftyR5~xW7?MLxS4^|Hw3&P7^y)@A9Fj{Xm1~_CIV^XZ%SLBn zA;!r`GqGHg=7>xrB{?psZQs88ZaedDoagm^KF{a*>G|dJWRSe^I$DNW008I^+;Kjt z>9p3GNR^I;v>5_`+91i(*G;u5|L+Bu6M=(afLjtkya#yZ175|z$pU~>2#^Z_pCZ7o z1c6UNcv2B3?; zX%qdxCXQpdKRz=#b*q0P%b&o)5ZrNZt7$fiETSK_VaY=mb4GK`#~0K#~9^ zcY!`#Af+4h?UMR-gMKOmpuYeN5P*RKF!(tb`)oe0j2BH1l?=>y#S5pMqkx6i{*=V9JF%>N8`ewGhRE(|WohnD59R^$_36{4>S zDFlPC5|k?;SPsDo87!B{6*7eqmMdU|QZ84>6)Kd9wNfh90=y=TFQay-0__>=<4pk& zYDjgIhL-jQ9o>z32K)BgAH+HxamL{ZL~ozu)Qqe@a`FpH=oQRA8=L-m-1dam(Ix2V z?du;LdMO+ooBelr^_y4{|44tmgH^2hSzPFd;U^!1p>6d|o)(-01z{i&Kj@)z-yfWQ)V#3Uo!_U}q3u`(fOs`_f^ueFii1xBNUB z6MecwJN$CqV&vhc+)b(p4NzGGEgwWNs z@*lUV6LaduZH)4_g!cE<2G6#+hJrWd5(|p1Z;YJ7ifVHv+n49btR}dq?HHDjl{m$T z!jLZcGkb&XS2OG~u%&R$(X+Z`CWec%QKt>NGYvd5g20)PU(dOn^7%@6kQb}C(%=vr z{?RP(z~C9DPnL{q^@pVw@|Vx~@3v!9dCaBtbh2EdtoNHm4kGxp>i#ct)7p|$QJs+U z-a3qtcPvhihub?wnJqEt>zC@)2suY?%-96cYCm$Q8R%-8$PZYsx3~QOLMDf(piXMm zB=<63yQk1AdOz#-qsEDX>>c)EES%$owHKue;?B3)8aRd}m~_)>SL3h2(9X;|+2#7X z+#2)NpD%qJvCQ0a-uzZLmz*ms+l*N}w)3LRQ*6>|Ub-fyptY(keUxw+)jfwF5K{L9 z|Cl_w=`!l_o><384d&?)$6Nh(GAm=4p_;{qVn#hI8lqewW7~wUlyBM-4Z|)cZr?Rh z=xZ&Ol>4(CU85ea(CZ^aO@2N18K>ftl8>2MqetAR53_JA>Fal`^)1Y--Am~UDa4th zKfCYpcXky$XSFDWBMIl(q=Mxj$iMBX=|j9P)^fDmF(5(5$|?Cx}DKEJa&XZP%OyE`*GvvYQ4PV&!g2|L^Q z?YG}tx;sY@GzMmsY`7r$P+F_YLz)(e}% zyakqFB<6|x9R#TdoP{R$>o7y(-`$$p0NxJ6?2B8tH)4^yF(WhqGZlM3=9Ibs$%U1w zWzcss*_c0=v_+^bfb`kBFsI`d;ElwiU%frgRB%qBjn@!0U2zZehBn|{%uNIKBA7n= zzE`nnwTP85{g;8AkYxA68>#muXa!G>xH22D1I*SiD~7C?7Za+9y7j1SHiuSkKK*^O zsZ==KO(Ua#?YUpXl{ViynyT#Hzk=}5X$e04O@fsMQjb}EMuPWFO0e&8(2N(29$@Vd zn1h8Yd>6z(*p^E{c(L0Lg=wVdupg!z@WG;E0k|4a%s7Up5C0c)55XVK*|x9RQeZ1J@1v9MX;>n34(i>=YE@Iur`0Vah(inE3VUFZNqf~tSz{1fz3Fsn_x4F>o(Yo;kpqvBe-sbwH(*Y zu$JOl0b83zu$JMvy<#oH^Wl>aWL*?aDwnS0iEAwC?DK@aT)GHRLhnz2WCvf3Ba;o=aY7 z2{Asu5MEjGOY4O#Ggz@@J;q*0`kd2n8I3BeNuMmYZf{}pg=jTdTCrIIYuW~luKecn z+E-pHY%ohj@uS0%^ z&(OxwPFPD$+#~`H?fMvi9geVLci(`K?Kj|w{rZ9JgthFHV+=6vMbK~0)Ea<&WY-NC zy-PnZft_k2tfeQ*SuC=nUj4H%SQ&Y$gbH4#2sT0cU0SdFs=*W*4hKGpuR1{)mV;Qf5pw4? zfiQgy0w3fC*w&Bj#{&=7033qFR*<*61B4f9K%CQvxEn&bsWJ{&winp;FP!KBj=(P6 z4Z_n4L7cS;ao2)ax?Tm|I1pH|uLpDSRVghkA_UtFFuZ0b2#>!8;>-_0ELjQSD-DRd z4im;599VHDZYtnWZGAB25W-e(2VrzEh|etsv2YoP#VbIZ{aFkwPrzJ#JvCvA*mXS& z`}Q^v9(W4GiSs}#s7BaN!WA2bniM$0J(#;MR>uIJ^uvgD3GS^%*ikdW6-!VFUU?JV zZc2)4cMsX@j z5HQ^e3BUzOdm}yC-xA%SY``k$rbfk z;CHqifhU*jfGM@DkYCecD9vl*qr58l6x<8URB=&%{!Cu3RO*MrKZ4VO}V6R0a zZw3Eg^0iKWM1dcTYZ0>N899=r6?+adUiBKPciJw}L$=1f4cs^bio&cr9baLF>6#BM z(F}EXe-`F=f_@`A7+Q&|QaZ??Txp_dB#lg!NH=t3$G8&06MFhwR=Iu*Im0s_b2B@| znW>X}sy~m#EW)&6E&!*0%}8UAS)wjt+A(io#wGI@Z2S+Ms1Cxl%YVE800007ip7{`C_J2TxPmfw%h$|%acrYHt)Re^PB%O&&=~a zhS(%I#+V>J-vjIib^<+s%ludY7y^C(P8nmqn9fp!i+?vr`bziDE=bx`%2W#Xyrj|i z!XQ4v1%L`m{7KT7q+LZNB^h8Ha2e=`Wp65^0;J00)_^G=au=8Yo;1b`CV&@#=jIBo zjN^JNVfYSs)+kDdGe7`1&8!?MQYKS?DuHZf3iogk_%#9E|5S zWeHrmAo>P;ejX7mwq#*}W25m^ZI+{(Z8fI?4jM_fffY0nok=+88^|*_DwcW>mR#e+ zX$F_KMdb6sRz!~7KkyN0G(3XQ+;z3X%PZ4gh;n-%62U<*VUKNv(D&Q->Na@Xb&u5Q3`3DGf+a8O5x7c#7+R+EAYl@R5us)CIw z7sT@_y~Ao@uL#&^LIh&QceqiT^+lb0YbFZt_SHOtWA%mgPEKVNvVgCsXy{5+zl*X8 zCJe)Q@y>wH^>l4;h1l^Y*9%-23TSmE>q5nI@?mt%n;Sj4Qq`Z+ib)a*a^cJc%E9^J zB;4s+K@rARbcBLT5P=@r;IVnBMKvT*)ew*R;&8vu%?Z&S>s?8?)3*YawM0P4!q$Kv zMmKh3lgE~&w&v%wVzH3Oe=jeNT=n@Y6J6TdHWTjXfX~-=1A1Bw`EW8rn}MqeI34nh zexFeA?&C3B2(E?0{drE@DA2pu(A#ElY&6el60Rn|Qpn-FkfQ8M93AfWIr)drgDFEU zghdWK)^71EWCP(@(=c4kfH1Y(4iugD4fve6;nSUpLT%!)MUHs1!zJYy4y||C+SwQ! z)KM&$7_tyM`sljP2fz6&Z;jxRn{Wup8IOUx8D4uh&(=O zx-7$a;U><*5L^!%xRlw)vAbh;sdlR||& ze}8_8%)c2Fwy=F&H|LM+p{pZB5DKTx>Y?F1N%BlZkXf!}JeGuMZk~LPi7{cidvUGB zAJ4LVeNV%XO>LTrklB#^-;8nb;}6l;1oW&WS=Mz*Az!4cqqQzbOSFq`$Q%PfD7srM zpKgP-D_0XPTRX*hAqeq0TDkJ;5HB1%$3Np)99#16c{ zJImlNL(npL!W|Gr_kxl1GVmF5&^$^YherS7+~q$p zt}{a=*RiD2Ikv6o=IM1kgc7zqpaZ;OB)P!1zz*i3{U()Dq#jG)egvK}@uFLa`oyWZ zf~=MV)|yJn`M^$N%ul5);JuQvaU1r2wt(}J_Qgyy`qWQI`hEeRX0uC@c1(dQ2}=U$ tNIIaX+dr)NRWXcxoR{>fqI{SF_dm1Ylv~=3YHI)h002ovPDHLkV1g(pWS;;4 literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..c8f9ed8f5cee1c98386d13b17e89f719e83555b2 GIT binary patch literal 1895 zcmV-t2blPYP)FQtfgmafE#=YDCq`qUBt#QpG%*H6QHY765~R=q zZ6iudfM}q!Pz#~9JgOi8QJ|DSu?1-*(kSi1K4#~5?#|rh?sS)(-JQqX*}ciXJ56_H zdw=^s_srbAdqxlvGyrgGet#6T7_|j;95sL%MtM;q86vOxKM$f#puR)Bjv9Zvz9-di zXOTSsZkM83)E9PYBXC<$6(|>lNLVBb&&6y{NByFCp%6+^ALR@NCTse_wqvNmSWI-m z!$%KlHFH2omF!>#%1l3LTZg(s7eof$7*xB)ZQ0h?ejh?Ta9fDv59+u#MokW+1t8Zb zgHv%K(u9G^Lv`lh#f3<6!JVTL3(dCpxHbnbA;kKqQyd1~^Xe0VIaYBSWm6nsr;dFj z4;G-RyL?cYgsN1{L4ZFFNa;8)Rv0fM0C(~Tkit94 zz#~A)59?QjD&pAPSEQ)p8gP|DS{ng)j=2ux)_EzzJ773GmQ_Cic%3JJhC0t2cx>|v zJcVusIB!%F90{+}8hG3QU4KNeKmK%T>mN57NnCZ^56=0?&3@!j>a>B43pi{!u z7JyDj7`6d)qVp^R=%j>UIY6f+3`+qzIc!Y_=+uN^3BYV|o+$vGo-j-Wm<10%A=(Yk^beI{t%ld@yhKjq0iNjqN4XMGgQtbKubPM$JWBz}YA65k%dm*awtC^+f;a-x4+ddbH^7iDWGg&N0n#MW{kA|=8iMUiFYvMoDY@sPC#t$55gn6ykUTPAr`a@!(;np824>2xJthS z*ZdmT`g5-`BuJs`0LVhz+D9NNa3<=6m;cQLaF?tCv8)zcRSh66*Z|vXhG@$I%U~2l z?`Q zykI#*+rQ=z6Jm=Bui-SfpDYLA=|vzGE(dYm=OC8XM&MDo7ux4UF1~0J1+i%aCUpRe zt3L_uNyQ*cE(38Uy03H%I*)*Bh=Lb^Xj3?I^Hnbeq72(EOK^Y93CNp*uAA{5Lc=ky zx=~RKa4{iTm{_>_vSCm?$Ej=i6@=m%@VvAITnigVg{&@!7CDgs908761meDK5azA} z4?=NOH|PdvabgJ&fW2{Mo$Q0CcD8Qc84%{JPYt5EiG{MdLIAeX%T=D7NIP4%Hw}p9 zg)==!2Lbp#j{u_}hMiao9=!VSyx0gHbeCS`;q&vzeq|fs`y&^X-lso(Ls@-706qmA z7u*T5PMo_w3{se1t2`zWeO^hOvTsohG_;>J0wVqVe+n)AbQCx)yh9;w+J6?NF5Lmo zecS@ieAKL8%bVd@+-KT{yI|S}O>pYckUFs;ry9Ow$CD@ztz5K-*D$^{i(_1llhSh^ zEkL$}tsQt5>QA^;QgjgIfBDmcOgi5YDyu?t6vSnbp=1+@6D& z5MJ}B8q;bRlVoxasyhcUF1+)o`&3r0colr}QJ3hcSdLu;9;td>kf@Tcn<@9sIx&=m z;AD;SCh95=&p;$r{Xz3iWCO^MX83AGJ(yH&eTXgv|0=34#-&WAmw{)U7OU9!Wz^!7 zZ%jZFi@JR;>Mhi7S>V7wQ176|FdW2m?&`qa(ScO^CFPR80HucLHOTy%5s*HR0^8)i h0WYBP*#0Ks^FNSabJA*5${_#%002ovPDHLkV1oKhTl@e3 literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..a6d6b8609df07bf62e5100a53a01510388bd2b22 GIT binary patch literal 2665 zcmV-v3YPVWP)oFh3q0MFesq&64WThn3$;G69TfjsAv=f2G9}p zgSx99+!YV6qME!>9MD13x)k(+XE7W?_O4LoLb5ND8 zaV{9+P@>42xDfRiYBMSgD$0!vssptcb;&?u9u(LLBKmkZ>RMD=kvD3h`sk6!QYtBa ztlZI#nu$8lJ^q2Z79UTgZe>BU73(Aospiq+?SdMt8lDZ;*?@tyWVZVS_Q7S&*tJaiRlJ z+aSMOmbg3@h5}v;A*c8SbqM3icg-`Cnwl;7Ts%A1RkNIp+Txl-Ckkvg4oxrqGA5ewEgYqwtECD<_3Egu)xGllKt&J8g&+=ac@Jq4-?w6M3b*>w5 z69N3O%=I^6&UL5gZ!}trC7bUj*12xLdkNs~Bz4QdJJ*UDZox2UGR}SNg@lmOvhCc~ z*f_UeXv(=#I#*7>VZx2ObEN~UoGUTl=-@)E;YtCRZ>SVp$p9yG5hEFZ!`wI!spd)n zSk+vK0Vin7FL{7f&6OB%f;SH22dtbcF<|9fi2Fp%q4kxL!b1#l^)8dUwJ zwEf{(wJj@8iYDVnKB`eSU+;ml-t2`@%_)0jDM`+a46xhDbBj2+&Ih>1A>6aky#(-SYyE{R3f#y57wfLs z6w1p~$bp;6!9DX$M+J~S@D6vJAaElETnsX4h9a5tvPhC3L@qB~bOzkL@^z0k_hS{T4PF*TDrgdXp+dzsE? z>V|VR035Pl9n5&-RePFdS{7KAr2vPOqR9=M$vXA1Yy5>w;EsF`;OK{2pkn-kpp9Pw z)r;5JfJKKaT$4qCb{TaXHjb$QA{y0EYy*+b1XI;6Ah- zw13P)xT`>~eFoJC!>{2XL(a_#upp3gaR1#5+L(Jmzp4TBnx{~WHedpJ1ch8JFk~Sw z>F+gN+i+VD?gMXwcIhn8rz`>e>J^TI3E-MW>f}6R-pL}>WMOa0k#jN+`RyUVUC;#D zg|~oS^$6%wpF{^Qr+}X>0PKcr3Fc&>Z>uv@C);pwDs@2bZWhYP!rvGx?_|q{d`t<*XEb#=aOb=N+L@CVBGqImZf&+a zCQEa3$~@#kC);pasdG=f6tuIi0PO-y&tvX%>Mv=oY3U$nD zJ#gMegnQ46pq+3r=;zmgcG+zRc9D~c>z+jo9&D+`E6$LmyFqlmCYw;-Zooma{sR@~ z)_^|YL1&&@|GXo*pivH7k!msl+$Sew3%XJnxajt0K%3M6Bd&YFNy9}tWG^aovK2eX z1aL1%7;KRDrA@eG-Wr6w+;*H_VD~qLiVI`{_;>o)k`{8xa3EJT1O_>#iy_?va0eR? zDV=N%;Zjb%Z2s$@O>w@iqt!I}tLjGk!=p`D23I}N4Be@$(|iSA zf3Ih7b<{zqpDB4WF_5X1(peKe+rASze%u8eKLn#KKXt;UZ+Adf$_TO+vTqshLLJ5c z52HucO=lrNVae5XWOLm!V@n-ObU11!b+DN<$RuU+YsrBq*lYT;?AwJpmNKniF0Q1< zJCo>Q$=v$@&y=sj6{r!Y&y&`0$-I}S!H_~pI&2H8Z1C|BX4VgZ^-! zje3-;x0PBD!M`v*J_)rL^+$<1VJhH*2Fi~aA7s&@_rUHYJ9zD=M%4AFQ`}k8OC$9s XsPq=LnkwKG00000NkvXXu0mjfhAk5^ literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..a6d6b8609df07bf62e5100a53a01510388bd2b22 GIT binary patch literal 2665 zcmV-v3YPVWP)oFh3q0MFesq&64WThn3$;G69TfjsAv=f2G9}p zgSx99+!YV6qME!>9MD13x)k(+XE7W?_O4LoLb5ND8 zaV{9+P@>42xDfRiYBMSgD$0!vssptcb;&?u9u(LLBKmkZ>RMD=kvD3h`sk6!QYtBa ztlZI#nu$8lJ^q2Z79UTgZe>BU73(Aospiq+?SdMt8lDZ;*?@tyWVZVS_Q7S&*tJaiRlJ z+aSMOmbg3@h5}v;A*c8SbqM3icg-`Cnwl;7Ts%A1RkNIp+Txl-Ckkvg4oxrqGA5ewEgYqwtECD<_3Egu)xGllKt&J8g&+=ac@Jq4-?w6M3b*>w5 z69N3O%=I^6&UL5gZ!}trC7bUj*12xLdkNs~Bz4QdJJ*UDZox2UGR}SNg@lmOvhCc~ z*f_UeXv(=#I#*7>VZx2ObEN~UoGUTl=-@)E;YtCRZ>SVp$p9yG5hEFZ!`wI!spd)n zSk+vK0Vin7FL{7f&6OB%f;SH22dtbcF<|9fi2Fp%q4kxL!b1#l^)8dUwJ zwEf{(wJj@8iYDVnKB`eSU+;ml-t2`@%_)0jDM`+a46xhDbBj2+&Ih>1A>6aky#(-SYyE{R3f#y57wfLs z6w1p~$bp;6!9DX$M+J~S@D6vJAaElETnsX4h9a5tvPhC3L@qB~bOzkL@^z0k_hS{T4PF*TDrgdXp+dzsE? z>V|VR035Pl9n5&-RePFdS{7KAr2vPOqR9=M$vXA1Yy5>w;EsF`;OK{2pkn-kpp9Pw z)r;5JfJKKaT$4qCb{TaXHjb$QA{y0EYy*+b1XI;6Ah- zw13P)xT`>~eFoJC!>{2XL(a_#upp3gaR1#5+L(Jmzp4TBnx{~WHedpJ1ch8JFk~Sw z>F+gN+i+VD?gMXwcIhn8rz`>e>J^TI3E-MW>f}6R-pL}>WMOa0k#jN+`RyUVUC;#D zg|~oS^$6%wpF{^Qr+}X>0PKcr3Fc&>Z>uv@C);pwDs@2bZWhYP!rvGx?_|q{d`t<*XEb#=aOb=N+L@CVBGqImZf&+a zCQEa3$~@#kC);pasdG=f6tuIi0PO-y&tvX%>Mv=oY3U$nD zJ#gMegnQ46pq+3r=;zmgcG+zRc9D~c>z+jo9&D+`E6$LmyFqlmCYw;-Zooma{sR@~ z)_^|YL1&&@|GXo*pivH7k!msl+$Sew3%XJnxajt0K%3M6Bd&YFNy9}tWG^aovK2eX z1aL1%7;KRDrA@eG-Wr6w+;*H_VD~qLiVI`{_;>o)k`{8xa3EJT1O_>#iy_?va0eR? zDV=N%;Zjb%Z2s$@O>w@iqt!I}tLjGk!=p`D23I}N4Be@$(|iSA zf3Ih7b<{zqpDB4WF_5X1(peKe+rASze%u8eKLn#KKXt;UZ+Adf$_TO+vTqshLLJ5c z52HucO=lrNVae5XWOLm!V@n-ObU11!b+DN<$RuU+YsrBq*lYT;?AwJpmNKniF0Q1< zJCo>Q$=v$@&y=sj6{r!Y&y&`0$-I}S!H_~pI&2H8Z1C|BX4VgZ^-! zje3-;x0PBD!M`v*J_)rL^+$<1VJhH*2Fi~aA7s&@_rUHYJ9zD=M%4AFQ`}k8OC$9s XsPq=LnkwKG00000NkvXXu0mjfhAk5^ literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..75b2d164a5a98e212cca15ea7bf2ab5de5108680 GIT binary patch literal 3831 zcmVjJBgitF5mAp-i>4+KS_oR{|13AP->1TD4=w)g|)JHOx|a2Wk1Va z!k)vP$UcQ#mdj%wNQoaJ!w>jv_6&JPyutpQps?s5dmDQ>`%?Bvj>o<%kYG!YW6H-z zu`g$@mp`;qDR!51QaS}|ZToSuAGcJ7$2HF0z`ln4t!#Yg46>;vGG9N9{V@9z#}6v* zfP?}r6b{*-C*)(S>NECI_E~{QYzN5SXRmVnP<=gzP+_Sp(Aza_hKlZ{C1D&l*(7IKXxQC1Z9#6wx}YrGcn~g%;icdw>T0Rf^w0{ z$_wn1J+C0@!jCV<%Go5LA45e{5gY9PvZp8uM$=1}XDI+9m7!A95L>q>>oe0$nC->i zeexUIvq%Uk<-$>DiDb?!In)lAmtuMWxvWlk`2>4lNuhSsjAf2*2tjT`y;@d}($o)S zn(+W&hJ1p0xy@oxP%AM15->wPLp{H!k)BdBD$toBpJh+crWdsNV)qsHaqLg2_s|Ih z`8E9z{E3sA!}5aKu?T!#enD(wLw?IT?k-yWVHZ8Akz4k5(TZJN^zZgm&zM28sfTD2BYJ|Fde3Xzh;;S` z=GXTnY4Xc)8nYoz6&vF;P7{xRF-{|2Xs5>a5)@BrnQ}I(_x7Cgpx#5&Td^4Q9_FnQ zX5so*;#8-J8#c$OlA&JyPp$LKUhC~-e~Ij!L%uSMu!-VZG7Hx-L{m2DVR2i=GR(_% zCVD!4N`I)&Q5S`?P&fQZ=4#Dgt_v2-DzkT}K(9gF0L(owe-Id$Rc2qZVLqI_M_DyO z9@LC#U28_LU{;wGZ&))}0R2P4MhajKCd^K#D+JJ&JIXZ_p#@+7J9A&P<0kdRujtQ_ zOy>3=C$kgi6$0pW06KaLz!21oOryKM3ZUOWqppndxfH}QpgjEJ`j7Tzn5bk6K&@RA?vl##y z$?V~1E(!wB5rH`>3nc&@)|#<1dN2cMzzm=PGhQ|Yppne(C-Vlt450IXc`J4R0W@I7 zd1e5uW6juvO%ni(WX7BsKx3MLngO7rHO;^R5I~0^nE^9^E_eYLgiR9&KnJ)pBbfno zSVnW$0R+&6jOOsZ82}nJ126+c|%svPo;TeUku<2G7%?$oft zyaO;tVo}(W)VsTUhq^XmFi#2z%-W9a{7mXn{uzivYQ_d6b7VJG{77naW(vHt-uhnY zVN#d!JTqVh(7r-lhtXVU6o})aZbDt_;&wJVGl2FKYFBFpU-#9U)z#(A%=IVnqytR$SY-sO( z($oNE09{D^@OuYPz&w~?9>Fl5`g9u&ecFGhqX=^#fmR=we0CJw+5xna*@oHnkahk+ z9aWeE3v|An+O5%?4fA&$Fgu~H_YmqR!yIU!bFCk4!#pAj%(lI(A5n)n@Id#M)O9Yx zJU9oKy{sRAIV3=5>(s8n{8ryJ!;ho}%pn6hZKTKbqk=&m=f*UnK$zW3YQP*)pw$O* zIfLA^!-bmBl6%d_n$#tP8Zd_(XdA*z*WH|E_yILwjtI~;jK#v-6jMl^?<%Y%`gvpwv&cFb$||^v4D&V=aNy?NGo620jL3VZnA%s zH~I|qPzB~e(;p;b^gJr7Ure#7?8%F0m4vzzPy^^(q4q1OdthF}Fi*RmVZN1OwTsAP zn9CZP`FazX3^kG(KodIZ=Kty8DLTy--UKfa1$6XugS zk%6v$Kmxt6U!YMx0JQ)0qX*{CXwZZk$vEROidEc7=J-1;peNat!vS<3P-FT5po>iE z!l3R+<`#x|+_hw!HjQGV=8!q|76y8L7N8gP3$%0kfush|u0uU^?dKBaeRSBUpOZ0c z62;D&Mdn2}N}xHRFTRI?zRv=>=AjHgH}`2k4WK=#AHB)UFrR-J87GgX*x5fL^W2#d z=(%K8-oZfMO=i{aWRDg=FX}UubM4eotRDcn;OR#{3q=*?3mE3_oJ-~prjhxh%PgQT zyn)Qozaq0@o&|LEgS{Ind4Swsr;b`u185hZPOBLL<`d2%^Yp1?oL)=jnLi;Zo0ZDliTtQ^b5SmfIMe{T==zZkbvn$KTQGlbG8w}s@M3TZnde;1Am46P3juKb zl9GU&3F=q`>j!`?SyH#r@O59%@aMX^rx}Nxe<>NqpUp5=lX1ojGDIR*-D^SDuvCKF z?3$xG(gVUsBERef_YjPFl^rU9EtD{pt z0CXwpN7BN3!8>hajGaTVk-wl=9rxmfWtIhC{mheHgStLi^+Nz12a?4r(fz)?3A%at zMlvQmL<2-R)-@G1wJ0^zQK%mR=r4d{Y3fHp){nWXUL#|CqXl(+v+qDh>FkF9`eWrW zfr^D%LNfOcTNvtx0JXR35J0~Jpi2#P3Q&80w+nqNfc}&G0A~*)lGHKv=^FE+b(37|)zL;KLF>oiGfb(?&1 zV3XRu!Sw>@quKiab%g6jun#oZ%!>V#A%+lNc?q>6+VvyAn=kf_6z^(TZUa4Eelh{{ zqFX-#dY(EV@7l$NE&kv9u9BR8&Ojd#ZGJ6l8_BW}^r?DIS_rU2(XaGOK z225E@kH5Opf+CgD^{y29jD4gHbGf{1MD6ggQ&%>UG4WyPh5q_tb`{@_34B?xfSO*| zZv8!)q;^o-bz`MuxXk*G^}(6)ACb@=Lfs`Hxoh>`Y0NE8QRQ!*p|SH@{r8=%RKd4p z+#Ty^-0kb=-H-O`nAA3_6>2z(D=~Tbs(n8LHxD0`R0_ATFqp-SdY3(bZ3;VUM?J=O zKCNsxsgt@|&nKMC=*+ZqmLHhX1KHbAJs{nGVMs6~TiF%Q)P@>!koa$%oS zjXa=!5>P`vC-a}ln!uH1ooeI&v?=?v7?1n~P(wZ~0>xWxd_Aw;+}9#eULM7M8&E?Y zC-ZLhi3RoM92SXUb-5i-Lmt5_rfjE{6y^+24`y$1lywLyHO!)Boa7438K4#iLe?rh z2O~YGSgFUBH?og*6=r9rme=peP~ah`(8Zt7V)j5!V0KPFf_mebo3z95U8(up$-+EA^9dTRLq>Yl)YMBuch9%=e5B`Vnb>o zt03=kq;k2TgGe4|lGne&zJa~h(UGutjP_zr?a7~#b)@15XNA>Dj(m=gg2Q5V4-$)D|Q9}R#002ovPDHLkV1o7DH3k3x literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..c4df70d39da7941ef3f6dcb7f06a192d8dcb308d GIT binary patch literal 1888 zcmV-m2cP(fP)x~L`~4d)Rspd&<9kFh{hn*KP1LP0~$;u(LfAu zp%fx&qLBcRHx$G|3q(bv@+b;o0*D|jwD-Q9uQR(l*ST}s+uPgQ-MeFwZ#GS?b332? z&Tk$&_miXn3IGq)AmQ)3sisq{raD4(k*bHvpCe-TdWq^NRTEVM)i9xbgQ&ccnUVx* zEY%vS%gDcSg=!tuIK8$Th2_((_h^+7;R|G{n06&O2#6%LK`a}n?h_fL18btz<@lFG za}xS}u?#DBMB> zw^b($1Z)`9G?eP95EKi&$eOy@K%h;ryrR3la%;>|o*>CgB(s>dDcNOXg}CK9SPmD? zmr-s{0wRmxUnbDrYfRvnZ@d z6johZ2sMX{YkGSKWd}m|@V7`Degt-43=2M?+jR%8{(H$&MLLmS;-|JxnX2pnz;el1jsvqQz}pGSF<`mqEXRQ5sC4#BbwnB_4` zc5bFE-Gb#JV3tox9fp-vVEN{(tOCpRse`S+@)?%pz+zVJXSooTrNCUg`R6`hxwb{) zC@{O6MKY8tfZ5@!yy=p5Y|#+myRL=^{tc(6YgAnkg3I(Cd!r5l;|;l-MQ8B`;*SCE z{u)uP^C$lOPM z5d~UhKhRRmvv{LIa^|oavk1$QiEApSrP@~Jjbg`<*dW4TO?4qG%a%sTPUFz(QtW5( zM)lA+5)0TvH~aBaOAs|}?u2FO;yc-CZ1gNM1dAxJ?%m?YsGR`}-xk2*dxC}r5j$d* zE!#Vtbo69h>V4V`BL%_&$} z+oJAo@jQ^Tk`;%xw-4G>hhb&)B?##U+(6Fi7nno`C<|#PVA%$Y{}N-?(Gc$1%tr4Pc}}hm~yY#fTOe!@v9s-ik$dX~|ygArPhByaXn8 zpI^FUjNWMsTFKTP3X7m?UK)3m zp6rI^_zxRYrx6_QmhoWoDR`fp4R7gu6;gdO)!KexaoO2D88F9x#TM1(9Bn7g;|?|o z)~$n&Lh#hCP6_LOPD>a)NmhW})LADx2kq=X7}7wYRj-0?dXr&bHaRWCfSqvzFa=sn z-8^gSyn-RmH=BZ{AJZ~!8n5621GbUJV7Qvs%JNv&$%Q17s_X%s-41vAPfIR>;x0Wlqr5?09S>x#%Qkt>?(&XjFRY}*L6BeQ3 z<6XEBh^S7>AbwGm@XP{RkeEKj6@_o%oV?hDuUpUJ+r#JZO?!IUc;r0R?>mi)*ZpQ) z#((dn=A#i_&EQn|hd)N$#A*fjBFuiHcYvo?@y1 z5|fV=a^a~d!c-%ZbMNqkMKiSzM{Yq=7_c&1H!mXk60Uv32dV;vMg&-kQ)Q{+PFtwc zj|-uQ;b^gts??J*9VxxOro}W~Q9j4Em|zSRv)(WSO9$F$s=Ydu%Q+5DOid~lwk&we zY%W(Z@ofdwPHncEZzZgmqS|!gTj3wQq9rxQy+^eNYKr1mj&?tm@wkO*9@UtnRMG>c aR{jt9+;fr}hV%pg00001^@s67{VYS000c7NklQEG_j zup^)eW&WUIApqy$=APz8jE@awGp)!bsTjDbrJO`$x^ZR^dr;>)LW>{ zs70vpsD38v)19rI=GNk1b(0?Js9~rjsQsu*K;@SD40RB-3^gKU-MYC7G!Bw{fZsqp zih4iIi;Hr_xZ033Iu{sQxLS=}yBXgLMn40d++>aQ0#%8D1EbGZp7+ z5=mK?t31BkVYbGOxE9`i748x`YgCMwL$qMsChbSGSE1`p{nSmadR zcQ#R)(?!~dmtD0+D2!K zR9%!Xp1oOJzm(vbLvT^$IKp@+W2=-}qTzTgVtQ!#Y7Gxz}stUIm<1;oBQ^Sh2X{F4ibaOOx;5ZGSNK z0maF^@(UtV$=p6DXLgRURwF95C=|U8?osGhgOED*b z7woJ_PWXBD>V-NjQAm{~T%sjyJ{5tn2f{G%?J!KRSrrGvQ1(^`YLA5B!~eycY(e5_ z*%aa{at13SxC(=7JT7$IQF~R3sy`Nn%EMv!$-8ZEAryB*yB1k&stni)=)8-ODo41g zkJu~roIgAih94tb=YsL%iH5@^b~kU9M-=aqgXIrbtxMpFy5mekFm#edF9z7RQ6V}R zBIhbXs~pMzt0VWy1Fi$^fh+1xxLDoK09&5&MJl(q#THjPm(0=z2H2Yfm^a&E)V+a5 zbi>08u;bJsDRUKR9(INSc7XyuWv(JsD+BB*0hS)FO&l&7MdViuur@-<-EHw>kHRGY zqoT}3fDv2-m{NhBG8X}+rgOEZ;amh*DqN?jEfQdqxdj08`Sr=C-KmT)qU1 z+9Cl)a1mgXxhQiHVB}l`m;-RpmKy?0*|yl?FXvJkFxuu!fKlcmz$kN(a}i*saM3nr z0!;a~_%Xqy24IxA2rz<+08=B-Q|2PT)O4;EaxP^6qixOv7-cRh?*T?zZU`{nIM-at zTKYWr9rJ=tppQ9I#Z#mLgINVB!pO-^FOcvFw6NhV0gztuO?g ztoA*C-52Q-Z-P#xB4HAY3KQVd%dz1S4PA3vHp0aa=zAO?FCt zC_GaTyVBg2F!bBr3U@Zy2iJgIAt>1sf$JWA9kh{;L+P*HfUBX1Zy{4MgNbDfBV_ly z!y#+753arsZUt@366jIC0klaC@ckuk!qu=pAyf7&QmiBUT^L1&tOHzsK)4n|pmrVT zs2($4=?s~VejTFHbFdDOwG;_58LkIj1Fh@{glkO#F1>a==ymJS$z;gdedT1zPx4Kj ztjS`y_C}%af-RtpehdQDt3a<=W5C4$)9W@QAse;WUry$WYmr51ml9lkeunUrE`-3e zmq1SgSOPNEE-Mf+AGJ$g0M;3@w!$Ej;hMh=v=I+Lpz^n%Pg^MgwyqOkNyu2c^of)C z1~ALor3}}+RiF*K4+4{(1%1j3pif1>sv0r^mTZ?5Jd-It!tfPfiG_p$AY*Vfak%FG z4z#;wLtw&E&?}w+eKG^=#jF7HQzr8rV0mY<1YAJ_uGz~$E13p?F^fPSzXSn$8UcI$ z8er9{5w5iv0qf8%70zV71T1IBB1N}R5Kp%NO0=5wJalZt8;xYp;b{1K) zHY>2wW-`Sl{=NpR%iu3(u6l&)rc%%cSA#aV7WCowfbFR4wcc{LQZv~o1u_`}EJA3>ki`?9CKYTA!rhO)if*zRdd}Kn zEPfYbhoVE~!FI_2YbC5qAj1kq;xP6%J8+?2PAs?`V3}nyFVD#sV3+uP`pi}{$l9U^ zSz}_M9f7RgnnRhaoIJgT8us!1aB&4!*vYF07Hp&}L zCRlop0oK4DL@ISz{2_BPlezc;xj2|I z23RlDNpi9LgTG_#(w%cMaS)%N`e>~1&a3<{Xy}>?WbF>OOLuO+j&hc^YohQ$4F&ze z+hwnro1puQjnKm;vFG~o>`kCeUIlkA-2tI?WBKCFLMBY=J{hpSsQ=PDtU$=duS_hq zHpymHt^uuV1q@uc4bFb{MdG*|VoW@15Osrqt2@8ll0qO=j*uOXn{M0UJX#SUztui9FN4)K3{9!y8PC-AHHvpVTU;x|-7P+taAtyglk#rjlH2 z5Gq8ik}BPaGiM{#Woyg;*&N9R2{J0V+WGB69cEtH7F?U~Kbi6ksi*`CFXsi931q7Y zGO82?whBhN%w1iDetv%~wM*Y;E^)@Vl?VDj-f*RX>{;o_=$fU!&KAXbuadYZ46Zbg z&6jMF=49$uL^73y;;N5jaHYv)BTyfh&`qVLYn?`o6BCA_z-0niZz=qPG!vonK3MW_ zo$V96zM!+kJRs{P-5-rQVse0VBH*n6A58)4uc&gfHMa{gIhV2fGf{st>E8sKyP-$8zp~wJX^A*@DI&-;8>gANXZj zU)R+Y)PB?=)a|Kj>8NXEu^S_h^7R`~Q&7*Kn!xyvzVv&^>?^iu;S~R2e-2fJx-oUb cX)(b1KSk$MOV07*qoM6N<$f&6$jw%VRuvdN2+38CZWny1cRtlsl+0_KtW)EU14Ei(F!UtWuj4IK+3{sK@>rh zs1Z;=(DD&U6+tlyL?UnHVN^&g6QhFi2#HS+*qz;(>63G(`|jRtW|nz$Pv7qTovP!^ zP_jES{mr@O-02w%!^a?^1ZP!_KmQiz0L~jZ=W@Qt`8wzOoclQsAS<5YdH;a(4bGLE zk8s}1If(PSIgVi!XE!5kA?~z*sobvNyohr;=Q_@h2@$6Flyej3J)D-6YfheRGl`HEcPk|~huT_2-U?PfL=4BPV)f1o!%rQ!NMt_MYw-5bUSwQ9Z&zC>u zOrl~UJglJNa%f50Ok}?WB{on`Ci`p^Y!xBA?m@rcJXLxtrE0FhRF3d*ir>yzO|BD$ z3V}HpFcCh6bTzY}Nt_(W%QYd3NG)jJ4<`F<1Od) zfQblTdC&h2lCz`>y?>|9o2CdvC8qZeIZt%jN;B7Hdn2l*k4M4MFEtq`q_#5?}c$b$pf_3y{Y!cRDafZBEj-*OD|gz#PBDeu3QoueOesLzB+O zxjf2wvf6Wwz>@AiOo2mO4=TkAV+g~%_n&R;)l#!cBxjuoD$aS-`IIJv7cdX%2{WT7 zOm%5rs(wqyPE^k5SIpUZ!&Lq4<~%{*>_Hu$2|~Xa;iX*tz8~G6O3uFOS?+)tWtdi| zV2b#;zRN!m@H&jd=!$7YY6_}|=!IU@=SjvGDFtL;aCtw06U;-v^0%k0FOyESt z1Wv$={b_H&8FiRV?MrzoHWd>%v6KTRU;-v^Miiz+@q`(BoT!+<37CKhoKb)|8!+RG z6BQFU^@fRW;s8!mOf2QViKQGk0TVER6EG1`#;Nm39Do^PoT!+<37AD!%oJe86(=et zZ~|sLzU>V-qYiU6V8$0GmU7_K8|Fd0B?+9Un1BhKAz#V~Fk^`mJtlCX#{^8^M8!me z8Yg;8-~>!e<-iG;h*0B1kBKm}hItVGY6WnjVpgnTTAC$rqQ^v)4KvOtpY|sIj@WYg zyw##ZZ5AC2IKNC;^hwg9BPk0wLStlmBr;E|$5GoAo$&Ui_;S9WY62n3)i49|T%C#i017z3J=$RF|KyZWnci*@lW4 z=AKhNN6+m`Q!V3Ye68|8y@%=am>YD0nG99M)NWc20%)gwO!96j7muR}Fr&54SxKP2 zP30S~lt=a*qDlbu3+Av57=9v&vr<6g0&`!8E2fq>I|EJGKs}t|{h7+KT@)LfIV-3K zK)r_fr2?}FFyn*MYoLC>oV-J~eavL2ho4a4^r{E-8m2hi>~hA?_vIG4a*KT;2eyl1 zh_hUvUJpNCFwBvRq5BI*srSle>c6%n`#VNsyC|MGa{(P&08p=C9+WUw9Hl<1o9T4M zdD=_C0F7#o8A_bRR?sFNmU0R6tW`ElnF8p53IdHo#S9(JoZCz}fHwJ6F<&?qrpVqE zte|m%89JQD+XwaPU#%#lVs-@-OL);|MdfINd6!XwP2h(eyafTUsoRkA%&@fe?9m@jw-v(yTTiV2(*fthQH9}SqmsRPVnwwbV$1E(_lkmo&S zF-truCU914_$jpqjr(>Ha4HkM4YMT>m~NosUu&UZ>zirfHo%N6PPs9^_o$WqPA0#5 z%tG>qFCL+b*0s?sZ;Sht0nE7Kl>OVXy=gjWxxK;OJ3yGd7-pZf7JYNcZo2*1SF`u6 zHJyRRxGw9mDlOiXqVMsNe#WX`fC`vrtjSQ%KmLcl(lC>ZOQzG^%iql2w-f_K@r?OE zwCICifM#L-HJyc7Gm>Ern?+Sk3&|Khmu4(~3qa$(m6Ub^U0E5RHq49za|XklN#?kP zl;EstdW?(_4D>kwjWy2f!LM)y?F94kyU3`W!6+AyId-89v}sXJpuic^NLL7GJItl~ zsiuB98AI-(#Mnm|=A-R6&2fwJ0JVSY#Q>&3$zFh|@;#%0qeF=j5Ajq@4i0tIIW z&}sk$&fGwoJpe&u-JeGLi^r?dO`m=y(QO{@h zQqAC7$rvz&5+mo3IqE?h=a~6m>%r5Quapvzq;{y~p zJpyXOBgD9VrW7@#p6l7O?o3feml(DtSL>D^R) zZUY%T2b0-vBAFN7VB;M88!~HuOXi4KcI6aRQ&h|XQ0A?m%j2=l1f0cGP}h(oVfJ`N zz#PpmFC*ieab)zJK<4?^k=g%OjPnkANzbAbmGZHoVRk*mTfm75s_cWVa`l*f$B@xu z5E*?&@seIo#*Y~1rBm!7sF9~~u6Wrj5oICUOuz}CS)jdNIznfzCA(stJ(7$c^e5wN z?lt>eYgbA!kvAR7zYSD&*r1$b|(@;9dcZ^67R0 zXAXJKa|5Sdmj!g578Nwt6d$sXuc&MWezA0Whd`94$h{{?1IwXP4)Tx4obDK%xoFZ_Z zjjHJ_P@R_e5blG@yEjnaJb`l;s%Lb2&=8$&Ct-fV`E^4CUs)=jTk!I}2d&n!f@)bm z@ z_4Dc86+3l2*p|~;o-Sb~oXb_RuLmoifDU^&Te$*FevycC0*nE3Xws8gsWp|Rj2>SM zns)qcYj?^2sd8?N!_w~4v+f-HCF|a$TNZDoNl$I1Uq87euoNgKb6&r26TNrfkUa@o zfdiFA@p{K&mH3b8i!lcoz)V{n8Q@g(vR4ns4r6w;K z>1~ecQR0-<^J|Ndg5fvVUM9g;lbu-){#ghGw(fg>L zh)T5Ljb%lWE;V9L!;Cqk>AV1(rULYF07ZBJbGb9qbSoLAd;in9{)95YqX$J43-dY7YU*k~vrM25 zxh5_IqO0LYZW%oxQ5HOzmk4x{atE*vipUk}sh88$b2tn?!ujEHn`tQLe&vo}nMb&{ zio`xzZ&GG6&ZyN3jnaQy#iVqXE9VT(3tWY$n-)uWDQ|tc{`?fq2F`oQ{;d3aWPg4Hp-(iE{ry>MIPWL> iW8Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000000..89c2725b70 --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/pkgs/cupertino_http/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/pkgs/cupertino_http/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..f2e259c7c9 --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/cupertino_http/example/ios/Runner/Base.lproj/Main.storyboard b/pkgs/cupertino_http/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..f3c28516fb --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/cupertino_http/example/ios/Runner/Info.plist b/pkgs/cupertino_http/example/ios/Runner/Info.plist new file mode 100644 index 0000000000..4af48f0d2b --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Cupertino Http + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + cupertino_http_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + CADisableMinimumFrameDurationOnPhone + + + diff --git a/pkgs/cupertino_http/example/ios/Runner/Runner-Bridging-Header.h b/pkgs/cupertino_http/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000000..308a2a560b --- /dev/null +++ b/pkgs/cupertino_http/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart new file mode 100644 index 0000000000..c343635997 --- /dev/null +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -0,0 +1,154 @@ +import 'package:flutter/material.dart'; +import 'dart:io'; +import 'dart:convert'; + +import 'package:cupertino_http/cupertino_client.dart'; +import 'package:http/http.dart'; +import 'package:http/io_client.dart'; + +void main() { + runApp(const BookSearchApp()); +} + +class Book { + String title; + String description; + String imageUrl; + + Book(this.title, this.description, this.imageUrl); +} + +class BookSearchApp extends StatelessWidget { + const BookSearchApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return const MaterialApp( + // Remove the debug banner + debugShowCheckedModeBanner: false, + title: 'Book Search', + home: HomePage(), + ); + } +} + +class HomePage extends StatefulWidget { + const HomePage({Key? key}) : super(key: key); + + @override + State createState() => _HomePageState(); +} + +class _HomePageState extends State { + List _books = []; + + @override + initState() { + super.initState(); + } + + void _runSearch(String query) { + if (query.isEmpty) { + setState(() { + _books = []; + }); + return; + } + + // TODO: Set this up in main when runWithClient is released with package + // HTTP. + late Client client; + if (Platform.isIOS) { + client = CupertinoClient.defaultSessionConfiguration(); + } else { + client = IOClient(); + } + client + .get(Uri.https('www.googleapis.com', '/books/v1/volumes', + {'q': query, 'maxResults': '40', 'printType': 'books'})) + .then((response) { + final List books = []; + final jsonPayload = jsonDecode(utf8.decode(response.bodyBytes)) as Map; + + if (jsonPayload['items'] is List) { + final items = jsonPayload['items'] as List; + + for (final Map item in items) { + if (item.containsKey('volumeInfo')) { + final volumeInfo = item['volumeInfo'] as Map; + if (volumeInfo['title'] is String && + volumeInfo['description'] is String && + volumeInfo['imageLinks'] is Map && + volumeInfo['imageLinks']['smallThumbnail'] is String) { + books.add(Book(volumeInfo['title'], volumeInfo['description'], + volumeInfo['imageLinks']['smallThumbnail'])); + } + } + } + } + setState(() { + _books = books; + }); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Book Search'), + ), + body: Padding( + padding: const EdgeInsets.all(10), + child: Column( + children: [ + const SizedBox( + height: 20, + ), + TextField( + onChanged: (value) => _runSearch(value), + decoration: const InputDecoration( + labelText: 'Search', suffixIcon: Icon(Icons.search)), + ), + const SizedBox( + height: 20, + ), + Expanded( + child: _books.isNotEmpty + ? BookList(_books) + : const Text( + 'No results found', + style: TextStyle(fontSize: 24), + ), + ), + ], + ), + ), + ); + } +} + +class BookList extends StatefulWidget { + final List books; + const BookList(this.books, {Key? key}) : super(key: key); + + @override + State createState() => _BookListState(); +} + +class _BookListState extends State { + @override + Widget build(BuildContext context) { + return ListView.builder( + itemCount: widget.books.length, + itemBuilder: (context, index) => Card( + key: ValueKey(widget.books[index].title), + child: ListTile( + leading: Image.network(widget.books[index].imageUrl), + title: Text(widget.books[index].title), + subtitle: Text(widget.books[index].description), + ), + ), + ); + } +} diff --git a/pkgs/cupertino_http/example/macos/.gitignore b/pkgs/cupertino_http/example/macos/.gitignore new file mode 100644 index 0000000000..746adbb6b9 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/pkgs/cupertino_http/example/macos/Flutter/Flutter-Debug.xcconfig b/pkgs/cupertino_http/example/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000000..4b81f9b2d2 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/pkgs/cupertino_http/example/macos/Flutter/Flutter-Release.xcconfig b/pkgs/cupertino_http/example/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000000..5caa9d1579 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/pkgs/cupertino_http/example/macos/Flutter/GeneratedPluginRegistrant.swift b/pkgs/cupertino_http/example/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000000..cccf817a52 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,10 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { +} diff --git a/pkgs/cupertino_http/example/macos/Podfile b/pkgs/cupertino_http/example/macos/Podfile new file mode 100644 index 0000000000..dade8dfad0 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Podfile @@ -0,0 +1,40 @@ +platform :osx, '10.11' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/pkgs/cupertino_http/example/macos/Podfile.lock b/pkgs/cupertino_http/example/macos/Podfile.lock new file mode 100644 index 0000000000..4afaf840ce --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Podfile.lock @@ -0,0 +1,22 @@ +PODS: + - cupertino_http (0.0.1): + - FlutterMacOS + - FlutterMacOS (1.0.0) + +DEPENDENCIES: + - cupertino_http (from `Flutter/ephemeral/.symlinks/plugins/cupertino_http/macos`) + - FlutterMacOS (from `Flutter/ephemeral`) + +EXTERNAL SOURCES: + cupertino_http: + :path: Flutter/ephemeral/.symlinks/plugins/cupertino_http/macos + FlutterMacOS: + :path: Flutter/ephemeral + +SPEC CHECKSUMS: + cupertino_http: 92e8124f1946bc5aefa03d55b5bf7a0c816acac6 + FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424 + +PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c + +COCOAPODS: 1.11.2 diff --git a/pkgs/cupertino_http/example/macos/Runner.xcodeproj/project.pbxproj b/pkgs/cupertino_http/example/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..87f6642ef3 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,632 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + 49F61AA6D6717AADC4360336 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C57AE9D0D604FAC3FF33FDD7 /* Pods_Runner.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 11A6429BF8F495D6C3D0BDB1 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* cupertino_http_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = cupertino_http_example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 41FACCFD9DAF1C233C094BC7 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + C57AE9D0D604FAC3FF33FDD7 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D9EF80FE0A11844C6FE04F8A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 49F61AA6D6717AADC4360336 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + 9D6A66F4E0852DA9C2AC7D8B /* Pods */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* cupertino_http_example.app */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + 9D6A66F4E0852DA9C2AC7D8B /* Pods */ = { + isa = PBXGroup; + children = ( + D9EF80FE0A11844C6FE04F8A /* Pods-Runner.debug.xcconfig */, + 11A6429BF8F495D6C3D0BDB1 /* Pods-Runner.release.xcconfig */, + 41FACCFD9DAF1C233C094BC7 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + C57AE9D0D604FAC3FF33FDD7 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + E2928DC3A6801A5E03E356BB /* [CP] Check Pods Manifest.lock */, + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + C8F164BC22EFF3F17CC2EE25 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* cupertino_http_example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; + C8F164BC22EFF3F17CC2EE25 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + E2928DC3A6801A5E03E356BB /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/pkgs/cupertino_http/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/pkgs/cupertino_http/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/pkgs/cupertino_http/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/pkgs/cupertino_http/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..ff80cba196 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/cupertino_http/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/pkgs/cupertino_http/example/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..21a3cc14c7 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/pkgs/cupertino_http/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/pkgs/cupertino_http/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/pkgs/cupertino_http/example/macos/Runner/AppDelegate.swift b/pkgs/cupertino_http/example/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000000..d53ef64377 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..a2ec33f19f --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000000000000000000000000000000000000..3c4935a7ca84f0976aca34b7f2895d65fb94d1ea GIT binary patch literal 46993 zcmZ5|3p`X?`~OCwR3s6~xD(})N~M}fiXn6%NvKp3QYhuNN0*apqmfHdR7#ShNQ99j zQi+P9nwlXbmnktZ_WnO>bl&&<{m*;O=RK!cd#$zCdM@AR`#jH%+2~+BeX7b-48x|= zZLBt9*d+MZNtpCx_&asa{+CselLUV<<&ceQ5QfRjLjQDSL-t4eq}5znmIXDtfA|D+VRV$*2jxU)JopC)!37FtD<6L^&{ia zgVf1p(e;c3|HY;%uD5<-oSFkC2JRh- z&2RTL)HBG`)j5di8ys|$z_9LSm^22*uH-%MmUJs|nHKLHxy4xTmG+)JoA`BN7#6IN zK-ylvs+~KN#4NWaH~o5Wuwd@W?H@diExdcTl0!JJq9ZOA24b|-TkkeG=Q(pJw7O;i z`@q+n|@eeW7@ z&*NP+)wOyu^5oNJ=yi4~s_+N)#M|@8nfw=2#^BpML$~dJ6yu}2JNuq!)!;Uwxic(z zM@Wa-v|U{v|GX4;P+s#=_1PD7h<%8ey$kxVsS1xt&%8M}eOF98&Rx7W<)gY(fCdmo{y*FPC{My!t`i=PS1cdV7DD=3S1J?b2<5BevW7!rWJ%6Q?D9UljULd*7SxX05PP^5AklWu^y` z-m9&Oq-XNSRjd|)hZ44DK?3>G%kFHSJ8|ZXbAcRb`gH~jk}Iwkl$@lqg!vu)ihSl= zjhBh%%Hq|`Vm>T7+SYyf4bI-MgiBq4mZlZmsKv+S>p$uAOoNxPT)R6owU%t*#aV}B z5@)X8nhtaBhH=={w;Du=-S*xvcPz26EI!gt{(hf;TllHrvku`^8wMj7-9=By>n{b= zHzQ?Wn|y=;)XM#St@o%#8idxfc`!oVz@Lv_=y(t-kUC`W)c0H2TX}Lop4121;RHE(PPHKfe_e_@DoHiPbVP%JzNudGc$|EnIv`qww1F5HwF#@l(=V zyM!JQO>Rt_PTRF1hI|u^2Uo#w*rdF*LXJky0?|fhl4-M%zN_2RP#HFhSATE3&{sos zIE_?MdIn!sUH*vjs(teJ$7^7#|M_7m`T>r>qHw>TQh?yhhc8=TJk2B;KNXw3HhnQs za(Uaz2VwP;82rTy(T3FJNKA86Y7;L(K=~BW_Q=jjRh=-k_=wh-$`nY+#au+v^C4VV z)U?X(v-_#i=3bAylP1S*pM_y*DB z2fR!imng6Dk$>dl*K@AIj<~zw_f$T!-xLO8r{OkE(l?W#W<={460Y02*K#)O4xp?W zAN+isO}!*|mN7B#jUt&!KNyFOpUxv&ybM>jmkfn8z^llBslztv!!`TBEPwu;#eR3d z@_VDa)|ByvXx1V=^Up4{;M8ji3FC7gm(C7Ty-#1gs+U<{Ouc(iV67{< zam#KwvR&s=k4W<13`}DxzJ9{TUa97N-cgWkCDc+C339)EEnC@^HQK6OvKDSCvNz(S zOFAF_6omgG!+zaPC8fBO3kH8YVBx9_AoM?->pv~@$saf(Myo|e@onD`a=;kO*Utem ze=eUH&;JB2I4}?Pm@=VnE+yb$PD~sA5+)|iH3bi|s?ExIePeoAMd(Z4Z%$mCu{t;B9(sgdG~Q}0ShAwe!l8nw0tJn zJ+m?ogrgty$3=T&6+JJa!1oS3AtQQ1gJ z3gR1<=hXU>{SB-zq!okl4c+V9N;vo4{fyGeqtgBIt%TPC1P&k!pR-GZ7O8b}9=%>3 zQrV%FQdB+CcCRKK)0}v>U25rbQk(1^9Ax|WcAo5?L(H&H@%zAoT2RH$iN6boyXpsYqME}WJZI6T%OMlkWXK>R`^7AHG&31 z&MIU}igQ7$;)7AEm#dXA+!I&6ymb7n6D;F7c$tO3Ql(`ht z1sFrzIk_q5#=!#D(e~#SdWz5K;tPF*R883Yu>*@jTeOGUjQekw zM+7HlfP{y8p}jA9bLfyKC_Ti8k#;AVp@RML^9MQp-E+Ns-Y zKA!aAZV-sfm<23fy#@TZZlQVQxH%R7rD}00LxHPUF!Yg3%OX ziDe4m<4fp{7ivBS?*AlJz$~vw5m)Ei8`|+~xOSqJ$waA0+Yys$z$9iN9TIXu8 zaYacjd09uRAsU|)g|03w`F|b1Xg#K~*Mp2X^K^)r3P^juoc}-me&YhkW3#G|H<~jK zoKD?lE@jOw7>4cpKkh!8qU!bF(i~Oa8a!EGy-j46eZYbKUvF=^^nq`EtWFK}gwrsB zeu<6~?mk+;+$whP)8ud8vjqh+NofU+Nu`~|pb&CN1y_idxxf6cGbT=fBZR_hl&G)GgnW$*oDrN-zz;cKs18n+dAn95w z)Y>l6!5eYpebJGw7it~Q5m}8$7@%p&KS=VtydFj4HPJ{xqUVS_Ih}c(^4nUdwG|0% zw8Fnm{IT`8MqoL(1BNtu_#7alS@3WSUUOFT@U*`V!zrPIeCbbO=pE%|g92$EU|lw; z^;^AqMVWVf-R5^OI79TzIyYf}HX%0Y)=aYH;EKo}?=R~ZM&s&F;W>u%hFUfNafb;- z8OkmkK3k||J#3`xdLuMJAhj9oPI?Cjt}cDN7hw26n7irWS0hsy`fs&Y?Y&(QF*Nu! z!p`NggHXaBU6$P42LkqnKsPG@363DHYGXg{!|z6VMAQt??>FK1B4x4{j;iY8A+7o% z*!0qt&w+w#Ob@pQp;q)u0;v^9FlY=AK>2!qku)!%TO<^lNBr!6R8X)iXgXi^1p`T8 z6sU@Y_Fsp6E89E1*jz~Tm2kF=mjYz_q99r^v0h-l7SP6azzL%woM6!7>IFWyizrNwAqoia3nN0q343q zFztMPh0)?ugQg5Izbk{5$EGcMzt*|=S8ZFK%O&^YV@V;ZRL>f!iG?s5z{(*Xq20c^ z(hkk~PljBo%U`$q>mz!ir7chKlE-oHA2&0i@hn4O5scsI&nIWsM>sYg;Ph5IO~VpT z%c-3_{^N>4kECzk?2~Z@V|jWio&a&no;boiNxqXOpS;ph)gEDFJ6E=zPJ$>y5w`U0 z;h9_6ncIEY?#j1+IDUuixRg&(hw+QSSEmFi%_$ua$^K%(*jUynGU@FlvsyThxqMRw z7_ALpqTj~jOSu2_(@wc_Z?>X&(5jezB6w-@0X_34f&cZ=cA-t%#}>L7Q3QRx1$qyh zG>NF=Ts>)wA)fZIlk-kz%Xa;)SE(PLu(oEC8>9GUBgd$(^_(G6Y((Hi{fsV; zt*!IBWx_$5D4D&ezICAdtEU!WS3`YmC_?+o&1RDSfTbuOx<*v`G<2SP;5Q4TqFV&q zJL=90Lcm^TL7a9xck}XPMRnQ`l0%w-fi@bRI&c*VDj!W4nj=qaQd$2U?^9RTT{*qS_)Q9OL>s}2P3&da^Pf(*?> z#&2bt;Q7N2`P{{KH@>)Tf5&za?crRmQ%8xZi<9f=EV3={K zwMet=oA0-@`8F;u`8j-!8G~0TiH5yKemY+HU@Zw3``1nT>D ziK465-m?Nm^~@G@RW2xH&*C#PrvCWU)#M4jQ`I*>_^BZB_c!z5Wn9W&eCBE(oc1pw zmMr)iu74Xl5>pf&D7Ml>%uhpFGJGyj6Mx=t#`}Mt3tDZQDn~K`gp0d)P>>4{FGiP$sPK*ExVs!1)aGgAX z6eA;-9@@Muti3xYv$8U{?*NxlHxs?)(6%!Iw&&l79K86h+Z8;)m9+(zzX?cS zH*~)yk)X^H1?AfL!xctY-8T0G0Vh~kcP=8%Wg*zZxm*;eb)TEh&lGuNkqJib_}i;l z*35qQ@}I#v;EwCGM2phE1{=^T4gT63m`;UEf5x2Get-WSWmt6%T6NJM`|tk-~4<#HHwCXuduB4+vW!BywlH8murH@|32CNxx7} zAoF?Gu02vpSl|q1IFO0tNEvKwyH5V^3ZtEO(su1sIYOr{t@Tr-Ot@&N*enq;Je38} zOY+C1bZ?P~1=Qb%oStI-HcO#|WHrpgIDR0GY|t)QhhTg*pMA|%C~>;R4t_~H1J3!i zyvQeDi&|930wZlA$`Wa9)m(cB!lPKD>+Ag$5v-}9%87`|7mxoNbq7r^U!%%ctxiNS zM6pV6?m~jCQEKtF3vLnpag``|bx+eJ8h=(8b;R+8rzueQvXgFhAW*9y$!DgSJgJj% zWIm~}9(R6LdlXEg{Y3g_i7dP^98=-3qa z$*j&xC_$5btF!80{D&2*mp(`rNLAM$JhkB@3al3s=1k^Ud6HHontlcZw&y?`uPT#a za8$RD%e8!ph8Ow7kqI@_vd7lgRhkMvpzp@4XJ`9dA@+Xk1wYf`0Dk!hIrBxhnRR(_ z%jd(~x^oqA>r>`~!TEyhSyrwNA(i}={W+feUD^8XtX^7^Z#c7att{ot#q6B;;t~oq zct7WAa?UK0rj0yhRuY$7RPVoO29JV$o1Z|sJzG5<%;7pCu%L-deUon-X_wAtzY@_d z6S}&5xXBtsf8TZ13chR&vOMYs0F1?SJcvPn>SFe#+P3r=6=VIqcCU7<6-vxR*BZUm zO^DkE{(r8!e56)2U;+8jH4tuD2c(ptk0R{@wWK?%Wz?fJckr9vpIU27^UN*Q$}VyHWx)reWgmEls}t+2#Zm z_I5?+htcQl)}OTqF<`wht89>W*2f6e)-ewk^XU5!sW2A2VtaI=lggR&I z;Rw{xd)WMqw`VUPbhrx!!1Eg_*O0Si6t@ny)~X^Gu8wZZDockr)5)6tm+<=z+rYu? zCof+;!nq6r9MAfh zp4|^2w^-3vFK~{JFX|F5BIWecBJkkEuE%iP8AZ z^&e|C+VEH&i(4Y|oWPCa#C3T$129o5xaJa=y8f(!k&q+x=M|rq{?Zw_n?1X-bt&bP zD{*>Io`F4(i+5eE2oEo6iF}jNAZ52VN&Cp>LD{MyB=mCeiwP+v#gRvr%W)}?JBTMY z_hc2r8*SksC%(pp$KGmWSa|fx;r^9c;~Q(Jqw1%;$#azZf}#Fca9NZOh{*YxV9(1ivVA^2Wz>!A&Xvmm-~{y8n!^Jdl8c>`J#=2~!P{ zC1g_5Ye3={{fB`R%Q|%9<1p1;XmPo5lH5PHvX$bCIYzQhGqj7hZ?@P4M0^mkejD|H zVzARm7LRy|8`jSG^GpxRIs=aD>Y{Cb>^IwGEKCMd5LAoI;b{Q<-G}x*e>86R8dNAV z<@jb1q%@QQanW1S72kOQ$9_E#O?o}l{mHd=%Dl{WQcPio$baXZN!j{2m)TH1hfAp{ zM`EQ=4J`fMj4c&T+xKT!I0CfT^UpcgJK22vC962ulgV7FrUrII5!rx1;{@FMg(dIf zAC}stNqooiVol%%TegMuWnOkWKKA}hg6c)ssp~EnTUVUI98;a}_8UeTgT|<%G3J=n zKL;GzAhIQ_@$rDqqc1PljwpfUwiB)w!#cLAkgR_af;>}(BhnC9N zqL|q8-?jsO&Srv54TxVuJ=rfcX=C7{JNV zSmW@s0;$(#!hNuU0|YyXLs{9$_y2^fRmM&g#toh}!K8P}tlJvYyrs6yjTtHU>TB0} zNy9~t5F47ocE_+%V1(D!mKNBQc{bnrAbfPC2KO?qdnCv8DJzEBeDbW}gd!g2pyRyK`H6TVU^~K# z488@^*&{foHKthLu?AF6l-wEE&g1CTKV|hN7nP+KJnkd0sagHm&k{^SE-woW9^fYD z7y?g*jh+ELt;$OgP>Se3o#~w9qS}!%#vBvB?|I-;GM63oYrJ}HFRW6D+{54v@PN8K z2kG8`!VVc+DHl^8y#cevo4VCnTaPTzCB%*)sr&+=p{Hh#(MwaJbeuvvd!5fd67J_W za`oKxTR=mtM7P}i2qHG8=A(39l)_rHHKduDVA@^_Ueb7bq1A5#zHAi**|^H@fD`_W z#URdSG86hhQ#&S-Vf_8b`TIAmM55XhaHX7}Ci-^(ZDs*yb-WrWV&(oAQu3vMv%u$5 zc;!ADkeNBN_@47r!;%G3iFzo;?k)xTS-;1D-YeS5QXN7`p2PzGK~e6ib;8COBa5)p zfMn}dA--&A12~zr&GVk?qnBGfIEo`5yir;-Q;ZLn{Fimdrk;e!)q`sAkYh^~^>4Q@ zN5RT>s38+`V{|6@k&vZW!W0*BEqV&~34d+Ev8h)ObYL7Bd_hgbUzjdJaXP=S@Dp6X z)i013q3K4Gr5d%2YIp>218pYK!xwH;k)j?uUrT-yVKLg*L3y~=a+qd!RWGTL`z>29 z-Zb4Y{%pT%`R-iA#?T58c-i@?jf-Ckol9O>HAZPUxN%Z=<4ad9BL7n`_kH0i#E(m& zaNb039+z~ONUCLsf_a|x*&ptU?`=R*n}rm-tOdCDrS!@>>xBg)B3Sy8?x^e=U=i8< zy7H-^BPfM}$hf*d_`Qhk_V$dRYZw<)_mbC~gPPxf0$EeXhl-!(ZH3rkDnf`Nrf4$+ zh?jsRS+?Zc9Cx7Vzg?q53ffpp43po22^8i1Obih&$oBufMR;cT2bHlSZ#fDMZZr~u zXIfM5SRjBj4N1}#0Ez|lHjSPQoL&QiT4mZn=SxHJg~R`ZjP!+hJ?&~tf$N!spvKPi zfY;x~laI9X`&#i#Z}RJ`0+MO_j^3#3TQJu2r;A-maLD8xfI+2Y*iDf4LsQ$9xiu?~ z?^wHEf^qlgtjdj(u_(W5sbGx1;maVPDHvI-76u2uUywf;>()=e>0le;bO0LIvs)iy z*lJTO+7gyf^)2uS-PhS_O-+RToQmc6VT>ej^y^stNkwIxUg?E|YMAAwQ}U!dC&cXL ziXKU?zT~xbh6C};rICGbdX~;8Z%L~Jdg|`senVEJo-CiDsX47Kc`;EiXWO<9o)(`4 zGj(9@c+Me=F~y(HUehcAy!tkoM&e1y#(qqCkE(0lik_U>wg8vOhGR(=gBGFSbR`mh zn-%j3VTD4 zwA1Kqw!OSgi_v0;6?=Bk4Z{l-7Fl4`ZT535OC{73{rBwpNHMPH>((4G`sh zZhr!v{zM@4Q$5?8)Jm;v$A2v$Yp9qFG7y`9j7O-zhzC+7wr3Cb8sS$O{yOFOODdL) zV2pU{=nHne51{?^kh%a$WEro~o(rKQmM!p?#>5Pt`;!{0$2jkmVzsl|Nr^UF^IHxG z8?HmZEVMY~ec%Ow6hjfg6!9hCC4xY?V;5Ipo-myV=3TmfT^@XkKME`+=_inm4h7ki z->K~a+20?)zic^zc&7h=0)T{Aa24FU_}(O|9DMW3Bf>MW=O%~8{unFxp4}B+>>_KN zU%rKs3Va&&27&OX4-o&y2ie|sN2p-=S^V<2wa2NUQ4)?0e|hgna*1R7(#R_ys3xmG zE#(ry+q=O~&t|RX@ZMD`-)0QmE*x%SBc(Yvq60JtCQ4RL(gdA(@=}0rYo5yKz36bW zkvLOosP6I?7qH!rce(}q@cH-{oM2ThKV2RZe+{{25hkc?T>=Tky12xHr0jmfH@SZi zLHPJ@^Oo^Zo%`gZk_hrbCzS+t|=O!Bt zWi|>M8mz~sD|Z>C1ZPf_Cs&R!S5E2qK+@j*UpP>;5_|+h+y{gb=zub7#QKSUabet# zFH2H0ul;zO+uc+V=W_W@_Ig-791T7J9&=5)wrBE?JEHS_A6P~VQ)u6s1)Pu|VxP(aYJV*(e<)(42R zm3AK>dr1QLbC1RMoQ|M5k+TWBjY9q+_vY=K-tUte35m4RWl51A<4O0ptqV3)KzL7U z0gpp-I1)|zvtA8V7-e-o9H)lB_Rx6;Bu7A2yE)6)SuDqWDs}~Ojfk?DFwI% z3E1(>LbbB7I(&E@B7nlulhvY=Wa1mGXD@ijD7WF^y@L1e55h)-hzoq}eWe!fh9m3V{)x^6F8?ed1z>+4;qW6A4hYYj zZCYP=c#I8+$pAIVyiY*#%!j3ySAnH`tp|=^lh{)#JimWaP_rXK40A0WcsEUj`G1}O zG?XQ~qK4F!lqauv6-BL_Up3+-l1=kVfD;D*C)yr>o9>W=%mIyATtn_OBLK+h@p)j5jRAb;m&Ok?TZH-5Q)~#UwdYFp~rEE{judWa9E)z zE>135C-xMdHYY&AZGR)tb`K}s0CK9 z1!))p^ZaUC*e50t`sL+)@`)#kJ}?C_cCMH@k{f4wh~0`OFnGQ2nzUuuu;=r4BYRcI z){G#a6Y$S(mIc6B#YS;jFcU{0`c)Raa$nG+hV(K|2|^ZWOI566zlF0N;t~$jD<_AX zjnD?HN-G>xRmHwtL3BcJX7)Q^YGfc?cS4Nj=yYl5MB(uBD?r@VTB|mIYs=au$e)e{ zLHWd!+EN*v2*(=y%G1JzyQdY&%|?~R5NPb)`S2dw1AJW8O;L=p?yVxJs=X?U#-l1O zk6xh8yyY;OTR7aF{P=kQ>y`*EFivnw%rQioA-I67WS+~hVamG4_sI)(Jo4vHS|@F@ zqrBHbxHd_Y8+?8Gfq=Z1O^Fs5moGayCHVUHY^8)^j)Aj*RB!S2-FA?4#-`puwBW`` zJ_6OQj(FGo8DotHYRKq;;$4xDn9=4rgw}5xvxhi)?n?W5{*%4%h9Tg)zlQl&fN~Z1)gL(Dn7X!P428I zwA+U-x5!cQ57g1N=2bLqAWF z!&cbvsD)dvYoqP5vaQz%rL@kv*J>0AMzWAKn~Mxi5g2GlI7qvVZo)Z5oj=#O!M&*O z`3O3)uvrjNTeremC}nW@(m%#E-sITB>j-!yBM#(=FN`~c#@XjL3e)SjR9&%QO%tUg zzGv=SLH()`ZIt?Ayym;9VG1Muq+a+7Zo+59?SuRu_`k>@S4!yS3roMnq+SDO?`C7V#2 z8vHf4&0k;{kLT)fa==7EILSu3e|ZnxtFO;1 zGqP-;Xo(>_QKcYUhsi-X72BqH#7Zb-TsiNIF>G9xOHT3XoA*qX^10+#XCU0)UO4_%A_s_vO=uDd3_Q%D{OsvLMW9wGvuuRnF52{2vH06D~7N672!bIMt@it_D}& zwjZ7gV!RzZ86*wbEB5cnMJRbEqMM{G!K)bfJjyPH^9nGnrOI9S{~!dm4~P#&b*~)h zCMwM8mR+y5i~E5*JAopwZ>F`=ORfA&IF%O8(aS<}^H6wcY1g^=lYLPtFpyvW9F z3;FCS-TGFYPr#Y$ue>}?rTYrmWr^VbUu>!eL$cEdh1e>5_UDnZ@Mu$l*KVo_NDEu^ zBn*!qVnzYv>t|<(>nt8%CoNPhN!qGP|sANRN^#+2YSSYHa>R1mss->c0f=#g@U58@? zA4sUbrA7)&KrTddS0M6pTSRaz)wqUgsT3&8-0eG|d;ULOUztdaiD3~>!10H`rRHWY z1iNu6=UaA8LUBoaH9G*;m`Mzm6d1d+A#I8sdkl*zfvbmV0}+u` zDMv=HJJm?IOwbP;f~yn|AI_J7`~+5&bPq6Iv?ILo2kk$%vIlGsI0%nf1z9Mth8cy! zWumMn=RL1O9^~bVEFJ}QVvss?tHIwci#ldC`~&KFS~DU5K5zzneq_Q91T~%-SVU4S zJ6nVI5jeqfh~*2{AY#b(R*Ny95RQBGIp^fxDK{I9nG0uHCqc-Ib;pUUh$t0-4wX*< z=RzW~;iR3xfRnW<>5Jr5O1MP)brA3+ei@H8Hjkt7yuYIpd7c-4j%U=8vn8HD#TPJo zSe+7~Db}4U3Y^4dl1)4XuKZ67f(ZP;?TYg9te>hbAr4R_0K$oq3y5m-gb?fR$UtF9 zS~S^=aDyFSE}9W2;Okj%uoG-Um^&Qo^bB#!W?|%=6+P>``bumeA2E7ti7Aj%Fr~qm z2gbOY{WTyX$!s5_0jPGPQQ0#&zQ0Zj0=_74X8|(#FMzl`&9G_zX*j$NMf?i3M;FCU z6EUr4vnUOnZd`*)Uw#6yI!hSIXr%OF5H z5QlF8$-|yjc^Y89Qfl!Er_H$@khM6&N*VKjIZ15?&DB?);muI`r;7r0{mI03v9#31 z#4O*vNqb=1b}TjLY`&ww@u^SE{4ZiO=jOP3!|6cKUV2*@kI9Aw0ASwn-OAV~0843$1_FGl7}eF6C57dJb3grW)*jtoUd zpqXvfJSCIv4G*_@XZE?> z4Lt=jTSc*hG3`qVq!PVMR2~G-1P{%amYoIg!8Odf4~nv6wnEVrBt-R5Au=g~4=X|n zHRJGVd|$>4@y#w;g!wz>+z%x?XM^xY%iw%QoqY@`vSqg0c>n_}g^lrV))+9n$zGOP zs%d&JWT2Jjxaz`_V%XtANP$#kLLlW=OG2?!Q%#ThY#Sj}*XzMsYis2HiU2OlfeC>d z8n8j-{Npr1ri$Jv2E_QqKsbc$6vedBiugD~S`_0QjTTtX(mS}j6)6e;xdh*sp5U0aMpuN}qTP=^_Qn zh~0padPWs&aXmf6b~}{7Raglc)$~p?G89N4)&a}`izf|bA)IUmFLQ8UM$T!6siQxr z=%)pPsWYXWCNdGMS3fK6cxVuhp7>mug|>DVtxGd~O8v@NFz<+l`8^#e^KS3})bovWb^ zILp4a_9#%Y*b6m$VH8#)2NL@6a9|q!@#XOXyU-oAe)RR$Auj6?p2LEp*lD!KP{%(- z@5}`S$R)Kxf@m68b}Tr7eUTO=dh2wBjlx;PuO~gbbS2~9KK1szxbz$R|Frl8NqGn= z2RDp@$u5Obk&sxp!<;h=C=ZKPZB+jk zBxrCc_gxabNnh6Gl;RR6>Yt8c$vkv>_o@KDMFW1bM-3krWm|>RG>U`VedjCz2lAB1 zg(qb_C@Z~^cR=_BmGB@f;-Is3Z=*>wR2?r({x}qymVe?YnczkKG%k?McZ2v3OVpT* z(O$vnv}*Tle9WVK_@X@%tR^Z!3?FT_3s@jb3KBVf#)4!p~AFGgmn%1fBbZe3T53$_+UX_A!@Kz63qSLeH@8(augJDJ;RA>6rNxQYkd6t(sqK=*zv4j;O#N(%*2cdD z3FjN6`owjbF%UFbCO=haP<;Y1KozVgUy(nnnoV7{_l5OYK>DKEgy%~)Rjb0meL49X z7Fg;d!~;Wh63AcY--x{1XWn^J%DQMg*;dLKxs$;db`_0so$qO!>~yPDNd-CrdN!ea zMgHt24mD%(w>*7*z-@bNFaTJlz;N0SU4@J(zDH*@!0V00y{QfFTt>Vx7y5o2Mv9*( z1J#J27gHPEI3{!^cbKr^;T8 z{knt%bS@nrExJq1{mz2x~tc$Dm+yw=~vZD|A3q>d534za^{X9e7qF29H5yu};J)vlJkKq}< zXObu*@ioXGp!F=WVG3eUtfIA$GGgv0N?d&3C47`Zo)ms*qO}A9BAEke!nh#AfQ0d_ z&_N)E>5BsoR0rPqZb)YN}b~6Ppjyev;MMis-HkWF!az%G? z#&it84hv!%_Q>bnwch!nZKxB05M=jgiFaB^M=e-sj1xR?dPYUzZ#jua`ggyCAcWY> z-L$r#a{=;JP5X}9(ZPC&PdG~h5>_8SueX($_)Qu(;()N3*ZQH(VGnkWq^C}0r)~G3_?a10y*LsFz zokU5AKsW9DUr-ylK61shLS#4@vPcteK-Ga9xvRnPq=xSD_zC=Q_%6IuM?GpL(9aDx z|8d_;^6_D4{IQ1ndMAcFz5ZaT+Ww0wWN`xP(U#^=POs(BpKm;(H(lmYp+XCb7Kaw0 z;LT945Ev3IkhP6$lQBiMgr+vAL}{8xO&IObqJBEP4Y^x&V?iGC=1lVIbH^Z!eXxr@ zz)D7Fon`z~N|Pq>Bsue&_T9d;G+d8#@k^cq~F^I8ETsZ*cGOf*gZ4ghlAzW|aZ;WA13^B!Tlr0sWA zosgXD-%zvO-*GLU@hVV(bbQ`s@f~Ux=4}(@7O)%o5EH((gYflccBC@jbLF3IgPozv zglX2IL}kL1rtn4mu~`J(MMY83Rz6gc1}cX4RB+tZO2~;3FI# z@dU(xa5J_KvL0)oSkvwz9|!QcEA$jKR@a-4^SU3O449TrO+x$1fkBU<<=E_IHnF6> zPmZ7I2E+9A_>j6og$>Nih~b2F_^@6ef|Hm-K2(>`6ag{Vpd`g35n`yW|Jme78-cSy z2Jz7V#5=~u#0eLSh3U4uM3Smk31>xEh^-Os%&5tK6hSAX83jJi%5l!MmL4E?=FerNG#3lj^;-F1VISY!4E)__J~gY zP{o~Xo!8DW{5lsBFKL~OJiQoH>yBZ+b^};UL&UUs!Hbu7Gsf<9sLAsOPD4?-3CP{Q zIDu8jLk6(U3VQPyTP{Esf)1-trW5Mi#zfpgoc-!H>F$J#8uDRwDwOaohB(_I%SuHg zGP)11((V9rRAG>80NrW}d`=G(Kh>nzPa1M?sP;UNfGQaOMG1@_D0EMIWhIn#$u2_$ zlG-ED(PU+v<1Dd?q-O#bsA)LwrwL>q#_&75H)_X4sJK{n%SGvVsWH7@1QZqq|LM`l zDhX8m%Pe5`p1qR{^wuQ&>A+{{KWhXs<4RD< z=qU6)+btESL>kZWH8w}Q%=>NJTj=b%SKV3q%jSW>r*Qv1j$bX>}sQ%KO7Il zm?7>4%Q6Nk!2^z})Kchu%6lv-7i=rS26q7)-02q?2$yNt7Y={z<^<+wy6ja-_X6P4 zoqZ1PW#`qSqD4qH&UR57+z0-hm1lRO2-*(xN-42|%wl2i^h8I{d8lS+b=v9_>2C2> zz(-(%#s*fpe18pFi+EIHHeQvxJT*^HFj2QyP0cHJw?Kg+hC?21K&4>=jmwcu-dOqEs{%c+yaQ z2z6rB>nPdwuUR*j{BvM-)_XMd^S1U|6kOQ$rR`lHO3z~*QZ71(y(42g`csRZ1M@K7 zGeZ27hWA%v`&zQExDnc@cm9?ZO?$?0mWaO7E(Js|3_MAlXFB$^4#Zpo;x~xOEbay( zq=N;ZD9RVV7`dZNzz+p@YqH@dW*ij8g053Cbd=Mo!Ad8*L<5m1c4Kk ziuca5CyQ05z7gOMecqu!vU=y93p+$+;m=;s-(45taf_P(2%vER<8q3}actBuhfk)( zf7nccmO{8zL?N5oynmJM4T?8E))e;;+HfHZHr` zdK}~!JG}R#5Bk%M5FlTSPv}Eb9qs1r0ZH{tSk@I{KB|$|16@&`0h3m7S+)$k*3QbQ zasW2`9>hwc)dVNgx46{Io zZ}aJHHNf1?!K|P;>g7(>TefcLJk%!vM`gH8V3!b= z>YS+)1nw9U(G&;7;PV4eIl{=6DT^Vw<2Elnox;u@xF5ad*9Fo|yKgq<>*?C$jaG2j z|29>K)fI^U!v?55+kQ*d2#3}*libC4>Dl4 zIo3Jvsk?)edMnpH<|*l<*0Pf{2#KedIt>~-QiB{4+KEpSjUAYOhGDpn3H_N9$lxaP ztZwagSRY~x@81bqe^3fb;|_A7{FmMBvwHN*Xu006qKo{1i!RbN__2q!Q*A;U*g-Mz zg)-3FZ`VJdognZ~WrWW^2J$ArQAr1&jl~kWhn+osG5wAlE5W&V%GI{8iMQ!5lmV~# zeb3SKZ@?7p;?7{uviY6`Oz16t0=B70`im=`D@xJa16j2eHoCtElU*~7={YUzN41sE z#Th>DvJq-#UwEpJGKx;;wfDhShgO0cM|e!Ej){RX#~>a?)c2|7Hjhh2d=)VUVJL<^Aq|>_df4DX>b9W2$_DM zTjF#j(9?Co`yor?pK<16@{h#F&F8~1PG|qQNZPX^b!L*L&?PH#W8za0c~v6I2W($Jderl%4gufl z#s;C*7APQJP46xHqw;mUyKp3}W^hjJ-Dj>h%`^XS7WAab^C^aRu1?*vh-k2df&y9E z=0p*sn0<83UL4w30FqnZ0EvXCBIMVSY9Zf?H1%IrwQybOvn~4*NKYubcyVkBZ4F$z zkqcP*S>k6!_MiTKIdGlG+pfw>o{ni`;Z7pup#g z4tDx3Kl$)-msHd1r(YpVz7`VW=fx9{ zP}U8rJ-IP)m}~5t&0Y$~Quyjflm!-eXC?_LMGCkZtNDZf0?w<{f^zp&@U@sQxcPOZ zBbfQTFDWL_>HytC*QQG_=K7ZRbL!`q{m8IjE0cz(t`V0Ee}v!C74^!Fy~-~?@}rdn zABORRmgOLz8{r!anhFgghZc>0l7EpqWKU|tG$`VM=141@!EQ$=@Zmjc zTs`)!A&yNGY6WfKa?)h>zHn!)=Jd73@T^(m_j|Z;f?avJ{EOr~O~Q2gox6dkyY@%M zBU+#=T?P8tvGG|D5JTR}XXwjgbH(uwnW%W?9<-OQU9|6H{09v#+jmnxwaQ-V;q{v% zA8srmJX7Fn@7mr*ZQ@)haPjWVN@e3K z_`+@X$k*ocx*uF^_mTqJpwpuhBX~CSu=zPE(Sy%fYz&lzZmz3xo4~-xBBvU0Ao?;I-81*Z%8Do+*}pqg>bt^{w-`V6Sj>{Znj+ z70GS2evXinf|S#9=NNoXoS;$BTW*G0!xuTSZUY45yPE+~*&a-XC+3_YPqhd*&aQ>f z$oMUq^jjA;x#?iJKrpAqa<2<21h*_lx9a}VMib;a6c$~=PJOj6XJXJ|+rc7O7PEN5uE7!4n9nllo@BI4$VW2Nf_jqnkz%cvU4O4umV z#n6oXGWOt3tuIjmX*b!!$t~94@a@QgybLpQo3icAyU`iNbY~XNAArFAn$nFJ()d-U zFaO#nxxVF-%J{UB**uRo0*+?S>=^il)1m7v-u`PDy*ln%|3E-{3U~R=QcE&zhiG_c zDnGMgf1}3h1gWz8IV0Oc7FmEt>6W?Eva;J`(!;IIny}PvD?vztz`F6su_tUO`M%K5 z%C#=nXbX})#uE!zcq2mB;hPUVU1!`9^2K303XfOIVS{mlnMqJyt}FV=$&fgoquO+N zU6!gWoL%3N1kyrhd^3!u>?l6|cIl*t4$Z$=ihyzD7FFY~U~{RaZmfyO4+$kC7+m zo+-*f-VwpUjTi_Idyl~efx)!$GpE!h+in4G1WQkoUr<#2BtxLNn*2A>a-2BL#z%QO@w0v^{s=`*I6=ew2nUj1=mvi%^U@2#Wf& zs1@q6l8WqrqGm!)Yr|*``||#A+4#du6`mR^_#?CymIr}O!8Zm?(XY$u-RGH;?HFMGIEYVuA1& z`3RlG_y0%Mo5w@-_W$E&#>g6j5|y1)2$hg(6k<{&NsACgQQ0c8&8Tdth-{@srKE*I zAW64%AvJJ+Z-|I~8`+eWv&+k8vhdJk5%jolc%e`^%_vul0~U8t)>=bU&^ z6qXW&GDP%~1{L1-nKK>IsFgDJrh>!wr3?Vu-cmi#wn`;F`$GNc_>D|>RSuC8Vh21N z|G;J1%1YxwLZDD400Ggw+FirsoXVWYtOwg-srm}6woBb!8@OIc`P$!?kH>E55zbMB z8rdpODYfVmf>cF`1;>9N>Fl(Rov!pm=okW>I(GNJoNZ6jfIunKna-h6zXZPoZ9E2PythpyYk3HRN%xhq2c?gT$?4}Ybl42kip$QiA+ab zf-!EqBXkT1OLW>C4;|irG4sMfh;hYVSD_t6!MISn-IW)w#8kgY0cI>A`yl?j@x)hc z=wMU^=%71lcELG|Q-og8R{RC9cZ%6f7a#815zaPmyWPN*LS3co#vcvJ%G+>a3sYE`9Xc&ucfU0bB}c_3*W#V7btcG|iC>LctSZUfMOK zlIUt>NBmx6Ed}w_WQARG+9fLiRjS1;g49srN1Xi&DRd|r+zz*OPLWOu>M?V>@!i49 zPLZ3Q(99%(t|l%5=+9=t$slX0Pq(K@S`^n|MKTZL_Sj+DUZY?GU8sG=*6xu)k5V3v zd-flrufs*;j-rU9;qM zyJMlz(uBh0IkV<(HkUxJ747~|gDR6xFu?QvXn`Kr|IWY-Y!UsDCEqsE#Jp*RQpnc# z8y3RX%c2lY9D*aL!VS`xgQ^u0rvl#61yjg03CBER7-#t7Z++5h_4pw{ZZ~j0n_S_g zR=eVrlZDiH4y2}EZMq2(0#uU|XHnU!+}(H*l~J&)BUDN~&$ju@&a=s$tH5L`_wLeB z944k;)JIH^T9GEFlXiNJ6JRymqtLGZc?#Mqk2XIWMuGIt#z#*kJtnk+uS;Gp}zp$(O%LOC|U4ibw%ce-6>id$j5^y?wv zp1At~Sp7Fp_z24oIbOREU!Mji-M;a|15$#ZnBpa^h+HS&4TCU-ul0{^n1aPzkSi1i zuGcMSC@(3Ac6tdQ&TkMI|5n7(6P4(qUTCr)vt5F&iIj9_%tlb|fQ{DyVu!X(gn<3c zCN6?RwFjgCJ2EfV&6mjcfgKQ^rpUedLTsEu8z7=q;WsYb>)E}8qeLhxjhj9K**-Ti z9Z2A=gg+}6%r9HXF!Z~du|jPz&{zgWHpcE+j@p0WhyHpkA6`@q{wXl6g6rL5Z|j~G zbBS~X7QXr3Pq0$@mUH1Snk^1WJ0Fx2nTyCGkWKok$bJZV0*W?kjT|mkUpK<)_!_K^OoTjMc+CWc^~{ZP8vgm`f&=ppzKtw}cxwV^gppu}^df1|va7Q?@=(076-( z4KJVmu?l(aQwmQ*y_mke>YLW^^Rsj@diLY$uUBHL3yGMwNwb7OR3VD%%4tDW(nC984jBWCd90yY(GEdE8s(j>(uPfknLwh!i6*LX}@vvrRCG`c?EdB8uYU zqgsI4=akCeC+&iMNpVu56Fj2xZQHs6SdWssIF#Q@u@f9kab0&y*PlG+PynjHy`}GT zg%aTjRs2+7CknhTQKI%YZhFq1quSM{u24Oy2As@4g(bpbi%y1i0^TwI)%1Whpa~qE zX4MD(PgFEK@jZBPXkFd437aL6#COs$WrNT#U=er-X1FX{{v9!0AS$HR{!_u;zldwY zKko!`w2u@($c&k_3uLFE0Z*2vms?uw1A{AqZw^jwg$|D7jAY20j`s*l##=4Ne_K5) zOtu6_kziEF@vPsS7+@UwqOW6>OUwF$j{r4=nOSf-{UC(rEKidie7IUn>5`UoNJ9k) zxJXXEBQifng+Pte3mPQ76pVlZ<`jnI##F1*YFA*)ZCEncvgF-%)0dUXV*pXTT^L`n zL=?A5Vty#{R9W4K)m$`me~*_(&a88M?Eon$P-YdVG}#Gq4=hh#w=`>8f`9}}zhv;~ za?I=Gb3v$Ln?-SDTBow0J5Tt&xPlw|%`*VTyVee1Oh<-&;mA|;$ zoPl;^f7Q~}km#_#HT2|!;LEqORn%~KJaM)r#x_{PstSGOiZ!zX2c}^!ea3+HSWrwE z=6SJ!7sNDPdbVr#vnUf}hr&g@7_Yj&=sY=q(v^BwLKQm|oSB}172GpPlj?a3GqX#B zJko4zRRttIY>Fv#2b#A<_DLx=T@eUj+f}!u?p)hmN)u4(Jp(`9j58ze{&~rV?WVbP z%A=|J96mQjtD037%>=yk3lkF5EOIYwcE;uQ5J6wRfI^P3{9U$(b>BlcJF$2O;>-{+a1l4;FSlb z_LRpoy$L%S<&ATf#SE z;L?-lQlUDX_s&jz;Q1Lr@5>p_RPPReGnBNxgpD!5R#3)#thAI3ufgc^L)u%Rr+Hlb zT(pLDt%wP7<%z(utq=l%1M78jveI@T$dF#su(&>JkE(#=f4;D54l*%(-^(nfbCUQe)FV9non9F%K+KZ(4_`uOciy82CO)OolxisUd0m^cqueIRnY< z;BgA4S1&XC3uUP?U$}4o&r|0VCC7fkuMZBa|2n4asR>*5`zBaOJPWT$bNn(W_CK%L$c2AsfSlwq?A8Q6 zhK&USSV=^-4vZ^5<}pnAOb&IKseHNxv_!|B{g@d^&w%{?x;i3iSo)+vt^VnMmS!v) zM)W)05vXqzH5^hOWWw~$#&7HoIw}}DD3bCQgc=I8Rv|G5fM8O^58?--_-*>%Nwk)j zIfvfok0n05!w%tZ=-dpffezI7(+}yX5XhwYk#0@KW%PkR;%#t|P6Ze_K*N6ns%jOt zNeW(bRsv0BK7ah~9U~UBAVA_L34F+;14x6-;I|o=%>?sS3@dpRv|GKxilsa#7N#@! z!RX~>&JX&r{A^^>S~n_hPKkPR_(~~g>SuPj5Kx6VI%8BOa(Iit&xSMU8B#EY-Wr?9 zOaRPw0PEbVSW@Wk{8kkVn34;D1pV2mUXnXWp{V-M9+d}|qfb6F`!a9JQO_-wlH?zf z4Sn0F4-q-tzkaJ?1fV0+cJBF$f0g6*DL6U3y`Tr`1wzCiwY#muw7Q-Ki)uN}{MoCWP%tQ@~J4}tyr1^_bV9PScNKQHK=BZFV!`0gRe?mVxhcA4hW5?p0B<5oK+?vG^NM%B%NDOvu0FMq#)u&zt_-g&2 z7?z%~p&32OAUSQV{<=pc_j2^<;)`8$zxCEomh=rvMiliShS?ahdYI1grE-M&+qkK_ zD=5Hexi<&8qb4hgtgj81OD(tfX3EJSqy9KFcxpeBerG`apI4!#93xpEFT??vLt>kf zac28;86CpMu=BWIe$NOT~+Es!y#+$ zvm2s*c`J9Gy*ERvLSI<9<=j*O=0xUG>7rYh^R4bGsvz;j-SBO|P^OQ1>G9_akF}D; zlRmB@k3c5!s|Vz3OMZ8M*n0AMTiSt5ZpRy+R1|ckna&w`UQjklt9f&0Z~=->XImVA zLXizO2h=<|wM~w>%}3q1!E{oSq7LBPwQ~93p-peDq-W?wCm8NOKgTSz-P)|cm}S5&HBsx#C@Ba5;hzi#Yw@y-kC~)@u4}Rf?KV0$lPjv}} zcFpNy=YJfsS||9&!-JFjw=@NU96ESzU^gme0_oNy?})II`>Sy>bUCHs_(m&)vn^&isCl+`F~qu8elAO z)-ZP7`gYE2H(1)5tKalz&NJbcutAU&&JFV~$Jrai31^j>vZ|HV1f}#C1<5>F8 zS1RWIzM%b{@2dAF^$+i4p>TC8-weiLAPN+Aa#(bxXo9%Vz2NEkgF&s#_>V?YPye^_ z`` z-h3Cv^m6K%28I$e2i=cFdhZN?JTWhqJC{Q9mg0Vg|FiPEWDl&K)_;Bz_K`jH7W7QX^d$WQF*iF@#4_P*D36w9&iJr2E{w?LRFapwZIIVHGH ziTp*5>T{=;(E}z{1VL4;_H`BAXA~&zpeWX!gN9m|AfcJ{`!XVz48O^&+0Gd|w;udP zzU|DbGTS|7qZoEoDZEH9Kb0%DZvCaWDzuJ=8jZz}pqPn+I!c_+*~>m>BQqN2560*< z$6sx_y8WRqj$SugYGip+et$;iJ!SQAx=HgVSh_3e)MOFHuXD@sg>Yi_p8Sh`{lP=5 zo?AFv1h;KqR`Yj!8Pjji3lr+qae2|a1GmlxE*su%_V)K0Xu0(#2LcO!*k11w*V12$ z;f~i{kI#9PzvFLZ3pz@d558HeK2BTvk*JvS^J8L^_?q4q z);;4Z!DsV!P*M>F>FiF*{|p_nUgy;pDh?J8vwO;emgOAAcxrgDXiSDS5ag?0l*jj< z(khZ3-)>eiwPwpb6T9meeL)!2C-K@z9fF`0j|t@;^f5+dx86R3ZM{bnx9Hm1O$s)N zk$OvZR0u2`Z^QP8V%{8sEhW~_xbZMad2jtz&0+ekxmp;9`ae;_f%-ltk5E%)VT*a6 zRbMnpCLPnalu+1TafJ4M0xNV8g}U4Mjk{le6MA|0y0rk)is}M%Z9tUU22SvIAh7`w zTysd{Pztfkk=jD^*!lA+rBcqb)Fx`A5iaU2tl&XdL1D)U@pLEXdu%#YB*ol1N?4ti zHBQcU#_%UqiQ1)J^u-ovU@-7l?`YzYFvA2#tM0mEh3?CpyEh_NUuVajD16t zyg$C*5du9R=K~6mCJ`W+dFI$9WZZauO)p2H)*SKpHVsIu2CxfJvi2>; zcit#57RP7DpSwMF-VBm|4V5d=tRgX7RM9%KQ0JRo6d<)RmiIPWe2zh6tmswP`fs^) zwy};#jk|NXMqCSfwIR3QZ#W2`(%sJ>qvk=53CYoLmQt9q|2Gm$sB;rEuBqGJA1OUM zoyl4Wy-HYn0J6L=cad8o)R!Ea^;`rSMg9hYo3?Fw6B9dUq75a-MSb56n8~AAsS(JP zZ!1khPu}!GRpsj+jvl`N1tDD8m1myJCI3c-c<9U-1Vg`xJO~}5_wvPXYh^=Boo^|V z3Tp}|lH!9m4Ipa_$p;b8fjUd=zc4iO7vr)M&Xs0_m$fgY@+hB9%K~4*9$p0d)m2bO ze5JH`W0fnIKdcW!oO#^g1YceSQ4u->{>u@>tLi!fky)o&$h(=he?Fe_6?}O~iSf(F zV&(P~*5h>BW{3e1H%8*7#_%L1#>W97b0@jHtliES^w6w5oldI7QL+?I(Pl$DaN>~d5nXx z;CO1E+S?3E2PLq~)-?ygkHAO1m&hOYmj7?;2XM!$D^f0l9K4P{n}mgb{CoYH6RJ8o ztydc6dNqA)`CG?=Gd~EIbi`UM)eyzGF^+i?&TOdyW~mFH_^Gye(D}clDVFQ@V2Tvy z7rQIaq8Xx`kC;AO-_{k%VI2e6X@bIy^mupEX%{u0=KDUGu~r6lS*7GOeppy{&I&Ly zjOTz=9~jC|qWXznRbrfjg!1`cE!Hzyjzw6l{%>X)TK(UEGi9Uy3f9D6bbn0gT-s`< z8%$Msh!^8WidX7S;)n2jh_n1-QCtSyOAKcPQc(Xlf0*Q|5CSBjo(I-u!R0GJgzTkL z|6QdQRrUMbUO|q0dQ%+d^4)*Mjbm$R}RUcz(7|E0Bq-bAYY@)OsM<+2>}CV zzPBgeD~kBHE(Y+@l2orJrdtV7XXq_V8IETas%7OCYo`oi)+h&v#YN!Qpp7drXFS>6 z?r-q7px+(rIy+bo1uU#I2A5s@ASe01FgGMbouFkhbkm-9yZ8Q2@Q1vuhDQ3D3L+zA z(uz8^rc24VmE5r0Gbd;yOrXnQKAEBfa3@T7fcF$#QYv^00)VZPYehpSc@?^8we}o{ zlX0~o_I<`xSfI8xF(WXO-DX1>wJ`XN?4rw@}_RLD*${$}UaXL=oM(=SDMIxZj1Ji#jAcrH7nYG`r z#ewodj>F5Bf9j(j`a;>)=*2j_ZN}vf!~Hq`2Eyt;9UH1_(yjq1OUO(1M0lI3FZ2j-fU9)L59v&OiQ>5$;d!jg?Fo{Svf5t5FCZbb?)* zJN=Q!?2BztV$7)CWtG0MO~Lr4E5>aoHD5N4(+@~gQEbZTc4s3HrIl_G23PCng4Y3f zbLZK1A-x9x!)WwuI=UBkQ5QyE^&Nrw?@fsRKK41G9-xq=#VyO%CEo`{_eioDj%M!3x=>I zfOPFiFX{1t-|+3E@?UuK=0miGN04hW0=JnJrEyWw{Bg-jMvAA}cg<5LN1c5BQdrIZ z#+bxj9Jbu`11@IUjU|RKfL(UzRlVB4XT ze|(WaxL$KiRqkgCr3^Al(19!_Y7b=E(4Xm7LCO$y5+k;Fu6B#=OSzW`-7p{zRv-_) zPr!|km?8aF}+3hm)QG92YaI+jctX&5IrvTUGf{Y$)TK6)s9v!SMhU=HIpEC~2 z4>o14mG$El2sTA(Ct?xS!l*x7^)oo}|3+BF8QNe;bBHcqdHVmb?#cbS*NqZ%mYS~z z`KLoq7B#KULt%9a#DE%VTEo4TV03T2nr`FK5jUTA$FP0JH6F9oD*|0z1Yf2b5?H0_ zD|K|_5Zk`uu?ZN0U! z_mL>>F;mnHU=@to!Vv*s4;TQr9y)L@1BXXz^a85NSifPTL4h6I>+m_S3~FkXB{N?E zS<3ue_(wqaIS5;4e9{HB`Okl9Y}iFiju+oTqb)BY)QT?~3Oag7nGu-NB5VCOFsiRs zs@m%Ruwl^FuJ1b}g^=*_R?=SYJQ@7o>c9j>)1HgB zyN9LI9ifwu{Shlb6QO2#MWhxq~IG!U^I!6%5}(sbi>=bq8!8@s;4Iaun#kvh7NPwX34Rjbp2f!D)cF&sNIO%9~;C`cs&ZY2=d@c3PpN$YZjUT}X7rY`dlWX$yc znw(7=fzWapI=KzQnJ(6!o0K_aDk!^dZ#)pSTif+jQtQXga$bPApM z=);jZ5c*?*GoeGMnV0=RrZucRRYBjx>tx`A3OuY)#tp2w7mh}&kj)SKoAvbbf;uO! z?+RItUow0xc*6StuO4D--+qY!o}Isy}s;ts5aM5X~eJUZoLOq@dGv=a4hHJD<* z5q{dZSN{bv_(Vj#pFm7Q<$C;MwL|Qizm~QCFx~xQyJoCOZ$`sYD}}q>PwRZjb<=E< zAeMP?qVfM>xu2}Il2xT6={KBdDIstxY-`5IWXN zUiWV&Oiy5R_=2X9Y$ug9Ee=ZSCaza!>dWBMYWrq7uqp>25`btLn^@ydwz?+v?-?2V z?yVwD=rAO!JEABUU1hQ|cY+_OZ14Hb-Ef`qemxp+ZSK?Z;r!gDkJ}&ayJBx+7>#~^ zTm<>LzxR^t-P;1x3$h;-xzQgveY$^C28?jNM6@8$uJiY81sCwNi~+F=78qJZ@bIsz1CO! zgtPM~p6kaCR~-M>zpRCpQI}kUfaiZS`ez6%P6%*!$YCfF=sn}dg!593GFRw>OV2nQ ztTF6uB&}1J`r>gJuBP(z%KW{I^Uz%(^r5#$SK~%w1agl)Gg9Zy9fSK0kyLE24Z(34 zYtihZMQO^*=eY=<5R6LztHaB1AcuIrXoFuQ=7&C}L{c?Z$rto$%n=!whqoqG>#vvC z2%J5LVkU%Ta8hoM($p1WqN}wurA!d@#mQGU5Nb>~#XC84EYH)Zf&DZR!uY+-;VqS< z@q?$ggdX#auS#%%%oS^EN)?JhSR4JYpSgGRQZD<9!YvvF+zp0>C#$!x*x}l8U|Bb& zv?v*im5Bq_(5Wi40b1^nKun$XTST(a8yOAcqQZmKTgGLo)Ig6JuEh5J9NnqJXin@Gxzz-k6xXWYJ&@=JZw=$+ zFPGde%HsR`gI+y`rtiPaMYwbtyp!sVb!pX~;c3zLoPO0eaZSV+O_z z%9H@UhqNowzBTPcMfL6kC>LRaFF6KVaSv1R@%4}rtleX!EMnL`rethYrhTLj1x$tj z;)H!fKo08&T(;i|FT&rPgZ*D0d=B2dXuO_(Uaoi9+vEhs4%{AD{Fl@4^|`X=PvH(s zI7$6bWJiWndP$;&!kSCIR1l57F2?yzmZm~lA5%JKVb;1rQwj*O=^WW~`+n*+fQkK0 zydInOU1Be2`jhA!rnk1iRWR=1SOZpzFoU5{OPpc&A#j6Oc?D&>fAw=>x@H7?SN;d^ z-o&}WR;E|OR`QKItu(y4mT)%Pgqju-3uyH?Y@5>oSLO2Y(0(P!?_xOL=@5+R7rWw# z3J8%Hb@%Pzf^`=J6fEJ_aG6+e7>OUnhaO1(R1<6>f}L z?d@Wnqw9?^;2?q(b@?Wd=T6r_8a@Z4)*_@Q7A`+ zW3w?j!HW0KbhxF%D`9d2HpvIrBxM!36W3Yh5=8_0qYfnHm*yiLB?Ay|V10N%F9XYq zanaDtDk$rS+|_H_r|a${C}C7b{E)Ii20-a?Grff$E?&|gWF<#Ern2GqhCiS0~Y%knIi8zY^lE4qLaR-3M;_Rkz(s;wu z9207W1PXIe#4h4Zw}dvdV&FYcnUlD5_C4hzJ@bPSBVBLpl$&52mi+wwH;svyVIzAB zoA+NQ;Hpqh?A}^Et~xhl>YQNQwh20!muW{ zq}|Pg3jHZWnDBN?r1KhiVG$%Sm-4+=Q2MZzlNr3{#Abqb9j}KK%sHZj{Vr2y4~GIQ zA3Mz1DjQ3q(CC~OyCaZn0M2!){)S!!L~t>-wA&%01?-*H5?nzW?LJB`{r&)vLB4!K zrSm({8SeZ0w(bL9%ZZAZ*^jf=8mAjK^ZR0q9004|3%73z#`-Npqx*X^Ozbja!C1MW z-M~84#=rU1r>p{+h9JU<#K_x$eWqJ+aP%e?7KTSK&1>dlxwhQmkr69uG~0iD@y|L- zlY0vSR2|IhZoS6PpfUai_AhKo2HfdD&mhv#k51CX;T z*sU)XbDyfKjxYC$*_^(U)2-c0>GJ(zVm$CihHKlFSw&1A$mq$vsRt-!$jJe3GTaZ6 z3GcVvmwZ0D>`U+f3i*pQ>${p1UeyF~G9g~g-n{ThVOuC#9=ok`Zgz@qKCSN!1&P`N z=pdlGNwal%9;)ujwWH*#K6CQG*fJDAQiKlO2vKJHeA1lj&WQC+VU^@ea8$#~UOX$*Q!V^8L- zL0$W5(Y3=??%&j_WUq6*x>=?BfmI*d8fmDF*-!XVvxL8p7$r+}Igd_(&`|D*;Z#GE zqm{tHx&aHBpXw&~l6>7-FlyiSPJtTJblAjLU5Ho$FeN0mDguFAq?r+6^~o6|b+rfE zGVcZ&O-X~tE3liGcdI~hHSCT+&F&uH8rr&f{6pr^1y5061`fu~=^_|Idrgti5+*U7 zQOb9G?Rz$j-G0Y}x+i{HB0!4ZmKzykB<0;Rbmo2)T4|VdcwujI_otLG@@8OOKg3kw zP|0ST0D4@zT?O=(0Pikp)Rpwxw_VsmW4!^j^sFd6r5l zw}SG_HQPs>ae%Bq{sye_SaBX%|F-}&^)Wz@Xi<)YNbO?lPs7z@3c;$b^Aw@>E%mOj zW^c%IdtC(Kk@s*}9NbKxEf8SZtP+32ZTxjnrNWS7;W&D~ft{QY?oqOmxlV7JP!kW!Yj`Ur{QbbM1h=0KMaIAmWiISb7TKd4=gMeo+Tcz2>e#NihnOV%iNdx` zeiuoOK^{}D+M+p(Y7EC=&-`$B0F< zQ=zHaM;&QQR4jM$sG=N&sqOvD_Bx*drQ6c@u0()g05cwl`Xm{!S_Nuaa2KlL*rmmk z51yPE)q?Bl$sNM474Y!=zZ zc{EVGpdJ!Su{Qq%llR5O6#zK8l(ld*UVl87@|iaH@C3+*;XBxjEg&fsQrzpMo3EEG zv*Tpms7a;7!|iz8WY7={0a$0ItO-(ajXl;wX_$$yzEF5k9nc>L3wv!p{8h2)G0W?h z{v6vH=7+>$Ho^+)9hDtCd+S_yh8pzS9$)hYev-=eDu?lGIR;-fgz+dr+wcmM-^dZp z9}`&kAf$~z1ovF)>Hgxc!Xe3cju-jQRluCm;c_1=PYQygb?Oxe z!QG0L3sT_k=WpfOPL#|EPlD^t;ENCC39O?tHd<(kfx7SOcxl+E#;ff19_+{vbkZSvbS$I{#>31KZj^$n%ayX0jj}EvsgnHg16P z_A6Y)pdp>kLW<;PtR*Vs#mVb%)ao7AXw{O&hBDmD;?mc3iMH;Ac@rZZ_BQa8CQ~|0 z&d1L{in-z--lBO|pxqc%bqy^~LAGv=E*eaVU~OeuVV{d`Vv#-_W7EYdTDzVraG9H+LC_dWcgZMn~KcP)XvKWbcr5&d+=a>{*(Ha6Y1$==bR z{O-?$7H;`2dt0B%Vm?6`_?ZOjJkyu9ZJsh^WH*+es&^@KDcR%Zej%3PJ*XovgyhTbaH(!H1H_OF~=*f55Jr8A%uW zz5IoAB~1e2-tDGp9}`MnavAMy?jgPM5F%y`%$}dFLrz_* zIrO=afT8+AkK5B1s3{ZDVP$g6y$-*U*=?-fh!cNyn3q6YhNhfRxW&GLIJ2#>9bYMD7-F%{|Iw%@a=DoAAU;3k9p$`V zImKm{5HU~wq|nQFwab)_7lNckW#1z2$|oW5x7vDbBURVjw8674P?L1ogMKpHoV>;# zO%*1OwI|($UOr#hL(*M~qsn3PF%_|15uc%Hy9@D>_~N|?<%lig6yKX0a#1s$o(^Laj8bF#5fGPOFMGmMiUaxSwE}Qf#SG_f79d2Iv=TFBXzTpr$^avJ?=|arh2<+ce}&248Kw0} zhlva`wD6X~s7|37la4FnFOgIHhBiFo`lw~?lSbk{>)P(3jyVhM4O)a=GX3(sW1vIC zz0mJ>;J{!eN5#nf2>$u=3Kq>`7u9QnChi8>CjONBN-b+W_UQIuN#{N$Q<$}IOvpQP zB&5ZrY{V&D=4)voh;6<1U`PFA>V%XUW73S9D^J>cQYfzIyIV5i35WNb5K9c^|M}=* zN_C3rnjCZP1^v{;EaGK7Tp5z~B#?f5NZaAsFUOLK)mI~bJTaL8DF_eRikE{%^J?y9-n_U32EKHPCkB^ZN2*zk{bC=GM%_I z61}nkr+Plg6S0V=mY>H_KQU&)P~=y3$#$*U8FunXkb_e1O-7t@m$5re%u!_G%^?_| zRIJzg+lX$}+ba|qx)Ec6c^ip;`_QfQrD~SPa4MoyRUOtX&~^XWcO^a}KBkXK9J{ZFOA~rovYa0!7btTC*=xNQrwJ)$Eu`TT$;%V&2@y@$ISdNn ztbM7|nO+U9r;ae{{;QiNEYpe4nrFq_x3 z4Tvf^b(I@_3odwhVe!aC0X&~inrYFu# zh)+eF__8ly&nLr4KlLWl%B_ZMo=zCH2QfO^$lJ zBvU*LQ#M(5HQ}2Z9_^y~i@C#h)1C*?N3v68pY+7DD09nxowdG#_AAM5z&*|-9NcB{ z_xKUY>Ya7>TO#Bat}yM}o(~8Ck^!QHnIj8N9}c*uyIs}IEqGn`xP;q3vhW6gsqUe>`m1 z)~ad@y1=?H`1SNl?ANCs5ZD`8tG&Hi=j|R%pP(%gB8pd)Q--E?hWU@)e?>SLV4s(- z!_I^oVC0x97@I(;cnEm$ttKBnI3gXE>>`K?vAq~SK?0YSBsx{@s1ZdiKfFb|zf}ju z7@rJb3mC{U`$R`YS(Z#KyxQx_*nU`kf;}QL%bw17%5~6!mMao^-{FFmX}|ItFuR~F zAAvTF%f4XKYo>2-PJ~ro@Ly#t@Sf69CrA+rmMRpihqH7V&SXX+$Sw`HZF`I*_3Vjz z%kPMyN0J3sl>X{-h12)j&XRhAAI;Aou%%z}gI>G+32z*qpZg{m`CezFrzg#&yc<1` z%j~}PN!F5Ddq(>R{+t0v{j6v^0XwWGu@5+`-$m`_>pCzM`r}wz*8Qv=$|P0R$%tJp z>D+N4GZ|Tg>XL<6XP9_wQRGDs^1icY*5GP4>*7mGMr;V zI%kT_^_SQml6$#uRE4Ps>}?ES)_XI8m-%GN{o^itb^S7e_bM$-wo_Ws)W? zx4_6#*X;T$n2N==N0#xzb~BQU#%^NF6|~898JGDbQxjK(ex;Q}_Qn@?Y>!kkUYUeY z&VclG1#eDPU78K@^p3tAUvZi1(nFfk6AAVHWt)Wbi7dPbjA4isOY~?*1&asp!wg#Q zSpSI6*!TGn3|-%vuJE<9V_1EKkz_0%z}Mb7;E!uz)+0^k;@x+<5tzj5 z!InbRtc`YwNCbCac{plY&Y}hWp#PC{o@5UsBj#tv3f^ns^`;$MVN?>q!pW+MYeC7= zkWr1kAX(0xVQ<{qny&CO*|g1{Mk_yE>1t}_YT<5#p8P7QXf;o|s>XQ#SoA&!ddE+8 zOM&VsxsRGS(Spli?P$^pK7Ty{v86RP_6h|MU^J z`J>vn0|BG3Vf!uR0zM|GwtiTPZNb;a@@1+V5+$P4GI_&$%6m!YRGL=lz5kh?z#5f55 z76COi1`R(5p69;ThuQnJ$R3w?I?jigai2arApagd=^tT~oMUWp^u|H_@zXBjpI)Dv zEFc^_`mVu5U*;ClT?x-t9{#fto_+92GF^dotz0sFWTDwZ`s40AY@mv+Qh5c-Ts8Zp z!(v7!zPvFhUZ-xkR!IvaW`{PqN|k)L4*anbtmK+UU&K*awl?DhxRalbtmDw`$#VzK zYFaG}?$F)1j`Qx7wbn|XzMJ&g@3Ai#u5M?%CLPghk;lD^)-|21{Sr+M(suBU4}6CMTMxc_tD;X;z<1-{FeHte=kh1B9O6Hl z!v2i$d1VFC&z&58zU0`G#7^K3Cs@9LYN16O%Vz)?-iQL!G6&sg6aaX>DBZmm@lFrRJpcL{K3(;+`$9GDFDw62Mud@LZjabzVC=w$dx>TQa}U z-{dhKYTYx*C=Fio`ez@wrzx+p%Fk3i&v?6ENXMb3p^?;_&huLLueDwr zpRqHbU%i;9TmexFxCS8F1rPo-ea3!}!ew7{(($76Rdnfa`~$9{8H@f7U&0&HjZ3TZ zuBc||%FljS_e&wNZ$1ezT$*})XAfm??$_cY_?13vM^tT0EKY2ptb+v5P10}a%aTk_ zh8@_T{ns2@jTFhv`)-Vxh}u(0DiL0MUi(We_eic$;gCoqj(T_S{jDo^PahnKJUp3@ zMOk+%weP*c%K6VFXR2icY`J~-&fVMYUg6fsFI->jlA|9`+07y~$Fsz}^;w;mNk$ms zu?y)VA@QH__tvYDudhEWuDD20H&uvrf_boY{($?5{s-SDjyRxSC%%2Xs5d2dpjdk$ zU*NURD#ovwIfd^H{fXR@UuaooJtQr7$d0+(K+1UEwtG9_T?sb$ExV$e-bpf}a@YUe zuzInI59w!x;<)>Be;a7ukLW>V=8~J6nKU<0@H+SQ!Be;1Za_pw#hiuW_PMPBo8W2G z*WDtiIAN<>HQOmh)DMi{s-0H^GmV3QMf4Zu(zXT!-c;2)uv4gUwt(-}-N*|KUOo$h z+Ak^R)h8yB5UD8 zsSjHgY}KguNi?xV=tdCWqJR!~dDpFQoRJOwxrWH^vfRq4%)v;sDfIjsLXF^)uy>!i z*S8Njd7yfa`+7(|8H9j73Rh|TwFpF(8H-p;RLLIU>k<*qI%A*SL{u$%<=X@Jm1QFe zVkQ(X8P4Tohl?_tSO__^aqaI?k$CC8uNLv2mp_zD@4oDaZfEN5;3#XY!L{8B!;Dtt zb~Zge@JF|#Gsk^5$-|(OPI73po|WZh<`UxaH#Y2!&p05Ph?H)d3Bc3J4sDi$f(6K`?&D&~eHVuE@_Prkt>_&8&aq=OzoN!ANkvho;qIX(g|d#EKQbJ@;-%_iARmgSF1fEK z@B4W@5mDME7AzfL**c&2#B7xO9>rA4x$rM{N=%0=goumK1kL{TF@CSk0yvqR2oo&m z)?nyiL$9~Jt(qnEuWt9Hc_duim%|zJQYiaF*~orVNDvJB;`%ZW_2x%Uu01LeX-JP& zD&fas6d3=igAgcfeki79{5!XPHHYR#nfLYRKv^wkv~cnEbLHMwQ8%yCZI^rK!D2qT zk40Vg;e!_!3d56&umIuidN?6MTZFzHot}AdqKzDh#w0s`)cV!2A74RSH1@lDXtC38 z+UhO4A9?oZEOV{bIgGd1{2qMR&xT+}q!=I8m)W23v!W2WPC?Tf!F!e%_(m^lQZtq* zYwi}gY(KZ*Y^OWRNj$Ph#uEEBM+wtN8QFQ@^`GDOln^ioNrmtvzNNi*qS5lPHxI96#sMil*teLVaa%$msF>@5p#SjT%q8|<4ZOUB#!-kG+|eFSED z!|3c8fXaym9qH`L;pmqTWcG}WE$(h1sZ3seM>)E3ptoP<;~h~qe6XA)lGVanf&->P zjZwi;_;Dt+bYdAeD_XSQ-DgXRXqLv`3Wcgl}myA-JlzBBIh zWq4Q*9#(zjAk_H8VS_AJ`?OS*^gB-rp|~qt;v(C5ef=SErv;~zL64hW`#g!UZQcvZ zF6Ra@S@YhVSkSWVAY=Z1w)w-hfJDRwKTUH0o-OG5TlW0HDH36hIjnP=?A+8u1)Qyy5U8Gi$! zt^!vy|f=YHfQ`ZRK?D zXXn*kItRg50vr2+_hV5kjOleg#s~z(J2p#`=1Tq4#JS`MC^e4p&s7Ir=3m(K$LW#` z=ULCoWtna!so+QQ*JHb~6Ps9_&Ag>9qsUskp0pKbi`n?(u3&@QT!?}N}rXn z>1eHi6(@LicU*AR1obe+nbzTCD#VTJ`PFLRT(nc$NWrhsgRwFni*D(#?W^x=J6?|b zENSc^D}s>Y55)PzFs2d_2;yh89E0ZIgs&>6JV=pL6k9g_(`$04EoY+Zjn}}8e#n83 zJ=zB>BU<253Erdo$wE4^+@QQJFZyAj#(InFlN;!UGg96R@{Y&%OlGG;dM)^X8=Ddw@&2Vx?zui$tO z-{zgaU7&F!xs=e`Mn}r+xrdIAmkraRN_7P1?qu1|TZ%1QR(Mn?k+pq`Xys2v9Gs=a z?r@g&;UKcM#?36r9k*eVD(}9qe8?irotsn0+eHH8*4 zPX@Lusr)$J%8jarx5ssEJ?twFyu4kAbrf`96_z{6at^&UkyDzFa69RXP>PeK+dAWqE5<5P+aHa zs<<*+OO_2ObTXau%y)Nn{(p5`XIPWlvi|asjYcui;E@)Ig{YKBXi}spqC!-P5owwL z3L*+9;0C0G!xoN;4KNfDaElv>1#DMDglI&MAVoK2+c2Pr8&sl*1dYj=^>NRS`{O&%YV25@5*eoOvpD_(xdKsnqb^`T}bm;n0BN9ben1Ynyi*OOf;qLpf^ z!T{}GzkXSszN_Xqzp>}S*Im)_Y8~2|B*ybw(U=Q)5_NcMkT;)1&52YQJB)Tn%kPK! z@3;^AI){B(&UOv<{v9KKJrInkdcXV0%O1%1=7vYV*j?v(Kp~arZio$#(A@$kYB3aM zRdm4!^Je15%66($EkCIWGhi@=kNAyLJ3ydlJnCpPuxH0+OA}J)+t8d7nT->##Nz4w-L=S7ExQt=Rx}S*mpT91(>t~qe7tM%e|O)TIO^dP zfo61GNS=cJbLutqUh84?7X#bq)bv57s&D_zm{+xNv7vHjb=_}j-Lrj-Ss*pcD@ts$ z)5Dol8Z_&*1@JdAQE7SL$*!TXI|YE7q=YGkIiUeLvT0)14Q-ivs|+cqeT6DTi9eQ)h?Pu9pqmH51B* zFMd|;l2@D4*56|EhMFlDxl2i<8qq=c+AhMYS3(A28#3DZ;_Ln>RA3q#IAdJq7M#N> zTZ8t=_>lq0=W&w|bdQ^sy&m^@KR)mNi3|1<6|OL(0KLtP#I6ix$2b{-Y9GP5I7 z8AJUSCnlia5vWawX%ZLWTC2UV$cn^sfv68W!6)QO;ZjnX=7#`$ZPRG~irfl)ZUJ^D z{lUk?(*SU7XIiS^H{Lpxn%542#PgxdeG)Ociej#(uvX)z;Z3)<16Yhd z-sv?qQ5D4a)ZYoYPRep2Zvom@U)HKq*54ZEwdaEq^FZG#(CyG!=Vw(0j8CCmP~`_z z=OR^i&WkDCf2cLvWm@d?)mEgme{hA(o#xAL023LZ3(82SGRg6jJF7$kZ4! z6*FTm4y6v~CP!3$+fxg{QeFo24<3iucgI!oyjV|9Dsx}r~4X@lt^VaH$u zD?87}1Jh=?G8OYg*ts2k;X9{f*Za?yu8IUUfyuQ**wbcWT+KncjD^qQ3h&w2+S(Mj zZM~?Ot%ggTIHwkBkL-4&jI5R=B+MCOR42bKzC2M>l?1%x2Iv7amIfQ1B#wwfD`z|m z+E?G+o(tde*Ws?;Wo4p#Yy>Nnf|*b<nj@-s(rZ)-U@ z(Xe(qZ1(_dH|J3yWu|bAPINK}DwF(kZ>FKx(?ZmU^KFC6*bh$;FKGh~pH1 zozA+kgcIk9@2aAwEJ=VYizT!sxDXX$N?XDiGKaaT-OU@Ib=~4DmgEk&{2D@IvyjF* zuF@sDcuuqx_FAgx;B@@8gqjMh!kQeEKA*y4+q+^4&uc0|>M;$Xb+ z@X%eUx1m%$WSP}Qchx68NQ?dO!h`6;Quq+A1(RORsQ-;6bZ90vj#^0(7>cLR+-_;9 zCd@b~B5V>$tpjkQU#BD%9^zu7-l>U8nzt+XuX5cYDCHYaX5t~~3?lpa;)Mr>q;5XW zu(Th;fr}-GkP`K)u97(#UB|L3f;H7Cd#Pox+auV`=m?a=mSv1v)(V!E=$%gkIJZ;` zZj{Lb@bhs%bRa znZw9cD$cDFVHPtpXwY1K)wys@LS~;!qdqkR>@&RtP>?M^>xe{4N#EtZy4zZ5Ar$ZF zV=X=(!xin-58MC<+b~;jk8Q|3B3THGIA$cM8Bg)Yd6ygP#i?4VrX3OvP_k5i{Cppw z-{$XwrJ-+X$ccJ(Q{|?T@U9=-?qlsfA43%8t247KZn?`+C4e`b-e^(df*iW66=Oc2 z3w9UhohfdY@pH1MZ}vc<1osV(2CGG)Ree$E-T;8>$zw*>x-505b&4(shMGIjbAfLS zEZ3ys(`SmCWc(75)^=aKer}>67qj^nGKtCK{35I|tA}wQa!uM!suX%Gb~ylORGGc( ze^|m|N!}G0#Ph|;wSXz`SByQM>lPM#8>mdSQs`7RxkXaSAADYA24u6xWqkIXY?o%z z%TEFL+wNW^&nrvaA1_#P%&Hbzrjl!*hIft>F0@g0IVydUU4MJgS3_3Js8{*>|G2jC z4%n#cOy9b2Xf&Pw=14;0Dtf00C^Z$I-v05OqtvN9>sAC&oV1Tk;;ku7VR`sQK4oFq zQ8)yoZNuTwV$t13|GCUIC{ID_r7M5&R*zhsxbrkg;EgMtL|9ne=^}BM!dxV!KDeXkWA^MfQTkQEt8~t>JznNh%ULvn@dbQ2cyf} z|C%ns#NJU}SHU(7Pg$<&8uDK>d5GZJ&`;CcfGP(~b-#UusXevc^q!km1X6_wVMqGk z^m&ZS6#42?p4c_t1TA$_+}h1L2c<<=$k%;v+D!<@j5hs|{>d18>~~v#oq4yGyS@QP zgTX2oJbEy@eJbo-f{ZQ>-nmB-#AqWcHbMQXFi*T)0n!(HIexz=pp<(O*DMh7CMupX z)ei1ZYuIW~E={-ND*nD;okiZdm!?^|LjLZhs*FHZvWld5TDj zcvWB)`-1Me9bu`*4M=CO6ye=pMgxlgYvsh2rV#5Z$hFKw0GX30%oufb=hJ0BFIJH` z+Fii4gQ+7!)8K^yc*PVEW^#f!|BW0Q5*`IewQ5YDFh?{x1L7tlaUAX@3Y+D>6FPVf zJzOGex~H34`8eq+TL$FsHm+27RS>3$CG;>0Jj4*1ukX$za})*b^S5p}I2jbFCHLsA zzYwAyftMz`uo2c8ieQcy-p&9iP3fMk(uRw+OlBPm`KCLei6g!|Vnk*-kjs>A25MTE z5GLDMV$70AC0j-tx*0sCruvKh{fSM)3X}13U>m|KeaOb`9^}v^44!$`06-JHf@L4EKyxV)M!8cL zi5p9kF97RiAT92!e?%9CP=qX3wyv^A8q!w%07d(9f-U))uDgsr4FDVL;|%r)fw}-@ zlB$F79X^EKYF%8J7mU?3VzJoYQ0<;NczW1jH4=4kEh_)q|^9wj zIsn-SsmRx0_EJ7(6WypwptIwZ)-T<__UgUu?BXt zoIf|a!5`?&JEb$w2PZSqhA>J;GIA^rJ-Cpz8MKX~bcqZNOUzPtu|NMvEP>+cO;V*W zNQ8YPENkr!)lN+tlxB79RUD20$)+_P6Jc`+4q@%Kno{F+#1qR*zrj%T>nTSceO?a5 zyqGDa59#G6k*RXu6+#=e=e!~i1Y&15!cHmE6sLh_K%Ppv$tFE-Le3RQs-nx5LB>gy z5A))kwkxWSy73{@I{%{DY8X+2o{CLJb~R$3r=oT^P~Xo$2lKz8?Z!3QLn$5l#L2k2 zb1=?UT&c<8!&9gW1M&jI!5%dhJbD3nQXpaeNJ>=zR+EL!4iY(nMBQI+|2J+Hw-WMr z08Mt9h8(PGbY?zKtk=cqw(yW}1A#htn* z8&}5Y>$uc>Lv!bSuWQ5UB&ct7*jiZAFpxz|%xO&5kg zzlf?6xy7H3G^*wvP5scW*Wf(<&eP!YIUf%&HT?K)RWmKg$G^=mSoi~;&9dU%{o}WV z#BX;9+q)fpVU`>Vdo~AtYK)`7z*H;dc-e|q6Qt;3J0APUL!~g&Q literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000000000000000000000000000000000000..ed4cc16421680a50164ba74381b4b35ceaa0ccfc GIT binary patch literal 3276 zcmZ`*X*|?x8~)E?#xi3t91%vcMKbnsIy2_j%QE2ziLq8HEtbf{7%?Q-9a%z_Y^9`> zEHh*&vUG%uWkg7pKTS-`$veH@-Vg8ZdG7oAJ@<88AMX3Z{d}TU-4*=KI1-hF6u>DKF2moPt09c{` zfN3rO$X+gJI&oA$AbgKoTL8PiPI1eFOhHBDvW+$&oPl1s$+O5y3$30Jx9nC_?fg%8Om)@;^P;Ee~8ibejUNlSR{FL7-+ zCzU}3UT98m{kYI^@`mgCOJ))+D#erb#$UWt&((j-5*t1id2Zak{`aS^W*K5^gM02# zUAhZn-JAUK>i+SNuFbWWd*7n1^!}>7qZ1CqCl*T+WoAy&z9pm~0AUt1cCV24f z3M@&G~UKrjVHa zjcE@a`2;M>eV&ocly&W3h{`Kt`1Fpp?_h~9!Uj5>0eXw@$opV(@!pixIux}s5pvEqF5$OEMG0;c zAfMxC(-;nx_`}8!F?OqK19MeaswOomKeifCG-!9PiHSU$yamJhcjXiq)-}9`M<&Au|H!nKY(0`^x16f205i2i;E%(4!?0lLq0sH_%)Wzij)B{HZxYWRl3DLaN5`)L zx=x=|^RA?d*TRCwF%`zN6wn_1C4n;lZG(9kT;2Uhl&2jQYtC1TbwQlP^BZHY!MoHm zjQ9)uu_K)ObgvvPb}!SIXFCtN!-%sBQe{6NU=&AtZJS%}eE$i}FIll!r>~b$6gt)V z7x>OFE}YetHPc-tWeu!P@qIWb@Z$bd!*!*udxwO6&gJ)q24$RSU^2Mb%-_`dR2`nW z)}7_4=iR`Tp$TPfd+uieo)8B}Q9#?Szmy!`gcROB@NIehK|?!3`r^1>av?}e<$Qo` zo{Qn#X4ktRy<-+f#c@vILAm;*sfS}r(3rl+{op?Hx|~DU#qsDcQDTvP*!c>h*nXU6 zR=Un;i9D!LcnC(AQ$lTUv^pgv4Z`T@vRP3{&xb^drmjvOruIBJ%3rQAFLl7d9_S64 zN-Uv?R`EzkbYIo)af7_M=X$2p`!u?nr?XqQ_*F-@@(V zFbNeVEzbr;i2fefJ@Gir3-s`syC93he_krL1eb;r(}0yUkuEK34aYvC@(yGi`*oq? zw5g_abg=`5Fdh1Z+clSv*N*Jifmh&3Ghm0A=^s4be*z5N!i^FzLiShgkrkwsHfMjf z*7&-G@W>p6En#dk<^s@G?$7gi_l)y7k`ZY=?ThvvVKL~kM{ehG7-q6=#%Q8F&VsB* zeW^I zUq+tV(~D&Ii_=gn-2QbF3;Fx#%ajjgO05lfF8#kIllzHc=P}a3$S_XsuZI0?0__%O zjiL!@(C0$Nr+r$>bHk(_oc!BUz;)>Xm!s*C!32m1W<*z$^&xRwa+AaAG= z9t4X~7UJht1-z88yEKjJ68HSze5|nKKF9(Chw`{OoG{eG0mo`^93gaJmAP_i_jF8a z({|&fX70PXVE(#wb11j&g4f{_n>)wUYIY#vo>Rit(J=`A-NYYowTnl(N6&9XKIV(G z1aD!>hY!RCd^Sy#GL^0IgYF~)b-lczn+X}+eaa)%FFw41P#f8n2fm9=-4j7}ULi@Z zm=H8~9;)ShkOUAitb!1fvv%;2Q+o)<;_YA1O=??ie>JmIiTy6g+1B-1#A(NAr$JNL znVhfBc8=aoz&yqgrN|{VlpAniZVM?>0%bwB6>}S1n_OURps$}g1t%)YmCA6+5)W#B z=G^KX>C7x|X|$~;K;cc2x8RGO2{{zmjPFrfkr6AVEeW2$J9*~H-4~G&}~b+Pb}JJdODU|$n1<7GPa_>l>;{NmA^y_eXTiv z)T61teOA9Q$_5GEA_ox`1gjz>3lT2b?YY_0UJayin z64qq|Nb7^UhikaEz3M8BKhNDhLIf};)NMeS8(8?3U$ThSMIh0HG;;CW$lAp0db@s0 zu&jbmCCLGE*NktXVfP3NB;MQ>p?;*$-|htv>R`#4>OG<$_n)YvUN7bwzbWEsxAGF~ zn0Vfs?Dn4}Vd|Cf5T-#a52Knf0f*#2D4Lq>-Su4g`$q={+5L$Ta|N8yfZ}rgQm;&b z0A4?$Hg5UkzI)29=>XSzdH4wH8B@_KE{mSc>e3{yGbeiBY_+?^t_a#2^*x_AmN&J$ zf9@<5N15~ty+uwrz0g5k$sL9*mKQazK2h19UW~#H_X83ap-GAGf#8Q5b8n@B8N2HvTiZu&Mg+xhthyG3#0uIny33r?t&kzBuyI$igd`%RIcO8{s$$R3+Z zt{ENUO)pqm_&<(vPf*$q1FvC}W&G)HQOJd%x4PbxogX2a4eW-%KqA5+x#x`g)fN&@ zLjG8|!rCj3y0%N)NkbJVJgDu5tOdMWS|y|Tsb)Z04-oAVZ%Mb311P}}SG#!q_ffMV z@*L#25zW6Ho?-x~8pKw4u9X)qFI7TRC)LlEL6oQ9#!*0k{=p?Vf_^?4YR(M z`uD+8&I-M*`sz5af#gd$8rr|oRMVgeI~soPKB{Q{FwV-FW)>BlS?inI8girWs=mo5b18{#~CJz!miCgQYU>KtCPt()StN;x)c2P3bMVB$o(QUh z$cRQlo_?#k`7A{Tw z!~_YKSd(%1dBM+KE!5I2)ZZsGz|`+*fB*n}yxtKVyx14Ba#1H&(%P{RubhEf9thF1v;3|2E37{m+a>GbI`Jdw*pGcA%L+*Q#&*YQOJ$_%U#(BDn``;rKxi&&)LfRxIZ*98z8UWRslDo@Xu)QVh}rB>bKwe@Bjzwg%m$hd zG)gFMgHZlPxGcm3paLLb44yHI|Ag0wdp!_yD5R<|B29Ui~27`?vfy#ktk_KyHWMDA42{J=Uq-o}i z*%kZ@45mQ-Rw?0?K+z{&5KFc}xc5Q%1PFAbL_xCmpj?JNAm>L6SjrCMpiK}5LG0ZE zO>_%)r1c48n{Iv*t(u1=&kH zeO=ifbFy+6aSK)V_5t;NKhE#$Iz=+Oii|KDJ}W>g}0%`Svgra*tnS6TRU4iTH*e=dj~I` zym|EM*}I1?pT2#3`oZ(|3I-Y$DkeHMN=8~%YSR?;>=X?(Emci*ZIz9+t<|S1>hE8$ zVa1LmTh{DZv}x6@Wz!a}+qZDz%AHHMuHCzM^XlEpr!QPzf9QzkS_0!&1MPx*ICxe}RFdTH+c}l9E`G zYL#4+3Zxi}3=A!G4S>ir#L(2r)WFKnP}jiR%D`ZOPH`@ZhTQy=%(P0}8ZH)|z6jL7 N;OXk;vd$@?2>?>Ex^Vyi literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 0000000000000000000000000000000000000000..bcbf36df2f2aaaa0a63c7dabc94e600184229d0d GIT binary patch literal 5933 zcmZ{Idpwix|Np(&m_yAF>K&UIn{t*2ZOdsShYs(MibU!|=pZCJq~7E>B$QJr)hC5| zmk?V?ES039lQ~RC!kjkl-TU4?|NZ{>J$CPLUH9vHy`Hbhhnc~SD_vpzBp6Xw4`$%jfmPw(;etLCccvfU-s)1A zLl8-RiSx!#?Kwzd0E&>h;Fc z^;S84cUH7gMe#2}MHYcDXgbkI+Qh^X4BV~6y<@s`gMSNX!4@g8?ojjj5hZj5X4g9D zavr_NoeZ=4vim%!Y`GnF-?2_Gb)g$xAo>#zCOLB-jPww8a%c|r&DC=eVdE;y+HwH@ zy`JK(oq+Yw^-hLvWO4B8orWwLiKT!hX!?xw`kz%INd5f)>k1PZ`ZfM&&Ngw)HiXA| ze=+%KkiLe1hd>h!ZO2O$45alH0O|E+>G2oCiJ|3y2c$;XedBozx93BprOr$#d{W5sb*hQQ~M@+v_m!8s?9+{Q0adM?ip3qQ*P5$R~dFvP+5KOH_^A+l-qu5flE*KLJp!rtjqTVqJsmpc1 zo>T>*ja-V&ma7)K?CE9RTsKQKk7lhx$L`9d6-Gq`_zKDa6*>csToQ{&0rWf$mD7x~S3{oA z1wUZl&^{qbX>y*T71~3NWd1Wfgjg)<~BnK96Ro#om&~8mU{}D!Fu# zTrKKSM8gY^*47b2Vr|ZZe&m9Y`n+Y8lHvtlBbIjNl3pGxU{!#Crl5RPIO~!L5Y({ym~8%Ox-9g>IW8 zSz2G6D#F|L^lcotrZx4cFdfw6f){tqITj6>HSW&ijlgTJTGbc7Q#=)*Be0-s0$fCk z^YaG;7Q1dfJq#p|EJ~YYmqjs`M0jPl=E`Id{+h%Lo*|8xp6K7yfgjqiH7{61$4x~A zNnH+65?QCtL;_w(|mDNJXybin=rOy-i7A@lXEu z&jY(5jhjlP{TsjMe$*b^2kp8LeAXu~*q&5;|3v|4w4Ij_4c{4GG8={;=K#lh{#C8v z&t9d7bf{@9aUaE94V~4wtQ|LMT*Ruuu0Ndjj*vh2pWW@|KeeXi(vt!YXi~I6?r5PG z$_{M*wrccE6x42nPaJUO#tBu$l#MInrZhej_Tqki{;BT0VZeb$Ba%;>L!##cvieb2 zwn(_+o!zhMk@l~$$}hivyebloEnNQmOy6biopy`GL?=hN&2)hsA0@fj=A^uEv~TFE z<|ZJIWplBEmufYI)<>IXMv(c+I^y6qBthESbAnk?0N(PI>4{ASayV1ErZ&dsM4Z@E-)F&V0>tIF+Oubl zin^4Qx@`Un4kRiPq+LX5{4*+twI#F~PE7g{FpJ`{)K()FH+VG^>)C-VgK>S=PH!m^ zE$+Cfz!Ja`s^Vo(fd&+U{W|K$e(|{YG;^9{D|UdadmUW;j;&V!rU)W_@kqQj*Frp~ z7=kRxk)d1$$38B03-E_|v=<*~p3>)2w*eXo(vk%HCXeT5lf_Z+D}(Uju=(WdZ4xa( zg>98lC^Z_`s-=ra9ZC^lAF?rIvQZpAMz8-#EgX;`lc6*53ckpxG}(pJp~0XBd9?RP zq!J-f`h0dC*nWxKUh~8YqN{SjiJ6vLBkMRo?;|eA(I!akhGm^}JXoL_sHYkGEQWWf zTR_u*Ga~Y!hUuqb`h|`DS-T)yCiF#s<KR}hC~F%m)?xjzj6w#Za%~XsXFS@P0E3t*qs)tR43%!OUxs(|FTR4Sjz(N zppN>{Ip2l3esk9rtB#+To92s~*WGK`G+ECt6D>Bvm|0`>Img`jUr$r@##&!1Ud{r| zgC@cPkNL_na`74%fIk)NaP-0UGq`|9gB}oHRoRU7U>Uqe!U61fY7*Nj(JiFa-B7Av z;VNDv7Xx&CTwh(C2ZT{ot`!E~1i1kK;VtIh?;a1iLWifv8121n6X!{C%kw|h-Z8_U z9Y8M38M2QG^=h+dW*$CJFmuVcrvD*0hbFOD=~wU?C5VqNiIgAs#4axofE*WFYd|K;Et18?xaI|v-0hN#D#7j z5I{XH)+v0)ZYF=-qloGQ>!)q_2S(Lg3<=UsLn%O)V-mhI-nc_cJZu(QWRY)*1il%n zOR5Kdi)zL-5w~lOixilSSF9YQ29*H+Br2*T2lJ?aSLKBwv7}*ZfICEb$t>z&A+O3C z^@_rpf0S7MO<3?73G5{LWrDWfhy-c7%M}E>0!Q(Iu71MYB(|gk$2`jH?!>ND0?xZu z1V|&*VsEG9U zm)!4#oTcgOO6Hqt3^vcHx>n}%pyf|NSNyTZX*f+TODT`F%IyvCpY?BGELP#s<|D{U z9lUTj%P6>^0Y$fvIdSj5*=&VVMy&nms=!=2y<5DP8x;Z13#YXf7}G)sc$_TQQ=4BD zQ1Le^y+BwHl7T6)`Q&9H&A2fJ@IPa;On5n!VNqWUiA*XXOnvoSjEIKW<$V~1?#zts>enlSTQaG2A|Ck4WkZWQoeOu(te znV;souKbA2W=)YWldqW@fV^$6EuB`lFmXYm%WqI}X?I1I7(mQ8U-pm+Ya* z|7o6wac&1>GuQfIvzU7YHIz_|V;J*CMLJolXMx^9CI;I+{Nph?sf2pX@%OKT;N@Uz9Y zzuNq11Ccdwtr(TDLx}N!>?weLLkv~i!xfI0HGWff*!12E*?7QzzZT%TX{5b7{8^*A z3ut^C4uxSDf=~t4wZ%L%gO_WS7SR4Ok7hJ;tvZ9QBfVE%2)6hE>xu9y*2%X5y%g$8 z*8&(XxwN?dO?2b4VSa@On~5A?zZZ{^s3rXm54Cfi-%4hBFSk|zY9u(3d1ButJuZ1@ zfOHtpSt)uJnL`zg9bBvUkjbPO0xNr{^{h0~$I$XQzel_OIEkgT5L!dW1uSnKsEMVp z9t^dfkxq=BneR9`%b#nWSdj)u1G=Ehv0$L@xe_eG$Ac%f7 zy`*X(p0r3FdCTa1AX^BtmPJNR4%S1nyu-AM-8)~t-KII9GEJU)W^ng7C@3%&3lj$2 z4niLa8)fJ2g>%`;;!re+Vh{3V^}9osx@pH8>b0#d8p`Dgm{I?y@dUJ4QcSB<+FAuT)O9gMlwrERIy z6)DFLaEhJkQ7S4^Qr!JA6*SYni$THFtE)0@%!vAw%X7y~!#k0?-|&6VIpFY9>5GhK zr;nM-Z`Omh>1>7;&?VC5JQoKi<`!BU_&GLzR%92V$kMohNpMDB=&NzMB&w-^SF~_# zNsTca>J{Y555+z|IT75yW;wi5A1Z zyzv|4l|xZ-Oy8r8_c8X)h%|a8#(oWcgS5P6gtuCA_vA!t=)IFTL{nnh8iW!B$i=Kd zj1ILrL;ht_4aRKF(l1%^dUyVxgK!2QsL)-{x$`q5wWjjN6B!Cj)jB=bii;9&Ee-;< zJfVk(8EOrbM&5mUciP49{Z43|TLoE#j(nQN_MaKt16dp#T6jF7z?^5*KwoT-Y`rs$ z?}8)#5Dg-Rx!PTa2R5; zx0zhW{BOpx_wKPlTu;4ev-0dUwp;g3qqIi|UMC@A?zEb3RXY`z_}gbwju zzlNht0WR%g@R5CVvg#+fb)o!I*Zpe?{_+oGq*wOmCWQ=(Ra-Q9mx#6SsqWAp*-Jzb zKvuPthpH(Fn_k>2XPu!=+C{vZsF8<9p!T}U+ICbNtO}IAqxa57*L&T>M6I0ogt&l> z^3k#b#S1--$byAaU&sZL$6(6mrf)OqZXpUPbVW%T|4T}20q9SQ&;3?oRz6rSDP4`b z(}J^?+mzbp>MQDD{ziSS0K(2^V4_anz9JV|Y_5{kF3spgW%EO6JpJ(rnnIN%;xkKf zn~;I&OGHKII3ZQ&?sHlEy)jqCyfeusjPMo7sLVr~??NAknqCbuDmo+7tp8vrKykMb z(y`R)pVp}ZgTErmi+z`UyQU*G5stQRsx*J^XW}LHi_af?(bJ8DPho0b)^PT|(`_A$ zFCYCCF={BknK&KYTAVaHE{lqJs4g6B@O&^5oTPLkmqAB#T#m!l9?wz!C}#a6w)Z~Z z6jx{dsXhI(|D)x%Yu49%ioD-~4}+hCA8Q;w_A$79%n+X84jbf?Nh?kRNRzyAi{_oV zU)LqH-yRdPxp;>vBAWqH4E z(WL)}-rb<_R^B~fI%ddj?Qxhp^5_~)6-aB`D~Nd$S`LY_O&&Fme>Id)+iI>%9V-68 z3crl=15^%0qA~}ksw@^dpZ`p;m=ury;-OV63*;zQyRs4?1?8lbUL!bR+C~2Zz1O+E@6ZQW!wvv z|NLqSP0^*J2Twq@yws%~V0^h05B8BMNHv_ZZT+=d%T#i{faiqN+ut5Bc`uQPM zgO+b1uj;)i!N94RJ>5RjTNXN{gAZel|L8S4r!NT{7)_=|`}D~ElU#2er}8~UE$Q>g zZryBhOd|J-U72{1q;Lb!^3mf+H$x6(hJHn$ZJRqCp^In_PD+>6KWnCnCXA35(}g!X z;3YI1luR&*1IvESL~*aF8(?4deU`9!cxB{8IO?PpZ{O5&uY<0DIERh2wEoAP@bayv z#$WTjR*$bN8^~AGZu+85uHo&AulFjmh*pupai?o?+>rZ7@@Xk4muI}ZqH`n&<@_Vn zvT!GF-_Ngd$B7kLge~&3qC;TE=tEid(nQB*qzXI0m46ma*2d(Sd*M%@Zc{kCFcs;1 zky%U)Pyg3wm_g12J`lS4n+Sg=L)-Y`bU705E5wk&zVEZw`eM#~AHHW96@D>bz#7?- zV`xlac^e`Zh_O+B5-kO=$04{<cKUG?R&#bnF}-?4(Jq+?Ph!9g zx@s~F)Uwub>Ratv&v85!6}3{n$bYb+p!w(l8Na6cSyEx#{r7>^YvIj8L?c*{mcB^x zqnv*lu-B1ORFtrmhfe}$I8~h*3!Ys%FNQv!P2tA^wjbH f$KZHO*s&vt|9^w-6P?|#0pRK8NSwWJ?9znhg z3{`3j3=J&|48MRv4KElNN(~qoUL`OvSj}Ky5HFasE6@fg!ItFh?!xdN1Q+aGJ{c&& zS>O>_%)r1c48n{Iv*t(u1=&kHeO=ifbFy+6aSK)V_AxLppYn8Z42d|rc6w}vOsL55 z`t&mC&y2@JTEyg!eDiFX^k#CC!jq%>erB=yHqUP0XcDOTw6ko}L zX;EmMrq(fKk*eygEuA616;0)>@A{TK|55PV@70 z$OfzS*(VJxQev3J?yY?O=ul(v`fp}?u9z`JK3ugibK>)DyCwImZOF4d{xK%%Ks1*} zv$oa)9anR%lXIBUqYnhLmT>VOzHfNP?ZwJNZ!5$s9M08RynIvaXw>@G^T9@r9^KH1 zVy??F&uuk)bH9Y4pQY!hP58i_H6 znl-NcuCpLV6ZWU;4C zu@9exF&OZi`Bovq_m%T+WhU2kvkz@^_LpycBvqm3bMpLw8X-Or5sL>0AKE1$(k_L=_Zc=CUq#=x1-QZf)G7nHu@fmsQ1eN_N3+nTEz`4HI4Z6uVlE zJH+X&det8JU?tO?upcM4Z=cV!JV;yF>FfL5Q$M|W_2Z!P`S=}Wzp|_1^#d%e?_H`> zV@%vA$+bFVqhw9`U;TfP|5|PD{||OiYdor8P*i??|NJcb%kzT_73*7WE?Ua5hAnR2 z=7WE=PhTlJ#ZeRznjTUb;`E(wkMZrj4e|Hilz-mK>9cZHQY**5TUPw~u}k;u73KI}xAx!0m-)GVia|x^d3p~s_9gh83jA&Ra<8rM%`>U3x69t&NzbwWY}7Ar?)FK#IZ0z|d0H0EkRO w3{9;}4Xg|ebq&m|3=9_N6z8I7$jwj5OsmAL;bP(Gi$Dzwp00i_>zopr02+f8CIA2c literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/pkgs/cupertino_http/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 0000000000000000000000000000000000000000..e71a726136a47ed24125c7efc79d68a4a01961b4 GIT binary patch literal 14800 zcmZ{Lc|26@`~R6Crm_qwyCLMMh!)vm)F@HWt|+6V6lE=CaHfcnn4;2x(VilEl9-V} zsce-cGK|WaF}4{T=lt&J`Fy_L-|vs#>v^7+XU=`!*L|PszSj43o%o$Dj`9mM7C;ar z@3hrnHw59q|KcHn4EQr~{_70*BYk4yj*SqM&s>NcnFoIBdT-sm1A@YrK@dF#f+SPu z{Sb8441xx|AjtYQ1gQq5z1g(^49Fba=I8)nl7BMGpQeB(^8>dY41u79Dw6+j(A_jO z@K83?X~$;S-ud$gYZfZg5|bdvlI`TMaqs!>e}3%9HXev<6;dZZT8Yx`&;pKnN*iCJ z&x_ycWo9{*O}Gc$JHU`%s*$C%@v73hd+Mf%%9ph_Y1juXamcTAHd9tkwoua7yBu?V zgROzw>LbxAw3^;bZU~ZGnnHW?=7r9ZAK#wxT;0O<*z~_>^uV+VCU9B@)|r z*z^v>$!oH7%WZYrwf)zjGU|(8I%9PoktcsH8`z^%$48u z(O_}1U25s@Q*9{-3O!+t?w*QHo;~P99;6-KTGO{Cb#ADDYWF!eATsx{xh-!YMBiuE z%bJc7j^^B$Sa|27XRxg(XTaxWoFI}VFfV>0py8mMM;b^vH}49j;kwCA+Lw=q8lptk z?Pe`{wHI39A&xYkltf5*y%;-DF>5v`-lm0vydYtmqo0sClh5ueHCLJ+6$0y67Z zO-_LCT|JXi3tN7fB-!0_Kn#I+=tyUj87uR5*0>|SZ zy3x2;aql87`{aPZ@UbBwY0;Z-a*lYL90YApOAMKur7YgOiqA~Cne6%b&{V-t>Am2c z{eyEuKl!GsA*jF2H_gvX?bP~v46%3ax$r~B$HnZQ;UiCmRl`ROK8v>;Zs~upH9}qu1ZA3kn-AY2k2@CaH=Qh7K6`nU z3ib(Bk%H*^_omL6N4_G5NpY20UXGi}a$!}#lf<&J4~nhRwRM5cCB3Zvv#6+N1$g@W zj9?qmQ`zz-G9HTpoNl~bCOaEQqlTVYi7G0WmB5E34;f{SGcLvFpOb`+Zm)C(wjqLA z2;+nmB6~QDXbxZGWKLt38I%X$Q!;h zup9S~byxKv=$x|^YEV;l0l67jH~E8BU45ft_7xomac-48oq4PZpSNJbw<7DTM4mmz z!$)z#04cy%b8w@cOvjmb36o;gwYIOLwy+{I#3dJj#W4QdOWwJQ2#20AL49`hSFUa7 zFNAN3OD==G3_kbr1d96>l`_cI`<=thKNh5>hgg7FV>5TfC6d#u)9BNXi@p1K*;2Is zz+x;l4GbSt#*%>1iq}jGIebXYJY5;PGG0y(^{>SSuZY89aL`sDghOM&&pyP6ABJ#w zYwK~4^1eUQD)4!GL>`zrWeHV z-W!6JZbW*Ngo;Edhp_cOysYr!uhKS}vIg_UC}x z=jXxQfV@4B3`5 z!u#byBVXV5GtrSx_8bnT@iKv=Uc6n)Zpa`<9N>+!J~Loxptl5$Z`!u<3a)-+P)say z#=jc7^mJzPMI2;yMhCmN7YN78E7-^S(t8E}FklC;z|4PL{bO|JieM#p1mBjwyZMEm zkX^A1RXPGeS2YqtPMX~~t^$~oeFfWAU#jVLi%Z@l2hle^3|e(q?(uS=BVauF?VF{j z(owKLJuze;_@5p1OtRyrT`EFXf)NfMYb-)E8RVVdr<@}M>4R&~P=;B`c1L%o|8YfB z-a(LB-i8jc5!&B5cowyI2~M^YID&@Xt(D9v{|DB z959W z*vEA77fh3*w*UJ`4Y(bxsoEy6hm7_Wc5gT0^cvso%Ow>9<&@9Q>mxb6-^pv)5yc>n zQ~^!qY(lPQ1EDGkr%_*y*D8T^YbCa52^MVqYpTLhgJ;N5PfCQ{SXk|plD#Sm+g4c- zFeL2Dih35W4{_qb75U`4Rb#S0FEo%F85dOhXSX0huPOxdAid{&p6P;+9}I)XU7^=3RZu9M(g0dLyz_7$8K{`AddBLOfU&B_QNHtmsnNXq`hy~% zvJ{vtz~Yt9X|o}5vXX)9ZCHaRq8iAb zUDj8%(MpzJN39LferYKvIc!)z^5T-eW@j3h9a6d%WZ!%@2^@4+6%Z9W1GHZbOj|sb z0cU$}*~G$fYvDC|XulSC_;m}?KC2jg5pxES$Bt!hA|@EX*2+O!UEb5sn_^d>z;>;r~ zmO3BivdXboPY*}amsO&`xk|e)S*u=`o67MC(1WTB;OwG+ua4UV7T5Wvy%?U{Pa5cO zMoLG>#@chO{Oc72XPyX8f3jC7P`$j4$)0wc(b50COaDP3_Cm}aPAglUa7kRXAqmo5 z0KDD7G>Gmnpons40WJNYn+pxko92GXy@PvSErKE-Ou3)3UiRr7!L4+0%+5}sD{bf)uj^ounQ-Yn2%%JoZ%FjUv%yjS?Ks4u_88Jh%tNliYW~817IV@fqd1T zi(?;Fv-s3rQEn=9G*E-QzSl%YS|^fe*yn}Aqh!&P<5%#oB?*{wZMa5$PYa*A{VA8! zbOfS1W!W}cTo%g~iP$>WhE_x7#O4?h$jq=>{M77>bTAK_ z6uU0tl6HARboGi}=4krr6WP`9`aAt&P5ON1v(+H{T?jZuJ}B{L-=z3VX)}mZwzrqH zpf?T!k&$?{&{0_p>b`kdJbSb(p~tFcuG4zh6}hfl@ues6CfJu<-P+!>FlYMlD_3!E z9$6VE==tlxNYe(s;@8@+4c4jQ$R2g8t0QwE>Et|)5)@kJj6^yaqFYY?0LEM2C!+7+ z+FN|UxR1GCy1KA`{T_%24U+Vserchr5h`;U7TZPr@43x#MMN{@vV?KSII}R@5k`7cVK}E;c)$f~_{ZLDOoL|-01p~oafxi4F zG$?Wha&a*rTnz-nTI-bAJ*SLb!5(L!#iRdvLEyo>7D_=H78-qZrm=6{hkUR{tR{H! z`ZTOV$Oi6^qX5=_{f}V9h}WJAO%h9)kEUF#*-JyYDbOGZ>Nfs%7L}4p zopIul&&Bbn!C9o83ypC6W4F$X=_|pex$V4!Whm#48Wfm3*oAW0Gc&#&b+oq<8>aZR z2BLpouQQwyf$aHpQUK3pMRj(mS^^t#s$IC3{j*m9&l7sQt@RU{o_}N-xI_lh`rND^ zX~-8$o(;p^wf3_5-WZ^qgW`e8T@37{`J)e2KJdSSCUpX6KZu0Ga&U*+u3*PDAs1uK zpl)40+fROA@Vo#vK?^@Pq%w8DO9HdfmH+~vNinZ$5GRz?sD|k246NepqZd`>81P^P z#x#3kUS-}x4k%&~iEUrsb&-X#_;;?y9oCP4crMkC`=q58#NxQ| z*NXNA;GR4X=GiGXwab5=&M3j04fQw%2UxM`S(aE)_PlgJttBX96$$lY@Q%0xV^IbcHqzw^Uk&E=vFB;EQ@kzVIeM8lDIW_Q_ zrfy)l6s2QBApF;J2xTD_@wuNMlwDfsdfMyzRq)<>qG{M)Yt}9F1{1HaI_X7=F=7>& zYB54VaKlxu0lIgS;Ac&25Aw(tcf@K~(cvPi8(OChzhlYp6}#<_MVhU95sD&)n0FtL zmxm4w$~s(S9jmHOgyovpG!x4uLfJsMsJn^QMraKAa1Ix?{zkV!a7{f%-!u2{NqZ&) zo+^XB`eFQ4 zk-(;_>T#pTKyvW${yL|XXbcv?CE2Tp<3(PjeXhu^Jrp6^Mj}lg_)jamK{g;C+q^Da ztb!gV!q5)B7G1%lVanA2b>Xs?%hzCgJ{Hc!ldr9dnz7k^xG#4pDpr|0ZmxxiUVl}j zbD_rg3yAFQ>nnc)0>71D==715jRj4XsRb2#_lJoSOwky&c4957V-|m)@>b^Nak1!8 z@DsIOS8>Oe^T>tgB)WX3Y^I^65Uae+2M;$RxX_C)Aoo0dltvoRRIVQkpnegWj;D#G z+TwFIRUN%bZW3(K{8yN8!(1i0O!X3YN?Zo08L5D~)_tWQA8&|CvuQb8Od?p_x=GMF z-B@v9iNLYS1lUsbb`!%f5+1ev8RFPk7xyx5*G;ybRw(PW*yEZ$unu2`wpH)7b@ZXEz4Jr{?KZKYl!+3^)Q z)~^g?KlPGtT!{yQU&(Z&^rVjPu>ueeZN86AnhRwc)m|;5NvM&W3xD%n`+Hjg5$e8M zKh1Ju82L~&^ z-IQ5bYhsjqJfr38iwi~8<{oeREh|3l)*Enj4&Q$+mM$15YqwXeufK9P^(O=pj=F-1 zD+&REgwY~!W#ZPccSEi(*jiKJ5)Q|zX;hP}S2T9j_);epH9JQs{n>RG}{Nak)vIbfa zFQm?H;D+tzrBN2)6{?Mo%fzN6;6d_h0Qyn61)+XT63=!T*WQyRUoB_x0_)Ir`$FtS zak07C(mOaWN5m%bk?F9X&@mEVKN%{R6obt(9qw&p>w&p;R*l2th9$D^*`pC}NmB+v z>bk;OJ(C8p$G;jNvRsBbt=a!!tKnjJ`9*yQFgjEN1HcC<&>u9aStT3>Oq=MOQV!#WOZ6{cv$YVmlJdovPRV}<=IZUPeBVh5DC z91-?kimq3JUr;UMQ@0?h52gupvG=~(5AVdP(2(%*sL8!#K1-L$9B7MrWGdt(h&whR@vz~0oEHF8u3U1Q zdGdaIytJj4x@eF*E+^zgi{nPCA8tkjN}UoR8WhDzM3-zLqx0z?2tTdDKyENM={fp8VC@3Dt`AiK$;K#H$K2{08mrHG%jgEOLX3MCsG>afZm_0mLPS4jmYUJp~Dm! z5AUe_vEaOAT3zWdwl#cLvqwd1^lwW?gt7(92wEsOE6c#<0}{szFV4(uO70?3>=((! zQr}1{J?Wx2ZmjxYL_8OB*m&mimfojzYn~PiJ2g8R&ZRx-i^yF#sdhEWXAUIZ@J?T$ zs3PgT2<&Ki>Bob_n(@S>kUIvE+nY~ti9~6j;O9VAG#{oZ!DZCW)}i6iA!Tgsyz+hC z1VVyvbQ_nwgdZSEP=U4d#U`2*`e~d4y8uM4Bcmm%!jidaee#4WqN!ZnlBmbYpuaO! z!rU3`Kl2 z0O7PD&fQ|_b)Ub!g9^s;C2e>1i*2&?1$6yEn?~Y zI)-WIN8N(5s9;grW+J@K@I%g#?G&hzmlgV=L}ZA{f>3YCMx^P{u@c5Z;U1qmdk#)L zvX6z1!sL>+@vxO8qVn#k3YxYi?8ggV){?Rn@j$+Fd4-QkuH1@)j#3-=f82GZ!nl~{ zzZ(?kO`ANttVeHSo%xmH!NmNZECh*{s!-8S>ALoe5xOPs>|P5BbUmP@rlV8`d(c=7 zypcpLaI*FM^;GM%@q`GAb8kO`$oE|R48yn)?p(c1t>5;Wwn5r6ck&uw4}TnT80jI`IS~J%q8CpaVgIze<8IykSpVBg8~E! zW_tGqB;GO47r_er05y+Kwrcn{VLxL*1;HMv@*sd}MB6DH4zaP~u4Y;>@Nw7?F8S?c zfVIY(^ntnGgWlD|idzGz$Y+Oh(Ra=&VIf4!K2W*a)(%5%78s}8qxOknAGtDAq+HMO zM+Nu;0OgQRn36 zA@~a8`uVQ~v9?d!BxnsVaB-z-djypO44BjQAmg7&eVoaew|~)wH$SgefJ2$7_RiY+ z_7ACGoFM6Lhvho+eUG@pU&0X(Uy(*j;9pr?ET?FHTXadlfXC|MReZoU5>AG`mTM<% zc~*I@E*u0|hwVTdFA~4^b2VT7_~}~tCueNY{de3og=ASFQ`)0dhC2~Ne<}}Rc?ptA zi}+bQE%N9o*hpSUMH)9xt%Zlz&^p&5=cW}{m#f85iVX64^{!(vhClT<I)+c)RuiyrZqIw4v`z%YK&;_Fh4_+0B?qAGxMfAM`LzG_bjD>ib4;KGT4_1I>sxvL&&qp40ajgQOqIE^9=Az4w#ymo)bW-Vg{T!n=l&|nR_ zw+wcH|FxUH63)~{M;goHepmD{Fe?W9sO|eJP9L$G<{e_7FxxuXQ+)(Z^@;X8I1=%k zTK$gbHA1^4W<`q~ubQ0M_C^CA5#Z&*nGc(T?4Y_2jLu&FJDQYpCSiRny->$+nC9Jl z?avTW`ZXYT51%SrEq!}dXNM&!pM6nmL^lce=%S7{_TS)ckN8;{p*LT~LMgmlE~dpL zEBQy-jDj%cSK6N3)|CCR0LQ$N6iDM~+-1Oz|LAdkip(VZcO`gqCuJ+(Mm{m6@P%_; zBtF|MMVMP;E`5NJ{&@4j^JE5j&}(Jq{lCGL(P^#uqvbD`2)FVyfNgy|pvT!XY;02Z zZWbgGsvi6#!*$Zxwd{Xk6_M{+^yV_K@%_SAW(x)Lg|*AuG-%g2#GQYk8F?W&8|2dU z;00ppzrQnnYXnT`(S%_qF2#QNz&@Y$zcq+O8p>Gto2&4z8(^#cY?DuQwBQP4Fe?qUK_-yh4xT{8O@gb`uh` z>Q%jrgPAnANn4_)->n;w{Mei#J)F+`12&+-MLKSRzF6bL3;4O~oy~v7 zL0K-=m?>>(^qDCgvFRLBI@`04EGdTxe5}xBg#7#Wb!aUED;?5BLDEvZ@tai4*Rh8& z4V)cOr}DJ0&(FjWH%50Y+&=WtB42^eEVsmaHG)Il#j265oK&Bot(+-IIn`6InmuE# z;)qXs+X{fSb8^rYb#46X5?KCzH9X0>ppBQi(aKS--;4yA%0N|D<#8RZlOS(8n26=u zv~y;KC>`ypW=aqj`&x9 z0Zm>NKp}hPJu1+QDo(_U(Gt0SZ`IJWnp%QK`pye>Bm!w{sG>;VU^2 z4lZhV1}tCE8(?zu#j99|l3-qRBcz3bG+DlyxPGB$^6B^ssc_qYQ6lG0q~EAI?1$?( zahfn%etVvuKwB7R=>JDQluP97nLDM6*5;b0Ox#b{4nIgZA*+?IvyDN{K9WGnlA=Ju z+)6hjr}{;GxQQIDr3*lf32lRp{nHP8uiz^Fa|K+dUc@wD4Kf5RPxVkUZFCdtZH{+=c$AC)G2T-Qn@BPbr zZigIhKhKrVYy`!Mlc#HVr=CURVrhUjExhI~gZ%a=WM9BwvnN?=z!_ZQ$(sP?X;2Jy zyI$}H^^SvH2tf6+Uk$pJww@ngzPp856-l9g6WtW+%Yf>N^A}->#1W2n=WJ%sZ0<){Z&#% z^Kzl$>Km)sIxKLFjtc;}bZeoaZSpL4>`jCmAeRM-NP9sQ&-mi@p0j7Iq>1n&z@8?M z%dM7K^SgE5z)@i5w#rLE4+8%|^J`a6wYr`3BlvdD>7xW?Dd>`0HC0o{w7r_ot~h*G z2gI7Y!AUZ6YN+z$=GNzns@Tu7BxgAb3MBha30-ZG7a%rckU5}y{df`lj@^+34kr5> z988PPbWYdHye~=?>uZ4N&MN@4RBLk_?9W*b$}jqt0j%>yO9QOV(*!#cX~=wRdVL&S zhPQ{${0CGU-rfdS&b@u|IK{hV2Z=(*B2d0?&jwWfT=?Gk`4T9TfMQ)CfNgpLQa#>Q z%6A$w#QNc&qOtrHAbqY>J782@!X{9Y@N(HMSr;PP^;0DlJNxfC`oMB%Ocg zC*hnEsF|p*=CVe^dT)>BTL0yff)uo!U<+_2o3p)CE8quU1JI(=6)9$KxVdJYD*S*~ zzNeSkzFIQyqK}578+qq6X8rrRdgX z4k&R=AGex~a)MoB0pK&|yA<(*J#P&tR?ImBVD)ZTA4VH5L5DxXe<-*s`Aox%H1{-^Qa`kG_DGXD%QX-;l1#&#IVQP6>kir ztO@~ZvJDPnTvKt>fc*(j$W^)JhWk{4kWwbpFIXzuPt2V%M4H19-i5Gn*6(D`4_c1+ zYoI1@yT^~9JF~t>2eVM6p=GP3b*;daJpQOhAMNO|LKnwE2B5n8y9mf;q=)-L_FfD0 z<}YIRBO{k)6AHAn8iG>pYT+3bJ7jvP9}LSMR1nZW$5HR%PD1rFz z{4XE^Vmi-QX#?|Farz=CYS_8!%$E#G%4j2+;Avz|9QBj|YIExYk?y-1(j}0h{$$MnC_*F0U2*ExSi1ZCb_S9aV zTgyGP0Cl=m`emxM4Qih1E{`J{4oJo8K}WnH`@js^pR7Z-vTBK5F5JIFCDN}7pU^_nV>NTz@2$|Kcc5o+L&^Db_AQ);F?)X5BF*QJRCdLI-a%gW z++DZM)x=6*fNrSaUA&hf&CUqC$F*y^CJC-MAm9gd*5#^mh;-dR1?a&<3-hp3@}XN! z&8dcwo6=MQua%0KFvYbi>O{j)RrbDQo3S*y!oEJ~2=}^-v%zn~@hnmKGOvX6JLr;>DNC3)={8OM9n5Zs*(DlS*|%JTniJX2Uav7sOFT0vdIiUOC5pEtY?EF)@Fh9pCfD%N zXskZ8b^ldI{HHj{-l?iWo@IW6Nr`hAS>f8S*8FGc*gmcK^f2JS+>I&r#Gcewy=-JM zv0*w<5qBa6UQB@`esOG*4*t@7c9AkrTpM`v=eY?cO#z17H9B%Xy4m!}LhW}*iZ27w1?HrevgB1SZ1q2X$mm@FK@Qt7o z!s~Lio^IRdwzyvQ80{5iYeTV@mAo=2o5>KepRH0d{*Szlg~n%w2)S5v2|K8}pj;c{ zoDRLvYJO1@?x-=mq+LVhD{l-1-Dw4`7M?3@+ z`fu7?1#9W++6Y46N=H0+bD|CJH~q*CdEBm8D##VS7`cXy4~+x=ZC17rJeBh zI~qW^&FU`+e!{AKO3(>z5Ghh14bUT$=4B>@DVm(cj* zSLA*j!?z!=SLuVvAPh_EFKx}JE8T8;Gx)LH^H136=#Jn3Bo*@?=S`5M{WJPY&~ODs z+^V57DhJ2kD^Z|&;H}eoN~sxS8~cN5u1eW{t&y{!ouH`%p4(yDZaqw$%dlm4A0f0| z8H}XZFDs?3QuqI^PEy}T;r!5+QpfKEt&V|D)Z*xoJ?XXZ+k!sU2X!rcTF4tg8vWPM zr-JE>iu9DZK`#R5gQO{nyGDALY!l@M&eZsc*j*H~l4lD)8S?R*nrdxn?ELUR4kxK? zH(t9IM~^mfPs9WxR>J{agadQg@N6%=tUQ8Bn++TC|Hbqn*q;WydeNIS@gt|3j!P`w zxCKoeKQ*WBlF%l4-apIhERKl(hXS1vVk$U?Wifi)&lL6vF@bmFXmQEe{=$iG)Zt*l z0df@_)B-P_^K2P7h=>OIQ6f0Q-E@|M?$Z5n^oN>2_sBCpN>q(LnqUoef{tm^5^L$# z{<SL zKmH78cHX`4cBKIY8u1x*lwrgP^fJ%E&&AmHrRY7^hH*=2OA9K?!+|~Aeia=nAA`5~ z#zI=h#I>@FXaGk(n)0uqelNY;A5I9obE~OjsuW!%^NxK*52CfBPWYuw--v<1v|B>h z8R=#$TS-Pt3?d@P+xqmYpL4oB8- z>w99}%xqy9W!A^ODfLq8iA@z}10u?o#nG#MXumSaybi(S{`wIM z&nE3n2gWWMu93EvtofWzvG2{v;$ysuw^8q?3n}y=pB1vUr5gi++PjiyBH3jzKBRny zSO~O++1ZLdy7v7VzS&$yY;^Z7*j_#BI`PK`dAzJa9G1{9ahPqPi1C}ti+L)WHii*= z+RZ^+at-tlatc4|akPa&9H;%gn9aS`X_kfb>n>#NTyUVM6m4NCIfLm(28>qaYv7}t zn`M;XcONtXoa3#u3{L-ytd_&g z2mO$8CnE?460w#eSm|smlnNwFHM;A&IxSKLzVkV7nNVqZ*A`)eI{Nbg6WxsarAFuc=FFf1z|%#eTvBgUhY}N zsCT>`_YO>14i^vFX0KXbARLItzT{TeD%N~=ovGtZ6j{>PxkuYlHNTe0!u>rgw#?td z{)n=QrGvgCDE6BUem$Rh(1y!$@(Bn!k3E0|>PQ(8O==zN`?yBhAqlWyq+c%+h?p^- zE&OtLind}^_=>pbhxOgOIC0q9{cLK6p6*eg_|S+p9$W~_u4wzx@N?$QmFg2S)m~^R znni$X{U*!lHgdS@fI;|Owl=9Gwi?dr0m#>yL<8<}bLW_Kpl| zSGesADX&n?qmHC`2GyIev^hi~ka}ISZ^Y4w-yUzyPxaJB0mm%ww^>if3<;P^U+L5=s+cifT-ct*;!dOOk#SOZNv@a^J|DrS3YtSn8EEAlabX1NV3RfHwZn_41Xa z4;$taa6JJR()-FQ<#0G~WlML<l5I+IPnqDpW(PP>hRcQ+S2zU?tbG^(y z1K_?1R){jF;OKGw0WYjnm>aPxnmr5?bP?^B-|Fv`TT4ecH3O`Z3`X_r;vgFn>t1tE zGE6W2PODPKUj+@a%3lB;lS?srE5lp(tZ;uvzrPb){f~n7v_^z! z=16!Vdm!Q0q#?jy0qY%#0d^J8D9o)A;Rj!~j%u>KPs-tB08{4s1ry9VS>gW~5o^L; z7vyjmfXDGRVFa@-mis2!a$GI@9kE*pe3y_C3-$iVGUTQzZE+%>vT0=r|2%xMDBC@>WlkGU4CjoWs@D(rZ zS1NB#e69fvI^O#5r$Hj;bhHPEE4)4q5*t5Gyjzyc{)o459VkEhJ$%hJUC&67k z7gdo`Q*Jm3R&?ueqBezPTa}OI9wqcc;FRTcfVXob^z|dNIB0hMkHV26$zA%YgR$sM zTKM61S}#wJ#u+0UDE3N+U*~Tz1nnV;W<8Akz&6M7-6mIF(Pq`wJ1A%loYL( zIS;&2((xbyL7zoyaY2Sa%BBYBxo6Aa*53`~e@|RA`MP+?iI4KZ+y4EU&I zS_|(#*&j2hxpELa3r0O7ok&5!ijRiRu9i-_3cdnydZU9Mp6Y);skv%!$~`i-J7e-g zj@EoHf+gtcrKf;tY5`4iLnWSHa)9brUM$XmEzG3T0BXTG_+0}p7uGLs^(uYh0j$;~ zT1&~S%_Y5VImvf1EkD7vP-@F%hRlBe{a@T!SW(4WEQd1!O47*Crf@u-TS==48iR5x z!*`Ul4AJI^vIVaN3u5UifXBX{fJ@z>4Q2#1?jpcdLocwymBgKrZ+^Cb@QuIxl58B* zD{t-W3;M;{MGHm_@&n(6A-AsD;JO#>J3o4ru{hy;k;8?=rkp0tadEEcHNECoTI(W31`El-CI0eWQ zWD4&2ehvACkLCjG`82T`L^cNNC4Oo2IH(T4e;C75IwkJ&`|ArqSKD}TX_-E*eeiU& ziUuAC)A?d>-;@9Jcmsdca>@q1`6vzo^3etEH%1Gco&gvC{;Y-qyJ$Re`#A!5Kd((5 z6sSiKnA20uPX0**Mu&6tNgTunUR1sodoNmDst1&wz8v7AG3=^huypTi`S7+GrO$D6 z)0Ja-y5r?QQ+&jVQBjitIZ`z2Ia}iXWf#=#>nU+ zL29$)Q>f#o<#4deo!Kuo@WX{G(`eLaf%(_Nc}E`q=BXHMS(Os{!g%(|&tTDIczE_# z5y%wjCp9S?&*8bS3imJi_9_COC)-_;6D9~8Om@?U2PGQpM^7LKG7Q~(AoSRgP#tZfVDF_zr;_U*!F9qsbVQ@un9O2>T4M5tr0B~~v_@a=w^8h510a#=L z;8+9zhV}57uajb+9DbZm1G`_NqOuKN`bQ2fw9A*v*Kdb_E-SA`?2 z)OFIY-%uD`JZUZg?D4lHtNegKgWr!1m%hOpu5`R+bZ2K#&)*R-7ElKYo0$0xYxIL8 zLg%u|4oZixz}ILB-@aS4=XOe)z!VL6@?dX{LW^YCPjKtyw44)xT=H;h(fmFr>R?p%r5*}W z7_bo0drVDRq9V9QL4_!dazughK6t}tVVvBq={T0+3(1zmb>f+|;{D%J?^xnZcqio5 z%H?@L+L-CIdO=x6QrALL9&PwvjrZi5NS)1e<*%V8ntw~S2PF}zH}B5f_DHyB=I3m@ z_;^TpN|sesCU}qxQ`~jIwF>#8wGvxg9kdMT$}us8BM&W>OzZ|ry2BB)+UY*_yH+&L zl_=Jy9BNzIZs}D~Yv_H%HPjVGNV=xT3xpIW!Np1F^G#9Y8X zl)c_V1(DhYu-v%H3-m&n%M_}}c{E5Wu+6*>R24gW_A7$(U=9D|H$r;;;@o zJ)c_CmVf9l*;4SyJ}E{+4)}^C>SIJ*_bul7OJ{v&0oO>jG(5xzYP0$I%*YH|Mwu#r zubNW5VZ9^X#Phw<;?=^G?Kg&C)^x1FVsKGZ*n+{C1znj~YHSP?6PS(k5e9qGvS4X* z=1kA_27(iV65a(i+Sicmd@Vzf^2@*Wed-`aYQ~em=-h%Pu`gHfz)&@$hpr<&mNO={ zl^kI0HP0wTbbh{d(>5a#;zT2_=ppef?;D4;2^}&kZjB^yl%LBJ;|> zkLc)JEg*5rpQ;_)w?PnKynWtv!@ z>}+am{@(g$KKM+e$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/cupertino_http/example/macos/Runner/Configs/AppInfo.xcconfig b/pkgs/cupertino_http/example/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000000..5911a2b557 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = cupertino_http_example + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.plugins.cupertinoHttpExample + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2022 The Dart project authors. All rights reserved. diff --git a/pkgs/cupertino_http/example/macos/Runner/Configs/Debug.xcconfig b/pkgs/cupertino_http/example/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000000..36b0fd9464 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/pkgs/cupertino_http/example/macos/Runner/Configs/Release.xcconfig b/pkgs/cupertino_http/example/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000000..dff4f49561 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/pkgs/cupertino_http/example/macos/Runner/Configs/Warnings.xcconfig b/pkgs/cupertino_http/example/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000000..42bcbf4780 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/pkgs/cupertino_http/example/macos/Runner/DebugProfile.entitlements b/pkgs/cupertino_http/example/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000000..3ba6c1266f --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,14 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.client + + com.apple.security.network.server + + + diff --git a/pkgs/cupertino_http/example/macos/Runner/Info.plist b/pkgs/cupertino_http/example/macos/Runner/Info.plist new file mode 100644 index 0000000000..4789daa6a4 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/pkgs/cupertino_http/example/macos/Runner/MainFlutterWindow.swift b/pkgs/cupertino_http/example/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000000..2722837ec9 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController.init() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/pkgs/cupertino_http/example/macos/Runner/Release.entitlements b/pkgs/cupertino_http/example/macos/Runner/Release.entitlements new file mode 100644 index 0000000000..ee95ab7e58 --- /dev/null +++ b/pkgs/cupertino_http/example/macos/Runner/Release.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + + diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml new file mode 100644 index 0000000000..1d2806b6e4 --- /dev/null +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -0,0 +1,101 @@ +name: cupertino_http_example +description: Demonstrates how to use the cupertino_http plugin. + +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 1.0.0+1 + +environment: + sdk: ">=2.17.3 <3.0.0" + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + cupertino_http: + # When depending on this package from a real application you should use: + # cupertino_http: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.2 + http: ^0.13.4 +dev_dependencies: + flutter_test: + sdk: flutter + integration_test: + sdk: flutter + http_client_conformance_tests: + path: ../../http_client_conformance_tests/ + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^2.0.0 + test: ^1.21.1 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/pkgs/cupertino_http/ffigen.yaml b/pkgs/cupertino_http/ffigen.yaml new file mode 100644 index 0000000000..0c80911495 --- /dev/null +++ b/pkgs/cupertino_http/ffigen.yaml @@ -0,0 +1,31 @@ +# Run with `dart run ffigen --config ffigen.yaml`. +name: NativeCupertinoHttp +description: | + Bindings for the Foundation URL Loading System and supporting libraries. + + Regenerate bindings with `dart run ffigen --config ffigen.yaml`. +language: 'objc' +output: 'lib/src/native_cupertino_bindings.dart' +headers: + entry-points: + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSData.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLRequest.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSProgress.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLResponse.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSHTTPCookieStorage.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSOperation.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSError.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' + - 'src/CUPHTTPClientDelegate.h' + - 'src/CUPHTTPForwardedDelegate.h' +preamble: | + // ignore_for_file: always_specify_types + // ignore_for_file: camel_case_types + // ignore_for_file: non_constant_identifier_names +comments: + style: any + length: full diff --git a/pkgs/cupertino_http/img/architecture.svg b/pkgs/cupertino_http/img/architecture.svg new file mode 100644 index 0000000000..3d01ae8e3e --- /dev/null +++ b/pkgs/cupertino_http/img/architecture.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/ios/Classes/CUPHTTPClientDelegate.m new file mode 100644 index 0000000000..5b375ca3b4 --- /dev/null +++ b/pkgs/cupertino_http/ios/Classes/CUPHTTPClientDelegate.m @@ -0,0 +1 @@ +#include "../../src/CUPHTTPClientDelegate.m" diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPForwardedDelegate.m b/pkgs/cupertino_http/ios/Classes/CUPHTTPForwardedDelegate.m new file mode 100644 index 0000000000..39c9e02729 --- /dev/null +++ b/pkgs/cupertino_http/ios/Classes/CUPHTTPForwardedDelegate.m @@ -0,0 +1 @@ +#include "../../src/CUPHTTPForwardedDelegate.m" diff --git a/pkgs/cupertino_http/ios/Classes/dart_api_dl.c b/pkgs/cupertino_http/ios/Classes/dart_api_dl.c new file mode 100644 index 0000000000..023f80ab06 --- /dev/null +++ b/pkgs/cupertino_http/ios/Classes/dart_api_dl.c @@ -0,0 +1 @@ +#include "../../src/dart-sdk/include/dart_api_dl.c" diff --git a/pkgs/cupertino_http/ios/cupertino_http.podspec b/pkgs/cupertino_http/ios/cupertino_http.podspec new file mode 100644 index 0000000000..4b2639f4cc --- /dev/null +++ b/pkgs/cupertino_http/ios/cupertino_http.podspec @@ -0,0 +1,29 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint cupertino_http.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'cupertino_http' + s.version = '0.0.1' + s.summary = 'Flutter Foundation URL Loading System' + s.description = <<-DESC + A Flutter plugin for accessing the Foundation URL Loading System. + DESC + s.homepage = 'https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http' + s.license = { :type => 'BSD', :file => '../LICENSE' } + s.author = { 'TODO' => 'use-valid-author' } + + # This will ensure the source files in Classes/ are included in the native + # builds of apps using this FFI plugin. Podspec does not support relative + # paths, so Classes contains a forwarder C file that relatively imports + # `../src/*` so that the C sources can be shared among all target platforms. + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'Flutter' + s.platform = :ios, '9.0' + s.requires_arc = [] + + # Flutter.framework does not contain a i386 slice. + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } + s.swift_version = '5.0' +end diff --git a/pkgs/cupertino_http/lib/cupertino_client.dart b/pkgs/cupertino_http/lib/cupertino_client.dart new file mode 100644 index 0000000000..e8e3d97a2a --- /dev/null +++ b/pkgs/cupertino_http/lib/cupertino_client.dart @@ -0,0 +1,169 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:typed_data'; + +import 'package:http/http.dart'; + +import 'cupertino_http.dart'; + +class _TaskTracker { + final responseCompleter = Completer(); + final BaseRequest request; + final responseController = StreamController(); + int numRedirects = 0; + + _TaskTracker(this.request); + + void close() { + responseController.close(); + } +} + +/// A HTTP [Client] based on the +/// [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). +/// +/// For example: +/// ``` +/// void main() async { +/// var client = CupertinoClient.defaultSessionConfiguration(); +/// final response = await client.get( +/// Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'})); +/// if (response.statusCode != 200) { +/// throw HttpException('bad response: ${response.statusCode}'); +/// } +/// +/// final decodedResponse = +/// jsonDecode(utf8.decode(response.bodyBytes)) as Map; +/// +/// final itemCount = decodedResponse['totalItems']; +/// print('Number of books about http: $itemCount.'); +/// for (var i = 0; i < min(itemCount, 10); ++i) { +/// print(decodedResponse['items'][i]['volumeInfo']['title']); +/// } +/// } +/// ``` +class CupertinoClient extends BaseClient { + static final Map _tasks = {}; + + URLSession _urlSession; + + CupertinoClient._(this._urlSession); + + static _TaskTracker _tracker(URLSessionTask task) => + _tasks[task.taskIdentifier]!; + + static void _onComplete( + URLSession session, URLSessionTask task, Error? error) { + final taskTracker = _tracker(task); + + if (error != null) { + final exception = ClientException( + error.localizedDescription ?? 'Unknown', taskTracker.request.url); + if (taskTracker.responseCompleter.isCompleted) { + taskTracker.responseController.addError(exception); + } else { + taskTracker.responseCompleter.completeError(exception); + } + } else if (!taskTracker.responseCompleter.isCompleted) { + taskTracker.responseCompleter.completeError( + StateError('task completed without an error or response')); + } + taskTracker.close(); + _tasks.remove(task.taskIdentifier); + } + + static void _onData(URLSession session, URLSessionTask task, Data data) { + final taskTracker = _tracker(task); + taskTracker.responseController.add(data.bytes); + } + + static URLRequest? _onRedirect(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest request) { + final taskTracker = _tracker(task); + ++taskTracker.numRedirects; + if (taskTracker.request.followRedirects && + taskTracker.numRedirects <= taskTracker.request.maxRedirects) { + return request; + } + return null; + } + + static URLSessionResponseDisposition _onResponse( + URLSession session, URLSessionTask task, URLResponse response) { + final taskTracker = _tracker(task); + taskTracker.responseCompleter.complete(response); + return URLSessionResponseDisposition.urlSessionResponseAllow; + } + + /// A [Client] with the default configuration. + factory CupertinoClient.defaultSessionConfiguration() { + final config = URLSessionConfiguration.defaultSessionConfiguration(); + return CupertinoClient.fromSessionConfiguration(config); + } + + /// A [Client] configured with a [URLSessionConfiguration]. + factory CupertinoClient.fromSessionConfiguration( + URLSessionConfiguration config) { + final session = URLSession.sessionWithConfiguration(config, + onComplete: _onComplete, + onData: _onData, + onRedirect: _onRedirect, + onResponse: _onResponse); + return CupertinoClient._(session); + } + + @override + Future send(BaseRequest request) async { + // The expected sucess case flow (without redirects) is: + // 1. send is called by BaseClient + // 2. send starts the request with UrlSession.dataTaskWithRequest and waits + // on a Completer + // 3. _onResponse is called with the HTTP headers, status code, etc. + // 4. _onResponse calls complete on the Completer that send is waiting on. + // 5. send continues executing and returns a StreamedResponse. + // StreamedResponse contains a Stream. + // 6. _onData is called one or more times and adds that to the + // StreamController that controls the Stream + // 7. _onComplete is called after all the data is read and closes the + // StreamController + final stream = request.finalize(); + + final bytes = await stream.toBytes(); + final d = Data.fromUint8List(bytes); + + final urlRequest = MutableURLRequest.fromUrl(request.url) + ..httpMethod = request.method + ..httpBody = d; + + // This will preserve Apple default headers - is that what we want? + request.headers.forEach(urlRequest.setValueForHttpHeaderField); + + final task = _urlSession.dataTaskWithRequest(urlRequest); + final taskTracker = _TaskTracker(request); + _tasks[task.taskIdentifier] = taskTracker; + task.resume(); + + final maxRedirects = request.followRedirects ? request.maxRedirects : 0; + + final result = await taskTracker.responseCompleter.future; + final response = result as HTTPURLResponse; + + if (request.followRedirects && taskTracker.numRedirects > maxRedirects) { + throw ClientException('Redirect limit exceeded', request.url); + } + + return StreamedResponse( + taskTracker.responseController.stream, + response.statusCode, + contentLength: response.expectedContentLength == -1 + ? null + : response.expectedContentLength, + isRedirect: !request.followRedirects && taskTracker.numRedirects > 0, + headers: response.allHeaderFields + .map((key, value) => MapEntry(key.toLowerCase(), value)), + ); + } +} diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart new file mode 100644 index 0000000000..ee0b1534b3 --- /dev/null +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -0,0 +1,947 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// A macOS/iOS Flutter plugin that provides access to the +/// [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). +/// +/// For example: +/// ``` +/// void main() { +/// final url = Uri.https('www.example.com', '/'); +/// final session = URLSession.sharedSession(); +/// final task = session.dataTaskWithCompletionHandler( +/// URLRequest.fromUrl(url), +/// (data, response, error) { +/// if (error == null) { +/// if (response != null && response.statusCode == 200) { +/// print(response); // Do something with the response. +/// return; +/// } +/// } +/// print(error); // Handle errors. +/// }); +/// task.resume(); +/// } +/// ``` + +import 'dart:ffi'; +import 'dart:isolate'; +import 'dart:math'; +import 'dart:typed_data'; + +import 'package:ffi/ffi.dart'; + +import 'src/native_cupertino_bindings.dart' as ncb; +import 'src/utils.dart'; + +abstract class _ObjectHolder { + final T _nsObject; + + _ObjectHolder(this._nsObject); +} + +/// Settings for controlling whether cookies will be accepted. +/// +/// See [HTTPCookieAcceptPolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408933-httpcookieacceptpolicy). +enum HTTPCookieAcceptPolicy { + httpCookieAcceptPolicyAlways, + httpCookieAcceptPolicyNever, + httpCookieAcceptPolicyOnlyFromMainDocumentDomain, +} + +// Controls how [URLSessionTask] execute will proceed after the response is +// received. +// +// See [NSURLSessionResponseDisposition](https://developer.apple.com/documentation/foundation/nsurlsessionresponsedisposition). +enum URLSessionResponseDisposition { + urlSessionResponseCancel, + urlSessionResponseAllow, + urlSessionResponseBecomeDownload, + urlSessionResponseBecomeStream +} + +/// Information about a failure. +/// +/// See [NSError](https://developer.apple.com/documentation/foundation/nserror) +class Error extends _ObjectHolder { + Error._(ncb.NSError c) : super(c); + + /// The numeric code for the error e.g. -1003 (kCFURLErrorCannotFindHost). + /// + /// The interpretation of this code will depend on the domain of the error + /// which, for URL loading, will usually be + /// [`kCFErrorDomainCFNetwork`](https://developer.apple.com/documentation/cfnetwork/kcferrordomaincfnetwork). + /// + /// See [NSError.code](https://developer.apple.com/documentation/foundation/nserror/1409165-code) + int get code => _nsObject.code; + + // TODO(https://github.com/dart-lang/ffigen/issues/386): expose + // `NSError.domain` when correct type aliases are available. + + /// A description of the error in the current locale e.g. + /// 'A server with the specified hostname could not be found.' + /// + /// See [NSError.locaizedDescription](https://developer.apple.com/documentation/foundation/nserror/1414418-localizeddescription) + String? get localizedDescription => + toStringOrNull(_nsObject.localizedDescription); + + /// An explanation of the reason for the error in the current locale. + /// + /// See [NSError.localizedFailureReason](https://developer.apple.com/documentation/foundation/nserror/1412752-localizedfailurereason) + String? get localizedFailureReason => + toStringOrNull(_nsObject.localizedFailureReason); + + /// An explanation of how to fix the error in the current locale. + /// + /// See [NSError.localizedRecoverySuggestion](https://developer.apple.com/documentation/foundation/nserror/1407500-localizedrecoverysuggestion) + String? get localizedRecoverySuggestion => + toStringOrNull(_nsObject.localizedRecoverySuggestion); + + @override + String toString() => '[Error ' + 'code=$code ' + 'localizedDescription=$localizedDescription ' + 'localizedFailureReason=$localizedFailureReason ' + 'localizedRecoverySuggestion=$localizedRecoverySuggestion ' + ']'; +} + +/// Controls the behavior of a URLSession. +/// +/// See [NSURLSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration) +class URLSessionConfiguration + extends _ObjectHolder { + URLSessionConfiguration._(ncb.NSURLSessionConfiguration c) : super(c); + + /// A configuration suitable for performing HTTP uploads and downloads in + /// the background. + /// + /// See [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1407496-backgroundsessionconfigurationwi) + factory URLSessionConfiguration.backgroundSession(String identifier) => + URLSessionConfiguration._(ncb.NSURLSessionConfiguration + .backgroundSessionConfigurationWithIdentifier_( + linkedLibs, identifier.toNSString(linkedLibs))); + + /// A configuration that uses caching and saves cookies and credentials. + /// + /// See [NSURLSessionConfiguration defaultSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411560-defaultsessionconfiguration) + factory URLSessionConfiguration.defaultSessionConfiguration() => + URLSessionConfiguration._(ncb.NSURLSessionConfiguration.castFrom( + ncb.NSURLSessionConfiguration.getDefaultSessionConfiguration( + linkedLibs)!)); + + /// A configuration that uses caching and saves cookies and credentials. + /// + /// See [NSURLSessionConfiguration ephemeralSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1410529-ephemeralsessionconfiguration) + factory URLSessionConfiguration.ephemeralSessionConfiguration() => + URLSessionConfiguration._(ncb.NSURLSessionConfiguration.castFrom( + ncb.NSURLSessionConfiguration.getEphemeralSessionConfiguration( + linkedLibs)!)); + + /// Whether connections over a cellular network are allowed. + /// + /// See [NSURLSessionConfiguration.allowsCellularAccess](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1409406-allowscellularaccess) + bool get allowsCellularAccess => _nsObject.allowsCellularAccess; + set allowsCellularAccess(bool value) => + _nsObject.allowsCellularAccess = value; + + /// Whether connections are allowed when the user has selected Low Data Mode. + /// + /// See [NSURLSessionConfiguration.allowsConstrainedNetworkAccess](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/3235751-allowsconstrainednetworkaccess) + bool get allowsConstrainedNetworkAccess => + _nsObject.allowsConstrainedNetworkAccess; + set allowsConstrainedNetworkAccess(bool value) => + _nsObject.allowsConstrainedNetworkAccess = value; + + /// Whether connections are allowed over expensive networks. + /// + /// See [NSURLSessionConfiguration.allowsExpensiveNetworkAccess](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/3235752-allowsexpensivenetworkaccess) + bool get allowsExpensiveNetworkAccess => + _nsObject.allowsExpensiveNetworkAccess; + set allowsExpensiveNetworkAccess(bool value) => + _nsObject.allowsExpensiveNetworkAccess = value; + + /// Whether background tasks can be delayed by the system. + /// + /// See [NSURLSessionConfiguration.discretionary](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411552-discretionary) + bool get discretionary => _nsObject.discretionary; + set discretionary(bool value) => _nsObject.discretionary = value; + + /// What policy to use when deciding whether to accept cookies. + /// + /// See [NSURLSessionConfiguration.HTTPCookieAcceptPolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408933-httpcookieacceptpolicy). + HTTPCookieAcceptPolicy get httpCookieAcceptPolicy => + HTTPCookieAcceptPolicy.values[_nsObject.HTTPCookieAcceptPolicy]; + set httpCookieAcceptPolicy(HTTPCookieAcceptPolicy value) => + _nsObject.HTTPCookieAcceptPolicy = value.index; + + /// Whether requests should include cookies from the cookie store. + /// + /// See [NSURLSessionConfiguration.HTTPShouldSetCookies](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411589-httpshouldsetcookies) + bool get httpShouldSetCookies => _nsObject.HTTPShouldSetCookies; + set httpShouldSetCookies(bool value) => + _nsObject.HTTPShouldSetCookies = value; + + /// Whether to use [HTTP pipelining](https://en.wikipedia.org/wiki/HTTP_pipelining). + /// + /// See [NSURLSessionConfiguration.HTTPShouldUsePipelining](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411657-httpshouldusepipelining) + bool get httpShouldUsePipelining => _nsObject.HTTPShouldUsePipelining; + set httpShouldUsePipelining(bool value) => + _nsObject.HTTPShouldUsePipelining = value; + + /// Whether the app should be resumed when background tasks complete. + /// + /// See [NSURLSessionConfiguration.sessionSendsLaunchEvents](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1617174-sessionsendslaunchevents) + bool get sessionSendsLaunchEvents => _nsObject.sessionSendsLaunchEvents; + set sessionSendsLaunchEvents(bool value) => + _nsObject.sessionSendsLaunchEvents = value; + + /// Whether connections will be preserved if the app moves to the background. + /// + /// See [NSURLSessionConfiguration.shouldUseExtendedBackgroundIdleMode](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1409517-shoulduseextendedbackgroundidlem) + bool get shouldUseExtendedBackgroundIdleMode => + _nsObject.shouldUseExtendedBackgroundIdleMode; + set shouldUseExtendedBackgroundIdleMode(bool value) => + _nsObject.shouldUseExtendedBackgroundIdleMode = value; + + /// The timeout interval if data is not received. + /// + /// See [NSURLSessionConfiguration.timeoutIntervalForRequest](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408259-timeoutintervalforrequest) + Duration get timeoutIntervalForRequest => Duration( + microseconds: + (_nsObject.timeoutIntervalForRequest * Duration.microsecondsPerSecond) + .round()); + + set timeoutIntervalForRequest(Duration interval) { + _nsObject.timeoutIntervalForRequest = + interval.inMicroseconds.toDouble() / Duration.microsecondsPerSecond; + } + + /// Whether tasks should wait for connectivity or fail immediately. + /// + /// See [NSURLSessionConfiguration.waitsForConnectivity](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/2908812-waitsforconnectivity) + bool get waitsForConnectivity => _nsObject.waitsForConnectivity; + set waitsForConnectivity(bool value) => + _nsObject.waitsForConnectivity = value; + + @override + String toString() => '[URLSessionConfiguration ' + 'allowsCellularAccess=$allowsCellularAccess ' + 'allowsConstrainedNetworkAccess=$allowsConstrainedNetworkAccess ' + 'allowsExpensiveNetworkAccess=$allowsExpensiveNetworkAccess ' + 'discretionary=$discretionary ' + 'httpCookieAcceptPolicy=$httpCookieAcceptPolicy ' + 'httpShouldSetCookies=$httpShouldSetCookies ' + 'httpShouldUsePipelining=$httpShouldUsePipelining ' + 'sessionSendsLaunchEvents=$sessionSendsLaunchEvents ' + 'shouldUseExtendedBackgroundIdleMode=' + '$shouldUseExtendedBackgroundIdleMode ' + 'timeoutIntervalForRequest=$timeoutIntervalForRequest ' + 'waitsForConnectivity=$waitsForConnectivity' + ']'; +} + +/// A container for byte data. +/// +/// See [NSData](https://developer.apple.com/documentation/foundation/nsdata) +class Data extends _ObjectHolder { + Data._(ncb.NSData c) : super(c); + + // A new [Data] from an existing one. + // + // See [NSData dataWithData:](https://developer.apple.com/documentation/foundation/nsdata/1547230-datawithdata) + factory Data.fromData(Data d) => + Data._(ncb.NSData.dataWithData_(linkedLibs, d._nsObject)); + + /// A new [Data] object containing the given bytes. + factory Data.fromUint8List(Uint8List l) { + final buffer = calloc(l.length); + try { + buffer.asTypedList(l.length).setAll(0, l); + + final data = + ncb.NSData.dataWithBytes_length_(linkedLibs, buffer.cast(), l.length); + return Data._(data); + } finally { + calloc.free(buffer); + } + } + + /// The number of bytes contained in the object. + /// + /// See [NSData.length](https://developer.apple.com/documentation/foundation/nsdata/1416769-length) + int get length => _nsObject.length; + + /// The data contained in the object. + /// + /// See [NSData.bytes](https://developer.apple.com/documentation/foundation/nsdata/1410616-bytes) + Uint8List get bytes { + final bytes = _nsObject.bytes; + if (bytes.address == 0) { + return Uint8List(0); + } else { + // `NSData.byte` has the same lifetime as the `NSData` so make a copy to + // ensure memory safety. + // TODO(https://github.com/dart-lang/ffigen/issues/375): Remove copy. + return Uint8List.fromList(bytes.cast().asTypedList(length)); + } + } + + @override + String toString() { + final subrange = + length == 0 ? Uint8List(0) : bytes.sublist(0, min(length - 1, 20)); + final b = subrange.map((e) => e.toRadixString(16)).join(); + return '[Data length=$length bytes=0x$b...]'; + } +} + +/// A container for byte data. +/// +/// See [NSMutableData](https://developer.apple.com/documentation/foundation/nsmutabledata) +class MutableData extends Data { + final ncb.NSMutableData _mutableData; + + MutableData._(ncb.NSMutableData c) + : _mutableData = c, + super._(c); + + /// A new empty [MutableData]. + factory MutableData.empty() => + MutableData._(ncb.NSMutableData.dataWithCapacity_(linkedLibs, 0)); + + /// Appends the given data. + /// + /// See [NSMutableData appendBytes:length:](https://developer.apple.com/documentation/foundation/nsmutabledata/1407704-appendbytes) + void appendBytes(Uint8List l) { + final f = calloc(l.length); + try { + f.asTypedList(l.length).setAll(0, l); + + _mutableData.appendBytes_length_(f.cast(), l.length); + } finally { + calloc.free(f); + } + } + + @override + String toString() { + final subrange = + length == 0 ? Uint8List(0) : bytes.sublist(0, min(length - 1, 20)); + final b = subrange.map((e) => e.toRadixString(16)).join(); + return '[MutableData length=$length bytes=0x$b...]'; + } +} + +/// The response associated with loading an URL. +/// +/// See [NSURLResponse](https://developer.apple.com/documentation/foundation/nsurlresponse) +class URLResponse extends _ObjectHolder { + URLResponse._(ncb.NSURLResponse c) : super(c); + + factory URLResponse._exactURLResponseType(ncb.NSURLResponse response) { + if (ncb.NSHTTPURLResponse.isInstance(response)) { + return HTTPURLResponse._(ncb.NSHTTPURLResponse.castFrom(response)); + } + return URLResponse._(response); + } + + /// The expected amount of data returned with the response. + /// + /// See [NSURLResponse.expectedContentLength](https://developer.apple.com/documentation/foundation/nsurlresponse/1413507-expectedcontentlength) + int get expectedContentLength => _nsObject.expectedContentLength; + + /// The MIME type of the response. + /// + /// See [NSURLResponse.MIMEType](https://developer.apple.com/documentation/foundation/nsurlresponse/1411613-mimetype) + String? get mimeType => toStringOrNull(_nsObject.MIMEType); + + @override + String toString() => '[URLResponse ' + 'mimeType=$mimeType ' + 'expectedContentLength=$expectedContentLength' + ']'; +} + +/// The response associated with loading a HTTP URL. +/// +/// See [NSHTTPURLResponse](https://developer.apple.com/documentation/foundation/nshttpurlresponse) +class HTTPURLResponse extends URLResponse { + final ncb.NSHTTPURLResponse _httpUrlResponse; + + HTTPURLResponse._(ncb.NSHTTPURLResponse c) + : _httpUrlResponse = c, + super._(c); + + /// The HTTP status code of the response (e.g. 200). + /// + /// See [HTTPURLResponse.statusCode](https://developer.apple.com/documentation/foundation/nshttpurlresponse/1409395-statuscode) + int get statusCode => _httpUrlResponse.statusCode; + + /// The HTTP headers of the response. + /// + /// See [HTTPURLResponse.allHeaderFields](https://developer.apple.com/documentation/foundation/nshttpurlresponse/1417930-allheaderfields) + Map get allHeaderFields { + final headers = + ncb.NSDictionary.castFrom(_httpUrlResponse.allHeaderFields!); + return stringDictToMap(headers); + } + + @override + String toString() => '[HTTPURLResponse ' + 'statusCode=$statusCode ' + 'mimeType=$mimeType ' + 'expectedContentLength=$expectedContentLength' + ']'; +} + +/// The possible states of a [URLSessionTask]. +/// +/// See [NSURLSessionTaskState](https://developer.apple.com/documentation/foundation/nsurlsessiontaskstate) +enum URLSessionTaskState { + urlSessionTaskStateRunning, + urlSessionTaskStateSuspended, + urlSessionTaskStateCanceling, + urlSessionTaskStateCompleted, +} + +/// A task associated with downloading a URI. +/// +/// See [NSURLSessionTask](https://developer.apple.com/documentation/foundation/nsurlsessiontask) +class URLSessionTask extends _ObjectHolder { + URLSessionTask._(ncb.NSURLSessionTask c) : super(c); + + /// Cancels the task. + /// + /// See [NSURLSessionTask cancel](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411591-cancel) + void cancel() { + _nsObject.cancel(); + } + + /// Resumes a suspended task (new tasks start as suspended). + /// + /// See [NSURLSessionTask resume](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411121-resume) + void resume() { + _nsObject.resume(); + } + + /// Suspends a task (prevents it from transfering data). + /// + /// See [NSURLSessionTask suspend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411565-suspend) + void suspend() { + _nsObject.suspend(); + } + + /// The current state of the task. + /// + /// See [NSURLSessionTask.state](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1409888-state) + URLSessionTaskState get state => URLSessionTaskState.values[_nsObject.state]; + + // A unique ID for the [URLSessionTask] in a [URLSession]. + // + // See [NSURLSessionTask.taskIdentifier](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411231-taskidentifier) + int get taskIdentifier => _nsObject.taskIdentifier; + + /// The server response to the request associated with this task. + /// + /// See [NSURLSessionTask.response](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410586-response) + URLResponse? get response { + if (_nsObject.response == null) { + return null; + } else { + // TODO(https://github.com/dart-lang/ffigen/issues/373): remove cast + // when precise type signatures are generated. + return URLResponse._exactURLResponseType( + ncb.NSURLResponse.castFrom(_nsObject.response!)); + } + } + + /// The number of content bytes that have been received from the server. + /// + /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411581-countofbytesreceived) + int get countOfBytesReceived => _nsObject.countOfBytesReceived; + + /// The number of content bytes that are expected to be received from the + /// server. + /// + /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410663-countofbytesexpectedtoreceive) + int get countOfBytesExpectedToReceive => + _nsObject.countOfBytesExpectedToReceive; + + @override + String toString() => '[URLSessionTask ' + 'taskIdentifier=$taskIdentifier ' + 'countOfBytesExpectedToReceive=$countOfBytesExpectedToReceive ' + 'countOfBytesReceived=$countOfBytesReceived ' + 'state=$state' + ']'; +} + +/// A task associated with downloading a URI to a file. +/// +/// See [NSURLSessionDownloadTask](https://developer.apple.com/documentation/foundation/nsurlsessiondownloadtask) +class URLSessionDownloadTask extends URLSessionTask { + URLSessionDownloadTask._(ncb.NSURLSessionDownloadTask c) : super._(c); + + @override + String toString() => '[URLSessionDownloadTask ' + 'taskIdentifier=$taskIdentifier ' + 'countOfBytesExpectedToReceive=$countOfBytesExpectedToReceive ' + 'countOfBytesReceived=$countOfBytesReceived ' + 'state=$state' + ']'; +} + +/// A request to load a URL. +/// +/// See [NSURLRequest](https://developer.apple.com/documentation/foundation/nsurlrequest) +class URLRequest extends _ObjectHolder { + URLRequest._(ncb.NSURLRequest c) : super(c); + + /// Creates a request for a URL. + /// + /// See [NSURLRequest.requestWithURL:](https://developer.apple.com/documentation/foundation/nsurlrequest/1528603-requestwithurl) + factory URLRequest.fromUrl(Uri uri) { + final url = ncb.NSURL + .URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs)); + return URLRequest._(ncb.NSURLRequest.requestWithURL_(linkedLibs, url)); + } + + /// Returns all of the HTTP headers for the request. + /// + /// See [NSURLRequest.allHTTPHeaderFields](https://developer.apple.com/documentation/foundation/nsurlrequest/1418477-allhttpheaderfields) + Map? get allHttpHeaderFields { + if (_nsObject.allHTTPHeaderFields == null) { + return null; + } else { + final headers = ncb.NSDictionary.castFrom(_nsObject.allHTTPHeaderFields!); + return stringDictToMap(headers); + } + } + + /// The body of the request. + /// + /// See [NSURLRequest.HTTPBody](https://developer.apple.com/documentation/foundation/nsurlrequest/1411317-httpbody) + Data? get httpBody { + final body = _nsObject.HTTPBody; + if (body == null) { + return null; + } + return Data._(ncb.NSData.castFrom(body)); + } + + /// The HTTP request method (e.g. 'GET'). + /// + /// See [NSURLRequest.HTTPMethod](https://developer.apple.com/documentation/foundation/nsurlrequest/1413030-httpmethod) + /// + /// NOTE: The documentation for `NSURLRequest.HTTPMethod` says that the + /// property is nullable but, in practice, assigning it to null will produce + /// an error. + String get httpMethod => toStringOrNull(_nsObject.HTTPMethod)!; + + /// The requested URL. + /// + /// See [URLRequest.URL](https://developer.apple.com/documentation/foundation/nsurlrequest/1408996-url) + Uri? get url { + final nsUrl = _nsObject.URL; + if (nsUrl == null) { + return null; + } + // TODO(https://github.com/dart-lang/ffigen/issues/373): remove NSObject + // cast when precise type signatures are generated. + return Uri.parse(toStringOrNull(ncb.NSURL.castFrom(nsUrl).absoluteString)!); + } + + @override + String toString() => '[URLRequest ' + 'allHttpHeaderFields=$allHttpHeaderFields ' + 'httpBody=$httpBody ' + 'httpMethod=$httpMethod ' + 'url=$url ' + ']'; +} + +/// A mutable request to load a URL. +/// +/// See [NSMutableURLRequest](https://developer.apple.com/documentation/foundation/nsmutableurlrequest) +class MutableURLRequest extends URLRequest { + final ncb.NSMutableURLRequest _mutableUrlRequest; + + MutableURLRequest._(ncb.NSMutableURLRequest c) + : _mutableUrlRequest = c, + super._(c); + + /// Creates a request for a URL. + /// + /// See [NSMutableURLRequest.requestWithURL:](https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1414617-allhttpheaderfields) + factory MutableURLRequest.fromUrl(Uri uri) { + final url = ncb.NSURL + .URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs)); + return MutableURLRequest._( + ncb.NSMutableURLRequest.requestWithURL_(linkedLibs, url)); + } + + set httpBody(Data? data) { + _mutableUrlRequest.HTTPBody = data?._nsObject; + } + + set httpMethod(String method) { + _mutableUrlRequest.HTTPMethod = method.toNSString(linkedLibs); + } + + /// Set the value of a header field. + /// + /// See [NSMutableURLRequest setValue:forHTTPHeaderField:](https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1408793-setvalue) + void setValueForHttpHeaderField(String value, String field) { + _mutableUrlRequest.setValue_forHTTPHeaderField_( + field.toNSString(linkedLibs), value.toNSString(linkedLibs)); + } + + @override + String toString() => '[MutableURLRequest ' + 'allHttpHeaderFields=$allHttpHeaderFields ' + 'httpBody=$httpBody ' + 'httpMethod=$httpMethod ' + ']'; +} + +/// Setup delegation for the given [task] to the given methods. +/// +/// Specifically, this causes the Objective-C-implemented delegate installed +/// with +/// [sessionWithConfiguration:delegate:delegateQueue:](https://developer.apple.com/documentation/foundation/nsurlsession/1411597-sessionwithconfiguration) +/// to send a [ncb.CUPHTTPForwardedDelegate] object to a send port, which is +/// then processed by [_setupDelegation] and forwarded to the given methods. +void _setupDelegation( + ncb.CUPHTTPClientDelegate delegate, URLSession session, URLSessionTask task, + {URLRequest? Function(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest newRequest)? + onRedirect, + URLSessionResponseDisposition Function( + URLSession session, URLSessionTask task, URLResponse response)? + onResponse, + void Function(URLSession session, URLSessionTask task, Data error)? onData, + void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? + onFinishedDownloading, + void Function(URLSession session, URLSessionTask task, Error? error)? + onComplete}) { + final responsePort = ReceivePort(); + responsePort.listen((d) { + final message = d as List; + final messageType = message[0]; + final dp = Pointer.fromAddress(message[1] as int); + + final forwardedDelegate = + ncb.CUPHTTPForwardedDelegate.castFromPointer(helperLibs, dp, + // `CUPHTTPForwardedDelegate` was retained in the delegate so it + // only needs to be released. + release: true); + + switch (messageType) { + case ncb.MessageType.RedirectMessage: + final forwardedRedirect = + ncb.CUPHTTPForwardedRedirect.castFrom(forwardedDelegate); + URLRequest? redirectRequest; + + try { + final request = URLRequest._( + ncb.NSURLRequest.castFrom(forwardedRedirect.request!)); + + if (onRedirect == null) { + redirectRequest = request; + break; + } + try { + final response = HTTPURLResponse._( + ncb.NSHTTPURLResponse.castFrom(forwardedRedirect.response!)); + redirectRequest = onRedirect(session, task, response, request); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + } finally { + forwardedRedirect.finishWithRequest_(redirectRequest?._nsObject); + } + break; + case ncb.MessageType.ResponseMessage: + final forwardedResponse = + ncb.CUPHTTPForwardedResponse.castFrom(forwardedDelegate); + var disposition = + URLSessionResponseDisposition.urlSessionResponseCancel; + + try { + if (onResponse == null) { + disposition = URLSessionResponseDisposition.urlSessionResponseAllow; + break; + } + // TODO(https://github.com/dart-lang/ffigen/issues/373): remove cast + // when precise type signatures are generated. + final response = URLResponse._exactURLResponseType( + ncb.NSURLResponse.castFrom(forwardedResponse.response!)); + + try { + disposition = onResponse(session, task, response); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + } finally { + forwardedResponse.finishWithDisposition_(disposition.index); + } + break; + case ncb.MessageType.DataMessage: + final forwardedData = + ncb.CUPHTTPForwardedData.castFrom(forwardedDelegate); + + try { + if (onData == null) { + break; + } + try { + onData(session, task, + Data._(ncb.NSData.castFrom(forwardedData.data!))); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + } finally { + forwardedData.finish(); + } + break; + case ncb.MessageType.FinishedDownloading: + final finishedDownloading = + ncb.CUPHTTPForwardedFinishedDownloading.castFrom(forwardedDelegate); + try { + if (onFinishedDownloading == null) { + break; + } + try { + onFinishedDownloading( + session, + task as URLSessionDownloadTask, + Uri.parse( + finishedDownloading.location!.absoluteString!.toString())); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + } finally { + finishedDownloading.finish(); + } + break; + case ncb.MessageType.CompletedMessage: + final forwardedComplete = + ncb.CUPHTTPForwardedComplete.castFrom(forwardedDelegate); + + try { + if (onComplete == null) { + break; + } + Error? error; + if (forwardedComplete.error != null) { + error = Error._(ncb.NSError.castFrom(forwardedComplete.error!)); + } + try { + onComplete(session, task, error); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + } finally { + forwardedComplete.finish(); + responsePort.close(); + } + break; + } + }); + final config = ncb.CUPHTTPTaskConfiguration.castFrom( + ncb.CUPHTTPTaskConfiguration.alloc(helperLibs) + .initWithPort_(responsePort.sendPort.nativePort)); + + delegate.registerTask_withConfiguration_(task._nsObject, config); +} + +/// A client that can make network requests to a server. +/// +/// See [NSURLSession](https://developer.apple.com/documentation/foundation/nsurlsession) +class URLSession extends _ObjectHolder { + // Provide our own native delegate to `NSURLSession` because delegates can be + // called on arbitrary threads and Dart code cannot be. + static final _delegate = ncb.CUPHTTPClientDelegate.new1(helperLibs); + + URLRequest? Function(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest newRequest)? _onRedirect; + URLSessionResponseDisposition Function( + URLSession session, URLSessionTask task, URLResponse response)? + _onResponse; + void Function(URLSession session, URLSessionTask task, Data error)? _onData; + void Function(URLSession session, URLSessionTask task, Error? error)? + _onComplete; + void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? + _onFinishedDownloading; + + URLSession._(ncb.NSURLSession c, + {URLRequest? Function(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest newRequest)? + onRedirect, + URLSessionResponseDisposition Function( + URLSession session, URLSessionTask task, URLResponse response)? + onResponse, + void Function(URLSession session, URLSessionTask task, Data error)? + onData, + void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? + onFinishedDownloading, + void Function(URLSession session, URLSessionTask task, Error? error)? + onComplete}) + : _onRedirect = onRedirect, + _onResponse = onResponse, + _onData = onData, + _onFinishedDownloading = onFinishedDownloading, + _onComplete = onComplete, + super(c); + + /// A client with reasonable default behavior. + /// + /// See [NSURLSession.sharedSession](https://developer.apple.com/documentation/foundation/nsurlsession/1409000-sharedsession) + factory URLSession.sharedSession() => URLSession.sessionWithConfiguration( + URLSessionConfiguration.defaultSessionConfiguration()); + + /// A client with a given configuration. + /// + /// If [onRedirect] is set then it will be called whenever a HTTP + /// request returns a redirect response (e.g. 302). The `response` parameter + /// contains the response from the server. The `newRequest` parameter contains + /// a follow-up request that would honor the server's redirect. If the return + /// value of this function is `null` then the redirect will not occur. + /// Otherwise, the returned [URLRequest] (usually `newRequest`) will be + /// executed. See + /// [URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessiontaskdelegate/1411626-urlsession) + /// + /// If [onResponse] is set then it will be called whenever a valid response + /// is received. The returned [URLSessionResponseDisposition] will decide + /// how the content of the response is processed. See + /// [URLSession:dataTask:didReceiveResponse:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessiondatadelegate/1410027-urlsession) + /// + /// If [onData] is set then it will be called whenever response data is + /// received. If the amount of received data is large, then it may be + /// called more than once. See + /// [URLSession:dataTask:didReceiveData:](https://developer.apple.com/documentation/foundation/nsurlsessiondatadelegate/1411528-urlsession) + /// + /// If [onFinishedDownloading] is set then it will be called whenever a + /// [URLSessionDownloadTask] has finished downloading. + /// + /// If [onComplete] is set then it will be called when a task completes. If + /// `error` is `null` then the request completed successfully. See + /// [URLSession:task:didCompleteWithError:](https://developer.apple.com/documentation/foundation/nsurlsessiontaskdelegate/1411610-urlsession) + /// + /// See [sessionWithConfiguration:delegate:delegateQueue:](https://developer.apple.com/documentation/foundation/nsurlsession/1411597-sessionwithconfiguration) + factory URLSession.sessionWithConfiguration(URLSessionConfiguration config, + {URLRequest? Function(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest newRequest)? + onRedirect, + URLSessionResponseDisposition Function(URLSession session, + URLSessionTask task, URLResponse response)? + onResponse, + void Function(URLSession session, URLSessionTask task, Data error)? + onData, + void Function( + URLSession session, URLSessionDownloadTask task, Uri uri)? + onFinishedDownloading, + void Function(URLSession session, URLSessionTask task, Error? error)? + onComplete}) => + URLSession._( + ncb.NSURLSession.sessionWithConfiguration_delegate_delegateQueue_( + linkedLibs, config._nsObject, _delegate, null), + onRedirect: onRedirect, + onResponse: onResponse, + onData: onData, + onFinishedDownloading: onFinishedDownloading, + onComplete: onComplete); + + // A **copy** of the configuration for this sesion. + // + // See [NSURLSession.configuration](https://developer.apple.com/documentation/foundation/nsurlsession/1411477-configuration) + URLSessionConfiguration get configuration => URLSessionConfiguration._( + ncb.NSURLSessionConfiguration.castFrom(_nsObject.configuration!)); + + // Create a [URLSessionTask] that accesses a server URL. + // + // See [NSURLSession dataTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/1410592-datataskwithrequest) + URLSessionTask dataTaskWithRequest(URLRequest request) { + final task = + URLSessionTask._(_nsObject.dataTaskWithRequest_(request._nsObject)); + _setupDelegation(_delegate, this, task, + onComplete: _onComplete, + onData: _onData, + onFinishedDownloading: _onFinishedDownloading, + onRedirect: _onRedirect, + onResponse: _onResponse); + return task; + } + + /// Creates a [URLSessionTask] that accesses a server URL and calls + /// [completion] when done. + /// + /// See [NSURLSession dataTaskWithRequest:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsession/1407613-datataskwithrequest) + URLSessionTask dataTaskWithCompletionHandler( + URLRequest request, + void Function(Data? data, HTTPURLResponse? response, Error? error) + completion) { + // This method cannot be implemented by simply calling + // `dataTaskWithRequest:completionHandler:` because the completion handler + // will invoke the Dart callback on an arbitrary thread and Dart code + // cannot be run that way + // (see https://github.com/dart-lang/sdk/issues/37022). + // + // Instead, we use `dataTaskWithRequest:` and: + // 1. create a port to receive information about the request. + // 2. use a delegate to send information about the task to the port + // 3. call the user-provided completion function when we receive the + // `CompletedMessage` message type. + final task = + URLSessionTask._(_nsObject.dataTaskWithRequest_(request._nsObject)); + + HTTPURLResponse? finalResponse; + MutableData? allData; + + _setupDelegation(_delegate, this, task, onRedirect: _onRedirect, onResponse: + (URLSession session, URLSessionTask task, URLResponse response) { + finalResponse = + HTTPURLResponse._(ncb.NSHTTPURLResponse.castFrom(response._nsObject)); + return URLSessionResponseDisposition.urlSessionResponseAllow; + }, onData: (URLSession session, URLSessionTask task, Data data) { + allData ??= MutableData.empty(); + allData!.appendBytes(data.bytes); + }, onComplete: (URLSession session, URLSessionTask task, Error? error) { + completion(allData == null ? null : Data.fromData(allData!), + finalResponse, error); + }); + + return URLSessionTask._(task._nsObject); + } + + /// Creates a [URLSessionDownloadTask] that downloads the data from a server + /// URL. + /// + /// Provide a `onFinishedDownloading` handler in the [URLSession] factory to + /// receive notifications when the data has completed downloaded. + /// + /// See [NSURLSession downloadTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/1411481-downloadtaskwithrequest) + URLSessionDownloadTask downloadTaskWithRequest(URLRequest request) { + final task = URLSessionDownloadTask._( + _nsObject.downloadTaskWithRequest_(request._nsObject)); + _setupDelegation(_delegate, this, task, + onComplete: _onComplete, + onData: _onData, + onFinishedDownloading: _onFinishedDownloading, + onRedirect: _onRedirect, + onResponse: _onResponse); + return task; + } +} diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart new file mode 100644 index 0000000000..e9af0e244e --- /dev/null +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -0,0 +1,28895 @@ +// ignore_for_file: always_specify_types +// ignore_for_file: camel_case_types +// ignore_for_file: non_constant_identifier_names + +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +import 'dart:ffi' as ffi; +import 'package:ffi/ffi.dart' as pkg_ffi; + +/// Bindings for the Foundation URL Loading System and supporting libraries. +/// +/// Regenerate bindings with `dart run ffigen --config ffigen.yaml`. +/// +class NativeCupertinoHttp { + /// Holds the symbol lookup function. + final ffi.Pointer Function(String symbolName) + _lookup; + + /// The symbols are looked up in [dynamicLibrary]. + NativeCupertinoHttp(ffi.DynamicLibrary dynamicLibrary) + : _lookup = dynamicLibrary.lookup; + + /// The symbols are looked up with [lookup]. + NativeCupertinoHttp.fromLookup( + ffi.Pointer Function(String symbolName) + lookup) + : _lookup = lookup; + + ffi.Pointer _registerName1(String name) { + final cstr = name.toNativeUtf8(); + final sel = _sel_registerName(cstr.cast()); + pkg_ffi.calloc.free(cstr); + return sel; + } + + ffi.Pointer _sel_registerName( + ffi.Pointer str, + ) { + return __sel_registerName( + str, + ); + } + + late final __sel_registerNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('sel_registerName'); + late final __sel_registerName = __sel_registerNamePtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer _getClass1(String name) { + final cstr = name.toNativeUtf8(); + final clazz = _objc_getClass(cstr.cast()); + pkg_ffi.calloc.free(cstr); + return clazz; + } + + ffi.Pointer _objc_getClass( + ffi.Pointer str, + ) { + return __objc_getClass( + str, + ); + } + + late final __objc_getClassPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('objc_getClass'); + late final __objc_getClass = __objc_getClassPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer _objc_retain( + ffi.Pointer value, + ) { + return __objc_retain( + value, + ); + } + + late final __objc_retainPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('objc_retain'); + late final __objc_retain = __objc_retainPtr + .asFunction Function(ffi.Pointer)>(); + + void _objc_release( + ffi.Pointer value, + ) { + return __objc_release( + value, + ); + } + + late final __objc_releasePtr = + _lookup)>>( + 'objc_release'); + late final __objc_release = + __objc_releasePtr.asFunction)>(); + + late final _objc_releaseFinalizer1 = + ffi.NativeFinalizer(__objc_releasePtr.cast()); + late final _class_NSArray1 = _getClass1("NSArray"); + bool _objc_msgSend_0( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer clazz, + ) { + return __objc_msgSend_0( + obj, + sel, + clazz, + ); + } + + late final __objc_msgSend_0Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); + late final _class_NSObject1 = _getClass1("NSObject"); + late final _sel_load1 = _registerName1("load"); + void _objc_msgSend_1( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_1( + obj, + sel, + ); + } + + late final __objc_msgSend_1Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initialize1 = _registerName1("initialize"); + late final _sel_init1 = _registerName1("init"); + instancetype _objc_msgSend_2( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_2( + obj, + sel, + ); + } + + late final __objc_msgSend_2Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_new1 = _registerName1("new"); + late final _sel_allocWithZone_1 = _registerName1("allocWithZone:"); + instancetype _objc_msgSend_3( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_NSZone> zone, + ) { + return __objc_msgSend_3( + obj, + sel, + zone, + ); + } + + late final __objc_msgSend_3Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_NSZone>)>>('objc_msgSend'); + late final __objc_msgSend_3 = __objc_msgSend_3Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_NSZone>)>(); + + late final _sel_alloc1 = _registerName1("alloc"); + late final _sel_dealloc1 = _registerName1("dealloc"); + late final _sel_finalize1 = _registerName1("finalize"); + late final _sel_copy1 = _registerName1("copy"); + late final _sel_mutableCopy1 = _registerName1("mutableCopy"); + late final _sel_copyWithZone_1 = _registerName1("copyWithZone:"); + late final _sel_mutableCopyWithZone_1 = + _registerName1("mutableCopyWithZone:"); + late final _sel_instancesRespondToSelector_1 = + _registerName1("instancesRespondToSelector:"); + bool _objc_msgSend_4( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ) { + return __objc_msgSend_4( + obj, + sel, + aSelector, + ); + } + + late final __objc_msgSend_4Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_Protocol1 = _getClass1("Protocol"); + late final _sel_conformsToProtocol_1 = _registerName1("conformsToProtocol:"); + bool _objc_msgSend_5( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer protocol, + ) { + return __objc_msgSend_5( + obj, + sel, + protocol, + ); + } + + late final __objc_msgSend_5Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_5 = __objc_msgSend_5Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_methodForSelector_1 = _registerName1("methodForSelector:"); + IMP _objc_msgSend_6( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ) { + return __objc_msgSend_6( + obj, + sel, + aSelector, + ); + } + + late final __objc_msgSend_6Ptr = _lookup< + ffi.NativeFunction< + IMP Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction< + IMP Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_instanceMethodForSelector_1 = + _registerName1("instanceMethodForSelector:"); + late final _sel_doesNotRecognizeSelector_1 = + _registerName1("doesNotRecognizeSelector:"); + void _objc_msgSend_7( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ) { + return __objc_msgSend_7( + obj, + sel, + aSelector, + ); + } + + late final __objc_msgSend_7Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_forwardingTargetForSelector_1 = + _registerName1("forwardingTargetForSelector:"); + ffi.Pointer _objc_msgSend_8( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ) { + return __objc_msgSend_8( + obj, + sel, + aSelector, + ); + } + + late final __objc_msgSend_8Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSInvocation1 = _getClass1("NSInvocation"); + late final _sel_forwardInvocation_1 = _registerName1("forwardInvocation:"); + void _objc_msgSend_9( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anInvocation, + ) { + return __objc_msgSend_9( + obj, + sel, + anInvocation, + ); + } + + late final __objc_msgSend_9Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_9 = __objc_msgSend_9Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSMethodSignature1 = _getClass1("NSMethodSignature"); + late final _sel_methodSignatureForSelector_1 = + _registerName1("methodSignatureForSelector:"); + ffi.Pointer _objc_msgSend_10( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ) { + return __objc_msgSend_10( + obj, + sel, + aSelector, + ); + } + + late final __objc_msgSend_10Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_instanceMethodSignatureForSelector_1 = + _registerName1("instanceMethodSignatureForSelector:"); + late final _sel_allowsWeakReference1 = _registerName1("allowsWeakReference"); + bool _objc_msgSend_11( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_11( + obj, + sel, + ); + } + + late final __objc_msgSend_11Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_retainWeakReference1 = _registerName1("retainWeakReference"); + late final _sel_isSubclassOfClass_1 = _registerName1("isSubclassOfClass:"); + late final _sel_resolveClassMethod_1 = _registerName1("resolveClassMethod:"); + late final _sel_resolveInstanceMethod_1 = + _registerName1("resolveInstanceMethod:"); + late final _sel_hash1 = _registerName1("hash"); + int _objc_msgSend_12( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_12( + obj, + sel, + ); + } + + late final __objc_msgSend_12Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_12 = __objc_msgSend_12Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_superclass1 = _registerName1("superclass"); + late final _sel_class1 = _registerName1("class"); + late final _class_NSString1 = _getClass1("NSString"); + late final _sel_length1 = _registerName1("length"); + late final _sel_characterAtIndex_1 = _registerName1("characterAtIndex:"); + int _objc_msgSend_13( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_13( + obj, + sel, + index, + ); + } + + late final __objc_msgSend_13Ptr = _lookup< + ffi.NativeFunction< + unichar Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _class_NSCoder1 = _getClass1("NSCoder"); + late final _sel_initWithCoder_1 = _registerName1("initWithCoder:"); + instancetype _objc_msgSend_14( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer coder, + ) { + return __objc_msgSend_14( + obj, + sel, + coder, + ); + } + + late final __objc_msgSend_14Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); + late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); + ffi.Pointer _objc_msgSend_15( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_15( + obj, + sel, + ); + } + + late final __objc_msgSend_15Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_whitespaceCharacterSet1 = + _registerName1("whitespaceCharacterSet"); + late final _sel_whitespaceAndNewlineCharacterSet1 = + _registerName1("whitespaceAndNewlineCharacterSet"); + late final _sel_decimalDigitCharacterSet1 = + _registerName1("decimalDigitCharacterSet"); + late final _sel_letterCharacterSet1 = _registerName1("letterCharacterSet"); + late final _sel_lowercaseLetterCharacterSet1 = + _registerName1("lowercaseLetterCharacterSet"); + late final _sel_uppercaseLetterCharacterSet1 = + _registerName1("uppercaseLetterCharacterSet"); + late final _sel_nonBaseCharacterSet1 = _registerName1("nonBaseCharacterSet"); + late final _sel_alphanumericCharacterSet1 = + _registerName1("alphanumericCharacterSet"); + late final _sel_decomposableCharacterSet1 = + _registerName1("decomposableCharacterSet"); + late final _sel_illegalCharacterSet1 = _registerName1("illegalCharacterSet"); + late final _sel_punctuationCharacterSet1 = + _registerName1("punctuationCharacterSet"); + late final _sel_capitalizedLetterCharacterSet1 = + _registerName1("capitalizedLetterCharacterSet"); + late final _sel_symbolCharacterSet1 = _registerName1("symbolCharacterSet"); + late final _sel_newlineCharacterSet1 = _registerName1("newlineCharacterSet"); + late final _sel_characterSetWithRange_1 = + _registerName1("characterSetWithRange:"); + ffi.Pointer _objc_msgSend_16( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange aRange, + ) { + return __objc_msgSend_16( + obj, + sel, + aRange, + ); + } + + late final __objc_msgSend_16Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); + + late final _sel_characterSetWithCharactersInString_1 = + _registerName1("characterSetWithCharactersInString:"); + ffi.Pointer _objc_msgSend_17( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, + ) { + return __objc_msgSend_17( + obj, + sel, + aString, + ); + } + + late final __objc_msgSend_17Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSData1 = _getClass1("NSData"); + late final _sel_bytes1 = _registerName1("bytes"); + ffi.Pointer _objc_msgSend_18( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_18( + obj, + sel, + ); + } + + late final __objc_msgSend_18Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_description1 = _registerName1("description"); + ffi.Pointer _objc_msgSend_19( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_19( + obj, + sel, + ); + } + + late final __objc_msgSend_19Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_getBytes_length_1 = _registerName1("getBytes:length:"); + void _objc_msgSend_20( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + int length, + ) { + return __objc_msgSend_20( + obj, + sel, + buffer, + length, + ); + } + + late final __objc_msgSend_20Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_getBytes_range_1 = _registerName1("getBytes:range:"); + void _objc_msgSend_21( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + NSRange range, + ) { + return __objc_msgSend_21( + obj, + sel, + buffer, + range, + ); + } + + late final __objc_msgSend_21Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); + + late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); + bool _objc_msgSend_22( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + ) { + return __objc_msgSend_22( + obj, + sel, + other, + ); + } + + late final __objc_msgSend_22Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); + ffi.Pointer _objc_msgSend_23( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ) { + return __objc_msgSend_23( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_23Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); + + late final _sel_writeToFile_atomically_1 = + _registerName1("writeToFile:atomically:"); + bool _objc_msgSend_24( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool useAuxiliaryFile, + ) { + return __objc_msgSend_24( + obj, + sel, + path, + useAuxiliaryFile, + ); + } + + late final __objc_msgSend_24Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _class_NSURL1 = _getClass1("NSURL"); + late final _sel_initWithScheme_host_path_1 = + _registerName1("initWithScheme:host:path:"); + instancetype _objc_msgSend_25( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer scheme, + ffi.Pointer host, + ffi.Pointer path, + ) { + return __objc_msgSend_25( + obj, + sel, + scheme, + host, + path, + ); + } + + late final __objc_msgSend_25Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = + _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); + instancetype _objc_msgSend_26( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_26( + obj, + sel, + path, + isDir, + baseURL, + ); + } + + late final __objc_msgSend_26Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool, ffi.Pointer)>(); + + late final _sel_initFileURLWithPath_relativeToURL_1 = + _registerName1("initFileURLWithPath:relativeToURL:"); + instancetype _objc_msgSend_27( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_27( + obj, + sel, + path, + baseURL, + ); + } + + late final __objc_msgSend_27Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initFileURLWithPath_isDirectory_1 = + _registerName1("initFileURLWithPath:isDirectory:"); + instancetype _objc_msgSend_28( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ) { + return __objc_msgSend_28( + obj, + sel, + path, + isDir, + ); + } + + late final __objc_msgSend_28Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_initFileURLWithPath_1 = + _registerName1("initFileURLWithPath:"); + instancetype _objc_msgSend_29( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_29( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_29Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_fileURLWithPath_isDirectory_relativeToURL_1 = + _registerName1("fileURLWithPath:isDirectory:relativeToURL:"); + ffi.Pointer _objc_msgSend_30( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_30( + obj, + sel, + path, + isDir, + baseURL, + ); + } + + late final __objc_msgSend_30Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); + + late final _sel_fileURLWithPath_relativeToURL_1 = + _registerName1("fileURLWithPath:relativeToURL:"); + ffi.Pointer _objc_msgSend_31( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_31( + obj, + sel, + path, + baseURL, + ); + } + + late final __objc_msgSend_31Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_fileURLWithPath_isDirectory_1 = + _registerName1("fileURLWithPath:isDirectory:"); + ffi.Pointer _objc_msgSend_32( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ) { + return __objc_msgSend_32( + obj, + sel, + path, + isDir, + ); + } + + late final __objc_msgSend_32Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); + ffi.Pointer _objc_msgSend_33( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_33( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_33Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = + _registerName1( + "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); + instancetype _objc_msgSend_34( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_34( + obj, + sel, + path, + isDir, + baseURL, + ); + } + + late final __objc_msgSend_34Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool, ffi.Pointer)>(); + + late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = + _registerName1( + "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); + ffi.Pointer _objc_msgSend_35( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_35( + obj, + sel, + path, + isDir, + baseURL, + ); + } + + late final __objc_msgSend_35Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); + + late final _sel_initWithString_1 = _registerName1("initWithString:"); + late final _sel_initWithString_relativeToURL_1 = + _registerName1("initWithString:relativeToURL:"); + late final _sel_URLWithString_1 = _registerName1("URLWithString:"); + late final _sel_URLWithString_relativeToURL_1 = + _registerName1("URLWithString:relativeToURL:"); + late final _sel_initWithDataRepresentation_relativeToURL_1 = + _registerName1("initWithDataRepresentation:relativeToURL:"); + instancetype _objc_msgSend_36( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_36( + obj, + sel, + data, + baseURL, + ); + } + + late final __objc_msgSend_36Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_URLWithDataRepresentation_relativeToURL_1 = + _registerName1("URLWithDataRepresentation:relativeToURL:"); + ffi.Pointer _objc_msgSend_37( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_37( + obj, + sel, + data, + baseURL, + ); + } + + late final __objc_msgSend_37Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1 = + _registerName1("initAbsoluteURLWithDataRepresentation:relativeToURL:"); + late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = + _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); + late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); + ffi.Pointer _objc_msgSend_38( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_38( + obj, + sel, + ); + } + + late final __objc_msgSend_38Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_38 = __objc_msgSend_38Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_absoluteString1 = _registerName1("absoluteString"); + late final _sel_relativeString1 = _registerName1("relativeString"); + late final _sel_baseURL1 = _registerName1("baseURL"); + ffi.Pointer _objc_msgSend_39( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_39( + obj, + sel, + ); + } + + late final __objc_msgSend_39Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_absoluteURL1 = _registerName1("absoluteURL"); + late final _sel_scheme1 = _registerName1("scheme"); + late final _sel_resourceSpecifier1 = _registerName1("resourceSpecifier"); + late final _sel_host1 = _registerName1("host"); + late final _class_NSNumber1 = _getClass1("NSNumber"); + late final _class_NSValue1 = _getClass1("NSValue"); + late final _sel_getValue_size_1 = _registerName1("getValue:size:"); + late final _sel_objCType1 = _registerName1("objCType"); + ffi.Pointer _objc_msgSend_40( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_40( + obj, + sel, + ); + } + + late final __objc_msgSend_40Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithBytes_objCType_1 = + _registerName1("initWithBytes:objCType:"); + instancetype _objc_msgSend_41( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer type, + ) { + return __objc_msgSend_41( + obj, + sel, + value, + type, + ); + } + + late final __objc_msgSend_41Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithChar_1 = _registerName1("initWithChar:"); + ffi.Pointer _objc_msgSend_42( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_42( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_42Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Char)>>('objc_msgSend'); + late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithUnsignedChar_1 = + _registerName1("initWithUnsignedChar:"); + ffi.Pointer _objc_msgSend_43( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_43( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_43Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); + late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithShort_1 = _registerName1("initWithShort:"); + ffi.Pointer _objc_msgSend_44( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_44( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_44Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Short)>>('objc_msgSend'); + late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithUnsignedShort_1 = + _registerName1("initWithUnsignedShort:"); + ffi.Pointer _objc_msgSend_45( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_45( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_45Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); + late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithInt_1 = _registerName1("initWithInt:"); + ffi.Pointer _objc_msgSend_46( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_46( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_46Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>('objc_msgSend'); + late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithUnsignedInt_1 = + _registerName1("initWithUnsignedInt:"); + ffi.Pointer _objc_msgSend_47( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_47( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_47Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); + late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithLong_1 = _registerName1("initWithLong:"); + ffi.Pointer _objc_msgSend_48( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_48( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_48Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithUnsignedLong_1 = + _registerName1("initWithUnsignedLong:"); + ffi.Pointer _objc_msgSend_49( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_49( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_49Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); + ffi.Pointer _objc_msgSend_50( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_50( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_50Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); + late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithUnsignedLongLong_1 = + _registerName1("initWithUnsignedLongLong:"); + ffi.Pointer _objc_msgSend_51( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_51( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_51Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); + late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); + ffi.Pointer _objc_msgSend_52( + ffi.Pointer obj, + ffi.Pointer sel, + double value, + ) { + return __objc_msgSend_52( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_52Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>('objc_msgSend'); + late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); + ffi.Pointer _objc_msgSend_53( + ffi.Pointer obj, + ffi.Pointer sel, + double value, + ) { + return __objc_msgSend_53( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_53Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_initWithBool_1 = _registerName1("initWithBool:"); + ffi.Pointer _objc_msgSend_54( + ffi.Pointer obj, + ffi.Pointer sel, + bool value, + ) { + return __objc_msgSend_54( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_54Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_initWithInteger_1 = _registerName1("initWithInteger:"); + late final _sel_initWithUnsignedInteger_1 = + _registerName1("initWithUnsignedInteger:"); + late final _sel_charValue1 = _registerName1("charValue"); + int _objc_msgSend_55( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_55( + obj, + sel, + ); + } + + late final __objc_msgSend_55Ptr = _lookup< + ffi.NativeFunction< + ffi.Char Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); + int _objc_msgSend_56( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_56( + obj, + sel, + ); + } + + late final __objc_msgSend_56Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedChar Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_shortValue1 = _registerName1("shortValue"); + int _objc_msgSend_57( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_57( + obj, + sel, + ); + } + + late final __objc_msgSend_57Ptr = _lookup< + ffi.NativeFunction< + ffi.Short Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); + int _objc_msgSend_58( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_58( + obj, + sel, + ); + } + + late final __objc_msgSend_58Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedShort Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_intValue1 = _registerName1("intValue"); + int _objc_msgSend_59( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_59( + obj, + sel, + ); + } + + late final __objc_msgSend_59Ptr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); + int _objc_msgSend_60( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_60( + obj, + sel, + ); + } + + late final __objc_msgSend_60Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_longValue1 = _registerName1("longValue"); + int _objc_msgSend_61( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_61( + obj, + sel, + ); + } + + late final __objc_msgSend_61Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); + late final _sel_longLongValue1 = _registerName1("longLongValue"); + int _objc_msgSend_62( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_62( + obj, + sel, + ); + } + + late final __objc_msgSend_62Ptr = _lookup< + ffi.NativeFunction< + ffi.LongLong Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_unsignedLongLongValue1 = + _registerName1("unsignedLongLongValue"); + int _objc_msgSend_63( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_63( + obj, + sel, + ); + } + + late final __objc_msgSend_63Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLongLong Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_floatValue1 = _registerName1("floatValue"); + double _objc_msgSend_64( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_64( + obj, + sel, + ); + } + + late final __objc_msgSend_64Ptr = _lookup< + ffi.NativeFunction< + ffi.Float Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_doubleValue1 = _registerName1("doubleValue"); + double _objc_msgSend_65( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_65( + obj, + sel, + ); + } + + late final __objc_msgSend_65Ptr = _lookup< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_boolValue1 = _registerName1("boolValue"); + late final _sel_integerValue1 = _registerName1("integerValue"); + late final _sel_unsignedIntegerValue1 = + _registerName1("unsignedIntegerValue"); + late final _sel_stringValue1 = _registerName1("stringValue"); + late final _sel_compare_1 = _registerName1("compare:"); + int _objc_msgSend_66( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherNumber, + ) { + return __objc_msgSend_66( + obj, + sel, + otherNumber, + ); + } + + late final __objc_msgSend_66Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); + bool _objc_msgSend_67( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer number, + ) { + return __objc_msgSend_67( + obj, + sel, + number, + ); + } + + late final __objc_msgSend_67Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_descriptionWithLocale_1 = + _registerName1("descriptionWithLocale:"); + ffi.Pointer _objc_msgSend_68( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer locale, + ) { + return __objc_msgSend_68( + obj, + sel, + locale, + ); + } + + late final __objc_msgSend_68Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_port1 = _registerName1("port"); + ffi.Pointer _objc_msgSend_69( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_69( + obj, + sel, + ); + } + + late final __objc_msgSend_69Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_user1 = _registerName1("user"); + late final _sel_password1 = _registerName1("password"); + late final _sel_path1 = _registerName1("path"); + late final _sel_fragment1 = _registerName1("fragment"); + late final _sel_parameterString1 = _registerName1("parameterString"); + late final _sel_query1 = _registerName1("query"); + late final _sel_relativePath1 = _registerName1("relativePath"); + late final _sel_hasDirectoryPath1 = _registerName1("hasDirectoryPath"); + late final _sel_getFileSystemRepresentation_maxLength_1 = + _registerName1("getFileSystemRepresentation:maxLength:"); + bool _objc_msgSend_70( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + int maxBufferLength, + ) { + return __objc_msgSend_70( + obj, + sel, + buffer, + maxBufferLength, + ); + } + + late final __objc_msgSend_70Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_fileSystemRepresentation1 = + _registerName1("fileSystemRepresentation"); + late final _sel_isFileURL1 = _registerName1("isFileURL"); + late final _sel_standardizedURL1 = _registerName1("standardizedURL"); + late final _class_NSError1 = _getClass1("NSError"); + late final _class_NSDictionary1 = _getClass1("NSDictionary"); + late final _sel_count1 = _registerName1("count"); + late final _sel_objectForKey_1 = _registerName1("objectForKey:"); + ffi.Pointer _objc_msgSend_71( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aKey, + ) { + return __objc_msgSend_71( + obj, + sel, + aKey, + ); + } + + late final __objc_msgSend_71Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_allKeys1 = _registerName1("allKeys"); + ffi.Pointer _objc_msgSend_72( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_72( + obj, + sel, + ); + } + + late final __objc_msgSend_72Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_allKeysForObject_1 = _registerName1("allKeysForObject:"); + ffi.Pointer _objc_msgSend_73( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ) { + return __objc_msgSend_73( + obj, + sel, + anObject, + ); + } + + late final __objc_msgSend_73Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_allValues1 = _registerName1("allValues"); + late final _sel_descriptionInStringsFileFormat1 = + _registerName1("descriptionInStringsFileFormat"); + late final _sel_descriptionWithLocale_indent_1 = + _registerName1("descriptionWithLocale:indent:"); + ffi.Pointer _objc_msgSend_74( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer locale, + int level, + ) { + return __objc_msgSend_74( + obj, + sel, + locale, + level, + ); + } + + late final __objc_msgSend_74Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_isEqualToDictionary_1 = + _registerName1("isEqualToDictionary:"); + bool _objc_msgSend_75( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDictionary, + ) { + return __objc_msgSend_75( + obj, + sel, + otherDictionary, + ); + } + + late final __objc_msgSend_75Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); + void _objc_msgSend_76( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ffi.Pointer> keys, + ) { + return __objc_msgSend_76( + obj, + sel, + objects, + keys, + ); + } + + late final __objc_msgSend_76Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _sel_dictionaryWithContentsOfFile_1 = + _registerName1("dictionaryWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_77( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_77( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_77Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dictionaryWithContentsOfURL_1 = + _registerName1("dictionaryWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_78( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_78( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_78Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithContentsOfFile_1 = + _registerName1("initWithContentsOfFile:"); + late final _sel_initWithContentsOfURL_1 = + _registerName1("initWithContentsOfURL:"); + late final _sel_writeToURL_atomically_1 = + _registerName1("writeToURL:atomically:"); + bool _objc_msgSend_79( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + bool atomically, + ) { + return __objc_msgSend_79( + obj, + sel, + url, + atomically, + ); + } + + late final __objc_msgSend_79Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_dictionary1 = _registerName1("dictionary"); + late final _sel_dictionaryWithObject_forKey_1 = + _registerName1("dictionaryWithObject:forKey:"); + instancetype _objc_msgSend_80( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + ffi.Pointer key, + ) { + return __objc_msgSend_80( + obj, + sel, + object, + key, + ); + } + + late final __objc_msgSend_80Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dictionaryWithObjects_forKeys_count_1 = + _registerName1("dictionaryWithObjects:forKeys:count:"); + instancetype _objc_msgSend_81( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt, + ) { + return __objc_msgSend_81( + obj, + sel, + objects, + keys, + cnt, + ); + } + + late final __objc_msgSend_81Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); + + late final _sel_dictionaryWithObjectsAndKeys_1 = + _registerName1("dictionaryWithObjectsAndKeys:"); + late final _sel_dictionaryWithDictionary_1 = + _registerName1("dictionaryWithDictionary:"); + instancetype _objc_msgSend_82( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dict, + ) { + return __objc_msgSend_82( + obj, + sel, + dict, + ); + } + + late final __objc_msgSend_82Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_dictionaryWithObjects_forKeys_1 = + _registerName1("dictionaryWithObjects:forKeys:"); + instancetype _objc_msgSend_83( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer objects, + ffi.Pointer keys, + ) { + return __objc_msgSend_83( + obj, + sel, + objects, + keys, + ); + } + + late final __objc_msgSend_83Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithObjectsAndKeys_1 = + _registerName1("initWithObjectsAndKeys:"); + late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); + late final _sel_initWithDictionary_copyItems_1 = + _registerName1("initWithDictionary:copyItems:"); + instancetype _objc_msgSend_84( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDictionary, + bool flag, + ) { + return __objc_msgSend_84( + obj, + sel, + otherDictionary, + flag, + ); + } + + late final __objc_msgSend_84Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_initWithObjects_forKeys_1 = + _registerName1("initWithObjects:forKeys:"); + late final _sel_initWithContentsOfURL_error_1 = + _registerName1("initWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_85( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer> error, + ) { + return __objc_msgSend_85( + obj, + sel, + url, + error, + ); + } + + late final __objc_msgSend_85Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_dictionaryWithContentsOfURL_error_1 = + _registerName1("dictionaryWithContentsOfURL:error:"); + late final _sel_sharedKeySetForKeys_1 = + _registerName1("sharedKeySetForKeys:"); + ffi.Pointer _objc_msgSend_86( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ) { + return __objc_msgSend_86( + obj, + sel, + keys, + ); + } + + late final __objc_msgSend_86Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_countByEnumeratingWithState_objects_count_1 = + _registerName1("countByEnumeratingWithState:objects:count:"); + int _objc_msgSend_87( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer state, + ffi.Pointer> buffer, + int len, + ) { + return __objc_msgSend_87( + obj, + sel, + state, + buffer, + len, + ); + } + + late final __objc_msgSend_87Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); + + late final _sel_initWithDomain_code_userInfo_1 = + _registerName1("initWithDomain:code:userInfo:"); + instancetype _objc_msgSend_88( + ffi.Pointer obj, + ffi.Pointer sel, + NSErrorDomain domain, + int code, + ffi.Pointer dict, + ) { + return __objc_msgSend_88( + obj, + sel, + domain, + code, + dict, + ); + } + + late final __objc_msgSend_88Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSErrorDomain, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, int, ffi.Pointer)>(); + + late final _sel_errorWithDomain_code_userInfo_1 = + _registerName1("errorWithDomain:code:userInfo:"); + late final _sel_domain1 = _registerName1("domain"); + late final _sel_code1 = _registerName1("code"); + late final _sel_userInfo1 = _registerName1("userInfo"); + ffi.Pointer _objc_msgSend_89( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_89( + obj, + sel, + ); + } + + late final __objc_msgSend_89Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_localizedDescription1 = + _registerName1("localizedDescription"); + late final _sel_localizedFailureReason1 = + _registerName1("localizedFailureReason"); + late final _sel_localizedRecoverySuggestion1 = + _registerName1("localizedRecoverySuggestion"); + late final _sel_localizedRecoveryOptions1 = + _registerName1("localizedRecoveryOptions"); + late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); + late final _sel_helpAnchor1 = _registerName1("helpAnchor"); + late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); + ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { + final d = + pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); + d.ref.size = ffi.sizeOf<_ObjCBlock>(); + return d; + } + + late final _objc_block_desc1 = _newBlockDesc1(); + late final _objc_concrete_global_block1 = + _lookup('_NSConcreteGlobalBlock'); + ffi.Pointer<_ObjCBlock> _newBlock1( + ffi.Pointer invoke, ffi.Pointer target) { + final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); + b.ref.isa = _objc_concrete_global_block1; + b.ref.invoke = invoke; + b.ref.target = target; + b.ref.descriptor = _objc_block_desc1; + return b; + } + + late final _sel_setUserInfoValueProviderForDomain_provider_1 = + _registerName1("setUserInfoValueProviderForDomain:provider:"); + void _objc_msgSend_90( + ffi.Pointer obj, + ffi.Pointer sel, + NSErrorDomain errorDomain, + ffi.Pointer<_ObjCBlock> provider, + ) { + return __objc_msgSend_90( + obj, + sel, + errorDomain, + provider, + ); + } + + late final __objc_msgSend_90Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_userInfoValueProviderForDomain_1 = + _registerName1("userInfoValueProviderForDomain:"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_91( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer err, + NSErrorUserInfoKey userInfoKey, + NSErrorDomain errorDomain, + ) { + return __objc_msgSend_91( + obj, + sel, + err, + userInfoKey, + errorDomain, + ); + } + + late final __objc_msgSend_91Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSErrorUserInfoKey, + NSErrorDomain)>>('objc_msgSend'); + late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSErrorUserInfoKey, + NSErrorDomain)>(); + + late final _sel_checkResourceIsReachableAndReturnError_1 = + _registerName1("checkResourceIsReachableAndReturnError:"); + bool _objc_msgSend_92( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> error, + ) { + return __objc_msgSend_92( + obj, + sel, + error, + ); + } + + late final __objc_msgSend_92Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); + late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); + late final _sel_filePathURL1 = _registerName1("filePathURL"); + late final _sel_getResourceValue_forKey_error_1 = + _registerName1("getResourceValue:forKey:error:"); + bool _objc_msgSend_93( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error, + ) { + return __objc_msgSend_93( + obj, + sel, + value, + key, + error, + ); + } + + late final __objc_msgSend_93Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSURLResourceKey, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSURLResourceKey, + ffi.Pointer>)>(); + + late final _sel_resourceValuesForKeys_error_1 = + _registerName1("resourceValuesForKeys:error:"); + ffi.Pointer _objc_msgSend_94( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer> error, + ) { + return __objc_msgSend_94( + obj, + sel, + keys, + error, + ); + } + + late final __objc_msgSend_94Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_setResourceValue_forKey_error_1 = + _registerName1("setResourceValue:forKey:error:"); + bool _objc_msgSend_95( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + NSURLResourceKey key, + ffi.Pointer> error, + ) { + return __objc_msgSend_95( + obj, + sel, + value, + key, + error, + ); + } + + late final __objc_msgSend_95Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLResourceKey, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLResourceKey, + ffi.Pointer>)>(); + + late final _sel_setResourceValues_error_1 = + _registerName1("setResourceValues:error:"); + bool _objc_msgSend_96( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyedValues, + ffi.Pointer> error, + ) { + return __objc_msgSend_96( + obj, + sel, + keyedValues, + error, + ); + } + + late final __objc_msgSend_96Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + late final _sel_removeCachedResourceValueForKey_1 = + _registerName1("removeCachedResourceValueForKey:"); + void _objc_msgSend_97( + ffi.Pointer obj, + ffi.Pointer sel, + NSURLResourceKey key, + ) { + return __objc_msgSend_97( + obj, + sel, + key, + ); + } + + late final __objc_msgSend_97Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSURLResourceKey)>>('objc_msgSend'); + late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, NSURLResourceKey)>(); + + late final _sel_removeAllCachedResourceValues1 = + _registerName1("removeAllCachedResourceValues"); + late final _sel_setTemporaryResourceValue_forKey_1 = + _registerName1("setTemporaryResourceValue:forKey:"); + void _objc_msgSend_98( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + NSURLResourceKey key, + ) { + return __objc_msgSend_98( + obj, + sel, + value, + key, + ); + } + + late final __objc_msgSend_98Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSURLResourceKey)>>('objc_msgSend'); + late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSURLResourceKey)>(); + + late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = + _registerName1( + "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); + ffi.Pointer _objc_msgSend_99( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ffi.Pointer keys, + ffi.Pointer relativeURL, + ffi.Pointer> error, + ) { + return __objc_msgSend_99( + obj, + sel, + options, + keys, + relativeURL, + error, + ); + } + + late final __objc_msgSend_99Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = + _registerName1( + "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); + instancetype _objc_msgSend_100( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bookmarkData, + int options, + ffi.Pointer relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error, + ) { + return __objc_msgSend_100( + obj, + sel, + bookmarkData, + options, + relativeURL, + isStale, + error, + ); + } + + late final __objc_msgSend_100Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = + _registerName1( + "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); + late final _sel_resourceValuesForKeys_fromBookmarkData_1 = + _registerName1("resourceValuesForKeys:fromBookmarkData:"); + ffi.Pointer _objc_msgSend_101( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer bookmarkData, + ) { + return __objc_msgSend_101( + obj, + sel, + keys, + bookmarkData, + ); + } + + late final __objc_msgSend_101Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_writeBookmarkData_toURL_options_error_1 = + _registerName1("writeBookmarkData:toURL:options:error:"); + bool _objc_msgSend_102( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bookmarkData, + ffi.Pointer bookmarkFileURL, + int options, + ffi.Pointer> error, + ) { + return __objc_msgSend_102( + obj, + sel, + bookmarkData, + bookmarkFileURL, + options, + error, + ); + } + + late final __objc_msgSend_102Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLBookmarkFileCreationOptions, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_bookmarkDataWithContentsOfURL_error_1 = + _registerName1("bookmarkDataWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_103( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bookmarkFileURL, + ffi.Pointer> error, + ) { + return __objc_msgSend_103( + obj, + sel, + bookmarkFileURL, + error, + ); + } + + late final __objc_msgSend_103Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = + _registerName1("URLByResolvingAliasFileAtURL:options:error:"); + instancetype _objc_msgSend_104( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int options, + ffi.Pointer> error, + ) { + return __objc_msgSend_104( + obj, + sel, + url, + options, + error, + ); + } + + late final __objc_msgSend_104Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_startAccessingSecurityScopedResource1 = + _registerName1("startAccessingSecurityScopedResource"); + late final _sel_stopAccessingSecurityScopedResource1 = + _registerName1("stopAccessingSecurityScopedResource"); + late final _sel_getPromisedItemResourceValue_forKey_error_1 = + _registerName1("getPromisedItemResourceValue:forKey:error:"); + late final _sel_promisedItemResourceValuesForKeys_error_1 = + _registerName1("promisedItemResourceValuesForKeys:error:"); + late final _sel_checkPromisedItemIsReachableAndReturnError_1 = + _registerName1("checkPromisedItemIsReachableAndReturnError:"); + late final _sel_fileURLWithPathComponents_1 = + _registerName1("fileURLWithPathComponents:"); + ffi.Pointer _objc_msgSend_105( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer components, + ) { + return __objc_msgSend_105( + obj, + sel, + components, + ); + } + + late final __objc_msgSend_105Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_pathComponents1 = _registerName1("pathComponents"); + late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); + late final _sel_pathExtension1 = _registerName1("pathExtension"); + late final _sel_URLByAppendingPathComponent_1 = + _registerName1("URLByAppendingPathComponent:"); + late final _sel_URLByAppendingPathComponent_isDirectory_1 = + _registerName1("URLByAppendingPathComponent:isDirectory:"); + late final _sel_URLByDeletingLastPathComponent1 = + _registerName1("URLByDeletingLastPathComponent"); + late final _sel_URLByAppendingPathExtension_1 = + _registerName1("URLByAppendingPathExtension:"); + late final _sel_URLByDeletingPathExtension1 = + _registerName1("URLByDeletingPathExtension"); + late final _sel_URLByStandardizingPath1 = + _registerName1("URLByStandardizingPath"); + late final _sel_URLByResolvingSymlinksInPath1 = + _registerName1("URLByResolvingSymlinksInPath"); + late final _sel_resourceDataUsingCache_1 = + _registerName1("resourceDataUsingCache:"); + ffi.Pointer _objc_msgSend_106( + ffi.Pointer obj, + ffi.Pointer sel, + bool shouldUseCache, + ) { + return __objc_msgSend_106( + obj, + sel, + shouldUseCache, + ); + } + + late final __objc_msgSend_106Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_loadResourceDataNotifyingClient_usingCache_1 = + _registerName1("loadResourceDataNotifyingClient:usingCache:"); + void _objc_msgSend_107( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer client, + bool shouldUseCache, + ) { + return __objc_msgSend_107( + obj, + sel, + client, + shouldUseCache, + ); + } + + late final __objc_msgSend_107Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); + late final _sel_setResourceData_1 = _registerName1("setResourceData:"); + late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); + bool _objc_msgSend_108( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer property, + ffi.Pointer propertyKey, + ) { + return __objc_msgSend_108( + obj, + sel, + property, + propertyKey, + ); + } + + late final __objc_msgSend_108Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); + late final _sel_registerURLHandleClass_1 = + _registerName1("registerURLHandleClass:"); + void _objc_msgSend_109( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURLHandleSubclass, + ) { + return __objc_msgSend_109( + obj, + sel, + anURLHandleSubclass, + ); + } + + late final __objc_msgSend_109Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_URLHandleClassForURL_1 = + _registerName1("URLHandleClassForURL:"); + ffi.Pointer _objc_msgSend_110( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, + ) { + return __objc_msgSend_110( + obj, + sel, + anURL, + ); + } + + late final __objc_msgSend_110Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_status1 = _registerName1("status"); + int _objc_msgSend_111( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_111( + obj, + sel, + ); + } + + late final __objc_msgSend_111Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_failureReason1 = _registerName1("failureReason"); + late final _sel_addClient_1 = _registerName1("addClient:"); + late final _sel_removeClient_1 = _registerName1("removeClient:"); + late final _sel_loadInBackground1 = _registerName1("loadInBackground"); + late final _sel_cancelLoadInBackground1 = + _registerName1("cancelLoadInBackground"); + late final _sel_resourceData1 = _registerName1("resourceData"); + late final _sel_availableResourceData1 = + _registerName1("availableResourceData"); + late final _sel_expectedResourceDataSize1 = + _registerName1("expectedResourceDataSize"); + late final _sel_flushCachedData1 = _registerName1("flushCachedData"); + late final _sel_backgroundLoadDidFailWithReason_1 = + _registerName1("backgroundLoadDidFailWithReason:"); + late final _sel_didLoadBytes_loadComplete_1 = + _registerName1("didLoadBytes:loadComplete:"); + void _objc_msgSend_112( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer newBytes, + bool yorn, + ) { + return __objc_msgSend_112( + obj, + sel, + newBytes, + yorn, + ); + } + + late final __objc_msgSend_112Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); + bool _objc_msgSend_113( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, + ) { + return __objc_msgSend_113( + obj, + sel, + anURL, + ); + } + + late final __objc_msgSend_113Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); + ffi.Pointer _objc_msgSend_114( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, + ) { + return __objc_msgSend_114( + obj, + sel, + anURL, + ); + } + + late final __objc_msgSend_114Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); + ffi.Pointer _objc_msgSend_115( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, + bool willCache, + ) { + return __objc_msgSend_115( + obj, + sel, + anURL, + willCache, + ); + } + + late final __objc_msgSend_115Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_propertyForKeyIfAvailable_1 = + _registerName1("propertyForKeyIfAvailable:"); + late final _sel_writeProperty_forKey_1 = + _registerName1("writeProperty:forKey:"); + late final _sel_writeData_1 = _registerName1("writeData:"); + late final _sel_loadInForeground1 = _registerName1("loadInForeground"); + late final _sel_beginLoadInBackground1 = + _registerName1("beginLoadInBackground"); + late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); + late final _sel_URLHandleUsingCache_1 = + _registerName1("URLHandleUsingCache:"); + ffi.Pointer _objc_msgSend_116( + ffi.Pointer obj, + ffi.Pointer sel, + bool shouldUseCache, + ) { + return __objc_msgSend_116( + obj, + sel, + shouldUseCache, + ); + } + + late final __objc_msgSend_116Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_writeToFile_options_error_1 = + _registerName1("writeToFile:options:error:"); + bool _objc_msgSend_117( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + int writeOptionsMask, + ffi.Pointer> errorPtr, + ) { + return __objc_msgSend_117( + obj, + sel, + path, + writeOptionsMask, + errorPtr, + ); + } + + late final __objc_msgSend_117Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_writeToURL_options_error_1 = + _registerName1("writeToURL:options:error:"); + bool _objc_msgSend_118( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int writeOptionsMask, + ffi.Pointer> errorPtr, + ) { + return __objc_msgSend_118( + obj, + sel, + url, + writeOptionsMask, + errorPtr, + ); + } + + late final __objc_msgSend_118Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_rangeOfData_options_range_1 = + _registerName1("rangeOfData:options:range:"); + NSRange _objc_msgSend_119( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dataToFind, + int mask, + NSRange searchRange, + ) { + return __objc_msgSend_119( + obj, + sel, + dataToFind, + mask, + searchRange, + ); + } + + late final __objc_msgSend_119Ptr = _lookup< + ffi.NativeFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); + + late final _sel_enumerateByteRangesUsingBlock_1 = + _registerName1("enumerateByteRangesUsingBlock:"); + void _objc_msgSend_120( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_120( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_120Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_data1 = _registerName1("data"); + late final _sel_dataWithBytes_length_1 = + _registerName1("dataWithBytes:length:"); + instancetype _objc_msgSend_121( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, + ) { + return __objc_msgSend_121( + obj, + sel, + bytes, + length, + ); + } + + late final __objc_msgSend_121Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_dataWithBytesNoCopy_length_1 = + _registerName1("dataWithBytesNoCopy:length:"); + late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = + _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); + instancetype _objc_msgSend_122( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, + bool b, + ) { + return __objc_msgSend_122( + obj, + sel, + bytes, + length, + b, + ); + } + + late final __objc_msgSend_122Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, bool)>(); + + late final _sel_dataWithContentsOfFile_options_error_1 = + _registerName1("dataWithContentsOfFile:options:error:"); + instancetype _objc_msgSend_123( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + int readOptionsMask, + ffi.Pointer> errorPtr, + ) { + return __objc_msgSend_123( + obj, + sel, + path, + readOptionsMask, + errorPtr, + ); + } + + late final __objc_msgSend_123Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_dataWithContentsOfURL_options_error_1 = + _registerName1("dataWithContentsOfURL:options:error:"); + instancetype _objc_msgSend_124( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int readOptionsMask, + ffi.Pointer> errorPtr, + ) { + return __objc_msgSend_124( + obj, + sel, + url, + readOptionsMask, + errorPtr, + ); + } + + late final __objc_msgSend_124Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + + late final _sel_dataWithContentsOfFile_1 = + _registerName1("dataWithContentsOfFile:"); + late final _sel_dataWithContentsOfURL_1 = + _registerName1("dataWithContentsOfURL:"); + late final _sel_initWithBytes_length_1 = + _registerName1("initWithBytes:length:"); + late final _sel_initWithBytesNoCopy_length_1 = + _registerName1("initWithBytesNoCopy:length:"); + late final _sel_initWithBytesNoCopy_length_freeWhenDone_1 = + _registerName1("initWithBytesNoCopy:length:freeWhenDone:"); + late final _sel_initWithBytesNoCopy_length_deallocator_1 = + _registerName1("initWithBytesNoCopy:length:deallocator:"); + instancetype _objc_msgSend_125( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, + ffi.Pointer<_ObjCBlock> deallocator, + ) { + return __objc_msgSend_125( + obj, + sel, + bytes, + length, + deallocator, + ); + } + + late final __objc_msgSend_125Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_initWithContentsOfFile_options_error_1 = + _registerName1("initWithContentsOfFile:options:error:"); + late final _sel_initWithContentsOfURL_options_error_1 = + _registerName1("initWithContentsOfURL:options:error:"); + late final _sel_initWithData_1 = _registerName1("initWithData:"); + instancetype _objc_msgSend_126( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_126( + obj, + sel, + data, + ); + } + + late final __objc_msgSend_126Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_dataWithData_1 = _registerName1("dataWithData:"); + late final _sel_initWithBase64EncodedString_options_1 = + _registerName1("initWithBase64EncodedString:options:"); + instancetype _objc_msgSend_127( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer base64String, + int options, + ) { + return __objc_msgSend_127( + obj, + sel, + base64String, + options, + ); + } + + late final __objc_msgSend_127Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_base64EncodedStringWithOptions_1 = + _registerName1("base64EncodedStringWithOptions:"); + ffi.Pointer _objc_msgSend_128( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ) { + return __objc_msgSend_128( + obj, + sel, + options, + ); + } + + late final __objc_msgSend_128Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithBase64EncodedData_options_1 = + _registerName1("initWithBase64EncodedData:options:"); + instancetype _objc_msgSend_129( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer base64Data, + int options, + ) { + return __objc_msgSend_129( + obj, + sel, + base64Data, + options, + ); + } + + late final __objc_msgSend_129Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_base64EncodedDataWithOptions_1 = + _registerName1("base64EncodedDataWithOptions:"); + ffi.Pointer _objc_msgSend_130( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ) { + return __objc_msgSend_130( + obj, + sel, + options, + ); + } + + late final __objc_msgSend_130Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_decompressedDataUsingAlgorithm_error_1 = + _registerName1("decompressedDataUsingAlgorithm:error:"); + instancetype _objc_msgSend_131( + ffi.Pointer obj, + ffi.Pointer sel, + int algorithm, + ffi.Pointer> error, + ) { + return __objc_msgSend_131( + obj, + sel, + algorithm, + error, + ); + } + + late final __objc_msgSend_131Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer>)>(); + + late final _sel_compressedDataUsingAlgorithm_error_1 = + _registerName1("compressedDataUsingAlgorithm:error:"); + late final _sel_getBytes_1 = _registerName1("getBytes:"); + void _objc_msgSend_132( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + ) { + return __objc_msgSend_132( + obj, + sel, + buffer, + ); + } + + late final __objc_msgSend_132Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_dataWithContentsOfMappedFile_1 = + _registerName1("dataWithContentsOfMappedFile:"); + late final _sel_initWithContentsOfMappedFile_1 = + _registerName1("initWithContentsOfMappedFile:"); + late final _sel_initWithBase64Encoding_1 = + _registerName1("initWithBase64Encoding:"); + late final _sel_base64Encoding1 = _registerName1("base64Encoding"); + late final _sel_characterSetWithBitmapRepresentation_1 = + _registerName1("characterSetWithBitmapRepresentation:"); + ffi.Pointer _objc_msgSend_133( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_133( + obj, + sel, + data, + ); + } + + late final __objc_msgSend_133Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_characterSetWithContentsOfFile_1 = + _registerName1("characterSetWithContentsOfFile:"); + late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); + bool _objc_msgSend_134( + ffi.Pointer obj, + ffi.Pointer sel, + int aCharacter, + ) { + return __objc_msgSend_134( + obj, + sel, + aCharacter, + ); + } + + late final __objc_msgSend_134Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + unichar)>>('objc_msgSend'); + late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_bitmapRepresentation1 = + _registerName1("bitmapRepresentation"); + late final _sel_invertedSet1 = _registerName1("invertedSet"); + late final _sel_longCharacterIsMember_1 = + _registerName1("longCharacterIsMember:"); + bool _objc_msgSend_135( + ffi.Pointer obj, + ffi.Pointer sel, + int theLongChar, + ) { + return __objc_msgSend_135( + obj, + sel, + theLongChar, + ); + } + + late final __objc_msgSend_135Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + UTF32Char)>>('objc_msgSend'); + late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); + bool _objc_msgSend_136( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer theOtherSet, + ) { + return __objc_msgSend_136( + obj, + sel, + theOtherSet, + ); + } + + late final __objc_msgSend_136Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); + bool _objc_msgSend_137( + ffi.Pointer obj, + ffi.Pointer sel, + int thePlane, + ) { + return __objc_msgSend_137( + obj, + sel, + thePlane, + ); + } + + late final __objc_msgSend_137Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Uint8)>>('objc_msgSend'); + late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_URLUserAllowedCharacterSet1 = + _registerName1("URLUserAllowedCharacterSet"); + late final _sel_URLPasswordAllowedCharacterSet1 = + _registerName1("URLPasswordAllowedCharacterSet"); + late final _sel_URLHostAllowedCharacterSet1 = + _registerName1("URLHostAllowedCharacterSet"); + late final _sel_URLPathAllowedCharacterSet1 = + _registerName1("URLPathAllowedCharacterSet"); + late final _sel_URLQueryAllowedCharacterSet1 = + _registerName1("URLQueryAllowedCharacterSet"); + late final _sel_URLFragmentAllowedCharacterSet1 = + _registerName1("URLFragmentAllowedCharacterSet"); + late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = + _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); + ffi.Pointer _objc_msgSend_138( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer allowedCharacters, + ) { + return __objc_msgSend_138( + obj, + sel, + allowedCharacters, + ); + } + + late final __objc_msgSend_138Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_stringByRemovingPercentEncoding1 = + _registerName1("stringByRemovingPercentEncoding"); + late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = + _registerName1("stringByAddingPercentEscapesUsingEncoding:"); + ffi.Pointer _objc_msgSend_139( + ffi.Pointer obj, + ffi.Pointer sel, + int enc, + ) { + return __objc_msgSend_139( + obj, + sel, + enc, + ); + } + + late final __objc_msgSend_139Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = + _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); + late final _sel_stringWithCString_encoding_1 = + _registerName1("stringWithCString:encoding:"); + ffi.Pointer _objc_msgSend_140( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cString, + int enc, + ) { + return __objc_msgSend_140( + obj, + sel, + cString, + enc, + ); + } + + late final __objc_msgSend_140Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt)>>('objc_msgSend'); + late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_UTF8String1 = _registerName1("UTF8String"); + late final _sel_debugDescription1 = _registerName1("debugDescription"); + late final _sel_URL_resourceDataDidBecomeAvailable_1 = + _registerName1("URL:resourceDataDidBecomeAvailable:"); + void _objc_msgSend_141( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer sender, + ffi.Pointer newBytes, + ) { + return __objc_msgSend_141( + obj, + sel, + sender, + newBytes, + ); + } + + late final __objc_msgSend_141Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_URLResourceDidFinishLoading_1 = + _registerName1("URLResourceDidFinishLoading:"); + void _objc_msgSend_142( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer sender, + ) { + return __objc_msgSend_142( + obj, + sel, + sender, + ); + } + + late final __objc_msgSend_142Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_URLResourceDidCancelLoading_1 = + _registerName1("URLResourceDidCancelLoading:"); + late final _sel_URL_resourceDidFailLoadingWithReason_1 = + _registerName1("URL:resourceDidFailLoadingWithReason:"); + void _objc_msgSend_143( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer sender, + ffi.Pointer reason, + ) { + return __objc_msgSend_143( + obj, + sel, + sender, + reason, + ); + } + + late final __objc_msgSend_143Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = + _registerName1( + "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); + void _objc_msgSend_144( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer error, + int recoveryOptionIndex, + ffi.Pointer delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo, + ) { + return __objc_msgSend_144( + obj, + sel, + error, + recoveryOptionIndex, + delegate, + didRecoverSelector, + contextInfo, + ); + } + + late final __objc_msgSend_144Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_attemptRecoveryFromError_optionIndex_1 = + _registerName1("attemptRecoveryFromError:optionIndex:"); + bool _objc_msgSend_145( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer error, + int recoveryOptionIndex, + ) { + return __objc_msgSend_145( + obj, + sel, + error, + recoveryOptionIndex, + ); + } + + late final __objc_msgSend_145Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); + ffi.Pointer _objc_msgSend_146( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_146( + obj, + sel, + index, + ); + } + + late final __objc_msgSend_146Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_initWithObjects_count_1 = + _registerName1("initWithObjects:count:"); + instancetype _objc_msgSend_147( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + int cnt, + ) { + return __objc_msgSend_147( + obj, + sel, + objects, + cnt, + ); + } + + late final __objc_msgSend_147Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, int)>(); + + late final _sel_arrayByAddingObject_1 = + _registerName1("arrayByAddingObject:"); + late final _sel_arrayByAddingObjectsFromArray_1 = + _registerName1("arrayByAddingObjectsFromArray:"); + ffi.Pointer _objc_msgSend_148( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, + ) { + return __objc_msgSend_148( + obj, + sel, + otherArray, + ); + } + + late final __objc_msgSend_148Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_componentsJoinedByString_1 = + _registerName1("componentsJoinedByString:"); + ffi.Pointer _objc_msgSend_149( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer separator, + ) { + return __objc_msgSend_149( + obj, + sel, + separator, + ); + } + + late final __objc_msgSend_149Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_containsObject_1 = _registerName1("containsObject:"); + late final _sel_firstObjectCommonWithArray_1 = + _registerName1("firstObjectCommonWithArray:"); + late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); + void _objc_msgSend_150( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + NSRange range, + ) { + return __objc_msgSend_150( + obj, + sel, + objects, + range, + ); + } + + late final __objc_msgSend_150Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, NSRange)>(); + + late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); + int _objc_msgSend_151( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ) { + return __objc_msgSend_151( + obj, + sel, + anObject, + ); + } + + late final __objc_msgSend_151Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_indexOfObject_inRange_1 = + _registerName1("indexOfObject:inRange:"); + int _objc_msgSend_152( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + NSRange range, + ) { + return __objc_msgSend_152( + obj, + sel, + anObject, + range, + ); + } + + late final __objc_msgSend_152Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); + + late final _sel_indexOfObjectIdenticalTo_1 = + _registerName1("indexOfObjectIdenticalTo:"); + late final _sel_indexOfObjectIdenticalTo_inRange_1 = + _registerName1("indexOfObjectIdenticalTo:inRange:"); + late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); + bool _objc_msgSend_153( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, + ) { + return __objc_msgSend_153( + obj, + sel, + otherArray, + ); + } + + late final __objc_msgSend_153Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_firstObject1 = _registerName1("firstObject"); + late final _sel_lastObject1 = _registerName1("lastObject"); + late final _sel_array1 = _registerName1("array"); + late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); + late final _sel_arrayWithObjects_count_1 = + _registerName1("arrayWithObjects:count:"); + late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); + late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); + late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); + late final _sel_initWithArray_1 = _registerName1("initWithArray:"); + late final _sel_initWithArray_copyItems_1 = + _registerName1("initWithArray:copyItems:"); + instancetype _objc_msgSend_154( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer array, + bool flag, + ) { + return __objc_msgSend_154( + obj, + sel, + array, + flag, + ); + } + + late final __objc_msgSend_154Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + ffi.Pointer _objc_msgSend_155( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer> error, + ) { + return __objc_msgSend_155( + obj, + sel, + url, + error, + ); + } + + late final __objc_msgSend_155Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_arrayWithContentsOfURL_error_1 = + _registerName1("arrayWithContentsOfURL:error:"); + late final _sel_getObjects_1 = _registerName1("getObjects:"); + void _objc_msgSend_156( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ) { + return __objc_msgSend_156( + obj, + sel, + objects, + ); + } + + late final __objc_msgSend_156Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); + + late final _sel_arrayWithContentsOfFile_1 = + _registerName1("arrayWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_157( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_157( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_157Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_arrayWithContentsOfURL_1 = + _registerName1("arrayWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_158( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_158( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_158Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSMutableArray1 = _getClass1("NSMutableArray"); + late final _sel_addObject_1 = _registerName1("addObject:"); + late final _sel_insertObject_atIndex_1 = + _registerName1("insertObject:atIndex:"); + void _objc_msgSend_159( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + int index, + ) { + return __objc_msgSend_159( + obj, + sel, + anObject, + index, + ); + } + + late final __objc_msgSend_159Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_removeLastObject1 = _registerName1("removeLastObject"); + late final _sel_removeObjectAtIndex_1 = + _registerName1("removeObjectAtIndex:"); + void _objc_msgSend_160( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ) { + return __objc_msgSend_160( + obj, + sel, + index, + ); + } + + late final __objc_msgSend_160Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_replaceObjectAtIndex_withObject_1 = + _registerName1("replaceObjectAtIndex:withObject:"); + void _objc_msgSend_161( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ffi.Pointer anObject, + ) { + return __objc_msgSend_161( + obj, + sel, + index, + anObject, + ); + } + + late final __objc_msgSend_161Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); + late final _sel_addObjectsFromArray_1 = + _registerName1("addObjectsFromArray:"); + void _objc_msgSend_162( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, + ) { + return __objc_msgSend_162( + obj, + sel, + otherArray, + ); + } + + late final __objc_msgSend_162Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = + _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); + void _objc_msgSend_163( + ffi.Pointer obj, + ffi.Pointer sel, + int idx1, + int idx2, + ) { + return __objc_msgSend_163( + obj, + sel, + idx1, + idx2, + ); + } + + late final __objc_msgSend_163Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + + late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); + late final _sel_removeObject_inRange_1 = + _registerName1("removeObject:inRange:"); + void _objc_msgSend_164( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + NSRange range, + ) { + return __objc_msgSend_164( + obj, + sel, + anObject, + range, + ); + } + + late final __objc_msgSend_164Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); + + late final _sel_removeObject_1 = _registerName1("removeObject:"); + late final _sel_removeObjectIdenticalTo_inRange_1 = + _registerName1("removeObjectIdenticalTo:inRange:"); + late final _sel_removeObjectIdenticalTo_1 = + _registerName1("removeObjectIdenticalTo:"); + late final _sel_removeObjectsFromIndices_numIndices_1 = + _registerName1("removeObjectsFromIndices:numIndices:"); + void _objc_msgSend_165( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indices, + int cnt, + ) { + return __objc_msgSend_165( + obj, + sel, + indices, + cnt, + ); + } + + late final __objc_msgSend_165Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_removeObjectsInArray_1 = + _registerName1("removeObjectsInArray:"); + late final _sel_removeObjectsInRange_1 = + _registerName1("removeObjectsInRange:"); + void _objc_msgSend_166( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ) { + return __objc_msgSend_166( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_166Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + + late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = + _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); + void _objc_msgSend_167( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer otherArray, + NSRange otherRange, + ) { + return __objc_msgSend_167( + obj, + sel, + range, + otherArray, + otherRange, + ); + } + + late final __objc_msgSend_167Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer, NSRange)>(); + + late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = + _registerName1("replaceObjectsInRange:withObjectsFromArray:"); + void _objc_msgSend_168( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer otherArray, + ) { + return __objc_msgSend_168( + obj, + sel, + range, + otherArray, + ); + } + + late final __objc_msgSend_168Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); + + late final _sel_setArray_1 = _registerName1("setArray:"); + late final _sel_sortUsingFunction_context_1 = + _registerName1("sortUsingFunction:context:"); + void _objc_msgSend_169( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context, + ) { + return __objc_msgSend_169( + obj, + sel, + compare, + context, + ); + } + + late final __objc_msgSend_169Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); + + late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); + late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); + late final _sel_indexSet1 = _registerName1("indexSet"); + late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); + late final _sel_indexSetWithIndexesInRange_1 = + _registerName1("indexSetWithIndexesInRange:"); + instancetype _objc_msgSend_170( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ) { + return __objc_msgSend_170( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_170Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); + + late final _sel_initWithIndexesInRange_1 = + _registerName1("initWithIndexesInRange:"); + late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); + instancetype _objc_msgSend_171( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexSet, + ) { + return __objc_msgSend_171( + obj, + sel, + indexSet, + ); + } + + late final __objc_msgSend_171Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); + late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); + bool _objc_msgSend_172( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexSet, + ) { + return __objc_msgSend_172( + obj, + sel, + indexSet, + ); + } + + late final __objc_msgSend_172Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_firstIndex1 = _registerName1("firstIndex"); + late final _sel_lastIndex1 = _registerName1("lastIndex"); + late final _sel_indexGreaterThanIndex_1 = + _registerName1("indexGreaterThanIndex:"); + int _objc_msgSend_173( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_173( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_173Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); + late final _sel_indexGreaterThanOrEqualToIndex_1 = + _registerName1("indexGreaterThanOrEqualToIndex:"); + late final _sel_indexLessThanOrEqualToIndex_1 = + _registerName1("indexLessThanOrEqualToIndex:"); + late final _sel_getIndexes_maxCount_inIndexRange_1 = + _registerName1("getIndexes:maxCount:inIndexRange:"); + int _objc_msgSend_174( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexBuffer, + int bufferSize, + NSRangePointer range, + ) { + return __objc_msgSend_174( + obj, + sel, + indexBuffer, + bufferSize, + range, + ); + } + + late final __objc_msgSend_174Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRangePointer)>(); + + late final _sel_countOfIndexesInRange_1 = + _registerName1("countOfIndexesInRange:"); + int _objc_msgSend_175( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ) { + return __objc_msgSend_175( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_175Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + + late final _sel_containsIndex_1 = _registerName1("containsIndex:"); + bool _objc_msgSend_176( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_176( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_176Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_containsIndexesInRange_1 = + _registerName1("containsIndexesInRange:"); + bool _objc_msgSend_177( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ) { + return __objc_msgSend_177( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_177Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + + late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); + late final _sel_intersectsIndexesInRange_1 = + _registerName1("intersectsIndexesInRange:"); + late final _sel_enumerateIndexesUsingBlock_1 = + _registerName1("enumerateIndexesUsingBlock:"); + void _objc_msgSend_178( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_178( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_178Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateIndexesWithOptions_usingBlock_1 = + _registerName1("enumerateIndexesWithOptions:usingBlock:"); + void _objc_msgSend_179( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_179( + obj, + sel, + opts, + block, + ); + } + + late final __objc_msgSend_179Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateIndexesInRange_options_usingBlock_1 = + _registerName1("enumerateIndexesInRange:options:usingBlock:"); + void _objc_msgSend_180( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_180( + obj, + sel, + range, + opts, + block, + ); + } + + late final __objc_msgSend_180Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); + int _objc_msgSend_181( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_181( + obj, + sel, + predicate, + ); + } + + late final __objc_msgSend_181Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexWithOptions_passingTest_1 = + _registerName1("indexWithOptions:passingTest:"); + int _objc_msgSend_182( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_182( + obj, + sel, + opts, + predicate, + ); + } + + late final __objc_msgSend_182Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexInRange_options_passingTest_1 = + _registerName1("indexInRange:options:passingTest:"); + int _objc_msgSend_183( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_183( + obj, + sel, + range, + opts, + predicate, + ); + } + + late final __objc_msgSend_183Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); + ffi.Pointer _objc_msgSend_184( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_184( + obj, + sel, + predicate, + ); + } + + late final __objc_msgSend_184Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexesWithOptions_passingTest_1 = + _registerName1("indexesWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_185( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_185( + obj, + sel, + opts, + predicate, + ); + } + + late final __objc_msgSend_185Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexesInRange_options_passingTest_1 = + _registerName1("indexesInRange:options:passingTest:"); + ffi.Pointer _objc_msgSend_186( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_186( + obj, + sel, + range, + opts, + predicate, + ); + } + + late final __objc_msgSend_186Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateRangesUsingBlock_1 = + _registerName1("enumerateRangesUsingBlock:"); + void _objc_msgSend_187( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_187( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_187Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateRangesWithOptions_usingBlock_1 = + _registerName1("enumerateRangesWithOptions:usingBlock:"); + void _objc_msgSend_188( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_188( + obj, + sel, + opts, + block, + ); + } + + late final __objc_msgSend_188Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateRangesInRange_options_usingBlock_1 = + _registerName1("enumerateRangesInRange:options:usingBlock:"); + void _objc_msgSend_189( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_189( + obj, + sel, + range, + opts, + block, + ); + } + + late final __objc_msgSend_189Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_insertObjects_atIndexes_1 = + _registerName1("insertObjects:atIndexes:"); + void _objc_msgSend_190( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer objects, + ffi.Pointer indexes, + ) { + return __objc_msgSend_190( + obj, + sel, + objects, + indexes, + ); + } + + late final __objc_msgSend_190Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_removeObjectsAtIndexes_1 = + _registerName1("removeObjectsAtIndexes:"); + void _objc_msgSend_191( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + ) { + return __objc_msgSend_191( + obj, + sel, + indexes, + ); + } + + late final __objc_msgSend_191Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_replaceObjectsAtIndexes_withObjects_1 = + _registerName1("replaceObjectsAtIndexes:withObjects:"); + void _objc_msgSend_192( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + ffi.Pointer objects, + ) { + return __objc_msgSend_192( + obj, + sel, + indexes, + objects, + ); + } + + late final __objc_msgSend_192Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setObject_atIndexedSubscript_1 = + _registerName1("setObject:atIndexedSubscript:"); + late final _sel_sortUsingComparator_1 = + _registerName1("sortUsingComparator:"); + void _objc_msgSend_193( + ffi.Pointer obj, + ffi.Pointer sel, + NSComparator cmptr, + ) { + return __objc_msgSend_193( + obj, + sel, + cmptr, + ); + } + + late final __objc_msgSend_193Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, NSComparator)>(); + + late final _sel_sortWithOptions_usingComparator_1 = + _registerName1("sortWithOptions:usingComparator:"); + void _objc_msgSend_194( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + NSComparator cmptr, + ) { + return __objc_msgSend_194( + obj, + sel, + opts, + cmptr, + ); + } + + late final __objc_msgSend_194Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, int, NSComparator)>(); + + late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); + ffi.Pointer _objc_msgSend_195( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_195( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_195Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_196( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_196( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_196Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_applyDifference_1 = _registerName1("applyDifference:"); + late final _class_NSMutableData1 = _getClass1("NSMutableData"); + late final _sel_mutableBytes1 = _registerName1("mutableBytes"); + late final _sel_setLength_1 = _registerName1("setLength:"); + void _objc_msgSend_197( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_197( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_197Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); + late final _sel_appendData_1 = _registerName1("appendData:"); + void _objc_msgSend_198( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + ) { + return __objc_msgSend_198( + obj, + sel, + other, + ); + } + + late final __objc_msgSend_198Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); + late final _sel_replaceBytesInRange_withBytes_1 = + _registerName1("replaceBytesInRange:withBytes:"); + void _objc_msgSend_199( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer bytes, + ) { + return __objc_msgSend_199( + obj, + sel, + range, + bytes, + ); + } + + late final __objc_msgSend_199Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); + + late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); + late final _sel_setData_1 = _registerName1("setData:"); + late final _sel_replaceBytesInRange_withBytes_length_1 = + _registerName1("replaceBytesInRange:withBytes:length:"); + void _objc_msgSend_200( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer replacementBytes, + int replacementLength, + ) { + return __objc_msgSend_200( + obj, + sel, + range, + replacementBytes, + replacementLength, + ); + } + + late final __objc_msgSend_200Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer, int)>(); + + late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); + late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); + late final _sel_initWithLength_1 = _registerName1("initWithLength:"); + late final _sel_decompressUsingAlgorithm_error_1 = + _registerName1("decompressUsingAlgorithm:error:"); + bool _objc_msgSend_201( + ffi.Pointer obj, + ffi.Pointer sel, + int algorithm, + ffi.Pointer> error, + ) { + return __objc_msgSend_201( + obj, + sel, + algorithm, + error, + ); + } + + late final __objc_msgSend_201Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer>)>(); + + late final _sel_compressUsingAlgorithm_error_1 = + _registerName1("compressUsingAlgorithm:error:"); + late final _class_NSPurgeableData1 = _getClass1("NSPurgeableData"); + late final _class_NSMutableDictionary1 = _getClass1("NSMutableDictionary"); + late final _sel_removeObjectForKey_1 = _registerName1("removeObjectForKey:"); + late final _sel_setObject_forKey_1 = _registerName1("setObject:forKey:"); + void _objc_msgSend_202( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ffi.Pointer aKey, + ) { + return __objc_msgSend_202( + obj, + sel, + anObject, + aKey, + ); + } + + late final __objc_msgSend_202Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addEntriesFromDictionary_1 = + _registerName1("addEntriesFromDictionary:"); + void _objc_msgSend_203( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDictionary, + ) { + return __objc_msgSend_203( + obj, + sel, + otherDictionary, + ); + } + + late final __objc_msgSend_203Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeObjectsForKeys_1 = + _registerName1("removeObjectsForKeys:"); + late final _sel_setDictionary_1 = _registerName1("setDictionary:"); + late final _sel_setObject_forKeyedSubscript_1 = + _registerName1("setObject:forKeyedSubscript:"); + late final _sel_dictionaryWithCapacity_1 = + _registerName1("dictionaryWithCapacity:"); + ffi.Pointer _objc_msgSend_204( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_204( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_204Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_205( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_205( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_205Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dictionaryWithSharedKeySet_1 = + _registerName1("dictionaryWithSharedKeySet:"); + ffi.Pointer _objc_msgSend_206( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyset, + ) { + return __objc_msgSend_206( + obj, + sel, + keyset, + ); + } + + late final __objc_msgSend_206Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); + late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); + late final _sel_supportsSecureCoding1 = + _registerName1("supportsSecureCoding"); + late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); + instancetype _objc_msgSend_207( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URL, + int cachePolicy, + double timeoutInterval, + ) { + return __objc_msgSend_207( + obj, + sel, + URL, + cachePolicy, + timeoutInterval, + ); + } + + late final __objc_msgSend_207Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, double)>(); + + late final _sel_initWithURL_1 = _registerName1("initWithURL:"); + late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("initWithURL:cachePolicy:timeoutInterval:"); + late final _sel_URL1 = _registerName1("URL"); + late final _sel_cachePolicy1 = _registerName1("cachePolicy"); + int _objc_msgSend_208( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_208( + obj, + sel, + ); + } + + late final __objc_msgSend_208Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); + late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); + late final _sel_networkServiceType1 = _registerName1("networkServiceType"); + int _objc_msgSend_209( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_209( + obj, + sel, + ); + } + + late final __objc_msgSend_209Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_allowsCellularAccess1 = + _registerName1("allowsCellularAccess"); + late final _sel_allowsExpensiveNetworkAccess1 = + _registerName1("allowsExpensiveNetworkAccess"); + late final _sel_allowsConstrainedNetworkAccess1 = + _registerName1("allowsConstrainedNetworkAccess"); + late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); + late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); + late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); + late final _sel_valueForHTTPHeaderField_1 = + _registerName1("valueForHTTPHeaderField:"); + late final _sel_HTTPBody1 = _registerName1("HTTPBody"); + late final _class_NSInputStream1 = _getClass1("NSInputStream"); + late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); + ffi.Pointer _objc_msgSend_210( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_210( + obj, + sel, + ); + } + + late final __objc_msgSend_210Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_HTTPShouldHandleCookies1 = + _registerName1("HTTPShouldHandleCookies"); + late final _sel_HTTPShouldUsePipelining1 = + _registerName1("HTTPShouldUsePipelining"); + late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); + late final _sel_setURL_1 = _registerName1("setURL:"); + void _objc_msgSend_211( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_211( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_211Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); + void _objc_msgSend_212( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_212( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_212Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); + void _objc_msgSend_213( + ffi.Pointer obj, + ffi.Pointer sel, + double value, + ) { + return __objc_msgSend_213( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_213Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); + late final _sel_setNetworkServiceType_1 = + _registerName1("setNetworkServiceType:"); + void _objc_msgSend_214( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_214( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_214Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_setAllowsCellularAccess_1 = + _registerName1("setAllowsCellularAccess:"); + void _objc_msgSend_215( + ffi.Pointer obj, + ffi.Pointer sel, + bool value, + ) { + return __objc_msgSend_215( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_215Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_setAllowsExpensiveNetworkAccess_1 = + _registerName1("setAllowsExpensiveNetworkAccess:"); + late final _sel_setAllowsConstrainedNetworkAccess_1 = + _registerName1("setAllowsConstrainedNetworkAccess:"); + late final _sel_setAssumesHTTP3Capable_1 = + _registerName1("setAssumesHTTP3Capable:"); + late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); + void _objc_msgSend_216( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_216( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_216Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setAllHTTPHeaderFields_1 = + _registerName1("setAllHTTPHeaderFields:"); + void _objc_msgSend_217( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_217( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_217Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setValue_forHTTPHeaderField_1 = + _registerName1("setValue:forHTTPHeaderField:"); + void _objc_msgSend_218( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer field, + ) { + return __objc_msgSend_218( + obj, + sel, + value, + field, + ); + } + + late final __objc_msgSend_218Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addValue_forHTTPHeaderField_1 = + _registerName1("addValue:forHTTPHeaderField:"); + late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); + void _objc_msgSend_219( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_219( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_219Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); + void _objc_msgSend_220( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_220( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_220Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setHTTPShouldHandleCookies_1 = + _registerName1("setHTTPShouldHandleCookies:"); + late final _sel_setHTTPShouldUsePipelining_1 = + _registerName1("setHTTPShouldUsePipelining:"); + + /// -1LL + late final ffi.Pointer _NSURLSessionTransferSizeUnknown = + _lookup('NSURLSessionTransferSizeUnknown'); + + int get NSURLSessionTransferSizeUnknown => + _NSURLSessionTransferSizeUnknown.value; + + set NSURLSessionTransferSizeUnknown(int value) => + _NSURLSessionTransferSizeUnknown.value = value; + + late final _class_NSURLSession1 = _getClass1("NSURLSession"); + late final _sel_sharedSession1 = _registerName1("sharedSession"); + ffi.Pointer _objc_msgSend_221( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_221( + obj, + sel, + ); + } + + late final __objc_msgSend_221Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionConfiguration1 = + _getClass1("NSURLSessionConfiguration"); + late final _sel_defaultSessionConfiguration1 = + _registerName1("defaultSessionConfiguration"); + ffi.Pointer _objc_msgSend_222( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_222( + obj, + sel, + ); + } + + late final __objc_msgSend_222Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_ephemeralSessionConfiguration1 = + _registerName1("ephemeralSessionConfiguration"); + late final _sel_backgroundSessionConfigurationWithIdentifier_1 = + _registerName1("backgroundSessionConfigurationWithIdentifier:"); + ffi.Pointer _objc_msgSend_223( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer identifier, + ) { + return __objc_msgSend_223( + obj, + sel, + identifier, + ); + } + + late final __objc_msgSend_223Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_identifier1 = _registerName1("identifier"); + late final _sel_requestCachePolicy1 = _registerName1("requestCachePolicy"); + late final _sel_setRequestCachePolicy_1 = + _registerName1("setRequestCachePolicy:"); + late final _sel_timeoutIntervalForRequest1 = + _registerName1("timeoutIntervalForRequest"); + late final _sel_setTimeoutIntervalForRequest_1 = + _registerName1("setTimeoutIntervalForRequest:"); + late final _sel_timeoutIntervalForResource1 = + _registerName1("timeoutIntervalForResource"); + late final _sel_setTimeoutIntervalForResource_1 = + _registerName1("setTimeoutIntervalForResource:"); + late final _sel_waitsForConnectivity1 = + _registerName1("waitsForConnectivity"); + late final _sel_setWaitsForConnectivity_1 = + _registerName1("setWaitsForConnectivity:"); + late final _sel_isDiscretionary1 = _registerName1("isDiscretionary"); + late final _sel_setDiscretionary_1 = _registerName1("setDiscretionary:"); + late final _sel_sharedContainerIdentifier1 = + _registerName1("sharedContainerIdentifier"); + late final _sel_setSharedContainerIdentifier_1 = + _registerName1("setSharedContainerIdentifier:"); + late final _sel_sessionSendsLaunchEvents1 = + _registerName1("sessionSendsLaunchEvents"); + late final _sel_setSessionSendsLaunchEvents_1 = + _registerName1("setSessionSendsLaunchEvents:"); + late final _sel_connectionProxyDictionary1 = + _registerName1("connectionProxyDictionary"); + late final _sel_setConnectionProxyDictionary_1 = + _registerName1("setConnectionProxyDictionary:"); + late final _sel_TLSMinimumSupportedProtocol1 = + _registerName1("TLSMinimumSupportedProtocol"); + int _objc_msgSend_224( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_224( + obj, + sel, + ); + } + + late final __objc_msgSend_224Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setTLSMinimumSupportedProtocol_1 = + _registerName1("setTLSMinimumSupportedProtocol:"); + void _objc_msgSend_225( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_225( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_225Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_TLSMaximumSupportedProtocol1 = + _registerName1("TLSMaximumSupportedProtocol"); + late final _sel_setTLSMaximumSupportedProtocol_1 = + _registerName1("setTLSMaximumSupportedProtocol:"); + late final _sel_TLSMinimumSupportedProtocolVersion1 = + _registerName1("TLSMinimumSupportedProtocolVersion"); + int _objc_msgSend_226( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_226( + obj, + sel, + ); + } + + late final __objc_msgSend_226Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setTLSMinimumSupportedProtocolVersion_1 = + _registerName1("setTLSMinimumSupportedProtocolVersion:"); + void _objc_msgSend_227( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_227( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_227Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_TLSMaximumSupportedProtocolVersion1 = + _registerName1("TLSMaximumSupportedProtocolVersion"); + late final _sel_setTLSMaximumSupportedProtocolVersion_1 = + _registerName1("setTLSMaximumSupportedProtocolVersion:"); + late final _sel_HTTPShouldSetCookies1 = + _registerName1("HTTPShouldSetCookies"); + late final _sel_setHTTPShouldSetCookies_1 = + _registerName1("setHTTPShouldSetCookies:"); + late final _sel_HTTPCookieAcceptPolicy1 = + _registerName1("HTTPCookieAcceptPolicy"); + int _objc_msgSend_228( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_228( + obj, + sel, + ); + } + + late final __objc_msgSend_228Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setHTTPCookieAcceptPolicy_1 = + _registerName1("setHTTPCookieAcceptPolicy:"); + void _objc_msgSend_229( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_229( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_229Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_HTTPAdditionalHeaders1 = + _registerName1("HTTPAdditionalHeaders"); + late final _sel_setHTTPAdditionalHeaders_1 = + _registerName1("setHTTPAdditionalHeaders:"); + late final _sel_HTTPMaximumConnectionsPerHost1 = + _registerName1("HTTPMaximumConnectionsPerHost"); + late final _sel_setHTTPMaximumConnectionsPerHost_1 = + _registerName1("setHTTPMaximumConnectionsPerHost:"); + void _objc_msgSend_230( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_230( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_230Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); + late final _sel_sharedHTTPCookieStorage1 = + _registerName1("sharedHTTPCookieStorage"); + ffi.Pointer _objc_msgSend_231( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_231( + obj, + sel, + ); + } + + late final __objc_msgSend_231Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = + _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); + ffi.Pointer _objc_msgSend_232( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer identifier, + ) { + return __objc_msgSend_232( + obj, + sel, + identifier, + ); + } + + late final __objc_msgSend_232Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_cookies1 = _registerName1("cookies"); + late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); + late final _sel_setCookie_1 = _registerName1("setCookie:"); + void _objc_msgSend_233( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookie, + ) { + return __objc_msgSend_233( + obj, + sel, + cookie, + ); + } + + late final __objc_msgSend_233Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); + late final _class_NSDate1 = _getClass1("NSDate"); + late final _sel_timeIntervalSinceReferenceDate1 = + _registerName1("timeIntervalSinceReferenceDate"); + late final _sel_initWithTimeIntervalSinceReferenceDate_1 = + _registerName1("initWithTimeIntervalSinceReferenceDate:"); + instancetype _objc_msgSend_234( + ffi.Pointer obj, + ffi.Pointer sel, + double ti, + ) { + return __objc_msgSend_234( + obj, + sel, + ti, + ); + } + + late final __objc_msgSend_234Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_removeCookiesSinceDate_1 = + _registerName1("removeCookiesSinceDate:"); + void _objc_msgSend_235( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, + ) { + return __objc_msgSend_235( + obj, + sel, + date, + ); + } + + late final __objc_msgSend_235Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); + late final _sel_setCookies_forURL_mainDocumentURL_1 = + _registerName1("setCookies:forURL:mainDocumentURL:"); + void _objc_msgSend_236( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer URL, + ffi.Pointer mainDocumentURL, + ) { + return __objc_msgSend_236( + obj, + sel, + cookies, + URL, + mainDocumentURL, + ); + } + + late final __objc_msgSend_236Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); + late final _sel_setCookieAcceptPolicy_1 = + _registerName1("setCookieAcceptPolicy:"); + late final _sel_sortedCookiesUsingDescriptors_1 = + _registerName1("sortedCookiesUsingDescriptors:"); + late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); + late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); + late final _sel_originalRequest1 = _registerName1("originalRequest"); + ffi.Pointer _objc_msgSend_237( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_237( + obj, + sel, + ); + } + + late final __objc_msgSend_237Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_currentRequest1 = _registerName1("currentRequest"); + late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); + late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = + _registerName1( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); + instancetype _objc_msgSend_238( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URL, + ffi.Pointer MIMEType, + int length, + ffi.Pointer name, + ) { + return __objc_msgSend_238( + obj, + sel, + URL, + MIMEType, + length, + name, + ); + } + + late final __objc_msgSend_238Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + + late final _sel_MIMEType1 = _registerName1("MIMEType"); + late final _sel_expectedContentLength1 = + _registerName1("expectedContentLength"); + late final _sel_textEncodingName1 = _registerName1("textEncodingName"); + late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); + late final _sel_response1 = _registerName1("response"); + ffi.Pointer _objc_msgSend_239( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_239( + obj, + sel, + ); + } + + late final __objc_msgSend_239Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSProgress1 = _getClass1("NSProgress"); + late final _sel_currentProgress1 = _registerName1("currentProgress"); + ffi.Pointer _objc_msgSend_240( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_240( + obj, + sel, + ); + } + + late final __objc_msgSend_240Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_progressWithTotalUnitCount_1 = + _registerName1("progressWithTotalUnitCount:"); + ffi.Pointer _objc_msgSend_241( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ) { + return __objc_msgSend_241( + obj, + sel, + unitCount, + ); + } + + late final __objc_msgSend_241Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_discreteProgressWithTotalUnitCount_1 = + _registerName1("discreteProgressWithTotalUnitCount:"); + late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = + _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); + ffi.Pointer _objc_msgSend_242( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ffi.Pointer parent, + int portionOfParentTotalUnitCount, + ) { + return __objc_msgSend_242( + obj, + sel, + unitCount, + parent, + portionOfParentTotalUnitCount, + ); + } + + late final __objc_msgSend_242Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); + + late final _sel_initWithParent_userInfo_1 = + _registerName1("initWithParent:userInfo:"); + instancetype _objc_msgSend_243( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer parentProgressOrNil, + ffi.Pointer userInfoOrNil, + ) { + return __objc_msgSend_243( + obj, + sel, + parentProgressOrNil, + userInfoOrNil, + ); + } + + late final __objc_msgSend_243Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_becomeCurrentWithPendingUnitCount_1 = + _registerName1("becomeCurrentWithPendingUnitCount:"); + void _objc_msgSend_244( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ) { + return __objc_msgSend_244( + obj, + sel, + unitCount, + ); + } + + late final __objc_msgSend_244Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = + _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); + void _objc_msgSend_245( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ffi.Pointer<_ObjCBlock> work, + ) { + return __objc_msgSend_245( + obj, + sel, + unitCount, + work, + ); + } + + late final __objc_msgSend_245Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_resignCurrent1 = _registerName1("resignCurrent"); + late final _sel_addChild_withPendingUnitCount_1 = + _registerName1("addChild:withPendingUnitCount:"); + void _objc_msgSend_246( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer child, + int inUnitCount, + ) { + return __objc_msgSend_246( + obj, + sel, + child, + inUnitCount, + ); + } + + late final __objc_msgSend_246Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); + int _objc_msgSend_247( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_247( + obj, + sel, + ); + } + + late final __objc_msgSend_247Ptr = _lookup< + ffi.NativeFunction< + ffi.Int64 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); + void _objc_msgSend_248( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_248( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_248Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); + late final _sel_setCompletedUnitCount_1 = + _registerName1("setCompletedUnitCount:"); + late final _sel_setLocalizedDescription_1 = + _registerName1("setLocalizedDescription:"); + late final _sel_localizedAdditionalDescription1 = + _registerName1("localizedAdditionalDescription"); + late final _sel_setLocalizedAdditionalDescription_1 = + _registerName1("setLocalizedAdditionalDescription:"); + late final _sel_isCancellable1 = _registerName1("isCancellable"); + late final _sel_setCancellable_1 = _registerName1("setCancellable:"); + late final _sel_isPausable1 = _registerName1("isPausable"); + late final _sel_setPausable_1 = _registerName1("setPausable:"); + late final _sel_isCancelled1 = _registerName1("isCancelled"); + late final _sel_isPaused1 = _registerName1("isPaused"); + late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_249( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_249( + obj, + sel, + ); + } + + late final __objc_msgSend_249Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setCancellationHandler_1 = + _registerName1("setCancellationHandler:"); + void _objc_msgSend_250( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> value, + ) { + return __objc_msgSend_250( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_250Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_pausingHandler1 = _registerName1("pausingHandler"); + late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); + late final _sel_resumingHandler1 = _registerName1("resumingHandler"); + late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); + late final _sel_setUserInfoObject_forKey_1 = + _registerName1("setUserInfoObject:forKey:"); + late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); + late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); + late final _sel_isFinished1 = _registerName1("isFinished"); + late final _sel_cancel1 = _registerName1("cancel"); + late final _sel_pause1 = _registerName1("pause"); + late final _sel_resume1 = _registerName1("resume"); + late final _sel_kind1 = _registerName1("kind"); + late final _sel_setKind_1 = _registerName1("setKind:"); + late final _sel_estimatedTimeRemaining1 = + _registerName1("estimatedTimeRemaining"); + late final _sel_setEstimatedTimeRemaining_1 = + _registerName1("setEstimatedTimeRemaining:"); + void _objc_msgSend_251( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_251( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_251Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_throughput1 = _registerName1("throughput"); + late final _sel_setThroughput_1 = _registerName1("setThroughput:"); + late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); + late final _sel_setFileOperationKind_1 = + _registerName1("setFileOperationKind:"); + late final _sel_fileURL1 = _registerName1("fileURL"); + late final _sel_setFileURL_1 = _registerName1("setFileURL:"); + late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); + late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); + late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); + late final _sel_setFileCompletedCount_1 = + _registerName1("setFileCompletedCount:"); + late final _sel_publish1 = _registerName1("publish"); + late final _sel_unpublish1 = _registerName1("unpublish"); + late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = + _registerName1("addSubscriberForFileURL:withPublishingHandler:"); + ffi.Pointer _objc_msgSend_252( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + NSProgressPublishingHandler publishingHandler, + ) { + return __objc_msgSend_252( + obj, + sel, + url, + publishingHandler, + ); + } + + late final __objc_msgSend_252Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>>('objc_msgSend'); + late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>(); + + late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); + late final _sel_isOld1 = _registerName1("isOld"); + late final _sel_progress1 = _registerName1("progress"); + late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); + ffi.Pointer _objc_msgSend_253( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_253( + obj, + sel, + ); + } + + late final __objc_msgSend_253Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setEarliestBeginDate_1 = + _registerName1("setEarliestBeginDate:"); + void _objc_msgSend_254( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_254( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_254Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_countOfBytesClientExpectsToSend1 = + _registerName1("countOfBytesClientExpectsToSend"); + late final _sel_setCountOfBytesClientExpectsToSend_1 = + _registerName1("setCountOfBytesClientExpectsToSend:"); + late final _sel_countOfBytesClientExpectsToReceive1 = + _registerName1("countOfBytesClientExpectsToReceive"); + late final _sel_setCountOfBytesClientExpectsToReceive_1 = + _registerName1("setCountOfBytesClientExpectsToReceive:"); + late final _sel_countOfBytesReceived1 = + _registerName1("countOfBytesReceived"); + late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); + late final _sel_countOfBytesExpectedToSend1 = + _registerName1("countOfBytesExpectedToSend"); + late final _sel_countOfBytesExpectedToReceive1 = + _registerName1("countOfBytesExpectedToReceive"); + late final _sel_taskDescription1 = _registerName1("taskDescription"); + late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); + late final _sel_state1 = _registerName1("state"); + int _objc_msgSend_255( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_255( + obj, + sel, + ); + } + + late final __objc_msgSend_255Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_error1 = _registerName1("error"); + ffi.Pointer _objc_msgSend_256( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_256( + obj, + sel, + ); + } + + late final __objc_msgSend_256Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_suspend1 = _registerName1("suspend"); + late final _sel_priority1 = _registerName1("priority"); + late final _sel_setPriority_1 = _registerName1("setPriority:"); + void _objc_msgSend_257( + ffi.Pointer obj, + ffi.Pointer sel, + double value, + ) { + return __objc_msgSend_257( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_257Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Float)>>('objc_msgSend'); + late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_prefersIncrementalDelivery1 = + _registerName1("prefersIncrementalDelivery"); + late final _sel_setPrefersIncrementalDelivery_1 = + _registerName1("setPrefersIncrementalDelivery:"); + late final _sel_storeCookies_forTask_1 = + _registerName1("storeCookies:forTask:"); + void _objc_msgSend_258( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer task, + ) { + return __objc_msgSend_258( + obj, + sel, + cookies, + task, + ); + } + + late final __objc_msgSend_258Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_getCookiesForTask_completionHandler_1 = + _registerName1("getCookiesForTask:completionHandler:"); + void _objc_msgSend_259( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_259( + obj, + sel, + task, + completionHandler, + ); + } + + late final __objc_msgSend_259Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); + late final _sel_setHTTPCookieStorage_1 = + _registerName1("setHTTPCookieStorage:"); + void _objc_msgSend_260( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_260( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_260Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSURLCredentialStorage1 = + _getClass1("NSURLCredentialStorage"); + late final _sel_URLCredentialStorage1 = + _registerName1("URLCredentialStorage"); + ffi.Pointer _objc_msgSend_261( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_261( + obj, + sel, + ); + } + + late final __objc_msgSend_261Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setURLCredentialStorage_1 = + _registerName1("setURLCredentialStorage:"); + void _objc_msgSend_262( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_262( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_262Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSURLCache1 = _getClass1("NSURLCache"); + late final _sel_URLCache1 = _registerName1("URLCache"); + ffi.Pointer _objc_msgSend_263( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_263( + obj, + sel, + ); + } + + late final __objc_msgSend_263Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setURLCache_1 = _registerName1("setURLCache:"); + void _objc_msgSend_264( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_264( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_264Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_shouldUseExtendedBackgroundIdleMode1 = + _registerName1("shouldUseExtendedBackgroundIdleMode"); + late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = + _registerName1("setShouldUseExtendedBackgroundIdleMode:"); + late final _sel_protocolClasses1 = _registerName1("protocolClasses"); + late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); + void _objc_msgSend_265( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_265( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_265Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_multipathServiceType1 = + _registerName1("multipathServiceType"); + int _objc_msgSend_266( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_266( + obj, + sel, + ); + } + + late final __objc_msgSend_266Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setMultipathServiceType_1 = + _registerName1("setMultipathServiceType:"); + void _objc_msgSend_267( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_267( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_267Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_backgroundSessionConfiguration_1 = + _registerName1("backgroundSessionConfiguration:"); + late final _sel_sessionWithConfiguration_1 = + _registerName1("sessionWithConfiguration:"); + ffi.Pointer _objc_msgSend_268( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer configuration, + ) { + return __objc_msgSend_268( + obj, + sel, + configuration, + ); + } + + late final __objc_msgSend_268Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); + late final _class_NSOperation1 = _getClass1("NSOperation"); + late final _sel_start1 = _registerName1("start"); + late final _sel_main1 = _registerName1("main"); + late final _sel_isExecuting1 = _registerName1("isExecuting"); + late final _sel_isConcurrent1 = _registerName1("isConcurrent"); + late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); + late final _sel_isReady1 = _registerName1("isReady"); + late final _sel_addDependency_1 = _registerName1("addDependency:"); + void _objc_msgSend_269( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer op, + ) { + return __objc_msgSend_269( + obj, + sel, + op, + ); + } + + late final __objc_msgSend_269Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeDependency_1 = _registerName1("removeDependency:"); + late final _sel_dependencies1 = _registerName1("dependencies"); + late final _sel_queuePriority1 = _registerName1("queuePriority"); + int _objc_msgSend_270( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_270( + obj, + sel, + ); + } + + late final __objc_msgSend_270Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); + void _objc_msgSend_271( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_271( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_271Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_completionBlock1 = _registerName1("completionBlock"); + late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); + late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); + late final _sel_threadPriority1 = _registerName1("threadPriority"); + late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); + late final _sel_qualityOfService1 = _registerName1("qualityOfService"); + int _objc_msgSend_272( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_272( + obj, + sel, + ); + } + + late final __objc_msgSend_272Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setQualityOfService_1 = + _registerName1("setQualityOfService:"); + void _objc_msgSend_273( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_273( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_273Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_name1 = _registerName1("name"); + late final _sel_setName_1 = _registerName1("setName:"); + late final _sel_addOperation_1 = _registerName1("addOperation:"); + late final _sel_addOperations_waitUntilFinished_1 = + _registerName1("addOperations:waitUntilFinished:"); + void _objc_msgSend_274( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer ops, + bool wait, + ) { + return __objc_msgSend_274( + obj, + sel, + ops, + wait, + ); + } + + late final __objc_msgSend_274Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_addOperationWithBlock_1 = + _registerName1("addOperationWithBlock:"); + void _objc_msgSend_275( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_275( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_275Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); + late final _sel_maxConcurrentOperationCount1 = + _registerName1("maxConcurrentOperationCount"); + late final _sel_setMaxConcurrentOperationCount_1 = + _registerName1("setMaxConcurrentOperationCount:"); + late final _sel_isSuspended1 = _registerName1("isSuspended"); + late final _sel_setSuspended_1 = _registerName1("setSuspended:"); + late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); + dispatch_queue_t _objc_msgSend_276( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_276( + obj, + sel, + ); + } + + late final __objc_msgSend_276Ptr = _lookup< + ffi.NativeFunction< + dispatch_queue_t Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< + dispatch_queue_t Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); + void _objc_msgSend_277( + ffi.Pointer obj, + ffi.Pointer sel, + dispatch_queue_t value, + ) { + return __objc_msgSend_277( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_277Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + dispatch_queue_t)>>('objc_msgSend'); + late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); + + late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); + late final _sel_waitUntilAllOperationsAreFinished1 = + _registerName1("waitUntilAllOperationsAreFinished"); + late final _sel_currentQueue1 = _registerName1("currentQueue"); + ffi.Pointer _objc_msgSend_278( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_278( + obj, + sel, + ); + } + + late final __objc_msgSend_278Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_mainQueue1 = _registerName1("mainQueue"); + late final _sel_operations1 = _registerName1("operations"); + late final _sel_operationCount1 = _registerName1("operationCount"); + late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = + _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); + ffi.Pointer _objc_msgSend_279( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer configuration, + ffi.Pointer delegate, + ffi.Pointer queue, + ) { + return __objc_msgSend_279( + obj, + sel, + configuration, + delegate, + queue, + ); + } + + late final __objc_msgSend_279Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_delegateQueue1 = _registerName1("delegateQueue"); + late final _sel_delegate1 = _registerName1("delegate"); + late final _sel_configuration1 = _registerName1("configuration"); + late final _sel_sessionDescription1 = _registerName1("sessionDescription"); + late final _sel_setSessionDescription_1 = + _registerName1("setSessionDescription:"); + late final _sel_finishTasksAndInvalidate1 = + _registerName1("finishTasksAndInvalidate"); + late final _sel_invalidateAndCancel1 = _registerName1("invalidateAndCancel"); + late final _sel_resetWithCompletionHandler_1 = + _registerName1("resetWithCompletionHandler:"); + late final _sel_flushWithCompletionHandler_1 = + _registerName1("flushWithCompletionHandler:"); + late final _sel_getTasksWithCompletionHandler_1 = + _registerName1("getTasksWithCompletionHandler:"); + void _objc_msgSend_280( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_280( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_280Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_getAllTasksWithCompletionHandler_1 = + _registerName1("getAllTasksWithCompletionHandler:"); + void _objc_msgSend_281( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_281( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_281Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); + late final _sel_dataTaskWithRequest_1 = + _registerName1("dataTaskWithRequest:"); + ffi.Pointer _objc_msgSend_282( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_282( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_282Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); + ffi.Pointer _objc_msgSend_283( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_283( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_283Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionUploadTask1 = + _getClass1("NSURLSessionUploadTask"); + late final _sel_uploadTaskWithRequest_fromFile_1 = + _registerName1("uploadTaskWithRequest:fromFile:"); + ffi.Pointer _objc_msgSend_284( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer fileURL, + ) { + return __objc_msgSend_284( + obj, + sel, + request, + fileURL, + ); + } + + late final __objc_msgSend_284Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_uploadTaskWithRequest_fromData_1 = + _registerName1("uploadTaskWithRequest:fromData:"); + ffi.Pointer _objc_msgSend_285( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer bodyData, + ) { + return __objc_msgSend_285( + obj, + sel, + request, + bodyData, + ); + } + + late final __objc_msgSend_285Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_uploadTaskWithStreamedRequest_1 = + _registerName1("uploadTaskWithStreamedRequest:"); + ffi.Pointer _objc_msgSend_286( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_286( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_286Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionDownloadTask1 = + _getClass1("NSURLSessionDownloadTask"); + late final _sel_cancelByProducingResumeData_1 = + _registerName1("cancelByProducingResumeData:"); + void _objc_msgSend_287( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_287( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_287Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_downloadTaskWithRequest_1 = + _registerName1("downloadTaskWithRequest:"); + ffi.Pointer _objc_msgSend_288( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_288( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_288Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_downloadTaskWithURL_1 = + _registerName1("downloadTaskWithURL:"); + ffi.Pointer _objc_msgSend_289( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_289( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_289Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_downloadTaskWithResumeData_1 = + _registerName1("downloadTaskWithResumeData:"); + ffi.Pointer _objc_msgSend_290( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer resumeData, + ) { + return __objc_msgSend_290( + obj, + sel, + resumeData, + ); + } + + late final __objc_msgSend_290Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionStreamTask1 = + _getClass1("NSURLSessionStreamTask"); + late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = + _registerName1( + "readDataOfMinLength:maxLength:timeout:completionHandler:"); + void _objc_msgSend_291( + ffi.Pointer obj, + ffi.Pointer sel, + int minBytes, + int maxBytes, + double timeout, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_291( + obj, + sel, + minBytes, + maxBytes, + timeout, + completionHandler, + ); + } + + late final __objc_msgSend_291Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSUInteger, + NSTimeInterval, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int, + double, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_writeData_timeout_completionHandler_1 = + _registerName1("writeData:timeout:completionHandler:"); + void _objc_msgSend_292( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + double timeout, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_292( + obj, + sel, + data, + timeout, + completionHandler, + ); + } + + late final __objc_msgSend_292Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSTimeInterval, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_captureStreams1 = _registerName1("captureStreams"); + late final _sel_closeWrite1 = _registerName1("closeWrite"); + late final _sel_closeRead1 = _registerName1("closeRead"); + late final _sel_startSecureConnection1 = + _registerName1("startSecureConnection"); + late final _sel_stopSecureConnection1 = + _registerName1("stopSecureConnection"); + late final _sel_streamTaskWithHostName_port_1 = + _registerName1("streamTaskWithHostName:port:"); + ffi.Pointer _objc_msgSend_293( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer hostname, + int port, + ) { + return __objc_msgSend_293( + obj, + sel, + hostname, + port, + ); + } + + late final __objc_msgSend_293Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _class_NSNetService1 = _getClass1("NSNetService"); + late final _sel_streamTaskWithNetService_1 = + _registerName1("streamTaskWithNetService:"); + ffi.Pointer _objc_msgSend_294( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer service, + ) { + return __objc_msgSend_294( + obj, + sel, + service, + ); + } + + late final __objc_msgSend_294Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionWebSocketTask1 = + _getClass1("NSURLSessionWebSocketTask"); + late final _class_NSURLSessionWebSocketMessage1 = + _getClass1("NSURLSessionWebSocketMessage"); + late final _sel_type1 = _registerName1("type"); + int _objc_msgSend_295( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_295( + obj, + sel, + ); + } + + late final __objc_msgSend_295Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_string1 = _registerName1("string"); + late final _sel_sendMessage_completionHandler_1 = + _registerName1("sendMessage:completionHandler:"); + void _objc_msgSend_296( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer message, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_296( + obj, + sel, + message, + completionHandler, + ); + } + + late final __objc_msgSend_296Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_receiveMessageWithCompletionHandler_1 = + _registerName1("receiveMessageWithCompletionHandler:"); + void _objc_msgSend_297( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_297( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_297Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_sendPingWithPongReceiveHandler_1 = + _registerName1("sendPingWithPongReceiveHandler:"); + void _objc_msgSend_298( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> pongReceiveHandler, + ) { + return __objc_msgSend_298( + obj, + sel, + pongReceiveHandler, + ); + } + + late final __objc_msgSend_298Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_cancelWithCloseCode_reason_1 = + _registerName1("cancelWithCloseCode:reason:"); + void _objc_msgSend_299( + ffi.Pointer obj, + ffi.Pointer sel, + int closeCode, + ffi.Pointer reason, + ) { + return __objc_msgSend_299( + obj, + sel, + closeCode, + reason, + ); + } + + late final __objc_msgSend_299Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_maximumMessageSize1 = _registerName1("maximumMessageSize"); + late final _sel_setMaximumMessageSize_1 = + _registerName1("setMaximumMessageSize:"); + late final _sel_closeCode1 = _registerName1("closeCode"); + int _objc_msgSend_300( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_300( + obj, + sel, + ); + } + + late final __objc_msgSend_300Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_closeReason1 = _registerName1("closeReason"); + late final _sel_webSocketTaskWithURL_1 = + _registerName1("webSocketTaskWithURL:"); + ffi.Pointer _objc_msgSend_301( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_301( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_301Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_webSocketTaskWithURL_protocols_1 = + _registerName1("webSocketTaskWithURL:protocols:"); + ffi.Pointer _objc_msgSend_302( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer protocols, + ) { + return __objc_msgSend_302( + obj, + sel, + url, + protocols, + ); + } + + late final __objc_msgSend_302Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_webSocketTaskWithRequest_1 = + _registerName1("webSocketTaskWithRequest:"); + ffi.Pointer _objc_msgSend_303( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_303( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_303Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dataTaskWithRequest_completionHandler_1 = + _registerName1("dataTaskWithRequest:completionHandler:"); + ffi.Pointer _objc_msgSend_304( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_304( + obj, + sel, + request, + completionHandler, + ); + } + + late final __objc_msgSend_304Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_dataTaskWithURL_completionHandler_1 = + _registerName1("dataTaskWithURL:completionHandler:"); + ffi.Pointer _objc_msgSend_305( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_305( + obj, + sel, + url, + completionHandler, + ); + } + + late final __objc_msgSend_305Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = + _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); + ffi.Pointer _objc_msgSend_306( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer fileURL, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_306( + obj, + sel, + request, + fileURL, + completionHandler, + ); + } + + late final __objc_msgSend_306Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = + _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); + ffi.Pointer _objc_msgSend_307( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer bodyData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_307( + obj, + sel, + request, + bodyData, + completionHandler, + ); + } + + late final __objc_msgSend_307Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_downloadTaskWithRequest_completionHandler_1 = + _registerName1("downloadTaskWithRequest:completionHandler:"); + ffi.Pointer _objc_msgSend_308( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_308( + obj, + sel, + request, + completionHandler, + ); + } + + late final __objc_msgSend_308Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_downloadTaskWithURL_completionHandler_1 = + _registerName1("downloadTaskWithURL:completionHandler:"); + ffi.Pointer _objc_msgSend_309( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_309( + obj, + sel, + url, + completionHandler, + ); + } + + late final __objc_msgSend_309Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_downloadTaskWithResumeData_completionHandler_1 = + _registerName1("downloadTaskWithResumeData:completionHandler:"); + ffi.Pointer _objc_msgSend_310( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer resumeData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_310( + obj, + sel, + resumeData, + completionHandler, + ); + } + + late final __objc_msgSend_310Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final ffi.Pointer _NSURLSessionTaskPriorityDefault = + _lookup('NSURLSessionTaskPriorityDefault'); + + double get NSURLSessionTaskPriorityDefault => + _NSURLSessionTaskPriorityDefault.value; + + set NSURLSessionTaskPriorityDefault(double value) => + _NSURLSessionTaskPriorityDefault.value = value; + + late final ffi.Pointer _NSURLSessionTaskPriorityLow = + _lookup('NSURLSessionTaskPriorityLow'); + + double get NSURLSessionTaskPriorityLow => _NSURLSessionTaskPriorityLow.value; + + set NSURLSessionTaskPriorityLow(double value) => + _NSURLSessionTaskPriorityLow.value = value; + + late final ffi.Pointer _NSURLSessionTaskPriorityHigh = + _lookup('NSURLSessionTaskPriorityHigh'); + + double get NSURLSessionTaskPriorityHigh => + _NSURLSessionTaskPriorityHigh.value; + + set NSURLSessionTaskPriorityHigh(double value) => + _NSURLSessionTaskPriorityHigh.value = value; + + /// Key in the userInfo dictionary of an NSError received during a failed download. + late final ffi.Pointer> + _NSURLSessionDownloadTaskResumeData = + _lookup>('NSURLSessionDownloadTaskResumeData'); + + ffi.Pointer get NSURLSessionDownloadTaskResumeData => + _NSURLSessionDownloadTaskResumeData.value; + + set NSURLSessionDownloadTaskResumeData(ffi.Pointer value) => + _NSURLSessionDownloadTaskResumeData.value = value; + + late final _class_NSURLSessionTaskTransactionMetrics1 = + _getClass1("NSURLSessionTaskTransactionMetrics"); + late final _sel_request1 = _registerName1("request"); + late final _sel_fetchStartDate1 = _registerName1("fetchStartDate"); + late final _sel_domainLookupStartDate1 = + _registerName1("domainLookupStartDate"); + late final _sel_domainLookupEndDate1 = _registerName1("domainLookupEndDate"); + late final _sel_connectStartDate1 = _registerName1("connectStartDate"); + late final _sel_secureConnectionStartDate1 = + _registerName1("secureConnectionStartDate"); + late final _sel_secureConnectionEndDate1 = + _registerName1("secureConnectionEndDate"); + late final _sel_connectEndDate1 = _registerName1("connectEndDate"); + late final _sel_requestStartDate1 = _registerName1("requestStartDate"); + late final _sel_requestEndDate1 = _registerName1("requestEndDate"); + late final _sel_responseStartDate1 = _registerName1("responseStartDate"); + late final _sel_responseEndDate1 = _registerName1("responseEndDate"); + late final _sel_networkProtocolName1 = _registerName1("networkProtocolName"); + late final _sel_isProxyConnection1 = _registerName1("isProxyConnection"); + late final _sel_isReusedConnection1 = _registerName1("isReusedConnection"); + late final _sel_resourceFetchType1 = _registerName1("resourceFetchType"); + int _objc_msgSend_311( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_311( + obj, + sel, + ); + } + + late final __objc_msgSend_311Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_countOfRequestHeaderBytesSent1 = + _registerName1("countOfRequestHeaderBytesSent"); + late final _sel_countOfRequestBodyBytesSent1 = + _registerName1("countOfRequestBodyBytesSent"); + late final _sel_countOfRequestBodyBytesBeforeEncoding1 = + _registerName1("countOfRequestBodyBytesBeforeEncoding"); + late final _sel_countOfResponseHeaderBytesReceived1 = + _registerName1("countOfResponseHeaderBytesReceived"); + late final _sel_countOfResponseBodyBytesReceived1 = + _registerName1("countOfResponseBodyBytesReceived"); + late final _sel_countOfResponseBodyBytesAfterDecoding1 = + _registerName1("countOfResponseBodyBytesAfterDecoding"); + late final _sel_localAddress1 = _registerName1("localAddress"); + late final _sel_localPort1 = _registerName1("localPort"); + late final _sel_remoteAddress1 = _registerName1("remoteAddress"); + late final _sel_remotePort1 = _registerName1("remotePort"); + late final _sel_negotiatedTLSProtocolVersion1 = + _registerName1("negotiatedTLSProtocolVersion"); + late final _sel_negotiatedTLSCipherSuite1 = + _registerName1("negotiatedTLSCipherSuite"); + late final _sel_isCellular1 = _registerName1("isCellular"); + late final _sel_isExpensive1 = _registerName1("isExpensive"); + late final _sel_isConstrained1 = _registerName1("isConstrained"); + late final _sel_isMultipath1 = _registerName1("isMultipath"); + late final _sel_domainResolutionProtocol1 = + _registerName1("domainResolutionProtocol"); + int _objc_msgSend_312( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_312( + obj, + sel, + ); + } + + late final __objc_msgSend_312Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionTaskMetrics1 = + _getClass1("NSURLSessionTaskMetrics"); + late final _sel_transactionMetrics1 = _registerName1("transactionMetrics"); + late final _class_NSDateInterval1 = _getClass1("NSDateInterval"); + late final _sel_taskInterval1 = _registerName1("taskInterval"); + ffi.Pointer _objc_msgSend_313( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_313( + obj, + sel, + ); + } + + late final __objc_msgSend_313Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_redirectCount1 = _registerName1("redirectCount"); + + /// A string constant for the "file" URL scheme. If you are using this to compare to a URL's scheme to see if it is a file URL, you should instead use the NSURL fileURL property -- the fileURL property is much faster. + late final ffi.Pointer> _NSURLFileScheme = + _lookup>('NSURLFileScheme'); + + ffi.Pointer get NSURLFileScheme => _NSURLFileScheme.value; + + set NSURLFileScheme(ffi.Pointer value) => + _NSURLFileScheme.value = value; + + /// Key for the resource properties that have not been set after setResourceValues:error: returns an error, returned as an array of of strings. + late final ffi.Pointer _NSURLKeysOfUnsetValuesKey = + _lookup('NSURLKeysOfUnsetValuesKey'); + + NSURLResourceKey get NSURLKeysOfUnsetValuesKey => + _NSURLKeysOfUnsetValuesKey.value; + + set NSURLKeysOfUnsetValuesKey(NSURLResourceKey value) => + _NSURLKeysOfUnsetValuesKey.value = value; + + /// The resource name provided by the file system (Read-write, value type NSString) + late final ffi.Pointer _NSURLNameKey = + _lookup('NSURLNameKey'); + + NSURLResourceKey get NSURLNameKey => _NSURLNameKey.value; + + set NSURLNameKey(NSURLResourceKey value) => _NSURLNameKey.value = value; + + /// Localized or extension-hidden name as displayed to users (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedNameKey = + _lookup('NSURLLocalizedNameKey'); + + NSURLResourceKey get NSURLLocalizedNameKey => _NSURLLocalizedNameKey.value; + + set NSURLLocalizedNameKey(NSURLResourceKey value) => + _NSURLLocalizedNameKey.value = value; + + /// True for regular files (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsRegularFileKey = + _lookup('NSURLIsRegularFileKey'); + + NSURLResourceKey get NSURLIsRegularFileKey => _NSURLIsRegularFileKey.value; + + set NSURLIsRegularFileKey(NSURLResourceKey value) => + _NSURLIsRegularFileKey.value = value; + + /// True for directories (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsDirectoryKey = + _lookup('NSURLIsDirectoryKey'); + + NSURLResourceKey get NSURLIsDirectoryKey => _NSURLIsDirectoryKey.value; + + set NSURLIsDirectoryKey(NSURLResourceKey value) => + _NSURLIsDirectoryKey.value = value; + + /// True for symlinks (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsSymbolicLinkKey = + _lookup('NSURLIsSymbolicLinkKey'); + + NSURLResourceKey get NSURLIsSymbolicLinkKey => _NSURLIsSymbolicLinkKey.value; + + set NSURLIsSymbolicLinkKey(NSURLResourceKey value) => + _NSURLIsSymbolicLinkKey.value = value; + + /// True for the root directory of a volume (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsVolumeKey = + _lookup('NSURLIsVolumeKey'); + + NSURLResourceKey get NSURLIsVolumeKey => _NSURLIsVolumeKey.value; + + set NSURLIsVolumeKey(NSURLResourceKey value) => + _NSURLIsVolumeKey.value = value; + + /// True for packaged directories (Read-only 10_6 and 10_7, read-write 10_8, value type boolean NSNumber). Note: You can only set or clear this property on directories; if you try to set this property on non-directory objects, the property is ignored. If the directory is a package for some other reason (extension type, etc), setting this property to false will have no effect. + late final ffi.Pointer _NSURLIsPackageKey = + _lookup('NSURLIsPackageKey'); + + NSURLResourceKey get NSURLIsPackageKey => _NSURLIsPackageKey.value; + + set NSURLIsPackageKey(NSURLResourceKey value) => + _NSURLIsPackageKey.value = value; + + /// True if resource is an application (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsApplicationKey = + _lookup('NSURLIsApplicationKey'); + + NSURLResourceKey get NSURLIsApplicationKey => _NSURLIsApplicationKey.value; + + set NSURLIsApplicationKey(NSURLResourceKey value) => + _NSURLIsApplicationKey.value = value; + + /// True if the resource is scriptable. Only applies to applications (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLApplicationIsScriptableKey = + _lookup('NSURLApplicationIsScriptableKey'); + + NSURLResourceKey get NSURLApplicationIsScriptableKey => + _NSURLApplicationIsScriptableKey.value; + + set NSURLApplicationIsScriptableKey(NSURLResourceKey value) => + _NSURLApplicationIsScriptableKey.value = value; + + /// True for system-immutable resources (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsSystemImmutableKey = + _lookup('NSURLIsSystemImmutableKey'); + + NSURLResourceKey get NSURLIsSystemImmutableKey => + _NSURLIsSystemImmutableKey.value; + + set NSURLIsSystemImmutableKey(NSURLResourceKey value) => + _NSURLIsSystemImmutableKey.value = value; + + /// True for user-immutable resources (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsUserImmutableKey = + _lookup('NSURLIsUserImmutableKey'); + + NSURLResourceKey get NSURLIsUserImmutableKey => + _NSURLIsUserImmutableKey.value; + + set NSURLIsUserImmutableKey(NSURLResourceKey value) => + _NSURLIsUserImmutableKey.value = value; + + /// True for resources normally not displayed to users (Read-write, value type boolean NSNumber). Note: If the resource is a hidden because its name starts with a period, setting this property to false will not change the property. + late final ffi.Pointer _NSURLIsHiddenKey = + _lookup('NSURLIsHiddenKey'); + + NSURLResourceKey get NSURLIsHiddenKey => _NSURLIsHiddenKey.value; + + set NSURLIsHiddenKey(NSURLResourceKey value) => + _NSURLIsHiddenKey.value = value; + + /// True for resources whose filename extension is removed from the localized name property (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLHasHiddenExtensionKey = + _lookup('NSURLHasHiddenExtensionKey'); + + NSURLResourceKey get NSURLHasHiddenExtensionKey => + _NSURLHasHiddenExtensionKey.value; + + set NSURLHasHiddenExtensionKey(NSURLResourceKey value) => + _NSURLHasHiddenExtensionKey.value = value; + + /// The date the resource was created (Read-write, value type NSDate) + late final ffi.Pointer _NSURLCreationDateKey = + _lookup('NSURLCreationDateKey'); + + NSURLResourceKey get NSURLCreationDateKey => _NSURLCreationDateKey.value; + + set NSURLCreationDateKey(NSURLResourceKey value) => + _NSURLCreationDateKey.value = value; + + /// The date the resource was last accessed (Read-write, value type NSDate) + late final ffi.Pointer _NSURLContentAccessDateKey = + _lookup('NSURLContentAccessDateKey'); + + NSURLResourceKey get NSURLContentAccessDateKey => + _NSURLContentAccessDateKey.value; + + set NSURLContentAccessDateKey(NSURLResourceKey value) => + _NSURLContentAccessDateKey.value = value; + + /// The time the resource content was last modified (Read-write, value type NSDate) + late final ffi.Pointer _NSURLContentModificationDateKey = + _lookup('NSURLContentModificationDateKey'); + + NSURLResourceKey get NSURLContentModificationDateKey => + _NSURLContentModificationDateKey.value; + + set NSURLContentModificationDateKey(NSURLResourceKey value) => + _NSURLContentModificationDateKey.value = value; + + /// The time the resource's attributes were last modified (Read-only, value type NSDate) + late final ffi.Pointer _NSURLAttributeModificationDateKey = + _lookup('NSURLAttributeModificationDateKey'); + + NSURLResourceKey get NSURLAttributeModificationDateKey => + _NSURLAttributeModificationDateKey.value; + + set NSURLAttributeModificationDateKey(NSURLResourceKey value) => + _NSURLAttributeModificationDateKey.value = value; + + /// Number of hard links to the resource (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLLinkCountKey = + _lookup('NSURLLinkCountKey'); + + NSURLResourceKey get NSURLLinkCountKey => _NSURLLinkCountKey.value; + + set NSURLLinkCountKey(NSURLResourceKey value) => + _NSURLLinkCountKey.value = value; + + /// The resource's parent directory, if any (Read-only, value type NSURL) + late final ffi.Pointer _NSURLParentDirectoryURLKey = + _lookup('NSURLParentDirectoryURLKey'); + + NSURLResourceKey get NSURLParentDirectoryURLKey => + _NSURLParentDirectoryURLKey.value; + + set NSURLParentDirectoryURLKey(NSURLResourceKey value) => + _NSURLParentDirectoryURLKey.value = value; + + /// URL of the volume on which the resource is stored (Read-only, value type NSURL) + late final ffi.Pointer _NSURLVolumeURLKey = + _lookup('NSURLVolumeURLKey'); + + NSURLResourceKey get NSURLVolumeURLKey => _NSURLVolumeURLKey.value; + + set NSURLVolumeURLKey(NSURLResourceKey value) => + _NSURLVolumeURLKey.value = value; + + /// Uniform type identifier (UTI) for the resource (Read-only, value type NSString) + late final ffi.Pointer _NSURLTypeIdentifierKey = + _lookup('NSURLTypeIdentifierKey'); + + NSURLResourceKey get NSURLTypeIdentifierKey => _NSURLTypeIdentifierKey.value; + + set NSURLTypeIdentifierKey(NSURLResourceKey value) => + _NSURLTypeIdentifierKey.value = value; + + /// File type (UTType) for the resource (Read-only, value type UTType) + late final ffi.Pointer _NSURLContentTypeKey = + _lookup('NSURLContentTypeKey'); + + NSURLResourceKey get NSURLContentTypeKey => _NSURLContentTypeKey.value; + + set NSURLContentTypeKey(NSURLResourceKey value) => + _NSURLContentTypeKey.value = value; + + /// User-visible type or "kind" description (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedTypeDescriptionKey = + _lookup('NSURLLocalizedTypeDescriptionKey'); + + NSURLResourceKey get NSURLLocalizedTypeDescriptionKey => + _NSURLLocalizedTypeDescriptionKey.value; + + set NSURLLocalizedTypeDescriptionKey(NSURLResourceKey value) => + _NSURLLocalizedTypeDescriptionKey.value = value; + + /// The label number assigned to the resource (Read-write, value type NSNumber) + late final ffi.Pointer _NSURLLabelNumberKey = + _lookup('NSURLLabelNumberKey'); + + NSURLResourceKey get NSURLLabelNumberKey => _NSURLLabelNumberKey.value; + + set NSURLLabelNumberKey(NSURLResourceKey value) => + _NSURLLabelNumberKey.value = value; + + /// The color of the assigned label (Read-only, value type NSColor) + late final ffi.Pointer _NSURLLabelColorKey = + _lookup('NSURLLabelColorKey'); + + NSURLResourceKey get NSURLLabelColorKey => _NSURLLabelColorKey.value; + + set NSURLLabelColorKey(NSURLResourceKey value) => + _NSURLLabelColorKey.value = value; + + /// The user-visible label text (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedLabelKey = + _lookup('NSURLLocalizedLabelKey'); + + NSURLResourceKey get NSURLLocalizedLabelKey => _NSURLLocalizedLabelKey.value; + + set NSURLLocalizedLabelKey(NSURLResourceKey value) => + _NSURLLocalizedLabelKey.value = value; + + /// The icon normally displayed for the resource (Read-only, value type NSImage) + late final ffi.Pointer _NSURLEffectiveIconKey = + _lookup('NSURLEffectiveIconKey'); + + NSURLResourceKey get NSURLEffectiveIconKey => _NSURLEffectiveIconKey.value; + + set NSURLEffectiveIconKey(NSURLResourceKey value) => + _NSURLEffectiveIconKey.value = value; + + /// The custom icon assigned to the resource, if any (Currently not implemented, value type NSImage) + late final ffi.Pointer _NSURLCustomIconKey = + _lookup('NSURLCustomIconKey'); + + NSURLResourceKey get NSURLCustomIconKey => _NSURLCustomIconKey.value; + + set NSURLCustomIconKey(NSURLResourceKey value) => + _NSURLCustomIconKey.value = value; + + /// An identifier which can be used to compare two file system objects for equality using -isEqual (i.e, two object identifiers are equal if they have the same file system path or if the paths are linked to same inode on the same file system). This identifier is not persistent across system restarts. (Read-only, value type id ) + late final ffi.Pointer _NSURLFileResourceIdentifierKey = + _lookup('NSURLFileResourceIdentifierKey'); + + NSURLResourceKey get NSURLFileResourceIdentifierKey => + _NSURLFileResourceIdentifierKey.value; + + set NSURLFileResourceIdentifierKey(NSURLResourceKey value) => + _NSURLFileResourceIdentifierKey.value = value; + + /// An identifier that can be used to identify the volume the file system object is on. Other objects on the same volume will have the same volume identifier and can be compared using for equality using -isEqual. This identifier is not persistent across system restarts. (Read-only, value type id ) + late final ffi.Pointer _NSURLVolumeIdentifierKey = + _lookup('NSURLVolumeIdentifierKey'); + + NSURLResourceKey get NSURLVolumeIdentifierKey => + _NSURLVolumeIdentifierKey.value; + + set NSURLVolumeIdentifierKey(NSURLResourceKey value) => + _NSURLVolumeIdentifierKey.value = value; + + /// The optimal block size when reading or writing this file's data, or nil if not available. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLPreferredIOBlockSizeKey = + _lookup('NSURLPreferredIOBlockSizeKey'); + + NSURLResourceKey get NSURLPreferredIOBlockSizeKey => + _NSURLPreferredIOBlockSizeKey.value; + + set NSURLPreferredIOBlockSizeKey(NSURLResourceKey value) => + _NSURLPreferredIOBlockSizeKey.value = value; + + /// true if this process (as determined by EUID) can read the resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsReadableKey = + _lookup('NSURLIsReadableKey'); + + NSURLResourceKey get NSURLIsReadableKey => _NSURLIsReadableKey.value; + + set NSURLIsReadableKey(NSURLResourceKey value) => + _NSURLIsReadableKey.value = value; + + /// true if this process (as determined by EUID) can write to the resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsWritableKey = + _lookup('NSURLIsWritableKey'); + + NSURLResourceKey get NSURLIsWritableKey => _NSURLIsWritableKey.value; + + set NSURLIsWritableKey(NSURLResourceKey value) => + _NSURLIsWritableKey.value = value; + + /// true if this process (as determined by EUID) can execute a file resource or search a directory resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsExecutableKey = + _lookup('NSURLIsExecutableKey'); + + NSURLResourceKey get NSURLIsExecutableKey => _NSURLIsExecutableKey.value; + + set NSURLIsExecutableKey(NSURLResourceKey value) => + _NSURLIsExecutableKey.value = value; + + /// The file system object's security information encapsulated in a NSFileSecurity object. (Read-write, Value type NSFileSecurity) + late final ffi.Pointer _NSURLFileSecurityKey = + _lookup('NSURLFileSecurityKey'); + + NSURLResourceKey get NSURLFileSecurityKey => _NSURLFileSecurityKey.value; + + set NSURLFileSecurityKey(NSURLResourceKey value) => + _NSURLFileSecurityKey.value = value; + + /// true if resource should be excluded from backups, false otherwise (Read-write, value type boolean NSNumber). This property is only useful for excluding cache and other application support files which are not needed in a backup. Some operations commonly made to user documents will cause this property to be reset to false and so this property should not be used on user documents. + late final ffi.Pointer _NSURLIsExcludedFromBackupKey = + _lookup('NSURLIsExcludedFromBackupKey'); + + NSURLResourceKey get NSURLIsExcludedFromBackupKey => + _NSURLIsExcludedFromBackupKey.value; + + set NSURLIsExcludedFromBackupKey(NSURLResourceKey value) => + _NSURLIsExcludedFromBackupKey.value = value; + + /// The array of Tag names (Read-write, value type NSArray of NSString) + late final ffi.Pointer _NSURLTagNamesKey = + _lookup('NSURLTagNamesKey'); + + NSURLResourceKey get NSURLTagNamesKey => _NSURLTagNamesKey.value; + + set NSURLTagNamesKey(NSURLResourceKey value) => + _NSURLTagNamesKey.value = value; + + /// the URL's path as a file system path (Read-only, value type NSString) + late final ffi.Pointer _NSURLPathKey = + _lookup('NSURLPathKey'); + + NSURLResourceKey get NSURLPathKey => _NSURLPathKey.value; + + set NSURLPathKey(NSURLResourceKey value) => _NSURLPathKey.value = value; + + /// the URL's path as a canonical absolute file system path (Read-only, value type NSString) + late final ffi.Pointer _NSURLCanonicalPathKey = + _lookup('NSURLCanonicalPathKey'); + + NSURLResourceKey get NSURLCanonicalPathKey => _NSURLCanonicalPathKey.value; + + set NSURLCanonicalPathKey(NSURLResourceKey value) => + _NSURLCanonicalPathKey.value = value; + + /// true if this URL is a file system trigger directory. Traversing or opening a file system trigger will cause an attempt to mount a file system on the trigger directory. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsMountTriggerKey = + _lookup('NSURLIsMountTriggerKey'); + + NSURLResourceKey get NSURLIsMountTriggerKey => _NSURLIsMountTriggerKey.value; + + set NSURLIsMountTriggerKey(NSURLResourceKey value) => + _NSURLIsMountTriggerKey.value = value; + + /// An opaque generation identifier which can be compared using isEqual: to determine if the data in a document has been modified. For URLs which refer to the same file inode, the generation identifier will change when the data in the file's data fork is changed (changes to extended attributes or other file system metadata do not change the generation identifier). For URLs which refer to the same directory inode, the generation identifier will change when direct children of that directory are added, removed or renamed (changes to the data of the direct children of that directory will not change the generation identifier). The generation identifier is persistent across system restarts. The generation identifier is tied to a specific document on a specific volume and is not transferred when the document is copied to another volume. This property is not supported by all volumes. (Read-only, value type id ) + late final ffi.Pointer _NSURLGenerationIdentifierKey = + _lookup('NSURLGenerationIdentifierKey'); + + NSURLResourceKey get NSURLGenerationIdentifierKey => + _NSURLGenerationIdentifierKey.value; + + set NSURLGenerationIdentifierKey(NSURLResourceKey value) => + _NSURLGenerationIdentifierKey.value = value; + + /// The document identifier -- a value assigned by the kernel to a document (which can be either a file or directory) and is used to identify the document regardless of where it gets moved on a volume. The document identifier survives "safe save” operations; i.e it is sticky to the path it was assigned to (-replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: is the preferred safe-save API). The document identifier is persistent across system restarts. The document identifier is not transferred when the file is copied. Document identifiers are only unique within a single volume. This property is not supported by all volumes. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLDocumentIdentifierKey = + _lookup('NSURLDocumentIdentifierKey'); + + NSURLResourceKey get NSURLDocumentIdentifierKey => + _NSURLDocumentIdentifierKey.value; + + set NSURLDocumentIdentifierKey(NSURLResourceKey value) => + _NSURLDocumentIdentifierKey.value = value; + + /// The date the resource was created, or renamed into or within its parent directory. Note that inconsistent behavior may be observed when this attribute is requested on hard-linked items. This property is not supported by all volumes. (Read-only before macOS 10.15, iOS 13.0, watchOS 6.0, and tvOS 13.0; Read-write after, value type NSDate) + late final ffi.Pointer _NSURLAddedToDirectoryDateKey = + _lookup('NSURLAddedToDirectoryDateKey'); + + NSURLResourceKey get NSURLAddedToDirectoryDateKey => + _NSURLAddedToDirectoryDateKey.value; + + set NSURLAddedToDirectoryDateKey(NSURLResourceKey value) => + _NSURLAddedToDirectoryDateKey.value = value; + + /// The quarantine properties as defined in LSQuarantine.h. To remove quarantine information from a file, pass NSNull as the value when setting this property. (Read-write, value type NSDictionary) + late final ffi.Pointer _NSURLQuarantinePropertiesKey = + _lookup('NSURLQuarantinePropertiesKey'); + + NSURLResourceKey get NSURLQuarantinePropertiesKey => + _NSURLQuarantinePropertiesKey.value; + + set NSURLQuarantinePropertiesKey(NSURLResourceKey value) => + _NSURLQuarantinePropertiesKey.value = value; + + /// Returns the file system object type. (Read-only, value type NSString) + late final ffi.Pointer _NSURLFileResourceTypeKey = + _lookup('NSURLFileResourceTypeKey'); + + NSURLResourceKey get NSURLFileResourceTypeKey => + _NSURLFileResourceTypeKey.value; + + set NSURLFileResourceTypeKey(NSURLResourceKey value) => + _NSURLFileResourceTypeKey.value = value; + + /// A 64-bit value assigned by APFS that identifies a file's content data stream. Only cloned files and their originals can have the same identifier. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileContentIdentifierKey = + _lookup('NSURLFileContentIdentifierKey'); + + NSURLResourceKey get NSURLFileContentIdentifierKey => + _NSURLFileContentIdentifierKey.value; + + set NSURLFileContentIdentifierKey(NSURLResourceKey value) => + _NSURLFileContentIdentifierKey.value = value; + + /// True for cloned files and their originals that may share all, some, or no data blocks. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLMayShareFileContentKey = + _lookup('NSURLMayShareFileContentKey'); + + NSURLResourceKey get NSURLMayShareFileContentKey => + _NSURLMayShareFileContentKey.value; + + set NSURLMayShareFileContentKey(NSURLResourceKey value) => + _NSURLMayShareFileContentKey.value = value; + + /// True if the file has extended attributes. False guarantees there are none. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLMayHaveExtendedAttributesKey = + _lookup('NSURLMayHaveExtendedAttributesKey'); + + NSURLResourceKey get NSURLMayHaveExtendedAttributesKey => + _NSURLMayHaveExtendedAttributesKey.value; + + set NSURLMayHaveExtendedAttributesKey(NSURLResourceKey value) => + _NSURLMayHaveExtendedAttributesKey.value = value; + + /// True if the file can be deleted by the file system when asked to free space. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLIsPurgeableKey = + _lookup('NSURLIsPurgeableKey'); + + NSURLResourceKey get NSURLIsPurgeableKey => _NSURLIsPurgeableKey.value; + + set NSURLIsPurgeableKey(NSURLResourceKey value) => + _NSURLIsPurgeableKey.value = value; + + /// True if the file has sparse regions. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLIsSparseKey = + _lookup('NSURLIsSparseKey'); + + NSURLResourceKey get NSURLIsSparseKey => _NSURLIsSparseKey.value; + + set NSURLIsSparseKey(NSURLResourceKey value) => + _NSURLIsSparseKey.value = value; + + /// The file system object type values returned for the NSURLFileResourceTypeKey + late final ffi.Pointer + _NSURLFileResourceTypeNamedPipe = + _lookup('NSURLFileResourceTypeNamedPipe'); + + NSURLFileResourceType get NSURLFileResourceTypeNamedPipe => + _NSURLFileResourceTypeNamedPipe.value; + + set NSURLFileResourceTypeNamedPipe(NSURLFileResourceType value) => + _NSURLFileResourceTypeNamedPipe.value = value; + + late final ffi.Pointer + _NSURLFileResourceTypeCharacterSpecial = + _lookup('NSURLFileResourceTypeCharacterSpecial'); + + NSURLFileResourceType get NSURLFileResourceTypeCharacterSpecial => + _NSURLFileResourceTypeCharacterSpecial.value; + + set NSURLFileResourceTypeCharacterSpecial(NSURLFileResourceType value) => + _NSURLFileResourceTypeCharacterSpecial.value = value; + + late final ffi.Pointer + _NSURLFileResourceTypeDirectory = + _lookup('NSURLFileResourceTypeDirectory'); + + NSURLFileResourceType get NSURLFileResourceTypeDirectory => + _NSURLFileResourceTypeDirectory.value; + + set NSURLFileResourceTypeDirectory(NSURLFileResourceType value) => + _NSURLFileResourceTypeDirectory.value = value; + + late final ffi.Pointer + _NSURLFileResourceTypeBlockSpecial = + _lookup('NSURLFileResourceTypeBlockSpecial'); + + NSURLFileResourceType get NSURLFileResourceTypeBlockSpecial => + _NSURLFileResourceTypeBlockSpecial.value; + + set NSURLFileResourceTypeBlockSpecial(NSURLFileResourceType value) => + _NSURLFileResourceTypeBlockSpecial.value = value; + + late final ffi.Pointer _NSURLFileResourceTypeRegular = + _lookup('NSURLFileResourceTypeRegular'); + + NSURLFileResourceType get NSURLFileResourceTypeRegular => + _NSURLFileResourceTypeRegular.value; + + set NSURLFileResourceTypeRegular(NSURLFileResourceType value) => + _NSURLFileResourceTypeRegular.value = value; + + late final ffi.Pointer + _NSURLFileResourceTypeSymbolicLink = + _lookup('NSURLFileResourceTypeSymbolicLink'); + + NSURLFileResourceType get NSURLFileResourceTypeSymbolicLink => + _NSURLFileResourceTypeSymbolicLink.value; + + set NSURLFileResourceTypeSymbolicLink(NSURLFileResourceType value) => + _NSURLFileResourceTypeSymbolicLink.value = value; + + late final ffi.Pointer _NSURLFileResourceTypeSocket = + _lookup('NSURLFileResourceTypeSocket'); + + NSURLFileResourceType get NSURLFileResourceTypeSocket => + _NSURLFileResourceTypeSocket.value; + + set NSURLFileResourceTypeSocket(NSURLFileResourceType value) => + _NSURLFileResourceTypeSocket.value = value; + + late final ffi.Pointer _NSURLFileResourceTypeUnknown = + _lookup('NSURLFileResourceTypeUnknown'); + + NSURLFileResourceType get NSURLFileResourceTypeUnknown => + _NSURLFileResourceTypeUnknown.value; + + set NSURLFileResourceTypeUnknown(NSURLFileResourceType value) => + _NSURLFileResourceTypeUnknown.value = value; + + /// dictionary of NSImage/UIImage objects keyed by size + late final ffi.Pointer _NSURLThumbnailDictionaryKey = + _lookup('NSURLThumbnailDictionaryKey'); + + NSURLResourceKey get NSURLThumbnailDictionaryKey => + _NSURLThumbnailDictionaryKey.value; + + set NSURLThumbnailDictionaryKey(NSURLResourceKey value) => + _NSURLThumbnailDictionaryKey.value = value; + + /// returns all thumbnails as a single NSImage + late final ffi.Pointer _NSURLThumbnailKey = + _lookup('NSURLThumbnailKey'); + + NSURLResourceKey get NSURLThumbnailKey => _NSURLThumbnailKey.value; + + set NSURLThumbnailKey(NSURLResourceKey value) => + _NSURLThumbnailKey.value = value; + + /// size key for a 1024 x 1024 thumbnail image + late final ffi.Pointer + _NSThumbnail1024x1024SizeKey = + _lookup('NSThumbnail1024x1024SizeKey'); + + NSURLThumbnailDictionaryItem get NSThumbnail1024x1024SizeKey => + _NSThumbnail1024x1024SizeKey.value; + + set NSThumbnail1024x1024SizeKey(NSURLThumbnailDictionaryItem value) => + _NSThumbnail1024x1024SizeKey.value = value; + + /// Total file size in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileSizeKey = + _lookup('NSURLFileSizeKey'); + + NSURLResourceKey get NSURLFileSizeKey => _NSURLFileSizeKey.value; + + set NSURLFileSizeKey(NSURLResourceKey value) => + _NSURLFileSizeKey.value = value; + + /// Total size allocated on disk for the file in bytes (number of blocks times block size) (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileAllocatedSizeKey = + _lookup('NSURLFileAllocatedSizeKey'); + + NSURLResourceKey get NSURLFileAllocatedSizeKey => + _NSURLFileAllocatedSizeKey.value; + + set NSURLFileAllocatedSizeKey(NSURLResourceKey value) => + _NSURLFileAllocatedSizeKey.value = value; + + /// Total displayable size of the file in bytes (this may include space used by metadata), or nil if not available. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLTotalFileSizeKey = + _lookup('NSURLTotalFileSizeKey'); + + NSURLResourceKey get NSURLTotalFileSizeKey => _NSURLTotalFileSizeKey.value; + + set NSURLTotalFileSizeKey(NSURLResourceKey value) => + _NSURLTotalFileSizeKey.value = value; + + /// Total allocated size of the file in bytes (this may include space used by metadata), or nil if not available. This can be less than the value returned by NSURLTotalFileSizeKey if the resource is compressed. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLTotalFileAllocatedSizeKey = + _lookup('NSURLTotalFileAllocatedSizeKey'); + + NSURLResourceKey get NSURLTotalFileAllocatedSizeKey => + _NSURLTotalFileAllocatedSizeKey.value; + + set NSURLTotalFileAllocatedSizeKey(NSURLResourceKey value) => + _NSURLTotalFileAllocatedSizeKey.value = value; + + /// true if the resource is a Finder alias file or a symlink, false otherwise ( Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsAliasFileKey = + _lookup('NSURLIsAliasFileKey'); + + NSURLResourceKey get NSURLIsAliasFileKey => _NSURLIsAliasFileKey.value; + + set NSURLIsAliasFileKey(NSURLResourceKey value) => + _NSURLIsAliasFileKey.value = value; + + /// The protection level for this file + late final ffi.Pointer _NSURLFileProtectionKey = + _lookup('NSURLFileProtectionKey'); + + NSURLResourceKey get NSURLFileProtectionKey => _NSURLFileProtectionKey.value; + + set NSURLFileProtectionKey(NSURLResourceKey value) => + _NSURLFileProtectionKey.value = value; + + /// The file has no special protections associated with it. It can be read from or written to at any time. + late final ffi.Pointer _NSURLFileProtectionNone = + _lookup('NSURLFileProtectionNone'); + + NSURLFileProtectionType get NSURLFileProtectionNone => + _NSURLFileProtectionNone.value; + + set NSURLFileProtectionNone(NSURLFileProtectionType value) => + _NSURLFileProtectionNone.value = value; + + /// The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting. + late final ffi.Pointer _NSURLFileProtectionComplete = + _lookup('NSURLFileProtectionComplete'); + + NSURLFileProtectionType get NSURLFileProtectionComplete => + _NSURLFileProtectionComplete.value; + + set NSURLFileProtectionComplete(NSURLFileProtectionType value) => + _NSURLFileProtectionComplete.value = value; + + /// The file is stored in an encrypted format on disk. Files can be created while the device is locked, but once closed, cannot be opened again until the device is unlocked. If the file is opened when unlocked, you may continue to access the file normally, even if the user locks the device. There is a small performance penalty when the file is created and opened, though not when being written to or read from. This can be mitigated by changing the file protection to NSURLFileProtectionComplete when the device is unlocked. + late final ffi.Pointer + _NSURLFileProtectionCompleteUnlessOpen = + _lookup('NSURLFileProtectionCompleteUnlessOpen'); + + NSURLFileProtectionType get NSURLFileProtectionCompleteUnlessOpen => + _NSURLFileProtectionCompleteUnlessOpen.value; + + set NSURLFileProtectionCompleteUnlessOpen(NSURLFileProtectionType value) => + _NSURLFileProtectionCompleteUnlessOpen.value = value; + + /// The file is stored in an encrypted format on disk and cannot be accessed until after the device has booted. After the user unlocks the device for the first time, your app can access the file and continue to access it even if the user subsequently locks the device. + late final ffi.Pointer + _NSURLFileProtectionCompleteUntilFirstUserAuthentication = + _lookup( + 'NSURLFileProtectionCompleteUntilFirstUserAuthentication'); + + NSURLFileProtectionType + get NSURLFileProtectionCompleteUntilFirstUserAuthentication => + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value; + + set NSURLFileProtectionCompleteUntilFirstUserAuthentication( + NSURLFileProtectionType value) => + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; + + /// The user-visible volume format (Read-only, value type NSString) + late final ffi.Pointer + _NSURLVolumeLocalizedFormatDescriptionKey = + _lookup('NSURLVolumeLocalizedFormatDescriptionKey'); + + NSURLResourceKey get NSURLVolumeLocalizedFormatDescriptionKey => + _NSURLVolumeLocalizedFormatDescriptionKey.value; + + set NSURLVolumeLocalizedFormatDescriptionKey(NSURLResourceKey value) => + _NSURLVolumeLocalizedFormatDescriptionKey.value = value; + + /// Total volume capacity in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeTotalCapacityKey = + _lookup('NSURLVolumeTotalCapacityKey'); + + NSURLResourceKey get NSURLVolumeTotalCapacityKey => + _NSURLVolumeTotalCapacityKey.value; + + set NSURLVolumeTotalCapacityKey(NSURLResourceKey value) => + _NSURLVolumeTotalCapacityKey.value = value; + + /// Total free space in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeAvailableCapacityKey = + _lookup('NSURLVolumeAvailableCapacityKey'); + + NSURLResourceKey get NSURLVolumeAvailableCapacityKey => + _NSURLVolumeAvailableCapacityKey.value; + + set NSURLVolumeAvailableCapacityKey(NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityKey.value = value; + + /// Total number of resources on the volume (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeResourceCountKey = + _lookup('NSURLVolumeResourceCountKey'); + + NSURLResourceKey get NSURLVolumeResourceCountKey => + _NSURLVolumeResourceCountKey.value; + + set NSURLVolumeResourceCountKey(NSURLResourceKey value) => + _NSURLVolumeResourceCountKey.value = value; + + /// true if the volume format supports persistent object identifiers and can look up file system objects by their IDs (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsPersistentIDsKey = + _lookup('NSURLVolumeSupportsPersistentIDsKey'); + + NSURLResourceKey get NSURLVolumeSupportsPersistentIDsKey => + _NSURLVolumeSupportsPersistentIDsKey.value; + + set NSURLVolumeSupportsPersistentIDsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsPersistentIDsKey.value = value; + + /// true if the volume format supports symbolic links (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsSymbolicLinksKey = + _lookup('NSURLVolumeSupportsSymbolicLinksKey'); + + NSURLResourceKey get NSURLVolumeSupportsSymbolicLinksKey => + _NSURLVolumeSupportsSymbolicLinksKey.value; + + set NSURLVolumeSupportsSymbolicLinksKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSymbolicLinksKey.value = value; + + /// true if the volume format supports hard links (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsHardLinksKey = + _lookup('NSURLVolumeSupportsHardLinksKey'); + + NSURLResourceKey get NSURLVolumeSupportsHardLinksKey => + _NSURLVolumeSupportsHardLinksKey.value; + + set NSURLVolumeSupportsHardLinksKey(NSURLResourceKey value) => + _NSURLVolumeSupportsHardLinksKey.value = value; + + /// true if the volume format supports a journal used to speed recovery in case of unplanned restart (such as a power outage or crash). This does not necessarily mean the volume is actively using a journal. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsJournalingKey = + _lookup('NSURLVolumeSupportsJournalingKey'); + + NSURLResourceKey get NSURLVolumeSupportsJournalingKey => + _NSURLVolumeSupportsJournalingKey.value; + + set NSURLVolumeSupportsJournalingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsJournalingKey.value = value; + + /// true if the volume is currently using a journal for speedy recovery after an unplanned restart. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsJournalingKey = + _lookup('NSURLVolumeIsJournalingKey'); + + NSURLResourceKey get NSURLVolumeIsJournalingKey => + _NSURLVolumeIsJournalingKey.value; + + set NSURLVolumeIsJournalingKey(NSURLResourceKey value) => + _NSURLVolumeIsJournalingKey.value = value; + + /// true if the volume format supports sparse files, that is, files which can have 'holes' that have never been written to, and thus do not consume space on disk. A sparse file may have an allocated size on disk that is less than its logical length (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsSparseFilesKey = + _lookup('NSURLVolumeSupportsSparseFilesKey'); + + NSURLResourceKey get NSURLVolumeSupportsSparseFilesKey => + _NSURLVolumeSupportsSparseFilesKey.value; + + set NSURLVolumeSupportsSparseFilesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSparseFilesKey.value = value; + + /// For security reasons, parts of a file (runs) that have never been written to must appear to contain zeroes. true if the volume keeps track of allocated but unwritten runs of a file so that it can substitute zeroes without actually writing zeroes to the media. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsZeroRunsKey = + _lookup('NSURLVolumeSupportsZeroRunsKey'); + + NSURLResourceKey get NSURLVolumeSupportsZeroRunsKey => + _NSURLVolumeSupportsZeroRunsKey.value; + + set NSURLVolumeSupportsZeroRunsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsZeroRunsKey.value = value; + + /// true if the volume format treats upper and lower case characters in file and directory names as different. Otherwise an upper case character is equivalent to a lower case character, and you can't have two names that differ solely in the case of the characters. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsCaseSensitiveNamesKey = + _lookup('NSURLVolumeSupportsCaseSensitiveNamesKey'); + + NSURLResourceKey get NSURLVolumeSupportsCaseSensitiveNamesKey => + _NSURLVolumeSupportsCaseSensitiveNamesKey.value; + + set NSURLVolumeSupportsCaseSensitiveNamesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCaseSensitiveNamesKey.value = value; + + /// true if the volume format preserves the case of file and directory names. Otherwise the volume may change the case of some characters (typically making them all upper or all lower case). (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsCasePreservedNamesKey = + _lookup('NSURLVolumeSupportsCasePreservedNamesKey'); + + NSURLResourceKey get NSURLVolumeSupportsCasePreservedNamesKey => + _NSURLVolumeSupportsCasePreservedNamesKey.value; + + set NSURLVolumeSupportsCasePreservedNamesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCasePreservedNamesKey.value = value; + + /// true if the volume supports reliable storage of times for the root directory. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsRootDirectoryDatesKey = + _lookup('NSURLVolumeSupportsRootDirectoryDatesKey'); + + NSURLResourceKey get NSURLVolumeSupportsRootDirectoryDatesKey => + _NSURLVolumeSupportsRootDirectoryDatesKey.value; + + set NSURLVolumeSupportsRootDirectoryDatesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsRootDirectoryDatesKey.value = value; + + /// true if the volume supports returning volume size values (NSURLVolumeTotalCapacityKey and NSURLVolumeAvailableCapacityKey). (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsVolumeSizesKey = + _lookup('NSURLVolumeSupportsVolumeSizesKey'); + + NSURLResourceKey get NSURLVolumeSupportsVolumeSizesKey => + _NSURLVolumeSupportsVolumeSizesKey.value; + + set NSURLVolumeSupportsVolumeSizesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsVolumeSizesKey.value = value; + + /// true if the volume can be renamed. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsRenamingKey = + _lookup('NSURLVolumeSupportsRenamingKey'); + + NSURLResourceKey get NSURLVolumeSupportsRenamingKey => + _NSURLVolumeSupportsRenamingKey.value; + + set NSURLVolumeSupportsRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsRenamingKey.value = value; + + /// true if the volume implements whole-file flock(2) style advisory locks, and the O_EXLOCK and O_SHLOCK flags of the open(2) call. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsAdvisoryFileLockingKey = + _lookup('NSURLVolumeSupportsAdvisoryFileLockingKey'); + + NSURLResourceKey get NSURLVolumeSupportsAdvisoryFileLockingKey => + _NSURLVolumeSupportsAdvisoryFileLockingKey.value; + + set NSURLVolumeSupportsAdvisoryFileLockingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsAdvisoryFileLockingKey.value = value; + + /// true if the volume implements extended security (ACLs). (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsExtendedSecurityKey = + _lookup('NSURLVolumeSupportsExtendedSecurityKey'); + + NSURLResourceKey get NSURLVolumeSupportsExtendedSecurityKey => + _NSURLVolumeSupportsExtendedSecurityKey.value; + + set NSURLVolumeSupportsExtendedSecurityKey(NSURLResourceKey value) => + _NSURLVolumeSupportsExtendedSecurityKey.value = value; + + /// true if the volume should be visible via the GUI (i.e., appear on the Desktop as a separate volume). (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsBrowsableKey = + _lookup('NSURLVolumeIsBrowsableKey'); + + NSURLResourceKey get NSURLVolumeIsBrowsableKey => + _NSURLVolumeIsBrowsableKey.value; + + set NSURLVolumeIsBrowsableKey(NSURLResourceKey value) => + _NSURLVolumeIsBrowsableKey.value = value; + + /// The largest file size (in bytes) supported by this file system, or nil if this cannot be determined. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeMaximumFileSizeKey = + _lookup('NSURLVolumeMaximumFileSizeKey'); + + NSURLResourceKey get NSURLVolumeMaximumFileSizeKey => + _NSURLVolumeMaximumFileSizeKey.value; + + set NSURLVolumeMaximumFileSizeKey(NSURLResourceKey value) => + _NSURLVolumeMaximumFileSizeKey.value = value; + + /// true if the volume's media is ejectable from the drive mechanism under software control. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsEjectableKey = + _lookup('NSURLVolumeIsEjectableKey'); + + NSURLResourceKey get NSURLVolumeIsEjectableKey => + _NSURLVolumeIsEjectableKey.value; + + set NSURLVolumeIsEjectableKey(NSURLResourceKey value) => + _NSURLVolumeIsEjectableKey.value = value; + + /// true if the volume's media is removable from the drive mechanism. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsRemovableKey = + _lookup('NSURLVolumeIsRemovableKey'); + + NSURLResourceKey get NSURLVolumeIsRemovableKey => + _NSURLVolumeIsRemovableKey.value; + + set NSURLVolumeIsRemovableKey(NSURLResourceKey value) => + _NSURLVolumeIsRemovableKey.value = value; + + /// true if the volume's device is connected to an internal bus, false if connected to an external bus, or nil if not available. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsInternalKey = + _lookup('NSURLVolumeIsInternalKey'); + + NSURLResourceKey get NSURLVolumeIsInternalKey => + _NSURLVolumeIsInternalKey.value; + + set NSURLVolumeIsInternalKey(NSURLResourceKey value) => + _NSURLVolumeIsInternalKey.value = value; + + /// true if the volume is automounted. Note: do not mistake this with the functionality provided by kCFURLVolumeSupportsBrowsingKey. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsAutomountedKey = + _lookup('NSURLVolumeIsAutomountedKey'); + + NSURLResourceKey get NSURLVolumeIsAutomountedKey => + _NSURLVolumeIsAutomountedKey.value; + + set NSURLVolumeIsAutomountedKey(NSURLResourceKey value) => + _NSURLVolumeIsAutomountedKey.value = value; + + /// true if the volume is stored on a local device. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsLocalKey = + _lookup('NSURLVolumeIsLocalKey'); + + NSURLResourceKey get NSURLVolumeIsLocalKey => _NSURLVolumeIsLocalKey.value; + + set NSURLVolumeIsLocalKey(NSURLResourceKey value) => + _NSURLVolumeIsLocalKey.value = value; + + /// true if the volume is read-only. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsReadOnlyKey = + _lookup('NSURLVolumeIsReadOnlyKey'); + + NSURLResourceKey get NSURLVolumeIsReadOnlyKey => + _NSURLVolumeIsReadOnlyKey.value; + + set NSURLVolumeIsReadOnlyKey(NSURLResourceKey value) => + _NSURLVolumeIsReadOnlyKey.value = value; + + /// The volume's creation date, or nil if this cannot be determined. (Read-only, value type NSDate) + late final ffi.Pointer _NSURLVolumeCreationDateKey = + _lookup('NSURLVolumeCreationDateKey'); + + NSURLResourceKey get NSURLVolumeCreationDateKey => + _NSURLVolumeCreationDateKey.value; + + set NSURLVolumeCreationDateKey(NSURLResourceKey value) => + _NSURLVolumeCreationDateKey.value = value; + + /// The NSURL needed to remount a network volume, or nil if not available. (Read-only, value type NSURL) + late final ffi.Pointer _NSURLVolumeURLForRemountingKey = + _lookup('NSURLVolumeURLForRemountingKey'); + + NSURLResourceKey get NSURLVolumeURLForRemountingKey => + _NSURLVolumeURLForRemountingKey.value; + + set NSURLVolumeURLForRemountingKey(NSURLResourceKey value) => + _NSURLVolumeURLForRemountingKey.value = value; + + /// The volume's persistent UUID as a string, or nil if a persistent UUID is not available for the volume. (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeUUIDStringKey = + _lookup('NSURLVolumeUUIDStringKey'); + + NSURLResourceKey get NSURLVolumeUUIDStringKey => + _NSURLVolumeUUIDStringKey.value; + + set NSURLVolumeUUIDStringKey(NSURLResourceKey value) => + _NSURLVolumeUUIDStringKey.value = value; + + /// The name of the volume (Read-write if NSURLVolumeSupportsRenamingKey is YES, otherwise read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeNameKey = + _lookup('NSURLVolumeNameKey'); + + NSURLResourceKey get NSURLVolumeNameKey => _NSURLVolumeNameKey.value; + + set NSURLVolumeNameKey(NSURLResourceKey value) => + _NSURLVolumeNameKey.value = value; + + /// The user-presentable name of the volume (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeLocalizedNameKey = + _lookup('NSURLVolumeLocalizedNameKey'); + + NSURLResourceKey get NSURLVolumeLocalizedNameKey => + _NSURLVolumeLocalizedNameKey.value; + + set NSURLVolumeLocalizedNameKey(NSURLResourceKey value) => + _NSURLVolumeLocalizedNameKey.value = value; + + /// true if the volume is encrypted. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsEncryptedKey = + _lookup('NSURLVolumeIsEncryptedKey'); + + NSURLResourceKey get NSURLVolumeIsEncryptedKey => + _NSURLVolumeIsEncryptedKey.value; + + set NSURLVolumeIsEncryptedKey(NSURLResourceKey value) => + _NSURLVolumeIsEncryptedKey.value = value; + + /// true if the volume is the root filesystem. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsRootFileSystemKey = + _lookup('NSURLVolumeIsRootFileSystemKey'); + + NSURLResourceKey get NSURLVolumeIsRootFileSystemKey => + _NSURLVolumeIsRootFileSystemKey.value; + + set NSURLVolumeIsRootFileSystemKey(NSURLResourceKey value) => + _NSURLVolumeIsRootFileSystemKey.value = value; + + /// true if the volume supports transparent decompression of compressed files using decmpfs. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsCompressionKey = + _lookup('NSURLVolumeSupportsCompressionKey'); + + NSURLResourceKey get NSURLVolumeSupportsCompressionKey => + _NSURLVolumeSupportsCompressionKey.value; + + set NSURLVolumeSupportsCompressionKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCompressionKey.value = value; + + /// true if the volume supports clonefile(2) (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsFileCloningKey = + _lookup('NSURLVolumeSupportsFileCloningKey'); + + NSURLResourceKey get NSURLVolumeSupportsFileCloningKey => + _NSURLVolumeSupportsFileCloningKey.value; + + set NSURLVolumeSupportsFileCloningKey(NSURLResourceKey value) => + _NSURLVolumeSupportsFileCloningKey.value = value; + + /// true if the volume supports renamex_np(2)'s RENAME_SWAP option (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsSwapRenamingKey = + _lookup('NSURLVolumeSupportsSwapRenamingKey'); + + NSURLResourceKey get NSURLVolumeSupportsSwapRenamingKey => + _NSURLVolumeSupportsSwapRenamingKey.value; + + set NSURLVolumeSupportsSwapRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSwapRenamingKey.value = value; + + /// true if the volume supports renamex_np(2)'s RENAME_EXCL option (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsExclusiveRenamingKey = + _lookup('NSURLVolumeSupportsExclusiveRenamingKey'); + + NSURLResourceKey get NSURLVolumeSupportsExclusiveRenamingKey => + _NSURLVolumeSupportsExclusiveRenamingKey.value; + + set NSURLVolumeSupportsExclusiveRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsExclusiveRenamingKey.value = value; + + /// true if the volume supports making files immutable with the NSURLIsUserImmutableKey or NSURLIsSystemImmutableKey properties (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsImmutableFilesKey = + _lookup('NSURLVolumeSupportsImmutableFilesKey'); + + NSURLResourceKey get NSURLVolumeSupportsImmutableFilesKey => + _NSURLVolumeSupportsImmutableFilesKey.value; + + set NSURLVolumeSupportsImmutableFilesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsImmutableFilesKey.value = value; + + /// true if the volume supports setting POSIX access permissions with the NSURLFileSecurityKey property (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsAccessPermissionsKey = + _lookup('NSURLVolumeSupportsAccessPermissionsKey'); + + NSURLResourceKey get NSURLVolumeSupportsAccessPermissionsKey => + _NSURLVolumeSupportsAccessPermissionsKey.value; + + set NSURLVolumeSupportsAccessPermissionsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsAccessPermissionsKey.value = value; + + /// True if the volume supports the File Protection attribute (see NSURLFileProtectionKey). (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsFileProtectionKey = + _lookup('NSURLVolumeSupportsFileProtectionKey'); + + NSURLResourceKey get NSURLVolumeSupportsFileProtectionKey => + _NSURLVolumeSupportsFileProtectionKey.value; + + set NSURLVolumeSupportsFileProtectionKey(NSURLResourceKey value) => + _NSURLVolumeSupportsFileProtectionKey.value = value; + + /// (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeAvailableCapacityForImportantUsageKey = + _lookup( + 'NSURLVolumeAvailableCapacityForImportantUsageKey'); + + NSURLResourceKey get NSURLVolumeAvailableCapacityForImportantUsageKey => + _NSURLVolumeAvailableCapacityForImportantUsageKey.value; + + set NSURLVolumeAvailableCapacityForImportantUsageKey( + NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityForImportantUsageKey.value = value; + + /// (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey = + _lookup( + 'NSURLVolumeAvailableCapacityForOpportunisticUsageKey'); + + NSURLResourceKey get NSURLVolumeAvailableCapacityForOpportunisticUsageKey => + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value; + + set NSURLVolumeAvailableCapacityForOpportunisticUsageKey( + NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; + + /// true if this item is synced to the cloud, false if it is only a local file. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsUbiquitousItemKey = + _lookup('NSURLIsUbiquitousItemKey'); + + NSURLResourceKey get NSURLIsUbiquitousItemKey => + _NSURLIsUbiquitousItemKey.value; + + set NSURLIsUbiquitousItemKey(NSURLResourceKey value) => + _NSURLIsUbiquitousItemKey.value = value; + + /// true if this item has conflicts outstanding. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemHasUnresolvedConflictsKey = + _lookup('NSURLUbiquitousItemHasUnresolvedConflictsKey'); + + NSURLResourceKey get NSURLUbiquitousItemHasUnresolvedConflictsKey => + _NSURLUbiquitousItemHasUnresolvedConflictsKey.value; + + set NSURLUbiquitousItemHasUnresolvedConflictsKey(NSURLResourceKey value) => + _NSURLUbiquitousItemHasUnresolvedConflictsKey.value = value; + + /// equivalent to NSURLUbiquitousItemDownloadingStatusKey == NSURLUbiquitousItemDownloadingStatusCurrent. Has never behaved as documented in earlier releases, hence deprecated. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsDownloadedKey = + _lookup('NSURLUbiquitousItemIsDownloadedKey'); + + NSURLResourceKey get NSURLUbiquitousItemIsDownloadedKey => + _NSURLUbiquitousItemIsDownloadedKey.value; + + set NSURLUbiquitousItemIsDownloadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsDownloadedKey.value = value; + + /// true if data is being downloaded for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemIsDownloadingKey = + _lookup('NSURLUbiquitousItemIsDownloadingKey'); + + NSURLResourceKey get NSURLUbiquitousItemIsDownloadingKey => + _NSURLUbiquitousItemIsDownloadingKey.value; + + set NSURLUbiquitousItemIsDownloadingKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsDownloadingKey.value = value; + + /// true if there is data present in the cloud for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsUploadedKey = + _lookup('NSURLUbiquitousItemIsUploadedKey'); + + NSURLResourceKey get NSURLUbiquitousItemIsUploadedKey => + _NSURLUbiquitousItemIsUploadedKey.value; + + set NSURLUbiquitousItemIsUploadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsUploadedKey.value = value; + + /// true if data is being uploaded for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsUploadingKey = + _lookup('NSURLUbiquitousItemIsUploadingKey'); + + NSURLResourceKey get NSURLUbiquitousItemIsUploadingKey => + _NSURLUbiquitousItemIsUploadingKey.value; + + set NSURLUbiquitousItemIsUploadingKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsUploadingKey.value = value; + + /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead + late final ffi.Pointer + _NSURLUbiquitousItemPercentDownloadedKey = + _lookup('NSURLUbiquitousItemPercentDownloadedKey'); + + NSURLResourceKey get NSURLUbiquitousItemPercentDownloadedKey => + _NSURLUbiquitousItemPercentDownloadedKey.value; + + set NSURLUbiquitousItemPercentDownloadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemPercentDownloadedKey.value = value; + + /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead + late final ffi.Pointer + _NSURLUbiquitousItemPercentUploadedKey = + _lookup('NSURLUbiquitousItemPercentUploadedKey'); + + NSURLResourceKey get NSURLUbiquitousItemPercentUploadedKey => + _NSURLUbiquitousItemPercentUploadedKey.value; + + set NSURLUbiquitousItemPercentUploadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemPercentUploadedKey.value = value; + + /// returns the download status of this item. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusKey = + _lookup('NSURLUbiquitousItemDownloadingStatusKey'); + + NSURLResourceKey get NSURLUbiquitousItemDownloadingStatusKey => + _NSURLUbiquitousItemDownloadingStatusKey.value; + + set NSURLUbiquitousItemDownloadingStatusKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadingStatusKey.value = value; + + /// returns the error when downloading the item from iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingErrorKey = + _lookup('NSURLUbiquitousItemDownloadingErrorKey'); + + NSURLResourceKey get NSURLUbiquitousItemDownloadingErrorKey => + _NSURLUbiquitousItemDownloadingErrorKey.value; + + set NSURLUbiquitousItemDownloadingErrorKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadingErrorKey.value = value; + + /// returns the error when uploading the item to iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) + late final ffi.Pointer + _NSURLUbiquitousItemUploadingErrorKey = + _lookup('NSURLUbiquitousItemUploadingErrorKey'); + + NSURLResourceKey get NSURLUbiquitousItemUploadingErrorKey => + _NSURLUbiquitousItemUploadingErrorKey.value; + + set NSURLUbiquitousItemUploadingErrorKey(NSURLResourceKey value) => + _NSURLUbiquitousItemUploadingErrorKey.value = value; + + /// returns whether a download of this item has already been requested with an API like -startDownloadingUbiquitousItemAtURL:error: (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemDownloadRequestedKey = + _lookup('NSURLUbiquitousItemDownloadRequestedKey'); + + NSURLResourceKey get NSURLUbiquitousItemDownloadRequestedKey => + _NSURLUbiquitousItemDownloadRequestedKey.value; + + set NSURLUbiquitousItemDownloadRequestedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadRequestedKey.value = value; + + /// returns the name of this item's container as displayed to users. + late final ffi.Pointer + _NSURLUbiquitousItemContainerDisplayNameKey = + _lookup('NSURLUbiquitousItemContainerDisplayNameKey'); + + NSURLResourceKey get NSURLUbiquitousItemContainerDisplayNameKey => + _NSURLUbiquitousItemContainerDisplayNameKey.value; + + set NSURLUbiquitousItemContainerDisplayNameKey(NSURLResourceKey value) => + _NSURLUbiquitousItemContainerDisplayNameKey.value = value; + + /// true if the item is excluded from sync, which means it is locally on disk but won't be available on the server. An excluded item is no longer ubiquitous. (Read-write, value type boolean NSNumber + late final ffi.Pointer + _NSURLUbiquitousItemIsExcludedFromSyncKey = + _lookup('NSURLUbiquitousItemIsExcludedFromSyncKey'); + + NSURLResourceKey get NSURLUbiquitousItemIsExcludedFromSyncKey => + _NSURLUbiquitousItemIsExcludedFromSyncKey.value; + + set NSURLUbiquitousItemIsExcludedFromSyncKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsExcludedFromSyncKey.value = value; + + /// true if the ubiquitous item is shared. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsSharedKey = + _lookup('NSURLUbiquitousItemIsSharedKey'); + + NSURLResourceKey get NSURLUbiquitousItemIsSharedKey => + _NSURLUbiquitousItemIsSharedKey.value; + + set NSURLUbiquitousItemIsSharedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsSharedKey.value = value; + + /// returns the current user's role for this shared item, or nil if not shared. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousSharedItemCurrentUserRoleKey = + _lookup('NSURLUbiquitousSharedItemCurrentUserRoleKey'); + + NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserRoleKey => + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value; + + set NSURLUbiquitousSharedItemCurrentUserRoleKey(NSURLResourceKey value) => + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value = value; + + /// returns the permissions for the current user, or nil if not shared. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey = + _lookup( + 'NSURLUbiquitousSharedItemCurrentUserPermissionsKey'); + + NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserPermissionsKey => + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value; + + set NSURLUbiquitousSharedItemCurrentUserPermissionsKey( + NSURLResourceKey value) => + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value = value; + + /// returns a NSPersonNameComponents, or nil if the current user. (Read-only, value type NSPersonNameComponents) + late final ffi.Pointer + _NSURLUbiquitousSharedItemOwnerNameComponentsKey = + _lookup( + 'NSURLUbiquitousSharedItemOwnerNameComponentsKey'); + + NSURLResourceKey get NSURLUbiquitousSharedItemOwnerNameComponentsKey => + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value; + + set NSURLUbiquitousSharedItemOwnerNameComponentsKey(NSURLResourceKey value) => + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value = value; + + /// returns a NSPersonNameComponents for the most recent editor of the document, or nil if it is the current user. (Read-only, value type NSPersonNameComponents) + late final ffi.Pointer + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey = + _lookup( + 'NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey'); + + NSURLResourceKey + get NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey => + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value; + + set NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey( + NSURLResourceKey value) => + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value = value; + + /// this item has not been downloaded yet. Use startDownloadingUbiquitousItemAtURL:error: to download it. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusNotDownloaded = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusNotDownloaded'); + + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusNotDownloaded => + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value; + + set NSURLUbiquitousItemDownloadingStatusNotDownloaded( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; + + /// there is a local version of this item available. The most current version will get downloaded as soon as possible. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusDownloaded = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusDownloaded'); + + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusDownloaded => + _NSURLUbiquitousItemDownloadingStatusDownloaded.value; + + set NSURLUbiquitousItemDownloadingStatusDownloaded( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusDownloaded.value = value; + + /// there is a local version of this item and it is the most up-to-date version known to this device. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusCurrent = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusCurrent'); + + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusCurrent => + _NSURLUbiquitousItemDownloadingStatusCurrent.value; + + set NSURLUbiquitousItemDownloadingStatusCurrent( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusCurrent.value = value; + + /// the current user is the owner of this shared item. + late final ffi.Pointer + _NSURLUbiquitousSharedItemRoleOwner = + _lookup( + 'NSURLUbiquitousSharedItemRoleOwner'); + + NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleOwner => + _NSURLUbiquitousSharedItemRoleOwner.value; + + set NSURLUbiquitousSharedItemRoleOwner(NSURLUbiquitousSharedItemRole value) => + _NSURLUbiquitousSharedItemRoleOwner.value = value; + + /// the current user is a participant of this shared item. + late final ffi.Pointer + _NSURLUbiquitousSharedItemRoleParticipant = + _lookup( + 'NSURLUbiquitousSharedItemRoleParticipant'); + + NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleParticipant => + _NSURLUbiquitousSharedItemRoleParticipant.value; + + set NSURLUbiquitousSharedItemRoleParticipant( + NSURLUbiquitousSharedItemRole value) => + _NSURLUbiquitousSharedItemRoleParticipant.value = value; + + /// the current user is only allowed to read this item + late final ffi.Pointer + _NSURLUbiquitousSharedItemPermissionsReadOnly = + _lookup( + 'NSURLUbiquitousSharedItemPermissionsReadOnly'); + + NSURLUbiquitousSharedItemPermissions + get NSURLUbiquitousSharedItemPermissionsReadOnly => + _NSURLUbiquitousSharedItemPermissionsReadOnly.value; + + set NSURLUbiquitousSharedItemPermissionsReadOnly( + NSURLUbiquitousSharedItemPermissions value) => + _NSURLUbiquitousSharedItemPermissionsReadOnly.value = value; + + /// the current user is allowed to both read and write this item + late final ffi.Pointer + _NSURLUbiquitousSharedItemPermissionsReadWrite = + _lookup( + 'NSURLUbiquitousSharedItemPermissionsReadWrite'); + + NSURLUbiquitousSharedItemPermissions + get NSURLUbiquitousSharedItemPermissionsReadWrite => + _NSURLUbiquitousSharedItemPermissionsReadWrite.value; + + set NSURLUbiquitousSharedItemPermissionsReadWrite( + NSURLUbiquitousSharedItemPermissions value) => + _NSURLUbiquitousSharedItemPermissionsReadWrite.value = value; + + late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); + late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); + instancetype _objc_msgSend_314( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer value, + ) { + return __objc_msgSend_314( + obj, + sel, + name, + value, + ); + } + + late final __objc_msgSend_314Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_queryItemWithName_value_1 = + _registerName1("queryItemWithName:value:"); + late final _sel_value1 = _registerName1("value"); + late final _class_NSURLComponents1 = _getClass1("NSURLComponents"); + late final _sel_initWithURL_resolvingAgainstBaseURL_1 = + _registerName1("initWithURL:resolvingAgainstBaseURL:"); + late final _sel_componentsWithURL_resolvingAgainstBaseURL_1 = + _registerName1("componentsWithURL:resolvingAgainstBaseURL:"); + late final _sel_componentsWithString_1 = + _registerName1("componentsWithString:"); + late final _sel_URLRelativeToURL_1 = _registerName1("URLRelativeToURL:"); + ffi.Pointer _objc_msgSend_315( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_315( + obj, + sel, + baseURL, + ); + } + + late final __objc_msgSend_315Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setScheme_1 = _registerName1("setScheme:"); + late final _sel_setUser_1 = _registerName1("setUser:"); + late final _sel_setPassword_1 = _registerName1("setPassword:"); + late final _sel_setHost_1 = _registerName1("setHost:"); + late final _sel_setPort_1 = _registerName1("setPort:"); + late final _sel_setPath_1 = _registerName1("setPath:"); + late final _sel_setQuery_1 = _registerName1("setQuery:"); + late final _sel_setFragment_1 = _registerName1("setFragment:"); + late final _sel_percentEncodedUser1 = _registerName1("percentEncodedUser"); + late final _sel_setPercentEncodedUser_1 = + _registerName1("setPercentEncodedUser:"); + late final _sel_percentEncodedPassword1 = + _registerName1("percentEncodedPassword"); + late final _sel_setPercentEncodedPassword_1 = + _registerName1("setPercentEncodedPassword:"); + late final _sel_percentEncodedHost1 = _registerName1("percentEncodedHost"); + late final _sel_setPercentEncodedHost_1 = + _registerName1("setPercentEncodedHost:"); + late final _sel_percentEncodedPath1 = _registerName1("percentEncodedPath"); + late final _sel_setPercentEncodedPath_1 = + _registerName1("setPercentEncodedPath:"); + late final _sel_percentEncodedQuery1 = _registerName1("percentEncodedQuery"); + late final _sel_setPercentEncodedQuery_1 = + _registerName1("setPercentEncodedQuery:"); + late final _sel_percentEncodedFragment1 = + _registerName1("percentEncodedFragment"); + late final _sel_setPercentEncodedFragment_1 = + _registerName1("setPercentEncodedFragment:"); + late final _sel_rangeOfScheme1 = _registerName1("rangeOfScheme"); + NSRange _objc_msgSend_316( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_316( + obj, + sel, + ); + } + + late final __objc_msgSend_316Ptr = _lookup< + ffi.NativeFunction< + NSRange Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_rangeOfUser1 = _registerName1("rangeOfUser"); + late final _sel_rangeOfPassword1 = _registerName1("rangeOfPassword"); + late final _sel_rangeOfHost1 = _registerName1("rangeOfHost"); + late final _sel_rangeOfPort1 = _registerName1("rangeOfPort"); + late final _sel_rangeOfPath1 = _registerName1("rangeOfPath"); + late final _sel_rangeOfQuery1 = _registerName1("rangeOfQuery"); + late final _sel_rangeOfFragment1 = _registerName1("rangeOfFragment"); + late final _sel_queryItems1 = _registerName1("queryItems"); + late final _sel_setQueryItems_1 = _registerName1("setQueryItems:"); + late final _sel_percentEncodedQueryItems1 = + _registerName1("percentEncodedQueryItems"); + late final _sel_setPercentEncodedQueryItems_1 = + _registerName1("setPercentEncodedQueryItems:"); + late final _class_NSFileSecurity1 = _getClass1("NSFileSecurity"); + + /// How much time is probably left in the operation, as an NSNumber containing a number of seconds. + late final ffi.Pointer + _NSProgressEstimatedTimeRemainingKey = + _lookup('NSProgressEstimatedTimeRemainingKey'); + + NSProgressUserInfoKey1 get NSProgressEstimatedTimeRemainingKey => + _NSProgressEstimatedTimeRemainingKey.value; + + set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey1 value) => + _NSProgressEstimatedTimeRemainingKey.value = value; + + /// How fast data is being processed, as an NSNumber containing bytes per second. + late final ffi.Pointer _NSProgressThroughputKey = + _lookup('NSProgressThroughputKey'); + + NSProgressUserInfoKey1 get NSProgressThroughputKey => + _NSProgressThroughputKey.value; + + set NSProgressThroughputKey(NSProgressUserInfoKey1 value) => + _NSProgressThroughputKey.value = value; + + /// The value for the kind property that indicates that the work being done is one of the kind of file operations listed below. NSProgress of this kind is assumed to use bytes as the unit of work being done and the default implementation of -localizedDescription takes advantage of that to return more specific text than it could otherwise. The NSProgressFileTotalCountKey and NSProgressFileCompletedCountKey keys in the userInfo dictionary are used for the overall count of files. + late final ffi.Pointer _NSProgressKindFile = + _lookup('NSProgressKindFile'); + + NSProgressKind1 get NSProgressKindFile => _NSProgressKindFile.value; + + set NSProgressKindFile(NSProgressKind1 value) => + _NSProgressKindFile.value = value; + + /// A user info dictionary key, for an entry that is required when the value for the kind property is NSProgressKindFile. The value must be one of the strings listed in the next section. The default implementations of of -localizedDescription and -localizedItemDescription use this value to determine the text that they return. + late final ffi.Pointer + _NSProgressFileOperationKindKey = + _lookup('NSProgressFileOperationKindKey'); + + NSProgressUserInfoKey1 get NSProgressFileOperationKindKey => + _NSProgressFileOperationKindKey.value; + + set NSProgressFileOperationKindKey(NSProgressUserInfoKey1 value) => + _NSProgressFileOperationKindKey.value = value; + + /// Possible values for NSProgressFileOperationKindKey entries. + late final ffi.Pointer + _NSProgressFileOperationKindDownloading = + _lookup( + 'NSProgressFileOperationKindDownloading'); + + NSProgressFileOperationKind1 get NSProgressFileOperationKindDownloading => + _NSProgressFileOperationKindDownloading.value; + + set NSProgressFileOperationKindDownloading( + NSProgressFileOperationKind1 value) => + _NSProgressFileOperationKindDownloading.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindDecompressingAfterDownloading = + _lookup( + 'NSProgressFileOperationKindDecompressingAfterDownloading'); + + NSProgressFileOperationKind1 + get NSProgressFileOperationKindDecompressingAfterDownloading => + _NSProgressFileOperationKindDecompressingAfterDownloading.value; + + set NSProgressFileOperationKindDecompressingAfterDownloading( + NSProgressFileOperationKind1 value) => + _NSProgressFileOperationKindDecompressingAfterDownloading.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindReceiving = + _lookup( + 'NSProgressFileOperationKindReceiving'); + + NSProgressFileOperationKind1 get NSProgressFileOperationKindReceiving => + _NSProgressFileOperationKindReceiving.value; + + set NSProgressFileOperationKindReceiving( + NSProgressFileOperationKind1 value) => + _NSProgressFileOperationKindReceiving.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindCopying = + _lookup( + 'NSProgressFileOperationKindCopying'); + + NSProgressFileOperationKind1 get NSProgressFileOperationKindCopying => + _NSProgressFileOperationKindCopying.value; + + set NSProgressFileOperationKindCopying(NSProgressFileOperationKind1 value) => + _NSProgressFileOperationKindCopying.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindUploading = + _lookup( + 'NSProgressFileOperationKindUploading'); + + NSProgressFileOperationKind1 get NSProgressFileOperationKindUploading => + _NSProgressFileOperationKindUploading.value; + + set NSProgressFileOperationKindUploading( + NSProgressFileOperationKind1 value) => + _NSProgressFileOperationKindUploading.value = value; + + /// A user info dictionary key. The value must be an NSURL identifying the item on which progress is being made. This is required for any NSProgress that is published using -publish to be reported to subscribers registered with +addSubscriberForFileURL:withPublishingHandler:. + late final ffi.Pointer _NSProgressFileURLKey = + _lookup('NSProgressFileURLKey'); + + NSProgressUserInfoKey1 get NSProgressFileURLKey => + _NSProgressFileURLKey.value; + + set NSProgressFileURLKey(NSProgressUserInfoKey1 value) => + _NSProgressFileURLKey.value = value; + + /// User info dictionary keys. The values must be NSNumbers containing integers. These entries are optional but if they are both present then the default implementation of -localizedAdditionalDescription uses them to determine the text that it returns. + late final ffi.Pointer _NSProgressFileTotalCountKey = + _lookup('NSProgressFileTotalCountKey'); + + NSProgressUserInfoKey1 get NSProgressFileTotalCountKey => + _NSProgressFileTotalCountKey.value; + + set NSProgressFileTotalCountKey(NSProgressUserInfoKey1 value) => + _NSProgressFileTotalCountKey.value = value; + + late final ffi.Pointer + _NSProgressFileCompletedCountKey = + _lookup('NSProgressFileCompletedCountKey'); + + NSProgressUserInfoKey1 get NSProgressFileCompletedCountKey => + _NSProgressFileCompletedCountKey.value; + + set NSProgressFileCompletedCountKey(NSProgressUserInfoKey1 value) => + _NSProgressFileCompletedCountKey.value = value; + + /// User info dictionary keys. The value for the first entry must be an NSImage, typically an icon. The value for the second entry must be an NSValue containing an NSRect, in screen coordinates, locating the image where it initially appears on the screen. + late final ffi.Pointer + _NSProgressFileAnimationImageKey = + _lookup('NSProgressFileAnimationImageKey'); + + NSProgressUserInfoKey1 get NSProgressFileAnimationImageKey => + _NSProgressFileAnimationImageKey.value; + + set NSProgressFileAnimationImageKey(NSProgressUserInfoKey1 value) => + _NSProgressFileAnimationImageKey.value = value; + + late final ffi.Pointer + _NSProgressFileAnimationImageOriginalRectKey = + _lookup( + 'NSProgressFileAnimationImageOriginalRectKey'); + + NSProgressUserInfoKey1 get NSProgressFileAnimationImageOriginalRectKey => + _NSProgressFileAnimationImageOriginalRectKey.value; + + set NSProgressFileAnimationImageOriginalRectKey( + NSProgressUserInfoKey1 value) => + _NSProgressFileAnimationImageOriginalRectKey.value = value; + + /// A user info dictionary key. The value must be an NSImage containing an icon. This entry is optional but, if it is present, the Finder will use it to show the icon of a file while progress is being made on that file. For example, the App Store uses this to specify an icon for an application being downloaded before the icon can be gotten from the application bundle itself. + late final ffi.Pointer _NSProgressFileIconKey = + _lookup('NSProgressFileIconKey'); + + NSProgressUserInfoKey1 get NSProgressFileIconKey => + _NSProgressFileIconKey.value; + + set NSProgressFileIconKey(NSProgressUserInfoKey1 value) => + _NSProgressFileIconKey.value = value; + + late final _class_NSHTTPURLResponse1 = _getClass1("NSHTTPURLResponse"); + late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_1 = + _registerName1("initWithURL:statusCode:HTTPVersion:headerFields:"); + instancetype _objc_msgSend_317( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int statusCode, + ffi.Pointer HTTPVersion, + ffi.Pointer headerFields, + ) { + return __objc_msgSend_317( + obj, + sel, + url, + statusCode, + HTTPVersion, + headerFields, + ); + } + + late final __objc_msgSend_317Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_statusCode1 = _registerName1("statusCode"); + late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); + late final _sel_localizedStringForStatusCode_1 = + _registerName1("localizedStringForStatusCode:"); + ffi.Pointer _objc_msgSend_318( + ffi.Pointer obj, + ffi.Pointer sel, + int statusCode, + ) { + return __objc_msgSend_318( + obj, + sel, + statusCode, + ); + } + + late final __objc_msgSend_318Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + /// ! + /// @const NSHTTPCookieManagerAcceptPolicyChangedNotification + /// @discussion Name of notification that should be posted to the + /// distributed notification center whenever the accept cookies + /// preference is changed + late final ffi.Pointer + _NSHTTPCookieManagerAcceptPolicyChangedNotification = + _lookup( + 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); + + NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; + + set NSHTTPCookieManagerAcceptPolicyChangedNotification( + NSNotificationName value) => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; + + /// ! + /// @const NSHTTPCookieManagerCookiesChangedNotification + /// @abstract Notification sent when the set of cookies changes + late final ffi.Pointer + _NSHTTPCookieManagerCookiesChangedNotification = + _lookup( + 'NSHTTPCookieManagerCookiesChangedNotification'); + + NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => + _NSHTTPCookieManagerCookiesChangedNotification.value; + + set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => + _NSHTTPCookieManagerCookiesChangedNotification.value = value; + + late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); + late final _sel_blockOperationWithBlock_1 = + _registerName1("blockOperationWithBlock:"); + instancetype _objc_msgSend_319( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_319( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_319Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_addExecutionBlock_1 = _registerName1("addExecutionBlock:"); + late final _sel_executionBlocks1 = _registerName1("executionBlocks"); + late final _class_NSInvocationOperation1 = + _getClass1("NSInvocationOperation"); + late final _sel_initWithTarget_selector_object_1 = + _registerName1("initWithTarget:selector:object:"); + instancetype _objc_msgSend_320( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer sel1, + ffi.Pointer arg, + ) { + return __objc_msgSend_320( + obj, + sel, + target, + sel1, + arg, + ); + } + + late final __objc_msgSend_320Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); + instancetype _objc_msgSend_321( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer inv, + ) { + return __objc_msgSend_321( + obj, + sel, + inv, + ); + } + + late final __objc_msgSend_321Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_invocation1 = _registerName1("invocation"); + ffi.Pointer _objc_msgSend_322( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_322( + obj, + sel, + ); + } + + late final __objc_msgSend_322Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_result1 = _registerName1("result"); + late final ffi.Pointer + _NSInvocationOperationVoidResultException = + _lookup('NSInvocationOperationVoidResultException'); + + NSExceptionName get NSInvocationOperationVoidResultException => + _NSInvocationOperationVoidResultException.value; + + set NSInvocationOperationVoidResultException(NSExceptionName value) => + _NSInvocationOperationVoidResultException.value = value; + + late final ffi.Pointer + _NSInvocationOperationCancelledException = + _lookup('NSInvocationOperationCancelledException'); + + NSExceptionName get NSInvocationOperationCancelledException => + _NSInvocationOperationCancelledException.value; + + set NSInvocationOperationCancelledException(NSExceptionName value) => + _NSInvocationOperationCancelledException.value = value; + + late final ffi.Pointer + _NSOperationQueueDefaultMaxConcurrentOperationCount = + _lookup('NSOperationQueueDefaultMaxConcurrentOperationCount'); + + int get NSOperationQueueDefaultMaxConcurrentOperationCount => + _NSOperationQueueDefaultMaxConcurrentOperationCount.value; + + set NSOperationQueueDefaultMaxConcurrentOperationCount(int value) => + _NSOperationQueueDefaultMaxConcurrentOperationCount.value = value; + + /// Predefined domain for errors from most AppKit and Foundation APIs. + late final ffi.Pointer _NSCocoaErrorDomain = + _lookup('NSCocoaErrorDomain'); + + NSErrorDomain get NSCocoaErrorDomain => _NSCocoaErrorDomain.value; + + set NSCocoaErrorDomain(NSErrorDomain value) => + _NSCocoaErrorDomain.value = value; + + /// Other predefined domains; value of "code" will correspond to preexisting values in these domains. + late final ffi.Pointer _NSPOSIXErrorDomain = + _lookup('NSPOSIXErrorDomain'); + + NSErrorDomain get NSPOSIXErrorDomain => _NSPOSIXErrorDomain.value; + + set NSPOSIXErrorDomain(NSErrorDomain value) => + _NSPOSIXErrorDomain.value = value; + + late final ffi.Pointer _NSOSStatusErrorDomain = + _lookup('NSOSStatusErrorDomain'); + + NSErrorDomain get NSOSStatusErrorDomain => _NSOSStatusErrorDomain.value; + + set NSOSStatusErrorDomain(NSErrorDomain value) => + _NSOSStatusErrorDomain.value = value; + + late final ffi.Pointer _NSMachErrorDomain = + _lookup('NSMachErrorDomain'); + + NSErrorDomain get NSMachErrorDomain => _NSMachErrorDomain.value; + + set NSMachErrorDomain(NSErrorDomain value) => + _NSMachErrorDomain.value = value; + + /// Key in userInfo. A recommended standard way to embed NSErrors from underlying calls. The value of this key should be an NSError. + late final ffi.Pointer _NSUnderlyingErrorKey = + _lookup('NSUnderlyingErrorKey'); + + NSErrorUserInfoKey get NSUnderlyingErrorKey => _NSUnderlyingErrorKey.value; + + set NSUnderlyingErrorKey(NSErrorUserInfoKey value) => + _NSUnderlyingErrorKey.value = value; + + /// Key in userInfo. A recommended standard way to embed a list of several NSErrors from underlying calls. The value of this key should be an NSArray of NSError. This value is independent from the value of `NSUnderlyingErrorKey` - neither, one, or both may be set. + late final ffi.Pointer _NSMultipleUnderlyingErrorsKey = + _lookup('NSMultipleUnderlyingErrorsKey'); + + NSErrorUserInfoKey get NSMultipleUnderlyingErrorsKey => + _NSMultipleUnderlyingErrorsKey.value; + + set NSMultipleUnderlyingErrorsKey(NSErrorUserInfoKey value) => + _NSMultipleUnderlyingErrorsKey.value = value; + + /// NSString, a complete sentence (or more) describing ideally both what failed and why it failed. + late final ffi.Pointer _NSLocalizedDescriptionKey = + _lookup('NSLocalizedDescriptionKey'); + + NSErrorUserInfoKey get NSLocalizedDescriptionKey => + _NSLocalizedDescriptionKey.value; + + set NSLocalizedDescriptionKey(NSErrorUserInfoKey value) => + _NSLocalizedDescriptionKey.value = value; + + /// NSString, a complete sentence (or more) describing why the operation failed. + late final ffi.Pointer _NSLocalizedFailureReasonErrorKey = + _lookup('NSLocalizedFailureReasonErrorKey'); + + NSErrorUserInfoKey get NSLocalizedFailureReasonErrorKey => + _NSLocalizedFailureReasonErrorKey.value; + + set NSLocalizedFailureReasonErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedFailureReasonErrorKey.value = value; + + /// NSString, a complete sentence (or more) describing what the user can do to fix the problem. + late final ffi.Pointer + _NSLocalizedRecoverySuggestionErrorKey = + _lookup('NSLocalizedRecoverySuggestionErrorKey'); + + NSErrorUserInfoKey get NSLocalizedRecoverySuggestionErrorKey => + _NSLocalizedRecoverySuggestionErrorKey.value; + + set NSLocalizedRecoverySuggestionErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedRecoverySuggestionErrorKey.value = value; + + /// NSArray of NSStrings corresponding to button titles. + late final ffi.Pointer + _NSLocalizedRecoveryOptionsErrorKey = + _lookup('NSLocalizedRecoveryOptionsErrorKey'); + + NSErrorUserInfoKey get NSLocalizedRecoveryOptionsErrorKey => + _NSLocalizedRecoveryOptionsErrorKey.value; + + set NSLocalizedRecoveryOptionsErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedRecoveryOptionsErrorKey.value = value; + + /// Instance of a subclass of NSObject that conforms to the NSErrorRecoveryAttempting informal protocol + late final ffi.Pointer _NSRecoveryAttempterErrorKey = + _lookup('NSRecoveryAttempterErrorKey'); + + NSErrorUserInfoKey get NSRecoveryAttempterErrorKey => + _NSRecoveryAttempterErrorKey.value; + + set NSRecoveryAttempterErrorKey(NSErrorUserInfoKey value) => + _NSRecoveryAttempterErrorKey.value = value; + + /// NSString containing a help anchor + late final ffi.Pointer _NSHelpAnchorErrorKey = + _lookup('NSHelpAnchorErrorKey'); + + NSErrorUserInfoKey get NSHelpAnchorErrorKey => _NSHelpAnchorErrorKey.value; + + set NSHelpAnchorErrorKey(NSErrorUserInfoKey value) => + _NSHelpAnchorErrorKey.value = value; + + /// NSString. This provides a string which will be shown when constructing the debugDescription of the NSError, to be used when debugging or when formatting the error with %@. This string will never be used in localizedDescription, so will not be shown to the user. + late final ffi.Pointer _NSDebugDescriptionErrorKey = + _lookup('NSDebugDescriptionErrorKey'); + + NSErrorUserInfoKey get NSDebugDescriptionErrorKey => + _NSDebugDescriptionErrorKey.value; + + set NSDebugDescriptionErrorKey(NSErrorUserInfoKey value) => + _NSDebugDescriptionErrorKey.value = value; + + /// NSString, a complete sentence (or more) describing what failed. Setting a value for this key in userInfo dictionary of errors received from framework APIs is a good way to customize and fine tune the localizedDescription of an NSError. As an example, for Foundation error code NSFileWriteOutOfSpaceError, setting the value of this key to "The image library could not be saved." will allow the localizedDescription of the error to come out as "The image library could not be saved. The volume Macintosh HD is out of space." rather than the default (say) “You can't save the file ImgDatabaseV2 because the volume Macintosh HD is out of space." + late final ffi.Pointer _NSLocalizedFailureErrorKey = + _lookup('NSLocalizedFailureErrorKey'); + + NSErrorUserInfoKey get NSLocalizedFailureErrorKey => + _NSLocalizedFailureErrorKey.value; + + set NSLocalizedFailureErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedFailureErrorKey.value = value; + + /// NSNumber containing NSStringEncoding + late final ffi.Pointer _NSStringEncodingErrorKey = + _lookup('NSStringEncodingErrorKey'); + + NSErrorUserInfoKey get NSStringEncodingErrorKey => + _NSStringEncodingErrorKey.value; + + set NSStringEncodingErrorKey(NSErrorUserInfoKey value) => + _NSStringEncodingErrorKey.value = value; + + /// NSURL + late final ffi.Pointer _NSURLErrorKey = + _lookup('NSURLErrorKey'); + + NSErrorUserInfoKey get NSURLErrorKey => _NSURLErrorKey.value; + + set NSURLErrorKey(NSErrorUserInfoKey value) => _NSURLErrorKey.value = value; + + /// NSString + late final ffi.Pointer _NSFilePathErrorKey = + _lookup('NSFilePathErrorKey'); + + NSErrorUserInfoKey get NSFilePathErrorKey => _NSFilePathErrorKey.value; + + set NSFilePathErrorKey(NSErrorUserInfoKey value) => + _NSFilePathErrorKey.value = value; + + /// Is this an error handle? + /// + /// Requires there to be a current isolate. + bool Dart_IsError( + Object handle, + ) { + return _Dart_IsError( + handle, + ); + } + + late final _Dart_IsErrorPtr = + _lookup>( + 'Dart_IsError'); + late final _Dart_IsError = + _Dart_IsErrorPtr.asFunction(); + + /// Is this an api error handle? + /// + /// Api error handles are produced when an api function is misused. + /// This happens when a Dart embedding api function is called with + /// invalid arguments or in an invalid context. + /// + /// Requires there to be a current isolate. + bool Dart_IsApiError( + Object handle, + ) { + return _Dart_IsApiError( + handle, + ); + } + + late final _Dart_IsApiErrorPtr = + _lookup>( + 'Dart_IsApiError'); + late final _Dart_IsApiError = + _Dart_IsApiErrorPtr.asFunction(); + + /// Is this an unhandled exception error handle? + /// + /// Unhandled exception error handles are produced when, during the + /// execution of Dart code, an exception is thrown but not caught. + /// This can occur in any function which triggers the execution of Dart + /// code. + /// + /// See Dart_ErrorGetException and Dart_ErrorGetStackTrace. + /// + /// Requires there to be a current isolate. + bool Dart_IsUnhandledExceptionError( + Object handle, + ) { + return _Dart_IsUnhandledExceptionError( + handle, + ); + } + + late final _Dart_IsUnhandledExceptionErrorPtr = + _lookup>( + 'Dart_IsUnhandledExceptionError'); + late final _Dart_IsUnhandledExceptionError = + _Dart_IsUnhandledExceptionErrorPtr.asFunction(); + + /// Is this a compilation error handle? + /// + /// Compilation error handles are produced when, during the execution + /// of Dart code, a compile-time error occurs. This can occur in any + /// function which triggers the execution of Dart code. + /// + /// Requires there to be a current isolate. + bool Dart_IsCompilationError( + Object handle, + ) { + return _Dart_IsCompilationError( + handle, + ); + } + + late final _Dart_IsCompilationErrorPtr = + _lookup>( + 'Dart_IsCompilationError'); + late final _Dart_IsCompilationError = + _Dart_IsCompilationErrorPtr.asFunction(); + + /// Is this a fatal error handle? + /// + /// Fatal error handles are produced when the system wants to shut down + /// the current isolate. + /// + /// Requires there to be a current isolate. + bool Dart_IsFatalError( + Object handle, + ) { + return _Dart_IsFatalError( + handle, + ); + } + + late final _Dart_IsFatalErrorPtr = + _lookup>( + 'Dart_IsFatalError'); + late final _Dart_IsFatalError = + _Dart_IsFatalErrorPtr.asFunction(); + + /// Gets the error message from an error handle. + /// + /// Requires there to be a current isolate. + /// + /// \return A C string containing an error message if the handle is + /// error. An empty C string ("") if the handle is valid. This C + /// String is scope allocated and is only valid until the next call + /// to Dart_ExitScope. + ffi.Pointer Dart_GetError( + Object handle, + ) { + return _Dart_GetError( + handle, + ); + } + + late final _Dart_GetErrorPtr = + _lookup Function(ffi.Handle)>>( + 'Dart_GetError'); + late final _Dart_GetError = + _Dart_GetErrorPtr.asFunction Function(Object)>(); + + /// Is this an error handle for an unhandled exception? + bool Dart_ErrorHasException( + Object handle, + ) { + return _Dart_ErrorHasException( + handle, + ); + } + + late final _Dart_ErrorHasExceptionPtr = + _lookup>( + 'Dart_ErrorHasException'); + late final _Dart_ErrorHasException = + _Dart_ErrorHasExceptionPtr.asFunction(); + + /// Gets the exception Object from an unhandled exception error handle. + Object Dart_ErrorGetException( + Object handle, + ) { + return _Dart_ErrorGetException( + handle, + ); + } + + late final _Dart_ErrorGetExceptionPtr = + _lookup>( + 'Dart_ErrorGetException'); + late final _Dart_ErrorGetException = + _Dart_ErrorGetExceptionPtr.asFunction(); + + /// Gets the stack trace Object from an unhandled exception error handle. + Object Dart_ErrorGetStackTrace( + Object handle, + ) { + return _Dart_ErrorGetStackTrace( + handle, + ); + } + + late final _Dart_ErrorGetStackTracePtr = + _lookup>( + 'Dart_ErrorGetStackTrace'); + late final _Dart_ErrorGetStackTrace = + _Dart_ErrorGetStackTracePtr.asFunction(); + + /// Produces an api error handle with the provided error message. + /// + /// Requires there to be a current isolate. + /// + /// \param error the error message. + Object Dart_NewApiError( + ffi.Pointer error, + ) { + return _Dart_NewApiError( + error, + ); + } + + late final _Dart_NewApiErrorPtr = + _lookup)>>( + 'Dart_NewApiError'); + late final _Dart_NewApiError = + _Dart_NewApiErrorPtr.asFunction)>(); + + Object Dart_NewCompilationError( + ffi.Pointer error, + ) { + return _Dart_NewCompilationError( + error, + ); + } + + late final _Dart_NewCompilationErrorPtr = + _lookup)>>( + 'Dart_NewCompilationError'); + late final _Dart_NewCompilationError = _Dart_NewCompilationErrorPtr + .asFunction)>(); + + /// Produces a new unhandled exception error handle. + /// + /// Requires there to be a current isolate. + /// + /// \param exception An instance of a Dart object to be thrown or + /// an ApiError or CompilationError handle. + /// When an ApiError or CompilationError handle is passed in + /// a string object of the error message is created and it becomes + /// the Dart object to be thrown. + Object Dart_NewUnhandledExceptionError( + Object exception, + ) { + return _Dart_NewUnhandledExceptionError( + exception, + ); + } + + late final _Dart_NewUnhandledExceptionErrorPtr = + _lookup>( + 'Dart_NewUnhandledExceptionError'); + late final _Dart_NewUnhandledExceptionError = + _Dart_NewUnhandledExceptionErrorPtr.asFunction(); + + /// Propagates an error. + /// + /// If the provided handle is an unhandled exception error, this + /// function will cause the unhandled exception to be rethrown. This + /// will proceed in the standard way, walking up Dart frames until an + /// appropriate 'catch' block is found, executing 'finally' blocks, + /// etc. + /// + /// If the error is not an unhandled exception error, we will unwind + /// the stack to the next C frame. Intervening Dart frames will be + /// discarded; specifically, 'finally' blocks will not execute. This + /// is the standard way that compilation errors (and the like) are + /// handled by the Dart runtime. + /// + /// In either case, when an error is propagated any current scopes + /// created by Dart_EnterScope will be exited. + /// + /// See the additional discussion under "Propagating Errors" at the + /// beginning of this file. + /// + /// \param An error handle (See Dart_IsError) + /// + /// \return On success, this function does not return. On failure, the + /// process is terminated. + void Dart_PropagateError( + Object handle, + ) { + return _Dart_PropagateError( + handle, + ); + } + + late final _Dart_PropagateErrorPtr = + _lookup>( + 'Dart_PropagateError'); + late final _Dart_PropagateError = + _Dart_PropagateErrorPtr.asFunction(); + + /// Converts an object to a string. + /// + /// May generate an unhandled exception error. + /// + /// \return The converted string if no error occurs during + /// the conversion. If an error does occur, an error handle is + /// returned. + Object Dart_ToString( + Object object, + ) { + return _Dart_ToString( + object, + ); + } + + late final _Dart_ToStringPtr = + _lookup>( + 'Dart_ToString'); + late final _Dart_ToString = + _Dart_ToStringPtr.asFunction(); + + /// Checks to see if two handles refer to identically equal objects. + /// + /// If both handles refer to instances, this is equivalent to using the top-level + /// function identical() from dart:core. Otherwise, returns whether the two + /// argument handles refer to the same object. + /// + /// \param obj1 An object to be compared. + /// \param obj2 An object to be compared. + /// + /// \return True if the objects are identically equal. False otherwise. + bool Dart_IdentityEquals( + Object obj1, + Object obj2, + ) { + return _Dart_IdentityEquals( + obj1, + obj2, + ); + } + + late final _Dart_IdentityEqualsPtr = + _lookup>( + 'Dart_IdentityEquals'); + late final _Dart_IdentityEquals = + _Dart_IdentityEqualsPtr.asFunction(); + + /// Allocates a handle in the current scope from a persistent handle. + Object Dart_HandleFromPersistent( + Object object, + ) { + return _Dart_HandleFromPersistent( + object, + ); + } + + late final _Dart_HandleFromPersistentPtr = + _lookup>( + 'Dart_HandleFromPersistent'); + late final _Dart_HandleFromPersistent = + _Dart_HandleFromPersistentPtr.asFunction(); + + /// Allocates a handle in the current scope from a weak persistent handle. + /// + /// This will be a handle to Dart_Null if the object has been garbage collected. + Object Dart_HandleFromWeakPersistent( + Dart_WeakPersistentHandle object, + ) { + return _Dart_HandleFromWeakPersistent( + object, + ); + } + + late final _Dart_HandleFromWeakPersistentPtr = _lookup< + ffi.NativeFunction>( + 'Dart_HandleFromWeakPersistent'); + late final _Dart_HandleFromWeakPersistent = _Dart_HandleFromWeakPersistentPtr + .asFunction(); + + /// Allocates a persistent handle for an object. + /// + /// This handle has the lifetime of the current isolate unless it is + /// explicitly deallocated by calling Dart_DeletePersistentHandle. + /// + /// Requires there to be a current isolate. + Object Dart_NewPersistentHandle( + Object object, + ) { + return _Dart_NewPersistentHandle( + object, + ); + } + + late final _Dart_NewPersistentHandlePtr = + _lookup>( + 'Dart_NewPersistentHandle'); + late final _Dart_NewPersistentHandle = + _Dart_NewPersistentHandlePtr.asFunction(); + + /// Assign value of local handle to a persistent handle. + /// + /// Requires there to be a current isolate. + /// + /// \param obj1 A persistent handle whose value needs to be set. + /// \param obj2 An object whose value needs to be set to the persistent handle. + /// + /// \return Success if the persistent handle was set + /// Otherwise, returns an error. + void Dart_SetPersistentHandle( + Object obj1, + Object obj2, + ) { + return _Dart_SetPersistentHandle( + obj1, + obj2, + ); + } + + late final _Dart_SetPersistentHandlePtr = + _lookup>( + 'Dart_SetPersistentHandle'); + late final _Dart_SetPersistentHandle = + _Dart_SetPersistentHandlePtr.asFunction(); + + /// Deallocates a persistent handle. + /// + /// Requires there to be a current isolate group. + void Dart_DeletePersistentHandle( + Object object, + ) { + return _Dart_DeletePersistentHandle( + object, + ); + } + + late final _Dart_DeletePersistentHandlePtr = + _lookup>( + 'Dart_DeletePersistentHandle'); + late final _Dart_DeletePersistentHandle = + _Dart_DeletePersistentHandlePtr.asFunction(); + + /// Allocates a weak persistent handle for an object. + /// + /// This handle has the lifetime of the current isolate. The handle can also be + /// explicitly deallocated by calling Dart_DeleteWeakPersistentHandle. + /// + /// If the object becomes unreachable the callback is invoked with the peer as + /// argument. The callback can be executed on any thread, will have a current + /// isolate group, but will not have a current isolate. The callback can only + /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. This + /// gives the embedder the ability to cleanup data associated with the object. + /// The handle will point to the Dart_Null object after the finalizer has been + /// run. It is illegal to call into the VM with any other Dart_* functions from + /// the callback. If the handle is deleted before the object becomes + /// unreachable, the callback is never invoked. + /// + /// Requires there to be a current isolate. + /// + /// \param object An object with identity. + /// \param peer A pointer to a native object or NULL. This value is + /// provided to callback when it is invoked. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A function pointer that will be invoked sometime + /// after the object is garbage collected, unless the handle has been deleted. + /// A valid callback needs to be specified it cannot be NULL. + /// + /// \return The weak persistent handle or NULL. NULL is returned in case of bad + /// parameters. + Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle( + Object object, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewWeakPersistentHandle( + object, + peer, + external_allocation_size, + callback, + ); + } + + late final _Dart_NewWeakPersistentHandlePtr = _lookup< + ffi.NativeFunction< + Dart_WeakPersistentHandle Function( + ffi.Handle, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewWeakPersistentHandle'); + late final _Dart_NewWeakPersistentHandle = + _Dart_NewWeakPersistentHandlePtr.asFunction< + Dart_WeakPersistentHandle Function( + Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); + + /// Deletes the given weak persistent [object] handle. + /// + /// Requires there to be a current isolate group. + void Dart_DeleteWeakPersistentHandle( + Dart_WeakPersistentHandle object, + ) { + return _Dart_DeleteWeakPersistentHandle( + object, + ); + } + + late final _Dart_DeleteWeakPersistentHandlePtr = + _lookup>( + 'Dart_DeleteWeakPersistentHandle'); + late final _Dart_DeleteWeakPersistentHandle = + _Dart_DeleteWeakPersistentHandlePtr.asFunction< + void Function(Dart_WeakPersistentHandle)>(); + + /// Updates the external memory size for the given weak persistent handle. + /// + /// May trigger garbage collection. + void Dart_UpdateExternalSize( + Dart_WeakPersistentHandle object, + int external_allocation_size, + ) { + return _Dart_UpdateExternalSize( + object, + external_allocation_size, + ); + } + + late final _Dart_UpdateExternalSizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(Dart_WeakPersistentHandle, + ffi.IntPtr)>>('Dart_UpdateExternalSize'); + late final _Dart_UpdateExternalSize = _Dart_UpdateExternalSizePtr.asFunction< + void Function(Dart_WeakPersistentHandle, int)>(); + + /// Allocates a finalizable handle for an object. + /// + /// This handle has the lifetime of the current isolate group unless the object + /// pointed to by the handle is garbage collected, in this case the VM + /// automatically deletes the handle after invoking the callback associated + /// with the handle. The handle can also be explicitly deallocated by + /// calling Dart_DeleteFinalizableHandle. + /// + /// If the object becomes unreachable the callback is invoked with the + /// the peer as argument. The callback can be executed on any thread, will have + /// an isolate group, but will not have a current isolate. The callback can only + /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. + /// This gives the embedder the ability to cleanup data associated with the + /// object and clear out any cached references to the handle. All references to + /// this handle after the callback will be invalid. It is illegal to call into + /// the VM with any other Dart_* functions from the callback. If the handle is + /// deleted before the object becomes unreachable, the callback is never + /// invoked. + /// + /// Requires there to be a current isolate. + /// + /// \param object An object with identity. + /// \param peer A pointer to a native object or NULL. This value is + /// provided to callback when it is invoked. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A function pointer that will be invoked sometime + /// after the object is garbage collected, unless the handle has been deleted. + /// A valid callback needs to be specified it cannot be NULL. + /// + /// \return The finalizable handle or NULL. NULL is returned in case of bad + /// parameters. + Dart_FinalizableHandle Dart_NewFinalizableHandle( + Object object, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewFinalizableHandle( + object, + peer, + external_allocation_size, + callback, + ); + } + + late final _Dart_NewFinalizableHandlePtr = _lookup< + ffi.NativeFunction< + Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, + ffi.IntPtr, Dart_HandleFinalizer)>>('Dart_NewFinalizableHandle'); + late final _Dart_NewFinalizableHandle = + _Dart_NewFinalizableHandlePtr.asFunction< + Dart_FinalizableHandle Function( + Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); + + /// Deletes the given finalizable [object] handle. + /// + /// The caller has to provide the actual Dart object the handle was created from + /// to prove the object (and therefore the finalizable handle) is still alive. + /// + /// Requires there to be a current isolate. + void Dart_DeleteFinalizableHandle( + Dart_FinalizableHandle object, + Object strong_ref_to_object, + ) { + return _Dart_DeleteFinalizableHandle( + object, + strong_ref_to_object, + ); + } + + late final _Dart_DeleteFinalizableHandlePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(Dart_FinalizableHandle, + ffi.Handle)>>('Dart_DeleteFinalizableHandle'); + late final _Dart_DeleteFinalizableHandle = _Dart_DeleteFinalizableHandlePtr + .asFunction(); + + /// Updates the external memory size for the given finalizable handle. + /// + /// The caller has to provide the actual Dart object the handle was created from + /// to prove the object (and therefore the finalizable handle) is still alive. + /// + /// May trigger garbage collection. + void Dart_UpdateFinalizableExternalSize( + Dart_FinalizableHandle object, + Object strong_ref_to_object, + int external_allocation_size, + ) { + return _Dart_UpdateFinalizableExternalSize( + object, + strong_ref_to_object, + external_allocation_size, + ); + } + + late final _Dart_UpdateFinalizableExternalSizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, + ffi.IntPtr)>>('Dart_UpdateFinalizableExternalSize'); + late final _Dart_UpdateFinalizableExternalSize = + _Dart_UpdateFinalizableExternalSizePtr.asFunction< + void Function(Dart_FinalizableHandle, Object, int)>(); + + /// Gets the version string for the Dart VM. + /// + /// The version of the Dart VM can be accessed without initializing the VM. + /// + /// \return The version string for the embedded Dart VM. + ffi.Pointer Dart_VersionString() { + return _Dart_VersionString(); + } + + late final _Dart_VersionStringPtr = + _lookup Function()>>( + 'Dart_VersionString'); + late final _Dart_VersionString = + _Dart_VersionStringPtr.asFunction Function()>(); + + /// Initialize Dart_IsolateFlags with correct version and default values. + void Dart_IsolateFlagsInitialize( + ffi.Pointer flags, + ) { + return _Dart_IsolateFlagsInitialize( + flags, + ); + } + + late final _Dart_IsolateFlagsInitializePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer)>>('Dart_IsolateFlagsInitialize'); + late final _Dart_IsolateFlagsInitialize = _Dart_IsolateFlagsInitializePtr + .asFunction)>(); + + /// Initializes the VM. + /// + /// \param params A struct containing initialization information. The version + /// field of the struct must be DART_INITIALIZE_PARAMS_CURRENT_VERSION. + /// + /// \return NULL if initialization is successful. Returns an error message + /// otherwise. The caller is responsible for freeing the error message. + ffi.Pointer Dart_Initialize( + ffi.Pointer params, + ) { + return _Dart_Initialize( + params, + ); + } + + late final _Dart_InitializePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('Dart_Initialize'); + late final _Dart_Initialize = _Dart_InitializePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); + + /// Cleanup state in the VM before process termination. + /// + /// \return NULL if cleanup is successful. Returns an error message otherwise. + /// The caller is responsible for freeing the error message. + /// + /// NOTE: This function must not be called on a thread that was created by the VM + /// itself. + ffi.Pointer Dart_Cleanup() { + return _Dart_Cleanup(); + } + + late final _Dart_CleanupPtr = + _lookup Function()>>( + 'Dart_Cleanup'); + late final _Dart_Cleanup = + _Dart_CleanupPtr.asFunction Function()>(); + + /// Sets command line flags. Should be called before Dart_Initialize. + /// + /// \param argc The length of the arguments array. + /// \param argv An array of arguments. + /// + /// \return NULL if successful. Returns an error message otherwise. + /// The caller is responsible for freeing the error message. + /// + /// NOTE: This call does not store references to the passed in c-strings. + ffi.Pointer Dart_SetVMFlags( + int argc, + ffi.Pointer> argv, + ) { + return _Dart_SetVMFlags( + argc, + argv, + ); + } + + late final _Dart_SetVMFlagsPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int, ffi.Pointer>)>>('Dart_SetVMFlags'); + late final _Dart_SetVMFlags = _Dart_SetVMFlagsPtr.asFunction< + ffi.Pointer Function( + int, ffi.Pointer>)>(); + + /// Returns true if the named VM flag is of boolean type, specified, and set to + /// true. + /// + /// \param flag_name The name of the flag without leading punctuation + /// (example: "enable_asserts"). + bool Dart_IsVMFlagSet( + ffi.Pointer flag_name, + ) { + return _Dart_IsVMFlagSet( + flag_name, + ); + } + + late final _Dart_IsVMFlagSetPtr = + _lookup)>>( + 'Dart_IsVMFlagSet'); + late final _Dart_IsVMFlagSet = + _Dart_IsVMFlagSetPtr.asFunction)>(); + + /// Creates a new isolate. The new isolate becomes the current isolate. + /// + /// A snapshot can be used to restore the VM quickly to a saved state + /// and is useful for fast startup. If snapshot data is provided, the + /// isolate will be started using that snapshot data. Requires a core snapshot or + /// an app snapshot created by Dart_CreateSnapshot or + /// Dart_CreatePrecompiledSnapshot* from a VM with the same version. + /// + /// Requires there to be no current isolate. + /// + /// \param script_uri The main source file or snapshot this isolate will load. + /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child + /// isolate is created by Isolate.spawn. The embedder should use a URI that + /// allows it to load the same program into such a child isolate. + /// \param name A short name for the isolate to improve debugging messages. + /// Typically of the format 'foo.dart:main()'. + /// \param isolate_snapshot_data + /// \param isolate_snapshot_instructions Buffers containing a snapshot of the + /// isolate or NULL if no snapshot is provided. If provided, the buffers must + /// remain valid until the isolate shuts down. + /// \param flags Pointer to VM specific flags or NULL for default flags. + /// \param isolate_group_data Embedder group data. This data can be obtained + /// by calling Dart_IsolateGroupData and will be passed to the + /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and + /// Dart_IsolateGroupCleanupCallback. + /// \param isolate_data Embedder data. This data will be passed to + /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from + /// this parent isolate. + /// \param error Returns NULL if creation is successful, an error message + /// otherwise. The caller is responsible for calling free() on the error + /// message. + /// + /// \return The new isolate on success, or NULL if isolate creation failed. + Dart_Isolate Dart_CreateIsolateGroup( + ffi.Pointer script_uri, + ffi.Pointer name, + ffi.Pointer isolate_snapshot_data, + ffi.Pointer isolate_snapshot_instructions, + ffi.Pointer flags, + ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data, + ffi.Pointer> error, + ) { + return _Dart_CreateIsolateGroup( + script_uri, + name, + isolate_snapshot_data, + isolate_snapshot_instructions, + flags, + isolate_group_data, + isolate_data, + error, + ); + } + + late final _Dart_CreateIsolateGroupPtr = _lookup< + ffi.NativeFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('Dart_CreateIsolateGroup'); + late final _Dart_CreateIsolateGroup = _Dart_CreateIsolateGroupPtr.asFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + /// Creates a new isolate inside the isolate group of [group_member]. + /// + /// Requires there to be no current isolate. + /// + /// \param group_member An isolate from the same group into which the newly created + /// isolate should be born into. Other threads may not have entered / enter this + /// member isolate. + /// \param name A short name for the isolate for debugging purposes. + /// \param shutdown_callback A callback to be called when the isolate is being + /// shutdown (may be NULL). + /// \param cleanup_callback A callback to be called when the isolate is being + /// cleaned up (may be NULL). + /// \param isolate_data The embedder-specific data associated with this isolate. + /// \param error Set to NULL if creation is successful, set to an error + /// message otherwise. The caller is responsible for calling free() on the + /// error message. + /// + /// \return The newly created isolate on success, or NULL if isolate creation + /// failed. + /// + /// If successful, the newly created isolate will become the current isolate. + Dart_Isolate Dart_CreateIsolateInGroup( + Dart_Isolate group_member, + ffi.Pointer name, + Dart_IsolateShutdownCallback shutdown_callback, + Dart_IsolateCleanupCallback cleanup_callback, + ffi.Pointer child_isolate_data, + ffi.Pointer> error, + ) { + return _Dart_CreateIsolateInGroup( + group_member, + name, + shutdown_callback, + cleanup_callback, + child_isolate_data, + error, + ); + } + + late final _Dart_CreateIsolateInGroupPtr = _lookup< + ffi.NativeFunction< + Dart_Isolate Function( + Dart_Isolate, + ffi.Pointer, + Dart_IsolateShutdownCallback, + Dart_IsolateCleanupCallback, + ffi.Pointer, + ffi.Pointer>)>>( + 'Dart_CreateIsolateInGroup'); + late final _Dart_CreateIsolateInGroup = + _Dart_CreateIsolateInGroupPtr.asFunction< + Dart_Isolate Function( + Dart_Isolate, + ffi.Pointer, + Dart_IsolateShutdownCallback, + Dart_IsolateCleanupCallback, + ffi.Pointer, + ffi.Pointer>)>(); + + /// Creates a new isolate from a Dart Kernel file. The new isolate + /// becomes the current isolate. + /// + /// Requires there to be no current isolate. + /// + /// \param script_uri The main source file or snapshot this isolate will load. + /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child + /// isolate is created by Isolate.spawn. The embedder should use a URI that + /// allows it to load the same program into such a child isolate. + /// \param name A short name for the isolate to improve debugging messages. + /// Typically of the format 'foo.dart:main()'. + /// \param kernel_buffer + /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must + /// remain valid until isolate shutdown. + /// \param flags Pointer to VM specific flags or NULL for default flags. + /// \param isolate_group_data Embedder group data. This data can be obtained + /// by calling Dart_IsolateGroupData and will be passed to the + /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and + /// Dart_IsolateGroupCleanupCallback. + /// \param isolate_data Embedder data. This data will be passed to + /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from + /// this parent isolate. + /// \param error Returns NULL if creation is successful, an error message + /// otherwise. The caller is responsible for calling free() on the error + /// message. + /// + /// \return The new isolate on success, or NULL if isolate creation failed. + Dart_Isolate Dart_CreateIsolateGroupFromKernel( + ffi.Pointer script_uri, + ffi.Pointer name, + ffi.Pointer kernel_buffer, + int kernel_buffer_size, + ffi.Pointer flags, + ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data, + ffi.Pointer> error, + ) { + return _Dart_CreateIsolateGroupFromKernel( + script_uri, + name, + kernel_buffer, + kernel_buffer_size, + flags, + isolate_group_data, + isolate_data, + error, + ); + } + + late final _Dart_CreateIsolateGroupFromKernelPtr = _lookup< + ffi.NativeFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>( + 'Dart_CreateIsolateGroupFromKernel'); + late final _Dart_CreateIsolateGroupFromKernel = + _Dart_CreateIsolateGroupFromKernelPtr.asFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + /// Shuts down the current isolate. After this call, the current isolate is NULL. + /// Any current scopes created by Dart_EnterScope will be exited. Invokes the + /// shutdown callback and any callbacks of remaining weak persistent handles. + /// + /// Requires there to be a current isolate. + void Dart_ShutdownIsolate() { + return _Dart_ShutdownIsolate(); + } + + late final _Dart_ShutdownIsolatePtr = + _lookup>('Dart_ShutdownIsolate'); + late final _Dart_ShutdownIsolate = + _Dart_ShutdownIsolatePtr.asFunction(); + + /// Returns the current isolate. Will return NULL if there is no + /// current isolate. + Dart_Isolate Dart_CurrentIsolate() { + return _Dart_CurrentIsolate(); + } + + late final _Dart_CurrentIsolatePtr = + _lookup>( + 'Dart_CurrentIsolate'); + late final _Dart_CurrentIsolate = + _Dart_CurrentIsolatePtr.asFunction(); + + /// Returns the callback data associated with the current isolate. This + /// data was set when the isolate got created or initialized. + ffi.Pointer Dart_CurrentIsolateData() { + return _Dart_CurrentIsolateData(); + } + + late final _Dart_CurrentIsolateDataPtr = + _lookup Function()>>( + 'Dart_CurrentIsolateData'); + late final _Dart_CurrentIsolateData = _Dart_CurrentIsolateDataPtr.asFunction< + ffi.Pointer Function()>(); + + /// Returns the callback data associated with the given isolate. This + /// data was set when the isolate got created or initialized. + ffi.Pointer Dart_IsolateData( + Dart_Isolate isolate, + ) { + return _Dart_IsolateData( + isolate, + ); + } + + late final _Dart_IsolateDataPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateData'); + late final _Dart_IsolateData = _Dart_IsolateDataPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); + + /// Returns the current isolate group. Will return NULL if there is no + /// current isolate group. + Dart_IsolateGroup Dart_CurrentIsolateGroup() { + return _Dart_CurrentIsolateGroup(); + } + + late final _Dart_CurrentIsolateGroupPtr = + _lookup>( + 'Dart_CurrentIsolateGroup'); + late final _Dart_CurrentIsolateGroup = + _Dart_CurrentIsolateGroupPtr.asFunction(); + + /// Returns the callback data associated with the current isolate group. This + /// data was passed to the isolate group when it was created. + ffi.Pointer Dart_CurrentIsolateGroupData() { + return _Dart_CurrentIsolateGroupData(); + } + + late final _Dart_CurrentIsolateGroupDataPtr = + _lookup Function()>>( + 'Dart_CurrentIsolateGroupData'); + late final _Dart_CurrentIsolateGroupData = _Dart_CurrentIsolateGroupDataPtr + .asFunction Function()>(); + + /// Returns the callback data associated with the specified isolate group. This + /// data was passed to the isolate when it was created. + /// The embedder is responsible for ensuring the consistency of this data + /// with respect to the lifecycle of an isolate group. + ffi.Pointer Dart_IsolateGroupData( + Dart_Isolate isolate, + ) { + return _Dart_IsolateGroupData( + isolate, + ); + } + + late final _Dart_IsolateGroupDataPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateGroupData'); + late final _Dart_IsolateGroupData = _Dart_IsolateGroupDataPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); + + /// Returns the debugging name for the current isolate. + /// + /// This name is unique to each isolate and should only be used to make + /// debugging messages more comprehensible. + Object Dart_DebugName() { + return _Dart_DebugName(); + } + + late final _Dart_DebugNamePtr = + _lookup>('Dart_DebugName'); + late final _Dart_DebugName = + _Dart_DebugNamePtr.asFunction(); + + /// Returns the ID for an isolate which is used to query the service protocol. + /// + /// It is the responsibility of the caller to free the returned ID. + ffi.Pointer Dart_IsolateServiceId( + Dart_Isolate isolate, + ) { + return _Dart_IsolateServiceId( + isolate, + ); + } + + late final _Dart_IsolateServiceIdPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateServiceId'); + late final _Dart_IsolateServiceId = _Dart_IsolateServiceIdPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); + + /// Enters an isolate. After calling this function, + /// the current isolate will be set to the provided isolate. + /// + /// Requires there to be no current isolate. Multiple threads may not be in + /// the same isolate at once. + void Dart_EnterIsolate( + Dart_Isolate isolate, + ) { + return _Dart_EnterIsolate( + isolate, + ); + } + + late final _Dart_EnterIsolatePtr = + _lookup>( + 'Dart_EnterIsolate'); + late final _Dart_EnterIsolate = + _Dart_EnterIsolatePtr.asFunction(); + + /// Kills the given isolate. + /// + /// This function has the same effect as dart:isolate's + /// Isolate.kill(priority:immediate). + /// It can interrupt ordinary Dart code but not native code. If the isolate is + /// in the middle of a long running native function, the isolate will not be + /// killed until control returns to Dart. + /// + /// Does not require a current isolate. It is safe to kill the current isolate if + /// there is one. + void Dart_KillIsolate( + Dart_Isolate isolate, + ) { + return _Dart_KillIsolate( + isolate, + ); + } + + late final _Dart_KillIsolatePtr = + _lookup>( + 'Dart_KillIsolate'); + late final _Dart_KillIsolate = + _Dart_KillIsolatePtr.asFunction(); + + /// Notifies the VM that the embedder expects |size| bytes of memory have become + /// unreachable. The VM may use this hint to adjust the garbage collector's + /// growth policy. + /// + /// Multiple calls are interpreted as increasing, not replacing, the estimate of + /// unreachable memory. + /// + /// Requires there to be a current isolate. + void Dart_HintFreed( + int size, + ) { + return _Dart_HintFreed( + size, + ); + } + + late final _Dart_HintFreedPtr = + _lookup>( + 'Dart_HintFreed'); + late final _Dart_HintFreed = + _Dart_HintFreedPtr.asFunction(); + + /// Notifies the VM that the embedder expects to be idle until |deadline|. The VM + /// may use this time to perform garbage collection or other tasks to avoid + /// delays during execution of Dart code in the future. + /// + /// |deadline| is measured in microseconds against the system's monotonic time. + /// This clock can be accessed via Dart_TimelineGetMicros(). + /// + /// Requires there to be a current isolate. + void Dart_NotifyIdle( + int deadline, + ) { + return _Dart_NotifyIdle( + deadline, + ); + } + + late final _Dart_NotifyIdlePtr = + _lookup>( + 'Dart_NotifyIdle'); + late final _Dart_NotifyIdle = + _Dart_NotifyIdlePtr.asFunction(); + + /// Notifies the VM that the system is running low on memory. + /// + /// Does not require a current isolate. Only valid after calling Dart_Initialize. + void Dart_NotifyLowMemory() { + return _Dart_NotifyLowMemory(); + } + + late final _Dart_NotifyLowMemoryPtr = + _lookup>('Dart_NotifyLowMemory'); + late final _Dart_NotifyLowMemory = + _Dart_NotifyLowMemoryPtr.asFunction(); + + /// Starts the CPU sampling profiler. + void Dart_StartProfiling() { + return _Dart_StartProfiling(); + } + + late final _Dart_StartProfilingPtr = + _lookup>('Dart_StartProfiling'); + late final _Dart_StartProfiling = + _Dart_StartProfilingPtr.asFunction(); + + /// Stops the CPU sampling profiler. + /// + /// Note that some profile samples might still be taken after this fucntion + /// returns due to the asynchronous nature of the implementation on some + /// platforms. + void Dart_StopProfiling() { + return _Dart_StopProfiling(); + } + + late final _Dart_StopProfilingPtr = + _lookup>('Dart_StopProfiling'); + late final _Dart_StopProfiling = + _Dart_StopProfilingPtr.asFunction(); + + /// Notifies the VM that the current thread should not be profiled until a + /// matching call to Dart_ThreadEnableProfiling is made. + /// + /// NOTE: By default, if a thread has entered an isolate it will be profiled. + /// This function should be used when an embedder knows a thread is about + /// to make a blocking call and wants to avoid unnecessary interrupts by + /// the profiler. + void Dart_ThreadDisableProfiling() { + return _Dart_ThreadDisableProfiling(); + } + + late final _Dart_ThreadDisableProfilingPtr = + _lookup>( + 'Dart_ThreadDisableProfiling'); + late final _Dart_ThreadDisableProfiling = + _Dart_ThreadDisableProfilingPtr.asFunction(); + + /// Notifies the VM that the current thread should be profiled. + /// + /// NOTE: It is only legal to call this function *after* calling + /// Dart_ThreadDisableProfiling. + /// + /// NOTE: By default, if a thread has entered an isolate it will be profiled. + void Dart_ThreadEnableProfiling() { + return _Dart_ThreadEnableProfiling(); + } + + late final _Dart_ThreadEnableProfilingPtr = + _lookup>( + 'Dart_ThreadEnableProfiling'); + late final _Dart_ThreadEnableProfiling = + _Dart_ThreadEnableProfilingPtr.asFunction(); + + /// Register symbol information for the Dart VM's profiler and crash dumps. + /// + /// This consumes the output of //topaz/runtime/dart/profiler_symbols, which + /// should be treated as opaque. + void Dart_AddSymbols( + ffi.Pointer dso_name, + ffi.Pointer buffer, + int buffer_size, + ) { + return _Dart_AddSymbols( + dso_name, + buffer, + buffer_size, + ); + } + + late final _Dart_AddSymbolsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.IntPtr)>>('Dart_AddSymbols'); + late final _Dart_AddSymbols = _Dart_AddSymbolsPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + /// Exits an isolate. After this call, Dart_CurrentIsolate will + /// return NULL. + /// + /// Requires there to be a current isolate. + void Dart_ExitIsolate() { + return _Dart_ExitIsolate(); + } + + late final _Dart_ExitIsolatePtr = + _lookup>('Dart_ExitIsolate'); + late final _Dart_ExitIsolate = + _Dart_ExitIsolatePtr.asFunction(); + + /// Creates a full snapshot of the current isolate heap. + /// + /// A full snapshot is a compact representation of the dart vm isolate heap + /// and dart isolate heap states. These snapshots are used to initialize + /// the vm isolate on startup and fast initialization of an isolate. + /// A Snapshot of the heap is created before any dart code has executed. + /// + /// Requires there to be a current isolate. Not available in the precompiled + /// runtime (check Dart_IsPrecompiledRuntime). + /// + /// \param buffer Returns a pointer to a buffer containing the + /// snapshot. This buffer is scope allocated and is only valid + /// until the next call to Dart_ExitScope. + /// \param size Returns the size of the buffer. + /// \param is_core Create a snapshot containing core libraries. + /// Such snapshot should be agnostic to null safety mode. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateSnapshot( + ffi.Pointer> vm_snapshot_data_buffer, + ffi.Pointer vm_snapshot_data_size, + ffi.Pointer> isolate_snapshot_data_buffer, + ffi.Pointer isolate_snapshot_data_size, + bool is_core, + ) { + return _Dart_CreateSnapshot( + vm_snapshot_data_buffer, + vm_snapshot_data_size, + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + is_core, + ); + } + + late final _Dart_CreateSnapshotPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Bool)>>('Dart_CreateSnapshot'); + late final _Dart_CreateSnapshot = _Dart_CreateSnapshotPtr.asFunction< + Object Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + bool)>(); + + /// Returns whether the buffer contains a kernel file. + /// + /// \param buffer Pointer to a buffer that might contain a kernel binary. + /// \param buffer_size Size of the buffer. + /// + /// \return Whether the buffer contains a kernel binary (full or partial). + bool Dart_IsKernel( + ffi.Pointer buffer, + int buffer_size, + ) { + return _Dart_IsKernel( + buffer, + buffer_size, + ); + } + + late final _Dart_IsKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_IsKernel'); + late final _Dart_IsKernel = _Dart_IsKernelPtr.asFunction< + bool Function(ffi.Pointer, int)>(); + + /// Make isolate runnable. + /// + /// When isolates are spawned, this function is used to indicate that + /// the creation and initialization (including script loading) of the + /// isolate is complete and the isolate can start. + /// This function expects there to be no current isolate. + /// + /// \param isolate The isolate to be made runnable. + /// + /// \return NULL if successful. Returns an error message otherwise. The caller + /// is responsible for freeing the error message. + ffi.Pointer Dart_IsolateMakeRunnable( + Dart_Isolate isolate, + ) { + return _Dart_IsolateMakeRunnable( + isolate, + ); + } + + late final _Dart_IsolateMakeRunnablePtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateMakeRunnable'); + late final _Dart_IsolateMakeRunnable = _Dart_IsolateMakeRunnablePtr + .asFunction Function(Dart_Isolate)>(); + + /// Allows embedders to provide an alternative wakeup mechanism for the + /// delivery of inter-isolate messages. This setting only applies to + /// the current isolate. + /// + /// Most embedders will only call this function once, before isolate + /// execution begins. If this function is called after isolate + /// execution begins, the embedder is responsible for threading issues. + void Dart_SetMessageNotifyCallback( + Dart_MessageNotifyCallback message_notify_callback, + ) { + return _Dart_SetMessageNotifyCallback( + message_notify_callback, + ); + } + + late final _Dart_SetMessageNotifyCallbackPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetMessageNotifyCallback'); + late final _Dart_SetMessageNotifyCallback = _Dart_SetMessageNotifyCallbackPtr + .asFunction(); + + /// Query the current message notify callback for the isolate. + /// + /// \return The current message notify callback for the isolate. + Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback() { + return _Dart_GetMessageNotifyCallback(); + } + + late final _Dart_GetMessageNotifyCallbackPtr = + _lookup>( + 'Dart_GetMessageNotifyCallback'); + late final _Dart_GetMessageNotifyCallback = _Dart_GetMessageNotifyCallbackPtr + .asFunction(); + + /// If the VM flag `--pause-isolates-on-start` was passed this will be true. + /// + /// \return A boolean value indicating if pause on start was requested. + bool Dart_ShouldPauseOnStart() { + return _Dart_ShouldPauseOnStart(); + } + + late final _Dart_ShouldPauseOnStartPtr = + _lookup>( + 'Dart_ShouldPauseOnStart'); + late final _Dart_ShouldPauseOnStart = + _Dart_ShouldPauseOnStartPtr.asFunction(); + + /// Override the VM flag `--pause-isolates-on-start` for the current isolate. + /// + /// \param should_pause Should the isolate be paused on start? + /// + /// NOTE: This must be called before Dart_IsolateMakeRunnable. + void Dart_SetShouldPauseOnStart( + bool should_pause, + ) { + return _Dart_SetShouldPauseOnStart( + should_pause, + ); + } + + late final _Dart_SetShouldPauseOnStartPtr = + _lookup>( + 'Dart_SetShouldPauseOnStart'); + late final _Dart_SetShouldPauseOnStart = + _Dart_SetShouldPauseOnStartPtr.asFunction(); + + /// Is the current isolate paused on start? + /// + /// \return A boolean value indicating if the isolate is paused on start. + bool Dart_IsPausedOnStart() { + return _Dart_IsPausedOnStart(); + } + + late final _Dart_IsPausedOnStartPtr = + _lookup>('Dart_IsPausedOnStart'); + late final _Dart_IsPausedOnStart = + _Dart_IsPausedOnStartPtr.asFunction(); + + /// Called when the embedder has paused the current isolate on start and when + /// the embedder has resumed the isolate. + /// + /// \param paused Is the isolate paused on start? + void Dart_SetPausedOnStart( + bool paused, + ) { + return _Dart_SetPausedOnStart( + paused, + ); + } + + late final _Dart_SetPausedOnStartPtr = + _lookup>( + 'Dart_SetPausedOnStart'); + late final _Dart_SetPausedOnStart = + _Dart_SetPausedOnStartPtr.asFunction(); + + /// If the VM flag `--pause-isolates-on-exit` was passed this will be true. + /// + /// \return A boolean value indicating if pause on exit was requested. + bool Dart_ShouldPauseOnExit() { + return _Dart_ShouldPauseOnExit(); + } + + late final _Dart_ShouldPauseOnExitPtr = + _lookup>( + 'Dart_ShouldPauseOnExit'); + late final _Dart_ShouldPauseOnExit = + _Dart_ShouldPauseOnExitPtr.asFunction(); + + /// Override the VM flag `--pause-isolates-on-exit` for the current isolate. + /// + /// \param should_pause Should the isolate be paused on exit? + void Dart_SetShouldPauseOnExit( + bool should_pause, + ) { + return _Dart_SetShouldPauseOnExit( + should_pause, + ); + } + + late final _Dart_SetShouldPauseOnExitPtr = + _lookup>( + 'Dart_SetShouldPauseOnExit'); + late final _Dart_SetShouldPauseOnExit = + _Dart_SetShouldPauseOnExitPtr.asFunction(); + + /// Is the current isolate paused on exit? + /// + /// \return A boolean value indicating if the isolate is paused on exit. + bool Dart_IsPausedOnExit() { + return _Dart_IsPausedOnExit(); + } + + late final _Dart_IsPausedOnExitPtr = + _lookup>('Dart_IsPausedOnExit'); + late final _Dart_IsPausedOnExit = + _Dart_IsPausedOnExitPtr.asFunction(); + + /// Called when the embedder has paused the current isolate on exit and when + /// the embedder has resumed the isolate. + /// + /// \param paused Is the isolate paused on exit? + void Dart_SetPausedOnExit( + bool paused, + ) { + return _Dart_SetPausedOnExit( + paused, + ); + } + + late final _Dart_SetPausedOnExitPtr = + _lookup>( + 'Dart_SetPausedOnExit'); + late final _Dart_SetPausedOnExit = + _Dart_SetPausedOnExitPtr.asFunction(); + + /// Called when the embedder has caught a top level unhandled exception error + /// in the current isolate. + /// + /// NOTE: It is illegal to call this twice on the same isolate without first + /// clearing the sticky error to null. + /// + /// \param error The unhandled exception error. + void Dart_SetStickyError( + Object error, + ) { + return _Dart_SetStickyError( + error, + ); + } + + late final _Dart_SetStickyErrorPtr = + _lookup>( + 'Dart_SetStickyError'); + late final _Dart_SetStickyError = + _Dart_SetStickyErrorPtr.asFunction(); + + /// Does the current isolate have a sticky error? + bool Dart_HasStickyError() { + return _Dart_HasStickyError(); + } + + late final _Dart_HasStickyErrorPtr = + _lookup>('Dart_HasStickyError'); + late final _Dart_HasStickyError = + _Dart_HasStickyErrorPtr.asFunction(); + + /// Gets the sticky error for the current isolate. + /// + /// \return A handle to the sticky error object or null. + Object Dart_GetStickyError() { + return _Dart_GetStickyError(); + } + + late final _Dart_GetStickyErrorPtr = + _lookup>('Dart_GetStickyError'); + late final _Dart_GetStickyError = + _Dart_GetStickyErrorPtr.asFunction(); + + /// Handles the next pending message for the current isolate. + /// + /// May generate an unhandled exception error. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_HandleMessage() { + return _Dart_HandleMessage(); + } + + late final _Dart_HandleMessagePtr = + _lookup>('Dart_HandleMessage'); + late final _Dart_HandleMessage = + _Dart_HandleMessagePtr.asFunction(); + + /// Drains the microtask queue, then blocks the calling thread until the current + /// isolate recieves a message, then handles all messages. + /// + /// \param timeout_millis When non-zero, the call returns after the indicated + /// number of milliseconds even if no message was received. + /// \return A valid handle if no error occurs, otherwise an error handle. + Object Dart_WaitForEvent( + int timeout_millis, + ) { + return _Dart_WaitForEvent( + timeout_millis, + ); + } + + late final _Dart_WaitForEventPtr = + _lookup>( + 'Dart_WaitForEvent'); + late final _Dart_WaitForEvent = + _Dart_WaitForEventPtr.asFunction(); + + /// Handles any pending messages for the vm service for the current + /// isolate. + /// + /// This function may be used by an embedder at a breakpoint to avoid + /// pausing the vm service. + /// + /// This function can indirectly cause the message notify callback to + /// be called. + /// + /// \return true if the vm service requests the program resume + /// execution, false otherwise + bool Dart_HandleServiceMessages() { + return _Dart_HandleServiceMessages(); + } + + late final _Dart_HandleServiceMessagesPtr = + _lookup>( + 'Dart_HandleServiceMessages'); + late final _Dart_HandleServiceMessages = + _Dart_HandleServiceMessagesPtr.asFunction(); + + /// Does the current isolate have pending service messages? + /// + /// \return true if the isolate has pending service messages, false otherwise. + bool Dart_HasServiceMessages() { + return _Dart_HasServiceMessages(); + } + + late final _Dart_HasServiceMessagesPtr = + _lookup>( + 'Dart_HasServiceMessages'); + late final _Dart_HasServiceMessages = + _Dart_HasServiceMessagesPtr.asFunction(); + + /// Processes any incoming messages for the current isolate. + /// + /// This function may only be used when the embedder has not provided + /// an alternate message delivery mechanism with + /// Dart_SetMessageCallbacks. It is provided for convenience. + /// + /// This function waits for incoming messages for the current + /// isolate. As new messages arrive, they are handled using + /// Dart_HandleMessage. The routine exits when all ports to the + /// current isolate are closed. + /// + /// \return A valid handle if the run loop exited successfully. If an + /// exception or other error occurs while processing messages, an + /// error handle is returned. + Object Dart_RunLoop() { + return _Dart_RunLoop(); + } + + late final _Dart_RunLoopPtr = + _lookup>('Dart_RunLoop'); + late final _Dart_RunLoop = _Dart_RunLoopPtr.asFunction(); + + /// Lets the VM run message processing for the isolate. + /// + /// This function expects there to a current isolate and the current isolate + /// must not have an active api scope. The VM will take care of making the + /// isolate runnable (if not already), handles its message loop and will take + /// care of shutting the isolate down once it's done. + /// + /// \param errors_are_fatal Whether uncaught errors should be fatal. + /// \param on_error_port A port to notify on uncaught errors (or ILLEGAL_PORT). + /// \param on_exit_port A port to notify on exit (or ILLEGAL_PORT). + /// \param error A non-NULL pointer which will hold an error message if the call + /// fails. The error has to be free()ed by the caller. + /// + /// \return If successfull the VM takes owernship of the isolate and takes care + /// of its message loop. If not successful the caller retains owernship of the + /// isolate. + bool Dart_RunLoopAsync( + bool errors_are_fatal, + int on_error_port, + int on_exit_port, + ffi.Pointer> error, + ) { + return _Dart_RunLoopAsync( + errors_are_fatal, + on_error_port, + on_exit_port, + error, + ); + } + + late final _Dart_RunLoopAsyncPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Bool, Dart_Port, Dart_Port, + ffi.Pointer>)>>('Dart_RunLoopAsync'); + late final _Dart_RunLoopAsync = _Dart_RunLoopAsyncPtr.asFunction< + bool Function(bool, int, int, ffi.Pointer>)>(); + + /// Gets the main port id for the current isolate. + int Dart_GetMainPortId() { + return _Dart_GetMainPortId(); + } + + late final _Dart_GetMainPortIdPtr = + _lookup>('Dart_GetMainPortId'); + late final _Dart_GetMainPortId = + _Dart_GetMainPortIdPtr.asFunction(); + + /// Does the current isolate have live ReceivePorts? + /// + /// A ReceivePort is live when it has not been closed. + bool Dart_HasLivePorts() { + return _Dart_HasLivePorts(); + } + + late final _Dart_HasLivePortsPtr = + _lookup>('Dart_HasLivePorts'); + late final _Dart_HasLivePorts = + _Dart_HasLivePortsPtr.asFunction(); + + /// Posts a message for some isolate. The message is a serialized + /// object. + /// + /// Requires there to be a current isolate. + /// + /// \param port The destination port. + /// \param object An object from the current isolate. + /// + /// \return True if the message was posted. + bool Dart_Post( + int port_id, + Object object, + ) { + return _Dart_Post( + port_id, + object, + ); + } + + late final _Dart_PostPtr = + _lookup>( + 'Dart_Post'); + late final _Dart_Post = + _Dart_PostPtr.asFunction(); + + /// Returns a new SendPort with the provided port id. + /// + /// \param port_id The destination port. + /// + /// \return A new SendPort if no errors occurs. Otherwise returns + /// an error handle. + Object Dart_NewSendPort( + int port_id, + ) { + return _Dart_NewSendPort( + port_id, + ); + } + + late final _Dart_NewSendPortPtr = + _lookup>( + 'Dart_NewSendPort'); + late final _Dart_NewSendPort = + _Dart_NewSendPortPtr.asFunction(); + + /// Gets the SendPort id for the provided SendPort. + /// \param port A SendPort object whose id is desired. + /// \param port_id Returns the id of the SendPort. + /// \return Success if no error occurs. Otherwise returns + /// an error handle. + Object Dart_SendPortGetId( + Object port, + ffi.Pointer port_id, + ) { + return _Dart_SendPortGetId( + port, + port_id, + ); + } + + late final _Dart_SendPortGetIdPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_SendPortGetId'); + late final _Dart_SendPortGetId = _Dart_SendPortGetIdPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Enters a new scope. + /// + /// All new local handles will be created in this scope. Additionally, + /// some functions may return "scope allocated" memory which is only + /// valid within this scope. + /// + /// Requires there to be a current isolate. + void Dart_EnterScope() { + return _Dart_EnterScope(); + } + + late final _Dart_EnterScopePtr = + _lookup>('Dart_EnterScope'); + late final _Dart_EnterScope = + _Dart_EnterScopePtr.asFunction(); + + /// Exits a scope. + /// + /// The previous scope (if any) becomes the current scope. + /// + /// Requires there to be a current isolate. + void Dart_ExitScope() { + return _Dart_ExitScope(); + } + + late final _Dart_ExitScopePtr = + _lookup>('Dart_ExitScope'); + late final _Dart_ExitScope = _Dart_ExitScopePtr.asFunction(); + + /// The Dart VM uses "zone allocation" for temporary structures. Zones + /// support very fast allocation of small chunks of memory. The chunks + /// cannot be deallocated individually, but instead zones support + /// deallocating all chunks in one fast operation. + /// + /// This function makes it possible for the embedder to allocate + /// temporary data in the VMs zone allocator. + /// + /// Zone allocation is possible: + /// 1. when inside a scope where local handles can be allocated + /// 2. when processing a message from a native port in a native port + /// handler + /// + /// All the memory allocated this way will be reclaimed either on the + /// next call to Dart_ExitScope or when the native port handler exits. + /// + /// \param size Size of the memory to allocate. + /// + /// \return A pointer to the allocated memory. NULL if allocation + /// failed. Failure might due to is no current VM zone. + ffi.Pointer Dart_ScopeAllocate( + int size, + ) { + return _Dart_ScopeAllocate( + size, + ); + } + + late final _Dart_ScopeAllocatePtr = + _lookup Function(ffi.IntPtr)>>( + 'Dart_ScopeAllocate'); + late final _Dart_ScopeAllocate = + _Dart_ScopeAllocatePtr.asFunction Function(int)>(); + + /// Returns the null object. + /// + /// \return A handle to the null object. + Object Dart_Null() { + return _Dart_Null(); + } + + late final _Dart_NullPtr = + _lookup>('Dart_Null'); + late final _Dart_Null = _Dart_NullPtr.asFunction(); + + /// Is this object null? + bool Dart_IsNull( + Object object, + ) { + return _Dart_IsNull( + object, + ); + } + + late final _Dart_IsNullPtr = + _lookup>('Dart_IsNull'); + late final _Dart_IsNull = _Dart_IsNullPtr.asFunction(); + + /// Returns the empty string object. + /// + /// \return A handle to the empty string object. + Object Dart_EmptyString() { + return _Dart_EmptyString(); + } + + late final _Dart_EmptyStringPtr = + _lookup>('Dart_EmptyString'); + late final _Dart_EmptyString = + _Dart_EmptyStringPtr.asFunction(); + + /// Returns types that are not classes, and which therefore cannot be looked up + /// as library members by Dart_GetType. + /// + /// \return A handle to the dynamic, void or Never type. + Object Dart_TypeDynamic() { + return _Dart_TypeDynamic(); + } + + late final _Dart_TypeDynamicPtr = + _lookup>('Dart_TypeDynamic'); + late final _Dart_TypeDynamic = + _Dart_TypeDynamicPtr.asFunction(); + + Object Dart_TypeVoid() { + return _Dart_TypeVoid(); + } + + late final _Dart_TypeVoidPtr = + _lookup>('Dart_TypeVoid'); + late final _Dart_TypeVoid = _Dart_TypeVoidPtr.asFunction(); + + Object Dart_TypeNever() { + return _Dart_TypeNever(); + } + + late final _Dart_TypeNeverPtr = + _lookup>('Dart_TypeNever'); + late final _Dart_TypeNever = + _Dart_TypeNeverPtr.asFunction(); + + /// Checks if the two objects are equal. + /// + /// The result of the comparison is returned through the 'equal' + /// parameter. The return value itself is used to indicate success or + /// failure, not equality. + /// + /// May generate an unhandled exception error. + /// + /// \param obj1 An object to be compared. + /// \param obj2 An object to be compared. + /// \param equal Returns the result of the equality comparison. + /// + /// \return A valid handle if no error occurs during the comparison. + Object Dart_ObjectEquals( + Object obj1, + Object obj2, + ffi.Pointer equal, + ) { + return _Dart_ObjectEquals( + obj1, + obj2, + equal, + ); + } + + late final _Dart_ObjectEqualsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Pointer)>>('Dart_ObjectEquals'); + late final _Dart_ObjectEquals = _Dart_ObjectEqualsPtr.asFunction< + Object Function(Object, Object, ffi.Pointer)>(); + + /// Is this object an instance of some type? + /// + /// The result of the test is returned through the 'instanceof' parameter. + /// The return value itself is used to indicate success or failure. + /// + /// \param object An object. + /// \param type A type. + /// \param instanceof Return true if 'object' is an instance of type 'type'. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_ObjectIsType( + Object object, + Object type, + ffi.Pointer instanceof, + ) { + return _Dart_ObjectIsType( + object, + type, + instanceof, + ); + } + + late final _Dart_ObjectIsTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Pointer)>>('Dart_ObjectIsType'); + late final _Dart_ObjectIsType = _Dart_ObjectIsTypePtr.asFunction< + Object Function(Object, Object, ffi.Pointer)>(); + + /// Query object type. + /// + /// \param object Some Object. + /// + /// \return true if Object is of the specified type. + bool Dart_IsInstance( + Object object, + ) { + return _Dart_IsInstance( + object, + ); + } + + late final _Dart_IsInstancePtr = + _lookup>( + 'Dart_IsInstance'); + late final _Dart_IsInstance = + _Dart_IsInstancePtr.asFunction(); + + bool Dart_IsNumber( + Object object, + ) { + return _Dart_IsNumber( + object, + ); + } + + late final _Dart_IsNumberPtr = + _lookup>( + 'Dart_IsNumber'); + late final _Dart_IsNumber = + _Dart_IsNumberPtr.asFunction(); + + bool Dart_IsInteger( + Object object, + ) { + return _Dart_IsInteger( + object, + ); + } + + late final _Dart_IsIntegerPtr = + _lookup>( + 'Dart_IsInteger'); + late final _Dart_IsInteger = + _Dart_IsIntegerPtr.asFunction(); + + bool Dart_IsDouble( + Object object, + ) { + return _Dart_IsDouble( + object, + ); + } + + late final _Dart_IsDoublePtr = + _lookup>( + 'Dart_IsDouble'); + late final _Dart_IsDouble = + _Dart_IsDoublePtr.asFunction(); + + bool Dart_IsBoolean( + Object object, + ) { + return _Dart_IsBoolean( + object, + ); + } + + late final _Dart_IsBooleanPtr = + _lookup>( + 'Dart_IsBoolean'); + late final _Dart_IsBoolean = + _Dart_IsBooleanPtr.asFunction(); + + bool Dart_IsString( + Object object, + ) { + return _Dart_IsString( + object, + ); + } + + late final _Dart_IsStringPtr = + _lookup>( + 'Dart_IsString'); + late final _Dart_IsString = + _Dart_IsStringPtr.asFunction(); + + bool Dart_IsStringLatin1( + Object object, + ) { + return _Dart_IsStringLatin1( + object, + ); + } + + late final _Dart_IsStringLatin1Ptr = + _lookup>( + 'Dart_IsStringLatin1'); + late final _Dart_IsStringLatin1 = + _Dart_IsStringLatin1Ptr.asFunction(); + + bool Dart_IsExternalString( + Object object, + ) { + return _Dart_IsExternalString( + object, + ); + } + + late final _Dart_IsExternalStringPtr = + _lookup>( + 'Dart_IsExternalString'); + late final _Dart_IsExternalString = + _Dart_IsExternalStringPtr.asFunction(); + + bool Dart_IsList( + Object object, + ) { + return _Dart_IsList( + object, + ); + } + + late final _Dart_IsListPtr = + _lookup>('Dart_IsList'); + late final _Dart_IsList = _Dart_IsListPtr.asFunction(); + + bool Dart_IsMap( + Object object, + ) { + return _Dart_IsMap( + object, + ); + } + + late final _Dart_IsMapPtr = + _lookup>('Dart_IsMap'); + late final _Dart_IsMap = _Dart_IsMapPtr.asFunction(); + + bool Dart_IsLibrary( + Object object, + ) { + return _Dart_IsLibrary( + object, + ); + } + + late final _Dart_IsLibraryPtr = + _lookup>( + 'Dart_IsLibrary'); + late final _Dart_IsLibrary = + _Dart_IsLibraryPtr.asFunction(); + + bool Dart_IsType( + Object handle, + ) { + return _Dart_IsType( + handle, + ); + } + + late final _Dart_IsTypePtr = + _lookup>('Dart_IsType'); + late final _Dart_IsType = _Dart_IsTypePtr.asFunction(); + + bool Dart_IsFunction( + Object handle, + ) { + return _Dart_IsFunction( + handle, + ); + } + + late final _Dart_IsFunctionPtr = + _lookup>( + 'Dart_IsFunction'); + late final _Dart_IsFunction = + _Dart_IsFunctionPtr.asFunction(); + + bool Dart_IsVariable( + Object handle, + ) { + return _Dart_IsVariable( + handle, + ); + } + + late final _Dart_IsVariablePtr = + _lookup>( + 'Dart_IsVariable'); + late final _Dart_IsVariable = + _Dart_IsVariablePtr.asFunction(); + + bool Dart_IsTypeVariable( + Object handle, + ) { + return _Dart_IsTypeVariable( + handle, + ); + } + + late final _Dart_IsTypeVariablePtr = + _lookup>( + 'Dart_IsTypeVariable'); + late final _Dart_IsTypeVariable = + _Dart_IsTypeVariablePtr.asFunction(); + + bool Dart_IsClosure( + Object object, + ) { + return _Dart_IsClosure( + object, + ); + } + + late final _Dart_IsClosurePtr = + _lookup>( + 'Dart_IsClosure'); + late final _Dart_IsClosure = + _Dart_IsClosurePtr.asFunction(); + + bool Dart_IsTypedData( + Object object, + ) { + return _Dart_IsTypedData( + object, + ); + } + + late final _Dart_IsTypedDataPtr = + _lookup>( + 'Dart_IsTypedData'); + late final _Dart_IsTypedData = + _Dart_IsTypedDataPtr.asFunction(); + + bool Dart_IsByteBuffer( + Object object, + ) { + return _Dart_IsByteBuffer( + object, + ); + } + + late final _Dart_IsByteBufferPtr = + _lookup>( + 'Dart_IsByteBuffer'); + late final _Dart_IsByteBuffer = + _Dart_IsByteBufferPtr.asFunction(); + + bool Dart_IsFuture( + Object object, + ) { + return _Dart_IsFuture( + object, + ); + } + + late final _Dart_IsFuturePtr = + _lookup>( + 'Dart_IsFuture'); + late final _Dart_IsFuture = + _Dart_IsFuturePtr.asFunction(); + + /// Gets the type of a Dart language object. + /// + /// \param instance Some Dart object. + /// + /// \return If no error occurs, the type is returned. Otherwise an + /// error handle is returned. + Object Dart_InstanceGetType( + Object instance, + ) { + return _Dart_InstanceGetType( + instance, + ); + } + + late final _Dart_InstanceGetTypePtr = + _lookup>( + 'Dart_InstanceGetType'); + late final _Dart_InstanceGetType = + _Dart_InstanceGetTypePtr.asFunction(); + + /// Returns the name for the provided class type. + /// + /// \return A valid string handle if no error occurs during the + /// operation. + Object Dart_ClassName( + Object cls_type, + ) { + return _Dart_ClassName( + cls_type, + ); + } + + late final _Dart_ClassNamePtr = + _lookup>( + 'Dart_ClassName'); + late final _Dart_ClassName = + _Dart_ClassNamePtr.asFunction(); + + /// Returns the name for the provided function or method. + /// + /// \return A valid string handle if no error occurs during the + /// operation. + Object Dart_FunctionName( + Object function, + ) { + return _Dart_FunctionName( + function, + ); + } + + late final _Dart_FunctionNamePtr = + _lookup>( + 'Dart_FunctionName'); + late final _Dart_FunctionName = + _Dart_FunctionNamePtr.asFunction(); + + /// Returns a handle to the owner of a function. + /// + /// The owner of an instance method or a static method is its defining + /// class. The owner of a top-level function is its defining + /// library. The owner of the function of a non-implicit closure is the + /// function of the method or closure that defines the non-implicit + /// closure. + /// + /// \return A valid handle to the owner of the function, or an error + /// handle if the argument is not a valid handle to a function. + Object Dart_FunctionOwner( + Object function, + ) { + return _Dart_FunctionOwner( + function, + ); + } + + late final _Dart_FunctionOwnerPtr = + _lookup>( + 'Dart_FunctionOwner'); + late final _Dart_FunctionOwner = + _Dart_FunctionOwnerPtr.asFunction(); + + /// Determines whether a function handle referes to a static function + /// of method. + /// + /// For the purposes of the embedding API, a top-level function is + /// implicitly declared static. + /// + /// \param function A handle to a function or method declaration. + /// \param is_static Returns whether the function or method is declared static. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_FunctionIsStatic( + Object function, + ffi.Pointer is_static, + ) { + return _Dart_FunctionIsStatic( + function, + is_static, + ); + } + + late final _Dart_FunctionIsStaticPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_FunctionIsStatic'); + late final _Dart_FunctionIsStatic = _Dart_FunctionIsStaticPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Is this object a closure resulting from a tear-off (closurized method)? + /// + /// Returns true for closures produced when an ordinary method is accessed + /// through a getter call. Returns false otherwise, in particular for closures + /// produced from local function declarations. + /// + /// \param object Some Object. + /// + /// \return true if Object is a tear-off. + bool Dart_IsTearOff( + Object object, + ) { + return _Dart_IsTearOff( + object, + ); + } + + late final _Dart_IsTearOffPtr = + _lookup>( + 'Dart_IsTearOff'); + late final _Dart_IsTearOff = + _Dart_IsTearOffPtr.asFunction(); + + /// Retrieves the function of a closure. + /// + /// \return A handle to the function of the closure, or an error handle if the + /// argument is not a closure. + Object Dart_ClosureFunction( + Object closure, + ) { + return _Dart_ClosureFunction( + closure, + ); + } + + late final _Dart_ClosureFunctionPtr = + _lookup>( + 'Dart_ClosureFunction'); + late final _Dart_ClosureFunction = + _Dart_ClosureFunctionPtr.asFunction(); + + /// Returns a handle to the library which contains class. + /// + /// \return A valid handle to the library with owns class, null if the class + /// has no library or an error handle if the argument is not a valid handle + /// to a class type. + Object Dart_ClassLibrary( + Object cls_type, + ) { + return _Dart_ClassLibrary( + cls_type, + ); + } + + late final _Dart_ClassLibraryPtr = + _lookup>( + 'Dart_ClassLibrary'); + late final _Dart_ClassLibrary = + _Dart_ClassLibraryPtr.asFunction(); + + /// Does this Integer fit into a 64-bit signed integer? + /// + /// \param integer An integer. + /// \param fits Returns true if the integer fits into a 64-bit signed integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerFitsIntoInt64( + Object integer, + ffi.Pointer fits, + ) { + return _Dart_IntegerFitsIntoInt64( + integer, + fits, + ); + } + + late final _Dart_IntegerFitsIntoInt64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerFitsIntoInt64'); + late final _Dart_IntegerFitsIntoInt64 = _Dart_IntegerFitsIntoInt64Ptr + .asFunction)>(); + + /// Does this Integer fit into a 64-bit unsigned integer? + /// + /// \param integer An integer. + /// \param fits Returns true if the integer fits into a 64-bit unsigned integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerFitsIntoUint64( + Object integer, + ffi.Pointer fits, + ) { + return _Dart_IntegerFitsIntoUint64( + integer, + fits, + ); + } + + late final _Dart_IntegerFitsIntoUint64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer)>>('Dart_IntegerFitsIntoUint64'); + late final _Dart_IntegerFitsIntoUint64 = _Dart_IntegerFitsIntoUint64Ptr + .asFunction)>(); + + /// Returns an Integer with the provided value. + /// + /// \param value The value of the integer. + /// + /// \return The Integer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewInteger( + int value, + ) { + return _Dart_NewInteger( + value, + ); + } + + late final _Dart_NewIntegerPtr = + _lookup>( + 'Dart_NewInteger'); + late final _Dart_NewInteger = + _Dart_NewIntegerPtr.asFunction(); + + /// Returns an Integer with the provided value. + /// + /// \param value The unsigned value of the integer. + /// + /// \return The Integer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewIntegerFromUint64( + int value, + ) { + return _Dart_NewIntegerFromUint64( + value, + ); + } + + late final _Dart_NewIntegerFromUint64Ptr = + _lookup>( + 'Dart_NewIntegerFromUint64'); + late final _Dart_NewIntegerFromUint64 = + _Dart_NewIntegerFromUint64Ptr.asFunction(); + + /// Returns an Integer with the provided value. + /// + /// \param value The value of the integer represented as a C string + /// containing a hexadecimal number. + /// + /// \return The Integer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewIntegerFromHexCString( + ffi.Pointer value, + ) { + return _Dart_NewIntegerFromHexCString( + value, + ); + } + + late final _Dart_NewIntegerFromHexCStringPtr = + _lookup)>>( + 'Dart_NewIntegerFromHexCString'); + late final _Dart_NewIntegerFromHexCString = _Dart_NewIntegerFromHexCStringPtr + .asFunction)>(); + + /// Gets the value of an Integer. + /// + /// The integer must fit into a 64-bit signed integer, otherwise an error occurs. + /// + /// \param integer An Integer. + /// \param value Returns the value of the Integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerToInt64( + Object integer, + ffi.Pointer value, + ) { + return _Dart_IntegerToInt64( + integer, + value, + ); + } + + late final _Dart_IntegerToInt64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerToInt64'); + late final _Dart_IntegerToInt64 = _Dart_IntegerToInt64Ptr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Gets the value of an Integer. + /// + /// The integer must fit into a 64-bit unsigned integer, otherwise an + /// error occurs. + /// + /// \param integer An Integer. + /// \param value Returns the value of the Integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerToUint64( + Object integer, + ffi.Pointer value, + ) { + return _Dart_IntegerToUint64( + integer, + value, + ); + } + + late final _Dart_IntegerToUint64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerToUint64'); + late final _Dart_IntegerToUint64 = _Dart_IntegerToUint64Ptr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Gets the value of an integer as a hexadecimal C string. + /// + /// \param integer An Integer. + /// \param value Returns the value of the Integer as a hexadecimal C + /// string. This C string is scope allocated and is only valid until + /// the next call to Dart_ExitScope. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerToHexCString( + Object integer, + ffi.Pointer> value, + ) { + return _Dart_IntegerToHexCString( + integer, + value, + ); + } + + late final _Dart_IntegerToHexCStringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer>)>>('Dart_IntegerToHexCString'); + late final _Dart_IntegerToHexCString = + _Dart_IntegerToHexCStringPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); + + /// Returns a Double with the provided value. + /// + /// \param value A double. + /// + /// \return The Double object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewDouble( + double value, + ) { + return _Dart_NewDouble( + value, + ); + } + + late final _Dart_NewDoublePtr = + _lookup>( + 'Dart_NewDouble'); + late final _Dart_NewDouble = + _Dart_NewDoublePtr.asFunction(); + + /// Gets the value of a Double + /// + /// \param double_obj A Double + /// \param value Returns the value of the Double. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_DoubleValue( + Object double_obj, + ffi.Pointer value, + ) { + return _Dart_DoubleValue( + double_obj, + value, + ); + } + + late final _Dart_DoubleValuePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_DoubleValue'); + late final _Dart_DoubleValue = _Dart_DoubleValuePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Returns a closure of static function 'function_name' in the class 'class_name' + /// in the exported namespace of specified 'library'. + /// + /// \param library Library object + /// \param cls_type Type object representing a Class + /// \param function_name Name of the static function in the class + /// + /// \return A valid Dart instance if no error occurs during the operation. + Object Dart_GetStaticMethodClosure( + Object library1, + Object cls_type, + Object function_name, + ) { + return _Dart_GetStaticMethodClosure( + library1, + cls_type, + function_name, + ); + } + + late final _Dart_GetStaticMethodClosurePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Handle)>>('Dart_GetStaticMethodClosure'); + late final _Dart_GetStaticMethodClosure = _Dart_GetStaticMethodClosurePtr + .asFunction(); + + /// Returns the True object. + /// + /// Requires there to be a current isolate. + /// + /// \return A handle to the True object. + Object Dart_True() { + return _Dart_True(); + } + + late final _Dart_TruePtr = + _lookup>('Dart_True'); + late final _Dart_True = _Dart_TruePtr.asFunction(); + + /// Returns the False object. + /// + /// Requires there to be a current isolate. + /// + /// \return A handle to the False object. + Object Dart_False() { + return _Dart_False(); + } + + late final _Dart_FalsePtr = + _lookup>('Dart_False'); + late final _Dart_False = _Dart_FalsePtr.asFunction(); + + /// Returns a Boolean with the provided value. + /// + /// \param value true or false. + /// + /// \return The Boolean object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewBoolean( + bool value, + ) { + return _Dart_NewBoolean( + value, + ); + } + + late final _Dart_NewBooleanPtr = + _lookup>( + 'Dart_NewBoolean'); + late final _Dart_NewBoolean = + _Dart_NewBooleanPtr.asFunction(); + + /// Gets the value of a Boolean + /// + /// \param boolean_obj A Boolean + /// \param value Returns the value of the Boolean. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_BooleanValue( + Object boolean_obj, + ffi.Pointer value, + ) { + return _Dart_BooleanValue( + boolean_obj, + value, + ); + } + + late final _Dart_BooleanValuePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_BooleanValue'); + late final _Dart_BooleanValue = _Dart_BooleanValuePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Gets the length of a String. + /// + /// \param str A String. + /// \param length Returns the length of the String. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringLength( + Object str, + ffi.Pointer length, + ) { + return _Dart_StringLength( + str, + length, + ); + } + + late final _Dart_StringLengthPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_StringLength'); + late final _Dart_StringLength = _Dart_StringLengthPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Returns a String built from the provided C string + /// (There is an implicit assumption that the C string passed in contains + /// UTF-8 encoded characters and '\0' is considered as a termination + /// character). + /// + /// \param value A C String + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromCString( + ffi.Pointer str, + ) { + return _Dart_NewStringFromCString( + str, + ); + } + + late final _Dart_NewStringFromCStringPtr = + _lookup)>>( + 'Dart_NewStringFromCString'); + late final _Dart_NewStringFromCString = _Dart_NewStringFromCStringPtr + .asFunction)>(); + + /// Returns a String built from an array of UTF-8 encoded characters. + /// + /// \param utf8_array An array of UTF-8 encoded characters. + /// \param length The length of the codepoints array. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF8( + ffi.Pointer utf8_array, + int length, + ) { + return _Dart_NewStringFromUTF8( + utf8_array, + length, + ); + } + + late final _Dart_NewStringFromUTF8Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF8'); + late final _Dart_NewStringFromUTF8 = _Dart_NewStringFromUTF8Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); + + /// Returns a String built from an array of UTF-16 encoded characters. + /// + /// \param utf16_array An array of UTF-16 encoded characters. + /// \param length The length of the codepoints array. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF16( + ffi.Pointer utf16_array, + int length, + ) { + return _Dart_NewStringFromUTF16( + utf16_array, + length, + ); + } + + late final _Dart_NewStringFromUTF16Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF16'); + late final _Dart_NewStringFromUTF16 = _Dart_NewStringFromUTF16Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); + + /// Returns a String built from an array of UTF-32 encoded characters. + /// + /// \param utf32_array An array of UTF-32 encoded characters. + /// \param length The length of the codepoints array. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF32( + ffi.Pointer utf32_array, + int length, + ) { + return _Dart_NewStringFromUTF32( + utf32_array, + length, + ); + } + + late final _Dart_NewStringFromUTF32Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF32'); + late final _Dart_NewStringFromUTF32 = _Dart_NewStringFromUTF32Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); + + /// Returns a String which references an external array of + /// Latin-1 (ISO-8859-1) encoded characters. + /// + /// \param latin1_array Array of Latin-1 encoded characters. This must not move. + /// \param length The length of the characters array. + /// \param peer An external pointer to associate with this string. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A callback to be called when this string is finalized. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalLatin1String( + ffi.Pointer latin1_array, + int length, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewExternalLatin1String( + latin1_array, + length, + peer, + external_allocation_size, + callback, + ); + } + + late final _Dart_NewExternalLatin1StringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewExternalLatin1String'); + late final _Dart_NewExternalLatin1String = + _Dart_NewExternalLatin1StringPtr.asFunction< + Object Function(ffi.Pointer, int, ffi.Pointer, + int, Dart_HandleFinalizer)>(); + + /// Returns a String which references an external array of UTF-16 encoded + /// characters. + /// + /// \param utf16_array An array of UTF-16 encoded characters. This must not move. + /// \param length The length of the characters array. + /// \param peer An external pointer to associate with this string. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A callback to be called when this string is finalized. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalUTF16String( + ffi.Pointer utf16_array, + int length, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewExternalUTF16String( + utf16_array, + length, + peer, + external_allocation_size, + callback, + ); + } + + late final _Dart_NewExternalUTF16StringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewExternalUTF16String'); + late final _Dart_NewExternalUTF16String = + _Dart_NewExternalUTF16StringPtr.asFunction< + Object Function(ffi.Pointer, int, ffi.Pointer, + int, Dart_HandleFinalizer)>(); + + /// Gets the C string representation of a String. + /// (It is a sequence of UTF-8 encoded values with a '\0' termination.) + /// + /// \param str A string. + /// \param cstr Returns the String represented as a C string. + /// This C string is scope allocated and is only valid until + /// the next call to Dart_ExitScope. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToCString( + Object str, + ffi.Pointer> cstr, + ) { + return _Dart_StringToCString( + str, + cstr, + ); + } + + late final _Dart_StringToCStringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer>)>>('Dart_StringToCString'); + late final _Dart_StringToCString = _Dart_StringToCStringPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); + + /// Gets a UTF-8 encoded representation of a String. + /// + /// Any unpaired surrogate code points in the string will be converted as + /// replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need + /// to preserve unpaired surrogates, use the Dart_StringToUTF16 function. + /// + /// \param str A string. + /// \param utf8_array Returns the String represented as UTF-8 code + /// units. This UTF-8 array is scope allocated and is only valid + /// until the next call to Dart_ExitScope. + /// \param length Used to return the length of the array which was + /// actually used. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToUTF8( + Object str, + ffi.Pointer> utf8_array, + ffi.Pointer length, + ) { + return _Dart_StringToUTF8( + str, + utf8_array, + length, + ); + } + + late final _Dart_StringToUTF8Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer>, + ffi.Pointer)>>('Dart_StringToUTF8'); + late final _Dart_StringToUTF8 = _Dart_StringToUTF8Ptr.asFunction< + Object Function(Object, ffi.Pointer>, + ffi.Pointer)>(); + + /// Gets the data corresponding to the string object. This function returns + /// the data only for Latin-1 (ISO-8859-1) string objects. For all other + /// string objects it returns an error. + /// + /// \param str A string. + /// \param latin1_array An array allocated by the caller, used to return + /// the string data. + /// \param length Used to pass in the length of the provided array. + /// Used to return the length of the array which was actually used. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToLatin1( + Object str, + ffi.Pointer latin1_array, + ffi.Pointer length, + ) { + return _Dart_StringToLatin1( + str, + latin1_array, + length, + ); + } + + late final _Dart_StringToLatin1Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer, + ffi.Pointer)>>('Dart_StringToLatin1'); + late final _Dart_StringToLatin1 = _Dart_StringToLatin1Ptr.asFunction< + Object Function( + Object, ffi.Pointer, ffi.Pointer)>(); + + /// Gets the UTF-16 encoded representation of a string. + /// + /// \param str A string. + /// \param utf16_array An array allocated by the caller, used to return + /// the array of UTF-16 encoded characters. + /// \param length Used to pass in the length of the provided array. + /// Used to return the length of the array which was actually used. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToUTF16( + Object str, + ffi.Pointer utf16_array, + ffi.Pointer length, + ) { + return _Dart_StringToUTF16( + str, + utf16_array, + length, + ); + } + + late final _Dart_StringToUTF16Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer, + ffi.Pointer)>>('Dart_StringToUTF16'); + late final _Dart_StringToUTF16 = _Dart_StringToUTF16Ptr.asFunction< + Object Function( + Object, ffi.Pointer, ffi.Pointer)>(); + + /// Gets the storage size in bytes of a String. + /// + /// \param str A String. + /// \param length Returns the storage size in bytes of the String. + /// This is the size in bytes needed to store the String. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringStorageSize( + Object str, + ffi.Pointer size, + ) { + return _Dart_StringStorageSize( + str, + size, + ); + } + + late final _Dart_StringStorageSizePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_StringStorageSize'); + late final _Dart_StringStorageSize = _Dart_StringStorageSizePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Retrieves some properties associated with a String. + /// Properties retrieved are: + /// - character size of the string (one or two byte) + /// - length of the string + /// - peer pointer of string if it is an external string. + /// \param str A String. + /// \param char_size Returns the character size of the String. + /// \param str_len Returns the length of the String. + /// \param peer Returns the peer pointer associated with the String or 0 if + /// there is no peer pointer for it. + /// \return Success if no error occurs. Otherwise returns + /// an error handle. + Object Dart_StringGetProperties( + Object str, + ffi.Pointer char_size, + ffi.Pointer str_len, + ffi.Pointer> peer, + ) { + return _Dart_StringGetProperties( + str, + char_size, + str_len, + peer, + ); + } + + late final _Dart_StringGetPropertiesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('Dart_StringGetProperties'); + late final _Dart_StringGetProperties = + _Dart_StringGetPropertiesPtr.asFunction< + Object Function(Object, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + /// Returns a List of the desired length. + /// + /// \param length The length of the list. + /// + /// \return The List object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewList( + int length, + ) { + return _Dart_NewList( + length, + ); + } + + late final _Dart_NewListPtr = + _lookup>( + 'Dart_NewList'); + late final _Dart_NewList = + _Dart_NewListPtr.asFunction(); + + /// TODO(bkonyi): convert this to use nullable types once NNBD is enabled. + /// /** + /// * Returns a List of the desired length with the desired legacy element type. + /// * + /// * \param element_type_id The type of elements of the list. + /// * \param length The length of the list. + /// * + /// * \return The List object if no error occurs. Otherwise returns an error + /// * handle. + /// */ + Object Dart_NewListOf( + int element_type_id, + int length, + ) { + return _Dart_NewListOf( + element_type_id, + length, + ); + } + + late final _Dart_NewListOfPtr = + _lookup>( + 'Dart_NewListOf'); + late final _Dart_NewListOf = + _Dart_NewListOfPtr.asFunction(); + + /// Returns a List of the desired length with the desired element type. + /// + /// \param element_type Handle to a nullable type object. E.g., from + /// Dart_GetType or Dart_GetNullableType. + /// + /// \param length The length of the list. + /// + /// \return The List object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewListOfType( + Object element_type, + int length, + ) { + return _Dart_NewListOfType( + element_type, + length, + ); + } + + late final _Dart_NewListOfTypePtr = + _lookup>( + 'Dart_NewListOfType'); + late final _Dart_NewListOfType = + _Dart_NewListOfTypePtr.asFunction(); + + /// Returns a List of the desired length with the desired element type, filled + /// with the provided object. + /// + /// \param element_type Handle to a type object. E.g., from Dart_GetType. + /// + /// \param fill_object Handle to an object of type 'element_type' that will be + /// used to populate the list. This parameter can only be Dart_Null() if the + /// length of the list is 0 or 'element_type' is a nullable type. + /// + /// \param length The length of the list. + /// + /// \return The List object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewListOfTypeFilled( + Object element_type, + Object fill_object, + int length, + ) { + return _Dart_NewListOfTypeFilled( + element_type, + fill_object, + length, + ); + } + + late final _Dart_NewListOfTypeFilledPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Handle, ffi.IntPtr)>>('Dart_NewListOfTypeFilled'); + late final _Dart_NewListOfTypeFilled = _Dart_NewListOfTypeFilledPtr + .asFunction(); + + /// Gets the length of a List. + /// + /// May generate an unhandled exception error. + /// + /// \param list A List. + /// \param length Returns the length of the List. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_ListLength( + Object list, + ffi.Pointer length, + ) { + return _Dart_ListLength( + list, + length, + ); + } + + late final _Dart_ListLengthPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_ListLength'); + late final _Dart_ListLength = _Dart_ListLengthPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Gets the Object at some index of a List. + /// + /// If the index is out of bounds, an error occurs. + /// + /// May generate an unhandled exception error. + /// + /// \param list A List. + /// \param index A valid index into the List. + /// + /// \return The Object in the List at the specified index if no error + /// occurs. Otherwise returns an error handle. + Object Dart_ListGetAt( + Object list, + int index, + ) { + return _Dart_ListGetAt( + list, + index, + ); + } + + late final _Dart_ListGetAtPtr = + _lookup>( + 'Dart_ListGetAt'); + late final _Dart_ListGetAt = + _Dart_ListGetAtPtr.asFunction(); + + /// Gets a range of Objects from a List. + /// + /// If any of the requested index values are out of bounds, an error occurs. + /// + /// May generate an unhandled exception error. + /// + /// \param list A List. + /// \param offset The offset of the first item to get. + /// \param length The number of items to get. + /// \param result A pointer to fill with the objects. + /// + /// \return Success if no error occurs during the operation. + Object Dart_ListGetRange( + Object list, + int offset, + int length, + ffi.Pointer result, + ) { + return _Dart_ListGetRange( + list, + offset, + length, + result, + ); + } + + late final _Dart_ListGetRangePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.IntPtr, + ffi.Pointer)>>('Dart_ListGetRange'); + late final _Dart_ListGetRange = _Dart_ListGetRangePtr.asFunction< + Object Function(Object, int, int, ffi.Pointer)>(); + + /// Sets the Object at some index of a List. + /// + /// If the index is out of bounds, an error occurs. + /// + /// May generate an unhandled exception error. + /// + /// \param array A List. + /// \param index A valid index into the List. + /// \param value The Object to put in the List. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_ListSetAt( + Object list, + int index, + Object value, + ) { + return _Dart_ListSetAt( + list, + index, + value, + ); + } + + late final _Dart_ListSetAtPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.IntPtr, ffi.Handle)>>('Dart_ListSetAt'); + late final _Dart_ListSetAt = + _Dart_ListSetAtPtr.asFunction(); + + /// May generate an unhandled exception error. + Object Dart_ListGetAsBytes( + Object list, + int offset, + ffi.Pointer native_array, + int length, + ) { + return _Dart_ListGetAsBytes( + list, + offset, + native_array, + length, + ); + } + + late final _Dart_ListGetAsBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, + ffi.IntPtr)>>('Dart_ListGetAsBytes'); + late final _Dart_ListGetAsBytes = _Dart_ListGetAsBytesPtr.asFunction< + Object Function(Object, int, ffi.Pointer, int)>(); + + /// May generate an unhandled exception error. + Object Dart_ListSetAsBytes( + Object list, + int offset, + ffi.Pointer native_array, + int length, + ) { + return _Dart_ListSetAsBytes( + list, + offset, + native_array, + length, + ); + } + + late final _Dart_ListSetAsBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, + ffi.IntPtr)>>('Dart_ListSetAsBytes'); + late final _Dart_ListSetAsBytes = _Dart_ListSetAsBytesPtr.asFunction< + Object Function(Object, int, ffi.Pointer, int)>(); + + /// Gets the Object at some key of a Map. + /// + /// May generate an unhandled exception error. + /// + /// \param map A Map. + /// \param key An Object. + /// + /// \return The value in the map at the specified key, null if the map does not + /// contain the key, or an error handle. + Object Dart_MapGetAt( + Object map, + Object key, + ) { + return _Dart_MapGetAt( + map, + key, + ); + } + + late final _Dart_MapGetAtPtr = + _lookup>( + 'Dart_MapGetAt'); + late final _Dart_MapGetAt = + _Dart_MapGetAtPtr.asFunction(); + + /// Returns whether the Map contains a given key. + /// + /// May generate an unhandled exception error. + /// + /// \param map A Map. + /// + /// \return A handle on a boolean indicating whether map contains the key. + /// Otherwise returns an error handle. + Object Dart_MapContainsKey( + Object map, + Object key, + ) { + return _Dart_MapContainsKey( + map, + key, + ); + } + + late final _Dart_MapContainsKeyPtr = + _lookup>( + 'Dart_MapContainsKey'); + late final _Dart_MapContainsKey = + _Dart_MapContainsKeyPtr.asFunction(); + + /// Gets the list of keys of a Map. + /// + /// May generate an unhandled exception error. + /// + /// \param map A Map. + /// + /// \return The list of key Objects if no error occurs. Otherwise returns an + /// error handle. + Object Dart_MapKeys( + Object map, + ) { + return _Dart_MapKeys( + map, + ); + } + + late final _Dart_MapKeysPtr = + _lookup>( + 'Dart_MapKeys'); + late final _Dart_MapKeys = + _Dart_MapKeysPtr.asFunction(); + + /// Return type if this object is a TypedData object. + /// + /// \return kInvalid if the object is not a TypedData object or the appropriate + /// Dart_TypedData_Type. + int Dart_GetTypeOfTypedData( + Object object, + ) { + return _Dart_GetTypeOfTypedData( + object, + ); + } + + late final _Dart_GetTypeOfTypedDataPtr = + _lookup>( + 'Dart_GetTypeOfTypedData'); + late final _Dart_GetTypeOfTypedData = + _Dart_GetTypeOfTypedDataPtr.asFunction(); + + /// Return type if this object is an external TypedData object. + /// + /// \return kInvalid if the object is not an external TypedData object or + /// the appropriate Dart_TypedData_Type. + int Dart_GetTypeOfExternalTypedData( + Object object, + ) { + return _Dart_GetTypeOfExternalTypedData( + object, + ); + } + + late final _Dart_GetTypeOfExternalTypedDataPtr = + _lookup>( + 'Dart_GetTypeOfExternalTypedData'); + late final _Dart_GetTypeOfExternalTypedData = + _Dart_GetTypeOfExternalTypedDataPtr.asFunction(); + + /// Returns a TypedData object of the desired length and type. + /// + /// \param type The type of the TypedData object. + /// \param length The length of the TypedData object (length in type units). + /// + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewTypedData( + int type, + int length, + ) { + return _Dart_NewTypedData( + type, + length, + ); + } + + late final _Dart_NewTypedDataPtr = + _lookup>( + 'Dart_NewTypedData'); + late final _Dart_NewTypedData = + _Dart_NewTypedDataPtr.asFunction(); + + /// Returns a TypedData object which references an external data array. + /// + /// \param type The type of the data array. + /// \param data A data array. This array must not move. + /// \param length The length of the data array (length in type units). + /// + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalTypedData( + int type, + ffi.Pointer data, + int length, + ) { + return _Dart_NewExternalTypedData( + type, + data, + length, + ); + } + + late final _Dart_NewExternalTypedDataPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Int32, ffi.Pointer, + ffi.IntPtr)>>('Dart_NewExternalTypedData'); + late final _Dart_NewExternalTypedData = _Dart_NewExternalTypedDataPtr + .asFunction, int)>(); + + /// Returns a TypedData object which references an external data array. + /// + /// \param type The type of the data array. + /// \param data A data array. This array must not move. + /// \param length The length of the data array (length in type units). + /// \param peer A pointer to a native object or NULL. This value is + /// provided to callback when it is invoked. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A function pointer that will be invoked sometime + /// after the object is garbage collected, unless the handle has been deleted. + /// A valid callback needs to be specified it cannot be NULL. + /// + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalTypedDataWithFinalizer( + int type, + ffi.Pointer data, + int length, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewExternalTypedDataWithFinalizer( + type, + data, + length, + peer, + external_allocation_size, + callback, + ); + } + + late final _Dart_NewExternalTypedDataWithFinalizerPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Int32, + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewExternalTypedDataWithFinalizer'); + late final _Dart_NewExternalTypedDataWithFinalizer = + _Dart_NewExternalTypedDataWithFinalizerPtr.asFunction< + Object Function(int, ffi.Pointer, int, + ffi.Pointer, int, Dart_HandleFinalizer)>(); + + /// Returns a ByteBuffer object for the typed data. + /// + /// \param type_data The TypedData object. + /// + /// \return The ByteBuffer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewByteBuffer( + Object typed_data, + ) { + return _Dart_NewByteBuffer( + typed_data, + ); + } + + late final _Dart_NewByteBufferPtr = + _lookup>( + 'Dart_NewByteBuffer'); + late final _Dart_NewByteBuffer = + _Dart_NewByteBufferPtr.asFunction(); + + /// Acquires access to the internal data address of a TypedData object. + /// + /// \param object The typed data object whose internal data address is to + /// be accessed. + /// \param type The type of the object is returned here. + /// \param data The internal data address is returned here. + /// \param len Size of the typed array is returned here. + /// + /// Notes: + /// When the internal address of the object is acquired any calls to a + /// Dart API function that could potentially allocate an object or run + /// any Dart code will return an error. + /// + /// Any Dart API functions for accessing the data should not be called + /// before the corresponding release. In particular, the object should + /// not be acquired again before its release. This leads to undefined + /// behavior. + /// + /// \return Success if the internal data address is acquired successfully. + /// Otherwise, returns an error handle. + Object Dart_TypedDataAcquireData( + Object object, + ffi.Pointer type, + ffi.Pointer> data, + ffi.Pointer len, + ) { + return _Dart_TypedDataAcquireData( + object, + type, + data, + len, + ); + } + + late final _Dart_TypedDataAcquireDataPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('Dart_TypedDataAcquireData'); + late final _Dart_TypedDataAcquireData = + _Dart_TypedDataAcquireDataPtr.asFunction< + Object Function(Object, ffi.Pointer, + ffi.Pointer>, ffi.Pointer)>(); + + /// Releases access to the internal data address that was acquired earlier using + /// Dart_TypedDataAcquireData. + /// + /// \param object The typed data object whose internal data address is to be + /// released. + /// + /// \return Success if the internal data address is released successfully. + /// Otherwise, returns an error handle. + Object Dart_TypedDataReleaseData( + Object object, + ) { + return _Dart_TypedDataReleaseData( + object, + ); + } + + late final _Dart_TypedDataReleaseDataPtr = + _lookup>( + 'Dart_TypedDataReleaseData'); + late final _Dart_TypedDataReleaseData = + _Dart_TypedDataReleaseDataPtr.asFunction(); + + /// Returns the TypedData object associated with the ByteBuffer object. + /// + /// \param byte_buffer The ByteBuffer object. + /// + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_GetDataFromByteBuffer( + Object byte_buffer, + ) { + return _Dart_GetDataFromByteBuffer( + byte_buffer, + ); + } + + late final _Dart_GetDataFromByteBufferPtr = + _lookup>( + 'Dart_GetDataFromByteBuffer'); + late final _Dart_GetDataFromByteBuffer = + _Dart_GetDataFromByteBufferPtr.asFunction(); + + /// Invokes a constructor, creating a new object. + /// + /// This function allows hidden constructors (constructors with leading + /// underscores) to be called. + /// + /// \param type Type of object to be constructed. + /// \param constructor_name The name of the constructor to invoke. Use + /// Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. + /// This name should not include the name of the class. + /// \param number_of_arguments Size of the arguments array. + /// \param arguments An array of arguments to the constructor. + /// + /// \return If the constructor is called and completes successfully, + /// then the new object. If an error occurs during execution, then an + /// error handle is returned. + Object Dart_New( + Object type, + Object constructor_name, + int number_of_arguments, + ffi.Pointer arguments, + ) { + return _Dart_New( + type, + constructor_name, + number_of_arguments, + arguments, + ); + } + + late final _Dart_NewPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_New'); + late final _Dart_New = _Dart_NewPtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); + + /// Allocate a new object without invoking a constructor. + /// + /// \param type The type of an object to be allocated. + /// + /// \return The new object. If an error occurs during execution, then an + /// error handle is returned. + Object Dart_Allocate( + Object type, + ) { + return _Dart_Allocate( + type, + ); + } + + late final _Dart_AllocatePtr = + _lookup>( + 'Dart_Allocate'); + late final _Dart_Allocate = + _Dart_AllocatePtr.asFunction(); + + /// Allocate a new object without invoking a constructor, and sets specified + /// native fields. + /// + /// \param type The type of an object to be allocated. + /// \param num_native_fields The number of native fields to set. + /// \param native_fields An array containing the value of native fields. + /// + /// \return The new object. If an error occurs during execution, then an + /// error handle is returned. + Object Dart_AllocateWithNativeFields( + Object type, + int num_native_fields, + ffi.Pointer native_fields, + ) { + return _Dart_AllocateWithNativeFields( + type, + num_native_fields, + native_fields, + ); + } + + late final _Dart_AllocateWithNativeFieldsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_AllocateWithNativeFields'); + late final _Dart_AllocateWithNativeFields = _Dart_AllocateWithNativeFieldsPtr + .asFunction)>(); + + /// Invokes a method or function. + /// + /// The 'target' parameter may be an object, type, or library. If + /// 'target' is an object, then this function will invoke an instance + /// method. If 'target' is a type, then this function will invoke a + /// static method. If 'target' is a library, then this function will + /// invoke a top-level function from that library. + /// NOTE: This API call cannot be used to invoke methods of a type object. + /// + /// This function ignores visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param target An object, type, or library. + /// \param name The name of the function or method to invoke. + /// \param number_of_arguments Size of the arguments array. + /// \param arguments An array of arguments to the function. + /// + /// \return If the function or method is called and completes + /// successfully, then the return value is returned. If an error + /// occurs during execution, then an error handle is returned. + Object Dart_Invoke( + Object target, + Object name, + int number_of_arguments, + ffi.Pointer arguments, + ) { + return _Dart_Invoke( + target, + name, + number_of_arguments, + arguments, + ); + } + + late final _Dart_InvokePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_Invoke'); + late final _Dart_Invoke = _Dart_InvokePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); + + /// Invokes a Closure with the given arguments. + /// + /// May generate an unhandled exception error. + /// + /// \return If no error occurs during execution, then the result of + /// invoking the closure is returned. If an error occurs during + /// execution, then an error handle is returned. + Object Dart_InvokeClosure( + Object closure, + int number_of_arguments, + ffi.Pointer arguments, + ) { + return _Dart_InvokeClosure( + closure, + number_of_arguments, + arguments, + ); + } + + late final _Dart_InvokeClosurePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_InvokeClosure'); + late final _Dart_InvokeClosure = _Dart_InvokeClosurePtr.asFunction< + Object Function(Object, int, ffi.Pointer)>(); + + /// Invokes a Generative Constructor on an object that was previously + /// allocated using Dart_Allocate/Dart_AllocateWithNativeFields. + /// + /// The 'target' parameter must be an object. + /// + /// This function ignores visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param target An object. + /// \param name The name of the constructor to invoke. + /// Use Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. + /// \param number_of_arguments Size of the arguments array. + /// \param arguments An array of arguments to the function. + /// + /// \return If the constructor is called and completes + /// successfully, then the object is returned. If an error + /// occurs during execution, then an error handle is returned. + Object Dart_InvokeConstructor( + Object object, + Object name, + int number_of_arguments, + ffi.Pointer arguments, + ) { + return _Dart_InvokeConstructor( + object, + name, + number_of_arguments, + arguments, + ); + } + + late final _Dart_InvokeConstructorPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_InvokeConstructor'); + late final _Dart_InvokeConstructor = _Dart_InvokeConstructorPtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); + + /// Gets the value of a field. + /// + /// The 'container' parameter may be an object, type, or library. If + /// 'container' is an object, then this function will access an + /// instance field. If 'container' is a type, then this function will + /// access a static field. If 'container' is a library, then this + /// function will access a top-level variable. + /// NOTE: This API call cannot be used to access fields of a type object. + /// + /// This function ignores field visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param container An object, type, or library. + /// \param name A field name. + /// + /// \return If no error occurs, then the value of the field is + /// returned. Otherwise an error handle is returned. + Object Dart_GetField( + Object container, + Object name, + ) { + return _Dart_GetField( + container, + name, + ); + } + + late final _Dart_GetFieldPtr = + _lookup>( + 'Dart_GetField'); + late final _Dart_GetField = + _Dart_GetFieldPtr.asFunction(); + + /// Sets the value of a field. + /// + /// The 'container' parameter may actually be an object, type, or + /// library. If 'container' is an object, then this function will + /// access an instance field. If 'container' is a type, then this + /// function will access a static field. If 'container' is a library, + /// then this function will access a top-level variable. + /// NOTE: This API call cannot be used to access fields of a type object. + /// + /// This function ignores field visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param container An object, type, or library. + /// \param name A field name. + /// \param value The new field value. + /// + /// \return A valid handle if no error occurs. + Object Dart_SetField( + Object container, + Object name, + Object value, + ) { + return _Dart_SetField( + container, + name, + value, + ); + } + + late final _Dart_SetFieldPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Handle, ffi.Handle)>>('Dart_SetField'); + late final _Dart_SetField = + _Dart_SetFieldPtr.asFunction(); + + /// Throws an exception. + /// + /// This function causes a Dart language exception to be thrown. This + /// will proceed in the standard way, walking up Dart frames until an + /// appropriate 'catch' block is found, executing 'finally' blocks, + /// etc. + /// + /// If an error handle is passed into this function, the error is + /// propagated immediately. See Dart_PropagateError for a discussion + /// of error propagation. + /// + /// If successful, this function does not return. Note that this means + /// that the destructors of any stack-allocated C++ objects will not be + /// called. If there are no Dart frames on the stack, an error occurs. + /// + /// \return An error handle if the exception was not thrown. + /// Otherwise the function does not return. + Object Dart_ThrowException( + Object exception, + ) { + return _Dart_ThrowException( + exception, + ); + } + + late final _Dart_ThrowExceptionPtr = + _lookup>( + 'Dart_ThrowException'); + late final _Dart_ThrowException = + _Dart_ThrowExceptionPtr.asFunction(); + + /// Rethrows an exception. + /// + /// Rethrows an exception, unwinding all dart frames on the stack. If + /// successful, this function does not return. Note that this means + /// that the destructors of any stack-allocated C++ objects will not be + /// called. If there are no Dart frames on the stack, an error occurs. + /// + /// \return An error handle if the exception was not thrown. + /// Otherwise the function does not return. + Object Dart_ReThrowException( + Object exception, + Object stacktrace, + ) { + return _Dart_ReThrowException( + exception, + stacktrace, + ); + } + + late final _Dart_ReThrowExceptionPtr = + _lookup>( + 'Dart_ReThrowException'); + late final _Dart_ReThrowException = + _Dart_ReThrowExceptionPtr.asFunction(); + + /// Gets the number of native instance fields in an object. + Object Dart_GetNativeInstanceFieldCount( + Object obj, + ffi.Pointer count, + ) { + return _Dart_GetNativeInstanceFieldCount( + obj, + count, + ); + } + + late final _Dart_GetNativeInstanceFieldCountPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer)>>('Dart_GetNativeInstanceFieldCount'); + late final _Dart_GetNativeInstanceFieldCount = + _Dart_GetNativeInstanceFieldCountPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Gets the value of a native field. + /// + /// TODO(turnidge): Document. + Object Dart_GetNativeInstanceField( + Object obj, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeInstanceField( + obj, + index, + value, + ); + } + + late final _Dart_GetNativeInstanceFieldPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeInstanceField'); + late final _Dart_GetNativeInstanceField = _Dart_GetNativeInstanceFieldPtr + .asFunction)>(); + + /// Sets the value of a native field. + /// + /// TODO(turnidge): Document. + Object Dart_SetNativeInstanceField( + Object obj, + int index, + int value, + ) { + return _Dart_SetNativeInstanceField( + obj, + index, + value, + ); + } + + late final _Dart_SetNativeInstanceFieldPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Int, ffi.IntPtr)>>('Dart_SetNativeInstanceField'); + late final _Dart_SetNativeInstanceField = _Dart_SetNativeInstanceFieldPtr + .asFunction(); + + /// Extracts current isolate group data from the native arguments structure. + ffi.Pointer Dart_GetNativeIsolateGroupData( + Dart_NativeArguments args, + ) { + return _Dart_GetNativeIsolateGroupData( + args, + ); + } + + late final _Dart_GetNativeIsolateGroupDataPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + Dart_NativeArguments)>>('Dart_GetNativeIsolateGroupData'); + late final _Dart_GetNativeIsolateGroupData = + _Dart_GetNativeIsolateGroupDataPtr.asFunction< + ffi.Pointer Function(Dart_NativeArguments)>(); + + /// Gets the native arguments based on the types passed in and populates + /// the passed arguments buffer with appropriate native values. + /// + /// \param args the Native arguments block passed into the native call. + /// \param num_arguments length of argument descriptor array and argument + /// values array passed in. + /// \param arg_descriptors an array that describes the arguments that + /// need to be retrieved. For each argument to be retrieved the descriptor + /// contains the argument number (0, 1 etc.) and the argument type + /// described using Dart_NativeArgument_Type, e.g: + /// DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kBool, 1) indicates + /// that the first argument is to be retrieved and it should be a boolean. + /// \param arg_values array into which the native arguments need to be + /// extracted into, the array is allocated by the caller (it could be + /// stack allocated to avoid the malloc/free performance overhead). + /// + /// \return Success if all the arguments could be extracted correctly, + /// returns an error handle if there were any errors while extracting the + /// arguments (mismatched number of arguments, incorrect types, etc.). + Object Dart_GetNativeArguments( + Dart_NativeArguments args, + int num_arguments, + ffi.Pointer arg_descriptors, + ffi.Pointer arg_values, + ) { + return _Dart_GetNativeArguments( + args, + num_arguments, + arg_descriptors, + arg_values, + ); + } + + late final _Dart_GetNativeArgumentsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_NativeArguments, + ffi.Int, + ffi.Pointer, + ffi.Pointer)>>( + 'Dart_GetNativeArguments'); + late final _Dart_GetNativeArguments = _Dart_GetNativeArgumentsPtr.asFunction< + Object Function( + Dart_NativeArguments, + int, + ffi.Pointer, + ffi.Pointer)>(); + + /// Gets the native argument at some index. + Object Dart_GetNativeArgument( + Dart_NativeArguments args, + int index, + ) { + return _Dart_GetNativeArgument( + args, + index, + ); + } + + late final _Dart_GetNativeArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_NativeArguments, ffi.Int)>>('Dart_GetNativeArgument'); + late final _Dart_GetNativeArgument = _Dart_GetNativeArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int)>(); + + /// Gets the number of native arguments. + int Dart_GetNativeArgumentCount( + Dart_NativeArguments args, + ) { + return _Dart_GetNativeArgumentCount( + args, + ); + } + + late final _Dart_GetNativeArgumentCountPtr = + _lookup>( + 'Dart_GetNativeArgumentCount'); + late final _Dart_GetNativeArgumentCount = _Dart_GetNativeArgumentCountPtr + .asFunction(); + + /// Gets all the native fields of the native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param num_fields size of the intptr_t array 'field_values' passed in. + /// \param field_values intptr_t array in which native field values are returned. + /// \return Success if the native fields where copied in successfully. Otherwise + /// returns an error handle. On success the native field values are copied + /// into the 'field_values' array, if the argument at 'arg_index' is a + /// null object then 0 is copied as the native field values into the + /// 'field_values' array. + Object Dart_GetNativeFieldsOfArgument( + Dart_NativeArguments args, + int arg_index, + int num_fields, + ffi.Pointer field_values, + ) { + return _Dart_GetNativeFieldsOfArgument( + args, + arg_index, + num_fields, + field_values, + ); + } + + late final _Dart_GetNativeFieldsOfArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeFieldsOfArgument'); + late final _Dart_GetNativeFieldsOfArgument = + _Dart_GetNativeFieldsOfArgumentPtr.asFunction< + Object Function( + Dart_NativeArguments, int, int, ffi.Pointer)>(); + + /// Gets the native field of the receiver. + Object Dart_GetNativeReceiver( + Dart_NativeArguments args, + ffi.Pointer value, + ) { + return _Dart_GetNativeReceiver( + args, + value, + ); + } + + late final _Dart_GetNativeReceiverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, + ffi.Pointer)>>('Dart_GetNativeReceiver'); + late final _Dart_GetNativeReceiver = _Dart_GetNativeReceiverPtr.asFunction< + Object Function(Dart_NativeArguments, ffi.Pointer)>(); + + /// Gets a string native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param peer Returns the peer pointer if the string argument has one. + /// \return Success if the string argument has a peer, if it does not + /// have a peer then the String object is returned. Otherwise returns + /// an error handle (argument is not a String object). + Object Dart_GetNativeStringArgument( + Dart_NativeArguments args, + int arg_index, + ffi.Pointer> peer, + ) { + return _Dart_GetNativeStringArgument( + args, + arg_index, + peer, + ); + } + + late final _Dart_GetNativeStringArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer>)>>( + 'Dart_GetNativeStringArgument'); + late final _Dart_GetNativeStringArgument = + _Dart_GetNativeStringArgumentPtr.asFunction< + Object Function( + Dart_NativeArguments, int, ffi.Pointer>)>(); + + /// Gets an integer native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param value Returns the integer value if the argument is an Integer. + /// \return Success if no error occurs. Otherwise returns an error handle. + Object Dart_GetNativeIntegerArgument( + Dart_NativeArguments args, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeIntegerArgument( + args, + index, + value, + ); + } + + late final _Dart_GetNativeIntegerArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeIntegerArgument'); + late final _Dart_GetNativeIntegerArgument = + _Dart_GetNativeIntegerArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); + + /// Gets a boolean native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param value Returns the boolean value if the argument is a Boolean. + /// \return Success if no error occurs. Otherwise returns an error handle. + Object Dart_GetNativeBooleanArgument( + Dart_NativeArguments args, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeBooleanArgument( + args, + index, + value, + ); + } + + late final _Dart_GetNativeBooleanArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeBooleanArgument'); + late final _Dart_GetNativeBooleanArgument = + _Dart_GetNativeBooleanArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); + + /// Gets a double native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param value Returns the double value if the argument is a double. + /// \return Success if no error occurs. Otherwise returns an error handle. + Object Dart_GetNativeDoubleArgument( + Dart_NativeArguments args, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeDoubleArgument( + args, + index, + value, + ); + } + + late final _Dart_GetNativeDoubleArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeDoubleArgument'); + late final _Dart_GetNativeDoubleArgument = + _Dart_GetNativeDoubleArgumentPtr.asFunction< + Object Function( + Dart_NativeArguments, int, ffi.Pointer)>(); + + /// Sets the return value for a native function. + /// + /// If retval is an Error handle, then error will be propagated once + /// the native functions exits. See Dart_PropagateError for a + /// discussion of how different types of errors are propagated. + void Dart_SetReturnValue( + Dart_NativeArguments args, + Object retval, + ) { + return _Dart_SetReturnValue( + args, + retval, + ); + } + + late final _Dart_SetReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Handle)>>('Dart_SetReturnValue'); + late final _Dart_SetReturnValue = _Dart_SetReturnValuePtr.asFunction< + void Function(Dart_NativeArguments, Object)>(); + + void Dart_SetWeakHandleReturnValue( + Dart_NativeArguments args, + Dart_WeakPersistentHandle rval, + ) { + return _Dart_SetWeakHandleReturnValue( + args, + rval, + ); + } + + late final _Dart_SetWeakHandleReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(Dart_NativeArguments, + Dart_WeakPersistentHandle)>>('Dart_SetWeakHandleReturnValue'); + late final _Dart_SetWeakHandleReturnValue = + _Dart_SetWeakHandleReturnValuePtr.asFunction< + void Function(Dart_NativeArguments, Dart_WeakPersistentHandle)>(); + + void Dart_SetBooleanReturnValue( + Dart_NativeArguments args, + bool retval, + ) { + return _Dart_SetBooleanReturnValue( + args, + retval, + ); + } + + late final _Dart_SetBooleanReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Bool)>>('Dart_SetBooleanReturnValue'); + late final _Dart_SetBooleanReturnValue = _Dart_SetBooleanReturnValuePtr + .asFunction(); + + void Dart_SetIntegerReturnValue( + Dart_NativeArguments args, + int retval, + ) { + return _Dart_SetIntegerReturnValue( + args, + retval, + ); + } + + late final _Dart_SetIntegerReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Int64)>>('Dart_SetIntegerReturnValue'); + late final _Dart_SetIntegerReturnValue = _Dart_SetIntegerReturnValuePtr + .asFunction(); + + void Dart_SetDoubleReturnValue( + Dart_NativeArguments args, + double retval, + ) { + return _Dart_SetDoubleReturnValue( + args, + retval, + ); + } + + late final _Dart_SetDoubleReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Double)>>('Dart_SetDoubleReturnValue'); + late final _Dart_SetDoubleReturnValue = _Dart_SetDoubleReturnValuePtr + .asFunction(); + + /// Sets the environment callback for the current isolate. This + /// callback is used to lookup environment values by name in the + /// current environment. This enables the embedder to supply values for + /// the const constructors bool.fromEnvironment, int.fromEnvironment + /// and String.fromEnvironment. + Object Dart_SetEnvironmentCallback( + Dart_EnvironmentCallback callback, + ) { + return _Dart_SetEnvironmentCallback( + callback, + ); + } + + late final _Dart_SetEnvironmentCallbackPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetEnvironmentCallback'); + late final _Dart_SetEnvironmentCallback = _Dart_SetEnvironmentCallbackPtr + .asFunction(); + + /// Sets the callback used to resolve native functions for a library. + /// + /// \param library A library. + /// \param resolver A native entry resolver. + /// + /// \return A valid handle if the native resolver was set successfully. + Object Dart_SetNativeResolver( + Object library1, + Dart_NativeEntryResolver resolver, + Dart_NativeEntrySymbol symbol, + ) { + return _Dart_SetNativeResolver( + library1, + resolver, + symbol, + ); + } + + late final _Dart_SetNativeResolverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, Dart_NativeEntryResolver, + Dart_NativeEntrySymbol)>>('Dart_SetNativeResolver'); + late final _Dart_SetNativeResolver = _Dart_SetNativeResolverPtr.asFunction< + Object Function( + Object, Dart_NativeEntryResolver, Dart_NativeEntrySymbol)>(); + + /// Returns the callback used to resolve native functions for a library. + /// + /// \param library A library. + /// \param resolver a pointer to a Dart_NativeEntryResolver + /// + /// \return A valid handle if the library was found. + Object Dart_GetNativeResolver( + Object library1, + ffi.Pointer resolver, + ) { + return _Dart_GetNativeResolver( + library1, + resolver, + ); + } + + late final _Dart_GetNativeResolverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>( + 'Dart_GetNativeResolver'); + late final _Dart_GetNativeResolver = _Dart_GetNativeResolverPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Returns the callback used to resolve native function symbols for a library. + /// + /// \param library A library. + /// \param resolver a pointer to a Dart_NativeEntrySymbol. + /// + /// \return A valid handle if the library was found. + Object Dart_GetNativeSymbol( + Object library1, + ffi.Pointer resolver, + ) { + return _Dart_GetNativeSymbol( + library1, + resolver, + ); + } + + late final _Dart_GetNativeSymbolPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer)>>('Dart_GetNativeSymbol'); + late final _Dart_GetNativeSymbol = _Dart_GetNativeSymbolPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Sets the callback used to resolve FFI native functions for a library. + /// The resolved functions are expected to be a C function pointer of the + /// correct signature (as specified in the `@FfiNative()` function + /// annotation in Dart code). + /// + /// NOTE: This is an experimental feature and might change in the future. + /// + /// \param library A library. + /// \param resolver A native function resolver. + /// + /// \return A valid handle if the native resolver was set successfully. + Object Dart_SetFfiNativeResolver( + Object library1, + Dart_FfiNativeResolver resolver, + ) { + return _Dart_SetFfiNativeResolver( + library1, + resolver, + ); + } + + late final _Dart_SetFfiNativeResolverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + Dart_FfiNativeResolver)>>('Dart_SetFfiNativeResolver'); + late final _Dart_SetFfiNativeResolver = _Dart_SetFfiNativeResolverPtr + .asFunction(); + + /// Sets library tag handler for the current isolate. This handler is + /// used to handle the various tags encountered while loading libraries + /// or scripts in the isolate. + /// + /// \param handler Handler code to be used for handling the various tags + /// encountered while loading libraries or scripts in the isolate. + /// + /// \return If no error occurs, the handler is set for the isolate. + /// Otherwise an error handle is returned. + /// + /// TODO(turnidge): Document. + Object Dart_SetLibraryTagHandler( + Dart_LibraryTagHandler handler, + ) { + return _Dart_SetLibraryTagHandler( + handler, + ); + } + + late final _Dart_SetLibraryTagHandlerPtr = + _lookup>( + 'Dart_SetLibraryTagHandler'); + late final _Dart_SetLibraryTagHandler = _Dart_SetLibraryTagHandlerPtr + .asFunction(); + + /// Sets the deferred load handler for the current isolate. This handler is + /// used to handle loading deferred imports in an AppJIT or AppAOT program. + Object Dart_SetDeferredLoadHandler( + Dart_DeferredLoadHandler handler, + ) { + return _Dart_SetDeferredLoadHandler( + handler, + ); + } + + late final _Dart_SetDeferredLoadHandlerPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetDeferredLoadHandler'); + late final _Dart_SetDeferredLoadHandler = _Dart_SetDeferredLoadHandlerPtr + .asFunction(); + + /// Notifies the VM that a deferred load completed successfully. This function + /// will eventually cause the corresponding `prefix.loadLibrary()` futures to + /// complete. + /// + /// Requires the current isolate to be the same current isolate during the + /// invocation of the Dart_DeferredLoadHandler. + Object Dart_DeferredLoadComplete( + int loading_unit_id, + ffi.Pointer snapshot_data, + ffi.Pointer snapshot_instructions, + ) { + return _Dart_DeferredLoadComplete( + loading_unit_id, + snapshot_data, + snapshot_instructions, + ); + } + + late final _Dart_DeferredLoadCompletePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.IntPtr, ffi.Pointer, + ffi.Pointer)>>('Dart_DeferredLoadComplete'); + late final _Dart_DeferredLoadComplete = + _Dart_DeferredLoadCompletePtr.asFunction< + Object Function( + int, ffi.Pointer, ffi.Pointer)>(); + + /// Notifies the VM that a deferred load failed. This function + /// will eventually cause the corresponding `prefix.loadLibrary()` futures to + /// complete with an error. + /// + /// If `transient` is true, future invocations of `prefix.loadLibrary()` will + /// trigger new load requests. If false, futures invocation will complete with + /// the same error. + /// + /// Requires the current isolate to be the same current isolate during the + /// invocation of the Dart_DeferredLoadHandler. + Object Dart_DeferredLoadCompleteError( + int loading_unit_id, + ffi.Pointer error_message, + bool transient, + ) { + return _Dart_DeferredLoadCompleteError( + loading_unit_id, + error_message, + transient, + ); + } + + late final _Dart_DeferredLoadCompleteErrorPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.IntPtr, ffi.Pointer, + ffi.Bool)>>('Dart_DeferredLoadCompleteError'); + late final _Dart_DeferredLoadCompleteError = + _Dart_DeferredLoadCompleteErrorPtr.asFunction< + Object Function(int, ffi.Pointer, bool)>(); + + /// Canonicalizes a url with respect to some library. + /// + /// The url is resolved with respect to the library's url and some url + /// normalizations are performed. + /// + /// This canonicalization function should be sufficient for most + /// embedders to implement the Dart_kCanonicalizeUrl tag. + /// + /// \param base_url The base url relative to which the url is + /// being resolved. + /// \param url The url being resolved and canonicalized. This + /// parameter is a string handle. + /// + /// \return If no error occurs, a String object is returned. Otherwise + /// an error handle is returned. + Object Dart_DefaultCanonicalizeUrl( + Object base_url, + Object url, + ) { + return _Dart_DefaultCanonicalizeUrl( + base_url, + url, + ); + } + + late final _Dart_DefaultCanonicalizeUrlPtr = + _lookup>( + 'Dart_DefaultCanonicalizeUrl'); + late final _Dart_DefaultCanonicalizeUrl = _Dart_DefaultCanonicalizeUrlPtr + .asFunction(); + + /// Loads the root library for the current isolate. + /// + /// Requires there to be no current root library. + /// + /// \param buffer A buffer which contains a kernel binary (see + /// pkg/kernel/binary.md). Must remain valid until isolate group shutdown. + /// \param buffer_size Length of the passed in buffer. + /// + /// \return A handle to the root library, or an error. + Object Dart_LoadScriptFromKernel( + ffi.Pointer kernel_buffer, + int kernel_size, + ) { + return _Dart_LoadScriptFromKernel( + kernel_buffer, + kernel_size, + ); + } + + late final _Dart_LoadScriptFromKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_LoadScriptFromKernel'); + late final _Dart_LoadScriptFromKernel = _Dart_LoadScriptFromKernelPtr + .asFunction, int)>(); + + /// Gets the library for the root script for the current isolate. + /// + /// If the root script has not yet been set for the current isolate, + /// this function returns Dart_Null(). This function never returns an + /// error handle. + /// + /// \return Returns the root Library for the current isolate or Dart_Null(). + Object Dart_RootLibrary() { + return _Dart_RootLibrary(); + } + + late final _Dart_RootLibraryPtr = + _lookup>('Dart_RootLibrary'); + late final _Dart_RootLibrary = + _Dart_RootLibraryPtr.asFunction(); + + /// Sets the root library for the current isolate. + /// + /// \return Returns an error handle if `library` is not a library handle. + Object Dart_SetRootLibrary( + Object library1, + ) { + return _Dart_SetRootLibrary( + library1, + ); + } + + late final _Dart_SetRootLibraryPtr = + _lookup>( + 'Dart_SetRootLibrary'); + late final _Dart_SetRootLibrary = + _Dart_SetRootLibraryPtr.asFunction(); + + /// Lookup or instantiate a legacy type by name and type arguments from a + /// Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The class name for the type. + /// \param number_of_type_arguments Number of type arguments. + /// For non parametric types the number of type arguments would be 0. + /// \param type_arguments Pointer to an array of type arguments. + /// For non parameteric types a NULL would be passed in for this argument. + /// + /// \return If no error occurs, the type is returned. + /// Otherwise an error handle is returned. + Object Dart_GetType( + Object library1, + Object class_name, + int number_of_type_arguments, + ffi.Pointer type_arguments, + ) { + return _Dart_GetType( + library1, + class_name, + number_of_type_arguments, + type_arguments, + ); + } + + late final _Dart_GetTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_GetType'); + late final _Dart_GetType = _Dart_GetTypePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); + + /// Lookup or instantiate a nullable type by name and type arguments from + /// Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The class name for the type. + /// \param number_of_type_arguments Number of type arguments. + /// For non parametric types the number of type arguments would be 0. + /// \param type_arguments Pointer to an array of type arguments. + /// For non parameteric types a NULL would be passed in for this argument. + /// + /// \return If no error occurs, the type is returned. + /// Otherwise an error handle is returned. + Object Dart_GetNullableType( + Object library1, + Object class_name, + int number_of_type_arguments, + ffi.Pointer type_arguments, + ) { + return _Dart_GetNullableType( + library1, + class_name, + number_of_type_arguments, + type_arguments, + ); + } + + late final _Dart_GetNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_GetNullableType'); + late final _Dart_GetNullableType = _Dart_GetNullableTypePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); + + /// Lookup or instantiate a non-nullable type by name and type arguments from + /// Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The class name for the type. + /// \param number_of_type_arguments Number of type arguments. + /// For non parametric types the number of type arguments would be 0. + /// \param type_arguments Pointer to an array of type arguments. + /// For non parameteric types a NULL would be passed in for this argument. + /// + /// \return If no error occurs, the type is returned. + /// Otherwise an error handle is returned. + Object Dart_GetNonNullableType( + Object library1, + Object class_name, + int number_of_type_arguments, + ffi.Pointer type_arguments, + ) { + return _Dart_GetNonNullableType( + library1, + class_name, + number_of_type_arguments, + type_arguments, + ); + } + + late final _Dart_GetNonNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_GetNonNullableType'); + late final _Dart_GetNonNullableType = _Dart_GetNonNullableTypePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); + + /// Creates a nullable version of the provided type. + /// + /// \param type The type to be converted to a nullable type. + /// + /// \return If no error occurs, a nullable type is returned. + /// Otherwise an error handle is returned. + Object Dart_TypeToNullableType( + Object type, + ) { + return _Dart_TypeToNullableType( + type, + ); + } + + late final _Dart_TypeToNullableTypePtr = + _lookup>( + 'Dart_TypeToNullableType'); + late final _Dart_TypeToNullableType = + _Dart_TypeToNullableTypePtr.asFunction(); + + /// Creates a non-nullable version of the provided type. + /// + /// \param type The type to be converted to a non-nullable type. + /// + /// \return If no error occurs, a non-nullable type is returned. + /// Otherwise an error handle is returned. + Object Dart_TypeToNonNullableType( + Object type, + ) { + return _Dart_TypeToNonNullableType( + type, + ); + } + + late final _Dart_TypeToNonNullableTypePtr = + _lookup>( + 'Dart_TypeToNonNullableType'); + late final _Dart_TypeToNonNullableType = + _Dart_TypeToNonNullableTypePtr.asFunction(); + + /// A type's nullability. + /// + /// \param type A Dart type. + /// \param result An out parameter containing the result of the check. True if + /// the type is of the specified nullability, false otherwise. + /// + /// \return Returns an error handle if type is not of type Type. + Object Dart_IsNullableType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsNullableType( + type, + result, + ); + } + + late final _Dart_IsNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IsNullableType'); + late final _Dart_IsNullableType = _Dart_IsNullableTypePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + Object Dart_IsNonNullableType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsNonNullableType( + type, + result, + ); + } + + late final _Dart_IsNonNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IsNonNullableType'); + late final _Dart_IsNonNullableType = _Dart_IsNonNullableTypePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + Object Dart_IsLegacyType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsLegacyType( + type, + result, + ); + } + + late final _Dart_IsLegacyTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IsLegacyType'); + late final _Dart_IsLegacyType = _Dart_IsLegacyTypePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Lookup a class or interface by name from a Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The name of the class or interface. + /// + /// \return If no error occurs, the class or interface is + /// returned. Otherwise an error handle is returned. + Object Dart_GetClass( + Object library1, + Object class_name, + ) { + return _Dart_GetClass( + library1, + class_name, + ); + } + + late final _Dart_GetClassPtr = + _lookup>( + 'Dart_GetClass'); + late final _Dart_GetClass = + _Dart_GetClassPtr.asFunction(); + + /// Returns an import path to a Library, such as "file:///test.dart" or + /// "dart:core". + Object Dart_LibraryUrl( + Object library1, + ) { + return _Dart_LibraryUrl( + library1, + ); + } + + late final _Dart_LibraryUrlPtr = + _lookup>( + 'Dart_LibraryUrl'); + late final _Dart_LibraryUrl = + _Dart_LibraryUrlPtr.asFunction(); + + /// Returns a URL from which a Library was loaded. + Object Dart_LibraryResolvedUrl( + Object library1, + ) { + return _Dart_LibraryResolvedUrl( + library1, + ); + } + + late final _Dart_LibraryResolvedUrlPtr = + _lookup>( + 'Dart_LibraryResolvedUrl'); + late final _Dart_LibraryResolvedUrl = + _Dart_LibraryResolvedUrlPtr.asFunction(); + + /// \return An array of libraries. + Object Dart_GetLoadedLibraries() { + return _Dart_GetLoadedLibraries(); + } + + late final _Dart_GetLoadedLibrariesPtr = + _lookup>( + 'Dart_GetLoadedLibraries'); + late final _Dart_GetLoadedLibraries = + _Dart_GetLoadedLibrariesPtr.asFunction(); + + Object Dart_LookupLibrary( + Object url, + ) { + return _Dart_LookupLibrary( + url, + ); + } + + late final _Dart_LookupLibraryPtr = + _lookup>( + 'Dart_LookupLibrary'); + late final _Dart_LookupLibrary = + _Dart_LookupLibraryPtr.asFunction(); + + /// Report an loading error for the library. + /// + /// \param library The library that failed to load. + /// \param error The Dart error instance containing the load error. + /// + /// \return If the VM handles the error, the return value is + /// a null handle. If it doesn't handle the error, the error + /// object is returned. + Object Dart_LibraryHandleError( + Object library1, + Object error, + ) { + return _Dart_LibraryHandleError( + library1, + error, + ); + } + + late final _Dart_LibraryHandleErrorPtr = + _lookup>( + 'Dart_LibraryHandleError'); + late final _Dart_LibraryHandleError = + _Dart_LibraryHandleErrorPtr.asFunction(); + + /// Called by the embedder to load a partial program. Does not set the root + /// library. + /// + /// \param buffer A buffer which contains a kernel binary (see + /// pkg/kernel/binary.md). Must remain valid until isolate shutdown. + /// \param buffer_size Length of the passed in buffer. + /// + /// \return A handle to the main library of the compilation unit, or an error. + Object Dart_LoadLibraryFromKernel( + ffi.Pointer kernel_buffer, + int kernel_buffer_size, + ) { + return _Dart_LoadLibraryFromKernel( + kernel_buffer, + kernel_buffer_size, + ); + } + + late final _Dart_LoadLibraryFromKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_LoadLibraryFromKernel'); + late final _Dart_LoadLibraryFromKernel = _Dart_LoadLibraryFromKernelPtr + .asFunction, int)>(); + + /// Indicates that all outstanding load requests have been satisfied. + /// This finalizes all the new classes loaded and optionally completes + /// deferred library futures. + /// + /// Requires there to be a current isolate. + /// + /// \param complete_futures Specify true if all deferred library + /// futures should be completed, false otherwise. + /// + /// \return Success if all classes have been finalized and deferred library + /// futures are completed. Otherwise, returns an error. + Object Dart_FinalizeLoading( + bool complete_futures, + ) { + return _Dart_FinalizeLoading( + complete_futures, + ); + } + + late final _Dart_FinalizeLoadingPtr = + _lookup>( + 'Dart_FinalizeLoading'); + late final _Dart_FinalizeLoading = + _Dart_FinalizeLoadingPtr.asFunction(); + + /// Returns the value of peer field of 'object' in 'peer'. + /// + /// \param object An object. + /// \param peer An out parameter that returns the value of the peer + /// field. + /// + /// \return Returns an error if 'object' is a subtype of Null, num, or + /// bool. + Object Dart_GetPeer( + Object object, + ffi.Pointer> peer, + ) { + return _Dart_GetPeer( + object, + peer, + ); + } + + late final _Dart_GetPeerPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer>)>>('Dart_GetPeer'); + late final _Dart_GetPeer = _Dart_GetPeerPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); + + /// Sets the value of the peer field of 'object' to the value of + /// 'peer'. + /// + /// \param object An object. + /// \param peer A value to store in the peer field. + /// + /// \return Returns an error if 'object' is a subtype of Null, num, or + /// bool. + Object Dart_SetPeer( + Object object, + ffi.Pointer peer, + ) { + return _Dart_SetPeer( + object, + peer, + ); + } + + late final _Dart_SetPeerPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_SetPeer'); + late final _Dart_SetPeer = _Dart_SetPeerPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + bool Dart_IsKernelIsolate( + Dart_Isolate isolate, + ) { + return _Dart_IsKernelIsolate( + isolate, + ); + } + + late final _Dart_IsKernelIsolatePtr = + _lookup>( + 'Dart_IsKernelIsolate'); + late final _Dart_IsKernelIsolate = + _Dart_IsKernelIsolatePtr.asFunction(); + + bool Dart_KernelIsolateIsRunning() { + return _Dart_KernelIsolateIsRunning(); + } + + late final _Dart_KernelIsolateIsRunningPtr = + _lookup>( + 'Dart_KernelIsolateIsRunning'); + late final _Dart_KernelIsolateIsRunning = + _Dart_KernelIsolateIsRunningPtr.asFunction(); + + int Dart_KernelPort() { + return _Dart_KernelPort(); + } + + late final _Dart_KernelPortPtr = + _lookup>('Dart_KernelPort'); + late final _Dart_KernelPort = + _Dart_KernelPortPtr.asFunction(); + + /// Compiles the given `script_uri` to a kernel file. + /// + /// \param platform_kernel A buffer containing the kernel of the platform (e.g. + /// `vm_platform_strong.dill`). The VM does not take ownership of this memory. + /// + /// \param platform_kernel_size The length of the platform_kernel buffer. + /// + /// \param snapshot_compile Set to `true` when the compilation is for a snapshot. + /// This is used by the frontend to determine if compilation related information + /// should be printed to console (e.g., null safety mode). + /// + /// \param verbosity Specifies the logging behavior of the kernel compilation + /// service. + /// + /// \return Returns the result of the compilation. + /// + /// On a successful compilation the returned [Dart_KernelCompilationResult] has + /// a status of [Dart_KernelCompilationStatus_Ok] and the `kernel`/`kernel_size` + /// fields are set. The caller takes ownership of the malloc()ed buffer. + /// + /// On a failed compilation the `error` might be set describing the reason for + /// the failed compilation. The caller takes ownership of the malloc()ed + /// error. + /// + /// Requires there to be a current isolate. + Dart_KernelCompilationResult Dart_CompileToKernel( + ffi.Pointer script_uri, + ffi.Pointer platform_kernel, + int platform_kernel_size, + bool incremental_compile, + bool snapshot_compile, + ffi.Pointer package_config, + int verbosity, + ) { + return _Dart_CompileToKernel( + script_uri, + platform_kernel, + platform_kernel_size, + incremental_compile, + snapshot_compile, + package_config, + verbosity, + ); + } + + late final _Dart_CompileToKernelPtr = _lookup< + ffi.NativeFunction< + Dart_KernelCompilationResult Function( + ffi.Pointer, + ffi.Pointer, + ffi.IntPtr, + ffi.Bool, + ffi.Bool, + ffi.Pointer, + ffi.Int32)>>('Dart_CompileToKernel'); + late final _Dart_CompileToKernel = _Dart_CompileToKernelPtr.asFunction< + Dart_KernelCompilationResult Function( + ffi.Pointer, + ffi.Pointer, + int, + bool, + bool, + ffi.Pointer, + int)>(); + + Dart_KernelCompilationResult Dart_KernelListDependencies() { + return _Dart_KernelListDependencies(); + } + + late final _Dart_KernelListDependenciesPtr = + _lookup>( + 'Dart_KernelListDependencies'); + late final _Dart_KernelListDependencies = _Dart_KernelListDependenciesPtr + .asFunction(); + + /// Sets the kernel buffer which will be used to load Dart SDK sources + /// dynamically at runtime. + /// + /// \param platform_kernel A buffer containing kernel which has sources for the + /// Dart SDK populated. Note: The VM does not take ownership of this memory. + /// + /// \param platform_kernel_size The length of the platform_kernel buffer. + void Dart_SetDartLibrarySourcesKernel( + ffi.Pointer platform_kernel, + int platform_kernel_size, + ) { + return _Dart_SetDartLibrarySourcesKernel( + platform_kernel, + platform_kernel_size, + ); + } + + late final _Dart_SetDartLibrarySourcesKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_SetDartLibrarySourcesKernel'); + late final _Dart_SetDartLibrarySourcesKernel = + _Dart_SetDartLibrarySourcesKernelPtr.asFunction< + void Function(ffi.Pointer, int)>(); + + /// Detect the null safety opt-in status. + /// + /// When running from source, it is based on the opt-in status of `script_uri`. + /// When running from a kernel buffer, it is based on the mode used when + /// generating `kernel_buffer`. + /// When running from an appJIT or AOT snapshot, it is based on the mode used + /// when generating `snapshot_data`. + /// + /// \param script_uri Uri of the script that contains the source code + /// + /// \param package_config Uri of the package configuration file (either in format + /// of .packages or .dart_tool/package_config.json) for the null safety + /// detection to resolve package imports against. If this parameter is not + /// passed the package resolution of the parent isolate should be used. + /// + /// \param original_working_directory current working directory when the VM + /// process was launched, this is used to correctly resolve the path specified + /// for package_config. + /// + /// \param snapshot_data + /// + /// \param snapshot_instructions Buffers containing a snapshot of the + /// isolate or NULL if no snapshot is provided. If provided, the buffers must + /// remain valid until the isolate shuts down. + /// + /// \param kernel_buffer + /// + /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must + /// remain valid until isolate shutdown. + /// + /// \return Returns true if the null safety is opted in by the input being + /// run `script_uri`, `snapshot_data` or `kernel_buffer`. + bool Dart_DetectNullSafety( + ffi.Pointer script_uri, + ffi.Pointer package_config, + ffi.Pointer original_working_directory, + ffi.Pointer snapshot_data, + ffi.Pointer snapshot_instructions, + ffi.Pointer kernel_buffer, + int kernel_buffer_size, + ) { + return _Dart_DetectNullSafety( + script_uri, + package_config, + original_working_directory, + snapshot_data, + snapshot_instructions, + kernel_buffer, + kernel_buffer_size, + ); + } + + late final _Dart_DetectNullSafetyPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.IntPtr)>>('Dart_DetectNullSafety'); + late final _Dart_DetectNullSafety = _Dart_DetectNullSafetyPtr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + + /// Returns true if isolate is the service isolate. + /// + /// \param isolate An isolate + /// + /// \return Returns true if 'isolate' is the service isolate. + bool Dart_IsServiceIsolate( + Dart_Isolate isolate, + ) { + return _Dart_IsServiceIsolate( + isolate, + ); + } + + late final _Dart_IsServiceIsolatePtr = + _lookup>( + 'Dart_IsServiceIsolate'); + late final _Dart_IsServiceIsolate = + _Dart_IsServiceIsolatePtr.asFunction(); + + /// Writes the CPU profile to the timeline as a series of 'instant' events. + /// + /// Note that this is an expensive operation. + /// + /// \param main_port The main port of the Isolate whose profile samples to write. + /// \param error An optional error, must be free()ed by caller. + /// + /// \return Returns true if the profile is successfully written and false + /// otherwise. + bool Dart_WriteProfileToTimeline( + int main_port, + ffi.Pointer> error, + ) { + return _Dart_WriteProfileToTimeline( + main_port, + error, + ); + } + + late final _Dart_WriteProfileToTimelinePtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + Dart_Port, ffi.Pointer>)>>( + 'Dart_WriteProfileToTimeline'); + late final _Dart_WriteProfileToTimeline = _Dart_WriteProfileToTimelinePtr + .asFunction>)>(); + + /// Compiles all functions reachable from entry points and marks + /// the isolate to disallow future compilation. + /// + /// Entry points should be specified using `@pragma("vm:entry-point")` + /// annotation. + /// + /// \return An error handle if a compilation error or runtime error running const + /// constructors was encountered. + Object Dart_Precompile() { + return _Dart_Precompile(); + } + + late final _Dart_PrecompilePtr = + _lookup>('Dart_Precompile'); + late final _Dart_Precompile = + _Dart_PrecompilePtr.asFunction(); + + Object Dart_LoadingUnitLibraryUris( + int loading_unit_id, + ) { + return _Dart_LoadingUnitLibraryUris( + loading_unit_id, + ); + } + + late final _Dart_LoadingUnitLibraryUrisPtr = + _lookup>( + 'Dart_LoadingUnitLibraryUris'); + late final _Dart_LoadingUnitLibraryUris = + _Dart_LoadingUnitLibraryUrisPtr.asFunction(); + + /// Creates a precompiled snapshot. + /// - A root library must have been loaded. + /// - Dart_Precompile must have been called. + /// + /// Outputs an assembly file defining the symbols listed in the definitions + /// above. + /// + /// The assembly should be compiled as a static or shared library and linked or + /// loaded by the embedder. Running this snapshot requires a VM compiled with + /// DART_PRECOMPILED_SNAPSHOT. The kDartVmSnapshotData and + /// kDartVmSnapshotInstructions should be passed to Dart_Initialize. The + /// kDartIsolateSnapshotData and kDartIsolateSnapshotInstructions should be + /// passed to Dart_CreateIsolateGroup. + /// + /// The callback will be invoked one or more times to provide the assembly code. + /// + /// If stripped is true, then the assembly code will not include DWARF + /// debugging sections. + /// + /// If debug_callback_data is provided, debug_callback_data will be used with + /// the callback to provide separate debugging information. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateAppAOTSnapshotAsAssembly( + Dart_StreamingWriteCallback callback, + ffi.Pointer callback_data, + bool stripped, + ffi.Pointer debug_callback_data, + ) { + return _Dart_CreateAppAOTSnapshotAsAssembly( + callback, + callback_data, + stripped, + debug_callback_data, + ); + } + + late final _Dart_CreateAppAOTSnapshotAsAssemblyPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_StreamingWriteCallback, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsAssembly'); + late final _Dart_CreateAppAOTSnapshotAsAssembly = + _Dart_CreateAppAOTSnapshotAsAssemblyPtr.asFunction< + Object Function(Dart_StreamingWriteCallback, ffi.Pointer, + bool, ffi.Pointer)>(); + + Object Dart_CreateAppAOTSnapshotAsAssemblies( + Dart_CreateLoadingUnitCallback next_callback, + ffi.Pointer next_callback_data, + bool stripped, + Dart_StreamingWriteCallback write_callback, + Dart_StreamingCloseCallback close_callback, + ) { + return _Dart_CreateAppAOTSnapshotAsAssemblies( + next_callback, + next_callback_data, + stripped, + write_callback, + close_callback, + ); + } + + late final _Dart_CreateAppAOTSnapshotAsAssembliesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + ffi.Bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>>( + 'Dart_CreateAppAOTSnapshotAsAssemblies'); + late final _Dart_CreateAppAOTSnapshotAsAssemblies = + _Dart_CreateAppAOTSnapshotAsAssembliesPtr.asFunction< + Object Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>(); + + /// Creates a precompiled snapshot. + /// - A root library must have been loaded. + /// - Dart_Precompile must have been called. + /// + /// Outputs an ELF shared library defining the symbols + /// - _kDartVmSnapshotData + /// - _kDartVmSnapshotInstructions + /// - _kDartIsolateSnapshotData + /// - _kDartIsolateSnapshotInstructions + /// + /// The shared library should be dynamically loaded by the embedder. + /// Running this snapshot requires a VM compiled with DART_PRECOMPILED_SNAPSHOT. + /// The kDartVmSnapshotData and kDartVmSnapshotInstructions should be passed to + /// Dart_Initialize. The kDartIsolateSnapshotData and + /// kDartIsolateSnapshotInstructions should be passed to Dart_CreateIsolate. + /// + /// The callback will be invoked one or more times to provide the binary output. + /// + /// If stripped is true, then the binary output will not include DWARF + /// debugging sections. + /// + /// If debug_callback_data is provided, debug_callback_data will be used with + /// the callback to provide separate debugging information. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateAppAOTSnapshotAsElf( + Dart_StreamingWriteCallback callback, + ffi.Pointer callback_data, + bool stripped, + ffi.Pointer debug_callback_data, + ) { + return _Dart_CreateAppAOTSnapshotAsElf( + callback, + callback_data, + stripped, + debug_callback_data, + ); + } + + late final _Dart_CreateAppAOTSnapshotAsElfPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_StreamingWriteCallback, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsElf'); + late final _Dart_CreateAppAOTSnapshotAsElf = + _Dart_CreateAppAOTSnapshotAsElfPtr.asFunction< + Object Function(Dart_StreamingWriteCallback, ffi.Pointer, + bool, ffi.Pointer)>(); + + Object Dart_CreateAppAOTSnapshotAsElfs( + Dart_CreateLoadingUnitCallback next_callback, + ffi.Pointer next_callback_data, + bool stripped, + Dart_StreamingWriteCallback write_callback, + Dart_StreamingCloseCallback close_callback, + ) { + return _Dart_CreateAppAOTSnapshotAsElfs( + next_callback, + next_callback_data, + stripped, + write_callback, + close_callback, + ); + } + + late final _Dart_CreateAppAOTSnapshotAsElfsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + ffi.Bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>>('Dart_CreateAppAOTSnapshotAsElfs'); + late final _Dart_CreateAppAOTSnapshotAsElfs = + _Dart_CreateAppAOTSnapshotAsElfsPtr.asFunction< + Object Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>(); + + /// Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes + /// kDartVmSnapshotData and kDartVmSnapshotInstructions. It also does + /// not strip DWARF information from the generated assembly or allow for + /// separate debug information. + Object Dart_CreateVMAOTSnapshotAsAssembly( + Dart_StreamingWriteCallback callback, + ffi.Pointer callback_data, + ) { + return _Dart_CreateVMAOTSnapshotAsAssembly( + callback, + callback_data, + ); + } + + late final _Dart_CreateVMAOTSnapshotAsAssemblyPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_StreamingWriteCallback, + ffi.Pointer)>>('Dart_CreateVMAOTSnapshotAsAssembly'); + late final _Dart_CreateVMAOTSnapshotAsAssembly = + _Dart_CreateVMAOTSnapshotAsAssemblyPtr.asFunction< + Object Function( + Dart_StreamingWriteCallback, ffi.Pointer)>(); + + /// Sorts the class-ids in depth first traversal order of the inheritance + /// tree. This is a costly operation, but it can make method dispatch + /// more efficient and is done before writing snapshots. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_SortClasses() { + return _Dart_SortClasses(); + } + + late final _Dart_SortClassesPtr = + _lookup>('Dart_SortClasses'); + late final _Dart_SortClasses = + _Dart_SortClassesPtr.asFunction(); + + /// Creates a snapshot that caches compiled code and type feedback for faster + /// startup and quicker warmup in a subsequent process. + /// + /// Outputs a snapshot in two pieces. The pieces should be passed to + /// Dart_CreateIsolateGroup in a VM using the same VM snapshot pieces used in the + /// current VM. The instructions piece must be loaded with read and execute + /// permissions; the data piece may be loaded as read-only. + /// + /// - Requires the VM to have not been started with --precompilation. + /// - Not supported when targeting IA32. + /// - The VM writing the snapshot and the VM reading the snapshot must be the + /// same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must + /// be targeting the same architecture, and must both be in checked mode or + /// both in unchecked mode. + /// + /// The buffers are scope allocated and are only valid until the next call to + /// Dart_ExitScope. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateAppJITSnapshotAsBlobs( + ffi.Pointer> isolate_snapshot_data_buffer, + ffi.Pointer isolate_snapshot_data_size, + ffi.Pointer> isolate_snapshot_instructions_buffer, + ffi.Pointer isolate_snapshot_instructions_size, + ) { + return _Dart_CreateAppJITSnapshotAsBlobs( + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + isolate_snapshot_instructions_buffer, + isolate_snapshot_instructions_size, + ); + } + + late final _Dart_CreateAppJITSnapshotAsBlobsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('Dart_CreateAppJITSnapshotAsBlobs'); + late final _Dart_CreateAppJITSnapshotAsBlobs = + _Dart_CreateAppJITSnapshotAsBlobsPtr.asFunction< + Object Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); + + /// Like Dart_CreateAppJITSnapshotAsBlobs, but also creates a new VM snapshot. + Object Dart_CreateCoreJITSnapshotAsBlobs( + ffi.Pointer> vm_snapshot_data_buffer, + ffi.Pointer vm_snapshot_data_size, + ffi.Pointer> vm_snapshot_instructions_buffer, + ffi.Pointer vm_snapshot_instructions_size, + ffi.Pointer> isolate_snapshot_data_buffer, + ffi.Pointer isolate_snapshot_data_size, + ffi.Pointer> isolate_snapshot_instructions_buffer, + ffi.Pointer isolate_snapshot_instructions_size, + ) { + return _Dart_CreateCoreJITSnapshotAsBlobs( + vm_snapshot_data_buffer, + vm_snapshot_data_size, + vm_snapshot_instructions_buffer, + vm_snapshot_instructions_size, + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + isolate_snapshot_instructions_buffer, + isolate_snapshot_instructions_size, + ); + } + + late final _Dart_CreateCoreJITSnapshotAsBlobsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('Dart_CreateCoreJITSnapshotAsBlobs'); + late final _Dart_CreateCoreJITSnapshotAsBlobs = + _Dart_CreateCoreJITSnapshotAsBlobsPtr.asFunction< + Object Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); + + /// Get obfuscation map for precompiled code. + /// + /// Obfuscation map is encoded as a JSON array of pairs (original name, + /// obfuscated name). + /// + /// \return Returns an error handler if the VM was built in a mode that does not + /// support obfuscation. + Object Dart_GetObfuscationMap( + ffi.Pointer> buffer, + ffi.Pointer buffer_length, + ) { + return _Dart_GetObfuscationMap( + buffer, + buffer_length, + ); + } + + late final _Dart_GetObfuscationMapPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer>, + ffi.Pointer)>>('Dart_GetObfuscationMap'); + late final _Dart_GetObfuscationMap = _Dart_GetObfuscationMapPtr.asFunction< + Object Function( + ffi.Pointer>, ffi.Pointer)>(); + + /// Returns whether the VM only supports running from precompiled snapshots and + /// not from any other kind of snapshot or from source (that is, the VM was + /// compiled with DART_PRECOMPILED_RUNTIME). + bool Dart_IsPrecompiledRuntime() { + return _Dart_IsPrecompiledRuntime(); + } + + late final _Dart_IsPrecompiledRuntimePtr = + _lookup>( + 'Dart_IsPrecompiledRuntime'); + late final _Dart_IsPrecompiledRuntime = + _Dart_IsPrecompiledRuntimePtr.asFunction(); + + /// Print a native stack trace. Used for crash handling. + /// + /// If context is NULL, prints the current stack trace. Otherwise, context + /// should be a CONTEXT* (Windows) or ucontext_t* (POSIX) from a signal handler + /// running on the current thread. + void Dart_DumpNativeStackTrace( + ffi.Pointer context, + ) { + return _Dart_DumpNativeStackTrace( + context, + ); + } + + late final _Dart_DumpNativeStackTracePtr = + _lookup)>>( + 'Dart_DumpNativeStackTrace'); + late final _Dart_DumpNativeStackTrace = _Dart_DumpNativeStackTracePtr + .asFunction)>(); + + /// Indicate that the process is about to abort, and the Dart VM should not + /// attempt to cleanup resources. + void Dart_PrepareToAbort() { + return _Dart_PrepareToAbort(); + } + + late final _Dart_PrepareToAbortPtr = + _lookup>('Dart_PrepareToAbort'); + late final _Dart_PrepareToAbort = + _Dart_PrepareToAbortPtr.asFunction(); + + /// Posts a message on some port. The message will contain the Dart_CObject + /// object graph rooted in 'message'. + /// + /// While the message is being sent the state of the graph of Dart_CObject + /// structures rooted in 'message' should not be accessed, as the message + /// generation will make temporary modifications to the data. When the message + /// has been sent the graph will be fully restored. + /// + /// If true is returned, the message was enqueued, and finalizers for external + /// typed data will eventually run, even if the receiving isolate shuts down + /// before processing the message. If false is returned, the message was not + /// enqueued and ownership of external typed data in the message remains with the + /// caller. + /// + /// This function may be called on any thread when the VM is running (that is, + /// after Dart_Initialize has returned and before Dart_Cleanup has been called). + /// + /// \param port_id The destination port. + /// \param message The message to send. + /// + /// \return True if the message was posted. + bool Dart_PostCObject( + int port_id, + ffi.Pointer message, + ) { + return _Dart_PostCObject( + port_id, + message, + ); + } + + late final _Dart_PostCObjectPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + Dart_Port, ffi.Pointer)>>('Dart_PostCObject'); + late final _Dart_PostCObject = _Dart_PostCObjectPtr.asFunction< + bool Function(int, ffi.Pointer)>(); + + /// Posts a message on some port. The message will contain the integer 'message'. + /// + /// \param port_id The destination port. + /// \param message The message to send. + /// + /// \return True if the message was posted. + bool Dart_PostInteger( + int port_id, + int message, + ) { + return _Dart_PostInteger( + port_id, + message, + ); + } + + late final _Dart_PostIntegerPtr = + _lookup>( + 'Dart_PostInteger'); + late final _Dart_PostInteger = + _Dart_PostIntegerPtr.asFunction(); + + /// Creates a new native port. When messages are received on this + /// native port, then they will be dispatched to the provided native + /// message handler. + /// + /// \param name The name of this port in debugging messages. + /// \param handler The C handler to run when messages arrive on the port. + /// \param handle_concurrently Is it okay to process requests on this + /// native port concurrently? + /// + /// \return If successful, returns the port id for the native port. In + /// case of error, returns ILLEGAL_PORT. + int Dart_NewNativePort( + ffi.Pointer name, + Dart_NativeMessageHandler handler, + bool handle_concurrently, + ) { + return _Dart_NewNativePort( + name, + handler, + handle_concurrently, + ); + } + + late final _Dart_NewNativePortPtr = _lookup< + ffi.NativeFunction< + Dart_Port Function(ffi.Pointer, Dart_NativeMessageHandler, + ffi.Bool)>>('Dart_NewNativePort'); + late final _Dart_NewNativePort = _Dart_NewNativePortPtr.asFunction< + int Function(ffi.Pointer, Dart_NativeMessageHandler, bool)>(); + + /// Closes the native port with the given id. + /// + /// The port must have been allocated by a call to Dart_NewNativePort. + /// + /// \param native_port_id The id of the native port to close. + /// + /// \return Returns true if the port was closed successfully. + bool Dart_CloseNativePort( + int native_port_id, + ) { + return _Dart_CloseNativePort( + native_port_id, + ); + } + + late final _Dart_CloseNativePortPtr = + _lookup>( + 'Dart_CloseNativePort'); + late final _Dart_CloseNativePort = + _Dart_CloseNativePortPtr.asFunction(); + + /// Forces all loaded classes and functions to be compiled eagerly in + /// the current isolate.. + /// + /// TODO(turnidge): Document. + Object Dart_CompileAll() { + return _Dart_CompileAll(); + } + + late final _Dart_CompileAllPtr = + _lookup>('Dart_CompileAll'); + late final _Dart_CompileAll = + _Dart_CompileAllPtr.asFunction(); + + /// Finalizes all classes. + Object Dart_FinalizeAllClasses() { + return _Dart_FinalizeAllClasses(); + } + + late final _Dart_FinalizeAllClassesPtr = + _lookup>( + 'Dart_FinalizeAllClasses'); + late final _Dart_FinalizeAllClasses = + _Dart_FinalizeAllClassesPtr.asFunction(); + + /// This function is intentionally undocumented. + /// + /// It should not be used outside internal tests. + ffi.Pointer Dart_ExecuteInternalCommand( + ffi.Pointer command, + ffi.Pointer arg, + ) { + return _Dart_ExecuteInternalCommand( + command, + arg, + ); + } + + late final _Dart_ExecuteInternalCommandPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>('Dart_ExecuteInternalCommand'); + late final _Dart_ExecuteInternalCommand = + _Dart_ExecuteInternalCommandPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + /// \mainpage Dynamically Linked Dart API + /// + /// This exposes a subset of symbols from dart_api.h and dart_native_api.h + /// available in every Dart embedder through dynamic linking. + /// + /// All symbols are postfixed with _DL to indicate that they are dynamically + /// linked and to prevent conflicts with the original symbol. + /// + /// Link `dart_api_dl.c` file into your library and invoke + /// `Dart_InitializeApiDL` with `NativeApi.initializeApiDLData`. + int Dart_InitializeApiDL( + ffi.Pointer data, + ) { + return _Dart_InitializeApiDL( + data, + ); + } + + late final _Dart_InitializeApiDLPtr = + _lookup)>>( + 'Dart_InitializeApiDL'); + late final _Dart_InitializeApiDL = _Dart_InitializeApiDLPtr.asFunction< + int Function(ffi.Pointer)>(); + + late final ffi.Pointer _Dart_PostCObject_DL = + _lookup('Dart_PostCObject_DL'); + + Dart_PostCObject_Type get Dart_PostCObject_DL => _Dart_PostCObject_DL.value; + + set Dart_PostCObject_DL(Dart_PostCObject_Type value) => + _Dart_PostCObject_DL.value = value; + + late final ffi.Pointer _Dart_PostInteger_DL = + _lookup('Dart_PostInteger_DL'); + + Dart_PostInteger_Type get Dart_PostInteger_DL => _Dart_PostInteger_DL.value; + + set Dart_PostInteger_DL(Dart_PostInteger_Type value) => + _Dart_PostInteger_DL.value = value; + + late final ffi.Pointer _Dart_NewNativePort_DL = + _lookup('Dart_NewNativePort_DL'); + + Dart_NewNativePort_Type get Dart_NewNativePort_DL => + _Dart_NewNativePort_DL.value; + + set Dart_NewNativePort_DL(Dart_NewNativePort_Type value) => + _Dart_NewNativePort_DL.value = value; + + late final ffi.Pointer _Dart_CloseNativePort_DL = + _lookup('Dart_CloseNativePort_DL'); + + Dart_CloseNativePort_Type get Dart_CloseNativePort_DL => + _Dart_CloseNativePort_DL.value; + + set Dart_CloseNativePort_DL(Dart_CloseNativePort_Type value) => + _Dart_CloseNativePort_DL.value = value; + + late final ffi.Pointer _Dart_IsError_DL = + _lookup('Dart_IsError_DL'); + + Dart_IsError_Type get Dart_IsError_DL => _Dart_IsError_DL.value; + + set Dart_IsError_DL(Dart_IsError_Type value) => + _Dart_IsError_DL.value = value; + + late final ffi.Pointer _Dart_IsApiError_DL = + _lookup('Dart_IsApiError_DL'); + + Dart_IsApiError_Type get Dart_IsApiError_DL => _Dart_IsApiError_DL.value; + + set Dart_IsApiError_DL(Dart_IsApiError_Type value) => + _Dart_IsApiError_DL.value = value; + + late final ffi.Pointer + _Dart_IsUnhandledExceptionError_DL = + _lookup( + 'Dart_IsUnhandledExceptionError_DL'); + + Dart_IsUnhandledExceptionError_Type get Dart_IsUnhandledExceptionError_DL => + _Dart_IsUnhandledExceptionError_DL.value; + + set Dart_IsUnhandledExceptionError_DL( + Dart_IsUnhandledExceptionError_Type value) => + _Dart_IsUnhandledExceptionError_DL.value = value; + + late final ffi.Pointer + _Dart_IsCompilationError_DL = + _lookup('Dart_IsCompilationError_DL'); + + Dart_IsCompilationError_Type get Dart_IsCompilationError_DL => + _Dart_IsCompilationError_DL.value; + + set Dart_IsCompilationError_DL(Dart_IsCompilationError_Type value) => + _Dart_IsCompilationError_DL.value = value; + + late final ffi.Pointer _Dart_IsFatalError_DL = + _lookup('Dart_IsFatalError_DL'); + + Dart_IsFatalError_Type get Dart_IsFatalError_DL => + _Dart_IsFatalError_DL.value; + + set Dart_IsFatalError_DL(Dart_IsFatalError_Type value) => + _Dart_IsFatalError_DL.value = value; + + late final ffi.Pointer _Dart_GetError_DL = + _lookup('Dart_GetError_DL'); + + Dart_GetError_Type get Dart_GetError_DL => _Dart_GetError_DL.value; + + set Dart_GetError_DL(Dart_GetError_Type value) => + _Dart_GetError_DL.value = value; + + late final ffi.Pointer + _Dart_ErrorHasException_DL = + _lookup('Dart_ErrorHasException_DL'); + + Dart_ErrorHasException_Type get Dart_ErrorHasException_DL => + _Dart_ErrorHasException_DL.value; + + set Dart_ErrorHasException_DL(Dart_ErrorHasException_Type value) => + _Dart_ErrorHasException_DL.value = value; + + late final ffi.Pointer + _Dart_ErrorGetException_DL = + _lookup('Dart_ErrorGetException_DL'); + + Dart_ErrorGetException_Type get Dart_ErrorGetException_DL => + _Dart_ErrorGetException_DL.value; + + set Dart_ErrorGetException_DL(Dart_ErrorGetException_Type value) => + _Dart_ErrorGetException_DL.value = value; + + late final ffi.Pointer + _Dart_ErrorGetStackTrace_DL = + _lookup('Dart_ErrorGetStackTrace_DL'); + + Dart_ErrorGetStackTrace_Type get Dart_ErrorGetStackTrace_DL => + _Dart_ErrorGetStackTrace_DL.value; + + set Dart_ErrorGetStackTrace_DL(Dart_ErrorGetStackTrace_Type value) => + _Dart_ErrorGetStackTrace_DL.value = value; + + late final ffi.Pointer _Dart_NewApiError_DL = + _lookup('Dart_NewApiError_DL'); + + Dart_NewApiError_Type get Dart_NewApiError_DL => _Dart_NewApiError_DL.value; + + set Dart_NewApiError_DL(Dart_NewApiError_Type value) => + _Dart_NewApiError_DL.value = value; + + late final ffi.Pointer + _Dart_NewCompilationError_DL = + _lookup('Dart_NewCompilationError_DL'); + + Dart_NewCompilationError_Type get Dart_NewCompilationError_DL => + _Dart_NewCompilationError_DL.value; + + set Dart_NewCompilationError_DL(Dart_NewCompilationError_Type value) => + _Dart_NewCompilationError_DL.value = value; + + late final ffi.Pointer + _Dart_NewUnhandledExceptionError_DL = + _lookup( + 'Dart_NewUnhandledExceptionError_DL'); + + Dart_NewUnhandledExceptionError_Type get Dart_NewUnhandledExceptionError_DL => + _Dart_NewUnhandledExceptionError_DL.value; + + set Dart_NewUnhandledExceptionError_DL( + Dart_NewUnhandledExceptionError_Type value) => + _Dart_NewUnhandledExceptionError_DL.value = value; + + late final ffi.Pointer _Dart_PropagateError_DL = + _lookup('Dart_PropagateError_DL'); + + Dart_PropagateError_Type get Dart_PropagateError_DL => + _Dart_PropagateError_DL.value; + + set Dart_PropagateError_DL(Dart_PropagateError_Type value) => + _Dart_PropagateError_DL.value = value; + + late final ffi.Pointer + _Dart_HandleFromPersistent_DL = + _lookup('Dart_HandleFromPersistent_DL'); + + Dart_HandleFromPersistent_Type get Dart_HandleFromPersistent_DL => + _Dart_HandleFromPersistent_DL.value; + + set Dart_HandleFromPersistent_DL(Dart_HandleFromPersistent_Type value) => + _Dart_HandleFromPersistent_DL.value = value; + + late final ffi.Pointer + _Dart_HandleFromWeakPersistent_DL = + _lookup( + 'Dart_HandleFromWeakPersistent_DL'); + + Dart_HandleFromWeakPersistent_Type get Dart_HandleFromWeakPersistent_DL => + _Dart_HandleFromWeakPersistent_DL.value; + + set Dart_HandleFromWeakPersistent_DL( + Dart_HandleFromWeakPersistent_Type value) => + _Dart_HandleFromWeakPersistent_DL.value = value; + + late final ffi.Pointer + _Dart_NewPersistentHandle_DL = + _lookup('Dart_NewPersistentHandle_DL'); + + Dart_NewPersistentHandle_Type get Dart_NewPersistentHandle_DL => + _Dart_NewPersistentHandle_DL.value; + + set Dart_NewPersistentHandle_DL(Dart_NewPersistentHandle_Type value) => + _Dart_NewPersistentHandle_DL.value = value; + + late final ffi.Pointer + _Dart_SetPersistentHandle_DL = + _lookup('Dart_SetPersistentHandle_DL'); + + Dart_SetPersistentHandle_Type get Dart_SetPersistentHandle_DL => + _Dart_SetPersistentHandle_DL.value; + + set Dart_SetPersistentHandle_DL(Dart_SetPersistentHandle_Type value) => + _Dart_SetPersistentHandle_DL.value = value; + + late final ffi.Pointer + _Dart_DeletePersistentHandle_DL = + _lookup( + 'Dart_DeletePersistentHandle_DL'); + + Dart_DeletePersistentHandle_Type get Dart_DeletePersistentHandle_DL => + _Dart_DeletePersistentHandle_DL.value; + + set Dart_DeletePersistentHandle_DL(Dart_DeletePersistentHandle_Type value) => + _Dart_DeletePersistentHandle_DL.value = value; + + late final ffi.Pointer + _Dart_NewWeakPersistentHandle_DL = + _lookup( + 'Dart_NewWeakPersistentHandle_DL'); + + Dart_NewWeakPersistentHandle_Type get Dart_NewWeakPersistentHandle_DL => + _Dart_NewWeakPersistentHandle_DL.value; + + set Dart_NewWeakPersistentHandle_DL( + Dart_NewWeakPersistentHandle_Type value) => + _Dart_NewWeakPersistentHandle_DL.value = value; + + late final ffi.Pointer + _Dart_DeleteWeakPersistentHandle_DL = + _lookup( + 'Dart_DeleteWeakPersistentHandle_DL'); + + Dart_DeleteWeakPersistentHandle_Type get Dart_DeleteWeakPersistentHandle_DL => + _Dart_DeleteWeakPersistentHandle_DL.value; + + set Dart_DeleteWeakPersistentHandle_DL( + Dart_DeleteWeakPersistentHandle_Type value) => + _Dart_DeleteWeakPersistentHandle_DL.value = value; + + late final ffi.Pointer + _Dart_UpdateExternalSize_DL = + _lookup('Dart_UpdateExternalSize_DL'); + + Dart_UpdateExternalSize_Type get Dart_UpdateExternalSize_DL => + _Dart_UpdateExternalSize_DL.value; + + set Dart_UpdateExternalSize_DL(Dart_UpdateExternalSize_Type value) => + _Dart_UpdateExternalSize_DL.value = value; + + late final ffi.Pointer + _Dart_NewFinalizableHandle_DL = + _lookup('Dart_NewFinalizableHandle_DL'); + + Dart_NewFinalizableHandle_Type get Dart_NewFinalizableHandle_DL => + _Dart_NewFinalizableHandle_DL.value; + + set Dart_NewFinalizableHandle_DL(Dart_NewFinalizableHandle_Type value) => + _Dart_NewFinalizableHandle_DL.value = value; + + late final ffi.Pointer + _Dart_DeleteFinalizableHandle_DL = + _lookup( + 'Dart_DeleteFinalizableHandle_DL'); + + Dart_DeleteFinalizableHandle_Type get Dart_DeleteFinalizableHandle_DL => + _Dart_DeleteFinalizableHandle_DL.value; + + set Dart_DeleteFinalizableHandle_DL( + Dart_DeleteFinalizableHandle_Type value) => + _Dart_DeleteFinalizableHandle_DL.value = value; + + late final ffi.Pointer + _Dart_UpdateFinalizableExternalSize_DL = + _lookup( + 'Dart_UpdateFinalizableExternalSize_DL'); + + Dart_UpdateFinalizableExternalSize_Type + get Dart_UpdateFinalizableExternalSize_DL => + _Dart_UpdateFinalizableExternalSize_DL.value; + + set Dart_UpdateFinalizableExternalSize_DL( + Dart_UpdateFinalizableExternalSize_Type value) => + _Dart_UpdateFinalizableExternalSize_DL.value = value; + + late final ffi.Pointer _Dart_Post_DL = + _lookup('Dart_Post_DL'); + + Dart_Post_Type get Dart_Post_DL => _Dart_Post_DL.value; + + set Dart_Post_DL(Dart_Post_Type value) => _Dart_Post_DL.value = value; + + late final ffi.Pointer _Dart_NewSendPort_DL = + _lookup('Dart_NewSendPort_DL'); + + Dart_NewSendPort_Type get Dart_NewSendPort_DL => _Dart_NewSendPort_DL.value; + + set Dart_NewSendPort_DL(Dart_NewSendPort_Type value) => + _Dart_NewSendPort_DL.value = value; + + late final ffi.Pointer _Dart_SendPortGetId_DL = + _lookup('Dart_SendPortGetId_DL'); + + Dart_SendPortGetId_Type get Dart_SendPortGetId_DL => + _Dart_SendPortGetId_DL.value; + + set Dart_SendPortGetId_DL(Dart_SendPortGetId_Type value) => + _Dart_SendPortGetId_DL.value = value; + + late final ffi.Pointer _Dart_EnterScope_DL = + _lookup('Dart_EnterScope_DL'); + + Dart_EnterScope_Type get Dart_EnterScope_DL => _Dart_EnterScope_DL.value; + + set Dart_EnterScope_DL(Dart_EnterScope_Type value) => + _Dart_EnterScope_DL.value = value; + + late final ffi.Pointer _Dart_ExitScope_DL = + _lookup('Dart_ExitScope_DL'); + + Dart_ExitScope_Type get Dart_ExitScope_DL => _Dart_ExitScope_DL.value; + + set Dart_ExitScope_DL(Dart_ExitScope_Type value) => + _Dart_ExitScope_DL.value = value; + + late final _class_CUPHTTPTaskConfiguration1 = + _getClass1("CUPHTTPTaskConfiguration"); + late final _sel_initWithPort_1 = _registerName1("initWithPort:"); + ffi.Pointer _objc_msgSend_323( + ffi.Pointer obj, + ffi.Pointer sel, + int sendPort, + ) { + return __objc_msgSend_323( + obj, + sel, + sendPort, + ); + } + + late final __objc_msgSend_323Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, Dart_Port)>>('objc_msgSend'); + late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_sendPort1 = _registerName1("sendPort"); + late final _class_CUPHTTPClientDelegate1 = + _getClass1("CUPHTTPClientDelegate"); + late final _sel_registerTask_withConfiguration_1 = + _registerName1("registerTask:withConfiguration:"); + void _objc_msgSend_324( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer config, + ) { + return __objc_msgSend_324( + obj, + sel, + task, + config, + ); + } + + late final __objc_msgSend_324Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_CUPHTTPForwardedDelegate1 = + _getClass1("CUPHTTPForwardedDelegate"); + late final _sel_initWithSession_task_1 = + _registerName1("initWithSession:task:"); + ffi.Pointer _objc_msgSend_325( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ) { + return __objc_msgSend_325( + obj, + sel, + session, + task, + ); + } + + late final __objc_msgSend_325Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_finish1 = _registerName1("finish"); + late final _sel_session1 = _registerName1("session"); + late final _sel_task1 = _registerName1("task"); + ffi.Pointer _objc_msgSend_326( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_326( + obj, + sel, + ); + } + + late final __objc_msgSend_326Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSLock1 = _getClass1("NSLock"); + late final _sel_lock1 = _registerName1("lock"); + ffi.Pointer _objc_msgSend_327( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_327( + obj, + sel, + ); + } + + late final __objc_msgSend_327Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_CUPHTTPForwardedRedirect1 = + _getClass1("CUPHTTPForwardedRedirect"); + late final _sel_initWithSession_task_response_request_1 = + _registerName1("initWithSession:task:response:request:"); + ffi.Pointer _objc_msgSend_328( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer response, + ffi.Pointer request, + ) { + return __objc_msgSend_328( + obj, + sel, + session, + task, + response, + request, + ); + } + + late final __objc_msgSend_328Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); + void _objc_msgSend_329( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_329( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_329Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_330( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_330( + obj, + sel, + ); + } + + late final __objc_msgSend_330Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_redirectRequest1 = _registerName1("redirectRequest"); + late final _class_CUPHTTPForwardedResponse1 = + _getClass1("CUPHTTPForwardedResponse"); + late final _sel_initWithSession_task_response_1 = + _registerName1("initWithSession:task:response:"); + ffi.Pointer _objc_msgSend_331( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer response, + ) { + return __objc_msgSend_331( + obj, + sel, + session, + task, + response, + ); + } + + late final __objc_msgSend_331Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_finishWithDisposition_1 = + _registerName1("finishWithDisposition:"); + void _objc_msgSend_332( + ffi.Pointer obj, + ffi.Pointer sel, + int disposition, + ) { + return __objc_msgSend_332( + obj, + sel, + disposition, + ); + } + + late final __objc_msgSend_332Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_disposition1 = _registerName1("disposition"); + int _objc_msgSend_333( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_333( + obj, + sel, + ); + } + + late final __objc_msgSend_333Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); + late final _sel_initWithSession_task_data_1 = + _registerName1("initWithSession:task:data:"); + ffi.Pointer _objc_msgSend_334( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer data, + ) { + return __objc_msgSend_334( + obj, + sel, + session, + task, + data, + ); + } + + late final __objc_msgSend_334Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _class_CUPHTTPForwardedComplete1 = + _getClass1("CUPHTTPForwardedComplete"); + late final _sel_initWithSession_task_error_1 = + _registerName1("initWithSession:task:error:"); + ffi.Pointer _objc_msgSend_335( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer error, + ) { + return __objc_msgSend_335( + obj, + sel, + session, + task, + error, + ); + } + + late final __objc_msgSend_335Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _class_CUPHTTPForwardedFinishedDownloading1 = + _getClass1("CUPHTTPForwardedFinishedDownloading"); + late final _sel_initWithSession_downloadTask_url_1 = + _registerName1("initWithSession:downloadTask:url:"); + ffi.Pointer _objc_msgSend_336( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer downloadTask, + ffi.Pointer location, + ) { + return __objc_msgSend_336( + obj, + sel, + session, + downloadTask, + location, + ); + } + + late final __objc_msgSend_336Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_location1 = _registerName1("location"); +} + +/// Immutable Array +class _ObjCWrapper implements ffi.Finalizable { + final ffi.Pointer _id; + final NativeCupertinoHttp _lib; + bool _pendingRelease; + + _ObjCWrapper._(this._id, this._lib, + {bool retain = false, bool release = false}) + : _pendingRelease = release { + if (retain) { + _lib._objc_retain(_id); + } + if (release) { + _lib._objc_releaseFinalizer1.attach(this, _id.cast(), detach: this); + } + } + + /// Releases the reference to the underlying ObjC object held by this wrapper. + /// Throws a StateError if this wrapper doesn't currently hold a reference. + void release() { + if (_pendingRelease) { + _pendingRelease = false; + _lib._objc_release(_id); + _lib._objc_releaseFinalizer1.detach(this); + } else { + throw StateError( + 'Released an ObjC object that was unowned or already released.'); + } + } + + @override + bool operator ==(Object other) { + return other is _ObjCWrapper && _id == other._id; + } + + @override + int get hashCode => _id.hashCode; +} + +class NSArray extends NSObject { + NSArray._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSArray] that points to the same underlying object as [other]. + static NSArray castFrom(T other) { + return NSArray._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSArray] that wraps the given raw object pointer. + static NSArray castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSArray._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSArray]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); + } + + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); + } + + NSObject objectAtIndex_(int index) { + final _ret = _lib._objc_msgSend_146(_id, _lib._sel_objectAtIndex_1, index); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + NSArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_147( + _id, _lib._sel_initWithObjects_count_1, objects, cnt); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray arrayByAddingObject_(NSObject anObject) { + final _ret = _lib._objc_msgSend_73( + _id, _lib._sel_arrayByAddingObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray arrayByAddingObjectsFromArray_(NSArray? otherArray) { + final _ret = _lib._objc_msgSend_148( + _id, + _lib._sel_arrayByAddingObjectsFromArray_1, + otherArray?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString componentsJoinedByString_(NSString? separator) { + final _ret = _lib._objc_msgSend_149(_id, + _lib._sel_componentsJoinedByString_1, separator?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool containsObject_(NSObject anObject) { + return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); + } + + NSString? get description { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_68( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_indent_(NSObject locale, int level) { + final _ret = _lib._objc_msgSend_74( + _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSObject firstObjectCommonWithArray_(NSArray? otherArray) { + final _ret = _lib._objc_msgSend_86(_id, + _lib._sel_firstObjectCommonWithArray_1, otherArray?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void getObjects_range_( + ffi.Pointer> objects, NSRange range) { + return _lib._objc_msgSend_150( + _id, _lib._sel_getObjects_range_1, objects, range); + } + + int indexOfObject_(NSObject anObject) { + return _lib._objc_msgSend_151(_id, _lib._sel_indexOfObject_1, anObject._id); + } + + int indexOfObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_152( + _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); + } + + int indexOfObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_151( + _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); + } + + int indexOfObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_152( + _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); + } + + bool isEqualToArray_(NSArray? otherArray) { + return _lib._objc_msgSend_153( + _id, _lib._sel_isEqualToArray_1, otherArray?._id ?? ffi.nullptr); + } + + NSObject get firstObject { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_firstObject1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject get lastObject { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_lastObject1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSArray array(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithObject_(NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_71( + _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithObjects_count_(NativeCupertinoHttp _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_147( + _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithObjects_( + NativeCupertinoHttp _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_71( + _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithArray_(NativeCupertinoHttp _lib, NSArray? array) { + final _ret = _lib._objc_msgSend_86(_lib._class_NSArray1, + _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithObjects_(NSObject firstObj) { + final _ret = + _lib._objc_msgSend_71(_id, _lib._sel_initWithObjects_1, firstObj._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithArray_(NSArray? array) { + final _ret = _lib._objc_msgSend_86( + _id, _lib._sel_initWithArray_1, array?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithArray_copyItems_(NSArray? array, bool flag) { + final _ret = _lib._objc_msgSend_154(_id, + _lib._sel_initWithArray_copyItems_1, array?._id ?? ffi.nullptr, flag); + return NSArray._(_ret, _lib, retain: false, release: true); + } + + /// Reads array stored in NSPropertyList format from the specified url. + NSArray initWithContentsOfURL_error_( + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_155( + _id, + _lib._sel_initWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + /// Reads array stored in NSPropertyList format from the specified url. + static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_155( + _lib._class_NSArray1, + _lib._sel_arrayWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead. + void getObjects_(ffi.Pointer> objects) { + return _lib._objc_msgSend_156(_id, _lib._sel_getObjects_1, objects); + } + + /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. + static NSArray arrayWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_157(_lib._class_NSArray1, + _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_158(_lib._class_NSArray1, + _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_157( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_158( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_24(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_79(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } + + static NSArray new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); + return NSArray._(_ret, _lib, retain: false, release: true); + } + + static NSArray alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); + return NSArray._(_ret, _lib, retain: false, release: true); + } +} + +class ObjCSel extends ffi.Opaque {} + +class ObjCObject extends ffi.Opaque {} + +class NSObject extends _ObjCWrapper { + NSObject._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSObject] that points to the same underlying object as [other]. + static NSObject castFrom(T other) { + return NSObject._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSObject] that wraps the given raw object pointer. + static NSObject castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSObject._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSObject]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); + } + + static void load(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); + } + + static void initialize(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); + } + + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + void dealloc() { + return _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); + } + + void finalize() { + return _lib._objc_msgSend_1(_id, _lib._sel_finalize1); + } + + NSObject copy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + NSObject mutableCopy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject copyWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject mutableCopyWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static bool instancesRespondToSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_4(_lib._class_NSObject1, + _lib._sel_instancesRespondToSelector_1, aSelector); + } + + static bool conformsToProtocol_( + NativeCupertinoHttp _lib, Protocol? protocol) { + return _lib._objc_msgSend_5(_lib._class_NSObject1, + _lib._sel_conformsToProtocol_1, protocol?._id ?? ffi.nullptr); + } + + IMP methodForSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); + } + + static IMP instanceMethodForSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_lib._class_NSObject1, + _lib._sel_instanceMethodForSelector_1, aSelector); + } + + void doesNotRecognizeSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_7( + _id, _lib._sel_doesNotRecognizeSelector_1, aSelector); + } + + NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_8( + _id, _lib._sel_forwardingTargetForSelector_1, aSelector); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void forwardInvocation_(NSInvocation? anInvocation) { + return _lib._objc_msgSend_9( + _id, _lib._sel_forwardInvocation_1, anInvocation?._id ?? ffi.nullptr); + } + + NSMethodSignature methodSignatureForSelector_( + ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_10( + _id, _lib._sel_methodSignatureForSelector_1, aSelector); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); + } + + static NSMethodSignature instanceMethodSignatureForSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_10(_lib._class_NSObject1, + _lib._sel_instanceMethodSignatureForSelector_1, aSelector); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); + } + + bool allowsWeakReference() { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsWeakReference1); + } + + bool retainWeakReference() { + return _lib._objc_msgSend_11(_id, _lib._sel_retainWeakReference1); + } + + static bool isSubclassOfClass_(NativeCupertinoHttp _lib, NSObject aClass) { + return _lib._objc_msgSend_0( + _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); + } + + static bool resolveClassMethod_( + NativeCupertinoHttp _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); + } + + static bool resolveInstanceMethod_( + NativeCupertinoHttp _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); + } + + static int hash(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); + } + + static NSObject superclass(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject class1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSString description(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_19(_lib._class_NSObject1, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString debugDescription(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_19( + _lib._class_NSObject1, _lib._sel_debugDescription1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void URL_resourceDataDidBecomeAvailable_(NSURL? sender, NSData? newBytes) { + return _lib._objc_msgSend_141( + _id, + _lib._sel_URL_resourceDataDidBecomeAvailable_1, + sender?._id ?? ffi.nullptr, + newBytes?._id ?? ffi.nullptr); + } + + void URLResourceDidFinishLoading_(NSURL? sender) { + return _lib._objc_msgSend_142(_id, _lib._sel_URLResourceDidFinishLoading_1, + sender?._id ?? ffi.nullptr); + } + + void URLResourceDidCancelLoading_(NSURL? sender) { + return _lib._objc_msgSend_142(_id, _lib._sel_URLResourceDidCancelLoading_1, + sender?._id ?? ffi.nullptr); + } + + void URL_resourceDidFailLoadingWithReason_(NSURL? sender, NSString? reason) { + return _lib._objc_msgSend_143( + _id, + _lib._sel_URL_resourceDidFailLoadingWithReason_1, + sender?._id ?? ffi.nullptr, + reason?._id ?? ffi.nullptr); + } + + /// Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: + /// + /// - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; + /// + /// The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. + void + attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( + NSError? error, + int recoveryOptionIndex, + NSObject delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo) { + return _lib._objc_msgSend_144( + _id, + _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, + error?._id ?? ffi.nullptr, + recoveryOptionIndex, + delegate._id, + didRecoverSelector, + contextInfo); + } + + /// Given that an error alert has been presented applicaton-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and return YES if error recovery was completely successful, NO otherwise. The recovery option index is an index into the error's array of localized recovery options. + bool attemptRecoveryFromError_optionIndex_( + NSError? error, int recoveryOptionIndex) { + return _lib._objc_msgSend_145( + _id, + _lib._sel_attemptRecoveryFromError_optionIndex_1, + error?._id ?? ffi.nullptr, + recoveryOptionIndex); + } +} + +typedef instancetype = ffi.Pointer; + +class _NSZone extends ffi.Opaque {} + +class Protocol extends _ObjCWrapper { + Protocol._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [Protocol] that points to the same underlying object as [other]. + static Protocol castFrom(T other) { + return Protocol._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [Protocol] that wraps the given raw object pointer. + static Protocol castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return Protocol._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [Protocol]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); + } +} + +typedef IMP = ffi.Pointer>; + +class NSInvocation extends _ObjCWrapper { + NSInvocation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSInvocation] that points to the same underlying object as [other]. + static NSInvocation castFrom(T other) { + return NSInvocation._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSInvocation] that wraps the given raw object pointer. + static NSInvocation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInvocation._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSInvocation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInvocation1); + } +} + +class NSMethodSignature extends _ObjCWrapper { + NSMethodSignature._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. + static NSMethodSignature castFrom(T other) { + return NSMethodSignature._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMethodSignature] that wraps the given raw object pointer. + static NSMethodSignature castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMethodSignature._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMethodSignature]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMethodSignature1); + } +} + +typedef NSUInteger = ffi.UnsignedLong; + +class NSString extends NSObject { + NSString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSString] that points to the same underlying object as [other]. + static NSString castFrom(T other) { + return NSString._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSString] that wraps the given raw object pointer. + static NSString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSString._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); + } + + factory NSString(NativeCupertinoHttp _lib, String str) { + final cstr = str.toNativeUtf8(); + final nsstr = stringWithCString_encoding_(_lib, cstr.cast(), 4 /* UTF8 */); + pkg_ffi.calloc.free(cstr); + return nsstr; + } + + @override + String toString() => (UTF8String).cast().toDartString(); + + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); + } + + int characterAtIndex_(int index) { + return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); + } + + @override + NSString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + /// Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode an URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. + NSString stringByAddingPercentEncodingWithAllowedCharacters_( + NSCharacterSet? allowedCharacters) { + final _ret = _lib._objc_msgSend_138( + _id, + _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, + allowedCharacters?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + /// Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. + NSString? get stringByRemovingPercentEncoding { + final _ret = + _lib._objc_msgSend_19(_id, _lib._sel_stringByRemovingPercentEncoding1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByAddingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_139( + _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByReplacingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_139( + _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_140(_lib._class_NSString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } + + ffi.Pointer get UTF8String { + return _lib._objc_msgSend_40(_id, _lib._sel_UTF8String1); + } + + static NSString new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); + return NSString._(_ret, _lib, retain: false, release: true); + } + + static NSString alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); + return NSString._(_ret, _lib, retain: false, release: true); + } +} + +extension StringToNSString on String { + NSString toNSString(NativeCupertinoHttp lib) => NSString(lib, this); +} + +typedef unichar = ffi.UnsignedShort; + +class NSCoder extends _ObjCWrapper { + NSCoder._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSCoder] that points to the same underlying object as [other]. + static NSCoder castFrom(T other) { + return NSCoder._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSCoder] that wraps the given raw object pointer. + static NSCoder castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCoder._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSCoder]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); + } +} + +class NSCharacterSet extends NSObject { + NSCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. + static NSCharacterSet castFrom(T other) { + return NSCharacterSet._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSCharacterSet] that wraps the given raw object pointer. + static NSCharacterSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCharacterSet._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSCharacterSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSCharacterSet1); + } + + static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSCharacterSet1, + _lib._sel_whitespaceAndNewlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getLowercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getUppercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getCapitalizedLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: false, release: true); + } + + static NSCharacterSet characterSetWithRange_( + NativeCupertinoHttp _lib, NSRange aRange) { + final _ret = _lib._objc_msgSend_16( + _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet characterSetWithCharactersInString_( + NativeCupertinoHttp _lib, NSString? aString) { + final _ret = _lib._objc_msgSend_17( + _lib._class_NSCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, + aString?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet characterSetWithBitmapRepresentation_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_133( + _lib._class_NSCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, + data?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet characterSetWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? fName) { + final _ret = _lib._objc_msgSend_17(_lib._class_NSCharacterSet1, + _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + NSCharacterSet initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + bool characterIsMember_(int aCharacter) { + return _lib._objc_msgSend_134( + _id, _lib._sel_characterIsMember_1, aCharacter); + } + + NSData? get bitmapRepresentation { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_bitmapRepresentation1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSCharacterSet? get invertedSet { + final _ret = _lib._objc_msgSend_15(_id, _lib._sel_invertedSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + bool longCharacterIsMember_(int theLongChar) { + return _lib._objc_msgSend_135( + _id, _lib._sel_longCharacterIsMember_1, theLongChar); + } + + bool isSupersetOfSet_(NSCharacterSet? theOtherSet) { + return _lib._objc_msgSend_136( + _id, _lib._sel_isSupersetOfSet_1, theOtherSet?._id ?? ffi.nullptr); + } + + bool hasMemberInPlane_(int thePlane) { + return _lib._objc_msgSend_137(_id, _lib._sel_hasMemberInPlane_1, thePlane); + } + + /// Returns a character set containing the characters allowed in an URL's user subcomponent. + static NSCharacterSet? getURLUserAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's password subcomponent. + static NSCharacterSet? getURLPasswordAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's host subcomponent. + static NSCharacterSet? getURLHostAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + static NSCharacterSet? getURLPathAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's query component. + static NSCharacterSet? getURLQueryAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's fragment component. + static NSCharacterSet? getURLFragmentAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_15( + _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } + + static NSCharacterSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSRange = _NSRange; + +class _NSRange extends ffi.Struct { + @NSUInteger() + external int location; + + @NSUInteger() + external int length; +} + +/// Immutable Data +class NSData extends NSObject { + NSData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSData] that points to the same underlying object as [other]. + static NSData castFrom(T other) { + return NSData._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSData] that wraps the given raw object pointer. + static NSData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSData._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); + } + + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); + } + + /// The -bytes method returns a pointer to a contiguous region of memory managed by the receiver. + /// If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer + /// Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data. + ffi.Pointer get bytes { + return _lib._objc_msgSend_18(_id, _lib._sel_bytes1); + } + + NSString? get description { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + void getBytes_length_(ffi.Pointer buffer, int length) { + return _lib._objc_msgSend_20( + _id, _lib._sel_getBytes_length_1, buffer, length); + } + + void getBytes_range_(ffi.Pointer buffer, NSRange range) { + return _lib._objc_msgSend_21( + _id, _lib._sel_getBytes_range_1, buffer, range); + } + + bool isEqualToData_(NSData? other) { + return _lib._objc_msgSend_22( + _id, _lib._sel_isEqualToData_1, other?._id ?? ffi.nullptr); + } + + NSData subdataWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_23(_id, _lib._sel_subdataWithRange_1, range); + return NSData._(_ret, _lib, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_24(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } + + /// the atomically flag is ignored if the url is not of a type the supports atomic writes + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_79(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } + + bool writeToFile_options_error_(NSString? path, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _lib._objc_msgSend_117(_id, _lib._sel_writeToFile_options_error_1, + path?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); + } + + bool writeToURL_options_error_(NSURL? url, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _lib._objc_msgSend_118(_id, _lib._sel_writeToURL_options_error_1, + url?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); + } + + NSRange rangeOfData_options_range_( + NSData? dataToFind, int mask, NSRange searchRange) { + return _lib._objc_msgSend_119(_id, _lib._sel_rangeOfData_options_range_1, + dataToFind?._id ?? ffi.nullptr, mask, searchRange); + } + + /// 'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES. + void enumerateByteRangesUsingBlock_(ObjCBlock1 block) { + return _lib._objc_msgSend_120( + _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._impl); + } + + static NSData data(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_121( + _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_121(_lib._class_NSData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSData._(_ret, _lib, retain: false, release: true); + } + + static NSData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_122(_lib._class_NSData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSData._(_ret, _lib, retain: false, release: true); + } + + static NSData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_123( + _lib._class_NSData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_124( + _lib._class_NSData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_29(_lib._class_NSData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_110(_lib._class_NSData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_121( + _id, _lib._sel_initWithBytes_length_1, bytes, length); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_121( + _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); + return NSData._(_ret, _lib, retain: false, release: true); + } + + NSData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _lib._objc_msgSend_122(_id, + _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSData._(_ret, _lib, retain: false, release: true); + } + + NSData initWithBytesNoCopy_length_deallocator_( + ffi.Pointer bytes, int length, ObjCBlock2 deallocator) { + final _ret = _lib._objc_msgSend_125( + _id, + _lib._sel_initWithBytesNoCopy_length_deallocator_1, + bytes, + length, + deallocator._impl); + return NSData._(_ret, _lib, retain: false, release: true); + } + + NSData initWithContentsOfFile_options_error_(NSString? path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_123( + _id, + _lib._sel_initWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithContentsOfURL_options_error_(NSURL? url, int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_124( + _id, + _lib._sel_initWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_29( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_110( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithData_(NSData? data) { + final _ret = _lib._objc_msgSend_126( + _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_126(_lib._class_NSData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. + NSData initWithBase64EncodedString_options_( + NSString? base64String, int options) { + final _ret = _lib._objc_msgSend_127( + _id, + _lib._sel_initWithBase64EncodedString_options_1, + base64String?._id ?? ffi.nullptr, + options); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Create a Base-64 encoded NSString from the receiver's contents using the given options. + NSString base64EncodedStringWithOptions_(int options) { + final _ret = _lib._objc_msgSend_128( + _id, _lib._sel_base64EncodedStringWithOptions_1, options); + return NSString._(_ret, _lib, retain: true, release: true); + } + + /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. + NSData initWithBase64EncodedData_options_(NSData? base64Data, int options) { + final _ret = _lib._objc_msgSend_129( + _id, + _lib._sel_initWithBase64EncodedData_options_1, + base64Data?._id ?? ffi.nullptr, + options); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options. + NSData base64EncodedDataWithOptions_(int options) { + final _ret = _lib._objc_msgSend_130( + _id, _lib._sel_base64EncodedDataWithOptions_1, options); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. + NSData decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_131(_id, + _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_131( + _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); + return NSData._(_ret, _lib, retain: true, release: true); + } + + void getBytes_(ffi.Pointer buffer) { + return _lib._objc_msgSend_132(_id, _lib._sel_getBytes_1, buffer); + } + + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_29(_lib._class_NSData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject initWithContentsOfMappedFile_(NSString? path) { + final _ret = _lib._objc_msgSend_29(_id, + _lib._sel_initWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0. + NSObject initWithBase64Encoding_(NSString? base64String) { + final _ret = _lib._objc_msgSend_29(_id, _lib._sel_initWithBase64Encoding_1, + base64String?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSString base64Encoding() { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_base64Encoding1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSData new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); + return NSData._(_ret, _lib, retain: false, release: true); + } + + static NSData alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); + return NSData._(_ret, _lib, retain: false, release: true); + } +} + +class NSURL extends NSObject { + NSURL._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURL] that points to the same underlying object as [other]. + static NSURL castFrom(T other) { + return NSURL._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURL] that wraps the given raw object pointer. + static NSURL castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURL._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURL]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); + } + + /// this call percent-encodes both the host and path, so this cannot be used to set a username/password or port in the hostname part or with a IPv6 '[...]' type address. NSURLComponents handles IPv6 addresses correctly. + NSURL initWithScheme_host_path_( + NSString? scheme, NSString? host, NSString? path) { + final _ret = _lib._objc_msgSend_25( + _id, + _lib._sel_initWithScheme_host_path_1, + scheme?._id ?? ffi.nullptr, + host?._id ?? ffi.nullptr, + path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL. + NSURL initFileURLWithPath_isDirectory_relativeToURL_( + NSString? path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_26( + _id, + _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, + path?._id ?? ffi.nullptr, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. + NSURL initFileURLWithPath_relativeToURL_(NSString? path, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_27( + _id, + _lib._sel_initFileURLWithPath_relativeToURL_1, + path?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL initFileURLWithPath_isDirectory_(NSString? path, bool isDir) { + final _ret = _lib._objc_msgSend_28( + _id, + _lib._sel_initFileURLWithPath_isDirectory_1, + path?._id ?? ffi.nullptr, + isDir); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Better to use initFileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. + NSURL initFileURLWithPath_(NSString? path) { + final _ret = _lib._objc_msgSend_29( + _id, _lib._sel_initFileURLWithPath_1, path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created file NSURL referencing the local file or directory at path, relative to a base URL. + static NSURL fileURLWithPath_isDirectory_relativeToURL_( + NativeCupertinoHttp _lib, NSString? path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_30( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, + path?._id ?? ffi.nullptr, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Better to use fileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. + static NSURL fileURLWithPath_relativeToURL_( + NativeCupertinoHttp _lib, NSString? path, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_31( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_relativeToURL_1, + path?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL fileURLWithPath_isDirectory_( + NativeCupertinoHttp _lib, NSString? path, bool isDir) { + final _ret = _lib._objc_msgSend_32( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_1, + path?._id ?? ffi.nullptr, + isDir); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Better to use fileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. + static NSURL fileURLWithPath_(NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_33(_lib._class_NSURL1, + _lib._sel_fileURLWithPath_1, path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. + NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + ffi.Pointer path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_34( + _id, + _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, + path, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. + static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + NativeCupertinoHttp _lib, + ffi.Pointer path, + bool isDir, + NSURL? baseURL) { + final _ret = _lib._objc_msgSend_35( + _lib._class_NSURL1, + _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, + path, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// These methods expect their string arguments to contain any percent escape codes that are necessary. It is an error for URLString to be nil. + NSURL initWithString_(NSString? URLString) { + final _ret = _lib._objc_msgSend_29( + _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL initWithString_relativeToURL_(NSString? URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_27( + _id, + _lib._sel_initWithString_relativeToURL_1, + URLString?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL URLWithString_(NativeCupertinoHttp _lib, NSString? URLString) { + final _ret = _lib._objc_msgSend_29(_lib._class_NSURL1, + _lib._sel_URLWithString_1, URLString?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL URLWithString_relativeToURL_( + NativeCupertinoHttp _lib, NSString? URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_27( + _lib._class_NSURL1, + _lib._sel_URLWithString_relativeToURL_1, + URLString?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + NSURL initWithDataRepresentation_relativeToURL_( + NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_36( + _id, + _lib._sel_initWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + static NSURL URLWithDataRepresentation_relativeToURL_( + NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_37( + _lib._class_NSURL1, + _lib._sel_URLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( + NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_36( + _id, + _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + static NSURL absoluteURLWithDataRepresentation_relativeToURL_( + NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_37( + _lib._class_NSURL1, + _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns the data representation of the URL's relativeString. If the URL was initialized with -initWithData:relativeToURL:, the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with NSUTF8StringEncoding. + NSData? get dataRepresentation { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_dataRepresentation1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSString? get absoluteString { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_absoluteString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// The relative portion of a URL. If baseURL is nil, or if the receiver is itself absolute, this is the same as absoluteString + NSString? get relativeString { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_relativeString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// may be nil. + NSURL? get baseURL { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_baseURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// if the receiver is itself absolute, this will return self. + NSURL? get absoluteURL { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_absoluteURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Any URL is composed of these two basic pieces. The full URL would be the concatenation of [myURL scheme], ':', [myURL resourceSpecifier] + NSString? get scheme { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_scheme1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get resourceSpecifier { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_resourceSpecifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// If the URL conforms to rfc 1808 (the most common form of URL), the following accessors will return the various components; otherwise they return nil. The litmus test for conformance is as recommended in RFC 1808 - whether the first two characters of resourceSpecifier is @"//". In all cases, they return the component's value after resolving the receiver against its base URL. + NSString? get host { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_host1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSNumber? get port { + final _ret = _lib._objc_msgSend_69(_id, _lib._sel_port1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSString? get user { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_user1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get password { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_password1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get path { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_path1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get fragment { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_fragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get parameterString { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_parameterString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get query { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_query1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// The same as path if baseURL is nil + NSString? get relativePath { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_relativePath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Determines if a given URL string's path represents a directory (i.e. the path component in the URL string ends with a '/' character). This does not check the resource the URL refers to. + bool get hasDirectoryPath { + return _lib._objc_msgSend_11(_id, _lib._sel_hasDirectoryPath1); + } + + /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. + bool getFileSystemRepresentation_maxLength_( + ffi.Pointer buffer, int maxBufferLength) { + return _lib._objc_msgSend_70( + _id, + _lib._sel_getFileSystemRepresentation_maxLength_1, + buffer, + maxBufferLength); + } + + /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. The returned C string will be automatically freed just as a returned object would be released; your code should copy the representation or use getFileSystemRepresentation:maxLength: if it needs to store the representation outside of the autorelease context in which the representation is created. + ffi.Pointer get fileSystemRepresentation { + return _lib._objc_msgSend_40(_id, _lib._sel_fileSystemRepresentation1); + } + + /// Whether the scheme is file:; if [myURL isFileURL] is YES, then [myURL path] is suitable for input into NSFileManager or NSPathUtilities. + bool get fileURL { + return _lib._objc_msgSend_11(_id, _lib._sel_isFileURL1); + } + + NSURL? get standardizedURL { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_standardizedURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. + bool checkResourceIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_92( + _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); + } + + /// Returns whether the URL is a file reference URL. Symbol is present in iOS 4, but performs no operation. + bool isFileReferenceURL() { + return _lib._objc_msgSend_11(_id, _lib._sel_isFileReferenceURL1); + } + + /// Returns a file reference URL that refers to the same resource as a specified file URL. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:). Symbol is present in iOS 4, but performs no operation. + NSURL fileReferenceURL() { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_fileReferenceURL1); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns a file path URL that refers to the same resource as a specified URL. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. Symbol is present in iOS 4, but performs no operation. + NSURL? get filePathURL { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_filePathURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns the resource value identified by a given resource key. This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this method returns YES and value is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool getResourceValue_forKey_error_( + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_93( + _id, _lib._sel_getResourceValue_forKey_error_1, value, key, error); + } + + /// Returns the resource values identified by specified array of resource keys. This method first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this method returns NULL, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + NSDictionary resourceValuesForKeys_error_( + NSArray? keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_94( + _id, + _lib._sel_resourceValuesForKeys_error_1, + keys?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Sets the resource value identified by a given resource key. This method writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool setResourceValue_forKey_error_(NSObject value, NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_95( + _id, _lib._sel_setResourceValue_forKey_error_1, value._id, key, error); + } + + /// Sets any number of resource values of a URL's resource. This method writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to this method or to -setResourceValue:forKey:error: to guarantee the order. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool setResourceValues_error_( + NSDictionary? keyedValues, ffi.Pointer> error) { + return _lib._objc_msgSend_96(_id, _lib._sel_setResourceValues_error_1, + keyedValues?._id ?? ffi.nullptr, error); + } + + /// Removes the cached resource value identified by a given resource value key from the URL object. Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources. + void removeCachedResourceValueForKey_(NSURLResourceKey key) { + return _lib._objc_msgSend_97( + _id, _lib._sel_removeCachedResourceValueForKey_1, key); + } + + /// Removes all cached resource values and all temporary resource values from the URL object. This method is currently applicable only to URLs for file system resources. + void removeAllCachedResourceValues() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); + } + + /// Sets a temporary resource value on the URL object. Temporary resource values are for client use. Temporary resource values exist only in memory and are never written to the resource's backing store. Once set, a temporary resource value can be copied from the URL object with -getResourceValue:forKey:error: or -resourceValuesForKeys:error:. To remove a temporary resource value from the URL object, use -removeCachedResourceValueForKey:. Care should be taken to ensure the key that identifies a temporary resource value is unique and does not conflict with system defined keys (using reverse domain name notation in your temporary resource value keys is recommended). This method is currently applicable only to URLs for file system resources. + void setTemporaryResourceValue_forKey_(NSObject value, NSURLResourceKey key) { + return _lib._objc_msgSend_98( + _id, _lib._sel_setTemporaryResourceValue_forKey_1, value._id, key); + } + + /// Returns bookmark data for the URL, created with specified options and resource values. If this method returns nil, the optional error is populated. + NSData + bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( + int options, + NSArray? keys, + NSURL? relativeURL, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_99( + _id, + _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, + options, + keys?._id ?? ffi.nullptr, + relativeURL?._id ?? ffi.nullptr, + error); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. + NSURL + initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NSData? bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_100( + _id, + _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, + bookmarkData?._id ?? ffi.nullptr, + options, + relativeURL?._id ?? ffi.nullptr, + isStale, + error); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Creates and Initializes an NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. + static NSURL + URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NativeCupertinoHttp _lib, + NSData? bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_100( + _lib._class_NSURL1, + _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, + bookmarkData?._id ?? ffi.nullptr, + options, + relativeURL?._id ?? ffi.nullptr, + isStale, + error); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available in the bookmark data. + static NSDictionary resourceValuesForKeys_fromBookmarkData_( + NativeCupertinoHttp _lib, NSArray? keys, NSData? bookmarkData) { + final _ret = _lib._objc_msgSend_101( + _lib._class_NSURL1, + _lib._sel_resourceValuesForKeys_fromBookmarkData_1, + keys?._id ?? ffi.nullptr, + bookmarkData?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Creates an alias file on disk at a specified location with specified bookmark data. bookmarkData must have been created with the NSURLBookmarkCreationSuitableForBookmarkFile option. bookmarkFileURL must either refer to an existing file (which will be overwritten), or to location in an existing directory. If this method returns NO, the optional error is populated. + static bool writeBookmarkData_toURL_options_error_( + NativeCupertinoHttp _lib, + NSData? bookmarkData, + NSURL? bookmarkFileURL, + int options, + ffi.Pointer> error) { + return _lib._objc_msgSend_102( + _lib._class_NSURL1, + _lib._sel_writeBookmarkData_toURL_options_error_1, + bookmarkData?._id ?? ffi.nullptr, + bookmarkFileURL?._id ?? ffi.nullptr, + options, + error); + } + + /// Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. If bookmarkFileURL refers to an alias file created prior to OS X v10.6 that contains Alias Manager information but no bookmark data, this method synthesizes bookmark data for the file. If this method returns nil, the optional error is populated. + static NSData bookmarkDataWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? bookmarkFileURL, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_103( + _lib._class_NSURL1, + _lib._sel_bookmarkDataWithContentsOfURL_error_1, + bookmarkFileURL?._id ?? ffi.nullptr, + error); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Creates and initializes a NSURL that refers to the location specified by resolving the alias file at url. If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, the NSURL returned is the same as url argument. This method fails and returns nil if the url argument is unreachable, or if the original file or directory could not be located or is not reachable, or if the original file or directory is on a volume that could not be located or mounted. If this method fails, the optional error is populated. The NSURLBookmarkResolutionWithSecurityScope option is not supported by this method. + static NSURL URLByResolvingAliasFileAtURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int options, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_104( + _lib._class_NSURL1, + _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, + url?._id ?? ffi.nullptr, + options, + error); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. When access to this resource is no longer needed the client must call stopAccessingSecurityScopedResource. Each call to startAccessingSecurityScopedResource must be balanced with a call to stopAccessingSecurityScopedResource (Note: this is not reference counted). + bool startAccessingSecurityScopedResource() { + return _lib._objc_msgSend_11( + _id, _lib._sel_startAccessingSecurityScopedResource1); + } + + /// Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource. + void stopAccessingSecurityScopedResource() { + return _lib._objc_msgSend_1( + _id, _lib._sel_stopAccessingSecurityScopedResource1); + } + + /// Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: + /// - NSMetadataQueryUbiquitousDataScope + /// - NSMetadataQueryUbiquitousDocumentsScope + /// - An NSFilePresenter presenting the contents of the directory located by -URLForUbiquitousContainerIdentifier: or a subdirectory thereof + /// + /// The following methods behave identically to their similarly named methods above (-getResourceValue:forKey:error:, etc.), except that they allow you to get resource values and check for presence regardless of whether the promised item's contents currently exist at the URL. You must use these APIs instead of the normal NSURL resource value APIs if and only if any of the following are true: + /// - You are using a URL that you know came directly from one of the above APIs + /// - You are inside the accessor block of a coordinated read or write that used NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingContentIndependentMetadataOnly + /// + /// Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. + bool getPromisedItemResourceValue_forKey_error_( + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_93( + _id, + _lib._sel_getPromisedItemResourceValue_forKey_error_1, + value, + key, + error); + } + + NSDictionary promisedItemResourceValuesForKeys_error_( + NSArray? keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_94( + _id, + _lib._sel_promisedItemResourceValuesForKeys_error_1, + keys?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + bool checkPromisedItemIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_92( + _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); + } + + /// The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. + static NSURL fileURLWithPathComponents_( + NativeCupertinoHttp _lib, NSArray? components) { + final _ret = _lib._objc_msgSend_105(_lib._class_NSURL1, + _lib._sel_fileURLWithPathComponents_1, components?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSArray? get pathComponents { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_pathComponents1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? get lastPathComponent { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_lastPathComponent1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get pathExtension { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_pathExtension1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSURL URLByAppendingPathComponent_(NSString? pathComponent) { + final _ret = _lib._objc_msgSend_33( + _id, + _lib._sel_URLByAppendingPathComponent_1, + pathComponent?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL URLByAppendingPathComponent_isDirectory_( + NSString? pathComponent, bool isDirectory) { + final _ret = _lib._objc_msgSend_32( + _id, + _lib._sel_URLByAppendingPathComponent_isDirectory_1, + pathComponent?._id ?? ffi.nullptr, + isDirectory); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URLByDeletingLastPathComponent { + final _ret = + _lib._objc_msgSend_39(_id, _lib._sel_URLByDeletingLastPathComponent1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL URLByAppendingPathExtension_(NSString? pathExtension) { + final _ret = _lib._objc_msgSend_33( + _id, + _lib._sel_URLByAppendingPathExtension_1, + pathExtension?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URLByDeletingPathExtension { + final _ret = + _lib._objc_msgSend_39(_id, _lib._sel_URLByDeletingPathExtension1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// The following methods work only on `file:` scheme URLs; for non-`file:` scheme URLs, these methods return the URL unchanged. + NSURL? get URLByStandardizingPath { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_URLByStandardizingPath1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URLByResolvingSymlinksInPath { + final _ret = + _lib._objc_msgSend_39(_id, _lib._sel_URLByResolvingSymlinksInPath1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Blocks to load the data if necessary. If shouldUseCache is YES, then if an equivalent URL has already been loaded and cached, its resource data will be returned immediately. If shouldUseCache is NO, a new load will be started + NSData resourceDataUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_106( + _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Starts an asynchronous load of the data, registering delegate to receive notification. Only one such background load can proceed at a time. + void loadResourceDataNotifyingClient_usingCache_( + NSObject client, bool shouldUseCache) { + return _lib._objc_msgSend_107( + _id, + _lib._sel_loadResourceDataNotifyingClient_usingCache_1, + client._id, + shouldUseCache); + } + + NSObject propertyForKey_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_29( + _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// These attempt to write the given arguments for the resource specified by the URL; they return success or failure + bool setResourceData_(NSData? data) { + return _lib._objc_msgSend_22( + _id, _lib._sel_setResourceData_1, data?._id ?? ffi.nullptr); + } + + bool setProperty_forKey_(NSObject property, NSString? propertyKey) { + return _lib._objc_msgSend_108(_id, _lib._sel_setProperty_forKey_1, + property._id, propertyKey?._id ?? ffi.nullptr); + } + + /// Sophisticated clients will want to ask for this, then message the handle directly. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded + NSURLHandle URLHandleUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_116( + _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); + return NSURLHandle._(_ret, _lib, retain: true, release: true); + } + + static NSURL new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); + return NSURL._(_ret, _lib, retain: false, release: true); + } + + static NSURL alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); + return NSURL._(_ret, _lib, retain: false, release: true); + } +} + +class NSNumber extends NSValue { + NSNumber._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNumber] that points to the same underlying object as [other]. + static NSNumber castFrom(T other) { + return NSNumber._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSNumber] that wraps the given raw object pointer. + static NSNumber castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNumber._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNumber]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); + } + + @override + NSNumber initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithChar_(int value) { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_initWithChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedChar_(int value) { + final _ret = + _lib._objc_msgSend_43(_id, _lib._sel_initWithUnsignedChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithShort_(int value) { + final _ret = _lib._objc_msgSend_44(_id, _lib._sel_initWithShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedShort_(int value) { + final _ret = + _lib._objc_msgSend_45(_id, _lib._sel_initWithUnsignedShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithInt_(int value) { + final _ret = _lib._objc_msgSend_46(_id, _lib._sel_initWithInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedInt_(int value) { + final _ret = + _lib._objc_msgSend_47(_id, _lib._sel_initWithUnsignedInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithLong_(int value) { + final _ret = _lib._objc_msgSend_48(_id, _lib._sel_initWithLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedLong_(int value) { + final _ret = + _lib._objc_msgSend_49(_id, _lib._sel_initWithUnsignedLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithLongLong_(int value) { + final _ret = + _lib._objc_msgSend_50(_id, _lib._sel_initWithLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedLongLong_(int value) { + final _ret = + _lib._objc_msgSend_51(_id, _lib._sel_initWithUnsignedLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithFloat_(double value) { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_initWithFloat_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithDouble_(double value) { + final _ret = _lib._objc_msgSend_53(_id, _lib._sel_initWithDouble_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithBool_(bool value) { + final _ret = _lib._objc_msgSend_54(_id, _lib._sel_initWithBool_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithInteger_(int value) { + final _ret = _lib._objc_msgSend_48(_id, _lib._sel_initWithInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedInteger_(int value) { + final _ret = + _lib._objc_msgSend_49(_id, _lib._sel_initWithUnsignedInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + int get charValue { + return _lib._objc_msgSend_55(_id, _lib._sel_charValue1); + } + + int get unsignedCharValue { + return _lib._objc_msgSend_56(_id, _lib._sel_unsignedCharValue1); + } + + int get shortValue { + return _lib._objc_msgSend_57(_id, _lib._sel_shortValue1); + } + + int get unsignedShortValue { + return _lib._objc_msgSend_58(_id, _lib._sel_unsignedShortValue1); + } + + int get intValue { + return _lib._objc_msgSend_59(_id, _lib._sel_intValue1); + } + + int get unsignedIntValue { + return _lib._objc_msgSend_60(_id, _lib._sel_unsignedIntValue1); + } + + int get longValue { + return _lib._objc_msgSend_61(_id, _lib._sel_longValue1); + } + + int get unsignedLongValue { + return _lib._objc_msgSend_12(_id, _lib._sel_unsignedLongValue1); + } + + int get longLongValue { + return _lib._objc_msgSend_62(_id, _lib._sel_longLongValue1); + } + + int get unsignedLongLongValue { + return _lib._objc_msgSend_63(_id, _lib._sel_unsignedLongLongValue1); + } + + double get floatValue { + return _lib._objc_msgSend_64(_id, _lib._sel_floatValue1); + } + + double get doubleValue { + return _lib._objc_msgSend_65(_id, _lib._sel_doubleValue1); + } + + bool get boolValue { + return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); + } + + int get integerValue { + return _lib._objc_msgSend_61(_id, _lib._sel_integerValue1); + } + + int get unsignedIntegerValue { + return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); + } + + NSString? get stringValue { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_stringValue1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + int compare_(NSNumber? otherNumber) { + return _lib._objc_msgSend_66( + _id, _lib._sel_compare_1, otherNumber?._id ?? ffi.nullptr); + } + + bool isEqualToNumber_(NSNumber? number) { + return _lib._objc_msgSend_67( + _id, _lib._sel_isEqualToNumber_1, number?._id ?? ffi.nullptr); + } + + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_68( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSNumber new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); + return NSNumber._(_ret, _lib, retain: false, release: true); + } + + static NSNumber alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); + return NSNumber._(_ret, _lib, retain: false, release: true); + } +} + +class NSValue extends NSObject { + NSValue._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSValue] that points to the same underlying object as [other]. + static NSValue castFrom(T other) { + return NSValue._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSValue] that wraps the given raw object pointer. + static NSValue castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSValue._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSValue]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); + } + + void getValue_size_(ffi.Pointer value, int size) { + return _lib._objc_msgSend_20(_id, _lib._sel_getValue_size_1, value, size); + } + + ffi.Pointer get objCType { + return _lib._objc_msgSend_40(_id, _lib._sel_objCType1); + } + + NSValue initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_41( + _id, _lib._sel_initWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + NSValue initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); + return NSValue._(_ret, _lib, retain: false, release: true); + } + + static NSValue alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); + return NSValue._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSInteger = ffi.Long; + +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; +} + +class NSError extends NSObject { + NSError._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSError] that points to the same underlying object as [other]. + static NSError castFrom(T other) { + return NSError._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSError] that wraps the given raw object pointer. + static NSError castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSError._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSError]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); + } + + /// Domain cannot be nil; dict may be nil if no userInfo desired. + NSError initWithDomain_code_userInfo_( + NSErrorDomain domain, int code, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_88( + _id, + _lib._sel_initWithDomain_code_userInfo_1, + domain, + code, + dict?._id ?? ffi.nullptr); + return NSError._(_ret, _lib, retain: true, release: true); + } + + static NSError errorWithDomain_code_userInfo_(NativeCupertinoHttp _lib, + NSErrorDomain domain, int code, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_88( + _lib._class_NSError1, + _lib._sel_errorWithDomain_code_userInfo_1, + domain, + code, + dict?._id ?? ffi.nullptr); + return NSError._(_ret, _lib, retain: true, release: true); + } + + /// These define the error. Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts. Codes are domain-specific. + NSErrorDomain get domain { + return _lib._objc_msgSend_19(_id, _lib._sel_domain1); + } + + int get code { + return _lib._objc_msgSend_61(_id, _lib._sel_code1); + } + + /// Additional info which may be used to describe the error further. Examples of keys that might be included in here are "Line Number", "Failed URL", etc. Embedding other errors in here can also be used as a way to communicate underlying reasons for failures; for instance "File System Error" embedded in the userInfo of an NSError returned from a higher level document object. If the embedded error information is itself NSError, the standard key NSUnderlyingErrorKey can be used. + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// The primary user-presentable message for the error, for instance for NSFileReadNoPermissionError: "The file "File Name" couldn't be opened because you don't have permission to view it.". This message should ideally indicate what failed and why it failed. This value either comes from NSLocalizedDescriptionKey, or NSLocalizedFailureErrorKey+NSLocalizedFailureReasonErrorKey, or NSLocalizedFailureErrorKey. The steps this takes to construct the description include: + /// 1. Look for NSLocalizedDescriptionKey in userInfo, use value as-is if present. + /// 2. Look for NSLocalizedFailureErrorKey in userInfo. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. + /// 3. Fetch NSLocalizedDescriptionKey from userInfoValueProvider, use value as-is if present. + /// 4. Fetch NSLocalizedFailureErrorKey from userInfoValueProvider. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. + /// 5. Look for NSLocalizedFailureReasonErrorKey in userInfo or from userInfoValueProvider; combine with generic "Operation failed" message. + /// 6. Last resort localized but barely-presentable string manufactured from domain and code. The result is never nil. + NSString? get localizedDescription { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_localizedDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Return a complete sentence which describes why the operation failed. For instance, for NSFileReadNoPermissionError: "You don't have permission.". In many cases this will be just the "because" part of the error message (but as a complete sentence, which makes localization easier). Default implementation of this picks up the value of NSLocalizedFailureReasonErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. + NSString? get localizedFailureReason { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_localizedFailureReason1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel. For instance, for NSFileReadNoPermissionError: "To view or change permissions, select the item in the Finder and choose File > Get Info.". Default implementation of this picks up the value of NSLocalizedRecoverySuggestionErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. + NSString? get localizedRecoverySuggestion { + final _ret = + _lib._objc_msgSend_19(_id, _lib._sel_localizedRecoverySuggestion1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Return titles of buttons that are appropriate for displaying in an alert. These should match the string provided as a part of localizedRecoverySuggestion. The first string would be the title of the right-most and default button, the second one next to it, and so on. If used in an alert the corresponding default return values are NSAlertFirstButtonReturn + n. Default implementation of this picks up the value of NSLocalizedRecoveryOptionsErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. nil return usually implies no special suggestion, which would imply a single "OK" button. + NSArray? get localizedRecoveryOptions { + final _ret = + _lib._objc_msgSend_72(_id, _lib._sel_localizedRecoveryOptions1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// Return an object that conforms to the NSErrorRecoveryAttempting informal protocol. The recovery attempter must be an object that can correctly interpret an index into the array returned by localizedRecoveryOptions. The default implementation of this picks up the value of NSRecoveryAttempterErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. + NSObject get recoveryAttempter { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_recoveryAttempter1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user. This is done automatically by +[NSAlert alertWithError:], which the presentError: variants in NSApplication go through. The default implementation of this picks up the value of the NSHelpAnchorErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. + NSString? get helpAnchor { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_helpAnchor1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Return a list of underlying errors, if any. It includes the values of both NSUnderlyingErrorKey and NSMultipleUnderlyingErrorsKey. If there are no underlying errors, returns an empty array. + NSArray? get underlyingErrors { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_underlyingErrors1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// Specify a block which will be called from the implementations of localizedDescription, localizedFailureReason, localizedRecoverySuggestion, localizedRecoveryOptions, recoveryAttempter, helpAnchor, and debugDescription when the underlying value for these is not present in the userInfo dictionary of NSError instances with the specified domain. The provider will be called with the userInfo key corresponding to the queried property: For instance, NSLocalizedDescriptionKey for localizedDescription. The provider should return nil for any keys it is not able to provide and, very importantly, any keys it does not recognize (since we may extend the list of keys in future releases). + /// + /// The specified block will be called synchronously at the time when the above properties are queried. The results are not cached. + /// + /// This provider is optional. It enables localization and formatting of error messages to be done lazily; rather than populating the userInfo at NSError creation time, these keys will be fetched on-demand when asked for. + /// + /// It is expected that only the “owner” of an NSError domain specifies the provider for the domain, and this is done once. This facility is not meant for consumers of errors to customize the userInfo entries. This facility should not be used to customize the behaviors of error domains provided by the system. + /// + /// If an appropriate result for the requested key cannot be provided, return nil rather than choosing to manufacture a generic fallback response such as "Operation could not be completed, error 42." NSError will take care of the fallback cases. + static void setUserInfoValueProviderForDomain_provider_( + NativeCupertinoHttp _lib, NSErrorDomain errorDomain, ObjCBlock provider) { + return _lib._objc_msgSend_90( + _lib._class_NSError1, + _lib._sel_setUserInfoValueProviderForDomain_provider_1, + errorDomain, + provider._impl); + } + + static ObjCBlock userInfoValueProviderForDomain_(NativeCupertinoHttp _lib, + NSError? err, NSErrorUserInfoKey userInfoKey, NSErrorDomain errorDomain) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSError1, + _lib._sel_userInfoValueProviderForDomain_1, + err?._id ?? ffi.nullptr, + userInfoKey, + errorDomain); + return ObjCBlock._(_ret, _lib); + } + + static NSError new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); + return NSError._(_ret, _lib, retain: false, release: true); + } + + static NSError alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); + return NSError._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSErrorDomain = ffi.Pointer; + +/// Immutable Dictionary +class NSDictionary extends NSObject { + NSDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDictionary] that points to the same underlying object as [other]. + static NSDictionary castFrom(T other) { + return NSDictionary._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSDictionary] that wraps the given raw object pointer. + static NSDictionary castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDictionary._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDictionary]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); + } + + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); + } + + NSObject objectForKey_(NSObject aKey) { + final _ret = _lib._objc_msgSend_71(_id, _lib._sel_objectForKey_1, aKey._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSArray? get allKeys { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_allKeys1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray allKeysForObject_(NSObject anObject) { + final _ret = + _lib._objc_msgSend_73(_id, _lib._sel_allKeysForObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray? get allValues { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_allValues1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? get description { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get descriptionInStringsFileFormat { + final _ret = + _lib._objc_msgSend_19(_id, _lib._sel_descriptionInStringsFileFormat1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_68( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_indent_(NSObject locale, int level) { + final _ret = _lib._objc_msgSend_74( + _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool isEqualToDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_75(_id, _lib._sel_isEqualToDictionary_1, + otherDictionary?._id ?? ffi.nullptr); + } + + /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:andKeys:count: + void getObjects_andKeys_(ffi.Pointer> objects, + ffi.Pointer> keys) { + return _lib._objc_msgSend_76( + _id, _lib._sel_getObjects_andKeys_1, objects, keys); + } + + /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. + static NSDictionary dictionaryWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_77(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_78(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_77( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_78( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_24(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } + + /// the atomically flag is ignored if url of a type that cannot be written atomically. + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_79(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } + + static NSDictionary dictionary(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObject_forKey_( + NativeCupertinoHttp _lib, NSObject object, NSObject key) { + final _ret = _lib._objc_msgSend_80(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjects_forKeys_count_( + NativeCupertinoHttp _lib, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_81(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjectsAndKeys_( + NativeCupertinoHttp _lib, NSObject firstObject) { + final _ret = _lib._objc_msgSend_71(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithDictionary_( + NativeCupertinoHttp _lib, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_82(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjects_forKeys_( + NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_83( + _lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _lib._objc_msgSend_71( + _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithDictionary_(NSDictionary? otherDictionary) { + final _ret = _lib._objc_msgSend_82(_id, _lib._sel_initWithDictionary_1, + otherDictionary?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithDictionary_copyItems_( + NSDictionary? otherDictionary, bool flag) { + final _ret = _lib._objc_msgSend_84( + _id, + _lib._sel_initWithDictionary_copyItems_1, + otherDictionary?._id ?? ffi.nullptr, + flag); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } + + NSDictionary initWithObjects_forKeys_(NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_83(_id, _lib._sel_initWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, keys?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Reads dictionary stored in NSPropertyList format from the specified url. + NSDictionary initWithContentsOfURL_error_( + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_85( + _id, + _lib._sel_initWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Reads dictionary stored in NSPropertyList format from the specified url. + static NSDictionary dictionaryWithContentsOfURL_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_85( + _lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. + /// The keys are copied from the array and must be copyable. + /// If the array parameter is nil or not an NSArray, an exception is thrown. + /// If the array of keys is empty, an empty key set is returned. + /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). + /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. + /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. + static NSObject sharedKeySetForKeys_( + NativeCupertinoHttp _lib, NSArray? keys) { + final _ret = _lib._objc_msgSend_86(_lib._class_NSDictionary1, + _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + int countByEnumeratingWithState_objects_count_( + ffi.Pointer state, + ffi.Pointer> buffer, + int len) { + return _lib._objc_msgSend_87( + _id, + _lib._sel_countByEnumeratingWithState_objects_count_1, + state, + buffer, + len); + } + + static NSDictionary new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } + + static NSDictionary alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } +} + +class NSFastEnumerationState extends ffi.Struct { + @ffi.UnsignedLong() + external int state; + + external ffi.Pointer> itemsPtr; + + external ffi.Pointer mutationsPtr; + + @ffi.Array.multi([5]) + external ffi.Array extra; +} + +ffi.Pointer _ObjCBlock_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>()(arg0, arg1); +} + +final _ObjCBlock_closureRegistry = {}; +int _ObjCBlock_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_registerClosure(Function fn) { + final id = ++_ObjCBlock_closureRegistryIndex; + _ObjCBlock_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer _ObjCBlock_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) { + return _ObjCBlock_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock._(this._impl, this._lib); + ObjCBlock.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>(_ObjCBlock_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock.fromFunction( + this._lib, + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1) + fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>(_ObjCBlock_closureTrampoline) + .cast(), + _ObjCBlock_registerClosure(fn)); + ffi.Pointer call( + ffi.Pointer arg0, NSErrorUserInfoKey arg1) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>()(_impl, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +typedef NSErrorUserInfoKey = ffi.Pointer; + +class _ObjCBlockDesc extends ffi.Struct { + @ffi.UnsignedLong() + external int reserved; + + @ffi.UnsignedLong() + external int size; + + external ffi.Pointer copy_helper; + + external ffi.Pointer dispose_helper; + + external ffi.Pointer signature; +} + +class _ObjCBlock extends ffi.Struct { + external ffi.Pointer isa; + + @ffi.Int() + external int flags; + + @ffi.Int() + external int reserved; + + external ffi.Pointer invoke; + + external ffi.Pointer<_ObjCBlockDesc> descriptor; + + external ffi.Pointer target; +} + +typedef NSURLResourceKey = ffi.Pointer; + +/// Working with Bookmarks and alias (bookmark) files +abstract class NSURLBookmarkCreationOptions { + /// This option does nothing and has no effect on bookmark resolution + static const int NSURLBookmarkCreationPreferFileIDResolution = 256; + + /// creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways + static const int NSURLBookmarkCreationMinimalBookmark = 512; + + /// include the properties required by writeBookmarkData:toURL:options: in the bookmark data created + static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; + + /// include information in the bookmark data which allows the same sandboxed process to access the resource after being relaunched + static const int NSURLBookmarkCreationWithSecurityScope = 2048; + + /// if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted + static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; +} + +abstract class NSURLBookmarkResolutionOptions { + /// don't perform any user interaction during bookmark resolution + static const int NSURLBookmarkResolutionWithoutUI = 256; + + /// don't mount a volume during bookmark resolution + static const int NSURLBookmarkResolutionWithoutMounting = 512; + + /// use the secure information included at creation time to provide the ability to access the resource in a sandboxed process + static const int NSURLBookmarkResolutionWithSecurityScope = 1024; +} + +typedef NSURLBookmarkFileCreationOptions = NSUInteger; + +class NSURLHandle extends NSObject { + NSURLHandle._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLHandle] that points to the same underlying object as [other]. + static NSURLHandle castFrom(T other) { + return NSURLHandle._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLHandle] that wraps the given raw object pointer. + static NSURLHandle castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLHandle._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLHandle]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); + } + + static void registerURLHandleClass_( + NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { + return _lib._objc_msgSend_109(_lib._class_NSURLHandle1, + _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); + } + + static NSObject URLHandleClassForURL_( + NativeCupertinoHttp _lib, NSURL? anURL) { + final _ret = _lib._objc_msgSend_110(_lib._class_NSURLHandle1, + _lib._sel_URLHandleClassForURL_1, anURL?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + int status() { + return _lib._objc_msgSend_111(_id, _lib._sel_status1); + } + + NSString failureReason() { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_failureReason1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void addClient_(NSObject? client) { + return _lib._objc_msgSend_109( + _id, _lib._sel_addClient_1, client?._id ?? ffi.nullptr); + } + + void removeClient_(NSObject? client) { + return _lib._objc_msgSend_109( + _id, _lib._sel_removeClient_1, client?._id ?? ffi.nullptr); + } + + void loadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); + } + + void cancelLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); + } + + NSData resourceData() { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_resourceData1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData availableResourceData() { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_availableResourceData1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + int expectedResourceDataSize() { + return _lib._objc_msgSend_62(_id, _lib._sel_expectedResourceDataSize1); + } + + void flushCachedData() { + return _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); + } + + void backgroundLoadDidFailWithReason_(NSString? reason) { + return _lib._objc_msgSend_97( + _id, + _lib._sel_backgroundLoadDidFailWithReason_1, + reason?._id ?? ffi.nullptr); + } + + void didLoadBytes_loadComplete_(NSData? newBytes, bool yorn) { + return _lib._objc_msgSend_112(_id, _lib._sel_didLoadBytes_loadComplete_1, + newBytes?._id ?? ffi.nullptr, yorn); + } + + static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL? anURL) { + return _lib._objc_msgSend_113(_lib._class_NSURLHandle1, + _lib._sel_canInitWithURL_1, anURL?._id ?? ffi.nullptr); + } + + static NSURLHandle cachedHandleForURL_( + NativeCupertinoHttp _lib, NSURL? anURL) { + final _ret = _lib._objc_msgSend_114(_lib._class_NSURLHandle1, + _lib._sel_cachedHandleForURL_1, anURL?._id ?? ffi.nullptr); + return NSURLHandle._(_ret, _lib, retain: true, release: true); + } + + NSObject initWithURL_cached_(NSURL? anURL, bool willCache) { + final _ret = _lib._objc_msgSend_115(_id, _lib._sel_initWithURL_cached_1, + anURL?._id ?? ffi.nullptr, willCache); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject propertyForKey_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_29( + _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject propertyForKeyIfAvailable_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_29(_id, + _lib._sel_propertyForKeyIfAvailable_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + bool writeProperty_forKey_(NSObject propertyValue, NSString? propertyKey) { + return _lib._objc_msgSend_108(_id, _lib._sel_writeProperty_forKey_1, + propertyValue._id, propertyKey?._id ?? ffi.nullptr); + } + + bool writeData_(NSData? data) { + return _lib._objc_msgSend_22( + _id, _lib._sel_writeData_1, data?._id ?? ffi.nullptr); + } + + NSData loadInForeground() { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_loadInForeground1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + void beginLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); + } + + void endLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); + } + + static NSURLHandle new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); + return NSURLHandle._(_ret, _lib, retain: false, release: true); + } + + static NSURLHandle alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); + return NSURLHandle._(_ret, _lib, retain: false, release: true); + } +} + +abstract class NSURLHandleStatus { + static const int NSURLHandleNotLoaded = 0; + static const int NSURLHandleLoadSucceeded = 1; + static const int NSURLHandleLoadInProgress = 2; + static const int NSURLHandleLoadFailed = 3; +} + +abstract class NSDataWritingOptions { + /// Hint to use auxiliary file when saving; equivalent to atomically:YES + static const int NSDataWritingAtomic = 1; + + /// Hint to prevent overwriting an existing file. Cannot be combined with NSDataWritingAtomic. + static const int NSDataWritingWithoutOverwriting = 2; + static const int NSDataWritingFileProtectionNone = 268435456; + static const int NSDataWritingFileProtectionComplete = 536870912; + static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; + static const int + NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = + 1073741824; + static const int NSDataWritingFileProtectionMask = 4026531840; + + /// Deprecated name for NSDataWritingAtomic + static const int NSAtomicWrite = 1; +} + +/// Data Search Options +abstract class NSDataSearchOptions { + static const int NSDataSearchBackwards = 1; + static const int NSDataSearchAnchored = 2; +} + +void _ObjCBlock1_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock1_closureRegistry = {}; +int _ObjCBlock1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock1_registerClosure(Function fn) { + final id = ++_ObjCBlock1_closureRegistryIndex; + _ObjCBlock1_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock1_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return _ObjCBlock1_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock1 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock1._(this._impl, this._lib); + ObjCBlock1.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>( + _ObjCBlock1_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock1.fromFunction( + this._lib, + void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2) + fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>( + _ObjCBlock1_closureTrampoline) + .cast(), + _ObjCBlock1_registerClosure(fn)); + void call( + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>()(_impl, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +/// Read/Write Options +abstract class NSDataReadingOptions { + /// Hint to map the file in if possible and safe + static const int NSDataReadingMappedIfSafe = 1; + + /// Hint to get the file not to be cached in the kernel + static const int NSDataReadingUncached = 2; + + /// Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given. + static const int NSDataReadingMappedAlways = 8; + + /// Deprecated name for NSDataReadingMappedIfSafe + static const int NSDataReadingMapped = 1; + + /// Deprecated name for NSDataReadingMapped + static const int NSMappedRead = 1; + + /// Deprecated name for NSDataReadingUncached + static const int NSUncachedRead = 2; +} + +void _ObjCBlock2_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); +} + +final _ObjCBlock2_closureRegistry = {}; +int _ObjCBlock2_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock2_registerClosure(Function fn) { + final id = ++_ObjCBlock2_closureRegistryIndex; + _ObjCBlock2_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock2_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return _ObjCBlock2_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock2 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock2._(this._impl, this._lib); + ObjCBlock2.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock2_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock2.fromFunction( + this._lib, void Function(ffi.Pointer arg0, int arg1) fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock2_closureTrampoline) + .cast(), + _ObjCBlock2_registerClosure(fn)); + void call(ffi.Pointer arg0, int arg1) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1)>()(_impl, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +abstract class NSDataBase64DecodingOptions { + /// Use the following option to modify the decoding algorithm so that it ignores unknown non-Base64 bytes, including line ending characters. + static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; +} + +/// Base 64 Options +abstract class NSDataBase64EncodingOptions { + /// Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default. + static const int NSDataBase64Encoding64CharacterLineLength = 1; + static const int NSDataBase64Encoding76CharacterLineLength = 2; + + /// Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF. + static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; + static const int NSDataBase64EncodingEndLineWithLineFeed = 32; +} + +/// Various algorithms provided for compression APIs. See NSData and NSMutableData. +abstract class NSDataCompressionAlgorithm { + /// LZFSE is the recommended compression algorithm if you don't have a specific reason to use another algorithm. Note that LZFSE is intended for use with Apple devices only. This algorithm generally compresses better than Zlib, but not as well as LZMA. It is generally slower than LZ4. + static const int NSDataCompressionAlgorithmLZFSE = 0; + + /// LZ4 is appropriate if compression speed is critical. LZ4 generally sacrifices compression ratio in order to achieve its greater speed. + /// This implementation of LZ4 makes a small modification to the standard format, which is described in greater detail in . + static const int NSDataCompressionAlgorithmLZ4 = 1; + + /// LZMA is appropriate if compression ratio is critical and memory usage and compression speed are not a factor. LZMA is an order of magnitude slower for both compression and decompression than other algorithms. It can also use a very large amount of memory, so if you need to compress large amounts of data on embedded devices with limited memory you should probably avoid LZMA. + /// Encoding uses LZMA level 6 only, but decompression works with any compression level. + static const int NSDataCompressionAlgorithmLZMA = 2; + + /// Zlib is appropriate if you want a good balance between compression speed and compression ratio, but only if you need interoperability with non-Apple platforms. Otherwise, LZFSE is generally a better choice than Zlib. + /// Encoding uses Zlib level 5 only, but decompression works with any compression level. It uses the raw DEFLATE format as described in IETF RFC 1951. + static const int NSDataCompressionAlgorithmZlib = 3; +} + +typedef UTF32Char = UInt32; +typedef UInt32 = ffi.UnsignedInt; +typedef NSStringEncoding = NSUInteger; + +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; +} + +/// Mutable Array +class NSMutableArray extends NSArray { + NSMutableArray._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableArray] that points to the same underlying object as [other]. + static NSMutableArray castFrom(T other) { + return NSMutableArray._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSMutableArray] that wraps the given raw object pointer. + static NSMutableArray castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableArray._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableArray]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableArray1); + } + + void addObject_(NSObject anObject) { + return _lib._objc_msgSend_109(_id, _lib._sel_addObject_1, anObject._id); + } + + void insertObject_atIndex_(NSObject anObject, int index) { + return _lib._objc_msgSend_159( + _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); + } + + void removeLastObject() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); + } + + void removeObjectAtIndex_(int index) { + return _lib._objc_msgSend_160(_id, _lib._sel_removeObjectAtIndex_1, index); + } + + void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { + return _lib._objc_msgSend_161( + _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); + } + + @override + NSMutableArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + NSMutableArray initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_146(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableArray initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + void addObjectsFromArray_(NSArray? otherArray) { + return _lib._objc_msgSend_162( + _id, _lib._sel_addObjectsFromArray_1, otherArray?._id ?? ffi.nullptr); + } + + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + return _lib._objc_msgSend_163( + _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); + } + + void removeAllObjects() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } + + void removeObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_164( + _id, _lib._sel_removeObject_inRange_1, anObject._id, range); + } + + void removeObject_(NSObject anObject) { + return _lib._objc_msgSend_109(_id, _lib._sel_removeObject_1, anObject._id); + } + + void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_164( + _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); + } + + void removeObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_109( + _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); + } + + void removeObjectsFromIndices_numIndices_( + ffi.Pointer indices, int cnt) { + return _lib._objc_msgSend_165( + _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); + } + + void removeObjectsInArray_(NSArray? otherArray) { + return _lib._objc_msgSend_162( + _id, _lib._sel_removeObjectsInArray_1, otherArray?._id ?? ffi.nullptr); + } + + void removeObjectsInRange_(NSRange range) { + return _lib._objc_msgSend_166(_id, _lib._sel_removeObjectsInRange_1, range); + } + + void replaceObjectsInRange_withObjectsFromArray_range_( + NSRange range, NSArray? otherArray, NSRange otherRange) { + return _lib._objc_msgSend_167( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, + range, + otherArray?._id ?? ffi.nullptr, + otherRange); + } + + void replaceObjectsInRange_withObjectsFromArray_( + NSRange range, NSArray? otherArray) { + return _lib._objc_msgSend_168( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, + range, + otherArray?._id ?? ffi.nullptr); + } + + void setArray_(NSArray? otherArray) { + return _lib._objc_msgSend_162( + _id, _lib._sel_setArray_1, otherArray?._id ?? ffi.nullptr); + } + + void sortUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context) { + return _lib._objc_msgSend_169( + _id, _lib._sel_sortUsingFunction_context_1, compare, context); + } + + void sortUsingSelector_(ffi.Pointer comparator) { + return _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); + } + + void insertObjects_atIndexes_(NSArray? objects, NSIndexSet? indexes) { + return _lib._objc_msgSend_190(_id, _lib._sel_insertObjects_atIndexes_1, + objects?._id ?? ffi.nullptr, indexes?._id ?? ffi.nullptr); + } + + void removeObjectsAtIndexes_(NSIndexSet? indexes) { + return _lib._objc_msgSend_191( + _id, _lib._sel_removeObjectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + } + + void replaceObjectsAtIndexes_withObjects_( + NSIndexSet? indexes, NSArray? objects) { + return _lib._objc_msgSend_192( + _id, + _lib._sel_replaceObjectsAtIndexes_withObjects_1, + indexes?._id ?? ffi.nullptr, + objects?._id ?? ffi.nullptr); + } + + void setObject_atIndexedSubscript_(NSObject obj, int idx) { + return _lib._objc_msgSend_159( + _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); + } + + void sortUsingComparator_(NSComparator cmptr) { + return _lib._objc_msgSend_193(_id, _lib._sel_sortUsingComparator_1, cmptr); + } + + void sortWithOptions_usingComparator_(int opts, NSComparator cmptr) { + return _lib._objc_msgSend_194( + _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr); + } + + static NSMutableArray arrayWithCapacity_( + NativeCupertinoHttp _lib, int numItems) { + final _ret = _lib._objc_msgSend_146( + _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_195(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_196(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + NSMutableArray initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_195( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + NSMutableArray initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_196( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + void applyDifference_() { + return _lib._objc_msgSend_1(_id, _lib._sel_applyDifference_1); + } + + static NSMutableArray array(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithObject_( + NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_71( + _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithObjects_count_(NativeCupertinoHttp _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_147(_lib._class_NSMutableArray1, + _lib._sel_arrayWithObjects_count_1, objects, cnt); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithObjects_( + NativeCupertinoHttp _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_71(_lib._class_NSMutableArray1, + _lib._sel_arrayWithObjects_1, firstObj._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithArray_( + NativeCupertinoHttp _lib, NSArray? array) { + final _ret = _lib._objc_msgSend_86(_lib._class_NSMutableArray1, + _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + /// Reads array stored in NSPropertyList format from the specified url. + static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_155( + _lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } + + static NSMutableArray alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } +} + +class NSIndexSet extends NSObject { + NSIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSIndexSet] that points to the same underlying object as [other]. + static NSIndexSet castFrom(T other) { + return NSIndexSet._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSIndexSet] that wraps the given raw object pointer. + static NSIndexSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSIndexSet._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSIndexSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); + } + + static NSIndexSet indexSet(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + static NSIndexSet indexSetWithIndex_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_146( + _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + static NSIndexSet indexSetWithIndexesInRange_( + NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_170( + _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet initWithIndexesInRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_170(_id, _lib._sel_initWithIndexesInRange_1, range); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet initWithIndexSet_(NSIndexSet? indexSet) { + final _ret = _lib._objc_msgSend_171( + _id, _lib._sel_initWithIndexSet_1, indexSet?._id ?? ffi.nullptr); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet initWithIndex_(int value) { + final _ret = _lib._objc_msgSend_146(_id, _lib._sel_initWithIndex_1, value); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + bool isEqualToIndexSet_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_172( + _id, _lib._sel_isEqualToIndexSet_1, indexSet?._id ?? ffi.nullptr); + } + + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); + } + + int get firstIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); + } + + int get lastIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); + } + + int indexGreaterThanIndex_(int value) { + return _lib._objc_msgSend_173( + _id, _lib._sel_indexGreaterThanIndex_1, value); + } + + int indexLessThanIndex_(int value) { + return _lib._objc_msgSend_173(_id, _lib._sel_indexLessThanIndex_1, value); + } + + int indexGreaterThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_173( + _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); + } + + int indexLessThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_173( + _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); + } + + int getIndexes_maxCount_inIndexRange_(ffi.Pointer indexBuffer, + int bufferSize, NSRangePointer range) { + return _lib._objc_msgSend_174( + _id, + _lib._sel_getIndexes_maxCount_inIndexRange_1, + indexBuffer, + bufferSize, + range); + } + + int countOfIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_175( + _id, _lib._sel_countOfIndexesInRange_1, range); + } + + bool containsIndex_(int value) { + return _lib._objc_msgSend_176(_id, _lib._sel_containsIndex_1, value); + } + + bool containsIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_177( + _id, _lib._sel_containsIndexesInRange_1, range); + } + + bool containsIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_172( + _id, _lib._sel_containsIndexes_1, indexSet?._id ?? ffi.nullptr); + } + + bool intersectsIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_177( + _id, _lib._sel_intersectsIndexesInRange_1, range); + } + + void enumerateIndexesUsingBlock_(ObjCBlock3 block) { + return _lib._objc_msgSend_178( + _id, _lib._sel_enumerateIndexesUsingBlock_1, block._impl); + } + + void enumerateIndexesWithOptions_usingBlock_(int opts, ObjCBlock3 block) { + return _lib._objc_msgSend_179(_id, + _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._impl); + } + + void enumerateIndexesInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock3 block) { + return _lib._objc_msgSend_180( + _id, + _lib._sel_enumerateIndexesInRange_options_usingBlock_1, + range, + opts, + block._impl); + } + + int indexPassingTest_(ObjCBlock4 predicate) { + return _lib._objc_msgSend_181( + _id, _lib._sel_indexPassingTest_1, predicate._impl); + } + + int indexWithOptions_passingTest_(int opts, ObjCBlock4 predicate) { + return _lib._objc_msgSend_182( + _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._impl); + } + + int indexInRange_options_passingTest_( + NSRange range, int opts, ObjCBlock4 predicate) { + return _lib._objc_msgSend_183( + _id, + _lib._sel_indexInRange_options_passingTest_1, + range, + opts, + predicate._impl); + } + + NSIndexSet indexesPassingTest_(ObjCBlock4 predicate) { + final _ret = _lib._objc_msgSend_184( + _id, _lib._sel_indexesPassingTest_1, predicate._impl); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesWithOptions_passingTest_(int opts, ObjCBlock4 predicate) { + final _ret = _lib._objc_msgSend_185( + _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._impl); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesInRange_options_passingTest_( + NSRange range, int opts, ObjCBlock4 predicate) { + final _ret = _lib._objc_msgSend_186( + _id, + _lib._sel_indexesInRange_options_passingTest_1, + range, + opts, + predicate._impl); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + void enumerateRangesUsingBlock_(ObjCBlock5 block) { + return _lib._objc_msgSend_187( + _id, _lib._sel_enumerateRangesUsingBlock_1, block._impl); + } + + void enumerateRangesWithOptions_usingBlock_(int opts, ObjCBlock5 block) { + return _lib._objc_msgSend_188(_id, + _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._impl); + } + + void enumerateRangesInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock5 block) { + return _lib._objc_msgSend_189( + _id, + _lib._sel_enumerateRangesInRange_options_usingBlock_1, + range, + opts, + block._impl); + } + + static NSIndexSet new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); + return NSIndexSet._(_ret, _lib, retain: false, release: true); + } + + static NSIndexSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); + return NSIndexSet._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSRangePointer = ffi.Pointer; +void _ObjCBlock3_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock3_closureRegistry = {}; +int _ObjCBlock3_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock3_registerClosure(Function fn) { + final id = ++_ObjCBlock3_closureRegistryIndex; + _ObjCBlock3_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock3_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return _ObjCBlock3_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock3 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock3._(this._impl, this._lib); + ObjCBlock3.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + NSUInteger arg0, ffi.Pointer arg1)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock3_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock3.fromFunction( + this._lib, void Function(int arg0, ffi.Pointer arg1) fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock3_closureTrampoline) + .cast(), + _ObjCBlock3_registerClosure(fn)); + void call(int arg0, ffi.Pointer arg1) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, int arg0, + ffi.Pointer arg1)>()(_impl, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; +} + +bool _ObjCBlock4_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + bool Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock4_closureRegistry = {}; +int _ObjCBlock4_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock4_registerClosure(Function fn) { + final id = ++_ObjCBlock4_closureRegistryIndex; + _ObjCBlock4_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock4_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return _ObjCBlock4_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock4 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock4._(this._impl, this._lib); + ObjCBlock4.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + NSUInteger arg0, ffi.Pointer arg1)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock4_fnPtrTrampoline, false) + .cast(), + ptr.cast()); + ObjCBlock4.fromFunction( + this._lib, bool Function(int arg0, ffi.Pointer arg1) fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock4_closureTrampoline, false) + .cast(), + _ObjCBlock4_registerClosure(fn)); + bool call(int arg0, ffi.Pointer arg1) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer<_ObjCBlock> block, int arg0, + ffi.Pointer arg1)>()(_impl, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +void _ObjCBlock5_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function( + NSRange arg0, ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock5_closureRegistry = {}; +int _ObjCBlock5_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock5_registerClosure(Function fn) { + final id = ++_ObjCBlock5_closureRegistryIndex; + _ObjCBlock5_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock5_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { + return _ObjCBlock5_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock5 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock5._(this._impl, this._lib); + ObjCBlock5.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSRange arg0, ffi.Pointer arg1)>( + _ObjCBlock5_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock5.fromFunction( + this._lib, void Function(NSRange arg0, ffi.Pointer arg1) fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSRange arg0, ffi.Pointer arg1)>( + _ObjCBlock5_closureTrampoline) + .cast(), + _ObjCBlock5_registerClosure(fn)); + void call(NSRange arg0, ffi.Pointer arg1) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, + ffi.Pointer arg1)>()(_impl, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +typedef NSComparator = ffi.Pointer<_ObjCBlock>; +int _ObjCBlock6_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock6_closureRegistry = {}; +int _ObjCBlock6_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock6_registerClosure(Function fn) { + final id = ++_ObjCBlock6_closureRegistryIndex; + _ObjCBlock6_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +int _ObjCBlock6_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock6_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock6 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock6._(this._impl, this._lib); + ObjCBlock6.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock6_fnPtrTrampoline, 0) + .cast(), + ptr.cast()); + ObjCBlock6.fromFunction( + this._lib, + int Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock6_closureTrampoline, 0) + .cast(), + _ObjCBlock6_registerClosure(fn)); + int call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_impl, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; +} + +/// Mutable Data +class NSMutableData extends NSData { + NSMutableData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableData] that points to the same underlying object as [other]. + static NSMutableData castFrom(T other) { + return NSMutableData._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSMutableData] that wraps the given raw object pointer. + static NSMutableData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableData._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); + } + + ffi.Pointer get mutableBytes { + return _lib._objc_msgSend_18(_id, _lib._sel_mutableBytes1); + } + + @override + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); + } + + set length(int value) { + _lib._objc_msgSend_197(_id, _lib._sel_setLength_1, value); + } + + void appendBytes_length_(ffi.Pointer bytes, int length) { + return _lib._objc_msgSend_20( + _id, _lib._sel_appendBytes_length_1, bytes, length); + } + + void appendData_(NSData? other) { + return _lib._objc_msgSend_198( + _id, _lib._sel_appendData_1, other?._id ?? ffi.nullptr); + } + + void increaseLengthBy_(int extraLength) { + return _lib._objc_msgSend_160( + _id, _lib._sel_increaseLengthBy_1, extraLength); + } + + void replaceBytesInRange_withBytes_( + NSRange range, ffi.Pointer bytes) { + return _lib._objc_msgSend_199( + _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); + } + + void resetBytesInRange_(NSRange range) { + return _lib._objc_msgSend_166(_id, _lib._sel_resetBytesInRange_1, range); + } + + void setData_(NSData? data) { + return _lib._objc_msgSend_198( + _id, _lib._sel_setData_1, data?._id ?? ffi.nullptr); + } + + void replaceBytesInRange_withBytes_length_(NSRange range, + ffi.Pointer replacementBytes, int replacementLength) { + return _lib._objc_msgSend_200( + _id, + _lib._sel_replaceBytesInRange_withBytes_length_1, + range, + replacementBytes, + replacementLength); + } + + static NSMutableData dataWithCapacity_( + NativeCupertinoHttp _lib, int aNumItems) { + final _ret = _lib._objc_msgSend_146( + _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithLength_(NativeCupertinoHttp _lib, int length) { + final _ret = _lib._objc_msgSend_146( + _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + NSMutableData initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_146(_id, _lib._sel_initWithCapacity_1, capacity); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + NSMutableData initWithLength_(int length) { + final _ret = + _lib._objc_msgSend_146(_id, _lib._sel_initWithLength_1, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + /// These methods compress or decompress the receiver's contents in-place using the specified algorithm. If the operation is not successful, these methods leave the receiver unchanged.. + bool decompressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_201( + _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); + } + + bool compressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_201( + _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); + } + + static NSMutableData data(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_121(_lib._class_NSMutableData1, + _lib._sel_dataWithBytes_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_121(_lib._class_NSMutableData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_122(_lib._class_NSMutableData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_123( + _lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_124( + _lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_29(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_110(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_126(_lib._class_NSMutableData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_29(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } +} + +/// Purgeable Data +class NSPurgeableData extends NSMutableData { + NSPurgeableData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSPurgeableData] that points to the same underlying object as [other]. + static NSPurgeableData castFrom(T other) { + return NSPurgeableData._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSPurgeableData] that wraps the given raw object pointer. + static NSPurgeableData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSPurgeableData._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSPurgeableData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSPurgeableData1); + } + + static NSPurgeableData dataWithCapacity_( + NativeCupertinoHttp _lib, int aNumItems) { + final _ret = _lib._objc_msgSend_146( + _lib._class_NSPurgeableData1, _lib._sel_dataWithCapacity_1, aNumItems); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithLength_(NativeCupertinoHttp _lib, int length) { + final _ret = _lib._objc_msgSend_146( + _lib._class_NSPurgeableData1, _lib._sel_dataWithLength_1, length); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData data(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_data1); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_121(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytes_length_1, bytes, length); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_121(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } + + static NSPurgeableData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_122(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } + + static NSPurgeableData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_123( + _lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_124( + _lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_29(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_110(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_126(_lib._class_NSPurgeableData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_29(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_new1); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } + + static NSPurgeableData alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_alloc1); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } +} + +/// Mutable Dictionary +class NSMutableDictionary extends NSDictionary { + NSMutableDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. + static NSMutableDictionary castFrom(T other) { + return NSMutableDictionary._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. + static NSMutableDictionary castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableDictionary._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableDictionary]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableDictionary1); + } + + void removeObjectForKey_(NSObject aKey) { + return _lib._objc_msgSend_109( + _id, _lib._sel_removeObjectForKey_1, aKey._id); + } + + void setObject_forKey_(NSObject anObject, NSObject aKey) { + return _lib._objc_msgSend_202( + _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); + } + + NSMutableDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + NSMutableDictionary initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_146(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + NSMutableDictionary initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + void addEntriesFromDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_203(_id, _lib._sel_addEntriesFromDictionary_1, + otherDictionary?._id ?? ffi.nullptr); + } + + void removeAllObjects() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } + + void removeObjectsForKeys_(NSArray? keyArray) { + return _lib._objc_msgSend_162( + _id, _lib._sel_removeObjectsForKeys_1, keyArray?._id ?? ffi.nullptr); + } + + void setDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_203( + _id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr); + } + + void setObject_forKeyedSubscript_(NSObject obj, NSObject key) { + return _lib._objc_msgSend_202( + _id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id); + } + + static NSMutableDictionary dictionaryWithCapacity_( + NativeCupertinoHttp _lib, int numItems) { + final _ret = _lib._objc_msgSend_146(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_204(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_205(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + NSMutableDictionary initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_204( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + NSMutableDictionary initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_205( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Create a mutable dictionary which is optimized for dealing with a known set of keys. + /// Keys that are not in the key set can still be set into the dictionary, but that usage is not optimal. + /// As with any dictionary, the keys must be copyable. + /// If keyset is nil, an exception is thrown. + /// If keyset is not an object returned by +sharedKeySetForKeys:, an exception is thrown. + static NSMutableDictionary dictionaryWithSharedKeySet_( + NativeCupertinoHttp _lib, NSObject keyset) { + final _ret = _lib._objc_msgSend_206(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionary(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObject_forKey_( + NativeCupertinoHttp _lib, NSObject object, NSObject key) { + final _ret = _lib._objc_msgSend_80(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjects_forKeys_count_( + NativeCupertinoHttp _lib, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_81(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjectsAndKeys_( + NativeCupertinoHttp _lib, NSObject firstObject) { + final _ret = _lib._objc_msgSend_71(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithDictionary_( + NativeCupertinoHttp _lib, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_82(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjects_forKeys_( + NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_83( + _lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Reads dictionary stored in NSPropertyList format from the specified url. + static NSDictionary dictionaryWithContentsOfURL_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_85( + _lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. + /// The keys are copied from the array and must be copyable. + /// If the array parameter is nil or not an NSArray, an exception is thrown. + /// If the array of keys is empty, an empty key set is returned. + /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). + /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. + /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. + static NSObject sharedKeySetForKeys_( + NativeCupertinoHttp _lib, NSArray? keys) { + final _ret = _lib._objc_msgSend_86(_lib._class_NSMutableDictionary1, + _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } + + static NSMutableDictionary alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_alloc1); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } +} + +/// ! +/// @enum NSURLRequestCachePolicy +/// +/// @discussion The NSURLRequestCachePolicy enum defines constants that +/// can be used to specify the type of interactions that take place with +/// the caching system when the URL loading system processes a request. +/// Specifically, these constants cover interactions that have to do +/// with whether already-existing cache data is returned to satisfy a +/// URL load request. +/// +/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the +/// caching logic defined in the protocol implementation, if any, is +/// used for a particular URL load request. This is the default policy +/// for URL load requests. +/// +/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the +/// data for the URL load should be loaded from the origin source. No +/// existing local cache data, regardless of its freshness or validity, +/// should be used to satisfy a URL load request. +/// +/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that +/// not only should the local cache data be ignored, but that proxies and +/// other intermediates should be instructed to disregard their caches +/// so far as the protocol allows. +/// +/// @constant NSURLRequestReloadIgnoringCacheData Older name for +/// NSURLRequestReloadIgnoringLocalCacheData. +/// +/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, +/// the URL is loaded from the origin source. +/// +/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, no +/// attempt is made to load the URL from the origin source, and the +/// load is considered to have failed. This constant specifies a +/// behavior that is similar to an "offline" mode. +/// +/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that +/// the existing cache data may be used provided the origin source +/// confirms its validity, otherwise the URL is loaded from the +/// origin source. +abstract class NSURLRequestCachePolicy { + static const int NSURLRequestUseProtocolCachePolicy = 0; + static const int NSURLRequestReloadIgnoringLocalCacheData = 1; + static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; + static const int NSURLRequestReloadIgnoringCacheData = 1; + static const int NSURLRequestReturnCacheDataElseLoad = 2; + static const int NSURLRequestReturnCacheDataDontLoad = 3; + static const int NSURLRequestReloadRevalidatingCacheData = 5; +} + +/// ! +/// @enum NSURLRequestNetworkServiceType +/// +/// @discussion The NSURLRequestNetworkServiceType enum defines constants that +/// can be used to specify the service type to associate with this request. The +/// service type is used to provide the networking layers a hint of the purpose +/// of the request. +/// +/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest +/// when created. This value should be left unchanged for the vast majority of requests. +/// +/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP +/// control traffic. +/// +/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video +/// traffic. +/// +/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background +/// traffic (such as a file download). +/// +/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. +/// +/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. +/// +/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. +abstract class NSURLRequestNetworkServiceType { + /// Standard internet traffic + static const int NSURLNetworkServiceTypeDefault = 0; + + /// Voice over IP control traffic + static const int NSURLNetworkServiceTypeVoIP = 1; + + /// Video traffic + static const int NSURLNetworkServiceTypeVideo = 2; + + /// Background traffic + static const int NSURLNetworkServiceTypeBackground = 3; + + /// Voice data + static const int NSURLNetworkServiceTypeVoice = 4; + + /// Responsive data + static const int NSURLNetworkServiceTypeResponsiveData = 6; + + /// Multimedia Audio/Video Streaming + static const int NSURLNetworkServiceTypeAVStreaming = 8; + + /// Responsive Multimedia Audio/Video + static const int NSURLNetworkServiceTypeResponsiveAV = 9; + + /// Call Signaling + static const int NSURLNetworkServiceTypeCallSignaling = 11; +} + +/// ! +/// @class NSURLRequest +/// +/// @abstract An NSURLRequest object represents a URL load request in a +/// manner independent of protocol and URL scheme. +/// +/// @discussion NSURLRequest encapsulates two basic data elements about +/// a URL load request: +///
    +///
  • The URL to load. +///
  • The policy to use when consulting the URL content cache made +/// available by the implementation. +///
+/// In addition, NSURLRequest is designed to be extended to support +/// protocol-specific data by adding categories to access a property +/// object provided in an interface targeted at protocol implementors. +///
    +///
  • Protocol implementors should direct their attention to the +/// NSURLRequestExtensibility category on NSURLRequest for more +/// information on how to provide extensions on NSURLRequest to +/// support protocol-specific request information. +///
  • Clients of this API who wish to create NSURLRequest objects to +/// load URL content should consult the protocol-specific NSURLRequest +/// categories that are available. The NSHTTPURLRequest category on +/// NSURLRequest is an example. +///
+///

+/// Objects of this class are used to create NSURLConnection instances, +/// which can are used to perform the load of a URL, or as input to the +/// NSURLConnection class method which performs synchronous loads. +class NSURLRequest extends NSObject { + NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLRequest] that points to the same underlying object as [other]. + static NSURLRequest castFrom(T other) { + return NSURLRequest._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLRequest] that wraps the given raw object pointer. + static NSURLRequest castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLRequest._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLRequest]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); + } + + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL? URL) { + final _ret = _lib._objc_msgSend_110(_lib._class_NSURLRequest1, + _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_11( + _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); + } + + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + NativeCupertinoHttp _lib, + NSURL? URL, + int cachePolicy, + double timeoutInterval) { + final _ret = _lib._objc_msgSend_207( + _lib._class_NSURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_(NSURL? URL) { + final _ret = _lib._objc_msgSend_110( + _id, _lib._sel_initWithURL_1, URL?._id ?? ffi.nullptr); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL and + /// cache policy. + /// @discussion This is the designated initializer for the + /// NSURLRequest class. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_cachePolicy_timeoutInterval_( + NSURL? URL, int cachePolicy, double timeoutInterval) { + final _ret = _lib._objc_msgSend_207( + _id, + _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + NSURL? get URL { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the cache policy of the receiver. + /// @result The cache policy of the receiver. + int get cachePolicy { + return _lib._objc_msgSend_208(_id, _lib._sel_cachePolicy1); + } + + /// ! + /// @abstract Returns the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval alloted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + /// @result The timeout interval of the receiver. + double get timeoutInterval { + return _lib._objc_msgSend_65(_id, _lib._sel_timeoutInterval1); + } + + /// ! + /// @abstract The main document URL associated with this load. + /// @discussion This URL is used for the cookie "same domain as main + /// document" policy. There may also be other future uses. + /// See setMainDocumentURL: + /// NOTE: In the current implementation, this value is unused by the + /// framework. A fully functional version of this method will be available + /// in the future. + /// @result The main document URL. + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_mainDocumentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. + /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have + /// not explicitly set a networkServiceType (using the setNetworkServiceType method). + /// @result The NSURLRequestNetworkServiceType associated with this request. + int get networkServiceType { + return _lib._objc_msgSend_209(_id, _lib._sel_networkServiceType1); + } + + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @result YES if the receiver is allowed to use the built in cellular radios to + /// satify the request, NO otherwise. + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); + } + + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @result YES if the receiver is allowed to use an interface marked as expensive to + /// satify the request, NO otherwise. + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } + + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @result YES if the receiver is allowed to use an interface marked as constrained to + /// satify the request, NO otherwise. + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } + + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); + } + + /// ! + /// @abstract Returns the HTTP request method of the receiver. + /// @result the HTTP request method of the receiver. + NSString? get HTTPMethod { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_HTTPMethod1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns a dictionary containing all the HTTP header fields + /// of the receiver. + /// @result a dictionary containing all the HTTP header fields of the + /// receiver. + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_allHTTPHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method valueForHTTPHeaderField: + /// @abstract Returns the value which corresponds to the given header + /// field. Note that, in keeping with the HTTP RFC, HTTP header field + /// names are case-insensitive. + /// @param field the header field name to use for the lookup + /// (case-insensitive). + /// @result the value associated with the given header field, or nil if + /// there is no value associated with the given header field. + NSString valueForHTTPHeaderField_(NSString? field) { + final _ret = _lib._objc_msgSend_149( + _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + /// @result The request body data of the receiver. + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_HTTPBody1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the request body stream of the receiver + /// if any has been set + /// @discussion The stream is returned for examination only; it is + /// not safe for the caller to manipulate the stream in any way. Also + /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only + /// one can be set on a given request. Also note that the body stream is + /// preserved across copies, but is LOST when the request is coded via the + /// NSCoding protocol + /// @result The request body stream of the receiver. + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_210(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Determine whether default cookie handling will happen for + /// this request. + /// @discussion NOTE: This value is not used prior to 10.3 + /// @result YES if cookies will be sent with and set for this request; + /// otherwise NO. + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); + } + + /// ! + /// @abstract Reports whether the receiver is not expected to wait for the + /// previous response before transmitting. + /// @result YES if the receiver should transmit before the previous response + /// is received. NO if the receiver should wait for the previous response + /// before transmitting. + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + } + + static NSURLRequest new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); + } + + static NSURLRequest alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSTimeInterval = ffi.Double; + +class NSInputStream extends _ObjCWrapper { + NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSInputStream] that points to the same underlying object as [other]. + static NSInputStream castFrom(T other) { + return NSInputStream._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSInputStream] that wraps the given raw object pointer. + static NSInputStream castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInputStream._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSInputStream]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); + } +} + +/// ! +/// @class NSMutableURLRequest +/// +/// @abstract An NSMutableURLRequest object represents a mutable URL load +/// request in a manner independent of protocol and URL scheme. +/// +/// @discussion This specialization of NSURLRequest is provided to aid +/// developers who may find it more convenient to mutate a single request +/// object for a series of URL loads instead of creating an immutable +/// NSURLRequest for each load. This programming model is supported by +/// the following contract stipulation between NSMutableURLRequest and +/// NSURLConnection: NSURLConnection makes a deep copy of each +/// NSMutableURLRequest object passed to one of its initializers. +///

NSMutableURLRequest is designed to be extended to support +/// protocol-specific data by adding categories to access a property +/// object provided in an interface targeted at protocol implementors. +///

    +///
  • Protocol implementors should direct their attention to the +/// NSMutableURLRequestExtensibility category on +/// NSMutableURLRequest for more information on how to provide +/// extensions on NSMutableURLRequest to support protocol-specific +/// request information. +///
  • Clients of this API who wish to create NSMutableURLRequest +/// objects to load URL content should consult the protocol-specific +/// NSMutableURLRequest categories that are available. The +/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an +/// example. +///
+class NSMutableURLRequest extends NSURLRequest { + NSMutableURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. + static NSMutableURLRequest castFrom(T other) { + return NSMutableURLRequest._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. + static NSMutableURLRequest castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableURLRequest._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableURLRequest]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableURLRequest1); + } + + /// ! + /// @abstract The URL of the receiver. + @override + NSURL? get URL { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract The URL of the receiver. + set URL(NSURL? value) { + _lib._objc_msgSend_211(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract The cache policy of the receiver. + @override + int get cachePolicy { + return _lib._objc_msgSend_208(_id, _lib._sel_cachePolicy1); + } + + /// ! + /// @abstract The cache policy of the receiver. + set cachePolicy(int value) { + _lib._objc_msgSend_212(_id, _lib._sel_setCachePolicy_1, value); + } + + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + @override + double get timeoutInterval { + return _lib._objc_msgSend_65(_id, _lib._sel_timeoutInterval1); + } + + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + set timeoutInterval(double value) { + _lib._objc_msgSend_213(_id, _lib._sel_setTimeoutInterval_1, value); + } + + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document will be used to implement the cookie + /// "only from same domain as main document" policy, and possibly + /// other things in the future. + /// NOTE: In the current implementation, the passed-in value is unused by the + /// framework. A fully functional version of this method will be available + /// in the future. + @override + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_mainDocumentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document will be used to implement the cookie + /// "only from same domain as main document" policy, and possibly + /// other things in the future. + /// NOTE: In the current implementation, the passed-in value is unused by the + /// framework. A fully functional version of this method will be available + /// in the future. + set mainDocumentURL(NSURL? value) { + _lib._objc_msgSend_211( + _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + @override + int get networkServiceType { + return _lib._objc_msgSend_209(_id, _lib._sel_networkServiceType1); + } + + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + set networkServiceType(int value) { + _lib._objc_msgSend_214(_id, _lib._sel_setNetworkServiceType_1, value); + } + + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + @override + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); + } + + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + set allowsCellularAccess(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setAllowsCellularAccess_1, value); + } + + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satify the request, YES otherwise. + @override + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } + + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satify the request, YES otherwise. + set allowsExpensiveNetworkAccess(bool value) { + _lib._objc_msgSend_215( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + } + + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satify the request, YES otherwise. + @override + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } + + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satify the request, YES otherwise. + set allowsConstrainedNetworkAccess(bool value) { + _lib._objc_msgSend_215( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + } + + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + @override + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); + } + + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + set assumesHTTP3Capable(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setAssumesHTTP3Capable_1, value); + } + + /// ! + /// @abstract Sets the HTTP request method of the receiver. + @override + NSString? get HTTPMethod { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_HTTPMethod1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Sets the HTTP request method of the receiver. + set HTTPMethod(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setHTTPMethod_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract Sets the HTTP header fields of the receiver to the given + /// dictionary. + /// @discussion This method replaces all header fields that may have + /// existed before this method call. + ///

Since HTTP header fields must be string values, each object and + /// key in the dictionary passed to this method must answer YES when + /// sent an -isKindOfClass:[NSString class] message. If either + /// the key or value for a key-value pair answers NO when sent this + /// message, the key-value pair is skipped. + @override + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_allHTTPHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Sets the HTTP header fields of the receiver to the given + /// dictionary. + /// @discussion This method replaces all header fields that may have + /// existed before this method call. + ///

Since HTTP header fields must be string values, each object and + /// key in the dictionary passed to this method must answer YES when + /// sent an -isKindOfClass:[NSString class] message. If either + /// the key or value for a key-value pair answers NO when sent this + /// message, the key-value pair is skipped. + set allHTTPHeaderFields(NSDictionary? value) { + _lib._objc_msgSend_217( + _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @method setValue:forHTTPHeaderField: + /// @abstract Sets the value of the given HTTP header field. + /// @discussion If a value was previously set for the given header + /// field, that value is replaced with the given value. Note that, in + /// keeping with the HTTP RFC, HTTP header field names are + /// case-insensitive. + /// @param value the header field value. + /// @param field the header field name (case-insensitive). + void setValue_forHTTPHeaderField_(NSString? value, NSString? field) { + return _lib._objc_msgSend_218(_id, _lib._sel_setValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + } + + /// ! + /// @method addValue:forHTTPHeaderField: + /// @abstract Adds an HTTP header field in the current header + /// dictionary. + /// @discussion This method provides a way to add values to header + /// fields incrementally. If a value was previously set for the given + /// header field, the given value is appended to the previously-existing + /// value. The appropriate field delimiter, a comma in the case of HTTP, + /// is added by the implementation, and should not be added to the given + /// value by the caller. Note that, in keeping with the HTTP RFC, HTTP + /// header field names are case-insensitive. + /// @param value the header field value. + /// @param field the header field name (case-insensitive). + void addValue_forHTTPHeaderField_(NSString? value, NSString? field) { + return _lib._objc_msgSend_218(_id, _lib._sel_addValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract Sets the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + @override + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_HTTPBody1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Sets the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + set HTTPBody(NSData? value) { + _lib._objc_msgSend_219( + _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract Sets the request body to be the contents of the given stream. + /// @discussion The provided stream should be unopened; the request will take + /// over the stream's delegate. The entire stream's contents will be + /// transmitted as the HTTP body of the request. Note that the body stream + /// and the body data (set by setHTTPBody:, above) are mutually exclusive + /// - setting one will clear the other. + @override + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_210(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Sets the request body to be the contents of the given stream. + /// @discussion The provided stream should be unopened; the request will take + /// over the stream's delegate. The entire stream's contents will be + /// transmitted as the HTTP body of the request. Note that the body stream + /// and the body data (set by setHTTPBody:, above) are mutually exclusive + /// - setting one will clear the other. + set HTTPBodyStream(NSInputStream? value) { + _lib._objc_msgSend_220( + _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract Decide whether default cookie handling will happen for + /// this request (YES if cookies should be sent with and set for this request; + /// otherwise NO). + /// @discussion The default is YES - in other words, cookies are sent from and + /// stored to the cookie manager by default. + /// NOTE: In releases prior to 10.3, this value is ignored + @override + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); + } + + /// ! + /// @abstract Decide whether default cookie handling will happen for + /// this request (YES if cookies should be sent with and set for this request; + /// otherwise NO). + /// @discussion The default is YES - in other words, cookies are sent from and + /// stored to the cookie manager by default. + /// NOTE: In releases prior to 10.3, this value is ignored + set HTTPShouldHandleCookies(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); + } + + /// ! + /// @abstract Sets whether the request should not wait for the previous response + /// before transmitting (YES if the receiver should transmit before the previous response is + /// received. NO to wait for the previous response before transmitting) + /// @discussion Calling this method with a YES value does not guarantee HTTP + /// pipelining behavior. This method may have no effect if an HTTP proxy is + /// configured, or if the HTTP request uses an unsafe request method (e.g., POST + /// requests will not pipeline). Pipelining behavior also may not begin until + /// the second request on a given TCP connection. There may be other situations + /// where pipelining does not occur even though YES was set. + /// HTTP 1.1 allows the client to send multiple requests to the server without + /// waiting for a response. Though HTTP 1.1 requires support for pipelining, + /// some servers report themselves as being HTTP 1.1 but do not support + /// pipelining (disconnecting, sending resources misordered, omitting part of + /// a resource, etc.). + @override + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + } + + /// ! + /// @abstract Sets whether the request should not wait for the previous response + /// before transmitting (YES if the receiver should transmit before the previous response is + /// received. NO to wait for the previous response before transmitting) + /// @discussion Calling this method with a YES value does not guarantee HTTP + /// pipelining behavior. This method may have no effect if an HTTP proxy is + /// configured, or if the HTTP request uses an unsafe request method (e.g., POST + /// requests will not pipeline). Pipelining behavior also may not begin until + /// the second request on a given TCP connection. There may be other situations + /// where pipelining does not occur even though YES was set. + /// HTTP 1.1 allows the client to send multiple requests to the server without + /// waiting for a response. Though HTTP 1.1 requires support for pipelining, + /// some servers report themselves as being HTTP 1.1 but do not support + /// pipelining (disconnecting, sending resources misordered, omitting part of + /// a resource, etc.). + set HTTPShouldUsePipelining(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + } + + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_( + NativeCupertinoHttp _lib, NSURL? URL) { + final _ret = _lib._objc_msgSend_110(_lib._class_NSMutableURLRequest1, + _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_11( + _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); + } + + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( + NativeCupertinoHttp _lib, + NSURL? URL, + int cachePolicy, + double timeoutInterval) { + final _ret = _lib._objc_msgSend_207( + _lib._class_NSMutableURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } + + static NSMutableURLRequest new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + } + + static NSMutableURLRequest alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + } +} + +/// NSURLSession is a replacement API for NSURLConnection. It provides +/// options that affect the policy of, and various aspects of the +/// mechanism by which NSURLRequest objects are retrieved from the +/// network. +/// +/// An NSURLSession may be bound to a delegate object. The delegate is +/// invoked for certain events during the lifetime of a session, such as +/// server authentication or determining whether a resource to be loaded +/// should be converted into a download. +/// +/// NSURLSession instances are threadsafe. +/// +/// The default NSURLSession uses a system provided delegate and is +/// appropriate to use in place of existing code that uses +/// +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] +/// +/// An NSURLSession creates NSURLSessionTask objects which represent the +/// action of a resource being loaded. These are analogous to +/// NSURLConnection objects but provide for more control and a unified +/// delegate model. +/// +/// NSURLSessionTask objects are always created in a suspended state and +/// must be sent the -resume message before they will execute. +/// +/// Subclasses of NSURLSessionTask are used to syntactically +/// differentiate between data and file downloads. +/// +/// An NSURLSessionDataTask receives the resource as a series of calls to +/// the URLSession:dataTask:didReceiveData: delegate method. This is type of +/// task most commonly associated with retrieving objects for immediate parsing +/// by the consumer. +/// +/// An NSURLSessionUploadTask differs from an NSURLSessionDataTask +/// in how its instance is constructed. Upload tasks are explicitly created +/// by referencing a file or data object to upload, or by utilizing the +/// -URLSession:task:needNewBodyStream: delegate message to supply an upload +/// body. +/// +/// An NSURLSessionDownloadTask will directly write the response data to +/// a temporary file. When completed, the delegate is sent +/// URLSession:downloadTask:didFinishDownloadingToURL: and given an opportunity +/// to move this file to a permanent location in its sandboxed container, or to +/// otherwise read the file. If canceled, an NSURLSessionDownloadTask can +/// produce a data blob that can be used to resume a download at a later +/// time. +/// +/// Beginning with iOS 9 and Mac OS X 10.11, NSURLSessionStream is +/// available as a task type. This allows for direct TCP/IP connection +/// to a given host and port with optional secure handshaking and +/// navigation of proxies. Data tasks may also be upgraded to a +/// NSURLSessionStream task via the HTTP Upgrade: header and appropriate +/// use of the pipelining option of NSURLSessionConfiguration. See RFC +/// 2817 and RFC 6455 for information about the Upgrade: header, and +/// comments below on turning data tasks into stream tasks. +/// +/// An NSURLSessionWebSocketTask is a task that allows clients to connect to servers supporting +/// WebSocket. The task will perform the HTTP handshake to upgrade the connection +/// and once the WebSocket handshake is successful, the client can read and write +/// messages that will be framed using the WebSocket protocol by the framework. +class NSURLSession extends NSObject { + NSURLSession._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSession] that points to the same underlying object as [other]. + static NSURLSession castFrom(T other) { + return NSURLSession._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLSession] that wraps the given raw object pointer. + static NSURLSession castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSession._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSession]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLSession1); + } + + /// The shared session uses the currently set global NSURLCache, + /// NSHTTPCookieStorage and NSURLCredentialStorage objects. + static NSURLSession? getSharedSession(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_221( + _lib._class_NSURLSession1, _lib._sel_sharedSession1); + return _ret.address == 0 + ? null + : NSURLSession._(_ret, _lib, retain: true, release: true); + } + + /// Customization of NSURLSession occurs during creation of a new session. + /// If you only need to use the convenience routines with custom + /// configuration options it is not necessary to specify a delegate. + /// If you do specify a delegate, the delegate will be retained until after + /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. + static NSURLSession sessionWithConfiguration_( + NativeCupertinoHttp _lib, NSURLSessionConfiguration? configuration) { + final _ret = _lib._objc_msgSend_268( + _lib._class_NSURLSession1, + _lib._sel_sessionWithConfiguration_1, + configuration?._id ?? ffi.nullptr); + return NSURLSession._(_ret, _lib, retain: true, release: true); + } + + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NativeCupertinoHttp _lib, + NSURLSessionConfiguration? configuration, + NSObject? delegate, + NSOperationQueue? queue) { + final _ret = _lib._objc_msgSend_279( + _lib._class_NSURLSession1, + _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, + configuration?._id ?? ffi.nullptr, + delegate?._id ?? ffi.nullptr, + queue?._id ?? ffi.nullptr); + return NSURLSession._(_ret, _lib, retain: true, release: true); + } + + NSOperationQueue? get delegateQueue { + final _ret = _lib._objc_msgSend_278(_id, _lib._sel_delegateQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } + + NSObject? get delegate { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionConfiguration? get configuration { + final _ret = _lib._objc_msgSend_222(_id, _lib._sel_configuration1); + return _ret.address == 0 + ? null + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + /// The sessionDescription property is available for the developer to + /// provide a descriptive label for the session. + NSString? get sessionDescription { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_sessionDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// The sessionDescription property is available for the developer to + /// provide a descriptive label for the session. + set sessionDescription(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); + } + + /// -finishTasksAndInvalidate returns immediately and existing tasks will be allowed + /// to run to completion. New tasks may not be created. The session + /// will continue to make delegate callbacks until URLSession:didBecomeInvalidWithError: + /// has been issued. + /// + /// -finishTasksAndInvalidate and -invalidateAndCancel do not + /// have any effect on the shared session singleton. + /// + /// When invalidating a background session, it is not safe to create another background + /// session with the same identifier until URLSession:didBecomeInvalidWithError: has + /// been issued. + void finishTasksAndInvalidate() { + return _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); + } + + /// -invalidateAndCancel acts as -finishTasksAndInvalidate, but issues + /// -cancel to all outstanding tasks for this session. Note task + /// cancellation is subject to the state of the task, and some tasks may + /// have already have completed at the time they are sent -cancel. + void invalidateAndCancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); + } + + /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue if not nil. + void resetWithCompletionHandler_(ObjCBlock7 completionHandler) { + return _lib._objc_msgSend_275( + _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._impl); + } + + /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue if not nil. + void flushWithCompletionHandler_(ObjCBlock7 completionHandler) { + return _lib._objc_msgSend_275( + _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._impl); + } + + /// invokes completionHandler with outstanding data, upload and download tasks. + void getTasksWithCompletionHandler_(ObjCBlock10 completionHandler) { + return _lib._objc_msgSend_280(_id, + _lib._sel_getTasksWithCompletionHandler_1, completionHandler._impl); + } + + /// invokes completionHandler with all outstanding tasks. + void getAllTasksWithCompletionHandler_(ObjCBlock9 completionHandler) { + return _lib._objc_msgSend_281(_id, + _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._impl); + } + + /// Creates a data task with the given request. The request may have a body stream. + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_282( + _id, _lib._sel_dataTaskWithRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a data task to retrieve the contents of the given URL. + NSURLSessionDataTask dataTaskWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_283( + _id, _lib._sel_dataTaskWithURL_1, url?._id ?? ffi.nullptr); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest? request, NSURL? fileURL) { + final _ret = _lib._objc_msgSend_284( + _id, + _lib._sel_uploadTaskWithRequest_fromFile_1, + request?._id ?? ffi.nullptr, + fileURL?._id ?? ffi.nullptr); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates an upload task with the given request. The body of the request is provided from the bodyData. + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest? request, NSData? bodyData) { + final _ret = _lib._objc_msgSend_285( + _id, + _lib._sel_uploadTaskWithRequest_fromData_1, + request?._id ?? ffi.nullptr, + bodyData?._id ?? ffi.nullptr); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_286(_id, + _lib._sel_uploadTaskWithStreamedRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a download task with the given request. + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_288( + _id, _lib._sel_downloadTaskWithRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a download task to download the contents of the given URL. + NSURLSessionDownloadTask downloadTaskWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_289( + _id, _lib._sel_downloadTaskWithURL_1, url?._id ?? ffi.nullptr); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. + NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData? resumeData) { + final _ret = _lib._objc_msgSend_290(_id, + _lib._sel_downloadTaskWithResumeData_1, resumeData?._id ?? ffi.nullptr); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a bidirectional stream task to a given host and port. + NSURLSessionStreamTask streamTaskWithHostName_port_( + NSString? hostname, int port) { + final _ret = _lib._objc_msgSend_293( + _id, + _lib._sel_streamTaskWithHostName_port_1, + hostname?._id ?? ffi.nullptr, + port); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. + /// The NSNetService will be resolved before any IO completes. + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService? service) { + final _ret = _lib._objc_msgSend_294( + _id, _lib._sel_streamTaskWithNetService_1, service?._id ?? ffi.nullptr); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. + NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_301( + _id, _lib._sel_webSocketTaskWithURL_1, url?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a WebSocket task given the url and an array of protocols. The protocols will be used in the WebSocket handshake to + /// negotiate a prefered protocol with the server + /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + NSURL? url, NSArray? protocols) { + final _ret = _lib._objc_msgSend_302( + _id, + _lib._sel_webSocketTaskWithURL_protocols_1, + url?._id ?? ffi.nullptr, + protocols?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a WebSocket task given the request. The request properties can be modified and will be used by the task during the HTTP handshake phase. + /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol + /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_303( + _id, _lib._sel_webSocketTaskWithRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLSession init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSession._(_ret, _lib, retain: true, release: true); + } + + static NSURLSession new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_new1); + return NSURLSession._(_ret, _lib, retain: false, release: true); + } + + /// data task convenience methods. These methods create tasks that + /// bypass the normal delegate calls for response and data delivery, + /// and provide a simple cancelable asynchronous interface to receiving + /// data. Errors will be returned in the NSURLErrorDomain, + /// see . The delegate, if any, will still be + /// called for authentication challenges. + NSURLSessionDataTask dataTaskWithRequest_completionHandler_( + NSURLRequest? request, ObjCBlock15 completionHandler) { + final _ret = _lib._objc_msgSend_304( + _id, + _lib._sel_dataTaskWithRequest_completionHandler_1, + request?._id ?? ffi.nullptr, + completionHandler._impl); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDataTask dataTaskWithURL_completionHandler_( + NSURL? url, ObjCBlock15 completionHandler) { + final _ret = _lib._objc_msgSend_305( + _id, + _lib._sel_dataTaskWithURL_completionHandler_1, + url?._id ?? ffi.nullptr, + completionHandler._impl); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + /// upload convenience method. + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest? request, NSURL? fileURL, ObjCBlock15 completionHandler) { + final _ret = _lib._objc_msgSend_306( + _id, + _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, + request?._id ?? ffi.nullptr, + fileURL?._id ?? ffi.nullptr, + completionHandler._impl); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest? request, NSData? bodyData, ObjCBlock15 completionHandler) { + final _ret = _lib._objc_msgSend_307( + _id, + _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, + request?._id ?? ffi.nullptr, + bodyData?._id ?? ffi.nullptr, + completionHandler._impl); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + /// download task convenience methods. When a download successfully + /// completes, the NSURL will point to a file that must be read or + /// copied during the invocation of the completion routine. The file + /// will be removed automatically. + NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( + NSURLRequest? request, ObjCBlock16 completionHandler) { + final _ret = _lib._objc_msgSend_308( + _id, + _lib._sel_downloadTaskWithRequest_completionHandler_1, + request?._id ?? ffi.nullptr, + completionHandler._impl); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( + NSURL? url, ObjCBlock16 completionHandler) { + final _ret = _lib._objc_msgSend_309( + _id, + _lib._sel_downloadTaskWithURL_completionHandler_1, + url?._id ?? ffi.nullptr, + completionHandler._impl); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + NSData? resumeData, ObjCBlock16 completionHandler) { + final _ret = _lib._objc_msgSend_310( + _id, + _lib._sel_downloadTaskWithResumeData_completionHandler_1, + resumeData?._id ?? ffi.nullptr, + completionHandler._impl); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSession alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_alloc1); + return NSURLSession._(_ret, _lib, retain: false, release: true); + } +} + +/// Configuration options for an NSURLSession. When a session is +/// created, a copy of the configuration object is made - you cannot +/// modify the configuration of a session after it has been created. +/// +/// The shared session uses the global singleton credential, cache +/// and cookie storage objects. +/// +/// An ephemeral session has no persistent disk storage for cookies, +/// cache or credentials. +/// +/// A background session can be used to perform networking operations +/// on behalf of a suspended application, within certain constraints. +class NSURLSessionConfiguration extends NSObject { + NSURLSessionConfiguration._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionConfiguration] that points to the same underlying object as [other]. + static NSURLSessionConfiguration castFrom(T other) { + return NSURLSessionConfiguration._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. + static NSURLSessionConfiguration castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionConfiguration._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionConfiguration1); + } + + static NSURLSessionConfiguration? getDefaultSessionConfiguration( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_222(_lib._class_NSURLSessionConfiguration1, + _lib._sel_defaultSessionConfiguration1); + return _ret.address == 0 + ? null + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionConfiguration? getEphemeralSessionConfiguration( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_222(_lib._class_NSURLSessionConfiguration1, + _lib._sel_ephemeralSessionConfiguration1); + return _ret.address == 0 + ? null + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionConfiguration + backgroundSessionConfigurationWithIdentifier_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_223( + _lib._class_NSURLSessionConfiguration1, + _lib._sel_backgroundSessionConfigurationWithIdentifier_1, + identifier?._id ?? ffi.nullptr); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + /// identifier for the background session configuration + NSString? get identifier { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_identifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// default cache policy for requests + int get requestCachePolicy { + return _lib._objc_msgSend_208(_id, _lib._sel_requestCachePolicy1); + } + + /// default cache policy for requests + set requestCachePolicy(int value) { + _lib._objc_msgSend_212(_id, _lib._sel_setRequestCachePolicy_1, value); + } + + /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. + double get timeoutIntervalForRequest { + return _lib._objc_msgSend_65(_id, _lib._sel_timeoutIntervalForRequest1); + } + + /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. + set timeoutIntervalForRequest(double value) { + _lib._objc_msgSend_213( + _id, _lib._sel_setTimeoutIntervalForRequest_1, value); + } + + /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. + double get timeoutIntervalForResource { + return _lib._objc_msgSend_65(_id, _lib._sel_timeoutIntervalForResource1); + } + + /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. + set timeoutIntervalForResource(double value) { + _lib._objc_msgSend_213( + _id, _lib._sel_setTimeoutIntervalForResource_1, value); + } + + /// type of service for requests. + int get networkServiceType { + return _lib._objc_msgSend_209(_id, _lib._sel_networkServiceType1); + } + + /// type of service for requests. + set networkServiceType(int value) { + _lib._objc_msgSend_214(_id, _lib._sel_setNetworkServiceType_1, value); + } + + /// allow request to route over cellular. + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); + } + + /// allow request to route over cellular. + set allowsCellularAccess(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setAllowsCellularAccess_1, value); + } + + /// allow request to route over expensive networks. Defaults to YES. + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } + + /// allow request to route over expensive networks. Defaults to YES. + set allowsExpensiveNetworkAccess(bool value) { + _lib._objc_msgSend_215( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + } + + /// allow request to route over networks in constrained mode. Defaults to YES. + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } + + /// allow request to route over networks in constrained mode. Defaults to YES. + set allowsConstrainedNetworkAccess(bool value) { + _lib._objc_msgSend_215( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + } + + /// Causes tasks to wait for network connectivity to become available, rather + /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) + /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest + /// property does not apply, but the timeoutIntervalForResource property does. + /// + /// Unsatisfactory connectivity (that requires waiting) includes cases where the + /// device has limited or insufficient connectivity for a task (e.g., only has a + /// cellular connection but the allowsCellularAccess property is NO, or requires + /// a VPN connection in order to reach the desired host). + /// + /// Default value is NO. Ignored by background sessions, as background sessions + /// always wait for connectivity. + bool get waitsForConnectivity { + return _lib._objc_msgSend_11(_id, _lib._sel_waitsForConnectivity1); + } + + /// Causes tasks to wait for network connectivity to become available, rather + /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) + /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest + /// property does not apply, but the timeoutIntervalForResource property does. + /// + /// Unsatisfactory connectivity (that requires waiting) includes cases where the + /// device has limited or insufficient connectivity for a task (e.g., only has a + /// cellular connection but the allowsCellularAccess property is NO, or requires + /// a VPN connection in order to reach the desired host). + /// + /// Default value is NO. Ignored by background sessions, as background sessions + /// always wait for connectivity. + set waitsForConnectivity(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setWaitsForConnectivity_1, value); + } + + /// allows background tasks to be scheduled at the discretion of the system for optimal performance. + bool get discretionary { + return _lib._objc_msgSend_11(_id, _lib._sel_isDiscretionary1); + } + + /// allows background tasks to be scheduled at the discretion of the system for optimal performance. + set discretionary(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setDiscretionary_1, value); + } + + /// The identifier of the shared data container into which files in background sessions should be downloaded. + /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or + /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. + NSString? get sharedContainerIdentifier { + final _ret = + _lib._objc_msgSend_19(_id, _lib._sel_sharedContainerIdentifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// The identifier of the shared data container into which files in background sessions should be downloaded. + /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or + /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. + set sharedContainerIdentifier(NSString? value) { + _lib._objc_msgSend_216(_id, _lib._sel_setSharedContainerIdentifier_1, + value?._id ?? ffi.nullptr); + } + + /// Allows the app to be resumed or launched in the background when tasks in background sessions complete + /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: + /// and the default value is YES. + /// + /// NOTE: macOS apps based on AppKit do not support background launch. + bool get sessionSendsLaunchEvents { + return _lib._objc_msgSend_11(_id, _lib._sel_sessionSendsLaunchEvents1); + } + + /// Allows the app to be resumed or launched in the background when tasks in background sessions complete + /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: + /// and the default value is YES. + /// + /// NOTE: macOS apps based on AppKit do not support background launch. + set sessionSendsLaunchEvents(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); + } + + /// The proxy dictionary, as described by + NSDictionary? get connectionProxyDictionary { + final _ret = + _lib._objc_msgSend_89(_id, _lib._sel_connectionProxyDictionary1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// The proxy dictionary, as described by + set connectionProxyDictionary(NSDictionary? value) { + _lib._objc_msgSend_217(_id, _lib._sel_setConnectionProxyDictionary_1, + value?._id ?? ffi.nullptr); + } + + /// The minimum allowable versions of the TLS protocol, from + int get TLSMinimumSupportedProtocol { + return _lib._objc_msgSend_224(_id, _lib._sel_TLSMinimumSupportedProtocol1); + } + + /// The minimum allowable versions of the TLS protocol, from + set TLSMinimumSupportedProtocol(int value) { + _lib._objc_msgSend_225( + _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); + } + + /// The maximum allowable versions of the TLS protocol, from + int get TLSMaximumSupportedProtocol { + return _lib._objc_msgSend_224(_id, _lib._sel_TLSMaximumSupportedProtocol1); + } + + /// The maximum allowable versions of the TLS protocol, from + set TLSMaximumSupportedProtocol(int value) { + _lib._objc_msgSend_225( + _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); + } + + /// The minimum allowable versions of the TLS protocol, from + int get TLSMinimumSupportedProtocolVersion { + return _lib._objc_msgSend_226( + _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); + } + + /// The minimum allowable versions of the TLS protocol, from + set TLSMinimumSupportedProtocolVersion(int value) { + _lib._objc_msgSend_227( + _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); + } + + /// The maximum allowable versions of the TLS protocol, from + int get TLSMaximumSupportedProtocolVersion { + return _lib._objc_msgSend_226( + _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); + } + + /// The maximum allowable versions of the TLS protocol, from + set TLSMaximumSupportedProtocolVersion(int value) { + _lib._objc_msgSend_227( + _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); + } + + /// Allow the use of HTTP pipelining + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + } + + /// Allow the use of HTTP pipelining + set HTTPShouldUsePipelining(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + } + + /// Allow the session to set cookies on requests + bool get HTTPShouldSetCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldSetCookies1); + } + + /// Allow the session to set cookies on requests + set HTTPShouldSetCookies(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setHTTPShouldSetCookies_1, value); + } + + /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. + int get HTTPCookieAcceptPolicy { + return _lib._objc_msgSend_228(_id, _lib._sel_HTTPCookieAcceptPolicy1); + } + + /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. + set HTTPCookieAcceptPolicy(int value) { + _lib._objc_msgSend_229(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); + } + + /// Specifies additional headers which will be set on outgoing requests. + /// Note that these headers are added to the request only if not already present. + NSDictionary? get HTTPAdditionalHeaders { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_HTTPAdditionalHeaders1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Specifies additional headers which will be set on outgoing requests. + /// Note that these headers are added to the request only if not already present. + set HTTPAdditionalHeaders(NSDictionary? value) { + _lib._objc_msgSend_217( + _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); + } + + /// The maximum number of simultanous persistent connections per host + int get HTTPMaximumConnectionsPerHost { + return _lib._objc_msgSend_61(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); + } + + /// The maximum number of simultanous persistent connections per host + set HTTPMaximumConnectionsPerHost(int value) { + _lib._objc_msgSend_230( + _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); + } + + /// The cookie storage object to use, or nil to indicate that no cookies should be handled + NSHTTPCookieStorage? get HTTPCookieStorage { + final _ret = _lib._objc_msgSend_231(_id, _lib._sel_HTTPCookieStorage1); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } + + /// The cookie storage object to use, or nil to indicate that no cookies should be handled + set HTTPCookieStorage(NSHTTPCookieStorage? value) { + _lib._objc_msgSend_260( + _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); + } + + /// The credential storage object, or nil to indicate that no credential storage is to be used + NSURLCredentialStorage? get URLCredentialStorage { + final _ret = _lib._objc_msgSend_261(_id, _lib._sel_URLCredentialStorage1); + return _ret.address == 0 + ? null + : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); + } + + /// The credential storage object, or nil to indicate that no credential storage is to be used + set URLCredentialStorage(NSURLCredentialStorage? value) { + _lib._objc_msgSend_262( + _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); + } + + /// The URL resource cache, or nil to indicate that no caching is to be performed + NSURLCache? get URLCache { + final _ret = _lib._objc_msgSend_263(_id, _lib._sel_URLCache1); + return _ret.address == 0 + ? null + : NSURLCache._(_ret, _lib, retain: true, release: true); + } + + /// The URL resource cache, or nil to indicate that no caching is to be performed + set URLCache(NSURLCache? value) { + _lib._objc_msgSend_264( + _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); + } + + /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open + /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) + bool get shouldUseExtendedBackgroundIdleMode { + return _lib._objc_msgSend_11( + _id, _lib._sel_shouldUseExtendedBackgroundIdleMode1); + } + + /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open + /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) + set shouldUseExtendedBackgroundIdleMode(bool value) { + _lib._objc_msgSend_215( + _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); + } + + /// An optional array of Class objects which subclass NSURLProtocol. + /// The Class will be sent +canInitWithRequest: when determining if + /// an instance of the class can be used for a given URL scheme. + /// You should not use +[NSURLProtocol registerClass:], as that + /// method will register your class with the default session rather + /// than with an instance of NSURLSession. + /// Custom NSURLProtocol subclasses are not available to background + /// sessions. + NSArray? get protocolClasses { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_protocolClasses1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// An optional array of Class objects which subclass NSURLProtocol. + /// The Class will be sent +canInitWithRequest: when determining if + /// an instance of the class can be used for a given URL scheme. + /// You should not use +[NSURLProtocol registerClass:], as that + /// method will register your class with the default session rather + /// than with an instance of NSURLSession. + /// Custom NSURLProtocol subclasses are not available to background + /// sessions. + set protocolClasses(NSArray? value) { + _lib._objc_msgSend_265( + _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); + } + + /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone + int get multipathServiceType { + return _lib._objc_msgSend_266(_id, _lib._sel_multipathServiceType1); + } + + /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone + set multipathServiceType(int value) { + _lib._objc_msgSend_267(_id, _lib._sel_setMultipathServiceType_1, value); + } + + @override + NSURLSessionConfiguration init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionConfiguration new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionConfiguration1, _lib._sel_new1); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionConfiguration backgroundSessionConfiguration_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_223( + _lib._class_NSURLSessionConfiguration1, + _lib._sel_backgroundSessionConfiguration_1, + identifier?._id ?? ffi.nullptr); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionConfiguration alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, release: true); + } +} + +abstract class SSLProtocol { + static const int kSSLProtocolUnknown = 0; + static const int kTLSProtocol1 = 4; + static const int kTLSProtocol11 = 7; + static const int kTLSProtocol12 = 8; + static const int kDTLSProtocol1 = 9; + static const int kTLSProtocol13 = 10; + static const int kDTLSProtocol12 = 11; + static const int kTLSProtocolMaxSupported = 999; + static const int kSSLProtocol2 = 1; + static const int kSSLProtocol3 = 2; + static const int kSSLProtocol3Only = 3; + static const int kTLSProtocol1Only = 5; + static const int kSSLProtocolAll = 6; +} + +abstract class tls_protocol_version_t { + static const int tls_protocol_version_TLSv10 = 769; + static const int tls_protocol_version_TLSv11 = 770; + static const int tls_protocol_version_TLSv12 = 771; + static const int tls_protocol_version_TLSv13 = 772; + static const int tls_protocol_version_DTLSv10 = -257; + static const int tls_protocol_version_DTLSv12 = -259; +} + +abstract class NSHTTPCookieAcceptPolicy { + static const int NSHTTPCookieAcceptPolicyAlways = 0; + static const int NSHTTPCookieAcceptPolicyNever = 1; + static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; +} + +class NSHTTPCookieStorage extends NSObject { + NSHTTPCookieStorage._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + static NSHTTPCookieStorage castFrom(T other) { + return NSHTTPCookieStorage._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. + static NSHTTPCookieStorage castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSHTTPCookieStorage1); + } + + static NSHTTPCookieStorage? getSharedHTTPCookieStorage( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_231( + _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } + + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_232( + _lib._class_NSHTTPCookieStorage1, + _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, + identifier?._id ?? ffi.nullptr); + return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } + + NSArray? get cookies { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_cookies1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + void setCookie_(NSHTTPCookie? cookie) { + return _lib._objc_msgSend_233( + _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); + } + + void deleteCookie_(NSHTTPCookie? cookie) { + return _lib._objc_msgSend_233( + _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); + } + + void removeCookiesSinceDate_(NSDate? date) { + return _lib._objc_msgSend_235( + _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); + } + + NSArray cookiesForURL_(NSURL? URL) { + final _ret = _lib._objc_msgSend_158( + _id, _lib._sel_cookiesForURL_1, URL?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + void setCookies_forURL_mainDocumentURL_( + NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { + return _lib._objc_msgSend_236( + _id, + _lib._sel_setCookies_forURL_mainDocumentURL_1, + cookies?._id ?? ffi.nullptr, + URL?._id ?? ffi.nullptr, + mainDocumentURL?._id ?? ffi.nullptr); + } + + int get cookieAcceptPolicy { + return _lib._objc_msgSend_228(_id, _lib._sel_cookieAcceptPolicy1); + } + + set cookieAcceptPolicy(int value) { + _lib._objc_msgSend_229(_id, _lib._sel_setCookieAcceptPolicy_1, value); + } + + NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { + final _ret = _lib._objc_msgSend_148( + _id, + _lib._sel_sortedCookiesUsingDescriptors_1, + sortOrder?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + void storeCookies_forTask_(NSArray? cookies, NSURLSessionTask? task) { + return _lib._objc_msgSend_258(_id, _lib._sel_storeCookies_forTask_1, + cookies?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); + } + + void getCookiesForTask_completionHandler_( + NSURLSessionTask? task, ObjCBlock9 completionHandler) { + return _lib._objc_msgSend_259( + _id, + _lib._sel_getCookiesForTask_completionHandler_1, + task?._id ?? ffi.nullptr, + completionHandler._impl); + } + + static NSHTTPCookieStorage new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + } + + static NSHTTPCookieStorage alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + } +} + +class NSHTTPCookie extends _ObjCWrapper { + NSHTTPCookie._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. + static NSHTTPCookie castFrom(T other) { + return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. + static NSHTTPCookie castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPCookie._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSHTTPCookie]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); + } +} + +class NSDate extends NSObject { + NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDate] that points to the same underlying object as [other]. + static NSDate castFrom(T other) { + return NSDate._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSDate] that wraps the given raw object pointer. + static NSDate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDate._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); + } + + double get timeIntervalSinceReferenceDate { + return _lib._objc_msgSend_65( + _id, _lib._sel_timeIntervalSinceReferenceDate1); + } + + @override + NSDate init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _lib._objc_msgSend_234( + _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); + return NSDate._(_ret, _lib, retain: false, release: true); + } + + static NSDate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); + return NSDate._(_ret, _lib, retain: false, release: true); + } +} + +/// NSURLSessionTask - a cancelable object that refers to the lifetime +/// of processing a given request. +class NSURLSessionTask extends NSObject { + NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. + static NSURLSessionTask castFrom(T other) { + return NSURLSessionTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. + static NSURLSessionTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionTask._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionTask1); + } + + /// an identifier for this task, assigned by and unique to the owning session + int get taskIdentifier { + return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); + } + + /// may be nil if this is a stream task + NSURLRequest? get originalRequest { + final _ret = _lib._objc_msgSend_237(_id, _lib._sel_originalRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// may differ from originalRequest due to http server redirection + NSURLRequest? get currentRequest { + final _ret = _lib._objc_msgSend_237(_id, _lib._sel_currentRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// may be nil if no response has been received + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_239(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// NSProgress object which represents the task progress. + /// It can be used for task progress tracking. + NSProgress? get progress { + final _ret = _lib._objc_msgSend_240(_id, _lib._sel_progress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); + } + + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + NSDate? get earliestBeginDate { + final _ret = _lib._objc_msgSend_253(_id, _lib._sel_earliestBeginDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + set earliestBeginDate(NSDate? value) { + _lib._objc_msgSend_254( + _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); + } + + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + int get countOfBytesClientExpectsToSend { + return _lib._objc_msgSend_247( + _id, _lib._sel_countOfBytesClientExpectsToSend1); + } + + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + set countOfBytesClientExpectsToSend(int value) { + _lib._objc_msgSend_248( + _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); + } + + int get countOfBytesClientExpectsToReceive { + return _lib._objc_msgSend_247( + _id, _lib._sel_countOfBytesClientExpectsToReceive1); + } + + set countOfBytesClientExpectsToReceive(int value) { + _lib._objc_msgSend_248( + _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); + } + + /// number of body bytes already received + int get countOfBytesReceived { + return _lib._objc_msgSend_247(_id, _lib._sel_countOfBytesReceived1); + } + + /// number of body bytes already sent + int get countOfBytesSent { + return _lib._objc_msgSend_247(_id, _lib._sel_countOfBytesSent1); + } + + /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request + int get countOfBytesExpectedToSend { + return _lib._objc_msgSend_247(_id, _lib._sel_countOfBytesExpectedToSend1); + } + + /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. + int get countOfBytesExpectedToReceive { + return _lib._objc_msgSend_247( + _id, _lib._sel_countOfBytesExpectedToReceive1); + } + + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + NSString? get taskDescription { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_taskDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + set taskDescription(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); + } + + /// -cancel returns immediately, but marks a task as being canceled. + /// The task will signal -URLSession:task:didCompleteWithError: with an + /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some + /// cases, the task may signal other work before it acknowledges the + /// cancelation. -cancel may be sent to a task that has been suspended. + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + /// The current state of the task within the session. + int get state { + return _lib._objc_msgSend_255(_id, _lib._sel_state1); + } + + /// The error, if any, delivered via -URLSession:task:didCompleteWithError: + /// This property will be nil in the event that no error occured. + NSError? get error { + final _ret = _lib._objc_msgSend_256(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } + + /// Suspending a task will prevent the NSURLSession from continuing to + /// load data. There may still be delegate calls made on behalf of + /// this task (for instance, to report data received while suspending) + /// but no further transmissions will be made on behalf of the task + /// until -resume is sent. The timeout timer associated with the task + /// will be disabled while a task is suspended. -suspend and -resume are + /// nestable. + void suspend() { + return _lib._objc_msgSend_1(_id, _lib._sel_suspend1); + } + + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } + + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. + /// + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + double get priority { + return _lib._objc_msgSend_64(_id, _lib._sel_priority1); + } + + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. + /// + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + set priority(double value) { + _lib._objc_msgSend_257(_id, _lib._sel_setPriority_1, value); + } + + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + bool get prefersIncrementalDelivery { + return _lib._objc_msgSend_11(_id, _lib._sel_prefersIncrementalDelivery1); + } + + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + set prefersIncrementalDelivery(bool value) { + _lib._objc_msgSend_215( + _id, _lib._sel_setPrefersIncrementalDelivery_1, value); + } + + @override + NSURLSessionTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionTask new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } +} + +class NSURLResponse extends NSObject { + NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLResponse] that points to the same underlying object as [other]. + static NSURLResponse castFrom(T other) { + return NSURLResponse._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLResponse] that wraps the given raw object pointer. + static NSURLResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLResponse._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); + } + + /// ! + /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: + /// @abstract Initialize an NSURLResponse with the provided values. + /// @param URL the URL + /// @param MIMEType the MIME content type of the response + /// @param length the expected content length of the associated data + /// @param name the name of the text encoding for the associated data, if applicable, else nil + /// @result The initialized NSURLResponse. + /// @discussion This is the designated initializer for NSURLResponse. + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + NSURL? URL, NSString? MIMEType, int length, NSString? name) { + final _ret = _lib._objc_msgSend_238( + _id, + _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, + URL?._id ?? ffi.nullptr, + MIMEType?._id ?? ffi.nullptr, + length, + name?._id ?? ffi.nullptr); + return NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + NSURL? get URL { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the MIME type of the receiver. + /// @discussion The MIME type is based on the information provided + /// from an origin source. However, that value may be changed or + /// corrected by a protocol implementation if it can be determined + /// that the origin server or source reported the information + /// incorrectly or imprecisely. An attempt to guess the MIME type may + /// be made if the origin source did not report any such information. + /// @result The MIME type of the receiver. + NSString? get MIMEType { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_MIMEType1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the expected content length of the receiver. + /// @discussion Some protocol implementations report a content length + /// as part of delivering load metadata, but not all protocols + /// guarantee the amount of data that will be delivered in actuality. + /// Hence, this method returns an expected amount. Clients should use + /// this value as an advisory, and should be prepared to deal with + /// either more or less data. + /// @result The expected content length of the receiver, or -1 if + /// there is no expectation that can be arrived at regarding expected + /// content length. + int get expectedContentLength { + return _lib._objc_msgSend_62(_id, _lib._sel_expectedContentLength1); + } + + /// ! + /// @abstract Returns the name of the text encoding of the receiver. + /// @discussion This name will be the actual string reported by the + /// origin source during the course of performing a protocol-specific + /// URL load. Clients can inspect this string and convert it to an + /// NSStringEncoding or CFStringEncoding using the methods and + /// functions made available in the appropriate framework. + /// @result The name of the text encoding of the receiver, or nil if no + /// text encoding was specified. + NSString? get textEncodingName { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_textEncodingName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns a suggested filename if the resource were saved to disk. + /// @discussion The method first checks if the server has specified a filename using the + /// content disposition header. If no valid filename is specified using that mechanism, + /// this method checks the last path component of the URL. If no valid filename can be + /// obtained using the last path component, this method uses the URL's host as the filename. + /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. + /// In mose cases, this method appends the proper file extension based on the MIME type. + /// This method always returns a valid filename. + /// @result A suggested filename to use if saving the resource to disk. + NSString? get suggestedFilename { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_suggestedFilename1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSURLResponse new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); + } + + static NSURLResponse alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); + } +} + +class NSProgress extends NSObject { + NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSProgress] that points to the same underlying object as [other]. + static NSProgress castFrom(T other) { + return NSProgress._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSProgress] that wraps the given raw object pointer. + static NSProgress castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSProgress._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSProgress]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); + } + + static NSProgress currentProgress(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_240( + _lib._class_NSProgress1, _lib._sel_currentProgress1); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress progressWithTotalUnitCount_( + NativeCupertinoHttp _lib, int unitCount) { + final _ret = _lib._objc_msgSend_241(_lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress discreteProgressWithTotalUnitCount_( + NativeCupertinoHttp _lib, int unitCount) { + final _ret = _lib._objc_msgSend_241(_lib._class_NSProgress1, + _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( + NativeCupertinoHttp _lib, + int unitCount, + NSProgress? parent, + int portionOfParentTotalUnitCount) { + final _ret = _lib._objc_msgSend_242( + _lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, + unitCount, + parent?._id ?? ffi.nullptr, + portionOfParentTotalUnitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSProgress initWithParent_userInfo_( + NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { + final _ret = _lib._objc_msgSend_243( + _id, + _lib._sel_initWithParent_userInfo_1, + parentProgressOrNil?._id ?? ffi.nullptr, + userInfoOrNil?._id ?? ffi.nullptr); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + void becomeCurrentWithPendingUnitCount_(int unitCount) { + return _lib._objc_msgSend_244( + _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + } + + void performAsCurrentWithPendingUnitCount_usingBlock_( + int unitCount, ObjCBlock7 work) { + return _lib._objc_msgSend_245( + _id, + _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, + unitCount, + work._impl); + } + + void resignCurrent() { + return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + } + + void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { + return _lib._objc_msgSend_246( + _id, + _lib._sel_addChild_withPendingUnitCount_1, + child?._id ?? ffi.nullptr, + inUnitCount); + } + + int get totalUnitCount { + return _lib._objc_msgSend_247(_id, _lib._sel_totalUnitCount1); + } + + set totalUnitCount(int value) { + _lib._objc_msgSend_248(_id, _lib._sel_setTotalUnitCount_1, value); + } + + int get completedUnitCount { + return _lib._objc_msgSend_247(_id, _lib._sel_completedUnitCount1); + } + + set completedUnitCount(int value) { + _lib._objc_msgSend_248(_id, _lib._sel_setCompletedUnitCount_1, value); + } + + NSString? get localizedDescription { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_localizedDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set localizedDescription(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); + } + + NSString? get localizedAdditionalDescription { + final _ret = + _lib._objc_msgSend_19(_id, _lib._sel_localizedAdditionalDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set localizedAdditionalDescription(NSString? value) { + _lib._objc_msgSend_216(_id, _lib._sel_setLocalizedAdditionalDescription_1, + value?._id ?? ffi.nullptr); + } + + bool get cancellable { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); + } + + set cancellable(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setCancellable_1, value); + } + + bool get pausable { + return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); + } + + set pausable(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setPausable_1, value); + } + + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + } + + bool get paused { + return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); + } + + ObjCBlock7 get cancellationHandler { + final _ret = _lib._objc_msgSend_249(_id, _lib._sel_cancellationHandler1); + return ObjCBlock7._(_ret, _lib); + } + + set cancellationHandler(ObjCBlock7 value) { + _lib._objc_msgSend_250( + _id, _lib._sel_setCancellationHandler_1, value._impl); + } + + ObjCBlock7 get pausingHandler { + final _ret = _lib._objc_msgSend_249(_id, _lib._sel_pausingHandler1); + return ObjCBlock7._(_ret, _lib); + } + + set pausingHandler(ObjCBlock7 value) { + _lib._objc_msgSend_250(_id, _lib._sel_setPausingHandler_1, value._impl); + } + + ObjCBlock7 get resumingHandler { + final _ret = _lib._objc_msgSend_249(_id, _lib._sel_resumingHandler1); + return ObjCBlock7._(_ret, _lib); + } + + set resumingHandler(ObjCBlock7 value) { + _lib._objc_msgSend_250(_id, _lib._sel_setResumingHandler_1, value._impl); + } + + void setUserInfoObject_forKey_( + NSObject objectOrNil, NSProgressUserInfoKey key) { + return _lib._objc_msgSend_98( + _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); + } + + bool get indeterminate { + return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); + } + + double get fractionCompleted { + return _lib._objc_msgSend_65(_id, _lib._sel_fractionCompleted1); + } + + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + } + + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + void pause() { + return _lib._objc_msgSend_1(_id, _lib._sel_pause1); + } + + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } + + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSProgressKind get kind { + return _lib._objc_msgSend_19(_id, _lib._sel_kind1); + } + + set kind(NSProgressKind value) { + _lib._objc_msgSend_216(_id, _lib._sel_setKind_1, value); + } + + NSNumber? get estimatedTimeRemaining { + final _ret = _lib._objc_msgSend_69(_id, _lib._sel_estimatedTimeRemaining1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set estimatedTimeRemaining(NSNumber? value) { + _lib._objc_msgSend_251( + _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get throughput { + final _ret = _lib._objc_msgSend_69(_id, _lib._sel_throughput1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set throughput(NSNumber? value) { + _lib._objc_msgSend_251( + _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + } + + NSProgressFileOperationKind get fileOperationKind { + return _lib._objc_msgSend_19(_id, _lib._sel_fileOperationKind1); + } + + set fileOperationKind(NSProgressFileOperationKind value) { + _lib._objc_msgSend_216(_id, _lib._sel_setFileOperationKind_1, value); + } + + NSURL? get fileURL { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_fileURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + set fileURL(NSURL? value) { + _lib._objc_msgSend_211( + _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get fileTotalCount { + final _ret = _lib._objc_msgSend_69(_id, _lib._sel_fileTotalCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set fileTotalCount(NSNumber? value) { + _lib._objc_msgSend_251( + _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get fileCompletedCount { + final _ret = _lib._objc_msgSend_69(_id, _lib._sel_fileCompletedCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set fileCompletedCount(NSNumber? value) { + _lib._objc_msgSend_251( + _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); + } + + void publish() { + return _lib._objc_msgSend_1(_id, _lib._sel_publish1); + } + + void unpublish() { + return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + } + + static NSObject addSubscriberForFileURL_withPublishingHandler_( + NativeCupertinoHttp _lib, + NSURL? url, + NSProgressPublishingHandler publishingHandler) { + final _ret = _lib._objc_msgSend_252( + _lib._class_NSProgress1, + _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, + url?._id ?? ffi.nullptr, + publishingHandler); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { + return _lib._objc_msgSend_109( + _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + } + + bool get old { + return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); + } + + static NSProgress new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } + + static NSProgress alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } +} + +void _ObjCBlock7_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block) { + return block.ref.target + .cast>() + .asFunction()(); +} + +final _ObjCBlock7_closureRegistry = {}; +int _ObjCBlock7_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock7_registerClosure(Function fn) { + final id = ++_ObjCBlock7_closureRegistryIndex; + _ObjCBlock7_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock7_closureTrampoline(ffi.Pointer<_ObjCBlock> block) { + return _ObjCBlock7_closureRegistry[block.ref.target.address]!(); +} + +class ObjCBlock7 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock7._(this._impl, this._lib); + ObjCBlock7.fromFunctionPointer( + this._lib, ffi.Pointer> ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( + _ObjCBlock7_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock7.fromFunction(this._lib, void Function() fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( + _ObjCBlock7_closureTrampoline) + .cast(), + _ObjCBlock7_registerClosure(fn)); + void call() { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() + .asFunction block)>()(_impl); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +typedef NSProgressUserInfoKey = ffi.Pointer; +typedef NSProgressKind = ffi.Pointer; +typedef NSProgressFileOperationKind = ffi.Pointer; +typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; +NSProgressUnpublishingHandler _ObjCBlock8_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>()(arg0); +} + +final _ObjCBlock8_closureRegistry = {}; +int _ObjCBlock8_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock8_registerClosure(Function fn) { + final id = ++_ObjCBlock8_closureRegistryIndex; + _ObjCBlock8_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +NSProgressUnpublishingHandler _ObjCBlock8_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock8_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock8 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock8._(this._impl, this._lib); + ObjCBlock8.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock8_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock8.fromFunction(this._lib, + NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock8_closureTrampoline) + .cast(), + _ObjCBlock8_registerClosure(fn)); + NSProgressUnpublishingHandler call(ffi.Pointer arg0) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_impl, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; + +abstract class NSURLSessionTaskState { + /// The task is currently being serviced by the session + static const int NSURLSessionTaskStateRunning = 0; + static const int NSURLSessionTaskStateSuspended = 1; + + /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. + static const int NSURLSessionTaskStateCanceling = 2; + + /// The task has completed and the session will receive no more delegate notifications + static const int NSURLSessionTaskStateCompleted = 3; +} + +void _ObjCBlock9_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} + +final _ObjCBlock9_closureRegistry = {}; +int _ObjCBlock9_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock9_registerClosure(Function fn) { + final id = ++_ObjCBlock9_closureRegistryIndex; + _ObjCBlock9_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock9_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock9_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock9 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock9._(this._impl, this._lib); + ObjCBlock9.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock9_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock9.fromFunction( + this._lib, void Function(ffi.Pointer arg0) fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock9_closureTrampoline) + .cast(), + _ObjCBlock9_registerClosure(fn)); + void call(ffi.Pointer arg0) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_impl, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +class NSURLCredentialStorage extends _ObjCWrapper { + NSURLCredentialStorage._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLCredentialStorage] that points to the same underlying object as [other]. + static NSURLCredentialStorage castFrom(T other) { + return NSURLCredentialStorage._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. + static NSURLCredentialStorage castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLCredentialStorage._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLCredentialStorage1); + } +} + +class NSURLCache extends _ObjCWrapper { + NSURLCache._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLCache] that points to the same underlying object as [other]. + static NSURLCache castFrom(T other) { + return NSURLCache._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLCache] that wraps the given raw object pointer. + static NSURLCache castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLCache._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLCache]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); + } +} + +/// ! +/// @enum NSURLSessionMultipathServiceType +/// +/// @discussion The NSURLSessionMultipathServiceType enum defines constants that +/// can be used to specify the multipath service type to associate an NSURLSession. The +/// multipath service type determines whether multipath TCP should be attempted and the conditions +/// for creating and switching between subflows. Using these service types requires the appropriate entitlement. Any connection attempt will fail if the process does not have the required entitlement. +/// A primary interface is a generally less expensive interface in terms of both cost and power (such as WiFi or ethernet). A secondary interface is more expensive (such as 3G or LTE). +/// +/// @constant NSURLSessionMultipathServiceTypeNone Specifies that multipath tcp should not be used. Connections will use a single flow. +/// This is the default value. No entitlement is required to set this value. +/// +/// @constant NSURLSessionMultipathServiceTypeHandover Specifies that a secondary subflow should only be used +/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entilement. +/// +/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secodary subflow should be used if the +/// primary subflow is not performing adequately (packet loss, high round trip times, bandwidth issues). The secondary +/// subflow will be created more aggressively than with NSURLSessionMultipathServiceTypeHandover. Requires the com.apple.developer.networking.multipath entitlement. +/// +/// @constant NSURLSessionMultipathServiceTypeAggregate Specifies that multiple subflows across multiple interfaces should be +/// used for better bandwidth. This mode is only available for experimentation on devices configured for development use. +/// It can be enabled in the Developer section of the Settings app. +abstract class NSURLSessionMultipathServiceType { + /// None - no multipath (default) + static const int NSURLSessionMultipathServiceTypeNone = 0; + + /// Handover - secondary flows brought up when primary flow is not performing adequately. + static const int NSURLSessionMultipathServiceTypeHandover = 1; + + /// Interactive - secondary flows created more aggressively. + static const int NSURLSessionMultipathServiceTypeInteractive = 2; + + /// Aggregate - multiple subflows used for greater bandwitdh. + static const int NSURLSessionMultipathServiceTypeAggregate = 3; +} + +class NSOperationQueue extends NSObject { + NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. + static NSOperationQueue castFrom(T other) { + return NSOperationQueue._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSOperationQueue] that wraps the given raw object pointer. + static NSOperationQueue castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOperationQueue._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOperationQueue]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOperationQueue1); + } + + /// @property progress + /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue + /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the + /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the + /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super + /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress + /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% + /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 + /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be + /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by + /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving + /// progress scenario. + /// + /// @example + /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; + /// queue.progress.totalUnitCount = 10; + NSProgress? get progress { + final _ret = _lib._objc_msgSend_240(_id, _lib._sel_progress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); + } + + void addOperation_(NSOperation? op) { + return _lib._objc_msgSend_269( + _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); + } + + void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { + return _lib._objc_msgSend_274( + _id, + _lib._sel_addOperations_waitUntilFinished_1, + ops?._id ?? ffi.nullptr, + wait); + } + + void addOperationWithBlock_(ObjCBlock7 block) { + return _lib._objc_msgSend_275( + _id, _lib._sel_addOperationWithBlock_1, block._impl); + } + + /// @method addBarrierBlock: + /// @param barrier A block to execute + /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and + /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the + /// `dispatch_barrier_async` function. + void addBarrierBlock_(ObjCBlock7 barrier) { + return _lib._objc_msgSend_275( + _id, _lib._sel_addBarrierBlock_1, barrier._impl); + } + + int get maxConcurrentOperationCount { + return _lib._objc_msgSend_61(_id, _lib._sel_maxConcurrentOperationCount1); + } + + set maxConcurrentOperationCount(int value) { + _lib._objc_msgSend_230( + _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + } + + bool get suspended { + return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); + } + + set suspended(bool value) { + _lib._objc_msgSend_215(_id, _lib._sel_setSuspended_1, value); + } + + NSString? get name { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set name(NSString? value) { + _lib._objc_msgSend_216(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } + + int get qualityOfService { + return _lib._objc_msgSend_272(_id, _lib._sel_qualityOfService1); + } + + set qualityOfService(int value) { + _lib._objc_msgSend_273(_id, _lib._sel_setQualityOfService_1, value); + } + + /// actually retain + dispatch_queue_t get underlyingQueue { + return _lib._objc_msgSend_276(_id, _lib._sel_underlyingQueue1); + } + + /// actually retain + set underlyingQueue(dispatch_queue_t value) { + _lib._objc_msgSend_277(_id, _lib._sel_setUnderlyingQueue_1, value); + } + + void cancelAllOperations() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + } + + void waitUntilAllOperationsAreFinished() { + return _lib._objc_msgSend_1( + _id, _lib._sel_waitUntilAllOperationsAreFinished1); + } + + static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_278( + _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } + + static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_278( + _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } + + /// These two functions are inherently a race condition and should be avoided if possible + NSArray? get operations { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_operations1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + int get operationCount { + return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); + } + + static NSOperationQueue new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } + + static NSOperationQueue alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } +} + +class NSOperation extends NSObject { + NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOperation] that points to the same underlying object as [other]. + static NSOperation castFrom(T other) { + return NSOperation._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSOperation] that wraps the given raw object pointer. + static NSOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOperation._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); + } + + void start() { + return _lib._objc_msgSend_1(_id, _lib._sel_start1); + } + + void main() { + return _lib._objc_msgSend_1(_id, _lib._sel_main1); + } + + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + } + + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + bool get executing { + return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); + } + + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + } + + /// To be deprecated; use and override 'asynchronous' below + bool get concurrent { + return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); + } + + bool get asynchronous { + return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); + } + + bool get ready { + return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); + } + + void addDependency_(NSOperation? op) { + return _lib._objc_msgSend_269( + _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); + } + + void removeDependency_(NSOperation? op) { + return _lib._objc_msgSend_269( + _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); + } + + NSArray? get dependencies { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_dependencies1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + int get queuePriority { + return _lib._objc_msgSend_270(_id, _lib._sel_queuePriority1); + } + + set queuePriority(int value) { + _lib._objc_msgSend_271(_id, _lib._sel_setQueuePriority_1, value); + } + + ObjCBlock7 get completionBlock { + final _ret = _lib._objc_msgSend_249(_id, _lib._sel_completionBlock1); + return ObjCBlock7._(_ret, _lib); + } + + set completionBlock(ObjCBlock7 value) { + _lib._objc_msgSend_250(_id, _lib._sel_setCompletionBlock_1, value._impl); + } + + void waitUntilFinished() { + return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); + } + + double get threadPriority { + return _lib._objc_msgSend_65(_id, _lib._sel_threadPriority1); + } + + set threadPriority(double value) { + _lib._objc_msgSend_213(_id, _lib._sel_setThreadPriority_1, value); + } + + int get qualityOfService { + return _lib._objc_msgSend_272(_id, _lib._sel_qualityOfService1); + } + + set qualityOfService(int value) { + _lib._objc_msgSend_273(_id, _lib._sel_setQualityOfService_1, value); + } + + NSString? get name { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set name(NSString? value) { + _lib._objc_msgSend_216(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } + + static NSOperation new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); + return NSOperation._(_ret, _lib, retain: false, release: true); + } + + static NSOperation alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); + return NSOperation._(_ret, _lib, retain: false, release: true); + } +} + +abstract class NSOperationQueuePriority { + static const int NSOperationQueuePriorityVeryLow = -8; + static const int NSOperationQueuePriorityLow = -4; + static const int NSOperationQueuePriorityNormal = 0; + static const int NSOperationQueuePriorityHigh = 4; + static const int NSOperationQueuePriorityVeryHigh = 8; +} + +abstract class NSQualityOfService { + static const int NSQualityOfServiceUserInteractive = 33; + static const int NSQualityOfServiceUserInitiated = 25; + static const int NSQualityOfServiceUtility = 17; + static const int NSQualityOfServiceBackground = 9; + static const int NSQualityOfServiceDefault = -1; +} + +typedef dispatch_queue_t = ffi.Pointer; +void _ObjCBlock10_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock10_closureRegistry = {}; +int _ObjCBlock10_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock10_registerClosure(Function fn) { + final id = ++_ObjCBlock10_closureRegistryIndex; + _ObjCBlock10_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock10_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock10_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock10 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock10._(this._impl, this._lib); + ObjCBlock10.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock10_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock10.fromFunction( + this._lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock10_closureTrampoline) + .cast(), + _ObjCBlock10_registerClosure(fn)); + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_impl, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +/// An NSURLSessionDataTask does not provide any additional +/// functionality over an NSURLSessionTask and its presence is merely +/// to provide lexical differentiation from download and upload tasks. +class NSURLSessionDataTask extends NSURLSessionTask { + NSURLSessionDataTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. + static NSURLSessionDataTask castFrom(T other) { + return NSURLSessionDataTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. + static NSURLSessionDataTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionDataTask._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionDataTask1); + } + + @override + NSURLSessionDataTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionDataTask new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionDataTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } +} + +/// An NSURLSessionUploadTask does not currently provide any additional +/// functionality over an NSURLSessionDataTask. All delegate messages +/// that may be sent referencing an NSURLSessionDataTask equally apply +/// to NSURLSessionUploadTasks. +class NSURLSessionUploadTask extends NSURLSessionDataTask { + NSURLSessionUploadTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionUploadTask] that points to the same underlying object as [other]. + static NSURLSessionUploadTask castFrom(T other) { + return NSURLSessionUploadTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. + static NSURLSessionUploadTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionUploadTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionUploadTask1); + } + + @override + NSURLSessionUploadTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionUploadTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionUploadTask1, _lib._sel_new1); + return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionUploadTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionUploadTask1, _lib._sel_alloc1); + return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + } +} + +/// NSURLSessionDownloadTask is a task that represents a download to +/// local storage. +class NSURLSessionDownloadTask extends NSURLSessionTask { + NSURLSessionDownloadTask._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. + static NSURLSessionDownloadTask castFrom(T other) { + return NSURLSessionDownloadTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. + static NSURLSessionDownloadTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionDownloadTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionDownloadTask1); + } + + /// Cancel the download (and calls the superclass -cancel). If + /// conditions will allow for resuming the download in the future, the + /// callback will be called with an opaque data blob, which may be used + /// with -downloadTaskWithResumeData: to attempt to resume the download. + /// If resume data cannot be created, the completion handler will be + /// called with nil resumeData. + void cancelByProducingResumeData_(ObjCBlock11 completionHandler) { + return _lib._objc_msgSend_287( + _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._impl); + } + + @override + NSURLSessionDownloadTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionDownloadTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_new1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionDownloadTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_alloc1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + } +} + +void _ObjCBlock11_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} + +final _ObjCBlock11_closureRegistry = {}; +int _ObjCBlock11_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock11_registerClosure(Function fn) { + final id = ++_ObjCBlock11_closureRegistryIndex; + _ObjCBlock11_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock11_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock11_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock11 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock11._(this._impl, this._lib); + ObjCBlock11.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock11_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock11.fromFunction( + this._lib, void Function(ffi.Pointer arg0) fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock11_closureTrampoline) + .cast(), + _ObjCBlock11_registerClosure(fn)); + void call(ffi.Pointer arg0) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_impl, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +/// An NSURLSessionStreamTask provides an interface to perform reads +/// and writes to a TCP/IP stream created via NSURLSession. This task +/// may be explicitly created from an NSURLSession, or created as a +/// result of the appropriate disposition response to a +/// -URLSession:dataTask:didReceiveResponse: delegate message. +/// +/// NSURLSessionStreamTask can be used to perform asynchronous reads +/// and writes. Reads and writes are enquened and executed serially, +/// with the completion handler being invoked on the sessions delegate +/// queuee. If an error occurs, or the task is canceled, all +/// outstanding read and write calls will have their completion +/// handlers invoked with an appropriate error. +/// +/// It is also possible to create NSInputStream and NSOutputStream +/// instances from an NSURLSessionTask by sending +/// -captureStreams to the task. All outstanding read and writess are +/// completed before the streams are created. Once the streams are +/// delivered to the session delegate, the task is considered complete +/// and will receive no more messsages. These streams are +/// disassociated from the underlying session. +class NSURLSessionStreamTask extends NSURLSessionTask { + NSURLSessionStreamTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionStreamTask] that points to the same underlying object as [other]. + static NSURLSessionStreamTask castFrom(T other) { + return NSURLSessionStreamTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. + static NSURLSessionStreamTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionStreamTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionStreamTask1); + } + + /// Read minBytes, or at most maxBytes bytes and invoke the completion + /// handler on the sessions delegate queue with the data or an error. + /// If an error occurs, any outstanding reads will also fail, and new + /// read requests will error out immediately. + void readDataOfMinLength_maxLength_timeout_completionHandler_(int minBytes, + int maxBytes, double timeout, ObjCBlock12 completionHandler) { + return _lib._objc_msgSend_291( + _id, + _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, + minBytes, + maxBytes, + timeout, + completionHandler._impl); + } + + /// Write the data completely to the underlying socket. If all the + /// bytes have not been written by the timeout, a timeout error will + /// occur. Note that invocation of the completion handler does not + /// guarantee that the remote side has received all the bytes, only + /// that they have been written to the kernel. + void writeData_timeout_completionHandler_( + NSData? data, double timeout, ObjCBlock13 completionHandler) { + return _lib._objc_msgSend_292( + _id, + _lib._sel_writeData_timeout_completionHandler_1, + data?._id ?? ffi.nullptr, + timeout, + completionHandler._impl); + } + + /// -captureStreams completes any already enqueued reads + /// and writes, and then invokes the + /// URLSession:streamTask:didBecomeInputStream:outputStream: delegate + /// message. When that message is received, the task object is + /// considered completed and will not receive any more delegate + /// messages. + void captureStreams() { + return _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); + } + + /// Enqueue a request to close the write end of the underlying socket. + /// All outstanding IO will complete before the write side of the + /// socket is closed. The server, however, may continue to write bytes + /// back to the client, so best practice is to continue reading from + /// the server until you receive EOF. + void closeWrite() { + return _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); + } + + /// Enqueue a request to close the read side of the underlying socket. + /// All outstanding IO will complete before the read side is closed. + /// You may continue writing to the server. + void closeRead() { + return _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); + } + + /// Begin encrypted handshake. The hanshake begins after all pending + /// IO has completed. TLS authentication callbacks are sent to the + /// session's -URLSession:task:didReceiveChallenge:completionHandler: + void startSecureConnection() { + return _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); + } + + /// Cleanly close a secure connection after all pending secure IO has + /// completed. + /// + /// @warning This API is non-functional. + void stopSecureConnection() { + return _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); + } + + @override + NSURLSessionStreamTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionStreamTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionStreamTask1, _lib._sel_new1); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionStreamTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + } +} + +void _ObjCBlock12_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock12_closureRegistry = {}; +int _ObjCBlock12_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock12_registerClosure(Function fn) { + final id = ++_ObjCBlock12_closureRegistryIndex; + _ObjCBlock12_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock12_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _ObjCBlock12_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock12 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock12._(this._impl, this._lib); + ObjCBlock12.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock12_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock12.fromFunction( + this._lib, + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) + fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock12_closureTrampoline) + .cast(), + _ObjCBlock12_registerClosure(fn)); + void call( + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2)>()(_impl, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +void _ObjCBlock13_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} + +final _ObjCBlock13_closureRegistry = {}; +int _ObjCBlock13_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock13_registerClosure(Function fn) { + final id = ++_ObjCBlock13_closureRegistryIndex; + _ObjCBlock13_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock13_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock13_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock13 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock13._(this._impl, this._lib); + ObjCBlock13.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock13_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock13.fromFunction( + this._lib, void Function(ffi.Pointer arg0) fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock13_closureTrampoline) + .cast(), + _ObjCBlock13_registerClosure(fn)); + void call(ffi.Pointer arg0) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_impl, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +class NSNetService extends _ObjCWrapper { + NSNetService._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNetService] that points to the same underlying object as [other]. + static NSNetService castFrom(T other) { + return NSNetService._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSNetService] that wraps the given raw object pointer. + static NSNetService castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNetService._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNetService]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNetService1); + } +} + +/// A WebSocket task can be created with a ws or wss url. A client can also provide +/// a list of protocols it wishes to advertise during the WebSocket handshake phase. +/// Once the handshake is successfully completed the client will be notified through an optional delegate. +/// All reads and writes enqueued before the completion of the handshake will be queued up and +/// executed once the hanshake succeeds. Before the handshake completes, the client can be called to handle +/// redirection or authentication using the same delegates as NSURLSessionTask. WebSocket task will also provide +/// support for cookies and will store cookies to the cookie storage on the session and will attach cookies to +/// outgoing HTTP handshake requests. +class NSURLSessionWebSocketTask extends NSURLSessionTask { + NSURLSessionWebSocketTask._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. + static NSURLSessionWebSocketTask castFrom(T other) { + return NSURLSessionWebSocketTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. + static NSURLSessionWebSocketTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionWebSocketTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionWebSocketTask1); + } + + /// Sends a WebSocket message. If an error occurs, any outstanding work will also fail. + /// Note that invocation of the completion handler does not + /// guarantee that the remote side has received all the bytes, only + /// that they have been written to the kernel. + void sendMessage_completionHandler_( + NSURLSessionWebSocketMessage? message, ObjCBlock13 completionHandler) { + return _lib._objc_msgSend_296( + _id, + _lib._sel_sendMessage_completionHandler_1, + message?._id ?? ffi.nullptr, + completionHandler._impl); + } + + /// Reads a WebSocket message once all the frames of the message are available. + /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out + /// and all outstanding work will also fail resulting in the end of the task. + void receiveMessageWithCompletionHandler_(ObjCBlock14 completionHandler) { + return _lib._objc_msgSend_297( + _id, + _lib._sel_receiveMessageWithCompletionHandler_1, + completionHandler._impl); + } + + /// Sends a ping frame from the client side. The pongReceiveHandler is invoked when the client + /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving + /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. + /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. + void sendPingWithPongReceiveHandler_(ObjCBlock13 pongReceiveHandler) { + return _lib._objc_msgSend_298(_id, + _lib._sel_sendPingWithPongReceiveHandler_1, pongReceiveHandler._impl); + } + + /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. + /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. + void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { + return _lib._objc_msgSend_299(_id, _lib._sel_cancelWithCloseCode_reason_1, + closeCode, reason?._id ?? ffi.nullptr); + } + + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Recieve calls will error out if this value is reached + int get maximumMessageSize { + return _lib._objc_msgSend_61(_id, _lib._sel_maximumMessageSize1); + } + + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Recieve calls will error out if this value is reached + set maximumMessageSize(int value) { + _lib._objc_msgSend_230(_id, _lib._sel_setMaximumMessageSize_1, value); + } + + /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid + int get closeCode { + return _lib._objc_msgSend_300(_id, _lib._sel_closeCode1); + } + + /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running + NSData? get closeReason { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_closeReason1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLSessionWebSocketTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionWebSocketTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketTask1, _lib._sel_new1); + return NSURLSessionWebSocketTask._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionWebSocketTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketTask1, _lib._sel_alloc1); + return NSURLSessionWebSocketTask._(_ret, _lib, + retain: false, release: true); + } +} + +/// The client can create a WebSocket message object that will be passed to the send calls +/// and will be delivered from the receive calls. The message can be initialized with data or string. +/// If initialized with data, the string property will be nil and vice versa. +class NSURLSessionWebSocketMessage extends NSObject { + NSURLSessionWebSocketMessage._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. + static NSURLSessionWebSocketMessage castFrom( + T other) { + return NSURLSessionWebSocketMessage._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. + static NSURLSessionWebSocketMessage castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionWebSocketMessage._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionWebSocketMessage1); + } + + /// Create a message with data type + NSURLSessionWebSocketMessage initWithData_(NSData? data) { + final _ret = _lib._objc_msgSend_126( + _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } + + /// Create a message with string type + NSURLSessionWebSocketMessage initWithString_(NSString? string) { + final _ret = _lib._objc_msgSend_29( + _id, _lib._sel_initWithString_1, string?._id ?? ffi.nullptr); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } + + int get type { + return _lib._objc_msgSend_295(_id, _lib._sel_type1); + } + + NSData? get data { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_data1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSString? get string { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_string1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLSessionWebSocketMessage init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } + + static NSURLSessionWebSocketMessage new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_new1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionWebSocketMessage alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_alloc1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: false, release: true); + } +} + +abstract class NSURLSessionWebSocketMessageType { + static const int NSURLSessionWebSocketMessageTypeData = 0; + static const int NSURLSessionWebSocketMessageTypeString = 1; +} + +void _ObjCBlock14_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock14_closureRegistry = {}; +int _ObjCBlock14_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock14_registerClosure(Function fn) { + final id = ++_ObjCBlock14_closureRegistryIndex; + _ObjCBlock14_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock14_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock14_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock14 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock14._(this._impl, this._lib); + ObjCBlock14.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : _impl = + _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock14_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock14.fromFunction( + this._lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock14_closureTrampoline) + .cast(), + _ObjCBlock14_registerClosure(fn)); + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_impl, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +/// The WebSocket close codes follow the close codes given in the RFC +abstract class NSURLSessionWebSocketCloseCode { + static const int NSURLSessionWebSocketCloseCodeInvalid = 0; + static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; + static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; + static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; + static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; + static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; + static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; + static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; + static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; + static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; + static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = + 1010; + static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; + static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; +} + +void _ObjCBlock15_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock15_closureRegistry = {}; +int _ObjCBlock15_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock15_registerClosure(Function fn) { + final id = ++_ObjCBlock15_closureRegistryIndex; + _ObjCBlock15_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock15_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock15_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock15 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock15._(this._impl, this._lib); + ObjCBlock15.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock15_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock15.fromFunction( + this._lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock15_closureTrampoline) + .cast(), + _ObjCBlock15_registerClosure(fn)); + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_impl, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +void _ObjCBlock16_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock16_closureRegistry = {}; +int _ObjCBlock16_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock16_registerClosure(Function fn) { + final id = ++_ObjCBlock16_closureRegistryIndex; + _ObjCBlock16_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock16_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock16_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock16 { + final ffi.Pointer<_ObjCBlock> _impl; + final NativeCupertinoHttp _lib; + ObjCBlock16._(this._impl, this._lib); + ObjCBlock16.fromFunctionPointer( + this._lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock16_fnPtrTrampoline) + .cast(), + ptr.cast()); + ObjCBlock16.fromFunction( + this._lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : _impl = _lib._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock16_closureTrampoline) + .cast(), + _ObjCBlock16_registerClosure(fn)); + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _impl.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_impl, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _impl; +} + +/// Disposition options for various delegate messages +abstract class NSURLSessionDelayedRequestDisposition { + /// Use the original request provided when the task was created; the request parameter is ignored. + static const int NSURLSessionDelayedRequestContinueLoading = 0; + + /// Use the specified request, which may not be nil. + static const int NSURLSessionDelayedRequestUseNewRequest = 1; + + /// Cancel the task; the request parameter is ignored. + static const int NSURLSessionDelayedRequestCancel = 2; +} + +abstract class NSURLSessionAuthChallengeDisposition { + /// Use the specified credential, which may be nil + static const int NSURLSessionAuthChallengeUseCredential = 0; + + /// Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored. + static const int NSURLSessionAuthChallengePerformDefaultHandling = 1; + + /// The entire request will be canceled; the credential parameter is ignored. + static const int NSURLSessionAuthChallengeCancelAuthenticationChallenge = 2; + + /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. + static const int NSURLSessionAuthChallengeRejectProtectionSpace = 3; +} + +abstract class NSURLSessionResponseDisposition { + /// Cancel the load, this is the same as -[task cancel] + static const int NSURLSessionResponseCancel = 0; + + /// Allow the load to continue + static const int NSURLSessionResponseAllow = 1; + + /// Turn this request into a download + static const int NSURLSessionResponseBecomeDownload = 2; + + /// Turn this task into a stream task + static const int NSURLSessionResponseBecomeStream = 3; +} + +/// The resource fetch type. +abstract class NSURLSessionTaskMetricsResourceFetchType { + static const int NSURLSessionTaskMetricsResourceFetchTypeUnknown = 0; + + /// The resource was loaded over the network. + static const int NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad = 1; + + /// The resource was pushed by the server to the client. + static const int NSURLSessionTaskMetricsResourceFetchTypeServerPush = 2; + + /// The resource was retrieved from the local storage. + static const int NSURLSessionTaskMetricsResourceFetchTypeLocalCache = 3; +} + +/// DNS protocol used for domain resolution. +abstract class NSURLSessionTaskMetricsDomainResolutionProtocol { + static const int NSURLSessionTaskMetricsDomainResolutionProtocolUnknown = 0; + + /// Resolution used DNS over UDP. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolUDP = 1; + + /// Resolution used DNS over TCP. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolTCP = 2; + + /// Resolution used DNS over TLS. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolTLS = 3; + + /// Resolution used DNS over HTTPS. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS = 4; +} + +/// This class defines the performance metrics collected for a request/response transaction during the task execution. +class NSURLSessionTaskTransactionMetrics extends NSObject { + NSURLSessionTaskTransactionMetrics._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionTaskTransactionMetrics] that points to the same underlying object as [other]. + static NSURLSessionTaskTransactionMetrics castFrom( + T other) { + return NSURLSessionTaskTransactionMetrics._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionTaskTransactionMetrics] that wraps the given raw object pointer. + static NSURLSessionTaskTransactionMetrics castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionTaskTransactionMetrics._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionTaskTransactionMetrics]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionTaskTransactionMetrics1); + } + + /// Represents the transaction request. + NSURLRequest? get request { + final _ret = _lib._objc_msgSend_237(_id, _lib._sel_request1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// Represents the transaction response. Can be nil if error occurred and no response was generated. + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_239(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// fetchStartDate returns the time when the user agent started fetching the resource, whether or not the resource was retrieved from the server or local resources. + /// + /// The following metrics will be set to nil, if a persistent connection was used or the resource was retrieved from local resources: + /// + /// domainLookupStartDate + /// domainLookupEndDate + /// connectStartDate + /// connectEndDate + /// secureConnectionStartDate + /// secureConnectionEndDate + NSDate? get fetchStartDate { + final _ret = _lib._objc_msgSend_253(_id, _lib._sel_fetchStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// domainLookupStartDate returns the time immediately before the user agent started the name lookup for the resource. + NSDate? get domainLookupStartDate { + final _ret = _lib._objc_msgSend_253(_id, _lib._sel_domainLookupStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// domainLookupEndDate returns the time after the name lookup was completed. + NSDate? get domainLookupEndDate { + final _ret = _lib._objc_msgSend_253(_id, _lib._sel_domainLookupEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// connectStartDate is the time immediately before the user agent started establishing the connection to the server. + /// + /// For example, this would correspond to the time immediately before the user agent started trying to establish the TCP connection. + NSDate? get connectStartDate { + final _ret = _lib._objc_msgSend_253(_id, _lib._sel_connectStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// If an encrypted connection was used, secureConnectionStartDate is the time immediately before the user agent started the security handshake to secure the current connection. + /// + /// For example, this would correspond to the time immediately before the user agent started the TLS handshake. + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSDate? get secureConnectionStartDate { + final _ret = + _lib._objc_msgSend_253(_id, _lib._sel_secureConnectionStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// If an encrypted connection was used, secureConnectionEndDate is the time immediately after the security handshake completed. + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSDate? get secureConnectionEndDate { + final _ret = + _lib._objc_msgSend_253(_id, _lib._sel_secureConnectionEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// connectEndDate is the time immediately after the user agent finished establishing the connection to the server, including completion of security-related and other handshakes. + NSDate? get connectEndDate { + final _ret = _lib._objc_msgSend_253(_id, _lib._sel_connectEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// requestStartDate is the time immediately before the user agent started requesting the source, regardless of whether the resource was retrieved from the server or local resources. + /// + /// For example, this would correspond to the time immediately before the user agent sent an HTTP GET request. + NSDate? get requestStartDate { + final _ret = _lib._objc_msgSend_253(_id, _lib._sel_requestStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// requestEndDate is the time immediately after the user agent finished requesting the source, regardless of whether the resource was retrieved from the server or local resources. + /// + /// For example, this would correspond to the time immediately after the user agent finished sending the last byte of the request. + NSDate? get requestEndDate { + final _ret = _lib._objc_msgSend_253(_id, _lib._sel_requestEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// responseStartDate is the time immediately after the user agent received the first byte of the response from the server or from local resources. + /// + /// For example, this would correspond to the time immediately after the user agent received the first byte of an HTTP response. + NSDate? get responseStartDate { + final _ret = _lib._objc_msgSend_253(_id, _lib._sel_responseStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// responseEndDate is the time immediately after the user agent received the last byte of the resource. + NSDate? get responseEndDate { + final _ret = _lib._objc_msgSend_253(_id, _lib._sel_responseEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// The network protocol used to fetch the resource, as identified by the ALPN Protocol ID Identification Sequence [RFC7301]. + /// E.g., h2, http/1.1, spdy/3.1. + /// + /// When a proxy is configured AND a tunnel connection is established, then this attribute returns the value for the tunneled protocol. + /// + /// For example: + /// If no proxy were used, and HTTP/2 was negotiated, then h2 would be returned. + /// If HTTP/1.1 were used to the proxy, and the tunneled connection was HTTP/2, then h2 would be returned. + /// If HTTP/1.1 were used to the proxy, and there were no tunnel, then http/1.1 would be returned. + NSString? get networkProtocolName { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_networkProtocolName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// This property is set to YES if a proxy connection was used to fetch the resource. + bool get proxyConnection { + return _lib._objc_msgSend_11(_id, _lib._sel_isProxyConnection1); + } + + /// This property is set to YES if a persistent connection was used to fetch the resource. + bool get reusedConnection { + return _lib._objc_msgSend_11(_id, _lib._sel_isReusedConnection1); + } + + /// Indicates whether the resource was loaded, pushed or retrieved from the local cache. + int get resourceFetchType { + return _lib._objc_msgSend_311(_id, _lib._sel_resourceFetchType1); + } + + /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. + int get countOfRequestHeaderBytesSent { + return _lib._objc_msgSend_247( + _id, _lib._sel_countOfRequestHeaderBytesSent1); + } + + /// countOfRequestBodyBytesSent is the number of bytes transferred for request body. + /// It includes protocol-specific framing, transfer encoding, and content encoding. + int get countOfRequestBodyBytesSent { + return _lib._objc_msgSend_247(_id, _lib._sel_countOfRequestBodyBytesSent1); + } + + /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. + int get countOfRequestBodyBytesBeforeEncoding { + return _lib._objc_msgSend_247( + _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); + } + + /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. + int get countOfResponseHeaderBytesReceived { + return _lib._objc_msgSend_247( + _id, _lib._sel_countOfResponseHeaderBytesReceived1); + } + + /// countOfResponseBodyBytesReceived is the number of bytes transferred for response header. + /// It includes protocol-specific framing, transfer encoding, and content encoding. + int get countOfResponseBodyBytesReceived { + return _lib._objc_msgSend_247( + _id, _lib._sel_countOfResponseBodyBytesReceived1); + } + + /// countOfResponseBodyBytesAfterDecoding is the size of data delivered to your delegate or completion handler. + int get countOfResponseBodyBytesAfterDecoding { + return _lib._objc_msgSend_247( + _id, _lib._sel_countOfResponseBodyBytesAfterDecoding1); + } + + /// localAddress is the IP address string of the local interface for the connection. + /// + /// For multipath protocols, this is the local address of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSString? get localAddress { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_localAddress1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// localPort is the port number of the local interface for the connection. + /// + /// For multipath protocols, this is the local port of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSNumber? get localPort { + final _ret = _lib._objc_msgSend_69(_id, _lib._sel_localPort1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + /// remoteAddress is the IP address string of the remote interface for the connection. + /// + /// For multipath protocols, this is the remote address of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSString? get remoteAddress { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_remoteAddress1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// remotePort is the port number of the remote interface for the connection. + /// + /// For multipath protocols, this is the remote port of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSNumber? get remotePort { + final _ret = _lib._objc_msgSend_69(_id, _lib._sel_remotePort1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + /// negotiatedTLSProtocolVersion is the TLS protocol version negotiated for the connection. + /// It is a 2-byte sequence in host byte order. + /// + /// Please refer to tls_protocol_version_t enum in Security/SecProtocolTypes.h + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSNumber? get negotiatedTLSProtocolVersion { + final _ret = + _lib._objc_msgSend_69(_id, _lib._sel_negotiatedTLSProtocolVersion1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + /// negotiatedTLSCipherSuite is the TLS cipher suite negotiated for the connection. + /// It is a 2-byte sequence in host byte order. + /// + /// Please refer to tls_ciphersuite_t enum in Security/SecProtocolTypes.h + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSNumber? get negotiatedTLSCipherSuite { + final _ret = + _lib._objc_msgSend_69(_id, _lib._sel_negotiatedTLSCipherSuite1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + /// Whether the connection is established over a cellular interface. + bool get cellular { + return _lib._objc_msgSend_11(_id, _lib._sel_isCellular1); + } + + /// Whether the connection is established over an expensive interface. + bool get expensive { + return _lib._objc_msgSend_11(_id, _lib._sel_isExpensive1); + } + + /// Whether the connection is established over a constrained interface. + bool get constrained { + return _lib._objc_msgSend_11(_id, _lib._sel_isConstrained1); + } + + /// Whether a multipath protocol is successfully negotiated for the connection. + bool get multipath { + return _lib._objc_msgSend_11(_id, _lib._sel_isMultipath1); + } + + /// DNS protocol used for domain resolution. + int get domainResolutionProtocol { + return _lib._objc_msgSend_312(_id, _lib._sel_domainResolutionProtocol1); + } + + @override + NSURLSessionTaskTransactionMetrics init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: true, release: true); + } + + static NSURLSessionTaskTransactionMetrics new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_new1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionTaskTransactionMetrics alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_alloc1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: false, release: true); + } +} + +class NSURLSessionTaskMetrics extends NSObject { + NSURLSessionTaskMetrics._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionTaskMetrics] that points to the same underlying object as [other]. + static NSURLSessionTaskMetrics castFrom(T other) { + return NSURLSessionTaskMetrics._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionTaskMetrics] that wraps the given raw object pointer. + static NSURLSessionTaskMetrics castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionTaskMetrics._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionTaskMetrics]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionTaskMetrics1); + } + + /// transactionMetrics array contains the metrics collected for every request/response transaction created during the task execution. + NSArray? get transactionMetrics { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_transactionMetrics1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// Interval from the task creation time to the task completion time. + /// Task creation time is the time when the task was instantiated. + /// Task completion time is the time when the task is about to change its internal state to completed. + NSDateInterval? get taskInterval { + final _ret = _lib._objc_msgSend_313(_id, _lib._sel_taskInterval1); + return _ret.address == 0 + ? null + : NSDateInterval._(_ret, _lib, retain: true, release: true); + } + + /// redirectCount is the number of redirects that were recorded. + int get redirectCount { + return _lib._objc_msgSend_12(_id, _lib._sel_redirectCount1); + } + + @override + NSURLSessionTaskMetrics init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionTaskMetrics new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTaskMetrics1, _lib._sel_new1); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionTaskMetrics alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTaskMetrics1, _lib._sel_alloc1); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); + } +} + +class NSDateInterval extends _ObjCWrapper { + NSDateInterval._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDateInterval] that points to the same underlying object as [other]. + static NSDateInterval castFrom(T other) { + return NSDateInterval._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSDateInterval] that wraps the given raw object pointer. + static NSDateInterval castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDateInterval._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDateInterval]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSDateInterval1); + } +} + +typedef NSURLFileResourceType = ffi.Pointer; +typedef NSURLThumbnailDictionaryItem = ffi.Pointer; +typedef NSURLFileProtectionType = ffi.Pointer; +typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; +typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; +typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; + +/// NSURLQueryItem encapsulates a single query name-value pair. The name and value strings of a query name-value pair are not percent encoded. For use with the NSURLComponents queryItems property. +class NSURLQueryItem extends NSObject { + NSURLQueryItem._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLQueryItem] that points to the same underlying object as [other]. + static NSURLQueryItem castFrom(T other) { + return NSURLQueryItem._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLQueryItem] that wraps the given raw object pointer. + static NSURLQueryItem castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLQueryItem._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLQueryItem]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLQueryItem1); + } + + NSURLQueryItem initWithName_value_(NSString? name, NSString? value) { + final _ret = _lib._objc_msgSend_314(_id, _lib._sel_initWithName_value_1, + name?._id ?? ffi.nullptr, value?._id ?? ffi.nullptr); + return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + } + + static NSURLQueryItem queryItemWithName_value_( + NativeCupertinoHttp _lib, NSString? name, NSString? value) { + final _ret = _lib._objc_msgSend_314( + _lib._class_NSURLQueryItem1, + _lib._sel_queryItemWithName_value_1, + name?._id ?? ffi.nullptr, + value?._id ?? ffi.nullptr); + return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + } + + NSString? get name { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get value { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_value1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSURLQueryItem new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_new1); + return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + } + + static NSURLQueryItem alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_alloc1); + return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + } +} + +class NSURLComponents extends NSObject { + NSURLComponents._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLComponents] that points to the same underlying object as [other]. + static NSURLComponents castFrom(T other) { + return NSURLComponents._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLComponents] that wraps the given raw object pointer. + static NSURLComponents castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLComponents._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLComponents]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLComponents1); + } + + /// Initialize a NSURLComponents with all components undefined. Designated initializer. + @override + NSURLComponents init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initialize a NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. + NSURLComponents initWithURL_resolvingAgainstBaseURL_( + NSURL? url, bool resolve) { + final _ret = _lib._objc_msgSend_115( + _id, + _lib._sel_initWithURL_resolvingAgainstBaseURL_1, + url?._id ?? ffi.nullptr, + resolve); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. + static NSURLComponents componentsWithURL_resolvingAgainstBaseURL_( + NativeCupertinoHttp _lib, NSURL? url, bool resolve) { + final _ret = _lib._objc_msgSend_115( + _lib._class_NSURLComponents1, + _lib._sel_componentsWithURL_resolvingAgainstBaseURL_1, + url?._id ?? ffi.nullptr, + resolve); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initialize a NSURLComponents with a URL string. If the URLString is malformed, nil is returned. + NSURLComponents initWithString_(NSString? URLString) { + final _ret = _lib._objc_msgSend_29( + _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created NSURLComponents with a URL string. If the URLString is malformed, nil is returned. + static NSURLComponents componentsWithString_( + NativeCupertinoHttp _lib, NSString? URLString) { + final _ret = _lib._objc_msgSend_29(_lib._class_NSURLComponents1, + _lib._sel_componentsWithString_1, URLString?._id ?? ffi.nullptr); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Returns a URL created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSURL? get URL { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSURL URLRelativeToURL_(NSURL? baseURL) { + final _ret = _lib._objc_msgSend_315( + _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns a URL string created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSString? get string { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_string1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Attempting to set the scheme with an invalid scheme string will cause an exception. + NSString? get scheme { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_scheme1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Attempting to set the scheme with an invalid scheme string will cause an exception. + set scheme(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); + } + + NSString? get user { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_user1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set user(NSString? value) { + _lib._objc_msgSend_216(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); + } + + NSString? get password { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_password1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set password(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); + } + + NSString? get host { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_host1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set host(NSString? value) { + _lib._objc_msgSend_216(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); + } + + /// Attempting to set a negative port number will cause an exception. + NSNumber? get port { + final _ret = _lib._objc_msgSend_69(_id, _lib._sel_port1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + /// Attempting to set a negative port number will cause an exception. + set port(NSNumber? value) { + _lib._objc_msgSend_251(_id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); + } + + NSString? get path { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_path1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set path(NSString? value) { + _lib._objc_msgSend_216(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); + } + + NSString? get query { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_query1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set query(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); + } + + NSString? get fragment { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_fragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set fragment(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); + } + + /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + NSString? get percentEncodedUser { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_percentEncodedUser1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + set percentEncodedUser(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedPassword { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_percentEncodedPassword1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedPassword(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedHost { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_percentEncodedHost1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedHost(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedPath { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_percentEncodedPath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedPath(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedQuery { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_percentEncodedQuery1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedQuery(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedFragment { + final _ret = _lib._objc_msgSend_19(_id, _lib._sel_percentEncodedFragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedFragment(NSString? value) { + _lib._objc_msgSend_216( + _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); + } + + /// These properties return the character range of a component in the URL string returned by -[NSURLComponents string]. If the component does not exist in the NSURLComponents object, {NSNotFound, 0} is returned. Note: Zero length components are legal. For example, the URL string "scheme://:@/?#" has a zero length user, password, host, query and fragment; the URL strings "scheme:" and "" both have a zero length path. + NSRange get rangeOfScheme { + return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfScheme1); + } + + NSRange get rangeOfUser { + return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfUser1); + } + + NSRange get rangeOfPassword { + return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfPassword1); + } + + NSRange get rangeOfHost { + return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfHost1); + } + + NSRange get rangeOfPort { + return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfPort1); + } + + NSRange get rangeOfPath { + return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfPath1); + } + + NSRange get rangeOfQuery { + return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfQuery1); + } + + NSRange get rangeOfFragment { + return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfFragment1); + } + + /// The query component as an array of NSURLQueryItems for this NSURLComponents. + /// + /// Each NSURLQueryItem represents a single key-value pair, + /// + /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. + /// + /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. + /// + /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. + /// + /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. + NSArray? get queryItems { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_queryItems1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// The query component as an array of NSURLQueryItems for this NSURLComponents. + /// + /// Each NSURLQueryItem represents a single key-value pair, + /// + /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. + /// + /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. + /// + /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. + /// + /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. + set queryItems(NSArray? value) { + _lib._objc_msgSend_265( + _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); + } + + /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. + /// + /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. + NSArray? get percentEncodedQueryItems { + final _ret = + _lib._objc_msgSend_72(_id, _lib._sel_percentEncodedQueryItems1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. + /// + /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. + set percentEncodedQueryItems(NSArray? value) { + _lib._objc_msgSend_265(_id, _lib._sel_setPercentEncodedQueryItems_1, + value?._id ?? ffi.nullptr); + } + + static NSURLComponents new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_new1); + return NSURLComponents._(_ret, _lib, retain: false, release: true); + } + + static NSURLComponents alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_alloc1); + return NSURLComponents._(_ret, _lib, retain: false, release: true); + } +} + +/// NSFileSecurity encapsulates a file system object's security information. NSFileSecurity and CFFileSecurity are toll-free bridged. Use the CFFileSecurity API for access to the low-level file security properties encapsulated by NSFileSecurity. +class NSFileSecurity extends NSObject { + NSFileSecurity._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSFileSecurity] that points to the same underlying object as [other]. + static NSFileSecurity castFrom(T other) { + return NSFileSecurity._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSFileSecurity] that wraps the given raw object pointer. + static NSFileSecurity castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSFileSecurity._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSFileSecurity]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSFileSecurity1); + } + + NSFileSecurity initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSFileSecurity._(_ret, _lib, retain: true, release: true); + } + + static NSFileSecurity new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_new1); + return NSFileSecurity._(_ret, _lib, retain: false, release: true); + } + + static NSFileSecurity alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_alloc1); + return NSFileSecurity._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSProgressUserInfoKey1 = ffi.Pointer; +typedef NSProgressKind1 = ffi.Pointer; +typedef NSProgressFileOperationKind1 = ffi.Pointer; + +/// ! +/// @class NSHTTPURLResponse +/// +/// @abstract An NSHTTPURLResponse object represents a response to an +/// HTTP URL load. It is a specialization of NSURLResponse which +/// provides conveniences for accessing information specific to HTTP +/// protocol responses. +class NSHTTPURLResponse extends NSURLResponse { + NSHTTPURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSHTTPURLResponse] that points to the same underlying object as [other]. + static NSHTTPURLResponse castFrom(T other) { + return NSHTTPURLResponse._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSHTTPURLResponse] that wraps the given raw object pointer. + static NSHTTPURLResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPURLResponse._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSHTTPURLResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSHTTPURLResponse1); + } + + /// ! + /// @method initWithURL:statusCode:HTTPVersion:headerFields: + /// @abstract initializer for NSHTTPURLResponse objects. + /// @param url the URL from which the response was generated. + /// @param statusCode an HTTP status code. + /// @param HTTPVersion The version of the HTTP response as represented by the server. This is typically represented as "HTTP/1.1". + /// @param headerFields A dictionary representing the header keys and values of the server response. + /// @result the instance of the object, or NULL if an error occurred during initialization. + /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. + NSHTTPURLResponse initWithURL_statusCode_HTTPVersion_headerFields_(NSURL? url, + int statusCode, NSString? HTTPVersion, NSDictionary? headerFields) { + final _ret = _lib._objc_msgSend_317( + _id, + _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, + url?._id ?? ffi.nullptr, + statusCode, + HTTPVersion?._id ?? ffi.nullptr, + headerFields?._id ?? ffi.nullptr); + return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the HTTP status code of the receiver. + /// @result The HTTP status code of the receiver. + int get statusCode { + return _lib._objc_msgSend_61(_id, _lib._sel_statusCode1); + } + + /// ! + /// @abstract Returns a dictionary containing all the HTTP header fields + /// of the receiver. + /// @discussion By examining this header dictionary, clients can see + /// the "raw" header information which was reported to the protocol + /// implementation by the HTTP server. This may be of use to + /// sophisticated or special-purpose HTTP clients. + /// @result A dictionary containing all the HTTP header fields of the + /// receiver. + NSDictionary? get allHeaderFields { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_allHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method valueForHTTPHeaderField: + /// @abstract Returns the value which corresponds to the given header + /// field. Note that, in keeping with the HTTP RFC, HTTP header field + /// names are case-insensitive. + /// @param field the header field name to use for the lookup + /// (case-insensitive). + /// @result the value associated with the given header field, or nil if + /// there is no value associated with the given header field. + NSString valueForHTTPHeaderField_(NSString? field) { + final _ret = _lib._objc_msgSend_149( + _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method localizedStringForStatusCode: + /// @abstract Convenience method which returns a localized string + /// corresponding to the status code for this response. + /// @param statusCode the status code to use to produce a localized string. + /// @result A localized string corresponding to the given status code. + static NSString localizedStringForStatusCode_( + NativeCupertinoHttp _lib, int statusCode) { + final _ret = _lib._objc_msgSend_318(_lib._class_NSHTTPURLResponse1, + _lib._sel_localizedStringForStatusCode_1, statusCode); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSHTTPURLResponse new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_new1); + return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + } + + static NSHTTPURLResponse alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_alloc1); + return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSNotificationName = ffi.Pointer; + +class NSBlockOperation extends NSOperation { + NSBlockOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSBlockOperation] that points to the same underlying object as [other]. + static NSBlockOperation castFrom(T other) { + return NSBlockOperation._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSBlockOperation] that wraps the given raw object pointer. + static NSBlockOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSBlockOperation._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSBlockOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSBlockOperation1); + } + + static NSBlockOperation blockOperationWithBlock_( + NativeCupertinoHttp _lib, ObjCBlock7 block) { + final _ret = _lib._objc_msgSend_319(_lib._class_NSBlockOperation1, + _lib._sel_blockOperationWithBlock_1, block._impl); + return NSBlockOperation._(_ret, _lib, retain: true, release: true); + } + + void addExecutionBlock_(ObjCBlock7 block) { + return _lib._objc_msgSend_275( + _id, _lib._sel_addExecutionBlock_1, block._impl); + } + + NSArray? get executionBlocks { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_executionBlocks1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSBlockOperation new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_new1); + return NSBlockOperation._(_ret, _lib, retain: false, release: true); + } + + static NSBlockOperation alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_alloc1); + return NSBlockOperation._(_ret, _lib, retain: false, release: true); + } +} + +class NSInvocationOperation extends NSOperation { + NSInvocationOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSInvocationOperation] that points to the same underlying object as [other]. + static NSInvocationOperation castFrom(T other) { + return NSInvocationOperation._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSInvocationOperation] that wraps the given raw object pointer. + static NSInvocationOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInvocationOperation._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSInvocationOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSInvocationOperation1); + } + + NSInvocationOperation initWithTarget_selector_object_( + NSObject target, ffi.Pointer sel, NSObject arg) { + final _ret = _lib._objc_msgSend_320(_id, + _lib._sel_initWithTarget_selector_object_1, target._id, sel, arg._id); + return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + } + + NSInvocationOperation initWithInvocation_(NSInvocation? inv) { + final _ret = _lib._objc_msgSend_321( + _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); + return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + } + + NSInvocation? get invocation { + final _ret = _lib._objc_msgSend_322(_id, _lib._sel_invocation1); + return _ret.address == 0 + ? null + : NSInvocation._(_ret, _lib, retain: true, release: true); + } + + NSObject get result { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_result1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSInvocationOperation new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInvocationOperation1, _lib._sel_new1); + return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + } + + static NSInvocationOperation alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInvocationOperation1, _lib._sel_alloc1); + return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSExceptionName = ffi.Pointer; + +class _Dart_Isolate extends ffi.Opaque {} + +class _Dart_IsolateGroup extends ffi.Opaque {} + +class _Dart_Handle extends ffi.Opaque {} + +class _Dart_WeakPersistentHandle extends ffi.Opaque {} + +class _Dart_FinalizableHandle extends ffi.Opaque {} + +typedef Dart_WeakPersistentHandle = ffi.Pointer<_Dart_WeakPersistentHandle>; + +/// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the +/// version when changing this struct. +typedef Dart_HandleFinalizer = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +typedef Dart_FinalizableHandle = ffi.Pointer<_Dart_FinalizableHandle>; + +class Dart_IsolateFlags extends ffi.Struct { + @ffi.Int32() + external int version; + + @ffi.Bool() + external bool enable_asserts; + + @ffi.Bool() + external bool use_field_guards; + + @ffi.Bool() + external bool use_osr; + + @ffi.Bool() + external bool obfuscate; + + @ffi.Bool() + external bool load_vmservice_library; + + @ffi.Bool() + external bool copy_parent_code; + + @ffi.Bool() + external bool null_safety; + + @ffi.Bool() + external bool is_system_isolate; +} + +/// Forward declaration +class Dart_CodeObserver extends ffi.Struct { + external ffi.Pointer data; + + external Dart_OnNewCodeCallback on_new_code; +} + +/// Callback provided by the embedder that is used by the VM to notify on code +/// object creation, *before* it is invoked the first time. +/// This is useful for embedders wanting to e.g. keep track of PCs beyond +/// the lifetime of the garbage collected code objects. +/// Note that an address range may be used by more than one code object over the +/// lifecycle of a process. Clients of this function should record timestamps for +/// these compilation events and when collecting PCs to disambiguate reused +/// address ranges. +typedef Dart_OnNewCodeCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + uintptr_t, uintptr_t)>>; +typedef uintptr_t = ffi.UnsignedLong; + +/// Describes how to initialize the VM. Used with Dart_Initialize. +/// +/// \param version Identifies the version of the struct used by the client. +/// should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. +/// \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate +/// or NULL if no snapshot is provided. If provided, the buffer must remain +/// valid until Dart_Cleanup returns. +/// \param instructions_snapshot A buffer containing a snapshot of precompiled +/// instructions, or NULL if no snapshot is provided. If provided, the buffer +/// must remain valid until Dart_Cleanup returns. +/// \param initialize_isolate A function to be called during isolate +/// initialization inside an existing isolate group. +/// See Dart_InitializeIsolateCallback. +/// \param create_group A function to be called during isolate group creation. +/// See Dart_IsolateGroupCreateCallback. +/// \param shutdown A function to be called right before an isolate is shutdown. +/// See Dart_IsolateShutdownCallback. +/// \param cleanup A function to be called after an isolate was shutdown. +/// See Dart_IsolateCleanupCallback. +/// \param cleanup_group A function to be called after an isolate group is shutdown. +/// See Dart_IsolateGroupCleanupCallback. +/// \param get_service_assets A function to be called by the service isolate when +/// it requires the vmservice assets archive. +/// See Dart_GetVMServiceAssetsArchive. +/// \param code_observer An external code observer callback function. +/// The observer can be invoked as early as during the Dart_Initialize() call. +class Dart_InitializeParams extends ffi.Struct { + @ffi.Int32() + external int version; + + external ffi.Pointer vm_snapshot_data; + + external ffi.Pointer vm_snapshot_instructions; + + external Dart_IsolateGroupCreateCallback create_group; + + external Dart_InitializeIsolateCallback initialize_isolate; + + external Dart_IsolateShutdownCallback shutdown_isolate; + + external Dart_IsolateCleanupCallback cleanup_isolate; + + external Dart_IsolateGroupCleanupCallback cleanup_group; + + external Dart_ThreadExitCallback thread_exit; + + external Dart_FileOpenCallback file_open; + + external Dart_FileReadCallback file_read; + + external Dart_FileWriteCallback file_write; + + external Dart_FileCloseCallback file_close; + + external Dart_EntropySource entropy_source; + + external Dart_GetVMServiceAssetsArchive get_service_assets; + + @ffi.Bool() + external bool start_kernel_isolate; + + external ffi.Pointer code_observer; +} + +/// An isolate creation and initialization callback function. +/// +/// This callback, provided by the embedder, is called when the VM +/// needs to create an isolate. The callback should create an isolate +/// by calling Dart_CreateIsolateGroup and load any scripts required for +/// execution. +/// +/// This callback may be called on a different thread than the one +/// running the parent isolate. +/// +/// When the function returns NULL, it is the responsibility of this +/// function to ensure that Dart_ShutdownIsolate has been called if +/// required (for example, if the isolate was created successfully by +/// Dart_CreateIsolateGroup() but the root library fails to load +/// successfully, then the function should call Dart_ShutdownIsolate +/// before returning). +/// +/// When the function returns NULL, the function should set *error to +/// a malloc-allocated buffer containing a useful error message. The +/// caller of this function (the VM) will make sure that the buffer is +/// freed. +/// +/// \param script_uri The uri of the main source file or snapshot to load. +/// Either the URI of the parent isolate set in Dart_CreateIsolateGroup for +/// Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the +/// library tag handler of the parent isolate. +/// The callback is responsible for loading the program by a call to +/// Dart_LoadScriptFromKernel. +/// \param main The name of the main entry point this isolate will +/// eventually run. This is provided for advisory purposes only to +/// improve debugging messages. The main function is not invoked by +/// this function. +/// \param package_root Ignored. +/// \param package_config Uri of the package configuration file (either in format +/// of .packages or .dart_tool/package_config.json) for this isolate +/// to resolve package imports against. If this parameter is not passed the +/// package resolution of the parent isolate should be used. +/// \param flags Default flags for this isolate being spawned. Either inherited +/// from the spawning isolate or passed as parameters when spawning the +/// isolate from Dart code. +/// \param isolate_data The isolate data which was passed to the +/// parent isolate when it was created by calling Dart_CreateIsolateGroup(). +/// \param error A structure into which the embedder can place a +/// C string containing an error message in the case of failures. +/// +/// \return The embedder returns NULL if the creation and +/// initialization was not successful and the isolate if successful. +typedef Dart_IsolateGroupCreateCallback = ffi.Pointer< + ffi.NativeFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>; + +/// An isolate is the unit of concurrency in Dart. Each isolate has +/// its own memory and thread of control. No state is shared between +/// isolates. Instead, isolates communicate by message passing. +/// +/// Each thread keeps track of its current isolate, which is the +/// isolate which is ready to execute on the current thread. The +/// current isolate may be NULL, in which case no isolate is ready to +/// execute. Most of the Dart apis require there to be a current +/// isolate in order to function without error. The current isolate is +/// set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. +typedef Dart_Isolate = ffi.Pointer<_Dart_Isolate>; + +/// An isolate initialization callback function. +/// +/// This callback, provided by the embedder, is called when the VM has created an +/// isolate within an existing isolate group (i.e. from the same source as an +/// existing isolate). +/// +/// The callback should setup native resolvers and might want to set a custom +/// message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as +/// runnable. +/// +/// This callback may be called on a different thread than the one +/// running the parent isolate. +/// +/// When the function returns `false`, it is the responsibility of this +/// function to ensure that `Dart_ShutdownIsolate` has been called. +/// +/// When the function returns `false`, the function should set *error to +/// a malloc-allocated buffer containing a useful error message. The +/// caller of this function (the VM) will make sure that the buffer is +/// freed. +/// +/// \param child_isolate_data The callback data to associate with the new +/// child isolate. +/// \param error A structure into which the embedder can place a +/// C string containing an error message in the case the initialization fails. +/// +/// \return The embedder returns true if the initialization was successful and +/// false otherwise (in which case the VM will terminate the isolate). +typedef Dart_InitializeIsolateCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer>, + ffi.Pointer>)>>; + +/// An isolate shutdown callback function. +/// +/// This callback, provided by the embedder, is called before the vm +/// shuts down an isolate. The isolate being shutdown will be the current +/// isolate. It is safe to run Dart code. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +/// \param isolate_data The same callback data which was passed to the isolate +/// when it was created. +typedef Dart_IsolateShutdownCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + +/// An isolate cleanup callback function. +/// +/// This callback, provided by the embedder, is called after the vm +/// shuts down an isolate. There will be no current isolate and it is *not* +/// safe to run Dart code. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +/// \param isolate_data The same callback data which was passed to the isolate +/// when it was created. +typedef Dart_IsolateCleanupCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + +/// An isolate group cleanup callback function. +/// +/// This callback, provided by the embedder, is called after the vm +/// shuts down an isolate group. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +typedef Dart_IsolateGroupCleanupCallback + = ffi.Pointer)>>; + +/// A thread death callback function. +/// This callback, provided by the embedder, is called before a thread in the +/// vm thread pool exits. +/// This function could be used to dispose of native resources that +/// are associated and attached to the thread, in order to avoid leaks. +typedef Dart_ThreadExitCallback + = ffi.Pointer>; + +/// Callbacks provided by the embedder for file operations. If the +/// embedder does not allow file operations these callbacks can be +/// NULL. +/// +/// Dart_FileOpenCallback - opens a file for reading or writing. +/// \param name The name of the file to open. +/// \param write A boolean variable which indicates if the file is to +/// opened for writing. If there is an existing file it needs to truncated. +/// +/// Dart_FileReadCallback - Read contents of file. +/// \param data Buffer allocated in the callback into which the contents +/// of the file are read into. It is the responsibility of the caller to +/// free this buffer. +/// \param file_length A variable into which the length of the file is returned. +/// In the case of an error this value would be -1. +/// \param stream Handle to the opened file. +/// +/// Dart_FileWriteCallback - Write data into file. +/// \param data Buffer which needs to be written into the file. +/// \param length Length of the buffer. +/// \param stream Handle to the opened file. +/// +/// Dart_FileCloseCallback - Closes the opened file. +/// \param stream Handle to the opened file. +typedef Dart_FileOpenCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Bool)>>; +typedef Dart_FileReadCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>; +typedef Dart_FileWriteCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.IntPtr, ffi.Pointer)>>; +typedef Dart_FileCloseCallback + = ffi.Pointer)>>; +typedef Dart_EntropySource = ffi.Pointer< + ffi.NativeFunction, ffi.IntPtr)>>; + +/// Callback provided by the embedder that is used by the vmservice isolate +/// to request the asset archive. The asset archive must be an uncompressed tar +/// archive that is stored in a Uint8List. +/// +/// If the embedder has no vmservice isolate assets, the callback can be NULL. +/// +/// \return The embedder must return a handle to a Uint8List containing an +/// uncompressed tar archive or null. +typedef Dart_GetVMServiceAssetsArchive + = ffi.Pointer>; +typedef Dart_IsolateGroup = ffi.Pointer<_Dart_IsolateGroup>; + +/// A message notification callback. +/// +/// This callback allows the embedder to provide an alternate wakeup +/// mechanism for the delivery of inter-isolate messages. It is the +/// responsibility of the embedder to call Dart_HandleMessage to +/// process the message. +typedef Dart_MessageNotifyCallback + = ffi.Pointer>; + +/// A port is used to send or receive inter-isolate messages +typedef Dart_Port = ffi.Int64; + +abstract class Dart_CoreType_Id { + static const int Dart_CoreType_Dynamic = 0; + static const int Dart_CoreType_Int = 1; + static const int Dart_CoreType_String = 2; +} + +/// ========== +/// Typed Data +/// ========== +abstract class Dart_TypedData_Type { + static const int Dart_TypedData_kByteData = 0; + static const int Dart_TypedData_kInt8 = 1; + static const int Dart_TypedData_kUint8 = 2; + static const int Dart_TypedData_kUint8Clamped = 3; + static const int Dart_TypedData_kInt16 = 4; + static const int Dart_TypedData_kUint16 = 5; + static const int Dart_TypedData_kInt32 = 6; + static const int Dart_TypedData_kUint32 = 7; + static const int Dart_TypedData_kInt64 = 8; + static const int Dart_TypedData_kUint64 = 9; + static const int Dart_TypedData_kFloat32 = 10; + static const int Dart_TypedData_kFloat64 = 11; + static const int Dart_TypedData_kInt32x4 = 12; + static const int Dart_TypedData_kFloat32x4 = 13; + static const int Dart_TypedData_kFloat64x2 = 14; + static const int Dart_TypedData_kInvalid = 15; +} + +class _Dart_NativeArguments extends ffi.Opaque {} + +/// The arguments to a native function. +/// +/// This object is passed to a native function to represent its +/// arguments and return value. It allows access to the arguments to a +/// native function by index. It also allows the return value of a +/// native function to be set. +typedef Dart_NativeArguments = ffi.Pointer<_Dart_NativeArguments>; + +abstract class Dart_NativeArgument_Type { + static const int Dart_NativeArgument_kBool = 0; + static const int Dart_NativeArgument_kInt32 = 1; + static const int Dart_NativeArgument_kUint32 = 2; + static const int Dart_NativeArgument_kInt64 = 3; + static const int Dart_NativeArgument_kUint64 = 4; + static const int Dart_NativeArgument_kDouble = 5; + static const int Dart_NativeArgument_kString = 6; + static const int Dart_NativeArgument_kInstance = 7; + static const int Dart_NativeArgument_kNativeFields = 8; +} + +class _Dart_NativeArgument_Descriptor extends ffi.Struct { + @ffi.Uint8() + external int type; + + @ffi.Uint8() + external int index; +} + +class _Dart_NativeArgument_Value extends ffi.Opaque {} + +typedef Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor; +typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; + +/// An environment lookup callback function. +/// +/// \param name The name of the value to lookup in the environment. +/// +/// \return A valid handle to a string if the name exists in the +/// current environment or Dart_Null() if not. +typedef Dart_EnvironmentCallback + = ffi.Pointer>; + +/// Native entry resolution callback. +/// +/// For libraries and scripts which have native functions, the embedder +/// can provide a native entry resolver. This callback is used to map a +/// name/arity to a Dart_NativeFunction. If no function is found, the +/// callback should return NULL. +/// +/// The parameters to the native resolver function are: +/// \param name a Dart string which is the name of the native function. +/// \param num_of_arguments is the number of arguments expected by the +/// native function. +/// \param auto_setup_scope is a boolean flag that can be set by the resolver +/// to indicate if this function needs a Dart API scope (see Dart_EnterScope/ +/// Dart_ExitScope) to be setup automatically by the VM before calling into +/// the native function. By default most native functions would require this +/// to be true but some light weight native functions which do not call back +/// into the VM through the Dart API may not require a Dart scope to be +/// setup automatically. +/// +/// \return A valid Dart_NativeFunction which resolves to a native entry point +/// for the native function. +/// +/// See Dart_SetNativeResolver. +typedef Dart_NativeEntryResolver = ffi.Pointer< + ffi.NativeFunction< + Dart_NativeFunction Function( + ffi.Handle, ffi.Int, ffi.Pointer)>>; + +/// A native function. +typedef Dart_NativeFunction + = ffi.Pointer>; + +/// Native entry symbol lookup callback. +/// +/// For libraries and scripts which have native functions, the embedder +/// can provide a callback for mapping a native entry to a symbol. This callback +/// maps a native function entry PC to the native function name. If no native +/// entry symbol can be found, the callback should return NULL. +/// +/// The parameters to the native reverse resolver function are: +/// \param nf A Dart_NativeFunction. +/// +/// \return A const UTF-8 string containing the symbol name or NULL. +/// +/// See Dart_SetNativeResolver. +typedef Dart_NativeEntrySymbol = ffi.Pointer< + ffi.NativeFunction Function(Dart_NativeFunction)>>; + +/// FFI Native C function pointer resolver callback. +/// +/// See Dart_SetFfiNativeResolver. +typedef Dart_FfiNativeResolver = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, uintptr_t)>>; + +/// ===================== +/// Scripts and Libraries +/// ===================== +abstract class Dart_LibraryTag { + static const int Dart_kCanonicalizeUrl = 0; + static const int Dart_kImportTag = 1; + static const int Dart_kKernelTag = 2; +} + +/// The library tag handler is a multi-purpose callback provided by the +/// embedder to the Dart VM. The embedder implements the tag handler to +/// provide the ability to load Dart scripts and imports. +/// +/// -- TAGS -- +/// +/// Dart_kCanonicalizeUrl +/// +/// This tag indicates that the embedder should canonicalize 'url' with +/// respect to 'library'. For most embedders, the +/// Dart_DefaultCanonicalizeUrl function is a sufficient implementation +/// of this tag. The return value should be a string holding the +/// canonicalized url. +/// +/// Dart_kImportTag +/// +/// This tag is used to load a library from IsolateMirror.loadUri. The embedder +/// should call Dart_LoadLibraryFromKernel to provide the library to the VM. The +/// return value should be an error or library (the result from +/// Dart_LoadLibraryFromKernel). +/// +/// Dart_kKernelTag +/// +/// This tag is used to load the intermediate file (kernel) generated by +/// the Dart front end. This tag is typically used when a 'hot-reload' +/// of an application is needed and the VM is 'use dart front end' mode. +/// The dart front end typically compiles all the scripts, imports and part +/// files into one intermediate file hence we don't use the source/import or +/// script tags. The return value should be an error or a TypedData containing +/// the kernel bytes. +typedef Dart_LibraryTagHandler = ffi.Pointer< + ffi.NativeFunction>; + +/// Handles deferred loading requests. When this handler is invoked, it should +/// eventually load the deferred loading unit with the given id and call +/// Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is +/// recommended that the loading occur asynchronously, but it is permitted to +/// call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the +/// handler returns. +/// +/// If an error is returned, it will be propogated through +/// `prefix.loadLibrary()`. This is useful for synchronous +/// implementations, which must propogate any unwind errors from +/// Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler +/// should return a non-error such as `Dart_Null()`. +typedef Dart_DeferredLoadHandler + = ffi.Pointer>; + +/// TODO(33433): Remove kernel service from the embedding API. +abstract class Dart_KernelCompilationStatus { + static const int Dart_KernelCompilationStatus_Unknown = -1; + static const int Dart_KernelCompilationStatus_Ok = 0; + static const int Dart_KernelCompilationStatus_Error = 1; + static const int Dart_KernelCompilationStatus_Crash = 2; + static const int Dart_KernelCompilationStatus_MsgFailed = 3; +} + +class Dart_KernelCompilationResult extends ffi.Struct { + @ffi.Int32() + external int status; + + @ffi.Bool() + external bool null_safety; + + external ffi.Pointer error; + + external ffi.Pointer kernel; + + @ffi.IntPtr() + external int kernel_size; +} + +abstract class Dart_KernelCompilationVerbosityLevel { + static const int Dart_KernelCompilationVerbosityLevel_Error = 0; + static const int Dart_KernelCompilationVerbosityLevel_Warning = 1; + static const int Dart_KernelCompilationVerbosityLevel_Info = 2; + static const int Dart_KernelCompilationVerbosityLevel_All = 3; +} + +class Dart_SourceFile extends ffi.Struct { + external ffi.Pointer uri; + + external ffi.Pointer source; +} + +typedef Dart_StreamingWriteCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.IntPtr)>>; +typedef Dart_CreateLoadingUnitCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer>, + ffi.Pointer>)>>; +typedef Dart_StreamingCloseCallback + = ffi.Pointer)>>; + +/// A Dart_CObject is used for representing Dart objects as native C +/// data outside the Dart heap. These objects are totally detached from +/// the Dart heap. Only a subset of the Dart objects have a +/// representation as a Dart_CObject. +/// +/// The string encoding in the 'value.as_string' is UTF-8. +/// +/// All the different types from dart:typed_data are exposed as type +/// kTypedData. The specific type from dart:typed_data is in the type +/// field of the as_typed_data structure. The length in the +/// as_typed_data structure is always in bytes. +/// +/// The data for kTypedData is copied on message send and ownership remains with +/// the caller. The ownership of data for kExternalTyped is passed to the VM on +/// message send and returned when the VM invokes the +/// Dart_HandleFinalizer callback; a non-NULL callback must be provided. +abstract class Dart_CObject_Type { + static const int Dart_CObject_kNull = 0; + static const int Dart_CObject_kBool = 1; + static const int Dart_CObject_kInt32 = 2; + static const int Dart_CObject_kInt64 = 3; + static const int Dart_CObject_kDouble = 4; + static const int Dart_CObject_kString = 5; + static const int Dart_CObject_kArray = 6; + static const int Dart_CObject_kTypedData = 7; + static const int Dart_CObject_kExternalTypedData = 8; + static const int Dart_CObject_kSendPort = 9; + static const int Dart_CObject_kCapability = 10; + static const int Dart_CObject_kNativePointer = 11; + static const int Dart_CObject_kUnsupported = 12; + static const int Dart_CObject_kNumberOfTypes = 13; +} + +class _Dart_CObject extends ffi.Struct { + @ffi.Int32() + external int type; + + external UnnamedUnion1 value; +} + +class UnnamedUnion1 extends ffi.Union { + @ffi.Bool() + external bool as_bool; + + @ffi.Int32() + external int as_int32; + + @ffi.Int64() + external int as_int64; + + @ffi.Double() + external double as_double; + + external ffi.Pointer as_string; + + external UnnamedStruct3 as_send_port; + + external UnnamedStruct4 as_capability; + + external UnnamedStruct5 as_array; + + external UnnamedStruct6 as_typed_data; + + external UnnamedStruct7 as_external_typed_data; + + external UnnamedStruct8 as_native_pointer; +} + +class UnnamedStruct3 extends ffi.Struct { + @Dart_Port() + external int id; + + @Dart_Port() + external int origin_id; +} + +class UnnamedStruct4 extends ffi.Struct { + @ffi.Int64() + external int id; +} + +class UnnamedStruct5 extends ffi.Struct { + @ffi.IntPtr() + external int length; + + external ffi.Pointer> values; +} + +class UnnamedStruct6 extends ffi.Struct { + @ffi.Int32() + external int type; + + /// in elements, not bytes + @ffi.IntPtr() + external int length; + + external ffi.Pointer values; +} + +class UnnamedStruct7 extends ffi.Struct { + @ffi.Int32() + external int type; + + /// in elements, not bytes + @ffi.IntPtr() + external int length; + + external ffi.Pointer data; + + external ffi.Pointer peer; + + external Dart_HandleFinalizer callback; +} + +class UnnamedStruct8 extends ffi.Struct { + @ffi.IntPtr() + external int ptr; + + @ffi.IntPtr() + external int size; + + external Dart_HandleFinalizer callback; +} + +typedef Dart_CObject = _Dart_CObject; + +/// A native message handler. +/// +/// This handler is associated with a native port by calling +/// Dart_NewNativePort. +/// +/// The message received is decoded into the message structure. The +/// lifetime of the message data is controlled by the caller. All the +/// data references from the message are allocated by the caller and +/// will be reclaimed when returning to it. +typedef Dart_NativeMessageHandler = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_Port, ffi.Pointer)>>; +typedef Dart_PostCObject_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(Dart_Port_DL, ffi.Pointer)>>; + +/// ============================================================================ +/// IMPORTANT! Never update these signatures without properly updating +/// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. +/// +/// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types +/// to trigger compile-time errors if the sybols in those files are updated +/// without updating these. +/// +/// Function return and argument types, and typedefs are carbon copied. Structs +/// are typechecked nominally in C/C++, so they are not copied, instead a +/// comment is added to their definition. +typedef Dart_Port_DL = ffi.Int64; +typedef Dart_PostInteger_Type = ffi + .Pointer>; +typedef Dart_NewNativePort_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_Port_DL Function( + ffi.Pointer, Dart_NativeMessageHandler_DL, ffi.Bool)>>; +typedef Dart_NativeMessageHandler_DL = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_Port_DL, ffi.Pointer)>>; +typedef Dart_CloseNativePort_Type + = ffi.Pointer>; +typedef Dart_IsError_Type + = ffi.Pointer>; +typedef Dart_IsApiError_Type + = ffi.Pointer>; +typedef Dart_IsUnhandledExceptionError_Type + = ffi.Pointer>; +typedef Dart_IsCompilationError_Type + = ffi.Pointer>; +typedef Dart_IsFatalError_Type + = ffi.Pointer>; +typedef Dart_GetError_Type = ffi + .Pointer Function(ffi.Handle)>>; +typedef Dart_ErrorHasException_Type + = ffi.Pointer>; +typedef Dart_ErrorGetException_Type + = ffi.Pointer>; +typedef Dart_ErrorGetStackTrace_Type + = ffi.Pointer>; +typedef Dart_NewApiError_Type = ffi + .Pointer)>>; +typedef Dart_NewCompilationError_Type = ffi + .Pointer)>>; +typedef Dart_NewUnhandledExceptionError_Type + = ffi.Pointer>; +typedef Dart_PropagateError_Type + = ffi.Pointer>; +typedef Dart_HandleFromPersistent_Type + = ffi.Pointer>; +typedef Dart_HandleFromWeakPersistent_Type = ffi.Pointer< + ffi.NativeFunction>; +typedef Dart_NewPersistentHandle_Type + = ffi.Pointer>; +typedef Dart_SetPersistentHandle_Type = ffi + .Pointer>; +typedef Dart_DeletePersistentHandle_Type + = ffi.Pointer>; +typedef Dart_NewWeakPersistentHandle_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_WeakPersistentHandle Function(ffi.Handle, ffi.Pointer, + ffi.IntPtr, Dart_HandleFinalizer)>>; +typedef Dart_DeleteWeakPersistentHandle_Type = ffi + .Pointer>; +typedef Dart_UpdateExternalSize_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_WeakPersistentHandle, ffi.IntPtr)>>; +typedef Dart_NewFinalizableHandle_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, + ffi.IntPtr, Dart_HandleFinalizer)>>; +typedef Dart_DeleteFinalizableHandle_Type = ffi.Pointer< + ffi.NativeFunction>; +typedef Dart_UpdateFinalizableExternalSize_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, ffi.IntPtr)>>; +typedef Dart_Post_Type = ffi + .Pointer>; +typedef Dart_NewSendPort_Type + = ffi.Pointer>; +typedef Dart_SendPortGetId_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer)>>; +typedef Dart_EnterScope_Type + = ffi.Pointer>; +typedef Dart_ExitScope_Type + = ffi.Pointer>; + +/// The type of message being sent to a Dart port. See CUPHTTPClientDelegate. +abstract class MessageType { + static const int ResponseMessage = 0; + static const int DataMessage = 1; + static const int CompletedMessage = 2; + static const int RedirectMessage = 3; + static const int FinishedDownloading = 4; +} + +/// The configuration associated with a NSURLSessionTask. +/// See CUPHTTPClientDelegate. +class CUPHTTPTaskConfiguration extends NSObject { + CUPHTTPTaskConfiguration._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPTaskConfiguration] that points to the same underlying object as [other]. + static CUPHTTPTaskConfiguration castFrom(T other) { + return CUPHTTPTaskConfiguration._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPTaskConfiguration] that wraps the given raw object pointer. + static CUPHTTPTaskConfiguration castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPTaskConfiguration._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPTaskConfiguration]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPTaskConfiguration1); + } + + NSObject initWithPort_(int sendPort) { + final _ret = + _lib._objc_msgSend_323(_id, _lib._sel_initWithPort_1, sendPort); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + int get sendPort { + return _lib._objc_msgSend_247(_id, _lib._sel_sendPort1); + } + + static CUPHTTPTaskConfiguration new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_new1); + return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPTaskConfiguration alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_alloc1); + return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + } +} + +/// A delegate for NSURLSession that forwards events for registered +/// NSURLSessionTasks and forwards them to a port for consumption in Dart. +/// +/// The messages sent to the port are contained in a List with one of 3 +/// possible formats: +/// +/// 1. When the delegate receives a HTTP redirect response: +/// [MessageType::RedirectMessage, ] +/// +/// 2. When the delegate receives a HTTP response: +/// [MessageType::ResponseMessage, ] +/// +/// 3. When the delegate receives some HTTP data: +/// [MessageType::DataMessage, ] +/// +/// 4. When the delegate is informed that the response is complete: +/// [MessageType::CompletedMessage, ] +class CUPHTTPClientDelegate extends NSObject { + CUPHTTPClientDelegate._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPClientDelegate] that points to the same underlying object as [other]. + static CUPHTTPClientDelegate castFrom(T other) { + return CUPHTTPClientDelegate._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPClientDelegate] that wraps the given raw object pointer. + static CUPHTTPClientDelegate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPClientDelegate._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPClientDelegate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPClientDelegate1); + } + + /// Instruct the delegate to forward events for the given task to the port + /// specified in the configuration. + void registerTask_withConfiguration_( + NSURLSessionTask? task, CUPHTTPTaskConfiguration? config) { + return _lib._objc_msgSend_324( + _id, + _lib._sel_registerTask_withConfiguration_1, + task?._id ?? ffi.nullptr, + config?._id ?? ffi.nullptr); + } + + static CUPHTTPClientDelegate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPClientDelegate1, _lib._sel_new1); + return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPClientDelegate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPClientDelegate1, _lib._sel_alloc1); + return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + } +} + +/// An object used to communicate redirect information to Dart code. +/// +/// The flow is: +/// 1. CUPHTTPClientDelegate receives a message from the URL Loading System. +/// 2. CUPHTTPClientDelegate creates a new CUPHTTPForwardedDelegate subclass. +/// 3. CUPHTTPClientDelegate sends the CUPHTTPForwardedDelegate to the +/// configured Dart_Port. +/// 4. CUPHTTPClientDelegate waits on CUPHTTPForwardedDelegate.lock +/// 5. When the Dart code is done process the message received on the port, +/// it calls [CUPHTTPForwardedDelegate finish*], which releases the lock. +/// 6. CUPHTTPClientDelegate continues running. +class CUPHTTPForwardedDelegate extends NSObject { + CUPHTTPForwardedDelegate._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedDelegate] that points to the same underlying object as [other]. + static CUPHTTPForwardedDelegate castFrom(T other) { + return CUPHTTPForwardedDelegate._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedDelegate] that wraps the given raw object pointer. + static CUPHTTPForwardedDelegate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedDelegate._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedDelegate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedDelegate1); + } + + NSObject initWithSession_task_( + NSURLSession? session, NSURLSessionTask? task) { + final _ret = _lib._objc_msgSend_325(_id, _lib._sel_initWithSession_task_1, + session?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// Indicates that the task should continue executing using the given request. + void finish() { + return _lib._objc_msgSend_1(_id, _lib._sel_finish1); + } + + NSURLSession? get session { + final _ret = _lib._objc_msgSend_221(_id, _lib._sel_session1); + return _ret.address == 0 + ? null + : NSURLSession._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionTask? get task { + final _ret = _lib._objc_msgSend_326(_id, _lib._sel_task1); + return _ret.address == 0 + ? null + : NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } + + /// This property is meant to be used only by CUPHTTPClientDelegate. + NSLock? get lock { + final _ret = _lib._objc_msgSend_327(_id, _lib._sel_lock1); + return _ret.address == 0 + ? null + : NSLock._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedDelegate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_new1); + return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedDelegate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_alloc1); + return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + } +} + +class NSLock extends _ObjCWrapper { + NSLock._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSLock] that points to the same underlying object as [other]. + static NSLock castFrom(T other) { + return NSLock._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSLock] that wraps the given raw object pointer. + static NSLock castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSLock._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSLock]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLock1); + } +} + +class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedRedirect._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedRedirect] that points to the same underlying object as [other]. + static CUPHTTPForwardedRedirect castFrom(T other) { + return CUPHTTPForwardedRedirect._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedRedirect] that wraps the given raw object pointer. + static CUPHTTPForwardedRedirect castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedRedirect._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedRedirect]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedRedirect1); + } + + NSObject initWithSession_task_response_request_( + NSURLSession? session, + NSURLSessionTask? task, + NSHTTPURLResponse? response, + NSURLRequest? request) { + final _ret = _lib._objc_msgSend_328( + _id, + _lib._sel_initWithSession_task_response_request_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + response?._id ?? ffi.nullptr, + request?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// Indicates that the task should continue executing using the given request. + /// If the request is NIL then the redirect is not followed and the task is + /// complete. + void finishWithRequest_(NSURLRequest? request) { + return _lib._objc_msgSend_329( + _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); + } + + NSHTTPURLResponse? get response { + final _ret = _lib._objc_msgSend_330(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + } + + NSURLRequest? get request { + final _ret = _lib._objc_msgSend_237(_id, _lib._sel_request1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// This property is meant to be used only by CUPHTTPClientDelegate. + NSURLRequest? get redirectRequest { + final _ret = _lib._objc_msgSend_237(_id, _lib._sel_redirectRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedRedirect new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_new1); + return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedRedirect alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_alloc1); + return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + } +} + +class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedResponse._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedResponse] that points to the same underlying object as [other]. + static CUPHTTPForwardedResponse castFrom(T other) { + return CUPHTTPForwardedResponse._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedResponse] that wraps the given raw object pointer. + static CUPHTTPForwardedResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedResponse._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedResponse1); + } + + NSObject initWithSession_task_response_( + NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { + final _ret = _lib._objc_msgSend_331( + _id, + _lib._sel_initWithSession_task_response_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + response?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void finishWithDisposition_(int disposition) { + return _lib._objc_msgSend_332( + _id, _lib._sel_finishWithDisposition_1, disposition); + } + + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_239(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// This property is meant to be used only by CUPHTTPClientDelegate. + int get disposition { + return _lib._objc_msgSend_333(_id, _lib._sel_disposition1); + } + + static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedResponse1, _lib._sel_new1); + return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedResponse alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedResponse1, _lib._sel_alloc1); + return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + } +} + +class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedData] that points to the same underlying object as [other]. + static CUPHTTPForwardedData castFrom(T other) { + return CUPHTTPForwardedData._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedData] that wraps the given raw object pointer. + static CUPHTTPForwardedData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedData._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedData1); + } + + NSObject initWithSession_task_data_( + NSURLSession? session, NSURLSessionTask? task, NSData? data) { + final _ret = _lib._objc_msgSend_334( + _id, + _lib._sel_initWithSession_task_data_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + data?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSData? get data { + final _ret = _lib._objc_msgSend_38(_id, _lib._sel_data1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_CUPHTTPForwardedData1, _lib._sel_new1); + return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedData alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedData1, _lib._sel_alloc1); + return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + } +} + +class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedComplete._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedComplete] that points to the same underlying object as [other]. + static CUPHTTPForwardedComplete castFrom(T other) { + return CUPHTTPForwardedComplete._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedComplete] that wraps the given raw object pointer. + static CUPHTTPForwardedComplete castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedComplete._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedComplete]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedComplete1); + } + + NSObject initWithSession_task_error_( + NSURLSession? session, NSURLSessionTask? task, NSError? error) { + final _ret = _lib._objc_msgSend_335( + _id, + _lib._sel_initWithSession_task_error_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + error?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSError? get error { + final _ret = _lib._objc_msgSend_256(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedComplete new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedComplete1, _lib._sel_new1); + return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedComplete alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedComplete1, _lib._sel_alloc1); + return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + } +} + +class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedFinishedDownloading._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedFinishedDownloading] that points to the same underlying object as [other]. + static CUPHTTPForwardedFinishedDownloading castFrom( + T other) { + return CUPHTTPForwardedFinishedDownloading._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedFinishedDownloading] that wraps the given raw object pointer. + static CUPHTTPForwardedFinishedDownloading castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedFinishedDownloading._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedFinishedDownloading]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedFinishedDownloading1); + } + + NSObject initWithSession_downloadTask_url_(NSURLSession? session, + NSURLSessionDownloadTask? downloadTask, NSURL? location) { + final _ret = _lib._objc_msgSend_336( + _id, + _lib._sel_initWithSession_downloadTask_url_1, + session?._id ?? ffi.nullptr, + downloadTask?._id ?? ffi.nullptr, + location?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSURL? get location { + final _ret = _lib._objc_msgSend_39(_id, _lib._sel_location1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedFinishedDownloading new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_new1); + return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, + retain: false, release: true); + } + + static CUPHTTPForwardedFinishedDownloading alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_alloc1); + return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, + retain: false, release: true); + } +} + +const int kNativeArgNumberPos = 0; + +const int kNativeArgNumberSize = 8; + +const int kNativeArgTypePos = 8; + +const int kNativeArgTypeSize = 8; + +const int NSURLResponseUnknownLength = -1; + +const int NSOperationQualityOfServiceUserInteractive = 33; + +const int NSOperationQualityOfServiceUserInitiated = 25; + +const int NSOperationQualityOfServiceUtility = 17; + +const int NSOperationQualityOfServiceBackground = 9; + +const int DART_FLAGS_CURRENT_VERSION = 12; + +const int DART_INITIALIZE_PARAMS_CURRENT_VERSION = 4; + +const int ILLEGAL_PORT = 0; + +const String DART_KERNEL_ISOLATE_NAME = 'kernel-service'; + +const String DART_VM_SERVICE_ISOLATE_NAME = 'vm-service'; + +const String kSnapshotBuildIdCSymbol = 'kDartSnapshotBuildId'; + +const String kVmSnapshotDataCSymbol = 'kDartVmSnapshotData'; + +const String kVmSnapshotInstructionsCSymbol = 'kDartVmSnapshotInstructions'; + +const String kVmSnapshotBssCSymbol = 'kDartVmSnapshotBss'; + +const String kIsolateSnapshotDataCSymbol = 'kDartIsolateSnapshotData'; + +const String kIsolateSnapshotInstructionsCSymbol = + 'kDartIsolateSnapshotInstructions'; + +const String kIsolateSnapshotBssCSymbol = 'kDartIsolateSnapshotBss'; + +const String kSnapshotBuildIdAsmSymbol = '_kDartSnapshotBuildId'; + +const String kVmSnapshotDataAsmSymbol = '_kDartVmSnapshotData'; + +const String kVmSnapshotInstructionsAsmSymbol = '_kDartVmSnapshotInstructions'; + +const String kVmSnapshotBssAsmSymbol = '_kDartVmSnapshotBss'; + +const String kIsolateSnapshotDataAsmSymbol = '_kDartIsolateSnapshotData'; + +const String kIsolateSnapshotInstructionsAsmSymbol = + '_kDartIsolateSnapshotInstructions'; + +const String kIsolateSnapshotBssAsmSymbol = '_kDartIsolateSnapshotBss'; diff --git a/pkgs/cupertino_http/lib/src/utils.dart b/pkgs/cupertino_http/lib/src/utils.dart new file mode 100644 index 0000000000..5da1b7d42d --- /dev/null +++ b/pkgs/cupertino_http/lib/src/utils.dart @@ -0,0 +1,80 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:ffi'; +import 'dart:io'; + +import 'native_cupertino_bindings.dart' as ncb; + +const _packageName = 'cupertino_http'; +const _libName = _packageName; + +/// Access to symbols that are linked into the process. +/// +/// The "Foundation" framework is linked to Dart so no additional +/// libraries need to be loaded to access those symbols. +late ncb.NativeCupertinoHttp linkedLibs = () { + if (Platform.isMacOS || Platform.isIOS) { + final lib = DynamicLibrary.process(); + return ncb.NativeCupertinoHttp(lib); + } + throw UnsupportedError( + 'Platform ${Platform.operatingSystem} is not supported'); +}(); + +/// Access to symbols that are available in the cupertino_http helper shared +/// library. +late ncb.NativeCupertinoHttp helperLibs = _loadHelperLibrary(); + +DynamicLibrary _loadHelperDynamicLibrary() { + if (Platform.isMacOS || Platform.isIOS) { + return DynamicLibrary.open('$_libName.framework/$_libName'); + } + + throw UnsupportedError( + 'Platform ${Platform.operatingSystem} is not supported'); +} + +ncb.NativeCupertinoHttp _loadHelperLibrary() { + final lib = _loadHelperDynamicLibrary(); + + final initializeApi = lib.lookupFunction), + int Function(Pointer)>('Dart_InitializeApiDL'); + final initializeResult = initializeApi(NativeApi.initializeApiDLData); + if (initializeResult != 0) { + throw StateError('failed to init API.'); + } + + return ncb.NativeCupertinoHttp(lib); +} + +// TODO(https://github.com/dart-lang/ffigen/issues/373): Change to +// ncb.NSString. +String? toStringOrNull(ncb.NSObject? o) { + if (o == null) { + return null; + } + + return ncb.NSString.castFrom(o).toString(); +} + +/// Converts a NSDictionary containing NSString keys and NSString values into +/// an equivalent map. +Map stringDictToMap(ncb.NSDictionary d) { + // TODO(https://github.com/dart-lang/ffigen/issues/374): Make this + // function type safe. Currently it will unconditionally cast both keys and + // values to NSString with a likely crash down the line if that isn't their + // true types. + final m = {}; + + final keys = ncb.NSArray.castFrom(d.allKeys!); + for (var i = 0; i < keys.count; ++i) { + final nsKey = keys.objectAtIndex_(i); + final key = toStringOrNull(nsKey)!; + final value = toStringOrNull(d.objectForKey_(nsKey))!; + m[key] = value; + } + + return m; +} diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPClientDelegate.m new file mode 100644 index 0000000000..5b375ca3b4 --- /dev/null +++ b/pkgs/cupertino_http/macos/Classes/CUPHTTPClientDelegate.m @@ -0,0 +1 @@ +#include "../../src/CUPHTTPClientDelegate.m" diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPForwardedDelegate.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPForwardedDelegate.m new file mode 100644 index 0000000000..39c9e02729 --- /dev/null +++ b/pkgs/cupertino_http/macos/Classes/CUPHTTPForwardedDelegate.m @@ -0,0 +1 @@ +#include "../../src/CUPHTTPForwardedDelegate.m" diff --git a/pkgs/cupertino_http/macos/Classes/dart_api_dl.c b/pkgs/cupertino_http/macos/Classes/dart_api_dl.c new file mode 100644 index 0000000000..023f80ab06 --- /dev/null +++ b/pkgs/cupertino_http/macos/Classes/dart_api_dl.c @@ -0,0 +1 @@ +#include "../../src/dart-sdk/include/dart_api_dl.c" diff --git a/pkgs/cupertino_http/macos/cupertino_http.podspec b/pkgs/cupertino_http/macos/cupertino_http.podspec new file mode 100644 index 0000000000..1ed634045d --- /dev/null +++ b/pkgs/cupertino_http/macos/cupertino_http.podspec @@ -0,0 +1,28 @@ +# +# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. +# Run `pod lib lint cupertino_http.podspec` to validate before publishing. +# +Pod::Spec.new do |s| + s.name = 'cupertino_http' + s.version = '0.0.1' + s.summary = 'Flutter Foundation URL Loading System' + s.description = <<-DESC + A Flutter plugin for accessing the Foundation URL Loading System. + DESC + s.homepage = 'https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http' + s.license = { :type => 'BSD', :file => '../LICENSE' } + s.author = { 'TODO' => 'use-valid-author' } + + # This will ensure the source files in Classes/ are included in the native + # builds of apps using this FFI plugin. Podspec does not support relative + # paths, so Classes contains a forwarder C file that relatively imports + # `../src/*` so that the C sources can be shared among all target platforms. + s.source = { :path => '.' } + s.source_files = 'Classes/**/*' + s.dependency 'FlutterMacOS' + s.requires_arc = [] + + s.platform = :osx, '10.11' + s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } + s.swift_version = '5.0' +end diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml new file mode 100644 index 0000000000..c821f0af97 --- /dev/null +++ b/pkgs/cupertino_http/pubspec.yaml @@ -0,0 +1,29 @@ +name: cupertino_http +description: > + A macOS/iOS Flutter plugin that provides access to the Foundation URL + Loading System. +version: 0.0.1 +publish_to: none + +environment: + sdk: ">=2.16.0<3.0.0" + flutter: ">=3.0.0" + +dependencies: + ffi: ^1.2.1 + flutter: + sdk: flutter + http: ^0.13.4 + meta: ^1.7.0 + +dev_dependencies: + ffigen: ^6.0.0 + lints: ^1.0.0 + +flutter: + plugin: + platforms: + ios: + ffiPlugin: true + macos: + ffiPlugin: true diff --git a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.h b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.h new file mode 100644 index 0000000000..be1d0e2d08 --- /dev/null +++ b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.h @@ -0,0 +1,63 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Normally, we'd "import " +// but that would mean that ffigen would process every file in the Foundation +// framework, which is huge. So just import the headers that we need. +#import +#import + +#include "dart-sdk/include/dart_api_dl.h" + +/** + * The type of message being sent to a Dart port. See CUPHTTPClientDelegate. + */ +typedef NS_ENUM(NSInteger, MessageType) { + ResponseMessage = 0, + DataMessage = 1, + CompletedMessage = 2, + RedirectMessage = 3, + FinishedDownloading = 4, +}; + +/** + * The configuration associated with a NSURLSessionTask. + * See CUPHTTPClientDelegate. + */ +@interface CUPHTTPTaskConfiguration : NSObject + +- (id) initWithPort:(Dart_Port)sendPort; + +@property (readonly) Dart_Port sendPort; + +@end + +/** + * A delegate for NSURLSession that forwards events for registered + * NSURLSessionTasks and forwards them to a port for consumption in Dart. + * + * The messages sent to the port are contained in a List with one of 3 + * possible formats: + * + * 1. When the delegate receives a HTTP redirect response: + * [MessageType::RedirectMessage, ] + * + * 2. When the delegate receives a HTTP response: + * [MessageType::ResponseMessage, ] + * + * 3. When the delegate receives some HTTP data: + * [MessageType::DataMessage, ] + * + * 4. When the delegate is informed that the response is complete: + * [MessageType::CompletedMessage, ] + */ +@interface CUPHTTPClientDelegate : NSObject + +/** + * Instruct the delegate to forward events for the given task to the port + * specified in the configuration. + */ +- (void)registerTask:(NSURLSessionTask *)task + withConfiguration:(CUPHTTPTaskConfiguration *)config; +@end diff --git a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m new file mode 100644 index 0000000000..2483f6d1ba --- /dev/null +++ b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m @@ -0,0 +1,218 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#import "CUPHTTPClientDelegate.h" + +#import +#include + +#import "CUPHTTPForwardedDelegate.h" + +static Dart_CObject NSObjectToCObject(NSObject* n) { + Dart_CObject cobj; + cobj.type = Dart_CObject_kInt64; + cobj.value.as_int64 = (int64_t) n; + return cobj; +} + +static Dart_CObject MessageTypeToCObject(MessageType messageType) { + Dart_CObject cobj; + cobj.type = Dart_CObject_kInt64; + cobj.value.as_int64 = messageType; + return cobj; +} + +@implementation CUPHTTPTaskConfiguration + +- (id) initWithPort:(Dart_Port)sendPort { + self = [super init]; + if (self != nil) { + self->_sendPort = sendPort; + } + return self; +} + +@end + +@implementation CUPHTTPClientDelegate { + NSMapTable *taskConfigurations; +} + +- (instancetype)init { + self = [super init]; + if (self != nil) { + taskConfigurations = [[NSMapTable strongToStrongObjectsMapTable] retain]; + } + return self; +} + +- (void)dealloc { + [taskConfigurations release]; + [super dealloc]; +} + +- (void)registerTask:(NSURLSessionTask *) task withConfiguration:(CUPHTTPTaskConfiguration *)config { + [taskConfigurations setObject:config forKey:task]; +} + +-(void)unregisterTask:(NSURLSessionTask *) task { + [taskConfigurations removeObjectForKey:task]; +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +willPerformHTTPRedirection:(NSHTTPURLResponse *)response + newRequest:(NSURLRequest *)request + completionHandler:(void (^)(NSURLRequest *))completionHandler { + CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; + NSAssert(config != nil, @"No configuration for task."); + + CUPHTTPForwardedRedirect *forwardedRedirect = [[CUPHTTPForwardedRedirect alloc] + initWithSession:session task:task + response:response request:request]; + Dart_CObject ctype = MessageTypeToCObject(RedirectMessage); + Dart_CObject credirect = NSObjectToCObject(forwardedRedirect); + Dart_CObject* message_carray[] = { &ctype, &credirect }; + + Dart_CObject message_cobj; + message_cobj.type = Dart_CObject_kArray; + message_cobj.value.as_array.length = 2; + message_cobj.value.as_array.values = message_carray; + + [forwardedRedirect.lock lock]; // After this line, any attempt to acquire the lock will wait. + const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); + NSAssert(success, @"Dart_PostCObject_DL failed."); + + // Will be unlocked by [CUPHTTPRedirect continueWithRequest:], which will + // set `redirect.redirectRequest`. + // + // See the @interface description for CUPHTTPRedirect. + [forwardedRedirect.lock lock]; + + completionHandler(forwardedRedirect.redirectRequest); +} + +- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)task +didReceiveResponse:(NSURLResponse *)response + completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler +{ + CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; + NSAssert(config != nil, @"No configuration for task."); + + CUPHTTPForwardedResponse *forwardedResponse = [[CUPHTTPForwardedResponse alloc] + initWithSession:session + task:task + response:response]; + + + Dart_CObject ctype = MessageTypeToCObject(ResponseMessage); + Dart_CObject cRsponseReceived = NSObjectToCObject(forwardedResponse); + Dart_CObject* message_carray[] = { &ctype, &cRsponseReceived }; + + Dart_CObject message_cobj; + message_cobj.type = Dart_CObject_kArray; + message_cobj.value.as_array.length = 2; + message_cobj.value.as_array.values = message_carray; + + [forwardedResponse.lock lock]; // After this line, any attempt to acquire the lock will wait. + const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); + NSAssert(success, @"Dart_PostCObject_DL failed."); + + // Will be unlocked by [CUPHTTPRedirect continueWithRequest:], which will + // set `redirect.redirectRequest`. + // + // See the @interface description for CUPHTTPRedirect. + [forwardedResponse.lock lock]; + + completionHandler(forwardedResponse.disposition); +} + + +- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)task + didReceiveData:(NSData *)data { + CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; + NSAssert(config != nil, @"No configuration for task."); + + CUPHTTPForwardedData *forwardedData = [[CUPHTTPForwardedData alloc] + initWithSession:session task:task data: data] + ; + + Dart_CObject ctype = MessageTypeToCObject(DataMessage); + Dart_CObject cReceiveData = NSObjectToCObject(forwardedData); + Dart_CObject* message_carray[] = { &ctype, &cReceiveData }; + + Dart_CObject message_cobj; + message_cobj.type = Dart_CObject_kArray; + message_cobj.value.as_array.length = 2; + message_cobj.value.as_array.values = message_carray; + + [forwardedData.lock lock]; // After this line, any attempt to acquire the lock will wait. + const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); + NSAssert(success, @"Dart_PostCObject_DL failed."); + + // Will be unlocked by [CUPHTTPRedirect continueWithRequest:], which will + // set `redirect.redirectRequest`. + // + // See the @interface description for CUPHTTPRedirect. + [forwardedData.lock lock]; +} + +- (void)URLSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask +didFinishDownloadingToURL:(NSURL *)location { + CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:downloadTask]; + NSAssert(config != nil, @"No configuration for task."); + + CUPHTTPForwardedFinishedDownloading *forwardedFinishedDownload = [ + [CUPHTTPForwardedFinishedDownloading alloc] + initWithSession:session downloadTask:downloadTask url: location]; + + Dart_CObject ctype = MessageTypeToCObject(FinishedDownloading); + Dart_CObject cReceiveData = NSObjectToCObject(forwardedFinishedDownload); + Dart_CObject* message_carray[] = { &ctype, &cReceiveData }; + + Dart_CObject message_cobj; + message_cobj.type = Dart_CObject_kArray; + message_cobj.value.as_array.length = 2; + message_cobj.value.as_array.values = message_carray; + + // After this line, any attempt to acquire the lock will wait. + [forwardedFinishedDownload.lock lock]; + const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); + NSAssert(success, @"Dart_PostCObject_DL failed."); + + [forwardedFinishedDownload.lock lock]; +} + +- (void)URLSession:(NSURLSession *)session + task:(NSURLSessionTask *)task +didCompleteWithError:(NSError *)error { + CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; + NSAssert(config != nil, @"No configuration for task."); + + CUPHTTPForwardedComplete *forwardedComplete = [[CUPHTTPForwardedComplete alloc] + initWithSession:session task:task error: error]; + + + Dart_CObject ctype = MessageTypeToCObject(CompletedMessage); + Dart_CObject cComplete = NSObjectToCObject(forwardedComplete); + Dart_CObject* message_carray[] = { &ctype, &cComplete }; + + Dart_CObject message_cobj; + message_cobj.type = Dart_CObject_kArray; + message_cobj.value.as_array.length = 2; + message_cobj.value.as_array.values = message_carray; + + [forwardedComplete.lock lock]; // After this line, any attempt to acquire the lock will wait. + const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); + NSAssert(success, @"Dart_PostCObject_DL failed."); + + // Will be unlocked by [CUPHTTPRedirect continueWithRequest:], which will + // set `redirect.redirectRequest`. + // + // See the @interface description for CUPHTTPRedirect. + [forwardedComplete.lock lock]; +} + +@end diff --git a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h new file mode 100644 index 0000000000..7e6ce336a2 --- /dev/null +++ b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h @@ -0,0 +1,108 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Normally, we'd "import " +// but that would mean that ffigen would process every file in the Foundation +// framework, which is huge. So just import the headers that we need. +#import +#import + + +/** + * An object used to communicate redirect information to Dart code. + * + * The flow is: + * 1. CUPHTTPClientDelegate receives a message from the URL Loading System. + * 2. CUPHTTPClientDelegate creates a new CUPHTTPForwardedDelegate subclass. + * 3. CUPHTTPClientDelegate sends the CUPHTTPForwardedDelegate to the + * configured Dart_Port. + * 4. CUPHTTPClientDelegate waits on CUPHTTPForwardedDelegate.lock + * 5. When the Dart code is done process the message received on the port, + * it calls [CUPHTTPForwardedDelegate finish*], which releases the lock. + * 6. CUPHTTPClientDelegate continues running. + */ +@interface CUPHTTPForwardedDelegate : NSObject +- (id) initWithSession:(NSURLSession *)session + task:(NSURLSessionTask *) task; + +/** + * Indicates that the task should continue executing using the given request. + */ +- (void) finish;; + +@property (readonly) NSURLSession *session; +@property (readonly) NSURLSessionTask *task; + +// This property is meant to be used only by CUPHTTPClientDelegate. +@property (readonly) NSLock *lock; + +@end + +@interface CUPHTTPForwardedRedirect : CUPHTTPForwardedDelegate + +- (id) initWithSession:(NSURLSession *)session + task:(NSURLSessionTask *) task + response:(NSHTTPURLResponse *)response + request:(NSURLRequest *)request; + +/** + * Indicates that the task should continue executing using the given request. + * If the request is NIL then the redirect is not followed and the task is + * complete. + */ +- (void) finishWithRequest:(NSURLRequest *) request; + +@property (readonly) NSHTTPURLResponse *response; +@property (readonly) NSURLRequest *request; + +// This property is meant to be used only by CUPHTTPClientDelegate. +@property (readonly) NSURLRequest *redirectRequest; + +@end + +@interface CUPHTTPForwardedResponse : CUPHTTPForwardedDelegate + +- (id) initWithSession:(NSURLSession *)session + task:(NSURLSessionTask *) task + response:(NSURLResponse *)response; + +- (void) finishWithDisposition:(NSURLSessionResponseDisposition) disposition; + +@property (readonly) NSURLResponse *response; + +// This property is meant to be used only by CUPHTTPClientDelegate. +@property (readonly) NSURLSessionResponseDisposition disposition; + +@end + +@interface CUPHTTPForwardedData : CUPHTTPForwardedDelegate + +- (id) initWithSession:(NSURLSession *)session + task:(NSURLSessionTask *) task + data:(NSData *)data; + +@property (readonly) NSData* data; + +@end + + +@interface CUPHTTPForwardedComplete : CUPHTTPForwardedDelegate + +- (id) initWithSession:(NSURLSession *)session + task:(NSURLSessionTask *) task + error:(NSError *)error; + +@property (readonly) NSError* error; + +@end + +@interface CUPHTTPForwardedFinishedDownloading : CUPHTTPForwardedDelegate + +- (id) initWithSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask + url:(NSURL *)location; + +@property (readonly) NSURL* location; + +@end diff --git a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m new file mode 100644 index 0000000000..7ffa812fe9 --- /dev/null +++ b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m @@ -0,0 +1,142 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#import "CUPHTTPForwardedDelegate.h" + +#import +#include + +@implementation CUPHTTPForwardedDelegate + +- (id) initWithSession:(NSURLSession *)session + task:(NSURLSessionTask *) task { + self = [super init]; + if (self != nil) { + self->_session = [session retain]; + self->_task = [task retain]; + self->_lock = [NSLock new]; + } + return self; +} + +- (void) dealloc { + [self->_session release]; + [self->_task release]; + [self->_lock release]; + [super dealloc]; +} + +- (void) finish { + [self->_lock unlock]; +} + +@end + +@implementation CUPHTTPForwardedRedirect + +- (id) initWithSession:(NSURLSession *)session + task:(NSURLSessionTask *) task + response:(NSHTTPURLResponse *)response + request:(NSURLRequest *)request{ + self = [super initWithSession: session task: task]; + if (self != nil) { + self->_response = [response retain]; + self->_request = [request retain]; + } + return self; +} + +- (void) dealloc { + [self->_response release]; + [self->_request release]; + [super dealloc]; +} + +- (void) finishWithRequest:(NSURLRequest *) request { + self->_redirectRequest = [request retain]; + [super finish]; +} + +@end + +@implementation CUPHTTPForwardedResponse + +- (id) initWithSession:(NSURLSession *)session + task:(NSURLSessionTask *) task + response:(NSURLResponse *)response { + self = [super initWithSession: session task: task]; + if (self != nil) { + self->_response = [response retain]; + } + return self; +} + +- (void) dealloc { + [self->_response release]; + [super dealloc]; +} + +- (void) finishWithDisposition:(NSURLSessionResponseDisposition) disposition { + self->_disposition = disposition; + [super finish]; +} + +@end + +@implementation CUPHTTPForwardedData + +- (id) initWithSession:(NSURLSession *)session + task:(NSURLSessionTask *) task + data:(NSData *)data { + self = [super initWithSession: session task: task]; + if (self != nil) { + self->_data = [data retain]; + } + return self; +} + +- (void) dealloc { + [self->_data release]; + [super dealloc]; +} + +@end + +@implementation CUPHTTPForwardedComplete + +- (id) initWithSession:(NSURLSession *)session + task:(NSURLSessionTask *) task + error:(NSError *)error { + self = [super initWithSession: session task: task]; + if (self != nil) { + self->_error = [error retain]; + } + return self; +} + +- (void) dealloc { + [self->_error release]; + [super dealloc]; +} + +@end + +@implementation CUPHTTPForwardedFinishedDownloading + +- (id) initWithSession:(NSURLSession *)session + downloadTask:(NSURLSessionDownloadTask *)downloadTask + url:(NSURL *)location { + self = [super initWithSession: session task: downloadTask]; + if (self != nil) { + self->_location = [location retain]; + } + return self; +} + +- (void) dealloc { + [self->_location release]; + [super dealloc]; +} + +@end diff --git a/pkgs/cupertino_http/src/dart-sdk/include/dart_api.h b/pkgs/cupertino_http/src/dart-sdk/include/dart_api.h new file mode 100644 index 0000000000..abc0291836 --- /dev/null +++ b/pkgs/cupertino_http/src/dart-sdk/include/dart_api.h @@ -0,0 +1,3909 @@ +/* + * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_INCLUDE_DART_API_H_ +#define RUNTIME_INCLUDE_DART_API_H_ + +/** \mainpage Dart Embedding API Reference + * + * This reference describes the Dart Embedding API, which is used to embed the + * Dart Virtual Machine within C/C++ applications. + * + * This reference is generated from the header include/dart_api.h. + */ + +/* __STDC_FORMAT_MACROS has to be defined before including to + * enable platform independent printf format specifiers. */ +#ifndef __STDC_FORMAT_MACROS +#define __STDC_FORMAT_MACROS +#endif + +#include +#include +#include + +#ifdef __cplusplus +#define DART_EXTERN_C extern "C" +#else +#define DART_EXTERN_C extern +#endif + +#if defined(__CYGWIN__) +#error Tool chain and platform not supported. +#elif defined(_WIN32) +#if defined(DART_SHARED_LIB) +#define DART_EXPORT DART_EXTERN_C __declspec(dllexport) +#else +#define DART_EXPORT DART_EXTERN_C +#endif +#else +#if __GNUC__ >= 4 +#if defined(DART_SHARED_LIB) +#define DART_EXPORT \ + DART_EXTERN_C __attribute__((visibility("default"))) __attribute((used)) +#else +#define DART_EXPORT DART_EXTERN_C +#endif +#else +#error Tool chain not supported. +#endif +#endif + +#if __GNUC__ +#define DART_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#elif _MSC_VER +#define DART_WARN_UNUSED_RESULT _Check_return_ +#else +#define DART_WARN_UNUSED_RESULT +#endif + +/* + * ======= + * Handles + * ======= + */ + +/** + * An isolate is the unit of concurrency in Dart. Each isolate has + * its own memory and thread of control. No state is shared between + * isolates. Instead, isolates communicate by message passing. + * + * Each thread keeps track of its current isolate, which is the + * isolate which is ready to execute on the current thread. The + * current isolate may be NULL, in which case no isolate is ready to + * execute. Most of the Dart apis require there to be a current + * isolate in order to function without error. The current isolate is + * set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. + */ +typedef struct _Dart_Isolate* Dart_Isolate; +typedef struct _Dart_IsolateGroup* Dart_IsolateGroup; + +/** + * An object reference managed by the Dart VM garbage collector. + * + * Because the garbage collector may move objects, it is unsafe to + * refer to objects directly. Instead, we refer to objects through + * handles, which are known to the garbage collector and updated + * automatically when the object is moved. Handles should be passed + * by value (except in cases like out-parameters) and should never be + * allocated on the heap. + * + * Most functions in the Dart Embedding API return a handle. When a + * function completes normally, this will be a valid handle to an + * object in the Dart VM heap. This handle may represent the result of + * the operation or it may be a special valid handle used merely to + * indicate successful completion. Note that a valid handle may in + * some cases refer to the null object. + * + * --- Error handles --- + * + * When a function encounters a problem that prevents it from + * completing normally, it returns an error handle (See Dart_IsError). + * An error handle has an associated error message that gives more + * details about the problem (See Dart_GetError). + * + * There are four kinds of error handles that can be produced, + * depending on what goes wrong: + * + * - Api error handles are produced when an api function is misused. + * This happens when a Dart embedding api function is called with + * invalid arguments or in an invalid context. + * + * - Unhandled exception error handles are produced when, during the + * execution of Dart code, an exception is thrown but not caught. + * Prototypically this would occur during a call to Dart_Invoke, but + * it can occur in any function which triggers the execution of Dart + * code (for example, Dart_ToString). + * + * An unhandled exception error provides access to an exception and + * stacktrace via the functions Dart_ErrorGetException and + * Dart_ErrorGetStackTrace. + * + * - Compilation error handles are produced when, during the execution + * of Dart code, a compile-time error occurs. As above, this can + * occur in any function which triggers the execution of Dart code. + * + * - Fatal error handles are produced when the system wants to shut + * down the current isolate. + * + * --- Propagating errors --- + * + * When an error handle is returned from the top level invocation of + * Dart code in a program, the embedder must handle the error as they + * see fit. Often, the embedder will print the error message produced + * by Dart_Error and exit the program. + * + * When an error is returned while in the body of a native function, + * it can be propagated up the call stack by calling + * Dart_PropagateError, Dart_SetReturnValue, or Dart_ThrowException. + * Errors should be propagated unless there is a specific reason not + * to. If an error is not propagated then it is ignored. For + * example, if an unhandled exception error is ignored, that + * effectively "catches" the unhandled exception. Fatal errors must + * always be propagated. + * + * When an error is propagated, any current scopes created by + * Dart_EnterScope will be exited. + * + * Using Dart_SetReturnValue to propagate an exception is somewhat + * more convenient than using Dart_PropagateError, and should be + * preferred for reasons discussed below. + * + * Dart_PropagateError and Dart_ThrowException do not return. Instead + * they transfer control non-locally using a setjmp-like mechanism. + * This can be inconvenient if you have resources that you need to + * clean up before propagating the error. + * + * When relying on Dart_PropagateError, we often return error handles + * rather than propagating them from helper functions. Consider the + * following contrived example: + * + * 1 Dart_Handle isLongStringHelper(Dart_Handle arg) { + * 2 intptr_t* length = 0; + * 3 result = Dart_StringLength(arg, &length); + * 4 if (Dart_IsError(result)) { + * 5 return result; + * 6 } + * 7 return Dart_NewBoolean(length > 100); + * 8 } + * 9 + * 10 void NativeFunction_isLongString(Dart_NativeArguments args) { + * 11 Dart_EnterScope(); + * 12 AllocateMyResource(); + * 13 Dart_Handle arg = Dart_GetNativeArgument(args, 0); + * 14 Dart_Handle result = isLongStringHelper(arg); + * 15 if (Dart_IsError(result)) { + * 16 FreeMyResource(); + * 17 Dart_PropagateError(result); + * 18 abort(); // will not reach here + * 19 } + * 20 Dart_SetReturnValue(result); + * 21 FreeMyResource(); + * 22 Dart_ExitScope(); + * 23 } + * + * In this example, we have a native function which calls a helper + * function to do its work. On line 5, the helper function could call + * Dart_PropagateError, but that would not give the native function a + * chance to call FreeMyResource(), causing a leak. Instead, the + * helper function returns the error handle to the caller, giving the + * caller a chance to clean up before propagating the error handle. + * + * When an error is propagated by calling Dart_SetReturnValue, the + * native function will be allowed to complete normally and then the + * exception will be propagated only once the native call + * returns. This can be convenient, as it allows the C code to clean + * up normally. + * + * The example can be written more simply using Dart_SetReturnValue to + * propagate the error. + * + * 1 Dart_Handle isLongStringHelper(Dart_Handle arg) { + * 2 intptr_t* length = 0; + * 3 result = Dart_StringLength(arg, &length); + * 4 if (Dart_IsError(result)) { + * 5 return result + * 6 } + * 7 return Dart_NewBoolean(length > 100); + * 8 } + * 9 + * 10 void NativeFunction_isLongString(Dart_NativeArguments args) { + * 11 Dart_EnterScope(); + * 12 AllocateMyResource(); + * 13 Dart_Handle arg = Dart_GetNativeArgument(args, 0); + * 14 Dart_SetReturnValue(isLongStringHelper(arg)); + * 15 FreeMyResource(); + * 16 Dart_ExitScope(); + * 17 } + * + * In this example, the call to Dart_SetReturnValue on line 14 will + * either return the normal return value or the error (potentially + * generated on line 3). The call to FreeMyResource on line 15 will + * execute in either case. + * + * --- Local and persistent handles --- + * + * Local handles are allocated within the current scope (see + * Dart_EnterScope) and go away when the current scope exits. Unless + * otherwise indicated, callers should assume that all functions in + * the Dart embedding api return local handles. + * + * Persistent handles are allocated within the current isolate. They + * can be used to store objects across scopes. Persistent handles have + * the lifetime of the current isolate unless they are explicitly + * deallocated (see Dart_DeletePersistentHandle). + * The type Dart_Handle represents a handle (both local and persistent). + * The type Dart_PersistentHandle is a Dart_Handle and it is used to + * document that a persistent handle is expected as a parameter to a call + * or the return value from a call is a persistent handle. + * + * FinalizableHandles are persistent handles which are auto deleted when + * the object is garbage collected. It is never safe to use these handles + * unless you know the object is still reachable. + * + * WeakPersistentHandles are persistent handles which are automatically set + * to point Dart_Null when the object is garbage collected. They are not auto + * deleted, so it is safe to use them after the object has become unreachable. + */ +typedef struct _Dart_Handle* Dart_Handle; +typedef Dart_Handle Dart_PersistentHandle; +typedef struct _Dart_WeakPersistentHandle* Dart_WeakPersistentHandle; +typedef struct _Dart_FinalizableHandle* Dart_FinalizableHandle; +// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the +// version when changing this struct. + +typedef void (*Dart_HandleFinalizer)(void* isolate_callback_data, void* peer); + +/** + * Is this an error handle? + * + * Requires there to be a current isolate. + */ +DART_EXPORT bool Dart_IsError(Dart_Handle handle); + +/** + * Is this an api error handle? + * + * Api error handles are produced when an api function is misused. + * This happens when a Dart embedding api function is called with + * invalid arguments or in an invalid context. + * + * Requires there to be a current isolate. + */ +DART_EXPORT bool Dart_IsApiError(Dart_Handle handle); + +/** + * Is this an unhandled exception error handle? + * + * Unhandled exception error handles are produced when, during the + * execution of Dart code, an exception is thrown but not caught. + * This can occur in any function which triggers the execution of Dart + * code. + * + * See Dart_ErrorGetException and Dart_ErrorGetStackTrace. + * + * Requires there to be a current isolate. + */ +DART_EXPORT bool Dart_IsUnhandledExceptionError(Dart_Handle handle); + +/** + * Is this a compilation error handle? + * + * Compilation error handles are produced when, during the execution + * of Dart code, a compile-time error occurs. This can occur in any + * function which triggers the execution of Dart code. + * + * Requires there to be a current isolate. + */ +DART_EXPORT bool Dart_IsCompilationError(Dart_Handle handle); + +/** + * Is this a fatal error handle? + * + * Fatal error handles are produced when the system wants to shut down + * the current isolate. + * + * Requires there to be a current isolate. + */ +DART_EXPORT bool Dart_IsFatalError(Dart_Handle handle); + +/** + * Gets the error message from an error handle. + * + * Requires there to be a current isolate. + * + * \return A C string containing an error message if the handle is + * error. An empty C string ("") if the handle is valid. This C + * String is scope allocated and is only valid until the next call + * to Dart_ExitScope. +*/ +DART_EXPORT const char* Dart_GetError(Dart_Handle handle); + +/** + * Is this an error handle for an unhandled exception? + */ +DART_EXPORT bool Dart_ErrorHasException(Dart_Handle handle); + +/** + * Gets the exception Object from an unhandled exception error handle. + */ +DART_EXPORT Dart_Handle Dart_ErrorGetException(Dart_Handle handle); + +/** + * Gets the stack trace Object from an unhandled exception error handle. + */ +DART_EXPORT Dart_Handle Dart_ErrorGetStackTrace(Dart_Handle handle); + +/** + * Produces an api error handle with the provided error message. + * + * Requires there to be a current isolate. + * + * \param error the error message. + */ +DART_EXPORT Dart_Handle Dart_NewApiError(const char* error); +DART_EXPORT Dart_Handle Dart_NewCompilationError(const char* error); + +/** + * Produces a new unhandled exception error handle. + * + * Requires there to be a current isolate. + * + * \param exception An instance of a Dart object to be thrown or + * an ApiError or CompilationError handle. + * When an ApiError or CompilationError handle is passed in + * a string object of the error message is created and it becomes + * the Dart object to be thrown. + */ +DART_EXPORT Dart_Handle Dart_NewUnhandledExceptionError(Dart_Handle exception); + +/** + * Propagates an error. + * + * If the provided handle is an unhandled exception error, this + * function will cause the unhandled exception to be rethrown. This + * will proceed in the standard way, walking up Dart frames until an + * appropriate 'catch' block is found, executing 'finally' blocks, + * etc. + * + * If the error is not an unhandled exception error, we will unwind + * the stack to the next C frame. Intervening Dart frames will be + * discarded; specifically, 'finally' blocks will not execute. This + * is the standard way that compilation errors (and the like) are + * handled by the Dart runtime. + * + * In either case, when an error is propagated any current scopes + * created by Dart_EnterScope will be exited. + * + * See the additional discussion under "Propagating Errors" at the + * beginning of this file. + * + * \param An error handle (See Dart_IsError) + * + * \return On success, this function does not return. On failure, the + * process is terminated. + */ +DART_EXPORT void Dart_PropagateError(Dart_Handle handle); + +/** + * Converts an object to a string. + * + * May generate an unhandled exception error. + * + * \return The converted string if no error occurs during + * the conversion. If an error does occur, an error handle is + * returned. + */ +DART_EXPORT Dart_Handle Dart_ToString(Dart_Handle object); + +/** + * Checks to see if two handles refer to identically equal objects. + * + * If both handles refer to instances, this is equivalent to using the top-level + * function identical() from dart:core. Otherwise, returns whether the two + * argument handles refer to the same object. + * + * \param obj1 An object to be compared. + * \param obj2 An object to be compared. + * + * \return True if the objects are identically equal. False otherwise. + */ +DART_EXPORT bool Dart_IdentityEquals(Dart_Handle obj1, Dart_Handle obj2); + +/** + * Allocates a handle in the current scope from a persistent handle. + */ +DART_EXPORT Dart_Handle Dart_HandleFromPersistent(Dart_PersistentHandle object); + +/** + * Allocates a handle in the current scope from a weak persistent handle. + * + * This will be a handle to Dart_Null if the object has been garbage collected. + */ +DART_EXPORT Dart_Handle +Dart_HandleFromWeakPersistent(Dart_WeakPersistentHandle object); + +/** + * Allocates a persistent handle for an object. + * + * This handle has the lifetime of the current isolate unless it is + * explicitly deallocated by calling Dart_DeletePersistentHandle. + * + * Requires there to be a current isolate. + */ +DART_EXPORT Dart_PersistentHandle Dart_NewPersistentHandle(Dart_Handle object); + +/** + * Assign value of local handle to a persistent handle. + * + * Requires there to be a current isolate. + * + * \param obj1 A persistent handle whose value needs to be set. + * \param obj2 An object whose value needs to be set to the persistent handle. + * + * \return Success if the persistent handle was set + * Otherwise, returns an error. + */ +DART_EXPORT void Dart_SetPersistentHandle(Dart_PersistentHandle obj1, + Dart_Handle obj2); + +/** + * Deallocates a persistent handle. + * + * Requires there to be a current isolate group. + */ +DART_EXPORT void Dart_DeletePersistentHandle(Dart_PersistentHandle object); + +/** + * Allocates a weak persistent handle for an object. + * + * This handle has the lifetime of the current isolate. The handle can also be + * explicitly deallocated by calling Dart_DeleteWeakPersistentHandle. + * + * If the object becomes unreachable the callback is invoked with the peer as + * argument. The callback can be executed on any thread, will have a current + * isolate group, but will not have a current isolate. The callback can only + * call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. This + * gives the embedder the ability to cleanup data associated with the object. + * The handle will point to the Dart_Null object after the finalizer has been + * run. It is illegal to call into the VM with any other Dart_* functions from + * the callback. If the handle is deleted before the object becomes + * unreachable, the callback is never invoked. + * + * Requires there to be a current isolate. + * + * \param object An object with identity. + * \param peer A pointer to a native object or NULL. This value is + * provided to callback when it is invoked. + * \param external_allocation_size The number of externally allocated + * bytes for peer. Used to inform the garbage collector. + * \param callback A function pointer that will be invoked sometime + * after the object is garbage collected, unless the handle has been deleted. + * A valid callback needs to be specified it cannot be NULL. + * + * \return The weak persistent handle or NULL. NULL is returned in case of bad + * parameters. + */ +DART_EXPORT Dart_WeakPersistentHandle +Dart_NewWeakPersistentHandle(Dart_Handle object, + void* peer, + intptr_t external_allocation_size, + Dart_HandleFinalizer callback); + +/** + * Deletes the given weak persistent [object] handle. + * + * Requires there to be a current isolate group. + */ +DART_EXPORT void Dart_DeleteWeakPersistentHandle( + Dart_WeakPersistentHandle object); + +/** + * Updates the external memory size for the given weak persistent handle. + * + * May trigger garbage collection. + */ +DART_EXPORT void Dart_UpdateExternalSize(Dart_WeakPersistentHandle object, + intptr_t external_allocation_size); + +/** + * Allocates a finalizable handle for an object. + * + * This handle has the lifetime of the current isolate group unless the object + * pointed to by the handle is garbage collected, in this case the VM + * automatically deletes the handle after invoking the callback associated + * with the handle. The handle can also be explicitly deallocated by + * calling Dart_DeleteFinalizableHandle. + * + * If the object becomes unreachable the callback is invoked with the + * the peer as argument. The callback can be executed on any thread, will have + * an isolate group, but will not have a current isolate. The callback can only + * call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. + * This gives the embedder the ability to cleanup data associated with the + * object and clear out any cached references to the handle. All references to + * this handle after the callback will be invalid. It is illegal to call into + * the VM with any other Dart_* functions from the callback. If the handle is + * deleted before the object becomes unreachable, the callback is never + * invoked. + * + * Requires there to be a current isolate. + * + * \param object An object with identity. + * \param peer A pointer to a native object or NULL. This value is + * provided to callback when it is invoked. + * \param external_allocation_size The number of externally allocated + * bytes for peer. Used to inform the garbage collector. + * \param callback A function pointer that will be invoked sometime + * after the object is garbage collected, unless the handle has been deleted. + * A valid callback needs to be specified it cannot be NULL. + * + * \return The finalizable handle or NULL. NULL is returned in case of bad + * parameters. + */ +DART_EXPORT Dart_FinalizableHandle +Dart_NewFinalizableHandle(Dart_Handle object, + void* peer, + intptr_t external_allocation_size, + Dart_HandleFinalizer callback); + +/** + * Deletes the given finalizable [object] handle. + * + * The caller has to provide the actual Dart object the handle was created from + * to prove the object (and therefore the finalizable handle) is still alive. + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_DeleteFinalizableHandle(Dart_FinalizableHandle object, + Dart_Handle strong_ref_to_object); + +/** + * Updates the external memory size for the given finalizable handle. + * + * The caller has to provide the actual Dart object the handle was created from + * to prove the object (and therefore the finalizable handle) is still alive. + * + * May trigger garbage collection. + */ +DART_EXPORT void Dart_UpdateFinalizableExternalSize( + Dart_FinalizableHandle object, + Dart_Handle strong_ref_to_object, + intptr_t external_allocation_size); + +/* + * ========================== + * Initialization and Globals + * ========================== + */ + +/** + * Gets the version string for the Dart VM. + * + * The version of the Dart VM can be accessed without initializing the VM. + * + * \return The version string for the embedded Dart VM. + */ +DART_EXPORT const char* Dart_VersionString(); + +/** + * Isolate specific flags are set when creating a new isolate using the + * Dart_IsolateFlags structure. + * + * Current version of flags is encoded in a 32-bit integer with 16 bits used + * for each part. + */ + +#define DART_FLAGS_CURRENT_VERSION (0x0000000c) + +typedef struct { + int32_t version; + bool enable_asserts; + bool use_field_guards; + bool use_osr; + bool obfuscate; + bool load_vmservice_library; + bool copy_parent_code; + bool null_safety; + bool is_system_isolate; +} Dart_IsolateFlags; + +/** + * Initialize Dart_IsolateFlags with correct version and default values. + */ +DART_EXPORT void Dart_IsolateFlagsInitialize(Dart_IsolateFlags* flags); + +/** + * An isolate creation and initialization callback function. + * + * This callback, provided by the embedder, is called when the VM + * needs to create an isolate. The callback should create an isolate + * by calling Dart_CreateIsolateGroup and load any scripts required for + * execution. + * + * This callback may be called on a different thread than the one + * running the parent isolate. + * + * When the function returns NULL, it is the responsibility of this + * function to ensure that Dart_ShutdownIsolate has been called if + * required (for example, if the isolate was created successfully by + * Dart_CreateIsolateGroup() but the root library fails to load + * successfully, then the function should call Dart_ShutdownIsolate + * before returning). + * + * When the function returns NULL, the function should set *error to + * a malloc-allocated buffer containing a useful error message. The + * caller of this function (the VM) will make sure that the buffer is + * freed. + * + * \param script_uri The uri of the main source file or snapshot to load. + * Either the URI of the parent isolate set in Dart_CreateIsolateGroup for + * Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the + * library tag handler of the parent isolate. + * The callback is responsible for loading the program by a call to + * Dart_LoadScriptFromKernel. + * \param main The name of the main entry point this isolate will + * eventually run. This is provided for advisory purposes only to + * improve debugging messages. The main function is not invoked by + * this function. + * \param package_root Ignored. + * \param package_config Uri of the package configuration file (either in format + * of .packages or .dart_tool/package_config.json) for this isolate + * to resolve package imports against. If this parameter is not passed the + * package resolution of the parent isolate should be used. + * \param flags Default flags for this isolate being spawned. Either inherited + * from the spawning isolate or passed as parameters when spawning the + * isolate from Dart code. + * \param isolate_data The isolate data which was passed to the + * parent isolate when it was created by calling Dart_CreateIsolateGroup(). + * \param error A structure into which the embedder can place a + * C string containing an error message in the case of failures. + * + * \return The embedder returns NULL if the creation and + * initialization was not successful and the isolate if successful. + */ +typedef Dart_Isolate (*Dart_IsolateGroupCreateCallback)( + const char* script_uri, + const char* main, + const char* package_root, + const char* package_config, + Dart_IsolateFlags* flags, + void* isolate_data, + char** error); + +/** + * An isolate initialization callback function. + * + * This callback, provided by the embedder, is called when the VM has created an + * isolate within an existing isolate group (i.e. from the same source as an + * existing isolate). + * + * The callback should setup native resolvers and might want to set a custom + * message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as + * runnable. + * + * This callback may be called on a different thread than the one + * running the parent isolate. + * + * When the function returns `false`, it is the responsibility of this + * function to ensure that `Dart_ShutdownIsolate` has been called. + * + * When the function returns `false`, the function should set *error to + * a malloc-allocated buffer containing a useful error message. The + * caller of this function (the VM) will make sure that the buffer is + * freed. + * + * \param child_isolate_data The callback data to associate with the new + * child isolate. + * \param error A structure into which the embedder can place a + * C string containing an error message in the case the initialization fails. + * + * \return The embedder returns true if the initialization was successful and + * false otherwise (in which case the VM will terminate the isolate). + */ +typedef bool (*Dart_InitializeIsolateCallback)(void** child_isolate_data, + char** error); + +/** + * An isolate unhandled exception callback function. + * + * This callback has been DEPRECATED. + */ +typedef void (*Dart_IsolateUnhandledExceptionCallback)(Dart_Handle error); + +/** + * An isolate shutdown callback function. + * + * This callback, provided by the embedder, is called before the vm + * shuts down an isolate. The isolate being shutdown will be the current + * isolate. It is safe to run Dart code. + * + * This function should be used to dispose of native resources that + * are allocated to an isolate in order to avoid leaks. + * + * \param isolate_group_data The same callback data which was passed to the + * isolate group when it was created. + * \param isolate_data The same callback data which was passed to the isolate + * when it was created. + */ +typedef void (*Dart_IsolateShutdownCallback)(void* isolate_group_data, + void* isolate_data); + +/** + * An isolate cleanup callback function. + * + * This callback, provided by the embedder, is called after the vm + * shuts down an isolate. There will be no current isolate and it is *not* + * safe to run Dart code. + * + * This function should be used to dispose of native resources that + * are allocated to an isolate in order to avoid leaks. + * + * \param isolate_group_data The same callback data which was passed to the + * isolate group when it was created. + * \param isolate_data The same callback data which was passed to the isolate + * when it was created. + */ +typedef void (*Dart_IsolateCleanupCallback)(void* isolate_group_data, + void* isolate_data); + +/** + * An isolate group cleanup callback function. + * + * This callback, provided by the embedder, is called after the vm + * shuts down an isolate group. + * + * This function should be used to dispose of native resources that + * are allocated to an isolate in order to avoid leaks. + * + * \param isolate_group_data The same callback data which was passed to the + * isolate group when it was created. + * + */ +typedef void (*Dart_IsolateGroupCleanupCallback)(void* isolate_group_data); + +/** + * A thread death callback function. + * This callback, provided by the embedder, is called before a thread in the + * vm thread pool exits. + * This function could be used to dispose of native resources that + * are associated and attached to the thread, in order to avoid leaks. + */ +typedef void (*Dart_ThreadExitCallback)(); + +/** + * Callbacks provided by the embedder for file operations. If the + * embedder does not allow file operations these callbacks can be + * NULL. + * + * Dart_FileOpenCallback - opens a file for reading or writing. + * \param name The name of the file to open. + * \param write A boolean variable which indicates if the file is to + * opened for writing. If there is an existing file it needs to truncated. + * + * Dart_FileReadCallback - Read contents of file. + * \param data Buffer allocated in the callback into which the contents + * of the file are read into. It is the responsibility of the caller to + * free this buffer. + * \param file_length A variable into which the length of the file is returned. + * In the case of an error this value would be -1. + * \param stream Handle to the opened file. + * + * Dart_FileWriteCallback - Write data into file. + * \param data Buffer which needs to be written into the file. + * \param length Length of the buffer. + * \param stream Handle to the opened file. + * + * Dart_FileCloseCallback - Closes the opened file. + * \param stream Handle to the opened file. + * + */ +typedef void* (*Dart_FileOpenCallback)(const char* name, bool write); + +typedef void (*Dart_FileReadCallback)(uint8_t** data, + intptr_t* file_length, + void* stream); + +typedef void (*Dart_FileWriteCallback)(const void* data, + intptr_t length, + void* stream); + +typedef void (*Dart_FileCloseCallback)(void* stream); + +typedef bool (*Dart_EntropySource)(uint8_t* buffer, intptr_t length); + +/** + * Callback provided by the embedder that is used by the vmservice isolate + * to request the asset archive. The asset archive must be an uncompressed tar + * archive that is stored in a Uint8List. + * + * If the embedder has no vmservice isolate assets, the callback can be NULL. + * + * \return The embedder must return a handle to a Uint8List containing an + * uncompressed tar archive or null. + */ +typedef Dart_Handle (*Dart_GetVMServiceAssetsArchive)(); + +/** + * The current version of the Dart_InitializeFlags. Should be incremented every + * time Dart_InitializeFlags changes in a binary incompatible way. + */ +#define DART_INITIALIZE_PARAMS_CURRENT_VERSION (0x00000004) + +/** Forward declaration */ +struct Dart_CodeObserver; + +/** + * Callback provided by the embedder that is used by the VM to notify on code + * object creation, *before* it is invoked the first time. + * This is useful for embedders wanting to e.g. keep track of PCs beyond + * the lifetime of the garbage collected code objects. + * Note that an address range may be used by more than one code object over the + * lifecycle of a process. Clients of this function should record timestamps for + * these compilation events and when collecting PCs to disambiguate reused + * address ranges. + */ +typedef void (*Dart_OnNewCodeCallback)(struct Dart_CodeObserver* observer, + const char* name, + uintptr_t base, + uintptr_t size); + +typedef struct Dart_CodeObserver { + void* data; + + Dart_OnNewCodeCallback on_new_code; +} Dart_CodeObserver; + +/** + * Describes how to initialize the VM. Used with Dart_Initialize. + * + * \param version Identifies the version of the struct used by the client. + * should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. + * \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate + * or NULL if no snapshot is provided. If provided, the buffer must remain + * valid until Dart_Cleanup returns. + * \param instructions_snapshot A buffer containing a snapshot of precompiled + * instructions, or NULL if no snapshot is provided. If provided, the buffer + * must remain valid until Dart_Cleanup returns. + * \param initialize_isolate A function to be called during isolate + * initialization inside an existing isolate group. + * See Dart_InitializeIsolateCallback. + * \param create_group A function to be called during isolate group creation. + * See Dart_IsolateGroupCreateCallback. + * \param shutdown A function to be called right before an isolate is shutdown. + * See Dart_IsolateShutdownCallback. + * \param cleanup A function to be called after an isolate was shutdown. + * See Dart_IsolateCleanupCallback. + * \param cleanup_group A function to be called after an isolate group is shutdown. + * See Dart_IsolateGroupCleanupCallback. + * \param get_service_assets A function to be called by the service isolate when + * it requires the vmservice assets archive. + * See Dart_GetVMServiceAssetsArchive. + * \param code_observer An external code observer callback function. + * The observer can be invoked as early as during the Dart_Initialize() call. + */ +typedef struct { + int32_t version; + const uint8_t* vm_snapshot_data; + const uint8_t* vm_snapshot_instructions; + Dart_IsolateGroupCreateCallback create_group; + Dart_InitializeIsolateCallback initialize_isolate; + Dart_IsolateShutdownCallback shutdown_isolate; + Dart_IsolateCleanupCallback cleanup_isolate; + Dart_IsolateGroupCleanupCallback cleanup_group; + Dart_ThreadExitCallback thread_exit; + Dart_FileOpenCallback file_open; + Dart_FileReadCallback file_read; + Dart_FileWriteCallback file_write; + Dart_FileCloseCallback file_close; + Dart_EntropySource entropy_source; + Dart_GetVMServiceAssetsArchive get_service_assets; + bool start_kernel_isolate; + Dart_CodeObserver* code_observer; +} Dart_InitializeParams; + +/** + * Initializes the VM. + * + * \param params A struct containing initialization information. The version + * field of the struct must be DART_INITIALIZE_PARAMS_CURRENT_VERSION. + * + * \return NULL if initialization is successful. Returns an error message + * otherwise. The caller is responsible for freeing the error message. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_Initialize( + Dart_InitializeParams* params); + +/** + * Cleanup state in the VM before process termination. + * + * \return NULL if cleanup is successful. Returns an error message otherwise. + * The caller is responsible for freeing the error message. + * + * NOTE: This function must not be called on a thread that was created by the VM + * itself. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_Cleanup(); + +/** + * Sets command line flags. Should be called before Dart_Initialize. + * + * \param argc The length of the arguments array. + * \param argv An array of arguments. + * + * \return NULL if successful. Returns an error message otherwise. + * The caller is responsible for freeing the error message. + * + * NOTE: This call does not store references to the passed in c-strings. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_SetVMFlags(int argc, + const char** argv); + +/** + * Returns true if the named VM flag is of boolean type, specified, and set to + * true. + * + * \param flag_name The name of the flag without leading punctuation + * (example: "enable_asserts"). + */ +DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name); + +/* + * ======== + * Isolates + * ======== + */ + +/** + * Creates a new isolate. The new isolate becomes the current isolate. + * + * A snapshot can be used to restore the VM quickly to a saved state + * and is useful for fast startup. If snapshot data is provided, the + * isolate will be started using that snapshot data. Requires a core snapshot or + * an app snapshot created by Dart_CreateSnapshot or + * Dart_CreatePrecompiledSnapshot* from a VM with the same version. + * + * Requires there to be no current isolate. + * + * \param script_uri The main source file or snapshot this isolate will load. + * The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child + * isolate is created by Isolate.spawn. The embedder should use a URI that + * allows it to load the same program into such a child isolate. + * \param name A short name for the isolate to improve debugging messages. + * Typically of the format 'foo.dart:main()'. + * \param isolate_snapshot_data + * \param isolate_snapshot_instructions Buffers containing a snapshot of the + * isolate or NULL if no snapshot is provided. If provided, the buffers must + * remain valid until the isolate shuts down. + * \param flags Pointer to VM specific flags or NULL for default flags. + * \param isolate_group_data Embedder group data. This data can be obtained + * by calling Dart_IsolateGroupData and will be passed to the + * Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and + * Dart_IsolateGroupCleanupCallback. + * \param isolate_data Embedder data. This data will be passed to + * the Dart_IsolateGroupCreateCallback when new isolates are spawned from + * this parent isolate. + * \param error Returns NULL if creation is successful, an error message + * otherwise. The caller is responsible for calling free() on the error + * message. + * + * \return The new isolate on success, or NULL if isolate creation failed. + */ +DART_EXPORT Dart_Isolate +Dart_CreateIsolateGroup(const char* script_uri, + const char* name, + const uint8_t* isolate_snapshot_data, + const uint8_t* isolate_snapshot_instructions, + Dart_IsolateFlags* flags, + void* isolate_group_data, + void* isolate_data, + char** error); +/** + * Creates a new isolate inside the isolate group of [group_member]. + * + * Requires there to be no current isolate. + * + * \param group_member An isolate from the same group into which the newly created + * isolate should be born into. Other threads may not have entered / enter this + * member isolate. + * \param name A short name for the isolate for debugging purposes. + * \param shutdown_callback A callback to be called when the isolate is being + * shutdown (may be NULL). + * \param cleanup_callback A callback to be called when the isolate is being + * cleaned up (may be NULL). + * \param isolate_data The embedder-specific data associated with this isolate. + * \param error Set to NULL if creation is successful, set to an error + * message otherwise. The caller is responsible for calling free() on the + * error message. + * + * \return The newly created isolate on success, or NULL if isolate creation + * failed. + * + * If successful, the newly created isolate will become the current isolate. + */ +DART_EXPORT Dart_Isolate +Dart_CreateIsolateInGroup(Dart_Isolate group_member, + const char* name, + Dart_IsolateShutdownCallback shutdown_callback, + Dart_IsolateCleanupCallback cleanup_callback, + void* child_isolate_data, + char** error); + +/* TODO(turnidge): Document behavior when there is already a current + * isolate. */ + +/** + * Creates a new isolate from a Dart Kernel file. The new isolate + * becomes the current isolate. + * + * Requires there to be no current isolate. + * + * \param script_uri The main source file or snapshot this isolate will load. + * The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child + * isolate is created by Isolate.spawn. The embedder should use a URI that + * allows it to load the same program into such a child isolate. + * \param name A short name for the isolate to improve debugging messages. + * Typically of the format 'foo.dart:main()'. + * \param kernel_buffer + * \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must + * remain valid until isolate shutdown. + * \param flags Pointer to VM specific flags or NULL for default flags. + * \param isolate_group_data Embedder group data. This data can be obtained + * by calling Dart_IsolateGroupData and will be passed to the + * Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and + * Dart_IsolateGroupCleanupCallback. + * \param isolate_data Embedder data. This data will be passed to + * the Dart_IsolateGroupCreateCallback when new isolates are spawned from + * this parent isolate. + * \param error Returns NULL if creation is successful, an error message + * otherwise. The caller is responsible for calling free() on the error + * message. + * + * \return The new isolate on success, or NULL if isolate creation failed. + */ +DART_EXPORT Dart_Isolate +Dart_CreateIsolateGroupFromKernel(const char* script_uri, + const char* name, + const uint8_t* kernel_buffer, + intptr_t kernel_buffer_size, + Dart_IsolateFlags* flags, + void* isolate_group_data, + void* isolate_data, + char** error); +/** + * Shuts down the current isolate. After this call, the current isolate is NULL. + * Any current scopes created by Dart_EnterScope will be exited. Invokes the + * shutdown callback and any callbacks of remaining weak persistent handles. + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_ShutdownIsolate(); +/* TODO(turnidge): Document behavior when there is no current isolate. */ + +/** + * Returns the current isolate. Will return NULL if there is no + * current isolate. + */ +DART_EXPORT Dart_Isolate Dart_CurrentIsolate(); + +/** + * Returns the callback data associated with the current isolate. This + * data was set when the isolate got created or initialized. + */ +DART_EXPORT void* Dart_CurrentIsolateData(); + +/** + * Returns the callback data associated with the given isolate. This + * data was set when the isolate got created or initialized. + */ +DART_EXPORT void* Dart_IsolateData(Dart_Isolate isolate); + +/** + * Returns the current isolate group. Will return NULL if there is no + * current isolate group. + */ +DART_EXPORT Dart_IsolateGroup Dart_CurrentIsolateGroup(); + +/** + * Returns the callback data associated with the current isolate group. This + * data was passed to the isolate group when it was created. + */ +DART_EXPORT void* Dart_CurrentIsolateGroupData(); + +/** + * Returns the callback data associated with the specified isolate group. This + * data was passed to the isolate when it was created. + * The embedder is responsible for ensuring the consistency of this data + * with respect to the lifecycle of an isolate group. + */ +DART_EXPORT void* Dart_IsolateGroupData(Dart_Isolate isolate); + +/** + * Returns the debugging name for the current isolate. + * + * This name is unique to each isolate and should only be used to make + * debugging messages more comprehensible. + */ +DART_EXPORT Dart_Handle Dart_DebugName(); + +/** + * Returns the ID for an isolate which is used to query the service protocol. + * + * It is the responsibility of the caller to free the returned ID. + */ +DART_EXPORT const char* Dart_IsolateServiceId(Dart_Isolate isolate); + +/** + * Enters an isolate. After calling this function, + * the current isolate will be set to the provided isolate. + * + * Requires there to be no current isolate. Multiple threads may not be in + * the same isolate at once. + */ +DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate); + +/** + * Kills the given isolate. + * + * This function has the same effect as dart:isolate's + * Isolate.kill(priority:immediate). + * It can interrupt ordinary Dart code but not native code. If the isolate is + * in the middle of a long running native function, the isolate will not be + * killed until control returns to Dart. + * + * Does not require a current isolate. It is safe to kill the current isolate if + * there is one. + */ +DART_EXPORT void Dart_KillIsolate(Dart_Isolate isolate); + +/** + * Notifies the VM that the embedder expects |size| bytes of memory have become + * unreachable. The VM may use this hint to adjust the garbage collector's + * growth policy. + * + * Multiple calls are interpreted as increasing, not replacing, the estimate of + * unreachable memory. + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_HintFreed(intptr_t size); + +/** + * Notifies the VM that the embedder expects to be idle until |deadline|. The VM + * may use this time to perform garbage collection or other tasks to avoid + * delays during execution of Dart code in the future. + * + * |deadline| is measured in microseconds against the system's monotonic time. + * This clock can be accessed via Dart_TimelineGetMicros(). + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_NotifyIdle(int64_t deadline); + +/** + * Notifies the VM that the system is running low on memory. + * + * Does not require a current isolate. Only valid after calling Dart_Initialize. + */ +DART_EXPORT void Dart_NotifyLowMemory(); + +/** + * Starts the CPU sampling profiler. + */ +DART_EXPORT void Dart_StartProfiling(); + +/** + * Stops the CPU sampling profiler. + * + * Note that some profile samples might still be taken after this fucntion + * returns due to the asynchronous nature of the implementation on some + * platforms. + */ +DART_EXPORT void Dart_StopProfiling(); + +/** + * Notifies the VM that the current thread should not be profiled until a + * matching call to Dart_ThreadEnableProfiling is made. + * + * NOTE: By default, if a thread has entered an isolate it will be profiled. + * This function should be used when an embedder knows a thread is about + * to make a blocking call and wants to avoid unnecessary interrupts by + * the profiler. + */ +DART_EXPORT void Dart_ThreadDisableProfiling(); + +/** + * Notifies the VM that the current thread should be profiled. + * + * NOTE: It is only legal to call this function *after* calling + * Dart_ThreadDisableProfiling. + * + * NOTE: By default, if a thread has entered an isolate it will be profiled. + */ +DART_EXPORT void Dart_ThreadEnableProfiling(); + +/** + * Register symbol information for the Dart VM's profiler and crash dumps. + * + * This consumes the output of //topaz/runtime/dart/profiler_symbols, which + * should be treated as opaque. + */ +DART_EXPORT void Dart_AddSymbols(const char* dso_name, + void* buffer, + intptr_t buffer_size); + +/** + * Exits an isolate. After this call, Dart_CurrentIsolate will + * return NULL. + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_ExitIsolate(); +/* TODO(turnidge): We don't want users of the api to be able to exit a + * "pure" dart isolate. Implement and document. */ + +/** + * Creates a full snapshot of the current isolate heap. + * + * A full snapshot is a compact representation of the dart vm isolate heap + * and dart isolate heap states. These snapshots are used to initialize + * the vm isolate on startup and fast initialization of an isolate. + * A Snapshot of the heap is created before any dart code has executed. + * + * Requires there to be a current isolate. Not available in the precompiled + * runtime (check Dart_IsPrecompiledRuntime). + * + * \param buffer Returns a pointer to a buffer containing the + * snapshot. This buffer is scope allocated and is only valid + * until the next call to Dart_ExitScope. + * \param size Returns the size of the buffer. + * \param is_core Create a snapshot containing core libraries. + * Such snapshot should be agnostic to null safety mode. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateSnapshot(uint8_t** vm_snapshot_data_buffer, + intptr_t* vm_snapshot_data_size, + uint8_t** isolate_snapshot_data_buffer, + intptr_t* isolate_snapshot_data_size, + bool is_core); + +/** + * Returns whether the buffer contains a kernel file. + * + * \param buffer Pointer to a buffer that might contain a kernel binary. + * \param buffer_size Size of the buffer. + * + * \return Whether the buffer contains a kernel binary (full or partial). + */ +DART_EXPORT bool Dart_IsKernel(const uint8_t* buffer, intptr_t buffer_size); + +/** + * Make isolate runnable. + * + * When isolates are spawned, this function is used to indicate that + * the creation and initialization (including script loading) of the + * isolate is complete and the isolate can start. + * This function expects there to be no current isolate. + * + * \param isolate The isolate to be made runnable. + * + * \return NULL if successful. Returns an error message otherwise. The caller + * is responsible for freeing the error message. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_IsolateMakeRunnable( + Dart_Isolate isolate); + +/* + * ================== + * Messages and Ports + * ================== + */ + +/** + * A port is used to send or receive inter-isolate messages + */ +typedef int64_t Dart_Port; + +/** + * ILLEGAL_PORT is a port number guaranteed never to be associated with a valid + * port. + */ +#define ILLEGAL_PORT ((Dart_Port)0) + +/** + * A message notification callback. + * + * This callback allows the embedder to provide an alternate wakeup + * mechanism for the delivery of inter-isolate messages. It is the + * responsibility of the embedder to call Dart_HandleMessage to + * process the message. + */ +typedef void (*Dart_MessageNotifyCallback)(Dart_Isolate dest_isolate); + +/** + * Allows embedders to provide an alternative wakeup mechanism for the + * delivery of inter-isolate messages. This setting only applies to + * the current isolate. + * + * Most embedders will only call this function once, before isolate + * execution begins. If this function is called after isolate + * execution begins, the embedder is responsible for threading issues. + */ +DART_EXPORT void Dart_SetMessageNotifyCallback( + Dart_MessageNotifyCallback message_notify_callback); +/* TODO(turnidge): Consider moving this to isolate creation so that it + * is impossible to mess up. */ + +/** + * Query the current message notify callback for the isolate. + * + * \return The current message notify callback for the isolate. + */ +DART_EXPORT Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback(); + +/** + * The VM's default message handler supports pausing an isolate before it + * processes the first message and right after the it processes the isolate's + * final message. This can be controlled for all isolates by two VM flags: + * + * `--pause-isolates-on-start` + * `--pause-isolates-on-exit` + * + * Additionally, Dart_SetShouldPauseOnStart and Dart_SetShouldPauseOnExit can be + * used to control this behaviour on a per-isolate basis. + * + * When an embedder is using a Dart_MessageNotifyCallback the embedder + * needs to cooperate with the VM so that the service protocol can report + * accurate information about isolates and so that tools such as debuggers + * work reliably. + * + * The following functions can be used to implement pausing on start and exit. + */ + +/** + * If the VM flag `--pause-isolates-on-start` was passed this will be true. + * + * \return A boolean value indicating if pause on start was requested. + */ +DART_EXPORT bool Dart_ShouldPauseOnStart(); + +/** + * Override the VM flag `--pause-isolates-on-start` for the current isolate. + * + * \param should_pause Should the isolate be paused on start? + * + * NOTE: This must be called before Dart_IsolateMakeRunnable. + */ +DART_EXPORT void Dart_SetShouldPauseOnStart(bool should_pause); + +/** + * Is the current isolate paused on start? + * + * \return A boolean value indicating if the isolate is paused on start. + */ +DART_EXPORT bool Dart_IsPausedOnStart(); + +/** + * Called when the embedder has paused the current isolate on start and when + * the embedder has resumed the isolate. + * + * \param paused Is the isolate paused on start? + */ +DART_EXPORT void Dart_SetPausedOnStart(bool paused); + +/** + * If the VM flag `--pause-isolates-on-exit` was passed this will be true. + * + * \return A boolean value indicating if pause on exit was requested. + */ +DART_EXPORT bool Dart_ShouldPauseOnExit(); + +/** + * Override the VM flag `--pause-isolates-on-exit` for the current isolate. + * + * \param should_pause Should the isolate be paused on exit? + * + */ +DART_EXPORT void Dart_SetShouldPauseOnExit(bool should_pause); + +/** + * Is the current isolate paused on exit? + * + * \return A boolean value indicating if the isolate is paused on exit. + */ +DART_EXPORT bool Dart_IsPausedOnExit(); + +/** + * Called when the embedder has paused the current isolate on exit and when + * the embedder has resumed the isolate. + * + * \param paused Is the isolate paused on exit? + */ +DART_EXPORT void Dart_SetPausedOnExit(bool paused); + +/** + * Called when the embedder has caught a top level unhandled exception error + * in the current isolate. + * + * NOTE: It is illegal to call this twice on the same isolate without first + * clearing the sticky error to null. + * + * \param error The unhandled exception error. + */ +DART_EXPORT void Dart_SetStickyError(Dart_Handle error); + +/** + * Does the current isolate have a sticky error? + */ +DART_EXPORT bool Dart_HasStickyError(); + +/** + * Gets the sticky error for the current isolate. + * + * \return A handle to the sticky error object or null. + */ +DART_EXPORT Dart_Handle Dart_GetStickyError(); + +/** + * Handles the next pending message for the current isolate. + * + * May generate an unhandled exception error. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_HandleMessage(); + +/** + * Drains the microtask queue, then blocks the calling thread until the current + * isolate recieves a message, then handles all messages. + * + * \param timeout_millis When non-zero, the call returns after the indicated + number of milliseconds even if no message was received. + * \return A valid handle if no error occurs, otherwise an error handle. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_WaitForEvent(int64_t timeout_millis); + +/** + * Handles any pending messages for the vm service for the current + * isolate. + * + * This function may be used by an embedder at a breakpoint to avoid + * pausing the vm service. + * + * This function can indirectly cause the message notify callback to + * be called. + * + * \return true if the vm service requests the program resume + * execution, false otherwise + */ +DART_EXPORT bool Dart_HandleServiceMessages(); + +/** + * Does the current isolate have pending service messages? + * + * \return true if the isolate has pending service messages, false otherwise. + */ +DART_EXPORT bool Dart_HasServiceMessages(); + +/** + * Processes any incoming messages for the current isolate. + * + * This function may only be used when the embedder has not provided + * an alternate message delivery mechanism with + * Dart_SetMessageCallbacks. It is provided for convenience. + * + * This function waits for incoming messages for the current + * isolate. As new messages arrive, they are handled using + * Dart_HandleMessage. The routine exits when all ports to the + * current isolate are closed. + * + * \return A valid handle if the run loop exited successfully. If an + * exception or other error occurs while processing messages, an + * error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_RunLoop(); + +/** + * Lets the VM run message processing for the isolate. + * + * This function expects there to a current isolate and the current isolate + * must not have an active api scope. The VM will take care of making the + * isolate runnable (if not already), handles its message loop and will take + * care of shutting the isolate down once it's done. + * + * \param errors_are_fatal Whether uncaught errors should be fatal. + * \param on_error_port A port to notify on uncaught errors (or ILLEGAL_PORT). + * \param on_exit_port A port to notify on exit (or ILLEGAL_PORT). + * \param error A non-NULL pointer which will hold an error message if the call + * fails. The error has to be free()ed by the caller. + * + * \return If successfull the VM takes owernship of the isolate and takes care + * of its message loop. If not successful the caller retains owernship of the + * isolate. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT bool Dart_RunLoopAsync( + bool errors_are_fatal, + Dart_Port on_error_port, + Dart_Port on_exit_port, + char** error); + +/* TODO(turnidge): Should this be removed from the public api? */ + +/** + * Gets the main port id for the current isolate. + */ +DART_EXPORT Dart_Port Dart_GetMainPortId(); + +/** + * Does the current isolate have live ReceivePorts? + * + * A ReceivePort is live when it has not been closed. + */ +DART_EXPORT bool Dart_HasLivePorts(); + +/** + * Posts a message for some isolate. The message is a serialized + * object. + * + * Requires there to be a current isolate. + * + * \param port The destination port. + * \param object An object from the current isolate. + * + * \return True if the message was posted. + */ +DART_EXPORT bool Dart_Post(Dart_Port port_id, Dart_Handle object); + +/** + * Returns a new SendPort with the provided port id. + * + * \param port_id The destination port. + * + * \return A new SendPort if no errors occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewSendPort(Dart_Port port_id); + +/** + * Gets the SendPort id for the provided SendPort. + * \param port A SendPort object whose id is desired. + * \param port_id Returns the id of the SendPort. + * \return Success if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_SendPortGetId(Dart_Handle port, + Dart_Port* port_id); + +/* + * ====== + * Scopes + * ====== + */ + +/** + * Enters a new scope. + * + * All new local handles will be created in this scope. Additionally, + * some functions may return "scope allocated" memory which is only + * valid within this scope. + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_EnterScope(); + +/** + * Exits a scope. + * + * The previous scope (if any) becomes the current scope. + * + * Requires there to be a current isolate. + */ +DART_EXPORT void Dart_ExitScope(); + +/** + * The Dart VM uses "zone allocation" for temporary structures. Zones + * support very fast allocation of small chunks of memory. The chunks + * cannot be deallocated individually, but instead zones support + * deallocating all chunks in one fast operation. + * + * This function makes it possible for the embedder to allocate + * temporary data in the VMs zone allocator. + * + * Zone allocation is possible: + * 1. when inside a scope where local handles can be allocated + * 2. when processing a message from a native port in a native port + * handler + * + * All the memory allocated this way will be reclaimed either on the + * next call to Dart_ExitScope or when the native port handler exits. + * + * \param size Size of the memory to allocate. + * + * \return A pointer to the allocated memory. NULL if allocation + * failed. Failure might due to is no current VM zone. + */ +DART_EXPORT uint8_t* Dart_ScopeAllocate(intptr_t size); + +/* + * ======= + * Objects + * ======= + */ + +/** + * Returns the null object. + * + * \return A handle to the null object. + */ +DART_EXPORT Dart_Handle Dart_Null(); + +/** + * Is this object null? + */ +DART_EXPORT bool Dart_IsNull(Dart_Handle object); + +/** + * Returns the empty string object. + * + * \return A handle to the empty string object. + */ +DART_EXPORT Dart_Handle Dart_EmptyString(); + +/** + * Returns types that are not classes, and which therefore cannot be looked up + * as library members by Dart_GetType. + * + * \return A handle to the dynamic, void or Never type. + */ +DART_EXPORT Dart_Handle Dart_TypeDynamic(); +DART_EXPORT Dart_Handle Dart_TypeVoid(); +DART_EXPORT Dart_Handle Dart_TypeNever(); + +/** + * Checks if the two objects are equal. + * + * The result of the comparison is returned through the 'equal' + * parameter. The return value itself is used to indicate success or + * failure, not equality. + * + * May generate an unhandled exception error. + * + * \param obj1 An object to be compared. + * \param obj2 An object to be compared. + * \param equal Returns the result of the equality comparison. + * + * \return A valid handle if no error occurs during the comparison. + */ +DART_EXPORT Dart_Handle Dart_ObjectEquals(Dart_Handle obj1, + Dart_Handle obj2, + bool* equal); + +/** + * Is this object an instance of some type? + * + * The result of the test is returned through the 'instanceof' parameter. + * The return value itself is used to indicate success or failure. + * + * \param object An object. + * \param type A type. + * \param instanceof Return true if 'object' is an instance of type 'type'. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_ObjectIsType(Dart_Handle object, + Dart_Handle type, + bool* instanceof); + +/** + * Query object type. + * + * \param object Some Object. + * + * \return true if Object is of the specified type. + */ +DART_EXPORT bool Dart_IsInstance(Dart_Handle object); +DART_EXPORT bool Dart_IsNumber(Dart_Handle object); +DART_EXPORT bool Dart_IsInteger(Dart_Handle object); +DART_EXPORT bool Dart_IsDouble(Dart_Handle object); +DART_EXPORT bool Dart_IsBoolean(Dart_Handle object); +DART_EXPORT bool Dart_IsString(Dart_Handle object); +DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object); /* (ISO-8859-1) */ +DART_EXPORT bool Dart_IsExternalString(Dart_Handle object); +DART_EXPORT bool Dart_IsList(Dart_Handle object); +DART_EXPORT bool Dart_IsMap(Dart_Handle object); +DART_EXPORT bool Dart_IsLibrary(Dart_Handle object); +DART_EXPORT bool Dart_IsType(Dart_Handle handle); +DART_EXPORT bool Dart_IsFunction(Dart_Handle handle); +DART_EXPORT bool Dart_IsVariable(Dart_Handle handle); +DART_EXPORT bool Dart_IsTypeVariable(Dart_Handle handle); +DART_EXPORT bool Dart_IsClosure(Dart_Handle object); +DART_EXPORT bool Dart_IsTypedData(Dart_Handle object); +DART_EXPORT bool Dart_IsByteBuffer(Dart_Handle object); +DART_EXPORT bool Dart_IsFuture(Dart_Handle object); + +/* + * ========= + * Instances + * ========= + */ + +/* + * For the purposes of the embedding api, not all objects returned are + * Dart language objects. Within the api, we use the term 'Instance' + * to indicate handles which refer to true Dart language objects. + * + * TODO(turnidge): Reorganize the "Object" section above, pulling down + * any functions that more properly belong here. */ + +/** + * Gets the type of a Dart language object. + * + * \param instance Some Dart object. + * + * \return If no error occurs, the type is returned. Otherwise an + * error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_InstanceGetType(Dart_Handle instance); + +/** + * Returns the name for the provided class type. + * + * \return A valid string handle if no error occurs during the + * operation. + */ +DART_EXPORT Dart_Handle Dart_ClassName(Dart_Handle cls_type); + +/** + * Returns the name for the provided function or method. + * + * \return A valid string handle if no error occurs during the + * operation. + */ +DART_EXPORT Dart_Handle Dart_FunctionName(Dart_Handle function); + +/** + * Returns a handle to the owner of a function. + * + * The owner of an instance method or a static method is its defining + * class. The owner of a top-level function is its defining + * library. The owner of the function of a non-implicit closure is the + * function of the method or closure that defines the non-implicit + * closure. + * + * \return A valid handle to the owner of the function, or an error + * handle if the argument is not a valid handle to a function. + */ +DART_EXPORT Dart_Handle Dart_FunctionOwner(Dart_Handle function); + +/** + * Determines whether a function handle referes to a static function + * of method. + * + * For the purposes of the embedding API, a top-level function is + * implicitly declared static. + * + * \param function A handle to a function or method declaration. + * \param is_static Returns whether the function or method is declared static. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_FunctionIsStatic(Dart_Handle function, + bool* is_static); + +/** + * Is this object a closure resulting from a tear-off (closurized method)? + * + * Returns true for closures produced when an ordinary method is accessed + * through a getter call. Returns false otherwise, in particular for closures + * produced from local function declarations. + * + * \param object Some Object. + * + * \return true if Object is a tear-off. + */ +DART_EXPORT bool Dart_IsTearOff(Dart_Handle object); + +/** + * Retrieves the function of a closure. + * + * \return A handle to the function of the closure, or an error handle if the + * argument is not a closure. + */ +DART_EXPORT Dart_Handle Dart_ClosureFunction(Dart_Handle closure); + +/** + * Returns a handle to the library which contains class. + * + * \return A valid handle to the library with owns class, null if the class + * has no library or an error handle if the argument is not a valid handle + * to a class type. + */ +DART_EXPORT Dart_Handle Dart_ClassLibrary(Dart_Handle cls_type); + +/* + * ============================= + * Numbers, Integers and Doubles + * ============================= + */ + +/** + * Does this Integer fit into a 64-bit signed integer? + * + * \param integer An integer. + * \param fits Returns true if the integer fits into a 64-bit signed integer. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_IntegerFitsIntoInt64(Dart_Handle integer, + bool* fits); + +/** + * Does this Integer fit into a 64-bit unsigned integer? + * + * \param integer An integer. + * \param fits Returns true if the integer fits into a 64-bit unsigned integer. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_IntegerFitsIntoUint64(Dart_Handle integer, + bool* fits); + +/** + * Returns an Integer with the provided value. + * + * \param value The value of the integer. + * + * \return The Integer object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewInteger(int64_t value); + +/** + * Returns an Integer with the provided value. + * + * \param value The unsigned value of the integer. + * + * \return The Integer object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewIntegerFromUint64(uint64_t value); + +/** + * Returns an Integer with the provided value. + * + * \param value The value of the integer represented as a C string + * containing a hexadecimal number. + * + * \return The Integer object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewIntegerFromHexCString(const char* value); + +/** + * Gets the value of an Integer. + * + * The integer must fit into a 64-bit signed integer, otherwise an error occurs. + * + * \param integer An Integer. + * \param value Returns the value of the Integer. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_IntegerToInt64(Dart_Handle integer, + int64_t* value); + +/** + * Gets the value of an Integer. + * + * The integer must fit into a 64-bit unsigned integer, otherwise an + * error occurs. + * + * \param integer An Integer. + * \param value Returns the value of the Integer. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_IntegerToUint64(Dart_Handle integer, + uint64_t* value); + +/** + * Gets the value of an integer as a hexadecimal C string. + * + * \param integer An Integer. + * \param value Returns the value of the Integer as a hexadecimal C + * string. This C string is scope allocated and is only valid until + * the next call to Dart_ExitScope. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_IntegerToHexCString(Dart_Handle integer, + const char** value); + +/** + * Returns a Double with the provided value. + * + * \param value A double. + * + * \return The Double object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewDouble(double value); + +/** + * Gets the value of a Double + * + * \param double_obj A Double + * \param value Returns the value of the Double. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_DoubleValue(Dart_Handle double_obj, double* value); + +/** + * Returns a closure of static function 'function_name' in the class 'class_name' + * in the exported namespace of specified 'library'. + * + * \param library Library object + * \param cls_type Type object representing a Class + * \param function_name Name of the static function in the class + * + * \return A valid Dart instance if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_GetStaticMethodClosure(Dart_Handle library, + Dart_Handle cls_type, + Dart_Handle function_name); + +/* + * ======== + * Booleans + * ======== + */ + +/** + * Returns the True object. + * + * Requires there to be a current isolate. + * + * \return A handle to the True object. + */ +DART_EXPORT Dart_Handle Dart_True(); + +/** + * Returns the False object. + * + * Requires there to be a current isolate. + * + * \return A handle to the False object. + */ +DART_EXPORT Dart_Handle Dart_False(); + +/** + * Returns a Boolean with the provided value. + * + * \param value true or false. + * + * \return The Boolean object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewBoolean(bool value); + +/** + * Gets the value of a Boolean + * + * \param boolean_obj A Boolean + * \param value Returns the value of the Boolean. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_BooleanValue(Dart_Handle boolean_obj, bool* value); + +/* + * ======= + * Strings + * ======= + */ + +/** + * Gets the length of a String. + * + * \param str A String. + * \param length Returns the length of the String. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringLength(Dart_Handle str, intptr_t* length); + +/** + * Returns a String built from the provided C string + * (There is an implicit assumption that the C string passed in contains + * UTF-8 encoded characters and '\0' is considered as a termination + * character). + * + * \param value A C String + * + * \return The String object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewStringFromCString(const char* str); +/* TODO(turnidge): Document what happens when we run out of memory + * during this call. */ + +/** + * Returns a String built from an array of UTF-8 encoded characters. + * + * \param utf8_array An array of UTF-8 encoded characters. + * \param length The length of the codepoints array. + * + * \return The String object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewStringFromUTF8(const uint8_t* utf8_array, + intptr_t length); + +/** + * Returns a String built from an array of UTF-16 encoded characters. + * + * \param utf16_array An array of UTF-16 encoded characters. + * \param length The length of the codepoints array. + * + * \return The String object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewStringFromUTF16(const uint16_t* utf16_array, + intptr_t length); + +/** + * Returns a String built from an array of UTF-32 encoded characters. + * + * \param utf32_array An array of UTF-32 encoded characters. + * \param length The length of the codepoints array. + * + * \return The String object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewStringFromUTF32(const int32_t* utf32_array, + intptr_t length); + +/** + * Returns a String which references an external array of + * Latin-1 (ISO-8859-1) encoded characters. + * + * \param latin1_array Array of Latin-1 encoded characters. This must not move. + * \param length The length of the characters array. + * \param peer An external pointer to associate with this string. + * \param external_allocation_size The number of externally allocated + * bytes for peer. Used to inform the garbage collector. + * \param callback A callback to be called when this string is finalized. + * + * \return The String object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle +Dart_NewExternalLatin1String(const uint8_t* latin1_array, + intptr_t length, + void* peer, + intptr_t external_allocation_size, + Dart_HandleFinalizer callback); + +/** + * Returns a String which references an external array of UTF-16 encoded + * characters. + * + * \param utf16_array An array of UTF-16 encoded characters. This must not move. + * \param length The length of the characters array. + * \param peer An external pointer to associate with this string. + * \param external_allocation_size The number of externally allocated + * bytes for peer. Used to inform the garbage collector. + * \param callback A callback to be called when this string is finalized. + * + * \return The String object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle +Dart_NewExternalUTF16String(const uint16_t* utf16_array, + intptr_t length, + void* peer, + intptr_t external_allocation_size, + Dart_HandleFinalizer callback); + +/** + * Gets the C string representation of a String. + * (It is a sequence of UTF-8 encoded values with a '\0' termination.) + * + * \param str A string. + * \param cstr Returns the String represented as a C string. + * This C string is scope allocated and is only valid until + * the next call to Dart_ExitScope. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle str, + const char** cstr); + +/** + * Gets a UTF-8 encoded representation of a String. + * + * Any unpaired surrogate code points in the string will be converted as + * replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need + * to preserve unpaired surrogates, use the Dart_StringToUTF16 function. + * + * \param str A string. + * \param utf8_array Returns the String represented as UTF-8 code + * units. This UTF-8 array is scope allocated and is only valid + * until the next call to Dart_ExitScope. + * \param length Used to return the length of the array which was + * actually used. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringToUTF8(Dart_Handle str, + uint8_t** utf8_array, + intptr_t* length); + +/** + * Gets the data corresponding to the string object. This function returns + * the data only for Latin-1 (ISO-8859-1) string objects. For all other + * string objects it returns an error. + * + * \param str A string. + * \param latin1_array An array allocated by the caller, used to return + * the string data. + * \param length Used to pass in the length of the provided array. + * Used to return the length of the array which was actually used. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringToLatin1(Dart_Handle str, + uint8_t* latin1_array, + intptr_t* length); + +/** + * Gets the UTF-16 encoded representation of a string. + * + * \param str A string. + * \param utf16_array An array allocated by the caller, used to return + * the array of UTF-16 encoded characters. + * \param length Used to pass in the length of the provided array. + * Used to return the length of the array which was actually used. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringToUTF16(Dart_Handle str, + uint16_t* utf16_array, + intptr_t* length); + +/** + * Gets the storage size in bytes of a String. + * + * \param str A String. + * \param length Returns the storage size in bytes of the String. + * This is the size in bytes needed to store the String. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_StringStorageSize(Dart_Handle str, intptr_t* size); + +/** + * Retrieves some properties associated with a String. + * Properties retrieved are: + * - character size of the string (one or two byte) + * - length of the string + * - peer pointer of string if it is an external string. + * \param str A String. + * \param char_size Returns the character size of the String. + * \param str_len Returns the length of the String. + * \param peer Returns the peer pointer associated with the String or 0 if + * there is no peer pointer for it. + * \return Success if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_StringGetProperties(Dart_Handle str, + intptr_t* char_size, + intptr_t* str_len, + void** peer); + +/* + * ===== + * Lists + * ===== + */ + +/** + * Returns a List of the desired length. + * + * \param length The length of the list. + * + * \return The List object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewList(intptr_t length); + +typedef enum { + Dart_CoreType_Dynamic, + Dart_CoreType_Int, + Dart_CoreType_String, +} Dart_CoreType_Id; + +// TODO(bkonyi): convert this to use nullable types once NNBD is enabled. +/** + * Returns a List of the desired length with the desired legacy element type. + * + * \param element_type_id The type of elements of the list. + * \param length The length of the list. + * + * \return The List object if no error occurs. Otherwise returns an error + * handle. + */ +DART_EXPORT Dart_Handle Dart_NewListOf(Dart_CoreType_Id element_type_id, + intptr_t length); + +/** + * Returns a List of the desired length with the desired element type. + * + * \param element_type Handle to a nullable type object. E.g., from + * Dart_GetType or Dart_GetNullableType. + * + * \param length The length of the list. + * + * \return The List object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewListOfType(Dart_Handle element_type, + intptr_t length); + +/** + * Returns a List of the desired length with the desired element type, filled + * with the provided object. + * + * \param element_type Handle to a type object. E.g., from Dart_GetType. + * + * \param fill_object Handle to an object of type 'element_type' that will be + * used to populate the list. This parameter can only be Dart_Null() if the + * length of the list is 0 or 'element_type' is a nullable type. + * + * \param length The length of the list. + * + * \return The List object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewListOfTypeFilled(Dart_Handle element_type, + Dart_Handle fill_object, + intptr_t length); + +/** + * Gets the length of a List. + * + * May generate an unhandled exception error. + * + * \param list A List. + * \param length Returns the length of the List. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_ListLength(Dart_Handle list, intptr_t* length); + +/** + * Gets the Object at some index of a List. + * + * If the index is out of bounds, an error occurs. + * + * May generate an unhandled exception error. + * + * \param list A List. + * \param index A valid index into the List. + * + * \return The Object in the List at the specified index if no error + * occurs. Otherwise returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list, intptr_t index); + +/** +* Gets a range of Objects from a List. +* +* If any of the requested index values are out of bounds, an error occurs. +* +* May generate an unhandled exception error. +* +* \param list A List. +* \param offset The offset of the first item to get. +* \param length The number of items to get. +* \param result A pointer to fill with the objects. +* +* \return Success if no error occurs during the operation. +*/ +DART_EXPORT Dart_Handle Dart_ListGetRange(Dart_Handle list, + intptr_t offset, + intptr_t length, + Dart_Handle* result); + +/** + * Sets the Object at some index of a List. + * + * If the index is out of bounds, an error occurs. + * + * May generate an unhandled exception error. + * + * \param array A List. + * \param index A valid index into the List. + * \param value The Object to put in the List. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT Dart_Handle Dart_ListSetAt(Dart_Handle list, + intptr_t index, + Dart_Handle value); + +/** + * May generate an unhandled exception error. + */ +DART_EXPORT Dart_Handle Dart_ListGetAsBytes(Dart_Handle list, + intptr_t offset, + uint8_t* native_array, + intptr_t length); + +/** + * May generate an unhandled exception error. + */ +DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list, + intptr_t offset, + const uint8_t* native_array, + intptr_t length); + +/* + * ==== + * Maps + * ==== + */ + +/** + * Gets the Object at some key of a Map. + * + * May generate an unhandled exception error. + * + * \param map A Map. + * \param key An Object. + * + * \return The value in the map at the specified key, null if the map does not + * contain the key, or an error handle. + */ +DART_EXPORT Dart_Handle Dart_MapGetAt(Dart_Handle map, Dart_Handle key); + +/** + * Returns whether the Map contains a given key. + * + * May generate an unhandled exception error. + * + * \param map A Map. + * + * \return A handle on a boolean indicating whether map contains the key. + * Otherwise returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_MapContainsKey(Dart_Handle map, Dart_Handle key); + +/** + * Gets the list of keys of a Map. + * + * May generate an unhandled exception error. + * + * \param map A Map. + * + * \return The list of key Objects if no error occurs. Otherwise returns an + * error handle. + */ +DART_EXPORT Dart_Handle Dart_MapKeys(Dart_Handle map); + +/* + * ========== + * Typed Data + * ========== + */ + +typedef enum { + Dart_TypedData_kByteData = 0, + Dart_TypedData_kInt8, + Dart_TypedData_kUint8, + Dart_TypedData_kUint8Clamped, + Dart_TypedData_kInt16, + Dart_TypedData_kUint16, + Dart_TypedData_kInt32, + Dart_TypedData_kUint32, + Dart_TypedData_kInt64, + Dart_TypedData_kUint64, + Dart_TypedData_kFloat32, + Dart_TypedData_kFloat64, + Dart_TypedData_kInt32x4, + Dart_TypedData_kFloat32x4, + Dart_TypedData_kFloat64x2, + Dart_TypedData_kInvalid +} Dart_TypedData_Type; + +/** + * Return type if this object is a TypedData object. + * + * \return kInvalid if the object is not a TypedData object or the appropriate + * Dart_TypedData_Type. + */ +DART_EXPORT Dart_TypedData_Type Dart_GetTypeOfTypedData(Dart_Handle object); + +/** + * Return type if this object is an external TypedData object. + * + * \return kInvalid if the object is not an external TypedData object or + * the appropriate Dart_TypedData_Type. + */ +DART_EXPORT Dart_TypedData_Type +Dart_GetTypeOfExternalTypedData(Dart_Handle object); + +/** + * Returns a TypedData object of the desired length and type. + * + * \param type The type of the TypedData object. + * \param length The length of the TypedData object (length in type units). + * + * \return The TypedData object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewTypedData(Dart_TypedData_Type type, + intptr_t length); + +/** + * Returns a TypedData object which references an external data array. + * + * \param type The type of the data array. + * \param data A data array. This array must not move. + * \param length The length of the data array (length in type units). + * + * \return The TypedData object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewExternalTypedData(Dart_TypedData_Type type, + void* data, + intptr_t length); + +/** + * Returns a TypedData object which references an external data array. + * + * \param type The type of the data array. + * \param data A data array. This array must not move. + * \param length The length of the data array (length in type units). + * \param peer A pointer to a native object or NULL. This value is + * provided to callback when it is invoked. + * \param external_allocation_size The number of externally allocated + * bytes for peer. Used to inform the garbage collector. + * \param callback A function pointer that will be invoked sometime + * after the object is garbage collected, unless the handle has been deleted. + * A valid callback needs to be specified it cannot be NULL. + * + * \return The TypedData object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle +Dart_NewExternalTypedDataWithFinalizer(Dart_TypedData_Type type, + void* data, + intptr_t length, + void* peer, + intptr_t external_allocation_size, + Dart_HandleFinalizer callback); + +/** + * Returns a ByteBuffer object for the typed data. + * + * \param type_data The TypedData object. + * + * \return The ByteBuffer object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewByteBuffer(Dart_Handle typed_data); + +/** + * Acquires access to the internal data address of a TypedData object. + * + * \param object The typed data object whose internal data address is to + * be accessed. + * \param type The type of the object is returned here. + * \param data The internal data address is returned here. + * \param len Size of the typed array is returned here. + * + * Notes: + * When the internal address of the object is acquired any calls to a + * Dart API function that could potentially allocate an object or run + * any Dart code will return an error. + * + * Any Dart API functions for accessing the data should not be called + * before the corresponding release. In particular, the object should + * not be acquired again before its release. This leads to undefined + * behavior. + * + * \return Success if the internal data address is acquired successfully. + * Otherwise, returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_TypedDataAcquireData(Dart_Handle object, + Dart_TypedData_Type* type, + void** data, + intptr_t* len); + +/** + * Releases access to the internal data address that was acquired earlier using + * Dart_TypedDataAcquireData. + * + * \param object The typed data object whose internal data address is to be + * released. + * + * \return Success if the internal data address is released successfully. + * Otherwise, returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_TypedDataReleaseData(Dart_Handle object); + +/** + * Returns the TypedData object associated with the ByteBuffer object. + * + * \param byte_buffer The ByteBuffer object. + * + * \return The TypedData object if no error occurs. Otherwise returns + * an error handle. + */ +DART_EXPORT Dart_Handle Dart_GetDataFromByteBuffer(Dart_Handle byte_buffer); + +/* + * ============================================================ + * Invoking Constructors, Methods, Closures and Field accessors + * ============================================================ + */ + +/** + * Invokes a constructor, creating a new object. + * + * This function allows hidden constructors (constructors with leading + * underscores) to be called. + * + * \param type Type of object to be constructed. + * \param constructor_name The name of the constructor to invoke. Use + * Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. + * This name should not include the name of the class. + * \param number_of_arguments Size of the arguments array. + * \param arguments An array of arguments to the constructor. + * + * \return If the constructor is called and completes successfully, + * then the new object. If an error occurs during execution, then an + * error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_New(Dart_Handle type, + Dart_Handle constructor_name, + int number_of_arguments, + Dart_Handle* arguments); + +/** + * Allocate a new object without invoking a constructor. + * + * \param type The type of an object to be allocated. + * + * \return The new object. If an error occurs during execution, then an + * error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_Allocate(Dart_Handle type); + +/** + * Allocate a new object without invoking a constructor, and sets specified + * native fields. + * + * \param type The type of an object to be allocated. + * \param num_native_fields The number of native fields to set. + * \param native_fields An array containing the value of native fields. + * + * \return The new object. If an error occurs during execution, then an + * error handle is returned. + */ +DART_EXPORT Dart_Handle +Dart_AllocateWithNativeFields(Dart_Handle type, + intptr_t num_native_fields, + const intptr_t* native_fields); + +/** + * Invokes a method or function. + * + * The 'target' parameter may be an object, type, or library. If + * 'target' is an object, then this function will invoke an instance + * method. If 'target' is a type, then this function will invoke a + * static method. If 'target' is a library, then this function will + * invoke a top-level function from that library. + * NOTE: This API call cannot be used to invoke methods of a type object. + * + * This function ignores visibility (leading underscores in names). + * + * May generate an unhandled exception error. + * + * \param target An object, type, or library. + * \param name The name of the function or method to invoke. + * \param number_of_arguments Size of the arguments array. + * \param arguments An array of arguments to the function. + * + * \return If the function or method is called and completes + * successfully, then the return value is returned. If an error + * occurs during execution, then an error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_Invoke(Dart_Handle target, + Dart_Handle name, + int number_of_arguments, + Dart_Handle* arguments); +/* TODO(turnidge): Document how to invoke operators. */ + +/** + * Invokes a Closure with the given arguments. + * + * May generate an unhandled exception error. + * + * \return If no error occurs during execution, then the result of + * invoking the closure is returned. If an error occurs during + * execution, then an error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_InvokeClosure(Dart_Handle closure, + int number_of_arguments, + Dart_Handle* arguments); + +/** + * Invokes a Generative Constructor on an object that was previously + * allocated using Dart_Allocate/Dart_AllocateWithNativeFields. + * + * The 'target' parameter must be an object. + * + * This function ignores visibility (leading underscores in names). + * + * May generate an unhandled exception error. + * + * \param target An object. + * \param name The name of the constructor to invoke. + * Use Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. + * \param number_of_arguments Size of the arguments array. + * \param arguments An array of arguments to the function. + * + * \return If the constructor is called and completes + * successfully, then the object is returned. If an error + * occurs during execution, then an error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_InvokeConstructor(Dart_Handle object, + Dart_Handle name, + int number_of_arguments, + Dart_Handle* arguments); + +/** + * Gets the value of a field. + * + * The 'container' parameter may be an object, type, or library. If + * 'container' is an object, then this function will access an + * instance field. If 'container' is a type, then this function will + * access a static field. If 'container' is a library, then this + * function will access a top-level variable. + * NOTE: This API call cannot be used to access fields of a type object. + * + * This function ignores field visibility (leading underscores in names). + * + * May generate an unhandled exception error. + * + * \param container An object, type, or library. + * \param name A field name. + * + * \return If no error occurs, then the value of the field is + * returned. Otherwise an error handle is returned. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_GetField(Dart_Handle container, Dart_Handle name); + +/** + * Sets the value of a field. + * + * The 'container' parameter may actually be an object, type, or + * library. If 'container' is an object, then this function will + * access an instance field. If 'container' is a type, then this + * function will access a static field. If 'container' is a library, + * then this function will access a top-level variable. + * NOTE: This API call cannot be used to access fields of a type object. + * + * This function ignores field visibility (leading underscores in names). + * + * May generate an unhandled exception error. + * + * \param container An object, type, or library. + * \param name A field name. + * \param value The new field value. + * + * \return A valid handle if no error occurs. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_SetField(Dart_Handle container, Dart_Handle name, Dart_Handle value); + +/* + * ========== + * Exceptions + * ========== + */ + +/* + * TODO(turnidge): Remove these functions from the api and replace all + * uses with Dart_NewUnhandledExceptionError. */ + +/** + * Throws an exception. + * + * This function causes a Dart language exception to be thrown. This + * will proceed in the standard way, walking up Dart frames until an + * appropriate 'catch' block is found, executing 'finally' blocks, + * etc. + * + * If an error handle is passed into this function, the error is + * propagated immediately. See Dart_PropagateError for a discussion + * of error propagation. + * + * If successful, this function does not return. Note that this means + * that the destructors of any stack-allocated C++ objects will not be + * called. If there are no Dart frames on the stack, an error occurs. + * + * \return An error handle if the exception was not thrown. + * Otherwise the function does not return. + */ +DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception); + +/** + * Rethrows an exception. + * + * Rethrows an exception, unwinding all dart frames on the stack. If + * successful, this function does not return. Note that this means + * that the destructors of any stack-allocated C++ objects will not be + * called. If there are no Dart frames on the stack, an error occurs. + * + * \return An error handle if the exception was not thrown. + * Otherwise the function does not return. + */ +DART_EXPORT Dart_Handle Dart_ReThrowException(Dart_Handle exception, + Dart_Handle stacktrace); + +/* + * =========================== + * Native fields and functions + * =========================== + */ + +/** + * Gets the number of native instance fields in an object. + */ +DART_EXPORT Dart_Handle Dart_GetNativeInstanceFieldCount(Dart_Handle obj, + int* count); + +/** + * Gets the value of a native field. + * + * TODO(turnidge): Document. + */ +DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj, + int index, + intptr_t* value); + +/** + * Sets the value of a native field. + * + * TODO(turnidge): Document. + */ +DART_EXPORT Dart_Handle Dart_SetNativeInstanceField(Dart_Handle obj, + int index, + intptr_t value); + +/** + * The arguments to a native function. + * + * This object is passed to a native function to represent its + * arguments and return value. It allows access to the arguments to a + * native function by index. It also allows the return value of a + * native function to be set. + */ +typedef struct _Dart_NativeArguments* Dart_NativeArguments; + +/** + * Extracts current isolate group data from the native arguments structure. + */ +DART_EXPORT void* Dart_GetNativeIsolateGroupData(Dart_NativeArguments args); + +typedef enum { + Dart_NativeArgument_kBool = 0, + Dart_NativeArgument_kInt32, + Dart_NativeArgument_kUint32, + Dart_NativeArgument_kInt64, + Dart_NativeArgument_kUint64, + Dart_NativeArgument_kDouble, + Dart_NativeArgument_kString, + Dart_NativeArgument_kInstance, + Dart_NativeArgument_kNativeFields, +} Dart_NativeArgument_Type; + +typedef struct _Dart_NativeArgument_Descriptor { + uint8_t type; + uint8_t index; +} Dart_NativeArgument_Descriptor; + +typedef union _Dart_NativeArgument_Value { + bool as_bool; + int32_t as_int32; + uint32_t as_uint32; + int64_t as_int64; + uint64_t as_uint64; + double as_double; + struct { + Dart_Handle dart_str; + void* peer; + } as_string; + struct { + intptr_t num_fields; + intptr_t* values; + } as_native_fields; + Dart_Handle as_instance; +} Dart_NativeArgument_Value; + +enum { + kNativeArgNumberPos = 0, + kNativeArgNumberSize = 8, + kNativeArgTypePos = kNativeArgNumberPos + kNativeArgNumberSize, + kNativeArgTypeSize = 8, +}; + +#define BITMASK(size) ((1 << size) - 1) +#define DART_NATIVE_ARG_DESCRIPTOR(type, position) \ + (((type & BITMASK(kNativeArgTypeSize)) << kNativeArgTypePos) | \ + (position & BITMASK(kNativeArgNumberSize))) + +/** + * Gets the native arguments based on the types passed in and populates + * the passed arguments buffer with appropriate native values. + * + * \param args the Native arguments block passed into the native call. + * \param num_arguments length of argument descriptor array and argument + * values array passed in. + * \param arg_descriptors an array that describes the arguments that + * need to be retrieved. For each argument to be retrieved the descriptor + * contains the argument number (0, 1 etc.) and the argument type + * described using Dart_NativeArgument_Type, e.g: + * DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kBool, 1) indicates + * that the first argument is to be retrieved and it should be a boolean. + * \param arg_values array into which the native arguments need to be + * extracted into, the array is allocated by the caller (it could be + * stack allocated to avoid the malloc/free performance overhead). + * + * \return Success if all the arguments could be extracted correctly, + * returns an error handle if there were any errors while extracting the + * arguments (mismatched number of arguments, incorrect types, etc.). + */ +DART_EXPORT Dart_Handle +Dart_GetNativeArguments(Dart_NativeArguments args, + int num_arguments, + const Dart_NativeArgument_Descriptor* arg_descriptors, + Dart_NativeArgument_Value* arg_values); + +/** + * Gets the native argument at some index. + */ +DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, + int index); +/* TODO(turnidge): Specify the behavior of an out-of-bounds access. */ + +/** + * Gets the number of native arguments. + */ +DART_EXPORT int Dart_GetNativeArgumentCount(Dart_NativeArguments args); + +/** + * Gets all the native fields of the native argument at some index. + * \param args Native arguments structure. + * \param arg_index Index of the desired argument in the structure above. + * \param num_fields size of the intptr_t array 'field_values' passed in. + * \param field_values intptr_t array in which native field values are returned. + * \return Success if the native fields where copied in successfully. Otherwise + * returns an error handle. On success the native field values are copied + * into the 'field_values' array, if the argument at 'arg_index' is a + * null object then 0 is copied as the native field values into the + * 'field_values' array. + */ +DART_EXPORT Dart_Handle +Dart_GetNativeFieldsOfArgument(Dart_NativeArguments args, + int arg_index, + int num_fields, + intptr_t* field_values); + +/** + * Gets the native field of the receiver. + */ +DART_EXPORT Dart_Handle Dart_GetNativeReceiver(Dart_NativeArguments args, + intptr_t* value); + +/** + * Gets a string native argument at some index. + * \param args Native arguments structure. + * \param arg_index Index of the desired argument in the structure above. + * \param peer Returns the peer pointer if the string argument has one. + * \return Success if the string argument has a peer, if it does not + * have a peer then the String object is returned. Otherwise returns + * an error handle (argument is not a String object). + */ +DART_EXPORT Dart_Handle Dart_GetNativeStringArgument(Dart_NativeArguments args, + int arg_index, + void** peer); + +/** + * Gets an integer native argument at some index. + * \param args Native arguments structure. + * \param arg_index Index of the desired argument in the structure above. + * \param value Returns the integer value if the argument is an Integer. + * \return Success if no error occurs. Otherwise returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_GetNativeIntegerArgument(Dart_NativeArguments args, + int index, + int64_t* value); + +/** + * Gets a boolean native argument at some index. + * \param args Native arguments structure. + * \param arg_index Index of the desired argument in the structure above. + * \param value Returns the boolean value if the argument is a Boolean. + * \return Success if no error occurs. Otherwise returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_GetNativeBooleanArgument(Dart_NativeArguments args, + int index, + bool* value); + +/** + * Gets a double native argument at some index. + * \param args Native arguments structure. + * \param arg_index Index of the desired argument in the structure above. + * \param value Returns the double value if the argument is a double. + * \return Success if no error occurs. Otherwise returns an error handle. + */ +DART_EXPORT Dart_Handle Dart_GetNativeDoubleArgument(Dart_NativeArguments args, + int index, + double* value); + +/** + * Sets the return value for a native function. + * + * If retval is an Error handle, then error will be propagated once + * the native functions exits. See Dart_PropagateError for a + * discussion of how different types of errors are propagated. + */ +DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, + Dart_Handle retval); + +DART_EXPORT void Dart_SetWeakHandleReturnValue(Dart_NativeArguments args, + Dart_WeakPersistentHandle rval); + +DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args, + bool retval); + +DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args, + int64_t retval); + +DART_EXPORT void Dart_SetDoubleReturnValue(Dart_NativeArguments args, + double retval); + +/** + * A native function. + */ +typedef void (*Dart_NativeFunction)(Dart_NativeArguments arguments); + +/** + * Native entry resolution callback. + * + * For libraries and scripts which have native functions, the embedder + * can provide a native entry resolver. This callback is used to map a + * name/arity to a Dart_NativeFunction. If no function is found, the + * callback should return NULL. + * + * The parameters to the native resolver function are: + * \param name a Dart string which is the name of the native function. + * \param num_of_arguments is the number of arguments expected by the + * native function. + * \param auto_setup_scope is a boolean flag that can be set by the resolver + * to indicate if this function needs a Dart API scope (see Dart_EnterScope/ + * Dart_ExitScope) to be setup automatically by the VM before calling into + * the native function. By default most native functions would require this + * to be true but some light weight native functions which do not call back + * into the VM through the Dart API may not require a Dart scope to be + * setup automatically. + * + * \return A valid Dart_NativeFunction which resolves to a native entry point + * for the native function. + * + * See Dart_SetNativeResolver. + */ +typedef Dart_NativeFunction (*Dart_NativeEntryResolver)(Dart_Handle name, + int num_of_arguments, + bool* auto_setup_scope); +/* TODO(turnidge): Consider renaming to NativeFunctionResolver or + * NativeResolver. */ + +/** + * Native entry symbol lookup callback. + * + * For libraries and scripts which have native functions, the embedder + * can provide a callback for mapping a native entry to a symbol. This callback + * maps a native function entry PC to the native function name. If no native + * entry symbol can be found, the callback should return NULL. + * + * The parameters to the native reverse resolver function are: + * \param nf A Dart_NativeFunction. + * + * \return A const UTF-8 string containing the symbol name or NULL. + * + * See Dart_SetNativeResolver. + */ +typedef const uint8_t* (*Dart_NativeEntrySymbol)(Dart_NativeFunction nf); + +/** + * FFI Native C function pointer resolver callback. + * + * See Dart_SetFfiNativeResolver. + */ +typedef void* (*Dart_FfiNativeResolver)(const char* name, uintptr_t args_n); + +/* + * =========== + * Environment + * =========== + */ + +/** + * An environment lookup callback function. + * + * \param name The name of the value to lookup in the environment. + * + * \return A valid handle to a string if the name exists in the + * current environment or Dart_Null() if not. + */ +typedef Dart_Handle (*Dart_EnvironmentCallback)(Dart_Handle name); + +/** + * Sets the environment callback for the current isolate. This + * callback is used to lookup environment values by name in the + * current environment. This enables the embedder to supply values for + * the const constructors bool.fromEnvironment, int.fromEnvironment + * and String.fromEnvironment. + */ +DART_EXPORT Dart_Handle +Dart_SetEnvironmentCallback(Dart_EnvironmentCallback callback); + +/** + * Sets the callback used to resolve native functions for a library. + * + * \param library A library. + * \param resolver A native entry resolver. + * + * \return A valid handle if the native resolver was set successfully. + */ +DART_EXPORT Dart_Handle +Dart_SetNativeResolver(Dart_Handle library, + Dart_NativeEntryResolver resolver, + Dart_NativeEntrySymbol symbol); +/* TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? */ + +/** + * Returns the callback used to resolve native functions for a library. + * + * \param library A library. + * \param resolver a pointer to a Dart_NativeEntryResolver + * + * \return A valid handle if the library was found. + */ +DART_EXPORT Dart_Handle +Dart_GetNativeResolver(Dart_Handle library, Dart_NativeEntryResolver* resolver); + +/** + * Returns the callback used to resolve native function symbols for a library. + * + * \param library A library. + * \param resolver a pointer to a Dart_NativeEntrySymbol. + * + * \return A valid handle if the library was found. + */ +DART_EXPORT Dart_Handle Dart_GetNativeSymbol(Dart_Handle library, + Dart_NativeEntrySymbol* resolver); + +/** + * Sets the callback used to resolve FFI native functions for a library. + * The resolved functions are expected to be a C function pointer of the + * correct signature (as specified in the `@FfiNative()` function + * annotation in Dart code). + * + * NOTE: This is an experimental feature and might change in the future. + * + * \param library A library. + * \param resolver A native function resolver. + * + * \return A valid handle if the native resolver was set successfully. + */ +DART_EXPORT Dart_Handle +Dart_SetFfiNativeResolver(Dart_Handle library, Dart_FfiNativeResolver resolver); + +/* + * ===================== + * Scripts and Libraries + * ===================== + */ + +typedef enum { + Dart_kCanonicalizeUrl = 0, + Dart_kImportTag, + Dart_kKernelTag, +} Dart_LibraryTag; + +/** + * The library tag handler is a multi-purpose callback provided by the + * embedder to the Dart VM. The embedder implements the tag handler to + * provide the ability to load Dart scripts and imports. + * + * -- TAGS -- + * + * Dart_kCanonicalizeUrl + * + * This tag indicates that the embedder should canonicalize 'url' with + * respect to 'library'. For most embedders, the + * Dart_DefaultCanonicalizeUrl function is a sufficient implementation + * of this tag. The return value should be a string holding the + * canonicalized url. + * + * Dart_kImportTag + * + * This tag is used to load a library from IsolateMirror.loadUri. The embedder + * should call Dart_LoadLibraryFromKernel to provide the library to the VM. The + * return value should be an error or library (the result from + * Dart_LoadLibraryFromKernel). + * + * Dart_kKernelTag + * + * This tag is used to load the intermediate file (kernel) generated by + * the Dart front end. This tag is typically used when a 'hot-reload' + * of an application is needed and the VM is 'use dart front end' mode. + * The dart front end typically compiles all the scripts, imports and part + * files into one intermediate file hence we don't use the source/import or + * script tags. The return value should be an error or a TypedData containing + * the kernel bytes. + * + */ +typedef Dart_Handle (*Dart_LibraryTagHandler)( + Dart_LibraryTag tag, + Dart_Handle library_or_package_map_url, + Dart_Handle url); + +/** + * Sets library tag handler for the current isolate. This handler is + * used to handle the various tags encountered while loading libraries + * or scripts in the isolate. + * + * \param handler Handler code to be used for handling the various tags + * encountered while loading libraries or scripts in the isolate. + * + * \return If no error occurs, the handler is set for the isolate. + * Otherwise an error handle is returned. + * + * TODO(turnidge): Document. + */ +DART_EXPORT Dart_Handle +Dart_SetLibraryTagHandler(Dart_LibraryTagHandler handler); + +/** + * Handles deferred loading requests. When this handler is invoked, it should + * eventually load the deferred loading unit with the given id and call + * Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is + * recommended that the loading occur asynchronously, but it is permitted to + * call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the + * handler returns. + * + * If an error is returned, it will be propogated through + * `prefix.loadLibrary()`. This is useful for synchronous + * implementations, which must propogate any unwind errors from + * Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler + * should return a non-error such as `Dart_Null()`. + */ +typedef Dart_Handle (*Dart_DeferredLoadHandler)(intptr_t loading_unit_id); + +/** + * Sets the deferred load handler for the current isolate. This handler is + * used to handle loading deferred imports in an AppJIT or AppAOT program. + */ +DART_EXPORT Dart_Handle +Dart_SetDeferredLoadHandler(Dart_DeferredLoadHandler handler); + +/** + * Notifies the VM that a deferred load completed successfully. This function + * will eventually cause the corresponding `prefix.loadLibrary()` futures to + * complete. + * + * Requires the current isolate to be the same current isolate during the + * invocation of the Dart_DeferredLoadHandler. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_DeferredLoadComplete(intptr_t loading_unit_id, + const uint8_t* snapshot_data, + const uint8_t* snapshot_instructions); + +/** + * Notifies the VM that a deferred load failed. This function + * will eventually cause the corresponding `prefix.loadLibrary()` futures to + * complete with an error. + * + * If `transient` is true, future invocations of `prefix.loadLibrary()` will + * trigger new load requests. If false, futures invocation will complete with + * the same error. + * + * Requires the current isolate to be the same current isolate during the + * invocation of the Dart_DeferredLoadHandler. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_DeferredLoadCompleteError(intptr_t loading_unit_id, + const char* error_message, + bool transient); + +/** + * Canonicalizes a url with respect to some library. + * + * The url is resolved with respect to the library's url and some url + * normalizations are performed. + * + * This canonicalization function should be sufficient for most + * embedders to implement the Dart_kCanonicalizeUrl tag. + * + * \param base_url The base url relative to which the url is + * being resolved. + * \param url The url being resolved and canonicalized. This + * parameter is a string handle. + * + * \return If no error occurs, a String object is returned. Otherwise + * an error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_DefaultCanonicalizeUrl(Dart_Handle base_url, + Dart_Handle url); + +/** + * Loads the root library for the current isolate. + * + * Requires there to be no current root library. + * + * \param buffer A buffer which contains a kernel binary (see + * pkg/kernel/binary.md). Must remain valid until isolate group shutdown. + * \param buffer_size Length of the passed in buffer. + * + * \return A handle to the root library, or an error. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_LoadScriptFromKernel(const uint8_t* kernel_buffer, intptr_t kernel_size); + +/** + * Gets the library for the root script for the current isolate. + * + * If the root script has not yet been set for the current isolate, + * this function returns Dart_Null(). This function never returns an + * error handle. + * + * \return Returns the root Library for the current isolate or Dart_Null(). + */ +DART_EXPORT Dart_Handle Dart_RootLibrary(); + +/** + * Sets the root library for the current isolate. + * + * \return Returns an error handle if `library` is not a library handle. + */ +DART_EXPORT Dart_Handle Dart_SetRootLibrary(Dart_Handle library); + +/** + * Lookup or instantiate a legacy type by name and type arguments from a + * Library. + * + * \param library The library containing the class or interface. + * \param class_name The class name for the type. + * \param number_of_type_arguments Number of type arguments. + * For non parametric types the number of type arguments would be 0. + * \param type_arguments Pointer to an array of type arguments. + * For non parameteric types a NULL would be passed in for this argument. + * + * \return If no error occurs, the type is returned. + * Otherwise an error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_GetType(Dart_Handle library, + Dart_Handle class_name, + intptr_t number_of_type_arguments, + Dart_Handle* type_arguments); + +/** + * Lookup or instantiate a nullable type by name and type arguments from + * Library. + * + * \param library The library containing the class or interface. + * \param class_name The class name for the type. + * \param number_of_type_arguments Number of type arguments. + * For non parametric types the number of type arguments would be 0. + * \param type_arguments Pointer to an array of type arguments. + * For non parameteric types a NULL would be passed in for this argument. + * + * \return If no error occurs, the type is returned. + * Otherwise an error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_GetNullableType(Dart_Handle library, + Dart_Handle class_name, + intptr_t number_of_type_arguments, + Dart_Handle* type_arguments); + +/** + * Lookup or instantiate a non-nullable type by name and type arguments from + * Library. + * + * \param library The library containing the class or interface. + * \param class_name The class name for the type. + * \param number_of_type_arguments Number of type arguments. + * For non parametric types the number of type arguments would be 0. + * \param type_arguments Pointer to an array of type arguments. + * For non parameteric types a NULL would be passed in for this argument. + * + * \return If no error occurs, the type is returned. + * Otherwise an error handle is returned. + */ +DART_EXPORT Dart_Handle +Dart_GetNonNullableType(Dart_Handle library, + Dart_Handle class_name, + intptr_t number_of_type_arguments, + Dart_Handle* type_arguments); + +/** + * Creates a nullable version of the provided type. + * + * \param type The type to be converted to a nullable type. + * + * \return If no error occurs, a nullable type is returned. + * Otherwise an error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_TypeToNullableType(Dart_Handle type); + +/** + * Creates a non-nullable version of the provided type. + * + * \param type The type to be converted to a non-nullable type. + * + * \return If no error occurs, a non-nullable type is returned. + * Otherwise an error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_TypeToNonNullableType(Dart_Handle type); + +/** + * A type's nullability. + * + * \param type A Dart type. + * \param result An out parameter containing the result of the check. True if + * the type is of the specified nullability, false otherwise. + * + * \return Returns an error handle if type is not of type Type. + */ +DART_EXPORT Dart_Handle Dart_IsNullableType(Dart_Handle type, bool* result); +DART_EXPORT Dart_Handle Dart_IsNonNullableType(Dart_Handle type, bool* result); +DART_EXPORT Dart_Handle Dart_IsLegacyType(Dart_Handle type, bool* result); + +/** + * Lookup a class or interface by name from a Library. + * + * \param library The library containing the class or interface. + * \param class_name The name of the class or interface. + * + * \return If no error occurs, the class or interface is + * returned. Otherwise an error handle is returned. + */ +DART_EXPORT Dart_Handle Dart_GetClass(Dart_Handle library, + Dart_Handle class_name); +/* TODO(asiva): The above method needs to be removed once all uses + * of it are removed from the embedder code. */ + +/** + * Returns an import path to a Library, such as "file:///test.dart" or + * "dart:core". + */ +DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library); + +/** + * Returns a URL from which a Library was loaded. + */ +DART_EXPORT Dart_Handle Dart_LibraryResolvedUrl(Dart_Handle library); + +/** + * \return An array of libraries. + */ +DART_EXPORT Dart_Handle Dart_GetLoadedLibraries(); + +DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url); +/* TODO(turnidge): Consider returning Dart_Null() when the library is + * not found to distinguish that from a true error case. */ + +/** + * Report an loading error for the library. + * + * \param library The library that failed to load. + * \param error The Dart error instance containing the load error. + * + * \return If the VM handles the error, the return value is + * a null handle. If it doesn't handle the error, the error + * object is returned. + */ +DART_EXPORT Dart_Handle Dart_LibraryHandleError(Dart_Handle library, + Dart_Handle error); + +/** + * Called by the embedder to load a partial program. Does not set the root + * library. + * + * \param buffer A buffer which contains a kernel binary (see + * pkg/kernel/binary.md). Must remain valid until isolate shutdown. + * \param buffer_size Length of the passed in buffer. + * + * \return A handle to the main library of the compilation unit, or an error. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_LoadLibraryFromKernel(const uint8_t* kernel_buffer, + intptr_t kernel_buffer_size); + +/** + * Indicates that all outstanding load requests have been satisfied. + * This finalizes all the new classes loaded and optionally completes + * deferred library futures. + * + * Requires there to be a current isolate. + * + * \param complete_futures Specify true if all deferred library + * futures should be completed, false otherwise. + * + * \return Success if all classes have been finalized and deferred library + * futures are completed. Otherwise, returns an error. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_FinalizeLoading(bool complete_futures); + +/* + * ===== + * Peers + * ===== + */ + +/** + * The peer field is a lazily allocated field intended for storage of + * an uncommonly used values. Most instances types can have a peer + * field allocated. The exceptions are subtypes of Null, num, and + * bool. + */ + +/** + * Returns the value of peer field of 'object' in 'peer'. + * + * \param object An object. + * \param peer An out parameter that returns the value of the peer + * field. + * + * \return Returns an error if 'object' is a subtype of Null, num, or + * bool. + */ +DART_EXPORT Dart_Handle Dart_GetPeer(Dart_Handle object, void** peer); + +/** + * Sets the value of the peer field of 'object' to the value of + * 'peer'. + * + * \param object An object. + * \param peer A value to store in the peer field. + * + * \return Returns an error if 'object' is a subtype of Null, num, or + * bool. + */ +DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); + +/* + * ====== + * Kernel + * ====== + */ + +/** + * Experimental support for Dart to Kernel parser isolate. + * + * TODO(hausner): Document finalized interface. + * + */ + +// TODO(33433): Remove kernel service from the embedding API. + +typedef enum { + Dart_KernelCompilationStatus_Unknown = -1, + Dart_KernelCompilationStatus_Ok = 0, + Dart_KernelCompilationStatus_Error = 1, + Dart_KernelCompilationStatus_Crash = 2, + Dart_KernelCompilationStatus_MsgFailed = 3, +} Dart_KernelCompilationStatus; + +typedef struct { + Dart_KernelCompilationStatus status; + bool null_safety; + char* error; + uint8_t* kernel; + intptr_t kernel_size; +} Dart_KernelCompilationResult; + +typedef enum { + Dart_KernelCompilationVerbosityLevel_Error = 0, + Dart_KernelCompilationVerbosityLevel_Warning, + Dart_KernelCompilationVerbosityLevel_Info, + Dart_KernelCompilationVerbosityLevel_All, +} Dart_KernelCompilationVerbosityLevel; + +DART_EXPORT bool Dart_IsKernelIsolate(Dart_Isolate isolate); +DART_EXPORT bool Dart_KernelIsolateIsRunning(); +DART_EXPORT Dart_Port Dart_KernelPort(); + +/** + * Compiles the given `script_uri` to a kernel file. + * + * \param platform_kernel A buffer containing the kernel of the platform (e.g. + * `vm_platform_strong.dill`). The VM does not take ownership of this memory. + * + * \param platform_kernel_size The length of the platform_kernel buffer. + * + * \param snapshot_compile Set to `true` when the compilation is for a snapshot. + * This is used by the frontend to determine if compilation related information + * should be printed to console (e.g., null safety mode). + * + * \param verbosity Specifies the logging behavior of the kernel compilation + * service. + * + * \return Returns the result of the compilation. + * + * On a successful compilation the returned [Dart_KernelCompilationResult] has + * a status of [Dart_KernelCompilationStatus_Ok] and the `kernel`/`kernel_size` + * fields are set. The caller takes ownership of the malloc()ed buffer. + * + * On a failed compilation the `error` might be set describing the reason for + * the failed compilation. The caller takes ownership of the malloc()ed + * error. + * + * Requires there to be a current isolate. + */ +DART_EXPORT Dart_KernelCompilationResult +Dart_CompileToKernel(const char* script_uri, + const uint8_t* platform_kernel, + const intptr_t platform_kernel_size, + bool incremental_compile, + bool snapshot_compile, + const char* package_config, + Dart_KernelCompilationVerbosityLevel verbosity); + +typedef struct { + const char* uri; + const char* source; +} Dart_SourceFile; + +DART_EXPORT Dart_KernelCompilationResult Dart_KernelListDependencies(); + +/** + * Sets the kernel buffer which will be used to load Dart SDK sources + * dynamically at runtime. + * + * \param platform_kernel A buffer containing kernel which has sources for the + * Dart SDK populated. Note: The VM does not take ownership of this memory. + * + * \param platform_kernel_size The length of the platform_kernel buffer. + */ +DART_EXPORT void Dart_SetDartLibrarySourcesKernel( + const uint8_t* platform_kernel, + const intptr_t platform_kernel_size); + +/** + * Detect the null safety opt-in status. + * + * When running from source, it is based on the opt-in status of `script_uri`. + * When running from a kernel buffer, it is based on the mode used when + * generating `kernel_buffer`. + * When running from an appJIT or AOT snapshot, it is based on the mode used + * when generating `snapshot_data`. + * + * \param script_uri Uri of the script that contains the source code + * + * \param package_config Uri of the package configuration file (either in format + * of .packages or .dart_tool/package_config.json) for the null safety + * detection to resolve package imports against. If this parameter is not + * passed the package resolution of the parent isolate should be used. + * + * \param original_working_directory current working directory when the VM + * process was launched, this is used to correctly resolve the path specified + * for package_config. + * + * \param snapshot_data + * + * \param snapshot_instructions Buffers containing a snapshot of the + * isolate or NULL if no snapshot is provided. If provided, the buffers must + * remain valid until the isolate shuts down. + * + * \param kernel_buffer + * + * \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must + * remain valid until isolate shutdown. + * + * \return Returns true if the null safety is opted in by the input being + * run `script_uri`, `snapshot_data` or `kernel_buffer`. + * + */ +DART_EXPORT bool Dart_DetectNullSafety(const char* script_uri, + const char* package_config, + const char* original_working_directory, + const uint8_t* snapshot_data, + const uint8_t* snapshot_instructions, + const uint8_t* kernel_buffer, + intptr_t kernel_buffer_size); + +#define DART_KERNEL_ISOLATE_NAME "kernel-service" + +/* + * ======= + * Service + * ======= + */ + +#define DART_VM_SERVICE_ISOLATE_NAME "vm-service" + +/** + * Returns true if isolate is the service isolate. + * + * \param isolate An isolate + * + * \return Returns true if 'isolate' is the service isolate. + */ +DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate); + +/** + * Writes the CPU profile to the timeline as a series of 'instant' events. + * + * Note that this is an expensive operation. + * + * \param main_port The main port of the Isolate whose profile samples to write. + * \param error An optional error, must be free()ed by caller. + * + * \return Returns true if the profile is successfully written and false + * otherwise. + */ +DART_EXPORT bool Dart_WriteProfileToTimeline(Dart_Port main_port, char** error); + +/* + * ============== + * Precompilation + * ============== + */ + +/** + * Compiles all functions reachable from entry points and marks + * the isolate to disallow future compilation. + * + * Entry points should be specified using `@pragma("vm:entry-point")` + * annotation. + * + * \return An error handle if a compilation error or runtime error running const + * constructors was encountered. + */ +DART_EXPORT Dart_Handle Dart_Precompile(); + +typedef void (*Dart_CreateLoadingUnitCallback)( + void* callback_data, + intptr_t loading_unit_id, + void** write_callback_data, + void** write_debug_callback_data); +typedef void (*Dart_StreamingWriteCallback)(void* callback_data, + const uint8_t* buffer, + intptr_t size); +typedef void (*Dart_StreamingCloseCallback)(void* callback_data); + +DART_EXPORT Dart_Handle Dart_LoadingUnitLibraryUris(intptr_t loading_unit_id); + +// On Darwin systems, 'dlsym' adds an '_' to the beginning of the symbol name. +// Use the '...CSymbol' definitions for resolving through 'dlsym'. The actual +// symbol names in the objects are given by the '...AsmSymbol' definitions. +#if defined(__APPLE__) +#define kSnapshotBuildIdCSymbol "kDartSnapshotBuildId" +#define kVmSnapshotDataCSymbol "kDartVmSnapshotData" +#define kVmSnapshotInstructionsCSymbol "kDartVmSnapshotInstructions" +#define kVmSnapshotBssCSymbol "kDartVmSnapshotBss" +#define kIsolateSnapshotDataCSymbol "kDartIsolateSnapshotData" +#define kIsolateSnapshotInstructionsCSymbol "kDartIsolateSnapshotInstructions" +#define kIsolateSnapshotBssCSymbol "kDartIsolateSnapshotBss" +#else +#define kSnapshotBuildIdCSymbol "_kDartSnapshotBuildId" +#define kVmSnapshotDataCSymbol "_kDartVmSnapshotData" +#define kVmSnapshotInstructionsCSymbol "_kDartVmSnapshotInstructions" +#define kVmSnapshotBssCSymbol "_kDartVmSnapshotBss" +#define kIsolateSnapshotDataCSymbol "_kDartIsolateSnapshotData" +#define kIsolateSnapshotInstructionsCSymbol "_kDartIsolateSnapshotInstructions" +#define kIsolateSnapshotBssCSymbol "_kDartIsolateSnapshotBss" +#endif + +#define kSnapshotBuildIdAsmSymbol "_kDartSnapshotBuildId" +#define kVmSnapshotDataAsmSymbol "_kDartVmSnapshotData" +#define kVmSnapshotInstructionsAsmSymbol "_kDartVmSnapshotInstructions" +#define kVmSnapshotBssAsmSymbol "_kDartVmSnapshotBss" +#define kIsolateSnapshotDataAsmSymbol "_kDartIsolateSnapshotData" +#define kIsolateSnapshotInstructionsAsmSymbol \ + "_kDartIsolateSnapshotInstructions" +#define kIsolateSnapshotBssAsmSymbol "_kDartIsolateSnapshotBss" + +/** + * Creates a precompiled snapshot. + * - A root library must have been loaded. + * - Dart_Precompile must have been called. + * + * Outputs an assembly file defining the symbols listed in the definitions + * above. + * + * The assembly should be compiled as a static or shared library and linked or + * loaded by the embedder. Running this snapshot requires a VM compiled with + * DART_PRECOMPILED_SNAPSHOT. The kDartVmSnapshotData and + * kDartVmSnapshotInstructions should be passed to Dart_Initialize. The + * kDartIsolateSnapshotData and kDartIsolateSnapshotInstructions should be + * passed to Dart_CreateIsolateGroup. + * + * The callback will be invoked one or more times to provide the assembly code. + * + * If stripped is true, then the assembly code will not include DWARF + * debugging sections. + * + * If debug_callback_data is provided, debug_callback_data will be used with + * the callback to provide separate debugging information. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateAppAOTSnapshotAsAssembly(Dart_StreamingWriteCallback callback, + void* callback_data, + bool stripped, + void* debug_callback_data); +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateAppAOTSnapshotAsAssemblies( + Dart_CreateLoadingUnitCallback next_callback, + void* next_callback_data, + bool stripped, + Dart_StreamingWriteCallback write_callback, + Dart_StreamingCloseCallback close_callback); + +/** + * Creates a precompiled snapshot. + * - A root library must have been loaded. + * - Dart_Precompile must have been called. + * + * Outputs an ELF shared library defining the symbols + * - _kDartVmSnapshotData + * - _kDartVmSnapshotInstructions + * - _kDartIsolateSnapshotData + * - _kDartIsolateSnapshotInstructions + * + * The shared library should be dynamically loaded by the embedder. + * Running this snapshot requires a VM compiled with DART_PRECOMPILED_SNAPSHOT. + * The kDartVmSnapshotData and kDartVmSnapshotInstructions should be passed to + * Dart_Initialize. The kDartIsolateSnapshotData and + * kDartIsolateSnapshotInstructions should be passed to Dart_CreateIsolate. + * + * The callback will be invoked one or more times to provide the binary output. + * + * If stripped is true, then the binary output will not include DWARF + * debugging sections. + * + * If debug_callback_data is provided, debug_callback_data will be used with + * the callback to provide separate debugging information. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateAppAOTSnapshotAsElf(Dart_StreamingWriteCallback callback, + void* callback_data, + bool stripped, + void* debug_callback_data); +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateAppAOTSnapshotAsElfs(Dart_CreateLoadingUnitCallback next_callback, + void* next_callback_data, + bool stripped, + Dart_StreamingWriteCallback write_callback, + Dart_StreamingCloseCallback close_callback); + +/** + * Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes + * kDartVmSnapshotData and kDartVmSnapshotInstructions. It also does + * not strip DWARF information from the generated assembly or allow for + * separate debug information. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateVMAOTSnapshotAsAssembly(Dart_StreamingWriteCallback callback, + void* callback_data); + +/** + * Sorts the class-ids in depth first traversal order of the inheritance + * tree. This is a costly operation, but it can make method dispatch + * more efficient and is done before writing snapshots. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_SortClasses(); + +/** + * Creates a snapshot that caches compiled code and type feedback for faster + * startup and quicker warmup in a subsequent process. + * + * Outputs a snapshot in two pieces. The pieces should be passed to + * Dart_CreateIsolateGroup in a VM using the same VM snapshot pieces used in the + * current VM. The instructions piece must be loaded with read and execute + * permissions; the data piece may be loaded as read-only. + * + * - Requires the VM to have not been started with --precompilation. + * - Not supported when targeting IA32. + * - The VM writing the snapshot and the VM reading the snapshot must be the + * same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must + * be targeting the same architecture, and must both be in checked mode or + * both in unchecked mode. + * + * The buffers are scope allocated and are only valid until the next call to + * Dart_ExitScope. + * + * \return A valid handle if no error occurs during the operation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateAppJITSnapshotAsBlobs(uint8_t** isolate_snapshot_data_buffer, + intptr_t* isolate_snapshot_data_size, + uint8_t** isolate_snapshot_instructions_buffer, + intptr_t* isolate_snapshot_instructions_size); + +/** + * Like Dart_CreateAppJITSnapshotAsBlobs, but also creates a new VM snapshot. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_CreateCoreJITSnapshotAsBlobs( + uint8_t** vm_snapshot_data_buffer, + intptr_t* vm_snapshot_data_size, + uint8_t** vm_snapshot_instructions_buffer, + intptr_t* vm_snapshot_instructions_size, + uint8_t** isolate_snapshot_data_buffer, + intptr_t* isolate_snapshot_data_size, + uint8_t** isolate_snapshot_instructions_buffer, + intptr_t* isolate_snapshot_instructions_size); + +/** + * Get obfuscation map for precompiled code. + * + * Obfuscation map is encoded as a JSON array of pairs (original name, + * obfuscated name). + * + * \return Returns an error handler if the VM was built in a mode that does not + * support obfuscation. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle +Dart_GetObfuscationMap(uint8_t** buffer, intptr_t* buffer_length); + +/** + * Returns whether the VM only supports running from precompiled snapshots and + * not from any other kind of snapshot or from source (that is, the VM was + * compiled with DART_PRECOMPILED_RUNTIME). + */ +DART_EXPORT bool Dart_IsPrecompiledRuntime(); + +/** + * Print a native stack trace. Used for crash handling. + * + * If context is NULL, prints the current stack trace. Otherwise, context + * should be a CONTEXT* (Windows) or ucontext_t* (POSIX) from a signal handler + * running on the current thread. + */ +DART_EXPORT void Dart_DumpNativeStackTrace(void* context); + +/** + * Indicate that the process is about to abort, and the Dart VM should not + * attempt to cleanup resources. + */ +DART_EXPORT void Dart_PrepareToAbort(); + +#endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ diff --git a/pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.c b/pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.c new file mode 100644 index 0000000000..c4a68f4449 --- /dev/null +++ b/pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.c @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#include "dart_api_dl.h" /* NOLINT */ +#include "dart_version.h" /* NOLINT */ +#include "internal/dart_api_dl_impl.h" /* NOLINT */ + +#include + +#define DART_API_DL_DEFINITIONS(name, R, A) name##_Type name##_DL = NULL; + +DART_API_ALL_DL_SYMBOLS(DART_API_DL_DEFINITIONS) + +#undef DART_API_DL_DEFINITIONS + +typedef void* DartApiEntry_function; + +DartApiEntry_function FindFunctionPointer(const DartApiEntry* entries, + const char* name) { + while (entries->name != NULL) { + if (strcmp(entries->name, name) == 0) return entries->function; + entries++; + } + return NULL; +} + +intptr_t Dart_InitializeApiDL(void* data) { + DartApi* dart_api_data = (DartApi*)data; + + if (dart_api_data->major != DART_API_DL_MAJOR_VERSION) { + // If the DartVM we're running on does not have the same version as this + // file was compiled against, refuse to initialize. The symbols are not + // compatible. + return -1; + } + // Minor versions are allowed to be different. + // If the DartVM has a higher minor version, it will provide more symbols + // than we initialize here. + // If the DartVM has a lower minor version, it will not provide all symbols. + // In that case, we leave the missing symbols un-initialized. Those symbols + // should not be used by the Dart and native code. The client is responsible + // for checking the minor version number himself based on which symbols it + // is using. + // (If we would error out on this case, recompiling native code against a + // newer SDK would break all uses on older SDKs, which is too strict.) + + const DartApiEntry* dart_api_function_pointers = dart_api_data->functions; + +#define DART_API_DL_INIT(name, R, A) \ + name##_DL = \ + (name##_Type)(FindFunctionPointer(dart_api_function_pointers, #name)); + DART_API_ALL_DL_SYMBOLS(DART_API_DL_INIT) +#undef DART_API_DL_INIT + + return 0; +} diff --git a/pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.h b/pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.h new file mode 100644 index 0000000000..62f48b63f6 --- /dev/null +++ b/pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.h @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_INCLUDE_DART_API_DL_H_ +#define RUNTIME_INCLUDE_DART_API_DL_H_ + +#include "dart_api.h" /* NOLINT */ +#include "dart_native_api.h" /* NOLINT */ + +/** \mainpage Dynamically Linked Dart API + * + * This exposes a subset of symbols from dart_api.h and dart_native_api.h + * available in every Dart embedder through dynamic linking. + * + * All symbols are postfixed with _DL to indicate that they are dynamically + * linked and to prevent conflicts with the original symbol. + * + * Link `dart_api_dl.c` file into your library and invoke + * `Dart_InitializeApiDL` with `NativeApi.initializeApiDLData`. + */ + +DART_EXPORT intptr_t Dart_InitializeApiDL(void* data); + +// ============================================================================ +// IMPORTANT! Never update these signatures without properly updating +// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. +// +// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types +// to trigger compile-time errors if the sybols in those files are updated +// without updating these. +// +// Function return and argument types, and typedefs are carbon copied. Structs +// are typechecked nominally in C/C++, so they are not copied, instead a +// comment is added to their definition. +typedef int64_t Dart_Port_DL; + +typedef void (*Dart_NativeMessageHandler_DL)(Dart_Port_DL dest_port_id, + Dart_CObject* message); + +// dart_native_api.h symbols can be called on any thread. +#define DART_NATIVE_API_DL_SYMBOLS(F) \ + /***** dart_native_api.h *****/ \ + /* Dart_Port */ \ + F(Dart_PostCObject, bool, (Dart_Port_DL port_id, Dart_CObject * message)) \ + F(Dart_PostInteger, bool, (Dart_Port_DL port_id, int64_t message)) \ + F(Dart_NewNativePort, Dart_Port_DL, \ + (const char* name, Dart_NativeMessageHandler_DL handler, \ + bool handle_concurrently)) \ + F(Dart_CloseNativePort, bool, (Dart_Port_DL native_port_id)) + +// dart_api.h symbols can only be called on Dart threads. +#define DART_API_DL_SYMBOLS(F) \ + /***** dart_api.h *****/ \ + /* Errors */ \ + F(Dart_IsError, bool, (Dart_Handle handle)) \ + F(Dart_IsApiError, bool, (Dart_Handle handle)) \ + F(Dart_IsUnhandledExceptionError, bool, (Dart_Handle handle)) \ + F(Dart_IsCompilationError, bool, (Dart_Handle handle)) \ + F(Dart_IsFatalError, bool, (Dart_Handle handle)) \ + F(Dart_GetError, const char*, (Dart_Handle handle)) \ + F(Dart_ErrorHasException, bool, (Dart_Handle handle)) \ + F(Dart_ErrorGetException, Dart_Handle, (Dart_Handle handle)) \ + F(Dart_ErrorGetStackTrace, Dart_Handle, (Dart_Handle handle)) \ + F(Dart_NewApiError, Dart_Handle, (const char* error)) \ + F(Dart_NewCompilationError, Dart_Handle, (const char* error)) \ + F(Dart_NewUnhandledExceptionError, Dart_Handle, (Dart_Handle exception)) \ + F(Dart_PropagateError, void, (Dart_Handle handle)) \ + /* Dart_Handle, Dart_PersistentHandle, Dart_WeakPersistentHandle */ \ + F(Dart_HandleFromPersistent, Dart_Handle, (Dart_PersistentHandle object)) \ + F(Dart_HandleFromWeakPersistent, Dart_Handle, \ + (Dart_WeakPersistentHandle object)) \ + F(Dart_NewPersistentHandle, Dart_PersistentHandle, (Dart_Handle object)) \ + F(Dart_SetPersistentHandle, void, \ + (Dart_PersistentHandle obj1, Dart_Handle obj2)) \ + F(Dart_DeletePersistentHandle, void, (Dart_PersistentHandle object)) \ + F(Dart_NewWeakPersistentHandle, Dart_WeakPersistentHandle, \ + (Dart_Handle object, void* peer, intptr_t external_allocation_size, \ + Dart_HandleFinalizer callback)) \ + F(Dart_DeleteWeakPersistentHandle, void, (Dart_WeakPersistentHandle object)) \ + F(Dart_UpdateExternalSize, void, \ + (Dart_WeakPersistentHandle object, intptr_t external_allocation_size)) \ + F(Dart_NewFinalizableHandle, Dart_FinalizableHandle, \ + (Dart_Handle object, void* peer, intptr_t external_allocation_size, \ + Dart_HandleFinalizer callback)) \ + F(Dart_DeleteFinalizableHandle, void, \ + (Dart_FinalizableHandle object, Dart_Handle strong_ref_to_object)) \ + F(Dart_UpdateFinalizableExternalSize, void, \ + (Dart_FinalizableHandle object, Dart_Handle strong_ref_to_object, \ + intptr_t external_allocation_size)) \ + /* Dart_Port */ \ + F(Dart_Post, bool, (Dart_Port_DL port_id, Dart_Handle object)) \ + F(Dart_NewSendPort, Dart_Handle, (Dart_Port_DL port_id)) \ + F(Dart_SendPortGetId, Dart_Handle, \ + (Dart_Handle port, Dart_Port_DL * port_id)) \ + /* Scopes */ \ + F(Dart_EnterScope, void, ()) \ + F(Dart_ExitScope, void, ()) + +#define DART_API_ALL_DL_SYMBOLS(F) \ + DART_NATIVE_API_DL_SYMBOLS(F) \ + DART_API_DL_SYMBOLS(F) +// IMPORTANT! Never update these signatures without properly updating +// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. +// +// End of verbatim copy. +// ============================================================================ + +// Copy of definition of DART_EXPORT without 'used' attribute. +// +// The 'used' attribute cannot be used with DART_API_ALL_DL_SYMBOLS because +// they are not function declarations, but variable declarations with a +// function pointer type. +// +// The function pointer variables are initialized with the addresses of the +// functions in the VM. If we were to use function declarations instead, we +// would need to forward the call to the VM adding indirection. +#if defined(__CYGWIN__) +#error Tool chain and platform not supported. +#elif defined(_WIN32) +#if defined(DART_SHARED_LIB) +#define DART_EXPORT_DL DART_EXTERN_C __declspec(dllexport) +#else +#define DART_EXPORT_DL DART_EXTERN_C +#endif +#else +#if __GNUC__ >= 4 +#if defined(DART_SHARED_LIB) +#define DART_EXPORT_DL DART_EXTERN_C __attribute__((visibility("default"))) +#else +#define DART_EXPORT_DL DART_EXTERN_C +#endif +#else +#error Tool chain not supported. +#endif +#endif + +#define DART_API_DL_DECLARATIONS(name, R, A) \ + typedef R(*name##_Type) A; \ + DART_EXPORT_DL name##_Type name##_DL; + +DART_API_ALL_DL_SYMBOLS(DART_API_DL_DECLARATIONS) + +#undef DART_API_DL_DECLARATIONS + +#undef DART_EXPORT_DL + +#endif /* RUNTIME_INCLUDE_DART_API_DL_H_ */ /* NOLINT */ \ No newline at end of file diff --git a/pkgs/cupertino_http/src/dart-sdk/include/dart_native_api.h b/pkgs/cupertino_http/src/dart-sdk/include/dart_native_api.h new file mode 100644 index 0000000000..f99fff1150 --- /dev/null +++ b/pkgs/cupertino_http/src/dart-sdk/include/dart_native_api.h @@ -0,0 +1,197 @@ +/* + * Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_INCLUDE_DART_NATIVE_API_H_ +#define RUNTIME_INCLUDE_DART_NATIVE_API_H_ + +#include "dart_api.h" /* NOLINT */ + +/* + * ========================================== + * Message sending/receiving from native code + * ========================================== + */ + +/** + * A Dart_CObject is used for representing Dart objects as native C + * data outside the Dart heap. These objects are totally detached from + * the Dart heap. Only a subset of the Dart objects have a + * representation as a Dart_CObject. + * + * The string encoding in the 'value.as_string' is UTF-8. + * + * All the different types from dart:typed_data are exposed as type + * kTypedData. The specific type from dart:typed_data is in the type + * field of the as_typed_data structure. The length in the + * as_typed_data structure is always in bytes. + * + * The data for kTypedData is copied on message send and ownership remains with + * the caller. The ownership of data for kExternalTyped is passed to the VM on + * message send and returned when the VM invokes the + * Dart_HandleFinalizer callback; a non-NULL callback must be provided. + */ +typedef enum { + Dart_CObject_kNull = 0, + Dart_CObject_kBool, + Dart_CObject_kInt32, + Dart_CObject_kInt64, + Dart_CObject_kDouble, + Dart_CObject_kString, + Dart_CObject_kArray, + Dart_CObject_kTypedData, + Dart_CObject_kExternalTypedData, + Dart_CObject_kSendPort, + Dart_CObject_kCapability, + Dart_CObject_kNativePointer, + Dart_CObject_kUnsupported, + Dart_CObject_kNumberOfTypes +} Dart_CObject_Type; + +typedef struct _Dart_CObject { + Dart_CObject_Type type; + union { + bool as_bool; + int32_t as_int32; + int64_t as_int64; + double as_double; + char* as_string; + struct { + Dart_Port id; + Dart_Port origin_id; + } as_send_port; + struct { + int64_t id; + } as_capability; + struct { + intptr_t length; + struct _Dart_CObject** values; + } as_array; + struct { + Dart_TypedData_Type type; + intptr_t length; /* in elements, not bytes */ + uint8_t* values; + } as_typed_data; + struct { + Dart_TypedData_Type type; + intptr_t length; /* in elements, not bytes */ + uint8_t* data; + void* peer; + Dart_HandleFinalizer callback; + } as_external_typed_data; + struct { + intptr_t ptr; + intptr_t size; + Dart_HandleFinalizer callback; + } as_native_pointer; + } value; +} Dart_CObject; +// This struct is versioned by DART_API_DL_MAJOR_VERSION, bump the version when +// changing this struct. + +/** + * Posts a message on some port. The message will contain the Dart_CObject + * object graph rooted in 'message'. + * + * While the message is being sent the state of the graph of Dart_CObject + * structures rooted in 'message' should not be accessed, as the message + * generation will make temporary modifications to the data. When the message + * has been sent the graph will be fully restored. + * + * If true is returned, the message was enqueued, and finalizers for external + * typed data will eventually run, even if the receiving isolate shuts down + * before processing the message. If false is returned, the message was not + * enqueued and ownership of external typed data in the message remains with the + * caller. + * + * This function may be called on any thread when the VM is running (that is, + * after Dart_Initialize has returned and before Dart_Cleanup has been called). + * + * \param port_id The destination port. + * \param message The message to send. + * + * \return True if the message was posted. + */ +DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message); + +/** + * Posts a message on some port. The message will contain the integer 'message'. + * + * \param port_id The destination port. + * \param message The message to send. + * + * \return True if the message was posted. + */ +DART_EXPORT bool Dart_PostInteger(Dart_Port port_id, int64_t message); + +/** + * A native message handler. + * + * This handler is associated with a native port by calling + * Dart_NewNativePort. + * + * The message received is decoded into the message structure. The + * lifetime of the message data is controlled by the caller. All the + * data references from the message are allocated by the caller and + * will be reclaimed when returning to it. + */ +typedef void (*Dart_NativeMessageHandler)(Dart_Port dest_port_id, + Dart_CObject* message); + +/** + * Creates a new native port. When messages are received on this + * native port, then they will be dispatched to the provided native + * message handler. + * + * \param name The name of this port in debugging messages. + * \param handler The C handler to run when messages arrive on the port. + * \param handle_concurrently Is it okay to process requests on this + * native port concurrently? + * + * \return If successful, returns the port id for the native port. In + * case of error, returns ILLEGAL_PORT. + */ +DART_EXPORT Dart_Port Dart_NewNativePort(const char* name, + Dart_NativeMessageHandler handler, + bool handle_concurrently); +/* TODO(turnidge): Currently handle_concurrently is ignored. */ + +/** + * Closes the native port with the given id. + * + * The port must have been allocated by a call to Dart_NewNativePort. + * + * \param native_port_id The id of the native port to close. + * + * \return Returns true if the port was closed successfully. + */ +DART_EXPORT bool Dart_CloseNativePort(Dart_Port native_port_id); + +/* + * ================== + * Verification Tools + * ================== + */ + +/** + * Forces all loaded classes and functions to be compiled eagerly in + * the current isolate.. + * + * TODO(turnidge): Document. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_CompileAll(); + +/** + * Finalizes all classes. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_FinalizeAllClasses(); + +/* This function is intentionally undocumented. + * + * It should not be used outside internal tests. + */ +DART_EXPORT void* Dart_ExecuteInternalCommand(const char* command, void* arg); + +#endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */ diff --git a/pkgs/cupertino_http/src/dart-sdk/include/dart_tools_api.h b/pkgs/cupertino_http/src/dart-sdk/include/dart_tools_api.h new file mode 100644 index 0000000000..f36ec6b561 --- /dev/null +++ b/pkgs/cupertino_http/src/dart-sdk/include/dart_tools_api.h @@ -0,0 +1,526 @@ +// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#ifndef RUNTIME_INCLUDE_DART_TOOLS_API_H_ +#define RUNTIME_INCLUDE_DART_TOOLS_API_H_ + +#include "dart_api.h" /* NOLINT */ + +/** \mainpage Dart Tools Embedding API Reference + * + * This reference describes the Dart embedding API for tools. Tools include + * a debugger, service protocol, and timeline. + * + * NOTE: The APIs described in this file are unstable and subject to change. + * + * This reference is generated from the header include/dart_tools_api.h. + */ + +/* + * ======== + * Debugger + * ======== + */ + +/** + * ILLEGAL_ISOLATE_ID is a number guaranteed never to be associated with a + * valid isolate. + */ +#define ILLEGAL_ISOLATE_ID ILLEGAL_PORT + + +/* + * ======= + * Service + * ======= + */ + +/** + * A service request callback function. + * + * These callbacks, registered by the embedder, are called when the VM receives + * a service request it can't handle and the service request command name + * matches one of the embedder registered handlers. + * + * The return value of the callback indicates whether the response + * should be used as a regular result or an error result. + * Specifically, if the callback returns true, a regular JSON-RPC + * response is built in the following way: + * + * { + * "jsonrpc": "2.0", + * "result": , + * "id": , + * } + * + * If the callback returns false, a JSON-RPC error is built like this: + * + * { + * "jsonrpc": "2.0", + * "error": , + * "id": , + * } + * + * \param method The rpc method name. + * \param param_keys Service requests can have key-value pair parameters. The + * keys and values are flattened and stored in arrays. + * \param param_values The values associated with the keys. + * \param num_params The length of the param_keys and param_values arrays. + * \param user_data The user_data pointer registered with this handler. + * \param result A C string containing a valid JSON object. The returned + * pointer will be freed by the VM by calling free. + * + * \return True if the result is a regular JSON-RPC response, false if the + * result is a JSON-RPC error. + */ +typedef bool (*Dart_ServiceRequestCallback)(const char* method, + const char** param_keys, + const char** param_values, + intptr_t num_params, + void* user_data, + const char** json_object); + +/** + * Register a Dart_ServiceRequestCallback to be called to handle + * requests for the named rpc on a specific isolate. The callback will + * be invoked with the current isolate set to the request target. + * + * \param method The name of the method that this callback is responsible for. + * \param callback The callback to invoke. + * \param user_data The user data passed to the callback. + * + * NOTE: If multiple callbacks with the same name are registered, only + * the last callback registered will be remembered. + */ +DART_EXPORT void Dart_RegisterIsolateServiceRequestCallback( + const char* method, + Dart_ServiceRequestCallback callback, + void* user_data); + +/** + * Register a Dart_ServiceRequestCallback to be called to handle + * requests for the named rpc. The callback will be invoked without a + * current isolate. + * + * \param method The name of the command that this callback is responsible for. + * \param callback The callback to invoke. + * \param user_data The user data passed to the callback. + * + * NOTE: If multiple callbacks with the same name are registered, only + * the last callback registered will be remembered. + */ +DART_EXPORT void Dart_RegisterRootServiceRequestCallback( + const char* method, + Dart_ServiceRequestCallback callback, + void* user_data); + +/** + * Embedder information which can be requested by the VM for internal or + * reporting purposes. + * + * The pointers in this structure are not going to be cached or freed by the VM. + */ + + #define DART_EMBEDDER_INFORMATION_CURRENT_VERSION (0x00000001) + +typedef struct { + int32_t version; + const char* name; // [optional] The name of the embedder + int64_t current_rss; // [optional] the current RSS of the embedder + int64_t max_rss; // [optional] the maximum RSS of the embedder +} Dart_EmbedderInformation; + +/** + * Callback provided by the embedder that is used by the vm to request + * information. + * + * \return Returns a pointer to a Dart_EmbedderInformation structure. + * The embedder keeps the ownership of the structure and any field in it. + * The embedder must ensure that the structure will remain valid until the + * next invokation of the callback. + */ +typedef void (*Dart_EmbedderInformationCallback)( + Dart_EmbedderInformation* info); + +/** + * Register a Dart_ServiceRequestCallback to be called to handle + * requests for the named rpc. The callback will be invoked without a + * current isolate. + * + * \param method The name of the command that this callback is responsible for. + * \param callback The callback to invoke. + * \param user_data The user data passed to the callback. + * + * NOTE: If multiple callbacks with the same name are registered, only + * the last callback registered will be remembered. + */ +DART_EXPORT void Dart_SetEmbedderInformationCallback( + Dart_EmbedderInformationCallback callback); + +/** + * Invoke a vm-service method and wait for its result. + * + * \param request_json The utf8-encoded json-rpc request. + * \param request_json_length The length of the json-rpc request. + * + * \param response_json The returned utf8-encoded json response, must be + * free()ed by caller. + * \param response_json_length The length of the returned json response. + * \param error An optional error, must be free()ed by caller. + * + * \return Whether the call was sucessfully performed. + * + * NOTE: This method does not need a current isolate and must not have the + * vm-isolate being the current isolate. It must be called after + * Dart_Initialize() and before Dart_Cleanup(). + */ +DART_EXPORT bool Dart_InvokeVMServiceMethod(uint8_t* request_json, + intptr_t request_json_length, + uint8_t** response_json, + intptr_t* response_json_length, + char** error); + +/* + * ======== + * Event Streams + * ======== + */ + +/** + * A callback invoked when the VM service gets a request to listen to + * some stream. + * + * \return Returns true iff the embedder supports the named stream id. + */ +typedef bool (*Dart_ServiceStreamListenCallback)(const char* stream_id); + +/** + * A callback invoked when the VM service gets a request to cancel + * some stream. + */ +typedef void (*Dart_ServiceStreamCancelCallback)(const char* stream_id); + +/** + * Adds VM service stream callbacks. + * + * \param listen_callback A function pointer to a listen callback function. + * A listen callback function should not be already set when this function + * is called. A NULL value removes the existing listen callback function + * if any. + * + * \param cancel_callback A function pointer to a cancel callback function. + * A cancel callback function should not be already set when this function + * is called. A NULL value removes the existing cancel callback function + * if any. + * + * \return Success if the callbacks were added. Otherwise, returns an + * error handle. + */ +DART_EXPORT char* Dart_SetServiceStreamCallbacks( + Dart_ServiceStreamListenCallback listen_callback, + Dart_ServiceStreamCancelCallback cancel_callback); + +/** + * A callback invoked when the VM service receives an event. + */ +typedef void (*Dart_NativeStreamConsumer)(const uint8_t* event_json, + intptr_t event_json_length); + +/** + * Sets the native VM service stream callbacks for a particular stream. + * Note: The function may be called on multiple threads concurrently. + * + * \param consumer A function pointer to an event handler callback function. + * A NULL value removes the existing listen callback function if any. + * + * \param stream_id The ID of the stream on which to set the callback. + */ +DART_EXPORT void Dart_SetNativeServiceStreamCallback( + Dart_NativeStreamConsumer consumer, + const char* stream_id); + +/** + * Sends a data event to clients of the VM Service. + * + * A data event is used to pass an array of bytes to subscribed VM + * Service clients. For example, in the standalone embedder, this is + * function used to provide WriteEvents on the Stdout and Stderr + * streams. + * + * If the embedder passes in a stream id for which no client is + * subscribed, then the event is ignored. + * + * \param stream_id The id of the stream on which to post the event. + * + * \param event_kind A string identifying what kind of event this is. + * For example, 'WriteEvent'. + * + * \param bytes A pointer to an array of bytes. + * + * \param bytes_length The length of the byte array. + * + * \return NULL if the arguments are well formed. Otherwise, returns an + * error string. The caller is responsible for freeing the error message. + */ +DART_EXPORT char* Dart_ServiceSendDataEvent(const char* stream_id, + const char* event_kind, + const uint8_t* bytes, + intptr_t bytes_length); + +/** + * Usage statistics for a space/generation at a particular moment in time. + * + * \param used Amount of memory used, in bytes. + * + * \param capacity Memory capacity, in bytes. + * + * \param external External memory, in bytes. + * + * \param collections How many times the garbage collector has run in this + * space. + * + * \param time Cumulative time spent collecting garbage in this space, in + * seconds. + * + * \param avg_collection_period Average time between garbage collector running + * in this space, in milliseconds. + */ +typedef struct { + intptr_t used; + intptr_t capacity; + intptr_t external; + intptr_t collections; + double time; + double avg_collection_period; +} Dart_GCStats; + +/** + * A Garbage Collection event with memory usage statistics. + * + * \param type The event type. Static lifetime. + * + * \param reason The reason for the GC event. Static lifetime. + * + * \param new_space Data for New Space. + * + * \param old_space Data for Old Space. + */ +typedef struct { + const char* type; + const char* reason; + const char* isolate_id; + + Dart_GCStats new_space; + Dart_GCStats old_space; +} Dart_GCEvent; + +/** + * A callback invoked when the VM emits a GC event. + * + * \param event The GC event data. Pointer only valid for the duration of the + * callback. + */ +typedef void (*Dart_GCEventCallback)(Dart_GCEvent* event); + +/** + * Sets the native GC event callback. + * + * \param callback A function pointer to an event handler callback function. + * A NULL value removes the existing listen callback function if any. + */ +DART_EXPORT void Dart_SetGCEventCallback(Dart_GCEventCallback callback); + +/* + * ======== + * Reload support + * ======== + * + * These functions are used to implement reloading in the Dart VM. + * This is an experimental feature, so embedders should be prepared + * for these functions to change. + */ + +/** + * A callback which determines whether the file at some url has been + * modified since some time. If the file cannot be found, true should + * be returned. + */ +typedef bool (*Dart_FileModifiedCallback)(const char* url, int64_t since); + +DART_EXPORT char* Dart_SetFileModifiedCallback( + Dart_FileModifiedCallback file_modified_callback); + +/** + * Returns true if isolate is currently reloading. + */ +DART_EXPORT bool Dart_IsReloading(); + +/* + * ======== + * Timeline + * ======== + */ + +/** + * Returns a timestamp in microseconds. This timestamp is suitable for + * passing into the timeline system, and uses the same monotonic clock + * as dart:developer's Timeline.now. + * + * \return A timestamp that can be passed to the timeline system. + */ +DART_EXPORT int64_t Dart_TimelineGetMicros(); + +/** + * Returns a raw timestamp in from the monotonic clock. + * + * \return A raw timestamp from the monotonic clock. + */ +DART_EXPORT int64_t Dart_TimelineGetTicks(); + +/** + * Returns the frequency of the monotonic clock. + * + * \return The frequency of the monotonic clock. + */ +DART_EXPORT int64_t Dart_TimelineGetTicksFrequency(); + +typedef enum { + Dart_Timeline_Event_Begin, // Phase = 'B'. + Dart_Timeline_Event_End, // Phase = 'E'. + Dart_Timeline_Event_Instant, // Phase = 'i'. + Dart_Timeline_Event_Duration, // Phase = 'X'. + Dart_Timeline_Event_Async_Begin, // Phase = 'b'. + Dart_Timeline_Event_Async_End, // Phase = 'e'. + Dart_Timeline_Event_Async_Instant, // Phase = 'n'. + Dart_Timeline_Event_Counter, // Phase = 'C'. + Dart_Timeline_Event_Flow_Begin, // Phase = 's'. + Dart_Timeline_Event_Flow_Step, // Phase = 't'. + Dart_Timeline_Event_Flow_End, // Phase = 'f'. +} Dart_Timeline_Event_Type; + +/** + * Add a timeline event to the embedder stream. + * + * \param label The name of the event. Its lifetime must extend at least until + * Dart_Cleanup. + * \param timestamp0 The first timestamp of the event. + * \param timestamp1_or_async_id The second timestamp of the event or + * the async id. + * \param argument_count The number of argument names and values. + * \param argument_names An array of names of the arguments. The lifetime of the + * names must extend at least until Dart_Cleanup. The array may be reclaimed + * when this call returns. + * \param argument_values An array of values of the arguments. The values and + * the array may be reclaimed when this call returns. + */ +DART_EXPORT void Dart_TimelineEvent(const char* label, + int64_t timestamp0, + int64_t timestamp1_or_async_id, + Dart_Timeline_Event_Type type, + intptr_t argument_count, + const char** argument_names, + const char** argument_values); + +/** + * Associates a name with the current thread. This name will be used to name + * threads in the timeline. Can only be called after a call to Dart_Initialize. + * + * \param name The name of the thread. + */ +DART_EXPORT void Dart_SetThreadName(const char* name); + +/* + * ======= + * Metrics + * ======= + */ + +/** + * Return metrics gathered for the VM and individual isolates. + * + * NOTE: Non-heap metrics are not available in PRODUCT builds of Dart. + * Calling the non-heap metric functions on a PRODUCT build might return invalid metrics. + */ +DART_EXPORT int64_t Dart_VMIsolateCountMetric(); // Counter +DART_EXPORT int64_t Dart_VMCurrentRSSMetric(); // Byte +DART_EXPORT int64_t Dart_VMPeakRSSMetric(); // Byte +DART_EXPORT int64_t +Dart_IsolateHeapOldUsedMetric(Dart_Isolate isolate); // Byte +DART_EXPORT int64_t +Dart_IsolateHeapOldUsedMaxMetric(Dart_Isolate isolate); // Byte +DART_EXPORT int64_t +Dart_IsolateHeapOldCapacityMetric(Dart_Isolate isolate); // Byte +DART_EXPORT int64_t +Dart_IsolateHeapOldCapacityMaxMetric(Dart_Isolate isolate); // Byte +DART_EXPORT int64_t +Dart_IsolateHeapOldExternalMetric(Dart_Isolate isolate); // Byte +DART_EXPORT int64_t +Dart_IsolateHeapNewUsedMetric(Dart_Isolate isolate); // Byte +DART_EXPORT int64_t +Dart_IsolateHeapNewUsedMaxMetric(Dart_Isolate isolate); // Byte +DART_EXPORT int64_t +Dart_IsolateHeapNewCapacityMetric(Dart_Isolate isolate); // Byte +DART_EXPORT int64_t +Dart_IsolateHeapNewCapacityMaxMetric(Dart_Isolate isolate); // Byte +DART_EXPORT int64_t +Dart_IsolateHeapNewExternalMetric(Dart_Isolate isolate); // Byte +DART_EXPORT int64_t +Dart_IsolateHeapGlobalUsedMetric(Dart_Isolate isolate); // Byte +DART_EXPORT int64_t +Dart_IsolateHeapGlobalUsedMaxMetric(Dart_Isolate isolate); // Byte +DART_EXPORT int64_t +Dart_IsolateRunnableLatencyMetric(Dart_Isolate isolate); // Microsecond +DART_EXPORT int64_t +Dart_IsolateRunnableHeapSizeMetric(Dart_Isolate isolate); // Byte + +/* + * ======== + * UserTags + * ======== + */ + +/* + * Gets the current isolate's currently set UserTag instance. + * + * \return The currently set UserTag instance. + */ +DART_EXPORT Dart_Handle Dart_GetCurrentUserTag(); + +/* + * Gets the current isolate's default UserTag instance. + * + * \return The default UserTag with label 'Default' + */ +DART_EXPORT Dart_Handle Dart_GetDefaultUserTag(); + +/* + * Creates a new UserTag instance. + * + * \param label The name of the new UserTag. + * + * \return The newly created UserTag instance or an error handle. + */ +DART_EXPORT Dart_Handle Dart_NewUserTag(const char* label); + +/* + * Updates the current isolate's UserTag to a new value. + * + * \param user_tag The UserTag to be set as the current UserTag. + * + * \return The previously set UserTag instance or an error handle. + */ +DART_EXPORT Dart_Handle Dart_SetCurrentUserTag(Dart_Handle user_tag); + +/* + * Returns the label of a given UserTag instance. + * + * \param user_tag The UserTag from which the label will be retrieved. + * + * \return The UserTag's label. NULL if the user_tag is invalid. The caller is + * responsible for freeing the returned label. + */ +DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_GetUserTagLabel( + Dart_Handle user_tag); + +#endif // RUNTIME_INCLUDE_DART_TOOLS_API_H_ diff --git a/pkgs/cupertino_http/src/dart-sdk/include/dart_version.h b/pkgs/cupertino_http/src/dart-sdk/include/dart_version.h new file mode 100644 index 0000000000..b3b4924392 --- /dev/null +++ b/pkgs/cupertino_http/src/dart-sdk/include/dart_version.h @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_INCLUDE_DART_VERSION_H_ +#define RUNTIME_INCLUDE_DART_VERSION_H_ + +// On breaking changes the major version is increased. +// On backwards compatible changes the minor version is increased. +// The versioning covers the symbols exposed in dart_api_dl.h +#define DART_API_DL_MAJOR_VERSION 2 +#define DART_API_DL_MINOR_VERSION 0 + +#endif /* RUNTIME_INCLUDE_DART_VERSION_H_ */ /* NOLINT */ diff --git a/pkgs/cupertino_http/src/dart-sdk/include/internal/dart_api_dl_impl.h b/pkgs/cupertino_http/src/dart-sdk/include/internal/dart_api_dl_impl.h new file mode 100644 index 0000000000..ad13a4b811 --- /dev/null +++ b/pkgs/cupertino_http/src/dart-sdk/include/internal/dart_api_dl_impl.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file + * for details. All rights reserved. Use of this source code is governed by a + * BSD-style license that can be found in the LICENSE file. + */ + +#ifndef RUNTIME_INCLUDE_INTERNAL_DART_API_DL_IMPL_H_ +#define RUNTIME_INCLUDE_INTERNAL_DART_API_DL_IMPL_H_ + +typedef struct { + const char* name; + void (*function)(); +} DartApiEntry; + +typedef struct { + const int major; + const int minor; + const DartApiEntry* const functions; +} DartApi; + +#endif /* RUNTIME_INCLUDE_INTERNAL_DART_API_DL_IMPL_H_ */ /* NOLINT */ From b527121743f3cb372351cd93ed5b95941c87db34 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 3 Aug 2022 11:58:12 -0700 Subject: [PATCH 139/448] Add support for flutter plugins (#737) --- .../.gitattributes | 2 + pkgs/http_client_conformance_tests/README.md | 5 ++ .../bin/generate_server_wrappers.dart | 50 +++++++++++++++++++ .../lib/http_client_conformance_tests.dart | 4 ++ .../lib/src/redirect_server_vm.dart | 12 +++++ .../lib/src/redirect_server_web.dart | 9 ++++ .../lib/src/redirect_tests.dart | 5 +- .../lib/src/request_body_server_vm.dart | 12 +++++ .../lib/src/request_body_server_web.dart | 9 ++++ .../src/request_body_streamed_server_vm.dart | 12 +++++ .../src/request_body_streamed_server_web.dart | 10 ++++ .../lib/src/request_body_streamed_tests.dart | 6 +-- .../lib/src/request_body_tests.dart | 5 +- .../lib/src/request_headers_server_vm.dart | 12 +++++ .../lib/src/request_headers_server_web.dart | 9 ++++ .../lib/src/request_headers_tests.dart | 5 +- .../lib/src/response_body_server_vm.dart | 12 +++++ .../lib/src/response_body_server_web.dart | 9 ++++ .../src/response_body_streamed_server_vm.dart | 12 +++++ .../response_body_streamed_server_web.dart | 10 ++++ .../lib/src/response_body_streamed_test.dart | 6 +-- .../lib/src/response_body_tests.dart | 5 +- .../lib/src/response_headers_server_vm.dart | 12 +++++ .../lib/src/response_headers_server_web.dart | 9 ++++ .../lib/src/response_headers_tests.dart | 5 +- .../lib/src/server_errors_server_vm.dart | 12 +++++ .../lib/src/server_errors_server_web.dart | 9 ++++ .../lib/src/server_errors_test.dart | 5 +- .../lib/src/utils.dart | 15 ------ .../pubspec.yaml | 1 + 30 files changed, 256 insertions(+), 33 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/.gitattributes create mode 100644 pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/redirect_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/redirect_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_body_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_body_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_headers_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_headers_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_body_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_body_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_headers_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_headers_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/server_errors_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/server_errors_server_web.dart delete mode 100644 pkgs/http_client_conformance_tests/lib/src/utils.dart diff --git a/pkgs/http_client_conformance_tests/.gitattributes b/pkgs/http_client_conformance_tests/.gitattributes new file mode 100644 index 0000000000..104d0ecaf9 --- /dev/null +++ b/pkgs/http_client_conformance_tests/.gitattributes @@ -0,0 +1,2 @@ +lib/src/*_server_vm.dart linguist-generated=true +lib/src/*_server_web.dart linguist-generated=true diff --git a/pkgs/http_client_conformance_tests/README.md b/pkgs/http_client_conformance_tests/README.md index e96e364654..6502aaf1ea 100644 --- a/pkgs/http_client_conformance_tests/README.md +++ b/pkgs/http_client_conformance_tests/README.md @@ -8,6 +8,11 @@ This package is intended to be used in the tests of packages that implement `package:http` [`Client`](https://pub.dev/documentation/http/latest/http/Client-class.html). +The tests work by starting a series of test servers and running the provided +`package:http` +[`Client`](https://pub.dev/documentation/http/latest/http/Client-class.html) +against them. + ## Usage `package:http_client_conformance_tests` is meant to be used in the tests suite diff --git a/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart b/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart new file mode 100644 index 0000000000..912a86f7f7 --- /dev/null +++ b/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart @@ -0,0 +1,50 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// Generates the '*_server_vm.dart' and '*_server_web.dart' support files. + +import 'dart:core'; +import 'dart:io'; + +import 'package:dart_style/dart_style.dart'; + +const vm = '''// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import ''; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} +'''; + +const web = '''// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/')); +'''; + +void main() async { + final files = await Directory('lib/src').list().toList(); + final formatter = DartFormatter(); + + files.where((file) => file.path.endsWith('_server.dart')).forEach((file) { + final vmPath = file.path.replaceAll('_server.dart', '_server_vm.dart'); + File(vmPath).writeAsStringSync(formatter.format(vm.replaceAll( + '', file.uri.pathSegments.last))); + + final webPath = file.path.replaceAll('_server.dart', '_server_web.dart'); + File(webPath).writeAsStringSync(formatter.format(web.replaceAll( + '', file.uri.pathSegments.last))); + }); +} diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index dfdc919ffa..7ef741f685 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -33,6 +33,10 @@ export 'src/response_headers_tests.dart' show testResponseHeaders; /// /// If [redirectAlwaysAllowed] is `true` then tests that require the [Client] /// to limit redirects will be skipped. +/// +/// The tests are run against a series of HTTP servers that are started by the +/// tests. If the tests are run in the browser, then the test servers are +/// started in another process. Otherwise, the test servers are run in-process. void testAll(Client client, {bool canStreamRequestBody = true, bool canStreamResponseBody = true, diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_server_vm.dart new file mode 100644 index 0000000000..7f9cf8c182 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'redirect_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_server_web.dart new file mode 100644 index 0000000000..0fbe8a3877 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/redirect_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart index c1d5e2da23..6be306c787 100644 --- a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart @@ -7,7 +7,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; -import 'utils.dart'; +import 'redirect_server_vm.dart' + if (dart.library.html) 'redirect_server_web.dart'; /// Tests that the [Client] correctly implements HTTP redirect logic. /// @@ -20,7 +21,7 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { late final StreamQueue httpServerQueue; setUpAll(() async { - httpServerChannel = await startServer('redirect_server.dart'); + httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_server_vm.dart new file mode 100644 index 0000000000..2260766216 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'request_body_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_server_web.dart new file mode 100644 index 0000000000..250bd52668 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/request_body_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_vm.dart new file mode 100644 index 0000000000..9f58119bf2 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'request_body_streamed_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_web.dart new file mode 100644 index 0000000000..97e8fbc689 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_web.dart @@ -0,0 +1,10 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: + 'http_client_conformance_tests/src/request_body_streamed_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart index 7f27c8bf41..1f6c5b58b3 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart @@ -10,7 +10,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; -import 'utils.dart'; +import 'request_body_streamed_server_vm.dart' + if (dart.library.html) 'request_body_streamed_server_web.dart'; /// Tests that the [Client] correctly implements streamed request body /// uploading. @@ -26,8 +27,7 @@ void testRequestBodyStreamed(Client client, late StreamQueue httpServerQueue; setUp(() async { - httpServerChannel = - await startServer('request_body_streamed_server.dart'); + httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart index 0843955e2b..473fddcdf7 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart @@ -9,7 +9,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; -import 'utils.dart'; +import 'request_body_server_vm.dart' + if (dart.library.html) 'request_body_server_web.dart'; class _Plus2Decoder extends Converter, String> { @override @@ -44,7 +45,7 @@ void testRequestBody(Client client) { late final StreamQueue httpServerQueue; setUpAll(() async { - httpServerChannel = await startServer('request_body_server.dart'); + httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_headers_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/request_headers_server_vm.dart new file mode 100644 index 0000000000..44e65659e9 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_headers_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'request_headers_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_headers_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/request_headers_server_web.dart new file mode 100644 index 0000000000..62e8d9e410 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_headers_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/request_headers_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart index ee5f4ede17..4c0129c872 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart @@ -7,7 +7,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; -import 'utils.dart'; +import 'request_headers_server_vm.dart' + if (dart.library.html) 'request_headers_server_web.dart'; /// Tests that the [Client] correctly sends headers in the request. void testRequestHeaders(Client client) async { @@ -17,7 +18,7 @@ void testRequestHeaders(Client client) async { late final StreamQueue httpServerQueue; setUpAll(() async { - httpServerChannel = await startServer('request_headers_server.dart'); + httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_server_vm.dart new file mode 100644 index 0000000000..f88e065c8f --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'response_body_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_server_web.dart new file mode 100644 index 0000000000..94bdaa90b0 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/response_body_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_vm.dart new file mode 100644 index 0000000000..01d84a1475 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'response_body_streamed_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_web.dart new file mode 100644 index 0000000000..a9ce00b415 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_web.dart @@ -0,0 +1,10 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: + 'http_client_conformance_tests/src/response_body_streamed_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart index ab861f2fe5..b4a359111b 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart @@ -9,7 +9,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; -import 'utils.dart'; +import 'response_body_streamed_server_vm.dart' + if (dart.library.html) 'response_body_streamed_server_web.dart'; /// Tests that the [Client] correctly implements HTTP responses with bodies of /// unbounded size. @@ -25,8 +26,7 @@ void testResponseBodyStreamed(Client client, late final StreamQueue httpServerQueue; setUpAll(() async { - httpServerChannel = - await startServer('response_body_streamed_server.dart'); + httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart index b5f0f750d2..27b52c85ad 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart @@ -7,7 +7,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; -import 'utils.dart'; +import 'response_body_server_vm.dart' + if (dart.library.html) 'response_body_server_web.dart'; /// Tests that the [Client] correctly implements HTTP responses with bodies. /// @@ -23,7 +24,7 @@ void testResponseBody(Client client, const message = 'Hello World!'; setUpAll(() async { - httpServerChannel = await startServer('response_body_server.dart'); + httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_server_vm.dart new file mode 100644 index 0000000000..b7d4a01a3d --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'response_headers_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_server_web.dart new file mode 100644 index 0000000000..8ee938a36f --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/response_headers_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart index 2864bdaca7..7debead851 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart @@ -7,7 +7,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; -import 'utils.dart'; +import 'response_headers_server_vm.dart' + if (dart.library.html) 'response_headers_server_web.dart'; /// Tests that the [Client] correctly processes response headers. void testResponseHeaders(Client client) async { @@ -17,7 +18,7 @@ void testResponseHeaders(Client client) async { late StreamQueue httpServerQueue; setUp(() async { - httpServerChannel = await startServer('response_headers_server.dart'); + httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/server_errors_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/server_errors_server_vm.dart new file mode 100644 index 0000000000..257adcfa61 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/server_errors_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'server_errors_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/server_errors_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/server_errors_server_web.dart new file mode 100644 index 0000000000..cc763e389f --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/server_errors_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/server_errors_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart b/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart index 076502f39a..77406d26cc 100644 --- a/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart @@ -7,7 +7,8 @@ import 'package:http/http.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; -import 'utils.dart'; +import 'server_errors_server_vm.dart' + if (dart.library.html) 'server_errors_server_web.dart'; /// Tests that the [Client] correctly handles server errors. void testServerErrors(Client client, @@ -18,7 +19,7 @@ void testServerErrors(Client client, late final StreamQueue httpServerQueue; setUpAll(() async { - httpServerChannel = await startServer('server_errors_server.dart'); + httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); diff --git a/pkgs/http_client_conformance_tests/lib/src/utils.dart b/pkgs/http_client_conformance_tests/lib/src/utils.dart deleted file mode 100644 index 4b52d9022c..0000000000 --- a/pkgs/http_client_conformance_tests/lib/src/utils.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. 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:stream_channel/stream_channel.dart'; -import 'package:test/test.dart'; - -/// Starts a test server using a relative path name e.g. -/// 'redirect_server.dart'. -/// -/// See [spawnHybridUri]. -Future> startServer(String fileName) async => - spawnHybridUri(Uri( - scheme: 'package', - path: 'http_client_conformance_tests/src/$fileName')); diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index dd8ea26b22..9655aff279 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -14,4 +14,5 @@ dependencies: test: ^1.21.2 dev_dependencies: + dart_style: ^2.2.3 lints: ^1.0.0 From 694b71d935166795f8b870aabe8493ff05d7d187 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 3 Aug 2022 13:05:44 -0700 Subject: [PATCH 140/448] Prepare to publish package:http (#742) --- pkgs/http/CHANGELOG.md | 2 +- pkgs/http/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 6fdda5e06e..21c97fc9be 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.13.5-dev +## 0.13.5 * Allow async callbacks in RetryClient. * In `MockHttpClient` use the callback returned `Response.request` instead of diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 06fa0c94bf..53830517ae 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.5-dev +version: 0.13.5 description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http From fc213dd630dfe4f0919bcecaad35a89e0df28f48 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 3 Aug 2022 13:26:31 -0700 Subject: [PATCH 141/448] Update README to include cupertino_http (#743) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c6eae3c70b..2c27fea942 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,4 @@ and the browser. |---|---|---| | [http](pkgs/http/) | A composable, multi-platform, Future-based API for HTTP requests. | [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) | | [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | A library that tests whether implementations of package:http's `Client` class behave as expected. | | +| [cupertino_http](pkgs/cupertino_http/) | A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). | | From 4710355a2a7e9f201921b0b6accffc6d4d7b4a9c Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 3 Aug 2022 13:26:51 -0700 Subject: [PATCH 142/448] Only run cupertino_http tests when it is changed (#744) --- .github/workflows/cupertino.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 00cd4a84b0..e823f81c10 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -5,7 +5,13 @@ on: branches: - main - master + paths: + - 'pkgs/cupertino_http' + - 'pkgs/http_client_conformance_tests' pull_request: + paths: + - 'pkgs/cupertino_http' + - 'pkgs/http_client_conformance_tests' schedule: - cron: "0 0 * * 0" From d7b09f8acb999fd8b7d4506032a1bce075514142 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 3 Aug 2022 15:07:29 -0700 Subject: [PATCH 143/448] Enable client conformance tests. (#746) --- .github/workflows/cupertino.yml | 8 ++--- .../client_conformance_test.dart | 29 +++++++++++-------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index e823f81c10..83fd796e76 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -6,12 +6,12 @@ on: - main - master paths: - - 'pkgs/cupertino_http' - - 'pkgs/http_client_conformance_tests' + - 'pkgs/cupertino_http/**' + - 'pkgs/http_client_conformance_tests/**' pull_request: paths: - - 'pkgs/cupertino_http' - - 'pkgs/http_client_conformance_tests' + - 'pkgs/cupertino_http/**' + - 'pkgs/http_client_conformance_tests/**' schedule: - cron: "0 0 * * 0" diff --git a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart index cb09eaf83a..4a8c979451 100644 --- a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart +++ b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart @@ -1,18 +1,23 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:cupertino_http/cupertino_client.dart'; +import 'package:cupertino_http/cupertino_http.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; import 'package:integration_test/integration_test.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - // TODO: Re-enable when http_client_conformance_tests supports Flutter - // plugins - // - // group('defaultSessionConfiguration', () { - // testAll(CupertinoClient.defaultSessionConfiguration(), - // canStreamRequestBody: false); - // }); - // group('fromSessionConfiguration', () { - // final config = URLSessionConfiguration.ephemeralSessionConfiguration(); - // testAll(CupertinoClient.fromSessionConfiguration(config), - // canStreamRequestBody: false); - // }); + group('defaultSessionConfiguration', () { + testAll(CupertinoClient.defaultSessionConfiguration(), + canStreamRequestBody: false); + }); + group('fromSessionConfiguration', () { + final config = URLSessionConfiguration.ephemeralSessionConfiguration(); + testAll(CupertinoClient.fromSessionConfiguration(config), + canStreamRequestBody: false); + }); } From 3d657f6a7aa024f3f5f8b5af6a91207039ec92d2 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 3 Aug 2022 16:31:31 -0700 Subject: [PATCH 144/448] Upgrade to the latest package:lints (#745) Allow older version on older SDKs for CI. --- pkgs/http/CHANGELOG.md | 2 ++ pkgs/http/pubspec.yaml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 21c97fc9be..b4f2a63d74 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.13.6-dev + ## 0.13.5 * Allow async callbacks in RetryClient. diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 53830517ae..3280d0fd66 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.5 +version: 0.13.6-dev description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http @@ -16,7 +16,7 @@ dev_dependencies: fake_async: ^1.2.0 http_client_conformance_tests: path: ../http_client_conformance_tests/ - lints: ^1.0.0 + lints: '>=1.0.0 <3.0.0' shelf: ^1.1.0 stream_channel: ^2.1.0 test: ^1.16.0 From ebba141c883f0e71023d7087d85fd9d164483a6e Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 4 Aug 2022 13:18:41 -0700 Subject: [PATCH 145/448] Create a more complete README for cupertino_http (#748) --- pkgs/cupertino_http/README.md | 62 +++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/pkgs/cupertino_http/README.md b/pkgs/cupertino_http/README.md index 99dc24a42d..92847d038c 100644 --- a/pkgs/cupertino_http/README.md +++ b/pkgs/cupertino_http/README.md @@ -1,5 +1,61 @@ +[![pub package](https://img.shields.io/pub/v/cupertino_http.svg)](https://pub.dev/packages/cupertino_http) +[![package publisher](https://img.shields.io/pub/publisher/cupertino_http.svg)](https://pub.dev/packages/cupertino_http/publisher) + A macOS/iOS Flutter plugin that provides access to the -[Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). +[Foundation URL Loading System][]. + +Using the [Foundation URL Loading System][], rather than the socket-based +[dart:io HttpClient][] implemententation, has several advantages: + +1. It automatically supports iOS/macOS platform features such VPNs and HTTP + proxies. +2. It supports many more configuration options such as only allowing access + through WiFi and blocking cookies. +3. It supports more HTTP features such as HTTP/3 and custom redirect handling. + +## Using + +The easiest way to use this library is via the the high-level interface +defined by [package:http Client][]. + +This approach allows the same HTTP code to be used on all platforms, while +still allowing platform-specific setup. + +```dart +late Client client; +if (Platform.isIOS) { + final config = URLSessionConfiguration.ephemeralSessionConfiguration() + ..allowsCellularAccess = false + ..allowsConstrainedNetworkAccess = false + ..allowsExpensiveNetworkAccess = false; + client = CupertinoClient.fromSessionConfiguration(config); +} else { + client = IOClient(); // Uses an HTTP client based on dart:io +} + +final response = await client.get(Uri.https( + 'www.googleapis.com', + '/books/v1/volumes', + {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'})); +``` + +You can also use the [Foundation URL Loading System] API directly. + +```dart +final url = Uri.https( + 'www.googleapis.com', + '/books/v1/volumes', + {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'}); +final session = URLSession.sharedSession(); +final task = session.dataTaskWithCompletionHandler(URLRequest.fromUrl(url), + (data, response, error) { + if (error == null && response!.statusCode == 200) { + print(data!.bytes); + } +}); +task.resume(); +``` -See [DEVELOPMENT.md](DEVELOPMENT.md) for information on how to develop -the plugin itself. +[package:http Client]: https://pub.dev/documentation/http/latest/http/Client-class.html +[Foundation URL Loading System]: https://developer.apple.com/documentation/foundation/url_loading_system +[dart:io HttpClient]: https://api.dart.dev/stable/dart-io/HttpClient-class.html From a95f44ca3d3ea39434adac7b90ea608a150a10f3 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 5 Aug 2022 09:07:55 -0700 Subject: [PATCH 146/448] Make cupertino_http ready to be published. (#749) --- pkgs/cupertino_http/CHANGELOG.md | 7 +++++++ pkgs/cupertino_http/lib/cupertino_client.dart | 3 +++ pkgs/cupertino_http/lib/cupertino_http.dart | 2 +- pkgs/cupertino_http/pubspec.yaml | 4 ++-- 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 pkgs/cupertino_http/CHANGELOG.md diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md new file mode 100644 index 0000000000..38c3337dc2 --- /dev/null +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -0,0 +1,7 @@ +## 0.0.2 + +* A single comment adjustment. + +## 0.0.1 + +* Initial development release. diff --git a/pkgs/cupertino_http/lib/cupertino_client.dart b/pkgs/cupertino_http/lib/cupertino_client.dart index e8e3d97a2a..0093025011 100644 --- a/pkgs/cupertino_http/lib/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/cupertino_client.dart @@ -2,6 +2,9 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +/// A [Client] implementation based on the +/// [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). + import 'dart:async'; import 'dart:typed_data'; diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index ee0b1534b3..526fa91ddd 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// A macOS/iOS Flutter plugin that provides access to the +/// Provides access to the /// [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). /// /// For example: diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index c821f0af97..01ed6f4712 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,8 +2,8 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.0.1 -publish_to: none +version: 0.0.2 +repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: sdk: ">=2.16.0<3.0.0" From 60d471ab814dc337e1a122320438635c14439b0f Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 5 Aug 2022 12:38:53 -0700 Subject: [PATCH 147/448] Follow local style in cupertino_http example (#750) --- pkgs/cupertino_http/CHANGELOG.md | 6 + pkgs/cupertino_http/README.md | 30 ++++ .../example/analysis_options.yaml | 29 ---- pkgs/cupertino_http/example/lib/main.dart | 151 +++++++++--------- pkgs/cupertino_http/example/pubspec.yaml | 87 +--------- 5 files changed, 121 insertions(+), 182 deletions(-) delete mode 100644 pkgs/cupertino_http/example/analysis_options.yaml diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 38c3337dc2..d59253497a 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.0.3 + +* Follow the project style in the example app. +* Use `runWithClient` in the example app. +* Add another README example +* ## 0.0.2 * A single comment adjustment. diff --git a/pkgs/cupertino_http/README.md b/pkgs/cupertino_http/README.md index 92847d038c..fcb43b6497 100644 --- a/pkgs/cupertino_http/README.md +++ b/pkgs/cupertino_http/README.md @@ -39,6 +39,35 @@ final response = await client.get(Uri.https( {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'})); ``` +[package:http runWithClient][] can be used to configure the +[package:http Client][] for the entire application. + +```dart +void main() { + late Client client; + if (Platform.isIOS) { + client = CupertinoClient.defaultSessionConfiguration(); + } else { + client = IOClient(); + } + + runWithClient(() => runApp(const MyApp()), () => client); +} + +... + +class MainPageState extends State { + void someMethod() { + // Will use the Client configured in main. + final response = await get(Uri.https( + 'www.googleapis.com', + '/books/v1/volumes', + {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'})); + } + ... +} +``` + You can also use the [Foundation URL Loading System] API directly. ```dart @@ -57,5 +86,6 @@ task.resume(); ``` [package:http Client]: https://pub.dev/documentation/http/latest/http/Client-class.html +[package:http runWithClient]: https://pub.dev/documentation/http/latest/http/runWithClient.html [Foundation URL Loading System]: https://developer.apple.com/documentation/foundation/url_loading_system [dart:io HttpClient]: https://api.dart.dev/stable/dart-io/HttpClient-class.html diff --git a/pkgs/cupertino_http/example/analysis_options.yaml b/pkgs/cupertino_http/example/analysis_options.yaml deleted file mode 100644 index 61b6c4de17..0000000000 --- a/pkgs/cupertino_http/example/analysis_options.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at - # https://dart-lang.github.io/linter/lints/index.html. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index c343635997..4722f0af7c 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -1,13 +1,24 @@ -import 'package:flutter/material.dart'; -import 'dart:io'; +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + import 'dart:convert'; +import 'dart:io'; import 'package:cupertino_http/cupertino_client.dart'; +import 'package:flutter/material.dart'; import 'package:http/http.dart'; import 'package:http/io_client.dart'; void main() { - runApp(const BookSearchApp()); + late Client client; + if (Platform.isIOS) { + client = CupertinoClient.defaultSessionConfiguration(); + } else { + client = IOClient(); + } + + runWithClient(() => runApp(const BookSearchApp()), () => client); } class Book { @@ -22,14 +33,12 @@ class BookSearchApp extends StatelessWidget { const BookSearchApp({Key? key}) : super(key: key); @override - Widget build(BuildContext context) { - return const MaterialApp( - // Remove the debug banner - debugShowCheckedModeBanner: false, - title: 'Book Search', - home: HomePage(), - ); - } + Widget build(BuildContext context) => const MaterialApp( + // Remove the debug banner + debugShowCheckedModeBanner: false, + title: 'Book Search', + home: HomePage(), + ); } class HomePage extends StatefulWidget { @@ -43,7 +52,7 @@ class _HomePageState extends State { List _books = []; @override - initState() { + void initState() { super.initState(); } @@ -55,33 +64,31 @@ class _HomePageState extends State { return; } - // TODO: Set this up in main when runWithClient is released with package - // HTTP. - late Client client; - if (Platform.isIOS) { - client = CupertinoClient.defaultSessionConfiguration(); - } else { - client = IOClient(); - } - client - .get(Uri.https('www.googleapis.com', '/books/v1/volumes', - {'q': query, 'maxResults': '40', 'printType': 'books'})) - .then((response) { - final List books = []; + // `get` will use the `Client` configured in main. + get(Uri.https('www.googleapis.com', '/books/v1/volumes', { + 'q': query, + 'maxResults': '40', + 'printType': 'books' + })).then((response) { + final books = []; final jsonPayload = jsonDecode(utf8.decode(response.bodyBytes)) as Map; if (jsonPayload['items'] is List) { - final items = jsonPayload['items'] as List; + final items = + (jsonPayload['items'] as List).cast>(); - for (final Map item in items) { + for (final item in items) { if (item.containsKey('volumeInfo')) { final volumeInfo = item['volumeInfo'] as Map; if (volumeInfo['title'] is String && volumeInfo['description'] is String && volumeInfo['imageLinks'] is Map && - volumeInfo['imageLinks']['smallThumbnail'] is String) { - books.add(Book(volumeInfo['title'], volumeInfo['description'], - volumeInfo['imageLinks']['smallThumbnail'])); + (volumeInfo['imageLinks'] as Map)['smallThumbnail'] is String) { + books.add(Book( + volumeInfo['title'] as String, + volumeInfo['description'] as String, + (volumeInfo['imageLinks'] as Map)['smallThumbnail'] + as String)); } } } @@ -93,39 +100,37 @@ class _HomePageState extends State { } @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: const Text('Book Search'), - ), - body: Padding( - padding: const EdgeInsets.all(10), - child: Column( - children: [ - const SizedBox( - height: 20, - ), - TextField( - onChanged: (value) => _runSearch(value), - decoration: const InputDecoration( - labelText: 'Search', suffixIcon: Icon(Icons.search)), - ), - const SizedBox( - height: 20, - ), - Expanded( - child: _books.isNotEmpty - ? BookList(_books) - : const Text( - 'No results found', - style: TextStyle(fontSize: 24), - ), - ), - ], + Widget build(BuildContext context) => Scaffold( + appBar: AppBar( + title: const Text('Book Search'), ), - ), - ); - } + body: Padding( + padding: const EdgeInsets.all(10), + child: Column( + children: [ + const SizedBox( + height: 20, + ), + TextField( + onChanged: _runSearch, + decoration: const InputDecoration( + labelText: 'Search', suffixIcon: Icon(Icons.search)), + ), + const SizedBox( + height: 20, + ), + Expanded( + child: _books.isNotEmpty + ? BookList(_books) + : const Text( + 'No results found', + style: TextStyle(fontSize: 24), + ), + ), + ], + ), + ), + ); } class BookList extends StatefulWidget { @@ -138,17 +143,15 @@ class BookList extends StatefulWidget { class _BookListState extends State { @override - Widget build(BuildContext context) { - return ListView.builder( - itemCount: widget.books.length, - itemBuilder: (context, index) => Card( - key: ValueKey(widget.books[index].title), - child: ListTile( - leading: Image.network(widget.books[index].imageUrl), - title: Text(widget.books[index].title), - subtitle: Text(widget.books[index].description), + Widget build(BuildContext context) => ListView.builder( + itemCount: widget.books.length, + itemBuilder: (context, index) => Card( + key: ValueKey(widget.books[index].title), + child: ListTile( + leading: Image.network(widget.books[index].imageUrl), + title: Text(widget.books[index].title), + subtitle: Text(widget.books[index].description), + ), ), - ), - ); - } + ); } diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index 1d2806b6e4..10f20102ff 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -1,101 +1,30 @@ name: cupertino_http_example description: Demonstrates how to use the cupertino_http plugin. -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: 'none' -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html version: 1.0.0+1 environment: sdk: ">=2.17.3 <3.0.0" -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. dependencies: - flutter: - sdk: flutter - cupertino_http: - # When depending on this package from a real application you should use: - # cupertino_http: ^x.y.z - # See https://dart.dev/tools/pub/dependencies#version-constraints - # The example app is bundled with the plugin so we use a path dependency on - # the parent directory to use the current plugin's version. path: ../ - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - http: ^0.13.4 + flutter: + sdk: flutter + http: ^0.13.5 + dev_dependencies: + flutter_lints: ^2.0.0 flutter_test: sdk: flutter - integration_test: - sdk: flutter http_client_conformance_tests: path: ../../http_client_conformance_tests/ - - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - flutter_lints: ^2.0.0 + integration_test: + sdk: flutter test: ^1.21.1 -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages From ef93e0e3a9df8a3f9a825992f1c7e40399609e00 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 5 Aug 2022 13:56:51 -0700 Subject: [PATCH 148/448] Bump the cupertino_http version to 0.0.3 (#751) --- pkgs/cupertino_http/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 01ed6f4712..6e993ca4ac 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.0.2 +version: 0.0.3 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: From 6dc3fbe5dfcb9c17d4fa994d41d310f062207b82 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 9 Aug 2022 15:28:09 -0700 Subject: [PATCH 149/448] Try replacing unicode character (#753) It's possible that the issue templates are not showing up because the character isn't allowed... --- .github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md | 2 +- .github/ISSUE_TEMPLATE/2-BUG_REPORT.md | 2 +- .github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md | 2 +- .github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md | 2 +- .github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md b/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md index a3e93b6dd1..5ca1fe6816 100644 --- a/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md +++ b/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md @@ -1,5 +1,5 @@ --- -name: `package:http` ⟶ An HTTP request fails when made through this client. +name: `package:http` - An HTTP request fails when made through this client. about: You are attempting to make a GET or POST and getting an unexpected exception or status code. diff --git a/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md b/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md index b4a8f41981..e57ca0ca6c 100644 --- a/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md @@ -1,5 +1,5 @@ --- -name: `package:http` ⟶ I found a bug. +name: `package:http` - I found a bug. about: You found that something which is expected to work, doesn't. The same capability works when using `dart:io` or `dart:html` directly. diff --git a/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md index c5182ee2a5..733bcd9d94 100644 --- a/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md +++ b/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md @@ -1,5 +1,5 @@ --- -name: `package:http` ⟶ I'd like a new feature. +name: `package:http` - I'd like a new feature. about: You are using `package:http` and would like a new feature to make it easier to make http requests. diff --git a/.github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md b/.github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md index fe428e8662..2686bc616a 100644 --- a/.github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md +++ b/.github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md @@ -1,5 +1,5 @@ --- -name: `package:cupertino_http` ⟶ I found a bug. +name: `package:cupertino_http` - I found a bug. about: You found that something which is expected to work, doesn't. --- diff --git a/.github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md b/.github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md index 30903b763f..fa1272459f 100644 --- a/.github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md +++ b/.github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md @@ -1,5 +1,5 @@ --- -name: `package:cupertino_http` ⟶ I'd like a new feature. +name: `package:cupertino_http` - I'd like a new feature. about: You are using `package:cupertino_http` and would like a new feature to make it easier to make http requests. From e698d51253a869588388a8964c530bc10d093bf6 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 10 Aug 2022 08:46:08 -0700 Subject: [PATCH 150/448] Add pub link for cupertino_http (#754) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c27fea942..c0a299ad89 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,4 @@ and the browser. |---|---|---| | [http](pkgs/http/) | A composable, multi-platform, Future-based API for HTTP requests. | [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) | | [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | A library that tests whether implementations of package:http's `Client` class behave as expected. | | -| [cupertino_http](pkgs/cupertino_http/) | A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). | | +| [cupertino_http](pkgs/cupertino_http/) | A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). | [![pub package](https://img.shields.io/pub/v/cupertino_http.svg)](https://pub.dev/packages/cupertino_http) | From 4cea8771619284f6a7a054bf9ed9e04b618252cd Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 15 Aug 2022 13:39:29 -0700 Subject: [PATCH 151/448] Add a space between SDK version conditions (#761) --- pkgs/cupertino_http/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 6e993ca4ac..2181b8a887 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -6,7 +6,7 @@ version: 0.0.3 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: - sdk: ">=2.16.0<3.0.0" + sdk: ">=2.16.0 <3.0.0" flutter: ">=3.0.0" dependencies: From deedb6b7e5e4d06c905640013a77b500ed3fe447 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Tue, 16 Aug 2022 21:35:37 +0200 Subject: [PATCH 152/448] [cupertino_http] A bit of refactoring of the example (#758) --- pkgs/cupertino_http/example/lib/book.dart | 36 ++++++ pkgs/cupertino_http/example/lib/main.dart | 127 +++++++++------------- 2 files changed, 89 insertions(+), 74 deletions(-) create mode 100644 pkgs/cupertino_http/example/lib/book.dart diff --git a/pkgs/cupertino_http/example/lib/book.dart b/pkgs/cupertino_http/example/lib/book.dart new file mode 100644 index 0000000000..fe23ce7629 --- /dev/null +++ b/pkgs/cupertino_http/example/lib/book.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +class Book { + String title; + String description; + String imageUrl; + + Book(this.title, this.description, this.imageUrl); + + static List listFromJson(Map json) { + final books = []; + + if (json['items'] is List) { + final items = (json['items'] as List).cast>(); + + for (final item in items) { + if (item.containsKey('volumeInfo')) { + final volumeInfo = item['volumeInfo'] as Map; + if (volumeInfo['title'] is String && + volumeInfo['description'] is String && + volumeInfo['imageLinks'] is Map && + (volumeInfo['imageLinks'] as Map)['smallThumbnail'] is String) { + books.add(Book( + volumeInfo['title'] as String, + volumeInfo['description'] as String, + (volumeInfo['imageLinks'] as Map)['smallThumbnail'] as String)); + } + } + } + } + + return books; + } +} diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index 4722f0af7c..7833870606 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -10,31 +10,27 @@ import 'package:flutter/material.dart'; import 'package:http/http.dart'; import 'package:http/io_client.dart'; +import 'book.dart'; + void main() { late Client client; - if (Platform.isIOS) { + // Use Cupertino Http on iOS and macOS. + if (Platform.isIOS || Platform.isMacOS) { client = CupertinoClient.defaultSessionConfiguration(); } else { client = IOClient(); } + // Run the app with the default `client` set to the one assigned above. runWithClient(() => runApp(const BookSearchApp()), () => client); } -class Book { - String title; - String description; - String imageUrl; - - Book(this.title, this.description, this.imageUrl); -} - class BookSearchApp extends StatelessWidget { const BookSearchApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) => const MaterialApp( - // Remove the debug banner + // Remove the debug banner. debugShowCheckedModeBanner: false, title: 'Book Search', home: HomePage(), @@ -49,88 +45,71 @@ class HomePage extends StatefulWidget { } class _HomePageState extends State { - List _books = []; + List? _books; @override void initState() { super.initState(); } - void _runSearch(String query) { + // Get the list of books matching `query`. + // The `get` call will automatically use the `client` configurated in `main`. + Future> _getBooks(String query) async { + final response = await get( + Uri.https( + 'www.googleapis.com', + '/books/v1/volumes', + {'q': query, 'maxResults': '40', 'printType': 'books'}, + ), + ); + + final json = jsonDecode(utf8.decode(response.bodyBytes)) as Map; + return Book.listFromJson(json); + } + + void _runSearch(String query) async { if (query.isEmpty) { setState(() { - _books = []; + _books = null; }); return; } - // `get` will use the `Client` configured in main. - get(Uri.https('www.googleapis.com', '/books/v1/volumes', { - 'q': query, - 'maxResults': '40', - 'printType': 'books' - })).then((response) { - final books = []; - final jsonPayload = jsonDecode(utf8.decode(response.bodyBytes)) as Map; - - if (jsonPayload['items'] is List) { - final items = - (jsonPayload['items'] as List).cast>(); - - for (final item in items) { - if (item.containsKey('volumeInfo')) { - final volumeInfo = item['volumeInfo'] as Map; - if (volumeInfo['title'] is String && - volumeInfo['description'] is String && - volumeInfo['imageLinks'] is Map && - (volumeInfo['imageLinks'] as Map)['smallThumbnail'] is String) { - books.add(Book( - volumeInfo['title'] as String, - volumeInfo['description'] as String, - (volumeInfo['imageLinks'] as Map)['smallThumbnail'] - as String)); - } - } - } - } - setState(() { - _books = books; - }); + final books = await _getBooks(query); + setState(() { + _books = books; }); } @override - Widget build(BuildContext context) => Scaffold( - appBar: AppBar( - title: const Text('Book Search'), - ), - body: Padding( - padding: const EdgeInsets.all(10), - child: Column( - children: [ - const SizedBox( - height: 20, - ), - TextField( - onChanged: _runSearch, - decoration: const InputDecoration( - labelText: 'Search', suffixIcon: Icon(Icons.search)), - ), - const SizedBox( - height: 20, - ), - Expanded( - child: _books.isNotEmpty - ? BookList(_books) - : const Text( - 'No results found', - style: TextStyle(fontSize: 24), - ), + Widget build(BuildContext context) { + final searchResult = _books == null + ? const Text('Please enter a query', style: TextStyle(fontSize: 24)) + : _books!.isNotEmpty + ? BookList(_books!) + : const Text('No results found', style: TextStyle(fontSize: 24)); + + return Scaffold( + appBar: AppBar(title: const Text('Book Search')), + body: Padding( + padding: const EdgeInsets.all(10), + child: Column( + children: [ + const SizedBox(height: 20), + TextField( + onChanged: _runSearch, + decoration: const InputDecoration( + labelText: 'Search', + suffixIcon: Icon(Icons.search), ), - ], - ), + ), + const SizedBox(height: 20), + Expanded(child: searchResult), + ], ), - ); + ), + ); + } } class BookList extends StatefulWidget { From b710035490d40ba144e6c5357cbcac43aecb3987 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 17 Aug 2022 15:23:23 -0700 Subject: [PATCH 153/448] Add the ability to control cupertino_http caching policy (#763) --- pkgs/cupertino_http/CHANGELOG.md | 6 +++++- .../url_session_configuration_test.dart | 9 ++++++++ pkgs/cupertino_http/lib/cupertino_http.dart | 21 +++++++++++++++++++ pkgs/cupertino_http/pubspec.yaml | 2 +- 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index d59253497a..d652cd3e4d 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,9 +1,13 @@ +## 0.0.4 + +* Add the ability to control caching policy. + ## 0.0.3 * Follow the project style in the example app. * Use `runWithClient` in the example app. * Add another README example -* + ## 0.0.2 * A single comment adjustment. diff --git a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart index 9107442912..8909c172bb 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart @@ -54,6 +54,15 @@ void testProperties(URLSessionConfiguration config) { config.httpShouldUsePipelining = false; expect(config.httpShouldUsePipelining, false); }); + test('requestCachePolicy', () { + config.requestCachePolicy = URLRequestCachePolicy.returnCacheDataDontLoad; + expect(config.requestCachePolicy, + URLRequestCachePolicy.returnCacheDataDontLoad); + config.requestCachePolicy = + URLRequestCachePolicy.reloadIgnoringLocalCacheData; + expect(config.requestCachePolicy, + URLRequestCachePolicy.reloadIgnoringLocalCacheData); + }); test('sessionSendsLaunchEvents', () { config.sessionSendsLaunchEvents = true; expect(config.sessionSendsLaunchEvents, true); diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 526fa91ddd..0ecd1d002c 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -50,6 +50,18 @@ enum HTTPCookieAcceptPolicy { httpCookieAcceptPolicyOnlyFromMainDocumentDomain, } +// Controls how response data is cached. +// +// See [URLRequestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequestcachepolicy). +enum URLRequestCachePolicy { + useProtocolCachePolicy, + reloadIgnoringLocalCacheData, + returnCacheDataElseLoad, + returnCacheDataDontLoad, + reloadIgnoringLocalAndRemoteCacheData, + reloadRevalidatingCacheData, +} + // Controls how [URLSessionTask] execute will proceed after the response is // received. // @@ -190,6 +202,14 @@ class URLSessionConfiguration set httpShouldUsePipelining(bool value) => _nsObject.HTTPShouldUsePipelining = value; + // Controls how to deal with response caching. + // + // See [NSURLSessionConfiguration.requestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411655-requestcachepolicy) + URLRequestCachePolicy get requestCachePolicy => + URLRequestCachePolicy.values[_nsObject.requestCachePolicy]; + set requestCachePolicy(URLRequestCachePolicy value) => + _nsObject.requestCachePolicy = value.index; + /// Whether the app should be resumed when background tasks complete. /// /// See [NSURLSessionConfiguration.sessionSendsLaunchEvents](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1617174-sessionsendslaunchevents) @@ -234,6 +254,7 @@ class URLSessionConfiguration 'httpCookieAcceptPolicy=$httpCookieAcceptPolicy ' 'httpShouldSetCookies=$httpShouldSetCookies ' 'httpShouldUsePipelining=$httpShouldUsePipelining ' + 'requestCachePolicy=$requestCachePolicy ' 'sessionSendsLaunchEvents=$sessionSendsLaunchEvents ' 'shouldUseExtendedBackgroundIdleMode=' '$shouldUseExtendedBackgroundIdleMode ' diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 2181b8a887..5a6fc6cfe8 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.0.3 +version: 0.0.4 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: From b2e7205cce82bff6acc347c3632b436625e618d7 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 18 Aug 2022 13:50:03 -0700 Subject: [PATCH 154/448] Add a http Client implementation based on Cronet (#747) --- .github/workflows/cronet.yml | 68 +++ README.md | 1 + pkgs/cronet_http/.gitattributes | 3 + pkgs/cronet_http/.gitignore | 2 + pkgs/cronet_http/.metadata | 30 ++ pkgs/cronet_http/LICENSE | 27 + pkgs/cronet_http/README.md | 6 + pkgs/cronet_http/analysis_options.yaml | 6 + pkgs/cronet_http/android/.gitignore | 9 + pkgs/cronet_http/android/build.gradle | 52 ++ pkgs/cronet_http/android/settings.gradle | 6 + .../android/src/main/AndroidManifest.xml | 3 + .../flutter/plugins/cronet_http/Messages.java | 504 ++++++++++++++++++ .../plugins/cronet_http/CronetHttpPlugin.kt | 182 +++++++ pkgs/cronet_http/cronet_http.iml | 19 + pkgs/cronet_http/example/.gitignore | 47 ++ pkgs/cronet_http/example/README.md | 3 + .../example/android/app/build.gradle | 70 +++ .../android/app/src/debug/AndroidManifest.xml | 4 + .../android/app/src/main/AndroidManifest.xml | 36 ++ .../plugins/GeneratedPluginRegistrant.java | 29 + .../cronet_http_example/MainActivity.kt | 6 + .../res/drawable-v21/launch_background.xml | 12 + .../main/res/drawable/launch_background.xml | 12 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values-night/styles.xml | 18 + .../app/src/main/res/values/styles.xml | 18 + .../app/src/profile/AndroidManifest.xml | 4 + pkgs/cronet_http/example/android/build.gradle | 31 ++ .../example/android/gradle.properties | 4 + .../android/gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 53636 bytes .../gradle/wrapper/gradle-wrapper.properties | 6 + pkgs/cronet_http/example/android/gradlew | 160 ++++++ pkgs/cronet_http/example/android/gradlew.bat | 90 ++++ .../example/android/local.properties | 3 + .../example/android/settings.gradle | 11 + .../client_conformance_test.dart | 23 + pkgs/cronet_http/example/lib/book.dart | 36 ++ pkgs/cronet_http/example/lib/main.dart | 135 +++++ pkgs/cronet_http/example/pubspec.yaml | 27 + pkgs/cronet_http/lib/cronet_client.dart | 107 ++++ pkgs/cronet_http/lib/src/messages.dart | 274 ++++++++++ pkgs/cronet_http/pigeons/messages.dart | 69 +++ pkgs/cronet_http/pubspec.yaml | 24 + pkgs/cronet_http/run_pigeon.sh | 11 + .../lib/http_client_conformance_tests.dart | 1 + 50 files changed, 2189 insertions(+) create mode 100644 .github/workflows/cronet.yml create mode 100644 pkgs/cronet_http/.gitattributes create mode 100644 pkgs/cronet_http/.gitignore create mode 100644 pkgs/cronet_http/.metadata create mode 100644 pkgs/cronet_http/LICENSE create mode 100644 pkgs/cronet_http/README.md create mode 100644 pkgs/cronet_http/analysis_options.yaml create mode 100644 pkgs/cronet_http/android/.gitignore create mode 100644 pkgs/cronet_http/android/build.gradle create mode 100644 pkgs/cronet_http/android/settings.gradle create mode 100644 pkgs/cronet_http/android/src/main/AndroidManifest.xml create mode 100644 pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java create mode 100644 pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt create mode 100644 pkgs/cronet_http/cronet_http.iml create mode 100644 pkgs/cronet_http/example/.gitignore create mode 100644 pkgs/cronet_http/example/README.md create mode 100644 pkgs/cronet_http/example/android/app/build.gradle create mode 100644 pkgs/cronet_http/example/android/app/src/debug/AndroidManifest.xml create mode 100644 pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml create mode 100644 pkgs/cronet_http/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java create mode 100644 pkgs/cronet_http/example/android/app/src/main/kotlin/com/example/cronet_http_example/MainActivity.kt create mode 100644 pkgs/cronet_http/example/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 pkgs/cronet_http/example/android/app/src/main/res/drawable/launch_background.xml create mode 100644 pkgs/cronet_http/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 pkgs/cronet_http/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 pkgs/cronet_http/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 pkgs/cronet_http/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 pkgs/cronet_http/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 pkgs/cronet_http/example/android/app/src/main/res/values-night/styles.xml create mode 100644 pkgs/cronet_http/example/android/app/src/main/res/values/styles.xml create mode 100644 pkgs/cronet_http/example/android/app/src/profile/AndroidManifest.xml create mode 100644 pkgs/cronet_http/example/android/build.gradle create mode 100644 pkgs/cronet_http/example/android/gradle.properties create mode 100644 pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.jar create mode 100644 pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties create mode 100755 pkgs/cronet_http/example/android/gradlew create mode 100644 pkgs/cronet_http/example/android/gradlew.bat create mode 100644 pkgs/cronet_http/example/android/local.properties create mode 100644 pkgs/cronet_http/example/android/settings.gradle create mode 100644 pkgs/cronet_http/example/integration_test/client_conformance_test.dart create mode 100644 pkgs/cronet_http/example/lib/book.dart create mode 100644 pkgs/cronet_http/example/lib/main.dart create mode 100644 pkgs/cronet_http/example/pubspec.yaml create mode 100644 pkgs/cronet_http/lib/cronet_client.dart create mode 100644 pkgs/cronet_http/lib/src/messages.dart create mode 100644 pkgs/cronet_http/pigeons/messages.dart create mode 100644 pkgs/cronet_http/pubspec.yaml create mode 100755 pkgs/cronet_http/run_pigeon.sh diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml new file mode 100644 index 0000000000..dd152b8d9c --- /dev/null +++ b/.github/workflows/cronet.yml @@ -0,0 +1,68 @@ +name: package:cronet_http CI + +on: + push: + branches: + - main + - master + paths: + - 'pkgs/cronet_http/**' + - 'pkgs/http_client_conformance_tests/**' + pull_request: + paths: + - 'pkgs/cronet_http/**' + - 'pkgs/http_client_conformance_tests/**' + schedule: + - cron: "0 0 * * 0" + +env: + PUB_ENVIRONMENT: bot.github + +jobs: + analyze: + name: Lint and static analysis + runs-on: ubuntu-latest + defaults: + run: + working-directory: pkgs/cronet_http + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + # TODO: Change to 'stable' when a release version of flutter + # pins version 1.21.1 or later of 'package:test' + channel: 'master' + - id: install + name: Install dependencies + run: flutter pub get + - name: Check formatting + run: flutter format --output=none --set-exit-if-changed . + if: always() && steps.install.outcome == 'success' + - name: Analyze code + run: flutter analyze --fatal-infos + if: always() && steps.install.outcome == 'success' + + test: + # Test package:cupertino_http use flutter integration tests. + needs: analyze + name: "Build and test" + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: '17' + - uses: subosito/flutter-action@v2 + with: + # TODO: Change to 'stable' when a release version of flutter + # pins version 1.21.1 or later of 'package:test' + channel: 'master' + - name: Run tests + uses: reactivecircus/android-emulator-runner@v2 + with: + api-level: 32 + target: playstore + arch: x86_64 + profile: pixel + script: cd ./pkgs/cronet_http/example && flutter pub get && flutter --version && flutter -v test integration_test/ diff --git a/README.md b/README.md index c0a299ad89..0e9101d364 100644 --- a/README.md +++ b/README.md @@ -12,4 +12,5 @@ and the browser. |---|---|---| | [http](pkgs/http/) | A composable, multi-platform, Future-based API for HTTP requests. | [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) | | [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | A library that tests whether implementations of package:http's `Client` class behave as expected. | | +| [cronet_http](pkgs/cronet_http/) | An Android Flutter plugin that provides access to the [Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) HTTP client. | | | [cupertino_http](pkgs/cupertino_http/) | A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). | [![pub package](https://img.shields.io/pub/v/cupertino_http.svg)](https://pub.dev/packages/cupertino_http) | diff --git a/pkgs/cronet_http/.gitattributes b/pkgs/cronet_http/.gitattributes new file mode 100644 index 0000000000..c788da1c7b --- /dev/null +++ b/pkgs/cronet_http/.gitattributes @@ -0,0 +1,3 @@ +# pigeon generated code +lib/src/messages.dart linguist-generated +android/src/main/java/io/flutter/plugins/cronet_http/Messages.java diff --git a/pkgs/cronet_http/.gitignore b/pkgs/cronet_http/.gitignore new file mode 100644 index 0000000000..9f2a078806 --- /dev/null +++ b/pkgs/cronet_http/.gitignore @@ -0,0 +1,2 @@ +build/ +.gradle/ diff --git a/pkgs/cronet_http/.metadata b/pkgs/cronet_http/.metadata new file mode 100644 index 0000000000..93fddf202a --- /dev/null +++ b/pkgs/cronet_http/.metadata @@ -0,0 +1,30 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled. + +version: + revision: 85684f9300908116a78138ea4c6036c35c9a1236 + channel: stable + +project_type: plugin + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 85684f9300908116a78138ea4c6036c35c9a1236 + base_revision: 85684f9300908116a78138ea4c6036c35c9a1236 + - platform: android + create_revision: 85684f9300908116a78138ea4c6036c35c9a1236 + base_revision: 85684f9300908116a78138ea4c6036c35c9a1236 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/pkgs/cronet_http/LICENSE b/pkgs/cronet_http/LICENSE new file mode 100644 index 0000000000..59f5c75b6d --- /dev/null +++ b/pkgs/cronet_http/LICENSE @@ -0,0 +1,27 @@ +Copyright 2022, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/pkgs/cronet_http/README.md b/pkgs/cronet_http/README.md new file mode 100644 index 0000000000..9d16edc053 --- /dev/null +++ b/pkgs/cronet_http/README.md @@ -0,0 +1,6 @@ +An Android Flutter plugin that provides access to the +[Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) +HTTP client. + +Cronet is available as part of +[Google Play Services](https://developers.google.com/android/guides/overview). diff --git a/pkgs/cronet_http/analysis_options.yaml b/pkgs/cronet_http/analysis_options.yaml new file mode 100644 index 0000000000..c1356dedc6 --- /dev/null +++ b/pkgs/cronet_http/analysis_options.yaml @@ -0,0 +1,6 @@ +include: ../../analysis_options.yaml + +analyzer: + exclude: + - lib/src/messages.dart + - pigeons/messages.dart diff --git a/pkgs/cronet_http/android/.gitignore b/pkgs/cronet_http/android/.gitignore new file mode 100644 index 0000000000..161bdcdaf8 --- /dev/null +++ b/pkgs/cronet_http/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/pkgs/cronet_http/android/build.gradle b/pkgs/cronet_http/android/build.gradle new file mode 100644 index 0000000000..665c659da5 --- /dev/null +++ b/pkgs/cronet_http/android/build.gradle @@ -0,0 +1,52 @@ +group 'io.flutter.plugins.cronet_http' +version '1.0-SNAPSHOT' + +buildscript { + ext.kotlin_version = '1.6.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.1.2' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +rootProject.allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +android { + compileSdkVersion 31 + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + main.java.srcDirs += 'src/main/java' + } + + defaultConfig { + minSdkVersion 16 + } +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "com.google.android.gms:play-services-cronet:18.0.1" +} diff --git a/pkgs/cronet_http/android/settings.gradle b/pkgs/cronet_http/android/settings.gradle new file mode 100644 index 0000000000..3a57f65f76 --- /dev/null +++ b/pkgs/cronet_http/android/settings.gradle @@ -0,0 +1,6 @@ +rootProject.name = 'cronet_http' +dependencyResolutionManagement { + repositories { + google() + } +} \ No newline at end of file diff --git a/pkgs/cronet_http/android/src/main/AndroidManifest.xml b/pkgs/cronet_http/android/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..3df617b3ac --- /dev/null +++ b/pkgs/cronet_http/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java b/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java new file mode 100644 index 0000000000..14610d3d8e --- /dev/null +++ b/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java @@ -0,0 +1,504 @@ +// Autogenerated from Pigeon (v3.2.3), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package io.flutter.plugins.cronet_http; + +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.plugin.common.BasicMessageChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MessageCodec; +import io.flutter.plugin.common.StandardMessageCodec; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.HashMap; + +/** Generated class from Pigeon. */ +@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression"}) +public class Messages { + + public enum EventMessageType { + responseStarted(0), + readCompleted(1), + tooManyRedirects(2); + + private int index; + private EventMessageType(final int index) { + this.index = index; + } + } + + /** Generated class from Pigeon that represents data sent in messages. */ + public static class ResponseStarted { + private @NonNull Map> headers; + public @NonNull Map> getHeaders() { return headers; } + public void setHeaders(@NonNull Map> setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"headers\" is null."); + } + this.headers = setterArg; + } + + private @NonNull Long statusCode; + public @NonNull Long getStatusCode() { return statusCode; } + public void setStatusCode(@NonNull Long setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"statusCode\" is null."); + } + this.statusCode = setterArg; + } + + private @NonNull Boolean isRedirect; + public @NonNull Boolean getIsRedirect() { return isRedirect; } + public void setIsRedirect(@NonNull Boolean setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"isRedirect\" is null."); + } + this.isRedirect = setterArg; + } + + /** Constructor is private to enforce null safety; use Builder. */ + private ResponseStarted() {} + public static final class Builder { + private @Nullable Map> headers; + public @NonNull Builder setHeaders(@NonNull Map> setterArg) { + this.headers = setterArg; + return this; + } + private @Nullable Long statusCode; + public @NonNull Builder setStatusCode(@NonNull Long setterArg) { + this.statusCode = setterArg; + return this; + } + private @Nullable Boolean isRedirect; + public @NonNull Builder setIsRedirect(@NonNull Boolean setterArg) { + this.isRedirect = setterArg; + return this; + } + public @NonNull ResponseStarted build() { + ResponseStarted pigeonReturn = new ResponseStarted(); + pigeonReturn.setHeaders(headers); + pigeonReturn.setStatusCode(statusCode); + pigeonReturn.setIsRedirect(isRedirect); + return pigeonReturn; + } + } + @NonNull Map toMap() { + Map toMapResult = new HashMap<>(); + toMapResult.put("headers", headers); + toMapResult.put("statusCode", statusCode); + toMapResult.put("isRedirect", isRedirect); + return toMapResult; + } + static @NonNull ResponseStarted fromMap(@NonNull Map map) { + ResponseStarted pigeonResult = new ResponseStarted(); + Object headers = map.get("headers"); + pigeonResult.setHeaders((Map>)headers); + Object statusCode = map.get("statusCode"); + pigeonResult.setStatusCode((statusCode == null) ? null : ((statusCode instanceof Integer) ? (Integer)statusCode : (Long)statusCode)); + Object isRedirect = map.get("isRedirect"); + pigeonResult.setIsRedirect((Boolean)isRedirect); + return pigeonResult; + } + } + + /** Generated class from Pigeon that represents data sent in messages. */ + public static class ReadCompleted { + private @NonNull byte[] data; + public @NonNull byte[] getData() { return data; } + public void setData(@NonNull byte[] setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"data\" is null."); + } + this.data = setterArg; + } + + /** Constructor is private to enforce null safety; use Builder. */ + private ReadCompleted() {} + public static final class Builder { + private @Nullable byte[] data; + public @NonNull Builder setData(@NonNull byte[] setterArg) { + this.data = setterArg; + return this; + } + public @NonNull ReadCompleted build() { + ReadCompleted pigeonReturn = new ReadCompleted(); + pigeonReturn.setData(data); + return pigeonReturn; + } + } + @NonNull Map toMap() { + Map toMapResult = new HashMap<>(); + toMapResult.put("data", data); + return toMapResult; + } + static @NonNull ReadCompleted fromMap(@NonNull Map map) { + ReadCompleted pigeonResult = new ReadCompleted(); + Object data = map.get("data"); + pigeonResult.setData((byte[])data); + return pigeonResult; + } + } + + /** Generated class from Pigeon that represents data sent in messages. */ + public static class EventMessage { + private @NonNull EventMessageType type; + public @NonNull EventMessageType getType() { return type; } + public void setType(@NonNull EventMessageType setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"type\" is null."); + } + this.type = setterArg; + } + + private @Nullable ResponseStarted responseStarted; + public @Nullable ResponseStarted getResponseStarted() { return responseStarted; } + public void setResponseStarted(@Nullable ResponseStarted setterArg) { + this.responseStarted = setterArg; + } + + private @Nullable ReadCompleted readCompleted; + public @Nullable ReadCompleted getReadCompleted() { return readCompleted; } + public void setReadCompleted(@Nullable ReadCompleted setterArg) { + this.readCompleted = setterArg; + } + + /** Constructor is private to enforce null safety; use Builder. */ + private EventMessage() {} + public static final class Builder { + private @Nullable EventMessageType type; + public @NonNull Builder setType(@NonNull EventMessageType setterArg) { + this.type = setterArg; + return this; + } + private @Nullable ResponseStarted responseStarted; + public @NonNull Builder setResponseStarted(@Nullable ResponseStarted setterArg) { + this.responseStarted = setterArg; + return this; + } + private @Nullable ReadCompleted readCompleted; + public @NonNull Builder setReadCompleted(@Nullable ReadCompleted setterArg) { + this.readCompleted = setterArg; + return this; + } + public @NonNull EventMessage build() { + EventMessage pigeonReturn = new EventMessage(); + pigeonReturn.setType(type); + pigeonReturn.setResponseStarted(responseStarted); + pigeonReturn.setReadCompleted(readCompleted); + return pigeonReturn; + } + } + @NonNull Map toMap() { + Map toMapResult = new HashMap<>(); + toMapResult.put("type", type == null ? null : type.index); + toMapResult.put("responseStarted", (responseStarted == null) ? null : responseStarted.toMap()); + toMapResult.put("readCompleted", (readCompleted == null) ? null : readCompleted.toMap()); + return toMapResult; + } + static @NonNull EventMessage fromMap(@NonNull Map map) { + EventMessage pigeonResult = new EventMessage(); + Object type = map.get("type"); + pigeonResult.setType(type == null ? null : EventMessageType.values()[(int)type]); + Object responseStarted = map.get("responseStarted"); + pigeonResult.setResponseStarted((responseStarted == null) ? null : ResponseStarted.fromMap((Map)responseStarted)); + Object readCompleted = map.get("readCompleted"); + pigeonResult.setReadCompleted((readCompleted == null) ? null : ReadCompleted.fromMap((Map)readCompleted)); + return pigeonResult; + } + } + + /** Generated class from Pigeon that represents data sent in messages. */ + public static class StartRequest { + private @NonNull String url; + public @NonNull String getUrl() { return url; } + public void setUrl(@NonNull String setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"url\" is null."); + } + this.url = setterArg; + } + + private @NonNull String method; + public @NonNull String getMethod() { return method; } + public void setMethod(@NonNull String setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"method\" is null."); + } + this.method = setterArg; + } + + private @NonNull Map headers; + public @NonNull Map getHeaders() { return headers; } + public void setHeaders(@NonNull Map setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"headers\" is null."); + } + this.headers = setterArg; + } + + private @NonNull byte[] body; + public @NonNull byte[] getBody() { return body; } + public void setBody(@NonNull byte[] setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"body\" is null."); + } + this.body = setterArg; + } + + private @NonNull Long maxRedirects; + public @NonNull Long getMaxRedirects() { return maxRedirects; } + public void setMaxRedirects(@NonNull Long setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"maxRedirects\" is null."); + } + this.maxRedirects = setterArg; + } + + private @NonNull Boolean followRedirects; + public @NonNull Boolean getFollowRedirects() { return followRedirects; } + public void setFollowRedirects(@NonNull Boolean setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"followRedirects\" is null."); + } + this.followRedirects = setterArg; + } + + /** Constructor is private to enforce null safety; use Builder. */ + private StartRequest() {} + public static final class Builder { + private @Nullable String url; + public @NonNull Builder setUrl(@NonNull String setterArg) { + this.url = setterArg; + return this; + } + private @Nullable String method; + public @NonNull Builder setMethod(@NonNull String setterArg) { + this.method = setterArg; + return this; + } + private @Nullable Map headers; + public @NonNull Builder setHeaders(@NonNull Map setterArg) { + this.headers = setterArg; + return this; + } + private @Nullable byte[] body; + public @NonNull Builder setBody(@NonNull byte[] setterArg) { + this.body = setterArg; + return this; + } + private @Nullable Long maxRedirects; + public @NonNull Builder setMaxRedirects(@NonNull Long setterArg) { + this.maxRedirects = setterArg; + return this; + } + private @Nullable Boolean followRedirects; + public @NonNull Builder setFollowRedirects(@NonNull Boolean setterArg) { + this.followRedirects = setterArg; + return this; + } + public @NonNull StartRequest build() { + StartRequest pigeonReturn = new StartRequest(); + pigeonReturn.setUrl(url); + pigeonReturn.setMethod(method); + pigeonReturn.setHeaders(headers); + pigeonReturn.setBody(body); + pigeonReturn.setMaxRedirects(maxRedirects); + pigeonReturn.setFollowRedirects(followRedirects); + return pigeonReturn; + } + } + @NonNull Map toMap() { + Map toMapResult = new HashMap<>(); + toMapResult.put("url", url); + toMapResult.put("method", method); + toMapResult.put("headers", headers); + toMapResult.put("body", body); + toMapResult.put("maxRedirects", maxRedirects); + toMapResult.put("followRedirects", followRedirects); + return toMapResult; + } + static @NonNull StartRequest fromMap(@NonNull Map map) { + StartRequest pigeonResult = new StartRequest(); + Object url = map.get("url"); + pigeonResult.setUrl((String)url); + Object method = map.get("method"); + pigeonResult.setMethod((String)method); + Object headers = map.get("headers"); + pigeonResult.setHeaders((Map)headers); + Object body = map.get("body"); + pigeonResult.setBody((byte[])body); + Object maxRedirects = map.get("maxRedirects"); + pigeonResult.setMaxRedirects((maxRedirects == null) ? null : ((maxRedirects instanceof Integer) ? (Integer)maxRedirects : (Long)maxRedirects)); + Object followRedirects = map.get("followRedirects"); + pigeonResult.setFollowRedirects((Boolean)followRedirects); + return pigeonResult; + } + } + + /** Generated class from Pigeon that represents data sent in messages. */ + public static class StartResponse { + private @NonNull String eventChannel; + public @NonNull String getEventChannel() { return eventChannel; } + public void setEventChannel(@NonNull String setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"eventChannel\" is null."); + } + this.eventChannel = setterArg; + } + + /** Constructor is private to enforce null safety; use Builder. */ + private StartResponse() {} + public static final class Builder { + private @Nullable String eventChannel; + public @NonNull Builder setEventChannel(@NonNull String setterArg) { + this.eventChannel = setterArg; + return this; + } + public @NonNull StartResponse build() { + StartResponse pigeonReturn = new StartResponse(); + pigeonReturn.setEventChannel(eventChannel); + return pigeonReturn; + } + } + @NonNull Map toMap() { + Map toMapResult = new HashMap<>(); + toMapResult.put("eventChannel", eventChannel); + return toMapResult; + } + static @NonNull StartResponse fromMap(@NonNull Map map) { + StartResponse pigeonResult = new StartResponse(); + Object eventChannel = map.get("eventChannel"); + pigeonResult.setEventChannel((String)eventChannel); + return pigeonResult; + } + } + private static class HttpApiCodec extends StandardMessageCodec { + public static final HttpApiCodec INSTANCE = new HttpApiCodec(); + private HttpApiCodec() {} + @Override + protected Object readValueOfType(byte type, ByteBuffer buffer) { + switch (type) { + case (byte)128: + return EventMessage.fromMap((Map) readValue(buffer)); + + case (byte)129: + return ReadCompleted.fromMap((Map) readValue(buffer)); + + case (byte)130: + return ResponseStarted.fromMap((Map) readValue(buffer)); + + case (byte)131: + return StartRequest.fromMap((Map) readValue(buffer)); + + case (byte)132: + return StartResponse.fromMap((Map) readValue(buffer)); + + default: + return super.readValueOfType(type, buffer); + + } + } + @Override + protected void writeValue(ByteArrayOutputStream stream, Object value) { + if (value instanceof EventMessage) { + stream.write(128); + writeValue(stream, ((EventMessage) value).toMap()); + } else + if (value instanceof ReadCompleted) { + stream.write(129); + writeValue(stream, ((ReadCompleted) value).toMap()); + } else + if (value instanceof ResponseStarted) { + stream.write(130); + writeValue(stream, ((ResponseStarted) value).toMap()); + } else + if (value instanceof StartRequest) { + stream.write(131); + writeValue(stream, ((StartRequest) value).toMap()); + } else + if (value instanceof StartResponse) { + stream.write(132); + writeValue(stream, ((StartResponse) value).toMap()); + } else +{ + super.writeValue(stream, value); + } + } + } + + /** Generated interface from Pigeon that represents a handler of messages from Flutter.*/ + public interface HttpApi { + @NonNull StartResponse start(@NonNull StartRequest request); + void dummy(@NonNull EventMessage message); + + /** The codec used by HttpApi. */ + static MessageCodec getCodec() { + return HttpApiCodec.INSTANCE; + } + + /** Sets up an instance of `HttpApi` to handle messages through the `binaryMessenger`. */ + static void setup(BinaryMessenger binaryMessenger, HttpApi api) { + { + BasicMessageChannel channel = + new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.HttpApi.start", getCodec()); + if (api != null) { + channel.setMessageHandler((message, reply) -> { + Map wrapped = new HashMap<>(); + try { + ArrayList args = (ArrayList)message; + StartRequest requestArg = (StartRequest)args.get(0); + if (requestArg == null) { + throw new NullPointerException("requestArg unexpectedly null."); + } + StartResponse output = api.start(requestArg); + wrapped.put("result", output); + } + catch (Error | RuntimeException exception) { + wrapped.put("error", wrapError(exception)); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.HttpApi.dummy", getCodec()); + if (api != null) { + channel.setMessageHandler((message, reply) -> { + Map wrapped = new HashMap<>(); + try { + ArrayList args = (ArrayList)message; + EventMessage messageArg = (EventMessage)args.get(0); + if (messageArg == null) { + throw new NullPointerException("messageArg unexpectedly null."); + } + api.dummy(messageArg); + wrapped.put("result", null); + } + catch (Error | RuntimeException exception) { + wrapped.put("error", wrapError(exception)); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + } + } + private static Map wrapError(Throwable exception) { + Map errorMap = new HashMap<>(); + errorMap.put("message", exception.toString()); + errorMap.put("code", exception.getClass().getSimpleName()); + errorMap.put("details", "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + return errorMap; + } +} diff --git a/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt b/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt new file mode 100644 index 0000000000..5a6433195b --- /dev/null +++ b/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt @@ -0,0 +1,182 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +package io.flutter.plugins.cronet_http + +import android.os.Handler +import android.os.Looper +import androidx.annotation.NonNull +import io.flutter.embedding.engine.plugins.FlutterPlugin +import io.flutter.plugin.common.EventChannel +import org.chromium.net.CronetEngine +import org.chromium.net.CronetException +import org.chromium.net.UploadDataProviders +import org.chromium.net.UrlRequest +import org.chromium.net.UrlResponseInfo +import java.nio.ByteBuffer +import java.util.concurrent.Executors +import java.util.concurrent.atomic.AtomicInteger + +class CronetHttpPlugin : FlutterPlugin, Messages.HttpApi { + private lateinit var flutterPluginBinding: FlutterPlugin.FlutterPluginBinding + private lateinit var cronetEngine: CronetEngine + + private val executor = Executors.newCachedThreadPool() + private val mainThreadHandler = Handler(Looper.getMainLooper()) + private val channelId = AtomicInteger(0) + + override fun onAttachedToEngine( + @NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding + ) { + Messages.HttpApi.setup(flutterPluginBinding.binaryMessenger, this) + this.flutterPluginBinding = flutterPluginBinding + val context = flutterPluginBinding.getApplicationContext() + + // TODO: Move the Cronet initialization elsewhere so that failures (e.g. because the device + // doesn't have Google Play services) can be communicated to the Dart client. + val builder = CronetEngine.Builder(context) + cronetEngine = builder.build() + } + + override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { + Messages.HttpApi.setup(binding.binaryMessenger, null) + } + + override fun start(startRequest: Messages.StartRequest): Messages.StartResponse { + // Create a unique channel to communicate Cronet events to the Dart client code with. + val channelName = "plugins.flutter.io/cronet_event/" + channelId.incrementAndGet() + val eventChannel = EventChannel(flutterPluginBinding.binaryMessenger, channelName) + lateinit var eventSink: EventChannel.EventSink + var numRedirects = 0 + + val cronetRequest = + cronetEngine.newUrlRequestBuilder( + startRequest.url, + object : UrlRequest.Callback() { + override fun onRedirectReceived( + request: UrlRequest, + info: UrlResponseInfo, + newLocationUrl: String + ) { + if (!startRequest.getFollowRedirects()) { + request.cancel() + mainThreadHandler.post({ + eventSink.success( + Messages.EventMessage.Builder() + .setType(Messages.EventMessageType.responseStarted) + .setResponseStarted( + Messages.ResponseStarted.Builder() + .setStatusCode(info.getHttpStatusCode().toLong()) + .setHeaders(info.getAllHeaders()) + .setIsRedirect(true) + .build() + ) + .build() + .toMap() + ) + }) + } + ++numRedirects + if (numRedirects <= startRequest.getMaxRedirects()) { + request.followRedirect() + } else { + request.cancel() + mainThreadHandler.post({ + eventSink.success( + Messages.EventMessage.Builder() + .setType(Messages.EventMessageType.tooManyRedirects) + .build() + .toMap() + ) + }) + } + } + + override fun onResponseStarted(request: UrlRequest?, info: UrlResponseInfo) { + mainThreadHandler.post({ + eventSink.success( + Messages.EventMessage.Builder() + .setType(Messages.EventMessageType.responseStarted) + .setResponseStarted( + Messages.ResponseStarted.Builder() + .setStatusCode(info.getHttpStatusCode().toLong()) + .setHeaders(info.getAllHeaders()) + .setIsRedirect(false) + .build() + ) + .build() + .toMap() + ) + }) + request?.read(ByteBuffer.allocateDirect(1024 * 1024)) + } + + override fun onReadCompleted( + request: UrlRequest, + info: UrlResponseInfo, + byteBuffer: ByteBuffer + ) { + byteBuffer.flip() + val b = ByteArray(byteBuffer.remaining()) + byteBuffer.get(b) + mainThreadHandler.post({ + eventSink.success( + Messages.EventMessage.Builder() + .setType(Messages.EventMessageType.readCompleted) + .setReadCompleted(Messages.ReadCompleted.Builder().setData(b).build()) + .build() + .toMap() + ) + }) + byteBuffer.clear() + request?.read(byteBuffer) + } + + override fun onSucceeded(request: UrlRequest, info: UrlResponseInfo?) { + mainThreadHandler.post({ eventSink.endOfStream() }) + } + + override fun onFailed( + request: UrlRequest, + info: UrlResponseInfo, + error: CronetException + ) { + mainThreadHandler.post({ eventSink.error("CronetException", error.toString(), null) }) + } + }, + executor + ) + + if (startRequest.getBody().size > 0) { + cronetRequest.setUploadDataProvider( + UploadDataProviders.create(startRequest.getBody()), + executor + ) + } + cronetRequest.setHttpMethod(startRequest.getMethod()) + for ((key, value) in startRequest.getHeaders()) { + cronetRequest.addHeader(key, value) + } + + // Don't start the Cronet request until the Dart client code is listening for events. + val streamHandler = + object : EventChannel.StreamHandler { + override fun onListen(arguments: Any?, events: EventChannel.EventSink) { + eventSink = events + try { + cronetRequest.build().start() + } catch (e: Exception) { + mainThreadHandler.post({ eventSink.error("CronetException", e.toString(), null) }) + } + } + + override fun onCancel(arguments: Any?) {} + } + eventChannel.setStreamHandler(streamHandler) + + return Messages.StartResponse.Builder().setEventChannel(channelName).build() + } + + override fun dummy(arg1: Messages.EventMessage) {} +} diff --git a/pkgs/cronet_http/cronet_http.iml b/pkgs/cronet_http/cronet_http.iml new file mode 100644 index 0000000000..39cce21274 --- /dev/null +++ b/pkgs/cronet_http/cronet_http.iml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/cronet_http/example/.gitignore b/pkgs/cronet_http/example/.gitignore new file mode 100644 index 0000000000..a8e938c083 --- /dev/null +++ b/pkgs/cronet_http/example/.gitignore @@ -0,0 +1,47 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/pkgs/cronet_http/example/README.md b/pkgs/cronet_http/example/README.md new file mode 100644 index 0000000000..02f1853c17 --- /dev/null +++ b/pkgs/cronet_http/example/README.md @@ -0,0 +1,3 @@ +# cronet_http_example + +Demonstrates how to use the cronet_http plugin. diff --git a/pkgs/cronet_http/example/android/app/build.gradle b/pkgs/cronet_http/example/android/app/build.gradle new file mode 100644 index 0000000000..d42d02a0da --- /dev/null +++ b/pkgs/cronet_http/example/android/app/build.gradle @@ -0,0 +1,70 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + applicationId "io.flutter.cronet_http_example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/pkgs/cronet_http/example/android/app/src/debug/AndroidManifest.xml b/pkgs/cronet_http/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000000..b17be9f3cb --- /dev/null +++ b/pkgs/cronet_http/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + diff --git a/pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml b/pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..e8d5f3f208 --- /dev/null +++ b/pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + diff --git a/pkgs/cronet_http/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/pkgs/cronet_http/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java new file mode 100644 index 0000000000..90015fdc18 --- /dev/null +++ b/pkgs/cronet_http/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -0,0 +1,29 @@ +package io.flutter.plugins; + +import androidx.annotation.Keep; +import androidx.annotation.NonNull; +import io.flutter.Log; + +import io.flutter.embedding.engine.FlutterEngine; + +/** + * Generated file. Do not edit. + * This file is generated by the Flutter tool based on the + * plugins that support the Android platform. + */ +@Keep +public final class GeneratedPluginRegistrant { + private static final String TAG = "GeneratedPluginRegistrant"; + public static void registerWith(@NonNull FlutterEngine flutterEngine) { + try { + flutterEngine.getPlugins().add(new io.flutter.plugins.cronet_http.CronetHttpPlugin()); + } catch(Exception e) { + Log.e(TAG, "Error registering plugin cronet_http, io.flutter.plugins.cronet_http.CronetHttpPlugin", e); + } + try { + flutterEngine.getPlugins().add(new dev.flutter.plugins.integration_test.IntegrationTestPlugin()); + } catch(Exception e) { + Log.e(TAG, "Error registering plugin integration_test, dev.flutter.plugins.integration_test.IntegrationTestPlugin", e); + } + } +} diff --git a/pkgs/cronet_http/example/android/app/src/main/kotlin/com/example/cronet_http_example/MainActivity.kt b/pkgs/cronet_http/example/android/app/src/main/kotlin/com/example/cronet_http_example/MainActivity.kt new file mode 100644 index 0000000000..2688c93517 --- /dev/null +++ b/pkgs/cronet_http/example/android/app/src/main/kotlin/com/example/cronet_http_example/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.cronet_http_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/pkgs/cronet_http/example/android/app/src/main/res/drawable-v21/launch_background.xml b/pkgs/cronet_http/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000000..f74085f3f6 --- /dev/null +++ b/pkgs/cronet_http/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/pkgs/cronet_http/example/android/app/src/main/res/drawable/launch_background.xml b/pkgs/cronet_http/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000000..304732f884 --- /dev/null +++ b/pkgs/cronet_http/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/pkgs/cronet_http/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/pkgs/cronet_http/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/pkgs/cronet_http/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/pkgs/cronet_http/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/pkgs/cronet_http/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/pkgs/cronet_http/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/pkgs/cronet_http/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/pkgs/cronet_http/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/pkgs/cronet_http/example/android/app/src/main/res/values-night/styles.xml b/pkgs/cronet_http/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000000..06952be745 --- /dev/null +++ b/pkgs/cronet_http/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/pkgs/cronet_http/example/android/app/src/main/res/values/styles.xml b/pkgs/cronet_http/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000..cb1ef88056 --- /dev/null +++ b/pkgs/cronet_http/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/pkgs/cronet_http/example/android/app/src/profile/AndroidManifest.xml b/pkgs/cronet_http/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000000..b17be9f3cb --- /dev/null +++ b/pkgs/cronet_http/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + diff --git a/pkgs/cronet_http/example/android/build.gradle b/pkgs/cronet_http/example/android/build.gradle new file mode 100644 index 0000000000..83ae220041 --- /dev/null +++ b/pkgs/cronet_http/example/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.6.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.1.2' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/pkgs/cronet_http/example/android/gradle.properties b/pkgs/cronet_http/example/android/gradle.properties new file mode 100644 index 0000000000..dda9ad986c --- /dev/null +++ b/pkgs/cronet_http/example/android/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx1536M +org.gradle.caching=true +android.useAndroidX=true +android.enableJetifier=true diff --git a/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.jar b/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000000000000000000000000000000000000..13372aef5e24af05341d49695ee84e5f9b594659 GIT binary patch literal 53636 zcmafaW0a=B^559DjdyHo$F^PVt zzd|cWgMz^T0YO0lQ8%TE1O06v|NZl~LH{LLQ58WtNjWhFP#}eWVO&eiP!jmdp!%24 z{&z-MK{-h=QDqf+S+Pgi=_wg$I{F28X*%lJ>A7Yl#$}fMhymMu?R9TEB?#6@|Q^e^AHhxcRL$z1gsc`-Q`3j+eYAd<4@z^{+?JM8bmu zSVlrVZ5-)SzLn&LU9GhXYG{{I+u(+6ES+tAtQUanYC0^6kWkks8cG;C&r1KGs)Cq}WZSd3k1c?lkzwLySimkP5z)T2Ox3pNs;PdQ=8JPDkT7#0L!cV? zzn${PZs;o7UjcCVd&DCDpFJvjI=h(KDmdByJuDYXQ|G@u4^Kf?7YkE67fWM97kj6F z973tGtv!k$k{<>jd~D&c(x5hVbJa`bILdy(00%lY5}HZ2N>)a|))3UZ&fUa5@uB`H z+LrYm@~t?g`9~@dFzW5l>=p0hG%rv0>(S}jEzqQg6-jImG%Pr%HPtqIV_Ym6yRydW z4L+)NhcyYp*g#vLH{1lK-hQQSScfvNiNx|?nSn-?cc8}-9~Z_0oxlr~(b^EiD`Mx< zlOLK)MH?nl4dD|hx!jBCIku-lI(&v~bCU#!L7d0{)h z;k4y^X+=#XarKzK*)lv0d6?kE1< zmCG^yDYrSwrKIn04tG)>>10%+ zEKzs$S*Zrl+GeE55f)QjY$ zD5hi~J17k;4VSF_`{lPFwf^Qroqg%kqM+Pdn%h#oOPIsOIwu?JR717atg~!)*CgXk zERAW?c}(66rnI+LqM^l7BW|9dH~5g1(_w$;+AAzSYlqop*=u5}=g^e0xjlWy0cUIT7{Fs2Xqx*8% zW71JB%hk%aV-wjNE0*$;E-S9hRx5|`L2JXxz4TX3nf8fMAn|523ssV;2&145zh{$V z#4lt)vL2%DCZUgDSq>)ei2I`*aeNXHXL1TB zC8I4!uq=YYVjAdcCjcf4XgK2_$y5mgsCdcn2U!VPljXHco>+%`)6W=gzJk0$e%m$xWUCs&Ju-nUJjyQ04QF_moED2(y6q4l+~fo845xm zE5Esx?~o#$;rzpCUk2^2$c3EBRNY?wO(F3Pb+<;qfq;JhMFuSYSxiMejBQ+l8(C-- zz?Xufw@7{qvh$;QM0*9tiO$nW(L>83egxc=1@=9Z3)G^+*JX-z92F((wYiK>f;6 zkc&L6k4Ua~FFp`x7EF;ef{hb*n8kx#LU|6{5n=A55R4Ik#sX{-nuQ}m7e<{pXq~8#$`~6| zi{+MIgsBRR-o{>)CE8t0Bq$|SF`M0$$7-{JqwFI1)M^!GMwq5RAWMP!o6G~%EG>$S zYDS?ux;VHhRSm*b^^JukYPVb?t0O%^&s(E7Rb#TnsWGS2#FdTRj_SR~YGjkaRFDI=d)+bw$rD;_!7&P2WEmn zIqdERAbL&7`iA^d?8thJ{(=)v>DgTF7rK-rck({PpYY$7uNY$9-Z< ze4=??I#p;$*+-Tm!q8z}k^%-gTm59^3$*ByyroqUe02Dne4?Fc%JlO>*f9Zj{++!^ zBz0FxuS&7X52o6-^CYq>jkXa?EEIfh?xdBPAkgpWpb9Tam^SXoFb3IRfLwanWfskJ zIbfU-rJ1zPmOV)|%;&NSWIEbbwj}5DIuN}!m7v4($I{Rh@<~-sK{fT|Wh?<|;)-Z; zwP{t@{uTsmnO@5ZY82lzwl4jeZ*zsZ7w%a+VtQXkigW$zN$QZnKw4F`RG`=@eWowO zFJ6RC4e>Y7Nu*J?E1*4*U0x^>GK$>O1S~gkA)`wU2isq^0nDb`);Q(FY<8V6^2R%= zDY}j+?mSj{bz2>F;^6S=OLqiHBy~7h4VVscgR#GILP!zkn68S^c04ZL3e$lnSU_(F zZm3e`1~?eu1>ys#R6>Gu$`rWZJG&#dsZ?^)4)v(?{NPt+_^Ak>Ap6828Cv^B84fa4 z_`l$0SSqkBU}`f*H#<14a)khT1Z5Z8;=ga^45{l8y*m|3Z60vgb^3TnuUKaa+zP;m zS`za@C#Y;-LOm&pW||G!wzr+}T~Q9v4U4ufu*fLJC=PajN?zN=?v^8TY}wrEeUygdgwr z7szml+(Bar;w*c^!5txLGKWZftqbZP`o;Kr1)zI}0Kb8yr?p6ZivtYL_KA<+9)XFE z=pLS5U&476PKY2aKEZh}%|Vb%!us(^qf)bKdF7x_v|Qz8lO7Ro>;#mxG0gqMaTudL zi2W!_#3@INslT}1DFJ`TsPvRBBGsODklX0`p-M6Mrgn~6&fF`kdj4K0I$<2Hp(YIA z)fFdgR&=qTl#sEFj6IHzEr1sYM6 zNfi!V!biByA&vAnZd;e_UfGg_={}Tj0MRt3SG%BQYnX$jndLG6>ssgIV{T3#=;RI% zE}b!9z#fek19#&nFgC->@!IJ*Fe8K$ZOLmg|6(g}ccsSBpc`)3;Ar8;3_k`FQ#N9&1tm>c|2mzG!!uWvelm zJj|oDZ6-m(^|dn3em(BF&3n12=hdtlb@%!vGuL*h`CXF?^=IHU%Q8;g8vABm=U!vX zT%Ma6gpKQC2c;@wH+A{)q+?dAuhetSxBDui+Z;S~6%oQq*IwSMu-UhMDy{pP z-#GB-a0`0+cJ%dZ7v0)3zfW$eV>w*mgU4Cma{P$DY3|w364n$B%cf()fZ;`VIiK_O zQ|q|(55+F$H(?opzr%r)BJLy6M&7Oq8KCsh`pA5^ohB@CDlMKoDVo5gO&{0k)R0b(UOfd>-(GZGeF}y?QI_T+GzdY$G{l!l% zHyToqa-x&X4;^(-56Lg$?(KYkgJn9W=w##)&CECqIxLe@+)2RhO*-Inpb7zd8txFG6mY8E?N8JP!kRt_7-&X{5P?$LAbafb$+hkA*_MfarZxf zXLpXmndnV3ubbXe*SYsx=eeuBKcDZI0bg&LL-a8f9>T(?VyrpC6;T{)Z{&|D5a`Aa zjP&lP)D)^YYWHbjYB6ArVs+4xvrUd1@f;;>*l zZH``*BxW+>Dd$be{`<&GN(w+m3B?~3Jjz}gB8^|!>pyZo;#0SOqWem%xeltYZ}KxOp&dS=bg|4 zY-^F~fv8v}u<7kvaZH`M$fBeltAglH@-SQres30fHC%9spF8Ld%4mjZJDeGNJR8+* zl&3Yo$|JYr2zi9deF2jzEC) zl+?io*GUGRp;^z+4?8gOFA>n;h%TJC#-st7#r&-JVeFM57P7rn{&k*z@+Y5 zc2sui8(gFATezp|Te|1-Q*e|Xi+__8bh$>%3|xNc2kAwTM!;;|KF6cS)X3SaO8^z8 zs5jV(s(4_NhWBSSJ}qUzjuYMKlkjbJS!7_)wwVsK^qDzHx1u*sC@C1ERqC#l%a zk>z>m@sZK{#GmsB_NkEM$$q@kBrgq%=NRBhL#hjDQHrI7(XPgFvP&~ZBJ@r58nLme zK4tD}Nz6xrbvbD6DaDC9E_82T{(WRQBpFc+Zb&W~jHf1MiBEqd57}Tpo8tOXj@LcF zwN8L-s}UO8%6piEtTrj@4bLH!mGpl5mH(UJR1r9bBOrSt0tSJDQ9oIjcW#elyMAxl7W^V(>8M~ss0^>OKvf{&oUG@uW{f^PtV#JDOx^APQKm& z{*Ysrz&ugt4PBUX@KERQbycxP%D+ApR%6jCx7%1RG2YpIa0~tqS6Xw6k#UN$b`^l6d$!I z*>%#Eg=n#VqWnW~MurJLK|hOQPTSy7G@29g@|g;mXC%MF1O7IAS8J^Q6D&Ra!h^+L&(IBYg2WWzZjT-rUsJMFh@E)g)YPW_)W9GF3 zMZz4RK;qcjpnat&J;|MShuPc4qAc)A| zVB?h~3TX+k#Cmry90=kdDoPYbhzs#z96}#M=Q0nC{`s{3ZLU)c(mqQQX;l~1$nf^c zFRQ~}0_!cM2;Pr6q_(>VqoW0;9=ZW)KSgV-c_-XdzEapeLySavTs5-PBsl-n3l;1jD z9^$^xR_QKDUYoeqva|O-+8@+e??(pRg@V|=WtkY!_IwTN~ z9Rd&##eWt_1w$7LL1$-ETciKFyHnNPjd9hHzgJh$J(D@3oYz}}jVNPjH!viX0g|Y9 zDD`Zjd6+o+dbAbUA( zEqA9mSoX5p|9sDVaRBFx_8)Ra4HD#xDB(fa4O8_J2`h#j17tSZOd3%}q8*176Y#ak zC?V8Ol<*X{Q?9j{Ys4Bc#sq!H;^HU$&F_`q2%`^=9DP9YV-A!ZeQ@#p=#ArloIgUH%Y-s>G!%V3aoXaY=f<UBrJTN+*8_lMX$yC=Vq+ zrjLn-pO%+VIvb~>k%`$^aJ1SevcPUo;V{CUqF>>+$c(MXxU12mxqyFAP>ki{5#;Q0 zx7Hh2zZdZzoxPY^YqI*Vgr)ip0xnpQJ+~R*UyFi9RbFd?<_l8GH@}gGmdB)~V7vHg z>Cjy78TQTDwh~+$u$|K3if-^4uY^|JQ+rLVX=u7~bLY29{lr>jWV7QCO5D0I>_1?; zx>*PxE4|wC?#;!#cK|6ivMzJ({k3bT_L3dHY#h7M!ChyTT`P#%3b=k}P(;QYTdrbe z+e{f@we?3$66%02q8p3;^th;9@y2vqt@LRz!DO(WMIk?#Pba85D!n=Ao$5NW0QVgS zoW)fa45>RkjU?H2SZ^#``zs6dG@QWj;MO4k6tIp8ZPminF`rY31dzv^e-3W`ZgN#7 z)N^%Rx?jX&?!5v`hb0-$22Fl&UBV?~cV*{hPG6%ml{k;m+a-D^XOF6DxPd$3;2VVY zT)E%m#ZrF=D=84$l}71DK3Vq^?N4``cdWn3 zqV=mX1(s`eCCj~#Nw4XMGW9tK>$?=cd$ule0Ir8UYzhi?%_u0S?c&j7)-~4LdolkgP^CUeE<2`3m)I^b ztV`K0k$OS^-GK0M0cNTLR22Y_eeT{<;G(+51Xx}b6f!kD&E4; z&Op8;?O<4D$t8PB4#=cWV9Q*i4U+8Bjlj!y4`j)^RNU#<5La6|fa4wLD!b6?RrBsF z@R8Nc^aO8ty7qzlOLRL|RUC-Bt-9>-g`2;@jfNhWAYciF{df9$n#a~28+x~@x0IWM zld=J%YjoKm%6Ea>iF){z#|~fo_w#=&&HRogJmXJDjCp&##oVvMn9iB~gyBlNO3B5f zXgp_1I~^`A0z_~oAa_YBbNZbDsnxLTy0@kkH!=(xt8|{$y<+|(wSZW7@)#|fs_?gU5-o%vpsQPRjIxq;AED^oG%4S%`WR}2(*!84Pe8Jw(snJ zq~#T7+m|w#acH1o%e<+f;!C|*&_!lL*^zRS`;E}AHh%cj1yR&3Grv&0I9k9v0*w8^ zXHEyRyCB`pDBRAxl;ockOh6$|7i$kzCBW$}wGUc|2bo3`x*7>B@eI=-7lKvI)P=gQ zf_GuA+36kQb$&{ZH)6o^x}wS}S^d&Xmftj%nIU=>&j@0?z8V3PLb1JXgHLq)^cTvB zFO6(yj1fl1Bap^}?hh<>j?Jv>RJdK{YpGjHxnY%d8x>A{k+(18J|R}%mAqq9Uzm8^Us#Ir_q^w9-S?W07YRD`w%D(n;|8N%_^RO`zp4 z@`zMAs>*x0keyE)$dJ8hR37_&MsSUMlGC*=7|wUehhKO)C85qoU}j>VVklO^TxK?! zO!RG~y4lv#W=Jr%B#sqc;HjhN={wx761vA3_$S>{j+r?{5=n3le|WLJ(2y_r>{)F_ z=v8Eo&xFR~wkw5v-{+9^JQukxf8*CXDWX*ZzjPVDc>S72uxAcY+(jtg3ns_5R zRYl2pz`B)h+e=|7SfiAAP;A zk0tR)3u1qy0{+?bQOa17SpBRZ5LRHz(TQ@L0%n5xJ21ri>^X420II1?5^FN3&bV?( zCeA)d9!3FAhep;p3?wLPs`>b5Cd}N!;}y`Hq3ppDs0+><{2ey0yq8o7m-4|oaMsWf zsLrG*aMh91drd-_QdX6t&I}t2!`-7$DCR`W2yoV%bcugue)@!SXM}fJOfG(bQQh++ zjAtF~zO#pFz})d8h)1=uhigDuFy`n*sbxZ$BA^Bt=Jdm}_KB6sCvY(T!MQnqO;TJs zVD{*F(FW=+v`6t^6{z<3-fx#|Ze~#h+ymBL^^GKS%Ve<)sP^<4*y_Y${06eD zH_n?Ani5Gs4&1z)UCL-uBvq(8)i!E@T_*0Sp5{Ddlpgke^_$gukJc_f9e=0Rfpta@ ze5~~aJBNK&OJSw!(rDRAHV0d+eW#1?PFbr==uG-$_fu8`!DWqQD~ef-Gx*ZmZx33_ zb0+I(0!hIK>r9_S5A*UwgRBKSd6!ieiYJHRigU@cogJ~FvJHY^DSysg)ac=7#wDBf zNLl!E$AiUMZC%%i5@g$WsN+sMSoUADKZ}-Pb`{7{S>3U%ry~?GVX!BDar2dJHLY|g zTJRo#Bs|u#8ke<3ohL2EFI*n6adobnYG?F3-#7eZZQO{#rmM8*PFycBR^UZKJWr(a z8cex$DPOx_PL^TO<%+f^L6#tdB8S^y#+fb|acQfD(9WgA+cb15L+LUdHKv)wE6={i zX^iY3N#U7QahohDP{g`IHS?D00eJC9DIx0V&nq!1T* z4$Bb?trvEG9JixrrNRKcjX)?KWR#Y(dh#re_<y*=5!J+-Wwb*D>jKXgr5L8_b6pvSAn3RIvI5oj!XF^m?otNA=t^dg z#V=L0@W)n?4Y@}49}YxQS=v5GsIF3%Cp#fFYm0Bm<}ey& zOfWB^vS8ye?n;%yD%NF8DvOpZqlB++#4KnUj>3%*S(c#yACIU>TyBG!GQl7{b8j#V z;lS})mrRtT!IRh2B-*T58%9;!X}W^mg;K&fb7?2#JH>JpCZV5jbDfOgOlc@wNLfHN z8O92GeBRjCP6Q9^Euw-*i&Wu=$>$;8Cktx52b{&Y^Ise-R1gTKRB9m0*Gze>$k?$N zua_0Hmbcj8qQy{ZyJ%`6v6F+yBGm>chZxCGpeL@os+v&5LON7;$tb~MQAbSZKG$k z8w`Mzn=cX4Hf~09q8_|3C7KnoM1^ZGU}#=vn1?1^Kc-eWv4x^T<|i9bCu;+lTQKr- zRwbRK!&XrWRoO7Kw!$zNQb#cJ1`iugR(f_vgmu!O)6tFH-0fOSBk6$^y+R07&&B!(V#ZV)CX42( zTC(jF&b@xu40fyb1=_2;Q|uPso&Gv9OSM1HR{iGPi@JUvmYM;rkv#JiJZ5-EFA%Lu zf;wAmbyclUM*D7>^nPatbGr%2aR5j55qSR$hR`c?d+z z`qko8Yn%vg)p=H`1o?=b9K0%Blx62gSy)q*8jWPyFmtA2a+E??&P~mT@cBdCsvFw4 zg{xaEyVZ|laq!sqN}mWq^*89$e6%sb6Thof;ml_G#Q6_0-zwf80?O}D0;La25A0C+ z3)w-xesp6?LlzF4V%yA9Ryl_Kq*wMk4eu&)Tqe#tmQJtwq`gI^7FXpToum5HP3@;N zpe4Y!wv5uMHUu`zbdtLys5)(l^C(hFKJ(T)z*PC>7f6ZRR1C#ao;R&_8&&a3)JLh* zOFKz5#F)hJqVAvcR#1)*AWPGmlEKw$sQd)YWdAs_W-ojA?Lm#wCd}uF0^X=?AA#ki zWG6oDQZJ5Tvifdz4xKWfK&_s`V*bM7SVc^=w7-m}jW6U1lQEv_JsW6W(| zkKf>qn^G!EWn~|7{G-&t0C6C%4)N{WRK_PM>4sW8^dDkFM|p&*aBuN%fg(I z^M-49vnMd%=04N95VO+?d#el>LEo^tvnQsMop70lNqq@%cTlht?e+B5L1L9R4R(_6 z!3dCLeGXb+_LiACNiqa^nOELJj%q&F^S+XbmdP}`KAep%TDop{Pz;UDc#P&LtMPgH zy+)P1jdgZQUuwLhV<89V{3*=Iu?u#v;v)LtxoOwV(}0UD@$NCzd=id{UuDdedeEp| z`%Q|Y<6T?kI)P|8c!K0Za&jxPhMSS!T`wlQNlkE(2B*>m{D#`hYYD>cgvsKrlcOcs7;SnVCeBiK6Wfho@*Ym9 zr0zNfrr}0%aOkHd)d%V^OFMI~MJp+Vg-^1HPru3Wvac@-QjLX9Dx}FL(l>Z;CkSvC zOR1MK%T1Edv2(b9$ttz!E7{x4{+uSVGz`uH&)gG`$)Vv0^E#b&JSZp#V)b6~$RWwe zzC3FzI`&`EDK@aKfeqQ4M(IEzDd~DS>GB$~ip2n!S%6sR&7QQ*=Mr(v*v-&07CO%# zMBTaD8-EgW#C6qFPPG1Ph^|0AFs;I+s|+A@WU}%@WbPI$S0+qFR^$gim+Fejs2f!$ z@Xdlb_K1BI;iiOUj`j+gOD%mjq^S~J0cZZwuqfzNH9}|(vvI6VO+9ZDA_(=EAo;( zKKzm`k!s!_sYCGOm)93Skaz+GF7eY@Ra8J$C)`X)`aPKym?7D^SI}Mnef4C@SgIEB z>nONSFl$qd;0gSZhNcRlq9VVHPkbakHlZ1gJ1y9W+@!V$TLpdsbKR-VwZrsSM^wLr zL9ob&JG)QDTaf&R^cnm5T5#*J3(pSpjM5~S1 z@V#E2syvK6wb?&h?{E)CoI~9uA(hST7hx4_6M(7!|BW3TR_9Q zLS{+uPoNgw(aK^?=1rFcDO?xPEk5Sm=|pW%-G2O>YWS^(RT)5EQ2GSl75`b}vRcD2 z|HX(x0#Qv+07*O|vMIV(0?KGjOny#Wa~C8Q(kF^IR8u|hyyfwD&>4lW=)Pa311caC zUk3aLCkAFkcidp@C%vNVLNUa#1ZnA~ZCLrLNp1b8(ndgB(0zy{Mw2M@QXXC{hTxr7 zbipeHI-U$#Kr>H4}+cu$#2fG6DgyWgq{O#8aa)4PoJ^;1z7b6t&zt zPei^>F1%8pcB#1`z`?f0EAe8A2C|}TRhzs*-vN^jf(XNoPN!tONWG=abD^=Lm9D?4 zbq4b(in{eZehKC0lF}`*7CTzAvu(K!eAwDNC#MlL2~&gyFKkhMIF=32gMFLvKsbLY z1d$)VSzc^K&!k#2Q?(f>pXn){C+g?vhQ0ijV^Z}p5#BGrGb%6n>IH-)SA$O)*z3lJ z1rtFlovL`cC*RaVG!p!4qMB+-f5j^1)ALf4Z;2X&ul&L!?`9Vdp@d(%(>O=7ZBV;l z?bbmyPen>!P{TJhSYPmLs759b1Ni1`d$0?&>OhxxqaU|}-?Z2c+}jgZ&vCSaCivx| z-&1gw2Lr<;U-_xzlg}Fa_3NE?o}R-ZRX->__}L$%2ySyiPegbnM{UuADqwDR{C2oS zPuo88%DNfl4xBogn((9j{;*YGE0>2YoL?LrH=o^SaAcgO39Ew|vZ0tyOXb509#6{7 z0<}CptRX5(Z4*}8CqCgpT@HY3Q)CvRz_YE;nf6ZFwEje^;Hkj0b1ESI*8Z@(RQrW4 z35D5;S73>-W$S@|+M~A(vYvX(yvLN(35THo!yT=vw@d(=q8m+sJyZMB7T&>QJ=jkwQVQ07*Am^T980rldC)j}}zf!gq7_z4dZ zHwHB94%D-EB<-^W@9;u|(=X33c(G>q;Tfq1F~-Lltp|+uwVzg?e$M96ndY{Lcou%w zWRkjeE`G*i)Bm*|_7bi+=MPm8by_};`=pG!DSGBP6y}zvV^+#BYx{<>p0DO{j@)(S zxcE`o+gZf8EPv1g3E1c3LIbw+`rO3N+Auz}vn~)cCm^DlEi#|Az$b z2}Pqf#=rxd!W*6HijC|u-4b~jtuQS>7uu{>wm)PY6^S5eo=?M>;tK`=DKXuArZvaU zHk(G??qjKYS9G6Du)#fn+ob=}C1Hj9d?V$_=J41ljM$CaA^xh^XrV-jzi7TR-{{9V zZZI0;aQ9YNEc`q=Xvz;@q$eqL<}+L(>HR$JA4mB6~g*YRSnpo zTofY;u7F~{1Pl=pdsDQx8Gg#|@BdoWo~J~j%DfVlT~JaC)he>he6`C`&@@#?;e(9( zgKcmoidHU$;pi{;VXyE~4>0{kJ>K3Uy6`s*1S--*mM&NY)*eOyy!7?9&osK*AQ~vi z{4qIQs)s#eN6j&0S()cD&aCtV;r>ykvAzd4O-fG^4Bmx2A2U7-kZR5{Qp-R^i4H2yfwC7?9(r3=?oH(~JR4=QMls>auMv*>^^!$}{}R z;#(gP+O;kn4G|totqZGdB~`9yzShMze{+$$?9%LJi>4YIsaPMwiJ{`gocu0U}$Q$vI5oeyKrgzz>!gI+XFt!#n z7vs9Pn`{{5w-@}FJZn?!%EQV!PdA3hw%Xa2#-;X4*B4?`WM;4@bj`R-yoAs_t4!!` zEaY5OrYi`3u3rXdY$2jZdZvufgFwVna?!>#t#DKAD2;U zqpqktqJ)8EPY*w~yj7r~#bNk|PDM>ZS?5F7T5aPFVZrqeX~5_1*zTQ%;xUHe#li?s zJ*5XZVERVfRjwX^s=0<%nXhULK+MdibMjzt%J7#fuh?NXyJ^pqpfG$PFmG!h*opyi zmMONjJY#%dkdRHm$l!DLeBm#_0YCq|x17c1fYJ#5YMpsjrFKyU=y>g5QcTgbDm28X zYL1RK)sn1@XtkGR;tNb}(kg#9L=jNSbJizqAgV-TtK2#?LZXrCIz({ zO^R|`ZDu(d@E7vE}df5`a zNIQRp&mDFbgyDKtyl@J|GcR9!h+_a$za$fnO5Ai9{)d7m@?@qk(RjHwXD}JbKRn|u z=Hy^z2vZ<1Mf{5ihhi9Y9GEG74Wvka;%G61WB*y7;&L>k99;IEH;d8-IR6KV{~(LZ zN7@V~f)+yg7&K~uLvG9MAY+{o+|JX?yf7h9FT%7ZrW7!RekjwgAA4jU$U#>_!ZC|c zA9%tc9nq|>2N1rg9uw-Qc89V}I5Y`vuJ(y`Ibc_?D>lPF0>d_mB@~pU`~)uWP48cT@fTxkWSw{aR!`K{v)v zpN?vQZZNPgs3ki9h{An4&Cap-c5sJ!LVLtRd=GOZ^bUpyDZHm6T|t#218}ZA zx*=~9PO>5IGaBD^XX-_2t7?7@WN7VfI^^#Csdz9&{1r z9y<9R?BT~-V8+W3kzWWQ^)ZSI+R zt^Lg`iN$Z~a27)sC_03jrD-%@{ArCPY#Pc*u|j7rE%}jF$LvO4vyvAw3bdL_mg&ei zXys_i=Q!UoF^Xp6^2h5o&%cQ@@)$J4l`AG09G6Uj<~A~!xG>KjKSyTX)zH*EdHMK0 zo;AV-D+bqWhtD-!^+`$*P0B`HokilLd1EuuwhJ?%3wJ~VXIjIE3tj653PExvIVhE& zFMYsI(OX-Q&W$}9gad^PUGuKElCvXxU_s*kx%dH)Bi&$*Q(+9j>(Q>7K1A#|8 zY!G!p0kW29rP*BNHe_wH49bF{K7tymi}Q!Vc_Ox2XjwtpM2SYo7n>?_sB=$c8O5^? z6as!fE9B48FcE`(ruNXP%rAZlDXrFTC7^aoXEX41k)tIq)6kJ*(sr$xVqsh_m3^?? zOR#{GJIr6E0Sz{-( z-R?4asj|!GVl0SEagNH-t|{s06Q3eG{kZOoPHL&Hs0gUkPc&SMY=&{C0&HDI)EHx9 zm#ySWluxwp+b~+K#VG%21%F65tyrt9RTPR$eG0afer6D`M zTW=y!@y6yi#I5V#!I|8IqU=@IfZo!@9*P+f{yLxGu$1MZ%xRY(gRQ2qH@9eMK0`Z> zgO`4DHfFEN8@m@dxYuljsmVv}c4SID+8{kr>d_dLzF$g>urGy9g+=`xAfTkVtz56G zrKNsP$yrDyP=kIqPN9~rVmC-wH672NF7xU>~j5M06Xr&>UJBmOV z%7Ie2d=K=u^D`~i3(U7x?n=h!SCSD1`aFe-sY<*oh+=;B>UVFBOHsF=(Xr(Cai{dL z4S7Y>PHdfG9Iav5FtKzx&UCgg)|DRLvq7!0*9VD`e6``Pgc z1O!qSaNeBBZnDXClh(Dq@XAk?Bd6+_rsFt`5(E+V2c)!Mx4X z47X+QCB4B7$B=Fw1Z1vnHg;x9oDV1YQJAR6Q3}_}BXTFg$A$E!oGG%`Rc()-Ysc%w za(yEn0fw~AaEFr}Rxi;if?Gv)&g~21UzXU9osI9{rNfH$gPTTk#^B|irEc<8W+|9$ zc~R${X2)N!npz1DFVa%nEW)cgPq`MSs)_I*Xwo<+ZK-2^hD(Mc8rF1+2v7&qV;5SET-ygMLNFsb~#u+LpD$uLR1o!ha67gPV5Q{v#PZK5X zUT4aZ{o}&*q7rs)v%*fDTl%}VFX?Oi{i+oKVUBqbi8w#FI%_5;6`?(yc&(Fed4Quy8xsswG+o&R zO1#lUiA%!}61s3jR7;+iO$;1YN;_*yUnJK=$PT_}Q%&0T@2i$ zwGC@ZE^A62YeOS9DU9me5#`(wv24fK=C)N$>!!6V#6rX3xiHehfdvwWJ>_fwz9l)o`Vw9yi z0p5BgvIM5o_ zgo-xaAkS_mya8FXo1Ke4;U*7TGSfm0!fb4{E5Ar8T3p!Z@4;FYT8m=d`C@4-LM121 z?6W@9d@52vxUT-6K_;1!SE%FZHcm0U$SsC%QB zxkTrfH;#Y7OYPy!nt|k^Lgz}uYudos9wI^8x>Y{fTzv9gfTVXN2xH`;Er=rTeAO1x znaaJOR-I)qwD4z%&dDjY)@s`LLSd#FoD!?NY~9#wQRTHpD7Vyyq?tKUHKv6^VE93U zt_&ePH+LM-+9w-_9rvc|>B!oT>_L59nipM-@ITy|x=P%Ezu@Y?N!?jpwP%lm;0V5p z?-$)m84(|7vxV<6f%rK3!(R7>^!EuvA&j@jdTI+5S1E{(a*wvsV}_)HDR&8iuc#>+ zMr^2z*@GTnfDW-QS38OJPR3h6U&mA;vA6Pr)MoT7%NvA`%a&JPi|K8NP$b1QY#WdMt8-CDA zyL0UXNpZ?x=tj~LeM0wk<0Dlvn$rtjd$36`+mlf6;Q}K2{%?%EQ+#FJy6v5cS+Q-~ ztk||Iwr$(CZQHi38QZF;lFFBNt+mg2*V_AhzkM<8#>E_S^xj8%T5tXTytD6f)vePG z^B0Ne-*6Pqg+rVW?%FGHLhl^ycQM-dhNCr)tGC|XyES*NK%*4AnZ!V+Zu?x zV2a82fs8?o?X} zjC1`&uo1Ti*gaP@E43NageV^$Xue3%es2pOrLdgznZ!_a{*`tfA+vnUv;^Ebi3cc$?-kh76PqA zMpL!y(V=4BGPQSU)78q~N}_@xY5S>BavY3Sez-+%b*m0v*tOz6zub9%*~%-B)lb}t zy1UgzupFgf?XyMa+j}Yu>102tP$^S9f7;b7N&8?_lYG$okIC`h2QCT_)HxG1V4Uv{xdA4k3-FVY)d}`cmkePsLScG&~@wE?ix2<(G7h zQ7&jBQ}Kx9mm<0frw#BDYR7_HvY7En#z?&*FurzdDNdfF znCL1U3#iO`BnfPyM@>;#m2Lw9cGn;(5*QN9$zd4P68ji$X?^=qHraP~Nk@JX6}S>2 zhJz4MVTib`OlEAqt!UYobU0-0r*`=03)&q7ubQXrt|t?^U^Z#MEZV?VEin3Nv1~?U zuwwSeR10BrNZ@*h7M)aTxG`D(By$(ZP#UmBGf}duX zhx;7y1x@j2t5sS#QjbEPIj95hV8*7uF6c}~NBl5|hgbB(}M3vnt zu_^>@s*Bd>w;{6v53iF5q7Em>8n&m&MXL#ilSzuC6HTzzi-V#lWoX zBOSBYm|ti@bXb9HZ~}=dlV+F?nYo3?YaV2=N@AI5T5LWWZzwvnFa%w%C<$wBkc@&3 zyUE^8xu<=k!KX<}XJYo8L5NLySP)cF392GK97(ylPS+&b}$M$Y+1VDrJa`GG7+%ToAsh z5NEB9oVv>as?i7f^o>0XCd%2wIaNRyejlFws`bXG$Mhmb6S&shdZKo;p&~b4wv$ z?2ZoM$la+_?cynm&~jEi6bnD;zSx<0BuCSDHGSssT7Qctf`0U!GDwG=+^|-a5%8Ty z&Q!%m%geLjBT*#}t zv1wDzuC)_WK1E|H?NZ&-xr5OX(ukXMYM~_2c;K}219agkgBte_#f+b9Al8XjL-p}1 z8deBZFjplH85+Fa5Q$MbL>AfKPxj?6Bib2pevGxIGAG=vr;IuuC%sq9x{g4L$?Bw+ zvoo`E)3#bpJ{Ij>Yn0I>R&&5B$&M|r&zxh+q>*QPaxi2{lp?omkCo~7ibow#@{0P> z&XBocU8KAP3hNPKEMksQ^90zB1&&b1Me>?maT}4xv7QHA@Nbvt-iWy7+yPFa9G0DP zP82ooqy_ku{UPv$YF0kFrrx3L=FI|AjG7*(paRLM0k1J>3oPxU0Zd+4&vIMW>h4O5G zej2N$(e|2Re z@8xQ|uUvbA8QVXGjZ{Uiolxb7c7C^nW`P(m*Jkqn)qdI0xTa#fcK7SLp)<86(c`A3 zFNB4y#NHe$wYc7V)|=uiW8gS{1WMaJhDj4xYhld;zJip&uJ{Jg3R`n+jywDc*=>bW zEqw(_+j%8LMRrH~+M*$V$xn9x9P&zt^evq$P`aSf-51`ZOKm(35OEUMlO^$>%@b?a z>qXny!8eV7cI)cb0lu+dwzGH(Drx1-g+uDX;Oy$cs+gz~?LWif;#!+IvPR6fa&@Gj zwz!Vw9@-Jm1QtYT?I@JQf%`=$^I%0NK9CJ75gA}ff@?I*xUD7!x*qcyTX5X+pS zAVy4{51-dHKs*OroaTy;U?zpFS;bKV7wb}8v+Q#z<^$%NXN(_hG}*9E_DhrRd7Jqp zr}2jKH{avzrpXj?cW{17{kgKql+R(Ew55YiKK7=8nkzp7Sx<956tRa(|yvHlW zNO7|;GvR(1q}GrTY@uC&ow0me|8wE(PzOd}Y=T+Ih8@c2&~6(nzQrK??I7DbOguA9GUoz3ASU%BFCc8LBsslu|nl>q8Ag(jA9vkQ`q2amJ5FfA7GoCdsLW znuok(diRhuN+)A&`rH{$(HXWyG2TLXhVDo4xu?}k2cH7QsoS>sPV)ylb45Zt&_+1& zT)Yzh#FHRZ-z_Q^8~IZ+G~+qSw-D<{0NZ5!J1%rAc`B23T98TMh9ylkzdk^O?W`@C??Z5U9#vi0d<(`?9fQvNN^ji;&r}geU zSbKR5Mv$&u8d|iB^qiLaZQ#@)%kx1N;Og8Js>HQD3W4~pI(l>KiHpAv&-Ev45z(vYK<>p6 z6#pU(@rUu{i9UngMhU&FI5yeRub4#u=9H+N>L@t}djC(Schr;gc90n%)qH{$l0L4T z;=R%r>CuxH!O@+eBR`rBLrT0vnP^sJ^+qE^C8ZY0-@te3SjnJ)d(~HcnQw@`|qAp|Trrs^E*n zY1!(LgVJfL?@N+u{*!Q97N{Uu)ZvaN>hsM~J?*Qvqv;sLnXHjKrtG&x)7tk?8%AHI zo5eI#`qV1{HmUf-Fucg1xn?Kw;(!%pdQ)ai43J3NP4{%x1D zI0#GZh8tjRy+2{m$HyI(iEwK30a4I36cSht3MM85UqccyUq6$j5K>|w$O3>`Ds;`0736+M@q(9$(`C6QZQ-vAKjIXKR(NAH88 zwfM6_nGWlhpy!_o56^BU``%TQ%tD4hs2^<2pLypjAZ;W9xAQRfF_;T9W-uidv{`B z{)0udL1~tMg}a!hzVM0a_$RbuQk|EG&(z*{nZXD3hf;BJe4YxX8pKX7VaIjjDP%sk zU5iOkhzZ&%?A@YfaJ8l&H;it@;u>AIB`TkglVuy>h;vjtq~o`5NfvR!ZfL8qS#LL` zD!nYHGzZ|}BcCf8s>b=5nZRYV{)KK#7$I06s<;RyYC3<~`mob_t2IfR*dkFJyL?FU zvuo-EE4U(-le)zdgtW#AVA~zjx*^80kd3A#?vI63pLnW2{j*=#UG}ISD>=ZGA$H&` z?Nd8&11*4`%MQlM64wfK`{O*ad5}vk4{Gy}F98xIAsmjp*9P=a^yBHBjF2*Iibo2H zGJAMFDjZcVd%6bZ`dz;I@F55VCn{~RKUqD#V_d{gc|Z|`RstPw$>Wu+;SY%yf1rI=>51Oolm>cnjOWHm?ydcgGs_kPUu=?ZKtQS> zKtLS-v$OMWXO>B%Z4LFUgw4MqA?60o{}-^6tf(c0{Y3|yF##+)RoXYVY-lyPhgn{1 z>}yF0Ab}D#1*746QAj5c%66>7CCWs8O7_d&=Ktu!SK(m}StvvBT1$8QP3O2a*^BNA z)HPhmIi*((2`?w}IE6Fo-SwzI_F~OC7OR}guyY!bOQfpNRg3iMvsFPYb9-;dT6T%R zhLwIjgiE^-9_4F3eMHZ3LI%bbOmWVe{SONpujQ;3C+58=Be4@yJK>3&@O>YaSdrevAdCLMe_tL zl8@F}{Oc!aXO5!t!|`I zdC`k$5z9Yf%RYJp2|k*DK1W@AN23W%SD0EdUV^6~6bPp_HZi0@dku_^N--oZv}wZA zH?Bf`knx%oKB36^L;P%|pf#}Tp(icw=0(2N4aL_Ea=9DMtF})2ay68V{*KfE{O=xL zf}tcfCL|D$6g&_R;r~1m{+)sutQPKzVv6Zw(%8w&4aeiy(qct1x38kiqgk!0^^X3IzI2ia zxI|Q)qJNEf{=I$RnS0`SGMVg~>kHQB@~&iT7+eR!Ilo1ZrDc3TVW)CvFFjHK4K}Kh z)dxbw7X%-9Ol&Y4NQE~bX6z+BGOEIIfJ~KfD}f4spk(m62#u%k<+iD^`AqIhWxtKGIm)l$7=L`=VU0Bz3-cLvy&xdHDe-_d3%*C|Q&&_-n;B`87X zDBt3O?Wo-Hg6*i?f`G}5zvM?OzQjkB8uJhzj3N;TM5dSM$C@~gGU7nt-XX_W(p0IA6$~^cP*IAnA<=@HVqNz=Dp#Rcj9_6*8o|*^YseK_4d&mBY*Y&q z8gtl;(5%~3Ehpz)bLX%)7|h4tAwx}1+8CBtu9f5%^SE<&4%~9EVn4*_!r}+{^2;} zwz}#@Iw?&|8F2LdXUIjh@kg3QH69tqxR_FzA;zVpY=E zcHnWh(3j3UXeD=4m_@)Ea4m#r?axC&X%#wC8FpJPDYR~@65T?pXuWdPzEqXP>|L`S zKYFF0I~%I>SFWF|&sDsRdXf$-TVGSoWTx7>7mtCVUrQNVjZ#;Krobgh76tiP*0(5A zs#<7EJ#J`Xhp*IXB+p5{b&X3GXi#b*u~peAD9vr0*Vd&mvMY^zxTD=e(`}ybDt=BC(4q)CIdp>aK z0c?i@vFWjcbK>oH&V_1m_EuZ;KjZSiW^i30U` zGLK{%1o9TGm8@gy+Rl=-5&z`~Un@l*2ne3e9B+>wKyxuoUa1qhf?-Pi= zZLCD-b7*(ybv6uh4b`s&Ol3hX2ZE<}N@iC+h&{J5U|U{u$XK0AJz)!TSX6lrkG?ris;y{s zv`B5Rq(~G58?KlDZ!o9q5t%^E4`+=ku_h@~w**@jHV-+cBW-`H9HS@o?YUUkKJ;AeCMz^f@FgrRi@?NvO3|J zBM^>4Z}}!vzNum!R~o0)rszHG(eeq!#C^wggTgne^2xc9nIanR$pH1*O;V>3&#PNa z7yoo?%T(?m-x_ow+M0Bk!@ow>A=skt&~xK=a(GEGIWo4AW09{U%(;CYLiQIY$bl3M zxC_FGKY%J`&oTS{R8MHVe{vghGEshWi!(EK*DWmoOv|(Ff#(bZ-<~{rc|a%}Q4-;w z{2gca97m~Nj@Nl{d)P`J__#Zgvc@)q_(yfrF2yHs6RU8UXxcU(T257}E#E_A}%2_IW?%O+7v((|iQ{H<|$S7w?;7J;iwD>xbZc$=l*(bzRXc~edIirlU0T&0E_EXfS5%yA zs0y|Sp&i`0zf;VLN=%hmo9!aoLGP<*Z7E8GT}%)cLFs(KHScNBco(uTubbxCOD_%P zD7XlHivrSWLth7jf4QR9`jFNk-7i%v4*4fC*A=;$Dm@Z^OK|rAw>*CI%E z3%14h-)|Q%_$wi9=p!;+cQ*N1(47<49TyB&B*bm_m$rs+*ztWStR~>b zE@V06;x19Y_A85N;R+?e?zMTIqdB1R8>(!4_S!Fh={DGqYvA0e-P~2DaRpCYf4$-Q z*&}6D!N_@s`$W(|!DOv%>R0n;?#(HgaI$KpHYpnbj~I5eeI(u4CS7OJajF%iKz)*V zt@8=9)tD1ML_CrdXQ81bETBeW!IEy7mu4*bnU--kK;KfgZ>oO>f)Sz~UK1AW#ZQ_ic&!ce~@(m2HT@xEh5u%{t}EOn8ET#*U~PfiIh2QgpT z%gJU6!sR2rA94u@xj3%Q`n@d}^iMH#X>&Bax+f4cG7E{g{vlJQ!f9T5wA6T`CgB%6 z-9aRjn$BmH=)}?xWm9bf`Yj-f;%XKRp@&7?L^k?OT_oZXASIqbQ#eztkW=tmRF$~% z6(&9wJuC-BlGrR*(LQKx8}jaE5t`aaz#Xb;(TBK98RJBjiqbZFyRNTOPA;fG$;~e` zsd6SBii3^(1Y`6^#>kJ77xF{PAfDkyevgox`qW`nz1F`&w*DH5Oh1idOTLES>DToi z8Qs4|?%#%>yuQO1#{R!-+2AOFznWo)e3~_D!nhoDgjovB%A8< zt%c^KlBL$cDPu!Cc`NLc_8>f?)!FGV7yudL$bKj!h;eOGkd;P~sr6>r6TlO{Wp1%xep8r1W{`<4am^(U} z+nCDP{Z*I?IGBE&*KjiaR}dpvM{ZFMW%P5Ft)u$FD373r2|cNsz%b0uk1T+mQI@4& zFF*~xDxDRew1Bol-*q>F{Xw8BUO;>|0KXf`lv7IUh%GgeLUzR|_r(TXZTbfXFE0oc zmGMwzNFgkdg><=+3MnncRD^O`m=SxJ6?}NZ8BR)=ag^b4Eiu<_bN&i0wUaCGi60W6 z%iMl&`h8G)y`gfrVw$={cZ)H4KSQO`UV#!@@cDx*hChXJB7zY18EsIo1)tw0k+8u; zg(6qLysbxVbLFbkYqKbEuc3KxTE+%j5&k>zHB8_FuDcOO3}FS|eTxoUh2~|Bh?pD| zsmg(EtMh`@s;`(r!%^xxDt(5wawK+*jLl>_Z3shaB~vdkJ!V3RnShluzmwn7>PHai z3avc`)jZSAvTVC6{2~^CaX49GXMtd|sbi*swkgoyLr=&yp!ASd^mIC^D;a|<=3pSt zM&0u%#%DGzlF4JpMDs~#kU;UCtyW+d3JwNiu`Uc7Yi6%2gfvP_pz8I{Q<#25DjM_D z(>8yI^s@_tG@c=cPoZImW1CO~`>l>rs=i4BFMZT`vq5bMOe!H@8q@sEZX<-kiY&@u3g1YFc zc@)@OF;K-JjI(eLs~hy8qOa9H1zb!3GslI!nH2DhP=p*NLHeh^9WF?4Iakt+b( z-4!;Q-8c|AX>t+5I64EKpDj4l2x*!_REy9L_9F~i{)1?o#Ws{YG#*}lg_zktt#ZlN zmoNsGm7$AXLink`GWtY*TZEH!J9Qv+A1y|@>?&(pb(6XW#ZF*}x*{60%wnt{n8Icp zq-Kb($kh6v_voqvA`8rq!cgyu;GaWZ>C2t6G5wk! zcKTlw=>KX3ldU}a1%XESW71))Z=HW%sMj2znJ;fdN${00DGGO}d+QsTQ=f;BeZ`eC~0-*|gn$9G#`#0YbT(>O(k&!?2jI z&oi9&3n6Vz<4RGR}h*1ggr#&0f%Op(6{h>EEVFNJ0C>I~~SmvqG+{RXDrexBz zw;bR@$Wi`HQ3e*eU@Cr-4Z7g`1R}>3-Qej(#Dmy|CuFc{Pg83Jv(pOMs$t(9vVJQJ zXqn2Ol^MW;DXq!qM$55vZ{JRqg!Q1^Qdn&FIug%O3=PUr~Q`UJuZ zc`_bE6i^Cp_(fka&A)MsPukiMyjG$((zE$!u>wyAe`gf-1Qf}WFfi1Y{^ zdCTTrxqpQE#2BYWEBnTr)u-qGSVRMV7HTC(x zb(0FjYH~nW07F|{@oy)rlK6CCCgyX?cB;19Z(bCP5>lwN0UBF}Ia|L0$oGHl-oSTZ zr;(u7nDjSA03v~XoF@ULya8|dzH<2G=n9A)AIkQKF0mn?!BU(ipengAE}6r`CE!jd z=EcX8exgDZZQ~~fgxR-2yF;l|kAfnjhz|i_o~cYRdhnE~1yZ{s zG!kZJ<-OVnO{s3bOJK<)`O;rk>=^Sj3M76Nqkj<_@Jjw~iOkWUCL+*Z?+_Jvdb!0cUBy=(5W9H-r4I zxAFts>~r)B>KXdQANyaeKvFheZMgoq4EVV0|^NR@>ea* zh%<78{}wsdL|9N1!jCN-)wH4SDhl$MN^f_3&qo?>Bz#?c{ne*P1+1 z!a`(2Bxy`S^(cw^dv{$cT^wEQ5;+MBctgPfM9kIQGFUKI#>ZfW9(8~Ey-8`OR_XoT zflW^mFO?AwFWx9mW2-@LrY~I1{dlX~jBMt!3?5goHeg#o0lKgQ+eZcIheq@A&dD}GY&1c%hsgo?z zH>-hNgF?Jk*F0UOZ*bs+MXO(dLZ|jzKu5xV1v#!RD+jRrHdQ z>>b){U(I@i6~4kZXn$rk?8j(eVKYJ2&k7Uc`u01>B&G@c`P#t#x@>Q$N$1aT514fK zA_H8j)UKen{k^ehe%nbTw}<JV6xN_|| z(bd-%aL}b z3VITE`N~@WlS+cV>C9TU;YfsU3;`+@hJSbG6aGvis{Gs%2K|($)(_VfpHB|DG8Nje+0tCNW%_cu3hk0F)~{-% zW{2xSu@)Xnc`Dc%AOH)+LT97ImFR*WekSnJ3OYIs#ijP4TD`K&7NZKsfZ;76k@VD3py?pSw~~r^VV$Z zuUl9lF4H2(Qga0EP_==vQ@f!FLC+Y74*s`Ogq|^!?RRt&9e9A&?Tdu=8SOva$dqgYU$zkKD3m>I=`nhx-+M;-leZgt z8TeyQFy`jtUg4Ih^JCUcq+g_qs?LXSxF#t+?1Jsr8c1PB#V+f6aOx@;ThTIR4AyF5 z3m$Rq(6R}U2S}~Bn^M0P&Aaux%D@ijl0kCCF48t)+Y`u>g?|ibOAJoQGML@;tn{%3IEMaD(@`{7ByXQ`PmDeK*;W?| zI8%%P8%9)9{9DL-zKbDQ*%@Cl>Q)_M6vCs~5rb(oTD%vH@o?Gk?UoRD=C-M|w~&vb z{n-B9>t0EORXd-VfYC>sNv5vOF_Wo5V)(Oa%<~f|EU7=npanpVX^SxPW;C!hMf#kq z*vGNI-!9&y!|>Zj0V<~)zDu=JqlQu+ii387D-_U>WI_`3pDuHg{%N5yzU zEulPN)%3&{PX|hv*rc&NKe(bJLhH=GPuLk5pSo9J(M9J3v)FxCo65T%9x<)x+&4Rr2#nu2?~Glz|{28OV6 z)H^`XkUL|MG-$XE=M4*fIPmeR2wFWd>5o*)(gG^Y>!P4(f z68RkX0cRBOFc@`W-IA(q@p@m>*2q-`LfujOJ8-h$OgHte;KY4vZKTxO95;wh#2ZDL zKi8aHkz2l54lZd81t`yY$Tq_Q2_JZ1d(65apMg}vqwx=ceNOWjFB)6m3Q!edw2<{O z4J6+Un(E8jxs-L-K_XM_VWahy zE+9fm_ZaxjNi{fI_AqLKqhc4IkqQ4`Ut$=0L)nzlQw^%i?bP~znsbMY3f}*nPWqQZ zz_CQDpZ?Npn_pEr`~SX1`OoSkS;bmzQ69y|W_4bH3&U3F7EBlx+t%2R02VRJ01cfX zo$$^ObDHK%bHQaOcMpCq@@Jp8!OLYVQO+itW1ZxlkmoG#3FmD4b61mZjn4H|pSmYi2YE;I#@jtq8Mhjdgl!6({gUsQA>IRXb#AyWVt7b=(HWGUj;wd!S+q z4S+H|y<$yPrrrTqQHsa}H`#eJFV2H5Dd2FqFMA%mwd`4hMK4722|78d(XV}rz^-GV(k zqsQ>JWy~cg_hbp0=~V3&TnniMQ}t#INg!o2lN#H4_gx8Tn~Gu&*ZF8#kkM*5gvPu^ zw?!M^05{7q&uthxOn?%#%RA_%y~1IWly7&_-sV!D=Kw3DP+W)>YYRiAqw^d7vG_Q%v;tRbE1pOBHc)c&_5=@wo4CJTJ1DeZErEvP5J(kc^GnGYX z|LqQjTkM{^gO2cO#-(g!7^di@$J0ibC(vsnVkHt3osnWL8?-;R1BW40q5Tmu_9L-s z7fNF5fiuS-%B%F$;D97N-I@!~c+J>nv%mzQ5vs?1MgR@XD*Gv`A{s8 z5Cr>z5j?|sb>n=c*xSKHpdy667QZT?$j^Doa%#m4ggM@4t5Oe%iW z@w~j_B>GJJkO+6dVHD#CkbC(=VMN8nDkz%44SK62N(ZM#AsNz1KW~3(i=)O;q5JrK z?vAVuL}Rme)OGQuLn8{3+V352UvEBV^>|-TAAa1l-T)oiYYD&}Kyxw73shz?Bn})7 z_a_CIPYK(zMp(i+tRLjy4dV#CBf3s@bdmwXo`Y)dRq9r9-c@^2S*YoNOmAX%@OYJOXs zT*->in!8Ca_$W8zMBb04@|Y)|>WZ)-QGO&S7Zga1(1#VR&)X+MD{LEPc%EJCXIMtr z1X@}oNU;_(dfQ_|kI-iUSTKiVzcy+zr72kq)TIp(GkgVyd%{8@^)$%G)pA@^Mfj71FG%d?sf(2Vm>k%X^RS`}v0LmwIQ7!_7cy$Q8pT?X1VWecA_W68u==HbrU& z@&L6pM0@8ZHL?k{6+&ewAj%grb6y@0$3oamTvXsjGmPL_$~OpIyIq%b$(uI1VKo zk_@{r>1p84UK3}B>@d?xUZ}dJk>uEd+-QhwFQ`U?rA=jj+$w8sD#{492P}~R#%z%0 z5dlltiAaiPKv9fhjmuy{*m!C22$;>#85EduvdSrFES{QO$bHpa7E@&{bWb@<7VhTF zXCFS_wB>7*MjJ3$_i4^A2XfF2t7`LOr3B@??OOUk=4fKkaHne4RhI~Lm$JrHfUU*h zgD9G66;_F?3>0W{pW2A^DR7Bq`ZUiSc${S8EM>%gFIqAw0du4~kU#vuCb=$I_PQv? zZfEY7X6c{jJZ@nF&T>4oyy(Zr_XqnMq)ZtGPASbr?IhZOnL|JKY()`eo=P5UK9(P-@ zOJKFogtk|pscVD+#$7KZs^K5l4gC}*CTd0neZ8L(^&1*bPrCp23%{VNp`4Ld*)Fly z)b|zb*bCzp?&X3_=qLT&0J+=p01&}9*xbk~^hd^@mV!Ha`1H+M&60QH2c|!Ty`RepK|H|Moc5MquD z=&$Ne3%WX+|7?iiR8=7*LW9O3{O%Z6U6`VekeF8lGr5vd)rsZu@X#5!^G1;nV60cz zW?9%HgD}1G{E(YvcLcIMQR65BP50)a;WI*tjRzL7diqRqh$3>OK{06VyC=pj6OiardshTnYfve5U>Tln@y{DC99f!B4> zCrZa$B;IjDrg}*D5l=CrW|wdzENw{q?oIj!Px^7DnqAsU7_=AzXxoA;4(YvN5^9ag zwEd4-HOlO~R0~zk>!4|_Z&&q}agLD`Nx!%9RLC#7fK=w06e zOK<>|#@|e2zjwZ5aB>DJ%#P>k4s0+xHJs@jROvoDQfSoE84l8{9y%5^POiP+?yq0> z7+Ymbld(s-4p5vykK@g<{X*!DZt1QWXKGmj${`@_R~=a!qPzB357nWW^KmhV!^G3i zsYN{2_@gtzsZH*FY!}}vNDnqq>kc(+7wK}M4V*O!M&GQ|uj>+8!Q8Ja+j3f*MzwcI z^s4FXGC=LZ?il4D+Y^f89wh!d7EU-5dZ}}>_PO}jXRQ@q^CjK-{KVnmFd_f&IDKmx zZ5;PDLF%_O);<4t`WSMN;Ec^;I#wU?Z?_R|Jg`#wbq;UM#50f@7F?b7ySi-$C-N;% zqXowTcT@=|@~*a)dkZ836R=H+m6|fynm#0Y{KVyYU=_*NHO1{=Eo{^L@wWr7 zjz9GOu8Fd&v}a4d+}@J^9=!dJRsCO@=>K6UCM)Xv6};tb)M#{(k!i}_0Rjq z2kb7wPcNgov%%q#(1cLykjrxAg)By+3QueBR>Wsep&rWQHq1wE!JP+L;q+mXts{j@ zOY@t9BFmofApO0k@iBFPeKsV3X=|=_t65QyohXMSfMRr7Jyf8~ogPVmJwbr@`nmml zov*NCf;*mT(5s4K=~xtYy8SzE66W#tW4X#RnN%<8FGCT{z#jRKy@Cy|!yR`7dsJ}R z!eZzPCF+^b0qwg(mE=M#V;Ud9)2QL~ z-r-2%0dbya)%ui_>e6>O3-}4+Q!D+MU-9HL2tH)O`cMC1^=rA=q$Pcc;Zel@@ss|K zH*WMdS^O`5Uv1qNTMhM(=;qjhaJ|ZC41i2!kt4;JGlXQ$tvvF8Oa^C@(q6(&6B^l) zNG{GaX?`qROHwL-F1WZDEF;C6Inuv~1&ZuP3j53547P38tr|iPH#3&hN*g0R^H;#) znft`cw0+^Lwe{!^kQat+xjf_$SZ05OD6~U`6njelvd+4pLZU(0ykS5&S$)u?gm!;} z+gJ8g12b1D4^2HH!?AHFAjDAP^q)Juw|hZfIv{3Ryn%4B^-rqIF2 zeWk^za4fq#@;re{z4_O|Zj&Zn{2WsyI^1%NW=2qA^iMH>u>@;GAYI>Bk~u0wWQrz* zdEf)7_pSYMg;_9^qrCzvv{FZYwgXK}6e6ceOH+i&+O=x&{7aRI(oz3NHc;UAxMJE2 zDb0QeNpm$TDcshGWs!Zy!shR$lC_Yh-PkQ`{V~z!AvUoRr&BAGS#_*ZygwI2-)6+a zq|?A;+-7f0Dk4uuht z6sWPGl&Q$bev1b6%aheld88yMmBp2j=z*egn1aAWd?zN=yEtRDGRW&nmv#%OQwuJ; zqKZ`L4DsqJwU{&2V9f>2`1QP7U}`6)$qxTNEi`4xn!HzIY?hDnnJZw+mFnVSry=bLH7ar+M(e9h?GiwnOM?9ZJcTJ08)T1-+J#cr&uHhXkiJ~}&(}wvzCo33 zLd_<%rRFQ3d5fzKYQy41<`HKk#$yn$Q+Fx-?{3h72XZrr*uN!5QjRon-qZh9-uZ$rWEKZ z!dJMP`hprNS{pzqO`Qhx`oXGd{4Uy0&RDwJ`hqLw4v5k#MOjvyt}IkLW{nNau8~XM z&XKeoVYreO=$E%z^WMd>J%tCdJx5-h+8tiawu2;s& zD7l`HV!v@vcX*qM(}KvZ#%0VBIbd)NClLBu-m2Scx1H`jyLYce;2z;;eo;ckYlU53 z9JcQS+CvCwj*yxM+e*1Vk6}+qIik2VzvUuJyWyO}piM1rEk%IvS;dsXOIR!#9S;G@ zPcz^%QTf9D<2~VA5L@Z@FGQqwyx~Mc-QFzT4Em?7u`OU!PB=MD8jx%J{<`tH$Kcxz zjIvb$x|`s!-^^Zw{hGV>rg&zb;=m?XYAU0LFw+uyp8v@Y)zmjj&Ib7Y1@r4`cfrS%cVxJiw`;*BwIU*6QVsBBL;~nw4`ZFqs z1YSgLVy=rvA&GQB4MDG+j^)X1N=T;Ty2lE-`zrg(dNq?=Q`nCM*o8~A2V~UPArX<| zF;e$5B0hPSo56=ePVy{nah#?e-Yi3g*z6iYJ#BFJ-5f0KlQ-PRiuGwe29fyk1T6>& zeo2lvb%h9Vzi&^QcVNp}J!x&ubtw5fKa|n2XSMlg#=G*6F|;p)%SpN~l8BaMREDQN z-c9O}?%U1p-ej%hzIDB!W_{`9lS}_U==fdYpAil1E3MQOFW^u#B)Cs zTE3|YB0bKpXuDKR9z&{4gNO3VHDLB!xxPES+)yaJxo<|}&bl`F21};xsQnc!*FPZA zSct2IU3gEu@WQKmY-vA5>MV?7W|{$rAEj4<8`*i)<%fj*gDz2=ApqZ&MP&0UmO1?q!GN=di+n(#bB_mHa z(H-rIOJqamMfwB%?di!TrN=x~0jOJtvb0e9uu$ZCVj(gJyK}Fa5F2S?VE30P{#n3eMy!-v7e8viCooW9cfQx%xyPNL*eDKL zB=X@jxulpkLfnar7D2EeP*0L7c9urDz{XdV;@tO;u`7DlN7#~ zAKA~uM2u8_<5FLkd}OzD9K zO5&hbK8yakUXn8r*H9RE zO9Gsipa2()=&x=1mnQtNP#4m%GXThu8Ccqx*qb;S{5}>bU*V5{SY~(Hb={cyTeaTM zMEaKedtJf^NnJrwQ^Bd57vSlJ3l@$^0QpX@_1>h^+js8QVpwOiIMOiSC_>3@dt*&| zV?0jRdlgn|FIYam0s)a@5?0kf7A|GD|dRnP1=B!{ldr;N5s)}MJ=i4XEqlC}w)LEJ}7f9~c!?It(s zu>b=YBlFRi(H-%8A!@Vr{mndRJ z_jx*?BQpK>qh`2+3cBJhx;>yXPjv>dQ0m+nd4nl(L;GmF-?XzlMK zP(Xeyh7mFlP#=J%i~L{o)*sG7H5g~bnL2Hn3y!!r5YiYRzgNTvgL<(*g5IB*gcajK z86X3LoW*5heFmkIQ-I_@I_7b!Xq#O;IzOv(TK#(4gd)rmCbv5YfA4koRfLydaIXUU z8(q?)EWy!sjsn-oyUC&uwJqEXdlM}#tmD~*Ztav=mTQyrw0^F=1I5lj*}GSQTQOW{ z=O12;?fJfXxy`)ItiDB@0sk43AZo_sRn*jc#S|(2*%tH84d|UTYN!O4R(G6-CM}84 zpiyYJ^wl|w@!*t)dwn0XJv2kuHgbfNL$U6)O-k*~7pQ?y=sQJdKk5x`1>PEAxjIWn z{H$)fZH4S}%?xzAy1om0^`Q$^?QEL}*ZVQK)NLgmnJ`(we z21c23X1&=^>k;UF-}7}@nzUf5HSLUcOYW&gsqUrj7%d$)+d8ZWwTZq)tOgc%fz95+ zl%sdl)|l|jXfqIcjKTFrX74Rbq1}osA~fXPSPE?XO=__@`7k4Taa!sHE8v-zfx(AM zXT_(7u;&_?4ZIh%45x>p!(I&xV|IE**qbqCRGD5aqLpCRvrNy@uT?iYo-FPpu`t}J zSTZ}MDrud+`#^14r`A%UoMvN;raizytxMBV$~~y3i0#m}0F}Dj_fBIz+)1RWdnctP z>^O^vd0E+jS+$V~*`mZWER~L^q?i-6RPxxufWdrW=%prbCYT{5>Vgu%vPB)~NN*2L zB?xQg2K@+Xy=sPh$%10LH!39p&SJG+3^i*lFLn=uY8Io6AXRZf;p~v@1(hWsFzeKzx99_{w>r;cypkPVJCKtLGK>?-K0GE zGH>$g?u`)U_%0|f#!;+E>?v>qghuBwYZxZ*Q*EE|P|__G+OzC-Z+}CS(XK^t!TMoT zc+QU|1C_PGiVp&_^wMxfmMAuJDQ%1p4O|x5DljN6+MJiO%8s{^ts8$uh5`N~qK46c`3WY#hRH$QI@*i1OB7qBIN*S2gK#uVd{ zik+wwQ{D)g{XTGjKV1m#kYhmK#?uy)g@idi&^8mX)Ms`^=hQGY)j|LuFr8SJGZjr| zzZf{hxYg)-I^G|*#dT9Jj)+wMfz-l7ixjmwHK9L4aPdXyD-QCW!2|Jn(<3$pq-BM; zs(6}egHAL?8l?f}2FJSkP`N%hdAeBiD{3qVlghzJe5s9ZUMd`;KURm_eFaK?d&+TyC88v zCv2R(Qg~0VS?+p+l1e(aVq`($>|0b{{tPNbi} zaZDffTZ7N|t2D5DBv~aX#X+yGagWs1JRsqbr4L8a`B`m) z1p9?T`|*8ZXHS7YD8{P1Dk`EGM`2Yjsy0=7M&U6^VO30`Gx!ZkUoqmc3oUbd&)V*iD08>dk=#G!*cs~^tOw^s8YQqYJ z!5=-4ZB7rW4mQF&YZw>T_in-c9`0NqQ_5Q}fq|)%HECgBd5KIo`miEcJ>~a1e2B@) zL_rqoQ;1MowD34e6#_U+>D`WcnG5<2Q6cnt4Iv@NC$*M+i3!c?6hqPJLsB|SJ~xo! zm>!N;b0E{RX{d*in3&0w!cmB&TBNEjhxdg!fo+}iGE*BWV%x*46rT@+cXU;leofWy zxst{S8m!_#hIhbV7wfWN#th8OI5EUr3IR_GOIzBgGW1u4J*TQxtT7PXp#U#EagTV* zehVkBFF06`@5bh!t%L)-)`p|d7D|^kED7fsht#SN7*3`MKZX};Jh0~nCREL_BGqNR zxpJ4`V{%>CAqEE#Dt95u=;Un8wLhrac$fao`XlNsOH%&Ey2tK&vAcriS1kXnntDuttcN{%YJz@!$T zD&v6ZQ>zS1`o!qT=JK-Y+^i~bZkVJpN8%<4>HbuG($h9LP;{3DJF_Jcl8CA5M~<3s^!$Sg62zLEnJtZ z0`)jwK75Il6)9XLf(64~`778D6-#Ie1IR2Ffu+_Oty%$8u+bP$?803V5W6%(+iZzp zp5<&sBV&%CJcXUIATUakP1czt$&0x$lyoLH!ueNaIpvtO z*eCijxOv^-D?JaLzH<3yhOfDENi@q#4w(#tl-19(&Yc2K%S8Y&r{3~-)P17sC1{rQ zOy>IZ6%814_UoEi+w9a4XyGXF66{rgE~UT)oT4x zg9oIx@|{KL#VpTyE=6WK@Sbd9RKEEY)5W{-%0F^6(QMuT$RQRZ&yqfyF*Z$f8>{iT zq(;UzB-Ltv;VHvh4y%YvG^UEkvpe9ugiT97ErbY0ErCEOWs4J=kflA!*Q}gMbEP`N zY#L`x9a?E)*~B~t+7c8eR}VY`t}J;EWuJ-6&}SHnNZ8i0PZT^ahA@@HXk?c0{)6rC zP}I}_KK7MjXqn1E19gOwWvJ3i9>FNxN67o?lZy4H?n}%j|Dq$p%TFLUPJBD;R|*0O z3pLw^?*$9Ax!xy<&fO@;E2w$9nMez{5JdFO^q)B0OmGwkxxaDsEU+5C#g+?Ln-Vg@ z-=z4O*#*VJa*nujGnGfK#?`a|xfZsuiO+R}7y(d60@!WUIEUt>K+KTI&I z9YQ6#hVCo}0^*>yr-#Lisq6R?uI=Ms!J7}qm@B}Zu zp%f-~1Cf!-5S0xXl`oqq&fS=tt0`%dDWI&6pW(s zJXtYiY&~t>k5I0RK3sN;#8?#xO+*FeK#=C^%{Y>{k{~bXz%(H;)V5)DZRk~(_d0b6 zV!x54fwkl`1y;%U;n|E#^Vx(RGnuN|T$oJ^R%ZmI{8(9>U-K^QpDcT?Bb@|J0NAfvHtL#wP ziYupr2E5=_KS{U@;kyW7oy*+UTOiF*e+EhYqVcV^wx~5}49tBNSUHLH1=x}6L2Fl^4X4633$k!ZHZTL50Vq+a5+ z<}uglXQ<{x&6ey)-lq6;4KLHbR)_;Oo^FodsYSw3M-)FbLaBcPI=-ao+|))T2ksKb z{c%Fu`HR1dqNw8%>e0>HI2E_zNH1$+4RWfk}p-h(W@)7LC zwVnUO17y+~kw35CxVtokT44iF$l8XxYuetp)1Br${@lb(Q^e|q*5%7JNxp5B{r<09 z-~8o#rI1(Qb9FhW-igcsC6npf5j`-v!nCrAcVx5+S&_V2D>MOWp6cV$~Olhp2`F^Td{WV`2k4J`djb#M>5D#k&5XkMu*FiO(uP{SNX@(=)|Wm`@b> z_D<~{ip6@uyd7e3Rn+qM80@}Cl35~^)7XN?D{=B-4@gO4mY%`z!kMIZizhGtCH-*7 z{a%uB4usaUoJwbkVVj%8o!K^>W=(ZzRDA&kISY?`^0YHKe!()(*w@{w7o5lHd3(Us zUm-K=z&rEbOe$ackQ3XH=An;Qyug2g&vqf;zsRBldxA+=vNGoM$Zo9yT?Bn?`Hkiq z&h@Ss--~+=YOe@~JlC`CdSHy zcO`;bgMASYi6`WSw#Z|A;wQgH@>+I3OT6(*JgZZ_XQ!LrBJfVW2RK%#02|@V|H4&8DqslU6Zj(x!tM{h zRawG+Vy63_8gP#G!Eq>qKf(C&!^G$01~baLLk#)ov-Pqx~Du>%LHMv?=WBx2p2eV zbj5fjTBhwo&zeD=l1*o}Zs%SMxEi9yokhbHhY4N!XV?t8}?!?42E-B^Rh&ABFxovs*HeQ5{{*)SrnJ%e{){Z_#JH+jvwF7>Jo zE+qzWrugBwVOZou~oFa(wc7?`wNde>~HcC@>fA^o>ll?~aj-e|Ju z+iJzZg0y1@eQ4}rm`+@hH(|=gW^;>n>ydn!8%B4t7WL)R-D>mMw<7Wz6>ulFnM7QA ze2HEqaE4O6jpVq&ol3O$46r+DW@%glD8Kp*tFY#8oiSyMi#yEpVIw3#t?pXG?+H>v z$pUwT@0ri)_Bt+H(^uzp6qx!P(AdAI_Q?b`>0J?aAKTPt>73uL2(WXws9+T|%U)Jq zP?Oy;y6?{%J>}?ZmfcnyIQHh_jL;oD$`U#!v@Bf{5%^F`UiOX%)<0DqQ^nqA5Ac!< z1DPO5C>W0%m?MN*x(k>lDT4W3;tPi=&yM#Wjwc5IFNiLkQf`7GN+J*MbB4q~HVePM zeDj8YyA*btY&n!M9$tuOxG0)2um))hsVsY+(p~JnDaT7x(s2If0H_iRSju7!z7p|8 zzI`NV!1hHWX3m)?t68k6yNKvop{Z>kl)f5GV(~1InT4%9IxqhDX-rgj)Y|NYq_NTlZgz-)=Y$=x9L7|k0=m@6WQ<4&r=BX@pW25NtCI+N{e&`RGSpR zeb^`@FHm5?pWseZ6V08{R(ki}--13S2op~9Kzz;#cPgL}Tmrqd+gs(fJLTCM8#&|S z^L+7PbAhltJDyyxAVxqf(2h!RGC3$;hX@YNz@&JRw!m5?Q)|-tZ8u0D$4we+QytG^ zj0U_@+N|OJlBHdWPN!K={a$R1Zi{2%5QD}s&s-Xn1tY1cwh)8VW z$pjq>8sj4)?76EJs6bA0E&pfr^Vq`&Xc;Tl2T!fm+MV%!H|i0o;7A=zE?dl)-Iz#P zSY7QRV`qRc6b&rON`BValC01zSLQpVemH5y%FxK8m^PeNN(Hf1(%C}KPfC*L?Nm!nMW0@J3(J=mYq3DPk;TMs%h`-amWbc%7{1Lg3$ z^e=btuqch-lydbtLvazh+fx?87Q7!YRT(=-Vx;hO)?o@f1($e5B?JB9jcRd;zM;iE zu?3EqyK`@_5Smr#^a`C#M>sRwq2^|ym)X*r;0v6AM`Zz1aK94@9Ti)Lixun2N!e-A z>w#}xPxVd9AfaF$XTTff?+#D(xwOpjZj9-&SU%7Z-E2-VF-n#xnPeQH*67J=j>TL# z<v}>AiTXrQ(fYa%82%qlH=L z6Fg8@r4p+BeTZ!5cZlu$iR?EJpYuTx>cJ~{{B7KODY#o*2seq=p2U0Rh;3mX^9sza zk^R_l7jzL5BXWlrVkhh!+LQ-Nc0I`6l1mWkp~inn)HQWqMTWl4G-TBLglR~n&6J?4 z7J)IO{wkrtT!Csntw3H$Mnj>@;QbrxC&Shqn^VVu$Ls*_c~TTY~fri6fO-=eJsC*8(3(H zSyO>=B;G`qA398OvCHRvf3mabrPZaaLhn*+jeA`qI!gP&i8Zs!*bBqMXDJpSZG$N) zx0rDLvcO>EoqCTR)|n7eOp-jmd>`#w`6`;+9+hihW2WnKVPQ20LR94h+(p)R$Y!Q zj_3ZEY+e@NH0f6VjLND)sh+Cvfo3CpcXw?`$@a^@CyLrAKIpjL8G z`;cDLqvK=ER)$q)+6vMKlxn!!SzWl>Ib9Ys9L)L0IWr*Ox;Rk#(Dpqf;wapY_EYL8 zKFrV)Q8BBKO4$r2hON%g=r@lPE;kBUVYVG`uxx~QI>9>MCXw_5vnmDsm|^KRny929 zeKx>F(LDs#K4FGU*k3~GX`A!)l8&|tyan-rBHBm6XaB5hc5sGKWwibAD7&3M-gh1n z2?eI7E2u{(^z#W~wU~dHSfy|m)%PY454NBxED)y-T3AO`CLQxklcC1I@Y`v4~SEI#Cm> z-cjqK6I?mypZapi$ZK;y&G+|#D=woItrajg69VRD+Fu8*UxG6KdfFmFLE}HvBJ~Y) zC&c-hr~;H2Idnsz7_F~MKpBZldh)>itc1AL0>4knbVy#%pUB&9vqL1Kg*^aU`k#(p z=A%lur(|$GWSqILaWZ#2xj(&lheSiA|N6DOG?A|$!aYM)?oME6ngnfLw0CA79WA+y zhUeLbMw*VB?drVE_D~3DWVaD>8x?_q>f!6;)i3@W<=kBZBSE=uIU60SW)qct?AdM zXgti8&O=}QNd|u%Fpxr172Kc`sX^@fm>Fxl8fbFalJYci_GGoIzU*~U*I!QLz? z4NYk^=JXBS*Uph@51da-v;%?))cB^(ps}y8yChu7CzyC9SX{jAq13zdnqRHRvc{ha zcPmgCUqAJ^1RChMCCz;ZN*ap{JPoE<1#8nNObDbAt6Jr}Crq#xGkK@w2mLhIUecvy z#?s~?J()H*?w9K`_;S+8TNVkHSk}#yvn+|~jcB|he}OY(zH|7%EK%-Tq=)18730)v zM3f|=oFugXq3Lqn={L!wx|u(ycZf(Te11c3?^8~aF; zNMC)gi?nQ#S$s{46yImv_7@4_qu|XXEza~);h&cr*~dO@#$LtKZa@@r$8PD^jz{D6 zk~5;IJBuQjsKk+8i0wzLJ2=toMw4@rw7(|6`7*e|V(5-#ZzRirtkXBO1oshQ&0>z&HAtSF8+871e|ni4gLs#`3v7gnG#^F zDv!w100_HwtU}B2T!+v_YDR@-9VmoGW+a76oo4yy)o`MY(a^GcIvXW+4)t{lK}I-& zl-C=(w_1Z}tsSFjFd z3iZjkO6xnjLV3!EE?ex9rb1Zxm)O-CnWPat4vw08!GtcQ3lHD+ySRB*3zQu-at$rj zzBn`S?5h=JlLXX8)~Jp%1~YS6>M8c-Mv~E%s7_RcvIYjc-ia`3r>dvjxZ6=?6=#OM zfsv}?hGnMMdi9C`J9+g)5`M9+S79ug=!xE_XcHdWnIRr&hq$!X7aX5kJV8Q(6Lq?|AE8N2H z37j{DPDY^Jw!J>~>Mwaja$g%q1sYfH4bUJFOR`x=pZQ@O(-4b#5=_Vm(0xe!LW>YF zO4w`2C|Cu%^C9q9B>NjFD{+qt)cY3~(09ma%mp3%cjFsj0_93oVHC3)AsbBPuQNBO z`+zffU~AgGrE0K{NVR}@oxB4&XWt&pJ-mq!JLhFWbnXf~H%uU?6N zWJ7oa@``Vi$pMWM#7N9=sX1%Y+1qTGnr_G&h3YfnkHPKG}p>i{fAG+(klE z(g~u_rJXF48l1D?;;>e}Ra{P$>{o`jR_!s{hV1Wk`vURz`W2c$-#r9GM7jgs2>um~ zouGlCm92rOiLITzf`jgl`v2qYw^!Lh0YwFHO1|3Krp8ztE}?#2+>c)yQlNw%5e6w5 zIm9BKZN5Q9b!tX`Zo$0RD~B)VscWp(FR|!a!{|Q$={;ZWl%10vBzfgWn}WBe!%cug z^G%;J-L4<6&aCKx@@(Grsf}dh8fuGT+TmhhA)_16uB!t{HIAK!B-7fJLe9fsF)4G- zf>(~ⅅ8zCNKueM5c!$)^mKpZNR!eIlFST57ePGQcqCqedAQ3UaUEzpjM--5V4YO zY22VxQm%$2NDnwfK+jkz=i2>NjAM6&P1DdcO<*Xs1-lzdXWn#LGSxwhPH7N%D8-zCgpFWt@`LgNYI+Fh^~nSiQmwH0^>E>*O$47MqfQza@Ce z1wBw;igLc#V2@y-*~Hp?jA1)+MYYyAt|DV_8RQCrRY@sAviO}wv;3gFdO>TE(=9o? z=S(r=0oT`w24=ihA=~iFV5z$ZG74?rmYn#eanx(!Hkxcr$*^KRFJKYYB&l6$WVsJ^ z-Iz#HYmE)Da@&seqG1fXsTER#adA&OrD2-T(z}Cwby|mQf{0v*v3hq~pzF`U`jenT z=XHXeB|fa?Ws$+9ADO0rco{#~+`VM?IXg7N>M0w1fyW1iiKTA@p$y zSiAJ%-Mg{m>&S4r#Tw@?@7ck}#oFo-iZJCWc`hw_J$=rw?omE{^tc59ftd`xq?jzf zo0bFUI=$>O!45{!c4?0KsJmZ#$vuYpZLo_O^oHTmmLMm0J_a{Nn`q5tG1m=0ecv$T z5H7r0DZGl6be@aJ+;26EGw9JENj0oJ5K0=^f-yBW2I0jqVIU};NBp*gF7_KlQnhB6 z##d$H({^HXj@il`*4^kC42&3)(A|tuhs;LygA-EWFSqpe+%#?6HG6}mE215Z4mjO2 zY2^?5$<8&k`O~#~sSc5Fy`5hg5#e{kG>SAbTxCh{y32fHkNryU_c0_6h&$zbWc63T z7|r?X7_H!9XK!HfZ+r?FvBQ$x{HTGS=1VN<>Ss-7M3z|vQG|N}Frv{h-q623@Jz*@ ziXlZIpAuY^RPlu&=nO)pFhML5=ut~&zWDSsn%>mv)!P1|^M!d5AwmSPIckoY|0u9I zTDAzG*U&5SPf+@c_tE_I!~Npfi$?gX(kn=zZd|tUZ_ez(xP+)xS!8=k(<{9@<+EUx zYQgZhjn(0qA#?~Q+EA9oh_Jx5PMfE3#KIh#*cFIFQGi)-40NHbJO&%ZvL|LAqU=Rw zf?Vr4qkUcKtLr^g-6*N-tfk+v8@#Lpl~SgKyH!+m9?T8B>WDWK22;!i5&_N=%f{__ z-LHb`v-LvKqTJZCx~z|Yg;U_f)VZu~q7trb%C6fOKs#eJosw&b$nmwGwP;Bz`=zK4 z>U3;}T_ptP)w=vJaL8EhW;J#SHA;fr13f=r#{o)`dRMOs-T;lp&Toi@u^oB_^pw=P zp#8Geo2?@!h2EYHY?L;ayT}-Df0?TeUCe8Cto{W0_a>!7Gxmi5G-nIIS;X{flm2De z{SjFG%knZoVa;mtHR_`*6)KEf=dvOT3OgT7C7&-4P#4X^B%VI&_57cBbli()(%zZC?Y0b;?5!f22UleQ=9h4_LkcA!Xsqx@q{ko&tvP_V@7epFs}AIpM{g??PA>U(sk$Gum>2Eu zD{Oy{$OF%~?B6>ixQeK9I}!$O0!T3#Ir8MW)j2V*qyJ z8Bg17L`rg^B_#rkny-=<3fr}Y42+x0@q6POk$H^*p3~Dc@5uYTQ$pfaRnIT}Wxb;- zl!@kkZkS=l)&=y|21veY8yz$t-&7ecA)TR|=51BKh(@n|d$EN>18)9kSQ|GqP?aeM ztXd9C&Md$PPF*FVs*GhoHM2L@D$(Qf%%x zwQBUt!jM~GgwluBcwkgwQ!249uPkNz3u@LSYZgmpHgX|P#8!iKk^vSKZ;?)KE$92d z2U>y}VWJ0&zjrIqddM3dz-nU%>bL&KU%SA|LiiUU7Ka|c=jF|vQ1V)Jz`JZe*j<5U6~RVuBEVJoY~ z&GE+F$f>4lN=X4-|9v*5O*Os>>r87u z!_1NSV?_X&HeFR1fOFb8_P)4lybJ6?1BWK`Tv2;4t|x1<#@17UO|hLGnrB%nu)fDk zfstJ4{X4^Y<8Lj<}g2^kksSefQTMuTo?tJLCh zC~>CR#a0hADw!_Vg*5fJwV{~S(j8)~sn>Oyt(ud2$1YfGck77}xN@3U_#T`q)f9!2 zf>Ia;Gwp2_C>WokU%(z2ec8z94pZyhaK+e>3a9sj^-&*V494;p9-xk+u1Jn#N_&xs z59OI2w=PuTErv|aNcK*>3l^W*p3}fjXJjJAXtBA#%B(-0--s;1U#f8gFYW!JL+iVG zV0SSx5w8eVgE?3Sg@eQv)=x<+-JgpVixZQNaZr}3b8sVyVs$@ndkF5FYKka@b+YAh z#nq_gzlIDKEs_i}H4f)(VQ!FSB}j>5znkVD&W0bOA{UZ7h!(FXrBbtdGA|PE1db>s z$!X)WY)u#7P8>^7Pjjj-kXNBuJX3(pJVetTZRNOnR5|RT5D>xmwxhAn)9KF3J05J; z-Mfb~dc?LUGqozC2p!1VjRqUwwDBnJhOua3vCCB-%ykW_ohSe?$R#dz%@Gym-8-RA zjMa_SJSzIl8{9dV+&63e9$4;{=1}w2=l+_j_Dtt@<(SYMbV-18&%F@Zl7F_5! z@xwJ0wiDdO%{}j9PW1(t+8P7Ud79yjY>x>aZYWJL_NI?bI6Y02`;@?qPz_PRqz(7v``20`- z033Dy|4;y6di|>cz|P-z|6c&3f&g^OAt8aN0Zd&0yZ>dq2aFCsE<~Ucf$v{sL=*++ zBxFSa2lfA+Y%U@B&3D=&CBO&u`#*nNc|PCY7XO<}MnG0VR764XrHtrb5zwC*2F!Lp zE<~Vj0;z!S-|3M4DFxuQ=`ShTf28<9p!81(0hFbGNqF%0gg*orez9!qt8e%o@Yfl@ zhvY}{@3&f??}7<`p>FyU;7?VkKbh8_=csozU=|fH&szgZ{=NDCylQ>EH^x5!K3~-V z)_2Y>0uJ`Z0Pb58y`RL+&n@m9tJ)O<%q#&u#DAIt+-rRt0eSe1MTtMl@W)H$b3D)@ z*A-1bUgZI)>HdcI4&W>P4W5{-j=s5p5`cbQ+{(g0+RDnz!TR^mxSLu_y#SDVKrj8i zA^hi6>jMGM;`$9Vfb-Yf!47b)Ow`2OKtNB=z|Kxa$5O}WPo;(Dc^`q(7X8kkeFyO8 z{XOq^07=u|7*P2`m;>PIFf=i80MKUxsN{d2cX0M+REsE*20+WQ79T9&cqT>=I_U% z{=8~^Isg(Nzo~`4iQfIb_#CVCD>#5h>=-Z#5dH}WxYzn%0)GAm6L2WdUdP=0_h>7f z(jh&7%1i(ZOn+}D8$iGK4Vs{pmHl_w4Qm-46H9>4^{3dz^DZDh+dw)6Xd@CpQNK$j z{CU;-cmpK=egplZ3y3%y=sEnCJ^eYVKXzV8H2_r*fJ*%*B;a1_lOpt6)IT1IAK2eB z{rie|uDJUrbgfUE>~C>@RO|m5ex55F{=~Bb4Cucp{ok7Yf9V}QuZ`#Gc|WaqsQlK- zKaV)iMRR__&Ak2Z=IM9R9g5$WM4u{a^C-7uX*!myEym z#_#p^T!P~#Dx$%^K>Y_nj_3J*E_LwJ60-5Xu=LkJAwcP@|0;a&+|+ZX`Jbj9P5;T% z|KOc}4*#4o{U?09`9Hz`Xo-I!P=9XfIrr*MQ}y=$!qgv?_J38^bNb4kM&_OVg^_=Eu-qG5U(fw0KMgH){C8pazq~51rN97hf#20-7=aK0)N|UM H-+%o-(+5aQ literal 0 HcmV?d00001 diff --git a/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties b/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..cc5527d781 --- /dev/null +++ b/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip diff --git a/pkgs/cronet_http/example/android/gradlew b/pkgs/cronet_http/example/android/gradlew new file mode 100755 index 0000000000..9d82f78915 --- /dev/null +++ b/pkgs/cronet_http/example/android/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/pkgs/cronet_http/example/android/gradlew.bat b/pkgs/cronet_http/example/android/gradlew.bat new file mode 100644 index 0000000000..aec99730b4 --- /dev/null +++ b/pkgs/cronet_http/example/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/pkgs/cronet_http/example/android/local.properties b/pkgs/cronet_http/example/android/local.properties new file mode 100644 index 0000000000..57eb8bd2fe --- /dev/null +++ b/pkgs/cronet_http/example/android/local.properties @@ -0,0 +1,3 @@ +sdk.dir=/Users/bquinlan/Library/Android/sdk +flutter.sdk=/Users/bquinlan/flutter +flutter.buildMode=debug \ No newline at end of file diff --git a/pkgs/cronet_http/example/android/settings.gradle b/pkgs/cronet_http/example/android/settings.gradle new file mode 100644 index 0000000000..44e62bcf06 --- /dev/null +++ b/pkgs/cronet_http/example/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/pkgs/cronet_http/example/integration_test/client_conformance_test.dart b/pkgs/cronet_http/example/integration_test/client_conformance_test.dart new file mode 100644 index 0000000000..d17a950dd1 --- /dev/null +++ b/pkgs/cronet_http/example/integration_test/client_conformance_test.dart @@ -0,0 +1,23 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:cronet_http/cronet_client.dart'; +import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; +import 'package:integration_test/integration_test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + final client = CronetClient(); + testRequestBody(client); + testRequestBodyStreamed(client, canStreamRequestBody: false); + testResponseBody(client); + testResponseBodyStreamed(client); + testRequestHeaders(client); + testResponseHeaders(client); + testRedirect(client); + + // TODO: Use `testAll` when `testServerErrors` passes i.e. + // testAll(CronetClient(), canStreamRequestBody: false); +} diff --git a/pkgs/cronet_http/example/lib/book.dart b/pkgs/cronet_http/example/lib/book.dart new file mode 100644 index 0000000000..fe23ce7629 --- /dev/null +++ b/pkgs/cronet_http/example/lib/book.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +class Book { + String title; + String description; + String imageUrl; + + Book(this.title, this.description, this.imageUrl); + + static List listFromJson(Map json) { + final books = []; + + if (json['items'] is List) { + final items = (json['items'] as List).cast>(); + + for (final item in items) { + if (item.containsKey('volumeInfo')) { + final volumeInfo = item['volumeInfo'] as Map; + if (volumeInfo['title'] is String && + volumeInfo['description'] is String && + volumeInfo['imageLinks'] is Map && + (volumeInfo['imageLinks'] as Map)['smallThumbnail'] is String) { + books.add(Book( + volumeInfo['title'] as String, + volumeInfo['description'] as String, + (volumeInfo['imageLinks'] as Map)['smallThumbnail'] as String)); + } + } + } + } + + return books; + } +} diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart new file mode 100644 index 0000000000..92f948820a --- /dev/null +++ b/pkgs/cronet_http/example/lib/main.dart @@ -0,0 +1,135 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:convert'; +import 'dart:io'; + +import 'package:cronet_http/cronet_client.dart'; +import 'package:flutter/material.dart'; +import 'package:http/http.dart'; +import 'package:http/io_client.dart'; + +import 'book.dart'; + +void main() { + late Client client; + if (Platform.isAndroid) { + client = CronetClient(); + } else { + client = IOClient(); + } + + // Run the app with the default `client` set to the one assigned above. + runWithClient(() => runApp(const BookSearchApp()), () => client); +} + +class BookSearchApp extends StatelessWidget { + const BookSearchApp({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) => const MaterialApp( + // Remove the debug banner. + debugShowCheckedModeBanner: false, + title: 'Book Search', + home: HomePage(), + ); +} + +class HomePage extends StatefulWidget { + const HomePage({Key? key}) : super(key: key); + + @override + State createState() => _HomePageState(); +} + +class _HomePageState extends State { + List? _books; + + @override + void initState() { + super.initState(); + } + + // Get the list of books matching `query`. + // The `get` call will automatically use the `client` configurated in `main`. + Future> _getBooks(String query) async { + final response = await get( + Uri.https( + 'www.googleapis.com', + '/books/v1/volumes', + {'q': query, 'maxResults': '40', 'printType': 'books'}, + ), + ); + + final json = jsonDecode(utf8.decode(response.bodyBytes)) as Map; + return Book.listFromJson(json); + } + + void _runSearch(String query) async { + if (query.isEmpty) { + setState(() { + _books = null; + }); + return; + } + + final books = await _getBooks(query); + setState(() { + _books = books; + }); + } + + @override + Widget build(BuildContext context) { + final searchResult = _books == null + ? const Text('Please enter a query', style: TextStyle(fontSize: 24)) + : _books!.isNotEmpty + ? BookList(_books!) + : const Text('No results found', style: TextStyle(fontSize: 24)); + + return Scaffold( + appBar: AppBar(title: const Text('Book Search')), + body: Padding( + padding: const EdgeInsets.all(10), + child: Column( + children: [ + const SizedBox(height: 20), + TextField( + onChanged: _runSearch, + decoration: const InputDecoration( + labelText: 'Search', + suffixIcon: Icon(Icons.search), + ), + ), + const SizedBox(height: 20), + Expanded(child: searchResult), + ], + ), + ), + ); + } +} + +class BookList extends StatefulWidget { + final List books; + const BookList(this.books, {Key? key}) : super(key: key); + + @override + State createState() => _BookListState(); +} + +class _BookListState extends State { + @override + Widget build(BuildContext context) => ListView.builder( + itemCount: widget.books.length, + itemBuilder: (context, index) => Card( + key: ValueKey(widget.books[index].title), + child: ListTile( + leading: Image.network(widget.books[index].imageUrl), + title: Text(widget.books[index].title), + subtitle: Text(widget.books[index].description), + ), + ), + ); +} diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml new file mode 100644 index 0000000000..25c135f35d --- /dev/null +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -0,0 +1,27 @@ +name: cronet_http_example +description: Demonstrates how to use the cronet_http plugin. + +publish_to: 'none' + +environment: + sdk: ">=2.17.5 <3.0.0" + +dependencies: + cronet_http: + path: ../ + cupertino_icons: ^1.0.2 + flutter: + sdk: flutter + http: ^0.13.5 + +dev_dependencies: + flutter_lints: ^1.0.0 + flutter_test: + sdk: flutter + http_client_conformance_tests: + path: ../../http_client_conformance_tests/ + integration_test: + sdk: flutter + +flutter: + uses-material-design: true diff --git a/pkgs/cronet_http/lib/cronet_client.dart b/pkgs/cronet_http/lib/cronet_client.dart new file mode 100644 index 0000000000..5894ae988f --- /dev/null +++ b/pkgs/cronet_http/lib/cronet_client.dart @@ -0,0 +1,107 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; + +import 'package:flutter/services.dart'; +import 'package:http/http.dart'; + +import 'src/messages.dart'; + +/// A HTTP [Client] based on the +/// [Cronet](https://developer.android.com/guide/topics/connectivity/cronet) +/// network stack. +/// +/// For example: +/// ``` +/// void main() async { +/// var client = CronetClient(); +/// final response = await client.get( +/// Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'})); +/// if (response.statusCode != 200) { +/// throw HttpException('bad response: ${response.statusCode}'); +/// } +/// +/// final decodedResponse = +/// jsonDecode(utf8.decode(response.bodyBytes)) as Map; +/// +/// final itemCount = decodedResponse['totalItems']; +/// print('Number of books about http: $itemCount.'); +/// for (var i = 0; i < min(itemCount, 10); ++i) { +/// print(decodedResponse['items'][i]['volumeInfo']['title']); +/// } +/// } +/// ``` +class CronetClient extends BaseClient { + static late final HttpApi _api = HttpApi(); + + @override + Future send(BaseRequest request) async { + final stream = request.finalize(); + + final body = await stream.toBytes(); + + var headers = request.headers; + if (body.isNotEmpty && + !headers.keys.any((h) => h.toLowerCase() == 'content-type')) { + // Cronet requires that requests containing upload data set a + // 'Content-Type' header. + headers = {...headers, 'content-type': 'application/octet-stream'}; + } + + final response = await _api.start(StartRequest( + url: request.url.toString(), + method: request.method, + headers: headers, + body: body, + followRedirects: request.followRedirects, + maxRedirects: request.maxRedirects)); + + final responseCompleter = Completer(); + final responseDataController = StreamController(); + + void raiseException(Exception exception) { + if (responseCompleter.isCompleted) { + responseDataController.addError(exception); + } else { + responseCompleter.completeError(exception); + } + responseDataController.close(); + } + + final e = EventChannel(response.eventChannel); + e.receiveBroadcastStream().listen( + (e) { + final event = EventMessage.decode(e as Object); + switch (event.type) { + case EventMessageType.responseStarted: + responseCompleter.complete(event.responseStarted!); + break; + case EventMessageType.readCompleted: + responseDataController.sink.add(event.readCompleted!.data); + break; + case EventMessageType.tooManyRedirects: + raiseException( + ClientException('Redirect limit exceeded', request.url)); + break; + default: + throw UnsupportedError('Unexpected event: ${event.type}'); + } + }, + onDone: responseDataController.close, + onError: (Object e) { + final pe = e as PlatformException; + raiseException(ClientException(pe.message!, request.url)); + }); + + final result = await responseCompleter.future; + final responseHeaders = (result.headers.cast>()) + .map((key, value) => MapEntry(key.toLowerCase(), value.join(','))); + + return StreamedResponse(responseDataController.stream, result.statusCode, + contentLength: responseHeaders['content-lenght'] as int?, + isRedirect: result.isRedirect, + headers: responseHeaders); + } +} diff --git a/pkgs/cronet_http/lib/src/messages.dart b/pkgs/cronet_http/lib/src/messages.dart new file mode 100644 index 0000000000..39470377fc --- /dev/null +++ b/pkgs/cronet_http/lib/src/messages.dart @@ -0,0 +1,274 @@ +// Autogenerated from Pigeon (v3.2.3), do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import +import 'dart:async'; +import 'dart:typed_data' show Uint8List, Int32List, Int64List, Float64List; + +import 'package:flutter/foundation.dart' show WriteBuffer, ReadBuffer; +import 'package:flutter/services.dart'; + +enum EventMessageType { + responseStarted, + readCompleted, + tooManyRedirects, +} + +class ResponseStarted { + ResponseStarted({ + required this.headers, + required this.statusCode, + required this.isRedirect, + }); + + Map?> headers; + int statusCode; + bool isRedirect; + + Object encode() { + final Map pigeonMap = {}; + pigeonMap['headers'] = headers; + pigeonMap['statusCode'] = statusCode; + pigeonMap['isRedirect'] = isRedirect; + return pigeonMap; + } + + static ResponseStarted decode(Object message) { + final Map pigeonMap = message as Map; + return ResponseStarted( + headers: (pigeonMap['headers'] as Map?)! + .cast?>(), + statusCode: pigeonMap['statusCode']! as int, + isRedirect: pigeonMap['isRedirect']! as bool, + ); + } +} + +class ReadCompleted { + ReadCompleted({ + required this.data, + }); + + Uint8List data; + + Object encode() { + final Map pigeonMap = {}; + pigeonMap['data'] = data; + return pigeonMap; + } + + static ReadCompleted decode(Object message) { + final Map pigeonMap = message as Map; + return ReadCompleted( + data: pigeonMap['data']! as Uint8List, + ); + } +} + +class EventMessage { + EventMessage({ + required this.type, + this.responseStarted, + this.readCompleted, + }); + + EventMessageType type; + ResponseStarted? responseStarted; + ReadCompleted? readCompleted; + + Object encode() { + final Map pigeonMap = {}; + pigeonMap['type'] = type.index; + pigeonMap['responseStarted'] = responseStarted?.encode(); + pigeonMap['readCompleted'] = readCompleted?.encode(); + return pigeonMap; + } + + static EventMessage decode(Object message) { + final Map pigeonMap = message as Map; + return EventMessage( + type: EventMessageType.values[pigeonMap['type']! as int], + responseStarted: pigeonMap['responseStarted'] != null + ? ResponseStarted.decode(pigeonMap['responseStarted']!) + : null, + readCompleted: pigeonMap['readCompleted'] != null + ? ReadCompleted.decode(pigeonMap['readCompleted']!) + : null, + ); + } +} + +class StartRequest { + StartRequest({ + required this.url, + required this.method, + required this.headers, + required this.body, + required this.maxRedirects, + required this.followRedirects, + }); + + String url; + String method; + Map headers; + Uint8List body; + int maxRedirects; + bool followRedirects; + + Object encode() { + final Map pigeonMap = {}; + pigeonMap['url'] = url; + pigeonMap['method'] = method; + pigeonMap['headers'] = headers; + pigeonMap['body'] = body; + pigeonMap['maxRedirects'] = maxRedirects; + pigeonMap['followRedirects'] = followRedirects; + return pigeonMap; + } + + static StartRequest decode(Object message) { + final Map pigeonMap = message as Map; + return StartRequest( + url: pigeonMap['url']! as String, + method: pigeonMap['method']! as String, + headers: (pigeonMap['headers'] as Map?)! + .cast(), + body: pigeonMap['body']! as Uint8List, + maxRedirects: pigeonMap['maxRedirects']! as int, + followRedirects: pigeonMap['followRedirects']! as bool, + ); + } +} + +class StartResponse { + StartResponse({ + required this.eventChannel, + }); + + String eventChannel; + + Object encode() { + final Map pigeonMap = {}; + pigeonMap['eventChannel'] = eventChannel; + return pigeonMap; + } + + static StartResponse decode(Object message) { + final Map pigeonMap = message as Map; + return StartResponse( + eventChannel: pigeonMap['eventChannel']! as String, + ); + } +} + +class _HttpApiCodec extends StandardMessageCodec { + const _HttpApiCodec(); + @override + void writeValue(WriteBuffer buffer, Object? value) { + if (value is EventMessage) { + buffer.putUint8(128); + writeValue(buffer, value.encode()); + } else if (value is ReadCompleted) { + buffer.putUint8(129); + writeValue(buffer, value.encode()); + } else if (value is ResponseStarted) { + buffer.putUint8(130); + writeValue(buffer, value.encode()); + } else if (value is StartRequest) { + buffer.putUint8(131); + writeValue(buffer, value.encode()); + } else if (value is StartResponse) { + buffer.putUint8(132); + writeValue(buffer, value.encode()); + } else { + super.writeValue(buffer, value); + } + } + + @override + Object? readValueOfType(int type, ReadBuffer buffer) { + switch (type) { + case 128: + return EventMessage.decode(readValue(buffer)!); + + case 129: + return ReadCompleted.decode(readValue(buffer)!); + + case 130: + return ResponseStarted.decode(readValue(buffer)!); + + case 131: + return StartRequest.decode(readValue(buffer)!); + + case 132: + return StartResponse.decode(readValue(buffer)!); + + default: + return super.readValueOfType(type, buffer); + } + } +} + +class HttpApi { + /// Constructor for [HttpApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default + /// BinaryMessenger will be used which routes to the host platform. + HttpApi({BinaryMessenger? binaryMessenger}) + : _binaryMessenger = binaryMessenger; + + final BinaryMessenger? _binaryMessenger; + + static const MessageCodec codec = _HttpApiCodec(); + + Future start(StartRequest arg_request) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.HttpApi.start', codec, + binaryMessenger: _binaryMessenger); + final Map? replyMap = + await channel.send([arg_request]) as Map?; + if (replyMap == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyMap['error'] != null) { + final Map error = + (replyMap['error'] as Map?)!; + throw PlatformException( + code: (error['code'] as String?)!, + message: error['message'] as String?, + details: error['details'], + ); + } else if (replyMap['result'] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (replyMap['result'] as StartResponse?)!; + } + } + + Future dummy(EventMessage arg_message) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.HttpApi.dummy', codec, + binaryMessenger: _binaryMessenger); + final Map? replyMap = + await channel.send([arg_message]) as Map?; + if (replyMap == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyMap['error'] != null) { + final Map error = + (replyMap['error'] as Map?)!; + throw PlatformException( + code: (error['code'] as String?)!, + message: error['message'] as String?, + details: error['details'], + ); + } else { + return; + } + } +} diff --git a/pkgs/cronet_http/pigeons/messages.dart b/pkgs/cronet_http/pigeons/messages.dart new file mode 100644 index 0000000000..08b7a728d2 --- /dev/null +++ b/pkgs/cronet_http/pigeons/messages.dart @@ -0,0 +1,69 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// Defines messages exchanged between the cronet_http native and Dart code. + +import 'package:pigeon/pigeon.dart'; + +/// An event message sent when the response headers are received. +/// +/// If [StartRequest.followRedirects] was false, then the first response, +/// regardless of whether it is a redirect or not, will be returned. Otherwise, +/// this is the response after all redirects have been followed. +/// +/// See +/// [UrlRequest.Callback.onResponseStarted](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#public-abstract-void-onresponsestarted-urlrequest-request,-urlresponseinfo-info) +class ResponseStarted { + Map?> headers; + int statusCode; + bool isRedirect; +} + +/// An event message sent when part of the response body has been received. +/// +/// See +/// [UrlRequest.Callback.onReadCompleted](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#public-abstract-void-onreadcompleted-urlrequest-request,-urlresponseinfo-info,-bytebuffer-bytebuffer) +class ReadCompleted { + Uint8List data; +} + +enum EventMessageType { responseStarted, readCompleted, tooManyRedirects } + +/// Encapsulates a message sent from Cronet to the Dart client. +class EventMessage { + EventMessageType type; + + // Set if [type] == responseStarted; + ResponseStarted? responseStarted; + + // Set if [type] == readCompleted; + ReadCompleted? readCompleted; +} + +class StartRequest { + String url; + String method; + Map headers; + Uint8List body; + int maxRedirects; + bool followRedirects; +} + +class StartResponse { + // The channel that the caller should listen to for events related to the + // HTTP request. + String eventChannel; +} + +@HostApi() +abstract class HttpApi { + /// Starts an HTTP request and returns a channel where future results will + /// be streamed. + StartResponse start(StartRequest request); + + // Pigeon does not generate code for classes that are not used in an API. + // So create a dummy method that includes classes that will be used for + // other purposes e.g. are sent over an `EventChannel`. + void dummy(EventMessage message); +} diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml new file mode 100644 index 0000000000..1751e316fb --- /dev/null +++ b/pkgs/cronet_http/pubspec.yaml @@ -0,0 +1,24 @@ +name: cronet_http +description: > + An Android Flutter plugin that provides access to the Cronet HTTP client. +version: 0.0.1 + +environment: + sdk: ">=2.17.5 <3.0.0" + flutter: ">3.0.0" + +dependencies: + flutter: + sdk: flutter + http: ^0.13.4 + +dev_dependencies: + lints: ^1.0.0 + pigeon: ^3.2.3 + +flutter: + plugin: + platforms: + android: + package: io.flutter.plugins.cronet_http + pluginClass: CronetHttpPlugin diff --git a/pkgs/cronet_http/run_pigeon.sh b/pkgs/cronet_http/run_pigeon.sh new file mode 100755 index 0000000000..188a29cad2 --- /dev/null +++ b/pkgs/cronet_http/run_pigeon.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +# Generate the platform messages used by cronet_http. + +flutter pub run pigeon \ + --input pigeons/messages.dart \ + --dart_out lib/src/messages.dart \ + --java_out android/src/main/java/io/flutter/plugins/cronet_http/Messages.java \ + --java_package "io.flutter.plugins.cronet_http" + +flutter format lib/src/messages.dart diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index 7ef741f685..abe71e0ff6 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -20,6 +20,7 @@ export 'src/request_headers_tests.dart' show testRequestHeaders; export 'src/response_body_streamed_test.dart' show testResponseBodyStreamed; export 'src/response_body_tests.dart' show testResponseBody; export 'src/response_headers_tests.dart' show testResponseHeaders; +export 'src/server_errors_test.dart' show testServerErrors; /// Runs the entire test suite against the given [Client]. /// From 20b4756a5df01173ed365de21177cd87c1f967fd Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 18 Aug 2022 16:27:37 -0700 Subject: [PATCH 155/448] Add background sessions tests (#765) --- .../url_session_delegate_test.dart | 79 +++++++++++-------- .../integration_test/url_session_test.dart | 17 +++- pkgs/cupertino_http/lib/cupertino_http.dart | 3 +- 3 files changed, 64 insertions(+), 35 deletions(-) diff --git a/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart index 51024b82cc..50cf1245d3 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart @@ -9,7 +9,7 @@ import 'package:cupertino_http/cupertino_http.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; -void testOnComplete() { +void testOnComplete(URLSessionConfiguration config) { group('onComplete', () { late HttpServer server; @@ -32,9 +32,8 @@ void testOnComplete() { late URLSession actualSession; late URLSessionTask actualTask; - final session = URLSession.sessionWithConfiguration( - URLSessionConfiguration.defaultSessionConfiguration(), - onComplete: (s, t, e) { + final session = + URLSession.sessionWithConfiguration(config, onComplete: (s, t, e) { actualSession = s; actualTask = t; actualError = e; @@ -57,9 +56,8 @@ void testOnComplete() { late URLSession actualSession; late URLSessionTask actualTask; - final session = URLSession.sessionWithConfiguration( - URLSessionConfiguration.defaultSessionConfiguration(), - onComplete: (s, t, e) { + final session = + URLSession.sessionWithConfiguration(config, onComplete: (s, t, e) { actualSession = s; actualTask = t; actualError = e; @@ -72,12 +70,17 @@ void testOnComplete() { await c.future; expect(actualSession, session); expect(actualTask, task); - expect(actualError!.code, -1003); // kCFURLErrorCannotFindHost + expect( + actualError!.code, + anyOf( + -1001, // kCFURLErrorTimedOut + -1003, // kCFURLErrorCannotFindHost + )); }); }); } -void testOnResponse() { +void testOnResponse(URLSessionConfiguration config) { group('onResponse', () { late HttpServer server; @@ -100,9 +103,8 @@ void testOnResponse() { late URLSession actualSession; late URLSessionTask actualTask; - final session = URLSession.sessionWithConfiguration( - URLSessionConfiguration.defaultSessionConfiguration(), - onResponse: (s, t, r) { + final session = + URLSession.sessionWithConfiguration(config, onResponse: (s, t, r) { actualSession = s; actualTask = t; actualResponse = r as HTTPURLResponse; @@ -124,8 +126,7 @@ void testOnResponse() { final c = Completer(); var called = false; - final session = URLSession.sessionWithConfiguration( - URLSessionConfiguration.defaultSessionConfiguration(), + final session = URLSession.sessionWithConfiguration(config, onComplete: (session, task, error) => c.complete(), onResponse: (s, t, r) { called = true; @@ -142,7 +143,7 @@ void testOnResponse() { }); } -void testOnData() { +void testOnData(URLSessionConfiguration config) { group('onData', () { late HttpServer server; @@ -165,8 +166,7 @@ void testOnData() { late URLSession actualSession; late URLSessionTask actualTask; - final session = URLSession.sessionWithConfiguration( - URLSessionConfiguration.defaultSessionConfiguration(), + final session = URLSession.sessionWithConfiguration(config, onComplete: (s, t, r) => c.complete(), onData: (s, t, d) { actualSession = s; @@ -185,7 +185,7 @@ void testOnData() { }); } -void testOnFinishedDownloading() { +void testOnFinishedDownloading(URLSessionConfiguration config) { group('onFinishedDownloading', () { late HttpServer server; @@ -208,8 +208,7 @@ void testOnFinishedDownloading() { late URLSessionDownloadTask actualTask; late String actualContent; - final session = URLSession.sessionWithConfiguration( - URLSessionConfiguration.defaultSessionConfiguration(), + final session = URLSession.sessionWithConfiguration(config, onComplete: (s, t, r) => c.complete(), onFinishedDownloading: (s, t, uri) { actualSession = s; @@ -228,7 +227,7 @@ void testOnFinishedDownloading() { }); } -void testOnRedirect() { +void testOnRedirect(URLSessionConfiguration config) { group('onRedirect', () { late HttpServer redirectServer; @@ -257,7 +256,6 @@ void testOnRedirect() { }); test('disallow redirect', () async { - final config = URLSessionConfiguration.defaultSessionConfiguration(); final session = URLSession.sessionWithConfiguration(config, onRedirect: (redirectSession, redirectTask, redirectResponse, newRequest) => @@ -283,7 +281,6 @@ void testOnRedirect() { }); test('use preposed redirect request', () async { - final config = URLSessionConfiguration.defaultSessionConfiguration(); final session = URLSession.sessionWithConfiguration(config, onRedirect: (redirectSession, redirectTask, redirectResponse, newRequest) => @@ -307,7 +304,6 @@ void testOnRedirect() { }); test('use custom redirect request', () async { - final config = URLSessionConfiguration.defaultSessionConfiguration(); final session = URLSession.sessionWithConfiguration( config, onRedirect: (redirectSession, redirectTask, redirectResponse, @@ -334,7 +330,6 @@ void testOnRedirect() { }); test('exception in http redirection', () async { - final config = URLSessionConfiguration.defaultSessionConfiguration(); final session = URLSession.sessionWithConfiguration( config, onRedirect: @@ -363,7 +358,6 @@ void testOnRedirect() { }, skip: 'Error not set for redirect exceptions.'); test('3 redirects', () async { - final config = URLSessionConfiguration.defaultSessionConfiguration(); var redirectCounter = 0; final session = URLSession.sessionWithConfiguration( config, @@ -415,7 +409,6 @@ void testOnRedirect() { test('allow too many redirects', () async { // The Foundation URL Loading System limits the number of redirects // even when a redirect delegate is present and allows the redirect. - final config = URLSessionConfiguration.defaultSessionConfiguration(); final session = URLSession.sessionWithConfiguration( config, onRedirect: @@ -445,9 +438,31 @@ void testOnRedirect() { void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - testOnComplete(); - testOnResponse(); - testOnData(); - testOnRedirect(); - testOnFinishedDownloading(); + group('backgroundSession', () { + final config = + URLSessionConfiguration.backgroundSession('backgroundSession'); + testOnComplete(config); + testOnResponse(config); + testOnData(config); + // onRedirect is not called for background sessions. + testOnFinishedDownloading(config); + }); + + group('defaultSessionConfiguration', () { + final config = URLSessionConfiguration.defaultSessionConfiguration(); + testOnComplete(config); + testOnResponse(config); + testOnData(config); + testOnRedirect(config); + testOnFinishedDownloading(config); + }); + + group('ephemeralSessionConfiguration', () { + final config = URLSessionConfiguration.ephemeralSessionConfiguration(); + testOnComplete(config); + testOnResponse(config); + testOnData(config); + testOnRedirect(config); + testOnFinishedDownloading(config); + }); } diff --git a/pkgs/cupertino_http/example/integration_test/url_session_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_test.dart index 3faa1b682b..70505238b6 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_test.dart @@ -219,7 +219,7 @@ void main() { group('sharedSession', () { final session = URLSession.sharedSession(); - test('configration', () { + test('configuration', () { expect(session.configuration, isA()); }); @@ -231,7 +231,20 @@ void main() { ..allowsCellularAccess = false; final session = URLSession.sessionWithConfiguration(config); - test('configration', () { + test('configuration', () { + expect(session.configuration.allowsCellularAccess, false); + }); + + testURLSession(session); + }); + + group('backgroundSession', () { + final config = + URLSessionConfiguration.backgroundSession('backgroundSession') + ..allowsCellularAccess = false; + final session = URLSession.sessionWithConfiguration(config); + + test('configuration', () { expect(session.configuration.allowsCellularAccess, false); }); diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 0ecd1d002c..9c86e29560 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -841,7 +841,8 @@ class URLSession extends _ObjectHolder { /// a follow-up request that would honor the server's redirect. If the return /// value of this function is `null` then the redirect will not occur. /// Otherwise, the returned [URLRequest] (usually `newRequest`) will be - /// executed. See + /// executed. [onRedirect] will not be called for background sessions, which + /// automatically follow redirects. See /// [URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessiontaskdelegate/1411626-urlsession) /// /// If [onResponse] is set then it will be called whenever a valid response From 9dfa8ae490de14bef60399d4afeef86e7384d85d Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 19 Aug 2022 17:52:50 -0700 Subject: [PATCH 156/448] Avoid "get" for regular methods. (#766) --- pkgs/cronet_http/example/lib/main.dart | 4 ++-- pkgs/cupertino_http/example/lib/main.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 92f948820a..1b80dd3c20 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -53,7 +53,7 @@ class _HomePageState extends State { // Get the list of books matching `query`. // The `get` call will automatically use the `client` configurated in `main`. - Future> _getBooks(String query) async { + Future> _findMatchingBooks(String query) async { final response = await get( Uri.https( 'www.googleapis.com', @@ -74,7 +74,7 @@ class _HomePageState extends State { return; } - final books = await _getBooks(query); + final books = await _findMatchingBooks(query); setState(() { _books = books; }); diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index 7833870606..11c2d18639 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -54,7 +54,7 @@ class _HomePageState extends State { // Get the list of books matching `query`. // The `get` call will automatically use the `client` configurated in `main`. - Future> _getBooks(String query) async { + Future> _findMatchingBooks(String query) async { final response = await get( Uri.https( 'www.googleapis.com', @@ -75,7 +75,7 @@ class _HomePageState extends State { return; } - final books = await _getBooks(query); + final books = await _findMatchingBooks(query); setState(() { _books = books; }); From 6d1e0dace8e9a3cc6139e2b78a5358d31745911a Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 22 Aug 2022 12:50:27 -0700 Subject: [PATCH 157/448] Accept flutter >= 3.0.0 (#768) --- pkgs/cronet_http/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 1751e316fb..28e4003ba4 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.0.1 environment: sdk: ">=2.17.5 <3.0.0" - flutter: ">3.0.0" + flutter: ">=3.0.0" dependencies: flutter: From 1c735df882984063358f8da3f2e59809811f7ba7 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Mon, 22 Aug 2022 22:28:20 +0200 Subject: [PATCH 158/448] Add note about cupertino_http state in README (#755) --- pkgs/cupertino_http/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/cupertino_http/README.md b/pkgs/cupertino_http/README.md index fcb43b6497..4e52a8b967 100644 --- a/pkgs/cupertino_http/README.md +++ b/pkgs/cupertino_http/README.md @@ -4,6 +4,23 @@ A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System][]. +## Status: Experimental + +**NOTE**: This package is currently experimental and published under the +[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to +solicit feedback. + +For packages in the labs.dart.dev publisher we generally plan to either graduate +the package into a supported publisher (dart.dev, tools.dart.dev) after a period +of feedback and iteration, or discontinue the package. These packages have a +much higher expected rate of API and breaking changes. + +Your feedback is valuable and will help us evolve this package. For general +feedback, suggestions, and comments, please file an issue in the +[bug tracker](https://github.com/dart-lang/http/issues). + +## Motivation + Using the [Foundation URL Loading System][], rather than the socket-based [dart:io HttpClient][] implemententation, has several advantages: From a639c2bb125b5c6a245523943159b879beb7f473 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Mon, 22 Aug 2022 23:32:45 +0200 Subject: [PATCH 159/448] Update README.md (#770) --- pkgs/cronet_http/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/cronet_http/README.md b/pkgs/cronet_http/README.md index 9d16edc053..97410e037c 100644 --- a/pkgs/cronet_http/README.md +++ b/pkgs/cronet_http/README.md @@ -4,3 +4,18 @@ HTTP client. Cronet is available as part of [Google Play Services](https://developers.google.com/android/guides/overview). + +## Status: Experimental + +**NOTE**: This package is currently experimental and published under the +[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to +solicit feedback. + +For packages in the labs.dart.dev publisher we generally plan to either graduate +the package into a supported publisher (dart.dev, tools.dart.dev) after a period +of feedback and iteration, or discontinue the package. These packages have a +much higher expected rate of API and breaking changes. + +Your feedback is valuable and will help us evolve this package. For general +feedback, suggestions, and comments, please file an issue in the +[bug tracker](https://github.com/dart-lang/http/issues). From 4004bf55a9930eb3f167fe018e5c1b1d8a160fe7 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 24 Aug 2022 10:31:02 -0700 Subject: [PATCH 160/448] Make it possible to configure CronetEngine settings (#767) --- .github/workflows/cronet.yml | 4 +- .../flutter/plugins/cronet_http/Messages.java | 323 +++++++++++++++++- .../plugins/cronet_http/CronetHttpPlugin.kt | 229 ++++++++----- .../cronet_configuration_test.dart | 131 +++++++ pkgs/cronet_http/example/lib/main.dart | 5 +- pkgs/cronet_http/lib/cronet_client.dart | 135 +++++++- pkgs/cronet_http/lib/src/messages.dart | 185 +++++++++- pkgs/cronet_http/pigeons/messages.dart | 40 ++- 8 files changed, 927 insertions(+), 125 deletions(-) create mode 100644 pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index dd152b8d9c..c39affcddf 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -61,8 +61,8 @@ jobs: - name: Run tests uses: reactivecircus/android-emulator-runner@v2 with: - api-level: 32 + api-level: 28 target: playstore arch: x86_64 profile: pixel - script: cd ./pkgs/cronet_http/example && flutter pub get && flutter --version && flutter -v test integration_test/ + script: cd ./pkgs/cronet_http/example && flutter test --timeout=1200s integration_test/ diff --git a/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java b/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java index 14610d3d8e..50f8740b48 100644 --- a/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java +++ b/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java @@ -22,6 +22,28 @@ @SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression"}) public class Messages { + public enum CacheMode { + disabled(0), + memory(1), + diskNoHttp(2), + disk(3); + + private int index; + private CacheMode(final int index) { + this.index = index; + } + } + + public enum ExceptionType { + illegalArgumentException(0), + otherException(1); + + private int index; + private ExceptionType(final int index) { + this.index = index; + } + } + public enum EventMessageType { responseStarted(0), readCompleted(1), @@ -213,8 +235,218 @@ public static final class Builder { } } + /** Generated class from Pigeon that represents data sent in messages. */ + public static class CreateEngineRequest { + private @Nullable CacheMode cacheMode; + public @Nullable CacheMode getCacheMode() { return cacheMode; } + public void setCacheMode(@Nullable CacheMode setterArg) { + this.cacheMode = setterArg; + } + + private @Nullable Long cacheMaxSize; + public @Nullable Long getCacheMaxSize() { return cacheMaxSize; } + public void setCacheMaxSize(@Nullable Long setterArg) { + this.cacheMaxSize = setterArg; + } + + private @Nullable Boolean enableBrotli; + public @Nullable Boolean getEnableBrotli() { return enableBrotli; } + public void setEnableBrotli(@Nullable Boolean setterArg) { + this.enableBrotli = setterArg; + } + + private @Nullable Boolean enableHttp2; + public @Nullable Boolean getEnableHttp2() { return enableHttp2; } + public void setEnableHttp2(@Nullable Boolean setterArg) { + this.enableHttp2 = setterArg; + } + + private @Nullable Boolean enablePublicKeyPinningBypassForLocalTrustAnchors; + public @Nullable Boolean getEnablePublicKeyPinningBypassForLocalTrustAnchors() { return enablePublicKeyPinningBypassForLocalTrustAnchors; } + public void setEnablePublicKeyPinningBypassForLocalTrustAnchors(@Nullable Boolean setterArg) { + this.enablePublicKeyPinningBypassForLocalTrustAnchors = setterArg; + } + + private @Nullable Boolean enableQuic; + public @Nullable Boolean getEnableQuic() { return enableQuic; } + public void setEnableQuic(@Nullable Boolean setterArg) { + this.enableQuic = setterArg; + } + + private @Nullable String storagePath; + public @Nullable String getStoragePath() { return storagePath; } + public void setStoragePath(@Nullable String setterArg) { + this.storagePath = setterArg; + } + + private @Nullable String userAgent; + public @Nullable String getUserAgent() { return userAgent; } + public void setUserAgent(@Nullable String setterArg) { + this.userAgent = setterArg; + } + + public static final class Builder { + private @Nullable CacheMode cacheMode; + public @NonNull Builder setCacheMode(@Nullable CacheMode setterArg) { + this.cacheMode = setterArg; + return this; + } + private @Nullable Long cacheMaxSize; + public @NonNull Builder setCacheMaxSize(@Nullable Long setterArg) { + this.cacheMaxSize = setterArg; + return this; + } + private @Nullable Boolean enableBrotli; + public @NonNull Builder setEnableBrotli(@Nullable Boolean setterArg) { + this.enableBrotli = setterArg; + return this; + } + private @Nullable Boolean enableHttp2; + public @NonNull Builder setEnableHttp2(@Nullable Boolean setterArg) { + this.enableHttp2 = setterArg; + return this; + } + private @Nullable Boolean enablePublicKeyPinningBypassForLocalTrustAnchors; + public @NonNull Builder setEnablePublicKeyPinningBypassForLocalTrustAnchors(@Nullable Boolean setterArg) { + this.enablePublicKeyPinningBypassForLocalTrustAnchors = setterArg; + return this; + } + private @Nullable Boolean enableQuic; + public @NonNull Builder setEnableQuic(@Nullable Boolean setterArg) { + this.enableQuic = setterArg; + return this; + } + private @Nullable String storagePath; + public @NonNull Builder setStoragePath(@Nullable String setterArg) { + this.storagePath = setterArg; + return this; + } + private @Nullable String userAgent; + public @NonNull Builder setUserAgent(@Nullable String setterArg) { + this.userAgent = setterArg; + return this; + } + public @NonNull CreateEngineRequest build() { + CreateEngineRequest pigeonReturn = new CreateEngineRequest(); + pigeonReturn.setCacheMode(cacheMode); + pigeonReturn.setCacheMaxSize(cacheMaxSize); + pigeonReturn.setEnableBrotli(enableBrotli); + pigeonReturn.setEnableHttp2(enableHttp2); + pigeonReturn.setEnablePublicKeyPinningBypassForLocalTrustAnchors(enablePublicKeyPinningBypassForLocalTrustAnchors); + pigeonReturn.setEnableQuic(enableQuic); + pigeonReturn.setStoragePath(storagePath); + pigeonReturn.setUserAgent(userAgent); + return pigeonReturn; + } + } + @NonNull Map toMap() { + Map toMapResult = new HashMap<>(); + toMapResult.put("cacheMode", cacheMode == null ? null : cacheMode.index); + toMapResult.put("cacheMaxSize", cacheMaxSize); + toMapResult.put("enableBrotli", enableBrotli); + toMapResult.put("enableHttp2", enableHttp2); + toMapResult.put("enablePublicKeyPinningBypassForLocalTrustAnchors", enablePublicKeyPinningBypassForLocalTrustAnchors); + toMapResult.put("enableQuic", enableQuic); + toMapResult.put("storagePath", storagePath); + toMapResult.put("userAgent", userAgent); + return toMapResult; + } + static @NonNull CreateEngineRequest fromMap(@NonNull Map map) { + CreateEngineRequest pigeonResult = new CreateEngineRequest(); + Object cacheMode = map.get("cacheMode"); + pigeonResult.setCacheMode(cacheMode == null ? null : CacheMode.values()[(int)cacheMode]); + Object cacheMaxSize = map.get("cacheMaxSize"); + pigeonResult.setCacheMaxSize((cacheMaxSize == null) ? null : ((cacheMaxSize instanceof Integer) ? (Integer)cacheMaxSize : (Long)cacheMaxSize)); + Object enableBrotli = map.get("enableBrotli"); + pigeonResult.setEnableBrotli((Boolean)enableBrotli); + Object enableHttp2 = map.get("enableHttp2"); + pigeonResult.setEnableHttp2((Boolean)enableHttp2); + Object enablePublicKeyPinningBypassForLocalTrustAnchors = map.get("enablePublicKeyPinningBypassForLocalTrustAnchors"); + pigeonResult.setEnablePublicKeyPinningBypassForLocalTrustAnchors((Boolean)enablePublicKeyPinningBypassForLocalTrustAnchors); + Object enableQuic = map.get("enableQuic"); + pigeonResult.setEnableQuic((Boolean)enableQuic); + Object storagePath = map.get("storagePath"); + pigeonResult.setStoragePath((String)storagePath); + Object userAgent = map.get("userAgent"); + pigeonResult.setUserAgent((String)userAgent); + return pigeonResult; + } + } + + /** Generated class from Pigeon that represents data sent in messages. */ + public static class CreateEngineResponse { + private @Nullable String engineId; + public @Nullable String getEngineId() { return engineId; } + public void setEngineId(@Nullable String setterArg) { + this.engineId = setterArg; + } + + private @Nullable String errorString; + public @Nullable String getErrorString() { return errorString; } + public void setErrorString(@Nullable String setterArg) { + this.errorString = setterArg; + } + + private @Nullable ExceptionType errorType; + public @Nullable ExceptionType getErrorType() { return errorType; } + public void setErrorType(@Nullable ExceptionType setterArg) { + this.errorType = setterArg; + } + + public static final class Builder { + private @Nullable String engineId; + public @NonNull Builder setEngineId(@Nullable String setterArg) { + this.engineId = setterArg; + return this; + } + private @Nullable String errorString; + public @NonNull Builder setErrorString(@Nullable String setterArg) { + this.errorString = setterArg; + return this; + } + private @Nullable ExceptionType errorType; + public @NonNull Builder setErrorType(@Nullable ExceptionType setterArg) { + this.errorType = setterArg; + return this; + } + public @NonNull CreateEngineResponse build() { + CreateEngineResponse pigeonReturn = new CreateEngineResponse(); + pigeonReturn.setEngineId(engineId); + pigeonReturn.setErrorString(errorString); + pigeonReturn.setErrorType(errorType); + return pigeonReturn; + } + } + @NonNull Map toMap() { + Map toMapResult = new HashMap<>(); + toMapResult.put("engineId", engineId); + toMapResult.put("errorString", errorString); + toMapResult.put("errorType", errorType == null ? null : errorType.index); + return toMapResult; + } + static @NonNull CreateEngineResponse fromMap(@NonNull Map map) { + CreateEngineResponse pigeonResult = new CreateEngineResponse(); + Object engineId = map.get("engineId"); + pigeonResult.setEngineId((String)engineId); + Object errorString = map.get("errorString"); + pigeonResult.setErrorString((String)errorString); + Object errorType = map.get("errorType"); + pigeonResult.setErrorType(errorType == null ? null : ExceptionType.values()[(int)errorType]); + return pigeonResult; + } + } + /** Generated class from Pigeon that represents data sent in messages. */ public static class StartRequest { + private @NonNull String engineId; + public @NonNull String getEngineId() { return engineId; } + public void setEngineId(@NonNull String setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"engineId\" is null."); + } + this.engineId = setterArg; + } + private @NonNull String url; public @NonNull String getUrl() { return url; } public void setUrl(@NonNull String setterArg) { @@ -272,6 +504,11 @@ public void setFollowRedirects(@NonNull Boolean setterArg) { /** Constructor is private to enforce null safety; use Builder. */ private StartRequest() {} public static final class Builder { + private @Nullable String engineId; + public @NonNull Builder setEngineId(@NonNull String setterArg) { + this.engineId = setterArg; + return this; + } private @Nullable String url; public @NonNull Builder setUrl(@NonNull String setterArg) { this.url = setterArg; @@ -304,6 +541,7 @@ public static final class Builder { } public @NonNull StartRequest build() { StartRequest pigeonReturn = new StartRequest(); + pigeonReturn.setEngineId(engineId); pigeonReturn.setUrl(url); pigeonReturn.setMethod(method); pigeonReturn.setHeaders(headers); @@ -315,6 +553,7 @@ public static final class Builder { } @NonNull Map toMap() { Map toMapResult = new HashMap<>(); + toMapResult.put("engineId", engineId); toMapResult.put("url", url); toMapResult.put("method", method); toMapResult.put("headers", headers); @@ -325,6 +564,8 @@ public static final class Builder { } static @NonNull StartRequest fromMap(@NonNull Map map) { StartRequest pigeonResult = new StartRequest(); + Object engineId = map.get("engineId"); + pigeonResult.setEngineId((String)engineId); Object url = map.get("url"); pigeonResult.setUrl((String)url); Object method = map.get("method"); @@ -385,18 +626,24 @@ private HttpApiCodec() {} protected Object readValueOfType(byte type, ByteBuffer buffer) { switch (type) { case (byte)128: - return EventMessage.fromMap((Map) readValue(buffer)); + return CreateEngineRequest.fromMap((Map) readValue(buffer)); case (byte)129: - return ReadCompleted.fromMap((Map) readValue(buffer)); + return CreateEngineResponse.fromMap((Map) readValue(buffer)); case (byte)130: - return ResponseStarted.fromMap((Map) readValue(buffer)); + return EventMessage.fromMap((Map) readValue(buffer)); case (byte)131: - return StartRequest.fromMap((Map) readValue(buffer)); + return ReadCompleted.fromMap((Map) readValue(buffer)); case (byte)132: + return ResponseStarted.fromMap((Map) readValue(buffer)); + + case (byte)133: + return StartRequest.fromMap((Map) readValue(buffer)); + + case (byte)134: return StartResponse.fromMap((Map) readValue(buffer)); default: @@ -406,24 +653,32 @@ protected Object readValueOfType(byte type, ByteBuffer buffer) { } @Override protected void writeValue(ByteArrayOutputStream stream, Object value) { - if (value instanceof EventMessage) { + if (value instanceof CreateEngineRequest) { stream.write(128); + writeValue(stream, ((CreateEngineRequest) value).toMap()); + } else + if (value instanceof CreateEngineResponse) { + stream.write(129); + writeValue(stream, ((CreateEngineResponse) value).toMap()); + } else + if (value instanceof EventMessage) { + stream.write(130); writeValue(stream, ((EventMessage) value).toMap()); } else if (value instanceof ReadCompleted) { - stream.write(129); + stream.write(131); writeValue(stream, ((ReadCompleted) value).toMap()); } else if (value instanceof ResponseStarted) { - stream.write(130); + stream.write(132); writeValue(stream, ((ResponseStarted) value).toMap()); } else if (value instanceof StartRequest) { - stream.write(131); + stream.write(133); writeValue(stream, ((StartRequest) value).toMap()); } else if (value instanceof StartResponse) { - stream.write(132); + stream.write(134); writeValue(stream, ((StartResponse) value).toMap()); } else { @@ -434,6 +689,8 @@ protected void writeValue(ByteArrayOutputStream stream, Object value) { /** Generated interface from Pigeon that represents a handler of messages from Flutter.*/ public interface HttpApi { + @NonNull CreateEngineResponse createEngine(@NonNull CreateEngineRequest request); + void freeEngine(@NonNull String engineId); @NonNull StartResponse start(@NonNull StartRequest request); void dummy(@NonNull EventMessage message); @@ -444,6 +701,54 @@ static MessageCodec getCodec() { /** Sets up an instance of `HttpApi` to handle messages through the `binaryMessenger`. */ static void setup(BinaryMessenger binaryMessenger, HttpApi api) { + { + BasicMessageChannel channel = + new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.HttpApi.createEngine", getCodec()); + if (api != null) { + channel.setMessageHandler((message, reply) -> { + Map wrapped = new HashMap<>(); + try { + ArrayList args = (ArrayList)message; + CreateEngineRequest requestArg = (CreateEngineRequest)args.get(0); + if (requestArg == null) { + throw new NullPointerException("requestArg unexpectedly null."); + } + CreateEngineResponse output = api.createEngine(requestArg); + wrapped.put("result", output); + } + catch (Error | RuntimeException exception) { + wrapped.put("error", wrapError(exception)); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.HttpApi.freeEngine", getCodec()); + if (api != null) { + channel.setMessageHandler((message, reply) -> { + Map wrapped = new HashMap<>(); + try { + ArrayList args = (ArrayList)message; + String engineIdArg = (String)args.get(0); + if (engineIdArg == null) { + throw new NullPointerException("engineIdArg unexpectedly null."); + } + api.freeEngine(engineIdArg); + wrapped.put("result", null); + } + catch (Error | RuntimeException exception) { + wrapped.put("error", wrapError(exception)); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } { BasicMessageChannel channel = new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.HttpApi.start", getCodec()); diff --git a/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt b/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt index 5a6433195b..84b5488884 100644 --- a/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt +++ b/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt @@ -20,80 +20,94 @@ import java.util.concurrent.atomic.AtomicInteger class CronetHttpPlugin : FlutterPlugin, Messages.HttpApi { private lateinit var flutterPluginBinding: FlutterPlugin.FlutterPluginBinding - private lateinit var cronetEngine: CronetEngine + private val engineIdToEngine = HashMap() private val executor = Executors.newCachedThreadPool() private val mainThreadHandler = Handler(Looper.getMainLooper()) private val channelId = AtomicInteger(0) + private val engineId = AtomicInteger(0) override fun onAttachedToEngine( @NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding ) { Messages.HttpApi.setup(flutterPluginBinding.binaryMessenger, this) this.flutterPluginBinding = flutterPluginBinding - val context = flutterPluginBinding.getApplicationContext() - - // TODO: Move the Cronet initialization elsewhere so that failures (e.g. because the device - // doesn't have Google Play services) can be communicated to the Dart client. - val builder = CronetEngine.Builder(context) - cronetEngine = builder.build() } override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { Messages.HttpApi.setup(binding.binaryMessenger, null) } - override fun start(startRequest: Messages.StartRequest): Messages.StartResponse { - // Create a unique channel to communicate Cronet events to the Dart client code with. - val channelName = "plugins.flutter.io/cronet_event/" + channelId.incrementAndGet() - val eventChannel = EventChannel(flutterPluginBinding.binaryMessenger, channelName) - lateinit var eventSink: EventChannel.EventSink - var numRedirects = 0 + override fun createEngine(createRequest: Messages.CreateEngineRequest): Messages.CreateEngineResponse { + try { + val builder = CronetEngine.Builder(flutterPluginBinding.getApplicationContext()) - val cronetRequest = - cronetEngine.newUrlRequestBuilder( - startRequest.url, - object : UrlRequest.Callback() { - override fun onRedirectReceived( - request: UrlRequest, - info: UrlResponseInfo, - newLocationUrl: String - ) { - if (!startRequest.getFollowRedirects()) { - request.cancel() - mainThreadHandler.post({ - eventSink.success( - Messages.EventMessage.Builder() - .setType(Messages.EventMessageType.responseStarted) - .setResponseStarted( - Messages.ResponseStarted.Builder() - .setStatusCode(info.getHttpStatusCode().toLong()) - .setHeaders(info.getAllHeaders()) - .setIsRedirect(true) - .build() - ) - .build() - .toMap() - ) - }) - } - ++numRedirects - if (numRedirects <= startRequest.getMaxRedirects()) { - request.followRedirect() - } else { - request.cancel() - mainThreadHandler.post({ - eventSink.success( - Messages.EventMessage.Builder() - .setType(Messages.EventMessageType.tooManyRedirects) - .build() - .toMap() - ) - }) - } - } + if (createRequest.getStoragePath() != null) { + builder.setStoragePath(createRequest.getStoragePath()!!) + } + + if (createRequest.getCacheMode() == Messages.CacheMode.disabled) { + builder.enableHttpCache(createRequest.getCacheMode()!!.ordinal, 0) + } else if (createRequest.getCacheMode() != null && createRequest.getCacheMaxSize() != null) { + builder.enableHttpCache(createRequest.getCacheMode()!!.ordinal, createRequest.getCacheMaxSize()!!) + } + + if (createRequest.getEnableBrotli() != null) { + builder.enableBrotli(createRequest.getEnableBrotli()!!) + } + + if (createRequest.getEnableHttp2() != null) { + builder.enableHttp2(createRequest.getEnableHttp2()!!) + } + + if (createRequest.getEnablePublicKeyPinningBypassForLocalTrustAnchors() != null) { + builder.enablePublicKeyPinningBypassForLocalTrustAnchors(createRequest.getEnablePublicKeyPinningBypassForLocalTrustAnchors()!!) + } - override fun onResponseStarted(request: UrlRequest?, info: UrlResponseInfo) { + if (createRequest.getEnableQuic() != null) { + builder.enableQuic(createRequest.getEnableQuic()!!) + } + + if (createRequest.getUserAgent() != null) { + builder.setUserAgent(createRequest.getUserAgent()!!) + } + + val engine = builder.build() + val engineName = "cronet_engine_" + engineId.incrementAndGet() + engineIdToEngine.put(engineName, engine) + return Messages.CreateEngineResponse.Builder() + .setEngineId(engineName) + .build() + } catch (e: IllegalArgumentException) { + return Messages.CreateEngineResponse.Builder() + .setErrorString(e.message) + .setErrorType(Messages.ExceptionType.illegalArgumentException) + .build() + } catch (e: Exception) { + return Messages.CreateEngineResponse.Builder() + .setErrorString(e.message) + .setErrorType(Messages.ExceptionType.otherException) + .build() + } + } + + override fun freeEngine(engineId: String) { + engineIdToEngine.remove(engineId) + } + + private fun createRequest(startRequest: Messages.StartRequest, cronetEngine: CronetEngine, eventSink: EventChannel.EventSink): UrlRequest { + var numRedirects = 0 + + val cronetRequest = cronetEngine.newUrlRequestBuilder( + startRequest.url, + object : UrlRequest.Callback() { + override fun onRedirectReceived( + request: UrlRequest, + info: UrlResponseInfo, + newLocationUrl: String + ) { + if (!startRequest.getFollowRedirects()) { + request.cancel() mainThreadHandler.post({ eventSink.success( Messages.EventMessage.Builder() @@ -102,51 +116,84 @@ class CronetHttpPlugin : FlutterPlugin, Messages.HttpApi { Messages.ResponseStarted.Builder() .setStatusCode(info.getHttpStatusCode().toLong()) .setHeaders(info.getAllHeaders()) - .setIsRedirect(false) + .setIsRedirect(true) .build() ) .build() .toMap() ) }) - request?.read(ByteBuffer.allocateDirect(1024 * 1024)) } - - override fun onReadCompleted( - request: UrlRequest, - info: UrlResponseInfo, - byteBuffer: ByteBuffer - ) { - byteBuffer.flip() - val b = ByteArray(byteBuffer.remaining()) - byteBuffer.get(b) + ++numRedirects + if (numRedirects <= startRequest.getMaxRedirects()) { + request.followRedirect() + } else { + request.cancel() mainThreadHandler.post({ eventSink.success( Messages.EventMessage.Builder() - .setType(Messages.EventMessageType.readCompleted) - .setReadCompleted(Messages.ReadCompleted.Builder().setData(b).build()) + .setType(Messages.EventMessageType.tooManyRedirects) .build() .toMap() ) }) - byteBuffer.clear() - request?.read(byteBuffer) } + } - override fun onSucceeded(request: UrlRequest, info: UrlResponseInfo?) { - mainThreadHandler.post({ eventSink.endOfStream() }) - } + override fun onResponseStarted(request: UrlRequest?, info: UrlResponseInfo) { + mainThreadHandler.post({ + eventSink.success( + Messages.EventMessage.Builder() + .setType(Messages.EventMessageType.responseStarted) + .setResponseStarted( + Messages.ResponseStarted.Builder() + .setStatusCode(info.getHttpStatusCode().toLong()) + .setHeaders(info.getAllHeaders()) + .setIsRedirect(false) + .build() + ) + .build() + .toMap() + ) + }) + request?.read(ByteBuffer.allocateDirect(1024 * 1024)) + } - override fun onFailed( - request: UrlRequest, - info: UrlResponseInfo, - error: CronetException - ) { - mainThreadHandler.post({ eventSink.error("CronetException", error.toString(), null) }) - } - }, - executor - ) + override fun onReadCompleted( + request: UrlRequest, + info: UrlResponseInfo, + byteBuffer: ByteBuffer + ) { + byteBuffer.flip() + val b = ByteArray(byteBuffer.remaining()) + byteBuffer.get(b) + mainThreadHandler.post({ + eventSink.success( + Messages.EventMessage.Builder() + .setType(Messages.EventMessageType.readCompleted) + .setReadCompleted(Messages.ReadCompleted.Builder().setData(b).build()) + .build() + .toMap() + ) + }) + byteBuffer.clear() + request?.read(byteBuffer) + } + + override fun onSucceeded(request: UrlRequest, info: UrlResponseInfo?) { + mainThreadHandler.post({ eventSink.endOfStream() }) + } + + override fun onFailed( + request: UrlRequest, + info: UrlResponseInfo, + error: CronetException + ) { + mainThreadHandler.post({ eventSink.error("CronetException", error.toString(), null) }) + } + }, + executor + ) if (startRequest.getBody().size > 0) { cronetRequest.setUploadDataProvider( @@ -158,16 +205,24 @@ class CronetHttpPlugin : FlutterPlugin, Messages.HttpApi { for ((key, value) in startRequest.getHeaders()) { cronetRequest.addHeader(key, value) } + return cronetRequest.build() + } + + override fun start(startRequest: Messages.StartRequest): Messages.StartResponse { + // Create a unique channel to communicate Cronet events to the Dart client code with. + val channelName = "plugins.flutter.io/cronet_event/" + channelId.incrementAndGet() + val eventChannel = EventChannel(flutterPluginBinding.binaryMessenger, channelName) // Don't start the Cronet request until the Dart client code is listening for events. val streamHandler = object : EventChannel.StreamHandler { override fun onListen(arguments: Any?, events: EventChannel.EventSink) { - eventSink = events try { - cronetRequest.build().start() + val cronetEngine = engineIdToEngine.getValue(startRequest.engineId) + val cronetRequest = createRequest(startRequest, cronetEngine, events) + cronetRequest.start() } catch (e: Exception) { - mainThreadHandler.post({ eventSink.error("CronetException", e.toString(), null) }) + mainThreadHandler.post({ events.error("CronetException", e.toString(), null) }) } } diff --git a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart new file mode 100644 index 0000000000..fc4e695c3c --- /dev/null +++ b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart @@ -0,0 +1,131 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// Tests various [CronetEngine] configurations. + +import 'dart:io'; + +import 'package:cronet_http/cronet_client.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void testCache() { + group('cache', () { + late HttpServer server; + var numRequests = 0; + + setUp(() async { + numRequests = 0; + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + ++numRequests; + request.response.headers.set('Content-Type', 'text/plain'); + request.response.headers + .set('Cache-Control', 'public, max-age=30, immutable'); + request.response.headers.set('etag', '12345'); + await request.response.close(); + }); + }); + tearDown(() { + server.close(); + }); + + test('disabled', () async { + final engine = await CronetEngine.build(cacheMode: CacheMode.disabled); + final client = CronetClient(engine); + await client.get(Uri.parse('http://localhost:${server.port}')); + await client.get(Uri.parse('http://localhost:${server.port}')); + expect(numRequests, 2); + }); + + test('memory', () async { + final engine = await CronetEngine.build( + cacheMode: CacheMode.memory, cacheMaxSize: 1024 * 1024); + final client = CronetClient(engine); + await client.get(Uri.parse('http://localhost:${server.port}')); + await client.get(Uri.parse('http://localhost:${server.port}')); + expect(numRequests, 1); + }); + + test('disk', () async { + final engine = await CronetEngine.build( + cacheMode: CacheMode.disk, + cacheMaxSize: 1024 * 1024, + storagePath: (await Directory.systemTemp.createTemp()).absolute.path); + final client = CronetClient(engine); + await client.get(Uri.parse('http://localhost:${server.port}')); + await client.get(Uri.parse('http://localhost:${server.port}')); + expect(numRequests, 1); + }); + + test('diskNoHttp', () async { + final engine = await CronetEngine.build( + cacheMode: CacheMode.diskNoHttp, + cacheMaxSize: 1024 * 1024, + storagePath: (await Directory.systemTemp.createTemp()).absolute.path); + + final client = CronetClient(engine); + await client.get(Uri.parse('http://localhost:${server.port}')); + await client.get(Uri.parse('http://localhost:${server.port}')); + expect(numRequests, 2); + }); + }); +} + +void testInvalidConfigurations() { + group('invalidConfigurations', () { + test('no storagePath', () async { + expect( + () async => await CronetEngine.build( + cacheMode: CacheMode.disk, cacheMaxSize: 1024 * 1024), + throwsArgumentError); + }); + + test('non-existing storagePath', () async { + expect( + () async => await CronetEngine.build( + cacheMode: CacheMode.disk, + cacheMaxSize: 1024 * 1024, + storagePath: '/a/b/c/d'), + throwsArgumentError); + }); + }); +} + +void testUserAgent() { + group('userAgent', () { + late HttpServer server; + late HttpHeaders requestHeaders; + + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + requestHeaders = request.headers; + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World'); + await request.response.close(); + }); + }); + tearDown(() { + server.close(); + }); + + test('userAgent', () async { + final engine = await CronetEngine.build(userAgent: 'fake-agent'); + await CronetClient(engine) + .get(Uri.parse('http://localhost:${server.port}')); + expect(requestHeaders['user-agent'], ['fake-agent']); + }); + }); +} + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + testCache(); + testInvalidConfigurations(); + testUserAgent(); +} diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 1b80dd3c20..4c5d9f3d63 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -12,10 +12,11 @@ import 'package:http/io_client.dart'; import 'book.dart'; -void main() { +void main() async { late Client client; if (Platform.isAndroid) { - client = CronetClient(); + client = CronetClient(await CronetEngine.build( + cacheMode: CacheMode.memory, cacheMaxSize: 1024 * 1024)); } else { client = IOClient(); } diff --git a/pkgs/cronet_http/lib/cronet_client.dart b/pkgs/cronet_http/lib/cronet_client.dart index 5894ae988f..376b53eff4 100644 --- a/pkgs/cronet_http/lib/cronet_client.dart +++ b/pkgs/cronet_http/lib/cronet_client.dart @@ -7,7 +7,95 @@ import 'dart:async'; import 'package:flutter/services.dart'; import 'package:http/http.dart'; -import 'src/messages.dart'; +import 'src/messages.dart' as messages; + +late final _api = messages.HttpApi(); + +final Finalizer _cronetEngineFinalizer = Finalizer(_api.freeEngine); + +/// The type of caching to use when making HTTP requests. +enum CacheMode { + disabled, + memory, + diskNoHttp, + disk, +} + +/// An environment that can be used to make HTTP requests. +class CronetEngine { + final String _engineId; + + CronetEngine._(String engineId) : _engineId = engineId; + + /// Construct a new [CronetEngine] with the given configuration. + /// + /// [cacheMode] controls the type of caching that should be used by the + /// engine. If [cacheMode] is not [CacheMode.disabled] then [cacheMaxSize] + /// must be set. If [cacheMode] is [CacheMode.disk] or [CacheMode.diskNoHttp] + /// then [storagePath] must be set. + /// + /// [cacheMaxSize] is the maximum amount of data that should be cached, in + /// bytes. + /// + /// [enableBrotli] controls whether + /// [Brotli compression](https://www.rfc-editor.org/rfc/rfc7932) can be used. + /// + /// [enableHttp2] controls whether the HTTP/2 protocol can be used. + /// + /// [enablePublicKeyPinningBypassForLocalTrustAnchors] enables or disables + /// public key pinning bypass for local trust anchors. Disabling the bypass + /// for local trust anchors is highly discouraged since it may prohibit the + /// app from communicating with the pinned hosts. E.g., a user may want to + /// send all traffic through an SSL enabled proxy by changing the device + /// proxy settings and adding the proxy certificate to the list of local + /// trust anchor. + /// + /// [enableQuic] controls whether the [QUIC](https://www.chromium.org/quic/) + /// protocol can be used. + /// + /// [storagePath] sets the path of an existing directory where HTTP data can + /// be cached and where cookies can be stored. NOTE: a unique [storagePath] + /// should be used per [CronetEngine]. + /// + /// [userAgent] controls the `User-Agent` header. + static Future build( + {CacheMode? cacheMode, + int? cacheMaxSize, + bool? enableBrotli, + bool? enableHttp2, + bool? enablePublicKeyPinningBypassForLocalTrustAnchors, + bool? enableQuic, + String? storagePath, + String? userAgent}) async { + final response = await _api.createEngine(messages.CreateEngineRequest( + cacheMode: cacheMode != null + ? messages.CacheMode.values[cacheMode.index] + : null, + cacheMaxSize: cacheMaxSize, + enableBrotli: enableBrotli, + enableHttp2: enableHttp2, + enablePublicKeyPinningBypassForLocalTrustAnchors: + enablePublicKeyPinningBypassForLocalTrustAnchors, + enableQuic: enableQuic, + storagePath: storagePath, + userAgent: userAgent)); + if (response.errorString != null) { + if (response.errorType == + messages.ExceptionType.illegalArgumentException) { + throw ArgumentError(response.errorString); + } + throw Exception(response.errorString); + } + final engine = CronetEngine._(response.engineId!); + _cronetEngineFinalizer.attach(engine, engine._engineId); + return engine; + } + + void close() { + _cronetEngineFinalizer.detach(this); + _api.freeEngine(_engineId); + } +} /// A HTTP [Client] based on the /// [Cronet](https://developer.android.com/guide/topics/connectivity/cronet) @@ -34,10 +122,27 @@ import 'src/messages.dart'; /// } /// ``` class CronetClient extends BaseClient { - static late final HttpApi _api = HttpApi(); + CronetEngine? _engine; + final bool _ownedEngine; + + CronetClient([CronetEngine? engine]) + : _engine = engine, + _ownedEngine = engine == null; + + @override + void close() { + if (_ownedEngine) { + _engine?.close(); + } + } @override Future send(BaseRequest request) async { + try { + _engine ??= await CronetEngine.build(); + } catch (e) { + throw ClientException(e.toString(), request.url); + } final stream = request.finalize(); final body = await stream.toBytes(); @@ -50,15 +155,17 @@ class CronetClient extends BaseClient { headers = {...headers, 'content-type': 'application/octet-stream'}; } - final response = await _api.start(StartRequest( - url: request.url.toString(), - method: request.method, - headers: headers, - body: body, - followRedirects: request.followRedirects, - maxRedirects: request.maxRedirects)); + final response = await _api.start(messages.StartRequest( + engineId: _engine!._engineId, + url: request.url.toString(), + method: request.method, + headers: headers, + body: body, + followRedirects: request.followRedirects, + maxRedirects: request.maxRedirects, + )); - final responseCompleter = Completer(); + final responseCompleter = Completer(); final responseDataController = StreamController(); void raiseException(Exception exception) { @@ -73,15 +180,15 @@ class CronetClient extends BaseClient { final e = EventChannel(response.eventChannel); e.receiveBroadcastStream().listen( (e) { - final event = EventMessage.decode(e as Object); + final event = messages.EventMessage.decode(e as Object); switch (event.type) { - case EventMessageType.responseStarted: + case messages.EventMessageType.responseStarted: responseCompleter.complete(event.responseStarted!); break; - case EventMessageType.readCompleted: + case messages.EventMessageType.readCompleted: responseDataController.sink.add(event.readCompleted!.data); break; - case EventMessageType.tooManyRedirects: + case messages.EventMessageType.tooManyRedirects: raiseException( ClientException('Redirect limit exceeded', request.url)); break; diff --git a/pkgs/cronet_http/lib/src/messages.dart b/pkgs/cronet_http/lib/src/messages.dart index 39470377fc..984b8e162b 100644 --- a/pkgs/cronet_http/lib/src/messages.dart +++ b/pkgs/cronet_http/lib/src/messages.dart @@ -7,6 +7,18 @@ import 'dart:typed_data' show Uint8List, Int32List, Int64List, Float64List; import 'package:flutter/foundation.dart' show WriteBuffer, ReadBuffer; import 'package:flutter/services.dart'; +enum CacheMode { + disabled, + memory, + diskNoHttp, + disk, +} + +enum ExceptionType { + illegalArgumentException, + otherException, +} + enum EventMessageType { responseStarted, readCompleted, @@ -97,8 +109,94 @@ class EventMessage { } } +class CreateEngineRequest { + CreateEngineRequest({ + this.cacheMode, + this.cacheMaxSize, + this.enableBrotli, + this.enableHttp2, + this.enablePublicKeyPinningBypassForLocalTrustAnchors, + this.enableQuic, + this.storagePath, + this.userAgent, + }); + + CacheMode? cacheMode; + int? cacheMaxSize; + bool? enableBrotli; + bool? enableHttp2; + bool? enablePublicKeyPinningBypassForLocalTrustAnchors; + bool? enableQuic; + String? storagePath; + String? userAgent; + + Object encode() { + final Map pigeonMap = {}; + pigeonMap['cacheMode'] = cacheMode?.index; + pigeonMap['cacheMaxSize'] = cacheMaxSize; + pigeonMap['enableBrotli'] = enableBrotli; + pigeonMap['enableHttp2'] = enableHttp2; + pigeonMap['enablePublicKeyPinningBypassForLocalTrustAnchors'] = + enablePublicKeyPinningBypassForLocalTrustAnchors; + pigeonMap['enableQuic'] = enableQuic; + pigeonMap['storagePath'] = storagePath; + pigeonMap['userAgent'] = userAgent; + return pigeonMap; + } + + static CreateEngineRequest decode(Object message) { + final Map pigeonMap = message as Map; + return CreateEngineRequest( + cacheMode: pigeonMap['cacheMode'] != null + ? CacheMode.values[pigeonMap['cacheMode']! as int] + : null, + cacheMaxSize: pigeonMap['cacheMaxSize'] as int?, + enableBrotli: pigeonMap['enableBrotli'] as bool?, + enableHttp2: pigeonMap['enableHttp2'] as bool?, + enablePublicKeyPinningBypassForLocalTrustAnchors: + pigeonMap['enablePublicKeyPinningBypassForLocalTrustAnchors'] + as bool?, + enableQuic: pigeonMap['enableQuic'] as bool?, + storagePath: pigeonMap['storagePath'] as String?, + userAgent: pigeonMap['userAgent'] as String?, + ); + } +} + +class CreateEngineResponse { + CreateEngineResponse({ + this.engineId, + this.errorString, + this.errorType, + }); + + String? engineId; + String? errorString; + ExceptionType? errorType; + + Object encode() { + final Map pigeonMap = {}; + pigeonMap['engineId'] = engineId; + pigeonMap['errorString'] = errorString; + pigeonMap['errorType'] = errorType?.index; + return pigeonMap; + } + + static CreateEngineResponse decode(Object message) { + final Map pigeonMap = message as Map; + return CreateEngineResponse( + engineId: pigeonMap['engineId'] as String?, + errorString: pigeonMap['errorString'] as String?, + errorType: pigeonMap['errorType'] != null + ? ExceptionType.values[pigeonMap['errorType']! as int] + : null, + ); + } +} + class StartRequest { StartRequest({ + required this.engineId, required this.url, required this.method, required this.headers, @@ -107,6 +205,7 @@ class StartRequest { required this.followRedirects, }); + String engineId; String url; String method; Map headers; @@ -116,6 +215,7 @@ class StartRequest { Object encode() { final Map pigeonMap = {}; + pigeonMap['engineId'] = engineId; pigeonMap['url'] = url; pigeonMap['method'] = method; pigeonMap['headers'] = headers; @@ -128,6 +228,7 @@ class StartRequest { static StartRequest decode(Object message) { final Map pigeonMap = message as Map; return StartRequest( + engineId: pigeonMap['engineId']! as String, url: pigeonMap['url']! as String, method: pigeonMap['method']! as String, headers: (pigeonMap['headers'] as Map?)! @@ -164,21 +265,27 @@ class _HttpApiCodec extends StandardMessageCodec { const _HttpApiCodec(); @override void writeValue(WriteBuffer buffer, Object? value) { - if (value is EventMessage) { + if (value is CreateEngineRequest) { buffer.putUint8(128); writeValue(buffer, value.encode()); - } else if (value is ReadCompleted) { + } else if (value is CreateEngineResponse) { buffer.putUint8(129); writeValue(buffer, value.encode()); - } else if (value is ResponseStarted) { + } else if (value is EventMessage) { buffer.putUint8(130); writeValue(buffer, value.encode()); - } else if (value is StartRequest) { + } else if (value is ReadCompleted) { buffer.putUint8(131); writeValue(buffer, value.encode()); - } else if (value is StartResponse) { + } else if (value is ResponseStarted) { buffer.putUint8(132); writeValue(buffer, value.encode()); + } else if (value is StartRequest) { + buffer.putUint8(133); + writeValue(buffer, value.encode()); + } else if (value is StartResponse) { + buffer.putUint8(134); + writeValue(buffer, value.encode()); } else { super.writeValue(buffer, value); } @@ -188,18 +295,24 @@ class _HttpApiCodec extends StandardMessageCodec { Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { case 128: - return EventMessage.decode(readValue(buffer)!); + return CreateEngineRequest.decode(readValue(buffer)!); case 129: - return ReadCompleted.decode(readValue(buffer)!); + return CreateEngineResponse.decode(readValue(buffer)!); case 130: - return ResponseStarted.decode(readValue(buffer)!); + return EventMessage.decode(readValue(buffer)!); case 131: - return StartRequest.decode(readValue(buffer)!); + return ReadCompleted.decode(readValue(buffer)!); case 132: + return ResponseStarted.decode(readValue(buffer)!); + + case 133: + return StartRequest.decode(readValue(buffer)!); + + case 134: return StartResponse.decode(readValue(buffer)!); default: @@ -219,6 +332,60 @@ class HttpApi { static const MessageCodec codec = _HttpApiCodec(); + Future createEngine( + CreateEngineRequest arg_request) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.HttpApi.createEngine', codec, + binaryMessenger: _binaryMessenger); + final Map? replyMap = + await channel.send([arg_request]) as Map?; + if (replyMap == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyMap['error'] != null) { + final Map error = + (replyMap['error'] as Map?)!; + throw PlatformException( + code: (error['code'] as String?)!, + message: error['message'] as String?, + details: error['details'], + ); + } else if (replyMap['result'] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (replyMap['result'] as CreateEngineResponse?)!; + } + } + + Future freeEngine(String arg_engineId) async { + final BasicMessageChannel channel = BasicMessageChannel( + 'dev.flutter.pigeon.HttpApi.freeEngine', codec, + binaryMessenger: _binaryMessenger); + final Map? replyMap = + await channel.send([arg_engineId]) as Map?; + if (replyMap == null) { + throw PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel.', + ); + } else if (replyMap['error'] != null) { + final Map error = + (replyMap['error'] as Map?)!; + throw PlatformException( + code: (error['code'] as String?)!, + message: error['message'] as String?, + details: error['details'], + ); + } else { + return; + } + } + Future start(StartRequest arg_request) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HttpApi.start', codec, diff --git a/pkgs/cronet_http/pigeons/messages.dart b/pkgs/cronet_http/pigeons/messages.dart index 08b7a728d2..722e1ceb76 100644 --- a/pkgs/cronet_http/pigeons/messages.dart +++ b/pkgs/cronet_http/pigeons/messages.dart @@ -6,6 +6,13 @@ import 'package:pigeon/pigeon.dart'; +enum CacheMode { + disabled, + memory, + diskNoHttp, + disk, +} + /// An event message sent when the response headers are received. /// /// If [StartRequest.followRedirects] was false, then the first response, @@ -28,6 +35,11 @@ class ReadCompleted { Uint8List data; } +enum ExceptionType { + illegalArgumentException, + otherException, +} + enum EventMessageType { responseStarted, readCompleted, tooManyRedirects } /// Encapsulates a message sent from Cronet to the Dart client. @@ -41,7 +53,25 @@ class EventMessage { ReadCompleted? readCompleted; } +class CreateEngineRequest { + CacheMode? cacheMode; + int? cacheMaxSize; + bool? enableBrotli; + bool? enableHttp2; + bool? enablePublicKeyPinningBypassForLocalTrustAnchors; + bool? enableQuic; + String? storagePath; + String? userAgent; +} + +class CreateEngineResponse { + String? engineId; + String? errorString; + ExceptionType? errorType; +} + class StartRequest { + String engineId; String url; String method; Map headers; @@ -58,8 +88,14 @@ class StartResponse { @HostApi() abstract class HttpApi { - /// Starts an HTTP request and returns a channel where future results will - /// be streamed. + // Create a new CronetEngine with the given properties and returns it's id. + CreateEngineResponse createEngine(CreateEngineRequest request); + + // Free the resources associated with the CronetEngine. + void freeEngine(String engineId); + + /// Starts an HTTP request using an existing CronetEngine and returns a + /// channel where future results will be streamed. StartResponse start(StartRequest request); // Pigeon does not generate code for classes that are not used in an API. From e553792871732a7d635119e01e07f9b7ef0632b1 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 24 Aug 2022 11:00:01 -0700 Subject: [PATCH 161/448] Fixes for dart pub publish -n (#773) --- pkgs/cronet_http/CHANGELOG.md | 3 +++ pkgs/cronet_http/pubspec.yaml | 1 + 2 files changed, 4 insertions(+) create mode 100644 pkgs/cronet_http/CHANGELOG.md diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md new file mode 100644 index 0000000000..de1f9af735 --- /dev/null +++ b/pkgs/cronet_http/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* Initial development release. diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 28e4003ba4..d236d9eac4 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -2,6 +2,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. version: 0.0.1 +repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: sdk: ">=2.17.5 <3.0.0" From d0044e3fad5a0b7a460610b7331a3984c5c00064 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Thu, 25 Aug 2022 12:53:34 +0200 Subject: [PATCH 162/448] Update README.md (#771) --- pkgs/cupertino_http/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/cupertino_http/README.md b/pkgs/cupertino_http/README.md index 4e52a8b967..8585b7add5 100644 --- a/pkgs/cupertino_http/README.md +++ b/pkgs/cupertino_http/README.md @@ -15,8 +15,10 @@ the package into a supported publisher (dart.dev, tools.dart.dev) after a period of feedback and iteration, or discontinue the package. These packages have a much higher expected rate of API and breaking changes. -Your feedback is valuable and will help us evolve this package. For general -feedback, suggestions, and comments, please file an issue in the +Your feedback is valuable and will help us evolve this package. +For general feedback and suggestions please comment in the +[feedback issue](https://github.com/dart-lang/http/issues/764). +For bugs, please file an issue in the [bug tracker](https://github.com/dart-lang/http/issues). ## Motivation From 412306d92ba65c5d1fd4cef9d4c350abf726fac4 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 26 Aug 2022 14:50:26 -0700 Subject: [PATCH 163/448] Better document the runWithClient(() => ..., client.call) pattern (#772) --- pkgs/cronet_http/example/lib/main.dart | 15 +++++---------- pkgs/cupertino_http/example/lib/main.dart | 12 +++--------- pkgs/http/lib/src/client.dart | 10 +++++++--- pkgs/http/test/io/client_test.dart | 5 +++++ 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 4c5d9f3d63..6931cf92fd 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -8,21 +8,16 @@ import 'dart:io'; import 'package:cronet_http/cronet_client.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; -import 'package:http/io_client.dart'; import 'book.dart'; -void main() async { - late Client client; +void main() { + var clientFactory = Client.new; // Constructs the default client. if (Platform.isAndroid) { - client = CronetClient(await CronetEngine.build( - cacheMode: CacheMode.memory, cacheMaxSize: 1024 * 1024)); - } else { - client = IOClient(); + WidgetsFlutterBinding.ensureInitialized(); + clientFactory = CronetClient.new; } - - // Run the app with the default `client` set to the one assigned above. - runWithClient(() => runApp(const BookSearchApp()), () => client); + runWithClient(() => runApp(const BookSearchApp()), clientFactory); } class BookSearchApp extends StatelessWidget { diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index 11c2d18639..f9823f6747 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -8,21 +8,15 @@ import 'dart:io'; import 'package:cupertino_http/cupertino_client.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; -import 'package:http/io_client.dart'; import 'book.dart'; void main() { - late Client client; - // Use Cupertino Http on iOS and macOS. + var clientFactory = Client.new; // The default Client. if (Platform.isIOS || Platform.isMacOS) { - client = CupertinoClient.defaultSessionConfiguration(); - } else { - client = IOClient(); + clientFactory = CupertinoClient.defaultSessionConfiguration.call; } - - // Run the app with the default `client` set to the one assigned above. - runWithClient(() => runApp(const BookSearchApp()), () => client); + runWithClient(() => runApp(const BookSearchApp()), clientFactory); } class BookSearchApp extends StatelessWidget { diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index c75bcd88b7..d7ff8a6767 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -171,8 +171,11 @@ Client? get zoneClient { /// } /// /// void main() { -/// Client client = Platform.isAndroid ? MyAndroidHttpClient() : Client(); -/// runWithClient(myFunction, () => client); +/// var clientFactory = Client.new; // Constructs the default client. +/// if (Platform.isAndroid) { +/// clientFactory = MyAndroidHttpClient.new; +/// } +/// runWithClient(myFunction, clientFactory); /// } /// /// void myFunction() { @@ -183,7 +186,8 @@ Client? get zoneClient { /// ``` /// /// The [Client] returned by [clientFactory] is used by the [Client.new] factory -/// and the convenience HTTP functions (e.g. [http.get]) +/// and the convenience HTTP functions (e.g. [http.get]). If [clientFactory] +/// returns `Client()` then the default [Client] is used. R runWithClient(R Function() body, Client Function() clientFactory, {ZoneSpecification? zoneSpecification}) => runZoned(body, diff --git a/pkgs/http/test/io/client_test.dart b/pkgs/http/test/io/client_test.dart index 80953c9ba4..60903ddb93 100644 --- a/pkgs/http/test/io/client_test.dart +++ b/pkgs/http/test/io/client_test.dart @@ -153,6 +153,11 @@ void main() { expect(client, isA()); }); + test('runWithClient Client() return', () { + final client = http.runWithClient(() => http.Client(), () => http.Client()); + expect(client, isA()); + }); + test('runWithClient nested', () { late final http.Client client; late final http.Client nestedClient; From 9cb739a364b35b604d485821cb6c9d0f367b3f35 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Mon, 29 Aug 2022 09:26:39 +0200 Subject: [PATCH 164/448] Update README.md (#774) --- pkgs/cronet_http/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/README.md b/pkgs/cronet_http/README.md index 97410e037c..1b591ada2c 100644 --- a/pkgs/cronet_http/README.md +++ b/pkgs/cronet_http/README.md @@ -16,6 +16,8 @@ the package into a supported publisher (dart.dev, tools.dart.dev) after a period of feedback and iteration, or discontinue the package. These packages have a much higher expected rate of API and breaking changes. -Your feedback is valuable and will help us evolve this package. For general -feedback, suggestions, and comments, please file an issue in the +Your feedback is valuable and will help us evolve this package. +For general feedback and suggestions please comment in the +[feedback issue](https://github.com/dart-lang/http/issues/764). +For bugs, please file an issue in the [bug tracker](https://github.com/dart-lang/http/issues). From a6b6386321c8351636e47d428e75d94d4a6af81e Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 29 Aug 2022 08:43:09 -0700 Subject: [PATCH 165/448] Make cupertino_http example runnable on android and windows. (#775) --- pkgs/cupertino_http/example/.metadata | 45 ++++ .../cupertino_http/example/android/.gitignore | 13 + .../example/android/app/build.gradle | 70 +++++ .../android/app/src/debug/AndroidManifest.xml | 4 + .../android/app/src/main/AndroidManifest.xml | 35 +++ .../example/example/MainActivity.kt | 6 + .../res/drawable-v21/launch_background.xml | 12 + .../main/res/drawable/launch_background.xml | 12 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values-night/styles.xml | 18 ++ .../app/src/main/res/values/styles.xml | 18 ++ .../app/src/profile/AndroidManifest.xml | 4 + .../example/android/build.gradle | 31 +++ .../example/android/gradle.properties | 3 + .../gradle/wrapper/gradle-wrapper.properties | 5 + .../example/android/settings.gradle | 11 + .../ios/Flutter/AppFrameworkInfo.plist | 2 +- pkgs/cupertino_http/example/ios/Podfile | 2 +- pkgs/cupertino_http/example/ios/Podfile.lock | 12 +- .../ios/Runner.xcodeproj/project.pbxproj | 10 +- .../example/ios/Runner/Info.plist | 2 + pkgs/cupertino_http/example/linux/.gitignore | 1 + .../example/linux/CMakeLists.txt | 138 ++++++++++ .../example/linux/flutter/CMakeLists.txt | 88 +++++++ .../flutter/generated_plugin_registrant.cc | 11 + .../flutter/generated_plugin_registrant.h | 15 ++ .../linux/flutter/generated_plugins.cmake | 23 ++ pkgs/cupertino_http/example/linux/main.cc | 6 + .../example/linux/my_application.cc | 104 ++++++++ .../example/linux/my_application.h | 18 ++ pkgs/cupertino_http/example/macos/Podfile | 2 +- .../cupertino_http/example/macos/Podfile.lock | 6 +- .../macos/Runner.xcodeproj/project.pbxproj | 9 +- .../cupertino_http/example/windows/.gitignore | 17 ++ .../example/windows/CMakeLists.txt | 101 ++++++++ .../example/windows/flutter/CMakeLists.txt | 104 ++++++++ .../flutter/generated_plugin_registrant.cc | 11 + .../flutter/generated_plugin_registrant.h | 15 ++ .../windows/flutter/generated_plugins.cmake | 23 ++ .../example/windows/runner/CMakeLists.txt | 39 +++ .../example/windows/runner/Runner.rc | 121 +++++++++ .../example/windows/runner/flutter_window.cpp | 61 +++++ .../example/windows/runner/flutter_window.h | 33 +++ .../example/windows/runner/main.cpp | 43 +++ .../example/windows/runner/resource.h | 16 ++ .../windows/runner/resources/app_icon.ico | Bin 0 -> 33772 bytes .../windows/runner/runner.exe.manifest | 20 ++ .../example/windows/runner/utils.cpp | 64 +++++ .../example/windows/runner/utils.h | 19 ++ .../example/windows/runner/win32_window.cpp | 245 ++++++++++++++++++ .../example/windows/runner/win32_window.h | 98 +++++++ 55 files changed, 1749 insertions(+), 17 deletions(-) create mode 100644 pkgs/cupertino_http/example/.metadata create mode 100644 pkgs/cupertino_http/example/android/.gitignore create mode 100644 pkgs/cupertino_http/example/android/app/build.gradle create mode 100644 pkgs/cupertino_http/example/android/app/src/debug/AndroidManifest.xml create mode 100644 pkgs/cupertino_http/example/android/app/src/main/AndroidManifest.xml create mode 100644 pkgs/cupertino_http/example/android/app/src/main/kotlin/io/flutter/cupertino_http_example/example/example/MainActivity.kt create mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/drawable/launch_background.xml create mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/values-night/styles.xml create mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/values/styles.xml create mode 100644 pkgs/cupertino_http/example/android/app/src/profile/AndroidManifest.xml create mode 100644 pkgs/cupertino_http/example/android/build.gradle create mode 100644 pkgs/cupertino_http/example/android/gradle.properties create mode 100644 pkgs/cupertino_http/example/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 pkgs/cupertino_http/example/android/settings.gradle create mode 100644 pkgs/cupertino_http/example/linux/.gitignore create mode 100644 pkgs/cupertino_http/example/linux/CMakeLists.txt create mode 100644 pkgs/cupertino_http/example/linux/flutter/CMakeLists.txt create mode 100644 pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.cc create mode 100644 pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.h create mode 100644 pkgs/cupertino_http/example/linux/flutter/generated_plugins.cmake create mode 100644 pkgs/cupertino_http/example/linux/main.cc create mode 100644 pkgs/cupertino_http/example/linux/my_application.cc create mode 100644 pkgs/cupertino_http/example/linux/my_application.h create mode 100644 pkgs/cupertino_http/example/windows/.gitignore create mode 100644 pkgs/cupertino_http/example/windows/CMakeLists.txt create mode 100644 pkgs/cupertino_http/example/windows/flutter/CMakeLists.txt create mode 100644 pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.cc create mode 100644 pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.h create mode 100644 pkgs/cupertino_http/example/windows/flutter/generated_plugins.cmake create mode 100644 pkgs/cupertino_http/example/windows/runner/CMakeLists.txt create mode 100644 pkgs/cupertino_http/example/windows/runner/Runner.rc create mode 100644 pkgs/cupertino_http/example/windows/runner/flutter_window.cpp create mode 100644 pkgs/cupertino_http/example/windows/runner/flutter_window.h create mode 100644 pkgs/cupertino_http/example/windows/runner/main.cpp create mode 100644 pkgs/cupertino_http/example/windows/runner/resource.h create mode 100644 pkgs/cupertino_http/example/windows/runner/resources/app_icon.ico create mode 100644 pkgs/cupertino_http/example/windows/runner/runner.exe.manifest create mode 100644 pkgs/cupertino_http/example/windows/runner/utils.cpp create mode 100644 pkgs/cupertino_http/example/windows/runner/utils.h create mode 100644 pkgs/cupertino_http/example/windows/runner/win32_window.cpp create mode 100644 pkgs/cupertino_http/example/windows/runner/win32_window.h diff --git a/pkgs/cupertino_http/example/.metadata b/pkgs/cupertino_http/example/.metadata new file mode 100644 index 0000000000..f720a23ccc --- /dev/null +++ b/pkgs/cupertino_http/example/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled. + +version: + revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + channel: master + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + base_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + - platform: android + create_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + base_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + - platform: ios + create_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + base_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + - platform: linux + create_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + base_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + - platform: macos + create_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + base_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + - platform: web + create_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + base_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + - platform: windows + create_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + base_revision: c8569b6e98e3b83df410c6a1e78545f933d5e735 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/pkgs/cupertino_http/example/android/.gitignore b/pkgs/cupertino_http/example/android/.gitignore new file mode 100644 index 0000000000..6f568019d3 --- /dev/null +++ b/pkgs/cupertino_http/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/pkgs/cupertino_http/example/android/app/build.gradle b/pkgs/cupertino_http/example/android/app/build.gradle new file mode 100644 index 0000000000..b79cc2113a --- /dev/null +++ b/pkgs/cupertino_http/example/android/app/build.gradle @@ -0,0 +1,70 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + applicationId "io.flutter.cupertino_http_example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/pkgs/cupertino_http/example/android/app/src/debug/AndroidManifest.xml b/pkgs/cupertino_http/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000000..0a221468cf --- /dev/null +++ b/pkgs/cupertino_http/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + diff --git a/pkgs/cupertino_http/example/android/app/src/main/AndroidManifest.xml b/pkgs/cupertino_http/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..40a97bbb68 --- /dev/null +++ b/pkgs/cupertino_http/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + diff --git a/pkgs/cupertino_http/example/android/app/src/main/kotlin/io/flutter/cupertino_http_example/example/example/MainActivity.kt b/pkgs/cupertino_http/example/android/app/src/main/kotlin/io/flutter/cupertino_http_example/example/example/MainActivity.kt new file mode 100644 index 0000000000..6b4a18a127 --- /dev/null +++ b/pkgs/cupertino_http/example/android/app/src/main/kotlin/io/flutter/cupertino_http_example/example/example/MainActivity.kt @@ -0,0 +1,6 @@ +package io.flutter.cupertino_http_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/drawable-v21/launch_background.xml b/pkgs/cupertino_http/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000000..f74085f3f6 --- /dev/null +++ b/pkgs/cupertino_http/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/drawable/launch_background.xml b/pkgs/cupertino_http/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000000..304732f884 --- /dev/null +++ b/pkgs/cupertino_http/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/values-night/styles.xml b/pkgs/cupertino_http/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000000..06952be745 --- /dev/null +++ b/pkgs/cupertino_http/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/values/styles.xml b/pkgs/cupertino_http/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000..cb1ef88056 --- /dev/null +++ b/pkgs/cupertino_http/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/pkgs/cupertino_http/example/android/app/src/profile/AndroidManifest.xml b/pkgs/cupertino_http/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000000..0a221468cf --- /dev/null +++ b/pkgs/cupertino_http/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + diff --git a/pkgs/cupertino_http/example/android/build.gradle b/pkgs/cupertino_http/example/android/build.gradle new file mode 100644 index 0000000000..58a8c74b14 --- /dev/null +++ b/pkgs/cupertino_http/example/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.7.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.2.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/pkgs/cupertino_http/example/android/gradle.properties b/pkgs/cupertino_http/example/android/gradle.properties new file mode 100644 index 0000000000..94adc3a3f9 --- /dev/null +++ b/pkgs/cupertino_http/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/pkgs/cupertino_http/example/android/gradle/wrapper/gradle-wrapper.properties b/pkgs/cupertino_http/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..3c472b99c6 --- /dev/null +++ b/pkgs/cupertino_http/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/pkgs/cupertino_http/example/android/settings.gradle b/pkgs/cupertino_http/example/android/settings.gradle new file mode 100644 index 0000000000..44e62bcf06 --- /dev/null +++ b/pkgs/cupertino_http/example/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/pkgs/cupertino_http/example/ios/Flutter/AppFrameworkInfo.plist b/pkgs/cupertino_http/example/ios/Flutter/AppFrameworkInfo.plist index 8d4492f977..9625e105df 100644 --- a/pkgs/cupertino_http/example/ios/Flutter/AppFrameworkInfo.plist +++ b/pkgs/cupertino_http/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 11.0 diff --git a/pkgs/cupertino_http/example/ios/Podfile b/pkgs/cupertino_http/example/ios/Podfile index 1e8c3c90a5..88359b225f 100644 --- a/pkgs/cupertino_http/example/ios/Podfile +++ b/pkgs/cupertino_http/example/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '9.0' +# platform :ios, '11.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/pkgs/cupertino_http/example/ios/Podfile.lock b/pkgs/cupertino_http/example/ios/Podfile.lock index 98987d7f87..709672b9d7 100644 --- a/pkgs/cupertino_http/example/ios/Podfile.lock +++ b/pkgs/cupertino_http/example/ios/Podfile.lock @@ -2,21 +2,27 @@ PODS: - cupertino_http (0.0.1): - Flutter - Flutter (1.0.0) + - integration_test (0.0.1): + - Flutter DEPENDENCIES: - cupertino_http (from `.symlinks/plugins/cupertino_http/ios`) - Flutter (from `Flutter`) + - integration_test (from `.symlinks/plugins/integration_test/ios`) EXTERNAL SOURCES: cupertino_http: :path: ".symlinks/plugins/cupertino_http/ios" Flutter: :path: Flutter + integration_test: + :path: ".symlinks/plugins/integration_test/ios" SPEC CHECKSUMS: - cupertino_http: 7fdd8aec600b85131eba4839c6a6d0a11f0cbfc3 - Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + cupertino_http: 5f8b1161107fe6c8d94a0c618735a033d93fa7db + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5 -PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c +PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 COCOAPODS: 1.11.2 diff --git a/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.pbxproj b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.pbxproj index 3794697a28..3f233bb8b9 100644 --- a/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.pbxproj +++ b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -200,6 +200,7 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -231,6 +232,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -340,7 +342,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -418,7 +420,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -467,7 +469,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/pkgs/cupertino_http/example/ios/Runner/Info.plist b/pkgs/cupertino_http/example/ios/Runner/Info.plist index 4af48f0d2b..2f0aaae821 100644 --- a/pkgs/cupertino_http/example/ios/Runner/Info.plist +++ b/pkgs/cupertino_http/example/ios/Runner/Info.plist @@ -45,5 +45,7 @@ CADisableMinimumFrameDurationOnPhone + UIApplicationSupportsIndirectInputEvents + diff --git a/pkgs/cupertino_http/example/linux/.gitignore b/pkgs/cupertino_http/example/linux/.gitignore new file mode 100644 index 0000000000..d3896c9844 --- /dev/null +++ b/pkgs/cupertino_http/example/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/pkgs/cupertino_http/example/linux/CMakeLists.txt b/pkgs/cupertino_http/example/linux/CMakeLists.txt new file mode 100644 index 0000000000..74c66dd446 --- /dev/null +++ b/pkgs/cupertino_http/example/linux/CMakeLists.txt @@ -0,0 +1,138 @@ +# 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 "example") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.example") + +# 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" +) + +# 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/pkgs/cupertino_http/example/linux/flutter/CMakeLists.txt b/pkgs/cupertino_http/example/linux/flutter/CMakeLists.txt new file mode 100644 index 0000000000..d5bd01648a --- /dev/null +++ b/pkgs/cupertino_http/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/pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.cc b/pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000000..e71a16d23d --- /dev/null +++ b/pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void fl_register_plugins(FlPluginRegistry* registry) { +} diff --git a/pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.h b/pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000000..e0f0a47bc0 --- /dev/null +++ b/pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/pkgs/cupertino_http/example/linux/flutter/generated_plugins.cmake b/pkgs/cupertino_http/example/linux/flutter/generated_plugins.cmake new file mode 100644 index 0000000000..2e1de87a7e --- /dev/null +++ b/pkgs/cupertino_http/example/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/pkgs/cupertino_http/example/linux/main.cc b/pkgs/cupertino_http/example/linux/main.cc new file mode 100644 index 0000000000..e7c5c54370 --- /dev/null +++ b/pkgs/cupertino_http/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/pkgs/cupertino_http/example/linux/my_application.cc b/pkgs/cupertino_http/example/linux/my_application.cc new file mode 100644 index 0000000000..0ba8f43096 --- /dev/null +++ b/pkgs/cupertino_http/example/linux/my_application.cc @@ -0,0 +1,104 @@ +#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, "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, "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 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_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/pkgs/cupertino_http/example/linux/my_application.h b/pkgs/cupertino_http/example/linux/my_application.h new file mode 100644 index 0000000000..72271d5e41 --- /dev/null +++ b/pkgs/cupertino_http/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/pkgs/cupertino_http/example/macos/Podfile b/pkgs/cupertino_http/example/macos/Podfile index dade8dfad0..fe733905db 100644 --- a/pkgs/cupertino_http/example/macos/Podfile +++ b/pkgs/cupertino_http/example/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.11' +platform :osx, '10.13' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/pkgs/cupertino_http/example/macos/Podfile.lock b/pkgs/cupertino_http/example/macos/Podfile.lock index 4afaf840ce..6d847c7cc9 100644 --- a/pkgs/cupertino_http/example/macos/Podfile.lock +++ b/pkgs/cupertino_http/example/macos/Podfile.lock @@ -14,9 +14,9 @@ EXTERNAL SOURCES: :path: Flutter/ephemeral SPEC CHECKSUMS: - cupertino_http: 92e8124f1946bc5aefa03d55b5bf7a0c816acac6 - FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424 + cupertino_http: afa11b9e2786b62da2671e4ddd32caf792503748 + FlutterMacOS: 85f90bfb3f1703249cf1539e4dfbff31e8584698 -PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c +PODFILE CHECKSUM: a884f6dd3f7494f3892ee6c81feea3a3abbf9153 COCOAPODS: 1.11.2 diff --git a/pkgs/cupertino_http/example/macos/Runner.xcodeproj/project.pbxproj b/pkgs/cupertino_http/example/macos/Runner.xcodeproj/project.pbxproj index 87f6642ef3..0da99f1d27 100644 --- a/pkgs/cupertino_http/example/macos/Runner.xcodeproj/project.pbxproj +++ b/pkgs/cupertino_http/example/macos/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 51; + objectVersion = 54; objects = { /* Begin PBXAggregateTarget section */ @@ -256,6 +256,7 @@ /* Begin PBXShellScriptBuildPhase section */ 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -404,7 +405,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -483,7 +484,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -530,7 +531,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; + MACOSX_DEPLOYMENT_TARGET = 10.13; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/pkgs/cupertino_http/example/windows/.gitignore b/pkgs/cupertino_http/example/windows/.gitignore new file mode 100644 index 0000000000..d492d0d98c --- /dev/null +++ b/pkgs/cupertino_http/example/windows/.gitignore @@ -0,0 +1,17 @@ +flutter/ephemeral/ + +# Visual Studio user-specific files. +*.suo +*.user +*.userosscache +*.sln.docstates + +# Visual Studio build-related files. +x64/ +x86/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ diff --git a/pkgs/cupertino_http/example/windows/CMakeLists.txt b/pkgs/cupertino_http/example/windows/CMakeLists.txt new file mode 100644 index 0000000000..c0270746b1 --- /dev/null +++ b/pkgs/cupertino_http/example/windows/CMakeLists.txt @@ -0,0 +1,101 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.14) +project(example 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 "example") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Define build configuration option. +get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(IS_MULTICONFIG) + set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" + CACHE STRING "" FORCE) +else() + 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() +endif() +# Define settings for the Profile build mode. +set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") +set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") +set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") +set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") + +# Use Unicode for all projects. +add_definitions(-DUNICODE -D_UNICODE) + +# 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_17) + target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") + target_compile_options(${TARGET} PRIVATE /EHsc) + target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") + target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# Support files are copied into place next to the executable, so that it can +# run in place. This is done instead of making a separate bundle (as on Linux) +# so that building and running from within Visual Studio will work. +set(BUILD_BUNDLE_DIR "$") +# Make the "install" step default, as it's required to run. +set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") + +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) + +if(PLUGIN_BUNDLED_LIBRARIES) + install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +# 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. +install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + CONFIGURATIONS Profile;Release + COMPONENT Runtime) diff --git a/pkgs/cupertino_http/example/windows/flutter/CMakeLists.txt b/pkgs/cupertino_http/example/windows/flutter/CMakeLists.txt new file mode 100644 index 0000000000..930d2071a3 --- /dev/null +++ b/pkgs/cupertino_http/example/windows/flutter/CMakeLists.txt @@ -0,0 +1,104 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.14) + +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. +set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") + +# === Flutter Library === +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") + +# 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/windows/app.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "flutter_export.h" + "flutter_windows.h" + "flutter_messenger.h" + "flutter_plugin_registrar.h" + "flutter_texture_registrar.h" +) +list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") +add_dependencies(flutter flutter_assemble) + +# === Wrapper === +list(APPEND CPP_WRAPPER_SOURCES_CORE + "core_implementations.cc" + "standard_codec.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_PLUGIN + "plugin_registrar.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_APP + "flutter_engine.cc" + "flutter_view_controller.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") + +# Wrapper sources needed for a plugin. +add_library(flutter_wrapper_plugin STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} +) +apply_standard_settings(flutter_wrapper_plugin) +set_target_properties(flutter_wrapper_plugin PROPERTIES + POSITION_INDEPENDENT_CODE ON) +set_target_properties(flutter_wrapper_plugin PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) +target_include_directories(flutter_wrapper_plugin PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_plugin flutter_assemble) + +# Wrapper sources needed for the runner. +add_library(flutter_wrapper_app STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_APP} +) +apply_standard_settings(flutter_wrapper_app) +target_link_libraries(flutter_wrapper_app PUBLIC flutter) +target_include_directories(flutter_wrapper_app PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_app 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. +set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") +set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} + ${PHONY_OUTPUT} + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" + windows-x64 $ + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} +) diff --git a/pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.cc b/pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000000..8b6d4680af --- /dev/null +++ b/pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void RegisterPlugins(flutter::PluginRegistry* registry) { +} diff --git a/pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.h b/pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000000..dc139d85a9 --- /dev/null +++ b/pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void RegisterPlugins(flutter::PluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/pkgs/cupertino_http/example/windows/flutter/generated_plugins.cmake b/pkgs/cupertino_http/example/windows/flutter/generated_plugins.cmake new file mode 100644 index 0000000000..b93c4c30c1 --- /dev/null +++ b/pkgs/cupertino_http/example/windows/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}/windows 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}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/pkgs/cupertino_http/example/windows/runner/CMakeLists.txt b/pkgs/cupertino_http/example/windows/runner/CMakeLists.txt new file mode 100644 index 0000000000..17411a8ab8 --- /dev/null +++ b/pkgs/cupertino_http/example/windows/runner/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required(VERSION 3.14) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, 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} WIN32 + "flutter_window.cpp" + "main.cpp" + "utils.cpp" + "win32_window.cpp" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" + "Runner.rc" + "runner.exe.manifest" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the build version. +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") + +# Disable Windows macros that collide with C++ standard library functions. +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") + +# Add dependency libraries and include directories. Add any application-specific +# dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/pkgs/cupertino_http/example/windows/runner/Runner.rc b/pkgs/cupertino_http/example/windows/runner/Runner.rc new file mode 100644 index 0000000000..a552e51aa5 --- /dev/null +++ b/pkgs/cupertino_http/example/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#pragma code_page(65001) +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "resources\\app_icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD +#else +#define VERSION_AS_NUMBER 1,0,0,0 +#endif + +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "com.example" "\0" + VALUE "FileDescription", "example" "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "example" "\0" + VALUE "LegalCopyright", "Copyright (C) 2022 The Dart project authors. All rights reserved." "\0" + VALUE "OriginalFilename", "example.exe" "\0" + VALUE "ProductName", "example" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/pkgs/cupertino_http/example/windows/runner/flutter_window.cpp b/pkgs/cupertino_http/example/windows/runner/flutter_window.cpp new file mode 100644 index 0000000000..b43b9095ea --- /dev/null +++ b/pkgs/cupertino_http/example/windows/runner/flutter_window.cpp @@ -0,0 +1,61 @@ +#include "flutter_window.h" + +#include + +#include "flutter/generated_plugin_registrant.h" + +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} + +FlutterWindow::~FlutterWindow() {} + +bool FlutterWindow::OnCreate() { + if (!Win32Window::OnCreate()) { + return false; + } + + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique( + frame.right - frame.left, frame.bottom - frame.top, project_); + // Ensure that basic setup of the controller was successful. + if (!flutter_controller_->engine() || !flutter_controller_->view()) { + return false; + } + RegisterPlugins(flutter_controller_->engine()); + SetChildContent(flutter_controller_->view()->GetNativeWindow()); + return true; +} + +void FlutterWindow::OnDestroy() { + if (flutter_controller_) { + flutter_controller_ = nullptr; + } + + Win32Window::OnDestroy(); +} + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/pkgs/cupertino_http/example/windows/runner/flutter_window.h b/pkgs/cupertino_http/example/windows/runner/flutter_window.h new file mode 100644 index 0000000000..6da0652f05 --- /dev/null +++ b/pkgs/cupertino_http/example/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ + +#include +#include + +#include + +#include "win32_window.h" + +// A window that does nothing but host a Flutter view. +class FlutterWindow : public Win32Window { + public: + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); + virtual ~FlutterWindow(); + + protected: + // Win32Window: + bool OnCreate() override; + void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; + + private: + // The project to run. + flutter::DartProject project_; + + // The Flutter instance hosted by this window. + std::unique_ptr flutter_controller_; +}; + +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/pkgs/cupertino_http/example/windows/runner/main.cpp b/pkgs/cupertino_http/example/windows/runner/main.cpp new file mode 100644 index 0000000000..bcb57b0e2a --- /dev/null +++ b/pkgs/cupertino_http/example/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +#include "flutter_window.h" +#include "utils.h" + +int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, + _In_ wchar_t *command_line, _In_ int show_command) { + // Attach to console when present (e.g., 'flutter run') or create a + // new console when running with a debugger. + if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { + CreateAndAttachConsole(); + } + + // Initialize COM, so that it is available for use in the library and/or + // plugins. + ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + + flutter::DartProject project(L"data"); + + std::vector command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(1280, 720); + if (!window.CreateAndShow(L"example", origin, size)) { + return EXIT_FAILURE; + } + window.SetQuitOnClose(true); + + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + + ::CoUninitialize(); + return EXIT_SUCCESS; +} diff --git a/pkgs/cupertino_http/example/windows/runner/resource.h b/pkgs/cupertino_http/example/windows/runner/resource.h new file mode 100644 index 0000000000..66a65d1e4a --- /dev/null +++ b/pkgs/cupertino_http/example/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Runner.rc +// +#define IDI_APP_ICON 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/pkgs/cupertino_http/example/windows/runner/resources/app_icon.ico b/pkgs/cupertino_http/example/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..c04e20caf6370ebb9253ad831cc31de4a9c965f6 GIT binary patch literal 33772 zcmeHQc|26z|35SKE&G-*mXah&B~fFkXr)DEO&hIfqby^T&>|8^_Ub8Vp#`BLl3lbZ zvPO!8k!2X>cg~Elr=IVxo~J*a`+9wR=A83c-k-DFd(XM&UI1VKCqM@V;DDtJ09WB} zRaHKiW(GT00brH|0EeTeKVbpbGZg?nK6-j827q-+NFM34gXjqWxJ*a#{b_apGN<-L_m3#8Z26atkEn& ze87Bvv^6vVmM+p+cQ~{u%=NJF>#(d;8{7Q{^rWKWNtf14H}>#&y7$lqmY6xmZryI& z($uy?c5-+cPnt2%)R&(KIWEXww>Cnz{OUpT>W$CbO$h1= z#4BPMkFG1Y)x}Ui+WXr?Z!w!t_hjRq8qTaWpu}FH{MsHlU{>;08goVLm{V<&`itk~ zE_Ys=D(hjiy+5=?=$HGii=Y5)jMe9|wWoD_K07(}edAxh`~LBorOJ!Cf@f{_gNCC| z%{*04ViE!#>@hc1t5bb+NO>ncf@@Dv01K!NxH$3Eg1%)|wLyMDF8^d44lV!_Sr}iEWefOaL z8f?ud3Q%Sen39u|%00W<#!E=-RpGa+H8}{ulxVl4mwpjaU+%2pzmi{3HM)%8vb*~-M9rPUAfGCSos8GUXp02|o~0BTV2l#`>>aFV&_P$ejS;nGwSVP8 zMbOaG7<7eKD>c12VdGH;?2@q7535sa7MN*L@&!m?L`ASG%boY7(&L5imY#EQ$KrBB z4@_tfP5m50(T--qv1BJcD&aiH#b-QC>8#7Fx@3yXlonJI#aEIi=8&ChiVpc#N=5le zM*?rDIdcpawoc5kizv$GEjnveyrp3sY>+5_R5;>`>erS%JolimF=A^EIsAK zsPoVyyUHCgf0aYr&alx`<)eb6Be$m&`JYSuBu=p8j%QlNNp$-5C{b4#RubPb|CAIS zGE=9OFLP7?Hgc{?k45)84biT0k&-C6C%Q}aI~q<(7BL`C#<6HyxaR%!dFx7*o^laG z=!GBF^cwK$IA(sn9y6>60Rw{mYRYkp%$jH z*xQM~+bp)G$_RhtFPYx2HTsWk80+p(uqv9@I9)y{b$7NK53rYL$ezbmRjdXS?V}fj zWxX_feWoLFNm3MG7pMUuFPs$qrQWO9!l2B(SIuy2}S|lHNbHzoE+M2|Zxhjq9+Ws8c{*}x^VAib7SbxJ*Q3EnY5lgI9 z=U^f3IW6T=TWaVj+2N%K3<%Un;CF(wUp`TC&Y|ZjyFu6co^uqDDB#EP?DV5v_dw~E zIRK*BoY9y-G_ToU2V_XCX4nJ32~`czdjT!zwme zGgJ0nOk3U4@IE5JwtM}pwimLjk{ln^*4HMU%Fl4~n(cnsLB}Ja-jUM>xIB%aY;Nq8 z)Fp8dv1tkqKanv<68o@cN|%thj$+f;zGSO7H#b+eMAV8xH$hLggtt?O?;oYEgbq@= zV(u9bbd12^%;?nyk6&$GPI%|+<_mEpJGNfl*`!KV;VfmZWw{n{rnZ51?}FDh8we_L z8OI9nE31skDqJ5Oa_ybn7|5@ui>aC`s34p4ZEu6-s!%{uU45$Zd1=p$^^dZBh zu<*pDDPLW+c>iWO$&Z_*{VSQKg7=YEpS3PssPn1U!lSm6eZIho*{@&20e4Y_lRklKDTUCKI%o4Pc<|G^Xgu$J^Q|B87U;`c1zGwf^-zH*VQ^x+i^OUWE0yd z;{FJq)2w!%`x7yg@>uGFFf-XJl4H`YtUG%0slGKOlXV`q?RP>AEWg#x!b{0RicxGhS!3$p7 zij;{gm!_u@D4$Ox%>>bPtLJ> zwKtYz?T_DR1jN>DkkfGU^<#6sGz|~p*I{y`aZ>^Di#TC|Z!7j_O1=Wo8thuit?WxR zh9_S>kw^{V^|g}HRUF=dcq>?q(pHxw!8rx4dC6vbQVmIhmICF#zU!HkHpQ>9S%Uo( zMw{eC+`&pb=GZRou|3;Po1}m46H6NGd$t<2mQh}kaK-WFfmj_66_17BX0|j-E2fe3Jat}ijpc53 zJV$$;PC<5aW`{*^Z6e5##^`Ed#a0nwJDT#Qq~^e8^JTA=z^Kl>La|(UQ!bI@#ge{Dzz@61p-I)kc2?ZxFt^QQ}f%ldLjO*GPj(5)V9IyuUakJX=~GnTgZ4$5!3E=V#t`yOG4U z(gphZB6u2zsj=qNFLYShhg$}lNpO`P9xOSnO*$@@UdMYES*{jJVj|9z-}F^riksLK zbsU+4-{281P9e2UjY6tse^&a)WM1MFw;p#_dHhWI7p&U*9TR0zKdVuQed%6{otTsq z$f~S!;wg#Bd9kez=Br{m|66Wv z#g1xMup<0)H;c2ZO6su_ii&m8j&+jJz4iKnGZ&wxoQX|5a>v&_e#6WA!MB_4asTxLRGQCC5cI(em z%$ZfeqP>!*q5kU>a+BO&ln=4Jm>Ef(QE8o&RgLkk%2}4Tf}U%IFP&uS7}&|Q-)`5< z+e>;s#4cJ-z%&-^&!xsYx777Wt(wZY9(3(avmr|gRe4cD+a8&!LY`1^T?7x{E<=kdY9NYw>A;FtTvQ=Y&1M%lyZPl$ss1oY^Sl8we}n}Aob#6 zl4jERwnt9BlSoWb@3HxYgga(752Vu6Y)k4yk9u~Kw>cA5&LHcrvn1Y-HoIuFWg~}4 zEw4bR`mXZQIyOAzo)FYqg?$5W<;^+XX%Uz61{-L6@eP|lLH%|w?g=rFc;OvEW;^qh z&iYXGhVt(G-q<+_j}CTbPS_=K>RKN0&;dubh0NxJyDOHFF;<1k!{k#7b{|Qok9hac z;gHz}6>H6C6RnB`Tt#oaSrX0p-j-oRJ;_WvS-qS--P*8}V943RT6kou-G=A+7QPGQ z!ze^UGxtW3FC0$|(lY9^L!Lx^?Q8cny(rR`es5U;-xBhphF%_WNu|aO<+e9%6LuZq zt(0PoagJG<%hyuf;te}n+qIl_Ej;czWdc{LX^pS>77s9t*2b4s5dvP_!L^3cwlc)E!(!kGrg~FescVT zZCLeua3f4;d;Tk4iXzt}g}O@nlK3?_o91_~@UMIl?@77Qc$IAlLE95#Z=TES>2E%z zxUKpK{_HvGF;5%Q7n&vA?`{%8ohlYT_?(3A$cZSi)MvIJygXD}TS-3UwyUxGLGiJP znblO~G|*uA^|ac8E-w#}uBtg|s_~s&t>-g0X%zIZ@;o_wNMr_;{KDg^O=rg`fhDZu zFp(VKd1Edj%F zWHPl+)FGj%J1BO3bOHVfH^3d1F{)*PL&sRX`~(-Zy3&9UQX)Z;c51tvaI2E*E7!)q zcz|{vpK7bjxix(k&6=OEIBJC!9lTkUbgg?4-yE{9+pFS)$Ar@vrIf`D0Bnsed(Cf? zObt2CJ>BKOl>q8PyFO6w)+6Iz`LW%T5^R`U_NIW0r1dWv6OY=TVF?N=EfA(k(~7VBW(S;Tu5m4Lg8emDG-(mOSSs=M9Q&N8jc^Y4&9RqIsk(yO_P(mcCr}rCs%1MW1VBrn=0-oQN(Xj!k%iKV zb%ricBF3G4S1;+8lzg5PbZ|$Se$)I=PwiK=cDpHYdov2QO1_a-*dL4KUi|g&oh>(* zq$<`dQ^fat`+VW?m)?_KLn&mp^-@d=&7yGDt<=XwZZC=1scwxO2^RRI7n@g-1o8ps z)&+et_~)vr8aIF1VY1Qrq~Xe``KJrQSnAZ{CSq3yP;V*JC;mmCT6oRLSs7=GA?@6g zUooM}@tKtx(^|aKK8vbaHlUQqwE0}>j&~YlN3H#vKGm@u)xxS?n9XrOWUfCRa< z`20Fld2f&;gg7zpo{Adh+mqNntMc-D$N^yWZAZRI+u1T1zWHPxk{+?vcS1D>08>@6 zLhE@`gt1Y9mAK6Z4p|u(5I%EkfU7rKFSM=E4?VG9tI;a*@?6!ey{lzN5=Y-!$WFSe z&2dtO>^0@V4WRc#L&P%R(?@KfSblMS+N+?xUN$u3K4Ys%OmEh+tq}fnU}i>6YHM?< zlnL2gl~sF!j!Y4E;j3eIU-lfa`RsOL*Tt<%EFC0gPzoHfNWAfKFIKZN8}w~(Yi~=q z>=VNLO2|CjkxP}RkutxjV#4fWYR1KNrPYq5ha9Wl+u>ipsk*I(HS@iLnmGH9MFlTU zaFZ*KSR0px>o+pL7BbhB2EC1%PJ{67_ z#kY&#O4@P=OV#-79y_W>Gv2dxL*@G7%LksNSqgId9v;2xJ zrh8uR!F-eU$NMx@S*+sk=C~Dxr9Qn7TfWnTupuHKuQ$;gGiBcU>GF5sWx(~4IP3`f zWE;YFO*?jGwYh%C3X<>RKHC-DZ!*r;cIr}GLOno^3U4tFSSoJp%oHPiSa%nh=Zgn% z14+8v@ygy0>UgEN1bczD6wK45%M>psM)y^)IfG*>3ItX|TzV*0i%@>L(VN!zdKb8S?Qf7BhjNpziA zR}?={-eu>9JDcl*R=OP9B8N$IcCETXah9SUDhr{yrld{G;PnCWRsPD7!eOOFBTWUQ=LrA_~)mFf&!zJX!Oc-_=kT<}m|K52 z)M=G#;p;Rdb@~h5D{q^K;^fX-m5V}L%!wVC2iZ1uu401Ll}#rocTeK|7FAeBRhNdQ zCc2d^aQnQp=MpOmak60N$OgS}a;p(l9CL`o4r(e-nN}mQ?M&isv-P&d$!8|1D1I(3-z!wi zTgoo)*Mv`gC?~bm?S|@}I|m-E2yqPEvYybiD5azInexpK8?9q*$9Yy9-t%5jU8~ym zgZDx>!@ujQ=|HJnwp^wv-FdD{RtzO9SnyfB{mH_(c!jHL*$>0o-(h(eqe*ZwF6Lvu z{7rkk%PEqaA>o+f{H02tzZ@TWy&su?VNw43! z-X+rN`6llvpUms3ZiSt)JMeztB~>9{J8SPmYs&qohxdYFi!ra8KR$35Zp9oR)eFC4 zE;P31#3V)n`w$fZ|4X-|%MX`xZDM~gJyl2W;O$H25*=+1S#%|53>|LyH za@yh+;325%Gq3;J&a)?%7X%t@WXcWL*BaaR*7UEZad4I8iDt7^R_Fd`XeUo256;sAo2F!HcIQKk;h})QxEsPE5BcKc7WyerTchgKmrfRX z!x#H_%cL#B9TWAqkA4I$R^8{%do3Y*&(;WFmJ zU7Dih{t1<{($VtJRl9|&EB?|cJ)xse!;}>6mSO$o5XIx@V|AA8ZcoD88ZM?C*;{|f zZVmf94_l1OmaICt`2sTyG!$^UeTHx9YuUP!omj(r|7zpm5475|yXI=rR>>fteLI+| z)MoiGho0oEt=*J(;?VY0QzwCqw@cVm?d7Y!z0A@u#H?sCJ*ecvyhj& z-F77lO;SH^dmf?L>3i>?Z*U}Em4ZYV_CjgfvzYsRZ+1B!Uo6H6mbS<-FFL`ytqvb& zE7+)2ahv-~dz(Hs+f})z{*4|{)b=2!RZK;PWwOnO=hG7xG`JU5>bAvUbdYd_CjvtHBHgtGdlO+s^9ca^Bv3`t@VRX2_AD$Ckg36OcQRF zXD6QtGfHdw*hx~V(MV-;;ZZF#dJ-piEF+s27z4X1qi5$!o~xBnvf=uopcn7ftfsZc zy@(PuOk`4GL_n(H9(E2)VUjqRCk9kR?w)v@xO6Jm_Mx})&WGEl=GS0#)0FAq^J*o! zAClhvoTsNP*-b~rN{8Yym3g{01}Ep^^Omf=SKqvN?{Q*C4HNNAcrowIa^mf+3PRy! z*_G-|3i8a;+q;iP@~Of_$(vtFkB8yOyWt2*K)vAn9El>=D;A$CEx6b*XF@4y_6M+2 zpeW`RHoI_p(B{%(&jTHI->hmNmZjHUj<@;7w0mx3&koy!2$@cfX{sN19Y}euYJFn& z1?)+?HCkD0MRI$~uB2UWri})0bru_B;klFdwsLc!ne4YUE;t41JqfG# zZJq6%vbsdx!wYeE<~?>o4V`A3?lN%MnKQ`z=uUivQN^vzJ|C;sdQ37Qn?;lpzg})y z)_2~rUdH}zNwX;Tp0tJ78+&I=IwOQ-fl30R79O8@?Ub8IIA(6I`yHn%lARVL`%b8+ z4$8D-|MZZWxc_)vu6@VZN!HsI$*2NOV&uMxBNzIbRgy%ob_ zhwEH{J9r$!dEix9XM7n&c{S(h>nGm?el;gaX0@|QnzFD@bne`el^CO$yXC?BDJ|Qg z+y$GRoR`?ST1z^e*>;!IS@5Ovb7*RlN>BV_UC!7E_F;N#ky%1J{+iixp(dUJj93aK zzHNN>R-oN7>kykHClPnoPTIj7zc6KM(Pnlb(|s??)SMb)4!sMHU^-ntJwY5Big7xv zb1Ew`Xj;|D2kzGja*C$eS44(d&RMU~c_Y14V9_TLTz0J#uHlsx`S6{nhsA0dWZ#cG zJ?`fO50E>*X4TQLv#nl%3GOk*UkAgt=IY+u0LNXqeln3Z zv$~&Li`ZJOKkFuS)dJRA>)b_Da%Q~axwA_8zNK{BH{#}#m}zGcuckz}riDE-z_Ms> zR8-EqAMcfyGJCtvTpaUVQtajhUS%c@Yj}&6Zz;-M7MZzqv3kA7{SuW$oW#=0az2wQ zg-WG@Vb4|D`pl~Il54N7Hmsauc_ne-a!o5#j3WaBBh@Wuefb!QJIOn5;d)%A#s+5% zuD$H=VNux9bE-}1&bcYGZ+>1Fo;3Z@e&zX^n!?JK*adSbONm$XW9z;Q^L>9U!}Toj2WdafJ%oL#h|yWWwyAGxzfrAWdDTtaKl zK4`5tDpPg5>z$MNv=X0LZ0d6l%D{(D8oT@+w0?ce$DZ6pv>{1&Ok67Ix1 zH}3=IEhPJEhItCC8E=`T`N5(k?G=B4+xzZ?<4!~ ze~z6Wk9!CHTI(0rLJ4{JU?E-puc;xusR?>G?;4vt;q~iI9=kDL=z0Rr%O$vU`30X$ zDZRFyZ`(omOy@u|i6h;wtJlP;+}$|Ak|k2dea7n?U1*$T!sXqqOjq^NxLPMmk~&qI zYg0W?yK8T(6+Ea+$YyspKK?kP$+B`~t3^Pib_`!6xCs32!i@pqXfFV6PmBIR<-QW= zN8L{pt0Vap0x`Gzn#E@zh@H)0FfVfA_Iu4fjYZ+umO1LXIbVc$pY+E234u)ttcrl$ z>s92z4vT%n6cMb>=XT6;l0+9e(|CZG)$@C7t7Z7Ez@a)h)!hyuV&B5K%%)P5?Lk|C zZZSVzdXp{@OXSP0hoU-gF8s8Um(#xzjP2Vem zec#-^JqTa&Y#QJ>-FBxd7tf`XB6e^JPUgagB8iBSEps;92KG`!#mvVcPQ5yNC-GEG zTiHEDYfH+0O15}r^+ z#jxj=@x8iNHWALe!P3R67TwmhItn**0JwnzSV2O&KE8KcT+0hWH^OPD1pwiuyx=b@ zNf5Jh0{9X)8;~Es)$t@%(3!OnbY+`@?i{mGX7Yy}8T_*0a6g;kaFPq;*=px5EhO{Cp%1kI<0?*|h8v!6WnO3cCJRF2-CRrU3JiLJnj@6;L)!0kWYAc_}F{2P))3HmCrz zQ&N&gE70;`!6*eJ4^1IR{f6j4(-l&X!tjHxkbHA^Zhrnhr9g{exN|xrS`5Pq=#Xf& zG%P=#ra-TyVFfgW%cZo5OSIwFL9WtXAlFOa+ubmI5t*3=g#Y zF%;70p5;{ZeFL}&}yOY1N1*Q;*<(kTB!7vM$QokF)yr2FlIU@$Ph58$Bz z0J?xQG=MlS4L6jA22eS42g|9*9pX@$#*sUeM(z+t?hr@r5J&D1rx}2pW&m*_`VDCW zUYY@v-;bAO0HqoAgbbiGGC<=ryf96}3pouhy3XJrX+!!u*O_>Si38V{uJmQ&USptX zKp#l(?>%^7;2%h(q@YWS#9;a!JhKlkR#Vd)ERILlgu!Hr@jA@V;sk4BJ-H#p*4EqC zDGjC*tl=@3Oi6)Bn^QwFpul18fpkbpg0+peH$xyPBqb%`$OUhPKyWb32o7clB*9Z< zN=i~NLjavrLtwgJ01bufP+>p-jR2I95|TpmKpQL2!oV>g(4RvS2pK4*ou%m(h6r3A zX#s&`9LU1ZG&;{CkOK!4fLDTnBys`M!vuz>Q&9OZ0hGQl!~!jSDg|~s*w52opC{sB ze|Cf2luD(*G13LcOAGA!s2FjSK8&IE5#W%J25w!vM0^VyQM!t)inj&RTiJ!wXzFgz z3^IqzB7I0L$llljsGq})thBy9UOyjtFO_*hYM_sgcMk>44jeH0V1FDyELc{S1F-;A zS;T^k^~4biG&V*Irq}O;e}j$$+E_#G?HKIn05iP3j|87TkGK~SqG!-KBg5+mN(aLm z8ybhIM`%C19UX$H$KY6JgXbY$0AT%rEpHC;u`rQ$Y=rxUdsc5*Kvc8jaYaO$^)cI6){P6K0r)I6DY4Wr4&B zLQUBraey#0HV|&c4v7PVo3n$zHj99(TZO^3?Ly%C4nYvJTL9eLBLHsM3WKKD>5!B` zQ=BsR3aR6PD(Fa>327E2HAu5TM~Wusc!)>~(gM)+3~m;92Jd;FnSib=M5d6;;5{%R zb4V7DEJ0V!CP-F*oU?gkc>ksUtAYP&V4ND5J>J2^jt*vcFflQWCrB&fLdT%O59PVJ zhid#toR=FNgD!q3&r8#wEBr`!wzvQu5zX?Q>nlSJ4i@WC*CN*-xU66F^V5crWevQ9gsq$I@z1o(a=k7LL~ z7m_~`o;_Ozha1$8Q}{WBehvAlO4EL60y5}8GDrZ< zXh&F}71JbW2A~8KfEWj&UWV#4+Z4p`b{uAj4&WC zha`}X@3~+Iz^WRlOHU&KngK>#j}+_o@LdBC1H-`gT+krWX3-;!)6?{FBp~%20a}FL zFP9%Emqcwa#(`=G>BBZ0qZDQhmZKJg_g8<=bBFKWr!dyg(YkpE+|R*SGpDVU!+VlU zFC54^DLv}`qa%49T>nNiA9Q7Ips#!Xx90tCU2gvK`(F+GPcL=J^>No{)~we#o@&mUb6c$ zCc*<|NJBk-#+{j9xkQ&ujB zI~`#kN~7W!f*-}wkG~Ld!JqZ@tK}eeSnsS5J1fMFXm|`LJx&}5`@dK3W^7#Wnm+_P zBZkp&j1fa2Y=eIjJ0}gh85jt43kaIXXv?xmo@eHrka!Z|vQv12HN#+!I5E z`(fbuW>gFiJL|uXJ!vKt#z3e3HlVdboH7;e#i3(2<)Fg-I@BR!qY#eof3MFZ&*Y@l zI|KJf&ge@p2Dq09Vu$$Qxb7!}{m-iRk@!)%KL)txi3;~Z4Pb}u@GsW;ELiWeG9V51 znX#}B&4Y2E7-H=OpNE@q{%hFLxwIpBF2t{vPREa8_{linXT;#1vMRWjOzLOP$-hf( z>=?$0;~~PnkqY;~K{EM6Vo-T(0K{A0}VUGmu*hR z{tw3hvBN%N3G3Yw`X5Te+F{J`(3w1s3-+1EbnFQKcrgrX1Jqvs@ADGe%M0s$EbK$$ zK)=y=upBc6SjGYAACCcI=Y*6Fi8_jgwZlLxD26fnQfJmb8^gHRN5(TemhX@0e=vr> zg`W}6U>x6VhoA3DqsGGD9uL1DhB3!OXO=k}59TqD@(0Nb{)Ut_luTioK_>7wjc!5C zIr@w}b`Fez3)0wQfKl&bae7;PcTA7%?f2xucM0G)wt_KO!Ewx>F~;=BI0j=Fb4>pp zv}0R^xM4eti~+^+gE$6b81p(kwzuDti(-K9bc|?+pJEl@H+jSYuxZQV8rl8 zjp@M{#%qItIUFN~KcO9Hed*`$5A-2~pAo~K&<-Q+`9`$CK>rzqAI4w~$F%vs9s{~x zg4BP%Gy*@m?;D6=SRX?888Q6peF@_4Z->8wAH~Cn!R$|Hhq2cIzFYqT_+cDourHbY z0qroxJnrZ4Gh+Ay+F`_c%+KRT>y3qw{)89?=hJ@=KO=@ep)aBJ$c!JHfBMJpsP*3G za7|)VJJ8B;4?n{~ldJF7%jmb`-ftIvNd~ekoufG(`K(3=LNc;HBY& z(lp#q8XAD#cIf}k49zX_i`*fO+#!zKA&%T3j@%)R+#yag067CU%yUEe47>wzGU8^` z1EXFT^@I!{J!F8!X?S6ph8J=gUi5tl93*W>7}_uR<2N2~e}FaG?}KPyugQ=-OGEZs z!GBoyYY+H*ANn4?Z)X4l+7H%`17i5~zRlRIX?t)6_eu=g2Q`3WBhxSUeea+M-S?RL zX9oBGKn%a!H+*hx4d2(I!gsi+@SQK%<{X22M~2tMulJoa)0*+z9=-YO+;DFEm5eE1U9b^B(Z}2^9!Qk`!A$wUE z7$Ar5?NRg2&G!AZqnmE64eh^Anss3i!{}%6@Et+4rr!=}!SBF8eZ2*J3ujCWbl;3; z48H~goPSv(8X61fKKdpP!Z7$88NL^Z?j`!^*I?-P4X^pMxyWz~@$(UeAcTSDd(`vO z{~rc;9|GfMJcApU3k}22a!&)k4{CU!e_ny^Y3cO;tOvOMKEyWz!vG(Kp*;hB?d|R3`2X~=5a6#^o5@qn?J-bI8Ppip{-yG z!k|VcGsq!jF~}7DMr49Wap-s&>o=U^T0!Lcy}!(bhtYsPQy z4|EJe{12QL#=c(suQ89Mhw9<`bui%nx7Nep`C&*M3~vMEACmcRYYRGtANq$F%zh&V zc)cEVeHz*Z1N)L7k-(k3np#{GcDh2Q@ya0YHl*n7fl*ZPAsbU-a94MYYtA#&!c`xGIaV;yzsmrjfieTEtqB_WgZp2*NplHx=$O{M~2#i_vJ{ps-NgK zQsxKK_CBM2PP_je+Xft`(vYfXXgIUr{=PA=7a8`2EHk)Ym2QKIforz# tySWtj{oF3N9@_;i*Fv5S)9x^z=nlWP>jpp-9)52ZmLVA=i*%6g{{fxOO~wEK literal 0 HcmV?d00001 diff --git a/pkgs/cupertino_http/example/windows/runner/runner.exe.manifest b/pkgs/cupertino_http/example/windows/runner/runner.exe.manifest new file mode 100644 index 0000000000..a42ea7687c --- /dev/null +++ b/pkgs/cupertino_http/example/windows/runner/runner.exe.manifest @@ -0,0 +1,20 @@ + + + + + PerMonitorV2 + + + + + + + + + + + + + + + diff --git a/pkgs/cupertino_http/example/windows/runner/utils.cpp b/pkgs/cupertino_http/example/windows/runner/utils.cpp new file mode 100644 index 0000000000..f5bf9fa0f5 --- /dev/null +++ b/pkgs/cupertino_http/example/windows/runner/utils.cpp @@ -0,0 +1,64 @@ +#include "utils.h" + +#include +#include +#include +#include + +#include + +void CreateAndAttachConsole() { + if (::AllocConsole()) { + FILE *unused; + if (freopen_s(&unused, "CONOUT$", "w", stdout)) { + _dup2(_fileno(stdout), 1); + } + if (freopen_s(&unused, "CONOUT$", "w", stderr)) { + _dup2(_fileno(stdout), 2); + } + std::ios::sync_with_stdio(); + FlutterDesktopResyncOutputStreams(); + } +} + +std::vector GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector(); + } + + std::vector command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, nullptr, 0, nullptr, nullptr); + std::string utf8_string; + if (target_length == 0 || target_length > utf8_string.max_size()) { + return utf8_string; + } + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, utf8_string.data(), + target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/pkgs/cupertino_http/example/windows/runner/utils.h b/pkgs/cupertino_http/example/windows/runner/utils.h new file mode 100644 index 0000000000..3879d54755 --- /dev/null +++ b/pkgs/cupertino_http/example/windows/runner/utils.h @@ -0,0 +1,19 @@ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include +#include + +// Creates a console for the process, and redirects stdout and stderr to +// it for both the runner and the Flutter library. +void CreateAndAttachConsole(); + +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector, +// encoded in UTF-8. Returns an empty std::vector on failure. +std::vector GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/pkgs/cupertino_http/example/windows/runner/win32_window.cpp b/pkgs/cupertino_http/example/windows/runner/win32_window.cpp new file mode 100644 index 0000000000..30b08cc8c9 --- /dev/null +++ b/pkgs/cupertino_http/example/windows/runner/win32_window.cpp @@ -0,0 +1,245 @@ +#include "win32_window.h" + +#include + +#include "resource.h" + +namespace { + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +// The number of Win32Window objects that currently exist. +static int g_active_window_count = 0; + +using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); + +// Scale helper to convert logical scaler values to physical using passed in +// scale factor +int Scale(int source, double scale_factor) { + return static_cast(source * scale_factor); +} + +// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. +// This API is only needed for PerMonitor V1 awareness mode. +void EnableFullDpiSupportIfAvailable(HWND hwnd) { + HMODULE user32_module = LoadLibraryA("User32.dll"); + if (!user32_module) { + return; + } + auto enable_non_client_dpi_scaling = + reinterpret_cast( + GetProcAddress(user32_module, "EnableNonClientDpiScaling")); + if (enable_non_client_dpi_scaling != nullptr) { + enable_non_client_dpi_scaling(hwnd); + } + FreeLibrary(user32_module); +} + +} // namespace + +// Manages the Win32Window's window class registration. +class WindowClassRegistrar { + public: + ~WindowClassRegistrar() = default; + + // Returns the singleton registar instance. + static WindowClassRegistrar* GetInstance() { + if (!instance_) { + instance_ = new WindowClassRegistrar(); + } + return instance_; + } + + // Returns the name of the window class, registering the class if it hasn't + // previously been registered. + const wchar_t* GetWindowClass(); + + // Unregisters the window class. Should only be called if there are no + // instances of the window. + void UnregisterWindowClass(); + + private: + WindowClassRegistrar() = default; + + static WindowClassRegistrar* instance_; + + bool class_registered_ = false; +}; + +WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; + +const wchar_t* WindowClassRegistrar::GetWindowClass() { + if (!class_registered_) { + WNDCLASS window_class{}; + window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); + window_class.lpszClassName = kWindowClassName; + window_class.style = CS_HREDRAW | CS_VREDRAW; + window_class.cbClsExtra = 0; + window_class.cbWndExtra = 0; + window_class.hInstance = GetModuleHandle(nullptr); + window_class.hIcon = + LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + window_class.hbrBackground = 0; + window_class.lpszMenuName = nullptr; + window_class.lpfnWndProc = Win32Window::WndProc; + RegisterClass(&window_class); + class_registered_ = true; + } + return kWindowClassName; +} + +void WindowClassRegistrar::UnregisterWindowClass() { + UnregisterClass(kWindowClassName, nullptr); + class_registered_ = false; +} + +Win32Window::Win32Window() { + ++g_active_window_count; +} + +Win32Window::~Win32Window() { + --g_active_window_count; + Destroy(); +} + +bool Win32Window::CreateAndShow(const std::wstring& title, + const Point& origin, + const Size& size) { + Destroy(); + + const wchar_t* window_class = + WindowClassRegistrar::GetInstance()->GetWindowClass(); + + const POINT target_point = {static_cast(origin.x), + static_cast(origin.y)}; + HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); + UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); + double scale_factor = dpi / 96.0; + + HWND window = CreateWindow( + window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, + Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), + Scale(size.width, scale_factor), Scale(size.height, scale_factor), + nullptr, nullptr, GetModuleHandle(nullptr), this); + + if (!window) { + return false; + } + + return OnCreate(); +} + +// static +LRESULT CALLBACK Win32Window::WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + if (message == WM_NCCREATE) { + auto window_struct = reinterpret_cast(lparam); + SetWindowLongPtr(window, GWLP_USERDATA, + reinterpret_cast(window_struct->lpCreateParams)); + + auto that = static_cast(window_struct->lpCreateParams); + EnableFullDpiSupportIfAvailable(window); + that->window_handle_ = window; + } else if (Win32Window* that = GetThisFromHandle(window)) { + return that->MessageHandler(window, message, wparam, lparam); + } + + return DefWindowProc(window, message, wparam, lparam); +} + +LRESULT +Win32Window::MessageHandler(HWND hwnd, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + switch (message) { + case WM_DESTROY: + window_handle_ = nullptr; + Destroy(); + if (quit_on_close_) { + PostQuitMessage(0); + } + return 0; + + case WM_DPICHANGED: { + auto newRectSize = reinterpret_cast(lparam); + LONG newWidth = newRectSize->right - newRectSize->left; + LONG newHeight = newRectSize->bottom - newRectSize->top; + + SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, + newHeight, SWP_NOZORDER | SWP_NOACTIVATE); + + return 0; + } + case WM_SIZE: { + RECT rect = GetClientArea(); + if (child_content_ != nullptr) { + // Size and position the child window. + MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, + rect.bottom - rect.top, TRUE); + } + return 0; + } + + case WM_ACTIVATE: + if (child_content_ != nullptr) { + SetFocus(child_content_); + } + return 0; + } + + return DefWindowProc(window_handle_, message, wparam, lparam); +} + +void Win32Window::Destroy() { + OnDestroy(); + + if (window_handle_) { + DestroyWindow(window_handle_); + window_handle_ = nullptr; + } + if (g_active_window_count == 0) { + WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); + } +} + +Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { + return reinterpret_cast( + GetWindowLongPtr(window, GWLP_USERDATA)); +} + +void Win32Window::SetChildContent(HWND content) { + child_content_ = content; + SetParent(content, window_handle_); + RECT frame = GetClientArea(); + + MoveWindow(content, frame.left, frame.top, frame.right - frame.left, + frame.bottom - frame.top, true); + + SetFocus(child_content_); +} + +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + +HWND Win32Window::GetHandle() { + return window_handle_; +} + +void Win32Window::SetQuitOnClose(bool quit_on_close) { + quit_on_close_ = quit_on_close; +} + +bool Win32Window::OnCreate() { + // No-op; provided for subclasses. + return true; +} + +void Win32Window::OnDestroy() { + // No-op; provided for subclasses. +} diff --git a/pkgs/cupertino_http/example/windows/runner/win32_window.h b/pkgs/cupertino_http/example/windows/runner/win32_window.h new file mode 100644 index 0000000000..17ba431125 --- /dev/null +++ b/pkgs/cupertino_http/example/windows/runner/win32_window.h @@ -0,0 +1,98 @@ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ + +#include + +#include +#include +#include + +// A class abstraction for a high DPI-aware Win32 Window. Intended to be +// inherited from by classes that wish to specialize with custom +// rendering and input handling +class Win32Window { + public: + struct Point { + unsigned int x; + unsigned int y; + Point(unsigned int x, unsigned int y) : x(x), y(y) {} + }; + + struct Size { + unsigned int width; + unsigned int height; + Size(unsigned int width, unsigned int height) + : width(width), height(height) {} + }; + + Win32Window(); + virtual ~Win32Window(); + + // Creates and shows a win32 window with |title| and position and size using + // |origin| and |size|. New windows are created on the default monitor. Window + // sizes are specified to the OS in physical pixels, hence to ensure a + // consistent size to will treat the width height passed in to this function + // as logical pixels and scale to appropriate for the default monitor. Returns + // true if the window was created successfully. + bool CreateAndShow(const std::wstring& title, + const Point& origin, + const Size& size); + + // Release OS resources associated with window. + void Destroy(); + + // Inserts |content| into the window tree. + void SetChildContent(HWND content); + + // Returns the backing Window handle to enable clients to set icon and other + // window properties. Returns nullptr if the window has been destroyed. + HWND GetHandle(); + + // If true, closing this window will quit the application. + void SetQuitOnClose(bool quit_on_close); + + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + + protected: + // Processes and route salient window messages for mouse handling, + // size change and DPI. Delegates handling of these to member overloads that + // inheriting classes can handle. + virtual LRESULT MessageHandler(HWND window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Called when CreateAndShow is called, allowing subclass window-related + // setup. Subclasses should return false if setup fails. + virtual bool OnCreate(); + + // Called when Destroy is called. + virtual void OnDestroy(); + + private: + friend class WindowClassRegistrar; + + // OS callback called by message pump. Handles the WM_NCCREATE message which + // is passed when the non-client area is being created and enables automatic + // non-client DPI scaling so that the non-client area automatically + // responsponds to changes in DPI. All other messages are handled by + // MessageHandler. + static LRESULT CALLBACK WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Retrieves a class instance pointer for |window| + static Win32Window* GetThisFromHandle(HWND const window) noexcept; + + bool quit_on_close_ = false; + + // window handle for top level window. + HWND window_handle_ = nullptr; + + // window handle for hosted content. + HWND child_content_ = nullptr; +}; + +#endif // RUNNER_WIN32_WINDOW_H_ From b943eeae158ecc71e3adca84a65a0dcc9e40c9ba Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 30 Aug 2022 15:02:35 -0700 Subject: [PATCH 166/448] Update README.md (#778) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0e9101d364..5dd1036fe8 100644 --- a/README.md +++ b/README.md @@ -12,5 +12,5 @@ and the browser. |---|---|---| | [http](pkgs/http/) | A composable, multi-platform, Future-based API for HTTP requests. | [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) | | [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | A library that tests whether implementations of package:http's `Client` class behave as expected. | | -| [cronet_http](pkgs/cronet_http/) | An Android Flutter plugin that provides access to the [Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) HTTP client. | | +| [cronet_http](pkgs/cronet_http/) | An Android Flutter plugin that provides access to the [Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) HTTP client. | [![pub package](https://img.shields.io/pub/v/cronet_http.svg)](https://pub.dev/packages/cronet_http) | | [cupertino_http](pkgs/cupertino_http/) | A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). | [![pub package](https://img.shields.io/pub/v/cupertino_http.svg)](https://pub.dev/packages/cupertino_http) | From abebb258973d801ebb427885b17accfe014a32e0 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 31 Aug 2022 14:34:45 -0700 Subject: [PATCH 167/448] Make it possible to control multipath TCP support (#780) --- pkgs/cupertino_http/CHANGELOG.md | 1 + .../url_session_configuration_test.dart | 12 ++++++++++++ pkgs/cupertino_http/lib/cupertino_http.dart | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index d652cd3e4d..8e5058ce64 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.0.4 * Add the ability to control caching policy. +* Add the ability to control multipath TCP connections. ## 0.0.3 diff --git a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart index 8909c172bb..02ddd7ee55 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart @@ -54,6 +54,18 @@ void testProperties(URLSessionConfiguration config) { config.httpShouldUsePipelining = false; expect(config.httpShouldUsePipelining, false); }); + test('multipathServiceType', () { + expect(config.multipathServiceType, + URLSessionMultipathServiceType.multipathServiceTypeNone); + config.multipathServiceType = + URLSessionMultipathServiceType.multipathServiceTypeAggregate; + expect(config.multipathServiceType, + URLSessionMultipathServiceType.multipathServiceTypeAggregate); + config.multipathServiceType = + URLSessionMultipathServiceType.multipathServiceTypeNone; + expect(config.multipathServiceType, + URLSessionMultipathServiceType.multipathServiceTypeNone); + }); test('requestCachePolicy', () { config.requestCachePolicy = URLRequestCachePolicy.returnCacheDataDontLoad; expect(config.requestCachePolicy, diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 9c86e29560..42e7bbb109 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -62,6 +62,16 @@ enum URLRequestCachePolicy { reloadRevalidatingCacheData, } +// Controls how multipath TCP should be used. +// +// See [NSURLSessionMultipathServiceType](https://developer.apple.com/documentation/foundation/nsurlsessionmultipathservicetype). +enum URLSessionMultipathServiceType { + multipathServiceTypeNone, + multipathServiceTypeHandover, + multipathServiceTypeInteractive, + multipathServiceTypeAggregate, +} + // Controls how [URLSessionTask] execute will proceed after the response is // received. // @@ -202,6 +212,14 @@ class URLSessionConfiguration set httpShouldUsePipelining(bool value) => _nsObject.HTTPShouldUsePipelining = value; + /// What type of Multipath TCP connections to use. + /// + /// See [NSURLSessionConfiguration.multipathServiceType](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/2875967-multipathservicetype) + URLSessionMultipathServiceType get multipathServiceType => + URLSessionMultipathServiceType.values[_nsObject.multipathServiceType]; + set multipathServiceType(URLSessionMultipathServiceType value) => + _nsObject.multipathServiceType = value.index; + // Controls how to deal with response caching. // // See [NSURLSessionConfiguration.requestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411655-requestcachepolicy) From 38b32c9a43c25f1e13058f02ca074425712e5ce1 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 1 Sep 2022 10:30:48 -0700 Subject: [PATCH 168/448] All the user to specify the network service type. (#781) --- pkgs/cupertino_http/CHANGELOG.md | 6 ++- .../url_session_configuration_test.dart | 12 ++++++ pkgs/cupertino_http/lib/cupertino_http.dart | 39 +++++++++++++++---- 3 files changed, 49 insertions(+), 8 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 8e5058ce64..d6d02bc1c6 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,7 +1,11 @@ +## 0.0.5 + +* Add the ability to set network service type. +* Add the ability to control multipath TCP connections. + ## 0.0.4 * Add the ability to control caching policy. -* Add the ability to control multipath TCP connections. ## 0.0.3 diff --git a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart index 02ddd7ee55..0b9e17823f 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart @@ -66,6 +66,18 @@ void testProperties(URLSessionConfiguration config) { expect(config.multipathServiceType, URLSessionMultipathServiceType.multipathServiceTypeNone); }); + test('networkServiceType', () { + expect(config.networkServiceType, + URLRequestNetworkService.networkServiceTypeDefault); + config.networkServiceType = + URLRequestNetworkService.networkServiceTypeResponsiveData; + expect(config.networkServiceType, + URLRequestNetworkService.networkServiceTypeResponsiveData); + config.networkServiceType = + URLRequestNetworkService.networkServiceTypeDefault; + expect(config.networkServiceType, + URLRequestNetworkService.networkServiceTypeDefault); + }); test('requestCachePolicy', () { config.requestCachePolicy = URLRequestCachePolicy.returnCacheDataDontLoad; expect(config.requestCachePolicy, diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 42e7bbb109..4453bb5318 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -50,9 +50,9 @@ enum HTTPCookieAcceptPolicy { httpCookieAcceptPolicyOnlyFromMainDocumentDomain, } -// Controls how response data is cached. -// -// See [URLRequestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequestcachepolicy). +/// Controls how response data is cached. +/// +/// See [URLRequestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequestcachepolicy). enum URLRequestCachePolicy { useProtocolCachePolicy, reloadIgnoringLocalCacheData, @@ -72,10 +72,10 @@ enum URLSessionMultipathServiceType { multipathServiceTypeAggregate, } -// Controls how [URLSessionTask] execute will proceed after the response is -// received. -// -// See [NSURLSessionResponseDisposition](https://developer.apple.com/documentation/foundation/nsurlsessionresponsedisposition). +/// Controls how [URLSessionTask] execute will proceed after the response is +/// received. +/// +/// See [NSURLSessionResponseDisposition](https://developer.apple.com/documentation/foundation/nsurlsessionresponsedisposition). enum URLSessionResponseDisposition { urlSessionResponseCancel, urlSessionResponseAllow, @@ -83,6 +83,22 @@ enum URLSessionResponseDisposition { urlSessionResponseBecomeStream } +/// Provides in indication to the operating system on what type of requests +/// are being sent. +/// +/// See [NSURLRequestNetworkServiceType](https://developer.apple.com/documentation/foundation/nsurlrequestnetworkservicetype). +enum URLRequestNetworkService { + networkServiceTypeDefault, + networkServiceTypeVoIP, + networkServiceTypeVideo, + networkServiceTypeBackground, + networkServiceTypeVoice, + networkServiceTypeResponsiveData, + networkServiceTypeAVStreaming, + networkServiceTypeResponsiveAV, + networkServiceTypeCallSignaling +} + /// Information about a failure. /// /// See [NSError](https://developer.apple.com/documentation/foundation/nserror) @@ -220,6 +236,15 @@ class URLSessionConfiguration set multipathServiceType(URLSessionMultipathServiceType value) => _nsObject.multipathServiceType = value.index; + /// Provides in indication to the operating system on what type of requests + /// are being sent. + /// + /// See [NSURLSessionConfiguration.networkServiceType](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411606-networkservicetype). + URLRequestNetworkService get networkServiceType => + URLRequestNetworkService.values[_nsObject.networkServiceType]; + set networkServiceType(URLRequestNetworkService value) => + _nsObject.networkServiceType = value.index; + // Controls how to deal with response caching. // // See [NSURLSessionConfiguration.requestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411655-requestcachepolicy) From 921b3a0082585c57eb4162eb3256a5195a8ada2a Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 7 Sep 2022 11:20:19 -0700 Subject: [PATCH 169/448] Set `StreamedResponse.reasonPhrase` and `StreamedResponse.request` (#784) --- pkgs/cronet_http/.gitattributes | 3 +- pkgs/cronet_http/CHANGELOG.md | 4 + .../flutter/plugins/cronet_http/Messages.java | 18 ++++ .../plugins/cronet_http/CronetHttpPlugin.kt | 2 + pkgs/cronet_http/lib/cronet_client.dart | 2 + pkgs/cronet_http/lib/src/messages.dart | 4 + pkgs/cronet_http/pigeons/messages.dart | 1 + pkgs/cupertino_http/CHANGELOG.md | 3 + pkgs/cupertino_http/lib/cupertino_client.dart | 90 +++++++++++++++++++ .../lib/src/response_body_streamed_test.dart | 4 + .../lib/src/response_body_tests.dart | 8 ++ 11 files changed, 138 insertions(+), 1 deletion(-) diff --git a/pkgs/cronet_http/.gitattributes b/pkgs/cronet_http/.gitattributes index c788da1c7b..907dfd352a 100644 --- a/pkgs/cronet_http/.gitattributes +++ b/pkgs/cronet_http/.gitattributes @@ -1,3 +1,4 @@ # pigeon generated code lib/src/messages.dart linguist-generated -android/src/main/java/io/flutter/plugins/cronet_http/Messages.java +android/src/main/java/io/flutter/plugins/cronet_http/Messages.java linguist-generated + diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index de1f9af735..8dcae55bac 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.2 + +* Set `StreamedResponse.reasonPhrase` and `StreamedResponse.request`. + ## 0.0.1 * Initial development release. diff --git a/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java b/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java index 50f8740b48..daf4edd2bd 100644 --- a/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java +++ b/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java @@ -75,6 +75,15 @@ public void setStatusCode(@NonNull Long setterArg) { this.statusCode = setterArg; } + private @NonNull String statusText; + public @NonNull String getStatusText() { return statusText; } + public void setStatusText(@NonNull String setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"statusText\" is null."); + } + this.statusText = setterArg; + } + private @NonNull Boolean isRedirect; public @NonNull Boolean getIsRedirect() { return isRedirect; } public void setIsRedirect(@NonNull Boolean setterArg) { @@ -97,6 +106,11 @@ public static final class Builder { this.statusCode = setterArg; return this; } + private @Nullable String statusText; + public @NonNull Builder setStatusText(@NonNull String setterArg) { + this.statusText = setterArg; + return this; + } private @Nullable Boolean isRedirect; public @NonNull Builder setIsRedirect(@NonNull Boolean setterArg) { this.isRedirect = setterArg; @@ -106,6 +120,7 @@ public static final class Builder { ResponseStarted pigeonReturn = new ResponseStarted(); pigeonReturn.setHeaders(headers); pigeonReturn.setStatusCode(statusCode); + pigeonReturn.setStatusText(statusText); pigeonReturn.setIsRedirect(isRedirect); return pigeonReturn; } @@ -114,6 +129,7 @@ public static final class Builder { Map toMapResult = new HashMap<>(); toMapResult.put("headers", headers); toMapResult.put("statusCode", statusCode); + toMapResult.put("statusText", statusText); toMapResult.put("isRedirect", isRedirect); return toMapResult; } @@ -123,6 +139,8 @@ public static final class Builder { pigeonResult.setHeaders((Map>)headers); Object statusCode = map.get("statusCode"); pigeonResult.setStatusCode((statusCode == null) ? null : ((statusCode instanceof Integer) ? (Integer)statusCode : (Long)statusCode)); + Object statusText = map.get("statusText"); + pigeonResult.setStatusText((String)statusText); Object isRedirect = map.get("isRedirect"); pigeonResult.setIsRedirect((Boolean)isRedirect); return pigeonResult; diff --git a/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt b/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt index 84b5488884..5377c7c2c7 100644 --- a/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt +++ b/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt @@ -115,6 +115,7 @@ class CronetHttpPlugin : FlutterPlugin, Messages.HttpApi { .setResponseStarted( Messages.ResponseStarted.Builder() .setStatusCode(info.getHttpStatusCode().toLong()) + .setStatusText(info.getHttpStatusText()) .setHeaders(info.getAllHeaders()) .setIsRedirect(true) .build() @@ -148,6 +149,7 @@ class CronetHttpPlugin : FlutterPlugin, Messages.HttpApi { .setResponseStarted( Messages.ResponseStarted.Builder() .setStatusCode(info.getHttpStatusCode().toLong()) + .setStatusText(info.getHttpStatusText()) .setHeaders(info.getAllHeaders()) .setIsRedirect(false) .build() diff --git a/pkgs/cronet_http/lib/cronet_client.dart b/pkgs/cronet_http/lib/cronet_client.dart index 376b53eff4..d57cefcf87 100644 --- a/pkgs/cronet_http/lib/cronet_client.dart +++ b/pkgs/cronet_http/lib/cronet_client.dart @@ -208,6 +208,8 @@ class CronetClient extends BaseClient { return StreamedResponse(responseDataController.stream, result.statusCode, contentLength: responseHeaders['content-lenght'] as int?, + reasonPhrase: result.statusText, + request: request, isRedirect: result.isRedirect, headers: responseHeaders); } diff --git a/pkgs/cronet_http/lib/src/messages.dart b/pkgs/cronet_http/lib/src/messages.dart index 984b8e162b..47e0a920e9 100644 --- a/pkgs/cronet_http/lib/src/messages.dart +++ b/pkgs/cronet_http/lib/src/messages.dart @@ -29,17 +29,20 @@ class ResponseStarted { ResponseStarted({ required this.headers, required this.statusCode, + required this.statusText, required this.isRedirect, }); Map?> headers; int statusCode; + String statusText; bool isRedirect; Object encode() { final Map pigeonMap = {}; pigeonMap['headers'] = headers; pigeonMap['statusCode'] = statusCode; + pigeonMap['statusText'] = statusText; pigeonMap['isRedirect'] = isRedirect; return pigeonMap; } @@ -50,6 +53,7 @@ class ResponseStarted { headers: (pigeonMap['headers'] as Map?)! .cast?>(), statusCode: pigeonMap['statusCode']! as int, + statusText: pigeonMap['statusText']! as String, isRedirect: pigeonMap['isRedirect']! as bool, ); } diff --git a/pkgs/cronet_http/pigeons/messages.dart b/pkgs/cronet_http/pigeons/messages.dart index 722e1ceb76..52adb78b64 100644 --- a/pkgs/cronet_http/pigeons/messages.dart +++ b/pkgs/cronet_http/pigeons/messages.dart @@ -24,6 +24,7 @@ enum CacheMode { class ResponseStarted { Map?> headers; int statusCode; + String statusText; bool isRedirect; } diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index d6d02bc1c6..38d1bafd62 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -2,6 +2,9 @@ * Add the ability to set network service type. * Add the ability to control multipath TCP connections. +* Set `StreamedResponse.reasonPhrase` and `StreamedResponse.request`. + Fixes + [cupertino_http: BaseResponse.request is null](https://github.com/dart-lang/http/issues/782). ## 0.0.4 diff --git a/pkgs/cupertino_http/lib/cupertino_client.dart b/pkgs/cupertino_http/lib/cupertino_client.dart index 0093025011..beebfca51d 100644 --- a/pkgs/cupertino_http/lib/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/cupertino_client.dart @@ -6,6 +6,7 @@ /// [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). import 'dart:async'; +import 'dart:io'; import 'dart:typed_data'; import 'package:http/http.dart'; @@ -55,6 +56,93 @@ class CupertinoClient extends BaseClient { CupertinoClient._(this._urlSession); + String? _findReasonPhrase(int statusCode) { + switch (statusCode) { + case HttpStatus.continue_: + return 'Continue'; + case HttpStatus.switchingProtocols: + return 'Switching Protocols'; + case HttpStatus.ok: + return 'OK'; + case HttpStatus.created: + return 'Created'; + case HttpStatus.accepted: + return 'Accepted'; + case HttpStatus.nonAuthoritativeInformation: + return 'Non-Authoritative Information'; + case HttpStatus.noContent: + return 'No Content'; + case HttpStatus.resetContent: + return 'Reset Content'; + case HttpStatus.partialContent: + return 'Partial Content'; + case HttpStatus.multipleChoices: + return 'Multiple Choices'; + case HttpStatus.movedPermanently: + return 'Moved Permanently'; + case HttpStatus.found: + return 'Found'; + case HttpStatus.seeOther: + return 'See Other'; + case HttpStatus.notModified: + return 'Not Modified'; + case HttpStatus.useProxy: + return 'Use Proxy'; + case HttpStatus.temporaryRedirect: + return 'Temporary Redirect'; + case HttpStatus.badRequest: + return 'Bad Request'; + case HttpStatus.unauthorized: + return 'Unauthorized'; + case HttpStatus.paymentRequired: + return 'Payment Required'; + case HttpStatus.forbidden: + return 'Forbidden'; + case HttpStatus.notFound: + return 'Not Found'; + case HttpStatus.methodNotAllowed: + return 'Method Not Allowed'; + case HttpStatus.notAcceptable: + return 'Not Acceptable'; + case HttpStatus.proxyAuthenticationRequired: + return 'Proxy Authentication Required'; + case HttpStatus.requestTimeout: + return 'Request Time-out'; + case HttpStatus.conflict: + return 'Conflict'; + case HttpStatus.gone: + return 'Gone'; + case HttpStatus.lengthRequired: + return 'Length Required'; + case HttpStatus.preconditionFailed: + return 'Precondition Failed'; + case HttpStatus.requestEntityTooLarge: + return 'Request Entity Too Large'; + case HttpStatus.requestUriTooLong: + return 'Request-URI Too Long'; + case HttpStatus.unsupportedMediaType: + return 'Unsupported Media Type'; + case HttpStatus.requestedRangeNotSatisfiable: + return 'Requested range not satisfiable'; + case HttpStatus.expectationFailed: + return 'Expectation Failed'; + case HttpStatus.internalServerError: + return 'Internal Server Error'; + case HttpStatus.notImplemented: + return 'Not Implemented'; + case HttpStatus.badGateway: + return 'Bad Gateway'; + case HttpStatus.serviceUnavailable: + return 'Service Unavailable'; + case HttpStatus.gatewayTimeout: + return 'Gateway Time-out'; + case HttpStatus.httpVersionNotSupported: + return 'Http Version not supported'; + default: + return null; + } + } + static _TaskTracker _tracker(URLSessionTask task) => _tasks[task.taskIdentifier]!; @@ -164,6 +252,8 @@ class CupertinoClient extends BaseClient { contentLength: response.expectedContentLength == -1 ? null : response.expectedContentLength, + reasonPhrase: _findReasonPhrase(response.statusCode), + request: request, isRedirect: !request.followRedirects && taskTracker.numRedirects > 0, headers: response.allHeaderFields .map((key, value) => MapEntry(key.toLowerCase(), value)), diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart index b4a359111b..0da8620bf0 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart @@ -51,6 +51,10 @@ void testResponseBodyStreamed(Client client, }); expect(response.headers['content-type'], 'text/plain'); expect(lastReceived, greaterThanOrEqualTo(1000)); + expect(response.isRedirect, isFalse); + expect(response.reasonPhrase, 'OK'); + expect(response.request!.method, 'GET'); + expect(response.statusCode, 200); }, skip: canStreamResponseBody ? false : 'does not stream response bodies'); }); } diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart index 27b52c85ad..dd8af88697 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart @@ -36,6 +36,10 @@ void testResponseBody(Client client, expect(response.bodyBytes, message.codeUnits); expect(response.contentLength, message.length); expect(response.headers['content-type'], 'text/plain'); + expect(response.isRedirect, isFalse); + expect(response.reasonPhrase, 'OK'); + expect(response.request!.method, 'GET'); + expect(response.statusCode, 200); }); test('small response streamed without content length', () async { @@ -51,6 +55,10 @@ void testResponseBody(Client client, expect(response.contentLength, isIn([null, 12])); } expect(response.headers['content-type'], 'text/plain'); + expect(response.isRedirect, isFalse); + expect(response.reasonPhrase, 'OK'); + expect(response.request!.method, 'GET'); + expect(response.statusCode, 200); }); }); } From 1a61464a66d92aa8700844d4003de6d818c1c720 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 7 Sep 2022 12:11:57 -0700 Subject: [PATCH 170/448] Bump to latest mono_repo, use new pubspec feature (#787) --- .github/workflows/dart.yml | 108 ++++++++++-------- pkgs/http/mono_pkg.yaml | 2 +- .../mono_pkg.yaml | 2 +- tool/ci.sh | 2 +- 4 files changed, 65 insertions(+), 49 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 1ccc6edbac..3e2d8686ac 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.3.0 +# Created with package:mono_repo v6.4.0 name: Dart CI on: push: @@ -21,20 +21,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 + uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" restore-keys: | os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - name: Setup Dart SDK + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: stable - id: checkout - uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 + name: Checkout repository + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - name: mono_repo self validate - run: dart pub global activate mono_repo 6.3.0 + run: dart pub global activate mono_repo 6.4.0 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: @@ -42,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 + uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" @@ -51,35 +53,37 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - name: Setup Dart SDK + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: "2.14.0" - id: checkout - uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 + name: Checkout repository + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: pkgs/http - run: dart pub upgrade - name: "pkgs/http; dart analyze --fatal-infos" + run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http - run: dart analyze --fatal-infos - id: pkgs_http_client_conformance_tests_pub_upgrade name: pkgs/http_client_conformance_tests; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests - run: dart pub upgrade - name: "pkgs/http_client_conformance_tests; dart analyze --fatal-infos" + run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests - run: dart analyze --fatal-infos job_003: name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 + uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" @@ -88,35 +92,37 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - name: Setup Dart SDK + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout - uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 + name: Checkout repository + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: pkgs/http - run: dart pub upgrade - name: "pkgs/http; dart analyze --fatal-infos" + run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http - run: dart analyze --fatal-infos - id: pkgs_http_client_conformance_tests_pub_upgrade name: pkgs/http_client_conformance_tests; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests - run: dart pub upgrade - name: "pkgs/http_client_conformance_tests; dart analyze --fatal-infos" + run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests - run: dart analyze --fatal-infos job_004: name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 + uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:format" @@ -125,35 +131,37 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - name: Setup Dart SDK + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout - uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 + name: Checkout repository + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: pkgs/http - run: dart pub upgrade - name: "pkgs/http; dart format --output=none --set-exit-if-changed ." + run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http - run: "dart format --output=none --set-exit-if-changed ." - id: pkgs_http_client_conformance_tests_pub_upgrade name: pkgs/http_client_conformance_tests; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests - run: dart pub upgrade - name: "pkgs/http_client_conformance_tests; dart format --output=none --set-exit-if-changed ." + run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests - run: "dart format --output=none --set-exit-if-changed ." job_005: name: "unit_test; Dart 2.14.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 + uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_1" @@ -162,20 +170,22 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - name: Setup Dart SDK + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: "2.14.0" - id: checkout - uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 + name: Checkout repository + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: pkgs/http - run: dart pub upgrade - name: "pkgs/http; dart test --platform chrome" + run: dart test --platform chrome if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http - run: dart test --platform chrome needs: - job_001 - job_002 @@ -186,7 +196,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 + uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_0" @@ -195,20 +205,22 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - name: Setup Dart SDK + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: "2.14.0" - id: checkout - uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 + name: Checkout repository + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: pkgs/http - run: dart pub upgrade - name: "pkgs/http; dart test --platform vm" + run: dart test --platform vm if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http - run: dart test --platform vm needs: - job_001 - job_002 @@ -219,7 +231,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 + uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_1" @@ -228,20 +240,22 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - name: Setup Dart SDK + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout - uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 + name: Checkout repository + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: pkgs/http - run: dart pub upgrade - name: "pkgs/http; dart test --platform chrome" + run: dart test --platform chrome if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http - run: dart test --platform chrome needs: - job_001 - job_002 @@ -252,7 +266,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@4504faf7e9bcf8f3ed0bc863c4e1d21499ab8ef8 + uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_0" @@ -261,20 +275,22 @@ jobs: os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - name: Setup Dart SDK + uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: dev - id: checkout - uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 + name: Checkout repository + uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade + run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: pkgs/http - run: dart pub upgrade - name: "pkgs/http; dart test --platform vm" + run: dart test --platform vm if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http - run: dart test --platform vm needs: - job_001 - job_002 diff --git a/pkgs/http/mono_pkg.yaml b/pkgs/http/mono_pkg.yaml index 8b6b5d1cb9..32c0a7e15f 100644 --- a/pkgs/http/mono_pkg.yaml +++ b/pkgs/http/mono_pkg.yaml @@ -1,5 +1,5 @@ sdk: -- 2.14.0 +- pubspec - dev stages: diff --git a/pkgs/http_client_conformance_tests/mono_pkg.yaml b/pkgs/http_client_conformance_tests/mono_pkg.yaml index 6a18a15c47..16e4e7a5f3 100644 --- a/pkgs/http_client_conformance_tests/mono_pkg.yaml +++ b/pkgs/http_client_conformance_tests/mono_pkg.yaml @@ -1,5 +1,5 @@ sdk: -- 2.14.0 +- pubspec - dev stages: diff --git a/tool/ci.sh b/tool/ci.sh index 0edee24259..068969de7f 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.3.0 +# Created with package:mono_repo v6.4.0 # Support built in commands on windows out of the box. # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") From 10dc7bfcce9152ed59e842e4dc18670503593c04 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 7 Sep 2022 12:42:13 -0700 Subject: [PATCH 171/448] Cleanup analysis_options (remove duplicate entries from pkg:lints) (#788) Enable and fix use_super_parameters --- analysis_options.yaml | 69 +---------------------- pkgs/cronet_http/example/lib/main.dart | 6 +- pkgs/cupertino_http/example/lib/main.dart | 6 +- 3 files changed, 7 insertions(+), 74 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index fc222d4fc2..7a2d382d28 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -8,105 +8,38 @@ analyzer: linter: rules: - - annotate_overrides - avoid_bool_literals_in_conditional_expressions - avoid_catching_errors - avoid_classes_with_only_static_members - avoid_dynamic_calls - - avoid_empty_else - - avoid_function_literals_in_foreach_calls - - avoid_init_to_null - - avoid_null_checks_in_equality_operators - avoid_private_typedef_functions - avoid_redundant_argument_values - - avoid_relative_lib_imports - - avoid_renaming_method_parameters - - avoid_return_types_on_setters - - avoid_returning_null_for_void - avoid_returning_this - - avoid_shadowing_type_parameters - - avoid_single_cascade_in_expression_statements - - avoid_types_as_parameter_names - avoid_unused_constructor_parameters - - await_only_futures - - camel_case_types - cascade_invocations - comment_references - - constant_identifier_names - - control_flow_in_finally - - curly_braces_in_flow_control_structures - directives_ordering - - empty_catches - - empty_constructor_bodies - - empty_statements - - file_names - - hash_and_equals - - implementation_imports - - iterable_contains_unrelated_type - join_return_with_assignment - - library_names - - library_prefixes - lines_longer_than_80_chars - - list_remove_unrelated_type - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - - no_duplicate_case_values - no_runtimeType_toString - - non_constant_identifier_names - - null_closures - omit_local_variable_types - only_throw_errors - - overridden_fields - - package_names - - package_prefixed_library_names - - prefer_adjacent_string_concatenation - prefer_asserts_in_initializer_lists - - prefer_collection_literals - - prefer_conditional_assignment - prefer_const_constructors - prefer_const_declarations - - prefer_contains - - prefer_equal_for_default_values - prefer_expression_function_bodies - - prefer_final_fields - #- prefer_final_locals - - prefer_function_declarations_over_variables - - prefer_generic_function_type_aliases - - prefer_initializing_formals - - prefer_inlined_adds - - prefer_interpolation_to_compose_strings - - prefer_is_empty - - prefer_is_not_empty - - prefer_is_not_operator - - prefer_null_aware_operators - prefer_relative_imports - prefer_single_quotes - - prefer_typing_uninitialized_variables - - prefer_void_to_null - - provide_deprecation_message - - recursive_getters - - slash_for_doc_comments - sort_pub_dependencies - test_types_in_equals - throw_in_finally - type_annotate_public_apis - - type_init_formals - unawaited_futures - - unnecessary_brace_in_string_interps - - unnecessary_const - - unnecessary_getters_setters - unnecessary_lambdas - - unnecessary_new - - unnecessary_null_aware_assignments - - unnecessary_null_in_if_null_operators - - unnecessary_overrides - unnecessary_parenthesis - unnecessary_statements - - unnecessary_string_interpolations - - unnecessary_this - - unrelated_type_equality_checks - use_is_even_rather_than_modulo - - use_rethrow_when_possible - use_string_buffers - - valid_regexps - - void_checks + - use_super_parameters diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 6931cf92fd..3449030d62 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -21,7 +21,7 @@ void main() { } class BookSearchApp extends StatelessWidget { - const BookSearchApp({Key? key}) : super(key: key); + const BookSearchApp({super.key}); @override Widget build(BuildContext context) => const MaterialApp( @@ -33,7 +33,7 @@ class BookSearchApp extends StatelessWidget { } class HomePage extends StatefulWidget { - const HomePage({Key? key}) : super(key: key); + const HomePage({super.key}); @override State createState() => _HomePageState(); @@ -109,7 +109,7 @@ class _HomePageState extends State { class BookList extends StatefulWidget { final List books; - const BookList(this.books, {Key? key}) : super(key: key); + const BookList(this.books, {super.key}); @override State createState() => _BookListState(); diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index f9823f6747..ee873c6fc6 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -20,7 +20,7 @@ void main() { } class BookSearchApp extends StatelessWidget { - const BookSearchApp({Key? key}) : super(key: key); + const BookSearchApp({super.key}); @override Widget build(BuildContext context) => const MaterialApp( @@ -32,7 +32,7 @@ class BookSearchApp extends StatelessWidget { } class HomePage extends StatefulWidget { - const HomePage({Key? key}) : super(key: key); + const HomePage({super.key}); @override State createState() => _HomePageState(); @@ -108,7 +108,7 @@ class _HomePageState extends State { class BookList extends StatefulWidget { final List books; - const BookList(this.books, {Key? key}) : super(key: key); + const BookList(this.books, {super.key}); @override State createState() => _BookListState(); From cc06eb1494851d5e95c80e2872289cf9cb13ce8f Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 7 Sep 2022 14:28:45 -0700 Subject: [PATCH 172/448] Update pubspec.yaml version is preparation for publishing (#786) --- pkgs/cronet_http/pubspec.yaml | 2 +- pkgs/cupertino_http/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index d236d9eac4..65ad04e201 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.0.1 +version: 0.0.2 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 5a6fc6cfe8..ddb2d512b6 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.0.4 +version: 0.0.5 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: From 866c60f7e2d2468c2921bd13a09ed25d1d51f1a1 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 13 Sep 2022 09:37:14 -0700 Subject: [PATCH 173/448] Add the ability to configure the max connections to a host. (#790) --- pkgs/cupertino_http/CHANGELOG.md | 5 +++++ .../url_session_configuration_test.dart | 6 ++++++ pkgs/cupertino_http/lib/cupertino_http.dart | 10 ++++++++++ pkgs/cupertino_http/pubspec.yaml | 2 +- 4 files changed, 22 insertions(+), 1 deletion(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 38d1bafd62..fa3828fe8e 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.0.6 + +* Make the number of simulateous connections allowed to the same host + configurable. + ## 0.0.5 * Add the ability to set network service type. diff --git a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart index 0b9e17823f..85386bcd90 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart @@ -42,6 +42,12 @@ void testProperties(URLSessionConfiguration config) { expect(config.httpCookieAcceptPolicy, HTTPCookieAcceptPolicy.httpCookieAcceptPolicyNever); }); + test('httpMaximumConnectionsPerHost', () { + config.httpMaximumConnectionsPerHost = 6; + expect(config.httpMaximumConnectionsPerHost, 6); + config.httpMaximumConnectionsPerHost = 23; + expect(config.httpMaximumConnectionsPerHost, 23); + }); test('httpShouldSetCookies', () { config.httpShouldSetCookies = true; expect(config.httpShouldSetCookies, true); diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 4453bb5318..3f80b503ba 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -214,6 +214,15 @@ class URLSessionConfiguration set httpCookieAcceptPolicy(HTTPCookieAcceptPolicy value) => _nsObject.HTTPCookieAcceptPolicy = value.index; + // The maximun number of connections that a URLSession can have open to the + // same host. + // + // See [NSURLSessionConfiguration.HTTPMaximumConnectionsPerHost](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1407597-httpmaximumconnectionsperhost). + int get httpMaximumConnectionsPerHost => + _nsObject.HTTPMaximumConnectionsPerHost; + set httpMaximumConnectionsPerHost(int value) => + _nsObject.HTTPMaximumConnectionsPerHost = value; + /// Whether requests should include cookies from the cookie store. /// /// See [NSURLSessionConfiguration.HTTPShouldSetCookies](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411589-httpshouldsetcookies) @@ -296,6 +305,7 @@ class URLSessionConfiguration 'discretionary=$discretionary ' 'httpCookieAcceptPolicy=$httpCookieAcceptPolicy ' 'httpShouldSetCookies=$httpShouldSetCookies ' + 'httpMaximumConnectionsPerHost=$httpMaximumConnectionsPerHost ' 'httpShouldUsePipelining=$httpShouldUsePipelining ' 'requestCachePolicy=$requestCachePolicy ' 'sessionSendsLaunchEvents=$sessionSendsLaunchEvents ' diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index ddb2d512b6..23dcedceba 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.0.5 +version: 0.0.6 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: From d98a0ba9bf031b321d68537440ff3d9d9096c6e4 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 13 Sep 2022 16:28:16 -0700 Subject: [PATCH 174/448] Only allow one delegate method to be called at once. (#791) --- pkgs/cupertino_http/CHANGELOG.md | 2 + pkgs/cupertino_http/lib/cupertino_http.dart | 54 ++++++++++++--------- 2 files changed, 34 insertions(+), 22 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index fa3828fe8e..2c1527dffa 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -2,6 +2,8 @@ * Make the number of simulateous connections allowed to the same host configurable. +* Fixes + [cupertino_http: Failure calling Dart_PostCObject_DL](https://github.com/dart-lang/http/issues/785). ## 0.0.5 diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 3f80b503ba..3df4a94522 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -917,28 +917,38 @@ class URLSession extends _ObjectHolder { /// /// See [sessionWithConfiguration:delegate:delegateQueue:](https://developer.apple.com/documentation/foundation/nsurlsession/1411597-sessionwithconfiguration) factory URLSession.sessionWithConfiguration(URLSessionConfiguration config, - {URLRequest? Function(URLSession session, URLSessionTask task, - HTTPURLResponse response, URLRequest newRequest)? - onRedirect, - URLSessionResponseDisposition Function(URLSession session, - URLSessionTask task, URLResponse response)? - onResponse, - void Function(URLSession session, URLSessionTask task, Data error)? - onData, - void Function( - URLSession session, URLSessionDownloadTask task, Uri uri)? - onFinishedDownloading, - void Function(URLSession session, URLSessionTask task, Error? error)? - onComplete}) => - URLSession._( - ncb.NSURLSession.sessionWithConfiguration_delegate_delegateQueue_( - linkedLibs, config._nsObject, _delegate, null), - onRedirect: onRedirect, - onResponse: onResponse, - onData: onData, - onFinishedDownloading: onFinishedDownloading, - onComplete: onComplete); - + {URLRequest? Function(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest newRequest)? + onRedirect, + URLSessionResponseDisposition Function( + URLSession session, URLSessionTask task, URLResponse response)? + onResponse, + void Function(URLSession session, URLSessionTask task, Data error)? + onData, + void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? + onFinishedDownloading, + void Function(URLSession session, URLSessionTask task, Error? error)? + onComplete}) { + // Avoid the complexity of simultaneous or out-of-order delegate callbacks + // by only allowing callbacks to execute sequentially. + // See https://developer.apple.com/forums/thread/47252 + // NOTE: this is likely to reduce throughput when there are multiple + // requests in flight because each call to a delegate waits on a lock + // that is unlocked by Dart code. + final queue = ncb.NSOperationQueue.new1(linkedLibs) + ..maxConcurrentOperationCount = 1 + ..name = + 'cupertino_http.NSURLSessionDelegateQueue'.toNSString(linkedLibs); + + return URLSession._( + ncb.NSURLSession.sessionWithConfiguration_delegate_delegateQueue_( + linkedLibs, config._nsObject, _delegate, queue), + onRedirect: onRedirect, + onResponse: onResponse, + onData: onData, + onFinishedDownloading: onFinishedDownloading, + onComplete: onComplete); + } // A **copy** of the configuration for this sesion. // // See [NSURLSession.configuration](https://developer.apple.com/documentation/foundation/nsurlsession/1411477-configuration) From 2ed98e6a9aa8dfbb917d81827fb6bdc39b5b6d65 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 14 Sep 2022 11:31:52 -0700 Subject: [PATCH 175/448] Update ffi dependency (#793) --- pkgs/cupertino_http/CHANGELOG.md | 4 ++++ pkgs/cupertino_http/pubspec.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 2c1527dffa..bd40b949e4 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.7 + +* Upgrade `ffi` dependency. + ## 0.0.6 * Make the number of simulateous connections allowed to the same host diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 23dcedceba..709f756b43 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.0.6 +version: 0.0.7 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: @@ -10,7 +10,7 @@ environment: flutter: ">=3.0.0" dependencies: - ffi: ^1.2.1 + ffi: ^2.0.1 flutter: sdk: flutter http: ^0.13.4 From 49a33efd7df163c0edf4daef7804a1bb0e179084 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 14 Sep 2022 13:12:25 -0700 Subject: [PATCH 176/448] Update issue templates (#794) --- ...ge-cronet_http---i-d-like-a-new-feature.md | 11 ++++++ .../package-cronet_http---i-found-a-bug.md | 10 +++++ ...cupertino_http---i-d-like-a-new-feature.md | 11 ++++++ .../package-cupertino_http---i-found-a-bug.md | 10 +++++ .../package-http---failing-connection.md | 37 +++++++++++++++++++ .../package-http---i-d-like-a-new-feature.md | 11 ++++++ .../package-http---i-found-a-bug.md | 15 ++++++++ 7 files changed, 105 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/package-cronet_http---i-d-like-a-new-feature.md create mode 100644 .github/ISSUE_TEMPLATE/package-cronet_http---i-found-a-bug.md create mode 100644 .github/ISSUE_TEMPLATE/package-cupertino_http---i-d-like-a-new-feature.md create mode 100644 .github/ISSUE_TEMPLATE/package-cupertino_http---i-found-a-bug.md create mode 100644 .github/ISSUE_TEMPLATE/package-http---failing-connection.md create mode 100644 .github/ISSUE_TEMPLATE/package-http---i-d-like-a-new-feature.md create mode 100644 .github/ISSUE_TEMPLATE/package-http---i-found-a-bug.md diff --git a/.github/ISSUE_TEMPLATE/package-cronet_http---i-d-like-a-new-feature.md b/.github/ISSUE_TEMPLATE/package-cronet_http---i-d-like-a-new-feature.md new file mode 100644 index 0000000000..f516072afe --- /dev/null +++ b/.github/ISSUE_TEMPLATE/package-cronet_http---i-d-like-a-new-feature.md @@ -0,0 +1,11 @@ +--- +name: package:cronet_http - I'd like a new feature +about: You are using package:cronet_http and would like a new feature to make it easier + to make http requests. +title: '' +labels: package:cronet_http, type-enhancement +assignees: brianquinlan + +--- + + diff --git a/.github/ISSUE_TEMPLATE/package-cronet_http---i-found-a-bug.md b/.github/ISSUE_TEMPLATE/package-cronet_http---i-found-a-bug.md new file mode 100644 index 0000000000..2eae2e92c7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/package-cronet_http---i-found-a-bug.md @@ -0,0 +1,10 @@ +--- +name: package:cronet_http - I found a bug +about: You found that something which is expected to work, doesn't. +title: '' +labels: package:cronet_http, type-bug +assignees: brianquinlan + +--- + + diff --git a/.github/ISSUE_TEMPLATE/package-cupertino_http---i-d-like-a-new-feature.md b/.github/ISSUE_TEMPLATE/package-cupertino_http---i-d-like-a-new-feature.md new file mode 100644 index 0000000000..094e2420e1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/package-cupertino_http---i-d-like-a-new-feature.md @@ -0,0 +1,11 @@ +--- +name: package:cupertino_http - I'd like a new feature +about: You are using package:cupertino_http and would like a new feature to make it + easier to make http requests. +title: '' +labels: package:cupertino_http, type-enhancement +assignees: brianquinlan + +--- + + diff --git a/.github/ISSUE_TEMPLATE/package-cupertino_http---i-found-a-bug.md b/.github/ISSUE_TEMPLATE/package-cupertino_http---i-found-a-bug.md new file mode 100644 index 0000000000..911ef96ce3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/package-cupertino_http---i-found-a-bug.md @@ -0,0 +1,10 @@ +--- +name: package:cupertino_http - I found a bug +about: You found that something which is expected to work, doesn't. +title: '' +labels: package:cupertino_http, type-bug +assignees: brianquinlan + +--- + + diff --git a/.github/ISSUE_TEMPLATE/package-http---failing-connection.md b/.github/ISSUE_TEMPLATE/package-http---failing-connection.md new file mode 100644 index 0000000000..48355f76d9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/package-http---failing-connection.md @@ -0,0 +1,37 @@ +--- +name: package:http - Failing Connection +about: You are attempting to make a GET or POST and getting an unexpected exception + or status code. +title: '' +labels: package:http, type-bug +assignees: '' + +--- + +********************************************************** +**This is not the repository you want to file issues in!** +********************************************************** + +Note that a failing HTTP connection is almost certainly not caused by a bug in +package:http. + +This package is a wrapper around the HttpClient from dart:io and HttpRequest +from dart:html. Before filing a bug here verify that the issue is not surfaced +when using those interfaces directly. + +https://api.dart.dev/stable/dart-io/HttpClient-class.html +https://api.dart.dev/stable/dart-html/HttpRequest-class.html + +# Common problems: + +- A security policy prevents the connection. +- Running in an emulator that does not have outside internet access. +- Using Android and not requesting internet access in the manifest. + https://github.com/flutter/flutter/issues/29688 + +None of these problems are influenced by the code in this repo. + +# Diagnosing: + +- Attempt the request outside of Dart, for instance in a browser or with `curl`. +- Attempt the request with the dart:io or dart:html equivalent code paths. diff --git a/.github/ISSUE_TEMPLATE/package-http---i-d-like-a-new-feature.md b/.github/ISSUE_TEMPLATE/package-http---i-d-like-a-new-feature.md new file mode 100644 index 0000000000..417370572d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/package-http---i-d-like-a-new-feature.md @@ -0,0 +1,11 @@ +--- +name: package:http - I'd like a new feature +about: You are using package:http and would like a new feature to make it easier + to make http requests. +title: '' +labels: package:http, type-enhancement +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/package-http---i-found-a-bug.md b/.github/ISSUE_TEMPLATE/package-http---i-found-a-bug.md new file mode 100644 index 0000000000..7a87f7e7dd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/package-http---i-found-a-bug.md @@ -0,0 +1,15 @@ +--- +name: package:http - I found a bug +about: You found that something which is expected to work, doesn't. The same capability + works when using `dart:io` or `dart:html` directly. +title: '' +labels: package:http, type-bug +assignees: '' + +--- + +Please describe the bug and how to reproduce it. + +Note that if the bug can also be reproduced when going through the interfaces provided by `dart:html` or `dart:io` directly the bug should be filed against the Dart SDK: https://github.com/dart-lang/sdk/issues + +A failure to make an http request is more often a problem with the environment than with the client. From d459629821d864f1776fdbf0cebc480a707e5ec9 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 14 Sep 2022 14:13:16 -0700 Subject: [PATCH 177/448] Force issue templates into a logical order (#795) --- .../1--package-http---failing-connection.md | 37 +++++++++++++++++++ .../2--package-http---i-found-a-bug.md | 15 ++++++++ ...--package-http---i-d-like-a-new-feature.md | 11 ++++++ .../4--package-cronet_http---i-found-a-bug.md | 10 +++++ ...ge-cronet_http---i-d-like-a-new-feature.md | 11 ++++++ ...-package-cupertino_http---i-found-a-bug.md | 10 +++++ ...cupertino_http---i-d-like-a-new-feature.md | 11 ++++++ 7 files changed, 105 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/1--package-http---failing-connection.md create mode 100644 .github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md create mode 100644 .github/ISSUE_TEMPLATE/3--package-http---i-d-like-a-new-feature.md create mode 100644 .github/ISSUE_TEMPLATE/4--package-cronet_http---i-found-a-bug.md create mode 100644 .github/ISSUE_TEMPLATE/5--package-cronet_http---i-d-like-a-new-feature.md create mode 100644 .github/ISSUE_TEMPLATE/6--package-cupertino_http---i-found-a-bug.md create mode 100644 .github/ISSUE_TEMPLATE/7--package-cupertino_http---i-d-like-a-new-feature.md diff --git a/.github/ISSUE_TEMPLATE/1--package-http---failing-connection.md b/.github/ISSUE_TEMPLATE/1--package-http---failing-connection.md new file mode 100644 index 0000000000..643f85d534 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1--package-http---failing-connection.md @@ -0,0 +1,37 @@ +--- +name: 1) package:http - Failing Connection +about: You are attempting to make a GET or POST and getting an unexpected exception + or status code. +title: '' +labels: package:http, type-bug +assignees: '' + +--- + +********************************************************** +**This is not the repository you want to file issues in!** +********************************************************** + +Note that a failing HTTP connection is almost certainly not caused by a bug in +package:http. + +This package is a wrapper around the HttpClient from dart:io and HttpRequest +from dart:html. Before filing a bug here verify that the issue is not surfaced +when using those interfaces directly. + +https://api.dart.dev/stable/dart-io/HttpClient-class.html +https://api.dart.dev/stable/dart-html/HttpRequest-class.html + +# Common problems: + +- A security policy prevents the connection. +- Running in an emulator that does not have outside internet access. +- Using Android and not requesting internet access in the manifest. + https://github.com/flutter/flutter/issues/29688 + +None of these problems are influenced by the code in this repo. + +# Diagnosing: + +- Attempt the request outside of Dart, for instance in a browser or with `curl`. +- Attempt the request with the dart:io or dart:html equivalent code paths. diff --git a/.github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md b/.github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md new file mode 100644 index 0000000000..36877b515c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md @@ -0,0 +1,15 @@ +--- +name: 2) package:http - I found a bug +about: You found that something which is expected to work, doesn't. The same capability + works when using `dart:io` or `dart:html` directly. +title: '' +labels: package:http, type-bug +assignees: '' + +--- + +Please describe the bug and how to reproduce it. + +Note that if the bug can also be reproduced when going through the interfaces provided by `dart:html` or `dart:io` directly the bug should be filed against the Dart SDK: https://github.com/dart-lang/sdk/issues + +A failure to make an http request is more often a problem with the environment than with the client. diff --git a/.github/ISSUE_TEMPLATE/3--package-http---i-d-like-a-new-feature.md b/.github/ISSUE_TEMPLATE/3--package-http---i-d-like-a-new-feature.md new file mode 100644 index 0000000000..db3cba282a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/3--package-http---i-d-like-a-new-feature.md @@ -0,0 +1,11 @@ +--- +name: 3) package:http - I'd like a new feature +about: You are using package:http and would like a new feature to make it easier + to make http requests. +title: '' +labels: package:http, type-enhancement +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/4--package-cronet_http---i-found-a-bug.md b/.github/ISSUE_TEMPLATE/4--package-cronet_http---i-found-a-bug.md new file mode 100644 index 0000000000..806097473a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/4--package-cronet_http---i-found-a-bug.md @@ -0,0 +1,10 @@ +--- +name: 4) package:cronet_http - I found a bug +about: You found that something which is expected to work, doesn't. +title: '' +labels: package:cronet_http, type-bug +assignees: brianquinlan + +--- + + diff --git a/.github/ISSUE_TEMPLATE/5--package-cronet_http---i-d-like-a-new-feature.md b/.github/ISSUE_TEMPLATE/5--package-cronet_http---i-d-like-a-new-feature.md new file mode 100644 index 0000000000..fdd3ce9343 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/5--package-cronet_http---i-d-like-a-new-feature.md @@ -0,0 +1,11 @@ +--- +name: 5) package:cronet_http - I'd like a new feature +about: You are using package:cronet_http and would like a new feature to make it easier + to make http requests. +title: '' +labels: package:cronet_http, type-enhancement +assignees: brianquinlan + +--- + + diff --git a/.github/ISSUE_TEMPLATE/6--package-cupertino_http---i-found-a-bug.md b/.github/ISSUE_TEMPLATE/6--package-cupertino_http---i-found-a-bug.md new file mode 100644 index 0000000000..5ca9387b90 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/6--package-cupertino_http---i-found-a-bug.md @@ -0,0 +1,10 @@ +--- +name: 6) package:cupertino_http - I found a bug +about: You found that something which is expected to work, doesn't. +title: '' +labels: package:cupertino_http, type-bug +assignees: brianquinlan + +--- + + diff --git a/.github/ISSUE_TEMPLATE/7--package-cupertino_http---i-d-like-a-new-feature.md b/.github/ISSUE_TEMPLATE/7--package-cupertino_http---i-d-like-a-new-feature.md new file mode 100644 index 0000000000..1d90495660 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/7--package-cupertino_http---i-d-like-a-new-feature.md @@ -0,0 +1,11 @@ +--- +name: 7) package:cupertino_http - I'd like a new feature +about: You are using package:cupertino_http and would like a new feature to make it + easier to make http requests. +title: '' +labels: package:cupertino_http, type-enhancement +assignees: brianquinlan + +--- + + From 4391905f28de12d3ce90f84824af33affc69ca5d Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 14 Sep 2022 14:20:16 -0700 Subject: [PATCH 178/448] Remove old issue templates (round 1) (#797) --- ...ge-cronet_http---i-d-like-a-new-feature.md | 11 ------ .../package-cronet_http---i-found-a-bug.md | 10 ----- ...cupertino_http---i-d-like-a-new-feature.md | 11 ------ .../package-cupertino_http---i-found-a-bug.md | 10 ----- .../package-http---failing-connection.md | 37 ------------------- .../package-http---i-d-like-a-new-feature.md | 11 ------ .../package-http---i-found-a-bug.md | 15 -------- 7 files changed, 105 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/package-cronet_http---i-d-like-a-new-feature.md delete mode 100644 .github/ISSUE_TEMPLATE/package-cronet_http---i-found-a-bug.md delete mode 100644 .github/ISSUE_TEMPLATE/package-cupertino_http---i-d-like-a-new-feature.md delete mode 100644 .github/ISSUE_TEMPLATE/package-cupertino_http---i-found-a-bug.md delete mode 100644 .github/ISSUE_TEMPLATE/package-http---failing-connection.md delete mode 100644 .github/ISSUE_TEMPLATE/package-http---i-d-like-a-new-feature.md delete mode 100644 .github/ISSUE_TEMPLATE/package-http---i-found-a-bug.md diff --git a/.github/ISSUE_TEMPLATE/package-cronet_http---i-d-like-a-new-feature.md b/.github/ISSUE_TEMPLATE/package-cronet_http---i-d-like-a-new-feature.md deleted file mode 100644 index f516072afe..0000000000 --- a/.github/ISSUE_TEMPLATE/package-cronet_http---i-d-like-a-new-feature.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: package:cronet_http - I'd like a new feature -about: You are using package:cronet_http and would like a new feature to make it easier - to make http requests. -title: '' -labels: package:cronet_http, type-enhancement -assignees: brianquinlan - ---- - - diff --git a/.github/ISSUE_TEMPLATE/package-cronet_http---i-found-a-bug.md b/.github/ISSUE_TEMPLATE/package-cronet_http---i-found-a-bug.md deleted file mode 100644 index 2eae2e92c7..0000000000 --- a/.github/ISSUE_TEMPLATE/package-cronet_http---i-found-a-bug.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: package:cronet_http - I found a bug -about: You found that something which is expected to work, doesn't. -title: '' -labels: package:cronet_http, type-bug -assignees: brianquinlan - ---- - - diff --git a/.github/ISSUE_TEMPLATE/package-cupertino_http---i-d-like-a-new-feature.md b/.github/ISSUE_TEMPLATE/package-cupertino_http---i-d-like-a-new-feature.md deleted file mode 100644 index 094e2420e1..0000000000 --- a/.github/ISSUE_TEMPLATE/package-cupertino_http---i-d-like-a-new-feature.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: package:cupertino_http - I'd like a new feature -about: You are using package:cupertino_http and would like a new feature to make it - easier to make http requests. -title: '' -labels: package:cupertino_http, type-enhancement -assignees: brianquinlan - ---- - - diff --git a/.github/ISSUE_TEMPLATE/package-cupertino_http---i-found-a-bug.md b/.github/ISSUE_TEMPLATE/package-cupertino_http---i-found-a-bug.md deleted file mode 100644 index 911ef96ce3..0000000000 --- a/.github/ISSUE_TEMPLATE/package-cupertino_http---i-found-a-bug.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: package:cupertino_http - I found a bug -about: You found that something which is expected to work, doesn't. -title: '' -labels: package:cupertino_http, type-bug -assignees: brianquinlan - ---- - - diff --git a/.github/ISSUE_TEMPLATE/package-http---failing-connection.md b/.github/ISSUE_TEMPLATE/package-http---failing-connection.md deleted file mode 100644 index 48355f76d9..0000000000 --- a/.github/ISSUE_TEMPLATE/package-http---failing-connection.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -name: package:http - Failing Connection -about: You are attempting to make a GET or POST and getting an unexpected exception - or status code. -title: '' -labels: package:http, type-bug -assignees: '' - ---- - -********************************************************** -**This is not the repository you want to file issues in!** -********************************************************** - -Note that a failing HTTP connection is almost certainly not caused by a bug in -package:http. - -This package is a wrapper around the HttpClient from dart:io and HttpRequest -from dart:html. Before filing a bug here verify that the issue is not surfaced -when using those interfaces directly. - -https://api.dart.dev/stable/dart-io/HttpClient-class.html -https://api.dart.dev/stable/dart-html/HttpRequest-class.html - -# Common problems: - -- A security policy prevents the connection. -- Running in an emulator that does not have outside internet access. -- Using Android and not requesting internet access in the manifest. - https://github.com/flutter/flutter/issues/29688 - -None of these problems are influenced by the code in this repo. - -# Diagnosing: - -- Attempt the request outside of Dart, for instance in a browser or with `curl`. -- Attempt the request with the dart:io or dart:html equivalent code paths. diff --git a/.github/ISSUE_TEMPLATE/package-http---i-d-like-a-new-feature.md b/.github/ISSUE_TEMPLATE/package-http---i-d-like-a-new-feature.md deleted file mode 100644 index 417370572d..0000000000 --- a/.github/ISSUE_TEMPLATE/package-http---i-d-like-a-new-feature.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: package:http - I'd like a new feature -about: You are using package:http and would like a new feature to make it easier - to make http requests. -title: '' -labels: package:http, type-enhancement -assignees: '' - ---- - - diff --git a/.github/ISSUE_TEMPLATE/package-http---i-found-a-bug.md b/.github/ISSUE_TEMPLATE/package-http---i-found-a-bug.md deleted file mode 100644 index 7a87f7e7dd..0000000000 --- a/.github/ISSUE_TEMPLATE/package-http---i-found-a-bug.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: package:http - I found a bug -about: You found that something which is expected to work, doesn't. The same capability - works when using `dart:io` or `dart:html` directly. -title: '' -labels: package:http, type-bug -assignees: '' - ---- - -Please describe the bug and how to reproduce it. - -Note that if the bug can also be reproduced when going through the interfaces provided by `dart:html` or `dart:io` directly the bug should be filed against the Dart SDK: https://github.com/dart-lang/sdk/issues - -A failure to make an http request is more often a problem with the environment than with the client. From 5dedddd67d0bca557c353fd34db856d239389b76 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 14 Sep 2022 14:39:50 -0700 Subject: [PATCH 179/448] Remove obsolete github issues templates. (#798) --- .../ISSUE_TEMPLATE/1-FAILING_CONNECTION.md | 35 ------------------- .github/ISSUE_TEMPLATE/2-BUG_REPORT.md | 17 --------- .github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md | 18 ---------- .../4-CUPERTINO_HTTP_BUG_REPORT.md | 12 ------- .../5-CUPERTINO_HTTP_REQUEST.md | 11 ------ 5 files changed, 93 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md delete mode 100644 .github/ISSUE_TEMPLATE/2-BUG_REPORT.md delete mode 100644 .github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md delete mode 100644 .github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md delete mode 100644 .github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md diff --git a/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md b/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md deleted file mode 100644 index 5ca1fe6816..0000000000 --- a/.github/ISSUE_TEMPLATE/1-FAILING_CONNECTION.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: `package:http` - An HTTP request fails when made through this client. -about: You are attempting to make a GET or POST and getting an unexpected - exception or status code. - ---- - -********************************************************** -**This is not the repository you want to file issues in!** -********************************************************** - -Note that a failing HTTP connection is almost certainly not caused by a bug in -package:http. - -This package is a wrapper around the HttpClient from dart:io and HttpRequest -from dart:html. Before filing a bug here verify that the issue is not surfaced -when using those interfaces directly. - -https://api.dart.dev/stable/dart-io/HttpClient-class.html -https://api.dart.dev/stable/dart-html/HttpRequest-class.html - -# Common problems: - -- A security policy prevents the connection. -- Running in an emulator that does not have outside internet access. -- Using Android and not requesting internet access in the manifest. - https://github.com/flutter/flutter/issues/29688 - - -None of these problems are influenced by the code in this repo. - -# Diagnosing: - -- Attempt the request outside of Dart, for instance in a browser or with `curl`. -- Attempt the request with the dart:io or dart:html equivalent code paths. diff --git a/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md b/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md deleted file mode 100644 index e57ca0ca6c..0000000000 --- a/.github/ISSUE_TEMPLATE/2-BUG_REPORT.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: `package:http` - I found a bug. -about: You found that something which is expected to work, doesn't. The same - capability works when using `dart:io` or `dart:html` directly. - ---- - - diff --git a/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md deleted file mode 100644 index 733bcd9d94..0000000000 --- a/.github/ISSUE_TEMPLATE/3-FEATURE_REQUEST.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: `package:http` - I'd like a new feature. -about: You are using `package:http` and would like a new feature to make it - easier to make http requests. - ---- - - diff --git a/.github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md b/.github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md deleted file mode 100644 index 2686bc616a..0000000000 --- a/.github/ISSUE_TEMPLATE/4-CUPERTINO_HTTP_BUG_REPORT.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: `package:cupertino_http` - I found a bug. -about: You found that something which is expected to work, doesn't. - ---- - - diff --git a/.github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md b/.github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md deleted file mode 100644 index fa1272459f..0000000000 --- a/.github/ISSUE_TEMPLATE/5-CUPERTINO_HTTP_REQUEST.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: `package:cupertino_http` - I'd like a new feature. -about: You are using `package:cupertino_http` and would like a new feature to - make it easier to make http requests. - ---- - - From 52ae355b03f7883d46586f48b877ac4e1d91d647 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 20 Sep 2022 09:55:17 -0700 Subject: [PATCH 180/448] http_client_conformance_tests: no plan to publish (#799) We can update this as needed. --- pkgs/http_client_conformance_tests/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index 9655aff279..ef5dc8f81b 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -1,8 +1,8 @@ name: http_client_conformance_tests -description: > +description: >- A library that tests whether implementations of package:http's `Client` class behave as expected. -version: 0.0.1-dev +publish_to: none repository: https://github.com/dart-lang/http/tree/master/pkgs/http_client_conformance_tests environment: From 27f479db7f318e398958325f0a889e02b3049b87 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 20 Sep 2022 16:47:38 -0700 Subject: [PATCH 181/448] Fix a bug where cronet_http did not set content-length correctly (#800) --- pkgs/cronet_http/CHANGELOG.md | 5 +++++ pkgs/cronet_http/lib/cronet_client.dart | 5 ++++- .../lib/src/response_body_server.dart | 7 ++++++- .../lib/src/response_body_streamed_test.dart | 1 + .../lib/src/response_body_tests.dart | 12 ++++++++++++ 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 8dcae55bac..2e4bfd09f3 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.0.3 + +* Fix + [contentLength property is not sent for streamed responses](https://github.com/dart-lang/http/issues/801) + ## 0.0.2 * Set `StreamedResponse.reasonPhrase` and `StreamedResponse.request`. diff --git a/pkgs/cronet_http/lib/cronet_client.dart b/pkgs/cronet_http/lib/cronet_client.dart index d57cefcf87..3a57b5e2fa 100644 --- a/pkgs/cronet_http/lib/cronet_client.dart +++ b/pkgs/cronet_http/lib/cronet_client.dart @@ -206,8 +206,11 @@ class CronetClient extends BaseClient { final responseHeaders = (result.headers.cast>()) .map((key, value) => MapEntry(key.toLowerCase(), value.join(','))); + final contentLengthHeader = responseHeaders['content-length']; return StreamedResponse(responseDataController.stream, result.statusCode, - contentLength: responseHeaders['content-lenght'] as int?, + contentLength: contentLengthHeader == null + ? null + : int.tryParse(contentLengthHeader), reasonPhrase: result.statusText, request: request, isRedirect: result.isRedirect, diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_server.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_server.dart index 238a4a17fa..396c9c93d5 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_server.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_server.dart @@ -17,10 +17,15 @@ import 'package:stream_channel/stream_channel.dart'; void hybridMain(StreamChannel channel) async { final server = (await HttpServer.bind('localhost', 0)) ..listen((request) async { + const message = 'Hello World!'; await request.drain(); request.response.headers.set('Access-Control-Allow-Origin', '*'); request.response.headers.set('Content-Type', 'text/plain'); - request.response.write('Hello World!'); + if (request.requestedUri.pathSegments.isNotEmpty && + request.requestedUri.pathSegments.last == 'length') { + request.response.contentLength = message.length; + } + request.response.write(message); await request.response.close(); }); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart index 0da8620bf0..28686fa553 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart @@ -40,6 +40,7 @@ void testResponseBodyStreamed(Client client, final request = Request('GET', Uri.http(host, '')); final response = await client.send(request); + expect(response.contentLength, null); var lastReceived = 0; await const LineSplitter() .bind(const Utf8Decoder().bind(response.stream)) diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart index dd8af88697..91ee549736 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart @@ -60,5 +60,17 @@ void testResponseBody(Client client, expect(response.request!.method, 'GET'); expect(response.statusCode, 200); }); + + test('small response streamed with content length', () async { + final request = Request('GET', Uri.http(host, 'length')); + final response = await client.send(request); + expect(await response.stream.bytesToString(), message); + expect(response.contentLength, 12); + expect(response.headers['content-type'], 'text/plain'); + expect(response.isRedirect, isFalse); + expect(response.reasonPhrase, 'OK'); + expect(response.request!.method, 'GET'); + expect(response.statusCode, 200); + }); }); } From b9485f7886edda0a195137b0fe171797a1f4bbba Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 20 Sep 2022 17:27:27 -0700 Subject: [PATCH 182/448] Increment cronet_http version (#803) --- pkgs/cronet_http/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 65ad04e201..eb13d45df2 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.0.2 +version: 0.0.3 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: From 9cb1a959162edd3878b2385f843b2ae3f854102c Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 31 Oct 2022 11:45:23 -0700 Subject: [PATCH 183/448] Add a streaming request example. (#813) --- pkgs/http/lib/src/streamed_request.dart | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/http/lib/src/streamed_request.dart b/pkgs/http/lib/src/streamed_request.dart index 7e94ef1386..faf3392d17 100644 --- a/pkgs/http/lib/src/streamed_request.dart +++ b/pkgs/http/lib/src/streamed_request.dart @@ -15,6 +15,16 @@ import 'byte_stream.dart'; /// whatever data has already been written to [StreamedRequest.sink] will be /// sent immediately. More data will be sent as soon as it's written to /// [StreamedRequest.sink], and when the sink is closed the request will end. +/// +/// For example: +/// ```dart +/// final request = http.StreamedRequest('POST', Uri.http('example.com', '')) +/// ..contentLength = 10 +/// ..sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) +/// ..sink.close(); // The sink must be closed to end the request. +/// +/// final response = await request.send(); +/// ``` class StreamedRequest extends BaseRequest { /// The sink to which to write data that will be sent as the request body. /// From 00f6e8ac265eb868b87758078664ee942a674de0 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 2 Nov 2022 10:00:31 -0700 Subject: [PATCH 184/448] Make timeout and cache controllable per-request. (#815) --- pkgs/cupertino_http/CHANGELOG.md | 4 +++ .../mutable_url_request_test.dart | 27 +++++++++++++++++++ .../integration_test/url_request_test.dart | 12 +++++++++ pkgs/cupertino_http/lib/cupertino_http.dart | 26 ++++++++++++++++++ pkgs/cupertino_http/pubspec.yaml | 2 +- 5 files changed, 70 insertions(+), 1 deletion(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index bd40b949e4..3c1c9e9932 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.8 + +* Make timeout and caching policy configurable on a per-request basis. + ## 0.0.7 * Upgrade `ffi` dependency. diff --git a/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart b/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart index b205271be5..56433afef6 100644 --- a/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart +++ b/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart @@ -11,6 +11,20 @@ import 'package:test/test.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + group('cachePolicy', () { + final uri = Uri.parse('http://www.example.com/foo?baz=3#bar'); + late MutableURLRequest request; + + setUp(() => request = MutableURLRequest.fromUrl(uri)); + + test('set', () { + request.cachePolicy = URLRequestCachePolicy.returnCacheDataDontLoad; + expect( + request.cachePolicy, URLRequestCachePolicy.returnCacheDataDontLoad); + request.toString(); // Just verify that there is no crash. + }); + }); + group('headers', () { final uri = Uri.parse('http://www.example.com/foo?baz=3#bar'); late MutableURLRequest request; @@ -58,4 +72,17 @@ void main() { request.toString(); // Just verify that there is no crash. }); }); + + group('timeoutInterval', () { + final uri = Uri.parse('http://www.example.com/foo?baz=3#bar'); + late MutableURLRequest request; + + setUp(() => request = MutableURLRequest.fromUrl(uri)); + + test('set', () { + request.timeoutInterval = const Duration(seconds: 23); + expect(request.timeoutInterval, const Duration(seconds: 23)); + request.toString(); // Just verify that there is no crash. + }); + }); } diff --git a/pkgs/cupertino_http/example/integration_test/url_request_test.dart b/pkgs/cupertino_http/example/integration_test/url_request_test.dart index 3a28c00094..86ce7e8007 100644 --- a/pkgs/cupertino_http/example/integration_test/url_request_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_request_test.dart @@ -17,6 +17,10 @@ void main() { expect(request.httpMethod, 'GET'); expect(request.allHttpHeaderFields, null); expect(request.httpBody, null); + + expect(request.timeoutInterval, const Duration(minutes: 1)); + expect(request.cachePolicy, URLRequestCachePolicy.useProtocolCachePolicy); + request.toString(); // Just verify that there is no crash. }); @@ -27,6 +31,10 @@ void main() { expect(request.httpMethod, 'GET'); expect(request.allHttpHeaderFields, null); expect(request.httpBody, null); + + expect(request.timeoutInterval, const Duration(minutes: 1)); + expect(request.cachePolicy, URLRequestCachePolicy.useProtocolCachePolicy); + request.toString(); // Just verify that there is no crash. }); @@ -37,6 +45,10 @@ void main() { expect(request.httpMethod, 'GET'); expect(request.allHttpHeaderFields, null); expect(request.httpBody, null); + + expect(request.timeoutInterval, const Duration(minutes: 1)); + expect(request.cachePolicy, URLRequestCachePolicy.useProtocolCachePolicy); + request.toString(); // Just verify that there is no crash. }); }); diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 3df4a94522..f8b3fbb2a5 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -594,6 +594,12 @@ class URLRequest extends _ObjectHolder { } } + // Controls how to deal with caching for the request. + // + // See [NSURLSession.cachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequest/1407944-cachepolicy) + URLRequestCachePolicy get cachePolicy => + URLRequestCachePolicy.values[_nsObject.cachePolicy]; + /// The body of the request. /// /// See [NSURLRequest.HTTPBody](https://developer.apple.com/documentation/foundation/nsurlrequest/1411317-httpbody) @@ -614,6 +620,13 @@ class URLRequest extends _ObjectHolder { /// an error. String get httpMethod => toStringOrNull(_nsObject.HTTPMethod)!; + /// The timeout interval during the connection attempt. + /// + /// See [NSURLSession.timeoutInterval](https://developer.apple.com/documentation/foundation/nsurlrequest/1418229-timeoutinterval) + Duration get timeoutInterval => Duration( + microseconds: + (_nsObject.timeoutInterval * Duration.microsecondsPerSecond).round()); + /// The requested URL. /// /// See [URLRequest.URL](https://developer.apple.com/documentation/foundation/nsurlrequest/1408996-url) @@ -630,8 +643,10 @@ class URLRequest extends _ObjectHolder { @override String toString() => '[URLRequest ' 'allHttpHeaderFields=$allHttpHeaderFields ' + 'cachePolicy=$cachePolicy ' 'httpBody=$httpBody ' 'httpMethod=$httpMethod ' + 'timeoutInterval=$timeoutInterval ' 'url=$url ' ']'; } @@ -656,6 +671,9 @@ class MutableURLRequest extends URLRequest { ncb.NSMutableURLRequest.requestWithURL_(linkedLibs, url)); } + set cachePolicy(URLRequestCachePolicy value) => + _mutableUrlRequest.cachePolicy = value.index; + set httpBody(Data? data) { _mutableUrlRequest.HTTPBody = data?._nsObject; } @@ -664,6 +682,11 @@ class MutableURLRequest extends URLRequest { _mutableUrlRequest.HTTPMethod = method.toNSString(linkedLibs); } + set timeoutInterval(Duration interval) { + _mutableUrlRequest.timeoutInterval = + interval.inMicroseconds.toDouble() / Duration.microsecondsPerSecond; + } + /// Set the value of a header field. /// /// See [NSMutableURLRequest setValue:forHTTPHeaderField:](https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1408793-setvalue) @@ -675,8 +698,11 @@ class MutableURLRequest extends URLRequest { @override String toString() => '[MutableURLRequest ' 'allHttpHeaderFields=$allHttpHeaderFields ' + 'cachePolicy=$cachePolicy ' 'httpBody=$httpBody ' 'httpMethod=$httpMethod ' + 'timeoutInterval=$timeoutInterval ' + 'url=$url ' ']'; } diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 709f756b43..9bccf6c517 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.0.7 +version: 0.0.8 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: From d85f5795199feedb0f0007dd59d14cbefd793506 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 10 Nov 2022 16:14:59 -0800 Subject: [PATCH 185/448] Add a more complete implementation for `URLSessionTask`. (#818) --- pkgs/cupertino_http/CHANGELOG.md | 15 +++ .../url_session_task_test.dart | 116 ++++++++++++++++- pkgs/cupertino_http/lib/cupertino_http.dart | 120 +++++++++++++++--- pkgs/cupertino_http/pubspec.yaml | 2 +- 4 files changed, 235 insertions(+), 18 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 3c1c9e9932..253ad7b602 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,18 @@ +## 0.0.9 + +* Add a more complete implementation for `URLSessionTask`: + * `priority` property - hint for host prioritization. + * `currentRequest` property - the current request for the task (will be + different than `originalRequest` in the face of redirects). + * `originalRequest` property - the original request for the task. + * `error` property - an `Error` object if the request failed. + * `taskDescription` property - a developer-set description of the task. + * `countOfBytesExpectedToSend` property - the size of the body bytes that + will be sent. + * `countOfBytesSent` property - the number of body bytes sent in the request. + * `prefersIncrementalDelivery` property - whether to deliver the response + body in one chunk (if possible) or many. + ## 0.0.8 * Make timeout and caching policy configurable on a per-request basis. diff --git a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart index 2f5550f00c..0c5c56b2ec 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart @@ -5,6 +5,7 @@ import 'dart:io'; import 'package:cupertino_http/cupertino_http.dart'; +import 'package:flutter/foundation.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; @@ -70,7 +71,13 @@ void testURLSessionTask( }); final session = URLSession.sharedSession(); task = session.dataTaskWithRequest( - URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) + MutableURLRequest.fromUrl( + Uri.parse('http://localhost:${server.port}/mypath')) + ..httpMethod = 'POST' + ..httpBody = Data.fromUint8List(Uint8List.fromList([1, 2, 3]))) + ..prefersIncrementalDelivery = false + ..priority = 0.2 + ..taskDescription = 'my task description' ..resume(); while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { @@ -83,10 +90,26 @@ void testURLSessionTask( server.close(); }); + test('priority', () async { + expect(task.priority, inInclusiveRange(0.19, 0.21)); + }); + + test('current request', () async { + expect(task.currentRequest!.url!.path, '/mypath'); + }); + + test('original request', () async { + expect(task.originalRequest!.url!.path, '/mypath'); + }); + test('has response', () async { expect(task.response, isA()); }); + test('no error', () async { + expect(task.error, null); + }); + test('countOfBytesExpectedToReceive - no content length set', () async { expect(task.countOfBytesExpectedToReceive, -1); }); @@ -95,10 +118,101 @@ void testURLSessionTask( expect(task.countOfBytesReceived, 11); }); + test('countOfBytesExpectedToSend', () async { + expect(task.countOfBytesExpectedToSend, 3); + }); + + test('countOfBytesSent', () async { + expect(task.countOfBytesSent, 3); + }); + + test('taskDescription', () { + expect(task.taskDescription, 'my task description'); + }); + test('taskIdentifier', () { task.taskIdentifier; // Just verify that there is no crash. }); + test('prefersIncrementalDelivery', () { + expect(task.prefersIncrementalDelivery, false); + }); + + test('toString', () { + task.toString(); // Just verify that there is no crash. + }); + }); + + group('task failed', () { + late URLSessionTask task; + setUp(() async { + final session = URLSession.sharedSession(); + task = session.dataTaskWithRequest( + MutableURLRequest.fromUrl(Uri.parse('http://notarealserver'))) + ..resume(); + + while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + // Let the event loop run. + await Future(() {}); + } + }); + tearDown(() { + task.cancel(); + }); + + test('no response', () async { + expect(task.response, null); + }); + + test('no error', () async { + expect(task.error!.code, -1003); // CannotFindHost + }); + + test('toString', () { + task.toString(); // Just verify that there is no crash. + }); + }); + + group('task redirect', () { + late HttpServer server; + late URLSessionTask task; + setUp(() async { + // The task will request http://localhost:XXX/launch, which will be + // redirected to http://localhost:XXX/landed. + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + if (request.requestedUri.path != '/landed') { + await request.response.redirect(Uri(path: '/landed')); + return; + } + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World'); + await request.response.close(); + }); + final session = URLSession.sharedSession(); + task = session.dataTaskWithRequest(MutableURLRequest.fromUrl( + Uri.parse('http://localhost:${server.port}/launch'))) + ..resume(); + + while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + // Let the event loop run. + await Future(() {}); + } + }); + tearDown(() { + task.cancel(); + server.close(); + }); + + test('current request', () async { + expect(task.currentRequest!.url!.path, '/landed'); + }); + + test('original request', () async { + expect(task.originalRequest!.url!.path, '/launch'); + }); + test('toString', () { task.toString(); // Just verify that there is no crash. }); diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index f8b3fbb2a5..9eb17cc9bb 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -512,10 +512,47 @@ class URLSessionTask extends _ObjectHolder { /// See [NSURLSessionTask.state](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1409888-state) URLSessionTaskState get state => URLSessionTaskState.values[_nsObject.state]; - // A unique ID for the [URLSessionTask] in a [URLSession]. - // - // See [NSURLSessionTask.taskIdentifier](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411231-taskidentifier) - int get taskIdentifier => _nsObject.taskIdentifier; + /// The relative priority [0, 1] that the host should use to handle the + /// request. + /// + /// See [NSURLSessionTask.priority](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410569-priority) + double get priority => _nsObject.priority; + + /// The relative priority [0, 1] that the host should use to handle the + /// request. + /// + /// See [NSURLSessionTask.priority](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410569-priority) + set priority(double value) => _nsObject.priority = value; + + /// The request currently being handled by the task. + /// + /// May be different from [originalRequest] if the server responds with a + /// redirect. + /// + /// See [NSURLSessionTask.currentRequest](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411649-currentrequest) + URLRequest? get currentRequest { + final request = _nsObject.currentRequest; + if (request == null) { + return null; + } else { + return URLRequest._(request); + } + } + + /// The original request associated with the task. + /// + /// May be different from [currentRequest] if the server responds with a + /// redirect. + /// + /// See [NSURLSessionTask.originalRequest](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411572-originalrequest) + URLRequest? get originalRequest { + final request = _nsObject.originalRequest; + if (request == null) { + return null; + } else { + return URLRequest._(request); + } + } /// The server response to the request associated with this task. /// @@ -531,10 +568,33 @@ class URLSessionTask extends _ObjectHolder { } } - /// The number of content bytes that have been received from the server. + /// An error indicating why the task failed or `null` on success. /// - /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411581-countofbytesreceived) - int get countOfBytesReceived => _nsObject.countOfBytesReceived; + /// See [NSURLSessionTask.error](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1408145-error) + Error? get error { + final error = _nsObject.error; + if (error == null) { + return null; + } else { + return Error._(error); + } + } + + /// The user-assigned description for the task. + /// + /// See [NSURLSessionTask.taskDescription](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1409798-taskdescription) + String get taskDescription => _nsObject.taskDescription.toString(); + + /// The user-assigned description for the task. + /// + /// See [NSURLSessionTask.taskDescription](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1409798-taskdescription) + set taskDescription(String value) => + _nsObject.taskDescription = value.toNSString(linkedLibs); + + /// A unique ID for the [URLSessionTask] in a [URLSession]. + /// + /// See [NSURLSessionTask.taskIdentifier](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411231-taskidentifier) + int get taskIdentifier => _nsObject.taskIdentifier; /// The number of content bytes that are expected to be received from the /// server. @@ -543,13 +603,46 @@ class URLSessionTask extends _ObjectHolder { int get countOfBytesExpectedToReceive => _nsObject.countOfBytesExpectedToReceive; - @override - String toString() => '[URLSessionTask ' + /// The number of content bytes that have been received from the server. + /// + /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411581-countofbytesreceived) + int get countOfBytesReceived => _nsObject.countOfBytesReceived; + + /// The number of content bytes that the task expects to send to the server. + /// + /// [NSURLSessionTask.countOfBytesExpectedToSend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411534-countofbytesexpectedtosend) + int get countOfBytesExpectedToSend => _nsObject.countOfBytesExpectedToSend; + + /// Whether the body of the response should be delivered incrementally or not. + /// + /// [NSURLSessionTask.countOfBytesSent](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410444-countofbytessent) + int get countOfBytesSent => _nsObject.countOfBytesSent; + + /// Whether the body of the response should be delivered incrementally or not. + /// + /// [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) + bool get prefersIncrementalDelivery => _nsObject.prefersIncrementalDelivery; + + /// Whether the body of the response should be delivered incrementally or not. + /// + /// [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) + set prefersIncrementalDelivery(bool value) => + _nsObject.prefersIncrementalDelivery = value; + + String _toStringHelper(String className) => '[$className ' + 'taskDescription=$taskDescription ' 'taskIdentifier=$taskIdentifier ' 'countOfBytesExpectedToReceive=$countOfBytesExpectedToReceive ' 'countOfBytesReceived=$countOfBytesReceived ' - 'state=$state' + 'countOfBytesExpectedToSend=$countOfBytesExpectedToSend ' + 'countOfBytesSent=$countOfBytesSent ' + 'priority=$priority ' + 'state=$state ' + 'prefersIncrementalDelivery=$prefersIncrementalDelivery' ']'; + + @override + String toString() => _toStringHelper('URLSessionTask'); } /// A task associated with downloading a URI to a file. @@ -559,12 +652,7 @@ class URLSessionDownloadTask extends URLSessionTask { URLSessionDownloadTask._(ncb.NSURLSessionDownloadTask c) : super._(c); @override - String toString() => '[URLSessionDownloadTask ' - 'taskIdentifier=$taskIdentifier ' - 'countOfBytesExpectedToReceive=$countOfBytesExpectedToReceive ' - 'countOfBytesReceived=$countOfBytesReceived ' - 'state=$state' - ']'; + String toString() => _toStringHelper('URLSessionDownloadTask'); } /// A request to load a URL. diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 9bccf6c517..f575d735f2 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.0.8 +version: 0.0.9 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: From acaea98b4f4c0b470c8ce12a8dd85a792b7fd53e Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 11 Nov 2022 14:00:00 -0800 Subject: [PATCH 186/448] Upgrade to ffigen ^7.2 and remove unnecessary casts (#820) --- pkgs/cupertino_http/CHANGELOG.md | 1 + pkgs/cupertino_http/ffigen.yaml | 4 +- pkgs/cupertino_http/lib/cupertino_http.dart | 21 +- .../lib/src/native_cupertino_bindings.dart | 108390 ++++++++++++--- pkgs/cupertino_http/lib/src/utils.dart | 13 +- pkgs/cupertino_http/pubspec.yaml | 2 +- 6 files changed, 86239 insertions(+), 22192 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 253ad7b602..76abdcbd77 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -12,6 +12,7 @@ * `countOfBytesSent` property - the number of body bytes sent in the request. * `prefersIncrementalDelivery` property - whether to deliver the response body in one chunk (if possible) or many. +* Upgrade to ffigen ^7.2.0 and remove unnecessary casts. ## 0.0.8 diff --git a/pkgs/cupertino_http/ffigen.yaml b/pkgs/cupertino_http/ffigen.yaml index 0c80911495..b4cd26c595 100644 --- a/pkgs/cupertino_http/ffigen.yaml +++ b/pkgs/cupertino_http/ffigen.yaml @@ -1,9 +1,9 @@ -# Run with `dart run ffigen --config ffigen.yaml`. +# Run with `flutter packages pub run ffigen --config ffigen.yaml`. name: NativeCupertinoHttp description: | Bindings for the Foundation URL Loading System and supporting libraries. - Regenerate bindings with `dart run ffigen --config ffigen.yaml`. + Regenerate bindings with `flutter packages pub run ffigen --config ffigen.yaml`. language: 'objc' output: 'lib/src/native_cupertino_bindings.dart' headers: diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 9eb17cc9bb..f55c5a9672 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -558,14 +558,11 @@ class URLSessionTask extends _ObjectHolder { /// /// See [NSURLSessionTask.response](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410586-response) URLResponse? get response { - if (_nsObject.response == null) { + final nsResponse = _nsObject.response; + if (nsResponse == null) { return null; - } else { - // TODO(https://github.com/dart-lang/ffigen/issues/373): remove cast - // when precise type signatures are generated. - return URLResponse._exactURLResponseType( - ncb.NSURLResponse.castFrom(_nsObject.response!)); } + return URLResponse._exactURLResponseType(nsResponse); } /// An error indicating why the task failed or `null` on success. @@ -706,7 +703,7 @@ class URLRequest extends _ObjectHolder { /// NOTE: The documentation for `NSURLRequest.HTTPMethod` says that the /// property is nullable but, in practice, assigning it to null will produce /// an error. - String get httpMethod => toStringOrNull(_nsObject.HTTPMethod)!; + String get httpMethod => _nsObject.HTTPMethod!.toString(); /// The timeout interval during the connection attempt. /// @@ -723,9 +720,7 @@ class URLRequest extends _ObjectHolder { if (nsUrl == null) { return null; } - // TODO(https://github.com/dart-lang/ffigen/issues/373): remove NSObject - // cast when precise type signatures are generated. - return Uri.parse(toStringOrNull(ncb.NSURL.castFrom(nsUrl).absoluteString)!); + return Uri.parse(nsUrl.absoluteString!.toString()); } @override @@ -864,10 +859,8 @@ void _setupDelegation( disposition = URLSessionResponseDisposition.urlSessionResponseAllow; break; } - // TODO(https://github.com/dart-lang/ffigen/issues/373): remove cast - // when precise type signatures are generated. - final response = URLResponse._exactURLResponseType( - ncb.NSURLResponse.castFrom(forwardedResponse.response!)); + final response = + URLResponse._exactURLResponseType(forwardedResponse.response!); try { disposition = onResponse(session, task, response); diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index e9af0e244e..82724c8cc3 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -10,7 +10,7 @@ import 'package:ffi/ffi.dart' as pkg_ffi; /// Bindings for the Foundation URL Loading System and supporting libraries. /// -/// Regenerate bindings with `dart run ffigen --config ffigen.yaml`. +/// Regenerate bindings with `flutter packages pub run ffigen --config ffigen.yaml`. /// class NativeCupertinoHttp { /// Holds the symbol lookup function. @@ -27,6 +27,158 @@ class NativeCupertinoHttp { lookup) : _lookup = lookup; + int __darwin_check_fd_set_overflow( + int arg0, + ffi.Pointer arg1, + int arg2, + ) { + return ___darwin_check_fd_set_overflow( + arg0, + arg1, + arg2, + ); + } + + late final ___darwin_check_fd_set_overflowPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Int)>>('__darwin_check_fd_set_overflow'); + late final ___darwin_check_fd_set_overflow = + ___darwin_check_fd_set_overflowPtr + .asFunction, int)>(); + + ffi.Pointer sel_getName( + ffi.Pointer sel, + ) { + return _sel_getName( + sel, + ); + } + + late final _sel_getNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('sel_getName'); + late final _sel_getName = _sel_getNamePtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer sel_registerName( + ffi.Pointer str, + ) { + return _sel_registerName1( + str, + ); + } + + late final _sel_registerNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('sel_registerName'); + late final _sel_registerName1 = _sel_registerNamePtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer object_getClassName( + ffi.Pointer obj, + ) { + return _object_getClassName( + obj, + ); + } + + late final _object_getClassNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('object_getClassName'); + late final _object_getClassName = _object_getClassNamePtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer object_getIndexedIvars( + ffi.Pointer obj, + ) { + return _object_getIndexedIvars( + obj, + ); + } + + late final _object_getIndexedIvarsPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('object_getIndexedIvars'); + late final _object_getIndexedIvars = _object_getIndexedIvarsPtr + .asFunction Function(ffi.Pointer)>(); + + bool sel_isMapped( + ffi.Pointer sel, + ) { + return _sel_isMapped( + sel, + ); + } + + late final _sel_isMappedPtr = + _lookup)>>( + 'sel_isMapped'); + late final _sel_isMapped = + _sel_isMappedPtr.asFunction)>(); + + ffi.Pointer sel_getUid( + ffi.Pointer str, + ) { + return _sel_getUid( + str, + ); + } + + late final _sel_getUidPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('sel_getUid'); + late final _sel_getUid = _sel_getUidPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer objc_retainedObject( + objc_objectptr_t obj, + ) { + return _objc_retainedObject( + obj, + ); + } + + late final _objc_retainedObjectPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + objc_objectptr_t)>>('objc_retainedObject'); + late final _objc_retainedObject = _objc_retainedObjectPtr + .asFunction Function(objc_objectptr_t)>(); + + ffi.Pointer objc_unretainedObject( + objc_objectptr_t obj, + ) { + return _objc_unretainedObject( + obj, + ); + } + + late final _objc_unretainedObjectPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + objc_objectptr_t)>>('objc_unretainedObject'); + late final _objc_unretainedObject = _objc_unretainedObjectPtr + .asFunction Function(objc_objectptr_t)>(); + + objc_objectptr_t objc_unretainedPointer( + ffi.Pointer obj, + ) { + return _objc_unretainedPointer( + obj, + ); + } + + late final _objc_unretainedPointerPtr = _lookup< + ffi.NativeFunction< + objc_objectptr_t Function( + ffi.Pointer)>>('objc_unretainedPointer'); + late final _objc_unretainedPointer = _objc_unretainedPointerPtr + .asFunction)>(); + ffi.Pointer _registerName1(String name) { final cstr = name.toNativeUtf8(); final sel = _sel_registerName(cstr.cast()); @@ -53,6 +205,9 @@ class NativeCupertinoHttp { final cstr = name.toNativeUtf8(); final clazz = _objc_getClass(cstr.cast()); pkg_ffi.calloc.free(cstr); + if (clazz == ffi.nullptr) { + throw Exception('Failed to load Objective-C class: $name'); + } return clazz; } @@ -100,30 +255,8 @@ class NativeCupertinoHttp { late final __objc_release = __objc_releasePtr.asFunction)>(); - late final _objc_releaseFinalizer1 = + late final _objc_releaseFinalizer2 = ffi.NativeFinalizer(__objc_releasePtr.cast()); - late final _class_NSArray1 = _getClass1("NSArray"); - bool _objc_msgSend_0( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer clazz, - ) { - return __objc_msgSend_0( - obj, - sel, - clazz, - ); - } - - late final __objc_msgSend_0Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); late final _class_NSObject1 = _getClass1("NSObject"); late final _sel_load1 = _registerName1("load"); void _objc_msgSend_1( @@ -214,6 +347,27 @@ class NativeCupertinoHttp { bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + bool _objc_msgSend_0( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer clazz, + ) { + return __objc_msgSend_0( + obj, + sel, + clazz, + ); + } + + late final __objc_msgSend_0Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); late final _class_Protocol1 = _getClass1("Protocol"); late final _sel_conformsToProtocol_1 = _registerName1("conformsToProtocol:"); bool _objc_msgSend_5( @@ -437,23 +591,362 @@ class NativeCupertinoHttp { instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); - late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); + late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); ffi.Pointer _objc_msgSend_15( ffi.Pointer obj, ffi.Pointer sel, + int from, ) { return __objc_msgSend_15( obj, sel, + from, ); } late final __objc_msgSend_15Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_substringToIndex_1 = _registerName1("substringToIndex:"); + late final _sel_substringWithRange_1 = _registerName1("substringWithRange:"); + ffi.Pointer _objc_msgSend_16( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ) { + return __objc_msgSend_16( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_16Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); + + late final _sel_getCharacters_range_1 = + _registerName1("getCharacters:range:"); + void _objc_msgSend_17( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + NSRange range, + ) { + return __objc_msgSend_17( + obj, + sel, + buffer, + range, + ); + } + + late final __objc_msgSend_17Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); + + late final _sel_compare_1 = _registerName1("compare:"); + int _objc_msgSend_18( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + ) { + return __objc_msgSend_18( + obj, + sel, + string, + ); + } + + late final __objc_msgSend_18Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_compare_options_1 = _registerName1("compare:options:"); + int _objc_msgSend_19( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int mask, + ) { + return __objc_msgSend_19( + obj, + sel, + string, + mask, + ); + } + + late final __objc_msgSend_19Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_compare_options_range_1 = + _registerName1("compare:options:range:"); + int _objc_msgSend_20( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int mask, + NSRange rangeOfReceiverToCompare, + ) { + return __objc_msgSend_20( + obj, + sel, + string, + mask, + rangeOfReceiverToCompare, + ); + } + + late final __objc_msgSend_20Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); + + late final _sel_compare_options_range_locale_1 = + _registerName1("compare:options:range:locale:"); + int _objc_msgSend_21( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int mask, + NSRange rangeOfReceiverToCompare, + ffi.Pointer locale, + ) { + return __objc_msgSend_21( + obj, + sel, + string, + mask, + rangeOfReceiverToCompare, + locale, + ); + } + + late final __objc_msgSend_21Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange, ffi.Pointer)>(); + + late final _sel_caseInsensitiveCompare_1 = + _registerName1("caseInsensitiveCompare:"); + late final _sel_localizedCompare_1 = _registerName1("localizedCompare:"); + late final _sel_localizedCaseInsensitiveCompare_1 = + _registerName1("localizedCaseInsensitiveCompare:"); + late final _sel_localizedStandardCompare_1 = + _registerName1("localizedStandardCompare:"); + late final _sel_isEqualToString_1 = _registerName1("isEqualToString:"); + bool _objc_msgSend_22( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, + ) { + return __objc_msgSend_22( + obj, + sel, + aString, + ); + } + + late final __objc_msgSend_22Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_hasPrefix_1 = _registerName1("hasPrefix:"); + late final _sel_hasSuffix_1 = _registerName1("hasSuffix:"); + late final _sel_commonPrefixWithString_options_1 = + _registerName1("commonPrefixWithString:options:"); + ffi.Pointer _objc_msgSend_23( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer str, + int mask, + ) { + return __objc_msgSend_23( + obj, + sel, + str, + mask, + ); + } + + late final __objc_msgSend_23Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_containsString_1 = _registerName1("containsString:"); + late final _sel_localizedCaseInsensitiveContainsString_1 = + _registerName1("localizedCaseInsensitiveContainsString:"); + late final _sel_localizedStandardContainsString_1 = + _registerName1("localizedStandardContainsString:"); + late final _sel_localizedStandardRangeOfString_1 = + _registerName1("localizedStandardRangeOfString:"); + NSRange _objc_msgSend_24( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer str, + ) { + return __objc_msgSend_24( + obj, + sel, + str, + ); + } + + late final __objc_msgSend_24Ptr = _lookup< + ffi.NativeFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); + late final _sel_rangeOfString_options_1 = + _registerName1("rangeOfString:options:"); + NSRange _objc_msgSend_25( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + ) { + return __objc_msgSend_25( + obj, + sel, + searchString, + mask, + ); + } + + late final __objc_msgSend_25Ptr = _lookup< + ffi.NativeFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_rangeOfString_options_range_1 = + _registerName1("rangeOfString:options:range:"); + NSRange _objc_msgSend_26( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + NSRange rangeOfReceiverToSearch, + ) { + return __objc_msgSend_26( + obj, + sel, + searchString, + mask, + rangeOfReceiverToSearch, + ); + } + + late final __objc_msgSend_26Ptr = _lookup< + ffi.NativeFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); + + late final _class_NSLocale1 = _getClass1("NSLocale"); + late final _sel_rangeOfString_options_range_locale_1 = + _registerName1("rangeOfString:options:range:locale:"); + NSRange _objc_msgSend_27( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + NSRange rangeOfReceiverToSearch, + ffi.Pointer locale, + ) { + return __objc_msgSend_27( + obj, + sel, + searchString, + mask, + rangeOfReceiverToSearch, + locale, + ); + } + + late final __objc_msgSend_27Ptr = _lookup< + ffi.NativeFunction< + NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange, ffi.Pointer)>(); + + late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); + late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); + ffi.Pointer _objc_msgSend_28( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_28( + obj, + sel, + ); + } + + late final __objc_msgSend_28Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< + late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -482,95 +975,95 @@ class NativeCupertinoHttp { late final _sel_newlineCharacterSet1 = _registerName1("newlineCharacterSet"); late final _sel_characterSetWithRange_1 = _registerName1("characterSetWithRange:"); - ffi.Pointer _objc_msgSend_16( + ffi.Pointer _objc_msgSend_29( ffi.Pointer obj, ffi.Pointer sel, NSRange aRange, ) { - return __objc_msgSend_16( + return __objc_msgSend_29( obj, sel, aRange, ); } - late final __objc_msgSend_16Ptr = _lookup< + late final __objc_msgSend_29Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< + late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSRange)>(); late final _sel_characterSetWithCharactersInString_1 = _registerName1("characterSetWithCharactersInString:"); - ffi.Pointer _objc_msgSend_17( + ffi.Pointer _objc_msgSend_30( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aString, ) { - return __objc_msgSend_17( + return __objc_msgSend_30( obj, sel, aString, ); } - late final __objc_msgSend_17Ptr = _lookup< + late final __objc_msgSend_30Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< + late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _class_NSData1 = _getClass1("NSData"); late final _sel_bytes1 = _registerName1("bytes"); - ffi.Pointer _objc_msgSend_18( + ffi.Pointer _objc_msgSend_31( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_18( + return __objc_msgSend_31( obj, sel, ); } - late final __objc_msgSend_18Ptr = _lookup< + late final __objc_msgSend_31Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< + late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_description1 = _registerName1("description"); - ffi.Pointer _objc_msgSend_19( + ffi.Pointer _objc_msgSend_32( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_19( + return __objc_msgSend_32( obj, sel, ); } - late final __objc_msgSend_19Ptr = _lookup< + late final __objc_msgSend_32Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< + late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_getBytes_length_1 = _registerName1("getBytes:length:"); - void _objc_msgSend_20( + void _objc_msgSend_33( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer buffer, int length, ) { - return __objc_msgSend_20( + return __objc_msgSend_33( obj, sel, buffer, @@ -578,22 +1071,22 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_20Ptr = _lookup< + late final __objc_msgSend_33Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< + late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_getBytes_range_1 = _registerName1("getBytes:range:"); - void _objc_msgSend_21( + void _objc_msgSend_34( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer buffer, NSRange range, ) { - return __objc_msgSend_21( + return __objc_msgSend_34( obj, sel, buffer, @@ -601,65 +1094,65 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_21Ptr = _lookup< + late final __objc_msgSend_34Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< + late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSRange)>(); late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); - bool _objc_msgSend_22( + bool _objc_msgSend_35( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer other, ) { - return __objc_msgSend_22( + return __objc_msgSend_35( obj, sel, other, ); } - late final __objc_msgSend_22Ptr = _lookup< + late final __objc_msgSend_35Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< + late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); - ffi.Pointer _objc_msgSend_23( + ffi.Pointer _objc_msgSend_36( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ) { - return __objc_msgSend_23( + return __objc_msgSend_36( obj, sel, range, ); } - late final __objc_msgSend_23Ptr = _lookup< + late final __objc_msgSend_36Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< + late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSRange)>(); late final _sel_writeToFile_atomically_1 = _registerName1("writeToFile:atomically:"); - bool _objc_msgSend_24( + bool _objc_msgSend_37( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, bool useAuxiliaryFile, ) { - return __objc_msgSend_24( + return __objc_msgSend_37( obj, sel, path, @@ -667,25 +1160,25 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_24Ptr = _lookup< + late final __objc_msgSend_37Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< + late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _class_NSURL1 = _getClass1("NSURL"); late final _sel_initWithScheme_host_path_1 = _registerName1("initWithScheme:host:path:"); - instancetype _objc_msgSend_25( + instancetype _objc_msgSend_38( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer scheme, ffi.Pointer host, ffi.Pointer path, ) { - return __objc_msgSend_25( + return __objc_msgSend_38( obj, sel, scheme, @@ -694,7 +1187,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_25Ptr = _lookup< + late final __objc_msgSend_38Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -702,7 +1195,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< + late final __objc_msgSend_38 = __objc_msgSend_38Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -712,14 +1205,14 @@ class NativeCupertinoHttp { late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_26( + instancetype _objc_msgSend_39( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, bool isDir, ffi.Pointer baseURL, ) { - return __objc_msgSend_26( + return __objc_msgSend_39( obj, sel, path, @@ -728,7 +1221,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_26Ptr = _lookup< + late final __objc_msgSend_39Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -736,19 +1229,19 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Bool, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< + late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool, ffi.Pointer)>(); late final _sel_initFileURLWithPath_relativeToURL_1 = _registerName1("initFileURLWithPath:relativeToURL:"); - instancetype _objc_msgSend_27( + instancetype _objc_msgSend_40( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, ffi.Pointer baseURL, ) { - return __objc_msgSend_27( + return __objc_msgSend_40( obj, sel, path, @@ -756,26 +1249,26 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_27Ptr = _lookup< + late final __objc_msgSend_40Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< + late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initFileURLWithPath_isDirectory_1 = _registerName1("initFileURLWithPath:isDirectory:"); - instancetype _objc_msgSend_28( + instancetype _objc_msgSend_41( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, bool isDir, ) { - return __objc_msgSend_28( + return __objc_msgSend_41( obj, sel, path, @@ -783,46 +1276,46 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_28Ptr = _lookup< + late final __objc_msgSend_41Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< + late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_initFileURLWithPath_1 = _registerName1("initFileURLWithPath:"); - instancetype _objc_msgSend_29( + instancetype _objc_msgSend_42( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, ) { - return __objc_msgSend_29( + return __objc_msgSend_42( obj, sel, path, ); } - late final __objc_msgSend_29Ptr = _lookup< + late final __objc_msgSend_42Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< + late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_fileURLWithPath_isDirectory_relativeToURL_1 = _registerName1("fileURLWithPath:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_30( + ffi.Pointer _objc_msgSend_43( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, bool isDir, ffi.Pointer baseURL, ) { - return __objc_msgSend_30( + return __objc_msgSend_43( obj, sel, path, @@ -831,7 +1324,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_30Ptr = _lookup< + late final __objc_msgSend_43Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -839,7 +1332,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Bool, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< + late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -849,13 +1342,13 @@ class NativeCupertinoHttp { late final _sel_fileURLWithPath_relativeToURL_1 = _registerName1("fileURLWithPath:relativeToURL:"); - ffi.Pointer _objc_msgSend_31( + ffi.Pointer _objc_msgSend_44( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, ffi.Pointer baseURL, ) { - return __objc_msgSend_31( + return __objc_msgSend_44( obj, sel, path, @@ -863,14 +1356,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_31Ptr = _lookup< + late final __objc_msgSend_44Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< + late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -879,13 +1372,13 @@ class NativeCupertinoHttp { late final _sel_fileURLWithPath_isDirectory_1 = _registerName1("fileURLWithPath:isDirectory:"); - ffi.Pointer _objc_msgSend_32( + ffi.Pointer _objc_msgSend_45( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, bool isDir, ) { - return __objc_msgSend_32( + return __objc_msgSend_45( obj, sel, path, @@ -893,49 +1386,49 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_32Ptr = _lookup< + late final __objc_msgSend_45Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< + late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); - ffi.Pointer _objc_msgSend_33( + ffi.Pointer _objc_msgSend_46( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, ) { - return __objc_msgSend_33( + return __objc_msgSend_46( obj, sel, path, ); } - late final __objc_msgSend_33Ptr = _lookup< + late final __objc_msgSend_46Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< + late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = _registerName1( "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_34( + instancetype _objc_msgSend_47( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, bool isDir, ffi.Pointer baseURL, ) { - return __objc_msgSend_34( + return __objc_msgSend_47( obj, sel, path, @@ -944,7 +1437,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_34Ptr = _lookup< + late final __objc_msgSend_47Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -952,21 +1445,21 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Bool, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< + late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool, ffi.Pointer)>(); late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = _registerName1( "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_35( + ffi.Pointer _objc_msgSend_48( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, bool isDir, ffi.Pointer baseURL, ) { - return __objc_msgSend_35( + return __objc_msgSend_48( obj, sel, path, @@ -975,7 +1468,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_35Ptr = _lookup< + late final __objc_msgSend_48Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -983,7 +1476,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Bool, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< + late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -999,13 +1492,13 @@ class NativeCupertinoHttp { _registerName1("URLWithString:relativeToURL:"); late final _sel_initWithDataRepresentation_relativeToURL_1 = _registerName1("initWithDataRepresentation:relativeToURL:"); - instancetype _objc_msgSend_36( + instancetype _objc_msgSend_49( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, ffi.Pointer baseURL, ) { - return __objc_msgSend_36( + return __objc_msgSend_49( obj, sel, data, @@ -1013,26 +1506,26 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_36Ptr = _lookup< + late final __objc_msgSend_49Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< + late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_URLWithDataRepresentation_relativeToURL_1 = _registerName1("URLWithDataRepresentation:relativeToURL:"); - ffi.Pointer _objc_msgSend_37( + ffi.Pointer _objc_msgSend_50( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, ffi.Pointer baseURL, ) { - return __objc_msgSend_37( + return __objc_msgSend_50( obj, sel, data, @@ -1040,14 +1533,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_37Ptr = _lookup< + late final __objc_msgSend_50Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< + late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -1059,42 +1552,42 @@ class NativeCupertinoHttp { late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); - ffi.Pointer _objc_msgSend_38( + ffi.Pointer _objc_msgSend_51( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_38( + return __objc_msgSend_51( obj, sel, ); } - late final __objc_msgSend_38Ptr = _lookup< + late final __objc_msgSend_51Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_38 = __objc_msgSend_38Ptr.asFunction< + late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_absoluteString1 = _registerName1("absoluteString"); late final _sel_relativeString1 = _registerName1("relativeString"); late final _sel_baseURL1 = _registerName1("baseURL"); - ffi.Pointer _objc_msgSend_39( + ffi.Pointer _objc_msgSend_52( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_39( + return __objc_msgSend_52( obj, sel, ); } - late final __objc_msgSend_39Ptr = _lookup< + late final __objc_msgSend_52Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< + late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -1106,33 +1599,33 @@ class NativeCupertinoHttp { late final _class_NSValue1 = _getClass1("NSValue"); late final _sel_getValue_size_1 = _registerName1("getValue:size:"); late final _sel_objCType1 = _registerName1("objCType"); - ffi.Pointer _objc_msgSend_40( + ffi.Pointer _objc_msgSend_53( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_40( + return __objc_msgSend_53( obj, sel, ); } - late final __objc_msgSend_40Ptr = _lookup< + late final __objc_msgSend_53Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< + late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithBytes_objCType_1 = _registerName1("initWithBytes:objCType:"); - instancetype _objc_msgSend_41( + instancetype _objc_msgSend_54( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ffi.Pointer type, ) { - return __objc_msgSend_41( + return __objc_msgSend_54( obj, sel, value, @@ -1140,289 +1633,447 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_41Ptr = _lookup< + late final __objc_msgSend_54Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< + late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + late final _sel_valueWithBytes_objCType_1 = + _registerName1("valueWithBytes:objCType:"); + ffi.Pointer _objc_msgSend_55( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer type, + ) { + return __objc_msgSend_55( + obj, + sel, + value, + type, + ); + } + + late final __objc_msgSend_55Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_value_withObjCType_1 = _registerName1("value:withObjCType:"); + late final _sel_valueWithNonretainedObject_1 = + _registerName1("valueWithNonretainedObject:"); + ffi.Pointer _objc_msgSend_56( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ) { + return __objc_msgSend_56( + obj, + sel, + anObject, + ); + } + + late final __objc_msgSend_56Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_nonretainedObjectValue1 = + _registerName1("nonretainedObjectValue"); + late final _sel_valueWithPointer_1 = _registerName1("valueWithPointer:"); + ffi.Pointer _objc_msgSend_57( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer pointer, + ) { + return __objc_msgSend_57( + obj, + sel, + pointer, + ); + } + + late final __objc_msgSend_57Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_pointerValue1 = _registerName1("pointerValue"); + late final _sel_isEqualToValue_1 = _registerName1("isEqualToValue:"); + bool _objc_msgSend_58( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_58( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_58Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_getValue_1 = _registerName1("getValue:"); + void _objc_msgSend_59( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_59( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_59Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); + ffi.Pointer _objc_msgSend_60( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ) { + return __objc_msgSend_60( + obj, + sel, + range, + ); + } + + late final __objc_msgSend_60Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); + + late final _sel_rangeValue1 = _registerName1("rangeValue"); + NSRange _objc_msgSend_61( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_61( + obj, + sel, + ); + } + + late final __objc_msgSend_61Ptr = _lookup< + ffi.NativeFunction< + NSRange Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer)>(); + late final _sel_initWithChar_1 = _registerName1("initWithChar:"); - ffi.Pointer _objc_msgSend_42( + ffi.Pointer _objc_msgSend_62( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_42( + return __objc_msgSend_62( obj, sel, value, ); } - late final __objc_msgSend_42Ptr = _lookup< + late final __objc_msgSend_62Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Char)>>('objc_msgSend'); - late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< + late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithUnsignedChar_1 = _registerName1("initWithUnsignedChar:"); - ffi.Pointer _objc_msgSend_43( + ffi.Pointer _objc_msgSend_63( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_43( + return __objc_msgSend_63( obj, sel, value, ); } - late final __objc_msgSend_43Ptr = _lookup< + late final __objc_msgSend_63Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); - late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< + late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithShort_1 = _registerName1("initWithShort:"); - ffi.Pointer _objc_msgSend_44( + ffi.Pointer _objc_msgSend_64( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_44( + return __objc_msgSend_64( obj, sel, value, ); } - late final __objc_msgSend_44Ptr = _lookup< + late final __objc_msgSend_64Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Short)>>('objc_msgSend'); - late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< + late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithUnsignedShort_1 = _registerName1("initWithUnsignedShort:"); - ffi.Pointer _objc_msgSend_45( + ffi.Pointer _objc_msgSend_65( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_45( + return __objc_msgSend_65( obj, sel, value, ); } - late final __objc_msgSend_45Ptr = _lookup< + late final __objc_msgSend_65Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); - late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< + late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithInt_1 = _registerName1("initWithInt:"); - ffi.Pointer _objc_msgSend_46( + ffi.Pointer _objc_msgSend_66( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_46( + return __objc_msgSend_66( obj, sel, value, ); } - late final __objc_msgSend_46Ptr = _lookup< + late final __objc_msgSend_66Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< + late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithUnsignedInt_1 = _registerName1("initWithUnsignedInt:"); - ffi.Pointer _objc_msgSend_47( + ffi.Pointer _objc_msgSend_67( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_47( + return __objc_msgSend_67( obj, sel, value, ); } - late final __objc_msgSend_47Ptr = _lookup< + late final __objc_msgSend_67Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< + late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithLong_1 = _registerName1("initWithLong:"); - ffi.Pointer _objc_msgSend_48( + ffi.Pointer _objc_msgSend_68( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_48( + return __objc_msgSend_68( obj, sel, value, ); } - late final __objc_msgSend_48Ptr = _lookup< + late final __objc_msgSend_68Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< + late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithUnsignedLong_1 = _registerName1("initWithUnsignedLong:"); - ffi.Pointer _objc_msgSend_49( + ffi.Pointer _objc_msgSend_69( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_49( + return __objc_msgSend_69( obj, sel, value, ); } - late final __objc_msgSend_49Ptr = _lookup< + late final __objc_msgSend_69Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< + late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); - ffi.Pointer _objc_msgSend_50( + ffi.Pointer _objc_msgSend_70( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_50( + return __objc_msgSend_70( obj, sel, value, ); } - late final __objc_msgSend_50Ptr = _lookup< + late final __objc_msgSend_70Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); - late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< + late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithUnsignedLongLong_1 = _registerName1("initWithUnsignedLongLong:"); - ffi.Pointer _objc_msgSend_51( + ffi.Pointer _objc_msgSend_71( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_51( + return __objc_msgSend_71( obj, sel, value, ); } - late final __objc_msgSend_51Ptr = _lookup< + late final __objc_msgSend_71Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); - late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< + late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); - ffi.Pointer _objc_msgSend_52( + ffi.Pointer _objc_msgSend_72( ffi.Pointer obj, ffi.Pointer sel, double value, ) { - return __objc_msgSend_52( + return __objc_msgSend_72( obj, sel, value, ); } - late final __objc_msgSend_52Ptr = _lookup< + late final __objc_msgSend_72Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< + late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, double)>(); late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); - ffi.Pointer _objc_msgSend_53( + ffi.Pointer _objc_msgSend_73( ffi.Pointer obj, ffi.Pointer sel, double value, ) { - return __objc_msgSend_53( + return __objc_msgSend_73( obj, sel, value, ); } - late final __objc_msgSend_53Ptr = _lookup< + late final __objc_msgSend_73Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< + late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, double)>(); late final _sel_initWithBool_1 = _registerName1("initWithBool:"); - ffi.Pointer _objc_msgSend_54( + ffi.Pointer _objc_msgSend_74( ffi.Pointer obj, ffi.Pointer sel, bool value, ) { - return __objc_msgSend_54( + return __objc_msgSend_74( obj, sel, value, ); } - late final __objc_msgSend_54Ptr = _lookup< + late final __objc_msgSend_74Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< + late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, bool)>(); @@ -1430,203 +2081,203 @@ class NativeCupertinoHttp { late final _sel_initWithUnsignedInteger_1 = _registerName1("initWithUnsignedInteger:"); late final _sel_charValue1 = _registerName1("charValue"); - int _objc_msgSend_55( + int _objc_msgSend_75( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_55( + return __objc_msgSend_75( obj, sel, ); } - late final __objc_msgSend_55Ptr = _lookup< + late final __objc_msgSend_75Ptr = _lookup< ffi.NativeFunction< ffi.Char Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< + late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); - int _objc_msgSend_56( + int _objc_msgSend_76( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_56( + return __objc_msgSend_76( obj, sel, ); } - late final __objc_msgSend_56Ptr = _lookup< + late final __objc_msgSend_76Ptr = _lookup< ffi.NativeFunction< ffi.UnsignedChar Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< + late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_shortValue1 = _registerName1("shortValue"); - int _objc_msgSend_57( + int _objc_msgSend_77( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_57( + return __objc_msgSend_77( obj, sel, ); } - late final __objc_msgSend_57Ptr = _lookup< + late final __objc_msgSend_77Ptr = _lookup< ffi.NativeFunction< ffi.Short Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< + late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); - int _objc_msgSend_58( + int _objc_msgSend_78( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_58( + return __objc_msgSend_78( obj, sel, ); } - late final __objc_msgSend_58Ptr = _lookup< + late final __objc_msgSend_78Ptr = _lookup< ffi.NativeFunction< ffi.UnsignedShort Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< + late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_intValue1 = _registerName1("intValue"); - int _objc_msgSend_59( + int _objc_msgSend_79( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_59( + return __objc_msgSend_79( obj, sel, ); } - late final __objc_msgSend_59Ptr = _lookup< + late final __objc_msgSend_79Ptr = _lookup< ffi.NativeFunction< ffi.Int Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< + late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); - int _objc_msgSend_60( + int _objc_msgSend_80( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_60( + return __objc_msgSend_80( obj, sel, ); } - late final __objc_msgSend_60Ptr = _lookup< + late final __objc_msgSend_80Ptr = _lookup< ffi.NativeFunction< ffi.UnsignedInt Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< + late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_longValue1 = _registerName1("longValue"); - int _objc_msgSend_61( + int _objc_msgSend_81( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_61( + return __objc_msgSend_81( obj, sel, ); } - late final __objc_msgSend_61Ptr = _lookup< + late final __objc_msgSend_81Ptr = _lookup< ffi.NativeFunction< ffi.Long Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< + late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); late final _sel_longLongValue1 = _registerName1("longLongValue"); - int _objc_msgSend_62( + int _objc_msgSend_82( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_62( + return __objc_msgSend_82( obj, sel, ); } - late final __objc_msgSend_62Ptr = _lookup< + late final __objc_msgSend_82Ptr = _lookup< ffi.NativeFunction< ffi.LongLong Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< + late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_unsignedLongLongValue1 = _registerName1("unsignedLongLongValue"); - int _objc_msgSend_63( + int _objc_msgSend_83( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_63( + return __objc_msgSend_83( obj, sel, ); } - late final __objc_msgSend_63Ptr = _lookup< + late final __objc_msgSend_83Ptr = _lookup< ffi.NativeFunction< ffi.UnsignedLongLong Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< + late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_floatValue1 = _registerName1("floatValue"); - double _objc_msgSend_64( + double _objc_msgSend_84( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_64( + return __objc_msgSend_84( obj, sel, ); } - late final __objc_msgSend_64Ptr = _lookup< + late final __objc_msgSend_84Ptr = _lookup< ffi.NativeFunction< ffi.Float Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< + late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_doubleValue1 = _registerName1("doubleValue"); - double _objc_msgSend_65( + double _objc_msgSend_85( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_65( + return __objc_msgSend_85( obj, sel, ); } - late final __objc_msgSend_65Ptr = _lookup< + late final __objc_msgSend_85Ptr = _lookup< ffi.NativeFunction< ffi.Double Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< + late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_boolValue1 = _registerName1("boolValue"); @@ -1634,86 +2285,106 @@ class NativeCupertinoHttp { late final _sel_unsignedIntegerValue1 = _registerName1("unsignedIntegerValue"); late final _sel_stringValue1 = _registerName1("stringValue"); - late final _sel_compare_1 = _registerName1("compare:"); - int _objc_msgSend_66( + int _objc_msgSend_86( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherNumber, ) { - return __objc_msgSend_66( + return __objc_msgSend_86( obj, sel, otherNumber, ); } - late final __objc_msgSend_66Ptr = _lookup< + late final __objc_msgSend_86Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< + late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); - bool _objc_msgSend_67( + bool _objc_msgSend_87( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer number, ) { - return __objc_msgSend_67( + return __objc_msgSend_87( obj, sel, number, ); } - late final __objc_msgSend_67Ptr = _lookup< + late final __objc_msgSend_87Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< + late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_descriptionWithLocale_1 = _registerName1("descriptionWithLocale:"); - ffi.Pointer _objc_msgSend_68( + ffi.Pointer _objc_msgSend_88( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer locale, ) { - return __objc_msgSend_68( + return __objc_msgSend_88( obj, sel, locale, ); } - late final __objc_msgSend_68Ptr = _lookup< + late final __objc_msgSend_88Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< + late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + late final _sel_numberWithChar_1 = _registerName1("numberWithChar:"); + late final _sel_numberWithUnsignedChar_1 = + _registerName1("numberWithUnsignedChar:"); + late final _sel_numberWithShort_1 = _registerName1("numberWithShort:"); + late final _sel_numberWithUnsignedShort_1 = + _registerName1("numberWithUnsignedShort:"); + late final _sel_numberWithInt_1 = _registerName1("numberWithInt:"); + late final _sel_numberWithUnsignedInt_1 = + _registerName1("numberWithUnsignedInt:"); + late final _sel_numberWithLong_1 = _registerName1("numberWithLong:"); + late final _sel_numberWithUnsignedLong_1 = + _registerName1("numberWithUnsignedLong:"); + late final _sel_numberWithLongLong_1 = _registerName1("numberWithLongLong:"); + late final _sel_numberWithUnsignedLongLong_1 = + _registerName1("numberWithUnsignedLongLong:"); + late final _sel_numberWithFloat_1 = _registerName1("numberWithFloat:"); + late final _sel_numberWithDouble_1 = _registerName1("numberWithDouble:"); + late final _sel_numberWithBool_1 = _registerName1("numberWithBool:"); + late final _sel_numberWithInteger_1 = _registerName1("numberWithInteger:"); + late final _sel_numberWithUnsignedInteger_1 = + _registerName1("numberWithUnsignedInteger:"); late final _sel_port1 = _registerName1("port"); - ffi.Pointer _objc_msgSend_69( + ffi.Pointer _objc_msgSend_89( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_69( + return __objc_msgSend_89( obj, sel, ); } - late final __objc_msgSend_69Ptr = _lookup< + late final __objc_msgSend_89Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< + late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -1727,13 +2398,13 @@ class NativeCupertinoHttp { late final _sel_hasDirectoryPath1 = _registerName1("hasDirectoryPath"); late final _sel_getFileSystemRepresentation_maxLength_1 = _registerName1("getFileSystemRepresentation:maxLength:"); - bool _objc_msgSend_70( + bool _objc_msgSend_90( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer buffer, int maxBufferLength, ) { - return __objc_msgSend_70( + return __objc_msgSend_90( obj, sel, buffer, @@ -1741,11 +2412,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_70Ptr = _lookup< + late final __objc_msgSend_90Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< + late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -1757,2355 +2428,2327 @@ class NativeCupertinoHttp { late final _class_NSDictionary1 = _getClass1("NSDictionary"); late final _sel_count1 = _registerName1("count"); late final _sel_objectForKey_1 = _registerName1("objectForKey:"); - ffi.Pointer _objc_msgSend_71( + ffi.Pointer _objc_msgSend_91( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aKey, ) { - return __objc_msgSend_71( + return __objc_msgSend_91( obj, sel, aKey, ); } - late final __objc_msgSend_71Ptr = _lookup< + late final __objc_msgSend_91Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< + late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_allKeys1 = _registerName1("allKeys"); - ffi.Pointer _objc_msgSend_72( + late final _class_NSEnumerator1 = _getClass1("NSEnumerator"); + late final _sel_nextObject1 = _registerName1("nextObject"); + late final _sel_allObjects1 = _registerName1("allObjects"); + late final _sel_keyEnumerator1 = _registerName1("keyEnumerator"); + ffi.Pointer _objc_msgSend_92( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_72( + return __objc_msgSend_92( obj, sel, ); } - late final __objc_msgSend_72Ptr = _lookup< + late final __objc_msgSend_92Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< + late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); - late final _sel_allKeysForObject_1 = _registerName1("allKeysForObject:"); - ffi.Pointer _objc_msgSend_73( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_73( - obj, - sel, - anObject, - ); - } - - late final __objc_msgSend_73Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allValues1 = _registerName1("allValues"); - late final _sel_descriptionInStringsFileFormat1 = - _registerName1("descriptionInStringsFileFormat"); - late final _sel_descriptionWithLocale_indent_1 = - _registerName1("descriptionWithLocale:indent:"); - ffi.Pointer _objc_msgSend_74( + late final _sel_initWithObjects_forKeys_count_1 = + _registerName1("initWithObjects:forKeys:count:"); + instancetype _objc_msgSend_93( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer locale, - int level, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt, ) { - return __objc_msgSend_74( + return __objc_msgSend_93( obj, sel, - locale, - level, + objects, + keys, + cnt, ); } - late final __objc_msgSend_74Ptr = _lookup< + late final __objc_msgSend_93Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); - late final _sel_isEqualToDictionary_1 = - _registerName1("isEqualToDictionary:"); - bool _objc_msgSend_75( + late final _class_NSArray1 = _getClass1("NSArray"); + late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); + ffi.Pointer _objc_msgSend_94( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherDictionary, + int index, ) { - return __objc_msgSend_75( + return __objc_msgSend_94( obj, sel, - otherDictionary, + index, ); } - late final __objc_msgSend_75Ptr = _lookup< + late final __objc_msgSend_94Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); - void _objc_msgSend_76( + late final _sel_initWithObjects_count_1 = + _registerName1("initWithObjects:count:"); + instancetype _objc_msgSend_95( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer> objects, - ffi.Pointer> keys, + int cnt, ) { - return __objc_msgSend_76( + return __objc_msgSend_95( obj, sel, objects, - keys, + cnt, ); } - late final __objc_msgSend_76Ptr = _lookup< + late final __objc_msgSend_95Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, int)>(); - late final _sel_dictionaryWithContentsOfFile_1 = - _registerName1("dictionaryWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_77( + late final _sel_arrayByAddingObject_1 = + _registerName1("arrayByAddingObject:"); + ffi.Pointer _objc_msgSend_96( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer anObject, ) { - return __objc_msgSend_77( + return __objc_msgSend_96( obj, sel, - path, + anObject, ); } - late final __objc_msgSend_77Ptr = _lookup< + late final __objc_msgSend_96Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< + late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_dictionaryWithContentsOfURL_1 = - _registerName1("dictionaryWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_78( + late final _sel_arrayByAddingObjectsFromArray_1 = + _registerName1("arrayByAddingObjectsFromArray:"); + ffi.Pointer _objc_msgSend_97( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer otherArray, ) { - return __objc_msgSend_78( + return __objc_msgSend_97( obj, sel, - url, + otherArray, ); } - late final __objc_msgSend_78Ptr = _lookup< + late final __objc_msgSend_97Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< + late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithContentsOfFile_1 = - _registerName1("initWithContentsOfFile:"); - late final _sel_initWithContentsOfURL_1 = - _registerName1("initWithContentsOfURL:"); - late final _sel_writeToURL_atomically_1 = - _registerName1("writeToURL:atomically:"); - bool _objc_msgSend_79( + late final _sel_componentsJoinedByString_1 = + _registerName1("componentsJoinedByString:"); + ffi.Pointer _objc_msgSend_98( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - bool atomically, + ffi.Pointer separator, ) { - return __objc_msgSend_79( + return __objc_msgSend_98( obj, sel, - url, - atomically, + separator, ); } - late final __objc_msgSend_79Ptr = _lookup< + late final __objc_msgSend_98Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dictionary1 = _registerName1("dictionary"); - late final _sel_dictionaryWithObject_forKey_1 = - _registerName1("dictionaryWithObject:forKey:"); - instancetype _objc_msgSend_80( + late final _sel_containsObject_1 = _registerName1("containsObject:"); + late final _sel_descriptionWithLocale_indent_1 = + _registerName1("descriptionWithLocale:indent:"); + ffi.Pointer _objc_msgSend_99( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer object, - ffi.Pointer key, + ffi.Pointer locale, + int level, ) { - return __objc_msgSend_80( + return __objc_msgSend_99( obj, sel, - object, - key, + locale, + level, ); } - late final __objc_msgSend_80Ptr = _lookup< + late final __objc_msgSend_99Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_dictionaryWithObjects_forKeys_count_1 = - _registerName1("dictionaryWithObjects:forKeys:count:"); - instancetype _objc_msgSend_81( + late final _sel_firstObjectCommonWithArray_1 = + _registerName1("firstObjectCommonWithArray:"); + ffi.Pointer _objc_msgSend_100( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, + ) { + return __objc_msgSend_100( + obj, + sel, + otherArray, + ); + } + + late final __objc_msgSend_100Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); + void _objc_msgSend_101( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt, + NSRange range, ) { - return __objc_msgSend_81( + return __objc_msgSend_101( obj, sel, objects, - keys, - cnt, + range, ); } - late final __objc_msgSend_81Ptr = _lookup< + late final __objc_msgSend_101Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, NSRange)>(); - late final _sel_dictionaryWithObjectsAndKeys_1 = - _registerName1("dictionaryWithObjectsAndKeys:"); - late final _sel_dictionaryWithDictionary_1 = - _registerName1("dictionaryWithDictionary:"); - instancetype _objc_msgSend_82( + late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); + int _objc_msgSend_102( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer dict, + ffi.Pointer anObject, ) { - return __objc_msgSend_82( + return __objc_msgSend_102( obj, sel, - dict, + anObject, ); } - late final __objc_msgSend_82Ptr = _lookup< + late final __objc_msgSend_102Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, + NSUInteger Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_dictionaryWithObjects_forKeys_1 = - _registerName1("dictionaryWithObjects:forKeys:"); - instancetype _objc_msgSend_83( + late final _sel_indexOfObject_inRange_1 = + _registerName1("indexOfObject:inRange:"); + int _objc_msgSend_103( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer keys, + ffi.Pointer anObject, + NSRange range, ) { - return __objc_msgSend_83( + return __objc_msgSend_103( obj, sel, - objects, - keys, + anObject, + range, ); } - late final __objc_msgSend_83Ptr = _lookup< + late final __objc_msgSend_103Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - late final _sel_initWithObjectsAndKeys_1 = - _registerName1("initWithObjectsAndKeys:"); - late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); - late final _sel_initWithDictionary_copyItems_1 = - _registerName1("initWithDictionary:copyItems:"); - instancetype _objc_msgSend_84( + late final _sel_indexOfObjectIdenticalTo_1 = + _registerName1("indexOfObjectIdenticalTo:"); + late final _sel_indexOfObjectIdenticalTo_inRange_1 = + _registerName1("indexOfObjectIdenticalTo:inRange:"); + late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); + bool _objc_msgSend_104( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherDictionary, - bool flag, + ffi.Pointer otherArray, ) { - return __objc_msgSend_84( + return __objc_msgSend_104( obj, sel, - otherDictionary, - flag, + otherArray, ); } - late final __objc_msgSend_84Ptr = _lookup< + late final __objc_msgSend_104Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_initWithObjects_forKeys_1 = - _registerName1("initWithObjects:forKeys:"); - late final _sel_initWithContentsOfURL_error_1 = - _registerName1("initWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_85( + late final _sel_firstObject1 = _registerName1("firstObject"); + late final _sel_lastObject1 = _registerName1("lastObject"); + late final _sel_objectEnumerator1 = _registerName1("objectEnumerator"); + late final _sel_reverseObjectEnumerator1 = + _registerName1("reverseObjectEnumerator"); + late final _sel_sortedArrayHint1 = _registerName1("sortedArrayHint"); + late final _sel_sortedArrayUsingFunction_context_1 = + _registerName1("sortedArrayUsingFunction:context:"); + ffi.Pointer _objc_msgSend_105( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, ) { - return __objc_msgSend_85( + return __objc_msgSend_105( obj, sel, - url, - error, + comparator, + context, ); } - late final __objc_msgSend_85Ptr = _lookup< + late final __objc_msgSend_105Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); + + late final _sel_sortedArrayUsingFunction_context_hint_1 = + _registerName1("sortedArrayUsingFunction:context:hint:"); + ffi.Pointer _objc_msgSend_106( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + ffi.Pointer hint, + ) { + return __objc_msgSend_106( + obj, + sel, + comparator, + context, + hint, + ); + } + + late final __objc_msgSend_106Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_dictionaryWithContentsOfURL_error_1 = - _registerName1("dictionaryWithContentsOfURL:error:"); - late final _sel_sharedKeySetForKeys_1 = - _registerName1("sharedKeySetForKeys:"); - ffi.Pointer _objc_msgSend_86( + late final _sel_sortedArrayUsingSelector_1 = + _registerName1("sortedArrayUsingSelector:"); + ffi.Pointer _objc_msgSend_107( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keys, + ffi.Pointer comparator, ) { - return __objc_msgSend_86( + return __objc_msgSend_107( obj, sel, - keys, + comparator, ); } - late final __objc_msgSend_86Ptr = _lookup< + late final __objc_msgSend_107Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_countByEnumeratingWithState_objects_count_1 = - _registerName1("countByEnumeratingWithState:objects:count:"); - int _objc_msgSend_87( + late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); + ffi.Pointer _objc_msgSend_108( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer state, - ffi.Pointer> buffer, - int len, + NSRange range, ) { - return __objc_msgSend_87( + return __objc_msgSend_108( obj, sel, - state, - buffer, - len, + range, ); } - late final __objc_msgSend_87Ptr = _lookup< + late final __objc_msgSend_108Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_initWithDomain_code_userInfo_1 = - _registerName1("initWithDomain:code:userInfo:"); - instancetype _objc_msgSend_88( + late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); + bool _objc_msgSend_109( ffi.Pointer obj, ffi.Pointer sel, - NSErrorDomain domain, - int code, - ffi.Pointer dict, + ffi.Pointer url, + ffi.Pointer> error, ) { - return __objc_msgSend_88( + return __objc_msgSend_109( obj, sel, - domain, - code, - dict, + url, + error, ); } - late final __objc_msgSend_88Ptr = _lookup< + late final __objc_msgSend_109Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - NSErrorDomain, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, int, ffi.Pointer)>(); + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - late final _sel_errorWithDomain_code_userInfo_1 = - _registerName1("errorWithDomain:code:userInfo:"); - late final _sel_domain1 = _registerName1("domain"); - late final _sel_code1 = _registerName1("code"); - late final _sel_userInfo1 = _registerName1("userInfo"); - ffi.Pointer _objc_msgSend_89( + late final _sel_makeObjectsPerformSelector_1 = + _registerName1("makeObjectsPerformSelector:"); + late final _sel_makeObjectsPerformSelector_withObject_1 = + _registerName1("makeObjectsPerformSelector:withObject:"); + void _objc_msgSend_110( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer aSelector, + ffi.Pointer argument, ) { - return __objc_msgSend_89( + return __objc_msgSend_110( obj, sel, + aSelector, + argument, ); } - late final __objc_msgSend_89Ptr = _lookup< + late final __objc_msgSend_110Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_localizedDescription1 = - _registerName1("localizedDescription"); - late final _sel_localizedFailureReason1 = - _registerName1("localizedFailureReason"); - late final _sel_localizedRecoverySuggestion1 = - _registerName1("localizedRecoverySuggestion"); - late final _sel_localizedRecoveryOptions1 = - _registerName1("localizedRecoveryOptions"); - late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); - late final _sel_helpAnchor1 = _registerName1("helpAnchor"); - late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); - ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { - final d = - pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); - d.ref.size = ffi.sizeOf<_ObjCBlock>(); - return d; - } - - late final _objc_block_desc1 = _newBlockDesc1(); - late final _objc_concrete_global_block1 = - _lookup('_NSConcreteGlobalBlock'); - ffi.Pointer<_ObjCBlock> _newBlock1( - ffi.Pointer invoke, ffi.Pointer target) { - final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); - b.ref.isa = _objc_concrete_global_block1; - b.ref.invoke = invoke; - b.ref.target = target; - b.ref.descriptor = _objc_block_desc1; - return b; - } + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_setUserInfoValueProviderForDomain_provider_1 = - _registerName1("setUserInfoValueProviderForDomain:provider:"); - void _objc_msgSend_90( + late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); + late final _sel_indexSet1 = _registerName1("indexSet"); + late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); + late final _sel_indexSetWithIndexesInRange_1 = + _registerName1("indexSetWithIndexesInRange:"); + instancetype _objc_msgSend_111( ffi.Pointer obj, ffi.Pointer sel, - NSErrorDomain errorDomain, - ffi.Pointer<_ObjCBlock> provider, + NSRange range, ) { - return __objc_msgSend_90( + return __objc_msgSend_111( obj, sel, - errorDomain, - provider, + range, ); } - late final __objc_msgSend_90Ptr = _lookup< + late final __objc_msgSend_111Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, ffi.Pointer<_ObjCBlock>)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_userInfoValueProviderForDomain_1 = - _registerName1("userInfoValueProviderForDomain:"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_91( + late final _sel_initWithIndexesInRange_1 = + _registerName1("initWithIndexesInRange:"); + late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); + instancetype _objc_msgSend_112( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer err, - NSErrorUserInfoKey userInfoKey, - NSErrorDomain errorDomain, + ffi.Pointer indexSet, ) { - return __objc_msgSend_91( + return __objc_msgSend_112( obj, sel, - err, - userInfoKey, - errorDomain, + indexSet, ); } - late final __objc_msgSend_91Ptr = _lookup< + late final __objc_msgSend_112Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSErrorUserInfoKey, - NSErrorDomain)>>('objc_msgSend'); - late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSErrorUserInfoKey, - NSErrorDomain)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_checkResourceIsReachableAndReturnError_1 = - _registerName1("checkResourceIsReachableAndReturnError:"); - bool _objc_msgSend_92( + late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); + late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); + bool _objc_msgSend_113( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> error, + ffi.Pointer indexSet, ) { - return __objc_msgSend_92( + return __objc_msgSend_113( obj, sel, - error, + indexSet, ); } - late final __objc_msgSend_92Ptr = _lookup< + late final __objc_msgSend_113Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer)>(); - late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); - late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); - late final _sel_filePathURL1 = _registerName1("filePathURL"); - late final _sel_getResourceValue_forKey_error_1 = - _registerName1("getResourceValue:forKey:error:"); - bool _objc_msgSend_93( + late final _sel_firstIndex1 = _registerName1("firstIndex"); + late final _sel_lastIndex1 = _registerName1("lastIndex"); + late final _sel_indexGreaterThanIndex_1 = + _registerName1("indexGreaterThanIndex:"); + int _objc_msgSend_114( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_93( + return __objc_msgSend_114( obj, sel, value, - key, - error, ); } - late final __objc_msgSend_93Ptr = _lookup< + late final __objc_msgSend_114Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSURLResourceKey, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSURLResourceKey, - ffi.Pointer>)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_resourceValuesForKeys_error_1 = - _registerName1("resourceValuesForKeys:error:"); - ffi.Pointer _objc_msgSend_94( + late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); + late final _sel_indexGreaterThanOrEqualToIndex_1 = + _registerName1("indexGreaterThanOrEqualToIndex:"); + late final _sel_indexLessThanOrEqualToIndex_1 = + _registerName1("indexLessThanOrEqualToIndex:"); + late final _sel_getIndexes_maxCount_inIndexRange_1 = + _registerName1("getIndexes:maxCount:inIndexRange:"); + int _objc_msgSend_115( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer> error, + ffi.Pointer indexBuffer, + int bufferSize, + NSRangePointer range, ) { - return __objc_msgSend_94( + return __objc_msgSend_115( obj, sel, - keys, - error, + indexBuffer, + bufferSize, + range, ); } - late final __objc_msgSend_94Ptr = _lookup< + late final __objc_msgSend_115Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + NSUInteger Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, + NSUInteger, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRangePointer)>(); - late final _sel_setResourceValue_forKey_error_1 = - _registerName1("setResourceValue:forKey:error:"); - bool _objc_msgSend_95( + late final _sel_countOfIndexesInRange_1 = + _registerName1("countOfIndexesInRange:"); + int _objc_msgSend_116( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, - NSURLResourceKey key, - ffi.Pointer> error, + NSRange range, ) { - return __objc_msgSend_95( + return __objc_msgSend_116( obj, sel, - value, - key, - error, + range, ); } - late final __objc_msgSend_95Ptr = _lookup< + late final __objc_msgSend_116Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLResourceKey, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLResourceKey, - ffi.Pointer>)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_setResourceValues_error_1 = - _registerName1("setResourceValues:error:"); - bool _objc_msgSend_96( + late final _sel_containsIndex_1 = _registerName1("containsIndex:"); + bool _objc_msgSend_117( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keyedValues, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_96( + return __objc_msgSend_117( obj, sel, - keyedValues, - error, + value, ); } - late final __objc_msgSend_96Ptr = _lookup< + late final __objc_msgSend_117Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeCachedResourceValueForKey_1 = - _registerName1("removeCachedResourceValueForKey:"); - void _objc_msgSend_97( + late final _sel_containsIndexesInRange_1 = + _registerName1("containsIndexesInRange:"); + bool _objc_msgSend_118( ffi.Pointer obj, ffi.Pointer sel, - NSURLResourceKey key, + NSRange range, ) { - return __objc_msgSend_97( + return __objc_msgSend_118( obj, sel, - key, + range, ); } - late final __objc_msgSend_97Ptr = _lookup< + late final __objc_msgSend_118Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSURLResourceKey)>>('objc_msgSend'); - late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, NSURLResourceKey)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_removeAllCachedResourceValues1 = - _registerName1("removeAllCachedResourceValues"); - late final _sel_setTemporaryResourceValue_forKey_1 = - _registerName1("setTemporaryResourceValue:forKey:"); - void _objc_msgSend_98( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - NSURLResourceKey key, + late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); + late final _sel_intersectsIndexesInRange_1 = + _registerName1("intersectsIndexesInRange:"); + ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { + final d = + pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); + d.ref.reserved = 0; + d.ref.size = ffi.sizeOf<_ObjCBlock>(); + d.ref.copy_helper = ffi.nullptr; + d.ref.dispose_helper = ffi.nullptr; + d.ref.signature = ffi.nullptr; + return d; + } + + late final _objc_block_desc1 = _newBlockDesc1(); + late final _objc_concrete_global_block1 = + _lookup('_NSConcreteGlobalBlock'); + ffi.Pointer<_ObjCBlock> _newBlock1( + ffi.Pointer invoke, ffi.Pointer target) { + final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); + b.ref.isa = _objc_concrete_global_block1; + b.ref.flags = 0; + b.ref.reserved = 0; + b.ref.invoke = invoke; + b.ref.target = target; + b.ref.descriptor = _objc_block_desc1; + final copy = _Block_copy(b.cast()).cast<_ObjCBlock>(); + pkg_ffi.calloc.free(b); + return copy; + } + + ffi.Pointer _Block_copy( + ffi.Pointer value, ) { - return __objc_msgSend_98( - obj, - sel, + return __Block_copy( value, - key, ); } - late final __objc_msgSend_98Ptr = _lookup< + late final __Block_copyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSURLResourceKey)>>('objc_msgSend'); - late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSURLResourceKey)>(); + ffi.Pointer Function( + ffi.Pointer)>>('_Block_copy'); + late final __Block_copy = __Block_copyPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = - _registerName1( - "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); - ffi.Pointer _objc_msgSend_99( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer keys, - ffi.Pointer relativeURL, - ffi.Pointer> error, + void _Block_release( + ffi.Pointer value, ) { - return __objc_msgSend_99( - obj, - sel, - options, - keys, - relativeURL, - error, + return __Block_release( + value, ); } - late final __objc_msgSend_99Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + late final __Block_releasePtr = + _lookup)>>( + '_Block_release'); + late final __Block_release = + __Block_releasePtr.asFunction)>(); - late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - instancetype _objc_msgSend_100( + late final _objc_releaseFinalizer11 = + ffi.NativeFinalizer(__Block_releasePtr.cast()); + late final _sel_enumerateIndexesUsingBlock_1 = + _registerName1("enumerateIndexesUsingBlock:"); + void _objc_msgSend_119( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bookmarkData, - int options, - ffi.Pointer relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_100( + return __objc_msgSend_119( obj, sel, - bookmarkData, - options, - relativeURL, - isStale, - error, + block, ); } - late final __objc_msgSend_100Ptr = _lookup< + late final __objc_msgSend_119Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - late final _sel_resourceValuesForKeys_fromBookmarkData_1 = - _registerName1("resourceValuesForKeys:fromBookmarkData:"); - ffi.Pointer _objc_msgSend_101( + late final _sel_enumerateIndexesWithOptions_usingBlock_1 = + _registerName1("enumerateIndexesWithOptions:usingBlock:"); + void _objc_msgSend_120( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer bookmarkData, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_101( + return __objc_msgSend_120( obj, sel, - keys, - bookmarkData, + opts, + block, ); } - late final __objc_msgSend_101Ptr = _lookup< + late final __objc_msgSend_120Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_writeBookmarkData_toURL_options_error_1 = - _registerName1("writeBookmarkData:toURL:options:error:"); - bool _objc_msgSend_102( + late final _sel_enumerateIndexesInRange_options_usingBlock_1 = + _registerName1("enumerateIndexesInRange:options:usingBlock:"); + void _objc_msgSend_121( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bookmarkData, - ffi.Pointer bookmarkFileURL, - int options, - ffi.Pointer> error, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_102( + return __objc_msgSend_121( obj, sel, - bookmarkData, - bookmarkFileURL, - options, - error, + range, + opts, + block, ); } - late final __objc_msgSend_102Ptr = _lookup< + late final __objc_msgSend_121Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLBookmarkFileCreationOptions, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_bookmarkDataWithContentsOfURL_error_1 = - _registerName1("bookmarkDataWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_103( + late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); + int _objc_msgSend_122( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bookmarkFileURL, - ffi.Pointer> error, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_103( + return __objc_msgSend_122( obj, sel, - bookmarkFileURL, - error, + predicate, ); } - late final __objc_msgSend_103Ptr = _lookup< + late final __objc_msgSend_122Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = - _registerName1("URLByResolvingAliasFileAtURL:options:error:"); - instancetype _objc_msgSend_104( + late final _sel_indexWithOptions_passingTest_1 = + _registerName1("indexWithOptions:passingTest:"); + int _objc_msgSend_123( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer> error, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_104( + return __objc_msgSend_123( obj, sel, - url, - options, - error, + opts, + predicate, ); } - late final __objc_msgSend_104Ptr = _lookup< + late final __objc_msgSend_123Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_startAccessingSecurityScopedResource1 = - _registerName1("startAccessingSecurityScopedResource"); - late final _sel_stopAccessingSecurityScopedResource1 = - _registerName1("stopAccessingSecurityScopedResource"); - late final _sel_getPromisedItemResourceValue_forKey_error_1 = - _registerName1("getPromisedItemResourceValue:forKey:error:"); - late final _sel_promisedItemResourceValuesForKeys_error_1 = - _registerName1("promisedItemResourceValuesForKeys:error:"); - late final _sel_checkPromisedItemIsReachableAndReturnError_1 = - _registerName1("checkPromisedItemIsReachableAndReturnError:"); - late final _sel_fileURLWithPathComponents_1 = - _registerName1("fileURLWithPathComponents:"); - ffi.Pointer _objc_msgSend_105( + late final _sel_indexInRange_options_passingTest_1 = + _registerName1("indexInRange:options:passingTest:"); + int _objc_msgSend_124( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer components, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_105( + return __objc_msgSend_124( obj, sel, - components, + range, + opts, + predicate, ); } - late final __objc_msgSend_105Ptr = _lookup< + late final __objc_msgSend_124Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_pathComponents1 = _registerName1("pathComponents"); - late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); - late final _sel_pathExtension1 = _registerName1("pathExtension"); - late final _sel_URLByAppendingPathComponent_1 = - _registerName1("URLByAppendingPathComponent:"); - late final _sel_URLByAppendingPathComponent_isDirectory_1 = - _registerName1("URLByAppendingPathComponent:isDirectory:"); - late final _sel_URLByDeletingLastPathComponent1 = - _registerName1("URLByDeletingLastPathComponent"); - late final _sel_URLByAppendingPathExtension_1 = - _registerName1("URLByAppendingPathExtension:"); - late final _sel_URLByDeletingPathExtension1 = - _registerName1("URLByDeletingPathExtension"); - late final _sel_URLByStandardizingPath1 = - _registerName1("URLByStandardizingPath"); - late final _sel_URLByResolvingSymlinksInPath1 = - _registerName1("URLByResolvingSymlinksInPath"); - late final _sel_resourceDataUsingCache_1 = - _registerName1("resourceDataUsingCache:"); - ffi.Pointer _objc_msgSend_106( + late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); + ffi.Pointer _objc_msgSend_125( ffi.Pointer obj, ffi.Pointer sel, - bool shouldUseCache, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_106( + return __objc_msgSend_125( obj, sel, - shouldUseCache, + predicate, ); } - late final __objc_msgSend_106Ptr = _lookup< + late final __objc_msgSend_125Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_loadResourceDataNotifyingClient_usingCache_1 = - _registerName1("loadResourceDataNotifyingClient:usingCache:"); - void _objc_msgSend_107( + late final _sel_indexesWithOptions_passingTest_1 = + _registerName1("indexesWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_126( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer client, - bool shouldUseCache, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_107( + return __objc_msgSend_126( obj, sel, - client, - shouldUseCache, + opts, + predicate, ); } - late final __objc_msgSend_107Ptr = _lookup< + late final __objc_msgSend_126Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); - late final _sel_setResourceData_1 = _registerName1("setResourceData:"); - late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); - bool _objc_msgSend_108( + late final _sel_indexesInRange_options_passingTest_1 = + _registerName1("indexesInRange:options:passingTest:"); + ffi.Pointer _objc_msgSend_127( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer property, - ffi.Pointer propertyKey, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_108( + return __objc_msgSend_127( obj, sel, - property, - propertyKey, + range, + opts, + predicate, ); } - late final __objc_msgSend_108Ptr = _lookup< + late final __objc_msgSend_127Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSRange, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); - late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); - late final _sel_registerURLHandleClass_1 = - _registerName1("registerURLHandleClass:"); - void _objc_msgSend_109( + late final _sel_enumerateRangesUsingBlock_1 = + _registerName1("enumerateRangesUsingBlock:"); + void _objc_msgSend_128( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURLHandleSubclass, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_109( + return __objc_msgSend_128( obj, sel, - anURLHandleSubclass, + block, ); } - late final __objc_msgSend_109Ptr = _lookup< + late final __objc_msgSend_128Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_URLHandleClassForURL_1 = - _registerName1("URLHandleClassForURL:"); - ffi.Pointer _objc_msgSend_110( + late final _sel_enumerateRangesWithOptions_usingBlock_1 = + _registerName1("enumerateRangesWithOptions:usingBlock:"); + void _objc_msgSend_129( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURL, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_110( + return __objc_msgSend_129( obj, sel, - anURL, + opts, + block, ); } - late final __objc_msgSend_110Ptr = _lookup< + late final __objc_msgSend_129Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateRangesInRange_options_usingBlock_1 = + _registerName1("enumerateRangesInRange:options:usingBlock:"); + void _objc_msgSend_130( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_130( + obj, + sel, + range, + opts, + block, + ); + } + + late final __objc_msgSend_130Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); + ffi.Pointer _objc_msgSend_131( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + ) { + return __objc_msgSend_131( + obj, + sel, + indexes, + ); + } + + late final __objc_msgSend_131Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< + late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_status1 = _registerName1("status"); - int _objc_msgSend_111( + late final _sel_objectAtIndexedSubscript_1 = + _registerName1("objectAtIndexedSubscript:"); + late final _sel_enumerateObjectsUsingBlock_1 = + _registerName1("enumerateObjectsUsingBlock:"); + void _objc_msgSend_132( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_111( + return __objc_msgSend_132( obj, sel, + block, ); } - late final __objc_msgSend_111Ptr = _lookup< + late final __objc_msgSend_132Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_failureReason1 = _registerName1("failureReason"); - late final _sel_addClient_1 = _registerName1("addClient:"); - late final _sel_removeClient_1 = _registerName1("removeClient:"); - late final _sel_loadInBackground1 = _registerName1("loadInBackground"); - late final _sel_cancelLoadInBackground1 = - _registerName1("cancelLoadInBackground"); - late final _sel_resourceData1 = _registerName1("resourceData"); - late final _sel_availableResourceData1 = - _registerName1("availableResourceData"); - late final _sel_expectedResourceDataSize1 = - _registerName1("expectedResourceDataSize"); - late final _sel_flushCachedData1 = _registerName1("flushCachedData"); - late final _sel_backgroundLoadDidFailWithReason_1 = - _registerName1("backgroundLoadDidFailWithReason:"); - late final _sel_didLoadBytes_loadComplete_1 = - _registerName1("didLoadBytes:loadComplete:"); - void _objc_msgSend_112( + late final _sel_enumerateObjectsWithOptions_usingBlock_1 = + _registerName1("enumerateObjectsWithOptions:usingBlock:"); + void _objc_msgSend_133( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer newBytes, - bool yorn, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_112( + return __objc_msgSend_133( obj, sel, - newBytes, - yorn, + opts, + block, ); } - late final __objc_msgSend_112Ptr = _lookup< + late final __objc_msgSend_133Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_enumerateObjectsAtIndexes_options_usingBlock_1 = + _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); + void _objc_msgSend_134( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_134( + obj, + sel, + s, + opts, + block, + ); + } + + late final __objc_msgSend_134Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); - bool _objc_msgSend_113( + late final _sel_indexOfObjectPassingTest_1 = + _registerName1("indexOfObjectPassingTest:"); + int _objc_msgSend_135( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURL, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_113( + return __objc_msgSend_135( obj, sel, - anURL, + predicate, ); } - late final __objc_msgSend_113Ptr = _lookup< + late final __objc_msgSend_135Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); - ffi.Pointer _objc_msgSend_114( + late final _sel_indexOfObjectWithOptions_passingTest_1 = + _registerName1("indexOfObjectWithOptions:passingTest:"); + int _objc_msgSend_136( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURL, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_114( + return __objc_msgSend_136( obj, sel, - anURL, + opts, + predicate, ); } - late final __objc_msgSend_114Ptr = _lookup< + late final __objc_msgSend_136Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); - ffi.Pointer _objc_msgSend_115( + late final _sel_indexOfObjectAtIndexes_options_passingTest_1 = + _registerName1("indexOfObjectAtIndexes:options:passingTest:"); + int _objc_msgSend_137( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURL, - bool willCache, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_115( + return __objc_msgSend_137( obj, sel, - anURL, - willCache, + s, + opts, + predicate, ); } - late final __objc_msgSend_115Ptr = _lookup< + late final __objc_msgSend_137Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + NSUInteger Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_propertyForKeyIfAvailable_1 = - _registerName1("propertyForKeyIfAvailable:"); - late final _sel_writeProperty_forKey_1 = - _registerName1("writeProperty:forKey:"); - late final _sel_writeData_1 = _registerName1("writeData:"); - late final _sel_loadInForeground1 = _registerName1("loadInForeground"); - late final _sel_beginLoadInBackground1 = - _registerName1("beginLoadInBackground"); - late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); - late final _sel_URLHandleUsingCache_1 = - _registerName1("URLHandleUsingCache:"); - ffi.Pointer _objc_msgSend_116( + late final _sel_indexesOfObjectsPassingTest_1 = + _registerName1("indexesOfObjectsPassingTest:"); + ffi.Pointer _objc_msgSend_138( ffi.Pointer obj, ffi.Pointer sel, - bool shouldUseCache, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_116( + return __objc_msgSend_138( obj, sel, - shouldUseCache, + predicate, ); } - late final __objc_msgSend_116Ptr = _lookup< + late final __objc_msgSend_138Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_writeToFile_options_error_1 = - _registerName1("writeToFile:options:error:"); - bool _objc_msgSend_117( + late final _sel_indexesOfObjectsWithOptions_passingTest_1 = + _registerName1("indexesOfObjectsWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_139( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - int writeOptionsMask, - ffi.Pointer> errorPtr, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_117( + return __objc_msgSend_139( obj, sel, - path, - writeOptionsMask, - errorPtr, + opts, + predicate, ); } - late final __objc_msgSend_117Ptr = _lookup< + late final __objc_msgSend_139Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_writeToURL_options_error_1 = - _registerName1("writeToURL:options:error:"); - bool _objc_msgSend_118( + late final _sel_indexesOfObjectsAtIndexes_options_passingTest_1 = + _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); + ffi.Pointer _objc_msgSend_140( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - int writeOptionsMask, - ffi.Pointer> errorPtr, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_118( + return __objc_msgSend_140( obj, sel, - url, - writeOptionsMask, - errorPtr, + s, + opts, + predicate, ); } - late final __objc_msgSend_118Ptr = _lookup< + late final __objc_msgSend_140Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< - bool Function( + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_rangeOfData_options_range_1 = - _registerName1("rangeOfData:options:range:"); - NSRange _objc_msgSend_119( + late final _sel_sortedArrayUsingComparator_1 = + _registerName1("sortedArrayUsingComparator:"); + ffi.Pointer _objc_msgSend_141( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer dataToFind, - int mask, - NSRange searchRange, + NSComparator cmptr, ) { - return __objc_msgSend_119( + return __objc_msgSend_141( obj, sel, - dataToFind, - mask, - searchRange, + cmptr, ); } - late final __objc_msgSend_119Ptr = _lookup< + late final __objc_msgSend_141Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSComparator)>(); - late final _sel_enumerateByteRangesUsingBlock_1 = - _registerName1("enumerateByteRangesUsingBlock:"); - void _objc_msgSend_120( + late final _sel_sortedArrayWithOptions_usingComparator_1 = + _registerName1("sortedArrayWithOptions:usingComparator:"); + ffi.Pointer _objc_msgSend_142( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + int opts, + NSComparator cmptr, ) { - return __objc_msgSend_120( + return __objc_msgSend_142( obj, sel, - block, + opts, + cmptr, ); } - late final __objc_msgSend_120Ptr = _lookup< + late final __objc_msgSend_142Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, NSComparator)>(); - late final _sel_data1 = _registerName1("data"); - late final _sel_dataWithBytes_length_1 = - _registerName1("dataWithBytes:length:"); - instancetype _objc_msgSend_121( + late final _sel_indexOfObject_inSortedRange_options_usingComparator_1 = + _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); + int _objc_msgSend_143( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, + ffi.Pointer obj1, + NSRange r, + int opts, + NSComparator cmp, ) { - return __objc_msgSend_121( + return __objc_msgSend_143( obj, sel, - bytes, - length, + obj1, + r, + opts, + cmp, ); } - late final __objc_msgSend_121Ptr = _lookup< + late final __objc_msgSend_143Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Int32, + NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange, int, NSComparator)>(); - late final _sel_dataWithBytesNoCopy_length_1 = - _registerName1("dataWithBytesNoCopy:length:"); - late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = - _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_122( + late final _sel_array1 = _registerName1("array"); + late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); + late final _sel_arrayWithObjects_count_1 = + _registerName1("arrayWithObjects:count:"); + late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); + late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); + late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); + late final _sel_initWithArray_1 = _registerName1("initWithArray:"); + late final _sel_initWithArray_copyItems_1 = + _registerName1("initWithArray:copyItems:"); + instancetype _objc_msgSend_144( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool b, + ffi.Pointer array, + bool flag, ) { - return __objc_msgSend_122( + return __objc_msgSend_144( obj, sel, - bytes, - length, - b, + array, + flag, ); } - late final __objc_msgSend_122Ptr = _lookup< + late final __objc_msgSend_144Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); + ffi.Pointer, bool)>(); - late final _sel_dataWithContentsOfFile_options_error_1 = - _registerName1("dataWithContentsOfFile:options:error:"); - instancetype _objc_msgSend_123( + late final _sel_initWithContentsOfURL_error_1 = + _registerName1("initWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_145( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - int readOptionsMask, - ffi.Pointer> errorPtr, + ffi.Pointer url, + ffi.Pointer> error, ) { - return __objc_msgSend_123( + return __objc_msgSend_145( obj, sel, - path, - readOptionsMask, - errorPtr, + url, + error, ); } - late final __objc_msgSend_123Ptr = _lookup< + late final __objc_msgSend_145Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< - instancetype Function( + late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, ffi.Pointer>)>(); - late final _sel_dataWithContentsOfURL_options_error_1 = - _registerName1("dataWithContentsOfURL:options:error:"); - instancetype _objc_msgSend_124( + late final _sel_arrayWithContentsOfURL_error_1 = + _registerName1("arrayWithContentsOfURL:error:"); + late final _class_NSOrderedCollectionDifference1 = + _getClass1("NSOrderedCollectionDifference"); + late final _sel_initWithChanges_1 = _registerName1("initWithChanges:"); + late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1 = + _registerName1( + "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:"); + instancetype _objc_msgSend_146( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - int readOptionsMask, - ffi.Pointer> errorPtr, + ffi.Pointer inserts, + ffi.Pointer insertedObjects, + ffi.Pointer removes, + ffi.Pointer removedObjects, + ffi.Pointer changes, ) { - return __objc_msgSend_124( + return __objc_msgSend_146( obj, sel, - url, - readOptionsMask, - errorPtr, + inserts, + insertedObjects, + removes, + removedObjects, + changes, ); } - late final __objc_msgSend_124Ptr = _lookup< + late final __objc_msgSend_146Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_dataWithContentsOfFile_1 = - _registerName1("dataWithContentsOfFile:"); - late final _sel_dataWithContentsOfURL_1 = - _registerName1("dataWithContentsOfURL:"); - late final _sel_initWithBytes_length_1 = - _registerName1("initWithBytes:length:"); - late final _sel_initWithBytesNoCopy_length_1 = - _registerName1("initWithBytesNoCopy:length:"); - late final _sel_initWithBytesNoCopy_length_freeWhenDone_1 = - _registerName1("initWithBytesNoCopy:length:freeWhenDone:"); - late final _sel_initWithBytesNoCopy_length_deallocator_1 = - _registerName1("initWithBytesNoCopy:length:deallocator:"); - instancetype _objc_msgSend_125( + late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1 = + _registerName1( + "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:"); + instancetype _objc_msgSend_147( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, - ffi.Pointer<_ObjCBlock> deallocator, + ffi.Pointer inserts, + ffi.Pointer insertedObjects, + ffi.Pointer removes, + ffi.Pointer removedObjects, ) { - return __objc_msgSend_125( + return __objc_msgSend_147( obj, sel, - bytes, - length, - deallocator, + inserts, + insertedObjects, + removes, + removedObjects, ); } - late final __objc_msgSend_125Ptr = _lookup< + late final __objc_msgSend_147Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_initWithContentsOfFile_options_error_1 = - _registerName1("initWithContentsOfFile:options:error:"); - late final _sel_initWithContentsOfURL_options_error_1 = - _registerName1("initWithContentsOfURL:options:error:"); - late final _sel_initWithData_1 = _registerName1("initWithData:"); - instancetype _objc_msgSend_126( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_126( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_126Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dataWithData_1 = _registerName1("dataWithData:"); - late final _sel_initWithBase64EncodedString_options_1 = - _registerName1("initWithBase64EncodedString:options:"); - instancetype _objc_msgSend_127( + late final _sel_insertions1 = _registerName1("insertions"); + late final _sel_removals1 = _registerName1("removals"); + late final _sel_hasChanges1 = _registerName1("hasChanges"); + late final _class_NSOrderedCollectionChange1 = + _getClass1("NSOrderedCollectionChange"); + late final _sel_changeWithObject_type_index_1 = + _registerName1("changeWithObject:type:index:"); + ffi.Pointer _objc_msgSend_148( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer base64String, - int options, + ffi.Pointer anObject, + int type, + int index, ) { - return __objc_msgSend_127( + return __objc_msgSend_148( obj, sel, - base64String, - options, + anObject, + type, + index, ); } - late final __objc_msgSend_127Ptr = _lookup< + late final __objc_msgSend_148Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); - late final _sel_base64EncodedStringWithOptions_1 = - _registerName1("base64EncodedStringWithOptions:"); - ffi.Pointer _objc_msgSend_128( + late final _sel_changeWithObject_type_index_associatedIndex_1 = + _registerName1("changeWithObject:type:index:associatedIndex:"); + ffi.Pointer _objc_msgSend_149( ffi.Pointer obj, ffi.Pointer sel, - int options, + ffi.Pointer anObject, + int type, + int index, + int associatedIndex, ) { - return __objc_msgSend_128( + return __objc_msgSend_149( obj, sel, - options, + anObject, + type, + index, + associatedIndex, ); } - late final __objc_msgSend_128Ptr = _lookup< + late final __objc_msgSend_149Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSUInteger, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int, int)>(); - late final _sel_initWithBase64EncodedData_options_1 = - _registerName1("initWithBase64EncodedData:options:"); - instancetype _objc_msgSend_129( + late final _sel_object1 = _registerName1("object"); + late final _sel_changeType1 = _registerName1("changeType"); + int _objc_msgSend_150( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer base64Data, - int options, ) { - return __objc_msgSend_129( + return __objc_msgSend_150( obj, sel, - base64Data, - options, ); } - late final __objc_msgSend_129Ptr = _lookup< + late final __objc_msgSend_150Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_base64EncodedDataWithOptions_1 = - _registerName1("base64EncodedDataWithOptions:"); - ffi.Pointer _objc_msgSend_130( + late final _sel_index1 = _registerName1("index"); + late final _sel_associatedIndex1 = _registerName1("associatedIndex"); + late final _sel_initWithObject_type_index_1 = + _registerName1("initWithObject:type:index:"); + instancetype _objc_msgSend_151( ffi.Pointer obj, ffi.Pointer sel, - int options, + ffi.Pointer anObject, + int type, + int index, ) { - return __objc_msgSend_130( + return __objc_msgSend_151( obj, sel, - options, + anObject, + type, + index, ); } - late final __objc_msgSend_130Ptr = _lookup< + late final __objc_msgSend_151Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - late final _sel_decompressedDataUsingAlgorithm_error_1 = - _registerName1("decompressedDataUsingAlgorithm:error:"); - instancetype _objc_msgSend_131( + late final _sel_initWithObject_type_index_associatedIndex_1 = + _registerName1("initWithObject:type:index:associatedIndex:"); + instancetype _objc_msgSend_152( ffi.Pointer obj, ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, + ffi.Pointer anObject, + int type, + int index, + int associatedIndex, ) { - return __objc_msgSend_131( + return __objc_msgSend_152( obj, sel, - algorithm, - error, + anObject, + type, + index, + associatedIndex, ); } - late final __objc_msgSend_131Ptr = _lookup< + late final __objc_msgSend_152Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); + NSUInteger, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, int)>(); - late final _sel_compressedDataUsingAlgorithm_error_1 = - _registerName1("compressedDataUsingAlgorithm:error:"); - late final _sel_getBytes_1 = _registerName1("getBytes:"); - void _objc_msgSend_132( + late final _sel_differenceByTransformingChangesWithBlock_1 = + _registerName1("differenceByTransformingChangesWithBlock:"); + ffi.Pointer _objc_msgSend_153( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_132( + return __objc_msgSend_153( obj, sel, - buffer, + block, ); } - late final __objc_msgSend_132Ptr = _lookup< + late final __objc_msgSend_153Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_dataWithContentsOfMappedFile_1 = - _registerName1("dataWithContentsOfMappedFile:"); - late final _sel_initWithContentsOfMappedFile_1 = - _registerName1("initWithContentsOfMappedFile:"); - late final _sel_initWithBase64Encoding_1 = - _registerName1("initWithBase64Encoding:"); - late final _sel_base64Encoding1 = _registerName1("base64Encoding"); - late final _sel_characterSetWithBitmapRepresentation_1 = - _registerName1("characterSetWithBitmapRepresentation:"); - ffi.Pointer _objc_msgSend_133( + late final _sel_inverseDifference1 = _registerName1("inverseDifference"); + late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = + _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); + ffi.Pointer _objc_msgSend_154( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, + ffi.Pointer other, + int options, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_133( + return __objc_msgSend_154( obj, sel, - data, + other, + options, + block, ); } - late final __objc_msgSend_133Ptr = _lookup< + late final __objc_msgSend_154Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_characterSetWithContentsOfFile_1 = - _registerName1("characterSetWithContentsOfFile:"); - late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); - bool _objc_msgSend_134( + late final _sel_differenceFromArray_withOptions_1 = + _registerName1("differenceFromArray:withOptions:"); + ffi.Pointer _objc_msgSend_155( ffi.Pointer obj, ffi.Pointer sel, - int aCharacter, + ffi.Pointer other, + int options, ) { - return __objc_msgSend_134( + return __objc_msgSend_155( obj, sel, - aCharacter, + other, + options, ); } - late final __objc_msgSend_134Ptr = _lookup< + late final __objc_msgSend_155Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - unichar)>>('objc_msgSend'); - late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_bitmapRepresentation1 = - _registerName1("bitmapRepresentation"); - late final _sel_invertedSet1 = _registerName1("invertedSet"); - late final _sel_longCharacterIsMember_1 = - _registerName1("longCharacterIsMember:"); - bool _objc_msgSend_135( + late final _sel_differenceFromArray_1 = + _registerName1("differenceFromArray:"); + ffi.Pointer _objc_msgSend_156( ffi.Pointer obj, ffi.Pointer sel, - int theLongChar, + ffi.Pointer other, ) { - return __objc_msgSend_135( + return __objc_msgSend_156( obj, sel, - theLongChar, + other, ); } - late final __objc_msgSend_135Ptr = _lookup< + late final __objc_msgSend_156Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - UTF32Char)>>('objc_msgSend'); - late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); - bool _objc_msgSend_136( + late final _sel_arrayByApplyingDifference_1 = + _registerName1("arrayByApplyingDifference:"); + ffi.Pointer _objc_msgSend_157( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer theOtherSet, + ffi.Pointer difference, ) { - return __objc_msgSend_136( + return __objc_msgSend_157( obj, sel, - theOtherSet, + difference, ); } - late final __objc_msgSend_136Ptr = _lookup< + late final __objc_msgSend_157Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); - bool _objc_msgSend_137( + late final _sel_getObjects_1 = _registerName1("getObjects:"); + void _objc_msgSend_158( ffi.Pointer obj, ffi.Pointer sel, - int thePlane, + ffi.Pointer> objects, ) { - return __objc_msgSend_137( + return __objc_msgSend_158( obj, sel, - thePlane, + objects, ); } - late final __objc_msgSend_137Ptr = _lookup< + late final __objc_msgSend_158Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Uint8)>>('objc_msgSend'); - late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_URLUserAllowedCharacterSet1 = - _registerName1("URLUserAllowedCharacterSet"); - late final _sel_URLPasswordAllowedCharacterSet1 = - _registerName1("URLPasswordAllowedCharacterSet"); - late final _sel_URLHostAllowedCharacterSet1 = - _registerName1("URLHostAllowedCharacterSet"); - late final _sel_URLPathAllowedCharacterSet1 = - _registerName1("URLPathAllowedCharacterSet"); - late final _sel_URLQueryAllowedCharacterSet1 = - _registerName1("URLQueryAllowedCharacterSet"); - late final _sel_URLFragmentAllowedCharacterSet1 = - _registerName1("URLFragmentAllowedCharacterSet"); - late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = - _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); - ffi.Pointer _objc_msgSend_138( + late final _sel_arrayWithContentsOfFile_1 = + _registerName1("arrayWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_159( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer allowedCharacters, + ffi.Pointer path, ) { - return __objc_msgSend_138( + return __objc_msgSend_159( obj, sel, - allowedCharacters, + path, ); } - late final __objc_msgSend_138Ptr = _lookup< + late final __objc_msgSend_159Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< + late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_stringByRemovingPercentEncoding1 = - _registerName1("stringByRemovingPercentEncoding"); - late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = - _registerName1("stringByAddingPercentEscapesUsingEncoding:"); - ffi.Pointer _objc_msgSend_139( + late final _sel_arrayWithContentsOfURL_1 = + _registerName1("arrayWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_160( ffi.Pointer obj, ffi.Pointer sel, - int enc, + ffi.Pointer url, ) { - return __objc_msgSend_139( + return __objc_msgSend_160( obj, sel, - enc, + url, ); } - late final __objc_msgSend_139Ptr = _lookup< + late final __objc_msgSend_160Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = - _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); - late final _sel_stringWithCString_encoding_1 = - _registerName1("stringWithCString:encoding:"); - ffi.Pointer _objc_msgSend_140( + late final _sel_initWithContentsOfFile_1 = + _registerName1("initWithContentsOfFile:"); + late final _sel_initWithContentsOfURL_1 = + _registerName1("initWithContentsOfURL:"); + late final _sel_writeToURL_atomically_1 = + _registerName1("writeToURL:atomically:"); + bool _objc_msgSend_161( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer cString, - int enc, + ffi.Pointer url, + bool atomically, ) { - return __objc_msgSend_140( + return __objc_msgSend_161( obj, sel, - cString, - enc, + url, + atomically, ); } - late final __objc_msgSend_140Ptr = _lookup< + late final __objc_msgSend_161Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_UTF8String1 = _registerName1("UTF8String"); - late final _sel_debugDescription1 = _registerName1("debugDescription"); - late final _sel_URL_resourceDataDidBecomeAvailable_1 = - _registerName1("URL:resourceDataDidBecomeAvailable:"); - void _objc_msgSend_141( + late final _sel_allKeys1 = _registerName1("allKeys"); + ffi.Pointer _objc_msgSend_162( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer newBytes, ) { - return __objc_msgSend_141( + return __objc_msgSend_162( obj, sel, - sender, - newBytes, ); } - late final __objc_msgSend_141Ptr = _lookup< + late final __objc_msgSend_162Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_URLResourceDidFinishLoading_1 = - _registerName1("URLResourceDidFinishLoading:"); - void _objc_msgSend_142( + late final _sel_allKeysForObject_1 = _registerName1("allKeysForObject:"); + late final _sel_allValues1 = _registerName1("allValues"); + late final _sel_descriptionInStringsFileFormat1 = + _registerName1("descriptionInStringsFileFormat"); + late final _sel_isEqualToDictionary_1 = + _registerName1("isEqualToDictionary:"); + bool _objc_msgSend_163( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, + ffi.Pointer otherDictionary, ) { - return __objc_msgSend_142( + return __objc_msgSend_163( obj, sel, - sender, + otherDictionary, ); } - late final __objc_msgSend_142Ptr = _lookup< + late final __objc_msgSend_163Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_URLResourceDidCancelLoading_1 = - _registerName1("URLResourceDidCancelLoading:"); - late final _sel_URL_resourceDidFailLoadingWithReason_1 = - _registerName1("URL:resourceDidFailLoadingWithReason:"); - void _objc_msgSend_143( + late final _sel_objectsForKeys_notFoundMarker_1 = + _registerName1("objectsForKeys:notFoundMarker:"); + ffi.Pointer _objc_msgSend_164( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer reason, + ffi.Pointer keys, + ffi.Pointer marker, ) { - return __objc_msgSend_143( + return __objc_msgSend_164( obj, sel, - sender, - reason, + keys, + marker, ); } - late final __objc_msgSend_143Ptr = _lookup< + late final __objc_msgSend_164Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = - _registerName1( - "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); - void _objc_msgSend_144( + late final _sel_keysSortedByValueUsingSelector_1 = + _registerName1("keysSortedByValueUsingSelector:"); + late final _sel_getObjects_andKeys_count_1 = + _registerName1("getObjects:andKeys:count:"); + void _objc_msgSend_165( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, - ffi.Pointer delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo, + ffi.Pointer> objects, + ffi.Pointer> keys, + int count, ) { - return __objc_msgSend_144( + return __objc_msgSend_165( obj, sel, - error, - recoveryOptionIndex, - delegate, - didRecoverSelector, - contextInfo, + objects, + keys, + count, ); } - late final __objc_msgSend_144Ptr = _lookup< + late final __objc_msgSend_165Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< + ffi.Pointer>, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer>, + ffi.Pointer>, + int)>(); - late final _sel_attemptRecoveryFromError_optionIndex_1 = - _registerName1("attemptRecoveryFromError:optionIndex:"); - bool _objc_msgSend_145( + late final _sel_objectForKeyedSubscript_1 = + _registerName1("objectForKeyedSubscript:"); + late final _sel_enumerateKeysAndObjectsUsingBlock_1 = + _registerName1("enumerateKeysAndObjectsUsingBlock:"); + void _objc_msgSend_166( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_145( + return __objc_msgSend_166( obj, sel, - error, - recoveryOptionIndex, + block, ); } - late final __objc_msgSend_145Ptr = _lookup< + late final __objc_msgSend_166Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); - ffi.Pointer _objc_msgSend_146( + late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = + _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); + void _objc_msgSend_167( ffi.Pointer obj, ffi.Pointer sel, - int index, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_146( + return __objc_msgSend_167( obj, sel, - index, + opts, + block, ); } - late final __objc_msgSend_146Ptr = _lookup< + late final __objc_msgSend_167Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_keysSortedByValueUsingComparator_1 = + _registerName1("keysSortedByValueUsingComparator:"); + late final _sel_keysSortedByValueWithOptions_usingComparator_1 = + _registerName1("keysSortedByValueWithOptions:usingComparator:"); + late final _sel_keysOfEntriesPassingTest_1 = + _registerName1("keysOfEntriesPassingTest:"); + ffi.Pointer _objc_msgSend_168( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_168( + obj, + sel, + predicate, + ); + } + + late final __objc_msgSend_168Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithObjects_count_1 = - _registerName1("initWithObjects:count:"); - instancetype _objc_msgSend_147( + late final _sel_keysOfEntriesWithOptions_passingTest_1 = + _registerName1("keysOfEntriesWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_169( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, - int cnt, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_147( + return __objc_msgSend_169( obj, sel, - objects, - cnt, + opts, + predicate, ); } - late final __objc_msgSend_147Ptr = _lookup< + late final __objc_msgSend_169Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, int)>(); + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_arrayByAddingObject_1 = - _registerName1("arrayByAddingObject:"); - late final _sel_arrayByAddingObjectsFromArray_1 = - _registerName1("arrayByAddingObjectsFromArray:"); - ffi.Pointer _objc_msgSend_148( + late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); + void _objc_msgSend_170( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherArray, + ffi.Pointer> objects, + ffi.Pointer> keys, ) { - return __objc_msgSend_148( + return __objc_msgSend_170( obj, sel, - otherArray, + objects, + keys, ); } - late final __objc_msgSend_148Ptr = _lookup< + late final __objc_msgSend_170Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_componentsJoinedByString_1 = - _registerName1("componentsJoinedByString:"); - ffi.Pointer _objc_msgSend_149( + late final _sel_dictionaryWithContentsOfFile_1 = + _registerName1("dictionaryWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_171( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer separator, + ffi.Pointer path, ) { - return __objc_msgSend_149( + return __objc_msgSend_171( obj, sel, - separator, + path, ); } - late final __objc_msgSend_149Ptr = _lookup< + late final __objc_msgSend_171Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< + late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_containsObject_1 = _registerName1("containsObject:"); - late final _sel_firstObjectCommonWithArray_1 = - _registerName1("firstObjectCommonWithArray:"); - late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); - void _objc_msgSend_150( + late final _sel_dictionaryWithContentsOfURL_1 = + _registerName1("dictionaryWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_172( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, - NSRange range, + ffi.Pointer url, ) { - return __objc_msgSend_150( + return __objc_msgSend_172( obj, sel, - objects, - range, + url, ); } - late final __objc_msgSend_150Ptr = _lookup< + late final __objc_msgSend_172Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, NSRange)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); - int _objc_msgSend_151( + late final _sel_dictionary1 = _registerName1("dictionary"); + late final _sel_dictionaryWithObject_forKey_1 = + _registerName1("dictionaryWithObject:forKey:"); + instancetype _objc_msgSend_173( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, + ffi.Pointer object, + ffi.Pointer key, ) { - return __objc_msgSend_151( + return __objc_msgSend_173( obj, sel, - anObject, + object, + key, ); } - late final __objc_msgSend_151Ptr = _lookup< + late final __objc_msgSend_173Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_indexOfObject_inRange_1 = - _registerName1("indexOfObject:inRange:"); - int _objc_msgSend_152( + late final _sel_dictionaryWithObjects_forKeys_count_1 = + _registerName1("dictionaryWithObjects:forKeys:count:"); + late final _sel_dictionaryWithObjectsAndKeys_1 = + _registerName1("dictionaryWithObjectsAndKeys:"); + late final _sel_dictionaryWithDictionary_1 = + _registerName1("dictionaryWithDictionary:"); + instancetype _objc_msgSend_174( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - NSRange range, + ffi.Pointer dict, ) { - return __objc_msgSend_152( + return __objc_msgSend_174( obj, sel, - anObject, - range, + dict, ); } - late final __objc_msgSend_152Ptr = _lookup< + late final __objc_msgSend_174Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexOfObjectIdenticalTo_1 = - _registerName1("indexOfObjectIdenticalTo:"); - late final _sel_indexOfObjectIdenticalTo_inRange_1 = - _registerName1("indexOfObjectIdenticalTo:inRange:"); - late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); - bool _objc_msgSend_153( + late final _sel_dictionaryWithObjects_forKeys_1 = + _registerName1("dictionaryWithObjects:forKeys:"); + instancetype _objc_msgSend_175( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherArray, + ffi.Pointer objects, + ffi.Pointer keys, ) { - return __objc_msgSend_153( + return __objc_msgSend_175( obj, sel, - otherArray, + objects, + keys, ); } - late final __objc_msgSend_153Ptr = _lookup< + late final __objc_msgSend_175Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_firstObject1 = _registerName1("firstObject"); - late final _sel_lastObject1 = _registerName1("lastObject"); - late final _sel_array1 = _registerName1("array"); - late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); - late final _sel_arrayWithObjects_count_1 = - _registerName1("arrayWithObjects:count:"); - late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); - late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); - late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); - late final _sel_initWithArray_1 = _registerName1("initWithArray:"); - late final _sel_initWithArray_copyItems_1 = - _registerName1("initWithArray:copyItems:"); - instancetype _objc_msgSend_154( + late final _sel_initWithObjectsAndKeys_1 = + _registerName1("initWithObjectsAndKeys:"); + late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); + late final _sel_initWithDictionary_copyItems_1 = + _registerName1("initWithDictionary:copyItems:"); + instancetype _objc_msgSend_176( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer array, + ffi.Pointer otherDictionary, bool flag, ) { - return __objc_msgSend_154( + return __objc_msgSend_176( obj, sel, - array, + otherDictionary, flag, ); } - late final __objc_msgSend_154Ptr = _lookup< + late final __objc_msgSend_176Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< + late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); - ffi.Pointer _objc_msgSend_155( + late final _sel_initWithObjects_forKeys_1 = + _registerName1("initWithObjects:forKeys:"); + ffi.Pointer _objc_msgSend_177( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer> error, ) { - return __objc_msgSend_155( + return __objc_msgSend_177( obj, sel, url, @@ -4113,1135 +4756,1322 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_155Ptr = _lookup< + late final __objc_msgSend_177Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< + late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); - late final _sel_arrayWithContentsOfURL_error_1 = - _registerName1("arrayWithContentsOfURL:error:"); - late final _sel_getObjects_1 = _registerName1("getObjects:"); - void _objc_msgSend_156( + late final _sel_dictionaryWithContentsOfURL_error_1 = + _registerName1("dictionaryWithContentsOfURL:error:"); + late final _sel_sharedKeySetForKeys_1 = + _registerName1("sharedKeySetForKeys:"); + late final _sel_countByEnumeratingWithState_objects_count_1 = + _registerName1("countByEnumeratingWithState:objects:count:"); + int _objc_msgSend_178( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, + ffi.Pointer state, + ffi.Pointer> buffer, + int len, ) { - return __objc_msgSend_156( + return __objc_msgSend_178( obj, sel, - objects, + state, + buffer, + len, ); } - late final __objc_msgSend_156Ptr = _lookup< + late final __objc_msgSend_178Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); - late final _sel_arrayWithContentsOfFile_1 = - _registerName1("arrayWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_157( + late final _sel_initWithDomain_code_userInfo_1 = + _registerName1("initWithDomain:code:userInfo:"); + instancetype _objc_msgSend_179( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + NSErrorDomain domain, + int code, + ffi.Pointer dict, ) { - return __objc_msgSend_157( + return __objc_msgSend_179( obj, sel, - path, + domain, + code, + dict, ); } - late final __objc_msgSend_157Ptr = _lookup< + late final __objc_msgSend_179Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSErrorDomain, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, int, ffi.Pointer)>(); - late final _sel_arrayWithContentsOfURL_1 = - _registerName1("arrayWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_158( + late final _sel_errorWithDomain_code_userInfo_1 = + _registerName1("errorWithDomain:code:userInfo:"); + late final _sel_domain1 = _registerName1("domain"); + late final _sel_code1 = _registerName1("code"); + late final _sel_userInfo1 = _registerName1("userInfo"); + ffi.Pointer _objc_msgSend_180( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, ) { - return __objc_msgSend_158( + return __objc_msgSend_180( obj, sel, - url, ); } - late final __objc_msgSend_158Ptr = _lookup< + late final __objc_msgSend_180Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _class_NSMutableArray1 = _getClass1("NSMutableArray"); - late final _sel_addObject_1 = _registerName1("addObject:"); - late final _sel_insertObject_atIndex_1 = - _registerName1("insertObject:atIndex:"); - void _objc_msgSend_159( + late final _sel_localizedDescription1 = + _registerName1("localizedDescription"); + late final _sel_localizedFailureReason1 = + _registerName1("localizedFailureReason"); + late final _sel_localizedRecoverySuggestion1 = + _registerName1("localizedRecoverySuggestion"); + late final _sel_localizedRecoveryOptions1 = + _registerName1("localizedRecoveryOptions"); + late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); + late final _sel_helpAnchor1 = _registerName1("helpAnchor"); + late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); + late final _sel_setUserInfoValueProviderForDomain_provider_1 = + _registerName1("setUserInfoValueProviderForDomain:provider:"); + void _objc_msgSend_181( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int index, + NSErrorDomain errorDomain, + ffi.Pointer<_ObjCBlock> provider, ) { - return __objc_msgSend_159( + return __objc_msgSend_181( obj, sel, - anObject, - index, + errorDomain, + provider, ); } - late final __objc_msgSend_159Ptr = _lookup< + late final __objc_msgSend_181Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< + NSErrorDomain, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + NSErrorDomain, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_removeLastObject1 = _registerName1("removeLastObject"); - late final _sel_removeObjectAtIndex_1 = - _registerName1("removeObjectAtIndex:"); - void _objc_msgSend_160( + late final _sel_userInfoValueProviderForDomain_1 = + _registerName1("userInfoValueProviderForDomain:"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_182( ffi.Pointer obj, ffi.Pointer sel, - int index, + ffi.Pointer err, + NSErrorUserInfoKey userInfoKey, + NSErrorDomain errorDomain, ) { - return __objc_msgSend_160( + return __objc_msgSend_182( obj, sel, - index, + err, + userInfoKey, + errorDomain, ); } - late final __objc_msgSend_160Ptr = _lookup< + late final __objc_msgSend_182Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSErrorUserInfoKey, + NSErrorDomain)>>('objc_msgSend'); + late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSErrorUserInfoKey, + NSErrorDomain)>(); - late final _sel_replaceObjectAtIndex_withObject_1 = - _registerName1("replaceObjectAtIndex:withObject:"); - void _objc_msgSend_161( + late final _sel_checkResourceIsReachableAndReturnError_1 = + _registerName1("checkResourceIsReachableAndReturnError:"); + bool _objc_msgSend_183( ffi.Pointer obj, ffi.Pointer sel, - int index, - ffi.Pointer anObject, + ffi.Pointer> error, ) { - return __objc_msgSend_161( + return __objc_msgSend_183( obj, sel, - index, - anObject, + error, ); } - late final __objc_msgSend_161Ptr = _lookup< + late final __objc_msgSend_183Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); - late final _sel_addObjectsFromArray_1 = - _registerName1("addObjectsFromArray:"); - void _objc_msgSend_162( + late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); + late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); + late final _sel_filePathURL1 = _registerName1("filePathURL"); + late final _sel_getResourceValue_forKey_error_1 = + _registerName1("getResourceValue:forKey:error:"); + bool _objc_msgSend_184( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherArray, + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error, ) { - return __objc_msgSend_162( + return __objc_msgSend_184( obj, sel, - otherArray, + value, + key, + error, ); } - late final __objc_msgSend_162Ptr = _lookup< + late final __objc_msgSend_184Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSURLResourceKey, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSURLResourceKey, + ffi.Pointer>)>(); - late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = - _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); - void _objc_msgSend_163( + late final _sel_resourceValuesForKeys_error_1 = + _registerName1("resourceValuesForKeys:error:"); + ffi.Pointer _objc_msgSend_185( ffi.Pointer obj, ffi.Pointer sel, - int idx1, - int idx2, + ffi.Pointer keys, + ffi.Pointer> error, ) { - return __objc_msgSend_163( + return __objc_msgSend_185( obj, sel, - idx1, - idx2, + keys, + error, ); } - late final __objc_msgSend_163Ptr = _lookup< + late final __objc_msgSend_185Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - - late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); - late final _sel_removeObject_inRange_1 = - _registerName1("removeObject:inRange:"); - void _objc_msgSend_164( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - NSRange range, - ) { - return __objc_msgSend_164( - obj, - sel, - anObject, - range, - ); - } - - late final __objc_msgSend_164Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_removeObject_1 = _registerName1("removeObject:"); - late final _sel_removeObjectIdenticalTo_inRange_1 = - _registerName1("removeObjectIdenticalTo:inRange:"); - late final _sel_removeObjectIdenticalTo_1 = - _registerName1("removeObjectIdenticalTo:"); - late final _sel_removeObjectsFromIndices_numIndices_1 = - _registerName1("removeObjectsFromIndices:numIndices:"); - void _objc_msgSend_165( + late final _sel_setResourceValue_forKey_error_1 = + _registerName1("setResourceValue:forKey:error:"); + bool _objc_msgSend_186( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indices, - int cnt, + ffi.Pointer value, + NSURLResourceKey key, + ffi.Pointer> error, ) { - return __objc_msgSend_165( + return __objc_msgSend_186( obj, sel, - indices, - cnt, + value, + key, + error, ); } - late final __objc_msgSend_165Ptr = _lookup< + late final __objc_msgSend_186Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLResourceKey, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLResourceKey, + ffi.Pointer>)>(); - late final _sel_removeObjectsInArray_1 = - _registerName1("removeObjectsInArray:"); - late final _sel_removeObjectsInRange_1 = - _registerName1("removeObjectsInRange:"); - void _objc_msgSend_166( + late final _sel_setResourceValues_error_1 = + _registerName1("setResourceValues:error:"); + bool _objc_msgSend_187( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + ffi.Pointer keyedValues, + ffi.Pointer> error, ) { - return __objc_msgSend_166( + return __objc_msgSend_187( obj, sel, - range, + keyedValues, + error, ); } - late final __objc_msgSend_166Ptr = _lookup< + late final __objc_msgSend_187Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); - void _objc_msgSend_167( + late final _sel_removeCachedResourceValueForKey_1 = + _registerName1("removeCachedResourceValueForKey:"); + void _objc_msgSend_188( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer otherArray, - NSRange otherRange, + NSURLResourceKey key, ) { - return __objc_msgSend_167( + return __objc_msgSend_188( obj, sel, - range, - otherArray, - otherRange, + key, ); } - late final __objc_msgSend_167Ptr = _lookup< + late final __objc_msgSend_188Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer, NSRange)>(); + NSURLResourceKey)>>('objc_msgSend'); + late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, NSURLResourceKey)>(); - late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:"); - void _objc_msgSend_168( + late final _sel_removeAllCachedResourceValues1 = + _registerName1("removeAllCachedResourceValues"); + late final _sel_setTemporaryResourceValue_forKey_1 = + _registerName1("setTemporaryResourceValue:forKey:"); + void _objc_msgSend_189( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer otherArray, + ffi.Pointer value, + NSURLResourceKey key, ) { - return __objc_msgSend_168( + return __objc_msgSend_189( obj, sel, - range, - otherArray, + value, + key, ); } - late final __objc_msgSend_168Ptr = _lookup< + late final __objc_msgSend_189Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>(); + ffi.Pointer, NSURLResourceKey)>>('objc_msgSend'); + late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSURLResourceKey)>(); - late final _sel_setArray_1 = _registerName1("setArray:"); - late final _sel_sortUsingFunction_context_1 = - _registerName1("sortUsingFunction:context:"); - void _objc_msgSend_169( + late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = + _registerName1( + "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); + ffi.Pointer _objc_msgSend_190( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context, + int options, + ffi.Pointer keys, + ffi.Pointer relativeURL, + ffi.Pointer> error, ) { - return __objc_msgSend_169( + return __objc_msgSend_190( obj, sel, - compare, - context, + options, + keys, + relativeURL, + error, ); } - late final __objc_msgSend_169Ptr = _lookup< + late final __objc_msgSend_190Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< - void Function( + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); - late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); - late final _sel_indexSet1 = _registerName1("indexSet"); - late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); - late final _sel_indexSetWithIndexesInRange_1 = - _registerName1("indexSetWithIndexesInRange:"); - instancetype _objc_msgSend_170( + late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = + _registerName1( + "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); + instancetype _objc_msgSend_191( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + ffi.Pointer bookmarkData, + int options, + ffi.Pointer relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error, ) { - return __objc_msgSend_170( + return __objc_msgSend_191( obj, sel, - range, + bookmarkData, + options, + relativeURL, + isStale, + error, ); } - late final __objc_msgSend_170Ptr = _lookup< + late final __objc_msgSend_191Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< instancetype Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_initWithIndexesInRange_1 = - _registerName1("initWithIndexesInRange:"); - late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); - instancetype _objc_msgSend_171( + late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = + _registerName1( + "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); + late final _sel_resourceValuesForKeys_fromBookmarkData_1 = + _registerName1("resourceValuesForKeys:fromBookmarkData:"); + ffi.Pointer _objc_msgSend_192( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexSet, + ffi.Pointer keys, + ffi.Pointer bookmarkData, ) { - return __objc_msgSend_171( + return __objc_msgSend_192( obj, sel, - indexSet, + keys, + bookmarkData, ); } - late final __objc_msgSend_171Ptr = _lookup< + late final __objc_msgSend_192Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); - late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); - bool _objc_msgSend_172( + late final _sel_writeBookmarkData_toURL_options_error_1 = + _registerName1("writeBookmarkData:toURL:options:error:"); + bool _objc_msgSend_193( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexSet, + ffi.Pointer bookmarkData, + ffi.Pointer bookmarkFileURL, + int options, + ffi.Pointer> error, ) { - return __objc_msgSend_172( + return __objc_msgSend_193( obj, sel, - indexSet, + bookmarkData, + bookmarkFileURL, + options, + error, ); } - late final __objc_msgSend_172Ptr = _lookup< + late final __objc_msgSend_193Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLBookmarkFileCreationOptions, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_firstIndex1 = _registerName1("firstIndex"); - late final _sel_lastIndex1 = _registerName1("lastIndex"); - late final _sel_indexGreaterThanIndex_1 = - _registerName1("indexGreaterThanIndex:"); - int _objc_msgSend_173( + late final _sel_bookmarkDataWithContentsOfURL_error_1 = + _registerName1("bookmarkDataWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_194( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer bookmarkFileURL, + ffi.Pointer> error, ) { - return __objc_msgSend_173( + return __objc_msgSend_194( obj, sel, - value, + bookmarkFileURL, + error, ); } - late final __objc_msgSend_173Ptr = _lookup< + late final __objc_msgSend_194Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); - late final _sel_indexGreaterThanOrEqualToIndex_1 = - _registerName1("indexGreaterThanOrEqualToIndex:"); - late final _sel_indexLessThanOrEqualToIndex_1 = - _registerName1("indexLessThanOrEqualToIndex:"); - late final _sel_getIndexes_maxCount_inIndexRange_1 = - _registerName1("getIndexes:maxCount:inIndexRange:"); - int _objc_msgSend_174( + late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = + _registerName1("URLByResolvingAliasFileAtURL:options:error:"); + instancetype _objc_msgSend_195( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexBuffer, - int bufferSize, - NSRangePointer range, + ffi.Pointer url, + int options, + ffi.Pointer> error, ) { - return __objc_msgSend_174( + return __objc_msgSend_195( obj, sel, - indexBuffer, - bufferSize, - range, + url, + options, + error, ); } - late final __objc_msgSend_174Ptr = _lookup< + late final __objc_msgSend_195Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRangePointer)>(); + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_countOfIndexesInRange_1 = - _registerName1("countOfIndexesInRange:"); - int _objc_msgSend_175( + late final _sel_startAccessingSecurityScopedResource1 = + _registerName1("startAccessingSecurityScopedResource"); + late final _sel_stopAccessingSecurityScopedResource1 = + _registerName1("stopAccessingSecurityScopedResource"); + late final _sel_getPromisedItemResourceValue_forKey_error_1 = + _registerName1("getPromisedItemResourceValue:forKey:error:"); + late final _sel_promisedItemResourceValuesForKeys_error_1 = + _registerName1("promisedItemResourceValuesForKeys:error:"); + late final _sel_checkPromisedItemIsReachableAndReturnError_1 = + _registerName1("checkPromisedItemIsReachableAndReturnError:"); + late final _sel_fileURLWithPathComponents_1 = + _registerName1("fileURLWithPathComponents:"); + ffi.Pointer _objc_msgSend_196( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + ffi.Pointer components, ) { - return __objc_msgSend_175( + return __objc_msgSend_196( obj, sel, - range, + components, ); } - late final __objc_msgSend_175Ptr = _lookup< + late final __objc_msgSend_196Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_containsIndex_1 = _registerName1("containsIndex:"); - bool _objc_msgSend_176( + late final _sel_pathComponents1 = _registerName1("pathComponents"); + late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); + late final _sel_pathExtension1 = _registerName1("pathExtension"); + late final _sel_URLByAppendingPathComponent_1 = + _registerName1("URLByAppendingPathComponent:"); + late final _sel_URLByAppendingPathComponent_isDirectory_1 = + _registerName1("URLByAppendingPathComponent:isDirectory:"); + late final _sel_URLByDeletingLastPathComponent1 = + _registerName1("URLByDeletingLastPathComponent"); + late final _sel_URLByAppendingPathExtension_1 = + _registerName1("URLByAppendingPathExtension:"); + late final _sel_URLByDeletingPathExtension1 = + _registerName1("URLByDeletingPathExtension"); + late final _sel_URLByStandardizingPath1 = + _registerName1("URLByStandardizingPath"); + late final _sel_URLByResolvingSymlinksInPath1 = + _registerName1("URLByResolvingSymlinksInPath"); + late final _sel_resourceDataUsingCache_1 = + _registerName1("resourceDataUsingCache:"); + ffi.Pointer _objc_msgSend_197( ffi.Pointer obj, ffi.Pointer sel, - int value, + bool shouldUseCache, ) { - return __objc_msgSend_176( + return __objc_msgSend_197( obj, sel, - value, + shouldUseCache, ); } - late final __objc_msgSend_176Ptr = _lookup< + late final __objc_msgSend_197Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); - late final _sel_containsIndexesInRange_1 = - _registerName1("containsIndexesInRange:"); - bool _objc_msgSend_177( + late final _sel_loadResourceDataNotifyingClient_usingCache_1 = + _registerName1("loadResourceDataNotifyingClient:usingCache:"); + void _objc_msgSend_198( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + ffi.Pointer client, + bool shouldUseCache, ) { - return __objc_msgSend_177( + return __objc_msgSend_198( obj, sel, - range, + client, + shouldUseCache, ); } - late final __objc_msgSend_177Ptr = _lookup< + late final __objc_msgSend_198Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); - late final _sel_intersectsIndexesInRange_1 = - _registerName1("intersectsIndexesInRange:"); - late final _sel_enumerateIndexesUsingBlock_1 = - _registerName1("enumerateIndexesUsingBlock:"); - void _objc_msgSend_178( + late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); + late final _sel_setResourceData_1 = _registerName1("setResourceData:"); + late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); + bool _objc_msgSend_199( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer property, + ffi.Pointer propertyKey, ) { - return __objc_msgSend_178( + return __objc_msgSend_199( obj, sel, - block, + property, + propertyKey, ); } - late final __objc_msgSend_178Ptr = _lookup< + late final __objc_msgSend_199Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateIndexesWithOptions_usingBlock_1 = - _registerName1("enumerateIndexesWithOptions:usingBlock:"); - void _objc_msgSend_179( + late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); + late final _sel_registerURLHandleClass_1 = + _registerName1("registerURLHandleClass:"); + void _objc_msgSend_200( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer anURLHandleSubclass, ) { - return __objc_msgSend_179( + return __objc_msgSend_200( obj, sel, - opts, - block, + anURLHandleSubclass, ); } - late final __objc_msgSend_179Ptr = _lookup< + late final __objc_msgSend_200Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_enumerateIndexesInRange_options_usingBlock_1 = - _registerName1("enumerateIndexesInRange:options:usingBlock:"); - void _objc_msgSend_180( + late final _sel_URLHandleClassForURL_1 = + _registerName1("URLHandleClassForURL:"); + ffi.Pointer _objc_msgSend_201( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer anURL, ) { - return __objc_msgSend_180( + return __objc_msgSend_201( obj, sel, - range, - opts, - block, + anURL, ); } - late final __objc_msgSend_180Ptr = _lookup< + late final __objc_msgSend_201Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); - int _objc_msgSend_181( + late final _sel_status1 = _registerName1("status"); + int _objc_msgSend_202( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_181( + return __objc_msgSend_202( obj, sel, - predicate, ); } - late final __objc_msgSend_181Ptr = _lookup< + late final __objc_msgSend_202Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_indexWithOptions_passingTest_1 = - _registerName1("indexWithOptions:passingTest:"); - int _objc_msgSend_182( + late final _sel_failureReason1 = _registerName1("failureReason"); + late final _sel_addClient_1 = _registerName1("addClient:"); + late final _sel_removeClient_1 = _registerName1("removeClient:"); + late final _sel_loadInBackground1 = _registerName1("loadInBackground"); + late final _sel_cancelLoadInBackground1 = + _registerName1("cancelLoadInBackground"); + late final _sel_resourceData1 = _registerName1("resourceData"); + late final _sel_availableResourceData1 = + _registerName1("availableResourceData"); + late final _sel_expectedResourceDataSize1 = + _registerName1("expectedResourceDataSize"); + late final _sel_flushCachedData1 = _registerName1("flushCachedData"); + late final _sel_backgroundLoadDidFailWithReason_1 = + _registerName1("backgroundLoadDidFailWithReason:"); + late final _sel_didLoadBytes_loadComplete_1 = + _registerName1("didLoadBytes:loadComplete:"); + void _objc_msgSend_203( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer newBytes, + bool yorn, ) { - return __objc_msgSend_182( + return __objc_msgSend_203( obj, sel, - opts, - predicate, + newBytes, + yorn, ); } - late final __objc_msgSend_182Ptr = _lookup< + late final __objc_msgSend_203Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_indexInRange_options_passingTest_1 = - _registerName1("indexInRange:options:passingTest:"); - int _objc_msgSend_183( + late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); + bool _objc_msgSend_204( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer anURL, ) { - return __objc_msgSend_183( + return __objc_msgSend_204( obj, sel, - range, - opts, - predicate, + anURL, ); } - late final __objc_msgSend_183Ptr = _lookup< + late final __objc_msgSend_204Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); - ffi.Pointer _objc_msgSend_184( + late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); + ffi.Pointer _objc_msgSend_205( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer anURL, ) { - return __objc_msgSend_184( + return __objc_msgSend_205( obj, sel, - predicate, + anURL, ); } - late final __objc_msgSend_184Ptr = _lookup< + late final __objc_msgSend_205Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_indexesWithOptions_passingTest_1 = - _registerName1("indexesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_185( + late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); + ffi.Pointer _objc_msgSend_206( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer anURL, + bool willCache, ) { - return __objc_msgSend_185( + return __objc_msgSend_206( obj, sel, - opts, - predicate, + anURL, + willCache, ); } - late final __objc_msgSend_185Ptr = _lookup< + late final __objc_msgSend_206Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, ffi.Pointer, bool)>(); - late final _sel_indexesInRange_options_passingTest_1 = - _registerName1("indexesInRange:options:passingTest:"); - ffi.Pointer _objc_msgSend_186( + late final _sel_propertyForKeyIfAvailable_1 = + _registerName1("propertyForKeyIfAvailable:"); + late final _sel_writeProperty_forKey_1 = + _registerName1("writeProperty:forKey:"); + late final _sel_writeData_1 = _registerName1("writeData:"); + late final _sel_loadInForeground1 = _registerName1("loadInForeground"); + late final _sel_beginLoadInBackground1 = + _registerName1("beginLoadInBackground"); + late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); + late final _sel_URLHandleUsingCache_1 = + _registerName1("URLHandleUsingCache:"); + ffi.Pointer _objc_msgSend_207( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + bool shouldUseCache, ) { - return __objc_msgSend_186( + return __objc_msgSend_207( obj, sel, - range, - opts, - predicate, + shouldUseCache, ); } - late final __objc_msgSend_186Ptr = _lookup< + late final __objc_msgSend_207Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_writeToFile_options_error_1 = + _registerName1("writeToFile:options:error:"); + bool _objc_msgSend_208( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + int writeOptionsMask, + ffi.Pointer> errorPtr, + ) { + return __objc_msgSend_208( + obj, + sel, + path, + writeOptionsMask, + errorPtr, + ); + } + + late final __objc_msgSend_208Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - NSRange, + ffi.Pointer, ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_enumerateRangesUsingBlock_1 = - _registerName1("enumerateRangesUsingBlock:"); - void _objc_msgSend_187( + late final _sel_writeToURL_options_error_1 = + _registerName1("writeToURL:options:error:"); + bool _objc_msgSend_209( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer url, + int writeOptionsMask, + ffi.Pointer> errorPtr, ) { - return __objc_msgSend_187( + return __objc_msgSend_209( obj, sel, - block, + url, + writeOptionsMask, + errorPtr, ); } - late final __objc_msgSend_187Ptr = _lookup< + late final __objc_msgSend_209Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_enumerateRangesWithOptions_usingBlock_1 = - _registerName1("enumerateRangesWithOptions:usingBlock:"); - void _objc_msgSend_188( + late final _sel_rangeOfData_options_range_1 = + _registerName1("rangeOfData:options:range:"); + NSRange _objc_msgSend_210( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer dataToFind, + int mask, + NSRange searchRange, ) { - return __objc_msgSend_188( + return __objc_msgSend_210( obj, sel, - opts, - block, + dataToFind, + mask, + searchRange, ); } - late final __objc_msgSend_188Ptr = _lookup< + late final __objc_msgSend_210Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - late final _sel_enumerateRangesInRange_options_usingBlock_1 = - _registerName1("enumerateRangesInRange:options:usingBlock:"); - void _objc_msgSend_189( + late final _sel_enumerateByteRangesUsingBlock_1 = + _registerName1("enumerateByteRangesUsingBlock:"); + void _objc_msgSend_211( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_189( + return __objc_msgSend_211( obj, sel, - range, - opts, block, ); } - late final __objc_msgSend_189Ptr = _lookup< + late final __objc_msgSend_211Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_insertObjects_atIndexes_1 = - _registerName1("insertObjects:atIndexes:"); - void _objc_msgSend_190( + late final _sel_data1 = _registerName1("data"); + late final _sel_dataWithBytes_length_1 = + _registerName1("dataWithBytes:length:"); + instancetype _objc_msgSend_212( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer indexes, + ffi.Pointer bytes, + int length, ) { - return __objc_msgSend_190( + return __objc_msgSend_212( obj, sel, - objects, - indexes, + bytes, + length, ); } - late final __objc_msgSend_190Ptr = _lookup< + late final __objc_msgSend_212Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_removeObjectsAtIndexes_1 = - _registerName1("removeObjectsAtIndexes:"); - void _objc_msgSend_191( + late final _sel_dataWithBytesNoCopy_length_1 = + _registerName1("dataWithBytesNoCopy:length:"); + late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = + _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); + instancetype _objc_msgSend_213( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexes, + ffi.Pointer bytes, + int length, + bool b, ) { - return __objc_msgSend_191( + return __objc_msgSend_213( obj, sel, - indexes, + bytes, + length, + b, ); } - late final __objc_msgSend_191Ptr = _lookup< + late final __objc_msgSend_213Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, bool)>(); - late final _sel_replaceObjectsAtIndexes_withObjects_1 = - _registerName1("replaceObjectsAtIndexes:withObjects:"); - void _objc_msgSend_192( + late final _sel_dataWithContentsOfFile_options_error_1 = + _registerName1("dataWithContentsOfFile:options:error:"); + instancetype _objc_msgSend_214( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexes, - ffi.Pointer objects, + ffi.Pointer path, + int readOptionsMask, + ffi.Pointer> errorPtr, ) { - return __objc_msgSend_192( + return __objc_msgSend_214( obj, sel, - indexes, - objects, + path, + readOptionsMask, + errorPtr, ); } - late final __objc_msgSend_192Ptr = _lookup< + late final __objc_msgSend_214Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_setObject_atIndexedSubscript_1 = - _registerName1("setObject:atIndexedSubscript:"); - late final _sel_sortUsingComparator_1 = - _registerName1("sortUsingComparator:"); - void _objc_msgSend_193( + late final _sel_dataWithContentsOfURL_options_error_1 = + _registerName1("dataWithContentsOfURL:options:error:"); + instancetype _objc_msgSend_215( ffi.Pointer obj, ffi.Pointer sel, - NSComparator cmptr, + ffi.Pointer url, + int readOptionsMask, + ffi.Pointer> errorPtr, ) { - return __objc_msgSend_193( + return __objc_msgSend_215( obj, sel, - cmptr, + url, + readOptionsMask, + errorPtr, ); } - late final __objc_msgSend_193Ptr = _lookup< + late final __objc_msgSend_215Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, NSComparator)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_sortWithOptions_usingComparator_1 = - _registerName1("sortWithOptions:usingComparator:"); - void _objc_msgSend_194( + late final _sel_dataWithContentsOfFile_1 = + _registerName1("dataWithContentsOfFile:"); + late final _sel_dataWithContentsOfURL_1 = + _registerName1("dataWithContentsOfURL:"); + late final _sel_initWithBytes_length_1 = + _registerName1("initWithBytes:length:"); + late final _sel_initWithBytesNoCopy_length_1 = + _registerName1("initWithBytesNoCopy:length:"); + late final _sel_initWithBytesNoCopy_length_freeWhenDone_1 = + _registerName1("initWithBytesNoCopy:length:freeWhenDone:"); + late final _sel_initWithBytesNoCopy_length_deallocator_1 = + _registerName1("initWithBytesNoCopy:length:deallocator:"); + instancetype _objc_msgSend_216( ffi.Pointer obj, ffi.Pointer sel, - int opts, - NSComparator cmptr, + ffi.Pointer bytes, + int length, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_194( + return __objc_msgSend_216( obj, sel, - opts, - cmptr, + bytes, + length, + deallocator, ); } - late final __objc_msgSend_194Ptr = _lookup< + late final __objc_msgSend_216Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, int, NSComparator)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); - ffi.Pointer _objc_msgSend_195( + late final _sel_initWithContentsOfFile_options_error_1 = + _registerName1("initWithContentsOfFile:options:error:"); + late final _sel_initWithContentsOfURL_options_error_1 = + _registerName1("initWithContentsOfURL:options:error:"); + late final _sel_initWithData_1 = _registerName1("initWithData:"); + instancetype _objc_msgSend_217( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer data, ) { - return __objc_msgSend_195( + return __objc_msgSend_217( obj, sel, - path, - ); - } - - late final __objc_msgSend_195Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_196( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_196( - obj, - sel, - url, + data, ); } - late final __objc_msgSend_196Ptr = _lookup< + late final __objc_msgSend_217Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_applyDifference_1 = _registerName1("applyDifference:"); - late final _class_NSMutableData1 = _getClass1("NSMutableData"); - late final _sel_mutableBytes1 = _registerName1("mutableBytes"); - late final _sel_setLength_1 = _registerName1("setLength:"); - void _objc_msgSend_197( + late final _sel_dataWithData_1 = _registerName1("dataWithData:"); + late final _sel_initWithBase64EncodedString_options_1 = + _registerName1("initWithBase64EncodedString:options:"); + instancetype _objc_msgSend_218( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer base64String, + int options, ) { - return __objc_msgSend_197( + return __objc_msgSend_218( obj, sel, - value, + base64String, + options, ); } - late final __objc_msgSend_197Ptr = _lookup< + late final __objc_msgSend_218Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); - late final _sel_appendData_1 = _registerName1("appendData:"); - void _objc_msgSend_198( + late final _sel_base64EncodedStringWithOptions_1 = + _registerName1("base64EncodedStringWithOptions:"); + ffi.Pointer _objc_msgSend_219( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, + int options, ) { - return __objc_msgSend_198( + return __objc_msgSend_219( obj, sel, - other, + options, ); } - late final __objc_msgSend_198Ptr = _lookup< + late final __objc_msgSend_219Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); - late final _sel_replaceBytesInRange_withBytes_1 = - _registerName1("replaceBytesInRange:withBytes:"); - void _objc_msgSend_199( + late final _sel_initWithBase64EncodedData_options_1 = + _registerName1("initWithBase64EncodedData:options:"); + instancetype _objc_msgSend_220( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer bytes, + ffi.Pointer base64Data, + int options, ) { - return __objc_msgSend_199( + return __objc_msgSend_220( obj, sel, - range, - bytes, + base64Data, + options, ); } - late final __objc_msgSend_199Ptr = _lookup< + late final __objc_msgSend_220Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); - late final _sel_setData_1 = _registerName1("setData:"); - late final _sel_replaceBytesInRange_withBytes_length_1 = - _registerName1("replaceBytesInRange:withBytes:length:"); - void _objc_msgSend_200( + late final _sel_base64EncodedDataWithOptions_1 = + _registerName1("base64EncodedDataWithOptions:"); + ffi.Pointer _objc_msgSend_221( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer replacementBytes, - int replacementLength, + int options, ) { - return __objc_msgSend_200( + return __objc_msgSend_221( obj, sel, - range, - replacementBytes, - replacementLength, + options, ); } - late final __objc_msgSend_200Ptr = _lookup< + late final __objc_msgSend_221Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); - late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); - late final _sel_initWithLength_1 = _registerName1("initWithLength:"); - late final _sel_decompressUsingAlgorithm_error_1 = - _registerName1("decompressUsingAlgorithm:error:"); - bool _objc_msgSend_201( + late final _sel_decompressedDataUsingAlgorithm_error_1 = + _registerName1("decompressedDataUsingAlgorithm:error:"); + instancetype _objc_msgSend_222( ffi.Pointer obj, ffi.Pointer sel, int algorithm, ffi.Pointer> error, ) { - return __objc_msgSend_201( + return __objc_msgSend_222( obj, sel, algorithm, @@ -5249,23617 +6079,86841 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_201Ptr = _lookup< + late final __objc_msgSend_222Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, + late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer>)>(); - late final _sel_compressUsingAlgorithm_error_1 = - _registerName1("compressUsingAlgorithm:error:"); - late final _class_NSPurgeableData1 = _getClass1("NSPurgeableData"); - late final _class_NSMutableDictionary1 = _getClass1("NSMutableDictionary"); - late final _sel_removeObjectForKey_1 = _registerName1("removeObjectForKey:"); - late final _sel_setObject_forKey_1 = _registerName1("setObject:forKey:"); - void _objc_msgSend_202( + late final _sel_compressedDataUsingAlgorithm_error_1 = + _registerName1("compressedDataUsingAlgorithm:error:"); + late final _sel_getBytes_1 = _registerName1("getBytes:"); + late final _sel_dataWithContentsOfMappedFile_1 = + _registerName1("dataWithContentsOfMappedFile:"); + late final _sel_initWithContentsOfMappedFile_1 = + _registerName1("initWithContentsOfMappedFile:"); + late final _sel_initWithBase64Encoding_1 = + _registerName1("initWithBase64Encoding:"); + late final _sel_base64Encoding1 = _registerName1("base64Encoding"); + late final _sel_characterSetWithBitmapRepresentation_1 = + _registerName1("characterSetWithBitmapRepresentation:"); + ffi.Pointer _objc_msgSend_223( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - ffi.Pointer aKey, + ffi.Pointer data, ) { - return __objc_msgSend_202( + return __objc_msgSend_223( obj, sel, - anObject, - aKey, + data, ); } - late final __objc_msgSend_202Ptr = _lookup< + late final __objc_msgSend_223Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_addEntriesFromDictionary_1 = - _registerName1("addEntriesFromDictionary:"); - void _objc_msgSend_203( + late final _sel_characterSetWithContentsOfFile_1 = + _registerName1("characterSetWithContentsOfFile:"); + late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); + bool _objc_msgSend_224( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherDictionary, + int aCharacter, ) { - return __objc_msgSend_203( + return __objc_msgSend_224( obj, sel, - otherDictionary, + aCharacter, ); } - late final __objc_msgSend_203Ptr = _lookup< + late final __objc_msgSend_224Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + unichar)>>('objc_msgSend'); + late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeObjectsForKeys_1 = - _registerName1("removeObjectsForKeys:"); - late final _sel_setDictionary_1 = _registerName1("setDictionary:"); - late final _sel_setObject_forKeyedSubscript_1 = - _registerName1("setObject:forKeyedSubscript:"); - late final _sel_dictionaryWithCapacity_1 = - _registerName1("dictionaryWithCapacity:"); - ffi.Pointer _objc_msgSend_204( + late final _sel_bitmapRepresentation1 = + _registerName1("bitmapRepresentation"); + late final _sel_invertedSet1 = _registerName1("invertedSet"); + late final _sel_longCharacterIsMember_1 = + _registerName1("longCharacterIsMember:"); + bool _objc_msgSend_225( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + int theLongChar, ) { - return __objc_msgSend_204( + return __objc_msgSend_225( obj, sel, - path, + theLongChar, ); } - late final __objc_msgSend_204Ptr = _lookup< + late final __objc_msgSend_225Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + UTF32Char)>>('objc_msgSend'); + late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer _objc_msgSend_205( + late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); + bool _objc_msgSend_226( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer theOtherSet, ) { - return __objc_msgSend_205( + return __objc_msgSend_226( obj, sel, - url, + theOtherSet, ); } - late final __objc_msgSend_205Ptr = _lookup< + late final __objc_msgSend_226Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_dictionaryWithSharedKeySet_1 = - _registerName1("dictionaryWithSharedKeySet:"); - ffi.Pointer _objc_msgSend_206( + late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); + bool _objc_msgSend_227( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keyset, + int thePlane, ) { - return __objc_msgSend_206( + return __objc_msgSend_227( obj, sel, - keyset, + thePlane, ); } - late final __objc_msgSend_206Ptr = _lookup< + late final __objc_msgSend_227Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Uint8)>>('objc_msgSend'); + late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); - late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); - late final _sel_supportsSecureCoding1 = - _registerName1("supportsSecureCoding"); - late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = - _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); - instancetype _objc_msgSend_207( + late final _sel_URLUserAllowedCharacterSet1 = + _registerName1("URLUserAllowedCharacterSet"); + late final _sel_URLPasswordAllowedCharacterSet1 = + _registerName1("URLPasswordAllowedCharacterSet"); + late final _sel_URLHostAllowedCharacterSet1 = + _registerName1("URLHostAllowedCharacterSet"); + late final _sel_URLPathAllowedCharacterSet1 = + _registerName1("URLPathAllowedCharacterSet"); + late final _sel_URLQueryAllowedCharacterSet1 = + _registerName1("URLQueryAllowedCharacterSet"); + late final _sel_URLFragmentAllowedCharacterSet1 = + _registerName1("URLFragmentAllowedCharacterSet"); + late final _sel_rangeOfCharacterFromSet_1 = + _registerName1("rangeOfCharacterFromSet:"); + NSRange _objc_msgSend_228( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer URL, - int cachePolicy, - double timeoutInterval, + ffi.Pointer searchSet, ) { - return __objc_msgSend_207( + return __objc_msgSend_228( obj, sel, - URL, - cachePolicy, - timeoutInterval, + searchSet, ); } - late final __objc_msgSend_207Ptr = _lookup< + late final __objc_msgSend_228Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, double)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_initWithURL_1 = _registerName1("initWithURL:"); - late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = - _registerName1("initWithURL:cachePolicy:timeoutInterval:"); - late final _sel_URL1 = _registerName1("URL"); - late final _sel_cachePolicy1 = _registerName1("cachePolicy"); - int _objc_msgSend_208( + late final _sel_rangeOfCharacterFromSet_options_1 = + _registerName1("rangeOfCharacterFromSet:options:"); + NSRange _objc_msgSend_229( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer searchSet, + int mask, ) { - return __objc_msgSend_208( + return __objc_msgSend_229( obj, sel, + searchSet, + mask, ); } - late final __objc_msgSend_208Ptr = _lookup< + late final __objc_msgSend_229Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); - late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); - late final _sel_networkServiceType1 = _registerName1("networkServiceType"); - int _objc_msgSend_209( + late final _sel_rangeOfCharacterFromSet_options_range_1 = + _registerName1("rangeOfCharacterFromSet:options:range:"); + NSRange _objc_msgSend_230( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer searchSet, + int mask, + NSRange rangeOfReceiverToSearch, ) { - return __objc_msgSend_209( + return __objc_msgSend_230( obj, sel, + searchSet, + mask, + rangeOfReceiverToSearch, ); } - late final __objc_msgSend_209Ptr = _lookup< + late final __objc_msgSend_230Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - late final _sel_allowsCellularAccess1 = - _registerName1("allowsCellularAccess"); - late final _sel_allowsExpensiveNetworkAccess1 = - _registerName1("allowsExpensiveNetworkAccess"); - late final _sel_allowsConstrainedNetworkAccess1 = - _registerName1("allowsConstrainedNetworkAccess"); - late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); - late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); - late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); - late final _sel_valueForHTTPHeaderField_1 = - _registerName1("valueForHTTPHeaderField:"); - late final _sel_HTTPBody1 = _registerName1("HTTPBody"); - late final _class_NSInputStream1 = _getClass1("NSInputStream"); - late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); - ffi.Pointer _objc_msgSend_210( + late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = + _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); + NSRange _objc_msgSend_231( ffi.Pointer obj, ffi.Pointer sel, + int index, ) { - return __objc_msgSend_210( + return __objc_msgSend_231( obj, sel, + index, ); } - late final __objc_msgSend_210Ptr = _lookup< + late final __objc_msgSend_231Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_HTTPShouldHandleCookies1 = - _registerName1("HTTPShouldHandleCookies"); - late final _sel_HTTPShouldUsePipelining1 = - _registerName1("HTTPShouldUsePipelining"); - late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); - late final _sel_setURL_1 = _registerName1("setURL:"); - void _objc_msgSend_211( + late final _sel_rangeOfComposedCharacterSequencesForRange_1 = + _registerName1("rangeOfComposedCharacterSequencesForRange:"); + NSRange _objc_msgSend_232( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + NSRange range, ) { - return __objc_msgSend_211( + return __objc_msgSend_232( obj, sel, - value, + range, ); } - late final __objc_msgSend_211Ptr = _lookup< + late final __objc_msgSend_232Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< + NSRange Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); - void _objc_msgSend_212( + late final _sel_stringByAppendingString_1 = + _registerName1("stringByAppendingString:"); + late final _sel_stringByAppendingFormat_1 = + _registerName1("stringByAppendingFormat:"); + late final _sel_uppercaseString1 = _registerName1("uppercaseString"); + late final _sel_lowercaseString1 = _registerName1("lowercaseString"); + late final _sel_capitalizedString1 = _registerName1("capitalizedString"); + late final _sel_localizedUppercaseString1 = + _registerName1("localizedUppercaseString"); + late final _sel_localizedLowercaseString1 = + _registerName1("localizedLowercaseString"); + late final _sel_localizedCapitalizedString1 = + _registerName1("localizedCapitalizedString"); + late final _sel_uppercaseStringWithLocale_1 = + _registerName1("uppercaseStringWithLocale:"); + ffi.Pointer _objc_msgSend_233( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer locale, ) { - return __objc_msgSend_212( + return __objc_msgSend_233( obj, sel, - value, + locale, ); } - late final __objc_msgSend_212Ptr = _lookup< + late final __objc_msgSend_233Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); - void _objc_msgSend_213( + late final _sel_lowercaseStringWithLocale_1 = + _registerName1("lowercaseStringWithLocale:"); + late final _sel_capitalizedStringWithLocale_1 = + _registerName1("capitalizedStringWithLocale:"); + late final _sel_getLineStart_end_contentsEnd_forRange_1 = + _registerName1("getLineStart:end:contentsEnd:forRange:"); + void _objc_msgSend_234( ffi.Pointer obj, ffi.Pointer sel, - double value, + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range, ) { - return __objc_msgSend_213( + return __objc_msgSend_234( obj, sel, - value, + startPtr, + lineEndPtr, + contentsEndPtr, + range, ); } - late final __objc_msgSend_213Ptr = _lookup< + late final __objc_msgSend_234Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); - - late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); - late final _sel_setNetworkServiceType_1 = - _registerName1("setNetworkServiceType:"); - void _objc_msgSend_214( + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange)>(); + + late final _sel_lineRangeForRange_1 = _registerName1("lineRangeForRange:"); + late final _sel_getParagraphStart_end_contentsEnd_forRange_1 = + _registerName1("getParagraphStart:end:contentsEnd:forRange:"); + late final _sel_paragraphRangeForRange_1 = + _registerName1("paragraphRangeForRange:"); + late final _sel_enumerateSubstringsInRange_options_usingBlock_1 = + _registerName1("enumerateSubstringsInRange:options:usingBlock:"); + void _objc_msgSend_235( ffi.Pointer obj, ffi.Pointer sel, - int value, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_214( + return __objc_msgSend_235( obj, sel, - value, + range, + opts, + block, ); } - late final __objc_msgSend_214Ptr = _lookup< + late final __objc_msgSend_235Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_setAllowsCellularAccess_1 = - _registerName1("setAllowsCellularAccess:"); - void _objc_msgSend_215( + late final _sel_enumerateLinesUsingBlock_1 = + _registerName1("enumerateLinesUsingBlock:"); + void _objc_msgSend_236( ffi.Pointer obj, ffi.Pointer sel, - bool value, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_215( + return __objc_msgSend_236( obj, sel, - value, + block, ); } - late final __objc_msgSend_215Ptr = _lookup< + late final __objc_msgSend_236Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_setAllowsExpensiveNetworkAccess_1 = - _registerName1("setAllowsExpensiveNetworkAccess:"); - late final _sel_setAllowsConstrainedNetworkAccess_1 = - _registerName1("setAllowsConstrainedNetworkAccess:"); - late final _sel_setAssumesHTTP3Capable_1 = - _registerName1("setAssumesHTTP3Capable:"); - late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); - void _objc_msgSend_216( + late final _sel_UTF8String1 = _registerName1("UTF8String"); + late final _sel_fastestEncoding1 = _registerName1("fastestEncoding"); + late final _sel_smallestEncoding1 = _registerName1("smallestEncoding"); + late final _sel_dataUsingEncoding_allowLossyConversion_1 = + _registerName1("dataUsingEncoding:allowLossyConversion:"); + ffi.Pointer _objc_msgSend_237( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + int encoding, + bool lossy, ) { - return __objc_msgSend_216( + return __objc_msgSend_237( obj, sel, - value, + encoding, + lossy, ); } - late final __objc_msgSend_216Ptr = _lookup< + late final __objc_msgSend_237Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSStringEncoding, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, bool)>(); - late final _sel_setAllHTTPHeaderFields_1 = - _registerName1("setAllHTTPHeaderFields:"); - void _objc_msgSend_217( + late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); + ffi.Pointer _objc_msgSend_238( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + int encoding, ) { - return __objc_msgSend_217( + return __objc_msgSend_238( obj, sel, - value, + encoding, ); } - late final __objc_msgSend_217Ptr = _lookup< + late final __objc_msgSend_238Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_setValue_forHTTPHeaderField_1 = - _registerName1("setValue:forHTTPHeaderField:"); - void _objc_msgSend_218( + late final _sel_canBeConvertedToEncoding_1 = + _registerName1("canBeConvertedToEncoding:"); + late final _sel_cStringUsingEncoding_1 = + _registerName1("cStringUsingEncoding:"); + ffi.Pointer _objc_msgSend_239( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer field, + int encoding, ) { - return __objc_msgSend_218( + return __objc_msgSend_239( obj, sel, - value, - field, + encoding, ); } - late final __objc_msgSend_218Ptr = _lookup< + late final __objc_msgSend_239Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_addValue_forHTTPHeaderField_1 = - _registerName1("addValue:forHTTPHeaderField:"); - late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); - void _objc_msgSend_219( + late final _sel_getCString_maxLength_encoding_1 = + _registerName1("getCString:maxLength:encoding:"); + bool _objc_msgSend_240( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer buffer, + int maxBufferCount, + int encoding, ) { - return __objc_msgSend_219( + return __objc_msgSend_240( obj, sel, - value, + buffer, + maxBufferCount, + encoding, ); } - late final __objc_msgSend_219Ptr = _lookup< + late final __objc_msgSend_240Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); - void _objc_msgSend_220( + late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1 = + _registerName1( + "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); + bool _objc_msgSend_241( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, + NSRange range, + NSRangePointer leftover, ) { - return __objc_msgSend_220( + return __objc_msgSend_241( obj, sel, - value, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, + range, + leftover, ); } - late final __objc_msgSend_220Ptr = _lookup< + late final __objc_msgSend_241Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setHTTPShouldHandleCookies_1 = - _registerName1("setHTTPShouldHandleCookies:"); - late final _sel_setHTTPShouldUsePipelining_1 = - _registerName1("setHTTPShouldUsePipelining:"); - - /// -1LL - late final ffi.Pointer _NSURLSessionTransferSizeUnknown = - _lookup('NSURLSessionTransferSizeUnknown'); - - int get NSURLSessionTransferSizeUnknown => - _NSURLSessionTransferSizeUnknown.value; - - set NSURLSessionTransferSizeUnknown(int value) => - _NSURLSessionTransferSizeUnknown.value = value; - - late final _class_NSURLSession1 = _getClass1("NSURLSession"); - late final _sel_sharedSession1 = _registerName1("sharedSession"); - ffi.Pointer _objc_msgSend_221( + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer, + NSStringEncoding, + ffi.Int32, + NSRange, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + int, + int, + NSRange, + NSRangePointer)>(); + + late final _sel_maximumLengthOfBytesUsingEncoding_1 = + _registerName1("maximumLengthOfBytesUsingEncoding:"); + late final _sel_lengthOfBytesUsingEncoding_1 = + _registerName1("lengthOfBytesUsingEncoding:"); + late final _sel_availableStringEncodings1 = + _registerName1("availableStringEncodings"); + ffi.Pointer _objc_msgSend_242( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_221( + return __objc_msgSend_242( obj, sel, ); } - late final __objc_msgSend_221Ptr = _lookup< + late final __objc_msgSend_242Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< - ffi.Pointer Function( + late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); - late final _class_NSURLSessionConfiguration1 = - _getClass1("NSURLSessionConfiguration"); - late final _sel_defaultSessionConfiguration1 = - _registerName1("defaultSessionConfiguration"); - ffi.Pointer _objc_msgSend_222( + late final _sel_localizedNameOfStringEncoding_1 = + _registerName1("localizedNameOfStringEncoding:"); + late final _sel_defaultCStringEncoding1 = + _registerName1("defaultCStringEncoding"); + late final _sel_decomposedStringWithCanonicalMapping1 = + _registerName1("decomposedStringWithCanonicalMapping"); + late final _sel_precomposedStringWithCanonicalMapping1 = + _registerName1("precomposedStringWithCanonicalMapping"); + late final _sel_decomposedStringWithCompatibilityMapping1 = + _registerName1("decomposedStringWithCompatibilityMapping"); + late final _sel_precomposedStringWithCompatibilityMapping1 = + _registerName1("precomposedStringWithCompatibilityMapping"); + late final _sel_componentsSeparatedByString_1 = + _registerName1("componentsSeparatedByString:"); + late final _sel_componentsSeparatedByCharactersInSet_1 = + _registerName1("componentsSeparatedByCharactersInSet:"); + ffi.Pointer _objc_msgSend_243( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer separator, ) { - return __objc_msgSend_222( + return __objc_msgSend_243( obj, sel, + separator, ); } - late final __objc_msgSend_222Ptr = _lookup< + late final __objc_msgSend_243Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_ephemeralSessionConfiguration1 = - _registerName1("ephemeralSessionConfiguration"); - late final _sel_backgroundSessionConfigurationWithIdentifier_1 = - _registerName1("backgroundSessionConfigurationWithIdentifier:"); - ffi.Pointer _objc_msgSend_223( + late final _sel_stringByTrimmingCharactersInSet_1 = + _registerName1("stringByTrimmingCharactersInSet:"); + ffi.Pointer _objc_msgSend_244( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer identifier, + ffi.Pointer set1, ) { - return __objc_msgSend_223( + return __objc_msgSend_244( obj, sel, - identifier, + set1, ); } - late final __objc_msgSend_223Ptr = _lookup< + late final __objc_msgSend_244Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< + late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_identifier1 = _registerName1("identifier"); - late final _sel_requestCachePolicy1 = _registerName1("requestCachePolicy"); - late final _sel_setRequestCachePolicy_1 = - _registerName1("setRequestCachePolicy:"); - late final _sel_timeoutIntervalForRequest1 = - _registerName1("timeoutIntervalForRequest"); - late final _sel_setTimeoutIntervalForRequest_1 = - _registerName1("setTimeoutIntervalForRequest:"); - late final _sel_timeoutIntervalForResource1 = - _registerName1("timeoutIntervalForResource"); - late final _sel_setTimeoutIntervalForResource_1 = - _registerName1("setTimeoutIntervalForResource:"); - late final _sel_waitsForConnectivity1 = - _registerName1("waitsForConnectivity"); - late final _sel_setWaitsForConnectivity_1 = - _registerName1("setWaitsForConnectivity:"); - late final _sel_isDiscretionary1 = _registerName1("isDiscretionary"); - late final _sel_setDiscretionary_1 = _registerName1("setDiscretionary:"); - late final _sel_sharedContainerIdentifier1 = - _registerName1("sharedContainerIdentifier"); - late final _sel_setSharedContainerIdentifier_1 = - _registerName1("setSharedContainerIdentifier:"); - late final _sel_sessionSendsLaunchEvents1 = - _registerName1("sessionSendsLaunchEvents"); - late final _sel_setSessionSendsLaunchEvents_1 = - _registerName1("setSessionSendsLaunchEvents:"); - late final _sel_connectionProxyDictionary1 = - _registerName1("connectionProxyDictionary"); - late final _sel_setConnectionProxyDictionary_1 = - _registerName1("setConnectionProxyDictionary:"); - late final _sel_TLSMinimumSupportedProtocol1 = - _registerName1("TLSMinimumSupportedProtocol"); - int _objc_msgSend_224( + late final _sel_stringByPaddingToLength_withString_startingAtIndex_1 = + _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); + ffi.Pointer _objc_msgSend_245( ffi.Pointer obj, ffi.Pointer sel, + int newLength, + ffi.Pointer padString, + int padIndex, ) { - return __objc_msgSend_224( + return __objc_msgSend_245( obj, sel, + newLength, + padString, + padIndex, ); } - late final __objc_msgSend_224Ptr = _lookup< + late final __objc_msgSend_245Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); - late final _sel_setTLSMinimumSupportedProtocol_1 = - _registerName1("setTLSMinimumSupportedProtocol:"); - void _objc_msgSend_225( + late final _sel_stringByFoldingWithOptions_locale_1 = + _registerName1("stringByFoldingWithOptions:locale:"); + ffi.Pointer _objc_msgSend_246( ffi.Pointer obj, ffi.Pointer sel, - int value, + int options, + ffi.Pointer locale, ) { - return __objc_msgSend_225( + return __objc_msgSend_246( obj, sel, - value, + options, + locale, ); } - late final __objc_msgSend_225Ptr = _lookup< + late final __objc_msgSend_246Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); - late final _sel_TLSMaximumSupportedProtocol1 = - _registerName1("TLSMaximumSupportedProtocol"); - late final _sel_setTLSMaximumSupportedProtocol_1 = - _registerName1("setTLSMaximumSupportedProtocol:"); - late final _sel_TLSMinimumSupportedProtocolVersion1 = - _registerName1("TLSMinimumSupportedProtocolVersion"); - int _objc_msgSend_226( + late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_1 = + _registerName1( + "stringByReplacingOccurrencesOfString:withString:options:range:"); + ffi.Pointer _objc_msgSend_247( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer replacement, + int options, + NSRange searchRange, ) { - return __objc_msgSend_226( + return __objc_msgSend_247( obj, sel, + target, + replacement, + options, + searchRange, ); } - late final __objc_msgSend_226Ptr = _lookup< + late final __objc_msgSend_247Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + NSRange)>(); - late final _sel_setTLSMinimumSupportedProtocolVersion_1 = - _registerName1("setTLSMinimumSupportedProtocolVersion:"); - void _objc_msgSend_227( + late final _sel_stringByReplacingOccurrencesOfString_withString_1 = + _registerName1("stringByReplacingOccurrencesOfString:withString:"); + ffi.Pointer _objc_msgSend_248( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer target, + ffi.Pointer replacement, ) { - return __objc_msgSend_227( + return __objc_msgSend_248( obj, sel, - value, + target, + replacement, ); } - late final __objc_msgSend_227Ptr = _lookup< + late final __objc_msgSend_248Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_TLSMaximumSupportedProtocolVersion1 = - _registerName1("TLSMaximumSupportedProtocolVersion"); - late final _sel_setTLSMaximumSupportedProtocolVersion_1 = - _registerName1("setTLSMaximumSupportedProtocolVersion:"); - late final _sel_HTTPShouldSetCookies1 = - _registerName1("HTTPShouldSetCookies"); - late final _sel_setHTTPShouldSetCookies_1 = - _registerName1("setHTTPShouldSetCookies:"); - late final _sel_HTTPCookieAcceptPolicy1 = - _registerName1("HTTPCookieAcceptPolicy"); - int _objc_msgSend_228( + late final _sel_stringByReplacingCharactersInRange_withString_1 = + _registerName1("stringByReplacingCharactersInRange:withString:"); + ffi.Pointer _objc_msgSend_249( ffi.Pointer obj, ffi.Pointer sel, + NSRange range, + ffi.Pointer replacement, ) { - return __objc_msgSend_228( + return __objc_msgSend_249( obj, sel, + range, + replacement, ); } - late final __objc_msgSend_228Ptr = _lookup< + late final __objc_msgSend_249Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange, ffi.Pointer)>(); - late final _sel_setHTTPCookieAcceptPolicy_1 = - _registerName1("setHTTPCookieAcceptPolicy:"); - void _objc_msgSend_229( + late final _sel_stringByApplyingTransform_reverse_1 = + _registerName1("stringByApplyingTransform:reverse:"); + ffi.Pointer _objc_msgSend_250( ffi.Pointer obj, ffi.Pointer sel, - int value, + NSStringTransform transform, + bool reverse, ) { - return __objc_msgSend_229( + return __objc_msgSend_250( obj, sel, - value, + transform, + reverse, ); } - late final __objc_msgSend_229Ptr = _lookup< + late final __objc_msgSend_250Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSStringTransform, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringTransform, bool)>(); - late final _sel_HTTPAdditionalHeaders1 = - _registerName1("HTTPAdditionalHeaders"); - late final _sel_setHTTPAdditionalHeaders_1 = - _registerName1("setHTTPAdditionalHeaders:"); - late final _sel_HTTPMaximumConnectionsPerHost1 = - _registerName1("HTTPMaximumConnectionsPerHost"); - late final _sel_setHTTPMaximumConnectionsPerHost_1 = - _registerName1("setHTTPMaximumConnectionsPerHost:"); - void _objc_msgSend_230( + late final _sel_writeToURL_atomically_encoding_error_1 = + _registerName1("writeToURL:atomically:encoding:error:"); + bool _objc_msgSend_251( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer url, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_230( + return __objc_msgSend_251( obj, sel, - value, + url, + useAuxiliaryFile, + enc, + error, ); } - late final __objc_msgSend_230Ptr = _lookup< + late final __objc_msgSend_251Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); - late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); - late final _sel_sharedHTTPCookieStorage1 = - _registerName1("sharedHTTPCookieStorage"); - ffi.Pointer _objc_msgSend_231( + late final _sel_writeToFile_atomically_encoding_error_1 = + _registerName1("writeToFile:atomically:encoding:error:"); + bool _objc_msgSend_252( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_231( + return __objc_msgSend_252( obj, sel, + path, + useAuxiliaryFile, + enc, + error, ); } - late final __objc_msgSend_231Ptr = _lookup< + late final __objc_msgSend_252Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); - late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = - _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); - ffi.Pointer _objc_msgSend_232( + late final _sel_initWithCharactersNoCopy_length_freeWhenDone_1 = + _registerName1("initWithCharactersNoCopy:length:freeWhenDone:"); + instancetype _objc_msgSend_253( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer identifier, + ffi.Pointer characters, + int length, + bool freeBuffer, ) { - return __objc_msgSend_232( + return __objc_msgSend_253( obj, sel, - identifier, + characters, + length, + freeBuffer, ); } - late final __objc_msgSend_232Ptr = _lookup< + late final __objc_msgSend_253Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, bool)>(); - late final _sel_cookies1 = _registerName1("cookies"); - late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); - late final _sel_setCookie_1 = _registerName1("setCookie:"); - void _objc_msgSend_233( + late final _sel_initWithCharactersNoCopy_length_deallocator_1 = + _registerName1("initWithCharactersNoCopy:length:deallocator:"); + instancetype _objc_msgSend_254( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer cookie, + ffi.Pointer chars, + int len, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_233( + return __objc_msgSend_254( obj, sel, - cookie, + chars, + len, + deallocator, ); } - late final __objc_msgSend_233Ptr = _lookup< + late final __objc_msgSend_254Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); - late final _class_NSDate1 = _getClass1("NSDate"); - late final _sel_timeIntervalSinceReferenceDate1 = - _registerName1("timeIntervalSinceReferenceDate"); - late final _sel_initWithTimeIntervalSinceReferenceDate_1 = - _registerName1("initWithTimeIntervalSinceReferenceDate:"); - instancetype _objc_msgSend_234( + late final _sel_initWithCharacters_length_1 = + _registerName1("initWithCharacters:length:"); + instancetype _objc_msgSend_255( ffi.Pointer obj, ffi.Pointer sel, - double ti, + ffi.Pointer characters, + int length, ) { - return __objc_msgSend_234( + return __objc_msgSend_255( obj, sel, - ti, + characters, + length, ); } - late final __objc_msgSend_234Ptr = _lookup< + late final __objc_msgSend_255Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, double)>(); + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_removeCookiesSinceDate_1 = - _registerName1("removeCookiesSinceDate:"); - void _objc_msgSend_235( + late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); + instancetype _objc_msgSend_256( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer date, + ffi.Pointer nullTerminatedCString, ) { - return __objc_msgSend_235( + return __objc_msgSend_256( obj, sel, - date, + nullTerminatedCString, ); } - late final __objc_msgSend_235Ptr = _lookup< + late final __objc_msgSend_256Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); - late final _sel_setCookies_forURL_mainDocumentURL_1 = - _registerName1("setCookies:forURL:mainDocumentURL:"); - void _objc_msgSend_236( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer URL, - ffi.Pointer mainDocumentURL, - ) { - return __objc_msgSend_236( - obj, - sel, - cookies, - URL, - mainDocumentURL, - ); - } - - late final __objc_msgSend_236Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); - late final _sel_setCookieAcceptPolicy_1 = - _registerName1("setCookieAcceptPolicy:"); - late final _sel_sortedCookiesUsingDescriptors_1 = - _registerName1("sortedCookiesUsingDescriptors:"); - late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); - late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); - late final _sel_originalRequest1 = _registerName1("originalRequest"); - ffi.Pointer _objc_msgSend_237( + late final _sel_initWithFormat_1 = _registerName1("initWithFormat:"); + late final _sel_initWithFormat_arguments_1 = + _registerName1("initWithFormat:arguments:"); + instancetype _objc_msgSend_257( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer format, + va_list argList, ) { - return __objc_msgSend_237( + return __objc_msgSend_257( obj, sel, + format, + argList, ); } - late final __objc_msgSend_237Ptr = _lookup< + late final __objc_msgSend_257Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, va_list)>>('objc_msgSend'); + late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, va_list)>(); - late final _sel_currentRequest1 = _registerName1("currentRequest"); - late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); - late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = - _registerName1( - "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); - instancetype _objc_msgSend_238( + late final _sel_initWithFormat_locale_1 = + _registerName1("initWithFormat:locale:"); + instancetype _objc_msgSend_258( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer URL, - ffi.Pointer MIMEType, - int length, - ffi.Pointer name, + ffi.Pointer format, + ffi.Pointer locale, ) { - return __objc_msgSend_238( + return __objc_msgSend_258( obj, sel, - URL, - MIMEType, - length, - name, + format, + locale, ); } - late final __objc_msgSend_238Ptr = _lookup< + late final __objc_msgSend_258Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_MIMEType1 = _registerName1("MIMEType"); - late final _sel_expectedContentLength1 = - _registerName1("expectedContentLength"); - late final _sel_textEncodingName1 = _registerName1("textEncodingName"); - late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); - late final _sel_response1 = _registerName1("response"); - ffi.Pointer _objc_msgSend_239( + late final _sel_initWithFormat_locale_arguments_1 = + _registerName1("initWithFormat:locale:arguments:"); + instancetype _objc_msgSend_259( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer locale, + va_list argList, ) { - return __objc_msgSend_239( + return __objc_msgSend_259( obj, sel, + format, + locale, + argList, ); } - late final __objc_msgSend_239Ptr = _lookup< + late final __objc_msgSend_259Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + va_list)>>('objc_msgSend'); + late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, va_list)>(); - late final _class_NSProgress1 = _getClass1("NSProgress"); - late final _sel_currentProgress1 = _registerName1("currentProgress"); - ffi.Pointer _objc_msgSend_240( + late final _sel_initWithData_encoding_1 = + _registerName1("initWithData:encoding:"); + instancetype _objc_msgSend_260( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer data, + int encoding, ) { - return __objc_msgSend_240( + return __objc_msgSend_260( obj, sel, + data, + encoding, ); } - late final __objc_msgSend_240Ptr = _lookup< + late final __objc_msgSend_260Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_progressWithTotalUnitCount_1 = - _registerName1("progressWithTotalUnitCount:"); - ffi.Pointer _objc_msgSend_241( + late final _sel_initWithBytes_length_encoding_1 = + _registerName1("initWithBytes:length:encoding:"); + instancetype _objc_msgSend_261( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, + ffi.Pointer bytes, + int len, + int encoding, ) { - return __objc_msgSend_241( + return __objc_msgSend_261( obj, sel, - unitCount, + bytes, + len, + encoding, ); } - late final __objc_msgSend_241Ptr = _lookup< + late final __objc_msgSend_261Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - late final _sel_discreteProgressWithTotalUnitCount_1 = - _registerName1("discreteProgressWithTotalUnitCount:"); - late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = - _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); - ffi.Pointer _objc_msgSend_242( + late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = + _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); + instancetype _objc_msgSend_262( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, - ffi.Pointer parent, - int portionOfParentTotalUnitCount, + ffi.Pointer bytes, + int len, + int encoding, + bool freeBuffer, ) { - return __objc_msgSend_242( + return __objc_msgSend_262( obj, sel, - unitCount, - parent, - portionOfParentTotalUnitCount, + bytes, + len, + encoding, + freeBuffer, ); } - late final __objc_msgSend_242Ptr = _lookup< + late final __objc_msgSend_262Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Int64, - ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); + ffi.Pointer, + NSUInteger, + NSStringEncoding, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, bool)>(); - late final _sel_initWithParent_userInfo_1 = - _registerName1("initWithParent:userInfo:"); - instancetype _objc_msgSend_243( + late final _sel_initWithBytesNoCopy_length_encoding_deallocator_1 = + _registerName1("initWithBytesNoCopy:length:encoding:deallocator:"); + instancetype _objc_msgSend_263( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer parentProgressOrNil, - ffi.Pointer userInfoOrNil, + ffi.Pointer bytes, + int len, + int encoding, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_243( + return __objc_msgSend_263( obj, sel, - parentProgressOrNil, - userInfoOrNil, + bytes, + len, + encoding, + deallocator, ); } - late final __objc_msgSend_243Ptr = _lookup< + late final __objc_msgSend_263Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< + ffi.Pointer, + NSUInteger, + NSStringEncoding, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_becomeCurrentWithPendingUnitCount_1 = - _registerName1("becomeCurrentWithPendingUnitCount:"); - void _objc_msgSend_244( + late final _sel_string1 = _registerName1("string"); + late final _sel_stringWithString_1 = _registerName1("stringWithString:"); + late final _sel_stringWithCharacters_length_1 = + _registerName1("stringWithCharacters:length:"); + late final _sel_stringWithUTF8String_1 = + _registerName1("stringWithUTF8String:"); + late final _sel_stringWithFormat_1 = _registerName1("stringWithFormat:"); + late final _sel_localizedStringWithFormat_1 = + _registerName1("localizedStringWithFormat:"); + late final _sel_initWithCString_encoding_1 = + _registerName1("initWithCString:encoding:"); + instancetype _objc_msgSend_264( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, + ffi.Pointer nullTerminatedCString, + int encoding, ) { - return __objc_msgSend_244( + return __objc_msgSend_264( obj, sel, - unitCount, + nullTerminatedCString, + encoding, ); } - late final __objc_msgSend_244Ptr = _lookup< + late final __objc_msgSend_264Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = - _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); - void _objc_msgSend_245( + late final _sel_stringWithCString_encoding_1 = + _registerName1("stringWithCString:encoding:"); + late final _sel_initWithContentsOfURL_encoding_error_1 = + _registerName1("initWithContentsOfURL:encoding:error:"); + instancetype _objc_msgSend_265( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, - ffi.Pointer<_ObjCBlock> work, + ffi.Pointer url, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_245( + return __objc_msgSend_265( obj, sel, - unitCount, - work, + url, + enc, + error, ); } - late final __objc_msgSend_245Ptr = _lookup< + late final __objc_msgSend_265Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_resignCurrent1 = _registerName1("resignCurrent"); - late final _sel_addChild_withPendingUnitCount_1 = - _registerName1("addChild:withPendingUnitCount:"); - void _objc_msgSend_246( + late final _sel_initWithContentsOfFile_encoding_error_1 = + _registerName1("initWithContentsOfFile:encoding:error:"); + instancetype _objc_msgSend_266( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer child, - int inUnitCount, + ffi.Pointer path, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_246( + return __objc_msgSend_266( obj, sel, - child, - inUnitCount, + path, + enc, + error, ); } - late final __objc_msgSend_246Ptr = _lookup< + late final __objc_msgSend_266Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); - int _objc_msgSend_247( + late final _sel_stringWithContentsOfURL_encoding_error_1 = + _registerName1("stringWithContentsOfURL:encoding:error:"); + late final _sel_stringWithContentsOfFile_encoding_error_1 = + _registerName1("stringWithContentsOfFile:encoding:error:"); + late final _sel_initWithContentsOfURL_usedEncoding_error_1 = + _registerName1("initWithContentsOfURL:usedEncoding:error:"); + instancetype _objc_msgSend_267( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer enc, + ffi.Pointer> error, ) { - return __objc_msgSend_247( + return __objc_msgSend_267( obj, sel, + url, + enc, + error, ); } - late final __objc_msgSend_247Ptr = _lookup< + late final __objc_msgSend_267Ptr = _lookup< ffi.NativeFunction< - ffi.Int64 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); - void _objc_msgSend_248( + late final _sel_initWithContentsOfFile_usedEncoding_error_1 = + _registerName1("initWithContentsOfFile:usedEncoding:error:"); + instancetype _objc_msgSend_268( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer path, + ffi.Pointer enc, + ffi.Pointer> error, ) { - return __objc_msgSend_248( + return __objc_msgSend_268( obj, sel, - value, + path, + enc, + error, ); } - late final __objc_msgSend_248Ptr = _lookup< + late final __objc_msgSend_268Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); - late final _sel_setCompletedUnitCount_1 = - _registerName1("setCompletedUnitCount:"); - late final _sel_setLocalizedDescription_1 = - _registerName1("setLocalizedDescription:"); - late final _sel_localizedAdditionalDescription1 = - _registerName1("localizedAdditionalDescription"); - late final _sel_setLocalizedAdditionalDescription_1 = - _registerName1("setLocalizedAdditionalDescription:"); - late final _sel_isCancellable1 = _registerName1("isCancellable"); - late final _sel_setCancellable_1 = _registerName1("setCancellable:"); - late final _sel_isPausable1 = _registerName1("isPausable"); - late final _sel_setPausable_1 = _registerName1("setPausable:"); - late final _sel_isCancelled1 = _registerName1("isCancelled"); - late final _sel_isPaused1 = _registerName1("isPaused"); - late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_249( + late final _sel_stringWithContentsOfURL_usedEncoding_error_1 = + _registerName1("stringWithContentsOfURL:usedEncoding:error:"); + late final _sel_stringWithContentsOfFile_usedEncoding_error_1 = + _registerName1("stringWithContentsOfFile:usedEncoding:error:"); + late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1 = + _registerName1( + "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); + int _objc_msgSend_269( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer data, + ffi.Pointer opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion, ) { - return __objc_msgSend_249( + return __objc_msgSend_269( obj, sel, + data, + opts, + string, + usedLossyConversion, ); } - late final __objc_msgSend_249Ptr = _lookup< + late final __objc_msgSend_269Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setCancellationHandler_1 = - _registerName1("setCancellationHandler:"); - void _objc_msgSend_250( + NSStringEncoding Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); + + late final _sel_propertyList1 = _registerName1("propertyList"); + late final _sel_propertyListFromStringsFileFormat1 = + _registerName1("propertyListFromStringsFileFormat"); + late final _sel_cString1 = _registerName1("cString"); + late final _sel_lossyCString1 = _registerName1("lossyCString"); + late final _sel_cStringLength1 = _registerName1("cStringLength"); + late final _sel_getCString_1 = _registerName1("getCString:"); + void _objc_msgSend_270( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, + ffi.Pointer bytes, ) { - return __objc_msgSend_250( + return __objc_msgSend_270( obj, sel, - value, + bytes, ); } - late final __objc_msgSend_250Ptr = _lookup< + late final __objc_msgSend_270Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer)>(); - late final _sel_pausingHandler1 = _registerName1("pausingHandler"); - late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); - late final _sel_resumingHandler1 = _registerName1("resumingHandler"); - late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); - late final _sel_setUserInfoObject_forKey_1 = - _registerName1("setUserInfoObject:forKey:"); - late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); - late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); - late final _sel_isFinished1 = _registerName1("isFinished"); - late final _sel_cancel1 = _registerName1("cancel"); - late final _sel_pause1 = _registerName1("pause"); - late final _sel_resume1 = _registerName1("resume"); - late final _sel_kind1 = _registerName1("kind"); - late final _sel_setKind_1 = _registerName1("setKind:"); - late final _sel_estimatedTimeRemaining1 = - _registerName1("estimatedTimeRemaining"); - late final _sel_setEstimatedTimeRemaining_1 = - _registerName1("setEstimatedTimeRemaining:"); - void _objc_msgSend_251( + late final _sel_getCString_maxLength_1 = + _registerName1("getCString:maxLength:"); + void _objc_msgSend_271( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer bytes, + int maxLength, ) { - return __objc_msgSend_251( + return __objc_msgSend_271( obj, sel, - value, + bytes, + maxLength, ); } - late final __objc_msgSend_251Ptr = _lookup< + late final __objc_msgSend_271Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, int)>(); - late final _sel_throughput1 = _registerName1("throughput"); - late final _sel_setThroughput_1 = _registerName1("setThroughput:"); - late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); - late final _sel_setFileOperationKind_1 = - _registerName1("setFileOperationKind:"); - late final _sel_fileURL1 = _registerName1("fileURL"); - late final _sel_setFileURL_1 = _registerName1("setFileURL:"); - late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); - late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); - late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); - late final _sel_setFileCompletedCount_1 = - _registerName1("setFileCompletedCount:"); - late final _sel_publish1 = _registerName1("publish"); - late final _sel_unpublish1 = _registerName1("unpublish"); - late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = - _registerName1("addSubscriberForFileURL:withPublishingHandler:"); - ffi.Pointer _objc_msgSend_252( + late final _sel_getCString_maxLength_range_remainingRange_1 = + _registerName1("getCString:maxLength:range:remainingRange:"); + void _objc_msgSend_272( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - NSProgressPublishingHandler publishingHandler, + ffi.Pointer bytes, + int maxLength, + NSRange aRange, + NSRangePointer leftoverRange, ) { - return __objc_msgSend_252( + return __objc_msgSend_272( obj, sel, - url, - publishingHandler, + bytes, + maxLength, + aRange, + leftoverRange, ); } - late final __objc_msgSend_252Ptr = _lookup< + late final __objc_msgSend_272Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>>('objc_msgSend'); - late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>(); - - late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); - late final _sel_isOld1 = _registerName1("isOld"); - late final _sel_progress1 = _registerName1("progress"); - late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); - ffi.Pointer _objc_msgSend_253( + ffi.Pointer, + NSUInteger, + NSRange, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange, NSRangePointer)>(); + + late final _sel_stringWithContentsOfFile_1 = + _registerName1("stringWithContentsOfFile:"); + late final _sel_stringWithContentsOfURL_1 = + _registerName1("stringWithContentsOfURL:"); + late final _sel_initWithCStringNoCopy_length_freeWhenDone_1 = + _registerName1("initWithCStringNoCopy:length:freeWhenDone:"); + ffi.Pointer _objc_msgSend_273( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer bytes, + int length, + bool freeBuffer, ) { - return __objc_msgSend_253( + return __objc_msgSend_273( obj, sel, + bytes, + length, + freeBuffer, ); } - late final __objc_msgSend_253Ptr = _lookup< + late final __objc_msgSend_273Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setEarliestBeginDate_1 = - _registerName1("setEarliestBeginDate:"); - void _objc_msgSend_254( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, bool)>(); + + late final _sel_initWithCString_length_1 = + _registerName1("initWithCString:length:"); + late final _sel_initWithCString_1 = _registerName1("initWithCString:"); + late final _sel_stringWithCString_length_1 = + _registerName1("stringWithCString:length:"); + late final _sel_stringWithCString_1 = _registerName1("stringWithCString:"); + late final _sel_getCharacters_1 = _registerName1("getCharacters:"); + void _objc_msgSend_274( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer buffer, ) { - return __objc_msgSend_254( + return __objc_msgSend_274( obj, sel, - value, + buffer, ); } - late final __objc_msgSend_254Ptr = _lookup< + late final __objc_msgSend_274Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer)>(); - late final _sel_countOfBytesClientExpectsToSend1 = - _registerName1("countOfBytesClientExpectsToSend"); - late final _sel_setCountOfBytesClientExpectsToSend_1 = - _registerName1("setCountOfBytesClientExpectsToSend:"); - late final _sel_countOfBytesClientExpectsToReceive1 = - _registerName1("countOfBytesClientExpectsToReceive"); - late final _sel_setCountOfBytesClientExpectsToReceive_1 = - _registerName1("setCountOfBytesClientExpectsToReceive:"); - late final _sel_countOfBytesReceived1 = - _registerName1("countOfBytesReceived"); - late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); - late final _sel_countOfBytesExpectedToSend1 = - _registerName1("countOfBytesExpectedToSend"); - late final _sel_countOfBytesExpectedToReceive1 = - _registerName1("countOfBytesExpectedToReceive"); - late final _sel_taskDescription1 = _registerName1("taskDescription"); - late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); - late final _sel_state1 = _registerName1("state"); - int _objc_msgSend_255( + late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = + _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); + late final _sel_stringByRemovingPercentEncoding1 = + _registerName1("stringByRemovingPercentEncoding"); + late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = + _registerName1("stringByAddingPercentEscapesUsingEncoding:"); + late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = + _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); + late final _sel_debugDescription1 = _registerName1("debugDescription"); + late final _sel_version1 = _registerName1("version"); + late final _sel_setVersion_1 = _registerName1("setVersion:"); + void _objc_msgSend_275( ffi.Pointer obj, ffi.Pointer sel, + int aVersion, ) { - return __objc_msgSend_255( + return __objc_msgSend_275( obj, sel, + aVersion, ); } - late final __objc_msgSend_255Ptr = _lookup< + late final __objc_msgSend_275Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_error1 = _registerName1("error"); - ffi.Pointer _objc_msgSend_256( + late final _sel_classForCoder1 = _registerName1("classForCoder"); + late final _sel_replacementObjectForCoder_1 = + _registerName1("replacementObjectForCoder:"); + late final _sel_awakeAfterUsingCoder_1 = + _registerName1("awakeAfterUsingCoder:"); + late final _sel_poseAsClass_1 = _registerName1("poseAsClass:"); + late final _sel_autoContentAccessingProxy1 = + _registerName1("autoContentAccessingProxy"); + late final _sel_URL_resourceDataDidBecomeAvailable_1 = + _registerName1("URL:resourceDataDidBecomeAvailable:"); + void _objc_msgSend_276( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer sender, + ffi.Pointer newBytes, ) { - return __objc_msgSend_256( + return __objc_msgSend_276( obj, sel, + sender, + newBytes, ); } - late final __objc_msgSend_256Ptr = _lookup< + late final __objc_msgSend_276Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_suspend1 = _registerName1("suspend"); - late final _sel_priority1 = _registerName1("priority"); - late final _sel_setPriority_1 = _registerName1("setPriority:"); - void _objc_msgSend_257( + late final _sel_URLResourceDidFinishLoading_1 = + _registerName1("URLResourceDidFinishLoading:"); + void _objc_msgSend_277( ffi.Pointer obj, ffi.Pointer sel, - double value, + ffi.Pointer sender, ) { - return __objc_msgSend_257( + return __objc_msgSend_277( obj, sel, - value, + sender, ); } - late final __objc_msgSend_257Ptr = _lookup< + late final __objc_msgSend_277Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_prefersIncrementalDelivery1 = - _registerName1("prefersIncrementalDelivery"); - late final _sel_setPrefersIncrementalDelivery_1 = - _registerName1("setPrefersIncrementalDelivery:"); - late final _sel_storeCookies_forTask_1 = - _registerName1("storeCookies:forTask:"); - void _objc_msgSend_258( + late final _sel_URLResourceDidCancelLoading_1 = + _registerName1("URLResourceDidCancelLoading:"); + late final _sel_URL_resourceDidFailLoadingWithReason_1 = + _registerName1("URL:resourceDidFailLoadingWithReason:"); + void _objc_msgSend_278( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer task, + ffi.Pointer sender, + ffi.Pointer reason, ) { - return __objc_msgSend_258( + return __objc_msgSend_278( obj, sel, - cookies, - task, + sender, + reason, ); } - late final __objc_msgSend_258Ptr = _lookup< + late final __objc_msgSend_278Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< + late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_getCookiesForTask_completionHandler_1 = - _registerName1("getCookiesForTask:completionHandler:"); - void _objc_msgSend_259( + late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = + _registerName1( + "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); + void _objc_msgSend_279( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer<_ObjCBlock> completionHandler, + ffi.Pointer error, + int recoveryOptionIndex, + ffi.Pointer delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo, ) { - return __objc_msgSend_259( + return __objc_msgSend_279( obj, sel, - task, - completionHandler, + error, + recoveryOptionIndex, + delegate, + didRecoverSelector, + contextInfo, ); } - late final __objc_msgSend_259Ptr = _lookup< + late final __objc_msgSend_279Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + NSUInteger, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); - late final _sel_setHTTPCookieStorage_1 = - _registerName1("setHTTPCookieStorage:"); - void _objc_msgSend_260( + late final _sel_attemptRecoveryFromError_optionIndex_1 = + _registerName1("attemptRecoveryFromError:optionIndex:"); + bool _objc_msgSend_280( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer error, + int recoveryOptionIndex, ) { - return __objc_msgSend_260( + return __objc_msgSend_280( obj, sel, - value, + error, + recoveryOptionIndex, ); } - late final __objc_msgSend_260Ptr = _lookup< + late final __objc_msgSend_280Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _class_NSURLCredentialStorage1 = - _getClass1("NSURLCredentialStorage"); - late final _sel_URLCredentialStorage1 = - _registerName1("URLCredentialStorage"); - ffi.Pointer _objc_msgSend_261( - ffi.Pointer obj, - ffi.Pointer sel, + late final ffi.Pointer _NSFoundationVersionNumber = + _lookup('NSFoundationVersionNumber'); + + double get NSFoundationVersionNumber => _NSFoundationVersionNumber.value; + + set NSFoundationVersionNumber(double value) => + _NSFoundationVersionNumber.value = value; + + ffi.Pointer NSStringFromSelector( + ffi.Pointer aSelector, ) { - return __objc_msgSend_261( - obj, - sel, + return _NSStringFromSelector( + aSelector, ); } - late final __objc_msgSend_261Ptr = _lookup< + late final _NSStringFromSelectorPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer)>>('NSStringFromSelector'); + late final _NSStringFromSelector = _NSStringFromSelectorPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_setURLCredentialStorage_1 = - _registerName1("setURLCredentialStorage:"); - void _objc_msgSend_262( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer NSSelectorFromString( + ffi.Pointer aSelectorName, ) { - return __objc_msgSend_262( - obj, - sel, - value, + return _NSSelectorFromString( + aSelectorName, ); } - late final __objc_msgSend_262Ptr = _lookup< + late final _NSSelectorFromStringPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSSelectorFromString'); + late final _NSSelectorFromString = _NSSelectorFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _class_NSURLCache1 = _getClass1("NSURLCache"); - late final _sel_URLCache1 = _registerName1("URLCache"); - ffi.Pointer _objc_msgSend_263( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSStringFromClass( + ffi.Pointer aClass, ) { - return __objc_msgSend_263( - obj, - sel, + return _NSStringFromClass( + aClass, ); } - late final __objc_msgSend_263Ptr = _lookup< + late final _NSStringFromClassPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer)>>('NSStringFromClass'); + late final _NSStringFromClass = _NSStringFromClassPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_setURLCache_1 = _registerName1("setURLCache:"); - void _objc_msgSend_264( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer NSClassFromString( + ffi.Pointer aClassName, ) { - return __objc_msgSend_264( - obj, - sel, - value, + return _NSClassFromString( + aClassName, ); } - late final __objc_msgSend_264Ptr = _lookup< + late final _NSClassFromStringPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSClassFromString'); + late final _NSClassFromString = _NSClassFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_shouldUseExtendedBackgroundIdleMode1 = - _registerName1("shouldUseExtendedBackgroundIdleMode"); - late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = - _registerName1("setShouldUseExtendedBackgroundIdleMode:"); - late final _sel_protocolClasses1 = _registerName1("protocolClasses"); - late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); - void _objc_msgSend_265( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer NSStringFromProtocol( + ffi.Pointer proto, ) { - return __objc_msgSend_265( - obj, - sel, - value, + return _NSStringFromProtocol( + proto, ); } - late final __objc_msgSend_265Ptr = _lookup< + late final _NSStringFromProtocolPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSStringFromProtocol'); + late final _NSStringFromProtocol = _NSStringFromProtocolPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_multipathServiceType1 = - _registerName1("multipathServiceType"); - int _objc_msgSend_266( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSProtocolFromString( + ffi.Pointer namestr, ) { - return __objc_msgSend_266( - obj, - sel, + return _NSProtocolFromString( + namestr, ); } - late final __objc_msgSend_266Ptr = _lookup< + late final _NSProtocolFromStringPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSProtocolFromString'); + late final _NSProtocolFromString = _NSProtocolFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_setMultipathServiceType_1 = - _registerName1("setMultipathServiceType:"); - void _objc_msgSend_267( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + ffi.Pointer NSGetSizeAndAlignment( + ffi.Pointer typePtr, + ffi.Pointer sizep, + ffi.Pointer alignp, ) { - return __objc_msgSend_267( - obj, - sel, - value, + return _NSGetSizeAndAlignment( + typePtr, + sizep, + alignp, ); } - late final __objc_msgSend_267Ptr = _lookup< + late final _NSGetSizeAndAlignmentPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('NSGetSizeAndAlignment'); + late final _NSGetSizeAndAlignment = _NSGetSizeAndAlignmentPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_backgroundSessionConfiguration_1 = - _registerName1("backgroundSessionConfiguration:"); - late final _sel_sessionWithConfiguration_1 = - _registerName1("sessionWithConfiguration:"); - ffi.Pointer _objc_msgSend_268( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer configuration, + void NSLog( + ffi.Pointer format, ) { - return __objc_msgSend_268( - obj, - sel, - configuration, + return _NSLog( + format, ); } - late final __objc_msgSend_268Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _NSLogPtr = + _lookup)>>( + 'NSLog'); + late final _NSLog = + _NSLogPtr.asFunction)>(); - late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); - late final _class_NSOperation1 = _getClass1("NSOperation"); - late final _sel_start1 = _registerName1("start"); - late final _sel_main1 = _registerName1("main"); - late final _sel_isExecuting1 = _registerName1("isExecuting"); - late final _sel_isConcurrent1 = _registerName1("isConcurrent"); - late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); - late final _sel_isReady1 = _registerName1("isReady"); - late final _sel_addDependency_1 = _registerName1("addDependency:"); - void _objc_msgSend_269( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer op, + void NSLogv( + ffi.Pointer format, + va_list args, ) { - return __objc_msgSend_269( - obj, - sel, - op, + return _NSLogv( + format, + args, ); } - late final __objc_msgSend_269Ptr = _lookup< + late final _NSLogvPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, va_list)>>('NSLogv'); + late final _NSLogv = + _NSLogvPtr.asFunction, va_list)>(); - late final _sel_removeDependency_1 = _registerName1("removeDependency:"); - late final _sel_dependencies1 = _registerName1("dependencies"); - late final _sel_queuePriority1 = _registerName1("queuePriority"); - int _objc_msgSend_270( - ffi.Pointer obj, - ffi.Pointer sel, + late final ffi.Pointer _NSNotFound = + _lookup('NSNotFound'); + + int get NSNotFound => _NSNotFound.value; + + set NSNotFound(int value) => _NSNotFound.value = value; + + ffi.Pointer _Block_copy1( + ffi.Pointer aBlock, ) { - return __objc_msgSend_270( - obj, - sel, + return __Block_copy1( + aBlock, ); } - late final __objc_msgSend_270Ptr = _lookup< + late final __Block_copy1Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('_Block_copy'); + late final __Block_copy1 = __Block_copy1Ptr + .asFunction Function(ffi.Pointer)>(); - late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); - void _objc_msgSend_271( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void _Block_release1( + ffi.Pointer aBlock, ) { - return __objc_msgSend_271( - obj, - sel, - value, + return __Block_release1( + aBlock, ); } - late final __objc_msgSend_271Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final __Block_release1Ptr = + _lookup)>>( + '_Block_release'); + late final __Block_release1 = + __Block_release1Ptr.asFunction)>(); - late final _sel_completionBlock1 = _registerName1("completionBlock"); - late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); - late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); - late final _sel_threadPriority1 = _registerName1("threadPriority"); - late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); - late final _sel_qualityOfService1 = _registerName1("qualityOfService"); - int _objc_msgSend_272( - ffi.Pointer obj, - ffi.Pointer sel, + void _Block_object_assign( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_272( - obj, - sel, + return __Block_object_assign( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_272Ptr = _lookup< + late final __Block_object_assignPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('_Block_object_assign'); + late final __Block_object_assign = __Block_object_assignPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_setQualityOfService_1 = - _registerName1("setQualityOfService:"); - void _objc_msgSend_273( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void _Block_object_dispose( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_273( - obj, - sel, - value, + return __Block_object_dispose( + arg0, + arg1, ); } - late final __objc_msgSend_273Ptr = _lookup< + late final __Block_object_disposePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, ffi.Int)>>('_Block_object_dispose'); + late final __Block_object_dispose = __Block_object_disposePtr + .asFunction, int)>(); - late final _sel_name1 = _registerName1("name"); - late final _sel_setName_1 = _registerName1("setName:"); - late final _sel_addOperation_1 = _registerName1("addOperation:"); - late final _sel_addOperations_waitUntilFinished_1 = - _registerName1("addOperations:waitUntilFinished:"); - void _objc_msgSend_274( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ops, - bool wait, - ) { - return __objc_msgSend_274( - obj, - sel, - ops, - wait, - ); + late final ffi.Pointer>> + __NSConcreteGlobalBlock = + _lookup>>('_NSConcreteGlobalBlock'); + + ffi.Pointer> get _NSConcreteGlobalBlock => + __NSConcreteGlobalBlock.value; + + set _NSConcreteGlobalBlock(ffi.Pointer> value) => + __NSConcreteGlobalBlock.value = value; + + late final ffi.Pointer>> + __NSConcreteStackBlock = + _lookup>>('_NSConcreteStackBlock'); + + ffi.Pointer> get _NSConcreteStackBlock => + __NSConcreteStackBlock.value; + + set _NSConcreteStackBlock(ffi.Pointer> value) => + __NSConcreteStackBlock.value = value; + + void Debugger() { + return _Debugger(); } - late final __objc_msgSend_274Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + late final _DebuggerPtr = + _lookup>('Debugger'); + late final _Debugger = _DebuggerPtr.asFunction(); - late final _sel_addOperationWithBlock_1 = - _registerName1("addOperationWithBlock:"); - void _objc_msgSend_275( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + void DebugStr( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_275( - obj, - sel, - block, + return _DebugStr( + debuggerMsg, ); } - late final __objc_msgSend_275Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _DebugStrPtr = + _lookup>( + 'DebugStr'); + late final _DebugStr = + _DebugStrPtr.asFunction(); - late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); - late final _sel_maxConcurrentOperationCount1 = - _registerName1("maxConcurrentOperationCount"); - late final _sel_setMaxConcurrentOperationCount_1 = - _registerName1("setMaxConcurrentOperationCount:"); - late final _sel_isSuspended1 = _registerName1("isSuspended"); - late final _sel_setSuspended_1 = _registerName1("setSuspended:"); - late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); - dispatch_queue_t _objc_msgSend_276( - ffi.Pointer obj, - ffi.Pointer sel, + void SysBreak() { + return _SysBreak(); + } + + late final _SysBreakPtr = + _lookup>('SysBreak'); + late final _SysBreak = _SysBreakPtr.asFunction(); + + void SysBreakStr( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_276( - obj, - sel, + return _SysBreakStr( + debuggerMsg, ); } - late final __objc_msgSend_276Ptr = _lookup< - ffi.NativeFunction< - dispatch_queue_t Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< - dispatch_queue_t Function( - ffi.Pointer, ffi.Pointer)>(); + late final _SysBreakStrPtr = + _lookup>( + 'SysBreakStr'); + late final _SysBreakStr = + _SysBreakStrPtr.asFunction(); - late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); - void _objc_msgSend_277( - ffi.Pointer obj, - ffi.Pointer sel, - dispatch_queue_t value, + void SysBreakFunc( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_277( - obj, - sel, - value, + return _SysBreakFunc( + debuggerMsg, ); } - late final __objc_msgSend_277Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - dispatch_queue_t)>>('objc_msgSend'); - late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); + late final _SysBreakFuncPtr = + _lookup>( + 'SysBreakFunc'); + late final _SysBreakFunc = + _SysBreakFuncPtr.asFunction(); - late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); - late final _sel_waitUntilAllOperationsAreFinished1 = - _registerName1("waitUntilAllOperationsAreFinished"); - late final _sel_currentQueue1 = _registerName1("currentQueue"); - ffi.Pointer _objc_msgSend_278( - ffi.Pointer obj, - ffi.Pointer sel, + late final ffi.Pointer _kCFCoreFoundationVersionNumber = + _lookup('kCFCoreFoundationVersionNumber'); + + double get kCFCoreFoundationVersionNumber => + _kCFCoreFoundationVersionNumber.value; + + set kCFCoreFoundationVersionNumber(double value) => + _kCFCoreFoundationVersionNumber.value = value; + + late final ffi.Pointer _kCFNotFound = + _lookup('kCFNotFound'); + + int get kCFNotFound => _kCFNotFound.value; + + set kCFNotFound(int value) => _kCFNotFound.value = value; + + CFRange __CFRangeMake( + int loc, + int len, ) { - return __objc_msgSend_278( - obj, - sel, + return ___CFRangeMake( + loc, + len, ); } - late final __objc_msgSend_278Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final ___CFRangeMakePtr = + _lookup>( + '__CFRangeMake'); + late final ___CFRangeMake = + ___CFRangeMakePtr.asFunction(); - late final _sel_mainQueue1 = _registerName1("mainQueue"); - late final _sel_operations1 = _registerName1("operations"); - late final _sel_operationCount1 = _registerName1("operationCount"); - late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = - _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); - ffi.Pointer _objc_msgSend_279( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer configuration, - ffi.Pointer delegate, - ffi.Pointer queue, + int CFNullGetTypeID() { + return _CFNullGetTypeID(); + } + + late final _CFNullGetTypeIDPtr = + _lookup>('CFNullGetTypeID'); + late final _CFNullGetTypeID = + _CFNullGetTypeIDPtr.asFunction(); + + late final ffi.Pointer _kCFNull = _lookup('kCFNull'); + + CFNullRef get kCFNull => _kCFNull.value; + + set kCFNull(CFNullRef value) => _kCFNull.value = value; + + late final ffi.Pointer _kCFAllocatorDefault = + _lookup('kCFAllocatorDefault'); + + CFAllocatorRef get kCFAllocatorDefault => _kCFAllocatorDefault.value; + + set kCFAllocatorDefault(CFAllocatorRef value) => + _kCFAllocatorDefault.value = value; + + late final ffi.Pointer _kCFAllocatorSystemDefault = + _lookup('kCFAllocatorSystemDefault'); + + CFAllocatorRef get kCFAllocatorSystemDefault => + _kCFAllocatorSystemDefault.value; + + set kCFAllocatorSystemDefault(CFAllocatorRef value) => + _kCFAllocatorSystemDefault.value = value; + + late final ffi.Pointer _kCFAllocatorMalloc = + _lookup('kCFAllocatorMalloc'); + + CFAllocatorRef get kCFAllocatorMalloc => _kCFAllocatorMalloc.value; + + set kCFAllocatorMalloc(CFAllocatorRef value) => + _kCFAllocatorMalloc.value = value; + + late final ffi.Pointer _kCFAllocatorMallocZone = + _lookup('kCFAllocatorMallocZone'); + + CFAllocatorRef get kCFAllocatorMallocZone => _kCFAllocatorMallocZone.value; + + set kCFAllocatorMallocZone(CFAllocatorRef value) => + _kCFAllocatorMallocZone.value = value; + + late final ffi.Pointer _kCFAllocatorNull = + _lookup('kCFAllocatorNull'); + + CFAllocatorRef get kCFAllocatorNull => _kCFAllocatorNull.value; + + set kCFAllocatorNull(CFAllocatorRef value) => _kCFAllocatorNull.value = value; + + late final ffi.Pointer _kCFAllocatorUseContext = + _lookup('kCFAllocatorUseContext'); + + CFAllocatorRef get kCFAllocatorUseContext => _kCFAllocatorUseContext.value; + + set kCFAllocatorUseContext(CFAllocatorRef value) => + _kCFAllocatorUseContext.value = value; + + int CFAllocatorGetTypeID() { + return _CFAllocatorGetTypeID(); + } + + late final _CFAllocatorGetTypeIDPtr = + _lookup>('CFAllocatorGetTypeID'); + late final _CFAllocatorGetTypeID = + _CFAllocatorGetTypeIDPtr.asFunction(); + + void CFAllocatorSetDefault( + CFAllocatorRef allocator, ) { - return __objc_msgSend_279( - obj, - sel, - configuration, - delegate, - queue, + return _CFAllocatorSetDefault( + allocator, ); } - late final __objc_msgSend_279Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _CFAllocatorSetDefaultPtr = + _lookup>( + 'CFAllocatorSetDefault'); + late final _CFAllocatorSetDefault = + _CFAllocatorSetDefaultPtr.asFunction(); - late final _sel_delegateQueue1 = _registerName1("delegateQueue"); - late final _sel_delegate1 = _registerName1("delegate"); - late final _sel_configuration1 = _registerName1("configuration"); - late final _sel_sessionDescription1 = _registerName1("sessionDescription"); - late final _sel_setSessionDescription_1 = - _registerName1("setSessionDescription:"); - late final _sel_finishTasksAndInvalidate1 = - _registerName1("finishTasksAndInvalidate"); - late final _sel_invalidateAndCancel1 = _registerName1("invalidateAndCancel"); - late final _sel_resetWithCompletionHandler_1 = - _registerName1("resetWithCompletionHandler:"); - late final _sel_flushWithCompletionHandler_1 = - _registerName1("flushWithCompletionHandler:"); - late final _sel_getTasksWithCompletionHandler_1 = - _registerName1("getTasksWithCompletionHandler:"); - void _objc_msgSend_280( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + CFAllocatorRef CFAllocatorGetDefault() { + return _CFAllocatorGetDefault(); + } + + late final _CFAllocatorGetDefaultPtr = + _lookup>( + 'CFAllocatorGetDefault'); + late final _CFAllocatorGetDefault = + _CFAllocatorGetDefaultPtr.asFunction(); + + CFAllocatorRef CFAllocatorCreate( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return __objc_msgSend_280( - obj, - sel, - completionHandler, + return _CFAllocatorCreate( + allocator, + context, ); } - late final __objc_msgSend_280Ptr = _lookup< + late final _CFAllocatorCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_getAllTasksWithCompletionHandler_1 = - _registerName1("getAllTasksWithCompletionHandler:"); - void _objc_msgSend_281( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + CFAllocatorRef Function(CFAllocatorRef, + ffi.Pointer)>>('CFAllocatorCreate'); + late final _CFAllocatorCreate = _CFAllocatorCreatePtr.asFunction< + CFAllocatorRef Function( + CFAllocatorRef, ffi.Pointer)>(); + + ffi.Pointer CFAllocatorAllocate( + CFAllocatorRef allocator, + int size, + int hint, ) { - return __objc_msgSend_281( - obj, - sel, - completionHandler, + return _CFAllocatorAllocate( + allocator, + size, + hint, ); } - late final __objc_msgSend_281Ptr = _lookup< + late final _CFAllocatorAllocatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + CFAllocatorRef, CFIndex, CFOptionFlags)>>('CFAllocatorAllocate'); + late final _CFAllocatorAllocate = _CFAllocatorAllocatePtr.asFunction< + ffi.Pointer Function(CFAllocatorRef, int, int)>(); - late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); - late final _sel_dataTaskWithRequest_1 = - _registerName1("dataTaskWithRequest:"); - ffi.Pointer _objc_msgSend_282( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + ffi.Pointer CFAllocatorReallocate( + CFAllocatorRef allocator, + ffi.Pointer ptr, + int newsize, + int hint, ) { - return __objc_msgSend_282( - obj, - sel, - request, + return _CFAllocatorReallocate( + allocator, + ptr, + newsize, + hint, ); } - late final __objc_msgSend_282Ptr = _lookup< + late final _CFAllocatorReallocatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer, + CFIndex, CFOptionFlags)>>('CFAllocatorReallocate'); + late final _CFAllocatorReallocate = _CFAllocatorReallocatePtr.asFunction< + ffi.Pointer Function( + CFAllocatorRef, ffi.Pointer, int, int)>(); - late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); - ffi.Pointer _objc_msgSend_283( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + void CFAllocatorDeallocate( + CFAllocatorRef allocator, + ffi.Pointer ptr, ) { - return __objc_msgSend_283( - obj, - sel, - url, + return _CFAllocatorDeallocate( + allocator, + ptr, ); } - late final __objc_msgSend_283Ptr = _lookup< + late final _CFAllocatorDeallocatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + CFAllocatorRef, ffi.Pointer)>>('CFAllocatorDeallocate'); + late final _CFAllocatorDeallocate = _CFAllocatorDeallocatePtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer)>(); - late final _class_NSURLSessionUploadTask1 = - _getClass1("NSURLSessionUploadTask"); - late final _sel_uploadTaskWithRequest_fromFile_1 = - _registerName1("uploadTaskWithRequest:fromFile:"); - ffi.Pointer _objc_msgSend_284( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer fileURL, + int CFAllocatorGetPreferredSizeForSize( + CFAllocatorRef allocator, + int size, + int hint, ) { - return __objc_msgSend_284( - obj, - sel, - request, - fileURL, + return _CFAllocatorGetPreferredSizeForSize( + allocator, + size, + hint, ); } - late final __objc_msgSend_284Ptr = _lookup< + late final _CFAllocatorGetPreferredSizeForSizePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_uploadTaskWithRequest_fromData_1 = - _registerName1("uploadTaskWithRequest:fromData:"); - ffi.Pointer _objc_msgSend_285( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer bodyData, - ) { - return __objc_msgSend_285( - obj, - sel, - request, - bodyData, + CFIndex Function(CFAllocatorRef, CFIndex, + CFOptionFlags)>>('CFAllocatorGetPreferredSizeForSize'); + late final _CFAllocatorGetPreferredSizeForSize = + _CFAllocatorGetPreferredSizeForSizePtr.asFunction< + int Function(CFAllocatorRef, int, int)>(); + + void CFAllocatorGetContext( + CFAllocatorRef allocator, + ffi.Pointer context, + ) { + return _CFAllocatorGetContext( + allocator, + context, ); } - late final __objc_msgSend_285Ptr = _lookup< + late final _CFAllocatorGetContextPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(CFAllocatorRef, + ffi.Pointer)>>('CFAllocatorGetContext'); + late final _CFAllocatorGetContext = _CFAllocatorGetContextPtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer)>(); - late final _sel_uploadTaskWithStreamedRequest_1 = - _registerName1("uploadTaskWithStreamedRequest:"); - ffi.Pointer _objc_msgSend_286( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + int CFGetTypeID( + CFTypeRef cf, ) { - return __objc_msgSend_286( - obj, - sel, - request, + return _CFGetTypeID( + cf, ); } - late final __objc_msgSend_286Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFGetTypeIDPtr = + _lookup>('CFGetTypeID'); + late final _CFGetTypeID = + _CFGetTypeIDPtr.asFunction(); - late final _class_NSURLSessionDownloadTask1 = - _getClass1("NSURLSessionDownloadTask"); - late final _sel_cancelByProducingResumeData_1 = - _registerName1("cancelByProducingResumeData:"); - void _objc_msgSend_287( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + CFStringRef CFCopyTypeIDDescription( + int type_id, ) { - return __objc_msgSend_287( - obj, - sel, - completionHandler, + return _CFCopyTypeIDDescription( + type_id, ); } - late final __objc_msgSend_287Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _CFCopyTypeIDDescriptionPtr = + _lookup>( + 'CFCopyTypeIDDescription'); + late final _CFCopyTypeIDDescription = + _CFCopyTypeIDDescriptionPtr.asFunction(); - late final _sel_downloadTaskWithRequest_1 = - _registerName1("downloadTaskWithRequest:"); - ffi.Pointer _objc_msgSend_288( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + CFTypeRef CFRetain( + CFTypeRef cf, ) { - return __objc_msgSend_288( - obj, - sel, - request, + return _CFRetain( + cf, ); } - late final __objc_msgSend_288Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFRetainPtr = + _lookup>('CFRetain'); + late final _CFRetain = + _CFRetainPtr.asFunction(); - late final _sel_downloadTaskWithURL_1 = - _registerName1("downloadTaskWithURL:"); - ffi.Pointer _objc_msgSend_289( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + void CFRelease( + CFTypeRef cf, ) { - return __objc_msgSend_289( - obj, - sel, - url, + return _CFRelease( + cf, ); } - late final __objc_msgSend_289Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFReleasePtr = + _lookup>('CFRelease'); + late final _CFRelease = _CFReleasePtr.asFunction(); - late final _sel_downloadTaskWithResumeData_1 = - _registerName1("downloadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_290( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, + CFTypeRef CFAutorelease( + CFTypeRef arg, ) { - return __objc_msgSend_290( - obj, - sel, - resumeData, + return _CFAutorelease( + arg, ); } - late final __objc_msgSend_290Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFAutoreleasePtr = + _lookup>( + 'CFAutorelease'); + late final _CFAutorelease = + _CFAutoreleasePtr.asFunction(); - late final _class_NSURLSessionStreamTask1 = - _getClass1("NSURLSessionStreamTask"); - late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = - _registerName1( - "readDataOfMinLength:maxLength:timeout:completionHandler:"); - void _objc_msgSend_291( - ffi.Pointer obj, - ffi.Pointer sel, - int minBytes, - int maxBytes, - double timeout, - ffi.Pointer<_ObjCBlock> completionHandler, + int CFGetRetainCount( + CFTypeRef cf, ) { - return __objc_msgSend_291( - obj, - sel, - minBytes, - maxBytes, - timeout, - completionHandler, + return _CFGetRetainCount( + cf, ); } - late final __objc_msgSend_291Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSUInteger, - NSTimeInterval, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int, - double, ffi.Pointer<_ObjCBlock>)>(); + late final _CFGetRetainCountPtr = + _lookup>( + 'CFGetRetainCount'); + late final _CFGetRetainCount = + _CFGetRetainCountPtr.asFunction(); - late final _sel_writeData_timeout_completionHandler_1 = - _registerName1("writeData:timeout:completionHandler:"); - void _objc_msgSend_292( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - double timeout, - ffi.Pointer<_ObjCBlock> completionHandler, + int CFEqual( + CFTypeRef cf1, + CFTypeRef cf2, ) { - return __objc_msgSend_292( - obj, - sel, - data, - timeout, - completionHandler, + return _CFEqual( + cf1, + cf2, ); } - late final __objc_msgSend_292Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSTimeInterval, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); + late final _CFEqualPtr = + _lookup>( + 'CFEqual'); + late final _CFEqual = + _CFEqualPtr.asFunction(); - late final _sel_captureStreams1 = _registerName1("captureStreams"); - late final _sel_closeWrite1 = _registerName1("closeWrite"); - late final _sel_closeRead1 = _registerName1("closeRead"); - late final _sel_startSecureConnection1 = - _registerName1("startSecureConnection"); - late final _sel_stopSecureConnection1 = - _registerName1("stopSecureConnection"); - late final _sel_streamTaskWithHostName_port_1 = - _registerName1("streamTaskWithHostName:port:"); - ffi.Pointer _objc_msgSend_293( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer hostname, - int port, + int CFHash( + CFTypeRef cf, ) { - return __objc_msgSend_293( - obj, - sel, - hostname, - port, + return _CFHash( + cf, ); } - late final __objc_msgSend_293Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + late final _CFHashPtr = + _lookup>('CFHash'); + late final _CFHash = _CFHashPtr.asFunction(); - late final _class_NSNetService1 = _getClass1("NSNetService"); - late final _sel_streamTaskWithNetService_1 = - _registerName1("streamTaskWithNetService:"); - ffi.Pointer _objc_msgSend_294( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer service, + CFStringRef CFCopyDescription( + CFTypeRef cf, ) { - return __objc_msgSend_294( - obj, - sel, - service, + return _CFCopyDescription( + cf, ); } - late final __objc_msgSend_294Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFCopyDescriptionPtr = + _lookup>( + 'CFCopyDescription'); + late final _CFCopyDescription = + _CFCopyDescriptionPtr.asFunction(); - late final _class_NSURLSessionWebSocketTask1 = - _getClass1("NSURLSessionWebSocketTask"); - late final _class_NSURLSessionWebSocketMessage1 = - _getClass1("NSURLSessionWebSocketMessage"); - late final _sel_type1 = _registerName1("type"); - int _objc_msgSend_295( - ffi.Pointer obj, - ffi.Pointer sel, + CFAllocatorRef CFGetAllocator( + CFTypeRef cf, ) { - return __objc_msgSend_295( - obj, - sel, + return _CFGetAllocator( + cf, ); } - late final __objc_msgSend_295Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _CFGetAllocatorPtr = + _lookup>( + 'CFGetAllocator'); + late final _CFGetAllocator = + _CFGetAllocatorPtr.asFunction(); - late final _sel_string1 = _registerName1("string"); - late final _sel_sendMessage_completionHandler_1 = - _registerName1("sendMessage:completionHandler:"); - void _objc_msgSend_296( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer message, - ffi.Pointer<_ObjCBlock> completionHandler, + CFTypeRef CFMakeCollectable( + CFTypeRef cf, ) { - return __objc_msgSend_296( - obj, - sel, - message, - completionHandler, + return _CFMakeCollectable( + cf, ); } - late final __objc_msgSend_296Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + late final _CFMakeCollectablePtr = + _lookup>( + 'CFMakeCollectable'); + late final _CFMakeCollectable = + _CFMakeCollectablePtr.asFunction(); - late final _sel_receiveMessageWithCompletionHandler_1 = - _registerName1("receiveMessageWithCompletionHandler:"); - void _objc_msgSend_297( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + ffi.Pointer NSDefaultMallocZone() { + return _NSDefaultMallocZone(); + } + + late final _NSDefaultMallocZonePtr = + _lookup Function()>>( + 'NSDefaultMallocZone'); + late final _NSDefaultMallocZone = + _NSDefaultMallocZonePtr.asFunction Function()>(); + + ffi.Pointer NSCreateZone( + int startSize, + int granularity, + bool canFree, ) { - return __objc_msgSend_297( - obj, - sel, - completionHandler, + return _NSCreateZone( + startSize, + granularity, + canFree, ); } - late final __objc_msgSend_297Ptr = _lookup< + late final _NSCreateZonePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + NSUInteger, NSUInteger, ffi.Bool)>>('NSCreateZone'); + late final _NSCreateZone = _NSCreateZonePtr.asFunction< + ffi.Pointer Function(int, int, bool)>(); - late final _sel_sendPingWithPongReceiveHandler_1 = - _registerName1("sendPingWithPongReceiveHandler:"); - void _objc_msgSend_298( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> pongReceiveHandler, + void NSRecycleZone( + ffi.Pointer zone, ) { - return __objc_msgSend_298( - obj, - sel, - pongReceiveHandler, + return _NSRecycleZone( + zone, ); } - late final __objc_msgSend_298Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _NSRecycleZonePtr = + _lookup)>>( + 'NSRecycleZone'); + late final _NSRecycleZone = + _NSRecycleZonePtr.asFunction)>(); - late final _sel_cancelWithCloseCode_reason_1 = - _registerName1("cancelWithCloseCode:reason:"); - void _objc_msgSend_299( - ffi.Pointer obj, - ffi.Pointer sel, - int closeCode, - ffi.Pointer reason, + void NSSetZoneName( + ffi.Pointer zone, + ffi.Pointer name, ) { - return __objc_msgSend_299( - obj, - sel, - closeCode, - reason, + return _NSSetZoneName( + zone, + name, ); } - late final __objc_msgSend_299Ptr = _lookup< + late final _NSSetZoneNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('NSSetZoneName'); + late final _NSSetZoneName = _NSSetZoneNamePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_maximumMessageSize1 = _registerName1("maximumMessageSize"); - late final _sel_setMaximumMessageSize_1 = - _registerName1("setMaximumMessageSize:"); - late final _sel_closeCode1 = _registerName1("closeCode"); - int _objc_msgSend_300( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSZoneName( + ffi.Pointer zone, ) { - return __objc_msgSend_300( - obj, - sel, + return _NSZoneName( + zone, ); } - late final __objc_msgSend_300Ptr = _lookup< + late final _NSZoneNamePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer)>>('NSZoneName'); + late final _NSZoneName = _NSZoneNamePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_closeReason1 = _registerName1("closeReason"); - late final _sel_webSocketTaskWithURL_1 = - _registerName1("webSocketTaskWithURL:"); - ffi.Pointer _objc_msgSend_301( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer NSZoneFromPointer( + ffi.Pointer ptr, ) { - return __objc_msgSend_301( - obj, - sel, - url, + return _NSZoneFromPointer( + ptr, ); } - late final __objc_msgSend_301Ptr = _lookup< + late final _NSZoneFromPointerPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSZoneFromPointer'); + late final _NSZoneFromPointer = _NSZoneFromPointerPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_webSocketTaskWithURL_protocols_1 = - _registerName1("webSocketTaskWithURL:protocols:"); - ffi.Pointer _objc_msgSend_302( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer protocols, + ffi.Pointer NSZoneMalloc( + ffi.Pointer zone, + int size, ) { - return __objc_msgSend_302( - obj, - sel, - url, - protocols, + return _NSZoneMalloc( + zone, + size, ); } - late final __objc_msgSend_302Ptr = _lookup< + late final _NSZoneMallocPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, NSUInteger)>>('NSZoneMalloc'); + late final _NSZoneMalloc = _NSZoneMallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int)>(); - late final _sel_webSocketTaskWithRequest_1 = - _registerName1("webSocketTaskWithRequest:"); - ffi.Pointer _objc_msgSend_303( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + ffi.Pointer NSZoneCalloc( + ffi.Pointer zone, + int numElems, + int byteSize, ) { - return __objc_msgSend_303( - obj, - sel, - request, + return _NSZoneCalloc( + zone, + numElems, + byteSize, ); } - late final __objc_msgSend_303Ptr = _lookup< + late final _NSZoneCallocPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, NSUInteger, NSUInteger)>>('NSZoneCalloc'); + late final _NSZoneCalloc = _NSZoneCallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - late final _sel_dataTaskWithRequest_completionHandler_1 = - _registerName1("dataTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_304( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer<_ObjCBlock> completionHandler, + ffi.Pointer NSZoneRealloc( + ffi.Pointer zone, + ffi.Pointer ptr, + int size, ) { - return __objc_msgSend_304( - obj, - sel, - request, - completionHandler, + return _NSZoneRealloc( + zone, + ptr, + size, ); } - late final __objc_msgSend_304Ptr = _lookup< + late final _NSZoneReallocPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('NSZoneRealloc'); + late final _NSZoneRealloc = _NSZoneReallocPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_dataTaskWithURL_completionHandler_1 = - _registerName1("dataTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_305( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, + void NSZoneFree( + ffi.Pointer zone, + ffi.Pointer ptr, ) { - return __objc_msgSend_305( - obj, - sel, - url, - completionHandler, + return _NSZoneFree( + zone, + ptr, ); } - late final __objc_msgSend_305Ptr = _lookup< + late final _NSZoneFreePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('NSZoneFree'); + late final _NSZoneFree = _NSZoneFreePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = - _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); - ffi.Pointer _objc_msgSend_306( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer fileURL, - ffi.Pointer<_ObjCBlock> completionHandler, + ffi.Pointer NSAllocateCollectable( + int size, + int options, ) { - return __objc_msgSend_306( - obj, - sel, - request, - fileURL, - completionHandler, + return _NSAllocateCollectable( + size, + options, ); } - late final __objc_msgSend_306Ptr = _lookup< + late final _NSAllocateCollectablePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + NSUInteger, NSUInteger)>>('NSAllocateCollectable'); + late final _NSAllocateCollectable = _NSAllocateCollectablePtr.asFunction< + ffi.Pointer Function(int, int)>(); - late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = - _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); - ffi.Pointer _objc_msgSend_307( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer bodyData, - ffi.Pointer<_ObjCBlock> completionHandler, + ffi.Pointer NSReallocateCollectable( + ffi.Pointer ptr, + int size, + int options, ) { - return __objc_msgSend_307( - obj, - sel, - request, - bodyData, - completionHandler, + return _NSReallocateCollectable( + ptr, + size, + options, ); } - late final __objc_msgSend_307Ptr = _lookup< + late final _NSReallocateCollectablePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, NSUInteger, + NSUInteger)>>('NSReallocateCollectable'); + late final _NSReallocateCollectable = _NSReallocateCollectablePtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - late final _sel_downloadTaskWithRequest_completionHandler_1 = - _registerName1("downloadTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_308( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer<_ObjCBlock> completionHandler, + int NSPageSize() { + return _NSPageSize(); + } + + late final _NSPageSizePtr = + _lookup>('NSPageSize'); + late final _NSPageSize = _NSPageSizePtr.asFunction(); + + int NSLogPageSize() { + return _NSLogPageSize(); + } + + late final _NSLogPageSizePtr = + _lookup>('NSLogPageSize'); + late final _NSLogPageSize = _NSLogPageSizePtr.asFunction(); + + int NSRoundUpToMultipleOfPageSize( + int bytes, ) { - return __objc_msgSend_308( - obj, - sel, - request, - completionHandler, + return _NSRoundUpToMultipleOfPageSize( + bytes, ); } - late final __objc_msgSend_308Ptr = _lookup< + late final _NSRoundUpToMultipleOfPageSizePtr = + _lookup>( + 'NSRoundUpToMultipleOfPageSize'); + late final _NSRoundUpToMultipleOfPageSize = + _NSRoundUpToMultipleOfPageSizePtr.asFunction(); + + int NSRoundDownToMultipleOfPageSize( + int bytes, + ) { + return _NSRoundDownToMultipleOfPageSize( + bytes, + ); + } + + late final _NSRoundDownToMultipleOfPageSizePtr = + _lookup>( + 'NSRoundDownToMultipleOfPageSize'); + late final _NSRoundDownToMultipleOfPageSize = + _NSRoundDownToMultipleOfPageSizePtr.asFunction(); + + ffi.Pointer NSAllocateMemoryPages( + int bytes, + ) { + return _NSAllocateMemoryPages( + bytes, + ); + } + + late final _NSAllocateMemoryPagesPtr = + _lookup Function(NSUInteger)>>( + 'NSAllocateMemoryPages'); + late final _NSAllocateMemoryPages = _NSAllocateMemoryPagesPtr.asFunction< + ffi.Pointer Function(int)>(); + + void NSDeallocateMemoryPages( + ffi.Pointer ptr, + int bytes, + ) { + return _NSDeallocateMemoryPages( + ptr, + bytes, + ); + } + + late final _NSDeallocateMemoryPagesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function( + ffi.Pointer, NSUInteger)>>('NSDeallocateMemoryPages'); + late final _NSDeallocateMemoryPages = _NSDeallocateMemoryPagesPtr.asFunction< + void Function(ffi.Pointer, int)>(); + + void NSCopyMemoryPages( + ffi.Pointer source, + ffi.Pointer dest, + int bytes, + ) { + return _NSCopyMemoryPages( + source, + dest, + bytes, + ); + } - late final _sel_downloadTaskWithURL_completionHandler_1 = - _registerName1("downloadTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_309( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, + late final _NSCopyMemoryPagesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('NSCopyMemoryPages'); + late final _NSCopyMemoryPages = _NSCopyMemoryPagesPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + int NSRealMemoryAvailable() { + return _NSRealMemoryAvailable(); + } + + late final _NSRealMemoryAvailablePtr = + _lookup>( + 'NSRealMemoryAvailable'); + late final _NSRealMemoryAvailable = + _NSRealMemoryAvailablePtr.asFunction(); + + ffi.Pointer NSAllocateObject( + ffi.Pointer aClass, + int extraBytes, + ffi.Pointer zone, ) { - return __objc_msgSend_309( - obj, - sel, - url, - completionHandler, + return _NSAllocateObject( + aClass, + extraBytes, + zone, ); } - late final __objc_msgSend_309Ptr = _lookup< + late final _NSAllocateObjectPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, NSUInteger, + ffi.Pointer)>>('NSAllocateObject'); + late final _NSAllocateObject = _NSAllocateObjectPtr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, int, ffi.Pointer)>(); - late final _sel_downloadTaskWithResumeData_completionHandler_1 = - _registerName1("downloadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_310( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ffi.Pointer<_ObjCBlock> completionHandler, + void NSDeallocateObject( + ffi.Pointer object, ) { - return __objc_msgSend_310( - obj, - sel, - resumeData, - completionHandler, + return _NSDeallocateObject( + object, ); } - late final __objc_msgSend_310Ptr = _lookup< + late final _NSDeallocateObjectPtr = + _lookup)>>( + 'NSDeallocateObject'); + late final _NSDeallocateObject = _NSDeallocateObjectPtr.asFunction< + void Function(ffi.Pointer)>(); + + ffi.Pointer NSCopyObject( + ffi.Pointer object, + int extraBytes, + ffi.Pointer zone, + ) { + return _NSCopyObject( + object, + extraBytes, + zone, + ); + } + + late final _NSCopyObjectPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, NSUInteger, + ffi.Pointer)>>('NSCopyObject'); + late final _NSCopyObject = _NSCopyObjectPtr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, int, ffi.Pointer)>(); - late final ffi.Pointer _NSURLSessionTaskPriorityDefault = - _lookup('NSURLSessionTaskPriorityDefault'); + bool NSShouldRetainWithZone( + ffi.Pointer anObject, + ffi.Pointer requestedZone, + ) { + return _NSShouldRetainWithZone( + anObject, + requestedZone, + ); + } - double get NSURLSessionTaskPriorityDefault => - _NSURLSessionTaskPriorityDefault.value; + late final _NSShouldRetainWithZonePtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>('NSShouldRetainWithZone'); + late final _NSShouldRetainWithZone = _NSShouldRetainWithZonePtr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - set NSURLSessionTaskPriorityDefault(double value) => - _NSURLSessionTaskPriorityDefault.value = value; + void NSIncrementExtraRefCount( + ffi.Pointer object, + ) { + return _NSIncrementExtraRefCount( + object, + ); + } - late final ffi.Pointer _NSURLSessionTaskPriorityLow = - _lookup('NSURLSessionTaskPriorityLow'); + late final _NSIncrementExtraRefCountPtr = + _lookup)>>( + 'NSIncrementExtraRefCount'); + late final _NSIncrementExtraRefCount = _NSIncrementExtraRefCountPtr + .asFunction)>(); - double get NSURLSessionTaskPriorityLow => _NSURLSessionTaskPriorityLow.value; + bool NSDecrementExtraRefCountWasZero( + ffi.Pointer object, + ) { + return _NSDecrementExtraRefCountWasZero( + object, + ); + } - set NSURLSessionTaskPriorityLow(double value) => - _NSURLSessionTaskPriorityLow.value = value; + late final _NSDecrementExtraRefCountWasZeroPtr = + _lookup)>>( + 'NSDecrementExtraRefCountWasZero'); + late final _NSDecrementExtraRefCountWasZero = + _NSDecrementExtraRefCountWasZeroPtr.asFunction< + bool Function(ffi.Pointer)>(); - late final ffi.Pointer _NSURLSessionTaskPriorityHigh = - _lookup('NSURLSessionTaskPriorityHigh'); + int NSExtraRefCount( + ffi.Pointer object, + ) { + return _NSExtraRefCount( + object, + ); + } - double get NSURLSessionTaskPriorityHigh => - _NSURLSessionTaskPriorityHigh.value; + late final _NSExtraRefCountPtr = + _lookup)>>( + 'NSExtraRefCount'); + late final _NSExtraRefCount = + _NSExtraRefCountPtr.asFunction)>(); - set NSURLSessionTaskPriorityHigh(double value) => - _NSURLSessionTaskPriorityHigh.value = value; + NSRange NSUnionRange( + NSRange range1, + NSRange range2, + ) { + return _NSUnionRange( + range1, + range2, + ); + } - /// Key in the userInfo dictionary of an NSError received during a failed download. - late final ffi.Pointer> - _NSURLSessionDownloadTaskResumeData = - _lookup>('NSURLSessionDownloadTaskResumeData'); + late final _NSUnionRangePtr = + _lookup>( + 'NSUnionRange'); + late final _NSUnionRange = + _NSUnionRangePtr.asFunction(); - ffi.Pointer get NSURLSessionDownloadTaskResumeData => - _NSURLSessionDownloadTaskResumeData.value; + NSRange NSIntersectionRange( + NSRange range1, + NSRange range2, + ) { + return _NSIntersectionRange( + range1, + range2, + ); + } - set NSURLSessionDownloadTaskResumeData(ffi.Pointer value) => - _NSURLSessionDownloadTaskResumeData.value = value; + late final _NSIntersectionRangePtr = + _lookup>( + 'NSIntersectionRange'); + late final _NSIntersectionRange = + _NSIntersectionRangePtr.asFunction(); - late final _class_NSURLSessionTaskTransactionMetrics1 = - _getClass1("NSURLSessionTaskTransactionMetrics"); - late final _sel_request1 = _registerName1("request"); - late final _sel_fetchStartDate1 = _registerName1("fetchStartDate"); - late final _sel_domainLookupStartDate1 = - _registerName1("domainLookupStartDate"); - late final _sel_domainLookupEndDate1 = _registerName1("domainLookupEndDate"); - late final _sel_connectStartDate1 = _registerName1("connectStartDate"); - late final _sel_secureConnectionStartDate1 = - _registerName1("secureConnectionStartDate"); - late final _sel_secureConnectionEndDate1 = - _registerName1("secureConnectionEndDate"); - late final _sel_connectEndDate1 = _registerName1("connectEndDate"); - late final _sel_requestStartDate1 = _registerName1("requestStartDate"); - late final _sel_requestEndDate1 = _registerName1("requestEndDate"); - late final _sel_responseStartDate1 = _registerName1("responseStartDate"); - late final _sel_responseEndDate1 = _registerName1("responseEndDate"); - late final _sel_networkProtocolName1 = _registerName1("networkProtocolName"); - late final _sel_isProxyConnection1 = _registerName1("isProxyConnection"); - late final _sel_isReusedConnection1 = _registerName1("isReusedConnection"); - late final _sel_resourceFetchType1 = _registerName1("resourceFetchType"); - int _objc_msgSend_311( + ffi.Pointer NSStringFromRange( + NSRange range, + ) { + return _NSStringFromRange( + range, + ); + } + + late final _NSStringFromRangePtr = + _lookup Function(NSRange)>>( + 'NSStringFromRange'); + late final _NSStringFromRange = _NSStringFromRangePtr.asFunction< + ffi.Pointer Function(NSRange)>(); + + NSRange NSRangeFromString( + ffi.Pointer aString, + ) { + return _NSRangeFromString( + aString, + ); + } + + late final _NSRangeFromStringPtr = + _lookup)>>( + 'NSRangeFromString'); + late final _NSRangeFromString = _NSRangeFromStringPtr.asFunction< + NSRange Function(ffi.Pointer)>(); + + late final _class_NSMutableIndexSet1 = _getClass1("NSMutableIndexSet"); + late final _sel_addIndexes_1 = _registerName1("addIndexes:"); + void _objc_msgSend_281( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer indexSet, ) { - return __objc_msgSend_311( + return __objc_msgSend_281( obj, sel, + indexSet, ); } - late final __objc_msgSend_311Ptr = _lookup< + late final __objc_msgSend_281Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_countOfRequestHeaderBytesSent1 = - _registerName1("countOfRequestHeaderBytesSent"); - late final _sel_countOfRequestBodyBytesSent1 = - _registerName1("countOfRequestBodyBytesSent"); - late final _sel_countOfRequestBodyBytesBeforeEncoding1 = - _registerName1("countOfRequestBodyBytesBeforeEncoding"); - late final _sel_countOfResponseHeaderBytesReceived1 = - _registerName1("countOfResponseHeaderBytesReceived"); - late final _sel_countOfResponseBodyBytesReceived1 = - _registerName1("countOfResponseBodyBytesReceived"); - late final _sel_countOfResponseBodyBytesAfterDecoding1 = - _registerName1("countOfResponseBodyBytesAfterDecoding"); - late final _sel_localAddress1 = _registerName1("localAddress"); - late final _sel_localPort1 = _registerName1("localPort"); - late final _sel_remoteAddress1 = _registerName1("remoteAddress"); - late final _sel_remotePort1 = _registerName1("remotePort"); - late final _sel_negotiatedTLSProtocolVersion1 = - _registerName1("negotiatedTLSProtocolVersion"); - late final _sel_negotiatedTLSCipherSuite1 = - _registerName1("negotiatedTLSCipherSuite"); - late final _sel_isCellular1 = _registerName1("isCellular"); - late final _sel_isExpensive1 = _registerName1("isExpensive"); - late final _sel_isConstrained1 = _registerName1("isConstrained"); - late final _sel_isMultipath1 = _registerName1("isMultipath"); - late final _sel_domainResolutionProtocol1 = - _registerName1("domainResolutionProtocol"); - int _objc_msgSend_312( + late final _sel_removeIndexes_1 = _registerName1("removeIndexes:"); + late final _sel_removeAllIndexes1 = _registerName1("removeAllIndexes"); + late final _sel_addIndex_1 = _registerName1("addIndex:"); + void _objc_msgSend_282( ffi.Pointer obj, ffi.Pointer sel, + int value, ) { - return __objc_msgSend_312( + return __objc_msgSend_282( obj, sel, + value, ); } - late final __objc_msgSend_312Ptr = _lookup< + late final __objc_msgSend_282Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _class_NSURLSessionTaskMetrics1 = - _getClass1("NSURLSessionTaskMetrics"); - late final _sel_transactionMetrics1 = _registerName1("transactionMetrics"); - late final _class_NSDateInterval1 = _getClass1("NSDateInterval"); - late final _sel_taskInterval1 = _registerName1("taskInterval"); - ffi.Pointer _objc_msgSend_313( + late final _sel_removeIndex_1 = _registerName1("removeIndex:"); + late final _sel_addIndexesInRange_1 = _registerName1("addIndexesInRange:"); + void _objc_msgSend_283( ffi.Pointer obj, ffi.Pointer sel, + NSRange range, ) { - return __objc_msgSend_313( + return __objc_msgSend_283( obj, sel, + range, ); } - late final __objc_msgSend_313Ptr = _lookup< + late final __objc_msgSend_283Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_redirectCount1 = _registerName1("redirectCount"); - - /// A string constant for the "file" URL scheme. If you are using this to compare to a URL's scheme to see if it is a file URL, you should instead use the NSURL fileURL property -- the fileURL property is much faster. - late final ffi.Pointer> _NSURLFileScheme = - _lookup>('NSURLFileScheme'); - - ffi.Pointer get NSURLFileScheme => _NSURLFileScheme.value; - - set NSURLFileScheme(ffi.Pointer value) => - _NSURLFileScheme.value = value; + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - /// Key for the resource properties that have not been set after setResourceValues:error: returns an error, returned as an array of of strings. - late final ffi.Pointer _NSURLKeysOfUnsetValuesKey = - _lookup('NSURLKeysOfUnsetValuesKey'); + late final _sel_removeIndexesInRange_1 = + _registerName1("removeIndexesInRange:"); + late final _sel_shiftIndexesStartingAtIndex_by_1 = + _registerName1("shiftIndexesStartingAtIndex:by:"); + void _objc_msgSend_284( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + int delta, + ) { + return __objc_msgSend_284( + obj, + sel, + index, + delta, + ); + } - NSURLResourceKey get NSURLKeysOfUnsetValuesKey => - _NSURLKeysOfUnsetValuesKey.value; + late final __objc_msgSend_284Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - set NSURLKeysOfUnsetValuesKey(NSURLResourceKey value) => - _NSURLKeysOfUnsetValuesKey.value = value; + late final _class_NSMutableArray1 = _getClass1("NSMutableArray"); + late final _sel_addObject_1 = _registerName1("addObject:"); + late final _sel_insertObject_atIndex_1 = + _registerName1("insertObject:atIndex:"); + void _objc_msgSend_285( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + int index, + ) { + return __objc_msgSend_285( + obj, + sel, + anObject, + index, + ); + } - /// The resource name provided by the file system (Read-write, value type NSString) - late final ffi.Pointer _NSURLNameKey = - _lookup('NSURLNameKey'); + late final __objc_msgSend_285Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - NSURLResourceKey get NSURLNameKey => _NSURLNameKey.value; + late final _sel_removeLastObject1 = _registerName1("removeLastObject"); + late final _sel_removeObjectAtIndex_1 = + _registerName1("removeObjectAtIndex:"); + late final _sel_replaceObjectAtIndex_withObject_1 = + _registerName1("replaceObjectAtIndex:withObject:"); + void _objc_msgSend_286( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ffi.Pointer anObject, + ) { + return __objc_msgSend_286( + obj, + sel, + index, + anObject, + ); + } - set NSURLNameKey(NSURLResourceKey value) => _NSURLNameKey.value = value; + late final __objc_msgSend_286Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); - /// Localized or extension-hidden name as displayed to users (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedNameKey = + late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); + late final _sel_addObjectsFromArray_1 = + _registerName1("addObjectsFromArray:"); + void _objc_msgSend_287( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, + ) { + return __objc_msgSend_287( + obj, + sel, + otherArray, + ); + } + + late final __objc_msgSend_287Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = + _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); + void _objc_msgSend_288( + ffi.Pointer obj, + ffi.Pointer sel, + int idx1, + int idx2, + ) { + return __objc_msgSend_288( + obj, + sel, + idx1, + idx2, + ); + } + + late final __objc_msgSend_288Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + + late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); + late final _sel_removeObject_inRange_1 = + _registerName1("removeObject:inRange:"); + void _objc_msgSend_289( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + NSRange range, + ) { + return __objc_msgSend_289( + obj, + sel, + anObject, + range, + ); + } + + late final __objc_msgSend_289Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); + + late final _sel_removeObject_1 = _registerName1("removeObject:"); + late final _sel_removeObjectIdenticalTo_inRange_1 = + _registerName1("removeObjectIdenticalTo:inRange:"); + late final _sel_removeObjectIdenticalTo_1 = + _registerName1("removeObjectIdenticalTo:"); + late final _sel_removeObjectsFromIndices_numIndices_1 = + _registerName1("removeObjectsFromIndices:numIndices:"); + void _objc_msgSend_290( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indices, + int cnt, + ) { + return __objc_msgSend_290( + obj, + sel, + indices, + cnt, + ); + } + + late final __objc_msgSend_290Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_removeObjectsInArray_1 = + _registerName1("removeObjectsInArray:"); + late final _sel_removeObjectsInRange_1 = + _registerName1("removeObjectsInRange:"); + late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = + _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); + void _objc_msgSend_291( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer otherArray, + NSRange otherRange, + ) { + return __objc_msgSend_291( + obj, + sel, + range, + otherArray, + otherRange, + ); + } + + late final __objc_msgSend_291Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer, NSRange)>(); + + late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = + _registerName1("replaceObjectsInRange:withObjectsFromArray:"); + void _objc_msgSend_292( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer otherArray, + ) { + return __objc_msgSend_292( + obj, + sel, + range, + otherArray, + ); + } + + late final __objc_msgSend_292Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); + + late final _sel_setArray_1 = _registerName1("setArray:"); + late final _sel_sortUsingFunction_context_1 = + _registerName1("sortUsingFunction:context:"); + void _objc_msgSend_293( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context, + ) { + return __objc_msgSend_293( + obj, + sel, + compare, + context, + ); + } + + late final __objc_msgSend_293Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); + + late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); + late final _sel_insertObjects_atIndexes_1 = + _registerName1("insertObjects:atIndexes:"); + void _objc_msgSend_294( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer objects, + ffi.Pointer indexes, + ) { + return __objc_msgSend_294( + obj, + sel, + objects, + indexes, + ); + } + + late final __objc_msgSend_294Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_removeObjectsAtIndexes_1 = + _registerName1("removeObjectsAtIndexes:"); + late final _sel_replaceObjectsAtIndexes_withObjects_1 = + _registerName1("replaceObjectsAtIndexes:withObjects:"); + void _objc_msgSend_295( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + ffi.Pointer objects, + ) { + return __objc_msgSend_295( + obj, + sel, + indexes, + objects, + ); + } + + late final __objc_msgSend_295Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setObject_atIndexedSubscript_1 = + _registerName1("setObject:atIndexedSubscript:"); + late final _sel_sortUsingComparator_1 = + _registerName1("sortUsingComparator:"); + void _objc_msgSend_296( + ffi.Pointer obj, + ffi.Pointer sel, + NSComparator cmptr, + ) { + return __objc_msgSend_296( + obj, + sel, + cmptr, + ); + } + + late final __objc_msgSend_296Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, NSComparator)>(); + + late final _sel_sortWithOptions_usingComparator_1 = + _registerName1("sortWithOptions:usingComparator:"); + void _objc_msgSend_297( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + NSComparator cmptr, + ) { + return __objc_msgSend_297( + obj, + sel, + opts, + cmptr, + ); + } + + late final __objc_msgSend_297Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, int, NSComparator)>(); + + late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); + ffi.Pointer _objc_msgSend_298( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_298( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_298Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_299( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_299( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_299Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_applyDifference_1 = _registerName1("applyDifference:"); + void _objc_msgSend_300( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer difference, + ) { + return __objc_msgSend_300( + obj, + sel, + difference, + ); + } + + late final __objc_msgSend_300Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSMutableData1 = _getClass1("NSMutableData"); + late final _sel_mutableBytes1 = _registerName1("mutableBytes"); + late final _sel_setLength_1 = _registerName1("setLength:"); + void _objc_msgSend_301( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_301( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_301Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); + late final _sel_appendData_1 = _registerName1("appendData:"); + void _objc_msgSend_302( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + ) { + return __objc_msgSend_302( + obj, + sel, + other, + ); + } + + late final __objc_msgSend_302Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); + late final _sel_replaceBytesInRange_withBytes_1 = + _registerName1("replaceBytesInRange:withBytes:"); + void _objc_msgSend_303( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer bytes, + ) { + return __objc_msgSend_303( + obj, + sel, + range, + bytes, + ); + } + + late final __objc_msgSend_303Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); + + late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); + late final _sel_setData_1 = _registerName1("setData:"); + late final _sel_replaceBytesInRange_withBytes_length_1 = + _registerName1("replaceBytesInRange:withBytes:length:"); + void _objc_msgSend_304( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer replacementBytes, + int replacementLength, + ) { + return __objc_msgSend_304( + obj, + sel, + range, + replacementBytes, + replacementLength, + ); + } + + late final __objc_msgSend_304Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer, int)>(); + + late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); + late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); + late final _sel_initWithLength_1 = _registerName1("initWithLength:"); + late final _sel_decompressUsingAlgorithm_error_1 = + _registerName1("decompressUsingAlgorithm:error:"); + bool _objc_msgSend_305( + ffi.Pointer obj, + ffi.Pointer sel, + int algorithm, + ffi.Pointer> error, + ) { + return __objc_msgSend_305( + obj, + sel, + algorithm, + error, + ); + } + + late final __objc_msgSend_305Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer>)>(); + + late final _sel_compressUsingAlgorithm_error_1 = + _registerName1("compressUsingAlgorithm:error:"); + late final _class_NSPurgeableData1 = _getClass1("NSPurgeableData"); + late final _class_NSMutableDictionary1 = _getClass1("NSMutableDictionary"); + late final _sel_removeObjectForKey_1 = _registerName1("removeObjectForKey:"); + late final _sel_setObject_forKey_1 = _registerName1("setObject:forKey:"); + void _objc_msgSend_306( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ffi.Pointer aKey, + ) { + return __objc_msgSend_306( + obj, + sel, + anObject, + aKey, + ); + } + + late final __objc_msgSend_306Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addEntriesFromDictionary_1 = + _registerName1("addEntriesFromDictionary:"); + void _objc_msgSend_307( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDictionary, + ) { + return __objc_msgSend_307( + obj, + sel, + otherDictionary, + ); + } + + late final __objc_msgSend_307Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeObjectsForKeys_1 = + _registerName1("removeObjectsForKeys:"); + late final _sel_setDictionary_1 = _registerName1("setDictionary:"); + late final _sel_setObject_forKeyedSubscript_1 = + _registerName1("setObject:forKeyedSubscript:"); + late final _sel_dictionaryWithCapacity_1 = + _registerName1("dictionaryWithCapacity:"); + ffi.Pointer _objc_msgSend_308( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ) { + return __objc_msgSend_308( + obj, + sel, + path, + ); + } + + late final __objc_msgSend_308Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_309( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_309( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_309Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dictionaryWithSharedKeySet_1 = + _registerName1("dictionaryWithSharedKeySet:"); + ffi.Pointer _objc_msgSend_310( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyset, + ) { + return __objc_msgSend_310( + obj, + sel, + keyset, + ); + } + + late final __objc_msgSend_310Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSNotification1 = _getClass1("NSNotification"); + late final _sel_name1 = _registerName1("name"); + late final _sel_initWithName_object_userInfo_1 = + _registerName1("initWithName:object:userInfo:"); + instancetype _objc_msgSend_311( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName name, + ffi.Pointer object, + ffi.Pointer userInfo, + ) { + return __objc_msgSend_311( + obj, + sel, + name, + object, + userInfo, + ); + } + + late final __objc_msgSend_311Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_notificationWithName_object_1 = + _registerName1("notificationWithName:object:"); + late final _sel_notificationWithName_object_userInfo_1 = + _registerName1("notificationWithName:object:userInfo:"); + late final _class_NSNotificationCenter1 = _getClass1("NSNotificationCenter"); + late final _sel_defaultCenter1 = _registerName1("defaultCenter"); + ffi.Pointer _objc_msgSend_312( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_312( + obj, + sel, + ); + } + + late final __objc_msgSend_312Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addObserver_selector_name_object_1 = + _registerName1("addObserver:selector:name:object:"); + void _objc_msgSend_313( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + ffi.Pointer aSelector, + NSNotificationName aName, + ffi.Pointer anObject, + ) { + return __objc_msgSend_313( + obj, + sel, + observer, + aSelector, + aName, + anObject, + ); + } + + late final __objc_msgSend_313Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>(); + + late final _sel_postNotification_1 = _registerName1("postNotification:"); + void _objc_msgSend_314( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer notification, + ) { + return __objc_msgSend_314( + obj, + sel, + notification, + ); + } + + late final __objc_msgSend_314Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_postNotificationName_object_1 = + _registerName1("postNotificationName:object:"); + void _objc_msgSend_315( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName aName, + ffi.Pointer anObject, + ) { + return __objc_msgSend_315( + obj, + sel, + aName, + anObject, + ); + } + + late final __objc_msgSend_315Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSNotificationName, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSNotificationName, ffi.Pointer)>(); + + late final _sel_postNotificationName_object_userInfo_1 = + _registerName1("postNotificationName:object:userInfo:"); + void _objc_msgSend_316( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName aName, + ffi.Pointer anObject, + ffi.Pointer aUserInfo, + ) { + return __objc_msgSend_316( + obj, + sel, + aName, + anObject, + aUserInfo, + ); + } + + late final __objc_msgSend_316Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeObserver_1 = _registerName1("removeObserver:"); + late final _sel_removeObserver_name_object_1 = + _registerName1("removeObserver:name:object:"); + void _objc_msgSend_317( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + NSNotificationName aName, + ffi.Pointer anObject, + ) { + return __objc_msgSend_317( + obj, + sel, + observer, + aName, + anObject, + ); + } + + late final __objc_msgSend_317Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>(); + + late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); + late final _class_NSProgress1 = _getClass1("NSProgress"); + late final _sel_currentProgress1 = _registerName1("currentProgress"); + ffi.Pointer _objc_msgSend_318( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_318( + obj, + sel, + ); + } + + late final __objc_msgSend_318Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_progressWithTotalUnitCount_1 = + _registerName1("progressWithTotalUnitCount:"); + ffi.Pointer _objc_msgSend_319( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ) { + return __objc_msgSend_319( + obj, + sel, + unitCount, + ); + } + + late final __objc_msgSend_319Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_discreteProgressWithTotalUnitCount_1 = + _registerName1("discreteProgressWithTotalUnitCount:"); + late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = + _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); + ffi.Pointer _objc_msgSend_320( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ffi.Pointer parent, + int portionOfParentTotalUnitCount, + ) { + return __objc_msgSend_320( + obj, + sel, + unitCount, + parent, + portionOfParentTotalUnitCount, + ); + } + + late final __objc_msgSend_320Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); + + late final _sel_initWithParent_userInfo_1 = + _registerName1("initWithParent:userInfo:"); + instancetype _objc_msgSend_321( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer parentProgressOrNil, + ffi.Pointer userInfoOrNil, + ) { + return __objc_msgSend_321( + obj, + sel, + parentProgressOrNil, + userInfoOrNil, + ); + } + + late final __objc_msgSend_321Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_becomeCurrentWithPendingUnitCount_1 = + _registerName1("becomeCurrentWithPendingUnitCount:"); + void _objc_msgSend_322( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ) { + return __objc_msgSend_322( + obj, + sel, + unitCount, + ); + } + + late final __objc_msgSend_322Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = + _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); + void _objc_msgSend_323( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ffi.Pointer<_ObjCBlock> work, + ) { + return __objc_msgSend_323( + obj, + sel, + unitCount, + work, + ); + } + + late final __objc_msgSend_323Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_resignCurrent1 = _registerName1("resignCurrent"); + late final _sel_addChild_withPendingUnitCount_1 = + _registerName1("addChild:withPendingUnitCount:"); + void _objc_msgSend_324( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer child, + int inUnitCount, + ) { + return __objc_msgSend_324( + obj, + sel, + child, + inUnitCount, + ); + } + + late final __objc_msgSend_324Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); + int _objc_msgSend_325( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_325( + obj, + sel, + ); + } + + late final __objc_msgSend_325Ptr = _lookup< + ffi.NativeFunction< + ffi.Int64 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); + void _objc_msgSend_326( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_326( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_326Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); + late final _sel_setCompletedUnitCount_1 = + _registerName1("setCompletedUnitCount:"); + late final _sel_setLocalizedDescription_1 = + _registerName1("setLocalizedDescription:"); + void _objc_msgSend_327( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_327( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_327Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_localizedAdditionalDescription1 = + _registerName1("localizedAdditionalDescription"); + late final _sel_setLocalizedAdditionalDescription_1 = + _registerName1("setLocalizedAdditionalDescription:"); + late final _sel_isCancellable1 = _registerName1("isCancellable"); + late final _sel_setCancellable_1 = _registerName1("setCancellable:"); + void _objc_msgSend_328( + ffi.Pointer obj, + ffi.Pointer sel, + bool value, + ) { + return __objc_msgSend_328( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_328Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, bool)>(); + + late final _sel_isPausable1 = _registerName1("isPausable"); + late final _sel_setPausable_1 = _registerName1("setPausable:"); + late final _sel_isCancelled1 = _registerName1("isCancelled"); + late final _sel_isPaused1 = _registerName1("isPaused"); + late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_329( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_329( + obj, + sel, + ); + } + + late final __objc_msgSend_329Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setCancellationHandler_1 = + _registerName1("setCancellationHandler:"); + void _objc_msgSend_330( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> value, + ) { + return __objc_msgSend_330( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_330Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_pausingHandler1 = _registerName1("pausingHandler"); + late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); + late final _sel_resumingHandler1 = _registerName1("resumingHandler"); + late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); + late final _sel_setUserInfoObject_forKey_1 = + _registerName1("setUserInfoObject:forKey:"); + late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); + late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); + late final _sel_isFinished1 = _registerName1("isFinished"); + late final _sel_cancel1 = _registerName1("cancel"); + late final _sel_pause1 = _registerName1("pause"); + late final _sel_resume1 = _registerName1("resume"); + late final _sel_kind1 = _registerName1("kind"); + late final _sel_setKind_1 = _registerName1("setKind:"); + late final _sel_estimatedTimeRemaining1 = + _registerName1("estimatedTimeRemaining"); + late final _sel_setEstimatedTimeRemaining_1 = + _registerName1("setEstimatedTimeRemaining:"); + void _objc_msgSend_331( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_331( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_331Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_throughput1 = _registerName1("throughput"); + late final _sel_setThroughput_1 = _registerName1("setThroughput:"); + late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); + late final _sel_setFileOperationKind_1 = + _registerName1("setFileOperationKind:"); + late final _sel_fileURL1 = _registerName1("fileURL"); + late final _sel_setFileURL_1 = _registerName1("setFileURL:"); + void _objc_msgSend_332( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_332( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_332Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); + late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); + late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); + late final _sel_setFileCompletedCount_1 = + _registerName1("setFileCompletedCount:"); + late final _sel_publish1 = _registerName1("publish"); + late final _sel_unpublish1 = _registerName1("unpublish"); + late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = + _registerName1("addSubscriberForFileURL:withPublishingHandler:"); + ffi.Pointer _objc_msgSend_333( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + NSProgressPublishingHandler publishingHandler, + ) { + return __objc_msgSend_333( + obj, + sel, + url, + publishingHandler, + ); + } + + late final __objc_msgSend_333Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>>('objc_msgSend'); + late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>(); + + late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); + late final _sel_isOld1 = _registerName1("isOld"); + late final _sel_progress1 = _registerName1("progress"); + late final _class_NSOperation1 = _getClass1("NSOperation"); + late final _sel_start1 = _registerName1("start"); + late final _sel_main1 = _registerName1("main"); + late final _sel_isExecuting1 = _registerName1("isExecuting"); + late final _sel_isConcurrent1 = _registerName1("isConcurrent"); + late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); + late final _sel_isReady1 = _registerName1("isReady"); + late final _sel_addDependency_1 = _registerName1("addDependency:"); + void _objc_msgSend_334( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer op, + ) { + return __objc_msgSend_334( + obj, + sel, + op, + ); + } + + late final __objc_msgSend_334Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_removeDependency_1 = _registerName1("removeDependency:"); + late final _sel_dependencies1 = _registerName1("dependencies"); + late final _sel_queuePriority1 = _registerName1("queuePriority"); + int _objc_msgSend_335( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_335( + obj, + sel, + ); + } + + late final __objc_msgSend_335Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); + void _objc_msgSend_336( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_336( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_336Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_completionBlock1 = _registerName1("completionBlock"); + late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); + late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); + late final _sel_threadPriority1 = _registerName1("threadPriority"); + late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); + void _objc_msgSend_337( + ffi.Pointer obj, + ffi.Pointer sel, + double value, + ) { + return __objc_msgSend_337( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_337Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_qualityOfService1 = _registerName1("qualityOfService"); + int _objc_msgSend_338( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_338( + obj, + sel, + ); + } + + late final __objc_msgSend_338Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setQualityOfService_1 = + _registerName1("setQualityOfService:"); + void _objc_msgSend_339( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_339( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_339Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_setName_1 = _registerName1("setName:"); + late final _sel_addOperation_1 = _registerName1("addOperation:"); + late final _sel_addOperations_waitUntilFinished_1 = + _registerName1("addOperations:waitUntilFinished:"); + void _objc_msgSend_340( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer ops, + bool wait, + ) { + return __objc_msgSend_340( + obj, + sel, + ops, + wait, + ); + } + + late final __objc_msgSend_340Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_addOperationWithBlock_1 = + _registerName1("addOperationWithBlock:"); + void _objc_msgSend_341( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_341( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_341Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); + late final _sel_maxConcurrentOperationCount1 = + _registerName1("maxConcurrentOperationCount"); + late final _sel_setMaxConcurrentOperationCount_1 = + _registerName1("setMaxConcurrentOperationCount:"); + void _objc_msgSend_342( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_342( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_342Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_isSuspended1 = _registerName1("isSuspended"); + late final _sel_setSuspended_1 = _registerName1("setSuspended:"); + late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); + dispatch_queue_t _objc_msgSend_343( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_343( + obj, + sel, + ); + } + + late final __objc_msgSend_343Ptr = _lookup< + ffi.NativeFunction< + dispatch_queue_t Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< + dispatch_queue_t Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); + void _objc_msgSend_344( + ffi.Pointer obj, + ffi.Pointer sel, + dispatch_queue_t value, + ) { + return __objc_msgSend_344( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_344Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + dispatch_queue_t)>>('objc_msgSend'); + late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); + + late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); + late final _sel_waitUntilAllOperationsAreFinished1 = + _registerName1("waitUntilAllOperationsAreFinished"); + late final _sel_currentQueue1 = _registerName1("currentQueue"); + ffi.Pointer _objc_msgSend_345( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_345( + obj, + sel, + ); + } + + late final __objc_msgSend_345Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_mainQueue1 = _registerName1("mainQueue"); + late final _sel_operations1 = _registerName1("operations"); + late final _sel_operationCount1 = _registerName1("operationCount"); + late final _sel_addObserverForName_object_queue_usingBlock_1 = + _registerName1("addObserverForName:object:queue:usingBlock:"); + ffi.Pointer _objc_msgSend_346( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName name, + ffi.Pointer obj1, + ffi.Pointer queue, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_346( + obj, + sel, + name, + obj1, + queue, + block, + ); + } + + late final __objc_msgSend_346Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final ffi.Pointer + _NSSystemClockDidChangeNotification = + _lookup('NSSystemClockDidChangeNotification'); + + NSNotificationName get NSSystemClockDidChangeNotification => + _NSSystemClockDidChangeNotification.value; + + set NSSystemClockDidChangeNotification(NSNotificationName value) => + _NSSystemClockDidChangeNotification.value = value; + + late final _class_NSDate1 = _getClass1("NSDate"); + late final _sel_timeIntervalSinceReferenceDate1 = + _registerName1("timeIntervalSinceReferenceDate"); + late final _sel_initWithTimeIntervalSinceReferenceDate_1 = + _registerName1("initWithTimeIntervalSinceReferenceDate:"); + instancetype _objc_msgSend_347( + ffi.Pointer obj, + ffi.Pointer sel, + double ti, + ) { + return __objc_msgSend_347( + obj, + sel, + ti, + ); + } + + late final __objc_msgSend_347Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_timeIntervalSinceDate_1 = + _registerName1("timeIntervalSinceDate:"); + double _objc_msgSend_348( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, + ) { + return __objc_msgSend_348( + obj, + sel, + anotherDate, + ); + } + + late final __objc_msgSend_348Ptr = _lookup< + ffi.NativeFunction< + NSTimeInterval Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_timeIntervalSinceNow1 = + _registerName1("timeIntervalSinceNow"); + late final _sel_timeIntervalSince19701 = + _registerName1("timeIntervalSince1970"); + late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); + late final _sel_dateByAddingTimeInterval_1 = + _registerName1("dateByAddingTimeInterval:"); + late final _sel_earlierDate_1 = _registerName1("earlierDate:"); + ffi.Pointer _objc_msgSend_349( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, + ) { + return __objc_msgSend_349( + obj, + sel, + anotherDate, + ); + } + + late final __objc_msgSend_349Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_laterDate_1 = _registerName1("laterDate:"); + int _objc_msgSend_350( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + ) { + return __objc_msgSend_350( + obj, + sel, + other, + ); + } + + late final __objc_msgSend_350Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); + bool _objc_msgSend_351( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDate, + ) { + return __objc_msgSend_351( + obj, + sel, + otherDate, + ); + } + + late final __objc_msgSend_351Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_date1 = _registerName1("date"); + late final _sel_dateWithTimeIntervalSinceNow_1 = + _registerName1("dateWithTimeIntervalSinceNow:"); + late final _sel_dateWithTimeIntervalSinceReferenceDate_1 = + _registerName1("dateWithTimeIntervalSinceReferenceDate:"); + late final _sel_dateWithTimeIntervalSince1970_1 = + _registerName1("dateWithTimeIntervalSince1970:"); + late final _sel_dateWithTimeInterval_sinceDate_1 = + _registerName1("dateWithTimeInterval:sinceDate:"); + instancetype _objc_msgSend_352( + ffi.Pointer obj, + ffi.Pointer sel, + double secsToBeAdded, + ffi.Pointer date, + ) { + return __objc_msgSend_352( + obj, + sel, + secsToBeAdded, + date, + ); + } + + late final __objc_msgSend_352Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + double, ffi.Pointer)>(); + + late final _sel_distantFuture1 = _registerName1("distantFuture"); + ffi.Pointer _objc_msgSend_353( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_353( + obj, + sel, + ); + } + + late final __objc_msgSend_353Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_distantPast1 = _registerName1("distantPast"); + late final _sel_now1 = _registerName1("now"); + late final _sel_initWithTimeIntervalSinceNow_1 = + _registerName1("initWithTimeIntervalSinceNow:"); + late final _sel_initWithTimeIntervalSince1970_1 = + _registerName1("initWithTimeIntervalSince1970:"); + late final _sel_initWithTimeInterval_sinceDate_1 = + _registerName1("initWithTimeInterval:sinceDate:"); + late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); + late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); + late final _sel_supportsSecureCoding1 = + _registerName1("supportsSecureCoding"); + late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); + instancetype _objc_msgSend_354( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URL, + int cachePolicy, + double timeoutInterval, + ) { + return __objc_msgSend_354( + obj, + sel, + URL, + cachePolicy, + timeoutInterval, + ); + } + + late final __objc_msgSend_354Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, double)>(); + + late final _sel_initWithURL_1 = _registerName1("initWithURL:"); + late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("initWithURL:cachePolicy:timeoutInterval:"); + late final _sel_URL1 = _registerName1("URL"); + late final _sel_cachePolicy1 = _registerName1("cachePolicy"); + int _objc_msgSend_355( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_355( + obj, + sel, + ); + } + + late final __objc_msgSend_355Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); + late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); + late final _sel_networkServiceType1 = _registerName1("networkServiceType"); + int _objc_msgSend_356( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_356( + obj, + sel, + ); + } + + late final __objc_msgSend_356Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_allowsCellularAccess1 = + _registerName1("allowsCellularAccess"); + late final _sel_allowsExpensiveNetworkAccess1 = + _registerName1("allowsExpensiveNetworkAccess"); + late final _sel_allowsConstrainedNetworkAccess1 = + _registerName1("allowsConstrainedNetworkAccess"); + late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); + late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); + late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); + late final _sel_valueForHTTPHeaderField_1 = + _registerName1("valueForHTTPHeaderField:"); + late final _sel_HTTPBody1 = _registerName1("HTTPBody"); + late final _class_NSInputStream1 = _getClass1("NSInputStream"); + late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); + ffi.Pointer _objc_msgSend_357( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_357( + obj, + sel, + ); + } + + late final __objc_msgSend_357Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_HTTPShouldHandleCookies1 = + _registerName1("HTTPShouldHandleCookies"); + late final _sel_HTTPShouldUsePipelining1 = + _registerName1("HTTPShouldUsePipelining"); + late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); + late final _sel_setURL_1 = _registerName1("setURL:"); + late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); + void _objc_msgSend_358( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_358( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_358Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); + late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); + late final _sel_setNetworkServiceType_1 = + _registerName1("setNetworkServiceType:"); + void _objc_msgSend_359( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_359( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_359Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_setAllowsCellularAccess_1 = + _registerName1("setAllowsCellularAccess:"); + late final _sel_setAllowsExpensiveNetworkAccess_1 = + _registerName1("setAllowsExpensiveNetworkAccess:"); + late final _sel_setAllowsConstrainedNetworkAccess_1 = + _registerName1("setAllowsConstrainedNetworkAccess:"); + late final _sel_setAssumesHTTP3Capable_1 = + _registerName1("setAssumesHTTP3Capable:"); + late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); + late final _sel_setAllHTTPHeaderFields_1 = + _registerName1("setAllHTTPHeaderFields:"); + void _objc_msgSend_360( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_360( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_360Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setValue_forHTTPHeaderField_1 = + _registerName1("setValue:forHTTPHeaderField:"); + void _objc_msgSend_361( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer field, + ) { + return __objc_msgSend_361( + obj, + sel, + value, + field, + ); + } + + late final __objc_msgSend_361Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_addValue_forHTTPHeaderField_1 = + _registerName1("addValue:forHTTPHeaderField:"); + late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); + void _objc_msgSend_362( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_362( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_362Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); + void _objc_msgSend_363( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_363( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_363Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setHTTPShouldHandleCookies_1 = + _registerName1("setHTTPShouldHandleCookies:"); + late final _sel_setHTTPShouldUsePipelining_1 = + _registerName1("setHTTPShouldUsePipelining:"); + late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); + late final _sel_sharedHTTPCookieStorage1 = + _registerName1("sharedHTTPCookieStorage"); + ffi.Pointer _objc_msgSend_364( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_364( + obj, + sel, + ); + } + + late final __objc_msgSend_364Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = + _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); + ffi.Pointer _objc_msgSend_365( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer identifier, + ) { + return __objc_msgSend_365( + obj, + sel, + identifier, + ); + } + + late final __objc_msgSend_365Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_cookies1 = _registerName1("cookies"); + late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); + late final _sel_setCookie_1 = _registerName1("setCookie:"); + void _objc_msgSend_366( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookie, + ) { + return __objc_msgSend_366( + obj, + sel, + cookie, + ); + } + + late final __objc_msgSend_366Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); + late final _sel_removeCookiesSinceDate_1 = + _registerName1("removeCookiesSinceDate:"); + void _objc_msgSend_367( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, + ) { + return __objc_msgSend_367( + obj, + sel, + date, + ); + } + + late final __objc_msgSend_367Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); + late final _sel_setCookies_forURL_mainDocumentURL_1 = + _registerName1("setCookies:forURL:mainDocumentURL:"); + void _objc_msgSend_368( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer URL, + ffi.Pointer mainDocumentURL, + ) { + return __objc_msgSend_368( + obj, + sel, + cookies, + URL, + mainDocumentURL, + ); + } + + late final __objc_msgSend_368Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); + int _objc_msgSend_369( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_369( + obj, + sel, + ); + } + + late final __objc_msgSend_369Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setCookieAcceptPolicy_1 = + _registerName1("setCookieAcceptPolicy:"); + void _objc_msgSend_370( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_370( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_370Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_sortedCookiesUsingDescriptors_1 = + _registerName1("sortedCookiesUsingDescriptors:"); + late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); + late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); + late final _sel_originalRequest1 = _registerName1("originalRequest"); + ffi.Pointer _objc_msgSend_371( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_371( + obj, + sel, + ); + } + + late final __objc_msgSend_371Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_currentRequest1 = _registerName1("currentRequest"); + late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); + late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = + _registerName1( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); + instancetype _objc_msgSend_372( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URL, + ffi.Pointer MIMEType, + int length, + ffi.Pointer name, + ) { + return __objc_msgSend_372( + obj, + sel, + URL, + MIMEType, + length, + name, + ); + } + + late final __objc_msgSend_372Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + + late final _sel_MIMEType1 = _registerName1("MIMEType"); + late final _sel_expectedContentLength1 = + _registerName1("expectedContentLength"); + late final _sel_textEncodingName1 = _registerName1("textEncodingName"); + late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); + late final _sel_response1 = _registerName1("response"); + ffi.Pointer _objc_msgSend_373( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_373( + obj, + sel, + ); + } + + late final __objc_msgSend_373Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); + late final _sel_setEarliestBeginDate_1 = + _registerName1("setEarliestBeginDate:"); + void _objc_msgSend_374( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_374( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_374Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_countOfBytesClientExpectsToSend1 = + _registerName1("countOfBytesClientExpectsToSend"); + late final _sel_setCountOfBytesClientExpectsToSend_1 = + _registerName1("setCountOfBytesClientExpectsToSend:"); + late final _sel_countOfBytesClientExpectsToReceive1 = + _registerName1("countOfBytesClientExpectsToReceive"); + late final _sel_setCountOfBytesClientExpectsToReceive_1 = + _registerName1("setCountOfBytesClientExpectsToReceive:"); + late final _sel_countOfBytesReceived1 = + _registerName1("countOfBytesReceived"); + late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); + late final _sel_countOfBytesExpectedToSend1 = + _registerName1("countOfBytesExpectedToSend"); + late final _sel_countOfBytesExpectedToReceive1 = + _registerName1("countOfBytesExpectedToReceive"); + late final _sel_taskDescription1 = _registerName1("taskDescription"); + late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); + late final _sel_state1 = _registerName1("state"); + int _objc_msgSend_375( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_375( + obj, + sel, + ); + } + + late final __objc_msgSend_375Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_error1 = _registerName1("error"); + ffi.Pointer _objc_msgSend_376( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_376( + obj, + sel, + ); + } + + late final __objc_msgSend_376Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_suspend1 = _registerName1("suspend"); + late final _sel_priority1 = _registerName1("priority"); + late final _sel_setPriority_1 = _registerName1("setPriority:"); + void _objc_msgSend_377( + ffi.Pointer obj, + ffi.Pointer sel, + double value, + ) { + return __objc_msgSend_377( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_377Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Float)>>('objc_msgSend'); + late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); + + late final _sel_prefersIncrementalDelivery1 = + _registerName1("prefersIncrementalDelivery"); + late final _sel_setPrefersIncrementalDelivery_1 = + _registerName1("setPrefersIncrementalDelivery:"); + late final _sel_storeCookies_forTask_1 = + _registerName1("storeCookies:forTask:"); + void _objc_msgSend_378( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer task, + ) { + return __objc_msgSend_378( + obj, + sel, + cookies, + task, + ); + } + + late final __objc_msgSend_378Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_getCookiesForTask_completionHandler_1 = + _registerName1("getCookiesForTask:completionHandler:"); + void _objc_msgSend_379( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_379( + obj, + sel, + task, + completionHandler, + ); + } + + late final __objc_msgSend_379Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final ffi.Pointer + _NSHTTPCookieManagerAcceptPolicyChangedNotification = + _lookup( + 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); + + NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; + + set NSHTTPCookieManagerAcceptPolicyChangedNotification( + NSNotificationName value) => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; + + late final ffi.Pointer + _NSHTTPCookieManagerCookiesChangedNotification = + _lookup( + 'NSHTTPCookieManagerCookiesChangedNotification'); + + NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => + _NSHTTPCookieManagerCookiesChangedNotification.value; + + set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => + _NSHTTPCookieManagerCookiesChangedNotification.value = value; + + late final ffi.Pointer + _NSProgressEstimatedTimeRemainingKey = + _lookup('NSProgressEstimatedTimeRemainingKey'); + + NSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => + _NSProgressEstimatedTimeRemainingKey.value; + + set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey value) => + _NSProgressEstimatedTimeRemainingKey.value = value; + + late final ffi.Pointer _NSProgressThroughputKey = + _lookup('NSProgressThroughputKey'); + + NSProgressUserInfoKey get NSProgressThroughputKey => + _NSProgressThroughputKey.value; + + set NSProgressThroughputKey(NSProgressUserInfoKey value) => + _NSProgressThroughputKey.value = value; + + late final ffi.Pointer _NSProgressKindFile = + _lookup('NSProgressKindFile'); + + NSProgressKind get NSProgressKindFile => _NSProgressKindFile.value; + + set NSProgressKindFile(NSProgressKind value) => + _NSProgressKindFile.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindKey = + _lookup('NSProgressFileOperationKindKey'); + + NSProgressUserInfoKey get NSProgressFileOperationKindKey => + _NSProgressFileOperationKindKey.value; + + set NSProgressFileOperationKindKey(NSProgressUserInfoKey value) => + _NSProgressFileOperationKindKey.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindDownloading = + _lookup( + 'NSProgressFileOperationKindDownloading'); + + NSProgressFileOperationKind get NSProgressFileOperationKindDownloading => + _NSProgressFileOperationKindDownloading.value; + + set NSProgressFileOperationKindDownloading( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDownloading.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindDecompressingAfterDownloading = + _lookup( + 'NSProgressFileOperationKindDecompressingAfterDownloading'); + + NSProgressFileOperationKind + get NSProgressFileOperationKindDecompressingAfterDownloading => + _NSProgressFileOperationKindDecompressingAfterDownloading.value; + + set NSProgressFileOperationKindDecompressingAfterDownloading( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDecompressingAfterDownloading.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindReceiving = + _lookup( + 'NSProgressFileOperationKindReceiving'); + + NSProgressFileOperationKind get NSProgressFileOperationKindReceiving => + _NSProgressFileOperationKindReceiving.value; + + set NSProgressFileOperationKindReceiving(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindReceiving.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindCopying = + _lookup( + 'NSProgressFileOperationKindCopying'); + + NSProgressFileOperationKind get NSProgressFileOperationKindCopying => + _NSProgressFileOperationKindCopying.value; + + set NSProgressFileOperationKindCopying(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindCopying.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindUploading = + _lookup( + 'NSProgressFileOperationKindUploading'); + + NSProgressFileOperationKind get NSProgressFileOperationKindUploading => + _NSProgressFileOperationKindUploading.value; + + set NSProgressFileOperationKindUploading(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindUploading.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindDuplicating = + _lookup( + 'NSProgressFileOperationKindDuplicating'); + + NSProgressFileOperationKind get NSProgressFileOperationKindDuplicating => + _NSProgressFileOperationKindDuplicating.value; + + set NSProgressFileOperationKindDuplicating( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDuplicating.value = value; + + late final ffi.Pointer _NSProgressFileURLKey = + _lookup('NSProgressFileURLKey'); + + NSProgressUserInfoKey get NSProgressFileURLKey => _NSProgressFileURLKey.value; + + set NSProgressFileURLKey(NSProgressUserInfoKey value) => + _NSProgressFileURLKey.value = value; + + late final ffi.Pointer _NSProgressFileTotalCountKey = + _lookup('NSProgressFileTotalCountKey'); + + NSProgressUserInfoKey get NSProgressFileTotalCountKey => + _NSProgressFileTotalCountKey.value; + + set NSProgressFileTotalCountKey(NSProgressUserInfoKey value) => + _NSProgressFileTotalCountKey.value = value; + + late final ffi.Pointer + _NSProgressFileCompletedCountKey = + _lookup('NSProgressFileCompletedCountKey'); + + NSProgressUserInfoKey get NSProgressFileCompletedCountKey => + _NSProgressFileCompletedCountKey.value; + + set NSProgressFileCompletedCountKey(NSProgressUserInfoKey value) => + _NSProgressFileCompletedCountKey.value = value; + + late final ffi.Pointer + _NSProgressFileAnimationImageKey = + _lookup('NSProgressFileAnimationImageKey'); + + NSProgressUserInfoKey get NSProgressFileAnimationImageKey => + _NSProgressFileAnimationImageKey.value; + + set NSProgressFileAnimationImageKey(NSProgressUserInfoKey value) => + _NSProgressFileAnimationImageKey.value = value; + + late final ffi.Pointer + _NSProgressFileAnimationImageOriginalRectKey = + _lookup( + 'NSProgressFileAnimationImageOriginalRectKey'); + + NSProgressUserInfoKey get NSProgressFileAnimationImageOriginalRectKey => + _NSProgressFileAnimationImageOriginalRectKey.value; + + set NSProgressFileAnimationImageOriginalRectKey( + NSProgressUserInfoKey value) => + _NSProgressFileAnimationImageOriginalRectKey.value = value; + + late final ffi.Pointer _NSProgressFileIconKey = + _lookup('NSProgressFileIconKey'); + + NSProgressUserInfoKey get NSProgressFileIconKey => + _NSProgressFileIconKey.value; + + set NSProgressFileIconKey(NSProgressUserInfoKey value) => + _NSProgressFileIconKey.value = value; + + late final ffi.Pointer _kCFTypeArrayCallBacks = + _lookup('kCFTypeArrayCallBacks'); + + CFArrayCallBacks get kCFTypeArrayCallBacks => _kCFTypeArrayCallBacks.ref; + + int CFArrayGetTypeID() { + return _CFArrayGetTypeID(); + } + + late final _CFArrayGetTypeIDPtr = + _lookup>('CFArrayGetTypeID'); + late final _CFArrayGetTypeID = + _CFArrayGetTypeIDPtr.asFunction(); + + CFArrayRef CFArrayCreate( + CFAllocatorRef allocator, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, + ) { + return _CFArrayCreate( + allocator, + values, + numValues, + callBacks, + ); + } + + late final _CFArrayCreatePtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function( + CFAllocatorRef, + ffi.Pointer>, + CFIndex, + ffi.Pointer)>>('CFArrayCreate'); + late final _CFArrayCreate = _CFArrayCreatePtr.asFunction< + CFArrayRef Function(CFAllocatorRef, ffi.Pointer>, + int, ffi.Pointer)>(); + + CFArrayRef CFArrayCreateCopy( + CFAllocatorRef allocator, + CFArrayRef theArray, + ) { + return _CFArrayCreateCopy( + allocator, + theArray, + ); + } + + late final _CFArrayCreateCopyPtr = _lookup< + ffi.NativeFunction>( + 'CFArrayCreateCopy'); + late final _CFArrayCreateCopy = _CFArrayCreateCopyPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFArrayRef)>(); + + CFMutableArrayRef CFArrayCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, + ) { + return _CFArrayCreateMutable( + allocator, + capacity, + callBacks, + ); + } + + late final _CFArrayCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableArrayRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFArrayCreateMutable'); + late final _CFArrayCreateMutable = _CFArrayCreateMutablePtr.asFunction< + CFMutableArrayRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); + + CFMutableArrayRef CFArrayCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFArrayRef theArray, + ) { + return _CFArrayCreateMutableCopy( + allocator, + capacity, + theArray, + ); + } + + late final _CFArrayCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableArrayRef Function(CFAllocatorRef, CFIndex, + CFArrayRef)>>('CFArrayCreateMutableCopy'); + late final _CFArrayCreateMutableCopy = + _CFArrayCreateMutableCopyPtr.asFunction< + CFMutableArrayRef Function(CFAllocatorRef, int, CFArrayRef)>(); + + int CFArrayGetCount( + CFArrayRef theArray, + ) { + return _CFArrayGetCount( + theArray, + ); + } + + late final _CFArrayGetCountPtr = + _lookup>( + 'CFArrayGetCount'); + late final _CFArrayGetCount = + _CFArrayGetCountPtr.asFunction(); + + int CFArrayGetCountOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, + ) { + return _CFArrayGetCountOfValue( + theArray, + range, + value, + ); + } + + late final _CFArrayGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetCountOfValue'); + late final _CFArrayGetCountOfValue = _CFArrayGetCountOfValuePtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer)>(); + + int CFArrayContainsValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, + ) { + return _CFArrayContainsValue( + theArray, + range, + value, + ); + } + + late final _CFArrayContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayContainsValue'); + late final _CFArrayContainsValue = _CFArrayContainsValuePtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer)>(); + + ffi.Pointer CFArrayGetValueAtIndex( + CFArrayRef theArray, + int idx, + ) { + return _CFArrayGetValueAtIndex( + theArray, + idx, + ); + } + + late final _CFArrayGetValueAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFArrayRef, CFIndex)>>('CFArrayGetValueAtIndex'); + late final _CFArrayGetValueAtIndex = _CFArrayGetValueAtIndexPtr.asFunction< + ffi.Pointer Function(CFArrayRef, int)>(); + + void CFArrayGetValues( + CFArrayRef theArray, + CFRange range, + ffi.Pointer> values, + ) { + return _CFArrayGetValues( + theArray, + range, + values, + ); + } + + late final _CFArrayGetValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFArrayRef, CFRange, + ffi.Pointer>)>>('CFArrayGetValues'); + late final _CFArrayGetValues = _CFArrayGetValuesPtr.asFunction< + void Function(CFArrayRef, CFRange, ffi.Pointer>)>(); + + void CFArrayApplyFunction( + CFArrayRef theArray, + CFRange range, + CFArrayApplierFunction applier, + ffi.Pointer context, + ) { + return _CFArrayApplyFunction( + theArray, + range, + applier, + context, + ); + } + + late final _CFArrayApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFArrayRef, CFRange, CFArrayApplierFunction, + ffi.Pointer)>>('CFArrayApplyFunction'); + late final _CFArrayApplyFunction = _CFArrayApplyFunctionPtr.asFunction< + void Function(CFArrayRef, CFRange, CFArrayApplierFunction, + ffi.Pointer)>(); + + int CFArrayGetFirstIndexOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, + ) { + return _CFArrayGetFirstIndexOfValue( + theArray, + range, + value, + ); + } + + late final _CFArrayGetFirstIndexOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetFirstIndexOfValue'); + late final _CFArrayGetFirstIndexOfValue = _CFArrayGetFirstIndexOfValuePtr + .asFunction)>(); + + int CFArrayGetLastIndexOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, + ) { + return _CFArrayGetLastIndexOfValue( + theArray, + range, + value, + ); + } + + late final _CFArrayGetLastIndexOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetLastIndexOfValue'); + late final _CFArrayGetLastIndexOfValue = _CFArrayGetLastIndexOfValuePtr + .asFunction)>(); + + int CFArrayBSearchValues( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, + CFComparatorFunction comparator, + ffi.Pointer context, + ) { + return _CFArrayBSearchValues( + theArray, + range, + value, + comparator, + context, + ); + } + + late final _CFArrayBSearchValuesPtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFArrayRef, + CFRange, + ffi.Pointer, + CFComparatorFunction, + ffi.Pointer)>>('CFArrayBSearchValues'); + late final _CFArrayBSearchValues = _CFArrayBSearchValuesPtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer, + CFComparatorFunction, ffi.Pointer)>(); + + void CFArrayAppendValue( + CFMutableArrayRef theArray, + ffi.Pointer value, + ) { + return _CFArrayAppendValue( + theArray, + value, + ); + } + + late final _CFArrayAppendValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableArrayRef, ffi.Pointer)>>('CFArrayAppendValue'); + late final _CFArrayAppendValue = _CFArrayAppendValuePtr.asFunction< + void Function(CFMutableArrayRef, ffi.Pointer)>(); + + void CFArrayInsertValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ffi.Pointer value, + ) { + return _CFArrayInsertValueAtIndex( + theArray, + idx, + value, + ); + } + + late final _CFArrayInsertValueAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFIndex, + ffi.Pointer)>>('CFArrayInsertValueAtIndex'); + late final _CFArrayInsertValueAtIndex = + _CFArrayInsertValueAtIndexPtr.asFunction< + void Function(CFMutableArrayRef, int, ffi.Pointer)>(); + + void CFArraySetValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ffi.Pointer value, + ) { + return _CFArraySetValueAtIndex( + theArray, + idx, + value, + ); + } + + late final _CFArraySetValueAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFIndex, + ffi.Pointer)>>('CFArraySetValueAtIndex'); + late final _CFArraySetValueAtIndex = _CFArraySetValueAtIndexPtr.asFunction< + void Function(CFMutableArrayRef, int, ffi.Pointer)>(); + + void CFArrayRemoveValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ) { + return _CFArrayRemoveValueAtIndex( + theArray, + idx, + ); + } + + late final _CFArrayRemoveValueAtIndexPtr = _lookup< + ffi.NativeFunction>( + 'CFArrayRemoveValueAtIndex'); + late final _CFArrayRemoveValueAtIndex = _CFArrayRemoveValueAtIndexPtr + .asFunction(); + + void CFArrayRemoveAllValues( + CFMutableArrayRef theArray, + ) { + return _CFArrayRemoveAllValues( + theArray, + ); + } + + late final _CFArrayRemoveAllValuesPtr = + _lookup>( + 'CFArrayRemoveAllValues'); + late final _CFArrayRemoveAllValues = + _CFArrayRemoveAllValuesPtr.asFunction(); + + void CFArrayReplaceValues( + CFMutableArrayRef theArray, + CFRange range, + ffi.Pointer> newValues, + int newCount, + ) { + return _CFArrayReplaceValues( + theArray, + range, + newValues, + newCount, + ); + } + + late final _CFArrayReplaceValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableArrayRef, + CFRange, + ffi.Pointer>, + CFIndex)>>('CFArrayReplaceValues'); + late final _CFArrayReplaceValues = _CFArrayReplaceValuesPtr.asFunction< + void Function(CFMutableArrayRef, CFRange, + ffi.Pointer>, int)>(); + + void CFArrayExchangeValuesAtIndices( + CFMutableArrayRef theArray, + int idx1, + int idx2, + ) { + return _CFArrayExchangeValuesAtIndices( + theArray, + idx1, + idx2, + ); + } + + late final _CFArrayExchangeValuesAtIndicesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFIndex, + CFIndex)>>('CFArrayExchangeValuesAtIndices'); + late final _CFArrayExchangeValuesAtIndices = + _CFArrayExchangeValuesAtIndicesPtr.asFunction< + void Function(CFMutableArrayRef, int, int)>(); + + void CFArraySortValues( + CFMutableArrayRef theArray, + CFRange range, + CFComparatorFunction comparator, + ffi.Pointer context, + ) { + return _CFArraySortValues( + theArray, + range, + comparator, + context, + ); + } + + late final _CFArraySortValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, + ffi.Pointer)>>('CFArraySortValues'); + late final _CFArraySortValues = _CFArraySortValuesPtr.asFunction< + void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, + ffi.Pointer)>(); + + void CFArrayAppendArray( + CFMutableArrayRef theArray, + CFArrayRef otherArray, + CFRange otherRange, + ) { + return _CFArrayAppendArray( + theArray, + otherArray, + otherRange, + ); + } + + late final _CFArrayAppendArrayPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableArrayRef, CFArrayRef, CFRange)>>('CFArrayAppendArray'); + late final _CFArrayAppendArray = _CFArrayAppendArrayPtr.asFunction< + void Function(CFMutableArrayRef, CFArrayRef, CFRange)>(); + + late final _class_OS_object1 = _getClass1("OS_object"); + ffi.Pointer os_retain( + ffi.Pointer object, + ) { + return _os_retain( + object, + ); + } + + late final _os_retainPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('os_retain'); + late final _os_retain = _os_retainPtr + .asFunction Function(ffi.Pointer)>(); + + void os_release( + ffi.Pointer object, + ) { + return _os_release( + object, + ); + } + + late final _os_releasePtr = + _lookup)>>( + 'os_release'); + late final _os_release = + _os_releasePtr.asFunction)>(); + + ffi.Pointer sec_retain( + ffi.Pointer obj, + ) { + return _sec_retain( + obj, + ); + } + + late final _sec_retainPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('sec_retain'); + late final _sec_retain = _sec_retainPtr + .asFunction Function(ffi.Pointer)>(); + + void sec_release( + ffi.Pointer obj, + ) { + return _sec_release( + obj, + ); + } + + late final _sec_releasePtr = + _lookup)>>( + 'sec_release'); + late final _sec_release = + _sec_releasePtr.asFunction)>(); + + CFStringRef SecCopyErrorMessageString( + int status, + ffi.Pointer reserved, + ) { + return _SecCopyErrorMessageString( + status, + reserved, + ); + } + + late final _SecCopyErrorMessageStringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + OSStatus, ffi.Pointer)>>('SecCopyErrorMessageString'); + late final _SecCopyErrorMessageString = _SecCopyErrorMessageStringPtr + .asFunction)>(); + + void __assert_rtn( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + ) { + return ___assert_rtn( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final ___assert_rtnPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int, ffi.Pointer)>>('__assert_rtn'); + late final ___assert_rtn = ___assert_rtnPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final ffi.Pointer<_RuneLocale> __DefaultRuneLocale = + _lookup<_RuneLocale>('_DefaultRuneLocale'); + + _RuneLocale get _DefaultRuneLocale => __DefaultRuneLocale.ref; + + late final ffi.Pointer> __CurrentRuneLocale = + _lookup>('_CurrentRuneLocale'); + + ffi.Pointer<_RuneLocale> get _CurrentRuneLocale => __CurrentRuneLocale.value; + + set _CurrentRuneLocale(ffi.Pointer<_RuneLocale> value) => + __CurrentRuneLocale.value = value; + + int ___runetype( + int arg0, + ) { + return ____runetype( + arg0, + ); + } + + late final ____runetypePtr = _lookup< + ffi.NativeFunction>( + '___runetype'); + late final ____runetype = ____runetypePtr.asFunction(); + + int ___tolower( + int arg0, + ) { + return ____tolower( + arg0, + ); + } + + late final ____tolowerPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '___tolower'); + late final ____tolower = ____tolowerPtr.asFunction(); + + int ___toupper( + int arg0, + ) { + return ____toupper( + arg0, + ); + } + + late final ____toupperPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '___toupper'); + late final ____toupper = ____toupperPtr.asFunction(); + + int __maskrune( + int arg0, + int arg1, + ) { + return ___maskrune( + arg0, + arg1, + ); + } + + late final ___maskrunePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + __darwin_ct_rune_t, ffi.UnsignedLong)>>('__maskrune'); + late final ___maskrune = ___maskrunePtr.asFunction(); + + int __toupper( + int arg0, + ) { + return ___toupper1( + arg0, + ); + } + + late final ___toupperPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '__toupper'); + late final ___toupper1 = ___toupperPtr.asFunction(); + + int __tolower( + int arg0, + ) { + return ___tolower1( + arg0, + ); + } + + late final ___tolowerPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '__tolower'); + late final ___tolower1 = ___tolowerPtr.asFunction(); + + ffi.Pointer __error() { + return ___error(); + } + + late final ___errorPtr = + _lookup Function()>>('__error'); + late final ___error = + ___errorPtr.asFunction Function()>(); + + ffi.Pointer localeconv() { + return _localeconv(); + } + + late final _localeconvPtr = + _lookup Function()>>('localeconv'); + late final _localeconv = + _localeconvPtr.asFunction Function()>(); + + ffi.Pointer setlocale( + int arg0, + ffi.Pointer arg1, + ) { + return _setlocale( + arg0, + arg1, + ); + } + + late final _setlocalePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('setlocale'); + late final _setlocale = _setlocalePtr + .asFunction Function(int, ffi.Pointer)>(); + + int __math_errhandling() { + return ___math_errhandling(); + } + + late final ___math_errhandlingPtr = + _lookup>('__math_errhandling'); + late final ___math_errhandling = + ___math_errhandlingPtr.asFunction(); + + int __fpclassifyf( + double arg0, + ) { + return ___fpclassifyf( + arg0, + ); + } + + late final ___fpclassifyfPtr = + _lookup>('__fpclassifyf'); + late final ___fpclassifyf = + ___fpclassifyfPtr.asFunction(); + + int __fpclassifyd( + double arg0, + ) { + return ___fpclassifyd( + arg0, + ); + } + + late final ___fpclassifydPtr = + _lookup>( + '__fpclassifyd'); + late final ___fpclassifyd = + ___fpclassifydPtr.asFunction(); + + double acosf( + double arg0, + ) { + return _acosf( + arg0, + ); + } + + late final _acosfPtr = + _lookup>('acosf'); + late final _acosf = _acosfPtr.asFunction(); + + double acos( + double arg0, + ) { + return _acos( + arg0, + ); + } + + late final _acosPtr = + _lookup>('acos'); + late final _acos = _acosPtr.asFunction(); + + double asinf( + double arg0, + ) { + return _asinf( + arg0, + ); + } + + late final _asinfPtr = + _lookup>('asinf'); + late final _asinf = _asinfPtr.asFunction(); + + double asin( + double arg0, + ) { + return _asin( + arg0, + ); + } + + late final _asinPtr = + _lookup>('asin'); + late final _asin = _asinPtr.asFunction(); + + double atanf( + double arg0, + ) { + return _atanf( + arg0, + ); + } + + late final _atanfPtr = + _lookup>('atanf'); + late final _atanf = _atanfPtr.asFunction(); + + double atan( + double arg0, + ) { + return _atan( + arg0, + ); + } + + late final _atanPtr = + _lookup>('atan'); + late final _atan = _atanPtr.asFunction(); + + double atan2f( + double arg0, + double arg1, + ) { + return _atan2f( + arg0, + arg1, + ); + } + + late final _atan2fPtr = + _lookup>( + 'atan2f'); + late final _atan2f = _atan2fPtr.asFunction(); + + double atan2( + double arg0, + double arg1, + ) { + return _atan2( + arg0, + arg1, + ); + } + + late final _atan2Ptr = + _lookup>( + 'atan2'); + late final _atan2 = _atan2Ptr.asFunction(); + + double cosf( + double arg0, + ) { + return _cosf( + arg0, + ); + } + + late final _cosfPtr = + _lookup>('cosf'); + late final _cosf = _cosfPtr.asFunction(); + + double cos( + double arg0, + ) { + return _cos( + arg0, + ); + } + + late final _cosPtr = + _lookup>('cos'); + late final _cos = _cosPtr.asFunction(); + + double sinf( + double arg0, + ) { + return _sinf( + arg0, + ); + } + + late final _sinfPtr = + _lookup>('sinf'); + late final _sinf = _sinfPtr.asFunction(); + + double sin( + double arg0, + ) { + return _sin( + arg0, + ); + } + + late final _sinPtr = + _lookup>('sin'); + late final _sin = _sinPtr.asFunction(); + + double tanf( + double arg0, + ) { + return _tanf( + arg0, + ); + } + + late final _tanfPtr = + _lookup>('tanf'); + late final _tanf = _tanfPtr.asFunction(); + + double tan( + double arg0, + ) { + return _tan( + arg0, + ); + } + + late final _tanPtr = + _lookup>('tan'); + late final _tan = _tanPtr.asFunction(); + + double acoshf( + double arg0, + ) { + return _acoshf( + arg0, + ); + } + + late final _acoshfPtr = + _lookup>('acoshf'); + late final _acoshf = _acoshfPtr.asFunction(); + + double acosh( + double arg0, + ) { + return _acosh( + arg0, + ); + } + + late final _acoshPtr = + _lookup>('acosh'); + late final _acosh = _acoshPtr.asFunction(); + + double asinhf( + double arg0, + ) { + return _asinhf( + arg0, + ); + } + + late final _asinhfPtr = + _lookup>('asinhf'); + late final _asinhf = _asinhfPtr.asFunction(); + + double asinh( + double arg0, + ) { + return _asinh( + arg0, + ); + } + + late final _asinhPtr = + _lookup>('asinh'); + late final _asinh = _asinhPtr.asFunction(); + + double atanhf( + double arg0, + ) { + return _atanhf( + arg0, + ); + } + + late final _atanhfPtr = + _lookup>('atanhf'); + late final _atanhf = _atanhfPtr.asFunction(); + + double atanh( + double arg0, + ) { + return _atanh( + arg0, + ); + } + + late final _atanhPtr = + _lookup>('atanh'); + late final _atanh = _atanhPtr.asFunction(); + + double coshf( + double arg0, + ) { + return _coshf( + arg0, + ); + } + + late final _coshfPtr = + _lookup>('coshf'); + late final _coshf = _coshfPtr.asFunction(); + + double cosh( + double arg0, + ) { + return _cosh( + arg0, + ); + } + + late final _coshPtr = + _lookup>('cosh'); + late final _cosh = _coshPtr.asFunction(); + + double sinhf( + double arg0, + ) { + return _sinhf( + arg0, + ); + } + + late final _sinhfPtr = + _lookup>('sinhf'); + late final _sinhf = _sinhfPtr.asFunction(); + + double sinh( + double arg0, + ) { + return _sinh( + arg0, + ); + } + + late final _sinhPtr = + _lookup>('sinh'); + late final _sinh = _sinhPtr.asFunction(); + + double tanhf( + double arg0, + ) { + return _tanhf( + arg0, + ); + } + + late final _tanhfPtr = + _lookup>('tanhf'); + late final _tanhf = _tanhfPtr.asFunction(); + + double tanh( + double arg0, + ) { + return _tanh( + arg0, + ); + } + + late final _tanhPtr = + _lookup>('tanh'); + late final _tanh = _tanhPtr.asFunction(); + + double expf( + double arg0, + ) { + return _expf( + arg0, + ); + } + + late final _expfPtr = + _lookup>('expf'); + late final _expf = _expfPtr.asFunction(); + + double exp( + double arg0, + ) { + return _exp( + arg0, + ); + } + + late final _expPtr = + _lookup>('exp'); + late final _exp = _expPtr.asFunction(); + + double exp2f( + double arg0, + ) { + return _exp2f( + arg0, + ); + } + + late final _exp2fPtr = + _lookup>('exp2f'); + late final _exp2f = _exp2fPtr.asFunction(); + + double exp2( + double arg0, + ) { + return _exp2( + arg0, + ); + } + + late final _exp2Ptr = + _lookup>('exp2'); + late final _exp2 = _exp2Ptr.asFunction(); + + double expm1f( + double arg0, + ) { + return _expm1f( + arg0, + ); + } + + late final _expm1fPtr = + _lookup>('expm1f'); + late final _expm1f = _expm1fPtr.asFunction(); + + double expm1( + double arg0, + ) { + return _expm1( + arg0, + ); + } + + late final _expm1Ptr = + _lookup>('expm1'); + late final _expm1 = _expm1Ptr.asFunction(); + + double logf( + double arg0, + ) { + return _logf( + arg0, + ); + } + + late final _logfPtr = + _lookup>('logf'); + late final _logf = _logfPtr.asFunction(); + + double log( + double arg0, + ) { + return _log( + arg0, + ); + } + + late final _logPtr = + _lookup>('log'); + late final _log = _logPtr.asFunction(); + + double log10f( + double arg0, + ) { + return _log10f( + arg0, + ); + } + + late final _log10fPtr = + _lookup>('log10f'); + late final _log10f = _log10fPtr.asFunction(); + + double log10( + double arg0, + ) { + return _log10( + arg0, + ); + } + + late final _log10Ptr = + _lookup>('log10'); + late final _log10 = _log10Ptr.asFunction(); + + double log2f( + double arg0, + ) { + return _log2f( + arg0, + ); + } + + late final _log2fPtr = + _lookup>('log2f'); + late final _log2f = _log2fPtr.asFunction(); + + double log2( + double arg0, + ) { + return _log2( + arg0, + ); + } + + late final _log2Ptr = + _lookup>('log2'); + late final _log2 = _log2Ptr.asFunction(); + + double log1pf( + double arg0, + ) { + return _log1pf( + arg0, + ); + } + + late final _log1pfPtr = + _lookup>('log1pf'); + late final _log1pf = _log1pfPtr.asFunction(); + + double log1p( + double arg0, + ) { + return _log1p( + arg0, + ); + } + + late final _log1pPtr = + _lookup>('log1p'); + late final _log1p = _log1pPtr.asFunction(); + + double logbf( + double arg0, + ) { + return _logbf( + arg0, + ); + } + + late final _logbfPtr = + _lookup>('logbf'); + late final _logbf = _logbfPtr.asFunction(); + + double logb( + double arg0, + ) { + return _logb( + arg0, + ); + } + + late final _logbPtr = + _lookup>('logb'); + late final _logb = _logbPtr.asFunction(); + + double modff( + double arg0, + ffi.Pointer arg1, + ) { + return _modff( + arg0, + arg1, + ); + } + + late final _modffPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Float, ffi.Pointer)>>('modff'); + late final _modff = + _modffPtr.asFunction)>(); + + double modf( + double arg0, + ffi.Pointer arg1, + ) { + return _modf( + arg0, + arg1, + ); + } + + late final _modfPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Double, ffi.Pointer)>>('modf'); + late final _modf = + _modfPtr.asFunction)>(); + + double ldexpf( + double arg0, + int arg1, + ) { + return _ldexpf( + arg0, + arg1, + ); + } + + late final _ldexpfPtr = + _lookup>( + 'ldexpf'); + late final _ldexpf = _ldexpfPtr.asFunction(); + + double ldexp( + double arg0, + int arg1, + ) { + return _ldexp( + arg0, + arg1, + ); + } + + late final _ldexpPtr = + _lookup>( + 'ldexp'); + late final _ldexp = _ldexpPtr.asFunction(); + + double frexpf( + double arg0, + ffi.Pointer arg1, + ) { + return _frexpf( + arg0, + arg1, + ); + } + + late final _frexpfPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Float, ffi.Pointer)>>('frexpf'); + late final _frexpf = + _frexpfPtr.asFunction)>(); + + double frexp( + double arg0, + ffi.Pointer arg1, + ) { + return _frexp( + arg0, + arg1, + ); + } + + late final _frexpPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Double, ffi.Pointer)>>('frexp'); + late final _frexp = + _frexpPtr.asFunction)>(); + + int ilogbf( + double arg0, + ) { + return _ilogbf( + arg0, + ); + } + + late final _ilogbfPtr = + _lookup>('ilogbf'); + late final _ilogbf = _ilogbfPtr.asFunction(); + + int ilogb( + double arg0, + ) { + return _ilogb( + arg0, + ); + } + + late final _ilogbPtr = + _lookup>('ilogb'); + late final _ilogb = _ilogbPtr.asFunction(); + + double scalbnf( + double arg0, + int arg1, + ) { + return _scalbnf( + arg0, + arg1, + ); + } + + late final _scalbnfPtr = + _lookup>( + 'scalbnf'); + late final _scalbnf = _scalbnfPtr.asFunction(); + + double scalbn( + double arg0, + int arg1, + ) { + return _scalbn( + arg0, + arg1, + ); + } + + late final _scalbnPtr = + _lookup>( + 'scalbn'); + late final _scalbn = _scalbnPtr.asFunction(); + + double scalblnf( + double arg0, + int arg1, + ) { + return _scalblnf( + arg0, + arg1, + ); + } + + late final _scalblnfPtr = + _lookup>( + 'scalblnf'); + late final _scalblnf = + _scalblnfPtr.asFunction(); + + double scalbln( + double arg0, + int arg1, + ) { + return _scalbln( + arg0, + arg1, + ); + } + + late final _scalblnPtr = + _lookup>( + 'scalbln'); + late final _scalbln = _scalblnPtr.asFunction(); + + double fabsf( + double arg0, + ) { + return _fabsf( + arg0, + ); + } + + late final _fabsfPtr = + _lookup>('fabsf'); + late final _fabsf = _fabsfPtr.asFunction(); + + double fabs( + double arg0, + ) { + return _fabs( + arg0, + ); + } + + late final _fabsPtr = + _lookup>('fabs'); + late final _fabs = _fabsPtr.asFunction(); + + double cbrtf( + double arg0, + ) { + return _cbrtf( + arg0, + ); + } + + late final _cbrtfPtr = + _lookup>('cbrtf'); + late final _cbrtf = _cbrtfPtr.asFunction(); + + double cbrt( + double arg0, + ) { + return _cbrt( + arg0, + ); + } + + late final _cbrtPtr = + _lookup>('cbrt'); + late final _cbrt = _cbrtPtr.asFunction(); + + double hypotf( + double arg0, + double arg1, + ) { + return _hypotf( + arg0, + arg1, + ); + } + + late final _hypotfPtr = + _lookup>( + 'hypotf'); + late final _hypotf = _hypotfPtr.asFunction(); + + double hypot( + double arg0, + double arg1, + ) { + return _hypot( + arg0, + arg1, + ); + } + + late final _hypotPtr = + _lookup>( + 'hypot'); + late final _hypot = _hypotPtr.asFunction(); + + double powf( + double arg0, + double arg1, + ) { + return _powf( + arg0, + arg1, + ); + } + + late final _powfPtr = + _lookup>( + 'powf'); + late final _powf = _powfPtr.asFunction(); + + double pow( + double arg0, + double arg1, + ) { + return _pow( + arg0, + arg1, + ); + } + + late final _powPtr = + _lookup>( + 'pow'); + late final _pow = _powPtr.asFunction(); + + double sqrtf( + double arg0, + ) { + return _sqrtf( + arg0, + ); + } + + late final _sqrtfPtr = + _lookup>('sqrtf'); + late final _sqrtf = _sqrtfPtr.asFunction(); + + double sqrt( + double arg0, + ) { + return _sqrt( + arg0, + ); + } + + late final _sqrtPtr = + _lookup>('sqrt'); + late final _sqrt = _sqrtPtr.asFunction(); + + double erff( + double arg0, + ) { + return _erff( + arg0, + ); + } + + late final _erffPtr = + _lookup>('erff'); + late final _erff = _erffPtr.asFunction(); + + double erf( + double arg0, + ) { + return _erf( + arg0, + ); + } + + late final _erfPtr = + _lookup>('erf'); + late final _erf = _erfPtr.asFunction(); + + double erfcf( + double arg0, + ) { + return _erfcf( + arg0, + ); + } + + late final _erfcfPtr = + _lookup>('erfcf'); + late final _erfcf = _erfcfPtr.asFunction(); + + double erfc( + double arg0, + ) { + return _erfc( + arg0, + ); + } + + late final _erfcPtr = + _lookup>('erfc'); + late final _erfc = _erfcPtr.asFunction(); + + double lgammaf( + double arg0, + ) { + return _lgammaf( + arg0, + ); + } + + late final _lgammafPtr = + _lookup>('lgammaf'); + late final _lgammaf = _lgammafPtr.asFunction(); + + double lgamma( + double arg0, + ) { + return _lgamma( + arg0, + ); + } + + late final _lgammaPtr = + _lookup>('lgamma'); + late final _lgamma = _lgammaPtr.asFunction(); + + double tgammaf( + double arg0, + ) { + return _tgammaf( + arg0, + ); + } + + late final _tgammafPtr = + _lookup>('tgammaf'); + late final _tgammaf = _tgammafPtr.asFunction(); + + double tgamma( + double arg0, + ) { + return _tgamma( + arg0, + ); + } + + late final _tgammaPtr = + _lookup>('tgamma'); + late final _tgamma = _tgammaPtr.asFunction(); + + double ceilf( + double arg0, + ) { + return _ceilf( + arg0, + ); + } + + late final _ceilfPtr = + _lookup>('ceilf'); + late final _ceilf = _ceilfPtr.asFunction(); + + double ceil( + double arg0, + ) { + return _ceil( + arg0, + ); + } + + late final _ceilPtr = + _lookup>('ceil'); + late final _ceil = _ceilPtr.asFunction(); + + double floorf( + double arg0, + ) { + return _floorf( + arg0, + ); + } + + late final _floorfPtr = + _lookup>('floorf'); + late final _floorf = _floorfPtr.asFunction(); + + double floor( + double arg0, + ) { + return _floor( + arg0, + ); + } + + late final _floorPtr = + _lookup>('floor'); + late final _floor = _floorPtr.asFunction(); + + double nearbyintf( + double arg0, + ) { + return _nearbyintf( + arg0, + ); + } + + late final _nearbyintfPtr = + _lookup>('nearbyintf'); + late final _nearbyintf = _nearbyintfPtr.asFunction(); + + double nearbyint( + double arg0, + ) { + return _nearbyint( + arg0, + ); + } + + late final _nearbyintPtr = + _lookup>('nearbyint'); + late final _nearbyint = _nearbyintPtr.asFunction(); + + double rintf( + double arg0, + ) { + return _rintf( + arg0, + ); + } + + late final _rintfPtr = + _lookup>('rintf'); + late final _rintf = _rintfPtr.asFunction(); + + double rint( + double arg0, + ) { + return _rint( + arg0, + ); + } + + late final _rintPtr = + _lookup>('rint'); + late final _rint = _rintPtr.asFunction(); + + int lrintf( + double arg0, + ) { + return _lrintf( + arg0, + ); + } + + late final _lrintfPtr = + _lookup>('lrintf'); + late final _lrintf = _lrintfPtr.asFunction(); + + int lrint( + double arg0, + ) { + return _lrint( + arg0, + ); + } + + late final _lrintPtr = + _lookup>('lrint'); + late final _lrint = _lrintPtr.asFunction(); + + double roundf( + double arg0, + ) { + return _roundf( + arg0, + ); + } + + late final _roundfPtr = + _lookup>('roundf'); + late final _roundf = _roundfPtr.asFunction(); + + double round( + double arg0, + ) { + return _round( + arg0, + ); + } + + late final _roundPtr = + _lookup>('round'); + late final _round = _roundPtr.asFunction(); + + int lroundf( + double arg0, + ) { + return _lroundf( + arg0, + ); + } + + late final _lroundfPtr = + _lookup>('lroundf'); + late final _lroundf = _lroundfPtr.asFunction(); + + int lround( + double arg0, + ) { + return _lround( + arg0, + ); + } + + late final _lroundPtr = + _lookup>('lround'); + late final _lround = _lroundPtr.asFunction(); + + int llrintf( + double arg0, + ) { + return _llrintf( + arg0, + ); + } + + late final _llrintfPtr = + _lookup>('llrintf'); + late final _llrintf = _llrintfPtr.asFunction(); + + int llrint( + double arg0, + ) { + return _llrint( + arg0, + ); + } + + late final _llrintPtr = + _lookup>('llrint'); + late final _llrint = _llrintPtr.asFunction(); + + int llroundf( + double arg0, + ) { + return _llroundf( + arg0, + ); + } + + late final _llroundfPtr = + _lookup>('llroundf'); + late final _llroundf = _llroundfPtr.asFunction(); + + int llround( + double arg0, + ) { + return _llround( + arg0, + ); + } + + late final _llroundPtr = + _lookup>('llround'); + late final _llround = _llroundPtr.asFunction(); + + double truncf( + double arg0, + ) { + return _truncf( + arg0, + ); + } + + late final _truncfPtr = + _lookup>('truncf'); + late final _truncf = _truncfPtr.asFunction(); + + double trunc( + double arg0, + ) { + return _trunc( + arg0, + ); + } + + late final _truncPtr = + _lookup>('trunc'); + late final _trunc = _truncPtr.asFunction(); + + double fmodf( + double arg0, + double arg1, + ) { + return _fmodf( + arg0, + arg1, + ); + } + + late final _fmodfPtr = + _lookup>( + 'fmodf'); + late final _fmodf = _fmodfPtr.asFunction(); + + double fmod( + double arg0, + double arg1, + ) { + return _fmod( + arg0, + arg1, + ); + } + + late final _fmodPtr = + _lookup>( + 'fmod'); + late final _fmod = _fmodPtr.asFunction(); + + double remainderf( + double arg0, + double arg1, + ) { + return _remainderf( + arg0, + arg1, + ); + } + + late final _remainderfPtr = + _lookup>( + 'remainderf'); + late final _remainderf = + _remainderfPtr.asFunction(); + + double remainder( + double arg0, + double arg1, + ) { + return _remainder( + arg0, + arg1, + ); + } + + late final _remainderPtr = + _lookup>( + 'remainder'); + late final _remainder = + _remainderPtr.asFunction(); + + double remquof( + double arg0, + double arg1, + ffi.Pointer arg2, + ) { + return _remquof( + arg0, + arg1, + arg2, + ); + } + + late final _remquofPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function( + ffi.Float, ffi.Float, ffi.Pointer)>>('remquof'); + late final _remquof = _remquofPtr + .asFunction)>(); + + double remquo( + double arg0, + double arg1, + ffi.Pointer arg2, + ) { + return _remquo( + arg0, + arg1, + arg2, + ); + } + + late final _remquoPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function( + ffi.Double, ffi.Double, ffi.Pointer)>>('remquo'); + late final _remquo = _remquoPtr + .asFunction)>(); + + double copysignf( + double arg0, + double arg1, + ) { + return _copysignf( + arg0, + arg1, + ); + } + + late final _copysignfPtr = + _lookup>( + 'copysignf'); + late final _copysignf = + _copysignfPtr.asFunction(); + + double copysign( + double arg0, + double arg1, + ) { + return _copysign( + arg0, + arg1, + ); + } + + late final _copysignPtr = + _lookup>( + 'copysign'); + late final _copysign = + _copysignPtr.asFunction(); + + double nanf( + ffi.Pointer arg0, + ) { + return _nanf( + arg0, + ); + } + + late final _nanfPtr = + _lookup)>>( + 'nanf'); + late final _nanf = + _nanfPtr.asFunction)>(); + + double nan( + ffi.Pointer arg0, + ) { + return _nan( + arg0, + ); + } + + late final _nanPtr = + _lookup)>>( + 'nan'); + late final _nan = + _nanPtr.asFunction)>(); + + double nextafterf( + double arg0, + double arg1, + ) { + return _nextafterf( + arg0, + arg1, + ); + } + + late final _nextafterfPtr = + _lookup>( + 'nextafterf'); + late final _nextafterf = + _nextafterfPtr.asFunction(); + + double nextafter( + double arg0, + double arg1, + ) { + return _nextafter( + arg0, + arg1, + ); + } + + late final _nextafterPtr = + _lookup>( + 'nextafter'); + late final _nextafter = + _nextafterPtr.asFunction(); + + double fdimf( + double arg0, + double arg1, + ) { + return _fdimf( + arg0, + arg1, + ); + } + + late final _fdimfPtr = + _lookup>( + 'fdimf'); + late final _fdimf = _fdimfPtr.asFunction(); + + double fdim( + double arg0, + double arg1, + ) { + return _fdim( + arg0, + arg1, + ); + } + + late final _fdimPtr = + _lookup>( + 'fdim'); + late final _fdim = _fdimPtr.asFunction(); + + double fmaxf( + double arg0, + double arg1, + ) { + return _fmaxf( + arg0, + arg1, + ); + } + + late final _fmaxfPtr = + _lookup>( + 'fmaxf'); + late final _fmaxf = _fmaxfPtr.asFunction(); + + double fmax( + double arg0, + double arg1, + ) { + return _fmax( + arg0, + arg1, + ); + } + + late final _fmaxPtr = + _lookup>( + 'fmax'); + late final _fmax = _fmaxPtr.asFunction(); + + double fminf( + double arg0, + double arg1, + ) { + return _fminf( + arg0, + arg1, + ); + } + + late final _fminfPtr = + _lookup>( + 'fminf'); + late final _fminf = _fminfPtr.asFunction(); + + double fmin( + double arg0, + double arg1, + ) { + return _fmin( + arg0, + arg1, + ); + } + + late final _fminPtr = + _lookup>( + 'fmin'); + late final _fmin = _fminPtr.asFunction(); + + double fmaf( + double arg0, + double arg1, + double arg2, + ) { + return _fmaf( + arg0, + arg1, + arg2, + ); + } + + late final _fmafPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Float, ffi.Float, ffi.Float)>>('fmaf'); + late final _fmaf = + _fmafPtr.asFunction(); + + double fma( + double arg0, + double arg1, + double arg2, + ) { + return _fma( + arg0, + arg1, + arg2, + ); + } + + late final _fmaPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Double, ffi.Double, ffi.Double)>>('fma'); + late final _fma = + _fmaPtr.asFunction(); + + double __exp10f( + double arg0, + ) { + return ___exp10f( + arg0, + ); + } + + late final ___exp10fPtr = + _lookup>('__exp10f'); + late final ___exp10f = ___exp10fPtr.asFunction(); + + double __exp10( + double arg0, + ) { + return ___exp10( + arg0, + ); + } + + late final ___exp10Ptr = + _lookup>('__exp10'); + late final ___exp10 = ___exp10Ptr.asFunction(); + + double __cospif( + double arg0, + ) { + return ___cospif( + arg0, + ); + } + + late final ___cospifPtr = + _lookup>('__cospif'); + late final ___cospif = ___cospifPtr.asFunction(); + + double __cospi( + double arg0, + ) { + return ___cospi( + arg0, + ); + } + + late final ___cospiPtr = + _lookup>('__cospi'); + late final ___cospi = ___cospiPtr.asFunction(); + + double __sinpif( + double arg0, + ) { + return ___sinpif( + arg0, + ); + } + + late final ___sinpifPtr = + _lookup>('__sinpif'); + late final ___sinpif = ___sinpifPtr.asFunction(); + + double __sinpi( + double arg0, + ) { + return ___sinpi( + arg0, + ); + } + + late final ___sinpiPtr = + _lookup>('__sinpi'); + late final ___sinpi = ___sinpiPtr.asFunction(); + + double __tanpif( + double arg0, + ) { + return ___tanpif( + arg0, + ); + } + + late final ___tanpifPtr = + _lookup>('__tanpif'); + late final ___tanpif = ___tanpifPtr.asFunction(); + + double __tanpi( + double arg0, + ) { + return ___tanpi( + arg0, + ); + } + + late final ___tanpiPtr = + _lookup>('__tanpi'); + late final ___tanpi = ___tanpiPtr.asFunction(); + + __float2 __sincosf_stret( + double arg0, + ) { + return ___sincosf_stret( + arg0, + ); + } + + late final ___sincosf_stretPtr = + _lookup>( + '__sincosf_stret'); + late final ___sincosf_stret = + ___sincosf_stretPtr.asFunction<__float2 Function(double)>(); + + __double2 __sincos_stret( + double arg0, + ) { + return ___sincos_stret( + arg0, + ); + } + + late final ___sincos_stretPtr = + _lookup>( + '__sincos_stret'); + late final ___sincos_stret = + ___sincos_stretPtr.asFunction<__double2 Function(double)>(); + + __float2 __sincospif_stret( + double arg0, + ) { + return ___sincospif_stret( + arg0, + ); + } + + late final ___sincospif_stretPtr = + _lookup>( + '__sincospif_stret'); + late final ___sincospif_stret = + ___sincospif_stretPtr.asFunction<__float2 Function(double)>(); + + __double2 __sincospi_stret( + double arg0, + ) { + return ___sincospi_stret( + arg0, + ); + } + + late final ___sincospi_stretPtr = + _lookup>( + '__sincospi_stret'); + late final ___sincospi_stret = + ___sincospi_stretPtr.asFunction<__double2 Function(double)>(); + + double j0( + double arg0, + ) { + return _j0( + arg0, + ); + } + + late final _j0Ptr = + _lookup>('j0'); + late final _j0 = _j0Ptr.asFunction(); + + double j1( + double arg0, + ) { + return _j1( + arg0, + ); + } + + late final _j1Ptr = + _lookup>('j1'); + late final _j1 = _j1Ptr.asFunction(); + + double jn( + int arg0, + double arg1, + ) { + return _jn( + arg0, + arg1, + ); + } + + late final _jnPtr = + _lookup>( + 'jn'); + late final _jn = _jnPtr.asFunction(); + + double y0( + double arg0, + ) { + return _y0( + arg0, + ); + } + + late final _y0Ptr = + _lookup>('y0'); + late final _y0 = _y0Ptr.asFunction(); + + double y1( + double arg0, + ) { + return _y1( + arg0, + ); + } + + late final _y1Ptr = + _lookup>('y1'); + late final _y1 = _y1Ptr.asFunction(); + + double yn( + int arg0, + double arg1, + ) { + return _yn( + arg0, + arg1, + ); + } + + late final _ynPtr = + _lookup>( + 'yn'); + late final _yn = _ynPtr.asFunction(); + + double scalb( + double arg0, + double arg1, + ) { + return _scalb( + arg0, + arg1, + ); + } + + late final _scalbPtr = + _lookup>( + 'scalb'); + late final _scalb = _scalbPtr.asFunction(); + + late final ffi.Pointer _signgam = _lookup('signgam'); + + int get signgam => _signgam.value; + + set signgam(int value) => _signgam.value = value; + + int setjmp( + ffi.Pointer arg0, + ) { + return _setjmp1( + arg0, + ); + } + + late final _setjmpPtr = + _lookup)>>( + 'setjmp'); + late final _setjmp1 = + _setjmpPtr.asFunction)>(); + + void longjmp( + ffi.Pointer arg0, + int arg1, + ) { + return _longjmp1( + arg0, + arg1, + ); + } + + late final _longjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'longjmp'); + late final _longjmp1 = + _longjmpPtr.asFunction, int)>(); + + int _setjmp( + ffi.Pointer arg0, + ) { + return __setjmp( + arg0, + ); + } + + late final __setjmpPtr = + _lookup)>>( + '_setjmp'); + late final __setjmp = + __setjmpPtr.asFunction)>(); + + void _longjmp( + ffi.Pointer arg0, + int arg1, + ) { + return __longjmp( + arg0, + arg1, + ); + } + + late final __longjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + '_longjmp'); + late final __longjmp = + __longjmpPtr.asFunction, int)>(); + + int sigsetjmp( + ffi.Pointer arg0, + int arg1, + ) { + return _sigsetjmp( + arg0, + arg1, + ); + } + + late final _sigsetjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigsetjmp'); + late final _sigsetjmp = + _sigsetjmpPtr.asFunction, int)>(); + + void siglongjmp( + ffi.Pointer arg0, + int arg1, + ) { + return _siglongjmp( + arg0, + arg1, + ); + } + + late final _siglongjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'siglongjmp'); + late final _siglongjmp = + _siglongjmpPtr.asFunction, int)>(); + + void longjmperror() { + return _longjmperror(); + } + + late final _longjmperrorPtr = + _lookup>('longjmperror'); + late final _longjmperror = _longjmperrorPtr.asFunction(); + + ffi.Pointer> signal( + int arg0, + ffi.Pointer> arg1, + ) { + return _signal( + arg0, + arg1, + ); + } + + late final _signalPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction>)>>('signal'); + late final _signal = _signalPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); + + late final ffi.Pointer>> _sys_signame = + _lookup>>('sys_signame'); + + ffi.Pointer> get sys_signame => _sys_signame.value; + + set sys_signame(ffi.Pointer> value) => + _sys_signame.value = value; + + late final ffi.Pointer>> _sys_siglist = + _lookup>>('sys_siglist'); + + ffi.Pointer> get sys_siglist => _sys_siglist.value; + + set sys_siglist(ffi.Pointer> value) => + _sys_siglist.value = value; + + int raise( + int arg0, + ) { + return _raise( + arg0, + ); + } + + late final _raisePtr = + _lookup>('raise'); + late final _raise = _raisePtr.asFunction(); + + ffi.Pointer> bsd_signal( + int arg0, + ffi.Pointer> arg1, + ) { + return _bsd_signal( + arg0, + arg1, + ); + } + + late final _bsd_signalPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int)>>)>>('bsd_signal'); + late final _bsd_signal = _bsd_signalPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); + + int kill( + int arg0, + int arg1, + ) { + return _kill( + arg0, + arg1, + ); + } + + late final _killPtr = + _lookup>('kill'); + late final _kill = _killPtr.asFunction(); + + int killpg( + int arg0, + int arg1, + ) { + return _killpg( + arg0, + arg1, + ); + } + + late final _killpgPtr = + _lookup>('killpg'); + late final _killpg = _killpgPtr.asFunction(); + + int pthread_kill( + pthread_t arg0, + int arg1, + ) { + return _pthread_kill( + arg0, + arg1, + ); + } + + late final _pthread_killPtr = + _lookup>( + 'pthread_kill'); + late final _pthread_kill = + _pthread_killPtr.asFunction(); + + int pthread_sigmask( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _pthread_sigmask( + arg0, + arg1, + arg2, + ); + } + + late final _pthread_sigmaskPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('pthread_sigmask'); + late final _pthread_sigmask = _pthread_sigmaskPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); + + int sigaction1( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _sigaction1( + arg0, + arg1, + arg2, + ); + } + + late final _sigaction1Ptr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('sigaction'); + late final _sigaction1 = _sigaction1Ptr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); + + int sigaddset( + ffi.Pointer arg0, + int arg1, + ) { + return _sigaddset( + arg0, + arg1, + ); + } + + late final _sigaddsetPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigaddset'); + late final _sigaddset = + _sigaddsetPtr.asFunction, int)>(); + + int sigaltstack( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _sigaltstack( + arg0, + arg1, + ); + } + + late final _sigaltstackPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sigaltstack'); + late final _sigaltstack = _sigaltstackPtr + .asFunction, ffi.Pointer)>(); + + int sigdelset( + ffi.Pointer arg0, + int arg1, + ) { + return _sigdelset( + arg0, + arg1, + ); + } + + late final _sigdelsetPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigdelset'); + late final _sigdelset = + _sigdelsetPtr.asFunction, int)>(); + + int sigemptyset( + ffi.Pointer arg0, + ) { + return _sigemptyset( + arg0, + ); + } + + late final _sigemptysetPtr = + _lookup)>>( + 'sigemptyset'); + late final _sigemptyset = + _sigemptysetPtr.asFunction)>(); + + int sigfillset( + ffi.Pointer arg0, + ) { + return _sigfillset( + arg0, + ); + } + + late final _sigfillsetPtr = + _lookup)>>( + 'sigfillset'); + late final _sigfillset = + _sigfillsetPtr.asFunction)>(); + + int sighold( + int arg0, + ) { + return _sighold( + arg0, + ); + } + + late final _sigholdPtr = + _lookup>('sighold'); + late final _sighold = _sigholdPtr.asFunction(); + + int sigignore( + int arg0, + ) { + return _sigignore( + arg0, + ); + } + + late final _sigignorePtr = + _lookup>('sigignore'); + late final _sigignore = _sigignorePtr.asFunction(); + + int siginterrupt( + int arg0, + int arg1, + ) { + return _siginterrupt( + arg0, + arg1, + ); + } + + late final _siginterruptPtr = + _lookup>( + 'siginterrupt'); + late final _siginterrupt = + _siginterruptPtr.asFunction(); + + int sigismember( + ffi.Pointer arg0, + int arg1, + ) { + return _sigismember( + arg0, + arg1, + ); + } + + late final _sigismemberPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigismember'); + late final _sigismember = + _sigismemberPtr.asFunction, int)>(); + + int sigpause( + int arg0, + ) { + return _sigpause( + arg0, + ); + } + + late final _sigpausePtr = + _lookup>('sigpause'); + late final _sigpause = _sigpausePtr.asFunction(); + + int sigpending( + ffi.Pointer arg0, + ) { + return _sigpending( + arg0, + ); + } + + late final _sigpendingPtr = + _lookup)>>( + 'sigpending'); + late final _sigpending = + _sigpendingPtr.asFunction)>(); + + int sigprocmask( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _sigprocmask( + arg0, + arg1, + arg2, + ); + } + + late final _sigprocmaskPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('sigprocmask'); + late final _sigprocmask = _sigprocmaskPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); + + int sigrelse( + int arg0, + ) { + return _sigrelse( + arg0, + ); + } + + late final _sigrelsePtr = + _lookup>('sigrelse'); + late final _sigrelse = _sigrelsePtr.asFunction(); + + ffi.Pointer> sigset( + int arg0, + ffi.Pointer> arg1, + ) { + return _sigset( + arg0, + arg1, + ); + } + + late final _sigsetPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction>)>>('sigset'); + late final _sigset = _sigsetPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); + + int sigsuspend( + ffi.Pointer arg0, + ) { + return _sigsuspend( + arg0, + ); + } + + late final _sigsuspendPtr = + _lookup)>>( + 'sigsuspend'); + late final _sigsuspend = + _sigsuspendPtr.asFunction)>(); + + int sigwait( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _sigwait( + arg0, + arg1, + ); + } + + late final _sigwaitPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sigwait'); + late final _sigwait = _sigwaitPtr + .asFunction, ffi.Pointer)>(); + + void psignal( + int arg0, + ffi.Pointer arg1, + ) { + return _psignal( + arg0, + arg1, + ); + } + + late final _psignalPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.UnsignedInt, ffi.Pointer)>>('psignal'); + late final _psignal = + _psignalPtr.asFunction)>(); + + int sigblock( + int arg0, + ) { + return _sigblock( + arg0, + ); + } + + late final _sigblockPtr = + _lookup>('sigblock'); + late final _sigblock = _sigblockPtr.asFunction(); + + int sigsetmask( + int arg0, + ) { + return _sigsetmask( + arg0, + ); + } + + late final _sigsetmaskPtr = + _lookup>('sigsetmask'); + late final _sigsetmask = _sigsetmaskPtr.asFunction(); + + int sigvec1( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _sigvec1( + arg0, + arg1, + arg2, + ); + } + + late final _sigvec1Ptr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Pointer)>>('sigvec'); + late final _sigvec1 = _sigvec1Ptr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); + + int renameat( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + ) { + return _renameat( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _renameatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer)>>('renameat'); + late final _renameat = _renameatPtr.asFunction< + int Function(int, ffi.Pointer, int, ffi.Pointer)>(); + + int renamex_np( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _renamex_np( + arg0, + arg1, + arg2, + ); + } + + late final _renamex_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedInt)>>('renamex_np'); + late final _renamex_np = _renamex_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + int renameatx_np( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + int arg4, + ) { + return _renameatx_np( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final _renameatx_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('renameatx_np'); + late final _renameatx_np = _renameatx_npPtr.asFunction< + int Function( + int, ffi.Pointer, int, ffi.Pointer, int)>(); + + late final ffi.Pointer> ___stdinp = + _lookup>('__stdinp'); + + ffi.Pointer get __stdinp => ___stdinp.value; + + set __stdinp(ffi.Pointer value) => ___stdinp.value = value; + + late final ffi.Pointer> ___stdoutp = + _lookup>('__stdoutp'); + + ffi.Pointer get __stdoutp => ___stdoutp.value; + + set __stdoutp(ffi.Pointer value) => ___stdoutp.value = value; + + late final ffi.Pointer> ___stderrp = + _lookup>('__stderrp'); + + ffi.Pointer get __stderrp => ___stderrp.value; + + set __stderrp(ffi.Pointer value) => ___stderrp.value = value; + + void clearerr( + ffi.Pointer arg0, + ) { + return _clearerr( + arg0, + ); + } + + late final _clearerrPtr = + _lookup)>>( + 'clearerr'); + late final _clearerr = + _clearerrPtr.asFunction)>(); + + int fclose( + ffi.Pointer arg0, + ) { + return _fclose( + arg0, + ); + } + + late final _fclosePtr = + _lookup)>>( + 'fclose'); + late final _fclose = _fclosePtr.asFunction)>(); + + int feof( + ffi.Pointer arg0, + ) { + return _feof( + arg0, + ); + } + + late final _feofPtr = + _lookup)>>('feof'); + late final _feof = _feofPtr.asFunction)>(); + + int ferror( + ffi.Pointer arg0, + ) { + return _ferror( + arg0, + ); + } + + late final _ferrorPtr = + _lookup)>>( + 'ferror'); + late final _ferror = _ferrorPtr.asFunction)>(); + + int fflush( + ffi.Pointer arg0, + ) { + return _fflush( + arg0, + ); + } + + late final _fflushPtr = + _lookup)>>( + 'fflush'); + late final _fflush = _fflushPtr.asFunction)>(); + + int fgetc( + ffi.Pointer arg0, + ) { + return _fgetc( + arg0, + ); + } + + late final _fgetcPtr = + _lookup)>>('fgetc'); + late final _fgetc = _fgetcPtr.asFunction)>(); + + int fgetpos( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _fgetpos( + arg0, + arg1, + ); + } + + late final _fgetposPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fgetpos'); + late final _fgetpos = _fgetposPtr + .asFunction, ffi.Pointer)>(); + + ffi.Pointer fgets( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ) { + return _fgets( + arg0, + arg1, + arg2, + ); + } + + late final _fgetsPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Pointer)>>('fgets'); + late final _fgets = _fgetsPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); + + ffi.Pointer fopen( + ffi.Pointer __filename, + ffi.Pointer __mode, + ) { + return _fopen( + __filename, + __mode, + ); + } + + late final _fopenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fopen'); + late final _fopen = _fopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + int fprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _fprintf( + arg0, + arg1, + ); + } + + late final _fprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('fprintf'); + late final _fprintf = _fprintfPtr + .asFunction, ffi.Pointer)>(); + + int fputc( + int arg0, + ffi.Pointer arg1, + ) { + return _fputc( + arg0, + arg1, + ); + } + + late final _fputcPtr = + _lookup)>>( + 'fputc'); + late final _fputc = + _fputcPtr.asFunction)>(); + + int fputs( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _fputs( + arg0, + arg1, + ); + } + + late final _fputsPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fputs'); + late final _fputs = _fputsPtr + .asFunction, ffi.Pointer)>(); + + int fread( + ffi.Pointer __ptr, + int __size, + int __nitems, + ffi.Pointer __stream, + ) { + return _fread( + __ptr, + __size, + __nitems, + __stream, + ); + } + + late final _freadPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer)>>('fread'); + late final _fread = _freadPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + + ffi.Pointer freopen( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _freopen( + arg0, + arg1, + arg2, + ); + } + + late final _freopenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('freopen'); + late final _freopen = _freopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + + int fscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _fscanf( + arg0, + arg1, + ); + } + + late final _fscanfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('fscanf'); + late final _fscanf = _fscanfPtr + .asFunction, ffi.Pointer)>(); + + int fseek( + ffi.Pointer arg0, + int arg1, + int arg2, + ) { + return _fseek( + arg0, + arg1, + arg2, + ); + } + + late final _fseekPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Long, ffi.Int)>>('fseek'); + late final _fseek = + _fseekPtr.asFunction, int, int)>(); + + int fsetpos( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _fsetpos( + arg0, + arg1, + ); + } + + late final _fsetposPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fsetpos'); + late final _fsetpos = _fsetposPtr + .asFunction, ffi.Pointer)>(); + + int ftell( + ffi.Pointer arg0, + ) { + return _ftell( + arg0, + ); + } + + late final _ftellPtr = + _lookup)>>( + 'ftell'); + late final _ftell = _ftellPtr.asFunction)>(); + + int fwrite( + ffi.Pointer __ptr, + int __size, + int __nitems, + ffi.Pointer __stream, + ) { + return _fwrite( + __ptr, + __size, + __nitems, + __stream, + ); + } + + late final _fwritePtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer)>>('fwrite'); + late final _fwrite = _fwritePtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + + int getc( + ffi.Pointer arg0, + ) { + return _getc( + arg0, + ); + } + + late final _getcPtr = + _lookup)>>('getc'); + late final _getc = _getcPtr.asFunction)>(); + + int getchar() { + return _getchar(); + } + + late final _getcharPtr = + _lookup>('getchar'); + late final _getchar = _getcharPtr.asFunction(); + + ffi.Pointer gets( + ffi.Pointer arg0, + ) { + return _gets( + arg0, + ); + } + + late final _getsPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('gets'); + late final _gets = _getsPtr + .asFunction Function(ffi.Pointer)>(); + + void perror( + ffi.Pointer arg0, + ) { + return _perror( + arg0, + ); + } + + late final _perrorPtr = + _lookup)>>( + 'perror'); + late final _perror = + _perrorPtr.asFunction)>(); + + int printf( + ffi.Pointer arg0, + ) { + return _printf( + arg0, + ); + } + + late final _printfPtr = + _lookup)>>( + 'printf'); + late final _printf = + _printfPtr.asFunction)>(); + + int putc( + int arg0, + ffi.Pointer arg1, + ) { + return _putc( + arg0, + arg1, + ); + } + + late final _putcPtr = + _lookup)>>( + 'putc'); + late final _putc = + _putcPtr.asFunction)>(); + + int putchar( + int arg0, + ) { + return _putchar( + arg0, + ); + } + + late final _putcharPtr = + _lookup>('putchar'); + late final _putchar = _putcharPtr.asFunction(); + + int puts( + ffi.Pointer arg0, + ) { + return _puts( + arg0, + ); + } + + late final _putsPtr = + _lookup)>>( + 'puts'); + late final _puts = _putsPtr.asFunction)>(); + + int remove( + ffi.Pointer arg0, + ) { + return _remove( + arg0, + ); + } + + late final _removePtr = + _lookup)>>( + 'remove'); + late final _remove = + _removePtr.asFunction)>(); + + int rename( + ffi.Pointer __old, + ffi.Pointer __new, + ) { + return _rename( + __old, + __new, + ); + } + + late final _renamePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('rename'); + late final _rename = _renamePtr + .asFunction, ffi.Pointer)>(); + + void rewind( + ffi.Pointer arg0, + ) { + return _rewind( + arg0, + ); + } + + late final _rewindPtr = + _lookup)>>( + 'rewind'); + late final _rewind = + _rewindPtr.asFunction)>(); + + int scanf( + ffi.Pointer arg0, + ) { + return _scanf( + arg0, + ); + } + + late final _scanfPtr = + _lookup)>>( + 'scanf'); + late final _scanf = + _scanfPtr.asFunction)>(); + + void setbuf( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _setbuf( + arg0, + arg1, + ); + } + + late final _setbufPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('setbuf'); + late final _setbuf = _setbufPtr + .asFunction, ffi.Pointer)>(); + + int setvbuf( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + int arg3, + ) { + return _setvbuf( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _setvbufPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int, + ffi.Size)>>('setvbuf'); + late final _setvbuf = _setvbufPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, int)>(); + + int sprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _sprintf( + arg0, + arg1, + ); + } + + late final _sprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sprintf'); + late final _sprintf = _sprintfPtr + .asFunction, ffi.Pointer)>(); + + int sscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _sscanf( + arg0, + arg1, + ); + } + + late final _sscanfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sscanf'); + late final _sscanf = _sscanfPtr + .asFunction, ffi.Pointer)>(); + + ffi.Pointer tmpfile() { + return _tmpfile(); + } + + late final _tmpfilePtr = + _lookup Function()>>('tmpfile'); + late final _tmpfile = _tmpfilePtr.asFunction Function()>(); + + ffi.Pointer tmpnam( + ffi.Pointer arg0, + ) { + return _tmpnam( + arg0, + ); + } + + late final _tmpnamPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('tmpnam'); + late final _tmpnam = _tmpnamPtr + .asFunction Function(ffi.Pointer)>(); + + int ungetc( + int arg0, + ffi.Pointer arg1, + ) { + return _ungetc( + arg0, + arg1, + ); + } + + late final _ungetcPtr = + _lookup)>>( + 'ungetc'); + late final _ungetc = + _ungetcPtr.asFunction)>(); + + int vfprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, + ) { + return _vfprintf( + arg0, + arg1, + arg2, + ); + } + + late final _vfprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, va_list)>>('vfprintf'); + late final _vfprintf = _vfprintfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + + int vprintf( + ffi.Pointer arg0, + va_list arg1, + ) { + return _vprintf( + arg0, + arg1, + ); + } + + late final _vprintfPtr = _lookup< + ffi.NativeFunction, va_list)>>( + 'vprintf'); + late final _vprintf = + _vprintfPtr.asFunction, va_list)>(); + + int vsprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, + ) { + return _vsprintf( + arg0, + arg1, + arg2, + ); + } + + late final _vsprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('vsprintf'); + late final _vsprintf = _vsprintfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + + ffi.Pointer ctermid( + ffi.Pointer arg0, + ) { + return _ctermid( + arg0, + ); + } + + late final _ctermidPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('ctermid'); + late final _ctermid = _ctermidPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer fdopen( + int arg0, + ffi.Pointer arg1, + ) { + return _fdopen( + arg0, + arg1, + ); + } + + late final _fdopenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('fdopen'); + late final _fdopen = _fdopenPtr + .asFunction Function(int, ffi.Pointer)>(); + + int fileno( + ffi.Pointer arg0, + ) { + return _fileno( + arg0, + ); + } + + late final _filenoPtr = + _lookup)>>( + 'fileno'); + late final _fileno = _filenoPtr.asFunction)>(); + + int pclose( + ffi.Pointer arg0, + ) { + return _pclose( + arg0, + ); + } + + late final _pclosePtr = + _lookup)>>( + 'pclose'); + late final _pclose = _pclosePtr.asFunction)>(); + + ffi.Pointer popen( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _popen( + arg0, + arg1, + ); + } + + late final _popenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('popen'); + late final _popen = _popenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + int __srget( + ffi.Pointer arg0, + ) { + return ___srget( + arg0, + ); + } + + late final ___srgetPtr = + _lookup)>>( + '__srget'); + late final ___srget = + ___srgetPtr.asFunction)>(); + + int __svfscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, + ) { + return ___svfscanf( + arg0, + arg1, + arg2, + ); + } + + late final ___svfscanfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('__svfscanf'); + late final ___svfscanf = ___svfscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + + int __swbuf( + int arg0, + ffi.Pointer arg1, + ) { + return ___swbuf( + arg0, + arg1, + ); + } + + late final ___swbufPtr = + _lookup)>>( + '__swbuf'); + late final ___swbuf = + ___swbufPtr.asFunction)>(); + + void flockfile( + ffi.Pointer arg0, + ) { + return _flockfile( + arg0, + ); + } + + late final _flockfilePtr = + _lookup)>>( + 'flockfile'); + late final _flockfile = + _flockfilePtr.asFunction)>(); + + int ftrylockfile( + ffi.Pointer arg0, + ) { + return _ftrylockfile( + arg0, + ); + } + + late final _ftrylockfilePtr = + _lookup)>>( + 'ftrylockfile'); + late final _ftrylockfile = + _ftrylockfilePtr.asFunction)>(); + + void funlockfile( + ffi.Pointer arg0, + ) { + return _funlockfile( + arg0, + ); + } + + late final _funlockfilePtr = + _lookup)>>( + 'funlockfile'); + late final _funlockfile = + _funlockfilePtr.asFunction)>(); + + int getc_unlocked( + ffi.Pointer arg0, + ) { + return _getc_unlocked( + arg0, + ); + } + + late final _getc_unlockedPtr = + _lookup)>>( + 'getc_unlocked'); + late final _getc_unlocked = + _getc_unlockedPtr.asFunction)>(); + + int getchar_unlocked() { + return _getchar_unlocked(); + } + + late final _getchar_unlockedPtr = + _lookup>('getchar_unlocked'); + late final _getchar_unlocked = + _getchar_unlockedPtr.asFunction(); + + int putc_unlocked( + int arg0, + ffi.Pointer arg1, + ) { + return _putc_unlocked( + arg0, + arg1, + ); + } + + late final _putc_unlockedPtr = + _lookup)>>( + 'putc_unlocked'); + late final _putc_unlocked = + _putc_unlockedPtr.asFunction)>(); + + int putchar_unlocked( + int arg0, + ) { + return _putchar_unlocked( + arg0, + ); + } + + late final _putchar_unlockedPtr = + _lookup>( + 'putchar_unlocked'); + late final _putchar_unlocked = + _putchar_unlockedPtr.asFunction(); + + int getw( + ffi.Pointer arg0, + ) { + return _getw( + arg0, + ); + } + + late final _getwPtr = + _lookup)>>('getw'); + late final _getw = _getwPtr.asFunction)>(); + + int putw( + int arg0, + ffi.Pointer arg1, + ) { + return _putw( + arg0, + arg1, + ); + } + + late final _putwPtr = + _lookup)>>( + 'putw'); + late final _putw = + _putwPtr.asFunction)>(); + + ffi.Pointer tempnam( + ffi.Pointer __dir, + ffi.Pointer __prefix, + ) { + return _tempnam( + __dir, + __prefix, + ); + } + + late final _tempnamPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('tempnam'); + late final _tempnam = _tempnamPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + int fseeko( + ffi.Pointer __stream, + int __offset, + int __whence, + ) { + return _fseeko( + __stream, + __offset, + __whence, + ); + } + + late final _fseekoPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, off_t, ffi.Int)>>('fseeko'); + late final _fseeko = + _fseekoPtr.asFunction, int, int)>(); + + int ftello( + ffi.Pointer __stream, + ) { + return _ftello( + __stream, + ); + } + + late final _ftelloPtr = + _lookup)>>('ftello'); + late final _ftello = _ftelloPtr.asFunction)>(); + + int snprintf( + ffi.Pointer __str, + int __size, + ffi.Pointer __format, + ) { + return _snprintf( + __str, + __size, + __format, + ); + } + + late final _snprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer)>>('snprintf'); + late final _snprintf = _snprintfPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); + + int vfscanf( + ffi.Pointer __stream, + ffi.Pointer __format, + va_list arg2, + ) { + return _vfscanf( + __stream, + __format, + arg2, + ); + } + + late final _vfscanfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, va_list)>>('vfscanf'); + late final _vfscanf = _vfscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + + int vscanf( + ffi.Pointer __format, + va_list arg1, + ) { + return _vscanf( + __format, + arg1, + ); + } + + late final _vscanfPtr = _lookup< + ffi.NativeFunction, va_list)>>( + 'vscanf'); + late final _vscanf = + _vscanfPtr.asFunction, va_list)>(); + + int vsnprintf( + ffi.Pointer __str, + int __size, + ffi.Pointer __format, + va_list arg3, + ) { + return _vsnprintf( + __str, + __size, + __format, + arg3, + ); + } + + late final _vsnprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer, va_list)>>('vsnprintf'); + late final _vsnprintf = _vsnprintfPtr.asFunction< + int Function( + ffi.Pointer, int, ffi.Pointer, va_list)>(); + + int vsscanf( + ffi.Pointer __str, + ffi.Pointer __format, + va_list arg2, + ) { + return _vsscanf( + __str, + __format, + arg2, + ); + } + + late final _vsscanfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('vsscanf'); + late final _vsscanf = _vsscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + + int dprintf( + int arg0, + ffi.Pointer arg1, + ) { + return _dprintf( + arg0, + arg1, + ); + } + + late final _dprintfPtr = _lookup< + ffi.NativeFunction)>>( + 'dprintf'); + late final _dprintf = + _dprintfPtr.asFunction)>(); + + int vdprintf( + int arg0, + ffi.Pointer arg1, + va_list arg2, + ) { + return _vdprintf( + arg0, + arg1, + arg2, + ); + } + + late final _vdprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, va_list)>>('vdprintf'); + late final _vdprintf = _vdprintfPtr + .asFunction, va_list)>(); + + int getdelim( + ffi.Pointer> __linep, + ffi.Pointer __linecapp, + int __delimiter, + ffi.Pointer __stream, + ) { + return _getdelim( + __linep, + __linecapp, + __delimiter, + __stream, + ); + } + + late final _getdelimPtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Pointer>, + ffi.Pointer, ffi.Int, ffi.Pointer)>>('getdelim'); + late final _getdelim = _getdelimPtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + int, ffi.Pointer)>(); + + int getline( + ffi.Pointer> __linep, + ffi.Pointer __linecapp, + ffi.Pointer __stream, + ) { + return _getline( + __linep, + __linecapp, + __stream, + ); + } + + late final _getlinePtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>('getline'); + late final _getline = _getlinePtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + ffi.Pointer)>(); + + ffi.Pointer fmemopen( + ffi.Pointer __buf, + int __size, + ffi.Pointer __mode, + ) { + return _fmemopen( + __buf, + __size, + __mode, + ); + } + + late final _fmemopenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Pointer)>>('fmemopen'); + late final _fmemopen = _fmemopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); + + ffi.Pointer open_memstream( + ffi.Pointer> __bufp, + ffi.Pointer __sizep, + ) { + return _open_memstream( + __bufp, + __sizep, + ); + } + + late final _open_memstreamPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer>, + ffi.Pointer)>>('open_memstream'); + late final _open_memstream = _open_memstreamPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer>, ffi.Pointer)>(); + + late final ffi.Pointer _sys_nerr = _lookup('sys_nerr'); + + int get sys_nerr => _sys_nerr.value; + + set sys_nerr(int value) => _sys_nerr.value = value; + + late final ffi.Pointer>> _sys_errlist = + _lookup>>('sys_errlist'); + + ffi.Pointer> get sys_errlist => _sys_errlist.value; + + set sys_errlist(ffi.Pointer> value) => + _sys_errlist.value = value; + + int asprintf( + ffi.Pointer> arg0, + ffi.Pointer arg1, + ) { + return _asprintf( + arg0, + arg1, + ); + } + + late final _asprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, + ffi.Pointer)>>('asprintf'); + late final _asprintf = _asprintfPtr.asFunction< + int Function( + ffi.Pointer>, ffi.Pointer)>(); + + ffi.Pointer ctermid_r( + ffi.Pointer arg0, + ) { + return _ctermid_r( + arg0, + ); + } + + late final _ctermid_rPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('ctermid_r'); + late final _ctermid_r = _ctermid_rPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer fgetln( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _fgetln( + arg0, + arg1, + ); + } + + late final _fgetlnPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fgetln'); + late final _fgetln = _fgetlnPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer fmtcheck( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _fmtcheck( + arg0, + arg1, + ); + } + + late final _fmtcheckPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fmtcheck'); + late final _fmtcheck = _fmtcheckPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + int fpurge( + ffi.Pointer arg0, + ) { + return _fpurge( + arg0, + ); + } + + late final _fpurgePtr = + _lookup)>>( + 'fpurge'); + late final _fpurge = _fpurgePtr.asFunction)>(); + + void setbuffer( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _setbuffer( + arg0, + arg1, + arg2, + ); + } + + late final _setbufferPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>('setbuffer'); + late final _setbuffer = _setbufferPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + int setlinebuf( + ffi.Pointer arg0, + ) { + return _setlinebuf( + arg0, + ); + } + + late final _setlinebufPtr = + _lookup)>>( + 'setlinebuf'); + late final _setlinebuf = + _setlinebufPtr.asFunction)>(); + + int vasprintf( + ffi.Pointer> arg0, + ffi.Pointer arg1, + va_list arg2, + ) { + return _vasprintf( + arg0, + arg1, + arg2, + ); + } + + late final _vasprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, + ffi.Pointer, va_list)>>('vasprintf'); + late final _vasprintf = _vasprintfPtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + va_list)>(); + + ffi.Pointer funopen( + ffi.Pointer arg0, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> + arg1, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> + arg2, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> + arg3, + ffi.Pointer)>> + arg4, + ) { + return _funopen( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final _funopenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer)>>)>>('funopen'); + late final _funopen = _funopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction)>>)>(); + + int __sprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, + ) { + return ___sprintf_chk( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final ___sprintf_chkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, + ffi.Pointer)>>('__sprintf_chk'); + late final ___sprintf_chk = ___sprintf_chkPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + + int __snprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, + ffi.Pointer arg4, + ) { + return ___snprintf_chk( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final ___snprintf_chkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, + ffi.Pointer)>>('__snprintf_chk'); + late final ___snprintf_chk = ___snprintf_chkPtr.asFunction< + int Function( + ffi.Pointer, int, int, int, ffi.Pointer)>(); + + int __vsprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, + va_list arg4, + ) { + return ___vsprintf_chk( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final ___vsprintf_chkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, + ffi.Pointer, va_list)>>('__vsprintf_chk'); + late final ___vsprintf_chk = ___vsprintf_chkPtr.asFunction< + int Function( + ffi.Pointer, int, int, ffi.Pointer, va_list)>(); + + int __vsnprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, + ffi.Pointer arg4, + va_list arg5, + ) { + return ___vsnprintf_chk( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + } + + late final ___vsnprintf_chkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, + ffi.Pointer, va_list)>>('__vsnprintf_chk'); + late final ___vsnprintf_chk = ___vsnprintf_chkPtr.asFunction< + int Function(ffi.Pointer, int, int, int, ffi.Pointer, + va_list)>(); + + int getpriority( + int arg0, + int arg1, + ) { + return _getpriority( + arg0, + arg1, + ); + } + + late final _getpriorityPtr = + _lookup>( + 'getpriority'); + late final _getpriority = + _getpriorityPtr.asFunction(); + + int getiopolicy_np( + int arg0, + int arg1, + ) { + return _getiopolicy_np( + arg0, + arg1, + ); + } + + late final _getiopolicy_npPtr = + _lookup>( + 'getiopolicy_np'); + late final _getiopolicy_np = + _getiopolicy_npPtr.asFunction(); + + int getrlimit( + int arg0, + ffi.Pointer arg1, + ) { + return _getrlimit( + arg0, + arg1, + ); + } + + late final _getrlimitPtr = _lookup< + ffi.NativeFunction)>>( + 'getrlimit'); + late final _getrlimit = + _getrlimitPtr.asFunction)>(); + + int getrusage( + int arg0, + ffi.Pointer arg1, + ) { + return _getrusage( + arg0, + arg1, + ); + } + + late final _getrusagePtr = _lookup< + ffi.NativeFunction)>>( + 'getrusage'); + late final _getrusage = + _getrusagePtr.asFunction)>(); + + int setpriority( + int arg0, + int arg1, + int arg2, + ) { + return _setpriority( + arg0, + arg1, + arg2, + ); + } + + late final _setpriorityPtr = + _lookup>( + 'setpriority'); + late final _setpriority = + _setpriorityPtr.asFunction(); + + int setiopolicy_np( + int arg0, + int arg1, + int arg2, + ) { + return _setiopolicy_np( + arg0, + arg1, + arg2, + ); + } + + late final _setiopolicy_npPtr = + _lookup>( + 'setiopolicy_np'); + late final _setiopolicy_np = + _setiopolicy_npPtr.asFunction(); + + int setrlimit( + int arg0, + ffi.Pointer arg1, + ) { + return _setrlimit( + arg0, + arg1, + ); + } + + late final _setrlimitPtr = _lookup< + ffi.NativeFunction)>>( + 'setrlimit'); + late final _setrlimit = + _setrlimitPtr.asFunction)>(); + + int wait1( + ffi.Pointer arg0, + ) { + return _wait1( + arg0, + ); + } + + late final _wait1Ptr = + _lookup)>>('wait'); + late final _wait1 = + _wait1Ptr.asFunction)>(); + + int waitpid( + int arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _waitpid( + arg0, + arg1, + arg2, + ); + } + + late final _waitpidPtr = _lookup< + ffi.NativeFunction< + pid_t Function(pid_t, ffi.Pointer, ffi.Int)>>('waitpid'); + late final _waitpid = + _waitpidPtr.asFunction, int)>(); + + int waitid( + int arg0, + int arg1, + ffi.Pointer arg2, + int arg3, + ) { + return _waitid( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _waitidPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int32, id_t, ffi.Pointer, ffi.Int)>>('waitid'); + late final _waitid = _waitidPtr + .asFunction, int)>(); + + int wait3( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ) { + return _wait3( + arg0, + arg1, + arg2, + ); + } + + late final _wait3Ptr = _lookup< + ffi.NativeFunction< + pid_t Function( + ffi.Pointer, ffi.Int, ffi.Pointer)>>('wait3'); + late final _wait3 = _wait3Ptr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); + + int wait4( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + ) { + return _wait4( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _wait4Ptr = _lookup< + ffi.NativeFunction< + pid_t Function(pid_t, ffi.Pointer, ffi.Int, + ffi.Pointer)>>('wait4'); + late final _wait4 = _wait4Ptr.asFunction< + int Function(int, ffi.Pointer, int, ffi.Pointer)>(); + + ffi.Pointer alloca( + int arg0, + ) { + return _alloca( + arg0, + ); + } + + late final _allocaPtr = + _lookup Function(ffi.Size)>>( + 'alloca'); + late final _alloca = + _allocaPtr.asFunction Function(int)>(); + + late final ffi.Pointer ___mb_cur_max = + _lookup('__mb_cur_max'); + + int get __mb_cur_max => ___mb_cur_max.value; + + set __mb_cur_max(int value) => ___mb_cur_max.value = value; + + ffi.Pointer malloc( + int __size, + ) { + return _malloc( + __size, + ); + } + + late final _mallocPtr = + _lookup Function(ffi.Size)>>( + 'malloc'); + late final _malloc = + _mallocPtr.asFunction Function(int)>(); + + ffi.Pointer calloc( + int __count, + int __size, + ) { + return _calloc( + __count, + __size, + ); + } + + late final _callocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Size, ffi.Size)>>('calloc'); + late final _calloc = + _callocPtr.asFunction Function(int, int)>(); + + void free( + ffi.Pointer arg0, + ) { + return _free( + arg0, + ); + } + + late final _freePtr = + _lookup)>>( + 'free'); + late final _free = + _freePtr.asFunction)>(); + + ffi.Pointer realloc( + ffi.Pointer __ptr, + int __size, + ) { + return _realloc( + __ptr, + __size, + ); + } + + late final _reallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('realloc'); + late final _realloc = _reallocPtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer valloc( + int arg0, + ) { + return _valloc( + arg0, + ); + } + + late final _vallocPtr = + _lookup Function(ffi.Size)>>( + 'valloc'); + late final _valloc = + _vallocPtr.asFunction Function(int)>(); + + ffi.Pointer aligned_alloc( + int __alignment, + int __size, + ) { + return _aligned_alloc( + __alignment, + __size, + ); + } + + late final _aligned_allocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Size, ffi.Size)>>('aligned_alloc'); + late final _aligned_alloc = + _aligned_allocPtr.asFunction Function(int, int)>(); + + int posix_memalign( + ffi.Pointer> __memptr, + int __alignment, + int __size, + ) { + return _posix_memalign( + __memptr, + __alignment, + __size, + ); + } + + late final _posix_memalignPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, ffi.Size, + ffi.Size)>>('posix_memalign'); + late final _posix_memalign = _posix_memalignPtr + .asFunction>, int, int)>(); + + void abort() { + return _abort(); + } + + late final _abortPtr = + _lookup>('abort'); + late final _abort = _abortPtr.asFunction(); + + int abs( + int arg0, + ) { + return _abs( + arg0, + ); + } + + late final _absPtr = + _lookup>('abs'); + late final _abs = _absPtr.asFunction(); + + int atexit( + ffi.Pointer> arg0, + ) { + return _atexit( + arg0, + ); + } + + late final _atexitPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>)>>('atexit'); + late final _atexit = _atexitPtr.asFunction< + int Function(ffi.Pointer>)>(); + + double atof( + ffi.Pointer arg0, + ) { + return _atof( + arg0, + ); + } + + late final _atofPtr = + _lookup)>>( + 'atof'); + late final _atof = + _atofPtr.asFunction)>(); + + int atoi( + ffi.Pointer arg0, + ) { + return _atoi( + arg0, + ); + } + + late final _atoiPtr = + _lookup)>>( + 'atoi'); + late final _atoi = _atoiPtr.asFunction)>(); + + int atol( + ffi.Pointer arg0, + ) { + return _atol( + arg0, + ); + } + + late final _atolPtr = + _lookup)>>( + 'atol'); + late final _atol = _atolPtr.asFunction)>(); + + int atoll( + ffi.Pointer arg0, + ) { + return _atoll( + arg0, + ); + } + + late final _atollPtr = + _lookup)>>( + 'atoll'); + late final _atoll = + _atollPtr.asFunction)>(); + + ffi.Pointer bsearch( + ffi.Pointer __key, + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, + ) { + return _bsearch( + __key, + __base, + __nel, + __width, + __compar, + ); + } + + late final _bsearchPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('bsearch'); + late final _bsearch = _bsearchPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); + + div_t div( + int arg0, + int arg1, + ) { + return _div( + arg0, + arg1, + ); + } + + late final _divPtr = + _lookup>('div'); + late final _div = _divPtr.asFunction(); + + void exit( + int arg0, + ) { + return _exit1( + arg0, + ); + } + + late final _exitPtr = + _lookup>('exit'); + late final _exit1 = _exitPtr.asFunction(); + + ffi.Pointer getenv( + ffi.Pointer arg0, + ) { + return _getenv( + arg0, + ); + } + + late final _getenvPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('getenv'); + late final _getenv = _getenvPtr + .asFunction Function(ffi.Pointer)>(); + + int labs( + int arg0, + ) { + return _labs( + arg0, + ); + } + + late final _labsPtr = + _lookup>('labs'); + late final _labs = _labsPtr.asFunction(); + + ldiv_t ldiv( + int arg0, + int arg1, + ) { + return _ldiv( + arg0, + arg1, + ); + } + + late final _ldivPtr = + _lookup>('ldiv'); + late final _ldiv = _ldivPtr.asFunction(); + + int llabs( + int arg0, + ) { + return _llabs( + arg0, + ); + } + + late final _llabsPtr = + _lookup>('llabs'); + late final _llabs = _llabsPtr.asFunction(); + + lldiv_t lldiv( + int arg0, + int arg1, + ) { + return _lldiv( + arg0, + arg1, + ); + } + + late final _lldivPtr = + _lookup>( + 'lldiv'); + late final _lldiv = _lldivPtr.asFunction(); + + int mblen( + ffi.Pointer __s, + int __n, + ) { + return _mblen( + __s, + __n, + ); + } + + late final _mblenPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size)>>('mblen'); + late final _mblen = + _mblenPtr.asFunction, int)>(); + + int mbstowcs( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _mbstowcs( + arg0, + arg1, + arg2, + ); + } + + late final _mbstowcsPtr = _lookup< + ffi.NativeFunction< + ffi.Size Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('mbstowcs'); + late final _mbstowcs = _mbstowcsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + int mbtowc( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _mbtowc( + arg0, + arg1, + arg2, + ); + } + + late final _mbtowcPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('mbtowc'); + late final _mbtowc = _mbtowcPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + void qsort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, + ) { + return _qsort( + __base, + __nel, + __width, + __compar, + ); + } + + late final _qsortPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('qsort'); + late final _qsort = _qsortPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); + + int rand() { + return _rand(); + } + + late final _randPtr = _lookup>('rand'); + late final _rand = _randPtr.asFunction(); + + void srand( + int arg0, + ) { + return _srand( + arg0, + ); + } + + late final _srandPtr = + _lookup>('srand'); + late final _srand = _srandPtr.asFunction(); + + double strtod( + ffi.Pointer arg0, + ffi.Pointer> arg1, + ) { + return _strtod( + arg0, + arg1, + ); + } + + late final _strtodPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer>)>>('strtod'); + late final _strtod = _strtodPtr.asFunction< + double Function( + ffi.Pointer, ffi.Pointer>)>(); + + double strtof( + ffi.Pointer arg0, + ffi.Pointer> arg1, + ) { + return _strtof( + arg0, + arg1, + ); + } + + late final _strtofPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer>)>>('strtof'); + late final _strtof = _strtofPtr.asFunction< + double Function( + ffi.Pointer, ffi.Pointer>)>(); + + int strtol( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtol( + __str, + __endptr, + __base, + ); + } + + late final _strtolPtr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtol'); + late final _strtol = _strtolPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int strtoll( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoll( + __str, + __endptr, + __base, + ); + } + + late final _strtollPtr = _lookup< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoll'); + late final _strtoll = _strtollPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int strtoul( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoul( + __str, + __endptr, + __base, + ); + } + + late final _strtoulPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoul'); + late final _strtoul = _strtoulPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int strtoull( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoull( + __str, + __endptr, + __base, + ); + } + + late final _strtoullPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoull'); + late final _strtoull = _strtoullPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int system( + ffi.Pointer arg0, + ) { + return _system( + arg0, + ); + } + + late final _systemPtr = + _lookup)>>( + 'system'); + late final _system = + _systemPtr.asFunction)>(); + + int wcstombs( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _wcstombs( + arg0, + arg1, + arg2, + ); + } + + late final _wcstombsPtr = _lookup< + ffi.NativeFunction< + ffi.Size Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('wcstombs'); + late final _wcstombs = _wcstombsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + int wctomb( + ffi.Pointer arg0, + int arg1, + ) { + return _wctomb( + arg0, + arg1, + ); + } + + late final _wctombPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.WChar)>>('wctomb'); + late final _wctomb = + _wctombPtr.asFunction, int)>(); + + void _Exit( + int arg0, + ) { + return __Exit( + arg0, + ); + } + + late final __ExitPtr = + _lookup>('_Exit'); + late final __Exit = __ExitPtr.asFunction(); + + int a64l( + ffi.Pointer arg0, + ) { + return _a64l( + arg0, + ); + } + + late final _a64lPtr = + _lookup)>>( + 'a64l'); + late final _a64l = _a64lPtr.asFunction)>(); + + double drand48() { + return _drand48(); + } + + late final _drand48Ptr = + _lookup>('drand48'); + late final _drand48 = _drand48Ptr.asFunction(); + + ffi.Pointer ecvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + return _ecvt( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _ecvtPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Double, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('ecvt'); + late final _ecvt = _ecvtPtr.asFunction< + ffi.Pointer Function( + double, int, ffi.Pointer, ffi.Pointer)>(); + + double erand48( + ffi.Pointer arg0, + ) { + return _erand48( + arg0, + ); + } + + late final _erand48Ptr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer)>>('erand48'); + late final _erand48 = + _erand48Ptr.asFunction)>(); + + ffi.Pointer fcvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + return _fcvt( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _fcvtPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Double, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('fcvt'); + late final _fcvt = _fcvtPtr.asFunction< + ffi.Pointer Function( + double, int, ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer gcvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ) { + return _gcvt( + arg0, + arg1, + arg2, + ); + } + + late final _gcvtPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Double, ffi.Int, ffi.Pointer)>>('gcvt'); + late final _gcvt = _gcvtPtr.asFunction< + ffi.Pointer Function(double, int, ffi.Pointer)>(); + + int getsubopt( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer> arg2, + ) { + return _getsubopt( + arg0, + arg1, + arg2, + ); + } + + late final _getsuboptPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>)>>('getsubopt'); + late final _getsubopt = _getsuboptPtr.asFunction< + int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>)>(); + + int grantpt( + int arg0, + ) { + return _grantpt( + arg0, + ); + } + + late final _grantptPtr = + _lookup>('grantpt'); + late final _grantpt = _grantptPtr.asFunction(); + + ffi.Pointer initstate( + int arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _initstate( + arg0, + arg1, + arg2, + ); + } + + late final _initstatePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.UnsignedInt, ffi.Pointer, ffi.Size)>>('initstate'); + late final _initstate = _initstatePtr.asFunction< + ffi.Pointer Function(int, ffi.Pointer, int)>(); + + int jrand48( + ffi.Pointer arg0, + ) { + return _jrand48( + arg0, + ); + } + + late final _jrand48Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer)>>('jrand48'); + late final _jrand48 = + _jrand48Ptr.asFunction)>(); + + ffi.Pointer l64a( + int arg0, + ) { + return _l64a( + arg0, + ); + } + + late final _l64aPtr = + _lookup Function(ffi.Long)>>( + 'l64a'); + late final _l64a = _l64aPtr.asFunction Function(int)>(); + + void lcong48( + ffi.Pointer arg0, + ) { + return _lcong48( + arg0, + ); + } + + late final _lcong48Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer)>>('lcong48'); + late final _lcong48 = + _lcong48Ptr.asFunction)>(); + + int lrand48() { + return _lrand48(); + } + + late final _lrand48Ptr = + _lookup>('lrand48'); + late final _lrand48 = _lrand48Ptr.asFunction(); + + ffi.Pointer mktemp( + ffi.Pointer arg0, + ) { + return _mktemp( + arg0, + ); + } + + late final _mktempPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('mktemp'); + late final _mktemp = _mktempPtr + .asFunction Function(ffi.Pointer)>(); + + int mkstemp( + ffi.Pointer arg0, + ) { + return _mkstemp( + arg0, + ); + } + + late final _mkstempPtr = + _lookup)>>( + 'mkstemp'); + late final _mkstemp = + _mkstempPtr.asFunction)>(); + + int mrand48() { + return _mrand48(); + } + + late final _mrand48Ptr = + _lookup>('mrand48'); + late final _mrand48 = _mrand48Ptr.asFunction(); + + int nrand48( + ffi.Pointer arg0, + ) { + return _nrand48( + arg0, + ); + } + + late final _nrand48Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer)>>('nrand48'); + late final _nrand48 = + _nrand48Ptr.asFunction)>(); + + int posix_openpt( + int arg0, + ) { + return _posix_openpt( + arg0, + ); + } + + late final _posix_openptPtr = + _lookup>('posix_openpt'); + late final _posix_openpt = _posix_openptPtr.asFunction(); + + ffi.Pointer ptsname( + int arg0, + ) { + return _ptsname( + arg0, + ); + } + + late final _ptsnamePtr = + _lookup Function(ffi.Int)>>( + 'ptsname'); + late final _ptsname = + _ptsnamePtr.asFunction Function(int)>(); + + int ptsname_r( + int fildes, + ffi.Pointer buffer, + int buflen, + ) { + return _ptsname_r( + fildes, + buffer, + buflen, + ); + } + + late final _ptsname_rPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('ptsname_r'); + late final _ptsname_r = + _ptsname_rPtr.asFunction, int)>(); + + int putenv( + ffi.Pointer arg0, + ) { + return _putenv( + arg0, + ); + } + + late final _putenvPtr = + _lookup)>>( + 'putenv'); + late final _putenv = + _putenvPtr.asFunction)>(); + + int random() { + return _random(); + } + + late final _randomPtr = + _lookup>('random'); + late final _random = _randomPtr.asFunction(); + + int rand_r( + ffi.Pointer arg0, + ) { + return _rand_r( + arg0, + ); + } + + late final _rand_rPtr = _lookup< + ffi.NativeFunction)>>( + 'rand_r'); + late final _rand_r = + _rand_rPtr.asFunction)>(); + + ffi.Pointer realpath( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _realpath( + arg0, + arg1, + ); + } + + late final _realpathPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('realpath'); + late final _realpath = _realpathPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer seed48( + ffi.Pointer arg0, + ) { + return _seed48( + arg0, + ); + } + + late final _seed48Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('seed48'); + late final _seed48 = _seed48Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer)>(); + + int setenv( + ffi.Pointer __name, + ffi.Pointer __value, + int __overwrite, + ) { + return _setenv( + __name, + __value, + __overwrite, + ); + } + + late final _setenvPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('setenv'); + late final _setenv = _setenvPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + void setkey( + ffi.Pointer arg0, + ) { + return _setkey( + arg0, + ); + } + + late final _setkeyPtr = + _lookup)>>( + 'setkey'); + late final _setkey = + _setkeyPtr.asFunction)>(); + + ffi.Pointer setstate( + ffi.Pointer arg0, + ) { + return _setstate( + arg0, + ); + } + + late final _setstatePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('setstate'); + late final _setstate = _setstatePtr + .asFunction Function(ffi.Pointer)>(); + + void srand48( + int arg0, + ) { + return _srand48( + arg0, + ); + } + + late final _srand48Ptr = + _lookup>('srand48'); + late final _srand48 = _srand48Ptr.asFunction(); + + void srandom( + int arg0, + ) { + return _srandom( + arg0, + ); + } + + late final _srandomPtr = + _lookup>( + 'srandom'); + late final _srandom = _srandomPtr.asFunction(); + + int unlockpt( + int arg0, + ) { + return _unlockpt( + arg0, + ); + } + + late final _unlockptPtr = + _lookup>('unlockpt'); + late final _unlockpt = _unlockptPtr.asFunction(); + + int unsetenv( + ffi.Pointer arg0, + ) { + return _unsetenv( + arg0, + ); + } + + late final _unsetenvPtr = + _lookup)>>( + 'unsetenv'); + late final _unsetenv = + _unsetenvPtr.asFunction)>(); + + int arc4random() { + return _arc4random(); + } + + late final _arc4randomPtr = + _lookup>('arc4random'); + late final _arc4random = _arc4randomPtr.asFunction(); + + void arc4random_addrandom( + ffi.Pointer arg0, + int arg1, + ) { + return _arc4random_addrandom( + arg0, + arg1, + ); + } + + late final _arc4random_addrandomPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Int)>>('arc4random_addrandom'); + late final _arc4random_addrandom = _arc4random_addrandomPtr + .asFunction, int)>(); + + void arc4random_buf( + ffi.Pointer __buf, + int __nbytes, + ) { + return _arc4random_buf( + __buf, + __nbytes, + ); + } + + late final _arc4random_bufPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Size)>>('arc4random_buf'); + late final _arc4random_buf = _arc4random_bufPtr + .asFunction, int)>(); + + void arc4random_stir() { + return _arc4random_stir(); + } + + late final _arc4random_stirPtr = + _lookup>('arc4random_stir'); + late final _arc4random_stir = + _arc4random_stirPtr.asFunction(); + + int arc4random_uniform( + int __upper_bound, + ) { + return _arc4random_uniform( + __upper_bound, + ); + } + + late final _arc4random_uniformPtr = + _lookup>( + 'arc4random_uniform'); + late final _arc4random_uniform = + _arc4random_uniformPtr.asFunction(); + + int atexit_b( + ffi.Pointer<_ObjCBlock> arg0, + ) { + return _atexit_b( + arg0, + ); + } + + late final _atexit_bPtr = + _lookup)>>( + 'atexit_b'); + late final _atexit_b = + _atexit_bPtr.asFunction)>(); + + ffi.Pointer bsearch_b( + ffi.Pointer __key, + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, + ) { + return _bsearch_b( + __key, + __base, + __nel, + __width, + __compar, + ); + } + + late final _bsearch_bPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('bsearch_b'); + late final _bsearch_b = _bsearch_bPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + + ffi.Pointer cgetcap( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _cgetcap( + arg0, + arg1, + arg2, + ); + } + + late final _cgetcapPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>('cgetcap'); + late final _cgetcap = _cgetcapPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + int cgetclose() { + return _cgetclose(); + } + + late final _cgetclosePtr = + _lookup>('cgetclose'); + late final _cgetclose = _cgetclosePtr.asFunction(); + + int cgetent( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer arg2, + ) { + return _cgetent( + arg0, + arg1, + arg2, + ); + } + + late final _cgetentPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer)>>('cgetent'); + late final _cgetent = _cgetentPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>, ffi.Pointer)>(); + + int cgetfirst( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ) { + return _cgetfirst( + arg0, + arg1, + ); + } + + late final _cgetfirstPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, + ffi.Pointer>)>>('cgetfirst'); + late final _cgetfirst = _cgetfirstPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>)>(); + + int cgetmatch( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _cgetmatch( + arg0, + arg1, + ); + } + + late final _cgetmatchPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('cgetmatch'); + late final _cgetmatch = _cgetmatchPtr + .asFunction, ffi.Pointer)>(); + + int cgetnext( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ) { + return _cgetnext( + arg0, + arg1, + ); + } + + late final _cgetnextPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, + ffi.Pointer>)>>('cgetnext'); + late final _cgetnext = _cgetnextPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>)>(); + + int cgetnum( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _cgetnum( + arg0, + arg1, + arg2, + ); + } + + late final _cgetnumPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('cgetnum'); + late final _cgetnum = _cgetnumPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + int cgetset( + ffi.Pointer arg0, + ) { + return _cgetset( + arg0, + ); + } + + late final _cgetsetPtr = + _lookup)>>( + 'cgetset'); + late final _cgetset = + _cgetsetPtr.asFunction)>(); + + int cgetstr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ) { + return _cgetstr( + arg0, + arg1, + arg2, + ); + } + + late final _cgetstrPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('cgetstr'); + late final _cgetstr = _cgetstrPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); + + int cgetustr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + ) { + return _cgetustr( + arg0, + arg1, + arg2, + ); + } + + late final _cgetustrPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('cgetustr'); + late final _cgetustr = _cgetustrPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); + + int daemon( + int arg0, + int arg1, + ) { + return _daemon( + arg0, + arg1, + ); + } + + late final _daemonPtr = + _lookup>('daemon'); + late final _daemon = _daemonPtr.asFunction(); + + ffi.Pointer devname( + int arg0, + int arg1, + ) { + return _devname( + arg0, + arg1, + ); + } + + late final _devnamePtr = _lookup< + ffi.NativeFunction Function(dev_t, mode_t)>>( + 'devname'); + late final _devname = + _devnamePtr.asFunction Function(int, int)>(); + + ffi.Pointer devname_r( + int arg0, + int arg1, + ffi.Pointer buf, + int len, + ) { + return _devname_r( + arg0, + arg1, + buf, + len, + ); + } + + late final _devname_rPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + dev_t, mode_t, ffi.Pointer, ffi.Int)>>('devname_r'); + late final _devname_r = _devname_rPtr.asFunction< + ffi.Pointer Function(int, int, ffi.Pointer, int)>(); + + ffi.Pointer getbsize( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _getbsize( + arg0, + arg1, + ); + } + + late final _getbsizePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('getbsize'); + late final _getbsize = _getbsizePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + int getloadavg( + ffi.Pointer arg0, + int arg1, + ) { + return _getloadavg( + arg0, + arg1, + ); + } + + late final _getloadavgPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int)>>('getloadavg'); + late final _getloadavg = + _getloadavgPtr.asFunction, int)>(); + + ffi.Pointer getprogname() { + return _getprogname(); + } + + late final _getprognamePtr = + _lookup Function()>>( + 'getprogname'); + late final _getprogname = + _getprognamePtr.asFunction Function()>(); + + void setprogname( + ffi.Pointer arg0, + ) { + return _setprogname( + arg0, + ); + } + + late final _setprognamePtr = + _lookup)>>( + 'setprogname'); + late final _setprogname = + _setprognamePtr.asFunction)>(); + + int heapsort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, + ) { + return _heapsort( + __base, + __nel, + __width, + __compar, + ); + } + + late final _heapsortPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('heapsort'); + late final _heapsort = _heapsortPtr.asFunction< + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); + + int heapsort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, + ) { + return _heapsort_b( + __base, + __nel, + __width, + __compar, + ); + } + + late final _heapsort_bPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('heapsort_b'); + late final _heapsort_b = _heapsort_bPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + + int mergesort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, + ) { + return _mergesort( + __base, + __nel, + __width, + __compar, + ); + } + + late final _mergesortPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('mergesort'); + late final _mergesort = _mergesortPtr.asFunction< + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); + + int mergesort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, + ) { + return _mergesort_b( + __base, + __nel, + __width, + __compar, + ); + } + + late final _mergesort_bPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('mergesort_b'); + late final _mergesort_b = _mergesort_bPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + + void psort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, + ) { + return _psort( + __base, + __nel, + __width, + __compar, + ); + } + + late final _psortPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('psort'); + late final _psort = _psortPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); + + void psort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, + ) { + return _psort_b( + __base, + __nel, + __width, + __compar, + ); + } + + late final _psort_bPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('psort_b'); + late final _psort_b = _psort_bPtr.asFunction< + void Function( + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + + void psort_r( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer arg3, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> + __compar, + ) { + return _psort_r( + __base, + __nel, + __width, + arg3, + __compar, + ); + } + + late final _psort_rPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>)>>('psort_r'); + late final _psort_r = _psort_rPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>)>(); + + void qsort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, + ) { + return _qsort_b( + __base, + __nel, + __width, + __compar, + ); + } + + late final _qsort_bPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('qsort_b'); + late final _qsort_b = _qsort_bPtr.asFunction< + void Function( + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + + void qsort_r( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer arg3, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> + __compar, + ) { + return _qsort_r( + __base, + __nel, + __width, + arg3, + __compar, + ); + } + + late final _qsort_rPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>)>>('qsort_r'); + late final _qsort_r = _qsort_rPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>)>(); + + int radixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, + ) { + return _radixsort( + __base, + __nel, + __table, + __endbyte, + ); + } + + late final _radixsortPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('radixsort'); + late final _radixsort = _radixsortPtr.asFunction< + int Function(ffi.Pointer>, int, + ffi.Pointer, int)>(); + + int rpmatch( + ffi.Pointer arg0, + ) { + return _rpmatch( + arg0, + ); + } + + late final _rpmatchPtr = + _lookup)>>( + 'rpmatch'); + late final _rpmatch = + _rpmatchPtr.asFunction)>(); + + int sradixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, + ) { + return _sradixsort( + __base, + __nel, + __table, + __endbyte, + ); + } + + late final _sradixsortPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('sradixsort'); + late final _sradixsort = _sradixsortPtr.asFunction< + int Function(ffi.Pointer>, int, + ffi.Pointer, int)>(); + + void sranddev() { + return _sranddev(); + } + + late final _sranddevPtr = + _lookup>('sranddev'); + late final _sranddev = _sranddevPtr.asFunction(); + + void srandomdev() { + return _srandomdev(); + } + + late final _srandomdevPtr = + _lookup>('srandomdev'); + late final _srandomdev = _srandomdevPtr.asFunction(); + + ffi.Pointer reallocf( + ffi.Pointer __ptr, + int __size, + ) { + return _reallocf( + __ptr, + __size, + ); + } + + late final _reallocfPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('reallocf'); + late final _reallocf = _reallocfPtr + .asFunction Function(ffi.Pointer, int)>(); + + int strtonum( + ffi.Pointer __numstr, + int __minval, + int __maxval, + ffi.Pointer> __errstrp, + ) { + return _strtonum( + __numstr, + __minval, + __maxval, + __errstrp, + ); + } + + late final _strtonumPtr = _lookup< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, ffi.LongLong, + ffi.LongLong, ffi.Pointer>)>>('strtonum'); + late final _strtonum = _strtonumPtr.asFunction< + int Function(ffi.Pointer, int, int, + ffi.Pointer>)>(); + + int strtoq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoq( + __str, + __endptr, + __base, + ); + } + + late final _strtoqPtr = _lookup< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoq'); + late final _strtoq = _strtoqPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int strtouq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtouq( + __str, + __endptr, + __base, + ); + } + + late final _strtouqPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtouq'); + late final _strtouq = _strtouqPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + late final ffi.Pointer> _suboptarg = + _lookup>('suboptarg'); + + ffi.Pointer get suboptarg => _suboptarg.value; + + set suboptarg(ffi.Pointer value) => _suboptarg.value = value; + + ffi.Pointer memchr( + ffi.Pointer __s, + int __c, + int __n, + ) { + return _memchr( + __s, + __c, + __n, + ); + } + + late final _memchrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Size)>>('memchr'); + late final _memchr = _memchrPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); + + int memcmp( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, + ) { + return _memcmp( + __s1, + __s2, + __n, + ); + } + + late final _memcmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memcmp'); + late final _memcmp = _memcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer memcpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, + ) { + return _memcpy( + __dst, + __src, + __n, + ); + } + + late final _memcpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('memcpy'); + late final _memcpy = _memcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer memmove( + ffi.Pointer __dst, + ffi.Pointer __src, + int __len, + ) { + return _memmove( + __dst, + __src, + __len, + ); + } + + late final _memmovePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('memmove'); + late final _memmove = _memmovePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer memset( + ffi.Pointer __b, + int __c, + int __len, + ) { + return _memset( + __b, + __c, + __len, + ); + } + + late final _memsetPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Size)>>('memset'); + late final _memset = _memsetPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); + + ffi.Pointer strcat( + ffi.Pointer __s1, + ffi.Pointer __s2, + ) { + return _strcat( + __s1, + __s2, + ); + } + + late final _strcatPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strcat'); + late final _strcat = _strcatPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer strchr( + ffi.Pointer __s, + int __c, + ) { + return _strchr( + __s, + __c, + ); + } + + late final _strchrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('strchr'); + late final _strchr = _strchrPtr + .asFunction Function(ffi.Pointer, int)>(); + + int strcmp( + ffi.Pointer __s1, + ffi.Pointer __s2, + ) { + return _strcmp( + __s1, + __s2, + ); + } + + late final _strcmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcmp'); + late final _strcmp = _strcmpPtr + .asFunction, ffi.Pointer)>(); + + int strcoll( + ffi.Pointer __s1, + ffi.Pointer __s2, + ) { + return _strcoll( + __s1, + __s2, + ); + } + + late final _strcollPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcoll'); + late final _strcoll = _strcollPtr + .asFunction, ffi.Pointer)>(); + + ffi.Pointer strcpy( + ffi.Pointer __dst, + ffi.Pointer __src, + ) { + return _strcpy( + __dst, + __src, + ); + } + + late final _strcpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strcpy'); + late final _strcpy = _strcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + int strcspn( + ffi.Pointer __s, + ffi.Pointer __charset, + ) { + return _strcspn( + __s, + __charset, + ); + } + + late final _strcspnPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>>('strcspn'); + late final _strcspn = _strcspnPtr + .asFunction, ffi.Pointer)>(); + + ffi.Pointer strerror( + int __errnum, + ) { + return _strerror( + __errnum, + ); + } + + late final _strerrorPtr = + _lookup Function(ffi.Int)>>( + 'strerror'); + late final _strerror = + _strerrorPtr.asFunction Function(int)>(); + + int strlen( + ffi.Pointer __s, + ) { + return _strlen( + __s, + ); + } + + late final _strlenPtr = _lookup< + ffi.NativeFunction)>>( + 'strlen'); + late final _strlen = + _strlenPtr.asFunction)>(); + + ffi.Pointer strncat( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, + ) { + return _strncat( + __s1, + __s2, + __n, + ); + } + + late final _strncatPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strncat'); + late final _strncat = _strncatPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + int strncmp( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, + ) { + return _strncmp( + __s1, + __s2, + __n, + ); + } + + late final _strncmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('strncmp'); + late final _strncmp = _strncmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer strncpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, + ) { + return _strncpy( + __dst, + __src, + __n, + ); + } + + late final _strncpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strncpy'); + late final _strncpy = _strncpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer strpbrk( + ffi.Pointer __s, + ffi.Pointer __charset, + ) { + return _strpbrk( + __s, + __charset, + ); + } + + late final _strpbrkPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strpbrk'); + late final _strpbrk = _strpbrkPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer strrchr( + ffi.Pointer __s, + int __c, + ) { + return _strrchr( + __s, + __c, + ); + } + + late final _strrchrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('strrchr'); + late final _strrchr = _strrchrPtr + .asFunction Function(ffi.Pointer, int)>(); + + int strspn( + ffi.Pointer __s, + ffi.Pointer __charset, + ) { + return _strspn( + __s, + __charset, + ); + } + + late final _strspnPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>>('strspn'); + late final _strspn = _strspnPtr + .asFunction, ffi.Pointer)>(); + + ffi.Pointer strstr( + ffi.Pointer __big, + ffi.Pointer __little, + ) { + return _strstr( + __big, + __little, + ); + } + + late final _strstrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strstr'); + late final _strstr = _strstrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer strtok( + ffi.Pointer __str, + ffi.Pointer __sep, + ) { + return _strtok( + __str, + __sep, + ); + } + + late final _strtokPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strtok'); + late final _strtok = _strtokPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + int strxfrm( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, + ) { + return _strxfrm( + __s1, + __s2, + __n, + ); + } + + late final _strxfrmPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strxfrm'); + late final _strxfrm = _strxfrmPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer strtok_r( + ffi.Pointer __str, + ffi.Pointer __sep, + ffi.Pointer> __lasts, + ) { + return _strtok_r( + __str, + __sep, + __lasts, + ); + } + + late final _strtok_rPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('strtok_r'); + late final _strtok_r = _strtok_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + int strerror_r( + int __errnum, + ffi.Pointer __strerrbuf, + int __buflen, + ) { + return _strerror_r( + __errnum, + __strerrbuf, + __buflen, + ); + } + + late final _strerror_rPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('strerror_r'); + late final _strerror_r = _strerror_rPtr + .asFunction, int)>(); + + ffi.Pointer strdup( + ffi.Pointer __s1, + ) { + return _strdup( + __s1, + ); + } + + late final _strdupPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('strdup'); + late final _strdup = _strdupPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer memccpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __c, + int __n, + ) { + return _memccpy( + __dst, + __src, + __c, + __n, + ); + } + + late final _memccpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int, ffi.Size)>>('memccpy'); + late final _memccpy = _memccpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, int)>(); + + ffi.Pointer stpcpy( + ffi.Pointer __dst, + ffi.Pointer __src, + ) { + return _stpcpy( + __dst, + __src, + ); + } + + late final _stpcpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('stpcpy'); + late final _stpcpy = _stpcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer stpncpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, + ) { + return _stpncpy( + __dst, + __src, + __n, + ); + } + + late final _stpncpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('stpncpy'); + late final _stpncpy = _stpncpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer strndup( + ffi.Pointer __s1, + int __n, + ) { + return _strndup( + __s1, + __n, + ); + } + + late final _strndupPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('strndup'); + late final _strndup = _strndupPtr + .asFunction Function(ffi.Pointer, int)>(); + + int strnlen( + ffi.Pointer __s1, + int __n, + ) { + return _strnlen( + __s1, + __n, + ); + } + + late final _strnlenPtr = _lookup< + ffi.NativeFunction< + ffi.Size Function(ffi.Pointer, ffi.Size)>>('strnlen'); + late final _strnlen = + _strnlenPtr.asFunction, int)>(); + + ffi.Pointer strsignal( + int __sig, + ) { + return _strsignal( + __sig, + ); + } + + late final _strsignalPtr = + _lookup Function(ffi.Int)>>( + 'strsignal'); + late final _strsignal = + _strsignalPtr.asFunction Function(int)>(); + + int memset_s( + ffi.Pointer __s, + int __smax, + int __c, + int __n, + ) { + return _memset_s( + __s, + __smax, + __c, + __n, + ); + } + + late final _memset_sPtr = _lookup< + ffi.NativeFunction< + errno_t Function( + ffi.Pointer, rsize_t, ffi.Int, rsize_t)>>('memset_s'); + late final _memset_s = _memset_sPtr + .asFunction, int, int, int)>(); + + ffi.Pointer memmem( + ffi.Pointer __big, + int __big_len, + ffi.Pointer __little, + int __little_len, + ) { + return _memmem( + __big, + __big_len, + __little, + __little_len, + ); + } + + late final _memmemPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Pointer, ffi.Size)>>('memmem'); + late final _memmem = _memmemPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer, int)>(); + + void memset_pattern4( + ffi.Pointer __b, + ffi.Pointer __pattern4, + int __len, + ) { + return _memset_pattern4( + __b, + __pattern4, + __len, + ); + } + + late final _memset_pattern4Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memset_pattern4'); + late final _memset_pattern4 = _memset_pattern4Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + void memset_pattern8( + ffi.Pointer __b, + ffi.Pointer __pattern8, + int __len, + ) { + return _memset_pattern8( + __b, + __pattern8, + __len, + ); + } + + late final _memset_pattern8Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memset_pattern8'); + late final _memset_pattern8 = _memset_pattern8Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + void memset_pattern16( + ffi.Pointer __b, + ffi.Pointer __pattern16, + int __len, + ) { + return _memset_pattern16( + __b, + __pattern16, + __len, + ); + } + + late final _memset_pattern16Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memset_pattern16'); + late final _memset_pattern16 = _memset_pattern16Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer strcasestr( + ffi.Pointer __big, + ffi.Pointer __little, + ) { + return _strcasestr( + __big, + __little, + ); + } + + late final _strcasestrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strcasestr'); + late final _strcasestr = _strcasestrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer strnstr( + ffi.Pointer __big, + ffi.Pointer __little, + int __len, + ) { + return _strnstr( + __big, + __little, + __len, + ); + } + + late final _strnstrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strnstr'); + late final _strnstr = _strnstrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + int strlcat( + ffi.Pointer __dst, + ffi.Pointer __source, + int __size, + ) { + return _strlcat( + __dst, + __source, + __size, + ); + } + + late final _strlcatPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strlcat'); + late final _strlcat = _strlcatPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + int strlcpy( + ffi.Pointer __dst, + ffi.Pointer __source, + int __size, + ) { + return _strlcpy( + __dst, + __source, + __size, + ); + } + + late final _strlcpyPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strlcpy'); + late final _strlcpy = _strlcpyPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + void strmode( + int __mode, + ffi.Pointer __bp, + ) { + return _strmode( + __mode, + __bp, + ); + } + + late final _strmodePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int, ffi.Pointer)>>('strmode'); + late final _strmode = + _strmodePtr.asFunction)>(); + + ffi.Pointer strsep( + ffi.Pointer> __stringp, + ffi.Pointer __delim, + ) { + return _strsep( + __stringp, + __delim, + ); + } + + late final _strsepPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer>, + ffi.Pointer)>>('strsep'); + late final _strsep = _strsepPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer>, ffi.Pointer)>(); + + void swab( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _swab( + arg0, + arg1, + arg2, + ); + } + + late final _swabPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ssize_t)>>('swab'); + late final _swab = _swabPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + int timingsafe_bcmp( + ffi.Pointer __b1, + ffi.Pointer __b2, + int __len, + ) { + return _timingsafe_bcmp( + __b1, + __b2, + __len, + ); + } + + late final _timingsafe_bcmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('timingsafe_bcmp'); + late final _timingsafe_bcmp = _timingsafe_bcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + int strsignal_r( + int __sig, + ffi.Pointer __strsignalbuf, + int __buflen, + ) { + return _strsignal_r( + __sig, + __strsignalbuf, + __buflen, + ); + } + + late final _strsignal_rPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('strsignal_r'); + late final _strsignal_r = _strsignal_rPtr + .asFunction, int)>(); + + int bcmp( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _bcmp( + arg0, + arg1, + arg2, + ); + } + + late final _bcmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Size)>>('bcmp'); + late final _bcmp = _bcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + void bcopy( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _bcopy( + arg0, + arg1, + arg2, + ); + } + + late final _bcopyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('bcopy'); + late final _bcopy = _bcopyPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + void bzero( + ffi.Pointer arg0, + int arg1, + ) { + return _bzero( + arg0, + arg1, + ); + } + + late final _bzeroPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Size)>>('bzero'); + late final _bzero = + _bzeroPtr.asFunction, int)>(); + + ffi.Pointer index( + ffi.Pointer arg0, + int arg1, + ) { + return _index( + arg0, + arg1, + ); + } + + late final _indexPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('index'); + late final _index = _indexPtr + .asFunction Function(ffi.Pointer, int)>(); + + ffi.Pointer rindex( + ffi.Pointer arg0, + int arg1, + ) { + return _rindex( + arg0, + arg1, + ); + } + + late final _rindexPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('rindex'); + late final _rindex = _rindexPtr + .asFunction Function(ffi.Pointer, int)>(); + + int ffs( + int arg0, + ) { + return _ffs( + arg0, + ); + } + + late final _ffsPtr = + _lookup>('ffs'); + late final _ffs = _ffsPtr.asFunction(); + + int strcasecmp( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _strcasecmp( + arg0, + arg1, + ); + } + + late final _strcasecmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcasecmp'); + late final _strcasecmp = _strcasecmpPtr + .asFunction, ffi.Pointer)>(); + + int strncasecmp( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _strncasecmp( + arg0, + arg1, + arg2, + ); + } + + late final _strncasecmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('strncasecmp'); + late final _strncasecmp = _strncasecmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + int ffsl( + int arg0, + ) { + return _ffsl( + arg0, + ); + } + + late final _ffslPtr = + _lookup>('ffsl'); + late final _ffsl = _ffslPtr.asFunction(); + + int ffsll( + int arg0, + ) { + return _ffsll( + arg0, + ); + } + + late final _ffsllPtr = + _lookup>('ffsll'); + late final _ffsll = _ffsllPtr.asFunction(); + + int fls( + int arg0, + ) { + return _fls( + arg0, + ); + } + + late final _flsPtr = + _lookup>('fls'); + late final _fls = _flsPtr.asFunction(); + + int flsl( + int arg0, + ) { + return _flsl( + arg0, + ); + } + + late final _flslPtr = + _lookup>('flsl'); + late final _flsl = _flslPtr.asFunction(); + + int flsll( + int arg0, + ) { + return _flsll( + arg0, + ); + } + + late final _flsllPtr = + _lookup>('flsll'); + late final _flsll = _flsllPtr.asFunction(); + + late final ffi.Pointer>> _tzname = + _lookup>>('tzname'); + + ffi.Pointer> get tzname => _tzname.value; + + set tzname(ffi.Pointer> value) => _tzname.value = value; + + late final ffi.Pointer _getdate_err = + _lookup('getdate_err'); + + int get getdate_err => _getdate_err.value; + + set getdate_err(int value) => _getdate_err.value = value; + + late final ffi.Pointer _timezone = _lookup('timezone'); + + int get timezone => _timezone.value; + + set timezone(int value) => _timezone.value = value; + + late final ffi.Pointer _daylight = _lookup('daylight'); + + int get daylight => _daylight.value; + + set daylight(int value) => _daylight.value = value; + + ffi.Pointer asctime( + ffi.Pointer arg0, + ) { + return _asctime( + arg0, + ); + } + + late final _asctimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'asctime'); + late final _asctime = + _asctimePtr.asFunction Function(ffi.Pointer)>(); + + int clock() { + return _clock(); + } + + late final _clockPtr = + _lookup>('clock'); + late final _clock = _clockPtr.asFunction(); + + ffi.Pointer ctime( + ffi.Pointer arg0, + ) { + return _ctime( + arg0, + ); + } + + late final _ctimePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('ctime'); + late final _ctime = _ctimePtr + .asFunction Function(ffi.Pointer)>(); + + double difftime( + int arg0, + int arg1, + ) { + return _difftime( + arg0, + arg1, + ); + } + + late final _difftimePtr = + _lookup>( + 'difftime'); + late final _difftime = _difftimePtr.asFunction(); + + ffi.Pointer getdate( + ffi.Pointer arg0, + ) { + return _getdate( + arg0, + ); + } + + late final _getdatePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'getdate'); + late final _getdate = + _getdatePtr.asFunction Function(ffi.Pointer)>(); + + ffi.Pointer gmtime( + ffi.Pointer arg0, + ) { + return _gmtime( + arg0, + ); + } + + late final _gmtimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'gmtime'); + late final _gmtime = + _gmtimePtr.asFunction Function(ffi.Pointer)>(); + + ffi.Pointer localtime( + ffi.Pointer arg0, + ) { + return _localtime( + arg0, + ); + } + + late final _localtimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'localtime'); + late final _localtime = + _localtimePtr.asFunction Function(ffi.Pointer)>(); + + int mktime( + ffi.Pointer arg0, + ) { + return _mktime( + arg0, + ); + } + + late final _mktimePtr = + _lookup)>>('mktime'); + late final _mktime = _mktimePtr.asFunction)>(); + + int strftime( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + return _strftime( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _strftimePtr = _lookup< + ffi.NativeFunction< + ffi.Size Function(ffi.Pointer, ffi.Size, + ffi.Pointer, ffi.Pointer)>>('strftime'); + late final _strftime = _strftimePtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); + + ffi.Pointer strptime( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _strptime( + arg0, + arg1, + arg2, + ); + } + + late final _strptimePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('strptime'); + late final _strptime = _strptimePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + + int time( + ffi.Pointer arg0, + ) { + return _time( + arg0, + ); + } + + late final _timePtr = + _lookup)>>('time'); + late final _time = _timePtr.asFunction)>(); + + void tzset() { + return _tzset(); + } + + late final _tzsetPtr = + _lookup>('tzset'); + late final _tzset = _tzsetPtr.asFunction(); + + ffi.Pointer asctime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _asctime_r( + arg0, + arg1, + ); + } + + late final _asctime_rPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('asctime_r'); + late final _asctime_r = _asctime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer ctime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _ctime_r( + arg0, + arg1, + ); + } + + late final _ctime_rPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('ctime_r'); + late final _ctime_r = _ctime_rPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer gmtime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _gmtime_r( + arg0, + arg1, + ); + } + + late final _gmtime_rPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('gmtime_r'); + late final _gmtime_r = _gmtime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer localtime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _localtime_r( + arg0, + arg1, + ); + } + + late final _localtime_rPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('localtime_r'); + late final _localtime_r = _localtime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); + + int posix2time( + int arg0, + ) { + return _posix2time( + arg0, + ); + } + + late final _posix2timePtr = + _lookup>('posix2time'); + late final _posix2time = _posix2timePtr.asFunction(); + + void tzsetwall() { + return _tzsetwall(); + } + + late final _tzsetwallPtr = + _lookup>('tzsetwall'); + late final _tzsetwall = _tzsetwallPtr.asFunction(); + + int time2posix( + int arg0, + ) { + return _time2posix( + arg0, + ); + } + + late final _time2posixPtr = + _lookup>('time2posix'); + late final _time2posix = _time2posixPtr.asFunction(); + + int timelocal( + ffi.Pointer arg0, + ) { + return _timelocal( + arg0, + ); + } + + late final _timelocalPtr = + _lookup)>>( + 'timelocal'); + late final _timelocal = + _timelocalPtr.asFunction)>(); + + int timegm( + ffi.Pointer arg0, + ) { + return _timegm( + arg0, + ); + } + + late final _timegmPtr = + _lookup)>>('timegm'); + late final _timegm = _timegmPtr.asFunction)>(); + + int nanosleep( + ffi.Pointer __rqtp, + ffi.Pointer __rmtp, + ) { + return _nanosleep( + __rqtp, + __rmtp, + ); + } + + late final _nanosleepPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('nanosleep'); + late final _nanosleep = _nanosleepPtr + .asFunction, ffi.Pointer)>(); + + int clock_getres( + int __clock_id, + ffi.Pointer __res, + ) { + return _clock_getres( + __clock_id, + __res, + ); + } + + late final _clock_getresPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_getres'); + late final _clock_getres = + _clock_getresPtr.asFunction)>(); + + int clock_gettime( + int __clock_id, + ffi.Pointer __tp, + ) { + return _clock_gettime( + __clock_id, + __tp, + ); + } + + late final _clock_gettimePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_gettime'); + late final _clock_gettime = + _clock_gettimePtr.asFunction)>(); + + int clock_gettime_nsec_np( + int __clock_id, + ) { + return _clock_gettime_nsec_np( + __clock_id, + ); + } + + late final _clock_gettime_nsec_npPtr = + _lookup>( + 'clock_gettime_nsec_np'); + late final _clock_gettime_nsec_np = + _clock_gettime_nsec_npPtr.asFunction(); + + int clock_settime( + int __clock_id, + ffi.Pointer __tp, + ) { + return _clock_settime( + __clock_id, + __tp, + ); + } + + late final _clock_settimePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_settime'); + late final _clock_settime = + _clock_settimePtr.asFunction)>(); + + int timespec_get( + ffi.Pointer ts, + int base, + ) { + return _timespec_get( + ts, + base, + ); + } + + late final _timespec_getPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'timespec_get'); + late final _timespec_get = + _timespec_getPtr.asFunction, int)>(); + + int imaxabs( + int j, + ) { + return _imaxabs( + j, + ); + } + + late final _imaxabsPtr = + _lookup>('imaxabs'); + late final _imaxabs = _imaxabsPtr.asFunction(); + + imaxdiv_t imaxdiv( + int __numer, + int __denom, + ) { + return _imaxdiv( + __numer, + __denom, + ); + } + + late final _imaxdivPtr = + _lookup>( + 'imaxdiv'); + late final _imaxdiv = _imaxdivPtr.asFunction(); + + int strtoimax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoimax( + __nptr, + __endptr, + __base, + ); + } + + late final _strtoimaxPtr = _lookup< + ffi.NativeFunction< + intmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoimax'); + late final _strtoimax = _strtoimaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int strtoumax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoumax( + __nptr, + __endptr, + __base, + ); + } + + late final _strtoumaxPtr = _lookup< + ffi.NativeFunction< + uintmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoumax'); + late final _strtoumax = _strtoumaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int wcstoimax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, + ) { + return _wcstoimax( + __nptr, + __endptr, + __base, + ); + } + + late final _wcstoimaxPtr = _lookup< + ffi.NativeFunction< + intmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('wcstoimax'); + late final _wcstoimax = _wcstoimaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int wcstoumax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, + ) { + return _wcstoumax( + __nptr, + __endptr, + __base, + ); + } + + late final _wcstoumaxPtr = _lookup< + ffi.NativeFunction< + uintmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('wcstoumax'); + late final _wcstoumax = _wcstoumaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + late final ffi.Pointer _kCFTypeBagCallBacks = + _lookup('kCFTypeBagCallBacks'); + + CFBagCallBacks get kCFTypeBagCallBacks => _kCFTypeBagCallBacks.ref; + + late final ffi.Pointer _kCFCopyStringBagCallBacks = + _lookup('kCFCopyStringBagCallBacks'); + + CFBagCallBacks get kCFCopyStringBagCallBacks => + _kCFCopyStringBagCallBacks.ref; + + int CFBagGetTypeID() { + return _CFBagGetTypeID(); + } + + late final _CFBagGetTypeIDPtr = + _lookup>('CFBagGetTypeID'); + late final _CFBagGetTypeID = _CFBagGetTypeIDPtr.asFunction(); + + CFBagRef CFBagCreate( + CFAllocatorRef allocator, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, + ) { + return _CFBagCreate( + allocator, + values, + numValues, + callBacks, + ); + } + + late final _CFBagCreatePtr = _lookup< + ffi.NativeFunction< + CFBagRef Function(CFAllocatorRef, ffi.Pointer>, + CFIndex, ffi.Pointer)>>('CFBagCreate'); + late final _CFBagCreate = _CFBagCreatePtr.asFunction< + CFBagRef Function(CFAllocatorRef, ffi.Pointer>, int, + ffi.Pointer)>(); + + CFBagRef CFBagCreateCopy( + CFAllocatorRef allocator, + CFBagRef theBag, + ) { + return _CFBagCreateCopy( + allocator, + theBag, + ); + } + + late final _CFBagCreateCopyPtr = + _lookup>( + 'CFBagCreateCopy'); + late final _CFBagCreateCopy = _CFBagCreateCopyPtr.asFunction< + CFBagRef Function(CFAllocatorRef, CFBagRef)>(); + + CFMutableBagRef CFBagCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, + ) { + return _CFBagCreateMutable( + allocator, + capacity, + callBacks, + ); + } + + late final _CFBagCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableBagRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFBagCreateMutable'); + late final _CFBagCreateMutable = _CFBagCreateMutablePtr.asFunction< + CFMutableBagRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); + + CFMutableBagRef CFBagCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFBagRef theBag, + ) { + return _CFBagCreateMutableCopy( + allocator, + capacity, + theBag, + ); + } + + late final _CFBagCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableBagRef Function( + CFAllocatorRef, CFIndex, CFBagRef)>>('CFBagCreateMutableCopy'); + late final _CFBagCreateMutableCopy = _CFBagCreateMutableCopyPtr.asFunction< + CFMutableBagRef Function(CFAllocatorRef, int, CFBagRef)>(); + + int CFBagGetCount( + CFBagRef theBag, + ) { + return _CFBagGetCount( + theBag, + ); + } + + late final _CFBagGetCountPtr = + _lookup>('CFBagGetCount'); + late final _CFBagGetCount = + _CFBagGetCountPtr.asFunction(); + + int CFBagGetCountOfValue( + CFBagRef theBag, + ffi.Pointer value, + ) { + return _CFBagGetCountOfValue( + theBag, + value, + ); + } + + late final _CFBagGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFBagRef, ffi.Pointer)>>('CFBagGetCountOfValue'); + late final _CFBagGetCountOfValue = _CFBagGetCountOfValuePtr.asFunction< + int Function(CFBagRef, ffi.Pointer)>(); + + int CFBagContainsValue( + CFBagRef theBag, + ffi.Pointer value, + ) { + return _CFBagContainsValue( + theBag, + value, + ); + } + + late final _CFBagContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFBagRef, ffi.Pointer)>>('CFBagContainsValue'); + late final _CFBagContainsValue = _CFBagContainsValuePtr.asFunction< + int Function(CFBagRef, ffi.Pointer)>(); + + ffi.Pointer CFBagGetValue( + CFBagRef theBag, + ffi.Pointer value, + ) { + return _CFBagGetValue( + theBag, + value, + ); + } + + late final _CFBagGetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFBagRef, ffi.Pointer)>>('CFBagGetValue'); + late final _CFBagGetValue = _CFBagGetValuePtr.asFunction< + ffi.Pointer Function(CFBagRef, ffi.Pointer)>(); + + int CFBagGetValueIfPresent( + CFBagRef theBag, + ffi.Pointer candidate, + ffi.Pointer> value, + ) { + return _CFBagGetValueIfPresent( + theBag, + candidate, + value, + ); + } + + late final _CFBagGetValueIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBagRef, ffi.Pointer, + ffi.Pointer>)>>('CFBagGetValueIfPresent'); + late final _CFBagGetValueIfPresent = _CFBagGetValueIfPresentPtr.asFunction< + int Function(CFBagRef, ffi.Pointer, + ffi.Pointer>)>(); + + void CFBagGetValues( + CFBagRef theBag, + ffi.Pointer> values, + ) { + return _CFBagGetValues( + theBag, + values, + ); + } + + late final _CFBagGetValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFBagRef, ffi.Pointer>)>>('CFBagGetValues'); + late final _CFBagGetValues = _CFBagGetValuesPtr.asFunction< + void Function(CFBagRef, ffi.Pointer>)>(); + + void CFBagApplyFunction( + CFBagRef theBag, + CFBagApplierFunction applier, + ffi.Pointer context, + ) { + return _CFBagApplyFunction( + theBag, + applier, + context, + ); + } + + late final _CFBagApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBagRef, CFBagApplierFunction, + ffi.Pointer)>>('CFBagApplyFunction'); + late final _CFBagApplyFunction = _CFBagApplyFunctionPtr.asFunction< + void Function(CFBagRef, CFBagApplierFunction, ffi.Pointer)>(); + + void CFBagAddValue( + CFMutableBagRef theBag, + ffi.Pointer value, + ) { + return _CFBagAddValue( + theBag, + value, + ); + } + + late final _CFBagAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagAddValue'); + late final _CFBagAddValue = _CFBagAddValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); + + void CFBagReplaceValue( + CFMutableBagRef theBag, + ffi.Pointer value, + ) { + return _CFBagReplaceValue( + theBag, + value, + ); + } + + late final _CFBagReplaceValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagReplaceValue'); + late final _CFBagReplaceValue = _CFBagReplaceValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); + + void CFBagSetValue( + CFMutableBagRef theBag, + ffi.Pointer value, + ) { + return _CFBagSetValue( + theBag, + value, + ); + } + + late final _CFBagSetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagSetValue'); + late final _CFBagSetValue = _CFBagSetValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); + + void CFBagRemoveValue( + CFMutableBagRef theBag, + ffi.Pointer value, + ) { + return _CFBagRemoveValue( + theBag, + value, + ); + } + + late final _CFBagRemoveValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagRemoveValue'); + late final _CFBagRemoveValue = _CFBagRemoveValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); + + void CFBagRemoveAllValues( + CFMutableBagRef theBag, + ) { + return _CFBagRemoveAllValues( + theBag, + ); + } + + late final _CFBagRemoveAllValuesPtr = + _lookup>( + 'CFBagRemoveAllValues'); + late final _CFBagRemoveAllValues = + _CFBagRemoveAllValuesPtr.asFunction(); + + late final ffi.Pointer _kCFStringBinaryHeapCallBacks = + _lookup('kCFStringBinaryHeapCallBacks'); + + CFBinaryHeapCallBacks get kCFStringBinaryHeapCallBacks => + _kCFStringBinaryHeapCallBacks.ref; + + int CFBinaryHeapGetTypeID() { + return _CFBinaryHeapGetTypeID(); + } + + late final _CFBinaryHeapGetTypeIDPtr = + _lookup>('CFBinaryHeapGetTypeID'); + late final _CFBinaryHeapGetTypeID = + _CFBinaryHeapGetTypeIDPtr.asFunction(); + + CFBinaryHeapRef CFBinaryHeapCreate( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, + ffi.Pointer compareContext, + ) { + return _CFBinaryHeapCreate( + allocator, + capacity, + callBacks, + compareContext, + ); + } + + late final _CFBinaryHeapCreatePtr = _lookup< + ffi.NativeFunction< + CFBinaryHeapRef Function( + CFAllocatorRef, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFBinaryHeapCreate'); + late final _CFBinaryHeapCreate = _CFBinaryHeapCreatePtr.asFunction< + CFBinaryHeapRef Function( + CFAllocatorRef, + int, + ffi.Pointer, + ffi.Pointer)>(); + + CFBinaryHeapRef CFBinaryHeapCreateCopy( + CFAllocatorRef allocator, + int capacity, + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapCreateCopy( + allocator, + capacity, + heap, + ); + } + + late final _CFBinaryHeapCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFBinaryHeapRef Function(CFAllocatorRef, CFIndex, + CFBinaryHeapRef)>>('CFBinaryHeapCreateCopy'); + late final _CFBinaryHeapCreateCopy = _CFBinaryHeapCreateCopyPtr.asFunction< + CFBinaryHeapRef Function(CFAllocatorRef, int, CFBinaryHeapRef)>(); + + int CFBinaryHeapGetCount( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapGetCount( + heap, + ); + } + + late final _CFBinaryHeapGetCountPtr = + _lookup>( + 'CFBinaryHeapGetCount'); + late final _CFBinaryHeapGetCount = + _CFBinaryHeapGetCountPtr.asFunction(); + + int CFBinaryHeapGetCountOfValue( + CFBinaryHeapRef heap, + ffi.Pointer value, + ) { + return _CFBinaryHeapGetCountOfValue( + heap, + value, + ); + } + + late final _CFBinaryHeapGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFBinaryHeapRef, + ffi.Pointer)>>('CFBinaryHeapGetCountOfValue'); + late final _CFBinaryHeapGetCountOfValue = _CFBinaryHeapGetCountOfValuePtr + .asFunction)>(); + + int CFBinaryHeapContainsValue( + CFBinaryHeapRef heap, + ffi.Pointer value, + ) { + return _CFBinaryHeapContainsValue( + heap, + value, + ); + } + + late final _CFBinaryHeapContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBinaryHeapRef, + ffi.Pointer)>>('CFBinaryHeapContainsValue'); + late final _CFBinaryHeapContainsValue = _CFBinaryHeapContainsValuePtr + .asFunction)>(); + + ffi.Pointer CFBinaryHeapGetMinimum( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapGetMinimum( + heap, + ); + } + + late final _CFBinaryHeapGetMinimumPtr = _lookup< + ffi.NativeFunction Function(CFBinaryHeapRef)>>( + 'CFBinaryHeapGetMinimum'); + late final _CFBinaryHeapGetMinimum = _CFBinaryHeapGetMinimumPtr.asFunction< + ffi.Pointer Function(CFBinaryHeapRef)>(); + + int CFBinaryHeapGetMinimumIfPresent( + CFBinaryHeapRef heap, + ffi.Pointer> value, + ) { + return _CFBinaryHeapGetMinimumIfPresent( + heap, + value, + ); + } + + late final _CFBinaryHeapGetMinimumIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFBinaryHeapRef, ffi.Pointer>)>>( + 'CFBinaryHeapGetMinimumIfPresent'); + late final _CFBinaryHeapGetMinimumIfPresent = + _CFBinaryHeapGetMinimumIfPresentPtr.asFunction< + int Function(CFBinaryHeapRef, ffi.Pointer>)>(); + + void CFBinaryHeapGetValues( + CFBinaryHeapRef heap, + ffi.Pointer> values, + ) { + return _CFBinaryHeapGetValues( + heap, + values, + ); + } + + late final _CFBinaryHeapGetValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBinaryHeapRef, + ffi.Pointer>)>>('CFBinaryHeapGetValues'); + late final _CFBinaryHeapGetValues = _CFBinaryHeapGetValuesPtr.asFunction< + void Function(CFBinaryHeapRef, ffi.Pointer>)>(); + + void CFBinaryHeapApplyFunction( + CFBinaryHeapRef heap, + CFBinaryHeapApplierFunction applier, + ffi.Pointer context, + ) { + return _CFBinaryHeapApplyFunction( + heap, + applier, + context, + ); + } + + late final _CFBinaryHeapApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, + ffi.Pointer)>>('CFBinaryHeapApplyFunction'); + late final _CFBinaryHeapApplyFunction = + _CFBinaryHeapApplyFunctionPtr.asFunction< + void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, + ffi.Pointer)>(); + + void CFBinaryHeapAddValue( + CFBinaryHeapRef heap, + ffi.Pointer value, + ) { + return _CFBinaryHeapAddValue( + heap, + value, + ); + } + + late final _CFBinaryHeapAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFBinaryHeapRef, ffi.Pointer)>>('CFBinaryHeapAddValue'); + late final _CFBinaryHeapAddValue = _CFBinaryHeapAddValuePtr.asFunction< + void Function(CFBinaryHeapRef, ffi.Pointer)>(); + + void CFBinaryHeapRemoveMinimumValue( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapRemoveMinimumValue( + heap, + ); + } + + late final _CFBinaryHeapRemoveMinimumValuePtr = + _lookup>( + 'CFBinaryHeapRemoveMinimumValue'); + late final _CFBinaryHeapRemoveMinimumValue = + _CFBinaryHeapRemoveMinimumValuePtr.asFunction< + void Function(CFBinaryHeapRef)>(); + + void CFBinaryHeapRemoveAllValues( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapRemoveAllValues( + heap, + ); + } + + late final _CFBinaryHeapRemoveAllValuesPtr = + _lookup>( + 'CFBinaryHeapRemoveAllValues'); + late final _CFBinaryHeapRemoveAllValues = _CFBinaryHeapRemoveAllValuesPtr + .asFunction(); + + int CFBitVectorGetTypeID() { + return _CFBitVectorGetTypeID(); + } + + late final _CFBitVectorGetTypeIDPtr = + _lookup>('CFBitVectorGetTypeID'); + late final _CFBitVectorGetTypeID = + _CFBitVectorGetTypeIDPtr.asFunction(); + + CFBitVectorRef CFBitVectorCreate( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int numBits, + ) { + return _CFBitVectorCreate( + allocator, + bytes, + numBits, + ); + } + + late final _CFBitVectorCreatePtr = _lookup< + ffi.NativeFunction< + CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFBitVectorCreate'); + late final _CFBitVectorCreate = _CFBitVectorCreatePtr.asFunction< + CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + + CFBitVectorRef CFBitVectorCreateCopy( + CFAllocatorRef allocator, + CFBitVectorRef bv, + ) { + return _CFBitVectorCreateCopy( + allocator, + bv, + ); + } + + late final _CFBitVectorCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFBitVectorRef Function( + CFAllocatorRef, CFBitVectorRef)>>('CFBitVectorCreateCopy'); + late final _CFBitVectorCreateCopy = _CFBitVectorCreateCopyPtr.asFunction< + CFBitVectorRef Function(CFAllocatorRef, CFBitVectorRef)>(); + + CFMutableBitVectorRef CFBitVectorCreateMutable( + CFAllocatorRef allocator, + int capacity, + ) { + return _CFBitVectorCreateMutable( + allocator, + capacity, + ); + } + + late final _CFBitVectorCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableBitVectorRef Function( + CFAllocatorRef, CFIndex)>>('CFBitVectorCreateMutable'); + late final _CFBitVectorCreateMutable = _CFBitVectorCreateMutablePtr + .asFunction(); + + CFMutableBitVectorRef CFBitVectorCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFBitVectorRef bv, + ) { + return _CFBitVectorCreateMutableCopy( + allocator, + capacity, + bv, + ); + } + + late final _CFBitVectorCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableBitVectorRef Function(CFAllocatorRef, CFIndex, + CFBitVectorRef)>>('CFBitVectorCreateMutableCopy'); + late final _CFBitVectorCreateMutableCopy = + _CFBitVectorCreateMutableCopyPtr.asFunction< + CFMutableBitVectorRef Function( + CFAllocatorRef, int, CFBitVectorRef)>(); + + int CFBitVectorGetCount( + CFBitVectorRef bv, + ) { + return _CFBitVectorGetCount( + bv, + ); + } + + late final _CFBitVectorGetCountPtr = + _lookup>( + 'CFBitVectorGetCount'); + late final _CFBitVectorGetCount = + _CFBitVectorGetCountPtr.asFunction(); + + int CFBitVectorGetCountOfBit( + CFBitVectorRef bv, + CFRange range, + int value, + ) { + return _CFBitVectorGetCountOfBit( + bv, + range, + value, + ); + } + + late final _CFBitVectorGetCountOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetCountOfBit'); + late final _CFBitVectorGetCountOfBit = _CFBitVectorGetCountOfBitPtr + .asFunction(); + + int CFBitVectorContainsBit( + CFBitVectorRef bv, + CFRange range, + int value, + ) { + return _CFBitVectorContainsBit( + bv, + range, + value, + ); + } + + late final _CFBitVectorContainsBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorContainsBit'); + late final _CFBitVectorContainsBit = _CFBitVectorContainsBitPtr.asFunction< + int Function(CFBitVectorRef, CFRange, int)>(); + + int CFBitVectorGetBitAtIndex( + CFBitVectorRef bv, + int idx, + ) { + return _CFBitVectorGetBitAtIndex( + bv, + idx, + ); + } + + late final _CFBitVectorGetBitAtIndexPtr = + _lookup>( + 'CFBitVectorGetBitAtIndex'); + late final _CFBitVectorGetBitAtIndex = _CFBitVectorGetBitAtIndexPtr + .asFunction(); + + void CFBitVectorGetBits( + CFBitVectorRef bv, + CFRange range, + ffi.Pointer bytes, + ) { + return _CFBitVectorGetBits( + bv, + range, + bytes, + ); + } + + late final _CFBitVectorGetBitsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBitVectorRef, CFRange, + ffi.Pointer)>>('CFBitVectorGetBits'); + late final _CFBitVectorGetBits = _CFBitVectorGetBitsPtr.asFunction< + void Function(CFBitVectorRef, CFRange, ffi.Pointer)>(); + + int CFBitVectorGetFirstIndexOfBit( + CFBitVectorRef bv, + CFRange range, + int value, + ) { + return _CFBitVectorGetFirstIndexOfBit( + bv, + range, + value, + ); + } + + late final _CFBitVectorGetFirstIndexOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetFirstIndexOfBit'); + late final _CFBitVectorGetFirstIndexOfBit = _CFBitVectorGetFirstIndexOfBitPtr + .asFunction(); + + int CFBitVectorGetLastIndexOfBit( + CFBitVectorRef bv, + CFRange range, + int value, + ) { + return _CFBitVectorGetLastIndexOfBit( + bv, + range, + value, + ); + } + + late final _CFBitVectorGetLastIndexOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetLastIndexOfBit'); + late final _CFBitVectorGetLastIndexOfBit = _CFBitVectorGetLastIndexOfBitPtr + .asFunction(); + + void CFBitVectorSetCount( + CFMutableBitVectorRef bv, + int count, + ) { + return _CFBitVectorSetCount( + bv, + count, + ); + } + + late final _CFBitVectorSetCountPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBitVectorRef, CFIndex)>>('CFBitVectorSetCount'); + late final _CFBitVectorSetCount = _CFBitVectorSetCountPtr.asFunction< + void Function(CFMutableBitVectorRef, int)>(); + + void CFBitVectorFlipBitAtIndex( + CFMutableBitVectorRef bv, + int idx, + ) { + return _CFBitVectorFlipBitAtIndex( + bv, + idx, + ); + } + + late final _CFBitVectorFlipBitAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBitVectorRef, CFIndex)>>('CFBitVectorFlipBitAtIndex'); + late final _CFBitVectorFlipBitAtIndex = _CFBitVectorFlipBitAtIndexPtr + .asFunction(); + + void CFBitVectorFlipBits( + CFMutableBitVectorRef bv, + CFRange range, + ) { + return _CFBitVectorFlipBits( + bv, + range, + ); + } + + late final _CFBitVectorFlipBitsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBitVectorRef, CFRange)>>('CFBitVectorFlipBits'); + late final _CFBitVectorFlipBits = _CFBitVectorFlipBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, CFRange)>(); + + void CFBitVectorSetBitAtIndex( + CFMutableBitVectorRef bv, + int idx, + int value, + ) { + return _CFBitVectorSetBitAtIndex( + bv, + idx, + value, + ); + } + + late final _CFBitVectorSetBitAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableBitVectorRef, CFIndex, + CFBit)>>('CFBitVectorSetBitAtIndex'); + late final _CFBitVectorSetBitAtIndex = _CFBitVectorSetBitAtIndexPtr + .asFunction(); + + void CFBitVectorSetBits( + CFMutableBitVectorRef bv, + CFRange range, + int value, + ) { + return _CFBitVectorSetBits( + bv, + range, + value, + ); + } + + late final _CFBitVectorSetBitsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBitVectorRef, CFRange, CFBit)>>('CFBitVectorSetBits'); + late final _CFBitVectorSetBits = _CFBitVectorSetBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, CFRange, int)>(); + + void CFBitVectorSetAllBits( + CFMutableBitVectorRef bv, + int value, + ) { + return _CFBitVectorSetAllBits( + bv, + value, + ); + } + + late final _CFBitVectorSetAllBitsPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorSetAllBits'); + late final _CFBitVectorSetAllBits = _CFBitVectorSetAllBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, int)>(); + + late final ffi.Pointer + _kCFTypeDictionaryKeyCallBacks = + _lookup('kCFTypeDictionaryKeyCallBacks'); + + CFDictionaryKeyCallBacks get kCFTypeDictionaryKeyCallBacks => + _kCFTypeDictionaryKeyCallBacks.ref; + + late final ffi.Pointer + _kCFCopyStringDictionaryKeyCallBacks = + _lookup('kCFCopyStringDictionaryKeyCallBacks'); + + CFDictionaryKeyCallBacks get kCFCopyStringDictionaryKeyCallBacks => + _kCFCopyStringDictionaryKeyCallBacks.ref; + + late final ffi.Pointer + _kCFTypeDictionaryValueCallBacks = + _lookup('kCFTypeDictionaryValueCallBacks'); + + CFDictionaryValueCallBacks get kCFTypeDictionaryValueCallBacks => + _kCFTypeDictionaryValueCallBacks.ref; + + int CFDictionaryGetTypeID() { + return _CFDictionaryGetTypeID(); + } + + late final _CFDictionaryGetTypeIDPtr = + _lookup>('CFDictionaryGetTypeID'); + late final _CFDictionaryGetTypeID = + _CFDictionaryGetTypeIDPtr.asFunction(); + + CFDictionaryRef CFDictionaryCreate( + CFAllocatorRef allocator, + ffi.Pointer> keys, + ffi.Pointer> values, + int numValues, + ffi.Pointer keyCallBacks, + ffi.Pointer valueCallBacks, + ) { + return _CFDictionaryCreate( + allocator, + keys, + values, + numValues, + keyCallBacks, + valueCallBacks, + ); + } + + late final _CFDictionaryCreatePtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function( + CFAllocatorRef, + ffi.Pointer>, + ffi.Pointer>, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFDictionaryCreate'); + late final _CFDictionaryCreate = _CFDictionaryCreatePtr.asFunction< + CFDictionaryRef Function( + CFAllocatorRef, + ffi.Pointer>, + ffi.Pointer>, + int, + ffi.Pointer, + ffi.Pointer)>(); + + CFDictionaryRef CFDictionaryCreateCopy( + CFAllocatorRef allocator, + CFDictionaryRef theDict, + ) { + return _CFDictionaryCreateCopy( + allocator, + theDict, + ); + } + + late final _CFDictionaryCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function( + CFAllocatorRef, CFDictionaryRef)>>('CFDictionaryCreateCopy'); + late final _CFDictionaryCreateCopy = _CFDictionaryCreateCopyPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFDictionaryRef)>(); + + CFMutableDictionaryRef CFDictionaryCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer keyCallBacks, + ffi.Pointer valueCallBacks, + ) { + return _CFDictionaryCreateMutable( + allocator, + capacity, + keyCallBacks, + valueCallBacks, + ); + } + + late final _CFDictionaryCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>( + 'CFDictionaryCreateMutable'); + late final _CFDictionaryCreateMutable = + _CFDictionaryCreateMutablePtr.asFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, + int, + ffi.Pointer, + ffi.Pointer)>(); + + CFMutableDictionaryRef CFDictionaryCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFDictionaryRef theDict, + ) { + return _CFDictionaryCreateMutableCopy( + allocator, + capacity, + theDict, + ); + } + + late final _CFDictionaryCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableDictionaryRef Function(CFAllocatorRef, CFIndex, + CFDictionaryRef)>>('CFDictionaryCreateMutableCopy'); + late final _CFDictionaryCreateMutableCopy = + _CFDictionaryCreateMutableCopyPtr.asFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, int, CFDictionaryRef)>(); + + int CFDictionaryGetCount( + CFDictionaryRef theDict, + ) { + return _CFDictionaryGetCount( + theDict, + ); + } + + late final _CFDictionaryGetCountPtr = + _lookup>( + 'CFDictionaryGetCount'); + late final _CFDictionaryGetCount = + _CFDictionaryGetCountPtr.asFunction(); + + int CFDictionaryGetCountOfKey( + CFDictionaryRef theDict, + ffi.Pointer key, + ) { + return _CFDictionaryGetCountOfKey( + theDict, + key, + ); + } + + late final _CFDictionaryGetCountOfKeyPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryGetCountOfKey'); + late final _CFDictionaryGetCountOfKey = _CFDictionaryGetCountOfKeyPtr + .asFunction)>(); + + int CFDictionaryGetCountOfValue( + CFDictionaryRef theDict, + ffi.Pointer value, + ) { + return _CFDictionaryGetCountOfValue( + theDict, + value, + ); + } + + late final _CFDictionaryGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryGetCountOfValue'); + late final _CFDictionaryGetCountOfValue = _CFDictionaryGetCountOfValuePtr + .asFunction)>(); + + int CFDictionaryContainsKey( + CFDictionaryRef theDict, + ffi.Pointer key, + ) { + return _CFDictionaryContainsKey( + theDict, + key, + ); + } + + late final _CFDictionaryContainsKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryContainsKey'); + late final _CFDictionaryContainsKey = _CFDictionaryContainsKeyPtr.asFunction< + int Function(CFDictionaryRef, ffi.Pointer)>(); + + int CFDictionaryContainsValue( + CFDictionaryRef theDict, + ffi.Pointer value, + ) { + return _CFDictionaryContainsValue( + theDict, + value, + ); + } + + late final _CFDictionaryContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryContainsValue'); + late final _CFDictionaryContainsValue = _CFDictionaryContainsValuePtr + .asFunction)>(); + + ffi.Pointer CFDictionaryGetValue( + CFDictionaryRef theDict, + ffi.Pointer key, + ) { + return _CFDictionaryGetValue( + theDict, + key, + ); + } + + late final _CFDictionaryGetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFDictionaryRef, ffi.Pointer)>>('CFDictionaryGetValue'); + late final _CFDictionaryGetValue = _CFDictionaryGetValuePtr.asFunction< + ffi.Pointer Function(CFDictionaryRef, ffi.Pointer)>(); + + int CFDictionaryGetValueIfPresent( + CFDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer> value, + ) { + return _CFDictionaryGetValueIfPresent( + theDict, + key, + value, + ); + } + + late final _CFDictionaryGetValueIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDictionaryRef, ffi.Pointer, + ffi.Pointer>)>>( + 'CFDictionaryGetValueIfPresent'); + late final _CFDictionaryGetValueIfPresent = + _CFDictionaryGetValueIfPresentPtr.asFunction< + int Function(CFDictionaryRef, ffi.Pointer, + ffi.Pointer>)>(); + + void CFDictionaryGetKeysAndValues( + CFDictionaryRef theDict, + ffi.Pointer> keys, + ffi.Pointer> values, + ) { + return _CFDictionaryGetKeysAndValues( + theDict, + keys, + values, + ); + } + + late final _CFDictionaryGetKeysAndValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFDictionaryRef, + ffi.Pointer>, + ffi.Pointer>)>>( + 'CFDictionaryGetKeysAndValues'); + late final _CFDictionaryGetKeysAndValues = + _CFDictionaryGetKeysAndValuesPtr.asFunction< + void Function(CFDictionaryRef, ffi.Pointer>, + ffi.Pointer>)>(); + + void CFDictionaryApplyFunction( + CFDictionaryRef theDict, + CFDictionaryApplierFunction applier, + ffi.Pointer context, + ) { + return _CFDictionaryApplyFunction( + theDict, + applier, + context, + ); + } + + late final _CFDictionaryApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFDictionaryRef, CFDictionaryApplierFunction, + ffi.Pointer)>>('CFDictionaryApplyFunction'); + late final _CFDictionaryApplyFunction = + _CFDictionaryApplyFunctionPtr.asFunction< + void Function(CFDictionaryRef, CFDictionaryApplierFunction, + ffi.Pointer)>(); + + void CFDictionaryAddValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, + ) { + return _CFDictionaryAddValue( + theDict, + key, + value, + ); + } + + late final _CFDictionaryAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionaryAddValue'); + late final _CFDictionaryAddValue = _CFDictionaryAddValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); + + void CFDictionarySetValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, + ) { + return _CFDictionarySetValue( + theDict, + key, + value, + ); + } + + late final _CFDictionarySetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionarySetValue'); + late final _CFDictionarySetValue = _CFDictionarySetValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); + + void CFDictionaryReplaceValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, + ) { + return _CFDictionaryReplaceValue( + theDict, + key, + value, + ); + } + + late final _CFDictionaryReplaceValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionaryReplaceValue'); + late final _CFDictionaryReplaceValue = + _CFDictionaryReplaceValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); + + void CFDictionaryRemoveValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ) { + return _CFDictionaryRemoveValue( + theDict, + key, + ); + } + + late final _CFDictionaryRemoveValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDictionaryRef, + ffi.Pointer)>>('CFDictionaryRemoveValue'); + late final _CFDictionaryRemoveValue = _CFDictionaryRemoveValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer)>(); + + void CFDictionaryRemoveAllValues( + CFMutableDictionaryRef theDict, + ) { + return _CFDictionaryRemoveAllValues( + theDict, + ); + } + + late final _CFDictionaryRemoveAllValuesPtr = + _lookup>( + 'CFDictionaryRemoveAllValues'); + late final _CFDictionaryRemoveAllValues = _CFDictionaryRemoveAllValuesPtr + .asFunction(); + + int CFNotificationCenterGetTypeID() { + return _CFNotificationCenterGetTypeID(); + } + + late final _CFNotificationCenterGetTypeIDPtr = + _lookup>( + 'CFNotificationCenterGetTypeID'); + late final _CFNotificationCenterGetTypeID = + _CFNotificationCenterGetTypeIDPtr.asFunction(); + + CFNotificationCenterRef CFNotificationCenterGetLocalCenter() { + return _CFNotificationCenterGetLocalCenter(); + } + + late final _CFNotificationCenterGetLocalCenterPtr = + _lookup>( + 'CFNotificationCenterGetLocalCenter'); + late final _CFNotificationCenterGetLocalCenter = + _CFNotificationCenterGetLocalCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); + + CFNotificationCenterRef CFNotificationCenterGetDistributedCenter() { + return _CFNotificationCenterGetDistributedCenter(); + } + + late final _CFNotificationCenterGetDistributedCenterPtr = + _lookup>( + 'CFNotificationCenterGetDistributedCenter'); + late final _CFNotificationCenterGetDistributedCenter = + _CFNotificationCenterGetDistributedCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); + + CFNotificationCenterRef CFNotificationCenterGetDarwinNotifyCenter() { + return _CFNotificationCenterGetDarwinNotifyCenter(); + } + + late final _CFNotificationCenterGetDarwinNotifyCenterPtr = + _lookup>( + 'CFNotificationCenterGetDarwinNotifyCenter'); + late final _CFNotificationCenterGetDarwinNotifyCenter = + _CFNotificationCenterGetDarwinNotifyCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); + + void CFNotificationCenterAddObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationCallback callBack, + CFStringRef name, + ffi.Pointer object, + int suspensionBehavior, + ) { + return _CFNotificationCenterAddObserver( + center, + observer, + callBack, + name, + object, + suspensionBehavior, + ); + } + + late final _CFNotificationCenterAddObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationCallback, + CFStringRef, + ffi.Pointer, + ffi.Int32)>>('CFNotificationCenterAddObserver'); + late final _CFNotificationCenterAddObserver = + _CFNotificationCenterAddObserverPtr.asFunction< + void Function( + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationCallback, + CFStringRef, + ffi.Pointer, + int)>(); + + void CFNotificationCenterRemoveObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationName name, + ffi.Pointer object, + ) { + return _CFNotificationCenterRemoveObserver( + center, + observer, + name, + object, + ); + } + + late final _CFNotificationCenterRemoveObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationName, + ffi.Pointer)>>('CFNotificationCenterRemoveObserver'); + late final _CFNotificationCenterRemoveObserver = + _CFNotificationCenterRemoveObserverPtr.asFunction< + void Function(CFNotificationCenterRef, ffi.Pointer, + CFNotificationName, ffi.Pointer)>(); + + void CFNotificationCenterRemoveEveryObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, + ) { + return _CFNotificationCenterRemoveEveryObserver( + center, + observer, + ); + } + + late final _CFNotificationCenterRemoveEveryObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, ffi.Pointer)>>( + 'CFNotificationCenterRemoveEveryObserver'); + late final _CFNotificationCenterRemoveEveryObserver = + _CFNotificationCenterRemoveEveryObserverPtr.asFunction< + void Function(CFNotificationCenterRef, ffi.Pointer)>(); + + void CFNotificationCenterPostNotification( + CFNotificationCenterRef center, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo, + int deliverImmediately, + ) { + return _CFNotificationCenterPostNotification( + center, + name, + object, + userInfo, + deliverImmediately, + ); + } + + late final _CFNotificationCenterPostNotificationPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, + CFNotificationName, + ffi.Pointer, + CFDictionaryRef, + Boolean)>>('CFNotificationCenterPostNotification'); + late final _CFNotificationCenterPostNotification = + _CFNotificationCenterPostNotificationPtr.asFunction< + void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, int)>(); + + void CFNotificationCenterPostNotificationWithOptions( + CFNotificationCenterRef center, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo, + int options, + ) { + return _CFNotificationCenterPostNotificationWithOptions( + center, + name, + object, + userInfo, + options, + ); + } + + late final _CFNotificationCenterPostNotificationWithOptionsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, CFOptionFlags)>>( + 'CFNotificationCenterPostNotificationWithOptions'); + late final _CFNotificationCenterPostNotificationWithOptions = + _CFNotificationCenterPostNotificationWithOptionsPtr.asFunction< + void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, int)>(); + + int CFLocaleGetTypeID() { + return _CFLocaleGetTypeID(); + } + + late final _CFLocaleGetTypeIDPtr = + _lookup>('CFLocaleGetTypeID'); + late final _CFLocaleGetTypeID = + _CFLocaleGetTypeIDPtr.asFunction(); + + CFLocaleRef CFLocaleGetSystem() { + return _CFLocaleGetSystem(); + } + + late final _CFLocaleGetSystemPtr = + _lookup>('CFLocaleGetSystem'); + late final _CFLocaleGetSystem = + _CFLocaleGetSystemPtr.asFunction(); + + CFLocaleRef CFLocaleCopyCurrent() { + return _CFLocaleCopyCurrent(); + } + + late final _CFLocaleCopyCurrentPtr = + _lookup>( + 'CFLocaleCopyCurrent'); + late final _CFLocaleCopyCurrent = + _CFLocaleCopyCurrentPtr.asFunction(); + + CFArrayRef CFLocaleCopyAvailableLocaleIdentifiers() { + return _CFLocaleCopyAvailableLocaleIdentifiers(); + } + + late final _CFLocaleCopyAvailableLocaleIdentifiersPtr = + _lookup>( + 'CFLocaleCopyAvailableLocaleIdentifiers'); + late final _CFLocaleCopyAvailableLocaleIdentifiers = + _CFLocaleCopyAvailableLocaleIdentifiersPtr.asFunction< + CFArrayRef Function()>(); + + CFArrayRef CFLocaleCopyISOLanguageCodes() { + return _CFLocaleCopyISOLanguageCodes(); + } + + late final _CFLocaleCopyISOLanguageCodesPtr = + _lookup>( + 'CFLocaleCopyISOLanguageCodes'); + late final _CFLocaleCopyISOLanguageCodes = + _CFLocaleCopyISOLanguageCodesPtr.asFunction(); + + CFArrayRef CFLocaleCopyISOCountryCodes() { + return _CFLocaleCopyISOCountryCodes(); + } + + late final _CFLocaleCopyISOCountryCodesPtr = + _lookup>( + 'CFLocaleCopyISOCountryCodes'); + late final _CFLocaleCopyISOCountryCodes = + _CFLocaleCopyISOCountryCodesPtr.asFunction(); + + CFArrayRef CFLocaleCopyISOCurrencyCodes() { + return _CFLocaleCopyISOCurrencyCodes(); + } + + late final _CFLocaleCopyISOCurrencyCodesPtr = + _lookup>( + 'CFLocaleCopyISOCurrencyCodes'); + late final _CFLocaleCopyISOCurrencyCodes = + _CFLocaleCopyISOCurrencyCodesPtr.asFunction(); + + CFArrayRef CFLocaleCopyCommonISOCurrencyCodes() { + return _CFLocaleCopyCommonISOCurrencyCodes(); + } + + late final _CFLocaleCopyCommonISOCurrencyCodesPtr = + _lookup>( + 'CFLocaleCopyCommonISOCurrencyCodes'); + late final _CFLocaleCopyCommonISOCurrencyCodes = + _CFLocaleCopyCommonISOCurrencyCodesPtr.asFunction< + CFArrayRef Function()>(); + + CFArrayRef CFLocaleCopyPreferredLanguages() { + return _CFLocaleCopyPreferredLanguages(); + } + + late final _CFLocaleCopyPreferredLanguagesPtr = + _lookup>( + 'CFLocaleCopyPreferredLanguages'); + late final _CFLocaleCopyPreferredLanguages = + _CFLocaleCopyPreferredLanguagesPtr.asFunction(); + + CFLocaleIdentifier CFLocaleCreateCanonicalLanguageIdentifierFromString( + CFAllocatorRef allocator, + CFStringRef localeIdentifier, + ) { + return _CFLocaleCreateCanonicalLanguageIdentifierFromString( + allocator, + localeIdentifier, + ); + } + + late final _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( + 'CFLocaleCreateCanonicalLanguageIdentifierFromString'); + late final _CFLocaleCreateCanonicalLanguageIdentifierFromString = + _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); + + CFLocaleIdentifier CFLocaleCreateCanonicalLocaleIdentifierFromString( + CFAllocatorRef allocator, + CFStringRef localeIdentifier, + ) { + return _CFLocaleCreateCanonicalLocaleIdentifierFromString( + allocator, + localeIdentifier, + ); + } + + late final _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( + 'CFLocaleCreateCanonicalLocaleIdentifierFromString'); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromString = + _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); + + CFLocaleIdentifier + CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + CFAllocatorRef allocator, + int lcode, + int rcode, + ) { + return _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + allocator, + lcode, + rcode, + ); + } + + late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr = + _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function( + CFAllocatorRef, LangCode, RegionCode)>>( + 'CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes'); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes = + _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr + .asFunction(); + + CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + CFAllocatorRef allocator, + int lcid, + ) { + return _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + allocator, + lcid, + ); + } + + late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, ffi.Uint32)>>( + 'CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode'); + late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode = + _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, int)>(); + + int CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( + CFLocaleIdentifier localeIdentifier, + ) { + return _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( + localeIdentifier, + ); + } + + late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr = + _lookup>( + 'CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier'); + late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier = + _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr.asFunction< + int Function(CFLocaleIdentifier)>(); + + int CFLocaleGetLanguageCharacterDirection( + CFStringRef isoLangCode, + ) { + return _CFLocaleGetLanguageCharacterDirection( + isoLangCode, + ); + } + + late final _CFLocaleGetLanguageCharacterDirectionPtr = + _lookup>( + 'CFLocaleGetLanguageCharacterDirection'); + late final _CFLocaleGetLanguageCharacterDirection = + _CFLocaleGetLanguageCharacterDirectionPtr.asFunction< + int Function(CFStringRef)>(); + + int CFLocaleGetLanguageLineDirection( + CFStringRef isoLangCode, + ) { + return _CFLocaleGetLanguageLineDirection( + isoLangCode, + ); + } + + late final _CFLocaleGetLanguageLineDirectionPtr = + _lookup>( + 'CFLocaleGetLanguageLineDirection'); + late final _CFLocaleGetLanguageLineDirection = + _CFLocaleGetLanguageLineDirectionPtr.asFunction< + int Function(CFStringRef)>(); + + CFDictionaryRef CFLocaleCreateComponentsFromLocaleIdentifier( + CFAllocatorRef allocator, + CFLocaleIdentifier localeID, + ) { + return _CFLocaleCreateComponentsFromLocaleIdentifier( + allocator, + localeID, + ); + } + + late final _CFLocaleCreateComponentsFromLocaleIdentifierPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>>( + 'CFLocaleCreateComponentsFromLocaleIdentifier'); + late final _CFLocaleCreateComponentsFromLocaleIdentifier = + _CFLocaleCreateComponentsFromLocaleIdentifierPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); + + CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromComponents( + CFAllocatorRef allocator, + CFDictionaryRef dictionary, + ) { + return _CFLocaleCreateLocaleIdentifierFromComponents( + allocator, + dictionary, + ); + } + + late final _CFLocaleCreateLocaleIdentifierFromComponentsPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>>( + 'CFLocaleCreateLocaleIdentifierFromComponents'); + late final _CFLocaleCreateLocaleIdentifierFromComponents = + _CFLocaleCreateLocaleIdentifierFromComponentsPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>(); + + CFLocaleRef CFLocaleCreate( + CFAllocatorRef allocator, + CFLocaleIdentifier localeIdentifier, + ) { + return _CFLocaleCreate( + allocator, + localeIdentifier, + ); + } + + late final _CFLocaleCreatePtr = _lookup< + ffi.NativeFunction< + CFLocaleRef Function( + CFAllocatorRef, CFLocaleIdentifier)>>('CFLocaleCreate'); + late final _CFLocaleCreate = _CFLocaleCreatePtr.asFunction< + CFLocaleRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); + + CFLocaleRef CFLocaleCreateCopy( + CFAllocatorRef allocator, + CFLocaleRef locale, + ) { + return _CFLocaleCreateCopy( + allocator, + locale, + ); + } + + late final _CFLocaleCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFLocaleRef Function( + CFAllocatorRef, CFLocaleRef)>>('CFLocaleCreateCopy'); + late final _CFLocaleCreateCopy = _CFLocaleCreateCopyPtr.asFunction< + CFLocaleRef Function(CFAllocatorRef, CFLocaleRef)>(); + + CFLocaleIdentifier CFLocaleGetIdentifier( + CFLocaleRef locale, + ) { + return _CFLocaleGetIdentifier( + locale, + ); + } + + late final _CFLocaleGetIdentifierPtr = + _lookup>( + 'CFLocaleGetIdentifier'); + late final _CFLocaleGetIdentifier = _CFLocaleGetIdentifierPtr.asFunction< + CFLocaleIdentifier Function(CFLocaleRef)>(); + + CFTypeRef CFLocaleGetValue( + CFLocaleRef locale, + CFLocaleKey key, + ) { + return _CFLocaleGetValue( + locale, + key, + ); + } + + late final _CFLocaleGetValuePtr = + _lookup>( + 'CFLocaleGetValue'); + late final _CFLocaleGetValue = _CFLocaleGetValuePtr.asFunction< + CFTypeRef Function(CFLocaleRef, CFLocaleKey)>(); + + CFStringRef CFLocaleCopyDisplayNameForPropertyValue( + CFLocaleRef displayLocale, + CFLocaleKey key, + CFStringRef value, + ) { + return _CFLocaleCopyDisplayNameForPropertyValue( + displayLocale, + key, + value, + ); + } + + late final _CFLocaleCopyDisplayNameForPropertyValuePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFLocaleRef, CFLocaleKey, + CFStringRef)>>('CFLocaleCopyDisplayNameForPropertyValue'); + late final _CFLocaleCopyDisplayNameForPropertyValue = + _CFLocaleCopyDisplayNameForPropertyValuePtr.asFunction< + CFStringRef Function(CFLocaleRef, CFLocaleKey, CFStringRef)>(); + + late final ffi.Pointer + _kCFLocaleCurrentLocaleDidChangeNotification = + _lookup( + 'kCFLocaleCurrentLocaleDidChangeNotification'); + + CFNotificationName get kCFLocaleCurrentLocaleDidChangeNotification => + _kCFLocaleCurrentLocaleDidChangeNotification.value; + + set kCFLocaleCurrentLocaleDidChangeNotification(CFNotificationName value) => + _kCFLocaleCurrentLocaleDidChangeNotification.value = value; + + late final ffi.Pointer _kCFLocaleIdentifier = + _lookup('kCFLocaleIdentifier'); + + CFLocaleKey get kCFLocaleIdentifier => _kCFLocaleIdentifier.value; + + set kCFLocaleIdentifier(CFLocaleKey value) => + _kCFLocaleIdentifier.value = value; + + late final ffi.Pointer _kCFLocaleLanguageCode = + _lookup('kCFLocaleLanguageCode'); + + CFLocaleKey get kCFLocaleLanguageCode => _kCFLocaleLanguageCode.value; + + set kCFLocaleLanguageCode(CFLocaleKey value) => + _kCFLocaleLanguageCode.value = value; + + late final ffi.Pointer _kCFLocaleCountryCode = + _lookup('kCFLocaleCountryCode'); + + CFLocaleKey get kCFLocaleCountryCode => _kCFLocaleCountryCode.value; + + set kCFLocaleCountryCode(CFLocaleKey value) => + _kCFLocaleCountryCode.value = value; + + late final ffi.Pointer _kCFLocaleScriptCode = + _lookup('kCFLocaleScriptCode'); + + CFLocaleKey get kCFLocaleScriptCode => _kCFLocaleScriptCode.value; + + set kCFLocaleScriptCode(CFLocaleKey value) => + _kCFLocaleScriptCode.value = value; + + late final ffi.Pointer _kCFLocaleVariantCode = + _lookup('kCFLocaleVariantCode'); + + CFLocaleKey get kCFLocaleVariantCode => _kCFLocaleVariantCode.value; + + set kCFLocaleVariantCode(CFLocaleKey value) => + _kCFLocaleVariantCode.value = value; + + late final ffi.Pointer _kCFLocaleExemplarCharacterSet = + _lookup('kCFLocaleExemplarCharacterSet'); + + CFLocaleKey get kCFLocaleExemplarCharacterSet => + _kCFLocaleExemplarCharacterSet.value; + + set kCFLocaleExemplarCharacterSet(CFLocaleKey value) => + _kCFLocaleExemplarCharacterSet.value = value; + + late final ffi.Pointer _kCFLocaleCalendarIdentifier = + _lookup('kCFLocaleCalendarIdentifier'); + + CFLocaleKey get kCFLocaleCalendarIdentifier => + _kCFLocaleCalendarIdentifier.value; + + set kCFLocaleCalendarIdentifier(CFLocaleKey value) => + _kCFLocaleCalendarIdentifier.value = value; + + late final ffi.Pointer _kCFLocaleCalendar = + _lookup('kCFLocaleCalendar'); + + CFLocaleKey get kCFLocaleCalendar => _kCFLocaleCalendar.value; + + set kCFLocaleCalendar(CFLocaleKey value) => _kCFLocaleCalendar.value = value; + + late final ffi.Pointer _kCFLocaleCollationIdentifier = + _lookup('kCFLocaleCollationIdentifier'); + + CFLocaleKey get kCFLocaleCollationIdentifier => + _kCFLocaleCollationIdentifier.value; + + set kCFLocaleCollationIdentifier(CFLocaleKey value) => + _kCFLocaleCollationIdentifier.value = value; + + late final ffi.Pointer _kCFLocaleUsesMetricSystem = + _lookup('kCFLocaleUsesMetricSystem'); + + CFLocaleKey get kCFLocaleUsesMetricSystem => _kCFLocaleUsesMetricSystem.value; + + set kCFLocaleUsesMetricSystem(CFLocaleKey value) => + _kCFLocaleUsesMetricSystem.value = value; + + late final ffi.Pointer _kCFLocaleMeasurementSystem = + _lookup('kCFLocaleMeasurementSystem'); + + CFLocaleKey get kCFLocaleMeasurementSystem => + _kCFLocaleMeasurementSystem.value; + + set kCFLocaleMeasurementSystem(CFLocaleKey value) => + _kCFLocaleMeasurementSystem.value = value; + + late final ffi.Pointer _kCFLocaleDecimalSeparator = + _lookup('kCFLocaleDecimalSeparator'); + + CFLocaleKey get kCFLocaleDecimalSeparator => _kCFLocaleDecimalSeparator.value; + + set kCFLocaleDecimalSeparator(CFLocaleKey value) => + _kCFLocaleDecimalSeparator.value = value; + + late final ffi.Pointer _kCFLocaleGroupingSeparator = + _lookup('kCFLocaleGroupingSeparator'); + + CFLocaleKey get kCFLocaleGroupingSeparator => + _kCFLocaleGroupingSeparator.value; + + set kCFLocaleGroupingSeparator(CFLocaleKey value) => + _kCFLocaleGroupingSeparator.value = value; + + late final ffi.Pointer _kCFLocaleCurrencySymbol = + _lookup('kCFLocaleCurrencySymbol'); + + CFLocaleKey get kCFLocaleCurrencySymbol => _kCFLocaleCurrencySymbol.value; + + set kCFLocaleCurrencySymbol(CFLocaleKey value) => + _kCFLocaleCurrencySymbol.value = value; + + late final ffi.Pointer _kCFLocaleCurrencyCode = + _lookup('kCFLocaleCurrencyCode'); + + CFLocaleKey get kCFLocaleCurrencyCode => _kCFLocaleCurrencyCode.value; + + set kCFLocaleCurrencyCode(CFLocaleKey value) => + _kCFLocaleCurrencyCode.value = value; + + late final ffi.Pointer _kCFLocaleCollatorIdentifier = + _lookup('kCFLocaleCollatorIdentifier'); + + CFLocaleKey get kCFLocaleCollatorIdentifier => + _kCFLocaleCollatorIdentifier.value; + + set kCFLocaleCollatorIdentifier(CFLocaleKey value) => + _kCFLocaleCollatorIdentifier.value = value; + + late final ffi.Pointer _kCFLocaleQuotationBeginDelimiterKey = + _lookup('kCFLocaleQuotationBeginDelimiterKey'); + + CFLocaleKey get kCFLocaleQuotationBeginDelimiterKey => + _kCFLocaleQuotationBeginDelimiterKey.value; + + set kCFLocaleQuotationBeginDelimiterKey(CFLocaleKey value) => + _kCFLocaleQuotationBeginDelimiterKey.value = value; + + late final ffi.Pointer _kCFLocaleQuotationEndDelimiterKey = + _lookup('kCFLocaleQuotationEndDelimiterKey'); + + CFLocaleKey get kCFLocaleQuotationEndDelimiterKey => + _kCFLocaleQuotationEndDelimiterKey.value; + + set kCFLocaleQuotationEndDelimiterKey(CFLocaleKey value) => + _kCFLocaleQuotationEndDelimiterKey.value = value; + + late final ffi.Pointer + _kCFLocaleAlternateQuotationBeginDelimiterKey = + _lookup('kCFLocaleAlternateQuotationBeginDelimiterKey'); + + CFLocaleKey get kCFLocaleAlternateQuotationBeginDelimiterKey => + _kCFLocaleAlternateQuotationBeginDelimiterKey.value; + + set kCFLocaleAlternateQuotationBeginDelimiterKey(CFLocaleKey value) => + _kCFLocaleAlternateQuotationBeginDelimiterKey.value = value; + + late final ffi.Pointer + _kCFLocaleAlternateQuotationEndDelimiterKey = + _lookup('kCFLocaleAlternateQuotationEndDelimiterKey'); + + CFLocaleKey get kCFLocaleAlternateQuotationEndDelimiterKey => + _kCFLocaleAlternateQuotationEndDelimiterKey.value; + + set kCFLocaleAlternateQuotationEndDelimiterKey(CFLocaleKey value) => + _kCFLocaleAlternateQuotationEndDelimiterKey.value = value; + + late final ffi.Pointer _kCFGregorianCalendar = + _lookup('kCFGregorianCalendar'); + + CFCalendarIdentifier get kCFGregorianCalendar => _kCFGregorianCalendar.value; + + set kCFGregorianCalendar(CFCalendarIdentifier value) => + _kCFGregorianCalendar.value = value; + + late final ffi.Pointer _kCFBuddhistCalendar = + _lookup('kCFBuddhistCalendar'); + + CFCalendarIdentifier get kCFBuddhistCalendar => _kCFBuddhistCalendar.value; + + set kCFBuddhistCalendar(CFCalendarIdentifier value) => + _kCFBuddhistCalendar.value = value; + + late final ffi.Pointer _kCFChineseCalendar = + _lookup('kCFChineseCalendar'); + + CFCalendarIdentifier get kCFChineseCalendar => _kCFChineseCalendar.value; + + set kCFChineseCalendar(CFCalendarIdentifier value) => + _kCFChineseCalendar.value = value; + + late final ffi.Pointer _kCFHebrewCalendar = + _lookup('kCFHebrewCalendar'); + + CFCalendarIdentifier get kCFHebrewCalendar => _kCFHebrewCalendar.value; + + set kCFHebrewCalendar(CFCalendarIdentifier value) => + _kCFHebrewCalendar.value = value; + + late final ffi.Pointer _kCFIslamicCalendar = + _lookup('kCFIslamicCalendar'); + + CFCalendarIdentifier get kCFIslamicCalendar => _kCFIslamicCalendar.value; + + set kCFIslamicCalendar(CFCalendarIdentifier value) => + _kCFIslamicCalendar.value = value; + + late final ffi.Pointer _kCFIslamicCivilCalendar = + _lookup('kCFIslamicCivilCalendar'); + + CFCalendarIdentifier get kCFIslamicCivilCalendar => + _kCFIslamicCivilCalendar.value; + + set kCFIslamicCivilCalendar(CFCalendarIdentifier value) => + _kCFIslamicCivilCalendar.value = value; + + late final ffi.Pointer _kCFJapaneseCalendar = + _lookup('kCFJapaneseCalendar'); + + CFCalendarIdentifier get kCFJapaneseCalendar => _kCFJapaneseCalendar.value; + + set kCFJapaneseCalendar(CFCalendarIdentifier value) => + _kCFJapaneseCalendar.value = value; + + late final ffi.Pointer _kCFRepublicOfChinaCalendar = + _lookup('kCFRepublicOfChinaCalendar'); + + CFCalendarIdentifier get kCFRepublicOfChinaCalendar => + _kCFRepublicOfChinaCalendar.value; + + set kCFRepublicOfChinaCalendar(CFCalendarIdentifier value) => + _kCFRepublicOfChinaCalendar.value = value; + + late final ffi.Pointer _kCFPersianCalendar = + _lookup('kCFPersianCalendar'); + + CFCalendarIdentifier get kCFPersianCalendar => _kCFPersianCalendar.value; + + set kCFPersianCalendar(CFCalendarIdentifier value) => + _kCFPersianCalendar.value = value; + + late final ffi.Pointer _kCFIndianCalendar = + _lookup('kCFIndianCalendar'); + + CFCalendarIdentifier get kCFIndianCalendar => _kCFIndianCalendar.value; + + set kCFIndianCalendar(CFCalendarIdentifier value) => + _kCFIndianCalendar.value = value; + + late final ffi.Pointer _kCFISO8601Calendar = + _lookup('kCFISO8601Calendar'); + + CFCalendarIdentifier get kCFISO8601Calendar => _kCFISO8601Calendar.value; + + set kCFISO8601Calendar(CFCalendarIdentifier value) => + _kCFISO8601Calendar.value = value; + + late final ffi.Pointer _kCFIslamicTabularCalendar = + _lookup('kCFIslamicTabularCalendar'); + + CFCalendarIdentifier get kCFIslamicTabularCalendar => + _kCFIslamicTabularCalendar.value; + + set kCFIslamicTabularCalendar(CFCalendarIdentifier value) => + _kCFIslamicTabularCalendar.value = value; + + late final ffi.Pointer _kCFIslamicUmmAlQuraCalendar = + _lookup('kCFIslamicUmmAlQuraCalendar'); + + CFCalendarIdentifier get kCFIslamicUmmAlQuraCalendar => + _kCFIslamicUmmAlQuraCalendar.value; + + set kCFIslamicUmmAlQuraCalendar(CFCalendarIdentifier value) => + _kCFIslamicUmmAlQuraCalendar.value = value; + + double CFAbsoluteTimeGetCurrent() { + return _CFAbsoluteTimeGetCurrent(); + } + + late final _CFAbsoluteTimeGetCurrentPtr = + _lookup>( + 'CFAbsoluteTimeGetCurrent'); + late final _CFAbsoluteTimeGetCurrent = + _CFAbsoluteTimeGetCurrentPtr.asFunction(); + + late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1970 = + _lookup('kCFAbsoluteTimeIntervalSince1970'); + + double get kCFAbsoluteTimeIntervalSince1970 => + _kCFAbsoluteTimeIntervalSince1970.value; + + set kCFAbsoluteTimeIntervalSince1970(double value) => + _kCFAbsoluteTimeIntervalSince1970.value = value; + + late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1904 = + _lookup('kCFAbsoluteTimeIntervalSince1904'); + + double get kCFAbsoluteTimeIntervalSince1904 => + _kCFAbsoluteTimeIntervalSince1904.value; + + set kCFAbsoluteTimeIntervalSince1904(double value) => + _kCFAbsoluteTimeIntervalSince1904.value = value; + + int CFDateGetTypeID() { + return _CFDateGetTypeID(); + } + + late final _CFDateGetTypeIDPtr = + _lookup>('CFDateGetTypeID'); + late final _CFDateGetTypeID = + _CFDateGetTypeIDPtr.asFunction(); + + CFDateRef CFDateCreate( + CFAllocatorRef allocator, + double at, + ) { + return _CFDateCreate( + allocator, + at, + ); + } + + late final _CFDateCreatePtr = _lookup< + ffi.NativeFunction< + CFDateRef Function(CFAllocatorRef, CFAbsoluteTime)>>('CFDateCreate'); + late final _CFDateCreate = + _CFDateCreatePtr.asFunction(); + + double CFDateGetAbsoluteTime( + CFDateRef theDate, + ) { + return _CFDateGetAbsoluteTime( + theDate, + ); + } + + late final _CFDateGetAbsoluteTimePtr = + _lookup>( + 'CFDateGetAbsoluteTime'); + late final _CFDateGetAbsoluteTime = + _CFDateGetAbsoluteTimePtr.asFunction(); + + double CFDateGetTimeIntervalSinceDate( + CFDateRef theDate, + CFDateRef otherDate, + ) { + return _CFDateGetTimeIntervalSinceDate( + theDate, + otherDate, + ); + } + + late final _CFDateGetTimeIntervalSinceDatePtr = _lookup< + ffi.NativeFunction>( + 'CFDateGetTimeIntervalSinceDate'); + late final _CFDateGetTimeIntervalSinceDate = + _CFDateGetTimeIntervalSinceDatePtr.asFunction< + double Function(CFDateRef, CFDateRef)>(); + + int CFDateCompare( + CFDateRef theDate, + CFDateRef otherDate, + ffi.Pointer context, + ) { + return _CFDateCompare( + theDate, + otherDate, + context, + ); + } + + late final _CFDateComparePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + CFDateRef, CFDateRef, ffi.Pointer)>>('CFDateCompare'); + late final _CFDateCompare = _CFDateComparePtr.asFunction< + int Function(CFDateRef, CFDateRef, ffi.Pointer)>(); + + int CFGregorianDateIsValid( + CFGregorianDate gdate, + int unitFlags, + ) { + return _CFGregorianDateIsValid( + gdate, + unitFlags, + ); + } + + late final _CFGregorianDateIsValidPtr = _lookup< + ffi.NativeFunction>( + 'CFGregorianDateIsValid'); + late final _CFGregorianDateIsValid = _CFGregorianDateIsValidPtr.asFunction< + int Function(CFGregorianDate, int)>(); + + double CFGregorianDateGetAbsoluteTime( + CFGregorianDate gdate, + CFTimeZoneRef tz, + ) { + return _CFGregorianDateGetAbsoluteTime( + gdate, + tz, + ); + } + + late final _CFGregorianDateGetAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + CFAbsoluteTime Function(CFGregorianDate, + CFTimeZoneRef)>>('CFGregorianDateGetAbsoluteTime'); + late final _CFGregorianDateGetAbsoluteTime = + _CFGregorianDateGetAbsoluteTimePtr.asFunction< + double Function(CFGregorianDate, CFTimeZoneRef)>(); + + CFGregorianDate CFAbsoluteTimeGetGregorianDate( + double at, + CFTimeZoneRef tz, + ) { + return _CFAbsoluteTimeGetGregorianDate( + at, + tz, + ); + } + + late final _CFAbsoluteTimeGetGregorianDatePtr = _lookup< + ffi.NativeFunction< + CFGregorianDate Function(CFAbsoluteTime, + CFTimeZoneRef)>>('CFAbsoluteTimeGetGregorianDate'); + late final _CFAbsoluteTimeGetGregorianDate = + _CFAbsoluteTimeGetGregorianDatePtr.asFunction< + CFGregorianDate Function(double, CFTimeZoneRef)>(); + + double CFAbsoluteTimeAddGregorianUnits( + double at, + CFTimeZoneRef tz, + CFGregorianUnits units, + ) { + return _CFAbsoluteTimeAddGregorianUnits( + at, + tz, + units, + ); + } + + late final _CFAbsoluteTimeAddGregorianUnitsPtr = _lookup< + ffi.NativeFunction< + CFAbsoluteTime Function(CFAbsoluteTime, CFTimeZoneRef, + CFGregorianUnits)>>('CFAbsoluteTimeAddGregorianUnits'); + late final _CFAbsoluteTimeAddGregorianUnits = + _CFAbsoluteTimeAddGregorianUnitsPtr.asFunction< + double Function(double, CFTimeZoneRef, CFGregorianUnits)>(); + + CFGregorianUnits CFAbsoluteTimeGetDifferenceAsGregorianUnits( + double at1, + double at2, + CFTimeZoneRef tz, + int unitFlags, + ) { + return _CFAbsoluteTimeGetDifferenceAsGregorianUnits( + at1, + at2, + tz, + unitFlags, + ); + } + + late final _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr = _lookup< + ffi.NativeFunction< + CFGregorianUnits Function( + CFAbsoluteTime, + CFAbsoluteTime, + CFTimeZoneRef, + CFOptionFlags)>>('CFAbsoluteTimeGetDifferenceAsGregorianUnits'); + late final _CFAbsoluteTimeGetDifferenceAsGregorianUnits = + _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr.asFunction< + CFGregorianUnits Function(double, double, CFTimeZoneRef, int)>(); + + int CFAbsoluteTimeGetDayOfWeek( + double at, + CFTimeZoneRef tz, + ) { + return _CFAbsoluteTimeGetDayOfWeek( + at, + tz, + ); + } + + late final _CFAbsoluteTimeGetDayOfWeekPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetDayOfWeek'); + late final _CFAbsoluteTimeGetDayOfWeek = _CFAbsoluteTimeGetDayOfWeekPtr + .asFunction(); + + int CFAbsoluteTimeGetDayOfYear( + double at, + CFTimeZoneRef tz, + ) { + return _CFAbsoluteTimeGetDayOfYear( + at, + tz, + ); + } + + late final _CFAbsoluteTimeGetDayOfYearPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetDayOfYear'); + late final _CFAbsoluteTimeGetDayOfYear = _CFAbsoluteTimeGetDayOfYearPtr + .asFunction(); + + int CFAbsoluteTimeGetWeekOfYear( + double at, + CFTimeZoneRef tz, + ) { + return _CFAbsoluteTimeGetWeekOfYear( + at, + tz, + ); + } + + late final _CFAbsoluteTimeGetWeekOfYearPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetWeekOfYear'); + late final _CFAbsoluteTimeGetWeekOfYear = _CFAbsoluteTimeGetWeekOfYearPtr + .asFunction(); + + int CFDataGetTypeID() { + return _CFDataGetTypeID(); + } + + late final _CFDataGetTypeIDPtr = + _lookup>('CFDataGetTypeID'); + late final _CFDataGetTypeID = + _CFDataGetTypeIDPtr.asFunction(); + + CFDataRef CFDataCreate( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int length, + ) { + return _CFDataCreate( + allocator, + bytes, + length, + ); + } + + late final _CFDataCreatePtr = _lookup< + ffi.NativeFunction< + CFDataRef Function( + CFAllocatorRef, ffi.Pointer, CFIndex)>>('CFDataCreate'); + late final _CFDataCreate = _CFDataCreatePtr.asFunction< + CFDataRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + + CFDataRef CFDataCreateWithBytesNoCopy( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int length, + CFAllocatorRef bytesDeallocator, + ) { + return _CFDataCreateWithBytesNoCopy( + allocator, + bytes, + length, + bytesDeallocator, + ); + } + + late final _CFDataCreateWithBytesNoCopyPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFDataCreateWithBytesNoCopy'); + late final _CFDataCreateWithBytesNoCopy = + _CFDataCreateWithBytesNoCopyPtr.asFunction< + CFDataRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + + CFDataRef CFDataCreateCopy( + CFAllocatorRef allocator, + CFDataRef theData, + ) { + return _CFDataCreateCopy( + allocator, + theData, + ); + } + + late final _CFDataCreateCopyPtr = _lookup< + ffi.NativeFunction>( + 'CFDataCreateCopy'); + late final _CFDataCreateCopy = _CFDataCreateCopyPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFDataRef)>(); + + CFMutableDataRef CFDataCreateMutable( + CFAllocatorRef allocator, + int capacity, + ) { + return _CFDataCreateMutable( + allocator, + capacity, + ); + } + + late final _CFDataCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableDataRef Function( + CFAllocatorRef, CFIndex)>>('CFDataCreateMutable'); + late final _CFDataCreateMutable = _CFDataCreateMutablePtr.asFunction< + CFMutableDataRef Function(CFAllocatorRef, int)>(); + + CFMutableDataRef CFDataCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFDataRef theData, + ) { + return _CFDataCreateMutableCopy( + allocator, + capacity, + theData, + ); + } + + late final _CFDataCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableDataRef Function( + CFAllocatorRef, CFIndex, CFDataRef)>>('CFDataCreateMutableCopy'); + late final _CFDataCreateMutableCopy = _CFDataCreateMutableCopyPtr.asFunction< + CFMutableDataRef Function(CFAllocatorRef, int, CFDataRef)>(); + + int CFDataGetLength( + CFDataRef theData, + ) { + return _CFDataGetLength( + theData, + ); + } + + late final _CFDataGetLengthPtr = + _lookup>( + 'CFDataGetLength'); + late final _CFDataGetLength = + _CFDataGetLengthPtr.asFunction(); + + ffi.Pointer CFDataGetBytePtr( + CFDataRef theData, + ) { + return _CFDataGetBytePtr( + theData, + ); + } + + late final _CFDataGetBytePtrPtr = + _lookup Function(CFDataRef)>>( + 'CFDataGetBytePtr'); + late final _CFDataGetBytePtr = + _CFDataGetBytePtrPtr.asFunction Function(CFDataRef)>(); + + ffi.Pointer CFDataGetMutableBytePtr( + CFMutableDataRef theData, + ) { + return _CFDataGetMutableBytePtr( + theData, + ); + } + + late final _CFDataGetMutableBytePtrPtr = _lookup< + ffi.NativeFunction Function(CFMutableDataRef)>>( + 'CFDataGetMutableBytePtr'); + late final _CFDataGetMutableBytePtr = _CFDataGetMutableBytePtrPtr.asFunction< + ffi.Pointer Function(CFMutableDataRef)>(); + + void CFDataGetBytes( + CFDataRef theData, + CFRange range, + ffi.Pointer buffer, + ) { + return _CFDataGetBytes( + theData, + range, + buffer, + ); + } + + late final _CFDataGetBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFDataRef, CFRange, ffi.Pointer)>>('CFDataGetBytes'); + late final _CFDataGetBytes = _CFDataGetBytesPtr.asFunction< + void Function(CFDataRef, CFRange, ffi.Pointer)>(); + + void CFDataSetLength( + CFMutableDataRef theData, + int length, + ) { + return _CFDataSetLength( + theData, + length, + ); + } + + late final _CFDataSetLengthPtr = + _lookup>( + 'CFDataSetLength'); + late final _CFDataSetLength = + _CFDataSetLengthPtr.asFunction(); + + void CFDataIncreaseLength( + CFMutableDataRef theData, + int extraLength, + ) { + return _CFDataIncreaseLength( + theData, + extraLength, + ); + } + + late final _CFDataIncreaseLengthPtr = + _lookup>( + 'CFDataIncreaseLength'); + late final _CFDataIncreaseLength = _CFDataIncreaseLengthPtr.asFunction< + void Function(CFMutableDataRef, int)>(); + + void CFDataAppendBytes( + CFMutableDataRef theData, + ffi.Pointer bytes, + int length, + ) { + return _CFDataAppendBytes( + theData, + bytes, + length, + ); + } + + late final _CFDataAppendBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDataRef, ffi.Pointer, + CFIndex)>>('CFDataAppendBytes'); + late final _CFDataAppendBytes = _CFDataAppendBytesPtr.asFunction< + void Function(CFMutableDataRef, ffi.Pointer, int)>(); + + void CFDataReplaceBytes( + CFMutableDataRef theData, + CFRange range, + ffi.Pointer newBytes, + int newLength, + ) { + return _CFDataReplaceBytes( + theData, + range, + newBytes, + newLength, + ); + } + + late final _CFDataReplaceBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDataRef, CFRange, ffi.Pointer, + CFIndex)>>('CFDataReplaceBytes'); + late final _CFDataReplaceBytes = _CFDataReplaceBytesPtr.asFunction< + void Function(CFMutableDataRef, CFRange, ffi.Pointer, int)>(); + + void CFDataDeleteBytes( + CFMutableDataRef theData, + CFRange range, + ) { + return _CFDataDeleteBytes( + theData, + range, + ); + } + + late final _CFDataDeleteBytesPtr = + _lookup>( + 'CFDataDeleteBytes'); + late final _CFDataDeleteBytes = _CFDataDeleteBytesPtr.asFunction< + void Function(CFMutableDataRef, CFRange)>(); + + CFRange CFDataFind( + CFDataRef theData, + CFDataRef dataToFind, + CFRange searchRange, + int compareOptions, + ) { + return _CFDataFind( + theData, + dataToFind, + searchRange, + compareOptions, + ); + } + + late final _CFDataFindPtr = _lookup< + ffi.NativeFunction< + CFRange Function( + CFDataRef, CFDataRef, CFRange, ffi.Int32)>>('CFDataFind'); + late final _CFDataFind = _CFDataFindPtr.asFunction< + CFRange Function(CFDataRef, CFDataRef, CFRange, int)>(); + + int CFCharacterSetGetTypeID() { + return _CFCharacterSetGetTypeID(); + } + + late final _CFCharacterSetGetTypeIDPtr = + _lookup>( + 'CFCharacterSetGetTypeID'); + late final _CFCharacterSetGetTypeID = + _CFCharacterSetGetTypeIDPtr.asFunction(); + + CFCharacterSetRef CFCharacterSetGetPredefined( + int theSetIdentifier, + ) { + return _CFCharacterSetGetPredefined( + theSetIdentifier, + ); + } + + late final _CFCharacterSetGetPredefinedPtr = + _lookup>( + 'CFCharacterSetGetPredefined'); + late final _CFCharacterSetGetPredefined = _CFCharacterSetGetPredefinedPtr + .asFunction(); + + CFCharacterSetRef CFCharacterSetCreateWithCharactersInRange( + CFAllocatorRef alloc, + CFRange theRange, + ) { + return _CFCharacterSetCreateWithCharactersInRange( + alloc, + theRange, + ); + } + + late final _CFCharacterSetCreateWithCharactersInRangePtr = _lookup< + ffi.NativeFunction< + CFCharacterSetRef Function(CFAllocatorRef, + CFRange)>>('CFCharacterSetCreateWithCharactersInRange'); + late final _CFCharacterSetCreateWithCharactersInRange = + _CFCharacterSetCreateWithCharactersInRangePtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFRange)>(); + + CFCharacterSetRef CFCharacterSetCreateWithCharactersInString( + CFAllocatorRef alloc, + CFStringRef theString, + ) { + return _CFCharacterSetCreateWithCharactersInString( + alloc, + theString, + ); + } + + late final _CFCharacterSetCreateWithCharactersInStringPtr = _lookup< + ffi.NativeFunction< + CFCharacterSetRef Function(CFAllocatorRef, + CFStringRef)>>('CFCharacterSetCreateWithCharactersInString'); + late final _CFCharacterSetCreateWithCharactersInString = + _CFCharacterSetCreateWithCharactersInStringPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFStringRef)>(); + + CFCharacterSetRef CFCharacterSetCreateWithBitmapRepresentation( + CFAllocatorRef alloc, + CFDataRef theData, + ) { + return _CFCharacterSetCreateWithBitmapRepresentation( + alloc, + theData, + ); + } + + late final _CFCharacterSetCreateWithBitmapRepresentationPtr = _lookup< + ffi.NativeFunction< + CFCharacterSetRef Function(CFAllocatorRef, + CFDataRef)>>('CFCharacterSetCreateWithBitmapRepresentation'); + late final _CFCharacterSetCreateWithBitmapRepresentation = + _CFCharacterSetCreateWithBitmapRepresentationPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFDataRef)>(); + + CFCharacterSetRef CFCharacterSetCreateInvertedSet( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, + ) { + return _CFCharacterSetCreateInvertedSet( + alloc, + theSet, + ); + } + + late final _CFCharacterSetCreateInvertedSetPtr = _lookup< + ffi.NativeFunction< + CFCharacterSetRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateInvertedSet'); + late final _CFCharacterSetCreateInvertedSet = + _CFCharacterSetCreateInvertedSetPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + + int CFCharacterSetIsSupersetOfSet( + CFCharacterSetRef theSet, + CFCharacterSetRef theOtherset, + ) { + return _CFCharacterSetIsSupersetOfSet( + theSet, + theOtherset, + ); + } + + late final _CFCharacterSetIsSupersetOfSetPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetIsSupersetOfSet'); + late final _CFCharacterSetIsSupersetOfSet = _CFCharacterSetIsSupersetOfSetPtr + .asFunction(); + + int CFCharacterSetHasMemberInPlane( + CFCharacterSetRef theSet, + int thePlane, + ) { + return _CFCharacterSetHasMemberInPlane( + theSet, + thePlane, + ); + } + + late final _CFCharacterSetHasMemberInPlanePtr = + _lookup>( + 'CFCharacterSetHasMemberInPlane'); + late final _CFCharacterSetHasMemberInPlane = + _CFCharacterSetHasMemberInPlanePtr.asFunction< + int Function(CFCharacterSetRef, int)>(); + + CFMutableCharacterSetRef CFCharacterSetCreateMutable( + CFAllocatorRef alloc, + ) { + return _CFCharacterSetCreateMutable( + alloc, + ); + } + + late final _CFCharacterSetCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableCharacterSetRef Function( + CFAllocatorRef)>>('CFCharacterSetCreateMutable'); + late final _CFCharacterSetCreateMutable = _CFCharacterSetCreateMutablePtr + .asFunction(); + + CFCharacterSetRef CFCharacterSetCreateCopy( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, + ) { + return _CFCharacterSetCreateCopy( + alloc, + theSet, + ); + } + + late final _CFCharacterSetCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFCharacterSetRef Function( + CFAllocatorRef, CFCharacterSetRef)>>('CFCharacterSetCreateCopy'); + late final _CFCharacterSetCreateCopy = + _CFCharacterSetCreateCopyPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + + CFMutableCharacterSetRef CFCharacterSetCreateMutableCopy( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, + ) { + return _CFCharacterSetCreateMutableCopy( + alloc, + theSet, + ); + } + + late final _CFCharacterSetCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableCharacterSetRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateMutableCopy'); + late final _CFCharacterSetCreateMutableCopy = + _CFCharacterSetCreateMutableCopyPtr.asFunction< + CFMutableCharacterSetRef Function( + CFAllocatorRef, CFCharacterSetRef)>(); + + int CFCharacterSetIsCharacterMember( + CFCharacterSetRef theSet, + int theChar, + ) { + return _CFCharacterSetIsCharacterMember( + theSet, + theChar, + ); + } + + late final _CFCharacterSetIsCharacterMemberPtr = + _lookup>( + 'CFCharacterSetIsCharacterMember'); + late final _CFCharacterSetIsCharacterMember = + _CFCharacterSetIsCharacterMemberPtr.asFunction< + int Function(CFCharacterSetRef, int)>(); + + int CFCharacterSetIsLongCharacterMember( + CFCharacterSetRef theSet, + int theChar, + ) { + return _CFCharacterSetIsLongCharacterMember( + theSet, + theChar, + ); + } + + late final _CFCharacterSetIsLongCharacterMemberPtr = _lookup< + ffi.NativeFunction>( + 'CFCharacterSetIsLongCharacterMember'); + late final _CFCharacterSetIsLongCharacterMember = + _CFCharacterSetIsLongCharacterMemberPtr.asFunction< + int Function(CFCharacterSetRef, int)>(); + + CFDataRef CFCharacterSetCreateBitmapRepresentation( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, + ) { + return _CFCharacterSetCreateBitmapRepresentation( + alloc, + theSet, + ); + } + + late final _CFCharacterSetCreateBitmapRepresentationPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateBitmapRepresentation'); + late final _CFCharacterSetCreateBitmapRepresentation = + _CFCharacterSetCreateBitmapRepresentationPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + + void CFCharacterSetAddCharactersInRange( + CFMutableCharacterSetRef theSet, + CFRange theRange, + ) { + return _CFCharacterSetAddCharactersInRange( + theSet, + theRange, + ); + } + + late final _CFCharacterSetAddCharactersInRangePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFRange)>>('CFCharacterSetAddCharactersInRange'); + late final _CFCharacterSetAddCharactersInRange = + _CFCharacterSetAddCharactersInRangePtr.asFunction< + void Function(CFMutableCharacterSetRef, CFRange)>(); + + void CFCharacterSetRemoveCharactersInRange( + CFMutableCharacterSetRef theSet, + CFRange theRange, + ) { + return _CFCharacterSetRemoveCharactersInRange( + theSet, + theRange, + ); + } + + late final _CFCharacterSetRemoveCharactersInRangePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFRange)>>('CFCharacterSetRemoveCharactersInRange'); + late final _CFCharacterSetRemoveCharactersInRange = + _CFCharacterSetRemoveCharactersInRangePtr.asFunction< + void Function(CFMutableCharacterSetRef, CFRange)>(); + + void CFCharacterSetAddCharactersInString( + CFMutableCharacterSetRef theSet, + CFStringRef theString, + ) { + return _CFCharacterSetAddCharactersInString( + theSet, + theString, + ); + } + + late final _CFCharacterSetAddCharactersInStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFStringRef)>>('CFCharacterSetAddCharactersInString'); + late final _CFCharacterSetAddCharactersInString = + _CFCharacterSetAddCharactersInStringPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFStringRef)>(); + + void CFCharacterSetRemoveCharactersInString( + CFMutableCharacterSetRef theSet, + CFStringRef theString, + ) { + return _CFCharacterSetRemoveCharactersInString( + theSet, + theString, + ); + } + + late final _CFCharacterSetRemoveCharactersInStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFStringRef)>>('CFCharacterSetRemoveCharactersInString'); + late final _CFCharacterSetRemoveCharactersInString = + _CFCharacterSetRemoveCharactersInStringPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFStringRef)>(); + + void CFCharacterSetUnion( + CFMutableCharacterSetRef theSet, + CFCharacterSetRef theOtherSet, + ) { + return _CFCharacterSetUnion( + theSet, + theOtherSet, + ); + } + + late final _CFCharacterSetUnionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetUnion'); + late final _CFCharacterSetUnion = _CFCharacterSetUnionPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); + + void CFCharacterSetIntersect( + CFMutableCharacterSetRef theSet, + CFCharacterSetRef theOtherSet, + ) { + return _CFCharacterSetIntersect( + theSet, + theOtherSet, + ); + } + + late final _CFCharacterSetIntersectPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetIntersect'); + late final _CFCharacterSetIntersect = _CFCharacterSetIntersectPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); + + void CFCharacterSetInvert( + CFMutableCharacterSetRef theSet, + ) { + return _CFCharacterSetInvert( + theSet, + ); + } + + late final _CFCharacterSetInvertPtr = + _lookup>( + 'CFCharacterSetInvert'); + late final _CFCharacterSetInvert = _CFCharacterSetInvertPtr.asFunction< + void Function(CFMutableCharacterSetRef)>(); + + int CFStringGetTypeID() { + return _CFStringGetTypeID(); + } + + late final _CFStringGetTypeIDPtr = + _lookup>('CFStringGetTypeID'); + late final _CFStringGetTypeID = + _CFStringGetTypeIDPtr.asFunction(); + + CFStringRef CFStringCreateWithPascalString( + CFAllocatorRef alloc, + ConstStr255Param pStr, + int encoding, + ) { + return _CFStringCreateWithPascalString( + alloc, + pStr, + encoding, + ); + } + + late final _CFStringCreateWithPascalStringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ConstStr255Param, + CFStringEncoding)>>('CFStringCreateWithPascalString'); + late final _CFStringCreateWithPascalString = + _CFStringCreateWithPascalStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ConstStr255Param, int)>(); + + CFStringRef CFStringCreateWithCString( + CFAllocatorRef alloc, + ffi.Pointer cStr, + int encoding, + ) { + return _CFStringCreateWithCString( + alloc, + cStr, + encoding, + ); + } + + late final _CFStringCreateWithCStringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, + CFStringEncoding)>>('CFStringCreateWithCString'); + late final _CFStringCreateWithCString = + _CFStringCreateWithCStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + + CFStringRef CFStringCreateWithBytes( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int numBytes, + int encoding, + int isExternalRepresentation, + ) { + return _CFStringCreateWithBytes( + alloc, + bytes, + numBytes, + encoding, + isExternalRepresentation, + ); + } + + late final _CFStringCreateWithBytesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFStringEncoding, Boolean)>>('CFStringCreateWithBytes'); + late final _CFStringCreateWithBytes = _CFStringCreateWithBytesPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, int, int)>(); + + CFStringRef CFStringCreateWithCharacters( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, + ) { + return _CFStringCreateWithCharacters( + alloc, + chars, + numChars, + ); + } + + late final _CFStringCreateWithCharactersPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFStringCreateWithCharacters'); + late final _CFStringCreateWithCharacters = + _CFStringCreateWithCharactersPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + + CFStringRef CFStringCreateWithPascalStringNoCopy( + CFAllocatorRef alloc, + ConstStr255Param pStr, + int encoding, + CFAllocatorRef contentsDeallocator, + ) { + return _CFStringCreateWithPascalStringNoCopy( + alloc, + pStr, + encoding, + contentsDeallocator, + ); + } + + late final _CFStringCreateWithPascalStringNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + ConstStr255Param, + CFStringEncoding, + CFAllocatorRef)>>('CFStringCreateWithPascalStringNoCopy'); + late final _CFStringCreateWithPascalStringNoCopy = + _CFStringCreateWithPascalStringNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ConstStr255Param, int, CFAllocatorRef)>(); + + CFStringRef CFStringCreateWithCStringNoCopy( + CFAllocatorRef alloc, + ffi.Pointer cStr, + int encoding, + CFAllocatorRef contentsDeallocator, + ) { + return _CFStringCreateWithCStringNoCopy( + alloc, + cStr, + encoding, + contentsDeallocator, + ); + } + + late final _CFStringCreateWithCStringNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + ffi.Pointer, + CFStringEncoding, + CFAllocatorRef)>>('CFStringCreateWithCStringNoCopy'); + late final _CFStringCreateWithCStringNoCopy = + _CFStringCreateWithCStringNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + + CFStringRef CFStringCreateWithBytesNoCopy( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int numBytes, + int encoding, + int isExternalRepresentation, + CFAllocatorRef contentsDeallocator, + ) { + return _CFStringCreateWithBytesNoCopy( + alloc, + bytes, + numBytes, + encoding, + isExternalRepresentation, + contentsDeallocator, + ); + } + + late final _CFStringCreateWithBytesNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + ffi.Pointer, + CFIndex, + CFStringEncoding, + Boolean, + CFAllocatorRef)>>('CFStringCreateWithBytesNoCopy'); + late final _CFStringCreateWithBytesNoCopy = + _CFStringCreateWithBytesNoCopyPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int, int, + int, CFAllocatorRef)>(); + + CFStringRef CFStringCreateWithCharactersNoCopy( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, + CFAllocatorRef contentsDeallocator, + ) { + return _CFStringCreateWithCharactersNoCopy( + alloc, + chars, + numChars, + contentsDeallocator, + ); + } + + late final _CFStringCreateWithCharactersNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFStringCreateWithCharactersNoCopy'); + late final _CFStringCreateWithCharactersNoCopy = + _CFStringCreateWithCharactersNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + + CFStringRef CFStringCreateWithSubstring( + CFAllocatorRef alloc, + CFStringRef str, + CFRange range, + ) { + return _CFStringCreateWithSubstring( + alloc, + str, + range, + ); + } + + late final _CFStringCreateWithSubstringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFRange)>>('CFStringCreateWithSubstring'); + late final _CFStringCreateWithSubstring = _CFStringCreateWithSubstringPtr + .asFunction(); + + CFStringRef CFStringCreateCopy( + CFAllocatorRef alloc, + CFStringRef theString, + ) { + return _CFStringCreateCopy( + alloc, + theString, + ); + } + + late final _CFStringCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef)>>('CFStringCreateCopy'); + late final _CFStringCreateCopy = _CFStringCreateCopyPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef)>(); + + CFStringRef CFStringCreateWithFormat( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef format, + ) { + return _CFStringCreateWithFormat( + alloc, + formatOptions, + format, + ); + } + + late final _CFStringCreateWithFormatPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, + CFStringRef)>>('CFStringCreateWithFormat'); + late final _CFStringCreateWithFormat = + _CFStringCreateWithFormatPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef)>(); + + CFStringRef CFStringCreateWithFormatAndArguments( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef format, + va_list arguments, + ) { + return _CFStringCreateWithFormatAndArguments( + alloc, + formatOptions, + format, + arguments, + ); + } + + late final _CFStringCreateWithFormatAndArgumentsPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + va_list)>>('CFStringCreateWithFormatAndArguments'); + late final _CFStringCreateWithFormatAndArguments = + _CFStringCreateWithFormatAndArgumentsPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFDictionaryRef, CFStringRef, va_list)>(); + + CFMutableStringRef CFStringCreateMutable( + CFAllocatorRef alloc, + int maxLength, + ) { + return _CFStringCreateMutable( + alloc, + maxLength, + ); + } + + late final _CFStringCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function( + CFAllocatorRef, CFIndex)>>('CFStringCreateMutable'); + late final _CFStringCreateMutable = _CFStringCreateMutablePtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, int)>(); + + CFMutableStringRef CFStringCreateMutableCopy( + CFAllocatorRef alloc, + int maxLength, + CFStringRef theString, + ) { + return _CFStringCreateMutableCopy( + alloc, + maxLength, + theString, + ); + } + + late final _CFStringCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function(CFAllocatorRef, CFIndex, + CFStringRef)>>('CFStringCreateMutableCopy'); + late final _CFStringCreateMutableCopy = + _CFStringCreateMutableCopyPtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, int, CFStringRef)>(); + + CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, + int capacity, + CFAllocatorRef externalCharactersAllocator, + ) { + return _CFStringCreateMutableWithExternalCharactersNoCopy( + alloc, + chars, + numChars, + capacity, + externalCharactersAllocator, + ); + } + + late final _CFStringCreateMutableWithExternalCharactersNoCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex, CFIndex, CFAllocatorRef)>>( + 'CFStringCreateMutableWithExternalCharactersNoCopy'); + late final _CFStringCreateMutableWithExternalCharactersNoCopy = + _CFStringCreateMutableWithExternalCharactersNoCopyPtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, int, + int, CFAllocatorRef)>(); + + int CFStringGetLength( + CFStringRef theString, + ) { + return _CFStringGetLength( + theString, + ); + } + + late final _CFStringGetLengthPtr = + _lookup>( + 'CFStringGetLength'); + late final _CFStringGetLength = + _CFStringGetLengthPtr.asFunction(); + + int CFStringGetCharacterAtIndex( + CFStringRef theString, + int idx, + ) { + return _CFStringGetCharacterAtIndex( + theString, + idx, + ); + } + + late final _CFStringGetCharacterAtIndexPtr = + _lookup>( + 'CFStringGetCharacterAtIndex'); + late final _CFStringGetCharacterAtIndex = _CFStringGetCharacterAtIndexPtr + .asFunction(); + + void CFStringGetCharacters( + CFStringRef theString, + CFRange range, + ffi.Pointer buffer, + ) { + return _CFStringGetCharacters( + theString, + range, + buffer, + ); + } + + late final _CFStringGetCharactersPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringRef, CFRange, + ffi.Pointer)>>('CFStringGetCharacters'); + late final _CFStringGetCharacters = _CFStringGetCharactersPtr.asFunction< + void Function(CFStringRef, CFRange, ffi.Pointer)>(); + + int CFStringGetPascalString( + CFStringRef theString, + StringPtr buffer, + int bufferSize, + int encoding, + ) { + return _CFStringGetPascalString( + theString, + buffer, + bufferSize, + encoding, + ); + } + + late final _CFStringGetPascalStringPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, StringPtr, CFIndex, + CFStringEncoding)>>('CFStringGetPascalString'); + late final _CFStringGetPascalString = _CFStringGetPascalStringPtr.asFunction< + int Function(CFStringRef, StringPtr, int, int)>(); + + int CFStringGetCString( + CFStringRef theString, + ffi.Pointer buffer, + int bufferSize, + int encoding, + ) { + return _CFStringGetCString( + theString, + buffer, + bufferSize, + encoding, + ); + } + + late final _CFStringGetCStringPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, ffi.Pointer, CFIndex, + CFStringEncoding)>>('CFStringGetCString'); + late final _CFStringGetCString = _CFStringGetCStringPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, int, int)>(); + + ConstStringPtr CFStringGetPascalStringPtr( + CFStringRef theString, + int encoding, + ) { + return _CFStringGetPascalStringPtr1( + theString, + encoding, + ); + } + + late final _CFStringGetPascalStringPtrPtr = _lookup< + ffi.NativeFunction< + ConstStringPtr Function( + CFStringRef, CFStringEncoding)>>('CFStringGetPascalStringPtr'); + late final _CFStringGetPascalStringPtr1 = _CFStringGetPascalStringPtrPtr + .asFunction(); + + ffi.Pointer CFStringGetCStringPtr( + CFStringRef theString, + int encoding, + ) { + return _CFStringGetCStringPtr1( + theString, + encoding, + ); + } + + late final _CFStringGetCStringPtrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFStringRef, CFStringEncoding)>>('CFStringGetCStringPtr'); + late final _CFStringGetCStringPtr1 = _CFStringGetCStringPtrPtr.asFunction< + ffi.Pointer Function(CFStringRef, int)>(); + + ffi.Pointer CFStringGetCharactersPtr( + CFStringRef theString, + ) { + return _CFStringGetCharactersPtr1( + theString, + ); + } + + late final _CFStringGetCharactersPtrPtr = + _lookup Function(CFStringRef)>>( + 'CFStringGetCharactersPtr'); + late final _CFStringGetCharactersPtr1 = _CFStringGetCharactersPtrPtr + .asFunction Function(CFStringRef)>(); + + int CFStringGetBytes( + CFStringRef theString, + CFRange range, + int encoding, + int lossByte, + int isExternalRepresentation, + ffi.Pointer buffer, + int maxBufLen, + ffi.Pointer usedBufLen, + ) { + return _CFStringGetBytes( + theString, + range, + encoding, + lossByte, + isExternalRepresentation, + buffer, + maxBufLen, + usedBufLen, + ); + } + + late final _CFStringGetBytesPtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFStringRef, + CFRange, + CFStringEncoding, + UInt8, + Boolean, + ffi.Pointer, + CFIndex, + ffi.Pointer)>>('CFStringGetBytes'); + late final _CFStringGetBytes = _CFStringGetBytesPtr.asFunction< + int Function(CFStringRef, CFRange, int, int, int, ffi.Pointer, int, + ffi.Pointer)>(); + + CFStringRef CFStringCreateFromExternalRepresentation( + CFAllocatorRef alloc, + CFDataRef data, + int encoding, + ) { + return _CFStringCreateFromExternalRepresentation( + alloc, + data, + encoding, + ); + } + + late final _CFStringCreateFromExternalRepresentationPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDataRef, + CFStringEncoding)>>('CFStringCreateFromExternalRepresentation'); + late final _CFStringCreateFromExternalRepresentation = + _CFStringCreateFromExternalRepresentationPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDataRef, int)>(); + + CFDataRef CFStringCreateExternalRepresentation( + CFAllocatorRef alloc, + CFStringRef theString, + int encoding, + int lossByte, + ) { + return _CFStringCreateExternalRepresentation( + alloc, + theString, + encoding, + lossByte, + ); + } + + late final _CFStringCreateExternalRepresentationPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, CFStringRef, CFStringEncoding, + UInt8)>>('CFStringCreateExternalRepresentation'); + late final _CFStringCreateExternalRepresentation = + _CFStringCreateExternalRepresentationPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFStringRef, int, int)>(); + + int CFStringGetSmallestEncoding( + CFStringRef theString, + ) { + return _CFStringGetSmallestEncoding( + theString, + ); + } + + late final _CFStringGetSmallestEncodingPtr = + _lookup>( + 'CFStringGetSmallestEncoding'); + late final _CFStringGetSmallestEncoding = + _CFStringGetSmallestEncodingPtr.asFunction(); + + int CFStringGetFastestEncoding( + CFStringRef theString, + ) { + return _CFStringGetFastestEncoding( + theString, + ); + } + + late final _CFStringGetFastestEncodingPtr = + _lookup>( + 'CFStringGetFastestEncoding'); + late final _CFStringGetFastestEncoding = + _CFStringGetFastestEncodingPtr.asFunction(); + + int CFStringGetSystemEncoding() { + return _CFStringGetSystemEncoding(); + } + + late final _CFStringGetSystemEncodingPtr = + _lookup>( + 'CFStringGetSystemEncoding'); + late final _CFStringGetSystemEncoding = + _CFStringGetSystemEncodingPtr.asFunction(); + + int CFStringGetMaximumSizeForEncoding( + int length, + int encoding, + ) { + return _CFStringGetMaximumSizeForEncoding( + length, + encoding, + ); + } + + late final _CFStringGetMaximumSizeForEncodingPtr = + _lookup>( + 'CFStringGetMaximumSizeForEncoding'); + late final _CFStringGetMaximumSizeForEncoding = + _CFStringGetMaximumSizeForEncodingPtr.asFunction< + int Function(int, int)>(); + + int CFStringGetFileSystemRepresentation( + CFStringRef string, + ffi.Pointer buffer, + int maxBufLen, + ) { + return _CFStringGetFileSystemRepresentation( + string, + buffer, + maxBufLen, + ); + } + + late final _CFStringGetFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, ffi.Pointer, + CFIndex)>>('CFStringGetFileSystemRepresentation'); + late final _CFStringGetFileSystemRepresentation = + _CFStringGetFileSystemRepresentationPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, int)>(); + + int CFStringGetMaximumSizeOfFileSystemRepresentation( + CFStringRef string, + ) { + return _CFStringGetMaximumSizeOfFileSystemRepresentation( + string, + ); + } + + late final _CFStringGetMaximumSizeOfFileSystemRepresentationPtr = + _lookup>( + 'CFStringGetMaximumSizeOfFileSystemRepresentation'); + late final _CFStringGetMaximumSizeOfFileSystemRepresentation = + _CFStringGetMaximumSizeOfFileSystemRepresentationPtr.asFunction< + int Function(CFStringRef)>(); + + CFStringRef CFStringCreateWithFileSystemRepresentation( + CFAllocatorRef alloc, + ffi.Pointer buffer, + ) { + return _CFStringCreateWithFileSystemRepresentation( + alloc, + buffer, + ); + } + + late final _CFStringCreateWithFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer)>>( + 'CFStringCreateWithFileSystemRepresentation'); + late final _CFStringCreateWithFileSystemRepresentation = + _CFStringCreateWithFileSystemRepresentationPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer)>(); + + int CFStringCompareWithOptionsAndLocale( + CFStringRef theString1, + CFStringRef theString2, + CFRange rangeToCompare, + int compareOptions, + CFLocaleRef locale, + ) { + return _CFStringCompareWithOptionsAndLocale( + theString1, + theString2, + rangeToCompare, + compareOptions, + locale, + ); + } + + late final _CFStringCompareWithOptionsAndLocalePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, + CFLocaleRef)>>('CFStringCompareWithOptionsAndLocale'); + late final _CFStringCompareWithOptionsAndLocale = + _CFStringCompareWithOptionsAndLocalePtr.asFunction< + int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef)>(); + + int CFStringCompareWithOptions( + CFStringRef theString1, + CFStringRef theString2, + CFRange rangeToCompare, + int compareOptions, + ) { + return _CFStringCompareWithOptions( + theString1, + theString2, + rangeToCompare, + compareOptions, + ); + } + + late final _CFStringCompareWithOptionsPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, + ffi.Int32)>>('CFStringCompareWithOptions'); + late final _CFStringCompareWithOptions = _CFStringCompareWithOptionsPtr + .asFunction(); + + int CFStringCompare( + CFStringRef theString1, + CFStringRef theString2, + int compareOptions, + ) { + return _CFStringCompare( + theString1, + theString2, + compareOptions, + ); + } + + late final _CFStringComparePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + CFStringRef, CFStringRef, ffi.Int32)>>('CFStringCompare'); + late final _CFStringCompare = _CFStringComparePtr.asFunction< + int Function(CFStringRef, CFStringRef, int)>(); + + int CFStringFindWithOptionsAndLocale( + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + int searchOptions, + CFLocaleRef locale, + ffi.Pointer result, + ) { + return _CFStringFindWithOptionsAndLocale( + theString, + stringToFind, + rangeToSearch, + searchOptions, + locale, + result, + ); + } + + late final _CFStringFindWithOptionsAndLocalePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFStringRef, + CFStringRef, + CFRange, + ffi.Int32, + CFLocaleRef, + ffi.Pointer)>>('CFStringFindWithOptionsAndLocale'); + late final _CFStringFindWithOptionsAndLocale = + _CFStringFindWithOptionsAndLocalePtr.asFunction< + int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef, + ffi.Pointer)>(); + + int CFStringFindWithOptions( + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + int searchOptions, + ffi.Pointer result, + ) { + return _CFStringFindWithOptions( + theString, + stringToFind, + rangeToSearch, + searchOptions, + result, + ); + } + + late final _CFStringFindWithOptionsPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, + ffi.Pointer)>>('CFStringFindWithOptions'); + late final _CFStringFindWithOptions = _CFStringFindWithOptionsPtr.asFunction< + int Function( + CFStringRef, CFStringRef, CFRange, int, ffi.Pointer)>(); + + CFArrayRef CFStringCreateArrayWithFindResults( + CFAllocatorRef alloc, + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + int compareOptions, + ) { + return _CFStringCreateArrayWithFindResults( + alloc, + theString, + stringToFind, + rangeToSearch, + compareOptions, + ); + } + + late final _CFStringCreateArrayWithFindResultsPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef, CFRange, + ffi.Int32)>>('CFStringCreateArrayWithFindResults'); + late final _CFStringCreateArrayWithFindResults = + _CFStringCreateArrayWithFindResultsPtr.asFunction< + CFArrayRef Function( + CFAllocatorRef, CFStringRef, CFStringRef, CFRange, int)>(); + + CFRange CFStringFind( + CFStringRef theString, + CFStringRef stringToFind, + int compareOptions, + ) { + return _CFStringFind( + theString, + stringToFind, + compareOptions, + ); + } + + late final _CFStringFindPtr = _lookup< + ffi.NativeFunction< + CFRange Function( + CFStringRef, CFStringRef, ffi.Int32)>>('CFStringFind'); + late final _CFStringFind = _CFStringFindPtr.asFunction< + CFRange Function(CFStringRef, CFStringRef, int)>(); + + int CFStringHasPrefix( + CFStringRef theString, + CFStringRef prefix, + ) { + return _CFStringHasPrefix( + theString, + prefix, + ); + } + + late final _CFStringHasPrefixPtr = + _lookup>( + 'CFStringHasPrefix'); + late final _CFStringHasPrefix = _CFStringHasPrefixPtr.asFunction< + int Function(CFStringRef, CFStringRef)>(); + + int CFStringHasSuffix( + CFStringRef theString, + CFStringRef suffix, + ) { + return _CFStringHasSuffix( + theString, + suffix, + ); + } + + late final _CFStringHasSuffixPtr = + _lookup>( + 'CFStringHasSuffix'); + late final _CFStringHasSuffix = _CFStringHasSuffixPtr.asFunction< + int Function(CFStringRef, CFStringRef)>(); + + CFRange CFStringGetRangeOfComposedCharactersAtIndex( + CFStringRef theString, + int theIndex, + ) { + return _CFStringGetRangeOfComposedCharactersAtIndex( + theString, + theIndex, + ); + } + + late final _CFStringGetRangeOfComposedCharactersAtIndexPtr = + _lookup>( + 'CFStringGetRangeOfComposedCharactersAtIndex'); + late final _CFStringGetRangeOfComposedCharactersAtIndex = + _CFStringGetRangeOfComposedCharactersAtIndexPtr.asFunction< + CFRange Function(CFStringRef, int)>(); + + int CFStringFindCharacterFromSet( + CFStringRef theString, + CFCharacterSetRef theSet, + CFRange rangeToSearch, + int searchOptions, + ffi.Pointer result, + ) { + return _CFStringFindCharacterFromSet( + theString, + theSet, + rangeToSearch, + searchOptions, + result, + ); + } + + late final _CFStringFindCharacterFromSetPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, CFCharacterSetRef, CFRange, ffi.Int32, + ffi.Pointer)>>('CFStringFindCharacterFromSet'); + late final _CFStringFindCharacterFromSet = + _CFStringFindCharacterFromSetPtr.asFunction< + int Function(CFStringRef, CFCharacterSetRef, CFRange, int, + ffi.Pointer)>(); + + void CFStringGetLineBounds( + CFStringRef theString, + CFRange range, + ffi.Pointer lineBeginIndex, + ffi.Pointer lineEndIndex, + ffi.Pointer contentsEndIndex, + ) { + return _CFStringGetLineBounds( + theString, + range, + lineBeginIndex, + lineEndIndex, + contentsEndIndex, + ); + } + + late final _CFStringGetLineBoundsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFStringRef, + CFRange, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('CFStringGetLineBounds'); + late final _CFStringGetLineBounds = _CFStringGetLineBoundsPtr.asFunction< + void Function(CFStringRef, CFRange, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + void CFStringGetParagraphBounds( + CFStringRef string, + CFRange range, + ffi.Pointer parBeginIndex, + ffi.Pointer parEndIndex, + ffi.Pointer contentsEndIndex, + ) { + return _CFStringGetParagraphBounds( + string, + range, + parBeginIndex, + parEndIndex, + contentsEndIndex, + ); + } + + late final _CFStringGetParagraphBoundsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFStringRef, + CFRange, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('CFStringGetParagraphBounds'); + late final _CFStringGetParagraphBounds = + _CFStringGetParagraphBoundsPtr.asFunction< + void Function(CFStringRef, CFRange, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + int CFStringGetHyphenationLocationBeforeIndex( + CFStringRef string, + int location, + CFRange limitRange, + int options, + CFLocaleRef locale, + ffi.Pointer character, + ) { + return _CFStringGetHyphenationLocationBeforeIndex( + string, + location, + limitRange, + options, + locale, + character, + ); + } + + late final _CFStringGetHyphenationLocationBeforeIndexPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFStringRef, CFIndex, CFRange, CFOptionFlags, + CFLocaleRef, ffi.Pointer)>>( + 'CFStringGetHyphenationLocationBeforeIndex'); + late final _CFStringGetHyphenationLocationBeforeIndex = + _CFStringGetHyphenationLocationBeforeIndexPtr.asFunction< + int Function(CFStringRef, int, CFRange, int, CFLocaleRef, + ffi.Pointer)>(); + + int CFStringIsHyphenationAvailableForLocale( + CFLocaleRef locale, + ) { + return _CFStringIsHyphenationAvailableForLocale( + locale, + ); + } + + late final _CFStringIsHyphenationAvailableForLocalePtr = + _lookup>( + 'CFStringIsHyphenationAvailableForLocale'); + late final _CFStringIsHyphenationAvailableForLocale = + _CFStringIsHyphenationAvailableForLocalePtr.asFunction< + int Function(CFLocaleRef)>(); + + CFStringRef CFStringCreateByCombiningStrings( + CFAllocatorRef alloc, + CFArrayRef theArray, + CFStringRef separatorString, + ) { + return _CFStringCreateByCombiningStrings( + alloc, + theArray, + separatorString, + ); + } + + late final _CFStringCreateByCombiningStringsPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFArrayRef, + CFStringRef)>>('CFStringCreateByCombiningStrings'); + late final _CFStringCreateByCombiningStrings = + _CFStringCreateByCombiningStringsPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFArrayRef, CFStringRef)>(); + + CFArrayRef CFStringCreateArrayBySeparatingStrings( + CFAllocatorRef alloc, + CFStringRef theString, + CFStringRef separatorString, + ) { + return _CFStringCreateArrayBySeparatingStrings( + alloc, + theString, + separatorString, + ); + } + + late final _CFStringCreateArrayBySeparatingStringsPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFAllocatorRef, CFStringRef, + CFStringRef)>>('CFStringCreateArrayBySeparatingStrings'); + late final _CFStringCreateArrayBySeparatingStrings = + _CFStringCreateArrayBySeparatingStringsPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); + + int CFStringGetIntValue( + CFStringRef str, + ) { + return _CFStringGetIntValue( + str, + ); + } + + late final _CFStringGetIntValuePtr = + _lookup>( + 'CFStringGetIntValue'); + late final _CFStringGetIntValue = + _CFStringGetIntValuePtr.asFunction(); + + double CFStringGetDoubleValue( + CFStringRef str, + ) { + return _CFStringGetDoubleValue( + str, + ); + } + + late final _CFStringGetDoubleValuePtr = + _lookup>( + 'CFStringGetDoubleValue'); + late final _CFStringGetDoubleValue = + _CFStringGetDoubleValuePtr.asFunction(); + + void CFStringAppend( + CFMutableStringRef theString, + CFStringRef appendedString, + ) { + return _CFStringAppend( + theString, + appendedString, + ); + } + + late final _CFStringAppendPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFStringRef)>>('CFStringAppend'); + late final _CFStringAppend = _CFStringAppendPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); + + void CFStringAppendCharacters( + CFMutableStringRef theString, + ffi.Pointer chars, + int numChars, + ) { + return _CFStringAppendCharacters( + theString, + chars, + numChars, + ); + } + + late final _CFStringAppendCharactersPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ffi.Pointer, + CFIndex)>>('CFStringAppendCharacters'); + late final _CFStringAppendCharacters = + _CFStringAppendCharactersPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int)>(); + + void CFStringAppendPascalString( + CFMutableStringRef theString, + ConstStr255Param pStr, + int encoding, + ) { + return _CFStringAppendPascalString( + theString, + pStr, + encoding, + ); + } + + late final _CFStringAppendPascalStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ConstStr255Param, + CFStringEncoding)>>('CFStringAppendPascalString'); + late final _CFStringAppendPascalString = _CFStringAppendPascalStringPtr + .asFunction(); + + void CFStringAppendCString( + CFMutableStringRef theString, + ffi.Pointer cStr, + int encoding, + ) { + return _CFStringAppendCString( + theString, + cStr, + encoding, + ); + } + + late final _CFStringAppendCStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ffi.Pointer, + CFStringEncoding)>>('CFStringAppendCString'); + late final _CFStringAppendCString = _CFStringAppendCStringPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int)>(); + + void CFStringAppendFormat( + CFMutableStringRef theString, + CFDictionaryRef formatOptions, + CFStringRef format, + ) { + return _CFStringAppendFormat( + theString, + formatOptions, + format, + ); + } + + late final _CFStringAppendFormatPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFDictionaryRef, + CFStringRef)>>('CFStringAppendFormat'); + late final _CFStringAppendFormat = _CFStringAppendFormatPtr.asFunction< + void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef)>(); + + void CFStringAppendFormatAndArguments( + CFMutableStringRef theString, + CFDictionaryRef formatOptions, + CFStringRef format, + va_list arguments, + ) { + return _CFStringAppendFormatAndArguments( + theString, + formatOptions, + format, + arguments, + ); + } + + late final _CFStringAppendFormatAndArgumentsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef, + va_list)>>('CFStringAppendFormatAndArguments'); + late final _CFStringAppendFormatAndArguments = + _CFStringAppendFormatAndArgumentsPtr.asFunction< + void Function( + CFMutableStringRef, CFDictionaryRef, CFStringRef, va_list)>(); + + void CFStringInsert( + CFMutableStringRef str, + int idx, + CFStringRef insertedStr, + ) { + return _CFStringInsert( + str, + idx, + insertedStr, + ); + } + + late final _CFStringInsertPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFIndex, CFStringRef)>>('CFStringInsert'); + late final _CFStringInsert = _CFStringInsertPtr.asFunction< + void Function(CFMutableStringRef, int, CFStringRef)>(); + + void CFStringDelete( + CFMutableStringRef theString, + CFRange range, + ) { + return _CFStringDelete( + theString, + range, + ); + } + + late final _CFStringDeletePtr = _lookup< + ffi.NativeFunction>( + 'CFStringDelete'); + late final _CFStringDelete = _CFStringDeletePtr.asFunction< + void Function(CFMutableStringRef, CFRange)>(); + + void CFStringReplace( + CFMutableStringRef theString, + CFRange range, + CFStringRef replacement, + ) { + return _CFStringReplace( + theString, + range, + replacement, + ); + } + + late final _CFStringReplacePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFRange, CFStringRef)>>('CFStringReplace'); + late final _CFStringReplace = _CFStringReplacePtr.asFunction< + void Function(CFMutableStringRef, CFRange, CFStringRef)>(); + + void CFStringReplaceAll( + CFMutableStringRef theString, + CFStringRef replacement, + ) { + return _CFStringReplaceAll( + theString, + replacement, + ); + } + + late final _CFStringReplaceAllPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFStringRef)>>('CFStringReplaceAll'); + late final _CFStringReplaceAll = _CFStringReplaceAllPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); + + int CFStringFindAndReplace( + CFMutableStringRef theString, + CFStringRef stringToFind, + CFStringRef replacementString, + CFRange rangeToSearch, + int compareOptions, + ) { + return _CFStringFindAndReplace( + theString, + stringToFind, + replacementString, + rangeToSearch, + compareOptions, + ); + } + + late final _CFStringFindAndReplacePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFMutableStringRef, CFStringRef, CFStringRef, + CFRange, ffi.Int32)>>('CFStringFindAndReplace'); + late final _CFStringFindAndReplace = _CFStringFindAndReplacePtr.asFunction< + int Function( + CFMutableStringRef, CFStringRef, CFStringRef, CFRange, int)>(); + + void CFStringSetExternalCharactersNoCopy( + CFMutableStringRef theString, + ffi.Pointer chars, + int length, + int capacity, + ) { + return _CFStringSetExternalCharactersNoCopy( + theString, + chars, + length, + capacity, + ); + } + + late final _CFStringSetExternalCharactersNoCopyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ffi.Pointer, CFIndex, + CFIndex)>>('CFStringSetExternalCharactersNoCopy'); + late final _CFStringSetExternalCharactersNoCopy = + _CFStringSetExternalCharactersNoCopyPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int, int)>(); + + void CFStringPad( + CFMutableStringRef theString, + CFStringRef padString, + int length, + int indexIntoPad, + ) { + return _CFStringPad( + theString, + padString, + length, + indexIntoPad, + ); + } + + late final _CFStringPadPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFStringRef, CFIndex, + CFIndex)>>('CFStringPad'); + late final _CFStringPad = _CFStringPadPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef, int, int)>(); + + void CFStringTrim( + CFMutableStringRef theString, + CFStringRef trimString, + ) { + return _CFStringTrim( + theString, + trimString, + ); + } + + late final _CFStringTrimPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFStringRef)>>('CFStringTrim'); + late final _CFStringTrim = _CFStringTrimPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); + + void CFStringTrimWhitespace( + CFMutableStringRef theString, + ) { + return _CFStringTrimWhitespace( + theString, + ); + } + + late final _CFStringTrimWhitespacePtr = + _lookup>( + 'CFStringTrimWhitespace'); + late final _CFStringTrimWhitespace = _CFStringTrimWhitespacePtr.asFunction< + void Function(CFMutableStringRef)>(); + + void CFStringLowercase( + CFMutableStringRef theString, + CFLocaleRef locale, + ) { + return _CFStringLowercase( + theString, + locale, + ); + } + + late final _CFStringLowercasePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFLocaleRef)>>('CFStringLowercase'); + late final _CFStringLowercase = _CFStringLowercasePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); + + void CFStringUppercase( + CFMutableStringRef theString, + CFLocaleRef locale, + ) { + return _CFStringUppercase( + theString, + locale, + ); + } + + late final _CFStringUppercasePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFLocaleRef)>>('CFStringUppercase'); + late final _CFStringUppercase = _CFStringUppercasePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); + + void CFStringCapitalize( + CFMutableStringRef theString, + CFLocaleRef locale, + ) { + return _CFStringCapitalize( + theString, + locale, + ); + } + + late final _CFStringCapitalizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFLocaleRef)>>('CFStringCapitalize'); + late final _CFStringCapitalize = _CFStringCapitalizePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); + + void CFStringNormalize( + CFMutableStringRef theString, + int theForm, + ) { + return _CFStringNormalize( + theString, + theForm, + ); + } + + late final _CFStringNormalizePtr = _lookup< + ffi.NativeFunction>( + 'CFStringNormalize'); + late final _CFStringNormalize = _CFStringNormalizePtr.asFunction< + void Function(CFMutableStringRef, int)>(); + + void CFStringFold( + CFMutableStringRef theString, + int theFlags, + CFLocaleRef theLocale, + ) { + return _CFStringFold( + theString, + theFlags, + theLocale, + ); + } + + late final _CFStringFoldPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, ffi.Int32, CFLocaleRef)>>('CFStringFold'); + late final _CFStringFold = _CFStringFoldPtr.asFunction< + void Function(CFMutableStringRef, int, CFLocaleRef)>(); + + int CFStringTransform( + CFMutableStringRef string, + ffi.Pointer range, + CFStringRef transform, + int reverse, + ) { + return _CFStringTransform( + string, + range, + transform, + reverse, + ); + } + + late final _CFStringTransformPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFMutableStringRef, ffi.Pointer, + CFStringRef, Boolean)>>('CFStringTransform'); + late final _CFStringTransform = _CFStringTransformPtr.asFunction< + int Function( + CFMutableStringRef, ffi.Pointer, CFStringRef, int)>(); + + late final ffi.Pointer _kCFStringTransformStripCombiningMarks = + _lookup('kCFStringTransformStripCombiningMarks'); + + CFStringRef get kCFStringTransformStripCombiningMarks => + _kCFStringTransformStripCombiningMarks.value; + + set kCFStringTransformStripCombiningMarks(CFStringRef value) => + _kCFStringTransformStripCombiningMarks.value = value; + + late final ffi.Pointer _kCFStringTransformToLatin = + _lookup('kCFStringTransformToLatin'); + + CFStringRef get kCFStringTransformToLatin => _kCFStringTransformToLatin.value; + + set kCFStringTransformToLatin(CFStringRef value) => + _kCFStringTransformToLatin.value = value; + + late final ffi.Pointer _kCFStringTransformFullwidthHalfwidth = + _lookup('kCFStringTransformFullwidthHalfwidth'); + + CFStringRef get kCFStringTransformFullwidthHalfwidth => + _kCFStringTransformFullwidthHalfwidth.value; + + set kCFStringTransformFullwidthHalfwidth(CFStringRef value) => + _kCFStringTransformFullwidthHalfwidth.value = value; + + late final ffi.Pointer _kCFStringTransformLatinKatakana = + _lookup('kCFStringTransformLatinKatakana'); + + CFStringRef get kCFStringTransformLatinKatakana => + _kCFStringTransformLatinKatakana.value; + + set kCFStringTransformLatinKatakana(CFStringRef value) => + _kCFStringTransformLatinKatakana.value = value; + + late final ffi.Pointer _kCFStringTransformLatinHiragana = + _lookup('kCFStringTransformLatinHiragana'); + + CFStringRef get kCFStringTransformLatinHiragana => + _kCFStringTransformLatinHiragana.value; + + set kCFStringTransformLatinHiragana(CFStringRef value) => + _kCFStringTransformLatinHiragana.value = value; + + late final ffi.Pointer _kCFStringTransformHiraganaKatakana = + _lookup('kCFStringTransformHiraganaKatakana'); + + CFStringRef get kCFStringTransformHiraganaKatakana => + _kCFStringTransformHiraganaKatakana.value; + + set kCFStringTransformHiraganaKatakana(CFStringRef value) => + _kCFStringTransformHiraganaKatakana.value = value; + + late final ffi.Pointer _kCFStringTransformMandarinLatin = + _lookup('kCFStringTransformMandarinLatin'); + + CFStringRef get kCFStringTransformMandarinLatin => + _kCFStringTransformMandarinLatin.value; + + set kCFStringTransformMandarinLatin(CFStringRef value) => + _kCFStringTransformMandarinLatin.value = value; + + late final ffi.Pointer _kCFStringTransformLatinHangul = + _lookup('kCFStringTransformLatinHangul'); + + CFStringRef get kCFStringTransformLatinHangul => + _kCFStringTransformLatinHangul.value; + + set kCFStringTransformLatinHangul(CFStringRef value) => + _kCFStringTransformLatinHangul.value = value; + + late final ffi.Pointer _kCFStringTransformLatinArabic = + _lookup('kCFStringTransformLatinArabic'); + + CFStringRef get kCFStringTransformLatinArabic => + _kCFStringTransformLatinArabic.value; + + set kCFStringTransformLatinArabic(CFStringRef value) => + _kCFStringTransformLatinArabic.value = value; + + late final ffi.Pointer _kCFStringTransformLatinHebrew = + _lookup('kCFStringTransformLatinHebrew'); + + CFStringRef get kCFStringTransformLatinHebrew => + _kCFStringTransformLatinHebrew.value; + + set kCFStringTransformLatinHebrew(CFStringRef value) => + _kCFStringTransformLatinHebrew.value = value; + + late final ffi.Pointer _kCFStringTransformLatinThai = + _lookup('kCFStringTransformLatinThai'); + + CFStringRef get kCFStringTransformLatinThai => + _kCFStringTransformLatinThai.value; + + set kCFStringTransformLatinThai(CFStringRef value) => + _kCFStringTransformLatinThai.value = value; + + late final ffi.Pointer _kCFStringTransformLatinCyrillic = + _lookup('kCFStringTransformLatinCyrillic'); + + CFStringRef get kCFStringTransformLatinCyrillic => + _kCFStringTransformLatinCyrillic.value; + + set kCFStringTransformLatinCyrillic(CFStringRef value) => + _kCFStringTransformLatinCyrillic.value = value; + + late final ffi.Pointer _kCFStringTransformLatinGreek = + _lookup('kCFStringTransformLatinGreek'); + + CFStringRef get kCFStringTransformLatinGreek => + _kCFStringTransformLatinGreek.value; + + set kCFStringTransformLatinGreek(CFStringRef value) => + _kCFStringTransformLatinGreek.value = value; + + late final ffi.Pointer _kCFStringTransformToXMLHex = + _lookup('kCFStringTransformToXMLHex'); + + CFStringRef get kCFStringTransformToXMLHex => + _kCFStringTransformToXMLHex.value; + + set kCFStringTransformToXMLHex(CFStringRef value) => + _kCFStringTransformToXMLHex.value = value; + + late final ffi.Pointer _kCFStringTransformToUnicodeName = + _lookup('kCFStringTransformToUnicodeName'); + + CFStringRef get kCFStringTransformToUnicodeName => + _kCFStringTransformToUnicodeName.value; + + set kCFStringTransformToUnicodeName(CFStringRef value) => + _kCFStringTransformToUnicodeName.value = value; + + late final ffi.Pointer _kCFStringTransformStripDiacritics = + _lookup('kCFStringTransformStripDiacritics'); + + CFStringRef get kCFStringTransformStripDiacritics => + _kCFStringTransformStripDiacritics.value; + + set kCFStringTransformStripDiacritics(CFStringRef value) => + _kCFStringTransformStripDiacritics.value = value; + + int CFStringIsEncodingAvailable( + int encoding, + ) { + return _CFStringIsEncodingAvailable( + encoding, + ); + } + + late final _CFStringIsEncodingAvailablePtr = + _lookup>( + 'CFStringIsEncodingAvailable'); + late final _CFStringIsEncodingAvailable = + _CFStringIsEncodingAvailablePtr.asFunction(); + + ffi.Pointer CFStringGetListOfAvailableEncodings() { + return _CFStringGetListOfAvailableEncodings(); + } + + late final _CFStringGetListOfAvailableEncodingsPtr = + _lookup Function()>>( + 'CFStringGetListOfAvailableEncodings'); + late final _CFStringGetListOfAvailableEncodings = + _CFStringGetListOfAvailableEncodingsPtr.asFunction< + ffi.Pointer Function()>(); + + CFStringRef CFStringGetNameOfEncoding( + int encoding, + ) { + return _CFStringGetNameOfEncoding( + encoding, + ); + } + + late final _CFStringGetNameOfEncodingPtr = + _lookup>( + 'CFStringGetNameOfEncoding'); + late final _CFStringGetNameOfEncoding = + _CFStringGetNameOfEncodingPtr.asFunction(); + + int CFStringConvertEncodingToNSStringEncoding( + int encoding, + ) { + return _CFStringConvertEncodingToNSStringEncoding( + encoding, + ); + } + + late final _CFStringConvertEncodingToNSStringEncodingPtr = + _lookup>( + 'CFStringConvertEncodingToNSStringEncoding'); + late final _CFStringConvertEncodingToNSStringEncoding = + _CFStringConvertEncodingToNSStringEncodingPtr.asFunction< + int Function(int)>(); + + int CFStringConvertNSStringEncodingToEncoding( + int encoding, + ) { + return _CFStringConvertNSStringEncodingToEncoding( + encoding, + ); + } + + late final _CFStringConvertNSStringEncodingToEncodingPtr = + _lookup>( + 'CFStringConvertNSStringEncodingToEncoding'); + late final _CFStringConvertNSStringEncodingToEncoding = + _CFStringConvertNSStringEncodingToEncodingPtr.asFunction< + int Function(int)>(); + + int CFStringConvertEncodingToWindowsCodepage( + int encoding, + ) { + return _CFStringConvertEncodingToWindowsCodepage( + encoding, + ); + } + + late final _CFStringConvertEncodingToWindowsCodepagePtr = + _lookup>( + 'CFStringConvertEncodingToWindowsCodepage'); + late final _CFStringConvertEncodingToWindowsCodepage = + _CFStringConvertEncodingToWindowsCodepagePtr.asFunction< + int Function(int)>(); + + int CFStringConvertWindowsCodepageToEncoding( + int codepage, + ) { + return _CFStringConvertWindowsCodepageToEncoding( + codepage, + ); + } + + late final _CFStringConvertWindowsCodepageToEncodingPtr = + _lookup>( + 'CFStringConvertWindowsCodepageToEncoding'); + late final _CFStringConvertWindowsCodepageToEncoding = + _CFStringConvertWindowsCodepageToEncodingPtr.asFunction< + int Function(int)>(); + + int CFStringConvertIANACharSetNameToEncoding( + CFStringRef theString, + ) { + return _CFStringConvertIANACharSetNameToEncoding( + theString, + ); + } + + late final _CFStringConvertIANACharSetNameToEncodingPtr = + _lookup>( + 'CFStringConvertIANACharSetNameToEncoding'); + late final _CFStringConvertIANACharSetNameToEncoding = + _CFStringConvertIANACharSetNameToEncodingPtr.asFunction< + int Function(CFStringRef)>(); + + CFStringRef CFStringConvertEncodingToIANACharSetName( + int encoding, + ) { + return _CFStringConvertEncodingToIANACharSetName( + encoding, + ); + } + + late final _CFStringConvertEncodingToIANACharSetNamePtr = + _lookup>( + 'CFStringConvertEncodingToIANACharSetName'); + late final _CFStringConvertEncodingToIANACharSetName = + _CFStringConvertEncodingToIANACharSetNamePtr.asFunction< + CFStringRef Function(int)>(); + + int CFStringGetMostCompatibleMacStringEncoding( + int encoding, + ) { + return _CFStringGetMostCompatibleMacStringEncoding( + encoding, + ); + } + + late final _CFStringGetMostCompatibleMacStringEncodingPtr = + _lookup>( + 'CFStringGetMostCompatibleMacStringEncoding'); + late final _CFStringGetMostCompatibleMacStringEncoding = + _CFStringGetMostCompatibleMacStringEncodingPtr.asFunction< + int Function(int)>(); + + void CFShow( + CFTypeRef obj, + ) { + return _CFShow( + obj, + ); + } + + late final _CFShowPtr = + _lookup>('CFShow'); + late final _CFShow = _CFShowPtr.asFunction(); + + void CFShowStr( + CFStringRef str, + ) { + return _CFShowStr( + str, + ); + } + + late final _CFShowStrPtr = + _lookup>('CFShowStr'); + late final _CFShowStr = + _CFShowStrPtr.asFunction(); + + CFStringRef __CFStringMakeConstantString( + ffi.Pointer cStr, + ) { + return ___CFStringMakeConstantString( + cStr, + ); + } + + late final ___CFStringMakeConstantStringPtr = + _lookup)>>( + '__CFStringMakeConstantString'); + late final ___CFStringMakeConstantString = ___CFStringMakeConstantStringPtr + .asFunction)>(); + + int CFTimeZoneGetTypeID() { + return _CFTimeZoneGetTypeID(); + } + + late final _CFTimeZoneGetTypeIDPtr = + _lookup>('CFTimeZoneGetTypeID'); + late final _CFTimeZoneGetTypeID = + _CFTimeZoneGetTypeIDPtr.asFunction(); + + CFTimeZoneRef CFTimeZoneCopySystem() { + return _CFTimeZoneCopySystem(); + } + + late final _CFTimeZoneCopySystemPtr = + _lookup>( + 'CFTimeZoneCopySystem'); + late final _CFTimeZoneCopySystem = + _CFTimeZoneCopySystemPtr.asFunction(); + + void CFTimeZoneResetSystem() { + return _CFTimeZoneResetSystem(); + } + + late final _CFTimeZoneResetSystemPtr = + _lookup>('CFTimeZoneResetSystem'); + late final _CFTimeZoneResetSystem = + _CFTimeZoneResetSystemPtr.asFunction(); + + CFTimeZoneRef CFTimeZoneCopyDefault() { + return _CFTimeZoneCopyDefault(); + } + + late final _CFTimeZoneCopyDefaultPtr = + _lookup>( + 'CFTimeZoneCopyDefault'); + late final _CFTimeZoneCopyDefault = + _CFTimeZoneCopyDefaultPtr.asFunction(); + + void CFTimeZoneSetDefault( + CFTimeZoneRef tz, + ) { + return _CFTimeZoneSetDefault( + tz, + ); + } + + late final _CFTimeZoneSetDefaultPtr = + _lookup>( + 'CFTimeZoneSetDefault'); + late final _CFTimeZoneSetDefault = + _CFTimeZoneSetDefaultPtr.asFunction(); + + CFArrayRef CFTimeZoneCopyKnownNames() { + return _CFTimeZoneCopyKnownNames(); + } + + late final _CFTimeZoneCopyKnownNamesPtr = + _lookup>( + 'CFTimeZoneCopyKnownNames'); + late final _CFTimeZoneCopyKnownNames = + _CFTimeZoneCopyKnownNamesPtr.asFunction(); + + CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary() { + return _CFTimeZoneCopyAbbreviationDictionary(); + } + + late final _CFTimeZoneCopyAbbreviationDictionaryPtr = + _lookup>( + 'CFTimeZoneCopyAbbreviationDictionary'); + late final _CFTimeZoneCopyAbbreviationDictionary = + _CFTimeZoneCopyAbbreviationDictionaryPtr.asFunction< + CFDictionaryRef Function()>(); + + void CFTimeZoneSetAbbreviationDictionary( + CFDictionaryRef dict, + ) { + return _CFTimeZoneSetAbbreviationDictionary( + dict, + ); + } + + late final _CFTimeZoneSetAbbreviationDictionaryPtr = + _lookup>( + 'CFTimeZoneSetAbbreviationDictionary'); + late final _CFTimeZoneSetAbbreviationDictionary = + _CFTimeZoneSetAbbreviationDictionaryPtr.asFunction< + void Function(CFDictionaryRef)>(); + + CFTimeZoneRef CFTimeZoneCreate( + CFAllocatorRef allocator, + CFStringRef name, + CFDataRef data, + ) { + return _CFTimeZoneCreate( + allocator, + name, + data, + ); + } + + late final _CFTimeZoneCreatePtr = _lookup< + ffi.NativeFunction< + CFTimeZoneRef Function( + CFAllocatorRef, CFStringRef, CFDataRef)>>('CFTimeZoneCreate'); + late final _CFTimeZoneCreate = _CFTimeZoneCreatePtr.asFunction< + CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); + + CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT( + CFAllocatorRef allocator, + double ti, + ) { + return _CFTimeZoneCreateWithTimeIntervalFromGMT( + allocator, + ti, + ); + } + + late final _CFTimeZoneCreateWithTimeIntervalFromGMTPtr = _lookup< + ffi.NativeFunction< + CFTimeZoneRef Function(CFAllocatorRef, + CFTimeInterval)>>('CFTimeZoneCreateWithTimeIntervalFromGMT'); + late final _CFTimeZoneCreateWithTimeIntervalFromGMT = + _CFTimeZoneCreateWithTimeIntervalFromGMTPtr.asFunction< + CFTimeZoneRef Function(CFAllocatorRef, double)>(); + + CFTimeZoneRef CFTimeZoneCreateWithName( + CFAllocatorRef allocator, + CFStringRef name, + int tryAbbrev, + ) { + return _CFTimeZoneCreateWithName( + allocator, + name, + tryAbbrev, + ); + } + + late final _CFTimeZoneCreateWithNamePtr = _lookup< + ffi.NativeFunction< + CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, + Boolean)>>('CFTimeZoneCreateWithName'); + late final _CFTimeZoneCreateWithName = _CFTimeZoneCreateWithNamePtr + .asFunction(); + + CFStringRef CFTimeZoneGetName( + CFTimeZoneRef tz, + ) { + return _CFTimeZoneGetName( + tz, + ); + } + + late final _CFTimeZoneGetNamePtr = + _lookup>( + 'CFTimeZoneGetName'); + late final _CFTimeZoneGetName = + _CFTimeZoneGetNamePtr.asFunction(); + + CFDataRef CFTimeZoneGetData( + CFTimeZoneRef tz, + ) { + return _CFTimeZoneGetData( + tz, + ); + } + + late final _CFTimeZoneGetDataPtr = + _lookup>( + 'CFTimeZoneGetData'); + late final _CFTimeZoneGetData = + _CFTimeZoneGetDataPtr.asFunction(); + + double CFTimeZoneGetSecondsFromGMT( + CFTimeZoneRef tz, + double at, + ) { + return _CFTimeZoneGetSecondsFromGMT( + tz, + at, + ); + } + + late final _CFTimeZoneGetSecondsFromGMTPtr = _lookup< + ffi.NativeFunction< + CFTimeInterval Function( + CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneGetSecondsFromGMT'); + late final _CFTimeZoneGetSecondsFromGMT = _CFTimeZoneGetSecondsFromGMTPtr + .asFunction(); + + CFStringRef CFTimeZoneCopyAbbreviation( + CFTimeZoneRef tz, + double at, + ) { + return _CFTimeZoneCopyAbbreviation( + tz, + at, + ); + } + + late final _CFTimeZoneCopyAbbreviationPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneCopyAbbreviation'); + late final _CFTimeZoneCopyAbbreviation = _CFTimeZoneCopyAbbreviationPtr + .asFunction(); + + int CFTimeZoneIsDaylightSavingTime( + CFTimeZoneRef tz, + double at, + ) { + return _CFTimeZoneIsDaylightSavingTime( + tz, + at, + ); + } + + late final _CFTimeZoneIsDaylightSavingTimePtr = _lookup< + ffi.NativeFunction>( + 'CFTimeZoneIsDaylightSavingTime'); + late final _CFTimeZoneIsDaylightSavingTime = + _CFTimeZoneIsDaylightSavingTimePtr.asFunction< + int Function(CFTimeZoneRef, double)>(); + + double CFTimeZoneGetDaylightSavingTimeOffset( + CFTimeZoneRef tz, + double at, + ) { + return _CFTimeZoneGetDaylightSavingTimeOffset( + tz, + at, + ); + } + + late final _CFTimeZoneGetDaylightSavingTimeOffsetPtr = _lookup< + ffi.NativeFunction< + CFTimeInterval Function(CFTimeZoneRef, + CFAbsoluteTime)>>('CFTimeZoneGetDaylightSavingTimeOffset'); + late final _CFTimeZoneGetDaylightSavingTimeOffset = + _CFTimeZoneGetDaylightSavingTimeOffsetPtr.asFunction< + double Function(CFTimeZoneRef, double)>(); + + double CFTimeZoneGetNextDaylightSavingTimeTransition( + CFTimeZoneRef tz, + double at, + ) { + return _CFTimeZoneGetNextDaylightSavingTimeTransition( + tz, + at, + ); + } + + late final _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr = _lookup< + ffi.NativeFunction< + CFAbsoluteTime Function(CFTimeZoneRef, CFAbsoluteTime)>>( + 'CFTimeZoneGetNextDaylightSavingTimeTransition'); + late final _CFTimeZoneGetNextDaylightSavingTimeTransition = + _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr.asFunction< + double Function(CFTimeZoneRef, double)>(); + + CFStringRef CFTimeZoneCopyLocalizedName( + CFTimeZoneRef tz, + int style, + CFLocaleRef locale, + ) { + return _CFTimeZoneCopyLocalizedName( + tz, + style, + locale, + ); + } + + late final _CFTimeZoneCopyLocalizedNamePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFTimeZoneRef, ffi.Int32, + CFLocaleRef)>>('CFTimeZoneCopyLocalizedName'); + late final _CFTimeZoneCopyLocalizedName = _CFTimeZoneCopyLocalizedNamePtr + .asFunction(); + + late final ffi.Pointer + _kCFTimeZoneSystemTimeZoneDidChangeNotification = + _lookup( + 'kCFTimeZoneSystemTimeZoneDidChangeNotification'); + + CFNotificationName get kCFTimeZoneSystemTimeZoneDidChangeNotification => + _kCFTimeZoneSystemTimeZoneDidChangeNotification.value; + + set kCFTimeZoneSystemTimeZoneDidChangeNotification( + CFNotificationName value) => + _kCFTimeZoneSystemTimeZoneDidChangeNotification.value = value; + + int CFCalendarGetTypeID() { + return _CFCalendarGetTypeID(); + } + + late final _CFCalendarGetTypeIDPtr = + _lookup>('CFCalendarGetTypeID'); + late final _CFCalendarGetTypeID = + _CFCalendarGetTypeIDPtr.asFunction(); + + CFCalendarRef CFCalendarCopyCurrent() { + return _CFCalendarCopyCurrent(); + } + + late final _CFCalendarCopyCurrentPtr = + _lookup>( + 'CFCalendarCopyCurrent'); + late final _CFCalendarCopyCurrent = + _CFCalendarCopyCurrentPtr.asFunction(); + + CFCalendarRef CFCalendarCreateWithIdentifier( + CFAllocatorRef allocator, + CFCalendarIdentifier identifier, + ) { + return _CFCalendarCreateWithIdentifier( + allocator, + identifier, + ); + } + + late final _CFCalendarCreateWithIdentifierPtr = _lookup< + ffi.NativeFunction< + CFCalendarRef Function(CFAllocatorRef, + CFCalendarIdentifier)>>('CFCalendarCreateWithIdentifier'); + late final _CFCalendarCreateWithIdentifier = + _CFCalendarCreateWithIdentifierPtr.asFunction< + CFCalendarRef Function(CFAllocatorRef, CFCalendarIdentifier)>(); + + CFCalendarIdentifier CFCalendarGetIdentifier( + CFCalendarRef calendar, + ) { + return _CFCalendarGetIdentifier( + calendar, + ); + } + + late final _CFCalendarGetIdentifierPtr = + _lookup>( + 'CFCalendarGetIdentifier'); + late final _CFCalendarGetIdentifier = _CFCalendarGetIdentifierPtr.asFunction< + CFCalendarIdentifier Function(CFCalendarRef)>(); + + CFLocaleRef CFCalendarCopyLocale( + CFCalendarRef calendar, + ) { + return _CFCalendarCopyLocale( + calendar, + ); + } + + late final _CFCalendarCopyLocalePtr = + _lookup>( + 'CFCalendarCopyLocale'); + late final _CFCalendarCopyLocale = _CFCalendarCopyLocalePtr.asFunction< + CFLocaleRef Function(CFCalendarRef)>(); + + void CFCalendarSetLocale( + CFCalendarRef calendar, + CFLocaleRef locale, + ) { + return _CFCalendarSetLocale( + calendar, + locale, + ); + } + + late final _CFCalendarSetLocalePtr = _lookup< + ffi.NativeFunction>( + 'CFCalendarSetLocale'); + late final _CFCalendarSetLocale = _CFCalendarSetLocalePtr.asFunction< + void Function(CFCalendarRef, CFLocaleRef)>(); + + CFTimeZoneRef CFCalendarCopyTimeZone( + CFCalendarRef calendar, + ) { + return _CFCalendarCopyTimeZone( + calendar, + ); + } + + late final _CFCalendarCopyTimeZonePtr = + _lookup>( + 'CFCalendarCopyTimeZone'); + late final _CFCalendarCopyTimeZone = _CFCalendarCopyTimeZonePtr.asFunction< + CFTimeZoneRef Function(CFCalendarRef)>(); + + void CFCalendarSetTimeZone( + CFCalendarRef calendar, + CFTimeZoneRef tz, + ) { + return _CFCalendarSetTimeZone( + calendar, + tz, + ); + } + + late final _CFCalendarSetTimeZonePtr = _lookup< + ffi.NativeFunction>( + 'CFCalendarSetTimeZone'); + late final _CFCalendarSetTimeZone = _CFCalendarSetTimeZonePtr.asFunction< + void Function(CFCalendarRef, CFTimeZoneRef)>(); + + int CFCalendarGetFirstWeekday( + CFCalendarRef calendar, + ) { + return _CFCalendarGetFirstWeekday( + calendar, + ); + } + + late final _CFCalendarGetFirstWeekdayPtr = + _lookup>( + 'CFCalendarGetFirstWeekday'); + late final _CFCalendarGetFirstWeekday = + _CFCalendarGetFirstWeekdayPtr.asFunction(); + + void CFCalendarSetFirstWeekday( + CFCalendarRef calendar, + int wkdy, + ) { + return _CFCalendarSetFirstWeekday( + calendar, + wkdy, + ); + } + + late final _CFCalendarSetFirstWeekdayPtr = + _lookup>( + 'CFCalendarSetFirstWeekday'); + late final _CFCalendarSetFirstWeekday = _CFCalendarSetFirstWeekdayPtr + .asFunction(); + + int CFCalendarGetMinimumDaysInFirstWeek( + CFCalendarRef calendar, + ) { + return _CFCalendarGetMinimumDaysInFirstWeek( + calendar, + ); + } + + late final _CFCalendarGetMinimumDaysInFirstWeekPtr = + _lookup>( + 'CFCalendarGetMinimumDaysInFirstWeek'); + late final _CFCalendarGetMinimumDaysInFirstWeek = + _CFCalendarGetMinimumDaysInFirstWeekPtr.asFunction< + int Function(CFCalendarRef)>(); + + void CFCalendarSetMinimumDaysInFirstWeek( + CFCalendarRef calendar, + int mwd, + ) { + return _CFCalendarSetMinimumDaysInFirstWeek( + calendar, + mwd, + ); + } + + late final _CFCalendarSetMinimumDaysInFirstWeekPtr = + _lookup>( + 'CFCalendarSetMinimumDaysInFirstWeek'); + late final _CFCalendarSetMinimumDaysInFirstWeek = + _CFCalendarSetMinimumDaysInFirstWeekPtr.asFunction< + void Function(CFCalendarRef, int)>(); + + CFRange CFCalendarGetMinimumRangeOfUnit( + CFCalendarRef calendar, + int unit, + ) { + return _CFCalendarGetMinimumRangeOfUnit( + calendar, + unit, + ); + } + + late final _CFCalendarGetMinimumRangeOfUnitPtr = + _lookup>( + 'CFCalendarGetMinimumRangeOfUnit'); + late final _CFCalendarGetMinimumRangeOfUnit = + _CFCalendarGetMinimumRangeOfUnitPtr.asFunction< + CFRange Function(CFCalendarRef, int)>(); + + CFRange CFCalendarGetMaximumRangeOfUnit( + CFCalendarRef calendar, + int unit, + ) { + return _CFCalendarGetMaximumRangeOfUnit( + calendar, + unit, + ); + } + + late final _CFCalendarGetMaximumRangeOfUnitPtr = + _lookup>( + 'CFCalendarGetMaximumRangeOfUnit'); + late final _CFCalendarGetMaximumRangeOfUnit = + _CFCalendarGetMaximumRangeOfUnitPtr.asFunction< + CFRange Function(CFCalendarRef, int)>(); + + CFRange CFCalendarGetRangeOfUnit( + CFCalendarRef calendar, + int smallerUnit, + int biggerUnit, + double at, + ) { + return _CFCalendarGetRangeOfUnit( + calendar, + smallerUnit, + biggerUnit, + at, + ); + } + + late final _CFCalendarGetRangeOfUnitPtr = _lookup< + ffi.NativeFunction< + CFRange Function(CFCalendarRef, ffi.Int32, ffi.Int32, + CFAbsoluteTime)>>('CFCalendarGetRangeOfUnit'); + late final _CFCalendarGetRangeOfUnit = _CFCalendarGetRangeOfUnitPtr + .asFunction(); + + int CFCalendarGetOrdinalityOfUnit( + CFCalendarRef calendar, + int smallerUnit, + int biggerUnit, + double at, + ) { + return _CFCalendarGetOrdinalityOfUnit( + calendar, + smallerUnit, + biggerUnit, + at, + ); + } + + late final _CFCalendarGetOrdinalityOfUnitPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFCalendarRef, ffi.Int32, ffi.Int32, + CFAbsoluteTime)>>('CFCalendarGetOrdinalityOfUnit'); + late final _CFCalendarGetOrdinalityOfUnit = _CFCalendarGetOrdinalityOfUnitPtr + .asFunction(); + + int CFCalendarGetTimeRangeOfUnit( + CFCalendarRef calendar, + int unit, + double at, + ffi.Pointer startp, + ffi.Pointer tip, + ) { + return _CFCalendarGetTimeRangeOfUnit( + calendar, + unit, + at, + startp, + tip, + ); + } + + late final _CFCalendarGetTimeRangeOfUnitPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFCalendarRef, + ffi.Int32, + CFAbsoluteTime, + ffi.Pointer, + ffi.Pointer)>>('CFCalendarGetTimeRangeOfUnit'); + late final _CFCalendarGetTimeRangeOfUnit = + _CFCalendarGetTimeRangeOfUnitPtr.asFunction< + int Function(CFCalendarRef, int, double, ffi.Pointer, + ffi.Pointer)>(); + + int CFCalendarComposeAbsoluteTime( + CFCalendarRef calendar, + ffi.Pointer at, + ffi.Pointer componentDesc, + ) { + return _CFCalendarComposeAbsoluteTime( + calendar, + at, + componentDesc, + ); + } + + late final _CFCalendarComposeAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFCalendarRef, ffi.Pointer, + ffi.Pointer)>>('CFCalendarComposeAbsoluteTime'); + late final _CFCalendarComposeAbsoluteTime = + _CFCalendarComposeAbsoluteTimePtr.asFunction< + int Function(CFCalendarRef, ffi.Pointer, + ffi.Pointer)>(); + + int CFCalendarDecomposeAbsoluteTime( + CFCalendarRef calendar, + double at, + ffi.Pointer componentDesc, + ) { + return _CFCalendarDecomposeAbsoluteTime( + calendar, + at, + componentDesc, + ); + } + + late final _CFCalendarDecomposeAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFCalendarRef, CFAbsoluteTime, + ffi.Pointer)>>('CFCalendarDecomposeAbsoluteTime'); + late final _CFCalendarDecomposeAbsoluteTime = + _CFCalendarDecomposeAbsoluteTimePtr.asFunction< + int Function(CFCalendarRef, double, ffi.Pointer)>(); + + int CFCalendarAddComponents( + CFCalendarRef calendar, + ffi.Pointer at, + int options, + ffi.Pointer componentDesc, + ) { + return _CFCalendarAddComponents( + calendar, + at, + options, + componentDesc, + ); + } + + late final _CFCalendarAddComponentsPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFCalendarRef, + ffi.Pointer, + CFOptionFlags, + ffi.Pointer)>>('CFCalendarAddComponents'); + late final _CFCalendarAddComponents = _CFCalendarAddComponentsPtr.asFunction< + int Function(CFCalendarRef, ffi.Pointer, int, + ffi.Pointer)>(); + + int CFCalendarGetComponentDifference( + CFCalendarRef calendar, + double startingAT, + double resultAT, + int options, + ffi.Pointer componentDesc, + ) { + return _CFCalendarGetComponentDifference( + calendar, + startingAT, + resultAT, + options, + componentDesc, + ); + } + + late final _CFCalendarGetComponentDifferencePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFCalendarRef, + CFAbsoluteTime, + CFAbsoluteTime, + CFOptionFlags, + ffi.Pointer)>>('CFCalendarGetComponentDifference'); + late final _CFCalendarGetComponentDifference = + _CFCalendarGetComponentDifferencePtr.asFunction< + int Function( + CFCalendarRef, double, double, int, ffi.Pointer)>(); + + CFStringRef CFDateFormatterCreateDateFormatFromTemplate( + CFAllocatorRef allocator, + CFStringRef tmplate, + int options, + CFLocaleRef locale, + ) { + return _CFDateFormatterCreateDateFormatFromTemplate( + allocator, + tmplate, + options, + locale, + ); + } + + late final _CFDateFormatterCreateDateFormatFromTemplatePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFOptionFlags, + CFLocaleRef)>>('CFDateFormatterCreateDateFormatFromTemplate'); + late final _CFDateFormatterCreateDateFormatFromTemplate = + _CFDateFormatterCreateDateFormatFromTemplatePtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef, int, CFLocaleRef)>(); + + int CFDateFormatterGetTypeID() { + return _CFDateFormatterGetTypeID(); + } + + late final _CFDateFormatterGetTypeIDPtr = + _lookup>( + 'CFDateFormatterGetTypeID'); + late final _CFDateFormatterGetTypeID = + _CFDateFormatterGetTypeIDPtr.asFunction(); + + CFDateFormatterRef CFDateFormatterCreateISO8601Formatter( + CFAllocatorRef allocator, + int formatOptions, + ) { + return _CFDateFormatterCreateISO8601Formatter( + allocator, + formatOptions, + ); + } + + late final _CFDateFormatterCreateISO8601FormatterPtr = _lookup< + ffi.NativeFunction< + CFDateFormatterRef Function(CFAllocatorRef, + ffi.Int32)>>('CFDateFormatterCreateISO8601Formatter'); + late final _CFDateFormatterCreateISO8601Formatter = + _CFDateFormatterCreateISO8601FormatterPtr.asFunction< + CFDateFormatterRef Function(CFAllocatorRef, int)>(); + + CFDateFormatterRef CFDateFormatterCreate( + CFAllocatorRef allocator, + CFLocaleRef locale, + int dateStyle, + int timeStyle, + ) { + return _CFDateFormatterCreate( + allocator, + locale, + dateStyle, + timeStyle, + ); + } + + late final _CFDateFormatterCreatePtr = _lookup< + ffi.NativeFunction< + CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, ffi.Int32, + ffi.Int32)>>('CFDateFormatterCreate'); + late final _CFDateFormatterCreate = _CFDateFormatterCreatePtr.asFunction< + CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, int, int)>(); + + CFLocaleRef CFDateFormatterGetLocale( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetLocale( + formatter, + ); + } + + late final _CFDateFormatterGetLocalePtr = + _lookup>( + 'CFDateFormatterGetLocale'); + late final _CFDateFormatterGetLocale = _CFDateFormatterGetLocalePtr + .asFunction(); + + int CFDateFormatterGetDateStyle( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetDateStyle( + formatter, + ); + } + + late final _CFDateFormatterGetDateStylePtr = + _lookup>( + 'CFDateFormatterGetDateStyle'); + late final _CFDateFormatterGetDateStyle = _CFDateFormatterGetDateStylePtr + .asFunction(); + + int CFDateFormatterGetTimeStyle( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetTimeStyle( + formatter, + ); + } + + late final _CFDateFormatterGetTimeStylePtr = + _lookup>( + 'CFDateFormatterGetTimeStyle'); + late final _CFDateFormatterGetTimeStyle = _CFDateFormatterGetTimeStylePtr + .asFunction(); + + CFStringRef CFDateFormatterGetFormat( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetFormat( + formatter, + ); + } + + late final _CFDateFormatterGetFormatPtr = + _lookup>( + 'CFDateFormatterGetFormat'); + late final _CFDateFormatterGetFormat = _CFDateFormatterGetFormatPtr + .asFunction(); + + void CFDateFormatterSetFormat( + CFDateFormatterRef formatter, + CFStringRef formatString, + ) { + return _CFDateFormatterSetFormat( + formatter, + formatString, + ); + } + + late final _CFDateFormatterSetFormatPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFDateFormatterRef, CFStringRef)>>('CFDateFormatterSetFormat'); + late final _CFDateFormatterSetFormat = _CFDateFormatterSetFormatPtr + .asFunction(); + + CFStringRef CFDateFormatterCreateStringWithDate( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + CFDateRef date, + ) { + return _CFDateFormatterCreateStringWithDate( + allocator, + formatter, + date, + ); + } + + late final _CFDateFormatterCreateStringWithDatePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, + CFDateRef)>>('CFDateFormatterCreateStringWithDate'); + late final _CFDateFormatterCreateStringWithDate = + _CFDateFormatterCreateStringWithDatePtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFDateFormatterRef, CFDateRef)>(); + + CFStringRef CFDateFormatterCreateStringWithAbsoluteTime( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + double at, + ) { + return _CFDateFormatterCreateStringWithAbsoluteTime( + allocator, + formatter, + at, + ); + } + + late final _CFDateFormatterCreateStringWithAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, + CFAbsoluteTime)>>('CFDateFormatterCreateStringWithAbsoluteTime'); + late final _CFDateFormatterCreateStringWithAbsoluteTime = + _CFDateFormatterCreateStringWithAbsoluteTimePtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, double)>(); + + CFDateRef CFDateFormatterCreateDateFromString( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + ) { + return _CFDateFormatterCreateDateFromString( + allocator, + formatter, + string, + rangep, + ); + } + + late final _CFDateFormatterCreateDateFromStringPtr = _lookup< + ffi.NativeFunction< + CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, + ffi.Pointer)>>('CFDateFormatterCreateDateFromString'); + late final _CFDateFormatterCreateDateFromString = + _CFDateFormatterCreateDateFromStringPtr.asFunction< + CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, + ffi.Pointer)>(); + + int CFDateFormatterGetAbsoluteTimeFromString( + CFDateFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + ffi.Pointer atp, + ) { + return _CFDateFormatterGetAbsoluteTimeFromString( + formatter, + string, + rangep, + atp, + ); + } + + late final _CFDateFormatterGetAbsoluteTimeFromStringPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDateFormatterRef, CFStringRef, + ffi.Pointer, ffi.Pointer)>>( + 'CFDateFormatterGetAbsoluteTimeFromString'); + late final _CFDateFormatterGetAbsoluteTimeFromString = + _CFDateFormatterGetAbsoluteTimeFromStringPtr.asFunction< + int Function(CFDateFormatterRef, CFStringRef, ffi.Pointer, + ffi.Pointer)>(); + + void CFDateFormatterSetProperty( + CFDateFormatterRef formatter, + CFStringRef key, + CFTypeRef value, + ) { + return _CFDateFormatterSetProperty( + formatter, + key, + value, + ); + } + + late final _CFDateFormatterSetPropertyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFDateFormatterRef, CFStringRef, + CFTypeRef)>>('CFDateFormatterSetProperty'); + late final _CFDateFormatterSetProperty = _CFDateFormatterSetPropertyPtr + .asFunction(); + + CFTypeRef CFDateFormatterCopyProperty( + CFDateFormatterRef formatter, + CFDateFormatterKey key, + ) { + return _CFDateFormatterCopyProperty( + formatter, + key, + ); + } + + late final _CFDateFormatterCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFDateFormatterRef, + CFDateFormatterKey)>>('CFDateFormatterCopyProperty'); + late final _CFDateFormatterCopyProperty = _CFDateFormatterCopyPropertyPtr + .asFunction(); + + late final ffi.Pointer _kCFDateFormatterIsLenient = + _lookup('kCFDateFormatterIsLenient'); + + CFDateFormatterKey get kCFDateFormatterIsLenient => + _kCFDateFormatterIsLenient.value; + + set kCFDateFormatterIsLenient(CFDateFormatterKey value) => + _kCFDateFormatterIsLenient.value = value; + + late final ffi.Pointer _kCFDateFormatterTimeZone = + _lookup('kCFDateFormatterTimeZone'); + + CFDateFormatterKey get kCFDateFormatterTimeZone => + _kCFDateFormatterTimeZone.value; + + set kCFDateFormatterTimeZone(CFDateFormatterKey value) => + _kCFDateFormatterTimeZone.value = value; + + late final ffi.Pointer _kCFDateFormatterCalendarName = + _lookup('kCFDateFormatterCalendarName'); + + CFDateFormatterKey get kCFDateFormatterCalendarName => + _kCFDateFormatterCalendarName.value; + + set kCFDateFormatterCalendarName(CFDateFormatterKey value) => + _kCFDateFormatterCalendarName.value = value; + + late final ffi.Pointer _kCFDateFormatterDefaultFormat = + _lookup('kCFDateFormatterDefaultFormat'); + + CFDateFormatterKey get kCFDateFormatterDefaultFormat => + _kCFDateFormatterDefaultFormat.value; + + set kCFDateFormatterDefaultFormat(CFDateFormatterKey value) => + _kCFDateFormatterDefaultFormat.value = value; + + late final ffi.Pointer + _kCFDateFormatterTwoDigitStartDate = + _lookup('kCFDateFormatterTwoDigitStartDate'); + + CFDateFormatterKey get kCFDateFormatterTwoDigitStartDate => + _kCFDateFormatterTwoDigitStartDate.value; + + set kCFDateFormatterTwoDigitStartDate(CFDateFormatterKey value) => + _kCFDateFormatterTwoDigitStartDate.value = value; + + late final ffi.Pointer _kCFDateFormatterDefaultDate = + _lookup('kCFDateFormatterDefaultDate'); + + CFDateFormatterKey get kCFDateFormatterDefaultDate => + _kCFDateFormatterDefaultDate.value; + + set kCFDateFormatterDefaultDate(CFDateFormatterKey value) => + _kCFDateFormatterDefaultDate.value = value; + + late final ffi.Pointer _kCFDateFormatterCalendar = + _lookup('kCFDateFormatterCalendar'); + + CFDateFormatterKey get kCFDateFormatterCalendar => + _kCFDateFormatterCalendar.value; + + set kCFDateFormatterCalendar(CFDateFormatterKey value) => + _kCFDateFormatterCalendar.value = value; + + late final ffi.Pointer _kCFDateFormatterEraSymbols = + _lookup('kCFDateFormatterEraSymbols'); + + CFDateFormatterKey get kCFDateFormatterEraSymbols => + _kCFDateFormatterEraSymbols.value; + + set kCFDateFormatterEraSymbols(CFDateFormatterKey value) => + _kCFDateFormatterEraSymbols.value = value; + + late final ffi.Pointer _kCFDateFormatterMonthSymbols = + _lookup('kCFDateFormatterMonthSymbols'); + + CFDateFormatterKey get kCFDateFormatterMonthSymbols => + _kCFDateFormatterMonthSymbols.value; + + set kCFDateFormatterMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterMonthSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterShortMonthSymbols = + _lookup('kCFDateFormatterShortMonthSymbols'); + + CFDateFormatterKey get kCFDateFormatterShortMonthSymbols => + _kCFDateFormatterShortMonthSymbols.value; + + set kCFDateFormatterShortMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortMonthSymbols.value = value; + + late final ffi.Pointer _kCFDateFormatterWeekdaySymbols = + _lookup('kCFDateFormatterWeekdaySymbols'); + + CFDateFormatterKey get kCFDateFormatterWeekdaySymbols => + _kCFDateFormatterWeekdaySymbols.value; + + set kCFDateFormatterWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterWeekdaySymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterShortWeekdaySymbols = + _lookup('kCFDateFormatterShortWeekdaySymbols'); + + CFDateFormatterKey get kCFDateFormatterShortWeekdaySymbols => + _kCFDateFormatterShortWeekdaySymbols.value; + + set kCFDateFormatterShortWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortWeekdaySymbols.value = value; + + late final ffi.Pointer _kCFDateFormatterAMSymbol = + _lookup('kCFDateFormatterAMSymbol'); + + CFDateFormatterKey get kCFDateFormatterAMSymbol => + _kCFDateFormatterAMSymbol.value; + + set kCFDateFormatterAMSymbol(CFDateFormatterKey value) => + _kCFDateFormatterAMSymbol.value = value; + + late final ffi.Pointer _kCFDateFormatterPMSymbol = + _lookup('kCFDateFormatterPMSymbol'); + + CFDateFormatterKey get kCFDateFormatterPMSymbol => + _kCFDateFormatterPMSymbol.value; + + set kCFDateFormatterPMSymbol(CFDateFormatterKey value) => + _kCFDateFormatterPMSymbol.value = value; + + late final ffi.Pointer _kCFDateFormatterLongEraSymbols = + _lookup('kCFDateFormatterLongEraSymbols'); + + CFDateFormatterKey get kCFDateFormatterLongEraSymbols => + _kCFDateFormatterLongEraSymbols.value; + + set kCFDateFormatterLongEraSymbols(CFDateFormatterKey value) => + _kCFDateFormatterLongEraSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterVeryShortMonthSymbols = + _lookup('kCFDateFormatterVeryShortMonthSymbols'); + + CFDateFormatterKey get kCFDateFormatterVeryShortMonthSymbols => + _kCFDateFormatterVeryShortMonthSymbols.value; + + set kCFDateFormatterVeryShortMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterVeryShortMonthSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterStandaloneMonthSymbols = + _lookup('kCFDateFormatterStandaloneMonthSymbols'); + + CFDateFormatterKey get kCFDateFormatterStandaloneMonthSymbols => + _kCFDateFormatterStandaloneMonthSymbols.value; + + set kCFDateFormatterStandaloneMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterStandaloneMonthSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterShortStandaloneMonthSymbols = + _lookup( + 'kCFDateFormatterShortStandaloneMonthSymbols'); + + CFDateFormatterKey get kCFDateFormatterShortStandaloneMonthSymbols => + _kCFDateFormatterShortStandaloneMonthSymbols.value; + + set kCFDateFormatterShortStandaloneMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortStandaloneMonthSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterVeryShortStandaloneMonthSymbols = + _lookup( + 'kCFDateFormatterVeryShortStandaloneMonthSymbols'); + + CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneMonthSymbols => + _kCFDateFormatterVeryShortStandaloneMonthSymbols.value; + + set kCFDateFormatterVeryShortStandaloneMonthSymbols( + CFDateFormatterKey value) => + _kCFDateFormatterVeryShortStandaloneMonthSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterVeryShortWeekdaySymbols = + _lookup('kCFDateFormatterVeryShortWeekdaySymbols'); + + CFDateFormatterKey get kCFDateFormatterVeryShortWeekdaySymbols => + _kCFDateFormatterVeryShortWeekdaySymbols.value; + + set kCFDateFormatterVeryShortWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterVeryShortWeekdaySymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterStandaloneWeekdaySymbols = + _lookup('kCFDateFormatterStandaloneWeekdaySymbols'); + + CFDateFormatterKey get kCFDateFormatterStandaloneWeekdaySymbols => + _kCFDateFormatterStandaloneWeekdaySymbols.value; + + set kCFDateFormatterStandaloneWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterStandaloneWeekdaySymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterShortStandaloneWeekdaySymbols = + _lookup( + 'kCFDateFormatterShortStandaloneWeekdaySymbols'); + + CFDateFormatterKey get kCFDateFormatterShortStandaloneWeekdaySymbols => + _kCFDateFormatterShortStandaloneWeekdaySymbols.value; + + set kCFDateFormatterShortStandaloneWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortStandaloneWeekdaySymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols = + _lookup( + 'kCFDateFormatterVeryShortStandaloneWeekdaySymbols'); + + CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneWeekdaySymbols => + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value; + + set kCFDateFormatterVeryShortStandaloneWeekdaySymbols( + CFDateFormatterKey value) => + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value = value; + + late final ffi.Pointer _kCFDateFormatterQuarterSymbols = + _lookup('kCFDateFormatterQuarterSymbols'); + + CFDateFormatterKey get kCFDateFormatterQuarterSymbols => + _kCFDateFormatterQuarterSymbols.value; + + set kCFDateFormatterQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterQuarterSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterShortQuarterSymbols = + _lookup('kCFDateFormatterShortQuarterSymbols'); + + CFDateFormatterKey get kCFDateFormatterShortQuarterSymbols => + _kCFDateFormatterShortQuarterSymbols.value; + + set kCFDateFormatterShortQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortQuarterSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterStandaloneQuarterSymbols = + _lookup('kCFDateFormatterStandaloneQuarterSymbols'); + + CFDateFormatterKey get kCFDateFormatterStandaloneQuarterSymbols => + _kCFDateFormatterStandaloneQuarterSymbols.value; + + set kCFDateFormatterStandaloneQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterStandaloneQuarterSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterShortStandaloneQuarterSymbols = + _lookup( + 'kCFDateFormatterShortStandaloneQuarterSymbols'); + + CFDateFormatterKey get kCFDateFormatterShortStandaloneQuarterSymbols => + _kCFDateFormatterShortStandaloneQuarterSymbols.value; + + set kCFDateFormatterShortStandaloneQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortStandaloneQuarterSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterGregorianStartDate = + _lookup('kCFDateFormatterGregorianStartDate'); + + CFDateFormatterKey get kCFDateFormatterGregorianStartDate => + _kCFDateFormatterGregorianStartDate.value; + + set kCFDateFormatterGregorianStartDate(CFDateFormatterKey value) => + _kCFDateFormatterGregorianStartDate.value = value; + + late final ffi.Pointer + _kCFDateFormatterDoesRelativeDateFormattingKey = + _lookup( + 'kCFDateFormatterDoesRelativeDateFormattingKey'); + + CFDateFormatterKey get kCFDateFormatterDoesRelativeDateFormattingKey => + _kCFDateFormatterDoesRelativeDateFormattingKey.value; + + set kCFDateFormatterDoesRelativeDateFormattingKey(CFDateFormatterKey value) => + _kCFDateFormatterDoesRelativeDateFormattingKey.value = value; + + int CFErrorGetTypeID() { + return _CFErrorGetTypeID(); + } + + late final _CFErrorGetTypeIDPtr = + _lookup>('CFErrorGetTypeID'); + late final _CFErrorGetTypeID = + _CFErrorGetTypeIDPtr.asFunction(); + + late final ffi.Pointer _kCFErrorDomainPOSIX = + _lookup('kCFErrorDomainPOSIX'); + + CFErrorDomain get kCFErrorDomainPOSIX => _kCFErrorDomainPOSIX.value; + + set kCFErrorDomainPOSIX(CFErrorDomain value) => + _kCFErrorDomainPOSIX.value = value; + + late final ffi.Pointer _kCFErrorDomainOSStatus = + _lookup('kCFErrorDomainOSStatus'); + + CFErrorDomain get kCFErrorDomainOSStatus => _kCFErrorDomainOSStatus.value; + + set kCFErrorDomainOSStatus(CFErrorDomain value) => + _kCFErrorDomainOSStatus.value = value; + + late final ffi.Pointer _kCFErrorDomainMach = + _lookup('kCFErrorDomainMach'); + + CFErrorDomain get kCFErrorDomainMach => _kCFErrorDomainMach.value; + + set kCFErrorDomainMach(CFErrorDomain value) => + _kCFErrorDomainMach.value = value; + + late final ffi.Pointer _kCFErrorDomainCocoa = + _lookup('kCFErrorDomainCocoa'); + + CFErrorDomain get kCFErrorDomainCocoa => _kCFErrorDomainCocoa.value; + + set kCFErrorDomainCocoa(CFErrorDomain value) => + _kCFErrorDomainCocoa.value = value; + + late final ffi.Pointer _kCFErrorLocalizedDescriptionKey = + _lookup('kCFErrorLocalizedDescriptionKey'); + + CFStringRef get kCFErrorLocalizedDescriptionKey => + _kCFErrorLocalizedDescriptionKey.value; + + set kCFErrorLocalizedDescriptionKey(CFStringRef value) => + _kCFErrorLocalizedDescriptionKey.value = value; + + late final ffi.Pointer _kCFErrorLocalizedFailureKey = + _lookup('kCFErrorLocalizedFailureKey'); + + CFStringRef get kCFErrorLocalizedFailureKey => + _kCFErrorLocalizedFailureKey.value; + + set kCFErrorLocalizedFailureKey(CFStringRef value) => + _kCFErrorLocalizedFailureKey.value = value; + + late final ffi.Pointer _kCFErrorLocalizedFailureReasonKey = + _lookup('kCFErrorLocalizedFailureReasonKey'); + + CFStringRef get kCFErrorLocalizedFailureReasonKey => + _kCFErrorLocalizedFailureReasonKey.value; + + set kCFErrorLocalizedFailureReasonKey(CFStringRef value) => + _kCFErrorLocalizedFailureReasonKey.value = value; + + late final ffi.Pointer _kCFErrorLocalizedRecoverySuggestionKey = + _lookup('kCFErrorLocalizedRecoverySuggestionKey'); + + CFStringRef get kCFErrorLocalizedRecoverySuggestionKey => + _kCFErrorLocalizedRecoverySuggestionKey.value; + + set kCFErrorLocalizedRecoverySuggestionKey(CFStringRef value) => + _kCFErrorLocalizedRecoverySuggestionKey.value = value; + + late final ffi.Pointer _kCFErrorDescriptionKey = + _lookup('kCFErrorDescriptionKey'); + + CFStringRef get kCFErrorDescriptionKey => _kCFErrorDescriptionKey.value; + + set kCFErrorDescriptionKey(CFStringRef value) => + _kCFErrorDescriptionKey.value = value; + + late final ffi.Pointer _kCFErrorUnderlyingErrorKey = + _lookup('kCFErrorUnderlyingErrorKey'); + + CFStringRef get kCFErrorUnderlyingErrorKey => + _kCFErrorUnderlyingErrorKey.value; + + set kCFErrorUnderlyingErrorKey(CFStringRef value) => + _kCFErrorUnderlyingErrorKey.value = value; + + late final ffi.Pointer _kCFErrorURLKey = + _lookup('kCFErrorURLKey'); + + CFStringRef get kCFErrorURLKey => _kCFErrorURLKey.value; + + set kCFErrorURLKey(CFStringRef value) => _kCFErrorURLKey.value = value; + + late final ffi.Pointer _kCFErrorFilePathKey = + _lookup('kCFErrorFilePathKey'); + + CFStringRef get kCFErrorFilePathKey => _kCFErrorFilePathKey.value; + + set kCFErrorFilePathKey(CFStringRef value) => + _kCFErrorFilePathKey.value = value; + + CFErrorRef CFErrorCreate( + CFAllocatorRef allocator, + CFErrorDomain domain, + int code, + CFDictionaryRef userInfo, + ) { + return _CFErrorCreate( + allocator, + domain, + code, + userInfo, + ); + } + + late final _CFErrorCreatePtr = _lookup< + ffi.NativeFunction< + CFErrorRef Function(CFAllocatorRef, CFErrorDomain, CFIndex, + CFDictionaryRef)>>('CFErrorCreate'); + late final _CFErrorCreate = _CFErrorCreatePtr.asFunction< + CFErrorRef Function( + CFAllocatorRef, CFErrorDomain, int, CFDictionaryRef)>(); + + CFErrorRef CFErrorCreateWithUserInfoKeysAndValues( + CFAllocatorRef allocator, + CFErrorDomain domain, + int code, + ffi.Pointer> userInfoKeys, + ffi.Pointer> userInfoValues, + int numUserInfoValues, + ) { + return _CFErrorCreateWithUserInfoKeysAndValues( + allocator, + domain, + code, + userInfoKeys, + userInfoValues, + numUserInfoValues, + ); + } + + late final _CFErrorCreateWithUserInfoKeysAndValuesPtr = _lookup< + ffi.NativeFunction< + CFErrorRef Function( + CFAllocatorRef, + CFErrorDomain, + CFIndex, + ffi.Pointer>, + ffi.Pointer>, + CFIndex)>>('CFErrorCreateWithUserInfoKeysAndValues'); + late final _CFErrorCreateWithUserInfoKeysAndValues = + _CFErrorCreateWithUserInfoKeysAndValuesPtr.asFunction< + CFErrorRef Function( + CFAllocatorRef, + CFErrorDomain, + int, + ffi.Pointer>, + ffi.Pointer>, + int)>(); + + CFErrorDomain CFErrorGetDomain( + CFErrorRef err, + ) { + return _CFErrorGetDomain( + err, + ); + } + + late final _CFErrorGetDomainPtr = + _lookup>( + 'CFErrorGetDomain'); + late final _CFErrorGetDomain = + _CFErrorGetDomainPtr.asFunction(); + + int CFErrorGetCode( + CFErrorRef err, + ) { + return _CFErrorGetCode( + err, + ); + } + + late final _CFErrorGetCodePtr = + _lookup>( + 'CFErrorGetCode'); + late final _CFErrorGetCode = + _CFErrorGetCodePtr.asFunction(); + + CFDictionaryRef CFErrorCopyUserInfo( + CFErrorRef err, + ) { + return _CFErrorCopyUserInfo( + err, + ); + } + + late final _CFErrorCopyUserInfoPtr = + _lookup>( + 'CFErrorCopyUserInfo'); + late final _CFErrorCopyUserInfo = _CFErrorCopyUserInfoPtr.asFunction< + CFDictionaryRef Function(CFErrorRef)>(); + + CFStringRef CFErrorCopyDescription( + CFErrorRef err, + ) { + return _CFErrorCopyDescription( + err, + ); + } + + late final _CFErrorCopyDescriptionPtr = + _lookup>( + 'CFErrorCopyDescription'); + late final _CFErrorCopyDescription = + _CFErrorCopyDescriptionPtr.asFunction(); + + CFStringRef CFErrorCopyFailureReason( + CFErrorRef err, + ) { + return _CFErrorCopyFailureReason( + err, + ); + } + + late final _CFErrorCopyFailureReasonPtr = + _lookup>( + 'CFErrorCopyFailureReason'); + late final _CFErrorCopyFailureReason = _CFErrorCopyFailureReasonPtr + .asFunction(); + + CFStringRef CFErrorCopyRecoverySuggestion( + CFErrorRef err, + ) { + return _CFErrorCopyRecoverySuggestion( + err, + ); + } + + late final _CFErrorCopyRecoverySuggestionPtr = + _lookup>( + 'CFErrorCopyRecoverySuggestion'); + late final _CFErrorCopyRecoverySuggestion = _CFErrorCopyRecoverySuggestionPtr + .asFunction(); + + late final ffi.Pointer _kCFBooleanTrue = + _lookup('kCFBooleanTrue'); + + CFBooleanRef get kCFBooleanTrue => _kCFBooleanTrue.value; + + set kCFBooleanTrue(CFBooleanRef value) => _kCFBooleanTrue.value = value; + + late final ffi.Pointer _kCFBooleanFalse = + _lookup('kCFBooleanFalse'); + + CFBooleanRef get kCFBooleanFalse => _kCFBooleanFalse.value; + + set kCFBooleanFalse(CFBooleanRef value) => _kCFBooleanFalse.value = value; + + int CFBooleanGetTypeID() { + return _CFBooleanGetTypeID(); + } + + late final _CFBooleanGetTypeIDPtr = + _lookup>('CFBooleanGetTypeID'); + late final _CFBooleanGetTypeID = + _CFBooleanGetTypeIDPtr.asFunction(); + + int CFBooleanGetValue( + CFBooleanRef boolean, + ) { + return _CFBooleanGetValue( + boolean, + ); + } + + late final _CFBooleanGetValuePtr = + _lookup>( + 'CFBooleanGetValue'); + late final _CFBooleanGetValue = + _CFBooleanGetValuePtr.asFunction(); + + late final ffi.Pointer _kCFNumberPositiveInfinity = + _lookup('kCFNumberPositiveInfinity'); + + CFNumberRef get kCFNumberPositiveInfinity => _kCFNumberPositiveInfinity.value; + + set kCFNumberPositiveInfinity(CFNumberRef value) => + _kCFNumberPositiveInfinity.value = value; + + late final ffi.Pointer _kCFNumberNegativeInfinity = + _lookup('kCFNumberNegativeInfinity'); + + CFNumberRef get kCFNumberNegativeInfinity => _kCFNumberNegativeInfinity.value; + + set kCFNumberNegativeInfinity(CFNumberRef value) => + _kCFNumberNegativeInfinity.value = value; + + late final ffi.Pointer _kCFNumberNaN = + _lookup('kCFNumberNaN'); + + CFNumberRef get kCFNumberNaN => _kCFNumberNaN.value; + + set kCFNumberNaN(CFNumberRef value) => _kCFNumberNaN.value = value; + + int CFNumberGetTypeID() { + return _CFNumberGetTypeID(); + } + + late final _CFNumberGetTypeIDPtr = + _lookup>('CFNumberGetTypeID'); + late final _CFNumberGetTypeID = + _CFNumberGetTypeIDPtr.asFunction(); + + CFNumberRef CFNumberCreate( + CFAllocatorRef allocator, + int theType, + ffi.Pointer valuePtr, + ) { + return _CFNumberCreate( + allocator, + theType, + valuePtr, + ); + } + + late final _CFNumberCreatePtr = _lookup< + ffi.NativeFunction< + CFNumberRef Function(CFAllocatorRef, ffi.Int32, + ffi.Pointer)>>('CFNumberCreate'); + late final _CFNumberCreate = _CFNumberCreatePtr.asFunction< + CFNumberRef Function(CFAllocatorRef, int, ffi.Pointer)>(); + + int CFNumberGetType( + CFNumberRef number, + ) { + return _CFNumberGetType( + number, + ); + } + + late final _CFNumberGetTypePtr = + _lookup>( + 'CFNumberGetType'); + late final _CFNumberGetType = + _CFNumberGetTypePtr.asFunction(); + + int CFNumberGetByteSize( + CFNumberRef number, + ) { + return _CFNumberGetByteSize( + number, + ); + } + + late final _CFNumberGetByteSizePtr = + _lookup>( + 'CFNumberGetByteSize'); + late final _CFNumberGetByteSize = + _CFNumberGetByteSizePtr.asFunction(); + + int CFNumberIsFloatType( + CFNumberRef number, + ) { + return _CFNumberIsFloatType( + number, + ); + } + + late final _CFNumberIsFloatTypePtr = + _lookup>( + 'CFNumberIsFloatType'); + late final _CFNumberIsFloatType = + _CFNumberIsFloatTypePtr.asFunction(); + + int CFNumberGetValue( + CFNumberRef number, + int theType, + ffi.Pointer valuePtr, + ) { + return _CFNumberGetValue( + number, + theType, + valuePtr, + ); + } + + late final _CFNumberGetValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFNumberRef, ffi.Int32, + ffi.Pointer)>>('CFNumberGetValue'); + late final _CFNumberGetValue = _CFNumberGetValuePtr.asFunction< + int Function(CFNumberRef, int, ffi.Pointer)>(); + + int CFNumberCompare( + CFNumberRef number, + CFNumberRef otherNumber, + ffi.Pointer context, + ) { + return _CFNumberCompare( + number, + otherNumber, + context, + ); + } + + late final _CFNumberComparePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFNumberRef, CFNumberRef, + ffi.Pointer)>>('CFNumberCompare'); + late final _CFNumberCompare = _CFNumberComparePtr.asFunction< + int Function(CFNumberRef, CFNumberRef, ffi.Pointer)>(); + + int CFNumberFormatterGetTypeID() { + return _CFNumberFormatterGetTypeID(); + } + + late final _CFNumberFormatterGetTypeIDPtr = + _lookup>( + 'CFNumberFormatterGetTypeID'); + late final _CFNumberFormatterGetTypeID = + _CFNumberFormatterGetTypeIDPtr.asFunction(); + + CFNumberFormatterRef CFNumberFormatterCreate( + CFAllocatorRef allocator, + CFLocaleRef locale, + int style, + ) { + return _CFNumberFormatterCreate( + allocator, + locale, + style, + ); + } + + late final _CFNumberFormatterCreatePtr = _lookup< + ffi.NativeFunction< + CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, + ffi.Int32)>>('CFNumberFormatterCreate'); + late final _CFNumberFormatterCreate = _CFNumberFormatterCreatePtr.asFunction< + CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, int)>(); + + CFLocaleRef CFNumberFormatterGetLocale( + CFNumberFormatterRef formatter, + ) { + return _CFNumberFormatterGetLocale( + formatter, + ); + } + + late final _CFNumberFormatterGetLocalePtr = + _lookup>( + 'CFNumberFormatterGetLocale'); + late final _CFNumberFormatterGetLocale = _CFNumberFormatterGetLocalePtr + .asFunction(); + + int CFNumberFormatterGetStyle( + CFNumberFormatterRef formatter, + ) { + return _CFNumberFormatterGetStyle( + formatter, + ); + } + + late final _CFNumberFormatterGetStylePtr = + _lookup>( + 'CFNumberFormatterGetStyle'); + late final _CFNumberFormatterGetStyle = _CFNumberFormatterGetStylePtr + .asFunction(); + + CFStringRef CFNumberFormatterGetFormat( + CFNumberFormatterRef formatter, + ) { + return _CFNumberFormatterGetFormat( + formatter, + ); + } + + late final _CFNumberFormatterGetFormatPtr = + _lookup>( + 'CFNumberFormatterGetFormat'); + late final _CFNumberFormatterGetFormat = _CFNumberFormatterGetFormatPtr + .asFunction(); + + void CFNumberFormatterSetFormat( + CFNumberFormatterRef formatter, + CFStringRef formatString, + ) { + return _CFNumberFormatterSetFormat( + formatter, + formatString, + ); + } + + late final _CFNumberFormatterSetFormatPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFNumberFormatterRef, + CFStringRef)>>('CFNumberFormatterSetFormat'); + late final _CFNumberFormatterSetFormat = _CFNumberFormatterSetFormatPtr + .asFunction(); + + CFStringRef CFNumberFormatterCreateStringWithNumber( + CFAllocatorRef allocator, + CFNumberFormatterRef formatter, + CFNumberRef number, + ) { + return _CFNumberFormatterCreateStringWithNumber( + allocator, + formatter, + number, + ); + } + + late final _CFNumberFormatterCreateStringWithNumberPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, + CFNumberRef)>>('CFNumberFormatterCreateStringWithNumber'); + late final _CFNumberFormatterCreateStringWithNumber = + _CFNumberFormatterCreateStringWithNumberPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFNumberFormatterRef, CFNumberRef)>(); + + CFStringRef CFNumberFormatterCreateStringWithValue( + CFAllocatorRef allocator, + CFNumberFormatterRef formatter, + int numberType, + ffi.Pointer valuePtr, + ) { + return _CFNumberFormatterCreateStringWithValue( + allocator, + formatter, + numberType, + valuePtr, + ); + } + + late final _CFNumberFormatterCreateStringWithValuePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, + ffi.Int32, ffi.Pointer)>>( + 'CFNumberFormatterCreateStringWithValue'); + late final _CFNumberFormatterCreateStringWithValue = + _CFNumberFormatterCreateStringWithValuePtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, int, + ffi.Pointer)>(); + + CFNumberRef CFNumberFormatterCreateNumberFromString( + CFAllocatorRef allocator, + CFNumberFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + int options, + ) { + return _CFNumberFormatterCreateNumberFromString( + allocator, + formatter, + string, + rangep, + options, + ); + } + + late final _CFNumberFormatterCreateNumberFromStringPtr = _lookup< + ffi.NativeFunction< + CFNumberRef Function( + CFAllocatorRef, + CFNumberFormatterRef, + CFStringRef, + ffi.Pointer, + CFOptionFlags)>>('CFNumberFormatterCreateNumberFromString'); + late final _CFNumberFormatterCreateNumberFromString = + _CFNumberFormatterCreateNumberFromStringPtr.asFunction< + CFNumberRef Function(CFAllocatorRef, CFNumberFormatterRef, + CFStringRef, ffi.Pointer, int)>(); + + int CFNumberFormatterGetValueFromString( + CFNumberFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + int numberType, + ffi.Pointer valuePtr, + ) { + return _CFNumberFormatterGetValueFromString( + formatter, + string, + rangep, + numberType, + valuePtr, + ); + } + + late final _CFNumberFormatterGetValueFromStringPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFNumberFormatterRef, + CFStringRef, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('CFNumberFormatterGetValueFromString'); + late final _CFNumberFormatterGetValueFromString = + _CFNumberFormatterGetValueFromStringPtr.asFunction< + int Function(CFNumberFormatterRef, CFStringRef, ffi.Pointer, + int, ffi.Pointer)>(); + + void CFNumberFormatterSetProperty( + CFNumberFormatterRef formatter, + CFNumberFormatterKey key, + CFTypeRef value, + ) { + return _CFNumberFormatterSetProperty( + formatter, + key, + value, + ); + } + + late final _CFNumberFormatterSetPropertyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFNumberFormatterRef, CFNumberFormatterKey, + CFTypeRef)>>('CFNumberFormatterSetProperty'); + late final _CFNumberFormatterSetProperty = + _CFNumberFormatterSetPropertyPtr.asFunction< + void Function( + CFNumberFormatterRef, CFNumberFormatterKey, CFTypeRef)>(); + + CFTypeRef CFNumberFormatterCopyProperty( + CFNumberFormatterRef formatter, + CFNumberFormatterKey key, + ) { + return _CFNumberFormatterCopyProperty( + formatter, + key, + ); + } + + late final _CFNumberFormatterCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFNumberFormatterRef, + CFNumberFormatterKey)>>('CFNumberFormatterCopyProperty'); + late final _CFNumberFormatterCopyProperty = + _CFNumberFormatterCopyPropertyPtr.asFunction< + CFTypeRef Function(CFNumberFormatterRef, CFNumberFormatterKey)>(); + + late final ffi.Pointer _kCFNumberFormatterCurrencyCode = + _lookup('kCFNumberFormatterCurrencyCode'); + + CFNumberFormatterKey get kCFNumberFormatterCurrencyCode => + _kCFNumberFormatterCurrencyCode.value; + + set kCFNumberFormatterCurrencyCode(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencyCode.value = value; + + late final ffi.Pointer + _kCFNumberFormatterDecimalSeparator = + _lookup('kCFNumberFormatterDecimalSeparator'); + + CFNumberFormatterKey get kCFNumberFormatterDecimalSeparator => + _kCFNumberFormatterDecimalSeparator.value; + + set kCFNumberFormatterDecimalSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterDecimalSeparator.value = value; + + late final ffi.Pointer + _kCFNumberFormatterCurrencyDecimalSeparator = + _lookup( + 'kCFNumberFormatterCurrencyDecimalSeparator'); + + CFNumberFormatterKey get kCFNumberFormatterCurrencyDecimalSeparator => + _kCFNumberFormatterCurrencyDecimalSeparator.value; + + set kCFNumberFormatterCurrencyDecimalSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencyDecimalSeparator.value = value; + + late final ffi.Pointer + _kCFNumberFormatterAlwaysShowDecimalSeparator = + _lookup( + 'kCFNumberFormatterAlwaysShowDecimalSeparator'); + + CFNumberFormatterKey get kCFNumberFormatterAlwaysShowDecimalSeparator => + _kCFNumberFormatterAlwaysShowDecimalSeparator.value; + + set kCFNumberFormatterAlwaysShowDecimalSeparator( + CFNumberFormatterKey value) => + _kCFNumberFormatterAlwaysShowDecimalSeparator.value = value; + + late final ffi.Pointer + _kCFNumberFormatterGroupingSeparator = + _lookup('kCFNumberFormatterGroupingSeparator'); + + CFNumberFormatterKey get kCFNumberFormatterGroupingSeparator => + _kCFNumberFormatterGroupingSeparator.value; + + set kCFNumberFormatterGroupingSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterGroupingSeparator.value = value; + + late final ffi.Pointer + _kCFNumberFormatterUseGroupingSeparator = + _lookup('kCFNumberFormatterUseGroupingSeparator'); + + CFNumberFormatterKey get kCFNumberFormatterUseGroupingSeparator => + _kCFNumberFormatterUseGroupingSeparator.value; + + set kCFNumberFormatterUseGroupingSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterUseGroupingSeparator.value = value; + + late final ffi.Pointer + _kCFNumberFormatterPercentSymbol = + _lookup('kCFNumberFormatterPercentSymbol'); + + CFNumberFormatterKey get kCFNumberFormatterPercentSymbol => + _kCFNumberFormatterPercentSymbol.value; + + set kCFNumberFormatterPercentSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterPercentSymbol.value = value; + + late final ffi.Pointer _kCFNumberFormatterZeroSymbol = + _lookup('kCFNumberFormatterZeroSymbol'); + + CFNumberFormatterKey get kCFNumberFormatterZeroSymbol => + _kCFNumberFormatterZeroSymbol.value; + + set kCFNumberFormatterZeroSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterZeroSymbol.value = value; + + late final ffi.Pointer _kCFNumberFormatterNaNSymbol = + _lookup('kCFNumberFormatterNaNSymbol'); + + CFNumberFormatterKey get kCFNumberFormatterNaNSymbol => + _kCFNumberFormatterNaNSymbol.value; + + set kCFNumberFormatterNaNSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterNaNSymbol.value = value; + + late final ffi.Pointer + _kCFNumberFormatterInfinitySymbol = + _lookup('kCFNumberFormatterInfinitySymbol'); + + CFNumberFormatterKey get kCFNumberFormatterInfinitySymbol => + _kCFNumberFormatterInfinitySymbol.value; + + set kCFNumberFormatterInfinitySymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterInfinitySymbol.value = value; + + late final ffi.Pointer _kCFNumberFormatterMinusSign = + _lookup('kCFNumberFormatterMinusSign'); + + CFNumberFormatterKey get kCFNumberFormatterMinusSign => + _kCFNumberFormatterMinusSign.value; + + set kCFNumberFormatterMinusSign(CFNumberFormatterKey value) => + _kCFNumberFormatterMinusSign.value = value; + + late final ffi.Pointer _kCFNumberFormatterPlusSign = + _lookup('kCFNumberFormatterPlusSign'); + + CFNumberFormatterKey get kCFNumberFormatterPlusSign => + _kCFNumberFormatterPlusSign.value; + + set kCFNumberFormatterPlusSign(CFNumberFormatterKey value) => + _kCFNumberFormatterPlusSign.value = value; + + late final ffi.Pointer + _kCFNumberFormatterCurrencySymbol = + _lookup('kCFNumberFormatterCurrencySymbol'); + + CFNumberFormatterKey get kCFNumberFormatterCurrencySymbol => + _kCFNumberFormatterCurrencySymbol.value; + + set kCFNumberFormatterCurrencySymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencySymbol.value = value; + + late final ffi.Pointer + _kCFNumberFormatterExponentSymbol = + _lookup('kCFNumberFormatterExponentSymbol'); + + CFNumberFormatterKey get kCFNumberFormatterExponentSymbol => + _kCFNumberFormatterExponentSymbol.value; + + set kCFNumberFormatterExponentSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterExponentSymbol.value = value; + + late final ffi.Pointer + _kCFNumberFormatterMinIntegerDigits = + _lookup('kCFNumberFormatterMinIntegerDigits'); + + CFNumberFormatterKey get kCFNumberFormatterMinIntegerDigits => + _kCFNumberFormatterMinIntegerDigits.value; + + set kCFNumberFormatterMinIntegerDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMinIntegerDigits.value = value; + + late final ffi.Pointer + _kCFNumberFormatterMaxIntegerDigits = + _lookup('kCFNumberFormatterMaxIntegerDigits'); + + CFNumberFormatterKey get kCFNumberFormatterMaxIntegerDigits => + _kCFNumberFormatterMaxIntegerDigits.value; + + set kCFNumberFormatterMaxIntegerDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMaxIntegerDigits.value = value; + + late final ffi.Pointer + _kCFNumberFormatterMinFractionDigits = + _lookup('kCFNumberFormatterMinFractionDigits'); + + CFNumberFormatterKey get kCFNumberFormatterMinFractionDigits => + _kCFNumberFormatterMinFractionDigits.value; + + set kCFNumberFormatterMinFractionDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMinFractionDigits.value = value; + + late final ffi.Pointer + _kCFNumberFormatterMaxFractionDigits = + _lookup('kCFNumberFormatterMaxFractionDigits'); + + CFNumberFormatterKey get kCFNumberFormatterMaxFractionDigits => + _kCFNumberFormatterMaxFractionDigits.value; + + set kCFNumberFormatterMaxFractionDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMaxFractionDigits.value = value; + + late final ffi.Pointer _kCFNumberFormatterGroupingSize = + _lookup('kCFNumberFormatterGroupingSize'); + + CFNumberFormatterKey get kCFNumberFormatterGroupingSize => + _kCFNumberFormatterGroupingSize.value; + + set kCFNumberFormatterGroupingSize(CFNumberFormatterKey value) => + _kCFNumberFormatterGroupingSize.value = value; + + late final ffi.Pointer + _kCFNumberFormatterSecondaryGroupingSize = + _lookup('kCFNumberFormatterSecondaryGroupingSize'); + + CFNumberFormatterKey get kCFNumberFormatterSecondaryGroupingSize => + _kCFNumberFormatterSecondaryGroupingSize.value; + + set kCFNumberFormatterSecondaryGroupingSize(CFNumberFormatterKey value) => + _kCFNumberFormatterSecondaryGroupingSize.value = value; + + late final ffi.Pointer _kCFNumberFormatterRoundingMode = + _lookup('kCFNumberFormatterRoundingMode'); + + CFNumberFormatterKey get kCFNumberFormatterRoundingMode => + _kCFNumberFormatterRoundingMode.value; + + set kCFNumberFormatterRoundingMode(CFNumberFormatterKey value) => + _kCFNumberFormatterRoundingMode.value = value; + + late final ffi.Pointer + _kCFNumberFormatterRoundingIncrement = + _lookup('kCFNumberFormatterRoundingIncrement'); + + CFNumberFormatterKey get kCFNumberFormatterRoundingIncrement => + _kCFNumberFormatterRoundingIncrement.value; + + set kCFNumberFormatterRoundingIncrement(CFNumberFormatterKey value) => + _kCFNumberFormatterRoundingIncrement.value = value; + + late final ffi.Pointer _kCFNumberFormatterFormatWidth = + _lookup('kCFNumberFormatterFormatWidth'); + + CFNumberFormatterKey get kCFNumberFormatterFormatWidth => + _kCFNumberFormatterFormatWidth.value; + + set kCFNumberFormatterFormatWidth(CFNumberFormatterKey value) => + _kCFNumberFormatterFormatWidth.value = value; + + late final ffi.Pointer + _kCFNumberFormatterPaddingPosition = + _lookup('kCFNumberFormatterPaddingPosition'); + + CFNumberFormatterKey get kCFNumberFormatterPaddingPosition => + _kCFNumberFormatterPaddingPosition.value; + + set kCFNumberFormatterPaddingPosition(CFNumberFormatterKey value) => + _kCFNumberFormatterPaddingPosition.value = value; + + late final ffi.Pointer + _kCFNumberFormatterPaddingCharacter = + _lookup('kCFNumberFormatterPaddingCharacter'); + + CFNumberFormatterKey get kCFNumberFormatterPaddingCharacter => + _kCFNumberFormatterPaddingCharacter.value; + + set kCFNumberFormatterPaddingCharacter(CFNumberFormatterKey value) => + _kCFNumberFormatterPaddingCharacter.value = value; + + late final ffi.Pointer + _kCFNumberFormatterDefaultFormat = + _lookup('kCFNumberFormatterDefaultFormat'); + + CFNumberFormatterKey get kCFNumberFormatterDefaultFormat => + _kCFNumberFormatterDefaultFormat.value; + + set kCFNumberFormatterDefaultFormat(CFNumberFormatterKey value) => + _kCFNumberFormatterDefaultFormat.value = value; + + late final ffi.Pointer _kCFNumberFormatterMultiplier = + _lookup('kCFNumberFormatterMultiplier'); + + CFNumberFormatterKey get kCFNumberFormatterMultiplier => + _kCFNumberFormatterMultiplier.value; + + set kCFNumberFormatterMultiplier(CFNumberFormatterKey value) => + _kCFNumberFormatterMultiplier.value = value; + + late final ffi.Pointer + _kCFNumberFormatterPositivePrefix = + _lookup('kCFNumberFormatterPositivePrefix'); + + CFNumberFormatterKey get kCFNumberFormatterPositivePrefix => + _kCFNumberFormatterPositivePrefix.value; + + set kCFNumberFormatterPositivePrefix(CFNumberFormatterKey value) => + _kCFNumberFormatterPositivePrefix.value = value; + + late final ffi.Pointer + _kCFNumberFormatterPositiveSuffix = + _lookup('kCFNumberFormatterPositiveSuffix'); + + CFNumberFormatterKey get kCFNumberFormatterPositiveSuffix => + _kCFNumberFormatterPositiveSuffix.value; + + set kCFNumberFormatterPositiveSuffix(CFNumberFormatterKey value) => + _kCFNumberFormatterPositiveSuffix.value = value; + + late final ffi.Pointer + _kCFNumberFormatterNegativePrefix = + _lookup('kCFNumberFormatterNegativePrefix'); + + CFNumberFormatterKey get kCFNumberFormatterNegativePrefix => + _kCFNumberFormatterNegativePrefix.value; + + set kCFNumberFormatterNegativePrefix(CFNumberFormatterKey value) => + _kCFNumberFormatterNegativePrefix.value = value; + + late final ffi.Pointer + _kCFNumberFormatterNegativeSuffix = + _lookup('kCFNumberFormatterNegativeSuffix'); + + CFNumberFormatterKey get kCFNumberFormatterNegativeSuffix => + _kCFNumberFormatterNegativeSuffix.value; + + set kCFNumberFormatterNegativeSuffix(CFNumberFormatterKey value) => + _kCFNumberFormatterNegativeSuffix.value = value; + + late final ffi.Pointer + _kCFNumberFormatterPerMillSymbol = + _lookup('kCFNumberFormatterPerMillSymbol'); + + CFNumberFormatterKey get kCFNumberFormatterPerMillSymbol => + _kCFNumberFormatterPerMillSymbol.value; + + set kCFNumberFormatterPerMillSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterPerMillSymbol.value = value; + + late final ffi.Pointer + _kCFNumberFormatterInternationalCurrencySymbol = + _lookup( + 'kCFNumberFormatterInternationalCurrencySymbol'); + + CFNumberFormatterKey get kCFNumberFormatterInternationalCurrencySymbol => + _kCFNumberFormatterInternationalCurrencySymbol.value; + + set kCFNumberFormatterInternationalCurrencySymbol( + CFNumberFormatterKey value) => + _kCFNumberFormatterInternationalCurrencySymbol.value = value; + + late final ffi.Pointer + _kCFNumberFormatterCurrencyGroupingSeparator = + _lookup( + 'kCFNumberFormatterCurrencyGroupingSeparator'); + + CFNumberFormatterKey get kCFNumberFormatterCurrencyGroupingSeparator => + _kCFNumberFormatterCurrencyGroupingSeparator.value; + + set kCFNumberFormatterCurrencyGroupingSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencyGroupingSeparator.value = value; + + late final ffi.Pointer _kCFNumberFormatterIsLenient = + _lookup('kCFNumberFormatterIsLenient'); + + CFNumberFormatterKey get kCFNumberFormatterIsLenient => + _kCFNumberFormatterIsLenient.value; + + set kCFNumberFormatterIsLenient(CFNumberFormatterKey value) => + _kCFNumberFormatterIsLenient.value = value; + + late final ffi.Pointer + _kCFNumberFormatterUseSignificantDigits = + _lookup('kCFNumberFormatterUseSignificantDigits'); + + CFNumberFormatterKey get kCFNumberFormatterUseSignificantDigits => + _kCFNumberFormatterUseSignificantDigits.value; + + set kCFNumberFormatterUseSignificantDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterUseSignificantDigits.value = value; + + late final ffi.Pointer + _kCFNumberFormatterMinSignificantDigits = + _lookup('kCFNumberFormatterMinSignificantDigits'); + + CFNumberFormatterKey get kCFNumberFormatterMinSignificantDigits => + _kCFNumberFormatterMinSignificantDigits.value; + + set kCFNumberFormatterMinSignificantDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMinSignificantDigits.value = value; + + late final ffi.Pointer + _kCFNumberFormatterMaxSignificantDigits = + _lookup('kCFNumberFormatterMaxSignificantDigits'); + + CFNumberFormatterKey get kCFNumberFormatterMaxSignificantDigits => + _kCFNumberFormatterMaxSignificantDigits.value; + + set kCFNumberFormatterMaxSignificantDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMaxSignificantDigits.value = value; + + int CFNumberFormatterGetDecimalInfoForCurrencyCode( + CFStringRef currencyCode, + ffi.Pointer defaultFractionDigits, + ffi.Pointer roundingIncrement, + ) { + return _CFNumberFormatterGetDecimalInfoForCurrencyCode( + currencyCode, + defaultFractionDigits, + roundingIncrement, + ); + } + + late final _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>>( + 'CFNumberFormatterGetDecimalInfoForCurrencyCode'); + late final _CFNumberFormatterGetDecimalInfoForCurrencyCode = + _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr.asFunction< + int Function( + CFStringRef, ffi.Pointer, ffi.Pointer)>(); + + late final ffi.Pointer _kCFPreferencesAnyApplication = + _lookup('kCFPreferencesAnyApplication'); + + CFStringRef get kCFPreferencesAnyApplication => + _kCFPreferencesAnyApplication.value; + + set kCFPreferencesAnyApplication(CFStringRef value) => + _kCFPreferencesAnyApplication.value = value; + + late final ffi.Pointer _kCFPreferencesCurrentApplication = + _lookup('kCFPreferencesCurrentApplication'); + + CFStringRef get kCFPreferencesCurrentApplication => + _kCFPreferencesCurrentApplication.value; + + set kCFPreferencesCurrentApplication(CFStringRef value) => + _kCFPreferencesCurrentApplication.value = value; + + late final ffi.Pointer _kCFPreferencesAnyHost = + _lookup('kCFPreferencesAnyHost'); + + CFStringRef get kCFPreferencesAnyHost => _kCFPreferencesAnyHost.value; + + set kCFPreferencesAnyHost(CFStringRef value) => + _kCFPreferencesAnyHost.value = value; + + late final ffi.Pointer _kCFPreferencesCurrentHost = + _lookup('kCFPreferencesCurrentHost'); + + CFStringRef get kCFPreferencesCurrentHost => _kCFPreferencesCurrentHost.value; + + set kCFPreferencesCurrentHost(CFStringRef value) => + _kCFPreferencesCurrentHost.value = value; + + late final ffi.Pointer _kCFPreferencesAnyUser = + _lookup('kCFPreferencesAnyUser'); + + CFStringRef get kCFPreferencesAnyUser => _kCFPreferencesAnyUser.value; + + set kCFPreferencesAnyUser(CFStringRef value) => + _kCFPreferencesAnyUser.value = value; + + late final ffi.Pointer _kCFPreferencesCurrentUser = + _lookup('kCFPreferencesCurrentUser'); + + CFStringRef get kCFPreferencesCurrentUser => _kCFPreferencesCurrentUser.value; + + set kCFPreferencesCurrentUser(CFStringRef value) => + _kCFPreferencesCurrentUser.value = value; + + CFPropertyListRef CFPreferencesCopyAppValue( + CFStringRef key, + CFStringRef applicationID, + ) { + return _CFPreferencesCopyAppValue( + key, + applicationID, + ); + } + + late final _CFPreferencesCopyAppValuePtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFStringRef, CFStringRef)>>('CFPreferencesCopyAppValue'); + late final _CFPreferencesCopyAppValue = _CFPreferencesCopyAppValuePtr + .asFunction(); + + int CFPreferencesGetAppBooleanValue( + CFStringRef key, + CFStringRef applicationID, + ffi.Pointer keyExistsAndHasValidFormat, + ) { + return _CFPreferencesGetAppBooleanValue( + key, + applicationID, + keyExistsAndHasValidFormat, + ); + } + + late final _CFPreferencesGetAppBooleanValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, CFStringRef, + ffi.Pointer)>>('CFPreferencesGetAppBooleanValue'); + late final _CFPreferencesGetAppBooleanValue = + _CFPreferencesGetAppBooleanValuePtr.asFunction< + int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); + + int CFPreferencesGetAppIntegerValue( + CFStringRef key, + CFStringRef applicationID, + ffi.Pointer keyExistsAndHasValidFormat, + ) { + return _CFPreferencesGetAppIntegerValue( + key, + applicationID, + keyExistsAndHasValidFormat, + ); + } + + late final _CFPreferencesGetAppIntegerValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFStringRef, CFStringRef, + ffi.Pointer)>>('CFPreferencesGetAppIntegerValue'); + late final _CFPreferencesGetAppIntegerValue = + _CFPreferencesGetAppIntegerValuePtr.asFunction< + int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); + + void CFPreferencesSetAppValue( + CFStringRef key, + CFPropertyListRef value, + CFStringRef applicationID, + ) { + return _CFPreferencesSetAppValue( + key, + value, + applicationID, + ); + } + + late final _CFPreferencesSetAppValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringRef, CFPropertyListRef, + CFStringRef)>>('CFPreferencesSetAppValue'); + late final _CFPreferencesSetAppValue = _CFPreferencesSetAppValuePtr + .asFunction(); + + void CFPreferencesAddSuitePreferencesToApp( + CFStringRef applicationID, + CFStringRef suiteID, + ) { + return _CFPreferencesAddSuitePreferencesToApp( + applicationID, + suiteID, + ); + } + + late final _CFPreferencesAddSuitePreferencesToAppPtr = + _lookup>( + 'CFPreferencesAddSuitePreferencesToApp'); + late final _CFPreferencesAddSuitePreferencesToApp = + _CFPreferencesAddSuitePreferencesToAppPtr.asFunction< + void Function(CFStringRef, CFStringRef)>(); + + void CFPreferencesRemoveSuitePreferencesFromApp( + CFStringRef applicationID, + CFStringRef suiteID, + ) { + return _CFPreferencesRemoveSuitePreferencesFromApp( + applicationID, + suiteID, + ); + } + + late final _CFPreferencesRemoveSuitePreferencesFromAppPtr = + _lookup>( + 'CFPreferencesRemoveSuitePreferencesFromApp'); + late final _CFPreferencesRemoveSuitePreferencesFromApp = + _CFPreferencesRemoveSuitePreferencesFromAppPtr.asFunction< + void Function(CFStringRef, CFStringRef)>(); + + int CFPreferencesAppSynchronize( + CFStringRef applicationID, + ) { + return _CFPreferencesAppSynchronize( + applicationID, + ); + } + + late final _CFPreferencesAppSynchronizePtr = + _lookup>( + 'CFPreferencesAppSynchronize'); + late final _CFPreferencesAppSynchronize = + _CFPreferencesAppSynchronizePtr.asFunction(); + + CFPropertyListRef CFPreferencesCopyValue( + CFStringRef key, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyValue( + key, + applicationID, + userName, + hostName, + ); + } + + late final _CFPreferencesCopyValuePtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function(CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyValue'); + late final _CFPreferencesCopyValue = _CFPreferencesCopyValuePtr.asFunction< + CFPropertyListRef Function( + CFStringRef, CFStringRef, CFStringRef, CFStringRef)>(); + + CFDictionaryRef CFPreferencesCopyMultiple( + CFArrayRef keysToFetch, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyMultiple( + keysToFetch, + applicationID, + userName, + hostName, + ); + } + + late final _CFPreferencesCopyMultiplePtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFArrayRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyMultiple'); + late final _CFPreferencesCopyMultiple = + _CFPreferencesCopyMultiplePtr.asFunction< + CFDictionaryRef Function( + CFArrayRef, CFStringRef, CFStringRef, CFStringRef)>(); + + void CFPreferencesSetValue( + CFStringRef key, + CFPropertyListRef value, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesSetValue( + key, + value, + applicationID, + userName, + hostName, + ); + } + + late final _CFPreferencesSetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringRef, CFPropertyListRef, CFStringRef, + CFStringRef, CFStringRef)>>('CFPreferencesSetValue'); + late final _CFPreferencesSetValue = _CFPreferencesSetValuePtr.asFunction< + void Function(CFStringRef, CFPropertyListRef, CFStringRef, CFStringRef, + CFStringRef)>(); + + void CFPreferencesSetMultiple( + CFDictionaryRef keysToSet, + CFArrayRef keysToRemove, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesSetMultiple( + keysToSet, + keysToRemove, + applicationID, + userName, + hostName, + ); + } + + late final _CFPreferencesSetMultiplePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFDictionaryRef, CFArrayRef, CFStringRef, + CFStringRef, CFStringRef)>>('CFPreferencesSetMultiple'); + late final _CFPreferencesSetMultiple = + _CFPreferencesSetMultiplePtr.asFunction< + void Function(CFDictionaryRef, CFArrayRef, CFStringRef, CFStringRef, + CFStringRef)>(); + + int CFPreferencesSynchronize( + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesSynchronize( + applicationID, + userName, + hostName, + ); + } + + late final _CFPreferencesSynchronizePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesSynchronize'); + late final _CFPreferencesSynchronize = _CFPreferencesSynchronizePtr + .asFunction(); + + CFArrayRef CFPreferencesCopyApplicationList( + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyApplicationList( + userName, + hostName, + ); + } + + late final _CFPreferencesCopyApplicationListPtr = _lookup< + ffi.NativeFunction>( + 'CFPreferencesCopyApplicationList'); + late final _CFPreferencesCopyApplicationList = + _CFPreferencesCopyApplicationListPtr.asFunction< + CFArrayRef Function(CFStringRef, CFStringRef)>(); + + CFArrayRef CFPreferencesCopyKeyList( + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyKeyList( + applicationID, + userName, + hostName, + ); + } + + late final _CFPreferencesCopyKeyListPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyKeyList'); + late final _CFPreferencesCopyKeyList = _CFPreferencesCopyKeyListPtr + .asFunction(); + + int CFPreferencesAppValueIsForced( + CFStringRef key, + CFStringRef applicationID, + ) { + return _CFPreferencesAppValueIsForced( + key, + applicationID, + ); + } + + late final _CFPreferencesAppValueIsForcedPtr = + _lookup>( + 'CFPreferencesAppValueIsForced'); + late final _CFPreferencesAppValueIsForced = _CFPreferencesAppValueIsForcedPtr + .asFunction(); + + int CFURLGetTypeID() { + return _CFURLGetTypeID(); + } + + late final _CFURLGetTypeIDPtr = + _lookup>('CFURLGetTypeID'); + late final _CFURLGetTypeID = _CFURLGetTypeIDPtr.asFunction(); + + CFURLRef CFURLCreateWithBytes( + CFAllocatorRef allocator, + ffi.Pointer URLBytes, + int length, + int encoding, + CFURLRef baseURL, + ) { + return _CFURLCreateWithBytes( + allocator, + URLBytes, + length, + encoding, + baseURL, + ); + } + + late final _CFURLCreateWithBytesPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFStringEncoding, CFURLRef)>>('CFURLCreateWithBytes'); + late final _CFURLCreateWithBytes = _CFURLCreateWithBytesPtr.asFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); + + CFDataRef CFURLCreateData( + CFAllocatorRef allocator, + CFURLRef url, + int encoding, + int escapeWhitespace, + ) { + return _CFURLCreateData( + allocator, + url, + encoding, + escapeWhitespace, + ); + } + + late final _CFURLCreateDataPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, CFStringEncoding, + Boolean)>>('CFURLCreateData'); + late final _CFURLCreateData = _CFURLCreateDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, int, int)>(); + + CFURLRef CFURLCreateWithString( + CFAllocatorRef allocator, + CFStringRef URLString, + CFURLRef baseURL, + ) { + return _CFURLCreateWithString( + allocator, + URLString, + baseURL, + ); + } + + late final _CFURLCreateWithStringPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( + CFAllocatorRef, CFStringRef, CFURLRef)>>('CFURLCreateWithString'); + late final _CFURLCreateWithString = _CFURLCreateWithStringPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, CFURLRef)>(); + + CFURLRef CFURLCreateAbsoluteURLWithBytes( + CFAllocatorRef alloc, + ffi.Pointer relativeURLBytes, + int length, + int encoding, + CFURLRef baseURL, + int useCompatibilityMode, + ) { + return _CFURLCreateAbsoluteURLWithBytes( + alloc, + relativeURLBytes, + length, + encoding, + baseURL, + useCompatibilityMode, + ); + } + + late final _CFURLCreateAbsoluteURLWithBytesPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( + CFAllocatorRef, + ffi.Pointer, + CFIndex, + CFStringEncoding, + CFURLRef, + Boolean)>>('CFURLCreateAbsoluteURLWithBytes'); + late final _CFURLCreateAbsoluteURLWithBytes = + _CFURLCreateAbsoluteURLWithBytesPtr.asFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer, int, int, CFURLRef, int)>(); + + CFURLRef CFURLCreateWithFileSystemPath( + CFAllocatorRef allocator, + CFStringRef filePath, + int pathStyle, + int isDirectory, + ) { + return _CFURLCreateWithFileSystemPath( + allocator, + filePath, + pathStyle, + isDirectory, + ); + } + + late final _CFURLCreateWithFileSystemPathPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, + Boolean)>>('CFURLCreateWithFileSystemPath'); + late final _CFURLCreateWithFileSystemPath = _CFURLCreateWithFileSystemPathPtr + .asFunction(); + + CFURLRef CFURLCreateFromFileSystemRepresentation( + CFAllocatorRef allocator, + ffi.Pointer buffer, + int bufLen, + int isDirectory, + ) { + return _CFURLCreateFromFileSystemRepresentation( + allocator, + buffer, + bufLen, + isDirectory, + ); + } + + late final _CFURLCreateFromFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + Boolean)>>('CFURLCreateFromFileSystemRepresentation'); + late final _CFURLCreateFromFileSystemRepresentation = + _CFURLCreateFromFileSystemRepresentationPtr.asFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, int, int)>(); + + CFURLRef CFURLCreateWithFileSystemPathRelativeToBase( + CFAllocatorRef allocator, + CFStringRef filePath, + int pathStyle, + int isDirectory, + CFURLRef baseURL, + ) { + return _CFURLCreateWithFileSystemPathRelativeToBase( + allocator, + filePath, + pathStyle, + isDirectory, + baseURL, + ); + } + + late final _CFURLCreateWithFileSystemPathRelativeToBasePtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, Boolean, + CFURLRef)>>('CFURLCreateWithFileSystemPathRelativeToBase'); + late final _CFURLCreateWithFileSystemPathRelativeToBase = + _CFURLCreateWithFileSystemPathRelativeToBasePtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, int, int, CFURLRef)>(); + + CFURLRef CFURLCreateFromFileSystemRepresentationRelativeToBase( + CFAllocatorRef allocator, + ffi.Pointer buffer, + int bufLen, + int isDirectory, + CFURLRef baseURL, + ) { + return _CFURLCreateFromFileSystemRepresentationRelativeToBase( + allocator, + buffer, + bufLen, + isDirectory, + baseURL, + ); + } + + late final _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr = + _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + Boolean, CFURLRef)>>( + 'CFURLCreateFromFileSystemRepresentationRelativeToBase'); + late final _CFURLCreateFromFileSystemRepresentationRelativeToBase = + _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr.asFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); + + int CFURLGetFileSystemRepresentation( + CFURLRef url, + int resolveAgainstBase, + ffi.Pointer buffer, + int maxBufLen, + ) { + return _CFURLGetFileSystemRepresentation( + url, + resolveAgainstBase, + buffer, + maxBufLen, + ); + } + + late final _CFURLGetFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, Boolean, ffi.Pointer, + CFIndex)>>('CFURLGetFileSystemRepresentation'); + late final _CFURLGetFileSystemRepresentation = + _CFURLGetFileSystemRepresentationPtr.asFunction< + int Function(CFURLRef, int, ffi.Pointer, int)>(); + + CFURLRef CFURLCopyAbsoluteURL( + CFURLRef relativeURL, + ) { + return _CFURLCopyAbsoluteURL( + relativeURL, + ); + } + + late final _CFURLCopyAbsoluteURLPtr = + _lookup>( + 'CFURLCopyAbsoluteURL'); + late final _CFURLCopyAbsoluteURL = + _CFURLCopyAbsoluteURLPtr.asFunction(); + + CFStringRef CFURLGetString( + CFURLRef anURL, + ) { + return _CFURLGetString( + anURL, + ); + } + + late final _CFURLGetStringPtr = + _lookup>( + 'CFURLGetString'); + late final _CFURLGetString = + _CFURLGetStringPtr.asFunction(); + + CFURLRef CFURLGetBaseURL( + CFURLRef anURL, + ) { + return _CFURLGetBaseURL( + anURL, + ); + } + + late final _CFURLGetBaseURLPtr = + _lookup>( + 'CFURLGetBaseURL'); + late final _CFURLGetBaseURL = + _CFURLGetBaseURLPtr.asFunction(); + + int CFURLCanBeDecomposed( + CFURLRef anURL, + ) { + return _CFURLCanBeDecomposed( + anURL, + ); + } + + late final _CFURLCanBeDecomposedPtr = + _lookup>( + 'CFURLCanBeDecomposed'); + late final _CFURLCanBeDecomposed = + _CFURLCanBeDecomposedPtr.asFunction(); + + CFStringRef CFURLCopyScheme( + CFURLRef anURL, + ) { + return _CFURLCopyScheme( + anURL, + ); + } + + late final _CFURLCopySchemePtr = + _lookup>( + 'CFURLCopyScheme'); + late final _CFURLCopyScheme = + _CFURLCopySchemePtr.asFunction(); + + CFStringRef CFURLCopyNetLocation( + CFURLRef anURL, + ) { + return _CFURLCopyNetLocation( + anURL, + ); + } + + late final _CFURLCopyNetLocationPtr = + _lookup>( + 'CFURLCopyNetLocation'); + late final _CFURLCopyNetLocation = + _CFURLCopyNetLocationPtr.asFunction(); + + CFStringRef CFURLCopyPath( + CFURLRef anURL, + ) { + return _CFURLCopyPath( + anURL, + ); + } + + late final _CFURLCopyPathPtr = + _lookup>( + 'CFURLCopyPath'); + late final _CFURLCopyPath = + _CFURLCopyPathPtr.asFunction(); + + CFStringRef CFURLCopyStrictPath( + CFURLRef anURL, + ffi.Pointer isAbsolute, + ) { + return _CFURLCopyStrictPath( + anURL, + isAbsolute, + ); + } + + late final _CFURLCopyStrictPathPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFURLRef, ffi.Pointer)>>('CFURLCopyStrictPath'); + late final _CFURLCopyStrictPath = _CFURLCopyStrictPathPtr.asFunction< + CFStringRef Function(CFURLRef, ffi.Pointer)>(); + + CFStringRef CFURLCopyFileSystemPath( + CFURLRef anURL, + int pathStyle, + ) { + return _CFURLCopyFileSystemPath( + anURL, + pathStyle, + ); + } + + late final _CFURLCopyFileSystemPathPtr = + _lookup>( + 'CFURLCopyFileSystemPath'); + late final _CFURLCopyFileSystemPath = _CFURLCopyFileSystemPathPtr.asFunction< + CFStringRef Function(CFURLRef, int)>(); + + int CFURLHasDirectoryPath( + CFURLRef anURL, + ) { + return _CFURLHasDirectoryPath( + anURL, + ); + } + + late final _CFURLHasDirectoryPathPtr = + _lookup>( + 'CFURLHasDirectoryPath'); + late final _CFURLHasDirectoryPath = + _CFURLHasDirectoryPathPtr.asFunction(); + + CFStringRef CFURLCopyResourceSpecifier( + CFURLRef anURL, + ) { + return _CFURLCopyResourceSpecifier( + anURL, + ); + } + + late final _CFURLCopyResourceSpecifierPtr = + _lookup>( + 'CFURLCopyResourceSpecifier'); + late final _CFURLCopyResourceSpecifier = _CFURLCopyResourceSpecifierPtr + .asFunction(); + + CFStringRef CFURLCopyHostName( + CFURLRef anURL, + ) { + return _CFURLCopyHostName( + anURL, + ); + } + + late final _CFURLCopyHostNamePtr = + _lookup>( + 'CFURLCopyHostName'); + late final _CFURLCopyHostName = + _CFURLCopyHostNamePtr.asFunction(); + + int CFURLGetPortNumber( + CFURLRef anURL, + ) { + return _CFURLGetPortNumber( + anURL, + ); + } + + late final _CFURLGetPortNumberPtr = + _lookup>( + 'CFURLGetPortNumber'); + late final _CFURLGetPortNumber = + _CFURLGetPortNumberPtr.asFunction(); + + CFStringRef CFURLCopyUserName( + CFURLRef anURL, + ) { + return _CFURLCopyUserName( + anURL, + ); + } + + late final _CFURLCopyUserNamePtr = + _lookup>( + 'CFURLCopyUserName'); + late final _CFURLCopyUserName = + _CFURLCopyUserNamePtr.asFunction(); + + CFStringRef CFURLCopyPassword( + CFURLRef anURL, + ) { + return _CFURLCopyPassword( + anURL, + ); + } + + late final _CFURLCopyPasswordPtr = + _lookup>( + 'CFURLCopyPassword'); + late final _CFURLCopyPassword = + _CFURLCopyPasswordPtr.asFunction(); + + CFStringRef CFURLCopyParameterString( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCopyParameterString( + anURL, + charactersToLeaveEscaped, + ); + } + + late final _CFURLCopyParameterStringPtr = + _lookup>( + 'CFURLCopyParameterString'); + late final _CFURLCopyParameterString = _CFURLCopyParameterStringPtr + .asFunction(); + + CFStringRef CFURLCopyQueryString( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCopyQueryString( + anURL, + charactersToLeaveEscaped, + ); + } + + late final _CFURLCopyQueryStringPtr = + _lookup>( + 'CFURLCopyQueryString'); + late final _CFURLCopyQueryString = _CFURLCopyQueryStringPtr.asFunction< + CFStringRef Function(CFURLRef, CFStringRef)>(); + + CFStringRef CFURLCopyFragment( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCopyFragment( + anURL, + charactersToLeaveEscaped, + ); + } + + late final _CFURLCopyFragmentPtr = + _lookup>( + 'CFURLCopyFragment'); + late final _CFURLCopyFragment = _CFURLCopyFragmentPtr.asFunction< + CFStringRef Function(CFURLRef, CFStringRef)>(); + + CFStringRef CFURLCopyLastPathComponent( + CFURLRef url, + ) { + return _CFURLCopyLastPathComponent( + url, + ); + } + + late final _CFURLCopyLastPathComponentPtr = + _lookup>( + 'CFURLCopyLastPathComponent'); + late final _CFURLCopyLastPathComponent = _CFURLCopyLastPathComponentPtr + .asFunction(); + + CFStringRef CFURLCopyPathExtension( + CFURLRef url, + ) { + return _CFURLCopyPathExtension( + url, + ); + } + + late final _CFURLCopyPathExtensionPtr = + _lookup>( + 'CFURLCopyPathExtension'); + late final _CFURLCopyPathExtension = + _CFURLCopyPathExtensionPtr.asFunction(); + + CFURLRef CFURLCreateCopyAppendingPathComponent( + CFAllocatorRef allocator, + CFURLRef url, + CFStringRef pathComponent, + int isDirectory, + ) { + return _CFURLCreateCopyAppendingPathComponent( + allocator, + url, + pathComponent, + isDirectory, + ); + } + + late final _CFURLCreateCopyAppendingPathComponentPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, + Boolean)>>('CFURLCreateCopyAppendingPathComponent'); + late final _CFURLCreateCopyAppendingPathComponent = + _CFURLCreateCopyAppendingPathComponentPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, int)>(); + + CFURLRef CFURLCreateCopyDeletingLastPathComponent( + CFAllocatorRef allocator, + CFURLRef url, + ) { + return _CFURLCreateCopyDeletingLastPathComponent( + allocator, + url, + ); + } + + late final _CFURLCreateCopyDeletingLastPathComponentPtr = + _lookup>( + 'CFURLCreateCopyDeletingLastPathComponent'); + late final _CFURLCreateCopyDeletingLastPathComponent = + _CFURLCreateCopyDeletingLastPathComponentPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef)>(); + + CFURLRef CFURLCreateCopyAppendingPathExtension( + CFAllocatorRef allocator, + CFURLRef url, + CFStringRef extension1, + ) { + return _CFURLCreateCopyAppendingPathExtension( + allocator, + url, + extension1, + ); + } + + late final _CFURLCreateCopyAppendingPathExtensionPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + CFStringRef)>>('CFURLCreateCopyAppendingPathExtension'); + late final _CFURLCreateCopyAppendingPathExtension = + _CFURLCreateCopyAppendingPathExtensionPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); + + CFURLRef CFURLCreateCopyDeletingPathExtension( + CFAllocatorRef allocator, + CFURLRef url, + ) { + return _CFURLCreateCopyDeletingPathExtension( + allocator, + url, + ); + } + + late final _CFURLCreateCopyDeletingPathExtensionPtr = + _lookup>( + 'CFURLCreateCopyDeletingPathExtension'); + late final _CFURLCreateCopyDeletingPathExtension = + _CFURLCreateCopyDeletingPathExtensionPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef)>(); + + int CFURLGetBytes( + CFURLRef url, + ffi.Pointer buffer, + int bufferLength, + ) { + return _CFURLGetBytes( + url, + buffer, + bufferLength, + ); + } + + late final _CFURLGetBytesPtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFURLRef, ffi.Pointer, CFIndex)>>('CFURLGetBytes'); + late final _CFURLGetBytes = _CFURLGetBytesPtr.asFunction< + int Function(CFURLRef, ffi.Pointer, int)>(); + + CFRange CFURLGetByteRangeForComponent( + CFURLRef url, + int component, + ffi.Pointer rangeIncludingSeparators, + ) { + return _CFURLGetByteRangeForComponent( + url, + component, + rangeIncludingSeparators, + ); + } + + late final _CFURLGetByteRangeForComponentPtr = _lookup< + ffi.NativeFunction< + CFRange Function(CFURLRef, ffi.Int32, + ffi.Pointer)>>('CFURLGetByteRangeForComponent'); + late final _CFURLGetByteRangeForComponent = _CFURLGetByteRangeForComponentPtr + .asFunction)>(); + + CFStringRef CFURLCreateStringByReplacingPercentEscapes( + CFAllocatorRef allocator, + CFStringRef originalString, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCreateStringByReplacingPercentEscapes( + allocator, + originalString, + charactersToLeaveEscaped, + ); + } + + late final _CFURLCreateStringByReplacingPercentEscapesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFStringRef)>>('CFURLCreateStringByReplacingPercentEscapes'); + late final _CFURLCreateStringByReplacingPercentEscapes = + _CFURLCreateStringByReplacingPercentEscapesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); + + CFStringRef CFURLCreateStringByReplacingPercentEscapesUsingEncoding( + CFAllocatorRef allocator, + CFStringRef origString, + CFStringRef charsToLeaveEscaped, + int encoding, + ) { + return _CFURLCreateStringByReplacingPercentEscapesUsingEncoding( + allocator, + origString, + charsToLeaveEscaped, + encoding, + ); + } + + late final _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr = + _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef, + CFStringEncoding)>>( + 'CFURLCreateStringByReplacingPercentEscapesUsingEncoding'); + late final _CFURLCreateStringByReplacingPercentEscapesUsingEncoding = + _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef, CFStringRef, int)>(); + + CFStringRef CFURLCreateStringByAddingPercentEscapes( + CFAllocatorRef allocator, + CFStringRef originalString, + CFStringRef charactersToLeaveUnescaped, + CFStringRef legalURLCharactersToBeEscaped, + int encoding, + ) { + return _CFURLCreateStringByAddingPercentEscapes( + allocator, + originalString, + charactersToLeaveUnescaped, + legalURLCharactersToBeEscaped, + encoding, + ); + } + + late final _CFURLCreateStringByAddingPercentEscapesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringEncoding)>>('CFURLCreateStringByAddingPercentEscapes'); + late final _CFURLCreateStringByAddingPercentEscapes = + _CFURLCreateStringByAddingPercentEscapesPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef, CFStringRef, CFStringRef, int)>(); + + int CFURLIsFileReferenceURL( + CFURLRef url, + ) { + return _CFURLIsFileReferenceURL( + url, + ); + } + + late final _CFURLIsFileReferenceURLPtr = + _lookup>( + 'CFURLIsFileReferenceURL'); + late final _CFURLIsFileReferenceURL = + _CFURLIsFileReferenceURLPtr.asFunction(); + + CFURLRef CFURLCreateFileReferenceURL( + CFAllocatorRef allocator, + CFURLRef url, + ffi.Pointer error, + ) { + return _CFURLCreateFileReferenceURL( + allocator, + url, + error, + ); + } + + late final _CFURLCreateFileReferenceURLPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + ffi.Pointer)>>('CFURLCreateFileReferenceURL'); + late final _CFURLCreateFileReferenceURL = + _CFURLCreateFileReferenceURLPtr.asFunction< + CFURLRef Function( + CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + + CFURLRef CFURLCreateFilePathURL( + CFAllocatorRef allocator, + CFURLRef url, + ffi.Pointer error, + ) { + return _CFURLCreateFilePathURL( + allocator, + url, + error, + ); + } + + late final _CFURLCreateFilePathURLPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + ffi.Pointer)>>('CFURLCreateFilePathURL'); + late final _CFURLCreateFilePathURL = _CFURLCreateFilePathURLPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + + CFURLRef CFURLCreateFromFSRef( + CFAllocatorRef allocator, + ffi.Pointer fsRef, + ) { + return _CFURLCreateFromFSRef( + allocator, + fsRef, + ); + } + + late final _CFURLCreateFromFSRefPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer)>>('CFURLCreateFromFSRef'); + late final _CFURLCreateFromFSRef = _CFURLCreateFromFSRefPtr.asFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer)>(); + + int CFURLGetFSRef( + CFURLRef url, + ffi.Pointer fsRef, + ) { + return _CFURLGetFSRef( + url, + fsRef, + ); + } + + late final _CFURLGetFSRefPtr = _lookup< + ffi.NativeFunction)>>( + 'CFURLGetFSRef'); + late final _CFURLGetFSRef = _CFURLGetFSRefPtr.asFunction< + int Function(CFURLRef, ffi.Pointer)>(); + + int CFURLCopyResourcePropertyForKey( + CFURLRef url, + CFStringRef key, + ffi.Pointer propertyValueTypeRefPtr, + ffi.Pointer error, + ) { + return _CFURLCopyResourcePropertyForKey( + url, + key, + propertyValueTypeRefPtr, + error, + ); + } + + late final _CFURLCopyResourcePropertyForKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFStringRef, ffi.Pointer, + ffi.Pointer)>>('CFURLCopyResourcePropertyForKey'); + late final _CFURLCopyResourcePropertyForKey = + _CFURLCopyResourcePropertyForKeyPtr.asFunction< + int Function(CFURLRef, CFStringRef, ffi.Pointer, + ffi.Pointer)>(); + + CFDictionaryRef CFURLCopyResourcePropertiesForKeys( + CFURLRef url, + CFArrayRef keys, + ffi.Pointer error, + ) { + return _CFURLCopyResourcePropertiesForKeys( + url, + keys, + error, + ); + } + + late final _CFURLCopyResourcePropertiesForKeysPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFURLRef, CFArrayRef, + ffi.Pointer)>>('CFURLCopyResourcePropertiesForKeys'); + late final _CFURLCopyResourcePropertiesForKeys = + _CFURLCopyResourcePropertiesForKeysPtr.asFunction< + CFDictionaryRef Function( + CFURLRef, CFArrayRef, ffi.Pointer)>(); + + int CFURLSetResourcePropertyForKey( + CFURLRef url, + CFStringRef key, + CFTypeRef propertyValue, + ffi.Pointer error, + ) { + return _CFURLSetResourcePropertyForKey( + url, + key, + propertyValue, + error, + ); + } + + late final _CFURLSetResourcePropertyForKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFStringRef, CFTypeRef, + ffi.Pointer)>>('CFURLSetResourcePropertyForKey'); + late final _CFURLSetResourcePropertyForKey = + _CFURLSetResourcePropertyForKeyPtr.asFunction< + int Function( + CFURLRef, CFStringRef, CFTypeRef, ffi.Pointer)>(); + + int CFURLSetResourcePropertiesForKeys( + CFURLRef url, + CFDictionaryRef keyedPropertyValues, + ffi.Pointer error, + ) { + return _CFURLSetResourcePropertiesForKeys( + url, + keyedPropertyValues, + error, + ); + } + + late final _CFURLSetResourcePropertiesForKeysPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFDictionaryRef, + ffi.Pointer)>>('CFURLSetResourcePropertiesForKeys'); + late final _CFURLSetResourcePropertiesForKeys = + _CFURLSetResourcePropertiesForKeysPtr.asFunction< + int Function(CFURLRef, CFDictionaryRef, ffi.Pointer)>(); + + late final ffi.Pointer _kCFURLKeysOfUnsetValuesKey = + _lookup('kCFURLKeysOfUnsetValuesKey'); + + CFStringRef get kCFURLKeysOfUnsetValuesKey => + _kCFURLKeysOfUnsetValuesKey.value; + + set kCFURLKeysOfUnsetValuesKey(CFStringRef value) => + _kCFURLKeysOfUnsetValuesKey.value = value; + + void CFURLClearResourcePropertyCacheForKey( + CFURLRef url, + CFStringRef key, + ) { + return _CFURLClearResourcePropertyCacheForKey( + url, + key, + ); + } + + late final _CFURLClearResourcePropertyCacheForKeyPtr = + _lookup>( + 'CFURLClearResourcePropertyCacheForKey'); + late final _CFURLClearResourcePropertyCacheForKey = + _CFURLClearResourcePropertyCacheForKeyPtr.asFunction< + void Function(CFURLRef, CFStringRef)>(); + + void CFURLClearResourcePropertyCache( + CFURLRef url, + ) { + return _CFURLClearResourcePropertyCache( + url, + ); + } + + late final _CFURLClearResourcePropertyCachePtr = + _lookup>( + 'CFURLClearResourcePropertyCache'); + late final _CFURLClearResourcePropertyCache = + _CFURLClearResourcePropertyCachePtr.asFunction(); + + void CFURLSetTemporaryResourcePropertyForKey( + CFURLRef url, + CFStringRef key, + CFTypeRef propertyValue, + ) { + return _CFURLSetTemporaryResourcePropertyForKey( + url, + key, + propertyValue, + ); + } + + late final _CFURLSetTemporaryResourcePropertyForKeyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFURLRef, CFStringRef, + CFTypeRef)>>('CFURLSetTemporaryResourcePropertyForKey'); + late final _CFURLSetTemporaryResourcePropertyForKey = + _CFURLSetTemporaryResourcePropertyForKeyPtr.asFunction< + void Function(CFURLRef, CFStringRef, CFTypeRef)>(); + + int CFURLResourceIsReachable( + CFURLRef url, + ffi.Pointer error, + ) { + return _CFURLResourceIsReachable( + url, + error, + ); + } + + late final _CFURLResourceIsReachablePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFURLRef, ffi.Pointer)>>('CFURLResourceIsReachable'); + late final _CFURLResourceIsReachable = _CFURLResourceIsReachablePtr + .asFunction)>(); + + late final ffi.Pointer _kCFURLNameKey = + _lookup('kCFURLNameKey'); + + CFStringRef get kCFURLNameKey => _kCFURLNameKey.value; + + set kCFURLNameKey(CFStringRef value) => _kCFURLNameKey.value = value; + + late final ffi.Pointer _kCFURLLocalizedNameKey = + _lookup('kCFURLLocalizedNameKey'); + + CFStringRef get kCFURLLocalizedNameKey => _kCFURLLocalizedNameKey.value; + + set kCFURLLocalizedNameKey(CFStringRef value) => + _kCFURLLocalizedNameKey.value = value; + + late final ffi.Pointer _kCFURLIsRegularFileKey = + _lookup('kCFURLIsRegularFileKey'); + + CFStringRef get kCFURLIsRegularFileKey => _kCFURLIsRegularFileKey.value; + + set kCFURLIsRegularFileKey(CFStringRef value) => + _kCFURLIsRegularFileKey.value = value; + + late final ffi.Pointer _kCFURLIsDirectoryKey = + _lookup('kCFURLIsDirectoryKey'); + + CFStringRef get kCFURLIsDirectoryKey => _kCFURLIsDirectoryKey.value; + + set kCFURLIsDirectoryKey(CFStringRef value) => + _kCFURLIsDirectoryKey.value = value; + + late final ffi.Pointer _kCFURLIsSymbolicLinkKey = + _lookup('kCFURLIsSymbolicLinkKey'); + + CFStringRef get kCFURLIsSymbolicLinkKey => _kCFURLIsSymbolicLinkKey.value; + + set kCFURLIsSymbolicLinkKey(CFStringRef value) => + _kCFURLIsSymbolicLinkKey.value = value; + + late final ffi.Pointer _kCFURLIsVolumeKey = + _lookup('kCFURLIsVolumeKey'); + + CFStringRef get kCFURLIsVolumeKey => _kCFURLIsVolumeKey.value; + + set kCFURLIsVolumeKey(CFStringRef value) => _kCFURLIsVolumeKey.value = value; + + late final ffi.Pointer _kCFURLIsPackageKey = + _lookup('kCFURLIsPackageKey'); + + CFStringRef get kCFURLIsPackageKey => _kCFURLIsPackageKey.value; + + set kCFURLIsPackageKey(CFStringRef value) => + _kCFURLIsPackageKey.value = value; + + late final ffi.Pointer _kCFURLIsApplicationKey = + _lookup('kCFURLIsApplicationKey'); + + CFStringRef get kCFURLIsApplicationKey => _kCFURLIsApplicationKey.value; + + set kCFURLIsApplicationKey(CFStringRef value) => + _kCFURLIsApplicationKey.value = value; + + late final ffi.Pointer _kCFURLApplicationIsScriptableKey = + _lookup('kCFURLApplicationIsScriptableKey'); + + CFStringRef get kCFURLApplicationIsScriptableKey => + _kCFURLApplicationIsScriptableKey.value; + + set kCFURLApplicationIsScriptableKey(CFStringRef value) => + _kCFURLApplicationIsScriptableKey.value = value; + + late final ffi.Pointer _kCFURLIsSystemImmutableKey = + _lookup('kCFURLIsSystemImmutableKey'); + + CFStringRef get kCFURLIsSystemImmutableKey => + _kCFURLIsSystemImmutableKey.value; + + set kCFURLIsSystemImmutableKey(CFStringRef value) => + _kCFURLIsSystemImmutableKey.value = value; + + late final ffi.Pointer _kCFURLIsUserImmutableKey = + _lookup('kCFURLIsUserImmutableKey'); + + CFStringRef get kCFURLIsUserImmutableKey => _kCFURLIsUserImmutableKey.value; + + set kCFURLIsUserImmutableKey(CFStringRef value) => + _kCFURLIsUserImmutableKey.value = value; + + late final ffi.Pointer _kCFURLIsHiddenKey = + _lookup('kCFURLIsHiddenKey'); + + CFStringRef get kCFURLIsHiddenKey => _kCFURLIsHiddenKey.value; + + set kCFURLIsHiddenKey(CFStringRef value) => _kCFURLIsHiddenKey.value = value; + + late final ffi.Pointer _kCFURLHasHiddenExtensionKey = + _lookup('kCFURLHasHiddenExtensionKey'); + + CFStringRef get kCFURLHasHiddenExtensionKey => + _kCFURLHasHiddenExtensionKey.value; + + set kCFURLHasHiddenExtensionKey(CFStringRef value) => + _kCFURLHasHiddenExtensionKey.value = value; + + late final ffi.Pointer _kCFURLCreationDateKey = + _lookup('kCFURLCreationDateKey'); + + CFStringRef get kCFURLCreationDateKey => _kCFURLCreationDateKey.value; + + set kCFURLCreationDateKey(CFStringRef value) => + _kCFURLCreationDateKey.value = value; + + late final ffi.Pointer _kCFURLContentAccessDateKey = + _lookup('kCFURLContentAccessDateKey'); + + CFStringRef get kCFURLContentAccessDateKey => + _kCFURLContentAccessDateKey.value; + + set kCFURLContentAccessDateKey(CFStringRef value) => + _kCFURLContentAccessDateKey.value = value; + + late final ffi.Pointer _kCFURLContentModificationDateKey = + _lookup('kCFURLContentModificationDateKey'); + + CFStringRef get kCFURLContentModificationDateKey => + _kCFURLContentModificationDateKey.value; + + set kCFURLContentModificationDateKey(CFStringRef value) => + _kCFURLContentModificationDateKey.value = value; + + late final ffi.Pointer _kCFURLAttributeModificationDateKey = + _lookup('kCFURLAttributeModificationDateKey'); + + CFStringRef get kCFURLAttributeModificationDateKey => + _kCFURLAttributeModificationDateKey.value; + + set kCFURLAttributeModificationDateKey(CFStringRef value) => + _kCFURLAttributeModificationDateKey.value = value; + + late final ffi.Pointer _kCFURLFileContentIdentifierKey = + _lookup('kCFURLFileContentIdentifierKey'); + + CFStringRef get kCFURLFileContentIdentifierKey => + _kCFURLFileContentIdentifierKey.value; + + set kCFURLFileContentIdentifierKey(CFStringRef value) => + _kCFURLFileContentIdentifierKey.value = value; + + late final ffi.Pointer _kCFURLMayShareFileContentKey = + _lookup('kCFURLMayShareFileContentKey'); + + CFStringRef get kCFURLMayShareFileContentKey => + _kCFURLMayShareFileContentKey.value; + + set kCFURLMayShareFileContentKey(CFStringRef value) => + _kCFURLMayShareFileContentKey.value = value; + + late final ffi.Pointer _kCFURLMayHaveExtendedAttributesKey = + _lookup('kCFURLMayHaveExtendedAttributesKey'); + + CFStringRef get kCFURLMayHaveExtendedAttributesKey => + _kCFURLMayHaveExtendedAttributesKey.value; + + set kCFURLMayHaveExtendedAttributesKey(CFStringRef value) => + _kCFURLMayHaveExtendedAttributesKey.value = value; + + late final ffi.Pointer _kCFURLIsPurgeableKey = + _lookup('kCFURLIsPurgeableKey'); + + CFStringRef get kCFURLIsPurgeableKey => _kCFURLIsPurgeableKey.value; + + set kCFURLIsPurgeableKey(CFStringRef value) => + _kCFURLIsPurgeableKey.value = value; + + late final ffi.Pointer _kCFURLIsSparseKey = + _lookup('kCFURLIsSparseKey'); + + CFStringRef get kCFURLIsSparseKey => _kCFURLIsSparseKey.value; + + set kCFURLIsSparseKey(CFStringRef value) => _kCFURLIsSparseKey.value = value; + + late final ffi.Pointer _kCFURLLinkCountKey = + _lookup('kCFURLLinkCountKey'); + + CFStringRef get kCFURLLinkCountKey => _kCFURLLinkCountKey.value; + + set kCFURLLinkCountKey(CFStringRef value) => + _kCFURLLinkCountKey.value = value; + + late final ffi.Pointer _kCFURLParentDirectoryURLKey = + _lookup('kCFURLParentDirectoryURLKey'); + + CFStringRef get kCFURLParentDirectoryURLKey => + _kCFURLParentDirectoryURLKey.value; + + set kCFURLParentDirectoryURLKey(CFStringRef value) => + _kCFURLParentDirectoryURLKey.value = value; + + late final ffi.Pointer _kCFURLVolumeURLKey = + _lookup('kCFURLVolumeURLKey'); + + CFStringRef get kCFURLVolumeURLKey => _kCFURLVolumeURLKey.value; + + set kCFURLVolumeURLKey(CFStringRef value) => + _kCFURLVolumeURLKey.value = value; + + late final ffi.Pointer _kCFURLTypeIdentifierKey = + _lookup('kCFURLTypeIdentifierKey'); + + CFStringRef get kCFURLTypeIdentifierKey => _kCFURLTypeIdentifierKey.value; + + set kCFURLTypeIdentifierKey(CFStringRef value) => + _kCFURLTypeIdentifierKey.value = value; + + late final ffi.Pointer _kCFURLLocalizedTypeDescriptionKey = + _lookup('kCFURLLocalizedTypeDescriptionKey'); + + CFStringRef get kCFURLLocalizedTypeDescriptionKey => + _kCFURLLocalizedTypeDescriptionKey.value; + + set kCFURLLocalizedTypeDescriptionKey(CFStringRef value) => + _kCFURLLocalizedTypeDescriptionKey.value = value; + + late final ffi.Pointer _kCFURLLabelNumberKey = + _lookup('kCFURLLabelNumberKey'); + + CFStringRef get kCFURLLabelNumberKey => _kCFURLLabelNumberKey.value; + + set kCFURLLabelNumberKey(CFStringRef value) => + _kCFURLLabelNumberKey.value = value; + + late final ffi.Pointer _kCFURLLabelColorKey = + _lookup('kCFURLLabelColorKey'); + + CFStringRef get kCFURLLabelColorKey => _kCFURLLabelColorKey.value; + + set kCFURLLabelColorKey(CFStringRef value) => + _kCFURLLabelColorKey.value = value; + + late final ffi.Pointer _kCFURLLocalizedLabelKey = + _lookup('kCFURLLocalizedLabelKey'); + + CFStringRef get kCFURLLocalizedLabelKey => _kCFURLLocalizedLabelKey.value; + + set kCFURLLocalizedLabelKey(CFStringRef value) => + _kCFURLLocalizedLabelKey.value = value; + + late final ffi.Pointer _kCFURLEffectiveIconKey = + _lookup('kCFURLEffectiveIconKey'); + + CFStringRef get kCFURLEffectiveIconKey => _kCFURLEffectiveIconKey.value; + + set kCFURLEffectiveIconKey(CFStringRef value) => + _kCFURLEffectiveIconKey.value = value; + + late final ffi.Pointer _kCFURLCustomIconKey = + _lookup('kCFURLCustomIconKey'); + + CFStringRef get kCFURLCustomIconKey => _kCFURLCustomIconKey.value; + + set kCFURLCustomIconKey(CFStringRef value) => + _kCFURLCustomIconKey.value = value; + + late final ffi.Pointer _kCFURLFileResourceIdentifierKey = + _lookup('kCFURLFileResourceIdentifierKey'); + + CFStringRef get kCFURLFileResourceIdentifierKey => + _kCFURLFileResourceIdentifierKey.value; + + set kCFURLFileResourceIdentifierKey(CFStringRef value) => + _kCFURLFileResourceIdentifierKey.value = value; + + late final ffi.Pointer _kCFURLVolumeIdentifierKey = + _lookup('kCFURLVolumeIdentifierKey'); + + CFStringRef get kCFURLVolumeIdentifierKey => _kCFURLVolumeIdentifierKey.value; + + set kCFURLVolumeIdentifierKey(CFStringRef value) => + _kCFURLVolumeIdentifierKey.value = value; + + late final ffi.Pointer _kCFURLPreferredIOBlockSizeKey = + _lookup('kCFURLPreferredIOBlockSizeKey'); + + CFStringRef get kCFURLPreferredIOBlockSizeKey => + _kCFURLPreferredIOBlockSizeKey.value; + + set kCFURLPreferredIOBlockSizeKey(CFStringRef value) => + _kCFURLPreferredIOBlockSizeKey.value = value; + + late final ffi.Pointer _kCFURLIsReadableKey = + _lookup('kCFURLIsReadableKey'); + + CFStringRef get kCFURLIsReadableKey => _kCFURLIsReadableKey.value; + + set kCFURLIsReadableKey(CFStringRef value) => + _kCFURLIsReadableKey.value = value; + + late final ffi.Pointer _kCFURLIsWritableKey = + _lookup('kCFURLIsWritableKey'); + + CFStringRef get kCFURLIsWritableKey => _kCFURLIsWritableKey.value; + + set kCFURLIsWritableKey(CFStringRef value) => + _kCFURLIsWritableKey.value = value; + + late final ffi.Pointer _kCFURLIsExecutableKey = + _lookup('kCFURLIsExecutableKey'); + + CFStringRef get kCFURLIsExecutableKey => _kCFURLIsExecutableKey.value; + + set kCFURLIsExecutableKey(CFStringRef value) => + _kCFURLIsExecutableKey.value = value; + + late final ffi.Pointer _kCFURLFileSecurityKey = + _lookup('kCFURLFileSecurityKey'); + + CFStringRef get kCFURLFileSecurityKey => _kCFURLFileSecurityKey.value; + + set kCFURLFileSecurityKey(CFStringRef value) => + _kCFURLFileSecurityKey.value = value; + + late final ffi.Pointer _kCFURLIsExcludedFromBackupKey = + _lookup('kCFURLIsExcludedFromBackupKey'); + + CFStringRef get kCFURLIsExcludedFromBackupKey => + _kCFURLIsExcludedFromBackupKey.value; + + set kCFURLIsExcludedFromBackupKey(CFStringRef value) => + _kCFURLIsExcludedFromBackupKey.value = value; + + late final ffi.Pointer _kCFURLTagNamesKey = + _lookup('kCFURLTagNamesKey'); + + CFStringRef get kCFURLTagNamesKey => _kCFURLTagNamesKey.value; + + set kCFURLTagNamesKey(CFStringRef value) => _kCFURLTagNamesKey.value = value; + + late final ffi.Pointer _kCFURLPathKey = + _lookup('kCFURLPathKey'); + + CFStringRef get kCFURLPathKey => _kCFURLPathKey.value; + + set kCFURLPathKey(CFStringRef value) => _kCFURLPathKey.value = value; + + late final ffi.Pointer _kCFURLCanonicalPathKey = + _lookup('kCFURLCanonicalPathKey'); + + CFStringRef get kCFURLCanonicalPathKey => _kCFURLCanonicalPathKey.value; + + set kCFURLCanonicalPathKey(CFStringRef value) => + _kCFURLCanonicalPathKey.value = value; + + late final ffi.Pointer _kCFURLIsMountTriggerKey = + _lookup('kCFURLIsMountTriggerKey'); + + CFStringRef get kCFURLIsMountTriggerKey => _kCFURLIsMountTriggerKey.value; + + set kCFURLIsMountTriggerKey(CFStringRef value) => + _kCFURLIsMountTriggerKey.value = value; + + late final ffi.Pointer _kCFURLGenerationIdentifierKey = + _lookup('kCFURLGenerationIdentifierKey'); + + CFStringRef get kCFURLGenerationIdentifierKey => + _kCFURLGenerationIdentifierKey.value; + + set kCFURLGenerationIdentifierKey(CFStringRef value) => + _kCFURLGenerationIdentifierKey.value = value; + + late final ffi.Pointer _kCFURLDocumentIdentifierKey = + _lookup('kCFURLDocumentIdentifierKey'); + + CFStringRef get kCFURLDocumentIdentifierKey => + _kCFURLDocumentIdentifierKey.value; + + set kCFURLDocumentIdentifierKey(CFStringRef value) => + _kCFURLDocumentIdentifierKey.value = value; + + late final ffi.Pointer _kCFURLAddedToDirectoryDateKey = + _lookup('kCFURLAddedToDirectoryDateKey'); + + CFStringRef get kCFURLAddedToDirectoryDateKey => + _kCFURLAddedToDirectoryDateKey.value; + + set kCFURLAddedToDirectoryDateKey(CFStringRef value) => + _kCFURLAddedToDirectoryDateKey.value = value; + + late final ffi.Pointer _kCFURLQuarantinePropertiesKey = + _lookup('kCFURLQuarantinePropertiesKey'); + + CFStringRef get kCFURLQuarantinePropertiesKey => + _kCFURLQuarantinePropertiesKey.value; + + set kCFURLQuarantinePropertiesKey(CFStringRef value) => + _kCFURLQuarantinePropertiesKey.value = value; + + late final ffi.Pointer _kCFURLFileResourceTypeKey = + _lookup('kCFURLFileResourceTypeKey'); + + CFStringRef get kCFURLFileResourceTypeKey => _kCFURLFileResourceTypeKey.value; + + set kCFURLFileResourceTypeKey(CFStringRef value) => + _kCFURLFileResourceTypeKey.value = value; + + late final ffi.Pointer _kCFURLFileResourceTypeNamedPipe = + _lookup('kCFURLFileResourceTypeNamedPipe'); + + CFStringRef get kCFURLFileResourceTypeNamedPipe => + _kCFURLFileResourceTypeNamedPipe.value; + + set kCFURLFileResourceTypeNamedPipe(CFStringRef value) => + _kCFURLFileResourceTypeNamedPipe.value = value; + + late final ffi.Pointer _kCFURLFileResourceTypeCharacterSpecial = + _lookup('kCFURLFileResourceTypeCharacterSpecial'); + + CFStringRef get kCFURLFileResourceTypeCharacterSpecial => + _kCFURLFileResourceTypeCharacterSpecial.value; + + set kCFURLFileResourceTypeCharacterSpecial(CFStringRef value) => + _kCFURLFileResourceTypeCharacterSpecial.value = value; + + late final ffi.Pointer _kCFURLFileResourceTypeDirectory = + _lookup('kCFURLFileResourceTypeDirectory'); + + CFStringRef get kCFURLFileResourceTypeDirectory => + _kCFURLFileResourceTypeDirectory.value; + + set kCFURLFileResourceTypeDirectory(CFStringRef value) => + _kCFURLFileResourceTypeDirectory.value = value; + + late final ffi.Pointer _kCFURLFileResourceTypeBlockSpecial = + _lookup('kCFURLFileResourceTypeBlockSpecial'); + + CFStringRef get kCFURLFileResourceTypeBlockSpecial => + _kCFURLFileResourceTypeBlockSpecial.value; + + set kCFURLFileResourceTypeBlockSpecial(CFStringRef value) => + _kCFURLFileResourceTypeBlockSpecial.value = value; + + late final ffi.Pointer _kCFURLFileResourceTypeRegular = + _lookup('kCFURLFileResourceTypeRegular'); + + CFStringRef get kCFURLFileResourceTypeRegular => + _kCFURLFileResourceTypeRegular.value; + + set kCFURLFileResourceTypeRegular(CFStringRef value) => + _kCFURLFileResourceTypeRegular.value = value; + + late final ffi.Pointer _kCFURLFileResourceTypeSymbolicLink = + _lookup('kCFURLFileResourceTypeSymbolicLink'); + + CFStringRef get kCFURLFileResourceTypeSymbolicLink => + _kCFURLFileResourceTypeSymbolicLink.value; + + set kCFURLFileResourceTypeSymbolicLink(CFStringRef value) => + _kCFURLFileResourceTypeSymbolicLink.value = value; + + late final ffi.Pointer _kCFURLFileResourceTypeSocket = + _lookup('kCFURLFileResourceTypeSocket'); + + CFStringRef get kCFURLFileResourceTypeSocket => + _kCFURLFileResourceTypeSocket.value; + + set kCFURLFileResourceTypeSocket(CFStringRef value) => + _kCFURLFileResourceTypeSocket.value = value; + + late final ffi.Pointer _kCFURLFileResourceTypeUnknown = + _lookup('kCFURLFileResourceTypeUnknown'); + + CFStringRef get kCFURLFileResourceTypeUnknown => + _kCFURLFileResourceTypeUnknown.value; + + set kCFURLFileResourceTypeUnknown(CFStringRef value) => + _kCFURLFileResourceTypeUnknown.value = value; + + late final ffi.Pointer _kCFURLFileSizeKey = + _lookup('kCFURLFileSizeKey'); + + CFStringRef get kCFURLFileSizeKey => _kCFURLFileSizeKey.value; + + set kCFURLFileSizeKey(CFStringRef value) => _kCFURLFileSizeKey.value = value; + + late final ffi.Pointer _kCFURLFileAllocatedSizeKey = + _lookup('kCFURLFileAllocatedSizeKey'); + + CFStringRef get kCFURLFileAllocatedSizeKey => + _kCFURLFileAllocatedSizeKey.value; + + set kCFURLFileAllocatedSizeKey(CFStringRef value) => + _kCFURLFileAllocatedSizeKey.value = value; + + late final ffi.Pointer _kCFURLTotalFileSizeKey = + _lookup('kCFURLTotalFileSizeKey'); + + CFStringRef get kCFURLTotalFileSizeKey => _kCFURLTotalFileSizeKey.value; + + set kCFURLTotalFileSizeKey(CFStringRef value) => + _kCFURLTotalFileSizeKey.value = value; + + late final ffi.Pointer _kCFURLTotalFileAllocatedSizeKey = + _lookup('kCFURLTotalFileAllocatedSizeKey'); + + CFStringRef get kCFURLTotalFileAllocatedSizeKey => + _kCFURLTotalFileAllocatedSizeKey.value; + + set kCFURLTotalFileAllocatedSizeKey(CFStringRef value) => + _kCFURLTotalFileAllocatedSizeKey.value = value; + + late final ffi.Pointer _kCFURLIsAliasFileKey = + _lookup('kCFURLIsAliasFileKey'); + + CFStringRef get kCFURLIsAliasFileKey => _kCFURLIsAliasFileKey.value; + + set kCFURLIsAliasFileKey(CFStringRef value) => + _kCFURLIsAliasFileKey.value = value; + + late final ffi.Pointer _kCFURLFileProtectionKey = + _lookup('kCFURLFileProtectionKey'); + + CFStringRef get kCFURLFileProtectionKey => _kCFURLFileProtectionKey.value; + + set kCFURLFileProtectionKey(CFStringRef value) => + _kCFURLFileProtectionKey.value = value; + + late final ffi.Pointer _kCFURLFileProtectionNone = + _lookup('kCFURLFileProtectionNone'); + + CFStringRef get kCFURLFileProtectionNone => _kCFURLFileProtectionNone.value; + + set kCFURLFileProtectionNone(CFStringRef value) => + _kCFURLFileProtectionNone.value = value; + + late final ffi.Pointer _kCFURLFileProtectionComplete = + _lookup('kCFURLFileProtectionComplete'); + + CFStringRef get kCFURLFileProtectionComplete => + _kCFURLFileProtectionComplete.value; + + set kCFURLFileProtectionComplete(CFStringRef value) => + _kCFURLFileProtectionComplete.value = value; + + late final ffi.Pointer _kCFURLFileProtectionCompleteUnlessOpen = + _lookup('kCFURLFileProtectionCompleteUnlessOpen'); + + CFStringRef get kCFURLFileProtectionCompleteUnlessOpen => + _kCFURLFileProtectionCompleteUnlessOpen.value; + + set kCFURLFileProtectionCompleteUnlessOpen(CFStringRef value) => + _kCFURLFileProtectionCompleteUnlessOpen.value = value; + + late final ffi.Pointer + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication = + _lookup( + 'kCFURLFileProtectionCompleteUntilFirstUserAuthentication'); + + CFStringRef get kCFURLFileProtectionCompleteUntilFirstUserAuthentication => + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value; + + set kCFURLFileProtectionCompleteUntilFirstUserAuthentication( + CFStringRef value) => + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; + + late final ffi.Pointer + _kCFURLVolumeLocalizedFormatDescriptionKey = + _lookup('kCFURLVolumeLocalizedFormatDescriptionKey'); + + CFStringRef get kCFURLVolumeLocalizedFormatDescriptionKey => + _kCFURLVolumeLocalizedFormatDescriptionKey.value; + + set kCFURLVolumeLocalizedFormatDescriptionKey(CFStringRef value) => + _kCFURLVolumeLocalizedFormatDescriptionKey.value = value; + + late final ffi.Pointer _kCFURLVolumeTotalCapacityKey = + _lookup('kCFURLVolumeTotalCapacityKey'); + + CFStringRef get kCFURLVolumeTotalCapacityKey => + _kCFURLVolumeTotalCapacityKey.value; + + set kCFURLVolumeTotalCapacityKey(CFStringRef value) => + _kCFURLVolumeTotalCapacityKey.value = value; + + late final ffi.Pointer _kCFURLVolumeAvailableCapacityKey = + _lookup('kCFURLVolumeAvailableCapacityKey'); + + CFStringRef get kCFURLVolumeAvailableCapacityKey => + _kCFURLVolumeAvailableCapacityKey.value; + + set kCFURLVolumeAvailableCapacityKey(CFStringRef value) => + _kCFURLVolumeAvailableCapacityKey.value = value; + + late final ffi.Pointer + _kCFURLVolumeAvailableCapacityForImportantUsageKey = + _lookup('kCFURLVolumeAvailableCapacityForImportantUsageKey'); + + CFStringRef get kCFURLVolumeAvailableCapacityForImportantUsageKey => + _kCFURLVolumeAvailableCapacityForImportantUsageKey.value; + + set kCFURLVolumeAvailableCapacityForImportantUsageKey(CFStringRef value) => + _kCFURLVolumeAvailableCapacityForImportantUsageKey.value = value; + + late final ffi.Pointer + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey = + _lookup( + 'kCFURLVolumeAvailableCapacityForOpportunisticUsageKey'); + + CFStringRef get kCFURLVolumeAvailableCapacityForOpportunisticUsageKey => + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value; + + set kCFURLVolumeAvailableCapacityForOpportunisticUsageKey( + CFStringRef value) => + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; + + late final ffi.Pointer _kCFURLVolumeResourceCountKey = + _lookup('kCFURLVolumeResourceCountKey'); + + CFStringRef get kCFURLVolumeResourceCountKey => + _kCFURLVolumeResourceCountKey.value; + + set kCFURLVolumeResourceCountKey(CFStringRef value) => + _kCFURLVolumeResourceCountKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsPersistentIDsKey = + _lookup('kCFURLVolumeSupportsPersistentIDsKey'); + + CFStringRef get kCFURLVolumeSupportsPersistentIDsKey => + _kCFURLVolumeSupportsPersistentIDsKey.value; + + set kCFURLVolumeSupportsPersistentIDsKey(CFStringRef value) => + _kCFURLVolumeSupportsPersistentIDsKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsSymbolicLinksKey = + _lookup('kCFURLVolumeSupportsSymbolicLinksKey'); + + CFStringRef get kCFURLVolumeSupportsSymbolicLinksKey => + _kCFURLVolumeSupportsSymbolicLinksKey.value; + + set kCFURLVolumeSupportsSymbolicLinksKey(CFStringRef value) => + _kCFURLVolumeSupportsSymbolicLinksKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsHardLinksKey = + _lookup('kCFURLVolumeSupportsHardLinksKey'); + + CFStringRef get kCFURLVolumeSupportsHardLinksKey => + _kCFURLVolumeSupportsHardLinksKey.value; + + set kCFURLVolumeSupportsHardLinksKey(CFStringRef value) => + _kCFURLVolumeSupportsHardLinksKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsJournalingKey = + _lookup('kCFURLVolumeSupportsJournalingKey'); + + CFStringRef get kCFURLVolumeSupportsJournalingKey => + _kCFURLVolumeSupportsJournalingKey.value; + + set kCFURLVolumeSupportsJournalingKey(CFStringRef value) => + _kCFURLVolumeSupportsJournalingKey.value = value; + + late final ffi.Pointer _kCFURLVolumeIsJournalingKey = + _lookup('kCFURLVolumeIsJournalingKey'); + + CFStringRef get kCFURLVolumeIsJournalingKey => + _kCFURLVolumeIsJournalingKey.value; + + set kCFURLVolumeIsJournalingKey(CFStringRef value) => + _kCFURLVolumeIsJournalingKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsSparseFilesKey = + _lookup('kCFURLVolumeSupportsSparseFilesKey'); + + CFStringRef get kCFURLVolumeSupportsSparseFilesKey => + _kCFURLVolumeSupportsSparseFilesKey.value; + + set kCFURLVolumeSupportsSparseFilesKey(CFStringRef value) => + _kCFURLVolumeSupportsSparseFilesKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsZeroRunsKey = + _lookup('kCFURLVolumeSupportsZeroRunsKey'); + + CFStringRef get kCFURLVolumeSupportsZeroRunsKey => + _kCFURLVolumeSupportsZeroRunsKey.value; + + set kCFURLVolumeSupportsZeroRunsKey(CFStringRef value) => + _kCFURLVolumeSupportsZeroRunsKey.value = value; + + late final ffi.Pointer + _kCFURLVolumeSupportsCaseSensitiveNamesKey = + _lookup('kCFURLVolumeSupportsCaseSensitiveNamesKey'); + + CFStringRef get kCFURLVolumeSupportsCaseSensitiveNamesKey => + _kCFURLVolumeSupportsCaseSensitiveNamesKey.value; + + set kCFURLVolumeSupportsCaseSensitiveNamesKey(CFStringRef value) => + _kCFURLVolumeSupportsCaseSensitiveNamesKey.value = value; + + late final ffi.Pointer + _kCFURLVolumeSupportsCasePreservedNamesKey = + _lookup('kCFURLVolumeSupportsCasePreservedNamesKey'); + + CFStringRef get kCFURLVolumeSupportsCasePreservedNamesKey => + _kCFURLVolumeSupportsCasePreservedNamesKey.value; + + set kCFURLVolumeSupportsCasePreservedNamesKey(CFStringRef value) => + _kCFURLVolumeSupportsCasePreservedNamesKey.value = value; + + late final ffi.Pointer + _kCFURLVolumeSupportsRootDirectoryDatesKey = + _lookup('kCFURLVolumeSupportsRootDirectoryDatesKey'); + + CFStringRef get kCFURLVolumeSupportsRootDirectoryDatesKey => + _kCFURLVolumeSupportsRootDirectoryDatesKey.value; + + set kCFURLVolumeSupportsRootDirectoryDatesKey(CFStringRef value) => + _kCFURLVolumeSupportsRootDirectoryDatesKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsVolumeSizesKey = + _lookup('kCFURLVolumeSupportsVolumeSizesKey'); + + CFStringRef get kCFURLVolumeSupportsVolumeSizesKey => + _kCFURLVolumeSupportsVolumeSizesKey.value; + + set kCFURLVolumeSupportsVolumeSizesKey(CFStringRef value) => + _kCFURLVolumeSupportsVolumeSizesKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsRenamingKey = + _lookup('kCFURLVolumeSupportsRenamingKey'); + + CFStringRef get kCFURLVolumeSupportsRenamingKey => + _kCFURLVolumeSupportsRenamingKey.value; + + set kCFURLVolumeSupportsRenamingKey(CFStringRef value) => + _kCFURLVolumeSupportsRenamingKey.value = value; + + late final ffi.Pointer + _kCFURLVolumeSupportsAdvisoryFileLockingKey = + _lookup('kCFURLVolumeSupportsAdvisoryFileLockingKey'); + + CFStringRef get kCFURLVolumeSupportsAdvisoryFileLockingKey => + _kCFURLVolumeSupportsAdvisoryFileLockingKey.value; + + set kCFURLVolumeSupportsAdvisoryFileLockingKey(CFStringRef value) => + _kCFURLVolumeSupportsAdvisoryFileLockingKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsExtendedSecurityKey = + _lookup('kCFURLVolumeSupportsExtendedSecurityKey'); + + CFStringRef get kCFURLVolumeSupportsExtendedSecurityKey => + _kCFURLVolumeSupportsExtendedSecurityKey.value; + + set kCFURLVolumeSupportsExtendedSecurityKey(CFStringRef value) => + _kCFURLVolumeSupportsExtendedSecurityKey.value = value; + + late final ffi.Pointer _kCFURLVolumeIsBrowsableKey = + _lookup('kCFURLVolumeIsBrowsableKey'); + + CFStringRef get kCFURLVolumeIsBrowsableKey => + _kCFURLVolumeIsBrowsableKey.value; + + set kCFURLVolumeIsBrowsableKey(CFStringRef value) => + _kCFURLVolumeIsBrowsableKey.value = value; + + late final ffi.Pointer _kCFURLVolumeMaximumFileSizeKey = + _lookup('kCFURLVolumeMaximumFileSizeKey'); + + CFStringRef get kCFURLVolumeMaximumFileSizeKey => + _kCFURLVolumeMaximumFileSizeKey.value; + + set kCFURLVolumeMaximumFileSizeKey(CFStringRef value) => + _kCFURLVolumeMaximumFileSizeKey.value = value; + + late final ffi.Pointer _kCFURLVolumeIsEjectableKey = + _lookup('kCFURLVolumeIsEjectableKey'); + + CFStringRef get kCFURLVolumeIsEjectableKey => + _kCFURLVolumeIsEjectableKey.value; + + set kCFURLVolumeIsEjectableKey(CFStringRef value) => + _kCFURLVolumeIsEjectableKey.value = value; + + late final ffi.Pointer _kCFURLVolumeIsRemovableKey = + _lookup('kCFURLVolumeIsRemovableKey'); + + CFStringRef get kCFURLVolumeIsRemovableKey => + _kCFURLVolumeIsRemovableKey.value; + + set kCFURLVolumeIsRemovableKey(CFStringRef value) => + _kCFURLVolumeIsRemovableKey.value = value; + + late final ffi.Pointer _kCFURLVolumeIsInternalKey = + _lookup('kCFURLVolumeIsInternalKey'); + + CFStringRef get kCFURLVolumeIsInternalKey => _kCFURLVolumeIsInternalKey.value; + + set kCFURLVolumeIsInternalKey(CFStringRef value) => + _kCFURLVolumeIsInternalKey.value = value; + + late final ffi.Pointer _kCFURLVolumeIsAutomountedKey = + _lookup('kCFURLVolumeIsAutomountedKey'); + + CFStringRef get kCFURLVolumeIsAutomountedKey => + _kCFURLVolumeIsAutomountedKey.value; + + set kCFURLVolumeIsAutomountedKey(CFStringRef value) => + _kCFURLVolumeIsAutomountedKey.value = value; + + late final ffi.Pointer _kCFURLVolumeIsLocalKey = + _lookup('kCFURLVolumeIsLocalKey'); + + CFStringRef get kCFURLVolumeIsLocalKey => _kCFURLVolumeIsLocalKey.value; + + set kCFURLVolumeIsLocalKey(CFStringRef value) => + _kCFURLVolumeIsLocalKey.value = value; + + late final ffi.Pointer _kCFURLVolumeIsReadOnlyKey = + _lookup('kCFURLVolumeIsReadOnlyKey'); + + CFStringRef get kCFURLVolumeIsReadOnlyKey => _kCFURLVolumeIsReadOnlyKey.value; + + set kCFURLVolumeIsReadOnlyKey(CFStringRef value) => + _kCFURLVolumeIsReadOnlyKey.value = value; + + late final ffi.Pointer _kCFURLVolumeCreationDateKey = + _lookup('kCFURLVolumeCreationDateKey'); + + CFStringRef get kCFURLVolumeCreationDateKey => + _kCFURLVolumeCreationDateKey.value; + + set kCFURLVolumeCreationDateKey(CFStringRef value) => + _kCFURLVolumeCreationDateKey.value = value; + + late final ffi.Pointer _kCFURLVolumeURLForRemountingKey = + _lookup('kCFURLVolumeURLForRemountingKey'); + + CFStringRef get kCFURLVolumeURLForRemountingKey => + _kCFURLVolumeURLForRemountingKey.value; + + set kCFURLVolumeURLForRemountingKey(CFStringRef value) => + _kCFURLVolumeURLForRemountingKey.value = value; + + late final ffi.Pointer _kCFURLVolumeUUIDStringKey = + _lookup('kCFURLVolumeUUIDStringKey'); + + CFStringRef get kCFURLVolumeUUIDStringKey => _kCFURLVolumeUUIDStringKey.value; + + set kCFURLVolumeUUIDStringKey(CFStringRef value) => + _kCFURLVolumeUUIDStringKey.value = value; + + late final ffi.Pointer _kCFURLVolumeNameKey = + _lookup('kCFURLVolumeNameKey'); + + CFStringRef get kCFURLVolumeNameKey => _kCFURLVolumeNameKey.value; + + set kCFURLVolumeNameKey(CFStringRef value) => + _kCFURLVolumeNameKey.value = value; + + late final ffi.Pointer _kCFURLVolumeLocalizedNameKey = + _lookup('kCFURLVolumeLocalizedNameKey'); + + CFStringRef get kCFURLVolumeLocalizedNameKey => + _kCFURLVolumeLocalizedNameKey.value; + + set kCFURLVolumeLocalizedNameKey(CFStringRef value) => + _kCFURLVolumeLocalizedNameKey.value = value; + + late final ffi.Pointer _kCFURLVolumeIsEncryptedKey = + _lookup('kCFURLVolumeIsEncryptedKey'); + + CFStringRef get kCFURLVolumeIsEncryptedKey => + _kCFURLVolumeIsEncryptedKey.value; + + set kCFURLVolumeIsEncryptedKey(CFStringRef value) => + _kCFURLVolumeIsEncryptedKey.value = value; + + late final ffi.Pointer _kCFURLVolumeIsRootFileSystemKey = + _lookup('kCFURLVolumeIsRootFileSystemKey'); + + CFStringRef get kCFURLVolumeIsRootFileSystemKey => + _kCFURLVolumeIsRootFileSystemKey.value; + + set kCFURLVolumeIsRootFileSystemKey(CFStringRef value) => + _kCFURLVolumeIsRootFileSystemKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsCompressionKey = + _lookup('kCFURLVolumeSupportsCompressionKey'); + + CFStringRef get kCFURLVolumeSupportsCompressionKey => + _kCFURLVolumeSupportsCompressionKey.value; + + set kCFURLVolumeSupportsCompressionKey(CFStringRef value) => + _kCFURLVolumeSupportsCompressionKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsFileCloningKey = + _lookup('kCFURLVolumeSupportsFileCloningKey'); + + CFStringRef get kCFURLVolumeSupportsFileCloningKey => + _kCFURLVolumeSupportsFileCloningKey.value; + + set kCFURLVolumeSupportsFileCloningKey(CFStringRef value) => + _kCFURLVolumeSupportsFileCloningKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsSwapRenamingKey = + _lookup('kCFURLVolumeSupportsSwapRenamingKey'); + + CFStringRef get kCFURLVolumeSupportsSwapRenamingKey => + _kCFURLVolumeSupportsSwapRenamingKey.value; + + set kCFURLVolumeSupportsSwapRenamingKey(CFStringRef value) => + _kCFURLVolumeSupportsSwapRenamingKey.value = value; + + late final ffi.Pointer + _kCFURLVolumeSupportsExclusiveRenamingKey = + _lookup('kCFURLVolumeSupportsExclusiveRenamingKey'); + + CFStringRef get kCFURLVolumeSupportsExclusiveRenamingKey => + _kCFURLVolumeSupportsExclusiveRenamingKey.value; + + set kCFURLVolumeSupportsExclusiveRenamingKey(CFStringRef value) => + _kCFURLVolumeSupportsExclusiveRenamingKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsImmutableFilesKey = + _lookup('kCFURLVolumeSupportsImmutableFilesKey'); + + CFStringRef get kCFURLVolumeSupportsImmutableFilesKey => + _kCFURLVolumeSupportsImmutableFilesKey.value; + + set kCFURLVolumeSupportsImmutableFilesKey(CFStringRef value) => + _kCFURLVolumeSupportsImmutableFilesKey.value = value; + + late final ffi.Pointer + _kCFURLVolumeSupportsAccessPermissionsKey = + _lookup('kCFURLVolumeSupportsAccessPermissionsKey'); + + CFStringRef get kCFURLVolumeSupportsAccessPermissionsKey => + _kCFURLVolumeSupportsAccessPermissionsKey.value; + + set kCFURLVolumeSupportsAccessPermissionsKey(CFStringRef value) => + _kCFURLVolumeSupportsAccessPermissionsKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsFileProtectionKey = + _lookup('kCFURLVolumeSupportsFileProtectionKey'); + + CFStringRef get kCFURLVolumeSupportsFileProtectionKey => + _kCFURLVolumeSupportsFileProtectionKey.value; + + set kCFURLVolumeSupportsFileProtectionKey(CFStringRef value) => + _kCFURLVolumeSupportsFileProtectionKey.value = value; + + late final ffi.Pointer _kCFURLIsUbiquitousItemKey = + _lookup('kCFURLIsUbiquitousItemKey'); + + CFStringRef get kCFURLIsUbiquitousItemKey => _kCFURLIsUbiquitousItemKey.value; + + set kCFURLIsUbiquitousItemKey(CFStringRef value) => + _kCFURLIsUbiquitousItemKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemHasUnresolvedConflictsKey = + _lookup('kCFURLUbiquitousItemHasUnresolvedConflictsKey'); + + CFStringRef get kCFURLUbiquitousItemHasUnresolvedConflictsKey => + _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value; + + set kCFURLUbiquitousItemHasUnresolvedConflictsKey(CFStringRef value) => + _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadedKey = + _lookup('kCFURLUbiquitousItemIsDownloadedKey'); + + CFStringRef get kCFURLUbiquitousItemIsDownloadedKey => + _kCFURLUbiquitousItemIsDownloadedKey.value; + + set kCFURLUbiquitousItemIsDownloadedKey(CFStringRef value) => + _kCFURLUbiquitousItemIsDownloadedKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadingKey = + _lookup('kCFURLUbiquitousItemIsDownloadingKey'); + + CFStringRef get kCFURLUbiquitousItemIsDownloadingKey => + _kCFURLUbiquitousItemIsDownloadingKey.value; + + set kCFURLUbiquitousItemIsDownloadingKey(CFStringRef value) => + _kCFURLUbiquitousItemIsDownloadingKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsUploadedKey = + _lookup('kCFURLUbiquitousItemIsUploadedKey'); + + CFStringRef get kCFURLUbiquitousItemIsUploadedKey => + _kCFURLUbiquitousItemIsUploadedKey.value; + + set kCFURLUbiquitousItemIsUploadedKey(CFStringRef value) => + _kCFURLUbiquitousItemIsUploadedKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsUploadingKey = + _lookup('kCFURLUbiquitousItemIsUploadingKey'); + + CFStringRef get kCFURLUbiquitousItemIsUploadingKey => + _kCFURLUbiquitousItemIsUploadingKey.value; + + set kCFURLUbiquitousItemIsUploadingKey(CFStringRef value) => + _kCFURLUbiquitousItemIsUploadingKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemPercentDownloadedKey = + _lookup('kCFURLUbiquitousItemPercentDownloadedKey'); + + CFStringRef get kCFURLUbiquitousItemPercentDownloadedKey => + _kCFURLUbiquitousItemPercentDownloadedKey.value; + + set kCFURLUbiquitousItemPercentDownloadedKey(CFStringRef value) => + _kCFURLUbiquitousItemPercentDownloadedKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemPercentUploadedKey = + _lookup('kCFURLUbiquitousItemPercentUploadedKey'); + + CFStringRef get kCFURLUbiquitousItemPercentUploadedKey => + _kCFURLUbiquitousItemPercentUploadedKey.value; + + set kCFURLUbiquitousItemPercentUploadedKey(CFStringRef value) => + _kCFURLUbiquitousItemPercentUploadedKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusKey = + _lookup('kCFURLUbiquitousItemDownloadingStatusKey'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusKey => + _kCFURLUbiquitousItemDownloadingStatusKey.value; + + set kCFURLUbiquitousItemDownloadingStatusKey(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingStatusKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemDownloadingErrorKey = + _lookup('kCFURLUbiquitousItemDownloadingErrorKey'); + + CFStringRef get kCFURLUbiquitousItemDownloadingErrorKey => + _kCFURLUbiquitousItemDownloadingErrorKey.value; + + set kCFURLUbiquitousItemDownloadingErrorKey(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingErrorKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemUploadingErrorKey = + _lookup('kCFURLUbiquitousItemUploadingErrorKey'); + + CFStringRef get kCFURLUbiquitousItemUploadingErrorKey => + _kCFURLUbiquitousItemUploadingErrorKey.value; + + set kCFURLUbiquitousItemUploadingErrorKey(CFStringRef value) => + _kCFURLUbiquitousItemUploadingErrorKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemIsExcludedFromSyncKey = + _lookup('kCFURLUbiquitousItemIsExcludedFromSyncKey'); + + CFStringRef get kCFURLUbiquitousItemIsExcludedFromSyncKey => + _kCFURLUbiquitousItemIsExcludedFromSyncKey.value; + + set kCFURLUbiquitousItemIsExcludedFromSyncKey(CFStringRef value) => + _kCFURLUbiquitousItemIsExcludedFromSyncKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusNotDownloaded = + _lookup( + 'kCFURLUbiquitousItemDownloadingStatusNotDownloaded'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusNotDownloaded => + _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value; + + set kCFURLUbiquitousItemDownloadingStatusNotDownloaded(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusDownloaded = + _lookup('kCFURLUbiquitousItemDownloadingStatusDownloaded'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusDownloaded => + _kCFURLUbiquitousItemDownloadingStatusDownloaded.value; + + set kCFURLUbiquitousItemDownloadingStatusDownloaded(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingStatusDownloaded.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusCurrent = + _lookup('kCFURLUbiquitousItemDownloadingStatusCurrent'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusCurrent => + _kCFURLUbiquitousItemDownloadingStatusCurrent.value; + + set kCFURLUbiquitousItemDownloadingStatusCurrent(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingStatusCurrent.value = value; + + CFDataRef CFURLCreateBookmarkData( + CFAllocatorRef allocator, + CFURLRef url, + int options, + CFArrayRef resourcePropertiesToInclude, + CFURLRef relativeToURL, + ffi.Pointer error, + ) { + return _CFURLCreateBookmarkData( + allocator, + url, + options, + resourcePropertiesToInclude, + relativeToURL, + error, + ); + } + + late final _CFURLCreateBookmarkDataPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, CFArrayRef, + CFURLRef, ffi.Pointer)>>('CFURLCreateBookmarkData'); + late final _CFURLCreateBookmarkData = _CFURLCreateBookmarkDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, int, CFArrayRef, CFURLRef, + ffi.Pointer)>(); + + CFURLRef CFURLCreateByResolvingBookmarkData( + CFAllocatorRef allocator, + CFDataRef bookmark, + int options, + CFURLRef relativeToURL, + CFArrayRef resourcePropertiesToInclude, + ffi.Pointer isStale, + ffi.Pointer error, + ) { + return _CFURLCreateByResolvingBookmarkData( + allocator, + bookmark, + options, + relativeToURL, + resourcePropertiesToInclude, + isStale, + error, + ); + } + + late final _CFURLCreateByResolvingBookmarkDataPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( + CFAllocatorRef, + CFDataRef, + ffi.Int32, + CFURLRef, + CFArrayRef, + ffi.Pointer, + ffi.Pointer)>>('CFURLCreateByResolvingBookmarkData'); + late final _CFURLCreateByResolvingBookmarkData = + _CFURLCreateByResolvingBookmarkDataPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFDataRef, int, CFURLRef, + CFArrayRef, ffi.Pointer, ffi.Pointer)>(); + + CFDictionaryRef CFURLCreateResourcePropertiesForKeysFromBookmarkData( + CFAllocatorRef allocator, + CFArrayRef resourcePropertiesToReturn, + CFDataRef bookmark, + ) { + return _CFURLCreateResourcePropertiesForKeysFromBookmarkData( + allocator, + resourcePropertiesToReturn, + bookmark, + ); + } + + late final _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>>( + 'CFURLCreateResourcePropertiesForKeysFromBookmarkData'); + late final _CFURLCreateResourcePropertiesForKeysFromBookmarkData = + _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>(); + + CFTypeRef CFURLCreateResourcePropertyForKeyFromBookmarkData( + CFAllocatorRef allocator, + CFStringRef resourcePropertyKey, + CFDataRef bookmark, + ) { + return _CFURLCreateResourcePropertyForKeyFromBookmarkData( + allocator, + resourcePropertyKey, + bookmark, + ); + } + + late final _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFAllocatorRef, CFStringRef, + CFDataRef)>>('CFURLCreateResourcePropertyForKeyFromBookmarkData'); + late final _CFURLCreateResourcePropertyForKeyFromBookmarkData = + _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr.asFunction< + CFTypeRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); + + CFDataRef CFURLCreateBookmarkDataFromFile( + CFAllocatorRef allocator, + CFURLRef fileURL, + ffi.Pointer errorRef, + ) { + return _CFURLCreateBookmarkDataFromFile( + allocator, + fileURL, + errorRef, + ); + } + + late final _CFURLCreateBookmarkDataFromFilePtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, + ffi.Pointer)>>('CFURLCreateBookmarkDataFromFile'); + late final _CFURLCreateBookmarkDataFromFile = + _CFURLCreateBookmarkDataFromFilePtr.asFunction< + CFDataRef Function( + CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + + int CFURLWriteBookmarkDataToFile( + CFDataRef bookmarkRef, + CFURLRef fileURL, + int options, + ffi.Pointer errorRef, + ) { + return _CFURLWriteBookmarkDataToFile( + bookmarkRef, + fileURL, + options, + errorRef, + ); + } + + late final _CFURLWriteBookmarkDataToFilePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFDataRef, + CFURLRef, + CFURLBookmarkFileCreationOptions, + ffi.Pointer)>>('CFURLWriteBookmarkDataToFile'); + late final _CFURLWriteBookmarkDataToFile = + _CFURLWriteBookmarkDataToFilePtr.asFunction< + int Function(CFDataRef, CFURLRef, int, ffi.Pointer)>(); + + CFDataRef CFURLCreateBookmarkDataFromAliasRecord( + CFAllocatorRef allocatorRef, + CFDataRef aliasRecordDataRef, + ) { + return _CFURLCreateBookmarkDataFromAliasRecord( + allocatorRef, + aliasRecordDataRef, + ); + } + + late final _CFURLCreateBookmarkDataFromAliasRecordPtr = _lookup< + ffi.NativeFunction>( + 'CFURLCreateBookmarkDataFromAliasRecord'); + late final _CFURLCreateBookmarkDataFromAliasRecord = + _CFURLCreateBookmarkDataFromAliasRecordPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFDataRef)>(); + + int CFURLStartAccessingSecurityScopedResource( + CFURLRef url, + ) { + return _CFURLStartAccessingSecurityScopedResource( + url, + ); + } + + late final _CFURLStartAccessingSecurityScopedResourcePtr = + _lookup>( + 'CFURLStartAccessingSecurityScopedResource'); + late final _CFURLStartAccessingSecurityScopedResource = + _CFURLStartAccessingSecurityScopedResourcePtr.asFunction< + int Function(CFURLRef)>(); + + void CFURLStopAccessingSecurityScopedResource( + CFURLRef url, + ) { + return _CFURLStopAccessingSecurityScopedResource( + url, + ); + } + + late final _CFURLStopAccessingSecurityScopedResourcePtr = + _lookup>( + 'CFURLStopAccessingSecurityScopedResource'); + late final _CFURLStopAccessingSecurityScopedResource = + _CFURLStopAccessingSecurityScopedResourcePtr.asFunction< + void Function(CFURLRef)>(); + + late final ffi.Pointer _kCFRunLoopDefaultMode = + _lookup('kCFRunLoopDefaultMode'); + + CFRunLoopMode get kCFRunLoopDefaultMode => _kCFRunLoopDefaultMode.value; + + set kCFRunLoopDefaultMode(CFRunLoopMode value) => + _kCFRunLoopDefaultMode.value = value; + + late final ffi.Pointer _kCFRunLoopCommonModes = + _lookup('kCFRunLoopCommonModes'); + + CFRunLoopMode get kCFRunLoopCommonModes => _kCFRunLoopCommonModes.value; + + set kCFRunLoopCommonModes(CFRunLoopMode value) => + _kCFRunLoopCommonModes.value = value; + + int CFRunLoopGetTypeID() { + return _CFRunLoopGetTypeID(); + } + + late final _CFRunLoopGetTypeIDPtr = + _lookup>('CFRunLoopGetTypeID'); + late final _CFRunLoopGetTypeID = + _CFRunLoopGetTypeIDPtr.asFunction(); + + CFRunLoopRef CFRunLoopGetCurrent() { + return _CFRunLoopGetCurrent(); + } + + late final _CFRunLoopGetCurrentPtr = + _lookup>( + 'CFRunLoopGetCurrent'); + late final _CFRunLoopGetCurrent = + _CFRunLoopGetCurrentPtr.asFunction(); + + CFRunLoopRef CFRunLoopGetMain() { + return _CFRunLoopGetMain(); + } + + late final _CFRunLoopGetMainPtr = + _lookup>('CFRunLoopGetMain'); + late final _CFRunLoopGetMain = + _CFRunLoopGetMainPtr.asFunction(); + + CFRunLoopMode CFRunLoopCopyCurrentMode( + CFRunLoopRef rl, + ) { + return _CFRunLoopCopyCurrentMode( + rl, + ); + } + + late final _CFRunLoopCopyCurrentModePtr = + _lookup>( + 'CFRunLoopCopyCurrentMode'); + late final _CFRunLoopCopyCurrentMode = _CFRunLoopCopyCurrentModePtr + .asFunction(); + + CFArrayRef CFRunLoopCopyAllModes( + CFRunLoopRef rl, + ) { + return _CFRunLoopCopyAllModes( + rl, + ); + } + + late final _CFRunLoopCopyAllModesPtr = + _lookup>( + 'CFRunLoopCopyAllModes'); + late final _CFRunLoopCopyAllModes = + _CFRunLoopCopyAllModesPtr.asFunction(); + + void CFRunLoopAddCommonMode( + CFRunLoopRef rl, + CFRunLoopMode mode, + ) { + return _CFRunLoopAddCommonMode( + rl, + mode, + ); + } + + late final _CFRunLoopAddCommonModePtr = _lookup< + ffi.NativeFunction>( + 'CFRunLoopAddCommonMode'); + late final _CFRunLoopAddCommonMode = _CFRunLoopAddCommonModePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopMode)>(); + + double CFRunLoopGetNextTimerFireDate( + CFRunLoopRef rl, + CFRunLoopMode mode, + ) { + return _CFRunLoopGetNextTimerFireDate( + rl, + mode, + ); + } + + late final _CFRunLoopGetNextTimerFireDatePtr = _lookup< + ffi.NativeFunction< + CFAbsoluteTime Function( + CFRunLoopRef, CFRunLoopMode)>>('CFRunLoopGetNextTimerFireDate'); + late final _CFRunLoopGetNextTimerFireDate = _CFRunLoopGetNextTimerFireDatePtr + .asFunction(); + + void CFRunLoopRun() { + return _CFRunLoopRun(); + } + + late final _CFRunLoopRunPtr = + _lookup>('CFRunLoopRun'); + late final _CFRunLoopRun = _CFRunLoopRunPtr.asFunction(); + + int CFRunLoopRunInMode( + CFRunLoopMode mode, + double seconds, + int returnAfterSourceHandled, + ) { + return _CFRunLoopRunInMode( + mode, + seconds, + returnAfterSourceHandled, + ); + } + + late final _CFRunLoopRunInModePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + CFRunLoopMode, CFTimeInterval, Boolean)>>('CFRunLoopRunInMode'); + late final _CFRunLoopRunInMode = _CFRunLoopRunInModePtr.asFunction< + int Function(CFRunLoopMode, double, int)>(); + + int CFRunLoopIsWaiting( + CFRunLoopRef rl, + ) { + return _CFRunLoopIsWaiting( + rl, + ); + } + + late final _CFRunLoopIsWaitingPtr = + _lookup>( + 'CFRunLoopIsWaiting'); + late final _CFRunLoopIsWaiting = + _CFRunLoopIsWaitingPtr.asFunction(); + + void CFRunLoopWakeUp( + CFRunLoopRef rl, + ) { + return _CFRunLoopWakeUp( + rl, + ); + } + + late final _CFRunLoopWakeUpPtr = + _lookup>( + 'CFRunLoopWakeUp'); + late final _CFRunLoopWakeUp = + _CFRunLoopWakeUpPtr.asFunction(); + + void CFRunLoopStop( + CFRunLoopRef rl, + ) { + return _CFRunLoopStop( + rl, + ); + } + + late final _CFRunLoopStopPtr = + _lookup>( + 'CFRunLoopStop'); + late final _CFRunLoopStop = + _CFRunLoopStopPtr.asFunction(); + + void CFRunLoopPerformBlock( + CFRunLoopRef rl, + CFTypeRef mode, + ffi.Pointer<_ObjCBlock> block, + ) { + return _CFRunLoopPerformBlock( + rl, + mode, + block, + ); + } + + late final _CFRunLoopPerformBlockPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFTypeRef, + ffi.Pointer<_ObjCBlock>)>>('CFRunLoopPerformBlock'); + late final _CFRunLoopPerformBlock = _CFRunLoopPerformBlockPtr.asFunction< + void Function(CFRunLoopRef, CFTypeRef, ffi.Pointer<_ObjCBlock>)>(); + + int CFRunLoopContainsSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, + ) { + return _CFRunLoopContainsSource( + rl, + source, + mode, + ); + } + + late final _CFRunLoopContainsSourcePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopContainsSource'); + late final _CFRunLoopContainsSource = _CFRunLoopContainsSourcePtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + + void CFRunLoopAddSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, + ) { + return _CFRunLoopAddSource( + rl, + source, + mode, + ); + } + + late final _CFRunLoopAddSourcePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopAddSource'); + late final _CFRunLoopAddSource = _CFRunLoopAddSourcePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + + void CFRunLoopRemoveSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, + ) { + return _CFRunLoopRemoveSource( + rl, + source, + mode, + ); + } + + late final _CFRunLoopRemoveSourcePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopRemoveSource'); + late final _CFRunLoopRemoveSource = _CFRunLoopRemoveSourcePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + + int CFRunLoopContainsObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, + ) { + return _CFRunLoopContainsObserver( + rl, + observer, + mode, + ); + } + + late final _CFRunLoopContainsObserverPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopContainsObserver'); + late final _CFRunLoopContainsObserver = + _CFRunLoopContainsObserverPtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + + void CFRunLoopAddObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, + ) { + return _CFRunLoopAddObserver( + rl, + observer, + mode, + ); + } + + late final _CFRunLoopAddObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopAddObserver'); + late final _CFRunLoopAddObserver = _CFRunLoopAddObserverPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + + void CFRunLoopRemoveObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, + ) { + return _CFRunLoopRemoveObserver( + rl, + observer, + mode, + ); + } + + late final _CFRunLoopRemoveObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopRemoveObserver'); + late final _CFRunLoopRemoveObserver = _CFRunLoopRemoveObserverPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + + int CFRunLoopContainsTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, + ) { + return _CFRunLoopContainsTimer( + rl, + timer, + mode, + ); + } + + late final _CFRunLoopContainsTimerPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopContainsTimer'); + late final _CFRunLoopContainsTimer = _CFRunLoopContainsTimerPtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + + void CFRunLoopAddTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, + ) { + return _CFRunLoopAddTimer( + rl, + timer, + mode, + ); + } + + late final _CFRunLoopAddTimerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopAddTimer'); + late final _CFRunLoopAddTimer = _CFRunLoopAddTimerPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + + void CFRunLoopRemoveTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, + ) { + return _CFRunLoopRemoveTimer( + rl, + timer, + mode, + ); + } + + late final _CFRunLoopRemoveTimerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopRemoveTimer'); + late final _CFRunLoopRemoveTimer = _CFRunLoopRemoveTimerPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + + int CFRunLoopSourceGetTypeID() { + return _CFRunLoopSourceGetTypeID(); + } + + late final _CFRunLoopSourceGetTypeIDPtr = + _lookup>( + 'CFRunLoopSourceGetTypeID'); + late final _CFRunLoopSourceGetTypeID = + _CFRunLoopSourceGetTypeIDPtr.asFunction(); + + CFRunLoopSourceRef CFRunLoopSourceCreate( + CFAllocatorRef allocator, + int order, + ffi.Pointer context, + ) { + return _CFRunLoopSourceCreate( + allocator, + order, + context, + ); + } + + late final _CFRunLoopSourceCreatePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFRunLoopSourceCreate'); + late final _CFRunLoopSourceCreate = _CFRunLoopSourceCreatePtr.asFunction< + CFRunLoopSourceRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); + + int CFRunLoopSourceGetOrder( + CFRunLoopSourceRef source, + ) { + return _CFRunLoopSourceGetOrder( + source, + ); + } + + late final _CFRunLoopSourceGetOrderPtr = + _lookup>( + 'CFRunLoopSourceGetOrder'); + late final _CFRunLoopSourceGetOrder = _CFRunLoopSourceGetOrderPtr.asFunction< + int Function(CFRunLoopSourceRef)>(); + + void CFRunLoopSourceInvalidate( + CFRunLoopSourceRef source, + ) { + return _CFRunLoopSourceInvalidate( + source, + ); + } + + late final _CFRunLoopSourceInvalidatePtr = + _lookup>( + 'CFRunLoopSourceInvalidate'); + late final _CFRunLoopSourceInvalidate = _CFRunLoopSourceInvalidatePtr + .asFunction(); + + int CFRunLoopSourceIsValid( + CFRunLoopSourceRef source, + ) { + return _CFRunLoopSourceIsValid( + source, + ); + } + + late final _CFRunLoopSourceIsValidPtr = + _lookup>( + 'CFRunLoopSourceIsValid'); + late final _CFRunLoopSourceIsValid = + _CFRunLoopSourceIsValidPtr.asFunction(); + + void CFRunLoopSourceGetContext( + CFRunLoopSourceRef source, + ffi.Pointer context, + ) { + return _CFRunLoopSourceGetContext( + source, + context, + ); + } + + late final _CFRunLoopSourceGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFRunLoopSourceRef, ffi.Pointer)>>( + 'CFRunLoopSourceGetContext'); + late final _CFRunLoopSourceGetContext = + _CFRunLoopSourceGetContextPtr.asFunction< + void Function( + CFRunLoopSourceRef, ffi.Pointer)>(); + + void CFRunLoopSourceSignal( + CFRunLoopSourceRef source, + ) { + return _CFRunLoopSourceSignal( + source, + ); + } + + late final _CFRunLoopSourceSignalPtr = + _lookup>( + 'CFRunLoopSourceSignal'); + late final _CFRunLoopSourceSignal = + _CFRunLoopSourceSignalPtr.asFunction(); + + int CFRunLoopObserverGetTypeID() { + return _CFRunLoopObserverGetTypeID(); + } + + late final _CFRunLoopObserverGetTypeIDPtr = + _lookup>( + 'CFRunLoopObserverGetTypeID'); + late final _CFRunLoopObserverGetTypeID = + _CFRunLoopObserverGetTypeIDPtr.asFunction(); + + CFRunLoopObserverRef CFRunLoopObserverCreate( + CFAllocatorRef allocator, + int activities, + int repeats, + int order, + CFRunLoopObserverCallBack callout, + ffi.Pointer context, + ) { + return _CFRunLoopObserverCreate( + allocator, + activities, + repeats, + order, + callout, + context, + ); + } + + late final _CFRunLoopObserverCreatePtr = _lookup< + ffi.NativeFunction< + CFRunLoopObserverRef Function( + CFAllocatorRef, + CFOptionFlags, + Boolean, + CFIndex, + CFRunLoopObserverCallBack, + ffi.Pointer)>>( + 'CFRunLoopObserverCreate'); + late final _CFRunLoopObserverCreate = _CFRunLoopObserverCreatePtr.asFunction< + CFRunLoopObserverRef Function(CFAllocatorRef, int, int, int, + CFRunLoopObserverCallBack, ffi.Pointer)>(); + + CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler( + CFAllocatorRef allocator, + int activities, + int repeats, + int order, + ffi.Pointer<_ObjCBlock> block, + ) { + return _CFRunLoopObserverCreateWithHandler( + allocator, + activities, + repeats, + order, + block, + ); + } + + late final _CFRunLoopObserverCreateWithHandlerPtr = _lookup< + ffi.NativeFunction< + CFRunLoopObserverRef Function( + CFAllocatorRef, + CFOptionFlags, + Boolean, + CFIndex, + ffi.Pointer<_ObjCBlock>)>>('CFRunLoopObserverCreateWithHandler'); + late final _CFRunLoopObserverCreateWithHandler = + _CFRunLoopObserverCreateWithHandlerPtr.asFunction< + CFRunLoopObserverRef Function( + CFAllocatorRef, int, int, int, ffi.Pointer<_ObjCBlock>)>(); + + int CFRunLoopObserverGetActivities( + CFRunLoopObserverRef observer, + ) { + return _CFRunLoopObserverGetActivities( + observer, + ); + } + + late final _CFRunLoopObserverGetActivitiesPtr = + _lookup>( + 'CFRunLoopObserverGetActivities'); + late final _CFRunLoopObserverGetActivities = + _CFRunLoopObserverGetActivitiesPtr.asFunction< + int Function(CFRunLoopObserverRef)>(); + + int CFRunLoopObserverDoesRepeat( + CFRunLoopObserverRef observer, + ) { + return _CFRunLoopObserverDoesRepeat( + observer, + ); + } + + late final _CFRunLoopObserverDoesRepeatPtr = + _lookup>( + 'CFRunLoopObserverDoesRepeat'); + late final _CFRunLoopObserverDoesRepeat = _CFRunLoopObserverDoesRepeatPtr + .asFunction(); + + int CFRunLoopObserverGetOrder( + CFRunLoopObserverRef observer, + ) { + return _CFRunLoopObserverGetOrder( + observer, + ); + } + + late final _CFRunLoopObserverGetOrderPtr = + _lookup>( + 'CFRunLoopObserverGetOrder'); + late final _CFRunLoopObserverGetOrder = _CFRunLoopObserverGetOrderPtr + .asFunction(); + + void CFRunLoopObserverInvalidate( + CFRunLoopObserverRef observer, + ) { + return _CFRunLoopObserverInvalidate( + observer, + ); + } + + late final _CFRunLoopObserverInvalidatePtr = + _lookup>( + 'CFRunLoopObserverInvalidate'); + late final _CFRunLoopObserverInvalidate = _CFRunLoopObserverInvalidatePtr + .asFunction(); + + int CFRunLoopObserverIsValid( + CFRunLoopObserverRef observer, + ) { + return _CFRunLoopObserverIsValid( + observer, + ); + } + + late final _CFRunLoopObserverIsValidPtr = + _lookup>( + 'CFRunLoopObserverIsValid'); + late final _CFRunLoopObserverIsValid = _CFRunLoopObserverIsValidPtr + .asFunction(); + + void CFRunLoopObserverGetContext( + CFRunLoopObserverRef observer, + ffi.Pointer context, + ) { + return _CFRunLoopObserverGetContext( + observer, + context, + ); + } + + late final _CFRunLoopObserverGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef, + ffi.Pointer)>>( + 'CFRunLoopObserverGetContext'); + late final _CFRunLoopObserverGetContext = + _CFRunLoopObserverGetContextPtr.asFunction< + void Function( + CFRunLoopObserverRef, ffi.Pointer)>(); + + int CFRunLoopTimerGetTypeID() { + return _CFRunLoopTimerGetTypeID(); + } + + late final _CFRunLoopTimerGetTypeIDPtr = + _lookup>( + 'CFRunLoopTimerGetTypeID'); + late final _CFRunLoopTimerGetTypeID = + _CFRunLoopTimerGetTypeIDPtr.asFunction(); + + CFRunLoopTimerRef CFRunLoopTimerCreate( + CFAllocatorRef allocator, + double fireDate, + double interval, + int flags, + int order, + CFRunLoopTimerCallBack callout, + ffi.Pointer context, + ) { + return _CFRunLoopTimerCreate( + allocator, + fireDate, + interval, + flags, + order, + callout, + context, + ); + } + + late final _CFRunLoopTimerCreatePtr = _lookup< + ffi.NativeFunction< + CFRunLoopTimerRef Function( + CFAllocatorRef, + CFAbsoluteTime, + CFTimeInterval, + CFOptionFlags, + CFIndex, + CFRunLoopTimerCallBack, + ffi.Pointer)>>('CFRunLoopTimerCreate'); + late final _CFRunLoopTimerCreate = _CFRunLoopTimerCreatePtr.asFunction< + CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, + CFRunLoopTimerCallBack, ffi.Pointer)>(); + + CFRunLoopTimerRef CFRunLoopTimerCreateWithHandler( + CFAllocatorRef allocator, + double fireDate, + double interval, + int flags, + int order, + ffi.Pointer<_ObjCBlock> block, + ) { + return _CFRunLoopTimerCreateWithHandler( + allocator, + fireDate, + interval, + flags, + order, + block, + ); + } + + late final _CFRunLoopTimerCreateWithHandlerPtr = _lookup< + ffi.NativeFunction< + CFRunLoopTimerRef Function( + CFAllocatorRef, + CFAbsoluteTime, + CFTimeInterval, + CFOptionFlags, + CFIndex, + ffi.Pointer<_ObjCBlock>)>>('CFRunLoopTimerCreateWithHandler'); + late final _CFRunLoopTimerCreateWithHandler = + _CFRunLoopTimerCreateWithHandlerPtr.asFunction< + CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, + ffi.Pointer<_ObjCBlock>)>(); + + double CFRunLoopTimerGetNextFireDate( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerGetNextFireDate( + timer, + ); + } + + late final _CFRunLoopTimerGetNextFireDatePtr = + _lookup>( + 'CFRunLoopTimerGetNextFireDate'); + late final _CFRunLoopTimerGetNextFireDate = _CFRunLoopTimerGetNextFireDatePtr + .asFunction(); + + void CFRunLoopTimerSetNextFireDate( + CFRunLoopTimerRef timer, + double fireDate, + ) { + return _CFRunLoopTimerSetNextFireDate( + timer, + fireDate, + ); + } + + late final _CFRunLoopTimerSetNextFireDatePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopTimerRef, + CFAbsoluteTime)>>('CFRunLoopTimerSetNextFireDate'); + late final _CFRunLoopTimerSetNextFireDate = _CFRunLoopTimerSetNextFireDatePtr + .asFunction(); + + double CFRunLoopTimerGetInterval( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerGetInterval( + timer, + ); + } + + late final _CFRunLoopTimerGetIntervalPtr = + _lookup>( + 'CFRunLoopTimerGetInterval'); + late final _CFRunLoopTimerGetInterval = _CFRunLoopTimerGetIntervalPtr + .asFunction(); + + int CFRunLoopTimerDoesRepeat( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerDoesRepeat( + timer, + ); + } + + late final _CFRunLoopTimerDoesRepeatPtr = + _lookup>( + 'CFRunLoopTimerDoesRepeat'); + late final _CFRunLoopTimerDoesRepeat = _CFRunLoopTimerDoesRepeatPtr + .asFunction(); + + int CFRunLoopTimerGetOrder( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerGetOrder( + timer, + ); + } + + late final _CFRunLoopTimerGetOrderPtr = + _lookup>( + 'CFRunLoopTimerGetOrder'); + late final _CFRunLoopTimerGetOrder = + _CFRunLoopTimerGetOrderPtr.asFunction(); + + void CFRunLoopTimerInvalidate( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerInvalidate( + timer, + ); + } + + late final _CFRunLoopTimerInvalidatePtr = + _lookup>( + 'CFRunLoopTimerInvalidate'); + late final _CFRunLoopTimerInvalidate = _CFRunLoopTimerInvalidatePtr + .asFunction(); + + int CFRunLoopTimerIsValid( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerIsValid( + timer, + ); + } + + late final _CFRunLoopTimerIsValidPtr = + _lookup>( + 'CFRunLoopTimerIsValid'); + late final _CFRunLoopTimerIsValid = + _CFRunLoopTimerIsValidPtr.asFunction(); + + void CFRunLoopTimerGetContext( + CFRunLoopTimerRef timer, + ffi.Pointer context, + ) { + return _CFRunLoopTimerGetContext( + timer, + context, + ); + } + + late final _CFRunLoopTimerGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopTimerRef, + ffi.Pointer)>>('CFRunLoopTimerGetContext'); + late final _CFRunLoopTimerGetContext = + _CFRunLoopTimerGetContextPtr.asFunction< + void Function( + CFRunLoopTimerRef, ffi.Pointer)>(); + + double CFRunLoopTimerGetTolerance( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerGetTolerance( + timer, + ); + } + + late final _CFRunLoopTimerGetTolerancePtr = + _lookup>( + 'CFRunLoopTimerGetTolerance'); + late final _CFRunLoopTimerGetTolerance = _CFRunLoopTimerGetTolerancePtr + .asFunction(); + + void CFRunLoopTimerSetTolerance( + CFRunLoopTimerRef timer, + double tolerance, + ) { + return _CFRunLoopTimerSetTolerance( + timer, + tolerance, + ); + } + + late final _CFRunLoopTimerSetTolerancePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopTimerRef, + CFTimeInterval)>>('CFRunLoopTimerSetTolerance'); + late final _CFRunLoopTimerSetTolerance = _CFRunLoopTimerSetTolerancePtr + .asFunction(); + + int CFSocketGetTypeID() { + return _CFSocketGetTypeID(); + } + + late final _CFSocketGetTypeIDPtr = + _lookup>('CFSocketGetTypeID'); + late final _CFSocketGetTypeID = + _CFSocketGetTypeIDPtr.asFunction(); + + CFSocketRef CFSocketCreate( + CFAllocatorRef allocator, + int protocolFamily, + int socketType, + int protocol, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, + ) { + return _CFSocketCreate( + allocator, + protocolFamily, + socketType, + protocol, + callBackTypes, + callout, + context, + ); + } + + late final _CFSocketCreatePtr = _lookup< + ffi.NativeFunction< + CFSocketRef Function( + CFAllocatorRef, + SInt32, + SInt32, + SInt32, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer)>>('CFSocketCreate'); + late final _CFSocketCreate = _CFSocketCreatePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, int, int, int, int, CFSocketCallBack, + ffi.Pointer)>(); + + CFSocketRef CFSocketCreateWithNative( + CFAllocatorRef allocator, + int sock, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, + ) { + return _CFSocketCreateWithNative( + allocator, + sock, + callBackTypes, + callout, + context, + ); + } + + late final _CFSocketCreateWithNativePtr = _lookup< + ffi.NativeFunction< + CFSocketRef Function( + CFAllocatorRef, + CFSocketNativeHandle, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer)>>('CFSocketCreateWithNative'); + late final _CFSocketCreateWithNative = + _CFSocketCreateWithNativePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, int, int, CFSocketCallBack, + ffi.Pointer)>(); + + CFSocketRef CFSocketCreateWithSocketSignature( + CFAllocatorRef allocator, + ffi.Pointer signature, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, + ) { + return _CFSocketCreateWithSocketSignature( + allocator, + signature, + callBackTypes, + callout, + context, + ); + } + + late final _CFSocketCreateWithSocketSignaturePtr = _lookup< + ffi.NativeFunction< + CFSocketRef Function( + CFAllocatorRef, + ffi.Pointer, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer)>>( + 'CFSocketCreateWithSocketSignature'); + late final _CFSocketCreateWithSocketSignature = + _CFSocketCreateWithSocketSignaturePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, ffi.Pointer, + int, CFSocketCallBack, ffi.Pointer)>(); + + CFSocketRef CFSocketCreateConnectedToSocketSignature( + CFAllocatorRef allocator, + ffi.Pointer signature, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, + double timeout, + ) { + return _CFSocketCreateConnectedToSocketSignature( + allocator, + signature, + callBackTypes, + callout, + context, + timeout, + ); + } + + late final _CFSocketCreateConnectedToSocketSignaturePtr = _lookup< + ffi.NativeFunction< + CFSocketRef Function( + CFAllocatorRef, + ffi.Pointer, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer, + CFTimeInterval)>>('CFSocketCreateConnectedToSocketSignature'); + late final _CFSocketCreateConnectedToSocketSignature = + _CFSocketCreateConnectedToSocketSignaturePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, ffi.Pointer, + int, CFSocketCallBack, ffi.Pointer, double)>(); + + int CFSocketSetAddress( + CFSocketRef s, + CFDataRef address, + ) { + return _CFSocketSetAddress( + s, + address, + ); + } + + late final _CFSocketSetAddressPtr = + _lookup>( + 'CFSocketSetAddress'); + late final _CFSocketSetAddress = + _CFSocketSetAddressPtr.asFunction(); + + int CFSocketConnectToAddress( + CFSocketRef s, + CFDataRef address, + double timeout, + ) { + return _CFSocketConnectToAddress( + s, + address, + timeout, + ); + } + + late final _CFSocketConnectToAddressPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFSocketRef, CFDataRef, + CFTimeInterval)>>('CFSocketConnectToAddress'); + late final _CFSocketConnectToAddress = _CFSocketConnectToAddressPtr + .asFunction(); + + void CFSocketInvalidate( + CFSocketRef s, + ) { + return _CFSocketInvalidate( + s, + ); + } + + late final _CFSocketInvalidatePtr = + _lookup>( + 'CFSocketInvalidate'); + late final _CFSocketInvalidate = + _CFSocketInvalidatePtr.asFunction(); + + int CFSocketIsValid( + CFSocketRef s, + ) { + return _CFSocketIsValid( + s, + ); + } + + late final _CFSocketIsValidPtr = + _lookup>( + 'CFSocketIsValid'); + late final _CFSocketIsValid = + _CFSocketIsValidPtr.asFunction(); + + CFDataRef CFSocketCopyAddress( + CFSocketRef s, + ) { + return _CFSocketCopyAddress( + s, + ); + } + + late final _CFSocketCopyAddressPtr = + _lookup>( + 'CFSocketCopyAddress'); + late final _CFSocketCopyAddress = + _CFSocketCopyAddressPtr.asFunction(); + + CFDataRef CFSocketCopyPeerAddress( + CFSocketRef s, + ) { + return _CFSocketCopyPeerAddress( + s, + ); + } + + late final _CFSocketCopyPeerAddressPtr = + _lookup>( + 'CFSocketCopyPeerAddress'); + late final _CFSocketCopyPeerAddress = + _CFSocketCopyPeerAddressPtr.asFunction(); + + void CFSocketGetContext( + CFSocketRef s, + ffi.Pointer context, + ) { + return _CFSocketGetContext( + s, + context, + ); + } + + late final _CFSocketGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFSocketRef, + ffi.Pointer)>>('CFSocketGetContext'); + late final _CFSocketGetContext = _CFSocketGetContextPtr.asFunction< + void Function(CFSocketRef, ffi.Pointer)>(); + + int CFSocketGetNative( + CFSocketRef s, + ) { + return _CFSocketGetNative( + s, + ); + } + + late final _CFSocketGetNativePtr = + _lookup>( + 'CFSocketGetNative'); + late final _CFSocketGetNative = + _CFSocketGetNativePtr.asFunction(); + + CFRunLoopSourceRef CFSocketCreateRunLoopSource( + CFAllocatorRef allocator, + CFSocketRef s, + int order, + ) { + return _CFSocketCreateRunLoopSource( + allocator, + s, + order, + ); + } + + late final _CFSocketCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, + CFIndex)>>('CFSocketCreateRunLoopSource'); + late final _CFSocketCreateRunLoopSource = + _CFSocketCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, int)>(); + + int CFSocketGetSocketFlags( + CFSocketRef s, + ) { + return _CFSocketGetSocketFlags( + s, + ); + } + + late final _CFSocketGetSocketFlagsPtr = + _lookup>( + 'CFSocketGetSocketFlags'); + late final _CFSocketGetSocketFlags = + _CFSocketGetSocketFlagsPtr.asFunction(); + + void CFSocketSetSocketFlags( + CFSocketRef s, + int flags, + ) { + return _CFSocketSetSocketFlags( + s, + flags, + ); + } + + late final _CFSocketSetSocketFlagsPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketSetSocketFlags'); + late final _CFSocketSetSocketFlags = + _CFSocketSetSocketFlagsPtr.asFunction(); + + void CFSocketDisableCallBacks( + CFSocketRef s, + int callBackTypes, + ) { + return _CFSocketDisableCallBacks( + s, + callBackTypes, + ); + } + + late final _CFSocketDisableCallBacksPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketDisableCallBacks'); + late final _CFSocketDisableCallBacks = _CFSocketDisableCallBacksPtr + .asFunction(); + + void CFSocketEnableCallBacks( + CFSocketRef s, + int callBackTypes, + ) { + return _CFSocketEnableCallBacks( + s, + callBackTypes, + ); + } + + late final _CFSocketEnableCallBacksPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketEnableCallBacks'); + late final _CFSocketEnableCallBacks = + _CFSocketEnableCallBacksPtr.asFunction(); + + int CFSocketSendData( + CFSocketRef s, + CFDataRef address, + CFDataRef data, + double timeout, + ) { + return _CFSocketSendData( + s, + address, + data, + timeout, + ); + } + + late final _CFSocketSendDataPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFSocketRef, CFDataRef, CFDataRef, + CFTimeInterval)>>('CFSocketSendData'); + late final _CFSocketSendData = _CFSocketSendDataPtr.asFunction< + int Function(CFSocketRef, CFDataRef, CFDataRef, double)>(); + + int CFSocketRegisterValue( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + CFPropertyListRef value, + ) { + return _CFSocketRegisterValue( + nameServerSignature, + timeout, + name, + value, + ); + } + + late final _CFSocketRegisterValuePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, CFTimeInterval, + CFStringRef, CFPropertyListRef)>>('CFSocketRegisterValue'); + late final _CFSocketRegisterValue = _CFSocketRegisterValuePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + CFPropertyListRef)>(); + + int CFSocketCopyRegisteredValue( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ffi.Pointer value, + ffi.Pointer nameServerAddress, + ) { + return _CFSocketCopyRegisteredValue( + nameServerSignature, + timeout, + name, + value, + nameServerAddress, + ); + } + + late final _CFSocketCopyRegisteredValuePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + CFTimeInterval, + CFStringRef, + ffi.Pointer, + ffi.Pointer)>>('CFSocketCopyRegisteredValue'); + late final _CFSocketCopyRegisteredValue = + _CFSocketCopyRegisteredValuePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + ffi.Pointer, ffi.Pointer)>(); + + int CFSocketRegisterSocketSignature( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ffi.Pointer signature, + ) { + return _CFSocketRegisterSocketSignature( + nameServerSignature, + timeout, + name, + signature, + ); + } + + late final _CFSocketRegisterSocketSignaturePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, CFTimeInterval, + CFStringRef, ffi.Pointer)>>( + 'CFSocketRegisterSocketSignature'); + late final _CFSocketRegisterSocketSignature = + _CFSocketRegisterSocketSignaturePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + ffi.Pointer)>(); + + int CFSocketCopyRegisteredSocketSignature( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ffi.Pointer signature, + ffi.Pointer nameServerAddress, + ) { + return _CFSocketCopyRegisteredSocketSignature( + nameServerSignature, + timeout, + name, + signature, + nameServerAddress, + ); + } + + late final _CFSocketCopyRegisteredSocketSignaturePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + CFTimeInterval, + CFStringRef, + ffi.Pointer, + ffi.Pointer)>>( + 'CFSocketCopyRegisteredSocketSignature'); + late final _CFSocketCopyRegisteredSocketSignature = + _CFSocketCopyRegisteredSocketSignaturePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + ffi.Pointer, ffi.Pointer)>(); + + int CFSocketUnregister( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ) { + return _CFSocketUnregister( + nameServerSignature, + timeout, + name, + ); + } + + late final _CFSocketUnregisterPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, CFTimeInterval, + CFStringRef)>>('CFSocketUnregister'); + late final _CFSocketUnregister = _CFSocketUnregisterPtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef)>(); + + void CFSocketSetDefaultNameRegistryPortNumber( + int port, + ) { + return _CFSocketSetDefaultNameRegistryPortNumber( + port, + ); + } + + late final _CFSocketSetDefaultNameRegistryPortNumberPtr = + _lookup>( + 'CFSocketSetDefaultNameRegistryPortNumber'); + late final _CFSocketSetDefaultNameRegistryPortNumber = + _CFSocketSetDefaultNameRegistryPortNumberPtr.asFunction< + void Function(int)>(); + + int CFSocketGetDefaultNameRegistryPortNumber() { + return _CFSocketGetDefaultNameRegistryPortNumber(); + } + + late final _CFSocketGetDefaultNameRegistryPortNumberPtr = + _lookup>( + 'CFSocketGetDefaultNameRegistryPortNumber'); + late final _CFSocketGetDefaultNameRegistryPortNumber = + _CFSocketGetDefaultNameRegistryPortNumberPtr.asFunction(); + + late final ffi.Pointer _kCFSocketCommandKey = + _lookup('kCFSocketCommandKey'); + + CFStringRef get kCFSocketCommandKey => _kCFSocketCommandKey.value; + + set kCFSocketCommandKey(CFStringRef value) => + _kCFSocketCommandKey.value = value; + + late final ffi.Pointer _kCFSocketNameKey = + _lookup('kCFSocketNameKey'); + + CFStringRef get kCFSocketNameKey => _kCFSocketNameKey.value; + + set kCFSocketNameKey(CFStringRef value) => _kCFSocketNameKey.value = value; + + late final ffi.Pointer _kCFSocketValueKey = + _lookup('kCFSocketValueKey'); + + CFStringRef get kCFSocketValueKey => _kCFSocketValueKey.value; + + set kCFSocketValueKey(CFStringRef value) => _kCFSocketValueKey.value = value; + + late final ffi.Pointer _kCFSocketResultKey = + _lookup('kCFSocketResultKey'); + + CFStringRef get kCFSocketResultKey => _kCFSocketResultKey.value; + + set kCFSocketResultKey(CFStringRef value) => + _kCFSocketResultKey.value = value; + + late final ffi.Pointer _kCFSocketErrorKey = + _lookup('kCFSocketErrorKey'); + + CFStringRef get kCFSocketErrorKey => _kCFSocketErrorKey.value; + + set kCFSocketErrorKey(CFStringRef value) => _kCFSocketErrorKey.value = value; + + late final ffi.Pointer _kCFSocketRegisterCommand = + _lookup('kCFSocketRegisterCommand'); + + CFStringRef get kCFSocketRegisterCommand => _kCFSocketRegisterCommand.value; + + set kCFSocketRegisterCommand(CFStringRef value) => + _kCFSocketRegisterCommand.value = value; + + late final ffi.Pointer _kCFSocketRetrieveCommand = + _lookup('kCFSocketRetrieveCommand'); + + CFStringRef get kCFSocketRetrieveCommand => _kCFSocketRetrieveCommand.value; + + set kCFSocketRetrieveCommand(CFStringRef value) => + _kCFSocketRetrieveCommand.value = value; + + int getattrlistbulk( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + ) { + return _getattrlistbulk( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final _getattrlistbulkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer, ffi.Size, ffi.Uint64)>>('getattrlistbulk'); + late final _getattrlistbulk = _getattrlistbulkPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); + + int getattrlistat( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + int arg4, + int arg5, + ) { + return _getattrlistat( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + } + + late final _getattrlistatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedLong)>>('getattrlistat'); + late final _getattrlistat = _getattrlistatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); + + int setattrlistat( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + int arg4, + int arg5, + ) { + return _setattrlistat( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + } + + late final _setattrlistatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Uint32)>>('setattrlistat'); + late final _setattrlistat = _setattrlistatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); + + int faccessat( + int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, + ) { + return _faccessat( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _faccessatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int, ffi.Int)>>('faccessat'); + late final _faccessat = _faccessatPtr + .asFunction, int, int)>(); + + int fchownat( + int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, + int arg4, + ) { + return _fchownat( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final _fchownatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, uid_t, gid_t, + ffi.Int)>>('fchownat'); + late final _fchownat = _fchownatPtr + .asFunction, int, int, int)>(); + + int linkat( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + int arg4, + ) { + return _linkat( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final _linkatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.Int)>>('linkat'); + late final _linkat = _linkatPtr.asFunction< + int Function( + int, ffi.Pointer, int, ffi.Pointer, int)>(); + + int readlinkat( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ) { + return _readlinkat( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _readlinkatPtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Int, ffi.Pointer, + ffi.Pointer, ffi.Size)>>('readlinkat'); + late final _readlinkat = _readlinkatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, int)>(); + + int symlinkat( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ) { + return _symlinkat( + arg0, + arg1, + arg2, + ); + } + + late final _symlinkatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, + ffi.Pointer)>>('symlinkat'); + late final _symlinkat = _symlinkatPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); + + int unlinkat( + int arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _unlinkat( + arg0, + arg1, + arg2, + ); + } + + late final _unlinkatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int)>>('unlinkat'); + late final _unlinkat = + _unlinkatPtr.asFunction, int)>(); + + void _exit( + int arg0, + ) { + return __exit( + arg0, + ); + } + + late final __exitPtr = + _lookup>('_exit'); + late final __exit = __exitPtr.asFunction(); + + int access( + ffi.Pointer arg0, + int arg1, + ) { + return _access( + arg0, + arg1, + ); + } + + late final _accessPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'access'); + late final _access = + _accessPtr.asFunction, int)>(); + + int alarm( + int arg0, + ) { + return _alarm( + arg0, + ); + } + + late final _alarmPtr = + _lookup>( + 'alarm'); + late final _alarm = _alarmPtr.asFunction(); + + int chdir( + ffi.Pointer arg0, + ) { + return _chdir( + arg0, + ); + } + + late final _chdirPtr = + _lookup)>>( + 'chdir'); + late final _chdir = + _chdirPtr.asFunction)>(); + + int chown( + ffi.Pointer arg0, + int arg1, + int arg2, + ) { + return _chown( + arg0, + arg1, + arg2, + ); + } + + late final _chownPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('chown'); + late final _chown = + _chownPtr.asFunction, int, int)>(); + + int close( + int arg0, + ) { + return _close( + arg0, + ); + } + + late final _closePtr = + _lookup>('close'); + late final _close = _closePtr.asFunction(); + + int dup( + int arg0, + ) { + return _dup( + arg0, + ); + } + + late final _dupPtr = + _lookup>('dup'); + late final _dup = _dupPtr.asFunction(); + + int dup2( + int arg0, + int arg1, + ) { + return _dup2( + arg0, + arg1, + ); + } + + late final _dup2Ptr = + _lookup>('dup2'); + late final _dup2 = _dup2Ptr.asFunction(); + + int execl( + ffi.Pointer __path, + ffi.Pointer __arg0, + ) { + return _execl( + __path, + __arg0, + ); + } + + late final _execlPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('execl'); + late final _execl = _execlPtr + .asFunction, ffi.Pointer)>(); + + int execle( + ffi.Pointer __path, + ffi.Pointer __arg0, + ) { + return _execle( + __path, + __arg0, + ); + } + + late final _execlePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('execle'); + late final _execle = _execlePtr + .asFunction, ffi.Pointer)>(); + + int execlp( + ffi.Pointer __file, + ffi.Pointer __arg0, + ) { + return _execlp( + __file, + __arg0, + ); + } + + late final _execlpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('execlp'); + late final _execlp = _execlpPtr + .asFunction, ffi.Pointer)>(); + + int execv( + ffi.Pointer __path, + ffi.Pointer> __argv, + ) { + return _execv( + __path, + __argv, + ); + } + + late final _execvPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer>)>>('execv'); + late final _execv = _execvPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>)>(); + + int execve( + ffi.Pointer __file, + ffi.Pointer> __argv, + ffi.Pointer> __envp, + ) { + return _execve( + __file, + __argv, + __envp, + ); + } + + late final _execvePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('execve'); + late final _execve = _execvePtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer>, + ffi.Pointer>)>(); + + int execvp( + ffi.Pointer __file, + ffi.Pointer> __argv, + ) { + return _execvp( + __file, + __argv, + ); + } + + late final _execvpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer>)>>('execvp'); + late final _execvp = _execvpPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>)>(); + + int fork() { + return _fork(); + } + + late final _forkPtr = _lookup>('fork'); + late final _fork = _forkPtr.asFunction(); + + int fpathconf( + int arg0, + int arg1, + ) { + return _fpathconf( + arg0, + arg1, + ); + } + + late final _fpathconfPtr = + _lookup>( + 'fpathconf'); + late final _fpathconf = _fpathconfPtr.asFunction(); + + ffi.Pointer getcwd( + ffi.Pointer arg0, + int arg1, + ) { + return _getcwd( + arg0, + arg1, + ); + } + + late final _getcwdPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('getcwd'); + late final _getcwd = _getcwdPtr + .asFunction Function(ffi.Pointer, int)>(); + + int getegid() { + return _getegid(); + } + + late final _getegidPtr = + _lookup>('getegid'); + late final _getegid = _getegidPtr.asFunction(); + + int geteuid() { + return _geteuid(); + } + + late final _geteuidPtr = + _lookup>('geteuid'); + late final _geteuid = _geteuidPtr.asFunction(); + + int getgid() { + return _getgid(); + } + + late final _getgidPtr = + _lookup>('getgid'); + late final _getgid = _getgidPtr.asFunction(); + + int getgroups( + int arg0, + ffi.Pointer arg1, + ) { + return _getgroups( + arg0, + arg1, + ); + } + + late final _getgroupsPtr = _lookup< + ffi.NativeFunction)>>( + 'getgroups'); + late final _getgroups = + _getgroupsPtr.asFunction)>(); + + ffi.Pointer getlogin() { + return _getlogin(); + } + + late final _getloginPtr = + _lookup Function()>>('getlogin'); + late final _getlogin = + _getloginPtr.asFunction Function()>(); + + int getpgrp() { + return _getpgrp(); + } + + late final _getpgrpPtr = + _lookup>('getpgrp'); + late final _getpgrp = _getpgrpPtr.asFunction(); + + int getpid() { + return _getpid(); + } + + late final _getpidPtr = + _lookup>('getpid'); + late final _getpid = _getpidPtr.asFunction(); + + int getppid() { + return _getppid(); + } + + late final _getppidPtr = + _lookup>('getppid'); + late final _getppid = _getppidPtr.asFunction(); + + int getuid() { + return _getuid(); + } + + late final _getuidPtr = + _lookup>('getuid'); + late final _getuid = _getuidPtr.asFunction(); + + int isatty( + int arg0, + ) { + return _isatty( + arg0, + ); + } + + late final _isattyPtr = + _lookup>('isatty'); + late final _isatty = _isattyPtr.asFunction(); + + int link( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _link( + arg0, + arg1, + ); + } + + late final _linkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('link'); + late final _link = _linkPtr + .asFunction, ffi.Pointer)>(); + + int lseek( + int arg0, + int arg1, + int arg2, + ) { + return _lseek( + arg0, + arg1, + arg2, + ); + } + + late final _lseekPtr = + _lookup>( + 'lseek'); + late final _lseek = _lseekPtr.asFunction(); + + int pathconf( + ffi.Pointer arg0, + int arg1, + ) { + return _pathconf( + arg0, + arg1, + ); + } + + late final _pathconfPtr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, ffi.Int)>>('pathconf'); + late final _pathconf = + _pathconfPtr.asFunction, int)>(); + + int pause() { + return _pause(); + } + + late final _pausePtr = + _lookup>('pause'); + late final _pause = _pausePtr.asFunction(); + + int pipe( + ffi.Pointer arg0, + ) { + return _pipe( + arg0, + ); + } + + late final _pipePtr = + _lookup)>>( + 'pipe'); + late final _pipe = _pipePtr.asFunction)>(); + + int read( + int arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _read( + arg0, + arg1, + arg2, + ); + } + + late final _readPtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('read'); + late final _read = + _readPtr.asFunction, int)>(); + + int rmdir( + ffi.Pointer arg0, + ) { + return _rmdir( + arg0, + ); + } + + late final _rmdirPtr = + _lookup)>>( + 'rmdir'); + late final _rmdir = + _rmdirPtr.asFunction)>(); + + int setgid( + int arg0, + ) { + return _setgid( + arg0, + ); + } + + late final _setgidPtr = + _lookup>('setgid'); + late final _setgid = _setgidPtr.asFunction(); + + int setpgid( + int arg0, + int arg1, + ) { + return _setpgid( + arg0, + arg1, + ); + } + + late final _setpgidPtr = + _lookup>('setpgid'); + late final _setpgid = _setpgidPtr.asFunction(); + + int setsid() { + return _setsid(); + } + + late final _setsidPtr = + _lookup>('setsid'); + late final _setsid = _setsidPtr.asFunction(); + + int setuid( + int arg0, + ) { + return _setuid( + arg0, + ); + } + + late final _setuidPtr = + _lookup>('setuid'); + late final _setuid = _setuidPtr.asFunction(); + + int sleep( + int arg0, + ) { + return _sleep( + arg0, + ); + } + + late final _sleepPtr = + _lookup>( + 'sleep'); + late final _sleep = _sleepPtr.asFunction(); + + int sysconf( + int arg0, + ) { + return _sysconf( + arg0, + ); + } + + late final _sysconfPtr = + _lookup>('sysconf'); + late final _sysconf = _sysconfPtr.asFunction(); + + int tcgetpgrp( + int arg0, + ) { + return _tcgetpgrp( + arg0, + ); + } + + late final _tcgetpgrpPtr = + _lookup>('tcgetpgrp'); + late final _tcgetpgrp = _tcgetpgrpPtr.asFunction(); + + int tcsetpgrp( + int arg0, + int arg1, + ) { + return _tcsetpgrp( + arg0, + arg1, + ); + } + + late final _tcsetpgrpPtr = + _lookup>( + 'tcsetpgrp'); + late final _tcsetpgrp = _tcsetpgrpPtr.asFunction(); + + ffi.Pointer ttyname( + int arg0, + ) { + return _ttyname( + arg0, + ); + } + + late final _ttynamePtr = + _lookup Function(ffi.Int)>>( + 'ttyname'); + late final _ttyname = + _ttynamePtr.asFunction Function(int)>(); + + int ttyname_r( + int arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _ttyname_r( + arg0, + arg1, + arg2, + ); + } + + late final _ttyname_rPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('ttyname_r'); + late final _ttyname_r = + _ttyname_rPtr.asFunction, int)>(); + + int unlink( + ffi.Pointer arg0, + ) { + return _unlink( + arg0, + ); + } + + late final _unlinkPtr = + _lookup)>>( + 'unlink'); + late final _unlink = + _unlinkPtr.asFunction)>(); + + int write( + int __fd, + ffi.Pointer __buf, + int __nbyte, + ) { + return _write( + __fd, + __buf, + __nbyte, + ); + } + + late final _writePtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('write'); + late final _write = + _writePtr.asFunction, int)>(); + + int confstr( + int arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _confstr( + arg0, + arg1, + arg2, + ); + } + + late final _confstrPtr = _lookup< + ffi.NativeFunction< + ffi.Size Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('confstr'); + late final _confstr = + _confstrPtr.asFunction, int)>(); + + int getopt( + int arg0, + ffi.Pointer> arg1, + ffi.Pointer arg2, + ) { + return _getopt( + arg0, + arg1, + arg2, + ); + } + + late final _getoptPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer>, + ffi.Pointer)>>('getopt'); + late final _getopt = _getoptPtr.asFunction< + int Function( + int, ffi.Pointer>, ffi.Pointer)>(); + + late final ffi.Pointer> _optarg = + _lookup>('optarg'); + + ffi.Pointer get optarg => _optarg.value; + + set optarg(ffi.Pointer value) => _optarg.value = value; + + late final ffi.Pointer _optind = _lookup('optind'); + + int get optind => _optind.value; + + set optind(int value) => _optind.value = value; + + late final ffi.Pointer _opterr = _lookup('opterr'); + + int get opterr => _opterr.value; + + set opterr(int value) => _opterr.value = value; + + late final ffi.Pointer _optopt = _lookup('optopt'); + + int get optopt => _optopt.value; + + set optopt(int value) => _optopt.value = value; + + ffi.Pointer brk( + ffi.Pointer arg0, + ) { + return _brk( + arg0, + ); + } + + late final _brkPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('brk'); + late final _brk = _brkPtr + .asFunction Function(ffi.Pointer)>(); + + int chroot( + ffi.Pointer arg0, + ) { + return _chroot( + arg0, + ); + } + + late final _chrootPtr = + _lookup)>>( + 'chroot'); + late final _chroot = + _chrootPtr.asFunction)>(); + + ffi.Pointer crypt( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _crypt( + arg0, + arg1, + ); + } + + late final _cryptPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('crypt'); + late final _crypt = _cryptPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + void encrypt( + ffi.Pointer arg0, + int arg1, + ) { + return _encrypt( + arg0, + arg1, + ); + } + + late final _encryptPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int)>>('encrypt'); + late final _encrypt = + _encryptPtr.asFunction, int)>(); + + int fchdir( + int arg0, + ) { + return _fchdir( + arg0, + ); + } + + late final _fchdirPtr = + _lookup>('fchdir'); + late final _fchdir = _fchdirPtr.asFunction(); + + int gethostid() { + return _gethostid(); + } + + late final _gethostidPtr = + _lookup>('gethostid'); + late final _gethostid = _gethostidPtr.asFunction(); + + int getpgid( + int arg0, + ) { + return _getpgid( + arg0, + ); + } + + late final _getpgidPtr = + _lookup>('getpgid'); + late final _getpgid = _getpgidPtr.asFunction(); + + int getsid( + int arg0, + ) { + return _getsid( + arg0, + ); + } + + late final _getsidPtr = + _lookup>('getsid'); + late final _getsid = _getsidPtr.asFunction(); + + int getdtablesize() { + return _getdtablesize(); + } + + late final _getdtablesizePtr = + _lookup>('getdtablesize'); + late final _getdtablesize = _getdtablesizePtr.asFunction(); + + int getpagesize() { + return _getpagesize(); + } + + late final _getpagesizePtr = + _lookup>('getpagesize'); + late final _getpagesize = _getpagesizePtr.asFunction(); + + ffi.Pointer getpass( + ffi.Pointer arg0, + ) { + return _getpass( + arg0, + ); + } + + late final _getpassPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('getpass'); + late final _getpass = _getpassPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer getwd( + ffi.Pointer arg0, + ) { + return _getwd( + arg0, + ); + } + + late final _getwdPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('getwd'); + late final _getwd = _getwdPtr + .asFunction Function(ffi.Pointer)>(); + + int lchown( + ffi.Pointer arg0, + int arg1, + int arg2, + ) { + return _lchown( + arg0, + arg1, + arg2, + ); + } + + late final _lchownPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('lchown'); + late final _lchown = + _lchownPtr.asFunction, int, int)>(); + + int lockf( + int arg0, + int arg1, + int arg2, + ) { + return _lockf( + arg0, + arg1, + arg2, + ); + } + + late final _lockfPtr = + _lookup>( + 'lockf'); + late final _lockf = _lockfPtr.asFunction(); + + int nice( + int arg0, + ) { + return _nice( + arg0, + ); + } + + late final _nicePtr = + _lookup>('nice'); + late final _nice = _nicePtr.asFunction(); + + int pread( + int __fd, + ffi.Pointer __buf, + int __nbyte, + int __offset, + ) { + return _pread( + __fd, + __buf, + __nbyte, + __offset, + ); + } + + late final _preadPtr = _lookup< + ffi.NativeFunction< + ssize_t Function( + ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pread'); + late final _pread = _preadPtr + .asFunction, int, int)>(); + + int pwrite( + int __fd, + ffi.Pointer __buf, + int __nbyte, + int __offset, + ) { + return _pwrite( + __fd, + __buf, + __nbyte, + __offset, + ); + } + + late final _pwritePtr = _lookup< + ffi.NativeFunction< + ssize_t Function( + ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pwrite'); + late final _pwrite = _pwritePtr + .asFunction, int, int)>(); + + ffi.Pointer sbrk( + int arg0, + ) { + return _sbrk( + arg0, + ); + } + + late final _sbrkPtr = + _lookup Function(ffi.Int)>>( + 'sbrk'); + late final _sbrk = _sbrkPtr.asFunction Function(int)>(); + + int setpgrp() { + return _setpgrp(); + } + + late final _setpgrpPtr = + _lookup>('setpgrp'); + late final _setpgrp = _setpgrpPtr.asFunction(); + + int setregid( + int arg0, + int arg1, + ) { + return _setregid( + arg0, + arg1, + ); + } + + late final _setregidPtr = + _lookup>('setregid'); + late final _setregid = _setregidPtr.asFunction(); + + int setreuid( + int arg0, + int arg1, + ) { + return _setreuid( + arg0, + arg1, + ); + } + + late final _setreuidPtr = + _lookup>('setreuid'); + late final _setreuid = _setreuidPtr.asFunction(); + + void sync1() { + return _sync1(); + } + + late final _sync1Ptr = + _lookup>('sync'); + late final _sync1 = _sync1Ptr.asFunction(); + + int truncate( + ffi.Pointer arg0, + int arg1, + ) { + return _truncate( + arg0, + arg1, + ); + } + + late final _truncatePtr = _lookup< + ffi.NativeFunction, off_t)>>( + 'truncate'); + late final _truncate = + _truncatePtr.asFunction, int)>(); + + int ualarm( + int arg0, + int arg1, + ) { + return _ualarm( + arg0, + arg1, + ); + } + + late final _ualarmPtr = + _lookup>( + 'ualarm'); + late final _ualarm = _ualarmPtr.asFunction(); + + int usleep( + int arg0, + ) { + return _usleep( + arg0, + ); + } + + late final _usleepPtr = + _lookup>('usleep'); + late final _usleep = _usleepPtr.asFunction(); + + int vfork() { + return _vfork(); + } + + late final _vforkPtr = + _lookup>('vfork'); + late final _vfork = _vforkPtr.asFunction(); + + int fsync( + int arg0, + ) { + return _fsync( + arg0, + ); + } + + late final _fsyncPtr = + _lookup>('fsync'); + late final _fsync = _fsyncPtr.asFunction(); + + int ftruncate( + int arg0, + int arg1, + ) { + return _ftruncate( + arg0, + arg1, + ); + } + + late final _ftruncatePtr = + _lookup>( + 'ftruncate'); + late final _ftruncate = _ftruncatePtr.asFunction(); + + int getlogin_r( + ffi.Pointer arg0, + int arg1, + ) { + return _getlogin_r( + arg0, + arg1, + ); + } + + late final _getlogin_rPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size)>>('getlogin_r'); + late final _getlogin_r = + _getlogin_rPtr.asFunction, int)>(); + + int fchown( + int arg0, + int arg1, + int arg2, + ) { + return _fchown( + arg0, + arg1, + arg2, + ); + } + + late final _fchownPtr = + _lookup>( + 'fchown'); + late final _fchown = _fchownPtr.asFunction(); + + int gethostname( + ffi.Pointer arg0, + int arg1, + ) { + return _gethostname( + arg0, + arg1, + ); + } + + late final _gethostnamePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size)>>('gethostname'); + late final _gethostname = + _gethostnamePtr.asFunction, int)>(); + + int readlink( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _readlink( + arg0, + arg1, + arg2, + ); + } + + late final _readlinkPtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('readlink'); + late final _readlink = _readlinkPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + int setegid( + int arg0, + ) { + return _setegid( + arg0, + ); + } + + late final _setegidPtr = + _lookup>('setegid'); + late final _setegid = _setegidPtr.asFunction(); + + int seteuid( + int arg0, + ) { + return _seteuid( + arg0, + ); + } + + late final _seteuidPtr = + _lookup>('seteuid'); + late final _seteuid = _seteuidPtr.asFunction(); + + int symlink( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _symlink( + arg0, + arg1, + ); + } + + late final _symlinkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('symlink'); + late final _symlink = _symlinkPtr + .asFunction, ffi.Pointer)>(); + + int pselect( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + ) { + return _pselect( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + } + + late final _pselectPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('pselect'); + late final _pselect = _pselectPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + + int select( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) { + return _select( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final _selectPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('select'); + late final _select = _selectPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + int accessx_np( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + int arg3, + ) { + return _accessx_np( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _accessx_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer, uid_t)>>('accessx_np'); + late final _accessx_np = _accessx_npPtr.asFunction< + int Function( + ffi.Pointer, int, ffi.Pointer, int)>(); + + int acct( + ffi.Pointer arg0, + ) { + return _acct( + arg0, + ); + } + + late final _acctPtr = + _lookup)>>( + 'acct'); + late final _acct = _acctPtr.asFunction)>(); + + int add_profil( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, + ) { + return _add_profil( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _add_profilPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, + ffi.UnsignedInt)>>('add_profil'); + late final _add_profil = _add_profilPtr + .asFunction, int, int, int)>(); + + void endusershell() { + return _endusershell(); + } + + late final _endusershellPtr = + _lookup>('endusershell'); + late final _endusershell = _endusershellPtr.asFunction(); + + int execvP( + ffi.Pointer __file, + ffi.Pointer __searchpath, + ffi.Pointer> __argv, + ) { + return _execvP( + __file, + __searchpath, + __argv, + ); + } + + late final _execvPPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('execvP'); + late final _execvP = _execvPPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); + + ffi.Pointer fflagstostr( + int arg0, + ) { + return _fflagstostr( + arg0, + ); + } + + late final _fflagstostrPtr = _lookup< + ffi.NativeFunction Function(ffi.UnsignedLong)>>( + 'fflagstostr'); + late final _fflagstostr = + _fflagstostrPtr.asFunction Function(int)>(); + + int getdomainname( + ffi.Pointer arg0, + int arg1, + ) { + return _getdomainname( + arg0, + arg1, + ); + } + + late final _getdomainnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'getdomainname'); + late final _getdomainname = + _getdomainnamePtr.asFunction, int)>(); + + int getgrouplist( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + return _getgrouplist( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _getgrouplistPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer, + ffi.Pointer)>>('getgrouplist'); + late final _getgrouplist = _getgrouplistPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); + + int gethostuuid( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _gethostuuid( + arg0, + arg1, + ); + } + + late final _gethostuuidPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('gethostuuid'); + late final _gethostuuid = _gethostuuidPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + int getmode( + ffi.Pointer arg0, + int arg1, + ) { + return _getmode( + arg0, + arg1, + ); + } + + late final _getmodePtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'getmode'); + late final _getmode = + _getmodePtr.asFunction, int)>(); + + int getpeereid( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _getpeereid( + arg0, + arg1, + arg2, + ); + } + + late final _getpeereidPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Pointer)>>('getpeereid'); + late final _getpeereid = _getpeereidPtr + .asFunction, ffi.Pointer)>(); + + int getsgroups_np( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _getsgroups_np( + arg0, + arg1, + ); + } + + late final _getsgroups_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('getsgroups_np'); + late final _getsgroups_np = _getsgroups_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer getusershell() { + return _getusershell(); + } + + late final _getusershellPtr = + _lookup Function()>>( + 'getusershell'); + late final _getusershell = + _getusershellPtr.asFunction Function()>(); + + int getwgroups_np( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _getwgroups_np( + arg0, + arg1, + ); + } + + late final _getwgroups_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('getwgroups_np'); + late final _getwgroups_np = _getwgroups_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + int initgroups( + ffi.Pointer arg0, + int arg1, + ) { + return _initgroups( + arg0, + arg1, + ); + } + + late final _initgroupsPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'initgroups'); + late final _initgroups = + _initgroupsPtr.asFunction, int)>(); + + int issetugid() { + return _issetugid(); + } + + late final _issetugidPtr = + _lookup>('issetugid'); + late final _issetugid = _issetugidPtr.asFunction(); + + ffi.Pointer mkdtemp( + ffi.Pointer arg0, + ) { + return _mkdtemp( + arg0, + ); + } + + late final _mkdtempPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('mkdtemp'); + late final _mkdtemp = _mkdtempPtr + .asFunction Function(ffi.Pointer)>(); + + int mknod( + ffi.Pointer arg0, + int arg1, + int arg2, + ) { + return _mknod( + arg0, + arg1, + arg2, + ); + } + + late final _mknodPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, mode_t, dev_t)>>('mknod'); + late final _mknod = + _mknodPtr.asFunction, int, int)>(); + + int mkpath_np( + ffi.Pointer path, + int omode, + ) { + return _mkpath_np( + path, + omode, + ); + } + + late final _mkpath_npPtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'mkpath_np'); + late final _mkpath_np = + _mkpath_npPtr.asFunction, int)>(); + + int mkpathat_np( + int dfd, + ffi.Pointer path, + int omode, + ) { + return _mkpathat_np( + dfd, + path, + omode, + ); + } + + late final _mkpathat_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, mode_t)>>('mkpathat_np'); + late final _mkpathat_np = _mkpathat_npPtr + .asFunction, int)>(); + + int mkstemps( + ffi.Pointer arg0, + int arg1, + ) { + return _mkstemps( + arg0, + arg1, + ); + } + + late final _mkstempsPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'mkstemps'); + late final _mkstemps = + _mkstempsPtr.asFunction, int)>(); + + int mkostemp( + ffi.Pointer path, + int oflags, + ) { + return _mkostemp( + path, + oflags, + ); + } + + late final _mkostempPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'mkostemp'); + late final _mkostemp = + _mkostempPtr.asFunction, int)>(); + + int mkostemps( + ffi.Pointer path, + int slen, + int oflags, + ) { + return _mkostemps( + path, + slen, + oflags, + ); + } + + late final _mkostempsPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int, ffi.Int)>>('mkostemps'); + late final _mkostemps = + _mkostempsPtr.asFunction, int, int)>(); + + int mkstemp_dprotected_np( + ffi.Pointer path, + int dpclass, + int dpflags, + ) { + return _mkstemp_dprotected_np( + path, + dpclass, + dpflags, + ); + } + + late final _mkstemp_dprotected_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, + ffi.Int)>>('mkstemp_dprotected_np'); + late final _mkstemp_dprotected_np = _mkstemp_dprotected_npPtr + .asFunction, int, int)>(); + + ffi.Pointer mkdtempat_np( + int dfd, + ffi.Pointer path, + ) { + return _mkdtempat_np( + dfd, + path, + ); + } + + late final _mkdtempat_npPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('mkdtempat_np'); + late final _mkdtempat_np = _mkdtempat_npPtr + .asFunction Function(int, ffi.Pointer)>(); + + int mkstempsat_np( + int dfd, + ffi.Pointer path, + int slen, + ) { + return _mkstempsat_np( + dfd, + path, + slen, + ); + } + + late final _mkstempsat_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int)>>('mkstempsat_np'); + late final _mkstempsat_np = _mkstempsat_npPtr + .asFunction, int)>(); + + int mkostempsat_np( + int dfd, + ffi.Pointer path, + int slen, + int oflags, + ) { + return _mkostempsat_np( + dfd, + path, + slen, + oflags, + ); + } + + late final _mkostempsat_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Int)>>('mkostempsat_np'); + late final _mkostempsat_np = _mkostempsat_npPtr + .asFunction, int, int)>(); + + int nfssvc( + int arg0, + ffi.Pointer arg1, + ) { + return _nfssvc( + arg0, + arg1, + ); + } + + late final _nfssvcPtr = _lookup< + ffi.NativeFunction)>>( + 'nfssvc'); + late final _nfssvc = + _nfssvcPtr.asFunction)>(); + + int profil( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, + ) { + return _profil( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _profilPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, + ffi.UnsignedInt)>>('profil'); + late final _profil = _profilPtr + .asFunction, int, int, int)>(); + + int pthread_setugid_np( + int arg0, + int arg1, + ) { + return _pthread_setugid_np( + arg0, + arg1, + ); + } + + late final _pthread_setugid_npPtr = + _lookup>( + 'pthread_setugid_np'); + late final _pthread_setugid_np = + _pthread_setugid_npPtr.asFunction(); + + int pthread_getugid_np( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _pthread_getugid_np( + arg0, + arg1, + ); + } + + late final _pthread_getugid_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('pthread_getugid_np'); + late final _pthread_getugid_np = _pthread_getugid_npPtr + .asFunction, ffi.Pointer)>(); + + int reboot( + int arg0, + ) { + return _reboot( + arg0, + ); + } + + late final _rebootPtr = + _lookup>('reboot'); + late final _reboot = _rebootPtr.asFunction(); + + int revoke( + ffi.Pointer arg0, + ) { + return _revoke( + arg0, + ); + } + + late final _revokePtr = + _lookup)>>( + 'revoke'); + late final _revoke = + _revokePtr.asFunction)>(); + + int rcmd( + ffi.Pointer> arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + ) { + return _rcmd( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + } + + late final _rcmdPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('rcmd'); + late final _rcmd = _rcmdPtr.asFunction< + int Function( + ffi.Pointer>, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + int rcmd_af( + ffi.Pointer> arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + int arg6, + ) { + return _rcmd_af( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + ); + } + + late final _rcmd_afPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>>('rcmd_af'); + late final _rcmd_af = _rcmd_afPtr.asFunction< + int Function( + ffi.Pointer>, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + + int rresvport( + ffi.Pointer arg0, + ) { + return _rresvport( + arg0, + ); + } + + late final _rresvportPtr = + _lookup)>>( + 'rresvport'); + late final _rresvport = + _rresvportPtr.asFunction)>(); + + int rresvport_af( + ffi.Pointer arg0, + int arg1, + ) { + return _rresvport_af( + arg0, + arg1, + ); + } + + late final _rresvport_afPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'rresvport_af'); + late final _rresvport_af = + _rresvport_afPtr.asFunction, int)>(); + + int iruserok( + int arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + return _iruserok( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _iruserokPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.UnsignedLong, ffi.Int, ffi.Pointer, + ffi.Pointer)>>('iruserok'); + late final _iruserok = _iruserokPtr.asFunction< + int Function(int, int, ffi.Pointer, ffi.Pointer)>(); + + int iruserok_sa( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) { + return _iruserok_sa( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final _iruserok_saPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('iruserok_sa'); + late final _iruserok_sa = _iruserok_saPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer, + ffi.Pointer)>(); + + int ruserok( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + return _ruserok( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _ruserokPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('ruserok'); + late final _ruserok = _ruserokPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); + + int setdomainname( + ffi.Pointer arg0, + int arg1, + ) { + return _setdomainname( + arg0, + arg1, + ); + } + + late final _setdomainnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'setdomainname'); + late final _setdomainname = + _setdomainnamePtr.asFunction, int)>(); + + int setgroups( + int arg0, + ffi.Pointer arg1, + ) { + return _setgroups( + arg0, + arg1, + ); + } + + late final _setgroupsPtr = _lookup< + ffi.NativeFunction)>>( + 'setgroups'); + late final _setgroups = + _setgroupsPtr.asFunction)>(); + + void sethostid( + int arg0, + ) { + return _sethostid( + arg0, + ); + } + + late final _sethostidPtr = + _lookup>('sethostid'); + late final _sethostid = _sethostidPtr.asFunction(); + + int sethostname( + ffi.Pointer arg0, + int arg1, + ) { + return _sethostname( + arg0, + arg1, + ); + } + + late final _sethostnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sethostname'); + late final _sethostname = + _sethostnamePtr.asFunction, int)>(); + + int setlogin( + ffi.Pointer arg0, + ) { + return _setlogin( + arg0, + ); + } + + late final _setloginPtr = + _lookup)>>( + 'setlogin'); + late final _setlogin = + _setloginPtr.asFunction)>(); + + ffi.Pointer setmode( + ffi.Pointer arg0, + ) { + return _setmode( + arg0, + ); + } + + late final _setmodePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('setmode'); + late final _setmode = _setmodePtr + .asFunction Function(ffi.Pointer)>(); + + int setrgid( + int arg0, + ) { + return _setrgid( + arg0, + ); + } + + late final _setrgidPtr = + _lookup>('setrgid'); + late final _setrgid = _setrgidPtr.asFunction(); + + int setruid( + int arg0, + ) { + return _setruid( + arg0, + ); + } + + late final _setruidPtr = + _lookup>('setruid'); + late final _setruid = _setruidPtr.asFunction(); + + int setsgroups_np( + int arg0, + ffi.Pointer arg1, + ) { + return _setsgroups_np( + arg0, + arg1, + ); + } + + late final _setsgroups_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer)>>('setsgroups_np'); + late final _setsgroups_np = _setsgroups_npPtr + .asFunction)>(); + + void setusershell() { + return _setusershell(); + } + + late final _setusershellPtr = + _lookup>('setusershell'); + late final _setusershell = _setusershellPtr.asFunction(); + + int setwgroups_np( + int arg0, + ffi.Pointer arg1, + ) { + return _setwgroups_np( + arg0, + arg1, + ); + } + + late final _setwgroups_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer)>>('setwgroups_np'); + late final _setwgroups_np = _setwgroups_npPtr + .asFunction)>(); + + int strtofflags( + ffi.Pointer> arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _strtofflags( + arg0, + arg1, + arg2, + ); + } + + late final _strtofflagsPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>('strtofflags'); + late final _strtofflags = _strtofflagsPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>(); + + int swapon( + ffi.Pointer arg0, + ) { + return _swapon( + arg0, + ); + } + + late final _swaponPtr = + _lookup)>>( + 'swapon'); + late final _swapon = + _swaponPtr.asFunction)>(); + + int ttyslot() { + return _ttyslot(); + } + + late final _ttyslotPtr = + _lookup>('ttyslot'); + late final _ttyslot = _ttyslotPtr.asFunction(); + + int undelete( + ffi.Pointer arg0, + ) { + return _undelete( + arg0, + ); + } + + late final _undeletePtr = + _lookup)>>( + 'undelete'); + late final _undelete = + _undeletePtr.asFunction)>(); + + int unwhiteout( + ffi.Pointer arg0, + ) { + return _unwhiteout( + arg0, + ); + } + + late final _unwhiteoutPtr = + _lookup)>>( + 'unwhiteout'); + late final _unwhiteout = + _unwhiteoutPtr.asFunction)>(); + + int syscall( + int arg0, + ) { + return _syscall( + arg0, + ); + } + + late final _syscallPtr = + _lookup>('syscall'); + late final _syscall = _syscallPtr.asFunction(); + + int fgetattrlist( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + ) { + return _fgetattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final _fgetattrlistPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('fgetattrlist'); + late final _fgetattrlist = _fgetattrlistPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); + + int fsetattrlist( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + ) { + return _fsetattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final _fsetattrlistPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('fsetattrlist'); + late final _fsetattrlist = _fsetattrlistPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); + + int getattrlist( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + ) { + return _getattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final _getattrlistPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('getattrlist'); + late final _getattrlist = _getattrlistPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); + + int setattrlist( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + ) { + return _setattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } + + late final _setattrlistPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('setattrlist'); + late final _setattrlist = _setattrlistPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); + + int exchangedata( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _exchangedata( + arg0, + arg1, + arg2, + ); + } + + late final _exchangedataPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedInt)>>('exchangedata'); + late final _exchangedata = _exchangedataPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + int getdirentriesattr( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + ffi.Pointer arg6, + int arg7, + ) { + return _getdirentriesattr( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, + ); + } + + late final _getdirentriesattrPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt)>>('getdirentriesattr'); + late final _getdirentriesattr = _getdirentriesattrPtr.asFunction< + int Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + + int searchfs( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + ffi.Pointer arg5, + ) { + return _searchfs( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + } + + late final _searchfsPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer)>>('searchfs'); + late final _searchfs = _searchfsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer)>(); + + int fsctl( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + int arg3, + ) { + return _fsctl( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _fsctlPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer, ffi.UnsignedInt)>>('fsctl'); + late final _fsctl = _fsctlPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, int)>(); + + int ffsctl( + int arg0, + int arg1, + ffi.Pointer arg2, + int arg3, + ) { + return _ffsctl( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _ffsctlPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.UnsignedLong, ffi.Pointer, + ffi.UnsignedInt)>>('ffsctl'); + late final _ffsctl = _ffsctlPtr + .asFunction, int)>(); + + int fsync_volume_np( + int arg0, + int arg1, + ) { + return _fsync_volume_np( + arg0, + arg1, + ); + } + + late final _fsync_volume_npPtr = + _lookup>( + 'fsync_volume_np'); + late final _fsync_volume_np = + _fsync_volume_npPtr.asFunction(); + + int sync_volume_np( + ffi.Pointer arg0, + int arg1, + ) { + return _sync_volume_np( + arg0, + arg1, + ); + } + + late final _sync_volume_npPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sync_volume_np'); + late final _sync_volume_np = + _sync_volume_npPtr.asFunction, int)>(); + + late final ffi.Pointer _optreset = _lookup('optreset'); + + int get optreset => _optreset.value; + + set optreset(int value) => _optreset.value = value; + + int open( + ffi.Pointer arg0, + int arg1, + ) { + return _open( + arg0, + arg1, + ); + } + + late final _openPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'open'); + late final _open = + _openPtr.asFunction, int)>(); + + int openat( + int arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _openat( + arg0, + arg1, + arg2, + ); + } + + late final _openatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int)>>('openat'); + late final _openat = + _openatPtr.asFunction, int)>(); + + int creat( + ffi.Pointer arg0, + int arg1, + ) { + return _creat( + arg0, + arg1, + ); + } + + late final _creatPtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'creat'); + late final _creat = + _creatPtr.asFunction, int)>(); + + int fcntl( + int arg0, + int arg1, + ) { + return _fcntl( + arg0, + arg1, + ); + } + + late final _fcntlPtr = + _lookup>('fcntl'); + late final _fcntl = _fcntlPtr.asFunction(); + + int openx_np( + ffi.Pointer arg0, + int arg1, + filesec_t arg2, + ) { + return _openx_np( + arg0, + arg1, + arg2, + ); + } + + late final _openx_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int, filesec_t)>>('openx_np'); + late final _openx_np = _openx_npPtr + .asFunction, int, filesec_t)>(); + + int open_dprotected_np( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, + ) { + return _open_dprotected_np( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _open_dprotected_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Int)>>('open_dprotected_np'); + late final _open_dprotected_np = _open_dprotected_npPtr + .asFunction, int, int, int)>(); + + int flock1( + int arg0, + int arg1, + ) { + return _flock1( + arg0, + arg1, + ); + } + + late final _flock1Ptr = + _lookup>('flock'); + late final _flock1 = _flock1Ptr.asFunction(); + + filesec_t filesec_init() { + return _filesec_init(); + } + + late final _filesec_initPtr = + _lookup>('filesec_init'); + late final _filesec_init = + _filesec_initPtr.asFunction(); + + filesec_t filesec_dup( + filesec_t arg0, + ) { + return _filesec_dup( + arg0, + ); + } + + late final _filesec_dupPtr = + _lookup>('filesec_dup'); + late final _filesec_dup = + _filesec_dupPtr.asFunction(); + + void filesec_free( + filesec_t arg0, + ) { + return _filesec_free( + arg0, + ); + } + + late final _filesec_freePtr = + _lookup>('filesec_free'); + late final _filesec_free = + _filesec_freePtr.asFunction(); + + int filesec_get_property( + filesec_t arg0, + int arg1, + ffi.Pointer arg2, + ) { + return _filesec_get_property( + arg0, + arg1, + arg2, + ); + } + + late final _filesec_get_propertyPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(filesec_t, ffi.Int32, + ffi.Pointer)>>('filesec_get_property'); + late final _filesec_get_property = _filesec_get_propertyPtr + .asFunction)>(); + + int filesec_query_property( + filesec_t arg0, + int arg1, + ffi.Pointer arg2, + ) { + return _filesec_query_property( + arg0, + arg1, + arg2, + ); + } + + late final _filesec_query_propertyPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(filesec_t, ffi.Int32, + ffi.Pointer)>>('filesec_query_property'); + late final _filesec_query_property = _filesec_query_propertyPtr + .asFunction)>(); + + int filesec_set_property( + filesec_t arg0, + int arg1, + ffi.Pointer arg2, + ) { + return _filesec_set_property( + arg0, + arg1, + arg2, + ); + } + + late final _filesec_set_propertyPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(filesec_t, ffi.Int32, + ffi.Pointer)>>('filesec_set_property'); + late final _filesec_set_property = _filesec_set_propertyPtr + .asFunction)>(); + + int filesec_unset_property( + filesec_t arg0, + int arg1, + ) { + return _filesec_unset_property( + arg0, + arg1, + ); + } + + late final _filesec_unset_propertyPtr = + _lookup>( + 'filesec_unset_property'); + late final _filesec_unset_property = + _filesec_unset_propertyPtr.asFunction(); + + late final _class_OS_os_workgroup1 = _getClass1("OS_os_workgroup"); + int os_workgroup_copy_port( + os_workgroup_t wg, + ffi.Pointer mach_port_out, + ) { + return _os_workgroup_copy_port( + wg, + mach_port_out, + ); + } + + late final _os_workgroup_copy_portPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_t, + ffi.Pointer)>>('os_workgroup_copy_port'); + late final _os_workgroup_copy_port = _os_workgroup_copy_portPtr + .asFunction)>(); + + os_workgroup_t os_workgroup_create_with_port( + ffi.Pointer name, + int mach_port, + ) { + return _os_workgroup_create_with_port( + name, + mach_port, + ); + } + + late final _os_workgroup_create_with_portPtr = _lookup< + ffi.NativeFunction< + os_workgroup_t Function(ffi.Pointer, + mach_port_t)>>('os_workgroup_create_with_port'); + late final _os_workgroup_create_with_port = _os_workgroup_create_with_portPtr + .asFunction, int)>(); + + os_workgroup_t os_workgroup_create_with_workgroup( + ffi.Pointer name, + os_workgroup_t wg, + ) { + return _os_workgroup_create_with_workgroup( + name, + wg, + ); + } + + late final _os_workgroup_create_with_workgroupPtr = _lookup< + ffi.NativeFunction< + os_workgroup_t Function(ffi.Pointer, + os_workgroup_t)>>('os_workgroup_create_with_workgroup'); + late final _os_workgroup_create_with_workgroup = + _os_workgroup_create_with_workgroupPtr.asFunction< + os_workgroup_t Function(ffi.Pointer, os_workgroup_t)>(); + + int os_workgroup_join( + os_workgroup_t wg, + os_workgroup_join_token_t token_out, + ) { + return _os_workgroup_join( + wg, + token_out, + ); + } + + late final _os_workgroup_joinPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + os_workgroup_t, os_workgroup_join_token_t)>>('os_workgroup_join'); + late final _os_workgroup_join = _os_workgroup_joinPtr + .asFunction(); + + void os_workgroup_leave( + os_workgroup_t wg, + os_workgroup_join_token_t token, + ) { + return _os_workgroup_leave( + wg, + token, + ); + } + + late final _os_workgroup_leavePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(os_workgroup_t, + os_workgroup_join_token_t)>>('os_workgroup_leave'); + late final _os_workgroup_leave = _os_workgroup_leavePtr + .asFunction(); + + int os_workgroup_set_working_arena( + os_workgroup_t wg, + ffi.Pointer arena, + int max_workers, + os_workgroup_working_arena_destructor_t destructor, + ) { + return _os_workgroup_set_working_arena( + wg, + arena, + max_workers, + destructor, + ); + } + + late final _os_workgroup_set_working_arenaPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_t, ffi.Pointer, + ffi.Uint32, os_workgroup_working_arena_destructor_t)>>( + 'os_workgroup_set_working_arena'); + late final _os_workgroup_set_working_arena = + _os_workgroup_set_working_arenaPtr.asFunction< + int Function(os_workgroup_t, ffi.Pointer, int, + os_workgroup_working_arena_destructor_t)>(); + + ffi.Pointer os_workgroup_get_working_arena( + os_workgroup_t wg, + ffi.Pointer index_out, + ) { + return _os_workgroup_get_working_arena( + wg, + index_out, + ); + } + + late final _os_workgroup_get_working_arenaPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + os_workgroup_t, ffi.Pointer)>>( + 'os_workgroup_get_working_arena'); + late final _os_workgroup_get_working_arena = + _os_workgroup_get_working_arenaPtr.asFunction< + ffi.Pointer Function( + os_workgroup_t, ffi.Pointer)>(); + + void os_workgroup_cancel( + os_workgroup_t wg, + ) { + return _os_workgroup_cancel( + wg, + ); + } + + late final _os_workgroup_cancelPtr = + _lookup>( + 'os_workgroup_cancel'); + late final _os_workgroup_cancel = + _os_workgroup_cancelPtr.asFunction(); + + bool os_workgroup_testcancel( + os_workgroup_t wg, + ) { + return _os_workgroup_testcancel( + wg, + ); + } + + late final _os_workgroup_testcancelPtr = + _lookup>( + 'os_workgroup_testcancel'); + late final _os_workgroup_testcancel = + _os_workgroup_testcancelPtr.asFunction(); + + int os_workgroup_max_parallel_threads( + os_workgroup_t wg, + os_workgroup_mpt_attr_t attr, + ) { + return _os_workgroup_max_parallel_threads( + wg, + attr, + ); + } + + late final _os_workgroup_max_parallel_threadsPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_t, + os_workgroup_mpt_attr_t)>>('os_workgroup_max_parallel_threads'); + late final _os_workgroup_max_parallel_threads = + _os_workgroup_max_parallel_threadsPtr + .asFunction(); + + late final _class_OS_os_workgroup_interval1 = + _getClass1("OS_os_workgroup_interval"); + int os_workgroup_interval_start( + os_workgroup_interval_t wg, + int start, + int deadline, + os_workgroup_interval_data_t data, + ) { + return _os_workgroup_interval_start( + wg, + start, + deadline, + data, + ); + } + + late final _os_workgroup_interval_startPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, ffi.Uint64, + os_workgroup_interval_data_t)>>('os_workgroup_interval_start'); + late final _os_workgroup_interval_start = + _os_workgroup_interval_startPtr.asFunction< + int Function(os_workgroup_interval_t, int, int, + os_workgroup_interval_data_t)>(); + + int os_workgroup_interval_update( + os_workgroup_interval_t wg, + int deadline, + os_workgroup_interval_data_t data, + ) { + return _os_workgroup_interval_update( + wg, + deadline, + data, + ); + } + + late final _os_workgroup_interval_updatePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, + os_workgroup_interval_data_t)>>('os_workgroup_interval_update'); + late final _os_workgroup_interval_update = + _os_workgroup_interval_updatePtr.asFunction< + int Function( + os_workgroup_interval_t, int, os_workgroup_interval_data_t)>(); + + int os_workgroup_interval_finish( + os_workgroup_interval_t wg, + os_workgroup_interval_data_t data, + ) { + return _os_workgroup_interval_finish( + wg, + data, + ); + } + + late final _os_workgroup_interval_finishPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_interval_t, + os_workgroup_interval_data_t)>>('os_workgroup_interval_finish'); + late final _os_workgroup_interval_finish = + _os_workgroup_interval_finishPtr.asFunction< + int Function( + os_workgroup_interval_t, os_workgroup_interval_data_t)>(); + + late final _class_OS_os_workgroup_parallel1 = + _getClass1("OS_os_workgroup_parallel"); + os_workgroup_parallel_t os_workgroup_parallel_create( + ffi.Pointer name, + os_workgroup_attr_t attr, + ) { + return _os_workgroup_parallel_create( + name, + attr, + ); + } + + late final _os_workgroup_parallel_createPtr = _lookup< + ffi.NativeFunction< + os_workgroup_parallel_t Function(ffi.Pointer, + os_workgroup_attr_t)>>('os_workgroup_parallel_create'); + late final _os_workgroup_parallel_create = + _os_workgroup_parallel_createPtr.asFunction< + os_workgroup_parallel_t Function( + ffi.Pointer, os_workgroup_attr_t)>(); + + int dispatch_time( + int when, + int delta, + ) { + return _dispatch_time( + when, + delta, + ); + } + + late final _dispatch_timePtr = _lookup< + ffi.NativeFunction< + dispatch_time_t Function( + dispatch_time_t, ffi.Int64)>>('dispatch_time'); + late final _dispatch_time = + _dispatch_timePtr.asFunction(); + + int dispatch_walltime( + ffi.Pointer when, + int delta, + ) { + return _dispatch_walltime( + when, + delta, + ); + } + + late final _dispatch_walltimePtr = _lookup< + ffi.NativeFunction< + dispatch_time_t Function( + ffi.Pointer, ffi.Int64)>>('dispatch_walltime'); + late final _dispatch_walltime = _dispatch_walltimePtr + .asFunction, int)>(); + + int qos_class_self() { + return _qos_class_self(); + } + + late final _qos_class_selfPtr = + _lookup>('qos_class_self'); + late final _qos_class_self = _qos_class_selfPtr.asFunction(); + + int qos_class_main() { + return _qos_class_main(); + } + + late final _qos_class_mainPtr = + _lookup>('qos_class_main'); + late final _qos_class_main = _qos_class_mainPtr.asFunction(); + + void dispatch_retain( + dispatch_object_t object, + ) { + return _dispatch_retain( + object, + ); + } + + late final _dispatch_retainPtr = + _lookup>( + 'dispatch_retain'); + late final _dispatch_retain = + _dispatch_retainPtr.asFunction(); + + void dispatch_release( + dispatch_object_t object, + ) { + return _dispatch_release( + object, + ); + } + + late final _dispatch_releasePtr = + _lookup>( + 'dispatch_release'); + late final _dispatch_release = + _dispatch_releasePtr.asFunction(); + + ffi.Pointer dispatch_get_context( + dispatch_object_t object, + ) { + return _dispatch_get_context( + object, + ); + } + + late final _dispatch_get_contextPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + dispatch_object_t)>>('dispatch_get_context'); + late final _dispatch_get_context = _dispatch_get_contextPtr + .asFunction Function(dispatch_object_t)>(); + + void dispatch_set_context( + dispatch_object_t object, + ffi.Pointer context, + ) { + return _dispatch_set_context( + object, + context, + ); + } + + late final _dispatch_set_contextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, + ffi.Pointer)>>('dispatch_set_context'); + late final _dispatch_set_context = _dispatch_set_contextPtr + .asFunction)>(); + + void dispatch_set_finalizer_f( + dispatch_object_t object, + dispatch_function_t finalizer, + ) { + return _dispatch_set_finalizer_f( + object, + finalizer, + ); + } + + late final _dispatch_set_finalizer_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, + dispatch_function_t)>>('dispatch_set_finalizer_f'); + late final _dispatch_set_finalizer_f = _dispatch_set_finalizer_fPtr + .asFunction(); + + void dispatch_activate( + dispatch_object_t object, + ) { + return _dispatch_activate( + object, + ); + } + + late final _dispatch_activatePtr = + _lookup>( + 'dispatch_activate'); + late final _dispatch_activate = + _dispatch_activatePtr.asFunction(); + + void dispatch_suspend( + dispatch_object_t object, + ) { + return _dispatch_suspend( + object, + ); + } + + late final _dispatch_suspendPtr = + _lookup>( + 'dispatch_suspend'); + late final _dispatch_suspend = + _dispatch_suspendPtr.asFunction(); + + void dispatch_resume( + dispatch_object_t object, + ) { + return _dispatch_resume( + object, + ); + } + + late final _dispatch_resumePtr = + _lookup>( + 'dispatch_resume'); + late final _dispatch_resume = + _dispatch_resumePtr.asFunction(); + + void dispatch_set_qos_class_floor( + dispatch_object_t object, + int qos_class, + int relative_priority, + ) { + return _dispatch_set_qos_class_floor( + object, + qos_class, + relative_priority, + ); + } + + late final _dispatch_set_qos_class_floorPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, ffi.Int32, + ffi.Int)>>('dispatch_set_qos_class_floor'); + late final _dispatch_set_qos_class_floor = _dispatch_set_qos_class_floorPtr + .asFunction(); + + int dispatch_wait( + ffi.Pointer object, + int timeout, + ) { + return _dispatch_wait( + object, + timeout, + ); + } + + late final _dispatch_waitPtr = _lookup< + ffi.NativeFunction< + ffi.IntPtr Function( + ffi.Pointer, dispatch_time_t)>>('dispatch_wait'); + late final _dispatch_wait = + _dispatch_waitPtr.asFunction, int)>(); + + void dispatch_notify( + ffi.Pointer object, + dispatch_object_t queue, + dispatch_block_t notification_block, + ) { + return _dispatch_notify( + object, + queue, + notification_block, + ); + } + + late final _dispatch_notifyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, dispatch_object_t, + dispatch_block_t)>>('dispatch_notify'); + late final _dispatch_notify = _dispatch_notifyPtr.asFunction< + void Function( + ffi.Pointer, dispatch_object_t, dispatch_block_t)>(); + + void dispatch_cancel( + ffi.Pointer object, + ) { + return _dispatch_cancel( + object, + ); + } + + late final _dispatch_cancelPtr = + _lookup)>>( + 'dispatch_cancel'); + late final _dispatch_cancel = + _dispatch_cancelPtr.asFunction)>(); + + int dispatch_testcancel( + ffi.Pointer object, + ) { + return _dispatch_testcancel( + object, + ); + } + + late final _dispatch_testcancelPtr = + _lookup)>>( + 'dispatch_testcancel'); + late final _dispatch_testcancel = + _dispatch_testcancelPtr.asFunction)>(); + + void dispatch_debug( + dispatch_object_t object, + ffi.Pointer message, + ) { + return _dispatch_debug( + object, + message, + ); + } + + late final _dispatch_debugPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_object_t, ffi.Pointer)>>('dispatch_debug'); + late final _dispatch_debug = _dispatch_debugPtr + .asFunction)>(); + + void dispatch_debugv( + dispatch_object_t object, + ffi.Pointer message, + va_list ap, + ) { + return _dispatch_debugv( + object, + message, + ap, + ); + } + + late final _dispatch_debugvPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, ffi.Pointer, + va_list)>>('dispatch_debugv'); + late final _dispatch_debugv = _dispatch_debugvPtr.asFunction< + void Function(dispatch_object_t, ffi.Pointer, va_list)>(); + + void dispatch_async( + dispatch_queue_t queue, + dispatch_block_t block, + ) { + return _dispatch_async( + queue, + block, + ); + } + + late final _dispatch_asyncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_async'); + late final _dispatch_async = _dispatch_asyncPtr + .asFunction(); + + void dispatch_async_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_async_f( + queue, + context, + work, + ); + } + + late final _dispatch_async_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_async_f'); + late final _dispatch_async_f = _dispatch_async_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + + void dispatch_sync( + dispatch_queue_t queue, + dispatch_block_t block, + ) { + return _dispatch_sync( + queue, + block, + ); + } + + late final _dispatch_syncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_sync'); + late final _dispatch_sync = _dispatch_syncPtr + .asFunction(); + + void dispatch_sync_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_sync_f( + queue, + context, + work, + ); + } + + late final _dispatch_sync_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_sync_f'); + late final _dispatch_sync_f = _dispatch_sync_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + + void dispatch_async_and_wait( + dispatch_queue_t queue, + dispatch_block_t block, + ) { + return _dispatch_async_and_wait( + queue, + block, + ); + } + + late final _dispatch_async_and_waitPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_async_and_wait'); + late final _dispatch_async_and_wait = _dispatch_async_and_waitPtr + .asFunction(); + + void dispatch_async_and_wait_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_async_and_wait_f( + queue, + context, + work, + ); + } + + late final _dispatch_async_and_wait_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_async_and_wait_f'); + late final _dispatch_async_and_wait_f = + _dispatch_async_and_wait_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + + void dispatch_apply( + int iterations, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> block, + ) { + return _dispatch_apply( + iterations, + queue, + block, + ); + } + + late final _dispatch_applyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Size, dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_apply'); + late final _dispatch_apply = _dispatch_applyPtr.asFunction< + void Function(int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + + void dispatch_apply_f( + int iterations, + dispatch_queue_t queue, + ffi.Pointer context, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Size)>> + work, + ) { + return _dispatch_apply_f( + iterations, + queue, + context, + work, + ); + } + + late final _dispatch_apply_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Size, + dispatch_queue_t, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Size)>>)>>('dispatch_apply_f'); + late final _dispatch_apply_f = _dispatch_apply_fPtr.asFunction< + void Function( + int, + dispatch_queue_t, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Size)>>)>(); + + dispatch_queue_t dispatch_get_current_queue() { + return _dispatch_get_current_queue(); + } + + late final _dispatch_get_current_queuePtr = + _lookup>( + 'dispatch_get_current_queue'); + late final _dispatch_get_current_queue = + _dispatch_get_current_queuePtr.asFunction(); + + late final ffi.Pointer __dispatch_main_q = + _lookup('_dispatch_main_q'); + + ffi.Pointer get _dispatch_main_q => __dispatch_main_q; + + dispatch_queue_global_t dispatch_get_global_queue( + int identifier, + int flags, + ) { + return _dispatch_get_global_queue( + identifier, + flags, + ); + } + + late final _dispatch_get_global_queuePtr = _lookup< + ffi.NativeFunction< + dispatch_queue_global_t Function( + ffi.IntPtr, uintptr_t)>>('dispatch_get_global_queue'); + late final _dispatch_get_global_queue = _dispatch_get_global_queuePtr + .asFunction(); + + late final ffi.Pointer + __dispatch_queue_attr_concurrent = + _lookup('_dispatch_queue_attr_concurrent'); + + ffi.Pointer get _dispatch_queue_attr_concurrent => + __dispatch_queue_attr_concurrent; + + dispatch_queue_attr_t dispatch_queue_attr_make_initially_inactive( + dispatch_queue_attr_t attr, + ) { + return _dispatch_queue_attr_make_initially_inactive( + attr, + ); + } + + late final _dispatch_queue_attr_make_initially_inactivePtr = _lookup< + ffi.NativeFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t)>>( + 'dispatch_queue_attr_make_initially_inactive'); + late final _dispatch_queue_attr_make_initially_inactive = + _dispatch_queue_attr_make_initially_inactivePtr + .asFunction(); + + dispatch_queue_attr_t dispatch_queue_attr_make_with_autorelease_frequency( + dispatch_queue_attr_t attr, + int frequency, + ) { + return _dispatch_queue_attr_make_with_autorelease_frequency( + attr, + frequency, + ); + } + + late final _dispatch_queue_attr_make_with_autorelease_frequencyPtr = _lookup< + ffi.NativeFunction< + dispatch_queue_attr_t Function( + dispatch_queue_attr_t, ffi.Int32)>>( + 'dispatch_queue_attr_make_with_autorelease_frequency'); + late final _dispatch_queue_attr_make_with_autorelease_frequency = + _dispatch_queue_attr_make_with_autorelease_frequencyPtr.asFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t, int)>(); + + dispatch_queue_attr_t dispatch_queue_attr_make_with_qos_class( + dispatch_queue_attr_t attr, + int qos_class, + int relative_priority, + ) { + return _dispatch_queue_attr_make_with_qos_class( + attr, + qos_class, + relative_priority, + ); + } + + late final _dispatch_queue_attr_make_with_qos_classPtr = _lookup< + ffi.NativeFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t, ffi.Int32, + ffi.Int)>>('dispatch_queue_attr_make_with_qos_class'); + late final _dispatch_queue_attr_make_with_qos_class = + _dispatch_queue_attr_make_with_qos_classPtr.asFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t, int, int)>(); + + dispatch_queue_t dispatch_queue_create_with_target( + ffi.Pointer label, + dispatch_queue_attr_t attr, + dispatch_queue_t target, + ) { + return _dispatch_queue_create_with_target( + label, + attr, + target, + ); + } + + late final _dispatch_queue_create_with_targetPtr = _lookup< + ffi.NativeFunction< + dispatch_queue_t Function( + ffi.Pointer, + dispatch_queue_attr_t, + dispatch_queue_t)>>('dispatch_queue_create_with_target'); + late final _dispatch_queue_create_with_target = + _dispatch_queue_create_with_targetPtr.asFunction< + dispatch_queue_t Function(ffi.Pointer, + dispatch_queue_attr_t, dispatch_queue_t)>(); + + dispatch_queue_t dispatch_queue_create( + ffi.Pointer label, + dispatch_queue_attr_t attr, + ) { + return _dispatch_queue_create( + label, + attr, + ); + } + + late final _dispatch_queue_createPtr = _lookup< + ffi.NativeFunction< + dispatch_queue_t Function(ffi.Pointer, + dispatch_queue_attr_t)>>('dispatch_queue_create'); + late final _dispatch_queue_create = _dispatch_queue_createPtr.asFunction< + dispatch_queue_t Function( + ffi.Pointer, dispatch_queue_attr_t)>(); + + ffi.Pointer dispatch_queue_get_label( + dispatch_queue_t queue, + ) { + return _dispatch_queue_get_label( + queue, + ); + } + + late final _dispatch_queue_get_labelPtr = _lookup< + ffi.NativeFunction Function(dispatch_queue_t)>>( + 'dispatch_queue_get_label'); + late final _dispatch_queue_get_label = _dispatch_queue_get_labelPtr + .asFunction Function(dispatch_queue_t)>(); + + int dispatch_queue_get_qos_class( + dispatch_queue_t queue, + ffi.Pointer relative_priority_ptr, + ) { + return _dispatch_queue_get_qos_class( + queue, + relative_priority_ptr, + ); + } + + late final _dispatch_queue_get_qos_classPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(dispatch_queue_t, + ffi.Pointer)>>('dispatch_queue_get_qos_class'); + late final _dispatch_queue_get_qos_class = _dispatch_queue_get_qos_classPtr + .asFunction)>(); + + void dispatch_set_target_queue( + dispatch_object_t object, + dispatch_queue_t queue, + ) { + return _dispatch_set_target_queue( + object, + queue, + ); + } + + late final _dispatch_set_target_queuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, + dispatch_queue_t)>>('dispatch_set_target_queue'); + late final _dispatch_set_target_queue = _dispatch_set_target_queuePtr + .asFunction(); + + void dispatch_main() { + return _dispatch_main(); + } + + late final _dispatch_mainPtr = + _lookup>('dispatch_main'); + late final _dispatch_main = _dispatch_mainPtr.asFunction(); + + void dispatch_after( + int when, + dispatch_queue_t queue, + dispatch_block_t block, + ) { + return _dispatch_after( + when, + queue, + block, + ); + } + + late final _dispatch_afterPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_time_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_after'); + late final _dispatch_after = _dispatch_afterPtr + .asFunction(); + + void dispatch_after_f( + int when, + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_after_f( + when, + queue, + context, + work, + ); + } + + late final _dispatch_after_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_time_t, dispatch_queue_t, + ffi.Pointer, dispatch_function_t)>>('dispatch_after_f'); + late final _dispatch_after_f = _dispatch_after_fPtr.asFunction< + void Function( + int, dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + + void dispatch_barrier_async( + dispatch_queue_t queue, + dispatch_block_t block, + ) { + return _dispatch_barrier_async( + queue, + block, + ); + } + + late final _dispatch_barrier_asyncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_async'); + late final _dispatch_barrier_async = _dispatch_barrier_asyncPtr + .asFunction(); + + void dispatch_barrier_async_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_barrier_async_f( + queue, + context, + work, + ); + } + + late final _dispatch_barrier_async_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_barrier_async_f'); + late final _dispatch_barrier_async_f = + _dispatch_barrier_async_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + + void dispatch_barrier_sync( + dispatch_queue_t queue, + dispatch_block_t block, + ) { + return _dispatch_barrier_sync( + queue, + block, + ); + } + + late final _dispatch_barrier_syncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_sync'); + late final _dispatch_barrier_sync = _dispatch_barrier_syncPtr + .asFunction(); + + void dispatch_barrier_sync_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_barrier_sync_f( + queue, + context, + work, + ); + } + + late final _dispatch_barrier_sync_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_barrier_sync_f'); + late final _dispatch_barrier_sync_f = _dispatch_barrier_sync_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + + void dispatch_barrier_async_and_wait( + dispatch_queue_t queue, + dispatch_block_t block, + ) { + return _dispatch_barrier_async_and_wait( + queue, + block, + ); + } + + late final _dispatch_barrier_async_and_waitPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, + dispatch_block_t)>>('dispatch_barrier_async_and_wait'); + late final _dispatch_barrier_async_and_wait = + _dispatch_barrier_async_and_waitPtr + .asFunction(); + + void dispatch_barrier_async_and_wait_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_barrier_async_and_wait_f( + queue, + context, + work, + ); + } + + late final _dispatch_barrier_async_and_wait_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_barrier_async_and_wait_f'); + late final _dispatch_barrier_async_and_wait_f = + _dispatch_barrier_async_and_wait_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + + void dispatch_queue_set_specific( + dispatch_queue_t queue, + ffi.Pointer key, + ffi.Pointer context, + dispatch_function_t destructor, + ) { + return _dispatch_queue_set_specific( + queue, + key, + context, + destructor, + ); + } + + late final _dispatch_queue_set_specificPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, + ffi.Pointer, + ffi.Pointer, + dispatch_function_t)>>('dispatch_queue_set_specific'); + late final _dispatch_queue_set_specific = + _dispatch_queue_set_specificPtr.asFunction< + void Function(dispatch_queue_t, ffi.Pointer, + ffi.Pointer, dispatch_function_t)>(); + + ffi.Pointer dispatch_queue_get_specific( + dispatch_queue_t queue, + ffi.Pointer key, + ) { + return _dispatch_queue_get_specific( + queue, + key, + ); + } + + late final _dispatch_queue_get_specificPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(dispatch_queue_t, + ffi.Pointer)>>('dispatch_queue_get_specific'); + late final _dispatch_queue_get_specific = + _dispatch_queue_get_specificPtr.asFunction< + ffi.Pointer Function( + dispatch_queue_t, ffi.Pointer)>(); + + ffi.Pointer dispatch_get_specific( + ffi.Pointer key, + ) { + return _dispatch_get_specific( + key, + ); + } + + late final _dispatch_get_specificPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('dispatch_get_specific'); + late final _dispatch_get_specific = _dispatch_get_specificPtr + .asFunction Function(ffi.Pointer)>(); + + void dispatch_assert_queue( + dispatch_queue_t queue, + ) { + return _dispatch_assert_queue( + queue, + ); + } + + late final _dispatch_assert_queuePtr = + _lookup>( + 'dispatch_assert_queue'); + late final _dispatch_assert_queue = + _dispatch_assert_queuePtr.asFunction(); + + void dispatch_assert_queue_barrier( + dispatch_queue_t queue, + ) { + return _dispatch_assert_queue_barrier( + queue, + ); + } + + late final _dispatch_assert_queue_barrierPtr = + _lookup>( + 'dispatch_assert_queue_barrier'); + late final _dispatch_assert_queue_barrier = _dispatch_assert_queue_barrierPtr + .asFunction(); + + void dispatch_assert_queue_not( + dispatch_queue_t queue, + ) { + return _dispatch_assert_queue_not( + queue, + ); + } + + late final _dispatch_assert_queue_notPtr = + _lookup>( + 'dispatch_assert_queue_not'); + late final _dispatch_assert_queue_not = _dispatch_assert_queue_notPtr + .asFunction(); + + dispatch_block_t dispatch_block_create( + int flags, + dispatch_block_t block, + ) { + return _dispatch_block_create( + flags, + block, + ); + } + + late final _dispatch_block_createPtr = _lookup< + ffi.NativeFunction< + dispatch_block_t Function( + ffi.Int32, dispatch_block_t)>>('dispatch_block_create'); + late final _dispatch_block_create = _dispatch_block_createPtr + .asFunction(); + + dispatch_block_t dispatch_block_create_with_qos_class( + int flags, + int qos_class, + int relative_priority, + dispatch_block_t block, + ) { + return _dispatch_block_create_with_qos_class( + flags, + qos_class, + relative_priority, + block, + ); + } + + late final _dispatch_block_create_with_qos_classPtr = _lookup< + ffi.NativeFunction< + dispatch_block_t Function(ffi.Int32, ffi.Int32, ffi.Int, + dispatch_block_t)>>('dispatch_block_create_with_qos_class'); + late final _dispatch_block_create_with_qos_class = + _dispatch_block_create_with_qos_classPtr.asFunction< + dispatch_block_t Function(int, int, int, dispatch_block_t)>(); + + void dispatch_block_perform( + int flags, + dispatch_block_t block, + ) { + return _dispatch_block_perform( + flags, + block, + ); + } + + late final _dispatch_block_performPtr = _lookup< + ffi.NativeFunction>( + 'dispatch_block_perform'); + late final _dispatch_block_perform = _dispatch_block_performPtr + .asFunction(); + + int dispatch_block_wait( + dispatch_block_t block, + int timeout, + ) { + return _dispatch_block_wait( + block, + timeout, + ); + } + + late final _dispatch_block_waitPtr = _lookup< + ffi.NativeFunction< + ffi.IntPtr Function( + dispatch_block_t, dispatch_time_t)>>('dispatch_block_wait'); + late final _dispatch_block_wait = + _dispatch_block_waitPtr.asFunction(); + + void dispatch_block_notify( + dispatch_block_t block, + dispatch_queue_t queue, + dispatch_block_t notification_block, + ) { + return _dispatch_block_notify( + block, + queue, + notification_block, + ); + } + + late final _dispatch_block_notifyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_block_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_block_notify'); + late final _dispatch_block_notify = _dispatch_block_notifyPtr.asFunction< + void Function(dispatch_block_t, dispatch_queue_t, dispatch_block_t)>(); + + void dispatch_block_cancel( + dispatch_block_t block, + ) { + return _dispatch_block_cancel( + block, + ); + } + + late final _dispatch_block_cancelPtr = + _lookup>( + 'dispatch_block_cancel'); + late final _dispatch_block_cancel = + _dispatch_block_cancelPtr.asFunction(); + + int dispatch_block_testcancel( + dispatch_block_t block, + ) { + return _dispatch_block_testcancel( + block, + ); + } + + late final _dispatch_block_testcancelPtr = + _lookup>( + 'dispatch_block_testcancel'); + late final _dispatch_block_testcancel = _dispatch_block_testcancelPtr + .asFunction(); + + late final ffi.Pointer _KERNEL_SECURITY_TOKEN = + _lookup('KERNEL_SECURITY_TOKEN'); + + security_token_t get KERNEL_SECURITY_TOKEN => _KERNEL_SECURITY_TOKEN.ref; + + late final ffi.Pointer _KERNEL_AUDIT_TOKEN = + _lookup('KERNEL_AUDIT_TOKEN'); + + audit_token_t get KERNEL_AUDIT_TOKEN => _KERNEL_AUDIT_TOKEN.ref; + + int mach_msg_overwrite( + ffi.Pointer msg, + int option, + int send_size, + int rcv_size, + int rcv_name, + int timeout, + int notify, + ffi.Pointer rcv_msg, + int rcv_limit, + ) { + return _mach_msg_overwrite( + msg, + option, + send_size, + rcv_size, + rcv_name, + timeout, + notify, + rcv_msg, + rcv_limit, + ); + } + + late final _mach_msg_overwritePtr = _lookup< + ffi.NativeFunction< + mach_msg_return_t Function( + ffi.Pointer, + mach_msg_option_t, + mach_msg_size_t, + mach_msg_size_t, + mach_port_name_t, + mach_msg_timeout_t, + mach_port_name_t, + ffi.Pointer, + mach_msg_size_t)>>('mach_msg_overwrite'); + late final _mach_msg_overwrite = _mach_msg_overwritePtr.asFunction< + int Function(ffi.Pointer, int, int, int, int, int, int, + ffi.Pointer, int)>(); + + int mach_msg( + ffi.Pointer msg, + int option, + int send_size, + int rcv_size, + int rcv_name, + int timeout, + int notify, + ) { + return _mach_msg( + msg, + option, + send_size, + rcv_size, + rcv_name, + timeout, + notify, + ); + } + + late final _mach_msgPtr = _lookup< + ffi.NativeFunction< + mach_msg_return_t Function( + ffi.Pointer, + mach_msg_option_t, + mach_msg_size_t, + mach_msg_size_t, + mach_port_name_t, + mach_msg_timeout_t, + mach_port_name_t)>>('mach_msg'); + late final _mach_msg = _mach_msgPtr.asFunction< + int Function( + ffi.Pointer, int, int, int, int, int, int)>(); + + int mach_voucher_deallocate( + int voucher, + ) { + return _mach_voucher_deallocate( + voucher, + ); + } + + late final _mach_voucher_deallocatePtr = + _lookup>( + 'mach_voucher_deallocate'); + late final _mach_voucher_deallocate = + _mach_voucher_deallocatePtr.asFunction(); + + late final ffi.Pointer + __dispatch_source_type_data_add = + _lookup('_dispatch_source_type_data_add'); + + ffi.Pointer get _dispatch_source_type_data_add => + __dispatch_source_type_data_add; + + late final ffi.Pointer + __dispatch_source_type_data_or = + _lookup('_dispatch_source_type_data_or'); + + ffi.Pointer get _dispatch_source_type_data_or => + __dispatch_source_type_data_or; + + late final ffi.Pointer + __dispatch_source_type_data_replace = + _lookup('_dispatch_source_type_data_replace'); + + ffi.Pointer get _dispatch_source_type_data_replace => + __dispatch_source_type_data_replace; + + late final ffi.Pointer + __dispatch_source_type_mach_send = + _lookup('_dispatch_source_type_mach_send'); + + ffi.Pointer get _dispatch_source_type_mach_send => + __dispatch_source_type_mach_send; + + late final ffi.Pointer + __dispatch_source_type_mach_recv = + _lookup('_dispatch_source_type_mach_recv'); + + ffi.Pointer get _dispatch_source_type_mach_recv => + __dispatch_source_type_mach_recv; + + late final ffi.Pointer + __dispatch_source_type_memorypressure = + _lookup('_dispatch_source_type_memorypressure'); + + ffi.Pointer + get _dispatch_source_type_memorypressure => + __dispatch_source_type_memorypressure; + + late final ffi.Pointer __dispatch_source_type_proc = + _lookup('_dispatch_source_type_proc'); + + ffi.Pointer get _dispatch_source_type_proc => + __dispatch_source_type_proc; + + late final ffi.Pointer __dispatch_source_type_read = + _lookup('_dispatch_source_type_read'); + + ffi.Pointer get _dispatch_source_type_read => + __dispatch_source_type_read; + + late final ffi.Pointer __dispatch_source_type_signal = + _lookup('_dispatch_source_type_signal'); + + ffi.Pointer get _dispatch_source_type_signal => + __dispatch_source_type_signal; + + late final ffi.Pointer __dispatch_source_type_timer = + _lookup('_dispatch_source_type_timer'); + + ffi.Pointer get _dispatch_source_type_timer => + __dispatch_source_type_timer; + + late final ffi.Pointer __dispatch_source_type_vnode = + _lookup('_dispatch_source_type_vnode'); + + ffi.Pointer get _dispatch_source_type_vnode => + __dispatch_source_type_vnode; + + late final ffi.Pointer __dispatch_source_type_write = + _lookup('_dispatch_source_type_write'); + + ffi.Pointer get _dispatch_source_type_write => + __dispatch_source_type_write; + + dispatch_source_t dispatch_source_create( + dispatch_source_type_t type, + int handle, + int mask, + dispatch_queue_t queue, + ) { + return _dispatch_source_create( + type, + handle, + mask, + queue, + ); + } + + late final _dispatch_source_createPtr = _lookup< + ffi.NativeFunction< + dispatch_source_t Function(dispatch_source_type_t, uintptr_t, + uintptr_t, dispatch_queue_t)>>('dispatch_source_create'); + late final _dispatch_source_create = _dispatch_source_createPtr.asFunction< + dispatch_source_t Function( + dispatch_source_type_t, int, int, dispatch_queue_t)>(); + + void dispatch_source_set_event_handler( + dispatch_source_t source, + dispatch_block_t handler, + ) { + return _dispatch_source_set_event_handler( + source, + handler, + ); + } + + late final _dispatch_source_set_event_handlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_block_t)>>('dispatch_source_set_event_handler'); + late final _dispatch_source_set_event_handler = + _dispatch_source_set_event_handlerPtr + .asFunction(); + + void dispatch_source_set_event_handler_f( + dispatch_source_t source, + dispatch_function_t handler, + ) { + return _dispatch_source_set_event_handler_f( + source, + handler, + ); + } + + late final _dispatch_source_set_event_handler_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_function_t)>>('dispatch_source_set_event_handler_f'); + late final _dispatch_source_set_event_handler_f = + _dispatch_source_set_event_handler_fPtr + .asFunction(); + + void dispatch_source_set_cancel_handler( + dispatch_source_t source, + dispatch_block_t handler, + ) { + return _dispatch_source_set_cancel_handler( + source, + handler, + ); + } + + late final _dispatch_source_set_cancel_handlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_block_t)>>('dispatch_source_set_cancel_handler'); + late final _dispatch_source_set_cancel_handler = + _dispatch_source_set_cancel_handlerPtr + .asFunction(); + + void dispatch_source_set_cancel_handler_f( + dispatch_source_t source, + dispatch_function_t handler, + ) { + return _dispatch_source_set_cancel_handler_f( + source, + handler, + ); + } + + late final _dispatch_source_set_cancel_handler_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_function_t)>>('dispatch_source_set_cancel_handler_f'); + late final _dispatch_source_set_cancel_handler_f = + _dispatch_source_set_cancel_handler_fPtr + .asFunction(); + + void dispatch_source_cancel( + dispatch_source_t source, + ) { + return _dispatch_source_cancel( + source, + ); + } + + late final _dispatch_source_cancelPtr = + _lookup>( + 'dispatch_source_cancel'); + late final _dispatch_source_cancel = + _dispatch_source_cancelPtr.asFunction(); + + int dispatch_source_testcancel( + dispatch_source_t source, + ) { + return _dispatch_source_testcancel( + source, + ); + } + + late final _dispatch_source_testcancelPtr = + _lookup>( + 'dispatch_source_testcancel'); + late final _dispatch_source_testcancel = _dispatch_source_testcancelPtr + .asFunction(); + + int dispatch_source_get_handle( + dispatch_source_t source, + ) { + return _dispatch_source_get_handle( + source, + ); + } + + late final _dispatch_source_get_handlePtr = + _lookup>( + 'dispatch_source_get_handle'); + late final _dispatch_source_get_handle = _dispatch_source_get_handlePtr + .asFunction(); + + int dispatch_source_get_mask( + dispatch_source_t source, + ) { + return _dispatch_source_get_mask( + source, + ); + } + + late final _dispatch_source_get_maskPtr = + _lookup>( + 'dispatch_source_get_mask'); + late final _dispatch_source_get_mask = _dispatch_source_get_maskPtr + .asFunction(); + + int dispatch_source_get_data( + dispatch_source_t source, + ) { + return _dispatch_source_get_data( + source, + ); + } + + late final _dispatch_source_get_dataPtr = + _lookup>( + 'dispatch_source_get_data'); + late final _dispatch_source_get_data = _dispatch_source_get_dataPtr + .asFunction(); + + void dispatch_source_merge_data( + dispatch_source_t source, + int value, + ) { + return _dispatch_source_merge_data( + source, + value, + ); + } + + late final _dispatch_source_merge_dataPtr = _lookup< + ffi.NativeFunction>( + 'dispatch_source_merge_data'); + late final _dispatch_source_merge_data = _dispatch_source_merge_dataPtr + .asFunction(); + + void dispatch_source_set_timer( + dispatch_source_t source, + int start, + int interval, + int leeway, + ) { + return _dispatch_source_set_timer( + source, + start, + interval, + leeway, + ); + } + + late final _dispatch_source_set_timerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, dispatch_time_t, ffi.Uint64, + ffi.Uint64)>>('dispatch_source_set_timer'); + late final _dispatch_source_set_timer = _dispatch_source_set_timerPtr + .asFunction(); + + void dispatch_source_set_registration_handler( + dispatch_source_t source, + dispatch_block_t handler, + ) { + return _dispatch_source_set_registration_handler( + source, + handler, + ); + } + + late final _dispatch_source_set_registration_handlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_block_t)>>('dispatch_source_set_registration_handler'); + late final _dispatch_source_set_registration_handler = + _dispatch_source_set_registration_handlerPtr + .asFunction(); + + void dispatch_source_set_registration_handler_f( + dispatch_source_t source, + dispatch_function_t handler, + ) { + return _dispatch_source_set_registration_handler_f( + source, + handler, + ); + } + + late final _dispatch_source_set_registration_handler_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, dispatch_function_t)>>( + 'dispatch_source_set_registration_handler_f'); + late final _dispatch_source_set_registration_handler_f = + _dispatch_source_set_registration_handler_fPtr + .asFunction(); + + dispatch_group_t dispatch_group_create() { + return _dispatch_group_create(); + } + + late final _dispatch_group_createPtr = + _lookup>( + 'dispatch_group_create'); + late final _dispatch_group_create = + _dispatch_group_createPtr.asFunction(); + + void dispatch_group_async( + dispatch_group_t group, + dispatch_queue_t queue, + dispatch_block_t block, + ) { + return _dispatch_group_async( + group, + queue, + block, + ); + } + + late final _dispatch_group_asyncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_group_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_group_async'); + late final _dispatch_group_async = _dispatch_group_asyncPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); + + void dispatch_group_async_f( + dispatch_group_t group, + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_group_async_f( + group, + queue, + context, + work, + ); + } + + late final _dispatch_group_async_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_group_t, + dispatch_queue_t, + ffi.Pointer, + dispatch_function_t)>>('dispatch_group_async_f'); + late final _dispatch_group_async_f = _dispatch_group_async_fPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>(); + + int dispatch_group_wait( + dispatch_group_t group, + int timeout, + ) { + return _dispatch_group_wait( + group, + timeout, + ); + } + + late final _dispatch_group_waitPtr = _lookup< + ffi.NativeFunction< + ffi.IntPtr Function( + dispatch_group_t, dispatch_time_t)>>('dispatch_group_wait'); + late final _dispatch_group_wait = + _dispatch_group_waitPtr.asFunction(); + + void dispatch_group_notify( + dispatch_group_t group, + dispatch_queue_t queue, + dispatch_block_t block, + ) { + return _dispatch_group_notify( + group, + queue, + block, + ); + } + + late final _dispatch_group_notifyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_group_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_group_notify'); + late final _dispatch_group_notify = _dispatch_group_notifyPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); + + void dispatch_group_notify_f( + dispatch_group_t group, + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_group_notify_f( + group, + queue, + context, + work, + ); + } + + late final _dispatch_group_notify_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_group_t, + dispatch_queue_t, + ffi.Pointer, + dispatch_function_t)>>('dispatch_group_notify_f'); + late final _dispatch_group_notify_f = _dispatch_group_notify_fPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>(); + + void dispatch_group_enter( + dispatch_group_t group, + ) { + return _dispatch_group_enter( + group, + ); + } + + late final _dispatch_group_enterPtr = + _lookup>( + 'dispatch_group_enter'); + late final _dispatch_group_enter = + _dispatch_group_enterPtr.asFunction(); + + void dispatch_group_leave( + dispatch_group_t group, + ) { + return _dispatch_group_leave( + group, + ); + } + + late final _dispatch_group_leavePtr = + _lookup>( + 'dispatch_group_leave'); + late final _dispatch_group_leave = + _dispatch_group_leavePtr.asFunction(); + + dispatch_semaphore_t dispatch_semaphore_create( + int value, + ) { + return _dispatch_semaphore_create( + value, + ); + } + + late final _dispatch_semaphore_createPtr = + _lookup>( + 'dispatch_semaphore_create'); + late final _dispatch_semaphore_create = _dispatch_semaphore_createPtr + .asFunction(); + + int dispatch_semaphore_wait( + dispatch_semaphore_t dsema, + int timeout, + ) { + return _dispatch_semaphore_wait( + dsema, + timeout, + ); + } + + late final _dispatch_semaphore_waitPtr = _lookup< + ffi.NativeFunction< + ffi.IntPtr Function(dispatch_semaphore_t, + dispatch_time_t)>>('dispatch_semaphore_wait'); + late final _dispatch_semaphore_wait = _dispatch_semaphore_waitPtr + .asFunction(); + + int dispatch_semaphore_signal( + dispatch_semaphore_t dsema, + ) { + return _dispatch_semaphore_signal( + dsema, + ); + } + + late final _dispatch_semaphore_signalPtr = + _lookup>( + 'dispatch_semaphore_signal'); + late final _dispatch_semaphore_signal = _dispatch_semaphore_signalPtr + .asFunction(); + + void dispatch_once( + ffi.Pointer predicate, + dispatch_block_t block, + ) { + return _dispatch_once( + predicate, + block, + ); + } + + late final _dispatch_oncePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + dispatch_block_t)>>('dispatch_once'); + late final _dispatch_once = _dispatch_oncePtr.asFunction< + void Function(ffi.Pointer, dispatch_block_t)>(); + + void dispatch_once_f( + ffi.Pointer predicate, + ffi.Pointer context, + dispatch_function_t function, + ) { + return _dispatch_once_f( + predicate, + context, + function, + ); + } + + late final _dispatch_once_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + dispatch_function_t)>>('dispatch_once_f'); + late final _dispatch_once_f = _dispatch_once_fPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + dispatch_function_t)>(); + + late final ffi.Pointer __dispatch_data_empty = + _lookup('_dispatch_data_empty'); + + ffi.Pointer get _dispatch_data_empty => + __dispatch_data_empty; + + late final ffi.Pointer __dispatch_data_destructor_free = + _lookup('_dispatch_data_destructor_free'); + + dispatch_block_t get _dispatch_data_destructor_free => + __dispatch_data_destructor_free.value; + + set _dispatch_data_destructor_free(dispatch_block_t value) => + __dispatch_data_destructor_free.value = value; + + late final ffi.Pointer __dispatch_data_destructor_munmap = + _lookup('_dispatch_data_destructor_munmap'); + + dispatch_block_t get _dispatch_data_destructor_munmap => + __dispatch_data_destructor_munmap.value; + + set _dispatch_data_destructor_munmap(dispatch_block_t value) => + __dispatch_data_destructor_munmap.value = value; + + dispatch_data_t dispatch_data_create( + ffi.Pointer buffer, + int size, + dispatch_queue_t queue, + dispatch_block_t destructor, + ) { + return _dispatch_data_create( + buffer, + size, + queue, + destructor, + ); + } + + late final _dispatch_data_createPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(ffi.Pointer, ffi.Size, + dispatch_queue_t, dispatch_block_t)>>('dispatch_data_create'); + late final _dispatch_data_create = _dispatch_data_createPtr.asFunction< + dispatch_data_t Function( + ffi.Pointer, int, dispatch_queue_t, dispatch_block_t)>(); + + int dispatch_data_get_size( + dispatch_data_t data, + ) { + return _dispatch_data_get_size( + data, + ); + } + + late final _dispatch_data_get_sizePtr = + _lookup>( + 'dispatch_data_get_size'); + late final _dispatch_data_get_size = + _dispatch_data_get_sizePtr.asFunction(); + + dispatch_data_t dispatch_data_create_map( + dispatch_data_t data, + ffi.Pointer> buffer_ptr, + ffi.Pointer size_ptr, + ) { + return _dispatch_data_create_map( + data, + buffer_ptr, + size_ptr, + ); + } + + late final _dispatch_data_create_mapPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function( + dispatch_data_t, + ffi.Pointer>, + ffi.Pointer)>>('dispatch_data_create_map'); + late final _dispatch_data_create_map = + _dispatch_data_create_mapPtr.asFunction< + dispatch_data_t Function(dispatch_data_t, + ffi.Pointer>, ffi.Pointer)>(); + + dispatch_data_t dispatch_data_create_concat( + dispatch_data_t data1, + dispatch_data_t data2, + ) { + return _dispatch_data_create_concat( + data1, + data2, + ); + } + + late final _dispatch_data_create_concatPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(dispatch_data_t, + dispatch_data_t)>>('dispatch_data_create_concat'); + late final _dispatch_data_create_concat = _dispatch_data_create_concatPtr + .asFunction(); + + dispatch_data_t dispatch_data_create_subrange( + dispatch_data_t data, + int offset, + int length, + ) { + return _dispatch_data_create_subrange( + data, + offset, + length, + ); + } + + late final _dispatch_data_create_subrangePtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(dispatch_data_t, ffi.Size, + ffi.Size)>>('dispatch_data_create_subrange'); + late final _dispatch_data_create_subrange = _dispatch_data_create_subrangePtr + .asFunction(); + + bool dispatch_data_apply( + dispatch_data_t data, + dispatch_data_applier_t applier, + ) { + return _dispatch_data_apply( + data, + applier, + ); + } + + late final _dispatch_data_applyPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(dispatch_data_t, + dispatch_data_applier_t)>>('dispatch_data_apply'); + late final _dispatch_data_apply = _dispatch_data_applyPtr + .asFunction(); + + dispatch_data_t dispatch_data_copy_region( + dispatch_data_t data, + int location, + ffi.Pointer offset_ptr, + ) { + return _dispatch_data_copy_region( + data, + location, + offset_ptr, + ); + } + + late final _dispatch_data_copy_regionPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(dispatch_data_t, ffi.Size, + ffi.Pointer)>>('dispatch_data_copy_region'); + late final _dispatch_data_copy_region = + _dispatch_data_copy_regionPtr.asFunction< + dispatch_data_t Function( + dispatch_data_t, int, ffi.Pointer)>(); + + void dispatch_read( + int fd, + int length, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> handler, + ) { + return _dispatch_read( + fd, + length, + queue, + handler, + ); + } + + late final _dispatch_readPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_fd_t, ffi.Size, dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_read'); + late final _dispatch_read = _dispatch_readPtr.asFunction< + void Function(int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + + void dispatch_write( + int fd, + dispatch_data_t data, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> handler, + ) { + return _dispatch_write( + fd, + data, + queue, + handler, + ); + } + + late final _dispatch_writePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_fd_t, dispatch_data_t, dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_write'); + late final _dispatch_write = _dispatch_writePtr.asFunction< + void Function( + int, dispatch_data_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + + dispatch_io_t dispatch_io_create( + int type, + int fd, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> cleanup_handler, + ) { + return _dispatch_io_create( + type, + fd, + queue, + cleanup_handler, + ); + } + + late final _dispatch_io_createPtr = _lookup< + ffi.NativeFunction< + dispatch_io_t Function( + dispatch_io_type_t, + dispatch_fd_t, + dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create'); + late final _dispatch_io_create = _dispatch_io_createPtr.asFunction< + dispatch_io_t Function( + int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + + dispatch_io_t dispatch_io_create_with_path( + int type, + ffi.Pointer path, + int oflag, + int mode, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> cleanup_handler, + ) { + return _dispatch_io_create_with_path( + type, + path, + oflag, + mode, + queue, + cleanup_handler, + ); + } + + late final _dispatch_io_create_with_pathPtr = _lookup< + ffi.NativeFunction< + dispatch_io_t Function( + dispatch_io_type_t, + ffi.Pointer, + ffi.Int, + mode_t, + dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create_with_path'); + late final _dispatch_io_create_with_path = + _dispatch_io_create_with_pathPtr.asFunction< + dispatch_io_t Function(int, ffi.Pointer, int, int, + dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + + dispatch_io_t dispatch_io_create_with_io( + int type, + dispatch_io_t io, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> cleanup_handler, + ) { + return _dispatch_io_create_with_io( + type, + io, + queue, + cleanup_handler, + ); + } + + late final _dispatch_io_create_with_ioPtr = _lookup< + ffi.NativeFunction< + dispatch_io_t Function( + dispatch_io_type_t, + dispatch_io_t, + dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create_with_io'); + late final _dispatch_io_create_with_io = + _dispatch_io_create_with_ioPtr.asFunction< + dispatch_io_t Function( + int, dispatch_io_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + + void dispatch_io_read( + dispatch_io_t channel, + int offset, + int length, + dispatch_queue_t queue, + dispatch_io_handler_t io_handler, + ) { + return _dispatch_io_read( + channel, + offset, + length, + queue, + io_handler, + ); + } + + late final _dispatch_io_readPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_io_t, off_t, ffi.Size, dispatch_queue_t, + dispatch_io_handler_t)>>('dispatch_io_read'); + late final _dispatch_io_read = _dispatch_io_readPtr.asFunction< + void Function( + dispatch_io_t, int, int, dispatch_queue_t, dispatch_io_handler_t)>(); + + void dispatch_io_write( + dispatch_io_t channel, + int offset, + dispatch_data_t data, + dispatch_queue_t queue, + dispatch_io_handler_t io_handler, + ) { + return _dispatch_io_write( + channel, + offset, + data, + queue, + io_handler, + ); + } + + late final _dispatch_io_writePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_io_t, off_t, dispatch_data_t, + dispatch_queue_t, dispatch_io_handler_t)>>('dispatch_io_write'); + late final _dispatch_io_write = _dispatch_io_writePtr.asFunction< + void Function(dispatch_io_t, int, dispatch_data_t, dispatch_queue_t, + dispatch_io_handler_t)>(); + + void dispatch_io_close( + dispatch_io_t channel, + int flags, + ) { + return _dispatch_io_close( + channel, + flags, + ); + } + + late final _dispatch_io_closePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_io_t, dispatch_io_close_flags_t)>>('dispatch_io_close'); + late final _dispatch_io_close = + _dispatch_io_closePtr.asFunction(); + + void dispatch_io_barrier( + dispatch_io_t channel, + dispatch_block_t barrier, + ) { + return _dispatch_io_barrier( + channel, + barrier, + ); + } + + late final _dispatch_io_barrierPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_io_t, dispatch_block_t)>>('dispatch_io_barrier'); + late final _dispatch_io_barrier = _dispatch_io_barrierPtr + .asFunction(); + + int dispatch_io_get_descriptor( + dispatch_io_t channel, + ) { + return _dispatch_io_get_descriptor( + channel, + ); + } + + late final _dispatch_io_get_descriptorPtr = + _lookup>( + 'dispatch_io_get_descriptor'); + late final _dispatch_io_get_descriptor = + _dispatch_io_get_descriptorPtr.asFunction(); + + void dispatch_io_set_high_water( + dispatch_io_t channel, + int high_water, + ) { + return _dispatch_io_set_high_water( + channel, + high_water, + ); + } + + late final _dispatch_io_set_high_waterPtr = + _lookup>( + 'dispatch_io_set_high_water'); + late final _dispatch_io_set_high_water = _dispatch_io_set_high_waterPtr + .asFunction(); + + void dispatch_io_set_low_water( + dispatch_io_t channel, + int low_water, + ) { + return _dispatch_io_set_low_water( + channel, + low_water, + ); + } + + late final _dispatch_io_set_low_waterPtr = + _lookup>( + 'dispatch_io_set_low_water'); + late final _dispatch_io_set_low_water = _dispatch_io_set_low_waterPtr + .asFunction(); + + void dispatch_io_set_interval( + dispatch_io_t channel, + int interval, + int flags, + ) { + return _dispatch_io_set_interval( + channel, + interval, + flags, + ); + } + + late final _dispatch_io_set_intervalPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_io_t, ffi.Uint64, + dispatch_io_interval_flags_t)>>('dispatch_io_set_interval'); + late final _dispatch_io_set_interval = _dispatch_io_set_intervalPtr + .asFunction(); + + dispatch_workloop_t dispatch_workloop_create( + ffi.Pointer label, + ) { + return _dispatch_workloop_create( + label, + ); + } + + late final _dispatch_workloop_createPtr = _lookup< + ffi.NativeFunction< + dispatch_workloop_t Function( + ffi.Pointer)>>('dispatch_workloop_create'); + late final _dispatch_workloop_create = _dispatch_workloop_createPtr + .asFunction)>(); + + dispatch_workloop_t dispatch_workloop_create_inactive( + ffi.Pointer label, + ) { + return _dispatch_workloop_create_inactive( + label, + ); + } + + late final _dispatch_workloop_create_inactivePtr = _lookup< + ffi.NativeFunction< + dispatch_workloop_t Function( + ffi.Pointer)>>('dispatch_workloop_create_inactive'); + late final _dispatch_workloop_create_inactive = + _dispatch_workloop_create_inactivePtr + .asFunction)>(); + + void dispatch_workloop_set_autorelease_frequency( + dispatch_workloop_t workloop, + int frequency, + ) { + return _dispatch_workloop_set_autorelease_frequency( + workloop, + frequency, + ); + } + + late final _dispatch_workloop_set_autorelease_frequencyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_workloop_t, + ffi.Int32)>>('dispatch_workloop_set_autorelease_frequency'); + late final _dispatch_workloop_set_autorelease_frequency = + _dispatch_workloop_set_autorelease_frequencyPtr + .asFunction(); + + void dispatch_workloop_set_os_workgroup( + dispatch_workloop_t workloop, + os_workgroup_t workgroup, + ) { + return _dispatch_workloop_set_os_workgroup( + workloop, + workgroup, + ); + } + + late final _dispatch_workloop_set_os_workgroupPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_workloop_t, + os_workgroup_t)>>('dispatch_workloop_set_os_workgroup'); + late final _dispatch_workloop_set_os_workgroup = + _dispatch_workloop_set_os_workgroupPtr + .asFunction(); + + int CFReadStreamGetTypeID() { + return _CFReadStreamGetTypeID(); + } + + late final _CFReadStreamGetTypeIDPtr = + _lookup>('CFReadStreamGetTypeID'); + late final _CFReadStreamGetTypeID = + _CFReadStreamGetTypeIDPtr.asFunction(); + + int CFWriteStreamGetTypeID() { + return _CFWriteStreamGetTypeID(); + } + + late final _CFWriteStreamGetTypeIDPtr = + _lookup>( + 'CFWriteStreamGetTypeID'); + late final _CFWriteStreamGetTypeID = + _CFWriteStreamGetTypeIDPtr.asFunction(); + + late final ffi.Pointer _kCFStreamPropertyDataWritten = + _lookup('kCFStreamPropertyDataWritten'); + + CFStreamPropertyKey get kCFStreamPropertyDataWritten => + _kCFStreamPropertyDataWritten.value; + + set kCFStreamPropertyDataWritten(CFStreamPropertyKey value) => + _kCFStreamPropertyDataWritten.value = value; + + CFReadStreamRef CFReadStreamCreateWithBytesNoCopy( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int length, + CFAllocatorRef bytesDeallocator, + ) { + return _CFReadStreamCreateWithBytesNoCopy( + alloc, + bytes, + length, + bytesDeallocator, + ); + } + + late final _CFReadStreamCreateWithBytesNoCopyPtr = _lookup< + ffi.NativeFunction< + CFReadStreamRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFReadStreamCreateWithBytesNoCopy'); + late final _CFReadStreamCreateWithBytesNoCopy = + _CFReadStreamCreateWithBytesNoCopyPtr.asFunction< + CFReadStreamRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + + CFWriteStreamRef CFWriteStreamCreateWithBuffer( + CFAllocatorRef alloc, + ffi.Pointer buffer, + int bufferCapacity, + ) { + return _CFWriteStreamCreateWithBuffer( + alloc, + buffer, + bufferCapacity, + ); + } + + late final _CFWriteStreamCreateWithBufferPtr = _lookup< + ffi.NativeFunction< + CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFWriteStreamCreateWithBuffer'); + late final _CFWriteStreamCreateWithBuffer = + _CFWriteStreamCreateWithBufferPtr.asFunction< + CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + + CFWriteStreamRef CFWriteStreamCreateWithAllocatedBuffers( + CFAllocatorRef alloc, + CFAllocatorRef bufferAllocator, + ) { + return _CFWriteStreamCreateWithAllocatedBuffers( + alloc, + bufferAllocator, + ); + } + + late final _CFWriteStreamCreateWithAllocatedBuffersPtr = _lookup< + ffi.NativeFunction< + CFWriteStreamRef Function(CFAllocatorRef, + CFAllocatorRef)>>('CFWriteStreamCreateWithAllocatedBuffers'); + late final _CFWriteStreamCreateWithAllocatedBuffers = + _CFWriteStreamCreateWithAllocatedBuffersPtr.asFunction< + CFWriteStreamRef Function(CFAllocatorRef, CFAllocatorRef)>(); + + CFReadStreamRef CFReadStreamCreateWithFile( + CFAllocatorRef alloc, + CFURLRef fileURL, + ) { + return _CFReadStreamCreateWithFile( + alloc, + fileURL, + ); + } + + late final _CFReadStreamCreateWithFilePtr = _lookup< + ffi.NativeFunction< + CFReadStreamRef Function( + CFAllocatorRef, CFURLRef)>>('CFReadStreamCreateWithFile'); + late final _CFReadStreamCreateWithFile = _CFReadStreamCreateWithFilePtr + .asFunction(); + + CFWriteStreamRef CFWriteStreamCreateWithFile( + CFAllocatorRef alloc, + CFURLRef fileURL, + ) { + return _CFWriteStreamCreateWithFile( + alloc, + fileURL, + ); + } + + late final _CFWriteStreamCreateWithFilePtr = _lookup< + ffi.NativeFunction< + CFWriteStreamRef Function( + CFAllocatorRef, CFURLRef)>>('CFWriteStreamCreateWithFile'); + late final _CFWriteStreamCreateWithFile = _CFWriteStreamCreateWithFilePtr + .asFunction(); + + void CFStreamCreateBoundPair( + CFAllocatorRef alloc, + ffi.Pointer readStream, + ffi.Pointer writeStream, + int transferBufferSize, + ) { + return _CFStreamCreateBoundPair( + alloc, + readStream, + writeStream, + transferBufferSize, + ); + } + + late final _CFStreamCreateBoundPairPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef, + ffi.Pointer, + ffi.Pointer, + CFIndex)>>('CFStreamCreateBoundPair'); + late final _CFStreamCreateBoundPair = _CFStreamCreateBoundPairPtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer, + ffi.Pointer, int)>(); + + late final ffi.Pointer _kCFStreamPropertyAppendToFile = + _lookup('kCFStreamPropertyAppendToFile'); + + CFStreamPropertyKey get kCFStreamPropertyAppendToFile => + _kCFStreamPropertyAppendToFile.value; + + set kCFStreamPropertyAppendToFile(CFStreamPropertyKey value) => + _kCFStreamPropertyAppendToFile.value = value; + + late final ffi.Pointer + _kCFStreamPropertyFileCurrentOffset = + _lookup('kCFStreamPropertyFileCurrentOffset'); + + CFStreamPropertyKey get kCFStreamPropertyFileCurrentOffset => + _kCFStreamPropertyFileCurrentOffset.value; + + set kCFStreamPropertyFileCurrentOffset(CFStreamPropertyKey value) => + _kCFStreamPropertyFileCurrentOffset.value = value; + + late final ffi.Pointer + _kCFStreamPropertySocketNativeHandle = + _lookup('kCFStreamPropertySocketNativeHandle'); + + CFStreamPropertyKey get kCFStreamPropertySocketNativeHandle => + _kCFStreamPropertySocketNativeHandle.value; + + set kCFStreamPropertySocketNativeHandle(CFStreamPropertyKey value) => + _kCFStreamPropertySocketNativeHandle.value = value; + + late final ffi.Pointer + _kCFStreamPropertySocketRemoteHostName = + _lookup('kCFStreamPropertySocketRemoteHostName'); + + CFStreamPropertyKey get kCFStreamPropertySocketRemoteHostName => + _kCFStreamPropertySocketRemoteHostName.value; + + set kCFStreamPropertySocketRemoteHostName(CFStreamPropertyKey value) => + _kCFStreamPropertySocketRemoteHostName.value = value; + + late final ffi.Pointer + _kCFStreamPropertySocketRemotePortNumber = + _lookup('kCFStreamPropertySocketRemotePortNumber'); + + CFStreamPropertyKey get kCFStreamPropertySocketRemotePortNumber => + _kCFStreamPropertySocketRemotePortNumber.value; + + set kCFStreamPropertySocketRemotePortNumber(CFStreamPropertyKey value) => + _kCFStreamPropertySocketRemotePortNumber.value = value; + + late final ffi.Pointer _kCFStreamErrorDomainSOCKS = + _lookup('kCFStreamErrorDomainSOCKS'); + + int get kCFStreamErrorDomainSOCKS => _kCFStreamErrorDomainSOCKS.value; + + set kCFStreamErrorDomainSOCKS(int value) => + _kCFStreamErrorDomainSOCKS.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSProxy = + _lookup('kCFStreamPropertySOCKSProxy'); + + CFStringRef get kCFStreamPropertySOCKSProxy => + _kCFStreamPropertySOCKSProxy.value; + + set kCFStreamPropertySOCKSProxy(CFStringRef value) => + _kCFStreamPropertySOCKSProxy.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSProxyHost = + _lookup('kCFStreamPropertySOCKSProxyHost'); + + CFStringRef get kCFStreamPropertySOCKSProxyHost => + _kCFStreamPropertySOCKSProxyHost.value; + + set kCFStreamPropertySOCKSProxyHost(CFStringRef value) => + _kCFStreamPropertySOCKSProxyHost.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSProxyPort = + _lookup('kCFStreamPropertySOCKSProxyPort'); + + CFStringRef get kCFStreamPropertySOCKSProxyPort => + _kCFStreamPropertySOCKSProxyPort.value; + + set kCFStreamPropertySOCKSProxyPort(CFStringRef value) => + _kCFStreamPropertySOCKSProxyPort.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSVersion = + _lookup('kCFStreamPropertySOCKSVersion'); + + CFStringRef get kCFStreamPropertySOCKSVersion => + _kCFStreamPropertySOCKSVersion.value; + + set kCFStreamPropertySOCKSVersion(CFStringRef value) => + _kCFStreamPropertySOCKSVersion.value = value; + + late final ffi.Pointer _kCFStreamSocketSOCKSVersion4 = + _lookup('kCFStreamSocketSOCKSVersion4'); + + CFStringRef get kCFStreamSocketSOCKSVersion4 => + _kCFStreamSocketSOCKSVersion4.value; + + set kCFStreamSocketSOCKSVersion4(CFStringRef value) => + _kCFStreamSocketSOCKSVersion4.value = value; + + late final ffi.Pointer _kCFStreamSocketSOCKSVersion5 = + _lookup('kCFStreamSocketSOCKSVersion5'); + + CFStringRef get kCFStreamSocketSOCKSVersion5 => + _kCFStreamSocketSOCKSVersion5.value; + + set kCFStreamSocketSOCKSVersion5(CFStringRef value) => + _kCFStreamSocketSOCKSVersion5.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSUser = + _lookup('kCFStreamPropertySOCKSUser'); + + CFStringRef get kCFStreamPropertySOCKSUser => + _kCFStreamPropertySOCKSUser.value; + + set kCFStreamPropertySOCKSUser(CFStringRef value) => + _kCFStreamPropertySOCKSUser.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSPassword = + _lookup('kCFStreamPropertySOCKSPassword'); + + CFStringRef get kCFStreamPropertySOCKSPassword => + _kCFStreamPropertySOCKSPassword.value; + + set kCFStreamPropertySOCKSPassword(CFStringRef value) => + _kCFStreamPropertySOCKSPassword.value = value; + + late final ffi.Pointer _kCFStreamErrorDomainSSL = + _lookup('kCFStreamErrorDomainSSL'); + + int get kCFStreamErrorDomainSSL => _kCFStreamErrorDomainSSL.value; + + set kCFStreamErrorDomainSSL(int value) => + _kCFStreamErrorDomainSSL.value = value; + + late final ffi.Pointer _kCFStreamPropertySocketSecurityLevel = + _lookup('kCFStreamPropertySocketSecurityLevel'); + + CFStringRef get kCFStreamPropertySocketSecurityLevel => + _kCFStreamPropertySocketSecurityLevel.value; + + set kCFStreamPropertySocketSecurityLevel(CFStringRef value) => + _kCFStreamPropertySocketSecurityLevel.value = value; + + late final ffi.Pointer _kCFStreamSocketSecurityLevelNone = + _lookup('kCFStreamSocketSecurityLevelNone'); + + CFStringRef get kCFStreamSocketSecurityLevelNone => + _kCFStreamSocketSecurityLevelNone.value; + + set kCFStreamSocketSecurityLevelNone(CFStringRef value) => + _kCFStreamSocketSecurityLevelNone.value = value; + + late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv2 = + _lookup('kCFStreamSocketSecurityLevelSSLv2'); + + CFStringRef get kCFStreamSocketSecurityLevelSSLv2 => + _kCFStreamSocketSecurityLevelSSLv2.value; + + set kCFStreamSocketSecurityLevelSSLv2(CFStringRef value) => + _kCFStreamSocketSecurityLevelSSLv2.value = value; + + late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv3 = + _lookup('kCFStreamSocketSecurityLevelSSLv3'); + + CFStringRef get kCFStreamSocketSecurityLevelSSLv3 => + _kCFStreamSocketSecurityLevelSSLv3.value; + + set kCFStreamSocketSecurityLevelSSLv3(CFStringRef value) => + _kCFStreamSocketSecurityLevelSSLv3.value = value; + + late final ffi.Pointer _kCFStreamSocketSecurityLevelTLSv1 = + _lookup('kCFStreamSocketSecurityLevelTLSv1'); + + CFStringRef get kCFStreamSocketSecurityLevelTLSv1 => + _kCFStreamSocketSecurityLevelTLSv1.value; + + set kCFStreamSocketSecurityLevelTLSv1(CFStringRef value) => + _kCFStreamSocketSecurityLevelTLSv1.value = value; + + late final ffi.Pointer + _kCFStreamSocketSecurityLevelNegotiatedSSL = + _lookup('kCFStreamSocketSecurityLevelNegotiatedSSL'); + + CFStringRef get kCFStreamSocketSecurityLevelNegotiatedSSL => + _kCFStreamSocketSecurityLevelNegotiatedSSL.value; + + set kCFStreamSocketSecurityLevelNegotiatedSSL(CFStringRef value) => + _kCFStreamSocketSecurityLevelNegotiatedSSL.value = value; + + late final ffi.Pointer + _kCFStreamPropertyShouldCloseNativeSocket = + _lookup('kCFStreamPropertyShouldCloseNativeSocket'); + + CFStringRef get kCFStreamPropertyShouldCloseNativeSocket => + _kCFStreamPropertyShouldCloseNativeSocket.value; + + set kCFStreamPropertyShouldCloseNativeSocket(CFStringRef value) => + _kCFStreamPropertyShouldCloseNativeSocket.value = value; + + void CFStreamCreatePairWithSocket( + CFAllocatorRef alloc, + int sock, + ffi.Pointer readStream, + ffi.Pointer writeStream, + ) { + return _CFStreamCreatePairWithSocket( + alloc, + sock, + readStream, + writeStream, + ); + } + + late final _CFStreamCreatePairWithSocketPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef, + CFSocketNativeHandle, + ffi.Pointer, + ffi.Pointer)>>('CFStreamCreatePairWithSocket'); + late final _CFStreamCreatePairWithSocket = + _CFStreamCreatePairWithSocketPtr.asFunction< + void Function(CFAllocatorRef, int, ffi.Pointer, + ffi.Pointer)>(); + + void CFStreamCreatePairWithSocketToHost( + CFAllocatorRef alloc, + CFStringRef host, + int port, + ffi.Pointer readStream, + ffi.Pointer writeStream, + ) { + return _CFStreamCreatePairWithSocketToHost( + alloc, + host, + port, + readStream, + writeStream, + ); + } + + late final _CFStreamCreatePairWithSocketToHostPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef, + CFStringRef, + UInt32, + ffi.Pointer, + ffi.Pointer)>>( + 'CFStreamCreatePairWithSocketToHost'); + late final _CFStreamCreatePairWithSocketToHost = + _CFStreamCreatePairWithSocketToHostPtr.asFunction< + void Function(CFAllocatorRef, CFStringRef, int, + ffi.Pointer, ffi.Pointer)>(); + + void CFStreamCreatePairWithPeerSocketSignature( + CFAllocatorRef alloc, + ffi.Pointer signature, + ffi.Pointer readStream, + ffi.Pointer writeStream, + ) { + return _CFStreamCreatePairWithPeerSocketSignature( + alloc, + signature, + readStream, + writeStream, + ); + } + + late final _CFStreamCreatePairWithPeerSocketSignaturePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'CFStreamCreatePairWithPeerSocketSignature'); + late final _CFStreamCreatePairWithPeerSocketSignature = + _CFStreamCreatePairWithPeerSocketSignaturePtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + int CFReadStreamGetStatus( + CFReadStreamRef stream, + ) { + return _CFReadStreamGetStatus( + stream, + ); + } + + late final _CFReadStreamGetStatusPtr = + _lookup>( + 'CFReadStreamGetStatus'); + late final _CFReadStreamGetStatus = + _CFReadStreamGetStatusPtr.asFunction(); + + int CFWriteStreamGetStatus( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamGetStatus( + stream, + ); + } + + late final _CFWriteStreamGetStatusPtr = + _lookup>( + 'CFWriteStreamGetStatus'); + late final _CFWriteStreamGetStatus = + _CFWriteStreamGetStatusPtr.asFunction(); + + CFErrorRef CFReadStreamCopyError( + CFReadStreamRef stream, + ) { + return _CFReadStreamCopyError( + stream, + ); + } + + late final _CFReadStreamCopyErrorPtr = + _lookup>( + 'CFReadStreamCopyError'); + late final _CFReadStreamCopyError = _CFReadStreamCopyErrorPtr.asFunction< + CFErrorRef Function(CFReadStreamRef)>(); + + CFErrorRef CFWriteStreamCopyError( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamCopyError( + stream, + ); + } + + late final _CFWriteStreamCopyErrorPtr = + _lookup>( + 'CFWriteStreamCopyError'); + late final _CFWriteStreamCopyError = _CFWriteStreamCopyErrorPtr.asFunction< + CFErrorRef Function(CFWriteStreamRef)>(); + + int CFReadStreamOpen( + CFReadStreamRef stream, + ) { + return _CFReadStreamOpen( + stream, + ); + } + + late final _CFReadStreamOpenPtr = + _lookup>( + 'CFReadStreamOpen'); + late final _CFReadStreamOpen = + _CFReadStreamOpenPtr.asFunction(); + + int CFWriteStreamOpen( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamOpen( + stream, + ); + } + + late final _CFWriteStreamOpenPtr = + _lookup>( + 'CFWriteStreamOpen'); + late final _CFWriteStreamOpen = + _CFWriteStreamOpenPtr.asFunction(); + + void CFReadStreamClose( + CFReadStreamRef stream, + ) { + return _CFReadStreamClose( + stream, + ); + } + + late final _CFReadStreamClosePtr = + _lookup>( + 'CFReadStreamClose'); + late final _CFReadStreamClose = + _CFReadStreamClosePtr.asFunction(); + + void CFWriteStreamClose( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamClose( + stream, + ); + } + + late final _CFWriteStreamClosePtr = + _lookup>( + 'CFWriteStreamClose'); + late final _CFWriteStreamClose = + _CFWriteStreamClosePtr.asFunction(); + + int CFReadStreamHasBytesAvailable( + CFReadStreamRef stream, + ) { + return _CFReadStreamHasBytesAvailable( + stream, + ); + } + + late final _CFReadStreamHasBytesAvailablePtr = + _lookup>( + 'CFReadStreamHasBytesAvailable'); + late final _CFReadStreamHasBytesAvailable = _CFReadStreamHasBytesAvailablePtr + .asFunction(); + + int CFReadStreamRead( + CFReadStreamRef stream, + ffi.Pointer buffer, + int bufferLength, + ) { + return _CFReadStreamRead( + stream, + buffer, + bufferLength, + ); + } + + late final _CFReadStreamReadPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFReadStreamRef, ffi.Pointer, + CFIndex)>>('CFReadStreamRead'); + late final _CFReadStreamRead = _CFReadStreamReadPtr.asFunction< + int Function(CFReadStreamRef, ffi.Pointer, int)>(); + + ffi.Pointer CFReadStreamGetBuffer( + CFReadStreamRef stream, + int maxBytesToRead, + ffi.Pointer numBytesRead, + ) { + return _CFReadStreamGetBuffer( + stream, + maxBytesToRead, + numBytesRead, + ); + } + + late final _CFReadStreamGetBufferPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(CFReadStreamRef, CFIndex, + ffi.Pointer)>>('CFReadStreamGetBuffer'); + late final _CFReadStreamGetBuffer = _CFReadStreamGetBufferPtr.asFunction< + ffi.Pointer Function( + CFReadStreamRef, int, ffi.Pointer)>(); + + int CFWriteStreamCanAcceptBytes( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamCanAcceptBytes( + stream, + ); + } + + late final _CFWriteStreamCanAcceptBytesPtr = + _lookup>( + 'CFWriteStreamCanAcceptBytes'); + late final _CFWriteStreamCanAcceptBytes = _CFWriteStreamCanAcceptBytesPtr + .asFunction(); + + int CFWriteStreamWrite( + CFWriteStreamRef stream, + ffi.Pointer buffer, + int bufferLength, + ) { + return _CFWriteStreamWrite( + stream, + buffer, + bufferLength, + ); + } + + late final _CFWriteStreamWritePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFWriteStreamRef, ffi.Pointer, + CFIndex)>>('CFWriteStreamWrite'); + late final _CFWriteStreamWrite = _CFWriteStreamWritePtr.asFunction< + int Function(CFWriteStreamRef, ffi.Pointer, int)>(); + + CFTypeRef CFReadStreamCopyProperty( + CFReadStreamRef stream, + CFStreamPropertyKey propertyName, + ) { + return _CFReadStreamCopyProperty( + stream, + propertyName, + ); + } + + late final _CFReadStreamCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFReadStreamRef, + CFStreamPropertyKey)>>('CFReadStreamCopyProperty'); + late final _CFReadStreamCopyProperty = _CFReadStreamCopyPropertyPtr + .asFunction(); + + CFTypeRef CFWriteStreamCopyProperty( + CFWriteStreamRef stream, + CFStreamPropertyKey propertyName, + ) { + return _CFWriteStreamCopyProperty( + stream, + propertyName, + ); + } + + late final _CFWriteStreamCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFWriteStreamRef, + CFStreamPropertyKey)>>('CFWriteStreamCopyProperty'); + late final _CFWriteStreamCopyProperty = _CFWriteStreamCopyPropertyPtr + .asFunction(); + + int CFReadStreamSetProperty( + CFReadStreamRef stream, + CFStreamPropertyKey propertyName, + CFTypeRef propertyValue, + ) { + return _CFReadStreamSetProperty( + stream, + propertyName, + propertyValue, + ); + } + + late final _CFReadStreamSetPropertyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFReadStreamRef, CFStreamPropertyKey, + CFTypeRef)>>('CFReadStreamSetProperty'); + late final _CFReadStreamSetProperty = _CFReadStreamSetPropertyPtr.asFunction< + int Function(CFReadStreamRef, CFStreamPropertyKey, CFTypeRef)>(); + + int CFWriteStreamSetProperty( + CFWriteStreamRef stream, + CFStreamPropertyKey propertyName, + CFTypeRef propertyValue, + ) { + return _CFWriteStreamSetProperty( + stream, + propertyName, + propertyValue, + ); + } + + late final _CFWriteStreamSetPropertyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFWriteStreamRef, CFStreamPropertyKey, + CFTypeRef)>>('CFWriteStreamSetProperty'); + late final _CFWriteStreamSetProperty = + _CFWriteStreamSetPropertyPtr.asFunction< + int Function(CFWriteStreamRef, CFStreamPropertyKey, CFTypeRef)>(); + + int CFReadStreamSetClient( + CFReadStreamRef stream, + int streamEvents, + CFReadStreamClientCallBack clientCB, + ffi.Pointer clientContext, + ) { + return _CFReadStreamSetClient( + stream, + streamEvents, + clientCB, + clientContext, + ); + } + + late final _CFReadStreamSetClientPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFReadStreamRef, + CFOptionFlags, + CFReadStreamClientCallBack, + ffi.Pointer)>>('CFReadStreamSetClient'); + late final _CFReadStreamSetClient = _CFReadStreamSetClientPtr.asFunction< + int Function(CFReadStreamRef, int, CFReadStreamClientCallBack, + ffi.Pointer)>(); + + int CFWriteStreamSetClient( + CFWriteStreamRef stream, + int streamEvents, + CFWriteStreamClientCallBack clientCB, + ffi.Pointer clientContext, + ) { + return _CFWriteStreamSetClient( + stream, + streamEvents, + clientCB, + clientContext, + ); + } + + late final _CFWriteStreamSetClientPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFWriteStreamRef, + CFOptionFlags, + CFWriteStreamClientCallBack, + ffi.Pointer)>>('CFWriteStreamSetClient'); + late final _CFWriteStreamSetClient = _CFWriteStreamSetClientPtr.asFunction< + int Function(CFWriteStreamRef, int, CFWriteStreamClientCallBack, + ffi.Pointer)>(); + + void CFReadStreamScheduleWithRunLoop( + CFReadStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, + ) { + return _CFReadStreamScheduleWithRunLoop( + stream, + runLoop, + runLoopMode, + ); + } + + late final _CFReadStreamScheduleWithRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFReadStreamScheduleWithRunLoop'); + late final _CFReadStreamScheduleWithRunLoop = + _CFReadStreamScheduleWithRunLoopPtr.asFunction< + void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + + void CFWriteStreamScheduleWithRunLoop( + CFWriteStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, + ) { + return _CFWriteStreamScheduleWithRunLoop( + stream, + runLoop, + runLoopMode, + ); + } + + late final _CFWriteStreamScheduleWithRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFWriteStreamScheduleWithRunLoop'); + late final _CFWriteStreamScheduleWithRunLoop = + _CFWriteStreamScheduleWithRunLoopPtr.asFunction< + void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + + void CFReadStreamUnscheduleFromRunLoop( + CFReadStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, + ) { + return _CFReadStreamUnscheduleFromRunLoop( + stream, + runLoop, + runLoopMode, + ); + } + + late final _CFReadStreamUnscheduleFromRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFReadStreamUnscheduleFromRunLoop'); + late final _CFReadStreamUnscheduleFromRunLoop = + _CFReadStreamUnscheduleFromRunLoopPtr.asFunction< + void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + + void CFWriteStreamUnscheduleFromRunLoop( + CFWriteStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, + ) { + return _CFWriteStreamUnscheduleFromRunLoop( + stream, + runLoop, + runLoopMode, + ); + } + + late final _CFWriteStreamUnscheduleFromRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFWriteStreamUnscheduleFromRunLoop'); + late final _CFWriteStreamUnscheduleFromRunLoop = + _CFWriteStreamUnscheduleFromRunLoopPtr.asFunction< + void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + + void CFReadStreamSetDispatchQueue( + CFReadStreamRef stream, + dispatch_queue_t q, + ) { + return _CFReadStreamSetDispatchQueue( + stream, + q, + ); + } + + late final _CFReadStreamSetDispatchQueuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, + dispatch_queue_t)>>('CFReadStreamSetDispatchQueue'); + late final _CFReadStreamSetDispatchQueue = _CFReadStreamSetDispatchQueuePtr + .asFunction(); + + void CFWriteStreamSetDispatchQueue( + CFWriteStreamRef stream, + dispatch_queue_t q, + ) { + return _CFWriteStreamSetDispatchQueue( + stream, + q, + ); + } + + late final _CFWriteStreamSetDispatchQueuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFWriteStreamRef, + dispatch_queue_t)>>('CFWriteStreamSetDispatchQueue'); + late final _CFWriteStreamSetDispatchQueue = _CFWriteStreamSetDispatchQueuePtr + .asFunction(); + + dispatch_queue_t CFReadStreamCopyDispatchQueue( + CFReadStreamRef stream, + ) { + return _CFReadStreamCopyDispatchQueue( + stream, + ); + } + + late final _CFReadStreamCopyDispatchQueuePtr = + _lookup>( + 'CFReadStreamCopyDispatchQueue'); + late final _CFReadStreamCopyDispatchQueue = _CFReadStreamCopyDispatchQueuePtr + .asFunction(); + + dispatch_queue_t CFWriteStreamCopyDispatchQueue( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamCopyDispatchQueue( + stream, + ); + } + + late final _CFWriteStreamCopyDispatchQueuePtr = + _lookup>( + 'CFWriteStreamCopyDispatchQueue'); + late final _CFWriteStreamCopyDispatchQueue = + _CFWriteStreamCopyDispatchQueuePtr.asFunction< + dispatch_queue_t Function(CFWriteStreamRef)>(); + + CFStreamError CFReadStreamGetError( + CFReadStreamRef stream, + ) { + return _CFReadStreamGetError( + stream, + ); + } + + late final _CFReadStreamGetErrorPtr = + _lookup>( + 'CFReadStreamGetError'); + late final _CFReadStreamGetError = _CFReadStreamGetErrorPtr.asFunction< + CFStreamError Function(CFReadStreamRef)>(); + + CFStreamError CFWriteStreamGetError( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamGetError( + stream, + ); + } + + late final _CFWriteStreamGetErrorPtr = + _lookup>( + 'CFWriteStreamGetError'); + late final _CFWriteStreamGetError = _CFWriteStreamGetErrorPtr.asFunction< + CFStreamError Function(CFWriteStreamRef)>(); + + CFPropertyListRef CFPropertyListCreateFromXMLData( + CFAllocatorRef allocator, + CFDataRef xmlData, + int mutabilityOption, + ffi.Pointer errorString, + ) { + return _CFPropertyListCreateFromXMLData( + allocator, + xmlData, + mutabilityOption, + errorString, + ); + } + + late final _CFPropertyListCreateFromXMLDataPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function(CFAllocatorRef, CFDataRef, CFOptionFlags, + ffi.Pointer)>>('CFPropertyListCreateFromXMLData'); + late final _CFPropertyListCreateFromXMLData = + _CFPropertyListCreateFromXMLDataPtr.asFunction< + CFPropertyListRef Function( + CFAllocatorRef, CFDataRef, int, ffi.Pointer)>(); + + CFDataRef CFPropertyListCreateXMLData( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, + ) { + return _CFPropertyListCreateXMLData( + allocator, + propertyList, + ); + } + + late final _CFPropertyListCreateXMLDataPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, + CFPropertyListRef)>>('CFPropertyListCreateXMLData'); + late final _CFPropertyListCreateXMLData = _CFPropertyListCreateXMLDataPtr + .asFunction(); + + CFPropertyListRef CFPropertyListCreateDeepCopy( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, + int mutabilityOption, + ) { + return _CFPropertyListCreateDeepCopy( + allocator, + propertyList, + mutabilityOption, + ); + } + + late final _CFPropertyListCreateDeepCopyPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, + CFOptionFlags)>>('CFPropertyListCreateDeepCopy'); + late final _CFPropertyListCreateDeepCopy = + _CFPropertyListCreateDeepCopyPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, int)>(); + + int CFPropertyListIsValid( + CFPropertyListRef plist, + int format, + ) { + return _CFPropertyListIsValid( + plist, + format, + ); + } + + late final _CFPropertyListIsValidPtr = _lookup< + ffi.NativeFunction>( + 'CFPropertyListIsValid'); + late final _CFPropertyListIsValid = _CFPropertyListIsValidPtr.asFunction< + int Function(CFPropertyListRef, int)>(); + + int CFPropertyListWriteToStream( + CFPropertyListRef propertyList, + CFWriteStreamRef stream, + int format, + ffi.Pointer errorString, + ) { + return _CFPropertyListWriteToStream( + propertyList, + stream, + format, + errorString, + ); + } + + late final _CFPropertyListWriteToStreamPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFPropertyListRef, CFWriteStreamRef, ffi.Int32, + ffi.Pointer)>>('CFPropertyListWriteToStream'); + late final _CFPropertyListWriteToStream = + _CFPropertyListWriteToStreamPtr.asFunction< + int Function(CFPropertyListRef, CFWriteStreamRef, int, + ffi.Pointer)>(); + + CFPropertyListRef CFPropertyListCreateFromStream( + CFAllocatorRef allocator, + CFReadStreamRef stream, + int streamLength, + int mutabilityOption, + ffi.Pointer format, + ffi.Pointer errorString, + ) { + return _CFPropertyListCreateFromStream( + allocator, + stream, + streamLength, + mutabilityOption, + format, + errorString, + ); + } + + late final _CFPropertyListCreateFromStreamPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFAllocatorRef, + CFReadStreamRef, + CFIndex, + CFOptionFlags, + ffi.Pointer, + ffi.Pointer)>>('CFPropertyListCreateFromStream'); + late final _CFPropertyListCreateFromStream = + _CFPropertyListCreateFromStreamPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, + ffi.Pointer, ffi.Pointer)>(); + + CFPropertyListRef CFPropertyListCreateWithData( + CFAllocatorRef allocator, + CFDataRef data, + int options, + ffi.Pointer format, + ffi.Pointer error, + ) { + return _CFPropertyListCreateWithData( + allocator, + data, + options, + format, + error, + ); + } + + late final _CFPropertyListCreateWithDataPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFAllocatorRef, + CFDataRef, + CFOptionFlags, + ffi.Pointer, + ffi.Pointer)>>('CFPropertyListCreateWithData'); + late final _CFPropertyListCreateWithData = + _CFPropertyListCreateWithDataPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFDataRef, int, + ffi.Pointer, ffi.Pointer)>(); + + CFPropertyListRef CFPropertyListCreateWithStream( + CFAllocatorRef allocator, + CFReadStreamRef stream, + int streamLength, + int options, + ffi.Pointer format, + ffi.Pointer error, + ) { + return _CFPropertyListCreateWithStream( + allocator, + stream, + streamLength, + options, + format, + error, + ); + } + + late final _CFPropertyListCreateWithStreamPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFAllocatorRef, + CFReadStreamRef, + CFIndex, + CFOptionFlags, + ffi.Pointer, + ffi.Pointer)>>('CFPropertyListCreateWithStream'); + late final _CFPropertyListCreateWithStream = + _CFPropertyListCreateWithStreamPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, + ffi.Pointer, ffi.Pointer)>(); + + int CFPropertyListWrite( + CFPropertyListRef propertyList, + CFWriteStreamRef stream, + int format, + int options, + ffi.Pointer error, + ) { + return _CFPropertyListWrite( + propertyList, + stream, + format, + options, + error, + ); + } + + late final _CFPropertyListWritePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFPropertyListRef, CFWriteStreamRef, ffi.Int32, + CFOptionFlags, ffi.Pointer)>>('CFPropertyListWrite'); + late final _CFPropertyListWrite = _CFPropertyListWritePtr.asFunction< + int Function(CFPropertyListRef, CFWriteStreamRef, int, int, + ffi.Pointer)>(); + + CFDataRef CFPropertyListCreateData( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, + int format, + int options, + ffi.Pointer error, + ) { + return _CFPropertyListCreateData( + allocator, + propertyList, + format, + options, + error, + ); + } + + late final _CFPropertyListCreateDataPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function( + CFAllocatorRef, + CFPropertyListRef, + ffi.Int32, + CFOptionFlags, + ffi.Pointer)>>('CFPropertyListCreateData'); + late final _CFPropertyListCreateData = + _CFPropertyListCreateDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFPropertyListRef, int, int, + ffi.Pointer)>(); + + late final ffi.Pointer _kCFTypeSetCallBacks = + _lookup('kCFTypeSetCallBacks'); + + CFSetCallBacks get kCFTypeSetCallBacks => _kCFTypeSetCallBacks.ref; + + late final ffi.Pointer _kCFCopyStringSetCallBacks = + _lookup('kCFCopyStringSetCallBacks'); + + CFSetCallBacks get kCFCopyStringSetCallBacks => + _kCFCopyStringSetCallBacks.ref; + + int CFSetGetTypeID() { + return _CFSetGetTypeID(); + } + + late final _CFSetGetTypeIDPtr = + _lookup>('CFSetGetTypeID'); + late final _CFSetGetTypeID = _CFSetGetTypeIDPtr.asFunction(); + + CFSetRef CFSetCreate( + CFAllocatorRef allocator, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, + ) { + return _CFSetCreate( + allocator, + values, + numValues, + callBacks, + ); + } + + late final _CFSetCreatePtr = _lookup< + ffi.NativeFunction< + CFSetRef Function(CFAllocatorRef, ffi.Pointer>, + CFIndex, ffi.Pointer)>>('CFSetCreate'); + late final _CFSetCreate = _CFSetCreatePtr.asFunction< + CFSetRef Function(CFAllocatorRef, ffi.Pointer>, int, + ffi.Pointer)>(); + + CFSetRef CFSetCreateCopy( + CFAllocatorRef allocator, + CFSetRef theSet, + ) { + return _CFSetCreateCopy( + allocator, + theSet, + ); + } + + late final _CFSetCreateCopyPtr = + _lookup>( + 'CFSetCreateCopy'); + late final _CFSetCreateCopy = _CFSetCreateCopyPtr.asFunction< + CFSetRef Function(CFAllocatorRef, CFSetRef)>(); + + CFMutableSetRef CFSetCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, + ) { + return _CFSetCreateMutable( + allocator, + capacity, + callBacks, + ); + } + + late final _CFSetCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableSetRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFSetCreateMutable'); + late final _CFSetCreateMutable = _CFSetCreateMutablePtr.asFunction< + CFMutableSetRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); + + CFMutableSetRef CFSetCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFSetRef theSet, + ) { + return _CFSetCreateMutableCopy( + allocator, + capacity, + theSet, + ); + } + + late final _CFSetCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableSetRef Function( + CFAllocatorRef, CFIndex, CFSetRef)>>('CFSetCreateMutableCopy'); + late final _CFSetCreateMutableCopy = _CFSetCreateMutableCopyPtr.asFunction< + CFMutableSetRef Function(CFAllocatorRef, int, CFSetRef)>(); + + int CFSetGetCount( + CFSetRef theSet, + ) { + return _CFSetGetCount( + theSet, + ); + } + + late final _CFSetGetCountPtr = + _lookup>('CFSetGetCount'); + late final _CFSetGetCount = + _CFSetGetCountPtr.asFunction(); + + int CFSetGetCountOfValue( + CFSetRef theSet, + ffi.Pointer value, + ) { + return _CFSetGetCountOfValue( + theSet, + value, + ); + } + + late final _CFSetGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFSetRef, ffi.Pointer)>>('CFSetGetCountOfValue'); + late final _CFSetGetCountOfValue = _CFSetGetCountOfValuePtr.asFunction< + int Function(CFSetRef, ffi.Pointer)>(); + + int CFSetContainsValue( + CFSetRef theSet, + ffi.Pointer value, + ) { + return _CFSetContainsValue( + theSet, + value, + ); + } + + late final _CFSetContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFSetRef, ffi.Pointer)>>('CFSetContainsValue'); + late final _CFSetContainsValue = _CFSetContainsValuePtr.asFunction< + int Function(CFSetRef, ffi.Pointer)>(); + + ffi.Pointer CFSetGetValue( + CFSetRef theSet, + ffi.Pointer value, + ) { + return _CFSetGetValue( + theSet, + value, + ); + } + + late final _CFSetGetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFSetRef, ffi.Pointer)>>('CFSetGetValue'); + late final _CFSetGetValue = _CFSetGetValuePtr.asFunction< + ffi.Pointer Function(CFSetRef, ffi.Pointer)>(); + + int CFSetGetValueIfPresent( + CFSetRef theSet, + ffi.Pointer candidate, + ffi.Pointer> value, + ) { + return _CFSetGetValueIfPresent( + theSet, + candidate, + value, + ); + } + + late final _CFSetGetValueIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFSetRef, ffi.Pointer, + ffi.Pointer>)>>('CFSetGetValueIfPresent'); + late final _CFSetGetValueIfPresent = _CFSetGetValueIfPresentPtr.asFunction< + int Function(CFSetRef, ffi.Pointer, + ffi.Pointer>)>(); + + void CFSetGetValues( + CFSetRef theSet, + ffi.Pointer> values, + ) { + return _CFSetGetValues( + theSet, + values, + ); + } + + late final _CFSetGetValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFSetRef, ffi.Pointer>)>>('CFSetGetValues'); + late final _CFSetGetValues = _CFSetGetValuesPtr.asFunction< + void Function(CFSetRef, ffi.Pointer>)>(); + + void CFSetApplyFunction( + CFSetRef theSet, + CFSetApplierFunction applier, + ffi.Pointer context, + ) { + return _CFSetApplyFunction( + theSet, + applier, + context, + ); + } + + late final _CFSetApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFSetRef, CFSetApplierFunction, + ffi.Pointer)>>('CFSetApplyFunction'); + late final _CFSetApplyFunction = _CFSetApplyFunctionPtr.asFunction< + void Function(CFSetRef, CFSetApplierFunction, ffi.Pointer)>(); + + void CFSetAddValue( + CFMutableSetRef theSet, + ffi.Pointer value, + ) { + return _CFSetAddValue( + theSet, + value, + ); + } + + late final _CFSetAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetAddValue'); + late final _CFSetAddValue = _CFSetAddValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); + + void CFSetReplaceValue( + CFMutableSetRef theSet, + ffi.Pointer value, + ) { + return _CFSetReplaceValue( + theSet, + value, + ); + } + + late final _CFSetReplaceValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetReplaceValue'); + late final _CFSetReplaceValue = _CFSetReplaceValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); + + void CFSetSetValue( + CFMutableSetRef theSet, + ffi.Pointer value, + ) { + return _CFSetSetValue( + theSet, + value, + ); + } + + late final _CFSetSetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetSetValue'); + late final _CFSetSetValue = _CFSetSetValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); + + void CFSetRemoveValue( + CFMutableSetRef theSet, + ffi.Pointer value, + ) { + return _CFSetRemoveValue( + theSet, + value, + ); + } + + late final _CFSetRemoveValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetRemoveValue'); + late final _CFSetRemoveValue = _CFSetRemoveValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); + + void CFSetRemoveAllValues( + CFMutableSetRef theSet, + ) { + return _CFSetRemoveAllValues( + theSet, + ); + } + + late final _CFSetRemoveAllValuesPtr = + _lookup>( + 'CFSetRemoveAllValues'); + late final _CFSetRemoveAllValues = + _CFSetRemoveAllValuesPtr.asFunction(); + + int CFTreeGetTypeID() { + return _CFTreeGetTypeID(); + } + + late final _CFTreeGetTypeIDPtr = + _lookup>('CFTreeGetTypeID'); + late final _CFTreeGetTypeID = + _CFTreeGetTypeIDPtr.asFunction(); + + CFTreeRef CFTreeCreate( + CFAllocatorRef allocator, + ffi.Pointer context, + ) { + return _CFTreeCreate( + allocator, + context, + ); + } + + late final _CFTreeCreatePtr = _lookup< + ffi.NativeFunction< + CFTreeRef Function( + CFAllocatorRef, ffi.Pointer)>>('CFTreeCreate'); + late final _CFTreeCreate = _CFTreeCreatePtr.asFunction< + CFTreeRef Function(CFAllocatorRef, ffi.Pointer)>(); + + CFTreeRef CFTreeGetParent( + CFTreeRef tree, + ) { + return _CFTreeGetParent( + tree, + ); + } + + late final _CFTreeGetParentPtr = + _lookup>( + 'CFTreeGetParent'); + late final _CFTreeGetParent = + _CFTreeGetParentPtr.asFunction(); + + CFTreeRef CFTreeGetNextSibling( + CFTreeRef tree, + ) { + return _CFTreeGetNextSibling( + tree, + ); + } + + late final _CFTreeGetNextSiblingPtr = + _lookup>( + 'CFTreeGetNextSibling'); + late final _CFTreeGetNextSibling = + _CFTreeGetNextSiblingPtr.asFunction(); + + CFTreeRef CFTreeGetFirstChild( + CFTreeRef tree, + ) { + return _CFTreeGetFirstChild( + tree, + ); + } + + late final _CFTreeGetFirstChildPtr = + _lookup>( + 'CFTreeGetFirstChild'); + late final _CFTreeGetFirstChild = + _CFTreeGetFirstChildPtr.asFunction(); + + void CFTreeGetContext( + CFTreeRef tree, + ffi.Pointer context, + ) { + return _CFTreeGetContext( + tree, + context, + ); + } + + late final _CFTreeGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeGetContext'); + late final _CFTreeGetContext = _CFTreeGetContextPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); + + int CFTreeGetChildCount( + CFTreeRef tree, + ) { + return _CFTreeGetChildCount( + tree, + ); + } + + late final _CFTreeGetChildCountPtr = + _lookup>( + 'CFTreeGetChildCount'); + late final _CFTreeGetChildCount = + _CFTreeGetChildCountPtr.asFunction(); + + CFTreeRef CFTreeGetChildAtIndex( + CFTreeRef tree, + int idx, + ) { + return _CFTreeGetChildAtIndex( + tree, + idx, + ); + } + + late final _CFTreeGetChildAtIndexPtr = + _lookup>( + 'CFTreeGetChildAtIndex'); + late final _CFTreeGetChildAtIndex = _CFTreeGetChildAtIndexPtr.asFunction< + CFTreeRef Function(CFTreeRef, int)>(); + + void CFTreeGetChildren( + CFTreeRef tree, + ffi.Pointer children, + ) { + return _CFTreeGetChildren( + tree, + children, + ); + } + + late final _CFTreeGetChildrenPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeGetChildren'); + late final _CFTreeGetChildren = _CFTreeGetChildrenPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); + + void CFTreeApplyFunctionToChildren( + CFTreeRef tree, + CFTreeApplierFunction applier, + ffi.Pointer context, + ) { + return _CFTreeApplyFunctionToChildren( + tree, + applier, + context, + ); + } + + late final _CFTreeApplyFunctionToChildrenPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFTreeRef, CFTreeApplierFunction, + ffi.Pointer)>>('CFTreeApplyFunctionToChildren'); + late final _CFTreeApplyFunctionToChildren = + _CFTreeApplyFunctionToChildrenPtr.asFunction< + void Function( + CFTreeRef, CFTreeApplierFunction, ffi.Pointer)>(); + + CFTreeRef CFTreeFindRoot( + CFTreeRef tree, + ) { + return _CFTreeFindRoot( + tree, + ); + } + + late final _CFTreeFindRootPtr = + _lookup>( + 'CFTreeFindRoot'); + late final _CFTreeFindRoot = + _CFTreeFindRootPtr.asFunction(); + + void CFTreeSetContext( + CFTreeRef tree, + ffi.Pointer context, + ) { + return _CFTreeSetContext( + tree, + context, + ); + } + + late final _CFTreeSetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeSetContext'); + late final _CFTreeSetContext = _CFTreeSetContextPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); + + void CFTreePrependChild( + CFTreeRef tree, + CFTreeRef newChild, + ) { + return _CFTreePrependChild( + tree, + newChild, + ); + } + + late final _CFTreePrependChildPtr = + _lookup>( + 'CFTreePrependChild'); + late final _CFTreePrependChild = + _CFTreePrependChildPtr.asFunction(); + + void CFTreeAppendChild( + CFTreeRef tree, + CFTreeRef newChild, + ) { + return _CFTreeAppendChild( + tree, + newChild, + ); + } + + late final _CFTreeAppendChildPtr = + _lookup>( + 'CFTreeAppendChild'); + late final _CFTreeAppendChild = + _CFTreeAppendChildPtr.asFunction(); + + void CFTreeInsertSibling( + CFTreeRef tree, + CFTreeRef newSibling, + ) { + return _CFTreeInsertSibling( + tree, + newSibling, + ); + } + + late final _CFTreeInsertSiblingPtr = + _lookup>( + 'CFTreeInsertSibling'); + late final _CFTreeInsertSibling = + _CFTreeInsertSiblingPtr.asFunction(); + + void CFTreeRemove( + CFTreeRef tree, + ) { + return _CFTreeRemove( + tree, + ); + } + + late final _CFTreeRemovePtr = + _lookup>('CFTreeRemove'); + late final _CFTreeRemove = + _CFTreeRemovePtr.asFunction(); + + void CFTreeRemoveAllChildren( + CFTreeRef tree, + ) { + return _CFTreeRemoveAllChildren( + tree, + ); + } + + late final _CFTreeRemoveAllChildrenPtr = + _lookup>( + 'CFTreeRemoveAllChildren'); + late final _CFTreeRemoveAllChildren = + _CFTreeRemoveAllChildrenPtr.asFunction(); + + void CFTreeSortChildren( + CFTreeRef tree, + CFComparatorFunction comparator, + ffi.Pointer context, + ) { + return _CFTreeSortChildren( + tree, + comparator, + context, + ); + } + + late final _CFTreeSortChildrenPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFTreeRef, CFComparatorFunction, + ffi.Pointer)>>('CFTreeSortChildren'); + late final _CFTreeSortChildren = _CFTreeSortChildrenPtr.asFunction< + void Function(CFTreeRef, CFComparatorFunction, ffi.Pointer)>(); + + int CFURLCreateDataAndPropertiesFromResource( + CFAllocatorRef alloc, + CFURLRef url, + ffi.Pointer resourceData, + ffi.Pointer properties, + CFArrayRef desiredProperties, + ffi.Pointer errorCode, + ) { + return _CFURLCreateDataAndPropertiesFromResource( + alloc, + url, + resourceData, + properties, + desiredProperties, + errorCode, + ); + } + + late final _CFURLCreateDataAndPropertiesFromResourcePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFAllocatorRef, + CFURLRef, + ffi.Pointer, + ffi.Pointer, + CFArrayRef, + ffi.Pointer)>>( + 'CFURLCreateDataAndPropertiesFromResource'); + late final _CFURLCreateDataAndPropertiesFromResource = + _CFURLCreateDataAndPropertiesFromResourcePtr.asFunction< + int Function(CFAllocatorRef, CFURLRef, ffi.Pointer, + ffi.Pointer, CFArrayRef, ffi.Pointer)>(); + + int CFURLWriteDataAndPropertiesToResource( + CFURLRef url, + CFDataRef dataToWrite, + CFDictionaryRef propertiesToWrite, + ffi.Pointer errorCode, + ) { + return _CFURLWriteDataAndPropertiesToResource( + url, + dataToWrite, + propertiesToWrite, + errorCode, + ); + } + + late final _CFURLWriteDataAndPropertiesToResourcePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFDataRef, CFDictionaryRef, + ffi.Pointer)>>('CFURLWriteDataAndPropertiesToResource'); + late final _CFURLWriteDataAndPropertiesToResource = + _CFURLWriteDataAndPropertiesToResourcePtr.asFunction< + int Function( + CFURLRef, CFDataRef, CFDictionaryRef, ffi.Pointer)>(); + + int CFURLDestroyResource( + CFURLRef url, + ffi.Pointer errorCode, + ) { + return _CFURLDestroyResource( + url, + errorCode, + ); + } + + late final _CFURLDestroyResourcePtr = _lookup< + ffi.NativeFunction)>>( + 'CFURLDestroyResource'); + late final _CFURLDestroyResource = _CFURLDestroyResourcePtr.asFunction< + int Function(CFURLRef, ffi.Pointer)>(); + + CFTypeRef CFURLCreatePropertyFromResource( + CFAllocatorRef alloc, + CFURLRef url, + CFStringRef property, + ffi.Pointer errorCode, + ) { + return _CFURLCreatePropertyFromResource( + alloc, + url, + property, + errorCode, + ); + } + + late final _CFURLCreatePropertyFromResourcePtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFAllocatorRef, CFURLRef, CFStringRef, + ffi.Pointer)>>('CFURLCreatePropertyFromResource'); + late final _CFURLCreatePropertyFromResource = + _CFURLCreatePropertyFromResourcePtr.asFunction< + CFTypeRef Function( + CFAllocatorRef, CFURLRef, CFStringRef, ffi.Pointer)>(); + + late final ffi.Pointer _kCFURLFileExists = + _lookup('kCFURLFileExists'); + + CFStringRef get kCFURLFileExists => _kCFURLFileExists.value; + + set kCFURLFileExists(CFStringRef value) => _kCFURLFileExists.value = value; + + late final ffi.Pointer _kCFURLFileDirectoryContents = + _lookup('kCFURLFileDirectoryContents'); + + CFStringRef get kCFURLFileDirectoryContents => + _kCFURLFileDirectoryContents.value; + + set kCFURLFileDirectoryContents(CFStringRef value) => + _kCFURLFileDirectoryContents.value = value; + + late final ffi.Pointer _kCFURLFileLength = + _lookup('kCFURLFileLength'); + + CFStringRef get kCFURLFileLength => _kCFURLFileLength.value; + + set kCFURLFileLength(CFStringRef value) => _kCFURLFileLength.value = value; + + late final ffi.Pointer _kCFURLFileLastModificationTime = + _lookup('kCFURLFileLastModificationTime'); + + CFStringRef get kCFURLFileLastModificationTime => + _kCFURLFileLastModificationTime.value; + + set kCFURLFileLastModificationTime(CFStringRef value) => + _kCFURLFileLastModificationTime.value = value; + + late final ffi.Pointer _kCFURLFilePOSIXMode = + _lookup('kCFURLFilePOSIXMode'); + + CFStringRef get kCFURLFilePOSIXMode => _kCFURLFilePOSIXMode.value; + + set kCFURLFilePOSIXMode(CFStringRef value) => + _kCFURLFilePOSIXMode.value = value; + + late final ffi.Pointer _kCFURLFileOwnerID = + _lookup('kCFURLFileOwnerID'); + + CFStringRef get kCFURLFileOwnerID => _kCFURLFileOwnerID.value; + + set kCFURLFileOwnerID(CFStringRef value) => _kCFURLFileOwnerID.value = value; + + late final ffi.Pointer _kCFURLHTTPStatusCode = + _lookup('kCFURLHTTPStatusCode'); + + CFStringRef get kCFURLHTTPStatusCode => _kCFURLHTTPStatusCode.value; + + set kCFURLHTTPStatusCode(CFStringRef value) => + _kCFURLHTTPStatusCode.value = value; + + late final ffi.Pointer _kCFURLHTTPStatusLine = + _lookup('kCFURLHTTPStatusLine'); + + CFStringRef get kCFURLHTTPStatusLine => _kCFURLHTTPStatusLine.value; + + set kCFURLHTTPStatusLine(CFStringRef value) => + _kCFURLHTTPStatusLine.value = value; + + int CFUUIDGetTypeID() { + return _CFUUIDGetTypeID(); + } + + late final _CFUUIDGetTypeIDPtr = + _lookup>('CFUUIDGetTypeID'); + late final _CFUUIDGetTypeID = + _CFUUIDGetTypeIDPtr.asFunction(); + + CFUUIDRef CFUUIDCreate( + CFAllocatorRef alloc, + ) { + return _CFUUIDCreate( + alloc, + ); + } + + late final _CFUUIDCreatePtr = + _lookup>( + 'CFUUIDCreate'); + late final _CFUUIDCreate = + _CFUUIDCreatePtr.asFunction(); + + CFUUIDRef CFUUIDCreateWithBytes( + CFAllocatorRef alloc, + int byte0, + int byte1, + int byte2, + int byte3, + int byte4, + int byte5, + int byte6, + int byte7, + int byte8, + int byte9, + int byte10, + int byte11, + int byte12, + int byte13, + int byte14, + int byte15, + ) { + return _CFUUIDCreateWithBytes( + alloc, + byte0, + byte1, + byte2, + byte3, + byte4, + byte5, + byte6, + byte7, + byte8, + byte9, + byte10, + byte11, + byte12, + byte13, + byte14, + byte15, + ); + } + + late final _CFUUIDCreateWithBytesPtr = _lookup< + ffi.NativeFunction< + CFUUIDRef Function( + CFAllocatorRef, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8)>>('CFUUIDCreateWithBytes'); + late final _CFUUIDCreateWithBytes = _CFUUIDCreateWithBytesPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int)>(); + + CFUUIDRef CFUUIDCreateFromString( + CFAllocatorRef alloc, + CFStringRef uuidStr, + ) { + return _CFUUIDCreateFromString( + alloc, + uuidStr, + ); + } + + late final _CFUUIDCreateFromStringPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateFromString'); + late final _CFUUIDCreateFromString = _CFUUIDCreateFromStringPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, CFStringRef)>(); + + CFStringRef CFUUIDCreateString( + CFAllocatorRef alloc, + CFUUIDRef uuid, + ) { + return _CFUUIDCreateString( + alloc, + uuid, + ); + } + + late final _CFUUIDCreateStringPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateString'); + late final _CFUUIDCreateString = _CFUUIDCreateStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFUUIDRef)>(); + + CFUUIDRef CFUUIDGetConstantUUIDWithBytes( + CFAllocatorRef alloc, + int byte0, + int byte1, + int byte2, + int byte3, + int byte4, + int byte5, + int byte6, + int byte7, + int byte8, + int byte9, + int byte10, + int byte11, + int byte12, + int byte13, + int byte14, + int byte15, + ) { + return _CFUUIDGetConstantUUIDWithBytes( + alloc, + byte0, + byte1, + byte2, + byte3, + byte4, + byte5, + byte6, + byte7, + byte8, + byte9, + byte10, + byte11, + byte12, + byte13, + byte14, + byte15, + ); + } + + late final _CFUUIDGetConstantUUIDWithBytesPtr = _lookup< + ffi.NativeFunction< + CFUUIDRef Function( + CFAllocatorRef, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8)>>('CFUUIDGetConstantUUIDWithBytes'); + late final _CFUUIDGetConstantUUIDWithBytes = + _CFUUIDGetConstantUUIDWithBytesPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int)>(); + + CFUUIDBytes CFUUIDGetUUIDBytes( + CFUUIDRef uuid, + ) { + return _CFUUIDGetUUIDBytes( + uuid, + ); + } + + late final _CFUUIDGetUUIDBytesPtr = + _lookup>( + 'CFUUIDGetUUIDBytes'); + late final _CFUUIDGetUUIDBytes = + _CFUUIDGetUUIDBytesPtr.asFunction(); + + CFUUIDRef CFUUIDCreateFromUUIDBytes( + CFAllocatorRef alloc, + CFUUIDBytes bytes, + ) { + return _CFUUIDCreateFromUUIDBytes( + alloc, + bytes, + ); + } + + late final _CFUUIDCreateFromUUIDBytesPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateFromUUIDBytes'); + late final _CFUUIDCreateFromUUIDBytes = _CFUUIDCreateFromUUIDBytesPtr + .asFunction(); + + CFURLRef CFCopyHomeDirectoryURL() { + return _CFCopyHomeDirectoryURL(); + } + + late final _CFCopyHomeDirectoryURLPtr = + _lookup>( + 'CFCopyHomeDirectoryURL'); + late final _CFCopyHomeDirectoryURL = + _CFCopyHomeDirectoryURLPtr.asFunction(); + + late final ffi.Pointer _kCFBundleInfoDictionaryVersionKey = + _lookup('kCFBundleInfoDictionaryVersionKey'); + + CFStringRef get kCFBundleInfoDictionaryVersionKey => + _kCFBundleInfoDictionaryVersionKey.value; + + set kCFBundleInfoDictionaryVersionKey(CFStringRef value) => + _kCFBundleInfoDictionaryVersionKey.value = value; + + late final ffi.Pointer _kCFBundleExecutableKey = + _lookup('kCFBundleExecutableKey'); + + CFStringRef get kCFBundleExecutableKey => _kCFBundleExecutableKey.value; + + set kCFBundleExecutableKey(CFStringRef value) => + _kCFBundleExecutableKey.value = value; + + late final ffi.Pointer _kCFBundleIdentifierKey = + _lookup('kCFBundleIdentifierKey'); + + CFStringRef get kCFBundleIdentifierKey => _kCFBundleIdentifierKey.value; + + set kCFBundleIdentifierKey(CFStringRef value) => + _kCFBundleIdentifierKey.value = value; + + late final ffi.Pointer _kCFBundleVersionKey = + _lookup('kCFBundleVersionKey'); + + CFStringRef get kCFBundleVersionKey => _kCFBundleVersionKey.value; + + set kCFBundleVersionKey(CFStringRef value) => + _kCFBundleVersionKey.value = value; + + late final ffi.Pointer _kCFBundleDevelopmentRegionKey = + _lookup('kCFBundleDevelopmentRegionKey'); + + CFStringRef get kCFBundleDevelopmentRegionKey => + _kCFBundleDevelopmentRegionKey.value; + + set kCFBundleDevelopmentRegionKey(CFStringRef value) => + _kCFBundleDevelopmentRegionKey.value = value; + + late final ffi.Pointer _kCFBundleNameKey = + _lookup('kCFBundleNameKey'); + + CFStringRef get kCFBundleNameKey => _kCFBundleNameKey.value; + + set kCFBundleNameKey(CFStringRef value) => _kCFBundleNameKey.value = value; + + late final ffi.Pointer _kCFBundleLocalizationsKey = + _lookup('kCFBundleLocalizationsKey'); + + CFStringRef get kCFBundleLocalizationsKey => _kCFBundleLocalizationsKey.value; + + set kCFBundleLocalizationsKey(CFStringRef value) => + _kCFBundleLocalizationsKey.value = value; + + CFBundleRef CFBundleGetMainBundle() { + return _CFBundleGetMainBundle(); + } + + late final _CFBundleGetMainBundlePtr = + _lookup>( + 'CFBundleGetMainBundle'); + late final _CFBundleGetMainBundle = + _CFBundleGetMainBundlePtr.asFunction(); + + CFBundleRef CFBundleGetBundleWithIdentifier( + CFStringRef bundleID, + ) { + return _CFBundleGetBundleWithIdentifier( + bundleID, + ); + } + + late final _CFBundleGetBundleWithIdentifierPtr = + _lookup>( + 'CFBundleGetBundleWithIdentifier'); + late final _CFBundleGetBundleWithIdentifier = + _CFBundleGetBundleWithIdentifierPtr.asFunction< + CFBundleRef Function(CFStringRef)>(); + + CFArrayRef CFBundleGetAllBundles() { + return _CFBundleGetAllBundles(); + } + + late final _CFBundleGetAllBundlesPtr = + _lookup>( + 'CFBundleGetAllBundles'); + late final _CFBundleGetAllBundles = + _CFBundleGetAllBundlesPtr.asFunction(); + + int CFBundleGetTypeID() { + return _CFBundleGetTypeID(); + } + + late final _CFBundleGetTypeIDPtr = + _lookup>('CFBundleGetTypeID'); + late final _CFBundleGetTypeID = + _CFBundleGetTypeIDPtr.asFunction(); + + CFBundleRef CFBundleCreate( + CFAllocatorRef allocator, + CFURLRef bundleURL, + ) { + return _CFBundleCreate( + allocator, + bundleURL, + ); + } + + late final _CFBundleCreatePtr = _lookup< + ffi.NativeFunction>( + 'CFBundleCreate'); + late final _CFBundleCreate = _CFBundleCreatePtr.asFunction< + CFBundleRef Function(CFAllocatorRef, CFURLRef)>(); + + CFArrayRef CFBundleCreateBundlesFromDirectory( + CFAllocatorRef allocator, + CFURLRef directoryURL, + CFStringRef bundleType, + ) { + return _CFBundleCreateBundlesFromDirectory( + allocator, + directoryURL, + bundleType, + ); + } + + late final _CFBundleCreateBundlesFromDirectoryPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFAllocatorRef, CFURLRef, + CFStringRef)>>('CFBundleCreateBundlesFromDirectory'); + late final _CFBundleCreateBundlesFromDirectory = + _CFBundleCreateBundlesFromDirectoryPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); + + CFURLRef CFBundleCopyBundleURL( + CFBundleRef bundle, + ) { + return _CFBundleCopyBundleURL( + bundle, + ); + } + + late final _CFBundleCopyBundleURLPtr = + _lookup>( + 'CFBundleCopyBundleURL'); + late final _CFBundleCopyBundleURL = + _CFBundleCopyBundleURLPtr.asFunction(); + + CFTypeRef CFBundleGetValueForInfoDictionaryKey( + CFBundleRef bundle, + CFStringRef key, + ) { + return _CFBundleGetValueForInfoDictionaryKey( + bundle, + key, + ); + } + + late final _CFBundleGetValueForInfoDictionaryKeyPtr = + _lookup>( + 'CFBundleGetValueForInfoDictionaryKey'); + late final _CFBundleGetValueForInfoDictionaryKey = + _CFBundleGetValueForInfoDictionaryKeyPtr.asFunction< + CFTypeRef Function(CFBundleRef, CFStringRef)>(); + + CFDictionaryRef CFBundleGetInfoDictionary( + CFBundleRef bundle, + ) { + return _CFBundleGetInfoDictionary( + bundle, + ); + } + + late final _CFBundleGetInfoDictionaryPtr = + _lookup>( + 'CFBundleGetInfoDictionary'); + late final _CFBundleGetInfoDictionary = _CFBundleGetInfoDictionaryPtr + .asFunction(); + + CFDictionaryRef CFBundleGetLocalInfoDictionary( + CFBundleRef bundle, + ) { + return _CFBundleGetLocalInfoDictionary( + bundle, + ); + } + + late final _CFBundleGetLocalInfoDictionaryPtr = + _lookup>( + 'CFBundleGetLocalInfoDictionary'); + late final _CFBundleGetLocalInfoDictionary = + _CFBundleGetLocalInfoDictionaryPtr.asFunction< + CFDictionaryRef Function(CFBundleRef)>(); + + void CFBundleGetPackageInfo( + CFBundleRef bundle, + ffi.Pointer packageType, + ffi.Pointer packageCreator, + ) { + return _CFBundleGetPackageInfo( + bundle, + packageType, + packageCreator, + ); + } + + late final _CFBundleGetPackageInfoPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBundleRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleGetPackageInfo'); + late final _CFBundleGetPackageInfo = _CFBundleGetPackageInfoPtr.asFunction< + void Function(CFBundleRef, ffi.Pointer, ffi.Pointer)>(); + + CFStringRef CFBundleGetIdentifier( + CFBundleRef bundle, + ) { + return _CFBundleGetIdentifier( + bundle, + ); + } + + late final _CFBundleGetIdentifierPtr = + _lookup>( + 'CFBundleGetIdentifier'); + late final _CFBundleGetIdentifier = + _CFBundleGetIdentifierPtr.asFunction(); + + int CFBundleGetVersionNumber( + CFBundleRef bundle, + ) { + return _CFBundleGetVersionNumber( + bundle, + ); + } + + late final _CFBundleGetVersionNumberPtr = + _lookup>( + 'CFBundleGetVersionNumber'); + late final _CFBundleGetVersionNumber = + _CFBundleGetVersionNumberPtr.asFunction(); + + CFStringRef CFBundleGetDevelopmentRegion( + CFBundleRef bundle, + ) { + return _CFBundleGetDevelopmentRegion( + bundle, + ); + } + + late final _CFBundleGetDevelopmentRegionPtr = + _lookup>( + 'CFBundleGetDevelopmentRegion'); + late final _CFBundleGetDevelopmentRegion = _CFBundleGetDevelopmentRegionPtr + .asFunction(); + + CFURLRef CFBundleCopySupportFilesDirectoryURL( + CFBundleRef bundle, + ) { + return _CFBundleCopySupportFilesDirectoryURL( + bundle, + ); + } + + late final _CFBundleCopySupportFilesDirectoryURLPtr = + _lookup>( + 'CFBundleCopySupportFilesDirectoryURL'); + late final _CFBundleCopySupportFilesDirectoryURL = + _CFBundleCopySupportFilesDirectoryURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); + + CFURLRef CFBundleCopyResourcesDirectoryURL( + CFBundleRef bundle, + ) { + return _CFBundleCopyResourcesDirectoryURL( + bundle, + ); + } + + late final _CFBundleCopyResourcesDirectoryURLPtr = + _lookup>( + 'CFBundleCopyResourcesDirectoryURL'); + late final _CFBundleCopyResourcesDirectoryURL = + _CFBundleCopyResourcesDirectoryURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); + + CFURLRef CFBundleCopyPrivateFrameworksURL( + CFBundleRef bundle, + ) { + return _CFBundleCopyPrivateFrameworksURL( + bundle, + ); + } + + late final _CFBundleCopyPrivateFrameworksURLPtr = + _lookup>( + 'CFBundleCopyPrivateFrameworksURL'); + late final _CFBundleCopyPrivateFrameworksURL = + _CFBundleCopyPrivateFrameworksURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); + + CFURLRef CFBundleCopySharedFrameworksURL( + CFBundleRef bundle, + ) { + return _CFBundleCopySharedFrameworksURL( + bundle, + ); + } + + late final _CFBundleCopySharedFrameworksURLPtr = + _lookup>( + 'CFBundleCopySharedFrameworksURL'); + late final _CFBundleCopySharedFrameworksURL = + _CFBundleCopySharedFrameworksURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); + + CFURLRef CFBundleCopySharedSupportURL( + CFBundleRef bundle, + ) { + return _CFBundleCopySharedSupportURL( + bundle, + ); + } + + late final _CFBundleCopySharedSupportURLPtr = + _lookup>( + 'CFBundleCopySharedSupportURL'); + late final _CFBundleCopySharedSupportURL = _CFBundleCopySharedSupportURLPtr + .asFunction(); + + CFURLRef CFBundleCopyBuiltInPlugInsURL( + CFBundleRef bundle, + ) { + return _CFBundleCopyBuiltInPlugInsURL( + bundle, + ); + } + + late final _CFBundleCopyBuiltInPlugInsURLPtr = + _lookup>( + 'CFBundleCopyBuiltInPlugInsURL'); + late final _CFBundleCopyBuiltInPlugInsURL = _CFBundleCopyBuiltInPlugInsURLPtr + .asFunction(); + + CFDictionaryRef CFBundleCopyInfoDictionaryInDirectory( + CFURLRef bundleURL, + ) { + return _CFBundleCopyInfoDictionaryInDirectory( + bundleURL, + ); + } + + late final _CFBundleCopyInfoDictionaryInDirectoryPtr = + _lookup>( + 'CFBundleCopyInfoDictionaryInDirectory'); + late final _CFBundleCopyInfoDictionaryInDirectory = + _CFBundleCopyInfoDictionaryInDirectoryPtr.asFunction< + CFDictionaryRef Function(CFURLRef)>(); + + int CFBundleGetPackageInfoInDirectory( + CFURLRef url, + ffi.Pointer packageType, + ffi.Pointer packageCreator, + ) { + return _CFBundleGetPackageInfoInDirectory( + url, + packageType, + packageCreator, + ); + } + + late final _CFBundleGetPackageInfoInDirectoryPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleGetPackageInfoInDirectory'); + late final _CFBundleGetPackageInfoInDirectory = + _CFBundleGetPackageInfoInDirectoryPtr.asFunction< + int Function(CFURLRef, ffi.Pointer, ffi.Pointer)>(); + + CFURLRef CFBundleCopyResourceURL( + CFBundleRef bundle, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, + ) { + return _CFBundleCopyResourceURL( + bundle, + resourceName, + resourceType, + subDirName, + ); + } + + late final _CFBundleCopyResourceURLPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURL'); + late final _CFBundleCopyResourceURL = _CFBundleCopyResourceURLPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + + CFArrayRef CFBundleCopyResourceURLsOfType( + CFBundleRef bundle, + CFStringRef resourceType, + CFStringRef subDirName, + ) { + return _CFBundleCopyResourceURLsOfType( + bundle, + resourceType, + subDirName, + ); + } + + late final _CFBundleCopyResourceURLsOfTypePtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFBundleRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfType'); + late final _CFBundleCopyResourceURLsOfType = + _CFBundleCopyResourceURLsOfTypePtr.asFunction< + CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef)>(); + + CFStringRef CFBundleCopyLocalizedString( + CFBundleRef bundle, + CFStringRef key, + CFStringRef value, + CFStringRef tableName, + ) { + return _CFBundleCopyLocalizedString( + bundle, + key, + value, + tableName, + ); + } + + late final _CFBundleCopyLocalizedStringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyLocalizedString'); + late final _CFBundleCopyLocalizedString = + _CFBundleCopyLocalizedStringPtr.asFunction< + CFStringRef Function( + CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + + CFURLRef CFBundleCopyResourceURLInDirectory( + CFURLRef bundleURL, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, + ) { + return _CFBundleCopyResourceURLInDirectory( + bundleURL, + resourceName, + resourceType, + subDirName, + ); + } + + late final _CFBundleCopyResourceURLInDirectoryPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLInDirectory'); + late final _CFBundleCopyResourceURLInDirectory = + _CFBundleCopyResourceURLInDirectoryPtr.asFunction< + CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, CFStringRef)>(); + + CFArrayRef CFBundleCopyResourceURLsOfTypeInDirectory( + CFURLRef bundleURL, + CFStringRef resourceType, + CFStringRef subDirName, + ) { + return _CFBundleCopyResourceURLsOfTypeInDirectory( + bundleURL, + resourceType, + subDirName, + ); + } + + late final _CFBundleCopyResourceURLsOfTypeInDirectoryPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFURLRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfTypeInDirectory'); + late final _CFBundleCopyResourceURLsOfTypeInDirectory = + _CFBundleCopyResourceURLsOfTypeInDirectoryPtr.asFunction< + CFArrayRef Function(CFURLRef, CFStringRef, CFStringRef)>(); + + CFArrayRef CFBundleCopyBundleLocalizations( + CFBundleRef bundle, + ) { + return _CFBundleCopyBundleLocalizations( + bundle, + ); + } + + late final _CFBundleCopyBundleLocalizationsPtr = + _lookup>( + 'CFBundleCopyBundleLocalizations'); + late final _CFBundleCopyBundleLocalizations = + _CFBundleCopyBundleLocalizationsPtr.asFunction< + CFArrayRef Function(CFBundleRef)>(); + + CFArrayRef CFBundleCopyPreferredLocalizationsFromArray( + CFArrayRef locArray, + ) { + return _CFBundleCopyPreferredLocalizationsFromArray( + locArray, + ); + } + + late final _CFBundleCopyPreferredLocalizationsFromArrayPtr = + _lookup>( + 'CFBundleCopyPreferredLocalizationsFromArray'); + late final _CFBundleCopyPreferredLocalizationsFromArray = + _CFBundleCopyPreferredLocalizationsFromArrayPtr.asFunction< + CFArrayRef Function(CFArrayRef)>(); + + CFArrayRef CFBundleCopyLocalizationsForPreferences( + CFArrayRef locArray, + CFArrayRef prefArray, + ) { + return _CFBundleCopyLocalizationsForPreferences( + locArray, + prefArray, + ); + } + + late final _CFBundleCopyLocalizationsForPreferencesPtr = + _lookup>( + 'CFBundleCopyLocalizationsForPreferences'); + late final _CFBundleCopyLocalizationsForPreferences = + _CFBundleCopyLocalizationsForPreferencesPtr.asFunction< + CFArrayRef Function(CFArrayRef, CFArrayRef)>(); + + CFURLRef CFBundleCopyResourceURLForLocalization( + CFBundleRef bundle, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, + CFStringRef localizationName, + ) { + return _CFBundleCopyResourceURLForLocalization( + bundle, + resourceName, + resourceType, + subDirName, + localizationName, + ); + } + + late final _CFBundleCopyResourceURLForLocalizationPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLForLocalization'); + late final _CFBundleCopyResourceURLForLocalization = + _CFBundleCopyResourceURLForLocalizationPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>(); + + CFArrayRef CFBundleCopyResourceURLsOfTypeForLocalization( + CFBundleRef bundle, + CFStringRef resourceType, + CFStringRef subDirName, + CFStringRef localizationName, + ) { + return _CFBundleCopyResourceURLsOfTypeForLocalization( + bundle, + resourceType, + subDirName, + localizationName, + ); + } + + late final _CFBundleCopyResourceURLsOfTypeForLocalizationPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfTypeForLocalization'); + late final _CFBundleCopyResourceURLsOfTypeForLocalization = + _CFBundleCopyResourceURLsOfTypeForLocalizationPtr.asFunction< + CFArrayRef Function( + CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + + CFDictionaryRef CFBundleCopyInfoDictionaryForURL( + CFURLRef url, + ) { + return _CFBundleCopyInfoDictionaryForURL( + url, + ); + } + + late final _CFBundleCopyInfoDictionaryForURLPtr = + _lookup>( + 'CFBundleCopyInfoDictionaryForURL'); + late final _CFBundleCopyInfoDictionaryForURL = + _CFBundleCopyInfoDictionaryForURLPtr.asFunction< + CFDictionaryRef Function(CFURLRef)>(); + + CFArrayRef CFBundleCopyLocalizationsForURL( + CFURLRef url, + ) { + return _CFBundleCopyLocalizationsForURL( + url, + ); + } + + late final _CFBundleCopyLocalizationsForURLPtr = + _lookup>( + 'CFBundleCopyLocalizationsForURL'); + late final _CFBundleCopyLocalizationsForURL = + _CFBundleCopyLocalizationsForURLPtr.asFunction< + CFArrayRef Function(CFURLRef)>(); + + CFArrayRef CFBundleCopyExecutableArchitecturesForURL( + CFURLRef url, + ) { + return _CFBundleCopyExecutableArchitecturesForURL( + url, + ); + } + + late final _CFBundleCopyExecutableArchitecturesForURLPtr = + _lookup>( + 'CFBundleCopyExecutableArchitecturesForURL'); + late final _CFBundleCopyExecutableArchitecturesForURL = + _CFBundleCopyExecutableArchitecturesForURLPtr.asFunction< + CFArrayRef Function(CFURLRef)>(); + + CFURLRef CFBundleCopyExecutableURL( + CFBundleRef bundle, + ) { + return _CFBundleCopyExecutableURL( + bundle, + ); + } + + late final _CFBundleCopyExecutableURLPtr = + _lookup>( + 'CFBundleCopyExecutableURL'); + late final _CFBundleCopyExecutableURL = _CFBundleCopyExecutableURLPtr + .asFunction(); + + CFArrayRef CFBundleCopyExecutableArchitectures( + CFBundleRef bundle, + ) { + return _CFBundleCopyExecutableArchitectures( + bundle, + ); + } + + late final _CFBundleCopyExecutableArchitecturesPtr = + _lookup>( + 'CFBundleCopyExecutableArchitectures'); + late final _CFBundleCopyExecutableArchitectures = + _CFBundleCopyExecutableArchitecturesPtr.asFunction< + CFArrayRef Function(CFBundleRef)>(); + + int CFBundlePreflightExecutable( + CFBundleRef bundle, + ffi.Pointer error, + ) { + return _CFBundlePreflightExecutable( + bundle, + error, + ); + } + + late final _CFBundlePreflightExecutablePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBundleRef, + ffi.Pointer)>>('CFBundlePreflightExecutable'); + late final _CFBundlePreflightExecutable = _CFBundlePreflightExecutablePtr + .asFunction)>(); + + int CFBundleLoadExecutableAndReturnError( + CFBundleRef bundle, + ffi.Pointer error, + ) { + return _CFBundleLoadExecutableAndReturnError( + bundle, + error, + ); + } + + late final _CFBundleLoadExecutableAndReturnErrorPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBundleRef, ffi.Pointer)>>( + 'CFBundleLoadExecutableAndReturnError'); + late final _CFBundleLoadExecutableAndReturnError = + _CFBundleLoadExecutableAndReturnErrorPtr.asFunction< + int Function(CFBundleRef, ffi.Pointer)>(); + + int CFBundleLoadExecutable( + CFBundleRef bundle, + ) { + return _CFBundleLoadExecutable( + bundle, + ); + } + + late final _CFBundleLoadExecutablePtr = + _lookup>( + 'CFBundleLoadExecutable'); + late final _CFBundleLoadExecutable = + _CFBundleLoadExecutablePtr.asFunction(); + + int CFBundleIsExecutableLoaded( + CFBundleRef bundle, + ) { + return _CFBundleIsExecutableLoaded( + bundle, + ); + } + + late final _CFBundleIsExecutableLoadedPtr = + _lookup>( + 'CFBundleIsExecutableLoaded'); + late final _CFBundleIsExecutableLoaded = + _CFBundleIsExecutableLoadedPtr.asFunction(); + + void CFBundleUnloadExecutable( + CFBundleRef bundle, + ) { + return _CFBundleUnloadExecutable( + bundle, + ); + } + + late final _CFBundleUnloadExecutablePtr = + _lookup>( + 'CFBundleUnloadExecutable'); + late final _CFBundleUnloadExecutable = + _CFBundleUnloadExecutablePtr.asFunction(); + + ffi.Pointer CFBundleGetFunctionPointerForName( + CFBundleRef bundle, + CFStringRef functionName, + ) { + return _CFBundleGetFunctionPointerForName( + bundle, + functionName, + ); + } + + late final _CFBundleGetFunctionPointerForNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFBundleRef, CFStringRef)>>('CFBundleGetFunctionPointerForName'); + late final _CFBundleGetFunctionPointerForName = + _CFBundleGetFunctionPointerForNamePtr.asFunction< + ffi.Pointer Function(CFBundleRef, CFStringRef)>(); + + void CFBundleGetFunctionPointersForNames( + CFBundleRef bundle, + CFArrayRef functionNames, + ffi.Pointer> ftbl, + ) { + return _CFBundleGetFunctionPointersForNames( + bundle, + functionNames, + ftbl, + ); + } + + late final _CFBundleGetFunctionPointersForNamesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBundleRef, CFArrayRef, + ffi.Pointer>)>>( + 'CFBundleGetFunctionPointersForNames'); + late final _CFBundleGetFunctionPointersForNames = + _CFBundleGetFunctionPointersForNamesPtr.asFunction< + void Function( + CFBundleRef, CFArrayRef, ffi.Pointer>)>(); + + ffi.Pointer CFBundleGetDataPointerForName( + CFBundleRef bundle, + CFStringRef symbolName, + ) { + return _CFBundleGetDataPointerForName( + bundle, + symbolName, + ); + } + + late final _CFBundleGetDataPointerForNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFBundleRef, CFStringRef)>>('CFBundleGetDataPointerForName'); + late final _CFBundleGetDataPointerForName = _CFBundleGetDataPointerForNamePtr + .asFunction Function(CFBundleRef, CFStringRef)>(); + + void CFBundleGetDataPointersForNames( + CFBundleRef bundle, + CFArrayRef symbolNames, + ffi.Pointer> stbl, + ) { + return _CFBundleGetDataPointersForNames( + bundle, + symbolNames, + stbl, + ); + } + + late final _CFBundleGetDataPointersForNamesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBundleRef, CFArrayRef, + ffi.Pointer>)>>( + 'CFBundleGetDataPointersForNames'); + late final _CFBundleGetDataPointersForNames = + _CFBundleGetDataPointersForNamesPtr.asFunction< + void Function( + CFBundleRef, CFArrayRef, ffi.Pointer>)>(); + + CFURLRef CFBundleCopyAuxiliaryExecutableURL( + CFBundleRef bundle, + CFStringRef executableName, + ) { + return _CFBundleCopyAuxiliaryExecutableURL( + bundle, + executableName, + ); + } + + late final _CFBundleCopyAuxiliaryExecutableURLPtr = + _lookup>( + 'CFBundleCopyAuxiliaryExecutableURL'); + late final _CFBundleCopyAuxiliaryExecutableURL = + _CFBundleCopyAuxiliaryExecutableURLPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef)>(); + + int CFBundleIsExecutableLoadable( + CFBundleRef bundle, + ) { + return _CFBundleIsExecutableLoadable( + bundle, + ); + } + + late final _CFBundleIsExecutableLoadablePtr = + _lookup>( + 'CFBundleIsExecutableLoadable'); + late final _CFBundleIsExecutableLoadable = + _CFBundleIsExecutableLoadablePtr.asFunction(); + + int CFBundleIsExecutableLoadableForURL( + CFURLRef url, + ) { + return _CFBundleIsExecutableLoadableForURL( + url, + ); + } + + late final _CFBundleIsExecutableLoadableForURLPtr = + _lookup>( + 'CFBundleIsExecutableLoadableForURL'); + late final _CFBundleIsExecutableLoadableForURL = + _CFBundleIsExecutableLoadableForURLPtr.asFunction< + int Function(CFURLRef)>(); + + int CFBundleIsArchitectureLoadable( + int arch, + ) { + return _CFBundleIsArchitectureLoadable( + arch, + ); + } + + late final _CFBundleIsArchitectureLoadablePtr = + _lookup>( + 'CFBundleIsArchitectureLoadable'); + late final _CFBundleIsArchitectureLoadable = + _CFBundleIsArchitectureLoadablePtr.asFunction(); + + CFPlugInRef CFBundleGetPlugIn( + CFBundleRef bundle, + ) { + return _CFBundleGetPlugIn( + bundle, + ); + } + + late final _CFBundleGetPlugInPtr = + _lookup>( + 'CFBundleGetPlugIn'); + late final _CFBundleGetPlugIn = + _CFBundleGetPlugInPtr.asFunction(); + + int CFBundleOpenBundleResourceMap( + CFBundleRef bundle, + ) { + return _CFBundleOpenBundleResourceMap( + bundle, + ); + } + + late final _CFBundleOpenBundleResourceMapPtr = + _lookup>( + 'CFBundleOpenBundleResourceMap'); + late final _CFBundleOpenBundleResourceMap = + _CFBundleOpenBundleResourceMapPtr.asFunction(); + + int CFBundleOpenBundleResourceFiles( + CFBundleRef bundle, + ffi.Pointer refNum, + ffi.Pointer localizedRefNum, + ) { + return _CFBundleOpenBundleResourceFiles( + bundle, + refNum, + localizedRefNum, + ); + } + + late final _CFBundleOpenBundleResourceFilesPtr = _lookup< + ffi.NativeFunction< + SInt32 Function(CFBundleRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleOpenBundleResourceFiles'); + late final _CFBundleOpenBundleResourceFiles = + _CFBundleOpenBundleResourceFilesPtr.asFunction< + int Function(CFBundleRef, ffi.Pointer, + ffi.Pointer)>(); + + void CFBundleCloseBundleResourceMap( + CFBundleRef bundle, + int refNum, + ) { + return _CFBundleCloseBundleResourceMap( + bundle, + refNum, + ); + } + + late final _CFBundleCloseBundleResourceMapPtr = _lookup< + ffi.NativeFunction>( + 'CFBundleCloseBundleResourceMap'); + late final _CFBundleCloseBundleResourceMap = + _CFBundleCloseBundleResourceMapPtr.asFunction< + void Function(CFBundleRef, int)>(); + + int CFMessagePortGetTypeID() { + return _CFMessagePortGetTypeID(); + } + + late final _CFMessagePortGetTypeIDPtr = + _lookup>( + 'CFMessagePortGetTypeID'); + late final _CFMessagePortGetTypeID = + _CFMessagePortGetTypeIDPtr.asFunction(); + + CFMessagePortRef CFMessagePortCreateLocal( + CFAllocatorRef allocator, + CFStringRef name, + CFMessagePortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, + ) { + return _CFMessagePortCreateLocal( + allocator, + name, + callout, + context, + shouldFreeInfo, + ); + } + + late final _CFMessagePortCreateLocalPtr = _lookup< + ffi.NativeFunction< + CFMessagePortRef Function( + CFAllocatorRef, + CFStringRef, + CFMessagePortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMessagePortCreateLocal'); + late final _CFMessagePortCreateLocal = + _CFMessagePortCreateLocalPtr.asFunction< + CFMessagePortRef Function( + CFAllocatorRef, + CFStringRef, + CFMessagePortCallBack, + ffi.Pointer, + ffi.Pointer)>(); + + CFMessagePortRef CFMessagePortCreateRemote( + CFAllocatorRef allocator, + CFStringRef name, + ) { + return _CFMessagePortCreateRemote( + allocator, + name, + ); + } + + late final _CFMessagePortCreateRemotePtr = _lookup< + ffi.NativeFunction< + CFMessagePortRef Function( + CFAllocatorRef, CFStringRef)>>('CFMessagePortCreateRemote'); + late final _CFMessagePortCreateRemote = _CFMessagePortCreateRemotePtr + .asFunction(); + + int CFMessagePortIsRemote( + CFMessagePortRef ms, + ) { + return _CFMessagePortIsRemote( + ms, + ); + } + + late final _CFMessagePortIsRemotePtr = + _lookup>( + 'CFMessagePortIsRemote'); + late final _CFMessagePortIsRemote = + _CFMessagePortIsRemotePtr.asFunction(); + + CFStringRef CFMessagePortGetName( + CFMessagePortRef ms, + ) { + return _CFMessagePortGetName( + ms, + ); + } + + late final _CFMessagePortGetNamePtr = + _lookup>( + 'CFMessagePortGetName'); + late final _CFMessagePortGetName = _CFMessagePortGetNamePtr.asFunction< + CFStringRef Function(CFMessagePortRef)>(); + + int CFMessagePortSetName( + CFMessagePortRef ms, + CFStringRef newName, + ) { + return _CFMessagePortSetName( + ms, + newName, + ); + } + + late final _CFMessagePortSetNamePtr = _lookup< + ffi.NativeFunction>( + 'CFMessagePortSetName'); + late final _CFMessagePortSetName = _CFMessagePortSetNamePtr.asFunction< + int Function(CFMessagePortRef, CFStringRef)>(); + + void CFMessagePortGetContext( + CFMessagePortRef ms, + ffi.Pointer context, + ) { + return _CFMessagePortGetContext( + ms, + context, + ); + } + + late final _CFMessagePortGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMessagePortRef, + ffi.Pointer)>>('CFMessagePortGetContext'); + late final _CFMessagePortGetContext = _CFMessagePortGetContextPtr.asFunction< + void Function(CFMessagePortRef, ffi.Pointer)>(); + + void CFMessagePortInvalidate( + CFMessagePortRef ms, + ) { + return _CFMessagePortInvalidate( + ms, + ); + } + + late final _CFMessagePortInvalidatePtr = + _lookup>( + 'CFMessagePortInvalidate'); + late final _CFMessagePortInvalidate = + _CFMessagePortInvalidatePtr.asFunction(); + + int CFMessagePortIsValid( + CFMessagePortRef ms, + ) { + return _CFMessagePortIsValid( + ms, + ); + } + + late final _CFMessagePortIsValidPtr = + _lookup>( + 'CFMessagePortIsValid'); + late final _CFMessagePortIsValid = + _CFMessagePortIsValidPtr.asFunction(); + + CFMessagePortInvalidationCallBack CFMessagePortGetInvalidationCallBack( + CFMessagePortRef ms, + ) { + return _CFMessagePortGetInvalidationCallBack( + ms, + ); + } + + late final _CFMessagePortGetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + CFMessagePortInvalidationCallBack Function( + CFMessagePortRef)>>('CFMessagePortGetInvalidationCallBack'); + late final _CFMessagePortGetInvalidationCallBack = + _CFMessagePortGetInvalidationCallBackPtr.asFunction< + CFMessagePortInvalidationCallBack Function(CFMessagePortRef)>(); + + void CFMessagePortSetInvalidationCallBack( + CFMessagePortRef ms, + CFMessagePortInvalidationCallBack callout, + ) { + return _CFMessagePortSetInvalidationCallBack( + ms, + callout, + ); + } + + late final _CFMessagePortSetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMessagePortRef, CFMessagePortInvalidationCallBack)>>( + 'CFMessagePortSetInvalidationCallBack'); + late final _CFMessagePortSetInvalidationCallBack = + _CFMessagePortSetInvalidationCallBackPtr.asFunction< + void Function(CFMessagePortRef, CFMessagePortInvalidationCallBack)>(); + + int CFMessagePortSendRequest( + CFMessagePortRef remote, + int msgid, + CFDataRef data, + double sendTimeout, + double rcvTimeout, + CFStringRef replyMode, + ffi.Pointer returnData, + ) { + return _CFMessagePortSendRequest( + remote, + msgid, + data, + sendTimeout, + rcvTimeout, + replyMode, + returnData, + ); + } + + late final _CFMessagePortSendRequestPtr = _lookup< + ffi.NativeFunction< + SInt32 Function( + CFMessagePortRef, + SInt32, + CFDataRef, + CFTimeInterval, + CFTimeInterval, + CFStringRef, + ffi.Pointer)>>('CFMessagePortSendRequest'); + late final _CFMessagePortSendRequest = + _CFMessagePortSendRequestPtr.asFunction< + int Function(CFMessagePortRef, int, CFDataRef, double, double, + CFStringRef, ffi.Pointer)>(); + + CFRunLoopSourceRef CFMessagePortCreateRunLoopSource( + CFAllocatorRef allocator, + CFMessagePortRef local, + int order, + ) { + return _CFMessagePortCreateRunLoopSource( + allocator, + local, + order, + ); + } + + late final _CFMessagePortCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, + CFIndex)>>('CFMessagePortCreateRunLoopSource'); + late final _CFMessagePortCreateRunLoopSource = + _CFMessagePortCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, int)>(); + + void CFMessagePortSetDispatchQueue( + CFMessagePortRef ms, + dispatch_queue_t queue, + ) { + return _CFMessagePortSetDispatchQueue( + ms, + queue, + ); + } + + late final _CFMessagePortSetDispatchQueuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMessagePortRef, + dispatch_queue_t)>>('CFMessagePortSetDispatchQueue'); + late final _CFMessagePortSetDispatchQueue = _CFMessagePortSetDispatchQueuePtr + .asFunction(); + + late final ffi.Pointer _kCFPlugInDynamicRegistrationKey = + _lookup('kCFPlugInDynamicRegistrationKey'); + + CFStringRef get kCFPlugInDynamicRegistrationKey => + _kCFPlugInDynamicRegistrationKey.value; + + set kCFPlugInDynamicRegistrationKey(CFStringRef value) => + _kCFPlugInDynamicRegistrationKey.value = value; + + late final ffi.Pointer _kCFPlugInDynamicRegisterFunctionKey = + _lookup('kCFPlugInDynamicRegisterFunctionKey'); + + CFStringRef get kCFPlugInDynamicRegisterFunctionKey => + _kCFPlugInDynamicRegisterFunctionKey.value; + + set kCFPlugInDynamicRegisterFunctionKey(CFStringRef value) => + _kCFPlugInDynamicRegisterFunctionKey.value = value; + + late final ffi.Pointer _kCFPlugInUnloadFunctionKey = + _lookup('kCFPlugInUnloadFunctionKey'); + + CFStringRef get kCFPlugInUnloadFunctionKey => + _kCFPlugInUnloadFunctionKey.value; + + set kCFPlugInUnloadFunctionKey(CFStringRef value) => + _kCFPlugInUnloadFunctionKey.value = value; + + late final ffi.Pointer _kCFPlugInFactoriesKey = + _lookup('kCFPlugInFactoriesKey'); + + CFStringRef get kCFPlugInFactoriesKey => _kCFPlugInFactoriesKey.value; + + set kCFPlugInFactoriesKey(CFStringRef value) => + _kCFPlugInFactoriesKey.value = value; + + late final ffi.Pointer _kCFPlugInTypesKey = + _lookup('kCFPlugInTypesKey'); + + CFStringRef get kCFPlugInTypesKey => _kCFPlugInTypesKey.value; + + set kCFPlugInTypesKey(CFStringRef value) => _kCFPlugInTypesKey.value = value; + + int CFPlugInGetTypeID() { + return _CFPlugInGetTypeID(); + } + + late final _CFPlugInGetTypeIDPtr = + _lookup>('CFPlugInGetTypeID'); + late final _CFPlugInGetTypeID = + _CFPlugInGetTypeIDPtr.asFunction(); + + CFPlugInRef CFPlugInCreate( + CFAllocatorRef allocator, + CFURLRef plugInURL, + ) { + return _CFPlugInCreate( + allocator, + plugInURL, + ); + } + + late final _CFPlugInCreatePtr = _lookup< + ffi.NativeFunction>( + 'CFPlugInCreate'); + late final _CFPlugInCreate = _CFPlugInCreatePtr.asFunction< + CFPlugInRef Function(CFAllocatorRef, CFURLRef)>(); + + CFBundleRef CFPlugInGetBundle( + CFPlugInRef plugIn, + ) { + return _CFPlugInGetBundle( + plugIn, + ); + } + + late final _CFPlugInGetBundlePtr = + _lookup>( + 'CFPlugInGetBundle'); + late final _CFPlugInGetBundle = + _CFPlugInGetBundlePtr.asFunction(); + + void CFPlugInSetLoadOnDemand( + CFPlugInRef plugIn, + int flag, + ) { + return _CFPlugInSetLoadOnDemand( + plugIn, + flag, + ); + } + + late final _CFPlugInSetLoadOnDemandPtr = + _lookup>( + 'CFPlugInSetLoadOnDemand'); + late final _CFPlugInSetLoadOnDemand = + _CFPlugInSetLoadOnDemandPtr.asFunction(); + + int CFPlugInIsLoadOnDemand( + CFPlugInRef plugIn, + ) { + return _CFPlugInIsLoadOnDemand( + plugIn, + ); + } + + late final _CFPlugInIsLoadOnDemandPtr = + _lookup>( + 'CFPlugInIsLoadOnDemand'); + late final _CFPlugInIsLoadOnDemand = + _CFPlugInIsLoadOnDemandPtr.asFunction(); + + CFArrayRef CFPlugInFindFactoriesForPlugInType( + CFUUIDRef typeUUID, + ) { + return _CFPlugInFindFactoriesForPlugInType( + typeUUID, + ); + } + + late final _CFPlugInFindFactoriesForPlugInTypePtr = + _lookup>( + 'CFPlugInFindFactoriesForPlugInType'); + late final _CFPlugInFindFactoriesForPlugInType = + _CFPlugInFindFactoriesForPlugInTypePtr.asFunction< + CFArrayRef Function(CFUUIDRef)>(); + + CFArrayRef CFPlugInFindFactoriesForPlugInTypeInPlugIn( + CFUUIDRef typeUUID, + CFPlugInRef plugIn, + ) { + return _CFPlugInFindFactoriesForPlugInTypeInPlugIn( + typeUUID, + plugIn, + ); + } + + late final _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr = + _lookup>( + 'CFPlugInFindFactoriesForPlugInTypeInPlugIn'); + late final _CFPlugInFindFactoriesForPlugInTypeInPlugIn = + _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr.asFunction< + CFArrayRef Function(CFUUIDRef, CFPlugInRef)>(); + + ffi.Pointer CFPlugInInstanceCreate( + CFAllocatorRef allocator, + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, + ) { + return _CFPlugInInstanceCreate( + allocator, + factoryUUID, + typeUUID, + ); + } + + late final _CFPlugInInstanceCreatePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFAllocatorRef, CFUUIDRef, CFUUIDRef)>>('CFPlugInInstanceCreate'); + late final _CFPlugInInstanceCreate = _CFPlugInInstanceCreatePtr.asFunction< + ffi.Pointer Function(CFAllocatorRef, CFUUIDRef, CFUUIDRef)>(); + + int CFPlugInRegisterFactoryFunction( + CFUUIDRef factoryUUID, + CFPlugInFactoryFunction func, + ) { + return _CFPlugInRegisterFactoryFunction( + factoryUUID, + func, + ); + } + + late final _CFPlugInRegisterFactoryFunctionPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFUUIDRef, + CFPlugInFactoryFunction)>>('CFPlugInRegisterFactoryFunction'); + late final _CFPlugInRegisterFactoryFunction = + _CFPlugInRegisterFactoryFunctionPtr.asFunction< + int Function(CFUUIDRef, CFPlugInFactoryFunction)>(); + + int CFPlugInRegisterFactoryFunctionByName( + CFUUIDRef factoryUUID, + CFPlugInRef plugIn, + CFStringRef functionName, + ) { + return _CFPlugInRegisterFactoryFunctionByName( + factoryUUID, + plugIn, + functionName, + ); + } + + late final _CFPlugInRegisterFactoryFunctionByNamePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFUUIDRef, CFPlugInRef, + CFStringRef)>>('CFPlugInRegisterFactoryFunctionByName'); + late final _CFPlugInRegisterFactoryFunctionByName = + _CFPlugInRegisterFactoryFunctionByNamePtr.asFunction< + int Function(CFUUIDRef, CFPlugInRef, CFStringRef)>(); + + int CFPlugInUnregisterFactory( + CFUUIDRef factoryUUID, + ) { + return _CFPlugInUnregisterFactory( + factoryUUID, + ); + } + + late final _CFPlugInUnregisterFactoryPtr = + _lookup>( + 'CFPlugInUnregisterFactory'); + late final _CFPlugInUnregisterFactory = + _CFPlugInUnregisterFactoryPtr.asFunction(); + + int CFPlugInRegisterPlugInType( + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, + ) { + return _CFPlugInRegisterPlugInType( + factoryUUID, + typeUUID, + ); + } + + late final _CFPlugInRegisterPlugInTypePtr = + _lookup>( + 'CFPlugInRegisterPlugInType'); + late final _CFPlugInRegisterPlugInType = _CFPlugInRegisterPlugInTypePtr + .asFunction(); + + int CFPlugInUnregisterPlugInType( + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, + ) { + return _CFPlugInUnregisterPlugInType( + factoryUUID, + typeUUID, + ); + } + + late final _CFPlugInUnregisterPlugInTypePtr = + _lookup>( + 'CFPlugInUnregisterPlugInType'); + late final _CFPlugInUnregisterPlugInType = _CFPlugInUnregisterPlugInTypePtr + .asFunction(); + + void CFPlugInAddInstanceForFactory( + CFUUIDRef factoryID, + ) { + return _CFPlugInAddInstanceForFactory( + factoryID, + ); + } + + late final _CFPlugInAddInstanceForFactoryPtr = + _lookup>( + 'CFPlugInAddInstanceForFactory'); + late final _CFPlugInAddInstanceForFactory = + _CFPlugInAddInstanceForFactoryPtr.asFunction(); + + void CFPlugInRemoveInstanceForFactory( + CFUUIDRef factoryID, + ) { + return _CFPlugInRemoveInstanceForFactory( + factoryID, + ); + } + + late final _CFPlugInRemoveInstanceForFactoryPtr = + _lookup>( + 'CFPlugInRemoveInstanceForFactory'); + late final _CFPlugInRemoveInstanceForFactory = + _CFPlugInRemoveInstanceForFactoryPtr.asFunction< + void Function(CFUUIDRef)>(); + + int CFPlugInInstanceGetInterfaceFunctionTable( + CFPlugInInstanceRef instance, + CFStringRef interfaceName, + ffi.Pointer> ftbl, + ) { + return _CFPlugInInstanceGetInterfaceFunctionTable( + instance, + interfaceName, + ftbl, + ); + } + + late final _CFPlugInInstanceGetInterfaceFunctionTablePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFPlugInInstanceRef, CFStringRef, + ffi.Pointer>)>>( + 'CFPlugInInstanceGetInterfaceFunctionTable'); + late final _CFPlugInInstanceGetInterfaceFunctionTable = + _CFPlugInInstanceGetInterfaceFunctionTablePtr.asFunction< + int Function(CFPlugInInstanceRef, CFStringRef, + ffi.Pointer>)>(); + + CFStringRef CFPlugInInstanceGetFactoryName( + CFPlugInInstanceRef instance, + ) { + return _CFPlugInInstanceGetFactoryName( + instance, + ); + } + + late final _CFPlugInInstanceGetFactoryNamePtr = + _lookup>( + 'CFPlugInInstanceGetFactoryName'); + late final _CFPlugInInstanceGetFactoryName = + _CFPlugInInstanceGetFactoryNamePtr.asFunction< + CFStringRef Function(CFPlugInInstanceRef)>(); + + ffi.Pointer CFPlugInInstanceGetInstanceData( + CFPlugInInstanceRef instance, + ) { + return _CFPlugInInstanceGetInstanceData( + instance, + ); + } + + late final _CFPlugInInstanceGetInstanceDataPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFPlugInInstanceRef)>>('CFPlugInInstanceGetInstanceData'); + late final _CFPlugInInstanceGetInstanceData = + _CFPlugInInstanceGetInstanceDataPtr.asFunction< + ffi.Pointer Function(CFPlugInInstanceRef)>(); + + int CFPlugInInstanceGetTypeID() { + return _CFPlugInInstanceGetTypeID(); + } + + late final _CFPlugInInstanceGetTypeIDPtr = + _lookup>( + 'CFPlugInInstanceGetTypeID'); + late final _CFPlugInInstanceGetTypeID = + _CFPlugInInstanceGetTypeIDPtr.asFunction(); + + CFPlugInInstanceRef CFPlugInInstanceCreateWithInstanceDataSize( + CFAllocatorRef allocator, + int instanceDataSize, + CFPlugInInstanceDeallocateInstanceDataFunction deallocateInstanceFunction, + CFStringRef factoryName, + CFPlugInInstanceGetInterfaceFunction getInterfaceFunction, + ) { + return _CFPlugInInstanceCreateWithInstanceDataSize( + allocator, + instanceDataSize, + deallocateInstanceFunction, + factoryName, + getInterfaceFunction, + ); + } + + late final _CFPlugInInstanceCreateWithInstanceDataSizePtr = _lookup< + ffi.NativeFunction< + CFPlugInInstanceRef Function( + CFAllocatorRef, + CFIndex, + CFPlugInInstanceDeallocateInstanceDataFunction, + CFStringRef, + CFPlugInInstanceGetInterfaceFunction)>>( + 'CFPlugInInstanceCreateWithInstanceDataSize'); + late final _CFPlugInInstanceCreateWithInstanceDataSize = + _CFPlugInInstanceCreateWithInstanceDataSizePtr.asFunction< + CFPlugInInstanceRef Function( + CFAllocatorRef, + int, + CFPlugInInstanceDeallocateInstanceDataFunction, + CFStringRef, + CFPlugInInstanceGetInterfaceFunction)>(); + + int CFMachPortGetTypeID() { + return _CFMachPortGetTypeID(); + } + + late final _CFMachPortGetTypeIDPtr = + _lookup>('CFMachPortGetTypeID'); + late final _CFMachPortGetTypeID = + _CFMachPortGetTypeIDPtr.asFunction(); + + CFMachPortRef CFMachPortCreate( + CFAllocatorRef allocator, + CFMachPortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, + ) { + return _CFMachPortCreate( + allocator, + callout, + context, + shouldFreeInfo, + ); + } + + late final _CFMachPortCreatePtr = _lookup< + ffi.NativeFunction< + CFMachPortRef Function( + CFAllocatorRef, + CFMachPortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMachPortCreate'); + late final _CFMachPortCreate = _CFMachPortCreatePtr.asFunction< + CFMachPortRef Function(CFAllocatorRef, CFMachPortCallBack, + ffi.Pointer, ffi.Pointer)>(); + + CFMachPortRef CFMachPortCreateWithPort( + CFAllocatorRef allocator, + int portNum, + CFMachPortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, + ) { + return _CFMachPortCreateWithPort( + allocator, + portNum, + callout, + context, + shouldFreeInfo, + ); + } + + late final _CFMachPortCreateWithPortPtr = _lookup< + ffi.NativeFunction< + CFMachPortRef Function( + CFAllocatorRef, + mach_port_t, + CFMachPortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMachPortCreateWithPort'); + late final _CFMachPortCreateWithPort = + _CFMachPortCreateWithPortPtr.asFunction< + CFMachPortRef Function(CFAllocatorRef, int, CFMachPortCallBack, + ffi.Pointer, ffi.Pointer)>(); + + int CFMachPortGetPort( + CFMachPortRef port, + ) { + return _CFMachPortGetPort( + port, + ); + } + + late final _CFMachPortGetPortPtr = + _lookup>( + 'CFMachPortGetPort'); + late final _CFMachPortGetPort = + _CFMachPortGetPortPtr.asFunction(); + + void CFMachPortGetContext( + CFMachPortRef port, + ffi.Pointer context, + ) { + return _CFMachPortGetContext( + port, + context, + ); + } + + late final _CFMachPortGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMachPortRef, + ffi.Pointer)>>('CFMachPortGetContext'); + late final _CFMachPortGetContext = _CFMachPortGetContextPtr.asFunction< + void Function(CFMachPortRef, ffi.Pointer)>(); + + void CFMachPortInvalidate( + CFMachPortRef port, + ) { + return _CFMachPortInvalidate( + port, + ); + } + + late final _CFMachPortInvalidatePtr = + _lookup>( + 'CFMachPortInvalidate'); + late final _CFMachPortInvalidate = + _CFMachPortInvalidatePtr.asFunction(); + + int CFMachPortIsValid( + CFMachPortRef port, + ) { + return _CFMachPortIsValid( + port, + ); + } + + late final _CFMachPortIsValidPtr = + _lookup>( + 'CFMachPortIsValid'); + late final _CFMachPortIsValid = + _CFMachPortIsValidPtr.asFunction(); + + CFMachPortInvalidationCallBack CFMachPortGetInvalidationCallBack( + CFMachPortRef port, + ) { + return _CFMachPortGetInvalidationCallBack( + port, + ); + } + + late final _CFMachPortGetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + CFMachPortInvalidationCallBack Function( + CFMachPortRef)>>('CFMachPortGetInvalidationCallBack'); + late final _CFMachPortGetInvalidationCallBack = + _CFMachPortGetInvalidationCallBackPtr.asFunction< + CFMachPortInvalidationCallBack Function(CFMachPortRef)>(); + + void CFMachPortSetInvalidationCallBack( + CFMachPortRef port, + CFMachPortInvalidationCallBack callout, + ) { + return _CFMachPortSetInvalidationCallBack( + port, + callout, + ); + } + + late final _CFMachPortSetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMachPortRef, CFMachPortInvalidationCallBack)>>( + 'CFMachPortSetInvalidationCallBack'); + late final _CFMachPortSetInvalidationCallBack = + _CFMachPortSetInvalidationCallBackPtr.asFunction< + void Function(CFMachPortRef, CFMachPortInvalidationCallBack)>(); + + CFRunLoopSourceRef CFMachPortCreateRunLoopSource( + CFAllocatorRef allocator, + CFMachPortRef port, + int order, + ) { + return _CFMachPortCreateRunLoopSource( + allocator, + port, + order, + ); + } + + late final _CFMachPortCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, + CFIndex)>>('CFMachPortCreateRunLoopSource'); + late final _CFMachPortCreateRunLoopSource = + _CFMachPortCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, int)>(); + + int CFAttributedStringGetTypeID() { + return _CFAttributedStringGetTypeID(); + } + + late final _CFAttributedStringGetTypeIDPtr = + _lookup>( + 'CFAttributedStringGetTypeID'); + late final _CFAttributedStringGetTypeID = + _CFAttributedStringGetTypeIDPtr.asFunction(); + + CFAttributedStringRef CFAttributedStringCreate( + CFAllocatorRef alloc, + CFStringRef str, + CFDictionaryRef attributes, + ) { + return _CFAttributedStringCreate( + alloc, + str, + attributes, + ); + } + + late final _CFAttributedStringCreatePtr = _lookup< + ffi.NativeFunction< + CFAttributedStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFAttributedStringCreate'); + late final _CFAttributedStringCreate = + _CFAttributedStringCreatePtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); + + CFAttributedStringRef CFAttributedStringCreateWithSubstring( + CFAllocatorRef alloc, + CFAttributedStringRef aStr, + CFRange range, + ) { + return _CFAttributedStringCreateWithSubstring( + alloc, + aStr, + range, + ); + } + + late final _CFAttributedStringCreateWithSubstringPtr = _lookup< + ffi.NativeFunction< + CFAttributedStringRef Function(CFAllocatorRef, CFAttributedStringRef, + CFRange)>>('CFAttributedStringCreateWithSubstring'); + late final _CFAttributedStringCreateWithSubstring = + _CFAttributedStringCreateWithSubstringPtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFAttributedStringRef, CFRange)>(); + + CFAttributedStringRef CFAttributedStringCreateCopy( + CFAllocatorRef alloc, + CFAttributedStringRef aStr, + ) { + return _CFAttributedStringCreateCopy( + alloc, + aStr, + ); + } + + late final _CFAttributedStringCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFAttributedStringRef Function(CFAllocatorRef, + CFAttributedStringRef)>>('CFAttributedStringCreateCopy'); + late final _CFAttributedStringCreateCopy = + _CFAttributedStringCreateCopyPtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFAttributedStringRef)>(); + + CFStringRef CFAttributedStringGetString( + CFAttributedStringRef aStr, + ) { + return _CFAttributedStringGetString( + aStr, + ); + } + + late final _CFAttributedStringGetStringPtr = + _lookup>( + 'CFAttributedStringGetString'); + late final _CFAttributedStringGetString = _CFAttributedStringGetStringPtr + .asFunction(); + + int CFAttributedStringGetLength( + CFAttributedStringRef aStr, + ) { + return _CFAttributedStringGetLength( + aStr, + ); + } + + late final _CFAttributedStringGetLengthPtr = + _lookup>( + 'CFAttributedStringGetLength'); + late final _CFAttributedStringGetLength = _CFAttributedStringGetLengthPtr + .asFunction(); + + CFDictionaryRef CFAttributedStringGetAttributes( + CFAttributedStringRef aStr, + int loc, + ffi.Pointer effectiveRange, + ) { + return _CFAttributedStringGetAttributes( + aStr, + loc, + effectiveRange, + ); + } + + late final _CFAttributedStringGetAttributesPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAttributedStringRef, CFIndex, + ffi.Pointer)>>('CFAttributedStringGetAttributes'); + late final _CFAttributedStringGetAttributes = + _CFAttributedStringGetAttributesPtr.asFunction< + CFDictionaryRef Function( + CFAttributedStringRef, int, ffi.Pointer)>(); + + CFTypeRef CFAttributedStringGetAttribute( + CFAttributedStringRef aStr, + int loc, + CFStringRef attrName, + ffi.Pointer effectiveRange, + ) { + return _CFAttributedStringGetAttribute( + aStr, + loc, + attrName, + effectiveRange, + ); + } + + late final _CFAttributedStringGetAttributePtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFAttributedStringRef, CFIndex, CFStringRef, + ffi.Pointer)>>('CFAttributedStringGetAttribute'); + late final _CFAttributedStringGetAttribute = + _CFAttributedStringGetAttributePtr.asFunction< + CFTypeRef Function( + CFAttributedStringRef, int, CFStringRef, ffi.Pointer)>(); + + CFDictionaryRef CFAttributedStringGetAttributesAndLongestEffectiveRange( + CFAttributedStringRef aStr, + int loc, + CFRange inRange, + ffi.Pointer longestEffectiveRange, + ) { + return _CFAttributedStringGetAttributesAndLongestEffectiveRange( + aStr, + loc, + inRange, + longestEffectiveRange, + ); + } + + late final _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr = + _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAttributedStringRef, CFIndex, + CFRange, ffi.Pointer)>>( + 'CFAttributedStringGetAttributesAndLongestEffectiveRange'); + late final _CFAttributedStringGetAttributesAndLongestEffectiveRange = + _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr.asFunction< + CFDictionaryRef Function( + CFAttributedStringRef, int, CFRange, ffi.Pointer)>(); + + CFTypeRef CFAttributedStringGetAttributeAndLongestEffectiveRange( + CFAttributedStringRef aStr, + int loc, + CFStringRef attrName, + CFRange inRange, + ffi.Pointer longestEffectiveRange, + ) { + return _CFAttributedStringGetAttributeAndLongestEffectiveRange( + aStr, + loc, + attrName, + inRange, + longestEffectiveRange, + ); + } + + late final _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr = + _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFAttributedStringRef, CFIndex, + CFStringRef, CFRange, ffi.Pointer)>>( + 'CFAttributedStringGetAttributeAndLongestEffectiveRange'); + late final _CFAttributedStringGetAttributeAndLongestEffectiveRange = + _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr.asFunction< + CFTypeRef Function(CFAttributedStringRef, int, CFStringRef, CFRange, + ffi.Pointer)>(); + + CFMutableAttributedStringRef CFAttributedStringCreateMutableCopy( + CFAllocatorRef alloc, + int maxLength, + CFAttributedStringRef aStr, + ) { + return _CFAttributedStringCreateMutableCopy( + alloc, + maxLength, + aStr, + ); + } + + late final _CFAttributedStringCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableAttributedStringRef Function(CFAllocatorRef, CFIndex, + CFAttributedStringRef)>>('CFAttributedStringCreateMutableCopy'); + late final _CFAttributedStringCreateMutableCopy = + _CFAttributedStringCreateMutableCopyPtr.asFunction< + CFMutableAttributedStringRef Function( + CFAllocatorRef, int, CFAttributedStringRef)>(); + + CFMutableAttributedStringRef CFAttributedStringCreateMutable( + CFAllocatorRef alloc, + int maxLength, + ) { + return _CFAttributedStringCreateMutable( + alloc, + maxLength, + ); + } + + late final _CFAttributedStringCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableAttributedStringRef Function( + CFAllocatorRef, CFIndex)>>('CFAttributedStringCreateMutable'); + late final _CFAttributedStringCreateMutable = + _CFAttributedStringCreateMutablePtr.asFunction< + CFMutableAttributedStringRef Function(CFAllocatorRef, int)>(); + + void CFAttributedStringReplaceString( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef replacement, + ) { + return _CFAttributedStringReplaceString( + aStr, + range, + replacement, + ); + } + + late final _CFAttributedStringReplaceStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFStringRef)>>('CFAttributedStringReplaceString'); + late final _CFAttributedStringReplaceString = + _CFAttributedStringReplaceStringPtr.asFunction< + void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); + + CFMutableStringRef CFAttributedStringGetMutableString( + CFMutableAttributedStringRef aStr, + ) { + return _CFAttributedStringGetMutableString( + aStr, + ); + } + + late final _CFAttributedStringGetMutableStringPtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function(CFMutableAttributedStringRef)>>( + 'CFAttributedStringGetMutableString'); + late final _CFAttributedStringGetMutableString = + _CFAttributedStringGetMutableStringPtr.asFunction< + CFMutableStringRef Function(CFMutableAttributedStringRef)>(); + + void CFAttributedStringSetAttributes( + CFMutableAttributedStringRef aStr, + CFRange range, + CFDictionaryRef replacement, + int clearOtherAttributes, + ) { + return _CFAttributedStringSetAttributes( + aStr, + range, + replacement, + clearOtherAttributes, + ); + } + + late final _CFAttributedStringSetAttributesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFDictionaryRef, Boolean)>>('CFAttributedStringSetAttributes'); + late final _CFAttributedStringSetAttributes = + _CFAttributedStringSetAttributesPtr.asFunction< + void Function( + CFMutableAttributedStringRef, CFRange, CFDictionaryRef, int)>(); + + void CFAttributedStringSetAttribute( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef attrName, + CFTypeRef value, + ) { + return _CFAttributedStringSetAttribute( + aStr, + range, + attrName, + value, + ); + } + + late final _CFAttributedStringSetAttributePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, CFStringRef, + CFTypeRef)>>('CFAttributedStringSetAttribute'); + late final _CFAttributedStringSetAttribute = + _CFAttributedStringSetAttributePtr.asFunction< + void Function( + CFMutableAttributedStringRef, CFRange, CFStringRef, CFTypeRef)>(); + + void CFAttributedStringRemoveAttribute( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef attrName, + ) { + return _CFAttributedStringRemoveAttribute( + aStr, + range, + attrName, + ); + } + + late final _CFAttributedStringRemoveAttributePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFStringRef)>>('CFAttributedStringRemoveAttribute'); + late final _CFAttributedStringRemoveAttribute = + _CFAttributedStringRemoveAttributePtr.asFunction< + void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); + + void CFAttributedStringReplaceAttributedString( + CFMutableAttributedStringRef aStr, + CFRange range, + CFAttributedStringRef replacement, + ) { + return _CFAttributedStringReplaceAttributedString( + aStr, + range, + replacement, + ); + } + + late final _CFAttributedStringReplaceAttributedStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFAttributedStringRef)>>( + 'CFAttributedStringReplaceAttributedString'); + late final _CFAttributedStringReplaceAttributedString = + _CFAttributedStringReplaceAttributedStringPtr.asFunction< + void Function( + CFMutableAttributedStringRef, CFRange, CFAttributedStringRef)>(); + + void CFAttributedStringBeginEditing( + CFMutableAttributedStringRef aStr, + ) { + return _CFAttributedStringBeginEditing( + aStr, + ); + } + + late final _CFAttributedStringBeginEditingPtr = _lookup< + ffi.NativeFunction>( + 'CFAttributedStringBeginEditing'); + late final _CFAttributedStringBeginEditing = + _CFAttributedStringBeginEditingPtr.asFunction< + void Function(CFMutableAttributedStringRef)>(); + + void CFAttributedStringEndEditing( + CFMutableAttributedStringRef aStr, + ) { + return _CFAttributedStringEndEditing( + aStr, + ); + } + + late final _CFAttributedStringEndEditingPtr = _lookup< + ffi.NativeFunction>( + 'CFAttributedStringEndEditing'); + late final _CFAttributedStringEndEditing = _CFAttributedStringEndEditingPtr + .asFunction(); + + int CFURLEnumeratorGetTypeID() { + return _CFURLEnumeratorGetTypeID(); + } + + late final _CFURLEnumeratorGetTypeIDPtr = + _lookup>( + 'CFURLEnumeratorGetTypeID'); + late final _CFURLEnumeratorGetTypeID = + _CFURLEnumeratorGetTypeIDPtr.asFunction(); + + CFURLEnumeratorRef CFURLEnumeratorCreateForDirectoryURL( + CFAllocatorRef alloc, + CFURLRef directoryURL, + int option, + CFArrayRef propertyKeys, + ) { + return _CFURLEnumeratorCreateForDirectoryURL( + alloc, + directoryURL, + option, + propertyKeys, + ); + } + + late final _CFURLEnumeratorCreateForDirectoryURLPtr = _lookup< + ffi.NativeFunction< + CFURLEnumeratorRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, + CFArrayRef)>>('CFURLEnumeratorCreateForDirectoryURL'); + late final _CFURLEnumeratorCreateForDirectoryURL = + _CFURLEnumeratorCreateForDirectoryURLPtr.asFunction< + CFURLEnumeratorRef Function( + CFAllocatorRef, CFURLRef, int, CFArrayRef)>(); + + CFURLEnumeratorRef CFURLEnumeratorCreateForMountedVolumes( + CFAllocatorRef alloc, + int option, + CFArrayRef propertyKeys, + ) { + return _CFURLEnumeratorCreateForMountedVolumes( + alloc, + option, + propertyKeys, + ); + } + + late final _CFURLEnumeratorCreateForMountedVolumesPtr = _lookup< + ffi.NativeFunction< + CFURLEnumeratorRef Function(CFAllocatorRef, ffi.Int32, + CFArrayRef)>>('CFURLEnumeratorCreateForMountedVolumes'); + late final _CFURLEnumeratorCreateForMountedVolumes = + _CFURLEnumeratorCreateForMountedVolumesPtr.asFunction< + CFURLEnumeratorRef Function(CFAllocatorRef, int, CFArrayRef)>(); + + int CFURLEnumeratorGetNextURL( + CFURLEnumeratorRef enumerator, + ffi.Pointer url, + ffi.Pointer error, + ) { + return _CFURLEnumeratorGetNextURL( + enumerator, + url, + error, + ); + } + + late final _CFURLEnumeratorGetNextURLPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFURLEnumeratorRef, ffi.Pointer, + ffi.Pointer)>>('CFURLEnumeratorGetNextURL'); + late final _CFURLEnumeratorGetNextURL = + _CFURLEnumeratorGetNextURLPtr.asFunction< + int Function(CFURLEnumeratorRef, ffi.Pointer, + ffi.Pointer)>(); + + void CFURLEnumeratorSkipDescendents( + CFURLEnumeratorRef enumerator, + ) { + return _CFURLEnumeratorSkipDescendents( + enumerator, + ); + } + + late final _CFURLEnumeratorSkipDescendentsPtr = + _lookup>( + 'CFURLEnumeratorSkipDescendents'); + late final _CFURLEnumeratorSkipDescendents = + _CFURLEnumeratorSkipDescendentsPtr.asFunction< + void Function(CFURLEnumeratorRef)>(); + + int CFURLEnumeratorGetDescendentLevel( + CFURLEnumeratorRef enumerator, + ) { + return _CFURLEnumeratorGetDescendentLevel( + enumerator, + ); + } + + late final _CFURLEnumeratorGetDescendentLevelPtr = + _lookup>( + 'CFURLEnumeratorGetDescendentLevel'); + late final _CFURLEnumeratorGetDescendentLevel = + _CFURLEnumeratorGetDescendentLevelPtr.asFunction< + int Function(CFURLEnumeratorRef)>(); + + int CFURLEnumeratorGetSourceDidChange( + CFURLEnumeratorRef enumerator, + ) { + return _CFURLEnumeratorGetSourceDidChange( + enumerator, + ); + } + + late final _CFURLEnumeratorGetSourceDidChangePtr = + _lookup>( + 'CFURLEnumeratorGetSourceDidChange'); + late final _CFURLEnumeratorGetSourceDidChange = + _CFURLEnumeratorGetSourceDidChangePtr.asFunction< + int Function(CFURLEnumeratorRef)>(); + + acl_t acl_dup( + acl_t acl, + ) { + return _acl_dup( + acl, + ); + } + + late final _acl_dupPtr = + _lookup>('acl_dup'); + late final _acl_dup = _acl_dupPtr.asFunction(); + + int acl_free( + ffi.Pointer obj_p, + ) { + return _acl_free( + obj_p, + ); + } + + late final _acl_freePtr = + _lookup)>>( + 'acl_free'); + late final _acl_free = + _acl_freePtr.asFunction)>(); + + acl_t acl_init( + int count, + ) { + return _acl_init( + count, + ); + } + + late final _acl_initPtr = + _lookup>('acl_init'); + late final _acl_init = _acl_initPtr.asFunction(); + + int acl_copy_entry( + acl_entry_t dest_d, + acl_entry_t src_d, + ) { + return _acl_copy_entry( + dest_d, + src_d, + ); + } + + late final _acl_copy_entryPtr = + _lookup>( + 'acl_copy_entry'); + late final _acl_copy_entry = + _acl_copy_entryPtr.asFunction(); + + int acl_create_entry( + ffi.Pointer acl_p, + ffi.Pointer entry_p, + ) { + return _acl_create_entry( + acl_p, + entry_p, + ); + } + + late final _acl_create_entryPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('acl_create_entry'); + late final _acl_create_entry = _acl_create_entryPtr + .asFunction, ffi.Pointer)>(); + + int acl_create_entry_np( + ffi.Pointer acl_p, + ffi.Pointer entry_p, + int entry_index, + ) { + return _acl_create_entry_np( + acl_p, + entry_p, + entry_index, + ); + } + + late final _acl_create_entry_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('acl_create_entry_np'); + late final _acl_create_entry_np = _acl_create_entry_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + int acl_delete_entry( + acl_t acl, + acl_entry_t entry_d, + ) { + return _acl_delete_entry( + acl, + entry_d, + ); + } + + late final _acl_delete_entryPtr = + _lookup>( + 'acl_delete_entry'); + late final _acl_delete_entry = + _acl_delete_entryPtr.asFunction(); + + int acl_get_entry( + acl_t acl, + int entry_id, + ffi.Pointer entry_p, + ) { + return _acl_get_entry( + acl, + entry_id, + entry_p, + ); + } + + late final _acl_get_entryPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + acl_t, ffi.Int, ffi.Pointer)>>('acl_get_entry'); + late final _acl_get_entry = _acl_get_entryPtr + .asFunction)>(); + + int acl_valid( + acl_t acl, + ) { + return _acl_valid( + acl, + ); + } + + late final _acl_validPtr = + _lookup>('acl_valid'); + late final _acl_valid = _acl_validPtr.asFunction(); + + int acl_valid_fd_np( + int fd, + int type, + acl_t acl, + ) { + return _acl_valid_fd_np( + fd, + type, + acl, + ); + } + + late final _acl_valid_fd_npPtr = + _lookup>( + 'acl_valid_fd_np'); + late final _acl_valid_fd_np = + _acl_valid_fd_npPtr.asFunction(); + + int acl_valid_file_np( + ffi.Pointer path, + int type, + acl_t acl, + ) { + return _acl_valid_file_np( + path, + type, + acl, + ); + } + + late final _acl_valid_file_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int32, acl_t)>>('acl_valid_file_np'); + late final _acl_valid_file_np = _acl_valid_file_npPtr + .asFunction, int, acl_t)>(); + + int acl_valid_link_np( + ffi.Pointer path, + int type, + acl_t acl, + ) { + return _acl_valid_link_np( + path, + type, + acl, + ); + } + + late final _acl_valid_link_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int32, acl_t)>>('acl_valid_link_np'); + late final _acl_valid_link_np = _acl_valid_link_npPtr + .asFunction, int, acl_t)>(); + + int acl_add_perm( + acl_permset_t permset_d, + int perm, + ) { + return _acl_add_perm( + permset_d, + perm, + ); + } + + late final _acl_add_permPtr = + _lookup>( + 'acl_add_perm'); + late final _acl_add_perm = + _acl_add_permPtr.asFunction(); + + int acl_calc_mask( + ffi.Pointer acl_p, + ) { + return _acl_calc_mask( + acl_p, + ); + } + + late final _acl_calc_maskPtr = + _lookup)>>( + 'acl_calc_mask'); + late final _acl_calc_mask = + _acl_calc_maskPtr.asFunction)>(); + + int acl_clear_perms( + acl_permset_t permset_d, + ) { + return _acl_clear_perms( + permset_d, + ); + } + + late final _acl_clear_permsPtr = + _lookup>( + 'acl_clear_perms'); + late final _acl_clear_perms = + _acl_clear_permsPtr.asFunction(); + + int acl_delete_perm( + acl_permset_t permset_d, + int perm, + ) { + return _acl_delete_perm( + permset_d, + perm, + ); + } + + late final _acl_delete_permPtr = + _lookup>( + 'acl_delete_perm'); + late final _acl_delete_perm = + _acl_delete_permPtr.asFunction(); + + int acl_get_perm_np( + acl_permset_t permset_d, + int perm, + ) { + return _acl_get_perm_np( + permset_d, + perm, + ); + } + + late final _acl_get_perm_npPtr = + _lookup>( + 'acl_get_perm_np'); + late final _acl_get_perm_np = + _acl_get_perm_npPtr.asFunction(); + + int acl_get_permset( + acl_entry_t entry_d, + ffi.Pointer permset_p, + ) { + return _acl_get_permset( + entry_d, + permset_p, + ); + } + + late final _acl_get_permsetPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + acl_entry_t, ffi.Pointer)>>('acl_get_permset'); + late final _acl_get_permset = _acl_get_permsetPtr + .asFunction)>(); + + int acl_set_permset( + acl_entry_t entry_d, + acl_permset_t permset_d, + ) { + return _acl_set_permset( + entry_d, + permset_d, + ); + } + + late final _acl_set_permsetPtr = + _lookup>( + 'acl_set_permset'); + late final _acl_set_permset = _acl_set_permsetPtr + .asFunction(); + + int acl_maximal_permset_mask_np( + ffi.Pointer mask_p, + ) { + return _acl_maximal_permset_mask_np( + mask_p, + ); + } + + late final _acl_maximal_permset_mask_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer)>>('acl_maximal_permset_mask_np'); + late final _acl_maximal_permset_mask_np = _acl_maximal_permset_mask_npPtr + .asFunction)>(); + + int acl_get_permset_mask_np( + acl_entry_t entry_d, + ffi.Pointer mask_p, + ) { + return _acl_get_permset_mask_np( + entry_d, + mask_p, + ); + } + + late final _acl_get_permset_mask_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(acl_entry_t, + ffi.Pointer)>>('acl_get_permset_mask_np'); + late final _acl_get_permset_mask_np = _acl_get_permset_mask_npPtr + .asFunction)>(); + + int acl_set_permset_mask_np( + acl_entry_t entry_d, + int mask, + ) { + return _acl_set_permset_mask_np( + entry_d, + mask, + ); + } + + late final _acl_set_permset_mask_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + acl_entry_t, acl_permset_mask_t)>>('acl_set_permset_mask_np'); + late final _acl_set_permset_mask_np = + _acl_set_permset_mask_npPtr.asFunction(); + + int acl_add_flag_np( + acl_flagset_t flagset_d, + int flag, + ) { + return _acl_add_flag_np( + flagset_d, + flag, + ); + } + + late final _acl_add_flag_npPtr = + _lookup>( + 'acl_add_flag_np'); + late final _acl_add_flag_np = + _acl_add_flag_npPtr.asFunction(); + + int acl_clear_flags_np( + acl_flagset_t flagset_d, + ) { + return _acl_clear_flags_np( + flagset_d, + ); + } + + late final _acl_clear_flags_npPtr = + _lookup>( + 'acl_clear_flags_np'); + late final _acl_clear_flags_np = + _acl_clear_flags_npPtr.asFunction(); + + int acl_delete_flag_np( + acl_flagset_t flagset_d, + int flag, + ) { + return _acl_delete_flag_np( + flagset_d, + flag, + ); + } + + late final _acl_delete_flag_npPtr = + _lookup>( + 'acl_delete_flag_np'); + late final _acl_delete_flag_np = + _acl_delete_flag_npPtr.asFunction(); + + int acl_get_flag_np( + acl_flagset_t flagset_d, + int flag, + ) { + return _acl_get_flag_np( + flagset_d, + flag, + ); + } + + late final _acl_get_flag_npPtr = + _lookup>( + 'acl_get_flag_np'); + late final _acl_get_flag_np = + _acl_get_flag_npPtr.asFunction(); + + int acl_get_flagset_np( + ffi.Pointer obj_p, + ffi.Pointer flagset_p, + ) { + return _acl_get_flagset_np( + obj_p, + flagset_p, + ); + } + + late final _acl_get_flagset_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('acl_get_flagset_np'); + late final _acl_get_flagset_np = _acl_get_flagset_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + int acl_set_flagset_np( + ffi.Pointer obj_p, + acl_flagset_t flagset_d, + ) { + return _acl_set_flagset_np( + obj_p, + flagset_d, + ); + } + + late final _acl_set_flagset_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, acl_flagset_t)>>('acl_set_flagset_np'); + late final _acl_set_flagset_np = _acl_set_flagset_npPtr + .asFunction, acl_flagset_t)>(); + + ffi.Pointer acl_get_qualifier( + acl_entry_t entry_d, + ) { + return _acl_get_qualifier( + entry_d, + ); + } + + late final _acl_get_qualifierPtr = + _lookup Function(acl_entry_t)>>( + 'acl_get_qualifier'); + late final _acl_get_qualifier = _acl_get_qualifierPtr + .asFunction Function(acl_entry_t)>(); + + int acl_get_tag_type( + acl_entry_t entry_d, + ffi.Pointer tag_type_p, + ) { + return _acl_get_tag_type( + entry_d, + tag_type_p, + ); + } + + late final _acl_get_tag_typePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + acl_entry_t, ffi.Pointer)>>('acl_get_tag_type'); + late final _acl_get_tag_type = _acl_get_tag_typePtr + .asFunction)>(); + + int acl_set_qualifier( + acl_entry_t entry_d, + ffi.Pointer tag_qualifier_p, + ) { + return _acl_set_qualifier( + entry_d, + tag_qualifier_p, + ); + } + + late final _acl_set_qualifierPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + acl_entry_t, ffi.Pointer)>>('acl_set_qualifier'); + late final _acl_set_qualifier = _acl_set_qualifierPtr + .asFunction)>(); + + int acl_set_tag_type( + acl_entry_t entry_d, + int tag_type, + ) { + return _acl_set_tag_type( + entry_d, + tag_type, + ); + } + + late final _acl_set_tag_typePtr = + _lookup>( + 'acl_set_tag_type'); + late final _acl_set_tag_type = + _acl_set_tag_typePtr.asFunction(); + + int acl_delete_def_file( + ffi.Pointer path_p, + ) { + return _acl_delete_def_file( + path_p, + ); + } + + late final _acl_delete_def_filePtr = + _lookup)>>( + 'acl_delete_def_file'); + late final _acl_delete_def_file = + _acl_delete_def_filePtr.asFunction)>(); + + acl_t acl_get_fd( + int fd, + ) { + return _acl_get_fd( + fd, + ); + } + + late final _acl_get_fdPtr = + _lookup>('acl_get_fd'); + late final _acl_get_fd = _acl_get_fdPtr.asFunction(); + + acl_t acl_get_fd_np( + int fd, + int type, + ) { + return _acl_get_fd_np( + fd, + type, + ); + } + + late final _acl_get_fd_npPtr = + _lookup>( + 'acl_get_fd_np'); + late final _acl_get_fd_np = + _acl_get_fd_npPtr.asFunction(); + + acl_t acl_get_file( + ffi.Pointer path_p, + int type, + ) { + return _acl_get_file( + path_p, + type, + ); + } + + late final _acl_get_filePtr = _lookup< + ffi.NativeFunction, ffi.Int32)>>( + 'acl_get_file'); + late final _acl_get_file = + _acl_get_filePtr.asFunction, int)>(); + + acl_t acl_get_link_np( + ffi.Pointer path_p, + int type, + ) { + return _acl_get_link_np( + path_p, + type, + ); + } + + late final _acl_get_link_npPtr = _lookup< + ffi.NativeFunction, ffi.Int32)>>( + 'acl_get_link_np'); + late final _acl_get_link_np = _acl_get_link_npPtr + .asFunction, int)>(); + + int acl_set_fd( + int fd, + acl_t acl, + ) { + return _acl_set_fd( + fd, + acl, + ); + } + + late final _acl_set_fdPtr = + _lookup>( + 'acl_set_fd'); + late final _acl_set_fd = + _acl_set_fdPtr.asFunction(); + + int acl_set_fd_np( + int fd, + acl_t acl, + int acl_type, + ) { + return _acl_set_fd_np( + fd, + acl, + acl_type, + ); + } + + late final _acl_set_fd_npPtr = + _lookup>( + 'acl_set_fd_np'); + late final _acl_set_fd_np = + _acl_set_fd_npPtr.asFunction(); + + int acl_set_file( + ffi.Pointer path_p, + int type, + acl_t acl, + ) { + return _acl_set_file( + path_p, + type, + acl, + ); + } + + late final _acl_set_filePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int32, acl_t)>>('acl_set_file'); + late final _acl_set_file = _acl_set_filePtr + .asFunction, int, acl_t)>(); + + int acl_set_link_np( + ffi.Pointer path_p, + int type, + acl_t acl, + ) { + return _acl_set_link_np( + path_p, + type, + acl, + ); + } + + late final _acl_set_link_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int32, acl_t)>>('acl_set_link_np'); + late final _acl_set_link_np = _acl_set_link_npPtr + .asFunction, int, acl_t)>(); + + int acl_copy_ext( + ffi.Pointer buf_p, + acl_t acl, + int size, + ) { + return _acl_copy_ext( + buf_p, + acl, + size, + ); + } + + late final _acl_copy_extPtr = _lookup< + ffi.NativeFunction< + ssize_t Function( + ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext'); + late final _acl_copy_ext = _acl_copy_extPtr + .asFunction, acl_t, int)>(); + + int acl_copy_ext_native( + ffi.Pointer buf_p, + acl_t acl, + int size, + ) { + return _acl_copy_ext_native( + buf_p, + acl, + size, + ); + } + + late final _acl_copy_ext_nativePtr = _lookup< + ffi.NativeFunction< + ssize_t Function( + ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext_native'); + late final _acl_copy_ext_native = _acl_copy_ext_nativePtr + .asFunction, acl_t, int)>(); + + acl_t acl_copy_int( + ffi.Pointer buf_p, + ) { + return _acl_copy_int( + buf_p, + ); + } + + late final _acl_copy_intPtr = + _lookup)>>( + 'acl_copy_int'); + late final _acl_copy_int = + _acl_copy_intPtr.asFunction)>(); + + acl_t acl_copy_int_native( + ffi.Pointer buf_p, + ) { + return _acl_copy_int_native( + buf_p, + ); + } + + late final _acl_copy_int_nativePtr = + _lookup)>>( + 'acl_copy_int_native'); + late final _acl_copy_int_native = _acl_copy_int_nativePtr + .asFunction)>(); + + acl_t acl_from_text( + ffi.Pointer buf_p, + ) { + return _acl_from_text( + buf_p, + ); + } + + late final _acl_from_textPtr = + _lookup)>>( + 'acl_from_text'); + late final _acl_from_text = + _acl_from_textPtr.asFunction)>(); + + int acl_size( + acl_t acl, + ) { + return _acl_size( + acl, + ); + } + + late final _acl_sizePtr = + _lookup>('acl_size'); + late final _acl_size = _acl_sizePtr.asFunction(); + + ffi.Pointer acl_to_text( + acl_t acl, + ffi.Pointer len_p, + ) { + return _acl_to_text( + acl, + len_p, + ); + } + + late final _acl_to_textPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + acl_t, ffi.Pointer)>>('acl_to_text'); + late final _acl_to_text = _acl_to_textPtr.asFunction< + ffi.Pointer Function(acl_t, ffi.Pointer)>(); + + int CFFileSecurityGetTypeID() { + return _CFFileSecurityGetTypeID(); + } + + late final _CFFileSecurityGetTypeIDPtr = + _lookup>( + 'CFFileSecurityGetTypeID'); + late final _CFFileSecurityGetTypeID = + _CFFileSecurityGetTypeIDPtr.asFunction(); + + CFFileSecurityRef CFFileSecurityCreate( + CFAllocatorRef allocator, + ) { + return _CFFileSecurityCreate( + allocator, + ); + } + + late final _CFFileSecurityCreatePtr = + _lookup>( + 'CFFileSecurityCreate'); + late final _CFFileSecurityCreate = _CFFileSecurityCreatePtr.asFunction< + CFFileSecurityRef Function(CFAllocatorRef)>(); + + CFFileSecurityRef CFFileSecurityCreateCopy( + CFAllocatorRef allocator, + CFFileSecurityRef fileSec, + ) { + return _CFFileSecurityCreateCopy( + allocator, + fileSec, + ); + } + + late final _CFFileSecurityCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFFileSecurityRef Function( + CFAllocatorRef, CFFileSecurityRef)>>('CFFileSecurityCreateCopy'); + late final _CFFileSecurityCreateCopy = + _CFFileSecurityCreateCopyPtr.asFunction< + CFFileSecurityRef Function(CFAllocatorRef, CFFileSecurityRef)>(); + + int CFFileSecurityCopyOwnerUUID( + CFFileSecurityRef fileSec, + ffi.Pointer ownerUUID, + ) { + return _CFFileSecurityCopyOwnerUUID( + fileSec, + ownerUUID, + ); + } + + late final _CFFileSecurityCopyOwnerUUIDPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyOwnerUUID'); + late final _CFFileSecurityCopyOwnerUUID = _CFFileSecurityCopyOwnerUUIDPtr + .asFunction)>(); + + int CFFileSecuritySetOwnerUUID( + CFFileSecurityRef fileSec, + CFUUIDRef ownerUUID, + ) { + return _CFFileSecuritySetOwnerUUID( + fileSec, + ownerUUID, + ); + } + + late final _CFFileSecuritySetOwnerUUIDPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecuritySetOwnerUUID'); + late final _CFFileSecuritySetOwnerUUID = _CFFileSecuritySetOwnerUUIDPtr + .asFunction(); + + int CFFileSecurityCopyGroupUUID( + CFFileSecurityRef fileSec, + ffi.Pointer groupUUID, + ) { + return _CFFileSecurityCopyGroupUUID( + fileSec, + groupUUID, + ); + } + + late final _CFFileSecurityCopyGroupUUIDPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyGroupUUID'); + late final _CFFileSecurityCopyGroupUUID = _CFFileSecurityCopyGroupUUIDPtr + .asFunction)>(); + + int CFFileSecuritySetGroupUUID( + CFFileSecurityRef fileSec, + CFUUIDRef groupUUID, + ) { + return _CFFileSecuritySetGroupUUID( + fileSec, + groupUUID, + ); + } + + late final _CFFileSecuritySetGroupUUIDPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecuritySetGroupUUID'); + late final _CFFileSecuritySetGroupUUID = _CFFileSecuritySetGroupUUIDPtr + .asFunction(); + + int CFFileSecurityCopyAccessControlList( + CFFileSecurityRef fileSec, + ffi.Pointer accessControlList, + ) { + return _CFFileSecurityCopyAccessControlList( + fileSec, + accessControlList, + ); + } + + late final _CFFileSecurityCopyAccessControlListPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyAccessControlList'); + late final _CFFileSecurityCopyAccessControlList = + _CFFileSecurityCopyAccessControlListPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); + + int CFFileSecuritySetAccessControlList( + CFFileSecurityRef fileSec, + acl_t accessControlList, + ) { + return _CFFileSecuritySetAccessControlList( + fileSec, + accessControlList, + ); + } + + late final _CFFileSecuritySetAccessControlListPtr = + _lookup>( + 'CFFileSecuritySetAccessControlList'); + late final _CFFileSecuritySetAccessControlList = + _CFFileSecuritySetAccessControlListPtr.asFunction< + int Function(CFFileSecurityRef, acl_t)>(); + + int CFFileSecurityGetOwner( + CFFileSecurityRef fileSec, + ffi.Pointer owner, + ) { + return _CFFileSecurityGetOwner( + fileSec, + owner, + ); + } + + late final _CFFileSecurityGetOwnerPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetOwner'); + late final _CFFileSecurityGetOwner = _CFFileSecurityGetOwnerPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); + + int CFFileSecuritySetOwner( + CFFileSecurityRef fileSec, + int owner, + ) { + return _CFFileSecuritySetOwner( + fileSec, + owner, + ); + } + + late final _CFFileSecuritySetOwnerPtr = + _lookup>( + 'CFFileSecuritySetOwner'); + late final _CFFileSecuritySetOwner = _CFFileSecuritySetOwnerPtr.asFunction< + int Function(CFFileSecurityRef, int)>(); + + int CFFileSecurityGetGroup( + CFFileSecurityRef fileSec, + ffi.Pointer group, + ) { + return _CFFileSecurityGetGroup( + fileSec, + group, + ); + } + + late final _CFFileSecurityGetGroupPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetGroup'); + late final _CFFileSecurityGetGroup = _CFFileSecurityGetGroupPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); + + int CFFileSecuritySetGroup( + CFFileSecurityRef fileSec, + int group, + ) { + return _CFFileSecuritySetGroup( + fileSec, + group, + ); + } + + late final _CFFileSecuritySetGroupPtr = + _lookup>( + 'CFFileSecuritySetGroup'); + late final _CFFileSecuritySetGroup = _CFFileSecuritySetGroupPtr.asFunction< + int Function(CFFileSecurityRef, int)>(); + + int CFFileSecurityGetMode( + CFFileSecurityRef fileSec, + ffi.Pointer mode, + ) { + return _CFFileSecurityGetMode( + fileSec, + mode, + ); + } + + late final _CFFileSecurityGetModePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetMode'); + late final _CFFileSecurityGetMode = _CFFileSecurityGetModePtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); + + int CFFileSecuritySetMode( + CFFileSecurityRef fileSec, + int mode, + ) { + return _CFFileSecuritySetMode( + fileSec, + mode, + ); + } + + late final _CFFileSecuritySetModePtr = + _lookup>( + 'CFFileSecuritySetMode'); + late final _CFFileSecuritySetMode = _CFFileSecuritySetModePtr.asFunction< + int Function(CFFileSecurityRef, int)>(); + + int CFFileSecurityClearProperties( + CFFileSecurityRef fileSec, + int clearPropertyMask, + ) { + return _CFFileSecurityClearProperties( + fileSec, + clearPropertyMask, + ); + } + + late final _CFFileSecurityClearPropertiesPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecurityClearProperties'); + late final _CFFileSecurityClearProperties = _CFFileSecurityClearPropertiesPtr + .asFunction(); + + CFStringRef CFStringTokenizerCopyBestStringLanguage( + CFStringRef string, + CFRange range, + ) { + return _CFStringTokenizerCopyBestStringLanguage( + string, + range, + ); + } + + late final _CFStringTokenizerCopyBestStringLanguagePtr = + _lookup>( + 'CFStringTokenizerCopyBestStringLanguage'); + late final _CFStringTokenizerCopyBestStringLanguage = + _CFStringTokenizerCopyBestStringLanguagePtr.asFunction< + CFStringRef Function(CFStringRef, CFRange)>(); + + int CFStringTokenizerGetTypeID() { + return _CFStringTokenizerGetTypeID(); + } + + late final _CFStringTokenizerGetTypeIDPtr = + _lookup>( + 'CFStringTokenizerGetTypeID'); + late final _CFStringTokenizerGetTypeID = + _CFStringTokenizerGetTypeIDPtr.asFunction(); + + CFStringTokenizerRef CFStringTokenizerCreate( + CFAllocatorRef alloc, + CFStringRef string, + CFRange range, + int options, + CFLocaleRef locale, + ) { + return _CFStringTokenizerCreate( + alloc, + string, + range, + options, + locale, + ); + } + + late final _CFStringTokenizerCreatePtr = _lookup< + ffi.NativeFunction< + CFStringTokenizerRef Function(CFAllocatorRef, CFStringRef, CFRange, + CFOptionFlags, CFLocaleRef)>>('CFStringTokenizerCreate'); + late final _CFStringTokenizerCreate = _CFStringTokenizerCreatePtr.asFunction< + CFStringTokenizerRef Function( + CFAllocatorRef, CFStringRef, CFRange, int, CFLocaleRef)>(); + + void CFStringTokenizerSetString( + CFStringTokenizerRef tokenizer, + CFStringRef string, + CFRange range, + ) { + return _CFStringTokenizerSetString( + tokenizer, + string, + range, + ); + } + + late final _CFStringTokenizerSetStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringTokenizerRef, CFStringRef, + CFRange)>>('CFStringTokenizerSetString'); + late final _CFStringTokenizerSetString = _CFStringTokenizerSetStringPtr + .asFunction(); + + int CFStringTokenizerGoToTokenAtIndex( + CFStringTokenizerRef tokenizer, + int index, + ) { + return _CFStringTokenizerGoToTokenAtIndex( + tokenizer, + index, + ); + } + + late final _CFStringTokenizerGoToTokenAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFStringTokenizerRef, + CFIndex)>>('CFStringTokenizerGoToTokenAtIndex'); + late final _CFStringTokenizerGoToTokenAtIndex = + _CFStringTokenizerGoToTokenAtIndexPtr.asFunction< + int Function(CFStringTokenizerRef, int)>(); + + int CFStringTokenizerAdvanceToNextToken( + CFStringTokenizerRef tokenizer, + ) { + return _CFStringTokenizerAdvanceToNextToken( + tokenizer, + ); + } + + late final _CFStringTokenizerAdvanceToNextTokenPtr = + _lookup>( + 'CFStringTokenizerAdvanceToNextToken'); + late final _CFStringTokenizerAdvanceToNextToken = + _CFStringTokenizerAdvanceToNextTokenPtr.asFunction< + int Function(CFStringTokenizerRef)>(); + + CFRange CFStringTokenizerGetCurrentTokenRange( + CFStringTokenizerRef tokenizer, + ) { + return _CFStringTokenizerGetCurrentTokenRange( + tokenizer, + ); + } + + late final _CFStringTokenizerGetCurrentTokenRangePtr = + _lookup>( + 'CFStringTokenizerGetCurrentTokenRange'); + late final _CFStringTokenizerGetCurrentTokenRange = + _CFStringTokenizerGetCurrentTokenRangePtr.asFunction< + CFRange Function(CFStringTokenizerRef)>(); + + CFTypeRef CFStringTokenizerCopyCurrentTokenAttribute( + CFStringTokenizerRef tokenizer, + int attribute, + ) { + return _CFStringTokenizerCopyCurrentTokenAttribute( + tokenizer, + attribute, + ); + } + + late final _CFStringTokenizerCopyCurrentTokenAttributePtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFStringTokenizerRef, + CFOptionFlags)>>('CFStringTokenizerCopyCurrentTokenAttribute'); + late final _CFStringTokenizerCopyCurrentTokenAttribute = + _CFStringTokenizerCopyCurrentTokenAttributePtr.asFunction< + CFTypeRef Function(CFStringTokenizerRef, int)>(); + + int CFStringTokenizerGetCurrentSubTokens( + CFStringTokenizerRef tokenizer, + ffi.Pointer ranges, + int maxRangeLength, + CFMutableArrayRef derivedSubTokens, + ) { + return _CFStringTokenizerGetCurrentSubTokens( + tokenizer, + ranges, + maxRangeLength, + derivedSubTokens, + ); + } + + late final _CFStringTokenizerGetCurrentSubTokensPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFStringTokenizerRef, ffi.Pointer, CFIndex, + CFMutableArrayRef)>>('CFStringTokenizerGetCurrentSubTokens'); + late final _CFStringTokenizerGetCurrentSubTokens = + _CFStringTokenizerGetCurrentSubTokensPtr.asFunction< + int Function(CFStringTokenizerRef, ffi.Pointer, int, + CFMutableArrayRef)>(); + + int CFFileDescriptorGetTypeID() { + return _CFFileDescriptorGetTypeID(); + } + + late final _CFFileDescriptorGetTypeIDPtr = + _lookup>( + 'CFFileDescriptorGetTypeID'); + late final _CFFileDescriptorGetTypeID = + _CFFileDescriptorGetTypeIDPtr.asFunction(); + + CFFileDescriptorRef CFFileDescriptorCreate( + CFAllocatorRef allocator, + int fd, + int closeOnInvalidate, + CFFileDescriptorCallBack callout, + ffi.Pointer context, + ) { + return _CFFileDescriptorCreate( + allocator, + fd, + closeOnInvalidate, + callout, + context, + ); + } + + late final _CFFileDescriptorCreatePtr = _lookup< + ffi.NativeFunction< + CFFileDescriptorRef Function( + CFAllocatorRef, + CFFileDescriptorNativeDescriptor, + Boolean, + CFFileDescriptorCallBack, + ffi.Pointer)>>('CFFileDescriptorCreate'); + late final _CFFileDescriptorCreate = _CFFileDescriptorCreatePtr.asFunction< + CFFileDescriptorRef Function(CFAllocatorRef, int, int, + CFFileDescriptorCallBack, ffi.Pointer)>(); + + int CFFileDescriptorGetNativeDescriptor( + CFFileDescriptorRef f, + ) { + return _CFFileDescriptorGetNativeDescriptor( + f, + ); + } + + late final _CFFileDescriptorGetNativeDescriptorPtr = _lookup< + ffi.NativeFunction< + CFFileDescriptorNativeDescriptor Function( + CFFileDescriptorRef)>>('CFFileDescriptorGetNativeDescriptor'); + late final _CFFileDescriptorGetNativeDescriptor = + _CFFileDescriptorGetNativeDescriptorPtr.asFunction< + int Function(CFFileDescriptorRef)>(); + + void CFFileDescriptorGetContext( + CFFileDescriptorRef f, + ffi.Pointer context, + ) { + return _CFFileDescriptorGetContext( + f, + context, + ); + } + + late final _CFFileDescriptorGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFFileDescriptorRef, ffi.Pointer)>>( + 'CFFileDescriptorGetContext'); + late final _CFFileDescriptorGetContext = + _CFFileDescriptorGetContextPtr.asFunction< + void Function( + CFFileDescriptorRef, ffi.Pointer)>(); + + void CFFileDescriptorEnableCallBacks( + CFFileDescriptorRef f, + int callBackTypes, + ) { + return _CFFileDescriptorEnableCallBacks( + f, + callBackTypes, + ); + } + + late final _CFFileDescriptorEnableCallBacksPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFFileDescriptorRef, + CFOptionFlags)>>('CFFileDescriptorEnableCallBacks'); + late final _CFFileDescriptorEnableCallBacks = + _CFFileDescriptorEnableCallBacksPtr.asFunction< + void Function(CFFileDescriptorRef, int)>(); + + void CFFileDescriptorDisableCallBacks( + CFFileDescriptorRef f, + int callBackTypes, + ) { + return _CFFileDescriptorDisableCallBacks( + f, + callBackTypes, + ); + } + + late final _CFFileDescriptorDisableCallBacksPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFFileDescriptorRef, + CFOptionFlags)>>('CFFileDescriptorDisableCallBacks'); + late final _CFFileDescriptorDisableCallBacks = + _CFFileDescriptorDisableCallBacksPtr.asFunction< + void Function(CFFileDescriptorRef, int)>(); + + void CFFileDescriptorInvalidate( + CFFileDescriptorRef f, + ) { + return _CFFileDescriptorInvalidate( + f, + ); + } + + late final _CFFileDescriptorInvalidatePtr = + _lookup>( + 'CFFileDescriptorInvalidate'); + late final _CFFileDescriptorInvalidate = _CFFileDescriptorInvalidatePtr + .asFunction(); + + int CFFileDescriptorIsValid( + CFFileDescriptorRef f, + ) { + return _CFFileDescriptorIsValid( + f, + ); + } + + late final _CFFileDescriptorIsValidPtr = + _lookup>( + 'CFFileDescriptorIsValid'); + late final _CFFileDescriptorIsValid = _CFFileDescriptorIsValidPtr.asFunction< + int Function(CFFileDescriptorRef)>(); + + CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource( + CFAllocatorRef allocator, + CFFileDescriptorRef f, + int order, + ) { + return _CFFileDescriptorCreateRunLoopSource( + allocator, + f, + order, + ); + } + + late final _CFFileDescriptorCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFFileDescriptorRef, + CFIndex)>>('CFFileDescriptorCreateRunLoopSource'); + late final _CFFileDescriptorCreateRunLoopSource = + _CFFileDescriptorCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function( + CFAllocatorRef, CFFileDescriptorRef, int)>(); + + int CFUserNotificationGetTypeID() { + return _CFUserNotificationGetTypeID(); + } + + late final _CFUserNotificationGetTypeIDPtr = + _lookup>( + 'CFUserNotificationGetTypeID'); + late final _CFUserNotificationGetTypeID = + _CFUserNotificationGetTypeIDPtr.asFunction(); + + CFUserNotificationRef CFUserNotificationCreate( + CFAllocatorRef allocator, + double timeout, + int flags, + ffi.Pointer error, + CFDictionaryRef dictionary, + ) { + return _CFUserNotificationCreate( + allocator, + timeout, + flags, + error, + dictionary, + ); + } + + late final _CFUserNotificationCreatePtr = _lookup< + ffi.NativeFunction< + CFUserNotificationRef Function( + CFAllocatorRef, + CFTimeInterval, + CFOptionFlags, + ffi.Pointer, + CFDictionaryRef)>>('CFUserNotificationCreate'); + late final _CFUserNotificationCreate = + _CFUserNotificationCreatePtr.asFunction< + CFUserNotificationRef Function(CFAllocatorRef, double, int, + ffi.Pointer, CFDictionaryRef)>(); + + int CFUserNotificationReceiveResponse( + CFUserNotificationRef userNotification, + double timeout, + ffi.Pointer responseFlags, + ) { + return _CFUserNotificationReceiveResponse( + userNotification, + timeout, + responseFlags, + ); + } + + late final _CFUserNotificationReceiveResponsePtr = _lookup< + ffi.NativeFunction< + SInt32 Function(CFUserNotificationRef, CFTimeInterval, + ffi.Pointer)>>( + 'CFUserNotificationReceiveResponse'); + late final _CFUserNotificationReceiveResponse = + _CFUserNotificationReceiveResponsePtr.asFunction< + int Function( + CFUserNotificationRef, double, ffi.Pointer)>(); + + CFStringRef CFUserNotificationGetResponseValue( + CFUserNotificationRef userNotification, + CFStringRef key, + int idx, + ) { + return _CFUserNotificationGetResponseValue( + userNotification, + key, + idx, + ); + } + + late final _CFUserNotificationGetResponseValuePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFUserNotificationRef, CFStringRef, + CFIndex)>>('CFUserNotificationGetResponseValue'); + late final _CFUserNotificationGetResponseValue = + _CFUserNotificationGetResponseValuePtr.asFunction< + CFStringRef Function(CFUserNotificationRef, CFStringRef, int)>(); + + CFDictionaryRef CFUserNotificationGetResponseDictionary( + CFUserNotificationRef userNotification, + ) { + return _CFUserNotificationGetResponseDictionary( + userNotification, + ); + } + + late final _CFUserNotificationGetResponseDictionaryPtr = _lookup< + ffi.NativeFunction>( + 'CFUserNotificationGetResponseDictionary'); + late final _CFUserNotificationGetResponseDictionary = + _CFUserNotificationGetResponseDictionaryPtr.asFunction< + CFDictionaryRef Function(CFUserNotificationRef)>(); + + int CFUserNotificationUpdate( + CFUserNotificationRef userNotification, + double timeout, + int flags, + CFDictionaryRef dictionary, + ) { + return _CFUserNotificationUpdate( + userNotification, + timeout, + flags, + dictionary, + ); + } + + late final _CFUserNotificationUpdatePtr = _lookup< + ffi.NativeFunction< + SInt32 Function(CFUserNotificationRef, CFTimeInterval, CFOptionFlags, + CFDictionaryRef)>>('CFUserNotificationUpdate'); + late final _CFUserNotificationUpdate = + _CFUserNotificationUpdatePtr.asFunction< + int Function(CFUserNotificationRef, double, int, CFDictionaryRef)>(); + + int CFUserNotificationCancel( + CFUserNotificationRef userNotification, + ) { + return _CFUserNotificationCancel( + userNotification, + ); + } + + late final _CFUserNotificationCancelPtr = + _lookup>( + 'CFUserNotificationCancel'); + late final _CFUserNotificationCancel = _CFUserNotificationCancelPtr + .asFunction(); + + CFRunLoopSourceRef CFUserNotificationCreateRunLoopSource( + CFAllocatorRef allocator, + CFUserNotificationRef userNotification, + CFUserNotificationCallBack callout, + int order, + ) { + return _CFUserNotificationCreateRunLoopSource( + allocator, + userNotification, + callout, + order, + ); + } + + late final _CFUserNotificationCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function( + CFAllocatorRef, + CFUserNotificationRef, + CFUserNotificationCallBack, + CFIndex)>>('CFUserNotificationCreateRunLoopSource'); + late final _CFUserNotificationCreateRunLoopSource = + _CFUserNotificationCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFUserNotificationRef, + CFUserNotificationCallBack, int)>(); + + int CFUserNotificationDisplayNotice( + double timeout, + int flags, + CFURLRef iconURL, + CFURLRef soundURL, + CFURLRef localizationURL, + CFStringRef alertHeader, + CFStringRef alertMessage, + CFStringRef defaultButtonTitle, + ) { + return _CFUserNotificationDisplayNotice( + timeout, + flags, + iconURL, + soundURL, + localizationURL, + alertHeader, + alertMessage, + defaultButtonTitle, + ); + } + + late final _CFUserNotificationDisplayNoticePtr = _lookup< + ffi.NativeFunction< + SInt32 Function( + CFTimeInterval, + CFOptionFlags, + CFURLRef, + CFURLRef, + CFURLRef, + CFStringRef, + CFStringRef, + CFStringRef)>>('CFUserNotificationDisplayNotice'); + late final _CFUserNotificationDisplayNotice = + _CFUserNotificationDisplayNoticePtr.asFunction< + int Function(double, int, CFURLRef, CFURLRef, CFURLRef, CFStringRef, + CFStringRef, CFStringRef)>(); + + int CFUserNotificationDisplayAlert( + double timeout, + int flags, + CFURLRef iconURL, + CFURLRef soundURL, + CFURLRef localizationURL, + CFStringRef alertHeader, + CFStringRef alertMessage, + CFStringRef defaultButtonTitle, + CFStringRef alternateButtonTitle, + CFStringRef otherButtonTitle, + ffi.Pointer responseFlags, + ) { + return _CFUserNotificationDisplayAlert( + timeout, + flags, + iconURL, + soundURL, + localizationURL, + alertHeader, + alertMessage, + defaultButtonTitle, + alternateButtonTitle, + otherButtonTitle, + responseFlags, + ); + } + + late final _CFUserNotificationDisplayAlertPtr = _lookup< + ffi.NativeFunction< + SInt32 Function( + CFTimeInterval, + CFOptionFlags, + CFURLRef, + CFURLRef, + CFURLRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + ffi.Pointer)>>('CFUserNotificationDisplayAlert'); + late final _CFUserNotificationDisplayAlert = + _CFUserNotificationDisplayAlertPtr.asFunction< + int Function( + double, + int, + CFURLRef, + CFURLRef, + CFURLRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + ffi.Pointer)>(); + + late final ffi.Pointer _kCFUserNotificationIconURLKey = + _lookup('kCFUserNotificationIconURLKey'); + + CFStringRef get kCFUserNotificationIconURLKey => + _kCFUserNotificationIconURLKey.value; + + set kCFUserNotificationIconURLKey(CFStringRef value) => + _kCFUserNotificationIconURLKey.value = value; + + late final ffi.Pointer _kCFUserNotificationSoundURLKey = + _lookup('kCFUserNotificationSoundURLKey'); + + CFStringRef get kCFUserNotificationSoundURLKey => + _kCFUserNotificationSoundURLKey.value; + + set kCFUserNotificationSoundURLKey(CFStringRef value) => + _kCFUserNotificationSoundURLKey.value = value; + + late final ffi.Pointer _kCFUserNotificationLocalizationURLKey = + _lookup('kCFUserNotificationLocalizationURLKey'); + + CFStringRef get kCFUserNotificationLocalizationURLKey => + _kCFUserNotificationLocalizationURLKey.value; + + set kCFUserNotificationLocalizationURLKey(CFStringRef value) => + _kCFUserNotificationLocalizationURLKey.value = value; + + late final ffi.Pointer _kCFUserNotificationAlertHeaderKey = + _lookup('kCFUserNotificationAlertHeaderKey'); + + CFStringRef get kCFUserNotificationAlertHeaderKey => + _kCFUserNotificationAlertHeaderKey.value; + + set kCFUserNotificationAlertHeaderKey(CFStringRef value) => + _kCFUserNotificationAlertHeaderKey.value = value; + + late final ffi.Pointer _kCFUserNotificationAlertMessageKey = + _lookup('kCFUserNotificationAlertMessageKey'); + + CFStringRef get kCFUserNotificationAlertMessageKey => + _kCFUserNotificationAlertMessageKey.value; + + set kCFUserNotificationAlertMessageKey(CFStringRef value) => + _kCFUserNotificationAlertMessageKey.value = value; + + late final ffi.Pointer + _kCFUserNotificationDefaultButtonTitleKey = + _lookup('kCFUserNotificationDefaultButtonTitleKey'); + + CFStringRef get kCFUserNotificationDefaultButtonTitleKey => + _kCFUserNotificationDefaultButtonTitleKey.value; + + set kCFUserNotificationDefaultButtonTitleKey(CFStringRef value) => + _kCFUserNotificationDefaultButtonTitleKey.value = value; + + late final ffi.Pointer + _kCFUserNotificationAlternateButtonTitleKey = + _lookup('kCFUserNotificationAlternateButtonTitleKey'); + + CFStringRef get kCFUserNotificationAlternateButtonTitleKey => + _kCFUserNotificationAlternateButtonTitleKey.value; + + set kCFUserNotificationAlternateButtonTitleKey(CFStringRef value) => + _kCFUserNotificationAlternateButtonTitleKey.value = value; + + late final ffi.Pointer _kCFUserNotificationOtherButtonTitleKey = + _lookup('kCFUserNotificationOtherButtonTitleKey'); + + CFStringRef get kCFUserNotificationOtherButtonTitleKey => + _kCFUserNotificationOtherButtonTitleKey.value; + + set kCFUserNotificationOtherButtonTitleKey(CFStringRef value) => + _kCFUserNotificationOtherButtonTitleKey.value = value; + + late final ffi.Pointer + _kCFUserNotificationProgressIndicatorValueKey = + _lookup('kCFUserNotificationProgressIndicatorValueKey'); + + CFStringRef get kCFUserNotificationProgressIndicatorValueKey => + _kCFUserNotificationProgressIndicatorValueKey.value; + + set kCFUserNotificationProgressIndicatorValueKey(CFStringRef value) => + _kCFUserNotificationProgressIndicatorValueKey.value = value; + + late final ffi.Pointer _kCFUserNotificationPopUpTitlesKey = + _lookup('kCFUserNotificationPopUpTitlesKey'); + + CFStringRef get kCFUserNotificationPopUpTitlesKey => + _kCFUserNotificationPopUpTitlesKey.value; + + set kCFUserNotificationPopUpTitlesKey(CFStringRef value) => + _kCFUserNotificationPopUpTitlesKey.value = value; + + late final ffi.Pointer _kCFUserNotificationTextFieldTitlesKey = + _lookup('kCFUserNotificationTextFieldTitlesKey'); + + CFStringRef get kCFUserNotificationTextFieldTitlesKey => + _kCFUserNotificationTextFieldTitlesKey.value; + + set kCFUserNotificationTextFieldTitlesKey(CFStringRef value) => + _kCFUserNotificationTextFieldTitlesKey.value = value; + + late final ffi.Pointer _kCFUserNotificationCheckBoxTitlesKey = + _lookup('kCFUserNotificationCheckBoxTitlesKey'); + + CFStringRef get kCFUserNotificationCheckBoxTitlesKey => + _kCFUserNotificationCheckBoxTitlesKey.value; + + set kCFUserNotificationCheckBoxTitlesKey(CFStringRef value) => + _kCFUserNotificationCheckBoxTitlesKey.value = value; + + late final ffi.Pointer _kCFUserNotificationTextFieldValuesKey = + _lookup('kCFUserNotificationTextFieldValuesKey'); + + CFStringRef get kCFUserNotificationTextFieldValuesKey => + _kCFUserNotificationTextFieldValuesKey.value; + + set kCFUserNotificationTextFieldValuesKey(CFStringRef value) => + _kCFUserNotificationTextFieldValuesKey.value = value; + + late final ffi.Pointer _kCFUserNotificationPopUpSelectionKey = + _lookup('kCFUserNotificationPopUpSelectionKey'); + + CFStringRef get kCFUserNotificationPopUpSelectionKey => + _kCFUserNotificationPopUpSelectionKey.value; + + set kCFUserNotificationPopUpSelectionKey(CFStringRef value) => + _kCFUserNotificationPopUpSelectionKey.value = value; + + late final ffi.Pointer _kCFUserNotificationAlertTopMostKey = + _lookup('kCFUserNotificationAlertTopMostKey'); + + CFStringRef get kCFUserNotificationAlertTopMostKey => + _kCFUserNotificationAlertTopMostKey.value; + + set kCFUserNotificationAlertTopMostKey(CFStringRef value) => + _kCFUserNotificationAlertTopMostKey.value = value; + + late final ffi.Pointer _kCFUserNotificationKeyboardTypesKey = + _lookup('kCFUserNotificationKeyboardTypesKey'); + + CFStringRef get kCFUserNotificationKeyboardTypesKey => + _kCFUserNotificationKeyboardTypesKey.value; + + set kCFUserNotificationKeyboardTypesKey(CFStringRef value) => + _kCFUserNotificationKeyboardTypesKey.value = value; + + int CFXMLNodeGetTypeID() { + return _CFXMLNodeGetTypeID(); + } + + late final _CFXMLNodeGetTypeIDPtr = + _lookup>('CFXMLNodeGetTypeID'); + late final _CFXMLNodeGetTypeID = + _CFXMLNodeGetTypeIDPtr.asFunction(); + + CFXMLNodeRef CFXMLNodeCreate( + CFAllocatorRef alloc, + int xmlType, + CFStringRef dataString, + ffi.Pointer additionalInfoPtr, + int version, + ) { + return _CFXMLNodeCreate( + alloc, + xmlType, + dataString, + additionalInfoPtr, + version, + ); + } + + late final _CFXMLNodeCreatePtr = _lookup< + ffi.NativeFunction< + CFXMLNodeRef Function(CFAllocatorRef, ffi.Int32, CFStringRef, + ffi.Pointer, CFIndex)>>('CFXMLNodeCreate'); + late final _CFXMLNodeCreate = _CFXMLNodeCreatePtr.asFunction< + CFXMLNodeRef Function( + CFAllocatorRef, int, CFStringRef, ffi.Pointer, int)>(); + + CFXMLNodeRef CFXMLNodeCreateCopy( + CFAllocatorRef alloc, + CFXMLNodeRef origNode, + ) { + return _CFXMLNodeCreateCopy( + alloc, + origNode, + ); + } + + late final _CFXMLNodeCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFXMLNodeRef Function( + CFAllocatorRef, CFXMLNodeRef)>>('CFXMLNodeCreateCopy'); + late final _CFXMLNodeCreateCopy = _CFXMLNodeCreateCopyPtr.asFunction< + CFXMLNodeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); + + int CFXMLNodeGetTypeCode( + CFXMLNodeRef node, + ) { + return _CFXMLNodeGetTypeCode( + node, + ); + } + + late final _CFXMLNodeGetTypeCodePtr = + _lookup>( + 'CFXMLNodeGetTypeCode'); + late final _CFXMLNodeGetTypeCode = + _CFXMLNodeGetTypeCodePtr.asFunction(); + + CFStringRef CFXMLNodeGetString( + CFXMLNodeRef node, + ) { + return _CFXMLNodeGetString( + node, + ); + } + + late final _CFXMLNodeGetStringPtr = + _lookup>( + 'CFXMLNodeGetString'); + late final _CFXMLNodeGetString = + _CFXMLNodeGetStringPtr.asFunction(); + + ffi.Pointer CFXMLNodeGetInfoPtr( + CFXMLNodeRef node, + ) { + return _CFXMLNodeGetInfoPtr( + node, + ); + } + + late final _CFXMLNodeGetInfoPtrPtr = + _lookup Function(CFXMLNodeRef)>>( + 'CFXMLNodeGetInfoPtr'); + late final _CFXMLNodeGetInfoPtr = _CFXMLNodeGetInfoPtrPtr.asFunction< + ffi.Pointer Function(CFXMLNodeRef)>(); + + int CFXMLNodeGetVersion( + CFXMLNodeRef node, + ) { + return _CFXMLNodeGetVersion( + node, + ); + } + + late final _CFXMLNodeGetVersionPtr = + _lookup>( + 'CFXMLNodeGetVersion'); + late final _CFXMLNodeGetVersion = + _CFXMLNodeGetVersionPtr.asFunction(); + + CFXMLTreeRef CFXMLTreeCreateWithNode( + CFAllocatorRef allocator, + CFXMLNodeRef node, + ) { + return _CFXMLTreeCreateWithNode( + allocator, + node, + ); + } + + late final _CFXMLTreeCreateWithNodePtr = _lookup< + ffi.NativeFunction< + CFXMLTreeRef Function( + CFAllocatorRef, CFXMLNodeRef)>>('CFXMLTreeCreateWithNode'); + late final _CFXMLTreeCreateWithNode = _CFXMLTreeCreateWithNodePtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); + + CFXMLNodeRef CFXMLTreeGetNode( + CFXMLTreeRef xmlTree, + ) { + return _CFXMLTreeGetNode( + xmlTree, + ); + } + + late final _CFXMLTreeGetNodePtr = + _lookup>( + 'CFXMLTreeGetNode'); + late final _CFXMLTreeGetNode = + _CFXMLTreeGetNodePtr.asFunction(); + + int CFXMLParserGetTypeID() { + return _CFXMLParserGetTypeID(); + } + + late final _CFXMLParserGetTypeIDPtr = + _lookup>('CFXMLParserGetTypeID'); + late final _CFXMLParserGetTypeID = + _CFXMLParserGetTypeIDPtr.asFunction(); + + CFXMLParserRef CFXMLParserCreate( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer callBacks, + ffi.Pointer context, + ) { + return _CFXMLParserCreate( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, + callBacks, + context, + ); + } + + late final _CFXMLParserCreatePtr = _lookup< + ffi.NativeFunction< + CFXMLParserRef Function( + CFAllocatorRef, + CFDataRef, + CFURLRef, + CFOptionFlags, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFXMLParserCreate'); + late final _CFXMLParserCreate = _CFXMLParserCreatePtr.asFunction< + CFXMLParserRef Function( + CFAllocatorRef, + CFDataRef, + CFURLRef, + int, + int, + ffi.Pointer, + ffi.Pointer)>(); + + CFXMLParserRef CFXMLParserCreateWithDataFromURL( + CFAllocatorRef allocator, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer callBacks, + ffi.Pointer context, + ) { + return _CFXMLParserCreateWithDataFromURL( + allocator, + dataSource, + parseOptions, + versionOfNodes, + callBacks, + context, + ); + } + + late final _CFXMLParserCreateWithDataFromURLPtr = _lookup< + ffi.NativeFunction< + CFXMLParserRef Function( + CFAllocatorRef, + CFURLRef, + CFOptionFlags, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>( + 'CFXMLParserCreateWithDataFromURL'); + late final _CFXMLParserCreateWithDataFromURL = + _CFXMLParserCreateWithDataFromURLPtr.asFunction< + CFXMLParserRef Function( + CFAllocatorRef, + CFURLRef, + int, + int, + ffi.Pointer, + ffi.Pointer)>(); + + void CFXMLParserGetContext( + CFXMLParserRef parser, + ffi.Pointer context, + ) { + return _CFXMLParserGetContext( + parser, + context, + ); + } + + late final _CFXMLParserGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFXMLParserRef, + ffi.Pointer)>>('CFXMLParserGetContext'); + late final _CFXMLParserGetContext = _CFXMLParserGetContextPtr.asFunction< + void Function(CFXMLParserRef, ffi.Pointer)>(); + + void CFXMLParserGetCallBacks( + CFXMLParserRef parser, + ffi.Pointer callBacks, + ) { + return _CFXMLParserGetCallBacks( + parser, + callBacks, + ); + } + + late final _CFXMLParserGetCallBacksPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFXMLParserRef, + ffi.Pointer)>>('CFXMLParserGetCallBacks'); + late final _CFXMLParserGetCallBacks = _CFXMLParserGetCallBacksPtr.asFunction< + void Function(CFXMLParserRef, ffi.Pointer)>(); + + CFURLRef CFXMLParserGetSourceURL( + CFXMLParserRef parser, + ) { + return _CFXMLParserGetSourceURL( + parser, + ); + } + + late final _CFXMLParserGetSourceURLPtr = + _lookup>( + 'CFXMLParserGetSourceURL'); + late final _CFXMLParserGetSourceURL = _CFXMLParserGetSourceURLPtr.asFunction< + CFURLRef Function(CFXMLParserRef)>(); + + int CFXMLParserGetLocation( + CFXMLParserRef parser, + ) { + return _CFXMLParserGetLocation( + parser, + ); + } + + late final _CFXMLParserGetLocationPtr = + _lookup>( + 'CFXMLParserGetLocation'); + late final _CFXMLParserGetLocation = + _CFXMLParserGetLocationPtr.asFunction(); + + int CFXMLParserGetLineNumber( + CFXMLParserRef parser, + ) { + return _CFXMLParserGetLineNumber( + parser, + ); + } + + late final _CFXMLParserGetLineNumberPtr = + _lookup>( + 'CFXMLParserGetLineNumber'); + late final _CFXMLParserGetLineNumber = + _CFXMLParserGetLineNumberPtr.asFunction(); + + ffi.Pointer CFXMLParserGetDocument( + CFXMLParserRef parser, + ) { + return _CFXMLParserGetDocument( + parser, + ); + } + + late final _CFXMLParserGetDocumentPtr = _lookup< + ffi.NativeFunction Function(CFXMLParserRef)>>( + 'CFXMLParserGetDocument'); + late final _CFXMLParserGetDocument = _CFXMLParserGetDocumentPtr.asFunction< + ffi.Pointer Function(CFXMLParserRef)>(); + + int CFXMLParserGetStatusCode( + CFXMLParserRef parser, + ) { + return _CFXMLParserGetStatusCode( + parser, + ); + } + + late final _CFXMLParserGetStatusCodePtr = + _lookup>( + 'CFXMLParserGetStatusCode'); + late final _CFXMLParserGetStatusCode = + _CFXMLParserGetStatusCodePtr.asFunction(); + + CFStringRef CFXMLParserCopyErrorDescription( + CFXMLParserRef parser, + ) { + return _CFXMLParserCopyErrorDescription( + parser, + ); + } + + late final _CFXMLParserCopyErrorDescriptionPtr = + _lookup>( + 'CFXMLParserCopyErrorDescription'); + late final _CFXMLParserCopyErrorDescription = + _CFXMLParserCopyErrorDescriptionPtr.asFunction< + CFStringRef Function(CFXMLParserRef)>(); + + void CFXMLParserAbort( + CFXMLParserRef parser, + int errorCode, + CFStringRef errorDescription, + ) { + return _CFXMLParserAbort( + parser, + errorCode, + errorDescription, + ); + } + + late final _CFXMLParserAbortPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFXMLParserRef, ffi.Int32, CFStringRef)>>('CFXMLParserAbort'); + late final _CFXMLParserAbort = _CFXMLParserAbortPtr.asFunction< + void Function(CFXMLParserRef, int, CFStringRef)>(); + + int CFXMLParserParse( + CFXMLParserRef parser, + ) { + return _CFXMLParserParse( + parser, + ); + } + + late final _CFXMLParserParsePtr = + _lookup>( + 'CFXMLParserParse'); + late final _CFXMLParserParse = + _CFXMLParserParsePtr.asFunction(); + + CFXMLTreeRef CFXMLTreeCreateFromData( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ) { + return _CFXMLTreeCreateFromData( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, + ); + } + + late final _CFXMLTreeCreateFromDataPtr = _lookup< + ffi.NativeFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, + CFOptionFlags, CFIndex)>>('CFXMLTreeCreateFromData'); + late final _CFXMLTreeCreateFromData = _CFXMLTreeCreateFromDataPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int)>(); + + CFXMLTreeRef CFXMLTreeCreateFromDataWithError( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer errorDict, + ) { + return _CFXMLTreeCreateFromDataWithError( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, + errorDict, + ); + } + + late final _CFXMLTreeCreateFromDataWithErrorPtr = _lookup< + ffi.NativeFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, + CFOptionFlags, CFIndex, ffi.Pointer)>>( + 'CFXMLTreeCreateFromDataWithError'); + late final _CFXMLTreeCreateFromDataWithError = + _CFXMLTreeCreateFromDataWithErrorPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int, + ffi.Pointer)>(); + + CFXMLTreeRef CFXMLTreeCreateWithDataFromURL( + CFAllocatorRef allocator, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ) { + return _CFXMLTreeCreateWithDataFromURL( + allocator, + dataSource, + parseOptions, + versionOfNodes, + ); + } + + late final _CFXMLTreeCreateWithDataFromURLPtr = _lookup< + ffi.NativeFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, CFOptionFlags, + CFIndex)>>('CFXMLTreeCreateWithDataFromURL'); + late final _CFXMLTreeCreateWithDataFromURL = + _CFXMLTreeCreateWithDataFromURLPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, int, int)>(); + + CFDataRef CFXMLTreeCreateXMLData( + CFAllocatorRef allocator, + CFXMLTreeRef xmlTree, + ) { + return _CFXMLTreeCreateXMLData( + allocator, + xmlTree, + ); + } + + late final _CFXMLTreeCreateXMLDataPtr = _lookup< + ffi.NativeFunction>( + 'CFXMLTreeCreateXMLData'); + late final _CFXMLTreeCreateXMLData = _CFXMLTreeCreateXMLDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFXMLTreeRef)>(); + + CFStringRef CFXMLCreateStringByEscapingEntities( + CFAllocatorRef allocator, + CFStringRef string, + CFDictionaryRef entitiesDictionary, + ) { + return _CFXMLCreateStringByEscapingEntities( + allocator, + string, + entitiesDictionary, + ); + } + + late final _CFXMLCreateStringByEscapingEntitiesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFXMLCreateStringByEscapingEntities'); + late final _CFXMLCreateStringByEscapingEntities = + _CFXMLCreateStringByEscapingEntitiesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); + + CFStringRef CFXMLCreateStringByUnescapingEntities( + CFAllocatorRef allocator, + CFStringRef string, + CFDictionaryRef entitiesDictionary, + ) { + return _CFXMLCreateStringByUnescapingEntities( + allocator, + string, + entitiesDictionary, + ); + } + + late final _CFXMLCreateStringByUnescapingEntitiesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFXMLCreateStringByUnescapingEntities'); + late final _CFXMLCreateStringByUnescapingEntities = + _CFXMLCreateStringByUnescapingEntitiesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); + + late final ffi.Pointer _kCFXMLTreeErrorDescription = + _lookup('kCFXMLTreeErrorDescription'); + + CFStringRef get kCFXMLTreeErrorDescription => + _kCFXMLTreeErrorDescription.value; + + set kCFXMLTreeErrorDescription(CFStringRef value) => + _kCFXMLTreeErrorDescription.value = value; + + late final ffi.Pointer _kCFXMLTreeErrorLineNumber = + _lookup('kCFXMLTreeErrorLineNumber'); + + CFStringRef get kCFXMLTreeErrorLineNumber => _kCFXMLTreeErrorLineNumber.value; + + set kCFXMLTreeErrorLineNumber(CFStringRef value) => + _kCFXMLTreeErrorLineNumber.value = value; + + late final ffi.Pointer _kCFXMLTreeErrorLocation = + _lookup('kCFXMLTreeErrorLocation'); + + CFStringRef get kCFXMLTreeErrorLocation => _kCFXMLTreeErrorLocation.value; + + set kCFXMLTreeErrorLocation(CFStringRef value) => + _kCFXMLTreeErrorLocation.value = value; + + late final ffi.Pointer _kCFXMLTreeErrorStatusCode = + _lookup('kCFXMLTreeErrorStatusCode'); + + CFStringRef get kCFXMLTreeErrorStatusCode => _kCFXMLTreeErrorStatusCode.value; + + set kCFXMLTreeErrorStatusCode(CFStringRef value) => + _kCFXMLTreeErrorStatusCode.value = value; + + late final ffi.Pointer _kSecPropertyTypeTitle = + _lookup('kSecPropertyTypeTitle'); + + CFStringRef get kSecPropertyTypeTitle => _kSecPropertyTypeTitle.value; + + set kSecPropertyTypeTitle(CFStringRef value) => + _kSecPropertyTypeTitle.value = value; + + late final ffi.Pointer _kSecPropertyTypeError = + _lookup('kSecPropertyTypeError'); + + CFStringRef get kSecPropertyTypeError => _kSecPropertyTypeError.value; + + set kSecPropertyTypeError(CFStringRef value) => + _kSecPropertyTypeError.value = value; + + late final ffi.Pointer _kSecTrustEvaluationDate = + _lookup('kSecTrustEvaluationDate'); + + CFStringRef get kSecTrustEvaluationDate => _kSecTrustEvaluationDate.value; + + set kSecTrustEvaluationDate(CFStringRef value) => + _kSecTrustEvaluationDate.value = value; + + late final ffi.Pointer _kSecTrustExtendedValidation = + _lookup('kSecTrustExtendedValidation'); + + CFStringRef get kSecTrustExtendedValidation => + _kSecTrustExtendedValidation.value; + + set kSecTrustExtendedValidation(CFStringRef value) => + _kSecTrustExtendedValidation.value = value; + + late final ffi.Pointer _kSecTrustOrganizationName = + _lookup('kSecTrustOrganizationName'); + + CFStringRef get kSecTrustOrganizationName => _kSecTrustOrganizationName.value; + + set kSecTrustOrganizationName(CFStringRef value) => + _kSecTrustOrganizationName.value = value; + + late final ffi.Pointer _kSecTrustResultValue = + _lookup('kSecTrustResultValue'); + + CFStringRef get kSecTrustResultValue => _kSecTrustResultValue.value; + + set kSecTrustResultValue(CFStringRef value) => + _kSecTrustResultValue.value = value; + + late final ffi.Pointer _kSecTrustRevocationChecked = + _lookup('kSecTrustRevocationChecked'); + + CFStringRef get kSecTrustRevocationChecked => + _kSecTrustRevocationChecked.value; + + set kSecTrustRevocationChecked(CFStringRef value) => + _kSecTrustRevocationChecked.value = value; + + late final ffi.Pointer _kSecTrustRevocationValidUntilDate = + _lookup('kSecTrustRevocationValidUntilDate'); + + CFStringRef get kSecTrustRevocationValidUntilDate => + _kSecTrustRevocationValidUntilDate.value; + + set kSecTrustRevocationValidUntilDate(CFStringRef value) => + _kSecTrustRevocationValidUntilDate.value = value; + + late final ffi.Pointer _kSecTrustCertificateTransparency = + _lookup('kSecTrustCertificateTransparency'); + + CFStringRef get kSecTrustCertificateTransparency => + _kSecTrustCertificateTransparency.value; + + set kSecTrustCertificateTransparency(CFStringRef value) => + _kSecTrustCertificateTransparency.value = value; + + late final ffi.Pointer + _kSecTrustCertificateTransparencyWhiteList = + _lookup('kSecTrustCertificateTransparencyWhiteList'); + + CFStringRef get kSecTrustCertificateTransparencyWhiteList => + _kSecTrustCertificateTransparencyWhiteList.value; + + set kSecTrustCertificateTransparencyWhiteList(CFStringRef value) => + _kSecTrustCertificateTransparencyWhiteList.value = value; + + int SecTrustGetTypeID() { + return _SecTrustGetTypeID(); + } + + late final _SecTrustGetTypeIDPtr = + _lookup>('SecTrustGetTypeID'); + late final _SecTrustGetTypeID = + _SecTrustGetTypeIDPtr.asFunction(); + + int SecTrustCreateWithCertificates( + CFTypeRef certificates, + CFTypeRef policies, + ffi.Pointer trust, + ) { + return _SecTrustCreateWithCertificates( + certificates, + policies, + trust, + ); + } + + late final _SecTrustCreateWithCertificatesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(CFTypeRef, CFTypeRef, + ffi.Pointer)>>('SecTrustCreateWithCertificates'); + late final _SecTrustCreateWithCertificates = + _SecTrustCreateWithCertificatesPtr.asFunction< + int Function(CFTypeRef, CFTypeRef, ffi.Pointer)>(); + + int SecTrustSetPolicies( + SecTrustRef trust, + CFTypeRef policies, + ) { + return _SecTrustSetPolicies( + trust, + policies, + ); + } + + late final _SecTrustSetPoliciesPtr = + _lookup>( + 'SecTrustSetPolicies'); + late final _SecTrustSetPolicies = _SecTrustSetPoliciesPtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); + + int SecTrustCopyPolicies( + SecTrustRef trust, + ffi.Pointer policies, + ) { + return _SecTrustCopyPolicies( + trust, + policies, + ); + } + + late final _SecTrustCopyPoliciesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustCopyPolicies'); + late final _SecTrustCopyPolicies = _SecTrustCopyPoliciesPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); + + int SecTrustSetNetworkFetchAllowed( + SecTrustRef trust, + int allowFetch, + ) { + return _SecTrustSetNetworkFetchAllowed( + trust, + allowFetch, + ); + } + + late final _SecTrustSetNetworkFetchAllowedPtr = + _lookup>( + 'SecTrustSetNetworkFetchAllowed'); + late final _SecTrustSetNetworkFetchAllowed = + _SecTrustSetNetworkFetchAllowedPtr.asFunction< + int Function(SecTrustRef, int)>(); + + int SecTrustGetNetworkFetchAllowed( + SecTrustRef trust, + ffi.Pointer allowFetch, + ) { + return _SecTrustGetNetworkFetchAllowed( + trust, + allowFetch, + ); + } + + late final _SecTrustGetNetworkFetchAllowedPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetNetworkFetchAllowed'); + late final _SecTrustGetNetworkFetchAllowed = + _SecTrustGetNetworkFetchAllowedPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); + + int SecTrustSetAnchorCertificates( + SecTrustRef trust, + CFArrayRef anchorCertificates, + ) { + return _SecTrustSetAnchorCertificates( + trust, + anchorCertificates, + ); + } + + late final _SecTrustSetAnchorCertificatesPtr = + _lookup>( + 'SecTrustSetAnchorCertificates'); + late final _SecTrustSetAnchorCertificates = _SecTrustSetAnchorCertificatesPtr + .asFunction(); + + int SecTrustSetAnchorCertificatesOnly( + SecTrustRef trust, + int anchorCertificatesOnly, + ) { + return _SecTrustSetAnchorCertificatesOnly( + trust, + anchorCertificatesOnly, + ); + } + + late final _SecTrustSetAnchorCertificatesOnlyPtr = + _lookup>( + 'SecTrustSetAnchorCertificatesOnly'); + late final _SecTrustSetAnchorCertificatesOnly = + _SecTrustSetAnchorCertificatesOnlyPtr.asFunction< + int Function(SecTrustRef, int)>(); + + int SecTrustCopyCustomAnchorCertificates( + SecTrustRef trust, + ffi.Pointer anchors, + ) { + return _SecTrustCopyCustomAnchorCertificates( + trust, + anchors, + ); + } + + late final _SecTrustCopyCustomAnchorCertificatesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, ffi.Pointer)>>( + 'SecTrustCopyCustomAnchorCertificates'); + late final _SecTrustCopyCustomAnchorCertificates = + _SecTrustCopyCustomAnchorCertificatesPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); + + int SecTrustSetVerifyDate( + SecTrustRef trust, + CFDateRef verifyDate, + ) { + return _SecTrustSetVerifyDate( + trust, + verifyDate, + ); + } + + late final _SecTrustSetVerifyDatePtr = + _lookup>( + 'SecTrustSetVerifyDate'); + late final _SecTrustSetVerifyDate = _SecTrustSetVerifyDatePtr.asFunction< + int Function(SecTrustRef, CFDateRef)>(); + + double SecTrustGetVerifyTime( + SecTrustRef trust, + ) { + return _SecTrustGetVerifyTime( + trust, + ); + } + + late final _SecTrustGetVerifyTimePtr = + _lookup>( + 'SecTrustGetVerifyTime'); + late final _SecTrustGetVerifyTime = + _SecTrustGetVerifyTimePtr.asFunction(); + + int SecTrustEvaluate( + SecTrustRef trust, + ffi.Pointer result, + ) { + return _SecTrustEvaluate( + trust, + result, + ); + } + + late final _SecTrustEvaluatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustEvaluate'); + late final _SecTrustEvaluate = _SecTrustEvaluatePtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); + + int SecTrustEvaluateAsync( + SecTrustRef trust, + dispatch_queue_t queue, + SecTrustCallback result, + ) { + return _SecTrustEvaluateAsync( + trust, + queue, + result, + ); + } + + late final _SecTrustEvaluateAsyncPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, dispatch_queue_t, + SecTrustCallback)>>('SecTrustEvaluateAsync'); + late final _SecTrustEvaluateAsync = _SecTrustEvaluateAsyncPtr.asFunction< + int Function(SecTrustRef, dispatch_queue_t, SecTrustCallback)>(); + + bool SecTrustEvaluateWithError( + SecTrustRef trust, + ffi.Pointer error, + ) { + return _SecTrustEvaluateWithError( + trust, + error, + ); + } + + late final _SecTrustEvaluateWithErrorPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(SecTrustRef, + ffi.Pointer)>>('SecTrustEvaluateWithError'); + late final _SecTrustEvaluateWithError = _SecTrustEvaluateWithErrorPtr + .asFunction)>(); + + int SecTrustEvaluateAsyncWithError( + SecTrustRef trust, + dispatch_queue_t queue, + SecTrustWithErrorCallback result, + ) { + return _SecTrustEvaluateAsyncWithError( + trust, + queue, + result, + ); + } + + late final _SecTrustEvaluateAsyncWithErrorPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, dispatch_queue_t, + SecTrustWithErrorCallback)>>('SecTrustEvaluateAsyncWithError'); + late final _SecTrustEvaluateAsyncWithError = + _SecTrustEvaluateAsyncWithErrorPtr.asFunction< + int Function( + SecTrustRef, dispatch_queue_t, SecTrustWithErrorCallback)>(); + + int SecTrustGetTrustResult( + SecTrustRef trust, + ffi.Pointer result, + ) { + return _SecTrustGetTrustResult( + trust, + result, + ); + } + + late final _SecTrustGetTrustResultPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustGetTrustResult'); + late final _SecTrustGetTrustResult = _SecTrustGetTrustResultPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); + + SecKeyRef SecTrustCopyPublicKey( + SecTrustRef trust, + ) { + return _SecTrustCopyPublicKey( + trust, + ); + } + + late final _SecTrustCopyPublicKeyPtr = + _lookup>( + 'SecTrustCopyPublicKey'); + late final _SecTrustCopyPublicKey = + _SecTrustCopyPublicKeyPtr.asFunction(); + + SecKeyRef SecTrustCopyKey( + SecTrustRef trust, + ) { + return _SecTrustCopyKey( + trust, + ); + } + + late final _SecTrustCopyKeyPtr = + _lookup>( + 'SecTrustCopyKey'); + late final _SecTrustCopyKey = + _SecTrustCopyKeyPtr.asFunction(); + + int SecTrustGetCertificateCount( + SecTrustRef trust, + ) { + return _SecTrustGetCertificateCount( + trust, + ); + } + + late final _SecTrustGetCertificateCountPtr = + _lookup>( + 'SecTrustGetCertificateCount'); + late final _SecTrustGetCertificateCount = + _SecTrustGetCertificateCountPtr.asFunction(); + + SecCertificateRef SecTrustGetCertificateAtIndex( + SecTrustRef trust, + int ix, + ) { + return _SecTrustGetCertificateAtIndex( + trust, + ix, + ); + } + + late final _SecTrustGetCertificateAtIndexPtr = _lookup< + ffi.NativeFunction>( + 'SecTrustGetCertificateAtIndex'); + late final _SecTrustGetCertificateAtIndex = _SecTrustGetCertificateAtIndexPtr + .asFunction(); + + CFDataRef SecTrustCopyExceptions( + SecTrustRef trust, + ) { + return _SecTrustCopyExceptions( + trust, + ); + } + + late final _SecTrustCopyExceptionsPtr = + _lookup>( + 'SecTrustCopyExceptions'); + late final _SecTrustCopyExceptions = + _SecTrustCopyExceptionsPtr.asFunction(); + + bool SecTrustSetExceptions( + SecTrustRef trust, + CFDataRef exceptions, + ) { + return _SecTrustSetExceptions( + trust, + exceptions, + ); + } + + late final _SecTrustSetExceptionsPtr = + _lookup>( + 'SecTrustSetExceptions'); + late final _SecTrustSetExceptions = _SecTrustSetExceptionsPtr.asFunction< + bool Function(SecTrustRef, CFDataRef)>(); + + CFArrayRef SecTrustCopyProperties( + SecTrustRef trust, + ) { + return _SecTrustCopyProperties( + trust, + ); + } + + late final _SecTrustCopyPropertiesPtr = + _lookup>( + 'SecTrustCopyProperties'); + late final _SecTrustCopyProperties = + _SecTrustCopyPropertiesPtr.asFunction(); + + CFDictionaryRef SecTrustCopyResult( + SecTrustRef trust, + ) { + return _SecTrustCopyResult( + trust, + ); + } + + late final _SecTrustCopyResultPtr = + _lookup>( + 'SecTrustCopyResult'); + late final _SecTrustCopyResult = _SecTrustCopyResultPtr.asFunction< + CFDictionaryRef Function(SecTrustRef)>(); + + int SecTrustSetOCSPResponse( + SecTrustRef trust, + CFTypeRef responseData, + ) { + return _SecTrustSetOCSPResponse( + trust, + responseData, + ); + } + + late final _SecTrustSetOCSPResponsePtr = + _lookup>( + 'SecTrustSetOCSPResponse'); + late final _SecTrustSetOCSPResponse = _SecTrustSetOCSPResponsePtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); + + int SecTrustSetSignedCertificateTimestamps( + SecTrustRef trust, + CFArrayRef sctArray, + ) { + return _SecTrustSetSignedCertificateTimestamps( + trust, + sctArray, + ); + } + + late final _SecTrustSetSignedCertificateTimestampsPtr = + _lookup>( + 'SecTrustSetSignedCertificateTimestamps'); + late final _SecTrustSetSignedCertificateTimestamps = + _SecTrustSetSignedCertificateTimestampsPtr.asFunction< + int Function(SecTrustRef, CFArrayRef)>(); + + CFArrayRef SecTrustCopyCertificateChain( + SecTrustRef trust, + ) { + return _SecTrustCopyCertificateChain( + trust, + ); + } + + late final _SecTrustCopyCertificateChainPtr = + _lookup>( + 'SecTrustCopyCertificateChain'); + late final _SecTrustCopyCertificateChain = _SecTrustCopyCertificateChainPtr + .asFunction(); + + late final ffi.Pointer _gGuidCssm = + _lookup('gGuidCssm'); + + CSSM_GUID get gGuidCssm => _gGuidCssm.ref; + + late final ffi.Pointer _gGuidAppleFileDL = + _lookup('gGuidAppleFileDL'); + + CSSM_GUID get gGuidAppleFileDL => _gGuidAppleFileDL.ref; + + late final ffi.Pointer _gGuidAppleCSP = + _lookup('gGuidAppleCSP'); + + CSSM_GUID get gGuidAppleCSP => _gGuidAppleCSP.ref; + + late final ffi.Pointer _gGuidAppleCSPDL = + _lookup('gGuidAppleCSPDL'); + + CSSM_GUID get gGuidAppleCSPDL => _gGuidAppleCSPDL.ref; + + late final ffi.Pointer _gGuidAppleX509CL = + _lookup('gGuidAppleX509CL'); + + CSSM_GUID get gGuidAppleX509CL => _gGuidAppleX509CL.ref; + + late final ffi.Pointer _gGuidAppleX509TP = + _lookup('gGuidAppleX509TP'); + + CSSM_GUID get gGuidAppleX509TP => _gGuidAppleX509TP.ref; + + late final ffi.Pointer _gGuidAppleLDAPDL = + _lookup('gGuidAppleLDAPDL'); + + CSSM_GUID get gGuidAppleLDAPDL => _gGuidAppleLDAPDL.ref; + + late final ffi.Pointer _gGuidAppleDotMacTP = + _lookup('gGuidAppleDotMacTP'); + + CSSM_GUID get gGuidAppleDotMacTP => _gGuidAppleDotMacTP.ref; + + late final ffi.Pointer _gGuidAppleSdCSPDL = + _lookup('gGuidAppleSdCSPDL'); + + CSSM_GUID get gGuidAppleSdCSPDL => _gGuidAppleSdCSPDL.ref; + + late final ffi.Pointer _gGuidAppleDotMacDL = + _lookup('gGuidAppleDotMacDL'); + + CSSM_GUID get gGuidAppleDotMacDL => _gGuidAppleDotMacDL.ref; + + void cssmPerror( + ffi.Pointer how, + int error, + ) { + return _cssmPerror( + how, + error, + ); + } + + late final _cssmPerrorPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, CSSM_RETURN)>>('cssmPerror'); + late final _cssmPerror = + _cssmPerrorPtr.asFunction, int)>(); + + bool cssmOidToAlg( + ffi.Pointer oid, + ffi.Pointer alg, + ) { + return _cssmOidToAlg( + oid, + alg, + ); + } + + late final _cssmOidToAlgPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>('cssmOidToAlg'); + late final _cssmOidToAlg = _cssmOidToAlgPtr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer cssmAlgToOid( + int algId, + ) { + return _cssmAlgToOid( + algId, + ); + } + + late final _cssmAlgToOidPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(CSSM_ALGORITHMS)>>('cssmAlgToOid'); + late final _cssmAlgToOid = + _cssmAlgToOidPtr.asFunction Function(int)>(); + + int SecTrustSetOptions( + SecTrustRef trustRef, + int options, + ) { + return _SecTrustSetOptions( + trustRef, + options, + ); + } + + late final _SecTrustSetOptionsPtr = + _lookup>( + 'SecTrustSetOptions'); + late final _SecTrustSetOptions = + _SecTrustSetOptionsPtr.asFunction(); + + int SecTrustSetParameters( + SecTrustRef trustRef, + int action, + CFDataRef actionData, + ) { + return _SecTrustSetParameters( + trustRef, + action, + actionData, + ); + } + + late final _SecTrustSetParametersPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, CSSM_TP_ACTION, + CFDataRef)>>('SecTrustSetParameters'); + late final _SecTrustSetParameters = _SecTrustSetParametersPtr.asFunction< + int Function(SecTrustRef, int, CFDataRef)>(); + + int SecTrustSetKeychains( + SecTrustRef trust, + CFTypeRef keychainOrArray, + ) { + return _SecTrustSetKeychains( + trust, + keychainOrArray, + ); + } + + late final _SecTrustSetKeychainsPtr = + _lookup>( + 'SecTrustSetKeychains'); + late final _SecTrustSetKeychains = _SecTrustSetKeychainsPtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); + + int SecTrustGetResult( + SecTrustRef trustRef, + ffi.Pointer result, + ffi.Pointer certChain, + ffi.Pointer> statusChain, + ) { + return _SecTrustGetResult( + trustRef, + result, + certChain, + statusChain, + ); + } + + late final _SecTrustGetResultPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>( + 'SecTrustGetResult'); + late final _SecTrustGetResult = _SecTrustGetResultPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); + + int SecTrustGetCssmResult( + SecTrustRef trust, + ffi.Pointer result, + ) { + return _SecTrustGetCssmResult( + trust, + result, + ); + } + + late final _SecTrustGetCssmResultPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, + ffi.Pointer)>>( + 'SecTrustGetCssmResult'); + late final _SecTrustGetCssmResult = _SecTrustGetCssmResultPtr.asFunction< + int Function( + SecTrustRef, ffi.Pointer)>(); + + int SecTrustGetCssmResultCode( + SecTrustRef trust, + ffi.Pointer resultCode, + ) { + return _SecTrustGetCssmResultCode( + trust, + resultCode, + ); + } + + late final _SecTrustGetCssmResultCodePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetCssmResultCode'); + late final _SecTrustGetCssmResultCode = _SecTrustGetCssmResultCodePtr + .asFunction)>(); + + int SecTrustGetTPHandle( + SecTrustRef trust, + ffi.Pointer handle, + ) { + return _SecTrustGetTPHandle( + trust, + handle, + ); + } + + late final _SecTrustGetTPHandlePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetTPHandle'); + late final _SecTrustGetTPHandle = _SecTrustGetTPHandlePtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); + + int SecTrustCopyAnchorCertificates( + ffi.Pointer anchors, + ) { + return _SecTrustCopyAnchorCertificates( + anchors, + ); + } + + late final _SecTrustCopyAnchorCertificatesPtr = + _lookup)>>( + 'SecTrustCopyAnchorCertificates'); + late final _SecTrustCopyAnchorCertificates = + _SecTrustCopyAnchorCertificatesPtr.asFunction< + int Function(ffi.Pointer)>(); + + int SecCertificateGetTypeID() { + return _SecCertificateGetTypeID(); + } + + late final _SecCertificateGetTypeIDPtr = + _lookup>( + 'SecCertificateGetTypeID'); + late final _SecCertificateGetTypeID = + _SecCertificateGetTypeIDPtr.asFunction(); + + SecCertificateRef SecCertificateCreateWithData( + CFAllocatorRef allocator, + CFDataRef data, + ) { + return _SecCertificateCreateWithData( + allocator, + data, + ); + } + + late final _SecCertificateCreateWithDataPtr = _lookup< + ffi.NativeFunction< + SecCertificateRef Function( + CFAllocatorRef, CFDataRef)>>('SecCertificateCreateWithData'); + late final _SecCertificateCreateWithData = _SecCertificateCreateWithDataPtr + .asFunction(); + + CFDataRef SecCertificateCopyData( + SecCertificateRef certificate, + ) { + return _SecCertificateCopyData( + certificate, + ); + } + + late final _SecCertificateCopyDataPtr = + _lookup>( + 'SecCertificateCopyData'); + late final _SecCertificateCopyData = _SecCertificateCopyDataPtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); + + CFStringRef SecCertificateCopySubjectSummary( + SecCertificateRef certificate, + ) { + return _SecCertificateCopySubjectSummary( + certificate, + ); + } + + late final _SecCertificateCopySubjectSummaryPtr = + _lookup>( + 'SecCertificateCopySubjectSummary'); + late final _SecCertificateCopySubjectSummary = + _SecCertificateCopySubjectSummaryPtr.asFunction< + CFStringRef Function(SecCertificateRef)>(); + + int SecCertificateCopyCommonName( + SecCertificateRef certificate, + ffi.Pointer commonName, + ) { + return _SecCertificateCopyCommonName( + certificate, + commonName, + ); + } + + late final _SecCertificateCopyCommonNamePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyCommonName'); + late final _SecCertificateCopyCommonName = _SecCertificateCopyCommonNamePtr + .asFunction)>(); + + int SecCertificateCopyEmailAddresses( + SecCertificateRef certificate, + ffi.Pointer emailAddresses, + ) { + return _SecCertificateCopyEmailAddresses( + certificate, + emailAddresses, + ); + } + + late final _SecCertificateCopyEmailAddressesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyEmailAddresses'); + late final _SecCertificateCopyEmailAddresses = + _SecCertificateCopyEmailAddressesPtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); + + CFDataRef SecCertificateCopyNormalizedIssuerSequence( + SecCertificateRef certificate, + ) { + return _SecCertificateCopyNormalizedIssuerSequence( + certificate, + ); + } + + late final _SecCertificateCopyNormalizedIssuerSequencePtr = + _lookup>( + 'SecCertificateCopyNormalizedIssuerSequence'); + late final _SecCertificateCopyNormalizedIssuerSequence = + _SecCertificateCopyNormalizedIssuerSequencePtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); + + CFDataRef SecCertificateCopyNormalizedSubjectSequence( + SecCertificateRef certificate, + ) { + return _SecCertificateCopyNormalizedSubjectSequence( + certificate, + ); + } + + late final _SecCertificateCopyNormalizedSubjectSequencePtr = + _lookup>( + 'SecCertificateCopyNormalizedSubjectSequence'); + late final _SecCertificateCopyNormalizedSubjectSequence = + _SecCertificateCopyNormalizedSubjectSequencePtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); + + SecKeyRef SecCertificateCopyKey( + SecCertificateRef certificate, + ) { + return _SecCertificateCopyKey( + certificate, + ); + } + + late final _SecCertificateCopyKeyPtr = + _lookup>( + 'SecCertificateCopyKey'); + late final _SecCertificateCopyKey = _SecCertificateCopyKeyPtr.asFunction< + SecKeyRef Function(SecCertificateRef)>(); + + int SecCertificateCopyPublicKey( + SecCertificateRef certificate, + ffi.Pointer key, + ) { + return _SecCertificateCopyPublicKey( + certificate, + key, + ); + } + + late final _SecCertificateCopyPublicKeyPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyPublicKey'); + late final _SecCertificateCopyPublicKey = _SecCertificateCopyPublicKeyPtr + .asFunction)>(); + + CFDataRef SecCertificateCopySerialNumberData( + SecCertificateRef certificate, + ffi.Pointer error, + ) { + return _SecCertificateCopySerialNumberData( + certificate, + error, + ); + } + + late final _SecCertificateCopySerialNumberDataPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopySerialNumberData'); + late final _SecCertificateCopySerialNumberData = + _SecCertificateCopySerialNumberDataPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + + CFDataRef SecCertificateCopySerialNumber( + SecCertificateRef certificate, + ffi.Pointer error, + ) { + return _SecCertificateCopySerialNumber( + certificate, + error, + ); + } + + late final _SecCertificateCopySerialNumberPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopySerialNumber'); + late final _SecCertificateCopySerialNumber = + _SecCertificateCopySerialNumberPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + + int SecCertificateCreateFromData( + ffi.Pointer data, + int type, + int encoding, + ffi.Pointer certificate, + ) { + return _SecCertificateCreateFromData( + data, + type, + encoding, + certificate, + ); + } + + late final _SecCertificateCreateFromDataPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + ffi.Pointer, + CSSM_CERT_TYPE, + CSSM_CERT_ENCODING, + ffi.Pointer)>>('SecCertificateCreateFromData'); + late final _SecCertificateCreateFromData = + _SecCertificateCreateFromDataPtr.asFunction< + int Function(ffi.Pointer, int, int, + ffi.Pointer)>(); + + int SecCertificateAddToKeychain( + SecCertificateRef certificate, + SecKeychainRef keychain, + ) { + return _SecCertificateAddToKeychain( + certificate, + keychain, + ); + } + + late final _SecCertificateAddToKeychainPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + SecKeychainRef)>>('SecCertificateAddToKeychain'); + late final _SecCertificateAddToKeychain = _SecCertificateAddToKeychainPtr + .asFunction(); + + int SecCertificateGetData( + SecCertificateRef certificate, + CSSM_DATA_PTR data, + ) { + return _SecCertificateGetData( + certificate, + data, + ); + } + + late final _SecCertificateGetDataPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecCertificateRef, CSSM_DATA_PTR)>>('SecCertificateGetData'); + late final _SecCertificateGetData = _SecCertificateGetDataPtr.asFunction< + int Function(SecCertificateRef, CSSM_DATA_PTR)>(); + + int SecCertificateGetType( + SecCertificateRef certificate, + ffi.Pointer certificateType, + ) { + return _SecCertificateGetType( + certificate, + certificateType, + ); + } + + late final _SecCertificateGetTypePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateGetType'); + late final _SecCertificateGetType = _SecCertificateGetTypePtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); + + int SecCertificateGetSubject( + SecCertificateRef certificate, + ffi.Pointer> subject, + ) { + return _SecCertificateGetSubject( + certificate, + subject, + ); + } + + late final _SecCertificateGetSubjectPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer>)>>( + 'SecCertificateGetSubject'); + late final _SecCertificateGetSubject = + _SecCertificateGetSubjectPtr.asFunction< + int Function( + SecCertificateRef, ffi.Pointer>)>(); + + int SecCertificateGetIssuer( + SecCertificateRef certificate, + ffi.Pointer> issuer, + ) { + return _SecCertificateGetIssuer( + certificate, + issuer, + ); + } + + late final _SecCertificateGetIssuerPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer>)>>( + 'SecCertificateGetIssuer'); + late final _SecCertificateGetIssuer = _SecCertificateGetIssuerPtr.asFunction< + int Function( + SecCertificateRef, ffi.Pointer>)>(); + + int SecCertificateGetCLHandle( + SecCertificateRef certificate, + ffi.Pointer clHandle, + ) { + return _SecCertificateGetCLHandle( + certificate, + clHandle, + ); + } + + late final _SecCertificateGetCLHandlePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateGetCLHandle'); + late final _SecCertificateGetCLHandle = + _SecCertificateGetCLHandlePtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); + + int SecCertificateGetAlgorithmID( + SecCertificateRef certificate, + ffi.Pointer> algid, + ) { + return _SecCertificateGetAlgorithmID( + certificate, + algid, + ); + } + + late final _SecCertificateGetAlgorithmIDPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecCertificateRef, ffi.Pointer>)>>( + 'SecCertificateGetAlgorithmID'); + late final _SecCertificateGetAlgorithmID = + _SecCertificateGetAlgorithmIDPtr.asFunction< + int Function( + SecCertificateRef, ffi.Pointer>)>(); + + int SecCertificateCopyPreference( + CFStringRef name, + int keyUsage, + ffi.Pointer certificate, + ) { + return _SecCertificateCopyPreference( + name, + keyUsage, + certificate, + ); + } + + late final _SecCertificateCopyPreferencePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(CFStringRef, uint32, + ffi.Pointer)>>('SecCertificateCopyPreference'); + late final _SecCertificateCopyPreference = + _SecCertificateCopyPreferencePtr.asFunction< + int Function(CFStringRef, int, ffi.Pointer)>(); + + SecCertificateRef SecCertificateCopyPreferred( + CFStringRef name, + CFArrayRef keyUsage, + ) { + return _SecCertificateCopyPreferred( + name, + keyUsage, + ); + } + + late final _SecCertificateCopyPreferredPtr = _lookup< + ffi.NativeFunction< + SecCertificateRef Function( + CFStringRef, CFArrayRef)>>('SecCertificateCopyPreferred'); + late final _SecCertificateCopyPreferred = _SecCertificateCopyPreferredPtr + .asFunction(); + + int SecCertificateSetPreference( + SecCertificateRef certificate, + CFStringRef name, + int keyUsage, + CFDateRef date, + ) { + return _SecCertificateSetPreference( + certificate, + name, + keyUsage, + date, + ); + } + + late final _SecCertificateSetPreferencePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, CFStringRef, uint32, + CFDateRef)>>('SecCertificateSetPreference'); + late final _SecCertificateSetPreference = + _SecCertificateSetPreferencePtr.asFunction< + int Function(SecCertificateRef, CFStringRef, int, CFDateRef)>(); + + int SecCertificateSetPreferred( + SecCertificateRef certificate, + CFStringRef name, + CFArrayRef keyUsage, + ) { + return _SecCertificateSetPreferred( + certificate, + name, + keyUsage, + ); + } + + late final _SecCertificateSetPreferredPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, CFStringRef, + CFArrayRef)>>('SecCertificateSetPreferred'); + late final _SecCertificateSetPreferred = _SecCertificateSetPreferredPtr + .asFunction(); + + late final ffi.Pointer _kSecPropertyKeyType = + _lookup('kSecPropertyKeyType'); + + CFStringRef get kSecPropertyKeyType => _kSecPropertyKeyType.value; + + set kSecPropertyKeyType(CFStringRef value) => + _kSecPropertyKeyType.value = value; + + late final ffi.Pointer _kSecPropertyKeyLabel = + _lookup('kSecPropertyKeyLabel'); + + CFStringRef get kSecPropertyKeyLabel => _kSecPropertyKeyLabel.value; + + set kSecPropertyKeyLabel(CFStringRef value) => + _kSecPropertyKeyLabel.value = value; + + late final ffi.Pointer _kSecPropertyKeyLocalizedLabel = + _lookup('kSecPropertyKeyLocalizedLabel'); + + CFStringRef get kSecPropertyKeyLocalizedLabel => + _kSecPropertyKeyLocalizedLabel.value; + + set kSecPropertyKeyLocalizedLabel(CFStringRef value) => + _kSecPropertyKeyLocalizedLabel.value = value; + + late final ffi.Pointer _kSecPropertyKeyValue = + _lookup('kSecPropertyKeyValue'); + + CFStringRef get kSecPropertyKeyValue => _kSecPropertyKeyValue.value; + + set kSecPropertyKeyValue(CFStringRef value) => + _kSecPropertyKeyValue.value = value; + + late final ffi.Pointer _kSecPropertyTypeWarning = + _lookup('kSecPropertyTypeWarning'); + + CFStringRef get kSecPropertyTypeWarning => _kSecPropertyTypeWarning.value; + + set kSecPropertyTypeWarning(CFStringRef value) => + _kSecPropertyTypeWarning.value = value; + + late final ffi.Pointer _kSecPropertyTypeSuccess = + _lookup('kSecPropertyTypeSuccess'); + + CFStringRef get kSecPropertyTypeSuccess => _kSecPropertyTypeSuccess.value; + + set kSecPropertyTypeSuccess(CFStringRef value) => + _kSecPropertyTypeSuccess.value = value; + + late final ffi.Pointer _kSecPropertyTypeSection = + _lookup('kSecPropertyTypeSection'); + + CFStringRef get kSecPropertyTypeSection => _kSecPropertyTypeSection.value; + + set kSecPropertyTypeSection(CFStringRef value) => + _kSecPropertyTypeSection.value = value; + + late final ffi.Pointer _kSecPropertyTypeData = + _lookup('kSecPropertyTypeData'); + + CFStringRef get kSecPropertyTypeData => _kSecPropertyTypeData.value; + + set kSecPropertyTypeData(CFStringRef value) => + _kSecPropertyTypeData.value = value; + + late final ffi.Pointer _kSecPropertyTypeString = + _lookup('kSecPropertyTypeString'); + + CFStringRef get kSecPropertyTypeString => _kSecPropertyTypeString.value; + + set kSecPropertyTypeString(CFStringRef value) => + _kSecPropertyTypeString.value = value; + + late final ffi.Pointer _kSecPropertyTypeURL = + _lookup('kSecPropertyTypeURL'); + + CFStringRef get kSecPropertyTypeURL => _kSecPropertyTypeURL.value; + + set kSecPropertyTypeURL(CFStringRef value) => + _kSecPropertyTypeURL.value = value; + + late final ffi.Pointer _kSecPropertyTypeDate = + _lookup('kSecPropertyTypeDate'); + + CFStringRef get kSecPropertyTypeDate => _kSecPropertyTypeDate.value; + + set kSecPropertyTypeDate(CFStringRef value) => + _kSecPropertyTypeDate.value = value; + + late final ffi.Pointer _kSecPropertyTypeArray = + _lookup('kSecPropertyTypeArray'); + + CFStringRef get kSecPropertyTypeArray => _kSecPropertyTypeArray.value; + + set kSecPropertyTypeArray(CFStringRef value) => + _kSecPropertyTypeArray.value = value; + + late final ffi.Pointer _kSecPropertyTypeNumber = + _lookup('kSecPropertyTypeNumber'); + + CFStringRef get kSecPropertyTypeNumber => _kSecPropertyTypeNumber.value; + + set kSecPropertyTypeNumber(CFStringRef value) => + _kSecPropertyTypeNumber.value = value; + + CFDictionaryRef SecCertificateCopyValues( + SecCertificateRef certificate, + CFArrayRef keys, + ffi.Pointer error, + ) { + return _SecCertificateCopyValues( + certificate, + keys, + error, + ); + } + + late final _SecCertificateCopyValuesPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(SecCertificateRef, CFArrayRef, + ffi.Pointer)>>('SecCertificateCopyValues'); + late final _SecCertificateCopyValues = + _SecCertificateCopyValuesPtr.asFunction< + CFDictionaryRef Function( + SecCertificateRef, CFArrayRef, ffi.Pointer)>(); + + CFStringRef SecCertificateCopyLongDescription( + CFAllocatorRef alloc, + SecCertificateRef certificate, + ffi.Pointer error, + ) { + return _SecCertificateCopyLongDescription( + alloc, + certificate, + error, + ); + } + + late final _SecCertificateCopyLongDescriptionPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyLongDescription'); + late final _SecCertificateCopyLongDescription = + _SecCertificateCopyLongDescriptionPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); + + CFStringRef SecCertificateCopyShortDescription( + CFAllocatorRef alloc, + SecCertificateRef certificate, + ffi.Pointer error, + ) { + return _SecCertificateCopyShortDescription( + alloc, + certificate, + error, + ); + } + + late final _SecCertificateCopyShortDescriptionPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyShortDescription'); + late final _SecCertificateCopyShortDescription = + _SecCertificateCopyShortDescriptionPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); + + CFDataRef SecCertificateCopyNormalizedIssuerContent( + SecCertificateRef certificate, + ffi.Pointer error, + ) { + return _SecCertificateCopyNormalizedIssuerContent( + certificate, + error, + ); + } + + late final _SecCertificateCopyNormalizedIssuerContentPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( + 'SecCertificateCopyNormalizedIssuerContent'); + late final _SecCertificateCopyNormalizedIssuerContent = + _SecCertificateCopyNormalizedIssuerContentPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + + CFDataRef SecCertificateCopyNormalizedSubjectContent( + SecCertificateRef certificate, + ffi.Pointer error, + ) { + return _SecCertificateCopyNormalizedSubjectContent( + certificate, + error, + ); + } + + late final _SecCertificateCopyNormalizedSubjectContentPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( + 'SecCertificateCopyNormalizedSubjectContent'); + late final _SecCertificateCopyNormalizedSubjectContent = + _SecCertificateCopyNormalizedSubjectContentPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + + int SecIdentityGetTypeID() { + return _SecIdentityGetTypeID(); + } + + late final _SecIdentityGetTypeIDPtr = + _lookup>('SecIdentityGetTypeID'); + late final _SecIdentityGetTypeID = + _SecIdentityGetTypeIDPtr.asFunction(); + + int SecIdentityCreateWithCertificate( + CFTypeRef keychainOrArray, + SecCertificateRef certificateRef, + ffi.Pointer identityRef, + ) { + return _SecIdentityCreateWithCertificate( + keychainOrArray, + certificateRef, + identityRef, + ); + } + + late final _SecIdentityCreateWithCertificatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + CFTypeRef, SecCertificateRef, ffi.Pointer)>>( + 'SecIdentityCreateWithCertificate'); + late final _SecIdentityCreateWithCertificate = + _SecIdentityCreateWithCertificatePtr.asFunction< + int Function( + CFTypeRef, SecCertificateRef, ffi.Pointer)>(); + + int SecIdentityCopyCertificate( + SecIdentityRef identityRef, + ffi.Pointer certificateRef, + ) { + return _SecIdentityCopyCertificate( + identityRef, + certificateRef, + ); + } + + late final _SecIdentityCopyCertificatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecIdentityRef, + ffi.Pointer)>>('SecIdentityCopyCertificate'); + late final _SecIdentityCopyCertificate = + _SecIdentityCopyCertificatePtr.asFunction< + int Function(SecIdentityRef, ffi.Pointer)>(); + + int SecIdentityCopyPrivateKey( + SecIdentityRef identityRef, + ffi.Pointer privateKeyRef, + ) { + return _SecIdentityCopyPrivateKey( + identityRef, + privateKeyRef, + ); + } + + late final _SecIdentityCopyPrivateKeyPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecIdentityRef, + ffi.Pointer)>>('SecIdentityCopyPrivateKey'); + late final _SecIdentityCopyPrivateKey = _SecIdentityCopyPrivateKeyPtr + .asFunction)>(); + + int SecIdentityCopyPreference( + CFStringRef name, + int keyUsage, + CFArrayRef validIssuers, + ffi.Pointer identity, + ) { + return _SecIdentityCopyPreference( + name, + keyUsage, + validIssuers, + identity, + ); + } + + late final _SecIdentityCopyPreferencePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(CFStringRef, CSSM_KEYUSE, CFArrayRef, + ffi.Pointer)>>('SecIdentityCopyPreference'); + late final _SecIdentityCopyPreference = + _SecIdentityCopyPreferencePtr.asFunction< + int Function( + CFStringRef, int, CFArrayRef, ffi.Pointer)>(); + + SecIdentityRef SecIdentityCopyPreferred( + CFStringRef name, + CFArrayRef keyUsage, + CFArrayRef validIssuers, + ) { + return _SecIdentityCopyPreferred( + name, + keyUsage, + validIssuers, + ); + } + + late final _SecIdentityCopyPreferredPtr = _lookup< + ffi.NativeFunction< + SecIdentityRef Function(CFStringRef, CFArrayRef, + CFArrayRef)>>('SecIdentityCopyPreferred'); + late final _SecIdentityCopyPreferred = + _SecIdentityCopyPreferredPtr.asFunction< + SecIdentityRef Function(CFStringRef, CFArrayRef, CFArrayRef)>(); + + int SecIdentitySetPreference( + SecIdentityRef identity, + CFStringRef name, + int keyUsage, + ) { + return _SecIdentitySetPreference( + identity, + name, + keyUsage, + ); + } + + late final _SecIdentitySetPreferencePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecIdentityRef, CFStringRef, + CSSM_KEYUSE)>>('SecIdentitySetPreference'); + late final _SecIdentitySetPreference = _SecIdentitySetPreferencePtr + .asFunction(); + + int SecIdentitySetPreferred( + SecIdentityRef identity, + CFStringRef name, + CFArrayRef keyUsage, + ) { + return _SecIdentitySetPreferred( + identity, + name, + keyUsage, + ); + } + + late final _SecIdentitySetPreferredPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecIdentityRef, CFStringRef, + CFArrayRef)>>('SecIdentitySetPreferred'); + late final _SecIdentitySetPreferred = _SecIdentitySetPreferredPtr.asFunction< + int Function(SecIdentityRef, CFStringRef, CFArrayRef)>(); + + int SecIdentityCopySystemIdentity( + CFStringRef domain, + ffi.Pointer idRef, + ffi.Pointer actualDomain, + ) { + return _SecIdentityCopySystemIdentity( + domain, + idRef, + actualDomain, + ); + } + + late final _SecIdentityCopySystemIdentityPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>>('SecIdentityCopySystemIdentity'); + late final _SecIdentityCopySystemIdentity = + _SecIdentityCopySystemIdentityPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>(); + + int SecIdentitySetSystemIdentity( + CFStringRef domain, + SecIdentityRef idRef, + ) { + return _SecIdentitySetSystemIdentity( + domain, + idRef, + ); + } + + late final _SecIdentitySetSystemIdentityPtr = _lookup< + ffi.NativeFunction>( + 'SecIdentitySetSystemIdentity'); + late final _SecIdentitySetSystemIdentity = _SecIdentitySetSystemIdentityPtr + .asFunction(); + + late final ffi.Pointer _kSecIdentityDomainDefault = + _lookup('kSecIdentityDomainDefault'); + + CFStringRef get kSecIdentityDomainDefault => _kSecIdentityDomainDefault.value; + + set kSecIdentityDomainDefault(CFStringRef value) => + _kSecIdentityDomainDefault.value = value; + + late final ffi.Pointer _kSecIdentityDomainKerberosKDC = + _lookup('kSecIdentityDomainKerberosKDC'); + + CFStringRef get kSecIdentityDomainKerberosKDC => + _kSecIdentityDomainKerberosKDC.value; + + set kSecIdentityDomainKerberosKDC(CFStringRef value) => + _kSecIdentityDomainKerberosKDC.value = value; + + sec_trust_t sec_trust_create( + SecTrustRef trust, + ) { + return _sec_trust_create( + trust, + ); + } + + late final _sec_trust_createPtr = + _lookup>( + 'sec_trust_create'); + late final _sec_trust_create = + _sec_trust_createPtr.asFunction(); + + SecTrustRef sec_trust_copy_ref( + sec_trust_t trust, + ) { + return _sec_trust_copy_ref( + trust, + ); + } + + late final _sec_trust_copy_refPtr = + _lookup>( + 'sec_trust_copy_ref'); + late final _sec_trust_copy_ref = + _sec_trust_copy_refPtr.asFunction(); + + sec_identity_t sec_identity_create( + SecIdentityRef identity, + ) { + return _sec_identity_create( + identity, + ); + } + + late final _sec_identity_createPtr = + _lookup>( + 'sec_identity_create'); + late final _sec_identity_create = _sec_identity_createPtr + .asFunction(); + + sec_identity_t sec_identity_create_with_certificates( + SecIdentityRef identity, + CFArrayRef certificates, + ) { + return _sec_identity_create_with_certificates( + identity, + certificates, + ); + } + + late final _sec_identity_create_with_certificatesPtr = _lookup< + ffi.NativeFunction< + sec_identity_t Function(SecIdentityRef, + CFArrayRef)>>('sec_identity_create_with_certificates'); + late final _sec_identity_create_with_certificates = + _sec_identity_create_with_certificatesPtr + .asFunction(); + + bool sec_identity_access_certificates( + sec_identity_t identity, + ffi.Pointer<_ObjCBlock> handler, + ) { + return _sec_identity_access_certificates( + identity, + handler, + ); + } + + late final _sec_identity_access_certificatesPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(sec_identity_t, + ffi.Pointer<_ObjCBlock>)>>('sec_identity_access_certificates'); + late final _sec_identity_access_certificates = + _sec_identity_access_certificatesPtr + .asFunction)>(); + + SecIdentityRef sec_identity_copy_ref( + sec_identity_t identity, + ) { + return _sec_identity_copy_ref( + identity, + ); + } + + late final _sec_identity_copy_refPtr = + _lookup>( + 'sec_identity_copy_ref'); + late final _sec_identity_copy_ref = _sec_identity_copy_refPtr + .asFunction(); + + CFArrayRef sec_identity_copy_certificates_ref( + sec_identity_t identity, + ) { + return _sec_identity_copy_certificates_ref( + identity, + ); + } + + late final _sec_identity_copy_certificates_refPtr = + _lookup>( + 'sec_identity_copy_certificates_ref'); + late final _sec_identity_copy_certificates_ref = + _sec_identity_copy_certificates_refPtr + .asFunction(); + + sec_certificate_t sec_certificate_create( + SecCertificateRef certificate, + ) { + return _sec_certificate_create( + certificate, + ); + } + + late final _sec_certificate_createPtr = _lookup< + ffi.NativeFunction>( + 'sec_certificate_create'); + late final _sec_certificate_create = _sec_certificate_createPtr + .asFunction(); + + SecCertificateRef sec_certificate_copy_ref( + sec_certificate_t certificate, + ) { + return _sec_certificate_copy_ref( + certificate, + ); + } + + late final _sec_certificate_copy_refPtr = _lookup< + ffi.NativeFunction>( + 'sec_certificate_copy_ref'); + late final _sec_certificate_copy_ref = _sec_certificate_copy_refPtr + .asFunction(); + + ffi.Pointer sec_protocol_metadata_get_negotiated_protocol( + sec_protocol_metadata_t metadata, + ) { + return _sec_protocol_metadata_get_negotiated_protocol( + metadata, + ); + } + + late final _sec_protocol_metadata_get_negotiated_protocolPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_get_negotiated_protocol'); + late final _sec_protocol_metadata_get_negotiated_protocol = + _sec_protocol_metadata_get_negotiated_protocolPtr.asFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>(); + + dispatch_data_t sec_protocol_metadata_copy_peer_public_key( + sec_protocol_metadata_t metadata, + ) { + return _sec_protocol_metadata_copy_peer_public_key( + metadata, + ); + } + + late final _sec_protocol_metadata_copy_peer_public_keyPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_copy_peer_public_key'); + late final _sec_protocol_metadata_copy_peer_public_key = + _sec_protocol_metadata_copy_peer_public_keyPtr + .asFunction(); + + int sec_protocol_metadata_get_negotiated_tls_protocol_version( + sec_protocol_metadata_t metadata, + ) { + return _sec_protocol_metadata_get_negotiated_tls_protocol_version( + metadata, + ); + } + + late final _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr = + _lookup>( + 'sec_protocol_metadata_get_negotiated_tls_protocol_version'); + late final _sec_protocol_metadata_get_negotiated_tls_protocol_version = + _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr + .asFunction(); + + int sec_protocol_metadata_get_negotiated_protocol_version( + sec_protocol_metadata_t metadata, + ) { + return _sec_protocol_metadata_get_negotiated_protocol_version( + metadata, + ); + } + + late final _sec_protocol_metadata_get_negotiated_protocol_versionPtr = + _lookup>( + 'sec_protocol_metadata_get_negotiated_protocol_version'); + late final _sec_protocol_metadata_get_negotiated_protocol_version = + _sec_protocol_metadata_get_negotiated_protocol_versionPtr + .asFunction(); + + int sec_protocol_metadata_get_negotiated_tls_ciphersuite( + sec_protocol_metadata_t metadata, + ) { + return _sec_protocol_metadata_get_negotiated_tls_ciphersuite( + metadata, + ); + } + + late final _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr = + _lookup>( + 'sec_protocol_metadata_get_negotiated_tls_ciphersuite'); + late final _sec_protocol_metadata_get_negotiated_tls_ciphersuite = + _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr + .asFunction(); + + int sec_protocol_metadata_get_negotiated_ciphersuite( + sec_protocol_metadata_t metadata, + ) { + return _sec_protocol_metadata_get_negotiated_ciphersuite( + metadata, + ); + } + + late final _sec_protocol_metadata_get_negotiated_ciphersuitePtr = _lookup< + ffi.NativeFunction>( + 'sec_protocol_metadata_get_negotiated_ciphersuite'); + late final _sec_protocol_metadata_get_negotiated_ciphersuite = + _sec_protocol_metadata_get_negotiated_ciphersuitePtr + .asFunction(); + + bool sec_protocol_metadata_get_early_data_accepted( + sec_protocol_metadata_t metadata, + ) { + return _sec_protocol_metadata_get_early_data_accepted( + metadata, + ); + } + + late final _sec_protocol_metadata_get_early_data_acceptedPtr = + _lookup>( + 'sec_protocol_metadata_get_early_data_accepted'); + late final _sec_protocol_metadata_get_early_data_accepted = + _sec_protocol_metadata_get_early_data_acceptedPtr + .asFunction(); + + bool sec_protocol_metadata_access_peer_certificate_chain( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, + ) { + return _sec_protocol_metadata_access_peer_certificate_chain( + metadata, + handler, + ); + } + + late final _sec_protocol_metadata_access_peer_certificate_chainPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_peer_certificate_chain'); + late final _sec_protocol_metadata_access_peer_certificate_chain = + _sec_protocol_metadata_access_peer_certificate_chainPtr.asFunction< + bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + + bool sec_protocol_metadata_access_ocsp_response( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, + ) { + return _sec_protocol_metadata_access_ocsp_response( + metadata, + handler, + ); + } + + late final _sec_protocol_metadata_access_ocsp_responsePtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_ocsp_response'); + late final _sec_protocol_metadata_access_ocsp_response = + _sec_protocol_metadata_access_ocsp_responsePtr.asFunction< + bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + + bool sec_protocol_metadata_access_supported_signature_algorithms( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, + ) { + return _sec_protocol_metadata_access_supported_signature_algorithms( + metadata, + handler, + ); + } + + late final _sec_protocol_metadata_access_supported_signature_algorithmsPtr = + _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_supported_signature_algorithms'); + late final _sec_protocol_metadata_access_supported_signature_algorithms = + _sec_protocol_metadata_access_supported_signature_algorithmsPtr + .asFunction< + bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + + bool sec_protocol_metadata_access_distinguished_names( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, + ) { + return _sec_protocol_metadata_access_distinguished_names( + metadata, + handler, + ); + } + + late final _sec_protocol_metadata_access_distinguished_namesPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_distinguished_names'); + late final _sec_protocol_metadata_access_distinguished_names = + _sec_protocol_metadata_access_distinguished_namesPtr.asFunction< + bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + + bool sec_protocol_metadata_access_pre_shared_keys( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, + ) { + return _sec_protocol_metadata_access_pre_shared_keys( + metadata, + handler, + ); + } + + late final _sec_protocol_metadata_access_pre_shared_keysPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_pre_shared_keys'); + late final _sec_protocol_metadata_access_pre_shared_keys = + _sec_protocol_metadata_access_pre_shared_keysPtr.asFunction< + bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + + ffi.Pointer sec_protocol_metadata_get_server_name( + sec_protocol_metadata_t metadata, + ) { + return _sec_protocol_metadata_get_server_name( + metadata, + ); + } + + late final _sec_protocol_metadata_get_server_namePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_get_server_name'); + late final _sec_protocol_metadata_get_server_name = + _sec_protocol_metadata_get_server_namePtr.asFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>(); + + bool sec_protocol_metadata_peers_are_equal( + sec_protocol_metadata_t metadataA, + sec_protocol_metadata_t metadataB, + ) { + return _sec_protocol_metadata_peers_are_equal( + metadataA, + metadataB, + ); + } + + late final _sec_protocol_metadata_peers_are_equalPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_peers_are_equal'); + late final _sec_protocol_metadata_peers_are_equal = + _sec_protocol_metadata_peers_are_equalPtr.asFunction< + bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); + + bool sec_protocol_metadata_challenge_parameters_are_equal( + sec_protocol_metadata_t metadataA, + sec_protocol_metadata_t metadataB, + ) { + return _sec_protocol_metadata_challenge_parameters_are_equal( + metadataA, + metadataB, + ); + } + + late final _sec_protocol_metadata_challenge_parameters_are_equalPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_challenge_parameters_are_equal'); + late final _sec_protocol_metadata_challenge_parameters_are_equal = + _sec_protocol_metadata_challenge_parameters_are_equalPtr.asFunction< + bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); + + dispatch_data_t sec_protocol_metadata_create_secret( + sec_protocol_metadata_t metadata, + int label_len, + ffi.Pointer label, + int exporter_length, + ) { + return _sec_protocol_metadata_create_secret( + metadata, + label_len, + label, + exporter_length, + ); + } + + late final _sec_protocol_metadata_create_secretPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function( + sec_protocol_metadata_t, + ffi.Size, + ffi.Pointer, + ffi.Size)>>('sec_protocol_metadata_create_secret'); + late final _sec_protocol_metadata_create_secret = + _sec_protocol_metadata_create_secretPtr.asFunction< + dispatch_data_t Function( + sec_protocol_metadata_t, int, ffi.Pointer, int)>(); + + dispatch_data_t sec_protocol_metadata_create_secret_with_context( + sec_protocol_metadata_t metadata, + int label_len, + ffi.Pointer label, + int context_len, + ffi.Pointer context, + int exporter_length, + ) { + return _sec_protocol_metadata_create_secret_with_context( + metadata, + label_len, + label, + context_len, + context, + exporter_length, + ); + } + + late final _sec_protocol_metadata_create_secret_with_contextPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function( + sec_protocol_metadata_t, + ffi.Size, + ffi.Pointer, + ffi.Size, + ffi.Pointer, + ffi.Size)>>('sec_protocol_metadata_create_secret_with_context'); + late final _sec_protocol_metadata_create_secret_with_context = + _sec_protocol_metadata_create_secret_with_contextPtr.asFunction< + dispatch_data_t Function(sec_protocol_metadata_t, int, + ffi.Pointer, int, ffi.Pointer, int)>(); + + bool sec_protocol_options_are_equal( + sec_protocol_options_t optionsA, + sec_protocol_options_t optionsB, + ) { + return _sec_protocol_options_are_equal( + optionsA, + optionsB, + ); + } + + late final _sec_protocol_options_are_equalPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(sec_protocol_options_t, + sec_protocol_options_t)>>('sec_protocol_options_are_equal'); + late final _sec_protocol_options_are_equal = + _sec_protocol_options_are_equalPtr.asFunction< + bool Function(sec_protocol_options_t, sec_protocol_options_t)>(); + + void sec_protocol_options_set_local_identity( + sec_protocol_options_t options, + sec_identity_t identity, + ) { + return _sec_protocol_options_set_local_identity( + options, + identity, + ); + } + + late final _sec_protocol_options_set_local_identityPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + sec_identity_t)>>('sec_protocol_options_set_local_identity'); + late final _sec_protocol_options_set_local_identity = + _sec_protocol_options_set_local_identityPtr + .asFunction(); + + void sec_protocol_options_append_tls_ciphersuite( + sec_protocol_options_t options, + int ciphersuite, + ) { + return _sec_protocol_options_append_tls_ciphersuite( + options, + ciphersuite, + ); + } + + late final _sec_protocol_options_append_tls_ciphersuitePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite'); + late final _sec_protocol_options_append_tls_ciphersuite = + _sec_protocol_options_append_tls_ciphersuitePtr + .asFunction(); + + void sec_protocol_options_add_tls_ciphersuite( + sec_protocol_options_t options, + int ciphersuite, + ) { + return _sec_protocol_options_add_tls_ciphersuite( + options, + ciphersuite, + ); + } + + late final _sec_protocol_options_add_tls_ciphersuitePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + SSLCipherSuite)>>('sec_protocol_options_add_tls_ciphersuite'); + late final _sec_protocol_options_add_tls_ciphersuite = + _sec_protocol_options_add_tls_ciphersuitePtr + .asFunction(); + + void sec_protocol_options_append_tls_ciphersuite_group( + sec_protocol_options_t options, + int group, + ) { + return _sec_protocol_options_append_tls_ciphersuite_group( + options, + group, + ); + } + + late final _sec_protocol_options_append_tls_ciphersuite_groupPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite_group'); + late final _sec_protocol_options_append_tls_ciphersuite_group = + _sec_protocol_options_append_tls_ciphersuite_groupPtr + .asFunction(); + + void sec_protocol_options_add_tls_ciphersuite_group( + sec_protocol_options_t options, + int group, + ) { + return _sec_protocol_options_add_tls_ciphersuite_group( + options, + group, + ); + } + + late final _sec_protocol_options_add_tls_ciphersuite_groupPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_add_tls_ciphersuite_group'); + late final _sec_protocol_options_add_tls_ciphersuite_group = + _sec_protocol_options_add_tls_ciphersuite_groupPtr + .asFunction(); + + void sec_protocol_options_set_tls_min_version( + sec_protocol_options_t options, + int version, + ) { + return _sec_protocol_options_set_tls_min_version( + options, + version, + ); + } + + late final _sec_protocol_options_set_tls_min_versionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_set_tls_min_version'); + late final _sec_protocol_options_set_tls_min_version = + _sec_protocol_options_set_tls_min_versionPtr + .asFunction(); + + void sec_protocol_options_set_min_tls_protocol_version( + sec_protocol_options_t options, + int version, + ) { + return _sec_protocol_options_set_min_tls_protocol_version( + options, + version, + ); + } + + late final _sec_protocol_options_set_min_tls_protocol_versionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_set_min_tls_protocol_version'); + late final _sec_protocol_options_set_min_tls_protocol_version = + _sec_protocol_options_set_min_tls_protocol_versionPtr + .asFunction(); + + int sec_protocol_options_get_default_min_tls_protocol_version() { + return _sec_protocol_options_get_default_min_tls_protocol_version(); + } + + late final _sec_protocol_options_get_default_min_tls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_min_tls_protocol_version'); + late final _sec_protocol_options_get_default_min_tls_protocol_version = + _sec_protocol_options_get_default_min_tls_protocol_versionPtr + .asFunction(); + + int sec_protocol_options_get_default_min_dtls_protocol_version() { + return _sec_protocol_options_get_default_min_dtls_protocol_version(); + } + + late final _sec_protocol_options_get_default_min_dtls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_min_dtls_protocol_version'); + late final _sec_protocol_options_get_default_min_dtls_protocol_version = + _sec_protocol_options_get_default_min_dtls_protocol_versionPtr + .asFunction(); + + void sec_protocol_options_set_tls_max_version( + sec_protocol_options_t options, + int version, + ) { + return _sec_protocol_options_set_tls_max_version( + options, + version, + ); + } + + late final _sec_protocol_options_set_tls_max_versionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_set_tls_max_version'); + late final _sec_protocol_options_set_tls_max_version = + _sec_protocol_options_set_tls_max_versionPtr + .asFunction(); + + void sec_protocol_options_set_max_tls_protocol_version( + sec_protocol_options_t options, + int version, + ) { + return _sec_protocol_options_set_max_tls_protocol_version( + options, + version, + ); + } + + late final _sec_protocol_options_set_max_tls_protocol_versionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_set_max_tls_protocol_version'); + late final _sec_protocol_options_set_max_tls_protocol_version = + _sec_protocol_options_set_max_tls_protocol_versionPtr + .asFunction(); + + int sec_protocol_options_get_default_max_tls_protocol_version() { + return _sec_protocol_options_get_default_max_tls_protocol_version(); + } + + late final _sec_protocol_options_get_default_max_tls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_max_tls_protocol_version'); + late final _sec_protocol_options_get_default_max_tls_protocol_version = + _sec_protocol_options_get_default_max_tls_protocol_versionPtr + .asFunction(); + + int sec_protocol_options_get_default_max_dtls_protocol_version() { + return _sec_protocol_options_get_default_max_dtls_protocol_version(); + } + + late final _sec_protocol_options_get_default_max_dtls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_max_dtls_protocol_version'); + late final _sec_protocol_options_get_default_max_dtls_protocol_version = + _sec_protocol_options_get_default_max_dtls_protocol_versionPtr + .asFunction(); + + bool sec_protocol_options_get_enable_encrypted_client_hello( + sec_protocol_options_t options, + ) { + return _sec_protocol_options_get_enable_encrypted_client_hello( + options, + ); + } + + late final _sec_protocol_options_get_enable_encrypted_client_helloPtr = + _lookup>( + 'sec_protocol_options_get_enable_encrypted_client_hello'); + late final _sec_protocol_options_get_enable_encrypted_client_hello = + _sec_protocol_options_get_enable_encrypted_client_helloPtr + .asFunction(); + + bool sec_protocol_options_get_quic_use_legacy_codepoint( + sec_protocol_options_t options, + ) { + return _sec_protocol_options_get_quic_use_legacy_codepoint( + options, + ); + } + + late final _sec_protocol_options_get_quic_use_legacy_codepointPtr = + _lookup>( + 'sec_protocol_options_get_quic_use_legacy_codepoint'); + late final _sec_protocol_options_get_quic_use_legacy_codepoint = + _sec_protocol_options_get_quic_use_legacy_codepointPtr + .asFunction(); + + void sec_protocol_options_add_tls_application_protocol( + sec_protocol_options_t options, + ffi.Pointer application_protocol, + ) { + return _sec_protocol_options_add_tls_application_protocol( + options, + application_protocol, + ); + } + + late final _sec_protocol_options_add_tls_application_protocolPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_options_t, ffi.Pointer)>>( + 'sec_protocol_options_add_tls_application_protocol'); + late final _sec_protocol_options_add_tls_application_protocol = + _sec_protocol_options_add_tls_application_protocolPtr.asFunction< + void Function(sec_protocol_options_t, ffi.Pointer)>(); + + void sec_protocol_options_set_tls_server_name( + sec_protocol_options_t options, + ffi.Pointer server_name, + ) { + return _sec_protocol_options_set_tls_server_name( + options, + server_name, + ); + } + + late final _sec_protocol_options_set_tls_server_namePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_options_t, ffi.Pointer)>>( + 'sec_protocol_options_set_tls_server_name'); + late final _sec_protocol_options_set_tls_server_name = + _sec_protocol_options_set_tls_server_namePtr.asFunction< + void Function(sec_protocol_options_t, ffi.Pointer)>(); + + void sec_protocol_options_set_tls_diffie_hellman_parameters( + sec_protocol_options_t options, + dispatch_data_t params, + ) { + return _sec_protocol_options_set_tls_diffie_hellman_parameters( + options, + params, + ); + } + + late final _sec_protocol_options_set_tls_diffie_hellman_parametersPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( + 'sec_protocol_options_set_tls_diffie_hellman_parameters'); + late final _sec_protocol_options_set_tls_diffie_hellman_parameters = + _sec_protocol_options_set_tls_diffie_hellman_parametersPtr + .asFunction(); + + void sec_protocol_options_add_pre_shared_key( + sec_protocol_options_t options, + dispatch_data_t psk, + dispatch_data_t psk_identity, + ) { + return _sec_protocol_options_add_pre_shared_key( + options, + psk, + psk_identity, + ); + } + + late final _sec_protocol_options_add_pre_shared_keyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, dispatch_data_t, + dispatch_data_t)>>('sec_protocol_options_add_pre_shared_key'); + late final _sec_protocol_options_add_pre_shared_key = + _sec_protocol_options_add_pre_shared_keyPtr.asFunction< + void Function( + sec_protocol_options_t, dispatch_data_t, dispatch_data_t)>(); + + void sec_protocol_options_set_tls_pre_shared_key_identity_hint( + sec_protocol_options_t options, + dispatch_data_t psk_identity_hint, + ) { + return _sec_protocol_options_set_tls_pre_shared_key_identity_hint( + options, + psk_identity_hint, + ); + } + + late final _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( + 'sec_protocol_options_set_tls_pre_shared_key_identity_hint'); + late final _sec_protocol_options_set_tls_pre_shared_key_identity_hint = + _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr + .asFunction(); + + void sec_protocol_options_set_pre_shared_key_selection_block( + sec_protocol_options_t options, + sec_protocol_pre_shared_key_selection_t psk_selection_block, + dispatch_queue_t psk_selection_queue, + ) { + return _sec_protocol_options_set_pre_shared_key_selection_block( + options, + psk_selection_block, + psk_selection_queue, + ); + } + + late final _sec_protocol_options_set_pre_shared_key_selection_blockPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_options_t, + sec_protocol_pre_shared_key_selection_t, + dispatch_queue_t)>>( + 'sec_protocol_options_set_pre_shared_key_selection_block'); + late final _sec_protocol_options_set_pre_shared_key_selection_block = + _sec_protocol_options_set_pre_shared_key_selection_blockPtr.asFunction< + void Function(sec_protocol_options_t, + sec_protocol_pre_shared_key_selection_t, dispatch_queue_t)>(); + + void sec_protocol_options_set_tls_tickets_enabled( + sec_protocol_options_t options, + bool tickets_enabled, + ) { + return _sec_protocol_options_set_tls_tickets_enabled( + options, + tickets_enabled, + ); + } + + late final _sec_protocol_options_set_tls_tickets_enabledPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_tickets_enabled'); + late final _sec_protocol_options_set_tls_tickets_enabled = + _sec_protocol_options_set_tls_tickets_enabledPtr + .asFunction(); + + void sec_protocol_options_set_tls_is_fallback_attempt( + sec_protocol_options_t options, + bool is_fallback_attempt, + ) { + return _sec_protocol_options_set_tls_is_fallback_attempt( + options, + is_fallback_attempt, + ); + } + + late final _sec_protocol_options_set_tls_is_fallback_attemptPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_is_fallback_attempt'); + late final _sec_protocol_options_set_tls_is_fallback_attempt = + _sec_protocol_options_set_tls_is_fallback_attemptPtr + .asFunction(); + + void sec_protocol_options_set_tls_resumption_enabled( + sec_protocol_options_t options, + bool resumption_enabled, + ) { + return _sec_protocol_options_set_tls_resumption_enabled( + options, + resumption_enabled, + ); + } + + late final _sec_protocol_options_set_tls_resumption_enabledPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_resumption_enabled'); + late final _sec_protocol_options_set_tls_resumption_enabled = + _sec_protocol_options_set_tls_resumption_enabledPtr + .asFunction(); + + void sec_protocol_options_set_tls_false_start_enabled( + sec_protocol_options_t options, + bool false_start_enabled, + ) { + return _sec_protocol_options_set_tls_false_start_enabled( + options, + false_start_enabled, + ); + } + + late final _sec_protocol_options_set_tls_false_start_enabledPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_false_start_enabled'); + late final _sec_protocol_options_set_tls_false_start_enabled = + _sec_protocol_options_set_tls_false_start_enabledPtr + .asFunction(); + + void sec_protocol_options_set_tls_ocsp_enabled( + sec_protocol_options_t options, + bool ocsp_enabled, + ) { + return _sec_protocol_options_set_tls_ocsp_enabled( + options, + ocsp_enabled, + ); + } + + late final _sec_protocol_options_set_tls_ocsp_enabledPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_ocsp_enabled'); + late final _sec_protocol_options_set_tls_ocsp_enabled = + _sec_protocol_options_set_tls_ocsp_enabledPtr + .asFunction(); + + void sec_protocol_options_set_tls_sct_enabled( + sec_protocol_options_t options, + bool sct_enabled, + ) { + return _sec_protocol_options_set_tls_sct_enabled( + options, + sct_enabled, + ); + } + + late final _sec_protocol_options_set_tls_sct_enabledPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_sct_enabled'); + late final _sec_protocol_options_set_tls_sct_enabled = + _sec_protocol_options_set_tls_sct_enabledPtr + .asFunction(); + + void sec_protocol_options_set_tls_renegotiation_enabled( + sec_protocol_options_t options, + bool renegotiation_enabled, + ) { + return _sec_protocol_options_set_tls_renegotiation_enabled( + options, + renegotiation_enabled, + ); + } + + late final _sec_protocol_options_set_tls_renegotiation_enabledPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_renegotiation_enabled'); + late final _sec_protocol_options_set_tls_renegotiation_enabled = + _sec_protocol_options_set_tls_renegotiation_enabledPtr + .asFunction(); + + void sec_protocol_options_set_peer_authentication_required( + sec_protocol_options_t options, + bool peer_authentication_required, + ) { + return _sec_protocol_options_set_peer_authentication_required( + options, + peer_authentication_required, + ); + } + + late final _sec_protocol_options_set_peer_authentication_requiredPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( + 'sec_protocol_options_set_peer_authentication_required'); + late final _sec_protocol_options_set_peer_authentication_required = + _sec_protocol_options_set_peer_authentication_requiredPtr + .asFunction(); + + void sec_protocol_options_set_peer_authentication_optional( + sec_protocol_options_t options, + bool peer_authentication_optional, + ) { + return _sec_protocol_options_set_peer_authentication_optional( + options, + peer_authentication_optional, + ); + } + + late final _sec_protocol_options_set_peer_authentication_optionalPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( + 'sec_protocol_options_set_peer_authentication_optional'); + late final _sec_protocol_options_set_peer_authentication_optional = + _sec_protocol_options_set_peer_authentication_optionalPtr + .asFunction(); + + void sec_protocol_options_set_enable_encrypted_client_hello( + sec_protocol_options_t options, + bool enable_encrypted_client_hello, + ) { + return _sec_protocol_options_set_enable_encrypted_client_hello( + options, + enable_encrypted_client_hello, + ); + } + + late final _sec_protocol_options_set_enable_encrypted_client_helloPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( + 'sec_protocol_options_set_enable_encrypted_client_hello'); + late final _sec_protocol_options_set_enable_encrypted_client_hello = + _sec_protocol_options_set_enable_encrypted_client_helloPtr + .asFunction(); + + void sec_protocol_options_set_quic_use_legacy_codepoint( + sec_protocol_options_t options, + bool quic_use_legacy_codepoint, + ) { + return _sec_protocol_options_set_quic_use_legacy_codepoint( + options, + quic_use_legacy_codepoint, + ); + } + + late final _sec_protocol_options_set_quic_use_legacy_codepointPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_quic_use_legacy_codepoint'); + late final _sec_protocol_options_set_quic_use_legacy_codepoint = + _sec_protocol_options_set_quic_use_legacy_codepointPtr + .asFunction(); + + void sec_protocol_options_set_key_update_block( + sec_protocol_options_t options, + sec_protocol_key_update_t key_update_block, + dispatch_queue_t key_update_queue, + ) { + return _sec_protocol_options_set_key_update_block( + options, + key_update_block, + key_update_queue, + ); + } + + late final _sec_protocol_options_set_key_update_blockPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, sec_protocol_key_update_t, + dispatch_queue_t)>>('sec_protocol_options_set_key_update_block'); + late final _sec_protocol_options_set_key_update_block = + _sec_protocol_options_set_key_update_blockPtr.asFunction< + void Function(sec_protocol_options_t, sec_protocol_key_update_t, + dispatch_queue_t)>(); + + void sec_protocol_options_set_challenge_block( + sec_protocol_options_t options, + sec_protocol_challenge_t challenge_block, + dispatch_queue_t challenge_queue, + ) { + return _sec_protocol_options_set_challenge_block( + options, + challenge_block, + challenge_queue, + ); + } + + late final _sec_protocol_options_set_challenge_blockPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, sec_protocol_challenge_t, + dispatch_queue_t)>>('sec_protocol_options_set_challenge_block'); + late final _sec_protocol_options_set_challenge_block = + _sec_protocol_options_set_challenge_blockPtr.asFunction< + void Function(sec_protocol_options_t, sec_protocol_challenge_t, + dispatch_queue_t)>(); + + void sec_protocol_options_set_verify_block( + sec_protocol_options_t options, + sec_protocol_verify_t verify_block, + dispatch_queue_t verify_block_queue, + ) { + return _sec_protocol_options_set_verify_block( + options, + verify_block, + verify_block_queue, + ); + } + + late final _sec_protocol_options_set_verify_blockPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, sec_protocol_verify_t, + dispatch_queue_t)>>('sec_protocol_options_set_verify_block'); + late final _sec_protocol_options_set_verify_block = + _sec_protocol_options_set_verify_blockPtr.asFunction< + void Function(sec_protocol_options_t, sec_protocol_verify_t, + dispatch_queue_t)>(); + + late final ffi.Pointer _kSSLSessionConfig_default = + _lookup('kSSLSessionConfig_default'); + + CFStringRef get kSSLSessionConfig_default => _kSSLSessionConfig_default.value; + + set kSSLSessionConfig_default(CFStringRef value) => + _kSSLSessionConfig_default.value = value; + + late final ffi.Pointer _kSSLSessionConfig_ATSv1 = + _lookup('kSSLSessionConfig_ATSv1'); + + CFStringRef get kSSLSessionConfig_ATSv1 => _kSSLSessionConfig_ATSv1.value; + + set kSSLSessionConfig_ATSv1(CFStringRef value) => + _kSSLSessionConfig_ATSv1.value = value; + + late final ffi.Pointer _kSSLSessionConfig_ATSv1_noPFS = + _lookup('kSSLSessionConfig_ATSv1_noPFS'); + + CFStringRef get kSSLSessionConfig_ATSv1_noPFS => + _kSSLSessionConfig_ATSv1_noPFS.value; + + set kSSLSessionConfig_ATSv1_noPFS(CFStringRef value) => + _kSSLSessionConfig_ATSv1_noPFS.value = value; + + late final ffi.Pointer _kSSLSessionConfig_standard = + _lookup('kSSLSessionConfig_standard'); + + CFStringRef get kSSLSessionConfig_standard => + _kSSLSessionConfig_standard.value; + + set kSSLSessionConfig_standard(CFStringRef value) => + _kSSLSessionConfig_standard.value = value; + + late final ffi.Pointer _kSSLSessionConfig_RC4_fallback = + _lookup('kSSLSessionConfig_RC4_fallback'); + + CFStringRef get kSSLSessionConfig_RC4_fallback => + _kSSLSessionConfig_RC4_fallback.value; + + set kSSLSessionConfig_RC4_fallback(CFStringRef value) => + _kSSLSessionConfig_RC4_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_TLSv1_fallback = + _lookup('kSSLSessionConfig_TLSv1_fallback'); + + CFStringRef get kSSLSessionConfig_TLSv1_fallback => + _kSSLSessionConfig_TLSv1_fallback.value; + + set kSSLSessionConfig_TLSv1_fallback(CFStringRef value) => + _kSSLSessionConfig_TLSv1_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_TLSv1_RC4_fallback = + _lookup('kSSLSessionConfig_TLSv1_RC4_fallback'); + + CFStringRef get kSSLSessionConfig_TLSv1_RC4_fallback => + _kSSLSessionConfig_TLSv1_RC4_fallback.value; + + set kSSLSessionConfig_TLSv1_RC4_fallback(CFStringRef value) => + _kSSLSessionConfig_TLSv1_RC4_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_legacy = + _lookup('kSSLSessionConfig_legacy'); + + CFStringRef get kSSLSessionConfig_legacy => _kSSLSessionConfig_legacy.value; + + set kSSLSessionConfig_legacy(CFStringRef value) => + _kSSLSessionConfig_legacy.value = value; + + late final ffi.Pointer _kSSLSessionConfig_legacy_DHE = + _lookup('kSSLSessionConfig_legacy_DHE'); + + CFStringRef get kSSLSessionConfig_legacy_DHE => + _kSSLSessionConfig_legacy_DHE.value; + + set kSSLSessionConfig_legacy_DHE(CFStringRef value) => + _kSSLSessionConfig_legacy_DHE.value = value; + + late final ffi.Pointer _kSSLSessionConfig_anonymous = + _lookup('kSSLSessionConfig_anonymous'); + + CFStringRef get kSSLSessionConfig_anonymous => + _kSSLSessionConfig_anonymous.value; + + set kSSLSessionConfig_anonymous(CFStringRef value) => + _kSSLSessionConfig_anonymous.value = value; + + late final ffi.Pointer _kSSLSessionConfig_3DES_fallback = + _lookup('kSSLSessionConfig_3DES_fallback'); + + CFStringRef get kSSLSessionConfig_3DES_fallback => + _kSSLSessionConfig_3DES_fallback.value; + + set kSSLSessionConfig_3DES_fallback(CFStringRef value) => + _kSSLSessionConfig_3DES_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_TLSv1_3DES_fallback = + _lookup('kSSLSessionConfig_TLSv1_3DES_fallback'); + + CFStringRef get kSSLSessionConfig_TLSv1_3DES_fallback => + _kSSLSessionConfig_TLSv1_3DES_fallback.value; + + set kSSLSessionConfig_TLSv1_3DES_fallback(CFStringRef value) => + _kSSLSessionConfig_TLSv1_3DES_fallback.value = value; + + int SSLContextGetTypeID() { + return _SSLContextGetTypeID(); + } + + late final _SSLContextGetTypeIDPtr = + _lookup>('SSLContextGetTypeID'); + late final _SSLContextGetTypeID = + _SSLContextGetTypeIDPtr.asFunction(); + + SSLContextRef SSLCreateContext( + CFAllocatorRef alloc, + int protocolSide, + int connectionType, + ) { + return _SSLCreateContext( + alloc, + protocolSide, + connectionType, + ); + } + + late final _SSLCreateContextPtr = _lookup< + ffi.NativeFunction< + SSLContextRef Function( + CFAllocatorRef, ffi.Int32, ffi.Int32)>>('SSLCreateContext'); + late final _SSLCreateContext = _SSLCreateContextPtr.asFunction< + SSLContextRef Function(CFAllocatorRef, int, int)>(); + + int SSLNewContext( + int isServer, + ffi.Pointer contextPtr, + ) { + return _SSLNewContext( + isServer, + contextPtr, + ); + } + + late final _SSLNewContextPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + Boolean, ffi.Pointer)>>('SSLNewContext'); + late final _SSLNewContext = _SSLNewContextPtr.asFunction< + int Function(int, ffi.Pointer)>(); + + int SSLDisposeContext( + SSLContextRef context, + ) { + return _SSLDisposeContext( + context, + ); + } + + late final _SSLDisposeContextPtr = + _lookup>( + 'SSLDisposeContext'); + late final _SSLDisposeContext = + _SSLDisposeContextPtr.asFunction(); + + int SSLGetSessionState( + SSLContextRef context, + ffi.Pointer state, + ) { + return _SSLGetSessionState( + context, + state, + ); + } + + late final _SSLGetSessionStatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetSessionState'); + late final _SSLGetSessionState = _SSLGetSessionStatePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLSetSessionOption( + SSLContextRef context, + int option, + int value, + ) { + return _SSLSetSessionOption( + context, + option, + value, + ); + } + + late final _SSLSetSessionOptionPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Int32, Boolean)>>('SSLSetSessionOption'); + late final _SSLSetSessionOption = _SSLSetSessionOptionPtr.asFunction< + int Function(SSLContextRef, int, int)>(); + + int SSLGetSessionOption( + SSLContextRef context, + int option, + ffi.Pointer value, + ) { + return _SSLGetSessionOption( + context, + option, + value, + ); + } + + late final _SSLGetSessionOptionPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Int32, + ffi.Pointer)>>('SSLGetSessionOption'); + late final _SSLGetSessionOption = _SSLGetSessionOptionPtr.asFunction< + int Function(SSLContextRef, int, ffi.Pointer)>(); + + int SSLSetIOFuncs( + SSLContextRef context, + SSLReadFunc readFunc, + SSLWriteFunc writeFunc, + ) { + return _SSLSetIOFuncs( + context, + readFunc, + writeFunc, + ); + } + + late final _SSLSetIOFuncsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, SSLReadFunc, SSLWriteFunc)>>('SSLSetIOFuncs'); + late final _SSLSetIOFuncs = _SSLSetIOFuncsPtr.asFunction< + int Function(SSLContextRef, SSLReadFunc, SSLWriteFunc)>(); + + int SSLSetSessionConfig( + SSLContextRef context, + CFStringRef config, + ) { + return _SSLSetSessionConfig( + context, + config, + ); + } + + late final _SSLSetSessionConfigPtr = _lookup< + ffi.NativeFunction>( + 'SSLSetSessionConfig'); + late final _SSLSetSessionConfig = _SSLSetSessionConfigPtr.asFunction< + int Function(SSLContextRef, CFStringRef)>(); + + int SSLSetProtocolVersionMin( + SSLContextRef context, + int minVersion, + ) { + return _SSLSetProtocolVersionMin( + context, + minVersion, + ); + } + + late final _SSLSetProtocolVersionMinPtr = + _lookup>( + 'SSLSetProtocolVersionMin'); + late final _SSLSetProtocolVersionMin = _SSLSetProtocolVersionMinPtr + .asFunction(); + + int SSLGetProtocolVersionMin( + SSLContextRef context, + ffi.Pointer minVersion, + ) { + return _SSLGetProtocolVersionMin( + context, + minVersion, + ); + } + + late final _SSLGetProtocolVersionMinPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetProtocolVersionMin'); + late final _SSLGetProtocolVersionMin = _SSLGetProtocolVersionMinPtr + .asFunction)>(); + + int SSLSetProtocolVersionMax( + SSLContextRef context, + int maxVersion, + ) { + return _SSLSetProtocolVersionMax( + context, + maxVersion, + ); + } + + late final _SSLSetProtocolVersionMaxPtr = + _lookup>( + 'SSLSetProtocolVersionMax'); + late final _SSLSetProtocolVersionMax = _SSLSetProtocolVersionMaxPtr + .asFunction(); + + int SSLGetProtocolVersionMax( + SSLContextRef context, + ffi.Pointer maxVersion, + ) { + return _SSLGetProtocolVersionMax( + context, + maxVersion, + ); + } + + late final _SSLGetProtocolVersionMaxPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetProtocolVersionMax'); + late final _SSLGetProtocolVersionMax = _SSLGetProtocolVersionMaxPtr + .asFunction)>(); + + int SSLSetProtocolVersionEnabled( + SSLContextRef context, + int protocol, + int enable, + ) { + return _SSLSetProtocolVersionEnabled( + context, + protocol, + enable, + ); + } + + late final _SSLSetProtocolVersionEnabledPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Int32, + Boolean)>>('SSLSetProtocolVersionEnabled'); + late final _SSLSetProtocolVersionEnabled = _SSLSetProtocolVersionEnabledPtr + .asFunction(); + + int SSLGetProtocolVersionEnabled( + SSLContextRef context, + int protocol, + ffi.Pointer enable, + ) { + return _SSLGetProtocolVersionEnabled( + context, + protocol, + enable, + ); + } + + late final _SSLGetProtocolVersionEnabledPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Int32, + ffi.Pointer)>>('SSLGetProtocolVersionEnabled'); + late final _SSLGetProtocolVersionEnabled = _SSLGetProtocolVersionEnabledPtr + .asFunction)>(); + + int SSLSetProtocolVersion( + SSLContextRef context, + int version, + ) { + return _SSLSetProtocolVersion( + context, + version, + ); + } + + late final _SSLSetProtocolVersionPtr = + _lookup>( + 'SSLSetProtocolVersion'); + late final _SSLSetProtocolVersion = + _SSLSetProtocolVersionPtr.asFunction(); + + int SSLGetProtocolVersion( + SSLContextRef context, + ffi.Pointer protocol, + ) { + return _SSLGetProtocolVersion( + context, + protocol, + ); + } + + late final _SSLGetProtocolVersionPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetProtocolVersion'); + late final _SSLGetProtocolVersion = _SSLGetProtocolVersionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLSetCertificate( + SSLContextRef context, + CFArrayRef certRefs, + ) { + return _SSLSetCertificate( + context, + certRefs, + ); + } + + late final _SSLSetCertificatePtr = + _lookup>( + 'SSLSetCertificate'); + late final _SSLSetCertificate = _SSLSetCertificatePtr.asFunction< + int Function(SSLContextRef, CFArrayRef)>(); + + int SSLSetConnection( + SSLContextRef context, + SSLConnectionRef connection, + ) { + return _SSLSetConnection( + context, + connection, + ); + } + + late final _SSLSetConnectionPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, SSLConnectionRef)>>('SSLSetConnection'); + late final _SSLSetConnection = _SSLSetConnectionPtr.asFunction< + int Function(SSLContextRef, SSLConnectionRef)>(); + + int SSLGetConnection( + SSLContextRef context, + ffi.Pointer connection, + ) { + return _SSLGetConnection( + context, + connection, + ); + } + + late final _SSLGetConnectionPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetConnection'); + late final _SSLGetConnection = _SSLGetConnectionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLSetPeerDomainName( + SSLContextRef context, + ffi.Pointer peerName, + int peerNameLen, + ) { + return _SSLSetPeerDomainName( + context, + peerName, + peerNameLen, + ); + } + + late final _SSLSetPeerDomainNamePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetPeerDomainName'); + late final _SSLSetPeerDomainName = _SSLSetPeerDomainNamePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); + + int SSLGetPeerDomainNameLength( + SSLContextRef context, + ffi.Pointer peerNameLen, + ) { + return _SSLGetPeerDomainNameLength( + context, + peerNameLen, + ); + } + + late final _SSLGetPeerDomainNameLengthPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetPeerDomainNameLength'); + late final _SSLGetPeerDomainNameLength = _SSLGetPeerDomainNameLengthPtr + .asFunction)>(); + + int SSLGetPeerDomainName( + SSLContextRef context, + ffi.Pointer peerName, + ffi.Pointer peerNameLen, + ) { + return _SSLGetPeerDomainName( + context, + peerName, + peerNameLen, + ); + } + + late final _SSLGetPeerDomainNamePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLGetPeerDomainName'); + late final _SSLGetPeerDomainName = _SSLGetPeerDomainNamePtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + + int SSLCopyRequestedPeerNameLength( + SSLContextRef ctx, + ffi.Pointer peerNameLen, + ) { + return _SSLCopyRequestedPeerNameLength( + ctx, + peerNameLen, + ); + } + + late final _SSLCopyRequestedPeerNameLengthPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyRequestedPeerNameLength'); + late final _SSLCopyRequestedPeerNameLength = + _SSLCopyRequestedPeerNameLengthPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLCopyRequestedPeerName( + SSLContextRef context, + ffi.Pointer peerName, + ffi.Pointer peerNameLen, + ) { + return _SSLCopyRequestedPeerName( + context, + peerName, + peerNameLen, + ); + } + + late final _SSLCopyRequestedPeerNamePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLCopyRequestedPeerName'); + late final _SSLCopyRequestedPeerName = + _SSLCopyRequestedPeerNamePtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + + int SSLSetDatagramHelloCookie( + SSLContextRef dtlsContext, + ffi.Pointer cookie, + int cookieLen, + ) { + return _SSLSetDatagramHelloCookie( + dtlsContext, + cookie, + cookieLen, + ); + } + + late final _SSLSetDatagramHelloCookiePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetDatagramHelloCookie'); + late final _SSLSetDatagramHelloCookie = _SSLSetDatagramHelloCookiePtr + .asFunction, int)>(); + + int SSLSetMaxDatagramRecordSize( + SSLContextRef dtlsContext, + int maxSize, + ) { + return _SSLSetMaxDatagramRecordSize( + dtlsContext, + maxSize, + ); + } + + late final _SSLSetMaxDatagramRecordSizePtr = + _lookup>( + 'SSLSetMaxDatagramRecordSize'); + late final _SSLSetMaxDatagramRecordSize = _SSLSetMaxDatagramRecordSizePtr + .asFunction(); + + int SSLGetMaxDatagramRecordSize( + SSLContextRef dtlsContext, + ffi.Pointer maxSize, + ) { + return _SSLGetMaxDatagramRecordSize( + dtlsContext, + maxSize, + ); + } + + late final _SSLGetMaxDatagramRecordSizePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetMaxDatagramRecordSize'); + late final _SSLGetMaxDatagramRecordSize = _SSLGetMaxDatagramRecordSizePtr + .asFunction)>(); + + int SSLGetNegotiatedProtocolVersion( + SSLContextRef context, + ffi.Pointer protocol, + ) { + return _SSLGetNegotiatedProtocolVersion( + context, + protocol, + ); + } + + late final _SSLGetNegotiatedProtocolVersionPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNegotiatedProtocolVersion'); + late final _SSLGetNegotiatedProtocolVersion = + _SSLGetNegotiatedProtocolVersionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLGetNumberSupportedCiphers( + SSLContextRef context, + ffi.Pointer numCiphers, + ) { + return _SSLGetNumberSupportedCiphers( + context, + numCiphers, + ); + } + + late final _SSLGetNumberSupportedCiphersPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNumberSupportedCiphers'); + late final _SSLGetNumberSupportedCiphers = _SSLGetNumberSupportedCiphersPtr + .asFunction)>(); + + int SSLGetSupportedCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + ffi.Pointer numCiphers, + ) { + return _SSLGetSupportedCiphers( + context, + ciphers, + numCiphers, + ); + } + + late final _SSLGetSupportedCiphersPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLGetSupportedCiphers'); + late final _SSLGetSupportedCiphers = _SSLGetSupportedCiphersPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + + int SSLGetNumberEnabledCiphers( + SSLContextRef context, + ffi.Pointer numCiphers, + ) { + return _SSLGetNumberEnabledCiphers( + context, + numCiphers, + ); + } + + late final _SSLGetNumberEnabledCiphersPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNumberEnabledCiphers'); + late final _SSLGetNumberEnabledCiphers = _SSLGetNumberEnabledCiphersPtr + .asFunction)>(); + + int SSLSetEnabledCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + int numCiphers, + ) { + return _SSLSetEnabledCiphers( + context, + ciphers, + numCiphers, + ); + } + + late final _SSLSetEnabledCiphersPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetEnabledCiphers'); + late final _SSLSetEnabledCiphers = _SSLSetEnabledCiphersPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); + + int SSLGetEnabledCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + ffi.Pointer numCiphers, + ) { + return _SSLGetEnabledCiphers( + context, + ciphers, + numCiphers, + ); + } + + late final _SSLGetEnabledCiphersPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLGetEnabledCiphers'); + late final _SSLGetEnabledCiphers = _SSLGetEnabledCiphersPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + + int SSLSetSessionTicketsEnabled( + SSLContextRef context, + int enabled, + ) { + return _SSLSetSessionTicketsEnabled( + context, + enabled, + ); + } + + late final _SSLSetSessionTicketsEnabledPtr = + _lookup>( + 'SSLSetSessionTicketsEnabled'); + late final _SSLSetSessionTicketsEnabled = _SSLSetSessionTicketsEnabledPtr + .asFunction(); + + int SSLSetEnableCertVerify( + SSLContextRef context, + int enableVerify, + ) { + return _SSLSetEnableCertVerify( + context, + enableVerify, + ); + } + + late final _SSLSetEnableCertVerifyPtr = + _lookup>( + 'SSLSetEnableCertVerify'); + late final _SSLSetEnableCertVerify = + _SSLSetEnableCertVerifyPtr.asFunction(); + + int SSLGetEnableCertVerify( + SSLContextRef context, + ffi.Pointer enableVerify, + ) { + return _SSLGetEnableCertVerify( + context, + enableVerify, + ); + } + + late final _SSLGetEnableCertVerifyPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetEnableCertVerify'); + late final _SSLGetEnableCertVerify = _SSLGetEnableCertVerifyPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLSetAllowsExpiredCerts( + SSLContextRef context, + int allowsExpired, + ) { + return _SSLSetAllowsExpiredCerts( + context, + allowsExpired, + ); + } + + late final _SSLSetAllowsExpiredCertsPtr = + _lookup>( + 'SSLSetAllowsExpiredCerts'); + late final _SSLSetAllowsExpiredCerts = _SSLSetAllowsExpiredCertsPtr + .asFunction(); + + int SSLGetAllowsExpiredCerts( + SSLContextRef context, + ffi.Pointer allowsExpired, + ) { + return _SSLGetAllowsExpiredCerts( + context, + allowsExpired, + ); + } + + late final _SSLGetAllowsExpiredCertsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetAllowsExpiredCerts'); + late final _SSLGetAllowsExpiredCerts = _SSLGetAllowsExpiredCertsPtr + .asFunction)>(); + + int SSLSetAllowsExpiredRoots( + SSLContextRef context, + int allowsExpired, + ) { + return _SSLSetAllowsExpiredRoots( + context, + allowsExpired, + ); + } + + late final _SSLSetAllowsExpiredRootsPtr = + _lookup>( + 'SSLSetAllowsExpiredRoots'); + late final _SSLSetAllowsExpiredRoots = _SSLSetAllowsExpiredRootsPtr + .asFunction(); + + int SSLGetAllowsExpiredRoots( + SSLContextRef context, + ffi.Pointer allowsExpired, + ) { + return _SSLGetAllowsExpiredRoots( + context, + allowsExpired, + ); + } + + late final _SSLGetAllowsExpiredRootsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetAllowsExpiredRoots'); + late final _SSLGetAllowsExpiredRoots = _SSLGetAllowsExpiredRootsPtr + .asFunction)>(); + + int SSLSetAllowsAnyRoot( + SSLContextRef context, + int anyRoot, + ) { + return _SSLSetAllowsAnyRoot( + context, + anyRoot, + ); + } + + late final _SSLSetAllowsAnyRootPtr = + _lookup>( + 'SSLSetAllowsAnyRoot'); + late final _SSLSetAllowsAnyRoot = + _SSLSetAllowsAnyRootPtr.asFunction(); + + int SSLGetAllowsAnyRoot( + SSLContextRef context, + ffi.Pointer anyRoot, + ) { + return _SSLGetAllowsAnyRoot( + context, + anyRoot, + ); + } + + late final _SSLGetAllowsAnyRootPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetAllowsAnyRoot'); + late final _SSLGetAllowsAnyRoot = _SSLGetAllowsAnyRootPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLSetTrustedRoots( + SSLContextRef context, + CFArrayRef trustedRoots, + int replaceExisting, + ) { + return _SSLSetTrustedRoots( + context, + trustedRoots, + replaceExisting, + ); + } + + late final _SSLSetTrustedRootsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, CFArrayRef, Boolean)>>('SSLSetTrustedRoots'); + late final _SSLSetTrustedRoots = _SSLSetTrustedRootsPtr.asFunction< + int Function(SSLContextRef, CFArrayRef, int)>(); + + int SSLCopyTrustedRoots( + SSLContextRef context, + ffi.Pointer trustedRoots, + ) { + return _SSLCopyTrustedRoots( + context, + trustedRoots, + ); + } + + late final _SSLCopyTrustedRootsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyTrustedRoots'); + late final _SSLCopyTrustedRoots = _SSLCopyTrustedRootsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLCopyPeerCertificates( + SSLContextRef context, + ffi.Pointer certs, + ) { + return _SSLCopyPeerCertificates( + context, + certs, + ); + } + + late final _SSLCopyPeerCertificatesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyPeerCertificates'); + late final _SSLCopyPeerCertificates = _SSLCopyPeerCertificatesPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLCopyPeerTrust( + SSLContextRef context, + ffi.Pointer trust, + ) { + return _SSLCopyPeerTrust( + context, + trust, + ); + } + + late final _SSLCopyPeerTrustPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyPeerTrust'); + late final _SSLCopyPeerTrust = _SSLCopyPeerTrustPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLSetPeerID( + SSLContextRef context, + ffi.Pointer peerID, + int peerIDLen, + ) { + return _SSLSetPeerID( + context, + peerID, + peerIDLen, + ); + } + + late final _SSLSetPeerIDPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer, ffi.Size)>>('SSLSetPeerID'); + late final _SSLSetPeerID = _SSLSetPeerIDPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); + + int SSLGetPeerID( + SSLContextRef context, + ffi.Pointer> peerID, + ffi.Pointer peerIDLen, + ) { + return _SSLGetPeerID( + context, + peerID, + peerIDLen, + ); + } + + late final _SSLGetPeerIDPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>>('SSLGetPeerID'); + late final _SSLGetPeerID = _SSLGetPeerIDPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>(); + + int SSLGetNegotiatedCipher( + SSLContextRef context, + ffi.Pointer cipherSuite, + ) { + return _SSLGetNegotiatedCipher( + context, + cipherSuite, + ); + } + + late final _SSLGetNegotiatedCipherPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNegotiatedCipher'); + late final _SSLGetNegotiatedCipher = _SSLGetNegotiatedCipherPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLSetALPNProtocols( + SSLContextRef context, + CFArrayRef protocols, + ) { + return _SSLSetALPNProtocols( + context, + protocols, + ); + } + + late final _SSLSetALPNProtocolsPtr = + _lookup>( + 'SSLSetALPNProtocols'); + late final _SSLSetALPNProtocols = _SSLSetALPNProtocolsPtr.asFunction< + int Function(SSLContextRef, CFArrayRef)>(); + + int SSLCopyALPNProtocols( + SSLContextRef context, + ffi.Pointer protocols, + ) { + return _SSLCopyALPNProtocols( + context, + protocols, + ); + } + + late final _SSLCopyALPNProtocolsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyALPNProtocols'); + late final _SSLCopyALPNProtocols = _SSLCopyALPNProtocolsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLSetOCSPResponse( + SSLContextRef context, + CFDataRef response, + ) { + return _SSLSetOCSPResponse( + context, + response, + ); + } + + late final _SSLSetOCSPResponsePtr = + _lookup>( + 'SSLSetOCSPResponse'); + late final _SSLSetOCSPResponse = _SSLSetOCSPResponsePtr.asFunction< + int Function(SSLContextRef, CFDataRef)>(); + + int SSLSetEncryptionCertificate( + SSLContextRef context, + CFArrayRef certRefs, + ) { + return _SSLSetEncryptionCertificate( + context, + certRefs, + ); + } + + late final _SSLSetEncryptionCertificatePtr = + _lookup>( + 'SSLSetEncryptionCertificate'); + late final _SSLSetEncryptionCertificate = _SSLSetEncryptionCertificatePtr + .asFunction(); + + int SSLSetClientSideAuthenticate( + SSLContextRef context, + int auth, + ) { + return _SSLSetClientSideAuthenticate( + context, + auth, + ); + } + + late final _SSLSetClientSideAuthenticatePtr = + _lookup>( + 'SSLSetClientSideAuthenticate'); + late final _SSLSetClientSideAuthenticate = _SSLSetClientSideAuthenticatePtr + .asFunction(); + + int SSLAddDistinguishedName( + SSLContextRef context, + ffi.Pointer derDN, + int derDNLen, + ) { + return _SSLAddDistinguishedName( + context, + derDN, + derDNLen, + ); + } + + late final _SSLAddDistinguishedNamePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLAddDistinguishedName'); + late final _SSLAddDistinguishedName = _SSLAddDistinguishedNamePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); + + int SSLSetCertificateAuthorities( + SSLContextRef context, + CFTypeRef certificateOrArray, + int replaceExisting, + ) { + return _SSLSetCertificateAuthorities( + context, + certificateOrArray, + replaceExisting, + ); + } + + late final _SSLSetCertificateAuthoritiesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, CFTypeRef, + Boolean)>>('SSLSetCertificateAuthorities'); + late final _SSLSetCertificateAuthorities = _SSLSetCertificateAuthoritiesPtr + .asFunction(); + + int SSLCopyCertificateAuthorities( + SSLContextRef context, + ffi.Pointer certificates, + ) { + return _SSLCopyCertificateAuthorities( + context, + certificates, + ); + } + + late final _SSLCopyCertificateAuthoritiesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyCertificateAuthorities'); + late final _SSLCopyCertificateAuthorities = _SSLCopyCertificateAuthoritiesPtr + .asFunction)>(); + + int SSLCopyDistinguishedNames( + SSLContextRef context, + ffi.Pointer names, + ) { + return _SSLCopyDistinguishedNames( + context, + names, + ); + } + + late final _SSLCopyDistinguishedNamesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyDistinguishedNames'); + late final _SSLCopyDistinguishedNames = _SSLCopyDistinguishedNamesPtr + .asFunction)>(); + + int SSLGetClientCertificateState( + SSLContextRef context, + ffi.Pointer clientState, + ) { + return _SSLGetClientCertificateState( + context, + clientState, + ); + } + + late final _SSLGetClientCertificateStatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetClientCertificateState'); + late final _SSLGetClientCertificateState = _SSLGetClientCertificateStatePtr + .asFunction)>(); + + int SSLSetDiffieHellmanParams( + SSLContextRef context, + ffi.Pointer dhParams, + int dhParamsLen, + ) { + return _SSLSetDiffieHellmanParams( + context, + dhParams, + dhParamsLen, + ); + } + + late final _SSLSetDiffieHellmanParamsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetDiffieHellmanParams'); + late final _SSLSetDiffieHellmanParams = _SSLSetDiffieHellmanParamsPtr + .asFunction, int)>(); + + int SSLGetDiffieHellmanParams( + SSLContextRef context, + ffi.Pointer> dhParams, + ffi.Pointer dhParamsLen, + ) { + return _SSLGetDiffieHellmanParams( + context, + dhParams, + dhParamsLen, + ); + } + + late final _SSLGetDiffieHellmanParamsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>>('SSLGetDiffieHellmanParams'); + late final _SSLGetDiffieHellmanParams = + _SSLGetDiffieHellmanParamsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>(); + + int SSLSetRsaBlinding( + SSLContextRef context, + int blinding, + ) { + return _SSLSetRsaBlinding( + context, + blinding, + ); + } + + late final _SSLSetRsaBlindingPtr = + _lookup>( + 'SSLSetRsaBlinding'); + late final _SSLSetRsaBlinding = + _SSLSetRsaBlindingPtr.asFunction(); + + int SSLGetRsaBlinding( + SSLContextRef context, + ffi.Pointer blinding, + ) { + return _SSLGetRsaBlinding( + context, + blinding, + ); + } + + late final _SSLGetRsaBlindingPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetRsaBlinding'); + late final _SSLGetRsaBlinding = _SSLGetRsaBlindingPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLHandshake( + SSLContextRef context, + ) { + return _SSLHandshake( + context, + ); + } + + late final _SSLHandshakePtr = + _lookup>( + 'SSLHandshake'); + late final _SSLHandshake = + _SSLHandshakePtr.asFunction(); + + int SSLReHandshake( + SSLContextRef context, + ) { + return _SSLReHandshake( + context, + ); + } + + late final _SSLReHandshakePtr = + _lookup>( + 'SSLReHandshake'); + late final _SSLReHandshake = + _SSLReHandshakePtr.asFunction(); + + int SSLWrite( + SSLContextRef context, + ffi.Pointer data, + int dataLength, + ffi.Pointer processed, + ) { + return _SSLWrite( + context, + data, + dataLength, + processed, + ); + } + + late final _SSLWritePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, + ffi.Pointer)>>('SSLWrite'); + late final _SSLWrite = _SSLWritePtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); + + int SSLRead( + SSLContextRef context, + ffi.Pointer data, + int dataLength, + ffi.Pointer processed, + ) { + return _SSLRead( + context, + data, + dataLength, + processed, + ); + } + + late final _SSLReadPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, + ffi.Pointer)>>('SSLRead'); + late final _SSLRead = _SSLReadPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); + + int SSLGetBufferedReadSize( + SSLContextRef context, + ffi.Pointer bufferSize, + ) { + return _SSLGetBufferedReadSize( + context, + bufferSize, + ); + } + + late final _SSLGetBufferedReadSizePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetBufferedReadSize'); + late final _SSLGetBufferedReadSize = _SSLGetBufferedReadSizePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLGetDatagramWriteSize( + SSLContextRef dtlsContext, + ffi.Pointer bufSize, + ) { + return _SSLGetDatagramWriteSize( + dtlsContext, + bufSize, + ); + } + + late final _SSLGetDatagramWriteSizePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetDatagramWriteSize'); + late final _SSLGetDatagramWriteSize = _SSLGetDatagramWriteSizePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLClose( + SSLContextRef context, + ) { + return _SSLClose( + context, + ); + } + + late final _SSLClosePtr = + _lookup>('SSLClose'); + late final _SSLClose = _SSLClosePtr.asFunction(); + + int SSLSetError( + SSLContextRef context, + int status, + ) { + return _SSLSetError( + context, + status, + ); + } + + late final _SSLSetErrorPtr = + _lookup>( + 'SSLSetError'); + late final _SSLSetError = + _SSLSetErrorPtr.asFunction(); + + /// -1LL + late final ffi.Pointer _NSURLSessionTransferSizeUnknown = + _lookup('NSURLSessionTransferSizeUnknown'); + + int get NSURLSessionTransferSizeUnknown => + _NSURLSessionTransferSizeUnknown.value; + + set NSURLSessionTransferSizeUnknown(int value) => + _NSURLSessionTransferSizeUnknown.value = value; + + late final _class_NSURLSession1 = _getClass1("NSURLSession"); + late final _sel_sharedSession1 = _registerName1("sharedSession"); + ffi.Pointer _objc_msgSend_380( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_380( + obj, + sel, + ); + } + + late final __objc_msgSend_380Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionConfiguration1 = + _getClass1("NSURLSessionConfiguration"); + late final _sel_defaultSessionConfiguration1 = + _registerName1("defaultSessionConfiguration"); + ffi.Pointer _objc_msgSend_381( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_381( + obj, + sel, + ); + } + + late final __objc_msgSend_381Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_ephemeralSessionConfiguration1 = + _registerName1("ephemeralSessionConfiguration"); + late final _sel_backgroundSessionConfigurationWithIdentifier_1 = + _registerName1("backgroundSessionConfigurationWithIdentifier:"); + ffi.Pointer _objc_msgSend_382( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer identifier, + ) { + return __objc_msgSend_382( + obj, + sel, + identifier, + ); + } + + late final __objc_msgSend_382Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_identifier1 = _registerName1("identifier"); + late final _sel_requestCachePolicy1 = _registerName1("requestCachePolicy"); + late final _sel_setRequestCachePolicy_1 = + _registerName1("setRequestCachePolicy:"); + late final _sel_timeoutIntervalForRequest1 = + _registerName1("timeoutIntervalForRequest"); + late final _sel_setTimeoutIntervalForRequest_1 = + _registerName1("setTimeoutIntervalForRequest:"); + late final _sel_timeoutIntervalForResource1 = + _registerName1("timeoutIntervalForResource"); + late final _sel_setTimeoutIntervalForResource_1 = + _registerName1("setTimeoutIntervalForResource:"); + late final _sel_waitsForConnectivity1 = + _registerName1("waitsForConnectivity"); + late final _sel_setWaitsForConnectivity_1 = + _registerName1("setWaitsForConnectivity:"); + late final _sel_isDiscretionary1 = _registerName1("isDiscretionary"); + late final _sel_setDiscretionary_1 = _registerName1("setDiscretionary:"); + late final _sel_sharedContainerIdentifier1 = + _registerName1("sharedContainerIdentifier"); + late final _sel_setSharedContainerIdentifier_1 = + _registerName1("setSharedContainerIdentifier:"); + late final _sel_sessionSendsLaunchEvents1 = + _registerName1("sessionSendsLaunchEvents"); + late final _sel_setSessionSendsLaunchEvents_1 = + _registerName1("setSessionSendsLaunchEvents:"); + late final _sel_connectionProxyDictionary1 = + _registerName1("connectionProxyDictionary"); + late final _sel_setConnectionProxyDictionary_1 = + _registerName1("setConnectionProxyDictionary:"); + late final _sel_TLSMinimumSupportedProtocol1 = + _registerName1("TLSMinimumSupportedProtocol"); + int _objc_msgSend_383( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_383( + obj, + sel, + ); + } + + late final __objc_msgSend_383Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setTLSMinimumSupportedProtocol_1 = + _registerName1("setTLSMinimumSupportedProtocol:"); + void _objc_msgSend_384( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_384( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_384Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_TLSMaximumSupportedProtocol1 = + _registerName1("TLSMaximumSupportedProtocol"); + late final _sel_setTLSMaximumSupportedProtocol_1 = + _registerName1("setTLSMaximumSupportedProtocol:"); + late final _sel_TLSMinimumSupportedProtocolVersion1 = + _registerName1("TLSMinimumSupportedProtocolVersion"); + int _objc_msgSend_385( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_385( + obj, + sel, + ); + } + + late final __objc_msgSend_385Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setTLSMinimumSupportedProtocolVersion_1 = + _registerName1("setTLSMinimumSupportedProtocolVersion:"); + void _objc_msgSend_386( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_386( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_386Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_TLSMaximumSupportedProtocolVersion1 = + _registerName1("TLSMaximumSupportedProtocolVersion"); + late final _sel_setTLSMaximumSupportedProtocolVersion_1 = + _registerName1("setTLSMaximumSupportedProtocolVersion:"); + late final _sel_HTTPShouldSetCookies1 = + _registerName1("HTTPShouldSetCookies"); + late final _sel_setHTTPShouldSetCookies_1 = + _registerName1("setHTTPShouldSetCookies:"); + late final _sel_HTTPCookieAcceptPolicy1 = + _registerName1("HTTPCookieAcceptPolicy"); + late final _sel_setHTTPCookieAcceptPolicy_1 = + _registerName1("setHTTPCookieAcceptPolicy:"); + late final _sel_HTTPAdditionalHeaders1 = + _registerName1("HTTPAdditionalHeaders"); + late final _sel_setHTTPAdditionalHeaders_1 = + _registerName1("setHTTPAdditionalHeaders:"); + late final _sel_HTTPMaximumConnectionsPerHost1 = + _registerName1("HTTPMaximumConnectionsPerHost"); + late final _sel_setHTTPMaximumConnectionsPerHost_1 = + _registerName1("setHTTPMaximumConnectionsPerHost:"); + late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); + late final _sel_setHTTPCookieStorage_1 = + _registerName1("setHTTPCookieStorage:"); + void _objc_msgSend_387( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_387( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_387Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSURLCredentialStorage1 = + _getClass1("NSURLCredentialStorage"); + late final _sel_URLCredentialStorage1 = + _registerName1("URLCredentialStorage"); + ffi.Pointer _objc_msgSend_388( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_388( + obj, + sel, + ); + } + + late final __objc_msgSend_388Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setURLCredentialStorage_1 = + _registerName1("setURLCredentialStorage:"); + void _objc_msgSend_389( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_389( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_389Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSURLCache1 = _getClass1("NSURLCache"); + late final _sel_URLCache1 = _registerName1("URLCache"); + ffi.Pointer _objc_msgSend_390( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_390( + obj, + sel, + ); + } + + late final __objc_msgSend_390Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setURLCache_1 = _registerName1("setURLCache:"); + void _objc_msgSend_391( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_391( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_391Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_shouldUseExtendedBackgroundIdleMode1 = + _registerName1("shouldUseExtendedBackgroundIdleMode"); + late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = + _registerName1("setShouldUseExtendedBackgroundIdleMode:"); + late final _sel_protocolClasses1 = _registerName1("protocolClasses"); + late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); + void _objc_msgSend_392( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_392( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_392Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_multipathServiceType1 = + _registerName1("multipathServiceType"); + int _objc_msgSend_393( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_393( + obj, + sel, + ); + } + + late final __objc_msgSend_393Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setMultipathServiceType_1 = + _registerName1("setMultipathServiceType:"); + void _objc_msgSend_394( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_394( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_394Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_backgroundSessionConfiguration_1 = + _registerName1("backgroundSessionConfiguration:"); + late final _sel_sessionWithConfiguration_1 = + _registerName1("sessionWithConfiguration:"); + ffi.Pointer _objc_msgSend_395( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer configuration, + ) { + return __objc_msgSend_395( + obj, + sel, + configuration, + ); + } + + late final __objc_msgSend_395Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = + _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); + ffi.Pointer _objc_msgSend_396( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer configuration, + ffi.Pointer delegate, + ffi.Pointer queue, + ) { + return __objc_msgSend_396( + obj, + sel, + configuration, + delegate, + queue, + ); + } + + late final __objc_msgSend_396Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_delegateQueue1 = _registerName1("delegateQueue"); + late final _sel_delegate1 = _registerName1("delegate"); + late final _sel_configuration1 = _registerName1("configuration"); + late final _sel_sessionDescription1 = _registerName1("sessionDescription"); + late final _sel_setSessionDescription_1 = + _registerName1("setSessionDescription:"); + late final _sel_finishTasksAndInvalidate1 = + _registerName1("finishTasksAndInvalidate"); + late final _sel_invalidateAndCancel1 = _registerName1("invalidateAndCancel"); + late final _sel_resetWithCompletionHandler_1 = + _registerName1("resetWithCompletionHandler:"); + late final _sel_flushWithCompletionHandler_1 = + _registerName1("flushWithCompletionHandler:"); + late final _sel_getTasksWithCompletionHandler_1 = + _registerName1("getTasksWithCompletionHandler:"); + void _objc_msgSend_397( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_397( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_397Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_getAllTasksWithCompletionHandler_1 = + _registerName1("getAllTasksWithCompletionHandler:"); + void _objc_msgSend_398( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_398( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_398Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); + late final _sel_dataTaskWithRequest_1 = + _registerName1("dataTaskWithRequest:"); + ffi.Pointer _objc_msgSend_399( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_399( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_399Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); + ffi.Pointer _objc_msgSend_400( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_400( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_400Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionUploadTask1 = + _getClass1("NSURLSessionUploadTask"); + late final _sel_uploadTaskWithRequest_fromFile_1 = + _registerName1("uploadTaskWithRequest:fromFile:"); + ffi.Pointer _objc_msgSend_401( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer fileURL, + ) { + return __objc_msgSend_401( + obj, + sel, + request, + fileURL, + ); + } + + late final __objc_msgSend_401Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_uploadTaskWithRequest_fromData_1 = + _registerName1("uploadTaskWithRequest:fromData:"); + ffi.Pointer _objc_msgSend_402( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer bodyData, + ) { + return __objc_msgSend_402( + obj, + sel, + request, + bodyData, + ); + } + + late final __objc_msgSend_402Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_uploadTaskWithStreamedRequest_1 = + _registerName1("uploadTaskWithStreamedRequest:"); + ffi.Pointer _objc_msgSend_403( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_403( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_403Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionDownloadTask1 = + _getClass1("NSURLSessionDownloadTask"); + late final _sel_cancelByProducingResumeData_1 = + _registerName1("cancelByProducingResumeData:"); + void _objc_msgSend_404( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_404( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_404Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_downloadTaskWithRequest_1 = + _registerName1("downloadTaskWithRequest:"); + ffi.Pointer _objc_msgSend_405( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_405( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_405Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_downloadTaskWithURL_1 = + _registerName1("downloadTaskWithURL:"); + ffi.Pointer _objc_msgSend_406( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_406( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_406Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_downloadTaskWithResumeData_1 = + _registerName1("downloadTaskWithResumeData:"); + ffi.Pointer _objc_msgSend_407( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer resumeData, + ) { + return __objc_msgSend_407( + obj, + sel, + resumeData, + ); + } + + late final __objc_msgSend_407Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionStreamTask1 = + _getClass1("NSURLSessionStreamTask"); + late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = + _registerName1( + "readDataOfMinLength:maxLength:timeout:completionHandler:"); + void _objc_msgSend_408( + ffi.Pointer obj, + ffi.Pointer sel, + int minBytes, + int maxBytes, + double timeout, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_408( + obj, + sel, + minBytes, + maxBytes, + timeout, + completionHandler, + ); + } + + late final __objc_msgSend_408Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSUInteger, + NSTimeInterval, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int, + double, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_writeData_timeout_completionHandler_1 = + _registerName1("writeData:timeout:completionHandler:"); + void _objc_msgSend_409( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + double timeout, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_409( + obj, + sel, + data, + timeout, + completionHandler, + ); + } + + late final __objc_msgSend_409Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSTimeInterval, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_captureStreams1 = _registerName1("captureStreams"); + late final _sel_closeWrite1 = _registerName1("closeWrite"); + late final _sel_closeRead1 = _registerName1("closeRead"); + late final _sel_startSecureConnection1 = + _registerName1("startSecureConnection"); + late final _sel_stopSecureConnection1 = + _registerName1("stopSecureConnection"); + late final _sel_streamTaskWithHostName_port_1 = + _registerName1("streamTaskWithHostName:port:"); + ffi.Pointer _objc_msgSend_410( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer hostname, + int port, + ) { + return __objc_msgSend_410( + obj, + sel, + hostname, + port, + ); + } + + late final __objc_msgSend_410Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); + + late final _class_NSNetService1 = _getClass1("NSNetService"); + late final _sel_streamTaskWithNetService_1 = + _registerName1("streamTaskWithNetService:"); + ffi.Pointer _objc_msgSend_411( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer service, + ) { + return __objc_msgSend_411( + obj, + sel, + service, + ); + } + + late final __objc_msgSend_411Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionWebSocketTask1 = + _getClass1("NSURLSessionWebSocketTask"); + late final _class_NSURLSessionWebSocketMessage1 = + _getClass1("NSURLSessionWebSocketMessage"); + late final _sel_type1 = _registerName1("type"); + int _objc_msgSend_412( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_412( + obj, + sel, + ); + } + + late final __objc_msgSend_412Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_sendMessage_completionHandler_1 = + _registerName1("sendMessage:completionHandler:"); + void _objc_msgSend_413( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer message, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_413( + obj, + sel, + message, + completionHandler, + ); + } + + late final __objc_msgSend_413Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_receiveMessageWithCompletionHandler_1 = + _registerName1("receiveMessageWithCompletionHandler:"); + void _objc_msgSend_414( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_414( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_414Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_sendPingWithPongReceiveHandler_1 = + _registerName1("sendPingWithPongReceiveHandler:"); + void _objc_msgSend_415( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> pongReceiveHandler, + ) { + return __objc_msgSend_415( + obj, + sel, + pongReceiveHandler, + ); + } + + late final __objc_msgSend_415Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_cancelWithCloseCode_reason_1 = + _registerName1("cancelWithCloseCode:reason:"); + void _objc_msgSend_416( + ffi.Pointer obj, + ffi.Pointer sel, + int closeCode, + ffi.Pointer reason, + ) { + return __objc_msgSend_416( + obj, + sel, + closeCode, + reason, + ); + } + + late final __objc_msgSend_416Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); + + late final _sel_maximumMessageSize1 = _registerName1("maximumMessageSize"); + late final _sel_setMaximumMessageSize_1 = + _registerName1("setMaximumMessageSize:"); + late final _sel_closeCode1 = _registerName1("closeCode"); + int _objc_msgSend_417( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_417( + obj, + sel, + ); + } + + late final __objc_msgSend_417Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_closeReason1 = _registerName1("closeReason"); + late final _sel_webSocketTaskWithURL_1 = + _registerName1("webSocketTaskWithURL:"); + ffi.Pointer _objc_msgSend_418( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_418( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_418Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_webSocketTaskWithURL_protocols_1 = + _registerName1("webSocketTaskWithURL:protocols:"); + ffi.Pointer _objc_msgSend_419( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer protocols, + ) { + return __objc_msgSend_419( + obj, + sel, + url, + protocols, + ); + } + + late final __objc_msgSend_419Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_webSocketTaskWithRequest_1 = + _registerName1("webSocketTaskWithRequest:"); + ffi.Pointer _objc_msgSend_420( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_420( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_420Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dataTaskWithRequest_completionHandler_1 = + _registerName1("dataTaskWithRequest:completionHandler:"); + ffi.Pointer _objc_msgSend_421( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_421( + obj, + sel, + request, + completionHandler, + ); + } + + late final __objc_msgSend_421Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_dataTaskWithURL_completionHandler_1 = + _registerName1("dataTaskWithURL:completionHandler:"); + ffi.Pointer _objc_msgSend_422( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_422( + obj, + sel, + url, + completionHandler, + ); + } + + late final __objc_msgSend_422Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = + _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); + ffi.Pointer _objc_msgSend_423( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer fileURL, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_423( + obj, + sel, + request, + fileURL, + completionHandler, + ); + } + + late final __objc_msgSend_423Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = + _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); + ffi.Pointer _objc_msgSend_424( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer bodyData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_424( + obj, + sel, + request, + bodyData, + completionHandler, + ); + } + + late final __objc_msgSend_424Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_downloadTaskWithRequest_completionHandler_1 = + _registerName1("downloadTaskWithRequest:completionHandler:"); + ffi.Pointer _objc_msgSend_425( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_425( + obj, + sel, + request, + completionHandler, + ); + } + + late final __objc_msgSend_425Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_downloadTaskWithURL_completionHandler_1 = + _registerName1("downloadTaskWithURL:completionHandler:"); + ffi.Pointer _objc_msgSend_426( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_426( + obj, + sel, + url, + completionHandler, + ); + } + + late final __objc_msgSend_426Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_downloadTaskWithResumeData_completionHandler_1 = + _registerName1("downloadTaskWithResumeData:completionHandler:"); + ffi.Pointer _objc_msgSend_427( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer resumeData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_427( + obj, + sel, + resumeData, + completionHandler, + ); + } + + late final __objc_msgSend_427Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final ffi.Pointer _NSURLSessionTaskPriorityDefault = + _lookup('NSURLSessionTaskPriorityDefault'); + + double get NSURLSessionTaskPriorityDefault => + _NSURLSessionTaskPriorityDefault.value; + + set NSURLSessionTaskPriorityDefault(double value) => + _NSURLSessionTaskPriorityDefault.value = value; + + late final ffi.Pointer _NSURLSessionTaskPriorityLow = + _lookup('NSURLSessionTaskPriorityLow'); + + double get NSURLSessionTaskPriorityLow => _NSURLSessionTaskPriorityLow.value; + + set NSURLSessionTaskPriorityLow(double value) => + _NSURLSessionTaskPriorityLow.value = value; + + late final ffi.Pointer _NSURLSessionTaskPriorityHigh = + _lookup('NSURLSessionTaskPriorityHigh'); + + double get NSURLSessionTaskPriorityHigh => + _NSURLSessionTaskPriorityHigh.value; + + set NSURLSessionTaskPriorityHigh(double value) => + _NSURLSessionTaskPriorityHigh.value = value; + + /// Key in the userInfo dictionary of an NSError received during a failed download. + late final ffi.Pointer> + _NSURLSessionDownloadTaskResumeData = + _lookup>('NSURLSessionDownloadTaskResumeData'); + + ffi.Pointer get NSURLSessionDownloadTaskResumeData => + _NSURLSessionDownloadTaskResumeData.value; + + set NSURLSessionDownloadTaskResumeData(ffi.Pointer value) => + _NSURLSessionDownloadTaskResumeData.value = value; + + late final _class_NSURLSessionTaskTransactionMetrics1 = + _getClass1("NSURLSessionTaskTransactionMetrics"); + late final _sel_request1 = _registerName1("request"); + late final _sel_fetchStartDate1 = _registerName1("fetchStartDate"); + late final _sel_domainLookupStartDate1 = + _registerName1("domainLookupStartDate"); + late final _sel_domainLookupEndDate1 = _registerName1("domainLookupEndDate"); + late final _sel_connectStartDate1 = _registerName1("connectStartDate"); + late final _sel_secureConnectionStartDate1 = + _registerName1("secureConnectionStartDate"); + late final _sel_secureConnectionEndDate1 = + _registerName1("secureConnectionEndDate"); + late final _sel_connectEndDate1 = _registerName1("connectEndDate"); + late final _sel_requestStartDate1 = _registerName1("requestStartDate"); + late final _sel_requestEndDate1 = _registerName1("requestEndDate"); + late final _sel_responseStartDate1 = _registerName1("responseStartDate"); + late final _sel_responseEndDate1 = _registerName1("responseEndDate"); + late final _sel_networkProtocolName1 = _registerName1("networkProtocolName"); + late final _sel_isProxyConnection1 = _registerName1("isProxyConnection"); + late final _sel_isReusedConnection1 = _registerName1("isReusedConnection"); + late final _sel_resourceFetchType1 = _registerName1("resourceFetchType"); + int _objc_msgSend_428( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_428( + obj, + sel, + ); + } + + late final __objc_msgSend_428Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_countOfRequestHeaderBytesSent1 = + _registerName1("countOfRequestHeaderBytesSent"); + late final _sel_countOfRequestBodyBytesSent1 = + _registerName1("countOfRequestBodyBytesSent"); + late final _sel_countOfRequestBodyBytesBeforeEncoding1 = + _registerName1("countOfRequestBodyBytesBeforeEncoding"); + late final _sel_countOfResponseHeaderBytesReceived1 = + _registerName1("countOfResponseHeaderBytesReceived"); + late final _sel_countOfResponseBodyBytesReceived1 = + _registerName1("countOfResponseBodyBytesReceived"); + late final _sel_countOfResponseBodyBytesAfterDecoding1 = + _registerName1("countOfResponseBodyBytesAfterDecoding"); + late final _sel_localAddress1 = _registerName1("localAddress"); + late final _sel_localPort1 = _registerName1("localPort"); + late final _sel_remoteAddress1 = _registerName1("remoteAddress"); + late final _sel_remotePort1 = _registerName1("remotePort"); + late final _sel_negotiatedTLSProtocolVersion1 = + _registerName1("negotiatedTLSProtocolVersion"); + late final _sel_negotiatedTLSCipherSuite1 = + _registerName1("negotiatedTLSCipherSuite"); + late final _sel_isCellular1 = _registerName1("isCellular"); + late final _sel_isExpensive1 = _registerName1("isExpensive"); + late final _sel_isConstrained1 = _registerName1("isConstrained"); + late final _sel_isMultipath1 = _registerName1("isMultipath"); + late final _sel_domainResolutionProtocol1 = + _registerName1("domainResolutionProtocol"); + int _objc_msgSend_429( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_429( + obj, + sel, + ); + } + + late final __objc_msgSend_429Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionTaskMetrics1 = + _getClass1("NSURLSessionTaskMetrics"); + late final _sel_transactionMetrics1 = _registerName1("transactionMetrics"); + late final _class_NSDateInterval1 = _getClass1("NSDateInterval"); + late final _sel_taskInterval1 = _registerName1("taskInterval"); + ffi.Pointer _objc_msgSend_430( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_430( + obj, + sel, + ); + } + + late final __objc_msgSend_430Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_redirectCount1 = _registerName1("redirectCount"); + late final _class_NSItemProvider1 = _getClass1("NSItemProvider"); + late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = + _registerName1( + "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); + void _objc_msgSend_431( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_431( + obj, + sel, + typeIdentifier, + visibility, + loadHandler, + ); + } + + late final __objc_msgSend_431Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = + _registerName1( + "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); + void _objc_msgSend_432( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int fileOptions, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_432( + obj, + sel, + typeIdentifier, + fileOptions, + visibility, + loadHandler, + ); + } + + late final __objc_msgSend_432Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_registeredTypeIdentifiers1 = + _registerName1("registeredTypeIdentifiers"); + late final _sel_registeredTypeIdentifiersWithFileOptions_1 = + _registerName1("registeredTypeIdentifiersWithFileOptions:"); + ffi.Pointer _objc_msgSend_433( + ffi.Pointer obj, + ffi.Pointer sel, + int fileOptions, + ) { + return __objc_msgSend_433( + obj, + sel, + fileOptions, + ); + } + + late final __objc_msgSend_433Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_hasItemConformingToTypeIdentifier_1 = + _registerName1("hasItemConformingToTypeIdentifier:"); + late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = + _registerName1( + "hasRepresentationConformingToTypeIdentifier:fileOptions:"); + bool _objc_msgSend_434( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int fileOptions, + ) { + return __objc_msgSend_434( + obj, + sel, + typeIdentifier, + fileOptions, + ); + } + + late final __objc_msgSend_434Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadDataRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_435( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_435( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } + + late final __objc_msgSend_435Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadFileRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_436( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_436( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } + + late final __objc_msgSend_436Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_437( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_437( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } + + late final __objc_msgSend_437Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_suggestedName1 = _registerName1("suggestedName"); + late final _sel_setSuggestedName_1 = _registerName1("setSuggestedName:"); + late final _sel_initWithObject_1 = _registerName1("initWithObject:"); + late final _sel_registerObject_visibility_1 = + _registerName1("registerObject:visibility:"); + void _objc_msgSend_438( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + int visibility, + ) { + return __objc_msgSend_438( + obj, + sel, + object, + visibility, + ); + } + + late final __objc_msgSend_438Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_registerObjectOfClass_visibility_loadHandler_1 = + _registerName1("registerObjectOfClass:visibility:loadHandler:"); + void _objc_msgSend_439( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_439( + obj, + sel, + aClass, + visibility, + loadHandler, + ); + } + + late final __objc_msgSend_439Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_canLoadObjectOfClass_1 = + _registerName1("canLoadObjectOfClass:"); + late final _sel_loadObjectOfClass_completionHandler_1 = + _registerName1("loadObjectOfClass:completionHandler:"); + ffi.Pointer _objc_msgSend_440( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_440( + obj, + sel, + aClass, + completionHandler, + ); + } + + late final __objc_msgSend_440Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_initWithItem_typeIdentifier_1 = + _registerName1("initWithItem:typeIdentifier:"); + instancetype _objc_msgSend_441( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer item, + ffi.Pointer typeIdentifier, + ) { + return __objc_msgSend_441( + obj, + sel, + item, + typeIdentifier, + ); + } + + late final __objc_msgSend_441Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_registerItemForTypeIdentifier_loadHandler_1 = + _registerName1("registerItemForTypeIdentifier:loadHandler:"); + void _objc_msgSend_442( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + NSItemProviderLoadHandler loadHandler, + ) { + return __objc_msgSend_442( + obj, + sel, + typeIdentifier, + loadHandler, + ); + } + + late final __objc_msgSend_442Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderLoadHandler)>>('objc_msgSend'); + late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSItemProviderLoadHandler)>(); + + late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = + _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); + void _objc_msgSend_443( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer options, + NSItemProviderCompletionHandler completionHandler, + ) { + return __objc_msgSend_443( + obj, + sel, + typeIdentifier, + options, + completionHandler, + ); + } + + late final __objc_msgSend_443Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderCompletionHandler)>>('objc_msgSend'); + late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderCompletionHandler)>(); + + late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); + NSItemProviderLoadHandler _objc_msgSend_444( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_444( + obj, + sel, + ); + } + + late final __objc_msgSend_444Ptr = _lookup< + ffi.NativeFunction< + NSItemProviderLoadHandler Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< + NSItemProviderLoadHandler Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setPreviewImageHandler_1 = + _registerName1("setPreviewImageHandler:"); + void _objc_msgSend_445( + ffi.Pointer obj, + ffi.Pointer sel, + NSItemProviderLoadHandler value, + ) { + return __objc_msgSend_445( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_445Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSItemProviderLoadHandler)>>('objc_msgSend'); + late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSItemProviderLoadHandler)>(); + + late final _sel_loadPreviewImageWithOptions_completionHandler_1 = + _registerName1("loadPreviewImageWithOptions:completionHandler:"); + void _objc_msgSend_446( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer options, + NSItemProviderCompletionHandler completionHandler, + ) { + return __objc_msgSend_446( + obj, + sel, + options, + completionHandler, + ); + } + + late final __objc_msgSend_446Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderCompletionHandler)>>('objc_msgSend'); + late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSItemProviderCompletionHandler)>(); + + late final ffi.Pointer> + _NSItemProviderPreferredImageSizeKey = + _lookup>('NSItemProviderPreferredImageSizeKey'); + + ffi.Pointer get NSItemProviderPreferredImageSizeKey => + _NSItemProviderPreferredImageSizeKey.value; + + set NSItemProviderPreferredImageSizeKey(ffi.Pointer value) => + _NSItemProviderPreferredImageSizeKey.value = value; + + late final ffi.Pointer> + _NSExtensionJavaScriptPreprocessingResultsKey = + _lookup>( + 'NSExtensionJavaScriptPreprocessingResultsKey'); + + ffi.Pointer get NSExtensionJavaScriptPreprocessingResultsKey => + _NSExtensionJavaScriptPreprocessingResultsKey.value; + + set NSExtensionJavaScriptPreprocessingResultsKey( + ffi.Pointer value) => + _NSExtensionJavaScriptPreprocessingResultsKey.value = value; + + late final ffi.Pointer> + _NSExtensionJavaScriptFinalizeArgumentKey = + _lookup>( + 'NSExtensionJavaScriptFinalizeArgumentKey'); + + ffi.Pointer get NSExtensionJavaScriptFinalizeArgumentKey => + _NSExtensionJavaScriptFinalizeArgumentKey.value; + + set NSExtensionJavaScriptFinalizeArgumentKey(ffi.Pointer value) => + _NSExtensionJavaScriptFinalizeArgumentKey.value = value; + + late final ffi.Pointer> _NSItemProviderErrorDomain = + _lookup>('NSItemProviderErrorDomain'); + + ffi.Pointer get NSItemProviderErrorDomain => + _NSItemProviderErrorDomain.value; + + set NSItemProviderErrorDomain(ffi.Pointer value) => + _NSItemProviderErrorDomain.value = value; + + late final ffi.Pointer _NSStringTransformLatinToKatakana = + _lookup('NSStringTransformLatinToKatakana'); + + NSStringTransform get NSStringTransformLatinToKatakana => + _NSStringTransformLatinToKatakana.value; + + set NSStringTransformLatinToKatakana(NSStringTransform value) => + _NSStringTransformLatinToKatakana.value = value; + + late final ffi.Pointer _NSStringTransformLatinToHiragana = + _lookup('NSStringTransformLatinToHiragana'); + + NSStringTransform get NSStringTransformLatinToHiragana => + _NSStringTransformLatinToHiragana.value; + + set NSStringTransformLatinToHiragana(NSStringTransform value) => + _NSStringTransformLatinToHiragana.value = value; + + late final ffi.Pointer _NSStringTransformLatinToHangul = + _lookup('NSStringTransformLatinToHangul'); + + NSStringTransform get NSStringTransformLatinToHangul => + _NSStringTransformLatinToHangul.value; + + set NSStringTransformLatinToHangul(NSStringTransform value) => + _NSStringTransformLatinToHangul.value = value; + + late final ffi.Pointer _NSStringTransformLatinToArabic = + _lookup('NSStringTransformLatinToArabic'); + + NSStringTransform get NSStringTransformLatinToArabic => + _NSStringTransformLatinToArabic.value; + + set NSStringTransformLatinToArabic(NSStringTransform value) => + _NSStringTransformLatinToArabic.value = value; + + late final ffi.Pointer _NSStringTransformLatinToHebrew = + _lookup('NSStringTransformLatinToHebrew'); + + NSStringTransform get NSStringTransformLatinToHebrew => + _NSStringTransformLatinToHebrew.value; + + set NSStringTransformLatinToHebrew(NSStringTransform value) => + _NSStringTransformLatinToHebrew.value = value; + + late final ffi.Pointer _NSStringTransformLatinToThai = + _lookup('NSStringTransformLatinToThai'); + + NSStringTransform get NSStringTransformLatinToThai => + _NSStringTransformLatinToThai.value; + + set NSStringTransformLatinToThai(NSStringTransform value) => + _NSStringTransformLatinToThai.value = value; + + late final ffi.Pointer _NSStringTransformLatinToCyrillic = + _lookup('NSStringTransformLatinToCyrillic'); + + NSStringTransform get NSStringTransformLatinToCyrillic => + _NSStringTransformLatinToCyrillic.value; + + set NSStringTransformLatinToCyrillic(NSStringTransform value) => + _NSStringTransformLatinToCyrillic.value = value; + + late final ffi.Pointer _NSStringTransformLatinToGreek = + _lookup('NSStringTransformLatinToGreek'); + + NSStringTransform get NSStringTransformLatinToGreek => + _NSStringTransformLatinToGreek.value; + + set NSStringTransformLatinToGreek(NSStringTransform value) => + _NSStringTransformLatinToGreek.value = value; + + late final ffi.Pointer _NSStringTransformToLatin = + _lookup('NSStringTransformToLatin'); + + NSStringTransform get NSStringTransformToLatin => + _NSStringTransformToLatin.value; + + set NSStringTransformToLatin(NSStringTransform value) => + _NSStringTransformToLatin.value = value; + + late final ffi.Pointer _NSStringTransformMandarinToLatin = + _lookup('NSStringTransformMandarinToLatin'); + + NSStringTransform get NSStringTransformMandarinToLatin => + _NSStringTransformMandarinToLatin.value; + + set NSStringTransformMandarinToLatin(NSStringTransform value) => + _NSStringTransformMandarinToLatin.value = value; + + late final ffi.Pointer + _NSStringTransformHiraganaToKatakana = + _lookup('NSStringTransformHiraganaToKatakana'); + + NSStringTransform get NSStringTransformHiraganaToKatakana => + _NSStringTransformHiraganaToKatakana.value; + + set NSStringTransformHiraganaToKatakana(NSStringTransform value) => + _NSStringTransformHiraganaToKatakana.value = value; + + late final ffi.Pointer + _NSStringTransformFullwidthToHalfwidth = + _lookup('NSStringTransformFullwidthToHalfwidth'); + + NSStringTransform get NSStringTransformFullwidthToHalfwidth => + _NSStringTransformFullwidthToHalfwidth.value; + + set NSStringTransformFullwidthToHalfwidth(NSStringTransform value) => + _NSStringTransformFullwidthToHalfwidth.value = value; + + late final ffi.Pointer _NSStringTransformToXMLHex = + _lookup('NSStringTransformToXMLHex'); + + NSStringTransform get NSStringTransformToXMLHex => + _NSStringTransformToXMLHex.value; + + set NSStringTransformToXMLHex(NSStringTransform value) => + _NSStringTransformToXMLHex.value = value; + + late final ffi.Pointer _NSStringTransformToUnicodeName = + _lookup('NSStringTransformToUnicodeName'); + + NSStringTransform get NSStringTransformToUnicodeName => + _NSStringTransformToUnicodeName.value; + + set NSStringTransformToUnicodeName(NSStringTransform value) => + _NSStringTransformToUnicodeName.value = value; + + late final ffi.Pointer + _NSStringTransformStripCombiningMarks = + _lookup('NSStringTransformStripCombiningMarks'); + + NSStringTransform get NSStringTransformStripCombiningMarks => + _NSStringTransformStripCombiningMarks.value; + + set NSStringTransformStripCombiningMarks(NSStringTransform value) => + _NSStringTransformStripCombiningMarks.value = value; + + late final ffi.Pointer _NSStringTransformStripDiacritics = + _lookup('NSStringTransformStripDiacritics'); + + NSStringTransform get NSStringTransformStripDiacritics => + _NSStringTransformStripDiacritics.value; + + set NSStringTransformStripDiacritics(NSStringTransform value) => + _NSStringTransformStripDiacritics.value = value; + + late final ffi.Pointer + _NSStringEncodingDetectionSuggestedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionSuggestedEncodingsKey'); + + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionSuggestedEncodingsKey => + _NSStringEncodingDetectionSuggestedEncodingsKey.value; + + set NSStringEncodingDetectionSuggestedEncodingsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionSuggestedEncodingsKey.value = value; + + late final ffi.Pointer + _NSStringEncodingDetectionDisallowedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionDisallowedEncodingsKey'); + + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionDisallowedEncodingsKey => + _NSStringEncodingDetectionDisallowedEncodingsKey.value; + + set NSStringEncodingDetectionDisallowedEncodingsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionDisallowedEncodingsKey.value = value; + + late final ffi.Pointer + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionUseOnlySuggestedEncodingsKey'); + + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionUseOnlySuggestedEncodingsKey => + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value; + + set NSStringEncodingDetectionUseOnlySuggestedEncodingsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value = value; + + late final ffi.Pointer + _NSStringEncodingDetectionAllowLossyKey = + _lookup( + 'NSStringEncodingDetectionAllowLossyKey'); + + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionAllowLossyKey => + _NSStringEncodingDetectionAllowLossyKey.value; + + set NSStringEncodingDetectionAllowLossyKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionAllowLossyKey.value = value; + + late final ffi.Pointer + _NSStringEncodingDetectionFromWindowsKey = + _lookup( + 'NSStringEncodingDetectionFromWindowsKey'); + + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionFromWindowsKey => + _NSStringEncodingDetectionFromWindowsKey.value; + + set NSStringEncodingDetectionFromWindowsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionFromWindowsKey.value = value; + + late final ffi.Pointer + _NSStringEncodingDetectionLossySubstitutionKey = + _lookup( + 'NSStringEncodingDetectionLossySubstitutionKey'); + + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionLossySubstitutionKey => + _NSStringEncodingDetectionLossySubstitutionKey.value; + + set NSStringEncodingDetectionLossySubstitutionKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionLossySubstitutionKey.value = value; + + late final ffi.Pointer + _NSStringEncodingDetectionLikelyLanguageKey = + _lookup( + 'NSStringEncodingDetectionLikelyLanguageKey'); + + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionLikelyLanguageKey => + _NSStringEncodingDetectionLikelyLanguageKey.value; + + set NSStringEncodingDetectionLikelyLanguageKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionLikelyLanguageKey.value = value; + + late final _class_NSMutableString1 = _getClass1("NSMutableString"); + late final _sel_replaceCharactersInRange_withString_1 = + _registerName1("replaceCharactersInRange:withString:"); + void _objc_msgSend_447( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer aString, + ) { + return __objc_msgSend_447( + obj, + sel, + range, + aString, + ); + } + + late final __objc_msgSend_447Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); + + late final _sel_insertString_atIndex_1 = + _registerName1("insertString:atIndex:"); + void _objc_msgSend_448( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, + int loc, + ) { + return __objc_msgSend_448( + obj, + sel, + aString, + loc, + ); + } + + late final __objc_msgSend_448Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_deleteCharactersInRange_1 = + _registerName1("deleteCharactersInRange:"); + late final _sel_appendString_1 = _registerName1("appendString:"); + late final _sel_appendFormat_1 = _registerName1("appendFormat:"); + late final _sel_setString_1 = _registerName1("setString:"); + late final _sel_replaceOccurrencesOfString_withString_options_range_1 = + _registerName1("replaceOccurrencesOfString:withString:options:range:"); + int _objc_msgSend_449( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer replacement, + int options, + NSRange searchRange, + ) { + return __objc_msgSend_449( + obj, + sel, + target, + replacement, + options, + searchRange, + ); + } + + late final __objc_msgSend_449Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, NSRange)>(); + + late final _sel_applyTransform_reverse_range_updatedRange_1 = + _registerName1("applyTransform:reverse:range:updatedRange:"); + bool _objc_msgSend_450( + ffi.Pointer obj, + ffi.Pointer sel, + NSStringTransform transform, + bool reverse, + NSRange range, + NSRangePointer resultingRange, + ) { + return __objc_msgSend_450( + obj, + sel, + transform, + reverse, + range, + resultingRange, + ); + } + + late final __objc_msgSend_450Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + NSStringTransform, + ffi.Bool, + NSRange, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + NSStringTransform, bool, NSRange, NSRangePointer)>(); + + ffi.Pointer _objc_msgSend_451( + ffi.Pointer obj, + ffi.Pointer sel, + int capacity, + ) { + return __objc_msgSend_451( + obj, + sel, + capacity, + ); + } + + late final __objc_msgSend_451Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_stringWithCapacity_1 = _registerName1("stringWithCapacity:"); + late final ffi.Pointer _NSCharacterConversionException = + _lookup('NSCharacterConversionException'); + + NSExceptionName get NSCharacterConversionException => + _NSCharacterConversionException.value; + + set NSCharacterConversionException(NSExceptionName value) => + _NSCharacterConversionException.value = value; + + late final ffi.Pointer _NSParseErrorException = + _lookup('NSParseErrorException'); + + NSExceptionName get NSParseErrorException => _NSParseErrorException.value; + + set NSParseErrorException(NSExceptionName value) => + _NSParseErrorException.value = value; + + late final _class_NSSimpleCString1 = _getClass1("NSSimpleCString"); + late final _class_NSConstantString1 = _getClass1("NSConstantString"); + late final _class_NSMutableCharacterSet1 = + _getClass1("NSMutableCharacterSet"); + late final _sel_addCharactersInRange_1 = + _registerName1("addCharactersInRange:"); + late final _sel_removeCharactersInRange_1 = + _registerName1("removeCharactersInRange:"); + late final _sel_addCharactersInString_1 = + _registerName1("addCharactersInString:"); + late final _sel_removeCharactersInString_1 = + _registerName1("removeCharactersInString:"); + late final _sel_formUnionWithCharacterSet_1 = + _registerName1("formUnionWithCharacterSet:"); + void _objc_msgSend_452( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherSet, + ) { + return __objc_msgSend_452( + obj, + sel, + otherSet, + ); + } + + late final __objc_msgSend_452Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_formIntersectionWithCharacterSet_1 = + _registerName1("formIntersectionWithCharacterSet:"); + late final _sel_invert1 = _registerName1("invert"); + ffi.Pointer _objc_msgSend_453( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange aRange, + ) { + return __objc_msgSend_453( + obj, + sel, + aRange, + ); + } + + late final __objc_msgSend_453Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); + + ffi.Pointer _objc_msgSend_454( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, + ) { + return __objc_msgSend_454( + obj, + sel, + aString, + ); + } + + late final __objc_msgSend_454Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_455( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_455( + obj, + sel, + data, + ); + } + + late final __objc_msgSend_455Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final ffi.Pointer> _NSHTTPPropertyStatusCodeKey = + _lookup>('NSHTTPPropertyStatusCodeKey'); + + ffi.Pointer get NSHTTPPropertyStatusCodeKey => + _NSHTTPPropertyStatusCodeKey.value; + + set NSHTTPPropertyStatusCodeKey(ffi.Pointer value) => + _NSHTTPPropertyStatusCodeKey.value = value; + + late final ffi.Pointer> + _NSHTTPPropertyStatusReasonKey = + _lookup>('NSHTTPPropertyStatusReasonKey'); + + ffi.Pointer get NSHTTPPropertyStatusReasonKey => + _NSHTTPPropertyStatusReasonKey.value; + + set NSHTTPPropertyStatusReasonKey(ffi.Pointer value) => + _NSHTTPPropertyStatusReasonKey.value = value; + + late final ffi.Pointer> + _NSHTTPPropertyServerHTTPVersionKey = + _lookup>('NSHTTPPropertyServerHTTPVersionKey'); + + ffi.Pointer get NSHTTPPropertyServerHTTPVersionKey => + _NSHTTPPropertyServerHTTPVersionKey.value; + + set NSHTTPPropertyServerHTTPVersionKey(ffi.Pointer value) => + _NSHTTPPropertyServerHTTPVersionKey.value = value; + + late final ffi.Pointer> + _NSHTTPPropertyRedirectionHeadersKey = + _lookup>('NSHTTPPropertyRedirectionHeadersKey'); + + ffi.Pointer get NSHTTPPropertyRedirectionHeadersKey => + _NSHTTPPropertyRedirectionHeadersKey.value; + + set NSHTTPPropertyRedirectionHeadersKey(ffi.Pointer value) => + _NSHTTPPropertyRedirectionHeadersKey.value = value; + + late final ffi.Pointer> + _NSHTTPPropertyErrorPageDataKey = + _lookup>('NSHTTPPropertyErrorPageDataKey'); + + ffi.Pointer get NSHTTPPropertyErrorPageDataKey => + _NSHTTPPropertyErrorPageDataKey.value; + + set NSHTTPPropertyErrorPageDataKey(ffi.Pointer value) => + _NSHTTPPropertyErrorPageDataKey.value = value; + + late final ffi.Pointer> _NSHTTPPropertyHTTPProxy = + _lookup>('NSHTTPPropertyHTTPProxy'); + + ffi.Pointer get NSHTTPPropertyHTTPProxy => + _NSHTTPPropertyHTTPProxy.value; + + set NSHTTPPropertyHTTPProxy(ffi.Pointer value) => + _NSHTTPPropertyHTTPProxy.value = value; + + late final ffi.Pointer> _NSFTPPropertyUserLoginKey = + _lookup>('NSFTPPropertyUserLoginKey'); + + ffi.Pointer get NSFTPPropertyUserLoginKey => + _NSFTPPropertyUserLoginKey.value; + + set NSFTPPropertyUserLoginKey(ffi.Pointer value) => + _NSFTPPropertyUserLoginKey.value = value; + + late final ffi.Pointer> + _NSFTPPropertyUserPasswordKey = + _lookup>('NSFTPPropertyUserPasswordKey'); + + ffi.Pointer get NSFTPPropertyUserPasswordKey => + _NSFTPPropertyUserPasswordKey.value; + + set NSFTPPropertyUserPasswordKey(ffi.Pointer value) => + _NSFTPPropertyUserPasswordKey.value = value; + + late final ffi.Pointer> + _NSFTPPropertyActiveTransferModeKey = + _lookup>('NSFTPPropertyActiveTransferModeKey'); + + ffi.Pointer get NSFTPPropertyActiveTransferModeKey => + _NSFTPPropertyActiveTransferModeKey.value; + + set NSFTPPropertyActiveTransferModeKey(ffi.Pointer value) => + _NSFTPPropertyActiveTransferModeKey.value = value; + + late final ffi.Pointer> _NSFTPPropertyFileOffsetKey = + _lookup>('NSFTPPropertyFileOffsetKey'); + + ffi.Pointer get NSFTPPropertyFileOffsetKey => + _NSFTPPropertyFileOffsetKey.value; + + set NSFTPPropertyFileOffsetKey(ffi.Pointer value) => + _NSFTPPropertyFileOffsetKey.value = value; + + late final ffi.Pointer> _NSFTPPropertyFTPProxy = + _lookup>('NSFTPPropertyFTPProxy'); + + ffi.Pointer get NSFTPPropertyFTPProxy => + _NSFTPPropertyFTPProxy.value; + + set NSFTPPropertyFTPProxy(ffi.Pointer value) => + _NSFTPPropertyFTPProxy.value = value; + + /// A string constant for the "file" URL scheme. If you are using this to compare to a URL's scheme to see if it is a file URL, you should instead use the NSURL fileURL property -- the fileURL property is much faster. + late final ffi.Pointer> _NSURLFileScheme = + _lookup>('NSURLFileScheme'); + + ffi.Pointer get NSURLFileScheme => _NSURLFileScheme.value; + + set NSURLFileScheme(ffi.Pointer value) => + _NSURLFileScheme.value = value; + + /// Key for the resource properties that have not been set after setResourceValues:error: returns an error, returned as an array of of strings. + late final ffi.Pointer _NSURLKeysOfUnsetValuesKey = + _lookup('NSURLKeysOfUnsetValuesKey'); + + NSURLResourceKey get NSURLKeysOfUnsetValuesKey => + _NSURLKeysOfUnsetValuesKey.value; + + set NSURLKeysOfUnsetValuesKey(NSURLResourceKey value) => + _NSURLKeysOfUnsetValuesKey.value = value; + + /// The resource name provided by the file system (Read-write, value type NSString) + late final ffi.Pointer _NSURLNameKey = + _lookup('NSURLNameKey'); + + NSURLResourceKey get NSURLNameKey => _NSURLNameKey.value; + + set NSURLNameKey(NSURLResourceKey value) => _NSURLNameKey.value = value; + + /// Localized or extension-hidden name as displayed to users (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedNameKey = _lookup('NSURLLocalizedNameKey'); - NSURLResourceKey get NSURLLocalizedNameKey => _NSURLLocalizedNameKey.value; + NSURLResourceKey get NSURLLocalizedNameKey => _NSURLLocalizedNameKey.value; + + set NSURLLocalizedNameKey(NSURLResourceKey value) => + _NSURLLocalizedNameKey.value = value; + + /// True for regular files (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsRegularFileKey = + _lookup('NSURLIsRegularFileKey'); + + NSURLResourceKey get NSURLIsRegularFileKey => _NSURLIsRegularFileKey.value; + + set NSURLIsRegularFileKey(NSURLResourceKey value) => + _NSURLIsRegularFileKey.value = value; + + /// True for directories (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsDirectoryKey = + _lookup('NSURLIsDirectoryKey'); + + NSURLResourceKey get NSURLIsDirectoryKey => _NSURLIsDirectoryKey.value; + + set NSURLIsDirectoryKey(NSURLResourceKey value) => + _NSURLIsDirectoryKey.value = value; + + /// True for symlinks (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsSymbolicLinkKey = + _lookup('NSURLIsSymbolicLinkKey'); + + NSURLResourceKey get NSURLIsSymbolicLinkKey => _NSURLIsSymbolicLinkKey.value; + + set NSURLIsSymbolicLinkKey(NSURLResourceKey value) => + _NSURLIsSymbolicLinkKey.value = value; + + /// True for the root directory of a volume (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsVolumeKey = + _lookup('NSURLIsVolumeKey'); + + NSURLResourceKey get NSURLIsVolumeKey => _NSURLIsVolumeKey.value; + + set NSURLIsVolumeKey(NSURLResourceKey value) => + _NSURLIsVolumeKey.value = value; + + /// True for packaged directories (Read-only 10_6 and 10_7, read-write 10_8, value type boolean NSNumber). Note: You can only set or clear this property on directories; if you try to set this property on non-directory objects, the property is ignored. If the directory is a package for some other reason (extension type, etc), setting this property to false will have no effect. + late final ffi.Pointer _NSURLIsPackageKey = + _lookup('NSURLIsPackageKey'); + + NSURLResourceKey get NSURLIsPackageKey => _NSURLIsPackageKey.value; + + set NSURLIsPackageKey(NSURLResourceKey value) => + _NSURLIsPackageKey.value = value; + + /// True if resource is an application (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsApplicationKey = + _lookup('NSURLIsApplicationKey'); + + NSURLResourceKey get NSURLIsApplicationKey => _NSURLIsApplicationKey.value; + + set NSURLIsApplicationKey(NSURLResourceKey value) => + _NSURLIsApplicationKey.value = value; + + /// True if the resource is scriptable. Only applies to applications (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLApplicationIsScriptableKey = + _lookup('NSURLApplicationIsScriptableKey'); + + NSURLResourceKey get NSURLApplicationIsScriptableKey => + _NSURLApplicationIsScriptableKey.value; + + set NSURLApplicationIsScriptableKey(NSURLResourceKey value) => + _NSURLApplicationIsScriptableKey.value = value; + + /// True for system-immutable resources (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsSystemImmutableKey = + _lookup('NSURLIsSystemImmutableKey'); + + NSURLResourceKey get NSURLIsSystemImmutableKey => + _NSURLIsSystemImmutableKey.value; + + set NSURLIsSystemImmutableKey(NSURLResourceKey value) => + _NSURLIsSystemImmutableKey.value = value; + + /// True for user-immutable resources (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsUserImmutableKey = + _lookup('NSURLIsUserImmutableKey'); + + NSURLResourceKey get NSURLIsUserImmutableKey => + _NSURLIsUserImmutableKey.value; + + set NSURLIsUserImmutableKey(NSURLResourceKey value) => + _NSURLIsUserImmutableKey.value = value; + + /// True for resources normally not displayed to users (Read-write, value type boolean NSNumber). Note: If the resource is a hidden because its name starts with a period, setting this property to false will not change the property. + late final ffi.Pointer _NSURLIsHiddenKey = + _lookup('NSURLIsHiddenKey'); + + NSURLResourceKey get NSURLIsHiddenKey => _NSURLIsHiddenKey.value; + + set NSURLIsHiddenKey(NSURLResourceKey value) => + _NSURLIsHiddenKey.value = value; + + /// True for resources whose filename extension is removed from the localized name property (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLHasHiddenExtensionKey = + _lookup('NSURLHasHiddenExtensionKey'); + + NSURLResourceKey get NSURLHasHiddenExtensionKey => + _NSURLHasHiddenExtensionKey.value; + + set NSURLHasHiddenExtensionKey(NSURLResourceKey value) => + _NSURLHasHiddenExtensionKey.value = value; + + /// The date the resource was created (Read-write, value type NSDate) + late final ffi.Pointer _NSURLCreationDateKey = + _lookup('NSURLCreationDateKey'); + + NSURLResourceKey get NSURLCreationDateKey => _NSURLCreationDateKey.value; + + set NSURLCreationDateKey(NSURLResourceKey value) => + _NSURLCreationDateKey.value = value; + + /// The date the resource was last accessed (Read-write, value type NSDate) + late final ffi.Pointer _NSURLContentAccessDateKey = + _lookup('NSURLContentAccessDateKey'); + + NSURLResourceKey get NSURLContentAccessDateKey => + _NSURLContentAccessDateKey.value; + + set NSURLContentAccessDateKey(NSURLResourceKey value) => + _NSURLContentAccessDateKey.value = value; + + /// The time the resource content was last modified (Read-write, value type NSDate) + late final ffi.Pointer _NSURLContentModificationDateKey = + _lookup('NSURLContentModificationDateKey'); + + NSURLResourceKey get NSURLContentModificationDateKey => + _NSURLContentModificationDateKey.value; + + set NSURLContentModificationDateKey(NSURLResourceKey value) => + _NSURLContentModificationDateKey.value = value; + + /// The time the resource's attributes were last modified (Read-only, value type NSDate) + late final ffi.Pointer _NSURLAttributeModificationDateKey = + _lookup('NSURLAttributeModificationDateKey'); + + NSURLResourceKey get NSURLAttributeModificationDateKey => + _NSURLAttributeModificationDateKey.value; + + set NSURLAttributeModificationDateKey(NSURLResourceKey value) => + _NSURLAttributeModificationDateKey.value = value; + + /// Number of hard links to the resource (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLLinkCountKey = + _lookup('NSURLLinkCountKey'); + + NSURLResourceKey get NSURLLinkCountKey => _NSURLLinkCountKey.value; + + set NSURLLinkCountKey(NSURLResourceKey value) => + _NSURLLinkCountKey.value = value; + + /// The resource's parent directory, if any (Read-only, value type NSURL) + late final ffi.Pointer _NSURLParentDirectoryURLKey = + _lookup('NSURLParentDirectoryURLKey'); + + NSURLResourceKey get NSURLParentDirectoryURLKey => + _NSURLParentDirectoryURLKey.value; + + set NSURLParentDirectoryURLKey(NSURLResourceKey value) => + _NSURLParentDirectoryURLKey.value = value; + + /// URL of the volume on which the resource is stored (Read-only, value type NSURL) + late final ffi.Pointer _NSURLVolumeURLKey = + _lookup('NSURLVolumeURLKey'); + + NSURLResourceKey get NSURLVolumeURLKey => _NSURLVolumeURLKey.value; + + set NSURLVolumeURLKey(NSURLResourceKey value) => + _NSURLVolumeURLKey.value = value; + + /// Uniform type identifier (UTI) for the resource (Read-only, value type NSString) + late final ffi.Pointer _NSURLTypeIdentifierKey = + _lookup('NSURLTypeIdentifierKey'); + + NSURLResourceKey get NSURLTypeIdentifierKey => _NSURLTypeIdentifierKey.value; + + set NSURLTypeIdentifierKey(NSURLResourceKey value) => + _NSURLTypeIdentifierKey.value = value; + + /// File type (UTType) for the resource (Read-only, value type UTType) + late final ffi.Pointer _NSURLContentTypeKey = + _lookup('NSURLContentTypeKey'); + + NSURLResourceKey get NSURLContentTypeKey => _NSURLContentTypeKey.value; + + set NSURLContentTypeKey(NSURLResourceKey value) => + _NSURLContentTypeKey.value = value; + + /// User-visible type or "kind" description (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedTypeDescriptionKey = + _lookup('NSURLLocalizedTypeDescriptionKey'); + + NSURLResourceKey get NSURLLocalizedTypeDescriptionKey => + _NSURLLocalizedTypeDescriptionKey.value; + + set NSURLLocalizedTypeDescriptionKey(NSURLResourceKey value) => + _NSURLLocalizedTypeDescriptionKey.value = value; + + /// The label number assigned to the resource (Read-write, value type NSNumber) + late final ffi.Pointer _NSURLLabelNumberKey = + _lookup('NSURLLabelNumberKey'); + + NSURLResourceKey get NSURLLabelNumberKey => _NSURLLabelNumberKey.value; + + set NSURLLabelNumberKey(NSURLResourceKey value) => + _NSURLLabelNumberKey.value = value; + + /// The color of the assigned label (Read-only, value type NSColor) + late final ffi.Pointer _NSURLLabelColorKey = + _lookup('NSURLLabelColorKey'); + + NSURLResourceKey get NSURLLabelColorKey => _NSURLLabelColorKey.value; + + set NSURLLabelColorKey(NSURLResourceKey value) => + _NSURLLabelColorKey.value = value; + + /// The user-visible label text (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedLabelKey = + _lookup('NSURLLocalizedLabelKey'); + + NSURLResourceKey get NSURLLocalizedLabelKey => _NSURLLocalizedLabelKey.value; + + set NSURLLocalizedLabelKey(NSURLResourceKey value) => + _NSURLLocalizedLabelKey.value = value; + + /// The icon normally displayed for the resource (Read-only, value type NSImage) + late final ffi.Pointer _NSURLEffectiveIconKey = + _lookup('NSURLEffectiveIconKey'); + + NSURLResourceKey get NSURLEffectiveIconKey => _NSURLEffectiveIconKey.value; + + set NSURLEffectiveIconKey(NSURLResourceKey value) => + _NSURLEffectiveIconKey.value = value; + + /// The custom icon assigned to the resource, if any (Currently not implemented, value type NSImage) + late final ffi.Pointer _NSURLCustomIconKey = + _lookup('NSURLCustomIconKey'); + + NSURLResourceKey get NSURLCustomIconKey => _NSURLCustomIconKey.value; + + set NSURLCustomIconKey(NSURLResourceKey value) => + _NSURLCustomIconKey.value = value; + + /// An identifier which can be used to compare two file system objects for equality using -isEqual (i.e, two object identifiers are equal if they have the same file system path or if the paths are linked to same inode on the same file system). This identifier is not persistent across system restarts. (Read-only, value type id ) + late final ffi.Pointer _NSURLFileResourceIdentifierKey = + _lookup('NSURLFileResourceIdentifierKey'); + + NSURLResourceKey get NSURLFileResourceIdentifierKey => + _NSURLFileResourceIdentifierKey.value; + + set NSURLFileResourceIdentifierKey(NSURLResourceKey value) => + _NSURLFileResourceIdentifierKey.value = value; + + /// An identifier that can be used to identify the volume the file system object is on. Other objects on the same volume will have the same volume identifier and can be compared using for equality using -isEqual. This identifier is not persistent across system restarts. (Read-only, value type id ) + late final ffi.Pointer _NSURLVolumeIdentifierKey = + _lookup('NSURLVolumeIdentifierKey'); + + NSURLResourceKey get NSURLVolumeIdentifierKey => + _NSURLVolumeIdentifierKey.value; + + set NSURLVolumeIdentifierKey(NSURLResourceKey value) => + _NSURLVolumeIdentifierKey.value = value; + + /// The optimal block size when reading or writing this file's data, or nil if not available. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLPreferredIOBlockSizeKey = + _lookup('NSURLPreferredIOBlockSizeKey'); + + NSURLResourceKey get NSURLPreferredIOBlockSizeKey => + _NSURLPreferredIOBlockSizeKey.value; + + set NSURLPreferredIOBlockSizeKey(NSURLResourceKey value) => + _NSURLPreferredIOBlockSizeKey.value = value; + + /// true if this process (as determined by EUID) can read the resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsReadableKey = + _lookup('NSURLIsReadableKey'); + + NSURLResourceKey get NSURLIsReadableKey => _NSURLIsReadableKey.value; + + set NSURLIsReadableKey(NSURLResourceKey value) => + _NSURLIsReadableKey.value = value; + + /// true if this process (as determined by EUID) can write to the resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsWritableKey = + _lookup('NSURLIsWritableKey'); + + NSURLResourceKey get NSURLIsWritableKey => _NSURLIsWritableKey.value; + + set NSURLIsWritableKey(NSURLResourceKey value) => + _NSURLIsWritableKey.value = value; + + /// true if this process (as determined by EUID) can execute a file resource or search a directory resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsExecutableKey = + _lookup('NSURLIsExecutableKey'); + + NSURLResourceKey get NSURLIsExecutableKey => _NSURLIsExecutableKey.value; + + set NSURLIsExecutableKey(NSURLResourceKey value) => + _NSURLIsExecutableKey.value = value; + + /// The file system object's security information encapsulated in a NSFileSecurity object. (Read-write, Value type NSFileSecurity) + late final ffi.Pointer _NSURLFileSecurityKey = + _lookup('NSURLFileSecurityKey'); + + NSURLResourceKey get NSURLFileSecurityKey => _NSURLFileSecurityKey.value; + + set NSURLFileSecurityKey(NSURLResourceKey value) => + _NSURLFileSecurityKey.value = value; + + /// true if resource should be excluded from backups, false otherwise (Read-write, value type boolean NSNumber). This property is only useful for excluding cache and other application support files which are not needed in a backup. Some operations commonly made to user documents will cause this property to be reset to false and so this property should not be used on user documents. + late final ffi.Pointer _NSURLIsExcludedFromBackupKey = + _lookup('NSURLIsExcludedFromBackupKey'); + + NSURLResourceKey get NSURLIsExcludedFromBackupKey => + _NSURLIsExcludedFromBackupKey.value; + + set NSURLIsExcludedFromBackupKey(NSURLResourceKey value) => + _NSURLIsExcludedFromBackupKey.value = value; + + /// The array of Tag names (Read-write, value type NSArray of NSString) + late final ffi.Pointer _NSURLTagNamesKey = + _lookup('NSURLTagNamesKey'); + + NSURLResourceKey get NSURLTagNamesKey => _NSURLTagNamesKey.value; + + set NSURLTagNamesKey(NSURLResourceKey value) => + _NSURLTagNamesKey.value = value; + + /// the URL's path as a file system path (Read-only, value type NSString) + late final ffi.Pointer _NSURLPathKey = + _lookup('NSURLPathKey'); + + NSURLResourceKey get NSURLPathKey => _NSURLPathKey.value; + + set NSURLPathKey(NSURLResourceKey value) => _NSURLPathKey.value = value; + + /// the URL's path as a canonical absolute file system path (Read-only, value type NSString) + late final ffi.Pointer _NSURLCanonicalPathKey = + _lookup('NSURLCanonicalPathKey'); + + NSURLResourceKey get NSURLCanonicalPathKey => _NSURLCanonicalPathKey.value; + + set NSURLCanonicalPathKey(NSURLResourceKey value) => + _NSURLCanonicalPathKey.value = value; + + /// true if this URL is a file system trigger directory. Traversing or opening a file system trigger will cause an attempt to mount a file system on the trigger directory. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsMountTriggerKey = + _lookup('NSURLIsMountTriggerKey'); + + NSURLResourceKey get NSURLIsMountTriggerKey => _NSURLIsMountTriggerKey.value; + + set NSURLIsMountTriggerKey(NSURLResourceKey value) => + _NSURLIsMountTriggerKey.value = value; + + /// An opaque generation identifier which can be compared using isEqual: to determine if the data in a document has been modified. For URLs which refer to the same file inode, the generation identifier will change when the data in the file's data fork is changed (changes to extended attributes or other file system metadata do not change the generation identifier). For URLs which refer to the same directory inode, the generation identifier will change when direct children of that directory are added, removed or renamed (changes to the data of the direct children of that directory will not change the generation identifier). The generation identifier is persistent across system restarts. The generation identifier is tied to a specific document on a specific volume and is not transferred when the document is copied to another volume. This property is not supported by all volumes. (Read-only, value type id ) + late final ffi.Pointer _NSURLGenerationIdentifierKey = + _lookup('NSURLGenerationIdentifierKey'); + + NSURLResourceKey get NSURLGenerationIdentifierKey => + _NSURLGenerationIdentifierKey.value; + + set NSURLGenerationIdentifierKey(NSURLResourceKey value) => + _NSURLGenerationIdentifierKey.value = value; + + /// The document identifier -- a value assigned by the kernel to a document (which can be either a file or directory) and is used to identify the document regardless of where it gets moved on a volume. The document identifier survives "safe save” operations; i.e it is sticky to the path it was assigned to (-replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: is the preferred safe-save API). The document identifier is persistent across system restarts. The document identifier is not transferred when the file is copied. Document identifiers are only unique within a single volume. This property is not supported by all volumes. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLDocumentIdentifierKey = + _lookup('NSURLDocumentIdentifierKey'); + + NSURLResourceKey get NSURLDocumentIdentifierKey => + _NSURLDocumentIdentifierKey.value; + + set NSURLDocumentIdentifierKey(NSURLResourceKey value) => + _NSURLDocumentIdentifierKey.value = value; + + /// The date the resource was created, or renamed into or within its parent directory. Note that inconsistent behavior may be observed when this attribute is requested on hard-linked items. This property is not supported by all volumes. (Read-only before macOS 10.15, iOS 13.0, watchOS 6.0, and tvOS 13.0; Read-write after, value type NSDate) + late final ffi.Pointer _NSURLAddedToDirectoryDateKey = + _lookup('NSURLAddedToDirectoryDateKey'); + + NSURLResourceKey get NSURLAddedToDirectoryDateKey => + _NSURLAddedToDirectoryDateKey.value; + + set NSURLAddedToDirectoryDateKey(NSURLResourceKey value) => + _NSURLAddedToDirectoryDateKey.value = value; + + /// The quarantine properties as defined in LSQuarantine.h. To remove quarantine information from a file, pass NSNull as the value when setting this property. (Read-write, value type NSDictionary) + late final ffi.Pointer _NSURLQuarantinePropertiesKey = + _lookup('NSURLQuarantinePropertiesKey'); + + NSURLResourceKey get NSURLQuarantinePropertiesKey => + _NSURLQuarantinePropertiesKey.value; + + set NSURLQuarantinePropertiesKey(NSURLResourceKey value) => + _NSURLQuarantinePropertiesKey.value = value; + + /// Returns the file system object type. (Read-only, value type NSString) + late final ffi.Pointer _NSURLFileResourceTypeKey = + _lookup('NSURLFileResourceTypeKey'); + + NSURLResourceKey get NSURLFileResourceTypeKey => + _NSURLFileResourceTypeKey.value; + + set NSURLFileResourceTypeKey(NSURLResourceKey value) => + _NSURLFileResourceTypeKey.value = value; + + /// A 64-bit value assigned by APFS that identifies a file's content data stream. Only cloned files and their originals can have the same identifier. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileContentIdentifierKey = + _lookup('NSURLFileContentIdentifierKey'); + + NSURLResourceKey get NSURLFileContentIdentifierKey => + _NSURLFileContentIdentifierKey.value; + + set NSURLFileContentIdentifierKey(NSURLResourceKey value) => + _NSURLFileContentIdentifierKey.value = value; + + /// True for cloned files and their originals that may share all, some, or no data blocks. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLMayShareFileContentKey = + _lookup('NSURLMayShareFileContentKey'); + + NSURLResourceKey get NSURLMayShareFileContentKey => + _NSURLMayShareFileContentKey.value; + + set NSURLMayShareFileContentKey(NSURLResourceKey value) => + _NSURLMayShareFileContentKey.value = value; + + /// True if the file has extended attributes. False guarantees there are none. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLMayHaveExtendedAttributesKey = + _lookup('NSURLMayHaveExtendedAttributesKey'); + + NSURLResourceKey get NSURLMayHaveExtendedAttributesKey => + _NSURLMayHaveExtendedAttributesKey.value; + + set NSURLMayHaveExtendedAttributesKey(NSURLResourceKey value) => + _NSURLMayHaveExtendedAttributesKey.value = value; + + /// True if the file can be deleted by the file system when asked to free space. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLIsPurgeableKey = + _lookup('NSURLIsPurgeableKey'); + + NSURLResourceKey get NSURLIsPurgeableKey => _NSURLIsPurgeableKey.value; + + set NSURLIsPurgeableKey(NSURLResourceKey value) => + _NSURLIsPurgeableKey.value = value; + + /// True if the file has sparse regions. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLIsSparseKey = + _lookup('NSURLIsSparseKey'); + + NSURLResourceKey get NSURLIsSparseKey => _NSURLIsSparseKey.value; + + set NSURLIsSparseKey(NSURLResourceKey value) => + _NSURLIsSparseKey.value = value; + + /// The file system object type values returned for the NSURLFileResourceTypeKey + late final ffi.Pointer + _NSURLFileResourceTypeNamedPipe = + _lookup('NSURLFileResourceTypeNamedPipe'); + + NSURLFileResourceType get NSURLFileResourceTypeNamedPipe => + _NSURLFileResourceTypeNamedPipe.value; + + set NSURLFileResourceTypeNamedPipe(NSURLFileResourceType value) => + _NSURLFileResourceTypeNamedPipe.value = value; + + late final ffi.Pointer + _NSURLFileResourceTypeCharacterSpecial = + _lookup('NSURLFileResourceTypeCharacterSpecial'); + + NSURLFileResourceType get NSURLFileResourceTypeCharacterSpecial => + _NSURLFileResourceTypeCharacterSpecial.value; + + set NSURLFileResourceTypeCharacterSpecial(NSURLFileResourceType value) => + _NSURLFileResourceTypeCharacterSpecial.value = value; + + late final ffi.Pointer + _NSURLFileResourceTypeDirectory = + _lookup('NSURLFileResourceTypeDirectory'); + + NSURLFileResourceType get NSURLFileResourceTypeDirectory => + _NSURLFileResourceTypeDirectory.value; + + set NSURLFileResourceTypeDirectory(NSURLFileResourceType value) => + _NSURLFileResourceTypeDirectory.value = value; + + late final ffi.Pointer + _NSURLFileResourceTypeBlockSpecial = + _lookup('NSURLFileResourceTypeBlockSpecial'); + + NSURLFileResourceType get NSURLFileResourceTypeBlockSpecial => + _NSURLFileResourceTypeBlockSpecial.value; + + set NSURLFileResourceTypeBlockSpecial(NSURLFileResourceType value) => + _NSURLFileResourceTypeBlockSpecial.value = value; + + late final ffi.Pointer _NSURLFileResourceTypeRegular = + _lookup('NSURLFileResourceTypeRegular'); + + NSURLFileResourceType get NSURLFileResourceTypeRegular => + _NSURLFileResourceTypeRegular.value; + + set NSURLFileResourceTypeRegular(NSURLFileResourceType value) => + _NSURLFileResourceTypeRegular.value = value; + + late final ffi.Pointer + _NSURLFileResourceTypeSymbolicLink = + _lookup('NSURLFileResourceTypeSymbolicLink'); + + NSURLFileResourceType get NSURLFileResourceTypeSymbolicLink => + _NSURLFileResourceTypeSymbolicLink.value; + + set NSURLFileResourceTypeSymbolicLink(NSURLFileResourceType value) => + _NSURLFileResourceTypeSymbolicLink.value = value; + + late final ffi.Pointer _NSURLFileResourceTypeSocket = + _lookup('NSURLFileResourceTypeSocket'); + + NSURLFileResourceType get NSURLFileResourceTypeSocket => + _NSURLFileResourceTypeSocket.value; + + set NSURLFileResourceTypeSocket(NSURLFileResourceType value) => + _NSURLFileResourceTypeSocket.value = value; + + late final ffi.Pointer _NSURLFileResourceTypeUnknown = + _lookup('NSURLFileResourceTypeUnknown'); + + NSURLFileResourceType get NSURLFileResourceTypeUnknown => + _NSURLFileResourceTypeUnknown.value; + + set NSURLFileResourceTypeUnknown(NSURLFileResourceType value) => + _NSURLFileResourceTypeUnknown.value = value; + + /// dictionary of NSImage/UIImage objects keyed by size + late final ffi.Pointer _NSURLThumbnailDictionaryKey = + _lookup('NSURLThumbnailDictionaryKey'); + + NSURLResourceKey get NSURLThumbnailDictionaryKey => + _NSURLThumbnailDictionaryKey.value; + + set NSURLThumbnailDictionaryKey(NSURLResourceKey value) => + _NSURLThumbnailDictionaryKey.value = value; + + /// returns all thumbnails as a single NSImage + late final ffi.Pointer _NSURLThumbnailKey = + _lookup('NSURLThumbnailKey'); + + NSURLResourceKey get NSURLThumbnailKey => _NSURLThumbnailKey.value; + + set NSURLThumbnailKey(NSURLResourceKey value) => + _NSURLThumbnailKey.value = value; + + /// size key for a 1024 x 1024 thumbnail image + late final ffi.Pointer + _NSThumbnail1024x1024SizeKey = + _lookup('NSThumbnail1024x1024SizeKey'); + + NSURLThumbnailDictionaryItem get NSThumbnail1024x1024SizeKey => + _NSThumbnail1024x1024SizeKey.value; + + set NSThumbnail1024x1024SizeKey(NSURLThumbnailDictionaryItem value) => + _NSThumbnail1024x1024SizeKey.value = value; + + /// Total file size in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileSizeKey = + _lookup('NSURLFileSizeKey'); + + NSURLResourceKey get NSURLFileSizeKey => _NSURLFileSizeKey.value; + + set NSURLFileSizeKey(NSURLResourceKey value) => + _NSURLFileSizeKey.value = value; + + /// Total size allocated on disk for the file in bytes (number of blocks times block size) (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileAllocatedSizeKey = + _lookup('NSURLFileAllocatedSizeKey'); + + NSURLResourceKey get NSURLFileAllocatedSizeKey => + _NSURLFileAllocatedSizeKey.value; + + set NSURLFileAllocatedSizeKey(NSURLResourceKey value) => + _NSURLFileAllocatedSizeKey.value = value; + + /// Total displayable size of the file in bytes (this may include space used by metadata), or nil if not available. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLTotalFileSizeKey = + _lookup('NSURLTotalFileSizeKey'); + + NSURLResourceKey get NSURLTotalFileSizeKey => _NSURLTotalFileSizeKey.value; + + set NSURLTotalFileSizeKey(NSURLResourceKey value) => + _NSURLTotalFileSizeKey.value = value; + + /// Total allocated size of the file in bytes (this may include space used by metadata), or nil if not available. This can be less than the value returned by NSURLTotalFileSizeKey if the resource is compressed. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLTotalFileAllocatedSizeKey = + _lookup('NSURLTotalFileAllocatedSizeKey'); + + NSURLResourceKey get NSURLTotalFileAllocatedSizeKey => + _NSURLTotalFileAllocatedSizeKey.value; + + set NSURLTotalFileAllocatedSizeKey(NSURLResourceKey value) => + _NSURLTotalFileAllocatedSizeKey.value = value; + + /// true if the resource is a Finder alias file or a symlink, false otherwise ( Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsAliasFileKey = + _lookup('NSURLIsAliasFileKey'); + + NSURLResourceKey get NSURLIsAliasFileKey => _NSURLIsAliasFileKey.value; + + set NSURLIsAliasFileKey(NSURLResourceKey value) => + _NSURLIsAliasFileKey.value = value; + + /// The protection level for this file + late final ffi.Pointer _NSURLFileProtectionKey = + _lookup('NSURLFileProtectionKey'); + + NSURLResourceKey get NSURLFileProtectionKey => _NSURLFileProtectionKey.value; + + set NSURLFileProtectionKey(NSURLResourceKey value) => + _NSURLFileProtectionKey.value = value; + + /// The file has no special protections associated with it. It can be read from or written to at any time. + late final ffi.Pointer _NSURLFileProtectionNone = + _lookup('NSURLFileProtectionNone'); + + NSURLFileProtectionType get NSURLFileProtectionNone => + _NSURLFileProtectionNone.value; + + set NSURLFileProtectionNone(NSURLFileProtectionType value) => + _NSURLFileProtectionNone.value = value; + + /// The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting. + late final ffi.Pointer _NSURLFileProtectionComplete = + _lookup('NSURLFileProtectionComplete'); + + NSURLFileProtectionType get NSURLFileProtectionComplete => + _NSURLFileProtectionComplete.value; + + set NSURLFileProtectionComplete(NSURLFileProtectionType value) => + _NSURLFileProtectionComplete.value = value; + + /// The file is stored in an encrypted format on disk. Files can be created while the device is locked, but once closed, cannot be opened again until the device is unlocked. If the file is opened when unlocked, you may continue to access the file normally, even if the user locks the device. There is a small performance penalty when the file is created and opened, though not when being written to or read from. This can be mitigated by changing the file protection to NSURLFileProtectionComplete when the device is unlocked. + late final ffi.Pointer + _NSURLFileProtectionCompleteUnlessOpen = + _lookup('NSURLFileProtectionCompleteUnlessOpen'); + + NSURLFileProtectionType get NSURLFileProtectionCompleteUnlessOpen => + _NSURLFileProtectionCompleteUnlessOpen.value; + + set NSURLFileProtectionCompleteUnlessOpen(NSURLFileProtectionType value) => + _NSURLFileProtectionCompleteUnlessOpen.value = value; + + /// The file is stored in an encrypted format on disk and cannot be accessed until after the device has booted. After the user unlocks the device for the first time, your app can access the file and continue to access it even if the user subsequently locks the device. + late final ffi.Pointer + _NSURLFileProtectionCompleteUntilFirstUserAuthentication = + _lookup( + 'NSURLFileProtectionCompleteUntilFirstUserAuthentication'); + + NSURLFileProtectionType + get NSURLFileProtectionCompleteUntilFirstUserAuthentication => + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value; + + set NSURLFileProtectionCompleteUntilFirstUserAuthentication( + NSURLFileProtectionType value) => + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; + + /// The user-visible volume format (Read-only, value type NSString) + late final ffi.Pointer + _NSURLVolumeLocalizedFormatDescriptionKey = + _lookup('NSURLVolumeLocalizedFormatDescriptionKey'); + + NSURLResourceKey get NSURLVolumeLocalizedFormatDescriptionKey => + _NSURLVolumeLocalizedFormatDescriptionKey.value; + + set NSURLVolumeLocalizedFormatDescriptionKey(NSURLResourceKey value) => + _NSURLVolumeLocalizedFormatDescriptionKey.value = value; + + /// Total volume capacity in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeTotalCapacityKey = + _lookup('NSURLVolumeTotalCapacityKey'); + + NSURLResourceKey get NSURLVolumeTotalCapacityKey => + _NSURLVolumeTotalCapacityKey.value; + + set NSURLVolumeTotalCapacityKey(NSURLResourceKey value) => + _NSURLVolumeTotalCapacityKey.value = value; + + /// Total free space in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeAvailableCapacityKey = + _lookup('NSURLVolumeAvailableCapacityKey'); + + NSURLResourceKey get NSURLVolumeAvailableCapacityKey => + _NSURLVolumeAvailableCapacityKey.value; + + set NSURLVolumeAvailableCapacityKey(NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityKey.value = value; + + /// Total number of resources on the volume (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeResourceCountKey = + _lookup('NSURLVolumeResourceCountKey'); + + NSURLResourceKey get NSURLVolumeResourceCountKey => + _NSURLVolumeResourceCountKey.value; + + set NSURLVolumeResourceCountKey(NSURLResourceKey value) => + _NSURLVolumeResourceCountKey.value = value; + + /// true if the volume format supports persistent object identifiers and can look up file system objects by their IDs (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsPersistentIDsKey = + _lookup('NSURLVolumeSupportsPersistentIDsKey'); + + NSURLResourceKey get NSURLVolumeSupportsPersistentIDsKey => + _NSURLVolumeSupportsPersistentIDsKey.value; + + set NSURLVolumeSupportsPersistentIDsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsPersistentIDsKey.value = value; + + /// true if the volume format supports symbolic links (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsSymbolicLinksKey = + _lookup('NSURLVolumeSupportsSymbolicLinksKey'); + + NSURLResourceKey get NSURLVolumeSupportsSymbolicLinksKey => + _NSURLVolumeSupportsSymbolicLinksKey.value; + + set NSURLVolumeSupportsSymbolicLinksKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSymbolicLinksKey.value = value; + + /// true if the volume format supports hard links (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsHardLinksKey = + _lookup('NSURLVolumeSupportsHardLinksKey'); + + NSURLResourceKey get NSURLVolumeSupportsHardLinksKey => + _NSURLVolumeSupportsHardLinksKey.value; + + set NSURLVolumeSupportsHardLinksKey(NSURLResourceKey value) => + _NSURLVolumeSupportsHardLinksKey.value = value; + + /// true if the volume format supports a journal used to speed recovery in case of unplanned restart (such as a power outage or crash). This does not necessarily mean the volume is actively using a journal. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsJournalingKey = + _lookup('NSURLVolumeSupportsJournalingKey'); + + NSURLResourceKey get NSURLVolumeSupportsJournalingKey => + _NSURLVolumeSupportsJournalingKey.value; + + set NSURLVolumeSupportsJournalingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsJournalingKey.value = value; + + /// true if the volume is currently using a journal for speedy recovery after an unplanned restart. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsJournalingKey = + _lookup('NSURLVolumeIsJournalingKey'); + + NSURLResourceKey get NSURLVolumeIsJournalingKey => + _NSURLVolumeIsJournalingKey.value; + + set NSURLVolumeIsJournalingKey(NSURLResourceKey value) => + _NSURLVolumeIsJournalingKey.value = value; + + /// true if the volume format supports sparse files, that is, files which can have 'holes' that have never been written to, and thus do not consume space on disk. A sparse file may have an allocated size on disk that is less than its logical length (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsSparseFilesKey = + _lookup('NSURLVolumeSupportsSparseFilesKey'); + + NSURLResourceKey get NSURLVolumeSupportsSparseFilesKey => + _NSURLVolumeSupportsSparseFilesKey.value; + + set NSURLVolumeSupportsSparseFilesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSparseFilesKey.value = value; + + /// For security reasons, parts of a file (runs) that have never been written to must appear to contain zeroes. true if the volume keeps track of allocated but unwritten runs of a file so that it can substitute zeroes without actually writing zeroes to the media. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsZeroRunsKey = + _lookup('NSURLVolumeSupportsZeroRunsKey'); + + NSURLResourceKey get NSURLVolumeSupportsZeroRunsKey => + _NSURLVolumeSupportsZeroRunsKey.value; + + set NSURLVolumeSupportsZeroRunsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsZeroRunsKey.value = value; + + /// true if the volume format treats upper and lower case characters in file and directory names as different. Otherwise an upper case character is equivalent to a lower case character, and you can't have two names that differ solely in the case of the characters. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsCaseSensitiveNamesKey = + _lookup('NSURLVolumeSupportsCaseSensitiveNamesKey'); + + NSURLResourceKey get NSURLVolumeSupportsCaseSensitiveNamesKey => + _NSURLVolumeSupportsCaseSensitiveNamesKey.value; + + set NSURLVolumeSupportsCaseSensitiveNamesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCaseSensitiveNamesKey.value = value; + + /// true if the volume format preserves the case of file and directory names. Otherwise the volume may change the case of some characters (typically making them all upper or all lower case). (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsCasePreservedNamesKey = + _lookup('NSURLVolumeSupportsCasePreservedNamesKey'); + + NSURLResourceKey get NSURLVolumeSupportsCasePreservedNamesKey => + _NSURLVolumeSupportsCasePreservedNamesKey.value; + + set NSURLVolumeSupportsCasePreservedNamesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCasePreservedNamesKey.value = value; + + /// true if the volume supports reliable storage of times for the root directory. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsRootDirectoryDatesKey = + _lookup('NSURLVolumeSupportsRootDirectoryDatesKey'); + + NSURLResourceKey get NSURLVolumeSupportsRootDirectoryDatesKey => + _NSURLVolumeSupportsRootDirectoryDatesKey.value; + + set NSURLVolumeSupportsRootDirectoryDatesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsRootDirectoryDatesKey.value = value; + + /// true if the volume supports returning volume size values (NSURLVolumeTotalCapacityKey and NSURLVolumeAvailableCapacityKey). (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsVolumeSizesKey = + _lookup('NSURLVolumeSupportsVolumeSizesKey'); + + NSURLResourceKey get NSURLVolumeSupportsVolumeSizesKey => + _NSURLVolumeSupportsVolumeSizesKey.value; + + set NSURLVolumeSupportsVolumeSizesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsVolumeSizesKey.value = value; + + /// true if the volume can be renamed. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsRenamingKey = + _lookup('NSURLVolumeSupportsRenamingKey'); + + NSURLResourceKey get NSURLVolumeSupportsRenamingKey => + _NSURLVolumeSupportsRenamingKey.value; + + set NSURLVolumeSupportsRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsRenamingKey.value = value; + + /// true if the volume implements whole-file flock(2) style advisory locks, and the O_EXLOCK and O_SHLOCK flags of the open(2) call. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsAdvisoryFileLockingKey = + _lookup('NSURLVolumeSupportsAdvisoryFileLockingKey'); + + NSURLResourceKey get NSURLVolumeSupportsAdvisoryFileLockingKey => + _NSURLVolumeSupportsAdvisoryFileLockingKey.value; + + set NSURLVolumeSupportsAdvisoryFileLockingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsAdvisoryFileLockingKey.value = value; + + /// true if the volume implements extended security (ACLs). (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsExtendedSecurityKey = + _lookup('NSURLVolumeSupportsExtendedSecurityKey'); + + NSURLResourceKey get NSURLVolumeSupportsExtendedSecurityKey => + _NSURLVolumeSupportsExtendedSecurityKey.value; + + set NSURLVolumeSupportsExtendedSecurityKey(NSURLResourceKey value) => + _NSURLVolumeSupportsExtendedSecurityKey.value = value; + + /// true if the volume should be visible via the GUI (i.e., appear on the Desktop as a separate volume). (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsBrowsableKey = + _lookup('NSURLVolumeIsBrowsableKey'); + + NSURLResourceKey get NSURLVolumeIsBrowsableKey => + _NSURLVolumeIsBrowsableKey.value; + + set NSURLVolumeIsBrowsableKey(NSURLResourceKey value) => + _NSURLVolumeIsBrowsableKey.value = value; + + /// The largest file size (in bytes) supported by this file system, or nil if this cannot be determined. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeMaximumFileSizeKey = + _lookup('NSURLVolumeMaximumFileSizeKey'); + + NSURLResourceKey get NSURLVolumeMaximumFileSizeKey => + _NSURLVolumeMaximumFileSizeKey.value; + + set NSURLVolumeMaximumFileSizeKey(NSURLResourceKey value) => + _NSURLVolumeMaximumFileSizeKey.value = value; + + /// true if the volume's media is ejectable from the drive mechanism under software control. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsEjectableKey = + _lookup('NSURLVolumeIsEjectableKey'); + + NSURLResourceKey get NSURLVolumeIsEjectableKey => + _NSURLVolumeIsEjectableKey.value; + + set NSURLVolumeIsEjectableKey(NSURLResourceKey value) => + _NSURLVolumeIsEjectableKey.value = value; + + /// true if the volume's media is removable from the drive mechanism. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsRemovableKey = + _lookup('NSURLVolumeIsRemovableKey'); + + NSURLResourceKey get NSURLVolumeIsRemovableKey => + _NSURLVolumeIsRemovableKey.value; + + set NSURLVolumeIsRemovableKey(NSURLResourceKey value) => + _NSURLVolumeIsRemovableKey.value = value; + + /// true if the volume's device is connected to an internal bus, false if connected to an external bus, or nil if not available. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsInternalKey = + _lookup('NSURLVolumeIsInternalKey'); + + NSURLResourceKey get NSURLVolumeIsInternalKey => + _NSURLVolumeIsInternalKey.value; + + set NSURLVolumeIsInternalKey(NSURLResourceKey value) => + _NSURLVolumeIsInternalKey.value = value; + + /// true if the volume is automounted. Note: do not mistake this with the functionality provided by kCFURLVolumeSupportsBrowsingKey. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsAutomountedKey = + _lookup('NSURLVolumeIsAutomountedKey'); + + NSURLResourceKey get NSURLVolumeIsAutomountedKey => + _NSURLVolumeIsAutomountedKey.value; + + set NSURLVolumeIsAutomountedKey(NSURLResourceKey value) => + _NSURLVolumeIsAutomountedKey.value = value; + + /// true if the volume is stored on a local device. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsLocalKey = + _lookup('NSURLVolumeIsLocalKey'); + + NSURLResourceKey get NSURLVolumeIsLocalKey => _NSURLVolumeIsLocalKey.value; + + set NSURLVolumeIsLocalKey(NSURLResourceKey value) => + _NSURLVolumeIsLocalKey.value = value; + + /// true if the volume is read-only. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsReadOnlyKey = + _lookup('NSURLVolumeIsReadOnlyKey'); + + NSURLResourceKey get NSURLVolumeIsReadOnlyKey => + _NSURLVolumeIsReadOnlyKey.value; + + set NSURLVolumeIsReadOnlyKey(NSURLResourceKey value) => + _NSURLVolumeIsReadOnlyKey.value = value; + + /// The volume's creation date, or nil if this cannot be determined. (Read-only, value type NSDate) + late final ffi.Pointer _NSURLVolumeCreationDateKey = + _lookup('NSURLVolumeCreationDateKey'); + + NSURLResourceKey get NSURLVolumeCreationDateKey => + _NSURLVolumeCreationDateKey.value; + + set NSURLVolumeCreationDateKey(NSURLResourceKey value) => + _NSURLVolumeCreationDateKey.value = value; + + /// The NSURL needed to remount a network volume, or nil if not available. (Read-only, value type NSURL) + late final ffi.Pointer _NSURLVolumeURLForRemountingKey = + _lookup('NSURLVolumeURLForRemountingKey'); + + NSURLResourceKey get NSURLVolumeURLForRemountingKey => + _NSURLVolumeURLForRemountingKey.value; + + set NSURLVolumeURLForRemountingKey(NSURLResourceKey value) => + _NSURLVolumeURLForRemountingKey.value = value; + + /// The volume's persistent UUID as a string, or nil if a persistent UUID is not available for the volume. (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeUUIDStringKey = + _lookup('NSURLVolumeUUIDStringKey'); + + NSURLResourceKey get NSURLVolumeUUIDStringKey => + _NSURLVolumeUUIDStringKey.value; + + set NSURLVolumeUUIDStringKey(NSURLResourceKey value) => + _NSURLVolumeUUIDStringKey.value = value; + + /// The name of the volume (Read-write if NSURLVolumeSupportsRenamingKey is YES, otherwise read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeNameKey = + _lookup('NSURLVolumeNameKey'); + + NSURLResourceKey get NSURLVolumeNameKey => _NSURLVolumeNameKey.value; + + set NSURLVolumeNameKey(NSURLResourceKey value) => + _NSURLVolumeNameKey.value = value; + + /// The user-presentable name of the volume (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeLocalizedNameKey = + _lookup('NSURLVolumeLocalizedNameKey'); + + NSURLResourceKey get NSURLVolumeLocalizedNameKey => + _NSURLVolumeLocalizedNameKey.value; + + set NSURLVolumeLocalizedNameKey(NSURLResourceKey value) => + _NSURLVolumeLocalizedNameKey.value = value; + + /// true if the volume is encrypted. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsEncryptedKey = + _lookup('NSURLVolumeIsEncryptedKey'); + + NSURLResourceKey get NSURLVolumeIsEncryptedKey => + _NSURLVolumeIsEncryptedKey.value; + + set NSURLVolumeIsEncryptedKey(NSURLResourceKey value) => + _NSURLVolumeIsEncryptedKey.value = value; + + /// true if the volume is the root filesystem. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsRootFileSystemKey = + _lookup('NSURLVolumeIsRootFileSystemKey'); + + NSURLResourceKey get NSURLVolumeIsRootFileSystemKey => + _NSURLVolumeIsRootFileSystemKey.value; + + set NSURLVolumeIsRootFileSystemKey(NSURLResourceKey value) => + _NSURLVolumeIsRootFileSystemKey.value = value; + + /// true if the volume supports transparent decompression of compressed files using decmpfs. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsCompressionKey = + _lookup('NSURLVolumeSupportsCompressionKey'); + + NSURLResourceKey get NSURLVolumeSupportsCompressionKey => + _NSURLVolumeSupportsCompressionKey.value; + + set NSURLVolumeSupportsCompressionKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCompressionKey.value = value; + + /// true if the volume supports clonefile(2) (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsFileCloningKey = + _lookup('NSURLVolumeSupportsFileCloningKey'); + + NSURLResourceKey get NSURLVolumeSupportsFileCloningKey => + _NSURLVolumeSupportsFileCloningKey.value; + + set NSURLVolumeSupportsFileCloningKey(NSURLResourceKey value) => + _NSURLVolumeSupportsFileCloningKey.value = value; + + /// true if the volume supports renamex_np(2)'s RENAME_SWAP option (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsSwapRenamingKey = + _lookup('NSURLVolumeSupportsSwapRenamingKey'); + + NSURLResourceKey get NSURLVolumeSupportsSwapRenamingKey => + _NSURLVolumeSupportsSwapRenamingKey.value; + + set NSURLVolumeSupportsSwapRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSwapRenamingKey.value = value; + + /// true if the volume supports renamex_np(2)'s RENAME_EXCL option (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsExclusiveRenamingKey = + _lookup('NSURLVolumeSupportsExclusiveRenamingKey'); + + NSURLResourceKey get NSURLVolumeSupportsExclusiveRenamingKey => + _NSURLVolumeSupportsExclusiveRenamingKey.value; + + set NSURLVolumeSupportsExclusiveRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsExclusiveRenamingKey.value = value; + + /// true if the volume supports making files immutable with the NSURLIsUserImmutableKey or NSURLIsSystemImmutableKey properties (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsImmutableFilesKey = + _lookup('NSURLVolumeSupportsImmutableFilesKey'); + + NSURLResourceKey get NSURLVolumeSupportsImmutableFilesKey => + _NSURLVolumeSupportsImmutableFilesKey.value; + + set NSURLVolumeSupportsImmutableFilesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsImmutableFilesKey.value = value; + + /// true if the volume supports setting POSIX access permissions with the NSURLFileSecurityKey property (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsAccessPermissionsKey = + _lookup('NSURLVolumeSupportsAccessPermissionsKey'); + + NSURLResourceKey get NSURLVolumeSupportsAccessPermissionsKey => + _NSURLVolumeSupportsAccessPermissionsKey.value; + + set NSURLVolumeSupportsAccessPermissionsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsAccessPermissionsKey.value = value; + + /// True if the volume supports the File Protection attribute (see NSURLFileProtectionKey). (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsFileProtectionKey = + _lookup('NSURLVolumeSupportsFileProtectionKey'); + + NSURLResourceKey get NSURLVolumeSupportsFileProtectionKey => + _NSURLVolumeSupportsFileProtectionKey.value; + + set NSURLVolumeSupportsFileProtectionKey(NSURLResourceKey value) => + _NSURLVolumeSupportsFileProtectionKey.value = value; + + /// (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeAvailableCapacityForImportantUsageKey = + _lookup( + 'NSURLVolumeAvailableCapacityForImportantUsageKey'); + + NSURLResourceKey get NSURLVolumeAvailableCapacityForImportantUsageKey => + _NSURLVolumeAvailableCapacityForImportantUsageKey.value; + + set NSURLVolumeAvailableCapacityForImportantUsageKey( + NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityForImportantUsageKey.value = value; + + /// (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey = + _lookup( + 'NSURLVolumeAvailableCapacityForOpportunisticUsageKey'); + + NSURLResourceKey get NSURLVolumeAvailableCapacityForOpportunisticUsageKey => + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value; + + set NSURLVolumeAvailableCapacityForOpportunisticUsageKey( + NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; + + /// true if this item is synced to the cloud, false if it is only a local file. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsUbiquitousItemKey = + _lookup('NSURLIsUbiquitousItemKey'); + + NSURLResourceKey get NSURLIsUbiquitousItemKey => + _NSURLIsUbiquitousItemKey.value; + + set NSURLIsUbiquitousItemKey(NSURLResourceKey value) => + _NSURLIsUbiquitousItemKey.value = value; + + /// true if this item has conflicts outstanding. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemHasUnresolvedConflictsKey = + _lookup('NSURLUbiquitousItemHasUnresolvedConflictsKey'); + + NSURLResourceKey get NSURLUbiquitousItemHasUnresolvedConflictsKey => + _NSURLUbiquitousItemHasUnresolvedConflictsKey.value; + + set NSURLUbiquitousItemHasUnresolvedConflictsKey(NSURLResourceKey value) => + _NSURLUbiquitousItemHasUnresolvedConflictsKey.value = value; + + /// equivalent to NSURLUbiquitousItemDownloadingStatusKey == NSURLUbiquitousItemDownloadingStatusCurrent. Has never behaved as documented in earlier releases, hence deprecated. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsDownloadedKey = + _lookup('NSURLUbiquitousItemIsDownloadedKey'); + + NSURLResourceKey get NSURLUbiquitousItemIsDownloadedKey => + _NSURLUbiquitousItemIsDownloadedKey.value; + + set NSURLUbiquitousItemIsDownloadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsDownloadedKey.value = value; + + /// true if data is being downloaded for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemIsDownloadingKey = + _lookup('NSURLUbiquitousItemIsDownloadingKey'); + + NSURLResourceKey get NSURLUbiquitousItemIsDownloadingKey => + _NSURLUbiquitousItemIsDownloadingKey.value; + + set NSURLUbiquitousItemIsDownloadingKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsDownloadingKey.value = value; + + /// true if there is data present in the cloud for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsUploadedKey = + _lookup('NSURLUbiquitousItemIsUploadedKey'); + + NSURLResourceKey get NSURLUbiquitousItemIsUploadedKey => + _NSURLUbiquitousItemIsUploadedKey.value; + + set NSURLUbiquitousItemIsUploadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsUploadedKey.value = value; + + /// true if data is being uploaded for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsUploadingKey = + _lookup('NSURLUbiquitousItemIsUploadingKey'); + + NSURLResourceKey get NSURLUbiquitousItemIsUploadingKey => + _NSURLUbiquitousItemIsUploadingKey.value; + + set NSURLUbiquitousItemIsUploadingKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsUploadingKey.value = value; + + /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead + late final ffi.Pointer + _NSURLUbiquitousItemPercentDownloadedKey = + _lookup('NSURLUbiquitousItemPercentDownloadedKey'); + + NSURLResourceKey get NSURLUbiquitousItemPercentDownloadedKey => + _NSURLUbiquitousItemPercentDownloadedKey.value; + + set NSURLUbiquitousItemPercentDownloadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemPercentDownloadedKey.value = value; + + /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead + late final ffi.Pointer + _NSURLUbiquitousItemPercentUploadedKey = + _lookup('NSURLUbiquitousItemPercentUploadedKey'); + + NSURLResourceKey get NSURLUbiquitousItemPercentUploadedKey => + _NSURLUbiquitousItemPercentUploadedKey.value; + + set NSURLUbiquitousItemPercentUploadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemPercentUploadedKey.value = value; + + /// returns the download status of this item. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusKey = + _lookup('NSURLUbiquitousItemDownloadingStatusKey'); + + NSURLResourceKey get NSURLUbiquitousItemDownloadingStatusKey => + _NSURLUbiquitousItemDownloadingStatusKey.value; + + set NSURLUbiquitousItemDownloadingStatusKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadingStatusKey.value = value; + + /// returns the error when downloading the item from iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingErrorKey = + _lookup('NSURLUbiquitousItemDownloadingErrorKey'); + + NSURLResourceKey get NSURLUbiquitousItemDownloadingErrorKey => + _NSURLUbiquitousItemDownloadingErrorKey.value; + + set NSURLUbiquitousItemDownloadingErrorKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadingErrorKey.value = value; + + /// returns the error when uploading the item to iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) + late final ffi.Pointer + _NSURLUbiquitousItemUploadingErrorKey = + _lookup('NSURLUbiquitousItemUploadingErrorKey'); + + NSURLResourceKey get NSURLUbiquitousItemUploadingErrorKey => + _NSURLUbiquitousItemUploadingErrorKey.value; + + set NSURLUbiquitousItemUploadingErrorKey(NSURLResourceKey value) => + _NSURLUbiquitousItemUploadingErrorKey.value = value; + + /// returns whether a download of this item has already been requested with an API like -startDownloadingUbiquitousItemAtURL:error: (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemDownloadRequestedKey = + _lookup('NSURLUbiquitousItemDownloadRequestedKey'); + + NSURLResourceKey get NSURLUbiquitousItemDownloadRequestedKey => + _NSURLUbiquitousItemDownloadRequestedKey.value; + + set NSURLUbiquitousItemDownloadRequestedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadRequestedKey.value = value; + + /// returns the name of this item's container as displayed to users. + late final ffi.Pointer + _NSURLUbiquitousItemContainerDisplayNameKey = + _lookup('NSURLUbiquitousItemContainerDisplayNameKey'); + + NSURLResourceKey get NSURLUbiquitousItemContainerDisplayNameKey => + _NSURLUbiquitousItemContainerDisplayNameKey.value; + + set NSURLUbiquitousItemContainerDisplayNameKey(NSURLResourceKey value) => + _NSURLUbiquitousItemContainerDisplayNameKey.value = value; + + /// true if the item is excluded from sync, which means it is locally on disk but won't be available on the server. An excluded item is no longer ubiquitous. (Read-write, value type boolean NSNumber + late final ffi.Pointer + _NSURLUbiquitousItemIsExcludedFromSyncKey = + _lookup('NSURLUbiquitousItemIsExcludedFromSyncKey'); + + NSURLResourceKey get NSURLUbiquitousItemIsExcludedFromSyncKey => + _NSURLUbiquitousItemIsExcludedFromSyncKey.value; + + set NSURLUbiquitousItemIsExcludedFromSyncKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsExcludedFromSyncKey.value = value; + + /// true if the ubiquitous item is shared. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsSharedKey = + _lookup('NSURLUbiquitousItemIsSharedKey'); + + NSURLResourceKey get NSURLUbiquitousItemIsSharedKey => + _NSURLUbiquitousItemIsSharedKey.value; + + set NSURLUbiquitousItemIsSharedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsSharedKey.value = value; + + /// returns the current user's role for this shared item, or nil if not shared. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousSharedItemCurrentUserRoleKey = + _lookup('NSURLUbiquitousSharedItemCurrentUserRoleKey'); + + NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserRoleKey => + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value; + + set NSURLUbiquitousSharedItemCurrentUserRoleKey(NSURLResourceKey value) => + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value = value; + + /// returns the permissions for the current user, or nil if not shared. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey = + _lookup( + 'NSURLUbiquitousSharedItemCurrentUserPermissionsKey'); + + NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserPermissionsKey => + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value; + + set NSURLUbiquitousSharedItemCurrentUserPermissionsKey( + NSURLResourceKey value) => + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value = value; + + /// returns a NSPersonNameComponents, or nil if the current user. (Read-only, value type NSPersonNameComponents) + late final ffi.Pointer + _NSURLUbiquitousSharedItemOwnerNameComponentsKey = + _lookup( + 'NSURLUbiquitousSharedItemOwnerNameComponentsKey'); + + NSURLResourceKey get NSURLUbiquitousSharedItemOwnerNameComponentsKey => + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value; + + set NSURLUbiquitousSharedItemOwnerNameComponentsKey(NSURLResourceKey value) => + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value = value; + + /// returns a NSPersonNameComponents for the most recent editor of the document, or nil if it is the current user. (Read-only, value type NSPersonNameComponents) + late final ffi.Pointer + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey = + _lookup( + 'NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey'); + + NSURLResourceKey + get NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey => + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value; + + set NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey( + NSURLResourceKey value) => + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value = value; + + /// this item has not been downloaded yet. Use startDownloadingUbiquitousItemAtURL:error: to download it. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusNotDownloaded = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusNotDownloaded'); + + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusNotDownloaded => + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value; + + set NSURLUbiquitousItemDownloadingStatusNotDownloaded( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; + + /// there is a local version of this item available. The most current version will get downloaded as soon as possible. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusDownloaded = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusDownloaded'); + + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusDownloaded => + _NSURLUbiquitousItemDownloadingStatusDownloaded.value; + + set NSURLUbiquitousItemDownloadingStatusDownloaded( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusDownloaded.value = value; + + /// there is a local version of this item and it is the most up-to-date version known to this device. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusCurrent = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusCurrent'); + + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusCurrent => + _NSURLUbiquitousItemDownloadingStatusCurrent.value; + + set NSURLUbiquitousItemDownloadingStatusCurrent( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusCurrent.value = value; + + /// the current user is the owner of this shared item. + late final ffi.Pointer + _NSURLUbiquitousSharedItemRoleOwner = + _lookup( + 'NSURLUbiquitousSharedItemRoleOwner'); + + NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleOwner => + _NSURLUbiquitousSharedItemRoleOwner.value; + + set NSURLUbiquitousSharedItemRoleOwner(NSURLUbiquitousSharedItemRole value) => + _NSURLUbiquitousSharedItemRoleOwner.value = value; + + /// the current user is a participant of this shared item. + late final ffi.Pointer + _NSURLUbiquitousSharedItemRoleParticipant = + _lookup( + 'NSURLUbiquitousSharedItemRoleParticipant'); + + NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleParticipant => + _NSURLUbiquitousSharedItemRoleParticipant.value; + + set NSURLUbiquitousSharedItemRoleParticipant( + NSURLUbiquitousSharedItemRole value) => + _NSURLUbiquitousSharedItemRoleParticipant.value = value; + + /// the current user is only allowed to read this item + late final ffi.Pointer + _NSURLUbiquitousSharedItemPermissionsReadOnly = + _lookup( + 'NSURLUbiquitousSharedItemPermissionsReadOnly'); + + NSURLUbiquitousSharedItemPermissions + get NSURLUbiquitousSharedItemPermissionsReadOnly => + _NSURLUbiquitousSharedItemPermissionsReadOnly.value; + + set NSURLUbiquitousSharedItemPermissionsReadOnly( + NSURLUbiquitousSharedItemPermissions value) => + _NSURLUbiquitousSharedItemPermissionsReadOnly.value = value; + + /// the current user is allowed to both read and write this item + late final ffi.Pointer + _NSURLUbiquitousSharedItemPermissionsReadWrite = + _lookup( + 'NSURLUbiquitousSharedItemPermissionsReadWrite'); + + NSURLUbiquitousSharedItemPermissions + get NSURLUbiquitousSharedItemPermissionsReadWrite => + _NSURLUbiquitousSharedItemPermissionsReadWrite.value; + + set NSURLUbiquitousSharedItemPermissionsReadWrite( + NSURLUbiquitousSharedItemPermissions value) => + _NSURLUbiquitousSharedItemPermissionsReadWrite.value = value; + + late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); + late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); + instancetype _objc_msgSend_456( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer value, + ) { + return __objc_msgSend_456( + obj, + sel, + name, + value, + ); + } + + late final __objc_msgSend_456Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_queryItemWithName_value_1 = + _registerName1("queryItemWithName:value:"); + late final _sel_value1 = _registerName1("value"); + late final _class_NSURLComponents1 = _getClass1("NSURLComponents"); + late final _sel_initWithURL_resolvingAgainstBaseURL_1 = + _registerName1("initWithURL:resolvingAgainstBaseURL:"); + late final _sel_componentsWithURL_resolvingAgainstBaseURL_1 = + _registerName1("componentsWithURL:resolvingAgainstBaseURL:"); + late final _sel_componentsWithString_1 = + _registerName1("componentsWithString:"); + late final _sel_URLRelativeToURL_1 = _registerName1("URLRelativeToURL:"); + ffi.Pointer _objc_msgSend_457( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_457( + obj, + sel, + baseURL, + ); + } + + late final __objc_msgSend_457Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setScheme_1 = _registerName1("setScheme:"); + late final _sel_setUser_1 = _registerName1("setUser:"); + late final _sel_setPassword_1 = _registerName1("setPassword:"); + late final _sel_setHost_1 = _registerName1("setHost:"); + late final _sel_setPort_1 = _registerName1("setPort:"); + late final _sel_setPath_1 = _registerName1("setPath:"); + late final _sel_setQuery_1 = _registerName1("setQuery:"); + late final _sel_setFragment_1 = _registerName1("setFragment:"); + late final _sel_percentEncodedUser1 = _registerName1("percentEncodedUser"); + late final _sel_setPercentEncodedUser_1 = + _registerName1("setPercentEncodedUser:"); + late final _sel_percentEncodedPassword1 = + _registerName1("percentEncodedPassword"); + late final _sel_setPercentEncodedPassword_1 = + _registerName1("setPercentEncodedPassword:"); + late final _sel_percentEncodedHost1 = _registerName1("percentEncodedHost"); + late final _sel_setPercentEncodedHost_1 = + _registerName1("setPercentEncodedHost:"); + late final _sel_percentEncodedPath1 = _registerName1("percentEncodedPath"); + late final _sel_setPercentEncodedPath_1 = + _registerName1("setPercentEncodedPath:"); + late final _sel_percentEncodedQuery1 = _registerName1("percentEncodedQuery"); + late final _sel_setPercentEncodedQuery_1 = + _registerName1("setPercentEncodedQuery:"); + late final _sel_percentEncodedFragment1 = + _registerName1("percentEncodedFragment"); + late final _sel_setPercentEncodedFragment_1 = + _registerName1("setPercentEncodedFragment:"); + late final _sel_rangeOfScheme1 = _registerName1("rangeOfScheme"); + late final _sel_rangeOfUser1 = _registerName1("rangeOfUser"); + late final _sel_rangeOfPassword1 = _registerName1("rangeOfPassword"); + late final _sel_rangeOfHost1 = _registerName1("rangeOfHost"); + late final _sel_rangeOfPort1 = _registerName1("rangeOfPort"); + late final _sel_rangeOfPath1 = _registerName1("rangeOfPath"); + late final _sel_rangeOfQuery1 = _registerName1("rangeOfQuery"); + late final _sel_rangeOfFragment1 = _registerName1("rangeOfFragment"); + late final _sel_queryItems1 = _registerName1("queryItems"); + late final _sel_setQueryItems_1 = _registerName1("setQueryItems:"); + late final _sel_percentEncodedQueryItems1 = + _registerName1("percentEncodedQueryItems"); + late final _sel_setPercentEncodedQueryItems_1 = + _registerName1("setPercentEncodedQueryItems:"); + late final _class_NSFileSecurity1 = _getClass1("NSFileSecurity"); + late final _class_NSHTTPURLResponse1 = _getClass1("NSHTTPURLResponse"); + late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_1 = + _registerName1("initWithURL:statusCode:HTTPVersion:headerFields:"); + instancetype _objc_msgSend_458( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int statusCode, + ffi.Pointer HTTPVersion, + ffi.Pointer headerFields, + ) { + return __objc_msgSend_458( + obj, + sel, + url, + statusCode, + HTTPVersion, + headerFields, + ); + } + + late final __objc_msgSend_458Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_statusCode1 = _registerName1("statusCode"); + late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); + late final _sel_localizedStringForStatusCode_1 = + _registerName1("localizedStringForStatusCode:"); + ffi.Pointer _objc_msgSend_459( + ffi.Pointer obj, + ffi.Pointer sel, + int statusCode, + ) { + return __objc_msgSend_459( + obj, + sel, + statusCode, + ); + } + + late final __objc_msgSend_459Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final ffi.Pointer _NSGenericException = + _lookup('NSGenericException'); + + NSExceptionName get NSGenericException => _NSGenericException.value; + + set NSGenericException(NSExceptionName value) => + _NSGenericException.value = value; + + late final ffi.Pointer _NSRangeException = + _lookup('NSRangeException'); + + NSExceptionName get NSRangeException => _NSRangeException.value; + + set NSRangeException(NSExceptionName value) => + _NSRangeException.value = value; + + late final ffi.Pointer _NSInvalidArgumentException = + _lookup('NSInvalidArgumentException'); + + NSExceptionName get NSInvalidArgumentException => + _NSInvalidArgumentException.value; + + set NSInvalidArgumentException(NSExceptionName value) => + _NSInvalidArgumentException.value = value; + + late final ffi.Pointer _NSInternalInconsistencyException = + _lookup('NSInternalInconsistencyException'); + + NSExceptionName get NSInternalInconsistencyException => + _NSInternalInconsistencyException.value; + + set NSInternalInconsistencyException(NSExceptionName value) => + _NSInternalInconsistencyException.value = value; + + late final ffi.Pointer _NSMallocException = + _lookup('NSMallocException'); + + NSExceptionName get NSMallocException => _NSMallocException.value; + + set NSMallocException(NSExceptionName value) => + _NSMallocException.value = value; + + late final ffi.Pointer _NSObjectInaccessibleException = + _lookup('NSObjectInaccessibleException'); + + NSExceptionName get NSObjectInaccessibleException => + _NSObjectInaccessibleException.value; + + set NSObjectInaccessibleException(NSExceptionName value) => + _NSObjectInaccessibleException.value = value; + + late final ffi.Pointer _NSObjectNotAvailableException = + _lookup('NSObjectNotAvailableException'); + + NSExceptionName get NSObjectNotAvailableException => + _NSObjectNotAvailableException.value; + + set NSObjectNotAvailableException(NSExceptionName value) => + _NSObjectNotAvailableException.value = value; + + late final ffi.Pointer _NSDestinationInvalidException = + _lookup('NSDestinationInvalidException'); + + NSExceptionName get NSDestinationInvalidException => + _NSDestinationInvalidException.value; + + set NSDestinationInvalidException(NSExceptionName value) => + _NSDestinationInvalidException.value = value; + + late final ffi.Pointer _NSPortTimeoutException = + _lookup('NSPortTimeoutException'); + + NSExceptionName get NSPortTimeoutException => _NSPortTimeoutException.value; + + set NSPortTimeoutException(NSExceptionName value) => + _NSPortTimeoutException.value = value; + + late final ffi.Pointer _NSInvalidSendPortException = + _lookup('NSInvalidSendPortException'); + + NSExceptionName get NSInvalidSendPortException => + _NSInvalidSendPortException.value; + + set NSInvalidSendPortException(NSExceptionName value) => + _NSInvalidSendPortException.value = value; + + late final ffi.Pointer _NSInvalidReceivePortException = + _lookup('NSInvalidReceivePortException'); + + NSExceptionName get NSInvalidReceivePortException => + _NSInvalidReceivePortException.value; + + set NSInvalidReceivePortException(NSExceptionName value) => + _NSInvalidReceivePortException.value = value; + + late final ffi.Pointer _NSPortSendException = + _lookup('NSPortSendException'); + + NSExceptionName get NSPortSendException => _NSPortSendException.value; + + set NSPortSendException(NSExceptionName value) => + _NSPortSendException.value = value; + + late final ffi.Pointer _NSPortReceiveException = + _lookup('NSPortReceiveException'); + + NSExceptionName get NSPortReceiveException => _NSPortReceiveException.value; + + set NSPortReceiveException(NSExceptionName value) => + _NSPortReceiveException.value = value; + + late final ffi.Pointer _NSOldStyleException = + _lookup('NSOldStyleException'); + + NSExceptionName get NSOldStyleException => _NSOldStyleException.value; + + set NSOldStyleException(NSExceptionName value) => + _NSOldStyleException.value = value; + + late final ffi.Pointer _NSInconsistentArchiveException = + _lookup('NSInconsistentArchiveException'); + + NSExceptionName get NSInconsistentArchiveException => + _NSInconsistentArchiveException.value; + + set NSInconsistentArchiveException(NSExceptionName value) => + _NSInconsistentArchiveException.value = value; + + late final _class_NSException1 = _getClass1("NSException"); + late final _sel_exceptionWithName_reason_userInfo_1 = + _registerName1("exceptionWithName:reason:userInfo:"); + ffi.Pointer _objc_msgSend_460( + ffi.Pointer obj, + ffi.Pointer sel, + NSExceptionName name, + ffi.Pointer reason, + ffi.Pointer userInfo, + ) { + return __objc_msgSend_460( + obj, + sel, + name, + reason, + userInfo, + ); + } + + late final __objc_msgSend_460Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithName_reason_userInfo_1 = + _registerName1("initWithName:reason:userInfo:"); + instancetype _objc_msgSend_461( + ffi.Pointer obj, + ffi.Pointer sel, + NSExceptionName aName, + ffi.Pointer aReason, + ffi.Pointer aUserInfo, + ) { + return __objc_msgSend_461( + obj, + sel, + aName, + aReason, + aUserInfo, + ); + } + + late final __objc_msgSend_461Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSExceptionName, ffi.Pointer, ffi.Pointer)>(); + + late final _sel_reason1 = _registerName1("reason"); + late final _sel_callStackReturnAddresses1 = + _registerName1("callStackReturnAddresses"); + late final _sel_callStackSymbols1 = _registerName1("callStackSymbols"); + late final _sel_raise1 = _registerName1("raise"); + late final _sel_raise_format_1 = _registerName1("raise:format:"); + late final _sel_raise_format_arguments_1 = + _registerName1("raise:format:arguments:"); + void _objc_msgSend_462( + ffi.Pointer obj, + ffi.Pointer sel, + NSExceptionName name, + ffi.Pointer format, + va_list argList, + ) { + return __objc_msgSend_462( + obj, + sel, + name, + format, + argList, + ); + } + + late final __objc_msgSend_462Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + va_list)>>('objc_msgSend'); + late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSExceptionName, ffi.Pointer, va_list)>(); + + ffi.Pointer NSGetUncaughtExceptionHandler() { + return _NSGetUncaughtExceptionHandler(); + } + + late final _NSGetUncaughtExceptionHandlerPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer + Function()>>('NSGetUncaughtExceptionHandler'); + late final _NSGetUncaughtExceptionHandler = _NSGetUncaughtExceptionHandlerPtr + .asFunction Function()>(); + + void NSSetUncaughtExceptionHandler( + ffi.Pointer arg0, + ) { + return _NSSetUncaughtExceptionHandler( + arg0, + ); + } + + late final _NSSetUncaughtExceptionHandlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer)>>( + 'NSSetUncaughtExceptionHandler'); + late final _NSSetUncaughtExceptionHandler = _NSSetUncaughtExceptionHandlerPtr + .asFunction)>(); + + late final ffi.Pointer> _NSAssertionHandlerKey = + _lookup>('NSAssertionHandlerKey'); + + ffi.Pointer get NSAssertionHandlerKey => + _NSAssertionHandlerKey.value; + + set NSAssertionHandlerKey(ffi.Pointer value) => + _NSAssertionHandlerKey.value = value; + + late final _class_NSAssertionHandler1 = _getClass1("NSAssertionHandler"); + late final _sel_currentHandler1 = _registerName1("currentHandler"); + ffi.Pointer _objc_msgSend_463( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_463( + obj, + sel, + ); + } + + late final __objc_msgSend_463Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_handleFailureInMethod_object_file_lineNumber_description_1 = + _registerName1( + "handleFailureInMethod:object:file:lineNumber:description:"); + void _objc_msgSend_464( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer selector, + ffi.Pointer object, + ffi.Pointer fileName, + int line, + ffi.Pointer format, + ) { + return __objc_msgSend_464( + obj, + sel, + selector, + object, + fileName, + line, + format, + ); + } + + late final __objc_msgSend_464Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + + late final _sel_handleFailureInFunction_file_lineNumber_description_1 = + _registerName1("handleFailureInFunction:file:lineNumber:description:"); + void _objc_msgSend_465( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer functionName, + ffi.Pointer fileName, + int line, + ffi.Pointer format, + ) { + return __objc_msgSend_465( + obj, + sel, + functionName, + fileName, + line, + format, + ); + } + + late final __objc_msgSend_465Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + + late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); + late final _sel_blockOperationWithBlock_1 = + _registerName1("blockOperationWithBlock:"); + instancetype _objc_msgSend_466( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_466( + obj, + sel, + block, + ); + } + + late final __objc_msgSend_466Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_addExecutionBlock_1 = _registerName1("addExecutionBlock:"); + late final _sel_executionBlocks1 = _registerName1("executionBlocks"); + late final _class_NSInvocationOperation1 = + _getClass1("NSInvocationOperation"); + late final _sel_initWithTarget_selector_object_1 = + _registerName1("initWithTarget:selector:object:"); + instancetype _objc_msgSend_467( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer sel1, + ffi.Pointer arg, + ) { + return __objc_msgSend_467( + obj, + sel, + target, + sel1, + arg, + ); + } + + late final __objc_msgSend_467Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); + instancetype _objc_msgSend_468( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer inv, + ) { + return __objc_msgSend_468( + obj, + sel, + inv, + ); + } + + late final __objc_msgSend_468Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_invocation1 = _registerName1("invocation"); + ffi.Pointer _objc_msgSend_469( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_469( + obj, + sel, + ); + } + + late final __objc_msgSend_469Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_result1 = _registerName1("result"); + late final ffi.Pointer + _NSInvocationOperationVoidResultException = + _lookup('NSInvocationOperationVoidResultException'); + + NSExceptionName get NSInvocationOperationVoidResultException => + _NSInvocationOperationVoidResultException.value; + + set NSInvocationOperationVoidResultException(NSExceptionName value) => + _NSInvocationOperationVoidResultException.value = value; + + late final ffi.Pointer + _NSInvocationOperationCancelledException = + _lookup('NSInvocationOperationCancelledException'); + + NSExceptionName get NSInvocationOperationCancelledException => + _NSInvocationOperationCancelledException.value; + + set NSInvocationOperationCancelledException(NSExceptionName value) => + _NSInvocationOperationCancelledException.value = value; + + late final ffi.Pointer + _NSOperationQueueDefaultMaxConcurrentOperationCount = + _lookup('NSOperationQueueDefaultMaxConcurrentOperationCount'); + + int get NSOperationQueueDefaultMaxConcurrentOperationCount => + _NSOperationQueueDefaultMaxConcurrentOperationCount.value; + + set NSOperationQueueDefaultMaxConcurrentOperationCount(int value) => + _NSOperationQueueDefaultMaxConcurrentOperationCount.value = value; + + /// Predefined domain for errors from most AppKit and Foundation APIs. + late final ffi.Pointer _NSCocoaErrorDomain = + _lookup('NSCocoaErrorDomain'); + + NSErrorDomain get NSCocoaErrorDomain => _NSCocoaErrorDomain.value; + + set NSCocoaErrorDomain(NSErrorDomain value) => + _NSCocoaErrorDomain.value = value; + + /// Other predefined domains; value of "code" will correspond to preexisting values in these domains. + late final ffi.Pointer _NSPOSIXErrorDomain = + _lookup('NSPOSIXErrorDomain'); + + NSErrorDomain get NSPOSIXErrorDomain => _NSPOSIXErrorDomain.value; + + set NSPOSIXErrorDomain(NSErrorDomain value) => + _NSPOSIXErrorDomain.value = value; + + late final ffi.Pointer _NSOSStatusErrorDomain = + _lookup('NSOSStatusErrorDomain'); + + NSErrorDomain get NSOSStatusErrorDomain => _NSOSStatusErrorDomain.value; + + set NSOSStatusErrorDomain(NSErrorDomain value) => + _NSOSStatusErrorDomain.value = value; + + late final ffi.Pointer _NSMachErrorDomain = + _lookup('NSMachErrorDomain'); + + NSErrorDomain get NSMachErrorDomain => _NSMachErrorDomain.value; + + set NSMachErrorDomain(NSErrorDomain value) => + _NSMachErrorDomain.value = value; + + /// Key in userInfo. A recommended standard way to embed NSErrors from underlying calls. The value of this key should be an NSError. + late final ffi.Pointer _NSUnderlyingErrorKey = + _lookup('NSUnderlyingErrorKey'); + + NSErrorUserInfoKey get NSUnderlyingErrorKey => _NSUnderlyingErrorKey.value; + + set NSUnderlyingErrorKey(NSErrorUserInfoKey value) => + _NSUnderlyingErrorKey.value = value; + + /// Key in userInfo. A recommended standard way to embed a list of several NSErrors from underlying calls. The value of this key should be an NSArray of NSError. This value is independent from the value of `NSUnderlyingErrorKey` - neither, one, or both may be set. + late final ffi.Pointer _NSMultipleUnderlyingErrorsKey = + _lookup('NSMultipleUnderlyingErrorsKey'); + + NSErrorUserInfoKey get NSMultipleUnderlyingErrorsKey => + _NSMultipleUnderlyingErrorsKey.value; + + set NSMultipleUnderlyingErrorsKey(NSErrorUserInfoKey value) => + _NSMultipleUnderlyingErrorsKey.value = value; + + /// NSString, a complete sentence (or more) describing ideally both what failed and why it failed. + late final ffi.Pointer _NSLocalizedDescriptionKey = + _lookup('NSLocalizedDescriptionKey'); + + NSErrorUserInfoKey get NSLocalizedDescriptionKey => + _NSLocalizedDescriptionKey.value; + + set NSLocalizedDescriptionKey(NSErrorUserInfoKey value) => + _NSLocalizedDescriptionKey.value = value; + + /// NSString, a complete sentence (or more) describing why the operation failed. + late final ffi.Pointer _NSLocalizedFailureReasonErrorKey = + _lookup('NSLocalizedFailureReasonErrorKey'); + + NSErrorUserInfoKey get NSLocalizedFailureReasonErrorKey => + _NSLocalizedFailureReasonErrorKey.value; + + set NSLocalizedFailureReasonErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedFailureReasonErrorKey.value = value; + + /// NSString, a complete sentence (or more) describing what the user can do to fix the problem. + late final ffi.Pointer + _NSLocalizedRecoverySuggestionErrorKey = + _lookup('NSLocalizedRecoverySuggestionErrorKey'); + + NSErrorUserInfoKey get NSLocalizedRecoverySuggestionErrorKey => + _NSLocalizedRecoverySuggestionErrorKey.value; + + set NSLocalizedRecoverySuggestionErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedRecoverySuggestionErrorKey.value = value; + + /// NSArray of NSStrings corresponding to button titles. + late final ffi.Pointer + _NSLocalizedRecoveryOptionsErrorKey = + _lookup('NSLocalizedRecoveryOptionsErrorKey'); + + NSErrorUserInfoKey get NSLocalizedRecoveryOptionsErrorKey => + _NSLocalizedRecoveryOptionsErrorKey.value; + + set NSLocalizedRecoveryOptionsErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedRecoveryOptionsErrorKey.value = value; + + /// Instance of a subclass of NSObject that conforms to the NSErrorRecoveryAttempting informal protocol + late final ffi.Pointer _NSRecoveryAttempterErrorKey = + _lookup('NSRecoveryAttempterErrorKey'); + + NSErrorUserInfoKey get NSRecoveryAttempterErrorKey => + _NSRecoveryAttempterErrorKey.value; + + set NSRecoveryAttempterErrorKey(NSErrorUserInfoKey value) => + _NSRecoveryAttempterErrorKey.value = value; + + /// NSString containing a help anchor + late final ffi.Pointer _NSHelpAnchorErrorKey = + _lookup('NSHelpAnchorErrorKey'); + + NSErrorUserInfoKey get NSHelpAnchorErrorKey => _NSHelpAnchorErrorKey.value; + + set NSHelpAnchorErrorKey(NSErrorUserInfoKey value) => + _NSHelpAnchorErrorKey.value = value; + + /// NSString. This provides a string which will be shown when constructing the debugDescription of the NSError, to be used when debugging or when formatting the error with %@. This string will never be used in localizedDescription, so will not be shown to the user. + late final ffi.Pointer _NSDebugDescriptionErrorKey = + _lookup('NSDebugDescriptionErrorKey'); + + NSErrorUserInfoKey get NSDebugDescriptionErrorKey => + _NSDebugDescriptionErrorKey.value; + + set NSDebugDescriptionErrorKey(NSErrorUserInfoKey value) => + _NSDebugDescriptionErrorKey.value = value; + + /// NSString, a complete sentence (or more) describing what failed. Setting a value for this key in userInfo dictionary of errors received from framework APIs is a good way to customize and fine tune the localizedDescription of an NSError. As an example, for Foundation error code NSFileWriteOutOfSpaceError, setting the value of this key to "The image library could not be saved." will allow the localizedDescription of the error to come out as "The image library could not be saved. The volume Macintosh HD is out of space." rather than the default (say) “You can't save the file ImgDatabaseV2 because the volume Macintosh HD is out of space." + late final ffi.Pointer _NSLocalizedFailureErrorKey = + _lookup('NSLocalizedFailureErrorKey'); + + NSErrorUserInfoKey get NSLocalizedFailureErrorKey => + _NSLocalizedFailureErrorKey.value; + + set NSLocalizedFailureErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedFailureErrorKey.value = value; + + /// NSNumber containing NSStringEncoding + late final ffi.Pointer _NSStringEncodingErrorKey = + _lookup('NSStringEncodingErrorKey'); + + NSErrorUserInfoKey get NSStringEncodingErrorKey => + _NSStringEncodingErrorKey.value; + + set NSStringEncodingErrorKey(NSErrorUserInfoKey value) => + _NSStringEncodingErrorKey.value = value; + + /// NSURL + late final ffi.Pointer _NSURLErrorKey = + _lookup('NSURLErrorKey'); + + NSErrorUserInfoKey get NSURLErrorKey => _NSURLErrorKey.value; + + set NSURLErrorKey(NSErrorUserInfoKey value) => _NSURLErrorKey.value = value; + + /// NSString + late final ffi.Pointer _NSFilePathErrorKey = + _lookup('NSFilePathErrorKey'); + + NSErrorUserInfoKey get NSFilePathErrorKey => _NSFilePathErrorKey.value; + + set NSFilePathErrorKey(NSErrorUserInfoKey value) => + _NSFilePathErrorKey.value = value; + + /// Is this an error handle? + /// + /// Requires there to be a current isolate. + bool Dart_IsError( + Object handle, + ) { + return _Dart_IsError( + handle, + ); + } + + late final _Dart_IsErrorPtr = + _lookup>( + 'Dart_IsError'); + late final _Dart_IsError = + _Dart_IsErrorPtr.asFunction(); + + /// Is this an api error handle? + /// + /// Api error handles are produced when an api function is misused. + /// This happens when a Dart embedding api function is called with + /// invalid arguments or in an invalid context. + /// + /// Requires there to be a current isolate. + bool Dart_IsApiError( + Object handle, + ) { + return _Dart_IsApiError( + handle, + ); + } + + late final _Dart_IsApiErrorPtr = + _lookup>( + 'Dart_IsApiError'); + late final _Dart_IsApiError = + _Dart_IsApiErrorPtr.asFunction(); + + /// Is this an unhandled exception error handle? + /// + /// Unhandled exception error handles are produced when, during the + /// execution of Dart code, an exception is thrown but not caught. + /// This can occur in any function which triggers the execution of Dart + /// code. + /// + /// See Dart_ErrorGetException and Dart_ErrorGetStackTrace. + /// + /// Requires there to be a current isolate. + bool Dart_IsUnhandledExceptionError( + Object handle, + ) { + return _Dart_IsUnhandledExceptionError( + handle, + ); + } + + late final _Dart_IsUnhandledExceptionErrorPtr = + _lookup>( + 'Dart_IsUnhandledExceptionError'); + late final _Dart_IsUnhandledExceptionError = + _Dart_IsUnhandledExceptionErrorPtr.asFunction(); + + /// Is this a compilation error handle? + /// + /// Compilation error handles are produced when, during the execution + /// of Dart code, a compile-time error occurs. This can occur in any + /// function which triggers the execution of Dart code. + /// + /// Requires there to be a current isolate. + bool Dart_IsCompilationError( + Object handle, + ) { + return _Dart_IsCompilationError( + handle, + ); + } + + late final _Dart_IsCompilationErrorPtr = + _lookup>( + 'Dart_IsCompilationError'); + late final _Dart_IsCompilationError = + _Dart_IsCompilationErrorPtr.asFunction(); + + /// Is this a fatal error handle? + /// + /// Fatal error handles are produced when the system wants to shut down + /// the current isolate. + /// + /// Requires there to be a current isolate. + bool Dart_IsFatalError( + Object handle, + ) { + return _Dart_IsFatalError( + handle, + ); + } + + late final _Dart_IsFatalErrorPtr = + _lookup>( + 'Dart_IsFatalError'); + late final _Dart_IsFatalError = + _Dart_IsFatalErrorPtr.asFunction(); + + /// Gets the error message from an error handle. + /// + /// Requires there to be a current isolate. + /// + /// \return A C string containing an error message if the handle is + /// error. An empty C string ("") if the handle is valid. This C + /// String is scope allocated and is only valid until the next call + /// to Dart_ExitScope. + ffi.Pointer Dart_GetError( + Object handle, + ) { + return _Dart_GetError( + handle, + ); + } + + late final _Dart_GetErrorPtr = + _lookup Function(ffi.Handle)>>( + 'Dart_GetError'); + late final _Dart_GetError = + _Dart_GetErrorPtr.asFunction Function(Object)>(); + + /// Is this an error handle for an unhandled exception? + bool Dart_ErrorHasException( + Object handle, + ) { + return _Dart_ErrorHasException( + handle, + ); + } + + late final _Dart_ErrorHasExceptionPtr = + _lookup>( + 'Dart_ErrorHasException'); + late final _Dart_ErrorHasException = + _Dart_ErrorHasExceptionPtr.asFunction(); + + /// Gets the exception Object from an unhandled exception error handle. + Object Dart_ErrorGetException( + Object handle, + ) { + return _Dart_ErrorGetException( + handle, + ); + } + + late final _Dart_ErrorGetExceptionPtr = + _lookup>( + 'Dart_ErrorGetException'); + late final _Dart_ErrorGetException = + _Dart_ErrorGetExceptionPtr.asFunction(); + + /// Gets the stack trace Object from an unhandled exception error handle. + Object Dart_ErrorGetStackTrace( + Object handle, + ) { + return _Dart_ErrorGetStackTrace( + handle, + ); + } + + late final _Dart_ErrorGetStackTracePtr = + _lookup>( + 'Dart_ErrorGetStackTrace'); + late final _Dart_ErrorGetStackTrace = + _Dart_ErrorGetStackTracePtr.asFunction(); + + /// Produces an api error handle with the provided error message. + /// + /// Requires there to be a current isolate. + /// + /// \param error the error message. + Object Dart_NewApiError( + ffi.Pointer error, + ) { + return _Dart_NewApiError( + error, + ); + } + + late final _Dart_NewApiErrorPtr = + _lookup)>>( + 'Dart_NewApiError'); + late final _Dart_NewApiError = + _Dart_NewApiErrorPtr.asFunction)>(); + + Object Dart_NewCompilationError( + ffi.Pointer error, + ) { + return _Dart_NewCompilationError( + error, + ); + } + + late final _Dart_NewCompilationErrorPtr = + _lookup)>>( + 'Dart_NewCompilationError'); + late final _Dart_NewCompilationError = _Dart_NewCompilationErrorPtr + .asFunction)>(); + + /// Produces a new unhandled exception error handle. + /// + /// Requires there to be a current isolate. + /// + /// \param exception An instance of a Dart object to be thrown or + /// an ApiError or CompilationError handle. + /// When an ApiError or CompilationError handle is passed in + /// a string object of the error message is created and it becomes + /// the Dart object to be thrown. + Object Dart_NewUnhandledExceptionError( + Object exception, + ) { + return _Dart_NewUnhandledExceptionError( + exception, + ); + } + + late final _Dart_NewUnhandledExceptionErrorPtr = + _lookup>( + 'Dart_NewUnhandledExceptionError'); + late final _Dart_NewUnhandledExceptionError = + _Dart_NewUnhandledExceptionErrorPtr.asFunction(); + + /// Propagates an error. + /// + /// If the provided handle is an unhandled exception error, this + /// function will cause the unhandled exception to be rethrown. This + /// will proceed in the standard way, walking up Dart frames until an + /// appropriate 'catch' block is found, executing 'finally' blocks, + /// etc. + /// + /// If the error is not an unhandled exception error, we will unwind + /// the stack to the next C frame. Intervening Dart frames will be + /// discarded; specifically, 'finally' blocks will not execute. This + /// is the standard way that compilation errors (and the like) are + /// handled by the Dart runtime. + /// + /// In either case, when an error is propagated any current scopes + /// created by Dart_EnterScope will be exited. + /// + /// See the additional discussion under "Propagating Errors" at the + /// beginning of this file. + /// + /// \param An error handle (See Dart_IsError) + /// + /// \return On success, this function does not return. On failure, the + /// process is terminated. + void Dart_PropagateError( + Object handle, + ) { + return _Dart_PropagateError( + handle, + ); + } + + late final _Dart_PropagateErrorPtr = + _lookup>( + 'Dart_PropagateError'); + late final _Dart_PropagateError = + _Dart_PropagateErrorPtr.asFunction(); + + /// Converts an object to a string. + /// + /// May generate an unhandled exception error. + /// + /// \return The converted string if no error occurs during + /// the conversion. If an error does occur, an error handle is + /// returned. + Object Dart_ToString( + Object object, + ) { + return _Dart_ToString( + object, + ); + } + + late final _Dart_ToStringPtr = + _lookup>( + 'Dart_ToString'); + late final _Dart_ToString = + _Dart_ToStringPtr.asFunction(); + + /// Checks to see if two handles refer to identically equal objects. + /// + /// If both handles refer to instances, this is equivalent to using the top-level + /// function identical() from dart:core. Otherwise, returns whether the two + /// argument handles refer to the same object. + /// + /// \param obj1 An object to be compared. + /// \param obj2 An object to be compared. + /// + /// \return True if the objects are identically equal. False otherwise. + bool Dart_IdentityEquals( + Object obj1, + Object obj2, + ) { + return _Dart_IdentityEquals( + obj1, + obj2, + ); + } + + late final _Dart_IdentityEqualsPtr = + _lookup>( + 'Dart_IdentityEquals'); + late final _Dart_IdentityEquals = + _Dart_IdentityEqualsPtr.asFunction(); + + /// Allocates a handle in the current scope from a persistent handle. + Object Dart_HandleFromPersistent( + Object object, + ) { + return _Dart_HandleFromPersistent( + object, + ); + } + + late final _Dart_HandleFromPersistentPtr = + _lookup>( + 'Dart_HandleFromPersistent'); + late final _Dart_HandleFromPersistent = + _Dart_HandleFromPersistentPtr.asFunction(); + + /// Allocates a handle in the current scope from a weak persistent handle. + /// + /// This will be a handle to Dart_Null if the object has been garbage collected. + Object Dart_HandleFromWeakPersistent( + Dart_WeakPersistentHandle object, + ) { + return _Dart_HandleFromWeakPersistent( + object, + ); + } + + late final _Dart_HandleFromWeakPersistentPtr = _lookup< + ffi.NativeFunction>( + 'Dart_HandleFromWeakPersistent'); + late final _Dart_HandleFromWeakPersistent = _Dart_HandleFromWeakPersistentPtr + .asFunction(); + + /// Allocates a persistent handle for an object. + /// + /// This handle has the lifetime of the current isolate unless it is + /// explicitly deallocated by calling Dart_DeletePersistentHandle. + /// + /// Requires there to be a current isolate. + Object Dart_NewPersistentHandle( + Object object, + ) { + return _Dart_NewPersistentHandle( + object, + ); + } + + late final _Dart_NewPersistentHandlePtr = + _lookup>( + 'Dart_NewPersistentHandle'); + late final _Dart_NewPersistentHandle = + _Dart_NewPersistentHandlePtr.asFunction(); + + /// Assign value of local handle to a persistent handle. + /// + /// Requires there to be a current isolate. + /// + /// \param obj1 A persistent handle whose value needs to be set. + /// \param obj2 An object whose value needs to be set to the persistent handle. + /// + /// \return Success if the persistent handle was set + /// Otherwise, returns an error. + void Dart_SetPersistentHandle( + Object obj1, + Object obj2, + ) { + return _Dart_SetPersistentHandle( + obj1, + obj2, + ); + } + + late final _Dart_SetPersistentHandlePtr = + _lookup>( + 'Dart_SetPersistentHandle'); + late final _Dart_SetPersistentHandle = + _Dart_SetPersistentHandlePtr.asFunction(); + + /// Deallocates a persistent handle. + /// + /// Requires there to be a current isolate group. + void Dart_DeletePersistentHandle( + Object object, + ) { + return _Dart_DeletePersistentHandle( + object, + ); + } + + late final _Dart_DeletePersistentHandlePtr = + _lookup>( + 'Dart_DeletePersistentHandle'); + late final _Dart_DeletePersistentHandle = + _Dart_DeletePersistentHandlePtr.asFunction(); + + /// Allocates a weak persistent handle for an object. + /// + /// This handle has the lifetime of the current isolate. The handle can also be + /// explicitly deallocated by calling Dart_DeleteWeakPersistentHandle. + /// + /// If the object becomes unreachable the callback is invoked with the peer as + /// argument. The callback can be executed on any thread, will have a current + /// isolate group, but will not have a current isolate. The callback can only + /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. This + /// gives the embedder the ability to cleanup data associated with the object. + /// The handle will point to the Dart_Null object after the finalizer has been + /// run. It is illegal to call into the VM with any other Dart_* functions from + /// the callback. If the handle is deleted before the object becomes + /// unreachable, the callback is never invoked. + /// + /// Requires there to be a current isolate. + /// + /// \param object An object with identity. + /// \param peer A pointer to a native object or NULL. This value is + /// provided to callback when it is invoked. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A function pointer that will be invoked sometime + /// after the object is garbage collected, unless the handle has been deleted. + /// A valid callback needs to be specified it cannot be NULL. + /// + /// \return The weak persistent handle or NULL. NULL is returned in case of bad + /// parameters. + Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle( + Object object, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewWeakPersistentHandle( + object, + peer, + external_allocation_size, + callback, + ); + } + + late final _Dart_NewWeakPersistentHandlePtr = _lookup< + ffi.NativeFunction< + Dart_WeakPersistentHandle Function( + ffi.Handle, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewWeakPersistentHandle'); + late final _Dart_NewWeakPersistentHandle = + _Dart_NewWeakPersistentHandlePtr.asFunction< + Dart_WeakPersistentHandle Function( + Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); + + /// Deletes the given weak persistent [object] handle. + /// + /// Requires there to be a current isolate group. + void Dart_DeleteWeakPersistentHandle( + Dart_WeakPersistentHandle object, + ) { + return _Dart_DeleteWeakPersistentHandle( + object, + ); + } + + late final _Dart_DeleteWeakPersistentHandlePtr = + _lookup>( + 'Dart_DeleteWeakPersistentHandle'); + late final _Dart_DeleteWeakPersistentHandle = + _Dart_DeleteWeakPersistentHandlePtr.asFunction< + void Function(Dart_WeakPersistentHandle)>(); + + /// Updates the external memory size for the given weak persistent handle. + /// + /// May trigger garbage collection. + void Dart_UpdateExternalSize( + Dart_WeakPersistentHandle object, + int external_allocation_size, + ) { + return _Dart_UpdateExternalSize( + object, + external_allocation_size, + ); + } + + late final _Dart_UpdateExternalSizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(Dart_WeakPersistentHandle, + ffi.IntPtr)>>('Dart_UpdateExternalSize'); + late final _Dart_UpdateExternalSize = _Dart_UpdateExternalSizePtr.asFunction< + void Function(Dart_WeakPersistentHandle, int)>(); + + /// Allocates a finalizable handle for an object. + /// + /// This handle has the lifetime of the current isolate group unless the object + /// pointed to by the handle is garbage collected, in this case the VM + /// automatically deletes the handle after invoking the callback associated + /// with the handle. The handle can also be explicitly deallocated by + /// calling Dart_DeleteFinalizableHandle. + /// + /// If the object becomes unreachable the callback is invoked with the + /// the peer as argument. The callback can be executed on any thread, will have + /// an isolate group, but will not have a current isolate. The callback can only + /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. + /// This gives the embedder the ability to cleanup data associated with the + /// object and clear out any cached references to the handle. All references to + /// this handle after the callback will be invalid. It is illegal to call into + /// the VM with any other Dart_* functions from the callback. If the handle is + /// deleted before the object becomes unreachable, the callback is never + /// invoked. + /// + /// Requires there to be a current isolate. + /// + /// \param object An object with identity. + /// \param peer A pointer to a native object or NULL. This value is + /// provided to callback when it is invoked. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A function pointer that will be invoked sometime + /// after the object is garbage collected, unless the handle has been deleted. + /// A valid callback needs to be specified it cannot be NULL. + /// + /// \return The finalizable handle or NULL. NULL is returned in case of bad + /// parameters. + Dart_FinalizableHandle Dart_NewFinalizableHandle( + Object object, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewFinalizableHandle( + object, + peer, + external_allocation_size, + callback, + ); + } + + late final _Dart_NewFinalizableHandlePtr = _lookup< + ffi.NativeFunction< + Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, + ffi.IntPtr, Dart_HandleFinalizer)>>('Dart_NewFinalizableHandle'); + late final _Dart_NewFinalizableHandle = + _Dart_NewFinalizableHandlePtr.asFunction< + Dart_FinalizableHandle Function( + Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); + + /// Deletes the given finalizable [object] handle. + /// + /// The caller has to provide the actual Dart object the handle was created from + /// to prove the object (and therefore the finalizable handle) is still alive. + /// + /// Requires there to be a current isolate. + void Dart_DeleteFinalizableHandle( + Dart_FinalizableHandle object, + Object strong_ref_to_object, + ) { + return _Dart_DeleteFinalizableHandle( + object, + strong_ref_to_object, + ); + } + + late final _Dart_DeleteFinalizableHandlePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(Dart_FinalizableHandle, + ffi.Handle)>>('Dart_DeleteFinalizableHandle'); + late final _Dart_DeleteFinalizableHandle = _Dart_DeleteFinalizableHandlePtr + .asFunction(); + + /// Updates the external memory size for the given finalizable handle. + /// + /// The caller has to provide the actual Dart object the handle was created from + /// to prove the object (and therefore the finalizable handle) is still alive. + /// + /// May trigger garbage collection. + void Dart_UpdateFinalizableExternalSize( + Dart_FinalizableHandle object, + Object strong_ref_to_object, + int external_allocation_size, + ) { + return _Dart_UpdateFinalizableExternalSize( + object, + strong_ref_to_object, + external_allocation_size, + ); + } + + late final _Dart_UpdateFinalizableExternalSizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, + ffi.IntPtr)>>('Dart_UpdateFinalizableExternalSize'); + late final _Dart_UpdateFinalizableExternalSize = + _Dart_UpdateFinalizableExternalSizePtr.asFunction< + void Function(Dart_FinalizableHandle, Object, int)>(); + + /// Gets the version string for the Dart VM. + /// + /// The version of the Dart VM can be accessed without initializing the VM. + /// + /// \return The version string for the embedded Dart VM. + ffi.Pointer Dart_VersionString() { + return _Dart_VersionString(); + } + + late final _Dart_VersionStringPtr = + _lookup Function()>>( + 'Dart_VersionString'); + late final _Dart_VersionString = + _Dart_VersionStringPtr.asFunction Function()>(); + + /// Initialize Dart_IsolateFlags with correct version and default values. + void Dart_IsolateFlagsInitialize( + ffi.Pointer flags, + ) { + return _Dart_IsolateFlagsInitialize( + flags, + ); + } + + late final _Dart_IsolateFlagsInitializePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer)>>('Dart_IsolateFlagsInitialize'); + late final _Dart_IsolateFlagsInitialize = _Dart_IsolateFlagsInitializePtr + .asFunction)>(); + + /// Initializes the VM. + /// + /// \param params A struct containing initialization information. The version + /// field of the struct must be DART_INITIALIZE_PARAMS_CURRENT_VERSION. + /// + /// \return NULL if initialization is successful. Returns an error message + /// otherwise. The caller is responsible for freeing the error message. + ffi.Pointer Dart_Initialize( + ffi.Pointer params, + ) { + return _Dart_Initialize( + params, + ); + } + + late final _Dart_InitializePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('Dart_Initialize'); + late final _Dart_Initialize = _Dart_InitializePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); + + /// Cleanup state in the VM before process termination. + /// + /// \return NULL if cleanup is successful. Returns an error message otherwise. + /// The caller is responsible for freeing the error message. + /// + /// NOTE: This function must not be called on a thread that was created by the VM + /// itself. + ffi.Pointer Dart_Cleanup() { + return _Dart_Cleanup(); + } + + late final _Dart_CleanupPtr = + _lookup Function()>>( + 'Dart_Cleanup'); + late final _Dart_Cleanup = + _Dart_CleanupPtr.asFunction Function()>(); + + /// Sets command line flags. Should be called before Dart_Initialize. + /// + /// \param argc The length of the arguments array. + /// \param argv An array of arguments. + /// + /// \return NULL if successful. Returns an error message otherwise. + /// The caller is responsible for freeing the error message. + /// + /// NOTE: This call does not store references to the passed in c-strings. + ffi.Pointer Dart_SetVMFlags( + int argc, + ffi.Pointer> argv, + ) { + return _Dart_SetVMFlags( + argc, + argv, + ); + } + + late final _Dart_SetVMFlagsPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int, ffi.Pointer>)>>('Dart_SetVMFlags'); + late final _Dart_SetVMFlags = _Dart_SetVMFlagsPtr.asFunction< + ffi.Pointer Function( + int, ffi.Pointer>)>(); + + /// Returns true if the named VM flag is of boolean type, specified, and set to + /// true. + /// + /// \param flag_name The name of the flag without leading punctuation + /// (example: "enable_asserts"). + bool Dart_IsVMFlagSet( + ffi.Pointer flag_name, + ) { + return _Dart_IsVMFlagSet( + flag_name, + ); + } + + late final _Dart_IsVMFlagSetPtr = + _lookup)>>( + 'Dart_IsVMFlagSet'); + late final _Dart_IsVMFlagSet = + _Dart_IsVMFlagSetPtr.asFunction)>(); + + /// Creates a new isolate. The new isolate becomes the current isolate. + /// + /// A snapshot can be used to restore the VM quickly to a saved state + /// and is useful for fast startup. If snapshot data is provided, the + /// isolate will be started using that snapshot data. Requires a core snapshot or + /// an app snapshot created by Dart_CreateSnapshot or + /// Dart_CreatePrecompiledSnapshot* from a VM with the same version. + /// + /// Requires there to be no current isolate. + /// + /// \param script_uri The main source file or snapshot this isolate will load. + /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child + /// isolate is created by Isolate.spawn. The embedder should use a URI that + /// allows it to load the same program into such a child isolate. + /// \param name A short name for the isolate to improve debugging messages. + /// Typically of the format 'foo.dart:main()'. + /// \param isolate_snapshot_data + /// \param isolate_snapshot_instructions Buffers containing a snapshot of the + /// isolate or NULL if no snapshot is provided. If provided, the buffers must + /// remain valid until the isolate shuts down. + /// \param flags Pointer to VM specific flags or NULL for default flags. + /// \param isolate_group_data Embedder group data. This data can be obtained + /// by calling Dart_IsolateGroupData and will be passed to the + /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and + /// Dart_IsolateGroupCleanupCallback. + /// \param isolate_data Embedder data. This data will be passed to + /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from + /// this parent isolate. + /// \param error Returns NULL if creation is successful, an error message + /// otherwise. The caller is responsible for calling free() on the error + /// message. + /// + /// \return The new isolate on success, or NULL if isolate creation failed. + Dart_Isolate Dart_CreateIsolateGroup( + ffi.Pointer script_uri, + ffi.Pointer name, + ffi.Pointer isolate_snapshot_data, + ffi.Pointer isolate_snapshot_instructions, + ffi.Pointer flags, + ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data, + ffi.Pointer> error, + ) { + return _Dart_CreateIsolateGroup( + script_uri, + name, + isolate_snapshot_data, + isolate_snapshot_instructions, + flags, + isolate_group_data, + isolate_data, + error, + ); + } + + late final _Dart_CreateIsolateGroupPtr = _lookup< + ffi.NativeFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('Dart_CreateIsolateGroup'); + late final _Dart_CreateIsolateGroup = _Dart_CreateIsolateGroupPtr.asFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + /// Creates a new isolate inside the isolate group of [group_member]. + /// + /// Requires there to be no current isolate. + /// + /// \param group_member An isolate from the same group into which the newly created + /// isolate should be born into. Other threads may not have entered / enter this + /// member isolate. + /// \param name A short name for the isolate for debugging purposes. + /// \param shutdown_callback A callback to be called when the isolate is being + /// shutdown (may be NULL). + /// \param cleanup_callback A callback to be called when the isolate is being + /// cleaned up (may be NULL). + /// \param isolate_data The embedder-specific data associated with this isolate. + /// \param error Set to NULL if creation is successful, set to an error + /// message otherwise. The caller is responsible for calling free() on the + /// error message. + /// + /// \return The newly created isolate on success, or NULL if isolate creation + /// failed. + /// + /// If successful, the newly created isolate will become the current isolate. + Dart_Isolate Dart_CreateIsolateInGroup( + Dart_Isolate group_member, + ffi.Pointer name, + Dart_IsolateShutdownCallback shutdown_callback, + Dart_IsolateCleanupCallback cleanup_callback, + ffi.Pointer child_isolate_data, + ffi.Pointer> error, + ) { + return _Dart_CreateIsolateInGroup( + group_member, + name, + shutdown_callback, + cleanup_callback, + child_isolate_data, + error, + ); + } + + late final _Dart_CreateIsolateInGroupPtr = _lookup< + ffi.NativeFunction< + Dart_Isolate Function( + Dart_Isolate, + ffi.Pointer, + Dart_IsolateShutdownCallback, + Dart_IsolateCleanupCallback, + ffi.Pointer, + ffi.Pointer>)>>( + 'Dart_CreateIsolateInGroup'); + late final _Dart_CreateIsolateInGroup = + _Dart_CreateIsolateInGroupPtr.asFunction< + Dart_Isolate Function( + Dart_Isolate, + ffi.Pointer, + Dart_IsolateShutdownCallback, + Dart_IsolateCleanupCallback, + ffi.Pointer, + ffi.Pointer>)>(); + + /// Creates a new isolate from a Dart Kernel file. The new isolate + /// becomes the current isolate. + /// + /// Requires there to be no current isolate. + /// + /// \param script_uri The main source file or snapshot this isolate will load. + /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child + /// isolate is created by Isolate.spawn. The embedder should use a URI that + /// allows it to load the same program into such a child isolate. + /// \param name A short name for the isolate to improve debugging messages. + /// Typically of the format 'foo.dart:main()'. + /// \param kernel_buffer + /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must + /// remain valid until isolate shutdown. + /// \param flags Pointer to VM specific flags or NULL for default flags. + /// \param isolate_group_data Embedder group data. This data can be obtained + /// by calling Dart_IsolateGroupData and will be passed to the + /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and + /// Dart_IsolateGroupCleanupCallback. + /// \param isolate_data Embedder data. This data will be passed to + /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from + /// this parent isolate. + /// \param error Returns NULL if creation is successful, an error message + /// otherwise. The caller is responsible for calling free() on the error + /// message. + /// + /// \return The new isolate on success, or NULL if isolate creation failed. + Dart_Isolate Dart_CreateIsolateGroupFromKernel( + ffi.Pointer script_uri, + ffi.Pointer name, + ffi.Pointer kernel_buffer, + int kernel_buffer_size, + ffi.Pointer flags, + ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data, + ffi.Pointer> error, + ) { + return _Dart_CreateIsolateGroupFromKernel( + script_uri, + name, + kernel_buffer, + kernel_buffer_size, + flags, + isolate_group_data, + isolate_data, + error, + ); + } + + late final _Dart_CreateIsolateGroupFromKernelPtr = _lookup< + ffi.NativeFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>( + 'Dart_CreateIsolateGroupFromKernel'); + late final _Dart_CreateIsolateGroupFromKernel = + _Dart_CreateIsolateGroupFromKernelPtr.asFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + + /// Shuts down the current isolate. After this call, the current isolate is NULL. + /// Any current scopes created by Dart_EnterScope will be exited. Invokes the + /// shutdown callback and any callbacks of remaining weak persistent handles. + /// + /// Requires there to be a current isolate. + void Dart_ShutdownIsolate() { + return _Dart_ShutdownIsolate(); + } + + late final _Dart_ShutdownIsolatePtr = + _lookup>('Dart_ShutdownIsolate'); + late final _Dart_ShutdownIsolate = + _Dart_ShutdownIsolatePtr.asFunction(); + + /// Returns the current isolate. Will return NULL if there is no + /// current isolate. + Dart_Isolate Dart_CurrentIsolate() { + return _Dart_CurrentIsolate(); + } + + late final _Dart_CurrentIsolatePtr = + _lookup>( + 'Dart_CurrentIsolate'); + late final _Dart_CurrentIsolate = + _Dart_CurrentIsolatePtr.asFunction(); + + /// Returns the callback data associated with the current isolate. This + /// data was set when the isolate got created or initialized. + ffi.Pointer Dart_CurrentIsolateData() { + return _Dart_CurrentIsolateData(); + } + + late final _Dart_CurrentIsolateDataPtr = + _lookup Function()>>( + 'Dart_CurrentIsolateData'); + late final _Dart_CurrentIsolateData = _Dart_CurrentIsolateDataPtr.asFunction< + ffi.Pointer Function()>(); + + /// Returns the callback data associated with the given isolate. This + /// data was set when the isolate got created or initialized. + ffi.Pointer Dart_IsolateData( + Dart_Isolate isolate, + ) { + return _Dart_IsolateData( + isolate, + ); + } + + late final _Dart_IsolateDataPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateData'); + late final _Dart_IsolateData = _Dart_IsolateDataPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); + + /// Returns the current isolate group. Will return NULL if there is no + /// current isolate group. + Dart_IsolateGroup Dart_CurrentIsolateGroup() { + return _Dart_CurrentIsolateGroup(); + } + + late final _Dart_CurrentIsolateGroupPtr = + _lookup>( + 'Dart_CurrentIsolateGroup'); + late final _Dart_CurrentIsolateGroup = + _Dart_CurrentIsolateGroupPtr.asFunction(); + + /// Returns the callback data associated with the current isolate group. This + /// data was passed to the isolate group when it was created. + ffi.Pointer Dart_CurrentIsolateGroupData() { + return _Dart_CurrentIsolateGroupData(); + } + + late final _Dart_CurrentIsolateGroupDataPtr = + _lookup Function()>>( + 'Dart_CurrentIsolateGroupData'); + late final _Dart_CurrentIsolateGroupData = _Dart_CurrentIsolateGroupDataPtr + .asFunction Function()>(); + + /// Returns the callback data associated with the specified isolate group. This + /// data was passed to the isolate when it was created. + /// The embedder is responsible for ensuring the consistency of this data + /// with respect to the lifecycle of an isolate group. + ffi.Pointer Dart_IsolateGroupData( + Dart_Isolate isolate, + ) { + return _Dart_IsolateGroupData( + isolate, + ); + } + + late final _Dart_IsolateGroupDataPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateGroupData'); + late final _Dart_IsolateGroupData = _Dart_IsolateGroupDataPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); + + /// Returns the debugging name for the current isolate. + /// + /// This name is unique to each isolate and should only be used to make + /// debugging messages more comprehensible. + Object Dart_DebugName() { + return _Dart_DebugName(); + } + + late final _Dart_DebugNamePtr = + _lookup>('Dart_DebugName'); + late final _Dart_DebugName = + _Dart_DebugNamePtr.asFunction(); + + /// Returns the ID for an isolate which is used to query the service protocol. + /// + /// It is the responsibility of the caller to free the returned ID. + ffi.Pointer Dart_IsolateServiceId( + Dart_Isolate isolate, + ) { + return _Dart_IsolateServiceId( + isolate, + ); + } + + late final _Dart_IsolateServiceIdPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateServiceId'); + late final _Dart_IsolateServiceId = _Dart_IsolateServiceIdPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); + + /// Enters an isolate. After calling this function, + /// the current isolate will be set to the provided isolate. + /// + /// Requires there to be no current isolate. Multiple threads may not be in + /// the same isolate at once. + void Dart_EnterIsolate( + Dart_Isolate isolate, + ) { + return _Dart_EnterIsolate( + isolate, + ); + } + + late final _Dart_EnterIsolatePtr = + _lookup>( + 'Dart_EnterIsolate'); + late final _Dart_EnterIsolate = + _Dart_EnterIsolatePtr.asFunction(); + + /// Kills the given isolate. + /// + /// This function has the same effect as dart:isolate's + /// Isolate.kill(priority:immediate). + /// It can interrupt ordinary Dart code but not native code. If the isolate is + /// in the middle of a long running native function, the isolate will not be + /// killed until control returns to Dart. + /// + /// Does not require a current isolate. It is safe to kill the current isolate if + /// there is one. + void Dart_KillIsolate( + Dart_Isolate isolate, + ) { + return _Dart_KillIsolate( + isolate, + ); + } + + late final _Dart_KillIsolatePtr = + _lookup>( + 'Dart_KillIsolate'); + late final _Dart_KillIsolate = + _Dart_KillIsolatePtr.asFunction(); + + /// Notifies the VM that the embedder expects |size| bytes of memory have become + /// unreachable. The VM may use this hint to adjust the garbage collector's + /// growth policy. + /// + /// Multiple calls are interpreted as increasing, not replacing, the estimate of + /// unreachable memory. + /// + /// Requires there to be a current isolate. + void Dart_HintFreed( + int size, + ) { + return _Dart_HintFreed( + size, + ); + } + + late final _Dart_HintFreedPtr = + _lookup>( + 'Dart_HintFreed'); + late final _Dart_HintFreed = + _Dart_HintFreedPtr.asFunction(); + + /// Notifies the VM that the embedder expects to be idle until |deadline|. The VM + /// may use this time to perform garbage collection or other tasks to avoid + /// delays during execution of Dart code in the future. + /// + /// |deadline| is measured in microseconds against the system's monotonic time. + /// This clock can be accessed via Dart_TimelineGetMicros(). + /// + /// Requires there to be a current isolate. + void Dart_NotifyIdle( + int deadline, + ) { + return _Dart_NotifyIdle( + deadline, + ); + } + + late final _Dart_NotifyIdlePtr = + _lookup>( + 'Dart_NotifyIdle'); + late final _Dart_NotifyIdle = + _Dart_NotifyIdlePtr.asFunction(); + + /// Notifies the VM that the system is running low on memory. + /// + /// Does not require a current isolate. Only valid after calling Dart_Initialize. + void Dart_NotifyLowMemory() { + return _Dart_NotifyLowMemory(); + } + + late final _Dart_NotifyLowMemoryPtr = + _lookup>('Dart_NotifyLowMemory'); + late final _Dart_NotifyLowMemory = + _Dart_NotifyLowMemoryPtr.asFunction(); + + /// Starts the CPU sampling profiler. + void Dart_StartProfiling() { + return _Dart_StartProfiling(); + } + + late final _Dart_StartProfilingPtr = + _lookup>('Dart_StartProfiling'); + late final _Dart_StartProfiling = + _Dart_StartProfilingPtr.asFunction(); + + /// Stops the CPU sampling profiler. + /// + /// Note that some profile samples might still be taken after this fucntion + /// returns due to the asynchronous nature of the implementation on some + /// platforms. + void Dart_StopProfiling() { + return _Dart_StopProfiling(); + } + + late final _Dart_StopProfilingPtr = + _lookup>('Dart_StopProfiling'); + late final _Dart_StopProfiling = + _Dart_StopProfilingPtr.asFunction(); + + /// Notifies the VM that the current thread should not be profiled until a + /// matching call to Dart_ThreadEnableProfiling is made. + /// + /// NOTE: By default, if a thread has entered an isolate it will be profiled. + /// This function should be used when an embedder knows a thread is about + /// to make a blocking call and wants to avoid unnecessary interrupts by + /// the profiler. + void Dart_ThreadDisableProfiling() { + return _Dart_ThreadDisableProfiling(); + } + + late final _Dart_ThreadDisableProfilingPtr = + _lookup>( + 'Dart_ThreadDisableProfiling'); + late final _Dart_ThreadDisableProfiling = + _Dart_ThreadDisableProfilingPtr.asFunction(); + + /// Notifies the VM that the current thread should be profiled. + /// + /// NOTE: It is only legal to call this function *after* calling + /// Dart_ThreadDisableProfiling. + /// + /// NOTE: By default, if a thread has entered an isolate it will be profiled. + void Dart_ThreadEnableProfiling() { + return _Dart_ThreadEnableProfiling(); + } + + late final _Dart_ThreadEnableProfilingPtr = + _lookup>( + 'Dart_ThreadEnableProfiling'); + late final _Dart_ThreadEnableProfiling = + _Dart_ThreadEnableProfilingPtr.asFunction(); + + /// Register symbol information for the Dart VM's profiler and crash dumps. + /// + /// This consumes the output of //topaz/runtime/dart/profiler_symbols, which + /// should be treated as opaque. + void Dart_AddSymbols( + ffi.Pointer dso_name, + ffi.Pointer buffer, + int buffer_size, + ) { + return _Dart_AddSymbols( + dso_name, + buffer, + buffer_size, + ); + } + + late final _Dart_AddSymbolsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.IntPtr)>>('Dart_AddSymbols'); + late final _Dart_AddSymbols = _Dart_AddSymbolsPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + /// Exits an isolate. After this call, Dart_CurrentIsolate will + /// return NULL. + /// + /// Requires there to be a current isolate. + void Dart_ExitIsolate() { + return _Dart_ExitIsolate(); + } + + late final _Dart_ExitIsolatePtr = + _lookup>('Dart_ExitIsolate'); + late final _Dart_ExitIsolate = + _Dart_ExitIsolatePtr.asFunction(); + + /// Creates a full snapshot of the current isolate heap. + /// + /// A full snapshot is a compact representation of the dart vm isolate heap + /// and dart isolate heap states. These snapshots are used to initialize + /// the vm isolate on startup and fast initialization of an isolate. + /// A Snapshot of the heap is created before any dart code has executed. + /// + /// Requires there to be a current isolate. Not available in the precompiled + /// runtime (check Dart_IsPrecompiledRuntime). + /// + /// \param buffer Returns a pointer to a buffer containing the + /// snapshot. This buffer is scope allocated and is only valid + /// until the next call to Dart_ExitScope. + /// \param size Returns the size of the buffer. + /// \param is_core Create a snapshot containing core libraries. + /// Such snapshot should be agnostic to null safety mode. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateSnapshot( + ffi.Pointer> vm_snapshot_data_buffer, + ffi.Pointer vm_snapshot_data_size, + ffi.Pointer> isolate_snapshot_data_buffer, + ffi.Pointer isolate_snapshot_data_size, + bool is_core, + ) { + return _Dart_CreateSnapshot( + vm_snapshot_data_buffer, + vm_snapshot_data_size, + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + is_core, + ); + } + + late final _Dart_CreateSnapshotPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Bool)>>('Dart_CreateSnapshot'); + late final _Dart_CreateSnapshot = _Dart_CreateSnapshotPtr.asFunction< + Object Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + bool)>(); + + /// Returns whether the buffer contains a kernel file. + /// + /// \param buffer Pointer to a buffer that might contain a kernel binary. + /// \param buffer_size Size of the buffer. + /// + /// \return Whether the buffer contains a kernel binary (full or partial). + bool Dart_IsKernel( + ffi.Pointer buffer, + int buffer_size, + ) { + return _Dart_IsKernel( + buffer, + buffer_size, + ); + } + + late final _Dart_IsKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_IsKernel'); + late final _Dart_IsKernel = _Dart_IsKernelPtr.asFunction< + bool Function(ffi.Pointer, int)>(); + + /// Make isolate runnable. + /// + /// When isolates are spawned, this function is used to indicate that + /// the creation and initialization (including script loading) of the + /// isolate is complete and the isolate can start. + /// This function expects there to be no current isolate. + /// + /// \param isolate The isolate to be made runnable. + /// + /// \return NULL if successful. Returns an error message otherwise. The caller + /// is responsible for freeing the error message. + ffi.Pointer Dart_IsolateMakeRunnable( + Dart_Isolate isolate, + ) { + return _Dart_IsolateMakeRunnable( + isolate, + ); + } + + late final _Dart_IsolateMakeRunnablePtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateMakeRunnable'); + late final _Dart_IsolateMakeRunnable = _Dart_IsolateMakeRunnablePtr + .asFunction Function(Dart_Isolate)>(); + + /// Allows embedders to provide an alternative wakeup mechanism for the + /// delivery of inter-isolate messages. This setting only applies to + /// the current isolate. + /// + /// Most embedders will only call this function once, before isolate + /// execution begins. If this function is called after isolate + /// execution begins, the embedder is responsible for threading issues. + void Dart_SetMessageNotifyCallback( + Dart_MessageNotifyCallback message_notify_callback, + ) { + return _Dart_SetMessageNotifyCallback( + message_notify_callback, + ); + } + + late final _Dart_SetMessageNotifyCallbackPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetMessageNotifyCallback'); + late final _Dart_SetMessageNotifyCallback = _Dart_SetMessageNotifyCallbackPtr + .asFunction(); + + /// Query the current message notify callback for the isolate. + /// + /// \return The current message notify callback for the isolate. + Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback() { + return _Dart_GetMessageNotifyCallback(); + } + + late final _Dart_GetMessageNotifyCallbackPtr = + _lookup>( + 'Dart_GetMessageNotifyCallback'); + late final _Dart_GetMessageNotifyCallback = _Dart_GetMessageNotifyCallbackPtr + .asFunction(); + + /// If the VM flag `--pause-isolates-on-start` was passed this will be true. + /// + /// \return A boolean value indicating if pause on start was requested. + bool Dart_ShouldPauseOnStart() { + return _Dart_ShouldPauseOnStart(); + } + + late final _Dart_ShouldPauseOnStartPtr = + _lookup>( + 'Dart_ShouldPauseOnStart'); + late final _Dart_ShouldPauseOnStart = + _Dart_ShouldPauseOnStartPtr.asFunction(); + + /// Override the VM flag `--pause-isolates-on-start` for the current isolate. + /// + /// \param should_pause Should the isolate be paused on start? + /// + /// NOTE: This must be called before Dart_IsolateMakeRunnable. + void Dart_SetShouldPauseOnStart( + bool should_pause, + ) { + return _Dart_SetShouldPauseOnStart( + should_pause, + ); + } + + late final _Dart_SetShouldPauseOnStartPtr = + _lookup>( + 'Dart_SetShouldPauseOnStart'); + late final _Dart_SetShouldPauseOnStart = + _Dart_SetShouldPauseOnStartPtr.asFunction(); + + /// Is the current isolate paused on start? + /// + /// \return A boolean value indicating if the isolate is paused on start. + bool Dart_IsPausedOnStart() { + return _Dart_IsPausedOnStart(); + } + + late final _Dart_IsPausedOnStartPtr = + _lookup>('Dart_IsPausedOnStart'); + late final _Dart_IsPausedOnStart = + _Dart_IsPausedOnStartPtr.asFunction(); + + /// Called when the embedder has paused the current isolate on start and when + /// the embedder has resumed the isolate. + /// + /// \param paused Is the isolate paused on start? + void Dart_SetPausedOnStart( + bool paused, + ) { + return _Dart_SetPausedOnStart( + paused, + ); + } + + late final _Dart_SetPausedOnStartPtr = + _lookup>( + 'Dart_SetPausedOnStart'); + late final _Dart_SetPausedOnStart = + _Dart_SetPausedOnStartPtr.asFunction(); + + /// If the VM flag `--pause-isolates-on-exit` was passed this will be true. + /// + /// \return A boolean value indicating if pause on exit was requested. + bool Dart_ShouldPauseOnExit() { + return _Dart_ShouldPauseOnExit(); + } + + late final _Dart_ShouldPauseOnExitPtr = + _lookup>( + 'Dart_ShouldPauseOnExit'); + late final _Dart_ShouldPauseOnExit = + _Dart_ShouldPauseOnExitPtr.asFunction(); + + /// Override the VM flag `--pause-isolates-on-exit` for the current isolate. + /// + /// \param should_pause Should the isolate be paused on exit? + void Dart_SetShouldPauseOnExit( + bool should_pause, + ) { + return _Dart_SetShouldPauseOnExit( + should_pause, + ); + } + + late final _Dart_SetShouldPauseOnExitPtr = + _lookup>( + 'Dart_SetShouldPauseOnExit'); + late final _Dart_SetShouldPauseOnExit = + _Dart_SetShouldPauseOnExitPtr.asFunction(); + + /// Is the current isolate paused on exit? + /// + /// \return A boolean value indicating if the isolate is paused on exit. + bool Dart_IsPausedOnExit() { + return _Dart_IsPausedOnExit(); + } + + late final _Dart_IsPausedOnExitPtr = + _lookup>('Dart_IsPausedOnExit'); + late final _Dart_IsPausedOnExit = + _Dart_IsPausedOnExitPtr.asFunction(); + + /// Called when the embedder has paused the current isolate on exit and when + /// the embedder has resumed the isolate. + /// + /// \param paused Is the isolate paused on exit? + void Dart_SetPausedOnExit( + bool paused, + ) { + return _Dart_SetPausedOnExit( + paused, + ); + } + + late final _Dart_SetPausedOnExitPtr = + _lookup>( + 'Dart_SetPausedOnExit'); + late final _Dart_SetPausedOnExit = + _Dart_SetPausedOnExitPtr.asFunction(); + + /// Called when the embedder has caught a top level unhandled exception error + /// in the current isolate. + /// + /// NOTE: It is illegal to call this twice on the same isolate without first + /// clearing the sticky error to null. + /// + /// \param error The unhandled exception error. + void Dart_SetStickyError( + Object error, + ) { + return _Dart_SetStickyError( + error, + ); + } + + late final _Dart_SetStickyErrorPtr = + _lookup>( + 'Dart_SetStickyError'); + late final _Dart_SetStickyError = + _Dart_SetStickyErrorPtr.asFunction(); + + /// Does the current isolate have a sticky error? + bool Dart_HasStickyError() { + return _Dart_HasStickyError(); + } + + late final _Dart_HasStickyErrorPtr = + _lookup>('Dart_HasStickyError'); + late final _Dart_HasStickyError = + _Dart_HasStickyErrorPtr.asFunction(); + + /// Gets the sticky error for the current isolate. + /// + /// \return A handle to the sticky error object or null. + Object Dart_GetStickyError() { + return _Dart_GetStickyError(); + } + + late final _Dart_GetStickyErrorPtr = + _lookup>('Dart_GetStickyError'); + late final _Dart_GetStickyError = + _Dart_GetStickyErrorPtr.asFunction(); + + /// Handles the next pending message for the current isolate. + /// + /// May generate an unhandled exception error. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_HandleMessage() { + return _Dart_HandleMessage(); + } + + late final _Dart_HandleMessagePtr = + _lookup>('Dart_HandleMessage'); + late final _Dart_HandleMessage = + _Dart_HandleMessagePtr.asFunction(); + + /// Drains the microtask queue, then blocks the calling thread until the current + /// isolate recieves a message, then handles all messages. + /// + /// \param timeout_millis When non-zero, the call returns after the indicated + /// number of milliseconds even if no message was received. + /// \return A valid handle if no error occurs, otherwise an error handle. + Object Dart_WaitForEvent( + int timeout_millis, + ) { + return _Dart_WaitForEvent( + timeout_millis, + ); + } + + late final _Dart_WaitForEventPtr = + _lookup>( + 'Dart_WaitForEvent'); + late final _Dart_WaitForEvent = + _Dart_WaitForEventPtr.asFunction(); + + /// Handles any pending messages for the vm service for the current + /// isolate. + /// + /// This function may be used by an embedder at a breakpoint to avoid + /// pausing the vm service. + /// + /// This function can indirectly cause the message notify callback to + /// be called. + /// + /// \return true if the vm service requests the program resume + /// execution, false otherwise + bool Dart_HandleServiceMessages() { + return _Dart_HandleServiceMessages(); + } + + late final _Dart_HandleServiceMessagesPtr = + _lookup>( + 'Dart_HandleServiceMessages'); + late final _Dart_HandleServiceMessages = + _Dart_HandleServiceMessagesPtr.asFunction(); + + /// Does the current isolate have pending service messages? + /// + /// \return true if the isolate has pending service messages, false otherwise. + bool Dart_HasServiceMessages() { + return _Dart_HasServiceMessages(); + } + + late final _Dart_HasServiceMessagesPtr = + _lookup>( + 'Dart_HasServiceMessages'); + late final _Dart_HasServiceMessages = + _Dart_HasServiceMessagesPtr.asFunction(); + + /// Processes any incoming messages for the current isolate. + /// + /// This function may only be used when the embedder has not provided + /// an alternate message delivery mechanism with + /// Dart_SetMessageCallbacks. It is provided for convenience. + /// + /// This function waits for incoming messages for the current + /// isolate. As new messages arrive, they are handled using + /// Dart_HandleMessage. The routine exits when all ports to the + /// current isolate are closed. + /// + /// \return A valid handle if the run loop exited successfully. If an + /// exception or other error occurs while processing messages, an + /// error handle is returned. + Object Dart_RunLoop() { + return _Dart_RunLoop(); + } + + late final _Dart_RunLoopPtr = + _lookup>('Dart_RunLoop'); + late final _Dart_RunLoop = _Dart_RunLoopPtr.asFunction(); + + /// Lets the VM run message processing for the isolate. + /// + /// This function expects there to a current isolate and the current isolate + /// must not have an active api scope. The VM will take care of making the + /// isolate runnable (if not already), handles its message loop and will take + /// care of shutting the isolate down once it's done. + /// + /// \param errors_are_fatal Whether uncaught errors should be fatal. + /// \param on_error_port A port to notify on uncaught errors (or ILLEGAL_PORT). + /// \param on_exit_port A port to notify on exit (or ILLEGAL_PORT). + /// \param error A non-NULL pointer which will hold an error message if the call + /// fails. The error has to be free()ed by the caller. + /// + /// \return If successfull the VM takes owernship of the isolate and takes care + /// of its message loop. If not successful the caller retains owernship of the + /// isolate. + bool Dart_RunLoopAsync( + bool errors_are_fatal, + int on_error_port, + int on_exit_port, + ffi.Pointer> error, + ) { + return _Dart_RunLoopAsync( + errors_are_fatal, + on_error_port, + on_exit_port, + error, + ); + } + + late final _Dart_RunLoopAsyncPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Bool, Dart_Port, Dart_Port, + ffi.Pointer>)>>('Dart_RunLoopAsync'); + late final _Dart_RunLoopAsync = _Dart_RunLoopAsyncPtr.asFunction< + bool Function(bool, int, int, ffi.Pointer>)>(); + + /// Gets the main port id for the current isolate. + int Dart_GetMainPortId() { + return _Dart_GetMainPortId(); + } + + late final _Dart_GetMainPortIdPtr = + _lookup>('Dart_GetMainPortId'); + late final _Dart_GetMainPortId = + _Dart_GetMainPortIdPtr.asFunction(); + + /// Does the current isolate have live ReceivePorts? + /// + /// A ReceivePort is live when it has not been closed. + bool Dart_HasLivePorts() { + return _Dart_HasLivePorts(); + } + + late final _Dart_HasLivePortsPtr = + _lookup>('Dart_HasLivePorts'); + late final _Dart_HasLivePorts = + _Dart_HasLivePortsPtr.asFunction(); + + /// Posts a message for some isolate. The message is a serialized + /// object. + /// + /// Requires there to be a current isolate. + /// + /// \param port The destination port. + /// \param object An object from the current isolate. + /// + /// \return True if the message was posted. + bool Dart_Post( + int port_id, + Object object, + ) { + return _Dart_Post( + port_id, + object, + ); + } + + late final _Dart_PostPtr = + _lookup>( + 'Dart_Post'); + late final _Dart_Post = + _Dart_PostPtr.asFunction(); + + /// Returns a new SendPort with the provided port id. + /// + /// \param port_id The destination port. + /// + /// \return A new SendPort if no errors occurs. Otherwise returns + /// an error handle. + Object Dart_NewSendPort( + int port_id, + ) { + return _Dart_NewSendPort( + port_id, + ); + } + + late final _Dart_NewSendPortPtr = + _lookup>( + 'Dart_NewSendPort'); + late final _Dart_NewSendPort = + _Dart_NewSendPortPtr.asFunction(); + + /// Gets the SendPort id for the provided SendPort. + /// \param port A SendPort object whose id is desired. + /// \param port_id Returns the id of the SendPort. + /// \return Success if no error occurs. Otherwise returns + /// an error handle. + Object Dart_SendPortGetId( + Object port, + ffi.Pointer port_id, + ) { + return _Dart_SendPortGetId( + port, + port_id, + ); + } + + late final _Dart_SendPortGetIdPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_SendPortGetId'); + late final _Dart_SendPortGetId = _Dart_SendPortGetIdPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Enters a new scope. + /// + /// All new local handles will be created in this scope. Additionally, + /// some functions may return "scope allocated" memory which is only + /// valid within this scope. + /// + /// Requires there to be a current isolate. + void Dart_EnterScope() { + return _Dart_EnterScope(); + } + + late final _Dart_EnterScopePtr = + _lookup>('Dart_EnterScope'); + late final _Dart_EnterScope = + _Dart_EnterScopePtr.asFunction(); + + /// Exits a scope. + /// + /// The previous scope (if any) becomes the current scope. + /// + /// Requires there to be a current isolate. + void Dart_ExitScope() { + return _Dart_ExitScope(); + } + + late final _Dart_ExitScopePtr = + _lookup>('Dart_ExitScope'); + late final _Dart_ExitScope = _Dart_ExitScopePtr.asFunction(); + + /// The Dart VM uses "zone allocation" for temporary structures. Zones + /// support very fast allocation of small chunks of memory. The chunks + /// cannot be deallocated individually, but instead zones support + /// deallocating all chunks in one fast operation. + /// + /// This function makes it possible for the embedder to allocate + /// temporary data in the VMs zone allocator. + /// + /// Zone allocation is possible: + /// 1. when inside a scope where local handles can be allocated + /// 2. when processing a message from a native port in a native port + /// handler + /// + /// All the memory allocated this way will be reclaimed either on the + /// next call to Dart_ExitScope or when the native port handler exits. + /// + /// \param size Size of the memory to allocate. + /// + /// \return A pointer to the allocated memory. NULL if allocation + /// failed. Failure might due to is no current VM zone. + ffi.Pointer Dart_ScopeAllocate( + int size, + ) { + return _Dart_ScopeAllocate( + size, + ); + } + + late final _Dart_ScopeAllocatePtr = + _lookup Function(ffi.IntPtr)>>( + 'Dart_ScopeAllocate'); + late final _Dart_ScopeAllocate = + _Dart_ScopeAllocatePtr.asFunction Function(int)>(); + + /// Returns the null object. + /// + /// \return A handle to the null object. + Object Dart_Null() { + return _Dart_Null(); + } + + late final _Dart_NullPtr = + _lookup>('Dart_Null'); + late final _Dart_Null = _Dart_NullPtr.asFunction(); + + /// Is this object null? + bool Dart_IsNull( + Object object, + ) { + return _Dart_IsNull( + object, + ); + } + + late final _Dart_IsNullPtr = + _lookup>('Dart_IsNull'); + late final _Dart_IsNull = _Dart_IsNullPtr.asFunction(); + + /// Returns the empty string object. + /// + /// \return A handle to the empty string object. + Object Dart_EmptyString() { + return _Dart_EmptyString(); + } + + late final _Dart_EmptyStringPtr = + _lookup>('Dart_EmptyString'); + late final _Dart_EmptyString = + _Dart_EmptyStringPtr.asFunction(); + + /// Returns types that are not classes, and which therefore cannot be looked up + /// as library members by Dart_GetType. + /// + /// \return A handle to the dynamic, void or Never type. + Object Dart_TypeDynamic() { + return _Dart_TypeDynamic(); + } + + late final _Dart_TypeDynamicPtr = + _lookup>('Dart_TypeDynamic'); + late final _Dart_TypeDynamic = + _Dart_TypeDynamicPtr.asFunction(); + + Object Dart_TypeVoid() { + return _Dart_TypeVoid(); + } + + late final _Dart_TypeVoidPtr = + _lookup>('Dart_TypeVoid'); + late final _Dart_TypeVoid = _Dart_TypeVoidPtr.asFunction(); + + Object Dart_TypeNever() { + return _Dart_TypeNever(); + } + + late final _Dart_TypeNeverPtr = + _lookup>('Dart_TypeNever'); + late final _Dart_TypeNever = + _Dart_TypeNeverPtr.asFunction(); + + /// Checks if the two objects are equal. + /// + /// The result of the comparison is returned through the 'equal' + /// parameter. The return value itself is used to indicate success or + /// failure, not equality. + /// + /// May generate an unhandled exception error. + /// + /// \param obj1 An object to be compared. + /// \param obj2 An object to be compared. + /// \param equal Returns the result of the equality comparison. + /// + /// \return A valid handle if no error occurs during the comparison. + Object Dart_ObjectEquals( + Object obj1, + Object obj2, + ffi.Pointer equal, + ) { + return _Dart_ObjectEquals( + obj1, + obj2, + equal, + ); + } + + late final _Dart_ObjectEqualsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Pointer)>>('Dart_ObjectEquals'); + late final _Dart_ObjectEquals = _Dart_ObjectEqualsPtr.asFunction< + Object Function(Object, Object, ffi.Pointer)>(); + + /// Is this object an instance of some type? + /// + /// The result of the test is returned through the 'instanceof' parameter. + /// The return value itself is used to indicate success or failure. + /// + /// \param object An object. + /// \param type A type. + /// \param instanceof Return true if 'object' is an instance of type 'type'. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_ObjectIsType( + Object object, + Object type, + ffi.Pointer instanceof, + ) { + return _Dart_ObjectIsType( + object, + type, + instanceof, + ); + } + + late final _Dart_ObjectIsTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Pointer)>>('Dart_ObjectIsType'); + late final _Dart_ObjectIsType = _Dart_ObjectIsTypePtr.asFunction< + Object Function(Object, Object, ffi.Pointer)>(); + + /// Query object type. + /// + /// \param object Some Object. + /// + /// \return true if Object is of the specified type. + bool Dart_IsInstance( + Object object, + ) { + return _Dart_IsInstance( + object, + ); + } + + late final _Dart_IsInstancePtr = + _lookup>( + 'Dart_IsInstance'); + late final _Dart_IsInstance = + _Dart_IsInstancePtr.asFunction(); + + bool Dart_IsNumber( + Object object, + ) { + return _Dart_IsNumber( + object, + ); + } + + late final _Dart_IsNumberPtr = + _lookup>( + 'Dart_IsNumber'); + late final _Dart_IsNumber = + _Dart_IsNumberPtr.asFunction(); + + bool Dart_IsInteger( + Object object, + ) { + return _Dart_IsInteger( + object, + ); + } + + late final _Dart_IsIntegerPtr = + _lookup>( + 'Dart_IsInteger'); + late final _Dart_IsInteger = + _Dart_IsIntegerPtr.asFunction(); + + bool Dart_IsDouble( + Object object, + ) { + return _Dart_IsDouble( + object, + ); + } + + late final _Dart_IsDoublePtr = + _lookup>( + 'Dart_IsDouble'); + late final _Dart_IsDouble = + _Dart_IsDoublePtr.asFunction(); + + bool Dart_IsBoolean( + Object object, + ) { + return _Dart_IsBoolean( + object, + ); + } + + late final _Dart_IsBooleanPtr = + _lookup>( + 'Dart_IsBoolean'); + late final _Dart_IsBoolean = + _Dart_IsBooleanPtr.asFunction(); + + bool Dart_IsString( + Object object, + ) { + return _Dart_IsString( + object, + ); + } + + late final _Dart_IsStringPtr = + _lookup>( + 'Dart_IsString'); + late final _Dart_IsString = + _Dart_IsStringPtr.asFunction(); + + bool Dart_IsStringLatin1( + Object object, + ) { + return _Dart_IsStringLatin1( + object, + ); + } + + late final _Dart_IsStringLatin1Ptr = + _lookup>( + 'Dart_IsStringLatin1'); + late final _Dart_IsStringLatin1 = + _Dart_IsStringLatin1Ptr.asFunction(); + + bool Dart_IsExternalString( + Object object, + ) { + return _Dart_IsExternalString( + object, + ); + } + + late final _Dart_IsExternalStringPtr = + _lookup>( + 'Dart_IsExternalString'); + late final _Dart_IsExternalString = + _Dart_IsExternalStringPtr.asFunction(); + + bool Dart_IsList( + Object object, + ) { + return _Dart_IsList( + object, + ); + } + + late final _Dart_IsListPtr = + _lookup>('Dart_IsList'); + late final _Dart_IsList = _Dart_IsListPtr.asFunction(); + + bool Dart_IsMap( + Object object, + ) { + return _Dart_IsMap( + object, + ); + } + + late final _Dart_IsMapPtr = + _lookup>('Dart_IsMap'); + late final _Dart_IsMap = _Dart_IsMapPtr.asFunction(); + + bool Dart_IsLibrary( + Object object, + ) { + return _Dart_IsLibrary( + object, + ); + } + + late final _Dart_IsLibraryPtr = + _lookup>( + 'Dart_IsLibrary'); + late final _Dart_IsLibrary = + _Dart_IsLibraryPtr.asFunction(); + + bool Dart_IsType( + Object handle, + ) { + return _Dart_IsType( + handle, + ); + } + + late final _Dart_IsTypePtr = + _lookup>('Dart_IsType'); + late final _Dart_IsType = _Dart_IsTypePtr.asFunction(); + + bool Dart_IsFunction( + Object handle, + ) { + return _Dart_IsFunction( + handle, + ); + } + + late final _Dart_IsFunctionPtr = + _lookup>( + 'Dart_IsFunction'); + late final _Dart_IsFunction = + _Dart_IsFunctionPtr.asFunction(); + + bool Dart_IsVariable( + Object handle, + ) { + return _Dart_IsVariable( + handle, + ); + } + + late final _Dart_IsVariablePtr = + _lookup>( + 'Dart_IsVariable'); + late final _Dart_IsVariable = + _Dart_IsVariablePtr.asFunction(); + + bool Dart_IsTypeVariable( + Object handle, + ) { + return _Dart_IsTypeVariable( + handle, + ); + } + + late final _Dart_IsTypeVariablePtr = + _lookup>( + 'Dart_IsTypeVariable'); + late final _Dart_IsTypeVariable = + _Dart_IsTypeVariablePtr.asFunction(); + + bool Dart_IsClosure( + Object object, + ) { + return _Dart_IsClosure( + object, + ); + } + + late final _Dart_IsClosurePtr = + _lookup>( + 'Dart_IsClosure'); + late final _Dart_IsClosure = + _Dart_IsClosurePtr.asFunction(); + + bool Dart_IsTypedData( + Object object, + ) { + return _Dart_IsTypedData( + object, + ); + } + + late final _Dart_IsTypedDataPtr = + _lookup>( + 'Dart_IsTypedData'); + late final _Dart_IsTypedData = + _Dart_IsTypedDataPtr.asFunction(); + + bool Dart_IsByteBuffer( + Object object, + ) { + return _Dart_IsByteBuffer( + object, + ); + } + + late final _Dart_IsByteBufferPtr = + _lookup>( + 'Dart_IsByteBuffer'); + late final _Dart_IsByteBuffer = + _Dart_IsByteBufferPtr.asFunction(); + + bool Dart_IsFuture( + Object object, + ) { + return _Dart_IsFuture( + object, + ); + } + + late final _Dart_IsFuturePtr = + _lookup>( + 'Dart_IsFuture'); + late final _Dart_IsFuture = + _Dart_IsFuturePtr.asFunction(); + + /// Gets the type of a Dart language object. + /// + /// \param instance Some Dart object. + /// + /// \return If no error occurs, the type is returned. Otherwise an + /// error handle is returned. + Object Dart_InstanceGetType( + Object instance, + ) { + return _Dart_InstanceGetType( + instance, + ); + } + + late final _Dart_InstanceGetTypePtr = + _lookup>( + 'Dart_InstanceGetType'); + late final _Dart_InstanceGetType = + _Dart_InstanceGetTypePtr.asFunction(); + + /// Returns the name for the provided class type. + /// + /// \return A valid string handle if no error occurs during the + /// operation. + Object Dart_ClassName( + Object cls_type, + ) { + return _Dart_ClassName( + cls_type, + ); + } + + late final _Dart_ClassNamePtr = + _lookup>( + 'Dart_ClassName'); + late final _Dart_ClassName = + _Dart_ClassNamePtr.asFunction(); + + /// Returns the name for the provided function or method. + /// + /// \return A valid string handle if no error occurs during the + /// operation. + Object Dart_FunctionName( + Object function, + ) { + return _Dart_FunctionName( + function, + ); + } + + late final _Dart_FunctionNamePtr = + _lookup>( + 'Dart_FunctionName'); + late final _Dart_FunctionName = + _Dart_FunctionNamePtr.asFunction(); + + /// Returns a handle to the owner of a function. + /// + /// The owner of an instance method or a static method is its defining + /// class. The owner of a top-level function is its defining + /// library. The owner of the function of a non-implicit closure is the + /// function of the method or closure that defines the non-implicit + /// closure. + /// + /// \return A valid handle to the owner of the function, or an error + /// handle if the argument is not a valid handle to a function. + Object Dart_FunctionOwner( + Object function, + ) { + return _Dart_FunctionOwner( + function, + ); + } + + late final _Dart_FunctionOwnerPtr = + _lookup>( + 'Dart_FunctionOwner'); + late final _Dart_FunctionOwner = + _Dart_FunctionOwnerPtr.asFunction(); + + /// Determines whether a function handle referes to a static function + /// of method. + /// + /// For the purposes of the embedding API, a top-level function is + /// implicitly declared static. + /// + /// \param function A handle to a function or method declaration. + /// \param is_static Returns whether the function or method is declared static. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_FunctionIsStatic( + Object function, + ffi.Pointer is_static, + ) { + return _Dart_FunctionIsStatic( + function, + is_static, + ); + } + + late final _Dart_FunctionIsStaticPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_FunctionIsStatic'); + late final _Dart_FunctionIsStatic = _Dart_FunctionIsStaticPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Is this object a closure resulting from a tear-off (closurized method)? + /// + /// Returns true for closures produced when an ordinary method is accessed + /// through a getter call. Returns false otherwise, in particular for closures + /// produced from local function declarations. + /// + /// \param object Some Object. + /// + /// \return true if Object is a tear-off. + bool Dart_IsTearOff( + Object object, + ) { + return _Dart_IsTearOff( + object, + ); + } + + late final _Dart_IsTearOffPtr = + _lookup>( + 'Dart_IsTearOff'); + late final _Dart_IsTearOff = + _Dart_IsTearOffPtr.asFunction(); + + /// Retrieves the function of a closure. + /// + /// \return A handle to the function of the closure, or an error handle if the + /// argument is not a closure. + Object Dart_ClosureFunction( + Object closure, + ) { + return _Dart_ClosureFunction( + closure, + ); + } + + late final _Dart_ClosureFunctionPtr = + _lookup>( + 'Dart_ClosureFunction'); + late final _Dart_ClosureFunction = + _Dart_ClosureFunctionPtr.asFunction(); + + /// Returns a handle to the library which contains class. + /// + /// \return A valid handle to the library with owns class, null if the class + /// has no library or an error handle if the argument is not a valid handle + /// to a class type. + Object Dart_ClassLibrary( + Object cls_type, + ) { + return _Dart_ClassLibrary( + cls_type, + ); + } + + late final _Dart_ClassLibraryPtr = + _lookup>( + 'Dart_ClassLibrary'); + late final _Dart_ClassLibrary = + _Dart_ClassLibraryPtr.asFunction(); + + /// Does this Integer fit into a 64-bit signed integer? + /// + /// \param integer An integer. + /// \param fits Returns true if the integer fits into a 64-bit signed integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerFitsIntoInt64( + Object integer, + ffi.Pointer fits, + ) { + return _Dart_IntegerFitsIntoInt64( + integer, + fits, + ); + } + + late final _Dart_IntegerFitsIntoInt64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerFitsIntoInt64'); + late final _Dart_IntegerFitsIntoInt64 = _Dart_IntegerFitsIntoInt64Ptr + .asFunction)>(); + + /// Does this Integer fit into a 64-bit unsigned integer? + /// + /// \param integer An integer. + /// \param fits Returns true if the integer fits into a 64-bit unsigned integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerFitsIntoUint64( + Object integer, + ffi.Pointer fits, + ) { + return _Dart_IntegerFitsIntoUint64( + integer, + fits, + ); + } + + late final _Dart_IntegerFitsIntoUint64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer)>>('Dart_IntegerFitsIntoUint64'); + late final _Dart_IntegerFitsIntoUint64 = _Dart_IntegerFitsIntoUint64Ptr + .asFunction)>(); + + /// Returns an Integer with the provided value. + /// + /// \param value The value of the integer. + /// + /// \return The Integer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewInteger( + int value, + ) { + return _Dart_NewInteger( + value, + ); + } + + late final _Dart_NewIntegerPtr = + _lookup>( + 'Dart_NewInteger'); + late final _Dart_NewInteger = + _Dart_NewIntegerPtr.asFunction(); + + /// Returns an Integer with the provided value. + /// + /// \param value The unsigned value of the integer. + /// + /// \return The Integer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewIntegerFromUint64( + int value, + ) { + return _Dart_NewIntegerFromUint64( + value, + ); + } + + late final _Dart_NewIntegerFromUint64Ptr = + _lookup>( + 'Dart_NewIntegerFromUint64'); + late final _Dart_NewIntegerFromUint64 = + _Dart_NewIntegerFromUint64Ptr.asFunction(); + + /// Returns an Integer with the provided value. + /// + /// \param value The value of the integer represented as a C string + /// containing a hexadecimal number. + /// + /// \return The Integer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewIntegerFromHexCString( + ffi.Pointer value, + ) { + return _Dart_NewIntegerFromHexCString( + value, + ); + } + + late final _Dart_NewIntegerFromHexCStringPtr = + _lookup)>>( + 'Dart_NewIntegerFromHexCString'); + late final _Dart_NewIntegerFromHexCString = _Dart_NewIntegerFromHexCStringPtr + .asFunction)>(); + + /// Gets the value of an Integer. + /// + /// The integer must fit into a 64-bit signed integer, otherwise an error occurs. + /// + /// \param integer An Integer. + /// \param value Returns the value of the Integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerToInt64( + Object integer, + ffi.Pointer value, + ) { + return _Dart_IntegerToInt64( + integer, + value, + ); + } + + late final _Dart_IntegerToInt64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerToInt64'); + late final _Dart_IntegerToInt64 = _Dart_IntegerToInt64Ptr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Gets the value of an Integer. + /// + /// The integer must fit into a 64-bit unsigned integer, otherwise an + /// error occurs. + /// + /// \param integer An Integer. + /// \param value Returns the value of the Integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerToUint64( + Object integer, + ffi.Pointer value, + ) { + return _Dart_IntegerToUint64( + integer, + value, + ); + } + + late final _Dart_IntegerToUint64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerToUint64'); + late final _Dart_IntegerToUint64 = _Dart_IntegerToUint64Ptr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Gets the value of an integer as a hexadecimal C string. + /// + /// \param integer An Integer. + /// \param value Returns the value of the Integer as a hexadecimal C + /// string. This C string is scope allocated and is only valid until + /// the next call to Dart_ExitScope. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerToHexCString( + Object integer, + ffi.Pointer> value, + ) { + return _Dart_IntegerToHexCString( + integer, + value, + ); + } + + late final _Dart_IntegerToHexCStringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer>)>>('Dart_IntegerToHexCString'); + late final _Dart_IntegerToHexCString = + _Dart_IntegerToHexCStringPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); + + /// Returns a Double with the provided value. + /// + /// \param value A double. + /// + /// \return The Double object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewDouble( + double value, + ) { + return _Dart_NewDouble( + value, + ); + } + + late final _Dart_NewDoublePtr = + _lookup>( + 'Dart_NewDouble'); + late final _Dart_NewDouble = + _Dart_NewDoublePtr.asFunction(); + + /// Gets the value of a Double + /// + /// \param double_obj A Double + /// \param value Returns the value of the Double. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_DoubleValue( + Object double_obj, + ffi.Pointer value, + ) { + return _Dart_DoubleValue( + double_obj, + value, + ); + } + + late final _Dart_DoubleValuePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_DoubleValue'); + late final _Dart_DoubleValue = _Dart_DoubleValuePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Returns a closure of static function 'function_name' in the class 'class_name' + /// in the exported namespace of specified 'library'. + /// + /// \param library Library object + /// \param cls_type Type object representing a Class + /// \param function_name Name of the static function in the class + /// + /// \return A valid Dart instance if no error occurs during the operation. + Object Dart_GetStaticMethodClosure( + Object library1, + Object cls_type, + Object function_name, + ) { + return _Dart_GetStaticMethodClosure( + library1, + cls_type, + function_name, + ); + } + + late final _Dart_GetStaticMethodClosurePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Handle)>>('Dart_GetStaticMethodClosure'); + late final _Dart_GetStaticMethodClosure = _Dart_GetStaticMethodClosurePtr + .asFunction(); + + /// Returns the True object. + /// + /// Requires there to be a current isolate. + /// + /// \return A handle to the True object. + Object Dart_True() { + return _Dart_True(); + } + + late final _Dart_TruePtr = + _lookup>('Dart_True'); + late final _Dart_True = _Dart_TruePtr.asFunction(); + + /// Returns the False object. + /// + /// Requires there to be a current isolate. + /// + /// \return A handle to the False object. + Object Dart_False() { + return _Dart_False(); + } + + late final _Dart_FalsePtr = + _lookup>('Dart_False'); + late final _Dart_False = _Dart_FalsePtr.asFunction(); + + /// Returns a Boolean with the provided value. + /// + /// \param value true or false. + /// + /// \return The Boolean object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewBoolean( + bool value, + ) { + return _Dart_NewBoolean( + value, + ); + } + + late final _Dart_NewBooleanPtr = + _lookup>( + 'Dart_NewBoolean'); + late final _Dart_NewBoolean = + _Dart_NewBooleanPtr.asFunction(); + + /// Gets the value of a Boolean + /// + /// \param boolean_obj A Boolean + /// \param value Returns the value of the Boolean. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_BooleanValue( + Object boolean_obj, + ffi.Pointer value, + ) { + return _Dart_BooleanValue( + boolean_obj, + value, + ); + } + + late final _Dart_BooleanValuePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_BooleanValue'); + late final _Dart_BooleanValue = _Dart_BooleanValuePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Gets the length of a String. + /// + /// \param str A String. + /// \param length Returns the length of the String. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringLength( + Object str, + ffi.Pointer length, + ) { + return _Dart_StringLength( + str, + length, + ); + } + + late final _Dart_StringLengthPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_StringLength'); + late final _Dart_StringLength = _Dart_StringLengthPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Returns a String built from the provided C string + /// (There is an implicit assumption that the C string passed in contains + /// UTF-8 encoded characters and '\0' is considered as a termination + /// character). + /// + /// \param value A C String + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromCString( + ffi.Pointer str, + ) { + return _Dart_NewStringFromCString( + str, + ); + } + + late final _Dart_NewStringFromCStringPtr = + _lookup)>>( + 'Dart_NewStringFromCString'); + late final _Dart_NewStringFromCString = _Dart_NewStringFromCStringPtr + .asFunction)>(); + + /// Returns a String built from an array of UTF-8 encoded characters. + /// + /// \param utf8_array An array of UTF-8 encoded characters. + /// \param length The length of the codepoints array. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF8( + ffi.Pointer utf8_array, + int length, + ) { + return _Dart_NewStringFromUTF8( + utf8_array, + length, + ); + } + + late final _Dart_NewStringFromUTF8Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF8'); + late final _Dart_NewStringFromUTF8 = _Dart_NewStringFromUTF8Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); + + /// Returns a String built from an array of UTF-16 encoded characters. + /// + /// \param utf16_array An array of UTF-16 encoded characters. + /// \param length The length of the codepoints array. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF16( + ffi.Pointer utf16_array, + int length, + ) { + return _Dart_NewStringFromUTF16( + utf16_array, + length, + ); + } + + late final _Dart_NewStringFromUTF16Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF16'); + late final _Dart_NewStringFromUTF16 = _Dart_NewStringFromUTF16Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); + + /// Returns a String built from an array of UTF-32 encoded characters. + /// + /// \param utf32_array An array of UTF-32 encoded characters. + /// \param length The length of the codepoints array. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF32( + ffi.Pointer utf32_array, + int length, + ) { + return _Dart_NewStringFromUTF32( + utf32_array, + length, + ); + } + + late final _Dart_NewStringFromUTF32Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF32'); + late final _Dart_NewStringFromUTF32 = _Dart_NewStringFromUTF32Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); + + /// Returns a String which references an external array of + /// Latin-1 (ISO-8859-1) encoded characters. + /// + /// \param latin1_array Array of Latin-1 encoded characters. This must not move. + /// \param length The length of the characters array. + /// \param peer An external pointer to associate with this string. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A callback to be called when this string is finalized. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalLatin1String( + ffi.Pointer latin1_array, + int length, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewExternalLatin1String( + latin1_array, + length, + peer, + external_allocation_size, + callback, + ); + } + + late final _Dart_NewExternalLatin1StringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewExternalLatin1String'); + late final _Dart_NewExternalLatin1String = + _Dart_NewExternalLatin1StringPtr.asFunction< + Object Function(ffi.Pointer, int, ffi.Pointer, + int, Dart_HandleFinalizer)>(); + + /// Returns a String which references an external array of UTF-16 encoded + /// characters. + /// + /// \param utf16_array An array of UTF-16 encoded characters. This must not move. + /// \param length The length of the characters array. + /// \param peer An external pointer to associate with this string. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A callback to be called when this string is finalized. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalUTF16String( + ffi.Pointer utf16_array, + int length, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewExternalUTF16String( + utf16_array, + length, + peer, + external_allocation_size, + callback, + ); + } + + late final _Dart_NewExternalUTF16StringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewExternalUTF16String'); + late final _Dart_NewExternalUTF16String = + _Dart_NewExternalUTF16StringPtr.asFunction< + Object Function(ffi.Pointer, int, ffi.Pointer, + int, Dart_HandleFinalizer)>(); + + /// Gets the C string representation of a String. + /// (It is a sequence of UTF-8 encoded values with a '\0' termination.) + /// + /// \param str A string. + /// \param cstr Returns the String represented as a C string. + /// This C string is scope allocated and is only valid until + /// the next call to Dart_ExitScope. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToCString( + Object str, + ffi.Pointer> cstr, + ) { + return _Dart_StringToCString( + str, + cstr, + ); + } + + late final _Dart_StringToCStringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer>)>>('Dart_StringToCString'); + late final _Dart_StringToCString = _Dart_StringToCStringPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); + + /// Gets a UTF-8 encoded representation of a String. + /// + /// Any unpaired surrogate code points in the string will be converted as + /// replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need + /// to preserve unpaired surrogates, use the Dart_StringToUTF16 function. + /// + /// \param str A string. + /// \param utf8_array Returns the String represented as UTF-8 code + /// units. This UTF-8 array is scope allocated and is only valid + /// until the next call to Dart_ExitScope. + /// \param length Used to return the length of the array which was + /// actually used. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToUTF8( + Object str, + ffi.Pointer> utf8_array, + ffi.Pointer length, + ) { + return _Dart_StringToUTF8( + str, + utf8_array, + length, + ); + } + + late final _Dart_StringToUTF8Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer>, + ffi.Pointer)>>('Dart_StringToUTF8'); + late final _Dart_StringToUTF8 = _Dart_StringToUTF8Ptr.asFunction< + Object Function(Object, ffi.Pointer>, + ffi.Pointer)>(); + + /// Gets the data corresponding to the string object. This function returns + /// the data only for Latin-1 (ISO-8859-1) string objects. For all other + /// string objects it returns an error. + /// + /// \param str A string. + /// \param latin1_array An array allocated by the caller, used to return + /// the string data. + /// \param length Used to pass in the length of the provided array. + /// Used to return the length of the array which was actually used. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToLatin1( + Object str, + ffi.Pointer latin1_array, + ffi.Pointer length, + ) { + return _Dart_StringToLatin1( + str, + latin1_array, + length, + ); + } + + late final _Dart_StringToLatin1Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer, + ffi.Pointer)>>('Dart_StringToLatin1'); + late final _Dart_StringToLatin1 = _Dart_StringToLatin1Ptr.asFunction< + Object Function( + Object, ffi.Pointer, ffi.Pointer)>(); + + /// Gets the UTF-16 encoded representation of a string. + /// + /// \param str A string. + /// \param utf16_array An array allocated by the caller, used to return + /// the array of UTF-16 encoded characters. + /// \param length Used to pass in the length of the provided array. + /// Used to return the length of the array which was actually used. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToUTF16( + Object str, + ffi.Pointer utf16_array, + ffi.Pointer length, + ) { + return _Dart_StringToUTF16( + str, + utf16_array, + length, + ); + } + + late final _Dart_StringToUTF16Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer, + ffi.Pointer)>>('Dart_StringToUTF16'); + late final _Dart_StringToUTF16 = _Dart_StringToUTF16Ptr.asFunction< + Object Function( + Object, ffi.Pointer, ffi.Pointer)>(); + + /// Gets the storage size in bytes of a String. + /// + /// \param str A String. + /// \param length Returns the storage size in bytes of the String. + /// This is the size in bytes needed to store the String. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringStorageSize( + Object str, + ffi.Pointer size, + ) { + return _Dart_StringStorageSize( + str, + size, + ); + } + + late final _Dart_StringStorageSizePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_StringStorageSize'); + late final _Dart_StringStorageSize = _Dart_StringStorageSizePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Retrieves some properties associated with a String. + /// Properties retrieved are: + /// - character size of the string (one or two byte) + /// - length of the string + /// - peer pointer of string if it is an external string. + /// \param str A String. + /// \param char_size Returns the character size of the String. + /// \param str_len Returns the length of the String. + /// \param peer Returns the peer pointer associated with the String or 0 if + /// there is no peer pointer for it. + /// \return Success if no error occurs. Otherwise returns + /// an error handle. + Object Dart_StringGetProperties( + Object str, + ffi.Pointer char_size, + ffi.Pointer str_len, + ffi.Pointer> peer, + ) { + return _Dart_StringGetProperties( + str, + char_size, + str_len, + peer, + ); + } + + late final _Dart_StringGetPropertiesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('Dart_StringGetProperties'); + late final _Dart_StringGetProperties = + _Dart_StringGetPropertiesPtr.asFunction< + Object Function(Object, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); + + /// Returns a List of the desired length. + /// + /// \param length The length of the list. + /// + /// \return The List object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewList( + int length, + ) { + return _Dart_NewList( + length, + ); + } + + late final _Dart_NewListPtr = + _lookup>( + 'Dart_NewList'); + late final _Dart_NewList = + _Dart_NewListPtr.asFunction(); + + /// TODO(bkonyi): convert this to use nullable types once NNBD is enabled. + /// /** + /// * Returns a List of the desired length with the desired legacy element type. + /// * + /// * \param element_type_id The type of elements of the list. + /// * \param length The length of the list. + /// * + /// * \return The List object if no error occurs. Otherwise returns an error + /// * handle. + /// */ + Object Dart_NewListOf( + int element_type_id, + int length, + ) { + return _Dart_NewListOf( + element_type_id, + length, + ); + } + + late final _Dart_NewListOfPtr = + _lookup>( + 'Dart_NewListOf'); + late final _Dart_NewListOf = + _Dart_NewListOfPtr.asFunction(); + + /// Returns a List of the desired length with the desired element type. + /// + /// \param element_type Handle to a nullable type object. E.g., from + /// Dart_GetType or Dart_GetNullableType. + /// + /// \param length The length of the list. + /// + /// \return The List object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewListOfType( + Object element_type, + int length, + ) { + return _Dart_NewListOfType( + element_type, + length, + ); + } + + late final _Dart_NewListOfTypePtr = + _lookup>( + 'Dart_NewListOfType'); + late final _Dart_NewListOfType = + _Dart_NewListOfTypePtr.asFunction(); + + /// Returns a List of the desired length with the desired element type, filled + /// with the provided object. + /// + /// \param element_type Handle to a type object. E.g., from Dart_GetType. + /// + /// \param fill_object Handle to an object of type 'element_type' that will be + /// used to populate the list. This parameter can only be Dart_Null() if the + /// length of the list is 0 or 'element_type' is a nullable type. + /// + /// \param length The length of the list. + /// + /// \return The List object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewListOfTypeFilled( + Object element_type, + Object fill_object, + int length, + ) { + return _Dart_NewListOfTypeFilled( + element_type, + fill_object, + length, + ); + } + + late final _Dart_NewListOfTypeFilledPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Handle, ffi.IntPtr)>>('Dart_NewListOfTypeFilled'); + late final _Dart_NewListOfTypeFilled = _Dart_NewListOfTypeFilledPtr + .asFunction(); + + /// Gets the length of a List. + /// + /// May generate an unhandled exception error. + /// + /// \param list A List. + /// \param length Returns the length of the List. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_ListLength( + Object list, + ffi.Pointer length, + ) { + return _Dart_ListLength( + list, + length, + ); + } + + late final _Dart_ListLengthPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_ListLength'); + late final _Dart_ListLength = _Dart_ListLengthPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Gets the Object at some index of a List. + /// + /// If the index is out of bounds, an error occurs. + /// + /// May generate an unhandled exception error. + /// + /// \param list A List. + /// \param index A valid index into the List. + /// + /// \return The Object in the List at the specified index if no error + /// occurs. Otherwise returns an error handle. + Object Dart_ListGetAt( + Object list, + int index, + ) { + return _Dart_ListGetAt( + list, + index, + ); + } + + late final _Dart_ListGetAtPtr = + _lookup>( + 'Dart_ListGetAt'); + late final _Dart_ListGetAt = + _Dart_ListGetAtPtr.asFunction(); + + /// Gets a range of Objects from a List. + /// + /// If any of the requested index values are out of bounds, an error occurs. + /// + /// May generate an unhandled exception error. + /// + /// \param list A List. + /// \param offset The offset of the first item to get. + /// \param length The number of items to get. + /// \param result A pointer to fill with the objects. + /// + /// \return Success if no error occurs during the operation. + Object Dart_ListGetRange( + Object list, + int offset, + int length, + ffi.Pointer result, + ) { + return _Dart_ListGetRange( + list, + offset, + length, + result, + ); + } + + late final _Dart_ListGetRangePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.IntPtr, + ffi.Pointer)>>('Dart_ListGetRange'); + late final _Dart_ListGetRange = _Dart_ListGetRangePtr.asFunction< + Object Function(Object, int, int, ffi.Pointer)>(); + + /// Sets the Object at some index of a List. + /// + /// If the index is out of bounds, an error occurs. + /// + /// May generate an unhandled exception error. + /// + /// \param array A List. + /// \param index A valid index into the List. + /// \param value The Object to put in the List. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_ListSetAt( + Object list, + int index, + Object value, + ) { + return _Dart_ListSetAt( + list, + index, + value, + ); + } + + late final _Dart_ListSetAtPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.IntPtr, ffi.Handle)>>('Dart_ListSetAt'); + late final _Dart_ListSetAt = + _Dart_ListSetAtPtr.asFunction(); + + /// May generate an unhandled exception error. + Object Dart_ListGetAsBytes( + Object list, + int offset, + ffi.Pointer native_array, + int length, + ) { + return _Dart_ListGetAsBytes( + list, + offset, + native_array, + length, + ); + } + + late final _Dart_ListGetAsBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, + ffi.IntPtr)>>('Dart_ListGetAsBytes'); + late final _Dart_ListGetAsBytes = _Dart_ListGetAsBytesPtr.asFunction< + Object Function(Object, int, ffi.Pointer, int)>(); + + /// May generate an unhandled exception error. + Object Dart_ListSetAsBytes( + Object list, + int offset, + ffi.Pointer native_array, + int length, + ) { + return _Dart_ListSetAsBytes( + list, + offset, + native_array, + length, + ); + } + + late final _Dart_ListSetAsBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, + ffi.IntPtr)>>('Dart_ListSetAsBytes'); + late final _Dart_ListSetAsBytes = _Dart_ListSetAsBytesPtr.asFunction< + Object Function(Object, int, ffi.Pointer, int)>(); + + /// Gets the Object at some key of a Map. + /// + /// May generate an unhandled exception error. + /// + /// \param map A Map. + /// \param key An Object. + /// + /// \return The value in the map at the specified key, null if the map does not + /// contain the key, or an error handle. + Object Dart_MapGetAt( + Object map, + Object key, + ) { + return _Dart_MapGetAt( + map, + key, + ); + } + + late final _Dart_MapGetAtPtr = + _lookup>( + 'Dart_MapGetAt'); + late final _Dart_MapGetAt = + _Dart_MapGetAtPtr.asFunction(); + + /// Returns whether the Map contains a given key. + /// + /// May generate an unhandled exception error. + /// + /// \param map A Map. + /// + /// \return A handle on a boolean indicating whether map contains the key. + /// Otherwise returns an error handle. + Object Dart_MapContainsKey( + Object map, + Object key, + ) { + return _Dart_MapContainsKey( + map, + key, + ); + } + + late final _Dart_MapContainsKeyPtr = + _lookup>( + 'Dart_MapContainsKey'); + late final _Dart_MapContainsKey = + _Dart_MapContainsKeyPtr.asFunction(); + + /// Gets the list of keys of a Map. + /// + /// May generate an unhandled exception error. + /// + /// \param map A Map. + /// + /// \return The list of key Objects if no error occurs. Otherwise returns an + /// error handle. + Object Dart_MapKeys( + Object map, + ) { + return _Dart_MapKeys( + map, + ); + } + + late final _Dart_MapKeysPtr = + _lookup>( + 'Dart_MapKeys'); + late final _Dart_MapKeys = + _Dart_MapKeysPtr.asFunction(); + + /// Return type if this object is a TypedData object. + /// + /// \return kInvalid if the object is not a TypedData object or the appropriate + /// Dart_TypedData_Type. + int Dart_GetTypeOfTypedData( + Object object, + ) { + return _Dart_GetTypeOfTypedData( + object, + ); + } + + late final _Dart_GetTypeOfTypedDataPtr = + _lookup>( + 'Dart_GetTypeOfTypedData'); + late final _Dart_GetTypeOfTypedData = + _Dart_GetTypeOfTypedDataPtr.asFunction(); + + /// Return type if this object is an external TypedData object. + /// + /// \return kInvalid if the object is not an external TypedData object or + /// the appropriate Dart_TypedData_Type. + int Dart_GetTypeOfExternalTypedData( + Object object, + ) { + return _Dart_GetTypeOfExternalTypedData( + object, + ); + } + + late final _Dart_GetTypeOfExternalTypedDataPtr = + _lookup>( + 'Dart_GetTypeOfExternalTypedData'); + late final _Dart_GetTypeOfExternalTypedData = + _Dart_GetTypeOfExternalTypedDataPtr.asFunction(); + + /// Returns a TypedData object of the desired length and type. + /// + /// \param type The type of the TypedData object. + /// \param length The length of the TypedData object (length in type units). + /// + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewTypedData( + int type, + int length, + ) { + return _Dart_NewTypedData( + type, + length, + ); + } + + late final _Dart_NewTypedDataPtr = + _lookup>( + 'Dart_NewTypedData'); + late final _Dart_NewTypedData = + _Dart_NewTypedDataPtr.asFunction(); + + /// Returns a TypedData object which references an external data array. + /// + /// \param type The type of the data array. + /// \param data A data array. This array must not move. + /// \param length The length of the data array (length in type units). + /// + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalTypedData( + int type, + ffi.Pointer data, + int length, + ) { + return _Dart_NewExternalTypedData( + type, + data, + length, + ); + } + + late final _Dart_NewExternalTypedDataPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Int32, ffi.Pointer, + ffi.IntPtr)>>('Dart_NewExternalTypedData'); + late final _Dart_NewExternalTypedData = _Dart_NewExternalTypedDataPtr + .asFunction, int)>(); + + /// Returns a TypedData object which references an external data array. + /// + /// \param type The type of the data array. + /// \param data A data array. This array must not move. + /// \param length The length of the data array (length in type units). + /// \param peer A pointer to a native object or NULL. This value is + /// provided to callback when it is invoked. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A function pointer that will be invoked sometime + /// after the object is garbage collected, unless the handle has been deleted. + /// A valid callback needs to be specified it cannot be NULL. + /// + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalTypedDataWithFinalizer( + int type, + ffi.Pointer data, + int length, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewExternalTypedDataWithFinalizer( + type, + data, + length, + peer, + external_allocation_size, + callback, + ); + } + + late final _Dart_NewExternalTypedDataWithFinalizerPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Int32, + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewExternalTypedDataWithFinalizer'); + late final _Dart_NewExternalTypedDataWithFinalizer = + _Dart_NewExternalTypedDataWithFinalizerPtr.asFunction< + Object Function(int, ffi.Pointer, int, + ffi.Pointer, int, Dart_HandleFinalizer)>(); + + /// Returns a ByteBuffer object for the typed data. + /// + /// \param type_data The TypedData object. + /// + /// \return The ByteBuffer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewByteBuffer( + Object typed_data, + ) { + return _Dart_NewByteBuffer( + typed_data, + ); + } + + late final _Dart_NewByteBufferPtr = + _lookup>( + 'Dart_NewByteBuffer'); + late final _Dart_NewByteBuffer = + _Dart_NewByteBufferPtr.asFunction(); + + /// Acquires access to the internal data address of a TypedData object. + /// + /// \param object The typed data object whose internal data address is to + /// be accessed. + /// \param type The type of the object is returned here. + /// \param data The internal data address is returned here. + /// \param len Size of the typed array is returned here. + /// + /// Notes: + /// When the internal address of the object is acquired any calls to a + /// Dart API function that could potentially allocate an object or run + /// any Dart code will return an error. + /// + /// Any Dart API functions for accessing the data should not be called + /// before the corresponding release. In particular, the object should + /// not be acquired again before its release. This leads to undefined + /// behavior. + /// + /// \return Success if the internal data address is acquired successfully. + /// Otherwise, returns an error handle. + Object Dart_TypedDataAcquireData( + Object object, + ffi.Pointer type, + ffi.Pointer> data, + ffi.Pointer len, + ) { + return _Dart_TypedDataAcquireData( + object, + type, + data, + len, + ); + } + + late final _Dart_TypedDataAcquireDataPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('Dart_TypedDataAcquireData'); + late final _Dart_TypedDataAcquireData = + _Dart_TypedDataAcquireDataPtr.asFunction< + Object Function(Object, ffi.Pointer, + ffi.Pointer>, ffi.Pointer)>(); + + /// Releases access to the internal data address that was acquired earlier using + /// Dart_TypedDataAcquireData. + /// + /// \param object The typed data object whose internal data address is to be + /// released. + /// + /// \return Success if the internal data address is released successfully. + /// Otherwise, returns an error handle. + Object Dart_TypedDataReleaseData( + Object object, + ) { + return _Dart_TypedDataReleaseData( + object, + ); + } + + late final _Dart_TypedDataReleaseDataPtr = + _lookup>( + 'Dart_TypedDataReleaseData'); + late final _Dart_TypedDataReleaseData = + _Dart_TypedDataReleaseDataPtr.asFunction(); + + /// Returns the TypedData object associated with the ByteBuffer object. + /// + /// \param byte_buffer The ByteBuffer object. + /// + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_GetDataFromByteBuffer( + Object byte_buffer, + ) { + return _Dart_GetDataFromByteBuffer( + byte_buffer, + ); + } + + late final _Dart_GetDataFromByteBufferPtr = + _lookup>( + 'Dart_GetDataFromByteBuffer'); + late final _Dart_GetDataFromByteBuffer = + _Dart_GetDataFromByteBufferPtr.asFunction(); + + /// Invokes a constructor, creating a new object. + /// + /// This function allows hidden constructors (constructors with leading + /// underscores) to be called. + /// + /// \param type Type of object to be constructed. + /// \param constructor_name The name of the constructor to invoke. Use + /// Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. + /// This name should not include the name of the class. + /// \param number_of_arguments Size of the arguments array. + /// \param arguments An array of arguments to the constructor. + /// + /// \return If the constructor is called and completes successfully, + /// then the new object. If an error occurs during execution, then an + /// error handle is returned. + Object Dart_New( + Object type, + Object constructor_name, + int number_of_arguments, + ffi.Pointer arguments, + ) { + return _Dart_New( + type, + constructor_name, + number_of_arguments, + arguments, + ); + } + + late final _Dart_NewPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_New'); + late final _Dart_New = _Dart_NewPtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); + + /// Allocate a new object without invoking a constructor. + /// + /// \param type The type of an object to be allocated. + /// + /// \return The new object. If an error occurs during execution, then an + /// error handle is returned. + Object Dart_Allocate( + Object type, + ) { + return _Dart_Allocate( + type, + ); + } + + late final _Dart_AllocatePtr = + _lookup>( + 'Dart_Allocate'); + late final _Dart_Allocate = + _Dart_AllocatePtr.asFunction(); + + /// Allocate a new object without invoking a constructor, and sets specified + /// native fields. + /// + /// \param type The type of an object to be allocated. + /// \param num_native_fields The number of native fields to set. + /// \param native_fields An array containing the value of native fields. + /// + /// \return The new object. If an error occurs during execution, then an + /// error handle is returned. + Object Dart_AllocateWithNativeFields( + Object type, + int num_native_fields, + ffi.Pointer native_fields, + ) { + return _Dart_AllocateWithNativeFields( + type, + num_native_fields, + native_fields, + ); + } + + late final _Dart_AllocateWithNativeFieldsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_AllocateWithNativeFields'); + late final _Dart_AllocateWithNativeFields = _Dart_AllocateWithNativeFieldsPtr + .asFunction)>(); + + /// Invokes a method or function. + /// + /// The 'target' parameter may be an object, type, or library. If + /// 'target' is an object, then this function will invoke an instance + /// method. If 'target' is a type, then this function will invoke a + /// static method. If 'target' is a library, then this function will + /// invoke a top-level function from that library. + /// NOTE: This API call cannot be used to invoke methods of a type object. + /// + /// This function ignores visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param target An object, type, or library. + /// \param name The name of the function or method to invoke. + /// \param number_of_arguments Size of the arguments array. + /// \param arguments An array of arguments to the function. + /// + /// \return If the function or method is called and completes + /// successfully, then the return value is returned. If an error + /// occurs during execution, then an error handle is returned. + Object Dart_Invoke( + Object target, + Object name, + int number_of_arguments, + ffi.Pointer arguments, + ) { + return _Dart_Invoke( + target, + name, + number_of_arguments, + arguments, + ); + } + + late final _Dart_InvokePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_Invoke'); + late final _Dart_Invoke = _Dart_InvokePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); + + /// Invokes a Closure with the given arguments. + /// + /// May generate an unhandled exception error. + /// + /// \return If no error occurs during execution, then the result of + /// invoking the closure is returned. If an error occurs during + /// execution, then an error handle is returned. + Object Dart_InvokeClosure( + Object closure, + int number_of_arguments, + ffi.Pointer arguments, + ) { + return _Dart_InvokeClosure( + closure, + number_of_arguments, + arguments, + ); + } + + late final _Dart_InvokeClosurePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_InvokeClosure'); + late final _Dart_InvokeClosure = _Dart_InvokeClosurePtr.asFunction< + Object Function(Object, int, ffi.Pointer)>(); + + /// Invokes a Generative Constructor on an object that was previously + /// allocated using Dart_Allocate/Dart_AllocateWithNativeFields. + /// + /// The 'target' parameter must be an object. + /// + /// This function ignores visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param target An object. + /// \param name The name of the constructor to invoke. + /// Use Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. + /// \param number_of_arguments Size of the arguments array. + /// \param arguments An array of arguments to the function. + /// + /// \return If the constructor is called and completes + /// successfully, then the object is returned. If an error + /// occurs during execution, then an error handle is returned. + Object Dart_InvokeConstructor( + Object object, + Object name, + int number_of_arguments, + ffi.Pointer arguments, + ) { + return _Dart_InvokeConstructor( + object, + name, + number_of_arguments, + arguments, + ); + } + + late final _Dart_InvokeConstructorPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_InvokeConstructor'); + late final _Dart_InvokeConstructor = _Dart_InvokeConstructorPtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); + + /// Gets the value of a field. + /// + /// The 'container' parameter may be an object, type, or library. If + /// 'container' is an object, then this function will access an + /// instance field. If 'container' is a type, then this function will + /// access a static field. If 'container' is a library, then this + /// function will access a top-level variable. + /// NOTE: This API call cannot be used to access fields of a type object. + /// + /// This function ignores field visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param container An object, type, or library. + /// \param name A field name. + /// + /// \return If no error occurs, then the value of the field is + /// returned. Otherwise an error handle is returned. + Object Dart_GetField( + Object container, + Object name, + ) { + return _Dart_GetField( + container, + name, + ); + } + + late final _Dart_GetFieldPtr = + _lookup>( + 'Dart_GetField'); + late final _Dart_GetField = + _Dart_GetFieldPtr.asFunction(); + + /// Sets the value of a field. + /// + /// The 'container' parameter may actually be an object, type, or + /// library. If 'container' is an object, then this function will + /// access an instance field. If 'container' is a type, then this + /// function will access a static field. If 'container' is a library, + /// then this function will access a top-level variable. + /// NOTE: This API call cannot be used to access fields of a type object. + /// + /// This function ignores field visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param container An object, type, or library. + /// \param name A field name. + /// \param value The new field value. + /// + /// \return A valid handle if no error occurs. + Object Dart_SetField( + Object container, + Object name, + Object value, + ) { + return _Dart_SetField( + container, + name, + value, + ); + } + + late final _Dart_SetFieldPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Handle, ffi.Handle)>>('Dart_SetField'); + late final _Dart_SetField = + _Dart_SetFieldPtr.asFunction(); + + /// Throws an exception. + /// + /// This function causes a Dart language exception to be thrown. This + /// will proceed in the standard way, walking up Dart frames until an + /// appropriate 'catch' block is found, executing 'finally' blocks, + /// etc. + /// + /// If an error handle is passed into this function, the error is + /// propagated immediately. See Dart_PropagateError for a discussion + /// of error propagation. + /// + /// If successful, this function does not return. Note that this means + /// that the destructors of any stack-allocated C++ objects will not be + /// called. If there are no Dart frames on the stack, an error occurs. + /// + /// \return An error handle if the exception was not thrown. + /// Otherwise the function does not return. + Object Dart_ThrowException( + Object exception, + ) { + return _Dart_ThrowException( + exception, + ); + } + + late final _Dart_ThrowExceptionPtr = + _lookup>( + 'Dart_ThrowException'); + late final _Dart_ThrowException = + _Dart_ThrowExceptionPtr.asFunction(); + + /// Rethrows an exception. + /// + /// Rethrows an exception, unwinding all dart frames on the stack. If + /// successful, this function does not return. Note that this means + /// that the destructors of any stack-allocated C++ objects will not be + /// called. If there are no Dart frames on the stack, an error occurs. + /// + /// \return An error handle if the exception was not thrown. + /// Otherwise the function does not return. + Object Dart_ReThrowException( + Object exception, + Object stacktrace, + ) { + return _Dart_ReThrowException( + exception, + stacktrace, + ); + } + + late final _Dart_ReThrowExceptionPtr = + _lookup>( + 'Dart_ReThrowException'); + late final _Dart_ReThrowException = + _Dart_ReThrowExceptionPtr.asFunction(); + + /// Gets the number of native instance fields in an object. + Object Dart_GetNativeInstanceFieldCount( + Object obj, + ffi.Pointer count, + ) { + return _Dart_GetNativeInstanceFieldCount( + obj, + count, + ); + } + + late final _Dart_GetNativeInstanceFieldCountPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer)>>('Dart_GetNativeInstanceFieldCount'); + late final _Dart_GetNativeInstanceFieldCount = + _Dart_GetNativeInstanceFieldCountPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Gets the value of a native field. + /// + /// TODO(turnidge): Document. + Object Dart_GetNativeInstanceField( + Object obj, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeInstanceField( + obj, + index, + value, + ); + } + + late final _Dart_GetNativeInstanceFieldPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeInstanceField'); + late final _Dart_GetNativeInstanceField = _Dart_GetNativeInstanceFieldPtr + .asFunction)>(); + + /// Sets the value of a native field. + /// + /// TODO(turnidge): Document. + Object Dart_SetNativeInstanceField( + Object obj, + int index, + int value, + ) { + return _Dart_SetNativeInstanceField( + obj, + index, + value, + ); + } + + late final _Dart_SetNativeInstanceFieldPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Int, ffi.IntPtr)>>('Dart_SetNativeInstanceField'); + late final _Dart_SetNativeInstanceField = _Dart_SetNativeInstanceFieldPtr + .asFunction(); + + /// Extracts current isolate group data from the native arguments structure. + ffi.Pointer Dart_GetNativeIsolateGroupData( + Dart_NativeArguments args, + ) { + return _Dart_GetNativeIsolateGroupData( + args, + ); + } + + late final _Dart_GetNativeIsolateGroupDataPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + Dart_NativeArguments)>>('Dart_GetNativeIsolateGroupData'); + late final _Dart_GetNativeIsolateGroupData = + _Dart_GetNativeIsolateGroupDataPtr.asFunction< + ffi.Pointer Function(Dart_NativeArguments)>(); + + /// Gets the native arguments based on the types passed in and populates + /// the passed arguments buffer with appropriate native values. + /// + /// \param args the Native arguments block passed into the native call. + /// \param num_arguments length of argument descriptor array and argument + /// values array passed in. + /// \param arg_descriptors an array that describes the arguments that + /// need to be retrieved. For each argument to be retrieved the descriptor + /// contains the argument number (0, 1 etc.) and the argument type + /// described using Dart_NativeArgument_Type, e.g: + /// DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kBool, 1) indicates + /// that the first argument is to be retrieved and it should be a boolean. + /// \param arg_values array into which the native arguments need to be + /// extracted into, the array is allocated by the caller (it could be + /// stack allocated to avoid the malloc/free performance overhead). + /// + /// \return Success if all the arguments could be extracted correctly, + /// returns an error handle if there were any errors while extracting the + /// arguments (mismatched number of arguments, incorrect types, etc.). + Object Dart_GetNativeArguments( + Dart_NativeArguments args, + int num_arguments, + ffi.Pointer arg_descriptors, + ffi.Pointer arg_values, + ) { + return _Dart_GetNativeArguments( + args, + num_arguments, + arg_descriptors, + arg_values, + ); + } + + late final _Dart_GetNativeArgumentsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_NativeArguments, + ffi.Int, + ffi.Pointer, + ffi.Pointer)>>( + 'Dart_GetNativeArguments'); + late final _Dart_GetNativeArguments = _Dart_GetNativeArgumentsPtr.asFunction< + Object Function( + Dart_NativeArguments, + int, + ffi.Pointer, + ffi.Pointer)>(); + + /// Gets the native argument at some index. + Object Dart_GetNativeArgument( + Dart_NativeArguments args, + int index, + ) { + return _Dart_GetNativeArgument( + args, + index, + ); + } + + late final _Dart_GetNativeArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_NativeArguments, ffi.Int)>>('Dart_GetNativeArgument'); + late final _Dart_GetNativeArgument = _Dart_GetNativeArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int)>(); + + /// Gets the number of native arguments. + int Dart_GetNativeArgumentCount( + Dart_NativeArguments args, + ) { + return _Dart_GetNativeArgumentCount( + args, + ); + } + + late final _Dart_GetNativeArgumentCountPtr = + _lookup>( + 'Dart_GetNativeArgumentCount'); + late final _Dart_GetNativeArgumentCount = _Dart_GetNativeArgumentCountPtr + .asFunction(); + + /// Gets all the native fields of the native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param num_fields size of the intptr_t array 'field_values' passed in. + /// \param field_values intptr_t array in which native field values are returned. + /// \return Success if the native fields where copied in successfully. Otherwise + /// returns an error handle. On success the native field values are copied + /// into the 'field_values' array, if the argument at 'arg_index' is a + /// null object then 0 is copied as the native field values into the + /// 'field_values' array. + Object Dart_GetNativeFieldsOfArgument( + Dart_NativeArguments args, + int arg_index, + int num_fields, + ffi.Pointer field_values, + ) { + return _Dart_GetNativeFieldsOfArgument( + args, + arg_index, + num_fields, + field_values, + ); + } + + late final _Dart_GetNativeFieldsOfArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeFieldsOfArgument'); + late final _Dart_GetNativeFieldsOfArgument = + _Dart_GetNativeFieldsOfArgumentPtr.asFunction< + Object Function( + Dart_NativeArguments, int, int, ffi.Pointer)>(); + + /// Gets the native field of the receiver. + Object Dart_GetNativeReceiver( + Dart_NativeArguments args, + ffi.Pointer value, + ) { + return _Dart_GetNativeReceiver( + args, + value, + ); + } + + late final _Dart_GetNativeReceiverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, + ffi.Pointer)>>('Dart_GetNativeReceiver'); + late final _Dart_GetNativeReceiver = _Dart_GetNativeReceiverPtr.asFunction< + Object Function(Dart_NativeArguments, ffi.Pointer)>(); + + /// Gets a string native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param peer Returns the peer pointer if the string argument has one. + /// \return Success if the string argument has a peer, if it does not + /// have a peer then the String object is returned. Otherwise returns + /// an error handle (argument is not a String object). + Object Dart_GetNativeStringArgument( + Dart_NativeArguments args, + int arg_index, + ffi.Pointer> peer, + ) { + return _Dart_GetNativeStringArgument( + args, + arg_index, + peer, + ); + } + + late final _Dart_GetNativeStringArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer>)>>( + 'Dart_GetNativeStringArgument'); + late final _Dart_GetNativeStringArgument = + _Dart_GetNativeStringArgumentPtr.asFunction< + Object Function( + Dart_NativeArguments, int, ffi.Pointer>)>(); + + /// Gets an integer native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param value Returns the integer value if the argument is an Integer. + /// \return Success if no error occurs. Otherwise returns an error handle. + Object Dart_GetNativeIntegerArgument( + Dart_NativeArguments args, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeIntegerArgument( + args, + index, + value, + ); + } + + late final _Dart_GetNativeIntegerArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeIntegerArgument'); + late final _Dart_GetNativeIntegerArgument = + _Dart_GetNativeIntegerArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); + + /// Gets a boolean native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param value Returns the boolean value if the argument is a Boolean. + /// \return Success if no error occurs. Otherwise returns an error handle. + Object Dart_GetNativeBooleanArgument( + Dart_NativeArguments args, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeBooleanArgument( + args, + index, + value, + ); + } + + late final _Dart_GetNativeBooleanArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeBooleanArgument'); + late final _Dart_GetNativeBooleanArgument = + _Dart_GetNativeBooleanArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); + + /// Gets a double native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param value Returns the double value if the argument is a double. + /// \return Success if no error occurs. Otherwise returns an error handle. + Object Dart_GetNativeDoubleArgument( + Dart_NativeArguments args, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeDoubleArgument( + args, + index, + value, + ); + } + + late final _Dart_GetNativeDoubleArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeDoubleArgument'); + late final _Dart_GetNativeDoubleArgument = + _Dart_GetNativeDoubleArgumentPtr.asFunction< + Object Function( + Dart_NativeArguments, int, ffi.Pointer)>(); + + /// Sets the return value for a native function. + /// + /// If retval is an Error handle, then error will be propagated once + /// the native functions exits. See Dart_PropagateError for a + /// discussion of how different types of errors are propagated. + void Dart_SetReturnValue( + Dart_NativeArguments args, + Object retval, + ) { + return _Dart_SetReturnValue( + args, + retval, + ); + } + + late final _Dart_SetReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Handle)>>('Dart_SetReturnValue'); + late final _Dart_SetReturnValue = _Dart_SetReturnValuePtr.asFunction< + void Function(Dart_NativeArguments, Object)>(); + + void Dart_SetWeakHandleReturnValue( + Dart_NativeArguments args, + Dart_WeakPersistentHandle rval, + ) { + return _Dart_SetWeakHandleReturnValue( + args, + rval, + ); + } + + late final _Dart_SetWeakHandleReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(Dart_NativeArguments, + Dart_WeakPersistentHandle)>>('Dart_SetWeakHandleReturnValue'); + late final _Dart_SetWeakHandleReturnValue = + _Dart_SetWeakHandleReturnValuePtr.asFunction< + void Function(Dart_NativeArguments, Dart_WeakPersistentHandle)>(); + + void Dart_SetBooleanReturnValue( + Dart_NativeArguments args, + bool retval, + ) { + return _Dart_SetBooleanReturnValue( + args, + retval, + ); + } + + late final _Dart_SetBooleanReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Bool)>>('Dart_SetBooleanReturnValue'); + late final _Dart_SetBooleanReturnValue = _Dart_SetBooleanReturnValuePtr + .asFunction(); + + void Dart_SetIntegerReturnValue( + Dart_NativeArguments args, + int retval, + ) { + return _Dart_SetIntegerReturnValue( + args, + retval, + ); + } + + late final _Dart_SetIntegerReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Int64)>>('Dart_SetIntegerReturnValue'); + late final _Dart_SetIntegerReturnValue = _Dart_SetIntegerReturnValuePtr + .asFunction(); + + void Dart_SetDoubleReturnValue( + Dart_NativeArguments args, + double retval, + ) { + return _Dart_SetDoubleReturnValue( + args, + retval, + ); + } + + late final _Dart_SetDoubleReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Double)>>('Dart_SetDoubleReturnValue'); + late final _Dart_SetDoubleReturnValue = _Dart_SetDoubleReturnValuePtr + .asFunction(); + + /// Sets the environment callback for the current isolate. This + /// callback is used to lookup environment values by name in the + /// current environment. This enables the embedder to supply values for + /// the const constructors bool.fromEnvironment, int.fromEnvironment + /// and String.fromEnvironment. + Object Dart_SetEnvironmentCallback( + Dart_EnvironmentCallback callback, + ) { + return _Dart_SetEnvironmentCallback( + callback, + ); + } + + late final _Dart_SetEnvironmentCallbackPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetEnvironmentCallback'); + late final _Dart_SetEnvironmentCallback = _Dart_SetEnvironmentCallbackPtr + .asFunction(); + + /// Sets the callback used to resolve native functions for a library. + /// + /// \param library A library. + /// \param resolver A native entry resolver. + /// + /// \return A valid handle if the native resolver was set successfully. + Object Dart_SetNativeResolver( + Object library1, + Dart_NativeEntryResolver resolver, + Dart_NativeEntrySymbol symbol, + ) { + return _Dart_SetNativeResolver( + library1, + resolver, + symbol, + ); + } + + late final _Dart_SetNativeResolverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, Dart_NativeEntryResolver, + Dart_NativeEntrySymbol)>>('Dart_SetNativeResolver'); + late final _Dart_SetNativeResolver = _Dart_SetNativeResolverPtr.asFunction< + Object Function( + Object, Dart_NativeEntryResolver, Dart_NativeEntrySymbol)>(); + + /// Returns the callback used to resolve native functions for a library. + /// + /// \param library A library. + /// \param resolver a pointer to a Dart_NativeEntryResolver + /// + /// \return A valid handle if the library was found. + Object Dart_GetNativeResolver( + Object library1, + ffi.Pointer resolver, + ) { + return _Dart_GetNativeResolver( + library1, + resolver, + ); + } + + late final _Dart_GetNativeResolverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>( + 'Dart_GetNativeResolver'); + late final _Dart_GetNativeResolver = _Dart_GetNativeResolverPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Returns the callback used to resolve native function symbols for a library. + /// + /// \param library A library. + /// \param resolver a pointer to a Dart_NativeEntrySymbol. + /// + /// \return A valid handle if the library was found. + Object Dart_GetNativeSymbol( + Object library1, + ffi.Pointer resolver, + ) { + return _Dart_GetNativeSymbol( + library1, + resolver, + ); + } + + late final _Dart_GetNativeSymbolPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer)>>('Dart_GetNativeSymbol'); + late final _Dart_GetNativeSymbol = _Dart_GetNativeSymbolPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Sets the callback used to resolve FFI native functions for a library. + /// The resolved functions are expected to be a C function pointer of the + /// correct signature (as specified in the `@FfiNative()` function + /// annotation in Dart code). + /// + /// NOTE: This is an experimental feature and might change in the future. + /// + /// \param library A library. + /// \param resolver A native function resolver. + /// + /// \return A valid handle if the native resolver was set successfully. + Object Dart_SetFfiNativeResolver( + Object library1, + Dart_FfiNativeResolver resolver, + ) { + return _Dart_SetFfiNativeResolver( + library1, + resolver, + ); + } + + late final _Dart_SetFfiNativeResolverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + Dart_FfiNativeResolver)>>('Dart_SetFfiNativeResolver'); + late final _Dart_SetFfiNativeResolver = _Dart_SetFfiNativeResolverPtr + .asFunction(); + + /// Sets library tag handler for the current isolate. This handler is + /// used to handle the various tags encountered while loading libraries + /// or scripts in the isolate. + /// + /// \param handler Handler code to be used for handling the various tags + /// encountered while loading libraries or scripts in the isolate. + /// + /// \return If no error occurs, the handler is set for the isolate. + /// Otherwise an error handle is returned. + /// + /// TODO(turnidge): Document. + Object Dart_SetLibraryTagHandler( + Dart_LibraryTagHandler handler, + ) { + return _Dart_SetLibraryTagHandler( + handler, + ); + } + + late final _Dart_SetLibraryTagHandlerPtr = + _lookup>( + 'Dart_SetLibraryTagHandler'); + late final _Dart_SetLibraryTagHandler = _Dart_SetLibraryTagHandlerPtr + .asFunction(); + + /// Sets the deferred load handler for the current isolate. This handler is + /// used to handle loading deferred imports in an AppJIT or AppAOT program. + Object Dart_SetDeferredLoadHandler( + Dart_DeferredLoadHandler handler, + ) { + return _Dart_SetDeferredLoadHandler( + handler, + ); + } + + late final _Dart_SetDeferredLoadHandlerPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetDeferredLoadHandler'); + late final _Dart_SetDeferredLoadHandler = _Dart_SetDeferredLoadHandlerPtr + .asFunction(); + + /// Notifies the VM that a deferred load completed successfully. This function + /// will eventually cause the corresponding `prefix.loadLibrary()` futures to + /// complete. + /// + /// Requires the current isolate to be the same current isolate during the + /// invocation of the Dart_DeferredLoadHandler. + Object Dart_DeferredLoadComplete( + int loading_unit_id, + ffi.Pointer snapshot_data, + ffi.Pointer snapshot_instructions, + ) { + return _Dart_DeferredLoadComplete( + loading_unit_id, + snapshot_data, + snapshot_instructions, + ); + } + + late final _Dart_DeferredLoadCompletePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.IntPtr, ffi.Pointer, + ffi.Pointer)>>('Dart_DeferredLoadComplete'); + late final _Dart_DeferredLoadComplete = + _Dart_DeferredLoadCompletePtr.asFunction< + Object Function( + int, ffi.Pointer, ffi.Pointer)>(); + + /// Notifies the VM that a deferred load failed. This function + /// will eventually cause the corresponding `prefix.loadLibrary()` futures to + /// complete with an error. + /// + /// If `transient` is true, future invocations of `prefix.loadLibrary()` will + /// trigger new load requests. If false, futures invocation will complete with + /// the same error. + /// + /// Requires the current isolate to be the same current isolate during the + /// invocation of the Dart_DeferredLoadHandler. + Object Dart_DeferredLoadCompleteError( + int loading_unit_id, + ffi.Pointer error_message, + bool transient, + ) { + return _Dart_DeferredLoadCompleteError( + loading_unit_id, + error_message, + transient, + ); + } + + late final _Dart_DeferredLoadCompleteErrorPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.IntPtr, ffi.Pointer, + ffi.Bool)>>('Dart_DeferredLoadCompleteError'); + late final _Dart_DeferredLoadCompleteError = + _Dart_DeferredLoadCompleteErrorPtr.asFunction< + Object Function(int, ffi.Pointer, bool)>(); + + /// Canonicalizes a url with respect to some library. + /// + /// The url is resolved with respect to the library's url and some url + /// normalizations are performed. + /// + /// This canonicalization function should be sufficient for most + /// embedders to implement the Dart_kCanonicalizeUrl tag. + /// + /// \param base_url The base url relative to which the url is + /// being resolved. + /// \param url The url being resolved and canonicalized. This + /// parameter is a string handle. + /// + /// \return If no error occurs, a String object is returned. Otherwise + /// an error handle is returned. + Object Dart_DefaultCanonicalizeUrl( + Object base_url, + Object url, + ) { + return _Dart_DefaultCanonicalizeUrl( + base_url, + url, + ); + } + + late final _Dart_DefaultCanonicalizeUrlPtr = + _lookup>( + 'Dart_DefaultCanonicalizeUrl'); + late final _Dart_DefaultCanonicalizeUrl = _Dart_DefaultCanonicalizeUrlPtr + .asFunction(); + + /// Loads the root library for the current isolate. + /// + /// Requires there to be no current root library. + /// + /// \param buffer A buffer which contains a kernel binary (see + /// pkg/kernel/binary.md). Must remain valid until isolate group shutdown. + /// \param buffer_size Length of the passed in buffer. + /// + /// \return A handle to the root library, or an error. + Object Dart_LoadScriptFromKernel( + ffi.Pointer kernel_buffer, + int kernel_size, + ) { + return _Dart_LoadScriptFromKernel( + kernel_buffer, + kernel_size, + ); + } + + late final _Dart_LoadScriptFromKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_LoadScriptFromKernel'); + late final _Dart_LoadScriptFromKernel = _Dart_LoadScriptFromKernelPtr + .asFunction, int)>(); + + /// Gets the library for the root script for the current isolate. + /// + /// If the root script has not yet been set for the current isolate, + /// this function returns Dart_Null(). This function never returns an + /// error handle. + /// + /// \return Returns the root Library for the current isolate or Dart_Null(). + Object Dart_RootLibrary() { + return _Dart_RootLibrary(); + } + + late final _Dart_RootLibraryPtr = + _lookup>('Dart_RootLibrary'); + late final _Dart_RootLibrary = + _Dart_RootLibraryPtr.asFunction(); + + /// Sets the root library for the current isolate. + /// + /// \return Returns an error handle if `library` is not a library handle. + Object Dart_SetRootLibrary( + Object library1, + ) { + return _Dart_SetRootLibrary( + library1, + ); + } + + late final _Dart_SetRootLibraryPtr = + _lookup>( + 'Dart_SetRootLibrary'); + late final _Dart_SetRootLibrary = + _Dart_SetRootLibraryPtr.asFunction(); + + /// Lookup or instantiate a legacy type by name and type arguments from a + /// Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The class name for the type. + /// \param number_of_type_arguments Number of type arguments. + /// For non parametric types the number of type arguments would be 0. + /// \param type_arguments Pointer to an array of type arguments. + /// For non parameteric types a NULL would be passed in for this argument. + /// + /// \return If no error occurs, the type is returned. + /// Otherwise an error handle is returned. + Object Dart_GetType( + Object library1, + Object class_name, + int number_of_type_arguments, + ffi.Pointer type_arguments, + ) { + return _Dart_GetType( + library1, + class_name, + number_of_type_arguments, + type_arguments, + ); + } + + late final _Dart_GetTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_GetType'); + late final _Dart_GetType = _Dart_GetTypePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); + + /// Lookup or instantiate a nullable type by name and type arguments from + /// Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The class name for the type. + /// \param number_of_type_arguments Number of type arguments. + /// For non parametric types the number of type arguments would be 0. + /// \param type_arguments Pointer to an array of type arguments. + /// For non parameteric types a NULL would be passed in for this argument. + /// + /// \return If no error occurs, the type is returned. + /// Otherwise an error handle is returned. + Object Dart_GetNullableType( + Object library1, + Object class_name, + int number_of_type_arguments, + ffi.Pointer type_arguments, + ) { + return _Dart_GetNullableType( + library1, + class_name, + number_of_type_arguments, + type_arguments, + ); + } + + late final _Dart_GetNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_GetNullableType'); + late final _Dart_GetNullableType = _Dart_GetNullableTypePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); + + /// Lookup or instantiate a non-nullable type by name and type arguments from + /// Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The class name for the type. + /// \param number_of_type_arguments Number of type arguments. + /// For non parametric types the number of type arguments would be 0. + /// \param type_arguments Pointer to an array of type arguments. + /// For non parameteric types a NULL would be passed in for this argument. + /// + /// \return If no error occurs, the type is returned. + /// Otherwise an error handle is returned. + Object Dart_GetNonNullableType( + Object library1, + Object class_name, + int number_of_type_arguments, + ffi.Pointer type_arguments, + ) { + return _Dart_GetNonNullableType( + library1, + class_name, + number_of_type_arguments, + type_arguments, + ); + } + + late final _Dart_GetNonNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_GetNonNullableType'); + late final _Dart_GetNonNullableType = _Dart_GetNonNullableTypePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); + + /// Creates a nullable version of the provided type. + /// + /// \param type The type to be converted to a nullable type. + /// + /// \return If no error occurs, a nullable type is returned. + /// Otherwise an error handle is returned. + Object Dart_TypeToNullableType( + Object type, + ) { + return _Dart_TypeToNullableType( + type, + ); + } + + late final _Dart_TypeToNullableTypePtr = + _lookup>( + 'Dart_TypeToNullableType'); + late final _Dart_TypeToNullableType = + _Dart_TypeToNullableTypePtr.asFunction(); + + /// Creates a non-nullable version of the provided type. + /// + /// \param type The type to be converted to a non-nullable type. + /// + /// \return If no error occurs, a non-nullable type is returned. + /// Otherwise an error handle is returned. + Object Dart_TypeToNonNullableType( + Object type, + ) { + return _Dart_TypeToNonNullableType( + type, + ); + } + + late final _Dart_TypeToNonNullableTypePtr = + _lookup>( + 'Dart_TypeToNonNullableType'); + late final _Dart_TypeToNonNullableType = + _Dart_TypeToNonNullableTypePtr.asFunction(); + + /// A type's nullability. + /// + /// \param type A Dart type. + /// \param result An out parameter containing the result of the check. True if + /// the type is of the specified nullability, false otherwise. + /// + /// \return Returns an error handle if type is not of type Type. + Object Dart_IsNullableType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsNullableType( + type, + result, + ); + } + + late final _Dart_IsNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IsNullableType'); + late final _Dart_IsNullableType = _Dart_IsNullableTypePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + Object Dart_IsNonNullableType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsNonNullableType( + type, + result, + ); + } + + late final _Dart_IsNonNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IsNonNullableType'); + late final _Dart_IsNonNullableType = _Dart_IsNonNullableTypePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + Object Dart_IsLegacyType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsLegacyType( + type, + result, + ); + } + + late final _Dart_IsLegacyTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IsLegacyType'); + late final _Dart_IsLegacyType = _Dart_IsLegacyTypePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Lookup a class or interface by name from a Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The name of the class or interface. + /// + /// \return If no error occurs, the class or interface is + /// returned. Otherwise an error handle is returned. + Object Dart_GetClass( + Object library1, + Object class_name, + ) { + return _Dart_GetClass( + library1, + class_name, + ); + } + + late final _Dart_GetClassPtr = + _lookup>( + 'Dart_GetClass'); + late final _Dart_GetClass = + _Dart_GetClassPtr.asFunction(); + + /// Returns an import path to a Library, such as "file:///test.dart" or + /// "dart:core". + Object Dart_LibraryUrl( + Object library1, + ) { + return _Dart_LibraryUrl( + library1, + ); + } + + late final _Dart_LibraryUrlPtr = + _lookup>( + 'Dart_LibraryUrl'); + late final _Dart_LibraryUrl = + _Dart_LibraryUrlPtr.asFunction(); + + /// Returns a URL from which a Library was loaded. + Object Dart_LibraryResolvedUrl( + Object library1, + ) { + return _Dart_LibraryResolvedUrl( + library1, + ); + } + + late final _Dart_LibraryResolvedUrlPtr = + _lookup>( + 'Dart_LibraryResolvedUrl'); + late final _Dart_LibraryResolvedUrl = + _Dart_LibraryResolvedUrlPtr.asFunction(); + + /// \return An array of libraries. + Object Dart_GetLoadedLibraries() { + return _Dart_GetLoadedLibraries(); + } + + late final _Dart_GetLoadedLibrariesPtr = + _lookup>( + 'Dart_GetLoadedLibraries'); + late final _Dart_GetLoadedLibraries = + _Dart_GetLoadedLibrariesPtr.asFunction(); + + Object Dart_LookupLibrary( + Object url, + ) { + return _Dart_LookupLibrary( + url, + ); + } + + late final _Dart_LookupLibraryPtr = + _lookup>( + 'Dart_LookupLibrary'); + late final _Dart_LookupLibrary = + _Dart_LookupLibraryPtr.asFunction(); + + /// Report an loading error for the library. + /// + /// \param library The library that failed to load. + /// \param error The Dart error instance containing the load error. + /// + /// \return If the VM handles the error, the return value is + /// a null handle. If it doesn't handle the error, the error + /// object is returned. + Object Dart_LibraryHandleError( + Object library1, + Object error, + ) { + return _Dart_LibraryHandleError( + library1, + error, + ); + } + + late final _Dart_LibraryHandleErrorPtr = + _lookup>( + 'Dart_LibraryHandleError'); + late final _Dart_LibraryHandleError = + _Dart_LibraryHandleErrorPtr.asFunction(); + + /// Called by the embedder to load a partial program. Does not set the root + /// library. + /// + /// \param buffer A buffer which contains a kernel binary (see + /// pkg/kernel/binary.md). Must remain valid until isolate shutdown. + /// \param buffer_size Length of the passed in buffer. + /// + /// \return A handle to the main library of the compilation unit, or an error. + Object Dart_LoadLibraryFromKernel( + ffi.Pointer kernel_buffer, + int kernel_buffer_size, + ) { + return _Dart_LoadLibraryFromKernel( + kernel_buffer, + kernel_buffer_size, + ); + } + + late final _Dart_LoadLibraryFromKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_LoadLibraryFromKernel'); + late final _Dart_LoadLibraryFromKernel = _Dart_LoadLibraryFromKernelPtr + .asFunction, int)>(); + + /// Indicates that all outstanding load requests have been satisfied. + /// This finalizes all the new classes loaded and optionally completes + /// deferred library futures. + /// + /// Requires there to be a current isolate. + /// + /// \param complete_futures Specify true if all deferred library + /// futures should be completed, false otherwise. + /// + /// \return Success if all classes have been finalized and deferred library + /// futures are completed. Otherwise, returns an error. + Object Dart_FinalizeLoading( + bool complete_futures, + ) { + return _Dart_FinalizeLoading( + complete_futures, + ); + } + + late final _Dart_FinalizeLoadingPtr = + _lookup>( + 'Dart_FinalizeLoading'); + late final _Dart_FinalizeLoading = + _Dart_FinalizeLoadingPtr.asFunction(); + + /// Returns the value of peer field of 'object' in 'peer'. + /// + /// \param object An object. + /// \param peer An out parameter that returns the value of the peer + /// field. + /// + /// \return Returns an error if 'object' is a subtype of Null, num, or + /// bool. + Object Dart_GetPeer( + Object object, + ffi.Pointer> peer, + ) { + return _Dart_GetPeer( + object, + peer, + ); + } + + late final _Dart_GetPeerPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer>)>>('Dart_GetPeer'); + late final _Dart_GetPeer = _Dart_GetPeerPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); + + /// Sets the value of the peer field of 'object' to the value of + /// 'peer'. + /// + /// \param object An object. + /// \param peer A value to store in the peer field. + /// + /// \return Returns an error if 'object' is a subtype of Null, num, or + /// bool. + Object Dart_SetPeer( + Object object, + ffi.Pointer peer, + ) { + return _Dart_SetPeer( + object, + peer, + ); + } + + late final _Dart_SetPeerPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_SetPeer'); + late final _Dart_SetPeer = _Dart_SetPeerPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + bool Dart_IsKernelIsolate( + Dart_Isolate isolate, + ) { + return _Dart_IsKernelIsolate( + isolate, + ); + } + + late final _Dart_IsKernelIsolatePtr = + _lookup>( + 'Dart_IsKernelIsolate'); + late final _Dart_IsKernelIsolate = + _Dart_IsKernelIsolatePtr.asFunction(); + + bool Dart_KernelIsolateIsRunning() { + return _Dart_KernelIsolateIsRunning(); + } + + late final _Dart_KernelIsolateIsRunningPtr = + _lookup>( + 'Dart_KernelIsolateIsRunning'); + late final _Dart_KernelIsolateIsRunning = + _Dart_KernelIsolateIsRunningPtr.asFunction(); + + int Dart_KernelPort() { + return _Dart_KernelPort(); + } + + late final _Dart_KernelPortPtr = + _lookup>('Dart_KernelPort'); + late final _Dart_KernelPort = + _Dart_KernelPortPtr.asFunction(); + + /// Compiles the given `script_uri` to a kernel file. + /// + /// \param platform_kernel A buffer containing the kernel of the platform (e.g. + /// `vm_platform_strong.dill`). The VM does not take ownership of this memory. + /// + /// \param platform_kernel_size The length of the platform_kernel buffer. + /// + /// \param snapshot_compile Set to `true` when the compilation is for a snapshot. + /// This is used by the frontend to determine if compilation related information + /// should be printed to console (e.g., null safety mode). + /// + /// \param verbosity Specifies the logging behavior of the kernel compilation + /// service. + /// + /// \return Returns the result of the compilation. + /// + /// On a successful compilation the returned [Dart_KernelCompilationResult] has + /// a status of [Dart_KernelCompilationStatus_Ok] and the `kernel`/`kernel_size` + /// fields are set. The caller takes ownership of the malloc()ed buffer. + /// + /// On a failed compilation the `error` might be set describing the reason for + /// the failed compilation. The caller takes ownership of the malloc()ed + /// error. + /// + /// Requires there to be a current isolate. + Dart_KernelCompilationResult Dart_CompileToKernel( + ffi.Pointer script_uri, + ffi.Pointer platform_kernel, + int platform_kernel_size, + bool incremental_compile, + bool snapshot_compile, + ffi.Pointer package_config, + int verbosity, + ) { + return _Dart_CompileToKernel( + script_uri, + platform_kernel, + platform_kernel_size, + incremental_compile, + snapshot_compile, + package_config, + verbosity, + ); + } + + late final _Dart_CompileToKernelPtr = _lookup< + ffi.NativeFunction< + Dart_KernelCompilationResult Function( + ffi.Pointer, + ffi.Pointer, + ffi.IntPtr, + ffi.Bool, + ffi.Bool, + ffi.Pointer, + ffi.Int32)>>('Dart_CompileToKernel'); + late final _Dart_CompileToKernel = _Dart_CompileToKernelPtr.asFunction< + Dart_KernelCompilationResult Function( + ffi.Pointer, + ffi.Pointer, + int, + bool, + bool, + ffi.Pointer, + int)>(); + + Dart_KernelCompilationResult Dart_KernelListDependencies() { + return _Dart_KernelListDependencies(); + } + + late final _Dart_KernelListDependenciesPtr = + _lookup>( + 'Dart_KernelListDependencies'); + late final _Dart_KernelListDependencies = _Dart_KernelListDependenciesPtr + .asFunction(); + + /// Sets the kernel buffer which will be used to load Dart SDK sources + /// dynamically at runtime. + /// + /// \param platform_kernel A buffer containing kernel which has sources for the + /// Dart SDK populated. Note: The VM does not take ownership of this memory. + /// + /// \param platform_kernel_size The length of the platform_kernel buffer. + void Dart_SetDartLibrarySourcesKernel( + ffi.Pointer platform_kernel, + int platform_kernel_size, + ) { + return _Dart_SetDartLibrarySourcesKernel( + platform_kernel, + platform_kernel_size, + ); + } + + late final _Dart_SetDartLibrarySourcesKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_SetDartLibrarySourcesKernel'); + late final _Dart_SetDartLibrarySourcesKernel = + _Dart_SetDartLibrarySourcesKernelPtr.asFunction< + void Function(ffi.Pointer, int)>(); + + /// Detect the null safety opt-in status. + /// + /// When running from source, it is based on the opt-in status of `script_uri`. + /// When running from a kernel buffer, it is based on the mode used when + /// generating `kernel_buffer`. + /// When running from an appJIT or AOT snapshot, it is based on the mode used + /// when generating `snapshot_data`. + /// + /// \param script_uri Uri of the script that contains the source code + /// + /// \param package_config Uri of the package configuration file (either in format + /// of .packages or .dart_tool/package_config.json) for the null safety + /// detection to resolve package imports against. If this parameter is not + /// passed the package resolution of the parent isolate should be used. + /// + /// \param original_working_directory current working directory when the VM + /// process was launched, this is used to correctly resolve the path specified + /// for package_config. + /// + /// \param snapshot_data + /// + /// \param snapshot_instructions Buffers containing a snapshot of the + /// isolate or NULL if no snapshot is provided. If provided, the buffers must + /// remain valid until the isolate shuts down. + /// + /// \param kernel_buffer + /// + /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must + /// remain valid until isolate shutdown. + /// + /// \return Returns true if the null safety is opted in by the input being + /// run `script_uri`, `snapshot_data` or `kernel_buffer`. + bool Dart_DetectNullSafety( + ffi.Pointer script_uri, + ffi.Pointer package_config, + ffi.Pointer original_working_directory, + ffi.Pointer snapshot_data, + ffi.Pointer snapshot_instructions, + ffi.Pointer kernel_buffer, + int kernel_buffer_size, + ) { + return _Dart_DetectNullSafety( + script_uri, + package_config, + original_working_directory, + snapshot_data, + snapshot_instructions, + kernel_buffer, + kernel_buffer_size, + ); + } + + late final _Dart_DetectNullSafetyPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.IntPtr)>>('Dart_DetectNullSafety'); + late final _Dart_DetectNullSafety = _Dart_DetectNullSafetyPtr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + + /// Returns true if isolate is the service isolate. + /// + /// \param isolate An isolate + /// + /// \return Returns true if 'isolate' is the service isolate. + bool Dart_IsServiceIsolate( + Dart_Isolate isolate, + ) { + return _Dart_IsServiceIsolate( + isolate, + ); + } + + late final _Dart_IsServiceIsolatePtr = + _lookup>( + 'Dart_IsServiceIsolate'); + late final _Dart_IsServiceIsolate = + _Dart_IsServiceIsolatePtr.asFunction(); + + /// Writes the CPU profile to the timeline as a series of 'instant' events. + /// + /// Note that this is an expensive operation. + /// + /// \param main_port The main port of the Isolate whose profile samples to write. + /// \param error An optional error, must be free()ed by caller. + /// + /// \return Returns true if the profile is successfully written and false + /// otherwise. + bool Dart_WriteProfileToTimeline( + int main_port, + ffi.Pointer> error, + ) { + return _Dart_WriteProfileToTimeline( + main_port, + error, + ); + } + + late final _Dart_WriteProfileToTimelinePtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + Dart_Port, ffi.Pointer>)>>( + 'Dart_WriteProfileToTimeline'); + late final _Dart_WriteProfileToTimeline = _Dart_WriteProfileToTimelinePtr + .asFunction>)>(); + + /// Compiles all functions reachable from entry points and marks + /// the isolate to disallow future compilation. + /// + /// Entry points should be specified using `@pragma("vm:entry-point")` + /// annotation. + /// + /// \return An error handle if a compilation error or runtime error running const + /// constructors was encountered. + Object Dart_Precompile() { + return _Dart_Precompile(); + } + + late final _Dart_PrecompilePtr = + _lookup>('Dart_Precompile'); + late final _Dart_Precompile = + _Dart_PrecompilePtr.asFunction(); + + Object Dart_LoadingUnitLibraryUris( + int loading_unit_id, + ) { + return _Dart_LoadingUnitLibraryUris( + loading_unit_id, + ); + } + + late final _Dart_LoadingUnitLibraryUrisPtr = + _lookup>( + 'Dart_LoadingUnitLibraryUris'); + late final _Dart_LoadingUnitLibraryUris = + _Dart_LoadingUnitLibraryUrisPtr.asFunction(); + + /// Creates a precompiled snapshot. + /// - A root library must have been loaded. + /// - Dart_Precompile must have been called. + /// + /// Outputs an assembly file defining the symbols listed in the definitions + /// above. + /// + /// The assembly should be compiled as a static or shared library and linked or + /// loaded by the embedder. Running this snapshot requires a VM compiled with + /// DART_PRECOMPILED_SNAPSHOT. The kDartVmSnapshotData and + /// kDartVmSnapshotInstructions should be passed to Dart_Initialize. The + /// kDartIsolateSnapshotData and kDartIsolateSnapshotInstructions should be + /// passed to Dart_CreateIsolateGroup. + /// + /// The callback will be invoked one or more times to provide the assembly code. + /// + /// If stripped is true, then the assembly code will not include DWARF + /// debugging sections. + /// + /// If debug_callback_data is provided, debug_callback_data will be used with + /// the callback to provide separate debugging information. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateAppAOTSnapshotAsAssembly( + Dart_StreamingWriteCallback callback, + ffi.Pointer callback_data, + bool stripped, + ffi.Pointer debug_callback_data, + ) { + return _Dart_CreateAppAOTSnapshotAsAssembly( + callback, + callback_data, + stripped, + debug_callback_data, + ); + } + + late final _Dart_CreateAppAOTSnapshotAsAssemblyPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_StreamingWriteCallback, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsAssembly'); + late final _Dart_CreateAppAOTSnapshotAsAssembly = + _Dart_CreateAppAOTSnapshotAsAssemblyPtr.asFunction< + Object Function(Dart_StreamingWriteCallback, ffi.Pointer, + bool, ffi.Pointer)>(); + + Object Dart_CreateAppAOTSnapshotAsAssemblies( + Dart_CreateLoadingUnitCallback next_callback, + ffi.Pointer next_callback_data, + bool stripped, + Dart_StreamingWriteCallback write_callback, + Dart_StreamingCloseCallback close_callback, + ) { + return _Dart_CreateAppAOTSnapshotAsAssemblies( + next_callback, + next_callback_data, + stripped, + write_callback, + close_callback, + ); + } + + late final _Dart_CreateAppAOTSnapshotAsAssembliesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + ffi.Bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>>( + 'Dart_CreateAppAOTSnapshotAsAssemblies'); + late final _Dart_CreateAppAOTSnapshotAsAssemblies = + _Dart_CreateAppAOTSnapshotAsAssembliesPtr.asFunction< + Object Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>(); + + /// Creates a precompiled snapshot. + /// - A root library must have been loaded. + /// - Dart_Precompile must have been called. + /// + /// Outputs an ELF shared library defining the symbols + /// - _kDartVmSnapshotData + /// - _kDartVmSnapshotInstructions + /// - _kDartIsolateSnapshotData + /// - _kDartIsolateSnapshotInstructions + /// + /// The shared library should be dynamically loaded by the embedder. + /// Running this snapshot requires a VM compiled with DART_PRECOMPILED_SNAPSHOT. + /// The kDartVmSnapshotData and kDartVmSnapshotInstructions should be passed to + /// Dart_Initialize. The kDartIsolateSnapshotData and + /// kDartIsolateSnapshotInstructions should be passed to Dart_CreateIsolate. + /// + /// The callback will be invoked one or more times to provide the binary output. + /// + /// If stripped is true, then the binary output will not include DWARF + /// debugging sections. + /// + /// If debug_callback_data is provided, debug_callback_data will be used with + /// the callback to provide separate debugging information. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateAppAOTSnapshotAsElf( + Dart_StreamingWriteCallback callback, + ffi.Pointer callback_data, + bool stripped, + ffi.Pointer debug_callback_data, + ) { + return _Dart_CreateAppAOTSnapshotAsElf( + callback, + callback_data, + stripped, + debug_callback_data, + ); + } + + late final _Dart_CreateAppAOTSnapshotAsElfPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_StreamingWriteCallback, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsElf'); + late final _Dart_CreateAppAOTSnapshotAsElf = + _Dart_CreateAppAOTSnapshotAsElfPtr.asFunction< + Object Function(Dart_StreamingWriteCallback, ffi.Pointer, + bool, ffi.Pointer)>(); + + Object Dart_CreateAppAOTSnapshotAsElfs( + Dart_CreateLoadingUnitCallback next_callback, + ffi.Pointer next_callback_data, + bool stripped, + Dart_StreamingWriteCallback write_callback, + Dart_StreamingCloseCallback close_callback, + ) { + return _Dart_CreateAppAOTSnapshotAsElfs( + next_callback, + next_callback_data, + stripped, + write_callback, + close_callback, + ); + } + + late final _Dart_CreateAppAOTSnapshotAsElfsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + ffi.Bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>>('Dart_CreateAppAOTSnapshotAsElfs'); + late final _Dart_CreateAppAOTSnapshotAsElfs = + _Dart_CreateAppAOTSnapshotAsElfsPtr.asFunction< + Object Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>(); + + /// Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes + /// kDartVmSnapshotData and kDartVmSnapshotInstructions. It also does + /// not strip DWARF information from the generated assembly or allow for + /// separate debug information. + Object Dart_CreateVMAOTSnapshotAsAssembly( + Dart_StreamingWriteCallback callback, + ffi.Pointer callback_data, + ) { + return _Dart_CreateVMAOTSnapshotAsAssembly( + callback, + callback_data, + ); + } + + late final _Dart_CreateVMAOTSnapshotAsAssemblyPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_StreamingWriteCallback, + ffi.Pointer)>>('Dart_CreateVMAOTSnapshotAsAssembly'); + late final _Dart_CreateVMAOTSnapshotAsAssembly = + _Dart_CreateVMAOTSnapshotAsAssemblyPtr.asFunction< + Object Function( + Dart_StreamingWriteCallback, ffi.Pointer)>(); + + /// Sorts the class-ids in depth first traversal order of the inheritance + /// tree. This is a costly operation, but it can make method dispatch + /// more efficient and is done before writing snapshots. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_SortClasses() { + return _Dart_SortClasses(); + } + + late final _Dart_SortClassesPtr = + _lookup>('Dart_SortClasses'); + late final _Dart_SortClasses = + _Dart_SortClassesPtr.asFunction(); + + /// Creates a snapshot that caches compiled code and type feedback for faster + /// startup and quicker warmup in a subsequent process. + /// + /// Outputs a snapshot in two pieces. The pieces should be passed to + /// Dart_CreateIsolateGroup in a VM using the same VM snapshot pieces used in the + /// current VM. The instructions piece must be loaded with read and execute + /// permissions; the data piece may be loaded as read-only. + /// + /// - Requires the VM to have not been started with --precompilation. + /// - Not supported when targeting IA32. + /// - The VM writing the snapshot and the VM reading the snapshot must be the + /// same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must + /// be targeting the same architecture, and must both be in checked mode or + /// both in unchecked mode. + /// + /// The buffers are scope allocated and are only valid until the next call to + /// Dart_ExitScope. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateAppJITSnapshotAsBlobs( + ffi.Pointer> isolate_snapshot_data_buffer, + ffi.Pointer isolate_snapshot_data_size, + ffi.Pointer> isolate_snapshot_instructions_buffer, + ffi.Pointer isolate_snapshot_instructions_size, + ) { + return _Dart_CreateAppJITSnapshotAsBlobs( + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + isolate_snapshot_instructions_buffer, + isolate_snapshot_instructions_size, + ); + } + + late final _Dart_CreateAppJITSnapshotAsBlobsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('Dart_CreateAppJITSnapshotAsBlobs'); + late final _Dart_CreateAppJITSnapshotAsBlobs = + _Dart_CreateAppJITSnapshotAsBlobsPtr.asFunction< + Object Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); + + /// Like Dart_CreateAppJITSnapshotAsBlobs, but also creates a new VM snapshot. + Object Dart_CreateCoreJITSnapshotAsBlobs( + ffi.Pointer> vm_snapshot_data_buffer, + ffi.Pointer vm_snapshot_data_size, + ffi.Pointer> vm_snapshot_instructions_buffer, + ffi.Pointer vm_snapshot_instructions_size, + ffi.Pointer> isolate_snapshot_data_buffer, + ffi.Pointer isolate_snapshot_data_size, + ffi.Pointer> isolate_snapshot_instructions_buffer, + ffi.Pointer isolate_snapshot_instructions_size, + ) { + return _Dart_CreateCoreJITSnapshotAsBlobs( + vm_snapshot_data_buffer, + vm_snapshot_data_size, + vm_snapshot_instructions_buffer, + vm_snapshot_instructions_size, + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + isolate_snapshot_instructions_buffer, + isolate_snapshot_instructions_size, + ); + } + + late final _Dart_CreateCoreJITSnapshotAsBlobsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('Dart_CreateCoreJITSnapshotAsBlobs'); + late final _Dart_CreateCoreJITSnapshotAsBlobs = + _Dart_CreateCoreJITSnapshotAsBlobsPtr.asFunction< + Object Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); + + /// Get obfuscation map for precompiled code. + /// + /// Obfuscation map is encoded as a JSON array of pairs (original name, + /// obfuscated name). + /// + /// \return Returns an error handler if the VM was built in a mode that does not + /// support obfuscation. + Object Dart_GetObfuscationMap( + ffi.Pointer> buffer, + ffi.Pointer buffer_length, + ) { + return _Dart_GetObfuscationMap( + buffer, + buffer_length, + ); + } + + late final _Dart_GetObfuscationMapPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer>, + ffi.Pointer)>>('Dart_GetObfuscationMap'); + late final _Dart_GetObfuscationMap = _Dart_GetObfuscationMapPtr.asFunction< + Object Function( + ffi.Pointer>, ffi.Pointer)>(); + + /// Returns whether the VM only supports running from precompiled snapshots and + /// not from any other kind of snapshot or from source (that is, the VM was + /// compiled with DART_PRECOMPILED_RUNTIME). + bool Dart_IsPrecompiledRuntime() { + return _Dart_IsPrecompiledRuntime(); + } + + late final _Dart_IsPrecompiledRuntimePtr = + _lookup>( + 'Dart_IsPrecompiledRuntime'); + late final _Dart_IsPrecompiledRuntime = + _Dart_IsPrecompiledRuntimePtr.asFunction(); + + /// Print a native stack trace. Used for crash handling. + /// + /// If context is NULL, prints the current stack trace. Otherwise, context + /// should be a CONTEXT* (Windows) or ucontext_t* (POSIX) from a signal handler + /// running on the current thread. + void Dart_DumpNativeStackTrace( + ffi.Pointer context, + ) { + return _Dart_DumpNativeStackTrace( + context, + ); + } + + late final _Dart_DumpNativeStackTracePtr = + _lookup)>>( + 'Dart_DumpNativeStackTrace'); + late final _Dart_DumpNativeStackTrace = _Dart_DumpNativeStackTracePtr + .asFunction)>(); + + /// Indicate that the process is about to abort, and the Dart VM should not + /// attempt to cleanup resources. + void Dart_PrepareToAbort() { + return _Dart_PrepareToAbort(); + } + + late final _Dart_PrepareToAbortPtr = + _lookup>('Dart_PrepareToAbort'); + late final _Dart_PrepareToAbort = + _Dart_PrepareToAbortPtr.asFunction(); + + /// Posts a message on some port. The message will contain the Dart_CObject + /// object graph rooted in 'message'. + /// + /// While the message is being sent the state of the graph of Dart_CObject + /// structures rooted in 'message' should not be accessed, as the message + /// generation will make temporary modifications to the data. When the message + /// has been sent the graph will be fully restored. + /// + /// If true is returned, the message was enqueued, and finalizers for external + /// typed data will eventually run, even if the receiving isolate shuts down + /// before processing the message. If false is returned, the message was not + /// enqueued and ownership of external typed data in the message remains with the + /// caller. + /// + /// This function may be called on any thread when the VM is running (that is, + /// after Dart_Initialize has returned and before Dart_Cleanup has been called). + /// + /// \param port_id The destination port. + /// \param message The message to send. + /// + /// \return True if the message was posted. + bool Dart_PostCObject( + int port_id, + ffi.Pointer message, + ) { + return _Dart_PostCObject( + port_id, + message, + ); + } + + late final _Dart_PostCObjectPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + Dart_Port, ffi.Pointer)>>('Dart_PostCObject'); + late final _Dart_PostCObject = _Dart_PostCObjectPtr.asFunction< + bool Function(int, ffi.Pointer)>(); + + /// Posts a message on some port. The message will contain the integer 'message'. + /// + /// \param port_id The destination port. + /// \param message The message to send. + /// + /// \return True if the message was posted. + bool Dart_PostInteger( + int port_id, + int message, + ) { + return _Dart_PostInteger( + port_id, + message, + ); + } + + late final _Dart_PostIntegerPtr = + _lookup>( + 'Dart_PostInteger'); + late final _Dart_PostInteger = + _Dart_PostIntegerPtr.asFunction(); + + /// Creates a new native port. When messages are received on this + /// native port, then they will be dispatched to the provided native + /// message handler. + /// + /// \param name The name of this port in debugging messages. + /// \param handler The C handler to run when messages arrive on the port. + /// \param handle_concurrently Is it okay to process requests on this + /// native port concurrently? + /// + /// \return If successful, returns the port id for the native port. In + /// case of error, returns ILLEGAL_PORT. + int Dart_NewNativePort( + ffi.Pointer name, + Dart_NativeMessageHandler handler, + bool handle_concurrently, + ) { + return _Dart_NewNativePort( + name, + handler, + handle_concurrently, + ); + } + + late final _Dart_NewNativePortPtr = _lookup< + ffi.NativeFunction< + Dart_Port Function(ffi.Pointer, Dart_NativeMessageHandler, + ffi.Bool)>>('Dart_NewNativePort'); + late final _Dart_NewNativePort = _Dart_NewNativePortPtr.asFunction< + int Function(ffi.Pointer, Dart_NativeMessageHandler, bool)>(); + + /// Closes the native port with the given id. + /// + /// The port must have been allocated by a call to Dart_NewNativePort. + /// + /// \param native_port_id The id of the native port to close. + /// + /// \return Returns true if the port was closed successfully. + bool Dart_CloseNativePort( + int native_port_id, + ) { + return _Dart_CloseNativePort( + native_port_id, + ); + } + + late final _Dart_CloseNativePortPtr = + _lookup>( + 'Dart_CloseNativePort'); + late final _Dart_CloseNativePort = + _Dart_CloseNativePortPtr.asFunction(); + + /// Forces all loaded classes and functions to be compiled eagerly in + /// the current isolate.. + /// + /// TODO(turnidge): Document. + Object Dart_CompileAll() { + return _Dart_CompileAll(); + } + + late final _Dart_CompileAllPtr = + _lookup>('Dart_CompileAll'); + late final _Dart_CompileAll = + _Dart_CompileAllPtr.asFunction(); + + /// Finalizes all classes. + Object Dart_FinalizeAllClasses() { + return _Dart_FinalizeAllClasses(); + } + + late final _Dart_FinalizeAllClassesPtr = + _lookup>( + 'Dart_FinalizeAllClasses'); + late final _Dart_FinalizeAllClasses = + _Dart_FinalizeAllClassesPtr.asFunction(); + + /// This function is intentionally undocumented. + /// + /// It should not be used outside internal tests. + ffi.Pointer Dart_ExecuteInternalCommand( + ffi.Pointer command, + ffi.Pointer arg, + ) { + return _Dart_ExecuteInternalCommand( + command, + arg, + ); + } + + late final _Dart_ExecuteInternalCommandPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>('Dart_ExecuteInternalCommand'); + late final _Dart_ExecuteInternalCommand = + _Dart_ExecuteInternalCommandPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + /// \mainpage Dynamically Linked Dart API + /// + /// This exposes a subset of symbols from dart_api.h and dart_native_api.h + /// available in every Dart embedder through dynamic linking. + /// + /// All symbols are postfixed with _DL to indicate that they are dynamically + /// linked and to prevent conflicts with the original symbol. + /// + /// Link `dart_api_dl.c` file into your library and invoke + /// `Dart_InitializeApiDL` with `NativeApi.initializeApiDLData`. + int Dart_InitializeApiDL( + ffi.Pointer data, + ) { + return _Dart_InitializeApiDL( + data, + ); + } + + late final _Dart_InitializeApiDLPtr = + _lookup)>>( + 'Dart_InitializeApiDL'); + late final _Dart_InitializeApiDL = _Dart_InitializeApiDLPtr.asFunction< + int Function(ffi.Pointer)>(); + + late final ffi.Pointer _Dart_PostCObject_DL = + _lookup('Dart_PostCObject_DL'); + + Dart_PostCObject_Type get Dart_PostCObject_DL => _Dart_PostCObject_DL.value; + + set Dart_PostCObject_DL(Dart_PostCObject_Type value) => + _Dart_PostCObject_DL.value = value; + + late final ffi.Pointer _Dart_PostInteger_DL = + _lookup('Dart_PostInteger_DL'); + + Dart_PostInteger_Type get Dart_PostInteger_DL => _Dart_PostInteger_DL.value; + + set Dart_PostInteger_DL(Dart_PostInteger_Type value) => + _Dart_PostInteger_DL.value = value; + + late final ffi.Pointer _Dart_NewNativePort_DL = + _lookup('Dart_NewNativePort_DL'); + + Dart_NewNativePort_Type get Dart_NewNativePort_DL => + _Dart_NewNativePort_DL.value; + + set Dart_NewNativePort_DL(Dart_NewNativePort_Type value) => + _Dart_NewNativePort_DL.value = value; + + late final ffi.Pointer _Dart_CloseNativePort_DL = + _lookup('Dart_CloseNativePort_DL'); + + Dart_CloseNativePort_Type get Dart_CloseNativePort_DL => + _Dart_CloseNativePort_DL.value; + + set Dart_CloseNativePort_DL(Dart_CloseNativePort_Type value) => + _Dart_CloseNativePort_DL.value = value; + + late final ffi.Pointer _Dart_IsError_DL = + _lookup('Dart_IsError_DL'); + + Dart_IsError_Type get Dart_IsError_DL => _Dart_IsError_DL.value; + + set Dart_IsError_DL(Dart_IsError_Type value) => + _Dart_IsError_DL.value = value; + + late final ffi.Pointer _Dart_IsApiError_DL = + _lookup('Dart_IsApiError_DL'); + + Dart_IsApiError_Type get Dart_IsApiError_DL => _Dart_IsApiError_DL.value; + + set Dart_IsApiError_DL(Dart_IsApiError_Type value) => + _Dart_IsApiError_DL.value = value; + + late final ffi.Pointer + _Dart_IsUnhandledExceptionError_DL = + _lookup( + 'Dart_IsUnhandledExceptionError_DL'); + + Dart_IsUnhandledExceptionError_Type get Dart_IsUnhandledExceptionError_DL => + _Dart_IsUnhandledExceptionError_DL.value; + + set Dart_IsUnhandledExceptionError_DL( + Dart_IsUnhandledExceptionError_Type value) => + _Dart_IsUnhandledExceptionError_DL.value = value; + + late final ffi.Pointer + _Dart_IsCompilationError_DL = + _lookup('Dart_IsCompilationError_DL'); + + Dart_IsCompilationError_Type get Dart_IsCompilationError_DL => + _Dart_IsCompilationError_DL.value; + + set Dart_IsCompilationError_DL(Dart_IsCompilationError_Type value) => + _Dart_IsCompilationError_DL.value = value; + + late final ffi.Pointer _Dart_IsFatalError_DL = + _lookup('Dart_IsFatalError_DL'); + + Dart_IsFatalError_Type get Dart_IsFatalError_DL => + _Dart_IsFatalError_DL.value; + + set Dart_IsFatalError_DL(Dart_IsFatalError_Type value) => + _Dart_IsFatalError_DL.value = value; + + late final ffi.Pointer _Dart_GetError_DL = + _lookup('Dart_GetError_DL'); + + Dart_GetError_Type get Dart_GetError_DL => _Dart_GetError_DL.value; + + set Dart_GetError_DL(Dart_GetError_Type value) => + _Dart_GetError_DL.value = value; + + late final ffi.Pointer + _Dart_ErrorHasException_DL = + _lookup('Dart_ErrorHasException_DL'); + + Dart_ErrorHasException_Type get Dart_ErrorHasException_DL => + _Dart_ErrorHasException_DL.value; + + set Dart_ErrorHasException_DL(Dart_ErrorHasException_Type value) => + _Dart_ErrorHasException_DL.value = value; + + late final ffi.Pointer + _Dart_ErrorGetException_DL = + _lookup('Dart_ErrorGetException_DL'); + + Dart_ErrorGetException_Type get Dart_ErrorGetException_DL => + _Dart_ErrorGetException_DL.value; + + set Dart_ErrorGetException_DL(Dart_ErrorGetException_Type value) => + _Dart_ErrorGetException_DL.value = value; + + late final ffi.Pointer + _Dart_ErrorGetStackTrace_DL = + _lookup('Dart_ErrorGetStackTrace_DL'); + + Dart_ErrorGetStackTrace_Type get Dart_ErrorGetStackTrace_DL => + _Dart_ErrorGetStackTrace_DL.value; + + set Dart_ErrorGetStackTrace_DL(Dart_ErrorGetStackTrace_Type value) => + _Dart_ErrorGetStackTrace_DL.value = value; + + late final ffi.Pointer _Dart_NewApiError_DL = + _lookup('Dart_NewApiError_DL'); + + Dart_NewApiError_Type get Dart_NewApiError_DL => _Dart_NewApiError_DL.value; + + set Dart_NewApiError_DL(Dart_NewApiError_Type value) => + _Dart_NewApiError_DL.value = value; + + late final ffi.Pointer + _Dart_NewCompilationError_DL = + _lookup('Dart_NewCompilationError_DL'); + + Dart_NewCompilationError_Type get Dart_NewCompilationError_DL => + _Dart_NewCompilationError_DL.value; + + set Dart_NewCompilationError_DL(Dart_NewCompilationError_Type value) => + _Dart_NewCompilationError_DL.value = value; + + late final ffi.Pointer + _Dart_NewUnhandledExceptionError_DL = + _lookup( + 'Dart_NewUnhandledExceptionError_DL'); + + Dart_NewUnhandledExceptionError_Type get Dart_NewUnhandledExceptionError_DL => + _Dart_NewUnhandledExceptionError_DL.value; + + set Dart_NewUnhandledExceptionError_DL( + Dart_NewUnhandledExceptionError_Type value) => + _Dart_NewUnhandledExceptionError_DL.value = value; + + late final ffi.Pointer _Dart_PropagateError_DL = + _lookup('Dart_PropagateError_DL'); + + Dart_PropagateError_Type get Dart_PropagateError_DL => + _Dart_PropagateError_DL.value; + + set Dart_PropagateError_DL(Dart_PropagateError_Type value) => + _Dart_PropagateError_DL.value = value; + + late final ffi.Pointer + _Dart_HandleFromPersistent_DL = + _lookup('Dart_HandleFromPersistent_DL'); + + Dart_HandleFromPersistent_Type get Dart_HandleFromPersistent_DL => + _Dart_HandleFromPersistent_DL.value; + + set Dart_HandleFromPersistent_DL(Dart_HandleFromPersistent_Type value) => + _Dart_HandleFromPersistent_DL.value = value; + + late final ffi.Pointer + _Dart_HandleFromWeakPersistent_DL = + _lookup( + 'Dart_HandleFromWeakPersistent_DL'); + + Dart_HandleFromWeakPersistent_Type get Dart_HandleFromWeakPersistent_DL => + _Dart_HandleFromWeakPersistent_DL.value; + + set Dart_HandleFromWeakPersistent_DL( + Dart_HandleFromWeakPersistent_Type value) => + _Dart_HandleFromWeakPersistent_DL.value = value; + + late final ffi.Pointer + _Dart_NewPersistentHandle_DL = + _lookup('Dart_NewPersistentHandle_DL'); + + Dart_NewPersistentHandle_Type get Dart_NewPersistentHandle_DL => + _Dart_NewPersistentHandle_DL.value; + + set Dart_NewPersistentHandle_DL(Dart_NewPersistentHandle_Type value) => + _Dart_NewPersistentHandle_DL.value = value; + + late final ffi.Pointer + _Dart_SetPersistentHandle_DL = + _lookup('Dart_SetPersistentHandle_DL'); + + Dart_SetPersistentHandle_Type get Dart_SetPersistentHandle_DL => + _Dart_SetPersistentHandle_DL.value; + + set Dart_SetPersistentHandle_DL(Dart_SetPersistentHandle_Type value) => + _Dart_SetPersistentHandle_DL.value = value; + + late final ffi.Pointer + _Dart_DeletePersistentHandle_DL = + _lookup( + 'Dart_DeletePersistentHandle_DL'); + + Dart_DeletePersistentHandle_Type get Dart_DeletePersistentHandle_DL => + _Dart_DeletePersistentHandle_DL.value; + + set Dart_DeletePersistentHandle_DL(Dart_DeletePersistentHandle_Type value) => + _Dart_DeletePersistentHandle_DL.value = value; + + late final ffi.Pointer + _Dart_NewWeakPersistentHandle_DL = + _lookup( + 'Dart_NewWeakPersistentHandle_DL'); + + Dart_NewWeakPersistentHandle_Type get Dart_NewWeakPersistentHandle_DL => + _Dart_NewWeakPersistentHandle_DL.value; + + set Dart_NewWeakPersistentHandle_DL( + Dart_NewWeakPersistentHandle_Type value) => + _Dart_NewWeakPersistentHandle_DL.value = value; + + late final ffi.Pointer + _Dart_DeleteWeakPersistentHandle_DL = + _lookup( + 'Dart_DeleteWeakPersistentHandle_DL'); + + Dart_DeleteWeakPersistentHandle_Type get Dart_DeleteWeakPersistentHandle_DL => + _Dart_DeleteWeakPersistentHandle_DL.value; + + set Dart_DeleteWeakPersistentHandle_DL( + Dart_DeleteWeakPersistentHandle_Type value) => + _Dart_DeleteWeakPersistentHandle_DL.value = value; + + late final ffi.Pointer + _Dart_UpdateExternalSize_DL = + _lookup('Dart_UpdateExternalSize_DL'); + + Dart_UpdateExternalSize_Type get Dart_UpdateExternalSize_DL => + _Dart_UpdateExternalSize_DL.value; + + set Dart_UpdateExternalSize_DL(Dart_UpdateExternalSize_Type value) => + _Dart_UpdateExternalSize_DL.value = value; + + late final ffi.Pointer + _Dart_NewFinalizableHandle_DL = + _lookup('Dart_NewFinalizableHandle_DL'); + + Dart_NewFinalizableHandle_Type get Dart_NewFinalizableHandle_DL => + _Dart_NewFinalizableHandle_DL.value; + + set Dart_NewFinalizableHandle_DL(Dart_NewFinalizableHandle_Type value) => + _Dart_NewFinalizableHandle_DL.value = value; + + late final ffi.Pointer + _Dart_DeleteFinalizableHandle_DL = + _lookup( + 'Dart_DeleteFinalizableHandle_DL'); + + Dart_DeleteFinalizableHandle_Type get Dart_DeleteFinalizableHandle_DL => + _Dart_DeleteFinalizableHandle_DL.value; + + set Dart_DeleteFinalizableHandle_DL( + Dart_DeleteFinalizableHandle_Type value) => + _Dart_DeleteFinalizableHandle_DL.value = value; + + late final ffi.Pointer + _Dart_UpdateFinalizableExternalSize_DL = + _lookup( + 'Dart_UpdateFinalizableExternalSize_DL'); + + Dart_UpdateFinalizableExternalSize_Type + get Dart_UpdateFinalizableExternalSize_DL => + _Dart_UpdateFinalizableExternalSize_DL.value; + + set Dart_UpdateFinalizableExternalSize_DL( + Dart_UpdateFinalizableExternalSize_Type value) => + _Dart_UpdateFinalizableExternalSize_DL.value = value; + + late final ffi.Pointer _Dart_Post_DL = + _lookup('Dart_Post_DL'); + + Dart_Post_Type get Dart_Post_DL => _Dart_Post_DL.value; + + set Dart_Post_DL(Dart_Post_Type value) => _Dart_Post_DL.value = value; + + late final ffi.Pointer _Dart_NewSendPort_DL = + _lookup('Dart_NewSendPort_DL'); + + Dart_NewSendPort_Type get Dart_NewSendPort_DL => _Dart_NewSendPort_DL.value; + + set Dart_NewSendPort_DL(Dart_NewSendPort_Type value) => + _Dart_NewSendPort_DL.value = value; + + late final ffi.Pointer _Dart_SendPortGetId_DL = + _lookup('Dart_SendPortGetId_DL'); + + Dart_SendPortGetId_Type get Dart_SendPortGetId_DL => + _Dart_SendPortGetId_DL.value; + + set Dart_SendPortGetId_DL(Dart_SendPortGetId_Type value) => + _Dart_SendPortGetId_DL.value = value; + + late final ffi.Pointer _Dart_EnterScope_DL = + _lookup('Dart_EnterScope_DL'); + + Dart_EnterScope_Type get Dart_EnterScope_DL => _Dart_EnterScope_DL.value; + + set Dart_EnterScope_DL(Dart_EnterScope_Type value) => + _Dart_EnterScope_DL.value = value; + + late final ffi.Pointer _Dart_ExitScope_DL = + _lookup('Dart_ExitScope_DL'); + + Dart_ExitScope_Type get Dart_ExitScope_DL => _Dart_ExitScope_DL.value; + + set Dart_ExitScope_DL(Dart_ExitScope_Type value) => + _Dart_ExitScope_DL.value = value; + + late final _class_CUPHTTPTaskConfiguration1 = + _getClass1("CUPHTTPTaskConfiguration"); + late final _sel_initWithPort_1 = _registerName1("initWithPort:"); + ffi.Pointer _objc_msgSend_470( + ffi.Pointer obj, + ffi.Pointer sel, + int sendPort, + ) { + return __objc_msgSend_470( + obj, + sel, + sendPort, + ); + } + + late final __objc_msgSend_470Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, Dart_Port)>>('objc_msgSend'); + late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_sendPort1 = _registerName1("sendPort"); + late final _class_CUPHTTPClientDelegate1 = + _getClass1("CUPHTTPClientDelegate"); + late final _sel_registerTask_withConfiguration_1 = + _registerName1("registerTask:withConfiguration:"); + void _objc_msgSend_471( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer config, + ) { + return __objc_msgSend_471( + obj, + sel, + task, + config, + ); + } + + late final __objc_msgSend_471Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_CUPHTTPForwardedDelegate1 = + _getClass1("CUPHTTPForwardedDelegate"); + late final _sel_initWithSession_task_1 = + _registerName1("initWithSession:task:"); + ffi.Pointer _objc_msgSend_472( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ) { + return __objc_msgSend_472( + obj, + sel, + session, + task, + ); + } + + late final __objc_msgSend_472Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_finish1 = _registerName1("finish"); + late final _sel_session1 = _registerName1("session"); + late final _sel_task1 = _registerName1("task"); + ffi.Pointer _objc_msgSend_473( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_473( + obj, + sel, + ); + } + + late final __objc_msgSend_473Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSLock1 = _getClass1("NSLock"); + late final _sel_lock1 = _registerName1("lock"); + ffi.Pointer _objc_msgSend_474( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_474( + obj, + sel, + ); + } + + late final __objc_msgSend_474Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_CUPHTTPForwardedRedirect1 = + _getClass1("CUPHTTPForwardedRedirect"); + late final _sel_initWithSession_task_response_request_1 = + _registerName1("initWithSession:task:response:request:"); + ffi.Pointer _objc_msgSend_475( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer response, + ffi.Pointer request, + ) { + return __objc_msgSend_475( + obj, + sel, + session, + task, + response, + request, + ); + } + + late final __objc_msgSend_475Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); + void _objc_msgSend_476( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_476( + obj, + sel, + request, + ); + } + + late final __objc_msgSend_476Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_477( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_477( + obj, + sel, + ); + } + + late final __objc_msgSend_477Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_redirectRequest1 = _registerName1("redirectRequest"); + late final _class_CUPHTTPForwardedResponse1 = + _getClass1("CUPHTTPForwardedResponse"); + late final _sel_initWithSession_task_response_1 = + _registerName1("initWithSession:task:response:"); + ffi.Pointer _objc_msgSend_478( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer response, + ) { + return __objc_msgSend_478( + obj, + sel, + session, + task, + response, + ); + } + + late final __objc_msgSend_478Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_finishWithDisposition_1 = + _registerName1("finishWithDisposition:"); + void _objc_msgSend_479( + ffi.Pointer obj, + ffi.Pointer sel, + int disposition, + ) { + return __objc_msgSend_479( + obj, + sel, + disposition, + ); + } + + late final __objc_msgSend_479Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_disposition1 = _registerName1("disposition"); + int _objc_msgSend_480( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_480( + obj, + sel, + ); + } + + late final __objc_msgSend_480Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); + late final _sel_initWithSession_task_data_1 = + _registerName1("initWithSession:task:data:"); + ffi.Pointer _objc_msgSend_481( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer data, + ) { + return __objc_msgSend_481( + obj, + sel, + session, + task, + data, + ); + } + + late final __objc_msgSend_481Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _class_CUPHTTPForwardedComplete1 = + _getClass1("CUPHTTPForwardedComplete"); + late final _sel_initWithSession_task_error_1 = + _registerName1("initWithSession:task:error:"); + ffi.Pointer _objc_msgSend_482( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer error, + ) { + return __objc_msgSend_482( + obj, + sel, + session, + task, + error, + ); + } + + late final __objc_msgSend_482Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _class_CUPHTTPForwardedFinishedDownloading1 = + _getClass1("CUPHTTPForwardedFinishedDownloading"); + late final _sel_initWithSession_downloadTask_url_1 = + _registerName1("initWithSession:downloadTask:url:"); + ffi.Pointer _objc_msgSend_483( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer downloadTask, + ffi.Pointer location, + ) { + return __objc_msgSend_483( + obj, + sel, + session, + downloadTask, + location, + ); + } + + late final __objc_msgSend_483Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_location1 = _registerName1("location"); +} + +class __mbstate_t extends ffi.Union { + @ffi.Array.multi([128]) + external ffi.Array __mbstate8; + + @ffi.LongLong() + external int _mbstateL; +} + +class __darwin_pthread_handler_rec extends ffi.Struct { + external ffi + .Pointer)>> + __routine; + + external ffi.Pointer __arg; + + external ffi.Pointer<__darwin_pthread_handler_rec> __next; +} + +class _opaque_pthread_attr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([56]) + external ffi.Array __opaque; +} + +class _opaque_pthread_cond_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([40]) + external ffi.Array __opaque; +} + +class _opaque_pthread_condattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} + +class _opaque_pthread_mutex_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([56]) + external ffi.Array __opaque; +} + +class _opaque_pthread_mutexattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} + +class _opaque_pthread_once_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} + +class _opaque_pthread_rwlock_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([192]) + external ffi.Array __opaque; +} + +class _opaque_pthread_rwlockattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([16]) + external ffi.Array __opaque; +} + +class _opaque_pthread_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; + + @ffi.Array.multi([8176]) + external ffi.Array __opaque; +} + +@ffi.Packed(1) +class _OSUnalignedU16 extends ffi.Struct { + @ffi.Uint16() + external int __val; +} + +@ffi.Packed(1) +class _OSUnalignedU32 extends ffi.Struct { + @ffi.Uint32() + external int __val; +} + +@ffi.Packed(1) +class _OSUnalignedU64 extends ffi.Struct { + @ffi.Uint64() + external int __val; +} + +class fd_set extends ffi.Struct { + @ffi.Array.multi([32]) + external ffi.Array<__int32_t> fds_bits; +} + +typedef __int32_t = ffi.Int; + +class objc_class extends ffi.Opaque {} + +class objc_object extends ffi.Struct { + external ffi.Pointer isa; +} + +class ObjCObject extends ffi.Opaque {} + +class objc_selector extends ffi.Opaque {} + +class ObjCSel extends ffi.Opaque {} + +typedef objc_objectptr_t = ffi.Pointer; + +class _NSZone extends ffi.Opaque {} + +class _ObjCWrapper implements ffi.Finalizable { + final ffi.Pointer _id; + final NativeCupertinoHttp _lib; + bool _pendingRelease; + + _ObjCWrapper._(this._id, this._lib, + {bool retain = false, bool release = false}) + : _pendingRelease = release { + if (retain) { + _lib._objc_retain(_id.cast()); + } + if (release) { + _lib._objc_releaseFinalizer2.attach(this, _id.cast(), detach: this); + } + } + + /// Releases the reference to the underlying ObjC object held by this wrapper. + /// Throws a StateError if this wrapper doesn't currently hold a reference. + void release() { + if (_pendingRelease) { + _pendingRelease = false; + _lib._objc_release(_id.cast()); + _lib._objc_releaseFinalizer2.detach(this); + } else { + throw StateError( + 'Released an ObjC object that was unowned or already released.'); + } + } + + @override + bool operator ==(Object other) { + return other is _ObjCWrapper && _id == other._id; + } + + @override + int get hashCode => _id.hashCode; +} + +class NSObject extends _ObjCWrapper { + NSObject._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSObject] that points to the same underlying object as [other]. + static NSObject castFrom(T other) { + return NSObject._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSObject] that wraps the given raw object pointer. + static NSObject castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSObject._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSObject]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); + } + + static void load(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); + } + + static void initialize(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); + } + + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + void dealloc() { + return _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); + } + + void finalize() { + return _lib._objc_msgSend_1(_id, _lib._sel_finalize1); + } + + NSObject copy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + NSObject mutableCopy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject copyWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static NSObject mutableCopyWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static bool instancesRespondToSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_4(_lib._class_NSObject1, + _lib._sel_instancesRespondToSelector_1, aSelector); + } + + static bool conformsToProtocol_( + NativeCupertinoHttp _lib, Protocol? protocol) { + return _lib._objc_msgSend_5(_lib._class_NSObject1, + _lib._sel_conformsToProtocol_1, protocol?._id ?? ffi.nullptr); + } + + IMP methodForSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); + } + + static IMP instanceMethodForSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_lib._class_NSObject1, + _lib._sel_instanceMethodForSelector_1, aSelector); + } + + void doesNotRecognizeSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_7( + _id, _lib._sel_doesNotRecognizeSelector_1, aSelector); + } + + NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_8( + _id, _lib._sel_forwardingTargetForSelector_1, aSelector); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void forwardInvocation_(NSInvocation? anInvocation) { + return _lib._objc_msgSend_9( + _id, _lib._sel_forwardInvocation_1, anInvocation?._id ?? ffi.nullptr); + } + + NSMethodSignature methodSignatureForSelector_( + ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_10( + _id, _lib._sel_methodSignatureForSelector_1, aSelector); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); + } + + static NSMethodSignature instanceMethodSignatureForSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_10(_lib._class_NSObject1, + _lib._sel_instanceMethodSignatureForSelector_1, aSelector); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); + } + + bool allowsWeakReference() { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsWeakReference1); + } + + bool retainWeakReference() { + return _lib._objc_msgSend_11(_id, _lib._sel_retainWeakReference1); + } + + static bool isSubclassOfClass_(NativeCupertinoHttp _lib, NSObject aClass) { + return _lib._objc_msgSend_0( + _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); + } + + static bool resolveClassMethod_( + NativeCupertinoHttp _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); + } + + static bool resolveInstanceMethod_( + NativeCupertinoHttp _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); + } + + static int hash(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); + } + + static NSObject superclass(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject class1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSString description(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_32(_lib._class_NSObject1, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString debugDescription(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_32( + _lib._class_NSObject1, _lib._sel_debugDescription1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int version(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_81(_lib._class_NSObject1, _lib._sel_version1); + } + + static void setVersion_(NativeCupertinoHttp _lib, int aVersion) { + return _lib._objc_msgSend_275( + _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); + } + + NSObject get classForCoder { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject replacementObjectForCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_replacementObjectForCoder_1, coder?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject awakeAfterUsingCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_awakeAfterUsingCoder_1, coder?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + static void poseAsClass_(NativeCupertinoHttp _lib, NSObject aClass) { + return _lib._objc_msgSend_200( + _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); + } + + NSObject get autoContentAccessingProxy { + final _ret = + _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void URL_resourceDataDidBecomeAvailable_(NSURL? sender, NSData? newBytes) { + return _lib._objc_msgSend_276( + _id, + _lib._sel_URL_resourceDataDidBecomeAvailable_1, + sender?._id ?? ffi.nullptr, + newBytes?._id ?? ffi.nullptr); + } + + void URLResourceDidFinishLoading_(NSURL? sender) { + return _lib._objc_msgSend_277(_id, _lib._sel_URLResourceDidFinishLoading_1, + sender?._id ?? ffi.nullptr); + } + + void URLResourceDidCancelLoading_(NSURL? sender) { + return _lib._objc_msgSend_277(_id, _lib._sel_URLResourceDidCancelLoading_1, + sender?._id ?? ffi.nullptr); + } + + void URL_resourceDidFailLoadingWithReason_(NSURL? sender, NSString? reason) { + return _lib._objc_msgSend_278( + _id, + _lib._sel_URL_resourceDidFailLoadingWithReason_1, + sender?._id ?? ffi.nullptr, + reason?._id ?? ffi.nullptr); + } + + /// Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: + /// + /// - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; + /// + /// The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. + void + attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( + NSError? error, + int recoveryOptionIndex, + NSObject delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo) { + return _lib._objc_msgSend_279( + _id, + _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, + error?._id ?? ffi.nullptr, + recoveryOptionIndex, + delegate._id, + didRecoverSelector, + contextInfo); + } + + /// Given that an error alert has been presented applicaton-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and return YES if error recovery was completely successful, NO otherwise. The recovery option index is an index into the error's array of localized recovery options. + bool attemptRecoveryFromError_optionIndex_( + NSError? error, int recoveryOptionIndex) { + return _lib._objc_msgSend_280( + _id, + _lib._sel_attemptRecoveryFromError_optionIndex_1, + error?._id ?? ffi.nullptr, + recoveryOptionIndex); + } +} + +typedef instancetype = ffi.Pointer; + +class Protocol extends _ObjCWrapper { + Protocol._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [Protocol] that points to the same underlying object as [other]. + static Protocol castFrom(T other) { + return Protocol._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [Protocol] that wraps the given raw object pointer. + static Protocol castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return Protocol._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [Protocol]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); + } +} + +typedef IMP = ffi.Pointer>; + +class NSInvocation extends _ObjCWrapper { + NSInvocation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSInvocation] that points to the same underlying object as [other]. + static NSInvocation castFrom(T other) { + return NSInvocation._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSInvocation] that wraps the given raw object pointer. + static NSInvocation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInvocation._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSInvocation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInvocation1); + } +} + +class NSMethodSignature extends _ObjCWrapper { + NSMethodSignature._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. + static NSMethodSignature castFrom(T other) { + return NSMethodSignature._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMethodSignature] that wraps the given raw object pointer. + static NSMethodSignature castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMethodSignature._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMethodSignature]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMethodSignature1); + } +} + +typedef NSUInteger = ffi.UnsignedLong; + +class NSString extends NSObject { + NSString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSString] that points to the same underlying object as [other]. + static NSString castFrom(T other) { + return NSString._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSString] that wraps the given raw object pointer. + static NSString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSString._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); + } + + factory NSString(NativeCupertinoHttp _lib, String str) { + final cstr = str.toNativeUtf16(); + final nsstr = stringWithCharacters_length_(_lib, cstr.cast(), str.length); + pkg_ffi.calloc.free(cstr); + return nsstr; + } + + @override + String toString() { + final data = + dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); + return data.bytes.cast().toDartString(length: length); + } + + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); + } + + int characterAtIndex_(int index) { + return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); + } + + @override + NSString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString substringFromIndex_(int from) { + final _ret = + _lib._objc_msgSend_15(_id, _lib._sel_substringFromIndex_1, from); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString substringToIndex_(int to) { + final _ret = _lib._objc_msgSend_15(_id, _lib._sel_substringToIndex_1, to); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString substringWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_16(_id, _lib._sel_substringWithRange_1, range); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void getCharacters_range_(ffi.Pointer buffer, NSRange range) { + return _lib._objc_msgSend_17( + _id, _lib._sel_getCharacters_range_1, buffer, range); + } + + int compare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_compare_1, string?._id ?? ffi.nullptr); + } + + int compare_options_(NSString? string, int mask) { + return _lib._objc_msgSend_19( + _id, _lib._sel_compare_options_1, string?._id ?? ffi.nullptr, mask); + } + + int compare_options_range_( + NSString? string, int mask, NSRange rangeOfReceiverToCompare) { + return _lib._objc_msgSend_20(_id, _lib._sel_compare_options_range_1, + string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare); + } + + int compare_options_range_locale_(NSString? string, int mask, + NSRange rangeOfReceiverToCompare, NSObject locale) { + return _lib._objc_msgSend_21(_id, _lib._sel_compare_options_range_locale_1, + string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare, locale._id); + } + + int caseInsensitiveCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_caseInsensitiveCompare_1, string?._id ?? ffi.nullptr); + } + + int localizedCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_localizedCompare_1, string?._id ?? ffi.nullptr); + } + + int localizedCaseInsensitiveCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, + _lib._sel_localizedCaseInsensitiveCompare_1, + string?._id ?? ffi.nullptr); + } + + int localizedStandardCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_localizedStandardCompare_1, string?._id ?? ffi.nullptr); + } + + bool isEqualToString_(NSString? aString) { + return _lib._objc_msgSend_22( + _id, _lib._sel_isEqualToString_1, aString?._id ?? ffi.nullptr); + } + + bool hasPrefix_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_hasPrefix_1, str?._id ?? ffi.nullptr); + } + + bool hasSuffix_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_hasSuffix_1, str?._id ?? ffi.nullptr); + } + + NSString commonPrefixWithString_options_(NSString? str, int mask) { + final _ret = _lib._objc_msgSend_23( + _id, + _lib._sel_commonPrefixWithString_options_1, + str?._id ?? ffi.nullptr, + mask); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool containsString_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_containsString_1, str?._id ?? ffi.nullptr); + } + + bool localizedCaseInsensitiveContainsString_(NSString? str) { + return _lib._objc_msgSend_22( + _id, + _lib._sel_localizedCaseInsensitiveContainsString_1, + str?._id ?? ffi.nullptr); + } + + bool localizedStandardContainsString_(NSString? str) { + return _lib._objc_msgSend_22(_id, + _lib._sel_localizedStandardContainsString_1, str?._id ?? ffi.nullptr); + } + + NSRange localizedStandardRangeOfString_(NSString? str) { + return _lib._objc_msgSend_24(_id, + _lib._sel_localizedStandardRangeOfString_1, str?._id ?? ffi.nullptr); + } + + NSRange rangeOfString_(NSString? searchString) { + return _lib._objc_msgSend_24( + _id, _lib._sel_rangeOfString_1, searchString?._id ?? ffi.nullptr); + } + + NSRange rangeOfString_options_(NSString? searchString, int mask) { + return _lib._objc_msgSend_25(_id, _lib._sel_rangeOfString_options_1, + searchString?._id ?? ffi.nullptr, mask); + } + + NSRange rangeOfString_options_range_( + NSString? searchString, int mask, NSRange rangeOfReceiverToSearch) { + return _lib._objc_msgSend_26(_id, _lib._sel_rangeOfString_options_range_1, + searchString?._id ?? ffi.nullptr, mask, rangeOfReceiverToSearch); + } + + NSRange rangeOfString_options_range_locale_(NSString? searchString, int mask, + NSRange rangeOfReceiverToSearch, NSLocale? locale) { + return _lib._objc_msgSend_27( + _id, + _lib._sel_rangeOfString_options_range_locale_1, + searchString?._id ?? ffi.nullptr, + mask, + rangeOfReceiverToSearch, + locale?._id ?? ffi.nullptr); + } + + NSRange rangeOfCharacterFromSet_(NSCharacterSet? searchSet) { + return _lib._objc_msgSend_228(_id, _lib._sel_rangeOfCharacterFromSet_1, + searchSet?._id ?? ffi.nullptr); + } + + NSRange rangeOfCharacterFromSet_options_( + NSCharacterSet? searchSet, int mask) { + return _lib._objc_msgSend_229( + _id, + _lib._sel_rangeOfCharacterFromSet_options_1, + searchSet?._id ?? ffi.nullptr, + mask); + } + + NSRange rangeOfCharacterFromSet_options_range_( + NSCharacterSet? searchSet, int mask, NSRange rangeOfReceiverToSearch) { + return _lib._objc_msgSend_230( + _id, + _lib._sel_rangeOfCharacterFromSet_options_range_1, + searchSet?._id ?? ffi.nullptr, + mask, + rangeOfReceiverToSearch); + } + + NSRange rangeOfComposedCharacterSequenceAtIndex_(int index) { + return _lib._objc_msgSend_231( + _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); + } + + NSRange rangeOfComposedCharacterSequencesForRange_(NSRange range) { + return _lib._objc_msgSend_232( + _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); + } + + NSString stringByAppendingString_(NSString? aString) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_stringByAppendingString_1, aString?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByAppendingFormat_(NSString? format) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_stringByAppendingFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + double get doubleValue { + return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); + } + + double get floatValue { + return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); + } + + int get intValue { + return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); + } + + int get integerValue { + return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); + } + + int get longLongValue { + return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); + } + + bool get boolValue { + return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); + } + + NSString? get uppercaseString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_uppercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get lowercaseString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lowercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get capitalizedString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_capitalizedString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get localizedUppercaseString { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedUppercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get localizedLowercaseString { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedLowercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get localizedCapitalizedString { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedCapitalizedString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString uppercaseStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_233( + _id, _lib._sel_uppercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString lowercaseStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_233( + _id, _lib._sel_lowercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString capitalizedStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_233(_id, + _lib._sel_capitalizedStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void getLineStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range) { + return _lib._objc_msgSend_234( + _id, + _lib._sel_getLineStart_end_contentsEnd_forRange_1, + startPtr, + lineEndPtr, + contentsEndPtr, + range); + } + + NSRange lineRangeForRange_(NSRange range) { + return _lib._objc_msgSend_232(_id, _lib._sel_lineRangeForRange_1, range); + } + + void getParagraphStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer parEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range) { + return _lib._objc_msgSend_234( + _id, + _lib._sel_getParagraphStart_end_contentsEnd_forRange_1, + startPtr, + parEndPtr, + contentsEndPtr, + range); + } + + NSRange paragraphRangeForRange_(NSRange range) { + return _lib._objc_msgSend_232( + _id, _lib._sel_paragraphRangeForRange_1, range); + } + + void enumerateSubstringsInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock13 block) { + return _lib._objc_msgSend_235( + _id, + _lib._sel_enumerateSubstringsInRange_options_usingBlock_1, + range, + opts, + block._id); + } + + void enumerateLinesUsingBlock_(ObjCBlock14 block) { + return _lib._objc_msgSend_236( + _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); + } + + ffi.Pointer get UTF8String { + return _lib._objc_msgSend_53(_id, _lib._sel_UTF8String1); + } + + int get fastestEncoding { + return _lib._objc_msgSend_12(_id, _lib._sel_fastestEncoding1); + } + + int get smallestEncoding { + return _lib._objc_msgSend_12(_id, _lib._sel_smallestEncoding1); + } + + NSData dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { + final _ret = _lib._objc_msgSend_237(_id, + _lib._sel_dataUsingEncoding_allowLossyConversion_1, encoding, lossy); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData dataUsingEncoding_(int encoding) { + final _ret = + _lib._objc_msgSend_238(_id, _lib._sel_dataUsingEncoding_1, encoding); + return NSData._(_ret, _lib, retain: true, release: true); + } + + bool canBeConvertedToEncoding_(int encoding) { + return _lib._objc_msgSend_117( + _id, _lib._sel_canBeConvertedToEncoding_1, encoding); + } + + ffi.Pointer cStringUsingEncoding_(int encoding) { + return _lib._objc_msgSend_239( + _id, _lib._sel_cStringUsingEncoding_1, encoding); + } + + bool getCString_maxLength_encoding_( + ffi.Pointer buffer, int maxBufferCount, int encoding) { + return _lib._objc_msgSend_240( + _id, + _lib._sel_getCString_maxLength_encoding_1, + buffer, + maxBufferCount, + encoding); + } + + bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, + NSRange range, + NSRangePointer leftover) { + return _lib._objc_msgSend_241( + _id, + _lib._sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, + range, + leftover); + } + + int maximumLengthOfBytesUsingEncoding_(int enc) { + return _lib._objc_msgSend_114( + _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); + } + + int lengthOfBytesUsingEncoding_(int enc) { + return _lib._objc_msgSend_114( + _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); + } + + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSString1, _lib._sel_availableStringEncodings1); + } + + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); + } + + NSString? get decomposedStringWithCanonicalMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_decomposedStringWithCanonicalMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get precomposedStringWithCanonicalMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_precomposedStringWithCanonicalMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get decomposedStringWithCompatibilityMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_decomposedStringWithCompatibilityMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get precomposedStringWithCompatibilityMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_precomposedStringWithCompatibilityMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSArray componentsSeparatedByString_(NSString? separator) { + final _ret = _lib._objc_msgSend_159(_id, + _lib._sel_componentsSeparatedByString_1, separator?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet? separator) { + final _ret = _lib._objc_msgSend_243( + _id, + _lib._sel_componentsSeparatedByCharactersInSet_1, + separator?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString stringByTrimmingCharactersInSet_(NSCharacterSet? set) { + final _ret = _lib._objc_msgSend_244(_id, + _lib._sel_stringByTrimmingCharactersInSet_1, set?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByPaddingToLength_withString_startingAtIndex_( + int newLength, NSString? padString, int padIndex) { + final _ret = _lib._objc_msgSend_245( + _id, + _lib._sel_stringByPaddingToLength_withString_startingAtIndex_1, + newLength, + padString?._id ?? ffi.nullptr, + padIndex); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { + final _ret = _lib._objc_msgSend_246( + _id, + _lib._sel_stringByFoldingWithOptions_locale_1, + options, + locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByReplacingOccurrencesOfString_withString_options_range_( + NSString? target, + NSString? replacement, + int options, + NSRange searchRange) { + final _ret = _lib._objc_msgSend_247( + _id, + _lib._sel_stringByReplacingOccurrencesOfString_withString_options_range_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr, + options, + searchRange); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByReplacingOccurrencesOfString_withString_( + NSString? target, NSString? replacement) { + final _ret = _lib._objc_msgSend_248( + _id, + _lib._sel_stringByReplacingOccurrencesOfString_withString_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByReplacingCharactersInRange_withString_( + NSRange range, NSString? replacement) { + final _ret = _lib._objc_msgSend_249( + _id, + _lib._sel_stringByReplacingCharactersInRange_withString_1, + range, + replacement?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByApplyingTransform_reverse_( + NSStringTransform transform, bool reverse) { + final _ret = _lib._objc_msgSend_250( + _id, _lib._sel_stringByApplyingTransform_reverse_1, transform, reverse); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool writeToURL_atomically_encoding_error_(NSURL? url, bool useAuxiliaryFile, + int enc, ffi.Pointer> error) { + return _lib._objc_msgSend_251( + _id, + _lib._sel_writeToURL_atomically_encoding_error_1, + url?._id ?? ffi.nullptr, + useAuxiliaryFile, + enc, + error); + } + + bool writeToFile_atomically_encoding_error_( + NSString? path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error) { + return _lib._objc_msgSend_252( + _id, + _lib._sel_writeToFile_atomically_encoding_error_1, + path?._id ?? ffi.nullptr, + useAuxiliaryFile, + enc, + error); + } + + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + int get hash { + return _lib._objc_msgSend_12(_id, _lib._sel_hash1); + } + + NSString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, int length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_253( + _id, + _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, + characters, + length, + freeBuffer); + return NSString._(_ret, _lib, retain: false, release: true); + } + + NSString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, int len, ObjCBlock15 deallocator) { + final _ret = _lib._objc_msgSend_254( + _id, + _lib._sel_initWithCharactersNoCopy_length_deallocator_1, + chars, + len, + deallocator._id); + return NSString._(_ret, _lib, retain: false, release: true); + } + + NSString initWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255( + _id, _lib._sel_initWithCharacters_length_1, characters, length); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithUTF8String_(ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256( + _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithString_(NSString? aString) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, aString?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithFormat_(NSString? format) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithFormat_arguments_(NSString? format, va_list argList) { + final _ret = _lib._objc_msgSend_257( + _id, + _lib._sel_initWithFormat_arguments_1, + format?._id ?? ffi.nullptr, + argList); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithFormat_locale_(NSString? format, NSObject locale) { + final _ret = _lib._objc_msgSend_258(_id, _lib._sel_initWithFormat_locale_1, + format?._id ?? ffi.nullptr, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithFormat_locale_arguments_( + NSString? format, NSObject locale, va_list argList) { + final _ret = _lib._objc_msgSend_259( + _id, + _lib._sel_initWithFormat_locale_arguments_1, + format?._id ?? ffi.nullptr, + locale._id, + argList); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithData_encoding_(NSData? data, int encoding) { + final _ret = _lib._objc_msgSend_260(_id, _lib._sel_initWithData_encoding_1, + data?._id ?? ffi.nullptr, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithBytes_length_encoding_( + ffi.Pointer bytes, int len, int encoding) { + final _ret = _lib._objc_msgSend_261( + _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { + final _ret = _lib._objc_msgSend_262( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, + bytes, + len, + encoding, + freeBuffer); + return NSString._(_ret, _lib, retain: false, release: true); + } + + NSString initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + int len, + int encoding, + ObjCBlock12 deallocator) { + final _ret = _lib._objc_msgSend_263( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, + bytes, + len, + encoding, + deallocator._id); + return NSString._(_ret, _lib, retain: false, release: true); + } + + static NSString string(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_string1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, int encoding) { + final _ret = _lib._objc_msgSend_264(_id, + _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithContentsOfURL_encoding_error_( + NSURL? url, int enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_265( + _id, + _lib._sel_initWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithContentsOfFile_encoding_error_( + NSString? path, int enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_266( + _id, + _lib._sel_initWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_265( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_266( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithContentsOfURL_usedEncoding_error_( + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_267( + _id, + _lib._sel_initWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithContentsOfFile_usedEncoding_error_( + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_268( + _id, + _lib._sel_initWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_267( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_268( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_269( + _lib._class_NSString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } + + NSObject propertyList() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSDictionary propertyListFromStringsFileFormat() { + final _ret = _lib._objc_msgSend_180( + _id, _lib._sel_propertyListFromStringsFileFormat1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + ffi.Pointer cString() { + return _lib._objc_msgSend_53(_id, _lib._sel_cString1); + } + + ffi.Pointer lossyCString() { + return _lib._objc_msgSend_53(_id, _lib._sel_lossyCString1); + } + + int cStringLength() { + return _lib._objc_msgSend_12(_id, _lib._sel_cStringLength1); + } + + void getCString_(ffi.Pointer bytes) { + return _lib._objc_msgSend_270(_id, _lib._sel_getCString_1, bytes); + } + + void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { + return _lib._objc_msgSend_271( + _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); + } + + void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, + int maxLength, NSRange aRange, NSRangePointer leftoverRange) { + return _lib._objc_msgSend_272( + _id, + _lib._sel_getCString_maxLength_range_remainingRange_1, + bytes, + maxLength, + aRange, + leftoverRange); + } + + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } + + NSObject initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject initWithCStringNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_273( + _id, + _lib._sel_initWithCStringNoCopy_length_freeWhenDone_1, + bytes, + length, + freeBuffer); + return NSObject._(_ret, _lib, retain: false, release: true); + } + + NSObject initWithCString_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_264( + _id, _lib._sel_initWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject initWithCString_(ffi.Pointer bytes) { + final _ret = + _lib._objc_msgSend_256(_id, _lib._sel_initWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void getCharacters_(ffi.Pointer buffer) { + return _lib._objc_msgSend_274(_id, _lib._sel_getCharacters_1, buffer); + } + + /// Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode an URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. + NSString stringByAddingPercentEncodingWithAllowedCharacters_( + NSCharacterSet? allowedCharacters) { + final _ret = _lib._objc_msgSend_244( + _id, + _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, + allowedCharacters?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + /// Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. + NSString? get stringByRemovingPercentEncoding { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_stringByRemovingPercentEncoding1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByAddingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_15( + _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString stringByReplacingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_15( + _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSString new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); + return NSString._(_ret, _lib, retain: false, release: true); + } + + static NSString alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); + return NSString._(_ret, _lib, retain: false, release: true); + } +} + +extension StringToNSString on String { + NSString toNSString(NativeCupertinoHttp lib) => NSString(lib, this); +} + +typedef unichar = ffi.UnsignedShort; + +class NSCoder extends _ObjCWrapper { + NSCoder._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSCoder] that points to the same underlying object as [other]. + static NSCoder castFrom(T other) { + return NSCoder._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSCoder] that wraps the given raw object pointer. + static NSCoder castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCoder._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSCoder]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); + } +} + +typedef NSRange = _NSRange; + +class _NSRange extends ffi.Struct { + @NSUInteger() + external int location; + + @NSUInteger() + external int length; +} + +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; +} + +abstract class NSStringCompareOptions { + static const int NSCaseInsensitiveSearch = 1; + static const int NSLiteralSearch = 2; + static const int NSBackwardsSearch = 4; + static const int NSAnchoredSearch = 8; + static const int NSNumericSearch = 64; + static const int NSDiacriticInsensitiveSearch = 128; + static const int NSWidthInsensitiveSearch = 256; + static const int NSForcedOrderingSearch = 512; + static const int NSRegularExpressionSearch = 1024; +} + +class NSLocale extends _ObjCWrapper { + NSLocale._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSLocale] that points to the same underlying object as [other]. + static NSLocale castFrom(T other) { + return NSLocale._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSLocale] that wraps the given raw object pointer. + static NSLocale castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSLocale._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSLocale]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLocale1); + } +} + +class NSCharacterSet extends NSObject { + NSCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. + static NSCharacterSet castFrom(T other) { + return NSCharacterSet._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSCharacterSet] that wraps the given raw object pointer. + static NSCharacterSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCharacterSet._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSCharacterSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSCharacterSet1); + } + + static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSCharacterSet1, + _lib._sel_whitespaceAndNewlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getLowercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getUppercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getCapitalizedLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: false, release: true); + } + + static NSCharacterSet characterSetWithRange_( + NativeCupertinoHttp _lib, NSRange aRange) { + final _ret = _lib._objc_msgSend_29( + _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet characterSetWithCharactersInString_( + NativeCupertinoHttp _lib, NSString? aString) { + final _ret = _lib._objc_msgSend_30( + _lib._class_NSCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, + aString?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet characterSetWithBitmapRepresentation_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_223( + _lib._class_NSCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, + data?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet characterSetWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? fName) { + final _ret = _lib._objc_msgSend_30(_lib._class_NSCharacterSet1, + _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + NSCharacterSet initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + bool characterIsMember_(int aCharacter) { + return _lib._objc_msgSend_224( + _id, _lib._sel_characterIsMember_1, aCharacter); + } + + NSData? get bitmapRepresentation { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_bitmapRepresentation1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSCharacterSet? get invertedSet { + final _ret = _lib._objc_msgSend_28(_id, _lib._sel_invertedSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + bool longCharacterIsMember_(int theLongChar) { + return _lib._objc_msgSend_225( + _id, _lib._sel_longCharacterIsMember_1, theLongChar); + } + + bool isSupersetOfSet_(NSCharacterSet? theOtherSet) { + return _lib._objc_msgSend_226( + _id, _lib._sel_isSupersetOfSet_1, theOtherSet?._id ?? ffi.nullptr); + } + + bool hasMemberInPlane_(int thePlane) { + return _lib._objc_msgSend_227(_id, _lib._sel_hasMemberInPlane_1, thePlane); + } + + /// Returns a character set containing the characters allowed in an URL's user subcomponent. + static NSCharacterSet? getURLUserAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's password subcomponent. + static NSCharacterSet? getURLPasswordAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's host subcomponent. + static NSCharacterSet? getURLHostAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + static NSCharacterSet? getURLPathAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's query component. + static NSCharacterSet? getURLQueryAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's fragment component. + static NSCharacterSet? getURLFragmentAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } + + static NSCharacterSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } +} + +class NSData extends NSObject { + NSData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSData] that points to the same underlying object as [other]. + static NSData castFrom(T other) { + return NSData._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSData] that wraps the given raw object pointer. + static NSData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSData._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); + } + + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); + } + + /// The -bytes method returns a pointer to a contiguous region of memory managed by the receiver. + /// If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer + /// Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data. + ffi.Pointer get bytes { + return _lib._objc_msgSend_31(_id, _lib._sel_bytes1); + } + + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + void getBytes_length_(ffi.Pointer buffer, int length) { + return _lib._objc_msgSend_33( + _id, _lib._sel_getBytes_length_1, buffer, length); + } + + void getBytes_range_(ffi.Pointer buffer, NSRange range) { + return _lib._objc_msgSend_34( + _id, _lib._sel_getBytes_range_1, buffer, range); + } + + bool isEqualToData_(NSData? other) { + return _lib._objc_msgSend_35( + _id, _lib._sel_isEqualToData_1, other?._id ?? ffi.nullptr); + } + + NSData subdataWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_36(_id, _lib._sel_subdataWithRange_1, range); + return NSData._(_ret, _lib, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } + + /// the atomically flag is ignored if the url is not of a type the supports atomic writes + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } + + bool writeToFile_options_error_(NSString? path, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _lib._objc_msgSend_208(_id, _lib._sel_writeToFile_options_error_1, + path?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); + } + + bool writeToURL_options_error_(NSURL? url, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _lib._objc_msgSend_209(_id, _lib._sel_writeToURL_options_error_1, + url?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); + } + + NSRange rangeOfData_options_range_( + NSData? dataToFind, int mask, NSRange searchRange) { + return _lib._objc_msgSend_210(_id, _lib._sel_rangeOfData_options_range_1, + dataToFind?._id ?? ffi.nullptr, mask, searchRange); + } + + /// 'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES. + void enumerateByteRangesUsingBlock_(ObjCBlock11 block) { + return _lib._objc_msgSend_211( + _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._id); + } + + static NSData data(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212( + _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSData._(_ret, _lib, retain: false, release: true); + } + + static NSData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_213(_lib._class_NSData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSData._(_ret, _lib, retain: false, release: true); + } + + static NSData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _lib._class_NSData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212( + _id, _lib._sel_initWithBytes_length_1, bytes, length); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212( + _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); + return NSData._(_ret, _lib, retain: false, release: true); + } + + NSData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _lib._objc_msgSend_213(_id, + _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSData._(_ret, _lib, retain: false, release: true); + } + + NSData initWithBytesNoCopy_length_deallocator_( + ffi.Pointer bytes, int length, ObjCBlock12 deallocator) { + final _ret = _lib._objc_msgSend_216( + _id, + _lib._sel_initWithBytesNoCopy_length_deallocator_1, + bytes, + length, + deallocator._id); + return NSData._(_ret, _lib, retain: false, release: true); + } + + NSData initWithContentsOfFile_options_error_(NSString? path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _id, + _lib._sel_initWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithContentsOfURL_options_error_(NSURL? url, int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _id, + _lib._sel_initWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData initWithData_(NSData? data) { + final _ret = _lib._objc_msgSend_217( + _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + static NSData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. + NSData initWithBase64EncodedString_options_( + NSString? base64String, int options) { + final _ret = _lib._objc_msgSend_218( + _id, + _lib._sel_initWithBase64EncodedString_options_1, + base64String?._id ?? ffi.nullptr, + options); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Create a Base-64 encoded NSString from the receiver's contents using the given options. + NSString base64EncodedStringWithOptions_(int options) { + final _ret = _lib._objc_msgSend_219( + _id, _lib._sel_base64EncodedStringWithOptions_1, options); + return NSString._(_ret, _lib, retain: true, release: true); + } + + /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. + NSData initWithBase64EncodedData_options_(NSData? base64Data, int options) { + final _ret = _lib._objc_msgSend_220( + _id, + _lib._sel_initWithBase64EncodedData_options_1, + base64Data?._id ?? ffi.nullptr, + options); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options. + NSData base64EncodedDataWithOptions_(int options) { + final _ret = _lib._objc_msgSend_221( + _id, _lib._sel_base64EncodedDataWithOptions_1, options); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. + NSData decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_222(_id, + _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_222( + _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); + return NSData._(_ret, _lib, retain: true, release: true); + } + + void getBytes_(ffi.Pointer buffer) { + return _lib._objc_msgSend_59(_id, _lib._sel_getBytes_1, buffer); + } + + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject initWithContentsOfMappedFile_(NSString? path) { + final _ret = _lib._objc_msgSend_42(_id, + _lib._sel_initWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0. + NSObject initWithBase64Encoding_(NSString? base64String) { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_initWithBase64Encoding_1, + base64String?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSString base64Encoding() { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_base64Encoding1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSData new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); + return NSData._(_ret, _lib, retain: false, release: true); + } + + static NSData alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); + return NSData._(_ret, _lib, retain: false, release: true); + } +} + +class NSURL extends NSObject { + NSURL._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURL] that points to the same underlying object as [other]. + static NSURL castFrom(T other) { + return NSURL._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURL] that wraps the given raw object pointer. + static NSURL castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURL._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURL]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); + } + + /// this call percent-encodes both the host and path, so this cannot be used to set a username/password or port in the hostname part or with a IPv6 '[...]' type address. NSURLComponents handles IPv6 addresses correctly. + NSURL initWithScheme_host_path_( + NSString? scheme, NSString? host, NSString? path) { + final _ret = _lib._objc_msgSend_38( + _id, + _lib._sel_initWithScheme_host_path_1, + scheme?._id ?? ffi.nullptr, + host?._id ?? ffi.nullptr, + path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL. + NSURL initFileURLWithPath_isDirectory_relativeToURL_( + NSString? path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_39( + _id, + _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, + path?._id ?? ffi.nullptr, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. + NSURL initFileURLWithPath_relativeToURL_(NSString? path, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _id, + _lib._sel_initFileURLWithPath_relativeToURL_1, + path?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL initFileURLWithPath_isDirectory_(NSString? path, bool isDir) { + final _ret = _lib._objc_msgSend_41( + _id, + _lib._sel_initFileURLWithPath_isDirectory_1, + path?._id ?? ffi.nullptr, + isDir); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Better to use initFileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. + NSURL initFileURLWithPath_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initFileURLWithPath_1, path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created file NSURL referencing the local file or directory at path, relative to a base URL. + static NSURL fileURLWithPath_isDirectory_relativeToURL_( + NativeCupertinoHttp _lib, NSString? path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_43( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, + path?._id ?? ffi.nullptr, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Better to use fileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. + static NSURL fileURLWithPath_relativeToURL_( + NativeCupertinoHttp _lib, NSString? path, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_44( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_relativeToURL_1, + path?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL fileURLWithPath_isDirectory_( + NativeCupertinoHttp _lib, NSString? path, bool isDir) { + final _ret = _lib._objc_msgSend_45( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_1, + path?._id ?? ffi.nullptr, + isDir); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Better to use fileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. + static NSURL fileURLWithPath_(NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_46(_lib._class_NSURL1, + _lib._sel_fileURLWithPath_1, path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. + NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + ffi.Pointer path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_47( + _id, + _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, + path, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. + static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + NativeCupertinoHttp _lib, + ffi.Pointer path, + bool isDir, + NSURL? baseURL) { + final _ret = _lib._objc_msgSend_48( + _lib._class_NSURL1, + _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, + path, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// These methods expect their string arguments to contain any percent escape codes that are necessary. It is an error for URLString to be nil. + NSURL initWithString_(NSString? URLString) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL initWithString_relativeToURL_(NSString? URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _id, + _lib._sel_initWithString_relativeToURL_1, + URLString?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL URLWithString_(NativeCupertinoHttp _lib, NSString? URLString) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSURL1, + _lib._sel_URLWithString_1, URLString?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL URLWithString_relativeToURL_( + NativeCupertinoHttp _lib, NSString? URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _lib._class_NSURL1, + _lib._sel_URLWithString_relativeToURL_1, + URLString?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + NSURL initWithDataRepresentation_relativeToURL_( + NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_49( + _id, + _lib._sel_initWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + static NSURL URLWithDataRepresentation_relativeToURL_( + NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_50( + _lib._class_NSURL1, + _lib._sel_URLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( + NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_49( + _id, + _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + static NSURL absoluteURLWithDataRepresentation_relativeToURL_( + NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_50( + _lib._class_NSURL1, + _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns the data representation of the URL's relativeString. If the URL was initialized with -initWithData:relativeToURL:, the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with NSUTF8StringEncoding. + NSData? get dataRepresentation { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_dataRepresentation1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSString? get absoluteString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_absoluteString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// The relative portion of a URL. If baseURL is nil, or if the receiver is itself absolute, this is the same as absoluteString + NSString? get relativeString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativeString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// may be nil. + NSURL? get baseURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_baseURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// if the receiver is itself absolute, this will return self. + NSURL? get absoluteURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_absoluteURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Any URL is composed of these two basic pieces. The full URL would be the concatenation of [myURL scheme], ':', [myURL resourceSpecifier] + NSString? get scheme { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get resourceSpecifier { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_resourceSpecifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// If the URL conforms to rfc 1808 (the most common form of URL), the following accessors will return the various components; otherwise they return nil. The litmus test for conformance is as recommended in RFC 1808 - whether the first two characters of resourceSpecifier is @"//". In all cases, they return the component's value after resolving the receiver against its base URL. + NSString? get host { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSNumber? get port { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSString? get user { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get password { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get path { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get fragment { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get parameterString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_parameterString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get query { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// The same as path if baseURL is nil + NSString? get relativePath { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativePath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Determines if a given URL string's path represents a directory (i.e. the path component in the URL string ends with a '/' character). This does not check the resource the URL refers to. + bool get hasDirectoryPath { + return _lib._objc_msgSend_11(_id, _lib._sel_hasDirectoryPath1); + } + + /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. + bool getFileSystemRepresentation_maxLength_( + ffi.Pointer buffer, int maxBufferLength) { + return _lib._objc_msgSend_90( + _id, + _lib._sel_getFileSystemRepresentation_maxLength_1, + buffer, + maxBufferLength); + } + + /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. The returned C string will be automatically freed just as a returned object would be released; your code should copy the representation or use getFileSystemRepresentation:maxLength: if it needs to store the representation outside of the autorelease context in which the representation is created. + ffi.Pointer get fileSystemRepresentation { + return _lib._objc_msgSend_53(_id, _lib._sel_fileSystemRepresentation1); + } + + /// Whether the scheme is file:; if [myURL isFileURL] is YES, then [myURL path] is suitable for input into NSFileManager or NSPathUtilities. + bool get fileURL { + return _lib._objc_msgSend_11(_id, _lib._sel_isFileURL1); + } + + NSURL? get standardizedURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_standardizedURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. + bool checkResourceIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_183( + _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); + } + + /// Returns whether the URL is a file reference URL. Symbol is present in iOS 4, but performs no operation. + bool isFileReferenceURL() { + return _lib._objc_msgSend_11(_id, _lib._sel_isFileReferenceURL1); + } + + /// Returns a file reference URL that refers to the same resource as a specified file URL. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:). Symbol is present in iOS 4, but performs no operation. + NSURL fileReferenceURL() { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileReferenceURL1); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns a file path URL that refers to the same resource as a specified URL. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. Symbol is present in iOS 4, but performs no operation. + NSURL? get filePathURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_filePathURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns the resource value identified by a given resource key. This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this method returns YES and value is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool getResourceValue_forKey_error_( + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_184( + _id, _lib._sel_getResourceValue_forKey_error_1, value, key, error); + } + + /// Returns the resource values identified by specified array of resource keys. This method first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this method returns NULL, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + NSDictionary resourceValuesForKeys_error_( + NSArray? keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_185( + _id, + _lib._sel_resourceValuesForKeys_error_1, + keys?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Sets the resource value identified by a given resource key. This method writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool setResourceValue_forKey_error_(NSObject value, NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_186( + _id, _lib._sel_setResourceValue_forKey_error_1, value._id, key, error); + } + + /// Sets any number of resource values of a URL's resource. This method writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to this method or to -setResourceValue:forKey:error: to guarantee the order. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool setResourceValues_error_( + NSDictionary? keyedValues, ffi.Pointer> error) { + return _lib._objc_msgSend_187(_id, _lib._sel_setResourceValues_error_1, + keyedValues?._id ?? ffi.nullptr, error); + } + + /// Removes the cached resource value identified by a given resource value key from the URL object. Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources. + void removeCachedResourceValueForKey_(NSURLResourceKey key) { + return _lib._objc_msgSend_188( + _id, _lib._sel_removeCachedResourceValueForKey_1, key); + } + + /// Removes all cached resource values and all temporary resource values from the URL object. This method is currently applicable only to URLs for file system resources. + void removeAllCachedResourceValues() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); + } + + /// Sets a temporary resource value on the URL object. Temporary resource values are for client use. Temporary resource values exist only in memory and are never written to the resource's backing store. Once set, a temporary resource value can be copied from the URL object with -getResourceValue:forKey:error: or -resourceValuesForKeys:error:. To remove a temporary resource value from the URL object, use -removeCachedResourceValueForKey:. Care should be taken to ensure the key that identifies a temporary resource value is unique and does not conflict with system defined keys (using reverse domain name notation in your temporary resource value keys is recommended). This method is currently applicable only to URLs for file system resources. + void setTemporaryResourceValue_forKey_(NSObject value, NSURLResourceKey key) { + return _lib._objc_msgSend_189( + _id, _lib._sel_setTemporaryResourceValue_forKey_1, value._id, key); + } + + /// Returns bookmark data for the URL, created with specified options and resource values. If this method returns nil, the optional error is populated. + NSData + bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( + int options, + NSArray? keys, + NSURL? relativeURL, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_190( + _id, + _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, + options, + keys?._id ?? ffi.nullptr, + relativeURL?._id ?? ffi.nullptr, + error); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. + NSURL + initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NSData? bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_191( + _id, + _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, + bookmarkData?._id ?? ffi.nullptr, + options, + relativeURL?._id ?? ffi.nullptr, + isStale, + error); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Creates and Initializes an NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. + static NSURL + URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NativeCupertinoHttp _lib, + NSData? bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_191( + _lib._class_NSURL1, + _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, + bookmarkData?._id ?? ffi.nullptr, + options, + relativeURL?._id ?? ffi.nullptr, + isStale, + error); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available in the bookmark data. + static NSDictionary resourceValuesForKeys_fromBookmarkData_( + NativeCupertinoHttp _lib, NSArray? keys, NSData? bookmarkData) { + final _ret = _lib._objc_msgSend_192( + _lib._class_NSURL1, + _lib._sel_resourceValuesForKeys_fromBookmarkData_1, + keys?._id ?? ffi.nullptr, + bookmarkData?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Creates an alias file on disk at a specified location with specified bookmark data. bookmarkData must have been created with the NSURLBookmarkCreationSuitableForBookmarkFile option. bookmarkFileURL must either refer to an existing file (which will be overwritten), or to location in an existing directory. If this method returns NO, the optional error is populated. + static bool writeBookmarkData_toURL_options_error_( + NativeCupertinoHttp _lib, + NSData? bookmarkData, + NSURL? bookmarkFileURL, + int options, + ffi.Pointer> error) { + return _lib._objc_msgSend_193( + _lib._class_NSURL1, + _lib._sel_writeBookmarkData_toURL_options_error_1, + bookmarkData?._id ?? ffi.nullptr, + bookmarkFileURL?._id ?? ffi.nullptr, + options, + error); + } + + /// Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. If bookmarkFileURL refers to an alias file created prior to OS X v10.6 that contains Alias Manager information but no bookmark data, this method synthesizes bookmark data for the file. If this method returns nil, the optional error is populated. + static NSData bookmarkDataWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? bookmarkFileURL, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_194( + _lib._class_NSURL1, + _lib._sel_bookmarkDataWithContentsOfURL_error_1, + bookmarkFileURL?._id ?? ffi.nullptr, + error); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Creates and initializes a NSURL that refers to the location specified by resolving the alias file at url. If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, the NSURL returned is the same as url argument. This method fails and returns nil if the url argument is unreachable, or if the original file or directory could not be located or is not reachable, or if the original file or directory is on a volume that could not be located or mounted. If this method fails, the optional error is populated. The NSURLBookmarkResolutionWithSecurityScope option is not supported by this method. + static NSURL URLByResolvingAliasFileAtURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int options, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_195( + _lib._class_NSURL1, + _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, + url?._id ?? ffi.nullptr, + options, + error); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. When access to this resource is no longer needed the client must call stopAccessingSecurityScopedResource. Each call to startAccessingSecurityScopedResource must be balanced with a call to stopAccessingSecurityScopedResource (Note: this is not reference counted). + bool startAccessingSecurityScopedResource() { + return _lib._objc_msgSend_11( + _id, _lib._sel_startAccessingSecurityScopedResource1); + } + + /// Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource. + void stopAccessingSecurityScopedResource() { + return _lib._objc_msgSend_1( + _id, _lib._sel_stopAccessingSecurityScopedResource1); + } + + /// Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: + /// - NSMetadataQueryUbiquitousDataScope + /// - NSMetadataQueryUbiquitousDocumentsScope + /// - An NSFilePresenter presenting the contents of the directory located by -URLForUbiquitousContainerIdentifier: or a subdirectory thereof + /// + /// The following methods behave identically to their similarly named methods above (-getResourceValue:forKey:error:, etc.), except that they allow you to get resource values and check for presence regardless of whether the promised item's contents currently exist at the URL. You must use these APIs instead of the normal NSURL resource value APIs if and only if any of the following are true: + /// - You are using a URL that you know came directly from one of the above APIs + /// - You are inside the accessor block of a coordinated read or write that used NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingContentIndependentMetadataOnly + /// + /// Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. + bool getPromisedItemResourceValue_forKey_error_( + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_184( + _id, + _lib._sel_getPromisedItemResourceValue_forKey_error_1, + value, + key, + error); + } + + NSDictionary promisedItemResourceValuesForKeys_error_( + NSArray? keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_185( + _id, + _lib._sel_promisedItemResourceValuesForKeys_error_1, + keys?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + bool checkPromisedItemIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_183( + _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); + } + + /// The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. + static NSURL fileURLWithPathComponents_( + NativeCupertinoHttp _lib, NSArray? components) { + final _ret = _lib._objc_msgSend_196(_lib._class_NSURL1, + _lib._sel_fileURLWithPathComponents_1, components?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSArray? get pathComponents { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_pathComponents1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? get lastPathComponent { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lastPathComponent1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get pathExtension { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_pathExtension1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSURL URLByAppendingPathComponent_(NSString? pathComponent) { + final _ret = _lib._objc_msgSend_46( + _id, + _lib._sel_URLByAppendingPathComponent_1, + pathComponent?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL URLByAppendingPathComponent_isDirectory_( + NSString? pathComponent, bool isDirectory) { + final _ret = _lib._objc_msgSend_45( + _id, + _lib._sel_URLByAppendingPathComponent_isDirectory_1, + pathComponent?._id ?? ffi.nullptr, + isDirectory); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URLByDeletingLastPathComponent { + final _ret = + _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingLastPathComponent1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL URLByAppendingPathExtension_(NSString? pathExtension) { + final _ret = _lib._objc_msgSend_46( + _id, + _lib._sel_URLByAppendingPathExtension_1, + pathExtension?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URLByDeletingPathExtension { + final _ret = + _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingPathExtension1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// The following methods work only on `file:` scheme URLs; for non-`file:` scheme URLs, these methods return the URL unchanged. + NSURL? get URLByStandardizingPath { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URLByStandardizingPath1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL? get URLByResolvingSymlinksInPath { + final _ret = + _lib._objc_msgSend_52(_id, _lib._sel_URLByResolvingSymlinksInPath1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Blocks to load the data if necessary. If shouldUseCache is YES, then if an equivalent URL has already been loaded and cached, its resource data will be returned immediately. If shouldUseCache is NO, a new load will be started + NSData resourceDataUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_197( + _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Starts an asynchronous load of the data, registering delegate to receive notification. Only one such background load can proceed at a time. + void loadResourceDataNotifyingClient_usingCache_( + NSObject client, bool shouldUseCache) { + return _lib._objc_msgSend_198( + _id, + _lib._sel_loadResourceDataNotifyingClient_usingCache_1, + client._id, + shouldUseCache); + } + + NSObject propertyForKey_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// These attempt to write the given arguments for the resource specified by the URL; they return success or failure + bool setResourceData_(NSData? data) { + return _lib._objc_msgSend_35( + _id, _lib._sel_setResourceData_1, data?._id ?? ffi.nullptr); + } + + bool setProperty_forKey_(NSObject property, NSString? propertyKey) { + return _lib._objc_msgSend_199(_id, _lib._sel_setProperty_forKey_1, + property._id, propertyKey?._id ?? ffi.nullptr); + } + + /// Sophisticated clients will want to ask for this, then message the handle directly. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded + NSURLHandle URLHandleUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_207( + _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); + return NSURLHandle._(_ret, _lib, retain: true, release: true); + } + + static NSURL new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); + return NSURL._(_ret, _lib, retain: false, release: true); + } + + static NSURL alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); + return NSURL._(_ret, _lib, retain: false, release: true); + } +} + +class NSNumber extends NSValue { + NSNumber._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNumber] that points to the same underlying object as [other]. + static NSNumber castFrom(T other) { + return NSNumber._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSNumber] that wraps the given raw object pointer. + static NSNumber castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNumber._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNumber]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); + } + + @override + NSNumber initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithChar_(int value) { + final _ret = _lib._objc_msgSend_62(_id, _lib._sel_initWithChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedChar_(int value) { + final _ret = + _lib._objc_msgSend_63(_id, _lib._sel_initWithUnsignedChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithShort_(int value) { + final _ret = _lib._objc_msgSend_64(_id, _lib._sel_initWithShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedShort_(int value) { + final _ret = + _lib._objc_msgSend_65(_id, _lib._sel_initWithUnsignedShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithInt_(int value) { + final _ret = _lib._objc_msgSend_66(_id, _lib._sel_initWithInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedInt_(int value) { + final _ret = + _lib._objc_msgSend_67(_id, _lib._sel_initWithUnsignedInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithLong_(int value) { + final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedLong_(int value) { + final _ret = + _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithLongLong_(int value) { + final _ret = + _lib._objc_msgSend_70(_id, _lib._sel_initWithLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedLongLong_(int value) { + final _ret = + _lib._objc_msgSend_71(_id, _lib._sel_initWithUnsignedLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithFloat_(double value) { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_initWithFloat_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithDouble_(double value) { + final _ret = _lib._objc_msgSend_73(_id, _lib._sel_initWithDouble_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithBool_(bool value) { + final _ret = _lib._objc_msgSend_74(_id, _lib._sel_initWithBool_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithInteger_(int value) { + final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedInteger_(int value) { + final _ret = + _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + int get charValue { + return _lib._objc_msgSend_75(_id, _lib._sel_charValue1); + } + + int get unsignedCharValue { + return _lib._objc_msgSend_76(_id, _lib._sel_unsignedCharValue1); + } + + int get shortValue { + return _lib._objc_msgSend_77(_id, _lib._sel_shortValue1); + } + + int get unsignedShortValue { + return _lib._objc_msgSend_78(_id, _lib._sel_unsignedShortValue1); + } + + int get intValue { + return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); + } + + int get unsignedIntValue { + return _lib._objc_msgSend_80(_id, _lib._sel_unsignedIntValue1); + } + + int get longValue { + return _lib._objc_msgSend_81(_id, _lib._sel_longValue1); + } + + int get unsignedLongValue { + return _lib._objc_msgSend_12(_id, _lib._sel_unsignedLongValue1); + } + + int get longLongValue { + return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); + } + + int get unsignedLongLongValue { + return _lib._objc_msgSend_83(_id, _lib._sel_unsignedLongLongValue1); + } + + double get floatValue { + return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); + } + + double get doubleValue { + return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); + } + + bool get boolValue { + return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); + } + + int get integerValue { + return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); + } + + int get unsignedIntegerValue { + return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); + } + + NSString? get stringValue { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_stringValue1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + int compare_(NSNumber? otherNumber) { + return _lib._objc_msgSend_86( + _id, _lib._sel_compare_1, otherNumber?._id ?? ffi.nullptr); + } + + bool isEqualToNumber_(NSNumber? number) { + return _lib._objc_msgSend_87( + _id, _lib._sel_isEqualToNumber_1, number?._id ?? ffi.nullptr); + } + + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithChar_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_62( + _lib._class_NSNumber1, _lib._sel_numberWithChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedChar_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_63( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithShort_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_64( + _lib._class_NSNumber1, _lib._sel_numberWithShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedShort_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_65( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithInt_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_66( + _lib._class_NSNumber1, _lib._sel_numberWithInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedInt_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_67( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithLong_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSNumber1, _lib._sel_numberWithLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedLong_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_69( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithLongLong_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_70( + _lib._class_NSNumber1, _lib._sel_numberWithLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedLongLong_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_71( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithFloat_(NativeCupertinoHttp _lib, double value) { + final _ret = _lib._objc_msgSend_72( + _lib._class_NSNumber1, _lib._sel_numberWithFloat_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithDouble_(NativeCupertinoHttp _lib, double value) { + final _ret = _lib._objc_msgSend_73( + _lib._class_NSNumber1, _lib._sel_numberWithDouble_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithBool_(NativeCupertinoHttp _lib, bool value) { + final _ret = _lib._objc_msgSend_74( + _lib._class_NSNumber1, _lib._sel_numberWithBool_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithInteger_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSNumber1, _lib._sel_numberWithInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedInteger_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_69( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55(_lib._class_NSNumber1, + _lib._sel_valueWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue value_withObjCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSNumber1, _lib._sel_value_withObjCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithNonretainedObject_( + NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_56(_lib._class_NSNumber1, + _lib._sel_valueWithNonretainedObject_1, anObject._id); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithPointer_( + NativeCupertinoHttp _lib, ffi.Pointer pointer) { + final _ret = _lib._objc_msgSend_57( + _lib._class_NSNumber1, _lib._sel_valueWithPointer_1, pointer); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_60( + _lib._class_NSNumber1, _lib._sel_valueWithRange_1, range); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSNumber new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); + return NSNumber._(_ret, _lib, retain: false, release: true); + } + + static NSNumber alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); + return NSNumber._(_ret, _lib, retain: false, release: true); + } +} + +class NSValue extends NSObject { + NSValue._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSValue] that points to the same underlying object as [other]. + static NSValue castFrom(T other) { + return NSValue._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSValue] that wraps the given raw object pointer. + static NSValue castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSValue._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSValue]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); + } + + void getValue_size_(ffi.Pointer value, int size) { + return _lib._objc_msgSend_33(_id, _lib._sel_getValue_size_1, value, size); + } + + ffi.Pointer get objCType { + return _lib._objc_msgSend_53(_id, _lib._sel_objCType1); + } + + NSValue initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_54( + _id, _lib._sel_initWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + NSValue initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSValue1, _lib._sel_valueWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue value_withObjCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSValue1, _lib._sel_value_withObjCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithNonretainedObject_( + NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_56(_lib._class_NSValue1, + _lib._sel_valueWithNonretainedObject_1, anObject._id); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + NSObject get nonretainedObjectValue { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nonretainedObjectValue1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithPointer_( + NativeCupertinoHttp _lib, ffi.Pointer pointer) { + final _ret = _lib._objc_msgSend_57( + _lib._class_NSValue1, _lib._sel_valueWithPointer_1, pointer); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + ffi.Pointer get pointerValue { + return _lib._objc_msgSend_31(_id, _lib._sel_pointerValue1); + } + + bool isEqualToValue_(NSValue? value) { + return _lib._objc_msgSend_58( + _id, _lib._sel_isEqualToValue_1, value?._id ?? ffi.nullptr); + } + + void getValue_(ffi.Pointer value) { + return _lib._objc_msgSend_59(_id, _lib._sel_getValue_1, value); + } + + static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_60( + _lib._class_NSValue1, _lib._sel_valueWithRange_1, range); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + NSRange get rangeValue { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeValue1); + } + + static NSValue new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); + return NSValue._(_ret, _lib, retain: false, release: true); + } + + static NSValue alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); + return NSValue._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSInteger = ffi.Long; + +class NSError extends NSObject { + NSError._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSError] that points to the same underlying object as [other]. + static NSError castFrom(T other) { + return NSError._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSError] that wraps the given raw object pointer. + static NSError castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSError._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSError]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); + } + + /// Domain cannot be nil; dict may be nil if no userInfo desired. + NSError initWithDomain_code_userInfo_( + NSErrorDomain domain, int code, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_179( + _id, + _lib._sel_initWithDomain_code_userInfo_1, + domain, + code, + dict?._id ?? ffi.nullptr); + return NSError._(_ret, _lib, retain: true, release: true); + } + + static NSError errorWithDomain_code_userInfo_(NativeCupertinoHttp _lib, + NSErrorDomain domain, int code, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_179( + _lib._class_NSError1, + _lib._sel_errorWithDomain_code_userInfo_1, + domain, + code, + dict?._id ?? ffi.nullptr); + return NSError._(_ret, _lib, retain: true, release: true); + } + + /// These define the error. Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts. Codes are domain-specific. + NSErrorDomain get domain { + return _lib._objc_msgSend_32(_id, _lib._sel_domain1); + } + + int get code { + return _lib._objc_msgSend_81(_id, _lib._sel_code1); + } + + /// Additional info which may be used to describe the error further. Examples of keys that might be included in here are "Line Number", "Failed URL", etc. Embedding other errors in here can also be used as a way to communicate underlying reasons for failures; for instance "File System Error" embedded in the userInfo of an NSError returned from a higher level document object. If the embedded error information is itself NSError, the standard key NSUnderlyingErrorKey can be used. + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// The primary user-presentable message for the error, for instance for NSFileReadNoPermissionError: "The file "File Name" couldn't be opened because you don't have permission to view it.". This message should ideally indicate what failed and why it failed. This value either comes from NSLocalizedDescriptionKey, or NSLocalizedFailureErrorKey+NSLocalizedFailureReasonErrorKey, or NSLocalizedFailureErrorKey. The steps this takes to construct the description include: + /// 1. Look for NSLocalizedDescriptionKey in userInfo, use value as-is if present. + /// 2. Look for NSLocalizedFailureErrorKey in userInfo. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. + /// 3. Fetch NSLocalizedDescriptionKey from userInfoValueProvider, use value as-is if present. + /// 4. Fetch NSLocalizedFailureErrorKey from userInfoValueProvider. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. + /// 5. Look for NSLocalizedFailureReasonErrorKey in userInfo or from userInfoValueProvider; combine with generic "Operation failed" message. + /// 6. Last resort localized but barely-presentable string manufactured from domain and code. The result is never nil. + NSString? get localizedDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Return a complete sentence which describes why the operation failed. For instance, for NSFileReadNoPermissionError: "You don't have permission.". In many cases this will be just the "because" part of the error message (but as a complete sentence, which makes localization easier). Default implementation of this picks up the value of NSLocalizedFailureReasonErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. + NSString? get localizedFailureReason { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedFailureReason1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel. For instance, for NSFileReadNoPermissionError: "To view or change permissions, select the item in the Finder and choose File > Get Info.". Default implementation of this picks up the value of NSLocalizedRecoverySuggestionErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. + NSString? get localizedRecoverySuggestion { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedRecoverySuggestion1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Return titles of buttons that are appropriate for displaying in an alert. These should match the string provided as a part of localizedRecoverySuggestion. The first string would be the title of the right-most and default button, the second one next to it, and so on. If used in an alert the corresponding default return values are NSAlertFirstButtonReturn + n. Default implementation of this picks up the value of NSLocalizedRecoveryOptionsErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. nil return usually implies no special suggestion, which would imply a single "OK" button. + NSArray? get localizedRecoveryOptions { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_localizedRecoveryOptions1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// Return an object that conforms to the NSErrorRecoveryAttempting informal protocol. The recovery attempter must be an object that can correctly interpret an index into the array returned by localizedRecoveryOptions. The default implementation of this picks up the value of NSRecoveryAttempterErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. + NSObject get recoveryAttempter { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_recoveryAttempter1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user. This is done automatically by +[NSAlert alertWithError:], which the presentError: variants in NSApplication go through. The default implementation of this picks up the value of the NSHelpAnchorErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. + NSString? get helpAnchor { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_helpAnchor1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Return a list of underlying errors, if any. It includes the values of both NSUnderlyingErrorKey and NSMultipleUnderlyingErrorsKey. If there are no underlying errors, returns an empty array. + NSArray? get underlyingErrors { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_underlyingErrors1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// Specify a block which will be called from the implementations of localizedDescription, localizedFailureReason, localizedRecoverySuggestion, localizedRecoveryOptions, recoveryAttempter, helpAnchor, and debugDescription when the underlying value for these is not present in the userInfo dictionary of NSError instances with the specified domain. The provider will be called with the userInfo key corresponding to the queried property: For instance, NSLocalizedDescriptionKey for localizedDescription. The provider should return nil for any keys it is not able to provide and, very importantly, any keys it does not recognize (since we may extend the list of keys in future releases). + /// + /// The specified block will be called synchronously at the time when the above properties are queried. The results are not cached. + /// + /// This provider is optional. It enables localization and formatting of error messages to be done lazily; rather than populating the userInfo at NSError creation time, these keys will be fetched on-demand when asked for. + /// + /// It is expected that only the “owner” of an NSError domain specifies the provider for the domain, and this is done once. This facility is not meant for consumers of errors to customize the userInfo entries. This facility should not be used to customize the behaviors of error domains provided by the system. + /// + /// If an appropriate result for the requested key cannot be provided, return nil rather than choosing to manufacture a generic fallback response such as "Operation could not be completed, error 42." NSError will take care of the fallback cases. + static void setUserInfoValueProviderForDomain_provider_( + NativeCupertinoHttp _lib, + NSErrorDomain errorDomain, + ObjCBlock10 provider) { + return _lib._objc_msgSend_181( + _lib._class_NSError1, + _lib._sel_setUserInfoValueProviderForDomain_provider_1, + errorDomain, + provider._id); + } + + static ObjCBlock10 userInfoValueProviderForDomain_(NativeCupertinoHttp _lib, + NSError? err, NSErrorUserInfoKey userInfoKey, NSErrorDomain errorDomain) { + final _ret = _lib._objc_msgSend_182( + _lib._class_NSError1, + _lib._sel_userInfoValueProviderForDomain_1, + err?._id ?? ffi.nullptr, + userInfoKey, + errorDomain); + return ObjCBlock10._(_ret, _lib); + } + + static NSError new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); + return NSError._(_ret, _lib, retain: false, release: true); + } + + static NSError alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); + return NSError._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSErrorDomain = ffi.Pointer; + +/// Immutable Dictionary +class NSDictionary extends NSObject { + NSDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDictionary] that points to the same underlying object as [other]. + static NSDictionary castFrom(T other) { + return NSDictionary._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSDictionary] that wraps the given raw object pointer. + static NSDictionary castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDictionary._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDictionary]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); + } + + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); + } + + NSObject objectForKey_(NSObject aKey) { + final _ret = _lib._objc_msgSend_91(_id, _lib._sel_objectForKey_1, aKey._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSEnumerator keyEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_keyEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + @override + NSDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_93( + _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSArray? get allKeys { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allKeys1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray allKeysForObject_(NSObject anObject) { + final _ret = + _lib._objc_msgSend_96(_id, _lib._sel_allKeysForObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray? get allValues { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allValues1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get descriptionInStringsFileFormat { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_descriptionInStringsFileFormat1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_indent_(NSObject locale, int level) { + final _ret = _lib._objc_msgSend_99( + _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool isEqualToDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_163(_id, _lib._sel_isEqualToDictionary_1, + otherDictionary?._id ?? ffi.nullptr); + } + + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + NSArray objectsForKeys_notFoundMarker_(NSArray? keys, NSObject marker) { + final _ret = _lib._objc_msgSend_164( + _id, + _lib._sel_objectsForKeys_notFoundMarker_1, + keys?._id ?? ffi.nullptr, + marker._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. + bool writeToURL_error_( + NSURL? url, ffi.Pointer> error) { + return _lib._objc_msgSend_109( + _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); + } + + NSArray keysSortedByValueUsingSelector_(ffi.Pointer comparator) { + final _ret = _lib._objc_msgSend_107( + _id, _lib._sel_keysSortedByValueUsingSelector_1, comparator); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + /// count refers to the number of elements in the dictionary + void getObjects_andKeys_count_(ffi.Pointer> objects, + ffi.Pointer> keys, int count) { + return _lib._objc_msgSend_165( + _id, _lib._sel_getObjects_andKeys_count_1, objects, keys, count); + } + + NSObject objectForKeyedSubscript_(NSObject key) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_objectForKeyedSubscript_1, key._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void enumerateKeysAndObjectsUsingBlock_(ObjCBlock8 block) { + return _lib._objc_msgSend_166( + _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); + } + + void enumerateKeysAndObjectsWithOptions_usingBlock_( + int opts, ObjCBlock8 block) { + return _lib._objc_msgSend_167( + _id, + _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, + opts, + block._id); + } + + NSArray keysSortedByValueUsingComparator_(NSComparator cmptr) { + final _ret = _lib._objc_msgSend_141( + _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray keysSortedByValueWithOptions_usingComparator_( + int opts, NSComparator cmptr) { + final _ret = _lib._objc_msgSend_142(_id, + _lib._sel_keysSortedByValueWithOptions_usingComparator_1, opts, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSObject keysOfEntriesPassingTest_(ObjCBlock9 predicate) { + final _ret = _lib._objc_msgSend_168( + _id, _lib._sel_keysOfEntriesPassingTest_1, predicate._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject keysOfEntriesWithOptions_passingTest_( + int opts, ObjCBlock9 predicate) { + final _ret = _lib._objc_msgSend_169(_id, + _lib._sel_keysOfEntriesWithOptions_passingTest_1, opts, predicate._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:andKeys:count: + void getObjects_andKeys_(ffi.Pointer> objects, + ffi.Pointer> keys) { + return _lib._objc_msgSend_170( + _id, _lib._sel_getObjects_andKeys_1, objects, keys); + } + + /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. + static NSDictionary dictionaryWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_171(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_172(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_171( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_172( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } + + /// the atomically flag is ignored if url of a type that cannot be written atomically. + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } + + static NSDictionary dictionary(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObject_forKey_( + NativeCupertinoHttp _lib, NSObject object, NSObject key) { + final _ret = _lib._objc_msgSend_173(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjects_forKeys_count_( + NativeCupertinoHttp _lib, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_93(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjectsAndKeys_( + NativeCupertinoHttp _lib, NSObject firstObject) { + final _ret = _lib._objc_msgSend_91(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithDictionary_( + NativeCupertinoHttp _lib, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_174(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjects_forKeys_( + NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_175( + _lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithDictionary_(NSDictionary? otherDictionary) { + final _ret = _lib._objc_msgSend_174(_id, _lib._sel_initWithDictionary_1, + otherDictionary?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithDictionary_copyItems_( + NSDictionary? otherDictionary, bool flag) { + final _ret = _lib._objc_msgSend_176( + _id, + _lib._sel_initWithDictionary_copyItems_1, + otherDictionary?._id ?? ffi.nullptr, + flag); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } + + NSDictionary initWithObjects_forKeys_(NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_175( + _id, + _lib._sel_initWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Reads dictionary stored in NSPropertyList format from the specified url. + NSDictionary initWithContentsOfURL_error_( + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_177( + _id, + _lib._sel_initWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Reads dictionary stored in NSPropertyList format from the specified url. + static NSDictionary dictionaryWithContentsOfURL_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_177( + _lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. + /// The keys are copied from the array and must be copyable. + /// If the array parameter is nil or not an NSArray, an exception is thrown. + /// If the array of keys is empty, an empty key set is returned. + /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). + /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. + /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. + static NSObject sharedKeySetForKeys_( + NativeCupertinoHttp _lib, NSArray? keys) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSDictionary1, + _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + int countByEnumeratingWithState_objects_count_( + ffi.Pointer state, + ffi.Pointer> buffer, + int len) { + return _lib._objc_msgSend_178( + _id, + _lib._sel_countByEnumeratingWithState_objects_count_1, + state, + buffer, + len); + } + + static NSDictionary new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } + + static NSDictionary alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } +} + +class NSEnumerator extends NSObject { + NSEnumerator._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSEnumerator] that points to the same underlying object as [other]. + static NSEnumerator castFrom(T other) { + return NSEnumerator._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSEnumerator] that wraps the given raw object pointer. + static NSEnumerator castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSEnumerator._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSEnumerator]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSEnumerator1); + } + + NSObject nextObject() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nextObject1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? get allObjects { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSEnumerator new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); + return NSEnumerator._(_ret, _lib, retain: false, release: true); + } + + static NSEnumerator alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); + return NSEnumerator._(_ret, _lib, retain: false, release: true); + } +} + +/// Immutable Array +class NSArray extends NSObject { + NSArray._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSArray] that points to the same underlying object as [other]. + static NSArray castFrom(T other) { + return NSArray._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSArray] that wraps the given raw object pointer. + static NSArray castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSArray._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSArray]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); + } + + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); + } + + NSObject objectAtIndex_(int index) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndex_1, index); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + NSArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_95( + _id, _lib._sel_initWithObjects_count_1, objects, cnt); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray arrayByAddingObject_(NSObject anObject) { + final _ret = _lib._objc_msgSend_96( + _id, _lib._sel_arrayByAddingObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray arrayByAddingObjectsFromArray_(NSArray? otherArray) { + final _ret = _lib._objc_msgSend_97( + _id, + _lib._sel_arrayByAddingObjectsFromArray_1, + otherArray?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSString componentsJoinedByString_(NSString? separator) { + final _ret = _lib._objc_msgSend_98(_id, + _lib._sel_componentsJoinedByString_1, separator?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + bool containsObject_(NSObject anObject) { + return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); + } + + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_indent_(NSObject locale, int level) { + final _ret = _lib._objc_msgSend_99( + _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSObject firstObjectCommonWithArray_(NSArray? otherArray) { + final _ret = _lib._objc_msgSend_100(_id, + _lib._sel_firstObjectCommonWithArray_1, otherArray?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void getObjects_range_( + ffi.Pointer> objects, NSRange range) { + return _lib._objc_msgSend_101( + _id, _lib._sel_getObjects_range_1, objects, range); + } + + int indexOfObject_(NSObject anObject) { + return _lib._objc_msgSend_102(_id, _lib._sel_indexOfObject_1, anObject._id); + } + + int indexOfObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_103( + _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); + } + + int indexOfObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_102( + _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); + } + + int indexOfObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_103( + _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); + } + + bool isEqualToArray_(NSArray? otherArray) { + return _lib._objc_msgSend_104( + _id, _lib._sel_isEqualToArray_1, otherArray?._id ?? ffi.nullptr); + } + + NSObject get firstObject { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_firstObject1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject get lastObject { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_lastObject1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + NSEnumerator reverseObjectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_reverseObjectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + NSData? get sortedArrayHint { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_sortedArrayHint1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSArray sortedArrayUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context) { + final _ret = _lib._objc_msgSend_105( + _id, _lib._sel_sortedArrayUsingFunction_context_1, comparator, context); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray sortedArrayUsingFunction_context_hint_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + NSData? hint) { + final _ret = _lib._objc_msgSend_106( + _id, + _lib._sel_sortedArrayUsingFunction_context_hint_1, + comparator, + context, + hint?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { + final _ret = _lib._objc_msgSend_107( + _id, _lib._sel_sortedArrayUsingSelector_1, comparator); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray subarrayWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_108(_id, _lib._sel_subarrayWithRange_1, range); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. + bool writeToURL_error_( + NSURL? url, ffi.Pointer> error) { + return _lib._objc_msgSend_109( + _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); + } + + void makeObjectsPerformSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_7( + _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); + } + + void makeObjectsPerformSelector_withObject_( + ffi.Pointer aSelector, NSObject argument) { + return _lib._objc_msgSend_110( + _id, + _lib._sel_makeObjectsPerformSelector_withObject_1, + aSelector, + argument._id); + } + + NSArray objectsAtIndexes_(NSIndexSet? indexes) { + final _ret = _lib._objc_msgSend_131( + _id, _lib._sel_objectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSObject objectAtIndexedSubscript_(int idx) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndexedSubscript_1, idx); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void enumerateObjectsUsingBlock_(ObjCBlock3 block) { + return _lib._objc_msgSend_132( + _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); + } + + void enumerateObjectsWithOptions_usingBlock_(int opts, ObjCBlock3 block) { + return _lib._objc_msgSend_133(_id, + _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); + } + + void enumerateObjectsAtIndexes_options_usingBlock_( + NSIndexSet? s, int opts, ObjCBlock3 block) { + return _lib._objc_msgSend_134( + _id, + _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, + s?._id ?? ffi.nullptr, + opts, + block._id); + } + + int indexOfObjectPassingTest_(ObjCBlock4 predicate) { + return _lib._objc_msgSend_135( + _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); + } + + int indexOfObjectWithOptions_passingTest_(int opts, ObjCBlock4 predicate) { + return _lib._objc_msgSend_136(_id, + _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); + } + + int indexOfObjectAtIndexes_options_passingTest_( + NSIndexSet? s, int opts, ObjCBlock4 predicate) { + return _lib._objc_msgSend_137( + _id, + _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, + s?._id ?? ffi.nullptr, + opts, + predicate._id); + } + + NSIndexSet indexesOfObjectsPassingTest_(ObjCBlock4 predicate) { + final _ret = _lib._objc_msgSend_138( + _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesOfObjectsWithOptions_passingTest_( + int opts, ObjCBlock4 predicate) { + final _ret = _lib._objc_msgSend_139( + _id, + _lib._sel_indexesOfObjectsWithOptions_passingTest_1, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( + NSIndexSet? s, int opts, ObjCBlock4 predicate) { + final _ret = _lib._objc_msgSend_140( + _id, + _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, + s?._id ?? ffi.nullptr, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSArray sortedArrayUsingComparator_(NSComparator cmptr) { + final _ret = _lib._objc_msgSend_141( + _id, _lib._sel_sortedArrayUsingComparator_1, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray sortedArrayWithOptions_usingComparator_( + int opts, NSComparator cmptr) { + final _ret = _lib._objc_msgSend_142( + _id, _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + /// binary search + int indexOfObject_inSortedRange_options_usingComparator_( + NSObject obj, NSRange r, int opts, NSComparator cmp) { + return _lib._objc_msgSend_143( + _id, + _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, + obj._id, + r, + opts, + cmp); + } + + static NSArray array(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithObject_(NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithObjects_count_(NativeCupertinoHttp _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_95( + _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithObjects_( + NativeCupertinoHttp _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithArray_(NativeCupertinoHttp _lib, NSArray? array) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSArray1, + _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithObjects_(NSObject firstObj) { + final _ret = + _lib._objc_msgSend_91(_id, _lib._sel_initWithObjects_1, firstObj._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithArray_(NSArray? array) { + final _ret = _lib._objc_msgSend_100( + _id, _lib._sel_initWithArray_1, array?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithArray_copyItems_(NSArray? array, bool flag) { + final _ret = _lib._objc_msgSend_144(_id, + _lib._sel_initWithArray_copyItems_1, array?._id ?? ffi.nullptr, flag); + return NSArray._(_ret, _lib, retain: false, release: true); + } + + /// Reads array stored in NSPropertyList format from the specified url. + NSArray initWithContentsOfURL_error_( + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_145( + _id, + _lib._sel_initWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + /// Reads array stored in NSPropertyList format from the specified url. + static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_145( + _lib._class_NSArray1, + _lib._sel_arrayWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSOrderedCollectionDifference + differenceFromArray_withOptions_usingEquivalenceTest_( + NSArray? other, int options, ObjCBlock7 block) { + final _ret = _lib._objc_msgSend_154( + _id, + _lib._sel_differenceFromArray_withOptions_usingEquivalenceTest_1, + other?._id ?? ffi.nullptr, + options, + block._id); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } + + NSOrderedCollectionDifference differenceFromArray_withOptions_( + NSArray? other, int options) { + final _ret = _lib._objc_msgSend_155( + _id, + _lib._sel_differenceFromArray_withOptions_1, + other?._id ?? ffi.nullptr, + options); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } + + /// Uses isEqual: to determine the difference between the parameter and the receiver + NSOrderedCollectionDifference differenceFromArray_(NSArray? other) { + final _ret = _lib._objc_msgSend_156( + _id, _lib._sel_differenceFromArray_1, other?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } + + NSArray arrayByApplyingDifference_( + NSOrderedCollectionDifference? difference) { + final _ret = _lib._objc_msgSend_157(_id, + _lib._sel_arrayByApplyingDifference_1, difference?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead. + void getObjects_(ffi.Pointer> objects) { + return _lib._objc_msgSend_158(_id, _lib._sel_getObjects_1, objects); + } + + /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. + static NSArray arrayWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_159(_lib._class_NSArray1, + _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSArray arrayWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_160(_lib._class_NSArray1, + _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_159( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_160( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } + + static NSArray new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); + return NSArray._(_ret, _lib, retain: false, release: true); + } + + static NSArray alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); + return NSArray._(_ret, _lib, retain: false, release: true); + } +} + +class NSIndexSet extends NSObject { + NSIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSIndexSet] that points to the same underlying object as [other]. + static NSIndexSet castFrom(T other) { + return NSIndexSet._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSIndexSet] that wraps the given raw object pointer. + static NSIndexSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSIndexSet._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSIndexSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); + } + + static NSIndexSet indexSet(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + static NSIndexSet indexSetWithIndex_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + static NSIndexSet indexSetWithIndexesInRange_( + NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_111( + _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet initWithIndexesInRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_111(_id, _lib._sel_initWithIndexesInRange_1, range); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet initWithIndexSet_(NSIndexSet? indexSet) { + final _ret = _lib._objc_msgSend_112( + _id, _lib._sel_initWithIndexSet_1, indexSet?._id ?? ffi.nullptr); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet initWithIndex_(int value) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithIndex_1, value); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + bool isEqualToIndexSet_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_113( + _id, _lib._sel_isEqualToIndexSet_1, indexSet?._id ?? ffi.nullptr); + } + + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); + } + + int get firstIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); + } + + int get lastIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); + } + + int indexGreaterThanIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexGreaterThanIndex_1, value); + } + + int indexLessThanIndex_(int value) { + return _lib._objc_msgSend_114(_id, _lib._sel_indexLessThanIndex_1, value); + } + + int indexGreaterThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); + } + + int indexLessThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); + } + + int getIndexes_maxCount_inIndexRange_(ffi.Pointer indexBuffer, + int bufferSize, NSRangePointer range) { + return _lib._objc_msgSend_115( + _id, + _lib._sel_getIndexes_maxCount_inIndexRange_1, + indexBuffer, + bufferSize, + range); + } + + int countOfIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_116( + _id, _lib._sel_countOfIndexesInRange_1, range); + } + + bool containsIndex_(int value) { + return _lib._objc_msgSend_117(_id, _lib._sel_containsIndex_1, value); + } + + bool containsIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_118( + _id, _lib._sel_containsIndexesInRange_1, range); + } + + bool containsIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_113( + _id, _lib._sel_containsIndexes_1, indexSet?._id ?? ffi.nullptr); + } + + bool intersectsIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_118( + _id, _lib._sel_intersectsIndexesInRange_1, range); + } + + void enumerateIndexesUsingBlock_(ObjCBlock block) { + return _lib._objc_msgSend_119( + _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); + } + + void enumerateIndexesWithOptions_usingBlock_(int opts, ObjCBlock block) { + return _lib._objc_msgSend_120(_id, + _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); + } + + void enumerateIndexesInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock block) { + return _lib._objc_msgSend_121( + _id, + _lib._sel_enumerateIndexesInRange_options_usingBlock_1, + range, + opts, + block._id); + } + + int indexPassingTest_(ObjCBlock1 predicate) { + return _lib._objc_msgSend_122( + _id, _lib._sel_indexPassingTest_1, predicate._id); + } + + int indexWithOptions_passingTest_(int opts, ObjCBlock1 predicate) { + return _lib._objc_msgSend_123( + _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); + } + + int indexInRange_options_passingTest_( + NSRange range, int opts, ObjCBlock1 predicate) { + return _lib._objc_msgSend_124( + _id, + _lib._sel_indexInRange_options_passingTest_1, + range, + opts, + predicate._id); + } + + NSIndexSet indexesPassingTest_(ObjCBlock1 predicate) { + final _ret = _lib._objc_msgSend_125( + _id, _lib._sel_indexesPassingTest_1, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesWithOptions_passingTest_(int opts, ObjCBlock1 predicate) { + final _ret = _lib._objc_msgSend_126( + _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesInRange_options_passingTest_( + NSRange range, int opts, ObjCBlock1 predicate) { + final _ret = _lib._objc_msgSend_127( + _id, + _lib._sel_indexesInRange_options_passingTest_1, + range, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + void enumerateRangesUsingBlock_(ObjCBlock2 block) { + return _lib._objc_msgSend_128( + _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); + } + + void enumerateRangesWithOptions_usingBlock_(int opts, ObjCBlock2 block) { + return _lib._objc_msgSend_129(_id, + _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); + } + + void enumerateRangesInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock2 block) { + return _lib._objc_msgSend_130( + _id, + _lib._sel_enumerateRangesInRange_options_usingBlock_1, + range, + opts, + block._id); + } + + static NSIndexSet new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); + return NSIndexSet._(_ret, _lib, retain: false, release: true); + } + + static NSIndexSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); + return NSIndexSet._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSRangePointer = ffi.Pointer; + +class _ObjCBlockBase implements ffi.Finalizable { + final ffi.Pointer<_ObjCBlock> _id; + final NativeCupertinoHttp _lib; + bool _pendingRelease; + + _ObjCBlockBase._(this._id, this._lib, + {bool retain = false, bool release = false}) + : _pendingRelease = release { + if (retain) { + _lib._Block_copy(_id.cast()); + } + if (release) { + _lib._objc_releaseFinalizer11.attach(this, _id.cast(), detach: this); + } + } + + /// Releases the reference to the underlying ObjC block held by this wrapper. + /// Throws a StateError if this wrapper doesn't currently hold a reference. + void release() { + if (_pendingRelease) { + _pendingRelease = false; + _lib._Block_release(_id.cast()); + _lib._objc_releaseFinalizer11.detach(this); + } else { + throw StateError( + 'Released an ObjC block that was unowned or already released.'); + } + } + + @override + bool operator ==(Object other) { + return other is _ObjCBlockBase && _id == other._id; + } + + @override + int get hashCode => _id.hashCode; +} + +void _ObjCBlock_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock_closureRegistry = {}; +int _ObjCBlock_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_registerClosure(Function fn) { + final id = ++_ObjCBlock_closureRegistryIndex; + _ObjCBlock_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return _ObjCBlock_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock extends _ObjCBlockBase { + ObjCBlock._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + NSUInteger arg0, ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock.fromFunction(NativeCupertinoHttp lib, + void Function(int arg0, ffi.Pointer arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock_closureTrampoline) + .cast(), + _ObjCBlock_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(int arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, int arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +class _ObjCBlockDesc extends ffi.Struct { + @ffi.UnsignedLong() + external int reserved; + + @ffi.UnsignedLong() + external int size; + + external ffi.Pointer copy_helper; + + external ffi.Pointer dispose_helper; + + external ffi.Pointer signature; +} + +class _ObjCBlock extends ffi.Struct { + external ffi.Pointer isa; + + @ffi.Int() + external int flags; + + @ffi.Int() + external int reserved; + + external ffi.Pointer invoke; + + external ffi.Pointer<_ObjCBlockDesc> descriptor; + + external ffi.Pointer target; +} + +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; +} + +bool _ObjCBlock1_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + bool Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock1_closureRegistry = {}; +int _ObjCBlock1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock1_registerClosure(Function fn) { + final id = ++_ObjCBlock1_closureRegistryIndex; + _ObjCBlock1_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock1_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return _ObjCBlock1_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock1 extends _ObjCBlockBase { + ObjCBlock1._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock1.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock1_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock1.fromFunction(NativeCupertinoHttp lib, + bool Function(int arg0, ffi.Pointer arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock1_closureTrampoline, false) + .cast(), + _ObjCBlock1_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call(int arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer<_ObjCBlock> block, int arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +void _ObjCBlock2_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function( + NSRange arg0, ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock2_closureRegistry = {}; +int _ObjCBlock2_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock2_registerClosure(Function fn) { + final id = ++_ObjCBlock2_closureRegistryIndex; + _ObjCBlock2_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock2_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { + return _ObjCBlock2_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock2 extends _ObjCBlockBase { + ObjCBlock2._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock2.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSRange arg0, ffi.Pointer arg1)>( + _ObjCBlock2_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock2.fromFunction(NativeCupertinoHttp lib, + void Function(NSRange arg0, ffi.Pointer arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSRange arg0, ffi.Pointer arg1)>( + _ObjCBlock2_closureTrampoline) + .cast(), + _ObjCBlock2_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(NSRange arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +void _ObjCBlock3_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock3_closureRegistry = {}; +int _ObjCBlock3_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock3_registerClosure(Function fn) { + final id = ++_ObjCBlock3_closureRegistryIndex; + _ObjCBlock3_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock3_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _ObjCBlock3_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock3 extends _ObjCBlockBase { + ObjCBlock3._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock3.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + NSUInteger arg1, ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock3_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock3.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock3_closureTrampoline) + .cast(), + _ObjCBlock3_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +bool _ObjCBlock4_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock4_closureRegistry = {}; +int _ObjCBlock4_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock4_registerClosure(Function fn) { + final id = ++_ObjCBlock4_closureRegistryIndex; + _ObjCBlock4_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock4_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _ObjCBlock4_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock4 extends _ObjCBlockBase { + ObjCBlock4._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock4.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + NSUInteger arg1, ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock4_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock4.fromFunction( + NativeCupertinoHttp lib, + bool Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock4_closureTrampoline, false) + .cast(), + _ObjCBlock4_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call( + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef NSComparator = ffi.Pointer<_ObjCBlock>; +int _ObjCBlock5_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock5_closureRegistry = {}; +int _ObjCBlock5_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock5_registerClosure(Function fn) { + final id = ++_ObjCBlock5_closureRegistryIndex; + _ObjCBlock5_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +int _ObjCBlock5_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock5_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock5 extends _ObjCBlockBase { + ObjCBlock5._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock5.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock5_fnPtrTrampoline, 0) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock5.fromFunction( + NativeCupertinoHttp lib, + int Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock5_closureTrampoline, 0) + .cast(), + _ObjCBlock5_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + int call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; +} + +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; +} + +class NSOrderedCollectionDifference extends NSObject { + NSOrderedCollectionDifference._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOrderedCollectionDifference] that points to the same underlying object as [other]. + static NSOrderedCollectionDifference castFrom( + T other) { + return NSOrderedCollectionDifference._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSOrderedCollectionDifference] that wraps the given raw object pointer. + static NSOrderedCollectionDifference castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOrderedCollectionDifference._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOrderedCollectionDifference]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOrderedCollectionDifference1); + } + + NSOrderedCollectionDifference initWithChanges_(NSObject? changes) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_initWithChanges_1, changes?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } + + NSOrderedCollectionDifference + initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_( + NSIndexSet? inserts, + NSObject? insertedObjects, + NSIndexSet? removes, + NSObject? removedObjects, + NSObject? changes) { + final _ret = _lib._objc_msgSend_146( + _id, + _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1, + inserts?._id ?? ffi.nullptr, + insertedObjects?._id ?? ffi.nullptr, + removes?._id ?? ffi.nullptr, + removedObjects?._id ?? ffi.nullptr, + changes?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } + + NSOrderedCollectionDifference + initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_( + NSIndexSet? inserts, + NSObject? insertedObjects, + NSIndexSet? removes, + NSObject? removedObjects) { + final _ret = _lib._objc_msgSend_147( + _id, + _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1, + inserts?._id ?? ffi.nullptr, + insertedObjects?._id ?? ffi.nullptr, + removes?._id ?? ffi.nullptr, + removedObjects?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } + + NSObject? get insertions { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_insertions1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject? get removals { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_removals1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + bool get hasChanges { + return _lib._objc_msgSend_11(_id, _lib._sel_hasChanges1); + } + + NSOrderedCollectionDifference differenceByTransformingChangesWithBlock_( + ObjCBlock6 block) { + final _ret = _lib._objc_msgSend_153( + _id, _lib._sel_differenceByTransformingChangesWithBlock_1, block._id); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } + + NSOrderedCollectionDifference inverseDifference() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_inverseDifference1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } + + static NSOrderedCollectionDifference new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionDifference1, _lib._sel_new1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: false, release: true); + } + + static NSOrderedCollectionDifference alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionDifference1, _lib._sel_alloc1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: false, release: true); + } +} + +ffi.Pointer _ObjCBlock6_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>()(arg0); +} + +final _ObjCBlock6_closureRegistry = {}; +int _ObjCBlock6_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock6_registerClosure(Function fn) { + final id = ++_ObjCBlock6_closureRegistryIndex; + _ObjCBlock6_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer _ObjCBlock6_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock6_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock6 extends _ObjCBlockBase { + ObjCBlock6._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock6.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock6_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock6.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock6_closureTrampoline) + .cast(), + _ObjCBlock6_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +class NSOrderedCollectionChange extends NSObject { + NSOrderedCollectionChange._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOrderedCollectionChange] that points to the same underlying object as [other]. + static NSOrderedCollectionChange castFrom(T other) { + return NSOrderedCollectionChange._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSOrderedCollectionChange] that wraps the given raw object pointer. + static NSOrderedCollectionChange castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOrderedCollectionChange._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOrderedCollectionChange]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOrderedCollectionChange1); + } + + static NSOrderedCollectionChange changeWithObject_type_index_( + NativeCupertinoHttp _lib, NSObject anObject, int type, int index) { + final _ret = _lib._objc_msgSend_148(_lib._class_NSOrderedCollectionChange1, + _lib._sel_changeWithObject_type_index_1, anObject._id, type, index); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + } + + static NSOrderedCollectionChange changeWithObject_type_index_associatedIndex_( + NativeCupertinoHttp _lib, + NSObject anObject, + int type, + int index, + int associatedIndex) { + final _ret = _lib._objc_msgSend_149( + _lib._class_NSOrderedCollectionChange1, + _lib._sel_changeWithObject_type_index_associatedIndex_1, + anObject._id, + type, + index, + associatedIndex); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + } + + NSObject get object { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + int get changeType { + return _lib._objc_msgSend_150(_id, _lib._sel_changeType1); + } + + int get index { + return _lib._objc_msgSend_12(_id, _lib._sel_index1); + } + + int get associatedIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_associatedIndex1); + } + + @override + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSOrderedCollectionChange initWithObject_type_index_( + NSObject anObject, int type, int index) { + final _ret = _lib._objc_msgSend_151( + _id, _lib._sel_initWithObject_type_index_1, anObject._id, type, index); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + } + + NSOrderedCollectionChange initWithObject_type_index_associatedIndex_( + NSObject anObject, int type, int index, int associatedIndex) { + final _ret = _lib._objc_msgSend_152( + _id, + _lib._sel_initWithObject_type_index_associatedIndex_1, + anObject._id, + type, + index, + associatedIndex); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + } + + static NSOrderedCollectionChange new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionChange1, _lib._sel_new1); + return NSOrderedCollectionChange._(_ret, _lib, + retain: false, release: true); + } + + static NSOrderedCollectionChange alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionChange1, _lib._sel_alloc1); + return NSOrderedCollectionChange._(_ret, _lib, + retain: false, release: true); + } +} + +abstract class NSCollectionChangeType { + static const int NSCollectionChangeInsert = 0; + static const int NSCollectionChangeRemove = 1; +} + +abstract class NSOrderedCollectionDifferenceCalculationOptions { + static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = + 1; + static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = + 2; + static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; +} + +bool _ObjCBlock7_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock7_closureRegistry = {}; +int _ObjCBlock7_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock7_registerClosure(Function fn) { + final id = ++_ObjCBlock7_closureRegistryIndex; + _ObjCBlock7_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock7_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock7_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock7 extends _ObjCBlockBase { + ObjCBlock7._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock7.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock7_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock7.fromFunction( + NativeCupertinoHttp lib, + bool Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock7_closureTrampoline, false) + .cast(), + _ObjCBlock7_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +void _ObjCBlock8_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock8_closureRegistry = {}; +int _ObjCBlock8_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock8_registerClosure(Function fn) { + final id = ++_ObjCBlock8_closureRegistryIndex; + _ObjCBlock8_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock8_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock8_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock8 extends _ObjCBlockBase { + ObjCBlock8._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock8.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock8_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock8.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock8_closureTrampoline) + .cast(), + _ObjCBlock8_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +bool _ObjCBlock9_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1, ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock9_closureRegistry = {}; +int _ObjCBlock9_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock9_registerClosure(Function fn) { + final id = ++_ObjCBlock9_closureRegistryIndex; + _ObjCBlock9_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock9_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock9_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock9 extends _ObjCBlockBase { + ObjCBlock9._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock9.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock9_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock9.fromFunction( + NativeCupertinoHttp lib, + bool Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock9_closureTrampoline, false) + .cast(), + _ObjCBlock9_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +class NSFastEnumerationState extends ffi.Struct { + @ffi.UnsignedLong() + external int state; + + external ffi.Pointer> itemsPtr; + + external ffi.Pointer mutationsPtr; + + @ffi.Array.multi([5]) + external ffi.Array extra; +} + +ffi.Pointer _ObjCBlock10_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>()(arg0, arg1); +} + +final _ObjCBlock10_closureRegistry = {}; +int _ObjCBlock10_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock10_registerClosure(Function fn) { + final id = ++_ObjCBlock10_closureRegistryIndex; + _ObjCBlock10_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer _ObjCBlock10_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) { + return _ObjCBlock10_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock10 extends _ObjCBlockBase { + ObjCBlock10._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock10.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>( + _ObjCBlock10_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock10.fromFunction( + NativeCupertinoHttp lib, + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>( + _ObjCBlock10_closureTrampoline) + .cast(), + _ObjCBlock10_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call( + ffi.Pointer arg0, NSErrorUserInfoKey arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef NSErrorUserInfoKey = ffi.Pointer; +typedef NSURLResourceKey = ffi.Pointer; + +/// Working with Bookmarks and alias (bookmark) files +abstract class NSURLBookmarkCreationOptions { + /// This option does nothing and has no effect on bookmark resolution + static const int NSURLBookmarkCreationPreferFileIDResolution = 256; + + /// creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways + static const int NSURLBookmarkCreationMinimalBookmark = 512; + + /// include the properties required by writeBookmarkData:toURL:options: in the bookmark data created + static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; + + /// include information in the bookmark data which allows the same sandboxed process to access the resource after being relaunched + static const int NSURLBookmarkCreationWithSecurityScope = 2048; + + /// if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted + static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; +} + +abstract class NSURLBookmarkResolutionOptions { + /// don't perform any user interaction during bookmark resolution + static const int NSURLBookmarkResolutionWithoutUI = 256; + + /// don't mount a volume during bookmark resolution + static const int NSURLBookmarkResolutionWithoutMounting = 512; + + /// use the secure information included at creation time to provide the ability to access the resource in a sandboxed process + static const int NSURLBookmarkResolutionWithSecurityScope = 1024; +} + +typedef NSURLBookmarkFileCreationOptions = NSUInteger; + +class NSURLHandle extends NSObject { + NSURLHandle._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLHandle] that points to the same underlying object as [other]. + static NSURLHandle castFrom(T other) { + return NSURLHandle._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLHandle] that wraps the given raw object pointer. + static NSURLHandle castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLHandle._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLHandle]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); + } + + static void registerURLHandleClass_( + NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { + return _lib._objc_msgSend_200(_lib._class_NSURLHandle1, + _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); + } + + static NSObject URLHandleClassForURL_( + NativeCupertinoHttp _lib, NSURL? anURL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSURLHandle1, + _lib._sel_URLHandleClassForURL_1, anURL?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + int status() { + return _lib._objc_msgSend_202(_id, _lib._sel_status1); + } + + NSString failureReason() { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_failureReason1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + void addClient_(NSObject? client) { + return _lib._objc_msgSend_200( + _id, _lib._sel_addClient_1, client?._id ?? ffi.nullptr); + } + + void removeClient_(NSObject? client) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeClient_1, client?._id ?? ffi.nullptr); + } + + void loadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); + } + + void cancelLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); + } + + NSData resourceData() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_resourceData1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + NSData availableResourceData() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_availableResourceData1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + int expectedResourceDataSize() { + return _lib._objc_msgSend_82(_id, _lib._sel_expectedResourceDataSize1); + } + + void flushCachedData() { + return _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); + } + + void backgroundLoadDidFailWithReason_(NSString? reason) { + return _lib._objc_msgSend_188( + _id, + _lib._sel_backgroundLoadDidFailWithReason_1, + reason?._id ?? ffi.nullptr); + } + + void didLoadBytes_loadComplete_(NSData? newBytes, bool yorn) { + return _lib._objc_msgSend_203(_id, _lib._sel_didLoadBytes_loadComplete_1, + newBytes?._id ?? ffi.nullptr, yorn); + } + + static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL? anURL) { + return _lib._objc_msgSend_204(_lib._class_NSURLHandle1, + _lib._sel_canInitWithURL_1, anURL?._id ?? ffi.nullptr); + } + + static NSURLHandle cachedHandleForURL_( + NativeCupertinoHttp _lib, NSURL? anURL) { + final _ret = _lib._objc_msgSend_205(_lib._class_NSURLHandle1, + _lib._sel_cachedHandleForURL_1, anURL?._id ?? ffi.nullptr); + return NSURLHandle._(_ret, _lib, retain: true, release: true); + } + + NSObject initWithURL_cached_(NSURL? anURL, bool willCache) { + final _ret = _lib._objc_msgSend_206(_id, _lib._sel_initWithURL_cached_1, + anURL?._id ?? ffi.nullptr, willCache); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject propertyForKey_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSObject propertyForKeyIfAvailable_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_42(_id, + _lib._sel_propertyForKeyIfAvailable_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + bool writeProperty_forKey_(NSObject propertyValue, NSString? propertyKey) { + return _lib._objc_msgSend_199(_id, _lib._sel_writeProperty_forKey_1, + propertyValue._id, propertyKey?._id ?? ffi.nullptr); + } + + bool writeData_(NSData? data) { + return _lib._objc_msgSend_35( + _id, _lib._sel_writeData_1, data?._id ?? ffi.nullptr); + } + + NSData loadInForeground() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_loadInForeground1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + void beginLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); + } + + void endLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); + } + + static NSURLHandle new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); + return NSURLHandle._(_ret, _lib, retain: false, release: true); + } + + static NSURLHandle alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); + return NSURLHandle._(_ret, _lib, retain: false, release: true); + } +} + +abstract class NSURLHandleStatus { + static const int NSURLHandleNotLoaded = 0; + static const int NSURLHandleLoadSucceeded = 1; + static const int NSURLHandleLoadInProgress = 2; + static const int NSURLHandleLoadFailed = 3; +} + +abstract class NSDataWritingOptions { + /// Hint to use auxiliary file when saving; equivalent to atomically:YES + static const int NSDataWritingAtomic = 1; + + /// Hint to prevent overwriting an existing file. Cannot be combined with NSDataWritingAtomic. + static const int NSDataWritingWithoutOverwriting = 2; + static const int NSDataWritingFileProtectionNone = 268435456; + static const int NSDataWritingFileProtectionComplete = 536870912; + static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; + static const int + NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = + 1073741824; + static const int NSDataWritingFileProtectionMask = 4026531840; + + /// Deprecated name for NSDataWritingAtomic + static const int NSAtomicWrite = 1; +} + +/// Data Search Options +abstract class NSDataSearchOptions { + static const int NSDataSearchBackwards = 1; + static const int NSDataSearchAnchored = 2; +} + +void _ObjCBlock11_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock11_closureRegistry = {}; +int _ObjCBlock11_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock11_registerClosure(Function fn) { + final id = ++_ObjCBlock11_closureRegistryIndex; + _ObjCBlock11_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock11_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return _ObjCBlock11_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock11 extends _ObjCBlockBase { + ObjCBlock11._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock11.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>( + _ObjCBlock11_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock11.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>( + _ObjCBlock11_closureTrampoline) + .cast(), + _ObjCBlock11_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +/// Read/Write Options +abstract class NSDataReadingOptions { + /// Hint to map the file in if possible and safe + static const int NSDataReadingMappedIfSafe = 1; + + /// Hint to get the file not to be cached in the kernel + static const int NSDataReadingUncached = 2; + + /// Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given. + static const int NSDataReadingMappedAlways = 8; + + /// Deprecated name for NSDataReadingMappedIfSafe + static const int NSDataReadingMapped = 1; + + /// Deprecated name for NSDataReadingMapped + static const int NSMappedRead = 1; + + /// Deprecated name for NSDataReadingUncached + static const int NSUncachedRead = 2; +} + +void _ObjCBlock12_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); +} + +final _ObjCBlock12_closureRegistry = {}; +int _ObjCBlock12_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock12_registerClosure(Function fn) { + final id = ++_ObjCBlock12_closureRegistryIndex; + _ObjCBlock12_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock12_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return _ObjCBlock12_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock12 extends _ObjCBlockBase { + ObjCBlock12._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock12.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock12_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock12.fromFunction(NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock12_closureTrampoline) + .cast(), + _ObjCBlock12_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +abstract class NSDataBase64DecodingOptions { + /// Use the following option to modify the decoding algorithm so that it ignores unknown non-Base64 bytes, including line ending characters. + static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; +} + +/// Base 64 Options +abstract class NSDataBase64EncodingOptions { + /// Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default. + static const int NSDataBase64Encoding64CharacterLineLength = 1; + static const int NSDataBase64Encoding76CharacterLineLength = 2; + + /// Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF. + static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; + static const int NSDataBase64EncodingEndLineWithLineFeed = 32; +} + +/// Various algorithms provided for compression APIs. See NSData and NSMutableData. +abstract class NSDataCompressionAlgorithm { + /// LZFSE is the recommended compression algorithm if you don't have a specific reason to use another algorithm. Note that LZFSE is intended for use with Apple devices only. This algorithm generally compresses better than Zlib, but not as well as LZMA. It is generally slower than LZ4. + static const int NSDataCompressionAlgorithmLZFSE = 0; + + /// LZ4 is appropriate if compression speed is critical. LZ4 generally sacrifices compression ratio in order to achieve its greater speed. + /// This implementation of LZ4 makes a small modification to the standard format, which is described in greater detail in . + static const int NSDataCompressionAlgorithmLZ4 = 1; + + /// LZMA is appropriate if compression ratio is critical and memory usage and compression speed are not a factor. LZMA is an order of magnitude slower for both compression and decompression than other algorithms. It can also use a very large amount of memory, so if you need to compress large amounts of data on embedded devices with limited memory you should probably avoid LZMA. + /// Encoding uses LZMA level 6 only, but decompression works with any compression level. + static const int NSDataCompressionAlgorithmLZMA = 2; + + /// Zlib is appropriate if you want a good balance between compression speed and compression ratio, but only if you need interoperability with non-Apple platforms. Otherwise, LZFSE is generally a better choice than Zlib. + /// Encoding uses Zlib level 5 only, but decompression works with any compression level. It uses the raw DEFLATE format as described in IETF RFC 1951. + static const int NSDataCompressionAlgorithmZlib = 3; +} + +typedef UTF32Char = UInt32; +typedef UInt32 = ffi.UnsignedInt; + +abstract class NSStringEnumerationOptions { + static const int NSStringEnumerationByLines = 0; + static const int NSStringEnumerationByParagraphs = 1; + static const int NSStringEnumerationByComposedCharacterSequences = 2; + static const int NSStringEnumerationByWords = 3; + static const int NSStringEnumerationBySentences = 4; + static const int NSStringEnumerationByCaretPositions = 5; + static const int NSStringEnumerationByDeletionClusters = 6; + static const int NSStringEnumerationReverse = 256; + static const int NSStringEnumerationSubstringNotRequired = 512; + static const int NSStringEnumerationLocalized = 1024; +} + +void _ObjCBlock13_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + NSRange arg2, ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>()(arg0, arg1, arg2, arg3); +} + +final _ObjCBlock13_closureRegistry = {}; +int _ObjCBlock13_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock13_registerClosure(Function fn) { + final id = ++_ObjCBlock13_closureRegistryIndex; + _ObjCBlock13_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock13_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) { + return _ObjCBlock13_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2, arg3); +} + +class ObjCBlock13 extends _ObjCBlockBase { + ObjCBlock13._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock13.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + NSRange arg2, ffi.Pointer arg3)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>( + _ObjCBlock13_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock13.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>( + _ObjCBlock13_closureTrampoline) + .cast(), + _ObjCBlock13_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>()(_id, arg0, arg1, arg2, arg3); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +void _ObjCBlock14_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock14_closureRegistry = {}; +int _ObjCBlock14_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock14_registerClosure(Function fn) { + final id = ++_ObjCBlock14_closureRegistryIndex; + _ObjCBlock14_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock14_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock14_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock14 extends _ObjCBlockBase { + ObjCBlock14._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock14.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock14_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock14.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock14_closureTrampoline) + .cast(), + _ObjCBlock14_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef NSStringEncoding = NSUInteger; + +abstract class NSStringEncodingConversionOptions { + static const int NSStringEncodingConversionAllowLossy = 1; + static const int NSStringEncodingConversionExternalRepresentation = 2; +} + +typedef NSStringTransform = ffi.Pointer; +void _ObjCBlock15_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); +} + +final _ObjCBlock15_closureRegistry = {}; +int _ObjCBlock15_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock15_registerClosure(Function fn) { + final id = ++_ObjCBlock15_closureRegistryIndex; + _ObjCBlock15_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock15_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return _ObjCBlock15_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock15 extends _ObjCBlockBase { + ObjCBlock15._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock15.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock15_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock15.fromFunction(NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock15_closureTrampoline) + .cast(), + _ObjCBlock15_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef va_list = __builtin_va_list; +typedef __builtin_va_list = ffi.Pointer; + +abstract class NSQualityOfService { + static const int NSQualityOfServiceUserInteractive = 33; + static const int NSQualityOfServiceUserInitiated = 25; + static const int NSQualityOfServiceUtility = 17; + static const int NSQualityOfServiceBackground = 9; + static const int NSQualityOfServiceDefault = -1; +} + +abstract class ptrauth_key { + static const int ptrauth_key_asia = 0; + static const int ptrauth_key_asib = 1; + static const int ptrauth_key_asda = 2; + static const int ptrauth_key_asdb = 3; + static const int ptrauth_key_process_independent_code = 0; + static const int ptrauth_key_process_dependent_code = 1; + static const int ptrauth_key_process_independent_data = 2; + static const int ptrauth_key_process_dependent_data = 3; + static const int ptrauth_key_function_pointer = 0; + static const int ptrauth_key_return_address = 1; + static const int ptrauth_key_frame_pointer = 3; + static const int ptrauth_key_block_function = 0; + static const int ptrauth_key_cxx_vtable_pointer = 2; + static const int ptrauth_key_method_list_pointer = 2; + static const int ptrauth_key_objc_isa_pointer = 2; + static const int ptrauth_key_objc_super_pointer = 2; + static const int ptrauth_key_block_descriptor_pointer = 2; + static const int ptrauth_key_objc_sel_pointer = 3; + static const int ptrauth_key_objc_class_ro_pointer = 2; +} + +@ffi.Packed(2) +class wide extends ffi.Struct { + @UInt32() + external int lo; + + @SInt32() + external int hi; +} + +typedef SInt32 = ffi.Int; + +@ffi.Packed(2) +class UnsignedWide extends ffi.Struct { + @UInt32() + external int lo; + + @UInt32() + external int hi; +} + +class Float80 extends ffi.Struct { + @SInt16() + external int exp; + + @ffi.Array.multi([4]) + external ffi.Array man; +} + +typedef SInt16 = ffi.Short; +typedef UInt16 = ffi.UnsignedShort; + +class Float96 extends ffi.Struct { + @ffi.Array.multi([2]) + external ffi.Array exp; + + @ffi.Array.multi([4]) + external ffi.Array man; +} + +@ffi.Packed(2) +class Float32Point extends ffi.Struct { + @Float32() + external double x; + + @Float32() + external double y; +} + +typedef Float32 = ffi.Float; + +@ffi.Packed(2) +class ProcessSerialNumber extends ffi.Struct { + @UInt32() + external int highLongOfPSN; + + @UInt32() + external int lowLongOfPSN; +} + +class Point extends ffi.Struct { + @ffi.Short() + external int v; + + @ffi.Short() + external int h; +} + +class Rect extends ffi.Struct { + @ffi.Short() + external int top; + + @ffi.Short() + external int left; + + @ffi.Short() + external int bottom; + + @ffi.Short() + external int right; +} + +@ffi.Packed(2) +class FixedPoint extends ffi.Struct { + @Fixed() + external int x; + + @Fixed() + external int y; +} + +typedef Fixed = SInt32; + +@ffi.Packed(2) +class FixedRect extends ffi.Struct { + @Fixed() + external int left; + + @Fixed() + external int top; + + @Fixed() + external int right; + + @Fixed() + external int bottom; +} + +class TimeBaseRecord extends ffi.Opaque {} + +@ffi.Packed(2) +class TimeRecord extends ffi.Struct { + external CompTimeValue value; + + @TimeScale() + external int scale; + + external TimeBase base; +} + +typedef CompTimeValue = wide; +typedef TimeScale = SInt32; +typedef TimeBase = ffi.Pointer; + +class NumVersion extends ffi.Struct { + @UInt8() + external int nonRelRev; + + @UInt8() + external int stage; + + @UInt8() + external int minorAndBugRev; + + @UInt8() + external int majorRev; +} + +typedef UInt8 = ffi.UnsignedChar; + +class NumVersionVariant extends ffi.Union { + external NumVersion parts; + + @UInt32() + external int whole; +} + +class VersRec extends ffi.Struct { + external NumVersion numericVersion; + + @ffi.Short() + external int countryCode; + + @ffi.Array.multi([256]) + external ffi.Array shortVersion; + + @ffi.Array.multi([256]) + external ffi.Array reserved; +} + +typedef ConstStr255Param = ffi.Pointer; + +class __CFString extends ffi.Opaque {} + +abstract class CFComparisonResult { + static const int kCFCompareLessThan = -1; + static const int kCFCompareEqualTo = 0; + static const int kCFCompareGreaterThan = 1; +} + +typedef CFIndex = ffi.Long; + +class CFRange extends ffi.Struct { + @CFIndex() + external int location; + + @CFIndex() + external int length; +} + +class __CFNull extends ffi.Opaque {} + +typedef CFTypeID = ffi.UnsignedLong; +typedef CFNullRef = ffi.Pointer<__CFNull>; + +class __CFAllocator extends ffi.Opaque {} + +typedef CFAllocatorRef = ffi.Pointer<__CFAllocator>; + +class CFAllocatorContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external CFAllocatorRetainCallBack retain; + + external CFAllocatorReleaseCallBack release; + + external CFAllocatorCopyDescriptionCallBack copyDescription; + + external CFAllocatorAllocateCallBack allocate; + + external CFAllocatorReallocateCallBack reallocate; + + external CFAllocatorDeallocateCallBack deallocate; + + external CFAllocatorPreferredSizeCallBack preferredSize; +} + +typedef CFAllocatorRetainCallBack = ffi.Pointer< + ffi.NativeFunction Function(ffi.Pointer)>>; +typedef CFAllocatorReleaseCallBack + = ffi.Pointer)>>; +typedef CFAllocatorCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFStringRef = ffi.Pointer<__CFString>; +typedef CFAllocatorAllocateCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFIndex, CFOptionFlags, ffi.Pointer)>>; +typedef CFOptionFlags = ffi.UnsignedLong; +typedef CFAllocatorReallocateCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, CFIndex, + CFOptionFlags, ffi.Pointer)>>; +typedef CFAllocatorDeallocateCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFAllocatorPreferredSizeCallBack = ffi.Pointer< + ffi.NativeFunction< + CFIndex Function(CFIndex, CFOptionFlags, ffi.Pointer)>>; +typedef CFTypeRef = ffi.Pointer; +typedef Boolean = ffi.UnsignedChar; +typedef CFHashCode = ffi.UnsignedLong; +typedef NSZone = _NSZone; + +class NSMutableIndexSet extends NSIndexSet { + NSMutableIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableIndexSet] that points to the same underlying object as [other]. + static NSMutableIndexSet castFrom(T other) { + return NSMutableIndexSet._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableIndexSet] that wraps the given raw object pointer. + static NSMutableIndexSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableIndexSet._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableIndexSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableIndexSet1); + } + + void addIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_281( + _id, _lib._sel_addIndexes_1, indexSet?._id ?? ffi.nullptr); + } + + void removeIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_281( + _id, _lib._sel_removeIndexes_1, indexSet?._id ?? ffi.nullptr); + } + + void removeAllIndexes() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllIndexes1); + } + + void addIndex_(int value) { + return _lib._objc_msgSend_282(_id, _lib._sel_addIndex_1, value); + } + + void removeIndex_(int value) { + return _lib._objc_msgSend_282(_id, _lib._sel_removeIndex_1, value); + } + + void addIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_283(_id, _lib._sel_addIndexesInRange_1, range); + } + + void removeIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_283(_id, _lib._sel_removeIndexesInRange_1, range); + } + + void shiftIndexesStartingAtIndex_by_(int index, int delta) { + return _lib._objc_msgSend_284( + _id, _lib._sel_shiftIndexesStartingAtIndex_by_1, index, delta); + } + + static NSMutableIndexSet indexSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableIndexSet1, _lib._sel_indexSet1); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableIndexSet indexSetWithIndex_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableIndexSet1, _lib._sel_indexSetWithIndex_1, value); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableIndexSet indexSetWithIndexesInRange_( + NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_111(_lib._class_NSMutableIndexSet1, + _lib._sel_indexSetWithIndexesInRange_1, range); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableIndexSet new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_new1); + return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + } + + static NSMutableIndexSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_alloc1); + return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + } +} + +/// Mutable Array +class NSMutableArray extends NSArray { + NSMutableArray._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableArray] that points to the same underlying object as [other]. + static NSMutableArray castFrom(T other) { + return NSMutableArray._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSMutableArray] that wraps the given raw object pointer. + static NSMutableArray castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableArray._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableArray]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableArray1); + } + + void addObject_(NSObject anObject) { + return _lib._objc_msgSend_200(_id, _lib._sel_addObject_1, anObject._id); + } + + void insertObject_atIndex_(NSObject anObject, int index) { + return _lib._objc_msgSend_285( + _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); + } + + void removeLastObject() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); + } + + void removeObjectAtIndex_(int index) { + return _lib._objc_msgSend_282(_id, _lib._sel_removeObjectAtIndex_1, index); + } + + void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { + return _lib._objc_msgSend_286( + _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); + } + + @override + NSMutableArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + NSMutableArray initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableArray initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + void addObjectsFromArray_(NSArray? otherArray) { + return _lib._objc_msgSend_287( + _id, _lib._sel_addObjectsFromArray_1, otherArray?._id ?? ffi.nullptr); + } + + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + return _lib._objc_msgSend_288( + _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); + } + + void removeAllObjects() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } + + void removeObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_289( + _id, _lib._sel_removeObject_inRange_1, anObject._id, range); + } + + void removeObject_(NSObject anObject) { + return _lib._objc_msgSend_200(_id, _lib._sel_removeObject_1, anObject._id); + } + + void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_289( + _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); + } + + void removeObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); + } + + void removeObjectsFromIndices_numIndices_( + ffi.Pointer indices, int cnt) { + return _lib._objc_msgSend_290( + _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); + } + + void removeObjectsInArray_(NSArray? otherArray) { + return _lib._objc_msgSend_287( + _id, _lib._sel_removeObjectsInArray_1, otherArray?._id ?? ffi.nullptr); + } + + void removeObjectsInRange_(NSRange range) { + return _lib._objc_msgSend_283(_id, _lib._sel_removeObjectsInRange_1, range); + } + + void replaceObjectsInRange_withObjectsFromArray_range_( + NSRange range, NSArray? otherArray, NSRange otherRange) { + return _lib._objc_msgSend_291( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, + range, + otherArray?._id ?? ffi.nullptr, + otherRange); + } + + void replaceObjectsInRange_withObjectsFromArray_( + NSRange range, NSArray? otherArray) { + return _lib._objc_msgSend_292( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, + range, + otherArray?._id ?? ffi.nullptr); + } + + void setArray_(NSArray? otherArray) { + return _lib._objc_msgSend_287( + _id, _lib._sel_setArray_1, otherArray?._id ?? ffi.nullptr); + } + + void sortUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context) { + return _lib._objc_msgSend_293( + _id, _lib._sel_sortUsingFunction_context_1, compare, context); + } + + void sortUsingSelector_(ffi.Pointer comparator) { + return _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); + } + + void insertObjects_atIndexes_(NSArray? objects, NSIndexSet? indexes) { + return _lib._objc_msgSend_294(_id, _lib._sel_insertObjects_atIndexes_1, + objects?._id ?? ffi.nullptr, indexes?._id ?? ffi.nullptr); + } + + void removeObjectsAtIndexes_(NSIndexSet? indexes) { + return _lib._objc_msgSend_281( + _id, _lib._sel_removeObjectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + } + + void replaceObjectsAtIndexes_withObjects_( + NSIndexSet? indexes, NSArray? objects) { + return _lib._objc_msgSend_295( + _id, + _lib._sel_replaceObjectsAtIndexes_withObjects_1, + indexes?._id ?? ffi.nullptr, + objects?._id ?? ffi.nullptr); + } + + void setObject_atIndexedSubscript_(NSObject obj, int idx) { + return _lib._objc_msgSend_285( + _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); + } + + void sortUsingComparator_(NSComparator cmptr) { + return _lib._objc_msgSend_296(_id, _lib._sel_sortUsingComparator_1, cmptr); + } + + void sortWithOptions_usingComparator_(int opts, NSComparator cmptr) { + return _lib._objc_msgSend_297( + _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr); + } + + static NSMutableArray arrayWithCapacity_( + NativeCupertinoHttp _lib, int numItems) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_298(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_299(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + NSMutableArray initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_298( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + NSMutableArray initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_299( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + void applyDifference_(NSOrderedCollectionDifference? difference) { + return _lib._objc_msgSend_300( + _id, _lib._sel_applyDifference_1, difference?._id ?? ffi.nullptr); + } + + static NSMutableArray array(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithObject_( + NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithObjects_count_(NativeCupertinoHttp _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_95(_lib._class_NSMutableArray1, + _lib._sel_arrayWithObjects_count_1, objects, cnt); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithObjects_( + NativeCupertinoHttp _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableArray1, + _lib._sel_arrayWithObjects_1, firstObj._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray arrayWithArray_( + NativeCupertinoHttp _lib, NSArray? array) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableArray1, + _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + /// Reads array stored in NSPropertyList format from the specified url. + static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_145( + _lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSMutableArray new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } + + static NSMutableArray alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } +} + +/// Mutable Data +class NSMutableData extends NSData { + NSMutableData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableData] that points to the same underlying object as [other]. + static NSMutableData castFrom(T other) { + return NSMutableData._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSMutableData] that wraps the given raw object pointer. + static NSMutableData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableData._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); + } + + ffi.Pointer get mutableBytes { + return _lib._objc_msgSend_31(_id, _lib._sel_mutableBytes1); + } + + @override + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); + } + + set length(int value) { + _lib._objc_msgSend_301(_id, _lib._sel_setLength_1, value); + } + + void appendBytes_length_(ffi.Pointer bytes, int length) { + return _lib._objc_msgSend_33( + _id, _lib._sel_appendBytes_length_1, bytes, length); + } + + void appendData_(NSData? other) { + return _lib._objc_msgSend_302( + _id, _lib._sel_appendData_1, other?._id ?? ffi.nullptr); + } + + void increaseLengthBy_(int extraLength) { + return _lib._objc_msgSend_282( + _id, _lib._sel_increaseLengthBy_1, extraLength); + } + + void replaceBytesInRange_withBytes_( + NSRange range, ffi.Pointer bytes) { + return _lib._objc_msgSend_303( + _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); + } + + void resetBytesInRange_(NSRange range) { + return _lib._objc_msgSend_283(_id, _lib._sel_resetBytesInRange_1, range); + } + + void setData_(NSData? data) { + return _lib._objc_msgSend_302( + _id, _lib._sel_setData_1, data?._id ?? ffi.nullptr); + } + + void replaceBytesInRange_withBytes_length_(NSRange range, + ffi.Pointer replacementBytes, int replacementLength) { + return _lib._objc_msgSend_304( + _id, + _lib._sel_replaceBytesInRange_withBytes_length_1, + range, + replacementBytes, + replacementLength); + } + + static NSMutableData dataWithCapacity_( + NativeCupertinoHttp _lib, int aNumItems) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithLength_(NativeCupertinoHttp _lib, int length) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + NSMutableData initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, capacity); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + NSMutableData initWithLength_(int length) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithLength_1, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + /// These methods compress or decompress the receiver's contents in-place using the specified algorithm. If the operation is not successful, these methods leave the receiver unchanged.. + bool decompressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_305( + _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); + } + + bool compressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_305( + _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); + } + + static NSMutableData data(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, + _lib._sel_dataWithBytes_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_213(_lib._class_NSMutableData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSMutableData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } +} + +/// Purgeable Data +class NSPurgeableData extends NSMutableData { + NSPurgeableData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSPurgeableData] that points to the same underlying object as [other]. + static NSPurgeableData castFrom(T other) { + return NSPurgeableData._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSPurgeableData] that wraps the given raw object pointer. + static NSPurgeableData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSPurgeableData._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSPurgeableData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSPurgeableData1); + } + + static NSPurgeableData dataWithCapacity_( + NativeCupertinoHttp _lib, int aNumItems) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSPurgeableData1, _lib._sel_dataWithCapacity_1, aNumItems); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithLength_(NativeCupertinoHttp _lib, int length) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSPurgeableData1, _lib._sel_dataWithLength_1, length); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData data(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_data1); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytes_length_1, bytes, length); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } + + static NSPurgeableData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_213(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } + + static NSPurgeableData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSPurgeableData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_new1); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } + + static NSPurgeableData alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_alloc1); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } +} + +/// Mutable Dictionary +class NSMutableDictionary extends NSDictionary { + NSMutableDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. + static NSMutableDictionary castFrom(T other) { + return NSMutableDictionary._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. + static NSMutableDictionary castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableDictionary._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableDictionary]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableDictionary1); + } + + void removeObjectForKey_(NSObject aKey) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObjectForKey_1, aKey._id); + } + + void setObject_forKey_(NSObject anObject, NSObject aKey) { + return _lib._objc_msgSend_306( + _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); + } + + @override + NSMutableDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + NSMutableDictionary initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableDictionary initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + void addEntriesFromDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_307(_id, _lib._sel_addEntriesFromDictionary_1, + otherDictionary?._id ?? ffi.nullptr); + } + + void removeAllObjects() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } + + void removeObjectsForKeys_(NSArray? keyArray) { + return _lib._objc_msgSend_287( + _id, _lib._sel_removeObjectsForKeys_1, keyArray?._id ?? ffi.nullptr); + } + + void setDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_307( + _id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr); + } + + void setObject_forKeyedSubscript_(NSObject obj, NSObject key) { + return _lib._objc_msgSend_306( + _id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id); + } + + static NSMutableDictionary dictionaryWithCapacity_( + NativeCupertinoHttp _lib, int numItems) { + final _ret = _lib._objc_msgSend_94(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_308(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_309(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + NSMutableDictionary initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_308( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + NSMutableDictionary initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_309( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Create a mutable dictionary which is optimized for dealing with a known set of keys. + /// Keys that are not in the key set can still be set into the dictionary, but that usage is not optimal. + /// As with any dictionary, the keys must be copyable. + /// If keyset is nil, an exception is thrown. + /// If keyset is not an object returned by +sharedKeySetForKeys:, an exception is thrown. + static NSMutableDictionary dictionaryWithSharedKeySet_( + NativeCupertinoHttp _lib, NSObject keyset) { + final _ret = _lib._objc_msgSend_310(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionary(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObject_forKey_( + NativeCupertinoHttp _lib, NSObject object, NSObject key) { + final _ret = _lib._objc_msgSend_173(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjects_forKeys_count_( + NativeCupertinoHttp _lib, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_93(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjectsAndKeys_( + NativeCupertinoHttp _lib, NSObject firstObject) { + final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithDictionary_( + NativeCupertinoHttp _lib, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_174(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjects_forKeys_( + NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_175( + _lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Reads dictionary stored in NSPropertyList format from the specified url. + static NSDictionary dictionaryWithContentsOfURL_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_177( + _lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. + /// The keys are copied from the array and must be copyable. + /// If the array parameter is nil or not an NSArray, an exception is thrown. + /// If the array of keys is empty, an empty key set is returned. + /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). + /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. + /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. + static NSObject sharedKeySetForKeys_( + NativeCupertinoHttp _lib, NSArray? keys) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableDictionary1, + _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSMutableDictionary new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } + + static NSMutableDictionary alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_alloc1); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } +} + +class NSNotification extends NSObject { + NSNotification._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNotification] that points to the same underlying object as [other]. + static NSNotification castFrom(T other) { + return NSNotification._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSNotification] that wraps the given raw object pointer. + static NSNotification castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNotification._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNotification]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSNotification1); + } + + NSNotificationName get name { + return _lib._objc_msgSend_32(_id, _lib._sel_name1); + } + + NSObject get object { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSNotification initWithName_object_userInfo_( + NSNotificationName name, NSObject object, NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_311( + _id, + _lib._sel_initWithName_object_userInfo_1, + name, + object._id, + userInfo?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + NSNotification initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + static NSNotification notificationWithName_object_( + NativeCupertinoHttp _lib, NSNotificationName aName, NSObject anObject) { + final _ret = _lib._objc_msgSend_258(_lib._class_NSNotification1, + _lib._sel_notificationWithName_object_1, aName, anObject._id); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + static NSNotification notificationWithName_object_userInfo_( + NativeCupertinoHttp _lib, + NSNotificationName aName, + NSObject anObject, + NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_311( + _lib._class_NSNotification1, + _lib._sel_notificationWithName_object_userInfo_1, + aName, + anObject._id, + aUserInfo?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + @override + NSNotification init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + static NSNotification new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); + return NSNotification._(_ret, _lib, retain: false, release: true); + } + + static NSNotification alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); + return NSNotification._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSNotificationName = ffi.Pointer; + +class NSNotificationCenter extends NSObject { + NSNotificationCenter._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNotificationCenter] that points to the same underlying object as [other]. + static NSNotificationCenter castFrom(T other) { + return NSNotificationCenter._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSNotificationCenter] that wraps the given raw object pointer. + static NSNotificationCenter castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNotificationCenter._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNotificationCenter]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSNotificationCenter1); + } + + static NSNotificationCenter? getDefaultCenter(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_312( + _lib._class_NSNotificationCenter1, _lib._sel_defaultCenter1); + return _ret.address == 0 + ? null + : NSNotificationCenter._(_ret, _lib, retain: true, release: true); + } + + void addObserver_selector_name_object_( + NSObject observer, + ffi.Pointer aSelector, + NSNotificationName aName, + NSObject anObject) { + return _lib._objc_msgSend_313( + _id, + _lib._sel_addObserver_selector_name_object_1, + observer._id, + aSelector, + aName, + anObject._id); + } + + void postNotification_(NSNotification? notification) { + return _lib._objc_msgSend_314( + _id, _lib._sel_postNotification_1, notification?._id ?? ffi.nullptr); + } + + void postNotificationName_object_( + NSNotificationName aName, NSObject anObject) { + return _lib._objc_msgSend_315( + _id, _lib._sel_postNotificationName_object_1, aName, anObject._id); + } + + void postNotificationName_object_userInfo_( + NSNotificationName aName, NSObject anObject, NSDictionary? aUserInfo) { + return _lib._objc_msgSend_316( + _id, + _lib._sel_postNotificationName_object_userInfo_1, + aName, + anObject._id, + aUserInfo?._id ?? ffi.nullptr); + } + + void removeObserver_(NSObject observer) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObserver_1, observer._id); + } + + void removeObserver_name_object_( + NSObject observer, NSNotificationName aName, NSObject anObject) { + return _lib._objc_msgSend_317(_id, _lib._sel_removeObserver_name_object_1, + observer._id, aName, anObject._id); + } + + NSObject addObserverForName_object_queue_usingBlock_(NSNotificationName name, + NSObject obj, NSOperationQueue? queue, ObjCBlock18 block) { + final _ret = _lib._objc_msgSend_346( + _id, + _lib._sel_addObserverForName_object_queue_usingBlock_1, + name, + obj._id, + queue?._id ?? ffi.nullptr, + block._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSNotificationCenter new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotificationCenter1, _lib._sel_new1); + return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + } + + static NSNotificationCenter alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSNotificationCenter1, _lib._sel_alloc1); + return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + } +} + +class NSOperationQueue extends NSObject { + NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. + static NSOperationQueue castFrom(T other) { + return NSOperationQueue._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSOperationQueue] that wraps the given raw object pointer. + static NSOperationQueue castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOperationQueue._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOperationQueue]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOperationQueue1); + } + + /// @property progress + /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue + /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the + /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the + /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super + /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress + /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% + /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 + /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be + /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by + /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving + /// progress scenario. + /// + /// @example + /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; + /// queue.progress.totalUnitCount = 10; + NSProgress? get progress { + final _ret = _lib._objc_msgSend_318(_id, _lib._sel_progress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); + } + + void addOperation_(NSOperation? op) { + return _lib._objc_msgSend_334( + _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); + } + + void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { + return _lib._objc_msgSend_340( + _id, + _lib._sel_addOperations_waitUntilFinished_1, + ops?._id ?? ffi.nullptr, + wait); + } + + void addOperationWithBlock_(ObjCBlock16 block) { + return _lib._objc_msgSend_341( + _id, _lib._sel_addOperationWithBlock_1, block._id); + } + + /// @method addBarrierBlock: + /// @param barrier A block to execute + /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and + /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the + /// `dispatch_barrier_async` function. + void addBarrierBlock_(ObjCBlock16 barrier) { + return _lib._objc_msgSend_341( + _id, _lib._sel_addBarrierBlock_1, barrier._id); + } + + int get maxConcurrentOperationCount { + return _lib._objc_msgSend_81(_id, _lib._sel_maxConcurrentOperationCount1); + } + + set maxConcurrentOperationCount(int value) { + _lib._objc_msgSend_342( + _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + } + + bool get suspended { + return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); + } + + set suspended(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setSuspended_1, value); + } + + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set name(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } + + int get qualityOfService { + return _lib._objc_msgSend_338(_id, _lib._sel_qualityOfService1); + } + + set qualityOfService(int value) { + _lib._objc_msgSend_339(_id, _lib._sel_setQualityOfService_1, value); + } + + /// actually retain + dispatch_queue_t get underlyingQueue { + return _lib._objc_msgSend_343(_id, _lib._sel_underlyingQueue1); + } + + /// actually retain + set underlyingQueue(dispatch_queue_t value) { + _lib._objc_msgSend_344(_id, _lib._sel_setUnderlyingQueue_1, value); + } + + void cancelAllOperations() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + } + + void waitUntilAllOperationsAreFinished() { + return _lib._objc_msgSend_1( + _id, _lib._sel_waitUntilAllOperationsAreFinished1); + } + + static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_345( + _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } + + static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_345( + _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } + + /// These two functions are inherently a race condition and should be avoided if possible + NSArray? get operations { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_operations1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + int get operationCount { + return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); + } + + static NSOperationQueue new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } + + static NSOperationQueue alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } +} + +class NSProgress extends NSObject { + NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSProgress] that points to the same underlying object as [other]. + static NSProgress castFrom(T other) { + return NSProgress._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSProgress] that wraps the given raw object pointer. + static NSProgress castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSProgress._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSProgress]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); + } + + static NSProgress currentProgress(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_318( + _lib._class_NSProgress1, _lib._sel_currentProgress1); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress progressWithTotalUnitCount_( + NativeCupertinoHttp _lib, int unitCount) { + final _ret = _lib._objc_msgSend_319(_lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress discreteProgressWithTotalUnitCount_( + NativeCupertinoHttp _lib, int unitCount) { + final _ret = _lib._objc_msgSend_319(_lib._class_NSProgress1, + _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( + NativeCupertinoHttp _lib, + int unitCount, + NSProgress? parent, + int portionOfParentTotalUnitCount) { + final _ret = _lib._objc_msgSend_320( + _lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, + unitCount, + parent?._id ?? ffi.nullptr, + portionOfParentTotalUnitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSProgress initWithParent_userInfo_( + NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { + final _ret = _lib._objc_msgSend_321( + _id, + _lib._sel_initWithParent_userInfo_1, + parentProgressOrNil?._id ?? ffi.nullptr, + userInfoOrNil?._id ?? ffi.nullptr); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + void becomeCurrentWithPendingUnitCount_(int unitCount) { + return _lib._objc_msgSend_322( + _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + } + + void performAsCurrentWithPendingUnitCount_usingBlock_( + int unitCount, ObjCBlock16 work) { + return _lib._objc_msgSend_323( + _id, + _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, + unitCount, + work._id); + } + + void resignCurrent() { + return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + } + + void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { + return _lib._objc_msgSend_324( + _id, + _lib._sel_addChild_withPendingUnitCount_1, + child?._id ?? ffi.nullptr, + inUnitCount); + } + + int get totalUnitCount { + return _lib._objc_msgSend_325(_id, _lib._sel_totalUnitCount1); + } + + set totalUnitCount(int value) { + _lib._objc_msgSend_326(_id, _lib._sel_setTotalUnitCount_1, value); + } + + int get completedUnitCount { + return _lib._objc_msgSend_325(_id, _lib._sel_completedUnitCount1); + } + + set completedUnitCount(int value) { + _lib._objc_msgSend_326(_id, _lib._sel_setCompletedUnitCount_1, value); + } + + NSString? get localizedDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set localizedDescription(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); + } + + NSString? get localizedAdditionalDescription { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedAdditionalDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set localizedAdditionalDescription(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setLocalizedAdditionalDescription_1, + value?._id ?? ffi.nullptr); + } + + bool get cancellable { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); + } + + set cancellable(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setCancellable_1, value); + } + + bool get pausable { + return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); + } + + set pausable(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setPausable_1, value); + } + + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + } + + bool get paused { + return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); + } + + ObjCBlock16 get cancellationHandler { + final _ret = _lib._objc_msgSend_329(_id, _lib._sel_cancellationHandler1); + return ObjCBlock16._(_ret, _lib); + } + + set cancellationHandler(ObjCBlock16 value) { + _lib._objc_msgSend_330(_id, _lib._sel_setCancellationHandler_1, value._id); + } + + ObjCBlock16 get pausingHandler { + final _ret = _lib._objc_msgSend_329(_id, _lib._sel_pausingHandler1); + return ObjCBlock16._(_ret, _lib); + } + + set pausingHandler(ObjCBlock16 value) { + _lib._objc_msgSend_330(_id, _lib._sel_setPausingHandler_1, value._id); + } + + ObjCBlock16 get resumingHandler { + final _ret = _lib._objc_msgSend_329(_id, _lib._sel_resumingHandler1); + return ObjCBlock16._(_ret, _lib); + } + + set resumingHandler(ObjCBlock16 value) { + _lib._objc_msgSend_330(_id, _lib._sel_setResumingHandler_1, value._id); + } + + void setUserInfoObject_forKey_( + NSObject objectOrNil, NSProgressUserInfoKey key) { + return _lib._objc_msgSend_189( + _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); + } + + bool get indeterminate { + return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); + } + + double get fractionCompleted { + return _lib._objc_msgSend_85(_id, _lib._sel_fractionCompleted1); + } + + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + } + + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + void pause() { + return _lib._objc_msgSend_1(_id, _lib._sel_pause1); + } + + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } + + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSProgressKind get kind { + return _lib._objc_msgSend_32(_id, _lib._sel_kind1); + } + + set kind(NSProgressKind value) { + _lib._objc_msgSend_327(_id, _lib._sel_setKind_1, value); + } + + NSNumber? get estimatedTimeRemaining { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_estimatedTimeRemaining1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set estimatedTimeRemaining(NSNumber? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get throughput { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_throughput1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set throughput(NSNumber? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + } + + NSProgressFileOperationKind get fileOperationKind { + return _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); + } + + set fileOperationKind(NSProgressFileOperationKind value) { + _lib._objc_msgSend_327(_id, _lib._sel_setFileOperationKind_1, value); + } + + NSURL? get fileURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + set fileURL(NSURL? value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get fileTotalCount { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileTotalCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set fileTotalCount(NSNumber? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get fileCompletedCount { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileCompletedCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set fileCompletedCount(NSNumber? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); + } + + void publish() { + return _lib._objc_msgSend_1(_id, _lib._sel_publish1); + } + + void unpublish() { + return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + } + + static NSObject addSubscriberForFileURL_withPublishingHandler_( + NativeCupertinoHttp _lib, + NSURL? url, + NSProgressPublishingHandler publishingHandler) { + final _ret = _lib._objc_msgSend_333( + _lib._class_NSProgress1, + _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, + url?._id ?? ffi.nullptr, + publishingHandler); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { + return _lib._objc_msgSend_200( + _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + } + + bool get old { + return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); + } + + static NSProgress new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } + + static NSProgress alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } +} + +void _ObjCBlock16_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block) { + return block.ref.target + .cast>() + .asFunction()(); +} + +final _ObjCBlock16_closureRegistry = {}; +int _ObjCBlock16_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock16_registerClosure(Function fn) { + final id = ++_ObjCBlock16_closureRegistryIndex; + _ObjCBlock16_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock16_closureTrampoline(ffi.Pointer<_ObjCBlock> block) { + return _ObjCBlock16_closureRegistry[block.ref.target.address]!(); +} + +class ObjCBlock16 extends _ObjCBlockBase { + ObjCBlock16._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock16.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( + _ObjCBlock16_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock16.fromFunction(NativeCupertinoHttp lib, void Function() fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( + _ObjCBlock16_closureTrampoline) + .cast(), + _ObjCBlock16_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call() { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() + .asFunction block)>()(_id); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef NSProgressUserInfoKey = ffi.Pointer; +typedef NSProgressKind = ffi.Pointer; +typedef NSProgressFileOperationKind = ffi.Pointer; +typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; +NSProgressUnpublishingHandler _ObjCBlock17_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>()(arg0); +} + +final _ObjCBlock17_closureRegistry = {}; +int _ObjCBlock17_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock17_registerClosure(Function fn) { + final id = ++_ObjCBlock17_closureRegistryIndex; + _ObjCBlock17_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +NSProgressUnpublishingHandler _ObjCBlock17_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock17_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock17 extends _ObjCBlockBase { + ObjCBlock17._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock17.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock17_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock17.fromFunction(NativeCupertinoHttp lib, + NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock17_closureTrampoline) + .cast(), + _ObjCBlock17_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + NSProgressUnpublishingHandler call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; + +class NSOperation extends NSObject { + NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOperation] that points to the same underlying object as [other]. + static NSOperation castFrom(T other) { + return NSOperation._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSOperation] that wraps the given raw object pointer. + static NSOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOperation._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); + } + + void start() { + return _lib._objc_msgSend_1(_id, _lib._sel_start1); + } + + void main() { + return _lib._objc_msgSend_1(_id, _lib._sel_main1); + } + + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + } + + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + bool get executing { + return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); + } + + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + } + + /// To be deprecated; use and override 'asynchronous' below + bool get concurrent { + return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); + } + + bool get asynchronous { + return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); + } + + bool get ready { + return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); + } + + void addDependency_(NSOperation? op) { + return _lib._objc_msgSend_334( + _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); + } + + void removeDependency_(NSOperation? op) { + return _lib._objc_msgSend_334( + _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); + } + + NSArray? get dependencies { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_dependencies1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + int get queuePriority { + return _lib._objc_msgSend_335(_id, _lib._sel_queuePriority1); + } + + set queuePriority(int value) { + _lib._objc_msgSend_336(_id, _lib._sel_setQueuePriority_1, value); + } + + ObjCBlock16 get completionBlock { + final _ret = _lib._objc_msgSend_329(_id, _lib._sel_completionBlock1); + return ObjCBlock16._(_ret, _lib); + } + + set completionBlock(ObjCBlock16 value) { + _lib._objc_msgSend_330(_id, _lib._sel_setCompletionBlock_1, value._id); + } + + void waitUntilFinished() { + return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); + } + + double get threadPriority { + return _lib._objc_msgSend_85(_id, _lib._sel_threadPriority1); + } + + set threadPriority(double value) { + _lib._objc_msgSend_337(_id, _lib._sel_setThreadPriority_1, value); + } + + int get qualityOfService { + return _lib._objc_msgSend_338(_id, _lib._sel_qualityOfService1); + } + + set qualityOfService(int value) { + _lib._objc_msgSend_339(_id, _lib._sel_setQualityOfService_1, value); + } + + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set name(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } + + static NSOperation new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); + return NSOperation._(_ret, _lib, retain: false, release: true); + } + + static NSOperation alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); + return NSOperation._(_ret, _lib, retain: false, release: true); + } +} + +abstract class NSOperationQueuePriority { + static const int NSOperationQueuePriorityVeryLow = -8; + static const int NSOperationQueuePriorityLow = -4; + static const int NSOperationQueuePriorityNormal = 0; + static const int NSOperationQueuePriorityHigh = 4; + static const int NSOperationQueuePriorityVeryHigh = 8; +} + +typedef dispatch_queue_t = ffi.Pointer; +void _ObjCBlock18_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} + +final _ObjCBlock18_closureRegistry = {}; +int _ObjCBlock18_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock18_registerClosure(Function fn) { + final id = ++_ObjCBlock18_closureRegistryIndex; + _ObjCBlock18_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock18_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock18_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock18 extends _ObjCBlockBase { + ObjCBlock18._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock18.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock18_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock18.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock18_closureTrampoline) + .cast(), + _ObjCBlock18_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +class NSDate extends NSObject { + NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDate] that points to the same underlying object as [other]. + static NSDate castFrom(T other) { + return NSDate._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSDate] that wraps the given raw object pointer. + static NSDate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDate._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); + } + + double get timeIntervalSinceReferenceDate { + return _lib._objc_msgSend_85( + _id, _lib._sel_timeIntervalSinceReferenceDate1); + } + + @override + NSDate init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _lib._objc_msgSend_347( + _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + double timeIntervalSinceDate_(NSDate? anotherDate) { + return _lib._objc_msgSend_348(_id, _lib._sel_timeIntervalSinceDate_1, + anotherDate?._id ?? ffi.nullptr); + } + + double get timeIntervalSinceNow { + return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSinceNow1); + } + + double get timeIntervalSince1970 { + return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSince19701); + } + + NSObject addTimeInterval_(double seconds) { + final _ret = + _lib._objc_msgSend_347(_id, _lib._sel_addTimeInterval_1, seconds); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSDate dateByAddingTimeInterval_(double ti) { + final _ret = + _lib._objc_msgSend_347(_id, _lib._sel_dateByAddingTimeInterval_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate earlierDate_(NSDate? anotherDate) { + final _ret = _lib._objc_msgSend_349( + _id, _lib._sel_earlierDate_1, anotherDate?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate laterDate_(NSDate? anotherDate) { + final _ret = _lib._objc_msgSend_349( + _id, _lib._sel_laterDate_1, anotherDate?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + int compare_(NSDate? other) { + return _lib._objc_msgSend_350( + _id, _lib._sel_compare_1, other?._id ?? ffi.nullptr); + } + + bool isEqualToDate_(NSDate? otherDate) { + return _lib._objc_msgSend_351( + _id, _lib._sel_isEqualToDate_1, otherDate?._id ?? ffi.nullptr); + } + + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSDate date(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSinceNow_( + NativeCupertinoHttp _lib, double secs) { + final _ret = _lib._objc_msgSend_347( + _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSinceReferenceDate_( + NativeCupertinoHttp _lib, double ti) { + final _ret = _lib._objc_msgSend_347(_lib._class_NSDate1, + _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSince1970_( + NativeCupertinoHttp _lib, double secs) { + final _ret = _lib._objc_msgSend_347( + _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate dateWithTimeInterval_sinceDate_( + NativeCupertinoHttp _lib, double secsToBeAdded, NSDate? date) { + final _ret = _lib._objc_msgSend_352( + _lib._class_NSDate1, + _lib._sel_dateWithTimeInterval_sinceDate_1, + secsToBeAdded, + date?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate? getDistantFuture(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_353(_lib._class_NSDate1, _lib._sel_distantFuture1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate? getDistantPast(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_353(_lib._class_NSDate1, _lib._sel_distantPast1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate? getNow(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_353(_lib._class_NSDate1, _lib._sel_now1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeIntervalSinceNow_(double secs) { + final _ret = _lib._objc_msgSend_347( + _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeIntervalSince1970_(double secs) { + final _ret = _lib._objc_msgSend_347( + _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate? date) { + final _ret = _lib._objc_msgSend_352( + _id, + _lib._sel_initWithTimeInterval_sinceDate_1, + secsToBeAdded, + date?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); + return NSDate._(_ret, _lib, retain: false, release: true); + } + + static NSDate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); + return NSDate._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSTimeInterval = ffi.Double; + +/// ! +/// @enum NSURLRequestCachePolicy +/// +/// @discussion The NSURLRequestCachePolicy enum defines constants that +/// can be used to specify the type of interactions that take place with +/// the caching system when the URL loading system processes a request. +/// Specifically, these constants cover interactions that have to do +/// with whether already-existing cache data is returned to satisfy a +/// URL load request. +/// +/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the +/// caching logic defined in the protocol implementation, if any, is +/// used for a particular URL load request. This is the default policy +/// for URL load requests. +/// +/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the +/// data for the URL load should be loaded from the origin source. No +/// existing local cache data, regardless of its freshness or validity, +/// should be used to satisfy a URL load request. +/// +/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that +/// not only should the local cache data be ignored, but that proxies and +/// other intermediates should be instructed to disregard their caches +/// so far as the protocol allows. +/// +/// @constant NSURLRequestReloadIgnoringCacheData Older name for +/// NSURLRequestReloadIgnoringLocalCacheData. +/// +/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, +/// the URL is loaded from the origin source. +/// +/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, no +/// attempt is made to load the URL from the origin source, and the +/// load is considered to have failed. This constant specifies a +/// behavior that is similar to an "offline" mode. +/// +/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that +/// the existing cache data may be used provided the origin source +/// confirms its validity, otherwise the URL is loaded from the +/// origin source. +abstract class NSURLRequestCachePolicy { + static const int NSURLRequestUseProtocolCachePolicy = 0; + static const int NSURLRequestReloadIgnoringLocalCacheData = 1; + static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; + static const int NSURLRequestReloadIgnoringCacheData = 1; + static const int NSURLRequestReturnCacheDataElseLoad = 2; + static const int NSURLRequestReturnCacheDataDontLoad = 3; + static const int NSURLRequestReloadRevalidatingCacheData = 5; +} + +/// ! +/// @enum NSURLRequestNetworkServiceType +/// +/// @discussion The NSURLRequestNetworkServiceType enum defines constants that +/// can be used to specify the service type to associate with this request. The +/// service type is used to provide the networking layers a hint of the purpose +/// of the request. +/// +/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest +/// when created. This value should be left unchanged for the vast majority of requests. +/// +/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP +/// control traffic. +/// +/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video +/// traffic. +/// +/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background +/// traffic (such as a file download). +/// +/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. +/// +/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. +/// +/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. +abstract class NSURLRequestNetworkServiceType { + /// Standard internet traffic + static const int NSURLNetworkServiceTypeDefault = 0; + + /// Voice over IP control traffic + static const int NSURLNetworkServiceTypeVoIP = 1; + + /// Video traffic + static const int NSURLNetworkServiceTypeVideo = 2; + + /// Background traffic + static const int NSURLNetworkServiceTypeBackground = 3; + + /// Voice data + static const int NSURLNetworkServiceTypeVoice = 4; + + /// Responsive data + static const int NSURLNetworkServiceTypeResponsiveData = 6; + + /// Multimedia Audio/Video Streaming + static const int NSURLNetworkServiceTypeAVStreaming = 8; + + /// Responsive Multimedia Audio/Video + static const int NSURLNetworkServiceTypeResponsiveAV = 9; + + /// Call Signaling + static const int NSURLNetworkServiceTypeCallSignaling = 11; +} + +/// ! +/// @class NSURLRequest +/// +/// @abstract An NSURLRequest object represents a URL load request in a +/// manner independent of protocol and URL scheme. +/// +/// @discussion NSURLRequest encapsulates two basic data elements about +/// a URL load request: +///
    +///
  • The URL to load. +///
  • The policy to use when consulting the URL content cache made +/// available by the implementation. +///
+/// In addition, NSURLRequest is designed to be extended to support +/// protocol-specific data by adding categories to access a property +/// object provided in an interface targeted at protocol implementors. +///
    +///
  • Protocol implementors should direct their attention to the +/// NSURLRequestExtensibility category on NSURLRequest for more +/// information on how to provide extensions on NSURLRequest to +/// support protocol-specific request information. +///
  • Clients of this API who wish to create NSURLRequest objects to +/// load URL content should consult the protocol-specific NSURLRequest +/// categories that are available. The NSHTTPURLRequest category on +/// NSURLRequest is an example. +///
+///

+/// Objects of this class are used to create NSURLConnection instances, +/// which can are used to perform the load of a URL, or as input to the +/// NSURLConnection class method which performs synchronous loads. +class NSURLRequest extends NSObject { + NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLRequest] that points to the same underlying object as [other]. + static NSURLRequest castFrom(T other) { + return NSURLRequest._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLRequest] that wraps the given raw object pointer. + static NSURLRequest castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLRequest._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLRequest]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); + } + + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL? URL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSURLRequest1, + _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_11( + _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); + } + + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + NativeCupertinoHttp _lib, + NSURL? URL, + int cachePolicy, + double timeoutInterval) { + final _ret = _lib._objc_msgSend_354( + _lib._class_NSURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_(NSURL? URL) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithURL_1, URL?._id ?? ffi.nullptr); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL and + /// cache policy. + /// @discussion This is the designated initializer for the + /// NSURLRequest class. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_cachePolicy_timeoutInterval_( + NSURL? URL, int cachePolicy, double timeoutInterval) { + final _ret = _lib._objc_msgSend_354( + _id, + _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the cache policy of the receiver. + /// @result The cache policy of the receiver. + int get cachePolicy { + return _lib._objc_msgSend_355(_id, _lib._sel_cachePolicy1); + } + + /// ! + /// @abstract Returns the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval alloted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + /// @result The timeout interval of the receiver. + double get timeoutInterval { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); + } + + /// ! + /// @abstract The main document URL associated with this load. + /// @discussion This URL is used for the cookie "same domain as main + /// document" policy. There may also be other future uses. + /// See setMainDocumentURL: + /// NOTE: In the current implementation, this value is unused by the + /// framework. A fully functional version of this method will be available + /// in the future. + /// @result The main document URL. + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. + /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have + /// not explicitly set a networkServiceType (using the setNetworkServiceType method). + /// @result The NSURLRequestNetworkServiceType associated with this request. + int get networkServiceType { + return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); + } + + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @result YES if the receiver is allowed to use the built in cellular radios to + /// satify the request, NO otherwise. + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); + } + + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @result YES if the receiver is allowed to use an interface marked as expensive to + /// satify the request, NO otherwise. + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } + + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @result YES if the receiver is allowed to use an interface marked as constrained to + /// satify the request, NO otherwise. + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } + + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); + } + + /// ! + /// @abstract Returns the HTTP request method of the receiver. + /// @result the HTTP request method of the receiver. + NSString? get HTTPMethod { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns a dictionary containing all the HTTP header fields + /// of the receiver. + /// @result a dictionary containing all the HTTP header fields of the + /// receiver. + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method valueForHTTPHeaderField: + /// @abstract Returns the value which corresponds to the given header + /// field. Note that, in keeping with the HTTP RFC, HTTP header field + /// names are case-insensitive. + /// @param field the header field name to use for the lookup + /// (case-insensitive). + /// @result the value associated with the given header field, or nil if + /// there is no value associated with the given header field. + NSString valueForHTTPHeaderField_(NSString? field) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + /// @result The request body data of the receiver. + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the request body stream of the receiver + /// if any has been set + /// @discussion The stream is returned for examination only; it is + /// not safe for the caller to manipulate the stream in any way. Also + /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only + /// one can be set on a given request. Also note that the body stream is + /// preserved across copies, but is LOST when the request is coded via the + /// NSCoding protocol + /// @result The request body stream of the receiver. + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Determine whether default cookie handling will happen for + /// this request. + /// @discussion NOTE: This value is not used prior to 10.3 + /// @result YES if cookies will be sent with and set for this request; + /// otherwise NO. + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); + } + + /// ! + /// @abstract Reports whether the receiver is not expected to wait for the + /// previous response before transmitting. + /// @result YES if the receiver should transmit before the previous response + /// is received. NO if the receiver should wait for the previous response + /// before transmitting. + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + } + + static NSURLRequest new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); + } + + static NSURLRequest alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); + } +} + +class NSInputStream extends _ObjCWrapper { + NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSInputStream] that points to the same underlying object as [other]. + static NSInputStream castFrom(T other) { + return NSInputStream._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSInputStream] that wraps the given raw object pointer. + static NSInputStream castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInputStream._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSInputStream]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); + } +} + +/// ! +/// @class NSMutableURLRequest +/// +/// @abstract An NSMutableURLRequest object represents a mutable URL load +/// request in a manner independent of protocol and URL scheme. +/// +/// @discussion This specialization of NSURLRequest is provided to aid +/// developers who may find it more convenient to mutate a single request +/// object for a series of URL loads instead of creating an immutable +/// NSURLRequest for each load. This programming model is supported by +/// the following contract stipulation between NSMutableURLRequest and +/// NSURLConnection: NSURLConnection makes a deep copy of each +/// NSMutableURLRequest object passed to one of its initializers. +///

NSMutableURLRequest is designed to be extended to support +/// protocol-specific data by adding categories to access a property +/// object provided in an interface targeted at protocol implementors. +///

    +///
  • Protocol implementors should direct their attention to the +/// NSMutableURLRequestExtensibility category on +/// NSMutableURLRequest for more information on how to provide +/// extensions on NSMutableURLRequest to support protocol-specific +/// request information. +///
  • Clients of this API who wish to create NSMutableURLRequest +/// objects to load URL content should consult the protocol-specific +/// NSMutableURLRequest categories that are available. The +/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an +/// example. +///
+class NSMutableURLRequest extends NSURLRequest { + NSMutableURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. + static NSMutableURLRequest castFrom(T other) { + return NSMutableURLRequest._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. + static NSMutableURLRequest castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableURLRequest._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableURLRequest]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableURLRequest1); + } + + /// ! + /// @abstract The URL of the receiver. + @override + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract The URL of the receiver. + set URL(NSURL? value) { + _lib._objc_msgSend_332(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract The cache policy of the receiver. + @override + int get cachePolicy { + return _lib._objc_msgSend_355(_id, _lib._sel_cachePolicy1); + } + + /// ! + /// @abstract The cache policy of the receiver. + set cachePolicy(int value) { + _lib._objc_msgSend_358(_id, _lib._sel_setCachePolicy_1, value); + } + + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + @override + double get timeoutInterval { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); + } + + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + set timeoutInterval(double value) { + _lib._objc_msgSend_337(_id, _lib._sel_setTimeoutInterval_1, value); + } + + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document will be used to implement the cookie + /// "only from same domain as main document" policy, and possibly + /// other things in the future. + /// NOTE: In the current implementation, the passed-in value is unused by the + /// framework. A fully functional version of this method will be available + /// in the future. + @override + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document will be used to implement the cookie + /// "only from same domain as main document" policy, and possibly + /// other things in the future. + /// NOTE: In the current implementation, the passed-in value is unused by the + /// framework. A fully functional version of this method will be available + /// in the future. + set mainDocumentURL(NSURL? value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + @override + int get networkServiceType { + return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); + } + + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + set networkServiceType(int value) { + _lib._objc_msgSend_359(_id, _lib._sel_setNetworkServiceType_1, value); + } + + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + @override + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); + } + + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + set allowsCellularAccess(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setAllowsCellularAccess_1, value); + } + + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satify the request, YES otherwise. + @override + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } + + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satify the request, YES otherwise. + set allowsExpensiveNetworkAccess(bool value) { + _lib._objc_msgSend_328( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + } + + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satify the request, YES otherwise. + @override + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } + + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satify the request, YES otherwise. + set allowsConstrainedNetworkAccess(bool value) { + _lib._objc_msgSend_328( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + } + + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + @override + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); + } + + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + set assumesHTTP3Capable(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setAssumesHTTP3Capable_1, value); + } + + /// ! + /// @abstract Sets the HTTP request method of the receiver. + @override + NSString? get HTTPMethod { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Sets the HTTP request method of the receiver. + set HTTPMethod(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setHTTPMethod_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract Sets the HTTP header fields of the receiver to the given + /// dictionary. + /// @discussion This method replaces all header fields that may have + /// existed before this method call. + ///

Since HTTP header fields must be string values, each object and + /// key in the dictionary passed to this method must answer YES when + /// sent an -isKindOfClass:[NSString class] message. If either + /// the key or value for a key-value pair answers NO when sent this + /// message, the key-value pair is skipped. + @override + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Sets the HTTP header fields of the receiver to the given + /// dictionary. + /// @discussion This method replaces all header fields that may have + /// existed before this method call. + ///

Since HTTP header fields must be string values, each object and + /// key in the dictionary passed to this method must answer YES when + /// sent an -isKindOfClass:[NSString class] message. If either + /// the key or value for a key-value pair answers NO when sent this + /// message, the key-value pair is skipped. + set allHTTPHeaderFields(NSDictionary? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @method setValue:forHTTPHeaderField: + /// @abstract Sets the value of the given HTTP header field. + /// @discussion If a value was previously set for the given header + /// field, that value is replaced with the given value. Note that, in + /// keeping with the HTTP RFC, HTTP header field names are + /// case-insensitive. + /// @param value the header field value. + /// @param field the header field name (case-insensitive). + void setValue_forHTTPHeaderField_(NSString? value, NSString? field) { + return _lib._objc_msgSend_361(_id, _lib._sel_setValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + } + + /// ! + /// @method addValue:forHTTPHeaderField: + /// @abstract Adds an HTTP header field in the current header + /// dictionary. + /// @discussion This method provides a way to add values to header + /// fields incrementally. If a value was previously set for the given + /// header field, the given value is appended to the previously-existing + /// value. The appropriate field delimiter, a comma in the case of HTTP, + /// is added by the implementation, and should not be added to the given + /// value by the caller. Note that, in keeping with the HTTP RFC, HTTP + /// header field names are case-insensitive. + /// @param value the header field value. + /// @param field the header field name (case-insensitive). + void addValue_forHTTPHeaderField_(NSString? value, NSString? field) { + return _lib._objc_msgSend_361(_id, _lib._sel_addValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract Sets the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + @override + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Sets the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + set HTTPBody(NSData? value) { + _lib._objc_msgSend_362( + _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract Sets the request body to be the contents of the given stream. + /// @discussion The provided stream should be unopened; the request will take + /// over the stream's delegate. The entire stream's contents will be + /// transmitted as the HTTP body of the request. Note that the body stream + /// and the body data (set by setHTTPBody:, above) are mutually exclusive + /// - setting one will clear the other. + @override + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Sets the request body to be the contents of the given stream. + /// @discussion The provided stream should be unopened; the request will take + /// over the stream's delegate. The entire stream's contents will be + /// transmitted as the HTTP body of the request. Note that the body stream + /// and the body data (set by setHTTPBody:, above) are mutually exclusive + /// - setting one will clear the other. + set HTTPBodyStream(NSInputStream? value) { + _lib._objc_msgSend_363( + _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract Decide whether default cookie handling will happen for + /// this request (YES if cookies should be sent with and set for this request; + /// otherwise NO). + /// @discussion The default is YES - in other words, cookies are sent from and + /// stored to the cookie manager by default. + /// NOTE: In releases prior to 10.3, this value is ignored + @override + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); + } + + /// ! + /// @abstract Decide whether default cookie handling will happen for + /// this request (YES if cookies should be sent with and set for this request; + /// otherwise NO). + /// @discussion The default is YES - in other words, cookies are sent from and + /// stored to the cookie manager by default. + /// NOTE: In releases prior to 10.3, this value is ignored + set HTTPShouldHandleCookies(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); + } + + /// ! + /// @abstract Sets whether the request should not wait for the previous response + /// before transmitting (YES if the receiver should transmit before the previous response is + /// received. NO to wait for the previous response before transmitting) + /// @discussion Calling this method with a YES value does not guarantee HTTP + /// pipelining behavior. This method may have no effect if an HTTP proxy is + /// configured, or if the HTTP request uses an unsafe request method (e.g., POST + /// requests will not pipeline). Pipelining behavior also may not begin until + /// the second request on a given TCP connection. There may be other situations + /// where pipelining does not occur even though YES was set. + /// HTTP 1.1 allows the client to send multiple requests to the server without + /// waiting for a response. Though HTTP 1.1 requires support for pipelining, + /// some servers report themselves as being HTTP 1.1 but do not support + /// pipelining (disconnecting, sending resources misordered, omitting part of + /// a resource, etc.). + @override + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + } + + /// ! + /// @abstract Sets whether the request should not wait for the previous response + /// before transmitting (YES if the receiver should transmit before the previous response is + /// received. NO to wait for the previous response before transmitting) + /// @discussion Calling this method with a YES value does not guarantee HTTP + /// pipelining behavior. This method may have no effect if an HTTP proxy is + /// configured, or if the HTTP request uses an unsafe request method (e.g., POST + /// requests will not pipeline). Pipelining behavior also may not begin until + /// the second request on a given TCP connection. There may be other situations + /// where pipelining does not occur even though YES was set. + /// HTTP 1.1 allows the client to send multiple requests to the server without + /// waiting for a response. Though HTTP 1.1 requires support for pipelining, + /// some servers report themselves as being HTTP 1.1 but do not support + /// pipelining (disconnecting, sending resources misordered, omitting part of + /// a resource, etc.). + set HTTPShouldUsePipelining(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + } + + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_( + NativeCupertinoHttp _lib, NSURL? URL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableURLRequest1, + _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_11( + _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); + } + + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( + NativeCupertinoHttp _lib, + NSURL? URL, + int cachePolicy, + double timeoutInterval) { + final _ret = _lib._objc_msgSend_354( + _lib._class_NSMutableURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } + + static NSMutableURLRequest new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + } + + static NSMutableURLRequest alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + } +} + +abstract class NSURLRequestAttribution { + static const int NSURLRequestAttributionDeveloper = 0; + static const int NSURLRequestAttributionUser = 1; +} + +abstract class NSHTTPCookieAcceptPolicy { + static const int NSHTTPCookieAcceptPolicyAlways = 0; + static const int NSHTTPCookieAcceptPolicyNever = 1; + static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; +} + +class NSHTTPCookieStorage extends NSObject { + NSHTTPCookieStorage._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + static NSHTTPCookieStorage castFrom(T other) { + return NSHTTPCookieStorage._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. + static NSHTTPCookieStorage castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSHTTPCookieStorage1); + } + + static NSHTTPCookieStorage? getSharedHTTPCookieStorage( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_364( + _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } + + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_365( + _lib._class_NSHTTPCookieStorage1, + _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, + identifier?._id ?? ffi.nullptr); + return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } + + NSArray? get cookies { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_cookies1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + void setCookie_(NSHTTPCookie? cookie) { + return _lib._objc_msgSend_366( + _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); + } + + void deleteCookie_(NSHTTPCookie? cookie) { + return _lib._objc_msgSend_366( + _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); + } + + void removeCookiesSinceDate_(NSDate? date) { + return _lib._objc_msgSend_367( + _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); + } + + NSArray cookiesForURL_(NSURL? URL) { + final _ret = _lib._objc_msgSend_160( + _id, _lib._sel_cookiesForURL_1, URL?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + void setCookies_forURL_mainDocumentURL_( + NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { + return _lib._objc_msgSend_368( + _id, + _lib._sel_setCookies_forURL_mainDocumentURL_1, + cookies?._id ?? ffi.nullptr, + URL?._id ?? ffi.nullptr, + mainDocumentURL?._id ?? ffi.nullptr); + } + + int get cookieAcceptPolicy { + return _lib._objc_msgSend_369(_id, _lib._sel_cookieAcceptPolicy1); + } + + set cookieAcceptPolicy(int value) { + _lib._objc_msgSend_370(_id, _lib._sel_setCookieAcceptPolicy_1, value); + } + + NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { + final _ret = _lib._objc_msgSend_97( + _id, + _lib._sel_sortedCookiesUsingDescriptors_1, + sortOrder?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + void storeCookies_forTask_(NSArray? cookies, NSURLSessionTask? task) { + return _lib._objc_msgSend_378(_id, _lib._sel_storeCookies_forTask_1, + cookies?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); + } + + void getCookiesForTask_completionHandler_( + NSURLSessionTask? task, ObjCBlock19 completionHandler) { + return _lib._objc_msgSend_379( + _id, + _lib._sel_getCookiesForTask_completionHandler_1, + task?._id ?? ffi.nullptr, + completionHandler._id); + } + + static NSHTTPCookieStorage new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + } + + static NSHTTPCookieStorage alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + } +} + +class NSHTTPCookie extends _ObjCWrapper { + NSHTTPCookie._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. + static NSHTTPCookie castFrom(T other) { + return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. + static NSHTTPCookie castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPCookie._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSHTTPCookie]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); + } +} + +/// NSURLSessionTask - a cancelable object that refers to the lifetime +/// of processing a given request. +class NSURLSessionTask extends NSObject { + NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. + static NSURLSessionTask castFrom(T other) { + return NSURLSessionTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. + static NSURLSessionTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionTask._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionTask1); + } + + /// an identifier for this task, assigned by and unique to the owning session + int get taskIdentifier { + return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); + } + + /// may be nil if this is a stream task + NSURLRequest? get originalRequest { + final _ret = _lib._objc_msgSend_371(_id, _lib._sel_originalRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// may differ from originalRequest due to http server redirection + NSURLRequest? get currentRequest { + final _ret = _lib._objc_msgSend_371(_id, _lib._sel_currentRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// may be nil if no response has been received + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_373(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// NSProgress object which represents the task progress. + /// It can be used for task progress tracking. + NSProgress? get progress { + final _ret = _lib._objc_msgSend_318(_id, _lib._sel_progress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); + } + + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + NSDate? get earliestBeginDate { + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_earliestBeginDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + set earliestBeginDate(NSDate? value) { + _lib._objc_msgSend_374( + _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); + } + + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + int get countOfBytesClientExpectsToSend { + return _lib._objc_msgSend_325( + _id, _lib._sel_countOfBytesClientExpectsToSend1); + } + + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + set countOfBytesClientExpectsToSend(int value) { + _lib._objc_msgSend_326( + _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); + } + + int get countOfBytesClientExpectsToReceive { + return _lib._objc_msgSend_325( + _id, _lib._sel_countOfBytesClientExpectsToReceive1); + } + + set countOfBytesClientExpectsToReceive(int value) { + _lib._objc_msgSend_326( + _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); + } + + /// number of body bytes already received + int get countOfBytesReceived { + return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesReceived1); + } + + /// number of body bytes already sent + int get countOfBytesSent { + return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesSent1); + } + + /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request + int get countOfBytesExpectedToSend { + return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesExpectedToSend1); + } + + /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. + int get countOfBytesExpectedToReceive { + return _lib._objc_msgSend_325( + _id, _lib._sel_countOfBytesExpectedToReceive1); + } + + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + NSString? get taskDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_taskDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + set taskDescription(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); + } + + /// -cancel returns immediately, but marks a task as being canceled. + /// The task will signal -URLSession:task:didCompleteWithError: with an + /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some + /// cases, the task may signal other work before it acknowledges the + /// cancelation. -cancel may be sent to a task that has been suspended. + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + /// The current state of the task within the session. + int get state { + return _lib._objc_msgSend_375(_id, _lib._sel_state1); + } + + /// The error, if any, delivered via -URLSession:task:didCompleteWithError: + /// This property will be nil in the event that no error occured. + NSError? get error { + final _ret = _lib._objc_msgSend_376(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } + + /// Suspending a task will prevent the NSURLSession from continuing to + /// load data. There may still be delegate calls made on behalf of + /// this task (for instance, to report data received while suspending) + /// but no further transmissions will be made on behalf of the task + /// until -resume is sent. The timeout timer associated with the task + /// will be disabled while a task is suspended. -suspend and -resume are + /// nestable. + void suspend() { + return _lib._objc_msgSend_1(_id, _lib._sel_suspend1); + } + + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } + + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. + /// + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + double get priority { + return _lib._objc_msgSend_84(_id, _lib._sel_priority1); + } + + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. + /// + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + set priority(double value) { + _lib._objc_msgSend_377(_id, _lib._sel_setPriority_1, value); + } + + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + bool get prefersIncrementalDelivery { + return _lib._objc_msgSend_11(_id, _lib._sel_prefersIncrementalDelivery1); + } + + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + set prefersIncrementalDelivery(bool value) { + _lib._objc_msgSend_328( + _id, _lib._sel_setPrefersIncrementalDelivery_1, value); + } + + @override + NSURLSessionTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionTask new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } +} + +class NSURLResponse extends NSObject { + NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLResponse] that points to the same underlying object as [other]. + static NSURLResponse castFrom(T other) { + return NSURLResponse._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLResponse] that wraps the given raw object pointer. + static NSURLResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLResponse._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); + } + + /// ! + /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: + /// @abstract Initialize an NSURLResponse with the provided values. + /// @param URL the URL + /// @param MIMEType the MIME content type of the response + /// @param length the expected content length of the associated data + /// @param name the name of the text encoding for the associated data, if applicable, else nil + /// @result The initialized NSURLResponse. + /// @discussion This is the designated initializer for NSURLResponse. + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + NSURL? URL, NSString? MIMEType, int length, NSString? name) { + final _ret = _lib._objc_msgSend_372( + _id, + _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, + URL?._id ?? ffi.nullptr, + MIMEType?._id ?? ffi.nullptr, + length, + name?._id ?? ffi.nullptr); + return NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the MIME type of the receiver. + /// @discussion The MIME type is based on the information provided + /// from an origin source. However, that value may be changed or + /// corrected by a protocol implementation if it can be determined + /// that the origin server or source reported the information + /// incorrectly or imprecisely. An attempt to guess the MIME type may + /// be made if the origin source did not report any such information. + /// @result The MIME type of the receiver. + NSString? get MIMEType { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_MIMEType1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the expected content length of the receiver. + /// @discussion Some protocol implementations report a content length + /// as part of delivering load metadata, but not all protocols + /// guarantee the amount of data that will be delivered in actuality. + /// Hence, this method returns an expected amount. Clients should use + /// this value as an advisory, and should be prepared to deal with + /// either more or less data. + /// @result The expected content length of the receiver, or -1 if + /// there is no expectation that can be arrived at regarding expected + /// content length. + int get expectedContentLength { + return _lib._objc_msgSend_82(_id, _lib._sel_expectedContentLength1); + } + + /// ! + /// @abstract Returns the name of the text encoding of the receiver. + /// @discussion This name will be the actual string reported by the + /// origin source during the course of performing a protocol-specific + /// URL load. Clients can inspect this string and convert it to an + /// NSStringEncoding or CFStringEncoding using the methods and + /// functions made available in the appropriate framework. + /// @result The name of the text encoding of the receiver, or nil if no + /// text encoding was specified. + NSString? get textEncodingName { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_textEncodingName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns a suggested filename if the resource were saved to disk. + /// @discussion The method first checks if the server has specified a filename using the + /// content disposition header. If no valid filename is specified using that mechanism, + /// this method checks the last path component of the URL. If no valid filename can be + /// obtained using the last path component, this method uses the URL's host as the filename. + /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. + /// In mose cases, this method appends the proper file extension based on the MIME type. + /// This method always returns a valid filename. + /// @result A suggested filename to use if saving the resource to disk. + NSString? get suggestedFilename { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedFilename1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSURLResponse new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); + } + + static NSURLResponse alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); + } +} + +abstract class NSURLSessionTaskState { + /// The task is currently being serviced by the session + static const int NSURLSessionTaskStateRunning = 0; + static const int NSURLSessionTaskStateSuspended = 1; + + /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. + static const int NSURLSessionTaskStateCanceling = 2; + + /// The task has completed and the session will receive no more delegate notifications + static const int NSURLSessionTaskStateCompleted = 3; +} + +void _ObjCBlock19_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} + +final _ObjCBlock19_closureRegistry = {}; +int _ObjCBlock19_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock19_registerClosure(Function fn) { + final id = ++_ObjCBlock19_closureRegistryIndex; + _ObjCBlock19_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock19_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock19_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock19 extends _ObjCBlockBase { + ObjCBlock19._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock19.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock19_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock19.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock19_closureTrampoline) + .cast(), + _ObjCBlock19_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +class CFArrayCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external CFArrayRetainCallBack retain; + + external CFArrayReleaseCallBack release; + + external CFArrayCopyDescriptionCallBack copyDescription; + + external CFArrayEqualCallBack equal; +} + +typedef CFArrayRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFArrayReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFArrayCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFArrayEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>>; + +class __CFArray extends ffi.Opaque {} + +typedef CFArrayRef = ffi.Pointer<__CFArray>; +typedef CFMutableArrayRef = ffi.Pointer<__CFArray>; +typedef CFArrayApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFComparatorFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>; + +class OS_object extends NSObject { + OS_object._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [OS_object] that points to the same underlying object as [other]. + static OS_object castFrom(T other) { + return OS_object._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [OS_object] that wraps the given raw object pointer. + static OS_object castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return OS_object._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [OS_object]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_OS_object1); + } + + @override + OS_object init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_object._(_ret, _lib, retain: true, release: true); + } + + static OS_object new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_new1); + return OS_object._(_ret, _lib, retain: false, release: true); + } + + static OS_object alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_alloc1); + return OS_object._(_ret, _lib, retain: false, release: true); + } +} + +class __SecCertificate extends ffi.Opaque {} + +class __SecIdentity extends ffi.Opaque {} + +class __SecKey extends ffi.Opaque {} + +class __SecPolicy extends ffi.Opaque {} + +class __SecAccessControl extends ffi.Opaque {} + +class __SecKeychain extends ffi.Opaque {} + +class __SecKeychainItem extends ffi.Opaque {} + +class __SecKeychainSearch extends ffi.Opaque {} + +class SecKeychainAttribute extends ffi.Struct { + @SecKeychainAttrType() + external int tag; + + @UInt32() + external int length; + + external ffi.Pointer data; +} + +typedef SecKeychainAttrType = OSType; +typedef OSType = FourCharCode; +typedef FourCharCode = UInt32; + +class SecKeychainAttributeList extends ffi.Struct { + @UInt32() + external int count; + + external ffi.Pointer attr; +} + +class __SecTrustedApplication extends ffi.Opaque {} + +class __SecAccess extends ffi.Opaque {} + +class __SecACL extends ffi.Opaque {} + +class __SecPassword extends ffi.Opaque {} + +class SecKeychainAttributeInfo extends ffi.Struct { + @UInt32() + external int count; + + external ffi.Pointer tag; + + external ffi.Pointer format; +} + +typedef OSStatus = SInt32; + +class _RuneEntry extends ffi.Struct { + @__darwin_rune_t() + external int __min; + + @__darwin_rune_t() + external int __max; + + @__darwin_rune_t() + external int __map; + + external ffi.Pointer<__uint32_t> __types; +} + +typedef __darwin_rune_t = __darwin_wchar_t; +typedef __darwin_wchar_t = ffi.Int; +typedef __uint32_t = ffi.UnsignedInt; + +class _RuneRange extends ffi.Struct { + @ffi.Int() + external int __nranges; + + external ffi.Pointer<_RuneEntry> __ranges; +} + +class _RuneCharClass extends ffi.Struct { + @ffi.Array.multi([14]) + external ffi.Array __name; + + @__uint32_t() + external int __mask; +} + +class _RuneLocale extends ffi.Struct { + @ffi.Array.multi([8]) + external ffi.Array __magic; + + @ffi.Array.multi([32]) + external ffi.Array __encoding; + + external ffi.Pointer< + ffi.NativeFunction< + __darwin_rune_t Function(ffi.Pointer, __darwin_size_t, + ffi.Pointer>)>> __sgetrune; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(__darwin_rune_t, ffi.Pointer, + __darwin_size_t, ffi.Pointer>)>> __sputrune; + + @__darwin_rune_t() + external int __invalid_rune; + + @ffi.Array.multi([256]) + external ffi.Array<__uint32_t> __runetype; + + @ffi.Array.multi([256]) + external ffi.Array<__darwin_rune_t> __maplower; + + @ffi.Array.multi([256]) + external ffi.Array<__darwin_rune_t> __mapupper; + + external _RuneRange __runetype_ext; + + external _RuneRange __maplower_ext; + + external _RuneRange __mapupper_ext; + + external ffi.Pointer __variable; + + @ffi.Int() + external int __variable_len; + + @ffi.Int() + external int __ncharclasses; + + external ffi.Pointer<_RuneCharClass> __charclasses; +} + +typedef __darwin_size_t = ffi.UnsignedLong; +typedef __darwin_ct_rune_t = ffi.Int; + +class lconv extends ffi.Struct { + external ffi.Pointer decimal_point; + + external ffi.Pointer thousands_sep; + + external ffi.Pointer grouping; + + external ffi.Pointer int_curr_symbol; + + external ffi.Pointer currency_symbol; + + external ffi.Pointer mon_decimal_point; + + external ffi.Pointer mon_thousands_sep; + + external ffi.Pointer mon_grouping; + + external ffi.Pointer positive_sign; + + external ffi.Pointer negative_sign; + + @ffi.Char() + external int int_frac_digits; + + @ffi.Char() + external int frac_digits; + + @ffi.Char() + external int p_cs_precedes; + + @ffi.Char() + external int p_sep_by_space; + + @ffi.Char() + external int n_cs_precedes; + + @ffi.Char() + external int n_sep_by_space; + + @ffi.Char() + external int p_sign_posn; + + @ffi.Char() + external int n_sign_posn; + + @ffi.Char() + external int int_p_cs_precedes; + + @ffi.Char() + external int int_n_cs_precedes; + + @ffi.Char() + external int int_p_sep_by_space; + + @ffi.Char() + external int int_n_sep_by_space; + + @ffi.Char() + external int int_p_sign_posn; + + @ffi.Char() + external int int_n_sign_posn; +} + +class __float2 extends ffi.Struct { + @ffi.Float() + external double __sinval; + + @ffi.Float() + external double __cosval; +} + +class __double2 extends ffi.Struct { + @ffi.Double() + external double __sinval; + + @ffi.Double() + external double __cosval; +} + +class exception extends ffi.Struct { + @ffi.Int() + external int type; + + external ffi.Pointer name; + + @ffi.Double() + external double arg1; + + @ffi.Double() + external double arg2; + + @ffi.Double() + external double retval; +} + +class __darwin_arm_exception_state extends ffi.Struct { + @__uint32_t() + external int __exception; + + @__uint32_t() + external int __fsr; + + @__uint32_t() + external int __far; +} + +class __darwin_arm_exception_state64 extends ffi.Struct { + @__uint64_t() + external int __far; + + @__uint32_t() + external int __esr; + + @__uint32_t() + external int __exception; +} + +typedef __uint64_t = ffi.UnsignedLongLong; + +class __darwin_arm_thread_state extends ffi.Struct { + @ffi.Array.multi([13]) + external ffi.Array<__uint32_t> __r; + + @__uint32_t() + external int __sp; + + @__uint32_t() + external int __lr; + + @__uint32_t() + external int __pc; + + @__uint32_t() + external int __cpsr; +} + +class __darwin_arm_thread_state64 extends ffi.Struct { + @ffi.Array.multi([29]) + external ffi.Array<__uint64_t> __x; + + @__uint64_t() + external int __fp; + + @__uint64_t() + external int __lr; + + @__uint64_t() + external int __sp; + + @__uint64_t() + external int __pc; + + @__uint32_t() + external int __cpsr; + + @__uint32_t() + external int __pad; +} + +class __darwin_arm_vfp_state extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array<__uint32_t> __r; + + @__uint32_t() + external int __fpscr; +} + +class __darwin_arm_neon_state64 extends ffi.Opaque {} + +class __darwin_arm_neon_state extends ffi.Opaque {} + +class __arm_pagein_state extends ffi.Struct { + @ffi.Int() + external int __pagein_error; +} + +class __arm_legacy_debug_state extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; +} + +class __darwin_arm_debug_state32 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; + + @__uint64_t() + external int __mdscr_el1; +} + +class __darwin_arm_debug_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bcr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wvr; + + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wcr; + + @__uint64_t() + external int __mdscr_el1; +} + +class __darwin_arm_cpmu_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __ctrs; +} + +class __darwin_mcontext32 extends ffi.Struct { + external __darwin_arm_exception_state __es; + + external __darwin_arm_thread_state __ss; + + external __darwin_arm_vfp_state __fs; +} + +class __darwin_mcontext64 extends ffi.Opaque {} + +class __darwin_sigaltstack extends ffi.Struct { + external ffi.Pointer ss_sp; + + @__darwin_size_t() + external int ss_size; + + @ffi.Int() + external int ss_flags; +} + +class __darwin_ucontext extends ffi.Struct { + @ffi.Int() + external int uc_onstack; + + @__darwin_sigset_t() + external int uc_sigmask; + + external __darwin_sigaltstack uc_stack; + + external ffi.Pointer<__darwin_ucontext> uc_link; + + @__darwin_size_t() + external int uc_mcsize; + + external ffi.Pointer<__darwin_mcontext64> uc_mcontext; +} + +typedef __darwin_sigset_t = __uint32_t; + +class sigval extends ffi.Union { + @ffi.Int() + external int sival_int; + + external ffi.Pointer sival_ptr; +} + +class sigevent extends ffi.Struct { + @ffi.Int() + external int sigev_notify; + + @ffi.Int() + external int sigev_signo; + + external sigval sigev_value; + + external ffi.Pointer> + sigev_notify_function; + + external ffi.Pointer sigev_notify_attributes; +} + +typedef pthread_attr_t = __darwin_pthread_attr_t; +typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; + +class __siginfo extends ffi.Struct { + @ffi.Int() + external int si_signo; + + @ffi.Int() + external int si_errno; + + @ffi.Int() + external int si_code; + + @pid_t() + external int si_pid; + + @uid_t() + external int si_uid; + + @ffi.Int() + external int si_status; + + external ffi.Pointer si_addr; + + external sigval si_value; + + @ffi.Long() + external int si_band; + + @ffi.Array.multi([7]) + external ffi.Array __pad; +} + +typedef pid_t = __darwin_pid_t; +typedef __darwin_pid_t = __int32_t; +typedef uid_t = __darwin_uid_t; +typedef __darwin_uid_t = __uint32_t; + +class __sigaction_u extends ffi.Union { + external ffi.Pointer> + __sa_handler; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer)>> + __sa_sigaction; +} + +class __sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Pointer, ffi.Pointer)>> sa_tramp; + + @sigset_t() + external int sa_mask; + + @ffi.Int() + external int sa_flags; +} + +typedef siginfo_t = __siginfo; +typedef sigset_t = __darwin_sigset_t; + +class sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; + + @sigset_t() + external int sa_mask; + + @ffi.Int() + external int sa_flags; +} + +class sigvec extends ffi.Struct { + external ffi.Pointer> + sv_handler; + + @ffi.Int() + external int sv_mask; + + @ffi.Int() + external int sv_flags; +} + +class sigstack extends ffi.Struct { + external ffi.Pointer ss_sp; + + @ffi.Int() + external int ss_onstack; +} + +typedef pthread_t = __darwin_pthread_t; +typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; +typedef stack_t = __darwin_sigaltstack; + +class __sbuf extends ffi.Struct { + external ffi.Pointer _base; + + @ffi.Int() + external int _size; +} + +class __sFILEX extends ffi.Opaque {} + +class __sFILE extends ffi.Struct { + external ffi.Pointer _p; + + @ffi.Int() + external int _r; + + @ffi.Int() + external int _w; + + @ffi.Short() + external int _flags; + + @ffi.Short() + external int _file; + + external __sbuf _bf; + + @ffi.Int() + external int _lbfsize; + + external ffi.Pointer _cookie; + + external ffi + .Pointer)>> + _close; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> _read; + + external ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> _seek; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> _write; + + external __sbuf _ub; + + external ffi.Pointer<__sFILEX> _extra; + + @ffi.Int() + external int _ur; + + @ffi.Array.multi([3]) + external ffi.Array _ubuf; + + @ffi.Array.multi([1]) + external ffi.Array _nbuf; + + external __sbuf _lb; + + @ffi.Int() + external int _blksize; + + @fpos_t() + external int _offset; +} + +typedef fpos_t = __darwin_off_t; +typedef __darwin_off_t = __int64_t; +typedef __int64_t = ffi.LongLong; +typedef FILE = __sFILE; +typedef off_t = __darwin_off_t; +typedef ssize_t = __darwin_ssize_t; +typedef __darwin_ssize_t = ffi.Long; + +abstract class idtype_t { + static const int P_ALL = 0; + static const int P_PID = 1; + static const int P_PGID = 2; +} + +class timeval extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; + + @__darwin_suseconds_t() + external int tv_usec; +} + +typedef __darwin_time_t = ffi.Long; +typedef __darwin_suseconds_t = __int32_t; + +class rusage extends ffi.Struct { + external timeval ru_utime; + + external timeval ru_stime; + + @ffi.Long() + external int ru_maxrss; + + @ffi.Long() + external int ru_ixrss; + + @ffi.Long() + external int ru_idrss; + + @ffi.Long() + external int ru_isrss; + + @ffi.Long() + external int ru_minflt; + + @ffi.Long() + external int ru_majflt; + + @ffi.Long() + external int ru_nswap; + + @ffi.Long() + external int ru_inblock; + + @ffi.Long() + external int ru_oublock; + + @ffi.Long() + external int ru_msgsnd; + + @ffi.Long() + external int ru_msgrcv; + + @ffi.Long() + external int ru_nsignals; + + @ffi.Long() + external int ru_nvcsw; + + @ffi.Long() + external int ru_nivcsw; +} + +class rusage_info_v0 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; +} + +class rusage_info_v1 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; +} + +class rusage_info_v2 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; +} + +class rusage_info_v3 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; + + @ffi.Uint64() + external int ri_cpu_time_qos_default; + + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; + + @ffi.Uint64() + external int ri_cpu_time_qos_background; + + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; +} + +class rusage_info_v4 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; + + @ffi.Uint64() + external int ri_cpu_time_qos_default; + + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; + + @ffi.Uint64() + external int ri_cpu_time_qos_background; + + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; + + @ffi.Uint64() + external int ri_logical_writes; + + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; + + @ffi.Uint64() + external int ri_instructions; + + @ffi.Uint64() + external int ri_cycles; + + @ffi.Uint64() + external int ri_billed_energy; + + @ffi.Uint64() + external int ri_serviced_energy; + + @ffi.Uint64() + external int ri_interval_max_phys_footprint; + + @ffi.Uint64() + external int ri_runnable_time; +} + +class rusage_info_v5 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; + + @ffi.Uint64() + external int ri_user_time; + + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; + + @ffi.Uint64() + external int ri_cpu_time_qos_default; + + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; + + @ffi.Uint64() + external int ri_cpu_time_qos_background; + + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; + + @ffi.Uint64() + external int ri_logical_writes; + + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; + + @ffi.Uint64() + external int ri_instructions; + + @ffi.Uint64() + external int ri_cycles; + + @ffi.Uint64() + external int ri_billed_energy; + + @ffi.Uint64() + external int ri_serviced_energy; + + @ffi.Uint64() + external int ri_interval_max_phys_footprint; + + @ffi.Uint64() + external int ri_runnable_time; + + @ffi.Uint64() + external int ri_flags; +} + +class rlimit extends ffi.Struct { + @rlim_t() + external int rlim_cur; + + @rlim_t() + external int rlim_max; +} + +typedef rlim_t = __uint64_t; + +class proc_rlimit_control_wakeupmon extends ffi.Struct { + @ffi.Uint32() + external int wm_flags; + + @ffi.Int32() + external int wm_rate; +} + +typedef id_t = __darwin_id_t; +typedef __darwin_id_t = __uint32_t; + +class wait extends ffi.Opaque {} + +class div_t extends ffi.Struct { + @ffi.Int() + external int quot; + + @ffi.Int() + external int rem; +} + +class ldiv_t extends ffi.Struct { + @ffi.Long() + external int quot; + + @ffi.Long() + external int rem; +} + +class lldiv_t extends ffi.Struct { + @ffi.LongLong() + external int quot; + + @ffi.LongLong() + external int rem; +} + +int _ObjCBlock20_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock20_closureRegistry = {}; +int _ObjCBlock20_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock20_registerClosure(Function fn) { + final id = ++_ObjCBlock20_closureRegistryIndex; + _ObjCBlock20_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +int _ObjCBlock20_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock20_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock20 extends _ObjCBlockBase { + ObjCBlock20._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock20.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer arg0, ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock20_fnPtrTrampoline, 0) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock20.fromFunction(NativeCupertinoHttp lib, + int Function(ffi.Pointer arg0, ffi.Pointer arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock20_closureTrampoline, 0) + .cast(), + _ObjCBlock20_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + int call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef dev_t = __darwin_dev_t; +typedef __darwin_dev_t = __int32_t; +typedef mode_t = __darwin_mode_t; +typedef __darwin_mode_t = __uint16_t; +typedef __uint16_t = ffi.UnsignedShort; +typedef errno_t = ffi.Int; +typedef rsize_t = __darwin_size_t; + +class timespec extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; + + @ffi.Long() + external int tv_nsec; +} + +class tm extends ffi.Struct { + @ffi.Int() + external int tm_sec; + + @ffi.Int() + external int tm_min; + + @ffi.Int() + external int tm_hour; + + @ffi.Int() + external int tm_mday; + + @ffi.Int() + external int tm_mon; + + @ffi.Int() + external int tm_year; + + @ffi.Int() + external int tm_wday; + + @ffi.Int() + external int tm_yday; + + @ffi.Int() + external int tm_isdst; + + @ffi.Long() + external int tm_gmtoff; + + external ffi.Pointer tm_zone; +} + +typedef clock_t = __darwin_clock_t; +typedef __darwin_clock_t = ffi.UnsignedLong; +typedef time_t = __darwin_time_t; + +abstract class clockid_t { + static const int _CLOCK_REALTIME = 0; + static const int _CLOCK_MONOTONIC = 6; + static const int _CLOCK_MONOTONIC_RAW = 4; + static const int _CLOCK_MONOTONIC_RAW_APPROX = 5; + static const int _CLOCK_UPTIME_RAW = 8; + static const int _CLOCK_UPTIME_RAW_APPROX = 9; + static const int _CLOCK_PROCESS_CPUTIME_ID = 12; + static const int _CLOCK_THREAD_CPUTIME_ID = 16; +} + +typedef intmax_t = ffi.Long; + +class imaxdiv_t extends ffi.Struct { + @intmax_t() + external int quot; + + @intmax_t() + external int rem; +} + +typedef uintmax_t = ffi.UnsignedLong; + +class CFBagCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external CFBagRetainCallBack retain; + + external CFBagReleaseCallBack release; + + external CFBagCopyDescriptionCallBack copyDescription; + + external CFBagEqualCallBack equal; + + external CFBagHashCallBack hash; +} + +typedef CFBagRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFBagReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFBagCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFBagEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFBagHashCallBack = ffi + .Pointer)>>; + +class __CFBag extends ffi.Opaque {} + +typedef CFBagRef = ffi.Pointer<__CFBag>; +typedef CFMutableBagRef = ffi.Pointer<__CFBag>; +typedef CFBagApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + +class CFBinaryHeapCompareContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; + + external ffi + .Pointer)>> + release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; +} + +class CFBinaryHeapCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFAllocatorRef, ffi.Pointer)>> retain; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>> release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> compare; +} + +class __CFBinaryHeap extends ffi.Opaque {} + +typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; +typedef CFBinaryHeapApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + +class __CFBitVector extends ffi.Opaque {} + +typedef CFBitVectorRef = ffi.Pointer<__CFBitVector>; +typedef CFMutableBitVectorRef = ffi.Pointer<__CFBitVector>; +typedef CFBit = UInt32; + +abstract class __CFByteOrder { + static const int CFByteOrderUnknown = 0; + static const int CFByteOrderLittleEndian = 1; + static const int CFByteOrderBigEndian = 2; +} + +class CFSwappedFloat32 extends ffi.Struct { + @ffi.Uint32() + external int v; +} + +class CFSwappedFloat64 extends ffi.Struct { + @ffi.Uint64() + external int v; +} + +class CFDictionaryKeyCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external CFDictionaryRetainCallBack retain; + + external CFDictionaryReleaseCallBack release; + + external CFDictionaryCopyDescriptionCallBack copyDescription; + + external CFDictionaryEqualCallBack equal; + + external CFDictionaryHashCallBack hash; +} + +typedef CFDictionaryRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFDictionaryReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFDictionaryCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFDictionaryEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFDictionaryHashCallBack = ffi + .Pointer)>>; + +class CFDictionaryValueCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external CFDictionaryRetainCallBack retain; + + external CFDictionaryReleaseCallBack release; + + external CFDictionaryCopyDescriptionCallBack copyDescription; + + external CFDictionaryEqualCallBack equal; +} + +class __CFDictionary extends ffi.Opaque {} + +typedef CFDictionaryRef = ffi.Pointer<__CFDictionary>; +typedef CFMutableDictionaryRef = ffi.Pointer<__CFDictionary>; +typedef CFDictionaryApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>; + +class __CFNotificationCenter extends ffi.Opaque {} + +abstract class CFNotificationSuspensionBehavior { + static const int CFNotificationSuspensionBehaviorDrop = 1; + static const int CFNotificationSuspensionBehaviorCoalesce = 2; + static const int CFNotificationSuspensionBehaviorHold = 3; + static const int CFNotificationSuspensionBehaviorDeliverImmediately = 4; +} + +typedef CFNotificationCenterRef = ffi.Pointer<__CFNotificationCenter>; +typedef CFNotificationCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFNotificationCenterRef, ffi.Pointer, + CFNotificationName, ffi.Pointer, CFDictionaryRef)>>; +typedef CFNotificationName = CFStringRef; + +class __CFLocale extends ffi.Opaque {} + +typedef CFLocaleRef = ffi.Pointer<__CFLocale>; +typedef CFLocaleIdentifier = CFStringRef; +typedef LangCode = SInt16; +typedef RegionCode = SInt16; + +abstract class CFLocaleLanguageDirection { + static const int kCFLocaleLanguageDirectionUnknown = 0; + static const int kCFLocaleLanguageDirectionLeftToRight = 1; + static const int kCFLocaleLanguageDirectionRightToLeft = 2; + static const int kCFLocaleLanguageDirectionTopToBottom = 3; + static const int kCFLocaleLanguageDirectionBottomToTop = 4; +} + +typedef CFLocaleKey = CFStringRef; +typedef CFCalendarIdentifier = CFStringRef; +typedef CFAbsoluteTime = CFTimeInterval; +typedef CFTimeInterval = ffi.Double; + +class __CFDate extends ffi.Opaque {} + +typedef CFDateRef = ffi.Pointer<__CFDate>; + +class __CFTimeZone extends ffi.Opaque {} + +class CFGregorianDate extends ffi.Struct { + @SInt32() + external int year; + + @SInt8() + external int month; + + @SInt8() + external int day; + + @SInt8() + external int hour; + + @SInt8() + external int minute; + + @ffi.Double() + external double second; +} + +typedef SInt8 = ffi.SignedChar; + +class CFGregorianUnits extends ffi.Struct { + @SInt32() + external int years; + + @SInt32() + external int months; + + @SInt32() + external int days; + + @SInt32() + external int hours; + + @SInt32() + external int minutes; + + @ffi.Double() + external double seconds; +} + +abstract class CFGregorianUnitFlags { + static const int kCFGregorianUnitsYears = 1; + static const int kCFGregorianUnitsMonths = 2; + static const int kCFGregorianUnitsDays = 4; + static const int kCFGregorianUnitsHours = 8; + static const int kCFGregorianUnitsMinutes = 16; + static const int kCFGregorianUnitsSeconds = 32; + static const int kCFGregorianAllUnits = 16777215; +} + +typedef CFTimeZoneRef = ffi.Pointer<__CFTimeZone>; + +class __CFData extends ffi.Opaque {} + +typedef CFDataRef = ffi.Pointer<__CFData>; +typedef CFMutableDataRef = ffi.Pointer<__CFData>; + +abstract class CFDataSearchFlags { + static const int kCFDataSearchBackwards = 1; + static const int kCFDataSearchAnchored = 2; +} + +class __CFCharacterSet extends ffi.Opaque {} + +abstract class CFCharacterSetPredefinedSet { + static const int kCFCharacterSetControl = 1; + static const int kCFCharacterSetWhitespace = 2; + static const int kCFCharacterSetWhitespaceAndNewline = 3; + static const int kCFCharacterSetDecimalDigit = 4; + static const int kCFCharacterSetLetter = 5; + static const int kCFCharacterSetLowercaseLetter = 6; + static const int kCFCharacterSetUppercaseLetter = 7; + static const int kCFCharacterSetNonBase = 8; + static const int kCFCharacterSetDecomposable = 9; + static const int kCFCharacterSetAlphaNumeric = 10; + static const int kCFCharacterSetPunctuation = 11; + static const int kCFCharacterSetCapitalizedLetter = 13; + static const int kCFCharacterSetSymbol = 14; + static const int kCFCharacterSetNewline = 15; + static const int kCFCharacterSetIllegal = 12; +} + +typedef CFCharacterSetRef = ffi.Pointer<__CFCharacterSet>; +typedef CFMutableCharacterSetRef = ffi.Pointer<__CFCharacterSet>; +typedef UniChar = UInt16; + +abstract class CFStringBuiltInEncodings { + static const int kCFStringEncodingMacRoman = 0; + static const int kCFStringEncodingWindowsLatin1 = 1280; + static const int kCFStringEncodingISOLatin1 = 513; + static const int kCFStringEncodingNextStepLatin = 2817; + static const int kCFStringEncodingASCII = 1536; + static const int kCFStringEncodingUnicode = 256; + static const int kCFStringEncodingUTF8 = 134217984; + static const int kCFStringEncodingNonLossyASCII = 3071; + static const int kCFStringEncodingUTF16 = 256; + static const int kCFStringEncodingUTF16BE = 268435712; + static const int kCFStringEncodingUTF16LE = 335544576; + static const int kCFStringEncodingUTF32 = 201326848; + static const int kCFStringEncodingUTF32BE = 402653440; + static const int kCFStringEncodingUTF32LE = 469762304; +} + +typedef CFStringEncoding = UInt32; +typedef CFMutableStringRef = ffi.Pointer<__CFString>; +typedef StringPtr = ffi.Pointer; +typedef ConstStringPtr = ffi.Pointer; + +abstract class CFStringCompareFlags { + static const int kCFCompareCaseInsensitive = 1; + static const int kCFCompareBackwards = 4; + static const int kCFCompareAnchored = 8; + static const int kCFCompareNonliteral = 16; + static const int kCFCompareLocalized = 32; + static const int kCFCompareNumerically = 64; + static const int kCFCompareDiacriticInsensitive = 128; + static const int kCFCompareWidthInsensitive = 256; + static const int kCFCompareForcedOrdering = 512; +} + +abstract class CFStringNormalizationForm { + static const int kCFStringNormalizationFormD = 0; + static const int kCFStringNormalizationFormKD = 1; + static const int kCFStringNormalizationFormC = 2; + static const int kCFStringNormalizationFormKC = 3; +} + +class CFStringInlineBuffer extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array buffer; + + external CFStringRef theString; + + external ffi.Pointer directUniCharBuffer; + + external ffi.Pointer directCStringBuffer; + + external CFRange rangeToBuffer; + + @CFIndex() + external int bufferedRangeStart; + + @CFIndex() + external int bufferedRangeEnd; +} + +abstract class CFTimeZoneNameStyle { + static const int kCFTimeZoneNameStyleStandard = 0; + static const int kCFTimeZoneNameStyleShortStandard = 1; + static const int kCFTimeZoneNameStyleDaylightSaving = 2; + static const int kCFTimeZoneNameStyleShortDaylightSaving = 3; + static const int kCFTimeZoneNameStyleGeneric = 4; + static const int kCFTimeZoneNameStyleShortGeneric = 5; +} + +class __CFCalendar extends ffi.Opaque {} + +typedef CFCalendarRef = ffi.Pointer<__CFCalendar>; + +abstract class CFCalendarUnit { + static const int kCFCalendarUnitEra = 2; + static const int kCFCalendarUnitYear = 4; + static const int kCFCalendarUnitMonth = 8; + static const int kCFCalendarUnitDay = 16; + static const int kCFCalendarUnitHour = 32; + static const int kCFCalendarUnitMinute = 64; + static const int kCFCalendarUnitSecond = 128; + static const int kCFCalendarUnitWeek = 256; + static const int kCFCalendarUnitWeekday = 512; + static const int kCFCalendarUnitWeekdayOrdinal = 1024; + static const int kCFCalendarUnitQuarter = 2048; + static const int kCFCalendarUnitWeekOfMonth = 4096; + static const int kCFCalendarUnitWeekOfYear = 8192; + static const int kCFCalendarUnitYearForWeekOfYear = 16384; +} + +class __CFDateFormatter extends ffi.Opaque {} + +abstract class CFDateFormatterStyle { + static const int kCFDateFormatterNoStyle = 0; + static const int kCFDateFormatterShortStyle = 1; + static const int kCFDateFormatterMediumStyle = 2; + static const int kCFDateFormatterLongStyle = 3; + static const int kCFDateFormatterFullStyle = 4; +} + +abstract class CFISO8601DateFormatOptions { + static const int kCFISO8601DateFormatWithYear = 1; + static const int kCFISO8601DateFormatWithMonth = 2; + static const int kCFISO8601DateFormatWithWeekOfYear = 4; + static const int kCFISO8601DateFormatWithDay = 16; + static const int kCFISO8601DateFormatWithTime = 32; + static const int kCFISO8601DateFormatWithTimeZone = 64; + static const int kCFISO8601DateFormatWithSpaceBetweenDateAndTime = 128; + static const int kCFISO8601DateFormatWithDashSeparatorInDate = 256; + static const int kCFISO8601DateFormatWithColonSeparatorInTime = 512; + static const int kCFISO8601DateFormatWithColonSeparatorInTimeZone = 1024; + static const int kCFISO8601DateFormatWithFractionalSeconds = 2048; + static const int kCFISO8601DateFormatWithFullDate = 275; + static const int kCFISO8601DateFormatWithFullTime = 1632; + static const int kCFISO8601DateFormatWithInternetDateTime = 1907; +} + +typedef CFDateFormatterRef = ffi.Pointer<__CFDateFormatter>; +typedef CFDateFormatterKey = CFStringRef; + +class __CFError extends ffi.Opaque {} + +typedef CFErrorDomain = CFStringRef; +typedef CFErrorRef = ffi.Pointer<__CFError>; + +class __CFBoolean extends ffi.Opaque {} + +typedef CFBooleanRef = ffi.Pointer<__CFBoolean>; + +abstract class CFNumberType { + static const int kCFNumberSInt8Type = 1; + static const int kCFNumberSInt16Type = 2; + static const int kCFNumberSInt32Type = 3; + static const int kCFNumberSInt64Type = 4; + static const int kCFNumberFloat32Type = 5; + static const int kCFNumberFloat64Type = 6; + static const int kCFNumberCharType = 7; + static const int kCFNumberShortType = 8; + static const int kCFNumberIntType = 9; + static const int kCFNumberLongType = 10; + static const int kCFNumberLongLongType = 11; + static const int kCFNumberFloatType = 12; + static const int kCFNumberDoubleType = 13; + static const int kCFNumberCFIndexType = 14; + static const int kCFNumberNSIntegerType = 15; + static const int kCFNumberCGFloatType = 16; + static const int kCFNumberMaxType = 16; +} + +class __CFNumber extends ffi.Opaque {} + +typedef CFNumberRef = ffi.Pointer<__CFNumber>; + +class __CFNumberFormatter extends ffi.Opaque {} + +abstract class CFNumberFormatterStyle { + static const int kCFNumberFormatterNoStyle = 0; + static const int kCFNumberFormatterDecimalStyle = 1; + static const int kCFNumberFormatterCurrencyStyle = 2; + static const int kCFNumberFormatterPercentStyle = 3; + static const int kCFNumberFormatterScientificStyle = 4; + static const int kCFNumberFormatterSpellOutStyle = 5; + static const int kCFNumberFormatterOrdinalStyle = 6; + static const int kCFNumberFormatterCurrencyISOCodeStyle = 8; + static const int kCFNumberFormatterCurrencyPluralStyle = 9; + static const int kCFNumberFormatterCurrencyAccountingStyle = 10; +} + +typedef CFNumberFormatterRef = ffi.Pointer<__CFNumberFormatter>; + +abstract class CFNumberFormatterOptionFlags { + static const int kCFNumberFormatterParseIntegersOnly = 1; +} + +typedef CFNumberFormatterKey = CFStringRef; + +abstract class CFNumberFormatterRoundingMode { + static const int kCFNumberFormatterRoundCeiling = 0; + static const int kCFNumberFormatterRoundFloor = 1; + static const int kCFNumberFormatterRoundDown = 2; + static const int kCFNumberFormatterRoundUp = 3; + static const int kCFNumberFormatterRoundHalfEven = 4; + static const int kCFNumberFormatterRoundHalfDown = 5; + static const int kCFNumberFormatterRoundHalfUp = 6; +} + +abstract class CFNumberFormatterPadPosition { + static const int kCFNumberFormatterPadBeforePrefix = 0; + static const int kCFNumberFormatterPadAfterPrefix = 1; + static const int kCFNumberFormatterPadBeforeSuffix = 2; + static const int kCFNumberFormatterPadAfterSuffix = 3; +} + +typedef CFPropertyListRef = CFTypeRef; + +abstract class CFURLPathStyle { + static const int kCFURLPOSIXPathStyle = 0; + static const int kCFURLHFSPathStyle = 1; + static const int kCFURLWindowsPathStyle = 2; +} + +class __CFURL extends ffi.Opaque {} + +typedef CFURLRef = ffi.Pointer<__CFURL>; + +abstract class CFURLComponentType { + static const int kCFURLComponentScheme = 1; + static const int kCFURLComponentNetLocation = 2; + static const int kCFURLComponentPath = 3; + static const int kCFURLComponentResourceSpecifier = 4; + static const int kCFURLComponentUser = 5; + static const int kCFURLComponentPassword = 6; + static const int kCFURLComponentUserInfo = 7; + static const int kCFURLComponentHost = 8; + static const int kCFURLComponentPort = 9; + static const int kCFURLComponentParameterString = 10; + static const int kCFURLComponentQuery = 11; + static const int kCFURLComponentFragment = 12; +} + +class FSRef extends ffi.Opaque {} + +abstract class CFURLBookmarkCreationOptions { + static const int kCFURLBookmarkCreationMinimalBookmarkMask = 512; + static const int kCFURLBookmarkCreationSuitableForBookmarkFile = 1024; + static const int kCFURLBookmarkCreationWithSecurityScope = 2048; + static const int kCFURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = + 4096; + static const int kCFURLBookmarkCreationWithoutImplicitSecurityScope = + 536870912; + static const int kCFURLBookmarkCreationPreferFileIDResolutionMask = 256; +} + +abstract class CFURLBookmarkResolutionOptions { + static const int kCFURLBookmarkResolutionWithoutUIMask = 256; + static const int kCFURLBookmarkResolutionWithoutMountingMask = 512; + static const int kCFURLBookmarkResolutionWithSecurityScope = 1024; + static const int kCFURLBookmarkResolutionWithoutImplicitStartAccessing = + 32768; + static const int kCFBookmarkResolutionWithoutUIMask = 256; + static const int kCFBookmarkResolutionWithoutMountingMask = 512; +} + +typedef CFURLBookmarkFileCreationOptions = CFOptionFlags; + +class mach_port_status extends ffi.Struct { + @mach_port_rights_t() + external int mps_pset; + + @mach_port_seqno_t() + external int mps_seqno; + + @mach_port_mscount_t() + external int mps_mscount; + + @mach_port_msgcount_t() + external int mps_qlimit; + + @mach_port_msgcount_t() + external int mps_msgcount; + + @mach_port_rights_t() + external int mps_sorights; + + @boolean_t() + external int mps_srights; + + @boolean_t() + external int mps_pdrequest; + + @boolean_t() + external int mps_nsrequest; + + @natural_t() + external int mps_flags; +} + +typedef mach_port_rights_t = natural_t; +typedef natural_t = __darwin_natural_t; +typedef __darwin_natural_t = ffi.UnsignedInt; +typedef mach_port_seqno_t = natural_t; +typedef mach_port_mscount_t = natural_t; +typedef mach_port_msgcount_t = natural_t; +typedef boolean_t = ffi.Int; + +class mach_port_limits extends ffi.Struct { + @mach_port_msgcount_t() + external int mpl_qlimit; +} + +class mach_port_info_ext extends ffi.Struct { + external mach_port_status_t mpie_status; + + @mach_port_msgcount_t() + external int mpie_boost_cnt; + + @ffi.Array.multi([6]) + external ffi.Array reserved; +} + +typedef mach_port_status_t = mach_port_status; + +class mach_port_guard_info extends ffi.Struct { + @ffi.Uint64() + external int mpgi_guard; +} + +class mach_port_qos extends ffi.Opaque {} + +class mach_service_port_info extends ffi.Struct { + @ffi.Array.multi([255]) + external ffi.Array mspi_string_name; + + @ffi.Uint8() + external int mspi_domain_type; +} + +class mach_port_options extends ffi.Struct { + @ffi.Uint32() + external int flags; + + external mach_port_limits_t mpl; +} + +typedef mach_port_limits_t = mach_port_limits; + +abstract class mach_port_guard_exception_codes { + static const int kGUARD_EXC_DESTROY = 1; + static const int kGUARD_EXC_MOD_REFS = 2; + static const int kGUARD_EXC_SET_CONTEXT = 4; + static const int kGUARD_EXC_UNGUARDED = 8; + static const int kGUARD_EXC_INCORRECT_GUARD = 16; + static const int kGUARD_EXC_IMMOVABLE = 32; + static const int kGUARD_EXC_STRICT_REPLY = 64; + static const int kGUARD_EXC_MSG_FILTERED = 128; + static const int kGUARD_EXC_INVALID_RIGHT = 256; + static const int kGUARD_EXC_INVALID_NAME = 512; + static const int kGUARD_EXC_INVALID_VALUE = 1024; + static const int kGUARD_EXC_INVALID_ARGUMENT = 2048; + static const int kGUARD_EXC_RIGHT_EXISTS = 4096; + static const int kGUARD_EXC_KERN_NO_SPACE = 8192; + static const int kGUARD_EXC_KERN_FAILURE = 16384; + static const int kGUARD_EXC_KERN_RESOURCE = 32768; + static const int kGUARD_EXC_SEND_INVALID_REPLY = 65536; + static const int kGUARD_EXC_SEND_INVALID_VOUCHER = 131072; + static const int kGUARD_EXC_SEND_INVALID_RIGHT = 262144; + static const int kGUARD_EXC_RCV_INVALID_NAME = 524288; + static const int kGUARD_EXC_RCV_GUARDED_DESC = 1048576; + static const int kGUARD_EXC_MOD_REFS_NON_FATAL = 2097152; + static const int kGUARD_EXC_IMMOVABLE_NON_FATAL = 4194304; +} + +class __CFRunLoop extends ffi.Opaque {} + +class __CFRunLoopSource extends ffi.Opaque {} + +class __CFRunLoopObserver extends ffi.Opaque {} + +class __CFRunLoopTimer extends ffi.Opaque {} + +abstract class CFRunLoopRunResult { + static const int kCFRunLoopRunFinished = 1; + static const int kCFRunLoopRunStopped = 2; + static const int kCFRunLoopRunTimedOut = 3; + static const int kCFRunLoopRunHandledSource = 4; +} + +abstract class CFRunLoopActivity { + static const int kCFRunLoopEntry = 1; + static const int kCFRunLoopBeforeTimers = 2; + static const int kCFRunLoopBeforeSources = 4; + static const int kCFRunLoopBeforeWaiting = 32; + static const int kCFRunLoopAfterWaiting = 64; + static const int kCFRunLoopExit = 128; + static const int kCFRunLoopAllActivities = 268435455; +} + +typedef CFRunLoopMode = CFStringRef; +typedef CFRunLoopRef = ffi.Pointer<__CFRunLoop>; +typedef CFRunLoopSourceRef = ffi.Pointer<__CFRunLoopSource>; +typedef CFRunLoopObserverRef = ffi.Pointer<__CFRunLoopObserver>; +typedef CFRunLoopTimerRef = ffi.Pointer<__CFRunLoopTimer>; + +class CFRunLoopSourceContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; + + external ffi + .Pointer)>> + release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; + + external ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>> + equal; + + external ffi.Pointer< + ffi.NativeFunction)>> hash; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, CFRunLoopRef, CFRunLoopMode)>> schedule; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, CFRunLoopRef, CFRunLoopMode)>> cancel; + + external ffi + .Pointer)>> + perform; +} + +class CFRunLoopSourceContext1 extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; + + external ffi + .Pointer)>> + release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; + + external ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>> + equal; + + external ffi.Pointer< + ffi.NativeFunction)>> hash; + + external ffi.Pointer< + ffi.NativeFunction)>> getPort; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, CFIndex, + CFAllocatorRef, ffi.Pointer)>> perform; +} + +typedef mach_port_t = __darwin_mach_port_t; +typedef __darwin_mach_port_t = __darwin_mach_port_name_t; +typedef __darwin_mach_port_name_t = __darwin_natural_t; + +class CFRunLoopObserverContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; + + external ffi + .Pointer)>> + release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; +} + +typedef CFRunLoopObserverCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFRunLoopObserverRef, ffi.Int32, ffi.Pointer)>>; +void _ObjCBlock21_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() + .asFunction< + void Function(CFRunLoopObserverRef arg0, int arg1)>()(arg0, arg1); +} + +final _ObjCBlock21_closureRegistry = {}; +int _ObjCBlock21_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock21_registerClosure(Function fn) { + final id = ++_ObjCBlock21_closureRegistryIndex; + _ObjCBlock21_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock21_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { + return _ObjCBlock21_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock21 extends _ObjCBlockBase { + ObjCBlock21._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock21.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>> + ptr) + : this._( + lib + ._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, + ffi.Int32 arg1)>(_ObjCBlock21_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock21.fromFunction(NativeCupertinoHttp lib, + void Function(CFRunLoopObserverRef arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, + ffi.Int32 arg1)>(_ObjCBlock21_closureTrampoline) + .cast(), + _ObjCBlock21_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(CFRunLoopObserverRef arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, int arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +class CFRunLoopTimerContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; + + external ffi + .Pointer)>> + release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; +} + +typedef CFRunLoopTimerCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopTimerRef, ffi.Pointer)>>; +void _ObjCBlock22_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} + +final _ObjCBlock22_closureRegistry = {}; +int _ObjCBlock22_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock22_registerClosure(Function fn) { + final id = ++_ObjCBlock22_closureRegistryIndex; + _ObjCBlock22_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock22_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { + return _ObjCBlock22_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock22 extends _ObjCBlockBase { + ObjCBlock22._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock22.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopTimerRef arg0)>( + _ObjCBlock22_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock22.fromFunction( + NativeCupertinoHttp lib, void Function(CFRunLoopTimerRef arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopTimerRef arg0)>( + _ObjCBlock22_closureTrampoline) + .cast(), + _ObjCBlock22_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(CFRunLoopTimerRef arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopTimerRef arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +class __CFSocket extends ffi.Opaque {} + +abstract class CFSocketError { + static const int kCFSocketSuccess = 0; + static const int kCFSocketError = -1; + static const int kCFSocketTimeout = -2; +} + +class CFSocketSignature extends ffi.Struct { + @SInt32() + external int protocolFamily; + + @SInt32() + external int socketType; + + @SInt32() + external int protocol; + + external CFDataRef address; +} + +abstract class CFSocketCallBackType { + static const int kCFSocketNoCallBack = 0; + static const int kCFSocketReadCallBack = 1; + static const int kCFSocketAcceptCallBack = 2; + static const int kCFSocketDataCallBack = 3; + static const int kCFSocketConnectCallBack = 4; + static const int kCFSocketWriteCallBack = 8; +} + +class CFSocketContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; + + external ffi + .Pointer)>> + release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; +} + +typedef CFSocketRef = ffi.Pointer<__CFSocket>; +typedef CFSocketCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFSocketRef, ffi.Int32, CFDataRef, + ffi.Pointer, ffi.Pointer)>>; +typedef CFSocketNativeHandle = ffi.Int; + +class accessx_descriptor extends ffi.Struct { + @ffi.UnsignedInt() + external int ad_name_offset; + + @ffi.Int() + external int ad_flags; + + @ffi.Array.multi([2]) + external ffi.Array ad_pad; +} + +typedef gid_t = __darwin_gid_t; +typedef __darwin_gid_t = __uint32_t; +typedef useconds_t = __darwin_useconds_t; +typedef __darwin_useconds_t = __uint32_t; + +class fssearchblock extends ffi.Opaque {} + +class searchstate extends ffi.Opaque {} + +class flock extends ffi.Struct { + @off_t() + external int l_start; + + @off_t() + external int l_len; + + @pid_t() + external int l_pid; + + @ffi.Short() + external int l_type; + + @ffi.Short() + external int l_whence; +} + +class flocktimeout extends ffi.Struct { + external flock fl; + + external timespec timeout; +} + +class radvisory extends ffi.Struct { + @off_t() + external int ra_offset; + + @ffi.Int() + external int ra_count; +} + +class fsignatures extends ffi.Struct { + @off_t() + external int fs_file_start; + + external ffi.Pointer fs_blob_start; + + @ffi.Size() + external int fs_blob_size; + + @ffi.Size() + external int fs_fsignatures_size; + + @ffi.Array.multi([20]) + external ffi.Array fs_cdhash; + + @ffi.Int() + external int fs_hash_type; +} + +class fsupplement extends ffi.Struct { + @off_t() + external int fs_file_start; + + @off_t() + external int fs_blob_start; + + @ffi.Size() + external int fs_blob_size; + + @ffi.Int() + external int fs_orig_fd; +} + +class fchecklv extends ffi.Struct { + @off_t() + external int lv_file_start; + + @ffi.Size() + external int lv_error_message_size; + + external ffi.Pointer lv_error_message; +} + +class fgetsigsinfo extends ffi.Struct { + @off_t() + external int fg_file_start; + + @ffi.Int() + external int fg_info_request; + + @ffi.Int() + external int fg_sig_is_platform; +} + +class fstore extends ffi.Struct { + @ffi.UnsignedInt() + external int fst_flags; + + @ffi.Int() + external int fst_posmode; + + @off_t() + external int fst_offset; + + @off_t() + external int fst_length; + + @off_t() + external int fst_bytesalloc; +} + +class fpunchhole extends ffi.Struct { + @ffi.UnsignedInt() + external int fp_flags; + + @ffi.UnsignedInt() + external int reserved; + + @off_t() + external int fp_offset; + + @off_t() + external int fp_length; +} + +class ftrimactivefile extends ffi.Struct { + @off_t() + external int fta_offset; + + @off_t() + external int fta_length; +} + +class fspecread extends ffi.Struct { + @ffi.UnsignedInt() + external int fsr_flags; + + @ffi.UnsignedInt() + external int reserved; + + @off_t() + external int fsr_offset; + + @off_t() + external int fsr_length; +} + +class fbootstraptransfer extends ffi.Struct { + @off_t() + external int fbt_offset; + + @ffi.Size() + external int fbt_length; + + external ffi.Pointer fbt_buffer; +} + +@ffi.Packed(4) +class log2phys extends ffi.Struct { + @ffi.UnsignedInt() + external int l2p_flags; + + @off_t() + external int l2p_contigbytes; + + @off_t() + external int l2p_devoffset; +} + +class _filesec extends ffi.Opaque {} + +abstract class filesec_property_t { + static const int FILESEC_OWNER = 1; + static const int FILESEC_GROUP = 2; + static const int FILESEC_UUID = 3; + static const int FILESEC_MODE = 4; + static const int FILESEC_ACL = 5; + static const int FILESEC_GRPUUID = 6; + static const int FILESEC_ACL_RAW = 100; + static const int FILESEC_ACL_ALLOCSIZE = 101; +} + +typedef filesec_t = ffi.Pointer<_filesec>; + +abstract class os_clockid_t { + static const int OS_CLOCK_MACH_ABSOLUTE_TIME = 32; +} + +class os_workgroup_attr_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; + + @ffi.Array.multi([60]) + external ffi.Array opaque; +} + +class os_workgroup_interval_data_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; + + @ffi.Array.multi([56]) + external ffi.Array opaque; +} + +class os_workgroup_join_token_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; + + @ffi.Array.multi([36]) + external ffi.Array opaque; +} + +class OS_os_workgroup extends OS_object { + OS_os_workgroup._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [OS_os_workgroup] that points to the same underlying object as [other]. + static OS_os_workgroup castFrom(T other) { + return OS_os_workgroup._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [OS_os_workgroup] that wraps the given raw object pointer. + static OS_os_workgroup castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return OS_os_workgroup._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [OS_os_workgroup]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_OS_os_workgroup1); + } + + @override + OS_os_workgroup init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_os_workgroup._(_ret, _lib, retain: true, release: true); + } + + static OS_os_workgroup new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_OS_os_workgroup1, _lib._sel_new1); + return OS_os_workgroup._(_ret, _lib, retain: false, release: true); + } + + static OS_os_workgroup alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_OS_os_workgroup1, _lib._sel_alloc1); + return OS_os_workgroup._(_ret, _lib, retain: false, release: true); + } +} + +typedef os_workgroup_t = ffi.Pointer; +typedef os_workgroup_join_token_t + = ffi.Pointer; +typedef os_workgroup_working_arena_destructor_t + = ffi.Pointer)>>; +typedef os_workgroup_index = ffi.Uint32; + +class os_workgroup_max_parallel_threads_attr_s extends ffi.Opaque {} + +typedef os_workgroup_mpt_attr_t + = ffi.Pointer; + +class OS_os_workgroup_interval extends OS_os_workgroup { + OS_os_workgroup_interval._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [OS_os_workgroup_interval] that points to the same underlying object as [other]. + static OS_os_workgroup_interval castFrom(T other) { + return OS_os_workgroup_interval._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [OS_os_workgroup_interval] that wraps the given raw object pointer. + static OS_os_workgroup_interval castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return OS_os_workgroup_interval._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [OS_os_workgroup_interval]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_OS_os_workgroup_interval1); + } + + @override + OS_os_workgroup_interval init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_os_workgroup_interval._(_ret, _lib, retain: true, release: true); + } + + static OS_os_workgroup_interval new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_OS_os_workgroup_interval1, _lib._sel_new1); + return OS_os_workgroup_interval._(_ret, _lib, retain: false, release: true); + } + + static OS_os_workgroup_interval alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_OS_os_workgroup_interval1, _lib._sel_alloc1); + return OS_os_workgroup_interval._(_ret, _lib, retain: false, release: true); + } +} + +typedef os_workgroup_interval_t = ffi.Pointer; +typedef os_workgroup_interval_data_t + = ffi.Pointer; + +class OS_os_workgroup_parallel extends OS_os_workgroup { + OS_os_workgroup_parallel._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [OS_os_workgroup_parallel] that points to the same underlying object as [other]. + static OS_os_workgroup_parallel castFrom(T other) { + return OS_os_workgroup_parallel._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [OS_os_workgroup_parallel] that wraps the given raw object pointer. + static OS_os_workgroup_parallel castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return OS_os_workgroup_parallel._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [OS_os_workgroup_parallel]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_OS_os_workgroup_parallel1); + } + + @override + OS_os_workgroup_parallel init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_os_workgroup_parallel._(_ret, _lib, retain: true, release: true); + } + + static OS_os_workgroup_parallel new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_OS_os_workgroup_parallel1, _lib._sel_new1); + return OS_os_workgroup_parallel._(_ret, _lib, retain: false, release: true); + } + + static OS_os_workgroup_parallel alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_OS_os_workgroup_parallel1, _lib._sel_alloc1); + return OS_os_workgroup_parallel._(_ret, _lib, retain: false, release: true); + } +} + +typedef os_workgroup_parallel_t = ffi.Pointer; +typedef os_workgroup_attr_t = ffi.Pointer; + +class time_value extends ffi.Struct { + @integer_t() + external int seconds; + + @integer_t() + external int microseconds; +} + +typedef integer_t = ffi.Int; + +class mach_timespec extends ffi.Struct { + @ffi.UnsignedInt() + external int tv_sec; + + @clock_res_t() + external int tv_nsec; +} + +typedef clock_res_t = ffi.Int; +typedef dispatch_time_t = ffi.Uint64; + +abstract class qos_class_t { + static const int QOS_CLASS_USER_INTERACTIVE = 33; + static const int QOS_CLASS_USER_INITIATED = 25; + static const int QOS_CLASS_DEFAULT = 21; + static const int QOS_CLASS_UTILITY = 17; + static const int QOS_CLASS_BACKGROUND = 9; + static const int QOS_CLASS_UNSPECIFIED = 0; +} + +typedef dispatch_object_t = ffi.Pointer; +typedef dispatch_function_t + = ffi.Pointer)>>; +typedef dispatch_block_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock23_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} + +final _ObjCBlock23_closureRegistry = {}; +int _ObjCBlock23_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock23_registerClosure(Function fn) { + final id = ++_ObjCBlock23_closureRegistryIndex; + _ObjCBlock23_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock23_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock23_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock23 extends _ObjCBlockBase { + ObjCBlock23._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock23.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Size arg0)>(_ObjCBlock23_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock23.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Size arg0)>(_ObjCBlock23_closureTrampoline) + .cast(), + _ObjCBlock23_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(int arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Size arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +class dispatch_queue_s extends ffi.Opaque {} + +typedef dispatch_queue_global_t = ffi.Pointer; +typedef uintptr_t = ffi.UnsignedLong; + +class dispatch_queue_attr_s extends ffi.Opaque {} + +typedef dispatch_queue_attr_t = ffi.Pointer; + +abstract class dispatch_autorelease_frequency_t { + static const int DISPATCH_AUTORELEASE_FREQUENCY_INHERIT = 0; + static const int DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM = 1; + static const int DISPATCH_AUTORELEASE_FREQUENCY_NEVER = 2; +} + +abstract class dispatch_block_flags_t { + static const int DISPATCH_BLOCK_BARRIER = 1; + static const int DISPATCH_BLOCK_DETACHED = 2; + static const int DISPATCH_BLOCK_ASSIGN_CURRENT = 4; + static const int DISPATCH_BLOCK_NO_QOS_CLASS = 8; + static const int DISPATCH_BLOCK_INHERIT_QOS_CLASS = 16; + static const int DISPATCH_BLOCK_ENFORCE_QOS_CLASS = 32; +} + +class mach_msg_type_descriptor_t extends ffi.Opaque {} + +class mach_msg_port_descriptor_t extends ffi.Opaque {} + +class mach_msg_ool_descriptor32_t extends ffi.Opaque {} + +class mach_msg_ool_descriptor64_t extends ffi.Opaque {} + +class mach_msg_ool_descriptor_t extends ffi.Opaque {} + +class mach_msg_ool_ports_descriptor32_t extends ffi.Opaque {} + +class mach_msg_ool_ports_descriptor64_t extends ffi.Opaque {} + +class mach_msg_ool_ports_descriptor_t extends ffi.Opaque {} + +class mach_msg_guarded_port_descriptor32_t extends ffi.Opaque {} + +class mach_msg_guarded_port_descriptor64_t extends ffi.Opaque {} + +class mach_msg_guarded_port_descriptor_t extends ffi.Opaque {} + +class mach_msg_descriptor_t extends ffi.Opaque {} + +class mach_msg_body_t extends ffi.Struct { + @mach_msg_size_t() + external int msgh_descriptor_count; +} + +typedef mach_msg_size_t = natural_t; + +class mach_msg_header_t extends ffi.Struct { + @mach_msg_bits_t() + external int msgh_bits; + + @mach_msg_size_t() + external int msgh_size; + + @mach_port_t() + external int msgh_remote_port; + + @mach_port_t() + external int msgh_local_port; + + @mach_port_name_t() + external int msgh_voucher_port; + + @mach_msg_id_t() + external int msgh_id; +} + +typedef mach_msg_bits_t = ffi.UnsignedInt; +typedef mach_port_name_t = natural_t; +typedef mach_msg_id_t = integer_t; + +class mach_msg_base_t extends ffi.Struct { + external mach_msg_header_t header; + + external mach_msg_body_t body; +} + +class mach_msg_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; + + @mach_msg_trailer_size_t() + external int msgh_trailer_size; +} + +typedef mach_msg_trailer_type_t = ffi.UnsignedInt; +typedef mach_msg_trailer_size_t = ffi.UnsignedInt; + +class mach_msg_seqno_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; + + @mach_msg_trailer_size_t() + external int msgh_trailer_size; + + @mach_port_seqno_t() + external int msgh_seqno; +} + +class security_token_t extends ffi.Struct { + @ffi.Array.multi([2]) + external ffi.Array val; +} + +class mach_msg_security_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; + + @mach_msg_trailer_size_t() + external int msgh_trailer_size; + + @mach_port_seqno_t() + external int msgh_seqno; + + external security_token_t msgh_sender; +} + +class audit_token_t extends ffi.Struct { + @ffi.Array.multi([8]) + external ffi.Array val; +} + +class mach_msg_audit_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; + + @mach_msg_trailer_size_t() + external int msgh_trailer_size; + + @mach_port_seqno_t() + external int msgh_seqno; + + external security_token_t msgh_sender; + + external audit_token_t msgh_audit; +} + +@ffi.Packed(4) +class mach_msg_context_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; + + @mach_msg_trailer_size_t() + external int msgh_trailer_size; + + @mach_port_seqno_t() + external int msgh_seqno; + + external security_token_t msgh_sender; + + external audit_token_t msgh_audit; + + @mach_port_context_t() + external int msgh_context; +} + +typedef mach_port_context_t = vm_offset_t; +typedef vm_offset_t = uintptr_t; + +class msg_labels_t extends ffi.Struct { + @mach_port_name_t() + external int sender; +} + +@ffi.Packed(4) +class mach_msg_mac_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; + + @mach_msg_trailer_size_t() + external int msgh_trailer_size; + + @mach_port_seqno_t() + external int msgh_seqno; + + external security_token_t msgh_sender; + + external audit_token_t msgh_audit; + + @mach_port_context_t() + external int msgh_context; + + @mach_msg_filter_id() + external int msgh_ad; + + external msg_labels_t msgh_labels; +} + +typedef mach_msg_filter_id = ffi.Int; + +class mach_msg_empty_send_t extends ffi.Struct { + external mach_msg_header_t header; +} + +class mach_msg_empty_rcv_t extends ffi.Struct { + external mach_msg_header_t header; + + external mach_msg_trailer_t trailer; +} + +class mach_msg_empty_t extends ffi.Union { + external mach_msg_empty_send_t send; + + external mach_msg_empty_rcv_t rcv; +} + +typedef mach_msg_return_t = kern_return_t; +typedef kern_return_t = ffi.Int; +typedef mach_msg_option_t = integer_t; +typedef mach_msg_timeout_t = natural_t; + +class dispatch_source_type_s extends ffi.Opaque {} + +typedef dispatch_source_t = ffi.Pointer; +typedef dispatch_source_type_t = ffi.Pointer; +typedef dispatch_group_t = ffi.Pointer; +typedef dispatch_semaphore_t = ffi.Pointer; +typedef dispatch_once_t = ffi.IntPtr; + +class dispatch_data_s extends ffi.Opaque {} + +typedef dispatch_data_t = ffi.Pointer; +typedef dispatch_data_applier_t = ffi.Pointer<_ObjCBlock>; +bool _ObjCBlock24_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, + ffi.Pointer arg2, ffi.Size arg3)>>() + .asFunction< + bool Function(dispatch_data_t arg0, int arg1, + ffi.Pointer arg2, int arg3)>()(arg0, arg1, arg2, arg3); +} + +final _ObjCBlock24_closureRegistry = {}; +int _ObjCBlock24_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock24_registerClosure(Function fn) { + final id = ++_ObjCBlock24_closureRegistryIndex; + _ObjCBlock24_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock24_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { + return _ObjCBlock24_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2, arg3); +} + +class ObjCBlock24 extends _ObjCBlockBase { + ObjCBlock24._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock24.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, + ffi.Pointer arg2, ffi.Size arg3)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Size arg1, + ffi.Pointer arg2, + ffi.Size arg3)>(_ObjCBlock24_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock24.fromFunction( + NativeCupertinoHttp lib, + bool Function(dispatch_data_t arg0, int arg1, ffi.Pointer arg2, + int arg3) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Size arg1, + ffi.Pointer arg2, + ffi.Size arg3)>( + _ObjCBlock24_closureTrampoline, false) + .cast(), + _ObjCBlock24_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call( + dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Size arg1, + ffi.Pointer arg2, + ffi.Size arg3)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + int arg1, + ffi.Pointer arg2, + int arg3)>()(_id, arg0, arg1, arg2, arg3); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef dispatch_fd_t = ffi.Int; +void _ObjCBlock25_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>>() + .asFunction()(arg0, arg1); +} + +final _ObjCBlock25_closureRegistry = {}; +int _ObjCBlock25_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock25_registerClosure(Function fn) { + final id = ++_ObjCBlock25_closureRegistryIndex; + _ObjCBlock25_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock25_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { + return _ObjCBlock25_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock25 extends _ObjCBlockBase { + ObjCBlock25._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock25.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Int arg1)>(_ObjCBlock25_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock25.fromFunction( + NativeCupertinoHttp lib, void Function(dispatch_data_t arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Int arg1)>(_ObjCBlock25_closureTrampoline) + .cast(), + _ObjCBlock25_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(dispatch_data_t arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, ffi.Int arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, + int arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef dispatch_io_t = ffi.Pointer; +typedef dispatch_io_type_t = ffi.UnsignedLong; +void _ObjCBlock26_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} + +final _ObjCBlock26_closureRegistry = {}; +int _ObjCBlock26_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock26_registerClosure(Function fn) { + final id = ++_ObjCBlock26_closureRegistryIndex; + _ObjCBlock26_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock26_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock26_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock26 extends _ObjCBlockBase { + ObjCBlock26._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock26.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Int arg0)>(_ObjCBlock26_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock26.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Int arg0)>(_ObjCBlock26_closureTrampoline) + .cast(), + _ObjCBlock26_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(int arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Int arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef dispatch_io_handler_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock27_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() + .asFunction< + void Function( + bool arg0, dispatch_data_t arg1, int arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock27_closureRegistry = {}; +int _ObjCBlock27_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock27_registerClosure(Function fn) { + final id = ++_ObjCBlock27_closureRegistryIndex; + _ObjCBlock27_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock27_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { + return _ObjCBlock27_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock27 extends _ObjCBlockBase { + ObjCBlock27._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock27.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0, + dispatch_data_t arg1, + ffi.Int arg2)>(_ObjCBlock27_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock27.fromFunction(NativeCupertinoHttp lib, + void Function(bool arg0, dispatch_data_t arg1, int arg2) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0, + dispatch_data_t arg1, + ffi.Int arg2)>(_ObjCBlock27_closureTrampoline) + .cast(), + _ObjCBlock27_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(bool arg0, dispatch_data_t arg1, int arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0, + dispatch_data_t arg1, ffi.Int arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, bool arg0, + dispatch_data_t arg1, int arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef dispatch_io_close_flags_t = ffi.UnsignedLong; +typedef dispatch_io_interval_flags_t = ffi.UnsignedLong; +typedef dispatch_workloop_t = ffi.Pointer; + +class CFStreamError extends ffi.Struct { + @CFIndex() + external int domain; + + @SInt32() + external int error; +} + +abstract class CFStreamStatus { + static const int kCFStreamStatusNotOpen = 0; + static const int kCFStreamStatusOpening = 1; + static const int kCFStreamStatusOpen = 2; + static const int kCFStreamStatusReading = 3; + static const int kCFStreamStatusWriting = 4; + static const int kCFStreamStatusAtEnd = 5; + static const int kCFStreamStatusClosed = 6; + static const int kCFStreamStatusError = 7; +} + +abstract class CFStreamEventType { + static const int kCFStreamEventNone = 0; + static const int kCFStreamEventOpenCompleted = 1; + static const int kCFStreamEventHasBytesAvailable = 2; + static const int kCFStreamEventCanAcceptBytes = 4; + static const int kCFStreamEventErrorOccurred = 8; + static const int kCFStreamEventEndEncountered = 16; +} + +class CFStreamClientContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; + + external ffi + .Pointer)>> + release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; +} + +class __CFReadStream extends ffi.Opaque {} + +class __CFWriteStream extends ffi.Opaque {} + +typedef CFStreamPropertyKey = CFStringRef; +typedef CFReadStreamRef = ffi.Pointer<__CFReadStream>; +typedef CFWriteStreamRef = ffi.Pointer<__CFWriteStream>; +typedef CFReadStreamClientCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, ffi.Int32, ffi.Pointer)>>; +typedef CFWriteStreamClientCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFWriteStreamRef, ffi.Int32, ffi.Pointer)>>; + +abstract class CFStreamErrorDomain { + static const int kCFStreamErrorDomainCustom = -1; + static const int kCFStreamErrorDomainPOSIX = 1; + static const int kCFStreamErrorDomainMacOSStatus = 2; +} + +abstract class CFPropertyListMutabilityOptions { + static const int kCFPropertyListImmutable = 0; + static const int kCFPropertyListMutableContainers = 1; + static const int kCFPropertyListMutableContainersAndLeaves = 2; +} + +abstract class CFPropertyListFormat { + static const int kCFPropertyListOpenStepFormat = 1; + static const int kCFPropertyListXMLFormat_v1_0 = 100; + static const int kCFPropertyListBinaryFormat_v1_0 = 200; +} + +class CFSetCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external CFSetRetainCallBack retain; + + external CFSetReleaseCallBack release; + + external CFSetCopyDescriptionCallBack copyDescription; + + external CFSetEqualCallBack equal; + + external CFSetHashCallBack hash; +} + +typedef CFSetRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFSetReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFSetCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFSetEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFSetHashCallBack = ffi + .Pointer)>>; + +class __CFSet extends ffi.Opaque {} + +typedef CFSetRef = ffi.Pointer<__CFSet>; +typedef CFMutableSetRef = ffi.Pointer<__CFSet>; +typedef CFSetApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + +abstract class CFStringEncodings { + static const int kCFStringEncodingMacJapanese = 1; + static const int kCFStringEncodingMacChineseTrad = 2; + static const int kCFStringEncodingMacKorean = 3; + static const int kCFStringEncodingMacArabic = 4; + static const int kCFStringEncodingMacHebrew = 5; + static const int kCFStringEncodingMacGreek = 6; + static const int kCFStringEncodingMacCyrillic = 7; + static const int kCFStringEncodingMacDevanagari = 9; + static const int kCFStringEncodingMacGurmukhi = 10; + static const int kCFStringEncodingMacGujarati = 11; + static const int kCFStringEncodingMacOriya = 12; + static const int kCFStringEncodingMacBengali = 13; + static const int kCFStringEncodingMacTamil = 14; + static const int kCFStringEncodingMacTelugu = 15; + static const int kCFStringEncodingMacKannada = 16; + static const int kCFStringEncodingMacMalayalam = 17; + static const int kCFStringEncodingMacSinhalese = 18; + static const int kCFStringEncodingMacBurmese = 19; + static const int kCFStringEncodingMacKhmer = 20; + static const int kCFStringEncodingMacThai = 21; + static const int kCFStringEncodingMacLaotian = 22; + static const int kCFStringEncodingMacGeorgian = 23; + static const int kCFStringEncodingMacArmenian = 24; + static const int kCFStringEncodingMacChineseSimp = 25; + static const int kCFStringEncodingMacTibetan = 26; + static const int kCFStringEncodingMacMongolian = 27; + static const int kCFStringEncodingMacEthiopic = 28; + static const int kCFStringEncodingMacCentralEurRoman = 29; + static const int kCFStringEncodingMacVietnamese = 30; + static const int kCFStringEncodingMacExtArabic = 31; + static const int kCFStringEncodingMacSymbol = 33; + static const int kCFStringEncodingMacDingbats = 34; + static const int kCFStringEncodingMacTurkish = 35; + static const int kCFStringEncodingMacCroatian = 36; + static const int kCFStringEncodingMacIcelandic = 37; + static const int kCFStringEncodingMacRomanian = 38; + static const int kCFStringEncodingMacCeltic = 39; + static const int kCFStringEncodingMacGaelic = 40; + static const int kCFStringEncodingMacFarsi = 140; + static const int kCFStringEncodingMacUkrainian = 152; + static const int kCFStringEncodingMacInuit = 236; + static const int kCFStringEncodingMacVT100 = 252; + static const int kCFStringEncodingMacHFS = 255; + static const int kCFStringEncodingISOLatin2 = 514; + static const int kCFStringEncodingISOLatin3 = 515; + static const int kCFStringEncodingISOLatin4 = 516; + static const int kCFStringEncodingISOLatinCyrillic = 517; + static const int kCFStringEncodingISOLatinArabic = 518; + static const int kCFStringEncodingISOLatinGreek = 519; + static const int kCFStringEncodingISOLatinHebrew = 520; + static const int kCFStringEncodingISOLatin5 = 521; + static const int kCFStringEncodingISOLatin6 = 522; + static const int kCFStringEncodingISOLatinThai = 523; + static const int kCFStringEncodingISOLatin7 = 525; + static const int kCFStringEncodingISOLatin8 = 526; + static const int kCFStringEncodingISOLatin9 = 527; + static const int kCFStringEncodingISOLatin10 = 528; + static const int kCFStringEncodingDOSLatinUS = 1024; + static const int kCFStringEncodingDOSGreek = 1029; + static const int kCFStringEncodingDOSBalticRim = 1030; + static const int kCFStringEncodingDOSLatin1 = 1040; + static const int kCFStringEncodingDOSGreek1 = 1041; + static const int kCFStringEncodingDOSLatin2 = 1042; + static const int kCFStringEncodingDOSCyrillic = 1043; + static const int kCFStringEncodingDOSTurkish = 1044; + static const int kCFStringEncodingDOSPortuguese = 1045; + static const int kCFStringEncodingDOSIcelandic = 1046; + static const int kCFStringEncodingDOSHebrew = 1047; + static const int kCFStringEncodingDOSCanadianFrench = 1048; + static const int kCFStringEncodingDOSArabic = 1049; + static const int kCFStringEncodingDOSNordic = 1050; + static const int kCFStringEncodingDOSRussian = 1051; + static const int kCFStringEncodingDOSGreek2 = 1052; + static const int kCFStringEncodingDOSThai = 1053; + static const int kCFStringEncodingDOSJapanese = 1056; + static const int kCFStringEncodingDOSChineseSimplif = 1057; + static const int kCFStringEncodingDOSKorean = 1058; + static const int kCFStringEncodingDOSChineseTrad = 1059; + static const int kCFStringEncodingWindowsLatin2 = 1281; + static const int kCFStringEncodingWindowsCyrillic = 1282; + static const int kCFStringEncodingWindowsGreek = 1283; + static const int kCFStringEncodingWindowsLatin5 = 1284; + static const int kCFStringEncodingWindowsHebrew = 1285; + static const int kCFStringEncodingWindowsArabic = 1286; + static const int kCFStringEncodingWindowsBalticRim = 1287; + static const int kCFStringEncodingWindowsVietnamese = 1288; + static const int kCFStringEncodingWindowsKoreanJohab = 1296; + static const int kCFStringEncodingANSEL = 1537; + static const int kCFStringEncodingJIS_X0201_76 = 1568; + static const int kCFStringEncodingJIS_X0208_83 = 1569; + static const int kCFStringEncodingJIS_X0208_90 = 1570; + static const int kCFStringEncodingJIS_X0212_90 = 1571; + static const int kCFStringEncodingJIS_C6226_78 = 1572; + static const int kCFStringEncodingShiftJIS_X0213 = 1576; + static const int kCFStringEncodingShiftJIS_X0213_MenKuTen = 1577; + static const int kCFStringEncodingGB_2312_80 = 1584; + static const int kCFStringEncodingGBK_95 = 1585; + static const int kCFStringEncodingGB_18030_2000 = 1586; + static const int kCFStringEncodingKSC_5601_87 = 1600; + static const int kCFStringEncodingKSC_5601_92_Johab = 1601; + static const int kCFStringEncodingCNS_11643_92_P1 = 1617; + static const int kCFStringEncodingCNS_11643_92_P2 = 1618; + static const int kCFStringEncodingCNS_11643_92_P3 = 1619; + static const int kCFStringEncodingISO_2022_JP = 2080; + static const int kCFStringEncodingISO_2022_JP_2 = 2081; + static const int kCFStringEncodingISO_2022_JP_1 = 2082; + static const int kCFStringEncodingISO_2022_JP_3 = 2083; + static const int kCFStringEncodingISO_2022_CN = 2096; + static const int kCFStringEncodingISO_2022_CN_EXT = 2097; + static const int kCFStringEncodingISO_2022_KR = 2112; + static const int kCFStringEncodingEUC_JP = 2336; + static const int kCFStringEncodingEUC_CN = 2352; + static const int kCFStringEncodingEUC_TW = 2353; + static const int kCFStringEncodingEUC_KR = 2368; + static const int kCFStringEncodingShiftJIS = 2561; + static const int kCFStringEncodingKOI8_R = 2562; + static const int kCFStringEncodingBig5 = 2563; + static const int kCFStringEncodingMacRomanLatin1 = 2564; + static const int kCFStringEncodingHZ_GB_2312 = 2565; + static const int kCFStringEncodingBig5_HKSCS_1999 = 2566; + static const int kCFStringEncodingVISCII = 2567; + static const int kCFStringEncodingKOI8_U = 2568; + static const int kCFStringEncodingBig5_E = 2569; + static const int kCFStringEncodingNextStepJapanese = 2818; + static const int kCFStringEncodingEBCDIC_US = 3073; + static const int kCFStringEncodingEBCDIC_CP037 = 3074; + static const int kCFStringEncodingUTF7 = 67109120; + static const int kCFStringEncodingUTF7_IMAP = 2576; + static const int kCFStringEncodingShiftJIS_X0213_00 = 1576; +} + +class CFTreeContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external CFTreeRetainCallBack retain; + + external CFTreeReleaseCallBack release; + + external CFTreeCopyDescriptionCallBack copyDescription; +} + +typedef CFTreeRetainCallBack = ffi.Pointer< + ffi.NativeFunction Function(ffi.Pointer)>>; +typedef CFTreeReleaseCallBack + = ffi.Pointer)>>; +typedef CFTreeCopyDescriptionCallBack = ffi + .Pointer)>>; + +class __CFTree extends ffi.Opaque {} + +typedef CFTreeRef = ffi.Pointer<__CFTree>; +typedef CFTreeApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + +abstract class CFURLError { + static const int kCFURLUnknownError = -10; + static const int kCFURLUnknownSchemeError = -11; + static const int kCFURLResourceNotFoundError = -12; + static const int kCFURLResourceAccessViolationError = -13; + static const int kCFURLRemoteHostUnavailableError = -14; + static const int kCFURLImproperArgumentsError = -15; + static const int kCFURLUnknownPropertyKeyError = -16; + static const int kCFURLPropertyKeyUnavailableError = -17; + static const int kCFURLTimeoutError = -18; +} + +class __CFUUID extends ffi.Opaque {} + +class CFUUIDBytes extends ffi.Struct { + @UInt8() + external int byte0; + + @UInt8() + external int byte1; + + @UInt8() + external int byte2; + + @UInt8() + external int byte3; + + @UInt8() + external int byte4; + + @UInt8() + external int byte5; + + @UInt8() + external int byte6; + + @UInt8() + external int byte7; + + @UInt8() + external int byte8; + + @UInt8() + external int byte9; + + @UInt8() + external int byte10; + + @UInt8() + external int byte11; + + @UInt8() + external int byte12; + + @UInt8() + external int byte13; + + @UInt8() + external int byte14; + + @UInt8() + external int byte15; +} + +typedef CFUUIDRef = ffi.Pointer<__CFUUID>; + +class __CFBundle extends ffi.Opaque {} + +typedef CFBundleRef = ffi.Pointer<__CFBundle>; +typedef cpu_type_t = integer_t; +typedef CFPlugInRef = ffi.Pointer<__CFBundle>; +typedef CFBundleRefNum = ffi.Int; + +class __CFMessagePort extends ffi.Opaque {} + +class CFMessagePortContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; + + external ffi + .Pointer)>> + release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; +} + +typedef CFMessagePortRef = ffi.Pointer<__CFMessagePort>; +typedef CFMessagePortCallBack = ffi.Pointer< + ffi.NativeFunction< + CFDataRef Function( + CFMessagePortRef, SInt32, CFDataRef, ffi.Pointer)>>; +typedef CFMessagePortInvalidationCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFMessagePortRef, ffi.Pointer)>>; +typedef CFPlugInFactoryFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFAllocatorRef, CFUUIDRef)>>; + +class __CFPlugInInstance extends ffi.Opaque {} + +typedef CFPlugInInstanceRef = ffi.Pointer<__CFPlugInInstance>; +typedef CFPlugInInstanceDeallocateInstanceDataFunction + = ffi.Pointer)>>; +typedef CFPlugInInstanceGetInterfaceFunction = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(CFPlugInInstanceRef, CFStringRef, + ffi.Pointer>)>>; + +class __CFMachPort extends ffi.Opaque {} + +class CFMachPortContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; + + external ffi + .Pointer)>> + release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; +} + +typedef CFMachPortRef = ffi.Pointer<__CFMachPort>; +typedef CFMachPortCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFMachPortRef, ffi.Pointer, CFIndex, + ffi.Pointer)>>; +typedef CFMachPortInvalidationCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFMachPortRef, ffi.Pointer)>>; + +class __CFAttributedString extends ffi.Opaque {} + +typedef CFAttributedStringRef = ffi.Pointer<__CFAttributedString>; +typedef CFMutableAttributedStringRef = ffi.Pointer<__CFAttributedString>; + +class __CFURLEnumerator extends ffi.Opaque {} + +abstract class CFURLEnumeratorOptions { + static const int kCFURLEnumeratorDefaultBehavior = 0; + static const int kCFURLEnumeratorDescendRecursively = 1; + static const int kCFURLEnumeratorSkipInvisibles = 2; + static const int kCFURLEnumeratorGenerateFileReferenceURLs = 4; + static const int kCFURLEnumeratorSkipPackageContents = 8; + static const int kCFURLEnumeratorIncludeDirectoriesPreOrder = 16; + static const int kCFURLEnumeratorIncludeDirectoriesPostOrder = 32; + static const int kCFURLEnumeratorGenerateRelativePathURLs = 64; +} + +typedef CFURLEnumeratorRef = ffi.Pointer<__CFURLEnumerator>; + +abstract class CFURLEnumeratorResult { + static const int kCFURLEnumeratorSuccess = 1; + static const int kCFURLEnumeratorEnd = 2; + static const int kCFURLEnumeratorError = 3; + static const int kCFURLEnumeratorDirectoryPostOrderSuccess = 4; +} + +class guid_t extends ffi.Union { + @ffi.Array.multi([16]) + external ffi.Array g_guid; + + @ffi.Array.multi([4]) + external ffi.Array g_guid_asint; +} + +@ffi.Packed(1) +class ntsid_t extends ffi.Struct { + @u_int8_t() + external int sid_kind; + + @u_int8_t() + external int sid_authcount; + + @ffi.Array.multi([6]) + external ffi.Array sid_authority; + + @ffi.Array.multi([16]) + external ffi.Array sid_authorities; +} + +typedef u_int8_t = ffi.UnsignedChar; +typedef u_int32_t = ffi.UnsignedInt; + +class kauth_identity_extlookup extends ffi.Struct { + @u_int32_t() + external int el_seqno; + + @u_int32_t() + external int el_result; + + @u_int32_t() + external int el_flags; + + @__darwin_pid_t() + external int el_info_pid; + + @u_int64_t() + external int el_extend; + + @u_int32_t() + external int el_info_reserved_1; + + @uid_t() + external int el_uid; + + external guid_t el_uguid; + + @u_int32_t() + external int el_uguid_valid; + + external ntsid_t el_usid; + + @u_int32_t() + external int el_usid_valid; + + @gid_t() + external int el_gid; + + external guid_t el_gguid; + + @u_int32_t() + external int el_gguid_valid; + + external ntsid_t el_gsid; + + @u_int32_t() + external int el_gsid_valid; + + @u_int32_t() + external int el_member_valid; + + @u_int32_t() + external int el_sup_grp_cnt; + + @ffi.Array.multi([16]) + external ffi.Array el_sup_groups; +} + +typedef u_int64_t = ffi.UnsignedLongLong; + +class kauth_cache_sizes extends ffi.Struct { + @u_int32_t() + external int kcs_group_size; + + @u_int32_t() + external int kcs_id_size; +} + +class kauth_ace extends ffi.Struct { + external guid_t ace_applicable; + + @u_int32_t() + external int ace_flags; + + @kauth_ace_rights_t() + external int ace_rights; +} + +typedef kauth_ace_rights_t = u_int32_t; + +class kauth_acl extends ffi.Struct { + @u_int32_t() + external int acl_entrycount; + + @u_int32_t() + external int acl_flags; + + @ffi.Array.multi([1]) + external ffi.Array acl_ace; +} + +class kauth_filesec extends ffi.Struct { + @u_int32_t() + external int fsec_magic; + + external guid_t fsec_owner; + + external guid_t fsec_group; + + external kauth_acl fsec_acl; +} + +abstract class acl_perm_t { + static const int ACL_READ_DATA = 2; + static const int ACL_LIST_DIRECTORY = 2; + static const int ACL_WRITE_DATA = 4; + static const int ACL_ADD_FILE = 4; + static const int ACL_EXECUTE = 8; + static const int ACL_SEARCH = 8; + static const int ACL_DELETE = 16; + static const int ACL_APPEND_DATA = 32; + static const int ACL_ADD_SUBDIRECTORY = 32; + static const int ACL_DELETE_CHILD = 64; + static const int ACL_READ_ATTRIBUTES = 128; + static const int ACL_WRITE_ATTRIBUTES = 256; + static const int ACL_READ_EXTATTRIBUTES = 512; + static const int ACL_WRITE_EXTATTRIBUTES = 1024; + static const int ACL_READ_SECURITY = 2048; + static const int ACL_WRITE_SECURITY = 4096; + static const int ACL_CHANGE_OWNER = 8192; + static const int ACL_SYNCHRONIZE = 1048576; +} + +abstract class acl_tag_t { + static const int ACL_UNDEFINED_TAG = 0; + static const int ACL_EXTENDED_ALLOW = 1; + static const int ACL_EXTENDED_DENY = 2; +} + +abstract class acl_type_t { + static const int ACL_TYPE_EXTENDED = 256; + static const int ACL_TYPE_ACCESS = 0; + static const int ACL_TYPE_DEFAULT = 1; + static const int ACL_TYPE_AFS = 2; + static const int ACL_TYPE_CODA = 3; + static const int ACL_TYPE_NTFS = 4; + static const int ACL_TYPE_NWFS = 5; +} + +abstract class acl_entry_id_t { + static const int ACL_FIRST_ENTRY = 0; + static const int ACL_NEXT_ENTRY = -1; + static const int ACL_LAST_ENTRY = -2; +} + +abstract class acl_flag_t { + static const int ACL_FLAG_DEFER_INHERIT = 1; + static const int ACL_FLAG_NO_INHERIT = 131072; + static const int ACL_ENTRY_INHERITED = 16; + static const int ACL_ENTRY_FILE_INHERIT = 32; + static const int ACL_ENTRY_DIRECTORY_INHERIT = 64; + static const int ACL_ENTRY_LIMIT_INHERIT = 128; + static const int ACL_ENTRY_ONLY_INHERIT = 256; +} + +class _acl extends ffi.Opaque {} + +class _acl_entry extends ffi.Opaque {} + +class _acl_permset extends ffi.Opaque {} + +class _acl_flagset extends ffi.Opaque {} + +typedef acl_t = ffi.Pointer<_acl>; +typedef acl_entry_t = ffi.Pointer<_acl_entry>; +typedef acl_permset_t = ffi.Pointer<_acl_permset>; +typedef acl_permset_mask_t = u_int64_t; +typedef acl_flagset_t = ffi.Pointer<_acl_flagset>; + +class __CFFileSecurity extends ffi.Opaque {} + +typedef CFFileSecurityRef = ffi.Pointer<__CFFileSecurity>; + +abstract class CFFileSecurityClearOptions { + static const int kCFFileSecurityClearOwner = 1; + static const int kCFFileSecurityClearGroup = 2; + static const int kCFFileSecurityClearMode = 4; + static const int kCFFileSecurityClearOwnerUUID = 8; + static const int kCFFileSecurityClearGroupUUID = 16; + static const int kCFFileSecurityClearAccessControlList = 32; +} + +class __CFStringTokenizer extends ffi.Opaque {} + +abstract class CFStringTokenizerTokenType { + static const int kCFStringTokenizerTokenNone = 0; + static const int kCFStringTokenizerTokenNormal = 1; + static const int kCFStringTokenizerTokenHasSubTokensMask = 2; + static const int kCFStringTokenizerTokenHasDerivedSubTokensMask = 4; + static const int kCFStringTokenizerTokenHasHasNumbersMask = 8; + static const int kCFStringTokenizerTokenHasNonLettersMask = 16; + static const int kCFStringTokenizerTokenIsCJWordMask = 32; +} + +typedef CFStringTokenizerRef = ffi.Pointer<__CFStringTokenizer>; + +class __CFFileDescriptor extends ffi.Opaque {} + +class CFFileDescriptorContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; + + external ffi + .Pointer)>> + release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; +} + +typedef CFFileDescriptorRef = ffi.Pointer<__CFFileDescriptor>; +typedef CFFileDescriptorNativeDescriptor = ffi.Int; +typedef CFFileDescriptorCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFFileDescriptorRef, CFOptionFlags, ffi.Pointer)>>; + +class __CFUserNotification extends ffi.Opaque {} + +typedef CFUserNotificationRef = ffi.Pointer<__CFUserNotification>; +typedef CFUserNotificationCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFUserNotificationRef, CFOptionFlags)>>; + +class __CFXMLNode extends ffi.Opaque {} + +abstract class CFXMLNodeTypeCode { + static const int kCFXMLNodeTypeDocument = 1; + static const int kCFXMLNodeTypeElement = 2; + static const int kCFXMLNodeTypeAttribute = 3; + static const int kCFXMLNodeTypeProcessingInstruction = 4; + static const int kCFXMLNodeTypeComment = 5; + static const int kCFXMLNodeTypeText = 6; + static const int kCFXMLNodeTypeCDATASection = 7; + static const int kCFXMLNodeTypeDocumentFragment = 8; + static const int kCFXMLNodeTypeEntity = 9; + static const int kCFXMLNodeTypeEntityReference = 10; + static const int kCFXMLNodeTypeDocumentType = 11; + static const int kCFXMLNodeTypeWhitespace = 12; + static const int kCFXMLNodeTypeNotation = 13; + static const int kCFXMLNodeTypeElementTypeDeclaration = 14; + static const int kCFXMLNodeTypeAttributeListDeclaration = 15; +} + +class CFXMLElementInfo extends ffi.Struct { + external CFDictionaryRef attributes; + + external CFArrayRef attributeOrder; + + @Boolean() + external int isEmpty; + + @ffi.Array.multi([3]) + external ffi.Array _reserved; +} + +class CFXMLProcessingInstructionInfo extends ffi.Struct { + external CFStringRef dataString; +} + +class CFXMLDocumentInfo extends ffi.Struct { + external CFURLRef sourceURL; + + @CFStringEncoding() + external int encoding; +} + +class CFXMLExternalID extends ffi.Struct { + external CFURLRef systemID; + + external CFStringRef publicID; +} + +class CFXMLDocumentTypeInfo extends ffi.Struct { + external CFXMLExternalID externalID; +} + +class CFXMLNotationInfo extends ffi.Struct { + external CFXMLExternalID externalID; +} + +class CFXMLElementTypeDeclarationInfo extends ffi.Struct { + external CFStringRef contentDescription; +} + +class CFXMLAttributeDeclarationInfo extends ffi.Struct { + external CFStringRef attributeName; + + external CFStringRef typeString; + + external CFStringRef defaultString; +} + +class CFXMLAttributeListDeclarationInfo extends ffi.Struct { + @CFIndex() + external int numberOfAttributes; + + external ffi.Pointer attributes; +} + +abstract class CFXMLEntityTypeCode { + static const int kCFXMLEntityTypeParameter = 0; + static const int kCFXMLEntityTypeParsedInternal = 1; + static const int kCFXMLEntityTypeParsedExternal = 2; + static const int kCFXMLEntityTypeUnparsed = 3; + static const int kCFXMLEntityTypeCharacter = 4; +} + +class CFXMLEntityInfo extends ffi.Struct { + @ffi.Int32() + external int entityType; + + external CFStringRef replacementText; + + external CFXMLExternalID entityID; + + external CFStringRef notationName; +} + +class CFXMLEntityReferenceInfo extends ffi.Struct { + @ffi.Int32() + external int entityType; +} + +typedef CFXMLNodeRef = ffi.Pointer<__CFXMLNode>; +typedef CFXMLTreeRef = CFTreeRef; + +class __CFXMLParser extends ffi.Opaque {} + +abstract class CFXMLParserOptions { + static const int kCFXMLParserValidateDocument = 1; + static const int kCFXMLParserSkipMetaData = 2; + static const int kCFXMLParserReplacePhysicalEntities = 4; + static const int kCFXMLParserSkipWhitespace = 8; + static const int kCFXMLParserResolveExternalEntities = 16; + static const int kCFXMLParserAddImpliedAttributes = 32; + static const int kCFXMLParserAllOptions = 16777215; + static const int kCFXMLParserNoOptions = 0; +} + +abstract class CFXMLParserStatusCode { + static const int kCFXMLStatusParseNotBegun = -2; + static const int kCFXMLStatusParseInProgress = -1; + static const int kCFXMLStatusParseSuccessful = 0; + static const int kCFXMLErrorUnexpectedEOF = 1; + static const int kCFXMLErrorUnknownEncoding = 2; + static const int kCFXMLErrorEncodingConversionFailure = 3; + static const int kCFXMLErrorMalformedProcessingInstruction = 4; + static const int kCFXMLErrorMalformedDTD = 5; + static const int kCFXMLErrorMalformedName = 6; + static const int kCFXMLErrorMalformedCDSect = 7; + static const int kCFXMLErrorMalformedCloseTag = 8; + static const int kCFXMLErrorMalformedStartTag = 9; + static const int kCFXMLErrorMalformedDocument = 10; + static const int kCFXMLErrorElementlessDocument = 11; + static const int kCFXMLErrorMalformedComment = 12; + static const int kCFXMLErrorMalformedCharacterReference = 13; + static const int kCFXMLErrorMalformedParsedCharacterData = 14; + static const int kCFXMLErrorNoData = 15; +} + +class CFXMLParserCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external CFXMLParserCreateXMLStructureCallBack createXMLStructure; + + external CFXMLParserAddChildCallBack addChild; + + external CFXMLParserEndXMLStructureCallBack endXMLStructure; + + external CFXMLParserResolveExternalEntityCallBack resolveExternalEntity; + + external CFXMLParserHandleErrorCallBack handleError; +} + +typedef CFXMLParserCreateXMLStructureCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFXMLParserRef, CFXMLNodeRef, ffi.Pointer)>>; +typedef CFXMLParserRef = ffi.Pointer<__CFXMLParser>; +typedef CFXMLParserAddChildCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFXMLParserRef, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>; +typedef CFXMLParserEndXMLStructureCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFXMLParserRef, ffi.Pointer, ffi.Pointer)>>; +typedef CFXMLParserResolveExternalEntityCallBack = ffi.Pointer< + ffi.NativeFunction< + CFDataRef Function(CFXMLParserRef, ffi.Pointer, + ffi.Pointer)>>; +typedef CFXMLParserHandleErrorCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(CFXMLParserRef, ffi.Int32, ffi.Pointer)>>; + +class CFXMLParserContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external CFXMLParserRetainCallBack retain; + + external CFXMLParserReleaseCallBack release; + + external CFXMLParserCopyDescriptionCallBack copyDescription; +} + +typedef CFXMLParserRetainCallBack = ffi.Pointer< + ffi.NativeFunction Function(ffi.Pointer)>>; +typedef CFXMLParserReleaseCallBack + = ffi.Pointer)>>; +typedef CFXMLParserCopyDescriptionCallBack = ffi + .Pointer)>>; + +abstract class SecTrustResultType { + static const int kSecTrustResultInvalid = 0; + static const int kSecTrustResultProceed = 1; + static const int kSecTrustResultConfirm = 2; + static const int kSecTrustResultDeny = 3; + static const int kSecTrustResultUnspecified = 4; + static const int kSecTrustResultRecoverableTrustFailure = 5; + static const int kSecTrustResultFatalTrustFailure = 6; + static const int kSecTrustResultOtherError = 7; +} + +class __SecTrust extends ffi.Opaque {} + +typedef SecTrustRef = ffi.Pointer<__SecTrust>; +typedef SecTrustCallback = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock28_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>>() + .asFunction()(arg0, arg1); +} + +final _ObjCBlock28_closureRegistry = {}; +int _ObjCBlock28_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock28_registerClosure(Function fn) { + final id = ++_ObjCBlock28_closureRegistryIndex; + _ObjCBlock28_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock28_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { + return _ObjCBlock28_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock28 extends _ObjCBlockBase { + ObjCBlock28._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock28.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>> + ptr) + : this._( + lib + ._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + ffi.Int32 arg1)>(_ObjCBlock28_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock28.fromFunction( + NativeCupertinoHttp lib, void Function(SecTrustRef arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + ffi.Int32 arg1)>(_ObjCBlock28_closureTrampoline) + .cast(), + _ObjCBlock28_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(SecTrustRef arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, ffi.Int32 arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, + int arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef SecTrustWithErrorCallback = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock29_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, bool arg1, CFErrorRef arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() + .asFunction< + void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2)>()( + arg0, arg1, arg2); +} + +final _ObjCBlock29_closureRegistry = {}; +int _ObjCBlock29_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock29_registerClosure(Function fn) { + final id = ++_ObjCBlock29_closureRegistryIndex; + _ObjCBlock29_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock29_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, bool arg1, CFErrorRef arg2) { + return _ObjCBlock29_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock29 extends _ObjCBlockBase { + ObjCBlock29._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock29.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + ffi.Bool arg1, + CFErrorRef arg2)>(_ObjCBlock29_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock29.fromFunction(NativeCupertinoHttp lib, + void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + ffi.Bool arg1, + CFErrorRef arg2)>(_ObjCBlock29_closureTrampoline) + .cast(), + _ObjCBlock29_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(SecTrustRef arg0, bool arg1, CFErrorRef arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, + bool arg1, CFErrorRef arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef SecKeyRef = ffi.Pointer<__SecKey>; +typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; + +class cssm_data extends ffi.Struct { + @ffi.Size() + external int Length; + + external ffi.Pointer Data; +} + +class SecAsn1AlgId extends ffi.Struct { + external SecAsn1Oid algorithm; + + external SecAsn1Item parameters; +} + +typedef SecAsn1Oid = cssm_data; +typedef SecAsn1Item = cssm_data; + +class SecAsn1PubKeyInfo extends ffi.Struct { + external SecAsn1AlgId algorithm; + + external SecAsn1Item subjectPublicKey; +} + +class SecAsn1Template_struct extends ffi.Struct { + @ffi.Uint32() + external int kind; + + @ffi.Uint32() + external int offset; + + external ffi.Pointer sub; + + @ffi.Uint32() + external int size; +} + +class cssm_guid extends ffi.Struct { + @uint32() + external int Data1; + + @uint16() + external int Data2; + + @uint16() + external int Data3; + + @ffi.Array.multi([8]) + external ffi.Array Data4; +} + +typedef uint32 = ffi.Uint32; +typedef uint16 = ffi.Uint16; +typedef uint8 = ffi.Uint8; + +class cssm_version extends ffi.Struct { + @uint32() + external int Major; + + @uint32() + external int Minor; +} + +class cssm_subservice_uid extends ffi.Struct { + external CSSM_GUID Guid; + + external CSSM_VERSION Version; + + @uint32() + external int SubserviceId; + + @CSSM_SERVICE_TYPE() + external int SubserviceType; +} + +typedef CSSM_GUID = cssm_guid; +typedef CSSM_VERSION = cssm_version; +typedef CSSM_SERVICE_TYPE = CSSM_SERVICE_MASK; +typedef CSSM_SERVICE_MASK = uint32; + +class cssm_net_address extends ffi.Struct { + @CSSM_NET_ADDRESS_TYPE() + external int AddressType; + + external SecAsn1Item Address; +} + +typedef CSSM_NET_ADDRESS_TYPE = uint32; + +class cssm_crypto_data extends ffi.Struct { + external SecAsn1Item Param; + + external CSSM_CALLBACK Callback; + + external ffi.Pointer CallerCtx; +} + +typedef CSSM_CALLBACK = ffi.Pointer< + ffi.NativeFunction< + CSSM_RETURN Function(CSSM_DATA_PTR, ffi.Pointer)>>; +typedef CSSM_RETURN = sint32; +typedef sint32 = ffi.Int32; +typedef CSSM_DATA_PTR = ffi.Pointer; + +class cssm_list_element extends ffi.Struct { + external ffi.Pointer NextElement; + + @CSSM_WORDID_TYPE() + external int WordID; + + @CSSM_LIST_ELEMENT_TYPE() + external int ElementType; + + external UnnamedUnion1 Element; +} + +typedef CSSM_WORDID_TYPE = sint32; +typedef CSSM_LIST_ELEMENT_TYPE = uint32; + +class UnnamedUnion1 extends ffi.Union { + external CSSM_LIST Sublist; + + external SecAsn1Item Word; +} + +typedef CSSM_LIST = cssm_list; + +class cssm_list extends ffi.Struct { + @CSSM_LIST_TYPE() + external int ListType; + + external CSSM_LIST_ELEMENT_PTR Head; + + external CSSM_LIST_ELEMENT_PTR Tail; +} + +typedef CSSM_LIST_TYPE = uint32; +typedef CSSM_LIST_ELEMENT_PTR = ffi.Pointer; + +class CSSM_TUPLE extends ffi.Struct { + external CSSM_LIST Issuer; + + external CSSM_LIST Subject; + + @CSSM_BOOL() + external int Delegate; + + external CSSM_LIST AuthorizationTag; + + external CSSM_LIST ValidityPeriod; +} + +typedef CSSM_BOOL = sint32; + +class cssm_tuplegroup extends ffi.Struct { + @uint32() + external int NumberOfTuples; + + external CSSM_TUPLE_PTR Tuples; +} + +typedef CSSM_TUPLE_PTR = ffi.Pointer; + +class cssm_sample extends ffi.Struct { + external CSSM_LIST TypedSample; + + external ffi.Pointer Verifier; +} + +typedef CSSM_SUBSERVICE_UID = cssm_subservice_uid; + +class cssm_samplegroup extends ffi.Struct { + @uint32() + external int NumberOfSamples; + + external ffi.Pointer Samples; +} + +typedef CSSM_SAMPLE = cssm_sample; + +class cssm_memory_funcs extends ffi.Struct { + external CSSM_MALLOC malloc_func; + + external CSSM_FREE free_func; + + external CSSM_REALLOC realloc_func; + + external CSSM_CALLOC calloc_func; + + external ffi.Pointer AllocRef; +} + +typedef CSSM_MALLOC = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CSSM_SIZE, ffi.Pointer)>>; +typedef CSSM_SIZE = ffi.Size; +typedef CSSM_FREE = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +typedef CSSM_REALLOC = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, CSSM_SIZE, ffi.Pointer)>>; +typedef CSSM_CALLOC = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + uint32, CSSM_SIZE, ffi.Pointer)>>; + +class cssm_encoded_cert extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; + + @CSSM_CERT_ENCODING() + external int CertEncoding; + + external SecAsn1Item CertBlob; +} + +typedef CSSM_CERT_TYPE = uint32; +typedef CSSM_CERT_ENCODING = uint32; + +class cssm_parsed_cert extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; + + @CSSM_CERT_PARSE_FORMAT() + external int ParsedCertFormat; + + external ffi.Pointer ParsedCert; +} + +typedef CSSM_CERT_PARSE_FORMAT = uint32; + +class cssm_cert_pair extends ffi.Struct { + external CSSM_ENCODED_CERT EncodedCert; + + external CSSM_PARSED_CERT ParsedCert; +} + +typedef CSSM_ENCODED_CERT = cssm_encoded_cert; +typedef CSSM_PARSED_CERT = cssm_parsed_cert; + +class cssm_certgroup extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; + + @CSSM_CERT_ENCODING() + external int CertEncoding; + + @uint32() + external int NumCerts; + + external UnnamedUnion2 GroupList; + + @CSSM_CERTGROUP_TYPE() + external int CertGroupType; + + external ffi.Pointer Reserved; +} + +class UnnamedUnion2 extends ffi.Union { + external CSSM_DATA_PTR CertList; + + external CSSM_ENCODED_CERT_PTR EncodedCertList; + + external CSSM_PARSED_CERT_PTR ParsedCertList; + + external CSSM_CERT_PAIR_PTR PairCertList; +} + +typedef CSSM_ENCODED_CERT_PTR = ffi.Pointer; +typedef CSSM_PARSED_CERT_PTR = ffi.Pointer; +typedef CSSM_CERT_PAIR_PTR = ffi.Pointer; +typedef CSSM_CERTGROUP_TYPE = uint32; + +class cssm_base_certs extends ffi.Struct { + @CSSM_TP_HANDLE() + external int TPHandle; + + @CSSM_CL_HANDLE() + external int CLHandle; + + external CSSM_CERTGROUP Certs; +} + +typedef CSSM_TP_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_MODULE_HANDLE = CSSM_HANDLE; +typedef CSSM_HANDLE = CSSM_INTPTR; +typedef CSSM_INTPTR = ffi.IntPtr; +typedef CSSM_CL_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_CERTGROUP = cssm_certgroup; + +class cssm_access_credentials extends ffi.Struct { + @ffi.Array.multi([68]) + external ffi.Array EntryTag; + + external CSSM_BASE_CERTS BaseCerts; + + external CSSM_SAMPLEGROUP Samples; + + external CSSM_CHALLENGE_CALLBACK Callback; + + external ffi.Pointer CallerCtx; +} + +typedef CSSM_BASE_CERTS = cssm_base_certs; +typedef CSSM_SAMPLEGROUP = cssm_samplegroup; +typedef CSSM_CHALLENGE_CALLBACK = ffi.Pointer< + ffi.NativeFunction< + CSSM_RETURN Function(ffi.Pointer, CSSM_SAMPLEGROUP_PTR, + ffi.Pointer, ffi.Pointer)>>; +typedef CSSM_SAMPLEGROUP_PTR = ffi.Pointer; +typedef CSSM_MEMORY_FUNCS = cssm_memory_funcs; + +class cssm_authorizationgroup extends ffi.Struct { + @uint32() + external int NumberOfAuthTags; + + external ffi.Pointer AuthTags; +} + +typedef CSSM_ACL_AUTHORIZATION_TAG = sint32; + +class cssm_acl_validity_period extends ffi.Struct { + external SecAsn1Item StartDate; + + external SecAsn1Item EndDate; +} + +class cssm_acl_entry_prototype extends ffi.Struct { + external CSSM_LIST TypedSubject; + + @CSSM_BOOL() + external int Delegate; + + external CSSM_AUTHORIZATIONGROUP Authorization; + + external CSSM_ACL_VALIDITY_PERIOD TimeRange; + + @ffi.Array.multi([68]) + external ffi.Array EntryTag; +} + +typedef CSSM_AUTHORIZATIONGROUP = cssm_authorizationgroup; +typedef CSSM_ACL_VALIDITY_PERIOD = cssm_acl_validity_period; + +class cssm_acl_owner_prototype extends ffi.Struct { + external CSSM_LIST TypedSubject; + + @CSSM_BOOL() + external int Delegate; +} + +class cssm_acl_entry_input extends ffi.Struct { + external CSSM_ACL_ENTRY_PROTOTYPE Prototype; + + external CSSM_ACL_SUBJECT_CALLBACK Callback; + + external ffi.Pointer CallerContext; +} + +typedef CSSM_ACL_ENTRY_PROTOTYPE = cssm_acl_entry_prototype; +typedef CSSM_ACL_SUBJECT_CALLBACK = ffi.Pointer< + ffi.NativeFunction< + CSSM_RETURN Function(ffi.Pointer, CSSM_LIST_PTR, + ffi.Pointer, ffi.Pointer)>>; +typedef CSSM_LIST_PTR = ffi.Pointer; + +class cssm_resource_control_context extends ffi.Struct { + external CSSM_ACCESS_CREDENTIALS_PTR AccessCred; + + external CSSM_ACL_ENTRY_INPUT InitialAclEntry; +} + +typedef CSSM_ACCESS_CREDENTIALS_PTR = ffi.Pointer; +typedef CSSM_ACL_ENTRY_INPUT = cssm_acl_entry_input; + +class cssm_acl_entry_info extends ffi.Struct { + external CSSM_ACL_ENTRY_PROTOTYPE EntryPublicInfo; + + @CSSM_ACL_HANDLE() + external int EntryHandle; +} + +typedef CSSM_ACL_HANDLE = CSSM_HANDLE; + +class cssm_acl_edit extends ffi.Struct { + @CSSM_ACL_EDIT_MODE() + external int EditMode; + + @CSSM_ACL_HANDLE() + external int OldEntryHandle; + + external ffi.Pointer NewEntry; +} + +typedef CSSM_ACL_EDIT_MODE = uint32; + +class cssm_func_name_addr extends ffi.Struct { + @ffi.Array.multi([68]) + external ffi.Array Name; + + external CSSM_PROC_ADDR Address; +} + +typedef CSSM_PROC_ADDR = ffi.Pointer>; + +class cssm_date extends ffi.Struct { + @ffi.Array.multi([4]) + external ffi.Array Year; + + @ffi.Array.multi([2]) + external ffi.Array Month; + + @ffi.Array.multi([2]) + external ffi.Array Day; +} + +class cssm_range extends ffi.Struct { + @uint32() + external int Min; + + @uint32() + external int Max; +} + +class cssm_query_size_data extends ffi.Struct { + @uint32() + external int SizeInputBlock; + + @uint32() + external int SizeOutputBlock; +} + +class cssm_key_size extends ffi.Struct { + @uint32() + external int LogicalKeySizeInBits; + + @uint32() + external int EffectiveKeySizeInBits; +} + +class cssm_keyheader extends ffi.Struct { + @CSSM_HEADERVERSION() + external int HeaderVersion; + + external CSSM_GUID CspId; + + @CSSM_KEYBLOB_TYPE() + external int BlobType; + + @CSSM_KEYBLOB_FORMAT() + external int Format; + + @CSSM_ALGORITHMS() + external int AlgorithmId; + + @CSSM_KEYCLASS() + external int KeyClass; + + @uint32() + external int LogicalKeySizeInBits; + + @CSSM_KEYATTR_FLAGS() + external int KeyAttr; + + @CSSM_KEYUSE() + external int KeyUsage; + + external CSSM_DATE StartDate; + + external CSSM_DATE EndDate; + + @CSSM_ALGORITHMS() + external int WrapAlgorithmId; + + @CSSM_ENCRYPT_MODE() + external int WrapMode; + + @uint32() + external int Reserved; +} + +typedef CSSM_HEADERVERSION = uint32; +typedef CSSM_KEYBLOB_TYPE = uint32; +typedef CSSM_KEYBLOB_FORMAT = uint32; +typedef CSSM_ALGORITHMS = uint32; +typedef CSSM_KEYCLASS = uint32; +typedef CSSM_KEYATTR_FLAGS = uint32; +typedef CSSM_KEYUSE = uint32; +typedef CSSM_DATE = cssm_date; +typedef CSSM_ENCRYPT_MODE = uint32; + +class cssm_key extends ffi.Struct { + external CSSM_KEYHEADER KeyHeader; + + external SecAsn1Item KeyData; +} + +typedef CSSM_KEYHEADER = cssm_keyheader; + +class cssm_dl_db_handle extends ffi.Struct { + @CSSM_DL_HANDLE() + external int DLHandle; + + @CSSM_DB_HANDLE() + external int DBHandle; +} + +typedef CSSM_DL_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_DB_HANDLE = CSSM_MODULE_HANDLE; + +class cssm_context_attribute extends ffi.Struct { + @CSSM_ATTRIBUTE_TYPE() + external int AttributeType; + + @uint32() + external int AttributeLength; + + external cssm_context_attribute_value Attribute; +} + +typedef CSSM_ATTRIBUTE_TYPE = uint32; + +class cssm_context_attribute_value extends ffi.Union { + external ffi.Pointer String; + + @uint32() + external int Uint32; + + external CSSM_ACCESS_CREDENTIALS_PTR AccessCredentials; + + external CSSM_KEY_PTR Key; + + external CSSM_DATA_PTR Data; + + @CSSM_PADDING() + external int Padding; + + external CSSM_DATE_PTR Date; + + external CSSM_RANGE_PTR Range; + + external CSSM_CRYPTO_DATA_PTR CryptoData; + + external CSSM_VERSION_PTR Version; + + external CSSM_DL_DB_HANDLE_PTR DLDBHandle; + + external ffi.Pointer KRProfile; +} + +typedef CSSM_KEY_PTR = ffi.Pointer; +typedef CSSM_PADDING = uint32; +typedef CSSM_DATE_PTR = ffi.Pointer; +typedef CSSM_RANGE_PTR = ffi.Pointer; +typedef CSSM_CRYPTO_DATA_PTR = ffi.Pointer; +typedef CSSM_VERSION_PTR = ffi.Pointer; +typedef CSSM_DL_DB_HANDLE_PTR = ffi.Pointer; + +class cssm_kr_profile extends ffi.Opaque {} + +class cssm_context extends ffi.Struct { + @CSSM_CONTEXT_TYPE() + external int ContextType; + + @CSSM_ALGORITHMS() + external int AlgorithmType; + + @uint32() + external int NumberOfAttributes; + + external CSSM_CONTEXT_ATTRIBUTE_PTR ContextAttributes; + + @CSSM_CSP_HANDLE() + external int CSPHandle; + + @CSSM_BOOL() + external int Privileged; + + @uint32() + external int EncryptionProhibited; + + @uint32() + external int WorkFactor; + + @uint32() + external int Reserved; +} + +typedef CSSM_CONTEXT_TYPE = uint32; +typedef CSSM_CONTEXT_ATTRIBUTE_PTR = ffi.Pointer; +typedef CSSM_CSP_HANDLE = CSSM_MODULE_HANDLE; + +class cssm_pkcs1_oaep_params extends ffi.Struct { + @uint32() + external int HashAlgorithm; + + external SecAsn1Item HashParams; + + @CSSM_PKCS_OAEP_MGF() + external int MGF; + + external SecAsn1Item MGFParams; + + @CSSM_PKCS_OAEP_PSOURCE() + external int PSource; + + external SecAsn1Item PSourceParams; +} + +typedef CSSM_PKCS_OAEP_MGF = uint32; +typedef CSSM_PKCS_OAEP_PSOURCE = uint32; + +class cssm_csp_operational_statistics extends ffi.Struct { + @CSSM_BOOL() + external int UserAuthenticated; + + @CSSM_CSP_FLAGS() + external int DeviceFlags; + + @uint32() + external int TokenMaxSessionCount; + + @uint32() + external int TokenOpenedSessionCount; + + @uint32() + external int TokenMaxRWSessionCount; + + @uint32() + external int TokenOpenedRWSessionCount; + + @uint32() + external int TokenTotalPublicMem; + + @uint32() + external int TokenFreePublicMem; + + @uint32() + external int TokenTotalPrivateMem; + + @uint32() + external int TokenFreePrivateMem; +} + +typedef CSSM_CSP_FLAGS = uint32; + +class cssm_pkcs5_pbkdf1_params extends ffi.Struct { + external SecAsn1Item Passphrase; + + external SecAsn1Item InitVector; +} + +class cssm_pkcs5_pbkdf2_params extends ffi.Struct { + external SecAsn1Item Passphrase; + + @CSSM_PKCS5_PBKDF2_PRF() + external int PseudoRandomFunction; +} + +typedef CSSM_PKCS5_PBKDF2_PRF = uint32; + +class cssm_kea_derive_params extends ffi.Struct { + external SecAsn1Item Rb; + + external SecAsn1Item Yb; +} + +class cssm_tp_authority_id extends ffi.Struct { + external ffi.Pointer AuthorityCert; + + external CSSM_NET_ADDRESS_PTR AuthorityLocation; +} + +typedef CSSM_NET_ADDRESS_PTR = ffi.Pointer; + +class cssm_field extends ffi.Struct { + external SecAsn1Oid FieldOid; + + external SecAsn1Item FieldValue; +} + +class cssm_tp_policyinfo extends ffi.Struct { + @uint32() + external int NumberOfPolicyIds; + + external CSSM_FIELD_PTR PolicyIds; + + external ffi.Pointer PolicyControl; +} + +typedef CSSM_FIELD_PTR = ffi.Pointer; + +class cssm_dl_db_list extends ffi.Struct { + @uint32() + external int NumHandles; + + external CSSM_DL_DB_HANDLE_PTR DLDBHandle; +} + +class cssm_tp_callerauth_context extends ffi.Struct { + external CSSM_TP_POLICYINFO Policy; + + external CSSM_TIMESTRING VerifyTime; + + @CSSM_TP_STOP_ON() + external int VerificationAbortOn; + + external CSSM_TP_VERIFICATION_RESULTS_CALLBACK CallbackWithVerifiedCert; + + @uint32() + external int NumberOfAnchorCerts; + + external CSSM_DATA_PTR AnchorCerts; + + external CSSM_DL_DB_LIST_PTR DBList; + + external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; +} + +typedef CSSM_TP_POLICYINFO = cssm_tp_policyinfo; +typedef CSSM_TIMESTRING = ffi.Pointer; +typedef CSSM_TP_STOP_ON = uint32; +typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACK = ffi.Pointer< + ffi.NativeFunction< + CSSM_RETURN Function( + CSSM_MODULE_HANDLE, ffi.Pointer, CSSM_DATA_PTR)>>; +typedef CSSM_DL_DB_LIST_PTR = ffi.Pointer; + +class cssm_encoded_crl extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; + + @CSSM_CRL_ENCODING() + external int CrlEncoding; + + external SecAsn1Item CrlBlob; +} + +typedef CSSM_CRL_TYPE = uint32; +typedef CSSM_CRL_ENCODING = uint32; + +class cssm_parsed_crl extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; + + @CSSM_CRL_PARSE_FORMAT() + external int ParsedCrlFormat; + + external ffi.Pointer ParsedCrl; +} + +typedef CSSM_CRL_PARSE_FORMAT = uint32; + +class cssm_crl_pair extends ffi.Struct { + external CSSM_ENCODED_CRL EncodedCrl; + + external CSSM_PARSED_CRL ParsedCrl; +} + +typedef CSSM_ENCODED_CRL = cssm_encoded_crl; +typedef CSSM_PARSED_CRL = cssm_parsed_crl; + +class cssm_crlgroup extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; + + @CSSM_CRL_ENCODING() + external int CrlEncoding; + + @uint32() + external int NumberOfCrls; + + external UnnamedUnion3 GroupCrlList; + + @CSSM_CRLGROUP_TYPE() + external int CrlGroupType; +} + +class UnnamedUnion3 extends ffi.Union { + external CSSM_DATA_PTR CrlList; + + external CSSM_ENCODED_CRL_PTR EncodedCrlList; + + external CSSM_PARSED_CRL_PTR ParsedCrlList; + + external CSSM_CRL_PAIR_PTR PairCrlList; +} + +typedef CSSM_ENCODED_CRL_PTR = ffi.Pointer; +typedef CSSM_PARSED_CRL_PTR = ffi.Pointer; +typedef CSSM_CRL_PAIR_PTR = ffi.Pointer; +typedef CSSM_CRLGROUP_TYPE = uint32; + +class cssm_fieldgroup extends ffi.Struct { + @ffi.Int() + external int NumberOfFields; + + external CSSM_FIELD_PTR Fields; +} + +class cssm_evidence extends ffi.Struct { + @CSSM_EVIDENCE_FORM() + external int EvidenceForm; + + external ffi.Pointer Evidence; +} + +typedef CSSM_EVIDENCE_FORM = uint32; + +class cssm_tp_verify_context extends ffi.Struct { + @CSSM_TP_ACTION() + external int Action; + + external SecAsn1Item ActionData; + + external CSSM_CRLGROUP Crls; + + external CSSM_TP_CALLERAUTH_CONTEXT_PTR Cred; +} + +typedef CSSM_TP_ACTION = uint32; +typedef CSSM_CRLGROUP = cssm_crlgroup; +typedef CSSM_TP_CALLERAUTH_CONTEXT_PTR + = ffi.Pointer; + +class cssm_tp_verify_context_result extends ffi.Struct { + @uint32() + external int NumberOfEvidences; + + external CSSM_EVIDENCE_PTR Evidence; +} + +typedef CSSM_EVIDENCE_PTR = ffi.Pointer; + +class cssm_tp_request_set extends ffi.Struct { + @uint32() + external int NumberOfRequests; + + external ffi.Pointer Requests; +} + +class cssm_tp_result_set extends ffi.Struct { + @uint32() + external int NumberOfResults; + + external ffi.Pointer Results; +} + +class cssm_tp_confirm_response extends ffi.Struct { + @uint32() + external int NumberOfResponses; + + external CSSM_TP_CONFIRM_STATUS_PTR Responses; +} + +typedef CSSM_TP_CONFIRM_STATUS_PTR = ffi.Pointer; + +class cssm_tp_certissue_input extends ffi.Struct { + external CSSM_SUBSERVICE_UID CSPSubserviceUid; + + @CSSM_CL_HANDLE() + external int CLHandle; + + @uint32() + external int NumberOfTemplateFields; + + external CSSM_FIELD_PTR SubjectCertFields; + + @CSSM_TP_SERVICES() + external int MoreServiceRequests; + + @uint32() + external int NumberOfServiceControls; + + external CSSM_FIELD_PTR ServiceControls; + + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; +} + +typedef CSSM_TP_SERVICES = uint32; + +class cssm_tp_certissue_output extends ffi.Struct { + @CSSM_TP_CERTISSUE_STATUS() + external int IssueStatus; + + external CSSM_CERTGROUP_PTR CertGroup; + + @CSSM_TP_SERVICES() + external int PerformedServiceRequests; +} + +typedef CSSM_TP_CERTISSUE_STATUS = uint32; +typedef CSSM_CERTGROUP_PTR = ffi.Pointer; + +class cssm_tp_certchange_input extends ffi.Struct { + @CSSM_TP_CERTCHANGE_ACTION() + external int Action; + + @CSSM_TP_CERTCHANGE_REASON() + external int Reason; + + @CSSM_CL_HANDLE() + external int CLHandle; + + external CSSM_DATA_PTR Cert; + + external CSSM_FIELD_PTR ChangeInfo; + + external CSSM_TIMESTRING StartTime; + + external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; +} + +typedef CSSM_TP_CERTCHANGE_ACTION = uint32; +typedef CSSM_TP_CERTCHANGE_REASON = uint32; + +class cssm_tp_certchange_output extends ffi.Struct { + @CSSM_TP_CERTCHANGE_STATUS() + external int ActionStatus; + + external CSSM_FIELD RevokeInfo; +} + +typedef CSSM_TP_CERTCHANGE_STATUS = uint32; +typedef CSSM_FIELD = cssm_field; + +class cssm_tp_certverify_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; + + external CSSM_DATA_PTR Cert; + + external CSSM_TP_VERIFY_CONTEXT_PTR VerifyContext; +} + +typedef CSSM_TP_VERIFY_CONTEXT_PTR = ffi.Pointer; + +class cssm_tp_certverify_output extends ffi.Struct { + @CSSM_TP_CERTVERIFY_STATUS() + external int VerifyStatus; + + @uint32() + external int NumberOfEvidence; + + external CSSM_EVIDENCE_PTR Evidence; +} + +typedef CSSM_TP_CERTVERIFY_STATUS = uint32; + +class cssm_tp_certnotarize_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; + + @uint32() + external int NumberOfFields; + + external CSSM_FIELD_PTR MoreFields; + + external CSSM_FIELD_PTR SignScope; + + @uint32() + external int ScopeSize; + + @CSSM_TP_SERVICES() + external int MoreServiceRequests; + + @uint32() + external int NumberOfServiceControls; + + external CSSM_FIELD_PTR ServiceControls; + + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; +} + +class cssm_tp_certnotarize_output extends ffi.Struct { + @CSSM_TP_CERTNOTARIZE_STATUS() + external int NotarizeStatus; + + external CSSM_CERTGROUP_PTR NotarizedCertGroup; + + @CSSM_TP_SERVICES() + external int PerformedServiceRequests; +} + +typedef CSSM_TP_CERTNOTARIZE_STATUS = uint32; + +class cssm_tp_certreclaim_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; + + @uint32() + external int NumberOfSelectionFields; + + external CSSM_FIELD_PTR SelectionFields; + + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; +} + +class cssm_tp_certreclaim_output extends ffi.Struct { + @CSSM_TP_CERTRECLAIM_STATUS() + external int ReclaimStatus; + + external CSSM_CERTGROUP_PTR ReclaimedCertGroup; + + @CSSM_LONG_HANDLE() + external int KeyCacheHandle; +} + +typedef CSSM_TP_CERTRECLAIM_STATUS = uint32; +typedef CSSM_LONG_HANDLE = uint64; +typedef uint64 = ffi.Uint64; + +class cssm_tp_crlissue_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; + + @uint32() + external int CrlIdentifier; + + external CSSM_TIMESTRING CrlThisTime; + + external CSSM_FIELD_PTR PolicyIdentifier; + + external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; +} + +class cssm_tp_crlissue_output extends ffi.Struct { + @CSSM_TP_CRLISSUE_STATUS() + external int IssueStatus; + + external CSSM_ENCODED_CRL_PTR Crl; + + external CSSM_TIMESTRING CrlNextTime; +} + +typedef CSSM_TP_CRLISSUE_STATUS = uint32; + +class cssm_cert_bundle_header extends ffi.Struct { + @CSSM_CERT_BUNDLE_TYPE() + external int BundleType; + + @CSSM_CERT_BUNDLE_ENCODING() + external int BundleEncoding; +} + +typedef CSSM_CERT_BUNDLE_TYPE = uint32; +typedef CSSM_CERT_BUNDLE_ENCODING = uint32; + +class cssm_cert_bundle extends ffi.Struct { + external CSSM_CERT_BUNDLE_HEADER BundleHeader; + + external SecAsn1Item Bundle; +} + +typedef CSSM_CERT_BUNDLE_HEADER = cssm_cert_bundle_header; + +class cssm_db_attribute_info extends ffi.Struct { + @CSSM_DB_ATTRIBUTE_NAME_FORMAT() + external int AttributeNameFormat; + + external cssm_db_attribute_label Label; + + @CSSM_DB_ATTRIBUTE_FORMAT() + external int AttributeFormat; +} + +typedef CSSM_DB_ATTRIBUTE_NAME_FORMAT = uint32; + +class cssm_db_attribute_label extends ffi.Union { + external ffi.Pointer AttributeName; + + external SecAsn1Oid AttributeOID; + + @uint32() + external int AttributeID; +} + +typedef CSSM_DB_ATTRIBUTE_FORMAT = uint32; + +class cssm_db_attribute_data extends ffi.Struct { + external CSSM_DB_ATTRIBUTE_INFO Info; + + @uint32() + external int NumberOfValues; + + external CSSM_DATA_PTR Value; +} + +typedef CSSM_DB_ATTRIBUTE_INFO = cssm_db_attribute_info; + +class cssm_db_record_attribute_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; + + @uint32() + external int NumberOfAttributes; + + external CSSM_DB_ATTRIBUTE_INFO_PTR AttributeInfo; +} + +typedef CSSM_DB_RECORDTYPE = uint32; +typedef CSSM_DB_ATTRIBUTE_INFO_PTR = ffi.Pointer; + +class cssm_db_record_attribute_data extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; + + @uint32() + external int SemanticInformation; + + @uint32() + external int NumberOfAttributes; + + external CSSM_DB_ATTRIBUTE_DATA_PTR AttributeData; +} + +typedef CSSM_DB_ATTRIBUTE_DATA_PTR = ffi.Pointer; + +class cssm_db_parsing_module_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int RecordType; + + external CSSM_SUBSERVICE_UID ModuleSubserviceUid; +} + +class cssm_db_index_info extends ffi.Struct { + @CSSM_DB_INDEX_TYPE() + external int IndexType; + + @CSSM_DB_INDEXED_DATA_LOCATION() + external int IndexedDataLocation; + + external CSSM_DB_ATTRIBUTE_INFO Info; +} + +typedef CSSM_DB_INDEX_TYPE = uint32; +typedef CSSM_DB_INDEXED_DATA_LOCATION = uint32; + +class cssm_db_unique_record extends ffi.Struct { + external CSSM_DB_INDEX_INFO RecordLocator; + + external SecAsn1Item RecordIdentifier; +} + +typedef CSSM_DB_INDEX_INFO = cssm_db_index_info; + +class cssm_db_record_index_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; + + @uint32() + external int NumberOfIndexes; + + external CSSM_DB_INDEX_INFO_PTR IndexInfo; +} + +typedef CSSM_DB_INDEX_INFO_PTR = ffi.Pointer; + +class cssm_dbinfo extends ffi.Struct { + @uint32() + external int NumberOfRecordTypes; + + external CSSM_DB_PARSING_MODULE_INFO_PTR DefaultParsingModules; + + external CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR RecordAttributeNames; + + external CSSM_DB_RECORD_INDEX_INFO_PTR RecordIndexes; + + @CSSM_BOOL() + external int IsLocal; + + external ffi.Pointer AccessPath; + + external ffi.Pointer Reserved; +} + +typedef CSSM_DB_PARSING_MODULE_INFO_PTR + = ffi.Pointer; +typedef CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR + = ffi.Pointer; +typedef CSSM_DB_RECORD_INDEX_INFO_PTR = ffi.Pointer; + +class cssm_selection_predicate extends ffi.Struct { + @CSSM_DB_OPERATOR() + external int DbOperator; + + external CSSM_DB_ATTRIBUTE_DATA Attribute; +} + +typedef CSSM_DB_OPERATOR = uint32; +typedef CSSM_DB_ATTRIBUTE_DATA = cssm_db_attribute_data; + +class cssm_query_limits extends ffi.Struct { + @uint32() + external int TimeLimit; + + @uint32() + external int SizeLimit; +} + +class cssm_query extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int RecordType; + + @CSSM_DB_CONJUNCTIVE() + external int Conjunctive; + + @uint32() + external int NumSelectionPredicates; + + external CSSM_SELECTION_PREDICATE_PTR SelectionPredicate; + + external CSSM_QUERY_LIMITS QueryLimits; + + @CSSM_QUERY_FLAGS() + external int QueryFlags; +} + +typedef CSSM_DB_CONJUNCTIVE = uint32; +typedef CSSM_SELECTION_PREDICATE_PTR = ffi.Pointer; +typedef CSSM_QUERY_LIMITS = cssm_query_limits; +typedef CSSM_QUERY_FLAGS = uint32; + +class cssm_dl_pkcs11_attributes extends ffi.Struct { + @uint32() + external int DeviceAccessFlags; +} + +class cssm_name_list extends ffi.Struct { + @uint32() + external int NumStrings; + + external ffi.Pointer> String; +} + +class cssm_db_schema_attribute_info extends ffi.Struct { + @uint32() + external int AttributeId; + + external ffi.Pointer AttributeName; + + external SecAsn1Oid AttributeNameID; + + @CSSM_DB_ATTRIBUTE_FORMAT() + external int DataType; +} + +class cssm_db_schema_index_info extends ffi.Struct { + @uint32() + external int AttributeId; + + @uint32() + external int IndexId; + + @CSSM_DB_INDEX_TYPE() + external int IndexType; + + @CSSM_DB_INDEXED_DATA_LOCATION() + external int IndexedDataLocation; +} + +class cssm_x509_type_value_pair extends ffi.Struct { + external SecAsn1Oid type; + + @CSSM_BER_TAG() + external int valueType; + + external SecAsn1Item value; +} + +typedef CSSM_BER_TAG = uint8; + +class cssm_x509_rdn extends ffi.Struct { + @uint32() + external int numberOfPairs; + + external CSSM_X509_TYPE_VALUE_PAIR_PTR AttributeTypeAndValue; +} + +typedef CSSM_X509_TYPE_VALUE_PAIR_PTR = ffi.Pointer; + +class cssm_x509_name extends ffi.Struct { + @uint32() + external int numberOfRDNs; + + external CSSM_X509_RDN_PTR RelativeDistinguishedName; +} + +typedef CSSM_X509_RDN_PTR = ffi.Pointer; + +class cssm_x509_time extends ffi.Struct { + @CSSM_BER_TAG() + external int timeType; + + external SecAsn1Item time; +} + +class x509_validity extends ffi.Struct { + external CSSM_X509_TIME notBefore; + + external CSSM_X509_TIME notAfter; +} + +typedef CSSM_X509_TIME = cssm_x509_time; + +class cssm_x509ext_basicConstraints extends ffi.Struct { + @CSSM_BOOL() + external int cA; + + @CSSM_X509_OPTION() + external int pathLenConstraintPresent; + + @uint32() + external int pathLenConstraint; +} + +typedef CSSM_X509_OPTION = CSSM_BOOL; + +abstract class extension_data_format { + static const int CSSM_X509_DATAFORMAT_ENCODED = 0; + static const int CSSM_X509_DATAFORMAT_PARSED = 1; + static const int CSSM_X509_DATAFORMAT_PAIR = 2; +} + +class cssm_x509_extensionTagAndValue extends ffi.Struct { + @CSSM_BER_TAG() + external int type; + + external SecAsn1Item value; +} + +class cssm_x509ext_pair extends ffi.Struct { + external CSSM_X509EXT_TAGandVALUE tagAndValue; + + external ffi.Pointer parsedValue; +} + +typedef CSSM_X509EXT_TAGandVALUE = cssm_x509_extensionTagAndValue; + +class cssm_x509_extension extends ffi.Struct { + external SecAsn1Oid extnId; + + @CSSM_BOOL() + external int critical; + + @ffi.Int32() + external int format; + + external cssm_x509ext_value value; + + external SecAsn1Item BERvalue; +} + +class cssm_x509ext_value extends ffi.Union { + external ffi.Pointer tagAndValue; + + external ffi.Pointer parsedValue; + + external ffi.Pointer valuePair; +} + +typedef CSSM_X509EXT_PAIR = cssm_x509ext_pair; + +class cssm_x509_extensions extends ffi.Struct { + @uint32() + external int numberOfExtensions; + + external CSSM_X509_EXTENSION_PTR extensions; +} + +typedef CSSM_X509_EXTENSION_PTR = ffi.Pointer; + +class cssm_x509_tbs_certificate extends ffi.Struct { + external SecAsn1Item version; + + external SecAsn1Item serialNumber; + + external SecAsn1AlgId signature; + + external CSSM_X509_NAME issuer; + + external CSSM_X509_VALIDITY validity; + + external CSSM_X509_NAME subject; + + external SecAsn1PubKeyInfo subjectPublicKeyInfo; + + external SecAsn1Item issuerUniqueIdentifier; + + external SecAsn1Item subjectUniqueIdentifier; + + external CSSM_X509_EXTENSIONS extensions; +} + +typedef CSSM_X509_NAME = cssm_x509_name; +typedef CSSM_X509_VALIDITY = x509_validity; +typedef CSSM_X509_EXTENSIONS = cssm_x509_extensions; + +class cssm_x509_signature extends ffi.Struct { + external SecAsn1AlgId algorithmIdentifier; + + external SecAsn1Item encrypted; +} + +class cssm_x509_signed_certificate extends ffi.Struct { + external CSSM_X509_TBS_CERTIFICATE certificate; + + external CSSM_X509_SIGNATURE signature; +} + +typedef CSSM_X509_TBS_CERTIFICATE = cssm_x509_tbs_certificate; +typedef CSSM_X509_SIGNATURE = cssm_x509_signature; + +class cssm_x509ext_policyQualifierInfo extends ffi.Struct { + external SecAsn1Oid policyQualifierId; + + external SecAsn1Item value; +} + +class cssm_x509ext_policyQualifiers extends ffi.Struct { + @uint32() + external int numberOfPolicyQualifiers; + + external ffi.Pointer policyQualifier; +} + +typedef CSSM_X509EXT_POLICYQUALIFIERINFO = cssm_x509ext_policyQualifierInfo; + +class cssm_x509ext_policyInfo extends ffi.Struct { + external SecAsn1Oid policyIdentifier; + + external CSSM_X509EXT_POLICYQUALIFIERS policyQualifiers; +} + +typedef CSSM_X509EXT_POLICYQUALIFIERS = cssm_x509ext_policyQualifiers; + +class cssm_x509_revoked_cert_entry extends ffi.Struct { + external SecAsn1Item certificateSerialNumber; + + external CSSM_X509_TIME revocationDate; + + external CSSM_X509_EXTENSIONS extensions; +} + +class cssm_x509_revoked_cert_list extends ffi.Struct { + @uint32() + external int numberOfRevokedCertEntries; + + external CSSM_X509_REVOKED_CERT_ENTRY_PTR revokedCertEntry; +} + +typedef CSSM_X509_REVOKED_CERT_ENTRY_PTR + = ffi.Pointer; + +class cssm_x509_tbs_certlist extends ffi.Struct { + external SecAsn1Item version; + + external SecAsn1AlgId signature; + + external CSSM_X509_NAME issuer; + + external CSSM_X509_TIME thisUpdate; + + external CSSM_X509_TIME nextUpdate; + + external CSSM_X509_REVOKED_CERT_LIST_PTR revokedCertificates; + + external CSSM_X509_EXTENSIONS extensions; +} + +typedef CSSM_X509_REVOKED_CERT_LIST_PTR + = ffi.Pointer; + +class cssm_x509_signed_crl extends ffi.Struct { + external CSSM_X509_TBS_CERTLIST tbsCertList; + + external CSSM_X509_SIGNATURE signature; +} + +typedef CSSM_X509_TBS_CERTLIST = cssm_x509_tbs_certlist; + +abstract class __CE_GeneralNameType { + static const int GNT_OtherName = 0; + static const int GNT_RFC822Name = 1; + static const int GNT_DNSName = 2; + static const int GNT_X400Address = 3; + static const int GNT_DirectoryName = 4; + static const int GNT_EdiPartyName = 5; + static const int GNT_URI = 6; + static const int GNT_IPAddress = 7; + static const int GNT_RegisteredID = 8; +} + +class __CE_OtherName extends ffi.Struct { + external SecAsn1Oid typeId; + + external SecAsn1Item value; +} + +class __CE_GeneralName extends ffi.Struct { + @ffi.Int32() + external int nameType; + + @CSSM_BOOL() + external int berEncoded; + + external SecAsn1Item name; +} + +class __CE_GeneralNames extends ffi.Struct { + @uint32() + external int numNames; + + external ffi.Pointer generalName; +} + +typedef CE_GeneralName = __CE_GeneralName; + +class __CE_AuthorityKeyID extends ffi.Struct { + @CSSM_BOOL() + external int keyIdentifierPresent; + + external SecAsn1Item keyIdentifier; + + @CSSM_BOOL() + external int generalNamesPresent; + + external ffi.Pointer generalNames; + + @CSSM_BOOL() + external int serialNumberPresent; + + external SecAsn1Item serialNumber; +} + +typedef CE_GeneralNames = __CE_GeneralNames; + +class __CE_ExtendedKeyUsage extends ffi.Struct { + @uint32() + external int numPurposes; + + external CSSM_OID_PTR purposes; +} + +typedef CSSM_OID_PTR = ffi.Pointer; + +class __CE_BasicConstraints extends ffi.Struct { + @CSSM_BOOL() + external int cA; + + @CSSM_BOOL() + external int pathLenConstraintPresent; + + @uint32() + external int pathLenConstraint; +} + +class __CE_PolicyQualifierInfo extends ffi.Struct { + external SecAsn1Oid policyQualifierId; + + external SecAsn1Item qualifier; +} + +class __CE_PolicyInformation extends ffi.Struct { + external SecAsn1Oid certPolicyId; + + @uint32() + external int numPolicyQualifiers; + + external ffi.Pointer policyQualifiers; +} + +typedef CE_PolicyQualifierInfo = __CE_PolicyQualifierInfo; + +class __CE_CertPolicies extends ffi.Struct { + @uint32() + external int numPolicies; + + external ffi.Pointer policies; +} + +typedef CE_PolicyInformation = __CE_PolicyInformation; + +abstract class __CE_CrlDistributionPointNameType { + static const int CE_CDNT_FullName = 0; + static const int CE_CDNT_NameRelativeToCrlIssuer = 1; +} + +class __CE_DistributionPointName extends ffi.Struct { + @ffi.Int32() + external int nameType; + + external UnnamedUnion4 dpn; +} + +class UnnamedUnion4 extends ffi.Union { + external ffi.Pointer fullName; + + external CSSM_X509_RDN_PTR rdn; +} + +class __CE_CRLDistributionPoint extends ffi.Struct { + external ffi.Pointer distPointName; + + @CSSM_BOOL() + external int reasonsPresent; + + @CE_CrlDistReasonFlags() + external int reasons; + + external ffi.Pointer crlIssuer; +} + +typedef CE_DistributionPointName = __CE_DistributionPointName; +typedef CE_CrlDistReasonFlags = uint8; + +class __CE_CRLDistPointsSyntax extends ffi.Struct { + @uint32() + external int numDistPoints; + + external ffi.Pointer distPoints; +} + +typedef CE_CRLDistributionPoint = __CE_CRLDistributionPoint; + +class __CE_AccessDescription extends ffi.Struct { + external SecAsn1Oid accessMethod; + + external CE_GeneralName accessLocation; +} + +class __CE_AuthorityInfoAccess extends ffi.Struct { + @uint32() + external int numAccessDescriptions; + + external ffi.Pointer accessDescriptions; +} + +typedef CE_AccessDescription = __CE_AccessDescription; + +class __CE_SemanticsInformation extends ffi.Struct { + external ffi.Pointer semanticsIdentifier; + + external ffi.Pointer + nameRegistrationAuthorities; +} + +typedef CE_NameRegistrationAuthorities = CE_GeneralNames; + +class __CE_QC_Statement extends ffi.Struct { + external SecAsn1Oid statementId; + + external ffi.Pointer semanticsInfo; + + external ffi.Pointer otherInfo; +} + +typedef CE_SemanticsInformation = __CE_SemanticsInformation; + +class __CE_QC_Statements extends ffi.Struct { + @uint32() + external int numQCStatements; + + external ffi.Pointer qcStatements; +} + +typedef CE_QC_Statement = __CE_QC_Statement; + +class __CE_IssuingDistributionPoint extends ffi.Struct { + external ffi.Pointer distPointName; + + @CSSM_BOOL() + external int onlyUserCertsPresent; + + @CSSM_BOOL() + external int onlyUserCerts; + + @CSSM_BOOL() + external int onlyCACertsPresent; + + @CSSM_BOOL() + external int onlyCACerts; + + @CSSM_BOOL() + external int onlySomeReasonsPresent; + + @CE_CrlDistReasonFlags() + external int onlySomeReasons; + + @CSSM_BOOL() + external int indirectCrlPresent; + + @CSSM_BOOL() + external int indirectCrl; +} + +class __CE_GeneralSubtree extends ffi.Struct { + external ffi.Pointer base; + + @uint32() + external int minimum; + + @CSSM_BOOL() + external int maximumPresent; + + @uint32() + external int maximum; +} + +class __CE_GeneralSubtrees extends ffi.Struct { + @uint32() + external int numSubtrees; + + external ffi.Pointer subtrees; +} + +typedef CE_GeneralSubtree = __CE_GeneralSubtree; + +class __CE_NameConstraints extends ffi.Struct { + external ffi.Pointer permitted; + + external ffi.Pointer excluded; +} + +typedef CE_GeneralSubtrees = __CE_GeneralSubtrees; + +class __CE_PolicyMapping extends ffi.Struct { + external SecAsn1Oid issuerDomainPolicy; + + external SecAsn1Oid subjectDomainPolicy; +} + +class __CE_PolicyMappings extends ffi.Struct { + @uint32() + external int numPolicyMappings; + + external ffi.Pointer policyMappings; +} + +typedef CE_PolicyMapping = __CE_PolicyMapping; + +class __CE_PolicyConstraints extends ffi.Struct { + @CSSM_BOOL() + external int requireExplicitPolicyPresent; + + @uint32() + external int requireExplicitPolicy; + + @CSSM_BOOL() + external int inhibitPolicyMappingPresent; + + @uint32() + external int inhibitPolicyMapping; +} + +abstract class __CE_DataType { + static const int DT_AuthorityKeyID = 0; + static const int DT_SubjectKeyID = 1; + static const int DT_KeyUsage = 2; + static const int DT_SubjectAltName = 3; + static const int DT_IssuerAltName = 4; + static const int DT_ExtendedKeyUsage = 5; + static const int DT_BasicConstraints = 6; + static const int DT_CertPolicies = 7; + static const int DT_NetscapeCertType = 8; + static const int DT_CrlNumber = 9; + static const int DT_DeltaCrl = 10; + static const int DT_CrlReason = 11; + static const int DT_CrlDistributionPoints = 12; + static const int DT_IssuingDistributionPoint = 13; + static const int DT_AuthorityInfoAccess = 14; + static const int DT_Other = 15; + static const int DT_QC_Statements = 16; + static const int DT_NameConstraints = 17; + static const int DT_PolicyMappings = 18; + static const int DT_PolicyConstraints = 19; + static const int DT_InhibitAnyPolicy = 20; +} + +class CE_Data extends ffi.Union { + external CE_AuthorityKeyID authorityKeyID; + + external CE_SubjectKeyID subjectKeyID; + + @CE_KeyUsage() + external int keyUsage; + + external CE_GeneralNames subjectAltName; + + external CE_GeneralNames issuerAltName; + + external CE_ExtendedKeyUsage extendedKeyUsage; + + external CE_BasicConstraints basicConstraints; + + external CE_CertPolicies certPolicies; + + @CE_NetscapeCertType() + external int netscapeCertType; + + @CE_CrlNumber() + external int crlNumber; + + @CE_DeltaCrl() + external int deltaCrl; + + @CE_CrlReason() + external int crlReason; + + external CE_CRLDistPointsSyntax crlDistPoints; + + external CE_IssuingDistributionPoint issuingDistPoint; + + external CE_AuthorityInfoAccess authorityInfoAccess; + + external CE_QC_Statements qualifiedCertStatements; + + external CE_NameConstraints nameConstraints; + + external CE_PolicyMappings policyMappings; + + external CE_PolicyConstraints policyConstraints; + + @CE_InhibitAnyPolicy() + external int inhibitAnyPolicy; + + external SecAsn1Item rawData; +} + +typedef CE_AuthorityKeyID = __CE_AuthorityKeyID; +typedef CE_SubjectKeyID = SecAsn1Item; +typedef CE_KeyUsage = uint16; +typedef CE_ExtendedKeyUsage = __CE_ExtendedKeyUsage; +typedef CE_BasicConstraints = __CE_BasicConstraints; +typedef CE_CertPolicies = __CE_CertPolicies; +typedef CE_NetscapeCertType = uint16; +typedef CE_CrlNumber = uint32; +typedef CE_DeltaCrl = uint32; +typedef CE_CrlReason = uint32; +typedef CE_CRLDistPointsSyntax = __CE_CRLDistPointsSyntax; +typedef CE_IssuingDistributionPoint = __CE_IssuingDistributionPoint; +typedef CE_AuthorityInfoAccess = __CE_AuthorityInfoAccess; +typedef CE_QC_Statements = __CE_QC_Statements; +typedef CE_NameConstraints = __CE_NameConstraints; +typedef CE_PolicyMappings = __CE_PolicyMappings; +typedef CE_PolicyConstraints = __CE_PolicyConstraints; +typedef CE_InhibitAnyPolicy = uint32; + +class __CE_DataAndType extends ffi.Struct { + @ffi.Int32() + external int type; + + external CE_Data extension1; + + @CSSM_BOOL() + external int critical; +} + +class cssm_acl_process_subject_selector extends ffi.Struct { + @uint16() + external int version; + + @uint16() + external int mask; + + @uint32() + external int uid; + + @uint32() + external int gid; +} + +class cssm_acl_keychain_prompt_selector extends ffi.Struct { + @uint16() + external int version; + + @uint16() + external int flags; +} + +abstract class cssm_appledl_open_parameters_mask { + static const int kCSSM_APPLEDL_MASK_MODE = 1; +} + +class cssm_appledl_open_parameters extends ffi.Struct { + @uint32() + external int length; + + @uint32() + external int version; + + @CSSM_BOOL() + external int autoCommit; + + @uint32() + external int mask; + + @mode_t() + external int mode; +} + +class cssm_applecspdl_db_settings_parameters extends ffi.Struct { + @uint32() + external int idleTimeout; + + @uint8() + external int lockOnSleep; +} + +class cssm_applecspdl_db_is_locked_parameters extends ffi.Struct { + @uint8() + external int isLocked; +} + +class cssm_applecspdl_db_change_password_parameters extends ffi.Struct { + external ffi.Pointer accessCredentials; +} + +typedef CSSM_ACCESS_CREDENTIALS = cssm_access_credentials; + +class CSSM_APPLE_TP_NAME_OID extends ffi.Struct { + external ffi.Pointer string; + + external ffi.Pointer oid; +} + +class CSSM_APPLE_TP_CERT_REQUEST extends ffi.Struct { + @CSSM_CSP_HANDLE() + external int cspHand; + + @CSSM_CL_HANDLE() + external int clHand; + + @uint32() + external int serialNumber; + + @uint32() + external int numSubjectNames; + + external ffi.Pointer subjectNames; + + @uint32() + external int numIssuerNames; + + external ffi.Pointer issuerNames; + + external CSSM_X509_NAME_PTR issuerNameX509; + + external ffi.Pointer certPublicKey; + + external ffi.Pointer issuerPrivateKey; + + @CSSM_ALGORITHMS() + external int signatureAlg; + + external SecAsn1Oid signatureOid; + + @uint32() + external int notBefore; + + @uint32() + external int notAfter; + + @uint32() + external int numExtensions; + + external ffi.Pointer extensions; + + external ffi.Pointer challengeString; +} + +typedef CSSM_X509_NAME_PTR = ffi.Pointer; +typedef CSSM_KEY = cssm_key; +typedef CE_DataAndType = __CE_DataAndType; + +class CSSM_APPLE_TP_SSL_OPTIONS extends ffi.Struct { + @uint32() + external int Version; + + @uint32() + external int ServerNameLen; + + external ffi.Pointer ServerName; + + @uint32() + external int Flags; +} + +class CSSM_APPLE_TP_CRL_OPTIONS extends ffi.Struct { + @uint32() + external int Version; + + @CSSM_APPLE_TP_CRL_OPT_FLAGS() + external int CrlFlags; + + external CSSM_DL_DB_HANDLE_PTR crlStore; +} + +typedef CSSM_APPLE_TP_CRL_OPT_FLAGS = uint32; + +class CSSM_APPLE_TP_SMIME_OPTIONS extends ffi.Struct { + @uint32() + external int Version; + + @CE_KeyUsage() + external int IntendedUsage; + + @uint32() + external int SenderEmailLen; + + external ffi.Pointer SenderEmail; +} + +class CSSM_APPLE_TP_ACTION_DATA extends ffi.Struct { + @uint32() + external int Version; + + @CSSM_APPLE_TP_ACTION_FLAGS() + external int ActionFlags; +} + +typedef CSSM_APPLE_TP_ACTION_FLAGS = uint32; + +class CSSM_TP_APPLE_EVIDENCE_INFO extends ffi.Struct { + @CSSM_TP_APPLE_CERT_STATUS() + external int StatusBits; + + @uint32() + external int NumStatusCodes; + + external ffi.Pointer StatusCodes; + + @uint32() + external int Index; + + external CSSM_DL_DB_HANDLE DlDbHandle; + + external CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord; +} + +typedef CSSM_TP_APPLE_CERT_STATUS = uint32; +typedef CSSM_DL_DB_HANDLE = cssm_dl_db_handle; +typedef CSSM_DB_UNIQUE_RECORD_PTR = ffi.Pointer; + +class CSSM_TP_APPLE_EVIDENCE_HEADER extends ffi.Struct { + @uint32() + external int Version; +} + +class CSSM_APPLE_CL_CSR_REQUEST extends ffi.Struct { + external CSSM_X509_NAME_PTR subjectNameX509; + + @CSSM_ALGORITHMS() + external int signatureAlg; + + external SecAsn1Oid signatureOid; + + @CSSM_CSP_HANDLE() + external int cspHand; + + external ffi.Pointer subjectPublicKey; + + external ffi.Pointer subjectPrivateKey; + + external ffi.Pointer challengeString; +} + +abstract class SecTrustOptionFlags { + static const int kSecTrustOptionAllowExpired = 1; + static const int kSecTrustOptionLeafIsCA = 2; + static const int kSecTrustOptionFetchIssuerFromNet = 4; + static const int kSecTrustOptionAllowExpiredRoot = 8; + static const int kSecTrustOptionRequireRevPerCert = 16; + static const int kSecTrustOptionUseTrustSettings = 32; + static const int kSecTrustOptionImplicitAnchors = 64; +} + +typedef CSSM_TP_VERIFY_CONTEXT_RESULT_PTR + = ffi.Pointer; +typedef SecKeychainRef = ffi.Pointer<__SecKeychain>; + +abstract class SecKeyUsage { + static const int kSecKeyUsageUnspecified = 0; + static const int kSecKeyUsageDigitalSignature = 1; + static const int kSecKeyUsageNonRepudiation = 2; + static const int kSecKeyUsageContentCommitment = 2; + static const int kSecKeyUsageKeyEncipherment = 4; + static const int kSecKeyUsageDataEncipherment = 8; + static const int kSecKeyUsageKeyAgreement = 16; + static const int kSecKeyUsageKeyCertSign = 32; + static const int kSecKeyUsageCRLSign = 64; + static const int kSecKeyUsageEncipherOnly = 128; + static const int kSecKeyUsageDecipherOnly = 256; + static const int kSecKeyUsageCritical = -2147483648; + static const int kSecKeyUsageAll = 2147483647; +} + +typedef SecIdentityRef = ffi.Pointer<__SecIdentity>; + +abstract class SSLCiphersuiteGroup { + static const int kSSLCiphersuiteGroupDefault = 0; + static const int kSSLCiphersuiteGroupCompatibility = 1; + static const int kSSLCiphersuiteGroupLegacy = 2; + static const int kSSLCiphersuiteGroupATS = 3; + static const int kSSLCiphersuiteGroupATSCompatibility = 4; +} + +abstract class tls_protocol_version_t { + static const int tls_protocol_version_TLSv10 = 769; + static const int tls_protocol_version_TLSv11 = 770; + static const int tls_protocol_version_TLSv12 = 771; + static const int tls_protocol_version_TLSv13 = 772; + static const int tls_protocol_version_DTLSv10 = -257; + static const int tls_protocol_version_DTLSv12 = -259; +} + +abstract class tls_ciphersuite_t { + static const int tls_ciphersuite_RSA_WITH_3DES_EDE_CBC_SHA = 10; + static const int tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA = 47; + static const int tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA = 53; + static const int tls_ciphersuite_RSA_WITH_AES_128_GCM_SHA256 = 156; + static const int tls_ciphersuite_RSA_WITH_AES_256_GCM_SHA384 = 157; + static const int tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA256 = 60; + static const int tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA256 = 61; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; + static const int tls_ciphersuite_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; + static const int tls_ciphersuite_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = + -13144; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = + -13143; + static const int tls_ciphersuite_AES_128_GCM_SHA256 = 4865; + static const int tls_ciphersuite_AES_256_GCM_SHA384 = 4866; + static const int tls_ciphersuite_CHACHA20_POLY1305_SHA256 = 4867; +} + +abstract class tls_ciphersuite_group_t { + static const int tls_ciphersuite_group_default = 0; + static const int tls_ciphersuite_group_compatibility = 1; + static const int tls_ciphersuite_group_legacy = 2; + static const int tls_ciphersuite_group_ats = 3; + static const int tls_ciphersuite_group_ats_compatibility = 4; +} + +abstract class SSLProtocol { + static const int kSSLProtocolUnknown = 0; + static const int kTLSProtocol1 = 4; + static const int kTLSProtocol11 = 7; + static const int kTLSProtocol12 = 8; + static const int kDTLSProtocol1 = 9; + static const int kTLSProtocol13 = 10; + static const int kDTLSProtocol12 = 11; + static const int kTLSProtocolMaxSupported = 999; + static const int kSSLProtocol2 = 1; + static const int kSSLProtocol3 = 2; + static const int kSSLProtocol3Only = 3; + static const int kTLSProtocol1Only = 5; + static const int kSSLProtocolAll = 6; +} + +typedef sec_trust_t = ffi.Pointer; +typedef sec_identity_t = ffi.Pointer; +void _ObjCBlock30_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} + +final _ObjCBlock30_closureRegistry = {}; +int _ObjCBlock30_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock30_registerClosure(Function fn) { + final id = ++_ObjCBlock30_closureRegistryIndex; + _ObjCBlock30_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock30_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { + return _ObjCBlock30_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock30 extends _ObjCBlockBase { + ObjCBlock30._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock30.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + sec_certificate_t arg0)>( + _ObjCBlock30_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock30.fromFunction( + NativeCupertinoHttp lib, void Function(sec_certificate_t arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + sec_certificate_t arg0)>( + _ObjCBlock30_closureTrampoline) + .cast(), + _ObjCBlock30_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(sec_certificate_t arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + sec_certificate_t arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef sec_certificate_t = ffi.Pointer; +typedef sec_protocol_metadata_t = ffi.Pointer; +typedef SSLCipherSuite = ffi.Uint16; +void _ObjCBlock31_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} + +final _ObjCBlock31_closureRegistry = {}; +int _ObjCBlock31_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock31_registerClosure(Function fn) { + final id = ++_ObjCBlock31_closureRegistryIndex; + _ObjCBlock31_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock31_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock31_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock31 extends _ObjCBlockBase { + ObjCBlock31._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock31.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Uint16 arg0)>(_ObjCBlock31_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock31.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Uint16 arg0)>(_ObjCBlock31_closureTrampoline) + .cast(), + _ObjCBlock31_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(int arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Uint16 arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +void _ObjCBlock32_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(dispatch_data_t arg0, dispatch_data_t arg1)>>() + .asFunction< + void Function( + dispatch_data_t arg0, dispatch_data_t arg1)>()(arg0, arg1); +} + +final _ObjCBlock32_closureRegistry = {}; +int _ObjCBlock32_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock32_registerClosure(Function fn) { + final id = ++_ObjCBlock32_closureRegistryIndex; + _ObjCBlock32_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock32_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { + return _ObjCBlock32_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock32 extends _ObjCBlockBase { + ObjCBlock32._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock32.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + dispatch_data_t arg0, dispatch_data_t arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + dispatch_data_t arg1)>(_ObjCBlock32_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock32.fromFunction(NativeCupertinoHttp lib, + void Function(dispatch_data_t arg0, dispatch_data_t arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, dispatch_data_t arg1)>( + _ObjCBlock32_closureTrampoline) + .cast(), + _ObjCBlock32_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(dispatch_data_t arg0, dispatch_data_t arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, dispatch_data_t arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, + dispatch_data_t arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef sec_protocol_options_t = ffi.Pointer; +typedef sec_protocol_pre_shared_key_selection_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock33_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>>() + .asFunction< + void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>()( + arg0, arg1, arg2); +} + +final _ObjCBlock33_closureRegistry = {}; +int _ObjCBlock33_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock33_registerClosure(Function fn) { + final id = ++_ObjCBlock33_closureRegistryIndex; + _ObjCBlock33_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock33_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) { + return _ObjCBlock33_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock33 extends _ObjCBlockBase { + ObjCBlock33._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock33.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>(_ObjCBlock33_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock33.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>(_ObjCBlock33_closureTrampoline) + .cast(), + _ObjCBlock33_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(sec_protocol_metadata_t arg0, dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef sec_protocol_pre_shared_key_selection_complete_t + = ffi.Pointer<_ObjCBlock>; +typedef sec_protocol_key_update_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock34_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>>() + .asFunction< + void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>()(arg0, arg1); +} + +final _ObjCBlock34_closureRegistry = {}; +int _ObjCBlock34_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock34_registerClosure(Function fn) { + final id = ++_ObjCBlock34_closureRegistryIndex; + _ObjCBlock34_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock34_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { + return _ObjCBlock34_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock34 extends _ObjCBlockBase { + ObjCBlock34._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock34.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>( + _ObjCBlock34_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock34.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>( + _ObjCBlock34_closureTrampoline) + .cast(), + _ObjCBlock34_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef sec_protocol_key_update_complete_t = ffi.Pointer<_ObjCBlock>; +typedef sec_protocol_challenge_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock35_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>>() + .asFunction< + void Function(sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>()(arg0, arg1); +} + +final _ObjCBlock35_closureRegistry = {}; +int _ObjCBlock35_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock35_registerClosure(Function fn) { + final id = ++_ObjCBlock35_closureRegistryIndex; + _ObjCBlock35_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock35_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { + return _ObjCBlock35_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock35 extends _ObjCBlockBase { + ObjCBlock35._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock35.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>( + _ObjCBlock35_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock35.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>( + _ObjCBlock35_closureTrampoline) + .cast(), + _ObjCBlock35_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef sec_protocol_challenge_complete_t = ffi.Pointer<_ObjCBlock>; +typedef sec_protocol_verify_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock36_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>>() + .asFunction< + void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock36_closureRegistry = {}; +int _ObjCBlock36_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock36_registerClosure(Function fn) { + final id = ++_ObjCBlock36_closureRegistryIndex; + _ObjCBlock36_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock36_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) { + return _ObjCBlock36_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock36 extends _ObjCBlockBase { + ObjCBlock36._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock36.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_trust_t arg1, sec_protocol_verify_complete_t arg2)>> + ptr) + : this._( + lib + ._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>( + _ObjCBlock36_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock36.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>( + _ObjCBlock36_closureTrampoline) + .cast(), + _ObjCBlock36_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef sec_protocol_verify_complete_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock37_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} + +final _ObjCBlock37_closureRegistry = {}; +int _ObjCBlock37_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock37_registerClosure(Function fn) { + final id = ++_ObjCBlock37_closureRegistryIndex; + _ObjCBlock37_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock37_closureTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { + return _ObjCBlock37_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock37 extends _ObjCBlockBase { + ObjCBlock37._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock37.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0)>(_ObjCBlock37_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock37.fromFunction(NativeCupertinoHttp lib, void Function(bool arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0)>(_ObjCBlock37_closureTrampoline) + .cast(), + _ObjCBlock37_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(bool arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, bool arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +class SSLContext extends ffi.Opaque {} + +abstract class SSLSessionOption { + static const int kSSLSessionOptionBreakOnServerAuth = 0; + static const int kSSLSessionOptionBreakOnCertRequested = 1; + static const int kSSLSessionOptionBreakOnClientAuth = 2; + static const int kSSLSessionOptionFalseStart = 3; + static const int kSSLSessionOptionSendOneByteRecord = 4; + static const int kSSLSessionOptionAllowServerIdentityChange = 5; + static const int kSSLSessionOptionFallback = 6; + static const int kSSLSessionOptionBreakOnClientHello = 7; + static const int kSSLSessionOptionAllowRenegotiation = 8; + static const int kSSLSessionOptionEnableSessionTickets = 9; +} + +abstract class SSLSessionState { + static const int kSSLIdle = 0; + static const int kSSLHandshake = 1; + static const int kSSLConnected = 2; + static const int kSSLClosed = 3; + static const int kSSLAborted = 4; +} + +abstract class SSLClientCertificateState { + static const int kSSLClientCertNone = 0; + static const int kSSLClientCertRequested = 1; + static const int kSSLClientCertSent = 2; + static const int kSSLClientCertRejected = 3; +} + +abstract class SSLProtocolSide { + static const int kSSLServerSide = 0; + static const int kSSLClientSide = 1; +} + +abstract class SSLConnectionType { + static const int kSSLStreamType = 0; + static const int kSSLDatagramType = 1; +} + +typedef SSLContextRef = ffi.Pointer; +typedef SSLReadFunc = ffi.Pointer< + ffi.NativeFunction< + OSStatus Function( + SSLConnectionRef, ffi.Pointer, ffi.Pointer)>>; +typedef SSLConnectionRef = ffi.Pointer; +typedef SSLWriteFunc = ffi.Pointer< + ffi.NativeFunction< + OSStatus Function( + SSLConnectionRef, ffi.Pointer, ffi.Pointer)>>; + +abstract class SSLAuthenticate { + static const int kNeverAuthenticate = 0; + static const int kAlwaysAuthenticate = 1; + static const int kTryAuthenticate = 2; +} + +/// NSURLSession is a replacement API for NSURLConnection. It provides +/// options that affect the policy of, and various aspects of the +/// mechanism by which NSURLRequest objects are retrieved from the +/// network. +/// +/// An NSURLSession may be bound to a delegate object. The delegate is +/// invoked for certain events during the lifetime of a session, such as +/// server authentication or determining whether a resource to be loaded +/// should be converted into a download. +/// +/// NSURLSession instances are threadsafe. +/// +/// The default NSURLSession uses a system provided delegate and is +/// appropriate to use in place of existing code that uses +/// +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] +/// +/// An NSURLSession creates NSURLSessionTask objects which represent the +/// action of a resource being loaded. These are analogous to +/// NSURLConnection objects but provide for more control and a unified +/// delegate model. +/// +/// NSURLSessionTask objects are always created in a suspended state and +/// must be sent the -resume message before they will execute. +/// +/// Subclasses of NSURLSessionTask are used to syntactically +/// differentiate between data and file downloads. +/// +/// An NSURLSessionDataTask receives the resource as a series of calls to +/// the URLSession:dataTask:didReceiveData: delegate method. This is type of +/// task most commonly associated with retrieving objects for immediate parsing +/// by the consumer. +/// +/// An NSURLSessionUploadTask differs from an NSURLSessionDataTask +/// in how its instance is constructed. Upload tasks are explicitly created +/// by referencing a file or data object to upload, or by utilizing the +/// -URLSession:task:needNewBodyStream: delegate message to supply an upload +/// body. +/// +/// An NSURLSessionDownloadTask will directly write the response data to +/// a temporary file. When completed, the delegate is sent +/// URLSession:downloadTask:didFinishDownloadingToURL: and given an opportunity +/// to move this file to a permanent location in its sandboxed container, or to +/// otherwise read the file. If canceled, an NSURLSessionDownloadTask can +/// produce a data blob that can be used to resume a download at a later +/// time. +/// +/// Beginning with iOS 9 and Mac OS X 10.11, NSURLSessionStream is +/// available as a task type. This allows for direct TCP/IP connection +/// to a given host and port with optional secure handshaking and +/// navigation of proxies. Data tasks may also be upgraded to a +/// NSURLSessionStream task via the HTTP Upgrade: header and appropriate +/// use of the pipelining option of NSURLSessionConfiguration. See RFC +/// 2817 and RFC 6455 for information about the Upgrade: header, and +/// comments below on turning data tasks into stream tasks. +/// +/// An NSURLSessionWebSocketTask is a task that allows clients to connect to servers supporting +/// WebSocket. The task will perform the HTTP handshake to upgrade the connection +/// and once the WebSocket handshake is successful, the client can read and write +/// messages that will be framed using the WebSocket protocol by the framework. +class NSURLSession extends NSObject { + NSURLSession._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSession] that points to the same underlying object as [other]. + static NSURLSession castFrom(T other) { + return NSURLSession._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLSession] that wraps the given raw object pointer. + static NSURLSession castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSession._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSession]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLSession1); + } + + /// The shared session uses the currently set global NSURLCache, + /// NSHTTPCookieStorage and NSURLCredentialStorage objects. + static NSURLSession? getSharedSession(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_380( + _lib._class_NSURLSession1, _lib._sel_sharedSession1); + return _ret.address == 0 + ? null + : NSURLSession._(_ret, _lib, retain: true, release: true); + } + + /// Customization of NSURLSession occurs during creation of a new session. + /// If you only need to use the convenience routines with custom + /// configuration options it is not necessary to specify a delegate. + /// If you do specify a delegate, the delegate will be retained until after + /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. + static NSURLSession sessionWithConfiguration_( + NativeCupertinoHttp _lib, NSURLSessionConfiguration? configuration) { + final _ret = _lib._objc_msgSend_395( + _lib._class_NSURLSession1, + _lib._sel_sessionWithConfiguration_1, + configuration?._id ?? ffi.nullptr); + return NSURLSession._(_ret, _lib, retain: true, release: true); + } + + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NativeCupertinoHttp _lib, + NSURLSessionConfiguration? configuration, + NSObject? delegate, + NSOperationQueue? queue) { + final _ret = _lib._objc_msgSend_396( + _lib._class_NSURLSession1, + _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, + configuration?._id ?? ffi.nullptr, + delegate?._id ?? ffi.nullptr, + queue?._id ?? ffi.nullptr); + return NSURLSession._(_ret, _lib, retain: true, release: true); + } + + NSOperationQueue? get delegateQueue { + final _ret = _lib._objc_msgSend_345(_id, _lib._sel_delegateQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } + + NSObject? get delegate { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionConfiguration? get configuration { + final _ret = _lib._objc_msgSend_381(_id, _lib._sel_configuration1); + return _ret.address == 0 + ? null + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + /// The sessionDescription property is available for the developer to + /// provide a descriptive label for the session. + NSString? get sessionDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_sessionDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// The sessionDescription property is available for the developer to + /// provide a descriptive label for the session. + set sessionDescription(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); + } + + /// -finishTasksAndInvalidate returns immediately and existing tasks will be allowed + /// to run to completion. New tasks may not be created. The session + /// will continue to make delegate callbacks until URLSession:didBecomeInvalidWithError: + /// has been issued. + /// + /// -finishTasksAndInvalidate and -invalidateAndCancel do not + /// have any effect on the shared session singleton. + /// + /// When invalidating a background session, it is not safe to create another background + /// session with the same identifier until URLSession:didBecomeInvalidWithError: has + /// been issued. + void finishTasksAndInvalidate() { + return _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); + } + + /// -invalidateAndCancel acts as -finishTasksAndInvalidate, but issues + /// -cancel to all outstanding tasks for this session. Note task + /// cancellation is subject to the state of the task, and some tasks may + /// have already have completed at the time they are sent -cancel. + void invalidateAndCancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); + } + + /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue if not nil. + void resetWithCompletionHandler_(ObjCBlock16 completionHandler) { + return _lib._objc_msgSend_341( + _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); + } + + /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue if not nil. + void flushWithCompletionHandler_(ObjCBlock16 completionHandler) { + return _lib._objc_msgSend_341( + _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); + } + + /// invokes completionHandler with outstanding data, upload and download tasks. + void getTasksWithCompletionHandler_(ObjCBlock38 completionHandler) { + return _lib._objc_msgSend_397( + _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); + } + + /// invokes completionHandler with all outstanding tasks. + void getAllTasksWithCompletionHandler_(ObjCBlock19 completionHandler) { + return _lib._objc_msgSend_398(_id, + _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._id); + } + + /// Creates a data task with the given request. The request may have a body stream. + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_399( + _id, _lib._sel_dataTaskWithRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a data task to retrieve the contents of the given URL. + NSURLSessionDataTask dataTaskWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_400( + _id, _lib._sel_dataTaskWithURL_1, url?._id ?? ffi.nullptr); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest? request, NSURL? fileURL) { + final _ret = _lib._objc_msgSend_401( + _id, + _lib._sel_uploadTaskWithRequest_fromFile_1, + request?._id ?? ffi.nullptr, + fileURL?._id ?? ffi.nullptr); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates an upload task with the given request. The body of the request is provided from the bodyData. + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest? request, NSData? bodyData) { + final _ret = _lib._objc_msgSend_402( + _id, + _lib._sel_uploadTaskWithRequest_fromData_1, + request?._id ?? ffi.nullptr, + bodyData?._id ?? ffi.nullptr); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_403(_id, + _lib._sel_uploadTaskWithStreamedRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a download task with the given request. + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_405( + _id, _lib._sel_downloadTaskWithRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a download task to download the contents of the given URL. + NSURLSessionDownloadTask downloadTaskWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_406( + _id, _lib._sel_downloadTaskWithURL_1, url?._id ?? ffi.nullptr); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. + NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData? resumeData) { + final _ret = _lib._objc_msgSend_407(_id, + _lib._sel_downloadTaskWithResumeData_1, resumeData?._id ?? ffi.nullptr); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a bidirectional stream task to a given host and port. + NSURLSessionStreamTask streamTaskWithHostName_port_( + NSString? hostname, int port) { + final _ret = _lib._objc_msgSend_410( + _id, + _lib._sel_streamTaskWithHostName_port_1, + hostname?._id ?? ffi.nullptr, + port); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. + /// The NSNetService will be resolved before any IO completes. + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService? service) { + final _ret = _lib._objc_msgSend_411( + _id, _lib._sel_streamTaskWithNetService_1, service?._id ?? ffi.nullptr); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. + NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_418( + _id, _lib._sel_webSocketTaskWithURL_1, url?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a WebSocket task given the url and an array of protocols. The protocols will be used in the WebSocket handshake to + /// negotiate a prefered protocol with the server + /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + NSURL? url, NSArray? protocols) { + final _ret = _lib._objc_msgSend_419( + _id, + _lib._sel_webSocketTaskWithURL_protocols_1, + url?._id ?? ffi.nullptr, + protocols?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates a WebSocket task given the request. The request properties can be modified and will be used by the task during the HTTP handshake phase. + /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol + /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_420( + _id, _lib._sel_webSocketTaskWithRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLSession init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSession._(_ret, _lib, retain: true, release: true); + } + + static NSURLSession new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_new1); + return NSURLSession._(_ret, _lib, retain: false, release: true); + } + + /// data task convenience methods. These methods create tasks that + /// bypass the normal delegate calls for response and data delivery, + /// and provide a simple cancelable asynchronous interface to receiving + /// data. Errors will be returned in the NSURLErrorDomain, + /// see . The delegate, if any, will still be + /// called for authentication challenges. + NSURLSessionDataTask dataTaskWithRequest_completionHandler_( + NSURLRequest? request, ObjCBlock43 completionHandler) { + final _ret = _lib._objc_msgSend_421( + _id, + _lib._sel_dataTaskWithRequest_completionHandler_1, + request?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDataTask dataTaskWithURL_completionHandler_( + NSURL? url, ObjCBlock43 completionHandler) { + final _ret = _lib._objc_msgSend_422( + _id, + _lib._sel_dataTaskWithURL_completionHandler_1, + url?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + /// upload convenience method. + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest? request, NSURL? fileURL, ObjCBlock43 completionHandler) { + final _ret = _lib._objc_msgSend_423( + _id, + _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, + request?._id ?? ffi.nullptr, + fileURL?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest? request, NSData? bodyData, ObjCBlock43 completionHandler) { + final _ret = _lib._objc_msgSend_424( + _id, + _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, + request?._id ?? ffi.nullptr, + bodyData?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + /// download task convenience methods. When a download successfully + /// completes, the NSURL will point to a file that must be read or + /// copied during the invocation of the completion routine. The file + /// will be removed automatically. + NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( + NSURLRequest? request, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_425( + _id, + _lib._sel_downloadTaskWithRequest_completionHandler_1, + request?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( + NSURL? url, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_426( + _id, + _lib._sel_downloadTaskWithURL_completionHandler_1, + url?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + NSData? resumeData, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_427( + _id, + _lib._sel_downloadTaskWithResumeData_completionHandler_1, + resumeData?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSession alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_alloc1); + return NSURLSession._(_ret, _lib, retain: false, release: true); + } +} + +/// Configuration options for an NSURLSession. When a session is +/// created, a copy of the configuration object is made - you cannot +/// modify the configuration of a session after it has been created. +/// +/// The shared session uses the global singleton credential, cache +/// and cookie storage objects. +/// +/// An ephemeral session has no persistent disk storage for cookies, +/// cache or credentials. +/// +/// A background session can be used to perform networking operations +/// on behalf of a suspended application, within certain constraints. +class NSURLSessionConfiguration extends NSObject { + NSURLSessionConfiguration._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionConfiguration] that points to the same underlying object as [other]. + static NSURLSessionConfiguration castFrom(T other) { + return NSURLSessionConfiguration._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. + static NSURLSessionConfiguration castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionConfiguration._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionConfiguration1); + } + + static NSURLSessionConfiguration? getDefaultSessionConfiguration( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_381(_lib._class_NSURLSessionConfiguration1, + _lib._sel_defaultSessionConfiguration1); + return _ret.address == 0 + ? null + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionConfiguration? getEphemeralSessionConfiguration( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_381(_lib._class_NSURLSessionConfiguration1, + _lib._sel_ephemeralSessionConfiguration1); + return _ret.address == 0 + ? null + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionConfiguration + backgroundSessionConfigurationWithIdentifier_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_382( + _lib._class_NSURLSessionConfiguration1, + _lib._sel_backgroundSessionConfigurationWithIdentifier_1, + identifier?._id ?? ffi.nullptr); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + /// identifier for the background session configuration + NSString? get identifier { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_identifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// default cache policy for requests + int get requestCachePolicy { + return _lib._objc_msgSend_355(_id, _lib._sel_requestCachePolicy1); + } + + /// default cache policy for requests + set requestCachePolicy(int value) { + _lib._objc_msgSend_358(_id, _lib._sel_setRequestCachePolicy_1, value); + } + + /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. + double get timeoutIntervalForRequest { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForRequest1); + } + + /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. + set timeoutIntervalForRequest(double value) { + _lib._objc_msgSend_337( + _id, _lib._sel_setTimeoutIntervalForRequest_1, value); + } + + /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. + double get timeoutIntervalForResource { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForResource1); + } + + /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. + set timeoutIntervalForResource(double value) { + _lib._objc_msgSend_337( + _id, _lib._sel_setTimeoutIntervalForResource_1, value); + } + + /// type of service for requests. + int get networkServiceType { + return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); + } + + /// type of service for requests. + set networkServiceType(int value) { + _lib._objc_msgSend_359(_id, _lib._sel_setNetworkServiceType_1, value); + } + + /// allow request to route over cellular. + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); + } + + /// allow request to route over cellular. + set allowsCellularAccess(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setAllowsCellularAccess_1, value); + } + + /// allow request to route over expensive networks. Defaults to YES. + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } + + /// allow request to route over expensive networks. Defaults to YES. + set allowsExpensiveNetworkAccess(bool value) { + _lib._objc_msgSend_328( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + } + + /// allow request to route over networks in constrained mode. Defaults to YES. + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } + + /// allow request to route over networks in constrained mode. Defaults to YES. + set allowsConstrainedNetworkAccess(bool value) { + _lib._objc_msgSend_328( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + } + + /// Causes tasks to wait for network connectivity to become available, rather + /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) + /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest + /// property does not apply, but the timeoutIntervalForResource property does. + /// + /// Unsatisfactory connectivity (that requires waiting) includes cases where the + /// device has limited or insufficient connectivity for a task (e.g., only has a + /// cellular connection but the allowsCellularAccess property is NO, or requires + /// a VPN connection in order to reach the desired host). + /// + /// Default value is NO. Ignored by background sessions, as background sessions + /// always wait for connectivity. + bool get waitsForConnectivity { + return _lib._objc_msgSend_11(_id, _lib._sel_waitsForConnectivity1); + } + + /// Causes tasks to wait for network connectivity to become available, rather + /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) + /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest + /// property does not apply, but the timeoutIntervalForResource property does. + /// + /// Unsatisfactory connectivity (that requires waiting) includes cases where the + /// device has limited or insufficient connectivity for a task (e.g., only has a + /// cellular connection but the allowsCellularAccess property is NO, or requires + /// a VPN connection in order to reach the desired host). + /// + /// Default value is NO. Ignored by background sessions, as background sessions + /// always wait for connectivity. + set waitsForConnectivity(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setWaitsForConnectivity_1, value); + } + + /// allows background tasks to be scheduled at the discretion of the system for optimal performance. + bool get discretionary { + return _lib._objc_msgSend_11(_id, _lib._sel_isDiscretionary1); + } + + /// allows background tasks to be scheduled at the discretion of the system for optimal performance. + set discretionary(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setDiscretionary_1, value); + } + + /// The identifier of the shared data container into which files in background sessions should be downloaded. + /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or + /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. + NSString? get sharedContainerIdentifier { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_sharedContainerIdentifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// The identifier of the shared data container into which files in background sessions should be downloaded. + /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or + /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. + set sharedContainerIdentifier(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setSharedContainerIdentifier_1, + value?._id ?? ffi.nullptr); + } + + /// Allows the app to be resumed or launched in the background when tasks in background sessions complete + /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: + /// and the default value is YES. + /// + /// NOTE: macOS apps based on AppKit do not support background launch. + bool get sessionSendsLaunchEvents { + return _lib._objc_msgSend_11(_id, _lib._sel_sessionSendsLaunchEvents1); + } + + /// Allows the app to be resumed or launched in the background when tasks in background sessions complete + /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: + /// and the default value is YES. + /// + /// NOTE: macOS apps based on AppKit do not support background launch. + set sessionSendsLaunchEvents(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); + } + + /// The proxy dictionary, as described by + NSDictionary? get connectionProxyDictionary { + final _ret = + _lib._objc_msgSend_180(_id, _lib._sel_connectionProxyDictionary1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// The proxy dictionary, as described by + set connectionProxyDictionary(NSDictionary? value) { + _lib._objc_msgSend_360(_id, _lib._sel_setConnectionProxyDictionary_1, + value?._id ?? ffi.nullptr); + } + + /// The minimum allowable versions of the TLS protocol, from + int get TLSMinimumSupportedProtocol { + return _lib._objc_msgSend_383(_id, _lib._sel_TLSMinimumSupportedProtocol1); + } + + /// The minimum allowable versions of the TLS protocol, from + set TLSMinimumSupportedProtocol(int value) { + _lib._objc_msgSend_384( + _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); + } + + /// The maximum allowable versions of the TLS protocol, from + int get TLSMaximumSupportedProtocol { + return _lib._objc_msgSend_383(_id, _lib._sel_TLSMaximumSupportedProtocol1); + } + + /// The maximum allowable versions of the TLS protocol, from + set TLSMaximumSupportedProtocol(int value) { + _lib._objc_msgSend_384( + _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); + } + + /// The minimum allowable versions of the TLS protocol, from + int get TLSMinimumSupportedProtocolVersion { + return _lib._objc_msgSend_385( + _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); + } + + /// The minimum allowable versions of the TLS protocol, from + set TLSMinimumSupportedProtocolVersion(int value) { + _lib._objc_msgSend_386( + _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); + } + + /// The maximum allowable versions of the TLS protocol, from + int get TLSMaximumSupportedProtocolVersion { + return _lib._objc_msgSend_385( + _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); + } + + /// The maximum allowable versions of the TLS protocol, from + set TLSMaximumSupportedProtocolVersion(int value) { + _lib._objc_msgSend_386( + _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); + } + + /// Allow the use of HTTP pipelining + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + } + + /// Allow the use of HTTP pipelining + set HTTPShouldUsePipelining(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + } + + /// Allow the session to set cookies on requests + bool get HTTPShouldSetCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldSetCookies1); + } + + /// Allow the session to set cookies on requests + set HTTPShouldSetCookies(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldSetCookies_1, value); + } + + /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. + int get HTTPCookieAcceptPolicy { + return _lib._objc_msgSend_369(_id, _lib._sel_HTTPCookieAcceptPolicy1); + } + + /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. + set HTTPCookieAcceptPolicy(int value) { + _lib._objc_msgSend_370(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); + } + + /// Specifies additional headers which will be set on outgoing requests. + /// Note that these headers are added to the request only if not already present. + NSDictionary? get HTTPAdditionalHeaders { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_HTTPAdditionalHeaders1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Specifies additional headers which will be set on outgoing requests. + /// Note that these headers are added to the request only if not already present. + set HTTPAdditionalHeaders(NSDictionary? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); + } + + /// The maximum number of simultanous persistent connections per host + int get HTTPMaximumConnectionsPerHost { + return _lib._objc_msgSend_81(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); + } + + /// The maximum number of simultanous persistent connections per host + set HTTPMaximumConnectionsPerHost(int value) { + _lib._objc_msgSend_342( + _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); + } + + /// The cookie storage object to use, or nil to indicate that no cookies should be handled + NSHTTPCookieStorage? get HTTPCookieStorage { + final _ret = _lib._objc_msgSend_364(_id, _lib._sel_HTTPCookieStorage1); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } + + /// The cookie storage object to use, or nil to indicate that no cookies should be handled + set HTTPCookieStorage(NSHTTPCookieStorage? value) { + _lib._objc_msgSend_387( + _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); + } + + /// The credential storage object, or nil to indicate that no credential storage is to be used + NSURLCredentialStorage? get URLCredentialStorage { + final _ret = _lib._objc_msgSend_388(_id, _lib._sel_URLCredentialStorage1); + return _ret.address == 0 + ? null + : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); + } + + /// The credential storage object, or nil to indicate that no credential storage is to be used + set URLCredentialStorage(NSURLCredentialStorage? value) { + _lib._objc_msgSend_389( + _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); + } + + /// The URL resource cache, or nil to indicate that no caching is to be performed + NSURLCache? get URLCache { + final _ret = _lib._objc_msgSend_390(_id, _lib._sel_URLCache1); + return _ret.address == 0 + ? null + : NSURLCache._(_ret, _lib, retain: true, release: true); + } + + /// The URL resource cache, or nil to indicate that no caching is to be performed + set URLCache(NSURLCache? value) { + _lib._objc_msgSend_391( + _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); + } + + /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open + /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) + bool get shouldUseExtendedBackgroundIdleMode { + return _lib._objc_msgSend_11( + _id, _lib._sel_shouldUseExtendedBackgroundIdleMode1); + } + + /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open + /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) + set shouldUseExtendedBackgroundIdleMode(bool value) { + _lib._objc_msgSend_328( + _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); + } + + /// An optional array of Class objects which subclass NSURLProtocol. + /// The Class will be sent +canInitWithRequest: when determining if + /// an instance of the class can be used for a given URL scheme. + /// You should not use +[NSURLProtocol registerClass:], as that + /// method will register your class with the default session rather + /// than with an instance of NSURLSession. + /// Custom NSURLProtocol subclasses are not available to background + /// sessions. + NSArray? get protocolClasses { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_protocolClasses1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// An optional array of Class objects which subclass NSURLProtocol. + /// The Class will be sent +canInitWithRequest: when determining if + /// an instance of the class can be used for a given URL scheme. + /// You should not use +[NSURLProtocol registerClass:], as that + /// method will register your class with the default session rather + /// than with an instance of NSURLSession. + /// Custom NSURLProtocol subclasses are not available to background + /// sessions. + set protocolClasses(NSArray? value) { + _lib._objc_msgSend_392( + _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); + } + + /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone + int get multipathServiceType { + return _lib._objc_msgSend_393(_id, _lib._sel_multipathServiceType1); + } + + /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone + set multipathServiceType(int value) { + _lib._objc_msgSend_394(_id, _lib._sel_setMultipathServiceType_1, value); + } + + @override + NSURLSessionConfiguration init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionConfiguration new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionConfiguration1, _lib._sel_new1); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionConfiguration backgroundSessionConfiguration_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_382( + _lib._class_NSURLSessionConfiguration1, + _lib._sel_backgroundSessionConfiguration_1, + identifier?._id ?? ffi.nullptr); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionConfiguration alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, release: true); + } +} + +class NSURLCredentialStorage extends _ObjCWrapper { + NSURLCredentialStorage._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLCredentialStorage] that points to the same underlying object as [other]. + static NSURLCredentialStorage castFrom(T other) { + return NSURLCredentialStorage._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. + static NSURLCredentialStorage castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLCredentialStorage._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLCredentialStorage1); + } +} + +class NSURLCache extends _ObjCWrapper { + NSURLCache._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLCache] that points to the same underlying object as [other]. + static NSURLCache castFrom(T other) { + return NSURLCache._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLCache] that wraps the given raw object pointer. + static NSURLCache castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLCache._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLCache]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); + } +} + +/// ! +/// @enum NSURLSessionMultipathServiceType +/// +/// @discussion The NSURLSessionMultipathServiceType enum defines constants that +/// can be used to specify the multipath service type to associate an NSURLSession. The +/// multipath service type determines whether multipath TCP should be attempted and the conditions +/// for creating and switching between subflows. Using these service types requires the appropriate entitlement. Any connection attempt will fail if the process does not have the required entitlement. +/// A primary interface is a generally less expensive interface in terms of both cost and power (such as WiFi or ethernet). A secondary interface is more expensive (such as 3G or LTE). +/// +/// @constant NSURLSessionMultipathServiceTypeNone Specifies that multipath tcp should not be used. Connections will use a single flow. +/// This is the default value. No entitlement is required to set this value. +/// +/// @constant NSURLSessionMultipathServiceTypeHandover Specifies that a secondary subflow should only be used +/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entilement. +/// +/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secodary subflow should be used if the +/// primary subflow is not performing adequately (packet loss, high round trip times, bandwidth issues). The secondary +/// subflow will be created more aggressively than with NSURLSessionMultipathServiceTypeHandover. Requires the com.apple.developer.networking.multipath entitlement. +/// +/// @constant NSURLSessionMultipathServiceTypeAggregate Specifies that multiple subflows across multiple interfaces should be +/// used for better bandwidth. This mode is only available for experimentation on devices configured for development use. +/// It can be enabled in the Developer section of the Settings app. +abstract class NSURLSessionMultipathServiceType { + /// None - no multipath (default) + static const int NSURLSessionMultipathServiceTypeNone = 0; + + /// Handover - secondary flows brought up when primary flow is not performing adequately. + static const int NSURLSessionMultipathServiceTypeHandover = 1; + + /// Interactive - secondary flows created more aggressively. + static const int NSURLSessionMultipathServiceTypeInteractive = 2; + + /// Aggregate - multiple subflows used for greater bandwitdh. + static const int NSURLSessionMultipathServiceTypeAggregate = 3; +} + +void _ObjCBlock38_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock38_closureRegistry = {}; +int _ObjCBlock38_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock38_registerClosure(Function fn) { + final id = ++_ObjCBlock38_closureRegistryIndex; + _ObjCBlock38_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock38_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock38_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock38 extends _ObjCBlockBase { + ObjCBlock38._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock38.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock38_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock38.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock38_closureTrampoline) + .cast(), + _ObjCBlock38_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +/// An NSURLSessionDataTask does not provide any additional +/// functionality over an NSURLSessionTask and its presence is merely +/// to provide lexical differentiation from download and upload tasks. +class NSURLSessionDataTask extends NSURLSessionTask { + NSURLSessionDataTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. + static NSURLSessionDataTask castFrom(T other) { + return NSURLSessionDataTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. + static NSURLSessionDataTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionDataTask._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionDataTask1); + } + + @override + NSURLSessionDataTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionDataTask new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionDataTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } +} + +/// An NSURLSessionUploadTask does not currently provide any additional +/// functionality over an NSURLSessionDataTask. All delegate messages +/// that may be sent referencing an NSURLSessionDataTask equally apply +/// to NSURLSessionUploadTasks. +class NSURLSessionUploadTask extends NSURLSessionDataTask { + NSURLSessionUploadTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionUploadTask] that points to the same underlying object as [other]. + static NSURLSessionUploadTask castFrom(T other) { + return NSURLSessionUploadTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. + static NSURLSessionUploadTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionUploadTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionUploadTask1); + } + + @override + NSURLSessionUploadTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionUploadTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionUploadTask1, _lib._sel_new1); + return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionUploadTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionUploadTask1, _lib._sel_alloc1); + return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + } +} + +/// NSURLSessionDownloadTask is a task that represents a download to +/// local storage. +class NSURLSessionDownloadTask extends NSURLSessionTask { + NSURLSessionDownloadTask._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. + static NSURLSessionDownloadTask castFrom(T other) { + return NSURLSessionDownloadTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. + static NSURLSessionDownloadTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionDownloadTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionDownloadTask1); + } + + /// Cancel the download (and calls the superclass -cancel). If + /// conditions will allow for resuming the download in the future, the + /// callback will be called with an opaque data blob, which may be used + /// with -downloadTaskWithResumeData: to attempt to resume the download. + /// If resume data cannot be created, the completion handler will be + /// called with nil resumeData. + void cancelByProducingResumeData_(ObjCBlock39 completionHandler) { + return _lib._objc_msgSend_404( + _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); + } + + @override + NSURLSessionDownloadTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionDownloadTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_new1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionDownloadTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_alloc1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + } +} + +void _ObjCBlock39_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} + +final _ObjCBlock39_closureRegistry = {}; +int _ObjCBlock39_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock39_registerClosure(Function fn) { + final id = ++_ObjCBlock39_closureRegistryIndex; + _ObjCBlock39_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock39_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock39_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock39 extends _ObjCBlockBase { + ObjCBlock39._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock39.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock39_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock39.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock39_closureTrampoline) + .cast(), + _ObjCBlock39_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +/// An NSURLSessionStreamTask provides an interface to perform reads +/// and writes to a TCP/IP stream created via NSURLSession. This task +/// may be explicitly created from an NSURLSession, or created as a +/// result of the appropriate disposition response to a +/// -URLSession:dataTask:didReceiveResponse: delegate message. +/// +/// NSURLSessionStreamTask can be used to perform asynchronous reads +/// and writes. Reads and writes are enquened and executed serially, +/// with the completion handler being invoked on the sessions delegate +/// queuee. If an error occurs, or the task is canceled, all +/// outstanding read and write calls will have their completion +/// handlers invoked with an appropriate error. +/// +/// It is also possible to create NSInputStream and NSOutputStream +/// instances from an NSURLSessionTask by sending +/// -captureStreams to the task. All outstanding read and writess are +/// completed before the streams are created. Once the streams are +/// delivered to the session delegate, the task is considered complete +/// and will receive no more messsages. These streams are +/// disassociated from the underlying session. +class NSURLSessionStreamTask extends NSURLSessionTask { + NSURLSessionStreamTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionStreamTask] that points to the same underlying object as [other]. + static NSURLSessionStreamTask castFrom(T other) { + return NSURLSessionStreamTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. + static NSURLSessionStreamTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionStreamTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionStreamTask1); + } + + /// Read minBytes, or at most maxBytes bytes and invoke the completion + /// handler on the sessions delegate queue with the data or an error. + /// If an error occurs, any outstanding reads will also fail, and new + /// read requests will error out immediately. + void readDataOfMinLength_maxLength_timeout_completionHandler_(int minBytes, + int maxBytes, double timeout, ObjCBlock40 completionHandler) { + return _lib._objc_msgSend_408( + _id, + _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, + minBytes, + maxBytes, + timeout, + completionHandler._id); + } + + /// Write the data completely to the underlying socket. If all the + /// bytes have not been written by the timeout, a timeout error will + /// occur. Note that invocation of the completion handler does not + /// guarantee that the remote side has received all the bytes, only + /// that they have been written to the kernel. + void writeData_timeout_completionHandler_( + NSData? data, double timeout, ObjCBlock41 completionHandler) { + return _lib._objc_msgSend_409( + _id, + _lib._sel_writeData_timeout_completionHandler_1, + data?._id ?? ffi.nullptr, + timeout, + completionHandler._id); + } + + /// -captureStreams completes any already enqueued reads + /// and writes, and then invokes the + /// URLSession:streamTask:didBecomeInputStream:outputStream: delegate + /// message. When that message is received, the task object is + /// considered completed and will not receive any more delegate + /// messages. + void captureStreams() { + return _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); + } + + /// Enqueue a request to close the write end of the underlying socket. + /// All outstanding IO will complete before the write side of the + /// socket is closed. The server, however, may continue to write bytes + /// back to the client, so best practice is to continue reading from + /// the server until you receive EOF. + void closeWrite() { + return _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); + } + + /// Enqueue a request to close the read side of the underlying socket. + /// All outstanding IO will complete before the read side is closed. + /// You may continue writing to the server. + void closeRead() { + return _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); + } + + /// Begin encrypted handshake. The hanshake begins after all pending + /// IO has completed. TLS authentication callbacks are sent to the + /// session's -URLSession:task:didReceiveChallenge:completionHandler: + void startSecureConnection() { + return _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); + } + + /// Cleanly close a secure connection after all pending secure IO has + /// completed. + /// + /// @warning This API is non-functional. + void stopSecureConnection() { + return _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); + } + + @override + NSURLSessionStreamTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionStreamTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionStreamTask1, _lib._sel_new1); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionStreamTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + } +} + +void _ObjCBlock40_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock40_closureRegistry = {}; +int _ObjCBlock40_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock40_registerClosure(Function fn) { + final id = ++_ObjCBlock40_closureRegistryIndex; + _ObjCBlock40_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock40_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _ObjCBlock40_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock40 extends _ObjCBlockBase { + ObjCBlock40._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock40.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock40_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock40.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock40_closureTrampoline) + .cast(), + _ObjCBlock40_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +void _ObjCBlock41_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} + +final _ObjCBlock41_closureRegistry = {}; +int _ObjCBlock41_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock41_registerClosure(Function fn) { + final id = ++_ObjCBlock41_closureRegistryIndex; + _ObjCBlock41_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock41_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock41_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock41 extends _ObjCBlockBase { + ObjCBlock41._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock41.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock41_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock41.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock41_closureTrampoline) + .cast(), + _ObjCBlock41_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +class NSNetService extends _ObjCWrapper { + NSNetService._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNetService] that points to the same underlying object as [other]. + static NSNetService castFrom(T other) { + return NSNetService._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSNetService] that wraps the given raw object pointer. + static NSNetService castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNetService._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNetService]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNetService1); + } +} + +/// A WebSocket task can be created with a ws or wss url. A client can also provide +/// a list of protocols it wishes to advertise during the WebSocket handshake phase. +/// Once the handshake is successfully completed the client will be notified through an optional delegate. +/// All reads and writes enqueued before the completion of the handshake will be queued up and +/// executed once the hanshake succeeds. Before the handshake completes, the client can be called to handle +/// redirection or authentication using the same delegates as NSURLSessionTask. WebSocket task will also provide +/// support for cookies and will store cookies to the cookie storage on the session and will attach cookies to +/// outgoing HTTP handshake requests. +class NSURLSessionWebSocketTask extends NSURLSessionTask { + NSURLSessionWebSocketTask._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. + static NSURLSessionWebSocketTask castFrom(T other) { + return NSURLSessionWebSocketTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. + static NSURLSessionWebSocketTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionWebSocketTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionWebSocketTask1); + } + + /// Sends a WebSocket message. If an error occurs, any outstanding work will also fail. + /// Note that invocation of the completion handler does not + /// guarantee that the remote side has received all the bytes, only + /// that they have been written to the kernel. + void sendMessage_completionHandler_( + NSURLSessionWebSocketMessage? message, ObjCBlock41 completionHandler) { + return _lib._objc_msgSend_413( + _id, + _lib._sel_sendMessage_completionHandler_1, + message?._id ?? ffi.nullptr, + completionHandler._id); + } + + /// Reads a WebSocket message once all the frames of the message are available. + /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out + /// and all outstanding work will also fail resulting in the end of the task. + void receiveMessageWithCompletionHandler_(ObjCBlock42 completionHandler) { + return _lib._objc_msgSend_414(_id, + _lib._sel_receiveMessageWithCompletionHandler_1, completionHandler._id); + } + + /// Sends a ping frame from the client side. The pongReceiveHandler is invoked when the client + /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving + /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. + /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. + void sendPingWithPongReceiveHandler_(ObjCBlock41 pongReceiveHandler) { + return _lib._objc_msgSend_415(_id, + _lib._sel_sendPingWithPongReceiveHandler_1, pongReceiveHandler._id); + } + + /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. + /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. + void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { + return _lib._objc_msgSend_416(_id, _lib._sel_cancelWithCloseCode_reason_1, + closeCode, reason?._id ?? ffi.nullptr); + } + + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Recieve calls will error out if this value is reached + int get maximumMessageSize { + return _lib._objc_msgSend_81(_id, _lib._sel_maximumMessageSize1); + } + + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Recieve calls will error out if this value is reached + set maximumMessageSize(int value) { + _lib._objc_msgSend_342(_id, _lib._sel_setMaximumMessageSize_1, value); + } + + /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid + int get closeCode { + return _lib._objc_msgSend_417(_id, _lib._sel_closeCode1); + } + + /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running + NSData? get closeReason { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_closeReason1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLSessionWebSocketTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionWebSocketTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketTask1, _lib._sel_new1); + return NSURLSessionWebSocketTask._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionWebSocketTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketTask1, _lib._sel_alloc1); + return NSURLSessionWebSocketTask._(_ret, _lib, + retain: false, release: true); + } +} + +/// The client can create a WebSocket message object that will be passed to the send calls +/// and will be delivered from the receive calls. The message can be initialized with data or string. +/// If initialized with data, the string property will be nil and vice versa. +class NSURLSessionWebSocketMessage extends NSObject { + NSURLSessionWebSocketMessage._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. + static NSURLSessionWebSocketMessage castFrom( + T other) { + return NSURLSessionWebSocketMessage._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. + static NSURLSessionWebSocketMessage castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionWebSocketMessage._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionWebSocketMessage1); + } + + /// Create a message with data type + NSURLSessionWebSocketMessage initWithData_(NSData? data) { + final _ret = _lib._objc_msgSend_217( + _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } + + /// Create a message with string type + NSURLSessionWebSocketMessage initWithString_(NSString? string) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, string?._id ?? ffi.nullptr); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } + + int get type { + return _lib._objc_msgSend_412(_id, _lib._sel_type1); + } + + NSData? get data { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSString? get string { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLSessionWebSocketMessage init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } + + static NSURLSessionWebSocketMessage new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_new1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionWebSocketMessage alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_alloc1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: false, release: true); + } +} + +abstract class NSURLSessionWebSocketMessageType { + static const int NSURLSessionWebSocketMessageTypeData = 0; + static const int NSURLSessionWebSocketMessageTypeString = 1; +} + +void _ObjCBlock42_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock42_closureRegistry = {}; +int _ObjCBlock42_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock42_registerClosure(Function fn) { + final id = ++_ObjCBlock42_closureRegistryIndex; + _ObjCBlock42_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock42_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock42_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock42 extends _ObjCBlockBase { + ObjCBlock42._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock42.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock42_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock42.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock42_closureTrampoline) + .cast(), + _ObjCBlock42_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +/// The WebSocket close codes follow the close codes given in the RFC +abstract class NSURLSessionWebSocketCloseCode { + static const int NSURLSessionWebSocketCloseCodeInvalid = 0; + static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; + static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; + static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; + static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; + static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; + static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; + static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; + static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; + static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; + static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = + 1010; + static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; + static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; +} + +void _ObjCBlock43_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock43_closureRegistry = {}; +int _ObjCBlock43_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock43_registerClosure(Function fn) { + final id = ++_ObjCBlock43_closureRegistryIndex; + _ObjCBlock43_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock43_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock43_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock43 extends _ObjCBlockBase { + ObjCBlock43._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock43.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock43_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock43.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock43_closureTrampoline) + .cast(), + _ObjCBlock43_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +void _ObjCBlock44_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock44_closureRegistry = {}; +int _ObjCBlock44_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock44_registerClosure(Function fn) { + final id = ++_ObjCBlock44_closureRegistryIndex; + _ObjCBlock44_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock44_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock44_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock44 extends _ObjCBlockBase { + ObjCBlock44._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock44.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock44_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock44.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock44_closureTrampoline) + .cast(), + _ObjCBlock44_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +/// Disposition options for various delegate messages +abstract class NSURLSessionDelayedRequestDisposition { + /// Use the original request provided when the task was created; the request parameter is ignored. + static const int NSURLSessionDelayedRequestContinueLoading = 0; + + /// Use the specified request, which may not be nil. + static const int NSURLSessionDelayedRequestUseNewRequest = 1; + + /// Cancel the task; the request parameter is ignored. + static const int NSURLSessionDelayedRequestCancel = 2; +} + +abstract class NSURLSessionAuthChallengeDisposition { + /// Use the specified credential, which may be nil + static const int NSURLSessionAuthChallengeUseCredential = 0; + + /// Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored. + static const int NSURLSessionAuthChallengePerformDefaultHandling = 1; + + /// The entire request will be canceled; the credential parameter is ignored. + static const int NSURLSessionAuthChallengeCancelAuthenticationChallenge = 2; + + /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. + static const int NSURLSessionAuthChallengeRejectProtectionSpace = 3; +} + +abstract class NSURLSessionResponseDisposition { + /// Cancel the load, this is the same as -[task cancel] + static const int NSURLSessionResponseCancel = 0; + + /// Allow the load to continue + static const int NSURLSessionResponseAllow = 1; + + /// Turn this request into a download + static const int NSURLSessionResponseBecomeDownload = 2; + + /// Turn this task into a stream task + static const int NSURLSessionResponseBecomeStream = 3; +} + +/// The resource fetch type. +abstract class NSURLSessionTaskMetricsResourceFetchType { + static const int NSURLSessionTaskMetricsResourceFetchTypeUnknown = 0; + + /// The resource was loaded over the network. + static const int NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad = 1; + + /// The resource was pushed by the server to the client. + static const int NSURLSessionTaskMetricsResourceFetchTypeServerPush = 2; + + /// The resource was retrieved from the local storage. + static const int NSURLSessionTaskMetricsResourceFetchTypeLocalCache = 3; +} + +/// DNS protocol used for domain resolution. +abstract class NSURLSessionTaskMetricsDomainResolutionProtocol { + static const int NSURLSessionTaskMetricsDomainResolutionProtocolUnknown = 0; + + /// Resolution used DNS over UDP. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolUDP = 1; + + /// Resolution used DNS over TCP. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolTCP = 2; + + /// Resolution used DNS over TLS. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolTLS = 3; + + /// Resolution used DNS over HTTPS. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS = 4; +} + +/// This class defines the performance metrics collected for a request/response transaction during the task execution. +class NSURLSessionTaskTransactionMetrics extends NSObject { + NSURLSessionTaskTransactionMetrics._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionTaskTransactionMetrics] that points to the same underlying object as [other]. + static NSURLSessionTaskTransactionMetrics castFrom( + T other) { + return NSURLSessionTaskTransactionMetrics._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionTaskTransactionMetrics] that wraps the given raw object pointer. + static NSURLSessionTaskTransactionMetrics castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionTaskTransactionMetrics._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionTaskTransactionMetrics]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionTaskTransactionMetrics1); + } + + /// Represents the transaction request. + NSURLRequest? get request { + final _ret = _lib._objc_msgSend_371(_id, _lib._sel_request1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// Represents the transaction response. Can be nil if error occurred and no response was generated. + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_373(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// fetchStartDate returns the time when the user agent started fetching the resource, whether or not the resource was retrieved from the server or local resources. + /// + /// The following metrics will be set to nil, if a persistent connection was used or the resource was retrieved from local resources: + /// + /// domainLookupStartDate + /// domainLookupEndDate + /// connectStartDate + /// connectEndDate + /// secureConnectionStartDate + /// secureConnectionEndDate + NSDate? get fetchStartDate { + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_fetchStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// domainLookupStartDate returns the time immediately before the user agent started the name lookup for the resource. + NSDate? get domainLookupStartDate { + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_domainLookupStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// domainLookupEndDate returns the time after the name lookup was completed. + NSDate? get domainLookupEndDate { + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_domainLookupEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// connectStartDate is the time immediately before the user agent started establishing the connection to the server. + /// + /// For example, this would correspond to the time immediately before the user agent started trying to establish the TCP connection. + NSDate? get connectStartDate { + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_connectStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// If an encrypted connection was used, secureConnectionStartDate is the time immediately before the user agent started the security handshake to secure the current connection. + /// + /// For example, this would correspond to the time immediately before the user agent started the TLS handshake. + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSDate? get secureConnectionStartDate { + final _ret = + _lib._objc_msgSend_353(_id, _lib._sel_secureConnectionStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// If an encrypted connection was used, secureConnectionEndDate is the time immediately after the security handshake completed. + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSDate? get secureConnectionEndDate { + final _ret = + _lib._objc_msgSend_353(_id, _lib._sel_secureConnectionEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// connectEndDate is the time immediately after the user agent finished establishing the connection to the server, including completion of security-related and other handshakes. + NSDate? get connectEndDate { + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_connectEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// requestStartDate is the time immediately before the user agent started requesting the source, regardless of whether the resource was retrieved from the server or local resources. + /// + /// For example, this would correspond to the time immediately before the user agent sent an HTTP GET request. + NSDate? get requestStartDate { + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_requestStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// requestEndDate is the time immediately after the user agent finished requesting the source, regardless of whether the resource was retrieved from the server or local resources. + /// + /// For example, this would correspond to the time immediately after the user agent finished sending the last byte of the request. + NSDate? get requestEndDate { + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_requestEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// responseStartDate is the time immediately after the user agent received the first byte of the response from the server or from local resources. + /// + /// For example, this would correspond to the time immediately after the user agent received the first byte of an HTTP response. + NSDate? get responseStartDate { + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_responseStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// responseEndDate is the time immediately after the user agent received the last byte of the resource. + NSDate? get responseEndDate { + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_responseEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// The network protocol used to fetch the resource, as identified by the ALPN Protocol ID Identification Sequence [RFC7301]. + /// E.g., h2, http/1.1, spdy/3.1. + /// + /// When a proxy is configured AND a tunnel connection is established, then this attribute returns the value for the tunneled protocol. + /// + /// For example: + /// If no proxy were used, and HTTP/2 was negotiated, then h2 would be returned. + /// If HTTP/1.1 were used to the proxy, and the tunneled connection was HTTP/2, then h2 would be returned. + /// If HTTP/1.1 were used to the proxy, and there were no tunnel, then http/1.1 would be returned. + NSString? get networkProtocolName { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_networkProtocolName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// This property is set to YES if a proxy connection was used to fetch the resource. + bool get proxyConnection { + return _lib._objc_msgSend_11(_id, _lib._sel_isProxyConnection1); + } + + /// This property is set to YES if a persistent connection was used to fetch the resource. + bool get reusedConnection { + return _lib._objc_msgSend_11(_id, _lib._sel_isReusedConnection1); + } + + /// Indicates whether the resource was loaded, pushed or retrieved from the local cache. + int get resourceFetchType { + return _lib._objc_msgSend_428(_id, _lib._sel_resourceFetchType1); + } + + /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. + int get countOfRequestHeaderBytesSent { + return _lib._objc_msgSend_325( + _id, _lib._sel_countOfRequestHeaderBytesSent1); + } + + /// countOfRequestBodyBytesSent is the number of bytes transferred for request body. + /// It includes protocol-specific framing, transfer encoding, and content encoding. + int get countOfRequestBodyBytesSent { + return _lib._objc_msgSend_325(_id, _lib._sel_countOfRequestBodyBytesSent1); + } + + /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. + int get countOfRequestBodyBytesBeforeEncoding { + return _lib._objc_msgSend_325( + _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); + } + + /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. + int get countOfResponseHeaderBytesReceived { + return _lib._objc_msgSend_325( + _id, _lib._sel_countOfResponseHeaderBytesReceived1); + } + + /// countOfResponseBodyBytesReceived is the number of bytes transferred for response header. + /// It includes protocol-specific framing, transfer encoding, and content encoding. + int get countOfResponseBodyBytesReceived { + return _lib._objc_msgSend_325( + _id, _lib._sel_countOfResponseBodyBytesReceived1); + } + + /// countOfResponseBodyBytesAfterDecoding is the size of data delivered to your delegate or completion handler. + int get countOfResponseBodyBytesAfterDecoding { + return _lib._objc_msgSend_325( + _id, _lib._sel_countOfResponseBodyBytesAfterDecoding1); + } + + /// localAddress is the IP address string of the local interface for the connection. + /// + /// For multipath protocols, this is the local address of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSString? get localAddress { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localAddress1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// localPort is the port number of the local interface for the connection. + /// + /// For multipath protocols, this is the local port of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSNumber? get localPort { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_localPort1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + /// remoteAddress is the IP address string of the remote interface for the connection. + /// + /// For multipath protocols, this is the remote address of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSString? get remoteAddress { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_remoteAddress1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// remotePort is the port number of the remote interface for the connection. + /// + /// For multipath protocols, this is the remote port of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSNumber? get remotePort { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_remotePort1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + /// negotiatedTLSProtocolVersion is the TLS protocol version negotiated for the connection. + /// It is a 2-byte sequence in host byte order. + /// + /// Please refer to tls_protocol_version_t enum in Security/SecProtocolTypes.h + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSNumber? get negotiatedTLSProtocolVersion { + final _ret = + _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSProtocolVersion1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + /// negotiatedTLSCipherSuite is the TLS cipher suite negotiated for the connection. + /// It is a 2-byte sequence in host byte order. + /// + /// Please refer to tls_ciphersuite_t enum in Security/SecProtocolTypes.h + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSNumber? get negotiatedTLSCipherSuite { + final _ret = + _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSCipherSuite1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + /// Whether the connection is established over a cellular interface. + bool get cellular { + return _lib._objc_msgSend_11(_id, _lib._sel_isCellular1); + } + + /// Whether the connection is established over an expensive interface. + bool get expensive { + return _lib._objc_msgSend_11(_id, _lib._sel_isExpensive1); + } + + /// Whether the connection is established over a constrained interface. + bool get constrained { + return _lib._objc_msgSend_11(_id, _lib._sel_isConstrained1); + } + + /// Whether a multipath protocol is successfully negotiated for the connection. + bool get multipath { + return _lib._objc_msgSend_11(_id, _lib._sel_isMultipath1); + } + + /// DNS protocol used for domain resolution. + int get domainResolutionProtocol { + return _lib._objc_msgSend_429(_id, _lib._sel_domainResolutionProtocol1); + } + + @override + NSURLSessionTaskTransactionMetrics init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: true, release: true); + } + + static NSURLSessionTaskTransactionMetrics new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_new1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionTaskTransactionMetrics alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_alloc1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: false, release: true); + } +} + +class NSURLSessionTaskMetrics extends NSObject { + NSURLSessionTaskMetrics._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionTaskMetrics] that points to the same underlying object as [other]. + static NSURLSessionTaskMetrics castFrom(T other) { + return NSURLSessionTaskMetrics._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionTaskMetrics] that wraps the given raw object pointer. + static NSURLSessionTaskMetrics castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionTaskMetrics._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionTaskMetrics]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionTaskMetrics1); + } + + /// transactionMetrics array contains the metrics collected for every request/response transaction created during the task execution. + NSArray? get transactionMetrics { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_transactionMetrics1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// Interval from the task creation time to the task completion time. + /// Task creation time is the time when the task was instantiated. + /// Task completion time is the time when the task is about to change its internal state to completed. + NSDateInterval? get taskInterval { + final _ret = _lib._objc_msgSend_430(_id, _lib._sel_taskInterval1); + return _ret.address == 0 + ? null + : NSDateInterval._(_ret, _lib, retain: true, release: true); + } + + /// redirectCount is the number of redirects that were recorded. + int get redirectCount { + return _lib._objc_msgSend_12(_id, _lib._sel_redirectCount1); + } + + @override + NSURLSessionTaskMetrics init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionTaskMetrics new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTaskMetrics1, _lib._sel_new1); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionTaskMetrics alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTaskMetrics1, _lib._sel_alloc1); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); + } +} + +class NSDateInterval extends _ObjCWrapper { + NSDateInterval._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDateInterval] that points to the same underlying object as [other]. + static NSDateInterval castFrom(T other) { + return NSDateInterval._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSDateInterval] that wraps the given raw object pointer. + static NSDateInterval castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDateInterval._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDateInterval]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSDateInterval1); + } +} + +abstract class NSItemProviderRepresentationVisibility { + static const int NSItemProviderRepresentationVisibilityAll = 0; + static const int NSItemProviderRepresentationVisibilityTeam = 1; + static const int NSItemProviderRepresentationVisibilityGroup = 2; + static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; +} + +abstract class NSItemProviderFileOptions { + static const int NSItemProviderFileOptionOpenInPlace = 1; +} + +class NSItemProvider extends NSObject { + NSItemProvider._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSItemProvider] that points to the same underlying object as [other]. + static NSItemProvider castFrom(T other) { + return NSItemProvider._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSItemProvider] that wraps the given raw object pointer. + static NSItemProvider castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSItemProvider._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSItemProvider]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSItemProvider1); + } + + @override + NSItemProvider init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } + + void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( + NSString? typeIdentifier, int visibility, ObjCBlock45 loadHandler) { + return _lib._objc_msgSend_431( + _id, + _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + visibility, + loadHandler._id); + } + + void + registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( + NSString? typeIdentifier, + int fileOptions, + int visibility, + ObjCBlock47 loadHandler) { + return _lib._objc_msgSend_432( + _id, + _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + fileOptions, + visibility, + loadHandler._id); + } + + NSArray? get registeredTypeIdentifiers { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_registeredTypeIdentifiers1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { + final _ret = _lib._objc_msgSend_433( + _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + bool hasItemConformingToTypeIdentifier_(NSString? typeIdentifier) { + return _lib._objc_msgSend_22( + _id, + _lib._sel_hasItemConformingToTypeIdentifier_1, + typeIdentifier?._id ?? ffi.nullptr); + } + + bool hasRepresentationConformingToTypeIdentifier_fileOptions_( + NSString? typeIdentifier, int fileOptions) { + return _lib._objc_msgSend_434( + _id, + _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, + typeIdentifier?._id ?? ffi.nullptr, + fileOptions); + } + + NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( + NSString? typeIdentifier, ObjCBlock46 completionHandler) { + final _ret = _lib._objc_msgSend_435( + _id, + _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( + NSString? typeIdentifier, ObjCBlock49 completionHandler) { + final _ret = _lib._objc_msgSend_436( + _id, + _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( + NSString? typeIdentifier, ObjCBlock48 completionHandler) { + final _ret = _lib._objc_msgSend_437( + _id, + _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSString? get suggestedName { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set suggestedName(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); + } + + NSItemProvider initWithObject_(NSObject? object) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_initWithObject_1, object?._id ?? ffi.nullptr); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } + + void registerObject_visibility_(NSObject? object, int visibility) { + return _lib._objc_msgSend_438(_id, _lib._sel_registerObject_visibility_1, + object?._id ?? ffi.nullptr, visibility); + } + + void registerObjectOfClass_visibility_loadHandler_( + NSObject? aClass, int visibility, ObjCBlock50 loadHandler) { + return _lib._objc_msgSend_439( + _id, + _lib._sel_registerObjectOfClass_visibility_loadHandler_1, + aClass?._id ?? ffi.nullptr, + visibility, + loadHandler._id); + } + + bool canLoadObjectOfClass_(NSObject? aClass) { + return _lib._objc_msgSend_0( + _id, _lib._sel_canLoadObjectOfClass_1, aClass?._id ?? ffi.nullptr); + } + + NSProgress loadObjectOfClass_completionHandler_( + NSObject? aClass, ObjCBlock51 completionHandler) { + final _ret = _lib._objc_msgSend_440( + _id, + _lib._sel_loadObjectOfClass_completionHandler_1, + aClass?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSItemProvider initWithItem_typeIdentifier_( + NSObject? item, NSString? typeIdentifier) { + final _ret = _lib._objc_msgSend_441( + _id, + _lib._sel_initWithItem_typeIdentifier_1, + item?._id ?? ffi.nullptr, + typeIdentifier?._id ?? ffi.nullptr); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } + + NSItemProvider initWithContentsOfURL_(NSURL? fileURL) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithContentsOfURL_1, fileURL?._id ?? ffi.nullptr); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } + + void registerItemForTypeIdentifier_loadHandler_( + NSString? typeIdentifier, NSItemProviderLoadHandler loadHandler) { + return _lib._objc_msgSend_442( + _id, + _lib._sel_registerItemForTypeIdentifier_loadHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + loadHandler); + } + + void loadItemForTypeIdentifier_options_completionHandler_( + NSString? typeIdentifier, + NSDictionary? options, + NSItemProviderCompletionHandler completionHandler) { + return _lib._objc_msgSend_443( + _id, + _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + options?._id ?? ffi.nullptr, + completionHandler); + } + + NSItemProviderLoadHandler get previewImageHandler { + return _lib._objc_msgSend_444(_id, _lib._sel_previewImageHandler1); + } + + set previewImageHandler(NSItemProviderLoadHandler value) { + _lib._objc_msgSend_445(_id, _lib._sel_setPreviewImageHandler_1, value); + } + + void loadPreviewImageWithOptions_completionHandler_(NSDictionary? options, + NSItemProviderCompletionHandler completionHandler) { + return _lib._objc_msgSend_446( + _id, + _lib._sel_loadPreviewImageWithOptions_completionHandler_1, + options?._id ?? ffi.nullptr, + completionHandler); + } + + static NSItemProvider new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_new1); + return NSItemProvider._(_ret, _lib, retain: false, release: true); + } + + static NSItemProvider alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_alloc1); + return NSItemProvider._(_ret, _lib, retain: false, release: true); + } +} + +ffi.Pointer _ObjCBlock45_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>()(arg0); +} + +final _ObjCBlock45_closureRegistry = {}; +int _ObjCBlock45_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock45_registerClosure(Function fn) { + final id = ++_ObjCBlock45_closureRegistryIndex; + _ObjCBlock45_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer _ObjCBlock45_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return _ObjCBlock45_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock45 extends _ObjCBlockBase { + ObjCBlock45._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock45.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock45_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock45.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock45_closureTrampoline) + .cast(), + _ObjCBlock45_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +void _ObjCBlock46_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock46_closureRegistry = {}; +int _ObjCBlock46_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock46_registerClosure(Function fn) { + final id = ++_ObjCBlock46_closureRegistryIndex; + _ObjCBlock46_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock46_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock46_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock46 extends _ObjCBlockBase { + ObjCBlock46._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock46.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock46_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock46.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock46_closureTrampoline) + .cast(), + _ObjCBlock46_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +ffi.Pointer _ObjCBlock47_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>()(arg0); +} + +final _ObjCBlock47_closureRegistry = {}; +int _ObjCBlock47_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock47_registerClosure(Function fn) { + final id = ++_ObjCBlock47_closureRegistryIndex; + _ObjCBlock47_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer _ObjCBlock47_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return _ObjCBlock47_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock47 extends _ObjCBlockBase { + ObjCBlock47._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock47.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock47_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock47.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock47_closureTrampoline) + .cast(), + _ObjCBlock47_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +void _ObjCBlock48_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock48_closureRegistry = {}; +int _ObjCBlock48_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock48_registerClosure(Function fn) { + final id = ++_ObjCBlock48_closureRegistryIndex; + _ObjCBlock48_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock48_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _ObjCBlock48_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock48 extends _ObjCBlockBase { + ObjCBlock48._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock48.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock48_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock48.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock48_closureTrampoline) + .cast(), + _ObjCBlock48_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +void _ObjCBlock49_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock49_closureRegistry = {}; +int _ObjCBlock49_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock49_registerClosure(Function fn) { + final id = ++_ObjCBlock49_closureRegistryIndex; + _ObjCBlock49_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock49_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock49_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock49 extends _ObjCBlockBase { + ObjCBlock49._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock49.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock49_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock49.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock49_closureTrampoline) + .cast(), + _ObjCBlock49_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +ffi.Pointer _ObjCBlock50_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>()(arg0); +} + +final _ObjCBlock50_closureRegistry = {}; +int _ObjCBlock50_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock50_registerClosure(Function fn) { + final id = ++_ObjCBlock50_closureRegistryIndex; + _ObjCBlock50_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer _ObjCBlock50_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return _ObjCBlock50_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock50 extends _ObjCBlockBase { + ObjCBlock50._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock50.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock50_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock50.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock50_closureTrampoline) + .cast(), + _ObjCBlock50_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +void _ObjCBlock51_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock51_closureRegistry = {}; +int _ObjCBlock51_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock51_registerClosure(Function fn) { + final id = ++_ObjCBlock51_closureRegistryIndex; + _ObjCBlock51_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock51_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock51_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock51 extends _ObjCBlockBase { + ObjCBlock51._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock51.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock51_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock51.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock51_closureTrampoline) + .cast(), + _ObjCBlock51_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef NSItemProviderLoadHandler = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock52_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock52_closureRegistry = {}; +int _ObjCBlock52_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock52_registerClosure(Function fn) { + final id = ++_ObjCBlock52_closureRegistryIndex; + _ObjCBlock52_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock52_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock52_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock52 extends _ObjCBlockBase { + ObjCBlock52._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock52.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock52_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock52.fromFunction( + NativeCupertinoHttp lib, + void Function(NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock52_closureTrampoline) + .cast(), + _ObjCBlock52_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef NSItemProviderCompletionHandler = ffi.Pointer<_ObjCBlock>; + +abstract class NSItemProviderErrorCode { + static const int NSItemProviderUnknownError = -1; + static const int NSItemProviderItemUnavailableError = -1000; + static const int NSItemProviderUnexpectedValueClassError = -1100; + static const int NSItemProviderUnavailableCoercionError = -1200; +} + +typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; + +class NSMutableString extends NSString { + NSMutableString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableString] that points to the same underlying object as [other]. + static NSMutableString castFrom(T other) { + return NSMutableString._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableString] that wraps the given raw object pointer. + static NSMutableString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableString._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableString1); + } + + void replaceCharactersInRange_withString_(NSRange range, NSString? aString) { + return _lib._objc_msgSend_447( + _id, + _lib._sel_replaceCharactersInRange_withString_1, + range, + aString?._id ?? ffi.nullptr); + } + + void insertString_atIndex_(NSString? aString, int loc) { + return _lib._objc_msgSend_448(_id, _lib._sel_insertString_atIndex_1, + aString?._id ?? ffi.nullptr, loc); + } + + void deleteCharactersInRange_(NSRange range) { + return _lib._objc_msgSend_283( + _id, _lib._sel_deleteCharactersInRange_1, range); + } + + void appendString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_appendString_1, aString?._id ?? ffi.nullptr); + } + + void appendFormat_(NSString? format) { + return _lib._objc_msgSend_188( + _id, _lib._sel_appendFormat_1, format?._id ?? ffi.nullptr); + } + + void setString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_setString_1, aString?._id ?? ffi.nullptr); + } + + int replaceOccurrencesOfString_withString_options_range_(NSString? target, + NSString? replacement, int options, NSRange searchRange) { + return _lib._objc_msgSend_449( + _id, + _lib._sel_replaceOccurrencesOfString_withString_options_range_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr, + options, + searchRange); + } + + bool applyTransform_reverse_range_updatedRange_(NSStringTransform transform, + bool reverse, NSRange range, NSRangePointer resultingRange) { + return _lib._objc_msgSend_450( + _id, + _lib._sel_applyTransform_reverse_range_updatedRange_1, + transform, + reverse, + range, + resultingRange); + } + + NSMutableString initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_451(_id, _lib._sel_initWithCapacity_1, capacity); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithCapacity_( + NativeCupertinoHttp _lib, int capacity) { + final _ret = _lib._objc_msgSend_451( + _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); + } + + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSMutableString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); + } + + static NSMutableString string(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_string1); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSMutableString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSMutableString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSMutableString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_265( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_266( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_267( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_268( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_269( + _lib._class_NSMutableString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } + + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSMutableString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSMutableString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_new1); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } + + static NSMutableString alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_alloc1); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSExceptionName = ffi.Pointer; + +class NSSimpleCString extends NSString { + NSSimpleCString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSSimpleCString] that points to the same underlying object as [other]. + static NSSimpleCString castFrom(T other) { + return NSSimpleCString._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSSimpleCString] that wraps the given raw object pointer. + static NSSimpleCString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSSimpleCString._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSSimpleCString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSSimpleCString1); + } + + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSSimpleCString1, _lib._sel_availableStringEncodings1); + } + + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSSimpleCString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSSimpleCString1, _lib._sel_defaultCStringEncoding1); + } + + static NSSimpleCString string(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_string1); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSSimpleCString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSSimpleCString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSSimpleCString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_265( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_266( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_267( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_268( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_269( + _lib._class_NSSimpleCString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } + + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSSimpleCString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSSimpleCString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_new1); + return NSSimpleCString._(_ret, _lib, retain: false, release: true); + } + + static NSSimpleCString alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_alloc1); + return NSSimpleCString._(_ret, _lib, retain: false, release: true); + } +} + +class NSConstantString extends NSSimpleCString { + NSConstantString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSConstantString] that points to the same underlying object as [other]. + static NSConstantString castFrom(T other) { + return NSConstantString._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSConstantString] that wraps the given raw object pointer. + static NSConstantString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSConstantString._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSConstantString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSConstantString1); + } + + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSConstantString1, _lib._sel_availableStringEncodings1); + } + + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSConstantString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSConstantString1, _lib._sel_defaultCStringEncoding1); + } + + static NSConstantString string(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_string1); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSConstantString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSConstantString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSConstantString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_265( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_266( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_267( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_268( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_269( + _lib._class_NSConstantString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } + + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSConstantString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSConstantString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_new1); + return NSConstantString._(_ret, _lib, retain: false, release: true); + } + + static NSConstantString alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_alloc1); + return NSConstantString._(_ret, _lib, retain: false, release: true); + } +} + +class NSMutableCharacterSet extends NSCharacterSet { + NSMutableCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableCharacterSet] that points to the same underlying object as [other]. + static NSMutableCharacterSet castFrom(T other) { + return NSMutableCharacterSet._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableCharacterSet] that wraps the given raw object pointer. + static NSMutableCharacterSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableCharacterSet._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableCharacterSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableCharacterSet1); + } + + void addCharactersInRange_(NSRange aRange) { + return _lib._objc_msgSend_283( + _id, _lib._sel_addCharactersInRange_1, aRange); + } + + void removeCharactersInRange_(NSRange aRange) { + return _lib._objc_msgSend_283( + _id, _lib._sel_removeCharactersInRange_1, aRange); + } + + void addCharactersInString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_addCharactersInString_1, aString?._id ?? ffi.nullptr); + } + + void removeCharactersInString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_removeCharactersInString_1, aString?._id ?? ffi.nullptr); + } + + void formUnionWithCharacterSet_(NSCharacterSet? otherSet) { + return _lib._objc_msgSend_452(_id, _lib._sel_formUnionWithCharacterSet_1, + otherSet?._id ?? ffi.nullptr); + } + + void formIntersectionWithCharacterSet_(NSCharacterSet? otherSet) { + return _lib._objc_msgSend_452( + _id, + _lib._sel_formIntersectionWithCharacterSet_1, + otherSet?._id ?? ffi.nullptr); + } + + void invert() { + return _lib._objc_msgSend_1(_id, _lib._sel_invert1); + } + + static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_controlCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_whitespaceCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_whitespaceAndNewlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_decimalDigitCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_letterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getLowercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_lowercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getUppercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_uppercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_nonBaseCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_alphanumericCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_decomposableCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_illegalCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_punctuationCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getCapitalizedLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_capitalizedLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_symbolCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_newlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: false, release: true); + } + + static NSMutableCharacterSet characterSetWithRange_( + NativeCupertinoHttp _lib, NSRange aRange) { + final _ret = _lib._objc_msgSend_453(_lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithRange_1, aRange); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableCharacterSet characterSetWithCharactersInString_( + NativeCupertinoHttp _lib, NSString? aString) { + final _ret = _lib._objc_msgSend_454( + _lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, + aString?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableCharacterSet characterSetWithBitmapRepresentation_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_455( + _lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, + data?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableCharacterSet characterSetWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? fName) { + final _ret = _lib._objc_msgSend_454(_lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's user subcomponent. + static NSCharacterSet? getURLUserAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLUserAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's password subcomponent. + static NSCharacterSet? getURLPasswordAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLPasswordAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's host subcomponent. + static NSCharacterSet? getURLHostAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLHostAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + static NSCharacterSet? getURLPathAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLPathAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's query component. + static NSCharacterSet? getURLQueryAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLQueryAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's fragment component. + static NSCharacterSet? getURLFragmentAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLFragmentAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableCharacterSet new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableCharacterSet1, _lib._sel_new1); + return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); + } + + static NSMutableCharacterSet alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableCharacterSet1, _lib._sel_alloc1); + return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSURLFileResourceType = ffi.Pointer; +typedef NSURLThumbnailDictionaryItem = ffi.Pointer; +typedef NSURLFileProtectionType = ffi.Pointer; +typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; +typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; +typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; + +/// NSURLQueryItem encapsulates a single query name-value pair. The name and value strings of a query name-value pair are not percent encoded. For use with the NSURLComponents queryItems property. +class NSURLQueryItem extends NSObject { + NSURLQueryItem._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLQueryItem] that points to the same underlying object as [other]. + static NSURLQueryItem castFrom(T other) { + return NSURLQueryItem._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLQueryItem] that wraps the given raw object pointer. + static NSURLQueryItem castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLQueryItem._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLQueryItem]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLQueryItem1); + } + + NSURLQueryItem initWithName_value_(NSString? name, NSString? value) { + final _ret = _lib._objc_msgSend_456(_id, _lib._sel_initWithName_value_1, + name?._id ?? ffi.nullptr, value?._id ?? ffi.nullptr); + return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + } + + static NSURLQueryItem queryItemWithName_value_( + NativeCupertinoHttp _lib, NSString? name, NSString? value) { + final _ret = _lib._objc_msgSend_456( + _lib._class_NSURLQueryItem1, + _lib._sel_queryItemWithName_value_1, + name?._id ?? ffi.nullptr, + value?._id ?? ffi.nullptr); + return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + } + + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get value { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_value1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSURLQueryItem new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_new1); + return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + } + + static NSURLQueryItem alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_alloc1); + return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + } +} + +class NSURLComponents extends NSObject { + NSURLComponents._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLComponents] that points to the same underlying object as [other]. + static NSURLComponents castFrom(T other) { + return NSURLComponents._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLComponents] that wraps the given raw object pointer. + static NSURLComponents castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLComponents._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLComponents]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLComponents1); + } + + /// Initialize a NSURLComponents with all components undefined. Designated initializer. + @override + NSURLComponents init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initialize a NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. + NSURLComponents initWithURL_resolvingAgainstBaseURL_( + NSURL? url, bool resolve) { + final _ret = _lib._objc_msgSend_206( + _id, + _lib._sel_initWithURL_resolvingAgainstBaseURL_1, + url?._id ?? ffi.nullptr, + resolve); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. + static NSURLComponents componentsWithURL_resolvingAgainstBaseURL_( + NativeCupertinoHttp _lib, NSURL? url, bool resolve) { + final _ret = _lib._objc_msgSend_206( + _lib._class_NSURLComponents1, + _lib._sel_componentsWithURL_resolvingAgainstBaseURL_1, + url?._id ?? ffi.nullptr, + resolve); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initialize a NSURLComponents with a URL string. If the URLString is malformed, nil is returned. + NSURLComponents initWithString_(NSString? URLString) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created NSURLComponents with a URL string. If the URLString is malformed, nil is returned. + static NSURLComponents componentsWithString_( + NativeCupertinoHttp _lib, NSString? URLString) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSURLComponents1, + _lib._sel_componentsWithString_1, URLString?._id ?? ffi.nullptr); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Returns a URL created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSURL URLRelativeToURL_(NSURL? baseURL) { + final _ret = _lib._objc_msgSend_457( + _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns a URL string created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSString? get string { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Attempting to set the scheme with an invalid scheme string will cause an exception. + NSString? get scheme { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Attempting to set the scheme with an invalid scheme string will cause an exception. + set scheme(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); + } + + NSString? get user { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set user(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); + } + + NSString? get password { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set password(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); + } + + NSString? get host { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set host(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); + } + + /// Attempting to set a negative port number will cause an exception. + NSNumber? get port { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + /// Attempting to set a negative port number will cause an exception. + set port(NSNumber? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); + } + + NSString? get path { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set path(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); + } + + NSString? get query { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set query(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); + } + + NSString? get fragment { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set fragment(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); + } + + /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + NSString? get percentEncodedUser { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedUser1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + set percentEncodedUser(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedPassword { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPassword1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedPassword(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedHost { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedHost1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedHost(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedPath { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedPath(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedQuery { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedQuery1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedQuery(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedFragment { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedFragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedFragment(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); + } + + /// These properties return the character range of a component in the URL string returned by -[NSURLComponents string]. If the component does not exist in the NSURLComponents object, {NSNotFound, 0} is returned. Note: Zero length components are legal. For example, the URL string "scheme://:@/?#" has a zero length user, password, host, query and fragment; the URL strings "scheme:" and "" both have a zero length path. + NSRange get rangeOfScheme { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfScheme1); + } + + NSRange get rangeOfUser { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfUser1); + } + + NSRange get rangeOfPassword { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPassword1); + } + + NSRange get rangeOfHost { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfHost1); + } + + NSRange get rangeOfPort { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPort1); + } + + NSRange get rangeOfPath { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPath1); + } + + NSRange get rangeOfQuery { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfQuery1); + } + + NSRange get rangeOfFragment { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfFragment1); + } + + /// The query component as an array of NSURLQueryItems for this NSURLComponents. + /// + /// Each NSURLQueryItem represents a single key-value pair, + /// + /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. + /// + /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. + /// + /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. + /// + /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. + NSArray? get queryItems { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_queryItems1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// The query component as an array of NSURLQueryItems for this NSURLComponents. + /// + /// Each NSURLQueryItem represents a single key-value pair, + /// + /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. + /// + /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. + /// + /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. + /// + /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. + set queryItems(NSArray? value) { + _lib._objc_msgSend_392( + _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); + } + + /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. + /// + /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. + NSArray? get percentEncodedQueryItems { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_percentEncodedQueryItems1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. + /// + /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. + set percentEncodedQueryItems(NSArray? value) { + _lib._objc_msgSend_392(_id, _lib._sel_setPercentEncodedQueryItems_1, + value?._id ?? ffi.nullptr); + } + + static NSURLComponents new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_new1); + return NSURLComponents._(_ret, _lib, retain: false, release: true); + } + + static NSURLComponents alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_alloc1); + return NSURLComponents._(_ret, _lib, retain: false, release: true); + } +} + +/// NSFileSecurity encapsulates a file system object's security information. NSFileSecurity and CFFileSecurity are toll-free bridged. Use the CFFileSecurity API for access to the low-level file security properties encapsulated by NSFileSecurity. +class NSFileSecurity extends NSObject { + NSFileSecurity._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSFileSecurity] that points to the same underlying object as [other]. + static NSFileSecurity castFrom(T other) { + return NSFileSecurity._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSFileSecurity] that wraps the given raw object pointer. + static NSFileSecurity castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSFileSecurity._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSFileSecurity]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSFileSecurity1); + } + + NSFileSecurity initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSFileSecurity._(_ret, _lib, retain: true, release: true); + } + + static NSFileSecurity new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_new1); + return NSFileSecurity._(_ret, _lib, retain: false, release: true); + } + + static NSFileSecurity alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_alloc1); + return NSFileSecurity._(_ret, _lib, retain: false, release: true); + } +} + +/// ! +/// @class NSHTTPURLResponse +/// +/// @abstract An NSHTTPURLResponse object represents a response to an +/// HTTP URL load. It is a specialization of NSURLResponse which +/// provides conveniences for accessing information specific to HTTP +/// protocol responses. +class NSHTTPURLResponse extends NSURLResponse { + NSHTTPURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSHTTPURLResponse] that points to the same underlying object as [other]. + static NSHTTPURLResponse castFrom(T other) { + return NSHTTPURLResponse._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSHTTPURLResponse] that wraps the given raw object pointer. + static NSHTTPURLResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPURLResponse._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSHTTPURLResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSHTTPURLResponse1); + } + + /// ! + /// @method initWithURL:statusCode:HTTPVersion:headerFields: + /// @abstract initializer for NSHTTPURLResponse objects. + /// @param url the URL from which the response was generated. + /// @param statusCode an HTTP status code. + /// @param HTTPVersion The version of the HTTP response as represented by the server. This is typically represented as "HTTP/1.1". + /// @param headerFields A dictionary representing the header keys and values of the server response. + /// @result the instance of the object, or NULL if an error occurred during initialization. + /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. + NSHTTPURLResponse initWithURL_statusCode_HTTPVersion_headerFields_(NSURL? url, + int statusCode, NSString? HTTPVersion, NSDictionary? headerFields) { + final _ret = _lib._objc_msgSend_458( + _id, + _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, + url?._id ?? ffi.nullptr, + statusCode, + HTTPVersion?._id ?? ffi.nullptr, + headerFields?._id ?? ffi.nullptr); + return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the HTTP status code of the receiver. + /// @result The HTTP status code of the receiver. + int get statusCode { + return _lib._objc_msgSend_81(_id, _lib._sel_statusCode1); + } + + /// ! + /// @abstract Returns a dictionary containing all the HTTP header fields + /// of the receiver. + /// @discussion By examining this header dictionary, clients can see + /// the "raw" header information which was reported to the protocol + /// implementation by the HTTP server. This may be of use to + /// sophisticated or special-purpose HTTP clients. + /// @result A dictionary containing all the HTTP header fields of the + /// receiver. + NSDictionary? get allHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method valueForHTTPHeaderField: + /// @abstract Returns the value which corresponds to the given header + /// field. Note that, in keeping with the HTTP RFC, HTTP header field + /// names are case-insensitive. + /// @param field the header field name to use for the lookup + /// (case-insensitive). + /// @result the value associated with the given header field, or nil if + /// there is no value associated with the given header field. + NSString valueForHTTPHeaderField_(NSString? field) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method localizedStringForStatusCode: + /// @abstract Convenience method which returns a localized string + /// corresponding to the status code for this response. + /// @param statusCode the status code to use to produce a localized string. + /// @result A localized string corresponding to the given status code. + static NSString localizedStringForStatusCode_( + NativeCupertinoHttp _lib, int statusCode) { + final _ret = _lib._objc_msgSend_459(_lib._class_NSHTTPURLResponse1, + _lib._sel_localizedStringForStatusCode_1, statusCode); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSHTTPURLResponse new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_new1); + return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + } + + static NSHTTPURLResponse alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_alloc1); + return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + } +} + +class NSException extends NSObject { + NSException._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSException] that points to the same underlying object as [other]. + static NSException castFrom(T other) { + return NSException._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSException] that wraps the given raw object pointer. + static NSException castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSException._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSException]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSException1); + } + + static NSException exceptionWithName_reason_userInfo_( + NativeCupertinoHttp _lib, + NSExceptionName name, + NSString? reason, + NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_460( + _lib._class_NSException1, + _lib._sel_exceptionWithName_reason_userInfo_1, + name, + reason?._id ?? ffi.nullptr, + userInfo?._id ?? ffi.nullptr); + return NSException._(_ret, _lib, retain: true, release: true); + } + + NSException initWithName_reason_userInfo_( + NSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_461( + _id, + _lib._sel_initWithName_reason_userInfo_1, + aName, + aReason?._id ?? ffi.nullptr, + aUserInfo?._id ?? ffi.nullptr); + return NSException._(_ret, _lib, retain: true, release: true); + } + + NSExceptionName get name { + return _lib._objc_msgSend_32(_id, _lib._sel_name1); + } + + NSString? get reason { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_reason1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSArray? get callStackReturnAddresses { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_callStackReturnAddresses1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray? get callStackSymbols { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_callStackSymbols1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + void raise() { + return _lib._objc_msgSend_1(_id, _lib._sel_raise1); + } + + static void raise_format_( + NativeCupertinoHttp _lib, NSExceptionName name, NSString? format) { + return _lib._objc_msgSend_361(_lib._class_NSException1, + _lib._sel_raise_format_1, name, format?._id ?? ffi.nullptr); + } + + static void raise_format_arguments_(NativeCupertinoHttp _lib, + NSExceptionName name, NSString? format, va_list argList) { + return _lib._objc_msgSend_462( + _lib._class_NSException1, + _lib._sel_raise_format_arguments_1, + name, + format?._id ?? ffi.nullptr, + argList); + } + + static NSException new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_new1); + return NSException._(_ret, _lib, retain: false, release: true); + } + + static NSException alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); + return NSException._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSUncaughtExceptionHandler + = ffi.NativeFunction)>; + +class NSAssertionHandler extends NSObject { + NSAssertionHandler._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSAssertionHandler] that points to the same underlying object as [other]. + static NSAssertionHandler castFrom(T other) { + return NSAssertionHandler._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSAssertionHandler] that wraps the given raw object pointer. + static NSAssertionHandler castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSAssertionHandler._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSAssertionHandler]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSAssertionHandler1); + } + + static NSAssertionHandler? getCurrentHandler(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_463( + _lib._class_NSAssertionHandler1, _lib._sel_currentHandler1); + return _ret.address == 0 + ? null + : NSAssertionHandler._(_ret, _lib, retain: true, release: true); + } + + void handleFailureInMethod_object_file_lineNumber_description_( + ffi.Pointer selector, + NSObject object, + NSString? fileName, + int line, + NSString? format) { + return _lib._objc_msgSend_464( + _id, + _lib._sel_handleFailureInMethod_object_file_lineNumber_description_1, + selector, + object._id, + fileName?._id ?? ffi.nullptr, + line, + format?._id ?? ffi.nullptr); + } + + void handleFailureInFunction_file_lineNumber_description_( + NSString? functionName, NSString? fileName, int line, NSString? format) { + return _lib._objc_msgSend_465( + _id, + _lib._sel_handleFailureInFunction_file_lineNumber_description_1, + functionName?._id ?? ffi.nullptr, + fileName?._id ?? ffi.nullptr, + line, + format?._id ?? ffi.nullptr); + } + + static NSAssertionHandler new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_new1); + return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + } + + static NSAssertionHandler alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_alloc1); + return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + } +} + +class NSBlockOperation extends NSOperation { + NSBlockOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSBlockOperation] that points to the same underlying object as [other]. + static NSBlockOperation castFrom(T other) { + return NSBlockOperation._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSBlockOperation] that wraps the given raw object pointer. + static NSBlockOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSBlockOperation._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSBlockOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSBlockOperation1); + } + + static NSBlockOperation blockOperationWithBlock_( + NativeCupertinoHttp _lib, ObjCBlock16 block) { + final _ret = _lib._objc_msgSend_466(_lib._class_NSBlockOperation1, + _lib._sel_blockOperationWithBlock_1, block._id); + return NSBlockOperation._(_ret, _lib, retain: true, release: true); + } + + void addExecutionBlock_(ObjCBlock16 block) { + return _lib._objc_msgSend_341( + _id, _lib._sel_addExecutionBlock_1, block._id); + } + + NSArray? get executionBlocks { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_executionBlocks1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSBlockOperation new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_new1); + return NSBlockOperation._(_ret, _lib, retain: false, release: true); + } + + static NSBlockOperation alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_alloc1); + return NSBlockOperation._(_ret, _lib, retain: false, release: true); + } +} + +class NSInvocationOperation extends NSOperation { + NSInvocationOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSInvocationOperation] that points to the same underlying object as [other]. + static NSInvocationOperation castFrom(T other) { + return NSInvocationOperation._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSInvocationOperation] that wraps the given raw object pointer. + static NSInvocationOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInvocationOperation._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSInvocationOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSInvocationOperation1); + } + + NSInvocationOperation initWithTarget_selector_object_( + NSObject target, ffi.Pointer sel, NSObject arg) { + final _ret = _lib._objc_msgSend_467(_id, + _lib._sel_initWithTarget_selector_object_1, target._id, sel, arg._id); + return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + } + + NSInvocationOperation initWithInvocation_(NSInvocation? inv) { + final _ret = _lib._objc_msgSend_468( + _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); + return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + } + + NSInvocation? get invocation { + final _ret = _lib._objc_msgSend_469(_id, _lib._sel_invocation1); + return _ret.address == 0 + ? null + : NSInvocation._(_ret, _lib, retain: true, release: true); + } + + NSObject get result { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_result1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSInvocationOperation new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInvocationOperation1, _lib._sel_new1); + return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + } + + static NSInvocationOperation alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInvocationOperation1, _lib._sel_alloc1); + return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + } +} + +class _Dart_Isolate extends ffi.Opaque {} + +class _Dart_IsolateGroup extends ffi.Opaque {} + +class _Dart_Handle extends ffi.Opaque {} + +class _Dart_WeakPersistentHandle extends ffi.Opaque {} + +class _Dart_FinalizableHandle extends ffi.Opaque {} + +typedef Dart_WeakPersistentHandle = ffi.Pointer<_Dart_WeakPersistentHandle>; + +/// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the +/// version when changing this struct. +typedef Dart_HandleFinalizer = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +typedef Dart_FinalizableHandle = ffi.Pointer<_Dart_FinalizableHandle>; + +class Dart_IsolateFlags extends ffi.Struct { + @ffi.Int32() + external int version; + + @ffi.Bool() + external bool enable_asserts; + + @ffi.Bool() + external bool use_field_guards; + + @ffi.Bool() + external bool use_osr; + + @ffi.Bool() + external bool obfuscate; + + @ffi.Bool() + external bool load_vmservice_library; + + @ffi.Bool() + external bool copy_parent_code; + + @ffi.Bool() + external bool null_safety; + + @ffi.Bool() + external bool is_system_isolate; +} + +/// Forward declaration +class Dart_CodeObserver extends ffi.Struct { + external ffi.Pointer data; + + external Dart_OnNewCodeCallback on_new_code; +} + +/// Callback provided by the embedder that is used by the VM to notify on code +/// object creation, *before* it is invoked the first time. +/// This is useful for embedders wanting to e.g. keep track of PCs beyond +/// the lifetime of the garbage collected code objects. +/// Note that an address range may be used by more than one code object over the +/// lifecycle of a process. Clients of this function should record timestamps for +/// these compilation events and when collecting PCs to disambiguate reused +/// address ranges. +typedef Dart_OnNewCodeCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + uintptr_t, uintptr_t)>>; + +/// Describes how to initialize the VM. Used with Dart_Initialize. +/// +/// \param version Identifies the version of the struct used by the client. +/// should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. +/// \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate +/// or NULL if no snapshot is provided. If provided, the buffer must remain +/// valid until Dart_Cleanup returns. +/// \param instructions_snapshot A buffer containing a snapshot of precompiled +/// instructions, or NULL if no snapshot is provided. If provided, the buffer +/// must remain valid until Dart_Cleanup returns. +/// \param initialize_isolate A function to be called during isolate +/// initialization inside an existing isolate group. +/// See Dart_InitializeIsolateCallback. +/// \param create_group A function to be called during isolate group creation. +/// See Dart_IsolateGroupCreateCallback. +/// \param shutdown A function to be called right before an isolate is shutdown. +/// See Dart_IsolateShutdownCallback. +/// \param cleanup A function to be called after an isolate was shutdown. +/// See Dart_IsolateCleanupCallback. +/// \param cleanup_group A function to be called after an isolate group is shutdown. +/// See Dart_IsolateGroupCleanupCallback. +/// \param get_service_assets A function to be called by the service isolate when +/// it requires the vmservice assets archive. +/// See Dart_GetVMServiceAssetsArchive. +/// \param code_observer An external code observer callback function. +/// The observer can be invoked as early as during the Dart_Initialize() call. +class Dart_InitializeParams extends ffi.Struct { + @ffi.Int32() + external int version; + + external ffi.Pointer vm_snapshot_data; + + external ffi.Pointer vm_snapshot_instructions; + + external Dart_IsolateGroupCreateCallback create_group; + + external Dart_InitializeIsolateCallback initialize_isolate; + + external Dart_IsolateShutdownCallback shutdown_isolate; + + external Dart_IsolateCleanupCallback cleanup_isolate; + + external Dart_IsolateGroupCleanupCallback cleanup_group; + + external Dart_ThreadExitCallback thread_exit; + + external Dart_FileOpenCallback file_open; + + external Dart_FileReadCallback file_read; + + external Dart_FileWriteCallback file_write; + + external Dart_FileCloseCallback file_close; + + external Dart_EntropySource entropy_source; + + external Dart_GetVMServiceAssetsArchive get_service_assets; + + @ffi.Bool() + external bool start_kernel_isolate; + + external ffi.Pointer code_observer; +} + +/// An isolate creation and initialization callback function. +/// +/// This callback, provided by the embedder, is called when the VM +/// needs to create an isolate. The callback should create an isolate +/// by calling Dart_CreateIsolateGroup and load any scripts required for +/// execution. +/// +/// This callback may be called on a different thread than the one +/// running the parent isolate. +/// +/// When the function returns NULL, it is the responsibility of this +/// function to ensure that Dart_ShutdownIsolate has been called if +/// required (for example, if the isolate was created successfully by +/// Dart_CreateIsolateGroup() but the root library fails to load +/// successfully, then the function should call Dart_ShutdownIsolate +/// before returning). +/// +/// When the function returns NULL, the function should set *error to +/// a malloc-allocated buffer containing a useful error message. The +/// caller of this function (the VM) will make sure that the buffer is +/// freed. +/// +/// \param script_uri The uri of the main source file or snapshot to load. +/// Either the URI of the parent isolate set in Dart_CreateIsolateGroup for +/// Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the +/// library tag handler of the parent isolate. +/// The callback is responsible for loading the program by a call to +/// Dart_LoadScriptFromKernel. +/// \param main The name of the main entry point this isolate will +/// eventually run. This is provided for advisory purposes only to +/// improve debugging messages. The main function is not invoked by +/// this function. +/// \param package_root Ignored. +/// \param package_config Uri of the package configuration file (either in format +/// of .packages or .dart_tool/package_config.json) for this isolate +/// to resolve package imports against. If this parameter is not passed the +/// package resolution of the parent isolate should be used. +/// \param flags Default flags for this isolate being spawned. Either inherited +/// from the spawning isolate or passed as parameters when spawning the +/// isolate from Dart code. +/// \param isolate_data The isolate data which was passed to the +/// parent isolate when it was created by calling Dart_CreateIsolateGroup(). +/// \param error A structure into which the embedder can place a +/// C string containing an error message in the case of failures. +/// +/// \return The embedder returns NULL if the creation and +/// initialization was not successful and the isolate if successful. +typedef Dart_IsolateGroupCreateCallback = ffi.Pointer< + ffi.NativeFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>; + +/// An isolate is the unit of concurrency in Dart. Each isolate has +/// its own memory and thread of control. No state is shared between +/// isolates. Instead, isolates communicate by message passing. +/// +/// Each thread keeps track of its current isolate, which is the +/// isolate which is ready to execute on the current thread. The +/// current isolate may be NULL, in which case no isolate is ready to +/// execute. Most of the Dart apis require there to be a current +/// isolate in order to function without error. The current isolate is +/// set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. +typedef Dart_Isolate = ffi.Pointer<_Dart_Isolate>; + +/// An isolate initialization callback function. +/// +/// This callback, provided by the embedder, is called when the VM has created an +/// isolate within an existing isolate group (i.e. from the same source as an +/// existing isolate). +/// +/// The callback should setup native resolvers and might want to set a custom +/// message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as +/// runnable. +/// +/// This callback may be called on a different thread than the one +/// running the parent isolate. +/// +/// When the function returns `false`, it is the responsibility of this +/// function to ensure that `Dart_ShutdownIsolate` has been called. +/// +/// When the function returns `false`, the function should set *error to +/// a malloc-allocated buffer containing a useful error message. The +/// caller of this function (the VM) will make sure that the buffer is +/// freed. +/// +/// \param child_isolate_data The callback data to associate with the new +/// child isolate. +/// \param error A structure into which the embedder can place a +/// C string containing an error message in the case the initialization fails. +/// +/// \return The embedder returns true if the initialization was successful and +/// false otherwise (in which case the VM will terminate the isolate). +typedef Dart_InitializeIsolateCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer>, + ffi.Pointer>)>>; + +/// An isolate shutdown callback function. +/// +/// This callback, provided by the embedder, is called before the vm +/// shuts down an isolate. The isolate being shutdown will be the current +/// isolate. It is safe to run Dart code. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +/// \param isolate_data The same callback data which was passed to the isolate +/// when it was created. +typedef Dart_IsolateShutdownCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + +/// An isolate cleanup callback function. +/// +/// This callback, provided by the embedder, is called after the vm +/// shuts down an isolate. There will be no current isolate and it is *not* +/// safe to run Dart code. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +/// \param isolate_data The same callback data which was passed to the isolate +/// when it was created. +typedef Dart_IsolateCleanupCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + +/// An isolate group cleanup callback function. +/// +/// This callback, provided by the embedder, is called after the vm +/// shuts down an isolate group. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +typedef Dart_IsolateGroupCleanupCallback + = ffi.Pointer)>>; + +/// A thread death callback function. +/// This callback, provided by the embedder, is called before a thread in the +/// vm thread pool exits. +/// This function could be used to dispose of native resources that +/// are associated and attached to the thread, in order to avoid leaks. +typedef Dart_ThreadExitCallback + = ffi.Pointer>; + +/// Callbacks provided by the embedder for file operations. If the +/// embedder does not allow file operations these callbacks can be +/// NULL. +/// +/// Dart_FileOpenCallback - opens a file for reading or writing. +/// \param name The name of the file to open. +/// \param write A boolean variable which indicates if the file is to +/// opened for writing. If there is an existing file it needs to truncated. +/// +/// Dart_FileReadCallback - Read contents of file. +/// \param data Buffer allocated in the callback into which the contents +/// of the file are read into. It is the responsibility of the caller to +/// free this buffer. +/// \param file_length A variable into which the length of the file is returned. +/// In the case of an error this value would be -1. +/// \param stream Handle to the opened file. +/// +/// Dart_FileWriteCallback - Write data into file. +/// \param data Buffer which needs to be written into the file. +/// \param length Length of the buffer. +/// \param stream Handle to the opened file. +/// +/// Dart_FileCloseCallback - Closes the opened file. +/// \param stream Handle to the opened file. +typedef Dart_FileOpenCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Bool)>>; +typedef Dart_FileReadCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>; +typedef Dart_FileWriteCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.IntPtr, ffi.Pointer)>>; +typedef Dart_FileCloseCallback + = ffi.Pointer)>>; +typedef Dart_EntropySource = ffi.Pointer< + ffi.NativeFunction, ffi.IntPtr)>>; + +/// Callback provided by the embedder that is used by the vmservice isolate +/// to request the asset archive. The asset archive must be an uncompressed tar +/// archive that is stored in a Uint8List. +/// +/// If the embedder has no vmservice isolate assets, the callback can be NULL. +/// +/// \return The embedder must return a handle to a Uint8List containing an +/// uncompressed tar archive or null. +typedef Dart_GetVMServiceAssetsArchive + = ffi.Pointer>; +typedef Dart_IsolateGroup = ffi.Pointer<_Dart_IsolateGroup>; + +/// A message notification callback. +/// +/// This callback allows the embedder to provide an alternate wakeup +/// mechanism for the delivery of inter-isolate messages. It is the +/// responsibility of the embedder to call Dart_HandleMessage to +/// process the message. +typedef Dart_MessageNotifyCallback + = ffi.Pointer>; + +/// A port is used to send or receive inter-isolate messages +typedef Dart_Port = ffi.Int64; + +abstract class Dart_CoreType_Id { + static const int Dart_CoreType_Dynamic = 0; + static const int Dart_CoreType_Int = 1; + static const int Dart_CoreType_String = 2; +} + +/// ========== +/// Typed Data +/// ========== +abstract class Dart_TypedData_Type { + static const int Dart_TypedData_kByteData = 0; + static const int Dart_TypedData_kInt8 = 1; + static const int Dart_TypedData_kUint8 = 2; + static const int Dart_TypedData_kUint8Clamped = 3; + static const int Dart_TypedData_kInt16 = 4; + static const int Dart_TypedData_kUint16 = 5; + static const int Dart_TypedData_kInt32 = 6; + static const int Dart_TypedData_kUint32 = 7; + static const int Dart_TypedData_kInt64 = 8; + static const int Dart_TypedData_kUint64 = 9; + static const int Dart_TypedData_kFloat32 = 10; + static const int Dart_TypedData_kFloat64 = 11; + static const int Dart_TypedData_kInt32x4 = 12; + static const int Dart_TypedData_kFloat32x4 = 13; + static const int Dart_TypedData_kFloat64x2 = 14; + static const int Dart_TypedData_kInvalid = 15; +} + +class _Dart_NativeArguments extends ffi.Opaque {} + +/// The arguments to a native function. +/// +/// This object is passed to a native function to represent its +/// arguments and return value. It allows access to the arguments to a +/// native function by index. It also allows the return value of a +/// native function to be set. +typedef Dart_NativeArguments = ffi.Pointer<_Dart_NativeArguments>; + +abstract class Dart_NativeArgument_Type { + static const int Dart_NativeArgument_kBool = 0; + static const int Dart_NativeArgument_kInt32 = 1; + static const int Dart_NativeArgument_kUint32 = 2; + static const int Dart_NativeArgument_kInt64 = 3; + static const int Dart_NativeArgument_kUint64 = 4; + static const int Dart_NativeArgument_kDouble = 5; + static const int Dart_NativeArgument_kString = 6; + static const int Dart_NativeArgument_kInstance = 7; + static const int Dart_NativeArgument_kNativeFields = 8; +} + +class _Dart_NativeArgument_Descriptor extends ffi.Struct { + @ffi.Uint8() + external int type; + + @ffi.Uint8() + external int index; +} + +class _Dart_NativeArgument_Value extends ffi.Opaque {} + +typedef Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor; +typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; + +/// An environment lookup callback function. +/// +/// \param name The name of the value to lookup in the environment. +/// +/// \return A valid handle to a string if the name exists in the +/// current environment or Dart_Null() if not. +typedef Dart_EnvironmentCallback + = ffi.Pointer>; + +/// Native entry resolution callback. +/// +/// For libraries and scripts which have native functions, the embedder +/// can provide a native entry resolver. This callback is used to map a +/// name/arity to a Dart_NativeFunction. If no function is found, the +/// callback should return NULL. +/// +/// The parameters to the native resolver function are: +/// \param name a Dart string which is the name of the native function. +/// \param num_of_arguments is the number of arguments expected by the +/// native function. +/// \param auto_setup_scope is a boolean flag that can be set by the resolver +/// to indicate if this function needs a Dart API scope (see Dart_EnterScope/ +/// Dart_ExitScope) to be setup automatically by the VM before calling into +/// the native function. By default most native functions would require this +/// to be true but some light weight native functions which do not call back +/// into the VM through the Dart API may not require a Dart scope to be +/// setup automatically. +/// +/// \return A valid Dart_NativeFunction which resolves to a native entry point +/// for the native function. +/// +/// See Dart_SetNativeResolver. +typedef Dart_NativeEntryResolver = ffi.Pointer< + ffi.NativeFunction< + Dart_NativeFunction Function( + ffi.Handle, ffi.Int, ffi.Pointer)>>; + +/// A native function. +typedef Dart_NativeFunction + = ffi.Pointer>; + +/// Native entry symbol lookup callback. +/// +/// For libraries and scripts which have native functions, the embedder +/// can provide a callback for mapping a native entry to a symbol. This callback +/// maps a native function entry PC to the native function name. If no native +/// entry symbol can be found, the callback should return NULL. +/// +/// The parameters to the native reverse resolver function are: +/// \param nf A Dart_NativeFunction. +/// +/// \return A const UTF-8 string containing the symbol name or NULL. +/// +/// See Dart_SetNativeResolver. +typedef Dart_NativeEntrySymbol = ffi.Pointer< + ffi.NativeFunction Function(Dart_NativeFunction)>>; + +/// FFI Native C function pointer resolver callback. +/// +/// See Dart_SetFfiNativeResolver. +typedef Dart_FfiNativeResolver = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, uintptr_t)>>; + +/// ===================== +/// Scripts and Libraries +/// ===================== +abstract class Dart_LibraryTag { + static const int Dart_kCanonicalizeUrl = 0; + static const int Dart_kImportTag = 1; + static const int Dart_kKernelTag = 2; +} + +/// The library tag handler is a multi-purpose callback provided by the +/// embedder to the Dart VM. The embedder implements the tag handler to +/// provide the ability to load Dart scripts and imports. +/// +/// -- TAGS -- +/// +/// Dart_kCanonicalizeUrl +/// +/// This tag indicates that the embedder should canonicalize 'url' with +/// respect to 'library'. For most embedders, the +/// Dart_DefaultCanonicalizeUrl function is a sufficient implementation +/// of this tag. The return value should be a string holding the +/// canonicalized url. +/// +/// Dart_kImportTag +/// +/// This tag is used to load a library from IsolateMirror.loadUri. The embedder +/// should call Dart_LoadLibraryFromKernel to provide the library to the VM. The +/// return value should be an error or library (the result from +/// Dart_LoadLibraryFromKernel). +/// +/// Dart_kKernelTag +/// +/// This tag is used to load the intermediate file (kernel) generated by +/// the Dart front end. This tag is typically used when a 'hot-reload' +/// of an application is needed and the VM is 'use dart front end' mode. +/// The dart front end typically compiles all the scripts, imports and part +/// files into one intermediate file hence we don't use the source/import or +/// script tags. The return value should be an error or a TypedData containing +/// the kernel bytes. +typedef Dart_LibraryTagHandler = ffi.Pointer< + ffi.NativeFunction>; + +/// Handles deferred loading requests. When this handler is invoked, it should +/// eventually load the deferred loading unit with the given id and call +/// Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is +/// recommended that the loading occur asynchronously, but it is permitted to +/// call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the +/// handler returns. +/// +/// If an error is returned, it will be propogated through +/// `prefix.loadLibrary()`. This is useful for synchronous +/// implementations, which must propogate any unwind errors from +/// Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler +/// should return a non-error such as `Dart_Null()`. +typedef Dart_DeferredLoadHandler + = ffi.Pointer>; + +/// TODO(33433): Remove kernel service from the embedding API. +abstract class Dart_KernelCompilationStatus { + static const int Dart_KernelCompilationStatus_Unknown = -1; + static const int Dart_KernelCompilationStatus_Ok = 0; + static const int Dart_KernelCompilationStatus_Error = 1; + static const int Dart_KernelCompilationStatus_Crash = 2; + static const int Dart_KernelCompilationStatus_MsgFailed = 3; +} + +class Dart_KernelCompilationResult extends ffi.Struct { + @ffi.Int32() + external int status; + + @ffi.Bool() + external bool null_safety; + + external ffi.Pointer error; + + external ffi.Pointer kernel; + + @ffi.IntPtr() + external int kernel_size; +} + +abstract class Dart_KernelCompilationVerbosityLevel { + static const int Dart_KernelCompilationVerbosityLevel_Error = 0; + static const int Dart_KernelCompilationVerbosityLevel_Warning = 1; + static const int Dart_KernelCompilationVerbosityLevel_Info = 2; + static const int Dart_KernelCompilationVerbosityLevel_All = 3; +} + +class Dart_SourceFile extends ffi.Struct { + external ffi.Pointer uri; + + external ffi.Pointer source; +} + +typedef Dart_StreamingWriteCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.IntPtr)>>; +typedef Dart_CreateLoadingUnitCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer>, + ffi.Pointer>)>>; +typedef Dart_StreamingCloseCallback + = ffi.Pointer)>>; + +/// A Dart_CObject is used for representing Dart objects as native C +/// data outside the Dart heap. These objects are totally detached from +/// the Dart heap. Only a subset of the Dart objects have a +/// representation as a Dart_CObject. +/// +/// The string encoding in the 'value.as_string' is UTF-8. +/// +/// All the different types from dart:typed_data are exposed as type +/// kTypedData. The specific type from dart:typed_data is in the type +/// field of the as_typed_data structure. The length in the +/// as_typed_data structure is always in bytes. +/// +/// The data for kTypedData is copied on message send and ownership remains with +/// the caller. The ownership of data for kExternalTyped is passed to the VM on +/// message send and returned when the VM invokes the +/// Dart_HandleFinalizer callback; a non-NULL callback must be provided. +abstract class Dart_CObject_Type { + static const int Dart_CObject_kNull = 0; + static const int Dart_CObject_kBool = 1; + static const int Dart_CObject_kInt32 = 2; + static const int Dart_CObject_kInt64 = 3; + static const int Dart_CObject_kDouble = 4; + static const int Dart_CObject_kString = 5; + static const int Dart_CObject_kArray = 6; + static const int Dart_CObject_kTypedData = 7; + static const int Dart_CObject_kExternalTypedData = 8; + static const int Dart_CObject_kSendPort = 9; + static const int Dart_CObject_kCapability = 10; + static const int Dart_CObject_kNativePointer = 11; + static const int Dart_CObject_kUnsupported = 12; + static const int Dart_CObject_kNumberOfTypes = 13; +} + +class _Dart_CObject extends ffi.Struct { + @ffi.Int32() + external int type; + + external UnnamedUnion5 value; +} + +class UnnamedUnion5 extends ffi.Union { + @ffi.Bool() + external bool as_bool; + + @ffi.Int32() + external int as_int32; + + @ffi.Int64() + external int as_int64; + + @ffi.Double() + external double as_double; + + external ffi.Pointer as_string; + + external UnnamedStruct5 as_send_port; + + external UnnamedStruct6 as_capability; + + external UnnamedStruct7 as_array; + + external UnnamedStruct8 as_typed_data; + + external UnnamedStruct9 as_external_typed_data; + + external UnnamedStruct10 as_native_pointer; +} + +class UnnamedStruct5 extends ffi.Struct { + @Dart_Port() + external int id; + + @Dart_Port() + external int origin_id; +} + +class UnnamedStruct6 extends ffi.Struct { + @ffi.Int64() + external int id; +} + +class UnnamedStruct7 extends ffi.Struct { + @ffi.IntPtr() + external int length; + + external ffi.Pointer> values; +} + +class UnnamedStruct8 extends ffi.Struct { + @ffi.Int32() + external int type; + + /// in elements, not bytes + @ffi.IntPtr() + external int length; + + external ffi.Pointer values; +} + +class UnnamedStruct9 extends ffi.Struct { + @ffi.Int32() + external int type; + + /// in elements, not bytes + @ffi.IntPtr() + external int length; + + external ffi.Pointer data; + + external ffi.Pointer peer; + + external Dart_HandleFinalizer callback; +} + +class UnnamedStruct10 extends ffi.Struct { + @ffi.IntPtr() + external int ptr; + + @ffi.IntPtr() + external int size; + + external Dart_HandleFinalizer callback; +} + +typedef Dart_CObject = _Dart_CObject; + +/// A native message handler. +/// +/// This handler is associated with a native port by calling +/// Dart_NewNativePort. +/// +/// The message received is decoded into the message structure. The +/// lifetime of the message data is controlled by the caller. All the +/// data references from the message are allocated by the caller and +/// will be reclaimed when returning to it. +typedef Dart_NativeMessageHandler = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_Port, ffi.Pointer)>>; +typedef Dart_PostCObject_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(Dart_Port_DL, ffi.Pointer)>>; + +/// ============================================================================ +/// IMPORTANT! Never update these signatures without properly updating +/// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. +/// +/// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types +/// to trigger compile-time errors if the sybols in those files are updated +/// without updating these. +/// +/// Function return and argument types, and typedefs are carbon copied. Structs +/// are typechecked nominally in C/C++, so they are not copied, instead a +/// comment is added to their definition. +typedef Dart_Port_DL = ffi.Int64; +typedef Dart_PostInteger_Type = ffi + .Pointer>; +typedef Dart_NewNativePort_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_Port_DL Function( + ffi.Pointer, Dart_NativeMessageHandler_DL, ffi.Bool)>>; +typedef Dart_NativeMessageHandler_DL = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_Port_DL, ffi.Pointer)>>; +typedef Dart_CloseNativePort_Type + = ffi.Pointer>; +typedef Dart_IsError_Type + = ffi.Pointer>; +typedef Dart_IsApiError_Type + = ffi.Pointer>; +typedef Dart_IsUnhandledExceptionError_Type + = ffi.Pointer>; +typedef Dart_IsCompilationError_Type + = ffi.Pointer>; +typedef Dart_IsFatalError_Type + = ffi.Pointer>; +typedef Dart_GetError_Type = ffi + .Pointer Function(ffi.Handle)>>; +typedef Dart_ErrorHasException_Type + = ffi.Pointer>; +typedef Dart_ErrorGetException_Type + = ffi.Pointer>; +typedef Dart_ErrorGetStackTrace_Type + = ffi.Pointer>; +typedef Dart_NewApiError_Type = ffi + .Pointer)>>; +typedef Dart_NewCompilationError_Type = ffi + .Pointer)>>; +typedef Dart_NewUnhandledExceptionError_Type + = ffi.Pointer>; +typedef Dart_PropagateError_Type + = ffi.Pointer>; +typedef Dart_HandleFromPersistent_Type + = ffi.Pointer>; +typedef Dart_HandleFromWeakPersistent_Type = ffi.Pointer< + ffi.NativeFunction>; +typedef Dart_NewPersistentHandle_Type + = ffi.Pointer>; +typedef Dart_SetPersistentHandle_Type = ffi + .Pointer>; +typedef Dart_DeletePersistentHandle_Type + = ffi.Pointer>; +typedef Dart_NewWeakPersistentHandle_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_WeakPersistentHandle Function(ffi.Handle, ffi.Pointer, + ffi.IntPtr, Dart_HandleFinalizer)>>; +typedef Dart_DeleteWeakPersistentHandle_Type = ffi + .Pointer>; +typedef Dart_UpdateExternalSize_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_WeakPersistentHandle, ffi.IntPtr)>>; +typedef Dart_NewFinalizableHandle_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, + ffi.IntPtr, Dart_HandleFinalizer)>>; +typedef Dart_DeleteFinalizableHandle_Type = ffi.Pointer< + ffi.NativeFunction>; +typedef Dart_UpdateFinalizableExternalSize_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, ffi.IntPtr)>>; +typedef Dart_Post_Type = ffi + .Pointer>; +typedef Dart_NewSendPort_Type + = ffi.Pointer>; +typedef Dart_SendPortGetId_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer)>>; +typedef Dart_EnterScope_Type + = ffi.Pointer>; +typedef Dart_ExitScope_Type + = ffi.Pointer>; + +/// The type of message being sent to a Dart port. See CUPHTTPClientDelegate. +abstract class MessageType { + static const int ResponseMessage = 0; + static const int DataMessage = 1; + static const int CompletedMessage = 2; + static const int RedirectMessage = 3; + static const int FinishedDownloading = 4; +} + +/// The configuration associated with a NSURLSessionTask. +/// See CUPHTTPClientDelegate. +class CUPHTTPTaskConfiguration extends NSObject { + CUPHTTPTaskConfiguration._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPTaskConfiguration] that points to the same underlying object as [other]. + static CUPHTTPTaskConfiguration castFrom(T other) { + return CUPHTTPTaskConfiguration._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPTaskConfiguration] that wraps the given raw object pointer. + static CUPHTTPTaskConfiguration castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPTaskConfiguration._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPTaskConfiguration]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPTaskConfiguration1); + } + + NSObject initWithPort_(int sendPort) { + final _ret = + _lib._objc_msgSend_470(_id, _lib._sel_initWithPort_1, sendPort); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + int get sendPort { + return _lib._objc_msgSend_325(_id, _lib._sel_sendPort1); + } + + static CUPHTTPTaskConfiguration new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_new1); + return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPTaskConfiguration alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_alloc1); + return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + } +} + +/// A delegate for NSURLSession that forwards events for registered +/// NSURLSessionTasks and forwards them to a port for consumption in Dart. +/// +/// The messages sent to the port are contained in a List with one of 3 +/// possible formats: +/// +/// 1. When the delegate receives a HTTP redirect response: +/// [MessageType::RedirectMessage, ] +/// +/// 2. When the delegate receives a HTTP response: +/// [MessageType::ResponseMessage, ] +/// +/// 3. When the delegate receives some HTTP data: +/// [MessageType::DataMessage, ] +/// +/// 4. When the delegate is informed that the response is complete: +/// [MessageType::CompletedMessage, ] +class CUPHTTPClientDelegate extends NSObject { + CUPHTTPClientDelegate._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPClientDelegate] that points to the same underlying object as [other]. + static CUPHTTPClientDelegate castFrom(T other) { + return CUPHTTPClientDelegate._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPClientDelegate] that wraps the given raw object pointer. + static CUPHTTPClientDelegate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPClientDelegate._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPClientDelegate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPClientDelegate1); + } + + /// Instruct the delegate to forward events for the given task to the port + /// specified in the configuration. + void registerTask_withConfiguration_( + NSURLSessionTask? task, CUPHTTPTaskConfiguration? config) { + return _lib._objc_msgSend_471( + _id, + _lib._sel_registerTask_withConfiguration_1, + task?._id ?? ffi.nullptr, + config?._id ?? ffi.nullptr); + } + + static CUPHTTPClientDelegate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPClientDelegate1, _lib._sel_new1); + return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPClientDelegate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPClientDelegate1, _lib._sel_alloc1); + return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + } +} + +/// An object used to communicate redirect information to Dart code. +/// +/// The flow is: +/// 1. CUPHTTPClientDelegate receives a message from the URL Loading System. +/// 2. CUPHTTPClientDelegate creates a new CUPHTTPForwardedDelegate subclass. +/// 3. CUPHTTPClientDelegate sends the CUPHTTPForwardedDelegate to the +/// configured Dart_Port. +/// 4. CUPHTTPClientDelegate waits on CUPHTTPForwardedDelegate.lock +/// 5. When the Dart code is done process the message received on the port, +/// it calls [CUPHTTPForwardedDelegate finish*], which releases the lock. +/// 6. CUPHTTPClientDelegate continues running. +class CUPHTTPForwardedDelegate extends NSObject { + CUPHTTPForwardedDelegate._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedDelegate] that points to the same underlying object as [other]. + static CUPHTTPForwardedDelegate castFrom(T other) { + return CUPHTTPForwardedDelegate._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedDelegate] that wraps the given raw object pointer. + static CUPHTTPForwardedDelegate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedDelegate._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedDelegate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedDelegate1); + } + + NSObject initWithSession_task_( + NSURLSession? session, NSURLSessionTask? task) { + final _ret = _lib._objc_msgSend_472(_id, _lib._sel_initWithSession_task_1, + session?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// Indicates that the task should continue executing using the given request. + void finish() { + return _lib._objc_msgSend_1(_id, _lib._sel_finish1); + } + + NSURLSession? get session { + final _ret = _lib._objc_msgSend_380(_id, _lib._sel_session1); + return _ret.address == 0 + ? null + : NSURLSession._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionTask? get task { + final _ret = _lib._objc_msgSend_473(_id, _lib._sel_task1); + return _ret.address == 0 + ? null + : NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } + + /// This property is meant to be used only by CUPHTTPClientDelegate. + NSLock? get lock { + final _ret = _lib._objc_msgSend_474(_id, _lib._sel_lock1); + return _ret.address == 0 + ? null + : NSLock._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedDelegate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_new1); + return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedDelegate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_alloc1); + return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + } +} + +class NSLock extends _ObjCWrapper { + NSLock._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSLock] that points to the same underlying object as [other]. + static NSLock castFrom(T other) { + return NSLock._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSLock] that wraps the given raw object pointer. + static NSLock castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSLock._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSLock]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLock1); + } +} + +class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedRedirect._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedRedirect] that points to the same underlying object as [other]. + static CUPHTTPForwardedRedirect castFrom(T other) { + return CUPHTTPForwardedRedirect._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedRedirect] that wraps the given raw object pointer. + static CUPHTTPForwardedRedirect castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedRedirect._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedRedirect]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedRedirect1); + } + + NSObject initWithSession_task_response_request_( + NSURLSession? session, + NSURLSessionTask? task, + NSHTTPURLResponse? response, + NSURLRequest? request) { + final _ret = _lib._objc_msgSend_475( + _id, + _lib._sel_initWithSession_task_response_request_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + response?._id ?? ffi.nullptr, + request?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// Indicates that the task should continue executing using the given request. + /// If the request is NIL then the redirect is not followed and the task is + /// complete. + void finishWithRequest_(NSURLRequest? request) { + return _lib._objc_msgSend_476( + _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); + } + + NSHTTPURLResponse? get response { + final _ret = _lib._objc_msgSend_477(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + } + + NSURLRequest? get request { + final _ret = _lib._objc_msgSend_371(_id, _lib._sel_request1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// This property is meant to be used only by CUPHTTPClientDelegate. + NSURLRequest? get redirectRequest { + final _ret = _lib._objc_msgSend_371(_id, _lib._sel_redirectRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedRedirect new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_new1); + return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedRedirect alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_alloc1); + return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + } +} + +class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedResponse._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedResponse] that points to the same underlying object as [other]. + static CUPHTTPForwardedResponse castFrom(T other) { + return CUPHTTPForwardedResponse._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedResponse] that wraps the given raw object pointer. + static CUPHTTPForwardedResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedResponse._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedResponse1); + } + + NSObject initWithSession_task_response_( + NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { + final _ret = _lib._objc_msgSend_478( + _id, + _lib._sel_initWithSession_task_response_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + response?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void finishWithDisposition_(int disposition) { + return _lib._objc_msgSend_479( + _id, _lib._sel_finishWithDisposition_1, disposition); + } + + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_373(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// This property is meant to be used only by CUPHTTPClientDelegate. + int get disposition { + return _lib._objc_msgSend_480(_id, _lib._sel_disposition1); + } + + static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedResponse1, _lib._sel_new1); + return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedResponse alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedResponse1, _lib._sel_alloc1); + return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + } +} + +class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedData] that points to the same underlying object as [other]. + static CUPHTTPForwardedData castFrom(T other) { + return CUPHTTPForwardedData._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedData] that wraps the given raw object pointer. + static CUPHTTPForwardedData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedData._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedData1); + } + + NSObject initWithSession_task_data_( + NSURLSession? session, NSURLSessionTask? task, NSData? data) { + final _ret = _lib._objc_msgSend_481( + _id, + _lib._sel_initWithSession_task_data_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + data?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSData? get data { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_CUPHTTPForwardedData1, _lib._sel_new1); + return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedData alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedData1, _lib._sel_alloc1); + return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + } +} + +class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedComplete._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedComplete] that points to the same underlying object as [other]. + static CUPHTTPForwardedComplete castFrom(T other) { + return CUPHTTPForwardedComplete._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedComplete] that wraps the given raw object pointer. + static CUPHTTPForwardedComplete castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedComplete._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedComplete]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedComplete1); + } + + NSObject initWithSession_task_error_( + NSURLSession? session, NSURLSessionTask? task, NSError? error) { + final _ret = _lib._objc_msgSend_482( + _id, + _lib._sel_initWithSession_task_error_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + error?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSError? get error { + final _ret = _lib._objc_msgSend_376(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedComplete new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedComplete1, _lib._sel_new1); + return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedComplete alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedComplete1, _lib._sel_alloc1); + return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + } +} + +class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedFinishedDownloading._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedFinishedDownloading] that points to the same underlying object as [other]. + static CUPHTTPForwardedFinishedDownloading castFrom( + T other) { + return CUPHTTPForwardedFinishedDownloading._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedFinishedDownloading] that wraps the given raw object pointer. + static CUPHTTPForwardedFinishedDownloading castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedFinishedDownloading._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedFinishedDownloading]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedFinishedDownloading1); + } + + NSObject initWithSession_downloadTask_url_(NSURLSession? session, + NSURLSessionDownloadTask? downloadTask, NSURL? location) { + final _ret = _lib._objc_msgSend_483( + _id, + _lib._sel_initWithSession_downloadTask_url_1, + session?._id ?? ffi.nullptr, + downloadTask?._id ?? ffi.nullptr, + location?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSURL? get location { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_location1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedFinishedDownloading new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_new1); + return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, + retain: false, release: true); + } + + static CUPHTTPForwardedFinishedDownloading alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_alloc1); + return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, + retain: false, release: true); + } +} + +const int noErr = 0; + +const int kNilOptions = 0; + +const int kVariableLengthArray = 1; + +const int kUnknownType = 1061109567; + +const int normal = 0; + +const int bold = 1; + +const int italic = 2; + +const int underline = 4; + +const int outline = 8; + +const int shadow = 16; + +const int condense = 32; + +const int extend = 64; + +const int developStage = 32; + +const int alphaStage = 64; + +const int betaStage = 96; + +const int finalStage = 128; + +const int NSScannedOption = 1; + +const int NSCollectorDisabledOption = 2; + +const int errSecSuccess = 0; + +const int errSecUnimplemented = -4; + +const int errSecDiskFull = -34; + +const int errSecDskFull = -34; + +const int errSecIO = -36; + +const int errSecOpWr = -49; + +const int errSecParam = -50; + +const int errSecWrPerm = -61; + +const int errSecAllocate = -108; + +const int errSecUserCanceled = -128; + +const int errSecBadReq = -909; + +const int errSecInternalComponent = -2070; + +const int errSecCoreFoundationUnknown = -4960; + +const int errSecMissingEntitlement = -34018; + +const int errSecRestrictedAPI = -34020; + +const int errSecNotAvailable = -25291; + +const int errSecReadOnly = -25292; + +const int errSecAuthFailed = -25293; + +const int errSecNoSuchKeychain = -25294; + +const int errSecInvalidKeychain = -25295; + +const int errSecDuplicateKeychain = -25296; + +const int errSecDuplicateCallback = -25297; + +const int errSecInvalidCallback = -25298; + +const int errSecDuplicateItem = -25299; + +const int errSecItemNotFound = -25300; + +const int errSecBufferTooSmall = -25301; + +const int errSecDataTooLarge = -25302; + +const int errSecNoSuchAttr = -25303; + +const int errSecInvalidItemRef = -25304; + +const int errSecInvalidSearchRef = -25305; + +const int errSecNoSuchClass = -25306; + +const int errSecNoDefaultKeychain = -25307; + +const int errSecInteractionNotAllowed = -25308; + +const int errSecReadOnlyAttr = -25309; + +const int errSecWrongSecVersion = -25310; + +const int errSecKeySizeNotAllowed = -25311; + +const int errSecNoStorageModule = -25312; + +const int errSecNoCertificateModule = -25313; + +const int errSecNoPolicyModule = -25314; + +const int errSecInteractionRequired = -25315; + +const int errSecDataNotAvailable = -25316; + +const int errSecDataNotModifiable = -25317; + +const int errSecCreateChainFailed = -25318; + +const int errSecInvalidPrefsDomain = -25319; + +const int errSecInDarkWake = -25320; + +const int errSecACLNotSimple = -25240; + +const int errSecPolicyNotFound = -25241; + +const int errSecInvalidTrustSetting = -25242; + +const int errSecNoAccessForItem = -25243; + +const int errSecInvalidOwnerEdit = -25244; + +const int errSecTrustNotAvailable = -25245; + +const int errSecUnsupportedFormat = -25256; + +const int errSecUnknownFormat = -25257; + +const int errSecKeyIsSensitive = -25258; + +const int errSecMultiplePrivKeys = -25259; + +const int errSecPassphraseRequired = -25260; + +const int errSecInvalidPasswordRef = -25261; + +const int errSecInvalidTrustSettings = -25262; + +const int errSecNoTrustSettings = -25263; + +const int errSecPkcs12VerifyFailure = -25264; + +const int errSecNotSigner = -26267; + +const int errSecDecode = -26275; + +const int errSecServiceNotAvailable = -67585; + +const int errSecInsufficientClientID = -67586; + +const int errSecDeviceReset = -67587; + +const int errSecDeviceFailed = -67588; + +const int errSecAppleAddAppACLSubject = -67589; + +const int errSecApplePublicKeyIncomplete = -67590; + +const int errSecAppleSignatureMismatch = -67591; + +const int errSecAppleInvalidKeyStartDate = -67592; + +const int errSecAppleInvalidKeyEndDate = -67593; + +const int errSecConversionError = -67594; + +const int errSecAppleSSLv2Rollback = -67595; + +const int errSecQuotaExceeded = -67596; + +const int errSecFileTooBig = -67597; + +const int errSecInvalidDatabaseBlob = -67598; + +const int errSecInvalidKeyBlob = -67599; + +const int errSecIncompatibleDatabaseBlob = -67600; + +const int errSecIncompatibleKeyBlob = -67601; + +const int errSecHostNameMismatch = -67602; + +const int errSecUnknownCriticalExtensionFlag = -67603; + +const int errSecNoBasicConstraints = -67604; + +const int errSecNoBasicConstraintsCA = -67605; + +const int errSecInvalidAuthorityKeyID = -67606; + +const int errSecInvalidSubjectKeyID = -67607; + +const int errSecInvalidKeyUsageForPolicy = -67608; + +const int errSecInvalidExtendedKeyUsage = -67609; + +const int errSecInvalidIDLinkage = -67610; + +const int errSecPathLengthConstraintExceeded = -67611; + +const int errSecInvalidRoot = -67612; + +const int errSecCRLExpired = -67613; + +const int errSecCRLNotValidYet = -67614; + +const int errSecCRLNotFound = -67615; + +const int errSecCRLServerDown = -67616; + +const int errSecCRLBadURI = -67617; + +const int errSecUnknownCertExtension = -67618; + +const int errSecUnknownCRLExtension = -67619; + +const int errSecCRLNotTrusted = -67620; + +const int errSecCRLPolicyFailed = -67621; + +const int errSecIDPFailure = -67622; + +const int errSecSMIMEEmailAddressesNotFound = -67623; + +const int errSecSMIMEBadExtendedKeyUsage = -67624; + +const int errSecSMIMEBadKeyUsage = -67625; + +const int errSecSMIMEKeyUsageNotCritical = -67626; + +const int errSecSMIMENoEmailAddress = -67627; + +const int errSecSMIMESubjAltNameNotCritical = -67628; + +const int errSecSSLBadExtendedKeyUsage = -67629; + +const int errSecOCSPBadResponse = -67630; + +const int errSecOCSPBadRequest = -67631; + +const int errSecOCSPUnavailable = -67632; + +const int errSecOCSPStatusUnrecognized = -67633; + +const int errSecEndOfData = -67634; + +const int errSecIncompleteCertRevocationCheck = -67635; + +const int errSecNetworkFailure = -67636; + +const int errSecOCSPNotTrustedToAnchor = -67637; + +const int errSecRecordModified = -67638; + +const int errSecOCSPSignatureError = -67639; + +const int errSecOCSPNoSigner = -67640; + +const int errSecOCSPResponderMalformedReq = -67641; + +const int errSecOCSPResponderInternalError = -67642; + +const int errSecOCSPResponderTryLater = -67643; + +const int errSecOCSPResponderSignatureRequired = -67644; + +const int errSecOCSPResponderUnauthorized = -67645; + +const int errSecOCSPResponseNonceMismatch = -67646; + +const int errSecCodeSigningBadCertChainLength = -67647; + +const int errSecCodeSigningNoBasicConstraints = -67648; + +const int errSecCodeSigningBadPathLengthConstraint = -67649; + +const int errSecCodeSigningNoExtendedKeyUsage = -67650; + +const int errSecCodeSigningDevelopment = -67651; + +const int errSecResourceSignBadCertChainLength = -67652; + +const int errSecResourceSignBadExtKeyUsage = -67653; + +const int errSecTrustSettingDeny = -67654; + +const int errSecInvalidSubjectName = -67655; + +const int errSecUnknownQualifiedCertStatement = -67656; + +const int errSecMobileMeRequestQueued = -67657; + +const int errSecMobileMeRequestRedirected = -67658; + +const int errSecMobileMeServerError = -67659; + +const int errSecMobileMeServerNotAvailable = -67660; + +const int errSecMobileMeServerAlreadyExists = -67661; + +const int errSecMobileMeServerServiceErr = -67662; + +const int errSecMobileMeRequestAlreadyPending = -67663; + +const int errSecMobileMeNoRequestPending = -67664; + +const int errSecMobileMeCSRVerifyFailure = -67665; + +const int errSecMobileMeFailedConsistencyCheck = -67666; + +const int errSecNotInitialized = -67667; + +const int errSecInvalidHandleUsage = -67668; + +const int errSecPVCReferentNotFound = -67669; + +const int errSecFunctionIntegrityFail = -67670; + +const int errSecInternalError = -67671; + +const int errSecMemoryError = -67672; + +const int errSecInvalidData = -67673; + +const int errSecMDSError = -67674; + +const int errSecInvalidPointer = -67675; + +const int errSecSelfCheckFailed = -67676; + +const int errSecFunctionFailed = -67677; + +const int errSecModuleManifestVerifyFailed = -67678; + +const int errSecInvalidGUID = -67679; + +const int errSecInvalidHandle = -67680; + +const int errSecInvalidDBList = -67681; + +const int errSecInvalidPassthroughID = -67682; + +const int errSecInvalidNetworkAddress = -67683; + +const int errSecCRLAlreadySigned = -67684; + +const int errSecInvalidNumberOfFields = -67685; + +const int errSecVerificationFailure = -67686; + +const int errSecUnknownTag = -67687; + +const int errSecInvalidSignature = -67688; + +const int errSecInvalidName = -67689; + +const int errSecInvalidCertificateRef = -67690; + +const int errSecInvalidCertificateGroup = -67691; + +const int errSecTagNotFound = -67692; + +const int errSecInvalidQuery = -67693; + +const int errSecInvalidValue = -67694; + +const int errSecCallbackFailed = -67695; + +const int errSecACLDeleteFailed = -67696; + +const int errSecACLReplaceFailed = -67697; + +const int errSecACLAddFailed = -67698; + +const int errSecACLChangeFailed = -67699; + +const int errSecInvalidAccessCredentials = -67700; + +const int errSecInvalidRecord = -67701; + +const int errSecInvalidACL = -67702; + +const int errSecInvalidSampleValue = -67703; + +const int errSecIncompatibleVersion = -67704; + +const int errSecPrivilegeNotGranted = -67705; + +const int errSecInvalidScope = -67706; + +const int errSecPVCAlreadyConfigured = -67707; + +const int errSecInvalidPVC = -67708; + +const int errSecEMMLoadFailed = -67709; + +const int errSecEMMUnloadFailed = -67710; + +const int errSecAddinLoadFailed = -67711; + +const int errSecInvalidKeyRef = -67712; + +const int errSecInvalidKeyHierarchy = -67713; + +const int errSecAddinUnloadFailed = -67714; + +const int errSecLibraryReferenceNotFound = -67715; + +const int errSecInvalidAddinFunctionTable = -67716; + +const int errSecInvalidServiceMask = -67717; + +const int errSecModuleNotLoaded = -67718; + +const int errSecInvalidSubServiceID = -67719; + +const int errSecAttributeNotInContext = -67720; + +const int errSecModuleManagerInitializeFailed = -67721; + +const int errSecModuleManagerNotFound = -67722; + +const int errSecEventNotificationCallbackNotFound = -67723; + +const int errSecInputLengthError = -67724; + +const int errSecOutputLengthError = -67725; + +const int errSecPrivilegeNotSupported = -67726; + +const int errSecDeviceError = -67727; + +const int errSecAttachHandleBusy = -67728; + +const int errSecNotLoggedIn = -67729; + +const int errSecAlgorithmMismatch = -67730; + +const int errSecKeyUsageIncorrect = -67731; + +const int errSecKeyBlobTypeIncorrect = -67732; + +const int errSecKeyHeaderInconsistent = -67733; + +const int errSecUnsupportedKeyFormat = -67734; + +const int errSecUnsupportedKeySize = -67735; + +const int errSecInvalidKeyUsageMask = -67736; + +const int errSecUnsupportedKeyUsageMask = -67737; + +const int errSecInvalidKeyAttributeMask = -67738; + +const int errSecUnsupportedKeyAttributeMask = -67739; + +const int errSecInvalidKeyLabel = -67740; + +const int errSecUnsupportedKeyLabel = -67741; + +const int errSecInvalidKeyFormat = -67742; + +const int errSecUnsupportedVectorOfBuffers = -67743; + +const int errSecInvalidInputVector = -67744; + +const int errSecInvalidOutputVector = -67745; + +const int errSecInvalidContext = -67746; + +const int errSecInvalidAlgorithm = -67747; + +const int errSecInvalidAttributeKey = -67748; + +const int errSecMissingAttributeKey = -67749; + +const int errSecInvalidAttributeInitVector = -67750; + +const int errSecMissingAttributeInitVector = -67751; + +const int errSecInvalidAttributeSalt = -67752; + +const int errSecMissingAttributeSalt = -67753; + +const int errSecInvalidAttributePadding = -67754; + +const int errSecMissingAttributePadding = -67755; + +const int errSecInvalidAttributeRandom = -67756; + +const int errSecMissingAttributeRandom = -67757; + +const int errSecInvalidAttributeSeed = -67758; + +const int errSecMissingAttributeSeed = -67759; + +const int errSecInvalidAttributePassphrase = -67760; + +const int errSecMissingAttributePassphrase = -67761; + +const int errSecInvalidAttributeKeyLength = -67762; + +const int errSecMissingAttributeKeyLength = -67763; + +const int errSecInvalidAttributeBlockSize = -67764; + +const int errSecMissingAttributeBlockSize = -67765; + +const int errSecInvalidAttributeOutputSize = -67766; + +const int errSecMissingAttributeOutputSize = -67767; + +const int errSecInvalidAttributeRounds = -67768; + +const int errSecMissingAttributeRounds = -67769; + +const int errSecInvalidAlgorithmParms = -67770; + +const int errSecMissingAlgorithmParms = -67771; + +const int errSecInvalidAttributeLabel = -67772; + +const int errSecMissingAttributeLabel = -67773; + +const int errSecInvalidAttributeKeyType = -67774; + +const int errSecMissingAttributeKeyType = -67775; + +const int errSecInvalidAttributeMode = -67776; + +const int errSecMissingAttributeMode = -67777; + +const int errSecInvalidAttributeEffectiveBits = -67778; + +const int errSecMissingAttributeEffectiveBits = -67779; + +const int errSecInvalidAttributeStartDate = -67780; + +const int errSecMissingAttributeStartDate = -67781; + +const int errSecInvalidAttributeEndDate = -67782; + +const int errSecMissingAttributeEndDate = -67783; + +const int errSecInvalidAttributeVersion = -67784; + +const int errSecMissingAttributeVersion = -67785; + +const int errSecInvalidAttributePrime = -67786; + +const int errSecMissingAttributePrime = -67787; + +const int errSecInvalidAttributeBase = -67788; + +const int errSecMissingAttributeBase = -67789; + +const int errSecInvalidAttributeSubprime = -67790; + +const int errSecMissingAttributeSubprime = -67791; + +const int errSecInvalidAttributeIterationCount = -67792; + +const int errSecMissingAttributeIterationCount = -67793; + +const int errSecInvalidAttributeDLDBHandle = -67794; + +const int errSecMissingAttributeDLDBHandle = -67795; + +const int errSecInvalidAttributeAccessCredentials = -67796; + +const int errSecMissingAttributeAccessCredentials = -67797; + +const int errSecInvalidAttributePublicKeyFormat = -67798; + +const int errSecMissingAttributePublicKeyFormat = -67799; + +const int errSecInvalidAttributePrivateKeyFormat = -67800; + +const int errSecMissingAttributePrivateKeyFormat = -67801; + +const int errSecInvalidAttributeSymmetricKeyFormat = -67802; + +const int errSecMissingAttributeSymmetricKeyFormat = -67803; + +const int errSecInvalidAttributeWrappedKeyFormat = -67804; + +const int errSecMissingAttributeWrappedKeyFormat = -67805; + +const int errSecStagedOperationInProgress = -67806; + +const int errSecStagedOperationNotStarted = -67807; + +const int errSecVerifyFailed = -67808; + +const int errSecQuerySizeUnknown = -67809; + +const int errSecBlockSizeMismatch = -67810; + +const int errSecPublicKeyInconsistent = -67811; + +const int errSecDeviceVerifyFailed = -67812; + +const int errSecInvalidLoginName = -67813; + +const int errSecAlreadyLoggedIn = -67814; + +const int errSecInvalidDigestAlgorithm = -67815; + +const int errSecInvalidCRLGroup = -67816; + +const int errSecCertificateCannotOperate = -67817; + +const int errSecCertificateExpired = -67818; + +const int errSecCertificateNotValidYet = -67819; + +const int errSecCertificateRevoked = -67820; + +const int errSecCertificateSuspended = -67821; + +const int errSecInsufficientCredentials = -67822; + +const int errSecInvalidAction = -67823; + +const int errSecInvalidAuthority = -67824; + +const int errSecVerifyActionFailed = -67825; + +const int errSecInvalidCertAuthority = -67826; + +const int errSecInvalidCRLAuthority = -67827; + +const int errSecInvaldCRLAuthority = -67827; + +const int errSecInvalidCRLEncoding = -67828; + +const int errSecInvalidCRLType = -67829; + +const int errSecInvalidCRL = -67830; + +const int errSecInvalidFormType = -67831; + +const int errSecInvalidID = -67832; + +const int errSecInvalidIdentifier = -67833; + +const int errSecInvalidIndex = -67834; + +const int errSecInvalidPolicyIdentifiers = -67835; + +const int errSecInvalidTimeString = -67836; + +const int errSecInvalidReason = -67837; + +const int errSecInvalidRequestInputs = -67838; + +const int errSecInvalidResponseVector = -67839; + +const int errSecInvalidStopOnPolicy = -67840; + +const int errSecInvalidTuple = -67841; + +const int errSecMultipleValuesUnsupported = -67842; + +const int errSecNotTrusted = -67843; + +const int errSecNoDefaultAuthority = -67844; + +const int errSecRejectedForm = -67845; + +const int errSecRequestLost = -67846; + +const int errSecRequestRejected = -67847; + +const int errSecUnsupportedAddressType = -67848; + +const int errSecUnsupportedService = -67849; + +const int errSecInvalidTupleGroup = -67850; + +const int errSecInvalidBaseACLs = -67851; + +const int errSecInvalidTupleCredentials = -67852; + +const int errSecInvalidTupleCredendtials = -67852; + +const int errSecInvalidEncoding = -67853; + +const int errSecInvalidValidityPeriod = -67854; + +const int errSecInvalidRequestor = -67855; + +const int errSecRequestDescriptor = -67856; + +const int errSecInvalidBundleInfo = -67857; + +const int errSecInvalidCRLIndex = -67858; + +const int errSecNoFieldValues = -67859; + +const int errSecUnsupportedFieldFormat = -67860; + +const int errSecUnsupportedIndexInfo = -67861; + +const int errSecUnsupportedLocality = -67862; + +const int errSecUnsupportedNumAttributes = -67863; + +const int errSecUnsupportedNumIndexes = -67864; + +const int errSecUnsupportedNumRecordTypes = -67865; + +const int errSecFieldSpecifiedMultiple = -67866; + +const int errSecIncompatibleFieldFormat = -67867; + +const int errSecInvalidParsingModule = -67868; + +const int errSecDatabaseLocked = -67869; + +const int errSecDatastoreIsOpen = -67870; + +const int errSecMissingValue = -67871; + +const int errSecUnsupportedQueryLimits = -67872; + +const int errSecUnsupportedNumSelectionPreds = -67873; + +const int errSecUnsupportedOperator = -67874; + +const int errSecInvalidDBLocation = -67875; + +const int errSecInvalidAccessRequest = -67876; + +const int errSecInvalidIndexInfo = -67877; + +const int errSecInvalidNewOwner = -67878; + +const int errSecInvalidModifyMode = -67879; + +const int errSecMissingRequiredExtension = -67880; + +const int errSecExtendedKeyUsageNotCritical = -67881; + +const int errSecTimestampMissing = -67882; + +const int errSecTimestampInvalid = -67883; + +const int errSecTimestampNotTrusted = -67884; + +const int errSecTimestampServiceNotAvailable = -67885; + +const int errSecTimestampBadAlg = -67886; + +const int errSecTimestampBadRequest = -67887; + +const int errSecTimestampBadDataFormat = -67888; + +const int errSecTimestampTimeNotAvailable = -67889; + +const int errSecTimestampUnacceptedPolicy = -67890; + +const int errSecTimestampUnacceptedExtension = -67891; + +const int errSecTimestampAddInfoNotAvailable = -67892; + +const int errSecTimestampSystemFailure = -67893; + +const int errSecSigningTimeMissing = -67894; + +const int errSecTimestampRejection = -67895; + +const int errSecTimestampWaiting = -67896; + +const int errSecTimestampRevocationWarning = -67897; + +const int errSecTimestampRevocationNotification = -67898; + +const int errSecCertificatePolicyNotAllowed = -67899; + +const int errSecCertificateNameNotAllowed = -67900; + +const int errSecCertificateValidityPeriodTooLong = -67901; + +const int errSecCertificateIsCA = -67902; + +const int errSecCertificateDuplicateExtension = -67903; + +const int errSSLProtocol = -9800; + +const int errSSLNegotiation = -9801; + +const int errSSLFatalAlert = -9802; + +const int errSSLWouldBlock = -9803; + +const int errSSLSessionNotFound = -9804; + +const int errSSLClosedGraceful = -9805; + +const int errSSLClosedAbort = -9806; + +const int errSSLXCertChainInvalid = -9807; + +const int errSSLBadCert = -9808; + +const int errSSLCrypto = -9809; + +const int errSSLInternal = -9810; + +const int errSSLModuleAttach = -9811; + +const int errSSLUnknownRootCert = -9812; + +const int errSSLNoRootCert = -9813; + +const int errSSLCertExpired = -9814; + +const int errSSLCertNotYetValid = -9815; + +const int errSSLClosedNoNotify = -9816; + +const int errSSLBufferOverflow = -9817; + +const int errSSLBadCipherSuite = -9818; + +const int errSSLPeerUnexpectedMsg = -9819; + +const int errSSLPeerBadRecordMac = -9820; + +const int errSSLPeerDecryptionFail = -9821; + +const int errSSLPeerRecordOverflow = -9822; + +const int errSSLPeerDecompressFail = -9823; + +const int errSSLPeerHandshakeFail = -9824; + +const int errSSLPeerBadCert = -9825; + +const int errSSLPeerUnsupportedCert = -9826; + +const int errSSLPeerCertRevoked = -9827; + +const int errSSLPeerCertExpired = -9828; + +const int errSSLPeerCertUnknown = -9829; + +const int errSSLIllegalParam = -9830; + +const int errSSLPeerUnknownCA = -9831; + +const int errSSLPeerAccessDenied = -9832; + +const int errSSLPeerDecodeError = -9833; + +const int errSSLPeerDecryptError = -9834; + +const int errSSLPeerExportRestriction = -9835; + +const int errSSLPeerProtocolVersion = -9836; + +const int errSSLPeerInsufficientSecurity = -9837; + +const int errSSLPeerInternalError = -9838; + +const int errSSLPeerUserCancelled = -9839; + +const int errSSLPeerNoRenegotiation = -9840; + +const int errSSLPeerAuthCompleted = -9841; + +const int errSSLClientCertRequested = -9842; + +const int errSSLHostNameMismatch = -9843; + +const int errSSLConnectionRefused = -9844; + +const int errSSLDecryptionFail = -9845; + +const int errSSLBadRecordMac = -9846; + +const int errSSLRecordOverflow = -9847; + +const int errSSLBadConfiguration = -9848; + +const int errSSLUnexpectedRecord = -9849; + +const int errSSLWeakPeerEphemeralDHKey = -9850; + +const int errSSLClientHelloReceived = -9851; + +const int errSSLTransportReset = -9852; + +const int errSSLNetworkTimeout = -9853; + +const int errSSLConfigurationFailed = -9854; + +const int errSSLUnsupportedExtension = -9855; + +const int errSSLUnexpectedMessage = -9856; + +const int errSSLDecompressFail = -9857; + +const int errSSLHandshakeFail = -9858; + +const int errSSLDecodeError = -9859; + +const int errSSLInappropriateFallback = -9860; + +const int errSSLMissingExtension = -9861; + +const int errSSLBadCertificateStatusResponse = -9862; + +const int errSSLCertificateRequired = -9863; + +const int errSSLUnknownPSKIdentity = -9864; + +const int errSSLUnrecognizedName = -9865; + +const int errSSLATSViolation = -9880; + +const int errSSLATSMinimumVersionViolation = -9881; + +const int errSSLATSCiphersuiteViolation = -9882; + +const int errSSLATSMinimumKeySizeViolation = -9883; + +const int errSSLATSLeafCertificateHashAlgorithmViolation = -9884; + +const int errSSLATSCertificateHashAlgorithmViolation = -9885; + +const int errSSLATSCertificateTrustViolation = -9886; + +const int errSSLEarlyDataRejected = -9890; + +const int OSUnknownByteOrder = 0; + +const int OSLittleEndian = 1; + +const int OSBigEndian = 2; + +const int kCFNotificationDeliverImmediately = 1; + +const int kCFNotificationPostToAllSessions = 2; + +const int kCFCalendarComponentsWrap = 1; + +const int kCFSocketAutomaticallyReenableReadCallBack = 1; + +const int kCFSocketAutomaticallyReenableAcceptCallBack = 2; + +const int kCFSocketAutomaticallyReenableDataCallBack = 3; + +const int kCFSocketAutomaticallyReenableWriteCallBack = 8; + +const int kCFSocketLeaveErrors = 64; + +const int kCFSocketCloseOnInvalidate = 128; + +const int DISPATCH_WALLTIME_NOW = -2; + +const int kCFPropertyListReadCorruptError = 3840; + +const int kCFPropertyListReadUnknownVersionError = 3841; + +const int kCFPropertyListReadStreamError = 3842; + +const int kCFPropertyListWriteStreamError = 3851; + +const int kCFBundleExecutableArchitectureI386 = 7; + +const int kCFBundleExecutableArchitecturePPC = 18; + +const int kCFBundleExecutableArchitectureX86_64 = 16777223; + +const int kCFBundleExecutableArchitecturePPC64 = 16777234; + +const int kCFBundleExecutableArchitectureARM64 = 16777228; + +const int kCFMessagePortSuccess = 0; + +const int kCFMessagePortSendTimeout = -1; + +const int kCFMessagePortReceiveTimeout = -2; + +const int kCFMessagePortIsInvalid = -3; + +const int kCFMessagePortTransportError = -4; + +const int kCFMessagePortBecameInvalidError = -5; + +const int kCFStringTokenizerUnitWord = 0; + +const int kCFStringTokenizerUnitSentence = 1; + +const int kCFStringTokenizerUnitParagraph = 2; + +const int kCFStringTokenizerUnitLineBreak = 3; + +const int kCFStringTokenizerUnitWordBoundary = 4; + +const int kCFStringTokenizerAttributeLatinTranscription = 65536; + +const int kCFStringTokenizerAttributeLanguage = 131072; + +const int kCFFileDescriptorReadCallBack = 1; + +const int kCFFileDescriptorWriteCallBack = 2; + +const int kCFUserNotificationStopAlertLevel = 0; + +const int kCFUserNotificationNoteAlertLevel = 1; + +const int kCFUserNotificationCautionAlertLevel = 2; + +const int kCFUserNotificationPlainAlertLevel = 3; + +const int kCFUserNotificationDefaultResponse = 0; + +const int kCFUserNotificationAlternateResponse = 1; + +const int kCFUserNotificationOtherResponse = 2; + +const int kCFUserNotificationCancelResponse = 3; + +const int kCFUserNotificationNoDefaultButtonFlag = 32; + +const int kCFUserNotificationUseRadioButtonsFlag = 64; + +const int kCFXMLNodeCurrentVersion = 1; + +const int CSSM_INVALID_HANDLE = 0; + +const int CSSM_FALSE = 0; + +const int CSSM_TRUE = 1; + +const int CSSM_OK = 0; + +const int CSSM_MODULE_STRING_SIZE = 64; + +const int CSSM_KEY_HIERARCHY_NONE = 0; + +const int CSSM_KEY_HIERARCHY_INTEG = 1; + +const int CSSM_KEY_HIERARCHY_EXPORT = 2; + +const int CSSM_PVC_NONE = 0; + +const int CSSM_PVC_APP = 1; + +const int CSSM_PVC_SP = 2; + +const int CSSM_PRIVILEGE_SCOPE_NONE = 0; + +const int CSSM_PRIVILEGE_SCOPE_PROCESS = 1; + +const int CSSM_PRIVILEGE_SCOPE_THREAD = 2; + +const int CSSM_SERVICE_CSSM = 1; + +const int CSSM_SERVICE_CSP = 2; + +const int CSSM_SERVICE_DL = 4; + +const int CSSM_SERVICE_CL = 8; + +const int CSSM_SERVICE_TP = 16; + +const int CSSM_SERVICE_AC = 32; + +const int CSSM_SERVICE_KR = 64; + +const int CSSM_NOTIFY_INSERT = 1; + +const int CSSM_NOTIFY_REMOVE = 2; + +const int CSSM_NOTIFY_FAULT = 3; + +const int CSSM_ATTACH_READ_ONLY = 1; + +const int CSSM_USEE_LAST = 255; + +const int CSSM_USEE_NONE = 0; + +const int CSSM_USEE_DOMESTIC = 1; + +const int CSSM_USEE_FINANCIAL = 2; + +const int CSSM_USEE_KRLE = 3; + +const int CSSM_USEE_KRENT = 4; + +const int CSSM_USEE_SSL = 5; + +const int CSSM_USEE_AUTHENTICATION = 6; + +const int CSSM_USEE_KEYEXCH = 7; + +const int CSSM_USEE_MEDICAL = 8; + +const int CSSM_USEE_INSURANCE = 9; + +const int CSSM_USEE_WEAK = 10; + +const int CSSM_ADDR_NONE = 0; + +const int CSSM_ADDR_CUSTOM = 1; + +const int CSSM_ADDR_URL = 2; + +const int CSSM_ADDR_SOCKADDR = 3; + +const int CSSM_ADDR_NAME = 4; + +const int CSSM_NET_PROTO_NONE = 0; + +const int CSSM_NET_PROTO_CUSTOM = 1; + +const int CSSM_NET_PROTO_UNSPECIFIED = 2; + +const int CSSM_NET_PROTO_LDAP = 3; + +const int CSSM_NET_PROTO_LDAPS = 4; + +const int CSSM_NET_PROTO_LDAPNS = 5; + +const int CSSM_NET_PROTO_X500DAP = 6; + +const int CSSM_NET_PROTO_FTP = 7; + +const int CSSM_NET_PROTO_FTPS = 8; + +const int CSSM_NET_PROTO_OCSP = 9; + +const int CSSM_NET_PROTO_CMP = 10; + +const int CSSM_NET_PROTO_CMPS = 11; + +const int CSSM_WORDID__UNK_ = -1; + +const int CSSM_WORDID__NLU_ = 0; + +const int CSSM_WORDID__STAR_ = 1; + +const int CSSM_WORDID_A = 2; + +const int CSSM_WORDID_ACL = 3; + +const int CSSM_WORDID_ALPHA = 4; + +const int CSSM_WORDID_B = 5; + +const int CSSM_WORDID_BER = 6; + +const int CSSM_WORDID_BINARY = 7; + +const int CSSM_WORDID_BIOMETRIC = 8; + +const int CSSM_WORDID_C = 9; + +const int CSSM_WORDID_CANCELED = 10; + +const int CSSM_WORDID_CERT = 11; + +const int CSSM_WORDID_COMMENT = 12; + +const int CSSM_WORDID_CRL = 13; + +const int CSSM_WORDID_CUSTOM = 14; + +const int CSSM_WORDID_D = 15; + +const int CSSM_WORDID_DATE = 16; + +const int CSSM_WORDID_DB_DELETE = 17; + +const int CSSM_WORDID_DB_EXEC_STORED_QUERY = 18; + +const int CSSM_WORDID_DB_INSERT = 19; + +const int CSSM_WORDID_DB_MODIFY = 20; + +const int CSSM_WORDID_DB_READ = 21; + +const int CSSM_WORDID_DBS_CREATE = 22; + +const int CSSM_WORDID_DBS_DELETE = 23; + +const int CSSM_WORDID_DECRYPT = 24; + +const int CSSM_WORDID_DELETE = 25; + +const int CSSM_WORDID_DELTA_CRL = 26; + +const int CSSM_WORDID_DER = 27; + +const int CSSM_WORDID_DERIVE = 28; + +const int CSSM_WORDID_DISPLAY = 29; + +const int CSSM_WORDID_DO = 30; + +const int CSSM_WORDID_DSA = 31; + +const int CSSM_WORDID_DSA_SHA1 = 32; + +const int CSSM_WORDID_E = 33; + +const int CSSM_WORDID_ELGAMAL = 34; + +const int CSSM_WORDID_ENCRYPT = 35; + +const int CSSM_WORDID_ENTRY = 36; + +const int CSSM_WORDID_EXPORT_CLEAR = 37; + +const int CSSM_WORDID_EXPORT_WRAPPED = 38; + +const int CSSM_WORDID_G = 39; + +const int CSSM_WORDID_GE = 40; + +const int CSSM_WORDID_GENKEY = 41; + +const int CSSM_WORDID_HASH = 42; + +const int CSSM_WORDID_HASHED_PASSWORD = 43; + +const int CSSM_WORDID_HASHED_SUBJECT = 44; + +const int CSSM_WORDID_HAVAL = 45; + +const int CSSM_WORDID_IBCHASH = 46; + +const int CSSM_WORDID_IMPORT_CLEAR = 47; + +const int CSSM_WORDID_IMPORT_WRAPPED = 48; + +const int CSSM_WORDID_INTEL = 49; + +const int CSSM_WORDID_ISSUER = 50; + +const int CSSM_WORDID_ISSUER_INFO = 51; + +const int CSSM_WORDID_K_OF_N = 52; + +const int CSSM_WORDID_KEA = 53; + +const int CSSM_WORDID_KEYHOLDER = 54; + +const int CSSM_WORDID_L = 55; + +const int CSSM_WORDID_LE = 56; + +const int CSSM_WORDID_LOGIN = 57; + +const int CSSM_WORDID_LOGIN_NAME = 58; + +const int CSSM_WORDID_MAC = 59; + +const int CSSM_WORDID_MD2 = 60; + +const int CSSM_WORDID_MD2WITHRSA = 61; + +const int CSSM_WORDID_MD4 = 62; + +const int CSSM_WORDID_MD5 = 63; + +const int CSSM_WORDID_MD5WITHRSA = 64; + +const int CSSM_WORDID_N = 65; + +const int CSSM_WORDID_NAME = 66; + +const int CSSM_WORDID_NDR = 67; + +const int CSSM_WORDID_NHASH = 68; + +const int CSSM_WORDID_NOT_AFTER = 69; + +const int CSSM_WORDID_NOT_BEFORE = 70; + +const int CSSM_WORDID_NULL = 71; + +const int CSSM_WORDID_NUMERIC = 72; + +const int CSSM_WORDID_OBJECT_HASH = 73; + +const int CSSM_WORDID_ONE_TIME = 74; + +const int CSSM_WORDID_ONLINE = 75; + +const int CSSM_WORDID_OWNER = 76; + +const int CSSM_WORDID_P = 77; + +const int CSSM_WORDID_PAM_NAME = 78; + +const int CSSM_WORDID_PASSWORD = 79; + +const int CSSM_WORDID_PGP = 80; + +const int CSSM_WORDID_PREFIX = 81; + +const int CSSM_WORDID_PRIVATE_KEY = 82; + +const int CSSM_WORDID_PROMPTED_BIOMETRIC = 83; + +const int CSSM_WORDID_PROMPTED_PASSWORD = 84; + +const int CSSM_WORDID_PROPAGATE = 85; + +const int CSSM_WORDID_PROTECTED_BIOMETRIC = 86; + +const int CSSM_WORDID_PROTECTED_PASSWORD = 87; + +const int CSSM_WORDID_PROTECTED_PIN = 88; + +const int CSSM_WORDID_PUBLIC_KEY = 89; + +const int CSSM_WORDID_PUBLIC_KEY_FROM_CERT = 90; + +const int CSSM_WORDID_Q = 91; + +const int CSSM_WORDID_RANGE = 92; + +const int CSSM_WORDID_REVAL = 93; + +const int CSSM_WORDID_RIPEMAC = 94; + +const int CSSM_WORDID_RIPEMD = 95; + +const int CSSM_WORDID_RIPEMD160 = 96; + +const int CSSM_WORDID_RSA = 97; + +const int CSSM_WORDID_RSA_ISO9796 = 98; + +const int CSSM_WORDID_RSA_PKCS = 99; + +const int CSSM_WORDID_RSA_PKCS_MD5 = 100; + +const int CSSM_WORDID_RSA_PKCS_SHA1 = 101; + +const int CSSM_WORDID_RSA_PKCS1 = 102; + +const int CSSM_WORDID_RSA_PKCS1_MD5 = 103; + +const int CSSM_WORDID_RSA_PKCS1_SHA1 = 104; + +const int CSSM_WORDID_RSA_PKCS1_SIG = 105; + +const int CSSM_WORDID_RSA_RAW = 106; + +const int CSSM_WORDID_SDSIV1 = 107; + +const int CSSM_WORDID_SEQUENCE = 108; + +const int CSSM_WORDID_SET = 109; + +const int CSSM_WORDID_SEXPR = 110; + +const int CSSM_WORDID_SHA1 = 111; + +const int CSSM_WORDID_SHA1WITHDSA = 112; + +const int CSSM_WORDID_SHA1WITHECDSA = 113; + +const int CSSM_WORDID_SHA1WITHRSA = 114; + +const int CSSM_WORDID_SIGN = 115; + +const int CSSM_WORDID_SIGNATURE = 116; + +const int CSSM_WORDID_SIGNED_NONCE = 117; + +const int CSSM_WORDID_SIGNED_SECRET = 118; + +const int CSSM_WORDID_SPKI = 119; + +const int CSSM_WORDID_SUBJECT = 120; + +const int CSSM_WORDID_SUBJECT_INFO = 121; + +const int CSSM_WORDID_TAG = 122; + +const int CSSM_WORDID_THRESHOLD = 123; + +const int CSSM_WORDID_TIME = 124; + +const int CSSM_WORDID_URI = 125; + +const int CSSM_WORDID_VERSION = 126; + +const int CSSM_WORDID_X509_ATTRIBUTE = 127; + +const int CSSM_WORDID_X509V1 = 128; + +const int CSSM_WORDID_X509V2 = 129; + +const int CSSM_WORDID_X509V3 = 130; + +const int CSSM_WORDID_X9_ATTRIBUTE = 131; + +const int CSSM_WORDID_VENDOR_START = 65536; + +const int CSSM_WORDID_VENDOR_END = 2147418112; + +const int CSSM_LIST_ELEMENT_DATUM = 0; + +const int CSSM_LIST_ELEMENT_SUBLIST = 1; + +const int CSSM_LIST_ELEMENT_WORDID = 2; + +const int CSSM_LIST_TYPE_UNKNOWN = 0; + +const int CSSM_LIST_TYPE_CUSTOM = 1; + +const int CSSM_LIST_TYPE_SEXPR = 2; + +const int CSSM_SAMPLE_TYPE_PASSWORD = 79; + +const int CSSM_SAMPLE_TYPE_HASHED_PASSWORD = 43; + +const int CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD = 87; + +const int CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD = 84; + +const int CSSM_SAMPLE_TYPE_SIGNED_NONCE = 117; + +const int CSSM_SAMPLE_TYPE_SIGNED_SECRET = 118; + +const int CSSM_SAMPLE_TYPE_BIOMETRIC = 8; + +const int CSSM_SAMPLE_TYPE_PROTECTED_BIOMETRIC = 86; + +const int CSSM_SAMPLE_TYPE_PROMPTED_BIOMETRIC = 83; + +const int CSSM_SAMPLE_TYPE_THRESHOLD = 123; + +const int CSSM_CERT_UNKNOWN = 0; + +const int CSSM_CERT_X_509v1 = 1; + +const int CSSM_CERT_X_509v2 = 2; + +const int CSSM_CERT_X_509v3 = 3; + +const int CSSM_CERT_PGP = 4; + +const int CSSM_CERT_SPKI = 5; + +const int CSSM_CERT_SDSIv1 = 6; + +const int CSSM_CERT_Intel = 8; + +const int CSSM_CERT_X_509_ATTRIBUTE = 9; + +const int CSSM_CERT_X9_ATTRIBUTE = 10; + +const int CSSM_CERT_TUPLE = 11; + +const int CSSM_CERT_ACL_ENTRY = 12; + +const int CSSM_CERT_MULTIPLE = 32766; + +const int CSSM_CERT_LAST = 32767; + +const int CSSM_CL_CUSTOM_CERT_TYPE = 32768; + +const int CSSM_CERT_ENCODING_UNKNOWN = 0; + +const int CSSM_CERT_ENCODING_CUSTOM = 1; + +const int CSSM_CERT_ENCODING_BER = 2; + +const int CSSM_CERT_ENCODING_DER = 3; + +const int CSSM_CERT_ENCODING_NDR = 4; + +const int CSSM_CERT_ENCODING_SEXPR = 5; + +const int CSSM_CERT_ENCODING_PGP = 6; + +const int CSSM_CERT_ENCODING_MULTIPLE = 32766; + +const int CSSM_CERT_ENCODING_LAST = 32767; + +const int CSSM_CL_CUSTOM_CERT_ENCODING = 32768; + +const int CSSM_CERT_PARSE_FORMAT_NONE = 0; + +const int CSSM_CERT_PARSE_FORMAT_CUSTOM = 1; + +const int CSSM_CERT_PARSE_FORMAT_SEXPR = 2; + +const int CSSM_CERT_PARSE_FORMAT_COMPLEX = 3; + +const int CSSM_CERT_PARSE_FORMAT_OID_NAMED = 4; + +const int CSSM_CERT_PARSE_FORMAT_TUPLE = 5; + +const int CSSM_CERT_PARSE_FORMAT_MULTIPLE = 32766; + +const int CSSM_CERT_PARSE_FORMAT_LAST = 32767; + +const int CSSM_CL_CUSTOM_CERT_PARSE_FORMAT = 32768; + +const int CSSM_CERTGROUP_DATA = 0; + +const int CSSM_CERTGROUP_ENCODED_CERT = 1; + +const int CSSM_CERTGROUP_PARSED_CERT = 2; + +const int CSSM_CERTGROUP_CERT_PAIR = 3; + +const int CSSM_ACL_SUBJECT_TYPE_ANY = 1; + +const int CSSM_ACL_SUBJECT_TYPE_THRESHOLD = 123; + +const int CSSM_ACL_SUBJECT_TYPE_PASSWORD = 79; + +const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD = 87; + +const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD = 84; + +const int CSSM_ACL_SUBJECT_TYPE_PUBLIC_KEY = 89; + +const int CSSM_ACL_SUBJECT_TYPE_HASHED_SUBJECT = 44; + +const int CSSM_ACL_SUBJECT_TYPE_BIOMETRIC = 8; + +const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_BIOMETRIC = 86; + +const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_BIOMETRIC = 83; + +const int CSSM_ACL_SUBJECT_TYPE_LOGIN_NAME = 58; + +const int CSSM_ACL_SUBJECT_TYPE_EXT_PAM_NAME = 78; + +const int CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START = 65536; + +const int CSSM_ACL_AUTHORIZATION_ANY = 1; + +const int CSSM_ACL_AUTHORIZATION_LOGIN = 57; + +const int CSSM_ACL_AUTHORIZATION_GENKEY = 41; + +const int CSSM_ACL_AUTHORIZATION_DELETE = 25; + +const int CSSM_ACL_AUTHORIZATION_EXPORT_WRAPPED = 38; + +const int CSSM_ACL_AUTHORIZATION_EXPORT_CLEAR = 37; + +const int CSSM_ACL_AUTHORIZATION_IMPORT_WRAPPED = 48; + +const int CSSM_ACL_AUTHORIZATION_IMPORT_CLEAR = 47; + +const int CSSM_ACL_AUTHORIZATION_SIGN = 115; + +const int CSSM_ACL_AUTHORIZATION_ENCRYPT = 35; + +const int CSSM_ACL_AUTHORIZATION_DECRYPT = 24; + +const int CSSM_ACL_AUTHORIZATION_MAC = 59; + +const int CSSM_ACL_AUTHORIZATION_DERIVE = 28; + +const int CSSM_ACL_AUTHORIZATION_DBS_CREATE = 22; + +const int CSSM_ACL_AUTHORIZATION_DBS_DELETE = 23; + +const int CSSM_ACL_AUTHORIZATION_DB_READ = 21; + +const int CSSM_ACL_AUTHORIZATION_DB_INSERT = 19; + +const int CSSM_ACL_AUTHORIZATION_DB_MODIFY = 20; + +const int CSSM_ACL_AUTHORIZATION_DB_DELETE = 17; + +const int CSSM_ACL_EDIT_MODE_ADD = 1; + +const int CSSM_ACL_EDIT_MODE_DELETE = 2; + +const int CSSM_ACL_EDIT_MODE_REPLACE = 3; + +const int CSSM_KEYHEADER_VERSION = 2; + +const int CSSM_KEYBLOB_RAW = 0; + +const int CSSM_KEYBLOB_REFERENCE = 2; + +const int CSSM_KEYBLOB_WRAPPED = 3; + +const int CSSM_KEYBLOB_OTHER = -1; + +const int CSSM_KEYBLOB_RAW_FORMAT_NONE = 0; + +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS1 = 1; + +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS3 = 2; + +const int CSSM_KEYBLOB_RAW_FORMAT_MSCAPI = 3; + +const int CSSM_KEYBLOB_RAW_FORMAT_PGP = 4; + +const int CSSM_KEYBLOB_RAW_FORMAT_FIPS186 = 5; + +const int CSSM_KEYBLOB_RAW_FORMAT_BSAFE = 6; + +const int CSSM_KEYBLOB_RAW_FORMAT_CCA = 9; + +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS8 = 10; + +const int CSSM_KEYBLOB_RAW_FORMAT_SPKI = 11; + +const int CSSM_KEYBLOB_RAW_FORMAT_OCTET_STRING = 12; + +const int CSSM_KEYBLOB_RAW_FORMAT_OTHER = -1; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_NONE = 0; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS8 = 1; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS7 = 2; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_MSCAPI = 3; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OTHER = -1; + +const int CSSM_KEYBLOB_REF_FORMAT_INTEGER = 0; + +const int CSSM_KEYBLOB_REF_FORMAT_STRING = 1; + +const int CSSM_KEYBLOB_REF_FORMAT_SPKI = 2; + +const int CSSM_KEYBLOB_REF_FORMAT_OTHER = -1; + +const int CSSM_KEYCLASS_PUBLIC_KEY = 0; + +const int CSSM_KEYCLASS_PRIVATE_KEY = 1; + +const int CSSM_KEYCLASS_SESSION_KEY = 2; + +const int CSSM_KEYCLASS_SECRET_PART = 3; + +const int CSSM_KEYCLASS_OTHER = -1; + +const int CSSM_KEYATTR_RETURN_DEFAULT = 0; + +const int CSSM_KEYATTR_RETURN_DATA = 268435456; + +const int CSSM_KEYATTR_RETURN_REF = 536870912; + +const int CSSM_KEYATTR_RETURN_NONE = 1073741824; + +const int CSSM_KEYATTR_PERMANENT = 1; + +const int CSSM_KEYATTR_PRIVATE = 2; + +const int CSSM_KEYATTR_MODIFIABLE = 4; + +const int CSSM_KEYATTR_SENSITIVE = 8; + +const int CSSM_KEYATTR_EXTRACTABLE = 32; + +const int CSSM_KEYATTR_ALWAYS_SENSITIVE = 16; + +const int CSSM_KEYATTR_NEVER_EXTRACTABLE = 64; + +const int CSSM_KEYUSE_ANY = -2147483648; + +const int CSSM_KEYUSE_ENCRYPT = 1; + +const int CSSM_KEYUSE_DECRYPT = 2; + +const int CSSM_KEYUSE_SIGN = 4; + +const int CSSM_KEYUSE_VERIFY = 8; + +const int CSSM_KEYUSE_SIGN_RECOVER = 16; + +const int CSSM_KEYUSE_VERIFY_RECOVER = 32; + +const int CSSM_KEYUSE_WRAP = 64; + +const int CSSM_KEYUSE_UNWRAP = 128; + +const int CSSM_KEYUSE_DERIVE = 256; + +const int CSSM_ALGID_NONE = 0; + +const int CSSM_ALGID_CUSTOM = 1; + +const int CSSM_ALGID_DH = 2; + +const int CSSM_ALGID_PH = 3; + +const int CSSM_ALGID_KEA = 4; + +const int CSSM_ALGID_MD2 = 5; + +const int CSSM_ALGID_MD4 = 6; + +const int CSSM_ALGID_MD5 = 7; + +const int CSSM_ALGID_SHA1 = 8; + +const int CSSM_ALGID_NHASH = 9; + +const int CSSM_ALGID_HAVAL = 10; + +const int CSSM_ALGID_RIPEMD = 11; + +const int CSSM_ALGID_IBCHASH = 12; + +const int CSSM_ALGID_RIPEMAC = 13; + +const int CSSM_ALGID_DES = 14; + +const int CSSM_ALGID_DESX = 15; + +const int CSSM_ALGID_RDES = 16; + +const int CSSM_ALGID_3DES_3KEY_EDE = 17; + +const int CSSM_ALGID_3DES_2KEY_EDE = 18; + +const int CSSM_ALGID_3DES_1KEY_EEE = 19; + +const int CSSM_ALGID_3DES_3KEY = 17; + +const int CSSM_ALGID_3DES_3KEY_EEE = 20; + +const int CSSM_ALGID_3DES_2KEY = 18; + +const int CSSM_ALGID_3DES_2KEY_EEE = 21; + +const int CSSM_ALGID_3DES_1KEY = 20; + +const int CSSM_ALGID_IDEA = 22; + +const int CSSM_ALGID_RC2 = 23; + +const int CSSM_ALGID_RC5 = 24; + +const int CSSM_ALGID_RC4 = 25; + +const int CSSM_ALGID_SEAL = 26; + +const int CSSM_ALGID_CAST = 27; + +const int CSSM_ALGID_BLOWFISH = 28; + +const int CSSM_ALGID_SKIPJACK = 29; + +const int CSSM_ALGID_LUCIFER = 30; + +const int CSSM_ALGID_MADRYGA = 31; + +const int CSSM_ALGID_FEAL = 32; + +const int CSSM_ALGID_REDOC = 33; + +const int CSSM_ALGID_REDOC3 = 34; + +const int CSSM_ALGID_LOKI = 35; + +const int CSSM_ALGID_KHUFU = 36; + +const int CSSM_ALGID_KHAFRE = 37; + +const int CSSM_ALGID_MMB = 38; + +const int CSSM_ALGID_GOST = 39; + +const int CSSM_ALGID_SAFER = 40; + +const int CSSM_ALGID_CRAB = 41; + +const int CSSM_ALGID_RSA = 42; + +const int CSSM_ALGID_DSA = 43; + +const int CSSM_ALGID_MD5WithRSA = 44; + +const int CSSM_ALGID_MD2WithRSA = 45; + +const int CSSM_ALGID_ElGamal = 46; + +const int CSSM_ALGID_MD2Random = 47; + +const int CSSM_ALGID_MD5Random = 48; + +const int CSSM_ALGID_SHARandom = 49; + +const int CSSM_ALGID_DESRandom = 50; + +const int CSSM_ALGID_SHA1WithRSA = 51; + +const int CSSM_ALGID_CDMF = 52; + +const int CSSM_ALGID_CAST3 = 53; + +const int CSSM_ALGID_CAST5 = 54; + +const int CSSM_ALGID_GenericSecret = 55; + +const int CSSM_ALGID_ConcatBaseAndKey = 56; + +const int CSSM_ALGID_ConcatKeyAndBase = 57; + +const int CSSM_ALGID_ConcatBaseAndData = 58; + +const int CSSM_ALGID_ConcatDataAndBase = 59; + +const int CSSM_ALGID_XORBaseAndData = 60; + +const int CSSM_ALGID_ExtractFromKey = 61; + +const int CSSM_ALGID_SSL3PrePrimaryGen = 62; + +const int CSSM_ALGID_SSL3PreMasterGen = 62; + +const int CSSM_ALGID_SSL3PrimaryDerive = 63; + +const int CSSM_ALGID_SSL3MasterDerive = 63; + +const int CSSM_ALGID_SSL3KeyAndMacDerive = 64; + +const int CSSM_ALGID_SSL3MD5_MAC = 65; + +const int CSSM_ALGID_SSL3SHA1_MAC = 66; + +const int CSSM_ALGID_PKCS5_PBKDF1_MD5 = 67; + +const int CSSM_ALGID_PKCS5_PBKDF1_MD2 = 68; + +const int CSSM_ALGID_PKCS5_PBKDF1_SHA1 = 69; + +const int CSSM_ALGID_WrapLynks = 70; + +const int CSSM_ALGID_WrapSET_OAEP = 71; + +const int CSSM_ALGID_BATON = 72; + +const int CSSM_ALGID_ECDSA = 73; + +const int CSSM_ALGID_MAYFLY = 74; + +const int CSSM_ALGID_JUNIPER = 75; + +const int CSSM_ALGID_FASTHASH = 76; + +const int CSSM_ALGID_3DES = 77; + +const int CSSM_ALGID_SSL3MD5 = 78; + +const int CSSM_ALGID_SSL3SHA1 = 79; + +const int CSSM_ALGID_FortezzaTimestamp = 80; + +const int CSSM_ALGID_SHA1WithDSA = 81; + +const int CSSM_ALGID_SHA1WithECDSA = 82; + +const int CSSM_ALGID_DSA_BSAFE = 83; + +const int CSSM_ALGID_ECDH = 84; + +const int CSSM_ALGID_ECMQV = 85; + +const int CSSM_ALGID_PKCS12_SHA1_PBE = 86; + +const int CSSM_ALGID_ECNRA = 87; + +const int CSSM_ALGID_SHA1WithECNRA = 88; + +const int CSSM_ALGID_ECES = 89; + +const int CSSM_ALGID_ECAES = 90; + +const int CSSM_ALGID_SHA1HMAC = 91; + +const int CSSM_ALGID_FIPS186Random = 92; + +const int CSSM_ALGID_ECC = 93; + +const int CSSM_ALGID_MQV = 94; + +const int CSSM_ALGID_NRA = 95; + +const int CSSM_ALGID_IntelPlatformRandom = 96; + +const int CSSM_ALGID_UTC = 97; + +const int CSSM_ALGID_HAVAL3 = 98; + +const int CSSM_ALGID_HAVAL4 = 99; + +const int CSSM_ALGID_HAVAL5 = 100; + +const int CSSM_ALGID_TIGER = 101; + +const int CSSM_ALGID_MD5HMAC = 102; + +const int CSSM_ALGID_PKCS5_PBKDF2 = 103; + +const int CSSM_ALGID_RUNNING_COUNTER = 104; + +const int CSSM_ALGID_LAST = 2147483647; + +const int CSSM_ALGID_VENDOR_DEFINED = -2147483648; + +const int CSSM_ALGMODE_NONE = 0; + +const int CSSM_ALGMODE_CUSTOM = 1; + +const int CSSM_ALGMODE_ECB = 2; + +const int CSSM_ALGMODE_ECBPad = 3; + +const int CSSM_ALGMODE_CBC = 4; + +const int CSSM_ALGMODE_CBC_IV8 = 5; + +const int CSSM_ALGMODE_CBCPadIV8 = 6; + +const int CSSM_ALGMODE_CFB = 7; + +const int CSSM_ALGMODE_CFB_IV8 = 8; + +const int CSSM_ALGMODE_CFBPadIV8 = 9; + +const int CSSM_ALGMODE_OFB = 10; + +const int CSSM_ALGMODE_OFB_IV8 = 11; + +const int CSSM_ALGMODE_OFBPadIV8 = 12; + +const int CSSM_ALGMODE_COUNTER = 13; + +const int CSSM_ALGMODE_BC = 14; + +const int CSSM_ALGMODE_PCBC = 15; + +const int CSSM_ALGMODE_CBCC = 16; + +const int CSSM_ALGMODE_OFBNLF = 17; + +const int CSSM_ALGMODE_PBC = 18; + +const int CSSM_ALGMODE_PFB = 19; + +const int CSSM_ALGMODE_CBCPD = 20; + +const int CSSM_ALGMODE_PUBLIC_KEY = 21; + +const int CSSM_ALGMODE_PRIVATE_KEY = 22; + +const int CSSM_ALGMODE_SHUFFLE = 23; + +const int CSSM_ALGMODE_ECB64 = 24; + +const int CSSM_ALGMODE_CBC64 = 25; + +const int CSSM_ALGMODE_OFB64 = 26; + +const int CSSM_ALGMODE_CFB32 = 28; + +const int CSSM_ALGMODE_CFB16 = 29; + +const int CSSM_ALGMODE_CFB8 = 30; + +const int CSSM_ALGMODE_WRAP = 31; + +const int CSSM_ALGMODE_PRIVATE_WRAP = 32; + +const int CSSM_ALGMODE_RELAYX = 33; + +const int CSSM_ALGMODE_ECB128 = 34; + +const int CSSM_ALGMODE_ECB96 = 35; + +const int CSSM_ALGMODE_CBC128 = 36; + +const int CSSM_ALGMODE_OAEP_HASH = 37; + +const int CSSM_ALGMODE_PKCS1_EME_V15 = 38; + +const int CSSM_ALGMODE_PKCS1_EME_OAEP = 39; + +const int CSSM_ALGMODE_PKCS1_EMSA_V15 = 40; + +const int CSSM_ALGMODE_ISO_9796 = 41; + +const int CSSM_ALGMODE_X9_31 = 42; + +const int CSSM_ALGMODE_LAST = 2147483647; + +const int CSSM_ALGMODE_VENDOR_DEFINED = -2147483648; + +const int CSSM_CSP_SOFTWARE = 1; + +const int CSSM_CSP_HARDWARE = 2; + +const int CSSM_CSP_HYBRID = 3; + +const int CSSM_ALGCLASS_NONE = 0; + +const int CSSM_ALGCLASS_CUSTOM = 1; + +const int CSSM_ALGCLASS_SIGNATURE = 2; + +const int CSSM_ALGCLASS_SYMMETRIC = 3; + +const int CSSM_ALGCLASS_DIGEST = 4; + +const int CSSM_ALGCLASS_RANDOMGEN = 5; + +const int CSSM_ALGCLASS_UNIQUEGEN = 6; + +const int CSSM_ALGCLASS_MAC = 7; + +const int CSSM_ALGCLASS_ASYMMETRIC = 8; + +const int CSSM_ALGCLASS_KEYGEN = 9; + +const int CSSM_ALGCLASS_DERIVEKEY = 10; + +const int CSSM_ATTRIBUTE_DATA_NONE = 0; + +const int CSSM_ATTRIBUTE_DATA_UINT32 = 268435456; + +const int CSSM_ATTRIBUTE_DATA_CSSM_DATA = 536870912; + +const int CSSM_ATTRIBUTE_DATA_CRYPTO_DATA = 805306368; + +const int CSSM_ATTRIBUTE_DATA_KEY = 1073741824; + +const int CSSM_ATTRIBUTE_DATA_STRING = 1342177280; + +const int CSSM_ATTRIBUTE_DATA_DATE = 1610612736; + +const int CSSM_ATTRIBUTE_DATA_RANGE = 1879048192; + +const int CSSM_ATTRIBUTE_DATA_ACCESS_CREDENTIALS = -2147483648; + +const int CSSM_ATTRIBUTE_DATA_VERSION = 16777216; + +const int CSSM_ATTRIBUTE_DATA_DL_DB_HANDLE = 33554432; + +const int CSSM_ATTRIBUTE_DATA_KR_PROFILE = 50331648; + +const int CSSM_ATTRIBUTE_TYPE_MASK = -16777216; + +const int CSSM_ATTRIBUTE_NONE = 0; + +const int CSSM_ATTRIBUTE_CUSTOM = 536870913; + +const int CSSM_ATTRIBUTE_DESCRIPTION = 1342177282; + +const int CSSM_ATTRIBUTE_KEY = 1073741827; + +const int CSSM_ATTRIBUTE_INIT_VECTOR = 536870916; + +const int CSSM_ATTRIBUTE_SALT = 536870917; + +const int CSSM_ATTRIBUTE_PADDING = 268435462; + +const int CSSM_ATTRIBUTE_RANDOM = 536870919; + +const int CSSM_ATTRIBUTE_SEED = 805306376; + +const int CSSM_ATTRIBUTE_PASSPHRASE = 805306377; + +const int CSSM_ATTRIBUTE_KEY_LENGTH = 268435466; + +const int CSSM_ATTRIBUTE_KEY_LENGTH_RANGE = 1879048203; + +const int CSSM_ATTRIBUTE_BLOCK_SIZE = 268435468; + +const int CSSM_ATTRIBUTE_OUTPUT_SIZE = 268435469; + +const int CSSM_ATTRIBUTE_ROUNDS = 268435470; + +const int CSSM_ATTRIBUTE_IV_SIZE = 268435471; + +const int CSSM_ATTRIBUTE_ALG_PARAMS = 536870928; + +const int CSSM_ATTRIBUTE_LABEL = 536870929; + +const int CSSM_ATTRIBUTE_KEY_TYPE = 268435474; + +const int CSSM_ATTRIBUTE_MODE = 268435475; + +const int CSSM_ATTRIBUTE_EFFECTIVE_BITS = 268435476; + +const int CSSM_ATTRIBUTE_START_DATE = 1610612757; + +const int CSSM_ATTRIBUTE_END_DATE = 1610612758; + +const int CSSM_ATTRIBUTE_KEYUSAGE = 268435479; + +const int CSSM_ATTRIBUTE_KEYATTR = 268435480; + +const int CSSM_ATTRIBUTE_VERSION = 16777241; + +const int CSSM_ATTRIBUTE_PRIME = 536870938; + +const int CSSM_ATTRIBUTE_BASE = 536870939; + +const int CSSM_ATTRIBUTE_SUBPRIME = 536870940; + +const int CSSM_ATTRIBUTE_ALG_ID = 268435485; + +const int CSSM_ATTRIBUTE_ITERATION_COUNT = 268435486; + +const int CSSM_ATTRIBUTE_ROUNDS_RANGE = 1879048223; + +const int CSSM_ATTRIBUTE_KRPROFILE_LOCAL = 50331680; + +const int CSSM_ATTRIBUTE_KRPROFILE_REMOTE = 50331681; + +const int CSSM_ATTRIBUTE_CSP_HANDLE = 268435490; + +const int CSSM_ATTRIBUTE_DL_DB_HANDLE = 33554467; + +const int CSSM_ATTRIBUTE_ACCESS_CREDENTIALS = -2147483612; + +const int CSSM_ATTRIBUTE_PUBLIC_KEY_FORMAT = 268435493; + +const int CSSM_ATTRIBUTE_PRIVATE_KEY_FORMAT = 268435494; + +const int CSSM_ATTRIBUTE_SYMMETRIC_KEY_FORMAT = 268435495; + +const int CSSM_ATTRIBUTE_WRAPPED_KEY_FORMAT = 268435496; + +const int CSSM_PADDING_NONE = 0; + +const int CSSM_PADDING_CUSTOM = 1; + +const int CSSM_PADDING_ZERO = 2; + +const int CSSM_PADDING_ONE = 3; + +const int CSSM_PADDING_ALTERNATE = 4; + +const int CSSM_PADDING_FF = 5; + +const int CSSM_PADDING_PKCS5 = 6; + +const int CSSM_PADDING_PKCS7 = 7; + +const int CSSM_PADDING_CIPHERSTEALING = 8; + +const int CSSM_PADDING_RANDOM = 9; + +const int CSSM_PADDING_PKCS1 = 10; + +const int CSSM_PADDING_SIGRAW = 11; + +const int CSSM_PADDING_VENDOR_DEFINED = -2147483648; + +const int CSSM_CSP_TOK_RNG = 1; + +const int CSSM_CSP_TOK_CLOCK_EXISTS = 64; + +const int CSSM_CSP_RDR_TOKENPRESENT = 1; + +const int CSSM_CSP_RDR_EXISTS = 2; + +const int CSSM_CSP_RDR_HW = 4; + +const int CSSM_CSP_TOK_WRITE_PROTECTED = 2; + +const int CSSM_CSP_TOK_LOGIN_REQUIRED = 4; + +const int CSSM_CSP_TOK_USER_PIN_INITIALIZED = 8; + +const int CSSM_CSP_TOK_PROT_AUTHENTICATION = 256; + +const int CSSM_CSP_TOK_USER_PIN_EXPIRED = 1048576; + +const int CSSM_CSP_TOK_SESSION_KEY_PASSWORD = 2097152; + +const int CSSM_CSP_TOK_PRIVATE_KEY_PASSWORD = 4194304; + +const int CSSM_CSP_STORES_PRIVATE_KEYS = 16777216; + +const int CSSM_CSP_STORES_PUBLIC_KEYS = 33554432; + +const int CSSM_CSP_STORES_SESSION_KEYS = 67108864; + +const int CSSM_CSP_STORES_CERTIFICATES = 134217728; + +const int CSSM_CSP_STORES_GENERIC = 268435456; + +const int CSSM_PKCS_OAEP_MGF_NONE = 0; + +const int CSSM_PKCS_OAEP_MGF1_SHA1 = 1; + +const int CSSM_PKCS_OAEP_MGF1_MD5 = 2; + +const int CSSM_PKCS_OAEP_PSOURCE_NONE = 0; + +const int CSSM_PKCS_OAEP_PSOURCE_Pspecified = 1; + +const int CSSM_VALUE_NOT_AVAILABLE = -1; + +const int CSSM_PKCS5_PBKDF2_PRF_HMAC_SHA1 = 0; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTISSUE = 1; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTREVOKE = 2; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTSUSPEND = 3; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTRESUME = 4; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTVERIFY = 5; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTNOTARIZE = 6; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTUSERECOVER = 7; + +const int CSSM_TP_AUTHORITY_REQUEST_CRLISSUE = 256; + +const int CSSM_TP_KEY_ARCHIVE = 1; + +const int CSSM_TP_CERT_PUBLISH = 2; + +const int CSSM_TP_CERT_NOTIFY_RENEW = 4; + +const int CSSM_TP_CERT_DIR_UPDATE = 8; + +const int CSSM_TP_CRL_DISTRIBUTE = 16; + +const int CSSM_TP_ACTION_DEFAULT = 0; + +const int CSSM_TP_STOP_ON_POLICY = 0; + +const int CSSM_TP_STOP_ON_NONE = 1; + +const int CSSM_TP_STOP_ON_FIRST_PASS = 2; + +const int CSSM_TP_STOP_ON_FIRST_FAIL = 3; + +const int CSSM_CRL_PARSE_FORMAT_NONE = 0; + +const int CSSM_CRL_PARSE_FORMAT_CUSTOM = 1; + +const int CSSM_CRL_PARSE_FORMAT_SEXPR = 2; + +const int CSSM_CRL_PARSE_FORMAT_COMPLEX = 3; + +const int CSSM_CRL_PARSE_FORMAT_OID_NAMED = 4; + +const int CSSM_CRL_PARSE_FORMAT_TUPLE = 5; + +const int CSSM_CRL_PARSE_FORMAT_MULTIPLE = 32766; + +const int CSSM_CRL_PARSE_FORMAT_LAST = 32767; + +const int CSSM_CL_CUSTOM_CRL_PARSE_FORMAT = 32768; + +const int CSSM_CRL_TYPE_UNKNOWN = 0; + +const int CSSM_CRL_TYPE_X_509v1 = 1; + +const int CSSM_CRL_TYPE_X_509v2 = 2; + +const int CSSM_CRL_TYPE_SPKI = 3; + +const int CSSM_CRL_TYPE_MULTIPLE = 32766; + +const int CSSM_CRL_ENCODING_UNKNOWN = 0; + +const int CSSM_CRL_ENCODING_CUSTOM = 1; + +const int CSSM_CRL_ENCODING_BER = 2; + +const int CSSM_CRL_ENCODING_DER = 3; + +const int CSSM_CRL_ENCODING_BLOOM = 4; + +const int CSSM_CRL_ENCODING_SEXPR = 5; + +const int CSSM_CRL_ENCODING_MULTIPLE = 32766; + +const int CSSM_CRLGROUP_DATA = 0; + +const int CSSM_CRLGROUP_ENCODED_CRL = 1; + +const int CSSM_CRLGROUP_PARSED_CRL = 2; + +const int CSSM_CRLGROUP_CRL_PAIR = 3; + +const int CSSM_EVIDENCE_FORM_UNSPECIFIC = 0; + +const int CSSM_EVIDENCE_FORM_CERT = 1; + +const int CSSM_EVIDENCE_FORM_CRL = 2; + +const int CSSM_EVIDENCE_FORM_CERT_ID = 3; + +const int CSSM_EVIDENCE_FORM_CRL_ID = 4; + +const int CSSM_EVIDENCE_FORM_VERIFIER_TIME = 5; + +const int CSSM_EVIDENCE_FORM_CRL_THISTIME = 6; + +const int CSSM_EVIDENCE_FORM_CRL_NEXTTIME = 7; + +const int CSSM_EVIDENCE_FORM_POLICYINFO = 8; + +const int CSSM_EVIDENCE_FORM_TUPLEGROUP = 9; + +const int CSSM_TP_CONFIRM_STATUS_UNKNOWN = 0; + +const int CSSM_TP_CONFIRM_ACCEPT = 1; + +const int CSSM_TP_CONFIRM_REJECT = 2; + +const int CSSM_ESTIMATED_TIME_UNKNOWN = -1; + +const int CSSM_ELAPSED_TIME_UNKNOWN = -1; + +const int CSSM_ELAPSED_TIME_COMPLETE = -2; + +const int CSSM_TP_CERTISSUE_STATUS_UNKNOWN = 0; + +const int CSSM_TP_CERTISSUE_OK = 1; + +const int CSSM_TP_CERTISSUE_OKWITHCERTMODS = 2; + +const int CSSM_TP_CERTISSUE_OKWITHSERVICEMODS = 3; + +const int CSSM_TP_CERTISSUE_REJECTED = 4; + +const int CSSM_TP_CERTISSUE_NOT_AUTHORIZED = 5; + +const int CSSM_TP_CERTISSUE_WILL_BE_REVOKED = 6; + +const int CSSM_TP_CERTCHANGE_NONE = 0; + +const int CSSM_TP_CERTCHANGE_REVOKE = 1; + +const int CSSM_TP_CERTCHANGE_HOLD = 2; + +const int CSSM_TP_CERTCHANGE_RELEASE = 3; + +const int CSSM_TP_CERTCHANGE_REASON_UNKNOWN = 0; + +const int CSSM_TP_CERTCHANGE_REASON_KEYCOMPROMISE = 1; + +const int CSSM_TP_CERTCHANGE_REASON_CACOMPROMISE = 2; + +const int CSSM_TP_CERTCHANGE_REASON_CEASEOPERATION = 3; + +const int CSSM_TP_CERTCHANGE_REASON_AFFILIATIONCHANGE = 4; + +const int CSSM_TP_CERTCHANGE_REASON_SUPERCEDED = 5; + +const int CSSM_TP_CERTCHANGE_REASON_SUSPECTEDCOMPROMISE = 6; + +const int CSSM_TP_CERTCHANGE_REASON_HOLDRELEASE = 7; + +const int CSSM_TP_CERTCHANGE_STATUS_UNKNOWN = 0; + +const int CSSM_TP_CERTCHANGE_OK = 1; + +const int CSSM_TP_CERTCHANGE_OKWITHNEWTIME = 2; + +const int CSSM_TP_CERTCHANGE_WRONGCA = 3; + +const int CSSM_TP_CERTCHANGE_REJECTED = 4; + +const int CSSM_TP_CERTCHANGE_NOT_AUTHORIZED = 5; + +const int CSSM_TP_CERTVERIFY_UNKNOWN = 0; + +const int CSSM_TP_CERTVERIFY_VALID = 1; + +const int CSSM_TP_CERTVERIFY_INVALID = 2; + +const int CSSM_TP_CERTVERIFY_REVOKED = 3; + +const int CSSM_TP_CERTVERIFY_SUSPENDED = 4; + +const int CSSM_TP_CERTVERIFY_EXPIRED = 5; + +const int CSSM_TP_CERTVERIFY_NOT_VALID_YET = 6; + +const int CSSM_TP_CERTVERIFY_INVALID_AUTHORITY = 7; + +const int CSSM_TP_CERTVERIFY_INVALID_SIGNATURE = 8; + +const int CSSM_TP_CERTVERIFY_INVALID_CERT_VALUE = 9; + +const int CSSM_TP_CERTVERIFY_INVALID_CERTGROUP = 10; + +const int CSSM_TP_CERTVERIFY_INVALID_POLICY = 11; + +const int CSSM_TP_CERTVERIFY_INVALID_POLICY_IDS = 12; + +const int CSSM_TP_CERTVERIFY_INVALID_BASIC_CONSTRAINTS = 13; + +const int CSSM_TP_CERTVERIFY_INVALID_CRL_DIST_PT = 14; + +const int CSSM_TP_CERTVERIFY_INVALID_NAME_TREE = 15; + +const int CSSM_TP_CERTVERIFY_UNKNOWN_CRITICAL_EXT = 16; + +const int CSSM_TP_CERTNOTARIZE_STATUS_UNKNOWN = 0; + +const int CSSM_TP_CERTNOTARIZE_OK = 1; + +const int CSSM_TP_CERTNOTARIZE_OKWITHOUTFIELDS = 2; + +const int CSSM_TP_CERTNOTARIZE_OKWITHSERVICEMODS = 3; + +const int CSSM_TP_CERTNOTARIZE_REJECTED = 4; + +const int CSSM_TP_CERTNOTARIZE_NOT_AUTHORIZED = 5; + +const int CSSM_TP_CERTRECLAIM_STATUS_UNKNOWN = 0; + +const int CSSM_TP_CERTRECLAIM_OK = 1; + +const int CSSM_TP_CERTRECLAIM_NOMATCH = 2; + +const int CSSM_TP_CERTRECLAIM_REJECTED = 3; + +const int CSSM_TP_CERTRECLAIM_NOT_AUTHORIZED = 4; + +const int CSSM_TP_CRLISSUE_STATUS_UNKNOWN = 0; + +const int CSSM_TP_CRLISSUE_OK = 1; + +const int CSSM_TP_CRLISSUE_NOT_CURRENT = 2; + +const int CSSM_TP_CRLISSUE_INVALID_DOMAIN = 3; + +const int CSSM_TP_CRLISSUE_UNKNOWN_IDENTIFIER = 4; + +const int CSSM_TP_CRLISSUE_REJECTED = 5; + +const int CSSM_TP_CRLISSUE_NOT_AUTHORIZED = 6; + +const int CSSM_TP_FORM_TYPE_GENERIC = 0; + +const int CSSM_TP_FORM_TYPE_REGISTRATION = 1; + +const int CSSM_CL_TEMPLATE_INTERMEDIATE_CERT = 1; + +const int CSSM_CL_TEMPLATE_PKIX_CERTTEMPLATE = 2; + +const int CSSM_CERT_BUNDLE_UNKNOWN = 0; + +const int CSSM_CERT_BUNDLE_CUSTOM = 1; + +const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_DATA = 2; + +const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_ENVELOPED_DATA = 3; + +const int CSSM_CERT_BUNDLE_PKCS12 = 4; + +const int CSSM_CERT_BUNDLE_PFX = 5; + +const int CSSM_CERT_BUNDLE_SPKI_SEQUENCE = 6; + +const int CSSM_CERT_BUNDLE_PGP_KEYRING = 7; + +const int CSSM_CERT_BUNDLE_LAST = 32767; + +const int CSSM_CL_CUSTOM_CERT_BUNDLE_TYPE = 32768; + +const int CSSM_CERT_BUNDLE_ENCODING_UNKNOWN = 0; + +const int CSSM_CERT_BUNDLE_ENCODING_CUSTOM = 1; + +const int CSSM_CERT_BUNDLE_ENCODING_BER = 2; + +const int CSSM_CERT_BUNDLE_ENCODING_DER = 3; + +const int CSSM_CERT_BUNDLE_ENCODING_SEXPR = 4; + +const int CSSM_CERT_BUNDLE_ENCODING_PGP = 5; + +const int CSSM_FIELDVALUE_COMPLEX_DATA_TYPE = -1; + +const int CSSM_DB_ATTRIBUTE_NAME_AS_STRING = 0; + +const int CSSM_DB_ATTRIBUTE_NAME_AS_OID = 1; + +const int CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER = 2; + +const int CSSM_DB_ATTRIBUTE_FORMAT_STRING = 0; + +const int CSSM_DB_ATTRIBUTE_FORMAT_SINT32 = 1; + +const int CSSM_DB_ATTRIBUTE_FORMAT_UINT32 = 2; + +const int CSSM_DB_ATTRIBUTE_FORMAT_BIG_NUM = 3; + +const int CSSM_DB_ATTRIBUTE_FORMAT_REAL = 4; + +const int CSSM_DB_ATTRIBUTE_FORMAT_TIME_DATE = 5; + +const int CSSM_DB_ATTRIBUTE_FORMAT_BLOB = 6; + +const int CSSM_DB_ATTRIBUTE_FORMAT_MULTI_UINT32 = 7; + +const int CSSM_DB_ATTRIBUTE_FORMAT_COMPLEX = 8; + +const int CSSM_DB_RECORDTYPE_SCHEMA_START = 0; + +const int CSSM_DB_RECORDTYPE_SCHEMA_END = 4; + +const int CSSM_DB_RECORDTYPE_OPEN_GROUP_START = 10; + +const int CSSM_DB_RECORDTYPE_OPEN_GROUP_END = 18; + +const int CSSM_DB_RECORDTYPE_APP_DEFINED_START = -2147483648; + +const int CSSM_DB_RECORDTYPE_APP_DEFINED_END = -1; + +const int CSSM_DL_DB_SCHEMA_INFO = 0; + +const int CSSM_DL_DB_SCHEMA_INDEXES = 1; + +const int CSSM_DL_DB_SCHEMA_ATTRIBUTES = 2; + +const int CSSM_DL_DB_SCHEMA_PARSING_MODULE = 3; + +const int CSSM_DL_DB_RECORD_ANY = 10; + +const int CSSM_DL_DB_RECORD_CERT = 11; + +const int CSSM_DL_DB_RECORD_CRL = 12; + +const int CSSM_DL_DB_RECORD_POLICY = 13; + +const int CSSM_DL_DB_RECORD_GENERIC = 14; + +const int CSSM_DL_DB_RECORD_PUBLIC_KEY = 15; + +const int CSSM_DL_DB_RECORD_PRIVATE_KEY = 16; + +const int CSSM_DL_DB_RECORD_SYMMETRIC_KEY = 17; + +const int CSSM_DL_DB_RECORD_ALL_KEYS = 18; + +const int CSSM_DB_CERT_USE_TRUSTED = 1; + +const int CSSM_DB_CERT_USE_SYSTEM = 2; + +const int CSSM_DB_CERT_USE_OWNER = 4; + +const int CSSM_DB_CERT_USE_REVOKED = 8; + +const int CSSM_DB_CERT_USE_SIGNING = 16; + +const int CSSM_DB_CERT_USE_PRIVACY = 32; + +const int CSSM_DB_INDEX_UNIQUE = 0; + +const int CSSM_DB_INDEX_NONUNIQUE = 1; + +const int CSSM_DB_INDEX_ON_UNKNOWN = 0; + +const int CSSM_DB_INDEX_ON_ATTRIBUTE = 1; + +const int CSSM_DB_INDEX_ON_RECORD = 2; + +const int CSSM_DB_ACCESS_READ = 1; + +const int CSSM_DB_ACCESS_WRITE = 2; + +const int CSSM_DB_ACCESS_PRIVILEGED = 4; + +const int CSSM_DB_MODIFY_ATTRIBUTE_NONE = 0; + +const int CSSM_DB_MODIFY_ATTRIBUTE_ADD = 1; + +const int CSSM_DB_MODIFY_ATTRIBUTE_DELETE = 2; + +const int CSSM_DB_MODIFY_ATTRIBUTE_REPLACE = 3; + +const int CSSM_DB_EQUAL = 0; + +const int CSSM_DB_NOT_EQUAL = 1; + +const int CSSM_DB_LESS_THAN = 2; + +const int CSSM_DB_GREATER_THAN = 3; + +const int CSSM_DB_CONTAINS = 4; + +const int CSSM_DB_CONTAINS_INITIAL_SUBSTRING = 5; + +const int CSSM_DB_CONTAINS_FINAL_SUBSTRING = 6; + +const int CSSM_DB_NONE = 0; + +const int CSSM_DB_AND = 1; + +const int CSSM_DB_OR = 2; + +const int CSSM_QUERY_TIMELIMIT_NONE = 0; + +const int CSSM_QUERY_SIZELIMIT_NONE = 0; + +const int CSSM_QUERY_RETURN_DATA = 1; + +const int CSSM_DL_UNKNOWN = 0; + +const int CSSM_DL_CUSTOM = 1; + +const int CSSM_DL_LDAP = 2; + +const int CSSM_DL_ODBC = 3; + +const int CSSM_DL_PKCS11 = 4; + +const int CSSM_DL_FFS = 5; + +const int CSSM_DL_MEMORY = 6; + +const int CSSM_DL_REMOTEDIR = 7; + +const int CSSM_DB_DATASTORES_UNKNOWN = -1; + +const int CSSM_DB_TRANSACTIONAL_MODE = 0; + +const int CSSM_DB_FILESYSTEMSCAN_MODE = 1; + +const int CSSM_BASE_ERROR = -2147418112; + +const int CSSM_ERRORCODE_MODULE_EXTENT = 2048; + +const int CSSM_ERRORCODE_CUSTOM_OFFSET = 1024; + +const int CSSM_ERRORCODE_COMMON_EXTENT = 256; + +const int CSSM_CSSM_BASE_ERROR = -2147418112; + +const int CSSM_CSSM_PRIVATE_ERROR = -2147417088; + +const int CSSM_CSP_BASE_ERROR = -2147416064; + +const int CSSM_CSP_PRIVATE_ERROR = -2147415040; + +const int CSSM_DL_BASE_ERROR = -2147414016; + +const int CSSM_DL_PRIVATE_ERROR = -2147412992; + +const int CSSM_CL_BASE_ERROR = -2147411968; + +const int CSSM_CL_PRIVATE_ERROR = -2147410944; + +const int CSSM_TP_BASE_ERROR = -2147409920; + +const int CSSM_TP_PRIVATE_ERROR = -2147408896; + +const int CSSM_KR_BASE_ERROR = -2147407872; + +const int CSSM_KR_PRIVATE_ERROR = -2147406848; + +const int CSSM_AC_BASE_ERROR = -2147405824; + +const int CSSM_AC_PRIVATE_ERROR = -2147404800; + +const int CSSM_MDS_BASE_ERROR = -2147414016; + +const int CSSM_MDS_PRIVATE_ERROR = -2147412992; + +const int CSSMERR_CSSM_INVALID_ADDIN_HANDLE = -2147417855; + +const int CSSMERR_CSSM_NOT_INITIALIZED = -2147417854; + +const int CSSMERR_CSSM_INVALID_HANDLE_USAGE = -2147417853; + +const int CSSMERR_CSSM_PVC_REFERENT_NOT_FOUND = -2147417852; + +const int CSSMERR_CSSM_FUNCTION_INTEGRITY_FAIL = -2147417851; + +const int CSSM_ERRCODE_INTERNAL_ERROR = 1; + +const int CSSM_ERRCODE_MEMORY_ERROR = 2; + +const int CSSM_ERRCODE_MDS_ERROR = 3; + +const int CSSM_ERRCODE_INVALID_POINTER = 4; + +const int CSSM_ERRCODE_INVALID_INPUT_POINTER = 5; + +const int CSSM_ERRCODE_INVALID_OUTPUT_POINTER = 6; + +const int CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED = 7; + +const int CSSM_ERRCODE_SELF_CHECK_FAILED = 8; + +const int CSSM_ERRCODE_OS_ACCESS_DENIED = 9; + +const int CSSM_ERRCODE_FUNCTION_FAILED = 10; + +const int CSSM_ERRCODE_MODULE_MANIFEST_VERIFY_FAILED = 11; + +const int CSSM_ERRCODE_INVALID_GUID = 12; + +const int CSSM_ERRCODE_OPERATION_AUTH_DENIED = 32; + +const int CSSM_ERRCODE_OBJECT_USE_AUTH_DENIED = 33; + +const int CSSM_ERRCODE_OBJECT_MANIP_AUTH_DENIED = 34; + +const int CSSM_ERRCODE_OBJECT_ACL_NOT_SUPPORTED = 35; + +const int CSSM_ERRCODE_OBJECT_ACL_REQUIRED = 36; + +const int CSSM_ERRCODE_INVALID_ACCESS_CREDENTIALS = 37; + +const int CSSM_ERRCODE_INVALID_ACL_BASE_CERTS = 38; + +const int CSSM_ERRCODE_ACL_BASE_CERTS_NOT_SUPPORTED = 39; + +const int CSSM_ERRCODE_INVALID_SAMPLE_VALUE = 40; + +const int CSSM_ERRCODE_SAMPLE_VALUE_NOT_SUPPORTED = 41; + +const int CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE = 42; + +const int CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED = 43; + +const int CSSM_ERRCODE_INVALID_ACL_CHALLENGE_CALLBACK = 44; + +const int CSSM_ERRCODE_ACL_CHALLENGE_CALLBACK_FAILED = 45; + +const int CSSM_ERRCODE_INVALID_ACL_ENTRY_TAG = 46; + +const int CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND = 47; + +const int CSSM_ERRCODE_INVALID_ACL_EDIT_MODE = 48; + +const int CSSM_ERRCODE_ACL_CHANGE_FAILED = 49; + +const int CSSM_ERRCODE_INVALID_NEW_ACL_ENTRY = 50; + +const int CSSM_ERRCODE_INVALID_NEW_ACL_OWNER = 51; + +const int CSSM_ERRCODE_ACL_DELETE_FAILED = 52; + +const int CSSM_ERRCODE_ACL_REPLACE_FAILED = 53; + +const int CSSM_ERRCODE_ACL_ADD_FAILED = 54; + +const int CSSM_ERRCODE_INVALID_CONTEXT_HANDLE = 64; + +const int CSSM_ERRCODE_INCOMPATIBLE_VERSION = 65; + +const int CSSM_ERRCODE_INVALID_CERTGROUP_POINTER = 66; + +const int CSSM_ERRCODE_INVALID_CERT_POINTER = 67; + +const int CSSM_ERRCODE_INVALID_CRL_POINTER = 68; + +const int CSSM_ERRCODE_INVALID_FIELD_POINTER = 69; + +const int CSSM_ERRCODE_INVALID_DATA = 70; + +const int CSSM_ERRCODE_CRL_ALREADY_SIGNED = 71; + +const int CSSM_ERRCODE_INVALID_NUMBER_OF_FIELDS = 72; + +const int CSSM_ERRCODE_VERIFICATION_FAILURE = 73; + +const int CSSM_ERRCODE_INVALID_DB_HANDLE = 74; + +const int CSSM_ERRCODE_PRIVILEGE_NOT_GRANTED = 75; + +const int CSSM_ERRCODE_INVALID_DB_LIST = 76; + +const int CSSM_ERRCODE_INVALID_DB_LIST_POINTER = 77; + +const int CSSM_ERRCODE_UNKNOWN_FORMAT = 78; + +const int CSSM_ERRCODE_UNKNOWN_TAG = 79; + +const int CSSM_ERRCODE_INVALID_CSP_HANDLE = 80; + +const int CSSM_ERRCODE_INVALID_DL_HANDLE = 81; + +const int CSSM_ERRCODE_INVALID_CL_HANDLE = 82; + +const int CSSM_ERRCODE_INVALID_TP_HANDLE = 83; + +const int CSSM_ERRCODE_INVALID_KR_HANDLE = 84; + +const int CSSM_ERRCODE_INVALID_AC_HANDLE = 85; + +const int CSSM_ERRCODE_INVALID_PASSTHROUGH_ID = 86; + +const int CSSM_ERRCODE_INVALID_NETWORK_ADDR = 87; + +const int CSSM_ERRCODE_INVALID_CRYPTO_DATA = 88; + +const int CSSMERR_CSSM_INTERNAL_ERROR = -2147418111; + +const int CSSMERR_CSSM_MEMORY_ERROR = -2147418110; + +const int CSSMERR_CSSM_MDS_ERROR = -2147418109; + +const int CSSMERR_CSSM_INVALID_POINTER = -2147418108; + +const int CSSMERR_CSSM_INVALID_INPUT_POINTER = -2147418107; + +const int CSSMERR_CSSM_INVALID_OUTPUT_POINTER = -2147418106; + +const int CSSMERR_CSSM_FUNCTION_NOT_IMPLEMENTED = -2147418105; + +const int CSSMERR_CSSM_SELF_CHECK_FAILED = -2147418104; + +const int CSSMERR_CSSM_OS_ACCESS_DENIED = -2147418103; + +const int CSSMERR_CSSM_FUNCTION_FAILED = -2147418102; + +const int CSSMERR_CSSM_MODULE_MANIFEST_VERIFY_FAILED = -2147418101; + +const int CSSMERR_CSSM_INVALID_GUID = -2147418100; + +const int CSSMERR_CSSM_INVALID_CONTEXT_HANDLE = -2147418048; + +const int CSSMERR_CSSM_INCOMPATIBLE_VERSION = -2147418047; + +const int CSSMERR_CSSM_PRIVILEGE_NOT_GRANTED = -2147418037; + +const int CSSM_CSSM_BASE_CSSM_ERROR = -2147417840; + +const int CSSMERR_CSSM_SCOPE_NOT_SUPPORTED = -2147417839; + +const int CSSMERR_CSSM_PVC_ALREADY_CONFIGURED = -2147417838; + +const int CSSMERR_CSSM_INVALID_PVC = -2147417837; + +const int CSSMERR_CSSM_EMM_LOAD_FAILED = -2147417836; + +const int CSSMERR_CSSM_EMM_UNLOAD_FAILED = -2147417835; + +const int CSSMERR_CSSM_ADDIN_LOAD_FAILED = -2147417834; + +const int CSSMERR_CSSM_INVALID_KEY_HIERARCHY = -2147417833; + +const int CSSMERR_CSSM_ADDIN_UNLOAD_FAILED = -2147417832; + +const int CSSMERR_CSSM_LIB_REF_NOT_FOUND = -2147417831; + +const int CSSMERR_CSSM_INVALID_ADDIN_FUNCTION_TABLE = -2147417830; + +const int CSSMERR_CSSM_EMM_AUTHENTICATE_FAILED = -2147417829; + +const int CSSMERR_CSSM_ADDIN_AUTHENTICATE_FAILED = -2147417828; + +const int CSSMERR_CSSM_INVALID_SERVICE_MASK = -2147417827; + +const int CSSMERR_CSSM_MODULE_NOT_LOADED = -2147417826; + +const int CSSMERR_CSSM_INVALID_SUBSERVICEID = -2147417825; + +const int CSSMERR_CSSM_BUFFER_TOO_SMALL = -2147417824; + +const int CSSMERR_CSSM_INVALID_ATTRIBUTE = -2147417823; + +const int CSSMERR_CSSM_ATTRIBUTE_NOT_IN_CONTEXT = -2147417822; + +const int CSSMERR_CSSM_MODULE_MANAGER_INITIALIZE_FAIL = -2147417821; + +const int CSSMERR_CSSM_MODULE_MANAGER_NOT_FOUND = -2147417820; + +const int CSSMERR_CSSM_EVENT_NOTIFICATION_CALLBACK_NOT_FOUND = -2147417819; + +const int CSSMERR_CSP_INTERNAL_ERROR = -2147416063; + +const int CSSMERR_CSP_MEMORY_ERROR = -2147416062; + +const int CSSMERR_CSP_MDS_ERROR = -2147416061; + +const int CSSMERR_CSP_INVALID_POINTER = -2147416060; + +const int CSSMERR_CSP_INVALID_INPUT_POINTER = -2147416059; + +const int CSSMERR_CSP_INVALID_OUTPUT_POINTER = -2147416058; + +const int CSSMERR_CSP_FUNCTION_NOT_IMPLEMENTED = -2147416057; + +const int CSSMERR_CSP_SELF_CHECK_FAILED = -2147416056; + +const int CSSMERR_CSP_OS_ACCESS_DENIED = -2147416055; + +const int CSSMERR_CSP_FUNCTION_FAILED = -2147416054; + +const int CSSMERR_CSP_OPERATION_AUTH_DENIED = -2147416032; + +const int CSSMERR_CSP_OBJECT_USE_AUTH_DENIED = -2147416031; + +const int CSSMERR_CSP_OBJECT_MANIP_AUTH_DENIED = -2147416030; + +const int CSSMERR_CSP_OBJECT_ACL_NOT_SUPPORTED = -2147416029; + +const int CSSMERR_CSP_OBJECT_ACL_REQUIRED = -2147416028; + +const int CSSMERR_CSP_INVALID_ACCESS_CREDENTIALS = -2147416027; + +const int CSSMERR_CSP_INVALID_ACL_BASE_CERTS = -2147416026; + +const int CSSMERR_CSP_ACL_BASE_CERTS_NOT_SUPPORTED = -2147416025; + +const int CSSMERR_CSP_INVALID_SAMPLE_VALUE = -2147416024; + +const int CSSMERR_CSP_SAMPLE_VALUE_NOT_SUPPORTED = -2147416023; + +const int CSSMERR_CSP_INVALID_ACL_SUBJECT_VALUE = -2147416022; + +const int CSSMERR_CSP_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147416021; + +const int CSSMERR_CSP_INVALID_ACL_CHALLENGE_CALLBACK = -2147416020; + +const int CSSMERR_CSP_ACL_CHALLENGE_CALLBACK_FAILED = -2147416019; + +const int CSSMERR_CSP_INVALID_ACL_ENTRY_TAG = -2147416018; + +const int CSSMERR_CSP_ACL_ENTRY_TAG_NOT_FOUND = -2147416017; + +const int CSSMERR_CSP_INVALID_ACL_EDIT_MODE = -2147416016; + +const int CSSMERR_CSP_ACL_CHANGE_FAILED = -2147416015; + +const int CSSMERR_CSP_INVALID_NEW_ACL_ENTRY = -2147416014; + +const int CSSMERR_CSP_INVALID_NEW_ACL_OWNER = -2147416013; + +const int CSSMERR_CSP_ACL_DELETE_FAILED = -2147416012; + +const int CSSMERR_CSP_ACL_REPLACE_FAILED = -2147416011; + +const int CSSMERR_CSP_ACL_ADD_FAILED = -2147416010; + +const int CSSMERR_CSP_INVALID_CONTEXT_HANDLE = -2147416000; + +const int CSSMERR_CSP_PRIVILEGE_NOT_GRANTED = -2147415989; + +const int CSSMERR_CSP_INVALID_DATA = -2147415994; + +const int CSSMERR_CSP_INVALID_PASSTHROUGH_ID = -2147415978; + +const int CSSMERR_CSP_INVALID_CRYPTO_DATA = -2147415976; + +const int CSSM_CSP_BASE_CSP_ERROR = -2147415808; + +const int CSSMERR_CSP_INPUT_LENGTH_ERROR = -2147415807; + +const int CSSMERR_CSP_OUTPUT_LENGTH_ERROR = -2147415806; + +const int CSSMERR_CSP_PRIVILEGE_NOT_SUPPORTED = -2147415805; + +const int CSSMERR_CSP_DEVICE_ERROR = -2147415804; + +const int CSSMERR_CSP_DEVICE_MEMORY_ERROR = -2147415803; + +const int CSSMERR_CSP_ATTACH_HANDLE_BUSY = -2147415802; + +const int CSSMERR_CSP_NOT_LOGGED_IN = -2147415801; + +const int CSSMERR_CSP_INVALID_KEY = -2147415792; + +const int CSSMERR_CSP_INVALID_KEY_REFERENCE = -2147415791; + +const int CSSMERR_CSP_INVALID_KEY_CLASS = -2147415790; + +const int CSSMERR_CSP_ALGID_MISMATCH = -2147415789; + +const int CSSMERR_CSP_KEY_USAGE_INCORRECT = -2147415788; + +const int CSSMERR_CSP_KEY_BLOB_TYPE_INCORRECT = -2147415787; + +const int CSSMERR_CSP_KEY_HEADER_INCONSISTENT = -2147415786; + +const int CSSMERR_CSP_UNSUPPORTED_KEY_FORMAT = -2147415785; + +const int CSSMERR_CSP_UNSUPPORTED_KEY_SIZE = -2147415784; + +const int CSSMERR_CSP_INVALID_KEY_POINTER = -2147415783; + +const int CSSMERR_CSP_INVALID_KEYUSAGE_MASK = -2147415782; + +const int CSSMERR_CSP_UNSUPPORTED_KEYUSAGE_MASK = -2147415781; + +const int CSSMERR_CSP_INVALID_KEYATTR_MASK = -2147415780; + +const int CSSMERR_CSP_UNSUPPORTED_KEYATTR_MASK = -2147415779; + +const int CSSMERR_CSP_INVALID_KEY_LABEL = -2147415778; + +const int CSSMERR_CSP_UNSUPPORTED_KEY_LABEL = -2147415777; + +const int CSSMERR_CSP_INVALID_KEY_FORMAT = -2147415776; + +const int CSSMERR_CSP_INVALID_DATA_COUNT = -2147415768; + +const int CSSMERR_CSP_VECTOR_OF_BUFS_UNSUPPORTED = -2147415767; + +const int CSSMERR_CSP_INVALID_INPUT_VECTOR = -2147415766; + +const int CSSMERR_CSP_INVALID_OUTPUT_VECTOR = -2147415765; + +const int CSSMERR_CSP_INVALID_CONTEXT = -2147415760; + +const int CSSMERR_CSP_INVALID_ALGORITHM = -2147415759; + +const int CSSMERR_CSP_INVALID_ATTR_KEY = -2147415754; + +const int CSSMERR_CSP_MISSING_ATTR_KEY = -2147415753; + +const int CSSMERR_CSP_INVALID_ATTR_INIT_VECTOR = -2147415752; + +const int CSSMERR_CSP_MISSING_ATTR_INIT_VECTOR = -2147415751; + +const int CSSMERR_CSP_INVALID_ATTR_SALT = -2147415750; + +const int CSSMERR_CSP_MISSING_ATTR_SALT = -2147415749; + +const int CSSMERR_CSP_INVALID_ATTR_PADDING = -2147415748; + +const int CSSMERR_CSP_MISSING_ATTR_PADDING = -2147415747; + +const int CSSMERR_CSP_INVALID_ATTR_RANDOM = -2147415746; + +const int CSSMERR_CSP_MISSING_ATTR_RANDOM = -2147415745; + +const int CSSMERR_CSP_INVALID_ATTR_SEED = -2147415744; + +const int CSSMERR_CSP_MISSING_ATTR_SEED = -2147415743; + +const int CSSMERR_CSP_INVALID_ATTR_PASSPHRASE = -2147415742; + +const int CSSMERR_CSP_MISSING_ATTR_PASSPHRASE = -2147415741; + +const int CSSMERR_CSP_INVALID_ATTR_KEY_LENGTH = -2147415740; + +const int CSSMERR_CSP_MISSING_ATTR_KEY_LENGTH = -2147415739; + +const int CSSMERR_CSP_INVALID_ATTR_BLOCK_SIZE = -2147415738; + +const int CSSMERR_CSP_MISSING_ATTR_BLOCK_SIZE = -2147415737; + +const int CSSMERR_CSP_INVALID_ATTR_OUTPUT_SIZE = -2147415708; + +const int CSSMERR_CSP_MISSING_ATTR_OUTPUT_SIZE = -2147415707; + +const int CSSMERR_CSP_INVALID_ATTR_ROUNDS = -2147415706; + +const int CSSMERR_CSP_MISSING_ATTR_ROUNDS = -2147415705; + +const int CSSMERR_CSP_INVALID_ATTR_ALG_PARAMS = -2147415704; + +const int CSSMERR_CSP_MISSING_ATTR_ALG_PARAMS = -2147415703; + +const int CSSMERR_CSP_INVALID_ATTR_LABEL = -2147415702; + +const int CSSMERR_CSP_MISSING_ATTR_LABEL = -2147415701; + +const int CSSMERR_CSP_INVALID_ATTR_KEY_TYPE = -2147415700; + +const int CSSMERR_CSP_MISSING_ATTR_KEY_TYPE = -2147415699; + +const int CSSMERR_CSP_INVALID_ATTR_MODE = -2147415698; + +const int CSSMERR_CSP_MISSING_ATTR_MODE = -2147415697; + +const int CSSMERR_CSP_INVALID_ATTR_EFFECTIVE_BITS = -2147415696; + +const int CSSMERR_CSP_MISSING_ATTR_EFFECTIVE_BITS = -2147415695; + +const int CSSMERR_CSP_INVALID_ATTR_START_DATE = -2147415694; + +const int CSSMERR_CSP_MISSING_ATTR_START_DATE = -2147415693; + +const int CSSMERR_CSP_INVALID_ATTR_END_DATE = -2147415692; + +const int CSSMERR_CSP_MISSING_ATTR_END_DATE = -2147415691; + +const int CSSMERR_CSP_INVALID_ATTR_VERSION = -2147415690; + +const int CSSMERR_CSP_MISSING_ATTR_VERSION = -2147415689; + +const int CSSMERR_CSP_INVALID_ATTR_PRIME = -2147415688; + +const int CSSMERR_CSP_MISSING_ATTR_PRIME = -2147415687; + +const int CSSMERR_CSP_INVALID_ATTR_BASE = -2147415686; + +const int CSSMERR_CSP_MISSING_ATTR_BASE = -2147415685; + +const int CSSMERR_CSP_INVALID_ATTR_SUBPRIME = -2147415684; + +const int CSSMERR_CSP_MISSING_ATTR_SUBPRIME = -2147415683; + +const int CSSMERR_CSP_INVALID_ATTR_ITERATION_COUNT = -2147415682; + +const int CSSMERR_CSP_MISSING_ATTR_ITERATION_COUNT = -2147415681; + +const int CSSMERR_CSP_INVALID_ATTR_DL_DB_HANDLE = -2147415680; + +const int CSSMERR_CSP_MISSING_ATTR_DL_DB_HANDLE = -2147415679; + +const int CSSMERR_CSP_INVALID_ATTR_ACCESS_CREDENTIALS = -2147415678; + +const int CSSMERR_CSP_MISSING_ATTR_ACCESS_CREDENTIALS = -2147415677; + +const int CSSMERR_CSP_INVALID_ATTR_PUBLIC_KEY_FORMAT = -2147415676; + +const int CSSMERR_CSP_MISSING_ATTR_PUBLIC_KEY_FORMAT = -2147415675; + +const int CSSMERR_CSP_INVALID_ATTR_PRIVATE_KEY_FORMAT = -2147415674; + +const int CSSMERR_CSP_MISSING_ATTR_PRIVATE_KEY_FORMAT = -2147415673; + +const int CSSMERR_CSP_INVALID_ATTR_SYMMETRIC_KEY_FORMAT = -2147415672; + +const int CSSMERR_CSP_MISSING_ATTR_SYMMETRIC_KEY_FORMAT = -2147415671; + +const int CSSMERR_CSP_INVALID_ATTR_WRAPPED_KEY_FORMAT = -2147415670; + +const int CSSMERR_CSP_MISSING_ATTR_WRAPPED_KEY_FORMAT = -2147415669; + +const int CSSMERR_CSP_STAGED_OPERATION_IN_PROGRESS = -2147415736; + +const int CSSMERR_CSP_STAGED_OPERATION_NOT_STARTED = -2147415735; + +const int CSSMERR_CSP_VERIFY_FAILED = -2147415734; + +const int CSSMERR_CSP_INVALID_SIGNATURE = -2147415733; + +const int CSSMERR_CSP_QUERY_SIZE_UNKNOWN = -2147415732; + +const int CSSMERR_CSP_BLOCK_SIZE_MISMATCH = -2147415731; + +const int CSSMERR_CSP_PRIVATE_KEY_NOT_FOUND = -2147415730; + +const int CSSMERR_CSP_PUBLIC_KEY_INCONSISTENT = -2147415729; + +const int CSSMERR_CSP_DEVICE_VERIFY_FAILED = -2147415728; + +const int CSSMERR_CSP_INVALID_LOGIN_NAME = -2147415727; + +const int CSSMERR_CSP_ALREADY_LOGGED_IN = -2147415726; + +const int CSSMERR_CSP_PRIVATE_KEY_ALREADY_EXISTS = -2147415725; + +const int CSSMERR_CSP_KEY_LABEL_ALREADY_EXISTS = -2147415724; + +const int CSSMERR_CSP_INVALID_DIGEST_ALGORITHM = -2147415723; + +const int CSSMERR_CSP_CRYPTO_DATA_CALLBACK_FAILED = -2147415722; + +const int CSSMERR_TP_INTERNAL_ERROR = -2147409919; + +const int CSSMERR_TP_MEMORY_ERROR = -2147409918; + +const int CSSMERR_TP_MDS_ERROR = -2147409917; + +const int CSSMERR_TP_INVALID_POINTER = -2147409916; + +const int CSSMERR_TP_INVALID_INPUT_POINTER = -2147409915; + +const int CSSMERR_TP_INVALID_OUTPUT_POINTER = -2147409914; + +const int CSSMERR_TP_FUNCTION_NOT_IMPLEMENTED = -2147409913; + +const int CSSMERR_TP_SELF_CHECK_FAILED = -2147409912; + +const int CSSMERR_TP_OS_ACCESS_DENIED = -2147409911; + +const int CSSMERR_TP_FUNCTION_FAILED = -2147409910; + +const int CSSMERR_TP_INVALID_CONTEXT_HANDLE = -2147409856; + +const int CSSMERR_TP_INVALID_DATA = -2147409850; + +const int CSSMERR_TP_INVALID_DB_LIST = -2147409844; + +const int CSSMERR_TP_INVALID_CERTGROUP_POINTER = -2147409854; + +const int CSSMERR_TP_INVALID_CERT_POINTER = -2147409853; + +const int CSSMERR_TP_INVALID_CRL_POINTER = -2147409852; + +const int CSSMERR_TP_INVALID_FIELD_POINTER = -2147409851; + +const int CSSMERR_TP_INVALID_NETWORK_ADDR = -2147409833; + +const int CSSMERR_TP_CRL_ALREADY_SIGNED = -2147409849; + +const int CSSMERR_TP_INVALID_NUMBER_OF_FIELDS = -2147409848; + +const int CSSMERR_TP_VERIFICATION_FAILURE = -2147409847; + +const int CSSMERR_TP_INVALID_DB_HANDLE = -2147409846; + +const int CSSMERR_TP_UNKNOWN_FORMAT = -2147409842; + +const int CSSMERR_TP_UNKNOWN_TAG = -2147409841; + +const int CSSMERR_TP_INVALID_PASSTHROUGH_ID = -2147409834; + +const int CSSMERR_TP_INVALID_CSP_HANDLE = -2147409840; + +const int CSSMERR_TP_INVALID_DL_HANDLE = -2147409839; + +const int CSSMERR_TP_INVALID_CL_HANDLE = -2147409838; + +const int CSSMERR_TP_INVALID_DB_LIST_POINTER = -2147409843; + +const int CSSM_TP_BASE_TP_ERROR = -2147409664; + +const int CSSMERR_TP_INVALID_CALLERAUTH_CONTEXT_POINTER = -2147409663; + +const int CSSMERR_TP_INVALID_IDENTIFIER_POINTER = -2147409662; + +const int CSSMERR_TP_INVALID_KEYCACHE_HANDLE = -2147409661; + +const int CSSMERR_TP_INVALID_CERTGROUP = -2147409660; + +const int CSSMERR_TP_INVALID_CRLGROUP = -2147409659; + +const int CSSMERR_TP_INVALID_CRLGROUP_POINTER = -2147409658; + +const int CSSMERR_TP_AUTHENTICATION_FAILED = -2147409657; + +const int CSSMERR_TP_CERTGROUP_INCOMPLETE = -2147409656; + +const int CSSMERR_TP_CERTIFICATE_CANT_OPERATE = -2147409655; + +const int CSSMERR_TP_CERT_EXPIRED = -2147409654; + +const int CSSMERR_TP_CERT_NOT_VALID_YET = -2147409653; + +const int CSSMERR_TP_CERT_REVOKED = -2147409652; + +const int CSSMERR_TP_CERT_SUSPENDED = -2147409651; + +const int CSSMERR_TP_INSUFFICIENT_CREDENTIALS = -2147409650; + +const int CSSMERR_TP_INVALID_ACTION = -2147409649; + +const int CSSMERR_TP_INVALID_ACTION_DATA = -2147409648; + +const int CSSMERR_TP_INVALID_ANCHOR_CERT = -2147409646; + +const int CSSMERR_TP_INVALID_AUTHORITY = -2147409645; + +const int CSSMERR_TP_VERIFY_ACTION_FAILED = -2147409644; + +const int CSSMERR_TP_INVALID_CERTIFICATE = -2147409643; + +const int CSSMERR_TP_INVALID_CERT_AUTHORITY = -2147409642; + +const int CSSMERR_TP_INVALID_CRL_AUTHORITY = -2147409641; + +const int CSSMERR_TP_INVALID_CRL_ENCODING = -2147409640; + +const int CSSMERR_TP_INVALID_CRL_TYPE = -2147409639; + +const int CSSMERR_TP_INVALID_CRL = -2147409638; + +const int CSSMERR_TP_INVALID_FORM_TYPE = -2147409637; + +const int CSSMERR_TP_INVALID_ID = -2147409636; + +const int CSSMERR_TP_INVALID_IDENTIFIER = -2147409635; + +const int CSSMERR_TP_INVALID_INDEX = -2147409634; + +const int CSSMERR_TP_INVALID_NAME = -2147409633; + +const int CSSMERR_TP_INVALID_POLICY_IDENTIFIERS = -2147409632; + +const int CSSMERR_TP_INVALID_TIMESTRING = -2147409631; + +const int CSSMERR_TP_INVALID_REASON = -2147409630; + +const int CSSMERR_TP_INVALID_REQUEST_INPUTS = -2147409629; + +const int CSSMERR_TP_INVALID_RESPONSE_VECTOR = -2147409628; + +const int CSSMERR_TP_INVALID_SIGNATURE = -2147409627; + +const int CSSMERR_TP_INVALID_STOP_ON_POLICY = -2147409626; + +const int CSSMERR_TP_INVALID_CALLBACK = -2147409625; + +const int CSSMERR_TP_INVALID_TUPLE = -2147409624; + +const int CSSMERR_TP_NOT_SIGNER = -2147409623; + +const int CSSMERR_TP_NOT_TRUSTED = -2147409622; + +const int CSSMERR_TP_NO_DEFAULT_AUTHORITY = -2147409621; + +const int CSSMERR_TP_REJECTED_FORM = -2147409620; + +const int CSSMERR_TP_REQUEST_LOST = -2147409619; + +const int CSSMERR_TP_REQUEST_REJECTED = -2147409618; + +const int CSSMERR_TP_UNSUPPORTED_ADDR_TYPE = -2147409617; + +const int CSSMERR_TP_UNSUPPORTED_SERVICE = -2147409616; + +const int CSSMERR_TP_INVALID_TUPLEGROUP_POINTER = -2147409615; + +const int CSSMERR_TP_INVALID_TUPLEGROUP = -2147409614; + +const int CSSMERR_AC_INTERNAL_ERROR = -2147405823; - set NSURLLocalizedNameKey(NSURLResourceKey value) => - _NSURLLocalizedNameKey.value = value; +const int CSSMERR_AC_MEMORY_ERROR = -2147405822; - /// True for regular files (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsRegularFileKey = - _lookup('NSURLIsRegularFileKey'); +const int CSSMERR_AC_MDS_ERROR = -2147405821; - NSURLResourceKey get NSURLIsRegularFileKey => _NSURLIsRegularFileKey.value; +const int CSSMERR_AC_INVALID_POINTER = -2147405820; - set NSURLIsRegularFileKey(NSURLResourceKey value) => - _NSURLIsRegularFileKey.value = value; +const int CSSMERR_AC_INVALID_INPUT_POINTER = -2147405819; - /// True for directories (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsDirectoryKey = - _lookup('NSURLIsDirectoryKey'); +const int CSSMERR_AC_INVALID_OUTPUT_POINTER = -2147405818; - NSURLResourceKey get NSURLIsDirectoryKey => _NSURLIsDirectoryKey.value; +const int CSSMERR_AC_FUNCTION_NOT_IMPLEMENTED = -2147405817; - set NSURLIsDirectoryKey(NSURLResourceKey value) => - _NSURLIsDirectoryKey.value = value; +const int CSSMERR_AC_SELF_CHECK_FAILED = -2147405816; - /// True for symlinks (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsSymbolicLinkKey = - _lookup('NSURLIsSymbolicLinkKey'); +const int CSSMERR_AC_OS_ACCESS_DENIED = -2147405815; - NSURLResourceKey get NSURLIsSymbolicLinkKey => _NSURLIsSymbolicLinkKey.value; +const int CSSMERR_AC_FUNCTION_FAILED = -2147405814; - set NSURLIsSymbolicLinkKey(NSURLResourceKey value) => - _NSURLIsSymbolicLinkKey.value = value; +const int CSSMERR_AC_INVALID_CONTEXT_HANDLE = -2147405760; - /// True for the root directory of a volume (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsVolumeKey = - _lookup('NSURLIsVolumeKey'); +const int CSSMERR_AC_INVALID_DATA = -2147405754; - NSURLResourceKey get NSURLIsVolumeKey => _NSURLIsVolumeKey.value; +const int CSSMERR_AC_INVALID_DB_LIST = -2147405748; - set NSURLIsVolumeKey(NSURLResourceKey value) => - _NSURLIsVolumeKey.value = value; +const int CSSMERR_AC_INVALID_PASSTHROUGH_ID = -2147405738; - /// True for packaged directories (Read-only 10_6 and 10_7, read-write 10_8, value type boolean NSNumber). Note: You can only set or clear this property on directories; if you try to set this property on non-directory objects, the property is ignored. If the directory is a package for some other reason (extension type, etc), setting this property to false will have no effect. - late final ffi.Pointer _NSURLIsPackageKey = - _lookup('NSURLIsPackageKey'); +const int CSSMERR_AC_INVALID_DL_HANDLE = -2147405743; - NSURLResourceKey get NSURLIsPackageKey => _NSURLIsPackageKey.value; +const int CSSMERR_AC_INVALID_CL_HANDLE = -2147405742; - set NSURLIsPackageKey(NSURLResourceKey value) => - _NSURLIsPackageKey.value = value; +const int CSSMERR_AC_INVALID_TP_HANDLE = -2147405741; - /// True if resource is an application (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsApplicationKey = - _lookup('NSURLIsApplicationKey'); +const int CSSMERR_AC_INVALID_DB_HANDLE = -2147405750; - NSURLResourceKey get NSURLIsApplicationKey => _NSURLIsApplicationKey.value; +const int CSSMERR_AC_INVALID_DB_LIST_POINTER = -2147405747; - set NSURLIsApplicationKey(NSURLResourceKey value) => - _NSURLIsApplicationKey.value = value; +const int CSSM_AC_BASE_AC_ERROR = -2147405568; - /// True if the resource is scriptable. Only applies to applications (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLApplicationIsScriptableKey = - _lookup('NSURLApplicationIsScriptableKey'); +const int CSSMERR_AC_INVALID_BASE_ACLS = -2147405567; - NSURLResourceKey get NSURLApplicationIsScriptableKey => - _NSURLApplicationIsScriptableKey.value; +const int CSSMERR_AC_INVALID_TUPLE_CREDENTIALS = -2147405566; - set NSURLApplicationIsScriptableKey(NSURLResourceKey value) => - _NSURLApplicationIsScriptableKey.value = value; +const int CSSMERR_AC_INVALID_ENCODING = -2147405565; - /// True for system-immutable resources (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsSystemImmutableKey = - _lookup('NSURLIsSystemImmutableKey'); +const int CSSMERR_AC_INVALID_VALIDITY_PERIOD = -2147405564; - NSURLResourceKey get NSURLIsSystemImmutableKey => - _NSURLIsSystemImmutableKey.value; +const int CSSMERR_AC_INVALID_REQUESTOR = -2147405563; - set NSURLIsSystemImmutableKey(NSURLResourceKey value) => - _NSURLIsSystemImmutableKey.value = value; +const int CSSMERR_AC_INVALID_REQUEST_DESCRIPTOR = -2147405562; - /// True for user-immutable resources (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsUserImmutableKey = - _lookup('NSURLIsUserImmutableKey'); +const int CSSMERR_CL_INTERNAL_ERROR = -2147411967; - NSURLResourceKey get NSURLIsUserImmutableKey => - _NSURLIsUserImmutableKey.value; +const int CSSMERR_CL_MEMORY_ERROR = -2147411966; - set NSURLIsUserImmutableKey(NSURLResourceKey value) => - _NSURLIsUserImmutableKey.value = value; +const int CSSMERR_CL_MDS_ERROR = -2147411965; - /// True for resources normally not displayed to users (Read-write, value type boolean NSNumber). Note: If the resource is a hidden because its name starts with a period, setting this property to false will not change the property. - late final ffi.Pointer _NSURLIsHiddenKey = - _lookup('NSURLIsHiddenKey'); +const int CSSMERR_CL_INVALID_POINTER = -2147411964; - NSURLResourceKey get NSURLIsHiddenKey => _NSURLIsHiddenKey.value; +const int CSSMERR_CL_INVALID_INPUT_POINTER = -2147411963; - set NSURLIsHiddenKey(NSURLResourceKey value) => - _NSURLIsHiddenKey.value = value; +const int CSSMERR_CL_INVALID_OUTPUT_POINTER = -2147411962; - /// True for resources whose filename extension is removed from the localized name property (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLHasHiddenExtensionKey = - _lookup('NSURLHasHiddenExtensionKey'); +const int CSSMERR_CL_FUNCTION_NOT_IMPLEMENTED = -2147411961; - NSURLResourceKey get NSURLHasHiddenExtensionKey => - _NSURLHasHiddenExtensionKey.value; +const int CSSMERR_CL_SELF_CHECK_FAILED = -2147411960; - set NSURLHasHiddenExtensionKey(NSURLResourceKey value) => - _NSURLHasHiddenExtensionKey.value = value; +const int CSSMERR_CL_OS_ACCESS_DENIED = -2147411959; - /// The date the resource was created (Read-write, value type NSDate) - late final ffi.Pointer _NSURLCreationDateKey = - _lookup('NSURLCreationDateKey'); +const int CSSMERR_CL_FUNCTION_FAILED = -2147411958; - NSURLResourceKey get NSURLCreationDateKey => _NSURLCreationDateKey.value; +const int CSSMERR_CL_INVALID_CONTEXT_HANDLE = -2147411904; - set NSURLCreationDateKey(NSURLResourceKey value) => - _NSURLCreationDateKey.value = value; +const int CSSMERR_CL_INVALID_CERTGROUP_POINTER = -2147411902; - /// The date the resource was last accessed (Read-write, value type NSDate) - late final ffi.Pointer _NSURLContentAccessDateKey = - _lookup('NSURLContentAccessDateKey'); +const int CSSMERR_CL_INVALID_CERT_POINTER = -2147411901; - NSURLResourceKey get NSURLContentAccessDateKey => - _NSURLContentAccessDateKey.value; +const int CSSMERR_CL_INVALID_CRL_POINTER = -2147411900; - set NSURLContentAccessDateKey(NSURLResourceKey value) => - _NSURLContentAccessDateKey.value = value; +const int CSSMERR_CL_INVALID_FIELD_POINTER = -2147411899; - /// The time the resource content was last modified (Read-write, value type NSDate) - late final ffi.Pointer _NSURLContentModificationDateKey = - _lookup('NSURLContentModificationDateKey'); +const int CSSMERR_CL_INVALID_DATA = -2147411898; - NSURLResourceKey get NSURLContentModificationDateKey => - _NSURLContentModificationDateKey.value; +const int CSSMERR_CL_CRL_ALREADY_SIGNED = -2147411897; - set NSURLContentModificationDateKey(NSURLResourceKey value) => - _NSURLContentModificationDateKey.value = value; +const int CSSMERR_CL_INVALID_NUMBER_OF_FIELDS = -2147411896; - /// The time the resource's attributes were last modified (Read-only, value type NSDate) - late final ffi.Pointer _NSURLAttributeModificationDateKey = - _lookup('NSURLAttributeModificationDateKey'); +const int CSSMERR_CL_VERIFICATION_FAILURE = -2147411895; - NSURLResourceKey get NSURLAttributeModificationDateKey => - _NSURLAttributeModificationDateKey.value; +const int CSSMERR_CL_UNKNOWN_FORMAT = -2147411890; - set NSURLAttributeModificationDateKey(NSURLResourceKey value) => - _NSURLAttributeModificationDateKey.value = value; +const int CSSMERR_CL_UNKNOWN_TAG = -2147411889; - /// Number of hard links to the resource (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLLinkCountKey = - _lookup('NSURLLinkCountKey'); +const int CSSMERR_CL_INVALID_PASSTHROUGH_ID = -2147411882; - NSURLResourceKey get NSURLLinkCountKey => _NSURLLinkCountKey.value; +const int CSSM_CL_BASE_CL_ERROR = -2147411712; - set NSURLLinkCountKey(NSURLResourceKey value) => - _NSURLLinkCountKey.value = value; +const int CSSMERR_CL_INVALID_BUNDLE_POINTER = -2147411711; - /// The resource's parent directory, if any (Read-only, value type NSURL) - late final ffi.Pointer _NSURLParentDirectoryURLKey = - _lookup('NSURLParentDirectoryURLKey'); +const int CSSMERR_CL_INVALID_CACHE_HANDLE = -2147411710; - NSURLResourceKey get NSURLParentDirectoryURLKey => - _NSURLParentDirectoryURLKey.value; +const int CSSMERR_CL_INVALID_RESULTS_HANDLE = -2147411709; - set NSURLParentDirectoryURLKey(NSURLResourceKey value) => - _NSURLParentDirectoryURLKey.value = value; +const int CSSMERR_CL_INVALID_BUNDLE_INFO = -2147411708; - /// URL of the volume on which the resource is stored (Read-only, value type NSURL) - late final ffi.Pointer _NSURLVolumeURLKey = - _lookup('NSURLVolumeURLKey'); +const int CSSMERR_CL_INVALID_CRL_INDEX = -2147411707; - NSURLResourceKey get NSURLVolumeURLKey => _NSURLVolumeURLKey.value; +const int CSSMERR_CL_INVALID_SCOPE = -2147411706; - set NSURLVolumeURLKey(NSURLResourceKey value) => - _NSURLVolumeURLKey.value = value; +const int CSSMERR_CL_NO_FIELD_VALUES = -2147411705; - /// Uniform type identifier (UTI) for the resource (Read-only, value type NSString) - late final ffi.Pointer _NSURLTypeIdentifierKey = - _lookup('NSURLTypeIdentifierKey'); +const int CSSMERR_CL_SCOPE_NOT_SUPPORTED = -2147411704; - NSURLResourceKey get NSURLTypeIdentifierKey => _NSURLTypeIdentifierKey.value; +const int CSSMERR_DL_INTERNAL_ERROR = -2147414015; - set NSURLTypeIdentifierKey(NSURLResourceKey value) => - _NSURLTypeIdentifierKey.value = value; +const int CSSMERR_DL_MEMORY_ERROR = -2147414014; - /// File type (UTType) for the resource (Read-only, value type UTType) - late final ffi.Pointer _NSURLContentTypeKey = - _lookup('NSURLContentTypeKey'); +const int CSSMERR_DL_MDS_ERROR = -2147414013; - NSURLResourceKey get NSURLContentTypeKey => _NSURLContentTypeKey.value; +const int CSSMERR_DL_INVALID_POINTER = -2147414012; - set NSURLContentTypeKey(NSURLResourceKey value) => - _NSURLContentTypeKey.value = value; +const int CSSMERR_DL_INVALID_INPUT_POINTER = -2147414011; - /// User-visible type or "kind" description (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedTypeDescriptionKey = - _lookup('NSURLLocalizedTypeDescriptionKey'); +const int CSSMERR_DL_INVALID_OUTPUT_POINTER = -2147414010; - NSURLResourceKey get NSURLLocalizedTypeDescriptionKey => - _NSURLLocalizedTypeDescriptionKey.value; +const int CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED = -2147414009; - set NSURLLocalizedTypeDescriptionKey(NSURLResourceKey value) => - _NSURLLocalizedTypeDescriptionKey.value = value; +const int CSSMERR_DL_SELF_CHECK_FAILED = -2147414008; - /// The label number assigned to the resource (Read-write, value type NSNumber) - late final ffi.Pointer _NSURLLabelNumberKey = - _lookup('NSURLLabelNumberKey'); +const int CSSMERR_DL_OS_ACCESS_DENIED = -2147414007; - NSURLResourceKey get NSURLLabelNumberKey => _NSURLLabelNumberKey.value; +const int CSSMERR_DL_FUNCTION_FAILED = -2147414006; - set NSURLLabelNumberKey(NSURLResourceKey value) => - _NSURLLabelNumberKey.value = value; +const int CSSMERR_DL_INVALID_CSP_HANDLE = -2147413936; - /// The color of the assigned label (Read-only, value type NSColor) - late final ffi.Pointer _NSURLLabelColorKey = - _lookup('NSURLLabelColorKey'); +const int CSSMERR_DL_INVALID_DL_HANDLE = -2147413935; - NSURLResourceKey get NSURLLabelColorKey => _NSURLLabelColorKey.value; +const int CSSMERR_DL_INVALID_CL_HANDLE = -2147413934; - set NSURLLabelColorKey(NSURLResourceKey value) => - _NSURLLabelColorKey.value = value; +const int CSSMERR_DL_INVALID_DB_LIST_POINTER = -2147413939; - /// The user-visible label text (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedLabelKey = - _lookup('NSURLLocalizedLabelKey'); +const int CSSMERR_DL_OPERATION_AUTH_DENIED = -2147413984; - NSURLResourceKey get NSURLLocalizedLabelKey => _NSURLLocalizedLabelKey.value; +const int CSSMERR_DL_OBJECT_USE_AUTH_DENIED = -2147413983; - set NSURLLocalizedLabelKey(NSURLResourceKey value) => - _NSURLLocalizedLabelKey.value = value; +const int CSSMERR_DL_OBJECT_MANIP_AUTH_DENIED = -2147413982; - /// The icon normally displayed for the resource (Read-only, value type NSImage) - late final ffi.Pointer _NSURLEffectiveIconKey = - _lookup('NSURLEffectiveIconKey'); +const int CSSMERR_DL_OBJECT_ACL_NOT_SUPPORTED = -2147413981; - NSURLResourceKey get NSURLEffectiveIconKey => _NSURLEffectiveIconKey.value; +const int CSSMERR_DL_OBJECT_ACL_REQUIRED = -2147413980; - set NSURLEffectiveIconKey(NSURLResourceKey value) => - _NSURLEffectiveIconKey.value = value; +const int CSSMERR_DL_INVALID_ACCESS_CREDENTIALS = -2147413979; - /// The custom icon assigned to the resource, if any (Currently not implemented, value type NSImage) - late final ffi.Pointer _NSURLCustomIconKey = - _lookup('NSURLCustomIconKey'); +const int CSSMERR_DL_INVALID_ACL_BASE_CERTS = -2147413978; - NSURLResourceKey get NSURLCustomIconKey => _NSURLCustomIconKey.value; +const int CSSMERR_DL_ACL_BASE_CERTS_NOT_SUPPORTED = -2147413977; - set NSURLCustomIconKey(NSURLResourceKey value) => - _NSURLCustomIconKey.value = value; +const int CSSMERR_DL_INVALID_SAMPLE_VALUE = -2147413976; - /// An identifier which can be used to compare two file system objects for equality using -isEqual (i.e, two object identifiers are equal if they have the same file system path or if the paths are linked to same inode on the same file system). This identifier is not persistent across system restarts. (Read-only, value type id ) - late final ffi.Pointer _NSURLFileResourceIdentifierKey = - _lookup('NSURLFileResourceIdentifierKey'); +const int CSSMERR_DL_SAMPLE_VALUE_NOT_SUPPORTED = -2147413975; - NSURLResourceKey get NSURLFileResourceIdentifierKey => - _NSURLFileResourceIdentifierKey.value; +const int CSSMERR_DL_INVALID_ACL_SUBJECT_VALUE = -2147413974; - set NSURLFileResourceIdentifierKey(NSURLResourceKey value) => - _NSURLFileResourceIdentifierKey.value = value; +const int CSSMERR_DL_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147413973; - /// An identifier that can be used to identify the volume the file system object is on. Other objects on the same volume will have the same volume identifier and can be compared using for equality using -isEqual. This identifier is not persistent across system restarts. (Read-only, value type id ) - late final ffi.Pointer _NSURLVolumeIdentifierKey = - _lookup('NSURLVolumeIdentifierKey'); +const int CSSMERR_DL_INVALID_ACL_CHALLENGE_CALLBACK = -2147413972; - NSURLResourceKey get NSURLVolumeIdentifierKey => - _NSURLVolumeIdentifierKey.value; +const int CSSMERR_DL_ACL_CHALLENGE_CALLBACK_FAILED = -2147413971; - set NSURLVolumeIdentifierKey(NSURLResourceKey value) => - _NSURLVolumeIdentifierKey.value = value; +const int CSSMERR_DL_INVALID_ACL_ENTRY_TAG = -2147413970; - /// The optimal block size when reading or writing this file's data, or nil if not available. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLPreferredIOBlockSizeKey = - _lookup('NSURLPreferredIOBlockSizeKey'); +const int CSSMERR_DL_ACL_ENTRY_TAG_NOT_FOUND = -2147413969; - NSURLResourceKey get NSURLPreferredIOBlockSizeKey => - _NSURLPreferredIOBlockSizeKey.value; +const int CSSMERR_DL_INVALID_ACL_EDIT_MODE = -2147413968; - set NSURLPreferredIOBlockSizeKey(NSURLResourceKey value) => - _NSURLPreferredIOBlockSizeKey.value = value; +const int CSSMERR_DL_ACL_CHANGE_FAILED = -2147413967; - /// true if this process (as determined by EUID) can read the resource. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsReadableKey = - _lookup('NSURLIsReadableKey'); +const int CSSMERR_DL_INVALID_NEW_ACL_ENTRY = -2147413966; - NSURLResourceKey get NSURLIsReadableKey => _NSURLIsReadableKey.value; +const int CSSMERR_DL_INVALID_NEW_ACL_OWNER = -2147413965; - set NSURLIsReadableKey(NSURLResourceKey value) => - _NSURLIsReadableKey.value = value; +const int CSSMERR_DL_ACL_DELETE_FAILED = -2147413964; - /// true if this process (as determined by EUID) can write to the resource. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsWritableKey = - _lookup('NSURLIsWritableKey'); +const int CSSMERR_DL_ACL_REPLACE_FAILED = -2147413963; - NSURLResourceKey get NSURLIsWritableKey => _NSURLIsWritableKey.value; +const int CSSMERR_DL_ACL_ADD_FAILED = -2147413962; - set NSURLIsWritableKey(NSURLResourceKey value) => - _NSURLIsWritableKey.value = value; +const int CSSMERR_DL_INVALID_DB_HANDLE = -2147413942; - /// true if this process (as determined by EUID) can execute a file resource or search a directory resource. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsExecutableKey = - _lookup('NSURLIsExecutableKey'); +const int CSSMERR_DL_INVALID_PASSTHROUGH_ID = -2147413930; - NSURLResourceKey get NSURLIsExecutableKey => _NSURLIsExecutableKey.value; +const int CSSMERR_DL_INVALID_NETWORK_ADDR = -2147413929; - set NSURLIsExecutableKey(NSURLResourceKey value) => - _NSURLIsExecutableKey.value = value; +const int CSSM_DL_BASE_DL_ERROR = -2147413760; - /// The file system object's security information encapsulated in a NSFileSecurity object. (Read-write, Value type NSFileSecurity) - late final ffi.Pointer _NSURLFileSecurityKey = - _lookup('NSURLFileSecurityKey'); +const int CSSMERR_DL_DATABASE_CORRUPT = -2147413759; - NSURLResourceKey get NSURLFileSecurityKey => _NSURLFileSecurityKey.value; +const int CSSMERR_DL_INVALID_RECORD_INDEX = -2147413752; - set NSURLFileSecurityKey(NSURLResourceKey value) => - _NSURLFileSecurityKey.value = value; +const int CSSMERR_DL_INVALID_RECORDTYPE = -2147413751; - /// true if resource should be excluded from backups, false otherwise (Read-write, value type boolean NSNumber). This property is only useful for excluding cache and other application support files which are not needed in a backup. Some operations commonly made to user documents will cause this property to be reset to false and so this property should not be used on user documents. - late final ffi.Pointer _NSURLIsExcludedFromBackupKey = - _lookup('NSURLIsExcludedFromBackupKey'); +const int CSSMERR_DL_INVALID_FIELD_NAME = -2147413750; - NSURLResourceKey get NSURLIsExcludedFromBackupKey => - _NSURLIsExcludedFromBackupKey.value; +const int CSSMERR_DL_UNSUPPORTED_FIELD_FORMAT = -2147413749; - set NSURLIsExcludedFromBackupKey(NSURLResourceKey value) => - _NSURLIsExcludedFromBackupKey.value = value; +const int CSSMERR_DL_UNSUPPORTED_INDEX_INFO = -2147413748; - /// The array of Tag names (Read-write, value type NSArray of NSString) - late final ffi.Pointer _NSURLTagNamesKey = - _lookup('NSURLTagNamesKey'); +const int CSSMERR_DL_UNSUPPORTED_LOCALITY = -2147413747; - NSURLResourceKey get NSURLTagNamesKey => _NSURLTagNamesKey.value; +const int CSSMERR_DL_UNSUPPORTED_NUM_ATTRIBUTES = -2147413746; - set NSURLTagNamesKey(NSURLResourceKey value) => - _NSURLTagNamesKey.value = value; +const int CSSMERR_DL_UNSUPPORTED_NUM_INDEXES = -2147413745; - /// the URL's path as a file system path (Read-only, value type NSString) - late final ffi.Pointer _NSURLPathKey = - _lookup('NSURLPathKey'); +const int CSSMERR_DL_UNSUPPORTED_NUM_RECORDTYPES = -2147413744; - NSURLResourceKey get NSURLPathKey => _NSURLPathKey.value; +const int CSSMERR_DL_UNSUPPORTED_RECORDTYPE = -2147413743; - set NSURLPathKey(NSURLResourceKey value) => _NSURLPathKey.value = value; +const int CSSMERR_DL_FIELD_SPECIFIED_MULTIPLE = -2147413742; - /// the URL's path as a canonical absolute file system path (Read-only, value type NSString) - late final ffi.Pointer _NSURLCanonicalPathKey = - _lookup('NSURLCanonicalPathKey'); +const int CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT = -2147413741; - NSURLResourceKey get NSURLCanonicalPathKey => _NSURLCanonicalPathKey.value; +const int CSSMERR_DL_INVALID_PARSING_MODULE = -2147413740; - set NSURLCanonicalPathKey(NSURLResourceKey value) => - _NSURLCanonicalPathKey.value = value; +const int CSSMERR_DL_INVALID_DB_NAME = -2147413738; - /// true if this URL is a file system trigger directory. Traversing or opening a file system trigger will cause an attempt to mount a file system on the trigger directory. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsMountTriggerKey = - _lookup('NSURLIsMountTriggerKey'); +const int CSSMERR_DL_DATASTORE_DOESNOT_EXIST = -2147413737; - NSURLResourceKey get NSURLIsMountTriggerKey => _NSURLIsMountTriggerKey.value; +const int CSSMERR_DL_DATASTORE_ALREADY_EXISTS = -2147413736; - set NSURLIsMountTriggerKey(NSURLResourceKey value) => - _NSURLIsMountTriggerKey.value = value; +const int CSSMERR_DL_DB_LOCKED = -2147413735; - /// An opaque generation identifier which can be compared using isEqual: to determine if the data in a document has been modified. For URLs which refer to the same file inode, the generation identifier will change when the data in the file's data fork is changed (changes to extended attributes or other file system metadata do not change the generation identifier). For URLs which refer to the same directory inode, the generation identifier will change when direct children of that directory are added, removed or renamed (changes to the data of the direct children of that directory will not change the generation identifier). The generation identifier is persistent across system restarts. The generation identifier is tied to a specific document on a specific volume and is not transferred when the document is copied to another volume. This property is not supported by all volumes. (Read-only, value type id ) - late final ffi.Pointer _NSURLGenerationIdentifierKey = - _lookup('NSURLGenerationIdentifierKey'); +const int CSSMERR_DL_DATASTORE_IS_OPEN = -2147413734; - NSURLResourceKey get NSURLGenerationIdentifierKey => - _NSURLGenerationIdentifierKey.value; +const int CSSMERR_DL_RECORD_NOT_FOUND = -2147413733; - set NSURLGenerationIdentifierKey(NSURLResourceKey value) => - _NSURLGenerationIdentifierKey.value = value; +const int CSSMERR_DL_MISSING_VALUE = -2147413732; - /// The document identifier -- a value assigned by the kernel to a document (which can be either a file or directory) and is used to identify the document regardless of where it gets moved on a volume. The document identifier survives "safe save” operations; i.e it is sticky to the path it was assigned to (-replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: is the preferred safe-save API). The document identifier is persistent across system restarts. The document identifier is not transferred when the file is copied. Document identifiers are only unique within a single volume. This property is not supported by all volumes. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLDocumentIdentifierKey = - _lookup('NSURLDocumentIdentifierKey'); +const int CSSMERR_DL_UNSUPPORTED_QUERY = -2147413731; - NSURLResourceKey get NSURLDocumentIdentifierKey => - _NSURLDocumentIdentifierKey.value; +const int CSSMERR_DL_UNSUPPORTED_QUERY_LIMITS = -2147413730; - set NSURLDocumentIdentifierKey(NSURLResourceKey value) => - _NSURLDocumentIdentifierKey.value = value; +const int CSSMERR_DL_UNSUPPORTED_NUM_SELECTION_PREDS = -2147413729; - /// The date the resource was created, or renamed into or within its parent directory. Note that inconsistent behavior may be observed when this attribute is requested on hard-linked items. This property is not supported by all volumes. (Read-only before macOS 10.15, iOS 13.0, watchOS 6.0, and tvOS 13.0; Read-write after, value type NSDate) - late final ffi.Pointer _NSURLAddedToDirectoryDateKey = - _lookup('NSURLAddedToDirectoryDateKey'); +const int CSSMERR_DL_UNSUPPORTED_OPERATOR = -2147413727; - NSURLResourceKey get NSURLAddedToDirectoryDateKey => - _NSURLAddedToDirectoryDateKey.value; +const int CSSMERR_DL_INVALID_RESULTS_HANDLE = -2147413726; - set NSURLAddedToDirectoryDateKey(NSURLResourceKey value) => - _NSURLAddedToDirectoryDateKey.value = value; +const int CSSMERR_DL_INVALID_DB_LOCATION = -2147413725; - /// The quarantine properties as defined in LSQuarantine.h. To remove quarantine information from a file, pass NSNull as the value when setting this property. (Read-write, value type NSDictionary) - late final ffi.Pointer _NSURLQuarantinePropertiesKey = - _lookup('NSURLQuarantinePropertiesKey'); +const int CSSMERR_DL_INVALID_ACCESS_REQUEST = -2147413724; - NSURLResourceKey get NSURLQuarantinePropertiesKey => - _NSURLQuarantinePropertiesKey.value; +const int CSSMERR_DL_INVALID_INDEX_INFO = -2147413723; - set NSURLQuarantinePropertiesKey(NSURLResourceKey value) => - _NSURLQuarantinePropertiesKey.value = value; +const int CSSMERR_DL_INVALID_SELECTION_TAG = -2147413722; - /// Returns the file system object type. (Read-only, value type NSString) - late final ffi.Pointer _NSURLFileResourceTypeKey = - _lookup('NSURLFileResourceTypeKey'); +const int CSSMERR_DL_INVALID_NEW_OWNER = -2147413721; - NSURLResourceKey get NSURLFileResourceTypeKey => - _NSURLFileResourceTypeKey.value; +const int CSSMERR_DL_INVALID_RECORD_UID = -2147413720; - set NSURLFileResourceTypeKey(NSURLResourceKey value) => - _NSURLFileResourceTypeKey.value = value; +const int CSSMERR_DL_INVALID_UNIQUE_INDEX_DATA = -2147413719; - /// A 64-bit value assigned by APFS that identifies a file's content data stream. Only cloned files and their originals can have the same identifier. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileContentIdentifierKey = - _lookup('NSURLFileContentIdentifierKey'); +const int CSSMERR_DL_INVALID_MODIFY_MODE = -2147413718; - NSURLResourceKey get NSURLFileContentIdentifierKey => - _NSURLFileContentIdentifierKey.value; +const int CSSMERR_DL_INVALID_OPEN_PARAMETERS = -2147413717; - set NSURLFileContentIdentifierKey(NSURLResourceKey value) => - _NSURLFileContentIdentifierKey.value = value; +const int CSSMERR_DL_RECORD_MODIFIED = -2147413716; - /// True for cloned files and their originals that may share all, some, or no data blocks. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLMayShareFileContentKey = - _lookup('NSURLMayShareFileContentKey'); +const int CSSMERR_DL_ENDOFDATA = -2147413715; - NSURLResourceKey get NSURLMayShareFileContentKey => - _NSURLMayShareFileContentKey.value; +const int CSSMERR_DL_INVALID_QUERY = -2147413714; - set NSURLMayShareFileContentKey(NSURLResourceKey value) => - _NSURLMayShareFileContentKey.value = value; +const int CSSMERR_DL_INVALID_VALUE = -2147413713; - /// True if the file has extended attributes. False guarantees there are none. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLMayHaveExtendedAttributesKey = - _lookup('NSURLMayHaveExtendedAttributesKey'); +const int CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTED = -2147413712; - NSURLResourceKey get NSURLMayHaveExtendedAttributesKey => - _NSURLMayHaveExtendedAttributesKey.value; +const int CSSMERR_DL_STALE_UNIQUE_RECORD = -2147413711; - set NSURLMayHaveExtendedAttributesKey(NSURLResourceKey value) => - _NSURLMayHaveExtendedAttributesKey.value = value; +const int CSSM_WORDID_KEYCHAIN_PROMPT = 65536; - /// True if the file can be deleted by the file system when asked to free space. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLIsPurgeableKey = - _lookup('NSURLIsPurgeableKey'); +const int CSSM_WORDID_KEYCHAIN_LOCK = 65537; - NSURLResourceKey get NSURLIsPurgeableKey => _NSURLIsPurgeableKey.value; +const int CSSM_WORDID_KEYCHAIN_CHANGE_LOCK = 65538; - set NSURLIsPurgeableKey(NSURLResourceKey value) => - _NSURLIsPurgeableKey.value = value; +const int CSSM_WORDID_PROCESS = 65539; - /// True if the file has sparse regions. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLIsSparseKey = - _lookup('NSURLIsSparseKey'); +const int CSSM_WORDID__RESERVED_1 = 65540; - NSURLResourceKey get NSURLIsSparseKey => _NSURLIsSparseKey.value; +const int CSSM_WORDID_SYMMETRIC_KEY = 65541; - set NSURLIsSparseKey(NSURLResourceKey value) => - _NSURLIsSparseKey.value = value; +const int CSSM_WORDID_SYSTEM = 65542; - /// The file system object type values returned for the NSURLFileResourceTypeKey - late final ffi.Pointer - _NSURLFileResourceTypeNamedPipe = - _lookup('NSURLFileResourceTypeNamedPipe'); +const int CSSM_WORDID_KEY = 65543; - NSURLFileResourceType get NSURLFileResourceTypeNamedPipe => - _NSURLFileResourceTypeNamedPipe.value; +const int CSSM_WORDID_PIN = 65544; - set NSURLFileResourceTypeNamedPipe(NSURLFileResourceType value) => - _NSURLFileResourceTypeNamedPipe.value = value; +const int CSSM_WORDID_PREAUTH = 65545; - late final ffi.Pointer - _NSURLFileResourceTypeCharacterSpecial = - _lookup('NSURLFileResourceTypeCharacterSpecial'); +const int CSSM_WORDID_PREAUTH_SOURCE = 65546; - NSURLFileResourceType get NSURLFileResourceTypeCharacterSpecial => - _NSURLFileResourceTypeCharacterSpecial.value; +const int CSSM_WORDID_ASYMMETRIC_KEY = 65547; - set NSURLFileResourceTypeCharacterSpecial(NSURLFileResourceType value) => - _NSURLFileResourceTypeCharacterSpecial.value = value; +const int CSSM_WORDID_PARTITION = 65548; - late final ffi.Pointer - _NSURLFileResourceTypeDirectory = - _lookup('NSURLFileResourceTypeDirectory'); +const int CSSM_WORDID_KEYBAG_KEY = 65549; - NSURLFileResourceType get NSURLFileResourceTypeDirectory => - _NSURLFileResourceTypeDirectory.value; +const int CSSM_WORDID__FIRST_UNUSED = 65550; - set NSURLFileResourceTypeDirectory(NSURLFileResourceType value) => - _NSURLFileResourceTypeDirectory.value = value; +const int CSSM_ACL_SUBJECT_TYPE_KEYCHAIN_PROMPT = 65536; - late final ffi.Pointer - _NSURLFileResourceTypeBlockSpecial = - _lookup('NSURLFileResourceTypeBlockSpecial'); +const int CSSM_ACL_SUBJECT_TYPE_PROCESS = 65539; - NSURLFileResourceType get NSURLFileResourceTypeBlockSpecial => - _NSURLFileResourceTypeBlockSpecial.value; +const int CSSM_ACL_SUBJECT_TYPE_CODE_SIGNATURE = 116; - set NSURLFileResourceTypeBlockSpecial(NSURLFileResourceType value) => - _NSURLFileResourceTypeBlockSpecial.value = value; +const int CSSM_ACL_SUBJECT_TYPE_COMMENT = 12; - late final ffi.Pointer _NSURLFileResourceTypeRegular = - _lookup('NSURLFileResourceTypeRegular'); +const int CSSM_ACL_SUBJECT_TYPE_SYMMETRIC_KEY = 65541; - NSURLFileResourceType get NSURLFileResourceTypeRegular => - _NSURLFileResourceTypeRegular.value; +const int CSSM_ACL_SUBJECT_TYPE_PREAUTH = 65545; - set NSURLFileResourceTypeRegular(NSURLFileResourceType value) => - _NSURLFileResourceTypeRegular.value = value; +const int CSSM_ACL_SUBJECT_TYPE_PREAUTH_SOURCE = 65546; - late final ffi.Pointer - _NSURLFileResourceTypeSymbolicLink = - _lookup('NSURLFileResourceTypeSymbolicLink'); +const int CSSM_ACL_SUBJECT_TYPE_ASYMMETRIC_KEY = 65547; - NSURLFileResourceType get NSURLFileResourceTypeSymbolicLink => - _NSURLFileResourceTypeSymbolicLink.value; +const int CSSM_ACL_SUBJECT_TYPE_PARTITION = 65548; + +const int CSSM_SAMPLE_TYPE_KEYCHAIN_PROMPT = 65536; + +const int CSSM_SAMPLE_TYPE_KEYCHAIN_LOCK = 65537; + +const int CSSM_SAMPLE_TYPE_KEYCHAIN_CHANGE_LOCK = 65538; + +const int CSSM_SAMPLE_TYPE_PROCESS = 65539; + +const int CSSM_SAMPLE_TYPE_COMMENT = 12; + +const int CSSM_SAMPLE_TYPE_RETRY_ID = 85; + +const int CSSM_SAMPLE_TYPE_SYMMETRIC_KEY = 65541; + +const int CSSM_SAMPLE_TYPE_PREAUTH = 65545; + +const int CSSM_SAMPLE_TYPE_ASYMMETRIC_KEY = 65547; + +const int CSSM_SAMPLE_TYPE_KEYBAG_KEY = 65549; + +const int CSSM_ACL_AUTHORIZATION_CHANGE_ACL = 65536; + +const int CSSM_ACL_AUTHORIZATION_CHANGE_OWNER = 65537; + +const int CSSM_ACL_AUTHORIZATION_PARTITION_ID = 65538; + +const int CSSM_ACL_AUTHORIZATION_INTEGRITY = 65539; + +const int CSSM_ACL_AUTHORIZATION_PREAUTH_BASE = 16842752; + +const int CSSM_ACL_AUTHORIZATION_PREAUTH_END = 16908288; + +const int CSSM_ACL_CODE_SIGNATURE_INVALID = 0; + +const int CSSM_ACL_CODE_SIGNATURE_OSX = 1; + +const int CSSM_ACL_MATCH_UID = 1; + +const int CSSM_ACL_MATCH_GID = 2; + +const int CSSM_ACL_MATCH_HONOR_ROOT = 256; + +const int CSSM_ACL_MATCH_BITS = 3; + +const int CSSM_ACL_PROCESS_SELECTOR_CURRENT_VERSION = 257; + +const int CSSM_ACL_KEYCHAIN_PROMPT_CURRENT_VERSION = 257; + +const int CSSM_ACL_KEYCHAIN_PROMPT_REQUIRE_PASSPHRASE = 1; + +const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED = 16; + +const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED_ACT = 32; + +const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID = 64; + +const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID_ACT = 128; + +const int CSSM_ACL_PREAUTH_TRACKING_COUNT_MASK = 255; + +const int CSSM_ACL_PREAUTH_TRACKING_BLOCKED = 0; + +const int CSSM_ACL_PREAUTH_TRACKING_UNKNOWN = 1073741824; + +const int CSSM_ACL_PREAUTH_TRACKING_AUTHORIZED = -2147483648; + +const int CSSM_DB_ACCESS_RESET = 65536; + +const int CSSM_ALGID_APPLE_YARROW = -2147483648; + +const int CSSM_ALGID_AES = -2147483647; + +const int CSSM_ALGID_FEE = -2147483646; + +const int CSSM_ALGID_FEE_MD5 = -2147483645; + +const int CSSM_ALGID_FEE_SHA1 = -2147483644; + +const int CSSM_ALGID_FEED = -2147483643; + +const int CSSM_ALGID_FEEDEXP = -2147483642; + +const int CSSM_ALGID_ASC = -2147483641; + +const int CSSM_ALGID_SHA1HMAC_LEGACY = -2147483640; + +const int CSSM_ALGID_KEYCHAIN_KEY = -2147483639; + +const int CSSM_ALGID_PKCS12_PBE_ENCR = -2147483638; + +const int CSSM_ALGID_PKCS12_PBE_MAC = -2147483637; + +const int CSSM_ALGID_SECURE_PASSPHRASE = -2147483636; + +const int CSSM_ALGID_PBE_OPENSSL_MD5 = -2147483635; + +const int CSSM_ALGID_SHA256 = -2147483634; + +const int CSSM_ALGID_SHA384 = -2147483633; + +const int CSSM_ALGID_SHA512 = -2147483632; + +const int CSSM_ALGID_ENTROPY_DEFAULT = -2147483631; + +const int CSSM_ALGID_SHA224 = -2147483630; + +const int CSSM_ALGID_SHA224WithRSA = -2147483629; + +const int CSSM_ALGID_SHA256WithRSA = -2147483628; + +const int CSSM_ALGID_SHA384WithRSA = -2147483627; + +const int CSSM_ALGID_SHA512WithRSA = -2147483626; + +const int CSSM_ALGID_OPENSSH1 = -2147483625; + +const int CSSM_ALGID_SHA224WithECDSA = -2147483624; + +const int CSSM_ALGID_SHA256WithECDSA = -2147483623; + +const int CSSM_ALGID_SHA384WithECDSA = -2147483622; + +const int CSSM_ALGID_SHA512WithECDSA = -2147483621; + +const int CSSM_ALGID_ECDSA_SPECIFIED = -2147483620; + +const int CSSM_ALGID_ECDH_X963_KDF = -2147483619; + +const int CSSM_ALGID__FIRST_UNUSED = -2147483618; + +const int CSSM_PADDING_APPLE_SSLv2 = -2147483648; + +const int CSSM_KEYBLOB_RAW_FORMAT_VENDOR_DEFINED = -2147483648; + +const int CSSM_KEYBLOB_RAW_FORMAT_X509 = -2147483648; + +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH = -2147483647; + +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSL = -2147483646; + +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH2 = -2147483645; + +const int CSSM_CUSTOM_COMMON_ERROR_EXTENT = 224; + +const int CSSM_ERRCODE_NO_USER_INTERACTION = 224; + +const int CSSM_ERRCODE_USER_CANCELED = 225; + +const int CSSM_ERRCODE_SERVICE_NOT_AVAILABLE = 226; + +const int CSSM_ERRCODE_INSUFFICIENT_CLIENT_IDENTIFICATION = 227; + +const int CSSM_ERRCODE_DEVICE_RESET = 228; + +const int CSSM_ERRCODE_DEVICE_FAILED = 229; + +const int CSSM_ERRCODE_IN_DARK_WAKE = 230; + +const int CSSMERR_CSSM_NO_USER_INTERACTION = -2147417888; + +const int CSSMERR_AC_NO_USER_INTERACTION = -2147405600; + +const int CSSMERR_CSP_NO_USER_INTERACTION = -2147415840; + +const int CSSMERR_CL_NO_USER_INTERACTION = -2147411744; + +const int CSSMERR_DL_NO_USER_INTERACTION = -2147413792; + +const int CSSMERR_TP_NO_USER_INTERACTION = -2147409696; + +const int CSSMERR_CSSM_USER_CANCELED = -2147417887; + +const int CSSMERR_AC_USER_CANCELED = -2147405599; + +const int CSSMERR_CSP_USER_CANCELED = -2147415839; + +const int CSSMERR_CL_USER_CANCELED = -2147411743; + +const int CSSMERR_DL_USER_CANCELED = -2147413791; + +const int CSSMERR_TP_USER_CANCELED = -2147409695; + +const int CSSMERR_CSSM_SERVICE_NOT_AVAILABLE = -2147417886; + +const int CSSMERR_AC_SERVICE_NOT_AVAILABLE = -2147405598; + +const int CSSMERR_CSP_SERVICE_NOT_AVAILABLE = -2147415838; + +const int CSSMERR_CL_SERVICE_NOT_AVAILABLE = -2147411742; + +const int CSSMERR_DL_SERVICE_NOT_AVAILABLE = -2147413790; + +const int CSSMERR_TP_SERVICE_NOT_AVAILABLE = -2147409694; + +const int CSSMERR_CSSM_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147417885; + +const int CSSMERR_AC_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147405597; + +const int CSSMERR_CSP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147415837; + +const int CSSMERR_CL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147411741; + +const int CSSMERR_DL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147413789; + +const int CSSMERR_TP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147409693; + +const int CSSMERR_CSSM_DEVICE_RESET = -2147417884; + +const int CSSMERR_AC_DEVICE_RESET = -2147405596; + +const int CSSMERR_CSP_DEVICE_RESET = -2147415836; + +const int CSSMERR_CL_DEVICE_RESET = -2147411740; + +const int CSSMERR_DL_DEVICE_RESET = -2147413788; + +const int CSSMERR_TP_DEVICE_RESET = -2147409692; + +const int CSSMERR_CSSM_DEVICE_FAILED = -2147417883; + +const int CSSMERR_AC_DEVICE_FAILED = -2147405595; + +const int CSSMERR_CSP_DEVICE_FAILED = -2147415835; + +const int CSSMERR_CL_DEVICE_FAILED = -2147411739; + +const int CSSMERR_DL_DEVICE_FAILED = -2147413787; + +const int CSSMERR_TP_DEVICE_FAILED = -2147409691; + +const int CSSMERR_CSSM_IN_DARK_WAKE = -2147417882; + +const int CSSMERR_AC_IN_DARK_WAKE = -2147405594; + +const int CSSMERR_CSP_IN_DARK_WAKE = -2147415834; + +const int CSSMERR_CL_IN_DARK_WAKE = -2147411738; + +const int CSSMERR_DL_IN_DARK_WAKE = -2147413786; + +const int CSSMERR_TP_IN_DARK_WAKE = -2147409690; + +const int CSSMERR_CSP_APPLE_ADD_APPLICATION_ACL_SUBJECT = -2147415040; + +const int CSSMERR_CSP_APPLE_PUBLIC_KEY_INCOMPLETE = -2147415039; + +const int CSSMERR_CSP_APPLE_SIGNATURE_MISMATCH = -2147415038; + +const int CSSMERR_CSP_APPLE_INVALID_KEY_START_DATE = -2147415037; + +const int CSSMERR_CSP_APPLE_INVALID_KEY_END_DATE = -2147415036; + +const int CSSMERR_CSPDL_APPLE_DL_CONVERSION_ERROR = -2147415035; + +const int CSSMERR_CSP_APPLE_SSLv2_ROLLBACK = -2147415034; + +const int CSSM_DL_DB_RECORD_GENERIC_PASSWORD = -2147483648; + +const int CSSM_DL_DB_RECORD_INTERNET_PASSWORD = -2147483647; + +const int CSSM_DL_DB_RECORD_APPLESHARE_PASSWORD = -2147483646; + +const int CSSM_DL_DB_RECORD_X509_CERTIFICATE = -2147479552; + +const int CSSM_DL_DB_RECORD_USER_TRUST = -2147479551; + +const int CSSM_DL_DB_RECORD_X509_CRL = -2147479550; + +const int CSSM_DL_DB_RECORD_UNLOCK_REFERRAL = -2147479549; + +const int CSSM_DL_DB_RECORD_EXTENDED_ATTRIBUTE = -2147479548; + +const int CSSM_DL_DB_RECORD_METADATA = -2147450880; + +const int CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT = 0; + +const int CSSM_APPLEFILEDL_COMMIT = 1; + +const int CSSM_APPLEFILEDL_ROLLBACK = 2; + +const int CSSM_APPLEFILEDL_TAKE_FILE_LOCK = 3; + +const int CSSM_APPLEFILEDL_MAKE_BACKUP = 4; + +const int CSSM_APPLEFILEDL_MAKE_COPY = 5; + +const int CSSM_APPLEFILEDL_DELETE_FILE = 6; + +const int CSSM_APPLE_UNLOCK_TYPE_KEY_DIRECT = 1; + +const int CSSM_APPLE_UNLOCK_TYPE_WRAPPED_PRIVATE = 2; + +const int CSSM_APPLE_UNLOCK_TYPE_KEYBAG = 3; + +const int CSSMERR_APPLEDL_INVALID_OPEN_PARAMETERS = -2147412992; + +const int CSSMERR_APPLEDL_DISK_FULL = -2147412991; + +const int CSSMERR_APPLEDL_QUOTA_EXCEEDED = -2147412990; + +const int CSSMERR_APPLEDL_FILE_TOO_BIG = -2147412989; + +const int CSSMERR_APPLEDL_INVALID_DATABASE_BLOB = -2147412988; + +const int CSSMERR_APPLEDL_INVALID_KEY_BLOB = -2147412987; + +const int CSSMERR_APPLEDL_INCOMPATIBLE_DATABASE_BLOB = -2147412986; + +const int CSSMERR_APPLEDL_INCOMPATIBLE_KEY_BLOB = -2147412985; + +const int CSSMERR_APPLETP_HOSTNAME_MISMATCH = -2147408896; + +const int CSSMERR_APPLETP_UNKNOWN_CRITICAL_EXTEN = -2147408895; + +const int CSSMERR_APPLETP_NO_BASIC_CONSTRAINTS = -2147408894; + +const int CSSMERR_APPLETP_INVALID_CA = -2147408893; + +const int CSSMERR_APPLETP_INVALID_AUTHORITY_ID = -2147408892; + +const int CSSMERR_APPLETP_INVALID_SUBJECT_ID = -2147408891; - set NSURLFileResourceTypeSymbolicLink(NSURLFileResourceType value) => - _NSURLFileResourceTypeSymbolicLink.value = value; +const int CSSMERR_APPLETP_INVALID_KEY_USAGE = -2147408890; - late final ffi.Pointer _NSURLFileResourceTypeSocket = - _lookup('NSURLFileResourceTypeSocket'); +const int CSSMERR_APPLETP_INVALID_EXTENDED_KEY_USAGE = -2147408889; - NSURLFileResourceType get NSURLFileResourceTypeSocket => - _NSURLFileResourceTypeSocket.value; +const int CSSMERR_APPLETP_INVALID_ID_LINKAGE = -2147408888; - set NSURLFileResourceTypeSocket(NSURLFileResourceType value) => - _NSURLFileResourceTypeSocket.value = value; +const int CSSMERR_APPLETP_PATH_LEN_CONSTRAINT = -2147408887; - late final ffi.Pointer _NSURLFileResourceTypeUnknown = - _lookup('NSURLFileResourceTypeUnknown'); +const int CSSMERR_APPLETP_INVALID_ROOT = -2147408886; - NSURLFileResourceType get NSURLFileResourceTypeUnknown => - _NSURLFileResourceTypeUnknown.value; +const int CSSMERR_APPLETP_CRL_EXPIRED = -2147408885; - set NSURLFileResourceTypeUnknown(NSURLFileResourceType value) => - _NSURLFileResourceTypeUnknown.value = value; +const int CSSMERR_APPLETP_CRL_NOT_VALID_YET = -2147408884; - /// dictionary of NSImage/UIImage objects keyed by size - late final ffi.Pointer _NSURLThumbnailDictionaryKey = - _lookup('NSURLThumbnailDictionaryKey'); +const int CSSMERR_APPLETP_CRL_NOT_FOUND = -2147408883; - NSURLResourceKey get NSURLThumbnailDictionaryKey => - _NSURLThumbnailDictionaryKey.value; +const int CSSMERR_APPLETP_CRL_SERVER_DOWN = -2147408882; - set NSURLThumbnailDictionaryKey(NSURLResourceKey value) => - _NSURLThumbnailDictionaryKey.value = value; +const int CSSMERR_APPLETP_CRL_BAD_URI = -2147408881; - /// returns all thumbnails as a single NSImage - late final ffi.Pointer _NSURLThumbnailKey = - _lookup('NSURLThumbnailKey'); +const int CSSMERR_APPLETP_UNKNOWN_CERT_EXTEN = -2147408880; - NSURLResourceKey get NSURLThumbnailKey => _NSURLThumbnailKey.value; +const int CSSMERR_APPLETP_UNKNOWN_CRL_EXTEN = -2147408879; - set NSURLThumbnailKey(NSURLResourceKey value) => - _NSURLThumbnailKey.value = value; +const int CSSMERR_APPLETP_CRL_NOT_TRUSTED = -2147408878; - /// size key for a 1024 x 1024 thumbnail image - late final ffi.Pointer - _NSThumbnail1024x1024SizeKey = - _lookup('NSThumbnail1024x1024SizeKey'); +const int CSSMERR_APPLETP_CRL_INVALID_ANCHOR_CERT = -2147408877; - NSURLThumbnailDictionaryItem get NSThumbnail1024x1024SizeKey => - _NSThumbnail1024x1024SizeKey.value; +const int CSSMERR_APPLETP_CRL_POLICY_FAIL = -2147408876; - set NSThumbnail1024x1024SizeKey(NSURLThumbnailDictionaryItem value) => - _NSThumbnail1024x1024SizeKey.value = value; +const int CSSMERR_APPLETP_IDP_FAIL = -2147408875; - /// Total file size in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileSizeKey = - _lookup('NSURLFileSizeKey'); +const int CSSMERR_APPLETP_CERT_NOT_FOUND_FROM_ISSUER = -2147408874; - NSURLResourceKey get NSURLFileSizeKey => _NSURLFileSizeKey.value; +const int CSSMERR_APPLETP_BAD_CERT_FROM_ISSUER = -2147408873; - set NSURLFileSizeKey(NSURLResourceKey value) => - _NSURLFileSizeKey.value = value; +const int CSSMERR_APPLETP_SMIME_EMAIL_ADDRS_NOT_FOUND = -2147408872; - /// Total size allocated on disk for the file in bytes (number of blocks times block size) (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileAllocatedSizeKey = - _lookup('NSURLFileAllocatedSizeKey'); +const int CSSMERR_APPLETP_SMIME_BAD_EXT_KEY_USE = -2147408871; - NSURLResourceKey get NSURLFileAllocatedSizeKey => - _NSURLFileAllocatedSizeKey.value; +const int CSSMERR_APPLETP_SMIME_BAD_KEY_USE = -2147408870; - set NSURLFileAllocatedSizeKey(NSURLResourceKey value) => - _NSURLFileAllocatedSizeKey.value = value; +const int CSSMERR_APPLETP_SMIME_KEYUSAGE_NOT_CRITICAL = -2147408869; - /// Total displayable size of the file in bytes (this may include space used by metadata), or nil if not available. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLTotalFileSizeKey = - _lookup('NSURLTotalFileSizeKey'); +const int CSSMERR_APPLETP_SMIME_NO_EMAIL_ADDRS = -2147408868; - NSURLResourceKey get NSURLTotalFileSizeKey => _NSURLTotalFileSizeKey.value; +const int CSSMERR_APPLETP_SMIME_SUBJ_ALT_NAME_NOT_CRIT = -2147408867; - set NSURLTotalFileSizeKey(NSURLResourceKey value) => - _NSURLTotalFileSizeKey.value = value; +const int CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE = -2147408866; - /// Total allocated size of the file in bytes (this may include space used by metadata), or nil if not available. This can be less than the value returned by NSURLTotalFileSizeKey if the resource is compressed. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLTotalFileAllocatedSizeKey = - _lookup('NSURLTotalFileAllocatedSizeKey'); +const int CSSMERR_APPLETP_OCSP_BAD_RESPONSE = -2147408865; - NSURLResourceKey get NSURLTotalFileAllocatedSizeKey => - _NSURLTotalFileAllocatedSizeKey.value; +const int CSSMERR_APPLETP_OCSP_BAD_REQUEST = -2147408864; - set NSURLTotalFileAllocatedSizeKey(NSURLResourceKey value) => - _NSURLTotalFileAllocatedSizeKey.value = value; +const int CSSMERR_APPLETP_OCSP_UNAVAILABLE = -2147408863; - /// true if the resource is a Finder alias file or a symlink, false otherwise ( Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsAliasFileKey = - _lookup('NSURLIsAliasFileKey'); +const int CSSMERR_APPLETP_OCSP_STATUS_UNRECOGNIZED = -2147408862; - NSURLResourceKey get NSURLIsAliasFileKey => _NSURLIsAliasFileKey.value; +const int CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK = -2147408861; - set NSURLIsAliasFileKey(NSURLResourceKey value) => - _NSURLIsAliasFileKey.value = value; +const int CSSMERR_APPLETP_NETWORK_FAILURE = -2147408860; - /// The protection level for this file - late final ffi.Pointer _NSURLFileProtectionKey = - _lookup('NSURLFileProtectionKey'); +const int CSSMERR_APPLETP_OCSP_NOT_TRUSTED = -2147408859; - NSURLResourceKey get NSURLFileProtectionKey => _NSURLFileProtectionKey.value; +const int CSSMERR_APPLETP_OCSP_INVALID_ANCHOR_CERT = -2147408858; - set NSURLFileProtectionKey(NSURLResourceKey value) => - _NSURLFileProtectionKey.value = value; +const int CSSMERR_APPLETP_OCSP_SIG_ERROR = -2147408857; - /// The file has no special protections associated with it. It can be read from or written to at any time. - late final ffi.Pointer _NSURLFileProtectionNone = - _lookup('NSURLFileProtectionNone'); +const int CSSMERR_APPLETP_OCSP_NO_SIGNER = -2147408856; - NSURLFileProtectionType get NSURLFileProtectionNone => - _NSURLFileProtectionNone.value; +const int CSSMERR_APPLETP_OCSP_RESP_MALFORMED_REQ = -2147408855; - set NSURLFileProtectionNone(NSURLFileProtectionType value) => - _NSURLFileProtectionNone.value = value; +const int CSSMERR_APPLETP_OCSP_RESP_INTERNAL_ERR = -2147408854; - /// The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting. - late final ffi.Pointer _NSURLFileProtectionComplete = - _lookup('NSURLFileProtectionComplete'); +const int CSSMERR_APPLETP_OCSP_RESP_TRY_LATER = -2147408853; - NSURLFileProtectionType get NSURLFileProtectionComplete => - _NSURLFileProtectionComplete.value; +const int CSSMERR_APPLETP_OCSP_RESP_SIG_REQUIRED = -2147408852; - set NSURLFileProtectionComplete(NSURLFileProtectionType value) => - _NSURLFileProtectionComplete.value = value; +const int CSSMERR_APPLETP_OCSP_RESP_UNAUTHORIZED = -2147408851; - /// The file is stored in an encrypted format on disk. Files can be created while the device is locked, but once closed, cannot be opened again until the device is unlocked. If the file is opened when unlocked, you may continue to access the file normally, even if the user locks the device. There is a small performance penalty when the file is created and opened, though not when being written to or read from. This can be mitigated by changing the file protection to NSURLFileProtectionComplete when the device is unlocked. - late final ffi.Pointer - _NSURLFileProtectionCompleteUnlessOpen = - _lookup('NSURLFileProtectionCompleteUnlessOpen'); +const int CSSMERR_APPLETP_OCSP_NONCE_MISMATCH = -2147408850; - NSURLFileProtectionType get NSURLFileProtectionCompleteUnlessOpen => - _NSURLFileProtectionCompleteUnlessOpen.value; +const int CSSMERR_APPLETP_CS_BAD_CERT_CHAIN_LENGTH = -2147408849; - set NSURLFileProtectionCompleteUnlessOpen(NSURLFileProtectionType value) => - _NSURLFileProtectionCompleteUnlessOpen.value = value; +const int CSSMERR_APPLETP_CS_NO_BASIC_CONSTRAINTS = -2147408848; - /// The file is stored in an encrypted format on disk and cannot be accessed until after the device has booted. After the user unlocks the device for the first time, your app can access the file and continue to access it even if the user subsequently locks the device. - late final ffi.Pointer - _NSURLFileProtectionCompleteUntilFirstUserAuthentication = - _lookup( - 'NSURLFileProtectionCompleteUntilFirstUserAuthentication'); +const int CSSMERR_APPLETP_CS_BAD_PATH_LENGTH = -2147408847; - NSURLFileProtectionType - get NSURLFileProtectionCompleteUntilFirstUserAuthentication => - _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value; +const int CSSMERR_APPLETP_CS_NO_EXTENDED_KEY_USAGE = -2147408846; - set NSURLFileProtectionCompleteUntilFirstUserAuthentication( - NSURLFileProtectionType value) => - _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; +const int CSSMERR_APPLETP_CODE_SIGN_DEVELOPMENT = -2147408845; - /// The user-visible volume format (Read-only, value type NSString) - late final ffi.Pointer - _NSURLVolumeLocalizedFormatDescriptionKey = - _lookup('NSURLVolumeLocalizedFormatDescriptionKey'); +const int CSSMERR_APPLETP_RS_BAD_CERT_CHAIN_LENGTH = -2147408844; - NSURLResourceKey get NSURLVolumeLocalizedFormatDescriptionKey => - _NSURLVolumeLocalizedFormatDescriptionKey.value; +const int CSSMERR_APPLETP_RS_BAD_EXTENDED_KEY_USAGE = -2147408843; - set NSURLVolumeLocalizedFormatDescriptionKey(NSURLResourceKey value) => - _NSURLVolumeLocalizedFormatDescriptionKey.value = value; +const int CSSMERR_APPLETP_TRUST_SETTING_DENY = -2147408842; - /// Total volume capacity in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeTotalCapacityKey = - _lookup('NSURLVolumeTotalCapacityKey'); +const int CSSMERR_APPLETP_INVALID_EMPTY_SUBJECT = -2147408841; - NSURLResourceKey get NSURLVolumeTotalCapacityKey => - _NSURLVolumeTotalCapacityKey.value; +const int CSSMERR_APPLETP_UNKNOWN_QUAL_CERT_STATEMENT = -2147408840; - set NSURLVolumeTotalCapacityKey(NSURLResourceKey value) => - _NSURLVolumeTotalCapacityKey.value = value; +const int CSSMERR_APPLETP_MISSING_REQUIRED_EXTENSION = -2147408839; - /// Total free space in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeAvailableCapacityKey = - _lookup('NSURLVolumeAvailableCapacityKey'); +const int CSSMERR_APPLETP_EXT_KEYUSAGE_NOT_CRITICAL = -2147408838; - NSURLResourceKey get NSURLVolumeAvailableCapacityKey => - _NSURLVolumeAvailableCapacityKey.value; +const int CSSMERR_APPLETP_IDENTIFIER_MISSING = -2147408837; - set NSURLVolumeAvailableCapacityKey(NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityKey.value = value; +const int CSSMERR_APPLETP_CA_PIN_MISMATCH = -2147408836; - /// Total number of resources on the volume (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeResourceCountKey = - _lookup('NSURLVolumeResourceCountKey'); +const int CSSMERR_APPLETP_LEAF_PIN_MISMATCH = -2147408835; - NSURLResourceKey get NSURLVolumeResourceCountKey => - _NSURLVolumeResourceCountKey.value; +const int CSSMERR_APPLE_DOTMAC_REQ_QUEUED = -2147408796; - set NSURLVolumeResourceCountKey(NSURLResourceKey value) => - _NSURLVolumeResourceCountKey.value = value; +const int CSSMERR_APPLE_DOTMAC_REQ_REDIRECT = -2147408795; - /// true if the volume format supports persistent object identifiers and can look up file system objects by their IDs (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsPersistentIDsKey = - _lookup('NSURLVolumeSupportsPersistentIDsKey'); +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ERR = -2147408794; - NSURLResourceKey get NSURLVolumeSupportsPersistentIDsKey => - _NSURLVolumeSupportsPersistentIDsKey.value; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_PARAM = -2147408793; - set NSURLVolumeSupportsPersistentIDsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsPersistentIDsKey.value = value; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_AUTH = -2147408792; - /// true if the volume format supports symbolic links (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsSymbolicLinksKey = - _lookup('NSURLVolumeSupportsSymbolicLinksKey'); +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_UNIMPL = -2147408791; - NSURLResourceKey get NSURLVolumeSupportsSymbolicLinksKey => - _NSURLVolumeSupportsSymbolicLinksKey.value; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_NOT_AVAIL = -2147408790; - set NSURLVolumeSupportsSymbolicLinksKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSymbolicLinksKey.value = value; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ALREADY_EXIST = -2147408789; - /// true if the volume format supports hard links (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsHardLinksKey = - _lookup('NSURLVolumeSupportsHardLinksKey'); +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_SERVICE_ERROR = -2147408788; - NSURLResourceKey get NSURLVolumeSupportsHardLinksKey => - _NSURLVolumeSupportsHardLinksKey.value; +const int CSSMERR_APPLE_DOTMAC_REQ_IS_PENDING = -2147408787; - set NSURLVolumeSupportsHardLinksKey(NSURLResourceKey value) => - _NSURLVolumeSupportsHardLinksKey.value = value; +const int CSSMERR_APPLE_DOTMAC_NO_REQ_PENDING = -2147408786; - /// true if the volume format supports a journal used to speed recovery in case of unplanned restart (such as a power outage or crash). This does not necessarily mean the volume is actively using a journal. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsJournalingKey = - _lookup('NSURLVolumeSupportsJournalingKey'); +const int CSSMERR_APPLE_DOTMAC_CSR_VERIFY_FAIL = -2147408785; - NSURLResourceKey get NSURLVolumeSupportsJournalingKey => - _NSURLVolumeSupportsJournalingKey.value; +const int CSSMERR_APPLE_DOTMAC_FAILED_CONSISTENCY_CHECK = -2147408784; - set NSURLVolumeSupportsJournalingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsJournalingKey.value = value; +const int CSSM_APPLEDL_OPEN_PARAMETERS_VERSION = 1; - /// true if the volume is currently using a journal for speedy recovery after an unplanned restart. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsJournalingKey = - _lookup('NSURLVolumeIsJournalingKey'); +const int CSSM_APPLECSPDL_DB_LOCK = 0; - NSURLResourceKey get NSURLVolumeIsJournalingKey => - _NSURLVolumeIsJournalingKey.value; +const int CSSM_APPLECSPDL_DB_UNLOCK = 1; - set NSURLVolumeIsJournalingKey(NSURLResourceKey value) => - _NSURLVolumeIsJournalingKey.value = value; +const int CSSM_APPLECSPDL_DB_GET_SETTINGS = 2; - /// true if the volume format supports sparse files, that is, files which can have 'holes' that have never been written to, and thus do not consume space on disk. A sparse file may have an allocated size on disk that is less than its logical length (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsSparseFilesKey = - _lookup('NSURLVolumeSupportsSparseFilesKey'); +const int CSSM_APPLECSPDL_DB_SET_SETTINGS = 3; - NSURLResourceKey get NSURLVolumeSupportsSparseFilesKey => - _NSURLVolumeSupportsSparseFilesKey.value; +const int CSSM_APPLECSPDL_DB_IS_LOCKED = 4; - set NSURLVolumeSupportsSparseFilesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSparseFilesKey.value = value; +const int CSSM_APPLECSPDL_DB_CHANGE_PASSWORD = 5; - /// For security reasons, parts of a file (runs) that have never been written to must appear to contain zeroes. true if the volume keeps track of allocated but unwritten runs of a file so that it can substitute zeroes without actually writing zeroes to the media. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsZeroRunsKey = - _lookup('NSURLVolumeSupportsZeroRunsKey'); +const int CSSM_APPLECSPDL_DB_GET_HANDLE = 6; - NSURLResourceKey get NSURLVolumeSupportsZeroRunsKey => - _NSURLVolumeSupportsZeroRunsKey.value; +const int CSSM_APPLESCPDL_CSP_GET_KEYHANDLE = 7; - set NSURLVolumeSupportsZeroRunsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsZeroRunsKey.value = value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_8 = 8; - /// true if the volume format treats upper and lower case characters in file and directory names as different. Otherwise an upper case character is equivalent to a lower case character, and you can't have two names that differ solely in the case of the characters. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsCaseSensitiveNamesKey = - _lookup('NSURLVolumeSupportsCaseSensitiveNamesKey'); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_9 = 9; - NSURLResourceKey get NSURLVolumeSupportsCaseSensitiveNamesKey => - _NSURLVolumeSupportsCaseSensitiveNamesKey.value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_10 = 10; - set NSURLVolumeSupportsCaseSensitiveNamesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCaseSensitiveNamesKey.value = value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_11 = 11; - /// true if the volume format preserves the case of file and directory names. Otherwise the volume may change the case of some characters (typically making them all upper or all lower case). (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsCasePreservedNamesKey = - _lookup('NSURLVolumeSupportsCasePreservedNamesKey'); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_12 = 12; - NSURLResourceKey get NSURLVolumeSupportsCasePreservedNamesKey => - _NSURLVolumeSupportsCasePreservedNamesKey.value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_13 = 13; - set NSURLVolumeSupportsCasePreservedNamesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCasePreservedNamesKey.value = value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_14 = 14; - /// true if the volume supports reliable storage of times for the root directory. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsRootDirectoryDatesKey = - _lookup('NSURLVolumeSupportsRootDirectoryDatesKey'); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_15 = 15; - NSURLResourceKey get NSURLVolumeSupportsRootDirectoryDatesKey => - _NSURLVolumeSupportsRootDirectoryDatesKey.value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_16 = 16; - set NSURLVolumeSupportsRootDirectoryDatesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsRootDirectoryDatesKey.value = value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_17 = 17; - /// true if the volume supports returning volume size values (NSURLVolumeTotalCapacityKey and NSURLVolumeAvailableCapacityKey). (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsVolumeSizesKey = - _lookup('NSURLVolumeSupportsVolumeSizesKey'); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_18 = 18; - NSURLResourceKey get NSURLVolumeSupportsVolumeSizesKey => - _NSURLVolumeSupportsVolumeSizesKey.value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_19 = 19; - set NSURLVolumeSupportsVolumeSizesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsVolumeSizesKey.value = value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_20 = 20; - /// true if the volume can be renamed. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsRenamingKey = - _lookup('NSURLVolumeSupportsRenamingKey'); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_21 = 21; - NSURLResourceKey get NSURLVolumeSupportsRenamingKey => - _NSURLVolumeSupportsRenamingKey.value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_22 = 22; - set NSURLVolumeSupportsRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsRenamingKey.value = value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_23 = 23; - /// true if the volume implements whole-file flock(2) style advisory locks, and the O_EXLOCK and O_SHLOCK flags of the open(2) call. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsAdvisoryFileLockingKey = - _lookup('NSURLVolumeSupportsAdvisoryFileLockingKey'); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_24 = 24; - NSURLResourceKey get NSURLVolumeSupportsAdvisoryFileLockingKey => - _NSURLVolumeSupportsAdvisoryFileLockingKey.value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_25 = 25; - set NSURLVolumeSupportsAdvisoryFileLockingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsAdvisoryFileLockingKey.value = value; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_26 = 26; - /// true if the volume implements extended security (ACLs). (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsExtendedSecurityKey = - _lookup('NSURLVolumeSupportsExtendedSecurityKey'); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_27 = 27; - NSURLResourceKey get NSURLVolumeSupportsExtendedSecurityKey => - _NSURLVolumeSupportsExtendedSecurityKey.value; +const int CSSM_APPLECSP_KEYDIGEST = 256; - set NSURLVolumeSupportsExtendedSecurityKey(NSURLResourceKey value) => - _NSURLVolumeSupportsExtendedSecurityKey.value = value; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_APPLE_CUSTOM = 100; - /// true if the volume should be visible via the GUI (i.e., appear on the Desktop as a separate volume). (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsBrowsableKey = - _lookup('NSURLVolumeIsBrowsableKey'); +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSL = 101; - NSURLResourceKey get NSURLVolumeIsBrowsableKey => - _NSURLVolumeIsBrowsableKey.value; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSH1 = 102; - set NSURLVolumeIsBrowsableKey(NSURLResourceKey value) => - _NSURLVolumeIsBrowsableKey.value = value; +const int CSSM_ATTRIBUTE_VENDOR_DEFINED = 8388608; - /// The largest file size (in bytes) supported by this file system, or nil if this cannot be determined. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeMaximumFileSizeKey = - _lookup('NSURLVolumeMaximumFileSizeKey'); +const int CSSM_ATTRIBUTE_PUBLIC_KEY = 1082130432; - NSURLResourceKey get NSURLVolumeMaximumFileSizeKey => - _NSURLVolumeMaximumFileSizeKey.value; +const int CSSM_ATTRIBUTE_FEE_PRIME_TYPE = 276824065; - set NSURLVolumeMaximumFileSizeKey(NSURLResourceKey value) => - _NSURLVolumeMaximumFileSizeKey.value = value; +const int CSSM_ATTRIBUTE_FEE_CURVE_TYPE = 276824066; - /// true if the volume's media is ejectable from the drive mechanism under software control. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsEjectableKey = - _lookup('NSURLVolumeIsEjectableKey'); +const int CSSM_ATTRIBUTE_ASC_OPTIMIZATION = 276824067; - NSURLResourceKey get NSURLVolumeIsEjectableKey => - _NSURLVolumeIsEjectableKey.value; +const int CSSM_ATTRIBUTE_RSA_BLINDING = 276824068; - set NSURLVolumeIsEjectableKey(NSURLResourceKey value) => - _NSURLVolumeIsEjectableKey.value = value; +const int CSSM_ATTRIBUTE_PARAM_KEY = 1082130437; - /// true if the volume's media is removable from the drive mechanism. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsRemovableKey = - _lookup('NSURLVolumeIsRemovableKey'); +const int CSSM_ATTRIBUTE_PROMPT = 545259526; - NSURLResourceKey get NSURLVolumeIsRemovableKey => - _NSURLVolumeIsRemovableKey.value; +const int CSSM_ATTRIBUTE_ALERT_TITLE = 545259527; - set NSURLVolumeIsRemovableKey(NSURLResourceKey value) => - _NSURLVolumeIsRemovableKey.value = value; +const int CSSM_ATTRIBUTE_VERIFY_PASSPHRASE = 276824072; - /// true if the volume's device is connected to an internal bus, false if connected to an external bus, or nil if not available. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsInternalKey = - _lookup('NSURLVolumeIsInternalKey'); +const int CSSM_FEE_PRIME_TYPE_DEFAULT = 0; - NSURLResourceKey get NSURLVolumeIsInternalKey => - _NSURLVolumeIsInternalKey.value; +const int CSSM_FEE_PRIME_TYPE_MERSENNE = 1; - set NSURLVolumeIsInternalKey(NSURLResourceKey value) => - _NSURLVolumeIsInternalKey.value = value; +const int CSSM_FEE_PRIME_TYPE_FEE = 2; - /// true if the volume is automounted. Note: do not mistake this with the functionality provided by kCFURLVolumeSupportsBrowsingKey. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsAutomountedKey = - _lookup('NSURLVolumeIsAutomountedKey'); +const int CSSM_FEE_PRIME_TYPE_GENERAL = 3; - NSURLResourceKey get NSURLVolumeIsAutomountedKey => - _NSURLVolumeIsAutomountedKey.value; +const int CSSM_FEE_CURVE_TYPE_DEFAULT = 0; - set NSURLVolumeIsAutomountedKey(NSURLResourceKey value) => - _NSURLVolumeIsAutomountedKey.value = value; +const int CSSM_FEE_CURVE_TYPE_MONTGOMERY = 1; - /// true if the volume is stored on a local device. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsLocalKey = - _lookup('NSURLVolumeIsLocalKey'); +const int CSSM_FEE_CURVE_TYPE_WEIERSTRASS = 2; - NSURLResourceKey get NSURLVolumeIsLocalKey => _NSURLVolumeIsLocalKey.value; +const int CSSM_FEE_CURVE_TYPE_ANSI_X9_62 = 3; - set NSURLVolumeIsLocalKey(NSURLResourceKey value) => - _NSURLVolumeIsLocalKey.value = value; +const int CSSM_ASC_OPTIMIZE_DEFAULT = 0; - /// true if the volume is read-only. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsReadOnlyKey = - _lookup('NSURLVolumeIsReadOnlyKey'); +const int CSSM_ASC_OPTIMIZE_SIZE = 1; - NSURLResourceKey get NSURLVolumeIsReadOnlyKey => - _NSURLVolumeIsReadOnlyKey.value; +const int CSSM_ASC_OPTIMIZE_SECURITY = 2; - set NSURLVolumeIsReadOnlyKey(NSURLResourceKey value) => - _NSURLVolumeIsReadOnlyKey.value = value; +const int CSSM_ASC_OPTIMIZE_TIME = 3; - /// The volume's creation date, or nil if this cannot be determined. (Read-only, value type NSDate) - late final ffi.Pointer _NSURLVolumeCreationDateKey = - _lookup('NSURLVolumeCreationDateKey'); +const int CSSM_ASC_OPTIMIZE_TIME_SIZE = 4; - NSURLResourceKey get NSURLVolumeCreationDateKey => - _NSURLVolumeCreationDateKey.value; +const int CSSM_ASC_OPTIMIZE_ASCII = 5; - set NSURLVolumeCreationDateKey(NSURLResourceKey value) => - _NSURLVolumeCreationDateKey.value = value; +const int CSSM_KEYATTR_PARTIAL = 65536; - /// The NSURL needed to remount a network volume, or nil if not available. (Read-only, value type NSURL) - late final ffi.Pointer _NSURLVolumeURLForRemountingKey = - _lookup('NSURLVolumeURLForRemountingKey'); +const int CSSM_KEYATTR_PUBLIC_KEY_ENCRYPT = 131072; - NSURLResourceKey get NSURLVolumeURLForRemountingKey => - _NSURLVolumeURLForRemountingKey.value; +const int CSSM_TP_ACTION_REQUIRE_CRL_PER_CERT = 1; - set NSURLVolumeURLForRemountingKey(NSURLResourceKey value) => - _NSURLVolumeURLForRemountingKey.value = value; +const int CSSM_TP_ACTION_FETCH_CRL_FROM_NET = 2; - /// The volume's persistent UUID as a string, or nil if a persistent UUID is not available for the volume. (Read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeUUIDStringKey = - _lookup('NSURLVolumeUUIDStringKey'); +const int CSSM_TP_ACTION_CRL_SUFFICIENT = 4; - NSURLResourceKey get NSURLVolumeUUIDStringKey => - _NSURLVolumeUUIDStringKey.value; +const int CSSM_TP_ACTION_REQUIRE_CRL_IF_PRESENT = 8; - set NSURLVolumeUUIDStringKey(NSURLResourceKey value) => - _NSURLVolumeUUIDStringKey.value = value; +const int CSSM_TP_ACTION_ALLOW_EXPIRED = 1; - /// The name of the volume (Read-write if NSURLVolumeSupportsRenamingKey is YES, otherwise read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeNameKey = - _lookup('NSURLVolumeNameKey'); +const int CSSM_TP_ACTION_LEAF_IS_CA = 2; - NSURLResourceKey get NSURLVolumeNameKey => _NSURLVolumeNameKey.value; +const int CSSM_TP_ACTION_FETCH_CERT_FROM_NET = 4; - set NSURLVolumeNameKey(NSURLResourceKey value) => - _NSURLVolumeNameKey.value = value; +const int CSSM_TP_ACTION_ALLOW_EXPIRED_ROOT = 8; - /// The user-presentable name of the volume (Read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeLocalizedNameKey = - _lookup('NSURLVolumeLocalizedNameKey'); +const int CSSM_TP_ACTION_REQUIRE_REV_PER_CERT = 16; - NSURLResourceKey get NSURLVolumeLocalizedNameKey => - _NSURLVolumeLocalizedNameKey.value; +const int CSSM_TP_ACTION_TRUST_SETTINGS = 32; - set NSURLVolumeLocalizedNameKey(NSURLResourceKey value) => - _NSURLVolumeLocalizedNameKey.value = value; +const int CSSM_TP_ACTION_IMPLICIT_ANCHORS = 64; - /// true if the volume is encrypted. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsEncryptedKey = - _lookup('NSURLVolumeIsEncryptedKey'); +const int CSSM_CERT_STATUS_EXPIRED = 1; - NSURLResourceKey get NSURLVolumeIsEncryptedKey => - _NSURLVolumeIsEncryptedKey.value; +const int CSSM_CERT_STATUS_NOT_VALID_YET = 2; - set NSURLVolumeIsEncryptedKey(NSURLResourceKey value) => - _NSURLVolumeIsEncryptedKey.value = value; +const int CSSM_CERT_STATUS_IS_IN_INPUT_CERTS = 4; - /// true if the volume is the root filesystem. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsRootFileSystemKey = - _lookup('NSURLVolumeIsRootFileSystemKey'); +const int CSSM_CERT_STATUS_IS_IN_ANCHORS = 8; - NSURLResourceKey get NSURLVolumeIsRootFileSystemKey => - _NSURLVolumeIsRootFileSystemKey.value; +const int CSSM_CERT_STATUS_IS_ROOT = 16; - set NSURLVolumeIsRootFileSystemKey(NSURLResourceKey value) => - _NSURLVolumeIsRootFileSystemKey.value = value; +const int CSSM_CERT_STATUS_IS_FROM_NET = 32; - /// true if the volume supports transparent decompression of compressed files using decmpfs. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsCompressionKey = - _lookup('NSURLVolumeSupportsCompressionKey'); +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_USER = 64; - NSURLResourceKey get NSURLVolumeSupportsCompressionKey => - _NSURLVolumeSupportsCompressionKey.value; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_ADMIN = 128; - set NSURLVolumeSupportsCompressionKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCompressionKey.value = value; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_SYSTEM = 256; - /// true if the volume supports clonefile(2) (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsFileCloningKey = - _lookup('NSURLVolumeSupportsFileCloningKey'); +const int CSSM_CERT_STATUS_TRUST_SETTINGS_TRUST = 512; - NSURLResourceKey get NSURLVolumeSupportsFileCloningKey => - _NSURLVolumeSupportsFileCloningKey.value; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_DENY = 1024; - set NSURLVolumeSupportsFileCloningKey(NSURLResourceKey value) => - _NSURLVolumeSupportsFileCloningKey.value = value; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_IGNORED_ERROR = 2048; - /// true if the volume supports renamex_np(2)'s RENAME_SWAP option (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsSwapRenamingKey = - _lookup('NSURLVolumeSupportsSwapRenamingKey'); +const int CSSM_EVIDENCE_FORM_APPLE_HEADER = -2147483648; - NSURLResourceKey get NSURLVolumeSupportsSwapRenamingKey => - _NSURLVolumeSupportsSwapRenamingKey.value; +const int CSSM_EVIDENCE_FORM_APPLE_CERTGROUP = -2147483647; - set NSURLVolumeSupportsSwapRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSwapRenamingKey.value = value; +const int CSSM_EVIDENCE_FORM_APPLE_CERT_INFO = -2147483646; - /// true if the volume supports renamex_np(2)'s RENAME_EXCL option (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsExclusiveRenamingKey = - _lookup('NSURLVolumeSupportsExclusiveRenamingKey'); +const int CSSM_APPLEX509CL_OBTAIN_CSR = 0; - NSURLResourceKey get NSURLVolumeSupportsExclusiveRenamingKey => - _NSURLVolumeSupportsExclusiveRenamingKey.value; +const int CSSM_APPLEX509CL_VERIFY_CSR = 1; - set NSURLVolumeSupportsExclusiveRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsExclusiveRenamingKey.value = value; +const int kSecSubjectItemAttr = 1937072746; - /// true if the volume supports making files immutable with the NSURLIsUserImmutableKey or NSURLIsSystemImmutableKey properties (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsImmutableFilesKey = - _lookup('NSURLVolumeSupportsImmutableFilesKey'); +const int kSecIssuerItemAttr = 1769173877; - NSURLResourceKey get NSURLVolumeSupportsImmutableFilesKey => - _NSURLVolumeSupportsImmutableFilesKey.value; +const int kSecSerialNumberItemAttr = 1936614002; - set NSURLVolumeSupportsImmutableFilesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsImmutableFilesKey.value = value; +const int kSecPublicKeyHashItemAttr = 1752198009; - /// true if the volume supports setting POSIX access permissions with the NSURLFileSecurityKey property (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsAccessPermissionsKey = - _lookup('NSURLVolumeSupportsAccessPermissionsKey'); +const int kSecSubjectKeyIdentifierItemAttr = 1936419172; - NSURLResourceKey get NSURLVolumeSupportsAccessPermissionsKey => - _NSURLVolumeSupportsAccessPermissionsKey.value; +const int kSecCertTypeItemAttr = 1668577648; - set NSURLVolumeSupportsAccessPermissionsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsAccessPermissionsKey.value = value; +const int kSecCertEncodingItemAttr = 1667591779; - /// True if the volume supports the File Protection attribute (see NSURLFileProtectionKey). (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsFileProtectionKey = - _lookup('NSURLVolumeSupportsFileProtectionKey'); +const int SSL_NULL_WITH_NULL_NULL = 0; - NSURLResourceKey get NSURLVolumeSupportsFileProtectionKey => - _NSURLVolumeSupportsFileProtectionKey.value; +const int SSL_RSA_WITH_NULL_MD5 = 1; - set NSURLVolumeSupportsFileProtectionKey(NSURLResourceKey value) => - _NSURLVolumeSupportsFileProtectionKey.value = value; +const int SSL_RSA_WITH_NULL_SHA = 2; - /// (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeAvailableCapacityForImportantUsageKey = - _lookup( - 'NSURLVolumeAvailableCapacityForImportantUsageKey'); +const int SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3; - NSURLResourceKey get NSURLVolumeAvailableCapacityForImportantUsageKey => - _NSURLVolumeAvailableCapacityForImportantUsageKey.value; +const int SSL_RSA_WITH_RC4_128_MD5 = 4; - set NSURLVolumeAvailableCapacityForImportantUsageKey( - NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityForImportantUsageKey.value = value; +const int SSL_RSA_WITH_RC4_128_SHA = 5; - /// (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey = - _lookup( - 'NSURLVolumeAvailableCapacityForOpportunisticUsageKey'); +const int SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6; - NSURLResourceKey get NSURLVolumeAvailableCapacityForOpportunisticUsageKey => - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value; +const int SSL_RSA_WITH_IDEA_CBC_SHA = 7; - set NSURLVolumeAvailableCapacityForOpportunisticUsageKey( - NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; +const int SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8; - /// true if this item is synced to the cloud, false if it is only a local file. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsUbiquitousItemKey = - _lookup('NSURLIsUbiquitousItemKey'); +const int SSL_RSA_WITH_DES_CBC_SHA = 9; - NSURLResourceKey get NSURLIsUbiquitousItemKey => - _NSURLIsUbiquitousItemKey.value; +const int SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10; - set NSURLIsUbiquitousItemKey(NSURLResourceKey value) => - _NSURLIsUbiquitousItemKey.value = value; +const int SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11; - /// true if this item has conflicts outstanding. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemHasUnresolvedConflictsKey = - _lookup('NSURLUbiquitousItemHasUnresolvedConflictsKey'); +const int SSL_DH_DSS_WITH_DES_CBC_SHA = 12; - NSURLResourceKey get NSURLUbiquitousItemHasUnresolvedConflictsKey => - _NSURLUbiquitousItemHasUnresolvedConflictsKey.value; +const int SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; - set NSURLUbiquitousItemHasUnresolvedConflictsKey(NSURLResourceKey value) => - _NSURLUbiquitousItemHasUnresolvedConflictsKey.value = value; +const int SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14; - /// equivalent to NSURLUbiquitousItemDownloadingStatusKey == NSURLUbiquitousItemDownloadingStatusCurrent. Has never behaved as documented in earlier releases, hence deprecated. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsDownloadedKey = - _lookup('NSURLUbiquitousItemIsDownloadedKey'); +const int SSL_DH_RSA_WITH_DES_CBC_SHA = 15; - NSURLResourceKey get NSURLUbiquitousItemIsDownloadedKey => - _NSURLUbiquitousItemIsDownloadedKey.value; +const int SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; - set NSURLUbiquitousItemIsDownloadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsDownloadedKey.value = value; +const int SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17; - /// true if data is being downloaded for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemIsDownloadingKey = - _lookup('NSURLUbiquitousItemIsDownloadingKey'); +const int SSL_DHE_DSS_WITH_DES_CBC_SHA = 18; - NSURLResourceKey get NSURLUbiquitousItemIsDownloadingKey => - _NSURLUbiquitousItemIsDownloadingKey.value; +const int SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; - set NSURLUbiquitousItemIsDownloadingKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsDownloadingKey.value = value; +const int SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20; - /// true if there is data present in the cloud for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsUploadedKey = - _lookup('NSURLUbiquitousItemIsUploadedKey'); +const int SSL_DHE_RSA_WITH_DES_CBC_SHA = 21; - NSURLResourceKey get NSURLUbiquitousItemIsUploadedKey => - _NSURLUbiquitousItemIsUploadedKey.value; +const int SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; - set NSURLUbiquitousItemIsUploadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsUploadedKey.value = value; +const int SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23; - /// true if data is being uploaded for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsUploadingKey = - _lookup('NSURLUbiquitousItemIsUploadingKey'); +const int SSL_DH_anon_WITH_RC4_128_MD5 = 24; - NSURLResourceKey get NSURLUbiquitousItemIsUploadingKey => - _NSURLUbiquitousItemIsUploadingKey.value; +const int SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25; - set NSURLUbiquitousItemIsUploadingKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsUploadingKey.value = value; +const int SSL_DH_anon_WITH_DES_CBC_SHA = 26; - /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead - late final ffi.Pointer - _NSURLUbiquitousItemPercentDownloadedKey = - _lookup('NSURLUbiquitousItemPercentDownloadedKey'); +const int SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; - NSURLResourceKey get NSURLUbiquitousItemPercentDownloadedKey => - _NSURLUbiquitousItemPercentDownloadedKey.value; +const int SSL_FORTEZZA_DMS_WITH_NULL_SHA = 28; - set NSURLUbiquitousItemPercentDownloadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemPercentDownloadedKey.value = value; +const int SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = 29; - /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead - late final ffi.Pointer - _NSURLUbiquitousItemPercentUploadedKey = - _lookup('NSURLUbiquitousItemPercentUploadedKey'); +const int TLS_RSA_WITH_AES_128_CBC_SHA = 47; - NSURLResourceKey get NSURLUbiquitousItemPercentUploadedKey => - _NSURLUbiquitousItemPercentUploadedKey.value; +const int TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48; - set NSURLUbiquitousItemPercentUploadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemPercentUploadedKey.value = value; +const int TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49; - /// returns the download status of this item. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusKey = - _lookup('NSURLUbiquitousItemDownloadingStatusKey'); +const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50; - NSURLResourceKey get NSURLUbiquitousItemDownloadingStatusKey => - _NSURLUbiquitousItemDownloadingStatusKey.value; +const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51; - set NSURLUbiquitousItemDownloadingStatusKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadingStatusKey.value = value; +const int TLS_DH_anon_WITH_AES_128_CBC_SHA = 52; - /// returns the error when downloading the item from iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingErrorKey = - _lookup('NSURLUbiquitousItemDownloadingErrorKey'); +const int TLS_RSA_WITH_AES_256_CBC_SHA = 53; - NSURLResourceKey get NSURLUbiquitousItemDownloadingErrorKey => - _NSURLUbiquitousItemDownloadingErrorKey.value; +const int TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54; - set NSURLUbiquitousItemDownloadingErrorKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadingErrorKey.value = value; +const int TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55; - /// returns the error when uploading the item to iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) - late final ffi.Pointer - _NSURLUbiquitousItemUploadingErrorKey = - _lookup('NSURLUbiquitousItemUploadingErrorKey'); +const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56; - NSURLResourceKey get NSURLUbiquitousItemUploadingErrorKey => - _NSURLUbiquitousItemUploadingErrorKey.value; +const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57; - set NSURLUbiquitousItemUploadingErrorKey(NSURLResourceKey value) => - _NSURLUbiquitousItemUploadingErrorKey.value = value; +const int TLS_DH_anon_WITH_AES_256_CBC_SHA = 58; - /// returns whether a download of this item has already been requested with an API like -startDownloadingUbiquitousItemAtURL:error: (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemDownloadRequestedKey = - _lookup('NSURLUbiquitousItemDownloadRequestedKey'); +const int TLS_ECDH_ECDSA_WITH_NULL_SHA = -16383; - NSURLResourceKey get NSURLUbiquitousItemDownloadRequestedKey => - _NSURLUbiquitousItemDownloadRequestedKey.value; +const int TLS_ECDH_ECDSA_WITH_RC4_128_SHA = -16382; - set NSURLUbiquitousItemDownloadRequestedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadRequestedKey.value = value; +const int TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = -16381; - /// returns the name of this item's container as displayed to users. - late final ffi.Pointer - _NSURLUbiquitousItemContainerDisplayNameKey = - _lookup('NSURLUbiquitousItemContainerDisplayNameKey'); +const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = -16380; - NSURLResourceKey get NSURLUbiquitousItemContainerDisplayNameKey => - _NSURLUbiquitousItemContainerDisplayNameKey.value; +const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = -16379; - set NSURLUbiquitousItemContainerDisplayNameKey(NSURLResourceKey value) => - _NSURLUbiquitousItemContainerDisplayNameKey.value = value; +const int TLS_ECDHE_ECDSA_WITH_NULL_SHA = -16378; - /// true if the item is excluded from sync, which means it is locally on disk but won't be available on the server. An excluded item is no longer ubiquitous. (Read-write, value type boolean NSNumber - late final ffi.Pointer - _NSURLUbiquitousItemIsExcludedFromSyncKey = - _lookup('NSURLUbiquitousItemIsExcludedFromSyncKey'); +const int TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = -16377; - NSURLResourceKey get NSURLUbiquitousItemIsExcludedFromSyncKey => - _NSURLUbiquitousItemIsExcludedFromSyncKey.value; +const int TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; - set NSURLUbiquitousItemIsExcludedFromSyncKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsExcludedFromSyncKey.value = value; +const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; - /// true if the ubiquitous item is shared. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsSharedKey = - _lookup('NSURLUbiquitousItemIsSharedKey'); +const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; - NSURLResourceKey get NSURLUbiquitousItemIsSharedKey => - _NSURLUbiquitousItemIsSharedKey.value; +const int TLS_ECDH_RSA_WITH_NULL_SHA = -16373; - set NSURLUbiquitousItemIsSharedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsSharedKey.value = value; +const int TLS_ECDH_RSA_WITH_RC4_128_SHA = -16372; - /// returns the current user's role for this shared item, or nil if not shared. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousSharedItemCurrentUserRoleKey = - _lookup('NSURLUbiquitousSharedItemCurrentUserRoleKey'); +const int TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = -16371; - NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserRoleKey => - _NSURLUbiquitousSharedItemCurrentUserRoleKey.value; +const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = -16370; - set NSURLUbiquitousSharedItemCurrentUserRoleKey(NSURLResourceKey value) => - _NSURLUbiquitousSharedItemCurrentUserRoleKey.value = value; +const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = -16369; - /// returns the permissions for the current user, or nil if not shared. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey = - _lookup( - 'NSURLUbiquitousSharedItemCurrentUserPermissionsKey'); +const int TLS_ECDHE_RSA_WITH_NULL_SHA = -16368; - NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserPermissionsKey => - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value; +const int TLS_ECDHE_RSA_WITH_RC4_128_SHA = -16367; - set NSURLUbiquitousSharedItemCurrentUserPermissionsKey( - NSURLResourceKey value) => - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value = value; +const int TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; - /// returns a NSPersonNameComponents, or nil if the current user. (Read-only, value type NSPersonNameComponents) - late final ffi.Pointer - _NSURLUbiquitousSharedItemOwnerNameComponentsKey = - _lookup( - 'NSURLUbiquitousSharedItemOwnerNameComponentsKey'); +const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; - NSURLResourceKey get NSURLUbiquitousSharedItemOwnerNameComponentsKey => - _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value; +const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; - set NSURLUbiquitousSharedItemOwnerNameComponentsKey(NSURLResourceKey value) => - _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value = value; +const int TLS_ECDH_anon_WITH_NULL_SHA = -16363; - /// returns a NSPersonNameComponents for the most recent editor of the document, or nil if it is the current user. (Read-only, value type NSPersonNameComponents) - late final ffi.Pointer - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey = - _lookup( - 'NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey'); +const int TLS_ECDH_anon_WITH_RC4_128_SHA = -16362; - NSURLResourceKey - get NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey => - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value; +const int TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = -16361; - set NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey( - NSURLResourceKey value) => - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value = value; +const int TLS_ECDH_anon_WITH_AES_128_CBC_SHA = -16360; - /// this item has not been downloaded yet. Use startDownloadingUbiquitousItemAtURL:error: to download it. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusNotDownloaded = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusNotDownloaded'); +const int TLS_ECDH_anon_WITH_AES_256_CBC_SHA = -16359; - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusNotDownloaded => - _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value; +const int TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = -16331; - set NSURLUbiquitousItemDownloadingStatusNotDownloaded( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; +const int TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = -16330; - /// there is a local version of this item available. The most current version will get downloaded as soon as possible. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusDownloaded = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusDownloaded'); +const int TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = -13141; - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusDownloaded => - _NSURLUbiquitousItemDownloadingStatusDownloaded.value; +const int TLS_NULL_WITH_NULL_NULL = 0; - set NSURLUbiquitousItemDownloadingStatusDownloaded( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusDownloaded.value = value; +const int TLS_RSA_WITH_NULL_MD5 = 1; - /// there is a local version of this item and it is the most up-to-date version known to this device. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusCurrent = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusCurrent'); +const int TLS_RSA_WITH_NULL_SHA = 2; - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusCurrent => - _NSURLUbiquitousItemDownloadingStatusCurrent.value; +const int TLS_RSA_WITH_RC4_128_MD5 = 4; - set NSURLUbiquitousItemDownloadingStatusCurrent( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusCurrent.value = value; +const int TLS_RSA_WITH_RC4_128_SHA = 5; - /// the current user is the owner of this shared item. - late final ffi.Pointer - _NSURLUbiquitousSharedItemRoleOwner = - _lookup( - 'NSURLUbiquitousSharedItemRoleOwner'); +const int TLS_RSA_WITH_3DES_EDE_CBC_SHA = 10; - NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleOwner => - _NSURLUbiquitousSharedItemRoleOwner.value; +const int TLS_RSA_WITH_NULL_SHA256 = 59; - set NSURLUbiquitousSharedItemRoleOwner(NSURLUbiquitousSharedItemRole value) => - _NSURLUbiquitousSharedItemRoleOwner.value = value; +const int TLS_RSA_WITH_AES_128_CBC_SHA256 = 60; - /// the current user is a participant of this shared item. - late final ffi.Pointer - _NSURLUbiquitousSharedItemRoleParticipant = - _lookup( - 'NSURLUbiquitousSharedItemRoleParticipant'); +const int TLS_RSA_WITH_AES_256_CBC_SHA256 = 61; - NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleParticipant => - _NSURLUbiquitousSharedItemRoleParticipant.value; +const int TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; - set NSURLUbiquitousSharedItemRoleParticipant( - NSURLUbiquitousSharedItemRole value) => - _NSURLUbiquitousSharedItemRoleParticipant.value = value; +const int TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; - /// the current user is only allowed to read this item - late final ffi.Pointer - _NSURLUbiquitousSharedItemPermissionsReadOnly = - _lookup( - 'NSURLUbiquitousSharedItemPermissionsReadOnly'); +const int TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; - NSURLUbiquitousSharedItemPermissions - get NSURLUbiquitousSharedItemPermissionsReadOnly => - _NSURLUbiquitousSharedItemPermissionsReadOnly.value; +const int TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; - set NSURLUbiquitousSharedItemPermissionsReadOnly( - NSURLUbiquitousSharedItemPermissions value) => - _NSURLUbiquitousSharedItemPermissionsReadOnly.value = value; +const int TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 62; - /// the current user is allowed to both read and write this item - late final ffi.Pointer - _NSURLUbiquitousSharedItemPermissionsReadWrite = - _lookup( - 'NSURLUbiquitousSharedItemPermissionsReadWrite'); +const int TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 63; - NSURLUbiquitousSharedItemPermissions - get NSURLUbiquitousSharedItemPermissionsReadWrite => - _NSURLUbiquitousSharedItemPermissionsReadWrite.value; +const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 64; - set NSURLUbiquitousSharedItemPermissionsReadWrite( - NSURLUbiquitousSharedItemPermissions value) => - _NSURLUbiquitousSharedItemPermissionsReadWrite.value = value; +const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 103; - late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); - late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); - instancetype _objc_msgSend_314( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer value, - ) { - return __objc_msgSend_314( - obj, - sel, - name, - value, - ); - } +const int TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 104; - late final __objc_msgSend_314Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); +const int TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 105; - late final _sel_queryItemWithName_value_1 = - _registerName1("queryItemWithName:value:"); - late final _sel_value1 = _registerName1("value"); - late final _class_NSURLComponents1 = _getClass1("NSURLComponents"); - late final _sel_initWithURL_resolvingAgainstBaseURL_1 = - _registerName1("initWithURL:resolvingAgainstBaseURL:"); - late final _sel_componentsWithURL_resolvingAgainstBaseURL_1 = - _registerName1("componentsWithURL:resolvingAgainstBaseURL:"); - late final _sel_componentsWithString_1 = - _registerName1("componentsWithString:"); - late final _sel_URLRelativeToURL_1 = _registerName1("URLRelativeToURL:"); - ffi.Pointer _objc_msgSend_315( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_315( - obj, - sel, - baseURL, - ); - } +const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 106; - late final __objc_msgSend_315Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); +const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 107; - late final _sel_setScheme_1 = _registerName1("setScheme:"); - late final _sel_setUser_1 = _registerName1("setUser:"); - late final _sel_setPassword_1 = _registerName1("setPassword:"); - late final _sel_setHost_1 = _registerName1("setHost:"); - late final _sel_setPort_1 = _registerName1("setPort:"); - late final _sel_setPath_1 = _registerName1("setPath:"); - late final _sel_setQuery_1 = _registerName1("setQuery:"); - late final _sel_setFragment_1 = _registerName1("setFragment:"); - late final _sel_percentEncodedUser1 = _registerName1("percentEncodedUser"); - late final _sel_setPercentEncodedUser_1 = - _registerName1("setPercentEncodedUser:"); - late final _sel_percentEncodedPassword1 = - _registerName1("percentEncodedPassword"); - late final _sel_setPercentEncodedPassword_1 = - _registerName1("setPercentEncodedPassword:"); - late final _sel_percentEncodedHost1 = _registerName1("percentEncodedHost"); - late final _sel_setPercentEncodedHost_1 = - _registerName1("setPercentEncodedHost:"); - late final _sel_percentEncodedPath1 = _registerName1("percentEncodedPath"); - late final _sel_setPercentEncodedPath_1 = - _registerName1("setPercentEncodedPath:"); - late final _sel_percentEncodedQuery1 = _registerName1("percentEncodedQuery"); - late final _sel_setPercentEncodedQuery_1 = - _registerName1("setPercentEncodedQuery:"); - late final _sel_percentEncodedFragment1 = - _registerName1("percentEncodedFragment"); - late final _sel_setPercentEncodedFragment_1 = - _registerName1("setPercentEncodedFragment:"); - late final _sel_rangeOfScheme1 = _registerName1("rangeOfScheme"); - NSRange _objc_msgSend_316( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_316( - obj, - sel, - ); - } +const int TLS_DH_anon_WITH_RC4_128_MD5 = 24; - late final __objc_msgSend_316Ptr = _lookup< - ffi.NativeFunction< - NSRange Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer)>(); +const int TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; - late final _sel_rangeOfUser1 = _registerName1("rangeOfUser"); - late final _sel_rangeOfPassword1 = _registerName1("rangeOfPassword"); - late final _sel_rangeOfHost1 = _registerName1("rangeOfHost"); - late final _sel_rangeOfPort1 = _registerName1("rangeOfPort"); - late final _sel_rangeOfPath1 = _registerName1("rangeOfPath"); - late final _sel_rangeOfQuery1 = _registerName1("rangeOfQuery"); - late final _sel_rangeOfFragment1 = _registerName1("rangeOfFragment"); - late final _sel_queryItems1 = _registerName1("queryItems"); - late final _sel_setQueryItems_1 = _registerName1("setQueryItems:"); - late final _sel_percentEncodedQueryItems1 = - _registerName1("percentEncodedQueryItems"); - late final _sel_setPercentEncodedQueryItems_1 = - _registerName1("setPercentEncodedQueryItems:"); - late final _class_NSFileSecurity1 = _getClass1("NSFileSecurity"); +const int TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 108; - /// How much time is probably left in the operation, as an NSNumber containing a number of seconds. - late final ffi.Pointer - _NSProgressEstimatedTimeRemainingKey = - _lookup('NSProgressEstimatedTimeRemainingKey'); +const int TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 109; - NSProgressUserInfoKey1 get NSProgressEstimatedTimeRemainingKey => - _NSProgressEstimatedTimeRemainingKey.value; +const int TLS_PSK_WITH_RC4_128_SHA = 138; - set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey1 value) => - _NSProgressEstimatedTimeRemainingKey.value = value; +const int TLS_PSK_WITH_3DES_EDE_CBC_SHA = 139; - /// How fast data is being processed, as an NSNumber containing bytes per second. - late final ffi.Pointer _NSProgressThroughputKey = - _lookup('NSProgressThroughputKey'); +const int TLS_PSK_WITH_AES_128_CBC_SHA = 140; - NSProgressUserInfoKey1 get NSProgressThroughputKey => - _NSProgressThroughputKey.value; +const int TLS_PSK_WITH_AES_256_CBC_SHA = 141; - set NSProgressThroughputKey(NSProgressUserInfoKey1 value) => - _NSProgressThroughputKey.value = value; +const int TLS_DHE_PSK_WITH_RC4_128_SHA = 142; - /// The value for the kind property that indicates that the work being done is one of the kind of file operations listed below. NSProgress of this kind is assumed to use bytes as the unit of work being done and the default implementation of -localizedDescription takes advantage of that to return more specific text than it could otherwise. The NSProgressFileTotalCountKey and NSProgressFileCompletedCountKey keys in the userInfo dictionary are used for the overall count of files. - late final ffi.Pointer _NSProgressKindFile = - _lookup('NSProgressKindFile'); +const int TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = 143; - NSProgressKind1 get NSProgressKindFile => _NSProgressKindFile.value; +const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA = 144; - set NSProgressKindFile(NSProgressKind1 value) => - _NSProgressKindFile.value = value; +const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA = 145; - /// A user info dictionary key, for an entry that is required when the value for the kind property is NSProgressKindFile. The value must be one of the strings listed in the next section. The default implementations of of -localizedDescription and -localizedItemDescription use this value to determine the text that they return. - late final ffi.Pointer - _NSProgressFileOperationKindKey = - _lookup('NSProgressFileOperationKindKey'); +const int TLS_RSA_PSK_WITH_RC4_128_SHA = 146; - NSProgressUserInfoKey1 get NSProgressFileOperationKindKey => - _NSProgressFileOperationKindKey.value; +const int TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = 147; - set NSProgressFileOperationKindKey(NSProgressUserInfoKey1 value) => - _NSProgressFileOperationKindKey.value = value; +const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA = 148; - /// Possible values for NSProgressFileOperationKindKey entries. - late final ffi.Pointer - _NSProgressFileOperationKindDownloading = - _lookup( - 'NSProgressFileOperationKindDownloading'); +const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA = 149; - NSProgressFileOperationKind1 get NSProgressFileOperationKindDownloading => - _NSProgressFileOperationKindDownloading.value; +const int TLS_PSK_WITH_NULL_SHA = 44; - set NSProgressFileOperationKindDownloading( - NSProgressFileOperationKind1 value) => - _NSProgressFileOperationKindDownloading.value = value; +const int TLS_DHE_PSK_WITH_NULL_SHA = 45; - late final ffi.Pointer - _NSProgressFileOperationKindDecompressingAfterDownloading = - _lookup( - 'NSProgressFileOperationKindDecompressingAfterDownloading'); +const int TLS_RSA_PSK_WITH_NULL_SHA = 46; - NSProgressFileOperationKind1 - get NSProgressFileOperationKindDecompressingAfterDownloading => - _NSProgressFileOperationKindDecompressingAfterDownloading.value; +const int TLS_RSA_WITH_AES_128_GCM_SHA256 = 156; - set NSProgressFileOperationKindDecompressingAfterDownloading( - NSProgressFileOperationKind1 value) => - _NSProgressFileOperationKindDecompressingAfterDownloading.value = value; +const int TLS_RSA_WITH_AES_256_GCM_SHA384 = 157; - late final ffi.Pointer - _NSProgressFileOperationKindReceiving = - _lookup( - 'NSProgressFileOperationKindReceiving'); +const int TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 158; - NSProgressFileOperationKind1 get NSProgressFileOperationKindReceiving => - _NSProgressFileOperationKindReceiving.value; +const int TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 159; - set NSProgressFileOperationKindReceiving( - NSProgressFileOperationKind1 value) => - _NSProgressFileOperationKindReceiving.value = value; +const int TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = 160; - late final ffi.Pointer - _NSProgressFileOperationKindCopying = - _lookup( - 'NSProgressFileOperationKindCopying'); +const int TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = 161; - NSProgressFileOperationKind1 get NSProgressFileOperationKindCopying => - _NSProgressFileOperationKindCopying.value; +const int TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = 162; - set NSProgressFileOperationKindCopying(NSProgressFileOperationKind1 value) => - _NSProgressFileOperationKindCopying.value = value; +const int TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = 163; - late final ffi.Pointer - _NSProgressFileOperationKindUploading = - _lookup( - 'NSProgressFileOperationKindUploading'); +const int TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = 164; - NSProgressFileOperationKind1 get NSProgressFileOperationKindUploading => - _NSProgressFileOperationKindUploading.value; +const int TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = 165; - set NSProgressFileOperationKindUploading( - NSProgressFileOperationKind1 value) => - _NSProgressFileOperationKindUploading.value = value; +const int TLS_DH_anon_WITH_AES_128_GCM_SHA256 = 166; - /// A user info dictionary key. The value must be an NSURL identifying the item on which progress is being made. This is required for any NSProgress that is published using -publish to be reported to subscribers registered with +addSubscriberForFileURL:withPublishingHandler:. - late final ffi.Pointer _NSProgressFileURLKey = - _lookup('NSProgressFileURLKey'); +const int TLS_DH_anon_WITH_AES_256_GCM_SHA384 = 167; - NSProgressUserInfoKey1 get NSProgressFileURLKey => - _NSProgressFileURLKey.value; +const int TLS_PSK_WITH_AES_128_GCM_SHA256 = 168; - set NSProgressFileURLKey(NSProgressUserInfoKey1 value) => - _NSProgressFileURLKey.value = value; +const int TLS_PSK_WITH_AES_256_GCM_SHA384 = 169; - /// User info dictionary keys. The values must be NSNumbers containing integers. These entries are optional but if they are both present then the default implementation of -localizedAdditionalDescription uses them to determine the text that it returns. - late final ffi.Pointer _NSProgressFileTotalCountKey = - _lookup('NSProgressFileTotalCountKey'); +const int TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 170; - NSProgressUserInfoKey1 get NSProgressFileTotalCountKey => - _NSProgressFileTotalCountKey.value; +const int TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 171; - set NSProgressFileTotalCountKey(NSProgressUserInfoKey1 value) => - _NSProgressFileTotalCountKey.value = value; +const int TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = 172; - late final ffi.Pointer - _NSProgressFileCompletedCountKey = - _lookup('NSProgressFileCompletedCountKey'); +const int TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = 173; - NSProgressUserInfoKey1 get NSProgressFileCompletedCountKey => - _NSProgressFileCompletedCountKey.value; +const int TLS_PSK_WITH_AES_128_CBC_SHA256 = 174; - set NSProgressFileCompletedCountKey(NSProgressUserInfoKey1 value) => - _NSProgressFileCompletedCountKey.value = value; +const int TLS_PSK_WITH_AES_256_CBC_SHA384 = 175; - /// User info dictionary keys. The value for the first entry must be an NSImage, typically an icon. The value for the second entry must be an NSValue containing an NSRect, in screen coordinates, locating the image where it initially appears on the screen. - late final ffi.Pointer - _NSProgressFileAnimationImageKey = - _lookup('NSProgressFileAnimationImageKey'); +const int TLS_PSK_WITH_NULL_SHA256 = 176; - NSProgressUserInfoKey1 get NSProgressFileAnimationImageKey => - _NSProgressFileAnimationImageKey.value; +const int TLS_PSK_WITH_NULL_SHA384 = 177; - set NSProgressFileAnimationImageKey(NSProgressUserInfoKey1 value) => - _NSProgressFileAnimationImageKey.value = value; +const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = 178; - late final ffi.Pointer - _NSProgressFileAnimationImageOriginalRectKey = - _lookup( - 'NSProgressFileAnimationImageOriginalRectKey'); +const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = 179; - NSProgressUserInfoKey1 get NSProgressFileAnimationImageOriginalRectKey => - _NSProgressFileAnimationImageOriginalRectKey.value; +const int TLS_DHE_PSK_WITH_NULL_SHA256 = 180; - set NSProgressFileAnimationImageOriginalRectKey( - NSProgressUserInfoKey1 value) => - _NSProgressFileAnimationImageOriginalRectKey.value = value; +const int TLS_DHE_PSK_WITH_NULL_SHA384 = 181; - /// A user info dictionary key. The value must be an NSImage containing an icon. This entry is optional but, if it is present, the Finder will use it to show the icon of a file while progress is being made on that file. For example, the App Store uses this to specify an icon for an application being downloaded before the icon can be gotten from the application bundle itself. - late final ffi.Pointer _NSProgressFileIconKey = - _lookup('NSProgressFileIconKey'); +const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = 182; - NSProgressUserInfoKey1 get NSProgressFileIconKey => - _NSProgressFileIconKey.value; +const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = 183; - set NSProgressFileIconKey(NSProgressUserInfoKey1 value) => - _NSProgressFileIconKey.value = value; +const int TLS_RSA_PSK_WITH_NULL_SHA256 = 184; - late final _class_NSHTTPURLResponse1 = _getClass1("NSHTTPURLResponse"); - late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_1 = - _registerName1("initWithURL:statusCode:HTTPVersion:headerFields:"); - instancetype _objc_msgSend_317( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int statusCode, - ffi.Pointer HTTPVersion, - ffi.Pointer headerFields, - ) { - return __objc_msgSend_317( - obj, - sel, - url, - statusCode, - HTTPVersion, - headerFields, - ); - } +const int TLS_RSA_PSK_WITH_NULL_SHA384 = 185; - late final __objc_msgSend_317Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer)>(); +const int TLS_AES_128_GCM_SHA256 = 4865; - late final _sel_statusCode1 = _registerName1("statusCode"); - late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); - late final _sel_localizedStringForStatusCode_1 = - _registerName1("localizedStringForStatusCode:"); - ffi.Pointer _objc_msgSend_318( - ffi.Pointer obj, - ffi.Pointer sel, - int statusCode, - ) { - return __objc_msgSend_318( - obj, - sel, - statusCode, - ); - } +const int TLS_AES_256_GCM_SHA384 = 4866; - late final __objc_msgSend_318Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); +const int TLS_CHACHA20_POLY1305_SHA256 = 4867; - /// ! - /// @const NSHTTPCookieManagerAcceptPolicyChangedNotification - /// @discussion Name of notification that should be posted to the - /// distributed notification center whenever the accept cookies - /// preference is changed - late final ffi.Pointer - _NSHTTPCookieManagerAcceptPolicyChangedNotification = - _lookup( - 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); +const int TLS_AES_128_CCM_SHA256 = 4868; - NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; +const int TLS_AES_128_CCM_8_SHA256 = 4869; - set NSHTTPCookieManagerAcceptPolicyChangedNotification( - NSNotificationName value) => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; +const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; - /// ! - /// @const NSHTTPCookieManagerCookiesChangedNotification - /// @abstract Notification sent when the set of cookies changes - late final ffi.Pointer - _NSHTTPCookieManagerCookiesChangedNotification = - _lookup( - 'NSHTTPCookieManagerCookiesChangedNotification'); +const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; - NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => - _NSHTTPCookieManagerCookiesChangedNotification.value; +const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = -16347; - set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => - _NSHTTPCookieManagerCookiesChangedNotification.value = value; +const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = -16346; - late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); - late final _sel_blockOperationWithBlock_1 = - _registerName1("blockOperationWithBlock:"); - instancetype _objc_msgSend_319( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_319( - obj, - sel, - block, - ); - } +const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; - late final __objc_msgSend_319Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); +const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; - late final _sel_addExecutionBlock_1 = _registerName1("addExecutionBlock:"); - late final _sel_executionBlocks1 = _registerName1("executionBlocks"); - late final _class_NSInvocationOperation1 = - _getClass1("NSInvocationOperation"); - late final _sel_initWithTarget_selector_object_1 = - _registerName1("initWithTarget:selector:object:"); - instancetype _objc_msgSend_320( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer sel1, - ffi.Pointer arg, - ) { - return __objc_msgSend_320( - obj, - sel, - target, - sel1, - arg, - ); - } +const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = -16343; - late final __objc_msgSend_320Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); +const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = -16342; - late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); - instancetype _objc_msgSend_321( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer inv, - ) { - return __objc_msgSend_321( - obj, - sel, - inv, - ); - } +const int TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; - late final __objc_msgSend_321Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); +const int TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; - late final _sel_invocation1 = _registerName1("invocation"); - ffi.Pointer _objc_msgSend_322( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_322( - obj, - sel, - ); - } +const int TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = -16339; - late final __objc_msgSend_322Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); +const int TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = -16338; - late final _sel_result1 = _registerName1("result"); - late final ffi.Pointer - _NSInvocationOperationVoidResultException = - _lookup('NSInvocationOperationVoidResultException'); +const int TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; - NSExceptionName get NSInvocationOperationVoidResultException => - _NSInvocationOperationVoidResultException.value; +const int TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; - set NSInvocationOperationVoidResultException(NSExceptionName value) => - _NSInvocationOperationVoidResultException.value = value; +const int TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = -16335; - late final ffi.Pointer - _NSInvocationOperationCancelledException = - _lookup('NSInvocationOperationCancelledException'); +const int TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = -16334; - NSExceptionName get NSInvocationOperationCancelledException => - _NSInvocationOperationCancelledException.value; +const int TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = -13144; - set NSInvocationOperationCancelledException(NSExceptionName value) => - _NSInvocationOperationCancelledException.value = value; +const int TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = -13143; - late final ffi.Pointer - _NSOperationQueueDefaultMaxConcurrentOperationCount = - _lookup('NSOperationQueueDefaultMaxConcurrentOperationCount'); +const int TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 255; - int get NSOperationQueueDefaultMaxConcurrentOperationCount => - _NSOperationQueueDefaultMaxConcurrentOperationCount.value; +const int SSL_RSA_WITH_RC2_CBC_MD5 = -128; - set NSOperationQueueDefaultMaxConcurrentOperationCount(int value) => - _NSOperationQueueDefaultMaxConcurrentOperationCount.value = value; +const int SSL_RSA_WITH_IDEA_CBC_MD5 = -127; - /// Predefined domain for errors from most AppKit and Foundation APIs. - late final ffi.Pointer _NSCocoaErrorDomain = - _lookup('NSCocoaErrorDomain'); +const int SSL_RSA_WITH_DES_CBC_MD5 = -126; - NSErrorDomain get NSCocoaErrorDomain => _NSCocoaErrorDomain.value; +const int SSL_RSA_WITH_3DES_EDE_CBC_MD5 = -125; - set NSCocoaErrorDomain(NSErrorDomain value) => - _NSCocoaErrorDomain.value = value; +const int SSL_NO_SUCH_CIPHERSUITE = -1; - /// Other predefined domains; value of "code" will correspond to preexisting values in these domains. - late final ffi.Pointer _NSPOSIXErrorDomain = - _lookup('NSPOSIXErrorDomain'); +const int NSASCIIStringEncoding = 1; - NSErrorDomain get NSPOSIXErrorDomain => _NSPOSIXErrorDomain.value; +const int NSNEXTSTEPStringEncoding = 2; - set NSPOSIXErrorDomain(NSErrorDomain value) => - _NSPOSIXErrorDomain.value = value; +const int NSJapaneseEUCStringEncoding = 3; - late final ffi.Pointer _NSOSStatusErrorDomain = - _lookup('NSOSStatusErrorDomain'); +const int NSUTF8StringEncoding = 4; - NSErrorDomain get NSOSStatusErrorDomain => _NSOSStatusErrorDomain.value; +const int NSISOLatin1StringEncoding = 5; - set NSOSStatusErrorDomain(NSErrorDomain value) => - _NSOSStatusErrorDomain.value = value; +const int NSSymbolStringEncoding = 6; - late final ffi.Pointer _NSMachErrorDomain = - _lookup('NSMachErrorDomain'); +const int NSNonLossyASCIIStringEncoding = 7; - NSErrorDomain get NSMachErrorDomain => _NSMachErrorDomain.value; +const int NSShiftJISStringEncoding = 8; - set NSMachErrorDomain(NSErrorDomain value) => - _NSMachErrorDomain.value = value; +const int NSISOLatin2StringEncoding = 9; - /// Key in userInfo. A recommended standard way to embed NSErrors from underlying calls. The value of this key should be an NSError. - late final ffi.Pointer _NSUnderlyingErrorKey = - _lookup('NSUnderlyingErrorKey'); +const int NSUnicodeStringEncoding = 10; - NSErrorUserInfoKey get NSUnderlyingErrorKey => _NSUnderlyingErrorKey.value; +const int NSWindowsCP1251StringEncoding = 11; - set NSUnderlyingErrorKey(NSErrorUserInfoKey value) => - _NSUnderlyingErrorKey.value = value; +const int NSWindowsCP1252StringEncoding = 12; - /// Key in userInfo. A recommended standard way to embed a list of several NSErrors from underlying calls. The value of this key should be an NSArray of NSError. This value is independent from the value of `NSUnderlyingErrorKey` - neither, one, or both may be set. - late final ffi.Pointer _NSMultipleUnderlyingErrorsKey = - _lookup('NSMultipleUnderlyingErrorsKey'); +const int NSWindowsCP1253StringEncoding = 13; - NSErrorUserInfoKey get NSMultipleUnderlyingErrorsKey => - _NSMultipleUnderlyingErrorsKey.value; +const int NSWindowsCP1254StringEncoding = 14; - set NSMultipleUnderlyingErrorsKey(NSErrorUserInfoKey value) => - _NSMultipleUnderlyingErrorsKey.value = value; +const int NSWindowsCP1250StringEncoding = 15; - /// NSString, a complete sentence (or more) describing ideally both what failed and why it failed. - late final ffi.Pointer _NSLocalizedDescriptionKey = - _lookup('NSLocalizedDescriptionKey'); +const int NSISO2022JPStringEncoding = 21; - NSErrorUserInfoKey get NSLocalizedDescriptionKey => - _NSLocalizedDescriptionKey.value; +const int NSMacOSRomanStringEncoding = 30; - set NSLocalizedDescriptionKey(NSErrorUserInfoKey value) => - _NSLocalizedDescriptionKey.value = value; +const int NSUTF16StringEncoding = 10; - /// NSString, a complete sentence (or more) describing why the operation failed. - late final ffi.Pointer _NSLocalizedFailureReasonErrorKey = - _lookup('NSLocalizedFailureReasonErrorKey'); +const int NSUTF16BigEndianStringEncoding = 2415919360; - NSErrorUserInfoKey get NSLocalizedFailureReasonErrorKey => - _NSLocalizedFailureReasonErrorKey.value; +const int NSUTF16LittleEndianStringEncoding = 2483028224; - set NSLocalizedFailureReasonErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedFailureReasonErrorKey.value = value; +const int NSUTF32StringEncoding = 2348810496; - /// NSString, a complete sentence (or more) describing what the user can do to fix the problem. - late final ffi.Pointer - _NSLocalizedRecoverySuggestionErrorKey = - _lookup('NSLocalizedRecoverySuggestionErrorKey'); +const int NSUTF32BigEndianStringEncoding = 2550137088; - NSErrorUserInfoKey get NSLocalizedRecoverySuggestionErrorKey => - _NSLocalizedRecoverySuggestionErrorKey.value; +const int NSUTF32LittleEndianStringEncoding = 2617245952; - set NSLocalizedRecoverySuggestionErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedRecoverySuggestionErrorKey.value = value; +const int NSProprietaryStringEncoding = 65536; - /// NSArray of NSStrings corresponding to button titles. - late final ffi.Pointer - _NSLocalizedRecoveryOptionsErrorKey = - _lookup('NSLocalizedRecoveryOptionsErrorKey'); +const int NSOpenStepUnicodeReservedBase = 62464; - NSErrorUserInfoKey get NSLocalizedRecoveryOptionsErrorKey => - _NSLocalizedRecoveryOptionsErrorKey.value; +const int kNativeArgNumberPos = 0; - set NSLocalizedRecoveryOptionsErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedRecoveryOptionsErrorKey.value = value; +const int kNativeArgNumberSize = 8; - /// Instance of a subclass of NSObject that conforms to the NSErrorRecoveryAttempting informal protocol - late final ffi.Pointer _NSRecoveryAttempterErrorKey = - _lookup('NSRecoveryAttempterErrorKey'); +const int kNativeArgTypePos = 8; - NSErrorUserInfoKey get NSRecoveryAttempterErrorKey => - _NSRecoveryAttempterErrorKey.value; +const int kNativeArgTypeSize = 8; - set NSRecoveryAttempterErrorKey(NSErrorUserInfoKey value) => - _NSRecoveryAttempterErrorKey.value = value; +const int DYNAMIC_TARGETS_ENABLED = 0; - /// NSString containing a help anchor - late final ffi.Pointer _NSHelpAnchorErrorKey = - _lookup('NSHelpAnchorErrorKey'); +const int TARGET_OS_MAC = 1; - NSErrorUserInfoKey get NSHelpAnchorErrorKey => _NSHelpAnchorErrorKey.value; +const int TARGET_OS_WIN32 = 0; - set NSHelpAnchorErrorKey(NSErrorUserInfoKey value) => - _NSHelpAnchorErrorKey.value = value; +const int TARGET_OS_WINDOWS = 0; - /// NSString. This provides a string which will be shown when constructing the debugDescription of the NSError, to be used when debugging or when formatting the error with %@. This string will never be used in localizedDescription, so will not be shown to the user. - late final ffi.Pointer _NSDebugDescriptionErrorKey = - _lookup('NSDebugDescriptionErrorKey'); +const int TARGET_OS_UNIX = 0; - NSErrorUserInfoKey get NSDebugDescriptionErrorKey => - _NSDebugDescriptionErrorKey.value; +const int TARGET_OS_LINUX = 0; - set NSDebugDescriptionErrorKey(NSErrorUserInfoKey value) => - _NSDebugDescriptionErrorKey.value = value; +const int TARGET_OS_OSX = 1; - /// NSString, a complete sentence (or more) describing what failed. Setting a value for this key in userInfo dictionary of errors received from framework APIs is a good way to customize and fine tune the localizedDescription of an NSError. As an example, for Foundation error code NSFileWriteOutOfSpaceError, setting the value of this key to "The image library could not be saved." will allow the localizedDescription of the error to come out as "The image library could not be saved. The volume Macintosh HD is out of space." rather than the default (say) “You can't save the file ImgDatabaseV2 because the volume Macintosh HD is out of space." - late final ffi.Pointer _NSLocalizedFailureErrorKey = - _lookup('NSLocalizedFailureErrorKey'); +const int TARGET_OS_IPHONE = 0; - NSErrorUserInfoKey get NSLocalizedFailureErrorKey => - _NSLocalizedFailureErrorKey.value; +const int TARGET_OS_IOS = 0; - set NSLocalizedFailureErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedFailureErrorKey.value = value; +const int TARGET_OS_WATCH = 0; - /// NSNumber containing NSStringEncoding - late final ffi.Pointer _NSStringEncodingErrorKey = - _lookup('NSStringEncodingErrorKey'); +const int TARGET_OS_TV = 0; - NSErrorUserInfoKey get NSStringEncodingErrorKey => - _NSStringEncodingErrorKey.value; +const int TARGET_OS_MACCATALYST = 0; - set NSStringEncodingErrorKey(NSErrorUserInfoKey value) => - _NSStringEncodingErrorKey.value = value; +const int TARGET_OS_UIKITFORMAC = 0; - /// NSURL - late final ffi.Pointer _NSURLErrorKey = - _lookup('NSURLErrorKey'); +const int TARGET_OS_SIMULATOR = 0; - NSErrorUserInfoKey get NSURLErrorKey => _NSURLErrorKey.value; +const int TARGET_OS_EMBEDDED = 0; - set NSURLErrorKey(NSErrorUserInfoKey value) => _NSURLErrorKey.value = value; +const int TARGET_OS_RTKIT = 0; - /// NSString - late final ffi.Pointer _NSFilePathErrorKey = - _lookup('NSFilePathErrorKey'); +const int TARGET_OS_DRIVERKIT = 0; - NSErrorUserInfoKey get NSFilePathErrorKey => _NSFilePathErrorKey.value; +const int TARGET_IPHONE_SIMULATOR = 0; - set NSFilePathErrorKey(NSErrorUserInfoKey value) => - _NSFilePathErrorKey.value = value; +const int TARGET_OS_NANO = 0; - /// Is this an error handle? - /// - /// Requires there to be a current isolate. - bool Dart_IsError( - Object handle, - ) { - return _Dart_IsError( - handle, - ); - } +const int TARGET_ABI_USES_IOS_VALUES = 1; - late final _Dart_IsErrorPtr = - _lookup>( - 'Dart_IsError'); - late final _Dart_IsError = - _Dart_IsErrorPtr.asFunction(); +const int TARGET_CPU_PPC = 0; - /// Is this an api error handle? - /// - /// Api error handles are produced when an api function is misused. - /// This happens when a Dart embedding api function is called with - /// invalid arguments or in an invalid context. - /// - /// Requires there to be a current isolate. - bool Dart_IsApiError( - Object handle, - ) { - return _Dart_IsApiError( - handle, - ); - } +const int TARGET_CPU_PPC64 = 0; - late final _Dart_IsApiErrorPtr = - _lookup>( - 'Dart_IsApiError'); - late final _Dart_IsApiError = - _Dart_IsApiErrorPtr.asFunction(); +const int TARGET_CPU_68K = 0; - /// Is this an unhandled exception error handle? - /// - /// Unhandled exception error handles are produced when, during the - /// execution of Dart code, an exception is thrown but not caught. - /// This can occur in any function which triggers the execution of Dart - /// code. - /// - /// See Dart_ErrorGetException and Dart_ErrorGetStackTrace. - /// - /// Requires there to be a current isolate. - bool Dart_IsUnhandledExceptionError( - Object handle, - ) { - return _Dart_IsUnhandledExceptionError( - handle, - ); - } +const int TARGET_CPU_X86 = 0; - late final _Dart_IsUnhandledExceptionErrorPtr = - _lookup>( - 'Dart_IsUnhandledExceptionError'); - late final _Dart_IsUnhandledExceptionError = - _Dart_IsUnhandledExceptionErrorPtr.asFunction(); +const int TARGET_CPU_X86_64 = 0; - /// Is this a compilation error handle? - /// - /// Compilation error handles are produced when, during the execution - /// of Dart code, a compile-time error occurs. This can occur in any - /// function which triggers the execution of Dart code. - /// - /// Requires there to be a current isolate. - bool Dart_IsCompilationError( - Object handle, - ) { - return _Dart_IsCompilationError( - handle, - ); - } +const int TARGET_CPU_ARM = 0; - late final _Dart_IsCompilationErrorPtr = - _lookup>( - 'Dart_IsCompilationError'); - late final _Dart_IsCompilationError = - _Dart_IsCompilationErrorPtr.asFunction(); +const int TARGET_CPU_ARM64 = 1; - /// Is this a fatal error handle? - /// - /// Fatal error handles are produced when the system wants to shut down - /// the current isolate. - /// - /// Requires there to be a current isolate. - bool Dart_IsFatalError( - Object handle, - ) { - return _Dart_IsFatalError( - handle, - ); - } +const int TARGET_CPU_MIPS = 0; - late final _Dart_IsFatalErrorPtr = - _lookup>( - 'Dart_IsFatalError'); - late final _Dart_IsFatalError = - _Dart_IsFatalErrorPtr.asFunction(); +const int TARGET_CPU_SPARC = 0; - /// Gets the error message from an error handle. - /// - /// Requires there to be a current isolate. - /// - /// \return A C string containing an error message if the handle is - /// error. An empty C string ("") if the handle is valid. This C - /// String is scope allocated and is only valid until the next call - /// to Dart_ExitScope. - ffi.Pointer Dart_GetError( - Object handle, - ) { - return _Dart_GetError( - handle, - ); - } +const int TARGET_CPU_ALPHA = 0; - late final _Dart_GetErrorPtr = - _lookup Function(ffi.Handle)>>( - 'Dart_GetError'); - late final _Dart_GetError = - _Dart_GetErrorPtr.asFunction Function(Object)>(); +const int TARGET_RT_MAC_CFM = 0; - /// Is this an error handle for an unhandled exception? - bool Dart_ErrorHasException( - Object handle, - ) { - return _Dart_ErrorHasException( - handle, - ); - } +const int TARGET_RT_MAC_MACHO = 1; - late final _Dart_ErrorHasExceptionPtr = - _lookup>( - 'Dart_ErrorHasException'); - late final _Dart_ErrorHasException = - _Dart_ErrorHasExceptionPtr.asFunction(); +const int TARGET_RT_LITTLE_ENDIAN = 1; - /// Gets the exception Object from an unhandled exception error handle. - Object Dart_ErrorGetException( - Object handle, - ) { - return _Dart_ErrorGetException( - handle, - ); - } +const int TARGET_RT_BIG_ENDIAN = 0; - late final _Dart_ErrorGetExceptionPtr = - _lookup>( - 'Dart_ErrorGetException'); - late final _Dart_ErrorGetException = - _Dart_ErrorGetExceptionPtr.asFunction(); +const int TARGET_RT_64_BIT = 1; - /// Gets the stack trace Object from an unhandled exception error handle. - Object Dart_ErrorGetStackTrace( - Object handle, - ) { - return _Dart_ErrorGetStackTrace( - handle, - ); - } +const int __DARWIN_ONLY_64_BIT_INO_T = 1; - late final _Dart_ErrorGetStackTracePtr = - _lookup>( - 'Dart_ErrorGetStackTrace'); - late final _Dart_ErrorGetStackTrace = - _Dart_ErrorGetStackTracePtr.asFunction(); +const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; - /// Produces an api error handle with the provided error message. - /// - /// Requires there to be a current isolate. - /// - /// \param error the error message. - Object Dart_NewApiError( - ffi.Pointer error, - ) { - return _Dart_NewApiError( - error, - ); - } +const int __DARWIN_ONLY_VERS_1050 = 1; - late final _Dart_NewApiErrorPtr = - _lookup)>>( - 'Dart_NewApiError'); - late final _Dart_NewApiError = - _Dart_NewApiErrorPtr.asFunction)>(); +const int __DARWIN_UNIX03 = 1; - Object Dart_NewCompilationError( - ffi.Pointer error, - ) { - return _Dart_NewCompilationError( - error, - ); - } +const int __DARWIN_64_BIT_INO_T = 1; - late final _Dart_NewCompilationErrorPtr = - _lookup)>>( - 'Dart_NewCompilationError'); - late final _Dart_NewCompilationError = _Dart_NewCompilationErrorPtr - .asFunction)>(); +const int __DARWIN_VERS_1050 = 1; - /// Produces a new unhandled exception error handle. - /// - /// Requires there to be a current isolate. - /// - /// \param exception An instance of a Dart object to be thrown or - /// an ApiError or CompilationError handle. - /// When an ApiError or CompilationError handle is passed in - /// a string object of the error message is created and it becomes - /// the Dart object to be thrown. - Object Dart_NewUnhandledExceptionError( - Object exception, - ) { - return _Dart_NewUnhandledExceptionError( - exception, - ); - } +const int __DARWIN_NON_CANCELABLE = 0; - late final _Dart_NewUnhandledExceptionErrorPtr = - _lookup>( - 'Dart_NewUnhandledExceptionError'); - late final _Dart_NewUnhandledExceptionError = - _Dart_NewUnhandledExceptionErrorPtr.asFunction(); +const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN'; - /// Propagates an error. - /// - /// If the provided handle is an unhandled exception error, this - /// function will cause the unhandled exception to be rethrown. This - /// will proceed in the standard way, walking up Dart frames until an - /// appropriate 'catch' block is found, executing 'finally' blocks, - /// etc. - /// - /// If the error is not an unhandled exception error, we will unwind - /// the stack to the next C frame. Intervening Dart frames will be - /// discarded; specifically, 'finally' blocks will not execute. This - /// is the standard way that compilation errors (and the like) are - /// handled by the Dart runtime. - /// - /// In either case, when an error is propagated any current scopes - /// created by Dart_EnterScope will be exited. - /// - /// See the additional discussion under "Propagating Errors" at the - /// beginning of this file. - /// - /// \param An error handle (See Dart_IsError) - /// - /// \return On success, this function does not return. On failure, the - /// process is terminated. - void Dart_PropagateError( - Object handle, - ) { - return _Dart_PropagateError( - handle, - ); - } +const int __DARWIN_C_ANSI = 4096; - late final _Dart_PropagateErrorPtr = - _lookup>( - 'Dart_PropagateError'); - late final _Dart_PropagateError = - _Dart_PropagateErrorPtr.asFunction(); +const int __DARWIN_C_FULL = 900000; - /// Converts an object to a string. - /// - /// May generate an unhandled exception error. - /// - /// \return The converted string if no error occurs during - /// the conversion. If an error does occur, an error handle is - /// returned. - Object Dart_ToString( - Object object, - ) { - return _Dart_ToString( - object, - ); - } +const int __DARWIN_C_LEVEL = 900000; - late final _Dart_ToStringPtr = - _lookup>( - 'Dart_ToString'); - late final _Dart_ToString = - _Dart_ToStringPtr.asFunction(); +const int __STDC_WANT_LIB_EXT1__ = 1; - /// Checks to see if two handles refer to identically equal objects. - /// - /// If both handles refer to instances, this is equivalent to using the top-level - /// function identical() from dart:core. Otherwise, returns whether the two - /// argument handles refer to the same object. - /// - /// \param obj1 An object to be compared. - /// \param obj2 An object to be compared. - /// - /// \return True if the objects are identically equal. False otherwise. - bool Dart_IdentityEquals( - Object obj1, - Object obj2, - ) { - return _Dart_IdentityEquals( - obj1, - obj2, - ); - } +const int __DARWIN_NO_LONG_LONG = 0; - late final _Dart_IdentityEqualsPtr = - _lookup>( - 'Dart_IdentityEquals'); - late final _Dart_IdentityEquals = - _Dart_IdentityEqualsPtr.asFunction(); +const int _DARWIN_FEATURE_64_BIT_INODE = 1; - /// Allocates a handle in the current scope from a persistent handle. - Object Dart_HandleFromPersistent( - Object object, - ) { - return _Dart_HandleFromPersistent( - object, - ); - } +const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1; - late final _Dart_HandleFromPersistentPtr = - _lookup>( - 'Dart_HandleFromPersistent'); - late final _Dart_HandleFromPersistent = - _Dart_HandleFromPersistentPtr.asFunction(); +const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1; - /// Allocates a handle in the current scope from a weak persistent handle. - /// - /// This will be a handle to Dart_Null if the object has been garbage collected. - Object Dart_HandleFromWeakPersistent( - Dart_WeakPersistentHandle object, - ) { - return _Dart_HandleFromWeakPersistent( - object, - ); - } +const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1; - late final _Dart_HandleFromWeakPersistentPtr = _lookup< - ffi.NativeFunction>( - 'Dart_HandleFromWeakPersistent'); - late final _Dart_HandleFromWeakPersistent = _Dart_HandleFromWeakPersistentPtr - .asFunction(); +const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3; - /// Allocates a persistent handle for an object. - /// - /// This handle has the lifetime of the current isolate unless it is - /// explicitly deallocated by calling Dart_DeletePersistentHandle. - /// - /// Requires there to be a current isolate. - Object Dart_NewPersistentHandle( - Object object, - ) { - return _Dart_NewPersistentHandle( - object, - ); - } +const int __has_ptrcheck = 0; - late final _Dart_NewPersistentHandlePtr = - _lookup>( - 'Dart_NewPersistentHandle'); - late final _Dart_NewPersistentHandle = - _Dart_NewPersistentHandlePtr.asFunction(); +const int __DARWIN_NULL = 0; - /// Assign value of local handle to a persistent handle. - /// - /// Requires there to be a current isolate. - /// - /// \param obj1 A persistent handle whose value needs to be set. - /// \param obj2 An object whose value needs to be set to the persistent handle. - /// - /// \return Success if the persistent handle was set - /// Otherwise, returns an error. - void Dart_SetPersistentHandle( - Object obj1, - Object obj2, - ) { - return _Dart_SetPersistentHandle( - obj1, - obj2, - ); - } +const int __PTHREAD_SIZE__ = 8176; - late final _Dart_SetPersistentHandlePtr = - _lookup>( - 'Dart_SetPersistentHandle'); - late final _Dart_SetPersistentHandle = - _Dart_SetPersistentHandlePtr.asFunction(); +const int __PTHREAD_ATTR_SIZE__ = 56; - /// Deallocates a persistent handle. - /// - /// Requires there to be a current isolate group. - void Dart_DeletePersistentHandle( - Object object, - ) { - return _Dart_DeletePersistentHandle( - object, - ); - } +const int __PTHREAD_MUTEXATTR_SIZE__ = 8; - late final _Dart_DeletePersistentHandlePtr = - _lookup>( - 'Dart_DeletePersistentHandle'); - late final _Dart_DeletePersistentHandle = - _Dart_DeletePersistentHandlePtr.asFunction(); +const int __PTHREAD_MUTEX_SIZE__ = 56; - /// Allocates a weak persistent handle for an object. - /// - /// This handle has the lifetime of the current isolate. The handle can also be - /// explicitly deallocated by calling Dart_DeleteWeakPersistentHandle. - /// - /// If the object becomes unreachable the callback is invoked with the peer as - /// argument. The callback can be executed on any thread, will have a current - /// isolate group, but will not have a current isolate. The callback can only - /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. This - /// gives the embedder the ability to cleanup data associated with the object. - /// The handle will point to the Dart_Null object after the finalizer has been - /// run. It is illegal to call into the VM with any other Dart_* functions from - /// the callback. If the handle is deleted before the object becomes - /// unreachable, the callback is never invoked. - /// - /// Requires there to be a current isolate. - /// - /// \param object An object with identity. - /// \param peer A pointer to a native object or NULL. This value is - /// provided to callback when it is invoked. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A function pointer that will be invoked sometime - /// after the object is garbage collected, unless the handle has been deleted. - /// A valid callback needs to be specified it cannot be NULL. - /// - /// \return The weak persistent handle or NULL. NULL is returned in case of bad - /// parameters. - Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle( - Object object, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewWeakPersistentHandle( - object, - peer, - external_allocation_size, - callback, - ); - } +const int __PTHREAD_CONDATTR_SIZE__ = 8; - late final _Dart_NewWeakPersistentHandlePtr = _lookup< - ffi.NativeFunction< - Dart_WeakPersistentHandle Function( - ffi.Handle, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewWeakPersistentHandle'); - late final _Dart_NewWeakPersistentHandle = - _Dart_NewWeakPersistentHandlePtr.asFunction< - Dart_WeakPersistentHandle Function( - Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); +const int __PTHREAD_COND_SIZE__ = 40; - /// Deletes the given weak persistent [object] handle. - /// - /// Requires there to be a current isolate group. - void Dart_DeleteWeakPersistentHandle( - Dart_WeakPersistentHandle object, - ) { - return _Dart_DeleteWeakPersistentHandle( - object, - ); - } +const int __PTHREAD_ONCE_SIZE__ = 8; - late final _Dart_DeleteWeakPersistentHandlePtr = - _lookup>( - 'Dart_DeleteWeakPersistentHandle'); - late final _Dart_DeleteWeakPersistentHandle = - _Dart_DeleteWeakPersistentHandlePtr.asFunction< - void Function(Dart_WeakPersistentHandle)>(); +const int __PTHREAD_RWLOCK_SIZE__ = 192; - /// Updates the external memory size for the given weak persistent handle. - /// - /// May trigger garbage collection. - void Dart_UpdateExternalSize( - Dart_WeakPersistentHandle object, - int external_allocation_size, - ) { - return _Dart_UpdateExternalSize( - object, - external_allocation_size, - ); - } +const int __PTHREAD_RWLOCKATTR_SIZE__ = 16; - late final _Dart_UpdateExternalSizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_WeakPersistentHandle, - ffi.IntPtr)>>('Dart_UpdateExternalSize'); - late final _Dart_UpdateExternalSize = _Dart_UpdateExternalSizePtr.asFunction< - void Function(Dart_WeakPersistentHandle, int)>(); +const int _QUAD_HIGHWORD = 1; - /// Allocates a finalizable handle for an object. - /// - /// This handle has the lifetime of the current isolate group unless the object - /// pointed to by the handle is garbage collected, in this case the VM - /// automatically deletes the handle after invoking the callback associated - /// with the handle. The handle can also be explicitly deallocated by - /// calling Dart_DeleteFinalizableHandle. - /// - /// If the object becomes unreachable the callback is invoked with the - /// the peer as argument. The callback can be executed on any thread, will have - /// an isolate group, but will not have a current isolate. The callback can only - /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. - /// This gives the embedder the ability to cleanup data associated with the - /// object and clear out any cached references to the handle. All references to - /// this handle after the callback will be invalid. It is illegal to call into - /// the VM with any other Dart_* functions from the callback. If the handle is - /// deleted before the object becomes unreachable, the callback is never - /// invoked. - /// - /// Requires there to be a current isolate. - /// - /// \param object An object with identity. - /// \param peer A pointer to a native object or NULL. This value is - /// provided to callback when it is invoked. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A function pointer that will be invoked sometime - /// after the object is garbage collected, unless the handle has been deleted. - /// A valid callback needs to be specified it cannot be NULL. - /// - /// \return The finalizable handle or NULL. NULL is returned in case of bad - /// parameters. - Dart_FinalizableHandle Dart_NewFinalizableHandle( - Object object, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewFinalizableHandle( - object, - peer, - external_allocation_size, - callback, - ); - } +const int _QUAD_LOWWORD = 0; - late final _Dart_NewFinalizableHandlePtr = _lookup< - ffi.NativeFunction< - Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, - ffi.IntPtr, Dart_HandleFinalizer)>>('Dart_NewFinalizableHandle'); - late final _Dart_NewFinalizableHandle = - _Dart_NewFinalizableHandlePtr.asFunction< - Dart_FinalizableHandle Function( - Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); +const int __DARWIN_LITTLE_ENDIAN = 1234; - /// Deletes the given finalizable [object] handle. - /// - /// The caller has to provide the actual Dart object the handle was created from - /// to prove the object (and therefore the finalizable handle) is still alive. - /// - /// Requires there to be a current isolate. - void Dart_DeleteFinalizableHandle( - Dart_FinalizableHandle object, - Object strong_ref_to_object, - ) { - return _Dart_DeleteFinalizableHandle( - object, - strong_ref_to_object, - ); - } +const int __DARWIN_BIG_ENDIAN = 4321; - late final _Dart_DeleteFinalizableHandlePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, - ffi.Handle)>>('Dart_DeleteFinalizableHandle'); - late final _Dart_DeleteFinalizableHandle = _Dart_DeleteFinalizableHandlePtr - .asFunction(); +const int __DARWIN_PDP_ENDIAN = 3412; - /// Updates the external memory size for the given finalizable handle. - /// - /// The caller has to provide the actual Dart object the handle was created from - /// to prove the object (and therefore the finalizable handle) is still alive. - /// - /// May trigger garbage collection. - void Dart_UpdateFinalizableExternalSize( - Dart_FinalizableHandle object, - Object strong_ref_to_object, - int external_allocation_size, - ) { - return _Dart_UpdateFinalizableExternalSize( - object, - strong_ref_to_object, - external_allocation_size, - ); - } +const int __DARWIN_BYTE_ORDER = 1234; - late final _Dart_UpdateFinalizableExternalSizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, - ffi.IntPtr)>>('Dart_UpdateFinalizableExternalSize'); - late final _Dart_UpdateFinalizableExternalSize = - _Dart_UpdateFinalizableExternalSizePtr.asFunction< - void Function(Dart_FinalizableHandle, Object, int)>(); +const int LITTLE_ENDIAN = 1234; - /// Gets the version string for the Dart VM. - /// - /// The version of the Dart VM can be accessed without initializing the VM. - /// - /// \return The version string for the embedded Dart VM. - ffi.Pointer Dart_VersionString() { - return _Dart_VersionString(); - } +const int BIG_ENDIAN = 4321; - late final _Dart_VersionStringPtr = - _lookup Function()>>( - 'Dart_VersionString'); - late final _Dart_VersionString = - _Dart_VersionStringPtr.asFunction Function()>(); +const int PDP_ENDIAN = 3412; - /// Initialize Dart_IsolateFlags with correct version and default values. - void Dart_IsolateFlagsInitialize( - ffi.Pointer flags, - ) { - return _Dart_IsolateFlagsInitialize( - flags, - ); - } +const int BYTE_ORDER = 1234; - late final _Dart_IsolateFlagsInitializePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer)>>('Dart_IsolateFlagsInitialize'); - late final _Dart_IsolateFlagsInitialize = _Dart_IsolateFlagsInitializePtr - .asFunction)>(); +const int __WORDSIZE = 64; - /// Initializes the VM. - /// - /// \param params A struct containing initialization information. The version - /// field of the struct must be DART_INITIALIZE_PARAMS_CURRENT_VERSION. - /// - /// \return NULL if initialization is successful. Returns an error message - /// otherwise. The caller is responsible for freeing the error message. - ffi.Pointer Dart_Initialize( - ffi.Pointer params, - ) { - return _Dart_Initialize( - params, - ); - } +const int INT8_MAX = 127; - late final _Dart_InitializePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('Dart_Initialize'); - late final _Dart_Initialize = _Dart_InitializePtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); +const int INT16_MAX = 32767; - /// Cleanup state in the VM before process termination. - /// - /// \return NULL if cleanup is successful. Returns an error message otherwise. - /// The caller is responsible for freeing the error message. - /// - /// NOTE: This function must not be called on a thread that was created by the VM - /// itself. - ffi.Pointer Dart_Cleanup() { - return _Dart_Cleanup(); - } +const int INT32_MAX = 2147483647; - late final _Dart_CleanupPtr = - _lookup Function()>>( - 'Dart_Cleanup'); - late final _Dart_Cleanup = - _Dart_CleanupPtr.asFunction Function()>(); +const int INT64_MAX = 9223372036854775807; - /// Sets command line flags. Should be called before Dart_Initialize. - /// - /// \param argc The length of the arguments array. - /// \param argv An array of arguments. - /// - /// \return NULL if successful. Returns an error message otherwise. - /// The caller is responsible for freeing the error message. - /// - /// NOTE: This call does not store references to the passed in c-strings. - ffi.Pointer Dart_SetVMFlags( - int argc, - ffi.Pointer> argv, - ) { - return _Dart_SetVMFlags( - argc, - argv, - ); - } +const int INT8_MIN = -128; - late final _Dart_SetVMFlagsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer>)>>('Dart_SetVMFlags'); - late final _Dart_SetVMFlags = _Dart_SetVMFlagsPtr.asFunction< - ffi.Pointer Function( - int, ffi.Pointer>)>(); +const int INT16_MIN = -32768; - /// Returns true if the named VM flag is of boolean type, specified, and set to - /// true. - /// - /// \param flag_name The name of the flag without leading punctuation - /// (example: "enable_asserts"). - bool Dart_IsVMFlagSet( - ffi.Pointer flag_name, - ) { - return _Dart_IsVMFlagSet( - flag_name, - ); - } +const int INT32_MIN = -2147483648; - late final _Dart_IsVMFlagSetPtr = - _lookup)>>( - 'Dart_IsVMFlagSet'); - late final _Dart_IsVMFlagSet = - _Dart_IsVMFlagSetPtr.asFunction)>(); +const int INT64_MIN = -9223372036854775808; - /// Creates a new isolate. The new isolate becomes the current isolate. - /// - /// A snapshot can be used to restore the VM quickly to a saved state - /// and is useful for fast startup. If snapshot data is provided, the - /// isolate will be started using that snapshot data. Requires a core snapshot or - /// an app snapshot created by Dart_CreateSnapshot or - /// Dart_CreatePrecompiledSnapshot* from a VM with the same version. - /// - /// Requires there to be no current isolate. - /// - /// \param script_uri The main source file or snapshot this isolate will load. - /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child - /// isolate is created by Isolate.spawn. The embedder should use a URI that - /// allows it to load the same program into such a child isolate. - /// \param name A short name for the isolate to improve debugging messages. - /// Typically of the format 'foo.dart:main()'. - /// \param isolate_snapshot_data - /// \param isolate_snapshot_instructions Buffers containing a snapshot of the - /// isolate or NULL if no snapshot is provided. If provided, the buffers must - /// remain valid until the isolate shuts down. - /// \param flags Pointer to VM specific flags or NULL for default flags. - /// \param isolate_group_data Embedder group data. This data can be obtained - /// by calling Dart_IsolateGroupData and will be passed to the - /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and - /// Dart_IsolateGroupCleanupCallback. - /// \param isolate_data Embedder data. This data will be passed to - /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from - /// this parent isolate. - /// \param error Returns NULL if creation is successful, an error message - /// otherwise. The caller is responsible for calling free() on the error - /// message. - /// - /// \return The new isolate on success, or NULL if isolate creation failed. - Dart_Isolate Dart_CreateIsolateGroup( - ffi.Pointer script_uri, - ffi.Pointer name, - ffi.Pointer isolate_snapshot_data, - ffi.Pointer isolate_snapshot_instructions, - ffi.Pointer flags, - ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data, - ffi.Pointer> error, - ) { - return _Dart_CreateIsolateGroup( - script_uri, - name, - isolate_snapshot_data, - isolate_snapshot_instructions, - flags, - isolate_group_data, - isolate_data, - error, - ); - } +const int UINT8_MAX = 255; - late final _Dart_CreateIsolateGroupPtr = _lookup< - ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('Dart_CreateIsolateGroup'); - late final _Dart_CreateIsolateGroup = _Dart_CreateIsolateGroupPtr.asFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); +const int UINT16_MAX = 65535; - /// Creates a new isolate inside the isolate group of [group_member]. - /// - /// Requires there to be no current isolate. - /// - /// \param group_member An isolate from the same group into which the newly created - /// isolate should be born into. Other threads may not have entered / enter this - /// member isolate. - /// \param name A short name for the isolate for debugging purposes. - /// \param shutdown_callback A callback to be called when the isolate is being - /// shutdown (may be NULL). - /// \param cleanup_callback A callback to be called when the isolate is being - /// cleaned up (may be NULL). - /// \param isolate_data The embedder-specific data associated with this isolate. - /// \param error Set to NULL if creation is successful, set to an error - /// message otherwise. The caller is responsible for calling free() on the - /// error message. - /// - /// \return The newly created isolate on success, or NULL if isolate creation - /// failed. - /// - /// If successful, the newly created isolate will become the current isolate. - Dart_Isolate Dart_CreateIsolateInGroup( - Dart_Isolate group_member, - ffi.Pointer name, - Dart_IsolateShutdownCallback shutdown_callback, - Dart_IsolateCleanupCallback cleanup_callback, - ffi.Pointer child_isolate_data, - ffi.Pointer> error, - ) { - return _Dart_CreateIsolateInGroup( - group_member, - name, - shutdown_callback, - cleanup_callback, - child_isolate_data, - error, - ); - } +const int UINT32_MAX = 4294967295; - late final _Dart_CreateIsolateInGroupPtr = _lookup< - ffi.NativeFunction< - Dart_Isolate Function( - Dart_Isolate, - ffi.Pointer, - Dart_IsolateShutdownCallback, - Dart_IsolateCleanupCallback, - ffi.Pointer, - ffi.Pointer>)>>( - 'Dart_CreateIsolateInGroup'); - late final _Dart_CreateIsolateInGroup = - _Dart_CreateIsolateInGroupPtr.asFunction< - Dart_Isolate Function( - Dart_Isolate, - ffi.Pointer, - Dart_IsolateShutdownCallback, - Dart_IsolateCleanupCallback, - ffi.Pointer, - ffi.Pointer>)>(); +const int UINT64_MAX = -1; - /// Creates a new isolate from a Dart Kernel file. The new isolate - /// becomes the current isolate. - /// - /// Requires there to be no current isolate. - /// - /// \param script_uri The main source file or snapshot this isolate will load. - /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child - /// isolate is created by Isolate.spawn. The embedder should use a URI that - /// allows it to load the same program into such a child isolate. - /// \param name A short name for the isolate to improve debugging messages. - /// Typically of the format 'foo.dart:main()'. - /// \param kernel_buffer - /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must - /// remain valid until isolate shutdown. - /// \param flags Pointer to VM specific flags or NULL for default flags. - /// \param isolate_group_data Embedder group data. This data can be obtained - /// by calling Dart_IsolateGroupData and will be passed to the - /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and - /// Dart_IsolateGroupCleanupCallback. - /// \param isolate_data Embedder data. This data will be passed to - /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from - /// this parent isolate. - /// \param error Returns NULL if creation is successful, an error message - /// otherwise. The caller is responsible for calling free() on the error - /// message. - /// - /// \return The new isolate on success, or NULL if isolate creation failed. - Dart_Isolate Dart_CreateIsolateGroupFromKernel( - ffi.Pointer script_uri, - ffi.Pointer name, - ffi.Pointer kernel_buffer, - int kernel_buffer_size, - ffi.Pointer flags, - ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data, - ffi.Pointer> error, - ) { - return _Dart_CreateIsolateGroupFromKernel( - script_uri, - name, - kernel_buffer, - kernel_buffer_size, - flags, - isolate_group_data, - isolate_data, - error, - ); - } +const int INT_LEAST8_MIN = -128; - late final _Dart_CreateIsolateGroupFromKernelPtr = _lookup< - ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'Dart_CreateIsolateGroupFromKernel'); - late final _Dart_CreateIsolateGroupFromKernel = - _Dart_CreateIsolateGroupFromKernelPtr.asFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); +const int INT_LEAST16_MIN = -32768; - /// Shuts down the current isolate. After this call, the current isolate is NULL. - /// Any current scopes created by Dart_EnterScope will be exited. Invokes the - /// shutdown callback and any callbacks of remaining weak persistent handles. - /// - /// Requires there to be a current isolate. - void Dart_ShutdownIsolate() { - return _Dart_ShutdownIsolate(); - } +const int INT_LEAST32_MIN = -2147483648; - late final _Dart_ShutdownIsolatePtr = - _lookup>('Dart_ShutdownIsolate'); - late final _Dart_ShutdownIsolate = - _Dart_ShutdownIsolatePtr.asFunction(); +const int INT_LEAST64_MIN = -9223372036854775808; - /// Returns the current isolate. Will return NULL if there is no - /// current isolate. - Dart_Isolate Dart_CurrentIsolate() { - return _Dart_CurrentIsolate(); - } +const int INT_LEAST8_MAX = 127; - late final _Dart_CurrentIsolatePtr = - _lookup>( - 'Dart_CurrentIsolate'); - late final _Dart_CurrentIsolate = - _Dart_CurrentIsolatePtr.asFunction(); +const int INT_LEAST16_MAX = 32767; - /// Returns the callback data associated with the current isolate. This - /// data was set when the isolate got created or initialized. - ffi.Pointer Dart_CurrentIsolateData() { - return _Dart_CurrentIsolateData(); - } +const int INT_LEAST32_MAX = 2147483647; - late final _Dart_CurrentIsolateDataPtr = - _lookup Function()>>( - 'Dart_CurrentIsolateData'); - late final _Dart_CurrentIsolateData = _Dart_CurrentIsolateDataPtr.asFunction< - ffi.Pointer Function()>(); +const int INT_LEAST64_MAX = 9223372036854775807; - /// Returns the callback data associated with the given isolate. This - /// data was set when the isolate got created or initialized. - ffi.Pointer Dart_IsolateData( - Dart_Isolate isolate, - ) { - return _Dart_IsolateData( - isolate, - ); - } +const int UINT_LEAST8_MAX = 255; - late final _Dart_IsolateDataPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateData'); - late final _Dart_IsolateData = _Dart_IsolateDataPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); +const int UINT_LEAST16_MAX = 65535; - /// Returns the current isolate group. Will return NULL if there is no - /// current isolate group. - Dart_IsolateGroup Dart_CurrentIsolateGroup() { - return _Dart_CurrentIsolateGroup(); - } +const int UINT_LEAST32_MAX = 4294967295; - late final _Dart_CurrentIsolateGroupPtr = - _lookup>( - 'Dart_CurrentIsolateGroup'); - late final _Dart_CurrentIsolateGroup = - _Dart_CurrentIsolateGroupPtr.asFunction(); +const int UINT_LEAST64_MAX = -1; - /// Returns the callback data associated with the current isolate group. This - /// data was passed to the isolate group when it was created. - ffi.Pointer Dart_CurrentIsolateGroupData() { - return _Dart_CurrentIsolateGroupData(); - } +const int INT_FAST8_MIN = -128; - late final _Dart_CurrentIsolateGroupDataPtr = - _lookup Function()>>( - 'Dart_CurrentIsolateGroupData'); - late final _Dart_CurrentIsolateGroupData = _Dart_CurrentIsolateGroupDataPtr - .asFunction Function()>(); +const int INT_FAST16_MIN = -32768; - /// Returns the callback data associated with the specified isolate group. This - /// data was passed to the isolate when it was created. - /// The embedder is responsible for ensuring the consistency of this data - /// with respect to the lifecycle of an isolate group. - ffi.Pointer Dart_IsolateGroupData( - Dart_Isolate isolate, - ) { - return _Dart_IsolateGroupData( - isolate, - ); - } +const int INT_FAST32_MIN = -2147483648; - late final _Dart_IsolateGroupDataPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateGroupData'); - late final _Dart_IsolateGroupData = _Dart_IsolateGroupDataPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); +const int INT_FAST64_MIN = -9223372036854775808; - /// Returns the debugging name for the current isolate. - /// - /// This name is unique to each isolate and should only be used to make - /// debugging messages more comprehensible. - Object Dart_DebugName() { - return _Dart_DebugName(); - } +const int INT_FAST8_MAX = 127; - late final _Dart_DebugNamePtr = - _lookup>('Dart_DebugName'); - late final _Dart_DebugName = - _Dart_DebugNamePtr.asFunction(); +const int INT_FAST16_MAX = 32767; - /// Returns the ID for an isolate which is used to query the service protocol. - /// - /// It is the responsibility of the caller to free the returned ID. - ffi.Pointer Dart_IsolateServiceId( - Dart_Isolate isolate, - ) { - return _Dart_IsolateServiceId( - isolate, - ); - } +const int INT_FAST32_MAX = 2147483647; - late final _Dart_IsolateServiceIdPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateServiceId'); - late final _Dart_IsolateServiceId = _Dart_IsolateServiceIdPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); +const int INT_FAST64_MAX = 9223372036854775807; - /// Enters an isolate. After calling this function, - /// the current isolate will be set to the provided isolate. - /// - /// Requires there to be no current isolate. Multiple threads may not be in - /// the same isolate at once. - void Dart_EnterIsolate( - Dart_Isolate isolate, - ) { - return _Dart_EnterIsolate( - isolate, - ); - } +const int UINT_FAST8_MAX = 255; - late final _Dart_EnterIsolatePtr = - _lookup>( - 'Dart_EnterIsolate'); - late final _Dart_EnterIsolate = - _Dart_EnterIsolatePtr.asFunction(); +const int UINT_FAST16_MAX = 65535; - /// Kills the given isolate. - /// - /// This function has the same effect as dart:isolate's - /// Isolate.kill(priority:immediate). - /// It can interrupt ordinary Dart code but not native code. If the isolate is - /// in the middle of a long running native function, the isolate will not be - /// killed until control returns to Dart. - /// - /// Does not require a current isolate. It is safe to kill the current isolate if - /// there is one. - void Dart_KillIsolate( - Dart_Isolate isolate, - ) { - return _Dart_KillIsolate( - isolate, - ); - } +const int UINT_FAST32_MAX = 4294967295; - late final _Dart_KillIsolatePtr = - _lookup>( - 'Dart_KillIsolate'); - late final _Dart_KillIsolate = - _Dart_KillIsolatePtr.asFunction(); +const int UINT_FAST64_MAX = -1; - /// Notifies the VM that the embedder expects |size| bytes of memory have become - /// unreachable. The VM may use this hint to adjust the garbage collector's - /// growth policy. - /// - /// Multiple calls are interpreted as increasing, not replacing, the estimate of - /// unreachable memory. - /// - /// Requires there to be a current isolate. - void Dart_HintFreed( - int size, - ) { - return _Dart_HintFreed( - size, - ); - } +const int INTPTR_MAX = 9223372036854775807; - late final _Dart_HintFreedPtr = - _lookup>( - 'Dart_HintFreed'); - late final _Dart_HintFreed = - _Dart_HintFreedPtr.asFunction(); +const int INTPTR_MIN = -9223372036854775808; - /// Notifies the VM that the embedder expects to be idle until |deadline|. The VM - /// may use this time to perform garbage collection or other tasks to avoid - /// delays during execution of Dart code in the future. - /// - /// |deadline| is measured in microseconds against the system's monotonic time. - /// This clock can be accessed via Dart_TimelineGetMicros(). - /// - /// Requires there to be a current isolate. - void Dart_NotifyIdle( - int deadline, - ) { - return _Dart_NotifyIdle( - deadline, - ); - } +const int UINTPTR_MAX = -1; - late final _Dart_NotifyIdlePtr = - _lookup>( - 'Dart_NotifyIdle'); - late final _Dart_NotifyIdle = - _Dart_NotifyIdlePtr.asFunction(); +const int INTMAX_MAX = 9223372036854775807; - /// Notifies the VM that the system is running low on memory. - /// - /// Does not require a current isolate. Only valid after calling Dart_Initialize. - void Dart_NotifyLowMemory() { - return _Dart_NotifyLowMemory(); - } +const int UINTMAX_MAX = -1; - late final _Dart_NotifyLowMemoryPtr = - _lookup>('Dart_NotifyLowMemory'); - late final _Dart_NotifyLowMemory = - _Dart_NotifyLowMemoryPtr.asFunction(); +const int INTMAX_MIN = -9223372036854775808; - /// Starts the CPU sampling profiler. - void Dart_StartProfiling() { - return _Dart_StartProfiling(); - } +const int PTRDIFF_MIN = -9223372036854775808; - late final _Dart_StartProfilingPtr = - _lookup>('Dart_StartProfiling'); - late final _Dart_StartProfiling = - _Dart_StartProfilingPtr.asFunction(); +const int PTRDIFF_MAX = 9223372036854775807; - /// Stops the CPU sampling profiler. - /// - /// Note that some profile samples might still be taken after this fucntion - /// returns due to the asynchronous nature of the implementation on some - /// platforms. - void Dart_StopProfiling() { - return _Dart_StopProfiling(); - } +const int SIZE_MAX = -1; - late final _Dart_StopProfilingPtr = - _lookup>('Dart_StopProfiling'); - late final _Dart_StopProfiling = - _Dart_StopProfilingPtr.asFunction(); +const int RSIZE_MAX = 9223372036854775807; - /// Notifies the VM that the current thread should not be profiled until a - /// matching call to Dart_ThreadEnableProfiling is made. - /// - /// NOTE: By default, if a thread has entered an isolate it will be profiled. - /// This function should be used when an embedder knows a thread is about - /// to make a blocking call and wants to avoid unnecessary interrupts by - /// the profiler. - void Dart_ThreadDisableProfiling() { - return _Dart_ThreadDisableProfiling(); - } +const int WCHAR_MAX = 2147483647; - late final _Dart_ThreadDisableProfilingPtr = - _lookup>( - 'Dart_ThreadDisableProfiling'); - late final _Dart_ThreadDisableProfiling = - _Dart_ThreadDisableProfilingPtr.asFunction(); +const int WCHAR_MIN = -2147483648; - /// Notifies the VM that the current thread should be profiled. - /// - /// NOTE: It is only legal to call this function *after* calling - /// Dart_ThreadDisableProfiling. - /// - /// NOTE: By default, if a thread has entered an isolate it will be profiled. - void Dart_ThreadEnableProfiling() { - return _Dart_ThreadEnableProfiling(); - } +const int WINT_MIN = -2147483648; - late final _Dart_ThreadEnableProfilingPtr = - _lookup>( - 'Dart_ThreadEnableProfiling'); - late final _Dart_ThreadEnableProfiling = - _Dart_ThreadEnableProfilingPtr.asFunction(); +const int WINT_MAX = 2147483647; - /// Register symbol information for the Dart VM's profiler and crash dumps. - /// - /// This consumes the output of //topaz/runtime/dart/profiler_symbols, which - /// should be treated as opaque. - void Dart_AddSymbols( - ffi.Pointer dso_name, - ffi.Pointer buffer, - int buffer_size, - ) { - return _Dart_AddSymbols( - dso_name, - buffer, - buffer_size, - ); - } +const int SIG_ATOMIC_MIN = -2147483648; - late final _Dart_AddSymbolsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.IntPtr)>>('Dart_AddSymbols'); - late final _Dart_AddSymbols = _Dart_AddSymbolsPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); +const int SIG_ATOMIC_MAX = 2147483647; - /// Exits an isolate. After this call, Dart_CurrentIsolate will - /// return NULL. - /// - /// Requires there to be a current isolate. - void Dart_ExitIsolate() { - return _Dart_ExitIsolate(); - } +const int __API_TO_BE_DEPRECATED = 100000; - late final _Dart_ExitIsolatePtr = - _lookup>('Dart_ExitIsolate'); - late final _Dart_ExitIsolate = - _Dart_ExitIsolatePtr.asFunction(); +const int __MAC_10_0 = 1000; - /// Creates a full snapshot of the current isolate heap. - /// - /// A full snapshot is a compact representation of the dart vm isolate heap - /// and dart isolate heap states. These snapshots are used to initialize - /// the vm isolate on startup and fast initialization of an isolate. - /// A Snapshot of the heap is created before any dart code has executed. - /// - /// Requires there to be a current isolate. Not available in the precompiled - /// runtime (check Dart_IsPrecompiledRuntime). - /// - /// \param buffer Returns a pointer to a buffer containing the - /// snapshot. This buffer is scope allocated and is only valid - /// until the next call to Dart_ExitScope. - /// \param size Returns the size of the buffer. - /// \param is_core Create a snapshot containing core libraries. - /// Such snapshot should be agnostic to null safety mode. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateSnapshot( - ffi.Pointer> vm_snapshot_data_buffer, - ffi.Pointer vm_snapshot_data_size, - ffi.Pointer> isolate_snapshot_data_buffer, - ffi.Pointer isolate_snapshot_data_size, - bool is_core, - ) { - return _Dart_CreateSnapshot( - vm_snapshot_data_buffer, - vm_snapshot_data_size, - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - is_core, - ); - } +const int __MAC_10_1 = 1010; - late final _Dart_CreateSnapshotPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Bool)>>('Dart_CreateSnapshot'); - late final _Dart_CreateSnapshot = _Dart_CreateSnapshotPtr.asFunction< - Object Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - bool)>(); +const int __MAC_10_2 = 1020; - /// Returns whether the buffer contains a kernel file. - /// - /// \param buffer Pointer to a buffer that might contain a kernel binary. - /// \param buffer_size Size of the buffer. - /// - /// \return Whether the buffer contains a kernel binary (full or partial). - bool Dart_IsKernel( - ffi.Pointer buffer, - int buffer_size, - ) { - return _Dart_IsKernel( - buffer, - buffer_size, - ); - } +const int __MAC_10_3 = 1030; - late final _Dart_IsKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_IsKernel'); - late final _Dart_IsKernel = _Dart_IsKernelPtr.asFunction< - bool Function(ffi.Pointer, int)>(); +const int __MAC_10_4 = 1040; - /// Make isolate runnable. - /// - /// When isolates are spawned, this function is used to indicate that - /// the creation and initialization (including script loading) of the - /// isolate is complete and the isolate can start. - /// This function expects there to be no current isolate. - /// - /// \param isolate The isolate to be made runnable. - /// - /// \return NULL if successful. Returns an error message otherwise. The caller - /// is responsible for freeing the error message. - ffi.Pointer Dart_IsolateMakeRunnable( - Dart_Isolate isolate, - ) { - return _Dart_IsolateMakeRunnable( - isolate, - ); - } +const int __MAC_10_5 = 1050; - late final _Dart_IsolateMakeRunnablePtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateMakeRunnable'); - late final _Dart_IsolateMakeRunnable = _Dart_IsolateMakeRunnablePtr - .asFunction Function(Dart_Isolate)>(); +const int __MAC_10_6 = 1060; - /// Allows embedders to provide an alternative wakeup mechanism for the - /// delivery of inter-isolate messages. This setting only applies to - /// the current isolate. - /// - /// Most embedders will only call this function once, before isolate - /// execution begins. If this function is called after isolate - /// execution begins, the embedder is responsible for threading issues. - void Dart_SetMessageNotifyCallback( - Dart_MessageNotifyCallback message_notify_callback, - ) { - return _Dart_SetMessageNotifyCallback( - message_notify_callback, - ); - } +const int __MAC_10_7 = 1070; - late final _Dart_SetMessageNotifyCallbackPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetMessageNotifyCallback'); - late final _Dart_SetMessageNotifyCallback = _Dart_SetMessageNotifyCallbackPtr - .asFunction(); +const int __MAC_10_8 = 1080; - /// Query the current message notify callback for the isolate. - /// - /// \return The current message notify callback for the isolate. - Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback() { - return _Dart_GetMessageNotifyCallback(); - } +const int __MAC_10_9 = 1090; - late final _Dart_GetMessageNotifyCallbackPtr = - _lookup>( - 'Dart_GetMessageNotifyCallback'); - late final _Dart_GetMessageNotifyCallback = _Dart_GetMessageNotifyCallbackPtr - .asFunction(); +const int __MAC_10_10 = 101000; - /// If the VM flag `--pause-isolates-on-start` was passed this will be true. - /// - /// \return A boolean value indicating if pause on start was requested. - bool Dart_ShouldPauseOnStart() { - return _Dart_ShouldPauseOnStart(); - } +const int __MAC_10_10_2 = 101002; - late final _Dart_ShouldPauseOnStartPtr = - _lookup>( - 'Dart_ShouldPauseOnStart'); - late final _Dart_ShouldPauseOnStart = - _Dart_ShouldPauseOnStartPtr.asFunction(); +const int __MAC_10_10_3 = 101003; - /// Override the VM flag `--pause-isolates-on-start` for the current isolate. - /// - /// \param should_pause Should the isolate be paused on start? - /// - /// NOTE: This must be called before Dart_IsolateMakeRunnable. - void Dart_SetShouldPauseOnStart( - bool should_pause, - ) { - return _Dart_SetShouldPauseOnStart( - should_pause, - ); - } +const int __MAC_10_11 = 101100; - late final _Dart_SetShouldPauseOnStartPtr = - _lookup>( - 'Dart_SetShouldPauseOnStart'); - late final _Dart_SetShouldPauseOnStart = - _Dart_SetShouldPauseOnStartPtr.asFunction(); +const int __MAC_10_11_2 = 101102; - /// Is the current isolate paused on start? - /// - /// \return A boolean value indicating if the isolate is paused on start. - bool Dart_IsPausedOnStart() { - return _Dart_IsPausedOnStart(); - } +const int __MAC_10_11_3 = 101103; - late final _Dart_IsPausedOnStartPtr = - _lookup>('Dart_IsPausedOnStart'); - late final _Dart_IsPausedOnStart = - _Dart_IsPausedOnStartPtr.asFunction(); +const int __MAC_10_11_4 = 101104; - /// Called when the embedder has paused the current isolate on start and when - /// the embedder has resumed the isolate. - /// - /// \param paused Is the isolate paused on start? - void Dart_SetPausedOnStart( - bool paused, - ) { - return _Dart_SetPausedOnStart( - paused, - ); - } +const int __MAC_10_12 = 101200; - late final _Dart_SetPausedOnStartPtr = - _lookup>( - 'Dart_SetPausedOnStart'); - late final _Dart_SetPausedOnStart = - _Dart_SetPausedOnStartPtr.asFunction(); +const int __MAC_10_12_1 = 101201; - /// If the VM flag `--pause-isolates-on-exit` was passed this will be true. - /// - /// \return A boolean value indicating if pause on exit was requested. - bool Dart_ShouldPauseOnExit() { - return _Dart_ShouldPauseOnExit(); - } +const int __MAC_10_12_2 = 101202; - late final _Dart_ShouldPauseOnExitPtr = - _lookup>( - 'Dart_ShouldPauseOnExit'); - late final _Dart_ShouldPauseOnExit = - _Dart_ShouldPauseOnExitPtr.asFunction(); +const int __MAC_10_12_4 = 101204; - /// Override the VM flag `--pause-isolates-on-exit` for the current isolate. - /// - /// \param should_pause Should the isolate be paused on exit? - void Dart_SetShouldPauseOnExit( - bool should_pause, - ) { - return _Dart_SetShouldPauseOnExit( - should_pause, - ); - } +const int __MAC_10_13 = 101300; - late final _Dart_SetShouldPauseOnExitPtr = - _lookup>( - 'Dart_SetShouldPauseOnExit'); - late final _Dart_SetShouldPauseOnExit = - _Dart_SetShouldPauseOnExitPtr.asFunction(); +const int __MAC_10_13_1 = 101301; - /// Is the current isolate paused on exit? - /// - /// \return A boolean value indicating if the isolate is paused on exit. - bool Dart_IsPausedOnExit() { - return _Dart_IsPausedOnExit(); - } +const int __MAC_10_13_2 = 101302; - late final _Dart_IsPausedOnExitPtr = - _lookup>('Dart_IsPausedOnExit'); - late final _Dart_IsPausedOnExit = - _Dart_IsPausedOnExitPtr.asFunction(); +const int __MAC_10_13_4 = 101304; - /// Called when the embedder has paused the current isolate on exit and when - /// the embedder has resumed the isolate. - /// - /// \param paused Is the isolate paused on exit? - void Dart_SetPausedOnExit( - bool paused, - ) { - return _Dart_SetPausedOnExit( - paused, - ); - } +const int __MAC_10_14 = 101400; - late final _Dart_SetPausedOnExitPtr = - _lookup>( - 'Dart_SetPausedOnExit'); - late final _Dart_SetPausedOnExit = - _Dart_SetPausedOnExitPtr.asFunction(); +const int __MAC_10_14_1 = 101401; - /// Called when the embedder has caught a top level unhandled exception error - /// in the current isolate. - /// - /// NOTE: It is illegal to call this twice on the same isolate without first - /// clearing the sticky error to null. - /// - /// \param error The unhandled exception error. - void Dart_SetStickyError( - Object error, - ) { - return _Dart_SetStickyError( - error, - ); - } +const int __MAC_10_14_4 = 101404; - late final _Dart_SetStickyErrorPtr = - _lookup>( - 'Dart_SetStickyError'); - late final _Dart_SetStickyError = - _Dart_SetStickyErrorPtr.asFunction(); +const int __MAC_10_14_6 = 101406; - /// Does the current isolate have a sticky error? - bool Dart_HasStickyError() { - return _Dart_HasStickyError(); - } +const int __MAC_10_15 = 101500; - late final _Dart_HasStickyErrorPtr = - _lookup>('Dart_HasStickyError'); - late final _Dart_HasStickyError = - _Dart_HasStickyErrorPtr.asFunction(); +const int __MAC_10_15_1 = 101501; - /// Gets the sticky error for the current isolate. - /// - /// \return A handle to the sticky error object or null. - Object Dart_GetStickyError() { - return _Dart_GetStickyError(); - } +const int __MAC_10_15_4 = 101504; - late final _Dart_GetStickyErrorPtr = - _lookup>('Dart_GetStickyError'); - late final _Dart_GetStickyError = - _Dart_GetStickyErrorPtr.asFunction(); +const int __MAC_10_16 = 101600; - /// Handles the next pending message for the current isolate. - /// - /// May generate an unhandled exception error. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_HandleMessage() { - return _Dart_HandleMessage(); - } +const int __MAC_11_0 = 110000; - late final _Dart_HandleMessagePtr = - _lookup>('Dart_HandleMessage'); - late final _Dart_HandleMessage = - _Dart_HandleMessagePtr.asFunction(); +const int __MAC_11_1 = 110100; - /// Drains the microtask queue, then blocks the calling thread until the current - /// isolate recieves a message, then handles all messages. - /// - /// \param timeout_millis When non-zero, the call returns after the indicated - /// number of milliseconds even if no message was received. - /// \return A valid handle if no error occurs, otherwise an error handle. - Object Dart_WaitForEvent( - int timeout_millis, - ) { - return _Dart_WaitForEvent( - timeout_millis, - ); - } +const int __MAC_11_3 = 110300; - late final _Dart_WaitForEventPtr = - _lookup>( - 'Dart_WaitForEvent'); - late final _Dart_WaitForEvent = - _Dart_WaitForEventPtr.asFunction(); +const int __MAC_11_4 = 110400; - /// Handles any pending messages for the vm service for the current - /// isolate. - /// - /// This function may be used by an embedder at a breakpoint to avoid - /// pausing the vm service. - /// - /// This function can indirectly cause the message notify callback to - /// be called. - /// - /// \return true if the vm service requests the program resume - /// execution, false otherwise - bool Dart_HandleServiceMessages() { - return _Dart_HandleServiceMessages(); - } +const int __MAC_11_5 = 110500; - late final _Dart_HandleServiceMessagesPtr = - _lookup>( - 'Dart_HandleServiceMessages'); - late final _Dart_HandleServiceMessages = - _Dart_HandleServiceMessagesPtr.asFunction(); +const int __MAC_11_6 = 110600; - /// Does the current isolate have pending service messages? - /// - /// \return true if the isolate has pending service messages, false otherwise. - bool Dart_HasServiceMessages() { - return _Dart_HasServiceMessages(); - } +const int __MAC_12_0 = 120000; + +const int __MAC_12_1 = 120100; + +const int __MAC_12_2 = 120200; + +const int __MAC_12_3 = 120300; - late final _Dart_HasServiceMessagesPtr = - _lookup>( - 'Dart_HasServiceMessages'); - late final _Dart_HasServiceMessages = - _Dart_HasServiceMessagesPtr.asFunction(); +const int __IPHONE_2_0 = 20000; - /// Processes any incoming messages for the current isolate. - /// - /// This function may only be used when the embedder has not provided - /// an alternate message delivery mechanism with - /// Dart_SetMessageCallbacks. It is provided for convenience. - /// - /// This function waits for incoming messages for the current - /// isolate. As new messages arrive, they are handled using - /// Dart_HandleMessage. The routine exits when all ports to the - /// current isolate are closed. - /// - /// \return A valid handle if the run loop exited successfully. If an - /// exception or other error occurs while processing messages, an - /// error handle is returned. - Object Dart_RunLoop() { - return _Dart_RunLoop(); - } +const int __IPHONE_2_1 = 20100; - late final _Dart_RunLoopPtr = - _lookup>('Dart_RunLoop'); - late final _Dart_RunLoop = _Dart_RunLoopPtr.asFunction(); +const int __IPHONE_2_2 = 20200; - /// Lets the VM run message processing for the isolate. - /// - /// This function expects there to a current isolate and the current isolate - /// must not have an active api scope. The VM will take care of making the - /// isolate runnable (if not already), handles its message loop and will take - /// care of shutting the isolate down once it's done. - /// - /// \param errors_are_fatal Whether uncaught errors should be fatal. - /// \param on_error_port A port to notify on uncaught errors (or ILLEGAL_PORT). - /// \param on_exit_port A port to notify on exit (or ILLEGAL_PORT). - /// \param error A non-NULL pointer which will hold an error message if the call - /// fails. The error has to be free()ed by the caller. - /// - /// \return If successfull the VM takes owernship of the isolate and takes care - /// of its message loop. If not successful the caller retains owernship of the - /// isolate. - bool Dart_RunLoopAsync( - bool errors_are_fatal, - int on_error_port, - int on_exit_port, - ffi.Pointer> error, - ) { - return _Dart_RunLoopAsync( - errors_are_fatal, - on_error_port, - on_exit_port, - error, - ); - } +const int __IPHONE_3_0 = 30000; - late final _Dart_RunLoopAsyncPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Bool, Dart_Port, Dart_Port, - ffi.Pointer>)>>('Dart_RunLoopAsync'); - late final _Dart_RunLoopAsync = _Dart_RunLoopAsyncPtr.asFunction< - bool Function(bool, int, int, ffi.Pointer>)>(); +const int __IPHONE_3_1 = 30100; - /// Gets the main port id for the current isolate. - int Dart_GetMainPortId() { - return _Dart_GetMainPortId(); - } +const int __IPHONE_3_2 = 30200; - late final _Dart_GetMainPortIdPtr = - _lookup>('Dart_GetMainPortId'); - late final _Dart_GetMainPortId = - _Dart_GetMainPortIdPtr.asFunction(); +const int __IPHONE_4_0 = 40000; - /// Does the current isolate have live ReceivePorts? - /// - /// A ReceivePort is live when it has not been closed. - bool Dart_HasLivePorts() { - return _Dart_HasLivePorts(); - } +const int __IPHONE_4_1 = 40100; - late final _Dart_HasLivePortsPtr = - _lookup>('Dart_HasLivePorts'); - late final _Dart_HasLivePorts = - _Dart_HasLivePortsPtr.asFunction(); +const int __IPHONE_4_2 = 40200; - /// Posts a message for some isolate. The message is a serialized - /// object. - /// - /// Requires there to be a current isolate. - /// - /// \param port The destination port. - /// \param object An object from the current isolate. - /// - /// \return True if the message was posted. - bool Dart_Post( - int port_id, - Object object, - ) { - return _Dart_Post( - port_id, - object, - ); - } +const int __IPHONE_4_3 = 40300; - late final _Dart_PostPtr = - _lookup>( - 'Dart_Post'); - late final _Dart_Post = - _Dart_PostPtr.asFunction(); +const int __IPHONE_5_0 = 50000; - /// Returns a new SendPort with the provided port id. - /// - /// \param port_id The destination port. - /// - /// \return A new SendPort if no errors occurs. Otherwise returns - /// an error handle. - Object Dart_NewSendPort( - int port_id, - ) { - return _Dart_NewSendPort( - port_id, - ); - } +const int __IPHONE_5_1 = 50100; - late final _Dart_NewSendPortPtr = - _lookup>( - 'Dart_NewSendPort'); - late final _Dart_NewSendPort = - _Dart_NewSendPortPtr.asFunction(); +const int __IPHONE_6_0 = 60000; - /// Gets the SendPort id for the provided SendPort. - /// \param port A SendPort object whose id is desired. - /// \param port_id Returns the id of the SendPort. - /// \return Success if no error occurs. Otherwise returns - /// an error handle. - Object Dart_SendPortGetId( - Object port, - ffi.Pointer port_id, - ) { - return _Dart_SendPortGetId( - port, - port_id, - ); - } +const int __IPHONE_6_1 = 60100; - late final _Dart_SendPortGetIdPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_SendPortGetId'); - late final _Dart_SendPortGetId = _Dart_SendPortGetIdPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const int __IPHONE_7_0 = 70000; - /// Enters a new scope. - /// - /// All new local handles will be created in this scope. Additionally, - /// some functions may return "scope allocated" memory which is only - /// valid within this scope. - /// - /// Requires there to be a current isolate. - void Dart_EnterScope() { - return _Dart_EnterScope(); - } +const int __IPHONE_7_1 = 70100; - late final _Dart_EnterScopePtr = - _lookup>('Dart_EnterScope'); - late final _Dart_EnterScope = - _Dart_EnterScopePtr.asFunction(); +const int __IPHONE_8_0 = 80000; - /// Exits a scope. - /// - /// The previous scope (if any) becomes the current scope. - /// - /// Requires there to be a current isolate. - void Dart_ExitScope() { - return _Dart_ExitScope(); - } +const int __IPHONE_8_1 = 80100; - late final _Dart_ExitScopePtr = - _lookup>('Dart_ExitScope'); - late final _Dart_ExitScope = _Dart_ExitScopePtr.asFunction(); +const int __IPHONE_8_2 = 80200; - /// The Dart VM uses "zone allocation" for temporary structures. Zones - /// support very fast allocation of small chunks of memory. The chunks - /// cannot be deallocated individually, but instead zones support - /// deallocating all chunks in one fast operation. - /// - /// This function makes it possible for the embedder to allocate - /// temporary data in the VMs zone allocator. - /// - /// Zone allocation is possible: - /// 1. when inside a scope where local handles can be allocated - /// 2. when processing a message from a native port in a native port - /// handler - /// - /// All the memory allocated this way will be reclaimed either on the - /// next call to Dart_ExitScope or when the native port handler exits. - /// - /// \param size Size of the memory to allocate. - /// - /// \return A pointer to the allocated memory. NULL if allocation - /// failed. Failure might due to is no current VM zone. - ffi.Pointer Dart_ScopeAllocate( - int size, - ) { - return _Dart_ScopeAllocate( - size, - ); - } +const int __IPHONE_8_3 = 80300; - late final _Dart_ScopeAllocatePtr = - _lookup Function(ffi.IntPtr)>>( - 'Dart_ScopeAllocate'); - late final _Dart_ScopeAllocate = - _Dart_ScopeAllocatePtr.asFunction Function(int)>(); +const int __IPHONE_8_4 = 80400; - /// Returns the null object. - /// - /// \return A handle to the null object. - Object Dart_Null() { - return _Dart_Null(); - } +const int __IPHONE_9_0 = 90000; - late final _Dart_NullPtr = - _lookup>('Dart_Null'); - late final _Dart_Null = _Dart_NullPtr.asFunction(); +const int __IPHONE_9_1 = 90100; - /// Is this object null? - bool Dart_IsNull( - Object object, - ) { - return _Dart_IsNull( - object, - ); - } +const int __IPHONE_9_2 = 90200; - late final _Dart_IsNullPtr = - _lookup>('Dart_IsNull'); - late final _Dart_IsNull = _Dart_IsNullPtr.asFunction(); +const int __IPHONE_9_3 = 90300; - /// Returns the empty string object. - /// - /// \return A handle to the empty string object. - Object Dart_EmptyString() { - return _Dart_EmptyString(); - } +const int __IPHONE_10_0 = 100000; - late final _Dart_EmptyStringPtr = - _lookup>('Dart_EmptyString'); - late final _Dart_EmptyString = - _Dart_EmptyStringPtr.asFunction(); +const int __IPHONE_10_1 = 100100; - /// Returns types that are not classes, and which therefore cannot be looked up - /// as library members by Dart_GetType. - /// - /// \return A handle to the dynamic, void or Never type. - Object Dart_TypeDynamic() { - return _Dart_TypeDynamic(); - } +const int __IPHONE_10_2 = 100200; - late final _Dart_TypeDynamicPtr = - _lookup>('Dart_TypeDynamic'); - late final _Dart_TypeDynamic = - _Dart_TypeDynamicPtr.asFunction(); +const int __IPHONE_10_3 = 100300; - Object Dart_TypeVoid() { - return _Dart_TypeVoid(); - } +const int __IPHONE_11_0 = 110000; - late final _Dart_TypeVoidPtr = - _lookup>('Dart_TypeVoid'); - late final _Dart_TypeVoid = _Dart_TypeVoidPtr.asFunction(); +const int __IPHONE_11_1 = 110100; - Object Dart_TypeNever() { - return _Dart_TypeNever(); - } +const int __IPHONE_11_2 = 110200; - late final _Dart_TypeNeverPtr = - _lookup>('Dart_TypeNever'); - late final _Dart_TypeNever = - _Dart_TypeNeverPtr.asFunction(); +const int __IPHONE_11_3 = 110300; - /// Checks if the two objects are equal. - /// - /// The result of the comparison is returned through the 'equal' - /// parameter. The return value itself is used to indicate success or - /// failure, not equality. - /// - /// May generate an unhandled exception error. - /// - /// \param obj1 An object to be compared. - /// \param obj2 An object to be compared. - /// \param equal Returns the result of the equality comparison. - /// - /// \return A valid handle if no error occurs during the comparison. - Object Dart_ObjectEquals( - Object obj1, - Object obj2, - ffi.Pointer equal, - ) { - return _Dart_ObjectEquals( - obj1, - obj2, - equal, - ); - } +const int __IPHONE_11_4 = 110400; - late final _Dart_ObjectEqualsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, - ffi.Pointer)>>('Dart_ObjectEquals'); - late final _Dart_ObjectEquals = _Dart_ObjectEqualsPtr.asFunction< - Object Function(Object, Object, ffi.Pointer)>(); +const int __IPHONE_12_0 = 120000; - /// Is this object an instance of some type? - /// - /// The result of the test is returned through the 'instanceof' parameter. - /// The return value itself is used to indicate success or failure. - /// - /// \param object An object. - /// \param type A type. - /// \param instanceof Return true if 'object' is an instance of type 'type'. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ObjectIsType( - Object object, - Object type, - ffi.Pointer instanceof, - ) { - return _Dart_ObjectIsType( - object, - type, - instanceof, - ); - } +const int __IPHONE_12_1 = 120100; - late final _Dart_ObjectIsTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, - ffi.Pointer)>>('Dart_ObjectIsType'); - late final _Dart_ObjectIsType = _Dart_ObjectIsTypePtr.asFunction< - Object Function(Object, Object, ffi.Pointer)>(); +const int __IPHONE_12_2 = 120200; - /// Query object type. - /// - /// \param object Some Object. - /// - /// \return true if Object is of the specified type. - bool Dart_IsInstance( - Object object, - ) { - return _Dart_IsInstance( - object, - ); - } +const int __IPHONE_12_3 = 120300; - late final _Dart_IsInstancePtr = - _lookup>( - 'Dart_IsInstance'); - late final _Dart_IsInstance = - _Dart_IsInstancePtr.asFunction(); +const int __IPHONE_12_4 = 120400; - bool Dart_IsNumber( - Object object, - ) { - return _Dart_IsNumber( - object, - ); - } +const int __IPHONE_13_0 = 130000; - late final _Dart_IsNumberPtr = - _lookup>( - 'Dart_IsNumber'); - late final _Dart_IsNumber = - _Dart_IsNumberPtr.asFunction(); +const int __IPHONE_13_1 = 130100; - bool Dart_IsInteger( - Object object, - ) { - return _Dart_IsInteger( - object, - ); - } +const int __IPHONE_13_2 = 130200; - late final _Dart_IsIntegerPtr = - _lookup>( - 'Dart_IsInteger'); - late final _Dart_IsInteger = - _Dart_IsIntegerPtr.asFunction(); +const int __IPHONE_13_3 = 130300; - bool Dart_IsDouble( - Object object, - ) { - return _Dart_IsDouble( - object, - ); - } +const int __IPHONE_13_4 = 130400; - late final _Dart_IsDoublePtr = - _lookup>( - 'Dart_IsDouble'); - late final _Dart_IsDouble = - _Dart_IsDoublePtr.asFunction(); +const int __IPHONE_13_5 = 130500; - bool Dart_IsBoolean( - Object object, - ) { - return _Dart_IsBoolean( - object, - ); - } +const int __IPHONE_13_6 = 130600; - late final _Dart_IsBooleanPtr = - _lookup>( - 'Dart_IsBoolean'); - late final _Dart_IsBoolean = - _Dart_IsBooleanPtr.asFunction(); +const int __IPHONE_13_7 = 130700; - bool Dart_IsString( - Object object, - ) { - return _Dart_IsString( - object, - ); - } +const int __IPHONE_14_0 = 140000; - late final _Dart_IsStringPtr = - _lookup>( - 'Dart_IsString'); - late final _Dart_IsString = - _Dart_IsStringPtr.asFunction(); +const int __IPHONE_14_1 = 140100; - bool Dart_IsStringLatin1( - Object object, - ) { - return _Dart_IsStringLatin1( - object, - ); - } +const int __IPHONE_14_2 = 140200; - late final _Dart_IsStringLatin1Ptr = - _lookup>( - 'Dart_IsStringLatin1'); - late final _Dart_IsStringLatin1 = - _Dart_IsStringLatin1Ptr.asFunction(); +const int __IPHONE_14_3 = 140300; - bool Dart_IsExternalString( - Object object, - ) { - return _Dart_IsExternalString( - object, - ); - } +const int __IPHONE_14_5 = 140500; - late final _Dart_IsExternalStringPtr = - _lookup>( - 'Dart_IsExternalString'); - late final _Dart_IsExternalString = - _Dart_IsExternalStringPtr.asFunction(); +const int __IPHONE_14_6 = 140600; - bool Dart_IsList( - Object object, - ) { - return _Dart_IsList( - object, - ); - } +const int __IPHONE_14_7 = 140700; - late final _Dart_IsListPtr = - _lookup>('Dart_IsList'); - late final _Dart_IsList = _Dart_IsListPtr.asFunction(); +const int __IPHONE_14_8 = 140800; - bool Dart_IsMap( - Object object, - ) { - return _Dart_IsMap( - object, - ); - } +const int __IPHONE_15_0 = 150000; - late final _Dart_IsMapPtr = - _lookup>('Dart_IsMap'); - late final _Dart_IsMap = _Dart_IsMapPtr.asFunction(); +const int __IPHONE_15_1 = 150100; - bool Dart_IsLibrary( - Object object, - ) { - return _Dart_IsLibrary( - object, - ); - } +const int __IPHONE_15_2 = 150200; - late final _Dart_IsLibraryPtr = - _lookup>( - 'Dart_IsLibrary'); - late final _Dart_IsLibrary = - _Dart_IsLibraryPtr.asFunction(); +const int __IPHONE_15_3 = 150300; - bool Dart_IsType( - Object handle, - ) { - return _Dart_IsType( - handle, - ); - } +const int __IPHONE_15_4 = 150400; - late final _Dart_IsTypePtr = - _lookup>('Dart_IsType'); - late final _Dart_IsType = _Dart_IsTypePtr.asFunction(); +const int __TVOS_9_0 = 90000; - bool Dart_IsFunction( - Object handle, - ) { - return _Dart_IsFunction( - handle, - ); - } +const int __TVOS_9_1 = 90100; - late final _Dart_IsFunctionPtr = - _lookup>( - 'Dart_IsFunction'); - late final _Dart_IsFunction = - _Dart_IsFunctionPtr.asFunction(); +const int __TVOS_9_2 = 90200; - bool Dart_IsVariable( - Object handle, - ) { - return _Dart_IsVariable( - handle, - ); - } +const int __TVOS_10_0 = 100000; - late final _Dart_IsVariablePtr = - _lookup>( - 'Dart_IsVariable'); - late final _Dart_IsVariable = - _Dart_IsVariablePtr.asFunction(); +const int __TVOS_10_0_1 = 100001; - bool Dart_IsTypeVariable( - Object handle, - ) { - return _Dart_IsTypeVariable( - handle, - ); - } +const int __TVOS_10_1 = 100100; - late final _Dart_IsTypeVariablePtr = - _lookup>( - 'Dart_IsTypeVariable'); - late final _Dart_IsTypeVariable = - _Dart_IsTypeVariablePtr.asFunction(); +const int __TVOS_10_2 = 100200; - bool Dart_IsClosure( - Object object, - ) { - return _Dart_IsClosure( - object, - ); - } +const int __TVOS_11_0 = 110000; - late final _Dart_IsClosurePtr = - _lookup>( - 'Dart_IsClosure'); - late final _Dart_IsClosure = - _Dart_IsClosurePtr.asFunction(); +const int __TVOS_11_1 = 110100; - bool Dart_IsTypedData( - Object object, - ) { - return _Dart_IsTypedData( - object, - ); - } +const int __TVOS_11_2 = 110200; - late final _Dart_IsTypedDataPtr = - _lookup>( - 'Dart_IsTypedData'); - late final _Dart_IsTypedData = - _Dart_IsTypedDataPtr.asFunction(); +const int __TVOS_11_3 = 110300; + +const int __TVOS_11_4 = 110400; + +const int __TVOS_12_0 = 120000; - bool Dart_IsByteBuffer( - Object object, - ) { - return _Dart_IsByteBuffer( - object, - ); - } +const int __TVOS_12_1 = 120100; - late final _Dart_IsByteBufferPtr = - _lookup>( - 'Dart_IsByteBuffer'); - late final _Dart_IsByteBuffer = - _Dart_IsByteBufferPtr.asFunction(); +const int __TVOS_12_2 = 120200; - bool Dart_IsFuture( - Object object, - ) { - return _Dart_IsFuture( - object, - ); - } +const int __TVOS_12_3 = 120300; - late final _Dart_IsFuturePtr = - _lookup>( - 'Dart_IsFuture'); - late final _Dart_IsFuture = - _Dart_IsFuturePtr.asFunction(); +const int __TVOS_12_4 = 120400; - /// Gets the type of a Dart language object. - /// - /// \param instance Some Dart object. - /// - /// \return If no error occurs, the type is returned. Otherwise an - /// error handle is returned. - Object Dart_InstanceGetType( - Object instance, - ) { - return _Dart_InstanceGetType( - instance, - ); - } +const int __TVOS_13_0 = 130000; - late final _Dart_InstanceGetTypePtr = - _lookup>( - 'Dart_InstanceGetType'); - late final _Dart_InstanceGetType = - _Dart_InstanceGetTypePtr.asFunction(); +const int __TVOS_13_2 = 130200; - /// Returns the name for the provided class type. - /// - /// \return A valid string handle if no error occurs during the - /// operation. - Object Dart_ClassName( - Object cls_type, - ) { - return _Dart_ClassName( - cls_type, - ); - } +const int __TVOS_13_3 = 130300; - late final _Dart_ClassNamePtr = - _lookup>( - 'Dart_ClassName'); - late final _Dart_ClassName = - _Dart_ClassNamePtr.asFunction(); +const int __TVOS_13_4 = 130400; - /// Returns the name for the provided function or method. - /// - /// \return A valid string handle if no error occurs during the - /// operation. - Object Dart_FunctionName( - Object function, - ) { - return _Dart_FunctionName( - function, - ); - } +const int __TVOS_14_0 = 140000; - late final _Dart_FunctionNamePtr = - _lookup>( - 'Dart_FunctionName'); - late final _Dart_FunctionName = - _Dart_FunctionNamePtr.asFunction(); +const int __TVOS_14_1 = 140100; - /// Returns a handle to the owner of a function. - /// - /// The owner of an instance method or a static method is its defining - /// class. The owner of a top-level function is its defining - /// library. The owner of the function of a non-implicit closure is the - /// function of the method or closure that defines the non-implicit - /// closure. - /// - /// \return A valid handle to the owner of the function, or an error - /// handle if the argument is not a valid handle to a function. - Object Dart_FunctionOwner( - Object function, - ) { - return _Dart_FunctionOwner( - function, - ); - } +const int __TVOS_14_2 = 140200; - late final _Dart_FunctionOwnerPtr = - _lookup>( - 'Dart_FunctionOwner'); - late final _Dart_FunctionOwner = - _Dart_FunctionOwnerPtr.asFunction(); +const int __TVOS_14_3 = 140300; - /// Determines whether a function handle referes to a static function - /// of method. - /// - /// For the purposes of the embedding API, a top-level function is - /// implicitly declared static. - /// - /// \param function A handle to a function or method declaration. - /// \param is_static Returns whether the function or method is declared static. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_FunctionIsStatic( - Object function, - ffi.Pointer is_static, - ) { - return _Dart_FunctionIsStatic( - function, - is_static, - ); - } +const int __TVOS_14_5 = 140500; - late final _Dart_FunctionIsStaticPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_FunctionIsStatic'); - late final _Dart_FunctionIsStatic = _Dart_FunctionIsStaticPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const int __TVOS_14_6 = 140600; - /// Is this object a closure resulting from a tear-off (closurized method)? - /// - /// Returns true for closures produced when an ordinary method is accessed - /// through a getter call. Returns false otherwise, in particular for closures - /// produced from local function declarations. - /// - /// \param object Some Object. - /// - /// \return true if Object is a tear-off. - bool Dart_IsTearOff( - Object object, - ) { - return _Dart_IsTearOff( - object, - ); - } +const int __TVOS_14_7 = 140700; - late final _Dart_IsTearOffPtr = - _lookup>( - 'Dart_IsTearOff'); - late final _Dart_IsTearOff = - _Dart_IsTearOffPtr.asFunction(); +const int __TVOS_15_0 = 150000; - /// Retrieves the function of a closure. - /// - /// \return A handle to the function of the closure, or an error handle if the - /// argument is not a closure. - Object Dart_ClosureFunction( - Object closure, - ) { - return _Dart_ClosureFunction( - closure, - ); - } +const int __TVOS_15_1 = 150100; - late final _Dart_ClosureFunctionPtr = - _lookup>( - 'Dart_ClosureFunction'); - late final _Dart_ClosureFunction = - _Dart_ClosureFunctionPtr.asFunction(); +const int __TVOS_15_2 = 150200; - /// Returns a handle to the library which contains class. - /// - /// \return A valid handle to the library with owns class, null if the class - /// has no library or an error handle if the argument is not a valid handle - /// to a class type. - Object Dart_ClassLibrary( - Object cls_type, - ) { - return _Dart_ClassLibrary( - cls_type, - ); - } +const int __TVOS_15_3 = 150300; - late final _Dart_ClassLibraryPtr = - _lookup>( - 'Dart_ClassLibrary'); - late final _Dart_ClassLibrary = - _Dart_ClassLibraryPtr.asFunction(); +const int __TVOS_15_4 = 150400; - /// Does this Integer fit into a 64-bit signed integer? - /// - /// \param integer An integer. - /// \param fits Returns true if the integer fits into a 64-bit signed integer. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerFitsIntoInt64( - Object integer, - ffi.Pointer fits, - ) { - return _Dart_IntegerFitsIntoInt64( - integer, - fits, - ); - } +const int __WATCHOS_1_0 = 10000; - late final _Dart_IntegerFitsIntoInt64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IntegerFitsIntoInt64'); - late final _Dart_IntegerFitsIntoInt64 = _Dart_IntegerFitsIntoInt64Ptr - .asFunction)>(); +const int __WATCHOS_2_0 = 20000; - /// Does this Integer fit into a 64-bit unsigned integer? - /// - /// \param integer An integer. - /// \param fits Returns true if the integer fits into a 64-bit unsigned integer. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerFitsIntoUint64( - Object integer, - ffi.Pointer fits, - ) { - return _Dart_IntegerFitsIntoUint64( - integer, - fits, - ); - } +const int __WATCHOS_2_1 = 20100; - late final _Dart_IntegerFitsIntoUint64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer)>>('Dart_IntegerFitsIntoUint64'); - late final _Dart_IntegerFitsIntoUint64 = _Dart_IntegerFitsIntoUint64Ptr - .asFunction)>(); +const int __WATCHOS_2_2 = 20200; - /// Returns an Integer with the provided value. - /// - /// \param value The value of the integer. - /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewInteger( - int value, - ) { - return _Dart_NewInteger( - value, - ); - } +const int __WATCHOS_3_0 = 30000; - late final _Dart_NewIntegerPtr = - _lookup>( - 'Dart_NewInteger'); - late final _Dart_NewInteger = - _Dart_NewIntegerPtr.asFunction(); +const int __WATCHOS_3_1 = 30100; - /// Returns an Integer with the provided value. - /// - /// \param value The unsigned value of the integer. - /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewIntegerFromUint64( - int value, - ) { - return _Dart_NewIntegerFromUint64( - value, - ); - } +const int __WATCHOS_3_1_1 = 30101; - late final _Dart_NewIntegerFromUint64Ptr = - _lookup>( - 'Dart_NewIntegerFromUint64'); - late final _Dart_NewIntegerFromUint64 = - _Dart_NewIntegerFromUint64Ptr.asFunction(); +const int __WATCHOS_3_2 = 30200; - /// Returns an Integer with the provided value. - /// - /// \param value The value of the integer represented as a C string - /// containing a hexadecimal number. - /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewIntegerFromHexCString( - ffi.Pointer value, - ) { - return _Dart_NewIntegerFromHexCString( - value, - ); - } +const int __WATCHOS_4_0 = 40000; - late final _Dart_NewIntegerFromHexCStringPtr = - _lookup)>>( - 'Dart_NewIntegerFromHexCString'); - late final _Dart_NewIntegerFromHexCString = _Dart_NewIntegerFromHexCStringPtr - .asFunction)>(); +const int __WATCHOS_4_1 = 40100; - /// Gets the value of an Integer. - /// - /// The integer must fit into a 64-bit signed integer, otherwise an error occurs. - /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToInt64( - Object integer, - ffi.Pointer value, - ) { - return _Dart_IntegerToInt64( - integer, - value, - ); - } +const int __WATCHOS_4_2 = 40200; - late final _Dart_IntegerToInt64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IntegerToInt64'); - late final _Dart_IntegerToInt64 = _Dart_IntegerToInt64Ptr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const int __WATCHOS_4_3 = 40300; - /// Gets the value of an Integer. - /// - /// The integer must fit into a 64-bit unsigned integer, otherwise an - /// error occurs. - /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToUint64( - Object integer, - ffi.Pointer value, - ) { - return _Dart_IntegerToUint64( - integer, - value, - ); - } +const int __WATCHOS_5_0 = 50000; - late final _Dart_IntegerToUint64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IntegerToUint64'); - late final _Dart_IntegerToUint64 = _Dart_IntegerToUint64Ptr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const int __WATCHOS_5_1 = 50100; - /// Gets the value of an integer as a hexadecimal C string. - /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer as a hexadecimal C - /// string. This C string is scope allocated and is only valid until - /// the next call to Dart_ExitScope. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToHexCString( - Object integer, - ffi.Pointer> value, - ) { - return _Dart_IntegerToHexCString( - integer, - value, - ); - } +const int __WATCHOS_5_2 = 50200; - late final _Dart_IntegerToHexCStringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer>)>>('Dart_IntegerToHexCString'); - late final _Dart_IntegerToHexCString = - _Dart_IntegerToHexCStringPtr.asFunction< - Object Function(Object, ffi.Pointer>)>(); +const int __WATCHOS_5_3 = 50300; - /// Returns a Double with the provided value. - /// - /// \param value A double. - /// - /// \return The Double object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewDouble( - double value, - ) { - return _Dart_NewDouble( - value, - ); - } +const int __WATCHOS_6_0 = 60000; - late final _Dart_NewDoublePtr = - _lookup>( - 'Dart_NewDouble'); - late final _Dart_NewDouble = - _Dart_NewDoublePtr.asFunction(); +const int __WATCHOS_6_1 = 60100; - /// Gets the value of a Double - /// - /// \param double_obj A Double - /// \param value Returns the value of the Double. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_DoubleValue( - Object double_obj, - ffi.Pointer value, - ) { - return _Dart_DoubleValue( - double_obj, - value, - ); - } +const int __WATCHOS_6_2 = 60200; - late final _Dart_DoubleValuePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_DoubleValue'); - late final _Dart_DoubleValue = _Dart_DoubleValuePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const int __WATCHOS_7_0 = 70000; - /// Returns a closure of static function 'function_name' in the class 'class_name' - /// in the exported namespace of specified 'library'. - /// - /// \param library Library object - /// \param cls_type Type object representing a Class - /// \param function_name Name of the static function in the class - /// - /// \return A valid Dart instance if no error occurs during the operation. - Object Dart_GetStaticMethodClosure( - Object library1, - Object cls_type, - Object function_name, - ) { - return _Dart_GetStaticMethodClosure( - library1, - cls_type, - function_name, - ); - } +const int __WATCHOS_7_1 = 70100; - late final _Dart_GetStaticMethodClosurePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, - ffi.Handle)>>('Dart_GetStaticMethodClosure'); - late final _Dart_GetStaticMethodClosure = _Dart_GetStaticMethodClosurePtr - .asFunction(); +const int __WATCHOS_7_2 = 70200; - /// Returns the True object. - /// - /// Requires there to be a current isolate. - /// - /// \return A handle to the True object. - Object Dart_True() { - return _Dart_True(); - } +const int __WATCHOS_7_3 = 70300; - late final _Dart_TruePtr = - _lookup>('Dart_True'); - late final _Dart_True = _Dart_TruePtr.asFunction(); +const int __WATCHOS_7_4 = 70400; - /// Returns the False object. - /// - /// Requires there to be a current isolate. - /// - /// \return A handle to the False object. - Object Dart_False() { - return _Dart_False(); - } +const int __WATCHOS_7_5 = 70500; - late final _Dart_FalsePtr = - _lookup>('Dart_False'); - late final _Dart_False = _Dart_FalsePtr.asFunction(); +const int __WATCHOS_7_6 = 70600; - /// Returns a Boolean with the provided value. - /// - /// \param value true or false. - /// - /// \return The Boolean object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewBoolean( - bool value, - ) { - return _Dart_NewBoolean( - value, - ); - } +const int __WATCHOS_8_0 = 80000; - late final _Dart_NewBooleanPtr = - _lookup>( - 'Dart_NewBoolean'); - late final _Dart_NewBoolean = - _Dart_NewBooleanPtr.asFunction(); +const int __WATCHOS_8_1 = 80100; - /// Gets the value of a Boolean - /// - /// \param boolean_obj A Boolean - /// \param value Returns the value of the Boolean. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_BooleanValue( - Object boolean_obj, - ffi.Pointer value, - ) { - return _Dart_BooleanValue( - boolean_obj, - value, - ); - } +const int __WATCHOS_8_3 = 80300; - late final _Dart_BooleanValuePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_BooleanValue'); - late final _Dart_BooleanValue = _Dart_BooleanValuePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const int __WATCHOS_8_4 = 80400; - /// Gets the length of a String. - /// - /// \param str A String. - /// \param length Returns the length of the String. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringLength( - Object str, - ffi.Pointer length, - ) { - return _Dart_StringLength( - str, - length, - ); - } +const int __WATCHOS_8_5 = 80500; - late final _Dart_StringLengthPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_StringLength'); - late final _Dart_StringLength = _Dart_StringLengthPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const int MAC_OS_X_VERSION_10_0 = 1000; - /// Returns a String built from the provided C string - /// (There is an implicit assumption that the C string passed in contains - /// UTF-8 encoded characters and '\0' is considered as a termination - /// character). - /// - /// \param value A C String - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromCString( - ffi.Pointer str, - ) { - return _Dart_NewStringFromCString( - str, - ); - } +const int MAC_OS_X_VERSION_10_1 = 1010; - late final _Dart_NewStringFromCStringPtr = - _lookup)>>( - 'Dart_NewStringFromCString'); - late final _Dart_NewStringFromCString = _Dart_NewStringFromCStringPtr - .asFunction)>(); +const int MAC_OS_X_VERSION_10_2 = 1020; + +const int MAC_OS_X_VERSION_10_3 = 1030; + +const int MAC_OS_X_VERSION_10_4 = 1040; - /// Returns a String built from an array of UTF-8 encoded characters. - /// - /// \param utf8_array An array of UTF-8 encoded characters. - /// \param length The length of the codepoints array. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF8( - ffi.Pointer utf8_array, - int length, - ) { - return _Dart_NewStringFromUTF8( - utf8_array, - length, - ); - } +const int MAC_OS_X_VERSION_10_5 = 1050; - late final _Dart_NewStringFromUTF8Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF8'); - late final _Dart_NewStringFromUTF8 = _Dart_NewStringFromUTF8Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); +const int MAC_OS_X_VERSION_10_6 = 1060; - /// Returns a String built from an array of UTF-16 encoded characters. - /// - /// \param utf16_array An array of UTF-16 encoded characters. - /// \param length The length of the codepoints array. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF16( - ffi.Pointer utf16_array, - int length, - ) { - return _Dart_NewStringFromUTF16( - utf16_array, - length, - ); - } +const int MAC_OS_X_VERSION_10_7 = 1070; - late final _Dart_NewStringFromUTF16Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF16'); - late final _Dart_NewStringFromUTF16 = _Dart_NewStringFromUTF16Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); +const int MAC_OS_X_VERSION_10_8 = 1080; - /// Returns a String built from an array of UTF-32 encoded characters. - /// - /// \param utf32_array An array of UTF-32 encoded characters. - /// \param length The length of the codepoints array. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF32( - ffi.Pointer utf32_array, - int length, - ) { - return _Dart_NewStringFromUTF32( - utf32_array, - length, - ); - } +const int MAC_OS_X_VERSION_10_9 = 1090; - late final _Dart_NewStringFromUTF32Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF32'); - late final _Dart_NewStringFromUTF32 = _Dart_NewStringFromUTF32Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); +const int MAC_OS_X_VERSION_10_10 = 101000; - /// Returns a String which references an external array of - /// Latin-1 (ISO-8859-1) encoded characters. - /// - /// \param latin1_array Array of Latin-1 encoded characters. This must not move. - /// \param length The length of the characters array. - /// \param peer An external pointer to associate with this string. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A callback to be called when this string is finalized. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalLatin1String( - ffi.Pointer latin1_array, - int length, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewExternalLatin1String( - latin1_array, - length, - peer, - external_allocation_size, - callback, - ); - } +const int MAC_OS_X_VERSION_10_10_2 = 101002; - late final _Dart_NewExternalLatin1StringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewExternalLatin1String'); - late final _Dart_NewExternalLatin1String = - _Dart_NewExternalLatin1StringPtr.asFunction< - Object Function(ffi.Pointer, int, ffi.Pointer, - int, Dart_HandleFinalizer)>(); +const int MAC_OS_X_VERSION_10_10_3 = 101003; - /// Returns a String which references an external array of UTF-16 encoded - /// characters. - /// - /// \param utf16_array An array of UTF-16 encoded characters. This must not move. - /// \param length The length of the characters array. - /// \param peer An external pointer to associate with this string. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A callback to be called when this string is finalized. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalUTF16String( - ffi.Pointer utf16_array, - int length, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewExternalUTF16String( - utf16_array, - length, - peer, - external_allocation_size, - callback, - ); - } +const int MAC_OS_X_VERSION_10_11 = 101100; - late final _Dart_NewExternalUTF16StringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewExternalUTF16String'); - late final _Dart_NewExternalUTF16String = - _Dart_NewExternalUTF16StringPtr.asFunction< - Object Function(ffi.Pointer, int, ffi.Pointer, - int, Dart_HandleFinalizer)>(); +const int MAC_OS_X_VERSION_10_11_2 = 101102; - /// Gets the C string representation of a String. - /// (It is a sequence of UTF-8 encoded values with a '\0' termination.) - /// - /// \param str A string. - /// \param cstr Returns the String represented as a C string. - /// This C string is scope allocated and is only valid until - /// the next call to Dart_ExitScope. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToCString( - Object str, - ffi.Pointer> cstr, - ) { - return _Dart_StringToCString( - str, - cstr, - ); - } +const int MAC_OS_X_VERSION_10_11_3 = 101103; - late final _Dart_StringToCStringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer>)>>('Dart_StringToCString'); - late final _Dart_StringToCString = _Dart_StringToCStringPtr.asFunction< - Object Function(Object, ffi.Pointer>)>(); +const int MAC_OS_X_VERSION_10_11_4 = 101104; - /// Gets a UTF-8 encoded representation of a String. - /// - /// Any unpaired surrogate code points in the string will be converted as - /// replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need - /// to preserve unpaired surrogates, use the Dart_StringToUTF16 function. - /// - /// \param str A string. - /// \param utf8_array Returns the String represented as UTF-8 code - /// units. This UTF-8 array is scope allocated and is only valid - /// until the next call to Dart_ExitScope. - /// \param length Used to return the length of the array which was - /// actually used. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToUTF8( - Object str, - ffi.Pointer> utf8_array, - ffi.Pointer length, - ) { - return _Dart_StringToUTF8( - str, - utf8_array, - length, - ); - } +const int MAC_OS_X_VERSION_10_12 = 101200; - late final _Dart_StringToUTF8Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer>, - ffi.Pointer)>>('Dart_StringToUTF8'); - late final _Dart_StringToUTF8 = _Dart_StringToUTF8Ptr.asFunction< - Object Function(Object, ffi.Pointer>, - ffi.Pointer)>(); +const int MAC_OS_X_VERSION_10_12_1 = 101201; - /// Gets the data corresponding to the string object. This function returns - /// the data only for Latin-1 (ISO-8859-1) string objects. For all other - /// string objects it returns an error. - /// - /// \param str A string. - /// \param latin1_array An array allocated by the caller, used to return - /// the string data. - /// \param length Used to pass in the length of the provided array. - /// Used to return the length of the array which was actually used. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToLatin1( - Object str, - ffi.Pointer latin1_array, - ffi.Pointer length, - ) { - return _Dart_StringToLatin1( - str, - latin1_array, - length, - ); - } +const int MAC_OS_X_VERSION_10_12_2 = 101202; - late final _Dart_StringToLatin1Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer, - ffi.Pointer)>>('Dart_StringToLatin1'); - late final _Dart_StringToLatin1 = _Dart_StringToLatin1Ptr.asFunction< - Object Function( - Object, ffi.Pointer, ffi.Pointer)>(); +const int MAC_OS_X_VERSION_10_12_4 = 101204; - /// Gets the UTF-16 encoded representation of a string. - /// - /// \param str A string. - /// \param utf16_array An array allocated by the caller, used to return - /// the array of UTF-16 encoded characters. - /// \param length Used to pass in the length of the provided array. - /// Used to return the length of the array which was actually used. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToUTF16( - Object str, - ffi.Pointer utf16_array, - ffi.Pointer length, - ) { - return _Dart_StringToUTF16( - str, - utf16_array, - length, - ); - } +const int MAC_OS_X_VERSION_10_13 = 101300; - late final _Dart_StringToUTF16Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer, - ffi.Pointer)>>('Dart_StringToUTF16'); - late final _Dart_StringToUTF16 = _Dart_StringToUTF16Ptr.asFunction< - Object Function( - Object, ffi.Pointer, ffi.Pointer)>(); +const int MAC_OS_X_VERSION_10_13_1 = 101301; - /// Gets the storage size in bytes of a String. - /// - /// \param str A String. - /// \param length Returns the storage size in bytes of the String. - /// This is the size in bytes needed to store the String. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringStorageSize( - Object str, - ffi.Pointer size, - ) { - return _Dart_StringStorageSize( - str, - size, - ); - } +const int MAC_OS_X_VERSION_10_13_2 = 101302; - late final _Dart_StringStorageSizePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_StringStorageSize'); - late final _Dart_StringStorageSize = _Dart_StringStorageSizePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const int MAC_OS_X_VERSION_10_13_4 = 101304; - /// Retrieves some properties associated with a String. - /// Properties retrieved are: - /// - character size of the string (one or two byte) - /// - length of the string - /// - peer pointer of string if it is an external string. - /// \param str A String. - /// \param char_size Returns the character size of the String. - /// \param str_len Returns the length of the String. - /// \param peer Returns the peer pointer associated with the String or 0 if - /// there is no peer pointer for it. - /// \return Success if no error occurs. Otherwise returns - /// an error handle. - Object Dart_StringGetProperties( - Object str, - ffi.Pointer char_size, - ffi.Pointer str_len, - ffi.Pointer> peer, - ) { - return _Dart_StringGetProperties( - str, - char_size, - str_len, - peer, - ); - } +const int MAC_OS_X_VERSION_10_14 = 101400; - late final _Dart_StringGetPropertiesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('Dart_StringGetProperties'); - late final _Dart_StringGetProperties = - _Dart_StringGetPropertiesPtr.asFunction< - Object Function(Object, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); +const int MAC_OS_X_VERSION_10_14_1 = 101401; - /// Returns a List of the desired length. - /// - /// \param length The length of the list. - /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewList( - int length, - ) { - return _Dart_NewList( - length, - ); - } +const int MAC_OS_X_VERSION_10_14_4 = 101404; - late final _Dart_NewListPtr = - _lookup>( - 'Dart_NewList'); - late final _Dart_NewList = - _Dart_NewListPtr.asFunction(); +const int MAC_OS_X_VERSION_10_14_6 = 101406; - /// TODO(bkonyi): convert this to use nullable types once NNBD is enabled. - /// /** - /// * Returns a List of the desired length with the desired legacy element type. - /// * - /// * \param element_type_id The type of elements of the list. - /// * \param length The length of the list. - /// * - /// * \return The List object if no error occurs. Otherwise returns an error - /// * handle. - /// */ - Object Dart_NewListOf( - int element_type_id, - int length, - ) { - return _Dart_NewListOf( - element_type_id, - length, - ); - } +const int MAC_OS_X_VERSION_10_15 = 101500; - late final _Dart_NewListOfPtr = - _lookup>( - 'Dart_NewListOf'); - late final _Dart_NewListOf = - _Dart_NewListOfPtr.asFunction(); +const int MAC_OS_X_VERSION_10_15_1 = 101501; - /// Returns a List of the desired length with the desired element type. - /// - /// \param element_type Handle to a nullable type object. E.g., from - /// Dart_GetType or Dart_GetNullableType. - /// - /// \param length The length of the list. - /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewListOfType( - Object element_type, - int length, - ) { - return _Dart_NewListOfType( - element_type, - length, - ); - } +const int MAC_OS_X_VERSION_10_16 = 101600; - late final _Dart_NewListOfTypePtr = - _lookup>( - 'Dart_NewListOfType'); - late final _Dart_NewListOfType = - _Dart_NewListOfTypePtr.asFunction(); +const int MAC_OS_VERSION_11_0 = 110000; - /// Returns a List of the desired length with the desired element type, filled - /// with the provided object. - /// - /// \param element_type Handle to a type object. E.g., from Dart_GetType. - /// - /// \param fill_object Handle to an object of type 'element_type' that will be - /// used to populate the list. This parameter can only be Dart_Null() if the - /// length of the list is 0 or 'element_type' is a nullable type. - /// - /// \param length The length of the list. - /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewListOfTypeFilled( - Object element_type, - Object fill_object, - int length, - ) { - return _Dart_NewListOfTypeFilled( - element_type, - fill_object, - length, - ); - } +const int MAC_OS_VERSION_12_0 = 120000; - late final _Dart_NewListOfTypeFilledPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Handle, ffi.IntPtr)>>('Dart_NewListOfTypeFilled'); - late final _Dart_NewListOfTypeFilled = _Dart_NewListOfTypeFilledPtr - .asFunction(); +const int __DRIVERKIT_19_0 = 190000; - /// Gets the length of a List. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param length Returns the length of the List. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ListLength( - Object list, - ffi.Pointer length, - ) { - return _Dart_ListLength( - list, - length, - ); - } +const int __DRIVERKIT_20_0 = 200000; - late final _Dart_ListLengthPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_ListLength'); - late final _Dart_ListLength = _Dart_ListLengthPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const int __DRIVERKIT_21_0 = 210000; - /// Gets the Object at some index of a List. - /// - /// If the index is out of bounds, an error occurs. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param index A valid index into the List. - /// - /// \return The Object in the List at the specified index if no error - /// occurs. Otherwise returns an error handle. - Object Dart_ListGetAt( - Object list, - int index, - ) { - return _Dart_ListGetAt( - list, - index, - ); - } +const int __MAC_OS_X_VERSION_MIN_REQUIRED = 120000; - late final _Dart_ListGetAtPtr = - _lookup>( - 'Dart_ListGetAt'); - late final _Dart_ListGetAt = - _Dart_ListGetAtPtr.asFunction(); +const int __MAC_OS_X_VERSION_MAX_ALLOWED = 120300; - /// Gets a range of Objects from a List. - /// - /// If any of the requested index values are out of bounds, an error occurs. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param offset The offset of the first item to get. - /// \param length The number of items to get. - /// \param result A pointer to fill with the objects. - /// - /// \return Success if no error occurs during the operation. - Object Dart_ListGetRange( - Object list, - int offset, - int length, - ffi.Pointer result, - ) { - return _Dart_ListGetRange( - list, - offset, - length, - result, - ); - } +const int __ENABLE_LEGACY_MAC_AVAILABILITY = 1; - late final _Dart_ListGetRangePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.IntPtr, - ffi.Pointer)>>('Dart_ListGetRange'); - late final _Dart_ListGetRange = _Dart_ListGetRangePtr.asFunction< - Object Function(Object, int, int, ffi.Pointer)>(); +const int __DARWIN_FD_SETSIZE = 1024; - /// Sets the Object at some index of a List. - /// - /// If the index is out of bounds, an error occurs. - /// - /// May generate an unhandled exception error. - /// - /// \param array A List. - /// \param index A valid index into the List. - /// \param value The Object to put in the List. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ListSetAt( - Object list, - int index, - Object value, - ) { - return _Dart_ListSetAt( - list, - index, - value, - ); - } +const int __DARWIN_NBBY = 8; + +const int NBBY = 8; + +const int FD_SETSIZE = 1024; - late final _Dart_ListSetAtPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.IntPtr, ffi.Handle)>>('Dart_ListSetAt'); - late final _Dart_ListSetAt = - _Dart_ListSetAtPtr.asFunction(); +const int MAC_OS_VERSION_11_1 = 110100; - /// May generate an unhandled exception error. - Object Dart_ListGetAsBytes( - Object list, - int offset, - ffi.Pointer native_array, - int length, - ) { - return _Dart_ListGetAsBytes( - list, - offset, - native_array, - length, - ); - } +const int MAC_OS_VERSION_11_3 = 110300; - late final _Dart_ListGetAsBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, - ffi.IntPtr)>>('Dart_ListGetAsBytes'); - late final _Dart_ListGetAsBytes = _Dart_ListGetAsBytesPtr.asFunction< - Object Function(Object, int, ffi.Pointer, int)>(); +const int MAC_OS_X_VERSION_MIN_REQUIRED = 120000; - /// May generate an unhandled exception error. - Object Dart_ListSetAsBytes( - Object list, - int offset, - ffi.Pointer native_array, - int length, - ) { - return _Dart_ListSetAsBytes( - list, - offset, - native_array, - length, - ); - } +const int MAC_OS_X_VERSION_MAX_ALLOWED = 120000; - late final _Dart_ListSetAsBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, - ffi.IntPtr)>>('Dart_ListSetAsBytes'); - late final _Dart_ListSetAsBytes = _Dart_ListSetAsBytesPtr.asFunction< - Object Function(Object, int, ffi.Pointer, int)>(); +const int __AVAILABILITY_MACROS_USES_AVAILABILITY = 1; - /// Gets the Object at some key of a Map. - /// - /// May generate an unhandled exception error. - /// - /// \param map A Map. - /// \param key An Object. - /// - /// \return The value in the map at the specified key, null if the map does not - /// contain the key, or an error handle. - Object Dart_MapGetAt( - Object map, - Object key, - ) { - return _Dart_MapGetAt( - map, - key, - ); - } +const int OBJC_API_VERSION = 2; - late final _Dart_MapGetAtPtr = - _lookup>( - 'Dart_MapGetAt'); - late final _Dart_MapGetAt = - _Dart_MapGetAtPtr.asFunction(); +const int OBJC_NO_GC = 1; - /// Returns whether the Map contains a given key. - /// - /// May generate an unhandled exception error. - /// - /// \param map A Map. - /// - /// \return A handle on a boolean indicating whether map contains the key. - /// Otherwise returns an error handle. - Object Dart_MapContainsKey( - Object map, - Object key, - ) { - return _Dart_MapContainsKey( - map, - key, - ); - } +const int NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER = 1; - late final _Dart_MapContainsKeyPtr = - _lookup>( - 'Dart_MapContainsKey'); - late final _Dart_MapContainsKey = - _Dart_MapContainsKeyPtr.asFunction(); +const int OBJC_OLD_DISPATCH_PROTOTYPES = 0; - /// Gets the list of keys of a Map. - /// - /// May generate an unhandled exception error. - /// - /// \param map A Map. - /// - /// \return The list of key Objects if no error occurs. Otherwise returns an - /// error handle. - Object Dart_MapKeys( - Object map, - ) { - return _Dart_MapKeys( - map, - ); - } +const int true1 = 1; - late final _Dart_MapKeysPtr = - _lookup>( - 'Dart_MapKeys'); - late final _Dart_MapKeys = - _Dart_MapKeysPtr.asFunction(); +const int false1 = 0; - /// Return type if this object is a TypedData object. - /// - /// \return kInvalid if the object is not a TypedData object or the appropriate - /// Dart_TypedData_Type. - int Dart_GetTypeOfTypedData( - Object object, - ) { - return _Dart_GetTypeOfTypedData( - object, - ); - } +const int __bool_true_false_are_defined = 1; - late final _Dart_GetTypeOfTypedDataPtr = - _lookup>( - 'Dart_GetTypeOfTypedData'); - late final _Dart_GetTypeOfTypedData = - _Dart_GetTypeOfTypedDataPtr.asFunction(); +const int OBJC_BOOL_IS_BOOL = 1; - /// Return type if this object is an external TypedData object. - /// - /// \return kInvalid if the object is not an external TypedData object or - /// the appropriate Dart_TypedData_Type. - int Dart_GetTypeOfExternalTypedData( - Object object, - ) { - return _Dart_GetTypeOfExternalTypedData( - object, - ); - } +const int YES = 1; - late final _Dart_GetTypeOfExternalTypedDataPtr = - _lookup>( - 'Dart_GetTypeOfExternalTypedData'); - late final _Dart_GetTypeOfExternalTypedData = - _Dart_GetTypeOfExternalTypedDataPtr.asFunction(); +const int NO = 0; - /// Returns a TypedData object of the desired length and type. - /// - /// \param type The type of the TypedData object. - /// \param length The length of the TypedData object (length in type units). - /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewTypedData( - int type, - int length, - ) { - return _Dart_NewTypedData( - type, - length, - ); - } +const int NSIntegerMax = 9223372036854775807; - late final _Dart_NewTypedDataPtr = - _lookup>( - 'Dart_NewTypedData'); - late final _Dart_NewTypedData = - _Dart_NewTypedDataPtr.asFunction(); +const int NSIntegerMin = -9223372036854775808; - /// Returns a TypedData object which references an external data array. - /// - /// \param type The type of the data array. - /// \param data A data array. This array must not move. - /// \param length The length of the data array (length in type units). - /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalTypedData( - int type, - ffi.Pointer data, - int length, - ) { - return _Dart_NewExternalTypedData( - type, - data, - length, - ); - } +const int NSUIntegerMax = -1; - late final _Dart_NewExternalTypedDataPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Int32, ffi.Pointer, - ffi.IntPtr)>>('Dart_NewExternalTypedData'); - late final _Dart_NewExternalTypedData = _Dart_NewExternalTypedDataPtr - .asFunction, int)>(); +const int NSINTEGER_DEFINED = 1; - /// Returns a TypedData object which references an external data array. - /// - /// \param type The type of the data array. - /// \param data A data array. This array must not move. - /// \param length The length of the data array (length in type units). - /// \param peer A pointer to a native object or NULL. This value is - /// provided to callback when it is invoked. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A function pointer that will be invoked sometime - /// after the object is garbage collected, unless the handle has been deleted. - /// A valid callback needs to be specified it cannot be NULL. - /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalTypedDataWithFinalizer( - int type, - ffi.Pointer data, - int length, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewExternalTypedDataWithFinalizer( - type, - data, - length, - peer, - external_allocation_size, - callback, - ); - } +const int __GNUC_VA_LIST = 1; - late final _Dart_NewExternalTypedDataWithFinalizerPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Int32, - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewExternalTypedDataWithFinalizer'); - late final _Dart_NewExternalTypedDataWithFinalizer = - _Dart_NewExternalTypedDataWithFinalizerPtr.asFunction< - Object Function(int, ffi.Pointer, int, - ffi.Pointer, int, Dart_HandleFinalizer)>(); +const int __DARWIN_CLK_TCK = 100; - /// Returns a ByteBuffer object for the typed data. - /// - /// \param type_data The TypedData object. - /// - /// \return The ByteBuffer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewByteBuffer( - Object typed_data, - ) { - return _Dart_NewByteBuffer( - typed_data, - ); - } +const int CHAR_BIT = 8; - late final _Dart_NewByteBufferPtr = - _lookup>( - 'Dart_NewByteBuffer'); - late final _Dart_NewByteBuffer = - _Dart_NewByteBufferPtr.asFunction(); +const int MB_LEN_MAX = 6; - /// Acquires access to the internal data address of a TypedData object. - /// - /// \param object The typed data object whose internal data address is to - /// be accessed. - /// \param type The type of the object is returned here. - /// \param data The internal data address is returned here. - /// \param len Size of the typed array is returned here. - /// - /// Notes: - /// When the internal address of the object is acquired any calls to a - /// Dart API function that could potentially allocate an object or run - /// any Dart code will return an error. - /// - /// Any Dart API functions for accessing the data should not be called - /// before the corresponding release. In particular, the object should - /// not be acquired again before its release. This leads to undefined - /// behavior. - /// - /// \return Success if the internal data address is acquired successfully. - /// Otherwise, returns an error handle. - Object Dart_TypedDataAcquireData( - Object object, - ffi.Pointer type, - ffi.Pointer> data, - ffi.Pointer len, - ) { - return _Dart_TypedDataAcquireData( - object, - type, - data, - len, - ); - } +const int CLK_TCK = 100; - late final _Dart_TypedDataAcquireDataPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('Dart_TypedDataAcquireData'); - late final _Dart_TypedDataAcquireData = - _Dart_TypedDataAcquireDataPtr.asFunction< - Object Function(Object, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); +const int SCHAR_MAX = 127; - /// Releases access to the internal data address that was acquired earlier using - /// Dart_TypedDataAcquireData. - /// - /// \param object The typed data object whose internal data address is to be - /// released. - /// - /// \return Success if the internal data address is released successfully. - /// Otherwise, returns an error handle. - Object Dart_TypedDataReleaseData( - Object object, - ) { - return _Dart_TypedDataReleaseData( - object, - ); - } +const int SCHAR_MIN = -128; - late final _Dart_TypedDataReleaseDataPtr = - _lookup>( - 'Dart_TypedDataReleaseData'); - late final _Dart_TypedDataReleaseData = - _Dart_TypedDataReleaseDataPtr.asFunction(); +const int UCHAR_MAX = 255; - /// Returns the TypedData object associated with the ByteBuffer object. - /// - /// \param byte_buffer The ByteBuffer object. - /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_GetDataFromByteBuffer( - Object byte_buffer, - ) { - return _Dart_GetDataFromByteBuffer( - byte_buffer, - ); - } +const int CHAR_MAX = 127; - late final _Dart_GetDataFromByteBufferPtr = - _lookup>( - 'Dart_GetDataFromByteBuffer'); - late final _Dart_GetDataFromByteBuffer = - _Dart_GetDataFromByteBufferPtr.asFunction(); +const int CHAR_MIN = -128; - /// Invokes a constructor, creating a new object. - /// - /// This function allows hidden constructors (constructors with leading - /// underscores) to be called. - /// - /// \param type Type of object to be constructed. - /// \param constructor_name The name of the constructor to invoke. Use - /// Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. - /// This name should not include the name of the class. - /// \param number_of_arguments Size of the arguments array. - /// \param arguments An array of arguments to the constructor. - /// - /// \return If the constructor is called and completes successfully, - /// then the new object. If an error occurs during execution, then an - /// error handle is returned. - Object Dart_New( - Object type, - Object constructor_name, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_New( - type, - constructor_name, - number_of_arguments, - arguments, - ); - } +const int USHRT_MAX = 65535; - late final _Dart_NewPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_New'); - late final _Dart_New = _Dart_NewPtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); +const int SHRT_MAX = 32767; - /// Allocate a new object without invoking a constructor. - /// - /// \param type The type of an object to be allocated. - /// - /// \return The new object. If an error occurs during execution, then an - /// error handle is returned. - Object Dart_Allocate( - Object type, - ) { - return _Dart_Allocate( - type, - ); - } +const int SHRT_MIN = -32768; - late final _Dart_AllocatePtr = - _lookup>( - 'Dart_Allocate'); - late final _Dart_Allocate = - _Dart_AllocatePtr.asFunction(); +const int UINT_MAX = 4294967295; - /// Allocate a new object without invoking a constructor, and sets specified - /// native fields. - /// - /// \param type The type of an object to be allocated. - /// \param num_native_fields The number of native fields to set. - /// \param native_fields An array containing the value of native fields. - /// - /// \return The new object. If an error occurs during execution, then an - /// error handle is returned. - Object Dart_AllocateWithNativeFields( - Object type, - int num_native_fields, - ffi.Pointer native_fields, - ) { - return _Dart_AllocateWithNativeFields( - type, - num_native_fields, - native_fields, - ); - } +const int INT_MAX = 2147483647; - late final _Dart_AllocateWithNativeFieldsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_AllocateWithNativeFields'); - late final _Dart_AllocateWithNativeFields = _Dart_AllocateWithNativeFieldsPtr - .asFunction)>(); +const int INT_MIN = -2147483648; - /// Invokes a method or function. - /// - /// The 'target' parameter may be an object, type, or library. If - /// 'target' is an object, then this function will invoke an instance - /// method. If 'target' is a type, then this function will invoke a - /// static method. If 'target' is a library, then this function will - /// invoke a top-level function from that library. - /// NOTE: This API call cannot be used to invoke methods of a type object. - /// - /// This function ignores visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. - /// - /// \param target An object, type, or library. - /// \param name The name of the function or method to invoke. - /// \param number_of_arguments Size of the arguments array. - /// \param arguments An array of arguments to the function. - /// - /// \return If the function or method is called and completes - /// successfully, then the return value is returned. If an error - /// occurs during execution, then an error handle is returned. - Object Dart_Invoke( - Object target, - Object name, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_Invoke( - target, - name, - number_of_arguments, - arguments, - ); - } +const int ULONG_MAX = -1; - late final _Dart_InvokePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_Invoke'); - late final _Dart_Invoke = _Dart_InvokePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); +const int LONG_MAX = 9223372036854775807; - /// Invokes a Closure with the given arguments. - /// - /// May generate an unhandled exception error. - /// - /// \return If no error occurs during execution, then the result of - /// invoking the closure is returned. If an error occurs during - /// execution, then an error handle is returned. - Object Dart_InvokeClosure( - Object closure, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_InvokeClosure( - closure, - number_of_arguments, - arguments, - ); - } +const int LONG_MIN = -9223372036854775808; - late final _Dart_InvokeClosurePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_InvokeClosure'); - late final _Dart_InvokeClosure = _Dart_InvokeClosurePtr.asFunction< - Object Function(Object, int, ffi.Pointer)>(); +const int ULLONG_MAX = -1; - /// Invokes a Generative Constructor on an object that was previously - /// allocated using Dart_Allocate/Dart_AllocateWithNativeFields. - /// - /// The 'target' parameter must be an object. - /// - /// This function ignores visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. - /// - /// \param target An object. - /// \param name The name of the constructor to invoke. - /// Use Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. - /// \param number_of_arguments Size of the arguments array. - /// \param arguments An array of arguments to the function. - /// - /// \return If the constructor is called and completes - /// successfully, then the object is returned. If an error - /// occurs during execution, then an error handle is returned. - Object Dart_InvokeConstructor( - Object object, - Object name, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_InvokeConstructor( - object, - name, - number_of_arguments, - arguments, - ); - } +const int LLONG_MAX = 9223372036854775807; + +const int LLONG_MIN = -9223372036854775808; + +const int LONG_BIT = 64; + +const int SSIZE_MAX = 9223372036854775807; + +const int WORD_BIT = 32; + +const int SIZE_T_MAX = -1; - late final _Dart_InvokeConstructorPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_InvokeConstructor'); - late final _Dart_InvokeConstructor = _Dart_InvokeConstructorPtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); +const int UQUAD_MAX = -1; - /// Gets the value of a field. - /// - /// The 'container' parameter may be an object, type, or library. If - /// 'container' is an object, then this function will access an - /// instance field. If 'container' is a type, then this function will - /// access a static field. If 'container' is a library, then this - /// function will access a top-level variable. - /// NOTE: This API call cannot be used to access fields of a type object. - /// - /// This function ignores field visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. - /// - /// \param container An object, type, or library. - /// \param name A field name. - /// - /// \return If no error occurs, then the value of the field is - /// returned. Otherwise an error handle is returned. - Object Dart_GetField( - Object container, - Object name, - ) { - return _Dart_GetField( - container, - name, - ); - } +const int QUAD_MAX = 9223372036854775807; - late final _Dart_GetFieldPtr = - _lookup>( - 'Dart_GetField'); - late final _Dart_GetField = - _Dart_GetFieldPtr.asFunction(); +const int QUAD_MIN = -9223372036854775808; - /// Sets the value of a field. - /// - /// The 'container' parameter may actually be an object, type, or - /// library. If 'container' is an object, then this function will - /// access an instance field. If 'container' is a type, then this - /// function will access a static field. If 'container' is a library, - /// then this function will access a top-level variable. - /// NOTE: This API call cannot be used to access fields of a type object. - /// - /// This function ignores field visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. - /// - /// \param container An object, type, or library. - /// \param name A field name. - /// \param value The new field value. - /// - /// \return A valid handle if no error occurs. - Object Dart_SetField( - Object container, - Object name, - Object value, - ) { - return _Dart_SetField( - container, - name, - value, - ); - } +const int ARG_MAX = 1048576; - late final _Dart_SetFieldPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Handle, ffi.Handle)>>('Dart_SetField'); - late final _Dart_SetField = - _Dart_SetFieldPtr.asFunction(); +const int CHILD_MAX = 266; - /// Throws an exception. - /// - /// This function causes a Dart language exception to be thrown. This - /// will proceed in the standard way, walking up Dart frames until an - /// appropriate 'catch' block is found, executing 'finally' blocks, - /// etc. - /// - /// If an error handle is passed into this function, the error is - /// propagated immediately. See Dart_PropagateError for a discussion - /// of error propagation. - /// - /// If successful, this function does not return. Note that this means - /// that the destructors of any stack-allocated C++ objects will not be - /// called. If there are no Dart frames on the stack, an error occurs. - /// - /// \return An error handle if the exception was not thrown. - /// Otherwise the function does not return. - Object Dart_ThrowException( - Object exception, - ) { - return _Dart_ThrowException( - exception, - ); - } +const int GID_MAX = 2147483647; - late final _Dart_ThrowExceptionPtr = - _lookup>( - 'Dart_ThrowException'); - late final _Dart_ThrowException = - _Dart_ThrowExceptionPtr.asFunction(); +const int LINK_MAX = 32767; - /// Rethrows an exception. - /// - /// Rethrows an exception, unwinding all dart frames on the stack. If - /// successful, this function does not return. Note that this means - /// that the destructors of any stack-allocated C++ objects will not be - /// called. If there are no Dart frames on the stack, an error occurs. - /// - /// \return An error handle if the exception was not thrown. - /// Otherwise the function does not return. - Object Dart_ReThrowException( - Object exception, - Object stacktrace, - ) { - return _Dart_ReThrowException( - exception, - stacktrace, - ); - } +const int MAX_CANON = 1024; - late final _Dart_ReThrowExceptionPtr = - _lookup>( - 'Dart_ReThrowException'); - late final _Dart_ReThrowException = - _Dart_ReThrowExceptionPtr.asFunction(); +const int MAX_INPUT = 1024; - /// Gets the number of native instance fields in an object. - Object Dart_GetNativeInstanceFieldCount( - Object obj, - ffi.Pointer count, - ) { - return _Dart_GetNativeInstanceFieldCount( - obj, - count, - ); - } +const int NAME_MAX = 255; - late final _Dart_GetNativeInstanceFieldCountPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer)>>('Dart_GetNativeInstanceFieldCount'); - late final _Dart_GetNativeInstanceFieldCount = - _Dart_GetNativeInstanceFieldCountPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const int NGROUPS_MAX = 16; - /// Gets the value of a native field. - /// - /// TODO(turnidge): Document. - Object Dart_GetNativeInstanceField( - Object obj, - int index, - ffi.Pointer value, - ) { - return _Dart_GetNativeInstanceField( - obj, - index, - value, - ); - } +const int UID_MAX = 2147483647; - late final _Dart_GetNativeInstanceFieldPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeInstanceField'); - late final _Dart_GetNativeInstanceField = _Dart_GetNativeInstanceFieldPtr - .asFunction)>(); +const int OPEN_MAX = 10240; - /// Sets the value of a native field. - /// - /// TODO(turnidge): Document. - Object Dart_SetNativeInstanceField( - Object obj, - int index, - int value, - ) { - return _Dart_SetNativeInstanceField( - obj, - index, - value, - ); - } +const int PATH_MAX = 1024; - late final _Dart_SetNativeInstanceFieldPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Int, ffi.IntPtr)>>('Dart_SetNativeInstanceField'); - late final _Dart_SetNativeInstanceField = _Dart_SetNativeInstanceFieldPtr - .asFunction(); +const int PIPE_BUF = 512; - /// Extracts current isolate group data from the native arguments structure. - ffi.Pointer Dart_GetNativeIsolateGroupData( - Dart_NativeArguments args, - ) { - return _Dart_GetNativeIsolateGroupData( - args, - ); - } +const int BC_BASE_MAX = 99; - late final _Dart_GetNativeIsolateGroupDataPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - Dart_NativeArguments)>>('Dart_GetNativeIsolateGroupData'); - late final _Dart_GetNativeIsolateGroupData = - _Dart_GetNativeIsolateGroupDataPtr.asFunction< - ffi.Pointer Function(Dart_NativeArguments)>(); +const int BC_DIM_MAX = 2048; - /// Gets the native arguments based on the types passed in and populates - /// the passed arguments buffer with appropriate native values. - /// - /// \param args the Native arguments block passed into the native call. - /// \param num_arguments length of argument descriptor array and argument - /// values array passed in. - /// \param arg_descriptors an array that describes the arguments that - /// need to be retrieved. For each argument to be retrieved the descriptor - /// contains the argument number (0, 1 etc.) and the argument type - /// described using Dart_NativeArgument_Type, e.g: - /// DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kBool, 1) indicates - /// that the first argument is to be retrieved and it should be a boolean. - /// \param arg_values array into which the native arguments need to be - /// extracted into, the array is allocated by the caller (it could be - /// stack allocated to avoid the malloc/free performance overhead). - /// - /// \return Success if all the arguments could be extracted correctly, - /// returns an error handle if there were any errors while extracting the - /// arguments (mismatched number of arguments, incorrect types, etc.). - Object Dart_GetNativeArguments( - Dart_NativeArguments args, - int num_arguments, - ffi.Pointer arg_descriptors, - ffi.Pointer arg_values, - ) { - return _Dart_GetNativeArguments( - args, - num_arguments, - arg_descriptors, - arg_values, - ); - } +const int BC_SCALE_MAX = 99; - late final _Dart_GetNativeArgumentsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_NativeArguments, - ffi.Int, - ffi.Pointer, - ffi.Pointer)>>( - 'Dart_GetNativeArguments'); - late final _Dart_GetNativeArguments = _Dart_GetNativeArgumentsPtr.asFunction< - Object Function( - Dart_NativeArguments, - int, - ffi.Pointer, - ffi.Pointer)>(); +const int BC_STRING_MAX = 1000; - /// Gets the native argument at some index. - Object Dart_GetNativeArgument( - Dart_NativeArguments args, - int index, - ) { - return _Dart_GetNativeArgument( - args, - index, - ); - } +const int CHARCLASS_NAME_MAX = 14; - late final _Dart_GetNativeArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_NativeArguments, ffi.Int)>>('Dart_GetNativeArgument'); - late final _Dart_GetNativeArgument = _Dart_GetNativeArgumentPtr.asFunction< - Object Function(Dart_NativeArguments, int)>(); +const int COLL_WEIGHTS_MAX = 2; - /// Gets the number of native arguments. - int Dart_GetNativeArgumentCount( - Dart_NativeArguments args, - ) { - return _Dart_GetNativeArgumentCount( - args, - ); - } +const int EQUIV_CLASS_MAX = 2; - late final _Dart_GetNativeArgumentCountPtr = - _lookup>( - 'Dart_GetNativeArgumentCount'); - late final _Dart_GetNativeArgumentCount = _Dart_GetNativeArgumentCountPtr - .asFunction(); +const int EXPR_NEST_MAX = 32; - /// Gets all the native fields of the native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param num_fields size of the intptr_t array 'field_values' passed in. - /// \param field_values intptr_t array in which native field values are returned. - /// \return Success if the native fields where copied in successfully. Otherwise - /// returns an error handle. On success the native field values are copied - /// into the 'field_values' array, if the argument at 'arg_index' is a - /// null object then 0 is copied as the native field values into the - /// 'field_values' array. - Object Dart_GetNativeFieldsOfArgument( - Dart_NativeArguments args, - int arg_index, - int num_fields, - ffi.Pointer field_values, - ) { - return _Dart_GetNativeFieldsOfArgument( - args, - arg_index, - num_fields, - field_values, - ); - } +const int LINE_MAX = 2048; - late final _Dart_GetNativeFieldsOfArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeFieldsOfArgument'); - late final _Dart_GetNativeFieldsOfArgument = - _Dart_GetNativeFieldsOfArgumentPtr.asFunction< - Object Function( - Dart_NativeArguments, int, int, ffi.Pointer)>(); +const int RE_DUP_MAX = 255; - /// Gets the native field of the receiver. - Object Dart_GetNativeReceiver( - Dart_NativeArguments args, - ffi.Pointer value, - ) { - return _Dart_GetNativeReceiver( - args, - value, - ); - } +const int NZERO = 20; - late final _Dart_GetNativeReceiverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, - ffi.Pointer)>>('Dart_GetNativeReceiver'); - late final _Dart_GetNativeReceiver = _Dart_GetNativeReceiverPtr.asFunction< - Object Function(Dart_NativeArguments, ffi.Pointer)>(); +const int _POSIX_ARG_MAX = 4096; - /// Gets a string native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param peer Returns the peer pointer if the string argument has one. - /// \return Success if the string argument has a peer, if it does not - /// have a peer then the String object is returned. Otherwise returns - /// an error handle (argument is not a String object). - Object Dart_GetNativeStringArgument( - Dart_NativeArguments args, - int arg_index, - ffi.Pointer> peer, - ) { - return _Dart_GetNativeStringArgument( - args, - arg_index, - peer, - ); - } +const int _POSIX_CHILD_MAX = 25; - late final _Dart_GetNativeStringArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer>)>>( - 'Dart_GetNativeStringArgument'); - late final _Dart_GetNativeStringArgument = - _Dart_GetNativeStringArgumentPtr.asFunction< - Object Function( - Dart_NativeArguments, int, ffi.Pointer>)>(); +const int _POSIX_LINK_MAX = 8; - /// Gets an integer native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param value Returns the integer value if the argument is an Integer. - /// \return Success if no error occurs. Otherwise returns an error handle. - Object Dart_GetNativeIntegerArgument( - Dart_NativeArguments args, - int index, - ffi.Pointer value, - ) { - return _Dart_GetNativeIntegerArgument( - args, - index, - value, - ); - } +const int _POSIX_MAX_CANON = 255; - late final _Dart_GetNativeIntegerArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeIntegerArgument'); - late final _Dart_GetNativeIntegerArgument = - _Dart_GetNativeIntegerArgumentPtr.asFunction< - Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); +const int _POSIX_MAX_INPUT = 255; - /// Gets a boolean native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param value Returns the boolean value if the argument is a Boolean. - /// \return Success if no error occurs. Otherwise returns an error handle. - Object Dart_GetNativeBooleanArgument( - Dart_NativeArguments args, - int index, - ffi.Pointer value, - ) { - return _Dart_GetNativeBooleanArgument( - args, - index, - value, - ); - } +const int _POSIX_NAME_MAX = 14; - late final _Dart_GetNativeBooleanArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeBooleanArgument'); - late final _Dart_GetNativeBooleanArgument = - _Dart_GetNativeBooleanArgumentPtr.asFunction< - Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); +const int _POSIX_NGROUPS_MAX = 8; - /// Gets a double native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param value Returns the double value if the argument is a double. - /// \return Success if no error occurs. Otherwise returns an error handle. - Object Dart_GetNativeDoubleArgument( - Dart_NativeArguments args, - int index, - ffi.Pointer value, - ) { - return _Dart_GetNativeDoubleArgument( - args, - index, - value, - ); - } +const int _POSIX_OPEN_MAX = 20; - late final _Dart_GetNativeDoubleArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeDoubleArgument'); - late final _Dart_GetNativeDoubleArgument = - _Dart_GetNativeDoubleArgumentPtr.asFunction< - Object Function( - Dart_NativeArguments, int, ffi.Pointer)>(); +const int _POSIX_PATH_MAX = 256; - /// Sets the return value for a native function. - /// - /// If retval is an Error handle, then error will be propagated once - /// the native functions exits. See Dart_PropagateError for a - /// discussion of how different types of errors are propagated. - void Dart_SetReturnValue( - Dart_NativeArguments args, - Object retval, - ) { - return _Dart_SetReturnValue( - args, - retval, - ); - } +const int _POSIX_PIPE_BUF = 512; - late final _Dart_SetReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Handle)>>('Dart_SetReturnValue'); - late final _Dart_SetReturnValue = _Dart_SetReturnValuePtr.asFunction< - void Function(Dart_NativeArguments, Object)>(); +const int _POSIX_SSIZE_MAX = 32767; - void Dart_SetWeakHandleReturnValue( - Dart_NativeArguments args, - Dart_WeakPersistentHandle rval, - ) { - return _Dart_SetWeakHandleReturnValue( - args, - rval, - ); - } +const int _POSIX_STREAM_MAX = 8; - late final _Dart_SetWeakHandleReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_NativeArguments, - Dart_WeakPersistentHandle)>>('Dart_SetWeakHandleReturnValue'); - late final _Dart_SetWeakHandleReturnValue = - _Dart_SetWeakHandleReturnValuePtr.asFunction< - void Function(Dart_NativeArguments, Dart_WeakPersistentHandle)>(); +const int _POSIX_TZNAME_MAX = 6; - void Dart_SetBooleanReturnValue( - Dart_NativeArguments args, - bool retval, - ) { - return _Dart_SetBooleanReturnValue( - args, - retval, - ); - } +const int _POSIX2_BC_BASE_MAX = 99; - late final _Dart_SetBooleanReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Bool)>>('Dart_SetBooleanReturnValue'); - late final _Dart_SetBooleanReturnValue = _Dart_SetBooleanReturnValuePtr - .asFunction(); +const int _POSIX2_BC_DIM_MAX = 2048; - void Dart_SetIntegerReturnValue( - Dart_NativeArguments args, - int retval, - ) { - return _Dart_SetIntegerReturnValue( - args, - retval, - ); - } +const int _POSIX2_BC_SCALE_MAX = 99; - late final _Dart_SetIntegerReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Int64)>>('Dart_SetIntegerReturnValue'); - late final _Dart_SetIntegerReturnValue = _Dart_SetIntegerReturnValuePtr - .asFunction(); +const int _POSIX2_BC_STRING_MAX = 1000; - void Dart_SetDoubleReturnValue( - Dart_NativeArguments args, - double retval, - ) { - return _Dart_SetDoubleReturnValue( - args, - retval, - ); - } +const int _POSIX2_EQUIV_CLASS_MAX = 2; - late final _Dart_SetDoubleReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Double)>>('Dart_SetDoubleReturnValue'); - late final _Dart_SetDoubleReturnValue = _Dart_SetDoubleReturnValuePtr - .asFunction(); +const int _POSIX2_EXPR_NEST_MAX = 32; + +const int _POSIX2_LINE_MAX = 2048; + +const int _POSIX2_RE_DUP_MAX = 255; + +const int _POSIX_AIO_LISTIO_MAX = 2; + +const int _POSIX_AIO_MAX = 1; + +const int _POSIX_DELAYTIMER_MAX = 32; + +const int _POSIX_MQ_OPEN_MAX = 8; + +const int _POSIX_MQ_PRIO_MAX = 32; + +const int _POSIX_RTSIG_MAX = 8; + +const int _POSIX_SEM_NSEMS_MAX = 256; + +const int _POSIX_SEM_VALUE_MAX = 32767; + +const int _POSIX_SIGQUEUE_MAX = 32; + +const int _POSIX_TIMER_MAX = 32; + +const int _POSIX_CLOCKRES_MIN = 20000000; + +const int _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4; + +const int _POSIX_THREAD_KEYS_MAX = 128; - /// Sets the environment callback for the current isolate. This - /// callback is used to lookup environment values by name in the - /// current environment. This enables the embedder to supply values for - /// the const constructors bool.fromEnvironment, int.fromEnvironment - /// and String.fromEnvironment. - Object Dart_SetEnvironmentCallback( - Dart_EnvironmentCallback callback, - ) { - return _Dart_SetEnvironmentCallback( - callback, - ); - } +const int _POSIX_THREAD_THREADS_MAX = 64; - late final _Dart_SetEnvironmentCallbackPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetEnvironmentCallback'); - late final _Dart_SetEnvironmentCallback = _Dart_SetEnvironmentCallbackPtr - .asFunction(); +const int PTHREAD_DESTRUCTOR_ITERATIONS = 4; - /// Sets the callback used to resolve native functions for a library. - /// - /// \param library A library. - /// \param resolver A native entry resolver. - /// - /// \return A valid handle if the native resolver was set successfully. - Object Dart_SetNativeResolver( - Object library1, - Dart_NativeEntryResolver resolver, - Dart_NativeEntrySymbol symbol, - ) { - return _Dart_SetNativeResolver( - library1, - resolver, - symbol, - ); - } +const int PTHREAD_KEYS_MAX = 512; - late final _Dart_SetNativeResolverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, Dart_NativeEntryResolver, - Dart_NativeEntrySymbol)>>('Dart_SetNativeResolver'); - late final _Dart_SetNativeResolver = _Dart_SetNativeResolverPtr.asFunction< - Object Function( - Object, Dart_NativeEntryResolver, Dart_NativeEntrySymbol)>(); +const int PTHREAD_STACK_MIN = 16384; - /// Returns the callback used to resolve native functions for a library. - /// - /// \param library A library. - /// \param resolver a pointer to a Dart_NativeEntryResolver - /// - /// \return A valid handle if the library was found. - Object Dart_GetNativeResolver( - Object library1, - ffi.Pointer resolver, - ) { - return _Dart_GetNativeResolver( - library1, - resolver, - ); - } +const int _POSIX_HOST_NAME_MAX = 255; - late final _Dart_GetNativeResolverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>( - 'Dart_GetNativeResolver'); - late final _Dart_GetNativeResolver = _Dart_GetNativeResolverPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const int _POSIX_LOGIN_NAME_MAX = 9; - /// Returns the callback used to resolve native function symbols for a library. - /// - /// \param library A library. - /// \param resolver a pointer to a Dart_NativeEntrySymbol. - /// - /// \return A valid handle if the library was found. - Object Dart_GetNativeSymbol( - Object library1, - ffi.Pointer resolver, - ) { - return _Dart_GetNativeSymbol( - library1, - resolver, - ); - } +const int _POSIX_SS_REPL_MAX = 4; - late final _Dart_GetNativeSymbolPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer)>>('Dart_GetNativeSymbol'); - late final _Dart_GetNativeSymbol = _Dart_GetNativeSymbolPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const int _POSIX_SYMLINK_MAX = 255; - /// Sets the callback used to resolve FFI native functions for a library. - /// The resolved functions are expected to be a C function pointer of the - /// correct signature (as specified in the `@FfiNative()` function - /// annotation in Dart code). - /// - /// NOTE: This is an experimental feature and might change in the future. - /// - /// \param library A library. - /// \param resolver A native function resolver. - /// - /// \return A valid handle if the native resolver was set successfully. - Object Dart_SetFfiNativeResolver( - Object library1, - Dart_FfiNativeResolver resolver, - ) { - return _Dart_SetFfiNativeResolver( - library1, - resolver, - ); - } +const int _POSIX_SYMLOOP_MAX = 8; - late final _Dart_SetFfiNativeResolverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - Dart_FfiNativeResolver)>>('Dart_SetFfiNativeResolver'); - late final _Dart_SetFfiNativeResolver = _Dart_SetFfiNativeResolverPtr - .asFunction(); +const int _POSIX_TRACE_EVENT_NAME_MAX = 30; - /// Sets library tag handler for the current isolate. This handler is - /// used to handle the various tags encountered while loading libraries - /// or scripts in the isolate. - /// - /// \param handler Handler code to be used for handling the various tags - /// encountered while loading libraries or scripts in the isolate. - /// - /// \return If no error occurs, the handler is set for the isolate. - /// Otherwise an error handle is returned. - /// - /// TODO(turnidge): Document. - Object Dart_SetLibraryTagHandler( - Dart_LibraryTagHandler handler, - ) { - return _Dart_SetLibraryTagHandler( - handler, - ); - } +const int _POSIX_TRACE_NAME_MAX = 8; - late final _Dart_SetLibraryTagHandlerPtr = - _lookup>( - 'Dart_SetLibraryTagHandler'); - late final _Dart_SetLibraryTagHandler = _Dart_SetLibraryTagHandlerPtr - .asFunction(); +const int _POSIX_TRACE_SYS_MAX = 8; - /// Sets the deferred load handler for the current isolate. This handler is - /// used to handle loading deferred imports in an AppJIT or AppAOT program. - Object Dart_SetDeferredLoadHandler( - Dart_DeferredLoadHandler handler, - ) { - return _Dart_SetDeferredLoadHandler( - handler, - ); - } +const int _POSIX_TRACE_USER_EVENT_MAX = 32; - late final _Dart_SetDeferredLoadHandlerPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetDeferredLoadHandler'); - late final _Dart_SetDeferredLoadHandler = _Dart_SetDeferredLoadHandlerPtr - .asFunction(); +const int _POSIX_TTY_NAME_MAX = 9; - /// Notifies the VM that a deferred load completed successfully. This function - /// will eventually cause the corresponding `prefix.loadLibrary()` futures to - /// complete. - /// - /// Requires the current isolate to be the same current isolate during the - /// invocation of the Dart_DeferredLoadHandler. - Object Dart_DeferredLoadComplete( - int loading_unit_id, - ffi.Pointer snapshot_data, - ffi.Pointer snapshot_instructions, - ) { - return _Dart_DeferredLoadComplete( - loading_unit_id, - snapshot_data, - snapshot_instructions, - ); - } +const int _POSIX2_CHARCLASS_NAME_MAX = 14; - late final _Dart_DeferredLoadCompletePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.IntPtr, ffi.Pointer, - ffi.Pointer)>>('Dart_DeferredLoadComplete'); - late final _Dart_DeferredLoadComplete = - _Dart_DeferredLoadCompletePtr.asFunction< - Object Function( - int, ffi.Pointer, ffi.Pointer)>(); +const int _POSIX2_COLL_WEIGHTS_MAX = 2; - /// Notifies the VM that a deferred load failed. This function - /// will eventually cause the corresponding `prefix.loadLibrary()` futures to - /// complete with an error. - /// - /// If `transient` is true, future invocations of `prefix.loadLibrary()` will - /// trigger new load requests. If false, futures invocation will complete with - /// the same error. - /// - /// Requires the current isolate to be the same current isolate during the - /// invocation of the Dart_DeferredLoadHandler. - Object Dart_DeferredLoadCompleteError( - int loading_unit_id, - ffi.Pointer error_message, - bool transient, - ) { - return _Dart_DeferredLoadCompleteError( - loading_unit_id, - error_message, - transient, - ); - } +const int _POSIX_RE_DUP_MAX = 255; - late final _Dart_DeferredLoadCompleteErrorPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.IntPtr, ffi.Pointer, - ffi.Bool)>>('Dart_DeferredLoadCompleteError'); - late final _Dart_DeferredLoadCompleteError = - _Dart_DeferredLoadCompleteErrorPtr.asFunction< - Object Function(int, ffi.Pointer, bool)>(); +const int OFF_MIN = -9223372036854775808; - /// Canonicalizes a url with respect to some library. - /// - /// The url is resolved with respect to the library's url and some url - /// normalizations are performed. - /// - /// This canonicalization function should be sufficient for most - /// embedders to implement the Dart_kCanonicalizeUrl tag. - /// - /// \param base_url The base url relative to which the url is - /// being resolved. - /// \param url The url being resolved and canonicalized. This - /// parameter is a string handle. - /// - /// \return If no error occurs, a String object is returned. Otherwise - /// an error handle is returned. - Object Dart_DefaultCanonicalizeUrl( - Object base_url, - Object url, - ) { - return _Dart_DefaultCanonicalizeUrl( - base_url, - url, - ); - } +const int OFF_MAX = 9223372036854775807; - late final _Dart_DefaultCanonicalizeUrlPtr = - _lookup>( - 'Dart_DefaultCanonicalizeUrl'); - late final _Dart_DefaultCanonicalizeUrl = _Dart_DefaultCanonicalizeUrlPtr - .asFunction(); +const int PASS_MAX = 128; - /// Loads the root library for the current isolate. - /// - /// Requires there to be no current root library. - /// - /// \param buffer A buffer which contains a kernel binary (see - /// pkg/kernel/binary.md). Must remain valid until isolate group shutdown. - /// \param buffer_size Length of the passed in buffer. - /// - /// \return A handle to the root library, or an error. - Object Dart_LoadScriptFromKernel( - ffi.Pointer kernel_buffer, - int kernel_size, - ) { - return _Dart_LoadScriptFromKernel( - kernel_buffer, - kernel_size, - ); - } +const int NL_ARGMAX = 9; - late final _Dart_LoadScriptFromKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_LoadScriptFromKernel'); - late final _Dart_LoadScriptFromKernel = _Dart_LoadScriptFromKernelPtr - .asFunction, int)>(); +const int NL_LANGMAX = 14; - /// Gets the library for the root script for the current isolate. - /// - /// If the root script has not yet been set for the current isolate, - /// this function returns Dart_Null(). This function never returns an - /// error handle. - /// - /// \return Returns the root Library for the current isolate or Dart_Null(). - Object Dart_RootLibrary() { - return _Dart_RootLibrary(); - } +const int NL_MSGMAX = 32767; - late final _Dart_RootLibraryPtr = - _lookup>('Dart_RootLibrary'); - late final _Dart_RootLibrary = - _Dart_RootLibraryPtr.asFunction(); +const int NL_NMAX = 1; - /// Sets the root library for the current isolate. - /// - /// \return Returns an error handle if `library` is not a library handle. - Object Dart_SetRootLibrary( - Object library1, - ) { - return _Dart_SetRootLibrary( - library1, - ); - } +const int NL_SETMAX = 255; - late final _Dart_SetRootLibraryPtr = - _lookup>( - 'Dart_SetRootLibrary'); - late final _Dart_SetRootLibrary = - _Dart_SetRootLibraryPtr.asFunction(); +const int NL_TEXTMAX = 2048; - /// Lookup or instantiate a legacy type by name and type arguments from a - /// Library. - /// - /// \param library The library containing the class or interface. - /// \param class_name The class name for the type. - /// \param number_of_type_arguments Number of type arguments. - /// For non parametric types the number of type arguments would be 0. - /// \param type_arguments Pointer to an array of type arguments. - /// For non parameteric types a NULL would be passed in for this argument. - /// - /// \return If no error occurs, the type is returned. - /// Otherwise an error handle is returned. - Object Dart_GetType( - Object library1, - Object class_name, - int number_of_type_arguments, - ffi.Pointer type_arguments, - ) { - return _Dart_GetType( - library1, - class_name, - number_of_type_arguments, - type_arguments, - ); - } +const int _XOPEN_IOV_MAX = 16; - late final _Dart_GetTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_GetType'); - late final _Dart_GetType = _Dart_GetTypePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); +const int IOV_MAX = 1024; - /// Lookup or instantiate a nullable type by name and type arguments from - /// Library. - /// - /// \param library The library containing the class or interface. - /// \param class_name The class name for the type. - /// \param number_of_type_arguments Number of type arguments. - /// For non parametric types the number of type arguments would be 0. - /// \param type_arguments Pointer to an array of type arguments. - /// For non parameteric types a NULL would be passed in for this argument. - /// - /// \return If no error occurs, the type is returned. - /// Otherwise an error handle is returned. - Object Dart_GetNullableType( - Object library1, - Object class_name, - int number_of_type_arguments, - ffi.Pointer type_arguments, - ) { - return _Dart_GetNullableType( - library1, - class_name, - number_of_type_arguments, - type_arguments, - ); - } +const int _XOPEN_NAME_MAX = 255; - late final _Dart_GetNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_GetNullableType'); - late final _Dart_GetNullableType = _Dart_GetNullableTypePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); +const int _XOPEN_PATH_MAX = 1024; - /// Lookup or instantiate a non-nullable type by name and type arguments from - /// Library. - /// - /// \param library The library containing the class or interface. - /// \param class_name The class name for the type. - /// \param number_of_type_arguments Number of type arguments. - /// For non parametric types the number of type arguments would be 0. - /// \param type_arguments Pointer to an array of type arguments. - /// For non parameteric types a NULL would be passed in for this argument. - /// - /// \return If no error occurs, the type is returned. - /// Otherwise an error handle is returned. - Object Dart_GetNonNullableType( - Object library1, - Object class_name, - int number_of_type_arguments, - ffi.Pointer type_arguments, - ) { - return _Dart_GetNonNullableType( - library1, - class_name, - number_of_type_arguments, - type_arguments, - ); - } +const int NS_BLOCKS_AVAILABLE = 1; - late final _Dart_GetNonNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_GetNonNullableType'); - late final _Dart_GetNonNullableType = _Dart_GetNonNullableTypePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); +const int __COREFOUNDATION_CFAVAILABILITY__ = 1; - /// Creates a nullable version of the provided type. - /// - /// \param type The type to be converted to a nullable type. - /// - /// \return If no error occurs, a nullable type is returned. - /// Otherwise an error handle is returned. - Object Dart_TypeToNullableType( - Object type, - ) { - return _Dart_TypeToNullableType( - type, - ); - } +const int API_TO_BE_DEPRECATED = 100000; - late final _Dart_TypeToNullableTypePtr = - _lookup>( - 'Dart_TypeToNullableType'); - late final _Dart_TypeToNullableType = - _Dart_TypeToNullableTypePtr.asFunction(); +const int __CF_ENUM_FIXED_IS_AVAILABLE = 1; - /// Creates a non-nullable version of the provided type. - /// - /// \param type The type to be converted to a non-nullable type. - /// - /// \return If no error occurs, a non-nullable type is returned. - /// Otherwise an error handle is returned. - Object Dart_TypeToNonNullableType( - Object type, - ) { - return _Dart_TypeToNonNullableType( - type, - ); - } +const double NSFoundationVersionNumber10_0 = 397.4; - late final _Dart_TypeToNonNullableTypePtr = - _lookup>( - 'Dart_TypeToNonNullableType'); - late final _Dart_TypeToNonNullableType = - _Dart_TypeToNonNullableTypePtr.asFunction(); +const double NSFoundationVersionNumber10_1 = 425.0; - /// A type's nullability. - /// - /// \param type A Dart type. - /// \param result An out parameter containing the result of the check. True if - /// the type is of the specified nullability, false otherwise. - /// - /// \return Returns an error handle if type is not of type Type. - Object Dart_IsNullableType( - Object type, - ffi.Pointer result, - ) { - return _Dart_IsNullableType( - type, - result, - ); - } +const double NSFoundationVersionNumber10_1_1 = 425.0; - late final _Dart_IsNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IsNullableType'); - late final _Dart_IsNullableType = _Dart_IsNullableTypePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const double NSFoundationVersionNumber10_1_2 = 425.0; - Object Dart_IsNonNullableType( - Object type, - ffi.Pointer result, - ) { - return _Dart_IsNonNullableType( - type, - result, - ); - } +const double NSFoundationVersionNumber10_1_3 = 425.0; - late final _Dart_IsNonNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IsNonNullableType'); - late final _Dart_IsNonNullableType = _Dart_IsNonNullableTypePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const double NSFoundationVersionNumber10_1_4 = 425.0; - Object Dart_IsLegacyType( - Object type, - ffi.Pointer result, - ) { - return _Dart_IsLegacyType( - type, - result, - ); - } +const double NSFoundationVersionNumber10_2 = 462.0; - late final _Dart_IsLegacyTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IsLegacyType'); - late final _Dart_IsLegacyType = _Dart_IsLegacyTypePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const double NSFoundationVersionNumber10_2_1 = 462.0; - /// Lookup a class or interface by name from a Library. - /// - /// \param library The library containing the class or interface. - /// \param class_name The name of the class or interface. - /// - /// \return If no error occurs, the class or interface is - /// returned. Otherwise an error handle is returned. - Object Dart_GetClass( - Object library1, - Object class_name, - ) { - return _Dart_GetClass( - library1, - class_name, - ); - } +const double NSFoundationVersionNumber10_2_2 = 462.0; - late final _Dart_GetClassPtr = - _lookup>( - 'Dart_GetClass'); - late final _Dart_GetClass = - _Dart_GetClassPtr.asFunction(); +const double NSFoundationVersionNumber10_2_3 = 462.0; - /// Returns an import path to a Library, such as "file:///test.dart" or - /// "dart:core". - Object Dart_LibraryUrl( - Object library1, - ) { - return _Dart_LibraryUrl( - library1, - ); - } +const double NSFoundationVersionNumber10_2_4 = 462.0; - late final _Dart_LibraryUrlPtr = - _lookup>( - 'Dart_LibraryUrl'); - late final _Dart_LibraryUrl = - _Dart_LibraryUrlPtr.asFunction(); +const double NSFoundationVersionNumber10_2_5 = 462.0; - /// Returns a URL from which a Library was loaded. - Object Dart_LibraryResolvedUrl( - Object library1, - ) { - return _Dart_LibraryResolvedUrl( - library1, - ); - } +const double NSFoundationVersionNumber10_2_6 = 462.0; - late final _Dart_LibraryResolvedUrlPtr = - _lookup>( - 'Dart_LibraryResolvedUrl'); - late final _Dart_LibraryResolvedUrl = - _Dart_LibraryResolvedUrlPtr.asFunction(); +const double NSFoundationVersionNumber10_2_7 = 462.7; + +const double NSFoundationVersionNumber10_2_8 = 462.7; - /// \return An array of libraries. - Object Dart_GetLoadedLibraries() { - return _Dart_GetLoadedLibraries(); - } +const double NSFoundationVersionNumber10_3 = 500.0; - late final _Dart_GetLoadedLibrariesPtr = - _lookup>( - 'Dart_GetLoadedLibraries'); - late final _Dart_GetLoadedLibraries = - _Dart_GetLoadedLibrariesPtr.asFunction(); +const double NSFoundationVersionNumber10_3_1 = 500.0; - Object Dart_LookupLibrary( - Object url, - ) { - return _Dart_LookupLibrary( - url, - ); - } +const double NSFoundationVersionNumber10_3_2 = 500.3; - late final _Dart_LookupLibraryPtr = - _lookup>( - 'Dart_LookupLibrary'); - late final _Dart_LookupLibrary = - _Dart_LookupLibraryPtr.asFunction(); +const double NSFoundationVersionNumber10_3_3 = 500.54; - /// Report an loading error for the library. - /// - /// \param library The library that failed to load. - /// \param error The Dart error instance containing the load error. - /// - /// \return If the VM handles the error, the return value is - /// a null handle. If it doesn't handle the error, the error - /// object is returned. - Object Dart_LibraryHandleError( - Object library1, - Object error, - ) { - return _Dart_LibraryHandleError( - library1, - error, - ); - } +const double NSFoundationVersionNumber10_3_4 = 500.56; - late final _Dart_LibraryHandleErrorPtr = - _lookup>( - 'Dart_LibraryHandleError'); - late final _Dart_LibraryHandleError = - _Dart_LibraryHandleErrorPtr.asFunction(); +const double NSFoundationVersionNumber10_3_5 = 500.56; - /// Called by the embedder to load a partial program. Does not set the root - /// library. - /// - /// \param buffer A buffer which contains a kernel binary (see - /// pkg/kernel/binary.md). Must remain valid until isolate shutdown. - /// \param buffer_size Length of the passed in buffer. - /// - /// \return A handle to the main library of the compilation unit, or an error. - Object Dart_LoadLibraryFromKernel( - ffi.Pointer kernel_buffer, - int kernel_buffer_size, - ) { - return _Dart_LoadLibraryFromKernel( - kernel_buffer, - kernel_buffer_size, - ); - } +const double NSFoundationVersionNumber10_3_6 = 500.56; - late final _Dart_LoadLibraryFromKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_LoadLibraryFromKernel'); - late final _Dart_LoadLibraryFromKernel = _Dart_LoadLibraryFromKernelPtr - .asFunction, int)>(); +const double NSFoundationVersionNumber10_3_7 = 500.56; - /// Indicates that all outstanding load requests have been satisfied. - /// This finalizes all the new classes loaded and optionally completes - /// deferred library futures. - /// - /// Requires there to be a current isolate. - /// - /// \param complete_futures Specify true if all deferred library - /// futures should be completed, false otherwise. - /// - /// \return Success if all classes have been finalized and deferred library - /// futures are completed. Otherwise, returns an error. - Object Dart_FinalizeLoading( - bool complete_futures, - ) { - return _Dart_FinalizeLoading( - complete_futures, - ); - } +const double NSFoundationVersionNumber10_3_8 = 500.56; - late final _Dart_FinalizeLoadingPtr = - _lookup>( - 'Dart_FinalizeLoading'); - late final _Dart_FinalizeLoading = - _Dart_FinalizeLoadingPtr.asFunction(); +const double NSFoundationVersionNumber10_3_9 = 500.58; - /// Returns the value of peer field of 'object' in 'peer'. - /// - /// \param object An object. - /// \param peer An out parameter that returns the value of the peer - /// field. - /// - /// \return Returns an error if 'object' is a subtype of Null, num, or - /// bool. - Object Dart_GetPeer( - Object object, - ffi.Pointer> peer, - ) { - return _Dart_GetPeer( - object, - peer, - ); - } +const double NSFoundationVersionNumber10_4 = 567.0; - late final _Dart_GetPeerPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer>)>>('Dart_GetPeer'); - late final _Dart_GetPeer = _Dart_GetPeerPtr.asFunction< - Object Function(Object, ffi.Pointer>)>(); +const double NSFoundationVersionNumber10_4_1 = 567.0; - /// Sets the value of the peer field of 'object' to the value of - /// 'peer'. - /// - /// \param object An object. - /// \param peer A value to store in the peer field. - /// - /// \return Returns an error if 'object' is a subtype of Null, num, or - /// bool. - Object Dart_SetPeer( - Object object, - ffi.Pointer peer, - ) { - return _Dart_SetPeer( - object, - peer, - ); - } +const double NSFoundationVersionNumber10_4_2 = 567.12; - late final _Dart_SetPeerPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_SetPeer'); - late final _Dart_SetPeer = _Dart_SetPeerPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); +const double NSFoundationVersionNumber10_4_3 = 567.21; - bool Dart_IsKernelIsolate( - Dart_Isolate isolate, - ) { - return _Dart_IsKernelIsolate( - isolate, - ); - } +const double NSFoundationVersionNumber10_4_4_Intel = 567.23; - late final _Dart_IsKernelIsolatePtr = - _lookup>( - 'Dart_IsKernelIsolate'); - late final _Dart_IsKernelIsolate = - _Dart_IsKernelIsolatePtr.asFunction(); +const double NSFoundationVersionNumber10_4_4_PowerPC = 567.21; - bool Dart_KernelIsolateIsRunning() { - return _Dart_KernelIsolateIsRunning(); - } +const double NSFoundationVersionNumber10_4_5 = 567.25; - late final _Dart_KernelIsolateIsRunningPtr = - _lookup>( - 'Dart_KernelIsolateIsRunning'); - late final _Dart_KernelIsolateIsRunning = - _Dart_KernelIsolateIsRunningPtr.asFunction(); +const double NSFoundationVersionNumber10_4_6 = 567.26; - int Dart_KernelPort() { - return _Dart_KernelPort(); - } +const double NSFoundationVersionNumber10_4_7 = 567.27; - late final _Dart_KernelPortPtr = - _lookup>('Dart_KernelPort'); - late final _Dart_KernelPort = - _Dart_KernelPortPtr.asFunction(); +const double NSFoundationVersionNumber10_4_8 = 567.28; - /// Compiles the given `script_uri` to a kernel file. - /// - /// \param platform_kernel A buffer containing the kernel of the platform (e.g. - /// `vm_platform_strong.dill`). The VM does not take ownership of this memory. - /// - /// \param platform_kernel_size The length of the platform_kernel buffer. - /// - /// \param snapshot_compile Set to `true` when the compilation is for a snapshot. - /// This is used by the frontend to determine if compilation related information - /// should be printed to console (e.g., null safety mode). - /// - /// \param verbosity Specifies the logging behavior of the kernel compilation - /// service. - /// - /// \return Returns the result of the compilation. - /// - /// On a successful compilation the returned [Dart_KernelCompilationResult] has - /// a status of [Dart_KernelCompilationStatus_Ok] and the `kernel`/`kernel_size` - /// fields are set. The caller takes ownership of the malloc()ed buffer. - /// - /// On a failed compilation the `error` might be set describing the reason for - /// the failed compilation. The caller takes ownership of the malloc()ed - /// error. - /// - /// Requires there to be a current isolate. - Dart_KernelCompilationResult Dart_CompileToKernel( - ffi.Pointer script_uri, - ffi.Pointer platform_kernel, - int platform_kernel_size, - bool incremental_compile, - bool snapshot_compile, - ffi.Pointer package_config, - int verbosity, - ) { - return _Dart_CompileToKernel( - script_uri, - platform_kernel, - platform_kernel_size, - incremental_compile, - snapshot_compile, - package_config, - verbosity, - ); - } +const double NSFoundationVersionNumber10_4_9 = 567.29; - late final _Dart_CompileToKernelPtr = _lookup< - ffi.NativeFunction< - Dart_KernelCompilationResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.IntPtr, - ffi.Bool, - ffi.Bool, - ffi.Pointer, - ffi.Int32)>>('Dart_CompileToKernel'); - late final _Dart_CompileToKernel = _Dart_CompileToKernelPtr.asFunction< - Dart_KernelCompilationResult Function( - ffi.Pointer, - ffi.Pointer, - int, - bool, - bool, - ffi.Pointer, - int)>(); +const double NSFoundationVersionNumber10_4_10 = 567.29; - Dart_KernelCompilationResult Dart_KernelListDependencies() { - return _Dart_KernelListDependencies(); - } +const double NSFoundationVersionNumber10_4_11 = 567.36; - late final _Dart_KernelListDependenciesPtr = - _lookup>( - 'Dart_KernelListDependencies'); - late final _Dart_KernelListDependencies = _Dart_KernelListDependenciesPtr - .asFunction(); +const double NSFoundationVersionNumber10_5 = 677.0; - /// Sets the kernel buffer which will be used to load Dart SDK sources - /// dynamically at runtime. - /// - /// \param platform_kernel A buffer containing kernel which has sources for the - /// Dart SDK populated. Note: The VM does not take ownership of this memory. - /// - /// \param platform_kernel_size The length of the platform_kernel buffer. - void Dart_SetDartLibrarySourcesKernel( - ffi.Pointer platform_kernel, - int platform_kernel_size, - ) { - return _Dart_SetDartLibrarySourcesKernel( - platform_kernel, - platform_kernel_size, - ); - } +const double NSFoundationVersionNumber10_5_1 = 677.1; - late final _Dart_SetDartLibrarySourcesKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_SetDartLibrarySourcesKernel'); - late final _Dart_SetDartLibrarySourcesKernel = - _Dart_SetDartLibrarySourcesKernelPtr.asFunction< - void Function(ffi.Pointer, int)>(); +const double NSFoundationVersionNumber10_5_2 = 677.15; - /// Detect the null safety opt-in status. - /// - /// When running from source, it is based on the opt-in status of `script_uri`. - /// When running from a kernel buffer, it is based on the mode used when - /// generating `kernel_buffer`. - /// When running from an appJIT or AOT snapshot, it is based on the mode used - /// when generating `snapshot_data`. - /// - /// \param script_uri Uri of the script that contains the source code - /// - /// \param package_config Uri of the package configuration file (either in format - /// of .packages or .dart_tool/package_config.json) for the null safety - /// detection to resolve package imports against. If this parameter is not - /// passed the package resolution of the parent isolate should be used. - /// - /// \param original_working_directory current working directory when the VM - /// process was launched, this is used to correctly resolve the path specified - /// for package_config. - /// - /// \param snapshot_data - /// - /// \param snapshot_instructions Buffers containing a snapshot of the - /// isolate or NULL if no snapshot is provided. If provided, the buffers must - /// remain valid until the isolate shuts down. - /// - /// \param kernel_buffer - /// - /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must - /// remain valid until isolate shutdown. - /// - /// \return Returns true if the null safety is opted in by the input being - /// run `script_uri`, `snapshot_data` or `kernel_buffer`. - bool Dart_DetectNullSafety( - ffi.Pointer script_uri, - ffi.Pointer package_config, - ffi.Pointer original_working_directory, - ffi.Pointer snapshot_data, - ffi.Pointer snapshot_instructions, - ffi.Pointer kernel_buffer, - int kernel_buffer_size, - ) { - return _Dart_DetectNullSafety( - script_uri, - package_config, - original_working_directory, - snapshot_data, - snapshot_instructions, - kernel_buffer, - kernel_buffer_size, - ); - } +const double NSFoundationVersionNumber10_5_3 = 677.19; - late final _Dart_DetectNullSafetyPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.IntPtr)>>('Dart_DetectNullSafety'); - late final _Dart_DetectNullSafety = _Dart_DetectNullSafetyPtr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); +const double NSFoundationVersionNumber10_5_4 = 677.19; - /// Returns true if isolate is the service isolate. - /// - /// \param isolate An isolate - /// - /// \return Returns true if 'isolate' is the service isolate. - bool Dart_IsServiceIsolate( - Dart_Isolate isolate, - ) { - return _Dart_IsServiceIsolate( - isolate, - ); - } +const double NSFoundationVersionNumber10_5_5 = 677.21; - late final _Dart_IsServiceIsolatePtr = - _lookup>( - 'Dart_IsServiceIsolate'); - late final _Dart_IsServiceIsolate = - _Dart_IsServiceIsolatePtr.asFunction(); +const double NSFoundationVersionNumber10_5_6 = 677.22; - /// Writes the CPU profile to the timeline as a series of 'instant' events. - /// - /// Note that this is an expensive operation. - /// - /// \param main_port The main port of the Isolate whose profile samples to write. - /// \param error An optional error, must be free()ed by caller. - /// - /// \return Returns true if the profile is successfully written and false - /// otherwise. - bool Dart_WriteProfileToTimeline( - int main_port, - ffi.Pointer> error, - ) { - return _Dart_WriteProfileToTimeline( - main_port, - error, - ); - } +const double NSFoundationVersionNumber10_5_7 = 677.24; - late final _Dart_WriteProfileToTimelinePtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - Dart_Port, ffi.Pointer>)>>( - 'Dart_WriteProfileToTimeline'); - late final _Dart_WriteProfileToTimeline = _Dart_WriteProfileToTimelinePtr - .asFunction>)>(); +const double NSFoundationVersionNumber10_5_8 = 677.26; - /// Compiles all functions reachable from entry points and marks - /// the isolate to disallow future compilation. - /// - /// Entry points should be specified using `@pragma("vm:entry-point")` - /// annotation. - /// - /// \return An error handle if a compilation error or runtime error running const - /// constructors was encountered. - Object Dart_Precompile() { - return _Dart_Precompile(); - } +const double NSFoundationVersionNumber10_6 = 751.0; - late final _Dart_PrecompilePtr = - _lookup>('Dart_Precompile'); - late final _Dart_Precompile = - _Dart_PrecompilePtr.asFunction(); +const double NSFoundationVersionNumber10_6_1 = 751.0; - Object Dart_LoadingUnitLibraryUris( - int loading_unit_id, - ) { - return _Dart_LoadingUnitLibraryUris( - loading_unit_id, - ); - } +const double NSFoundationVersionNumber10_6_2 = 751.14; - late final _Dart_LoadingUnitLibraryUrisPtr = - _lookup>( - 'Dart_LoadingUnitLibraryUris'); - late final _Dart_LoadingUnitLibraryUris = - _Dart_LoadingUnitLibraryUrisPtr.asFunction(); +const double NSFoundationVersionNumber10_6_3 = 751.21; - /// Creates a precompiled snapshot. - /// - A root library must have been loaded. - /// - Dart_Precompile must have been called. - /// - /// Outputs an assembly file defining the symbols listed in the definitions - /// above. - /// - /// The assembly should be compiled as a static or shared library and linked or - /// loaded by the embedder. Running this snapshot requires a VM compiled with - /// DART_PRECOMPILED_SNAPSHOT. The kDartVmSnapshotData and - /// kDartVmSnapshotInstructions should be passed to Dart_Initialize. The - /// kDartIsolateSnapshotData and kDartIsolateSnapshotInstructions should be - /// passed to Dart_CreateIsolateGroup. - /// - /// The callback will be invoked one or more times to provide the assembly code. - /// - /// If stripped is true, then the assembly code will not include DWARF - /// debugging sections. - /// - /// If debug_callback_data is provided, debug_callback_data will be used with - /// the callback to provide separate debugging information. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateAppAOTSnapshotAsAssembly( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, - bool stripped, - ffi.Pointer debug_callback_data, - ) { - return _Dart_CreateAppAOTSnapshotAsAssembly( - callback, - callback_data, - stripped, - debug_callback_data, - ); - } +const double NSFoundationVersionNumber10_6_4 = 751.29; - late final _Dart_CreateAppAOTSnapshotAsAssemblyPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_StreamingWriteCallback, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsAssembly'); - late final _Dart_CreateAppAOTSnapshotAsAssembly = - _Dart_CreateAppAOTSnapshotAsAssemblyPtr.asFunction< - Object Function(Dart_StreamingWriteCallback, ffi.Pointer, - bool, ffi.Pointer)>(); +const double NSFoundationVersionNumber10_6_5 = 751.42; - Object Dart_CreateAppAOTSnapshotAsAssemblies( - Dart_CreateLoadingUnitCallback next_callback, - ffi.Pointer next_callback_data, - bool stripped, - Dart_StreamingWriteCallback write_callback, - Dart_StreamingCloseCallback close_callback, - ) { - return _Dart_CreateAppAOTSnapshotAsAssemblies( - next_callback, - next_callback_data, - stripped, - write_callback, - close_callback, - ); - } +const double NSFoundationVersionNumber10_6_6 = 751.53; - late final _Dart_CreateAppAOTSnapshotAsAssembliesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - ffi.Bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>>( - 'Dart_CreateAppAOTSnapshotAsAssemblies'); - late final _Dart_CreateAppAOTSnapshotAsAssemblies = - _Dart_CreateAppAOTSnapshotAsAssembliesPtr.asFunction< - Object Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>(); +const double NSFoundationVersionNumber10_6_7 = 751.53; - /// Creates a precompiled snapshot. - /// - A root library must have been loaded. - /// - Dart_Precompile must have been called. - /// - /// Outputs an ELF shared library defining the symbols - /// - _kDartVmSnapshotData - /// - _kDartVmSnapshotInstructions - /// - _kDartIsolateSnapshotData - /// - _kDartIsolateSnapshotInstructions - /// - /// The shared library should be dynamically loaded by the embedder. - /// Running this snapshot requires a VM compiled with DART_PRECOMPILED_SNAPSHOT. - /// The kDartVmSnapshotData and kDartVmSnapshotInstructions should be passed to - /// Dart_Initialize. The kDartIsolateSnapshotData and - /// kDartIsolateSnapshotInstructions should be passed to Dart_CreateIsolate. - /// - /// The callback will be invoked one or more times to provide the binary output. - /// - /// If stripped is true, then the binary output will not include DWARF - /// debugging sections. - /// - /// If debug_callback_data is provided, debug_callback_data will be used with - /// the callback to provide separate debugging information. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateAppAOTSnapshotAsElf( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, - bool stripped, - ffi.Pointer debug_callback_data, - ) { - return _Dart_CreateAppAOTSnapshotAsElf( - callback, - callback_data, - stripped, - debug_callback_data, - ); - } +const double NSFoundationVersionNumber10_6_8 = 751.62; - late final _Dart_CreateAppAOTSnapshotAsElfPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_StreamingWriteCallback, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsElf'); - late final _Dart_CreateAppAOTSnapshotAsElf = - _Dart_CreateAppAOTSnapshotAsElfPtr.asFunction< - Object Function(Dart_StreamingWriteCallback, ffi.Pointer, - bool, ffi.Pointer)>(); +const double NSFoundationVersionNumber10_7 = 833.1; - Object Dart_CreateAppAOTSnapshotAsElfs( - Dart_CreateLoadingUnitCallback next_callback, - ffi.Pointer next_callback_data, - bool stripped, - Dart_StreamingWriteCallback write_callback, - Dart_StreamingCloseCallback close_callback, - ) { - return _Dart_CreateAppAOTSnapshotAsElfs( - next_callback, - next_callback_data, - stripped, - write_callback, - close_callback, - ); - } +const double NSFoundationVersionNumber10_7_1 = 833.1; - late final _Dart_CreateAppAOTSnapshotAsElfsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - ffi.Bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>>('Dart_CreateAppAOTSnapshotAsElfs'); - late final _Dart_CreateAppAOTSnapshotAsElfs = - _Dart_CreateAppAOTSnapshotAsElfsPtr.asFunction< - Object Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>(); +const double NSFoundationVersionNumber10_7_2 = 833.2; - /// Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes - /// kDartVmSnapshotData and kDartVmSnapshotInstructions. It also does - /// not strip DWARF information from the generated assembly or allow for - /// separate debug information. - Object Dart_CreateVMAOTSnapshotAsAssembly( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, - ) { - return _Dart_CreateVMAOTSnapshotAsAssembly( - callback, - callback_data, - ); - } +const double NSFoundationVersionNumber10_7_3 = 833.24; - late final _Dart_CreateVMAOTSnapshotAsAssemblyPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_StreamingWriteCallback, - ffi.Pointer)>>('Dart_CreateVMAOTSnapshotAsAssembly'); - late final _Dart_CreateVMAOTSnapshotAsAssembly = - _Dart_CreateVMAOTSnapshotAsAssemblyPtr.asFunction< - Object Function( - Dart_StreamingWriteCallback, ffi.Pointer)>(); +const double NSFoundationVersionNumber10_7_4 = 833.25; - /// Sorts the class-ids in depth first traversal order of the inheritance - /// tree. This is a costly operation, but it can make method dispatch - /// more efficient and is done before writing snapshots. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_SortClasses() { - return _Dart_SortClasses(); - } +const double NSFoundationVersionNumber10_8 = 945.0; - late final _Dart_SortClassesPtr = - _lookup>('Dart_SortClasses'); - late final _Dart_SortClasses = - _Dart_SortClassesPtr.asFunction(); +const double NSFoundationVersionNumber10_8_1 = 945.0; - /// Creates a snapshot that caches compiled code and type feedback for faster - /// startup and quicker warmup in a subsequent process. - /// - /// Outputs a snapshot in two pieces. The pieces should be passed to - /// Dart_CreateIsolateGroup in a VM using the same VM snapshot pieces used in the - /// current VM. The instructions piece must be loaded with read and execute - /// permissions; the data piece may be loaded as read-only. - /// - /// - Requires the VM to have not been started with --precompilation. - /// - Not supported when targeting IA32. - /// - The VM writing the snapshot and the VM reading the snapshot must be the - /// same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must - /// be targeting the same architecture, and must both be in checked mode or - /// both in unchecked mode. - /// - /// The buffers are scope allocated and are only valid until the next call to - /// Dart_ExitScope. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateAppJITSnapshotAsBlobs( - ffi.Pointer> isolate_snapshot_data_buffer, - ffi.Pointer isolate_snapshot_data_size, - ffi.Pointer> isolate_snapshot_instructions_buffer, - ffi.Pointer isolate_snapshot_instructions_size, - ) { - return _Dart_CreateAppJITSnapshotAsBlobs( - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - isolate_snapshot_instructions_buffer, - isolate_snapshot_instructions_size, - ); - } +const double NSFoundationVersionNumber10_8_2 = 945.11; - late final _Dart_CreateAppJITSnapshotAsBlobsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('Dart_CreateAppJITSnapshotAsBlobs'); - late final _Dart_CreateAppJITSnapshotAsBlobs = - _Dart_CreateAppJITSnapshotAsBlobsPtr.asFunction< - Object Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); +const double NSFoundationVersionNumber10_8_3 = 945.16; - /// Like Dart_CreateAppJITSnapshotAsBlobs, but also creates a new VM snapshot. - Object Dart_CreateCoreJITSnapshotAsBlobs( - ffi.Pointer> vm_snapshot_data_buffer, - ffi.Pointer vm_snapshot_data_size, - ffi.Pointer> vm_snapshot_instructions_buffer, - ffi.Pointer vm_snapshot_instructions_size, - ffi.Pointer> isolate_snapshot_data_buffer, - ffi.Pointer isolate_snapshot_data_size, - ffi.Pointer> isolate_snapshot_instructions_buffer, - ffi.Pointer isolate_snapshot_instructions_size, - ) { - return _Dart_CreateCoreJITSnapshotAsBlobs( - vm_snapshot_data_buffer, - vm_snapshot_data_size, - vm_snapshot_instructions_buffer, - vm_snapshot_instructions_size, - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - isolate_snapshot_instructions_buffer, - isolate_snapshot_instructions_size, - ); - } +const double NSFoundationVersionNumber10_8_4 = 945.18; - late final _Dart_CreateCoreJITSnapshotAsBlobsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('Dart_CreateCoreJITSnapshotAsBlobs'); - late final _Dart_CreateCoreJITSnapshotAsBlobs = - _Dart_CreateCoreJITSnapshotAsBlobsPtr.asFunction< - Object Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); +const int NSFoundationVersionNumber10_9 = 1056; - /// Get obfuscation map for precompiled code. - /// - /// Obfuscation map is encoded as a JSON array of pairs (original name, - /// obfuscated name). - /// - /// \return Returns an error handler if the VM was built in a mode that does not - /// support obfuscation. - Object Dart_GetObfuscationMap( - ffi.Pointer> buffer, - ffi.Pointer buffer_length, - ) { - return _Dart_GetObfuscationMap( - buffer, - buffer_length, - ); - } +const int NSFoundationVersionNumber10_9_1 = 1056; - late final _Dart_GetObfuscationMapPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer>, - ffi.Pointer)>>('Dart_GetObfuscationMap'); - late final _Dart_GetObfuscationMap = _Dart_GetObfuscationMapPtr.asFunction< - Object Function( - ffi.Pointer>, ffi.Pointer)>(); +const double NSFoundationVersionNumber10_9_2 = 1056.13; - /// Returns whether the VM only supports running from precompiled snapshots and - /// not from any other kind of snapshot or from source (that is, the VM was - /// compiled with DART_PRECOMPILED_RUNTIME). - bool Dart_IsPrecompiledRuntime() { - return _Dart_IsPrecompiledRuntime(); - } +const double NSFoundationVersionNumber10_10 = 1151.16; - late final _Dart_IsPrecompiledRuntimePtr = - _lookup>( - 'Dart_IsPrecompiledRuntime'); - late final _Dart_IsPrecompiledRuntime = - _Dart_IsPrecompiledRuntimePtr.asFunction(); +const double NSFoundationVersionNumber10_10_1 = 1151.16; - /// Print a native stack trace. Used for crash handling. - /// - /// If context is NULL, prints the current stack trace. Otherwise, context - /// should be a CONTEXT* (Windows) or ucontext_t* (POSIX) from a signal handler - /// running on the current thread. - void Dart_DumpNativeStackTrace( - ffi.Pointer context, - ) { - return _Dart_DumpNativeStackTrace( - context, - ); - } +const double NSFoundationVersionNumber10_10_2 = 1152.14; - late final _Dart_DumpNativeStackTracePtr = - _lookup)>>( - 'Dart_DumpNativeStackTrace'); - late final _Dart_DumpNativeStackTrace = _Dart_DumpNativeStackTracePtr - .asFunction)>(); +const double NSFoundationVersionNumber10_10_3 = 1153.2; - /// Indicate that the process is about to abort, and the Dart VM should not - /// attempt to cleanup resources. - void Dart_PrepareToAbort() { - return _Dart_PrepareToAbort(); - } +const double NSFoundationVersionNumber10_10_4 = 1153.2; - late final _Dart_PrepareToAbortPtr = - _lookup>('Dart_PrepareToAbort'); - late final _Dart_PrepareToAbort = - _Dart_PrepareToAbortPtr.asFunction(); +const int NSFoundationVersionNumber10_10_5 = 1154; - /// Posts a message on some port. The message will contain the Dart_CObject - /// object graph rooted in 'message'. - /// - /// While the message is being sent the state of the graph of Dart_CObject - /// structures rooted in 'message' should not be accessed, as the message - /// generation will make temporary modifications to the data. When the message - /// has been sent the graph will be fully restored. - /// - /// If true is returned, the message was enqueued, and finalizers for external - /// typed data will eventually run, even if the receiving isolate shuts down - /// before processing the message. If false is returned, the message was not - /// enqueued and ownership of external typed data in the message remains with the - /// caller. - /// - /// This function may be called on any thread when the VM is running (that is, - /// after Dart_Initialize has returned and before Dart_Cleanup has been called). - /// - /// \param port_id The destination port. - /// \param message The message to send. - /// - /// \return True if the message was posted. - bool Dart_PostCObject( - int port_id, - ffi.Pointer message, - ) { - return _Dart_PostCObject( - port_id, - message, - ); - } +const int NSFoundationVersionNumber10_10_Max = 1199; - late final _Dart_PostCObjectPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - Dart_Port, ffi.Pointer)>>('Dart_PostCObject'); - late final _Dart_PostCObject = _Dart_PostCObjectPtr.asFunction< - bool Function(int, ffi.Pointer)>(); +const int NSFoundationVersionNumber10_11 = 1252; - /// Posts a message on some port. The message will contain the integer 'message'. - /// - /// \param port_id The destination port. - /// \param message The message to send. - /// - /// \return True if the message was posted. - bool Dart_PostInteger( - int port_id, - int message, - ) { - return _Dart_PostInteger( - port_id, - message, - ); - } +const double NSFoundationVersionNumber10_11_1 = 1255.1; - late final _Dart_PostIntegerPtr = - _lookup>( - 'Dart_PostInteger'); - late final _Dart_PostInteger = - _Dart_PostIntegerPtr.asFunction(); +const double NSFoundationVersionNumber10_11_2 = 1256.1; - /// Creates a new native port. When messages are received on this - /// native port, then they will be dispatched to the provided native - /// message handler. - /// - /// \param name The name of this port in debugging messages. - /// \param handler The C handler to run when messages arrive on the port. - /// \param handle_concurrently Is it okay to process requests on this - /// native port concurrently? - /// - /// \return If successful, returns the port id for the native port. In - /// case of error, returns ILLEGAL_PORT. - int Dart_NewNativePort( - ffi.Pointer name, - Dart_NativeMessageHandler handler, - bool handle_concurrently, - ) { - return _Dart_NewNativePort( - name, - handler, - handle_concurrently, - ); - } +const double NSFoundationVersionNumber10_11_3 = 1256.1; - late final _Dart_NewNativePortPtr = _lookup< - ffi.NativeFunction< - Dart_Port Function(ffi.Pointer, Dart_NativeMessageHandler, - ffi.Bool)>>('Dart_NewNativePort'); - late final _Dart_NewNativePort = _Dart_NewNativePortPtr.asFunction< - int Function(ffi.Pointer, Dart_NativeMessageHandler, bool)>(); +const int NSFoundationVersionNumber10_11_4 = 1258; - /// Closes the native port with the given id. - /// - /// The port must have been allocated by a call to Dart_NewNativePort. - /// - /// \param native_port_id The id of the native port to close. - /// - /// \return Returns true if the port was closed successfully. - bool Dart_CloseNativePort( - int native_port_id, - ) { - return _Dart_CloseNativePort( - native_port_id, - ); - } +const int NSFoundationVersionNumber10_11_Max = 1299; - late final _Dart_CloseNativePortPtr = - _lookup>( - 'Dart_CloseNativePort'); - late final _Dart_CloseNativePort = - _Dart_CloseNativePortPtr.asFunction(); +const int __COREFOUNDATION_CFBASE__ = 1; - /// Forces all loaded classes and functions to be compiled eagerly in - /// the current isolate.. - /// - /// TODO(turnidge): Document. - Object Dart_CompileAll() { - return _Dart_CompileAll(); - } +const int UNIVERSAL_INTERFACES_VERSION = 1024; - late final _Dart_CompileAllPtr = - _lookup>('Dart_CompileAll'); - late final _Dart_CompileAll = - _Dart_CompileAllPtr.asFunction(); +const int PRAGMA_IMPORT = 0; - /// Finalizes all classes. - Object Dart_FinalizeAllClasses() { - return _Dart_FinalizeAllClasses(); - } +const int PRAGMA_ONCE = 0; - late final _Dart_FinalizeAllClassesPtr = - _lookup>( - 'Dart_FinalizeAllClasses'); - late final _Dart_FinalizeAllClasses = - _Dart_FinalizeAllClassesPtr.asFunction(); +const int PRAGMA_STRUCT_PACK = 1; - /// This function is intentionally undocumented. - /// - /// It should not be used outside internal tests. - ffi.Pointer Dart_ExecuteInternalCommand( - ffi.Pointer command, - ffi.Pointer arg, - ) { - return _Dart_ExecuteInternalCommand( - command, - arg, - ); - } +const int PRAGMA_STRUCT_PACKPUSH = 1; - late final _Dart_ExecuteInternalCommandPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>('Dart_ExecuteInternalCommand'); - late final _Dart_ExecuteInternalCommand = - _Dart_ExecuteInternalCommandPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); +const int PRAGMA_STRUCT_ALIGN = 0; - /// \mainpage Dynamically Linked Dart API - /// - /// This exposes a subset of symbols from dart_api.h and dart_native_api.h - /// available in every Dart embedder through dynamic linking. - /// - /// All symbols are postfixed with _DL to indicate that they are dynamically - /// linked and to prevent conflicts with the original symbol. - /// - /// Link `dart_api_dl.c` file into your library and invoke - /// `Dart_InitializeApiDL` with `NativeApi.initializeApiDLData`. - int Dart_InitializeApiDL( - ffi.Pointer data, - ) { - return _Dart_InitializeApiDL( - data, - ); - } +const int PRAGMA_ENUM_PACK = 0; - late final _Dart_InitializeApiDLPtr = - _lookup)>>( - 'Dart_InitializeApiDL'); - late final _Dart_InitializeApiDL = _Dart_InitializeApiDLPtr.asFunction< - int Function(ffi.Pointer)>(); +const int PRAGMA_ENUM_ALWAYSINT = 0; - late final ffi.Pointer _Dart_PostCObject_DL = - _lookup('Dart_PostCObject_DL'); +const int PRAGMA_ENUM_OPTIONS = 0; - Dart_PostCObject_Type get Dart_PostCObject_DL => _Dart_PostCObject_DL.value; +const int TYPE_EXTENDED = 0; - set Dart_PostCObject_DL(Dart_PostCObject_Type value) => - _Dart_PostCObject_DL.value = value; +const int TYPE_LONGDOUBLE_IS_DOUBLE = 0; - late final ffi.Pointer _Dart_PostInteger_DL = - _lookup('Dart_PostInteger_DL'); +const int TYPE_LONGLONG = 1; - Dart_PostInteger_Type get Dart_PostInteger_DL => _Dart_PostInteger_DL.value; +const int FUNCTION_PASCAL = 0; - set Dart_PostInteger_DL(Dart_PostInteger_Type value) => - _Dart_PostInteger_DL.value = value; +const int FUNCTION_DECLSPEC = 0; - late final ffi.Pointer _Dart_NewNativePort_DL = - _lookup('Dart_NewNativePort_DL'); +const int FUNCTION_WIN32CC = 0; - Dart_NewNativePort_Type get Dart_NewNativePort_DL => - _Dart_NewNativePort_DL.value; +const int TARGET_API_MAC_OS8 = 0; - set Dart_NewNativePort_DL(Dart_NewNativePort_Type value) => - _Dart_NewNativePort_DL.value = value; +const int TARGET_API_MAC_CARBON = 1; - late final ffi.Pointer _Dart_CloseNativePort_DL = - _lookup('Dart_CloseNativePort_DL'); +const int TARGET_API_MAC_OSX = 1; - Dart_CloseNativePort_Type get Dart_CloseNativePort_DL => - _Dart_CloseNativePort_DL.value; +const int TARGET_CARBON = 1; - set Dart_CloseNativePort_DL(Dart_CloseNativePort_Type value) => - _Dart_CloseNativePort_DL.value = value; +const int OLDROUTINENAMES = 0; - late final ffi.Pointer _Dart_IsError_DL = - _lookup('Dart_IsError_DL'); +const int OPAQUE_TOOLBOX_STRUCTS = 1; - Dart_IsError_Type get Dart_IsError_DL => _Dart_IsError_DL.value; +const int OPAQUE_UPP_TYPES = 1; - set Dart_IsError_DL(Dart_IsError_Type value) => - _Dart_IsError_DL.value = value; +const int ACCESSOR_CALLS_ARE_FUNCTIONS = 1; - late final ffi.Pointer _Dart_IsApiError_DL = - _lookup('Dart_IsApiError_DL'); +const int CALL_NOT_IN_CARBON = 0; - Dart_IsApiError_Type get Dart_IsApiError_DL => _Dart_IsApiError_DL.value; +const int MIXEDMODE_CALLS_ARE_FUNCTIONS = 1; - set Dart_IsApiError_DL(Dart_IsApiError_Type value) => - _Dart_IsApiError_DL.value = value; +const int ALLOW_OBSOLETE_CARBON_MACMEMORY = 0; - late final ffi.Pointer - _Dart_IsUnhandledExceptionError_DL = - _lookup( - 'Dart_IsUnhandledExceptionError_DL'); +const int ALLOW_OBSOLETE_CARBON_OSUTILS = 0; - Dart_IsUnhandledExceptionError_Type get Dart_IsUnhandledExceptionError_DL => - _Dart_IsUnhandledExceptionError_DL.value; +const int NULL = 0; - set Dart_IsUnhandledExceptionError_DL( - Dart_IsUnhandledExceptionError_Type value) => - _Dart_IsUnhandledExceptionError_DL.value = value; +const int kInvalidID = 0; - late final ffi.Pointer - _Dart_IsCompilationError_DL = - _lookup('Dart_IsCompilationError_DL'); +const int TRUE = 1; - Dart_IsCompilationError_Type get Dart_IsCompilationError_DL => - _Dart_IsCompilationError_DL.value; +const int FALSE = 0; - set Dart_IsCompilationError_DL(Dart_IsCompilationError_Type value) => - _Dart_IsCompilationError_DL.value = value; +const double kCFCoreFoundationVersionNumber10_0 = 196.4; - late final ffi.Pointer _Dart_IsFatalError_DL = - _lookup('Dart_IsFatalError_DL'); +const double kCFCoreFoundationVersionNumber10_0_3 = 196.5; - Dart_IsFatalError_Type get Dart_IsFatalError_DL => - _Dart_IsFatalError_DL.value; +const double kCFCoreFoundationVersionNumber10_1 = 226.0; - set Dart_IsFatalError_DL(Dart_IsFatalError_Type value) => - _Dart_IsFatalError_DL.value = value; +const double kCFCoreFoundationVersionNumber10_1_1 = 226.0; - late final ffi.Pointer _Dart_GetError_DL = - _lookup('Dart_GetError_DL'); +const double kCFCoreFoundationVersionNumber10_1_2 = 227.2; - Dart_GetError_Type get Dart_GetError_DL => _Dart_GetError_DL.value; +const double kCFCoreFoundationVersionNumber10_1_3 = 227.2; - set Dart_GetError_DL(Dart_GetError_Type value) => - _Dart_GetError_DL.value = value; +const double kCFCoreFoundationVersionNumber10_1_4 = 227.3; - late final ffi.Pointer - _Dart_ErrorHasException_DL = - _lookup('Dart_ErrorHasException_DL'); +const double kCFCoreFoundationVersionNumber10_2 = 263.0; - Dart_ErrorHasException_Type get Dart_ErrorHasException_DL => - _Dart_ErrorHasException_DL.value; +const double kCFCoreFoundationVersionNumber10_2_1 = 263.1; - set Dart_ErrorHasException_DL(Dart_ErrorHasException_Type value) => - _Dart_ErrorHasException_DL.value = value; +const double kCFCoreFoundationVersionNumber10_2_2 = 263.1; - late final ffi.Pointer - _Dart_ErrorGetException_DL = - _lookup('Dart_ErrorGetException_DL'); +const double kCFCoreFoundationVersionNumber10_2_3 = 263.3; - Dart_ErrorGetException_Type get Dart_ErrorGetException_DL => - _Dart_ErrorGetException_DL.value; +const double kCFCoreFoundationVersionNumber10_2_4 = 263.3; - set Dart_ErrorGetException_DL(Dart_ErrorGetException_Type value) => - _Dart_ErrorGetException_DL.value = value; +const double kCFCoreFoundationVersionNumber10_2_5 = 263.5; - late final ffi.Pointer - _Dart_ErrorGetStackTrace_DL = - _lookup('Dart_ErrorGetStackTrace_DL'); +const double kCFCoreFoundationVersionNumber10_2_6 = 263.5; - Dart_ErrorGetStackTrace_Type get Dart_ErrorGetStackTrace_DL => - _Dart_ErrorGetStackTrace_DL.value; +const double kCFCoreFoundationVersionNumber10_2_7 = 263.5; - set Dart_ErrorGetStackTrace_DL(Dart_ErrorGetStackTrace_Type value) => - _Dart_ErrorGetStackTrace_DL.value = value; +const double kCFCoreFoundationVersionNumber10_2_8 = 263.5; - late final ffi.Pointer _Dart_NewApiError_DL = - _lookup('Dart_NewApiError_DL'); +const double kCFCoreFoundationVersionNumber10_3 = 299.0; - Dart_NewApiError_Type get Dart_NewApiError_DL => _Dart_NewApiError_DL.value; +const double kCFCoreFoundationVersionNumber10_3_1 = 299.0; - set Dart_NewApiError_DL(Dart_NewApiError_Type value) => - _Dart_NewApiError_DL.value = value; +const double kCFCoreFoundationVersionNumber10_3_2 = 299.0; - late final ffi.Pointer - _Dart_NewCompilationError_DL = - _lookup('Dart_NewCompilationError_DL'); +const double kCFCoreFoundationVersionNumber10_3_3 = 299.3; - Dart_NewCompilationError_Type get Dart_NewCompilationError_DL => - _Dart_NewCompilationError_DL.value; +const double kCFCoreFoundationVersionNumber10_3_4 = 299.31; - set Dart_NewCompilationError_DL(Dart_NewCompilationError_Type value) => - _Dart_NewCompilationError_DL.value = value; +const double kCFCoreFoundationVersionNumber10_3_5 = 299.31; - late final ffi.Pointer - _Dart_NewUnhandledExceptionError_DL = - _lookup( - 'Dart_NewUnhandledExceptionError_DL'); +const double kCFCoreFoundationVersionNumber10_3_6 = 299.32; - Dart_NewUnhandledExceptionError_Type get Dart_NewUnhandledExceptionError_DL => - _Dart_NewUnhandledExceptionError_DL.value; +const double kCFCoreFoundationVersionNumber10_3_7 = 299.33; - set Dart_NewUnhandledExceptionError_DL( - Dart_NewUnhandledExceptionError_Type value) => - _Dart_NewUnhandledExceptionError_DL.value = value; +const double kCFCoreFoundationVersionNumber10_3_8 = 299.33; - late final ffi.Pointer _Dart_PropagateError_DL = - _lookup('Dart_PropagateError_DL'); +const double kCFCoreFoundationVersionNumber10_3_9 = 299.35; + +const double kCFCoreFoundationVersionNumber10_4 = 368.0; + +const double kCFCoreFoundationVersionNumber10_4_1 = 368.1; + +const double kCFCoreFoundationVersionNumber10_4_2 = 368.11; + +const double kCFCoreFoundationVersionNumber10_4_3 = 368.18; + +const double kCFCoreFoundationVersionNumber10_4_4_Intel = 368.26; + +const double kCFCoreFoundationVersionNumber10_4_4_PowerPC = 368.25; + +const double kCFCoreFoundationVersionNumber10_4_5_Intel = 368.26; + +const double kCFCoreFoundationVersionNumber10_4_5_PowerPC = 368.25; + +const double kCFCoreFoundationVersionNumber10_4_6_Intel = 368.26; + +const double kCFCoreFoundationVersionNumber10_4_6_PowerPC = 368.25; + +const double kCFCoreFoundationVersionNumber10_4_7 = 368.27; + +const double kCFCoreFoundationVersionNumber10_4_8 = 368.27; + +const double kCFCoreFoundationVersionNumber10_4_9 = 368.28; + +const double kCFCoreFoundationVersionNumber10_4_10 = 368.28; + +const double kCFCoreFoundationVersionNumber10_4_11 = 368.31; + +const double kCFCoreFoundationVersionNumber10_5 = 476.0; + +const double kCFCoreFoundationVersionNumber10_5_1 = 476.0; + +const double kCFCoreFoundationVersionNumber10_5_2 = 476.1; + +const double kCFCoreFoundationVersionNumber10_5_3 = 476.13; - Dart_PropagateError_Type get Dart_PropagateError_DL => - _Dart_PropagateError_DL.value; +const double kCFCoreFoundationVersionNumber10_5_4 = 476.14; - set Dart_PropagateError_DL(Dart_PropagateError_Type value) => - _Dart_PropagateError_DL.value = value; +const double kCFCoreFoundationVersionNumber10_5_5 = 476.15; - late final ffi.Pointer - _Dart_HandleFromPersistent_DL = - _lookup('Dart_HandleFromPersistent_DL'); +const double kCFCoreFoundationVersionNumber10_5_6 = 476.17; - Dart_HandleFromPersistent_Type get Dart_HandleFromPersistent_DL => - _Dart_HandleFromPersistent_DL.value; +const double kCFCoreFoundationVersionNumber10_5_7 = 476.18; - set Dart_HandleFromPersistent_DL(Dart_HandleFromPersistent_Type value) => - _Dart_HandleFromPersistent_DL.value = value; +const double kCFCoreFoundationVersionNumber10_5_8 = 476.19; - late final ffi.Pointer - _Dart_HandleFromWeakPersistent_DL = - _lookup( - 'Dart_HandleFromWeakPersistent_DL'); +const double kCFCoreFoundationVersionNumber10_6 = 550.0; - Dart_HandleFromWeakPersistent_Type get Dart_HandleFromWeakPersistent_DL => - _Dart_HandleFromWeakPersistent_DL.value; +const double kCFCoreFoundationVersionNumber10_6_1 = 550.0; - set Dart_HandleFromWeakPersistent_DL( - Dart_HandleFromWeakPersistent_Type value) => - _Dart_HandleFromWeakPersistent_DL.value = value; +const double kCFCoreFoundationVersionNumber10_6_2 = 550.13; - late final ffi.Pointer - _Dart_NewPersistentHandle_DL = - _lookup('Dart_NewPersistentHandle_DL'); +const double kCFCoreFoundationVersionNumber10_6_3 = 550.19; - Dart_NewPersistentHandle_Type get Dart_NewPersistentHandle_DL => - _Dart_NewPersistentHandle_DL.value; +const double kCFCoreFoundationVersionNumber10_6_4 = 550.29; - set Dart_NewPersistentHandle_DL(Dart_NewPersistentHandle_Type value) => - _Dart_NewPersistentHandle_DL.value = value; +const double kCFCoreFoundationVersionNumber10_6_5 = 550.42; - late final ffi.Pointer - _Dart_SetPersistentHandle_DL = - _lookup('Dart_SetPersistentHandle_DL'); +const double kCFCoreFoundationVersionNumber10_6_6 = 550.42; - Dart_SetPersistentHandle_Type get Dart_SetPersistentHandle_DL => - _Dart_SetPersistentHandle_DL.value; +const double kCFCoreFoundationVersionNumber10_6_7 = 550.42; - set Dart_SetPersistentHandle_DL(Dart_SetPersistentHandle_Type value) => - _Dart_SetPersistentHandle_DL.value = value; +const double kCFCoreFoundationVersionNumber10_6_8 = 550.43; - late final ffi.Pointer - _Dart_DeletePersistentHandle_DL = - _lookup( - 'Dart_DeletePersistentHandle_DL'); +const double kCFCoreFoundationVersionNumber10_7 = 635.0; - Dart_DeletePersistentHandle_Type get Dart_DeletePersistentHandle_DL => - _Dart_DeletePersistentHandle_DL.value; +const double kCFCoreFoundationVersionNumber10_7_1 = 635.0; - set Dart_DeletePersistentHandle_DL(Dart_DeletePersistentHandle_Type value) => - _Dart_DeletePersistentHandle_DL.value = value; +const double kCFCoreFoundationVersionNumber10_7_2 = 635.15; - late final ffi.Pointer - _Dart_NewWeakPersistentHandle_DL = - _lookup( - 'Dart_NewWeakPersistentHandle_DL'); +const double kCFCoreFoundationVersionNumber10_7_3 = 635.19; - Dart_NewWeakPersistentHandle_Type get Dart_NewWeakPersistentHandle_DL => - _Dart_NewWeakPersistentHandle_DL.value; +const double kCFCoreFoundationVersionNumber10_7_4 = 635.21; - set Dart_NewWeakPersistentHandle_DL( - Dart_NewWeakPersistentHandle_Type value) => - _Dart_NewWeakPersistentHandle_DL.value = value; +const double kCFCoreFoundationVersionNumber10_7_5 = 635.21; - late final ffi.Pointer - _Dart_DeleteWeakPersistentHandle_DL = - _lookup( - 'Dart_DeleteWeakPersistentHandle_DL'); +const double kCFCoreFoundationVersionNumber10_8 = 744.0; - Dart_DeleteWeakPersistentHandle_Type get Dart_DeleteWeakPersistentHandle_DL => - _Dart_DeleteWeakPersistentHandle_DL.value; +const double kCFCoreFoundationVersionNumber10_8_1 = 744.0; - set Dart_DeleteWeakPersistentHandle_DL( - Dart_DeleteWeakPersistentHandle_Type value) => - _Dart_DeleteWeakPersistentHandle_DL.value = value; +const double kCFCoreFoundationVersionNumber10_8_2 = 744.12; - late final ffi.Pointer - _Dart_UpdateExternalSize_DL = - _lookup('Dart_UpdateExternalSize_DL'); +const double kCFCoreFoundationVersionNumber10_8_3 = 744.18; - Dart_UpdateExternalSize_Type get Dart_UpdateExternalSize_DL => - _Dart_UpdateExternalSize_DL.value; +const double kCFCoreFoundationVersionNumber10_8_4 = 744.19; - set Dart_UpdateExternalSize_DL(Dart_UpdateExternalSize_Type value) => - _Dart_UpdateExternalSize_DL.value = value; +const double kCFCoreFoundationVersionNumber10_9 = 855.11; - late final ffi.Pointer - _Dart_NewFinalizableHandle_DL = - _lookup('Dart_NewFinalizableHandle_DL'); +const double kCFCoreFoundationVersionNumber10_9_1 = 855.11; - Dart_NewFinalizableHandle_Type get Dart_NewFinalizableHandle_DL => - _Dart_NewFinalizableHandle_DL.value; +const double kCFCoreFoundationVersionNumber10_9_2 = 855.14; - set Dart_NewFinalizableHandle_DL(Dart_NewFinalizableHandle_Type value) => - _Dart_NewFinalizableHandle_DL.value = value; +const double kCFCoreFoundationVersionNumber10_10 = 1151.16; - late final ffi.Pointer - _Dart_DeleteFinalizableHandle_DL = - _lookup( - 'Dart_DeleteFinalizableHandle_DL'); +const double kCFCoreFoundationVersionNumber10_10_1 = 1151.16; - Dart_DeleteFinalizableHandle_Type get Dart_DeleteFinalizableHandle_DL => - _Dart_DeleteFinalizableHandle_DL.value; +const int kCFCoreFoundationVersionNumber10_10_2 = 1152; - set Dart_DeleteFinalizableHandle_DL( - Dart_DeleteFinalizableHandle_Type value) => - _Dart_DeleteFinalizableHandle_DL.value = value; +const double kCFCoreFoundationVersionNumber10_10_3 = 1153.18; - late final ffi.Pointer - _Dart_UpdateFinalizableExternalSize_DL = - _lookup( - 'Dart_UpdateFinalizableExternalSize_DL'); +const double kCFCoreFoundationVersionNumber10_10_4 = 1153.18; - Dart_UpdateFinalizableExternalSize_Type - get Dart_UpdateFinalizableExternalSize_DL => - _Dart_UpdateFinalizableExternalSize_DL.value; +const double kCFCoreFoundationVersionNumber10_10_5 = 1153.18; - set Dart_UpdateFinalizableExternalSize_DL( - Dart_UpdateFinalizableExternalSize_Type value) => - _Dart_UpdateFinalizableExternalSize_DL.value = value; +const int kCFCoreFoundationVersionNumber10_10_Max = 1199; - late final ffi.Pointer _Dart_Post_DL = - _lookup('Dart_Post_DL'); +const int kCFCoreFoundationVersionNumber10_11 = 1253; - Dart_Post_Type get Dart_Post_DL => _Dart_Post_DL.value; +const double kCFCoreFoundationVersionNumber10_11_1 = 1255.1; - set Dart_Post_DL(Dart_Post_Type value) => _Dart_Post_DL.value = value; +const double kCFCoreFoundationVersionNumber10_11_2 = 1256.14; - late final ffi.Pointer _Dart_NewSendPort_DL = - _lookup('Dart_NewSendPort_DL'); +const double kCFCoreFoundationVersionNumber10_11_3 = 1256.14; - Dart_NewSendPort_Type get Dart_NewSendPort_DL => _Dart_NewSendPort_DL.value; +const double kCFCoreFoundationVersionNumber10_11_4 = 1258.1; - set Dart_NewSendPort_DL(Dart_NewSendPort_Type value) => - _Dart_NewSendPort_DL.value = value; +const int kCFCoreFoundationVersionNumber10_11_Max = 1299; - late final ffi.Pointer _Dart_SendPortGetId_DL = - _lookup('Dart_SendPortGetId_DL'); +const int ISA_PTRAUTH_DISCRIMINATOR = 27361; - Dart_SendPortGetId_Type get Dart_SendPortGetId_DL => - _Dart_SendPortGetId_DL.value; +const double NSTimeIntervalSince1970 = 978307200.0; - set Dart_SendPortGetId_DL(Dart_SendPortGetId_Type value) => - _Dart_SendPortGetId_DL.value = value; +const int __COREFOUNDATION_CFARRAY__ = 1; - late final ffi.Pointer _Dart_EnterScope_DL = - _lookup('Dart_EnterScope_DL'); +const int OS_OBJECT_HAVE_OBJC_SUPPORT = 0; - Dart_EnterScope_Type get Dart_EnterScope_DL => _Dart_EnterScope_DL.value; +const int OS_OBJECT_USE_OBJC = 0; - set Dart_EnterScope_DL(Dart_EnterScope_Type value) => - _Dart_EnterScope_DL.value = value; +const int OS_OBJECT_SWIFT3 = 0; - late final ffi.Pointer _Dart_ExitScope_DL = - _lookup('Dart_ExitScope_DL'); +const int OS_OBJECT_USE_OBJC_RETAIN_RELEASE = 0; - Dart_ExitScope_Type get Dart_ExitScope_DL => _Dart_ExitScope_DL.value; +const int SEC_OS_IPHONE = 0; - set Dart_ExitScope_DL(Dart_ExitScope_Type value) => - _Dart_ExitScope_DL.value = value; +const int SEC_OS_OSX = 1; - late final _class_CUPHTTPTaskConfiguration1 = - _getClass1("CUPHTTPTaskConfiguration"); - late final _sel_initWithPort_1 = _registerName1("initWithPort:"); - ffi.Pointer _objc_msgSend_323( - ffi.Pointer obj, - ffi.Pointer sel, - int sendPort, - ) { - return __objc_msgSend_323( - obj, - sel, - sendPort, - ); - } +const int SEC_OS_OSX_INCLUDES = 1; - late final __objc_msgSend_323Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, Dart_Port)>>('objc_msgSend'); - late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); +const int SECURITY_TYPE_UNIFICATION = 1; - late final _sel_sendPort1 = _registerName1("sendPort"); - late final _class_CUPHTTPClientDelegate1 = - _getClass1("CUPHTTPClientDelegate"); - late final _sel_registerTask_withConfiguration_1 = - _registerName1("registerTask:withConfiguration:"); - void _objc_msgSend_324( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer config, - ) { - return __objc_msgSend_324( - obj, - sel, - task, - config, - ); - } +const int __COREFOUNDATION_COREFOUNDATION__ = 1; - late final __objc_msgSend_324Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); +const int __COREFOUNDATION__ = 1; - late final _class_CUPHTTPForwardedDelegate1 = - _getClass1("CUPHTTPForwardedDelegate"); - late final _sel_initWithSession_task_1 = - _registerName1("initWithSession:task:"); - ffi.Pointer _objc_msgSend_325( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ) { - return __objc_msgSend_325( - obj, - sel, - session, - task, - ); - } +const String __ASSERT_FILE_NAME = 'temp_for_macros.hpp'; - late final __objc_msgSend_325Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); +const int __DARWIN_WCHAR_MAX = 2147483647; - late final _sel_finish1 = _registerName1("finish"); - late final _sel_session1 = _registerName1("session"); - late final _sel_task1 = _registerName1("task"); - ffi.Pointer _objc_msgSend_326( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_326( - obj, - sel, - ); - } +const int __DARWIN_WCHAR_MIN = -2147483648; - late final __objc_msgSend_326Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); +const int _FORTIFY_SOURCE = 2; - late final _class_NSLock1 = _getClass1("NSLock"); - late final _sel_lock1 = _registerName1("lock"); - ffi.Pointer _objc_msgSend_327( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_327( - obj, - sel, - ); - } +const int _CACHED_RUNES = 256; - late final __objc_msgSend_327Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); +const int _CRMASK = -256; - late final _class_CUPHTTPForwardedRedirect1 = - _getClass1("CUPHTTPForwardedRedirect"); - late final _sel_initWithSession_task_response_request_1 = - _registerName1("initWithSession:task:response:request:"); - ffi.Pointer _objc_msgSend_328( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer response, - ffi.Pointer request, - ) { - return __objc_msgSend_328( - obj, - sel, - session, - task, - response, - request, - ); - } +const String _RUNE_MAGIC_A = 'RuneMagA'; - late final __objc_msgSend_328Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); +const int _CTYPE_A = 256; - late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); - void _objc_msgSend_329( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_329( - obj, - sel, - request, - ); - } +const int _CTYPE_C = 512; - late final __objc_msgSend_329Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); +const int _CTYPE_D = 1024; - ffi.Pointer _objc_msgSend_330( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_330( - obj, - sel, - ); - } +const int _CTYPE_G = 2048; - late final __objc_msgSend_330Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); +const int _CTYPE_L = 4096; - late final _sel_redirectRequest1 = _registerName1("redirectRequest"); - late final _class_CUPHTTPForwardedResponse1 = - _getClass1("CUPHTTPForwardedResponse"); - late final _sel_initWithSession_task_response_1 = - _registerName1("initWithSession:task:response:"); - ffi.Pointer _objc_msgSend_331( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer response, - ) { - return __objc_msgSend_331( - obj, - sel, - session, - task, - response, - ); - } +const int _CTYPE_P = 8192; - late final __objc_msgSend_331Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); +const int _CTYPE_S = 16384; - late final _sel_finishWithDisposition_1 = - _registerName1("finishWithDisposition:"); - void _objc_msgSend_332( - ffi.Pointer obj, - ffi.Pointer sel, - int disposition, - ) { - return __objc_msgSend_332( - obj, - sel, - disposition, - ); - } +const int _CTYPE_U = 32768; - late final __objc_msgSend_332Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); +const int _CTYPE_X = 65536; - late final _sel_disposition1 = _registerName1("disposition"); - int _objc_msgSend_333( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_333( - obj, - sel, - ); - } +const int _CTYPE_B = 131072; - late final __objc_msgSend_333Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); +const int _CTYPE_R = 262144; - late final _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); - late final _sel_initWithSession_task_data_1 = - _registerName1("initWithSession:task:data:"); - ffi.Pointer _objc_msgSend_334( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer data, - ) { - return __objc_msgSend_334( - obj, - sel, - session, - task, - data, - ); - } +const int _CTYPE_I = 524288; - late final __objc_msgSend_334Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); +const int _CTYPE_T = 1048576; - late final _class_CUPHTTPForwardedComplete1 = - _getClass1("CUPHTTPForwardedComplete"); - late final _sel_initWithSession_task_error_1 = - _registerName1("initWithSession:task:error:"); - ffi.Pointer _objc_msgSend_335( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer error, - ) { - return __objc_msgSend_335( - obj, - sel, - session, - task, - error, - ); - } +const int _CTYPE_Q = 2097152; - late final __objc_msgSend_335Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); +const int _CTYPE_SW0 = 536870912; - late final _class_CUPHTTPForwardedFinishedDownloading1 = - _getClass1("CUPHTTPForwardedFinishedDownloading"); - late final _sel_initWithSession_downloadTask_url_1 = - _registerName1("initWithSession:downloadTask:url:"); - ffi.Pointer _objc_msgSend_336( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer downloadTask, - ffi.Pointer location, - ) { - return __objc_msgSend_336( - obj, - sel, - session, - downloadTask, - location, - ); - } +const int _CTYPE_SW1 = 1073741824; - late final __objc_msgSend_336Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); +const int _CTYPE_SW2 = 2147483648; - late final _sel_location1 = _registerName1("location"); -} +const int _CTYPE_SW3 = 3221225472; -/// Immutable Array -class _ObjCWrapper implements ffi.Finalizable { - final ffi.Pointer _id; - final NativeCupertinoHttp _lib; - bool _pendingRelease; +const int _CTYPE_SWM = 3758096384; - _ObjCWrapper._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._objc_retain(_id); - } - if (release) { - _lib._objc_releaseFinalizer1.attach(this, _id.cast(), detach: this); - } - } +const int _CTYPE_SWS = 30; - /// Releases the reference to the underlying ObjC object held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._objc_release(_id); - _lib._objc_releaseFinalizer1.detach(this); - } else { - throw StateError( - 'Released an ObjC object that was unowned or already released.'); - } - } +const int EPERM = 1; - @override - bool operator ==(Object other) { - return other is _ObjCWrapper && _id == other._id; - } +const int ENOENT = 2; - @override - int get hashCode => _id.hashCode; -} +const int ESRCH = 3; -class NSArray extends NSObject { - NSArray._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int EINTR = 4; - /// Returns a [NSArray] that points to the same underlying object as [other]. - static NSArray castFrom(T other) { - return NSArray._(other._id, other._lib, retain: true, release: true); - } +const int EIO = 5; - /// Returns a [NSArray] that wraps the given raw object pointer. - static NSArray castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSArray._(other, lib, retain: retain, release: release); - } +const int ENXIO = 6; - /// Returns whether [obj] is an instance of [NSArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); - } +const int E2BIG = 7; - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } +const int ENOEXEC = 8; - NSObject objectAtIndex_(int index) { - final _ret = _lib._objc_msgSend_146(_id, _lib._sel_objectAtIndex_1, index); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int EBADF = 9; - @override - NSArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int ECHILD = 10; - NSArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_147( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EDEADLK = 11; - NSArray initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int ENOMEM = 12; - NSArray arrayByAddingObject_(NSObject anObject) { - final _ret = _lib._objc_msgSend_73( - _id, _lib._sel_arrayByAddingObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EACCES = 13; - NSArray arrayByAddingObjectsFromArray_(NSArray? otherArray) { - final _ret = _lib._objc_msgSend_148( - _id, - _lib._sel_arrayByAddingObjectsFromArray_1, - otherArray?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EFAULT = 14; - NSString componentsJoinedByString_(NSString? separator) { - final _ret = _lib._objc_msgSend_149(_id, - _lib._sel_componentsJoinedByString_1, separator?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int ENOTBLK = 15; - bool containsObject_(NSObject anObject) { - return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); - } +const int EBUSY = 16; - NSString? get description { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int EEXIST = 17; - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int EXDEV = 18; - NSString descriptionWithLocale_indent_(NSObject locale, int level) { - final _ret = _lib._objc_msgSend_74( - _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int ENODEV = 19; - NSObject firstObjectCommonWithArray_(NSArray? otherArray) { - final _ret = _lib._objc_msgSend_86(_id, - _lib._sel_firstObjectCommonWithArray_1, otherArray?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int ENOTDIR = 20; - void getObjects_range_( - ffi.Pointer> objects, NSRange range) { - return _lib._objc_msgSend_150( - _id, _lib._sel_getObjects_range_1, objects, range); - } +const int EISDIR = 21; - int indexOfObject_(NSObject anObject) { - return _lib._objc_msgSend_151(_id, _lib._sel_indexOfObject_1, anObject._id); - } +const int EINVAL = 22; - int indexOfObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_152( - _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); - } +const int ENFILE = 23; - int indexOfObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_151( - _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); - } +const int EMFILE = 24; - int indexOfObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_152( - _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); - } +const int ENOTTY = 25; - bool isEqualToArray_(NSArray? otherArray) { - return _lib._objc_msgSend_153( - _id, _lib._sel_isEqualToArray_1, otherArray?._id ?? ffi.nullptr); - } +const int ETXTBSY = 26; - NSObject get firstObject { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_firstObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int EFBIG = 27; - NSObject get lastObject { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_lastObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int ENOSPC = 28; - static NSArray array(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int ESPIPE = 29; - static NSArray arrayWithObject_(NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_71( - _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EROFS = 30; - static NSArray arrayWithObjects_count_(NativeCupertinoHttp _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_147( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EMLINK = 31; - static NSArray arrayWithObjects_( - NativeCupertinoHttp _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_71( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EPIPE = 32; - static NSArray arrayWithArray_(NativeCupertinoHttp _lib, NSArray? array) { - final _ret = _lib._objc_msgSend_86(_lib._class_NSArray1, - _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EDOM = 33; - NSArray initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_71(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int ERANGE = 34; - NSArray initWithArray_(NSArray? array) { - final _ret = _lib._objc_msgSend_86( - _id, _lib._sel_initWithArray_1, array?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EAGAIN = 35; - NSArray initWithArray_copyItems_(NSArray? array, bool flag) { - final _ret = _lib._objc_msgSend_154(_id, - _lib._sel_initWithArray_copyItems_1, array?._id ?? ffi.nullptr, flag); - return NSArray._(_ret, _lib, retain: false, release: true); - } +const int EWOULDBLOCK = 35; - /// Reads array stored in NSPropertyList format from the specified url. - NSArray initWithContentsOfURL_error_( - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_155( - _id, - _lib._sel_initWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EINPROGRESS = 36; - /// Reads array stored in NSPropertyList format from the specified url. - static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_155( - _lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EALREADY = 37; - /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead. - void getObjects_(ffi.Pointer> objects) { - return _lib._objc_msgSend_156(_id, _lib._sel_getObjects_1, objects); - } +const int ENOTSOCK = 38; - /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. - static NSArray arrayWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_157(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EDESTADDRREQ = 39; - static NSArray arrayWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_158(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EMSGSIZE = 40; - NSArray initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_157( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int EPROTOTYPE = 41; - NSArray initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_158( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int ENOPROTOOPT = 42; - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_24(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); - } +const int EPROTONOSUPPORT = 43; - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_79(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); - } +const int ESOCKTNOSUPPORT = 44; - static NSArray new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); - return NSArray._(_ret, _lib, retain: false, release: true); - } +const int ENOTSUP = 45; - static NSArray alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); - return NSArray._(_ret, _lib, retain: false, release: true); - } -} +const int EPFNOSUPPORT = 46; -class ObjCSel extends ffi.Opaque {} +const int EAFNOSUPPORT = 47; -class ObjCObject extends ffi.Opaque {} +const int EADDRINUSE = 48; -class NSObject extends _ObjCWrapper { - NSObject._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int EADDRNOTAVAIL = 49; - /// Returns a [NSObject] that points to the same underlying object as [other]. - static NSObject castFrom(T other) { - return NSObject._(other._id, other._lib, retain: true, release: true); - } +const int ENETDOWN = 50; - /// Returns a [NSObject] that wraps the given raw object pointer. - static NSObject castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSObject._(other, lib, retain: retain, release: release); - } +const int ENETUNREACH = 51; - /// Returns whether [obj] is an instance of [NSObject]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); - } +const int ENETRESET = 52; - static void load(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); - } +const int ECONNABORTED = 53; - static void initialize(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); - } +const int ECONNRESET = 54; - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int ENOBUFS = 55; - static NSObject new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); - return NSObject._(_ret, _lib, retain: false, release: true); - } +const int EISCONN = 56; - static NSObject allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } +const int ENOTCONN = 57; - static NSObject alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); - } +const int ESHUTDOWN = 58; - void dealloc() { - return _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); - } +const int ETOOMANYREFS = 59; - void finalize() { - return _lib._objc_msgSend_1(_id, _lib._sel_finalize1); - } +const int ETIMEDOUT = 60; - NSObject copy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); - return NSObject._(_ret, _lib, retain: false, release: true); - } +const int ECONNREFUSED = 61; - NSObject mutableCopy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); - return NSObject._(_ret, _lib, retain: false, release: true); - } +const int ELOOP = 62; - static NSObject copyWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } +const int ENAMETOOLONG = 63; - static NSObject mutableCopyWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } +const int EHOSTDOWN = 64; - static bool instancesRespondToSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4(_lib._class_NSObject1, - _lib._sel_instancesRespondToSelector_1, aSelector); - } +const int EHOSTUNREACH = 65; - static bool conformsToProtocol_( - NativeCupertinoHttp _lib, Protocol? protocol) { - return _lib._objc_msgSend_5(_lib._class_NSObject1, - _lib._sel_conformsToProtocol_1, protocol?._id ?? ffi.nullptr); - } +const int ENOTEMPTY = 66; - IMP methodForSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); - } +const int EPROCLIM = 67; - static IMP instanceMethodForSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_lib._class_NSObject1, - _lib._sel_instanceMethodForSelector_1, aSelector); - } +const int EUSERS = 68; - void doesNotRecognizeSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_7( - _id, _lib._sel_doesNotRecognizeSelector_1, aSelector); - } +const int EDQUOT = 69; - NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_8( - _id, _lib._sel_forwardingTargetForSelector_1, aSelector); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int ESTALE = 70; - void forwardInvocation_(NSInvocation? anInvocation) { - return _lib._objc_msgSend_9( - _id, _lib._sel_forwardInvocation_1, anInvocation?._id ?? ffi.nullptr); - } +const int EREMOTE = 71; - NSMethodSignature methodSignatureForSelector_( - ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_10( - _id, _lib._sel_methodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } +const int EBADRPC = 72; - static NSMethodSignature instanceMethodSignatureForSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_10(_lib._class_NSObject1, - _lib._sel_instanceMethodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } +const int ERPCMISMATCH = 73; - bool allowsWeakReference() { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsWeakReference1); - } +const int EPROGUNAVAIL = 74; - bool retainWeakReference() { - return _lib._objc_msgSend_11(_id, _lib._sel_retainWeakReference1); - } +const int EPROGMISMATCH = 75; - static bool isSubclassOfClass_(NativeCupertinoHttp _lib, NSObject aClass) { - return _lib._objc_msgSend_0( - _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); - } +const int EPROCUNAVAIL = 76; - static bool resolveClassMethod_( - NativeCupertinoHttp _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); - } +const int ENOLCK = 77; - static bool resolveInstanceMethod_( - NativeCupertinoHttp _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); - } +const int ENOSYS = 78; - static int hash(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); - } +const int EFTYPE = 79; - static NSObject superclass(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int EAUTH = 80; - static NSObject class1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int ENEEDAUTH = 81; - static NSString description(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_19(_lib._class_NSObject1, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int EPWROFF = 82; - static NSString debugDescription(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_19( - _lib._class_NSObject1, _lib._sel_debugDescription1); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int EDEVERR = 83; - void URL_resourceDataDidBecomeAvailable_(NSURL? sender, NSData? newBytes) { - return _lib._objc_msgSend_141( - _id, - _lib._sel_URL_resourceDataDidBecomeAvailable_1, - sender?._id ?? ffi.nullptr, - newBytes?._id ?? ffi.nullptr); - } +const int EOVERFLOW = 84; - void URLResourceDidFinishLoading_(NSURL? sender) { - return _lib._objc_msgSend_142(_id, _lib._sel_URLResourceDidFinishLoading_1, - sender?._id ?? ffi.nullptr); - } +const int EBADEXEC = 85; - void URLResourceDidCancelLoading_(NSURL? sender) { - return _lib._objc_msgSend_142(_id, _lib._sel_URLResourceDidCancelLoading_1, - sender?._id ?? ffi.nullptr); - } +const int EBADARCH = 86; - void URL_resourceDidFailLoadingWithReason_(NSURL? sender, NSString? reason) { - return _lib._objc_msgSend_143( - _id, - _lib._sel_URL_resourceDidFailLoadingWithReason_1, - sender?._id ?? ffi.nullptr, - reason?._id ?? ffi.nullptr); - } +const int ESHLIBVERS = 87; - /// Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: - /// - /// - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; - /// - /// The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. - void - attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( - NSError? error, - int recoveryOptionIndex, - NSObject delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo) { - return _lib._objc_msgSend_144( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, - error?._id ?? ffi.nullptr, - recoveryOptionIndex, - delegate._id, - didRecoverSelector, - contextInfo); - } +const int EBADMACHO = 88; - /// Given that an error alert has been presented applicaton-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and return YES if error recovery was completely successful, NO otherwise. The recovery option index is an index into the error's array of localized recovery options. - bool attemptRecoveryFromError_optionIndex_( - NSError? error, int recoveryOptionIndex) { - return _lib._objc_msgSend_145( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_1, - error?._id ?? ffi.nullptr, - recoveryOptionIndex); - } -} +const int ECANCELED = 89; -typedef instancetype = ffi.Pointer; +const int EIDRM = 90; -class _NSZone extends ffi.Opaque {} +const int ENOMSG = 91; -class Protocol extends _ObjCWrapper { - Protocol._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int EILSEQ = 92; - /// Returns a [Protocol] that points to the same underlying object as [other]. - static Protocol castFrom(T other) { - return Protocol._(other._id, other._lib, retain: true, release: true); - } +const int ENOATTR = 93; - /// Returns a [Protocol] that wraps the given raw object pointer. - static Protocol castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return Protocol._(other, lib, retain: retain, release: release); - } +const int EBADMSG = 94; - /// Returns whether [obj] is an instance of [Protocol]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); - } -} +const int EMULTIHOP = 95; -typedef IMP = ffi.Pointer>; +const int ENODATA = 96; -class NSInvocation extends _ObjCWrapper { - NSInvocation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int ENOLINK = 97; - /// Returns a [NSInvocation] that points to the same underlying object as [other]. - static NSInvocation castFrom(T other) { - return NSInvocation._(other._id, other._lib, retain: true, release: true); - } +const int ENOSR = 98; - /// Returns a [NSInvocation] that wraps the given raw object pointer. - static NSInvocation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInvocation._(other, lib, retain: retain, release: release); - } +const int ENOSTR = 99; - /// Returns whether [obj] is an instance of [NSInvocation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInvocation1); - } -} +const int EPROTO = 100; -class NSMethodSignature extends _ObjCWrapper { - NSMethodSignature._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int ETIME = 101; - /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. - static NSMethodSignature castFrom(T other) { - return NSMethodSignature._(other._id, other._lib, - retain: true, release: true); - } +const int EOPNOTSUPP = 102; - /// Returns a [NSMethodSignature] that wraps the given raw object pointer. - static NSMethodSignature castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMethodSignature._(other, lib, retain: retain, release: release); - } +const int ENOPOLICY = 103; - /// Returns whether [obj] is an instance of [NSMethodSignature]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMethodSignature1); - } -} +const int ENOTRECOVERABLE = 104; -typedef NSUInteger = ffi.UnsignedLong; +const int EOWNERDEAD = 105; -class NSString extends NSObject { - NSString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int EQFULL = 106; - /// Returns a [NSString] that points to the same underlying object as [other]. - static NSString castFrom(T other) { - return NSString._(other._id, other._lib, retain: true, release: true); - } +const int ELAST = 106; - /// Returns a [NSString] that wraps the given raw object pointer. - static NSString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSString._(other, lib, retain: retain, release: release); - } +const int FLT_EVAL_METHOD = 0; - /// Returns whether [obj] is an instance of [NSString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); - } +const int FLT_RADIX = 2; - factory NSString(NativeCupertinoHttp _lib, String str) { - final cstr = str.toNativeUtf8(); - final nsstr = stringWithCString_encoding_(_lib, cstr.cast(), 4 /* UTF8 */); - pkg_ffi.calloc.free(cstr); - return nsstr; - } +const int FLT_MANT_DIG = 24; - @override - String toString() => (UTF8String).cast().toDartString(); +const int DBL_MANT_DIG = 53; - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); - } +const int LDBL_MANT_DIG = 53; - int characterAtIndex_(int index) { - return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); - } +const int FLT_DIG = 6; - @override - NSString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int DBL_DIG = 15; - NSString initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int LDBL_DIG = 15; - /// Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode an URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. - NSString stringByAddingPercentEncodingWithAllowedCharacters_( - NSCharacterSet? allowedCharacters) { - final _ret = _lib._objc_msgSend_138( - _id, - _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, - allowedCharacters?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int FLT_MIN_EXP = -125; - /// Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. - NSString? get stringByRemovingPercentEncoding { - final _ret = - _lib._objc_msgSend_19(_id, _lib._sel_stringByRemovingPercentEncoding1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int DBL_MIN_EXP = -1021; - NSString stringByAddingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_139( - _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int LDBL_MIN_EXP = -1021; + +const int FLT_MIN_10_EXP = -37; - NSString stringByReplacingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_139( - _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int DBL_MIN_10_EXP = -307; - static NSString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_140(_lib._class_NSString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int LDBL_MIN_10_EXP = -307; - ffi.Pointer get UTF8String { - return _lib._objc_msgSend_40(_id, _lib._sel_UTF8String1); - } +const int FLT_MAX_EXP = 128; - static NSString new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); - return NSString._(_ret, _lib, retain: false, release: true); - } +const int DBL_MAX_EXP = 1024; - static NSString alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); - return NSString._(_ret, _lib, retain: false, release: true); - } -} +const int LDBL_MAX_EXP = 1024; -extension StringToNSString on String { - NSString toNSString(NativeCupertinoHttp lib) => NSString(lib, this); -} +const int FLT_MAX_10_EXP = 38; -typedef unichar = ffi.UnsignedShort; +const int DBL_MAX_10_EXP = 308; -class NSCoder extends _ObjCWrapper { - NSCoder._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int LDBL_MAX_10_EXP = 308; - /// Returns a [NSCoder] that points to the same underlying object as [other]. - static NSCoder castFrom(T other) { - return NSCoder._(other._id, other._lib, retain: true, release: true); - } +const double FLT_MAX = 3.4028234663852886e+38; - /// Returns a [NSCoder] that wraps the given raw object pointer. - static NSCoder castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCoder._(other, lib, retain: retain, release: release); - } +const double DBL_MAX = 1.7976931348623157e+308; - /// Returns whether [obj] is an instance of [NSCoder]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); - } -} +const double LDBL_MAX = 1.7976931348623157e+308; -class NSCharacterSet extends NSObject { - NSCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const double FLT_EPSILON = 1.1920928955078125e-7; - /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. - static NSCharacterSet castFrom(T other) { - return NSCharacterSet._(other._id, other._lib, retain: true, release: true); - } +const double DBL_EPSILON = 2.220446049250313e-16; - /// Returns a [NSCharacterSet] that wraps the given raw object pointer. - static NSCharacterSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCharacterSet._(other, lib, retain: retain, release: release); - } +const double LDBL_EPSILON = 2.220446049250313e-16; - /// Returns whether [obj] is an instance of [NSCharacterSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSCharacterSet1); - } +const double FLT_MIN = 1.1754943508222875e-38; - static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const double DBL_MIN = 2.2250738585072014e-308; - static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const double LDBL_MIN = 2.2250738585072014e-308; - static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSCharacterSet1, - _lib._sel_whitespaceAndNewlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int DECIMAL_DIG = 17; - static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int FLT_HAS_SUBNORM = 1; - static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int DBL_HAS_SUBNORM = 1; - static NSCharacterSet? getLowercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int LDBL_HAS_SUBNORM = 1; - static NSCharacterSet? getUppercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const double FLT_TRUE_MIN = 1.401298464324817e-45; - static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const double DBL_TRUE_MIN = 5e-324; - static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const double LDBL_TRUE_MIN = 5e-324; - static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int FLT_DECIMAL_DIG = 9; - static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int DBL_DECIMAL_DIG = 17; - static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int LDBL_DECIMAL_DIG = 17; - static NSCharacterSet? getCapitalizedLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int LC_ALL = 0; - static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int LC_COLLATE = 1; - static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: false, release: true); - } +const int LC_CTYPE = 2; - static NSCharacterSet characterSetWithRange_( - NativeCupertinoHttp _lib, NSRange aRange) { - final _ret = _lib._objc_msgSend_16( - _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int LC_MONETARY = 3; - static NSCharacterSet characterSetWithCharactersInString_( - NativeCupertinoHttp _lib, NSString? aString) { - final _ret = _lib._objc_msgSend_17( - _lib._class_NSCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, - aString?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int LC_NUMERIC = 4; - static NSCharacterSet characterSetWithBitmapRepresentation_( - NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_133( - _lib._class_NSCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, - data?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int LC_TIME = 5; - static NSCharacterSet characterSetWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? fName) { - final _ret = _lib._objc_msgSend_17(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int LC_MESSAGES = 6; - NSCharacterSet initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int _LC_LAST = 7; - bool characterIsMember_(int aCharacter) { - return _lib._objc_msgSend_134( - _id, _lib._sel_characterIsMember_1, aCharacter); - } +const double HUGE_VAL = double.infinity; - NSData? get bitmapRepresentation { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_bitmapRepresentation1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } +const double HUGE_VALF = double.infinity; - NSCharacterSet? get invertedSet { - final _ret = _lib._objc_msgSend_15(_id, _lib._sel_invertedSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const double HUGE_VALL = double.infinity; - bool longCharacterIsMember_(int theLongChar) { - return _lib._objc_msgSend_135( - _id, _lib._sel_longCharacterIsMember_1, theLongChar); - } +const double NAN = double.nan; - bool isSupersetOfSet_(NSCharacterSet? theOtherSet) { - return _lib._objc_msgSend_136( - _id, _lib._sel_isSupersetOfSet_1, theOtherSet?._id ?? ffi.nullptr); - } +const double INFINITY = double.infinity; - bool hasMemberInPlane_(int thePlane) { - return _lib._objc_msgSend_137(_id, _lib._sel_hasMemberInPlane_1, thePlane); - } +const int FP_NAN = 1; - /// Returns a character set containing the characters allowed in an URL's user subcomponent. - static NSCharacterSet? getURLUserAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int FP_INFINITE = 2; - /// Returns a character set containing the characters allowed in an URL's password subcomponent. - static NSCharacterSet? getURLPasswordAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int FP_ZERO = 3; - /// Returns a character set containing the characters allowed in an URL's host subcomponent. - static NSCharacterSet? getURLHostAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int FP_NORMAL = 4; - /// Returns a character set containing the characters allowed in an URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - static NSCharacterSet? getURLPathAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int FP_SUBNORMAL = 5; - /// Returns a character set containing the characters allowed in an URL's query component. - static NSCharacterSet? getURLQueryAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int FP_SUPERNORMAL = 6; - /// Returns a character set containing the characters allowed in an URL's fragment component. - static NSCharacterSet? getURLFragmentAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_15( - _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int FP_FAST_FMA = 1; - static NSCharacterSet new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } +const int FP_FAST_FMAF = 1; - static NSCharacterSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } -} +const int FP_FAST_FMAL = 1; -typedef NSRange = _NSRange; +const int FP_ILOGB0 = -2147483648; -class _NSRange extends ffi.Struct { - @NSUInteger() - external int location; +const int FP_ILOGBNAN = -2147483648; - @NSUInteger() - external int length; -} +const int MATH_ERRNO = 1; -/// Immutable Data -class NSData extends NSObject { - NSData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int MATH_ERREXCEPT = 2; - /// Returns a [NSData] that points to the same underlying object as [other]. - static NSData castFrom(T other) { - return NSData._(other._id, other._lib, retain: true, release: true); - } +const double M_E = 2.718281828459045; - /// Returns a [NSData] that wraps the given raw object pointer. - static NSData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSData._(other, lib, retain: retain, release: release); - } +const double M_LOG2E = 1.4426950408889634; - /// Returns whether [obj] is an instance of [NSData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); - } +const double M_LOG10E = 0.4342944819032518; - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); - } +const double M_LN2 = 0.6931471805599453; - /// The -bytes method returns a pointer to a contiguous region of memory managed by the receiver. - /// If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer - /// Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data. - ffi.Pointer get bytes { - return _lib._objc_msgSend_18(_id, _lib._sel_bytes1); - } +const double M_LN10 = 2.302585092994046; - NSString? get description { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const double M_PI = 3.141592653589793; - void getBytes_length_(ffi.Pointer buffer, int length) { - return _lib._objc_msgSend_20( - _id, _lib._sel_getBytes_length_1, buffer, length); - } +const double M_PI_2 = 1.5707963267948966; - void getBytes_range_(ffi.Pointer buffer, NSRange range) { - return _lib._objc_msgSend_21( - _id, _lib._sel_getBytes_range_1, buffer, range); - } +const double M_PI_4 = 0.7853981633974483; - bool isEqualToData_(NSData? other) { - return _lib._objc_msgSend_22( - _id, _lib._sel_isEqualToData_1, other?._id ?? ffi.nullptr); - } +const double M_1_PI = 0.3183098861837907; - NSData subdataWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_23(_id, _lib._sel_subdataWithRange_1, range); - return NSData._(_ret, _lib, retain: true, release: true); - } +const double M_2_PI = 0.6366197723675814; - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_24(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); - } +const double M_2_SQRTPI = 1.1283791670955126; - /// the atomically flag is ignored if the url is not of a type the supports atomic writes - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_79(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); - } +const double M_SQRT2 = 1.4142135623730951; - bool writeToFile_options_error_(NSString? path, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_117(_id, _lib._sel_writeToFile_options_error_1, - path?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); - } +const double M_SQRT1_2 = 0.7071067811865476; - bool writeToURL_options_error_(NSURL? url, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_118(_id, _lib._sel_writeToURL_options_error_1, - url?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); - } +const double MAXFLOAT = 3.4028234663852886e+38; - NSRange rangeOfData_options_range_( - NSData? dataToFind, int mask, NSRange searchRange) { - return _lib._objc_msgSend_119(_id, _lib._sel_rangeOfData_options_range_1, - dataToFind?._id ?? ffi.nullptr, mask, searchRange); - } +const int FP_SNAN = 1; - /// 'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES. - void enumerateByteRangesUsingBlock_(ObjCBlock1 block) { - return _lib._objc_msgSend_120( - _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._impl); - } +const int FP_QNAN = 1; - static NSData data(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); - } +const double HUGE = 3.4028234663852886e+38; - static NSData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_121( - _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); - } +const double X_TLOSS = 14148475504056880.0; - static NSData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_121(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); - } +const int DOMAIN = 1; - static NSData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - int length, - bool b) { - final _ret = _lib._objc_msgSend_122(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); - } +const int SING = 2; - static NSData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_123( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int OVERFLOW = 3; - static NSData dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int UNDERFLOW = 4; - static NSData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_29(_lib._class_NSData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int TLOSS = 5; - static NSData dataWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_110(_lib._class_NSData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int PLOSS = 6; - NSData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_121( - _id, _lib._sel_initWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int _JBLEN = 48; - NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_121( - _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); - } +const int __DARWIN_NSIG = 32; - NSData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_122(_id, - _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); - } +const int NSIG = 32; - NSData initWithBytesNoCopy_length_deallocator_( - ffi.Pointer bytes, int length, ObjCBlock2 deallocator) { - final _ret = _lib._objc_msgSend_125( - _id, - _lib._sel_initWithBytesNoCopy_length_deallocator_1, - bytes, - length, - deallocator._impl); - return NSData._(_ret, _lib, retain: false, release: true); - } +const int _ARM_SIGNAL_ = 1; - NSData initWithContentsOfFile_options_error_(NSString? path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_123( - _id, - _lib._sel_initWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SIGHUP = 1; - NSData initWithContentsOfURL_options_error_(NSURL? url, int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_124( - _id, - _lib._sel_initWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SIGINT = 2; - NSData initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_29( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SIGQUIT = 3; - NSData initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_110( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SIGILL = 4; - NSData initWithData_(NSData? data) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SIGTRAP = 5; - static NSData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_126(_lib._class_NSData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SIGABRT = 6; - /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. - NSData initWithBase64EncodedString_options_( - NSString? base64String, int options) { - final _ret = _lib._objc_msgSend_127( - _id, - _lib._sel_initWithBase64EncodedString_options_1, - base64String?._id ?? ffi.nullptr, - options); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SIGIOT = 6; - /// Create a Base-64 encoded NSString from the receiver's contents using the given options. - NSString base64EncodedStringWithOptions_(int options) { - final _ret = _lib._objc_msgSend_128( - _id, _lib._sel_base64EncodedStringWithOptions_1, options); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int SIGEMT = 7; - /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. - NSData initWithBase64EncodedData_options_(NSData? base64Data, int options) { - final _ret = _lib._objc_msgSend_129( - _id, - _lib._sel_initWithBase64EncodedData_options_1, - base64Data?._id ?? ffi.nullptr, - options); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SIGFPE = 8; - /// Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options. - NSData base64EncodedDataWithOptions_(int options) { - final _ret = _lib._objc_msgSend_130( - _id, _lib._sel_base64EncodedDataWithOptions_1, options); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SIGKILL = 9; - /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. - NSData decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_131(_id, - _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SIGBUS = 10; + +const int SIGSEGV = 11; + +const int SIGSYS = 12; + +const int SIGPIPE = 13; - NSData compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_131( - _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SIGALRM = 14; - void getBytes_(ffi.Pointer buffer) { - return _lib._objc_msgSend_132(_id, _lib._sel_getBytes_1, buffer); - } +const int SIGTERM = 15; - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_29(_lib._class_NSData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int SIGURG = 16; - NSObject initWithContentsOfMappedFile_(NSString? path) { - final _ret = _lib._objc_msgSend_29(_id, - _lib._sel_initWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int SIGSTOP = 17; - /// These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0. - NSObject initWithBase64Encoding_(NSString? base64String) { - final _ret = _lib._objc_msgSend_29(_id, _lib._sel_initWithBase64Encoding_1, - base64String?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int SIGTSTP = 18; - NSString base64Encoding() { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_base64Encoding1); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int SIGCONT = 19; - static NSData new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); - return NSData._(_ret, _lib, retain: false, release: true); - } +const int SIGCHLD = 20; - static NSData alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); - return NSData._(_ret, _lib, retain: false, release: true); - } -} +const int SIGTTIN = 21; -class NSURL extends NSObject { - NSURL._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int SIGTTOU = 22; - /// Returns a [NSURL] that points to the same underlying object as [other]. - static NSURL castFrom(T other) { - return NSURL._(other._id, other._lib, retain: true, release: true); - } +const int SIGIO = 23; - /// Returns a [NSURL] that wraps the given raw object pointer. - static NSURL castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURL._(other, lib, retain: retain, release: release); - } +const int SIGXCPU = 24; - /// Returns whether [obj] is an instance of [NSURL]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); - } +const int SIGXFSZ = 25; - /// this call percent-encodes both the host and path, so this cannot be used to set a username/password or port in the hostname part or with a IPv6 '[...]' type address. NSURLComponents handles IPv6 addresses correctly. - NSURL initWithScheme_host_path_( - NSString? scheme, NSString? host, NSString? path) { - final _ret = _lib._objc_msgSend_25( - _id, - _lib._sel_initWithScheme_host_path_1, - scheme?._id ?? ffi.nullptr, - host?._id ?? ffi.nullptr, - path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SIGVTALRM = 26; - /// Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL. - NSURL initFileURLWithPath_isDirectory_relativeToURL_( - NSString? path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_26( - _id, - _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, - path?._id ?? ffi.nullptr, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SIGPROF = 27; - /// Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. - NSURL initFileURLWithPath_relativeToURL_(NSString? path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_27( - _id, - _lib._sel_initFileURLWithPath_relativeToURL_1, - path?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SIGWINCH = 28; - NSURL initFileURLWithPath_isDirectory_(NSString? path, bool isDir) { - final _ret = _lib._objc_msgSend_28( - _id, - _lib._sel_initFileURLWithPath_isDirectory_1, - path?._id ?? ffi.nullptr, - isDir); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SIGINFO = 29; - /// Better to use initFileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. - NSURL initFileURLWithPath_(NSString? path) { - final _ret = _lib._objc_msgSend_29( - _id, _lib._sel_initFileURLWithPath_1, path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SIGUSR1 = 30; - /// Initializes and returns a newly created file NSURL referencing the local file or directory at path, relative to a base URL. - static NSURL fileURLWithPath_isDirectory_relativeToURL_( - NativeCupertinoHttp _lib, NSString? path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_30( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, - path?._id ?? ffi.nullptr, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SIGUSR2 = 31; - /// Better to use fileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. - static NSURL fileURLWithPath_relativeToURL_( - NativeCupertinoHttp _lib, NSString? path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_31( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_relativeToURL_1, - path?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int __DARWIN_OPAQUE_ARM_THREAD_STATE64 = 0; - static NSURL fileURLWithPath_isDirectory_( - NativeCupertinoHttp _lib, NSString? path, bool isDir) { - final _ret = _lib._objc_msgSend_32( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_1, - path?._id ?? ffi.nullptr, - isDir); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SIGEV_NONE = 0; - /// Better to use fileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. - static NSURL fileURLWithPath_(NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_33(_lib._class_NSURL1, - _lib._sel_fileURLWithPath_1, path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SIGEV_SIGNAL = 1; - /// Initializes a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. - NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_34( - _id, - _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SIGEV_THREAD = 3; - /// Initializes and returns a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. - static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - NativeCupertinoHttp _lib, - ffi.Pointer path, - bool isDir, - NSURL? baseURL) { - final _ret = _lib._objc_msgSend_35( - _lib._class_NSURL1, - _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int ILL_NOOP = 0; - /// These methods expect their string arguments to contain any percent escape codes that are necessary. It is an error for URLString to be nil. - NSURL initWithString_(NSString? URLString) { - final _ret = _lib._objc_msgSend_29( - _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int ILL_ILLOPC = 1; - NSURL initWithString_relativeToURL_(NSString? URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_27( - _id, - _lib._sel_initWithString_relativeToURL_1, - URLString?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int ILL_ILLTRP = 2; - static NSURL URLWithString_(NativeCupertinoHttp _lib, NSString? URLString) { - final _ret = _lib._objc_msgSend_29(_lib._class_NSURL1, - _lib._sel_URLWithString_1, URLString?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int ILL_PRVOPC = 3; - static NSURL URLWithString_relativeToURL_( - NativeCupertinoHttp _lib, NSString? URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_27( - _lib._class_NSURL1, - _lib._sel_URLWithString_relativeToURL_1, - URLString?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int ILL_ILLOPN = 4; - /// Initializes a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - NSURL initWithDataRepresentation_relativeToURL_( - NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_36( - _id, - _lib._sel_initWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int ILL_ILLADR = 5; - /// Initializes and returns a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - static NSURL URLWithDataRepresentation_relativeToURL_( - NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_37( - _lib._class_NSURL1, - _lib._sel_URLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int ILL_PRVREG = 6; - /// Initializes a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( - NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_36( - _id, - _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int ILL_COPROC = 7; - /// Initializes and returns a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - static NSURL absoluteURLWithDataRepresentation_relativeToURL_( - NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_37( - _lib._class_NSURL1, - _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int ILL_BADSTK = 8; - /// Returns the data representation of the URL's relativeString. If the URL was initialized with -initWithData:relativeToURL:, the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with NSUTF8StringEncoding. - NSData? get dataRepresentation { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_dataRepresentation1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } +const int FPE_NOOP = 0; - NSString? get absoluteString { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_absoluteString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int FPE_FLTDIV = 1; - /// The relative portion of a URL. If baseURL is nil, or if the receiver is itself absolute, this is the same as absoluteString - NSString? get relativeString { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_relativeString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int FPE_FLTOVF = 2; - /// may be nil. - NSURL? get baseURL { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_baseURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int FPE_FLTUND = 3; - /// if the receiver is itself absolute, this will return self. - NSURL? get absoluteURL { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_absoluteURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int FPE_FLTRES = 4; - /// Any URL is composed of these two basic pieces. The full URL would be the concatenation of [myURL scheme], ':', [myURL resourceSpecifier] - NSString? get scheme { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_scheme1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int FPE_FLTINV = 5; - NSString? get resourceSpecifier { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_resourceSpecifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int FPE_FLTSUB = 6; - /// If the URL conforms to rfc 1808 (the most common form of URL), the following accessors will return the various components; otherwise they return nil. The litmus test for conformance is as recommended in RFC 1808 - whether the first two characters of resourceSpecifier is @"//". In all cases, they return the component's value after resolving the receiver against its base URL. - NSString? get host { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_host1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int FPE_INTDIV = 7; - NSNumber? get port { - final _ret = _lib._objc_msgSend_69(_id, _lib._sel_port1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +const int FPE_INTOVF = 8; - NSString? get user { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int SEGV_NOOP = 0; - NSString? get password { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_password1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int SEGV_MAPERR = 1; - NSString? get path { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_path1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int SEGV_ACCERR = 2; - NSString? get fragment { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_fragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int BUS_NOOP = 0; - NSString? get parameterString { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_parameterString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int BUS_ADRALN = 1; - NSString? get query { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_query1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int BUS_ADRERR = 2; - /// The same as path if baseURL is nil - NSString? get relativePath { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_relativePath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int BUS_OBJERR = 3; - /// Determines if a given URL string's path represents a directory (i.e. the path component in the URL string ends with a '/' character). This does not check the resource the URL refers to. - bool get hasDirectoryPath { - return _lib._objc_msgSend_11(_id, _lib._sel_hasDirectoryPath1); - } +const int TRAP_BRKPT = 1; - /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer buffer, int maxBufferLength) { - return _lib._objc_msgSend_70( - _id, - _lib._sel_getFileSystemRepresentation_maxLength_1, - buffer, - maxBufferLength); - } +const int TRAP_TRACE = 2; - /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. The returned C string will be automatically freed just as a returned object would be released; your code should copy the representation or use getFileSystemRepresentation:maxLength: if it needs to store the representation outside of the autorelease context in which the representation is created. - ffi.Pointer get fileSystemRepresentation { - return _lib._objc_msgSend_40(_id, _lib._sel_fileSystemRepresentation1); - } +const int CLD_NOOP = 0; - /// Whether the scheme is file:; if [myURL isFileURL] is YES, then [myURL path] is suitable for input into NSFileManager or NSPathUtilities. - bool get fileURL { - return _lib._objc_msgSend_11(_id, _lib._sel_isFileURL1); - } +const int CLD_EXITED = 1; - NSURL? get standardizedURL { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_standardizedURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int CLD_KILLED = 2; - /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. - bool checkResourceIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_92( - _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); - } +const int CLD_DUMPED = 3; - /// Returns whether the URL is a file reference URL. Symbol is present in iOS 4, but performs no operation. - bool isFileReferenceURL() { - return _lib._objc_msgSend_11(_id, _lib._sel_isFileReferenceURL1); - } +const int CLD_TRAPPED = 4; - /// Returns a file reference URL that refers to the same resource as a specified file URL. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:). Symbol is present in iOS 4, but performs no operation. - NSURL fileReferenceURL() { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_fileReferenceURL1); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int CLD_STOPPED = 5; - /// Returns a file path URL that refers to the same resource as a specified URL. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. Symbol is present in iOS 4, but performs no operation. - NSURL? get filePathURL { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_filePathURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int CLD_CONTINUED = 6; - /// Returns the resource value identified by a given resource key. This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this method returns YES and value is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool getResourceValue_forKey_error_( - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_93( - _id, _lib._sel_getResourceValue_forKey_error_1, value, key, error); - } +const int POLL_IN = 1; - /// Returns the resource values identified by specified array of resource keys. This method first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this method returns NULL, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - NSDictionary resourceValuesForKeys_error_( - NSArray? keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_94( - _id, - _lib._sel_resourceValuesForKeys_error_1, - keys?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int POLL_OUT = 2; - /// Sets the resource value identified by a given resource key. This method writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool setResourceValue_forKey_error_(NSObject value, NSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_95( - _id, _lib._sel_setResourceValue_forKey_error_1, value._id, key, error); - } +const int POLL_MSG = 3; - /// Sets any number of resource values of a URL's resource. This method writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to this method or to -setResourceValue:forKey:error: to guarantee the order. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool setResourceValues_error_( - NSDictionary? keyedValues, ffi.Pointer> error) { - return _lib._objc_msgSend_96(_id, _lib._sel_setResourceValues_error_1, - keyedValues?._id ?? ffi.nullptr, error); - } +const int POLL_ERR = 4; - /// Removes the cached resource value identified by a given resource value key from the URL object. Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources. - void removeCachedResourceValueForKey_(NSURLResourceKey key) { - return _lib._objc_msgSend_97( - _id, _lib._sel_removeCachedResourceValueForKey_1, key); - } +const int POLL_PRI = 5; - /// Removes all cached resource values and all temporary resource values from the URL object. This method is currently applicable only to URLs for file system resources. - void removeAllCachedResourceValues() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); - } +const int POLL_HUP = 6; - /// Sets a temporary resource value on the URL object. Temporary resource values are for client use. Temporary resource values exist only in memory and are never written to the resource's backing store. Once set, a temporary resource value can be copied from the URL object with -getResourceValue:forKey:error: or -resourceValuesForKeys:error:. To remove a temporary resource value from the URL object, use -removeCachedResourceValueForKey:. Care should be taken to ensure the key that identifies a temporary resource value is unique and does not conflict with system defined keys (using reverse domain name notation in your temporary resource value keys is recommended). This method is currently applicable only to URLs for file system resources. - void setTemporaryResourceValue_forKey_(NSObject value, NSURLResourceKey key) { - return _lib._objc_msgSend_98( - _id, _lib._sel_setTemporaryResourceValue_forKey_1, value._id, key); - } +const int SA_ONSTACK = 1; - /// Returns bookmark data for the URL, created with specified options and resource values. If this method returns nil, the optional error is populated. - NSData - bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( - int options, - NSArray? keys, - NSURL? relativeURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_99( - _id, - _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, - options, - keys?._id ?? ffi.nullptr, - relativeURL?._id ?? ffi.nullptr, - error); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SA_RESTART = 2; - /// Initializes a newly created NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. - NSURL - initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NSData? bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_100( - _id, - _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData?._id ?? ffi.nullptr, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SA_RESETHAND = 4; - /// Creates and Initializes an NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. - static NSURL - URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NativeCupertinoHttp _lib, - NSData? bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_100( - _lib._class_NSURL1, - _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData?._id ?? ffi.nullptr, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SA_NOCLDSTOP = 8; - /// Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available in the bookmark data. - static NSDictionary resourceValuesForKeys_fromBookmarkData_( - NativeCupertinoHttp _lib, NSArray? keys, NSData? bookmarkData) { - final _ret = _lib._objc_msgSend_101( - _lib._class_NSURL1, - _lib._sel_resourceValuesForKeys_fromBookmarkData_1, - keys?._id ?? ffi.nullptr, - bookmarkData?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int SA_NODEFER = 16; - /// Creates an alias file on disk at a specified location with specified bookmark data. bookmarkData must have been created with the NSURLBookmarkCreationSuitableForBookmarkFile option. bookmarkFileURL must either refer to an existing file (which will be overwritten), or to location in an existing directory. If this method returns NO, the optional error is populated. - static bool writeBookmarkData_toURL_options_error_( - NativeCupertinoHttp _lib, - NSData? bookmarkData, - NSURL? bookmarkFileURL, - int options, - ffi.Pointer> error) { - return _lib._objc_msgSend_102( - _lib._class_NSURL1, - _lib._sel_writeBookmarkData_toURL_options_error_1, - bookmarkData?._id ?? ffi.nullptr, - bookmarkFileURL?._id ?? ffi.nullptr, - options, - error); - } +const int SA_NOCLDWAIT = 32; - /// Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. If bookmarkFileURL refers to an alias file created prior to OS X v10.6 that contains Alias Manager information but no bookmark data, this method synthesizes bookmark data for the file. If this method returns nil, the optional error is populated. - static NSData bookmarkDataWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? bookmarkFileURL, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_103( - _lib._class_NSURL1, - _lib._sel_bookmarkDataWithContentsOfURL_error_1, - bookmarkFileURL?._id ?? ffi.nullptr, - error); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SA_SIGINFO = 64; - /// Creates and initializes a NSURL that refers to the location specified by resolving the alias file at url. If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, the NSURL returned is the same as url argument. This method fails and returns nil if the url argument is unreachable, or if the original file or directory could not be located or is not reachable, or if the original file or directory is on a volume that could not be located or mounted. If this method fails, the optional error is populated. The NSURLBookmarkResolutionWithSecurityScope option is not supported by this method. - static NSURL URLByResolvingAliasFileAtURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int options, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_104( - _lib._class_NSURL1, - _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, - url?._id ?? ffi.nullptr, - options, - error); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SA_USERTRAMP = 256; - /// Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. When access to this resource is no longer needed the client must call stopAccessingSecurityScopedResource. Each call to startAccessingSecurityScopedResource must be balanced with a call to stopAccessingSecurityScopedResource (Note: this is not reference counted). - bool startAccessingSecurityScopedResource() { - return _lib._objc_msgSend_11( - _id, _lib._sel_startAccessingSecurityScopedResource1); - } +const int SA_64REGSET = 512; - /// Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource. - void stopAccessingSecurityScopedResource() { - return _lib._objc_msgSend_1( - _id, _lib._sel_stopAccessingSecurityScopedResource1); - } +const int SA_USERSPACE_MASK = 127; - /// Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: - /// - NSMetadataQueryUbiquitousDataScope - /// - NSMetadataQueryUbiquitousDocumentsScope - /// - An NSFilePresenter presenting the contents of the directory located by -URLForUbiquitousContainerIdentifier: or a subdirectory thereof - /// - /// The following methods behave identically to their similarly named methods above (-getResourceValue:forKey:error:, etc.), except that they allow you to get resource values and check for presence regardless of whether the promised item's contents currently exist at the URL. You must use these APIs instead of the normal NSURL resource value APIs if and only if any of the following are true: - /// - You are using a URL that you know came directly from one of the above APIs - /// - You are inside the accessor block of a coordinated read or write that used NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingContentIndependentMetadataOnly - /// - /// Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. - bool getPromisedItemResourceValue_forKey_error_( - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_93( - _id, - _lib._sel_getPromisedItemResourceValue_forKey_error_1, - value, - key, - error); - } +const int SIG_BLOCK = 1; + +const int SIG_UNBLOCK = 2; - NSDictionary promisedItemResourceValuesForKeys_error_( - NSArray? keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_94( - _id, - _lib._sel_promisedItemResourceValuesForKeys_error_1, - keys?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int SIG_SETMASK = 3; - bool checkPromisedItemIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_92( - _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); - } +const int SI_USER = 65537; - /// The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. - static NSURL fileURLWithPathComponents_( - NativeCupertinoHttp _lib, NSArray? components) { - final _ret = _lib._objc_msgSend_105(_lib._class_NSURL1, - _lib._sel_fileURLWithPathComponents_1, components?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SI_QUEUE = 65538; - NSArray? get pathComponents { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_pathComponents1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int SI_TIMER = 65539; - NSString? get lastPathComponent { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_lastPathComponent1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int SI_ASYNCIO = 65540; - NSString? get pathExtension { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_pathExtension1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int SI_MESGQ = 65541; - NSURL URLByAppendingPathComponent_(NSString? pathComponent) { - final _ret = _lib._objc_msgSend_33( - _id, - _lib._sel_URLByAppendingPathComponent_1, - pathComponent?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SS_ONSTACK = 1; - NSURL URLByAppendingPathComponent_isDirectory_( - NSString? pathComponent, bool isDirectory) { - final _ret = _lib._objc_msgSend_32( - _id, - _lib._sel_URLByAppendingPathComponent_isDirectory_1, - pathComponent?._id ?? ffi.nullptr, - isDirectory); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SS_DISABLE = 4; - NSURL? get URLByDeletingLastPathComponent { - final _ret = - _lib._objc_msgSend_39(_id, _lib._sel_URLByDeletingLastPathComponent1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int MINSIGSTKSZ = 32768; - NSURL URLByAppendingPathExtension_(NSString? pathExtension) { - final _ret = _lib._objc_msgSend_33( - _id, - _lib._sel_URLByAppendingPathExtension_1, - pathExtension?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int SIGSTKSZ = 131072; - NSURL? get URLByDeletingPathExtension { - final _ret = - _lib._objc_msgSend_39(_id, _lib._sel_URLByDeletingPathExtension1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int SV_ONSTACK = 1; - /// The following methods work only on `file:` scheme URLs; for non-`file:` scheme URLs, these methods return the URL unchanged. - NSURL? get URLByStandardizingPath { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_URLByStandardizingPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int SV_INTERRUPT = 2; - NSURL? get URLByResolvingSymlinksInPath { - final _ret = - _lib._objc_msgSend_39(_id, _lib._sel_URLByResolvingSymlinksInPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int SV_RESETHAND = 4; - /// Blocks to load the data if necessary. If shouldUseCache is YES, then if an equivalent URL has already been loaded and cached, its resource data will be returned immediately. If shouldUseCache is NO, a new load will be started - NSData resourceDataUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_106( - _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); - return NSData._(_ret, _lib, retain: true, release: true); - } +const int SV_NODEFER = 16; - /// Starts an asynchronous load of the data, registering delegate to receive notification. Only one such background load can proceed at a time. - void loadResourceDataNotifyingClient_usingCache_( - NSObject client, bool shouldUseCache) { - return _lib._objc_msgSend_107( - _id, - _lib._sel_loadResourceDataNotifyingClient_usingCache_1, - client._id, - shouldUseCache); - } +const int SV_NOCLDSTOP = 8; - NSObject propertyForKey_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_29( - _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int SV_SIGINFO = 64; - /// These attempt to write the given arguments for the resource specified by the URL; they return success or failure - bool setResourceData_(NSData? data) { - return _lib._objc_msgSend_22( - _id, _lib._sel_setResourceData_1, data?._id ?? ffi.nullptr); - } +const int RENAME_SECLUDE = 1; - bool setProperty_forKey_(NSObject property, NSString? propertyKey) { - return _lib._objc_msgSend_108(_id, _lib._sel_setProperty_forKey_1, - property._id, propertyKey?._id ?? ffi.nullptr); - } +const int RENAME_SWAP = 2; - /// Sophisticated clients will want to ask for this, then message the handle directly. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded - NSURLHandle URLHandleUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_116( - _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); - return NSURLHandle._(_ret, _lib, retain: true, release: true); - } +const int RENAME_EXCL = 4; - static NSURL new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); - return NSURL._(_ret, _lib, retain: false, release: true); - } +const int RENAME_RESERVED1 = 8; - static NSURL alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); - return NSURL._(_ret, _lib, retain: false, release: true); - } -} +const int RENAME_NOFOLLOW_ANY = 16; -class NSNumber extends NSValue { - NSNumber._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int __SLBF = 1; - /// Returns a [NSNumber] that points to the same underlying object as [other]. - static NSNumber castFrom(T other) { - return NSNumber._(other._id, other._lib, retain: true, release: true); - } +const int __SNBF = 2; - /// Returns a [NSNumber] that wraps the given raw object pointer. - static NSNumber castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumber._(other, lib, retain: retain, release: release); - } +const int __SRD = 4; - /// Returns whether [obj] is an instance of [NSNumber]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); - } +const int __SWR = 8; - @override - NSNumber initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int __SRW = 16; - NSNumber initWithChar_(int value) { - final _ret = _lib._objc_msgSend_42(_id, _lib._sel_initWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int __SEOF = 32; - NSNumber initWithUnsignedChar_(int value) { - final _ret = - _lib._objc_msgSend_43(_id, _lib._sel_initWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int __SERR = 64; - NSNumber initWithShort_(int value) { - final _ret = _lib._objc_msgSend_44(_id, _lib._sel_initWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int __SMBF = 128; - NSNumber initWithUnsignedShort_(int value) { - final _ret = - _lib._objc_msgSend_45(_id, _lib._sel_initWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int __SAPP = 256; - NSNumber initWithInt_(int value) { - final _ret = _lib._objc_msgSend_46(_id, _lib._sel_initWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int __SSTR = 512; - NSNumber initWithUnsignedInt_(int value) { - final _ret = - _lib._objc_msgSend_47(_id, _lib._sel_initWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int __SOPT = 1024; - NSNumber initWithLong_(int value) { - final _ret = _lib._objc_msgSend_48(_id, _lib._sel_initWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int __SNPT = 2048; - NSNumber initWithUnsignedLong_(int value) { - final _ret = - _lib._objc_msgSend_49(_id, _lib._sel_initWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int __SOFF = 4096; - NSNumber initWithLongLong_(int value) { - final _ret = - _lib._objc_msgSend_50(_id, _lib._sel_initWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int __SMOD = 8192; - NSNumber initWithUnsignedLongLong_(int value) { - final _ret = - _lib._objc_msgSend_51(_id, _lib._sel_initWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int __SALC = 16384; - NSNumber initWithFloat_(double value) { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_initWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int __SIGN = 32768; - NSNumber initWithDouble_(double value) { - final _ret = _lib._objc_msgSend_53(_id, _lib._sel_initWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int _IOFBF = 0; - NSNumber initWithBool_(bool value) { - final _ret = _lib._objc_msgSend_54(_id, _lib._sel_initWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int _IOLBF = 1; - NSNumber initWithInteger_(int value) { - final _ret = _lib._objc_msgSend_48(_id, _lib._sel_initWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int _IONBF = 2; - NSNumber initWithUnsignedInteger_(int value) { - final _ret = - _lib._objc_msgSend_49(_id, _lib._sel_initWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +const int BUFSIZ = 1024; - int get charValue { - return _lib._objc_msgSend_55(_id, _lib._sel_charValue1); - } +const int EOF = -1; - int get unsignedCharValue { - return _lib._objc_msgSend_56(_id, _lib._sel_unsignedCharValue1); - } +const int FOPEN_MAX = 20; - int get shortValue { - return _lib._objc_msgSend_57(_id, _lib._sel_shortValue1); - } +const int FILENAME_MAX = 1024; - int get unsignedShortValue { - return _lib._objc_msgSend_58(_id, _lib._sel_unsignedShortValue1); - } +const String P_tmpdir = '/var/tmp/'; - int get intValue { - return _lib._objc_msgSend_59(_id, _lib._sel_intValue1); - } +const int L_tmpnam = 1024; - int get unsignedIntValue { - return _lib._objc_msgSend_60(_id, _lib._sel_unsignedIntValue1); - } +const int TMP_MAX = 308915776; - int get longValue { - return _lib._objc_msgSend_61(_id, _lib._sel_longValue1); - } +const int SEEK_SET = 0; - int get unsignedLongValue { - return _lib._objc_msgSend_12(_id, _lib._sel_unsignedLongValue1); - } +const int SEEK_CUR = 1; - int get longLongValue { - return _lib._objc_msgSend_62(_id, _lib._sel_longLongValue1); - } +const int SEEK_END = 2; - int get unsignedLongLongValue { - return _lib._objc_msgSend_63(_id, _lib._sel_unsignedLongLongValue1); - } +const int L_ctermid = 1024; - double get floatValue { - return _lib._objc_msgSend_64(_id, _lib._sel_floatValue1); - } +const int PRIO_PROCESS = 0; - double get doubleValue { - return _lib._objc_msgSend_65(_id, _lib._sel_doubleValue1); - } +const int PRIO_PGRP = 1; - bool get boolValue { - return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); - } +const int PRIO_USER = 2; - int get integerValue { - return _lib._objc_msgSend_61(_id, _lib._sel_integerValue1); - } +const int PRIO_DARWIN_THREAD = 3; - int get unsignedIntegerValue { - return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); - } +const int PRIO_DARWIN_PROCESS = 4; - NSString? get stringValue { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_stringValue1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int PRIO_MIN = -20; - int compare_(NSNumber? otherNumber) { - return _lib._objc_msgSend_66( - _id, _lib._sel_compare_1, otherNumber?._id ?? ffi.nullptr); - } +const int PRIO_MAX = 20; - bool isEqualToNumber_(NSNumber? number) { - return _lib._objc_msgSend_67( - _id, _lib._sel_isEqualToNumber_1, number?._id ?? ffi.nullptr); - } +const int PRIO_DARWIN_BG = 4096; - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int PRIO_DARWIN_NONUI = 4097; - static NSNumber new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } +const int RUSAGE_SELF = 0; - static NSNumber alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } -} +const int RUSAGE_CHILDREN = -1; -class NSValue extends NSObject { - NSValue._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int RUSAGE_INFO_V0 = 0; - /// Returns a [NSValue] that points to the same underlying object as [other]. - static NSValue castFrom(T other) { - return NSValue._(other._id, other._lib, retain: true, release: true); - } +const int RUSAGE_INFO_V1 = 1; - /// Returns a [NSValue] that wraps the given raw object pointer. - static NSValue castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSValue._(other, lib, retain: retain, release: release); - } +const int RUSAGE_INFO_V2 = 2; - /// Returns whether [obj] is an instance of [NSValue]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); - } +const int RUSAGE_INFO_V3 = 3; - void getValue_size_(ffi.Pointer value, int size) { - return _lib._objc_msgSend_20(_id, _lib._sel_getValue_size_1, value, size); - } +const int RUSAGE_INFO_V4 = 4; - ffi.Pointer get objCType { - return _lib._objc_msgSend_40(_id, _lib._sel_objCType1); - } +const int RUSAGE_INFO_V5 = 5; - NSValue initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_41( - _id, _lib._sel_initWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } +const int RUSAGE_INFO_CURRENT = 5; - NSValue initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSValue._(_ret, _lib, retain: true, release: true); - } +const int RU_PROC_RUNS_RESLIDE = 1; - static NSValue new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); - return NSValue._(_ret, _lib, retain: false, release: true); - } +const int RLIMIT_CPU = 0; - static NSValue alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); - return NSValue._(_ret, _lib, retain: false, release: true); - } -} +const int RLIMIT_FSIZE = 1; -typedef NSInteger = ffi.Long; +const int RLIMIT_DATA = 2; -abstract class NSComparisonResult { - static const int NSOrderedAscending = -1; - static const int NSOrderedSame = 0; - static const int NSOrderedDescending = 1; -} +const int RLIMIT_STACK = 3; -class NSError extends NSObject { - NSError._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int RLIMIT_CORE = 4; - /// Returns a [NSError] that points to the same underlying object as [other]. - static NSError castFrom(T other) { - return NSError._(other._id, other._lib, retain: true, release: true); - } +const int RLIMIT_AS = 5; - /// Returns a [NSError] that wraps the given raw object pointer. - static NSError castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSError._(other, lib, retain: retain, release: release); - } +const int RLIMIT_RSS = 5; - /// Returns whether [obj] is an instance of [NSError]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); - } +const int RLIMIT_MEMLOCK = 6; - /// Domain cannot be nil; dict may be nil if no userInfo desired. - NSError initWithDomain_code_userInfo_( - NSErrorDomain domain, int code, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_88( - _id, - _lib._sel_initWithDomain_code_userInfo_1, - domain, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } +const int RLIMIT_NPROC = 7; - static NSError errorWithDomain_code_userInfo_(NativeCupertinoHttp _lib, - NSErrorDomain domain, int code, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_88( - _lib._class_NSError1, - _lib._sel_errorWithDomain_code_userInfo_1, - domain, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } +const int RLIMIT_NOFILE = 8; - /// These define the error. Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts. Codes are domain-specific. - NSErrorDomain get domain { - return _lib._objc_msgSend_19(_id, _lib._sel_domain1); - } +const int RLIM_NLIMITS = 9; - int get code { - return _lib._objc_msgSend_61(_id, _lib._sel_code1); - } +const int _RLIMIT_POSIX_FLAG = 4096; - /// Additional info which may be used to describe the error further. Examples of keys that might be included in here are "Line Number", "Failed URL", etc. Embedding other errors in here can also be used as a way to communicate underlying reasons for failures; for instance "File System Error" embedded in the userInfo of an NSError returned from a higher level document object. If the embedded error information is itself NSError, the standard key NSUnderlyingErrorKey can be used. - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int RLIMIT_WAKEUPS_MONITOR = 1; - /// The primary user-presentable message for the error, for instance for NSFileReadNoPermissionError: "The file "File Name" couldn't be opened because you don't have permission to view it.". This message should ideally indicate what failed and why it failed. This value either comes from NSLocalizedDescriptionKey, or NSLocalizedFailureErrorKey+NSLocalizedFailureReasonErrorKey, or NSLocalizedFailureErrorKey. The steps this takes to construct the description include: - /// 1. Look for NSLocalizedDescriptionKey in userInfo, use value as-is if present. - /// 2. Look for NSLocalizedFailureErrorKey in userInfo. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. - /// 3. Fetch NSLocalizedDescriptionKey from userInfoValueProvider, use value as-is if present. - /// 4. Fetch NSLocalizedFailureErrorKey from userInfoValueProvider. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. - /// 5. Look for NSLocalizedFailureReasonErrorKey in userInfo or from userInfoValueProvider; combine with generic "Operation failed" message. - /// 6. Last resort localized but barely-presentable string manufactured from domain and code. The result is never nil. - NSString? get localizedDescription { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_localizedDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int RLIMIT_CPU_USAGE_MONITOR = 2; - /// Return a complete sentence which describes why the operation failed. For instance, for NSFileReadNoPermissionError: "You don't have permission.". In many cases this will be just the "because" part of the error message (but as a complete sentence, which makes localization easier). Default implementation of this picks up the value of NSLocalizedFailureReasonErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. - NSString? get localizedFailureReason { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_localizedFailureReason1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int RLIMIT_THREAD_CPULIMITS = 3; - /// Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel. For instance, for NSFileReadNoPermissionError: "To view or change permissions, select the item in the Finder and choose File > Get Info.". Default implementation of this picks up the value of NSLocalizedRecoverySuggestionErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. - NSString? get localizedRecoverySuggestion { - final _ret = - _lib._objc_msgSend_19(_id, _lib._sel_localizedRecoverySuggestion1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int RLIMIT_FOOTPRINT_INTERVAL = 4; - /// Return titles of buttons that are appropriate for displaying in an alert. These should match the string provided as a part of localizedRecoverySuggestion. The first string would be the title of the right-most and default button, the second one next to it, and so on. If used in an alert the corresponding default return values are NSAlertFirstButtonReturn + n. Default implementation of this picks up the value of NSLocalizedRecoveryOptionsErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. nil return usually implies no special suggestion, which would imply a single "OK" button. - NSArray? get localizedRecoveryOptions { - final _ret = - _lib._objc_msgSend_72(_id, _lib._sel_localizedRecoveryOptions1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int WAKEMON_ENABLE = 1; - /// Return an object that conforms to the NSErrorRecoveryAttempting informal protocol. The recovery attempter must be an object that can correctly interpret an index into the array returned by localizedRecoveryOptions. The default implementation of this picks up the value of NSRecoveryAttempterErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. - NSObject get recoveryAttempter { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_recoveryAttempter1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int WAKEMON_DISABLE = 2; - /// Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user. This is done automatically by +[NSAlert alertWithError:], which the presentError: variants in NSApplication go through. The default implementation of this picks up the value of the NSHelpAnchorErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. - NSString? get helpAnchor { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_helpAnchor1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int WAKEMON_GET_PARAMS = 4; - /// Return a list of underlying errors, if any. It includes the values of both NSUnderlyingErrorKey and NSMultipleUnderlyingErrorsKey. If there are no underlying errors, returns an empty array. - NSArray? get underlyingErrors { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_underlyingErrors1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int WAKEMON_SET_DEFAULTS = 8; - /// Specify a block which will be called from the implementations of localizedDescription, localizedFailureReason, localizedRecoverySuggestion, localizedRecoveryOptions, recoveryAttempter, helpAnchor, and debugDescription when the underlying value for these is not present in the userInfo dictionary of NSError instances with the specified domain. The provider will be called with the userInfo key corresponding to the queried property: For instance, NSLocalizedDescriptionKey for localizedDescription. The provider should return nil for any keys it is not able to provide and, very importantly, any keys it does not recognize (since we may extend the list of keys in future releases). - /// - /// The specified block will be called synchronously at the time when the above properties are queried. The results are not cached. - /// - /// This provider is optional. It enables localization and formatting of error messages to be done lazily; rather than populating the userInfo at NSError creation time, these keys will be fetched on-demand when asked for. - /// - /// It is expected that only the “owner” of an NSError domain specifies the provider for the domain, and this is done once. This facility is not meant for consumers of errors to customize the userInfo entries. This facility should not be used to customize the behaviors of error domains provided by the system. - /// - /// If an appropriate result for the requested key cannot be provided, return nil rather than choosing to manufacture a generic fallback response such as "Operation could not be completed, error 42." NSError will take care of the fallback cases. - static void setUserInfoValueProviderForDomain_provider_( - NativeCupertinoHttp _lib, NSErrorDomain errorDomain, ObjCBlock provider) { - return _lib._objc_msgSend_90( - _lib._class_NSError1, - _lib._sel_setUserInfoValueProviderForDomain_provider_1, - errorDomain, - provider._impl); - } +const int WAKEMON_MAKE_FATAL = 16; - static ObjCBlock userInfoValueProviderForDomain_(NativeCupertinoHttp _lib, - NSError? err, NSErrorUserInfoKey userInfoKey, NSErrorDomain errorDomain) { - final _ret = _lib._objc_msgSend_91( - _lib._class_NSError1, - _lib._sel_userInfoValueProviderForDomain_1, - err?._id ?? ffi.nullptr, - userInfoKey, - errorDomain); - return ObjCBlock._(_ret, _lib); - } +const int CPUMON_MAKE_FATAL = 4096; - static NSError new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); - return NSError._(_ret, _lib, retain: false, release: true); - } +const int FOOTPRINT_INTERVAL_RESET = 1; - static NSError alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); - return NSError._(_ret, _lib, retain: false, release: true); - } -} +const int IOPOL_TYPE_DISK = 0; -typedef NSErrorDomain = ffi.Pointer; +const int IOPOL_TYPE_VFS_ATIME_UPDATES = 2; -/// Immutable Dictionary -class NSDictionary extends NSObject { - NSDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES = 3; - /// Returns a [NSDictionary] that points to the same underlying object as [other]. - static NSDictionary castFrom(T other) { - return NSDictionary._(other._id, other._lib, retain: true, release: true); - } +const int IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME = 4; - /// Returns a [NSDictionary] that wraps the given raw object pointer. - static NSDictionary castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDictionary._(other, lib, retain: retain, release: release); - } +const int IOPOL_TYPE_VFS_TRIGGER_RESOLVE = 5; - /// Returns whether [obj] is an instance of [NSDictionary]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); - } +const int IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION = 6; - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } +const int IOPOL_TYPE_VFS_IGNORE_PERMISSIONS = 7; - NSObject objectForKey_(NSObject aKey) { - final _ret = _lib._objc_msgSend_71(_id, _lib._sel_objectForKey_1, aKey._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE = 8; - NSArray? get allKeys { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_allKeys1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES = 9; - NSArray allKeysForObject_(NSObject anObject) { - final _ret = - _lib._objc_msgSend_73(_id, _lib._sel_allKeysForObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int IOPOL_SCOPE_PROCESS = 0; - NSArray? get allValues { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_allValues1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int IOPOL_SCOPE_THREAD = 1; - NSString? get description { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int IOPOL_SCOPE_DARWIN_BG = 2; - NSString? get descriptionInStringsFileFormat { - final _ret = - _lib._objc_msgSend_19(_id, _lib._sel_descriptionInStringsFileFormat1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int IOPOL_DEFAULT = 0; - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_68( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int IOPOL_IMPORTANT = 1; + +const int IOPOL_PASSIVE = 2; + +const int IOPOL_THROTTLE = 3; + +const int IOPOL_UTILITY = 4; + +const int IOPOL_STANDARD = 5; + +const int IOPOL_APPLICATION = 5; + +const int IOPOL_NORMAL = 1; + +const int IOPOL_ATIME_UPDATES_DEFAULT = 0; + +const int IOPOL_ATIME_UPDATES_OFF = 1; + +const int IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT = 0; + +const int IOPOL_MATERIALIZE_DATALESS_FILES_OFF = 1; + +const int IOPOL_MATERIALIZE_DATALESS_FILES_ON = 2; + +const int IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT = 0; + +const int IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME = 1; + +const int IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT = 0; + +const int IOPOL_VFS_TRIGGER_RESOLVE_OFF = 1; + +const int IOPOL_VFS_CONTENT_PROTECTION_DEFAULT = 0; + +const int IOPOL_VFS_CONTENT_PROTECTION_IGNORE = 1; + +const int IOPOL_VFS_IGNORE_PERMISSIONS_OFF = 0; + +const int IOPOL_VFS_IGNORE_PERMISSIONS_ON = 1; - NSString descriptionWithLocale_indent_(NSObject locale, int level) { - final _ret = _lib._objc_msgSend_74( - _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int IOPOL_VFS_SKIP_MTIME_UPDATE_OFF = 0; - bool isEqualToDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_75(_id, _lib._sel_isEqualToDictionary_1, - otherDictionary?._id ?? ffi.nullptr); - } +const int IOPOL_VFS_SKIP_MTIME_UPDATE_ON = 1; - /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:andKeys:count: - void getObjects_andKeys_(ffi.Pointer> objects, - ffi.Pointer> keys) { - return _lib._objc_msgSend_76( - _id, _lib._sel_getObjects_andKeys_1, objects, keys); - } +const int IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF = 0; - /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. - static NSDictionary dictionaryWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_77(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON = 1; - static NSDictionary dictionaryWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_78(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int WNOHANG = 1; - NSDictionary initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_77( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int WUNTRACED = 2; - NSDictionary initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_78( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int WCOREFLAG = 128; - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_24(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); - } +const int _WSTOPPED = 127; - /// the atomically flag is ignored if url of a type that cannot be written atomically. - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_79(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); - } +const int WEXITED = 4; - static NSDictionary dictionary(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int WSTOPPED = 8; - static NSDictionary dictionaryWithObject_forKey_( - NativeCupertinoHttp _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_80(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int WCONTINUED = 16; - static NSDictionary dictionaryWithObjects_forKeys_count_( - NativeCupertinoHttp _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_81(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int WNOWAIT = 32; - static NSDictionary dictionaryWithObjectsAndKeys_( - NativeCupertinoHttp _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_71(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int WAIT_ANY = -1; - static NSDictionary dictionaryWithDictionary_( - NativeCupertinoHttp _lib, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_82(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int WAIT_MYPGRP = 0; - static NSDictionary dictionaryWithObjects_forKeys_( - NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_83( - _lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int EXIT_FAILURE = 1; - NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _lib._objc_msgSend_71( - _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int EXIT_SUCCESS = 0; - NSDictionary initWithDictionary_(NSDictionary? otherDictionary) { - final _ret = _lib._objc_msgSend_82(_id, _lib._sel_initWithDictionary_1, - otherDictionary?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int RAND_MAX = 2147483647; - NSDictionary initWithDictionary_copyItems_( - NSDictionary? otherDictionary, bool flag) { - final _ret = _lib._objc_msgSend_84( - _id, - _lib._sel_initWithDictionary_copyItems_1, - otherDictionary?._id ?? ffi.nullptr, - flag); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } +const int TIME_UTC = 1; - NSDictionary initWithObjects_forKeys_(NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_83(_id, _lib._sel_initWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, keys?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const String __PRI_8_LENGTH_MODIFIER__ = 'hh'; - /// Reads dictionary stored in NSPropertyList format from the specified url. - NSDictionary initWithContentsOfURL_error_( - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_85( - _id, - _lib._sel_initWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const String __PRI_64_LENGTH_MODIFIER__ = 'll'; - /// Reads dictionary stored in NSPropertyList format from the specified url. - static NSDictionary dictionaryWithContentsOfURL_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const String __SCN_64_LENGTH_MODIFIER__ = 'll'; - /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. - /// The keys are copied from the array and must be copyable. - /// If the array parameter is nil or not an NSArray, an exception is thrown. - /// If the array of keys is empty, an empty key set is returned. - /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). - /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. - /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. - static NSObject sharedKeySetForKeys_( - NativeCupertinoHttp _lib, NSArray? keys) { - final _ret = _lib._objc_msgSend_86(_lib._class_NSDictionary1, - _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const String __PRI_MAX_LENGTH_MODIFIER__ = 'j'; - int countByEnumeratingWithState_objects_count_( - ffi.Pointer state, - ffi.Pointer> buffer, - int len) { - return _lib._objc_msgSend_87( - _id, - _lib._sel_countByEnumeratingWithState_objects_count_1, - state, - buffer, - len); - } +const String __SCN_MAX_LENGTH_MODIFIER__ = 'j'; - static NSDictionary new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } +const String PRId8 = 'hhd'; - static NSDictionary alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } -} +const String PRIi8 = 'hhi'; -class NSFastEnumerationState extends ffi.Struct { - @ffi.UnsignedLong() - external int state; +const String PRIo8 = 'hho'; - external ffi.Pointer> itemsPtr; +const String PRIu8 = 'hhu'; - external ffi.Pointer mutationsPtr; +const String PRIx8 = 'hhx'; - @ffi.Array.multi([5]) - external ffi.Array extra; -} +const String PRIX8 = 'hhX'; -ffi.Pointer _ObjCBlock_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>()(arg0, arg1); -} +const String PRId16 = 'hd'; -final _ObjCBlock_closureRegistry = {}; -int _ObjCBlock_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_registerClosure(Function fn) { - final id = ++_ObjCBlock_closureRegistryIndex; - _ObjCBlock_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const String PRIi16 = 'hi'; -ffi.Pointer _ObjCBlock_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) { - return _ObjCBlock_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +const String PRIo16 = 'ho'; -class ObjCBlock { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock._(this._impl, this._lib); - ObjCBlock.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>(_ObjCBlock_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock.fromFunction( - this._lib, - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1) - fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>(_ObjCBlock_closureTrampoline) - .cast(), - _ObjCBlock_registerClosure(fn)); - ffi.Pointer call( - ffi.Pointer arg0, NSErrorUserInfoKey arg1) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>()(_impl, arg0, arg1); - } +const String PRIu16 = 'hu'; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const String PRIx16 = 'hx'; -typedef NSErrorUserInfoKey = ffi.Pointer; +const String PRIX16 = 'hX'; -class _ObjCBlockDesc extends ffi.Struct { - @ffi.UnsignedLong() - external int reserved; +const String PRId32 = 'd'; - @ffi.UnsignedLong() - external int size; +const String PRIi32 = 'i'; - external ffi.Pointer copy_helper; +const String PRIo32 = 'o'; - external ffi.Pointer dispose_helper; +const String PRIu32 = 'u'; - external ffi.Pointer signature; -} +const String PRIx32 = 'x'; -class _ObjCBlock extends ffi.Struct { - external ffi.Pointer isa; +const String PRIX32 = 'X'; - @ffi.Int() - external int flags; +const String PRId64 = 'lld'; - @ffi.Int() - external int reserved; +const String PRIi64 = 'lli'; - external ffi.Pointer invoke; +const String PRIo64 = 'llo'; - external ffi.Pointer<_ObjCBlockDesc> descriptor; +const String PRIu64 = 'llu'; - external ffi.Pointer target; -} +const String PRIx64 = 'llx'; -typedef NSURLResourceKey = ffi.Pointer; +const String PRIX64 = 'llX'; -/// Working with Bookmarks and alias (bookmark) files -abstract class NSURLBookmarkCreationOptions { - /// This option does nothing and has no effect on bookmark resolution - static const int NSURLBookmarkCreationPreferFileIDResolution = 256; +const String PRIdLEAST8 = 'hhd'; - /// creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways - static const int NSURLBookmarkCreationMinimalBookmark = 512; +const String PRIiLEAST8 = 'hhi'; - /// include the properties required by writeBookmarkData:toURL:options: in the bookmark data created - static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; +const String PRIoLEAST8 = 'hho'; - /// include information in the bookmark data which allows the same sandboxed process to access the resource after being relaunched - static const int NSURLBookmarkCreationWithSecurityScope = 2048; +const String PRIuLEAST8 = 'hhu'; - /// if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted - static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; -} +const String PRIxLEAST8 = 'hhx'; -abstract class NSURLBookmarkResolutionOptions { - /// don't perform any user interaction during bookmark resolution - static const int NSURLBookmarkResolutionWithoutUI = 256; +const String PRIXLEAST8 = 'hhX'; - /// don't mount a volume during bookmark resolution - static const int NSURLBookmarkResolutionWithoutMounting = 512; +const String PRIdLEAST16 = 'hd'; - /// use the secure information included at creation time to provide the ability to access the resource in a sandboxed process - static const int NSURLBookmarkResolutionWithSecurityScope = 1024; -} +const String PRIiLEAST16 = 'hi'; -typedef NSURLBookmarkFileCreationOptions = NSUInteger; +const String PRIoLEAST16 = 'ho'; -class NSURLHandle extends NSObject { - NSURLHandle._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const String PRIuLEAST16 = 'hu'; - /// Returns a [NSURLHandle] that points to the same underlying object as [other]. - static NSURLHandle castFrom(T other) { - return NSURLHandle._(other._id, other._lib, retain: true, release: true); - } +const String PRIxLEAST16 = 'hx'; - /// Returns a [NSURLHandle] that wraps the given raw object pointer. - static NSURLHandle castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLHandle._(other, lib, retain: retain, release: release); - } +const String PRIXLEAST16 = 'hX'; - /// Returns whether [obj] is an instance of [NSURLHandle]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); - } +const String PRIdLEAST32 = 'd'; - static void registerURLHandleClass_( - NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { - return _lib._objc_msgSend_109(_lib._class_NSURLHandle1, - _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); - } +const String PRIiLEAST32 = 'i'; - static NSObject URLHandleClassForURL_( - NativeCupertinoHttp _lib, NSURL? anURL) { - final _ret = _lib._objc_msgSend_110(_lib._class_NSURLHandle1, - _lib._sel_URLHandleClassForURL_1, anURL?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const String PRIoLEAST32 = 'o'; - int status() { - return _lib._objc_msgSend_111(_id, _lib._sel_status1); - } +const String PRIuLEAST32 = 'u'; - NSString failureReason() { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_failureReason1); - return NSString._(_ret, _lib, retain: true, release: true); - } +const String PRIxLEAST32 = 'x'; - void addClient_(NSObject? client) { - return _lib._objc_msgSend_109( - _id, _lib._sel_addClient_1, client?._id ?? ffi.nullptr); - } +const String PRIXLEAST32 = 'X'; - void removeClient_(NSObject? client) { - return _lib._objc_msgSend_109( - _id, _lib._sel_removeClient_1, client?._id ?? ffi.nullptr); - } +const String PRIdLEAST64 = 'lld'; - void loadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); - } +const String PRIiLEAST64 = 'lli'; - void cancelLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); - } +const String PRIoLEAST64 = 'llo'; - NSData resourceData() { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_resourceData1); - return NSData._(_ret, _lib, retain: true, release: true); - } +const String PRIuLEAST64 = 'llu'; - NSData availableResourceData() { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_availableResourceData1); - return NSData._(_ret, _lib, retain: true, release: true); - } +const String PRIxLEAST64 = 'llx'; - int expectedResourceDataSize() { - return _lib._objc_msgSend_62(_id, _lib._sel_expectedResourceDataSize1); - } +const String PRIXLEAST64 = 'llX'; - void flushCachedData() { - return _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); - } +const String PRIdFAST8 = 'hhd'; - void backgroundLoadDidFailWithReason_(NSString? reason) { - return _lib._objc_msgSend_97( - _id, - _lib._sel_backgroundLoadDidFailWithReason_1, - reason?._id ?? ffi.nullptr); - } +const String PRIiFAST8 = 'hhi'; - void didLoadBytes_loadComplete_(NSData? newBytes, bool yorn) { - return _lib._objc_msgSend_112(_id, _lib._sel_didLoadBytes_loadComplete_1, - newBytes?._id ?? ffi.nullptr, yorn); - } +const String PRIoFAST8 = 'hho'; - static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL? anURL) { - return _lib._objc_msgSend_113(_lib._class_NSURLHandle1, - _lib._sel_canInitWithURL_1, anURL?._id ?? ffi.nullptr); - } +const String PRIuFAST8 = 'hhu'; - static NSURLHandle cachedHandleForURL_( - NativeCupertinoHttp _lib, NSURL? anURL) { - final _ret = _lib._objc_msgSend_114(_lib._class_NSURLHandle1, - _lib._sel_cachedHandleForURL_1, anURL?._id ?? ffi.nullptr); - return NSURLHandle._(_ret, _lib, retain: true, release: true); - } +const String PRIxFAST8 = 'hhx'; - NSObject initWithURL_cached_(NSURL? anURL, bool willCache) { - final _ret = _lib._objc_msgSend_115(_id, _lib._sel_initWithURL_cached_1, - anURL?._id ?? ffi.nullptr, willCache); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const String PRIXFAST8 = 'hhX'; - NSObject propertyForKey_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_29( - _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const String PRIdFAST16 = 'hd'; - NSObject propertyForKeyIfAvailable_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_29(_id, - _lib._sel_propertyForKeyIfAvailable_1, propertyKey?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const String PRIiFAST16 = 'hi'; - bool writeProperty_forKey_(NSObject propertyValue, NSString? propertyKey) { - return _lib._objc_msgSend_108(_id, _lib._sel_writeProperty_forKey_1, - propertyValue._id, propertyKey?._id ?? ffi.nullptr); - } +const String PRIoFAST16 = 'ho'; - bool writeData_(NSData? data) { - return _lib._objc_msgSend_22( - _id, _lib._sel_writeData_1, data?._id ?? ffi.nullptr); - } +const String PRIuFAST16 = 'hu'; - NSData loadInForeground() { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_loadInForeground1); - return NSData._(_ret, _lib, retain: true, release: true); - } +const String PRIxFAST16 = 'hx'; - void beginLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); - } +const String PRIXFAST16 = 'hX'; - void endLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); - } +const String PRIdFAST32 = 'd'; - static NSURLHandle new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } +const String PRIiFAST32 = 'i'; - static NSURLHandle alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } -} +const String PRIoFAST32 = 'o'; -abstract class NSURLHandleStatus { - static const int NSURLHandleNotLoaded = 0; - static const int NSURLHandleLoadSucceeded = 1; - static const int NSURLHandleLoadInProgress = 2; - static const int NSURLHandleLoadFailed = 3; -} +const String PRIuFAST32 = 'u'; -abstract class NSDataWritingOptions { - /// Hint to use auxiliary file when saving; equivalent to atomically:YES - static const int NSDataWritingAtomic = 1; +const String PRIxFAST32 = 'x'; - /// Hint to prevent overwriting an existing file. Cannot be combined with NSDataWritingAtomic. - static const int NSDataWritingWithoutOverwriting = 2; - static const int NSDataWritingFileProtectionNone = 268435456; - static const int NSDataWritingFileProtectionComplete = 536870912; - static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; - static const int - NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = - 1073741824; - static const int NSDataWritingFileProtectionMask = 4026531840; +const String PRIXFAST32 = 'X'; - /// Deprecated name for NSDataWritingAtomic - static const int NSAtomicWrite = 1; -} +const String PRIdFAST64 = 'lld'; -/// Data Search Options -abstract class NSDataSearchOptions { - static const int NSDataSearchBackwards = 1; - static const int NSDataSearchAnchored = 2; -} +const String PRIiFAST64 = 'lli'; -void _ObjCBlock1_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} +const String PRIoFAST64 = 'llo'; -final _ObjCBlock1_closureRegistry = {}; -int _ObjCBlock1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock1_registerClosure(Function fn) { - final id = ++_ObjCBlock1_closureRegistryIndex; - _ObjCBlock1_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const String PRIuFAST64 = 'llu'; -void _ObjCBlock1_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return _ObjCBlock1_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +const String PRIxFAST64 = 'llx'; -class ObjCBlock1 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock1._(this._impl, this._lib); - ObjCBlock1.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>( - _ObjCBlock1_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock1.fromFunction( - this._lib, - void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2) - fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>( - _ObjCBlock1_closureTrampoline) - .cast(), - _ObjCBlock1_registerClosure(fn)); - void call( - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>()(_impl, arg0, arg1, arg2); - } +const String PRIXFAST64 = 'llX'; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const String PRIdPTR = 'ld'; -/// Read/Write Options -abstract class NSDataReadingOptions { - /// Hint to map the file in if possible and safe - static const int NSDataReadingMappedIfSafe = 1; +const String PRIiPTR = 'li'; - /// Hint to get the file not to be cached in the kernel - static const int NSDataReadingUncached = 2; +const String PRIoPTR = 'lo'; - /// Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given. - static const int NSDataReadingMappedAlways = 8; +const String PRIuPTR = 'lu'; - /// Deprecated name for NSDataReadingMappedIfSafe - static const int NSDataReadingMapped = 1; +const String PRIxPTR = 'lx'; - /// Deprecated name for NSDataReadingMapped - static const int NSMappedRead = 1; +const String PRIXPTR = 'lX'; - /// Deprecated name for NSDataReadingUncached - static const int NSUncachedRead = 2; -} +const String PRIdMAX = 'jd'; -void _ObjCBlock2_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); -} +const String PRIiMAX = 'ji'; -final _ObjCBlock2_closureRegistry = {}; -int _ObjCBlock2_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock2_registerClosure(Function fn) { - final id = ++_ObjCBlock2_closureRegistryIndex; - _ObjCBlock2_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const String PRIoMAX = 'jo'; -void _ObjCBlock2_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return _ObjCBlock2_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +const String PRIuMAX = 'ju'; -class ObjCBlock2 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock2._(this._impl, this._lib); - ObjCBlock2.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, NSUInteger arg1)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock2_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock2.fromFunction( - this._lib, void Function(ffi.Pointer arg0, int arg1) fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock2_closureTrampoline) - .cast(), - _ObjCBlock2_registerClosure(fn)); - void call(ffi.Pointer arg0, int arg1) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1)>()(_impl, arg0, arg1); - } +const String PRIxMAX = 'jx'; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const String PRIXMAX = 'jX'; -abstract class NSDataBase64DecodingOptions { - /// Use the following option to modify the decoding algorithm so that it ignores unknown non-Base64 bytes, including line ending characters. - static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; -} +const String SCNd8 = 'hhd'; -/// Base 64 Options -abstract class NSDataBase64EncodingOptions { - /// Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default. - static const int NSDataBase64Encoding64CharacterLineLength = 1; - static const int NSDataBase64Encoding76CharacterLineLength = 2; +const String SCNi8 = 'hhi'; - /// Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF. - static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; - static const int NSDataBase64EncodingEndLineWithLineFeed = 32; -} +const String SCNo8 = 'hho'; -/// Various algorithms provided for compression APIs. See NSData and NSMutableData. -abstract class NSDataCompressionAlgorithm { - /// LZFSE is the recommended compression algorithm if you don't have a specific reason to use another algorithm. Note that LZFSE is intended for use with Apple devices only. This algorithm generally compresses better than Zlib, but not as well as LZMA. It is generally slower than LZ4. - static const int NSDataCompressionAlgorithmLZFSE = 0; +const String SCNu8 = 'hhu'; - /// LZ4 is appropriate if compression speed is critical. LZ4 generally sacrifices compression ratio in order to achieve its greater speed. - /// This implementation of LZ4 makes a small modification to the standard format, which is described in greater detail in . - static const int NSDataCompressionAlgorithmLZ4 = 1; +const String SCNx8 = 'hhx'; - /// LZMA is appropriate if compression ratio is critical and memory usage and compression speed are not a factor. LZMA is an order of magnitude slower for both compression and decompression than other algorithms. It can also use a very large amount of memory, so if you need to compress large amounts of data on embedded devices with limited memory you should probably avoid LZMA. - /// Encoding uses LZMA level 6 only, but decompression works with any compression level. - static const int NSDataCompressionAlgorithmLZMA = 2; +const String SCNd16 = 'hd'; + +const String SCNi16 = 'hi'; + +const String SCNo16 = 'ho'; - /// Zlib is appropriate if you want a good balance between compression speed and compression ratio, but only if you need interoperability with non-Apple platforms. Otherwise, LZFSE is generally a better choice than Zlib. - /// Encoding uses Zlib level 5 only, but decompression works with any compression level. It uses the raw DEFLATE format as described in IETF RFC 1951. - static const int NSDataCompressionAlgorithmZlib = 3; -} +const String SCNu16 = 'hu'; -typedef UTF32Char = UInt32; -typedef UInt32 = ffi.UnsignedInt; -typedef NSStringEncoding = NSUInteger; +const String SCNx16 = 'hx'; -abstract class NSBinarySearchingOptions { - static const int NSBinarySearchingFirstEqual = 256; - static const int NSBinarySearchingLastEqual = 512; - static const int NSBinarySearchingInsertionIndex = 1024; -} +const String SCNd32 = 'd'; -/// Mutable Array -class NSMutableArray extends NSArray { - NSMutableArray._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const String SCNi32 = 'i'; - /// Returns a [NSMutableArray] that points to the same underlying object as [other]. - static NSMutableArray castFrom(T other) { - return NSMutableArray._(other._id, other._lib, retain: true, release: true); - } +const String SCNo32 = 'o'; - /// Returns a [NSMutableArray] that wraps the given raw object pointer. - static NSMutableArray castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableArray._(other, lib, retain: retain, release: release); - } +const String SCNu32 = 'u'; - /// Returns whether [obj] is an instance of [NSMutableArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableArray1); - } +const String SCNx32 = 'x'; - void addObject_(NSObject anObject) { - return _lib._objc_msgSend_109(_id, _lib._sel_addObject_1, anObject._id); - } +const String SCNd64 = 'lld'; - void insertObject_atIndex_(NSObject anObject, int index) { - return _lib._objc_msgSend_159( - _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); - } +const String SCNi64 = 'lli'; - void removeLastObject() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); - } +const String SCNo64 = 'llo'; - void removeObjectAtIndex_(int index) { - return _lib._objc_msgSend_160(_id, _lib._sel_removeObjectAtIndex_1, index); - } +const String SCNu64 = 'llu'; - void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { - return _lib._objc_msgSend_161( - _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); - } +const String SCNx64 = 'llx'; - @override - NSMutableArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNdLEAST8 = 'hhd'; - NSMutableArray initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_146(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNiLEAST8 = 'hhi'; - @override - NSMutableArray initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNoLEAST8 = 'hho'; - void addObjectsFromArray_(NSArray? otherArray) { - return _lib._objc_msgSend_162( - _id, _lib._sel_addObjectsFromArray_1, otherArray?._id ?? ffi.nullptr); - } +const String SCNuLEAST8 = 'hhu'; - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - return _lib._objc_msgSend_163( - _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); - } +const String SCNxLEAST8 = 'hhx'; - void removeAllObjects() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } +const String SCNdLEAST16 = 'hd'; - void removeObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_164( - _id, _lib._sel_removeObject_inRange_1, anObject._id, range); - } +const String SCNiLEAST16 = 'hi'; - void removeObject_(NSObject anObject) { - return _lib._objc_msgSend_109(_id, _lib._sel_removeObject_1, anObject._id); - } +const String SCNoLEAST16 = 'ho'; - void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_164( - _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); - } +const String SCNuLEAST16 = 'hu'; - void removeObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_109( - _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); - } +const String SCNxLEAST16 = 'hx'; - void removeObjectsFromIndices_numIndices_( - ffi.Pointer indices, int cnt) { - return _lib._objc_msgSend_165( - _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); - } +const String SCNdLEAST32 = 'd'; - void removeObjectsInArray_(NSArray? otherArray) { - return _lib._objc_msgSend_162( - _id, _lib._sel_removeObjectsInArray_1, otherArray?._id ?? ffi.nullptr); - } +const String SCNiLEAST32 = 'i'; - void removeObjectsInRange_(NSRange range) { - return _lib._objc_msgSend_166(_id, _lib._sel_removeObjectsInRange_1, range); - } +const String SCNoLEAST32 = 'o'; - void replaceObjectsInRange_withObjectsFromArray_range_( - NSRange range, NSArray? otherArray, NSRange otherRange) { - return _lib._objc_msgSend_167( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, - range, - otherArray?._id ?? ffi.nullptr, - otherRange); - } +const String SCNuLEAST32 = 'u'; - void replaceObjectsInRange_withObjectsFromArray_( - NSRange range, NSArray? otherArray) { - return _lib._objc_msgSend_168( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, - range, - otherArray?._id ?? ffi.nullptr); - } +const String SCNxLEAST32 = 'x'; - void setArray_(NSArray? otherArray) { - return _lib._objc_msgSend_162( - _id, _lib._sel_setArray_1, otherArray?._id ?? ffi.nullptr); - } +const String SCNdLEAST64 = 'lld'; - void sortUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context) { - return _lib._objc_msgSend_169( - _id, _lib._sel_sortUsingFunction_context_1, compare, context); - } +const String SCNiLEAST64 = 'lli'; - void sortUsingSelector_(ffi.Pointer comparator) { - return _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); - } +const String SCNoLEAST64 = 'llo'; - void insertObjects_atIndexes_(NSArray? objects, NSIndexSet? indexes) { - return _lib._objc_msgSend_190(_id, _lib._sel_insertObjects_atIndexes_1, - objects?._id ?? ffi.nullptr, indexes?._id ?? ffi.nullptr); - } +const String SCNuLEAST64 = 'llu'; - void removeObjectsAtIndexes_(NSIndexSet? indexes) { - return _lib._objc_msgSend_191( - _id, _lib._sel_removeObjectsAtIndexes_1, indexes?._id ?? ffi.nullptr); - } +const String SCNxLEAST64 = 'llx'; - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet? indexes, NSArray? objects) { - return _lib._objc_msgSend_192( - _id, - _lib._sel_replaceObjectsAtIndexes_withObjects_1, - indexes?._id ?? ffi.nullptr, - objects?._id ?? ffi.nullptr); - } +const String SCNdFAST8 = 'hhd'; - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - return _lib._objc_msgSend_159( - _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); - } +const String SCNiFAST8 = 'hhi'; - void sortUsingComparator_(NSComparator cmptr) { - return _lib._objc_msgSend_193(_id, _lib._sel_sortUsingComparator_1, cmptr); - } +const String SCNoFAST8 = 'hho'; - void sortWithOptions_usingComparator_(int opts, NSComparator cmptr) { - return _lib._objc_msgSend_194( - _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr); - } +const String SCNuFAST8 = 'hhu'; - static NSMutableArray arrayWithCapacity_( - NativeCupertinoHttp _lib, int numItems) { - final _ret = _lib._objc_msgSend_146( - _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNxFAST8 = 'hhx'; - static NSMutableArray arrayWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_195(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNdFAST16 = 'hd'; - static NSMutableArray arrayWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_196(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNiFAST16 = 'hi'; - NSMutableArray initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_195( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNoFAST16 = 'ho'; - NSMutableArray initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_196( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNuFAST16 = 'hu'; - void applyDifference_() { - return _lib._objc_msgSend_1(_id, _lib._sel_applyDifference_1); - } +const String SCNxFAST16 = 'hx'; - static NSMutableArray array(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNdFAST32 = 'd'; - static NSMutableArray arrayWithObject_( - NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_71( - _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNiFAST32 = 'i'; - static NSMutableArray arrayWithObjects_count_(NativeCupertinoHttp _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_147(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNoFAST32 = 'o'; - static NSMutableArray arrayWithObjects_( - NativeCupertinoHttp _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_71(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_1, firstObj._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNuFAST32 = 'u'; - static NSMutableArray arrayWithArray_( - NativeCupertinoHttp _lib, NSArray? array) { - final _ret = _lib._objc_msgSend_86(_lib._class_NSMutableArray1, - _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +const String SCNxFAST32 = 'x'; - /// Reads array stored in NSPropertyList format from the specified url. - static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_155( - _lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const String SCNdFAST64 = 'lld'; - static NSMutableArray new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } +const String SCNiFAST64 = 'lli'; - static NSMutableArray alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } -} +const String SCNoFAST64 = 'llo'; -class NSIndexSet extends NSObject { - NSIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const String SCNuFAST64 = 'llu'; - /// Returns a [NSIndexSet] that points to the same underlying object as [other]. - static NSIndexSet castFrom(T other) { - return NSIndexSet._(other._id, other._lib, retain: true, release: true); - } +const String SCNxFAST64 = 'llx'; - /// Returns a [NSIndexSet] that wraps the given raw object pointer. - static NSIndexSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexSet._(other, lib, retain: retain, release: release); - } +const String SCNdPTR = 'ld'; - /// Returns whether [obj] is an instance of [NSIndexSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); - } +const String SCNiPTR = 'li'; - static NSIndexSet indexSet(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +const String SCNoPTR = 'lo'; - static NSIndexSet indexSetWithIndex_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_146( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +const String SCNuPTR = 'lu'; - static NSIndexSet indexSetWithIndexesInRange_( - NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_170( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +const String SCNxPTR = 'lx'; - NSIndexSet initWithIndexesInRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_170(_id, _lib._sel_initWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +const String SCNdMAX = 'jd'; - NSIndexSet initWithIndexSet_(NSIndexSet? indexSet) { - final _ret = _lib._objc_msgSend_171( - _id, _lib._sel_initWithIndexSet_1, indexSet?._id ?? ffi.nullptr); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +const String SCNiMAX = 'ji'; - NSIndexSet initWithIndex_(int value) { - final _ret = _lib._objc_msgSend_146(_id, _lib._sel_initWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +const String SCNoMAX = 'jo'; - bool isEqualToIndexSet_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_172( - _id, _lib._sel_isEqualToIndexSet_1, indexSet?._id ?? ffi.nullptr); - } +const String SCNuMAX = 'ju'; - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } +const String SCNxMAX = 'jx'; - int get firstIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); - } +const int __COREFOUNDATION_CFBAG__ = 1; - int get lastIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); - } +const int __COREFOUNDATION_CFBINARYHEAP__ = 1; - int indexGreaterThanIndex_(int value) { - return _lib._objc_msgSend_173( - _id, _lib._sel_indexGreaterThanIndex_1, value); - } +const int __COREFOUNDATION_CFBITVECTOR__ = 1; - int indexLessThanIndex_(int value) { - return _lib._objc_msgSend_173(_id, _lib._sel_indexLessThanIndex_1, value); - } +const int __COREFOUNDATION_CFBYTEORDER__ = 1; - int indexGreaterThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_173( - _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); - } +const int CF_USE_OSBYTEORDER_H = 1; - int indexLessThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_173( - _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); - } +const int __COREFOUNDATION_CFCALENDAR__ = 1; - int getIndexes_maxCount_inIndexRange_(ffi.Pointer indexBuffer, - int bufferSize, NSRangePointer range) { - return _lib._objc_msgSend_174( - _id, - _lib._sel_getIndexes_maxCount_inIndexRange_1, - indexBuffer, - bufferSize, - range); - } +const int __COREFOUNDATION_CFLOCALE__ = 1; - int countOfIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_175( - _id, _lib._sel_countOfIndexesInRange_1, range); - } +const int __COREFOUNDATION_CFDICTIONARY__ = 1; - bool containsIndex_(int value) { - return _lib._objc_msgSend_176(_id, _lib._sel_containsIndex_1, value); - } +const int __COREFOUNDATION_CFNOTIFICATIONCENTER__ = 1; - bool containsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_177( - _id, _lib._sel_containsIndexesInRange_1, range); - } +const int __COREFOUNDATION_CFDATE__ = 1; - bool containsIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_172( - _id, _lib._sel_containsIndexes_1, indexSet?._id ?? ffi.nullptr); - } +const int __COREFOUNDATION_CFTIMEZONE__ = 1; - bool intersectsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_177( - _id, _lib._sel_intersectsIndexesInRange_1, range); - } +const int __COREFOUNDATION_CFDATA__ = 1; - void enumerateIndexesUsingBlock_(ObjCBlock3 block) { - return _lib._objc_msgSend_178( - _id, _lib._sel_enumerateIndexesUsingBlock_1, block._impl); - } +const int __COREFOUNDATION_CFSTRING__ = 1; - void enumerateIndexesWithOptions_usingBlock_(int opts, ObjCBlock3 block) { - return _lib._objc_msgSend_179(_id, - _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._impl); - } +const int __COREFOUNDATION_CFCHARACTERSET__ = 1; - void enumerateIndexesInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock3 block) { - return _lib._objc_msgSend_180( - _id, - _lib._sel_enumerateIndexesInRange_options_usingBlock_1, - range, - opts, - block._impl); - } +const int kCFStringEncodingInvalidId = 4294967295; - int indexPassingTest_(ObjCBlock4 predicate) { - return _lib._objc_msgSend_181( - _id, _lib._sel_indexPassingTest_1, predicate._impl); - } +const int __kCFStringInlineBufferLength = 64; - int indexWithOptions_passingTest_(int opts, ObjCBlock4 predicate) { - return _lib._objc_msgSend_182( - _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._impl); - } +const int __COREFOUNDATION_CFDATEFORMATTER__ = 1; - int indexInRange_options_passingTest_( - NSRange range, int opts, ObjCBlock4 predicate) { - return _lib._objc_msgSend_183( - _id, - _lib._sel_indexInRange_options_passingTest_1, - range, - opts, - predicate._impl); - } +const int __COREFOUNDATION_CFERROR__ = 1; - NSIndexSet indexesPassingTest_(ObjCBlock4 predicate) { - final _ret = _lib._objc_msgSend_184( - _id, _lib._sel_indexesPassingTest_1, predicate._impl); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +const int __COREFOUNDATION_CFNUMBER__ = 1; - NSIndexSet indexesWithOptions_passingTest_(int opts, ObjCBlock4 predicate) { - final _ret = _lib._objc_msgSend_185( - _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._impl); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +const int __COREFOUNDATION_CFNUMBERFORMATTER__ = 1; - NSIndexSet indexesInRange_options_passingTest_( - NSRange range, int opts, ObjCBlock4 predicate) { - final _ret = _lib._objc_msgSend_186( - _id, - _lib._sel_indexesInRange_options_passingTest_1, - range, - opts, - predicate._impl); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +const int __COREFOUNDATION_CFPREFERENCES__ = 1; - void enumerateRangesUsingBlock_(ObjCBlock5 block) { - return _lib._objc_msgSend_187( - _id, _lib._sel_enumerateRangesUsingBlock_1, block._impl); - } +const int __COREFOUNDATION_CFPROPERTYLIST__ = 1; - void enumerateRangesWithOptions_usingBlock_(int opts, ObjCBlock5 block) { - return _lib._objc_msgSend_188(_id, - _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._impl); - } +const int __COREFOUNDATION_CFSTREAM__ = 1; - void enumerateRangesInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock5 block) { - return _lib._objc_msgSend_189( - _id, - _lib._sel_enumerateRangesInRange_options_usingBlock_1, - range, - opts, - block._impl); - } +const int __COREFOUNDATION_CFURL__ = 1; - static NSIndexSet new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } +const int __COREFOUNDATION_CFRUNLOOP__ = 1; - static NSIndexSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } -} +const int MACH_PORT_NULL = 0; -typedef NSRangePointer = ffi.Pointer; -void _ObjCBlock3_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); -} +const int MACH_PORT_TYPE_DNREQUEST = 2147483648; -final _ObjCBlock3_closureRegistry = {}; -int _ObjCBlock3_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock3_registerClosure(Function fn) { - final id = ++_ObjCBlock3_closureRegistryIndex; - _ObjCBlock3_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int MACH_PORT_TYPE_SPREQUEST = 1073741824; -void _ObjCBlock3_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return _ObjCBlock3_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +const int MACH_PORT_TYPE_SPREQUEST_DELAYED = 536870912; -class ObjCBlock3 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock3._(this._impl, this._lib); - ObjCBlock3.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - NSUInteger arg0, ffi.Pointer arg1)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock3_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock3.fromFunction( - this._lib, void Function(int arg0, ffi.Pointer arg1) fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock3_closureTrampoline) - .cast(), - _ObjCBlock3_registerClosure(fn)); - void call(int arg0, ffi.Pointer arg1) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, int arg0, - ffi.Pointer arg1)>()(_impl, arg0, arg1); - } +const int MACH_PORT_SRIGHTS_NONE = 0; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int MACH_PORT_SRIGHTS_PRESENT = 1; -abstract class NSEnumerationOptions { - static const int NSEnumerationConcurrent = 1; - static const int NSEnumerationReverse = 2; -} +const int MACH_PORT_QLIMIT_ZERO = 0; -bool _ObjCBlock4_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); -} +const int MACH_PORT_QLIMIT_BASIC = 5; -final _ObjCBlock4_closureRegistry = {}; -int _ObjCBlock4_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock4_registerClosure(Function fn) { - final id = ++_ObjCBlock4_closureRegistryIndex; - _ObjCBlock4_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int MACH_PORT_QLIMIT_SMALL = 16; -bool _ObjCBlock4_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return _ObjCBlock4_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +const int MACH_PORT_QLIMIT_LARGE = 1024; -class ObjCBlock4 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock4._(this._impl, this._lib); - ObjCBlock4.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - NSUInteger arg0, ffi.Pointer arg1)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock4_fnPtrTrampoline, false) - .cast(), - ptr.cast()); - ObjCBlock4.fromFunction( - this._lib, bool Function(int arg0, ffi.Pointer arg1) fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock4_closureTrampoline, false) - .cast(), - _ObjCBlock4_registerClosure(fn)); - bool call(int arg0, ffi.Pointer arg1) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock> block, int arg0, - ffi.Pointer arg1)>()(_impl, arg0, arg1); - } +const int MACH_PORT_QLIMIT_KERNEL = 65534; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int MACH_PORT_QLIMIT_MIN = 0; -void _ObjCBlock5_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function( - NSRange arg0, ffi.Pointer arg1)>()(arg0, arg1); -} +const int MACH_PORT_QLIMIT_DEFAULT = 5; -final _ObjCBlock5_closureRegistry = {}; -int _ObjCBlock5_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock5_registerClosure(Function fn) { - final id = ++_ObjCBlock5_closureRegistryIndex; - _ObjCBlock5_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int MACH_PORT_QLIMIT_MAX = 1024; -void _ObjCBlock5_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { - return _ObjCBlock5_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +const int MACH_PORT_STATUS_FLAG_TEMPOWNER = 1; -class ObjCBlock5 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock5._(this._impl, this._lib); - ObjCBlock5.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSRange arg0, ffi.Pointer arg1)>( - _ObjCBlock5_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock5.fromFunction( - this._lib, void Function(NSRange arg0, ffi.Pointer arg1) fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSRange arg0, ffi.Pointer arg1)>( - _ObjCBlock5_closureTrampoline) - .cast(), - _ObjCBlock5_registerClosure(fn)); - void call(NSRange arg0, ffi.Pointer arg1) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, - ffi.Pointer arg1)>()(_impl, arg0, arg1); - } +const int MACH_PORT_STATUS_FLAG_GUARDED = 2; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int MACH_PORT_STATUS_FLAG_STRICT_GUARD = 4; -typedef NSComparator = ffi.Pointer<_ObjCBlock>; -int _ObjCBlock6_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} +const int MACH_PORT_STATUS_FLAG_IMP_DONATION = 8; -final _ObjCBlock6_closureRegistry = {}; -int _ObjCBlock6_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock6_registerClosure(Function fn) { - final id = ++_ObjCBlock6_closureRegistryIndex; - _ObjCBlock6_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int MACH_PORT_STATUS_FLAG_REVIVE = 16; -int _ObjCBlock6_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock6_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +const int MACH_PORT_STATUS_FLAG_TASKPTR = 32; -class ObjCBlock6 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock6._(this._impl, this._lib); - ObjCBlock6.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock6_fnPtrTrampoline, 0) - .cast(), - ptr.cast()); - ObjCBlock6.fromFunction( - this._lib, - int Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock6_closureTrampoline, 0) - .cast(), - _ObjCBlock6_registerClosure(fn)); - int call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_impl, arg0, arg1); - } +const int MACH_PORT_STATUS_FLAG_GUARD_IMMOVABLE_RECEIVE = 64; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int MACH_PORT_STATUS_FLAG_NO_GRANT = 128; -abstract class NSSortOptions { - static const int NSSortConcurrent = 1; - static const int NSSortStable = 16; -} +const int MACH_PORT_LIMITS_INFO = 1; -/// Mutable Data -class NSMutableData extends NSData { - NSMutableData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int MACH_PORT_RECEIVE_STATUS = 2; - /// Returns a [NSMutableData] that points to the same underlying object as [other]. - static NSMutableData castFrom(T other) { - return NSMutableData._(other._id, other._lib, retain: true, release: true); - } +const int MACH_PORT_DNREQUESTS_SIZE = 3; - /// Returns a [NSMutableData] that wraps the given raw object pointer. - static NSMutableData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableData._(other, lib, retain: retain, release: release); - } +const int MACH_PORT_TEMPOWNER = 4; - /// Returns whether [obj] is an instance of [NSMutableData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); - } +const int MACH_PORT_IMPORTANCE_RECEIVER = 5; - ffi.Pointer get mutableBytes { - return _lib._objc_msgSend_18(_id, _lib._sel_mutableBytes1); - } +const int MACH_PORT_DENAP_RECEIVER = 6; - @override - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); - } +const int MACH_PORT_INFO_EXT = 7; - set length(int value) { - _lib._objc_msgSend_197(_id, _lib._sel_setLength_1, value); - } +const int MACH_PORT_GUARD_INFO = 8; - void appendBytes_length_(ffi.Pointer bytes, int length) { - return _lib._objc_msgSend_20( - _id, _lib._sel_appendBytes_length_1, bytes, length); - } +const int MACH_PORT_DNREQUESTS_SIZE_COUNT = 1; - void appendData_(NSData? other) { - return _lib._objc_msgSend_198( - _id, _lib._sel_appendData_1, other?._id ?? ffi.nullptr); - } +const int MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN = 255; - void increaseLengthBy_(int extraLength) { - return _lib._objc_msgSend_160( - _id, _lib._sel_increaseLengthBy_1, extraLength); - } +const int MPO_CONTEXT_AS_GUARD = 1; - void replaceBytesInRange_withBytes_( - NSRange range, ffi.Pointer bytes) { - return _lib._objc_msgSend_199( - _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); - } +const int MPO_QLIMIT = 2; - void resetBytesInRange_(NSRange range) { - return _lib._objc_msgSend_166(_id, _lib._sel_resetBytesInRange_1, range); - } +const int MPO_TEMPOWNER = 4; - void setData_(NSData? data) { - return _lib._objc_msgSend_198( - _id, _lib._sel_setData_1, data?._id ?? ffi.nullptr); - } +const int MPO_IMPORTANCE_RECEIVER = 8; - void replaceBytesInRange_withBytes_length_(NSRange range, - ffi.Pointer replacementBytes, int replacementLength) { - return _lib._objc_msgSend_200( - _id, - _lib._sel_replaceBytesInRange_withBytes_length_1, - range, - replacementBytes, - replacementLength); - } +const int MPO_INSERT_SEND_RIGHT = 16; - static NSMutableData dataWithCapacity_( - NativeCupertinoHttp _lib, int aNumItems) { - final _ret = _lib._objc_msgSend_146( - _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } +const int MPO_STRICT = 32; - static NSMutableData dataWithLength_(NativeCupertinoHttp _lib, int length) { - final _ret = _lib._objc_msgSend_146( - _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } +const int MPO_DENAP_RECEIVER = 64; - NSMutableData initWithCapacity_(int capacity) { - final _ret = - _lib._objc_msgSend_146(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } +const int MPO_IMMOVABLE_RECEIVE = 128; - NSMutableData initWithLength_(int length) { - final _ret = - _lib._objc_msgSend_146(_id, _lib._sel_initWithLength_1, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } +const int MPO_FILTER_MSG = 256; - /// These methods compress or decompress the receiver's contents in-place using the specified algorithm. If the operation is not successful, these methods leave the receiver unchanged.. - bool decompressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_201( - _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); - } +const int MPO_TG_BLOCK_TRACKING = 512; - bool compressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_201( - _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); - } +const int MPO_SERVICE_PORT = 1024; - static NSMutableData data(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } +const int MPO_CONNECTION_PORT = 2048; - static NSMutableData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_121(_lib._class_NSMutableData1, - _lib._sel_dataWithBytes_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } +const int GUARD_TYPE_MACH_PORT = 1; - static NSMutableData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_121(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } +const int MAX_FATAL_kGUARD_EXC_CODE = 128; - static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - int length, - bool b) { - final _ret = _lib._objc_msgSend_122(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } +const int MPG_FLAGS_NONE = 0; - static NSMutableData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_123( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } +const int MAX_OPTIONAL_kGUARD_EXC_CODE = 524288; - static NSMutableData dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } +const int MPG_FLAGS_STRICT_REPLY_INVALID_REPLY_DISP = 72057594037927936; - static NSMutableData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_29(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } +const int MPG_FLAGS_STRICT_REPLY_INVALID_REPLY_PORT = 144115188075855872; - static NSMutableData dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_110(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } +const int MPG_FLAGS_STRICT_REPLY_INVALID_VOUCHER = 288230376151711744; - static NSMutableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_126(_lib._class_NSMutableData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } +const int MPG_FLAGS_STRICT_REPLY_NO_BANK_ATTR = 576460752303423488; - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_29(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int MPG_FLAGS_STRICT_REPLY_MISMATCHED_PERSONA = 1152921504606846976; - static NSMutableData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } +const int MPG_FLAGS_STRICT_REPLY_MASK = -72057594037927936; - static NSMutableData alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } -} +const int MPG_FLAGS_MOD_REFS_PINNED_DEALLOC = 72057594037927936; -/// Purgeable Data -class NSPurgeableData extends NSMutableData { - NSPurgeableData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int MPG_FLAGS_MOD_REFS_PINNED_DESTROY = 144115188075855872; - /// Returns a [NSPurgeableData] that points to the same underlying object as [other]. - static NSPurgeableData castFrom(T other) { - return NSPurgeableData._(other._id, other._lib, - retain: true, release: true); - } +const int MPG_FLAGS_MOD_REFS_PINNED_COPYIN = 288230376151711744; - /// Returns a [NSPurgeableData] that wraps the given raw object pointer. - static NSPurgeableData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPurgeableData._(other, lib, retain: retain, release: release); - } +const int MPG_FLAGS_IMMOVABLE_PINNED = 72057594037927936; - /// Returns whether [obj] is an instance of [NSPurgeableData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSPurgeableData1); - } +const int MPG_STRICT = 1; - static NSPurgeableData dataWithCapacity_( - NativeCupertinoHttp _lib, int aNumItems) { - final _ret = _lib._objc_msgSend_146( - _lib._class_NSPurgeableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } +const int MPG_IMMOVABLE_RECEIVE = 2; - static NSPurgeableData dataWithLength_(NativeCupertinoHttp _lib, int length) { - final _ret = _lib._objc_msgSend_146( - _lib._class_NSPurgeableData1, _lib._sel_dataWithLength_1, length); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } +const int __COREFOUNDATION_CFSOCKET__ = 1; - static NSPurgeableData data(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_data1); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_VERSION = 200112; - static NSPurgeableData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_121(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytes_length_1, bytes, length); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } +const int _POSIX2_VERSION = 200112; - static NSPurgeableData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_121(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } +const int _POSIX_VDISABLE = 255; - static NSPurgeableData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - int length, - bool b) { - final _ret = _lib._objc_msgSend_122(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } +const int F_OK = 0; - static NSPurgeableData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_123( - _lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } +const int X_OK = 1; - static NSPurgeableData dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_124( - _lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } +const int W_OK = 2; - static NSPurgeableData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_29(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } +const int R_OK = 4; - static NSPurgeableData dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_110(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } +const int _READ_OK = 512; - static NSPurgeableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_126(_lib._class_NSPurgeableData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } +const int _WRITE_OK = 1024; - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_29(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int _EXECUTE_OK = 2048; - static NSPurgeableData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_new1); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } +const int _DELETE_OK = 4096; - static NSPurgeableData alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_alloc1); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } -} +const int _APPEND_OK = 8192; -/// Mutable Dictionary -class NSMutableDictionary extends NSDictionary { - NSMutableDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int _RMFILE_OK = 16384; - /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. - static NSMutableDictionary castFrom(T other) { - return NSMutableDictionary._(other._id, other._lib, - retain: true, release: true); - } +const int _RATTR_OK = 32768; - /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. - static NSMutableDictionary castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableDictionary._(other, lib, retain: retain, release: release); - } +const int _WATTR_OK = 65536; - /// Returns whether [obj] is an instance of [NSMutableDictionary]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableDictionary1); - } +const int _REXT_OK = 131072; - void removeObjectForKey_(NSObject aKey) { - return _lib._objc_msgSend_109( - _id, _lib._sel_removeObjectForKey_1, aKey._id); - } +const int _WEXT_OK = 262144; - void setObject_forKey_(NSObject anObject, NSObject aKey) { - return _lib._objc_msgSend_202( - _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); - } +const int _RPERM_OK = 524288; - NSMutableDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _WPERM_OK = 1048576; - NSMutableDictionary initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_146(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _CHOWN_OK = 2097152; - NSMutableDictionary initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _ACCESS_EXTENDED_MASK = 4193792; - void addEntriesFromDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_203(_id, _lib._sel_addEntriesFromDictionary_1, - otherDictionary?._id ?? ffi.nullptr); - } +const int SEEK_HOLE = 3; - void removeAllObjects() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } +const int SEEK_DATA = 4; - void removeObjectsForKeys_(NSArray? keyArray) { - return _lib._objc_msgSend_162( - _id, _lib._sel_removeObjectsForKeys_1, keyArray?._id ?? ffi.nullptr); - } +const int L_SET = 0; - void setDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_203( - _id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr); - } +const int L_INCR = 1; - void setObject_forKeyedSubscript_(NSObject obj, NSObject key) { - return _lib._objc_msgSend_202( - _id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id); - } +const int L_XTND = 2; - static NSMutableDictionary dictionaryWithCapacity_( - NativeCupertinoHttp _lib, int numItems) { - final _ret = _lib._objc_msgSend_146(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int ACCESSX_MAX_DESCRIPTORS = 100; - static NSMutableDictionary dictionaryWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_204(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int ACCESSX_MAX_TABLESIZE = 16384; - static NSMutableDictionary dictionaryWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_205(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _PC_LINK_MAX = 1; - NSMutableDictionary initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_204( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _PC_MAX_CANON = 2; - NSMutableDictionary initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_205( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _PC_MAX_INPUT = 3; - /// Create a mutable dictionary which is optimized for dealing with a known set of keys. - /// Keys that are not in the key set can still be set into the dictionary, but that usage is not optimal. - /// As with any dictionary, the keys must be copyable. - /// If keyset is nil, an exception is thrown. - /// If keyset is not an object returned by +sharedKeySetForKeys:, an exception is thrown. - static NSMutableDictionary dictionaryWithSharedKeySet_( - NativeCupertinoHttp _lib, NSObject keyset) { - final _ret = _lib._objc_msgSend_206(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _PC_NAME_MAX = 4; - static NSMutableDictionary dictionary(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _PC_PATH_MAX = 5; - static NSMutableDictionary dictionaryWithObject_forKey_( - NativeCupertinoHttp _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_80(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _PC_PIPE_BUF = 6; - static NSMutableDictionary dictionaryWithObjects_forKeys_count_( - NativeCupertinoHttp _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_81(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _PC_CHOWN_RESTRICTED = 7; - static NSMutableDictionary dictionaryWithObjectsAndKeys_( - NativeCupertinoHttp _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_71(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _PC_NO_TRUNC = 8; - static NSMutableDictionary dictionaryWithDictionary_( - NativeCupertinoHttp _lib, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_82(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _PC_VDISABLE = 9; - static NSMutableDictionary dictionaryWithObjects_forKeys_( - NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_83( - _lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } +const int _PC_NAME_CHARS_MAX = 10; - /// Reads dictionary stored in NSPropertyList format from the specified url. - static NSDictionary dictionaryWithContentsOfURL_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_85( - _lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int _PC_CASE_SENSITIVE = 11; - /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. - /// The keys are copied from the array and must be copyable. - /// If the array parameter is nil or not an NSArray, an exception is thrown. - /// If the array of keys is empty, an empty key set is returned. - /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). - /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. - /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. - static NSObject sharedKeySetForKeys_( - NativeCupertinoHttp _lib, NSArray? keys) { - final _ret = _lib._objc_msgSend_86(_lib._class_NSMutableDictionary1, - _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int _PC_CASE_PRESERVING = 12; - static NSMutableDictionary new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } +const int _PC_EXTENDED_SECURITY_NP = 13; - static NSMutableDictionary alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_alloc1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } -} +const int _PC_AUTH_OPAQUE_NP = 14; -/// ! -/// @enum NSURLRequestCachePolicy -/// -/// @discussion The NSURLRequestCachePolicy enum defines constants that -/// can be used to specify the type of interactions that take place with -/// the caching system when the URL loading system processes a request. -/// Specifically, these constants cover interactions that have to do -/// with whether already-existing cache data is returned to satisfy a -/// URL load request. -/// -/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the -/// caching logic defined in the protocol implementation, if any, is -/// used for a particular URL load request. This is the default policy -/// for URL load requests. -/// -/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the -/// data for the URL load should be loaded from the origin source. No -/// existing local cache data, regardless of its freshness or validity, -/// should be used to satisfy a URL load request. -/// -/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that -/// not only should the local cache data be ignored, but that proxies and -/// other intermediates should be instructed to disregard their caches -/// so far as the protocol allows. -/// -/// @constant NSURLRequestReloadIgnoringCacheData Older name for -/// NSURLRequestReloadIgnoringLocalCacheData. -/// -/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the -/// existing cache data should be used to satisfy a URL load request, -/// regardless of its age or expiration date. However, if there is no -/// existing data in the cache corresponding to a URL load request, -/// the URL is loaded from the origin source. -/// -/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the -/// existing cache data should be used to satisfy a URL load request, -/// regardless of its age or expiration date. However, if there is no -/// existing data in the cache corresponding to a URL load request, no -/// attempt is made to load the URL from the origin source, and the -/// load is considered to have failed. This constant specifies a -/// behavior that is similar to an "offline" mode. -/// -/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that -/// the existing cache data may be used provided the origin source -/// confirms its validity, otherwise the URL is loaded from the -/// origin source. -abstract class NSURLRequestCachePolicy { - static const int NSURLRequestUseProtocolCachePolicy = 0; - static const int NSURLRequestReloadIgnoringLocalCacheData = 1; - static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; - static const int NSURLRequestReloadIgnoringCacheData = 1; - static const int NSURLRequestReturnCacheDataElseLoad = 2; - static const int NSURLRequestReturnCacheDataDontLoad = 3; - static const int NSURLRequestReloadRevalidatingCacheData = 5; -} +const int _PC_2_SYMLINKS = 15; + +const int _PC_ALLOC_SIZE_MIN = 16; + +const int _PC_ASYNC_IO = 17; + +const int _PC_FILESIZEBITS = 18; + +const int _PC_PRIO_IO = 19; + +const int _PC_REC_INCR_XFER_SIZE = 20; + +const int _PC_REC_MAX_XFER_SIZE = 21; + +const int _PC_REC_MIN_XFER_SIZE = 22; + +const int _PC_REC_XFER_ALIGN = 23; + +const int _PC_SYMLINK_MAX = 24; + +const int _PC_SYNC_IO = 25; + +const int _PC_XATTR_SIZE_BITS = 26; + +const int _PC_MIN_HOLE_SIZE = 27; + +const int _CS_PATH = 1; + +const int STDIN_FILENO = 0; + +const int STDOUT_FILENO = 1; + +const int STDERR_FILENO = 2; + +const int _XOPEN_VERSION = 600; + +const int _XOPEN_XCU_VERSION = 4; + +const int _POSIX_ADVISORY_INFO = -1; + +const int _POSIX_ASYNCHRONOUS_IO = -1; + +const int _POSIX_BARRIERS = -1; + +const int _POSIX_CHOWN_RESTRICTED = 200112; -/// ! -/// @enum NSURLRequestNetworkServiceType -/// -/// @discussion The NSURLRequestNetworkServiceType enum defines constants that -/// can be used to specify the service type to associate with this request. The -/// service type is used to provide the networking layers a hint of the purpose -/// of the request. -/// -/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest -/// when created. This value should be left unchanged for the vast majority of requests. -/// -/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP -/// control traffic. -/// -/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video -/// traffic. -/// -/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background -/// traffic (such as a file download). -/// -/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. -/// -/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. -/// -/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. -/// -/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. -/// -/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. -abstract class NSURLRequestNetworkServiceType { - /// Standard internet traffic - static const int NSURLNetworkServiceTypeDefault = 0; +const int _POSIX_CLOCK_SELECTION = -1; - /// Voice over IP control traffic - static const int NSURLNetworkServiceTypeVoIP = 1; +const int _POSIX_CPUTIME = -1; - /// Video traffic - static const int NSURLNetworkServiceTypeVideo = 2; +const int _POSIX_FSYNC = 200112; - /// Background traffic - static const int NSURLNetworkServiceTypeBackground = 3; +const int _POSIX_IPV6 = 200112; - /// Voice data - static const int NSURLNetworkServiceTypeVoice = 4; +const int _POSIX_JOB_CONTROL = 200112; - /// Responsive data - static const int NSURLNetworkServiceTypeResponsiveData = 6; +const int _POSIX_MAPPED_FILES = 200112; - /// Multimedia Audio/Video Streaming - static const int NSURLNetworkServiceTypeAVStreaming = 8; +const int _POSIX_MEMLOCK = -1; - /// Responsive Multimedia Audio/Video - static const int NSURLNetworkServiceTypeResponsiveAV = 9; +const int _POSIX_MEMLOCK_RANGE = -1; - /// Call Signaling - static const int NSURLNetworkServiceTypeCallSignaling = 11; -} +const int _POSIX_MEMORY_PROTECTION = 200112; -/// ! -/// @class NSURLRequest -/// -/// @abstract An NSURLRequest object represents a URL load request in a -/// manner independent of protocol and URL scheme. -/// -/// @discussion NSURLRequest encapsulates two basic data elements about -/// a URL load request: -///
    -///
  • The URL to load. -///
  • The policy to use when consulting the URL content cache made -/// available by the implementation. -///
-/// In addition, NSURLRequest is designed to be extended to support -/// protocol-specific data by adding categories to access a property -/// object provided in an interface targeted at protocol implementors. -///
    -///
  • Protocol implementors should direct their attention to the -/// NSURLRequestExtensibility category on NSURLRequest for more -/// information on how to provide extensions on NSURLRequest to -/// support protocol-specific request information. -///
  • Clients of this API who wish to create NSURLRequest objects to -/// load URL content should consult the protocol-specific NSURLRequest -/// categories that are available. The NSHTTPURLRequest category on -/// NSURLRequest is an example. -///
-///

-/// Objects of this class are used to create NSURLConnection instances, -/// which can are used to perform the load of a URL, or as input to the -/// NSURLConnection class method which performs synchronous loads. -class NSURLRequest extends NSObject { - NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int _POSIX_MESSAGE_PASSING = -1; - /// Returns a [NSURLRequest] that points to the same underlying object as [other]. - static NSURLRequest castFrom(T other) { - return NSURLRequest._(other._id, other._lib, retain: true, release: true); - } +const int _POSIX_MONOTONIC_CLOCK = -1; - /// Returns a [NSURLRequest] that wraps the given raw object pointer. - static NSURLRequest castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLRequest._(other, lib, retain: retain, release: release); - } +const int _POSIX_NO_TRUNC = 200112; - /// Returns whether [obj] is an instance of [NSURLRequest]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); - } +const int _POSIX_PRIORITIZED_IO = -1; - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL? URL) { - final _ret = _lib._objc_msgSend_110(_lib._class_NSURLRequest1, - _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_PRIORITY_SCHEDULING = -1; - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_11( - _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); - } +const int _POSIX_RAW_SOCKETS = -1; - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NativeCupertinoHttp _lib, - NSURL? URL, - int cachePolicy, - double timeoutInterval) { - final _ret = _lib._objc_msgSend_207( - _lib._class_NSURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_READER_WRITER_LOCKS = 200112; - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_(NSURL? URL) { - final _ret = _lib._objc_msgSend_110( - _id, _lib._sel_initWithURL_1, URL?._id ?? ffi.nullptr); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_REALTIME_SIGNALS = -1; - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL and - /// cache policy. - /// @discussion This is the designated initializer for the - /// NSURLRequest class. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL? URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_207( - _id, - _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_REGEXP = 200112; - /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - NSURL? get URL { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_SAVED_IDS = 200112; - /// ! - /// @abstract Returns the cache policy of the receiver. - /// @result The cache policy of the receiver. - int get cachePolicy { - return _lib._objc_msgSend_208(_id, _lib._sel_cachePolicy1); - } +const int _POSIX_SEMAPHORES = -1; - /// ! - /// @abstract Returns the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval alloted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - /// @result The timeout interval of the receiver. - double get timeoutInterval { - return _lib._objc_msgSend_65(_id, _lib._sel_timeoutInterval1); - } +const int _POSIX_SHARED_MEMORY_OBJECTS = -1; - /// ! - /// @abstract The main document URL associated with this load. - /// @discussion This URL is used for the cookie "same domain as main - /// document" policy. There may also be other future uses. - /// See setMainDocumentURL: - /// NOTE: In the current implementation, this value is unused by the - /// framework. A fully functional version of this method will be available - /// in the future. - /// @result The main document URL. - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_SHELL = 200112; - /// ! - /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. - /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have - /// not explicitly set a networkServiceType (using the setNetworkServiceType method). - /// @result The NSURLRequestNetworkServiceType associated with this request. - int get networkServiceType { - return _lib._objc_msgSend_209(_id, _lib._sel_networkServiceType1); - } +const int _POSIX_SPAWN = -1; - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @result YES if the receiver is allowed to use the built in cellular radios to - /// satify the request, NO otherwise. - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } +const int _POSIX_SPIN_LOCKS = -1; - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @result YES if the receiver is allowed to use an interface marked as expensive to - /// satify the request, NO otherwise. - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } +const int _POSIX_SPORADIC_SERVER = -1; - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @result YES if the receiver is allowed to use an interface marked as constrained to - /// satify the request, NO otherwise. - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } +const int _POSIX_SYNCHRONIZED_IO = -1; - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); - } +const int _POSIX_THREAD_ATTR_STACKADDR = 200112; - /// ! - /// @abstract Returns the HTTP request method of the receiver. - /// @result the HTTP request method of the receiver. - NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_HTTPMethod1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_THREAD_ATTR_STACKSIZE = 200112; - /// ! - /// @abstract Returns a dictionary containing all the HTTP header fields - /// of the receiver. - /// @result a dictionary containing all the HTTP header fields of the - /// receiver. - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_THREAD_CPUTIME = -1; - /// ! - /// @method valueForHTTPHeaderField: - /// @abstract Returns the value which corresponds to the given header - /// field. Note that, in keeping with the HTTP RFC, HTTP header field - /// names are case-insensitive. - /// @param field the header field name to use for the lookup - /// (case-insensitive). - /// @result the value associated with the given header field, or nil if - /// there is no value associated with the given header field. - NSString valueForHTTPHeaderField_(NSString? field) { - final _ret = _lib._objc_msgSend_149( - _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_THREAD_PRIO_INHERIT = -1; - /// ! - /// @abstract Returns the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - /// @result The request body data of the receiver. - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_THREAD_PRIO_PROTECT = -1; - /// ! - /// @abstract Returns the request body stream of the receiver - /// if any has been set - /// @discussion The stream is returned for examination only; it is - /// not safe for the caller to manipulate the stream in any way. Also - /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only - /// one can be set on a given request. Also note that the body stream is - /// preserved across copies, but is LOST when the request is coded via the - /// NSCoding protocol - /// @result The request body stream of the receiver. - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_210(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_THREAD_PRIORITY_SCHEDULING = -1; - /// ! - /// @abstract Determine whether default cookie handling will happen for - /// this request. - /// @discussion NOTE: This value is not used prior to 10.3 - /// @result YES if cookies will be sent with and set for this request; - /// otherwise NO. - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); - } +const int _POSIX_THREAD_PROCESS_SHARED = 200112; - /// ! - /// @abstract Reports whether the receiver is not expected to wait for the - /// previous response before transmitting. - /// @result YES if the receiver should transmit before the previous response - /// is received. NO if the receiver should wait for the previous response - /// before transmitting. - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); - } +const int _POSIX_THREAD_SAFE_FUNCTIONS = 200112; - static NSURLRequest new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } +const int _POSIX_THREAD_SPORADIC_SERVER = -1; - static NSURLRequest alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } -} +const int _POSIX_THREADS = 200112; -typedef NSTimeInterval = ffi.Double; +const int _POSIX_TIMEOUTS = -1; -class NSInputStream extends _ObjCWrapper { - NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int _POSIX_TIMERS = -1; - /// Returns a [NSInputStream] that points to the same underlying object as [other]. - static NSInputStream castFrom(T other) { - return NSInputStream._(other._id, other._lib, retain: true, release: true); - } +const int _POSIX_TRACE = -1; - /// Returns a [NSInputStream] that wraps the given raw object pointer. - static NSInputStream castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInputStream._(other, lib, retain: retain, release: release); - } +const int _POSIX_TRACE_EVENT_FILTER = -1; - /// Returns whether [obj] is an instance of [NSInputStream]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); - } -} +const int _POSIX_TRACE_INHERIT = -1; -/// ! -/// @class NSMutableURLRequest -/// -/// @abstract An NSMutableURLRequest object represents a mutable URL load -/// request in a manner independent of protocol and URL scheme. -/// -/// @discussion This specialization of NSURLRequest is provided to aid -/// developers who may find it more convenient to mutate a single request -/// object for a series of URL loads instead of creating an immutable -/// NSURLRequest for each load. This programming model is supported by -/// the following contract stipulation between NSMutableURLRequest and -/// NSURLConnection: NSURLConnection makes a deep copy of each -/// NSMutableURLRequest object passed to one of its initializers. -///

NSMutableURLRequest is designed to be extended to support -/// protocol-specific data by adding categories to access a property -/// object provided in an interface targeted at protocol implementors. -///

    -///
  • Protocol implementors should direct their attention to the -/// NSMutableURLRequestExtensibility category on -/// NSMutableURLRequest for more information on how to provide -/// extensions on NSMutableURLRequest to support protocol-specific -/// request information. -///
  • Clients of this API who wish to create NSMutableURLRequest -/// objects to load URL content should consult the protocol-specific -/// NSMutableURLRequest categories that are available. The -/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an -/// example. -///
-class NSMutableURLRequest extends NSURLRequest { - NSMutableURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int _POSIX_TRACE_LOG = -1; - /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. - static NSMutableURLRequest castFrom(T other) { - return NSMutableURLRequest._(other._id, other._lib, - retain: true, release: true); - } +const int _POSIX_TYPED_MEMORY_OBJECTS = -1; - /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. - static NSMutableURLRequest castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableURLRequest._(other, lib, retain: retain, release: release); - } +const int _POSIX2_C_BIND = 200112; - /// Returns whether [obj] is an instance of [NSMutableURLRequest]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableURLRequest1); - } +const int _POSIX2_C_DEV = 200112; - /// ! - /// @abstract The URL of the receiver. - @override - NSURL? get URL { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int _POSIX2_CHAR_TERM = 200112; - /// ! - /// @abstract The URL of the receiver. - set URL(NSURL? value) { - _lib._objc_msgSend_211(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); - } +const int _POSIX2_FORT_DEV = -1; - /// ! - /// @abstract The cache policy of the receiver. - @override - int get cachePolicy { - return _lib._objc_msgSend_208(_id, _lib._sel_cachePolicy1); - } +const int _POSIX2_FORT_RUN = 200112; - /// ! - /// @abstract The cache policy of the receiver. - set cachePolicy(int value) { - _lib._objc_msgSend_212(_id, _lib._sel_setCachePolicy_1, value); - } +const int _POSIX2_LOCALEDEF = 200112; - /// ! - /// @abstract Sets the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - @override - double get timeoutInterval { - return _lib._objc_msgSend_65(_id, _lib._sel_timeoutInterval1); - } +const int _POSIX2_PBS = -1; - /// ! - /// @abstract Sets the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - set timeoutInterval(double value) { - _lib._objc_msgSend_213(_id, _lib._sel_setTimeoutInterval_1, value); - } +const int _POSIX2_PBS_ACCOUNTING = -1; - /// ! - /// @abstract Sets the main document URL - /// @discussion The caller should pass the URL for an appropriate main - /// document, if known. For example, when loading a web page, the URL - /// of the main html document for the top-level frame should be - /// passed. This main document will be used to implement the cookie - /// "only from same domain as main document" policy, and possibly - /// other things in the future. - /// NOTE: In the current implementation, the passed-in value is unused by the - /// framework. A fully functional version of this method will be available - /// in the future. - @override - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int _POSIX2_PBS_CHECKPOINT = -1; - /// ! - /// @abstract Sets the main document URL - /// @discussion The caller should pass the URL for an appropriate main - /// document, if known. For example, when loading a web page, the URL - /// of the main html document for the top-level frame should be - /// passed. This main document will be used to implement the cookie - /// "only from same domain as main document" policy, and possibly - /// other things in the future. - /// NOTE: In the current implementation, the passed-in value is unused by the - /// framework. A fully functional version of this method will be available - /// in the future. - set mainDocumentURL(NSURL? value) { - _lib._objc_msgSend_211( - _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); - } +const int _POSIX2_PBS_LOCATE = -1; - /// ! - /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request - /// @discussion This method is used to provide the network layers with a hint as to the purpose - /// of the request. Most clients should not need to use this method. - @override - int get networkServiceType { - return _lib._objc_msgSend_209(_id, _lib._sel_networkServiceType1); - } +const int _POSIX2_PBS_MESSAGE = -1; - /// ! - /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request - /// @discussion This method is used to provide the network layers with a hint as to the purpose - /// of the request. Most clients should not need to use this method. - set networkServiceType(int value) { - _lib._objc_msgSend_214(_id, _lib._sel_setNetworkServiceType_1, value); - } +const int _POSIX2_PBS_TRACK = -1; + +const int _POSIX2_SW_DEV = 200112; + +const int _POSIX2_UPE = 200112; + +const int __ILP32_OFF32 = -1; + +const int __ILP32_OFFBIG = -1; + +const int __LP64_OFF64 = 1; - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @discussion NO if the receiver should not be allowed to use the built in - /// cellular radios to satisfy the request, YES otherwise. The default is YES. - @override - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } +const int __LPBIG_OFFBIG = 1; - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @discussion NO if the receiver should not be allowed to use the built in - /// cellular radios to satisfy the request, YES otherwise. The default is YES. - set allowsCellularAccess(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setAllowsCellularAccess_1, value); - } +const int _POSIX_V6_ILP32_OFF32 = -1; - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to - /// satify the request, YES otherwise. - @override - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } +const int _POSIX_V6_ILP32_OFFBIG = -1; - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to - /// satify the request, YES otherwise. - set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_215( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); - } +const int _POSIX_V6_LP64_OFF64 = 1; - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to - /// satify the request, YES otherwise. - @override - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } +const int _POSIX_V6_LPBIG_OFFBIG = 1; - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to - /// satify the request, YES otherwise. - set allowsConstrainedNetworkAccess(bool value) { - _lib._objc_msgSend_215( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); - } +const int _POSIX_V7_ILP32_OFF32 = -1; - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - @override - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); - } +const int _POSIX_V7_ILP32_OFFBIG = -1; - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - set assumesHTTP3Capable(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setAssumesHTTP3Capable_1, value); - } +const int _POSIX_V7_LP64_OFF64 = 1; - /// ! - /// @abstract Sets the HTTP request method of the receiver. - @override - NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_HTTPMethod1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int _POSIX_V7_LPBIG_OFFBIG = 1; - /// ! - /// @abstract Sets the HTTP request method of the receiver. - set HTTPMethod(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setHTTPMethod_1, value?._id ?? ffi.nullptr); - } +const int _V6_ILP32_OFF32 = -1; - /// ! - /// @abstract Sets the HTTP header fields of the receiver to the given - /// dictionary. - /// @discussion This method replaces all header fields that may have - /// existed before this method call. - ///

Since HTTP header fields must be string values, each object and - /// key in the dictionary passed to this method must answer YES when - /// sent an -isKindOfClass:[NSString class] message. If either - /// the key or value for a key-value pair answers NO when sent this - /// message, the key-value pair is skipped. - @override - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int _V6_ILP32_OFFBIG = -1; - /// ! - /// @abstract Sets the HTTP header fields of the receiver to the given - /// dictionary. - /// @discussion This method replaces all header fields that may have - /// existed before this method call. - ///

Since HTTP header fields must be string values, each object and - /// key in the dictionary passed to this method must answer YES when - /// sent an -isKindOfClass:[NSString class] message. If either - /// the key or value for a key-value pair answers NO when sent this - /// message, the key-value pair is skipped. - set allHTTPHeaderFields(NSDictionary? value) { - _lib._objc_msgSend_217( - _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); - } +const int _V6_LP64_OFF64 = 1; - /// ! - /// @method setValue:forHTTPHeaderField: - /// @abstract Sets the value of the given HTTP header field. - /// @discussion If a value was previously set for the given header - /// field, that value is replaced with the given value. Note that, in - /// keeping with the HTTP RFC, HTTP header field names are - /// case-insensitive. - /// @param value the header field value. - /// @param field the header field name (case-insensitive). - void setValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_218(_id, _lib._sel_setValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); - } +const int _V6_LPBIG_OFFBIG = 1; - /// ! - /// @method addValue:forHTTPHeaderField: - /// @abstract Adds an HTTP header field in the current header - /// dictionary. - /// @discussion This method provides a way to add values to header - /// fields incrementally. If a value was previously set for the given - /// header field, the given value is appended to the previously-existing - /// value. The appropriate field delimiter, a comma in the case of HTTP, - /// is added by the implementation, and should not be added to the given - /// value by the caller. Note that, in keeping with the HTTP RFC, HTTP - /// header field names are case-insensitive. - /// @param value the header field value. - /// @param field the header field name (case-insensitive). - void addValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_218(_id, _lib._sel_addValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); - } +const int _XBS5_ILP32_OFF32 = -1; - /// ! - /// @abstract Sets the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - @override - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } +const int _XBS5_ILP32_OFFBIG = -1; - /// ! - /// @abstract Sets the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - set HTTPBody(NSData? value) { - _lib._objc_msgSend_219( - _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); - } +const int _XBS5_LP64_OFF64 = 1; - /// ! - /// @abstract Sets the request body to be the contents of the given stream. - /// @discussion The provided stream should be unopened; the request will take - /// over the stream's delegate. The entire stream's contents will be - /// transmitted as the HTTP body of the request. Note that the body stream - /// and the body data (set by setHTTPBody:, above) are mutually exclusive - /// - setting one will clear the other. - @override - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_210(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } +const int _XBS5_LPBIG_OFFBIG = 1; - /// ! - /// @abstract Sets the request body to be the contents of the given stream. - /// @discussion The provided stream should be unopened; the request will take - /// over the stream's delegate. The entire stream's contents will be - /// transmitted as the HTTP body of the request. Note that the body stream - /// and the body data (set by setHTTPBody:, above) are mutually exclusive - /// - setting one will clear the other. - set HTTPBodyStream(NSInputStream? value) { - _lib._objc_msgSend_220( - _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); - } +const int _XOPEN_CRYPT = 1; - /// ! - /// @abstract Decide whether default cookie handling will happen for - /// this request (YES if cookies should be sent with and set for this request; - /// otherwise NO). - /// @discussion The default is YES - in other words, cookies are sent from and - /// stored to the cookie manager by default. - /// NOTE: In releases prior to 10.3, this value is ignored - @override - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); - } +const int _XOPEN_ENH_I18N = 1; - /// ! - /// @abstract Decide whether default cookie handling will happen for - /// this request (YES if cookies should be sent with and set for this request; - /// otherwise NO). - /// @discussion The default is YES - in other words, cookies are sent from and - /// stored to the cookie manager by default. - /// NOTE: In releases prior to 10.3, this value is ignored - set HTTPShouldHandleCookies(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); - } +const int _XOPEN_LEGACY = -1; - /// ! - /// @abstract Sets whether the request should not wait for the previous response - /// before transmitting (YES if the receiver should transmit before the previous response is - /// received. NO to wait for the previous response before transmitting) - /// @discussion Calling this method with a YES value does not guarantee HTTP - /// pipelining behavior. This method may have no effect if an HTTP proxy is - /// configured, or if the HTTP request uses an unsafe request method (e.g., POST - /// requests will not pipeline). Pipelining behavior also may not begin until - /// the second request on a given TCP connection. There may be other situations - /// where pipelining does not occur even though YES was set. - /// HTTP 1.1 allows the client to send multiple requests to the server without - /// waiting for a response. Though HTTP 1.1 requires support for pipelining, - /// some servers report themselves as being HTTP 1.1 but do not support - /// pipelining (disconnecting, sending resources misordered, omitting part of - /// a resource, etc.). - @override - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); - } +const int _XOPEN_REALTIME = -1; - /// ! - /// @abstract Sets whether the request should not wait for the previous response - /// before transmitting (YES if the receiver should transmit before the previous response is - /// received. NO to wait for the previous response before transmitting) - /// @discussion Calling this method with a YES value does not guarantee HTTP - /// pipelining behavior. This method may have no effect if an HTTP proxy is - /// configured, or if the HTTP request uses an unsafe request method (e.g., POST - /// requests will not pipeline). Pipelining behavior also may not begin until - /// the second request on a given TCP connection. There may be other situations - /// where pipelining does not occur even though YES was set. - /// HTTP 1.1 allows the client to send multiple requests to the server without - /// waiting for a response. Though HTTP 1.1 requires support for pipelining, - /// some servers report themselves as being HTTP 1.1 but do not support - /// pipelining (disconnecting, sending resources misordered, omitting part of - /// a resource, etc.). - set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); - } +const int _XOPEN_REALTIME_THREADS = -1; - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSMutableURLRequest requestWithURL_( - NativeCupertinoHttp _lib, NSURL? URL) { - final _ret = _lib._objc_msgSend_110(_lib._class_NSMutableURLRequest1, - _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); - } +const int _XOPEN_SHM = 1; - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_11( - _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); - } +const int _XOPEN_STREAMS = -1; - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NativeCupertinoHttp _lib, - NSURL? URL, - int cachePolicy, - double timeoutInterval) { - final _ret = _lib._objc_msgSend_207( - _lib._class_NSMutableURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); - } +const int _XOPEN_UNIX = 1; - static NSMutableURLRequest new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); - } +const int _SC_ARG_MAX = 1; - static NSMutableURLRequest alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); - } -} +const int _SC_CHILD_MAX = 2; -/// NSURLSession is a replacement API for NSURLConnection. It provides -/// options that affect the policy of, and various aspects of the -/// mechanism by which NSURLRequest objects are retrieved from the -/// network. -/// -/// An NSURLSession may be bound to a delegate object. The delegate is -/// invoked for certain events during the lifetime of a session, such as -/// server authentication or determining whether a resource to be loaded -/// should be converted into a download. -/// -/// NSURLSession instances are threadsafe. -/// -/// The default NSURLSession uses a system provided delegate and is -/// appropriate to use in place of existing code that uses -/// +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] -/// -/// An NSURLSession creates NSURLSessionTask objects which represent the -/// action of a resource being loaded. These are analogous to -/// NSURLConnection objects but provide for more control and a unified -/// delegate model. -/// -/// NSURLSessionTask objects are always created in a suspended state and -/// must be sent the -resume message before they will execute. -/// -/// Subclasses of NSURLSessionTask are used to syntactically -/// differentiate between data and file downloads. -/// -/// An NSURLSessionDataTask receives the resource as a series of calls to -/// the URLSession:dataTask:didReceiveData: delegate method. This is type of -/// task most commonly associated with retrieving objects for immediate parsing -/// by the consumer. -/// -/// An NSURLSessionUploadTask differs from an NSURLSessionDataTask -/// in how its instance is constructed. Upload tasks are explicitly created -/// by referencing a file or data object to upload, or by utilizing the -/// -URLSession:task:needNewBodyStream: delegate message to supply an upload -/// body. -/// -/// An NSURLSessionDownloadTask will directly write the response data to -/// a temporary file. When completed, the delegate is sent -/// URLSession:downloadTask:didFinishDownloadingToURL: and given an opportunity -/// to move this file to a permanent location in its sandboxed container, or to -/// otherwise read the file. If canceled, an NSURLSessionDownloadTask can -/// produce a data blob that can be used to resume a download at a later -/// time. -/// -/// Beginning with iOS 9 and Mac OS X 10.11, NSURLSessionStream is -/// available as a task type. This allows for direct TCP/IP connection -/// to a given host and port with optional secure handshaking and -/// navigation of proxies. Data tasks may also be upgraded to a -/// NSURLSessionStream task via the HTTP Upgrade: header and appropriate -/// use of the pipelining option of NSURLSessionConfiguration. See RFC -/// 2817 and RFC 6455 for information about the Upgrade: header, and -/// comments below on turning data tasks into stream tasks. -/// -/// An NSURLSessionWebSocketTask is a task that allows clients to connect to servers supporting -/// WebSocket. The task will perform the HTTP handshake to upgrade the connection -/// and once the WebSocket handshake is successful, the client can read and write -/// messages that will be framed using the WebSocket protocol by the framework. -class NSURLSession extends NSObject { - NSURLSession._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int _SC_CLK_TCK = 3; - /// Returns a [NSURLSession] that points to the same underlying object as [other]. - static NSURLSession castFrom(T other) { - return NSURLSession._(other._id, other._lib, retain: true, release: true); - } +const int _SC_NGROUPS_MAX = 4; - /// Returns a [NSURLSession] that wraps the given raw object pointer. - static NSURLSession castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSession._(other, lib, retain: retain, release: release); - } +const int _SC_OPEN_MAX = 5; - /// Returns whether [obj] is an instance of [NSURLSession]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLSession1); - } +const int _SC_JOB_CONTROL = 6; - /// The shared session uses the currently set global NSURLCache, - /// NSHTTPCookieStorage and NSURLCredentialStorage objects. - static NSURLSession? getSharedSession(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_221( - _lib._class_NSURLSession1, _lib._sel_sharedSession1); - return _ret.address == 0 - ? null - : NSURLSession._(_ret, _lib, retain: true, release: true); - } +const int _SC_SAVED_IDS = 7; - /// Customization of NSURLSession occurs during creation of a new session. - /// If you only need to use the convenience routines with custom - /// configuration options it is not necessary to specify a delegate. - /// If you do specify a delegate, the delegate will be retained until after - /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. - static NSURLSession sessionWithConfiguration_( - NativeCupertinoHttp _lib, NSURLSessionConfiguration? configuration) { - final _ret = _lib._objc_msgSend_268( - _lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_1, - configuration?._id ?? ffi.nullptr); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } +const int _SC_VERSION = 8; - static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( - NativeCupertinoHttp _lib, - NSURLSessionConfiguration? configuration, - NSObject? delegate, - NSOperationQueue? queue) { - final _ret = _lib._objc_msgSend_279( - _lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, - configuration?._id ?? ffi.nullptr, - delegate?._id ?? ffi.nullptr, - queue?._id ?? ffi.nullptr); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } +const int _SC_BC_BASE_MAX = 9; - NSOperationQueue? get delegateQueue { - final _ret = _lib._objc_msgSend_278(_id, _lib._sel_delegateQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); - } +const int _SC_BC_DIM_MAX = 10; - NSObject? get delegate { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } +const int _SC_BC_SCALE_MAX = 11; - NSURLSessionConfiguration? get configuration { - final _ret = _lib._objc_msgSend_222(_id, _lib._sel_configuration1); - return _ret.address == 0 - ? null - : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +const int _SC_BC_STRING_MAX = 12; - /// The sessionDescription property is available for the developer to - /// provide a descriptive label for the session. - NSString? get sessionDescription { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_sessionDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int _SC_COLL_WEIGHTS_MAX = 13; - /// The sessionDescription property is available for the developer to - /// provide a descriptive label for the session. - set sessionDescription(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); - } +const int _SC_EXPR_NEST_MAX = 14; - /// -finishTasksAndInvalidate returns immediately and existing tasks will be allowed - /// to run to completion. New tasks may not be created. The session - /// will continue to make delegate callbacks until URLSession:didBecomeInvalidWithError: - /// has been issued. - /// - /// -finishTasksAndInvalidate and -invalidateAndCancel do not - /// have any effect on the shared session singleton. - /// - /// When invalidating a background session, it is not safe to create another background - /// session with the same identifier until URLSession:didBecomeInvalidWithError: has - /// been issued. - void finishTasksAndInvalidate() { - return _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); - } +const int _SC_LINE_MAX = 15; - /// -invalidateAndCancel acts as -finishTasksAndInvalidate, but issues - /// -cancel to all outstanding tasks for this session. Note task - /// cancellation is subject to the state of the task, and some tasks may - /// have already have completed at the time they are sent -cancel. - void invalidateAndCancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); - } +const int _SC_RE_DUP_MAX = 16; - /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue if not nil. - void resetWithCompletionHandler_(ObjCBlock7 completionHandler) { - return _lib._objc_msgSend_275( - _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._impl); - } +const int _SC_2_VERSION = 17; - /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue if not nil. - void flushWithCompletionHandler_(ObjCBlock7 completionHandler) { - return _lib._objc_msgSend_275( - _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._impl); - } +const int _SC_2_C_BIND = 18; - /// invokes completionHandler with outstanding data, upload and download tasks. - void getTasksWithCompletionHandler_(ObjCBlock10 completionHandler) { - return _lib._objc_msgSend_280(_id, - _lib._sel_getTasksWithCompletionHandler_1, completionHandler._impl); - } +const int _SC_2_C_DEV = 19; - /// invokes completionHandler with all outstanding tasks. - void getAllTasksWithCompletionHandler_(ObjCBlock9 completionHandler) { - return _lib._objc_msgSend_281(_id, - _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._impl); - } +const int _SC_2_CHAR_TERM = 20; - /// Creates a data task with the given request. The request may have a body stream. - NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_282( - _id, _lib._sel_dataTaskWithRequest_1, request?._id ?? ffi.nullptr); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_2_FORT_DEV = 21; - /// Creates a data task to retrieve the contents of the given URL. - NSURLSessionDataTask dataTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_283( - _id, _lib._sel_dataTaskWithURL_1, url?._id ?? ffi.nullptr); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_2_FORT_RUN = 22; - /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( - NSURLRequest? request, NSURL? fileURL) { - final _ret = _lib._objc_msgSend_284( - _id, - _lib._sel_uploadTaskWithRequest_fromFile_1, - request?._id ?? ffi.nullptr, - fileURL?._id ?? ffi.nullptr); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_2_LOCALEDEF = 23; - /// Creates an upload task with the given request. The body of the request is provided from the bodyData. - NSURLSessionUploadTask uploadTaskWithRequest_fromData_( - NSURLRequest? request, NSData? bodyData) { - final _ret = _lib._objc_msgSend_285( - _id, - _lib._sel_uploadTaskWithRequest_fromData_1, - request?._id ?? ffi.nullptr, - bodyData?._id ?? ffi.nullptr); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_2_SW_DEV = 24; - /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. - NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_286(_id, - _lib._sel_uploadTaskWithStreamedRequest_1, request?._id ?? ffi.nullptr); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_2_UPE = 25; - /// Creates a download task with the given request. - NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_288( - _id, _lib._sel_downloadTaskWithRequest_1, request?._id ?? ffi.nullptr); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_STREAM_MAX = 26; - /// Creates a download task to download the contents of the given URL. - NSURLSessionDownloadTask downloadTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_289( - _id, _lib._sel_downloadTaskWithURL_1, url?._id ?? ffi.nullptr); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_TZNAME_MAX = 27; - /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. - NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData? resumeData) { - final _ret = _lib._objc_msgSend_290(_id, - _lib._sel_downloadTaskWithResumeData_1, resumeData?._id ?? ffi.nullptr); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_ASYNCHRONOUS_IO = 28; + +const int _SC_PAGESIZE = 29; + +const int _SC_MEMLOCK = 30; + +const int _SC_MEMLOCK_RANGE = 31; + +const int _SC_MEMORY_PROTECTION = 32; - /// Creates a bidirectional stream task to a given host and port. - NSURLSessionStreamTask streamTaskWithHostName_port_( - NSString? hostname, int port) { - final _ret = _lib._objc_msgSend_293( - _id, - _lib._sel_streamTaskWithHostName_port_1, - hostname?._id ?? ffi.nullptr, - port); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_MESSAGE_PASSING = 33; - /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. - /// The NSNetService will be resolved before any IO completes. - NSURLSessionStreamTask streamTaskWithNetService_(NSNetService? service) { - final _ret = _lib._objc_msgSend_294( - _id, _lib._sel_streamTaskWithNetService_1, service?._id ?? ffi.nullptr); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_PRIORITIZED_IO = 34; - /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. - NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_301( - _id, _lib._sel_webSocketTaskWithURL_1, url?._id ?? ffi.nullptr); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_PRIORITY_SCHEDULING = 35; - /// Creates a WebSocket task given the url and an array of protocols. The protocols will be used in the WebSocket handshake to - /// negotiate a prefered protocol with the server - /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC - NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( - NSURL? url, NSArray? protocols) { - final _ret = _lib._objc_msgSend_302( - _id, - _lib._sel_webSocketTaskWithURL_protocols_1, - url?._id ?? ffi.nullptr, - protocols?._id ?? ffi.nullptr); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_REALTIME_SIGNALS = 36; - /// Creates a WebSocket task given the request. The request properties can be modified and will be used by the task during the HTTP handshake phase. - /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol - /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. - NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_303( - _id, _lib._sel_webSocketTaskWithRequest_1, request?._id ?? ffi.nullptr); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_SEMAPHORES = 37; - @override - NSURLSession init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } +const int _SC_FSYNC = 38; - static NSURLSession new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_new1); - return NSURLSession._(_ret, _lib, retain: false, release: true); - } +const int _SC_SHARED_MEMORY_OBJECTS = 39; - /// data task convenience methods. These methods create tasks that - /// bypass the normal delegate calls for response and data delivery, - /// and provide a simple cancelable asynchronous interface to receiving - /// data. Errors will be returned in the NSURLErrorDomain, - /// see . The delegate, if any, will still be - /// called for authentication challenges. - NSURLSessionDataTask dataTaskWithRequest_completionHandler_( - NSURLRequest? request, ObjCBlock15 completionHandler) { - final _ret = _lib._objc_msgSend_304( - _id, - _lib._sel_dataTaskWithRequest_completionHandler_1, - request?._id ?? ffi.nullptr, - completionHandler._impl); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_SYNCHRONIZED_IO = 40; - NSURLSessionDataTask dataTaskWithURL_completionHandler_( - NSURL? url, ObjCBlock15 completionHandler) { - final _ret = _lib._objc_msgSend_305( - _id, - _lib._sel_dataTaskWithURL_completionHandler_1, - url?._id ?? ffi.nullptr, - completionHandler._impl); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_TIMERS = 41; - /// upload convenience method. - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( - NSURLRequest? request, NSURL? fileURL, ObjCBlock15 completionHandler) { - final _ret = _lib._objc_msgSend_306( - _id, - _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, - request?._id ?? ffi.nullptr, - fileURL?._id ?? ffi.nullptr, - completionHandler._impl); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_AIO_LISTIO_MAX = 42; - NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( - NSURLRequest? request, NSData? bodyData, ObjCBlock15 completionHandler) { - final _ret = _lib._objc_msgSend_307( - _id, - _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, - request?._id ?? ffi.nullptr, - bodyData?._id ?? ffi.nullptr, - completionHandler._impl); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_AIO_MAX = 43; - /// download task convenience methods. When a download successfully - /// completes, the NSURL will point to a file that must be read or - /// copied during the invocation of the completion routine. The file - /// will be removed automatically. - NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( - NSURLRequest? request, ObjCBlock16 completionHandler) { - final _ret = _lib._objc_msgSend_308( - _id, - _lib._sel_downloadTaskWithRequest_completionHandler_1, - request?._id ?? ffi.nullptr, - completionHandler._impl); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_AIO_PRIO_DELTA_MAX = 44; - NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( - NSURL? url, ObjCBlock16 completionHandler) { - final _ret = _lib._objc_msgSend_309( - _id, - _lib._sel_downloadTaskWithURL_completionHandler_1, - url?._id ?? ffi.nullptr, - completionHandler._impl); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_DELAYTIMER_MAX = 45; - NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( - NSData? resumeData, ObjCBlock16 completionHandler) { - final _ret = _lib._objc_msgSend_310( - _id, - _lib._sel_downloadTaskWithResumeData_completionHandler_1, - resumeData?._id ?? ffi.nullptr, - completionHandler._impl); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +const int _SC_MQ_OPEN_MAX = 46; - static NSURLSession alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_alloc1); - return NSURLSession._(_ret, _lib, retain: false, release: true); - } -} +const int _SC_MAPPED_FILES = 47; -/// Configuration options for an NSURLSession. When a session is -/// created, a copy of the configuration object is made - you cannot -/// modify the configuration of a session after it has been created. -/// -/// The shared session uses the global singleton credential, cache -/// and cookie storage objects. -/// -/// An ephemeral session has no persistent disk storage for cookies, -/// cache or credentials. -/// -/// A background session can be used to perform networking operations -/// on behalf of a suspended application, within certain constraints. -class NSURLSessionConfiguration extends NSObject { - NSURLSessionConfiguration._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int _SC_RTSIG_MAX = 48; - /// Returns a [NSURLSessionConfiguration] that points to the same underlying object as [other]. - static NSURLSessionConfiguration castFrom(T other) { - return NSURLSessionConfiguration._(other._id, other._lib, - retain: true, release: true); - } +const int _SC_SEM_NSEMS_MAX = 49; - /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. - static NSURLSessionConfiguration castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionConfiguration._(other, lib, - retain: retain, release: release); - } +const int _SC_SEM_VALUE_MAX = 50; - /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionConfiguration1); - } +const int _SC_SIGQUEUE_MAX = 51; - static NSURLSessionConfiguration? getDefaultSessionConfiguration( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_222(_lib._class_NSURLSessionConfiguration1, - _lib._sel_defaultSessionConfiguration1); - return _ret.address == 0 - ? null - : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +const int _SC_TIMER_MAX = 52; - static NSURLSessionConfiguration? getEphemeralSessionConfiguration( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_222(_lib._class_NSURLSessionConfiguration1, - _lib._sel_ephemeralSessionConfiguration1); - return _ret.address == 0 - ? null - : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +const int _SC_NPROCESSORS_CONF = 57; - static NSURLSessionConfiguration - backgroundSessionConfigurationWithIdentifier_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_223( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfigurationWithIdentifier_1, - identifier?._id ?? ffi.nullptr); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +const int _SC_NPROCESSORS_ONLN = 58; - /// identifier for the background session configuration - NSString? get identifier { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_identifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int _SC_2_PBS = 59; - /// default cache policy for requests - int get requestCachePolicy { - return _lib._objc_msgSend_208(_id, _lib._sel_requestCachePolicy1); - } +const int _SC_2_PBS_ACCOUNTING = 60; - /// default cache policy for requests - set requestCachePolicy(int value) { - _lib._objc_msgSend_212(_id, _lib._sel_setRequestCachePolicy_1, value); - } +const int _SC_2_PBS_CHECKPOINT = 61; - /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. - double get timeoutIntervalForRequest { - return _lib._objc_msgSend_65(_id, _lib._sel_timeoutIntervalForRequest1); - } +const int _SC_2_PBS_LOCATE = 62; - /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. - set timeoutIntervalForRequest(double value) { - _lib._objc_msgSend_213( - _id, _lib._sel_setTimeoutIntervalForRequest_1, value); - } +const int _SC_2_PBS_MESSAGE = 63; - /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. - double get timeoutIntervalForResource { - return _lib._objc_msgSend_65(_id, _lib._sel_timeoutIntervalForResource1); - } +const int _SC_2_PBS_TRACK = 64; - /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. - set timeoutIntervalForResource(double value) { - _lib._objc_msgSend_213( - _id, _lib._sel_setTimeoutIntervalForResource_1, value); - } +const int _SC_ADVISORY_INFO = 65; - /// type of service for requests. - int get networkServiceType { - return _lib._objc_msgSend_209(_id, _lib._sel_networkServiceType1); - } +const int _SC_BARRIERS = 66; - /// type of service for requests. - set networkServiceType(int value) { - _lib._objc_msgSend_214(_id, _lib._sel_setNetworkServiceType_1, value); - } +const int _SC_CLOCK_SELECTION = 67; - /// allow request to route over cellular. - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } +const int _SC_CPUTIME = 68; - /// allow request to route over cellular. - set allowsCellularAccess(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setAllowsCellularAccess_1, value); - } +const int _SC_FILE_LOCKING = 69; - /// allow request to route over expensive networks. Defaults to YES. - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } +const int _SC_GETGR_R_SIZE_MAX = 70; - /// allow request to route over expensive networks. Defaults to YES. - set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_215( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); - } +const int _SC_GETPW_R_SIZE_MAX = 71; - /// allow request to route over networks in constrained mode. Defaults to YES. - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } +const int _SC_HOST_NAME_MAX = 72; - /// allow request to route over networks in constrained mode. Defaults to YES. - set allowsConstrainedNetworkAccess(bool value) { - _lib._objc_msgSend_215( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); - } +const int _SC_LOGIN_NAME_MAX = 73; - /// Causes tasks to wait for network connectivity to become available, rather - /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) - /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest - /// property does not apply, but the timeoutIntervalForResource property does. - /// - /// Unsatisfactory connectivity (that requires waiting) includes cases where the - /// device has limited or insufficient connectivity for a task (e.g., only has a - /// cellular connection but the allowsCellularAccess property is NO, or requires - /// a VPN connection in order to reach the desired host). - /// - /// Default value is NO. Ignored by background sessions, as background sessions - /// always wait for connectivity. - bool get waitsForConnectivity { - return _lib._objc_msgSend_11(_id, _lib._sel_waitsForConnectivity1); - } +const int _SC_MONOTONIC_CLOCK = 74; - /// Causes tasks to wait for network connectivity to become available, rather - /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) - /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest - /// property does not apply, but the timeoutIntervalForResource property does. - /// - /// Unsatisfactory connectivity (that requires waiting) includes cases where the - /// device has limited or insufficient connectivity for a task (e.g., only has a - /// cellular connection but the allowsCellularAccess property is NO, or requires - /// a VPN connection in order to reach the desired host). - /// - /// Default value is NO. Ignored by background sessions, as background sessions - /// always wait for connectivity. - set waitsForConnectivity(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setWaitsForConnectivity_1, value); - } +const int _SC_MQ_PRIO_MAX = 75; - /// allows background tasks to be scheduled at the discretion of the system for optimal performance. - bool get discretionary { - return _lib._objc_msgSend_11(_id, _lib._sel_isDiscretionary1); - } +const int _SC_READER_WRITER_LOCKS = 76; - /// allows background tasks to be scheduled at the discretion of the system for optimal performance. - set discretionary(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setDiscretionary_1, value); - } +const int _SC_REGEXP = 77; - /// The identifier of the shared data container into which files in background sessions should be downloaded. - /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or - /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. - NSString? get sharedContainerIdentifier { - final _ret = - _lib._objc_msgSend_19(_id, _lib._sel_sharedContainerIdentifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int _SC_SHELL = 78; - /// The identifier of the shared data container into which files in background sessions should be downloaded. - /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or - /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. - set sharedContainerIdentifier(NSString? value) { - _lib._objc_msgSend_216(_id, _lib._sel_setSharedContainerIdentifier_1, - value?._id ?? ffi.nullptr); - } +const int _SC_SPAWN = 79; - /// Allows the app to be resumed or launched in the background when tasks in background sessions complete - /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: - /// and the default value is YES. - /// - /// NOTE: macOS apps based on AppKit do not support background launch. - bool get sessionSendsLaunchEvents { - return _lib._objc_msgSend_11(_id, _lib._sel_sessionSendsLaunchEvents1); - } +const int _SC_SPIN_LOCKS = 80; - /// Allows the app to be resumed or launched in the background when tasks in background sessions complete - /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: - /// and the default value is YES. - /// - /// NOTE: macOS apps based on AppKit do not support background launch. - set sessionSendsLaunchEvents(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); - } +const int _SC_SPORADIC_SERVER = 81; - /// The proxy dictionary, as described by - NSDictionary? get connectionProxyDictionary { - final _ret = - _lib._objc_msgSend_89(_id, _lib._sel_connectionProxyDictionary1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int _SC_THREAD_ATTR_STACKADDR = 82; - /// The proxy dictionary, as described by - set connectionProxyDictionary(NSDictionary? value) { - _lib._objc_msgSend_217(_id, _lib._sel_setConnectionProxyDictionary_1, - value?._id ?? ffi.nullptr); - } +const int _SC_THREAD_ATTR_STACKSIZE = 83; - /// The minimum allowable versions of the TLS protocol, from - int get TLSMinimumSupportedProtocol { - return _lib._objc_msgSend_224(_id, _lib._sel_TLSMinimumSupportedProtocol1); - } +const int _SC_THREAD_CPUTIME = 84; - /// The minimum allowable versions of the TLS protocol, from - set TLSMinimumSupportedProtocol(int value) { - _lib._objc_msgSend_225( - _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); - } +const int _SC_THREAD_DESTRUCTOR_ITERATIONS = 85; - /// The maximum allowable versions of the TLS protocol, from - int get TLSMaximumSupportedProtocol { - return _lib._objc_msgSend_224(_id, _lib._sel_TLSMaximumSupportedProtocol1); - } +const int _SC_THREAD_KEYS_MAX = 86; - /// The maximum allowable versions of the TLS protocol, from - set TLSMaximumSupportedProtocol(int value) { - _lib._objc_msgSend_225( - _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); - } +const int _SC_THREAD_PRIO_INHERIT = 87; - /// The minimum allowable versions of the TLS protocol, from - int get TLSMinimumSupportedProtocolVersion { - return _lib._objc_msgSend_226( - _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); - } +const int _SC_THREAD_PRIO_PROTECT = 88; - /// The minimum allowable versions of the TLS protocol, from - set TLSMinimumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_227( - _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); - } +const int _SC_THREAD_PRIORITY_SCHEDULING = 89; - /// The maximum allowable versions of the TLS protocol, from - int get TLSMaximumSupportedProtocolVersion { - return _lib._objc_msgSend_226( - _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); - } +const int _SC_THREAD_PROCESS_SHARED = 90; - /// The maximum allowable versions of the TLS protocol, from - set TLSMaximumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_227( - _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); - } +const int _SC_THREAD_SAFE_FUNCTIONS = 91; - /// Allow the use of HTTP pipelining - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); - } +const int _SC_THREAD_SPORADIC_SERVER = 92; - /// Allow the use of HTTP pipelining - set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); - } +const int _SC_THREAD_STACK_MIN = 93; - /// Allow the session to set cookies on requests - bool get HTTPShouldSetCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldSetCookies1); - } +const int _SC_THREAD_THREADS_MAX = 94; - /// Allow the session to set cookies on requests - set HTTPShouldSetCookies(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setHTTPShouldSetCookies_1, value); - } +const int _SC_TIMEOUTS = 95; - /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. - int get HTTPCookieAcceptPolicy { - return _lib._objc_msgSend_228(_id, _lib._sel_HTTPCookieAcceptPolicy1); - } +const int _SC_THREADS = 96; - /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. - set HTTPCookieAcceptPolicy(int value) { - _lib._objc_msgSend_229(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); - } +const int _SC_TRACE = 97; - /// Specifies additional headers which will be set on outgoing requests. - /// Note that these headers are added to the request only if not already present. - NSDictionary? get HTTPAdditionalHeaders { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_HTTPAdditionalHeaders1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int _SC_TRACE_EVENT_FILTER = 98; - /// Specifies additional headers which will be set on outgoing requests. - /// Note that these headers are added to the request only if not already present. - set HTTPAdditionalHeaders(NSDictionary? value) { - _lib._objc_msgSend_217( - _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); - } +const int _SC_TRACE_INHERIT = 99; - /// The maximum number of simultanous persistent connections per host - int get HTTPMaximumConnectionsPerHost { - return _lib._objc_msgSend_61(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); - } +const int _SC_TRACE_LOG = 100; - /// The maximum number of simultanous persistent connections per host - set HTTPMaximumConnectionsPerHost(int value) { - _lib._objc_msgSend_230( - _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); - } +const int _SC_TTY_NAME_MAX = 101; - /// The cookie storage object to use, or nil to indicate that no cookies should be handled - NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _lib._objc_msgSend_231(_id, _lib._sel_HTTPCookieStorage1); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } +const int _SC_TYPED_MEMORY_OBJECTS = 102; - /// The cookie storage object to use, or nil to indicate that no cookies should be handled - set HTTPCookieStorage(NSHTTPCookieStorage? value) { - _lib._objc_msgSend_260( - _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); - } +const int _SC_V6_ILP32_OFF32 = 103; - /// The credential storage object, or nil to indicate that no credential storage is to be used - NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _lib._objc_msgSend_261(_id, _lib._sel_URLCredentialStorage1); - return _ret.address == 0 - ? null - : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); - } +const int _SC_V6_ILP32_OFFBIG = 104; - /// The credential storage object, or nil to indicate that no credential storage is to be used - set URLCredentialStorage(NSURLCredentialStorage? value) { - _lib._objc_msgSend_262( - _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); - } +const int _SC_V6_LP64_OFF64 = 105; - /// The URL resource cache, or nil to indicate that no caching is to be performed - NSURLCache? get URLCache { - final _ret = _lib._objc_msgSend_263(_id, _lib._sel_URLCache1); - return _ret.address == 0 - ? null - : NSURLCache._(_ret, _lib, retain: true, release: true); - } +const int _SC_V6_LPBIG_OFFBIG = 106; - /// The URL resource cache, or nil to indicate that no caching is to be performed - set URLCache(NSURLCache? value) { - _lib._objc_msgSend_264( - _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); - } +const int _SC_IPV6 = 118; - /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open - /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) - bool get shouldUseExtendedBackgroundIdleMode { - return _lib._objc_msgSend_11( - _id, _lib._sel_shouldUseExtendedBackgroundIdleMode1); - } +const int _SC_RAW_SOCKETS = 119; - /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open - /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) - set shouldUseExtendedBackgroundIdleMode(bool value) { - _lib._objc_msgSend_215( - _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); - } +const int _SC_SYMLOOP_MAX = 120; - /// An optional array of Class objects which subclass NSURLProtocol. - /// The Class will be sent +canInitWithRequest: when determining if - /// an instance of the class can be used for a given URL scheme. - /// You should not use +[NSURLProtocol registerClass:], as that - /// method will register your class with the default session rather - /// than with an instance of NSURLSession. - /// Custom NSURLProtocol subclasses are not available to background - /// sessions. - NSArray? get protocolClasses { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_protocolClasses1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int _SC_ATEXIT_MAX = 107; - /// An optional array of Class objects which subclass NSURLProtocol. - /// The Class will be sent +canInitWithRequest: when determining if - /// an instance of the class can be used for a given URL scheme. - /// You should not use +[NSURLProtocol registerClass:], as that - /// method will register your class with the default session rather - /// than with an instance of NSURLSession. - /// Custom NSURLProtocol subclasses are not available to background - /// sessions. - set protocolClasses(NSArray? value) { - _lib._objc_msgSend_265( - _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); - } +const int _SC_IOV_MAX = 56; - /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone - int get multipathServiceType { - return _lib._objc_msgSend_266(_id, _lib._sel_multipathServiceType1); - } +const int _SC_PAGE_SIZE = 29; - /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone - set multipathServiceType(int value) { - _lib._objc_msgSend_267(_id, _lib._sel_setMultipathServiceType_1, value); - } +const int _SC_XOPEN_CRYPT = 108; - @override - NSURLSessionConfiguration init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +const int _SC_XOPEN_ENH_I18N = 109; - static NSURLSessionConfiguration new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionConfiguration1, _lib._sel_new1); - return NSURLSessionConfiguration._(_ret, _lib, - retain: false, release: true); - } +const int _SC_XOPEN_LEGACY = 110; - static NSURLSessionConfiguration backgroundSessionConfiguration_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_223( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfiguration_1, - identifier?._id ?? ffi.nullptr); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +const int _SC_XOPEN_REALTIME = 111; - static NSURLSessionConfiguration alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); - return NSURLSessionConfiguration._(_ret, _lib, - retain: false, release: true); - } -} +const int _SC_XOPEN_REALTIME_THREADS = 112; -abstract class SSLProtocol { - static const int kSSLProtocolUnknown = 0; - static const int kTLSProtocol1 = 4; - static const int kTLSProtocol11 = 7; - static const int kTLSProtocol12 = 8; - static const int kDTLSProtocol1 = 9; - static const int kTLSProtocol13 = 10; - static const int kDTLSProtocol12 = 11; - static const int kTLSProtocolMaxSupported = 999; - static const int kSSLProtocol2 = 1; - static const int kSSLProtocol3 = 2; - static const int kSSLProtocol3Only = 3; - static const int kTLSProtocol1Only = 5; - static const int kSSLProtocolAll = 6; -} +const int _SC_XOPEN_SHM = 113; -abstract class tls_protocol_version_t { - static const int tls_protocol_version_TLSv10 = 769; - static const int tls_protocol_version_TLSv11 = 770; - static const int tls_protocol_version_TLSv12 = 771; - static const int tls_protocol_version_TLSv13 = 772; - static const int tls_protocol_version_DTLSv10 = -257; - static const int tls_protocol_version_DTLSv12 = -259; -} +const int _SC_XOPEN_STREAMS = 114; -abstract class NSHTTPCookieAcceptPolicy { - static const int NSHTTPCookieAcceptPolicyAlways = 0; - static const int NSHTTPCookieAcceptPolicyNever = 1; - static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; -} +const int _SC_XOPEN_UNIX = 115; -class NSHTTPCookieStorage extends NSObject { - NSHTTPCookieStorage._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int _SC_XOPEN_VERSION = 116; - /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. - static NSHTTPCookieStorage castFrom(T other) { - return NSHTTPCookieStorage._(other._id, other._lib, - retain: true, release: true); - } +const int _SC_XOPEN_XCU_VERSION = 121; - /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. - static NSHTTPCookieStorage castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); - } +const int _SC_XBS5_ILP32_OFF32 = 122; - /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSHTTPCookieStorage1); - } +const int _SC_XBS5_ILP32_OFFBIG = 123; - static NSHTTPCookieStorage? getSharedHTTPCookieStorage( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_231( - _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } +const int _SC_XBS5_LP64_OFF64 = 124; - static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_232( - _lib._class_NSHTTPCookieStorage1, - _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, - identifier?._id ?? ffi.nullptr); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } +const int _SC_XBS5_LPBIG_OFFBIG = 125; - NSArray? get cookies { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_cookies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int _SC_SS_REPL_MAX = 126; - void setCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_233( - _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); - } +const int _SC_TRACE_EVENT_NAME_MAX = 127; - void deleteCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_233( - _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); - } +const int _SC_TRACE_NAME_MAX = 128; - void removeCookiesSinceDate_(NSDate? date) { - return _lib._objc_msgSend_235( - _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); - } +const int _SC_TRACE_SYS_MAX = 129; - NSArray cookiesForURL_(NSURL? URL) { - final _ret = _lib._objc_msgSend_158( - _id, _lib._sel_cookiesForURL_1, URL?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int _SC_TRACE_USER_EVENT_MAX = 130; - void setCookies_forURL_mainDocumentURL_( - NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { - return _lib._objc_msgSend_236( - _id, - _lib._sel_setCookies_forURL_mainDocumentURL_1, - cookies?._id ?? ffi.nullptr, - URL?._id ?? ffi.nullptr, - mainDocumentURL?._id ?? ffi.nullptr); - } +const int _SC_PASS_MAX = 131; - int get cookieAcceptPolicy { - return _lib._objc_msgSend_228(_id, _lib._sel_cookieAcceptPolicy1); - } +const int _SC_PHYS_PAGES = 200; - set cookieAcceptPolicy(int value) { - _lib._objc_msgSend_229(_id, _lib._sel_setCookieAcceptPolicy_1, value); - } +const int _CS_POSIX_V6_ILP32_OFF32_CFLAGS = 2; - NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { - final _ret = _lib._objc_msgSend_148( - _id, - _lib._sel_sortedCookiesUsingDescriptors_1, - sortOrder?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +const int _CS_POSIX_V6_ILP32_OFF32_LDFLAGS = 3; - void storeCookies_forTask_(NSArray? cookies, NSURLSessionTask? task) { - return _lib._objc_msgSend_258(_id, _lib._sel_storeCookies_forTask_1, - cookies?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); - } +const int _CS_POSIX_V6_ILP32_OFF32_LIBS = 4; - void getCookiesForTask_completionHandler_( - NSURLSessionTask? task, ObjCBlock9 completionHandler) { - return _lib._objc_msgSend_259( - _id, - _lib._sel_getCookiesForTask_completionHandler_1, - task?._id ?? ffi.nullptr, - completionHandler._impl); - } +const int _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS = 5; - static NSHTTPCookieStorage new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); - } +const int _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS = 6; - static NSHTTPCookieStorage alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); - } -} +const int _CS_POSIX_V6_ILP32_OFFBIG_LIBS = 7; -class NSHTTPCookie extends _ObjCWrapper { - NSHTTPCookie._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int _CS_POSIX_V6_LP64_OFF64_CFLAGS = 8; - /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. - static NSHTTPCookie castFrom(T other) { - return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); - } +const int _CS_POSIX_V6_LP64_OFF64_LDFLAGS = 9; - /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. - static NSHTTPCookie castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookie._(other, lib, retain: retain, release: release); - } +const int _CS_POSIX_V6_LP64_OFF64_LIBS = 10; - /// Returns whether [obj] is an instance of [NSHTTPCookie]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); - } -} +const int _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS = 11; -class NSDate extends NSObject { - NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS = 12; - /// Returns a [NSDate] that points to the same underlying object as [other]. - static NSDate castFrom(T other) { - return NSDate._(other._id, other._lib, retain: true, release: true); - } +const int _CS_POSIX_V6_LPBIG_OFFBIG_LIBS = 13; - /// Returns a [NSDate] that wraps the given raw object pointer. - static NSDate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDate._(other, lib, retain: retain, release: release); - } +const int _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS = 14; - /// Returns whether [obj] is an instance of [NSDate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); - } +const int _CS_XBS5_ILP32_OFF32_CFLAGS = 20; - double get timeIntervalSinceReferenceDate { - return _lib._objc_msgSend_65( - _id, _lib._sel_timeIntervalSinceReferenceDate1); - } +const int _CS_XBS5_ILP32_OFF32_LDFLAGS = 21; - @override - NSDate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDate._(_ret, _lib, retain: true, release: true); - } +const int _CS_XBS5_ILP32_OFF32_LIBS = 22; - NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _lib._objc_msgSend_234( - _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } +const int _CS_XBS5_ILP32_OFF32_LINTFLAGS = 23; - NSDate initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); - } +const int _CS_XBS5_ILP32_OFFBIG_CFLAGS = 24; - static NSDate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); - return NSDate._(_ret, _lib, retain: false, release: true); - } +const int _CS_XBS5_ILP32_OFFBIG_LDFLAGS = 25; - static NSDate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); - return NSDate._(_ret, _lib, retain: false, release: true); - } -} +const int _CS_XBS5_ILP32_OFFBIG_LIBS = 26; -/// NSURLSessionTask - a cancelable object that refers to the lifetime -/// of processing a given request. -class NSURLSessionTask extends NSObject { - NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int _CS_XBS5_ILP32_OFFBIG_LINTFLAGS = 27; - /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. - static NSURLSessionTask castFrom(T other) { - return NSURLSessionTask._(other._id, other._lib, - retain: true, release: true); - } +const int _CS_XBS5_LP64_OFF64_CFLAGS = 28; - /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. - static NSURLSessionTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTask._(other, lib, retain: retain, release: release); - } +const int _CS_XBS5_LP64_OFF64_LDFLAGS = 29; - /// Returns whether [obj] is an instance of [NSURLSessionTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTask1); - } +const int _CS_XBS5_LP64_OFF64_LIBS = 30; - /// an identifier for this task, assigned by and unique to the owning session - int get taskIdentifier { - return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); - } +const int _CS_XBS5_LP64_OFF64_LINTFLAGS = 31; - /// may be nil if this is a stream task - NSURLRequest? get originalRequest { - final _ret = _lib._objc_msgSend_237(_id, _lib._sel_originalRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } +const int _CS_XBS5_LPBIG_OFFBIG_CFLAGS = 32; - /// may differ from originalRequest due to http server redirection - NSURLRequest? get currentRequest { - final _ret = _lib._objc_msgSend_237(_id, _lib._sel_currentRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } +const int _CS_XBS5_LPBIG_OFFBIG_LDFLAGS = 33; - /// may be nil if no response has been received - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_239(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); - } +const int _CS_XBS5_LPBIG_OFFBIG_LIBS = 34; - /// NSProgress object which represents the task progress. - /// It can be used for task progress tracking. - NSProgress? get progress { - final _ret = _lib._objc_msgSend_240(_id, _lib._sel_progress1); - return _ret.address == 0 - ? null - : NSProgress._(_ret, _lib, retain: true, release: true); - } +const int _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS = 35; - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - NSDate? get earliestBeginDate { - final _ret = _lib._objc_msgSend_253(_id, _lib._sel_earliestBeginDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +const int _CS_DARWIN_USER_DIR = 65536; - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - set earliestBeginDate(NSDate? value) { - _lib._objc_msgSend_254( - _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); - } +const int _CS_DARWIN_USER_TEMP_DIR = 65537; - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - int get countOfBytesClientExpectsToSend { - return _lib._objc_msgSend_247( - _id, _lib._sel_countOfBytesClientExpectsToSend1); - } +const int _CS_DARWIN_USER_CACHE_DIR = 65538; - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - set countOfBytesClientExpectsToSend(int value) { - _lib._objc_msgSend_248( - _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); - } +const int F_ULOCK = 0; - int get countOfBytesClientExpectsToReceive { - return _lib._objc_msgSend_247( - _id, _lib._sel_countOfBytesClientExpectsToReceive1); - } +const int F_LOCK = 1; - set countOfBytesClientExpectsToReceive(int value) { - _lib._objc_msgSend_248( - _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); - } +const int F_TLOCK = 2; - /// number of body bytes already received - int get countOfBytesReceived { - return _lib._objc_msgSend_247(_id, _lib._sel_countOfBytesReceived1); - } +const int F_TEST = 3; - /// number of body bytes already sent - int get countOfBytesSent { - return _lib._objc_msgSend_247(_id, _lib._sel_countOfBytesSent1); - } +const int SYNC_VOLUME_FULLSYNC = 1; - /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request - int get countOfBytesExpectedToSend { - return _lib._objc_msgSend_247(_id, _lib._sel_countOfBytesExpectedToSend1); - } +const int SYNC_VOLUME_WAIT = 2; - /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. - int get countOfBytesExpectedToReceive { - return _lib._objc_msgSend_247( - _id, _lib._sel_countOfBytesExpectedToReceive1); - } +const int O_RDONLY = 0; - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - NSString? get taskDescription { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_taskDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int O_WRONLY = 1; - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - set taskDescription(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); - } +const int O_RDWR = 2; - /// -cancel returns immediately, but marks a task as being canceled. - /// The task will signal -URLSession:task:didCompleteWithError: with an - /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some - /// cases, the task may signal other work before it acknowledges the - /// cancelation. -cancel may be sent to a task that has been suspended. - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } +const int O_ACCMODE = 3; - /// The current state of the task within the session. - int get state { - return _lib._objc_msgSend_255(_id, _lib._sel_state1); - } +const int FREAD = 1; - /// The error, if any, delivered via -URLSession:task:didCompleteWithError: - /// This property will be nil in the event that no error occured. - NSError? get error { - final _ret = _lib._objc_msgSend_256(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); - } +const int FWRITE = 2; - /// Suspending a task will prevent the NSURLSession from continuing to - /// load data. There may still be delegate calls made on behalf of - /// this task (for instance, to report data received while suspending) - /// but no further transmissions will be made on behalf of the task - /// until -resume is sent. The timeout timer associated with the task - /// will be disabled while a task is suspended. -suspend and -resume are - /// nestable. - void suspend() { - return _lib._objc_msgSend_1(_id, _lib._sel_suspend1); - } +const int O_NONBLOCK = 4; - void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); - } +const int O_APPEND = 8; - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. - /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. - /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - double get priority { - return _lib._objc_msgSend_64(_id, _lib._sel_priority1); - } +const int O_SYNC = 128; - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. - /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. - /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - set priority(double value) { - _lib._objc_msgSend_257(_id, _lib._sel_setPriority_1, value); - } +const int O_SHLOCK = 16; - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. - /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - bool get prefersIncrementalDelivery { - return _lib._objc_msgSend_11(_id, _lib._sel_prefersIncrementalDelivery1); - } +const int O_EXLOCK = 32; - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. - /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - set prefersIncrementalDelivery(bool value) { - _lib._objc_msgSend_215( - _id, _lib._sel_setPrefersIncrementalDelivery_1, value); - } +const int O_ASYNC = 64; - @override - NSURLSessionTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTask._(_ret, _lib, retain: true, release: true); - } +const int O_FSYNC = 128; - static NSURLSessionTask new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); - } +const int O_NOFOLLOW = 256; - static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); - } -} +const int O_CREAT = 512; -class NSURLResponse extends NSObject { - NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int O_TRUNC = 1024; - /// Returns a [NSURLResponse] that points to the same underlying object as [other]. - static NSURLResponse castFrom(T other) { - return NSURLResponse._(other._id, other._lib, retain: true, release: true); - } +const int O_EXCL = 2048; - /// Returns a [NSURLResponse] that wraps the given raw object pointer. - static NSURLResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLResponse._(other, lib, retain: retain, release: release); - } +const int O_EVTONLY = 32768; - /// Returns whether [obj] is an instance of [NSURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); - } +const int O_NOCTTY = 131072; - /// ! - /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: - /// @abstract Initialize an NSURLResponse with the provided values. - /// @param URL the URL - /// @param MIMEType the MIME content type of the response - /// @param length the expected content length of the associated data - /// @param name the name of the text encoding for the associated data, if applicable, else nil - /// @result The initialized NSURLResponse. - /// @discussion This is the designated initializer for NSURLResponse. - NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - NSURL? URL, NSString? MIMEType, int length, NSString? name) { - final _ret = _lib._objc_msgSend_238( - _id, - _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, - URL?._id ?? ffi.nullptr, - MIMEType?._id ?? ffi.nullptr, - length, - name?._id ?? ffi.nullptr); - return NSURLResponse._(_ret, _lib, retain: true, release: true); - } +const int O_DIRECTORY = 1048576; - /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - NSURL? get URL { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int O_SYMLINK = 2097152; - /// ! - /// @abstract Returns the MIME type of the receiver. - /// @discussion The MIME type is based on the information provided - /// from an origin source. However, that value may be changed or - /// corrected by a protocol implementation if it can be determined - /// that the origin server or source reported the information - /// incorrectly or imprecisely. An attempt to guess the MIME type may - /// be made if the origin source did not report any such information. - /// @result The MIME type of the receiver. - NSString? get MIMEType { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_MIMEType1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int O_DSYNC = 4194304; - /// ! - /// @abstract Returns the expected content length of the receiver. - /// @discussion Some protocol implementations report a content length - /// as part of delivering load metadata, but not all protocols - /// guarantee the amount of data that will be delivered in actuality. - /// Hence, this method returns an expected amount. Clients should use - /// this value as an advisory, and should be prepared to deal with - /// either more or less data. - /// @result The expected content length of the receiver, or -1 if - /// there is no expectation that can be arrived at regarding expected - /// content length. - int get expectedContentLength { - return _lib._objc_msgSend_62(_id, _lib._sel_expectedContentLength1); - } +const int O_CLOEXEC = 16777216; - /// ! - /// @abstract Returns the name of the text encoding of the receiver. - /// @discussion This name will be the actual string reported by the - /// origin source during the course of performing a protocol-specific - /// URL load. Clients can inspect this string and convert it to an - /// NSStringEncoding or CFStringEncoding using the methods and - /// functions made available in the appropriate framework. - /// @result The name of the text encoding of the receiver, or nil if no - /// text encoding was specified. - NSString? get textEncodingName { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_textEncodingName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int O_NOFOLLOW_ANY = 536870912; - /// ! - /// @abstract Returns a suggested filename if the resource were saved to disk. - /// @discussion The method first checks if the server has specified a filename using the - /// content disposition header. If no valid filename is specified using that mechanism, - /// this method checks the last path component of the URL. If no valid filename can be - /// obtained using the last path component, this method uses the URL's host as the filename. - /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. - /// In mose cases, this method appends the proper file extension based on the MIME type. - /// This method always returns a valid filename. - /// @result A suggested filename to use if saving the resource to disk. - NSString? get suggestedFilename { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_suggestedFilename1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int AT_FDCWD = -2; - static NSURLResponse new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); - } +const int AT_EACCESS = 16; - static NSURLResponse alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); - } -} +const int AT_SYMLINK_NOFOLLOW = 32; -class NSProgress extends NSObject { - NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int AT_SYMLINK_FOLLOW = 64; - /// Returns a [NSProgress] that points to the same underlying object as [other]. - static NSProgress castFrom(T other) { - return NSProgress._(other._id, other._lib, retain: true, release: true); - } +const int AT_REMOVEDIR = 128; - /// Returns a [NSProgress] that wraps the given raw object pointer. - static NSProgress castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProgress._(other, lib, retain: retain, release: release); - } +const int AT_REALDEV = 512; - /// Returns whether [obj] is an instance of [NSProgress]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); - } +const int AT_FDONLY = 1024; - static NSProgress currentProgress(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_240( - _lib._class_NSProgress1, _lib._sel_currentProgress1); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +const int AT_SYMLINK_NOFOLLOW_ANY = 2048; - static NSProgress progressWithTotalUnitCount_( - NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_241(_lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +const int O_DP_GETRAWENCRYPTED = 1; - static NSProgress discreteProgressWithTotalUnitCount_( - NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_241(_lib._class_NSProgress1, - _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +const int O_DP_GETRAWUNENCRYPTED = 2; - static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( - NativeCupertinoHttp _lib, - int unitCount, - NSProgress? parent, - int portionOfParentTotalUnitCount) { - final _ret = _lib._objc_msgSend_242( - _lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, - unitCount, - parent?._id ?? ffi.nullptr, - portionOfParentTotalUnitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +const int FAPPEND = 8; + +const int FASYNC = 64; + +const int FFSYNC = 128; - NSProgress initWithParent_userInfo_( - NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { - final _ret = _lib._objc_msgSend_243( - _id, - _lib._sel_initWithParent_userInfo_1, - parentProgressOrNil?._id ?? ffi.nullptr, - userInfoOrNil?._id ?? ffi.nullptr); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +const int FFDSYNC = 4194304; - void becomeCurrentWithPendingUnitCount_(int unitCount) { - return _lib._objc_msgSend_244( - _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); - } +const int FNONBLOCK = 4; - void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock7 work) { - return _lib._objc_msgSend_245( - _id, - _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, - unitCount, - work._impl); - } +const int FNDELAY = 4; - void resignCurrent() { - return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); - } +const int O_NDELAY = 4; - void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { - return _lib._objc_msgSend_246( - _id, - _lib._sel_addChild_withPendingUnitCount_1, - child?._id ?? ffi.nullptr, - inUnitCount); - } +const int CPF_OVERWRITE = 1; - int get totalUnitCount { - return _lib._objc_msgSend_247(_id, _lib._sel_totalUnitCount1); - } +const int CPF_IGNORE_MODE = 2; - set totalUnitCount(int value) { - _lib._objc_msgSend_248(_id, _lib._sel_setTotalUnitCount_1, value); - } +const int CPF_MASK = 3; - int get completedUnitCount { - return _lib._objc_msgSend_247(_id, _lib._sel_completedUnitCount1); - } +const int F_DUPFD = 0; - set completedUnitCount(int value) { - _lib._objc_msgSend_248(_id, _lib._sel_setCompletedUnitCount_1, value); - } +const int F_GETFD = 1; - NSString? get localizedDescription { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_localizedDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int F_SETFD = 2; - set localizedDescription(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); - } +const int F_GETFL = 3; - NSString? get localizedAdditionalDescription { - final _ret = - _lib._objc_msgSend_19(_id, _lib._sel_localizedAdditionalDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int F_SETFL = 4; - set localizedAdditionalDescription(NSString? value) { - _lib._objc_msgSend_216(_id, _lib._sel_setLocalizedAdditionalDescription_1, - value?._id ?? ffi.nullptr); - } +const int F_GETOWN = 5; - bool get cancellable { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); - } +const int F_SETOWN = 6; - set cancellable(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setCancellable_1, value); - } +const int F_GETLK = 7; - bool get pausable { - return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); - } +const int F_SETLK = 8; - set pausable(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setPausable_1, value); - } +const int F_SETLKW = 9; - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); - } +const int F_SETLKWTIMEOUT = 10; - bool get paused { - return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); - } +const int F_FLUSH_DATA = 40; - ObjCBlock7 get cancellationHandler { - final _ret = _lib._objc_msgSend_249(_id, _lib._sel_cancellationHandler1); - return ObjCBlock7._(_ret, _lib); - } +const int F_CHKCLEAN = 41; - set cancellationHandler(ObjCBlock7 value) { - _lib._objc_msgSend_250( - _id, _lib._sel_setCancellationHandler_1, value._impl); - } +const int F_PREALLOCATE = 42; - ObjCBlock7 get pausingHandler { - final _ret = _lib._objc_msgSend_249(_id, _lib._sel_pausingHandler1); - return ObjCBlock7._(_ret, _lib); - } +const int F_SETSIZE = 43; - set pausingHandler(ObjCBlock7 value) { - _lib._objc_msgSend_250(_id, _lib._sel_setPausingHandler_1, value._impl); - } +const int F_RDADVISE = 44; - ObjCBlock7 get resumingHandler { - final _ret = _lib._objc_msgSend_249(_id, _lib._sel_resumingHandler1); - return ObjCBlock7._(_ret, _lib); - } +const int F_RDAHEAD = 45; - set resumingHandler(ObjCBlock7 value) { - _lib._objc_msgSend_250(_id, _lib._sel_setResumingHandler_1, value._impl); - } +const int F_NOCACHE = 48; - void setUserInfoObject_forKey_( - NSObject objectOrNil, NSProgressUserInfoKey key) { - return _lib._objc_msgSend_98( - _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); - } +const int F_LOG2PHYS = 49; - bool get indeterminate { - return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); - } +const int F_GETPATH = 50; - double get fractionCompleted { - return _lib._objc_msgSend_65(_id, _lib._sel_fractionCompleted1); - } +const int F_FULLFSYNC = 51; - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); - } +const int F_PATHPKG_CHECK = 52; - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } +const int F_FREEZE_FS = 53; - void pause() { - return _lib._objc_msgSend_1(_id, _lib._sel_pause1); - } +const int F_THAW_FS = 54; - void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); - } +const int F_GLOBAL_NOCACHE = 55; - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int F_ADDSIGS = 59; - NSProgressKind get kind { - return _lib._objc_msgSend_19(_id, _lib._sel_kind1); - } +const int F_ADDFILESIGS = 61; - set kind(NSProgressKind value) { - _lib._objc_msgSend_216(_id, _lib._sel_setKind_1, value); - } +const int F_NODIRECT = 62; - NSNumber? get estimatedTimeRemaining { - final _ret = _lib._objc_msgSend_69(_id, _lib._sel_estimatedTimeRemaining1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +const int F_GETPROTECTIONCLASS = 63; - set estimatedTimeRemaining(NSNumber? value) { - _lib._objc_msgSend_251( - _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); - } +const int F_SETPROTECTIONCLASS = 64; - NSNumber? get throughput { - final _ret = _lib._objc_msgSend_69(_id, _lib._sel_throughput1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +const int F_LOG2PHYS_EXT = 65; - set throughput(NSNumber? value) { - _lib._objc_msgSend_251( - _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); - } +const int F_GETLKPID = 66; - NSProgressFileOperationKind get fileOperationKind { - return _lib._objc_msgSend_19(_id, _lib._sel_fileOperationKind1); - } +const int F_SETBACKINGSTORE = 70; - set fileOperationKind(NSProgressFileOperationKind value) { - _lib._objc_msgSend_216(_id, _lib._sel_setFileOperationKind_1, value); - } +const int F_GETPATH_MTMINFO = 71; - NSURL? get fileURL { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_fileURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int F_GETCODEDIR = 72; - set fileURL(NSURL? value) { - _lib._objc_msgSend_211( - _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); - } +const int F_SETNOSIGPIPE = 73; - NSNumber? get fileTotalCount { - final _ret = _lib._objc_msgSend_69(_id, _lib._sel_fileTotalCount1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +const int F_GETNOSIGPIPE = 74; - set fileTotalCount(NSNumber? value) { - _lib._objc_msgSend_251( - _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); - } +const int F_TRANSCODEKEY = 75; - NSNumber? get fileCompletedCount { - final _ret = _lib._objc_msgSend_69(_id, _lib._sel_fileCompletedCount1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +const int F_SINGLE_WRITER = 76; - set fileCompletedCount(NSNumber? value) { - _lib._objc_msgSend_251( - _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); - } +const int F_GETPROTECTIONLEVEL = 77; - void publish() { - return _lib._objc_msgSend_1(_id, _lib._sel_publish1); - } +const int F_FINDSIGS = 78; - void unpublish() { - return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); - } +const int F_ADDFILESIGS_FOR_DYLD_SIM = 83; - static NSObject addSubscriberForFileURL_withPublishingHandler_( - NativeCupertinoHttp _lib, - NSURL? url, - NSProgressPublishingHandler publishingHandler) { - final _ret = _lib._objc_msgSend_252( - _lib._class_NSProgress1, - _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, - url?._id ?? ffi.nullptr, - publishingHandler); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int F_BARRIERFSYNC = 85; - static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { - return _lib._objc_msgSend_109( - _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); - } +const int F_ADDFILESIGS_RETURN = 97; - bool get old { - return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); - } +const int F_CHECK_LV = 98; - static NSProgress new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); - return NSProgress._(_ret, _lib, retain: false, release: true); - } +const int F_PUNCHHOLE = 99; - static NSProgress alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); - return NSProgress._(_ret, _lib, retain: false, release: true); - } -} +const int F_TRIM_ACTIVE_FILE = 100; -void _ObjCBlock7_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block) { - return block.ref.target - .cast>() - .asFunction()(); -} +const int F_SPECULATIVE_READ = 101; -final _ObjCBlock7_closureRegistry = {}; -int _ObjCBlock7_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock7_registerClosure(Function fn) { - final id = ++_ObjCBlock7_closureRegistryIndex; - _ObjCBlock7_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int F_GETPATH_NOFIRMLINK = 102; -void _ObjCBlock7_closureTrampoline(ffi.Pointer<_ObjCBlock> block) { - return _ObjCBlock7_closureRegistry[block.ref.target.address]!(); -} +const int F_ADDFILESIGS_INFO = 103; -class ObjCBlock7 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock7._(this._impl, this._lib); - ObjCBlock7.fromFunctionPointer( - this._lib, ffi.Pointer> ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( - _ObjCBlock7_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock7.fromFunction(this._lib, void Function() fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( - _ObjCBlock7_closureTrampoline) - .cast(), - _ObjCBlock7_registerClosure(fn)); - void call() { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() - .asFunction block)>()(_impl); - } +const int F_ADDFILESUPPL = 104; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int F_GETSIGSINFO = 105; -typedef NSProgressUserInfoKey = ffi.Pointer; -typedef NSProgressKind = ffi.Pointer; -typedef NSProgressFileOperationKind = ffi.Pointer; -typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; -NSProgressUnpublishingHandler _ObjCBlock8_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>()(arg0); -} +const int F_FSRESERVED = 106; -final _ObjCBlock8_closureRegistry = {}; -int _ObjCBlock8_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock8_registerClosure(Function fn) { - final id = ++_ObjCBlock8_closureRegistryIndex; - _ObjCBlock8_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int FCNTL_FS_SPECIFIC_BASE = 65536; -NSProgressUnpublishingHandler _ObjCBlock8_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock8_closureRegistry[block.ref.target.address]!(arg0); -} +const int F_DUPFD_CLOEXEC = 67; -class ObjCBlock8 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock8._(this._impl, this._lib); - ObjCBlock8.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock8_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock8.fromFunction(this._lib, - NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock8_closureTrampoline) - .cast(), - _ObjCBlock8_registerClosure(fn)); - NSProgressUnpublishingHandler call(ffi.Pointer arg0) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_impl, arg0); - } +const int FD_CLOEXEC = 1; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int F_RDLCK = 1; -typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; +const int F_UNLCK = 2; -abstract class NSURLSessionTaskState { - /// The task is currently being serviced by the session - static const int NSURLSessionTaskStateRunning = 0; - static const int NSURLSessionTaskStateSuspended = 1; +const int F_WRLCK = 3; - /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. - static const int NSURLSessionTaskStateCanceling = 2; +const int S_IFMT = 61440; - /// The task has completed and the session will receive no more delegate notifications - static const int NSURLSessionTaskStateCompleted = 3; -} +const int S_IFIFO = 4096; -void _ObjCBlock9_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} +const int S_IFCHR = 8192; -final _ObjCBlock9_closureRegistry = {}; -int _ObjCBlock9_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock9_registerClosure(Function fn) { - final id = ++_ObjCBlock9_closureRegistryIndex; - _ObjCBlock9_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int S_IFDIR = 16384; -void _ObjCBlock9_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock9_closureRegistry[block.ref.target.address]!(arg0); -} +const int S_IFBLK = 24576; -class ObjCBlock9 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock9._(this._impl, this._lib); - ObjCBlock9.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock9_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock9.fromFunction( - this._lib, void Function(ffi.Pointer arg0) fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock9_closureTrampoline) - .cast(), - _ObjCBlock9_registerClosure(fn)); - void call(ffi.Pointer arg0) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_impl, arg0); - } +const int S_IFREG = 32768; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int S_IFLNK = 40960; -class NSURLCredentialStorage extends _ObjCWrapper { - NSURLCredentialStorage._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int S_IFSOCK = 49152; - /// Returns a [NSURLCredentialStorage] that points to the same underlying object as [other]. - static NSURLCredentialStorage castFrom(T other) { - return NSURLCredentialStorage._(other._id, other._lib, - retain: true, release: true); - } +const int S_IFWHT = 57344; - /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. - static NSURLCredentialStorage castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCredentialStorage._(other, lib, - retain: retain, release: release); - } +const int S_IRWXU = 448; - /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLCredentialStorage1); - } -} +const int S_IRUSR = 256; -class NSURLCache extends _ObjCWrapper { - NSURLCache._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int S_IWUSR = 128; - /// Returns a [NSURLCache] that points to the same underlying object as [other]. - static NSURLCache castFrom(T other) { - return NSURLCache._(other._id, other._lib, retain: true, release: true); - } +const int S_IXUSR = 64; - /// Returns a [NSURLCache] that wraps the given raw object pointer. - static NSURLCache castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCache._(other, lib, retain: retain, release: release); - } +const int S_IRWXG = 56; - /// Returns whether [obj] is an instance of [NSURLCache]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); - } -} +const int S_IRGRP = 32; -/// ! -/// @enum NSURLSessionMultipathServiceType -/// -/// @discussion The NSURLSessionMultipathServiceType enum defines constants that -/// can be used to specify the multipath service type to associate an NSURLSession. The -/// multipath service type determines whether multipath TCP should be attempted and the conditions -/// for creating and switching between subflows. Using these service types requires the appropriate entitlement. Any connection attempt will fail if the process does not have the required entitlement. -/// A primary interface is a generally less expensive interface in terms of both cost and power (such as WiFi or ethernet). A secondary interface is more expensive (such as 3G or LTE). -/// -/// @constant NSURLSessionMultipathServiceTypeNone Specifies that multipath tcp should not be used. Connections will use a single flow. -/// This is the default value. No entitlement is required to set this value. -/// -/// @constant NSURLSessionMultipathServiceTypeHandover Specifies that a secondary subflow should only be used -/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entilement. -/// -/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secodary subflow should be used if the -/// primary subflow is not performing adequately (packet loss, high round trip times, bandwidth issues). The secondary -/// subflow will be created more aggressively than with NSURLSessionMultipathServiceTypeHandover. Requires the com.apple.developer.networking.multipath entitlement. -/// -/// @constant NSURLSessionMultipathServiceTypeAggregate Specifies that multiple subflows across multiple interfaces should be -/// used for better bandwidth. This mode is only available for experimentation on devices configured for development use. -/// It can be enabled in the Developer section of the Settings app. -abstract class NSURLSessionMultipathServiceType { - /// None - no multipath (default) - static const int NSURLSessionMultipathServiceTypeNone = 0; +const int S_IWGRP = 16; - /// Handover - secondary flows brought up when primary flow is not performing adequately. - static const int NSURLSessionMultipathServiceTypeHandover = 1; +const int S_IXGRP = 8; - /// Interactive - secondary flows created more aggressively. - static const int NSURLSessionMultipathServiceTypeInteractive = 2; +const int S_IRWXO = 7; - /// Aggregate - multiple subflows used for greater bandwitdh. - static const int NSURLSessionMultipathServiceTypeAggregate = 3; -} +const int S_IROTH = 4; -class NSOperationQueue extends NSObject { - NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int S_IWOTH = 2; - /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. - static NSOperationQueue castFrom(T other) { - return NSOperationQueue._(other._id, other._lib, - retain: true, release: true); - } +const int S_IXOTH = 1; - /// Returns a [NSOperationQueue] that wraps the given raw object pointer. - static NSOperationQueue castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperationQueue._(other, lib, retain: retain, release: release); - } +const int S_ISUID = 2048; - /// Returns whether [obj] is an instance of [NSOperationQueue]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOperationQueue1); - } +const int S_ISGID = 1024; - /// @property progress - /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue - /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the - /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the - /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super - /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress - /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% - /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 - /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be - /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by - /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving - /// progress scenario. - /// - /// @example - /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; - /// queue.progress.totalUnitCount = 10; - NSProgress? get progress { - final _ret = _lib._objc_msgSend_240(_id, _lib._sel_progress1); - return _ret.address == 0 - ? null - : NSProgress._(_ret, _lib, retain: true, release: true); - } +const int S_ISVTX = 512; - void addOperation_(NSOperation? op) { - return _lib._objc_msgSend_269( - _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); - } +const int S_ISTXT = 512; - void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { - return _lib._objc_msgSend_274( - _id, - _lib._sel_addOperations_waitUntilFinished_1, - ops?._id ?? ffi.nullptr, - wait); - } +const int S_IREAD = 256; - void addOperationWithBlock_(ObjCBlock7 block) { - return _lib._objc_msgSend_275( - _id, _lib._sel_addOperationWithBlock_1, block._impl); - } +const int S_IWRITE = 128; - /// @method addBarrierBlock: - /// @param barrier A block to execute - /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and - /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the - /// `dispatch_barrier_async` function. - void addBarrierBlock_(ObjCBlock7 barrier) { - return _lib._objc_msgSend_275( - _id, _lib._sel_addBarrierBlock_1, barrier._impl); - } +const int S_IEXEC = 64; - int get maxConcurrentOperationCount { - return _lib._objc_msgSend_61(_id, _lib._sel_maxConcurrentOperationCount1); - } +const int F_ALLOCATECONTIG = 2; - set maxConcurrentOperationCount(int value) { - _lib._objc_msgSend_230( - _id, _lib._sel_setMaxConcurrentOperationCount_1, value); - } +const int F_ALLOCATEALL = 4; - bool get suspended { - return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); - } +const int F_PEOFPOSMODE = 3; - set suspended(bool value) { - _lib._objc_msgSend_215(_id, _lib._sel_setSuspended_1, value); - } +const int F_VOLPOSMODE = 4; - NSString? get name { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int USER_FSIGNATURES_CDHASH_LEN = 20; - set name(NSString? value) { - _lib._objc_msgSend_216(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); - } +const int GETSIGSINFO_PLATFORM_BINARY = 1; - int get qualityOfService { - return _lib._objc_msgSend_272(_id, _lib._sel_qualityOfService1); - } +const int LOCK_SH = 1; - set qualityOfService(int value) { - _lib._objc_msgSend_273(_id, _lib._sel_setQualityOfService_1, value); - } +const int LOCK_EX = 2; - /// actually retain - dispatch_queue_t get underlyingQueue { - return _lib._objc_msgSend_276(_id, _lib._sel_underlyingQueue1); - } +const int LOCK_NB = 4; - /// actually retain - set underlyingQueue(dispatch_queue_t value) { - _lib._objc_msgSend_277(_id, _lib._sel_setUnderlyingQueue_1, value); - } +const int LOCK_UN = 8; - void cancelAllOperations() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); - } +const int O_POPUP = 2147483648; - void waitUntilAllOperationsAreFinished() { - return _lib._objc_msgSend_1( - _id, _lib._sel_waitUntilAllOperationsAreFinished1); - } +const int O_ALERT = 536870912; - static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_278( - _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_API_VERSION = 20181008; - static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_278( - _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); - } +const int __OS_WORKGROUP_ATTR_SIZE__ = 60; - /// These two functions are inherently a race condition and should be avoided if possible - NSArray? get operations { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_operations1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int __OS_WORKGROUP_INTERVAL_DATA_SIZE__ = 56; - int get operationCount { - return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); - } +const int __OS_WORKGROUP_JOIN_TOKEN_SIZE__ = 36; - static NSOperationQueue new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); - } +const int _OS_WORKGROUP_ATTR_SIG_DEFAULT_INIT = 799564724; - static NSOperationQueue alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); - } -} +const int _OS_WORKGROUP_ATTR_SIG_EMPTY_INIT = 799564740; -class NSOperation extends NSObject { - NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int _OS_WORKGROUP_INTERVAL_DATA_SIG_INIT = 1386695757; - /// Returns a [NSOperation] that points to the same underlying object as [other]. - static NSOperation castFrom(T other) { - return NSOperation._(other._id, other._lib, retain: true, release: true); - } +const int DISPATCH_SWIFT3_OVERLAY = 0; - /// Returns a [NSOperation] that wraps the given raw object pointer. - static NSOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperation._(other, lib, retain: retain, release: release); - } +const int TIME_MICROS_MAX = 1000000; - /// Returns whether [obj] is an instance of [NSOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); - } +const int SYSTEM_CLOCK = 0; - void start() { - return _lib._objc_msgSend_1(_id, _lib._sel_start1); - } +const int CALENDAR_CLOCK = 1; - void main() { - return _lib._objc_msgSend_1(_id, _lib._sel_main1); - } +const int REALTIME_CLOCK = 0; - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); - } +const int CLOCK_GET_TIME_RES = 1; - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } +const int CLOCK_ALARM_CURRES = 3; - bool get executing { - return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); - } +const int CLOCK_ALARM_MINRES = 4; - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); - } +const int CLOCK_ALARM_MAXRES = 5; - /// To be deprecated; use and override 'asynchronous' below - bool get concurrent { - return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); - } +const int NSEC_PER_USEC = 1000; - bool get asynchronous { - return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); - } +const int USEC_PER_SEC = 1000000; - bool get ready { - return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); - } +const int NSEC_PER_SEC = 1000000000; - void addDependency_(NSOperation? op) { - return _lib._objc_msgSend_269( - _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); - } +const int NSEC_PER_MSEC = 1000000; - void removeDependency_(NSOperation? op) { - return _lib._objc_msgSend_269( - _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); - } +const int ALRMTYPE = 255; - NSArray? get dependencies { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_dependencies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int TIME_ABSOLUTE = 0; - int get queuePriority { - return _lib._objc_msgSend_270(_id, _lib._sel_queuePriority1); - } +const int TIME_RELATIVE = 1; - set queuePriority(int value) { - _lib._objc_msgSend_271(_id, _lib._sel_setQueuePriority_1, value); - } +const int DISPATCH_TIME_NOW = 0; - ObjCBlock7 get completionBlock { - final _ret = _lib._objc_msgSend_249(_id, _lib._sel_completionBlock1); - return ObjCBlock7._(_ret, _lib); - } +const int DISPATCH_TIME_FOREVER = -1; - set completionBlock(ObjCBlock7 value) { - _lib._objc_msgSend_250(_id, _lib._sel_setCompletionBlock_1, value._impl); - } +const int QOS_MIN_RELATIVE_PRIORITY = -15; - void waitUntilFinished() { - return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); - } +const int DISPATCH_APPLY_AUTO_AVAILABLE = 1; - double get threadPriority { - return _lib._objc_msgSend_65(_id, _lib._sel_threadPriority1); - } +const int DISPATCH_QUEUE_PRIORITY_HIGH = 2; - set threadPriority(double value) { - _lib._objc_msgSend_213(_id, _lib._sel_setThreadPriority_1, value); - } +const int DISPATCH_QUEUE_PRIORITY_DEFAULT = 0; - int get qualityOfService { - return _lib._objc_msgSend_272(_id, _lib._sel_qualityOfService1); - } +const int DISPATCH_QUEUE_PRIORITY_LOW = -2; - set qualityOfService(int value) { - _lib._objc_msgSend_273(_id, _lib._sel_setQualityOfService_1, value); - } +const int DISPATCH_QUEUE_PRIORITY_BACKGROUND = -32768; - NSString? get name { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_QUEUE_SERIAL = 0; - set name(NSString? value) { - _lib._objc_msgSend_216(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); - } +const int DISPATCH_TARGET_QUEUE_DEFAULT = 0; - static NSOperation new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); - return NSOperation._(_ret, _lib, retain: false, release: true); - } +const int DISPATCH_CURRENT_QUEUE_LABEL = 0; - static NSOperation alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); - return NSOperation._(_ret, _lib, retain: false, release: true); - } -} +const int KERN_SUCCESS = 0; -abstract class NSOperationQueuePriority { - static const int NSOperationQueuePriorityVeryLow = -8; - static const int NSOperationQueuePriorityLow = -4; - static const int NSOperationQueuePriorityNormal = 0; - static const int NSOperationQueuePriorityHigh = 4; - static const int NSOperationQueuePriorityVeryHigh = 8; -} +const int KERN_INVALID_ADDRESS = 1; -abstract class NSQualityOfService { - static const int NSQualityOfServiceUserInteractive = 33; - static const int NSQualityOfServiceUserInitiated = 25; - static const int NSQualityOfServiceUtility = 17; - static const int NSQualityOfServiceBackground = 9; - static const int NSQualityOfServiceDefault = -1; -} +const int KERN_PROTECTION_FAILURE = 2; -typedef dispatch_queue_t = ffi.Pointer; -void _ObjCBlock10_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} +const int KERN_NO_SPACE = 3; -final _ObjCBlock10_closureRegistry = {}; -int _ObjCBlock10_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock10_registerClosure(Function fn) { - final id = ++_ObjCBlock10_closureRegistryIndex; - _ObjCBlock10_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int KERN_INVALID_ARGUMENT = 4; -void _ObjCBlock10_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock10_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +const int KERN_FAILURE = 5; -class ObjCBlock10 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock10._(this._impl, this._lib); - ObjCBlock10.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock10_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock10.fromFunction( - this._lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock10_closureTrampoline) - .cast(), - _ObjCBlock10_registerClosure(fn)); - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_impl, arg0, arg1, arg2); - } +const int KERN_RESOURCE_SHORTAGE = 6; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int KERN_NOT_RECEIVER = 7; -/// An NSURLSessionDataTask does not provide any additional -/// functionality over an NSURLSessionTask and its presence is merely -/// to provide lexical differentiation from download and upload tasks. -class NSURLSessionDataTask extends NSURLSessionTask { - NSURLSessionDataTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int KERN_NO_ACCESS = 8; - /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. - static NSURLSessionDataTask castFrom(T other) { - return NSURLSessionDataTask._(other._id, other._lib, - retain: true, release: true); - } +const int KERN_MEMORY_FAILURE = 9; - /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. - static NSURLSessionDataTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDataTask._(other, lib, retain: retain, release: release); - } +const int KERN_MEMORY_ERROR = 10; - /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionDataTask1); - } +const int KERN_ALREADY_IN_SET = 11; - @override - NSURLSessionDataTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } +const int KERN_NOT_IN_SET = 12; - static NSURLSessionDataTask new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); - } +const int KERN_NAME_EXISTS = 13; - static NSURLSessionDataTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); - } -} +const int KERN_ABORTED = 14; -/// An NSURLSessionUploadTask does not currently provide any additional -/// functionality over an NSURLSessionDataTask. All delegate messages -/// that may be sent referencing an NSURLSessionDataTask equally apply -/// to NSURLSessionUploadTasks. -class NSURLSessionUploadTask extends NSURLSessionDataTask { - NSURLSessionUploadTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int KERN_INVALID_NAME = 15; - /// Returns a [NSURLSessionUploadTask] that points to the same underlying object as [other]. - static NSURLSessionUploadTask castFrom(T other) { - return NSURLSessionUploadTask._(other._id, other._lib, - retain: true, release: true); - } +const int KERN_INVALID_TASK = 16; - /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. - static NSURLSessionUploadTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionUploadTask._(other, lib, - retain: retain, release: release); - } +const int KERN_INVALID_RIGHT = 17; - /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionUploadTask1); - } +const int KERN_INVALID_VALUE = 18; - @override - NSURLSessionUploadTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } +const int KERN_UREFS_OVERFLOW = 19; - static NSURLSessionUploadTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionUploadTask1, _lib._sel_new1); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } +const int KERN_INVALID_CAPABILITY = 20; - static NSURLSessionUploadTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionUploadTask1, _lib._sel_alloc1); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } -} +const int KERN_RIGHT_EXISTS = 21; -/// NSURLSessionDownloadTask is a task that represents a download to -/// local storage. -class NSURLSessionDownloadTask extends NSURLSessionTask { - NSURLSessionDownloadTask._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int KERN_INVALID_HOST = 22; - /// Returns a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. - static NSURLSessionDownloadTask castFrom(T other) { - return NSURLSessionDownloadTask._(other._id, other._lib, - retain: true, release: true); - } +const int KERN_MEMORY_PRESENT = 23; - /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. - static NSURLSessionDownloadTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDownloadTask._(other, lib, - retain: retain, release: release); - } +const int KERN_MEMORY_DATA_MOVED = 24; - /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionDownloadTask1); - } +const int KERN_MEMORY_RESTART_COPY = 25; - /// Cancel the download (and calls the superclass -cancel). If - /// conditions will allow for resuming the download in the future, the - /// callback will be called with an opaque data blob, which may be used - /// with -downloadTaskWithResumeData: to attempt to resume the download. - /// If resume data cannot be created, the completion handler will be - /// called with nil resumeData. - void cancelByProducingResumeData_(ObjCBlock11 completionHandler) { - return _lib._objc_msgSend_287( - _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._impl); - } +const int KERN_INVALID_PROCESSOR_SET = 26; - @override - NSURLSessionDownloadTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +const int KERN_POLICY_LIMIT = 27; - static NSURLSessionDownloadTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_new1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); - } +const int KERN_INVALID_POLICY = 28; - static NSURLSessionDownloadTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_alloc1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); - } -} +const int KERN_INVALID_OBJECT = 29; -void _ObjCBlock11_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} +const int KERN_ALREADY_WAITING = 30; -final _ObjCBlock11_closureRegistry = {}; -int _ObjCBlock11_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock11_registerClosure(Function fn) { - final id = ++_ObjCBlock11_closureRegistryIndex; - _ObjCBlock11_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int KERN_DEFAULT_SET = 31; -void _ObjCBlock11_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock11_closureRegistry[block.ref.target.address]!(arg0); -} +const int KERN_EXCEPTION_PROTECTED = 32; -class ObjCBlock11 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock11._(this._impl, this._lib); - ObjCBlock11.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock11_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock11.fromFunction( - this._lib, void Function(ffi.Pointer arg0) fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock11_closureTrampoline) - .cast(), - _ObjCBlock11_registerClosure(fn)); - void call(ffi.Pointer arg0) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_impl, arg0); - } +const int KERN_INVALID_LEDGER = 33; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int KERN_INVALID_MEMORY_CONTROL = 34; -/// An NSURLSessionStreamTask provides an interface to perform reads -/// and writes to a TCP/IP stream created via NSURLSession. This task -/// may be explicitly created from an NSURLSession, or created as a -/// result of the appropriate disposition response to a -/// -URLSession:dataTask:didReceiveResponse: delegate message. -/// -/// NSURLSessionStreamTask can be used to perform asynchronous reads -/// and writes. Reads and writes are enquened and executed serially, -/// with the completion handler being invoked on the sessions delegate -/// queuee. If an error occurs, or the task is canceled, all -/// outstanding read and write calls will have their completion -/// handlers invoked with an appropriate error. -/// -/// It is also possible to create NSInputStream and NSOutputStream -/// instances from an NSURLSessionTask by sending -/// -captureStreams to the task. All outstanding read and writess are -/// completed before the streams are created. Once the streams are -/// delivered to the session delegate, the task is considered complete -/// and will receive no more messsages. These streams are -/// disassociated from the underlying session. -class NSURLSessionStreamTask extends NSURLSessionTask { - NSURLSessionStreamTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int KERN_INVALID_SECURITY = 35; - /// Returns a [NSURLSessionStreamTask] that points to the same underlying object as [other]. - static NSURLSessionStreamTask castFrom(T other) { - return NSURLSessionStreamTask._(other._id, other._lib, - retain: true, release: true); - } +const int KERN_NOT_DEPRESSED = 36; - /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. - static NSURLSessionStreamTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionStreamTask._(other, lib, - retain: retain, release: release); - } +const int KERN_TERMINATED = 37; - /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionStreamTask1); - } +const int KERN_LOCK_SET_DESTROYED = 38; - /// Read minBytes, or at most maxBytes bytes and invoke the completion - /// handler on the sessions delegate queue with the data or an error. - /// If an error occurs, any outstanding reads will also fail, and new - /// read requests will error out immediately. - void readDataOfMinLength_maxLength_timeout_completionHandler_(int minBytes, - int maxBytes, double timeout, ObjCBlock12 completionHandler) { - return _lib._objc_msgSend_291( - _id, - _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, - minBytes, - maxBytes, - timeout, - completionHandler._impl); - } +const int KERN_LOCK_UNSTABLE = 39; - /// Write the data completely to the underlying socket. If all the - /// bytes have not been written by the timeout, a timeout error will - /// occur. Note that invocation of the completion handler does not - /// guarantee that the remote side has received all the bytes, only - /// that they have been written to the kernel. - void writeData_timeout_completionHandler_( - NSData? data, double timeout, ObjCBlock13 completionHandler) { - return _lib._objc_msgSend_292( - _id, - _lib._sel_writeData_timeout_completionHandler_1, - data?._id ?? ffi.nullptr, - timeout, - completionHandler._impl); - } +const int KERN_LOCK_OWNED = 40; - /// -captureStreams completes any already enqueued reads - /// and writes, and then invokes the - /// URLSession:streamTask:didBecomeInputStream:outputStream: delegate - /// message. When that message is received, the task object is - /// considered completed and will not receive any more delegate - /// messages. - void captureStreams() { - return _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); - } +const int KERN_LOCK_OWNED_SELF = 41; - /// Enqueue a request to close the write end of the underlying socket. - /// All outstanding IO will complete before the write side of the - /// socket is closed. The server, however, may continue to write bytes - /// back to the client, so best practice is to continue reading from - /// the server until you receive EOF. - void closeWrite() { - return _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); - } +const int KERN_SEMAPHORE_DESTROYED = 42; - /// Enqueue a request to close the read side of the underlying socket. - /// All outstanding IO will complete before the read side is closed. - /// You may continue writing to the server. - void closeRead() { - return _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); - } +const int KERN_RPC_SERVER_TERMINATED = 43; - /// Begin encrypted handshake. The hanshake begins after all pending - /// IO has completed. TLS authentication callbacks are sent to the - /// session's -URLSession:task:didReceiveChallenge:completionHandler: - void startSecureConnection() { - return _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); - } +const int KERN_RPC_TERMINATE_ORPHAN = 44; - /// Cleanly close a secure connection after all pending secure IO has - /// completed. - /// - /// @warning This API is non-functional. - void stopSecureConnection() { - return _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); - } +const int KERN_RPC_CONTINUE_ORPHAN = 45; - @override - NSURLSessionStreamTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } +const int KERN_NOT_SUPPORTED = 46; - static NSURLSessionStreamTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionStreamTask1, _lib._sel_new1); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); - } +const int KERN_NODE_DOWN = 47; - static NSURLSessionStreamTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); - } -} +const int KERN_NOT_WAITING = 48; -void _ObjCBlock12_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} +const int KERN_OPERATION_TIMED_OUT = 49; -final _ObjCBlock12_closureRegistry = {}; -int _ObjCBlock12_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock12_registerClosure(Function fn) { - final id = ++_ObjCBlock12_closureRegistryIndex; - _ObjCBlock12_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int KERN_CODESIGN_ERROR = 50; -void _ObjCBlock12_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _ObjCBlock12_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +const int KERN_POLICY_STATIC = 51; -class ObjCBlock12 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock12._(this._impl, this._lib); - ObjCBlock12.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock12_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock12.fromFunction( - this._lib, - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) - fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock12_closureTrampoline) - .cast(), - _ObjCBlock12_registerClosure(fn)); - void call( - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2)>()(_impl, arg0, arg1, arg2); - } +const int KERN_INSUFFICIENT_BUFFER_SIZE = 52; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int KERN_DENIED = 53; -void _ObjCBlock13_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} +const int KERN_MISSING_KC = 54; -final _ObjCBlock13_closureRegistry = {}; -int _ObjCBlock13_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock13_registerClosure(Function fn) { - final id = ++_ObjCBlock13_closureRegistryIndex; - _ObjCBlock13_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int KERN_INVALID_KC = 55; -void _ObjCBlock13_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock13_closureRegistry[block.ref.target.address]!(arg0); -} +const int KERN_NOT_FOUND = 56; -class ObjCBlock13 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock13._(this._impl, this._lib); - ObjCBlock13.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock13_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock13.fromFunction( - this._lib, void Function(ffi.Pointer arg0) fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock13_closureTrampoline) - .cast(), - _ObjCBlock13_registerClosure(fn)); - void call(ffi.Pointer arg0) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_impl, arg0); - } +const int KERN_RETURN_MAX = 256; + +const int MACH_MSGH_BITS_ZERO = 0; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int MACH_MSGH_BITS_REMOTE_MASK = 31; -class NSNetService extends _ObjCWrapper { - NSNetService._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int MACH_MSGH_BITS_LOCAL_MASK = 7936; - /// Returns a [NSNetService] that points to the same underlying object as [other]. - static NSNetService castFrom(T other) { - return NSNetService._(other._id, other._lib, retain: true, release: true); - } +const int MACH_MSGH_BITS_VOUCHER_MASK = 2031616; - /// Returns a [NSNetService] that wraps the given raw object pointer. - static NSNetService castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNetService._(other, lib, retain: retain, release: release); - } +const int MACH_MSGH_BITS_PORTS_MASK = 2039583; - /// Returns whether [obj] is an instance of [NSNetService]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNetService1); - } -} +const int MACH_MSGH_BITS_COMPLEX = 2147483648; -/// A WebSocket task can be created with a ws or wss url. A client can also provide -/// a list of protocols it wishes to advertise during the WebSocket handshake phase. -/// Once the handshake is successfully completed the client will be notified through an optional delegate. -/// All reads and writes enqueued before the completion of the handshake will be queued up and -/// executed once the hanshake succeeds. Before the handshake completes, the client can be called to handle -/// redirection or authentication using the same delegates as NSURLSessionTask. WebSocket task will also provide -/// support for cookies and will store cookies to the cookie storage on the session and will attach cookies to -/// outgoing HTTP handshake requests. -class NSURLSessionWebSocketTask extends NSURLSessionTask { - NSURLSessionWebSocketTask._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int MACH_MSGH_BITS_USER = 2149523231; - /// Returns a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. - static NSURLSessionWebSocketTask castFrom(T other) { - return NSURLSessionWebSocketTask._(other._id, other._lib, - retain: true, release: true); - } +const int MACH_MSGH_BITS_RAISEIMP = 536870912; - /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. - static NSURLSessionWebSocketTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionWebSocketTask._(other, lib, - retain: retain, release: release); - } +const int MACH_MSGH_BITS_DENAP = 536870912; - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionWebSocketTask1); - } +const int MACH_MSGH_BITS_IMPHOLDASRT = 268435456; - /// Sends a WebSocket message. If an error occurs, any outstanding work will also fail. - /// Note that invocation of the completion handler does not - /// guarantee that the remote side has received all the bytes, only - /// that they have been written to the kernel. - void sendMessage_completionHandler_( - NSURLSessionWebSocketMessage? message, ObjCBlock13 completionHandler) { - return _lib._objc_msgSend_296( - _id, - _lib._sel_sendMessage_completionHandler_1, - message?._id ?? ffi.nullptr, - completionHandler._impl); - } +const int MACH_MSGH_BITS_DENAPHOLDASRT = 268435456; - /// Reads a WebSocket message once all the frames of the message are available. - /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out - /// and all outstanding work will also fail resulting in the end of the task. - void receiveMessageWithCompletionHandler_(ObjCBlock14 completionHandler) { - return _lib._objc_msgSend_297( - _id, - _lib._sel_receiveMessageWithCompletionHandler_1, - completionHandler._impl); - } +const int MACH_MSGH_BITS_CIRCULAR = 268435456; - /// Sends a ping frame from the client side. The pongReceiveHandler is invoked when the client - /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving - /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. - /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. - void sendPingWithPongReceiveHandler_(ObjCBlock13 pongReceiveHandler) { - return _lib._objc_msgSend_298(_id, - _lib._sel_sendPingWithPongReceiveHandler_1, pongReceiveHandler._impl); - } +const int MACH_MSGH_BITS_USED = 2954829599; - /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. - /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. - void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { - return _lib._objc_msgSend_299(_id, _lib._sel_cancelWithCloseCode_reason_1, - closeCode, reason?._id ?? ffi.nullptr); - } +const int MACH_MSG_TYPE_MOVE_RECEIVE = 16; - /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Recieve calls will error out if this value is reached - int get maximumMessageSize { - return _lib._objc_msgSend_61(_id, _lib._sel_maximumMessageSize1); - } +const int MACH_MSG_TYPE_MOVE_SEND = 17; - /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Recieve calls will error out if this value is reached - set maximumMessageSize(int value) { - _lib._objc_msgSend_230(_id, _lib._sel_setMaximumMessageSize_1, value); - } +const int MACH_MSG_TYPE_MOVE_SEND_ONCE = 18; - /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid - int get closeCode { - return _lib._objc_msgSend_300(_id, _lib._sel_closeCode1); - } +const int MACH_MSG_TYPE_COPY_SEND = 19; - /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running - NSData? get closeReason { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_closeReason1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } +const int MACH_MSG_TYPE_MAKE_SEND = 20; - @override - NSURLSessionWebSocketTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } +const int MACH_MSG_TYPE_MAKE_SEND_ONCE = 21; - static NSURLSessionWebSocketTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_new1); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); - } +const int MACH_MSG_TYPE_COPY_RECEIVE = 22; - static NSURLSessionWebSocketTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_alloc1); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); - } -} +const int MACH_MSG_TYPE_DISPOSE_RECEIVE = 24; -/// The client can create a WebSocket message object that will be passed to the send calls -/// and will be delivered from the receive calls. The message can be initialized with data or string. -/// If initialized with data, the string property will be nil and vice versa. -class NSURLSessionWebSocketMessage extends NSObject { - NSURLSessionWebSocketMessage._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int MACH_MSG_TYPE_DISPOSE_SEND = 25; - /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. - static NSURLSessionWebSocketMessage castFrom( - T other) { - return NSURLSessionWebSocketMessage._(other._id, other._lib, - retain: true, release: true); - } +const int MACH_MSG_TYPE_DISPOSE_SEND_ONCE = 26; - /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. - static NSURLSessionWebSocketMessage castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionWebSocketMessage._(other, lib, - retain: retain, release: release); - } +const int MACH_MSG_PHYSICAL_COPY = 0; - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionWebSocketMessage1); - } +const int MACH_MSG_VIRTUAL_COPY = 1; - /// Create a message with data type - NSURLSessionWebSocketMessage initWithData_(NSData? data) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } +const int MACH_MSG_ALLOCATE = 2; - /// Create a message with string type - NSURLSessionWebSocketMessage initWithString_(NSString? string) { - final _ret = _lib._objc_msgSend_29( - _id, _lib._sel_initWithString_1, string?._id ?? ffi.nullptr); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } +const int MACH_MSG_OVERWRITE = 3; - int get type { - return _lib._objc_msgSend_295(_id, _lib._sel_type1); - } +const int MACH_MSG_GUARD_FLAGS_NONE = 0; - NSData? get data { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_data1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } +const int MACH_MSG_GUARD_FLAGS_IMMOVABLE_RECEIVE = 1; - NSString? get string { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_string1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int MACH_MSG_GUARD_FLAGS_UNGUARDED_ON_SEND = 2; - @override - NSURLSessionWebSocketMessage init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } +const int MACH_MSG_GUARD_FLAGS_MASK = 3; - static NSURLSessionWebSocketMessage new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_new1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); - } +const int MACH_MSG_PORT_DESCRIPTOR = 0; - static NSURLSessionWebSocketMessage alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_alloc1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); - } -} +const int MACH_MSG_OOL_DESCRIPTOR = 1; -abstract class NSURLSessionWebSocketMessageType { - static const int NSURLSessionWebSocketMessageTypeData = 0; - static const int NSURLSessionWebSocketMessageTypeString = 1; -} +const int MACH_MSG_OOL_PORTS_DESCRIPTOR = 2; -void _ObjCBlock14_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} +const int MACH_MSG_OOL_VOLATILE_DESCRIPTOR = 3; -final _ObjCBlock14_closureRegistry = {}; -int _ObjCBlock14_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock14_registerClosure(Function fn) { - final id = ++_ObjCBlock14_closureRegistryIndex; - _ObjCBlock14_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int MACH_MSG_GUARDED_PORT_DESCRIPTOR = 4; -void _ObjCBlock14_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock14_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +const int MACH_MSG_TRAILER_FORMAT_0 = 0; -class ObjCBlock14 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock14._(this._impl, this._lib); - ObjCBlock14.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : _impl = - _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock14_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock14.fromFunction( - this._lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock14_closureTrampoline) - .cast(), - _ObjCBlock14_registerClosure(fn)); - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_impl, arg0, arg1); - } +const int MACH_MSGH_KIND_NORMAL = 0; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int MACH_MSGH_KIND_NOTIFICATION = 1; -/// The WebSocket close codes follow the close codes given in the RFC -abstract class NSURLSessionWebSocketCloseCode { - static const int NSURLSessionWebSocketCloseCodeInvalid = 0; - static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; - static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; - static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; - static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; - static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; - static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; - static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; - static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; - static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; - static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = - 1010; - static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; - static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; -} +const int MACH_MSG_TYPE_PORT_NONE = 0; -void _ObjCBlock15_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} +const int MACH_MSG_TYPE_PORT_NAME = 15; -final _ObjCBlock15_closureRegistry = {}; -int _ObjCBlock15_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock15_registerClosure(Function fn) { - final id = ++_ObjCBlock15_closureRegistryIndex; - _ObjCBlock15_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int MACH_MSG_TYPE_PORT_RECEIVE = 16; -void _ObjCBlock15_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock15_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +const int MACH_MSG_TYPE_PORT_SEND = 17; -class ObjCBlock15 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock15._(this._impl, this._lib); - ObjCBlock15.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock15_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock15.fromFunction( - this._lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock15_closureTrampoline) - .cast(), - _ObjCBlock15_registerClosure(fn)); - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_impl, arg0, arg1, arg2); - } +const int MACH_MSG_TYPE_PORT_SEND_ONCE = 18; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int MACH_MSG_TYPE_LAST = 22; -void _ObjCBlock16_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} +const int MACH_MSG_OPTION_NONE = 0; -final _ObjCBlock16_closureRegistry = {}; -int _ObjCBlock16_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock16_registerClosure(Function fn) { - final id = ++_ObjCBlock16_closureRegistryIndex; - _ObjCBlock16_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +const int MACH_SEND_MSG = 1; -void _ObjCBlock16_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock16_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +const int MACH_RCV_MSG = 2; -class ObjCBlock16 { - final ffi.Pointer<_ObjCBlock> _impl; - final NativeCupertinoHttp _lib; - ObjCBlock16._(this._impl, this._lib); - ObjCBlock16.fromFunctionPointer( - this._lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock16_fnPtrTrampoline) - .cast(), - ptr.cast()); - ObjCBlock16.fromFunction( - this._lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : _impl = _lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock16_closureTrampoline) - .cast(), - _ObjCBlock16_registerClosure(fn)); - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _impl.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_impl, arg0, arg1, arg2); - } +const int MACH_RCV_LARGE = 4; - ffi.Pointer<_ObjCBlock> get pointer => _impl; -} +const int MACH_RCV_LARGE_IDENTITY = 8; -/// Disposition options for various delegate messages -abstract class NSURLSessionDelayedRequestDisposition { - /// Use the original request provided when the task was created; the request parameter is ignored. - static const int NSURLSessionDelayedRequestContinueLoading = 0; +const int MACH_SEND_TIMEOUT = 16; - /// Use the specified request, which may not be nil. - static const int NSURLSessionDelayedRequestUseNewRequest = 1; +const int MACH_SEND_OVERRIDE = 32; - /// Cancel the task; the request parameter is ignored. - static const int NSURLSessionDelayedRequestCancel = 2; -} +const int MACH_SEND_INTERRUPT = 64; -abstract class NSURLSessionAuthChallengeDisposition { - /// Use the specified credential, which may be nil - static const int NSURLSessionAuthChallengeUseCredential = 0; +const int MACH_SEND_NOTIFY = 128; - /// Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored. - static const int NSURLSessionAuthChallengePerformDefaultHandling = 1; +const int MACH_SEND_ALWAYS = 65536; - /// The entire request will be canceled; the credential parameter is ignored. - static const int NSURLSessionAuthChallengeCancelAuthenticationChallenge = 2; +const int MACH_SEND_FILTER_NONFATAL = 65536; - /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. - static const int NSURLSessionAuthChallengeRejectProtectionSpace = 3; -} +const int MACH_SEND_TRAILER = 131072; -abstract class NSURLSessionResponseDisposition { - /// Cancel the load, this is the same as -[task cancel] - static const int NSURLSessionResponseCancel = 0; +const int MACH_SEND_NOIMPORTANCE = 262144; - /// Allow the load to continue - static const int NSURLSessionResponseAllow = 1; +const int MACH_SEND_NODENAP = 262144; - /// Turn this request into a download - static const int NSURLSessionResponseBecomeDownload = 2; +const int MACH_SEND_IMPORTANCE = 524288; - /// Turn this task into a stream task - static const int NSURLSessionResponseBecomeStream = 3; -} +const int MACH_SEND_SYNC_OVERRIDE = 1048576; -/// The resource fetch type. -abstract class NSURLSessionTaskMetricsResourceFetchType { - static const int NSURLSessionTaskMetricsResourceFetchTypeUnknown = 0; +const int MACH_SEND_PROPAGATE_QOS = 2097152; - /// The resource was loaded over the network. - static const int NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad = 1; +const int MACH_SEND_SYNC_USE_THRPRI = 2097152; - /// The resource was pushed by the server to the client. - static const int NSURLSessionTaskMetricsResourceFetchTypeServerPush = 2; +const int MACH_SEND_KERNEL = 4194304; - /// The resource was retrieved from the local storage. - static const int NSURLSessionTaskMetricsResourceFetchTypeLocalCache = 3; -} +const int MACH_SEND_SYNC_BOOTSTRAP_CHECKIN = 8388608; -/// DNS protocol used for domain resolution. -abstract class NSURLSessionTaskMetricsDomainResolutionProtocol { - static const int NSURLSessionTaskMetricsDomainResolutionProtocolUnknown = 0; +const int MACH_RCV_TIMEOUT = 256; - /// Resolution used DNS over UDP. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolUDP = 1; +const int MACH_RCV_NOTIFY = 0; - /// Resolution used DNS over TCP. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolTCP = 2; +const int MACH_RCV_INTERRUPT = 1024; - /// Resolution used DNS over TLS. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolTLS = 3; +const int MACH_RCV_VOUCHER = 2048; - /// Resolution used DNS over HTTPS. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS = 4; -} +const int MACH_RCV_OVERWRITE = 0; -/// This class defines the performance metrics collected for a request/response transaction during the task execution. -class NSURLSessionTaskTransactionMetrics extends NSObject { - NSURLSessionTaskTransactionMetrics._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int MACH_RCV_GUARDED_DESC = 4096; - /// Returns a [NSURLSessionTaskTransactionMetrics] that points to the same underlying object as [other]. - static NSURLSessionTaskTransactionMetrics castFrom( - T other) { - return NSURLSessionTaskTransactionMetrics._(other._id, other._lib, - retain: true, release: true); - } +const int MACH_RCV_SYNC_WAIT = 16384; - /// Returns a [NSURLSessionTaskTransactionMetrics] that wraps the given raw object pointer. - static NSURLSessionTaskTransactionMetrics castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTaskTransactionMetrics._(other, lib, - retain: retain, release: release); - } +const int MACH_RCV_SYNC_PEEK = 32768; - /// Returns whether [obj] is an instance of [NSURLSessionTaskTransactionMetrics]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTaskTransactionMetrics1); - } +const int MACH_MSG_STRICT_REPLY = 512; - /// Represents the transaction request. - NSURLRequest? get request { - final _ret = _lib._objc_msgSend_237(_id, _lib._sel_request1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } +const int MACH_RCV_TRAILER_NULL = 0; - /// Represents the transaction response. Can be nil if error occurred and no response was generated. - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_239(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); - } +const int MACH_RCV_TRAILER_SEQNO = 1; - /// fetchStartDate returns the time when the user agent started fetching the resource, whether or not the resource was retrieved from the server or local resources. - /// - /// The following metrics will be set to nil, if a persistent connection was used or the resource was retrieved from local resources: - /// - /// domainLookupStartDate - /// domainLookupEndDate - /// connectStartDate - /// connectEndDate - /// secureConnectionStartDate - /// secureConnectionEndDate - NSDate? get fetchStartDate { - final _ret = _lib._objc_msgSend_253(_id, _lib._sel_fetchStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +const int MACH_RCV_TRAILER_SENDER = 2; - /// domainLookupStartDate returns the time immediately before the user agent started the name lookup for the resource. - NSDate? get domainLookupStartDate { - final _ret = _lib._objc_msgSend_253(_id, _lib._sel_domainLookupStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +const int MACH_RCV_TRAILER_AUDIT = 3; - /// domainLookupEndDate returns the time after the name lookup was completed. - NSDate? get domainLookupEndDate { - final _ret = _lib._objc_msgSend_253(_id, _lib._sel_domainLookupEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +const int MACH_RCV_TRAILER_CTX = 4; - /// connectStartDate is the time immediately before the user agent started establishing the connection to the server. - /// - /// For example, this would correspond to the time immediately before the user agent started trying to establish the TCP connection. - NSDate? get connectStartDate { - final _ret = _lib._objc_msgSend_253(_id, _lib._sel_connectStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +const int MACH_RCV_TRAILER_AV = 7; - /// If an encrypted connection was used, secureConnectionStartDate is the time immediately before the user agent started the security handshake to secure the current connection. - /// - /// For example, this would correspond to the time immediately before the user agent started the TLS handshake. - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSDate? get secureConnectionStartDate { - final _ret = - _lib._objc_msgSend_253(_id, _lib._sel_secureConnectionStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +const int MACH_RCV_TRAILER_LABELS = 8; - /// If an encrypted connection was used, secureConnectionEndDate is the time immediately after the security handshake completed. - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSDate? get secureConnectionEndDate { - final _ret = - _lib._objc_msgSend_253(_id, _lib._sel_secureConnectionEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +const int MACH_RCV_TRAILER_MASK = 251658240; - /// connectEndDate is the time immediately after the user agent finished establishing the connection to the server, including completion of security-related and other handshakes. - NSDate? get connectEndDate { - final _ret = _lib._objc_msgSend_253(_id, _lib._sel_connectEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +const int MACH_MSG_SUCCESS = 0; - /// requestStartDate is the time immediately before the user agent started requesting the source, regardless of whether the resource was retrieved from the server or local resources. - /// - /// For example, this would correspond to the time immediately before the user agent sent an HTTP GET request. - NSDate? get requestStartDate { - final _ret = _lib._objc_msgSend_253(_id, _lib._sel_requestStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +const int MACH_MSG_MASK = 15872; - /// requestEndDate is the time immediately after the user agent finished requesting the source, regardless of whether the resource was retrieved from the server or local resources. - /// - /// For example, this would correspond to the time immediately after the user agent finished sending the last byte of the request. - NSDate? get requestEndDate { - final _ret = _lib._objc_msgSend_253(_id, _lib._sel_requestEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +const int MACH_MSG_IPC_SPACE = 8192; - /// responseStartDate is the time immediately after the user agent received the first byte of the response from the server or from local resources. - /// - /// For example, this would correspond to the time immediately after the user agent received the first byte of an HTTP response. - NSDate? get responseStartDate { - final _ret = _lib._objc_msgSend_253(_id, _lib._sel_responseStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +const int MACH_MSG_VM_SPACE = 4096; - /// responseEndDate is the time immediately after the user agent received the last byte of the resource. - NSDate? get responseEndDate { - final _ret = _lib._objc_msgSend_253(_id, _lib._sel_responseEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +const int MACH_MSG_IPC_KERNEL = 2048; - /// The network protocol used to fetch the resource, as identified by the ALPN Protocol ID Identification Sequence [RFC7301]. - /// E.g., h2, http/1.1, spdy/3.1. - /// - /// When a proxy is configured AND a tunnel connection is established, then this attribute returns the value for the tunneled protocol. - /// - /// For example: - /// If no proxy were used, and HTTP/2 was negotiated, then h2 would be returned. - /// If HTTP/1.1 were used to the proxy, and the tunneled connection was HTTP/2, then h2 would be returned. - /// If HTTP/1.1 were used to the proxy, and there were no tunnel, then http/1.1 would be returned. - NSString? get networkProtocolName { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_networkProtocolName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int MACH_MSG_VM_KERNEL = 1024; - /// This property is set to YES if a proxy connection was used to fetch the resource. - bool get proxyConnection { - return _lib._objc_msgSend_11(_id, _lib._sel_isProxyConnection1); - } +const int MACH_SEND_IN_PROGRESS = 268435457; - /// This property is set to YES if a persistent connection was used to fetch the resource. - bool get reusedConnection { - return _lib._objc_msgSend_11(_id, _lib._sel_isReusedConnection1); - } +const int MACH_SEND_INVALID_DATA = 268435458; - /// Indicates whether the resource was loaded, pushed or retrieved from the local cache. - int get resourceFetchType { - return _lib._objc_msgSend_311(_id, _lib._sel_resourceFetchType1); - } +const int MACH_SEND_INVALID_DEST = 268435459; - /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. - int get countOfRequestHeaderBytesSent { - return _lib._objc_msgSend_247( - _id, _lib._sel_countOfRequestHeaderBytesSent1); - } +const int MACH_SEND_TIMED_OUT = 268435460; - /// countOfRequestBodyBytesSent is the number of bytes transferred for request body. - /// It includes protocol-specific framing, transfer encoding, and content encoding. - int get countOfRequestBodyBytesSent { - return _lib._objc_msgSend_247(_id, _lib._sel_countOfRequestBodyBytesSent1); - } +const int MACH_SEND_INVALID_VOUCHER = 268435461; - /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. - int get countOfRequestBodyBytesBeforeEncoding { - return _lib._objc_msgSend_247( - _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); - } +const int MACH_SEND_INTERRUPTED = 268435463; - /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. - int get countOfResponseHeaderBytesReceived { - return _lib._objc_msgSend_247( - _id, _lib._sel_countOfResponseHeaderBytesReceived1); - } +const int MACH_SEND_MSG_TOO_SMALL = 268435464; - /// countOfResponseBodyBytesReceived is the number of bytes transferred for response header. - /// It includes protocol-specific framing, transfer encoding, and content encoding. - int get countOfResponseBodyBytesReceived { - return _lib._objc_msgSend_247( - _id, _lib._sel_countOfResponseBodyBytesReceived1); - } +const int MACH_SEND_INVALID_REPLY = 268435465; - /// countOfResponseBodyBytesAfterDecoding is the size of data delivered to your delegate or completion handler. - int get countOfResponseBodyBytesAfterDecoding { - return _lib._objc_msgSend_247( - _id, _lib._sel_countOfResponseBodyBytesAfterDecoding1); - } +const int MACH_SEND_INVALID_RIGHT = 268435466; - /// localAddress is the IP address string of the local interface for the connection. - /// - /// For multipath protocols, this is the local address of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSString? get localAddress { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_localAddress1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int MACH_SEND_INVALID_NOTIFY = 268435467; - /// localPort is the port number of the local interface for the connection. - /// - /// For multipath protocols, this is the local port of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSNumber? get localPort { - final _ret = _lib._objc_msgSend_69(_id, _lib._sel_localPort1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +const int MACH_SEND_INVALID_MEMORY = 268435468; - /// remoteAddress is the IP address string of the remote interface for the connection. - /// - /// For multipath protocols, this is the remote address of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSString? get remoteAddress { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_remoteAddress1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int MACH_SEND_NO_BUFFER = 268435469; - /// remotePort is the port number of the remote interface for the connection. - /// - /// For multipath protocols, this is the remote port of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSNumber? get remotePort { - final _ret = _lib._objc_msgSend_69(_id, _lib._sel_remotePort1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +const int MACH_SEND_TOO_LARGE = 268435470; - /// negotiatedTLSProtocolVersion is the TLS protocol version negotiated for the connection. - /// It is a 2-byte sequence in host byte order. - /// - /// Please refer to tls_protocol_version_t enum in Security/SecProtocolTypes.h - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSNumber? get negotiatedTLSProtocolVersion { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_negotiatedTLSProtocolVersion1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +const int MACH_SEND_INVALID_TYPE = 268435471; - /// negotiatedTLSCipherSuite is the TLS cipher suite negotiated for the connection. - /// It is a 2-byte sequence in host byte order. - /// - /// Please refer to tls_ciphersuite_t enum in Security/SecProtocolTypes.h - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSNumber? get negotiatedTLSCipherSuite { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_negotiatedTLSCipherSuite1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +const int MACH_SEND_INVALID_HEADER = 268435472; - /// Whether the connection is established over a cellular interface. - bool get cellular { - return _lib._objc_msgSend_11(_id, _lib._sel_isCellular1); - } +const int MACH_SEND_INVALID_TRAILER = 268435473; - /// Whether the connection is established over an expensive interface. - bool get expensive { - return _lib._objc_msgSend_11(_id, _lib._sel_isExpensive1); - } +const int MACH_SEND_INVALID_CONTEXT = 268435474; - /// Whether the connection is established over a constrained interface. - bool get constrained { - return _lib._objc_msgSend_11(_id, _lib._sel_isConstrained1); - } +const int MACH_SEND_INVALID_RT_OOL_SIZE = 268435477; - /// Whether a multipath protocol is successfully negotiated for the connection. - bool get multipath { - return _lib._objc_msgSend_11(_id, _lib._sel_isMultipath1); - } +const int MACH_SEND_NO_GRANT_DEST = 268435478; - /// DNS protocol used for domain resolution. - int get domainResolutionProtocol { - return _lib._objc_msgSend_312(_id, _lib._sel_domainResolutionProtocol1); - } +const int MACH_SEND_MSG_FILTERED = 268435479; - @override - NSURLSessionTaskTransactionMetrics init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: true, release: true); - } +const int MACH_RCV_IN_PROGRESS = 268451841; - static NSURLSessionTaskTransactionMetrics new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_new1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: false, release: true); - } +const int MACH_RCV_INVALID_NAME = 268451842; - static NSURLSessionTaskTransactionMetrics alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_alloc1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: false, release: true); - } -} +const int MACH_RCV_TIMED_OUT = 268451843; -class NSURLSessionTaskMetrics extends NSObject { - NSURLSessionTaskMetrics._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int MACH_RCV_TOO_LARGE = 268451844; - /// Returns a [NSURLSessionTaskMetrics] that points to the same underlying object as [other]. - static NSURLSessionTaskMetrics castFrom(T other) { - return NSURLSessionTaskMetrics._(other._id, other._lib, - retain: true, release: true); - } +const int MACH_RCV_INTERRUPTED = 268451845; - /// Returns a [NSURLSessionTaskMetrics] that wraps the given raw object pointer. - static NSURLSessionTaskMetrics castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTaskMetrics._(other, lib, - retain: retain, release: release); - } +const int MACH_RCV_PORT_CHANGED = 268451846; - /// Returns whether [obj] is an instance of [NSURLSessionTaskMetrics]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTaskMetrics1); - } +const int MACH_RCV_INVALID_NOTIFY = 268451847; - /// transactionMetrics array contains the metrics collected for every request/response transaction created during the task execution. - NSArray? get transactionMetrics { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_transactionMetrics1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int MACH_RCV_INVALID_DATA = 268451848; - /// Interval from the task creation time to the task completion time. - /// Task creation time is the time when the task was instantiated. - /// Task completion time is the time when the task is about to change its internal state to completed. - NSDateInterval? get taskInterval { - final _ret = _lib._objc_msgSend_313(_id, _lib._sel_taskInterval1); - return _ret.address == 0 - ? null - : NSDateInterval._(_ret, _lib, retain: true, release: true); - } +const int MACH_RCV_PORT_DIED = 268451849; - /// redirectCount is the number of redirects that were recorded. - int get redirectCount { - return _lib._objc_msgSend_12(_id, _lib._sel_redirectCount1); - } +const int MACH_RCV_IN_SET = 268451850; - @override - NSURLSessionTaskMetrics init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: true, release: true); - } +const int MACH_RCV_HEADER_ERROR = 268451851; - static NSURLSessionTaskMetrics new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskMetrics1, _lib._sel_new1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); - } +const int MACH_RCV_BODY_ERROR = 268451852; - static NSURLSessionTaskMetrics alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskMetrics1, _lib._sel_alloc1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); - } -} +const int MACH_RCV_INVALID_TYPE = 268451853; -class NSDateInterval extends _ObjCWrapper { - NSDateInterval._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int MACH_RCV_SCATTER_SMALL = 268451854; - /// Returns a [NSDateInterval] that points to the same underlying object as [other]. - static NSDateInterval castFrom(T other) { - return NSDateInterval._(other._id, other._lib, retain: true, release: true); - } +const int MACH_RCV_INVALID_TRAILER = 268451855; - /// Returns a [NSDateInterval] that wraps the given raw object pointer. - static NSDateInterval castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDateInterval._(other, lib, retain: retain, release: release); - } +const int MACH_RCV_IN_PROGRESS_TIMED = 268451857; - /// Returns whether [obj] is an instance of [NSDateInterval]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSDateInterval1); - } -} +const int MACH_RCV_INVALID_REPLY = 268451858; -typedef NSURLFileResourceType = ffi.Pointer; -typedef NSURLThumbnailDictionaryItem = ffi.Pointer; -typedef NSURLFileProtectionType = ffi.Pointer; -typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; -typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; -typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; +const int DISPATCH_MACH_SEND_DEAD = 1; -/// NSURLQueryItem encapsulates a single query name-value pair. The name and value strings of a query name-value pair are not percent encoded. For use with the NSURLComponents queryItems property. -class NSURLQueryItem extends NSObject { - NSURLQueryItem._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int DISPATCH_MEMORYPRESSURE_NORMAL = 1; - /// Returns a [NSURLQueryItem] that points to the same underlying object as [other]. - static NSURLQueryItem castFrom(T other) { - return NSURLQueryItem._(other._id, other._lib, retain: true, release: true); - } +const int DISPATCH_MEMORYPRESSURE_WARN = 2; - /// Returns a [NSURLQueryItem] that wraps the given raw object pointer. - static NSURLQueryItem castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLQueryItem._(other, lib, retain: retain, release: release); - } +const int DISPATCH_MEMORYPRESSURE_CRITICAL = 4; - /// Returns whether [obj] is an instance of [NSURLQueryItem]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLQueryItem1); - } +const int DISPATCH_PROC_EXIT = 2147483648; - NSURLQueryItem initWithName_value_(NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_314(_id, _lib._sel_initWithName_value_1, - name?._id ?? ffi.nullptr, value?._id ?? ffi.nullptr); - return NSURLQueryItem._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_PROC_FORK = 1073741824; - static NSURLQueryItem queryItemWithName_value_( - NativeCupertinoHttp _lib, NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_314( - _lib._class_NSURLQueryItem1, - _lib._sel_queryItemWithName_value_1, - name?._id ?? ffi.nullptr, - value?._id ?? ffi.nullptr); - return NSURLQueryItem._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_PROC_EXEC = 536870912; - NSString? get name { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_PROC_SIGNAL = 134217728; - NSString? get value { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_value1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_VNODE_DELETE = 1; - static NSURLQueryItem new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_new1); - return NSURLQueryItem._(_ret, _lib, retain: false, release: true); - } +const int DISPATCH_VNODE_WRITE = 2; - static NSURLQueryItem alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_alloc1); - return NSURLQueryItem._(_ret, _lib, retain: false, release: true); - } -} +const int DISPATCH_VNODE_EXTEND = 4; -class NSURLComponents extends NSObject { - NSURLComponents._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int DISPATCH_VNODE_ATTRIB = 8; - /// Returns a [NSURLComponents] that points to the same underlying object as [other]. - static NSURLComponents castFrom(T other) { - return NSURLComponents._(other._id, other._lib, - retain: true, release: true); - } +const int DISPATCH_VNODE_LINK = 16; - /// Returns a [NSURLComponents] that wraps the given raw object pointer. - static NSURLComponents castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLComponents._(other, lib, retain: retain, release: release); - } +const int DISPATCH_VNODE_RENAME = 32; - /// Returns whether [obj] is an instance of [NSURLComponents]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLComponents1); - } +const int DISPATCH_VNODE_REVOKE = 64; - /// Initialize a NSURLComponents with all components undefined. Designated initializer. - @override - NSURLComponents init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_VNODE_FUNLOCK = 256; - /// Initialize a NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. - NSURLComponents initWithURL_resolvingAgainstBaseURL_( - NSURL? url, bool resolve) { - final _ret = _lib._objc_msgSend_115( - _id, - _lib._sel_initWithURL_resolvingAgainstBaseURL_1, - url?._id ?? ffi.nullptr, - resolve); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_TIMER_STRICT = 1; - /// Initializes and returns a newly created NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. - static NSURLComponents componentsWithURL_resolvingAgainstBaseURL_( - NativeCupertinoHttp _lib, NSURL? url, bool resolve) { - final _ret = _lib._objc_msgSend_115( - _lib._class_NSURLComponents1, - _lib._sel_componentsWithURL_resolvingAgainstBaseURL_1, - url?._id ?? ffi.nullptr, - resolve); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_ONCE_INLINE_FASTPATH = 1; - /// Initialize a NSURLComponents with a URL string. If the URLString is malformed, nil is returned. - NSURLComponents initWithString_(NSString? URLString) { - final _ret = _lib._objc_msgSend_29( - _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_DATA_DESTRUCTOR_DEFAULT = 0; - /// Initializes and returns a newly created NSURLComponents with a URL string. If the URLString is malformed, nil is returned. - static NSURLComponents componentsWithString_( - NativeCupertinoHttp _lib, NSString? URLString) { - final _ret = _lib._objc_msgSend_29(_lib._class_NSURLComponents1, - _lib._sel_componentsWithString_1, URLString?._id ?? ffi.nullptr); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_IO_STREAM = 0; - /// Returns a URL created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSURL? get URL { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_IO_RANDOM = 1; - /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSURL URLRelativeToURL_(NSURL? baseURL) { - final _ret = _lib._objc_msgSend_315( - _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_IO_STOP = 1; - /// Returns a URL string created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSString? get string { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_string1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int DISPATCH_IO_STRICT_INTERVAL = 1; - /// Attempting to set the scheme with an invalid scheme string will cause an exception. - NSString? get scheme { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_scheme1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int __COREFOUNDATION_CFSET__ = 1; - /// Attempting to set the scheme with an invalid scheme string will cause an exception. - set scheme(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); - } +const int __COREFOUNDATION_CFSTRINGENCODINGEXT__ = 1; - NSString? get user { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int __COREFOUNDATION_CFTREE__ = 1; - set user(NSString? value) { - _lib._objc_msgSend_216(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); - } +const int __COREFOUNDATION_CFURLACCESS__ = 1; - NSString? get password { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_password1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int __COREFOUNDATION_CFUUID__ = 1; - set password(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); - } +const int __COREFOUNDATION_CFUTILITIES__ = 1; - NSString? get host { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_host1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int __COREFOUNDATION_CFBUNDLE__ = 1; - set host(NSString? value) { - _lib._objc_msgSend_216(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); - } +const int CPU_STATE_MAX = 4; - /// Attempting to set a negative port number will cause an exception. - NSNumber? get port { - final _ret = _lib._objc_msgSend_69(_id, _lib._sel_port1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +const int CPU_STATE_USER = 0; - /// Attempting to set a negative port number will cause an exception. - set port(NSNumber? value) { - _lib._objc_msgSend_251(_id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); - } +const int CPU_STATE_SYSTEM = 1; - NSString? get path { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_path1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int CPU_STATE_IDLE = 2; - set path(NSString? value) { - _lib._objc_msgSend_216(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); - } +const int CPU_STATE_NICE = 3; - NSString? get query { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_query1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int CPU_ARCH_MASK = 4278190080; - set query(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); - } +const int CPU_ARCH_ABI64 = 16777216; - NSString? get fragment { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_fragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int CPU_ARCH_ABI64_32 = 33554432; - set fragment(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); - } +const int CPU_SUBTYPE_MASK = 4278190080; - /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - NSString? get percentEncodedUser { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_percentEncodedUser1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int CPU_SUBTYPE_LIB64 = 2147483648; - /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - set percentEncodedUser(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); - } +const int CPU_SUBTYPE_PTRAUTH_ABI = 2147483648; - NSString? get percentEncodedPassword { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_percentEncodedPassword1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int CPU_SUBTYPE_INTEL_FAMILY_MAX = 15; - set percentEncodedPassword(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); - } +const int CPU_SUBTYPE_INTEL_MODEL_ALL = 0; - NSString? get percentEncodedHost { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_percentEncodedHost1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int CPU_SUBTYPE_ARM64_PTR_AUTH_MASK = 251658240; - set percentEncodedHost(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); - } +const int CPUFAMILY_UNKNOWN = 0; - NSString? get percentEncodedPath { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_percentEncodedPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int CPUFAMILY_POWERPC_G3 = 3471054153; - set percentEncodedPath(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); - } +const int CPUFAMILY_POWERPC_G4 = 2009171118; - NSString? get percentEncodedQuery { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_percentEncodedQuery1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int CPUFAMILY_POWERPC_G5 = 3983988906; + +const int CPUFAMILY_INTEL_6_13 = 2855483691; + +const int CPUFAMILY_INTEL_PENRYN = 2028621756; + +const int CPUFAMILY_INTEL_NEHALEM = 1801080018; + +const int CPUFAMILY_INTEL_WESTMERE = 1463508716; + +const int CPUFAMILY_INTEL_SANDYBRIDGE = 1418770316; - set percentEncodedQuery(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); - } +const int CPUFAMILY_INTEL_IVYBRIDGE = 526772277; - NSString? get percentEncodedFragment { - final _ret = _lib._objc_msgSend_19(_id, _lib._sel_percentEncodedFragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int CPUFAMILY_INTEL_HASWELL = 280134364; - set percentEncodedFragment(NSString? value) { - _lib._objc_msgSend_216( - _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); - } +const int CPUFAMILY_INTEL_BROADWELL = 1479463068; - /// These properties return the character range of a component in the URL string returned by -[NSURLComponents string]. If the component does not exist in the NSURLComponents object, {NSNotFound, 0} is returned. Note: Zero length components are legal. For example, the URL string "scheme://:@/?#" has a zero length user, password, host, query and fragment; the URL strings "scheme:" and "" both have a zero length path. - NSRange get rangeOfScheme { - return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfScheme1); - } +const int CPUFAMILY_INTEL_SKYLAKE = 939270559; - NSRange get rangeOfUser { - return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfUser1); - } +const int CPUFAMILY_INTEL_KABYLAKE = 260141638; - NSRange get rangeOfPassword { - return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfPassword1); - } +const int CPUFAMILY_INTEL_ICELAKE = 943936839; - NSRange get rangeOfHost { - return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfHost1); - } +const int CPUFAMILY_INTEL_COMETLAKE = 486055998; - NSRange get rangeOfPort { - return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfPort1); - } +const int CPUFAMILY_ARM_9 = 3878847406; - NSRange get rangeOfPath { - return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfPath1); - } +const int CPUFAMILY_ARM_11 = 2415272152; - NSRange get rangeOfQuery { - return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfQuery1); - } +const int CPUFAMILY_ARM_XSCALE = 1404044789; - NSRange get rangeOfFragment { - return _lib._objc_msgSend_316(_id, _lib._sel_rangeOfFragment1); - } +const int CPUFAMILY_ARM_12 = 3172666089; - /// The query component as an array of NSURLQueryItems for this NSURLComponents. - /// - /// Each NSURLQueryItem represents a single key-value pair, - /// - /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. - /// - /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. - /// - /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. - /// - /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. - NSArray? get queryItems { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_queryItems1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int CPUFAMILY_ARM_13 = 214503012; - /// The query component as an array of NSURLQueryItems for this NSURLComponents. - /// - /// Each NSURLQueryItem represents a single key-value pair, - /// - /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. - /// - /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. - /// - /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. - /// - /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. - set queryItems(NSArray? value) { - _lib._objc_msgSend_265( - _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); - } +const int CPUFAMILY_ARM_14 = 2517073649; - /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. - /// - /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. - NSArray? get percentEncodedQueryItems { - final _ret = - _lib._objc_msgSend_72(_id, _lib._sel_percentEncodedQueryItems1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int CPUFAMILY_ARM_15 = 2823887818; - /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. - /// - /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. - set percentEncodedQueryItems(NSArray? value) { - _lib._objc_msgSend_265(_id, _lib._sel_setPercentEncodedQueryItems_1, - value?._id ?? ffi.nullptr); - } +const int CPUFAMILY_ARM_SWIFT = 506291073; - static NSURLComponents new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_new1); - return NSURLComponents._(_ret, _lib, retain: false, release: true); - } +const int CPUFAMILY_ARM_CYCLONE = 933271106; - static NSURLComponents alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_alloc1); - return NSURLComponents._(_ret, _lib, retain: false, release: true); - } -} +const int CPUFAMILY_ARM_TYPHOON = 747742334; -/// NSFileSecurity encapsulates a file system object's security information. NSFileSecurity and CFFileSecurity are toll-free bridged. Use the CFFileSecurity API for access to the low-level file security properties encapsulated by NSFileSecurity. -class NSFileSecurity extends NSObject { - NSFileSecurity._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int CPUFAMILY_ARM_TWISTER = 2465937352; - /// Returns a [NSFileSecurity] that points to the same underlying object as [other]. - static NSFileSecurity castFrom(T other) { - return NSFileSecurity._(other._id, other._lib, retain: true, release: true); - } +const int CPUFAMILY_ARM_HURRICANE = 1741614739; - /// Returns a [NSFileSecurity] that wraps the given raw object pointer. - static NSFileSecurity castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileSecurity._(other, lib, retain: retain, release: release); - } +const int CPUFAMILY_ARM_MONSOON_MISTRAL = 3894312694; - /// Returns whether [obj] is an instance of [NSFileSecurity]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSFileSecurity1); - } +const int CPUFAMILY_ARM_VORTEX_TEMPEST = 131287967; - NSFileSecurity initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSFileSecurity._(_ret, _lib, retain: true, release: true); - } +const int CPUFAMILY_ARM_LIGHTNING_THUNDER = 1176831186; - static NSFileSecurity new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_new1); - return NSFileSecurity._(_ret, _lib, retain: false, release: true); - } +const int CPUFAMILY_ARM_FIRESTORM_ICESTORM = 458787763; - static NSFileSecurity alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_alloc1); - return NSFileSecurity._(_ret, _lib, retain: false, release: true); - } -} +const int CPUFAMILY_ARM_BLIZZARD_AVALANCHE = 3660830781; -typedef NSProgressUserInfoKey1 = ffi.Pointer; -typedef NSProgressKind1 = ffi.Pointer; -typedef NSProgressFileOperationKind1 = ffi.Pointer; +const int CPUSUBFAMILY_UNKNOWN = 0; -/// ! -/// @class NSHTTPURLResponse -/// -/// @abstract An NSHTTPURLResponse object represents a response to an -/// HTTP URL load. It is a specialization of NSURLResponse which -/// provides conveniences for accessing information specific to HTTP -/// protocol responses. -class NSHTTPURLResponse extends NSURLResponse { - NSHTTPURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int CPUSUBFAMILY_ARM_HP = 1; - /// Returns a [NSHTTPURLResponse] that points to the same underlying object as [other]. - static NSHTTPURLResponse castFrom(T other) { - return NSHTTPURLResponse._(other._id, other._lib, - retain: true, release: true); - } +const int CPUSUBFAMILY_ARM_HG = 2; - /// Returns a [NSHTTPURLResponse] that wraps the given raw object pointer. - static NSHTTPURLResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPURLResponse._(other, lib, retain: retain, release: release); - } +const int CPUSUBFAMILY_ARM_M = 3; - /// Returns whether [obj] is an instance of [NSHTTPURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSHTTPURLResponse1); - } +const int CPUSUBFAMILY_ARM_HS = 4; - /// ! - /// @method initWithURL:statusCode:HTTPVersion:headerFields: - /// @abstract initializer for NSHTTPURLResponse objects. - /// @param url the URL from which the response was generated. - /// @param statusCode an HTTP status code. - /// @param HTTPVersion The version of the HTTP response as represented by the server. This is typically represented as "HTTP/1.1". - /// @param headerFields A dictionary representing the header keys and values of the server response. - /// @result the instance of the object, or NULL if an error occurred during initialization. - /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. - NSHTTPURLResponse initWithURL_statusCode_HTTPVersion_headerFields_(NSURL? url, - int statusCode, NSString? HTTPVersion, NSDictionary? headerFields) { - final _ret = _lib._objc_msgSend_317( - _id, - _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, - url?._id ?? ffi.nullptr, - statusCode, - HTTPVersion?._id ?? ffi.nullptr, - headerFields?._id ?? ffi.nullptr); - return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); - } +const int CPUSUBFAMILY_ARM_HC_HD = 5; - /// ! - /// @abstract Returns the HTTP status code of the receiver. - /// @result The HTTP status code of the receiver. - int get statusCode { - return _lib._objc_msgSend_61(_id, _lib._sel_statusCode1); - } +const int CPUFAMILY_INTEL_6_23 = 2028621756; - /// ! - /// @abstract Returns a dictionary containing all the HTTP header fields - /// of the receiver. - /// @discussion By examining this header dictionary, clients can see - /// the "raw" header information which was reported to the protocol - /// implementation by the HTTP server. This may be of use to - /// sophisticated or special-purpose HTTP clients. - /// @result A dictionary containing all the HTTP header fields of the - /// receiver. - NSDictionary? get allHeaderFields { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_allHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int CPUFAMILY_INTEL_6_26 = 1801080018; - /// ! - /// @method valueForHTTPHeaderField: - /// @abstract Returns the value which corresponds to the given header - /// field. Note that, in keeping with the HTTP RFC, HTTP header field - /// names are case-insensitive. - /// @param field the header field name to use for the lookup - /// (case-insensitive). - /// @result the value associated with the given header field, or nil if - /// there is no value associated with the given header field. - NSString valueForHTTPHeaderField_(NSString? field) { - final _ret = _lib._objc_msgSend_149( - _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int __COREFOUNDATION_CFMESSAGEPORT__ = 1; - /// ! - /// @method localizedStringForStatusCode: - /// @abstract Convenience method which returns a localized string - /// corresponding to the status code for this response. - /// @param statusCode the status code to use to produce a localized string. - /// @result A localized string corresponding to the given status code. - static NSString localizedStringForStatusCode_( - NativeCupertinoHttp _lib, int statusCode) { - final _ret = _lib._objc_msgSend_318(_lib._class_NSHTTPURLResponse1, - _lib._sel_localizedStringForStatusCode_1, statusCode); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int __COREFOUNDATION_CFPLUGIN__ = 1; - static NSHTTPURLResponse new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_new1); - return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); - } +const int COREFOUNDATION_CFPLUGINCOM_SEPARATE = 1; - static NSHTTPURLResponse alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_alloc1); - return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); - } -} +const int __COREFOUNDATION_CFMACHPORT__ = 1; -typedef NSNotificationName = ffi.Pointer; +const int __COREFOUNDATION_CFATTRIBUTEDSTRING__ = 1; -class NSBlockOperation extends NSOperation { - NSBlockOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int __COREFOUNDATION_CFURLENUMERATOR__ = 1; - /// Returns a [NSBlockOperation] that points to the same underlying object as [other]. - static NSBlockOperation castFrom(T other) { - return NSBlockOperation._(other._id, other._lib, - retain: true, release: true); - } +const int __COREFOUNDATION_CFFILESECURITY__ = 1; - /// Returns a [NSBlockOperation] that wraps the given raw object pointer. - static NSBlockOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSBlockOperation._(other, lib, retain: retain, release: release); - } +const int KAUTH_GUID_SIZE = 16; - /// Returns whether [obj] is an instance of [NSBlockOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSBlockOperation1); - } +const int KAUTH_NTSID_MAX_AUTHORITIES = 16; - static NSBlockOperation blockOperationWithBlock_( - NativeCupertinoHttp _lib, ObjCBlock7 block) { - final _ret = _lib._objc_msgSend_319(_lib._class_NSBlockOperation1, - _lib._sel_blockOperationWithBlock_1, block._impl); - return NSBlockOperation._(_ret, _lib, retain: true, release: true); - } +const int KAUTH_NTSID_HDRSIZE = 8; - void addExecutionBlock_(ObjCBlock7 block) { - return _lib._objc_msgSend_275( - _id, _lib._sel_addExecutionBlock_1, block._impl); - } +const int KAUTH_EXTLOOKUP_SUCCESS = 0; - NSArray? get executionBlocks { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_executionBlocks1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int KAUTH_EXTLOOKUP_BADRQ = 1; - static NSBlockOperation new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_new1); - return NSBlockOperation._(_ret, _lib, retain: false, release: true); - } +const int KAUTH_EXTLOOKUP_FAILURE = 2; - static NSBlockOperation alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_alloc1); - return NSBlockOperation._(_ret, _lib, retain: false, release: true); - } -} +const int KAUTH_EXTLOOKUP_FATAL = 3; -class NSInvocationOperation extends NSOperation { - NSInvocationOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int KAUTH_EXTLOOKUP_INPROG = 100; - /// Returns a [NSInvocationOperation] that points to the same underlying object as [other]. - static NSInvocationOperation castFrom(T other) { - return NSInvocationOperation._(other._id, other._lib, - retain: true, release: true); - } +const int KAUTH_EXTLOOKUP_VALID_UID = 1; - /// Returns a [NSInvocationOperation] that wraps the given raw object pointer. - static NSInvocationOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInvocationOperation._(other, lib, - retain: retain, release: release); - } +const int KAUTH_EXTLOOKUP_VALID_UGUID = 2; - /// Returns whether [obj] is an instance of [NSInvocationOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSInvocationOperation1); - } +const int KAUTH_EXTLOOKUP_VALID_USID = 4; - NSInvocationOperation initWithTarget_selector_object_( - NSObject target, ffi.Pointer sel, NSObject arg) { - final _ret = _lib._objc_msgSend_320(_id, - _lib._sel_initWithTarget_selector_object_1, target._id, sel, arg._id); - return NSInvocationOperation._(_ret, _lib, retain: true, release: true); - } +const int KAUTH_EXTLOOKUP_VALID_GID = 8; - NSInvocationOperation initWithInvocation_(NSInvocation? inv) { - final _ret = _lib._objc_msgSend_321( - _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); - return NSInvocationOperation._(_ret, _lib, retain: true, release: true); - } +const int KAUTH_EXTLOOKUP_VALID_GGUID = 16; - NSInvocation? get invocation { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_invocation1); - return _ret.address == 0 - ? null - : NSInvocation._(_ret, _lib, retain: true, release: true); - } +const int KAUTH_EXTLOOKUP_VALID_GSID = 32; - NSObject get result { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_result1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int KAUTH_EXTLOOKUP_WANT_UID = 64; - static NSInvocationOperation new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocationOperation1, _lib._sel_new1); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); - } +const int KAUTH_EXTLOOKUP_WANT_UGUID = 128; - static NSInvocationOperation alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocationOperation1, _lib._sel_alloc1); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); - } -} +const int KAUTH_EXTLOOKUP_WANT_USID = 256; -typedef NSExceptionName = ffi.Pointer; +const int KAUTH_EXTLOOKUP_WANT_GID = 512; -class _Dart_Isolate extends ffi.Opaque {} +const int KAUTH_EXTLOOKUP_WANT_GGUID = 1024; -class _Dart_IsolateGroup extends ffi.Opaque {} +const int KAUTH_EXTLOOKUP_WANT_GSID = 2048; -class _Dart_Handle extends ffi.Opaque {} +const int KAUTH_EXTLOOKUP_WANT_MEMBERSHIP = 4096; -class _Dart_WeakPersistentHandle extends ffi.Opaque {} +const int KAUTH_EXTLOOKUP_VALID_MEMBERSHIP = 8192; -class _Dart_FinalizableHandle extends ffi.Opaque {} +const int KAUTH_EXTLOOKUP_ISMEMBER = 16384; -typedef Dart_WeakPersistentHandle = ffi.Pointer<_Dart_WeakPersistentHandle>; +const int KAUTH_EXTLOOKUP_VALID_PWNAM = 32768; -/// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the -/// version when changing this struct. -typedef Dart_HandleFinalizer = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef Dart_FinalizableHandle = ffi.Pointer<_Dart_FinalizableHandle>; +const int KAUTH_EXTLOOKUP_WANT_PWNAM = 65536; -class Dart_IsolateFlags extends ffi.Struct { - @ffi.Int32() - external int version; +const int KAUTH_EXTLOOKUP_VALID_GRNAM = 131072; - @ffi.Bool() - external bool enable_asserts; +const int KAUTH_EXTLOOKUP_WANT_GRNAM = 262144; - @ffi.Bool() - external bool use_field_guards; +const int KAUTH_EXTLOOKUP_VALID_SUPGRPS = 524288; - @ffi.Bool() - external bool use_osr; +const int KAUTH_EXTLOOKUP_WANT_SUPGRPS = 1048576; - @ffi.Bool() - external bool obfuscate; +const int KAUTH_EXTLOOKUP_REGISTER = 0; - @ffi.Bool() - external bool load_vmservice_library; +const int KAUTH_EXTLOOKUP_RESULT = 1; - @ffi.Bool() - external bool copy_parent_code; +const int KAUTH_EXTLOOKUP_WORKER = 2; - @ffi.Bool() - external bool null_safety; +const int KAUTH_EXTLOOKUP_DEREGISTER = 4; - @ffi.Bool() - external bool is_system_isolate; -} +const int KAUTH_GET_CACHE_SIZES = 8; -/// Forward declaration -class Dart_CodeObserver extends ffi.Struct { - external ffi.Pointer data; +const int KAUTH_SET_CACHE_SIZES = 16; - external Dart_OnNewCodeCallback on_new_code; -} +const int KAUTH_CLEAR_CACHES = 32; -/// Callback provided by the embedder that is used by the VM to notify on code -/// object creation, *before* it is invoked the first time. -/// This is useful for embedders wanting to e.g. keep track of PCs beyond -/// the lifetime of the garbage collected code objects. -/// Note that an address range may be used by more than one code object over the -/// lifecycle of a process. Clients of this function should record timestamps for -/// these compilation events and when collecting PCs to disambiguate reused -/// address ranges. -typedef Dart_OnNewCodeCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - uintptr_t, uintptr_t)>>; -typedef uintptr_t = ffi.UnsignedLong; +const String IDENTITYSVC_ENTITLEMENT = 'com.apple.private.identitysvc'; -/// Describes how to initialize the VM. Used with Dart_Initialize. -/// -/// \param version Identifies the version of the struct used by the client. -/// should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. -/// \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate -/// or NULL if no snapshot is provided. If provided, the buffer must remain -/// valid until Dart_Cleanup returns. -/// \param instructions_snapshot A buffer containing a snapshot of precompiled -/// instructions, or NULL if no snapshot is provided. If provided, the buffer -/// must remain valid until Dart_Cleanup returns. -/// \param initialize_isolate A function to be called during isolate -/// initialization inside an existing isolate group. -/// See Dart_InitializeIsolateCallback. -/// \param create_group A function to be called during isolate group creation. -/// See Dart_IsolateGroupCreateCallback. -/// \param shutdown A function to be called right before an isolate is shutdown. -/// See Dart_IsolateShutdownCallback. -/// \param cleanup A function to be called after an isolate was shutdown. -/// See Dart_IsolateCleanupCallback. -/// \param cleanup_group A function to be called after an isolate group is shutdown. -/// See Dart_IsolateGroupCleanupCallback. -/// \param get_service_assets A function to be called by the service isolate when -/// it requires the vmservice assets archive. -/// See Dart_GetVMServiceAssetsArchive. -/// \param code_observer An external code observer callback function. -/// The observer can be invoked as early as during the Dart_Initialize() call. -class Dart_InitializeParams extends ffi.Struct { - @ffi.Int32() - external int version; +const int KAUTH_ACE_KINDMASK = 15; - external ffi.Pointer vm_snapshot_data; +const int KAUTH_ACE_PERMIT = 1; - external ffi.Pointer vm_snapshot_instructions; +const int KAUTH_ACE_DENY = 2; - external Dart_IsolateGroupCreateCallback create_group; +const int KAUTH_ACE_AUDIT = 3; - external Dart_InitializeIsolateCallback initialize_isolate; +const int KAUTH_ACE_ALARM = 4; - external Dart_IsolateShutdownCallback shutdown_isolate; +const int KAUTH_ACE_INHERITED = 16; - external Dart_IsolateCleanupCallback cleanup_isolate; +const int KAUTH_ACE_FILE_INHERIT = 32; - external Dart_IsolateGroupCleanupCallback cleanup_group; +const int KAUTH_ACE_DIRECTORY_INHERIT = 64; - external Dart_ThreadExitCallback thread_exit; +const int KAUTH_ACE_LIMIT_INHERIT = 128; - external Dart_FileOpenCallback file_open; +const int KAUTH_ACE_ONLY_INHERIT = 256; - external Dart_FileReadCallback file_read; +const int KAUTH_ACE_SUCCESS = 512; - external Dart_FileWriteCallback file_write; +const int KAUTH_ACE_FAILURE = 1024; - external Dart_FileCloseCallback file_close; +const int KAUTH_ACE_INHERIT_CONTROL_FLAGS = 480; - external Dart_EntropySource entropy_source; +const int KAUTH_ACE_GENERIC_ALL = 2097152; - external Dart_GetVMServiceAssetsArchive get_service_assets; +const int KAUTH_ACE_GENERIC_EXECUTE = 4194304; - @ffi.Bool() - external bool start_kernel_isolate; +const int KAUTH_ACE_GENERIC_WRITE = 8388608; - external ffi.Pointer code_observer; -} +const int KAUTH_ACE_GENERIC_READ = 16777216; -/// An isolate creation and initialization callback function. -/// -/// This callback, provided by the embedder, is called when the VM -/// needs to create an isolate. The callback should create an isolate -/// by calling Dart_CreateIsolateGroup and load any scripts required for -/// execution. -/// -/// This callback may be called on a different thread than the one -/// running the parent isolate. -/// -/// When the function returns NULL, it is the responsibility of this -/// function to ensure that Dart_ShutdownIsolate has been called if -/// required (for example, if the isolate was created successfully by -/// Dart_CreateIsolateGroup() but the root library fails to load -/// successfully, then the function should call Dart_ShutdownIsolate -/// before returning). -/// -/// When the function returns NULL, the function should set *error to -/// a malloc-allocated buffer containing a useful error message. The -/// caller of this function (the VM) will make sure that the buffer is -/// freed. -/// -/// \param script_uri The uri of the main source file or snapshot to load. -/// Either the URI of the parent isolate set in Dart_CreateIsolateGroup for -/// Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the -/// library tag handler of the parent isolate. -/// The callback is responsible for loading the program by a call to -/// Dart_LoadScriptFromKernel. -/// \param main The name of the main entry point this isolate will -/// eventually run. This is provided for advisory purposes only to -/// improve debugging messages. The main function is not invoked by -/// this function. -/// \param package_root Ignored. -/// \param package_config Uri of the package configuration file (either in format -/// of .packages or .dart_tool/package_config.json) for this isolate -/// to resolve package imports against. If this parameter is not passed the -/// package resolution of the parent isolate should be used. -/// \param flags Default flags for this isolate being spawned. Either inherited -/// from the spawning isolate or passed as parameters when spawning the -/// isolate from Dart code. -/// \param isolate_data The isolate data which was passed to the -/// parent isolate when it was created by calling Dart_CreateIsolateGroup(). -/// \param error A structure into which the embedder can place a -/// C string containing an error message in the case of failures. -/// -/// \return The embedder returns NULL if the creation and -/// initialization was not successful and the isolate if successful. -typedef Dart_IsolateGroupCreateCallback = ffi.Pointer< - ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>; +const int KAUTH_ACL_MAX_ENTRIES = 128; -/// An isolate is the unit of concurrency in Dart. Each isolate has -/// its own memory and thread of control. No state is shared between -/// isolates. Instead, isolates communicate by message passing. -/// -/// Each thread keeps track of its current isolate, which is the -/// isolate which is ready to execute on the current thread. The -/// current isolate may be NULL, in which case no isolate is ready to -/// execute. Most of the Dart apis require there to be a current -/// isolate in order to function without error. The current isolate is -/// set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. -typedef Dart_Isolate = ffi.Pointer<_Dart_Isolate>; +const int KAUTH_ACL_FLAGS_PRIVATE = 65535; -/// An isolate initialization callback function. -/// -/// This callback, provided by the embedder, is called when the VM has created an -/// isolate within an existing isolate group (i.e. from the same source as an -/// existing isolate). -/// -/// The callback should setup native resolvers and might want to set a custom -/// message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as -/// runnable. -/// -/// This callback may be called on a different thread than the one -/// running the parent isolate. -/// -/// When the function returns `false`, it is the responsibility of this -/// function to ensure that `Dart_ShutdownIsolate` has been called. -/// -/// When the function returns `false`, the function should set *error to -/// a malloc-allocated buffer containing a useful error message. The -/// caller of this function (the VM) will make sure that the buffer is -/// freed. -/// -/// \param child_isolate_data The callback data to associate with the new -/// child isolate. -/// \param error A structure into which the embedder can place a -/// C string containing an error message in the case the initialization fails. -/// -/// \return The embedder returns true if the initialization was successful and -/// false otherwise (in which case the VM will terminate the isolate). -typedef Dart_InitializeIsolateCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer>, - ffi.Pointer>)>>; +const int KAUTH_ACL_DEFER_INHERIT = 65536; -/// An isolate shutdown callback function. -/// -/// This callback, provided by the embedder, is called before the vm -/// shuts down an isolate. The isolate being shutdown will be the current -/// isolate. It is safe to run Dart code. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -/// \param isolate_data The same callback data which was passed to the isolate -/// when it was created. -typedef Dart_IsolateShutdownCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +const int KAUTH_ACL_NO_INHERIT = 131072; -/// An isolate cleanup callback function. -/// -/// This callback, provided by the embedder, is called after the vm -/// shuts down an isolate. There will be no current isolate and it is *not* -/// safe to run Dart code. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -/// \param isolate_data The same callback data which was passed to the isolate -/// when it was created. -typedef Dart_IsolateCleanupCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +const int KAUTH_FILESEC_MAGIC = 19710317; -/// An isolate group cleanup callback function. -/// -/// This callback, provided by the embedder, is called after the vm -/// shuts down an isolate group. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -typedef Dart_IsolateGroupCleanupCallback - = ffi.Pointer)>>; +const int KAUTH_FILESEC_FLAGS_PRIVATE = 65535; -/// A thread death callback function. -/// This callback, provided by the embedder, is called before a thread in the -/// vm thread pool exits. -/// This function could be used to dispose of native resources that -/// are associated and attached to the thread, in order to avoid leaks. -typedef Dart_ThreadExitCallback - = ffi.Pointer>; +const int KAUTH_FILESEC_DEFER_INHERIT = 65536; -/// Callbacks provided by the embedder for file operations. If the -/// embedder does not allow file operations these callbacks can be -/// NULL. -/// -/// Dart_FileOpenCallback - opens a file for reading or writing. -/// \param name The name of the file to open. -/// \param write A boolean variable which indicates if the file is to -/// opened for writing. If there is an existing file it needs to truncated. -/// -/// Dart_FileReadCallback - Read contents of file. -/// \param data Buffer allocated in the callback into which the contents -/// of the file are read into. It is the responsibility of the caller to -/// free this buffer. -/// \param file_length A variable into which the length of the file is returned. -/// In the case of an error this value would be -1. -/// \param stream Handle to the opened file. -/// -/// Dart_FileWriteCallback - Write data into file. -/// \param data Buffer which needs to be written into the file. -/// \param length Length of the buffer. -/// \param stream Handle to the opened file. -/// -/// Dart_FileCloseCallback - Closes the opened file. -/// \param stream Handle to the opened file. -typedef Dart_FileOpenCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Bool)>>; -typedef Dart_FileReadCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>>; -typedef Dart_FileWriteCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.IntPtr, ffi.Pointer)>>; -typedef Dart_FileCloseCallback - = ffi.Pointer)>>; -typedef Dart_EntropySource = ffi.Pointer< - ffi.NativeFunction, ffi.IntPtr)>>; +const int KAUTH_FILESEC_NO_INHERIT = 131072; -/// Callback provided by the embedder that is used by the vmservice isolate -/// to request the asset archive. The asset archive must be an uncompressed tar -/// archive that is stored in a Uint8List. -/// -/// If the embedder has no vmservice isolate assets, the callback can be NULL. -/// -/// \return The embedder must return a handle to a Uint8List containing an -/// uncompressed tar archive or null. -typedef Dart_GetVMServiceAssetsArchive - = ffi.Pointer>; -typedef Dart_IsolateGroup = ffi.Pointer<_Dart_IsolateGroup>; +const String KAUTH_FILESEC_XATTR = 'com.apple.system.Security'; -/// A message notification callback. -/// -/// This callback allows the embedder to provide an alternate wakeup -/// mechanism for the delivery of inter-isolate messages. It is the -/// responsibility of the embedder to call Dart_HandleMessage to -/// process the message. -typedef Dart_MessageNotifyCallback - = ffi.Pointer>; +const int KAUTH_ENDIAN_HOST = 1; -/// A port is used to send or receive inter-isolate messages -typedef Dart_Port = ffi.Int64; +const int KAUTH_ENDIAN_DISK = 2; -abstract class Dart_CoreType_Id { - static const int Dart_CoreType_Dynamic = 0; - static const int Dart_CoreType_Int = 1; - static const int Dart_CoreType_String = 2; -} +const int KAUTH_VNODE_READ_DATA = 2; -/// ========== -/// Typed Data -/// ========== -abstract class Dart_TypedData_Type { - static const int Dart_TypedData_kByteData = 0; - static const int Dart_TypedData_kInt8 = 1; - static const int Dart_TypedData_kUint8 = 2; - static const int Dart_TypedData_kUint8Clamped = 3; - static const int Dart_TypedData_kInt16 = 4; - static const int Dart_TypedData_kUint16 = 5; - static const int Dart_TypedData_kInt32 = 6; - static const int Dart_TypedData_kUint32 = 7; - static const int Dart_TypedData_kInt64 = 8; - static const int Dart_TypedData_kUint64 = 9; - static const int Dart_TypedData_kFloat32 = 10; - static const int Dart_TypedData_kFloat64 = 11; - static const int Dart_TypedData_kInt32x4 = 12; - static const int Dart_TypedData_kFloat32x4 = 13; - static const int Dart_TypedData_kFloat64x2 = 14; - static const int Dart_TypedData_kInvalid = 15; -} +const int KAUTH_VNODE_LIST_DIRECTORY = 2; -class _Dart_NativeArguments extends ffi.Opaque {} +const int KAUTH_VNODE_WRITE_DATA = 4; -/// The arguments to a native function. -/// -/// This object is passed to a native function to represent its -/// arguments and return value. It allows access to the arguments to a -/// native function by index. It also allows the return value of a -/// native function to be set. -typedef Dart_NativeArguments = ffi.Pointer<_Dart_NativeArguments>; +const int KAUTH_VNODE_ADD_FILE = 4; -abstract class Dart_NativeArgument_Type { - static const int Dart_NativeArgument_kBool = 0; - static const int Dart_NativeArgument_kInt32 = 1; - static const int Dart_NativeArgument_kUint32 = 2; - static const int Dart_NativeArgument_kInt64 = 3; - static const int Dart_NativeArgument_kUint64 = 4; - static const int Dart_NativeArgument_kDouble = 5; - static const int Dart_NativeArgument_kString = 6; - static const int Dart_NativeArgument_kInstance = 7; - static const int Dart_NativeArgument_kNativeFields = 8; -} +const int KAUTH_VNODE_EXECUTE = 8; -class _Dart_NativeArgument_Descriptor extends ffi.Struct { - @ffi.Uint8() - external int type; +const int KAUTH_VNODE_SEARCH = 8; - @ffi.Uint8() - external int index; -} +const int KAUTH_VNODE_DELETE = 16; -class _Dart_NativeArgument_Value extends ffi.Opaque {} +const int KAUTH_VNODE_APPEND_DATA = 32; -typedef Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor; -typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; +const int KAUTH_VNODE_ADD_SUBDIRECTORY = 32; -/// An environment lookup callback function. -/// -/// \param name The name of the value to lookup in the environment. -/// -/// \return A valid handle to a string if the name exists in the -/// current environment or Dart_Null() if not. -typedef Dart_EnvironmentCallback - = ffi.Pointer>; +const int KAUTH_VNODE_DELETE_CHILD = 64; -/// Native entry resolution callback. -/// -/// For libraries and scripts which have native functions, the embedder -/// can provide a native entry resolver. This callback is used to map a -/// name/arity to a Dart_NativeFunction. If no function is found, the -/// callback should return NULL. -/// -/// The parameters to the native resolver function are: -/// \param name a Dart string which is the name of the native function. -/// \param num_of_arguments is the number of arguments expected by the -/// native function. -/// \param auto_setup_scope is a boolean flag that can be set by the resolver -/// to indicate if this function needs a Dart API scope (see Dart_EnterScope/ -/// Dart_ExitScope) to be setup automatically by the VM before calling into -/// the native function. By default most native functions would require this -/// to be true but some light weight native functions which do not call back -/// into the VM through the Dart API may not require a Dart scope to be -/// setup automatically. -/// -/// \return A valid Dart_NativeFunction which resolves to a native entry point -/// for the native function. -/// -/// See Dart_SetNativeResolver. -typedef Dart_NativeEntryResolver = ffi.Pointer< - ffi.NativeFunction< - Dart_NativeFunction Function( - ffi.Handle, ffi.Int, ffi.Pointer)>>; +const int KAUTH_VNODE_READ_ATTRIBUTES = 128; -/// A native function. -typedef Dart_NativeFunction - = ffi.Pointer>; +const int KAUTH_VNODE_WRITE_ATTRIBUTES = 256; -/// Native entry symbol lookup callback. -/// -/// For libraries and scripts which have native functions, the embedder -/// can provide a callback for mapping a native entry to a symbol. This callback -/// maps a native function entry PC to the native function name. If no native -/// entry symbol can be found, the callback should return NULL. -/// -/// The parameters to the native reverse resolver function are: -/// \param nf A Dart_NativeFunction. -/// -/// \return A const UTF-8 string containing the symbol name or NULL. -/// -/// See Dart_SetNativeResolver. -typedef Dart_NativeEntrySymbol = ffi.Pointer< - ffi.NativeFunction Function(Dart_NativeFunction)>>; +const int KAUTH_VNODE_READ_EXTATTRIBUTES = 512; -/// FFI Native C function pointer resolver callback. -/// -/// See Dart_SetFfiNativeResolver. -typedef Dart_FfiNativeResolver = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, uintptr_t)>>; +const int KAUTH_VNODE_WRITE_EXTATTRIBUTES = 1024; -/// ===================== -/// Scripts and Libraries -/// ===================== -abstract class Dart_LibraryTag { - static const int Dart_kCanonicalizeUrl = 0; - static const int Dart_kImportTag = 1; - static const int Dart_kKernelTag = 2; -} +const int KAUTH_VNODE_READ_SECURITY = 2048; -/// The library tag handler is a multi-purpose callback provided by the -/// embedder to the Dart VM. The embedder implements the tag handler to -/// provide the ability to load Dart scripts and imports. -/// -/// -- TAGS -- -/// -/// Dart_kCanonicalizeUrl -/// -/// This tag indicates that the embedder should canonicalize 'url' with -/// respect to 'library'. For most embedders, the -/// Dart_DefaultCanonicalizeUrl function is a sufficient implementation -/// of this tag. The return value should be a string holding the -/// canonicalized url. -/// -/// Dart_kImportTag -/// -/// This tag is used to load a library from IsolateMirror.loadUri. The embedder -/// should call Dart_LoadLibraryFromKernel to provide the library to the VM. The -/// return value should be an error or library (the result from -/// Dart_LoadLibraryFromKernel). -/// -/// Dart_kKernelTag -/// -/// This tag is used to load the intermediate file (kernel) generated by -/// the Dart front end. This tag is typically used when a 'hot-reload' -/// of an application is needed and the VM is 'use dart front end' mode. -/// The dart front end typically compiles all the scripts, imports and part -/// files into one intermediate file hence we don't use the source/import or -/// script tags. The return value should be an error or a TypedData containing -/// the kernel bytes. -typedef Dart_LibraryTagHandler = ffi.Pointer< - ffi.NativeFunction>; +const int KAUTH_VNODE_WRITE_SECURITY = 4096; -/// Handles deferred loading requests. When this handler is invoked, it should -/// eventually load the deferred loading unit with the given id and call -/// Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is -/// recommended that the loading occur asynchronously, but it is permitted to -/// call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the -/// handler returns. -/// -/// If an error is returned, it will be propogated through -/// `prefix.loadLibrary()`. This is useful for synchronous -/// implementations, which must propogate any unwind errors from -/// Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler -/// should return a non-error such as `Dart_Null()`. -typedef Dart_DeferredLoadHandler - = ffi.Pointer>; +const int KAUTH_VNODE_TAKE_OWNERSHIP = 8192; -/// TODO(33433): Remove kernel service from the embedding API. -abstract class Dart_KernelCompilationStatus { - static const int Dart_KernelCompilationStatus_Unknown = -1; - static const int Dart_KernelCompilationStatus_Ok = 0; - static const int Dart_KernelCompilationStatus_Error = 1; - static const int Dart_KernelCompilationStatus_Crash = 2; - static const int Dart_KernelCompilationStatus_MsgFailed = 3; -} +const int KAUTH_VNODE_CHANGE_OWNER = 8192; -class Dart_KernelCompilationResult extends ffi.Struct { - @ffi.Int32() - external int status; +const int KAUTH_VNODE_SYNCHRONIZE = 1048576; - @ffi.Bool() - external bool null_safety; +const int KAUTH_VNODE_LINKTARGET = 33554432; - external ffi.Pointer error; +const int KAUTH_VNODE_CHECKIMMUTABLE = 67108864; - external ffi.Pointer kernel; +const int KAUTH_VNODE_ACCESS = 2147483648; - @ffi.IntPtr() - external int kernel_size; -} +const int KAUTH_VNODE_NOIMMUTABLE = 1073741824; -abstract class Dart_KernelCompilationVerbosityLevel { - static const int Dart_KernelCompilationVerbosityLevel_Error = 0; - static const int Dart_KernelCompilationVerbosityLevel_Warning = 1; - static const int Dart_KernelCompilationVerbosityLevel_Info = 2; - static const int Dart_KernelCompilationVerbosityLevel_All = 3; -} +const int KAUTH_VNODE_SEARCHBYANYONE = 536870912; -class Dart_SourceFile extends ffi.Struct { - external ffi.Pointer uri; +const int KAUTH_VNODE_GENERIC_READ_BITS = 2690; - external ffi.Pointer source; -} +const int KAUTH_VNODE_GENERIC_WRITE_BITS = 5492; -typedef Dart_StreamingWriteCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.IntPtr)>>; -typedef Dart_CreateLoadingUnitCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer>, - ffi.Pointer>)>>; -typedef Dart_StreamingCloseCallback - = ffi.Pointer)>>; +const int KAUTH_VNODE_GENERIC_EXECUTE_BITS = 8; -/// A Dart_CObject is used for representing Dart objects as native C -/// data outside the Dart heap. These objects are totally detached from -/// the Dart heap. Only a subset of the Dart objects have a -/// representation as a Dart_CObject. -/// -/// The string encoding in the 'value.as_string' is UTF-8. -/// -/// All the different types from dart:typed_data are exposed as type -/// kTypedData. The specific type from dart:typed_data is in the type -/// field of the as_typed_data structure. The length in the -/// as_typed_data structure is always in bytes. -/// -/// The data for kTypedData is copied on message send and ownership remains with -/// the caller. The ownership of data for kExternalTyped is passed to the VM on -/// message send and returned when the VM invokes the -/// Dart_HandleFinalizer callback; a non-NULL callback must be provided. -abstract class Dart_CObject_Type { - static const int Dart_CObject_kNull = 0; - static const int Dart_CObject_kBool = 1; - static const int Dart_CObject_kInt32 = 2; - static const int Dart_CObject_kInt64 = 3; - static const int Dart_CObject_kDouble = 4; - static const int Dart_CObject_kString = 5; - static const int Dart_CObject_kArray = 6; - static const int Dart_CObject_kTypedData = 7; - static const int Dart_CObject_kExternalTypedData = 8; - static const int Dart_CObject_kSendPort = 9; - static const int Dart_CObject_kCapability = 10; - static const int Dart_CObject_kNativePointer = 11; - static const int Dart_CObject_kUnsupported = 12; - static const int Dart_CObject_kNumberOfTypes = 13; -} +const int KAUTH_VNODE_GENERIC_ALL_BITS = 8190; -class _Dart_CObject extends ffi.Struct { - @ffi.Int32() - external int type; +const int KAUTH_VNODE_WRITE_RIGHTS = 100676980; - external UnnamedUnion1 value; -} +const int __DARWIN_ACL_READ_DATA = 2; -class UnnamedUnion1 extends ffi.Union { - @ffi.Bool() - external bool as_bool; +const int __DARWIN_ACL_LIST_DIRECTORY = 2; - @ffi.Int32() - external int as_int32; +const int __DARWIN_ACL_WRITE_DATA = 4; - @ffi.Int64() - external int as_int64; +const int __DARWIN_ACL_ADD_FILE = 4; - @ffi.Double() - external double as_double; +const int __DARWIN_ACL_EXECUTE = 8; - external ffi.Pointer as_string; +const int __DARWIN_ACL_SEARCH = 8; - external UnnamedStruct3 as_send_port; +const int __DARWIN_ACL_DELETE = 16; - external UnnamedStruct4 as_capability; +const int __DARWIN_ACL_APPEND_DATA = 32; - external UnnamedStruct5 as_array; +const int __DARWIN_ACL_ADD_SUBDIRECTORY = 32; - external UnnamedStruct6 as_typed_data; +const int __DARWIN_ACL_DELETE_CHILD = 64; - external UnnamedStruct7 as_external_typed_data; +const int __DARWIN_ACL_READ_ATTRIBUTES = 128; - external UnnamedStruct8 as_native_pointer; -} +const int __DARWIN_ACL_WRITE_ATTRIBUTES = 256; -class UnnamedStruct3 extends ffi.Struct { - @Dart_Port() - external int id; +const int __DARWIN_ACL_READ_EXTATTRIBUTES = 512; - @Dart_Port() - external int origin_id; -} +const int __DARWIN_ACL_WRITE_EXTATTRIBUTES = 1024; -class UnnamedStruct4 extends ffi.Struct { - @ffi.Int64() - external int id; -} +const int __DARWIN_ACL_READ_SECURITY = 2048; -class UnnamedStruct5 extends ffi.Struct { - @ffi.IntPtr() - external int length; +const int __DARWIN_ACL_WRITE_SECURITY = 4096; - external ffi.Pointer> values; -} +const int __DARWIN_ACL_CHANGE_OWNER = 8192; -class UnnamedStruct6 extends ffi.Struct { - @ffi.Int32() - external int type; +const int __DARWIN_ACL_SYNCHRONIZE = 1048576; - /// in elements, not bytes - @ffi.IntPtr() - external int length; +const int __DARWIN_ACL_EXTENDED_ALLOW = 1; - external ffi.Pointer values; -} +const int __DARWIN_ACL_EXTENDED_DENY = 2; -class UnnamedStruct7 extends ffi.Struct { - @ffi.Int32() - external int type; +const int __DARWIN_ACL_ENTRY_INHERITED = 16; - /// in elements, not bytes - @ffi.IntPtr() - external int length; +const int __DARWIN_ACL_ENTRY_FILE_INHERIT = 32; - external ffi.Pointer data; +const int __DARWIN_ACL_ENTRY_DIRECTORY_INHERIT = 64; - external ffi.Pointer peer; +const int __DARWIN_ACL_ENTRY_LIMIT_INHERIT = 128; - external Dart_HandleFinalizer callback; -} +const int __DARWIN_ACL_ENTRY_ONLY_INHERIT = 256; -class UnnamedStruct8 extends ffi.Struct { - @ffi.IntPtr() - external int ptr; +const int __DARWIN_ACL_FLAG_NO_INHERIT = 131072; - @ffi.IntPtr() - external int size; +const int ACL_MAX_ENTRIES = 128; - external Dart_HandleFinalizer callback; -} +const int ACL_UNDEFINED_ID = 0; -typedef Dart_CObject = _Dart_CObject; +const int __COREFOUNDATION_CFSTRINGTOKENIZER__ = 1; -/// A native message handler. -/// -/// This handler is associated with a native port by calling -/// Dart_NewNativePort. -/// -/// The message received is decoded into the message structure. The -/// lifetime of the message data is controlled by the caller. All the -/// data references from the message are allocated by the caller and -/// will be reclaimed when returning to it. -typedef Dart_NativeMessageHandler = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_Port, ffi.Pointer)>>; -typedef Dart_PostCObject_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(Dart_Port_DL, ffi.Pointer)>>; +const int __COREFOUNDATION_CFFILEDESCRIPTOR__ = 1; -/// ============================================================================ -/// IMPORTANT! Never update these signatures without properly updating -/// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. -/// -/// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types -/// to trigger compile-time errors if the sybols in those files are updated -/// without updating these. -/// -/// Function return and argument types, and typedefs are carbon copied. Structs -/// are typechecked nominally in C/C++, so they are not copied, instead a -/// comment is added to their definition. -typedef Dart_Port_DL = ffi.Int64; -typedef Dart_PostInteger_Type = ffi - .Pointer>; -typedef Dart_NewNativePort_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_Port_DL Function( - ffi.Pointer, Dart_NativeMessageHandler_DL, ffi.Bool)>>; -typedef Dart_NativeMessageHandler_DL = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_Port_DL, ffi.Pointer)>>; -typedef Dart_CloseNativePort_Type - = ffi.Pointer>; -typedef Dart_IsError_Type - = ffi.Pointer>; -typedef Dart_IsApiError_Type - = ffi.Pointer>; -typedef Dart_IsUnhandledExceptionError_Type - = ffi.Pointer>; -typedef Dart_IsCompilationError_Type - = ffi.Pointer>; -typedef Dart_IsFatalError_Type - = ffi.Pointer>; -typedef Dart_GetError_Type = ffi - .Pointer Function(ffi.Handle)>>; -typedef Dart_ErrorHasException_Type - = ffi.Pointer>; -typedef Dart_ErrorGetException_Type - = ffi.Pointer>; -typedef Dart_ErrorGetStackTrace_Type - = ffi.Pointer>; -typedef Dart_NewApiError_Type = ffi - .Pointer)>>; -typedef Dart_NewCompilationError_Type = ffi - .Pointer)>>; -typedef Dart_NewUnhandledExceptionError_Type - = ffi.Pointer>; -typedef Dart_PropagateError_Type - = ffi.Pointer>; -typedef Dart_HandleFromPersistent_Type - = ffi.Pointer>; -typedef Dart_HandleFromWeakPersistent_Type = ffi.Pointer< - ffi.NativeFunction>; -typedef Dart_NewPersistentHandle_Type - = ffi.Pointer>; -typedef Dart_SetPersistentHandle_Type = ffi - .Pointer>; -typedef Dart_DeletePersistentHandle_Type - = ffi.Pointer>; -typedef Dart_NewWeakPersistentHandle_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_WeakPersistentHandle Function(ffi.Handle, ffi.Pointer, - ffi.IntPtr, Dart_HandleFinalizer)>>; -typedef Dart_DeleteWeakPersistentHandle_Type = ffi - .Pointer>; -typedef Dart_UpdateExternalSize_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_WeakPersistentHandle, ffi.IntPtr)>>; -typedef Dart_NewFinalizableHandle_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, - ffi.IntPtr, Dart_HandleFinalizer)>>; -typedef Dart_DeleteFinalizableHandle_Type = ffi.Pointer< - ffi.NativeFunction>; -typedef Dart_UpdateFinalizableExternalSize_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, ffi.IntPtr)>>; -typedef Dart_Post_Type = ffi - .Pointer>; -typedef Dart_NewSendPort_Type - = ffi.Pointer>; -typedef Dart_SendPortGetId_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer)>>; -typedef Dart_EnterScope_Type - = ffi.Pointer>; -typedef Dart_ExitScope_Type - = ffi.Pointer>; +const int __COREFOUNDATION_CFUSERNOTIFICATION__ = 1; + +const int __COREFOUNDATION_CFXMLNODE__ = 1; + +const int __COREFOUNDATION_CFXMLPARSER__ = 1; + +const int _CSSMTYPE_H_ = 1; + +const int _CSSMCONFIG_H_ = 1; -/// The type of message being sent to a Dart port. See CUPHTTPClientDelegate. -abstract class MessageType { - static const int ResponseMessage = 0; - static const int DataMessage = 1; - static const int CompletedMessage = 2; - static const int RedirectMessage = 3; - static const int FinishedDownloading = 4; -} +const int SEC_ASN1_TAG_MASK = 255; -/// The configuration associated with a NSURLSessionTask. -/// See CUPHTTPClientDelegate. -class CUPHTTPTaskConfiguration extends NSObject { - CUPHTTPTaskConfiguration._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int SEC_ASN1_TAGNUM_MASK = 31; - /// Returns a [CUPHTTPTaskConfiguration] that points to the same underlying object as [other]. - static CUPHTTPTaskConfiguration castFrom(T other) { - return CUPHTTPTaskConfiguration._(other._id, other._lib, - retain: true, release: true); - } +const int SEC_ASN1_BOOLEAN = 1; - /// Returns a [CUPHTTPTaskConfiguration] that wraps the given raw object pointer. - static CUPHTTPTaskConfiguration castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPTaskConfiguration._(other, lib, - retain: retain, release: release); - } +const int SEC_ASN1_INTEGER = 2; - /// Returns whether [obj] is an instance of [CUPHTTPTaskConfiguration]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPTaskConfiguration1); - } +const int SEC_ASN1_BIT_STRING = 3; - NSObject initWithPort_(int sendPort) { - final _ret = - _lib._objc_msgSend_323(_id, _lib._sel_initWithPort_1, sendPort); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int SEC_ASN1_OCTET_STRING = 4; - int get sendPort { - return _lib._objc_msgSend_247(_id, _lib._sel_sendPort1); - } +const int SEC_ASN1_NULL = 5; - static CUPHTTPTaskConfiguration new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_new1); - return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); - } +const int SEC_ASN1_OBJECT_ID = 6; - static CUPHTTPTaskConfiguration alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_alloc1); - return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); - } -} +const int SEC_ASN1_OBJECT_DESCRIPTOR = 7; -/// A delegate for NSURLSession that forwards events for registered -/// NSURLSessionTasks and forwards them to a port for consumption in Dart. -/// -/// The messages sent to the port are contained in a List with one of 3 -/// possible formats: -/// -/// 1. When the delegate receives a HTTP redirect response: -/// [MessageType::RedirectMessage, ] -/// -/// 2. When the delegate receives a HTTP response: -/// [MessageType::ResponseMessage, ] -/// -/// 3. When the delegate receives some HTTP data: -/// [MessageType::DataMessage, ] -/// -/// 4. When the delegate is informed that the response is complete: -/// [MessageType::CompletedMessage, ] -class CUPHTTPClientDelegate extends NSObject { - CUPHTTPClientDelegate._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int SEC_ASN1_REAL = 9; - /// Returns a [CUPHTTPClientDelegate] that points to the same underlying object as [other]. - static CUPHTTPClientDelegate castFrom(T other) { - return CUPHTTPClientDelegate._(other._id, other._lib, - retain: true, release: true); - } +const int SEC_ASN1_ENUMERATED = 10; - /// Returns a [CUPHTTPClientDelegate] that wraps the given raw object pointer. - static CUPHTTPClientDelegate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPClientDelegate._(other, lib, - retain: retain, release: release); - } +const int SEC_ASN1_EMBEDDED_PDV = 11; - /// Returns whether [obj] is an instance of [CUPHTTPClientDelegate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPClientDelegate1); - } +const int SEC_ASN1_UTF8_STRING = 12; - /// Instruct the delegate to forward events for the given task to the port - /// specified in the configuration. - void registerTask_withConfiguration_( - NSURLSessionTask? task, CUPHTTPTaskConfiguration? config) { - return _lib._objc_msgSend_324( - _id, - _lib._sel_registerTask_withConfiguration_1, - task?._id ?? ffi.nullptr, - config?._id ?? ffi.nullptr); - } +const int SEC_ASN1_SEQUENCE = 16; - static CUPHTTPClientDelegate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPClientDelegate1, _lib._sel_new1); - return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); - } +const int SEC_ASN1_SET = 17; - static CUPHTTPClientDelegate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPClientDelegate1, _lib._sel_alloc1); - return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); - } -} +const int SEC_ASN1_NUMERIC_STRING = 18; -/// An object used to communicate redirect information to Dart code. -/// -/// The flow is: -/// 1. CUPHTTPClientDelegate receives a message from the URL Loading System. -/// 2. CUPHTTPClientDelegate creates a new CUPHTTPForwardedDelegate subclass. -/// 3. CUPHTTPClientDelegate sends the CUPHTTPForwardedDelegate to the -/// configured Dart_Port. -/// 4. CUPHTTPClientDelegate waits on CUPHTTPForwardedDelegate.lock -/// 5. When the Dart code is done process the message received on the port, -/// it calls [CUPHTTPForwardedDelegate finish*], which releases the lock. -/// 6. CUPHTTPClientDelegate continues running. -class CUPHTTPForwardedDelegate extends NSObject { - CUPHTTPForwardedDelegate._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int SEC_ASN1_PRINTABLE_STRING = 19; - /// Returns a [CUPHTTPForwardedDelegate] that points to the same underlying object as [other]. - static CUPHTTPForwardedDelegate castFrom(T other) { - return CUPHTTPForwardedDelegate._(other._id, other._lib, - retain: true, release: true); - } +const int SEC_ASN1_T61_STRING = 20; - /// Returns a [CUPHTTPForwardedDelegate] that wraps the given raw object pointer. - static CUPHTTPForwardedDelegate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedDelegate._(other, lib, - retain: retain, release: release); - } +const int SEC_ASN1_VIDEOTEX_STRING = 21; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedDelegate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedDelegate1); - } +const int SEC_ASN1_IA5_STRING = 22; - NSObject initWithSession_task_( - NSURLSession? session, NSURLSessionTask? task) { - final _ret = _lib._objc_msgSend_325(_id, _lib._sel_initWithSession_task_1, - session?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int SEC_ASN1_UTC_TIME = 23; - /// Indicates that the task should continue executing using the given request. - void finish() { - return _lib._objc_msgSend_1(_id, _lib._sel_finish1); - } +const int SEC_ASN1_GENERALIZED_TIME = 24; - NSURLSession? get session { - final _ret = _lib._objc_msgSend_221(_id, _lib._sel_session1); - return _ret.address == 0 - ? null - : NSURLSession._(_ret, _lib, retain: true, release: true); - } +const int SEC_ASN1_GRAPHIC_STRING = 25; - NSURLSessionTask? get task { - final _ret = _lib._objc_msgSend_326(_id, _lib._sel_task1); - return _ret.address == 0 - ? null - : NSURLSessionTask._(_ret, _lib, retain: true, release: true); - } +const int SEC_ASN1_VISIBLE_STRING = 26; - /// This property is meant to be used only by CUPHTTPClientDelegate. - NSLock? get lock { - final _ret = _lib._objc_msgSend_327(_id, _lib._sel_lock1); - return _ret.address == 0 - ? null - : NSLock._(_ret, _lib, retain: true, release: true); - } +const int SEC_ASN1_GENERAL_STRING = 27; - static CUPHTTPForwardedDelegate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_new1); - return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); - } +const int SEC_ASN1_UNIVERSAL_STRING = 28; - static CUPHTTPForwardedDelegate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_alloc1); - return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); - } -} +const int SEC_ASN1_BMP_STRING = 30; -class NSLock extends _ObjCWrapper { - NSLock._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int SEC_ASN1_HIGH_TAG_NUMBER = 31; - /// Returns a [NSLock] that points to the same underlying object as [other]. - static NSLock castFrom(T other) { - return NSLock._(other._id, other._lib, retain: true, release: true); - } +const int SEC_ASN1_TELETEX_STRING = 20; - /// Returns a [NSLock] that wraps the given raw object pointer. - static NSLock castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSLock._(other, lib, retain: retain, release: release); - } +const int SEC_ASN1_METHOD_MASK = 32; - /// Returns whether [obj] is an instance of [NSLock]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLock1); - } -} +const int SEC_ASN1_PRIMITIVE = 0; -class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedRedirect._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int SEC_ASN1_CONSTRUCTED = 32; - /// Returns a [CUPHTTPForwardedRedirect] that points to the same underlying object as [other]. - static CUPHTTPForwardedRedirect castFrom(T other) { - return CUPHTTPForwardedRedirect._(other._id, other._lib, - retain: true, release: true); - } +const int SEC_ASN1_CLASS_MASK = 192; - /// Returns a [CUPHTTPForwardedRedirect] that wraps the given raw object pointer. - static CUPHTTPForwardedRedirect castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedRedirect._(other, lib, - retain: retain, release: release); - } +const int SEC_ASN1_UNIVERSAL = 0; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedRedirect]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedRedirect1); - } +const int SEC_ASN1_APPLICATION = 64; - NSObject initWithSession_task_response_request_( - NSURLSession? session, - NSURLSessionTask? task, - NSHTTPURLResponse? response, - NSURLRequest? request) { - final _ret = _lib._objc_msgSend_328( - _id, - _lib._sel_initWithSession_task_response_request_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - response?._id ?? ffi.nullptr, - request?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int SEC_ASN1_CONTEXT_SPECIFIC = 128; - /// Indicates that the task should continue executing using the given request. - /// If the request is NIL then the redirect is not followed and the task is - /// complete. - void finishWithRequest_(NSURLRequest? request) { - return _lib._objc_msgSend_329( - _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); - } +const int SEC_ASN1_PRIVATE = 192; - NSHTTPURLResponse? get response { - final _ret = _lib._objc_msgSend_330(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); - } +const int SEC_ASN1_OPTIONAL = 256; - NSURLRequest? get request { - final _ret = _lib._objc_msgSend_237(_id, _lib._sel_request1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } +const int SEC_ASN1_EXPLICIT = 512; - /// This property is meant to be used only by CUPHTTPClientDelegate. - NSURLRequest? get redirectRequest { - final _ret = _lib._objc_msgSend_237(_id, _lib._sel_redirectRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } +const int SEC_ASN1_ANY = 1024; - static CUPHTTPForwardedRedirect new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_new1); - return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); - } +const int SEC_ASN1_INLINE = 2048; - static CUPHTTPForwardedRedirect alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_alloc1); - return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); - } -} +const int SEC_ASN1_POINTER = 4096; -class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedResponse._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int SEC_ASN1_GROUP = 8192; - /// Returns a [CUPHTTPForwardedResponse] that points to the same underlying object as [other]. - static CUPHTTPForwardedResponse castFrom(T other) { - return CUPHTTPForwardedResponse._(other._id, other._lib, - retain: true, release: true); - } +const int SEC_ASN1_DYNAMIC = 16384; - /// Returns a [CUPHTTPForwardedResponse] that wraps the given raw object pointer. - static CUPHTTPForwardedResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedResponse._(other, lib, - retain: retain, release: release); - } +const int SEC_ASN1_SKIP = 32768; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedResponse1); - } +const int SEC_ASN1_INNER = 65536; - NSObject initWithSession_task_response_( - NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { - final _ret = _lib._objc_msgSend_331( - _id, - _lib._sel_initWithSession_task_response_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - response?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int SEC_ASN1_SAVE = 131072; - void finishWithDisposition_(int disposition) { - return _lib._objc_msgSend_332( - _id, _lib._sel_finishWithDisposition_1, disposition); - } +const int SEC_ASN1_SKIP_REST = 524288; - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_239(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); - } +const int SEC_ASN1_CHOICE = 1048576; - /// This property is meant to be used only by CUPHTTPClientDelegate. - int get disposition { - return _lib._objc_msgSend_333(_id, _lib._sel_disposition1); - } +const int SEC_ASN1_SIGNED_INT = 8388608; - static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedResponse1, _lib._sel_new1); - return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); - } +const int SEC_ASN1_SEQUENCE_OF = 8208; - static CUPHTTPForwardedResponse alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedResponse1, _lib._sel_alloc1); - return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); - } -} +const int SEC_ASN1_SET_OF = 8209; -class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int SEC_ASN1_ANY_CONTENTS = 66560; - /// Returns a [CUPHTTPForwardedData] that points to the same underlying object as [other]. - static CUPHTTPForwardedData castFrom(T other) { - return CUPHTTPForwardedData._(other._id, other._lib, - retain: true, release: true); - } +const int _CSSMAPPLE_H_ = 1; - /// Returns a [CUPHTTPForwardedData] that wraps the given raw object pointer. - static CUPHTTPForwardedData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedData._(other, lib, retain: retain, release: release); - } +const int _CSSMERR_H_ = 1; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedData1); - } +const int _X509DEFS_H_ = 1; - NSObject initWithSession_task_data_( - NSURLSession? session, NSURLSessionTask? task, NSData? data) { - final _ret = _lib._objc_msgSend_334( - _id, - _lib._sel_initWithSession_task_data_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - data?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int BER_TAG_UNKNOWN = 0; - NSData? get data { - final _ret = _lib._objc_msgSend_38(_id, _lib._sel_data1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } +const int BER_TAG_BOOLEAN = 1; - static CUPHTTPForwardedData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_CUPHTTPForwardedData1, _lib._sel_new1); - return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); - } +const int BER_TAG_INTEGER = 2; - static CUPHTTPForwardedData alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedData1, _lib._sel_alloc1); - return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); - } -} +const int BER_TAG_BIT_STRING = 3; -class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedComplete._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int BER_TAG_OCTET_STRING = 4; - /// Returns a [CUPHTTPForwardedComplete] that points to the same underlying object as [other]. - static CUPHTTPForwardedComplete castFrom(T other) { - return CUPHTTPForwardedComplete._(other._id, other._lib, - retain: true, release: true); - } +const int BER_TAG_NULL = 5; - /// Returns a [CUPHTTPForwardedComplete] that wraps the given raw object pointer. - static CUPHTTPForwardedComplete castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedComplete._(other, lib, - retain: retain, release: release); - } +const int BER_TAG_OID = 6; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedComplete]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedComplete1); - } +const int BER_TAG_OBJECT_DESCRIPTOR = 7; - NSObject initWithSession_task_error_( - NSURLSession? session, NSURLSessionTask? task, NSError? error) { - final _ret = _lib._objc_msgSend_335( - _id, - _lib._sel_initWithSession_task_error_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - error?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int BER_TAG_EXTERNAL = 8; - NSError? get error { - final _ret = _lib._objc_msgSend_256(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); - } +const int BER_TAG_REAL = 9; - static CUPHTTPForwardedComplete new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedComplete1, _lib._sel_new1); - return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); - } +const int BER_TAG_ENUMERATED = 10; - static CUPHTTPForwardedComplete alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedComplete1, _lib._sel_alloc1); - return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); - } -} +const int BER_TAG_PKIX_UTF8_STRING = 12; -class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedFinishedDownloading._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int BER_TAG_SEQUENCE = 16; - /// Returns a [CUPHTTPForwardedFinishedDownloading] that points to the same underlying object as [other]. - static CUPHTTPForwardedFinishedDownloading castFrom( - T other) { - return CUPHTTPForwardedFinishedDownloading._(other._id, other._lib, - retain: true, release: true); - } +const int BER_TAG_SET = 17; - /// Returns a [CUPHTTPForwardedFinishedDownloading] that wraps the given raw object pointer. - static CUPHTTPForwardedFinishedDownloading castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedFinishedDownloading._(other, lib, - retain: retain, release: release); - } +const int BER_TAG_NUMERIC_STRING = 18; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedFinishedDownloading]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedFinishedDownloading1); - } +const int BER_TAG_PRINTABLE_STRING = 19; - NSObject initWithSession_downloadTask_url_(NSURLSession? session, - NSURLSessionDownloadTask? downloadTask, NSURL? location) { - final _ret = _lib._objc_msgSend_336( - _id, - _lib._sel_initWithSession_downloadTask_url_1, - session?._id ?? ffi.nullptr, - downloadTask?._id ?? ffi.nullptr, - location?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int BER_TAG_T61_STRING = 20; - NSURL? get location { - final _ret = _lib._objc_msgSend_39(_id, _lib._sel_location1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int BER_TAG_TELETEX_STRING = 20; - static CUPHTTPForwardedFinishedDownloading new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_new1); - return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, - retain: false, release: true); - } +const int BER_TAG_VIDEOTEX_STRING = 21; - static CUPHTTPForwardedFinishedDownloading alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_alloc1); - return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, - retain: false, release: true); - } -} +const int BER_TAG_IA5_STRING = 22; -const int kNativeArgNumberPos = 0; +const int BER_TAG_UTC_TIME = 23; -const int kNativeArgNumberSize = 8; +const int BER_TAG_GENERALIZED_TIME = 24; -const int kNativeArgTypePos = 8; +const int BER_TAG_GRAPHIC_STRING = 25; -const int kNativeArgTypeSize = 8; +const int BER_TAG_ISO646_STRING = 26; -const int NSURLResponseUnknownLength = -1; +const int BER_TAG_GENERAL_STRING = 27; + +const int BER_TAG_VISIBLE_STRING = 26; + +const int BER_TAG_PKIX_UNIVERSAL_STRING = 28; + +const int BER_TAG_PKIX_BMP_STRING = 30; + +const int CE_KU_DigitalSignature = 32768; + +const int CE_KU_NonRepudiation = 16384; + +const int CE_KU_KeyEncipherment = 8192; + +const int CE_KU_DataEncipherment = 4096; + +const int CE_KU_KeyAgreement = 2048; + +const int CE_KU_KeyCertSign = 1024; + +const int CE_KU_CRLSign = 512; + +const int CE_KU_EncipherOnly = 256; + +const int CE_KU_DecipherOnly = 128; + +const int CE_CR_Unspecified = 0; + +const int CE_CR_KeyCompromise = 1; + +const int CE_CR_CACompromise = 2; -const int NSOperationQualityOfServiceUserInteractive = 33; +const int CE_CR_AffiliationChanged = 3; -const int NSOperationQualityOfServiceUserInitiated = 25; +const int CE_CR_Superseded = 4; -const int NSOperationQualityOfServiceUtility = 17; +const int CE_CR_CessationOfOperation = 5; -const int NSOperationQualityOfServiceBackground = 9; +const int CE_CR_CertificateHold = 6; + +const int CE_CR_RemoveFromCRL = 8; + +const int CE_CD_Unspecified = 128; + +const int CE_CD_KeyCompromise = 64; + +const int CE_CD_CACompromise = 32; + +const int CE_CD_AffiliationChanged = 16; + +const int CE_CD_Superseded = 8; + +const int CE_CD_CessationOfOperation = 4; + +const int CE_CD_CertificateHold = 2; + +const int CSSM_APPLE_TP_SSL_OPTS_VERSION = 1; + +const int CSSM_APPLE_TP_SSL_CLIENT = 1; + +const int CSSM_APPLE_TP_CRL_OPTS_VERSION = 0; + +const int CSSM_APPLE_TP_SMIME_OPTS_VERSION = 0; + +const int CSSM_APPLE_TP_ACTION_VERSION = 0; + +const int CSSM_TP_APPLE_EVIDENCE_VERSION = 0; + +const int CSSM_EVIDENCE_FORM_APPLE_CUSTOM = 2147483648; + +const String CSSM_APPLE_CRL_END_OF_TIME = '99991231235959'; + +const String kKeychainSuffix = '.keychain'; + +const String kKeychainDbSuffix = '.keychain-db'; + +const String kSystemKeychainName = 'System.keychain'; + +const String kSystemKeychainDir = '/Library/Keychains/'; + +const String kSystemUnlockFile = '/var/db/SystemKey'; + +const String kSystemKeychainPath = '/Library/Keychains/System.keychain'; + +const String CSSM_APPLE_ACL_TAG_PARTITION_ID = '___PARTITION___'; + +const String CSSM_APPLE_ACL_TAG_INTEGRITY = '___INTEGRITY___'; + +const int errSecErrnoBase = 100000; + +const int errSecErrnoLimit = 100255; + +const int SEC_PROTOCOL_CERT_COMPRESSION_DEFAULT = 1; + +const int NSMaximumStringLength = 2147483646; + +const int NS_UNICHAR_IS_EIGHT_BIT = 0; + +const int NSURLResponseUnknownLength = -1; const int DART_FLAGS_CURRENT_VERSION = 12; const int DART_INITIALIZE_PARAMS_CURRENT_VERSION = 4; -const int ILLEGAL_PORT = 0; - const String DART_KERNEL_ISOLATE_NAME = 'kernel-service'; const String DART_VM_SERVICE_ISOLATE_NAME = 'vm-service'; diff --git a/pkgs/cupertino_http/lib/src/utils.dart b/pkgs/cupertino_http/lib/src/utils.dart index 5da1b7d42d..e0e8a56b13 100644 --- a/pkgs/cupertino_http/lib/src/utils.dart +++ b/pkgs/cupertino_http/lib/src/utils.dart @@ -49,14 +49,12 @@ ncb.NativeCupertinoHttp _loadHelperLibrary() { return ncb.NativeCupertinoHttp(lib); } -// TODO(https://github.com/dart-lang/ffigen/issues/373): Change to -// ncb.NSString. -String? toStringOrNull(ncb.NSObject? o) { - if (o == null) { +String? toStringOrNull(ncb.NSString? s) { + if (s == null) { return null; } - return ncb.NSString.castFrom(o).toString(); + return s.toString(); } /// Converts a NSDictionary containing NSString keys and NSString values into @@ -71,8 +69,9 @@ Map stringDictToMap(ncb.NSDictionary d) { final keys = ncb.NSArray.castFrom(d.allKeys!); for (var i = 0; i < keys.count; ++i) { final nsKey = keys.objectAtIndex_(i); - final key = toStringOrNull(nsKey)!; - final value = toStringOrNull(d.objectForKey_(nsKey))!; + final key = toStringOrNull(ncb.NSString.castFrom(nsKey))!; + final value = + toStringOrNull(ncb.NSString.castFrom(d.objectForKey_(nsKey)))!; m[key] = value; } diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index f575d735f2..50619451d6 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: meta: ^1.7.0 dev_dependencies: - ffigen: ^6.0.0 + ffigen: ^7.2.0 lints: ^1.0.0 flutter: From 96028c49de216c8e3212fb56a5cb3c9c185e5049 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 17 Nov 2022 10:57:06 -0800 Subject: [PATCH 187/448] Add tests for compressed responses (#823) --- .../lib/http_client_conformance_tests.dart | 4 + .../src/compressed_response_body_server.dart | 62 +++++++++++++ .../compressed_response_body_server_vm.dart | 12 +++ .../compressed_response_body_server_web.dart | 10 +++ .../src/compressed_response_body_tests.dart | 86 +++++++++++++++++++ 5 files changed, 174 insertions(+) create mode 100644 pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/compressed_response_body_tests.dart diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index abe71e0ff6..555b7890a1 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -4,6 +4,7 @@ import 'package:http/http.dart'; +import 'src/compressed_response_body_tests.dart'; import 'src/redirect_tests.dart'; import 'src/request_body_streamed_tests.dart'; import 'src/request_body_tests.dart'; @@ -13,6 +14,8 @@ import 'src/response_body_tests.dart'; import 'src/response_headers_tests.dart'; import 'src/server_errors_test.dart'; +export 'src/compressed_response_body_tests.dart' + show testCompressedResponseBody; export 'src/redirect_tests.dart' show testRedirect; export 'src/request_body_streamed_tests.dart' show testRequestBodyStreamed; export 'src/request_body_tests.dart' show testRequestBody; @@ -51,4 +54,5 @@ void testAll(Client client, testResponseHeaders(client); testRedirect(client, redirectAlwaysAllowed: redirectAlwaysAllowed); testServerErrors(client); + testCompressedResponseBody(client); } diff --git a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server.dart b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server.dart new file mode 100644 index 0000000000..17f8897cc8 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server.dart @@ -0,0 +1,62 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that responds with "Hello World!" +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// On Request Received: +/// - send headers as Map> +/// When Receive Anything: +/// - exit +void hybridMain(StreamChannel channel) async { + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + const message = 'Hello World!'; + late List contents; + + await request.drain(); + + final headers = >{}; + request.headers.forEach((field, value) { + headers[field] = value; + }); + channel.sink.add(headers); + + request.response.headers.set('Access-Control-Allow-Origin', '*'); + request.response.headers.set('Content-Type', 'text/plain'); + + if (request.requestedUri.pathSegments.isNotEmpty) { + if (request.requestedUri.pathSegments.last == 'gzip') { + request.response.headers.set('Content-Encoding', 'gzip'); + contents = gzip.encode(message.codeUnits); + } + if (request.requestedUri.pathSegments.last == 'deflate') { + request.response.headers.set('Content-Encoding', 'deflate'); + contents = zlib.encode(message.codeUnits); + } + if (request.requestedUri.pathSegments.last == 'upper') { + request.response.headers.set('Content-Encoding', 'upper'); + contents = message.toUpperCase().codeUnits; + } + } + + if (request.requestedUri.queryParameters.containsKey('length')) { + request.response.contentLength = contents.length; + } + request.response.add(contents); + await request.response.close(); + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_vm.dart new file mode 100644 index 0000000000..2bb2c1629d --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'compressed_response_body_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_web.dart new file mode 100644 index 0000000000..f8807993d3 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_web.dart @@ -0,0 +1,10 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: + 'http_client_conformance_tests/src/compressed_response_body_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_tests.dart new file mode 100644 index 0000000000..3ce871bc21 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_tests.dart @@ -0,0 +1,86 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +import 'compressed_response_body_server_vm.dart' + if (dart.library.html) 'compressed_response_body_server_web.dart'; + +/// Tests that the [Client] correctly implements HTTP responses with compressed +/// bodies. +/// +/// If the response is encoded using a recognized 'Content-Encoding' then the +/// [Client] must decode it. Otherwise it must return the content unchanged. +/// +/// The 'Content-Encoding' and 'Content-Length' headers may be absent for +/// responses with a 'Content-Encoding' and, if present, their values are +/// undefined. +/// +/// The value of `StreamedResponse.contentLength` is not defined for responses +/// with a 'Content-Encoding' header. +void testCompressedResponseBody(Client client) async { + group('response body', () { + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + const message = 'Hello World!'; + + setUpAll(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + + test('gzip: small response with content length', () async { + // Test a supported content encoding. + final response = await client.get(Uri.http(host, '/gzip')); + final requestHeaders = await httpServerQueue.next as Map; + + expect((requestHeaders['accept-encoding'] as List).join(', '), + contains('gzip')); + expect(response.body, message); + expect(response.bodyBytes, message.codeUnits); + expect(response.contentLength, message.length); + expect(response.headers['content-type'], 'text/plain'); + expect(response.isRedirect, isFalse); + expect(response.reasonPhrase, 'OK'); + expect(response.request!.method, 'GET'); + expect(response.statusCode, 200); + }); + + test('gzip: small response streamed with content length', () async { + // Test a supported content encoding. + final request = Request('GET', Uri.http(host, '/gzip', {'length': ''})); + final response = await client.send(request); + final requestHeaders = await httpServerQueue.next as Map; + + expect((requestHeaders['accept-encoding'] as List).join(', '), + contains('gzip')); + expect(await response.stream.bytesToString(), message); + expect(response.headers['content-type'], 'text/plain'); + expect(response.isRedirect, isFalse); + expect(response.reasonPhrase, 'OK'); + expect(response.request!.method, 'GET'); + expect(response.statusCode, 200); + }); + + test('upper: small response streamed with content length', () async { + // Test an unsupported content encoding. + final request = Request('GET', Uri.http(host, '/upper', {'length': ''})); + final response = await client.send(request); + await httpServerQueue.next; + + expect(await response.stream.bytesToString(), message.toUpperCase()); + expect(response.headers['content-type'], 'text/plain'); + expect(response.isRedirect, isFalse); + expect(response.reasonPhrase, 'OK'); + expect(response.request!.method, 'GET'); + expect(response.statusCode, 200); + }); + }); +} From 0350dc4dd624b0049c84f7752183c32c645a6234 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 22 Nov 2022 09:50:14 -0800 Subject: [PATCH 188/448] Fixes a bug where requests made in different Clients would fail (#827) --- .../client_conformance_test.dart | 2 + pkgs/cupertino_http/CHANGELOG.md | 4 ++ .../client_conformance_test.dart | 4 +- pkgs/cupertino_http/lib/cupertino_client.dart | 9 ++-- pkgs/cupertino_http/lib/cupertino_http.dart | 11 +++++ pkgs/cupertino_http/pubspec.yaml | 2 +- .../test/html/client_conformance_test.dart | 4 +- .../http/test/io/client_conformance_test.dart | 4 +- .../example/client_test.dart | 2 +- .../lib/http_client_conformance_tests.dart | 25 ++++++----- .../lib/src/multiple_clients_server.dart | 35 ++++++++++++++++ .../lib/src/multiple_clients_server_vm.dart | 12 ++++++ .../lib/src/multiple_clients_server_web.dart | 9 ++++ .../lib/src/multiple_clients_tests.dart | 41 +++++++++++++++++++ 14 files changed, 139 insertions(+), 25 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/multiple_clients_server.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/multiple_clients_tests.dart diff --git a/pkgs/cronet_http/example/integration_test/client_conformance_test.dart b/pkgs/cronet_http/example/integration_test/client_conformance_test.dart index d17a950dd1..63bf0b0dac 100644 --- a/pkgs/cronet_http/example/integration_test/client_conformance_test.dart +++ b/pkgs/cronet_http/example/integration_test/client_conformance_test.dart @@ -17,6 +17,8 @@ void main() { testRequestHeaders(client); testResponseHeaders(client); testRedirect(client); + testCompressedResponseBody(client); + testMultipleClients(CronetClient.new); // TODO: Use `testAll` when `testServerErrors` passes i.e. // testAll(CronetClient(), canStreamRequestBody: false); diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 76abdcbd77..01d8f2e824 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.10 + +* Fix [Use of multiple CupertinoClients can result in cancelled requests](https://github.com/dart-lang/http/issues/826) + ## 0.0.9 * Add a more complete implementation for `URLSessionTask`: diff --git a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart index 4a8c979451..0a73140f23 100644 --- a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart +++ b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart @@ -12,12 +12,12 @@ void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); group('defaultSessionConfiguration', () { - testAll(CupertinoClient.defaultSessionConfiguration(), + testAll(CupertinoClient.defaultSessionConfiguration, canStreamRequestBody: false); }); group('fromSessionConfiguration', () { final config = URLSessionConfiguration.ephemeralSessionConfiguration(); - testAll(CupertinoClient.fromSessionConfiguration(config), + testAll(() => CupertinoClient.fromSessionConfiguration(config), canStreamRequestBody: false); }); } diff --git a/pkgs/cupertino_http/lib/cupertino_client.dart b/pkgs/cupertino_http/lib/cupertino_client.dart index beebfca51d..aa1afef2f5 100644 --- a/pkgs/cupertino_http/lib/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/cupertino_client.dart @@ -50,7 +50,7 @@ class _TaskTracker { /// } /// ``` class CupertinoClient extends BaseClient { - static final Map _tasks = {}; + static final Map _tasks = {}; URLSession _urlSession; @@ -143,8 +143,7 @@ class CupertinoClient extends BaseClient { } } - static _TaskTracker _tracker(URLSessionTask task) => - _tasks[task.taskIdentifier]!; + static _TaskTracker _tracker(URLSessionTask task) => _tasks[task]!; static void _onComplete( URLSession session, URLSessionTask task, Error? error) { @@ -163,7 +162,7 @@ class CupertinoClient extends BaseClient { StateError('task completed without an error or response')); } taskTracker.close(); - _tasks.remove(task.taskIdentifier); + _tasks.remove(task); } static void _onData(URLSession session, URLSessionTask task, Data data) { @@ -234,7 +233,7 @@ class CupertinoClient extends BaseClient { final task = _urlSession.dataTaskWithRequest(urlRequest); final taskTracker = _TaskTracker(request); - _tasks[task.taskIdentifier] = taskTracker; + _tasks[task] = taskTracker; task.resume(); final maxRedirects = request.followRedirects ? request.maxRedirects : 0; diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index f55c5a9672..e9d38db7ff 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -39,6 +39,17 @@ abstract class _ObjectHolder { final T _nsObject; _ObjectHolder(this._nsObject); + + @override + bool operator ==(Object other) { + if (other is _ObjectHolder) { + return _nsObject == other._nsObject; + } + return false; + } + + @override + int get hashCode => _nsObject.hashCode; } /// Settings for controlling whether cookies will be accepted. diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 50619451d6..75219ba39e 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.0.9 +version: 0.0.10 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: diff --git a/pkgs/http/test/html/client_conformance_test.dart b/pkgs/http/test/html/client_conformance_test.dart index 422b7cc2c0..ab33294efb 100644 --- a/pkgs/http/test/html/client_conformance_test.dart +++ b/pkgs/http/test/html/client_conformance_test.dart @@ -9,9 +9,7 @@ import 'package:http_client_conformance_tests/http_client_conformance_tests.dart import 'package:test/test.dart'; void main() { - final client = BrowserClient(); - - testAll(client, + testAll(() => BrowserClient(), redirectAlwaysAllowed: true, canStreamRequestBody: false, canStreamResponseBody: false); diff --git a/pkgs/http/test/io/client_conformance_test.dart b/pkgs/http/test/io/client_conformance_test.dart index 0706031ec3..5eb2de676a 100644 --- a/pkgs/http/test/io/client_conformance_test.dart +++ b/pkgs/http/test/io/client_conformance_test.dart @@ -9,7 +9,5 @@ import 'package:http_client_conformance_tests/http_client_conformance_tests.dart import 'package:test/test.dart'; void main() { - final client = IOClient(); - - testAll(client); + testAll(() => IOClient()); } diff --git a/pkgs/http_client_conformance_tests/example/client_test.dart b/pkgs/http_client_conformance_tests/example/client_test.dart index 87e90940f0..749d813872 100644 --- a/pkgs/http_client_conformance_tests/example/client_test.dart +++ b/pkgs/http_client_conformance_tests/example/client_test.dart @@ -12,6 +12,6 @@ class MyHttpClient extends BaseClient { void main() { group('client conformance tests', () { - testAll(MyHttpClient()); + testAll(() => MyHttpClient()); }); } diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index 555b7890a1..731d2e356d 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -5,6 +5,7 @@ import 'package:http/http.dart'; import 'src/compressed_response_body_tests.dart'; +import 'src/multiple_clients_tests.dart'; import 'src/redirect_tests.dart'; import 'src/request_body_streamed_tests.dart'; import 'src/request_body_tests.dart'; @@ -16,6 +17,7 @@ import 'src/server_errors_test.dart'; export 'src/compressed_response_body_tests.dart' show testCompressedResponseBody; +export 'src/multiple_clients_tests.dart' show testMultipleClients; export 'src/redirect_tests.dart' show testRedirect; export 'src/request_body_streamed_tests.dart' show testRequestBodyStreamed; export 'src/request_body_tests.dart' show testRequestBody; @@ -41,18 +43,21 @@ export 'src/server_errors_test.dart' show testServerErrors; /// The tests are run against a series of HTTP servers that are started by the /// tests. If the tests are run in the browser, then the test servers are /// started in another process. Otherwise, the test servers are run in-process. -void testAll(Client client, +void testAll(Client Function() clientFactory, {bool canStreamRequestBody = true, bool canStreamResponseBody = true, bool redirectAlwaysAllowed = false}) { - testRequestBody(client); - testRequestBodyStreamed(client, canStreamRequestBody: canStreamRequestBody); - testResponseBody(client, canStreamResponseBody: canStreamResponseBody); - testResponseBodyStreamed(client, + testRequestBody(clientFactory()); + testRequestBodyStreamed(clientFactory(), + canStreamRequestBody: canStreamRequestBody); + testResponseBody(clientFactory(), canStreamResponseBody: canStreamResponseBody); - testRequestHeaders(client); - testResponseHeaders(client); - testRedirect(client, redirectAlwaysAllowed: redirectAlwaysAllowed); - testServerErrors(client); - testCompressedResponseBody(client); + testResponseBodyStreamed(clientFactory(), + canStreamResponseBody: canStreamResponseBody); + testRequestHeaders(clientFactory()); + testResponseHeaders(clientFactory()); + testRedirect(clientFactory(), redirectAlwaysAllowed: redirectAlwaysAllowed); + testServerErrors(clientFactory()); + testCompressedResponseBody(clientFactory()); + testMultipleClients(clientFactory); } diff --git a/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server.dart b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server.dart new file mode 100644 index 0000000000..171f6aeb04 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server.dart @@ -0,0 +1,35 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that responds the client request path. +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// When Receive Anything: +/// - exit +void hybridMain(StreamChannel channel) async { + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + request.response.headers.set('Access-Control-Allow-Origin', '*'); + + await request.drain(); + + if (request.requestedUri.pathSegments.isNotEmpty) { + request.response.write(request.requestedUri.pathSegments.last); + } + await Future.delayed(const Duration(seconds: 1)); + await request.response.close(); + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_vm.dart new file mode 100644 index 0000000000..c689212035 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'multiple_clients_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_web.dart new file mode 100644 index 0000000000..91cfc76aef --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/multiple_clients_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/multiple_clients_tests.dart b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_tests.dart new file mode 100644 index 0000000000..be9c4d9722 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_tests.dart @@ -0,0 +1,41 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +import 'multiple_clients_server_vm.dart' + if (dart.library.html) 'multiple_clients_server_web.dart'; + +/// Tests that the [Client] works correctly if there are many used +/// simultaneously. +void testMultipleClients(Client Function() clientFactory) async { + group('test multiple clients', () { + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + + test('multiple clients with simultaneous requests', () async { + final responseFutures = >[]; + for (var i = 0; i < 5; ++i) { + final client = clientFactory(); + responseFutures.add(client.get(Uri.http(host, '/$i'))); + } + final responses = await Future.wait(responseFutures); + for (var i = 0; i < 5; ++i) { + expect(responses[i].statusCode, 200); + expect(responses[i].body, i.toString()); + } + }); + }); +} From 95a8b23e18dcc7d5d63c5c833073fb8542aae810 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 28 Nov 2022 13:20:20 -0800 Subject: [PATCH 189/448] Use latest mono_repo (#832) --- .github/workflows/dart.yml | 36 ++++++++++++++++++------------------ tool/ci.sh | 2 +- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 3e2d8686ac..06a47151bb 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.4.0 +# Created with package:mono_repo v6.4.2 name: Dart CI on: push: @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -34,9 +34,9 @@ jobs: sdk: stable - id: checkout name: Checkout repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - name: mono_repo self validate - run: dart pub global activate mono_repo 6.4.0 + run: dart pub global activate mono_repo 6.4.2 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" @@ -59,7 +59,7 @@ jobs: sdk: "2.14.0" - id: checkout name: Checkout repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -83,7 +83,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" @@ -98,7 +98,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -122,7 +122,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:format" @@ -137,7 +137,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -161,7 +161,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_1" @@ -176,7 +176,7 @@ jobs: sdk: "2.14.0" - id: checkout name: Checkout repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -196,7 +196,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_0" @@ -211,7 +211,7 @@ jobs: sdk: "2.14.0" - id: checkout name: Checkout repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -231,7 +231,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_1" @@ -246,7 +246,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -266,7 +266,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 + uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_0" @@ -281,7 +281,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade diff --git a/tool/ci.sh b/tool/ci.sh index 068969de7f..39f3e583c4 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.4.0 +# Created with package:mono_repo v6.4.2 # Support built in commands on windows out of the box. # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") From 4aebcb018e581d49bf5d761cf935ffef4d060242 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 2 Dec 2022 13:34:38 -0800 Subject: [PATCH 190/448] Remove binary artifact (#833) --- .../android/gradle/wrapper/gradle-wrapper.jar | Bin 53636 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.jar diff --git a/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.jar b/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 13372aef5e24af05341d49695ee84e5f9b594659..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53636 zcmafaW0a=B^559DjdyHo$F^PVt zzd|cWgMz^T0YO0lQ8%TE1O06v|NZl~LH{LLQ58WtNjWhFP#}eWVO&eiP!jmdp!%24 z{&z-MK{-h=QDqf+S+Pgi=_wg$I{F28X*%lJ>A7Yl#$}fMhymMu?R9TEB?#6@|Q^e^AHhxcRL$z1gsc`-Q`3j+eYAd<4@z^{+?JM8bmu zSVlrVZ5-)SzLn&LU9GhXYG{{I+u(+6ES+tAtQUanYC0^6kWkks8cG;C&r1KGs)Cq}WZSd3k1c?lkzwLySimkP5z)T2Ox3pNs;PdQ=8JPDkT7#0L!cV? zzn${PZs;o7UjcCVd&DCDpFJvjI=h(KDmdByJuDYXQ|G@u4^Kf?7YkE67fWM97kj6F z973tGtv!k$k{<>jd~D&c(x5hVbJa`bILdy(00%lY5}HZ2N>)a|))3UZ&fUa5@uB`H z+LrYm@~t?g`9~@dFzW5l>=p0hG%rv0>(S}jEzqQg6-jImG%Pr%HPtqIV_Ym6yRydW z4L+)NhcyYp*g#vLH{1lK-hQQSScfvNiNx|?nSn-?cc8}-9~Z_0oxlr~(b^EiD`Mx< zlOLK)MH?nl4dD|hx!jBCIku-lI(&v~bCU#!L7d0{)h z;k4y^X+=#XarKzK*)lv0d6?kE1< zmCG^yDYrSwrKIn04tG)>>10%+ zEKzs$S*Zrl+GeE55f)QjY$ zD5hi~J17k;4VSF_`{lPFwf^Qroqg%kqM+Pdn%h#oOPIsOIwu?JR717atg~!)*CgXk zERAW?c}(66rnI+LqM^l7BW|9dH~5g1(_w$;+AAzSYlqop*=u5}=g^e0xjlWy0cUIT7{Fs2Xqx*8% zW71JB%hk%aV-wjNE0*$;E-S9hRx5|`L2JXxz4TX3nf8fMAn|523ssV;2&145zh{$V z#4lt)vL2%DCZUgDSq>)ei2I`*aeNXHXL1TB zC8I4!uq=YYVjAdcCjcf4XgK2_$y5mgsCdcn2U!VPljXHco>+%`)6W=gzJk0$e%m$xWUCs&Ju-nUJjyQ04QF_moED2(y6q4l+~fo845xm zE5Esx?~o#$;rzpCUk2^2$c3EBRNY?wO(F3Pb+<;qfq;JhMFuSYSxiMejBQ+l8(C-- zz?Xufw@7{qvh$;QM0*9tiO$nW(L>83egxc=1@=9Z3)G^+*JX-z92F((wYiK>f;6 zkc&L6k4Ua~FFp`x7EF;ef{hb*n8kx#LU|6{5n=A55R4Ik#sX{-nuQ}m7e<{pXq~8#$`~6| zi{+MIgsBRR-o{>)CE8t0Bq$|SF`M0$$7-{JqwFI1)M^!GMwq5RAWMP!o6G~%EG>$S zYDS?ux;VHhRSm*b^^JukYPVb?t0O%^&s(E7Rb#TnsWGS2#FdTRj_SR~YGjkaRFDI=d)+bw$rD;_!7&P2WEmn zIqdERAbL&7`iA^d?8thJ{(=)v>DgTF7rK-rck({PpYY$7uNY$9-Z< ze4=??I#p;$*+-Tm!q8z}k^%-gTm59^3$*ByyroqUe02Dne4?Fc%JlO>*f9Zj{++!^ zBz0FxuS&7X52o6-^CYq>jkXa?EEIfh?xdBPAkgpWpb9Tam^SXoFb3IRfLwanWfskJ zIbfU-rJ1zPmOV)|%;&NSWIEbbwj}5DIuN}!m7v4($I{Rh@<~-sK{fT|Wh?<|;)-Z; zwP{t@{uTsmnO@5ZY82lzwl4jeZ*zsZ7w%a+VtQXkigW$zN$QZnKw4F`RG`=@eWowO zFJ6RC4e>Y7Nu*J?E1*4*U0x^>GK$>O1S~gkA)`wU2isq^0nDb`);Q(FY<8V6^2R%= zDY}j+?mSj{bz2>F;^6S=OLqiHBy~7h4VVscgR#GILP!zkn68S^c04ZL3e$lnSU_(F zZm3e`1~?eu1>ys#R6>Gu$`rWZJG&#dsZ?^)4)v(?{NPt+_^Ak>Ap6828Cv^B84fa4 z_`l$0SSqkBU}`f*H#<14a)khT1Z5Z8;=ga^45{l8y*m|3Z60vgb^3TnuUKaa+zP;m zS`za@C#Y;-LOm&pW||G!wzr+}T~Q9v4U4ufu*fLJC=PajN?zN=?v^8TY}wrEeUygdgwr z7szml+(Bar;w*c^!5txLGKWZftqbZP`o;Kr1)zI}0Kb8yr?p6ZivtYL_KA<+9)XFE z=pLS5U&476PKY2aKEZh}%|Vb%!us(^qf)bKdF7x_v|Qz8lO7Ro>;#mxG0gqMaTudL zi2W!_#3@INslT}1DFJ`TsPvRBBGsODklX0`p-M6Mrgn~6&fF`kdj4K0I$<2Hp(YIA z)fFdgR&=qTl#sEFj6IHzEr1sYM6 zNfi!V!biByA&vAnZd;e_UfGg_={}Tj0MRt3SG%BQYnX$jndLG6>ssgIV{T3#=;RI% zE}b!9z#fek19#&nFgC->@!IJ*Fe8K$ZOLmg|6(g}ccsSBpc`)3;Ar8;3_k`FQ#N9&1tm>c|2mzG!!uWvelm zJj|oDZ6-m(^|dn3em(BF&3n12=hdtlb@%!vGuL*h`CXF?^=IHU%Q8;g8vABm=U!vX zT%Ma6gpKQC2c;@wH+A{)q+?dAuhetSxBDui+Z;S~6%oQq*IwSMu-UhMDy{pP z-#GB-a0`0+cJ%dZ7v0)3zfW$eV>w*mgU4Cma{P$DY3|w364n$B%cf()fZ;`VIiK_O zQ|q|(55+F$H(?opzr%r)BJLy6M&7Oq8KCsh`pA5^ohB@CDlMKoDVo5gO&{0k)R0b(UOfd>-(GZGeF}y?QI_T+GzdY$G{l!l% zHyToqa-x&X4;^(-56Lg$?(KYkgJn9W=w##)&CECqIxLe@+)2RhO*-Inpb7zd8txFG6mY8E?N8JP!kRt_7-&X{5P?$LAbafb$+hkA*_MfarZxf zXLpXmndnV3ubbXe*SYsx=eeuBKcDZI0bg&LL-a8f9>T(?VyrpC6;T{)Z{&|D5a`Aa zjP&lP)D)^YYWHbjYB6ArVs+4xvrUd1@f;;>*l zZH``*BxW+>Dd$be{`<&GN(w+m3B?~3Jjz}gB8^|!>pyZo;#0SOqWem%xeltYZ}KxOp&dS=bg|4 zY-^F~fv8v}u<7kvaZH`M$fBeltAglH@-SQres30fHC%9spF8Ld%4mjZJDeGNJR8+* zl&3Yo$|JYr2zi9deF2jzEC) zl+?io*GUGRp;^z+4?8gOFA>n;h%TJC#-st7#r&-JVeFM57P7rn{&k*z@+Y5 zc2sui8(gFATezp|Te|1-Q*e|Xi+__8bh$>%3|xNc2kAwTM!;;|KF6cS)X3SaO8^z8 zs5jV(s(4_NhWBSSJ}qUzjuYMKlkjbJS!7_)wwVsK^qDzHx1u*sC@C1ERqC#l%a zk>z>m@sZK{#GmsB_NkEM$$q@kBrgq%=NRBhL#hjDQHrI7(XPgFvP&~ZBJ@r58nLme zK4tD}Nz6xrbvbD6DaDC9E_82T{(WRQBpFc+Zb&W~jHf1MiBEqd57}Tpo8tOXj@LcF zwN8L-s}UO8%6piEtTrj@4bLH!mGpl5mH(UJR1r9bBOrSt0tSJDQ9oIjcW#elyMAxl7W^V(>8M~ss0^>OKvf{&oUG@uW{f^PtV#JDOx^APQKm& z{*Ysrz&ugt4PBUX@KERQbycxP%D+ApR%6jCx7%1RG2YpIa0~tqS6Xw6k#UN$b`^l6d$!I z*>%#Eg=n#VqWnW~MurJLK|hOQPTSy7G@29g@|g;mXC%MF1O7IAS8J^Q6D&Ra!h^+L&(IBYg2WWzZjT-rUsJMFh@E)g)YPW_)W9GF3 zMZz4RK;qcjpnat&J;|MShuPc4qAc)A| zVB?h~3TX+k#Cmry90=kdDoPYbhzs#z96}#M=Q0nC{`s{3ZLU)c(mqQQX;l~1$nf^c zFRQ~}0_!cM2;Pr6q_(>VqoW0;9=ZW)KSgV-c_-XdzEapeLySavTs5-PBsl-n3l;1jD z9^$^xR_QKDUYoeqva|O-+8@+e??(pRg@V|=WtkY!_IwTN~ z9Rd&##eWt_1w$7LL1$-ETciKFyHnNPjd9hHzgJh$J(D@3oYz}}jVNPjH!viX0g|Y9 zDD`Zjd6+o+dbAbUA( zEqA9mSoX5p|9sDVaRBFx_8)Ra4HD#xDB(fa4O8_J2`h#j17tSZOd3%}q8*176Y#ak zC?V8Ol<*X{Q?9j{Ys4Bc#sq!H;^HU$&F_`q2%`^=9DP9YV-A!ZeQ@#p=#ArloIgUH%Y-s>G!%V3aoXaY=f<UBrJTN+*8_lMX$yC=Vq+ zrjLn-pO%+VIvb~>k%`$^aJ1SevcPUo;V{CUqF>>+$c(MXxU12mxqyFAP>ki{5#;Q0 zx7Hh2zZdZzoxPY^YqI*Vgr)ip0xnpQJ+~R*UyFi9RbFd?<_l8GH@}gGmdB)~V7vHg z>Cjy78TQTDwh~+$u$|K3if-^4uY^|JQ+rLVX=u7~bLY29{lr>jWV7QCO5D0I>_1?; zx>*PxE4|wC?#;!#cK|6ivMzJ({k3bT_L3dHY#h7M!ChyTT`P#%3b=k}P(;QYTdrbe z+e{f@we?3$66%02q8p3;^th;9@y2vqt@LRz!DO(WMIk?#Pba85D!n=Ao$5NW0QVgS zoW)fa45>RkjU?H2SZ^#``zs6dG@QWj;MO4k6tIp8ZPminF`rY31dzv^e-3W`ZgN#7 z)N^%Rx?jX&?!5v`hb0-$22Fl&UBV?~cV*{hPG6%ml{k;m+a-D^XOF6DxPd$3;2VVY zT)E%m#ZrF=D=84$l}71DK3Vq^?N4``cdWn3 zqV=mX1(s`eCCj~#Nw4XMGW9tK>$?=cd$ule0Ir8UYzhi?%_u0S?c&j7)-~4LdolkgP^CUeE<2`3m)I^b ztV`K0k$OS^-GK0M0cNTLR22Y_eeT{<;G(+51Xx}b6f!kD&E4; z&Op8;?O<4D$t8PB4#=cWV9Q*i4U+8Bjlj!y4`j)^RNU#<5La6|fa4wLD!b6?RrBsF z@R8Nc^aO8ty7qzlOLRL|RUC-Bt-9>-g`2;@jfNhWAYciF{df9$n#a~28+x~@x0IWM zld=J%YjoKm%6Ea>iF){z#|~fo_w#=&&HRogJmXJDjCp&##oVvMn9iB~gyBlNO3B5f zXgp_1I~^`A0z_~oAa_YBbNZbDsnxLTy0@kkH!=(xt8|{$y<+|(wSZW7@)#|fs_?gU5-o%vpsQPRjIxq;AED^oG%4S%`WR}2(*!84Pe8Jw(snJ zq~#T7+m|w#acH1o%e<+f;!C|*&_!lL*^zRS`;E}AHh%cj1yR&3Grv&0I9k9v0*w8^ zXHEyRyCB`pDBRAxl;ockOh6$|7i$kzCBW$}wGUc|2bo3`x*7>B@eI=-7lKvI)P=gQ zf_GuA+36kQb$&{ZH)6o^x}wS}S^d&Xmftj%nIU=>&j@0?z8V3PLb1JXgHLq)^cTvB zFO6(yj1fl1Bap^}?hh<>j?Jv>RJdK{YpGjHxnY%d8x>A{k+(18J|R}%mAqq9Uzm8^Us#Ir_q^w9-S?W07YRD`w%D(n;|8N%_^RO`zp4 z@`zMAs>*x0keyE)$dJ8hR37_&MsSUMlGC*=7|wUehhKO)C85qoU}j>VVklO^TxK?! zO!RG~y4lv#W=Jr%B#sqc;HjhN={wx761vA3_$S>{j+r?{5=n3le|WLJ(2y_r>{)F_ z=v8Eo&xFR~wkw5v-{+9^JQukxf8*CXDWX*ZzjPVDc>S72uxAcY+(jtg3ns_5R zRYl2pz`B)h+e=|7SfiAAP;A zk0tR)3u1qy0{+?bQOa17SpBRZ5LRHz(TQ@L0%n5xJ21ri>^X420II1?5^FN3&bV?( zCeA)d9!3FAhep;p3?wLPs`>b5Cd}N!;}y`Hq3ppDs0+><{2ey0yq8o7m-4|oaMsWf zsLrG*aMh91drd-_QdX6t&I}t2!`-7$DCR`W2yoV%bcugue)@!SXM}fJOfG(bQQh++ zjAtF~zO#pFz})d8h)1=uhigDuFy`n*sbxZ$BA^Bt=Jdm}_KB6sCvY(T!MQnqO;TJs zVD{*F(FW=+v`6t^6{z<3-fx#|Ze~#h+ymBL^^GKS%Ve<)sP^<4*y_Y${06eD zH_n?Ani5Gs4&1z)UCL-uBvq(8)i!E@T_*0Sp5{Ddlpgke^_$gukJc_f9e=0Rfpta@ ze5~~aJBNK&OJSw!(rDRAHV0d+eW#1?PFbr==uG-$_fu8`!DWqQD~ef-Gx*ZmZx33_ zb0+I(0!hIK>r9_S5A*UwgRBKSd6!ieiYJHRigU@cogJ~FvJHY^DSysg)ac=7#wDBf zNLl!E$AiUMZC%%i5@g$WsN+sMSoUADKZ}-Pb`{7{S>3U%ry~?GVX!BDar2dJHLY|g zTJRo#Bs|u#8ke<3ohL2EFI*n6adobnYG?F3-#7eZZQO{#rmM8*PFycBR^UZKJWr(a z8cex$DPOx_PL^TO<%+f^L6#tdB8S^y#+fb|acQfD(9WgA+cb15L+LUdHKv)wE6={i zX^iY3N#U7QahohDP{g`IHS?D00eJC9DIx0V&nq!1T* z4$Bb?trvEG9JixrrNRKcjX)?KWR#Y(dh#re_<y*=5!J+-Wwb*D>jKXgr5L8_b6pvSAn3RIvI5oj!XF^m?otNA=t^dg z#V=L0@W)n?4Y@}49}YxQS=v5GsIF3%Cp#fFYm0Bm<}ey& zOfWB^vS8ye?n;%yD%NF8DvOpZqlB++#4KnUj>3%*S(c#yACIU>TyBG!GQl7{b8j#V z;lS})mrRtT!IRh2B-*T58%9;!X}W^mg;K&fb7?2#JH>JpCZV5jbDfOgOlc@wNLfHN z8O92GeBRjCP6Q9^Euw-*i&Wu=$>$;8Cktx52b{&Y^Ise-R1gTKRB9m0*Gze>$k?$N zua_0Hmbcj8qQy{ZyJ%`6v6F+yBGm>chZxCGpeL@os+v&5LON7;$tb~MQAbSZKG$k z8w`Mzn=cX4Hf~09q8_|3C7KnoM1^ZGU}#=vn1?1^Kc-eWv4x^T<|i9bCu;+lTQKr- zRwbRK!&XrWRoO7Kw!$zNQb#cJ1`iugR(f_vgmu!O)6tFH-0fOSBk6$^y+R07&&B!(V#ZV)CX42( zTC(jF&b@xu40fyb1=_2;Q|uPso&Gv9OSM1HR{iGPi@JUvmYM;rkv#JiJZ5-EFA%Lu zf;wAmbyclUM*D7>^nPatbGr%2aR5j55qSR$hR`c?d+z z`qko8Yn%vg)p=H`1o?=b9K0%Blx62gSy)q*8jWPyFmtA2a+E??&P~mT@cBdCsvFw4 zg{xaEyVZ|laq!sqN}mWq^*89$e6%sb6Thof;ml_G#Q6_0-zwf80?O}D0;La25A0C+ z3)w-xesp6?LlzF4V%yA9Ryl_Kq*wMk4eu&)Tqe#tmQJtwq`gI^7FXpToum5HP3@;N zpe4Y!wv5uMHUu`zbdtLys5)(l^C(hFKJ(T)z*PC>7f6ZRR1C#ao;R&_8&&a3)JLh* zOFKz5#F)hJqVAvcR#1)*AWPGmlEKw$sQd)YWdAs_W-ojA?Lm#wCd}uF0^X=?AA#ki zWG6oDQZJ5Tvifdz4xKWfK&_s`V*bM7SVc^=w7-m}jW6U1lQEv_JsW6W(| zkKf>qn^G!EWn~|7{G-&t0C6C%4)N{WRK_PM>4sW8^dDkFM|p&*aBuN%fg(I z^M-49vnMd%=04N95VO+?d#el>LEo^tvnQsMop70lNqq@%cTlht?e+B5L1L9R4R(_6 z!3dCLeGXb+_LiACNiqa^nOELJj%q&F^S+XbmdP}`KAep%TDop{Pz;UDc#P&LtMPgH zy+)P1jdgZQUuwLhV<89V{3*=Iu?u#v;v)LtxoOwV(}0UD@$NCzd=id{UuDdedeEp| z`%Q|Y<6T?kI)P|8c!K0Za&jxPhMSS!T`wlQNlkE(2B*>m{D#`hYYD>cgvsKrlcOcs7;SnVCeBiK6Wfho@*Ym9 zr0zNfrr}0%aOkHd)d%V^OFMI~MJp+Vg-^1HPru3Wvac@-QjLX9Dx}FL(l>Z;CkSvC zOR1MK%T1Edv2(b9$ttz!E7{x4{+uSVGz`uH&)gG`$)Vv0^E#b&JSZp#V)b6~$RWwe zzC3FzI`&`EDK@aKfeqQ4M(IEzDd~DS>GB$~ip2n!S%6sR&7QQ*=Mr(v*v-&07CO%# zMBTaD8-EgW#C6qFPPG1Ph^|0AFs;I+s|+A@WU}%@WbPI$S0+qFR^$gim+Fejs2f!$ z@Xdlb_K1BI;iiOUj`j+gOD%mjq^S~J0cZZwuqfzNH9}|(vvI6VO+9ZDA_(=EAo;( zKKzm`k!s!_sYCGOm)93Skaz+GF7eY@Ra8J$C)`X)`aPKym?7D^SI}Mnef4C@SgIEB z>nONSFl$qd;0gSZhNcRlq9VVHPkbakHlZ1gJ1y9W+@!V$TLpdsbKR-VwZrsSM^wLr zL9ob&JG)QDTaf&R^cnm5T5#*J3(pSpjM5~S1 z@V#E2syvK6wb?&h?{E)CoI~9uA(hST7hx4_6M(7!|BW3TR_9Q zLS{+uPoNgw(aK^?=1rFcDO?xPEk5Sm=|pW%-G2O>YWS^(RT)5EQ2GSl75`b}vRcD2 z|HX(x0#Qv+07*O|vMIV(0?KGjOny#Wa~C8Q(kF^IR8u|hyyfwD&>4lW=)Pa311caC zUk3aLCkAFkcidp@C%vNVLNUa#1ZnA~ZCLrLNp1b8(ndgB(0zy{Mw2M@QXXC{hTxr7 zbipeHI-U$#Kr>H4}+cu$#2fG6DgyWgq{O#8aa)4PoJ^;1z7b6t&zt zPei^>F1%8pcB#1`z`?f0EAe8A2C|}TRhzs*-vN^jf(XNoPN!tONWG=abD^=Lm9D?4 zbq4b(in{eZehKC0lF}`*7CTzAvu(K!eAwDNC#MlL2~&gyFKkhMIF=32gMFLvKsbLY z1d$)VSzc^K&!k#2Q?(f>pXn){C+g?vhQ0ijV^Z}p5#BGrGb%6n>IH-)SA$O)*z3lJ z1rtFlovL`cC*RaVG!p!4qMB+-f5j^1)ALf4Z;2X&ul&L!?`9Vdp@d(%(>O=7ZBV;l z?bbmyPen>!P{TJhSYPmLs759b1Ni1`d$0?&>OhxxqaU|}-?Z2c+}jgZ&vCSaCivx| z-&1gw2Lr<;U-_xzlg}Fa_3NE?o}R-ZRX->__}L$%2ySyiPegbnM{UuADqwDR{C2oS zPuo88%DNfl4xBogn((9j{;*YGE0>2YoL?LrH=o^SaAcgO39Ew|vZ0tyOXb509#6{7 z0<}CptRX5(Z4*}8CqCgpT@HY3Q)CvRz_YE;nf6ZFwEje^;Hkj0b1ESI*8Z@(RQrW4 z35D5;S73>-W$S@|+M~A(vYvX(yvLN(35THo!yT=vw@d(=q8m+sJyZMB7T&>QJ=jkwQVQ07*Am^T980rldC)j}}zf!gq7_z4dZ zHwHB94%D-EB<-^W@9;u|(=X33c(G>q;Tfq1F~-Lltp|+uwVzg?e$M96ndY{Lcou%w zWRkjeE`G*i)Bm*|_7bi+=MPm8by_};`=pG!DSGBP6y}zvV^+#BYx{<>p0DO{j@)(S zxcE`o+gZf8EPv1g3E1c3LIbw+`rO3N+Auz}vn~)cCm^DlEi#|Az$b z2}Pqf#=rxd!W*6HijC|u-4b~jtuQS>7uu{>wm)PY6^S5eo=?M>;tK`=DKXuArZvaU zHk(G??qjKYS9G6Du)#fn+ob=}C1Hj9d?V$_=J41ljM$CaA^xh^XrV-jzi7TR-{{9V zZZI0;aQ9YNEc`q=Xvz;@q$eqL<}+L(>HR$JA4mB6~g*YRSnpo zTofY;u7F~{1Pl=pdsDQx8Gg#|@BdoWo~J~j%DfVlT~JaC)he>he6`C`&@@#?;e(9( zgKcmoidHU$;pi{;VXyE~4>0{kJ>K3Uy6`s*1S--*mM&NY)*eOyy!7?9&osK*AQ~vi z{4qIQs)s#eN6j&0S()cD&aCtV;r>ykvAzd4O-fG^4Bmx2A2U7-kZR5{Qp-R^i4H2yfwC7?9(r3=?oH(~JR4=QMls>auMv*>^^!$}{}R z;#(gP+O;kn4G|totqZGdB~`9yzShMze{+$$?9%LJi>4YIsaPMwiJ{`gocu0U}$Q$vI5oeyKrgzz>!gI+XFt!#n z7vs9Pn`{{5w-@}FJZn?!%EQV!PdA3hw%Xa2#-;X4*B4?`WM;4@bj`R-yoAs_t4!!` zEaY5OrYi`3u3rXdY$2jZdZvufgFwVna?!>#t#DKAD2;U zqpqktqJ)8EPY*w~yj7r~#bNk|PDM>ZS?5F7T5aPFVZrqeX~5_1*zTQ%;xUHe#li?s zJ*5XZVERVfRjwX^s=0<%nXhULK+MdibMjzt%J7#fuh?NXyJ^pqpfG$PFmG!h*opyi zmMONjJY#%dkdRHm$l!DLeBm#_0YCq|x17c1fYJ#5YMpsjrFKyU=y>g5QcTgbDm28X zYL1RK)sn1@XtkGR;tNb}(kg#9L=jNSbJizqAgV-TtK2#?LZXrCIz({ zO^R|`ZDu(d@E7vE}df5`a zNIQRp&mDFbgyDKtyl@J|GcR9!h+_a$za$fnO5Ai9{)d7m@?@qk(RjHwXD}JbKRn|u z=Hy^z2vZ<1Mf{5ihhi9Y9GEG74Wvka;%G61WB*y7;&L>k99;IEH;d8-IR6KV{~(LZ zN7@V~f)+yg7&K~uLvG9MAY+{o+|JX?yf7h9FT%7ZrW7!RekjwgAA4jU$U#>_!ZC|c zA9%tc9nq|>2N1rg9uw-Qc89V}I5Y`vuJ(y`Ibc_?D>lPF0>d_mB@~pU`~)uWP48cT@fTxkWSw{aR!`K{v)v zpN?vQZZNPgs3ki9h{An4&Cap-c5sJ!LVLtRd=GOZ^bUpyDZHm6T|t#218}ZA zx*=~9PO>5IGaBD^XX-_2t7?7@WN7VfI^^#Csdz9&{1r z9y<9R?BT~-V8+W3kzWWQ^)ZSI+R zt^Lg`iN$Z~a27)sC_03jrD-%@{ArCPY#Pc*u|j7rE%}jF$LvO4vyvAw3bdL_mg&ei zXys_i=Q!UoF^Xp6^2h5o&%cQ@@)$J4l`AG09G6Uj<~A~!xG>KjKSyTX)zH*EdHMK0 zo;AV-D+bqWhtD-!^+`$*P0B`HokilLd1EuuwhJ?%3wJ~VXIjIE3tj653PExvIVhE& zFMYsI(OX-Q&W$}9gad^PUGuKElCvXxU_s*kx%dH)Bi&$*Q(+9j>(Q>7K1A#|8 zY!G!p0kW29rP*BNHe_wH49bF{K7tymi}Q!Vc_Ox2XjwtpM2SYo7n>?_sB=$c8O5^? z6as!fE9B48FcE`(ruNXP%rAZlDXrFTC7^aoXEX41k)tIq)6kJ*(sr$xVqsh_m3^?? zOR#{GJIr6E0Sz{-( z-R?4asj|!GVl0SEagNH-t|{s06Q3eG{kZOoPHL&Hs0gUkPc&SMY=&{C0&HDI)EHx9 zm#ySWluxwp+b~+K#VG%21%F65tyrt9RTPR$eG0afer6D`M zTW=y!@y6yi#I5V#!I|8IqU=@IfZo!@9*P+f{yLxGu$1MZ%xRY(gRQ2qH@9eMK0`Z> zgO`4DHfFEN8@m@dxYuljsmVv}c4SID+8{kr>d_dLzF$g>urGy9g+=`xAfTkVtz56G zrKNsP$yrDyP=kIqPN9~rVmC-wH672NF7xU>~j5M06Xr&>UJBmOV z%7Ie2d=K=u^D`~i3(U7x?n=h!SCSD1`aFe-sY<*oh+=;B>UVFBOHsF=(Xr(Cai{dL z4S7Y>PHdfG9Iav5FtKzx&UCgg)|DRLvq7!0*9VD`e6``Pgc z1O!qSaNeBBZnDXClh(Dq@XAk?Bd6+_rsFt`5(E+V2c)!Mx4X z47X+QCB4B7$B=Fw1Z1vnHg;x9oDV1YQJAR6Q3}_}BXTFg$A$E!oGG%`Rc()-Ysc%w za(yEn0fw~AaEFr}Rxi;if?Gv)&g~21UzXU9osI9{rNfH$gPTTk#^B|irEc<8W+|9$ zc~R${X2)N!npz1DFVa%nEW)cgPq`MSs)_I*Xwo<+ZK-2^hD(Mc8rF1+2v7&qV;5SET-ygMLNFsb~#u+LpD$uLR1o!ha67gPV5Q{v#PZK5X zUT4aZ{o}&*q7rs)v%*fDTl%}VFX?Oi{i+oKVUBqbi8w#FI%_5;6`?(yc&(Fed4Quy8xsswG+o&R zO1#lUiA%!}61s3jR7;+iO$;1YN;_*yUnJK=$PT_}Q%&0T@2i$ zwGC@ZE^A62YeOS9DU9me5#`(wv24fK=C)N$>!!6V#6rX3xiHehfdvwWJ>_fwz9l)o`Vw9yi z0p5BgvIM5o_ zgo-xaAkS_mya8FXo1Ke4;U*7TGSfm0!fb4{E5Ar8T3p!Z@4;FYT8m=d`C@4-LM121 z?6W@9d@52vxUT-6K_;1!SE%FZHcm0U$SsC%QB zxkTrfH;#Y7OYPy!nt|k^Lgz}uYudos9wI^8x>Y{fTzv9gfTVXN2xH`;Er=rTeAO1x znaaJOR-I)qwD4z%&dDjY)@s`LLSd#FoD!?NY~9#wQRTHpD7Vyyq?tKUHKv6^VE93U zt_&ePH+LM-+9w-_9rvc|>B!oT>_L59nipM-@ITy|x=P%Ezu@Y?N!?jpwP%lm;0V5p z?-$)m84(|7vxV<6f%rK3!(R7>^!EuvA&j@jdTI+5S1E{(a*wvsV}_)HDR&8iuc#>+ zMr^2z*@GTnfDW-QS38OJPR3h6U&mA;vA6Pr)MoT7%NvA`%a&JPi|K8NP$b1QY#WdMt8-CDA zyL0UXNpZ?x=tj~LeM0wk<0Dlvn$rtjd$36`+mlf6;Q}K2{%?%EQ+#FJy6v5cS+Q-~ ztk||Iwr$(CZQHi38QZF;lFFBNt+mg2*V_AhzkM<8#>E_S^xj8%T5tXTytD6f)vePG z^B0Ne-*6Pqg+rVW?%FGHLhl^ycQM-dhNCr)tGC|XyES*NK%*4AnZ!V+Zu?x zV2a82fs8?o?X} zjC1`&uo1Ti*gaP@E43NageV^$Xue3%es2pOrLdgznZ!_a{*`tfA+vnUv;^Ebi3cc$?-kh76PqA zMpL!y(V=4BGPQSU)78q~N}_@xY5S>BavY3Sez-+%b*m0v*tOz6zub9%*~%-B)lb}t zy1UgzupFgf?XyMa+j}Yu>102tP$^S9f7;b7N&8?_lYG$okIC`h2QCT_)HxG1V4Uv{xdA4k3-FVY)d}`cmkePsLScG&~@wE?ix2<(G7h zQ7&jBQ}Kx9mm<0frw#BDYR7_HvY7En#z?&*FurzdDNdfF znCL1U3#iO`BnfPyM@>;#m2Lw9cGn;(5*QN9$zd4P68ji$X?^=qHraP~Nk@JX6}S>2 zhJz4MVTib`OlEAqt!UYobU0-0r*`=03)&q7ubQXrt|t?^U^Z#MEZV?VEin3Nv1~?U zuwwSeR10BrNZ@*h7M)aTxG`D(By$(ZP#UmBGf}duX zhx;7y1x@j2t5sS#QjbEPIj95hV8*7uF6c}~NBl5|hgbB(}M3vnt zu_^>@s*Bd>w;{6v53iF5q7Em>8n&m&MXL#ilSzuC6HTzzi-V#lWoX zBOSBYm|ti@bXb9HZ~}=dlV+F?nYo3?YaV2=N@AI5T5LWWZzwvnFa%w%C<$wBkc@&3 zyUE^8xu<=k!KX<}XJYo8L5NLySP)cF392GK97(ylPS+&b}$M$Y+1VDrJa`GG7+%ToAsh z5NEB9oVv>as?i7f^o>0XCd%2wIaNRyejlFws`bXG$Mhmb6S&shdZKo;p&~b4wv$ z?2ZoM$la+_?cynm&~jEi6bnD;zSx<0BuCSDHGSssT7Qctf`0U!GDwG=+^|-a5%8Ty z&Q!%m%geLjBT*#}t zv1wDzuC)_WK1E|H?NZ&-xr5OX(ukXMYM~_2c;K}219agkgBte_#f+b9Al8XjL-p}1 z8deBZFjplH85+Fa5Q$MbL>AfKPxj?6Bib2pevGxIGAG=vr;IuuC%sq9x{g4L$?Bw+ zvoo`E)3#bpJ{Ij>Yn0I>R&&5B$&M|r&zxh+q>*QPaxi2{lp?omkCo~7ibow#@{0P> z&XBocU8KAP3hNPKEMksQ^90zB1&&b1Me>?maT}4xv7QHA@Nbvt-iWy7+yPFa9G0DP zP82ooqy_ku{UPv$YF0kFrrx3L=FI|AjG7*(paRLM0k1J>3oPxU0Zd+4&vIMW>h4O5G zej2N$(e|2Re z@8xQ|uUvbA8QVXGjZ{Uiolxb7c7C^nW`P(m*Jkqn)qdI0xTa#fcK7SLp)<86(c`A3 zFNB4y#NHe$wYc7V)|=uiW8gS{1WMaJhDj4xYhld;zJip&uJ{Jg3R`n+jywDc*=>bW zEqw(_+j%8LMRrH~+M*$V$xn9x9P&zt^evq$P`aSf-51`ZOKm(35OEUMlO^$>%@b?a z>qXny!8eV7cI)cb0lu+dwzGH(Drx1-g+uDX;Oy$cs+gz~?LWif;#!+IvPR6fa&@Gj zwz!Vw9@-Jm1QtYT?I@JQf%`=$^I%0NK9CJ75gA}ff@?I*xUD7!x*qcyTX5X+pS zAVy4{51-dHKs*OroaTy;U?zpFS;bKV7wb}8v+Q#z<^$%NXN(_hG}*9E_DhrRd7Jqp zr}2jKH{avzrpXj?cW{17{kgKql+R(Ew55YiKK7=8nkzp7Sx<956tRa(|yvHlW zNO7|;GvR(1q}GrTY@uC&ow0me|8wE(PzOd}Y=T+Ih8@c2&~6(nzQrK??I7DbOguA9GUoz3ASU%BFCc8LBsslu|nl>q8Ag(jA9vkQ`q2amJ5FfA7GoCdsLW znuok(diRhuN+)A&`rH{$(HXWyG2TLXhVDo4xu?}k2cH7QsoS>sPV)ylb45Zt&_+1& zT)Yzh#FHRZ-z_Q^8~IZ+G~+qSw-D<{0NZ5!J1%rAc`B23T98TMh9ylkzdk^O?W`@C??Z5U9#vi0d<(`?9fQvNN^ji;&r}geU zSbKR5Mv$&u8d|iB^qiLaZQ#@)%kx1N;Og8Js>HQD3W4~pI(l>KiHpAv&-Ev45z(vYK<>p6 z6#pU(@rUu{i9UngMhU&FI5yeRub4#u=9H+N>L@t}djC(Schr;gc90n%)qH{$l0L4T z;=R%r>CuxH!O@+eBR`rBLrT0vnP^sJ^+qE^C8ZY0-@te3SjnJ)d(~HcnQw@`|qAp|Trrs^E*n zY1!(LgVJfL?@N+u{*!Q97N{Uu)ZvaN>hsM~J?*Qvqv;sLnXHjKrtG&x)7tk?8%AHI zo5eI#`qV1{HmUf-Fucg1xn?Kw;(!%pdQ)ai43J3NP4{%x1D zI0#GZh8tjRy+2{m$HyI(iEwK30a4I36cSht3MM85UqccyUq6$j5K>|w$O3>`Ds;`0736+M@q(9$(`C6QZQ-vAKjIXKR(NAH88 zwfM6_nGWlhpy!_o56^BU``%TQ%tD4hs2^<2pLypjAZ;W9xAQRfF_;T9W-uidv{`B z{)0udL1~tMg}a!hzVM0a_$RbuQk|EG&(z*{nZXD3hf;BJe4YxX8pKX7VaIjjDP%sk zU5iOkhzZ&%?A@YfaJ8l&H;it@;u>AIB`TkglVuy>h;vjtq~o`5NfvR!ZfL8qS#LL` zD!nYHGzZ|}BcCf8s>b=5nZRYV{)KK#7$I06s<;RyYC3<~`mob_t2IfR*dkFJyL?FU zvuo-EE4U(-le)zdgtW#AVA~zjx*^80kd3A#?vI63pLnW2{j*=#UG}ISD>=ZGA$H&` z?Nd8&11*4`%MQlM64wfK`{O*ad5}vk4{Gy}F98xIAsmjp*9P=a^yBHBjF2*Iibo2H zGJAMFDjZcVd%6bZ`dz;I@F55VCn{~RKUqD#V_d{gc|Z|`RstPw$>Wu+;SY%yf1rI=>51Oolm>cnjOWHm?ydcgGs_kPUu=?ZKtQS> zKtLS-v$OMWXO>B%Z4LFUgw4MqA?60o{}-^6tf(c0{Y3|yF##+)RoXYVY-lyPhgn{1 z>}yF0Ab}D#1*746QAj5c%66>7CCWs8O7_d&=Ktu!SK(m}StvvBT1$8QP3O2a*^BNA z)HPhmIi*((2`?w}IE6Fo-SwzI_F~OC7OR}guyY!bOQfpNRg3iMvsFPYb9-;dT6T%R zhLwIjgiE^-9_4F3eMHZ3LI%bbOmWVe{SONpujQ;3C+58=Be4@yJK>3&@O>YaSdrevAdCLMe_tL zl8@F}{Oc!aXO5!t!|`I zdC`k$5z9Yf%RYJp2|k*DK1W@AN23W%SD0EdUV^6~6bPp_HZi0@dku_^N--oZv}wZA zH?Bf`knx%oKB36^L;P%|pf#}Tp(icw=0(2N4aL_Ea=9DMtF})2ay68V{*KfE{O=xL zf}tcfCL|D$6g&_R;r~1m{+)sutQPKzVv6Zw(%8w&4aeiy(qct1x38kiqgk!0^^X3IzI2ia zxI|Q)qJNEf{=I$RnS0`SGMVg~>kHQB@~&iT7+eR!Ilo1ZrDc3TVW)CvFFjHK4K}Kh z)dxbw7X%-9Ol&Y4NQE~bX6z+BGOEIIfJ~KfD}f4spk(m62#u%k<+iD^`AqIhWxtKGIm)l$7=L`=VU0Bz3-cLvy&xdHDe-_d3%*C|Q&&_-n;B`87X zDBt3O?Wo-Hg6*i?f`G}5zvM?OzQjkB8uJhzj3N;TM5dSM$C@~gGU7nt-XX_W(p0IA6$~^cP*IAnA<=@HVqNz=Dp#Rcj9_6*8o|*^YseK_4d&mBY*Y&q z8gtl;(5%~3Ehpz)bLX%)7|h4tAwx}1+8CBtu9f5%^SE<&4%~9EVn4*_!r}+{^2;} zwz}#@Iw?&|8F2LdXUIjh@kg3QH69tqxR_FzA;zVpY=E zcHnWh(3j3UXeD=4m_@)Ea4m#r?axC&X%#wC8FpJPDYR~@65T?pXuWdPzEqXP>|L`S zKYFF0I~%I>SFWF|&sDsRdXf$-TVGSoWTx7>7mtCVUrQNVjZ#;Krobgh76tiP*0(5A zs#<7EJ#J`Xhp*IXB+p5{b&X3GXi#b*u~peAD9vr0*Vd&mvMY^zxTD=e(`}ybDt=BC(4q)CIdp>aK z0c?i@vFWjcbK>oH&V_1m_EuZ;KjZSiW^i30U` zGLK{%1o9TGm8@gy+Rl=-5&z`~Un@l*2ne3e9B+>wKyxuoUa1qhf?-Pi= zZLCD-b7*(ybv6uh4b`s&Ol3hX2ZE<}N@iC+h&{J5U|U{u$XK0AJz)!TSX6lrkG?ris;y{s zv`B5Rq(~G58?KlDZ!o9q5t%^E4`+=ku_h@~w**@jHV-+cBW-`H9HS@o?YUUkKJ;AeCMz^f@FgrRi@?NvO3|J zBM^>4Z}}!vzNum!R~o0)rszHG(eeq!#C^wggTgne^2xc9nIanR$pH1*O;V>3&#PNa z7yoo?%T(?m-x_ow+M0Bk!@ow>A=skt&~xK=a(GEGIWo4AW09{U%(;CYLiQIY$bl3M zxC_FGKY%J`&oTS{R8MHVe{vghGEshWi!(EK*DWmoOv|(Ff#(bZ-<~{rc|a%}Q4-;w z{2gca97m~Nj@Nl{d)P`J__#Zgvc@)q_(yfrF2yHs6RU8UXxcU(T257}E#E_A}%2_IW?%O+7v((|iQ{H<|$S7w?;7J;iwD>xbZc$=l*(bzRXc~edIirlU0T&0E_EXfS5%yA zs0y|Sp&i`0zf;VLN=%hmo9!aoLGP<*Z7E8GT}%)cLFs(KHScNBco(uTubbxCOD_%P zD7XlHivrSWLth7jf4QR9`jFNk-7i%v4*4fC*A=;$Dm@Z^OK|rAw>*CI%E z3%14h-)|Q%_$wi9=p!;+cQ*N1(47<49TyB&B*bm_m$rs+*ztWStR~>b zE@V06;x19Y_A85N;R+?e?zMTIqdB1R8>(!4_S!Fh={DGqYvA0e-P~2DaRpCYf4$-Q z*&}6D!N_@s`$W(|!DOv%>R0n;?#(HgaI$KpHYpnbj~I5eeI(u4CS7OJajF%iKz)*V zt@8=9)tD1ML_CrdXQ81bETBeW!IEy7mu4*bnU--kK;KfgZ>oO>f)Sz~UK1AW#ZQ_ic&!ce~@(m2HT@xEh5u%{t}EOn8ET#*U~PfiIh2QgpT z%gJU6!sR2rA94u@xj3%Q`n@d}^iMH#X>&Bax+f4cG7E{g{vlJQ!f9T5wA6T`CgB%6 z-9aRjn$BmH=)}?xWm9bf`Yj-f;%XKRp@&7?L^k?OT_oZXASIqbQ#eztkW=tmRF$~% z6(&9wJuC-BlGrR*(LQKx8}jaE5t`aaz#Xb;(TBK98RJBjiqbZFyRNTOPA;fG$;~e` zsd6SBii3^(1Y`6^#>kJ77xF{PAfDkyevgox`qW`nz1F`&w*DH5Oh1idOTLES>DToi z8Qs4|?%#%>yuQO1#{R!-+2AOFznWo)e3~_D!nhoDgjovB%A8< zt%c^KlBL$cDPu!Cc`NLc_8>f?)!FGV7yudL$bKj!h;eOGkd;P~sr6>r6TlO{Wp1%xep8r1W{`<4am^(U} z+nCDP{Z*I?IGBE&*KjiaR}dpvM{ZFMW%P5Ft)u$FD373r2|cNsz%b0uk1T+mQI@4& zFF*~xDxDRew1Bol-*q>F{Xw8BUO;>|0KXf`lv7IUh%GgeLUzR|_r(TXZTbfXFE0oc zmGMwzNFgkdg><=+3MnncRD^O`m=SxJ6?}NZ8BR)=ag^b4Eiu<_bN&i0wUaCGi60W6 z%iMl&`h8G)y`gfrVw$={cZ)H4KSQO`UV#!@@cDx*hChXJB7zY18EsIo1)tw0k+8u; zg(6qLysbxVbLFbkYqKbEuc3KxTE+%j5&k>zHB8_FuDcOO3}FS|eTxoUh2~|Bh?pD| zsmg(EtMh`@s;`(r!%^xxDt(5wawK+*jLl>_Z3shaB~vdkJ!V3RnShluzmwn7>PHai z3avc`)jZSAvTVC6{2~^CaX49GXMtd|sbi*swkgoyLr=&yp!ASd^mIC^D;a|<=3pSt zM&0u%#%DGzlF4JpMDs~#kU;UCtyW+d3JwNiu`Uc7Yi6%2gfvP_pz8I{Q<#25DjM_D z(>8yI^s@_tG@c=cPoZImW1CO~`>l>rs=i4BFMZT`vq5bMOe!H@8q@sEZX<-kiY&@u3g1YFc zc@)@OF;K-JjI(eLs~hy8qOa9H1zb!3GslI!nH2DhP=p*NLHeh^9WF?4Iakt+b( z-4!;Q-8c|AX>t+5I64EKpDj4l2x*!_REy9L_9F~i{)1?o#Ws{YG#*}lg_zktt#ZlN zmoNsGm7$AXLink`GWtY*TZEH!J9Qv+A1y|@>?&(pb(6XW#ZF*}x*{60%wnt{n8Icp zq-Kb($kh6v_voqvA`8rq!cgyu;GaWZ>C2t6G5wk! zcKTlw=>KX3ldU}a1%XESW71))Z=HW%sMj2znJ;fdN${00DGGO}d+QsTQ=f;BeZ`eC~0-*|gn$9G#`#0YbT(>O(k&!?2jI z&oi9&3n6Vz<4RGR}h*1ggr#&0f%Op(6{h>EEVFNJ0C>I~~SmvqG+{RXDrexBz zw;bR@$Wi`HQ3e*eU@Cr-4Z7g`1R}>3-Qej(#Dmy|CuFc{Pg83Jv(pOMs$t(9vVJQJ zXqn2Ol^MW;DXq!qM$55vZ{JRqg!Q1^Qdn&FIug%O3=PUr~Q`UJuZ zc`_bE6i^Cp_(fka&A)MsPukiMyjG$((zE$!u>wyAe`gf-1Qf}WFfi1Y{^ zdCTTrxqpQE#2BYWEBnTr)u-qGSVRMV7HTC(x zb(0FjYH~nW07F|{@oy)rlK6CCCgyX?cB;19Z(bCP5>lwN0UBF}Ia|L0$oGHl-oSTZ zr;(u7nDjSA03v~XoF@ULya8|dzH<2G=n9A)AIkQKF0mn?!BU(ipengAE}6r`CE!jd z=EcX8exgDZZQ~~fgxR-2yF;l|kAfnjhz|i_o~cYRdhnE~1yZ{s zG!kZJ<-OVnO{s3bOJK<)`O;rk>=^Sj3M76Nqkj<_@Jjw~iOkWUCL+*Z?+_Jvdb!0cUBy=(5W9H-r4I zxAFts>~r)B>KXdQANyaeKvFheZMgoq4EVV0|^NR@>ea* zh%<78{}wsdL|9N1!jCN-)wH4SDhl$MN^f_3&qo?>Bz#?c{ne*P1+1 z!a`(2Bxy`S^(cw^dv{$cT^wEQ5;+MBctgPfM9kIQGFUKI#>ZfW9(8~Ey-8`OR_XoT zflW^mFO?AwFWx9mW2-@LrY~I1{dlX~jBMt!3?5goHeg#o0lKgQ+eZcIheq@A&dD}GY&1c%hsgo?z zH>-hNgF?Jk*F0UOZ*bs+MXO(dLZ|jzKu5xV1v#!RD+jRrHdQ z>>b){U(I@i6~4kZXn$rk?8j(eVKYJ2&k7Uc`u01>B&G@c`P#t#x@>Q$N$1aT514fK zA_H8j)UKen{k^ehe%nbTw}<JV6xN_|| z(bd-%aL}b z3VITE`N~@WlS+cV>C9TU;YfsU3;`+@hJSbG6aGvis{Gs%2K|($)(_VfpHB|DG8Nje+0tCNW%_cu3hk0F)~{-% zW{2xSu@)Xnc`Dc%AOH)+LT97ImFR*WekSnJ3OYIs#ijP4TD`K&7NZKsfZ;76k@VD3py?pSw~~r^VV$Z zuUl9lF4H2(Qga0EP_==vQ@f!FLC+Y74*s`Ogq|^!?RRt&9e9A&?Tdu=8SOva$dqgYU$zkKD3m>I=`nhx-+M;-leZgt z8TeyQFy`jtUg4Ih^JCUcq+g_qs?LXSxF#t+?1Jsr8c1PB#V+f6aOx@;ThTIR4AyF5 z3m$Rq(6R}U2S}~Bn^M0P&Aaux%D@ijl0kCCF48t)+Y`u>g?|ibOAJoQGML@;tn{%3IEMaD(@`{7ByXQ`PmDeK*;W?| zI8%%P8%9)9{9DL-zKbDQ*%@Cl>Q)_M6vCs~5rb(oTD%vH@o?Gk?UoRD=C-M|w~&vb z{n-B9>t0EORXd-VfYC>sNv5vOF_Wo5V)(Oa%<~f|EU7=npanpVX^SxPW;C!hMf#kq z*vGNI-!9&y!|>Zj0V<~)zDu=JqlQu+ii387D-_U>WI_`3pDuHg{%N5yzU zEulPN)%3&{PX|hv*rc&NKe(bJLhH=GPuLk5pSo9J(M9J3v)FxCo65T%9x<)x+&4Rr2#nu2?~Glz|{28OV6 z)H^`XkUL|MG-$XE=M4*fIPmeR2wFWd>5o*)(gG^Y>!P4(f z68RkX0cRBOFc@`W-IA(q@p@m>*2q-`LfujOJ8-h$OgHte;KY4vZKTxO95;wh#2ZDL zKi8aHkz2l54lZd81t`yY$Tq_Q2_JZ1d(65apMg}vqwx=ceNOWjFB)6m3Q!edw2<{O z4J6+Un(E8jxs-L-K_XM_VWahy zE+9fm_ZaxjNi{fI_AqLKqhc4IkqQ4`Ut$=0L)nzlQw^%i?bP~znsbMY3f}*nPWqQZ zz_CQDpZ?Npn_pEr`~SX1`OoSkS;bmzQ69y|W_4bH3&U3F7EBlx+t%2R02VRJ01cfX zo$$^ObDHK%bHQaOcMpCq@@Jp8!OLYVQO+itW1ZxlkmoG#3FmD4b61mZjn4H|pSmYi2YE;I#@jtq8Mhjdgl!6({gUsQA>IRXb#AyWVt7b=(HWGUj;wd!S+q z4S+H|y<$yPrrrTqQHsa}H`#eJFV2H5Dd2FqFMA%mwd`4hMK4722|78d(XV}rz^-GV(k zqsQ>JWy~cg_hbp0=~V3&TnniMQ}t#INg!o2lN#H4_gx8Tn~Gu&*ZF8#kkM*5gvPu^ zw?!M^05{7q&uthxOn?%#%RA_%y~1IWly7&_-sV!D=Kw3DP+W)>YYRiAqw^d7vG_Q%v;tRbE1pOBHc)c&_5=@wo4CJTJ1DeZErEvP5J(kc^GnGYX z|LqQjTkM{^gO2cO#-(g!7^di@$J0ibC(vsnVkHt3osnWL8?-;R1BW40q5Tmu_9L-s z7fNF5fiuS-%B%F$;D97N-I@!~c+J>nv%mzQ5vs?1MgR@XD*Gv`A{s8 z5Cr>z5j?|sb>n=c*xSKHpdy667QZT?$j^Doa%#m4ggM@4t5Oe%iW z@w~j_B>GJJkO+6dVHD#CkbC(=VMN8nDkz%44SK62N(ZM#AsNz1KW~3(i=)O;q5JrK z?vAVuL}Rme)OGQuLn8{3+V352UvEBV^>|-TAAa1l-T)oiYYD&}Kyxw73shz?Bn})7 z_a_CIPYK(zMp(i+tRLjy4dV#CBf3s@bdmwXo`Y)dRq9r9-c@^2S*YoNOmAX%@OYJOXs zT*->in!8Ca_$W8zMBb04@|Y)|>WZ)-QGO&S7Zga1(1#VR&)X+MD{LEPc%EJCXIMtr z1X@}oNU;_(dfQ_|kI-iUSTKiVzcy+zr72kq)TIp(GkgVyd%{8@^)$%G)pA@^Mfj71FG%d?sf(2Vm>k%X^RS`}v0LmwIQ7!_7cy$Q8pT?X1VWecA_W68u==HbrU& z@&L6pM0@8ZHL?k{6+&ewAj%grb6y@0$3oamTvXsjGmPL_$~OpIyIq%b$(uI1VKo zk_@{r>1p84UK3}B>@d?xUZ}dJk>uEd+-QhwFQ`U?rA=jj+$w8sD#{492P}~R#%z%0 z5dlltiAaiPKv9fhjmuy{*m!C22$;>#85EduvdSrFES{QO$bHpa7E@&{bWb@<7VhTF zXCFS_wB>7*MjJ3$_i4^A2XfF2t7`LOr3B@??OOUk=4fKkaHne4RhI~Lm$JrHfUU*h zgD9G66;_F?3>0W{pW2A^DR7Bq`ZUiSc${S8EM>%gFIqAw0du4~kU#vuCb=$I_PQv? zZfEY7X6c{jJZ@nF&T>4oyy(Zr_XqnMq)ZtGPASbr?IhZOnL|JKY()`eo=P5UK9(P-@ zOJKFogtk|pscVD+#$7KZs^K5l4gC}*CTd0neZ8L(^&1*bPrCp23%{VNp`4Ld*)Fly z)b|zb*bCzp?&X3_=qLT&0J+=p01&}9*xbk~^hd^@mV!Ha`1H+M&60QH2c|!Ty`RepK|H|Moc5MquD z=&$Ne3%WX+|7?iiR8=7*LW9O3{O%Z6U6`VekeF8lGr5vd)rsZu@X#5!^G1;nV60cz zW?9%HgD}1G{E(YvcLcIMQR65BP50)a;WI*tjRzL7diqRqh$3>OK{06VyC=pj6OiardshTnYfve5U>Tln@y{DC99f!B4> zCrZa$B;IjDrg}*D5l=CrW|wdzENw{q?oIj!Px^7DnqAsU7_=AzXxoA;4(YvN5^9ag zwEd4-HOlO~R0~zk>!4|_Z&&q}agLD`Nx!%9RLC#7fK=w06e zOK<>|#@|e2zjwZ5aB>DJ%#P>k4s0+xHJs@jROvoDQfSoE84l8{9y%5^POiP+?yq0> z7+Ymbld(s-4p5vykK@g<{X*!DZt1QWXKGmj${`@_R~=a!qPzB357nWW^KmhV!^G3i zsYN{2_@gtzsZH*FY!}}vNDnqq>kc(+7wK}M4V*O!M&GQ|uj>+8!Q8Ja+j3f*MzwcI z^s4FXGC=LZ?il4D+Y^f89wh!d7EU-5dZ}}>_PO}jXRQ@q^CjK-{KVnmFd_f&IDKmx zZ5;PDLF%_O);<4t`WSMN;Ec^;I#wU?Z?_R|Jg`#wbq;UM#50f@7F?b7ySi-$C-N;% zqXowTcT@=|@~*a)dkZ836R=H+m6|fynm#0Y{KVyYU=_*NHO1{=Eo{^L@wWr7 zjz9GOu8Fd&v}a4d+}@J^9=!dJRsCO@=>K6UCM)Xv6};tb)M#{(k!i}_0Rjq z2kb7wPcNgov%%q#(1cLykjrxAg)By+3QueBR>Wsep&rWQHq1wE!JP+L;q+mXts{j@ zOY@t9BFmofApO0k@iBFPeKsV3X=|=_t65QyohXMSfMRr7Jyf8~ogPVmJwbr@`nmml zov*NCf;*mT(5s4K=~xtYy8SzE66W#tW4X#RnN%<8FGCT{z#jRKy@Cy|!yR`7dsJ}R z!eZzPCF+^b0qwg(mE=M#V;Ud9)2QL~ z-r-2%0dbya)%ui_>e6>O3-}4+Q!D+MU-9HL2tH)O`cMC1^=rA=q$Pcc;Zel@@ss|K zH*WMdS^O`5Uv1qNTMhM(=;qjhaJ|ZC41i2!kt4;JGlXQ$tvvF8Oa^C@(q6(&6B^l) zNG{GaX?`qROHwL-F1WZDEF;C6Inuv~1&ZuP3j53547P38tr|iPH#3&hN*g0R^H;#) znft`cw0+^Lwe{!^kQat+xjf_$SZ05OD6~U`6njelvd+4pLZU(0ykS5&S$)u?gm!;} z+gJ8g12b1D4^2HH!?AHFAjDAP^q)Juw|hZfIv{3Ryn%4B^-rqIF2 zeWk^za4fq#@;re{z4_O|Zj&Zn{2WsyI^1%NW=2qA^iMH>u>@;GAYI>Bk~u0wWQrz* zdEf)7_pSYMg;_9^qrCzvv{FZYwgXK}6e6ceOH+i&+O=x&{7aRI(oz3NHc;UAxMJE2 zDb0QeNpm$TDcshGWs!Zy!shR$lC_Yh-PkQ`{V~z!AvUoRr&BAGS#_*ZygwI2-)6+a zq|?A;+-7f0Dk4uuht z6sWPGl&Q$bev1b6%aheld88yMmBp2j=z*egn1aAWd?zN=yEtRDGRW&nmv#%OQwuJ; zqKZ`L4DsqJwU{&2V9f>2`1QP7U}`6)$qxTNEi`4xn!HzIY?hDnnJZw+mFnVSry=bLH7ar+M(e9h?GiwnOM?9ZJcTJ08)T1-+J#cr&uHhXkiJ~}&(}wvzCo33 zLd_<%rRFQ3d5fzKYQy41<`HKk#$yn$Q+Fx-?{3h72XZrr*uN!5QjRon-qZh9-uZ$rWEKZ z!dJMP`hprNS{pzqO`Qhx`oXGd{4Uy0&RDwJ`hqLw4v5k#MOjvyt}IkLW{nNau8~XM z&XKeoVYreO=$E%z^WMd>J%tCdJx5-h+8tiawu2;s& zD7l`HV!v@vcX*qM(}KvZ#%0VBIbd)NClLBu-m2Scx1H`jyLYce;2z;;eo;ckYlU53 z9JcQS+CvCwj*yxM+e*1Vk6}+qIik2VzvUuJyWyO}piM1rEk%IvS;dsXOIR!#9S;G@ zPcz^%QTf9D<2~VA5L@Z@FGQqwyx~Mc-QFzT4Em?7u`OU!PB=MD8jx%J{<`tH$Kcxz zjIvb$x|`s!-^^Zw{hGV>rg&zb;=m?XYAU0LFw+uyp8v@Y)zmjj&Ib7Y1@r4`cfrS%cVxJiw`;*BwIU*6QVsBBL;~nw4`ZFqs z1YSgLVy=rvA&GQB4MDG+j^)X1N=T;Ty2lE-`zrg(dNq?=Q`nCM*o8~A2V~UPArX<| zF;e$5B0hPSo56=ePVy{nah#?e-Yi3g*z6iYJ#BFJ-5f0KlQ-PRiuGwe29fyk1T6>& zeo2lvb%h9Vzi&^QcVNp}J!x&ubtw5fKa|n2XSMlg#=G*6F|;p)%SpN~l8BaMREDQN z-c9O}?%U1p-ej%hzIDB!W_{`9lS}_U==fdYpAil1E3MQOFW^u#B)Cs zTE3|YB0bKpXuDKR9z&{4gNO3VHDLB!xxPES+)yaJxo<|}&bl`F21};xsQnc!*FPZA zSct2IU3gEu@WQKmY-vA5>MV?7W|{$rAEj4<8`*i)<%fj*gDz2=ApqZ&MP&0UmO1?q!GN=di+n(#bB_mHa z(H-rIOJqamMfwB%?di!TrN=x~0jOJtvb0e9uu$ZCVj(gJyK}Fa5F2S?VE30P{#n3eMy!-v7e8viCooW9cfQx%xyPNL*eDKL zB=X@jxulpkLfnar7D2EeP*0L7c9urDz{XdV;@tO;u`7DlN7#~ zAKA~uM2u8_<5FLkd}OzD9K zO5&hbK8yakUXn8r*H9RE zO9Gsipa2()=&x=1mnQtNP#4m%GXThu8Ccqx*qb;S{5}>bU*V5{SY~(Hb={cyTeaTM zMEaKedtJf^NnJrwQ^Bd57vSlJ3l@$^0QpX@_1>h^+js8QVpwOiIMOiSC_>3@dt*&| zV?0jRdlgn|FIYam0s)a@5?0kf7A|GD|dRnP1=B!{ldr;N5s)}MJ=i4XEqlC}w)LEJ}7f9~c!?It(s zu>b=YBlFRi(H-%8A!@Vr{mndRJ z_jx*?BQpK>qh`2+3cBJhx;>yXPjv>dQ0m+nd4nl(L;GmF-?XzlMK zP(Xeyh7mFlP#=J%i~L{o)*sG7H5g~bnL2Hn3y!!r5YiYRzgNTvgL<(*g5IB*gcajK z86X3LoW*5heFmkIQ-I_@I_7b!Xq#O;IzOv(TK#(4gd)rmCbv5YfA4koRfLydaIXUU z8(q?)EWy!sjsn-oyUC&uwJqEXdlM}#tmD~*Ztav=mTQyrw0^F=1I5lj*}GSQTQOW{ z=O12;?fJfXxy`)ItiDB@0sk43AZo_sRn*jc#S|(2*%tH84d|UTYN!O4R(G6-CM}84 zpiyYJ^wl|w@!*t)dwn0XJv2kuHgbfNL$U6)O-k*~7pQ?y=sQJdKk5x`1>PEAxjIWn z{H$)fZH4S}%?xzAy1om0^`Q$^?QEL}*ZVQK)NLgmnJ`(we z21c23X1&=^>k;UF-}7}@nzUf5HSLUcOYW&gsqUrj7%d$)+d8ZWwTZq)tOgc%fz95+ zl%sdl)|l|jXfqIcjKTFrX74Rbq1}osA~fXPSPE?XO=__@`7k4Taa!sHE8v-zfx(AM zXT_(7u;&_?4ZIh%45x>p!(I&xV|IE**qbqCRGD5aqLpCRvrNy@uT?iYo-FPpu`t}J zSTZ}MDrud+`#^14r`A%UoMvN;raizytxMBV$~~y3i0#m}0F}Dj_fBIz+)1RWdnctP z>^O^vd0E+jS+$V~*`mZWER~L^q?i-6RPxxufWdrW=%prbCYT{5>Vgu%vPB)~NN*2L zB?xQg2K@+Xy=sPh$%10LH!39p&SJG+3^i*lFLn=uY8Io6AXRZf;p~v@1(hWsFzeKzx99_{w>r;cypkPVJCKtLGK>?-K0GE zGH>$g?u`)U_%0|f#!;+E>?v>qghuBwYZxZ*Q*EE|P|__G+OzC-Z+}CS(XK^t!TMoT zc+QU|1C_PGiVp&_^wMxfmMAuJDQ%1p4O|x5DljN6+MJiO%8s{^ts8$uh5`N~qK46c`3WY#hRH$QI@*i1OB7qBIN*S2gK#uVd{ zik+wwQ{D)g{XTGjKV1m#kYhmK#?uy)g@idi&^8mX)Ms`^=hQGY)j|LuFr8SJGZjr| zzZf{hxYg)-I^G|*#dT9Jj)+wMfz-l7ixjmwHK9L4aPdXyD-QCW!2|Jn(<3$pq-BM; zs(6}egHAL?8l?f}2FJSkP`N%hdAeBiD{3qVlghzJe5s9ZUMd`;KURm_eFaK?d&+TyC88v zCv2R(Qg~0VS?+p+l1e(aVq`($>|0b{{tPNbi} zaZDffTZ7N|t2D5DBv~aX#X+yGagWs1JRsqbr4L8a`B`m) z1p9?T`|*8ZXHS7YD8{P1Dk`EGM`2Yjsy0=7M&U6^VO30`Gx!ZkUoqmc3oUbd&)V*iD08>dk=#G!*cs~^tOw^s8YQqYJ z!5=-4ZB7rW4mQF&YZw>T_in-c9`0NqQ_5Q}fq|)%HECgBd5KIo`miEcJ>~a1e2B@) zL_rqoQ;1MowD34e6#_U+>D`WcnG5<2Q6cnt4Iv@NC$*M+i3!c?6hqPJLsB|SJ~xo! zm>!N;b0E{RX{d*in3&0w!cmB&TBNEjhxdg!fo+}iGE*BWV%x*46rT@+cXU;leofWy zxst{S8m!_#hIhbV7wfWN#th8OI5EUr3IR_GOIzBgGW1u4J*TQxtT7PXp#U#EagTV* zehVkBFF06`@5bh!t%L)-)`p|d7D|^kED7fsht#SN7*3`MKZX};Jh0~nCREL_BGqNR zxpJ4`V{%>CAqEE#Dt95u=;Un8wLhrac$fao`XlNsOH%&Ey2tK&vAcriS1kXnntDuttcN{%YJz@!$T zD&v6ZQ>zS1`o!qT=JK-Y+^i~bZkVJpN8%<4>HbuG($h9LP;{3DJF_Jcl8CA5M~<3s^!$Sg62zLEnJtZ z0`)jwK75Il6)9XLf(64~`778D6-#Ie1IR2Ffu+_Oty%$8u+bP$?803V5W6%(+iZzp zp5<&sBV&%CJcXUIATUakP1czt$&0x$lyoLH!ueNaIpvtO z*eCijxOv^-D?JaLzH<3yhOfDENi@q#4w(#tl-19(&Yc2K%S8Y&r{3~-)P17sC1{rQ zOy>IZ6%814_UoEi+w9a4XyGXF66{rgE~UT)oT4x zg9oIx@|{KL#VpTyE=6WK@Sbd9RKEEY)5W{-%0F^6(QMuT$RQRZ&yqfyF*Z$f8>{iT zq(;UzB-Ltv;VHvh4y%YvG^UEkvpe9ugiT97ErbY0ErCEOWs4J=kflA!*Q}gMbEP`N zY#L`x9a?E)*~B~t+7c8eR}VY`t}J;EWuJ-6&}SHnNZ8i0PZT^ahA@@HXk?c0{)6rC zP}I}_KK7MjXqn1E19gOwWvJ3i9>FNxN67o?lZy4H?n}%j|Dq$p%TFLUPJBD;R|*0O z3pLw^?*$9Ax!xy<&fO@;E2w$9nMez{5JdFO^q)B0OmGwkxxaDsEU+5C#g+?Ln-Vg@ z-=z4O*#*VJa*nujGnGfK#?`a|xfZsuiO+R}7y(d60@!WUIEUt>K+KTI&I z9YQ6#hVCo}0^*>yr-#Lisq6R?uI=Ms!J7}qm@B}Zu zp%f-~1Cf!-5S0xXl`oqq&fS=tt0`%dDWI&6pW(s zJXtYiY&~t>k5I0RK3sN;#8?#xO+*FeK#=C^%{Y>{k{~bXz%(H;)V5)DZRk~(_d0b6 zV!x54fwkl`1y;%U;n|E#^Vx(RGnuN|T$oJ^R%ZmI{8(9>U-K^QpDcT?Bb@|J0NAfvHtL#wP ziYupr2E5=_KS{U@;kyW7oy*+UTOiF*e+EhYqVcV^wx~5}49tBNSUHLH1=x}6L2Fl^4X4633$k!ZHZTL50Vq+a5+ z<}uglXQ<{x&6ey)-lq6;4KLHbR)_;Oo^FodsYSw3M-)FbLaBcPI=-ao+|))T2ksKb z{c%Fu`HR1dqNw8%>e0>HI2E_zNH1$+4RWfk}p-h(W@)7LC zwVnUO17y+~kw35CxVtokT44iF$l8XxYuetp)1Br${@lb(Q^e|q*5%7JNxp5B{r<09 z-~8o#rI1(Qb9FhW-igcsC6npf5j`-v!nCrAcVx5+S&_V2D>MOWp6cV$~Olhp2`F^Td{WV`2k4J`djb#M>5D#k&5XkMu*FiO(uP{SNX@(=)|Wm`@b> z_D<~{ip6@uyd7e3Rn+qM80@}Cl35~^)7XN?D{=B-4@gO4mY%`z!kMIZizhGtCH-*7 z{a%uB4usaUoJwbkVVj%8o!K^>W=(ZzRDA&kISY?`^0YHKe!()(*w@{w7o5lHd3(Us zUm-K=z&rEbOe$ackQ3XH=An;Qyug2g&vqf;zsRBldxA+=vNGoM$Zo9yT?Bn?`Hkiq z&h@Ss--~+=YOe@~JlC`CdSHy zcO`;bgMASYi6`WSw#Z|A;wQgH@>+I3OT6(*JgZZ_XQ!LrBJfVW2RK%#02|@V|H4&8DqslU6Zj(x!tM{h zRawG+Vy63_8gP#G!Eq>qKf(C&!^G$01~baLLk#)ov-Pqx~Du>%LHMv?=WBx2p2eV zbj5fjTBhwo&zeD=l1*o}Zs%SMxEi9yokhbHhY4N!XV?t8}?!?42E-B^Rh&ABFxovs*HeQ5{{*)SrnJ%e{){Z_#JH+jvwF7>Jo zE+qzWrugBwVOZou~oFa(wc7?`wNde>~HcC@>fA^o>ll?~aj-e|Ju z+iJzZg0y1@eQ4}rm`+@hH(|=gW^;>n>ydn!8%B4t7WL)R-D>mMw<7Wz6>ulFnM7QA ze2HEqaE4O6jpVq&ol3O$46r+DW@%glD8Kp*tFY#8oiSyMi#yEpVIw3#t?pXG?+H>v z$pUwT@0ri)_Bt+H(^uzp6qx!P(AdAI_Q?b`>0J?aAKTPt>73uL2(WXws9+T|%U)Jq zP?Oy;y6?{%J>}?ZmfcnyIQHh_jL;oD$`U#!v@Bf{5%^F`UiOX%)<0DqQ^nqA5Ac!< z1DPO5C>W0%m?MN*x(k>lDT4W3;tPi=&yM#Wjwc5IFNiLkQf`7GN+J*MbB4q~HVePM zeDj8YyA*btY&n!M9$tuOxG0)2um))hsVsY+(p~JnDaT7x(s2If0H_iRSju7!z7p|8 zzI`NV!1hHWX3m)?t68k6yNKvop{Z>kl)f5GV(~1InT4%9IxqhDX-rgj)Y|NYq_NTlZgz-)=Y$=x9L7|k0=m@6WQ<4&r=BX@pW25NtCI+N{e&`RGSpR zeb^`@FHm5?pWseZ6V08{R(ki}--13S2op~9Kzz;#cPgL}Tmrqd+gs(fJLTCM8#&|S z^L+7PbAhltJDyyxAVxqf(2h!RGC3$;hX@YNz@&JRw!m5?Q)|-tZ8u0D$4we+QytG^ zj0U_@+N|OJlBHdWPN!K={a$R1Zi{2%5QD}s&s-Xn1tY1cwh)8VW z$pjq>8sj4)?76EJs6bA0E&pfr^Vq`&Xc;Tl2T!fm+MV%!H|i0o;7A=zE?dl)-Iz#P zSY7QRV`qRc6b&rON`BValC01zSLQpVemH5y%FxK8m^PeNN(Hf1(%C}KPfC*L?Nm!nMW0@J3(J=mYq3DPk;TMs%h`-amWbc%7{1Lg3$ z^e=btuqch-lydbtLvazh+fx?87Q7!YRT(=-Vx;hO)?o@f1($e5B?JB9jcRd;zM;iE zu?3EqyK`@_5Smr#^a`C#M>sRwq2^|ym)X*r;0v6AM`Zz1aK94@9Ti)Lixun2N!e-A z>w#}xPxVd9AfaF$XTTff?+#D(xwOpjZj9-&SU%7Z-E2-VF-n#xnPeQH*67J=j>TL# z<v}>AiTXrQ(fYa%82%qlH=L z6Fg8@r4p+BeTZ!5cZlu$iR?EJpYuTx>cJ~{{B7KODY#o*2seq=p2U0Rh;3mX^9sza zk^R_l7jzL5BXWlrVkhh!+LQ-Nc0I`6l1mWkp~inn)HQWqMTWl4G-TBLglR~n&6J?4 z7J)IO{wkrtT!Csntw3H$Mnj>@;QbrxC&Shqn^VVu$Ls*_c~TTY~fri6fO-=eJsC*8(3(H zSyO>=B;G`qA398OvCHRvf3mabrPZaaLhn*+jeA`qI!gP&i8Zs!*bBqMXDJpSZG$N) zx0rDLvcO>EoqCTR)|n7eOp-jmd>`#w`6`;+9+hihW2WnKVPQ20LR94h+(p)R$Y!Q zj_3ZEY+e@NH0f6VjLND)sh+Cvfo3CpcXw?`$@a^@CyLrAKIpjL8G z`;cDLqvK=ER)$q)+6vMKlxn!!SzWl>Ib9Ys9L)L0IWr*Ox;Rk#(Dpqf;wapY_EYL8 zKFrV)Q8BBKO4$r2hON%g=r@lPE;kBUVYVG`uxx~QI>9>MCXw_5vnmDsm|^KRny929 zeKx>F(LDs#K4FGU*k3~GX`A!)l8&|tyan-rBHBm6XaB5hc5sGKWwibAD7&3M-gh1n z2?eI7E2u{(^z#W~wU~dHSfy|m)%PY454NBxED)y-T3AO`CLQxklcC1I@Y`v4~SEI#Cm> z-cjqK6I?mypZapi$ZK;y&G+|#D=woItrajg69VRD+Fu8*UxG6KdfFmFLE}HvBJ~Y) zC&c-hr~;H2Idnsz7_F~MKpBZldh)>itc1AL0>4knbVy#%pUB&9vqL1Kg*^aU`k#(p z=A%lur(|$GWSqILaWZ#2xj(&lheSiA|N6DOG?A|$!aYM)?oME6ngnfLw0CA79WA+y zhUeLbMw*VB?drVE_D~3DWVaD>8x?_q>f!6;)i3@W<=kBZBSE=uIU60SW)qct?AdM zXgti8&O=}QNd|u%Fpxr172Kc`sX^@fm>Fxl8fbFalJYci_GGoIzU*~U*I!QLz? z4NYk^=JXBS*Uph@51da-v;%?))cB^(ps}y8yChu7CzyC9SX{jAq13zdnqRHRvc{ha zcPmgCUqAJ^1RChMCCz;ZN*ap{JPoE<1#8nNObDbAt6Jr}Crq#xGkK@w2mLhIUecvy z#?s~?J()H*?w9K`_;S+8TNVkHSk}#yvn+|~jcB|he}OY(zH|7%EK%-Tq=)18730)v zM3f|=oFugXq3Lqn={L!wx|u(ycZf(Te11c3?^8~aF; zNMC)gi?nQ#S$s{46yImv_7@4_qu|XXEza~);h&cr*~dO@#$LtKZa@@r$8PD^jz{D6 zk~5;IJBuQjsKk+8i0wzLJ2=toMw4@rw7(|6`7*e|V(5-#ZzRirtkXBO1oshQ&0>z&HAtSF8+871e|ni4gLs#`3v7gnG#^F zDv!w100_HwtU}B2T!+v_YDR@-9VmoGW+a76oo4yy)o`MY(a^GcIvXW+4)t{lK}I-& zl-C=(w_1Z}tsSFjFd z3iZjkO6xnjLV3!EE?ex9rb1Zxm)O-CnWPat4vw08!GtcQ3lHD+ySRB*3zQu-at$rj zzBn`S?5h=JlLXX8)~Jp%1~YS6>M8c-Mv~E%s7_RcvIYjc-ia`3r>dvjxZ6=?6=#OM zfsv}?hGnMMdi9C`J9+g)5`M9+S79ug=!xE_XcHdWnIRr&hq$!X7aX5kJV8Q(6Lq?|AE8N2H z37j{DPDY^Jw!J>~>Mwaja$g%q1sYfH4bUJFOR`x=pZQ@O(-4b#5=_Vm(0xe!LW>YF zO4w`2C|Cu%^C9q9B>NjFD{+qt)cY3~(09ma%mp3%cjFsj0_93oVHC3)AsbBPuQNBO z`+zffU~AgGrE0K{NVR}@oxB4&XWt&pJ-mq!JLhFWbnXf~H%uU?6N zWJ7oa@``Vi$pMWM#7N9=sX1%Y+1qTGnr_G&h3YfnkHPKG}p>i{fAG+(klE z(g~u_rJXF48l1D?;;>e}Ra{P$>{o`jR_!s{hV1Wk`vURz`W2c$-#r9GM7jgs2>um~ zouGlCm92rOiLITzf`jgl`v2qYw^!Lh0YwFHO1|3Krp8ztE}?#2+>c)yQlNw%5e6w5 zIm9BKZN5Q9b!tX`Zo$0RD~B)VscWp(FR|!a!{|Q$={;ZWl%10vBzfgWn}WBe!%cug z^G%;J-L4<6&aCKx@@(Grsf}dh8fuGT+TmhhA)_16uB!t{HIAK!B-7fJLe9fsF)4G- zf>(~ⅅ8zCNKueM5c!$)^mKpZNR!eIlFST57ePGQcqCqedAQ3UaUEzpjM--5V4YO zY22VxQm%$2NDnwfK+jkz=i2>NjAM6&P1DdcO<*Xs1-lzdXWn#LGSxwhPH7N%D8-zCgpFWt@`LgNYI+Fh^~nSiQmwH0^>E>*O$47MqfQza@Ce z1wBw;igLc#V2@y-*~Hp?jA1)+MYYyAt|DV_8RQCrRY@sAviO}wv;3gFdO>TE(=9o? z=S(r=0oT`w24=ihA=~iFV5z$ZG74?rmYn#eanx(!Hkxcr$*^KRFJKYYB&l6$WVsJ^ z-Iz#HYmE)Da@&seqG1fXsTER#adA&OrD2-T(z}Cwby|mQf{0v*v3hq~pzF`U`jenT z=XHXeB|fa?Ws$+9ADO0rco{#~+`VM?IXg7N>M0w1fyW1iiKTA@p$y zSiAJ%-Mg{m>&S4r#Tw@?@7ck}#oFo-iZJCWc`hw_J$=rw?omE{^tc59ftd`xq?jzf zo0bFUI=$>O!45{!c4?0KsJmZ#$vuYpZLo_O^oHTmmLMm0J_a{Nn`q5tG1m=0ecv$T z5H7r0DZGl6be@aJ+;26EGw9JENj0oJ5K0=^f-yBW2I0jqVIU};NBp*gF7_KlQnhB6 z##d$H({^HXj@il`*4^kC42&3)(A|tuhs;LygA-EWFSqpe+%#?6HG6}mE215Z4mjO2 zY2^?5$<8&k`O~#~sSc5Fy`5hg5#e{kG>SAbTxCh{y32fHkNryU_c0_6h&$zbWc63T z7|r?X7_H!9XK!HfZ+r?FvBQ$x{HTGS=1VN<>Ss-7M3z|vQG|N}Frv{h-q623@Jz*@ ziXlZIpAuY^RPlu&=nO)pFhML5=ut~&zWDSsn%>mv)!P1|^M!d5AwmSPIckoY|0u9I zTDAzG*U&5SPf+@c_tE_I!~Npfi$?gX(kn=zZd|tUZ_ez(xP+)xS!8=k(<{9@<+EUx zYQgZhjn(0qA#?~Q+EA9oh_Jx5PMfE3#KIh#*cFIFQGi)-40NHbJO&%ZvL|LAqU=Rw zf?Vr4qkUcKtLr^g-6*N-tfk+v8@#Lpl~SgKyH!+m9?T8B>WDWK22;!i5&_N=%f{__ z-LHb`v-LvKqTJZCx~z|Yg;U_f)VZu~q7trb%C6fOKs#eJosw&b$nmwGwP;Bz`=zK4 z>U3;}T_ptP)w=vJaL8EhW;J#SHA;fr13f=r#{o)`dRMOs-T;lp&Toi@u^oB_^pw=P zp#8Geo2?@!h2EYHY?L;ayT}-Df0?TeUCe8Cto{W0_a>!7Gxmi5G-nIIS;X{flm2De z{SjFG%knZoVa;mtHR_`*6)KEf=dvOT3OgT7C7&-4P#4X^B%VI&_57cBbli()(%zZC?Y0b;?5!f22UleQ=9h4_LkcA!Xsqx@q{ko&tvP_V@7epFs}AIpM{g??PA>U(sk$Gum>2Eu zD{Oy{$OF%~?B6>ixQeK9I}!$O0!T3#Ir8MW)j2V*qyJ z8Bg17L`rg^B_#rkny-=<3fr}Y42+x0@q6POk$H^*p3~Dc@5uYTQ$pfaRnIT}Wxb;- zl!@kkZkS=l)&=y|21veY8yz$t-&7ecA)TR|=51BKh(@n|d$EN>18)9kSQ|GqP?aeM ztXd9C&Md$PPF*FVs*GhoHM2L@D$(Qf%%x zwQBUt!jM~GgwluBcwkgwQ!249uPkNz3u@LSYZgmpHgX|P#8!iKk^vSKZ;?)KE$92d z2U>y}VWJ0&zjrIqddM3dz-nU%>bL&KU%SA|LiiUU7Ka|c=jF|vQ1V)Jz`JZe*j<5U6~RVuBEVJoY~ z&GE+F$f>4lN=X4-|9v*5O*Os>>r87u z!_1NSV?_X&HeFR1fOFb8_P)4lybJ6?1BWK`Tv2;4t|x1<#@17UO|hLGnrB%nu)fDk zfstJ4{X4^Y<8Lj<}g2^kksSefQTMuTo?tJLCh zC~>CR#a0hADw!_Vg*5fJwV{~S(j8)~sn>Oyt(ud2$1YfGck77}xN@3U_#T`q)f9!2 zf>Ia;Gwp2_C>WokU%(z2ec8z94pZyhaK+e>3a9sj^-&*V494;p9-xk+u1Jn#N_&xs z59OI2w=PuTErv|aNcK*>3l^W*p3}fjXJjJAXtBA#%B(-0--s;1U#f8gFYW!JL+iVG zV0SSx5w8eVgE?3Sg@eQv)=x<+-JgpVixZQNaZr}3b8sVyVs$@ndkF5FYKka@b+YAh z#nq_gzlIDKEs_i}H4f)(VQ!FSB}j>5znkVD&W0bOA{UZ7h!(FXrBbtdGA|PE1db>s z$!X)WY)u#7P8>^7Pjjj-kXNBuJX3(pJVetTZRNOnR5|RT5D>xmwxhAn)9KF3J05J; z-Mfb~dc?LUGqozC2p!1VjRqUwwDBnJhOua3vCCB-%ykW_ohSe?$R#dz%@Gym-8-RA zjMa_SJSzIl8{9dV+&63e9$4;{=1}w2=l+_j_Dtt@<(SYMbV-18&%F@Zl7F_5! z@xwJ0wiDdO%{}j9PW1(t+8P7Ud79yjY>x>aZYWJL_NI?bI6Y02`;@?qPz_PRqz(7v``20`- z033Dy|4;y6di|>cz|P-z|6c&3f&g^OAt8aN0Zd&0yZ>dq2aFCsE<~Ucf$v{sL=*++ zBxFSa2lfA+Y%U@B&3D=&CBO&u`#*nNc|PCY7XO<}MnG0VR764XrHtrb5zwC*2F!Lp zE<~Vj0;z!S-|3M4DFxuQ=`ShTf28<9p!81(0hFbGNqF%0gg*orez9!qt8e%o@Yfl@ zhvY}{@3&f??}7<`p>FyU;7?VkKbh8_=csozU=|fH&szgZ{=NDCylQ>EH^x5!K3~-V z)_2Y>0uJ`Z0Pb58y`RL+&n@m9tJ)O<%q#&u#DAIt+-rRt0eSe1MTtMl@W)H$b3D)@ z*A-1bUgZI)>HdcI4&W>P4W5{-j=s5p5`cbQ+{(g0+RDnz!TR^mxSLu_y#SDVKrj8i zA^hi6>jMGM;`$9Vfb-Yf!47b)Ow`2OKtNB=z|Kxa$5O}WPo;(Dc^`q(7X8kkeFyO8 z{XOq^07=u|7*P2`m;>PIFf=i80MKUxsN{d2cX0M+REsE*20+WQ79T9&cqT>=I_U% z{=8~^Isg(Nzo~`4iQfIb_#CVCD>#5h>=-Z#5dH}WxYzn%0)GAm6L2WdUdP=0_h>7f z(jh&7%1i(ZOn+}D8$iGK4Vs{pmHl_w4Qm-46H9>4^{3dz^DZDh+dw)6Xd@CpQNK$j z{CU;-cmpK=egplZ3y3%y=sEnCJ^eYVKXzV8H2_r*fJ*%*B;a1_lOpt6)IT1IAK2eB z{rie|uDJUrbgfUE>~C>@RO|m5ex55F{=~Bb4Cucp{ok7Yf9V}QuZ`#Gc|WaqsQlK- zKaV)iMRR__&Ak2Z=IM9R9g5$WM4u{a^C-7uX*!myEym z#_#p^T!P~#Dx$%^K>Y_nj_3J*E_LwJ60-5Xu=LkJAwcP@|0;a&+|+ZX`Jbj9P5;T% z|KOc}4*#4o{U?09`9Hz`Xo-I!P=9XfIrr*MQ}y=$!qgv?_J38^bNb4kM&_OVg^_=Eu-qG5U(fw0KMgH){C8pazq~51rN97hf#20-7=aK0)N|UM H-+%o-(+5aQ From a6fc20aa1aaa8da17c1857ae3a05d5cedcbcf5e2 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 14 Dec 2022 15:56:15 -0800 Subject: [PATCH 191/448] Always using `package:http` for APIs and image loading. (#839) * Always using `package:http` for APIs and image loading. * Fix changelog notes --- pkgs/cronet_http/CHANGELOG.md | 7 +++++++ pkgs/cronet_http/example/lib/main.dart | 7 +++++-- pkgs/cronet_http/example/pubspec.yaml | 1 + pkgs/cupertino_http/CHANGELOG.md | 5 +++++ pkgs/cupertino_http/example/lib/main.dart | 7 ++++++- pkgs/cupertino_http/example/pubspec.yaml | 1 + 6 files changed, 25 insertions(+), 3 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 2e4bfd09f3..dbe673133d 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,10 @@ +## 0.0.4 + +* Fix a bug where the example would not use the configured `package:http` + `Client` for Books API calls in some circumstances. +* Fix a bug where the images in the example would be loaded using `dart:io` + `HttpClient`. + ## 0.0.3 * Fix diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 3449030d62..2ab94cb0ec 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -5,6 +5,7 @@ import 'dart:convert'; import 'dart:io'; +import 'package:cached_network_image/cached_network_image.dart'; import 'package:cronet_http/cronet_client.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; @@ -14,7 +15,6 @@ import 'book.dart'; void main() { var clientFactory = Client.new; // Constructs the default client. if (Platform.isAndroid) { - WidgetsFlutterBinding.ensureInitialized(); clientFactory = CronetClient.new; } runWithClient(() => runApp(const BookSearchApp()), clientFactory); @@ -122,7 +122,10 @@ class _BookListState extends State { itemBuilder: (context, index) => Card( key: ValueKey(widget.books[index].title), child: ListTile( - leading: Image.network(widget.books[index].imageUrl), + leading: CachedNetworkImage( + placeholder: (context, url) => + const CircularProgressIndicator(), + imageUrl: widget.books[index].imageUrl), title: Text(widget.books[index].title), subtitle: Text(widget.books[index].description), ), diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index 25c135f35d..d1bf2b7719 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -7,6 +7,7 @@ environment: sdk: ">=2.17.5 <3.0.0" dependencies: + cached_network_image: ^3.2.3 cronet_http: path: ../ cupertino_icons: ^1.0.2 diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 01d8f2e824..166e085ddd 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.0.11 + +* Fix a bug where the images in the example would be loaded using `dart:io` + `HttpClient`. + ## 0.0.10 * Fix [Use of multiple CupertinoClients can result in cancelled requests](https://github.com/dart-lang/http/issues/826) diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index ee873c6fc6..dd1e0fb799 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -5,6 +5,7 @@ import 'dart:convert'; import 'dart:io'; +import 'package:cached_network_image/cached_network_image.dart'; import 'package:cupertino_http/cupertino_client.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; @@ -121,7 +122,11 @@ class _BookListState extends State { itemBuilder: (context, index) => Card( key: ValueKey(widget.books[index].title), child: ListTile( - leading: Image.network(widget.books[index].imageUrl), + leading: CachedNetworkImage( + placeholder: (context, url) => + const CircularProgressIndicator(), + imageUrl: + widget.books[index].imageUrl.replaceFirst('http', 'https')), title: Text(widget.books[index].title), subtitle: Text(widget.books[index].description), ), diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index 10f20102ff..954a9c7022 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -9,6 +9,7 @@ environment: sdk: ">=2.17.3 <3.0.0" dependencies: + cached_network_image: ^3.2.3 cupertino_http: path: ../ cupertino_icons: ^1.0.2 From 2dd375ebd2d317a854d27debc2ade60a63061f14 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 29 Dec 2022 16:18:23 -0800 Subject: [PATCH 192/448] Drop avoid_redundant_argument_values (#845) This lint is firing for `Uri.http` constructor calls where the `path` argument is now optional. The argument values need to be retained until the min SDK is updated. Drop the lint for now. --- analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index 7a2d382d28..fac854658e 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -13,7 +13,6 @@ linter: - avoid_classes_with_only_static_members - avoid_dynamic_calls - avoid_private_typedef_functions - - avoid_redundant_argument_values - avoid_returning_this - avoid_unused_constructor_parameters - cascade_invocations From 2278974ed99eb6ffa4e786106b1199bfda1df979 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 29 Dec 2022 17:15:10 -0800 Subject: [PATCH 193/448] Add usage instructions for runWithClient and Flutter (#846) --- pkgs/http/lib/src/client.dart | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index d7ff8a6767..c5de65cc00 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -188,6 +188,24 @@ Client? get zoneClient { /// The [Client] returned by [clientFactory] is used by the [Client.new] factory /// and the convenience HTTP functions (e.g. [http.get]). If [clientFactory] /// returns `Client()` then the default [Client] is used. +/// +/// When used in the context of Flutter, [runWithClient] should be called before +/// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html) +/// because Flutter runs in whatever [Zone] was current at the time that the +/// bindings were initialized. +/// +/// [`runApp`](https://api.flutter.dev/flutter/widgets/runApp.html) calls +/// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html) +/// so the easiest approach is to call that in [body]: +/// ``` +/// void main() { +/// var clientFactory = Client.new; // Constructs the default client. +/// if (Platform.isAndroid) { +/// clientFactory = MyAndroidHttpClient.new; +/// } +/// runWithClient(() => runApp(const MyApp()), clientFactory); +/// } +/// ``` R runWithClient(R Function() body, Client Function() clientFactory, {ZoneSpecification? zoneSpecification}) => runZoned(body, From 74a02432c9091d8c85d6787ae32af227a14bf7b3 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 3 Jan 2023 13:19:34 -0800 Subject: [PATCH 194/448] Make it possible to use a custom CronetEngine with runWithClient (#843) --- pkgs/cronet_http/CHANGELOG.md | 6 ++ .../client_conformance_test.dart | 25 ------- .../example/integration_test/client_test.dart | 68 +++++++++++++++++++ .../cronet_configuration_test.dart | 10 +-- pkgs/cronet_http/example/lib/main.dart | 7 +- pkgs/cronet_http/lib/cronet_client.dart | 68 ++++++++++++++++--- pkgs/cronet_http/pubspec.yaml | 2 +- 7 files changed, 146 insertions(+), 40 deletions(-) delete mode 100644 pkgs/cronet_http/example/integration_test/client_conformance_test.dart create mode 100644 pkgs/cronet_http/example/integration_test/client_test.dart diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index dbe673133d..2e3f0e638d 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.1.0 + +* Add a CronetClient that accepts a `Future`. +* Modify the example application to create a `CronetClient` using a + `Future`. + ## 0.0.4 * Fix a bug where the example would not use the configured `package:http` diff --git a/pkgs/cronet_http/example/integration_test/client_conformance_test.dart b/pkgs/cronet_http/example/integration_test/client_conformance_test.dart deleted file mode 100644 index 63bf0b0dac..0000000000 --- a/pkgs/cronet_http/example/integration_test/client_conformance_test.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. 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:cronet_http/cronet_client.dart'; -import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; -import 'package:integration_test/integration_test.dart'; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - final client = CronetClient(); - testRequestBody(client); - testRequestBodyStreamed(client, canStreamRequestBody: false); - testResponseBody(client); - testResponseBodyStreamed(client); - testRequestHeaders(client); - testResponseHeaders(client); - testRedirect(client); - testCompressedResponseBody(client); - testMultipleClients(CronetClient.new); - - // TODO: Use `testAll` when `testServerErrors` passes i.e. - // testAll(CronetClient(), canStreamRequestBody: false); -} diff --git a/pkgs/cronet_http/example/integration_test/client_test.dart b/pkgs/cronet_http/example/integration_test/client_test.dart new file mode 100644 index 0000000000..c3331d7e2e --- /dev/null +++ b/pkgs/cronet_http/example/integration_test/client_test.dart @@ -0,0 +1,68 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. 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:cronet_http/cronet_client.dart'; +import 'package:http/http.dart'; +import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void testClientConformance(CronetClient Function() clientFactory) { + // TODO: Use `testAll` when `testServerErrors` passes i.e. + // testAll(CronetClient(), canStreamRequestBody: false); + + final client = clientFactory(); + testRequestBody(client); + testRequestBodyStreamed(client, canStreamRequestBody: false); + testResponseBody(client); + testResponseBodyStreamed(client); + testRequestHeaders(client); + testResponseHeaders(client); + testRedirect(client); + testCompressedResponseBody(client); + testMultipleClients(clientFactory); +} + +Future testConformance() async { + group('default cronet engine', + () => testClientConformance(CronetClient.defaultCronetEngine)); + + final engine = await CronetEngine.build( + cacheMode: CacheMode.disabled, userAgent: 'Test Agent (Engine)'); + + group('from cronet engine', () { + testClientConformance(() => CronetClient.fromCronetEngine(engine)); + }); + + group('from cronet engine future', () { + final engineFuture = CronetEngine.build( + cacheMode: CacheMode.disabled, userAgent: 'Test Agent (Future)'); + testClientConformance( + () => CronetClient.fromCronetEngineFuture(engineFuture)); + }); +} + +Future testClientFromFutureFails() async { + test('cronet engine future fails', () async { + final engineFuture = CronetEngine.build( + cacheMode: CacheMode.disk, + storagePath: '/non-existant-path/', // Will cause `build` to throw. + userAgent: 'Test Agent (Future)'); + + final client = CronetClient.fromCronetEngineFuture(engineFuture); + await expectLater( + client.get(Uri.http('example.com', '/')), + throwsA((Exception e) => + e is ClientException && + e.message.contains('Exception building CronetEngine: ' + 'Invalid argument(s): Storage path must'))); + }); +} + +void main() async { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + await testConformance(); + await testClientFromFutureFails(); +} diff --git a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart index fc4e695c3c..272861153b 100644 --- a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart +++ b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart @@ -34,7 +34,7 @@ void testCache() { test('disabled', () async { final engine = await CronetEngine.build(cacheMode: CacheMode.disabled); - final client = CronetClient(engine); + final client = CronetClient.fromCronetEngine(engine); await client.get(Uri.parse('http://localhost:${server.port}')); await client.get(Uri.parse('http://localhost:${server.port}')); expect(numRequests, 2); @@ -43,7 +43,7 @@ void testCache() { test('memory', () async { final engine = await CronetEngine.build( cacheMode: CacheMode.memory, cacheMaxSize: 1024 * 1024); - final client = CronetClient(engine); + final client = CronetClient.fromCronetEngine(engine); await client.get(Uri.parse('http://localhost:${server.port}')); await client.get(Uri.parse('http://localhost:${server.port}')); expect(numRequests, 1); @@ -54,7 +54,7 @@ void testCache() { cacheMode: CacheMode.disk, cacheMaxSize: 1024 * 1024, storagePath: (await Directory.systemTemp.createTemp()).absolute.path); - final client = CronetClient(engine); + final client = CronetClient.fromCronetEngine(engine); await client.get(Uri.parse('http://localhost:${server.port}')); await client.get(Uri.parse('http://localhost:${server.port}')); expect(numRequests, 1); @@ -66,7 +66,7 @@ void testCache() { cacheMaxSize: 1024 * 1024, storagePath: (await Directory.systemTemp.createTemp()).absolute.path); - final client = CronetClient(engine); + final client = CronetClient.fromCronetEngine(engine); await client.get(Uri.parse('http://localhost:${server.port}')); await client.get(Uri.parse('http://localhost:${server.port}')); expect(numRequests, 2); @@ -115,7 +115,7 @@ void testUserAgent() { test('userAgent', () async { final engine = await CronetEngine.build(userAgent: 'fake-agent'); - await CronetClient(engine) + await CronetClient.fromCronetEngine(engine) .get(Uri.parse('http://localhost:${server.port}')); expect(requestHeaders['user-agent'], ['fake-agent']); }); diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 2ab94cb0ec..ac0b576f73 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -15,7 +15,12 @@ import 'book.dart'; void main() { var clientFactory = Client.new; // Constructs the default client. if (Platform.isAndroid) { - clientFactory = CronetClient.new; + Future? engine; + clientFactory = () { + engine ??= CronetEngine.build( + cacheMode: CacheMode.memory, userAgent: 'Book Agent'); + return CronetClient.fromCronetEngineFuture(engine!); + }; } runWithClient(() => runApp(const BookSearchApp()), clientFactory); } diff --git a/pkgs/cronet_http/lib/cronet_client.dart b/pkgs/cronet_http/lib/cronet_client.dart index 3a57b5e2fa..20d1a1f82e 100644 --- a/pkgs/cronet_http/lib/cronet_client.dart +++ b/pkgs/cronet_http/lib/cronet_client.dart @@ -2,6 +2,16 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +/// An Android Flutter plugin that provides access to the +/// [Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) +/// HTTP client. +/// +/// The platform interface must be initialized before using this plugin e.g. by +/// calling +/// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html) +/// or +/// [`runApp`](https://api.flutter.dev/flutter/widgets/runApp.html). + import 'dart:async'; import 'package:flutter/services.dart'; @@ -123,11 +133,40 @@ class CronetEngine { /// ``` class CronetClient extends BaseClient { CronetEngine? _engine; + Future? _engineFuture; + + /// Indicates that [_engine] was constructed as an implementation detail for + /// this [CronetClient] (i.e. was not provided as a constructor argument) and + /// should be closed when this [CronetClient] is closed. final bool _ownedEngine; - CronetClient([CronetEngine? engine]) - : _engine = engine, - _ownedEngine = engine == null; + CronetClient._(this._engineFuture, this._ownedEngine); + + /// A [CronetClient] that will be initialized with a new [CronetEngine]. + factory CronetClient.defaultCronetEngine() => CronetClient._(null, true); + + /// A [CronetClient] configured with a [CronetEngine]. + factory CronetClient.fromCronetEngine(CronetEngine engine) => + CronetClient._(Future.value(engine), false); + + /// A [CronetClient] configured with a [Future] containing a [CronetEngine]. + /// + /// This can be useful in circumstances where a non-Future [CronetClient] is + /// required but you want to configure the [CronetClient] with a custom + /// [CronetEngine]. For example: + /// ``` + /// void main() { + /// Client clientFactory() { + /// final engine = CronetEngine.build( + /// cacheMode: CacheMode.memory, userAgent: 'Book Agent'); + /// return CronetClient.fromCronetEngineFuture(engine); + /// } + /// + /// runWithClient(() => runApp(const BookSearchApp()), clientFactory); + /// } + /// ``` + factory CronetClient.fromCronetEngineFuture(Future engine) => + CronetClient._(engine, false); @override void close() { @@ -138,11 +177,23 @@ class CronetClient extends BaseClient { @override Future send(BaseRequest request) async { - try { - _engine ??= await CronetEngine.build(); - } catch (e) { - throw ClientException(e.toString(), request.url); + if (_engine == null) { + // Create the future here rather than in the [fromCronetEngineFuture] + // factory so that [close] does not have to await the future just to + // close it in the case where [send] is never called. + // + // Assign to _engineFuture instead of just `await`ing the result of + // `CronetEngine.build()` to prevent concurrent executions of `send` + // from creating multiple [CronetEngine]s. + _engineFuture ??= CronetEngine.build(); + try { + _engine = await _engineFuture; + } catch (e) { + throw ClientException( + 'Exception building CronetEngine: ${e.toString()}', request.url); + } } + final stream = request.finalize(); final body = await stream.toBytes(); @@ -203,7 +254,8 @@ class CronetClient extends BaseClient { }); final result = await responseCompleter.future; - final responseHeaders = (result.headers.cast>()) + final responseHeaders = result.headers + .cast>() .map((key, value) => MapEntry(key.toLowerCase(), value.join(','))); final contentLengthHeader = responseHeaders['content-length']; diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index eb13d45df2..49d52a790c 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.0.3 +version: 0.1.0 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: From 4a498baecb7935c647eb7a4ad7b7e55bf6a9d0db Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 13 Jan 2023 18:07:23 -0800 Subject: [PATCH 195/448] Add consistent implementations for `close`. (#851) --- pkgs/cronet_http/CHANGELOG.md | 4 ++ .../example/integration_test/client_test.dart | 1 + pkgs/cronet_http/lib/cronet_client.dart | 9 +++- pkgs/cronet_http/pubspec.yaml | 2 +- pkgs/cupertino_http/CHANGELOG.md | 1 + pkgs/cupertino_http/lib/cupertino_client.dart | 17 ++++-- pkgs/cupertino_http/pubspec.yaml | 2 +- pkgs/http/CHANGELOG.md | 2 + pkgs/http/lib/src/browser_client.dart | 8 +++ pkgs/http/lib/src/client.dart | 4 ++ .../lib/http_client_conformance_tests.dart | 3 ++ .../lib/src/close_tests.dart | 53 +++++++++++++++++++ 12 files changed, 100 insertions(+), 6 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/close_tests.dart diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 2e3f0e638d..9bbc29b9dc 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.1 + +* `CronetClient` throws an exception if `send` is called after `close`. + ## 0.1.0 * Add a CronetClient that accepts a `Future`. diff --git a/pkgs/cronet_http/example/integration_test/client_test.dart b/pkgs/cronet_http/example/integration_test/client_test.dart index c3331d7e2e..ecf4f8bcfb 100644 --- a/pkgs/cronet_http/example/integration_test/client_test.dart +++ b/pkgs/cronet_http/example/integration_test/client_test.dart @@ -22,6 +22,7 @@ void testClientConformance(CronetClient Function() clientFactory) { testRedirect(client); testCompressedResponseBody(client); testMultipleClients(clientFactory); + testClose(clientFactory); } Future testConformance() async { diff --git a/pkgs/cronet_http/lib/cronet_client.dart b/pkgs/cronet_http/lib/cronet_client.dart index 20d1a1f82e..2174dbc295 100644 --- a/pkgs/cronet_http/lib/cronet_client.dart +++ b/pkgs/cronet_http/lib/cronet_client.dart @@ -134,6 +134,7 @@ class CronetEngine { class CronetClient extends BaseClient { CronetEngine? _engine; Future? _engineFuture; + bool _isClosed = false; /// Indicates that [_engine] was constructed as an implementation detail for /// this [CronetClient] (i.e. was not provided as a constructor argument) and @@ -170,13 +171,19 @@ class CronetClient extends BaseClient { @override void close() { - if (_ownedEngine) { + if (!_isClosed && _ownedEngine) { _engine?.close(); } + _isClosed = true; } @override Future send(BaseRequest request) async { + if (_isClosed) { + throw ClientException( + 'HTTP request failed. Client is already closed.', request.url); + } + if (_engine == null) { // Create the future here rather than in the [fromCronetEngineFuture] // factory so that [close] does not have to await the future just to diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 49d52a790c..b9b456f045 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.1.0 +version: 0.1.1 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 166e085ddd..dc9def832d 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -2,6 +2,7 @@ * Fix a bug where the images in the example would be loaded using `dart:io` `HttpClient`. +* `CupertinoClient` throws an exception if `send` is called after `close`. ## 0.0.10 diff --git a/pkgs/cupertino_http/lib/cupertino_client.dart b/pkgs/cupertino_http/lib/cupertino_client.dart index aa1afef2f5..7d1c12bac9 100644 --- a/pkgs/cupertino_http/lib/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/cupertino_client.dart @@ -52,9 +52,9 @@ class _TaskTracker { class CupertinoClient extends BaseClient { static final Map _tasks = {}; - URLSession _urlSession; + URLSession? _urlSession; - CupertinoClient._(this._urlSession); + CupertinoClient._(URLSession urlSession) : _urlSession = urlSession; String? _findReasonPhrase(int statusCode) { switch (statusCode) { @@ -205,6 +205,11 @@ class CupertinoClient extends BaseClient { return CupertinoClient._(session); } + @override + void close() { + _urlSession = null; + } + @override Future send(BaseRequest request) async { // The expected sucess case flow (without redirects) is: @@ -219,6 +224,12 @@ class CupertinoClient extends BaseClient { // StreamController that controls the Stream // 7. _onComplete is called after all the data is read and closes the // StreamController + if (_urlSession == null) { + throw ClientException( + 'HTTP request failed. Client is already closed.', request.url); + } + final urlSession = _urlSession!; + final stream = request.finalize(); final bytes = await stream.toBytes(); @@ -231,7 +242,7 @@ class CupertinoClient extends BaseClient { // This will preserve Apple default headers - is that what we want? request.headers.forEach(urlRequest.setValueForHttpHeaderField); - final task = _urlSession.dataTaskWithRequest(urlRequest); + final task = urlSession.dataTaskWithRequest(urlRequest); final taskTracker = _TaskTracker(request); _tasks[task] = taskTracker; task.resume(); diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 75219ba39e..18e6acac51 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.0.10 +version: 0.0.11 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index b4f2a63d74..efa70a7b46 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,5 +1,7 @@ ## 0.13.6-dev +* `BrowserClient` throws an exception if `send` is called after `close`. + ## 0.13.5 * Allow async callbacks in RetryClient. diff --git a/pkgs/http/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart index b046b01993..dff2da6bb0 100644 --- a/pkgs/http/lib/src/browser_client.dart +++ b/pkgs/http/lib/src/browser_client.dart @@ -37,9 +37,15 @@ class BrowserClient extends BaseClient { /// Defaults to `false`. bool withCredentials = false; + bool _isClosed = false; + /// Sends an HTTP request and asynchronously returns the response. @override Future send(BaseRequest request) async { + if (_isClosed) { + throw ClientException( + 'HTTP request failed. Client is already closed.', request.url); + } var bytes = await request.finalize().toBytes(); var xhr = HttpRequest(); _xhrs.add(xhr); @@ -83,8 +89,10 @@ class BrowserClient extends BaseClient { /// This terminates all active requests. @override void close() { + _isClosed = true; for (var xhr in _xhrs) { xhr.abort(); } + _xhrs.clear(); } } diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index c5de65cc00..2cc5f21505 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -145,6 +145,10 @@ abstract class Client { /// /// It's important to close each client when it's done being used; failing to /// do so can cause the Dart process to hang. + /// + /// Once [close] is called, no other methods should be called. If [close] is + /// called while other asynchronous methods are running, the behavior is + /// undefined. void close(); } diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index 731d2e356d..4f492fdbde 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -4,6 +4,7 @@ import 'package:http/http.dart'; +import 'src/close_tests.dart'; import 'src/compressed_response_body_tests.dart'; import 'src/multiple_clients_tests.dart'; import 'src/redirect_tests.dart'; @@ -15,6 +16,7 @@ import 'src/response_body_tests.dart'; import 'src/response_headers_tests.dart'; import 'src/server_errors_test.dart'; +export 'src/close_tests.dart' show testClose; export 'src/compressed_response_body_tests.dart' show testCompressedResponseBody; export 'src/multiple_clients_tests.dart' show testMultipleClients; @@ -60,4 +62,5 @@ void testAll(Client Function() clientFactory, testServerErrors(clientFactory()); testCompressedResponseBody(clientFactory()); testMultipleClients(clientFactory); + testClose(clientFactory); } diff --git a/pkgs/http_client_conformance_tests/lib/src/close_tests.dart b/pkgs/http_client_conformance_tests/lib/src/close_tests.dart new file mode 100644 index 0000000000..040b338bf6 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/close_tests.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +import 'request_body_server_vm.dart' + if (dart.library.html) 'request_body_server_web.dart'; + +/// Tests that the [Client] correctly implements [Client.close]. +void testClose(Client Function() clientFactory) { + group('close', () { + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + + test('close no request', () async { + clientFactory().close(); + }); + + test('close after request', () async { + final client = clientFactory(); + await client.post(Uri.http(host, ''), body: 'Hello'); + client.close(); + }); + + test('multiple close after request', () async { + final client = clientFactory(); + await client.post(Uri.http(host, ''), body: 'Hello'); + client + ..close() + ..close(); + }); + + test('request after close', () async { + final client = clientFactory(); + await client.post(Uri.http(host, ''), body: 'Hello'); + client.close(); + expect(() async => await client.post(Uri.http(host, ''), body: 'Hello'), + throwsA(isA())); + }); + }); +} From 23ba944e4bf744988d0ab9dd42e1e4e6e2fa9733 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 17 Jan 2023 12:29:08 -0800 Subject: [PATCH 196/448] Fix a NPE that occurs when an error occurs before a response is received. (#852) --- pkgs/cronet_http/CHANGELOG.md | 4 ++++ .../plugins/cronet_http/CronetHttpPlugin.kt | 2 +- .../example/integration_test/client_test.dart | 15 +-------------- pkgs/cronet_http/pubspec.yaml | 2 +- .../lib/src/server_errors_test.dart | 3 +-- 5 files changed, 8 insertions(+), 18 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 9bbc29b9dc..9bdf83667b 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.2 + +* Fix a NPE that occurs when an error occurs before a response is received. + ## 0.1.1 * `CronetClient` throws an exception if `send` is called after `close`. diff --git a/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt b/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt index 5377c7c2c7..09d0ff1e84 100644 --- a/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt +++ b/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt @@ -188,7 +188,7 @@ class CronetHttpPlugin : FlutterPlugin, Messages.HttpApi { override fun onFailed( request: UrlRequest, - info: UrlResponseInfo, + info: UrlResponseInfo?, error: CronetException ) { mainThreadHandler.post({ eventSink.error("CronetException", error.toString(), null) }) diff --git a/pkgs/cronet_http/example/integration_test/client_test.dart b/pkgs/cronet_http/example/integration_test/client_test.dart index ecf4f8bcfb..ad752bf249 100644 --- a/pkgs/cronet_http/example/integration_test/client_test.dart +++ b/pkgs/cronet_http/example/integration_test/client_test.dart @@ -9,20 +9,7 @@ import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; void testClientConformance(CronetClient Function() clientFactory) { - // TODO: Use `testAll` when `testServerErrors` passes i.e. - // testAll(CronetClient(), canStreamRequestBody: false); - - final client = clientFactory(); - testRequestBody(client); - testRequestBodyStreamed(client, canStreamRequestBody: false); - testResponseBody(client); - testResponseBodyStreamed(client); - testRequestHeaders(client); - testResponseHeaders(client); - testRedirect(client); - testCompressedResponseBody(client); - testMultipleClients(clientFactory); - testClose(clientFactory); + testAll(clientFactory, canStreamRequestBody: false); } Future testConformance() async { diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index b9b456f045..a0702eef78 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.1.1 +version: 0.1.2 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: diff --git a/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart b/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart index 77406d26cc..65de499e56 100644 --- a/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart @@ -11,8 +11,7 @@ import 'server_errors_server_vm.dart' if (dart.library.html) 'server_errors_server_web.dart'; /// Tests that the [Client] correctly handles server errors. -void testServerErrors(Client client, - {bool redirectAlwaysAllowed = false}) async { +void testServerErrors(Client client, {bool redirectAlwaysAllowed = false}) { group('server errors', () { late final String host; late final StreamChannel httpServerChannel; From 3f0bd605b7a6511f347b4eea5b46417db0ef7e51 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 24 Jan 2023 17:07:33 -0800 Subject: [PATCH 197/448] Create a single top-level lib file. (#858) --- pkgs/cupertino_http/CHANGELOG.md | 4 + .../client_conformance_test.dart | 1 - pkgs/cupertino_http/example/lib/main.dart | 2 +- pkgs/cupertino_http/lib/cupertino_http.dart | 1180 +---------------- .../cupertino_http/lib/src/cupertino_api.dart | 1150 ++++++++++++++++ .../lib/{ => src}/cupertino_client.dart | 2 +- pkgs/cupertino_http/pubspec.yaml | 2 +- 7 files changed, 1213 insertions(+), 1128 deletions(-) create mode 100644 pkgs/cupertino_http/lib/src/cupertino_api.dart rename pkgs/cupertino_http/lib/{ => src}/cupertino_client.dart (99%) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index dc9def832d..03f1f46cf4 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.0 + +* Restructure `package:cupertino_http` to offer a single `import`. + ## 0.0.11 * Fix a bug where the images in the example would be loaded using `dart:io` diff --git a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart index 0a73140f23..a86243c9dc 100644 --- a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart +++ b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart @@ -2,7 +2,6 @@ // for details. 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:cupertino_http/cupertino_client.dart'; import 'package:cupertino_http/cupertino_http.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index dd1e0fb799..87c3940c98 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -6,7 +6,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:cached_network_image/cached_network_image.dart'; -import 'package:cupertino_http/cupertino_client.dart'; +import 'package:cupertino_http/cupertino_http.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index e9d38db7ff..4fd041ce25 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -1,11 +1,61 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. /// Provides access to the /// [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). /// -/// For example: +/// # CupertinoClient +/// +/// The most convenient way to `package:cupertino_http` it is through +/// [CupertinoClient]. +/// +/// ``` +/// import 'package:cupertino_http/cupertino_http.dart'; +/// +/// void main() async { +/// var client = CupertinoClient.defaultSessionConfiguration(); +/// final response = await client.get( +/// Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'})); +/// if (response.statusCode != 200) { +/// throw HttpException('bad response: ${response.statusCode}'); +/// } +/// +/// final decodedResponse = +/// jsonDecode(utf8.decode(response.bodyBytes)) as Map; +/// +/// final itemCount = decodedResponse['totalItems']; +/// print('Number of books about http: $itemCount.'); +/// for (var i = 0; i < min(itemCount, 10); ++i) { +/// print(decodedResponse['items'][i]['volumeInfo']['title']); +/// } +/// } +/// ``` +/// +/// [CupertinoClient] is an implementation of the `package:http` [Client], +/// which means that it can easily used conditionally based on the current +/// platform. +/// +/// ``` +/// void main() { +/// var clientFactory = Client.new; // The default Client. +/// if (Platform.isIOS || Platform.isMacOS) { +/// clientFactory = CupertinoClient.defaultSessionConfiguration.call; +/// } +/// runWithClient(() => runApp(const MyFlutterApp()), clientFactory); +/// } +/// ``` +/// +/// After the above setup, calling [Client] methods or any of the +/// `package:http` convenient functions (e.g. [get]) will result in +/// [CupertinoClient] being used on macOS and iOS. +/// +/// # NSURLSession API +/// +/// `package:cupertino_http` also allows direct access to the +/// [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system) +/// APIs. +/// /// ``` /// void main() { /// final url = Uri.https('www.example.com', '/'); @@ -24,1127 +74,9 @@ /// task.resume(); /// } /// ``` +import 'package:http/http.dart'; -import 'dart:ffi'; -import 'dart:isolate'; -import 'dart:math'; -import 'dart:typed_data'; - -import 'package:ffi/ffi.dart'; - -import 'src/native_cupertino_bindings.dart' as ncb; -import 'src/utils.dart'; - -abstract class _ObjectHolder { - final T _nsObject; - - _ObjectHolder(this._nsObject); - - @override - bool operator ==(Object other) { - if (other is _ObjectHolder) { - return _nsObject == other._nsObject; - } - return false; - } - - @override - int get hashCode => _nsObject.hashCode; -} - -/// Settings for controlling whether cookies will be accepted. -/// -/// See [HTTPCookieAcceptPolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408933-httpcookieacceptpolicy). -enum HTTPCookieAcceptPolicy { - httpCookieAcceptPolicyAlways, - httpCookieAcceptPolicyNever, - httpCookieAcceptPolicyOnlyFromMainDocumentDomain, -} - -/// Controls how response data is cached. -/// -/// See [URLRequestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequestcachepolicy). -enum URLRequestCachePolicy { - useProtocolCachePolicy, - reloadIgnoringLocalCacheData, - returnCacheDataElseLoad, - returnCacheDataDontLoad, - reloadIgnoringLocalAndRemoteCacheData, - reloadRevalidatingCacheData, -} - -// Controls how multipath TCP should be used. -// -// See [NSURLSessionMultipathServiceType](https://developer.apple.com/documentation/foundation/nsurlsessionmultipathservicetype). -enum URLSessionMultipathServiceType { - multipathServiceTypeNone, - multipathServiceTypeHandover, - multipathServiceTypeInteractive, - multipathServiceTypeAggregate, -} - -/// Controls how [URLSessionTask] execute will proceed after the response is -/// received. -/// -/// See [NSURLSessionResponseDisposition](https://developer.apple.com/documentation/foundation/nsurlsessionresponsedisposition). -enum URLSessionResponseDisposition { - urlSessionResponseCancel, - urlSessionResponseAllow, - urlSessionResponseBecomeDownload, - urlSessionResponseBecomeStream -} - -/// Provides in indication to the operating system on what type of requests -/// are being sent. -/// -/// See [NSURLRequestNetworkServiceType](https://developer.apple.com/documentation/foundation/nsurlrequestnetworkservicetype). -enum URLRequestNetworkService { - networkServiceTypeDefault, - networkServiceTypeVoIP, - networkServiceTypeVideo, - networkServiceTypeBackground, - networkServiceTypeVoice, - networkServiceTypeResponsiveData, - networkServiceTypeAVStreaming, - networkServiceTypeResponsiveAV, - networkServiceTypeCallSignaling -} - -/// Information about a failure. -/// -/// See [NSError](https://developer.apple.com/documentation/foundation/nserror) -class Error extends _ObjectHolder { - Error._(ncb.NSError c) : super(c); - - /// The numeric code for the error e.g. -1003 (kCFURLErrorCannotFindHost). - /// - /// The interpretation of this code will depend on the domain of the error - /// which, for URL loading, will usually be - /// [`kCFErrorDomainCFNetwork`](https://developer.apple.com/documentation/cfnetwork/kcferrordomaincfnetwork). - /// - /// See [NSError.code](https://developer.apple.com/documentation/foundation/nserror/1409165-code) - int get code => _nsObject.code; - - // TODO(https://github.com/dart-lang/ffigen/issues/386): expose - // `NSError.domain` when correct type aliases are available. - - /// A description of the error in the current locale e.g. - /// 'A server with the specified hostname could not be found.' - /// - /// See [NSError.locaizedDescription](https://developer.apple.com/documentation/foundation/nserror/1414418-localizeddescription) - String? get localizedDescription => - toStringOrNull(_nsObject.localizedDescription); - - /// An explanation of the reason for the error in the current locale. - /// - /// See [NSError.localizedFailureReason](https://developer.apple.com/documentation/foundation/nserror/1412752-localizedfailurereason) - String? get localizedFailureReason => - toStringOrNull(_nsObject.localizedFailureReason); - - /// An explanation of how to fix the error in the current locale. - /// - /// See [NSError.localizedRecoverySuggestion](https://developer.apple.com/documentation/foundation/nserror/1407500-localizedrecoverysuggestion) - String? get localizedRecoverySuggestion => - toStringOrNull(_nsObject.localizedRecoverySuggestion); - - @override - String toString() => '[Error ' - 'code=$code ' - 'localizedDescription=$localizedDescription ' - 'localizedFailureReason=$localizedFailureReason ' - 'localizedRecoverySuggestion=$localizedRecoverySuggestion ' - ']'; -} - -/// Controls the behavior of a URLSession. -/// -/// See [NSURLSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration) -class URLSessionConfiguration - extends _ObjectHolder { - URLSessionConfiguration._(ncb.NSURLSessionConfiguration c) : super(c); - - /// A configuration suitable for performing HTTP uploads and downloads in - /// the background. - /// - /// See [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1407496-backgroundsessionconfigurationwi) - factory URLSessionConfiguration.backgroundSession(String identifier) => - URLSessionConfiguration._(ncb.NSURLSessionConfiguration - .backgroundSessionConfigurationWithIdentifier_( - linkedLibs, identifier.toNSString(linkedLibs))); - - /// A configuration that uses caching and saves cookies and credentials. - /// - /// See [NSURLSessionConfiguration defaultSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411560-defaultsessionconfiguration) - factory URLSessionConfiguration.defaultSessionConfiguration() => - URLSessionConfiguration._(ncb.NSURLSessionConfiguration.castFrom( - ncb.NSURLSessionConfiguration.getDefaultSessionConfiguration( - linkedLibs)!)); - - /// A configuration that uses caching and saves cookies and credentials. - /// - /// See [NSURLSessionConfiguration ephemeralSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1410529-ephemeralsessionconfiguration) - factory URLSessionConfiguration.ephemeralSessionConfiguration() => - URLSessionConfiguration._(ncb.NSURLSessionConfiguration.castFrom( - ncb.NSURLSessionConfiguration.getEphemeralSessionConfiguration( - linkedLibs)!)); - - /// Whether connections over a cellular network are allowed. - /// - /// See [NSURLSessionConfiguration.allowsCellularAccess](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1409406-allowscellularaccess) - bool get allowsCellularAccess => _nsObject.allowsCellularAccess; - set allowsCellularAccess(bool value) => - _nsObject.allowsCellularAccess = value; - - /// Whether connections are allowed when the user has selected Low Data Mode. - /// - /// See [NSURLSessionConfiguration.allowsConstrainedNetworkAccess](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/3235751-allowsconstrainednetworkaccess) - bool get allowsConstrainedNetworkAccess => - _nsObject.allowsConstrainedNetworkAccess; - set allowsConstrainedNetworkAccess(bool value) => - _nsObject.allowsConstrainedNetworkAccess = value; - - /// Whether connections are allowed over expensive networks. - /// - /// See [NSURLSessionConfiguration.allowsExpensiveNetworkAccess](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/3235752-allowsexpensivenetworkaccess) - bool get allowsExpensiveNetworkAccess => - _nsObject.allowsExpensiveNetworkAccess; - set allowsExpensiveNetworkAccess(bool value) => - _nsObject.allowsExpensiveNetworkAccess = value; - - /// Whether background tasks can be delayed by the system. - /// - /// See [NSURLSessionConfiguration.discretionary](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411552-discretionary) - bool get discretionary => _nsObject.discretionary; - set discretionary(bool value) => _nsObject.discretionary = value; - - /// What policy to use when deciding whether to accept cookies. - /// - /// See [NSURLSessionConfiguration.HTTPCookieAcceptPolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408933-httpcookieacceptpolicy). - HTTPCookieAcceptPolicy get httpCookieAcceptPolicy => - HTTPCookieAcceptPolicy.values[_nsObject.HTTPCookieAcceptPolicy]; - set httpCookieAcceptPolicy(HTTPCookieAcceptPolicy value) => - _nsObject.HTTPCookieAcceptPolicy = value.index; - - // The maximun number of connections that a URLSession can have open to the - // same host. - // - // See [NSURLSessionConfiguration.HTTPMaximumConnectionsPerHost](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1407597-httpmaximumconnectionsperhost). - int get httpMaximumConnectionsPerHost => - _nsObject.HTTPMaximumConnectionsPerHost; - set httpMaximumConnectionsPerHost(int value) => - _nsObject.HTTPMaximumConnectionsPerHost = value; - - /// Whether requests should include cookies from the cookie store. - /// - /// See [NSURLSessionConfiguration.HTTPShouldSetCookies](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411589-httpshouldsetcookies) - bool get httpShouldSetCookies => _nsObject.HTTPShouldSetCookies; - set httpShouldSetCookies(bool value) => - _nsObject.HTTPShouldSetCookies = value; - - /// Whether to use [HTTP pipelining](https://en.wikipedia.org/wiki/HTTP_pipelining). - /// - /// See [NSURLSessionConfiguration.HTTPShouldUsePipelining](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411657-httpshouldusepipelining) - bool get httpShouldUsePipelining => _nsObject.HTTPShouldUsePipelining; - set httpShouldUsePipelining(bool value) => - _nsObject.HTTPShouldUsePipelining = value; - - /// What type of Multipath TCP connections to use. - /// - /// See [NSURLSessionConfiguration.multipathServiceType](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/2875967-multipathservicetype) - URLSessionMultipathServiceType get multipathServiceType => - URLSessionMultipathServiceType.values[_nsObject.multipathServiceType]; - set multipathServiceType(URLSessionMultipathServiceType value) => - _nsObject.multipathServiceType = value.index; - - /// Provides in indication to the operating system on what type of requests - /// are being sent. - /// - /// See [NSURLSessionConfiguration.networkServiceType](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411606-networkservicetype). - URLRequestNetworkService get networkServiceType => - URLRequestNetworkService.values[_nsObject.networkServiceType]; - set networkServiceType(URLRequestNetworkService value) => - _nsObject.networkServiceType = value.index; - - // Controls how to deal with response caching. - // - // See [NSURLSessionConfiguration.requestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411655-requestcachepolicy) - URLRequestCachePolicy get requestCachePolicy => - URLRequestCachePolicy.values[_nsObject.requestCachePolicy]; - set requestCachePolicy(URLRequestCachePolicy value) => - _nsObject.requestCachePolicy = value.index; - - /// Whether the app should be resumed when background tasks complete. - /// - /// See [NSURLSessionConfiguration.sessionSendsLaunchEvents](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1617174-sessionsendslaunchevents) - bool get sessionSendsLaunchEvents => _nsObject.sessionSendsLaunchEvents; - set sessionSendsLaunchEvents(bool value) => - _nsObject.sessionSendsLaunchEvents = value; - - /// Whether connections will be preserved if the app moves to the background. - /// - /// See [NSURLSessionConfiguration.shouldUseExtendedBackgroundIdleMode](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1409517-shoulduseextendedbackgroundidlem) - bool get shouldUseExtendedBackgroundIdleMode => - _nsObject.shouldUseExtendedBackgroundIdleMode; - set shouldUseExtendedBackgroundIdleMode(bool value) => - _nsObject.shouldUseExtendedBackgroundIdleMode = value; - - /// The timeout interval if data is not received. - /// - /// See [NSURLSessionConfiguration.timeoutIntervalForRequest](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408259-timeoutintervalforrequest) - Duration get timeoutIntervalForRequest => Duration( - microseconds: - (_nsObject.timeoutIntervalForRequest * Duration.microsecondsPerSecond) - .round()); - - set timeoutIntervalForRequest(Duration interval) { - _nsObject.timeoutIntervalForRequest = - interval.inMicroseconds.toDouble() / Duration.microsecondsPerSecond; - } - - /// Whether tasks should wait for connectivity or fail immediately. - /// - /// See [NSURLSessionConfiguration.waitsForConnectivity](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/2908812-waitsforconnectivity) - bool get waitsForConnectivity => _nsObject.waitsForConnectivity; - set waitsForConnectivity(bool value) => - _nsObject.waitsForConnectivity = value; - - @override - String toString() => '[URLSessionConfiguration ' - 'allowsCellularAccess=$allowsCellularAccess ' - 'allowsConstrainedNetworkAccess=$allowsConstrainedNetworkAccess ' - 'allowsExpensiveNetworkAccess=$allowsExpensiveNetworkAccess ' - 'discretionary=$discretionary ' - 'httpCookieAcceptPolicy=$httpCookieAcceptPolicy ' - 'httpShouldSetCookies=$httpShouldSetCookies ' - 'httpMaximumConnectionsPerHost=$httpMaximumConnectionsPerHost ' - 'httpShouldUsePipelining=$httpShouldUsePipelining ' - 'requestCachePolicy=$requestCachePolicy ' - 'sessionSendsLaunchEvents=$sessionSendsLaunchEvents ' - 'shouldUseExtendedBackgroundIdleMode=' - '$shouldUseExtendedBackgroundIdleMode ' - 'timeoutIntervalForRequest=$timeoutIntervalForRequest ' - 'waitsForConnectivity=$waitsForConnectivity' - ']'; -} - -/// A container for byte data. -/// -/// See [NSData](https://developer.apple.com/documentation/foundation/nsdata) -class Data extends _ObjectHolder { - Data._(ncb.NSData c) : super(c); - - // A new [Data] from an existing one. - // - // See [NSData dataWithData:](https://developer.apple.com/documentation/foundation/nsdata/1547230-datawithdata) - factory Data.fromData(Data d) => - Data._(ncb.NSData.dataWithData_(linkedLibs, d._nsObject)); - - /// A new [Data] object containing the given bytes. - factory Data.fromUint8List(Uint8List l) { - final buffer = calloc(l.length); - try { - buffer.asTypedList(l.length).setAll(0, l); - - final data = - ncb.NSData.dataWithBytes_length_(linkedLibs, buffer.cast(), l.length); - return Data._(data); - } finally { - calloc.free(buffer); - } - } - - /// The number of bytes contained in the object. - /// - /// See [NSData.length](https://developer.apple.com/documentation/foundation/nsdata/1416769-length) - int get length => _nsObject.length; - - /// The data contained in the object. - /// - /// See [NSData.bytes](https://developer.apple.com/documentation/foundation/nsdata/1410616-bytes) - Uint8List get bytes { - final bytes = _nsObject.bytes; - if (bytes.address == 0) { - return Uint8List(0); - } else { - // `NSData.byte` has the same lifetime as the `NSData` so make a copy to - // ensure memory safety. - // TODO(https://github.com/dart-lang/ffigen/issues/375): Remove copy. - return Uint8List.fromList(bytes.cast().asTypedList(length)); - } - } - - @override - String toString() { - final subrange = - length == 0 ? Uint8List(0) : bytes.sublist(0, min(length - 1, 20)); - final b = subrange.map((e) => e.toRadixString(16)).join(); - return '[Data length=$length bytes=0x$b...]'; - } -} - -/// A container for byte data. -/// -/// See [NSMutableData](https://developer.apple.com/documentation/foundation/nsmutabledata) -class MutableData extends Data { - final ncb.NSMutableData _mutableData; - - MutableData._(ncb.NSMutableData c) - : _mutableData = c, - super._(c); - - /// A new empty [MutableData]. - factory MutableData.empty() => - MutableData._(ncb.NSMutableData.dataWithCapacity_(linkedLibs, 0)); - - /// Appends the given data. - /// - /// See [NSMutableData appendBytes:length:](https://developer.apple.com/documentation/foundation/nsmutabledata/1407704-appendbytes) - void appendBytes(Uint8List l) { - final f = calloc(l.length); - try { - f.asTypedList(l.length).setAll(0, l); - - _mutableData.appendBytes_length_(f.cast(), l.length); - } finally { - calloc.free(f); - } - } - - @override - String toString() { - final subrange = - length == 0 ? Uint8List(0) : bytes.sublist(0, min(length - 1, 20)); - final b = subrange.map((e) => e.toRadixString(16)).join(); - return '[MutableData length=$length bytes=0x$b...]'; - } -} - -/// The response associated with loading an URL. -/// -/// See [NSURLResponse](https://developer.apple.com/documentation/foundation/nsurlresponse) -class URLResponse extends _ObjectHolder { - URLResponse._(ncb.NSURLResponse c) : super(c); - - factory URLResponse._exactURLResponseType(ncb.NSURLResponse response) { - if (ncb.NSHTTPURLResponse.isInstance(response)) { - return HTTPURLResponse._(ncb.NSHTTPURLResponse.castFrom(response)); - } - return URLResponse._(response); - } - - /// The expected amount of data returned with the response. - /// - /// See [NSURLResponse.expectedContentLength](https://developer.apple.com/documentation/foundation/nsurlresponse/1413507-expectedcontentlength) - int get expectedContentLength => _nsObject.expectedContentLength; - - /// The MIME type of the response. - /// - /// See [NSURLResponse.MIMEType](https://developer.apple.com/documentation/foundation/nsurlresponse/1411613-mimetype) - String? get mimeType => toStringOrNull(_nsObject.MIMEType); - - @override - String toString() => '[URLResponse ' - 'mimeType=$mimeType ' - 'expectedContentLength=$expectedContentLength' - ']'; -} - -/// The response associated with loading a HTTP URL. -/// -/// See [NSHTTPURLResponse](https://developer.apple.com/documentation/foundation/nshttpurlresponse) -class HTTPURLResponse extends URLResponse { - final ncb.NSHTTPURLResponse _httpUrlResponse; - - HTTPURLResponse._(ncb.NSHTTPURLResponse c) - : _httpUrlResponse = c, - super._(c); - - /// The HTTP status code of the response (e.g. 200). - /// - /// See [HTTPURLResponse.statusCode](https://developer.apple.com/documentation/foundation/nshttpurlresponse/1409395-statuscode) - int get statusCode => _httpUrlResponse.statusCode; - - /// The HTTP headers of the response. - /// - /// See [HTTPURLResponse.allHeaderFields](https://developer.apple.com/documentation/foundation/nshttpurlresponse/1417930-allheaderfields) - Map get allHeaderFields { - final headers = - ncb.NSDictionary.castFrom(_httpUrlResponse.allHeaderFields!); - return stringDictToMap(headers); - } - - @override - String toString() => '[HTTPURLResponse ' - 'statusCode=$statusCode ' - 'mimeType=$mimeType ' - 'expectedContentLength=$expectedContentLength' - ']'; -} - -/// The possible states of a [URLSessionTask]. -/// -/// See [NSURLSessionTaskState](https://developer.apple.com/documentation/foundation/nsurlsessiontaskstate) -enum URLSessionTaskState { - urlSessionTaskStateRunning, - urlSessionTaskStateSuspended, - urlSessionTaskStateCanceling, - urlSessionTaskStateCompleted, -} - -/// A task associated with downloading a URI. -/// -/// See [NSURLSessionTask](https://developer.apple.com/documentation/foundation/nsurlsessiontask) -class URLSessionTask extends _ObjectHolder { - URLSessionTask._(ncb.NSURLSessionTask c) : super(c); - - /// Cancels the task. - /// - /// See [NSURLSessionTask cancel](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411591-cancel) - void cancel() { - _nsObject.cancel(); - } - - /// Resumes a suspended task (new tasks start as suspended). - /// - /// See [NSURLSessionTask resume](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411121-resume) - void resume() { - _nsObject.resume(); - } - - /// Suspends a task (prevents it from transfering data). - /// - /// See [NSURLSessionTask suspend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411565-suspend) - void suspend() { - _nsObject.suspend(); - } - - /// The current state of the task. - /// - /// See [NSURLSessionTask.state](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1409888-state) - URLSessionTaskState get state => URLSessionTaskState.values[_nsObject.state]; - - /// The relative priority [0, 1] that the host should use to handle the - /// request. - /// - /// See [NSURLSessionTask.priority](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410569-priority) - double get priority => _nsObject.priority; - - /// The relative priority [0, 1] that the host should use to handle the - /// request. - /// - /// See [NSURLSessionTask.priority](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410569-priority) - set priority(double value) => _nsObject.priority = value; - - /// The request currently being handled by the task. - /// - /// May be different from [originalRequest] if the server responds with a - /// redirect. - /// - /// See [NSURLSessionTask.currentRequest](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411649-currentrequest) - URLRequest? get currentRequest { - final request = _nsObject.currentRequest; - if (request == null) { - return null; - } else { - return URLRequest._(request); - } - } - - /// The original request associated with the task. - /// - /// May be different from [currentRequest] if the server responds with a - /// redirect. - /// - /// See [NSURLSessionTask.originalRequest](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411572-originalrequest) - URLRequest? get originalRequest { - final request = _nsObject.originalRequest; - if (request == null) { - return null; - } else { - return URLRequest._(request); - } - } - - /// The server response to the request associated with this task. - /// - /// See [NSURLSessionTask.response](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410586-response) - URLResponse? get response { - final nsResponse = _nsObject.response; - if (nsResponse == null) { - return null; - } - return URLResponse._exactURLResponseType(nsResponse); - } - - /// An error indicating why the task failed or `null` on success. - /// - /// See [NSURLSessionTask.error](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1408145-error) - Error? get error { - final error = _nsObject.error; - if (error == null) { - return null; - } else { - return Error._(error); - } - } - - /// The user-assigned description for the task. - /// - /// See [NSURLSessionTask.taskDescription](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1409798-taskdescription) - String get taskDescription => _nsObject.taskDescription.toString(); - - /// The user-assigned description for the task. - /// - /// See [NSURLSessionTask.taskDescription](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1409798-taskdescription) - set taskDescription(String value) => - _nsObject.taskDescription = value.toNSString(linkedLibs); - - /// A unique ID for the [URLSessionTask] in a [URLSession]. - /// - /// See [NSURLSessionTask.taskIdentifier](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411231-taskidentifier) - int get taskIdentifier => _nsObject.taskIdentifier; - - /// The number of content bytes that are expected to be received from the - /// server. - /// - /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410663-countofbytesexpectedtoreceive) - int get countOfBytesExpectedToReceive => - _nsObject.countOfBytesExpectedToReceive; - - /// The number of content bytes that have been received from the server. - /// - /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411581-countofbytesreceived) - int get countOfBytesReceived => _nsObject.countOfBytesReceived; - - /// The number of content bytes that the task expects to send to the server. - /// - /// [NSURLSessionTask.countOfBytesExpectedToSend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411534-countofbytesexpectedtosend) - int get countOfBytesExpectedToSend => _nsObject.countOfBytesExpectedToSend; - - /// Whether the body of the response should be delivered incrementally or not. - /// - /// [NSURLSessionTask.countOfBytesSent](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410444-countofbytessent) - int get countOfBytesSent => _nsObject.countOfBytesSent; - - /// Whether the body of the response should be delivered incrementally or not. - /// - /// [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) - bool get prefersIncrementalDelivery => _nsObject.prefersIncrementalDelivery; - - /// Whether the body of the response should be delivered incrementally or not. - /// - /// [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) - set prefersIncrementalDelivery(bool value) => - _nsObject.prefersIncrementalDelivery = value; - - String _toStringHelper(String className) => '[$className ' - 'taskDescription=$taskDescription ' - 'taskIdentifier=$taskIdentifier ' - 'countOfBytesExpectedToReceive=$countOfBytesExpectedToReceive ' - 'countOfBytesReceived=$countOfBytesReceived ' - 'countOfBytesExpectedToSend=$countOfBytesExpectedToSend ' - 'countOfBytesSent=$countOfBytesSent ' - 'priority=$priority ' - 'state=$state ' - 'prefersIncrementalDelivery=$prefersIncrementalDelivery' - ']'; - - @override - String toString() => _toStringHelper('URLSessionTask'); -} - -/// A task associated with downloading a URI to a file. -/// -/// See [NSURLSessionDownloadTask](https://developer.apple.com/documentation/foundation/nsurlsessiondownloadtask) -class URLSessionDownloadTask extends URLSessionTask { - URLSessionDownloadTask._(ncb.NSURLSessionDownloadTask c) : super._(c); - - @override - String toString() => _toStringHelper('URLSessionDownloadTask'); -} - -/// A request to load a URL. -/// -/// See [NSURLRequest](https://developer.apple.com/documentation/foundation/nsurlrequest) -class URLRequest extends _ObjectHolder { - URLRequest._(ncb.NSURLRequest c) : super(c); - - /// Creates a request for a URL. - /// - /// See [NSURLRequest.requestWithURL:](https://developer.apple.com/documentation/foundation/nsurlrequest/1528603-requestwithurl) - factory URLRequest.fromUrl(Uri uri) { - final url = ncb.NSURL - .URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs)); - return URLRequest._(ncb.NSURLRequest.requestWithURL_(linkedLibs, url)); - } - - /// Returns all of the HTTP headers for the request. - /// - /// See [NSURLRequest.allHTTPHeaderFields](https://developer.apple.com/documentation/foundation/nsurlrequest/1418477-allhttpheaderfields) - Map? get allHttpHeaderFields { - if (_nsObject.allHTTPHeaderFields == null) { - return null; - } else { - final headers = ncb.NSDictionary.castFrom(_nsObject.allHTTPHeaderFields!); - return stringDictToMap(headers); - } - } - - // Controls how to deal with caching for the request. - // - // See [NSURLSession.cachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequest/1407944-cachepolicy) - URLRequestCachePolicy get cachePolicy => - URLRequestCachePolicy.values[_nsObject.cachePolicy]; - - /// The body of the request. - /// - /// See [NSURLRequest.HTTPBody](https://developer.apple.com/documentation/foundation/nsurlrequest/1411317-httpbody) - Data? get httpBody { - final body = _nsObject.HTTPBody; - if (body == null) { - return null; - } - return Data._(ncb.NSData.castFrom(body)); - } - - /// The HTTP request method (e.g. 'GET'). - /// - /// See [NSURLRequest.HTTPMethod](https://developer.apple.com/documentation/foundation/nsurlrequest/1413030-httpmethod) - /// - /// NOTE: The documentation for `NSURLRequest.HTTPMethod` says that the - /// property is nullable but, in practice, assigning it to null will produce - /// an error. - String get httpMethod => _nsObject.HTTPMethod!.toString(); - - /// The timeout interval during the connection attempt. - /// - /// See [NSURLSession.timeoutInterval](https://developer.apple.com/documentation/foundation/nsurlrequest/1418229-timeoutinterval) - Duration get timeoutInterval => Duration( - microseconds: - (_nsObject.timeoutInterval * Duration.microsecondsPerSecond).round()); - - /// The requested URL. - /// - /// See [URLRequest.URL](https://developer.apple.com/documentation/foundation/nsurlrequest/1408996-url) - Uri? get url { - final nsUrl = _nsObject.URL; - if (nsUrl == null) { - return null; - } - return Uri.parse(nsUrl.absoluteString!.toString()); - } - - @override - String toString() => '[URLRequest ' - 'allHttpHeaderFields=$allHttpHeaderFields ' - 'cachePolicy=$cachePolicy ' - 'httpBody=$httpBody ' - 'httpMethod=$httpMethod ' - 'timeoutInterval=$timeoutInterval ' - 'url=$url ' - ']'; -} - -/// A mutable request to load a URL. -/// -/// See [NSMutableURLRequest](https://developer.apple.com/documentation/foundation/nsmutableurlrequest) -class MutableURLRequest extends URLRequest { - final ncb.NSMutableURLRequest _mutableUrlRequest; - - MutableURLRequest._(ncb.NSMutableURLRequest c) - : _mutableUrlRequest = c, - super._(c); - - /// Creates a request for a URL. - /// - /// See [NSMutableURLRequest.requestWithURL:](https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1414617-allhttpheaderfields) - factory MutableURLRequest.fromUrl(Uri uri) { - final url = ncb.NSURL - .URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs)); - return MutableURLRequest._( - ncb.NSMutableURLRequest.requestWithURL_(linkedLibs, url)); - } - - set cachePolicy(URLRequestCachePolicy value) => - _mutableUrlRequest.cachePolicy = value.index; - - set httpBody(Data? data) { - _mutableUrlRequest.HTTPBody = data?._nsObject; - } - - set httpMethod(String method) { - _mutableUrlRequest.HTTPMethod = method.toNSString(linkedLibs); - } - - set timeoutInterval(Duration interval) { - _mutableUrlRequest.timeoutInterval = - interval.inMicroseconds.toDouble() / Duration.microsecondsPerSecond; - } - - /// Set the value of a header field. - /// - /// See [NSMutableURLRequest setValue:forHTTPHeaderField:](https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1408793-setvalue) - void setValueForHttpHeaderField(String value, String field) { - _mutableUrlRequest.setValue_forHTTPHeaderField_( - field.toNSString(linkedLibs), value.toNSString(linkedLibs)); - } - - @override - String toString() => '[MutableURLRequest ' - 'allHttpHeaderFields=$allHttpHeaderFields ' - 'cachePolicy=$cachePolicy ' - 'httpBody=$httpBody ' - 'httpMethod=$httpMethod ' - 'timeoutInterval=$timeoutInterval ' - 'url=$url ' - ']'; -} - -/// Setup delegation for the given [task] to the given methods. -/// -/// Specifically, this causes the Objective-C-implemented delegate installed -/// with -/// [sessionWithConfiguration:delegate:delegateQueue:](https://developer.apple.com/documentation/foundation/nsurlsession/1411597-sessionwithconfiguration) -/// to send a [ncb.CUPHTTPForwardedDelegate] object to a send port, which is -/// then processed by [_setupDelegation] and forwarded to the given methods. -void _setupDelegation( - ncb.CUPHTTPClientDelegate delegate, URLSession session, URLSessionTask task, - {URLRequest? Function(URLSession session, URLSessionTask task, - HTTPURLResponse response, URLRequest newRequest)? - onRedirect, - URLSessionResponseDisposition Function( - URLSession session, URLSessionTask task, URLResponse response)? - onResponse, - void Function(URLSession session, URLSessionTask task, Data error)? onData, - void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? - onFinishedDownloading, - void Function(URLSession session, URLSessionTask task, Error? error)? - onComplete}) { - final responsePort = ReceivePort(); - responsePort.listen((d) { - final message = d as List; - final messageType = message[0]; - final dp = Pointer.fromAddress(message[1] as int); - - final forwardedDelegate = - ncb.CUPHTTPForwardedDelegate.castFromPointer(helperLibs, dp, - // `CUPHTTPForwardedDelegate` was retained in the delegate so it - // only needs to be released. - release: true); - - switch (messageType) { - case ncb.MessageType.RedirectMessage: - final forwardedRedirect = - ncb.CUPHTTPForwardedRedirect.castFrom(forwardedDelegate); - URLRequest? redirectRequest; - - try { - final request = URLRequest._( - ncb.NSURLRequest.castFrom(forwardedRedirect.request!)); - - if (onRedirect == null) { - redirectRequest = request; - break; - } - try { - final response = HTTPURLResponse._( - ncb.NSHTTPURLResponse.castFrom(forwardedRedirect.response!)); - redirectRequest = onRedirect(session, task, response, request); - } catch (e) { - // TODO(https://github.com/dart-lang/ffigen/issues/386): Package - // this exception as an `Error` and call the completion function - // with it. - } - } finally { - forwardedRedirect.finishWithRequest_(redirectRequest?._nsObject); - } - break; - case ncb.MessageType.ResponseMessage: - final forwardedResponse = - ncb.CUPHTTPForwardedResponse.castFrom(forwardedDelegate); - var disposition = - URLSessionResponseDisposition.urlSessionResponseCancel; - - try { - if (onResponse == null) { - disposition = URLSessionResponseDisposition.urlSessionResponseAllow; - break; - } - final response = - URLResponse._exactURLResponseType(forwardedResponse.response!); - - try { - disposition = onResponse(session, task, response); - } catch (e) { - // TODO(https://github.com/dart-lang/ffigen/issues/386): Package - // this exception as an `Error` and call the completion function - // with it. - } - } finally { - forwardedResponse.finishWithDisposition_(disposition.index); - } - break; - case ncb.MessageType.DataMessage: - final forwardedData = - ncb.CUPHTTPForwardedData.castFrom(forwardedDelegate); - - try { - if (onData == null) { - break; - } - try { - onData(session, task, - Data._(ncb.NSData.castFrom(forwardedData.data!))); - } catch (e) { - // TODO(https://github.com/dart-lang/ffigen/issues/386): Package - // this exception as an `Error` and call the completion function - // with it. - } - } finally { - forwardedData.finish(); - } - break; - case ncb.MessageType.FinishedDownloading: - final finishedDownloading = - ncb.CUPHTTPForwardedFinishedDownloading.castFrom(forwardedDelegate); - try { - if (onFinishedDownloading == null) { - break; - } - try { - onFinishedDownloading( - session, - task as URLSessionDownloadTask, - Uri.parse( - finishedDownloading.location!.absoluteString!.toString())); - } catch (e) { - // TODO(https://github.com/dart-lang/ffigen/issues/386): Package - // this exception as an `Error` and call the completion function - // with it. - } - } finally { - finishedDownloading.finish(); - } - break; - case ncb.MessageType.CompletedMessage: - final forwardedComplete = - ncb.CUPHTTPForwardedComplete.castFrom(forwardedDelegate); - - try { - if (onComplete == null) { - break; - } - Error? error; - if (forwardedComplete.error != null) { - error = Error._(ncb.NSError.castFrom(forwardedComplete.error!)); - } - try { - onComplete(session, task, error); - } catch (e) { - // TODO(https://github.com/dart-lang/ffigen/issues/386): Package - // this exception as an `Error` and call the completion function - // with it. - } - } finally { - forwardedComplete.finish(); - responsePort.close(); - } - break; - } - }); - final config = ncb.CUPHTTPTaskConfiguration.castFrom( - ncb.CUPHTTPTaskConfiguration.alloc(helperLibs) - .initWithPort_(responsePort.sendPort.nativePort)); - - delegate.registerTask_withConfiguration_(task._nsObject, config); -} - -/// A client that can make network requests to a server. -/// -/// See [NSURLSession](https://developer.apple.com/documentation/foundation/nsurlsession) -class URLSession extends _ObjectHolder { - // Provide our own native delegate to `NSURLSession` because delegates can be - // called on arbitrary threads and Dart code cannot be. - static final _delegate = ncb.CUPHTTPClientDelegate.new1(helperLibs); - - URLRequest? Function(URLSession session, URLSessionTask task, - HTTPURLResponse response, URLRequest newRequest)? _onRedirect; - URLSessionResponseDisposition Function( - URLSession session, URLSessionTask task, URLResponse response)? - _onResponse; - void Function(URLSession session, URLSessionTask task, Data error)? _onData; - void Function(URLSession session, URLSessionTask task, Error? error)? - _onComplete; - void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? - _onFinishedDownloading; - - URLSession._(ncb.NSURLSession c, - {URLRequest? Function(URLSession session, URLSessionTask task, - HTTPURLResponse response, URLRequest newRequest)? - onRedirect, - URLSessionResponseDisposition Function( - URLSession session, URLSessionTask task, URLResponse response)? - onResponse, - void Function(URLSession session, URLSessionTask task, Data error)? - onData, - void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? - onFinishedDownloading, - void Function(URLSession session, URLSessionTask task, Error? error)? - onComplete}) - : _onRedirect = onRedirect, - _onResponse = onResponse, - _onData = onData, - _onFinishedDownloading = onFinishedDownloading, - _onComplete = onComplete, - super(c); - - /// A client with reasonable default behavior. - /// - /// See [NSURLSession.sharedSession](https://developer.apple.com/documentation/foundation/nsurlsession/1409000-sharedsession) - factory URLSession.sharedSession() => URLSession.sessionWithConfiguration( - URLSessionConfiguration.defaultSessionConfiguration()); - - /// A client with a given configuration. - /// - /// If [onRedirect] is set then it will be called whenever a HTTP - /// request returns a redirect response (e.g. 302). The `response` parameter - /// contains the response from the server. The `newRequest` parameter contains - /// a follow-up request that would honor the server's redirect. If the return - /// value of this function is `null` then the redirect will not occur. - /// Otherwise, the returned [URLRequest] (usually `newRequest`) will be - /// executed. [onRedirect] will not be called for background sessions, which - /// automatically follow redirects. See - /// [URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessiontaskdelegate/1411626-urlsession) - /// - /// If [onResponse] is set then it will be called whenever a valid response - /// is received. The returned [URLSessionResponseDisposition] will decide - /// how the content of the response is processed. See - /// [URLSession:dataTask:didReceiveResponse:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessiondatadelegate/1410027-urlsession) - /// - /// If [onData] is set then it will be called whenever response data is - /// received. If the amount of received data is large, then it may be - /// called more than once. See - /// [URLSession:dataTask:didReceiveData:](https://developer.apple.com/documentation/foundation/nsurlsessiondatadelegate/1411528-urlsession) - /// - /// If [onFinishedDownloading] is set then it will be called whenever a - /// [URLSessionDownloadTask] has finished downloading. - /// - /// If [onComplete] is set then it will be called when a task completes. If - /// `error` is `null` then the request completed successfully. See - /// [URLSession:task:didCompleteWithError:](https://developer.apple.com/documentation/foundation/nsurlsessiontaskdelegate/1411610-urlsession) - /// - /// See [sessionWithConfiguration:delegate:delegateQueue:](https://developer.apple.com/documentation/foundation/nsurlsession/1411597-sessionwithconfiguration) - factory URLSession.sessionWithConfiguration(URLSessionConfiguration config, - {URLRequest? Function(URLSession session, URLSessionTask task, - HTTPURLResponse response, URLRequest newRequest)? - onRedirect, - URLSessionResponseDisposition Function( - URLSession session, URLSessionTask task, URLResponse response)? - onResponse, - void Function(URLSession session, URLSessionTask task, Data error)? - onData, - void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? - onFinishedDownloading, - void Function(URLSession session, URLSessionTask task, Error? error)? - onComplete}) { - // Avoid the complexity of simultaneous or out-of-order delegate callbacks - // by only allowing callbacks to execute sequentially. - // See https://developer.apple.com/forums/thread/47252 - // NOTE: this is likely to reduce throughput when there are multiple - // requests in flight because each call to a delegate waits on a lock - // that is unlocked by Dart code. - final queue = ncb.NSOperationQueue.new1(linkedLibs) - ..maxConcurrentOperationCount = 1 - ..name = - 'cupertino_http.NSURLSessionDelegateQueue'.toNSString(linkedLibs); - - return URLSession._( - ncb.NSURLSession.sessionWithConfiguration_delegate_delegateQueue_( - linkedLibs, config._nsObject, _delegate, queue), - onRedirect: onRedirect, - onResponse: onResponse, - onData: onData, - onFinishedDownloading: onFinishedDownloading, - onComplete: onComplete); - } - // A **copy** of the configuration for this sesion. - // - // See [NSURLSession.configuration](https://developer.apple.com/documentation/foundation/nsurlsession/1411477-configuration) - URLSessionConfiguration get configuration => URLSessionConfiguration._( - ncb.NSURLSessionConfiguration.castFrom(_nsObject.configuration!)); - - // Create a [URLSessionTask] that accesses a server URL. - // - // See [NSURLSession dataTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/1410592-datataskwithrequest) - URLSessionTask dataTaskWithRequest(URLRequest request) { - final task = - URLSessionTask._(_nsObject.dataTaskWithRequest_(request._nsObject)); - _setupDelegation(_delegate, this, task, - onComplete: _onComplete, - onData: _onData, - onFinishedDownloading: _onFinishedDownloading, - onRedirect: _onRedirect, - onResponse: _onResponse); - return task; - } - - /// Creates a [URLSessionTask] that accesses a server URL and calls - /// [completion] when done. - /// - /// See [NSURLSession dataTaskWithRequest:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsession/1407613-datataskwithrequest) - URLSessionTask dataTaskWithCompletionHandler( - URLRequest request, - void Function(Data? data, HTTPURLResponse? response, Error? error) - completion) { - // This method cannot be implemented by simply calling - // `dataTaskWithRequest:completionHandler:` because the completion handler - // will invoke the Dart callback on an arbitrary thread and Dart code - // cannot be run that way - // (see https://github.com/dart-lang/sdk/issues/37022). - // - // Instead, we use `dataTaskWithRequest:` and: - // 1. create a port to receive information about the request. - // 2. use a delegate to send information about the task to the port - // 3. call the user-provided completion function when we receive the - // `CompletedMessage` message type. - final task = - URLSessionTask._(_nsObject.dataTaskWithRequest_(request._nsObject)); - - HTTPURLResponse? finalResponse; - MutableData? allData; - - _setupDelegation(_delegate, this, task, onRedirect: _onRedirect, onResponse: - (URLSession session, URLSessionTask task, URLResponse response) { - finalResponse = - HTTPURLResponse._(ncb.NSHTTPURLResponse.castFrom(response._nsObject)); - return URLSessionResponseDisposition.urlSessionResponseAllow; - }, onData: (URLSession session, URLSessionTask task, Data data) { - allData ??= MutableData.empty(); - allData!.appendBytes(data.bytes); - }, onComplete: (URLSession session, URLSessionTask task, Error? error) { - completion(allData == null ? null : Data.fromData(allData!), - finalResponse, error); - }); - - return URLSessionTask._(task._nsObject); - } +import 'src/cupertino_client.dart'; - /// Creates a [URLSessionDownloadTask] that downloads the data from a server - /// URL. - /// - /// Provide a `onFinishedDownloading` handler in the [URLSession] factory to - /// receive notifications when the data has completed downloaded. - /// - /// See [NSURLSession downloadTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/1411481-downloadtaskwithrequest) - URLSessionDownloadTask downloadTaskWithRequest(URLRequest request) { - final task = URLSessionDownloadTask._( - _nsObject.downloadTaskWithRequest_(request._nsObject)); - _setupDelegation(_delegate, this, task, - onComplete: _onComplete, - onData: _onData, - onFinishedDownloading: _onFinishedDownloading, - onRedirect: _onRedirect, - onResponse: _onResponse); - return task; - } -} +export 'src/cupertino_api.dart'; +export 'src/cupertino_client.dart'; diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart new file mode 100644 index 0000000000..e70b93ba82 --- /dev/null +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -0,0 +1,1150 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// Provides access to the +/// [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). +/// +/// For example: +/// ``` +/// void main() { +/// final url = Uri.https('www.example.com', '/'); +/// final session = URLSession.sharedSession(); +/// final task = session.dataTaskWithCompletionHandler( +/// URLRequest.fromUrl(url), +/// (data, response, error) { +/// if (error == null) { +/// if (response != null && response.statusCode == 200) { +/// print(response); // Do something with the response. +/// return; +/// } +/// } +/// print(error); // Handle errors. +/// }); +/// task.resume(); +/// } +/// ``` + +import 'dart:ffi'; +import 'dart:isolate'; +import 'dart:math'; +import 'dart:typed_data'; + +import 'package:ffi/ffi.dart'; + +import 'native_cupertino_bindings.dart' as ncb; +import 'utils.dart'; + +abstract class _ObjectHolder { + final T _nsObject; + + _ObjectHolder(this._nsObject); + + @override + bool operator ==(Object other) { + if (other is _ObjectHolder) { + return _nsObject == other._nsObject; + } + return false; + } + + @override + int get hashCode => _nsObject.hashCode; +} + +/// Settings for controlling whether cookies will be accepted. +/// +/// See [HTTPCookieAcceptPolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408933-httpcookieacceptpolicy). +enum HTTPCookieAcceptPolicy { + httpCookieAcceptPolicyAlways, + httpCookieAcceptPolicyNever, + httpCookieAcceptPolicyOnlyFromMainDocumentDomain, +} + +/// Controls how response data is cached. +/// +/// See [URLRequestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequestcachepolicy). +enum URLRequestCachePolicy { + useProtocolCachePolicy, + reloadIgnoringLocalCacheData, + returnCacheDataElseLoad, + returnCacheDataDontLoad, + reloadIgnoringLocalAndRemoteCacheData, + reloadRevalidatingCacheData, +} + +// Controls how multipath TCP should be used. +// +// See [NSURLSessionMultipathServiceType](https://developer.apple.com/documentation/foundation/nsurlsessionmultipathservicetype). +enum URLSessionMultipathServiceType { + multipathServiceTypeNone, + multipathServiceTypeHandover, + multipathServiceTypeInteractive, + multipathServiceTypeAggregate, +} + +/// Controls how [URLSessionTask] execute will proceed after the response is +/// received. +/// +/// See [NSURLSessionResponseDisposition](https://developer.apple.com/documentation/foundation/nsurlsessionresponsedisposition). +enum URLSessionResponseDisposition { + urlSessionResponseCancel, + urlSessionResponseAllow, + urlSessionResponseBecomeDownload, + urlSessionResponseBecomeStream +} + +/// Provides in indication to the operating system on what type of requests +/// are being sent. +/// +/// See [NSURLRequestNetworkServiceType](https://developer.apple.com/documentation/foundation/nsurlrequestnetworkservicetype). +enum URLRequestNetworkService { + networkServiceTypeDefault, + networkServiceTypeVoIP, + networkServiceTypeVideo, + networkServiceTypeBackground, + networkServiceTypeVoice, + networkServiceTypeResponsiveData, + networkServiceTypeAVStreaming, + networkServiceTypeResponsiveAV, + networkServiceTypeCallSignaling +} + +/// Information about a failure. +/// +/// See [NSError](https://developer.apple.com/documentation/foundation/nserror) +class Error extends _ObjectHolder { + Error._(ncb.NSError c) : super(c); + + /// The numeric code for the error e.g. -1003 (kCFURLErrorCannotFindHost). + /// + /// The interpretation of this code will depend on the domain of the error + /// which, for URL loading, will usually be + /// [`kCFErrorDomainCFNetwork`](https://developer.apple.com/documentation/cfnetwork/kcferrordomaincfnetwork). + /// + /// See [NSError.code](https://developer.apple.com/documentation/foundation/nserror/1409165-code) + int get code => _nsObject.code; + + // TODO(https://github.com/dart-lang/ffigen/issues/386): expose + // `NSError.domain` when correct type aliases are available. + + /// A description of the error in the current locale e.g. + /// 'A server with the specified hostname could not be found.' + /// + /// See [NSError.locaizedDescription](https://developer.apple.com/documentation/foundation/nserror/1414418-localizeddescription) + String? get localizedDescription => + toStringOrNull(_nsObject.localizedDescription); + + /// An explanation of the reason for the error in the current locale. + /// + /// See [NSError.localizedFailureReason](https://developer.apple.com/documentation/foundation/nserror/1412752-localizedfailurereason) + String? get localizedFailureReason => + toStringOrNull(_nsObject.localizedFailureReason); + + /// An explanation of how to fix the error in the current locale. + /// + /// See [NSError.localizedRecoverySuggestion](https://developer.apple.com/documentation/foundation/nserror/1407500-localizedrecoverysuggestion) + String? get localizedRecoverySuggestion => + toStringOrNull(_nsObject.localizedRecoverySuggestion); + + @override + String toString() => '[Error ' + 'code=$code ' + 'localizedDescription=$localizedDescription ' + 'localizedFailureReason=$localizedFailureReason ' + 'localizedRecoverySuggestion=$localizedRecoverySuggestion ' + ']'; +} + +/// Controls the behavior of a URLSession. +/// +/// See [NSURLSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration) +class URLSessionConfiguration + extends _ObjectHolder { + URLSessionConfiguration._(ncb.NSURLSessionConfiguration c) : super(c); + + /// A configuration suitable for performing HTTP uploads and downloads in + /// the background. + /// + /// See [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1407496-backgroundsessionconfigurationwi) + factory URLSessionConfiguration.backgroundSession(String identifier) => + URLSessionConfiguration._(ncb.NSURLSessionConfiguration + .backgroundSessionConfigurationWithIdentifier_( + linkedLibs, identifier.toNSString(linkedLibs))); + + /// A configuration that uses caching and saves cookies and credentials. + /// + /// See [NSURLSessionConfiguration defaultSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411560-defaultsessionconfiguration) + factory URLSessionConfiguration.defaultSessionConfiguration() => + URLSessionConfiguration._(ncb.NSURLSessionConfiguration.castFrom( + ncb.NSURLSessionConfiguration.getDefaultSessionConfiguration( + linkedLibs)!)); + + /// A configuration that uses caching and saves cookies and credentials. + /// + /// See [NSURLSessionConfiguration ephemeralSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1410529-ephemeralsessionconfiguration) + factory URLSessionConfiguration.ephemeralSessionConfiguration() => + URLSessionConfiguration._(ncb.NSURLSessionConfiguration.castFrom( + ncb.NSURLSessionConfiguration.getEphemeralSessionConfiguration( + linkedLibs)!)); + + /// Whether connections over a cellular network are allowed. + /// + /// See [NSURLSessionConfiguration.allowsCellularAccess](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1409406-allowscellularaccess) + bool get allowsCellularAccess => _nsObject.allowsCellularAccess; + set allowsCellularAccess(bool value) => + _nsObject.allowsCellularAccess = value; + + /// Whether connections are allowed when the user has selected Low Data Mode. + /// + /// See [NSURLSessionConfiguration.allowsConstrainedNetworkAccess](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/3235751-allowsconstrainednetworkaccess) + bool get allowsConstrainedNetworkAccess => + _nsObject.allowsConstrainedNetworkAccess; + set allowsConstrainedNetworkAccess(bool value) => + _nsObject.allowsConstrainedNetworkAccess = value; + + /// Whether connections are allowed over expensive networks. + /// + /// See [NSURLSessionConfiguration.allowsExpensiveNetworkAccess](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/3235752-allowsexpensivenetworkaccess) + bool get allowsExpensiveNetworkAccess => + _nsObject.allowsExpensiveNetworkAccess; + set allowsExpensiveNetworkAccess(bool value) => + _nsObject.allowsExpensiveNetworkAccess = value; + + /// Whether background tasks can be delayed by the system. + /// + /// See [NSURLSessionConfiguration.discretionary](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411552-discretionary) + bool get discretionary => _nsObject.discretionary; + set discretionary(bool value) => _nsObject.discretionary = value; + + /// What policy to use when deciding whether to accept cookies. + /// + /// See [NSURLSessionConfiguration.HTTPCookieAcceptPolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408933-httpcookieacceptpolicy). + HTTPCookieAcceptPolicy get httpCookieAcceptPolicy => + HTTPCookieAcceptPolicy.values[_nsObject.HTTPCookieAcceptPolicy]; + set httpCookieAcceptPolicy(HTTPCookieAcceptPolicy value) => + _nsObject.HTTPCookieAcceptPolicy = value.index; + + // The maximun number of connections that a URLSession can have open to the + // same host. + // + // See [NSURLSessionConfiguration.HTTPMaximumConnectionsPerHost](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1407597-httpmaximumconnectionsperhost). + int get httpMaximumConnectionsPerHost => + _nsObject.HTTPMaximumConnectionsPerHost; + set httpMaximumConnectionsPerHost(int value) => + _nsObject.HTTPMaximumConnectionsPerHost = value; + + /// Whether requests should include cookies from the cookie store. + /// + /// See [NSURLSessionConfiguration.HTTPShouldSetCookies](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411589-httpshouldsetcookies) + bool get httpShouldSetCookies => _nsObject.HTTPShouldSetCookies; + set httpShouldSetCookies(bool value) => + _nsObject.HTTPShouldSetCookies = value; + + /// Whether to use [HTTP pipelining](https://en.wikipedia.org/wiki/HTTP_pipelining). + /// + /// See [NSURLSessionConfiguration.HTTPShouldUsePipelining](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411657-httpshouldusepipelining) + bool get httpShouldUsePipelining => _nsObject.HTTPShouldUsePipelining; + set httpShouldUsePipelining(bool value) => + _nsObject.HTTPShouldUsePipelining = value; + + /// What type of Multipath TCP connections to use. + /// + /// See [NSURLSessionConfiguration.multipathServiceType](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/2875967-multipathservicetype) + URLSessionMultipathServiceType get multipathServiceType => + URLSessionMultipathServiceType.values[_nsObject.multipathServiceType]; + set multipathServiceType(URLSessionMultipathServiceType value) => + _nsObject.multipathServiceType = value.index; + + /// Provides in indication to the operating system on what type of requests + /// are being sent. + /// + /// See [NSURLSessionConfiguration.networkServiceType](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411606-networkservicetype). + URLRequestNetworkService get networkServiceType => + URLRequestNetworkService.values[_nsObject.networkServiceType]; + set networkServiceType(URLRequestNetworkService value) => + _nsObject.networkServiceType = value.index; + + // Controls how to deal with response caching. + // + // See [NSURLSessionConfiguration.requestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411655-requestcachepolicy) + URLRequestCachePolicy get requestCachePolicy => + URLRequestCachePolicy.values[_nsObject.requestCachePolicy]; + set requestCachePolicy(URLRequestCachePolicy value) => + _nsObject.requestCachePolicy = value.index; + + /// Whether the app should be resumed when background tasks complete. + /// + /// See [NSURLSessionConfiguration.sessionSendsLaunchEvents](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1617174-sessionsendslaunchevents) + bool get sessionSendsLaunchEvents => _nsObject.sessionSendsLaunchEvents; + set sessionSendsLaunchEvents(bool value) => + _nsObject.sessionSendsLaunchEvents = value; + + /// Whether connections will be preserved if the app moves to the background. + /// + /// See [NSURLSessionConfiguration.shouldUseExtendedBackgroundIdleMode](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1409517-shoulduseextendedbackgroundidlem) + bool get shouldUseExtendedBackgroundIdleMode => + _nsObject.shouldUseExtendedBackgroundIdleMode; + set shouldUseExtendedBackgroundIdleMode(bool value) => + _nsObject.shouldUseExtendedBackgroundIdleMode = value; + + /// The timeout interval if data is not received. + /// + /// See [NSURLSessionConfiguration.timeoutIntervalForRequest](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408259-timeoutintervalforrequest) + Duration get timeoutIntervalForRequest => Duration( + microseconds: + (_nsObject.timeoutIntervalForRequest * Duration.microsecondsPerSecond) + .round()); + + set timeoutIntervalForRequest(Duration interval) { + _nsObject.timeoutIntervalForRequest = + interval.inMicroseconds.toDouble() / Duration.microsecondsPerSecond; + } + + /// Whether tasks should wait for connectivity or fail immediately. + /// + /// See [NSURLSessionConfiguration.waitsForConnectivity](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/2908812-waitsforconnectivity) + bool get waitsForConnectivity => _nsObject.waitsForConnectivity; + set waitsForConnectivity(bool value) => + _nsObject.waitsForConnectivity = value; + + @override + String toString() => '[URLSessionConfiguration ' + 'allowsCellularAccess=$allowsCellularAccess ' + 'allowsConstrainedNetworkAccess=$allowsConstrainedNetworkAccess ' + 'allowsExpensiveNetworkAccess=$allowsExpensiveNetworkAccess ' + 'discretionary=$discretionary ' + 'httpCookieAcceptPolicy=$httpCookieAcceptPolicy ' + 'httpShouldSetCookies=$httpShouldSetCookies ' + 'httpMaximumConnectionsPerHost=$httpMaximumConnectionsPerHost ' + 'httpShouldUsePipelining=$httpShouldUsePipelining ' + 'requestCachePolicy=$requestCachePolicy ' + 'sessionSendsLaunchEvents=$sessionSendsLaunchEvents ' + 'shouldUseExtendedBackgroundIdleMode=' + '$shouldUseExtendedBackgroundIdleMode ' + 'timeoutIntervalForRequest=$timeoutIntervalForRequest ' + 'waitsForConnectivity=$waitsForConnectivity' + ']'; +} + +/// A container for byte data. +/// +/// See [NSData](https://developer.apple.com/documentation/foundation/nsdata) +class Data extends _ObjectHolder { + Data._(ncb.NSData c) : super(c); + + // A new [Data] from an existing one. + // + // See [NSData dataWithData:](https://developer.apple.com/documentation/foundation/nsdata/1547230-datawithdata) + factory Data.fromData(Data d) => + Data._(ncb.NSData.dataWithData_(linkedLibs, d._nsObject)); + + /// A new [Data] object containing the given bytes. + factory Data.fromUint8List(Uint8List l) { + final buffer = calloc(l.length); + try { + buffer.asTypedList(l.length).setAll(0, l); + + final data = + ncb.NSData.dataWithBytes_length_(linkedLibs, buffer.cast(), l.length); + return Data._(data); + } finally { + calloc.free(buffer); + } + } + + /// The number of bytes contained in the object. + /// + /// See [NSData.length](https://developer.apple.com/documentation/foundation/nsdata/1416769-length) + int get length => _nsObject.length; + + /// The data contained in the object. + /// + /// See [NSData.bytes](https://developer.apple.com/documentation/foundation/nsdata/1410616-bytes) + Uint8List get bytes { + final bytes = _nsObject.bytes; + if (bytes.address == 0) { + return Uint8List(0); + } else { + // `NSData.byte` has the same lifetime as the `NSData` so make a copy to + // ensure memory safety. + // TODO(https://github.com/dart-lang/ffigen/issues/375): Remove copy. + return Uint8List.fromList(bytes.cast().asTypedList(length)); + } + } + + @override + String toString() { + final subrange = + length == 0 ? Uint8List(0) : bytes.sublist(0, min(length - 1, 20)); + final b = subrange.map((e) => e.toRadixString(16)).join(); + return '[Data length=$length bytes=0x$b...]'; + } +} + +/// A container for byte data. +/// +/// See [NSMutableData](https://developer.apple.com/documentation/foundation/nsmutabledata) +class MutableData extends Data { + final ncb.NSMutableData _mutableData; + + MutableData._(ncb.NSMutableData c) + : _mutableData = c, + super._(c); + + /// A new empty [MutableData]. + factory MutableData.empty() => + MutableData._(ncb.NSMutableData.dataWithCapacity_(linkedLibs, 0)); + + /// Appends the given data. + /// + /// See [NSMutableData appendBytes:length:](https://developer.apple.com/documentation/foundation/nsmutabledata/1407704-appendbytes) + void appendBytes(Uint8List l) { + final f = calloc(l.length); + try { + f.asTypedList(l.length).setAll(0, l); + + _mutableData.appendBytes_length_(f.cast(), l.length); + } finally { + calloc.free(f); + } + } + + @override + String toString() { + final subrange = + length == 0 ? Uint8List(0) : bytes.sublist(0, min(length - 1, 20)); + final b = subrange.map((e) => e.toRadixString(16)).join(); + return '[MutableData length=$length bytes=0x$b...]'; + } +} + +/// The response associated with loading an URL. +/// +/// See [NSURLResponse](https://developer.apple.com/documentation/foundation/nsurlresponse) +class URLResponse extends _ObjectHolder { + URLResponse._(ncb.NSURLResponse c) : super(c); + + factory URLResponse._exactURLResponseType(ncb.NSURLResponse response) { + if (ncb.NSHTTPURLResponse.isInstance(response)) { + return HTTPURLResponse._(ncb.NSHTTPURLResponse.castFrom(response)); + } + return URLResponse._(response); + } + + /// The expected amount of data returned with the response. + /// + /// See [NSURLResponse.expectedContentLength](https://developer.apple.com/documentation/foundation/nsurlresponse/1413507-expectedcontentlength) + int get expectedContentLength => _nsObject.expectedContentLength; + + /// The MIME type of the response. + /// + /// See [NSURLResponse.MIMEType](https://developer.apple.com/documentation/foundation/nsurlresponse/1411613-mimetype) + String? get mimeType => toStringOrNull(_nsObject.MIMEType); + + @override + String toString() => '[URLResponse ' + 'mimeType=$mimeType ' + 'expectedContentLength=$expectedContentLength' + ']'; +} + +/// The response associated with loading a HTTP URL. +/// +/// See [NSHTTPURLResponse](https://developer.apple.com/documentation/foundation/nshttpurlresponse) +class HTTPURLResponse extends URLResponse { + final ncb.NSHTTPURLResponse _httpUrlResponse; + + HTTPURLResponse._(ncb.NSHTTPURLResponse c) + : _httpUrlResponse = c, + super._(c); + + /// The HTTP status code of the response (e.g. 200). + /// + /// See [HTTPURLResponse.statusCode](https://developer.apple.com/documentation/foundation/nshttpurlresponse/1409395-statuscode) + int get statusCode => _httpUrlResponse.statusCode; + + /// The HTTP headers of the response. + /// + /// See [HTTPURLResponse.allHeaderFields](https://developer.apple.com/documentation/foundation/nshttpurlresponse/1417930-allheaderfields) + Map get allHeaderFields { + final headers = + ncb.NSDictionary.castFrom(_httpUrlResponse.allHeaderFields!); + return stringDictToMap(headers); + } + + @override + String toString() => '[HTTPURLResponse ' + 'statusCode=$statusCode ' + 'mimeType=$mimeType ' + 'expectedContentLength=$expectedContentLength' + ']'; +} + +/// The possible states of a [URLSessionTask]. +/// +/// See [NSURLSessionTaskState](https://developer.apple.com/documentation/foundation/nsurlsessiontaskstate) +enum URLSessionTaskState { + urlSessionTaskStateRunning, + urlSessionTaskStateSuspended, + urlSessionTaskStateCanceling, + urlSessionTaskStateCompleted, +} + +/// A task associated with downloading a URI. +/// +/// See [NSURLSessionTask](https://developer.apple.com/documentation/foundation/nsurlsessiontask) +class URLSessionTask extends _ObjectHolder { + URLSessionTask._(ncb.NSURLSessionTask c) : super(c); + + /// Cancels the task. + /// + /// See [NSURLSessionTask cancel](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411591-cancel) + void cancel() { + _nsObject.cancel(); + } + + /// Resumes a suspended task (new tasks start as suspended). + /// + /// See [NSURLSessionTask resume](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411121-resume) + void resume() { + _nsObject.resume(); + } + + /// Suspends a task (prevents it from transfering data). + /// + /// See [NSURLSessionTask suspend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411565-suspend) + void suspend() { + _nsObject.suspend(); + } + + /// The current state of the task. + /// + /// See [NSURLSessionTask.state](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1409888-state) + URLSessionTaskState get state => URLSessionTaskState.values[_nsObject.state]; + + /// The relative priority [0, 1] that the host should use to handle the + /// request. + /// + /// See [NSURLSessionTask.priority](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410569-priority) + double get priority => _nsObject.priority; + + /// The relative priority [0, 1] that the host should use to handle the + /// request. + /// + /// See [NSURLSessionTask.priority](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410569-priority) + set priority(double value) => _nsObject.priority = value; + + /// The request currently being handled by the task. + /// + /// May be different from [originalRequest] if the server responds with a + /// redirect. + /// + /// See [NSURLSessionTask.currentRequest](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411649-currentrequest) + URLRequest? get currentRequest { + final request = _nsObject.currentRequest; + if (request == null) { + return null; + } else { + return URLRequest._(request); + } + } + + /// The original request associated with the task. + /// + /// May be different from [currentRequest] if the server responds with a + /// redirect. + /// + /// See [NSURLSessionTask.originalRequest](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411572-originalrequest) + URLRequest? get originalRequest { + final request = _nsObject.originalRequest; + if (request == null) { + return null; + } else { + return URLRequest._(request); + } + } + + /// The server response to the request associated with this task. + /// + /// See [NSURLSessionTask.response](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410586-response) + URLResponse? get response { + final nsResponse = _nsObject.response; + if (nsResponse == null) { + return null; + } + return URLResponse._exactURLResponseType(nsResponse); + } + + /// An error indicating why the task failed or `null` on success. + /// + /// See [NSURLSessionTask.error](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1408145-error) + Error? get error { + final error = _nsObject.error; + if (error == null) { + return null; + } else { + return Error._(error); + } + } + + /// The user-assigned description for the task. + /// + /// See [NSURLSessionTask.taskDescription](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1409798-taskdescription) + String get taskDescription => _nsObject.taskDescription.toString(); + + /// The user-assigned description for the task. + /// + /// See [NSURLSessionTask.taskDescription](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1409798-taskdescription) + set taskDescription(String value) => + _nsObject.taskDescription = value.toNSString(linkedLibs); + + /// A unique ID for the [URLSessionTask] in a [URLSession]. + /// + /// See [NSURLSessionTask.taskIdentifier](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411231-taskidentifier) + int get taskIdentifier => _nsObject.taskIdentifier; + + /// The number of content bytes that are expected to be received from the + /// server. + /// + /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410663-countofbytesexpectedtoreceive) + int get countOfBytesExpectedToReceive => + _nsObject.countOfBytesExpectedToReceive; + + /// The number of content bytes that have been received from the server. + /// + /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411581-countofbytesreceived) + int get countOfBytesReceived => _nsObject.countOfBytesReceived; + + /// The number of content bytes that the task expects to send to the server. + /// + /// [NSURLSessionTask.countOfBytesExpectedToSend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411534-countofbytesexpectedtosend) + int get countOfBytesExpectedToSend => _nsObject.countOfBytesExpectedToSend; + + /// Whether the body of the response should be delivered incrementally or not. + /// + /// [NSURLSessionTask.countOfBytesSent](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410444-countofbytessent) + int get countOfBytesSent => _nsObject.countOfBytesSent; + + /// Whether the body of the response should be delivered incrementally or not. + /// + /// [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) + bool get prefersIncrementalDelivery => _nsObject.prefersIncrementalDelivery; + + /// Whether the body of the response should be delivered incrementally or not. + /// + /// [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) + set prefersIncrementalDelivery(bool value) => + _nsObject.prefersIncrementalDelivery = value; + + String _toStringHelper(String className) => '[$className ' + 'taskDescription=$taskDescription ' + 'taskIdentifier=$taskIdentifier ' + 'countOfBytesExpectedToReceive=$countOfBytesExpectedToReceive ' + 'countOfBytesReceived=$countOfBytesReceived ' + 'countOfBytesExpectedToSend=$countOfBytesExpectedToSend ' + 'countOfBytesSent=$countOfBytesSent ' + 'priority=$priority ' + 'state=$state ' + 'prefersIncrementalDelivery=$prefersIncrementalDelivery' + ']'; + + @override + String toString() => _toStringHelper('URLSessionTask'); +} + +/// A task associated with downloading a URI to a file. +/// +/// See [NSURLSessionDownloadTask](https://developer.apple.com/documentation/foundation/nsurlsessiondownloadtask) +class URLSessionDownloadTask extends URLSessionTask { + URLSessionDownloadTask._(ncb.NSURLSessionDownloadTask c) : super._(c); + + @override + String toString() => _toStringHelper('URLSessionDownloadTask'); +} + +/// A request to load a URL. +/// +/// See [NSURLRequest](https://developer.apple.com/documentation/foundation/nsurlrequest) +class URLRequest extends _ObjectHolder { + URLRequest._(ncb.NSURLRequest c) : super(c); + + /// Creates a request for a URL. + /// + /// See [NSURLRequest.requestWithURL:](https://developer.apple.com/documentation/foundation/nsurlrequest/1528603-requestwithurl) + factory URLRequest.fromUrl(Uri uri) { + final url = ncb.NSURL + .URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs)); + return URLRequest._(ncb.NSURLRequest.requestWithURL_(linkedLibs, url)); + } + + /// Returns all of the HTTP headers for the request. + /// + /// See [NSURLRequest.allHTTPHeaderFields](https://developer.apple.com/documentation/foundation/nsurlrequest/1418477-allhttpheaderfields) + Map? get allHttpHeaderFields { + if (_nsObject.allHTTPHeaderFields == null) { + return null; + } else { + final headers = ncb.NSDictionary.castFrom(_nsObject.allHTTPHeaderFields!); + return stringDictToMap(headers); + } + } + + // Controls how to deal with caching for the request. + // + // See [NSURLSession.cachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequest/1407944-cachepolicy) + URLRequestCachePolicy get cachePolicy => + URLRequestCachePolicy.values[_nsObject.cachePolicy]; + + /// The body of the request. + /// + /// See [NSURLRequest.HTTPBody](https://developer.apple.com/documentation/foundation/nsurlrequest/1411317-httpbody) + Data? get httpBody { + final body = _nsObject.HTTPBody; + if (body == null) { + return null; + } + return Data._(ncb.NSData.castFrom(body)); + } + + /// The HTTP request method (e.g. 'GET'). + /// + /// See [NSURLRequest.HTTPMethod](https://developer.apple.com/documentation/foundation/nsurlrequest/1413030-httpmethod) + /// + /// NOTE: The documentation for `NSURLRequest.HTTPMethod` says that the + /// property is nullable but, in practice, assigning it to null will produce + /// an error. + String get httpMethod => _nsObject.HTTPMethod!.toString(); + + /// The timeout interval during the connection attempt. + /// + /// See [NSURLSession.timeoutInterval](https://developer.apple.com/documentation/foundation/nsurlrequest/1418229-timeoutinterval) + Duration get timeoutInterval => Duration( + microseconds: + (_nsObject.timeoutInterval * Duration.microsecondsPerSecond).round()); + + /// The requested URL. + /// + /// See [URLRequest.URL](https://developer.apple.com/documentation/foundation/nsurlrequest/1408996-url) + Uri? get url { + final nsUrl = _nsObject.URL; + if (nsUrl == null) { + return null; + } + return Uri.parse(nsUrl.absoluteString!.toString()); + } + + @override + String toString() => '[URLRequest ' + 'allHttpHeaderFields=$allHttpHeaderFields ' + 'cachePolicy=$cachePolicy ' + 'httpBody=$httpBody ' + 'httpMethod=$httpMethod ' + 'timeoutInterval=$timeoutInterval ' + 'url=$url ' + ']'; +} + +/// A mutable request to load a URL. +/// +/// See [NSMutableURLRequest](https://developer.apple.com/documentation/foundation/nsmutableurlrequest) +class MutableURLRequest extends URLRequest { + final ncb.NSMutableURLRequest _mutableUrlRequest; + + MutableURLRequest._(ncb.NSMutableURLRequest c) + : _mutableUrlRequest = c, + super._(c); + + /// Creates a request for a URL. + /// + /// See [NSMutableURLRequest.requestWithURL:](https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1414617-allhttpheaderfields) + factory MutableURLRequest.fromUrl(Uri uri) { + final url = ncb.NSURL + .URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs)); + return MutableURLRequest._( + ncb.NSMutableURLRequest.requestWithURL_(linkedLibs, url)); + } + + set cachePolicy(URLRequestCachePolicy value) => + _mutableUrlRequest.cachePolicy = value.index; + + set httpBody(Data? data) { + _mutableUrlRequest.HTTPBody = data?._nsObject; + } + + set httpMethod(String method) { + _mutableUrlRequest.HTTPMethod = method.toNSString(linkedLibs); + } + + set timeoutInterval(Duration interval) { + _mutableUrlRequest.timeoutInterval = + interval.inMicroseconds.toDouble() / Duration.microsecondsPerSecond; + } + + /// Set the value of a header field. + /// + /// See [NSMutableURLRequest setValue:forHTTPHeaderField:](https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1408793-setvalue) + void setValueForHttpHeaderField(String value, String field) { + _mutableUrlRequest.setValue_forHTTPHeaderField_( + field.toNSString(linkedLibs), value.toNSString(linkedLibs)); + } + + @override + String toString() => '[MutableURLRequest ' + 'allHttpHeaderFields=$allHttpHeaderFields ' + 'cachePolicy=$cachePolicy ' + 'httpBody=$httpBody ' + 'httpMethod=$httpMethod ' + 'timeoutInterval=$timeoutInterval ' + 'url=$url ' + ']'; +} + +/// Setup delegation for the given [task] to the given methods. +/// +/// Specifically, this causes the Objective-C-implemented delegate installed +/// with +/// [sessionWithConfiguration:delegate:delegateQueue:](https://developer.apple.com/documentation/foundation/nsurlsession/1411597-sessionwithconfiguration) +/// to send a [ncb.CUPHTTPForwardedDelegate] object to a send port, which is +/// then processed by [_setupDelegation] and forwarded to the given methods. +void _setupDelegation( + ncb.CUPHTTPClientDelegate delegate, URLSession session, URLSessionTask task, + {URLRequest? Function(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest newRequest)? + onRedirect, + URLSessionResponseDisposition Function( + URLSession session, URLSessionTask task, URLResponse response)? + onResponse, + void Function(URLSession session, URLSessionTask task, Data error)? onData, + void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? + onFinishedDownloading, + void Function(URLSession session, URLSessionTask task, Error? error)? + onComplete}) { + final responsePort = ReceivePort(); + responsePort.listen((d) { + final message = d as List; + final messageType = message[0]; + final dp = Pointer.fromAddress(message[1] as int); + + final forwardedDelegate = + ncb.CUPHTTPForwardedDelegate.castFromPointer(helperLibs, dp, + // `CUPHTTPForwardedDelegate` was retained in the delegate so it + // only needs to be released. + release: true); + + switch (messageType) { + case ncb.MessageType.RedirectMessage: + final forwardedRedirect = + ncb.CUPHTTPForwardedRedirect.castFrom(forwardedDelegate); + URLRequest? redirectRequest; + + try { + final request = URLRequest._( + ncb.NSURLRequest.castFrom(forwardedRedirect.request!)); + + if (onRedirect == null) { + redirectRequest = request; + break; + } + try { + final response = HTTPURLResponse._( + ncb.NSHTTPURLResponse.castFrom(forwardedRedirect.response!)); + redirectRequest = onRedirect(session, task, response, request); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + } finally { + forwardedRedirect.finishWithRequest_(redirectRequest?._nsObject); + } + break; + case ncb.MessageType.ResponseMessage: + final forwardedResponse = + ncb.CUPHTTPForwardedResponse.castFrom(forwardedDelegate); + var disposition = + URLSessionResponseDisposition.urlSessionResponseCancel; + + try { + if (onResponse == null) { + disposition = URLSessionResponseDisposition.urlSessionResponseAllow; + break; + } + final response = + URLResponse._exactURLResponseType(forwardedResponse.response!); + + try { + disposition = onResponse(session, task, response); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + } finally { + forwardedResponse.finishWithDisposition_(disposition.index); + } + break; + case ncb.MessageType.DataMessage: + final forwardedData = + ncb.CUPHTTPForwardedData.castFrom(forwardedDelegate); + + try { + if (onData == null) { + break; + } + try { + onData(session, task, + Data._(ncb.NSData.castFrom(forwardedData.data!))); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + } finally { + forwardedData.finish(); + } + break; + case ncb.MessageType.FinishedDownloading: + final finishedDownloading = + ncb.CUPHTTPForwardedFinishedDownloading.castFrom(forwardedDelegate); + try { + if (onFinishedDownloading == null) { + break; + } + try { + onFinishedDownloading( + session, + task as URLSessionDownloadTask, + Uri.parse( + finishedDownloading.location!.absoluteString!.toString())); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + } finally { + finishedDownloading.finish(); + } + break; + case ncb.MessageType.CompletedMessage: + final forwardedComplete = + ncb.CUPHTTPForwardedComplete.castFrom(forwardedDelegate); + + try { + if (onComplete == null) { + break; + } + Error? error; + if (forwardedComplete.error != null) { + error = Error._(ncb.NSError.castFrom(forwardedComplete.error!)); + } + try { + onComplete(session, task, error); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + } finally { + forwardedComplete.finish(); + responsePort.close(); + } + break; + } + }); + final config = ncb.CUPHTTPTaskConfiguration.castFrom( + ncb.CUPHTTPTaskConfiguration.alloc(helperLibs) + .initWithPort_(responsePort.sendPort.nativePort)); + + delegate.registerTask_withConfiguration_(task._nsObject, config); +} + +/// A client that can make network requests to a server. +/// +/// See [NSURLSession](https://developer.apple.com/documentation/foundation/nsurlsession) +class URLSession extends _ObjectHolder { + // Provide our own native delegate to `NSURLSession` because delegates can be + // called on arbitrary threads and Dart code cannot be. + static final _delegate = ncb.CUPHTTPClientDelegate.new1(helperLibs); + + URLRequest? Function(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest newRequest)? _onRedirect; + URLSessionResponseDisposition Function( + URLSession session, URLSessionTask task, URLResponse response)? + _onResponse; + void Function(URLSession session, URLSessionTask task, Data error)? _onData; + void Function(URLSession session, URLSessionTask task, Error? error)? + _onComplete; + void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? + _onFinishedDownloading; + + URLSession._(ncb.NSURLSession c, + {URLRequest? Function(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest newRequest)? + onRedirect, + URLSessionResponseDisposition Function( + URLSession session, URLSessionTask task, URLResponse response)? + onResponse, + void Function(URLSession session, URLSessionTask task, Data error)? + onData, + void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? + onFinishedDownloading, + void Function(URLSession session, URLSessionTask task, Error? error)? + onComplete}) + : _onRedirect = onRedirect, + _onResponse = onResponse, + _onData = onData, + _onFinishedDownloading = onFinishedDownloading, + _onComplete = onComplete, + super(c); + + /// A client with reasonable default behavior. + /// + /// See [NSURLSession.sharedSession](https://developer.apple.com/documentation/foundation/nsurlsession/1409000-sharedsession) + factory URLSession.sharedSession() => URLSession.sessionWithConfiguration( + URLSessionConfiguration.defaultSessionConfiguration()); + + /// A client with a given configuration. + /// + /// If [onRedirect] is set then it will be called whenever a HTTP + /// request returns a redirect response (e.g. 302). The `response` parameter + /// contains the response from the server. The `newRequest` parameter contains + /// a follow-up request that would honor the server's redirect. If the return + /// value of this function is `null` then the redirect will not occur. + /// Otherwise, the returned [URLRequest] (usually `newRequest`) will be + /// executed. [onRedirect] will not be called for background sessions, which + /// automatically follow redirects. See + /// [URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessiontaskdelegate/1411626-urlsession) + /// + /// If [onResponse] is set then it will be called whenever a valid response + /// is received. The returned [URLSessionResponseDisposition] will decide + /// how the content of the response is processed. See + /// [URLSession:dataTask:didReceiveResponse:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessiondatadelegate/1410027-urlsession) + /// + /// If [onData] is set then it will be called whenever response data is + /// received. If the amount of received data is large, then it may be + /// called more than once. See + /// [URLSession:dataTask:didReceiveData:](https://developer.apple.com/documentation/foundation/nsurlsessiondatadelegate/1411528-urlsession) + /// + /// If [onFinishedDownloading] is set then it will be called whenever a + /// [URLSessionDownloadTask] has finished downloading. + /// + /// If [onComplete] is set then it will be called when a task completes. If + /// `error` is `null` then the request completed successfully. See + /// [URLSession:task:didCompleteWithError:](https://developer.apple.com/documentation/foundation/nsurlsessiontaskdelegate/1411610-urlsession) + /// + /// See [sessionWithConfiguration:delegate:delegateQueue:](https://developer.apple.com/documentation/foundation/nsurlsession/1411597-sessionwithconfiguration) + factory URLSession.sessionWithConfiguration(URLSessionConfiguration config, + {URLRequest? Function(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest newRequest)? + onRedirect, + URLSessionResponseDisposition Function( + URLSession session, URLSessionTask task, URLResponse response)? + onResponse, + void Function(URLSession session, URLSessionTask task, Data error)? + onData, + void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? + onFinishedDownloading, + void Function(URLSession session, URLSessionTask task, Error? error)? + onComplete}) { + // Avoid the complexity of simultaneous or out-of-order delegate callbacks + // by only allowing callbacks to execute sequentially. + // See https://developer.apple.com/forums/thread/47252 + // NOTE: this is likely to reduce throughput when there are multiple + // requests in flight because each call to a delegate waits on a lock + // that is unlocked by Dart code. + final queue = ncb.NSOperationQueue.new1(linkedLibs) + ..maxConcurrentOperationCount = 1 + ..name = + 'cupertino_http.NSURLSessionDelegateQueue'.toNSString(linkedLibs); + + return URLSession._( + ncb.NSURLSession.sessionWithConfiguration_delegate_delegateQueue_( + linkedLibs, config._nsObject, _delegate, queue), + onRedirect: onRedirect, + onResponse: onResponse, + onData: onData, + onFinishedDownloading: onFinishedDownloading, + onComplete: onComplete); + } + // A **copy** of the configuration for this sesion. + // + // See [NSURLSession.configuration](https://developer.apple.com/documentation/foundation/nsurlsession/1411477-configuration) + URLSessionConfiguration get configuration => URLSessionConfiguration._( + ncb.NSURLSessionConfiguration.castFrom(_nsObject.configuration!)); + + // Create a [URLSessionTask] that accesses a server URL. + // + // See [NSURLSession dataTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/1410592-datataskwithrequest) + URLSessionTask dataTaskWithRequest(URLRequest request) { + final task = + URLSessionTask._(_nsObject.dataTaskWithRequest_(request._nsObject)); + _setupDelegation(_delegate, this, task, + onComplete: _onComplete, + onData: _onData, + onFinishedDownloading: _onFinishedDownloading, + onRedirect: _onRedirect, + onResponse: _onResponse); + return task; + } + + /// Creates a [URLSessionTask] that accesses a server URL and calls + /// [completion] when done. + /// + /// See [NSURLSession dataTaskWithRequest:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsession/1407613-datataskwithrequest) + URLSessionTask dataTaskWithCompletionHandler( + URLRequest request, + void Function(Data? data, HTTPURLResponse? response, Error? error) + completion) { + // This method cannot be implemented by simply calling + // `dataTaskWithRequest:completionHandler:` because the completion handler + // will invoke the Dart callback on an arbitrary thread and Dart code + // cannot be run that way + // (see https://github.com/dart-lang/sdk/issues/37022). + // + // Instead, we use `dataTaskWithRequest:` and: + // 1. create a port to receive information about the request. + // 2. use a delegate to send information about the task to the port + // 3. call the user-provided completion function when we receive the + // `CompletedMessage` message type. + final task = + URLSessionTask._(_nsObject.dataTaskWithRequest_(request._nsObject)); + + HTTPURLResponse? finalResponse; + MutableData? allData; + + _setupDelegation(_delegate, this, task, onRedirect: _onRedirect, onResponse: + (URLSession session, URLSessionTask task, URLResponse response) { + finalResponse = + HTTPURLResponse._(ncb.NSHTTPURLResponse.castFrom(response._nsObject)); + return URLSessionResponseDisposition.urlSessionResponseAllow; + }, onData: (URLSession session, URLSessionTask task, Data data) { + allData ??= MutableData.empty(); + allData!.appendBytes(data.bytes); + }, onComplete: (URLSession session, URLSessionTask task, Error? error) { + completion(allData == null ? null : Data.fromData(allData!), + finalResponse, error); + }); + + return URLSessionTask._(task._nsObject); + } + + /// Creates a [URLSessionDownloadTask] that downloads the data from a server + /// URL. + /// + /// Provide a `onFinishedDownloading` handler in the [URLSession] factory to + /// receive notifications when the data has completed downloaded. + /// + /// See [NSURLSession downloadTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/1411481-downloadtaskwithrequest) + URLSessionDownloadTask downloadTaskWithRequest(URLRequest request) { + final task = URLSessionDownloadTask._( + _nsObject.downloadTaskWithRequest_(request._nsObject)); + _setupDelegation(_delegate, this, task, + onComplete: _onComplete, + onData: _onData, + onFinishedDownloading: _onFinishedDownloading, + onRedirect: _onRedirect, + onResponse: _onResponse); + return task; + } +} diff --git a/pkgs/cupertino_http/lib/cupertino_client.dart b/pkgs/cupertino_http/lib/src/cupertino_client.dart similarity index 99% rename from pkgs/cupertino_http/lib/cupertino_client.dart rename to pkgs/cupertino_http/lib/src/cupertino_client.dart index 7d1c12bac9..b41f29e30b 100644 --- a/pkgs/cupertino_http/lib/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_client.dart @@ -11,7 +11,7 @@ import 'dart:typed_data'; import 'package:http/http.dart'; -import 'cupertino_http.dart'; +import 'cupertino_api.dart'; class _TaskTracker { final responseCompleter = Completer(); diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 18e6acac51..a0f85dc41b 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.0.11 +version: 0.1.0 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: From bd4f93b6362c0e3d4ba791bbca742804ce6dcb59 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 25 Jan 2023 13:28:53 -0800 Subject: [PATCH 198/448] Create a `package:cronet_http/cronet_http.dart` import (#859) --- pkgs/cronet_http/CHANGELOG.md | 5 ++ .../example/integration_test/client_test.dart | 2 +- .../cronet_configuration_test.dart | 2 +- pkgs/cronet_http/example/lib/main.dart | 2 +- pkgs/cronet_http/lib/cronet_http.dart | 58 +++++++++++++++++++ .../lib/{ => src}/cronet_client.dart | 2 +- pkgs/cronet_http/pubspec.yaml | 2 +- 7 files changed, 68 insertions(+), 5 deletions(-) create mode 100644 pkgs/cronet_http/lib/cronet_http.dart rename pkgs/cronet_http/lib/{ => src}/cronet_client.dart (99%) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 9bdf83667b..2f1568ede8 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.2.0 + +* Restructure `package:cronet_http` to offer a + `package:cronet_http/cronet_http.dart` import. + ## 0.1.2 * Fix a NPE that occurs when an error occurs before a response is received. diff --git a/pkgs/cronet_http/example/integration_test/client_test.dart b/pkgs/cronet_http/example/integration_test/client_test.dart index ad752bf249..379811cac0 100644 --- a/pkgs/cronet_http/example/integration_test/client_test.dart +++ b/pkgs/cronet_http/example/integration_test/client_test.dart @@ -2,7 +2,7 @@ // for details. 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:cronet_http/cronet_client.dart'; +import 'package:cronet_http/cronet_http.dart'; import 'package:http/http.dart'; import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; import 'package:integration_test/integration_test.dart'; diff --git a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart index 272861153b..fc2747d18e 100644 --- a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart +++ b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart @@ -6,7 +6,7 @@ import 'dart:io'; -import 'package:cronet_http/cronet_client.dart'; +import 'package:cronet_http/cronet_http.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index ac0b576f73..fdbc6b999f 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -6,7 +6,7 @@ import 'dart:convert'; import 'dart:io'; import 'package:cached_network_image/cached_network_image.dart'; -import 'package:cronet_http/cronet_client.dart'; +import 'package:cronet_http/cronet_http.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; diff --git a/pkgs/cronet_http/lib/cronet_http.dart b/pkgs/cronet_http/lib/cronet_http.dart new file mode 100644 index 0000000000..e4f49c3508 --- /dev/null +++ b/pkgs/cronet_http/lib/cronet_http.dart @@ -0,0 +1,58 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// An Android Flutter plugin that provides access to the +/// [Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) +/// HTTP client. +/// +/// ``` +/// import 'package:cronet_http/cronet_http.dart'; +/// +/// void main() async { +/// var client = CronetClient(); +/// final response = await client.get( +/// Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'})); +/// if (response.statusCode != 200) { +/// throw HttpException('bad response: ${response.statusCode}'); +/// } +/// +/// final decodedResponse = +/// jsonDecode(utf8.decode(response.bodyBytes)) as Map; +/// +/// final itemCount = decodedResponse['totalItems']; +/// print('Number of books about http: $itemCount.'); +/// for (var i = 0; i < min(itemCount, 10); ++i) { +/// print(decodedResponse['items'][i]['volumeInfo']['title']); +/// } +/// } +/// ``` +/// +/// [CronetClient] is an implementation of the `package:http` [Client], +/// which means that it can easily used conditionally based on the current +/// platform. +/// +/// ``` +/// void main() { +/// var clientFactory = Client.new; // Constructs the default client. +/// if (Platform.isAndroid) { +/// Future? engine; +/// clientFactory = () { +/// engine ??= CronetEngine.build( +/// cacheMode: CacheMode.memory, userAgent: 'MyAgent'); +/// return CronetClient.fromCronetEngineFuture(engine!); +/// }; +/// } +/// runWithClient(() => runApp(const MyFlutterApp()), clientFactory); +/// } +/// ``` +/// +/// After the above setup, calling [Client] methods or any of the +/// `package:http` convenient functions (e.g. [get]) will result in +/// [CronetClient] being used on Android. + +import 'package:http/http.dart'; + +import 'src/cronet_client.dart'; + +export 'src/cronet_client.dart'; diff --git a/pkgs/cronet_http/lib/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart similarity index 99% rename from pkgs/cronet_http/lib/cronet_client.dart rename to pkgs/cronet_http/lib/src/cronet_client.dart index 2174dbc295..7979f49f5f 100644 --- a/pkgs/cronet_http/lib/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -17,7 +17,7 @@ import 'dart:async'; import 'package:flutter/services.dart'; import 'package:http/http.dart'; -import 'src/messages.dart' as messages; +import 'messages.dart' as messages; late final _api = messages.HttpApi(); diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index a0702eef78..3313541f07 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.1.2 +version: 0.2.0 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: From 6b3e884a2200c5c60b2b4a35c0cb2acdde9baffb Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 1 Feb 2023 09:48:13 -0800 Subject: [PATCH 199/448] Latest CI actions (#862) --- .github/workflows/dart.yml | 52 +++++++++++++++++++------------------- tool/ci.sh | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 06a47151bb..6724ebbd48 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.4.2 +# Created with package:mono_repo v6.5.0 name: Dart CI on: push: @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -29,14 +29,14 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: stable - id: checkout name: Checkout repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - name: mono_repo self validate - run: dart pub global activate mono_repo 6.4.2 + run: dart pub global activate mono_repo 6.5.0 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" @@ -54,12 +54,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: "2.14.0" - id: checkout name: Checkout repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -83,7 +83,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" @@ -93,12 +93,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -122,7 +122,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:format" @@ -132,12 +132,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -161,7 +161,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_1" @@ -171,12 +171,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: "2.14.0" - id: checkout name: Checkout repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -196,7 +196,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_0" @@ -206,12 +206,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: "2.14.0" - id: checkout name: Checkout repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -231,7 +231,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_1" @@ -241,12 +241,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -266,7 +266,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 + uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_0" @@ -276,12 +276,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade diff --git a/tool/ci.sh b/tool/ci.sh index 39f3e583c4..74eeca90ec 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.4.2 +# Created with package:mono_repo v6.5.0 # Support built in commands on windows out of the box. # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") From 7e35df24997017993f1dfce08159fa8405a7448f Mon Sep 17 00:00:00 2001 From: Sigurd Meldgaard Date: Tue, 7 Feb 2023 16:31:15 +0100 Subject: [PATCH 200/448] Remove dependency on package:path (#865) --- pkgs/http/CHANGELOG.md | 1 + pkgs/http/lib/src/multipart_file_io.dart | 4 ++-- pkgs/http/pubspec.yaml | 1 - pkgs/http/test/io/multipart_test.dart | 7 +++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index efa70a7b46..1f82be94c7 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.13.6-dev * `BrowserClient` throws an exception if `send` is called after `close`. +* No longer depends on package:path. ## 0.13.5 diff --git a/pkgs/http/lib/src/multipart_file_io.dart b/pkgs/http/lib/src/multipart_file_io.dart index 1eaa918a2a..fdb1071355 100644 --- a/pkgs/http/lib/src/multipart_file_io.dart +++ b/pkgs/http/lib/src/multipart_file_io.dart @@ -5,14 +5,14 @@ import 'dart:io'; import 'package:http_parser/http_parser.dart'; -import 'package:path/path.dart' as p; import 'byte_stream.dart'; import 'multipart_file.dart'; Future multipartFileFromPath(String field, String filePath, {String? filename, MediaType? contentType}) async { - filename ??= p.basename(filePath); + late var segments = Uri.file(filePath).pathSegments; + filename ??= segments.isEmpty ? '' : segments.last; var file = File(filePath); var length = await file.length(); var stream = ByteStream(file.openRead()); diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 3280d0fd66..f084d767fc 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -10,7 +10,6 @@ dependencies: async: ^2.5.0 http_parser: ^4.0.0 meta: ^1.3.0 - path: ^1.8.0 dev_dependencies: fake_async: ^1.2.0 diff --git a/pkgs/http/test/io/multipart_test.dart b/pkgs/http/test/io/multipart_test.dart index 070ea5f3df..910fa762ba 100644 --- a/pkgs/http/test/io/multipart_test.dart +++ b/pkgs/http/test/io/multipart_test.dart @@ -7,7 +7,6 @@ import 'dart:io'; import 'package:http/http.dart' as http; -import 'package:path/path.dart' as path; import 'package:test/test.dart'; import '../utils.dart'; @@ -21,9 +20,9 @@ void main() { tearDown(() => tempDir.deleteSync(recursive: true)); test('with a file from disk', () async { - var filePath = path.join(tempDir.path, 'test-file'); - File(filePath).writeAsStringSync('hello'); - var file = await http.MultipartFile.fromPath('file', filePath); + var fileUri = tempDir.uri.resolve('test-file'); + File.fromUri(fileUri).writeAsStringSync('hello'); + var file = await http.MultipartFile.fromPath('file', fileUri.toFilePath()); var request = http.MultipartRequest('POST', dummyUrl); request.files.add(file); From 3a1afabcdaa6a01ed56c47bc528d3c477a26447d Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 17 Feb 2023 10:07:11 +0800 Subject: [PATCH 201/448] =?UTF-8?q?=E2=9C=A8=20Add=20Cronet=20embedded=20t?= =?UTF-8?q?ool=20(#853)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/cronet_http/README_EMBEDDED.md | 12 ++ pkgs/cronet_http/pubspec.yaml | 2 + .../tool/prepare_for_embedded.dart | 104 ++++++++++++++++++ pkgs/cronet_http/{ => tool}/run_pigeon.sh | 1 + 4 files changed, 119 insertions(+) create mode 100644 pkgs/cronet_http/README_EMBEDDED.md create mode 100644 pkgs/cronet_http/tool/prepare_for_embedded.dart rename pkgs/cronet_http/{ => tool}/run_pigeon.sh (97%) mode change 100755 => 100644 diff --git a/pkgs/cronet_http/README_EMBEDDED.md b/pkgs/cronet_http/README_EMBEDDED.md new file mode 100644 index 0000000000..ebc84ded77 --- /dev/null +++ b/pkgs/cronet_http/README_EMBEDDED.md @@ -0,0 +1,12 @@ +An Android Flutter plugin that provides access to the +[Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) +HTTP client. + +This package is identical to [`package:cronet_http`](https://pub.dev/packages/cronet_http) +except that it embeds +[Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) +rather than using the version included with +[Google Play Services](https://developers.google.com/android/guides/overview). +This increases the uncompressed size of the application by approximately 8MB. + +See more details about cronet_http at: https://pub.dev/packages/cronet_http. diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 3313541f07..16b63a301d 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -16,6 +16,8 @@ dependencies: dev_dependencies: lints: ^1.0.0 pigeon: ^3.2.3 + xml: ^6.1.0 + yaml_edit: ^2.0.3 flutter: plugin: diff --git a/pkgs/cronet_http/tool/prepare_for_embedded.dart b/pkgs/cronet_http/tool/prepare_for_embedded.dart new file mode 100644 index 0000000000..89dce19ef0 --- /dev/null +++ b/pkgs/cronet_http/tool/prepare_for_embedded.dart @@ -0,0 +1,104 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// The cronet_http directory is used to produce two packages: +/// - `cronet_http`, which uses the Google Play Services version of Cronet. +/// - `cronet_http_embedded`, which embeds Cronet. +/// +/// The default configuration of this code is to use the +/// Google Play Services version of Cronet. +/// +/// The script transforms the configuration into one that embeds Cronet by: +/// 1. Modifying the Gradle build file to reference the embedded Cronet. +/// 2. Modifying the *name* and *description* in `pubspec.yaml`. +/// 3. Replacing `README.md` with `README_EMBEDDED.md`. +/// +/// After running this script, `flutter pub publish` +/// can be run to update package:cronet_http_embedded. +/// +/// NOTE: This script modifies the above files in place. + +import 'dart:io'; + +import 'package:http/http.dart' as http; +import 'package:xml/xml.dart'; +import 'package:yaml_edit/yaml_edit.dart'; + +late final Directory _packageDirectory; + +const _gmsDependencyName = 'com.google.android.gms:play-services-cronet'; +const _embeddedDependencyName = 'org.chromium.net:cronet-embedded'; +const _packageName = 'cronet_http_embedded'; +const _packageDescription = 'An Android Flutter plugin that ' + 'provides access to the Cronet HTTP client. ' + 'Identical to package:cronet_http except that it embeds Cronet ' + 'rather than relying on Google Play Services.'; +final _cronetVersionUri = Uri.https( + 'dl.google.com', + 'android/maven2/org/chromium/net/group-index.xml', +); + +void main() async { + if (Directory.current.path.endsWith('tool')) { + _packageDirectory = Directory.current.parent; + } else { + _packageDirectory = Directory.current; + } + + final latestVersion = await _getLatestCronetVersion(); + updateCronetDependency(latestVersion); + updatePubSpec(); + updateReadme(); +} + +Future _getLatestCronetVersion() async { + final response = await http.get(_cronetVersionUri); + final parsedXml = XmlDocument.parse(response.body); + final embeddedNode = parsedXml.children + .singleWhere((e) => e is XmlElement) + .children + .singleWhere((e) => e is XmlElement && e.name.local == 'cronet-embedded'); + final stableVersionReg = RegExp(r'^\d+.\d+.\d+$'); + final versions = embeddedNode.attributes + .singleWhere((e) => e.name.local == 'versions') + .value + .split(',') + .where((e) => stableVersionReg.stringMatch(e) == e); + return versions.last; +} + +/// Update android/build.gradle +void updateCronetDependency(String latestVersion) { + final fBuildGradle = File('${_packageDirectory.path}/android/build.gradle'); + final gradleContent = fBuildGradle.readAsStringSync(); + final implementationRegExp = RegExp( + '^\\s*implementation [\'"]' + '$_gmsDependencyName' + ':\\d+.\\d+.\\d+[\'"]', + multiLine: true, + ); + final newImplementation = '$_embeddedDependencyName:$latestVersion'; + print('Patching $newImplementation'); + final newGradleContent = gradleContent.replaceAll( + implementationRegExp, + ' implementation $newImplementation', + ); + fBuildGradle.writeAsStringSync(newGradleContent); +} + +/// Update pubspec.yaml +void updatePubSpec() { + final fPubspec = File('${_packageDirectory.path}/pubspec.yaml'); + final yamlEditor = YamlEditor(fPubspec.readAsStringSync()) + ..update(['name'], _packageName) + ..update(['description'], _packageDescription); + fPubspec.writeAsStringSync(yamlEditor.toString()); +} + +/// Move README_EMBEDDED.md to replace README.md +void updateReadme() { + File('${_packageDirectory.path}/README.md').deleteSync(); + File('${_packageDirectory.path}/README_EMBEDDED.md') + .renameSync('${_packageDirectory.path}/README.md'); +} diff --git a/pkgs/cronet_http/run_pigeon.sh b/pkgs/cronet_http/tool/run_pigeon.sh old mode 100755 new mode 100644 similarity index 97% rename from pkgs/cronet_http/run_pigeon.sh rename to pkgs/cronet_http/tool/run_pigeon.sh index 188a29cad2..d147e02992 --- a/pkgs/cronet_http/run_pigeon.sh +++ b/pkgs/cronet_http/tool/run_pigeon.sh @@ -1,6 +1,7 @@ #!/bin/sh # Generate the platform messages used by cronet_http. +cd ../ flutter pub run pigeon \ --input pigeons/messages.dart \ From 61cb281a27d3f04f2e066fe252a1590590dd2e11 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 21 Feb 2023 10:24:26 -0800 Subject: [PATCH 202/448] Add a link to cronet_http_embedded from cronet_http. (#874) --- pkgs/cronet_http/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/cronet_http/README.md b/pkgs/cronet_http/README.md index 1b591ada2c..0238eb6d63 100644 --- a/pkgs/cronet_http/README.md +++ b/pkgs/cronet_http/README.md @@ -5,6 +5,14 @@ HTTP client. Cronet is available as part of [Google Play Services](https://developers.google.com/android/guides/overview). +This package depends on +[Google Play Services](https://developers.google.com/android/guides/overview) +for its Cronet implementation. +[`package:cronet_http_embedded`](https://pub.dev/packages/cronet_http_embedded) +is functionally identical to this package but embeds Cronet directly instead +of relying on +[Google Play Services](https://developers.google.com/android/guides/overview). + ## Status: Experimental **NOTE**: This package is currently experimental and published under the From 3cdd4ac275adc44a9fba2b7318b6599a5fd09eee Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Thu, 23 Feb 2023 07:09:06 -0800 Subject: [PATCH 203/448] contribute a pull request labeler workflow (#875) --- .github/labeler.yml | 16 ++++++++++++++++ .github/workflows/pull_request_label.yml | 22 ++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/pull_request_label.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..7ac52cec78 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,16 @@ +# Configuration for .github/workflows/pull_request_label.yml. + +'infra': + - '.github/**' + +'package:cronet_http': + - 'pkgs/cronet_http/**' + +'package:cupertino_http': + - 'pkgs/cupertino_http/**' + +'package:http': + - 'pkgs/http/**' + +'package:http_client_conformance_tests': + - 'pkgs/http_client_conformance_tests/**' diff --git a/.github/workflows/pull_request_label.yml b/.github/workflows/pull_request_label.yml new file mode 100644 index 0000000000..26758a596e --- /dev/null +++ b/.github/workflows/pull_request_label.yml @@ -0,0 +1,22 @@ +# This workflow applies labels to pull requests based on the paths that are +# modified in the pull request. +# +# Edit `.github/labeler.yml` to configure labels. For more information, see +# https://github.com/actions/labeler. + +name: Pull Request Labeler +permissions: read-all + +on: + pull_request_target + +jobs: + label: + permissions: + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@5c7539237e04b714afd8ad9b4aed733815b9fab4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true From 2583d2324ae9d2ec9e9ed1b9b26c7c784e0fd1bb Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 27 Feb 2023 12:13:54 -0800 Subject: [PATCH 204/448] Provide access to NSURLSession.sessionDescription (#881) --- pkgs/cupertino_http/CHANGELOG.md | 4 ++++ .../integration_test/url_session_test.dart | 7 +++++++ .../cupertino_http/lib/src/cupertino_api.dart | 21 +++++++++++++------ pkgs/cupertino_http/pubspec.yaml | 2 +- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 03f1f46cf4..85a04f1569 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.1 + +* Add a `URLSession.sessionDescription` field. + ## 0.1.0 * Restructure `package:cupertino_http` to offer a single `import`. diff --git a/pkgs/cupertino_http/example/integration_test/url_session_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_test.dart index 70505238b6..3bed931e95 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_test.dart @@ -185,6 +185,13 @@ void testURLSession(URLSession session) { server.close(); }); + test('sessionDescription', () async { + session.sessionDescription = null; + expect(session.sessionDescription, null); + session.sessionDescription = 'Happy Days!'; + expect(session.sessionDescription, 'Happy Days!'); + }); + test('dataTask', () async { final task = session.dataTaskWithRequest( URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index e70b93ba82..1c6125d012 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -1067,15 +1067,24 @@ class URLSession extends _ObjectHolder { onFinishedDownloading: onFinishedDownloading, onComplete: onComplete); } - // A **copy** of the configuration for this sesion. - // - // See [NSURLSession.configuration](https://developer.apple.com/documentation/foundation/nsurlsession/1411477-configuration) + + /// A **copy** of the configuration for this sesion. + /// + /// See [NSURLSession.configuration](https://developer.apple.com/documentation/foundation/nsurlsession/1411477-configuration) URLSessionConfiguration get configuration => URLSessionConfiguration._( ncb.NSURLSessionConfiguration.castFrom(_nsObject.configuration!)); - // Create a [URLSessionTask] that accesses a server URL. - // - // See [NSURLSession dataTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/1410592-datataskwithrequest) + /// A description of the session that may be useful for debugging. + /// + /// See [NSURLSession.sessionDescription](https://developer.apple.com/documentation/foundation/nsurlsession/1408277-sessiondescription) + String? get sessionDescription => + toStringOrNull(_nsObject.sessionDescription); + set sessionDescription(String? value) => + _nsObject.sessionDescription = value?.toNSString(linkedLibs); + + /// Create a [URLSessionTask] that accesses a server URL. + /// + /// See [NSURLSession dataTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/1410592-datataskwithrequest) URLSessionTask dataTaskWithRequest(URLRequest request) { final task = URLSessionTask._(_nsObject.dataTaskWithRequest_(request._nsObject)); diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index a0f85dc41b..8f241a74a0 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.1.0 +version: 0.1.1 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: From 970bef482279875a77fc496ad8f42511a15d2b5f Mon Sep 17 00:00:00 2001 From: Bahaa Fathi Yousef Date: Thu, 2 Mar 2023 20:30:08 +0200 Subject: [PATCH 205/448] Corrected the spelling of "Implements" in "/http/lib/src/io_client.dart" (#871) Fixed a spelling error by correcting "Implemenents" to "Implements" in "/http/lib/src/io_client.dart". --- pkgs/http/lib/src/io_client.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/http/lib/src/io_client.dart b/pkgs/http/lib/src/io_client.dart index 9663187300..d5c79cddb9 100644 --- a/pkgs/http/lib/src/io_client.dart +++ b/pkgs/http/lib/src/io_client.dart @@ -17,7 +17,7 @@ BaseClient createClient() => IOClient(); /// Exception thrown when the underlying [HttpClient] throws a /// [SocketException]. /// -/// Implemenents [SocketException] to avoid breaking existing users of +/// Implements [SocketException] to avoid breaking existing users of /// [IOClient] that may catch that exception. class _ClientSocketException extends ClientException implements SocketException { From 572e10bbe64f2659decab55f6b6705ef48bd5191 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 2 Mar 2023 11:23:38 -0800 Subject: [PATCH 206/448] Move to pkg:dart_flutter_team_lints, require Dart 2.19 (#883) --- .github/workflows/cronet.yml | 2 +- .github/workflows/dart.yml | 30 ++++++++--------- analysis_options.yaml | 18 +---------- pkgs/cronet_http/CHANGELOG.md | 4 +++ .../cronet_configuration_test.dart | 1 + pkgs/cronet_http/example/pubspec.yaml | 5 +-- pkgs/cronet_http/lib/cronet_http.dart | 1 + pkgs/cronet_http/lib/src/cronet_client.dart | 3 +- pkgs/cronet_http/lib/src/messages.dart | 24 +++++--------- pkgs/cronet_http/pubspec.yaml | 6 ++-- .../tool/prepare_for_embedded.dart | 1 + pkgs/cupertino_http/CHANGELOG.md | 4 +++ .../example/integration_test/error_test.dart | 1 + pkgs/cupertino_http/example/pubspec.yaml | 4 +-- pkgs/cupertino_http/lib/cupertino_http.dart | 2 ++ .../cupertino_http/lib/src/cupertino_api.dart | 32 +++++++++---------- .../lib/src/cupertino_client.dart | 1 + pkgs/cupertino_http/lib/src/utils.dart | 4 +-- pkgs/cupertino_http/pubspec.yaml | 6 ++-- pkgs/http/CHANGELOG.md | 2 +- pkgs/http/lib/http.dart | 2 ++ pkgs/http/lib/retry.dart | 2 +- pkgs/http/lib/src/byte_stream.dart | 2 +- pkgs/http/lib/src/io_streamed_response.dart | 24 +++++--------- pkgs/http/lib/src/multipart_request.dart | 2 +- pkgs/http/lib/src/request.dart | 5 ++- pkgs/http/lib/src/response.dart | 20 ++++-------- pkgs/http/lib/src/streamed_request.dart | 5 ++- pkgs/http/lib/src/streamed_response.dart | 24 +++++--------- pkgs/http/pubspec.yaml | 4 +-- .../test/html/client_conformance_test.dart | 3 +- pkgs/http/test/html/client_test.dart | 2 ++ .../http/test/html/streamed_request_test.dart | 2 ++ .../http/test/io/client_conformance_test.dart | 3 +- pkgs/http/test/io/client_test.dart | 15 +++++---- pkgs/http/test/io/http_test.dart | 18 +++++------ pkgs/http/test/io/multipart_test.dart | 1 + pkgs/http/test/io/request_test.dart | 1 + pkgs/http/test/io/streamed_request_test.dart | 1 + .../CHANGELOG.md | 3 -- .../bin/generate_server_wrappers.dart | 1 + .../example/client_test.dart | 2 +- .../pubspec.yaml | 7 ++-- 43 files changed, 139 insertions(+), 161 deletions(-) delete mode 100644 pkgs/http_client_conformance_tests/CHANGELOG.md diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index c39affcddf..0b35e16aae 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -36,7 +36,7 @@ jobs: name: Install dependencies run: flutter pub get - name: Check formatting - run: flutter format --output=none --set-exit-if-changed . + run: dart format --output=none --set-exit-if-changed . if: always() && steps.install.outcome == 'success' - name: Analyze code run: flutter analyze --fatal-infos diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 6724ebbd48..b7d92fcd13 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -40,23 +40,23 @@ jobs: - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyze_and_format; Dart 2.14.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" + name: "analyze_and_format; Dart 2.19.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http-pkgs/http_client_conformance_tests - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 + os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http-pkgs/http_client_conformance_tests + os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: - sdk: "2.14.0" + sdk: "2.19.0" - id: checkout name: Checkout repository uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c @@ -157,23 +157,23 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests job_005: - name: "unit_test; Dart 2.14.0; PKG: pkgs/http; `dart test --platform chrome`" + name: "unit_test; Dart 2.19.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 + os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: - sdk: "2.14.0" + sdk: "2.19.0" - id: checkout name: Checkout repository uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c @@ -192,23 +192,23 @@ jobs: - job_003 - job_004 job_006: - name: "unit_test; Dart 2.14.0; PKG: pkgs/http; `dart test --platform vm`" + name: "unit_test; Dart 2.19.0; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:2.14.0 + os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: - sdk: "2.14.0" + sdk: "2.19.0" - id: checkout name: Checkout repository uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c diff --git a/analysis_options.yaml b/analysis_options.yaml index fac854658e..7d741bd4f1 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,4 +1,4 @@ -include: package:lints/recommended.yaml +include: package:dart_flutter_team_lints/analysis_options.yaml analyzer: language: @@ -9,36 +9,20 @@ analyzer: linter: rules: - avoid_bool_literals_in_conditional_expressions - - avoid_catching_errors - avoid_classes_with_only_static_members - - avoid_dynamic_calls - avoid_private_typedef_functions - avoid_returning_this - avoid_unused_constructor_parameters - cascade_invocations - comment_references - - directives_ordering - join_return_with_assignment - - lines_longer_than_80_chars - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - - omit_local_variable_types - - only_throw_errors - - prefer_asserts_in_initializer_lists - prefer_const_constructors - prefer_const_declarations - prefer_expression_function_bodies - prefer_relative_imports - - prefer_single_quotes - - sort_pub_dependencies - test_types_in_equals - - throw_in_finally - - type_annotate_public_apis - - unawaited_futures - - unnecessary_lambdas - - unnecessary_parenthesis - - unnecessary_statements - - use_is_even_rather_than_modulo - use_string_buffers - use_super_parameters diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 2f1568ede8..3be15bc399 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.1-dev + +* Require Dart 2.19 + ## 0.2.0 * Restructure `package:cronet_http` to offer a diff --git a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart index fc2747d18e..b6e7205489 100644 --- a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart +++ b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Tests various [CronetEngine] configurations. +library; import 'dart:io'; diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index d1bf2b7719..b38ebb043b 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -4,7 +4,7 @@ description: Demonstrates how to use the cronet_http plugin. publish_to: 'none' environment: - sdk: ">=2.17.5 <3.0.0" + sdk: ">=2.19.0 <3.0.0" dependencies: cached_network_image: ^3.2.3 @@ -16,13 +16,14 @@ dependencies: http: ^0.13.5 dev_dependencies: - flutter_lints: ^1.0.0 + dart_flutter_team_lints: ^1.0.0 flutter_test: sdk: flutter http_client_conformance_tests: path: ../../http_client_conformance_tests/ integration_test: sdk: flutter + test: ^1.23.1 flutter: uses-material-design: true diff --git a/pkgs/cronet_http/lib/cronet_http.dart b/pkgs/cronet_http/lib/cronet_http.dart index e4f49c3508..e41af71f9e 100644 --- a/pkgs/cronet_http/lib/cronet_http.dart +++ b/pkgs/cronet_http/lib/cronet_http.dart @@ -50,6 +50,7 @@ /// After the above setup, calling [Client] methods or any of the /// `package:http` convenient functions (e.g. [get]) will result in /// [CronetClient] being used on Android. +library; import 'package:http/http.dart'; diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index 7979f49f5f..8799d43166 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -11,6 +11,7 @@ /// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html) /// or /// [`runApp`](https://api.flutter.dev/flutter/widgets/runApp.html). +library; import 'dart:async'; @@ -19,7 +20,7 @@ import 'package:http/http.dart'; import 'messages.dart' as messages; -late final _api = messages.HttpApi(); +final _api = messages.HttpApi(); final Finalizer _cronetEngineFinalizer = Finalizer(_api.freeEngine); diff --git a/pkgs/cronet_http/lib/src/messages.dart b/pkgs/cronet_http/lib/src/messages.dart index 47e0a920e9..8b6c3910f7 100644 --- a/pkgs/cronet_http/lib/src/messages.dart +++ b/pkgs/cronet_http/lib/src/messages.dart @@ -298,29 +298,21 @@ class _HttpApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: - return CreateEngineRequest.decode(readValue(buffer)!); + case 128: return CreateEngineRequest.decode(readValue(buffer)!); - case 129: - return CreateEngineResponse.decode(readValue(buffer)!); + case 129: return CreateEngineResponse.decode(readValue(buffer)!); - case 130: - return EventMessage.decode(readValue(buffer)!); + case 130: return EventMessage.decode(readValue(buffer)!); - case 131: - return ReadCompleted.decode(readValue(buffer)!); + case 131: return ReadCompleted.decode(readValue(buffer)!); - case 132: - return ResponseStarted.decode(readValue(buffer)!); + case 132: return ResponseStarted.decode(readValue(buffer)!); - case 133: - return StartRequest.decode(readValue(buffer)!); + case 133: return StartRequest.decode(readValue(buffer)!); - case 134: - return StartResponse.decode(readValue(buffer)!); + case 134: return StartResponse.decode(readValue(buffer)!); - default: - return super.readValueOfType(type, buffer); + default: return super.readValueOfType(type, buffer); } } } diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 16b63a301d..9745e61a9e 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,11 +1,11 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.2.0 +version: 0.2.1-dev repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: - sdk: ">=2.17.5 <3.0.0" + sdk: ">=2.19.0 <3.0.0" flutter: ">=3.0.0" dependencies: @@ -14,7 +14,7 @@ dependencies: http: ^0.13.4 dev_dependencies: - lints: ^1.0.0 + dart_flutter_team_lints: ^1.0.0 pigeon: ^3.2.3 xml: ^6.1.0 yaml_edit: ^2.0.3 diff --git a/pkgs/cronet_http/tool/prepare_for_embedded.dart b/pkgs/cronet_http/tool/prepare_for_embedded.dart index 89dce19ef0..8791a2f500 100644 --- a/pkgs/cronet_http/tool/prepare_for_embedded.dart +++ b/pkgs/cronet_http/tool/prepare_for_embedded.dart @@ -18,6 +18,7 @@ /// can be run to update package:cronet_http_embedded. /// /// NOTE: This script modifies the above files in place. +library; import 'dart:io'; diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 85a04f1569..6e934a4711 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.2-dev + +* Require Dart 2.19 + ## 0.1.1 * Add a `URLSession.sessionDescription` field. diff --git a/pkgs/cupertino_http/example/integration_test/error_test.dart b/pkgs/cupertino_http/example/integration_test/error_test.dart index 4c7ad63dba..c04af1e9fa 100644 --- a/pkgs/cupertino_http/example/integration_test/error_test.dart +++ b/pkgs/cupertino_http/example/integration_test/error_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @Skip('Error tests cannot currently be written. See comments in this file.') +library; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index 954a9c7022..fd8938989b 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: 'none' version: 1.0.0+1 environment: - sdk: ">=2.17.3 <3.0.0" + sdk: ">=2.19.0 <3.0.0" dependencies: cached_network_image: ^3.2.3 @@ -18,7 +18,7 @@ dependencies: http: ^0.13.5 dev_dependencies: - flutter_lints: ^2.0.0 + dart_flutter_team_lints: ^1.0.0 flutter_test: sdk: flutter http_client_conformance_tests: diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 4fd041ce25..89af0a3c1b 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -74,6 +74,8 @@ /// task.resume(); /// } /// ``` +library; + import 'package:http/http.dart'; import 'src/cupertino_client.dart'; diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 1c6125d012..59d1187803 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -24,6 +24,7 @@ /// task.resume(); /// } /// ``` +library; import 'dart:ffi'; import 'dart:isolate'; @@ -114,7 +115,7 @@ enum URLRequestNetworkService { /// /// See [NSError](https://developer.apple.com/documentation/foundation/nserror) class Error extends _ObjectHolder { - Error._(ncb.NSError c) : super(c); + Error._(super.c); /// The numeric code for the error e.g. -1003 (kCFURLErrorCannotFindHost). /// @@ -161,7 +162,7 @@ class Error extends _ObjectHolder { /// See [NSURLSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration) class URLSessionConfiguration extends _ObjectHolder { - URLSessionConfiguration._(ncb.NSURLSessionConfiguration c) : super(c); + URLSessionConfiguration._(super.c); /// A configuration suitable for performing HTTP uploads and downloads in /// the background. @@ -331,7 +332,7 @@ class URLSessionConfiguration /// /// See [NSData](https://developer.apple.com/documentation/foundation/nsdata) class Data extends _ObjectHolder { - Data._(ncb.NSData c) : super(c); + Data._(super.c); // A new [Data] from an existing one. // @@ -388,9 +389,9 @@ class Data extends _ObjectHolder { class MutableData extends Data { final ncb.NSMutableData _mutableData; - MutableData._(ncb.NSMutableData c) + MutableData._(ncb.NSMutableData super.c) : _mutableData = c, - super._(c); + super._(); /// A new empty [MutableData]. factory MutableData.empty() => @@ -423,7 +424,7 @@ class MutableData extends Data { /// /// See [NSURLResponse](https://developer.apple.com/documentation/foundation/nsurlresponse) class URLResponse extends _ObjectHolder { - URLResponse._(ncb.NSURLResponse c) : super(c); + URLResponse._(super.c); factory URLResponse._exactURLResponseType(ncb.NSURLResponse response) { if (ncb.NSHTTPURLResponse.isInstance(response)) { @@ -455,9 +456,9 @@ class URLResponse extends _ObjectHolder { class HTTPURLResponse extends URLResponse { final ncb.NSHTTPURLResponse _httpUrlResponse; - HTTPURLResponse._(ncb.NSHTTPURLResponse c) + HTTPURLResponse._(ncb.NSHTTPURLResponse super.c) : _httpUrlResponse = c, - super._(c); + super._(); /// The HTTP status code of the response (e.g. 200). /// @@ -495,7 +496,7 @@ enum URLSessionTaskState { /// /// See [NSURLSessionTask](https://developer.apple.com/documentation/foundation/nsurlsessiontask) class URLSessionTask extends _ObjectHolder { - URLSessionTask._(ncb.NSURLSessionTask c) : super(c); + URLSessionTask._(super.c); /// Cancels the task. /// @@ -657,7 +658,7 @@ class URLSessionTask extends _ObjectHolder { /// /// See [NSURLSessionDownloadTask](https://developer.apple.com/documentation/foundation/nsurlsessiondownloadtask) class URLSessionDownloadTask extends URLSessionTask { - URLSessionDownloadTask._(ncb.NSURLSessionDownloadTask c) : super._(c); + URLSessionDownloadTask._(ncb.NSURLSessionDownloadTask super.c) : super._(); @override String toString() => _toStringHelper('URLSessionDownloadTask'); @@ -667,7 +668,7 @@ class URLSessionDownloadTask extends URLSessionTask { /// /// See [NSURLRequest](https://developer.apple.com/documentation/foundation/nsurlrequest) class URLRequest extends _ObjectHolder { - URLRequest._(ncb.NSURLRequest c) : super(c); + URLRequest._(super.c); /// Creates a request for a URL. /// @@ -751,9 +752,9 @@ class URLRequest extends _ObjectHolder { class MutableURLRequest extends URLRequest { final ncb.NSMutableURLRequest _mutableUrlRequest; - MutableURLRequest._(ncb.NSMutableURLRequest c) + MutableURLRequest._(ncb.NSMutableURLRequest super.c) : _mutableUrlRequest = c, - super._(c); + super._(); /// Creates a request for a URL. /// @@ -978,7 +979,7 @@ class URLSession extends _ObjectHolder { void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? _onFinishedDownloading; - URLSession._(ncb.NSURLSession c, + URLSession._(super.c, {URLRequest? Function(URLSession session, URLSessionTask task, HTTPURLResponse response, URLRequest newRequest)? onRedirect, @@ -995,8 +996,7 @@ class URLSession extends _ObjectHolder { _onResponse = onResponse, _onData = onData, _onFinishedDownloading = onFinishedDownloading, - _onComplete = onComplete, - super(c); + _onComplete = onComplete; /// A client with reasonable default behavior. /// diff --git a/pkgs/cupertino_http/lib/src/cupertino_client.dart b/pkgs/cupertino_http/lib/src/cupertino_client.dart index b41f29e30b..45b6afdec2 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_client.dart @@ -4,6 +4,7 @@ /// A [Client] implementation based on the /// [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). +library; import 'dart:async'; import 'dart:io'; diff --git a/pkgs/cupertino_http/lib/src/utils.dart b/pkgs/cupertino_http/lib/src/utils.dart index e0e8a56b13..fa76bafac8 100644 --- a/pkgs/cupertino_http/lib/src/utils.dart +++ b/pkgs/cupertino_http/lib/src/utils.dart @@ -14,7 +14,7 @@ const _libName = _packageName; /// /// The "Foundation" framework is linked to Dart so no additional /// libraries need to be loaded to access those symbols. -late ncb.NativeCupertinoHttp linkedLibs = () { +final ncb.NativeCupertinoHttp linkedLibs = () { if (Platform.isMacOS || Platform.isIOS) { final lib = DynamicLibrary.process(); return ncb.NativeCupertinoHttp(lib); @@ -25,7 +25,7 @@ late ncb.NativeCupertinoHttp linkedLibs = () { /// Access to symbols that are available in the cupertino_http helper shared /// library. -late ncb.NativeCupertinoHttp helperLibs = _loadHelperLibrary(); +final ncb.NativeCupertinoHttp helperLibs = _loadHelperLibrary(); DynamicLibrary _loadHelperDynamicLibrary() { if (Platform.isMacOS || Platform.isIOS) { diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 8f241a74a0..cd107fe350 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,11 +2,11 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.1.1 +version: 0.1.2-dev repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: - sdk: ">=2.16.0 <3.0.0" + sdk: ">=2.19.0 <3.0.0" flutter: ">=3.0.0" dependencies: @@ -17,8 +17,8 @@ dependencies: meta: ^1.7.0 dev_dependencies: + dart_flutter_team_lints: ^1.0.0 ffigen: ^7.2.0 - lints: ^1.0.0 flutter: plugin: diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 1f82be94c7..c11ad7afda 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,7 +1,7 @@ ## 0.13.6-dev * `BrowserClient` throws an exception if `send` is called after `close`. -* No longer depends on package:path. +* Require Dart 2.19 ## 0.13.5 diff --git a/pkgs/http/lib/http.dart b/pkgs/http/lib/http.dart index 34eebbbd0a..62004240c7 100644 --- a/pkgs/http/lib/http.dart +++ b/pkgs/http/lib/http.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// A composable, [Future]-based library for making HTTP requests. +library; + import 'dart:convert'; import 'dart:typed_data'; diff --git a/pkgs/http/lib/retry.dart b/pkgs/http/lib/retry.dart index e2ca33f2a5..a1ae73acbb 100644 --- a/pkgs/http/lib/retry.dart +++ b/pkgs/http/lib/retry.dart @@ -64,7 +64,7 @@ class RetryClient extends BaseClient { RangeError.checkNotNegative(_retries, 'retries'); } - /// Like [new RetryClient], but with a pre-computed list of [delays] + /// Like [RetryClient.new], but with a pre-computed list of [delays] /// between each retry. /// /// This will retry a request at most `delays.length` times, using each delay diff --git a/pkgs/http/lib/src/byte_stream.dart b/pkgs/http/lib/src/byte_stream.dart index eed1472bd0..6f9efca5e3 100644 --- a/pkgs/http/lib/src/byte_stream.dart +++ b/pkgs/http/lib/src/byte_stream.dart @@ -8,7 +8,7 @@ import 'dart:typed_data'; /// A stream of chunks of bytes representing a single piece of data. class ByteStream extends StreamView> { - const ByteStream(Stream> stream) : super(stream); + const ByteStream(super.stream); /// Returns a single-subscription byte stream that will emit the given bytes /// in a single chunk. diff --git a/pkgs/http/lib/src/io_streamed_response.dart b/pkgs/http/lib/src/io_streamed_response.dart index 21744858b3..95b818c2b3 100644 --- a/pkgs/http/lib/src/io_streamed_response.dart +++ b/pkgs/http/lib/src/io_streamed_response.dart @@ -4,7 +4,6 @@ import 'dart:io'; -import 'base_request.dart'; import 'streamed_response.dart'; /// An HTTP response where the response body is received asynchronously after @@ -17,22 +16,15 @@ class IOStreamedResponse extends StreamedResponse { /// [stream] should be a single-subscription stream. /// /// If [inner] is not provided, [detachSocket] will throw. - IOStreamedResponse(Stream> stream, int statusCode, - {int? contentLength, - BaseRequest? request, - Map headers = const {}, - bool isRedirect = false, - bool persistentConnection = true, - String? reasonPhrase, + IOStreamedResponse(super.stream, super.statusCode, + {super.contentLength, + super.request, + super.headers, + super.isRedirect, + super.persistentConnection, + super.reasonPhrase, HttpClientResponse? inner}) - : _inner = inner, - super(stream, statusCode, - contentLength: contentLength, - request: request, - headers: headers, - isRedirect: isRedirect, - persistentConnection: persistentConnection, - reasonPhrase: reasonPhrase); + : _inner = inner; /// Detaches the underlying socket from the HTTP server. /// diff --git a/pkgs/http/lib/src/multipart_request.dart b/pkgs/http/lib/src/multipart_request.dart index 2cb81a1d8a..79525421fb 100644 --- a/pkgs/http/lib/src/multipart_request.dart +++ b/pkgs/http/lib/src/multipart_request.dart @@ -45,7 +45,7 @@ class MultipartRequest extends BaseRequest { /// The list of files to upload for this request. final files = []; - MultipartRequest(String method, Uri url) : super(method, url); + MultipartRequest(super.method, super.url); /// The total length of the request body, in bytes. /// diff --git a/pkgs/http/lib/src/request.dart b/pkgs/http/lib/src/request.dart index bbb8448abe..1c7aa306ba 100644 --- a/pkgs/http/lib/src/request.dart +++ b/pkgs/http/lib/src/request.dart @@ -137,10 +137,9 @@ class Request extends BaseRequest { body = mapToQuery(fields, encoding: encoding); } - Request(String method, Uri url) + Request(super.method, super.url) : _defaultEncoding = utf8, - _bodyBytes = Uint8List(0), - super(method, url); + _bodyBytes = Uint8List(0); /// Freezes all mutable fields and returns a single-subscription [ByteStream] /// containing the request body. diff --git a/pkgs/http/lib/src/response.dart b/pkgs/http/lib/src/response.dart index 01899887a7..1ba7c466cf 100644 --- a/pkgs/http/lib/src/response.dart +++ b/pkgs/http/lib/src/response.dart @@ -42,20 +42,14 @@ class Response extends BaseResponse { reasonPhrase: reasonPhrase); /// Create a new HTTP response with a byte array body. - Response.bytes(List bodyBytes, int statusCode, - {BaseRequest? request, - Map headers = const {}, - bool isRedirect = false, - bool persistentConnection = true, - String? reasonPhrase}) + Response.bytes(List bodyBytes, super.statusCode, + {super.request, + super.headers, + super.isRedirect, + super.persistentConnection, + super.reasonPhrase}) : bodyBytes = toUint8List(bodyBytes), - super(statusCode, - contentLength: bodyBytes.length, - request: request, - headers: headers, - isRedirect: isRedirect, - persistentConnection: persistentConnection, - reasonPhrase: reasonPhrase); + super(contentLength: bodyBytes.length); /// Creates a new HTTP response by waiting for the full body to become /// available from a [StreamedResponse]. diff --git a/pkgs/http/lib/src/streamed_request.dart b/pkgs/http/lib/src/streamed_request.dart index faf3392d17..46519567b9 100644 --- a/pkgs/http/lib/src/streamed_request.dart +++ b/pkgs/http/lib/src/streamed_request.dart @@ -39,9 +39,8 @@ class StreamedRequest extends BaseRequest { final StreamController> _controller; /// Creates a new streaming request. - StreamedRequest(String method, Uri url) - : _controller = StreamController>(sync: true), - super(method, url); + StreamedRequest(super.method, super.url) + : _controller = StreamController>(sync: true); /// Freezes all mutable fields and returns a single-subscription [ByteStream] /// that emits the data being written to [sink]. diff --git a/pkgs/http/lib/src/streamed_response.dart b/pkgs/http/lib/src/streamed_response.dart index e082dced0e..8cc0c76f75 100644 --- a/pkgs/http/lib/src/streamed_response.dart +++ b/pkgs/http/lib/src/streamed_response.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'base_request.dart'; import 'base_response.dart'; import 'byte_stream.dart'; import 'utils.dart'; @@ -18,19 +17,12 @@ class StreamedResponse extends BaseResponse { /// Creates a new streaming response. /// /// [stream] should be a single-subscription stream. - StreamedResponse(Stream> stream, int statusCode, - {int? contentLength, - BaseRequest? request, - Map headers = const {}, - bool isRedirect = false, - bool persistentConnection = true, - String? reasonPhrase}) - : stream = toByteStream(stream), - super(statusCode, - contentLength: contentLength, - request: request, - headers: headers, - isRedirect: isRedirect, - persistentConnection: persistentConnection, - reasonPhrase: reasonPhrase); + StreamedResponse(Stream> stream, super.statusCode, + {super.contentLength, + super.request, + super.headers, + super.isRedirect, + super.persistentConnection, + super.reasonPhrase}) + : stream = toByteStream(stream); } diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index f084d767fc..2f3232a38d 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -4,7 +4,7 @@ description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http environment: - sdk: '>=2.14.0 <3.0.0' + sdk: '>=2.19.0 <3.0.0' dependencies: async: ^2.5.0 @@ -12,10 +12,10 @@ dependencies: meta: ^1.3.0 dev_dependencies: + dart_flutter_team_lints: ^1.0.0 fake_async: ^1.2.0 http_client_conformance_tests: path: ../http_client_conformance_tests/ - lints: '>=1.0.0 <3.0.0' shelf: ^1.1.0 stream_channel: ^2.1.0 test: ^1.16.0 diff --git a/pkgs/http/test/html/client_conformance_test.dart b/pkgs/http/test/html/client_conformance_test.dart index ab33294efb..1a94a551c2 100644 --- a/pkgs/http/test/html/client_conformance_test.dart +++ b/pkgs/http/test/html/client_conformance_test.dart @@ -3,13 +3,14 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('browser') +library; import 'package:http/browser_client.dart'; import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; import 'package:test/test.dart'; void main() { - testAll(() => BrowserClient(), + testAll(BrowserClient.new, redirectAlwaysAllowed: true, canStreamRequestBody: false, canStreamResponseBody: false); diff --git a/pkgs/http/test/html/client_test.dart b/pkgs/http/test/html/client_test.dart index 24b20dc0e0..b56b228518 100644 --- a/pkgs/http/test/html/client_test.dart +++ b/pkgs/http/test/html/client_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('browser') +library; + import 'package:http/browser_client.dart'; import 'package:http/http.dart' as http; import 'package:test/test.dart'; diff --git a/pkgs/http/test/html/streamed_request_test.dart b/pkgs/http/test/html/streamed_request_test.dart index d4d495836a..c7671734b6 100644 --- a/pkgs/http/test/html/streamed_request_test.dart +++ b/pkgs/http/test/html/streamed_request_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('browser') +library; + import 'package:http/browser_client.dart'; import 'package:http/http.dart' as http; import 'package:test/test.dart'; diff --git a/pkgs/http/test/io/client_conformance_test.dart b/pkgs/http/test/io/client_conformance_test.dart index 5eb2de676a..5d8f7f598d 100644 --- a/pkgs/http/test/io/client_conformance_test.dart +++ b/pkgs/http/test/io/client_conformance_test.dart @@ -3,11 +3,12 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('vm') +library; import 'package:http/io_client.dart'; import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; import 'package:test/test.dart'; void main() { - testAll(() => IOClient()); + testAll(IOClient.new); } diff --git a/pkgs/http/test/io/client_test.dart b/pkgs/http/test/io/client_test.dart index 60903ddb93..e493931802 100644 --- a/pkgs/http/test/io/client_test.dart +++ b/pkgs/http/test/io/client_test.dart @@ -3,6 +3,8 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('vm') +library; + import 'dart:convert'; import 'dart:io'; @@ -149,12 +151,12 @@ void main() { }); test('runWithClient', () { - final client = http.runWithClient(() => http.Client(), () => TestClient()); + final client = http.runWithClient(http.Client.new, TestClient.new); expect(client, isA()); }); test('runWithClient Client() return', () { - final client = http.runWithClient(() => http.Client(), () => http.Client()); + final client = http.runWithClient(http.Client.new, http.Client.new); expect(client, isA()); }); @@ -162,10 +164,9 @@ void main() { late final http.Client client; late final http.Client nestedClient; http.runWithClient(() { - http.runWithClient( - () => nestedClient = http.Client(), () => TestClient2()); + http.runWithClient(() => nestedClient = http.Client(), TestClient2.new); client = http.Client(); - }, () => TestClient()); + }, TestClient.new); expect(client, isA()); expect(nestedClient, isA()); }); @@ -174,7 +175,7 @@ void main() { // Verify that calling the http.Client() factory inside nested Zones does // not provoke an infinite recursion. http.runWithClient(() { - http.runWithClient(() => http.Client(), () => http.Client()); - }, () => http.Client()); + http.runWithClient(http.Client.new, http.Client.new); + }, http.Client.new); }); } diff --git a/pkgs/http/test/io/http_test.dart b/pkgs/http/test/io/http_test.dart index a551230958..3f9aad815e 100644 --- a/pkgs/http/test/io/http_test.dart +++ b/pkgs/http/test/io/http_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('vm') +library; import 'package:http/http.dart' as http; import 'package:test/test.dart'; @@ -31,8 +32,7 @@ void main() { test('head runWithClient', () { expect( - () => http.runWithClient( - () => http.head(serverUrl), () => TestClient()), + () => http.runWithClient(() => http.head(serverUrl), TestClient.new), throwsUnimplementedError); }); @@ -59,8 +59,7 @@ void main() { test('get runWithClient', () { expect( - () => - http.runWithClient(() => http.get(serverUrl), () => TestClient()), + () => http.runWithClient(() => http.get(serverUrl), TestClient.new), throwsUnimplementedError); }); @@ -175,7 +174,7 @@ void main() { test('post runWithClient', () { expect( () => http.runWithClient( - () => http.post(serverUrl, body: 'testing'), () => TestClient()), + () => http.post(serverUrl, body: 'testing'), TestClient.new), throwsUnimplementedError); }); @@ -290,7 +289,7 @@ void main() { test('put runWithClient', () { expect( () => http.runWithClient( - () => http.put(serverUrl, body: 'testing'), () => TestClient()), + () => http.put(serverUrl, body: 'testing'), TestClient.new), throwsUnimplementedError); }); @@ -426,7 +425,7 @@ void main() { test('patch runWithClient', () { expect( () => http.runWithClient( - () => http.patch(serverUrl, body: 'testing'), () => TestClient()), + () => http.patch(serverUrl, body: 'testing'), TestClient.new), throwsUnimplementedError); }); @@ -456,8 +455,7 @@ void main() { test('read runWithClient', () { expect( - () => http.runWithClient( - () => http.read(serverUrl), () => TestClient()), + () => http.runWithClient(() => http.read(serverUrl), TestClient.new), throwsUnimplementedError); }); @@ -490,7 +488,7 @@ void main() { test('readBytes runWithClient', () { expect( () => http.runWithClient( - () => http.readBytes(serverUrl), () => TestClient()), + () => http.readBytes(serverUrl), TestClient.new), throwsUnimplementedError); }); }); diff --git a/pkgs/http/test/io/multipart_test.dart b/pkgs/http/test/io/multipart_test.dart index 910fa762ba..3ab90c27cb 100644 --- a/pkgs/http/test/io/multipart_test.dart +++ b/pkgs/http/test/io/multipart_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('vm') +library; import 'dart:io'; diff --git a/pkgs/http/test/io/request_test.dart b/pkgs/http/test/io/request_test.dart index 80a7f24170..ac6b44c3fd 100644 --- a/pkgs/http/test/io/request_test.dart +++ b/pkgs/http/test/io/request_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('vm') +library; import 'package:http/http.dart' as http; import 'package:test/test.dart'; diff --git a/pkgs/http/test/io/streamed_request_test.dart b/pkgs/http/test/io/streamed_request_test.dart index d82006847f..76efd6fe56 100644 --- a/pkgs/http/test/io/streamed_request_test.dart +++ b/pkgs/http/test/io/streamed_request_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. @TestOn('vm') +library; import 'dart:convert'; diff --git a/pkgs/http_client_conformance_tests/CHANGELOG.md b/pkgs/http_client_conformance_tests/CHANGELOG.md deleted file mode 100644 index b78d64c626..0000000000 --- a/pkgs/http_client_conformance_tests/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## 0.0.1 - -- Initial version. diff --git a/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart b/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart index 912a86f7f7..74f9d00df9 100644 --- a/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart +++ b/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. /// Generates the '*_server_vm.dart' and '*_server_web.dart' support files. +library; import 'dart:core'; import 'dart:io'; diff --git a/pkgs/http_client_conformance_tests/example/client_test.dart b/pkgs/http_client_conformance_tests/example/client_test.dart index 749d813872..0b4bbb3089 100644 --- a/pkgs/http_client_conformance_tests/example/client_test.dart +++ b/pkgs/http_client_conformance_tests/example/client_test.dart @@ -12,6 +12,6 @@ class MyHttpClient extends BaseClient { void main() { group('client conformance tests', () { - testAll(() => MyHttpClient()); + testAll(MyHttpClient.new); }); } diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index ef5dc8f81b..6265c08313 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -6,13 +6,14 @@ publish_to: none repository: https://github.com/dart-lang/http/tree/master/pkgs/http_client_conformance_tests environment: - sdk: '>=2.14.0 <3.0.0' + sdk: '>=2.19.0 <3.0.0' dependencies: async: ^2.8.2 + dart_style: ^2.2.3 http: ^0.13.4 + stream_channel: ^2.1.1 test: ^1.21.2 dev_dependencies: - dart_style: ^2.2.3 - lints: ^1.0.0 + dart_flutter_team_lints: ^1.0.0 From b69493c56267ef905ddf5b44f1c6a2c15d2fad1e Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 2 Mar 2023 12:12:44 -0800 Subject: [PATCH 207/448] Fix some spelling (#884) --- pkgs/cronet_http/example/integration_test/client_test.dart | 2 +- pkgs/cupertino_http/CHANGELOG.md | 2 +- .../lib/src/request_body_streamed_server.dart | 2 +- .../lib/src/request_headers_tests.dart | 2 +- .../lib/src/response_headers_tests.dart | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/cronet_http/example/integration_test/client_test.dart b/pkgs/cronet_http/example/integration_test/client_test.dart index 379811cac0..ea85a5837c 100644 --- a/pkgs/cronet_http/example/integration_test/client_test.dart +++ b/pkgs/cronet_http/example/integration_test/client_test.dart @@ -35,7 +35,7 @@ Future testClientFromFutureFails() async { test('cronet engine future fails', () async { final engineFuture = CronetEngine.build( cacheMode: CacheMode.disk, - storagePath: '/non-existant-path/', // Will cause `build` to throw. + storagePath: '/non-existent-path/', // Will cause `build` to throw. userAgent: 'Test Agent (Future)'); final client = CronetClient.fromCronetEngineFuture(engineFuture); diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 6e934a4711..7029f06917 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -46,7 +46,7 @@ ## 0.0.6 -* Make the number of simulateous connections allowed to the same host +* Make the number of simultaneous connections allowed to the same host configurable. * Fixes [cupertino_http: Failure calling Dart_PostCObject_DL](https://github.com/dart-lang/http/issues/785). diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server.dart index a019591fdd..428bb781eb 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server.dart @@ -8,7 +8,7 @@ import 'dart:io'; import 'package:stream_channel/stream_channel.dart'; -/// Starts an HTTP server that absorbes a request stream of integers and +/// Starts an HTTP server that absorbs a request stream of integers and /// signals the client to quit after 1000 have been received. /// /// Channel protocol: diff --git a/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart index 4c0129c872..8adf98c9c7 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart @@ -35,7 +35,7 @@ void testRequestHeaders(Client client) async { await client.get(Uri.http(host, ''), headers: {'FOO': 'BAR'}); final headers = await httpServerQueue.next as Map; - // RFC 2616 14.44 states that header field names are case-insensive. + // RFC 2616 14.44 states that header field names are case-insensitive. // http.Client canonicalizes field names into lower case. expect(headers['foo'], ['BAR']); }); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart index 7debead851..9b2c262c3d 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart @@ -34,7 +34,7 @@ void testResponseHeaders(Client client) async { httpServerChannel.sink.add({'foo': 'BAR'}); final response = await client.get(Uri.http(host, '')); - // RFC 2616 14.44 states that header field names are case-insensive. + // RFC 2616 14.44 states that header field names are case-insensitive. // http.Client canonicalizes field names into lower case. expect(response.headers['foo'], 'BAR'); }); From 90a109328d67c071c70a106ddf1b11fceb46d764 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 9 Mar 2023 12:39:01 -0800 Subject: [PATCH 208/448] Fix a reference count race with forwarded delegates. (#888) --- pkgs/cupertino_http/CHANGELOG.md | 3 ++- pkgs/cupertino_http/lib/src/cupertino_api.dart | 8 +++----- pkgs/cupertino_http/src/CUPHTTPClientDelegate.m | 6 +++++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 7029f06917..cc290c28d7 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,6 +1,7 @@ -## 0.1.2-dev +## 0.1.2 * Require Dart 2.19 +* Fix a [reference count race with forwarded delegates](https://github.com/dart-lang/http/issues/887). ## 0.1.1 diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 59d1187803..2157dd9f1f 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -827,11 +827,9 @@ void _setupDelegation( final messageType = message[0]; final dp = Pointer.fromAddress(message[1] as int); - final forwardedDelegate = - ncb.CUPHTTPForwardedDelegate.castFromPointer(helperLibs, dp, - // `CUPHTTPForwardedDelegate` was retained in the delegate so it - // only needs to be released. - release: true); + final forwardedDelegate = ncb.CUPHTTPForwardedDelegate.castFromPointer( + helperLibs, dp, + retain: true, release: true); switch (messageType) { case ncb.MessageType.RedirectMessage: diff --git a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m index 2483f6d1ba..a1eff15f9a 100644 --- a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m +++ b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m @@ -91,6 +91,7 @@ - (void)URLSession:(NSURLSession *)session [forwardedRedirect.lock lock]; completionHandler(forwardedRedirect.redirectRequest); + [forwardedRedirect release]; } - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)task @@ -124,8 +125,8 @@ - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)task // // See the @interface description for CUPHTTPRedirect. [forwardedResponse.lock lock]; - completionHandler(forwardedResponse.disposition); + [forwardedResponse release]; } @@ -156,6 +157,7 @@ - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)task // // See the @interface description for CUPHTTPRedirect. [forwardedData.lock lock]; + [forwardedData release]; } - (void)URLSession:(NSURLSession *)session @@ -183,6 +185,7 @@ - (void)URLSession:(NSURLSession *)session NSAssert(success, @"Dart_PostCObject_DL failed."); [forwardedFinishedDownload.lock lock]; + [forwardedFinishedDownload release]; } - (void)URLSession:(NSURLSession *)session @@ -213,6 +216,7 @@ - (void)URLSession:(NSURLSession *)session // // See the @interface description for CUPHTTPRedirect. [forwardedComplete.lock lock]; + [forwardedComplete release]; } @end From 85fccfb4b2162801d5612793cb7f1244f6154008 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 9 Mar 2023 13:04:10 -0800 Subject: [PATCH 209/448] Add a flag to allow the default Client to be tree shaken away. (#868) --- .github/workflows/dart.yml | 76 ++++++++++++++++++- pkgs/http/CHANGELOG.md | 2 + pkgs/http/lib/src/browser_client.dart | 8 +- pkgs/http/lib/src/client.dart | 11 +++ pkgs/http/lib/src/io_client.dart | 8 +- pkgs/http/mono_pkg.yaml | 3 + .../test/no_default_http_client_test.dart | 18 +++++ tool/ci.sh | 4 + 8 files changed, 125 insertions(+), 5 deletions(-) create mode 100644 pkgs/http/test/no_default_http_client_test.dart diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index b7d92fcd13..780b5715ef 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -157,6 +157,41 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests job_005: + name: "unit_test; Dart 2.19.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http;commands:command" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0 + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + with: + sdk: "2.19.0" + - id: checkout + name: Checkout repository + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + - name: "pkgs/http; dart run --define=no_default_http_client=true test/no_default_http_client_test.dart" + run: "dart run --define=no_default_http_client=true test/no_default_http_client_test.dart" + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + needs: + - job_001 + - job_002 + - job_003 + - job_004 + job_006: name: "unit_test; Dart 2.19.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -191,7 +226,7 @@ jobs: - job_002 - job_003 - job_004 - job_006: + job_007: name: "unit_test; Dart 2.19.0; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -226,7 +261,42 @@ jobs: - job_002 - job_003 - job_004 - job_007: + job_008: + name: "unit_test; Dart dev; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:command" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + with: + sdk: dev + - id: checkout + name: Checkout repository + uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + - name: "pkgs/http; dart run --define=no_default_http_client=true test/no_default_http_client_test.dart" + run: "dart run --define=no_default_http_client=true test/no_default_http_client_test.dart" + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + needs: + - job_001 + - job_002 + - job_003 + - job_004 + job_009: name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -261,7 +331,7 @@ jobs: - job_002 - job_003 - job_004 - job_008: + job_010: name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index c11ad7afda..14adfa76ad 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,6 +1,8 @@ ## 0.13.6-dev * `BrowserClient` throws an exception if `send` is called after `close`. +* If `no_default_http_client=true` is set in the environment then disk usage + is reduced in some circumstances. * Require Dart 2.19 ## 0.13.5 diff --git a/pkgs/http/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart index dff2da6bb0..ddaa43feae 100644 --- a/pkgs/http/lib/src/browser_client.dart +++ b/pkgs/http/lib/src/browser_client.dart @@ -15,7 +15,13 @@ import 'streamed_response.dart'; /// Create a [BrowserClient]. /// /// Used from conditional imports, matches the definition in `client_stub.dart`. -BaseClient createClient() => BrowserClient(); +BaseClient createClient() { + if (const bool.fromEnvironment('no_default_http_client')) { + throw StateError('no_default_http_client was defined but runWithClient ' + 'was not used to configure a Client implementation.'); + } + return BrowserClient(); +} /// A `dart:html`-based HTTP client that runs in the browser and is backed by /// XMLHttpRequests. diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index 2cc5f21505..11c266888c 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -210,6 +210,17 @@ Client? get zoneClient { /// runWithClient(() => runApp(const MyApp()), clientFactory); /// } /// ``` +/// +/// If [runWithClient] is used and the environment defines +/// `no_default_http_client=true` then generated binaries may be smaller e.g. +/// ```shell +/// $ flutter build appbundle --dart-define=no_default_http_client=true ... +/// $ dart compile exe --define=no_default_http_client=true ... +/// ``` +/// +/// If `no_default_http_client=true` is set then any call to the [Client] +/// factory (i.e. `Client()`) outside of the [Zone] created by [runWithClient] +/// will throw [StateError]. R runWithClient(R Function() body, Client Function() clientFactory, {ZoneSpecification? zoneSpecification}) => runZoned(body, diff --git a/pkgs/http/lib/src/io_client.dart b/pkgs/http/lib/src/io_client.dart index d5c79cddb9..4ebb434f9c 100644 --- a/pkgs/http/lib/src/io_client.dart +++ b/pkgs/http/lib/src/io_client.dart @@ -12,7 +12,13 @@ import 'io_streamed_response.dart'; /// Create an [IOClient]. /// /// Used from conditional imports, matches the definition in `client_stub.dart`. -BaseClient createClient() => IOClient(); +BaseClient createClient() { + if (const bool.fromEnvironment('no_default_http_client')) { + throw StateError('no_default_http_client was defined but runWithClient ' + 'was not used to configure a Client implementation.'); + } + return IOClient(); +} /// Exception thrown when the underlying [HttpClient] throws a /// [SocketException]. diff --git a/pkgs/http/mono_pkg.yaml b/pkgs/http/mono_pkg.yaml index 32c0a7e15f..0e2f9d8aa7 100644 --- a/pkgs/http/mono_pkg.yaml +++ b/pkgs/http/mono_pkg.yaml @@ -15,3 +15,6 @@ stages: - test: --platform chrome os: - linux + - command: dart run --define=no_default_http_client=true test/no_default_http_client_test.dart + os: + - linux diff --git a/pkgs/http/test/no_default_http_client_test.dart b/pkgs/http/test/no_default_http_client_test.dart new file mode 100644 index 0000000000..c51e98fa15 --- /dev/null +++ b/pkgs/http/test/no_default_http_client_test.dart @@ -0,0 +1,18 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. 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:http/http.dart' as http; +import 'package:test/test.dart'; + +/// Tests that no [http.Client] is provided by default when run with +/// `--define=no_default_http_client=true`. +void main() { + test('Client()', () { + if (const bool.fromEnvironment('no_default_http_client')) { + expect(http.Client.new, throwsA(isA())); + } else { + expect(http.Client(), isA()); + } + }); +} diff --git a/tool/ci.sh b/tool/ci.sh index 74eeca90ec..2885a5827d 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -71,6 +71,10 @@ for PKG in ${PKGS}; do echo 'dart analyze --fatal-infos' dart analyze --fatal-infos || EXIT_CODE=$? ;; + command) + echo 'dart run --define=no_default_http_client=true test/no_default_http_client_test.dart' + dart run --define=no_default_http_client=true test/no_default_http_client_test.dart || EXIT_CODE=$? + ;; format) echo 'dart format --output=none --set-exit-if-changed .' dart format --output=none --set-exit-if-changed . || EXIT_CODE=$? From 42e9af43b24a6ea63b5215993fa6e741b86f5729 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 9 Mar 2023 15:42:28 -0800 Subject: [PATCH 210/448] Add conformances test that verify that the Client works in Isolates (#889) --- .../example/integration_test/client_test.dart | 2 +- .../cronet_configuration_test.dart | 3 -- pkgs/cronet_http/lib/src/messages.dart | 24 ++++++--- .../client_conformance_test.dart | 2 +- .../test/html/client_conformance_test.dart | 3 +- .../lib/http_client_conformance_tests.dart | 9 +++- .../lib/src/dummy_isolate.dart | 10 ++++ .../lib/src/isolate_test.dart | 51 +++++++++++++++++++ 8 files changed, 89 insertions(+), 15 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/dummy_isolate.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/isolate_test.dart diff --git a/pkgs/cronet_http/example/integration_test/client_test.dart b/pkgs/cronet_http/example/integration_test/client_test.dart index ea85a5837c..4c279d7618 100644 --- a/pkgs/cronet_http/example/integration_test/client_test.dart +++ b/pkgs/cronet_http/example/integration_test/client_test.dart @@ -9,7 +9,7 @@ import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; void testClientConformance(CronetClient Function() clientFactory) { - testAll(clientFactory, canStreamRequestBody: false); + testAll(clientFactory, canStreamRequestBody: false, canWorkInIsolates: false); } Future testConformance() async { diff --git a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart index b6e7205489..91f85cd797 100644 --- a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart +++ b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart @@ -2,9 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// Tests various [CronetEngine] configurations. -library; - import 'dart:io'; import 'package:cronet_http/cronet_http.dart'; diff --git a/pkgs/cronet_http/lib/src/messages.dart b/pkgs/cronet_http/lib/src/messages.dart index 8b6c3910f7..47e0a920e9 100644 --- a/pkgs/cronet_http/lib/src/messages.dart +++ b/pkgs/cronet_http/lib/src/messages.dart @@ -298,21 +298,29 @@ class _HttpApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: return CreateEngineRequest.decode(readValue(buffer)!); + case 128: + return CreateEngineRequest.decode(readValue(buffer)!); - case 129: return CreateEngineResponse.decode(readValue(buffer)!); + case 129: + return CreateEngineResponse.decode(readValue(buffer)!); - case 130: return EventMessage.decode(readValue(buffer)!); + case 130: + return EventMessage.decode(readValue(buffer)!); - case 131: return ReadCompleted.decode(readValue(buffer)!); + case 131: + return ReadCompleted.decode(readValue(buffer)!); - case 132: return ResponseStarted.decode(readValue(buffer)!); + case 132: + return ResponseStarted.decode(readValue(buffer)!); - case 133: return StartRequest.decode(readValue(buffer)!); + case 133: + return StartRequest.decode(readValue(buffer)!); - case 134: return StartResponse.decode(readValue(buffer)!); + case 134: + return StartResponse.decode(readValue(buffer)!); - default: return super.readValueOfType(type, buffer); + default: + return super.readValueOfType(type, buffer); } } } diff --git a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart index a86243c9dc..28d9bbc891 100644 --- a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart +++ b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart @@ -17,6 +17,6 @@ void main() { group('fromSessionConfiguration', () { final config = URLSessionConfiguration.ephemeralSessionConfiguration(); testAll(() => CupertinoClient.fromSessionConfiguration(config), - canStreamRequestBody: false); + canStreamRequestBody: false, canWorkInIsolates: false); }); } diff --git a/pkgs/http/test/html/client_conformance_test.dart b/pkgs/http/test/html/client_conformance_test.dart index 1a94a551c2..b4f567dfa7 100644 --- a/pkgs/http/test/html/client_conformance_test.dart +++ b/pkgs/http/test/html/client_conformance_test.dart @@ -13,5 +13,6 @@ void main() { testAll(BrowserClient.new, redirectAlwaysAllowed: true, canStreamRequestBody: false, - canStreamResponseBody: false); + canStreamResponseBody: false, + canWorkInIsolates: false); } diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index 4f492fdbde..3500bf8df2 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -6,6 +6,7 @@ import 'package:http/http.dart'; import 'src/close_tests.dart'; import 'src/compressed_response_body_tests.dart'; +import 'src/isolate_test.dart'; import 'src/multiple_clients_tests.dart'; import 'src/redirect_tests.dart'; import 'src/request_body_streamed_tests.dart'; @@ -19,6 +20,7 @@ import 'src/server_errors_test.dart'; export 'src/close_tests.dart' show testClose; export 'src/compressed_response_body_tests.dart' show testCompressedResponseBody; +export 'src/isolate_test.dart' show testIsolate; export 'src/multiple_clients_tests.dart' show testMultipleClients; export 'src/redirect_tests.dart' show testRedirect; export 'src/request_body_streamed_tests.dart' show testRequestBodyStreamed; @@ -42,13 +44,17 @@ export 'src/server_errors_test.dart' show testServerErrors; /// If [redirectAlwaysAllowed] is `true` then tests that require the [Client] /// to limit redirects will be skipped. /// +/// If [canWorkInIsolates] is `false` then tests that require that the [Client] +/// work in Isolates other than the main isolate will be skipped. +/// /// The tests are run against a series of HTTP servers that are started by the /// tests. If the tests are run in the browser, then the test servers are /// started in another process. Otherwise, the test servers are run in-process. void testAll(Client Function() clientFactory, {bool canStreamRequestBody = true, bool canStreamResponseBody = true, - bool redirectAlwaysAllowed = false}) { + bool redirectAlwaysAllowed = false, + bool canWorkInIsolates = true}) { testRequestBody(clientFactory()); testRequestBodyStreamed(clientFactory(), canStreamRequestBody: canStreamRequestBody); @@ -63,4 +69,5 @@ void testAll(Client Function() clientFactory, testCompressedResponseBody(clientFactory()); testMultipleClients(clientFactory); testClose(clientFactory); + testIsolate(clientFactory, canWorkInIsolates: canWorkInIsolates); } diff --git a/pkgs/http_client_conformance_tests/lib/src/dummy_isolate.dart b/pkgs/http_client_conformance_tests/lib/src/dummy_isolate.dart new file mode 100644 index 0000000000..0f592220f1 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/dummy_isolate.dart @@ -0,0 +1,10 @@ +import 'dart:async'; + +// ignore: avoid_classes_with_only_static_members +/// An Isolate implementation for the web that throws when used. +abstract class Isolate { + static Future run(FutureOr Function() computation, + {String? debugName}) => + throw ArgumentError.value('true', 'canWorkInIsolates', + 'isolate tests are not supported on the web'); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart b/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart new file mode 100644 index 0000000000..b4ac8b2393 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart @@ -0,0 +1,51 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:isolate' if (dart.library.html) 'dummy_isolate.dart'; + +import 'package:async/async.dart'; +import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +import 'request_body_server_vm.dart' + if (dart.library.html) 'request_body_server_web.dart'; + +Future _testPost(Client Function() clientFactory, String host) async { + await Isolate.run( + () => clientFactory().post(Uri.http(host, ''), body: 'Hello World!')); +} + +/// Tests that the [Client] is useable from Isolates other than the main +/// isolate. +/// +/// If [canWorkInIsolates] is `false` then the tests will be skipped. +void testIsolate(Client Function() clientFactory, + {bool canWorkInIsolates = true}) { + group('test isolate', () { + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + + test('client.post() with string body', () async { + await _testPost(clientFactory, host); + + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next; + + expect(serverReceivedContentType, ['text/plain; charset=utf-8']); + expect(serverReceivedBody, 'Hello World!'); + }); + }, + skip: canWorkInIsolates + ? false + : 'does not work outside of the main isolate'); +} From f3ec6c4a29d70a151db8ab77f8d823477bbdb318 Mon Sep 17 00:00:00 2001 From: Bahaa Fathi Yousef Date: Mon, 3 Apr 2023 20:33:34 +0200 Subject: [PATCH 211/448] Fix some spelling (#885) --- pkgs/cupertino_http/lib/src/cupertino_api.dart | 8 ++++---- pkgs/cupertino_http/lib/src/cupertino_client.dart | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 2157dd9f1f..4092f4d4de 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -132,7 +132,7 @@ class Error extends _ObjectHolder { /// A description of the error in the current locale e.g. /// 'A server with the specified hostname could not be found.' /// - /// See [NSError.locaizedDescription](https://developer.apple.com/documentation/foundation/nserror/1414418-localizeddescription) + /// See [NSError.localizedDescription](https://developer.apple.com/documentation/foundation/nserror/1414418-localizeddescription) String? get localizedDescription => toStringOrNull(_nsObject.localizedDescription); @@ -226,7 +226,7 @@ class URLSessionConfiguration set httpCookieAcceptPolicy(HTTPCookieAcceptPolicy value) => _nsObject.HTTPCookieAcceptPolicy = value.index; - // The maximun number of connections that a URLSession can have open to the + // The maximum number of connections that a URLSession can have open to the // same host. // // See [NSURLSessionConfiguration.HTTPMaximumConnectionsPerHost](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1407597-httpmaximumconnectionsperhost). @@ -512,7 +512,7 @@ class URLSessionTask extends _ObjectHolder { _nsObject.resume(); } - /// Suspends a task (prevents it from transfering data). + /// Suspends a task (prevents it from transferring data). /// /// See [NSURLSessionTask suspend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411565-suspend) void suspend() { @@ -1066,7 +1066,7 @@ class URLSession extends _ObjectHolder { onComplete: onComplete); } - /// A **copy** of the configuration for this sesion. + /// A **copy** of the configuration for this session. /// /// See [NSURLSession.configuration](https://developer.apple.com/documentation/foundation/nsurlsession/1411477-configuration) URLSessionConfiguration get configuration => URLSessionConfiguration._( diff --git a/pkgs/cupertino_http/lib/src/cupertino_client.dart b/pkgs/cupertino_http/lib/src/cupertino_client.dart index 45b6afdec2..b4b05969fd 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_client.dart @@ -213,7 +213,7 @@ class CupertinoClient extends BaseClient { @override Future send(BaseRequest request) async { - // The expected sucess case flow (without redirects) is: + // The expected success case flow (without redirects) is: // 1. send is called by BaseClient // 2. send starts the request with UrlSession.dataTaskWithRequest and waits // on a Completer From a1865c71edd6680146c301388d6577a745fe9cfc Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 4 Apr 2023 09:01:21 -0700 Subject: [PATCH 212/448] Fix maxRedirects documentation to mention ClientException rather than RedirectException (#907) --- pkgs/http/lib/src/base_request.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/http/lib/src/base_request.dart b/pkgs/http/lib/src/base_request.dart index fd18bad332..70a78695aa 100644 --- a/pkgs/http/lib/src/base_request.dart +++ b/pkgs/http/lib/src/base_request.dart @@ -6,7 +6,7 @@ import 'dart:collection'; import 'package:meta/meta.dart'; -import '../http.dart' show get; +import '../http.dart' show ClientException, get; import 'base_client.dart'; import 'base_response.dart'; import 'byte_stream.dart'; @@ -70,7 +70,7 @@ abstract class BaseRequest { /// The maximum number of redirects to follow when [followRedirects] is true. /// /// If this number is exceeded the [BaseResponse] future will signal a - /// `RedirectException`. Defaults to 5. + /// [ClientException]. Defaults to 5. int get maxRedirects => _maxRedirects; int _maxRedirects = 5; From 527a5cb756ef33ac3b59dc4e4a76c2f76fc2cff9 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 6 Apr 2023 08:17:52 -0700 Subject: [PATCH 213/448] latest CI actions (#908) --- .github/workflows/dart.yml | 64 +++++++++++++++++++------------------- tool/ci.sh | 2 +- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 780b5715ef..71a33a157a 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.5.0 +# Created with package:mono_repo v6.5.3 name: Dart CI on: push: @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -29,14 +29,14 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: stable - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - name: mono_repo self validate - run: dart pub global activate mono_repo 6.5.0 + run: dart pub global activate mono_repo 6.5.3 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" @@ -54,12 +54,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: "2.19.0" - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -83,7 +83,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" @@ -93,12 +93,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -122,7 +122,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:format" @@ -132,12 +132,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -161,7 +161,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http;commands:command" @@ -171,12 +171,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: "2.19.0" - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -196,7 +196,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http;commands:test_1" @@ -206,12 +206,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: "2.19.0" - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -231,7 +231,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http;commands:test_0" @@ -241,12 +241,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: "2.19.0" - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -266,7 +266,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:command" @@ -276,12 +276,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -301,7 +301,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_1" @@ -311,12 +311,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -336,7 +336,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@627f0f41f6904a5b1efbaed9f96d9eb58e92e920 + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_0" @@ -346,12 +346,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade diff --git a/tool/ci.sh b/tool/ci.sh index 2885a5827d..5a9f07ace3 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.5.0 +# Created with package:mono_repo v6.5.3 # Support built in commands on windows out of the box. # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") From 77c72e81ce1c7604322b800429d6521f51227144 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 1 May 2023 10:40:41 -0700 Subject: [PATCH 214/448] Document that RetryClient may consume a lot of memory (#915) --- pkgs/http/lib/retry.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/http/lib/retry.dart b/pkgs/http/lib/retry.dart index a1ae73acbb..b943df5c9e 100644 --- a/pkgs/http/lib/retry.dart +++ b/pkgs/http/lib/retry.dart @@ -10,6 +10,10 @@ import 'package:async/async.dart'; import 'http.dart'; /// An HTTP client wrapper that automatically retries failing requests. +/// +/// NOTE: [RetryClient] makes a copy of the request data in order to support +/// resending it. This can cause a lot of memory usage when sending a large +/// [StreamedRequest]. class RetryClient extends BaseClient { /// The wrapped client. final Client _inner; From 5978573c6870bef509eb17fc25476fd4f08c7c1d Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 1 May 2023 10:53:12 -0700 Subject: [PATCH 215/448] Prepare to publish (#914) --- pkgs/http/CHANGELOG.md | 2 +- pkgs/http/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 14adfa76ad..fe3c527343 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.13.6-dev +## 0.13.6 * `BrowserClient` throws an exception if `send` is called after `close`. * If `no_default_http_client=true` is set in the environment then disk usage diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 2f3232a38d..1acc884f60 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.6-dev +version: 0.13.6 description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http From 3b9a06d764be1a25fdfa9c2467ad8028121c13e9 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 4 May 2023 11:08:09 -0700 Subject: [PATCH 216/448] Switch to "dart format" from "flutter format" (#922) flutter format is deprecated --- .github/workflows/cupertino.yml | 2 +- pkgs/cronet_http/tool/run_pigeon.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 83fd796e76..3dca4aa9e9 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -36,7 +36,7 @@ jobs: name: Install dependencies run: flutter pub get - name: Check formatting - run: flutter format --output=none --set-exit-if-changed . + run: dart format --output=none --set-exit-if-changed . if: always() && steps.install.outcome == 'success' - name: Analyze code run: flutter analyze --fatal-infos diff --git a/pkgs/cronet_http/tool/run_pigeon.sh b/pkgs/cronet_http/tool/run_pigeon.sh index d147e02992..47494319c4 100644 --- a/pkgs/cronet_http/tool/run_pigeon.sh +++ b/pkgs/cronet_http/tool/run_pigeon.sh @@ -9,4 +9,4 @@ flutter pub run pigeon \ --java_out android/src/main/java/io/flutter/plugins/cronet_http/Messages.java \ --java_package "io.flutter.plugins.cronet_http" -flutter format lib/src/messages.dart +dart format lib/src/messages.dart From 1be01f9cea1b4c4894548de0d257a7349094f6dd Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 9 May 2023 10:45:37 -0700 Subject: [PATCH 217/448] Add "base", "final" and "interface" modifiers (#920) --- .github/workflows/dart.yml | 119 ++++++++++++++++++----------- pkgs/http/CHANGELOG.md | 5 ++ pkgs/http/lib/retry.dart | 2 +- pkgs/http/lib/src/base_client.dart | 2 +- pkgs/http/lib/src/byte_stream.dart | 2 +- pkgs/http/lib/src/client.dart | 2 +- pkgs/http/pubspec.yaml | 2 +- tool/ci.sh | 2 +- 8 files changed, 84 insertions(+), 52 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 71a33a157a..f0444a92ac 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.5.3 +# Created with package:mono_repo v6.5.5 name: Dart CI on: push: @@ -34,22 +34,22 @@ jobs: sdk: stable - id: checkout name: Checkout repository - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - name: mono_repo self validate - run: dart pub global activate mono_repo 6.5.3 + run: dart pub global activate mono_repo 6.5.5 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyze_and_format; Dart 2.19.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" + name: "analyze_and_format; Dart 2.19.0; PKG: pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http_client_conformance_tests;commands:analyze" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http-pkgs/http_client_conformance_tests + os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http_client_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -59,16 +59,7 @@ jobs: sdk: "2.19.0" - id: checkout name: Checkout repository - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - - id: pkgs_http_pub_upgrade - name: pkgs/http; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http - - name: "pkgs/http; dart analyze --fatal-infos" - run: dart analyze --fatal-infos - if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - id: pkgs_http_client_conformance_tests_pub_upgrade name: pkgs/http_client_conformance_tests; dart pub upgrade run: dart pub upgrade @@ -79,6 +70,36 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests job_003: + name: "analyze_and_format; Dart 3.0.0-417.4.beta; PKG: pkgs/http; `dart analyze --fatal-infos`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http;commands:analyze" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + with: + sdk: "3.0.0-417.4.beta" + - id: checkout + name: Checkout repository + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + - name: "pkgs/http; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + job_004: name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -98,7 +119,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -117,7 +138,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests - job_004: + job_005: name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -137,7 +158,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -156,27 +177,27 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests - job_005: - name: "unit_test; Dart 2.19.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" + job_006: + name: "unit_test; Dart 3.0.0-417.4.beta; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http;commands:command" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http;commands:command" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: - sdk: "2.19.0" + sdk: "3.0.0-417.4.beta" - id: checkout name: Checkout repository - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -191,27 +212,28 @@ jobs: - job_002 - job_003 - job_004 - job_006: - name: "unit_test; Dart 2.19.0; PKG: pkgs/http; `dart test --platform chrome`" + - job_005 + job_007: + name: "unit_test; Dart 3.0.0-417.4.beta; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: - sdk: "2.19.0" + sdk: "3.0.0-417.4.beta" - id: checkout name: Checkout repository - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -226,27 +248,28 @@ jobs: - job_002 - job_003 - job_004 - job_007: - name: "unit_test; Dart 2.19.0; PKG: pkgs/http; `dart test --platform vm`" + - job_005 + job_008: + name: "unit_test; Dart 3.0.0-417.4.beta; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: - sdk: "2.19.0" + sdk: "3.0.0-417.4.beta" - id: checkout name: Checkout repository - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -261,7 +284,8 @@ jobs: - job_002 - job_003 - job_004 - job_008: + - job_005 + job_009: name: "unit_test; Dart dev; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -281,7 +305,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -296,7 +320,8 @@ jobs: - job_002 - job_003 - job_004 - job_009: + - job_005 + job_010: name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -316,7 +341,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -331,7 +356,8 @@ jobs: - job_002 - job_003 - job_004 - job_010: + - job_005 + job_011: name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -351,7 +377,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -366,3 +392,4 @@ jobs: - job_002 - job_003 - job_004 + - job_005 diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index fe3c527343..ab36177f38 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.0.0 + +* Requires Dart 3.0 or later. +* Add `base`, `final`, and `interface` modifiers to some classes. + ## 0.13.6 * `BrowserClient` throws an exception if `send` is called after `close`. diff --git a/pkgs/http/lib/retry.dart b/pkgs/http/lib/retry.dart index b943df5c9e..dedba9a9e7 100644 --- a/pkgs/http/lib/retry.dart +++ b/pkgs/http/lib/retry.dart @@ -14,7 +14,7 @@ import 'http.dart'; /// NOTE: [RetryClient] makes a copy of the request data in order to support /// resending it. This can cause a lot of memory usage when sending a large /// [StreamedRequest]. -class RetryClient extends BaseClient { +final class RetryClient extends BaseClient { /// The wrapped client. final Client _inner; diff --git a/pkgs/http/lib/src/base_client.dart b/pkgs/http/lib/src/base_client.dart index 9020495b88..48a7f92fe9 100644 --- a/pkgs/http/lib/src/base_client.dart +++ b/pkgs/http/lib/src/base_client.dart @@ -17,7 +17,7 @@ import 'streamed_response.dart'; /// /// This is a mixin-style class; subclasses only need to implement [send] and /// maybe [close], and then they get various convenience methods for free. -abstract class BaseClient implements Client { +abstract mixin class BaseClient implements Client { @override Future head(Uri url, {Map? headers}) => _sendUnstreamed('HEAD', url, headers); diff --git a/pkgs/http/lib/src/byte_stream.dart b/pkgs/http/lib/src/byte_stream.dart index 6f9efca5e3..d8ae4dc4d2 100644 --- a/pkgs/http/lib/src/byte_stream.dart +++ b/pkgs/http/lib/src/byte_stream.dart @@ -7,7 +7,7 @@ import 'dart:convert'; import 'dart:typed_data'; /// A stream of chunks of bytes representing a single piece of data. -class ByteStream extends StreamView> { +final class ByteStream extends StreamView> { const ByteStream(super.stream); /// Returns a single-subscription byte stream that will emit the given bytes diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index 11c266888c..6159d0067c 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -29,7 +29,7 @@ import 'streamed_response.dart'; /// extend [BaseClient] rather than [Client]. In most cases, you can wrap /// another instance of [Client] and add functionality on top of that. This /// allows all classes implementing [Client] to be mutually composable. -abstract class Client { +abstract interface class Client { /// Creates a new platform appropriate client. /// /// Creates an `IOClient` if `dart:io` is available and a `BrowserClient` if diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 1acc884f60..e6d259a018 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -4,7 +4,7 @@ description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http environment: - sdk: '>=2.19.0 <3.0.0' + sdk: '>=3.0.0-417.4.beta <4.0.0' dependencies: async: ^2.5.0 diff --git a/tool/ci.sh b/tool/ci.sh index 5a9f07ace3..75cc963f5f 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.5.3 +# Created with package:mono_repo v6.5.5 # Support built in commands on windows out of the box. # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") From 5268329d7a59cde1e68a396503910d961a78a938 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 10 May 2023 09:53:53 -0700 Subject: [PATCH 218/448] Require the release version of Dart 3.0.0 (#925) * Require the release version of Dart 3.0.0 * Update dart.yml * Update pkgs/http/pubspec.yaml Co-authored-by: Nate Bosch --------- Co-authored-by: Nate Bosch --- .github/workflows/dart.yml | 40 +++++++++++++++++++------------------- pkgs/http/pubspec.yaml | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index f0444a92ac..ca1ae26f1e 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -70,23 +70,23 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests job_003: - name: "analyze_and_format; Dart 3.0.0-417.4.beta; PKG: pkgs/http; `dart analyze --fatal-infos`" + name: "analyze_and_format; Dart 3.0.0; PKG: pkgs/http; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:analyze" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: - sdk: "3.0.0-417.4.beta" + sdk: "3.0.0" - id: checkout name: Checkout repository uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab @@ -178,23 +178,23 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests job_006: - name: "unit_test; Dart 3.0.0-417.4.beta; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" + name: "unit_test; Dart 3.0.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http;commands:command" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:command" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: - sdk: "3.0.0-417.4.beta" + sdk: "3.0.0" - id: checkout name: Checkout repository uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab @@ -214,23 +214,23 @@ jobs: - job_004 - job_005 job_007: - name: "unit_test; Dart 3.0.0-417.4.beta; PKG: pkgs/http; `dart test --platform chrome`" + name: "unit_test; Dart 3.0.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:test_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: - sdk: "3.0.0-417.4.beta" + sdk: "3.0.0" - id: checkout name: Checkout repository uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab @@ -250,23 +250,23 @@ jobs: - job_004 - job_005 job_008: - name: "unit_test; Dart 3.0.0-417.4.beta; PKG: pkgs/http; `dart test --platform vm`" + name: "unit_test; Dart 3.0.0; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0-417.4.beta + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: - sdk: "3.0.0-417.4.beta" + sdk: "3.0.0" - id: checkout name: Checkout repository uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index e6d259a018..ef6adfddee 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -4,7 +4,7 @@ description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http environment: - sdk: '>=3.0.0-417.4.beta <4.0.0' + sdk: ^3.0.0 dependencies: async: ^2.5.0 From 964d59c3d8cfa3d24c97c31262a8249690c65bb7 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 11 May 2023 16:46:27 -0700 Subject: [PATCH 219/448] Support the NSURLSession WebSocket API (#921) --- .../url_session_task_test.dart | 135 + pkgs/cupertino_http/ffigen.yaml | 25 +- .../ios/Classes/CUPHTTPCompletionHelper.m | 1 + .../cupertino_http/lib/src/cupertino_api.dart | 191 +- .../lib/src/native_cupertino_bindings.dart | 133156 +++++++-------- .../macos/Classes/CUPHTTPCompletionHelper.m | 1 + .../src/CUPHTTPClientDelegate.m | 8 +- .../src/CUPHTTPCompletionHelper.h | 31 + .../src/CUPHTTPCompletionHelper.m | 45 + 9 files changed, 66571 insertions(+), 67022 deletions(-) create mode 100644 pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m create mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m create mode 100644 pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h create mode 100644 pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m diff --git a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart index 0c5c56b2ec..35e411b84a 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart @@ -9,6 +9,139 @@ import 'package:flutter/foundation.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; +void testWebSocketTask() { + group('websocket', () { + late HttpServer server; + int? lastCloseCode; + String? lastCloseReason; + + setUp(() async { + lastCloseCode = null; + lastCloseReason = null; + server = await HttpServer.bind('localhost', 0) + ..listen((request) { + if (request.uri.path.endsWith('error')) { + request.response.statusCode = 500; + request.response.close(); + } else { + WebSocketTransformer.upgrade(request) + .then((websocket) => websocket.listen((event) { + final code = request.uri.queryParameters['code']; + final reason = request.uri.queryParameters['reason']; + + websocket.add(event); + if (!request.uri.queryParameters.containsKey('noclose')) { + websocket.close( + code == null ? null : int.parse(code), reason); + } + }, onDone: () { + lastCloseCode = websocket.closeCode; + lastCloseReason = websocket.closeReason; + })); + } + }); + }); + + tearDown(() async { + await server.close(); + }); + + test('client code and reason', () async { + final session = URLSession.sharedSession(); + final task = session.webSocketTaskWithRequest(URLRequest.fromUrl( + Uri.parse('ws://localhost:${server.port}/?noclose'))) + ..resume(); + await task + .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); + await task.receiveMessage(); + task.cancelWithCloseCode( + 4998, Data.fromUint8List(Uint8List.fromList('Bye'.codeUnits))); + + // Allow the server to run and save the close code. + while (lastCloseCode == null) { + await Future.delayed(const Duration(milliseconds: 10)); + } + expect(lastCloseCode, 4998); + expect(lastCloseReason, 'Bye'); + }); + + test('server code and reason', () async { + final session = URLSession.sharedSession(); + final task = session.webSocketTaskWithRequest(URLRequest.fromUrl( + Uri.parse('ws://localhost:${server.port}/?code=4999&reason=fun'))) + ..resume(); + await task + .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); + await task.receiveMessage(); + await expectLater(task.receiveMessage(), + throwsA(isA().having((e) => e.code, 'code', 57 // NOT_CONNECTED + ))); + + expect(task.closeCode, 4999); + expect(task.closeReason!.bytes, 'fun'.codeUnits); + task.cancel(); + }); + + test('data message', () async { + final session = URLSession.sharedSession(); + final task = session.webSocketTaskWithRequest( + URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}'))) + ..resume(); + await task.sendMessage(URLSessionWebSocketMessage.fromData( + Data.fromUint8List(Uint8List.fromList([1, 2, 3])))); + final receivedMessage = await task.receiveMessage(); + expect(receivedMessage.type, + URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeData); + expect(receivedMessage.data!.bytes, [1, 2, 3]); + expect(receivedMessage.string, null); + task.cancel(); + }); + + test('text message', () async { + final session = URLSession.sharedSession(); + final task = session.webSocketTaskWithRequest( + URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}'))) + ..resume(); + await task + .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); + final receivedMessage = await task.receiveMessage(); + expect(receivedMessage.type, + URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeString); + expect(receivedMessage.data, null); + expect(receivedMessage.string, 'Hello World!'); + task.cancel(); + }); + + test('send failure', () async { + final session = URLSession.sharedSession(); + final task = session.webSocketTaskWithRequest( + URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}/error'))) + ..resume(); + await expectLater( + task.sendMessage( + URLSessionWebSocketMessage.fromString('Hello World!')), + throwsA(isA().having( + (e) => e.code, 'code', -1011 // NSURLErrorBadServerResponse + ))); + task.cancel(); + }); + + test('receive failure', () async { + final session = URLSession.sharedSession(); + final task = session.webSocketTaskWithRequest( + URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}'))) + ..resume(); + await task + .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); + await task.receiveMessage(); + await expectLater(task.receiveMessage(), + throwsA(isA().having((e) => e.code, 'code', 57 // NOT_CONNECTED + ))); + task.cancel(); + }); + }); +} + void testURLSessionTask( URLSessionTask Function(URLSession session, Uri url) f) { group('task states', () { @@ -231,4 +364,6 @@ void main() { testURLSessionTask((session, uri) => session.downloadTaskWithRequest(URLRequest.fromUrl(uri))); }); + + testWebSocketTask(); } diff --git a/pkgs/cupertino_http/ffigen.yaml b/pkgs/cupertino_http/ffigen.yaml index b4cd26c595..2ac2ce517f 100644 --- a/pkgs/cupertino_http/ffigen.yaml +++ b/pkgs/cupertino_http/ffigen.yaml @@ -8,20 +8,21 @@ language: 'objc' output: 'lib/src/native_cupertino_bindings.dart' headers: entry-points: - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSData.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLRequest.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSProgress.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLResponse.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSHTTPCookieStorage.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSOperation.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSError.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSData.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLRequest.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSProgress.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLResponse.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSHTTPCookieStorage.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSOperation.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSError.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' - 'src/CUPHTTPClientDelegate.h' - 'src/CUPHTTPForwardedDelegate.h' + - 'src/CUPHTTPCompletionHelper.h' preamble: | // ignore_for_file: always_specify_types // ignore_for_file: camel_case_types diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m new file mode 100644 index 0000000000..b05d1fc717 --- /dev/null +++ b/pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m @@ -0,0 +1 @@ +#include "../../src/CUPHTTPCompletionHelper.m" diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 4092f4d4de..11d68b68d7 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -26,6 +26,7 @@ /// ``` library; +import 'dart:async'; import 'dart:ffi'; import 'dart:isolate'; import 'dart:math'; @@ -111,10 +112,18 @@ enum URLRequestNetworkService { networkServiceTypeCallSignaling } +/// The type of a WebSocket message i.e. text or data. +/// +/// See [NSURLSessionWebSocketMessageType](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessagetype) +enum URLSessionWebSocketMessageType { + urlSessionWebSocketMessageTypeData, + urlSessionWebSocketMessageTypeString, +} + /// Information about a failure. /// /// See [NSError](https://developer.apple.com/documentation/foundation/nserror) -class Error extends _ObjectHolder { +class Error extends _ObjectHolder implements Exception { Error._(super.c); /// The numeric code for the error e.g. -1003 (kCFURLErrorCannotFindHost). @@ -492,6 +501,54 @@ enum URLSessionTaskState { urlSessionTaskStateCompleted, } +/// A WebSocket message. +/// +/// See [NSURLSessionWebSocketMessage](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage) +class URLSessionWebSocketMessage + extends _ObjectHolder { + URLSessionWebSocketMessage._(super.nsObject); + + /// Create a WebSocket data message. + /// + /// See [NSURLSessionWebSocketMessage initWithData:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181192-initwithdata) + factory URLSessionWebSocketMessage.fromData(Data d) => + URLSessionWebSocketMessage._( + ncb.NSURLSessionWebSocketMessage.alloc(linkedLibs) + .initWithData_(d._nsObject)); + + /// Create a WebSocket string message. + /// + /// See [NSURLSessionWebSocketMessage initWitString:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181193-initwithstring) + factory URLSessionWebSocketMessage.fromString(String s) => + URLSessionWebSocketMessage._( + ncb.NSURLSessionWebSocketMessage.alloc(linkedLibs) + .initWithString_(s.toNSString(linkedLibs))); + + /// The data associated with the WebSocket message. + /// + /// Will be `null` if the [URLSessionWebSocketMessage] is a string message. + /// + /// See [NSURLSessionWebSocketMessage.data](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181191-data) + Data? get data => _nsObject.data == null ? null : Data._(_nsObject.data!); + + /// The string associated with the WebSocket message. + /// + /// Will be `null` if the [URLSessionWebSocketMessage] is a data message. + /// + /// See [NSURLSessionWebSocketMessage.string](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181194-string) + String? get string => toStringOrNull(_nsObject.string); + + /// The type of the WebSocket message. + /// + /// See [NSURLSessionWebSocketMessage.type](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181195-type) + URLSessionWebSocketMessageType get type => + URLSessionWebSocketMessageType.values[_nsObject.type]; + + @override + String toString() => + '[URLSessionWebSocketMessage type=$type string=$string data=$data]'; +} + /// A task associated with downloading a URI. /// /// See [NSURLSessionTask](https://developer.apple.com/documentation/foundation/nsurlsessiontask) @@ -608,18 +665,18 @@ class URLSessionTask extends _ObjectHolder { /// The number of content bytes that are expected to be received from the /// server. /// - /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410663-countofbytesexpectedtoreceive) + /// See [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410663-countofbytesexpectedtoreceive) int get countOfBytesExpectedToReceive => _nsObject.countOfBytesExpectedToReceive; /// The number of content bytes that have been received from the server. /// - /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411581-countofbytesreceived) + /// See [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411581-countofbytesreceived) int get countOfBytesReceived => _nsObject.countOfBytesReceived; /// The number of content bytes that the task expects to send to the server. /// - /// [NSURLSessionTask.countOfBytesExpectedToSend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411534-countofbytesexpectedtosend) + /// See [NSURLSessionTask.countOfBytesExpectedToSend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411534-countofbytesexpectedtosend) int get countOfBytesExpectedToSend => _nsObject.countOfBytesExpectedToSend; /// Whether the body of the response should be delivered incrementally or not. @@ -629,12 +686,12 @@ class URLSessionTask extends _ObjectHolder { /// Whether the body of the response should be delivered incrementally or not. /// - /// [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) + /// See [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) bool get prefersIncrementalDelivery => _nsObject.prefersIncrementalDelivery; /// Whether the body of the response should be delivered incrementally or not. /// - /// [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) + /// See [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) set prefersIncrementalDelivery(bool value) => _nsObject.prefersIncrementalDelivery = value; @@ -664,6 +721,109 @@ class URLSessionDownloadTask extends URLSessionTask { String toString() => _toStringHelper('URLSessionDownloadTask'); } +/// A task associated with a WebSocket connection. +/// +/// See [NSURLSessionWebSocketTask](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask) +class URLSessionWebSocketTask extends URLSessionTask { + final ncb.NSURLSessionWebSocketTask _urlSessionWebSocketTask; + + URLSessionWebSocketTask._(ncb.NSURLSessionWebSocketTask super.c) + : _urlSessionWebSocketTask = c, + super._(); + + /// The close code set when the WebSocket connection is closed. + /// + /// See [NSURLSessionWebSocketTask.closeCode](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181201-closecode) + int get closeCode => _urlSessionWebSocketTask.closeCode; + + /// The close reason set when the WebSocket connection is closed. + /// If there is no close reason available this property will be null. + /// + /// See [NSURLSessionWebSocketTask.closeReason](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181202-closereason) + Data? get closeReason { + final reason = _urlSessionWebSocketTask.closeReason; + if (reason == null) { + return null; + } else { + return Data._(reason); + } + } + + /// Sends a single WebSocket message. + /// + /// The returned future will complete successfully when the message is sent + /// and with an [Error] on failure. + /// + /// See [NSURLSessionWebSocketTask.sendMessage:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181205-sendmessage) + Future sendMessage(URLSessionWebSocketMessage message) async { + final completer = Completer(); + final completionPort = ReceivePort(); + completionPort.listen((message) { + final ep = Pointer.fromAddress(message as int); + if (ep.address == 0) { + completer.complete(); + } else { + final error = Error._(ncb.NSError.castFromPointer(linkedLibs, ep, + retain: false, release: true)); + completer.completeError(error); + } + completionPort.close(); + }); + + helperLibs.CUPHTTPSendMessage(_urlSessionWebSocketTask.pointer, + message._nsObject.pointer, completionPort.sendPort.nativePort); + await completer.future; + } + + /// Receives a single WebSocket message. + /// + /// Throws an [Error] on failure. + /// + /// See [NSURLSessionWebSocketTask.receiveMessageWithCompletionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181204-receivemessagewithcompletionhand) + Future receiveMessage() async { + final completer = Completer(); + final completionPort = ReceivePort(); + completionPort.listen((d) { + final messageAndError = d as List; + + final mp = Pointer.fromAddress(messageAndError[0] as int); + final ep = Pointer.fromAddress(messageAndError[1] as int); + + final message = mp.address == 0 + ? null + : URLSessionWebSocketMessage._( + ncb.NSURLSessionWebSocketMessage.castFromPointer(linkedLibs, mp, + retain: false, release: true)); + final error = ep.address == 0 + ? null + : Error._(ncb.NSError.castFromPointer(linkedLibs, ep, + retain: false, release: true)); + + if (error != null) { + completer.completeError(error); + } else { + completer.complete(message); + } + completionPort.close(); + }); + + helperLibs.CUPHTTPReceiveMessage( + _urlSessionWebSocketTask.pointer, completionPort.sendPort.nativePort); + return completer.future; + } + + /// Sends close frame with the given code and optional reason. + /// + /// See [NSURLSessionWebSocketTask.cancelWithCloseCode:reason:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181200-cancelwithclosecode) + void cancelWithCloseCode(int closeCode, Data? reason) { + _urlSessionWebSocketTask.cancelWithCloseCode_reason_( + closeCode, reason?._nsObject); + } + + @override + String toString() => _toStringHelper('NSURLSessionWebSocketTask'); +} + /// A request to load a URL. /// /// See [NSURLRequest](https://developer.apple.com/documentation/foundation/nsurlrequest) @@ -1154,4 +1314,23 @@ class URLSession extends _ObjectHolder { onResponse: _onResponse); return task; } + + /// Creates a [URLSessionWebSocketTask] that represents a connection to a + /// WebSocket endpoint. + /// + /// To add custom protocols, add a "Sec-WebSocket-Protocol" header with a list + /// of protocols to [request]. + /// + /// See [NSURLSession webSocketTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/3235750-websockettaskwithrequest) + URLSessionWebSocketTask webSocketTaskWithRequest(URLRequest request) { + final task = URLSessionWebSocketTask._( + _nsObject.webSocketTaskWithRequest_(request._nsObject)); + _setupDelegation(_delegate, this, task, + onComplete: _onComplete, + onData: _onData, + onFinishedDownloading: _onFinishedDownloading, + onRedirect: _onRedirect, + onResponse: _onResponse); + return task; + } } diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index 82724c8cc3..f08662793b 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -27,33295 +27,32555 @@ class NativeCupertinoHttp { lookup) : _lookup = lookup; - int __darwin_check_fd_set_overflow( + ffi.Pointer> signal( int arg0, - ffi.Pointer arg1, - int arg2, + ffi.Pointer> arg1, ) { - return ___darwin_check_fd_set_overflow( + return _signal( arg0, arg1, - arg2, ); } - late final ___darwin_check_fd_set_overflowPtr = _lookup< + late final _signalPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Int)>>('__darwin_check_fd_set_overflow'); - late final ___darwin_check_fd_set_overflow = - ___darwin_check_fd_set_overflowPtr - .asFunction, int)>(); + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction>)>>('signal'); + late final _signal = _signalPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); - ffi.Pointer sel_getName( - ffi.Pointer sel, + int getpriority( + int arg0, + int arg1, ) { - return _sel_getName( - sel, + return _getpriority( + arg0, + arg1, ); } - late final _sel_getNamePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('sel_getName'); - late final _sel_getName = _sel_getNamePtr - .asFunction Function(ffi.Pointer)>(); + late final _getpriorityPtr = + _lookup>( + 'getpriority'); + late final _getpriority = + _getpriorityPtr.asFunction(); - ffi.Pointer sel_registerName( - ffi.Pointer str, + int getiopolicy_np( + int arg0, + int arg1, ) { - return _sel_registerName1( - str, + return _getiopolicy_np( + arg0, + arg1, ); } - late final _sel_registerNamePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('sel_registerName'); - late final _sel_registerName1 = _sel_registerNamePtr - .asFunction Function(ffi.Pointer)>(); + late final _getiopolicy_npPtr = + _lookup>( + 'getiopolicy_np'); + late final _getiopolicy_np = + _getiopolicy_npPtr.asFunction(); - ffi.Pointer object_getClassName( - ffi.Pointer obj, + int getrlimit( + int arg0, + ffi.Pointer arg1, ) { - return _object_getClassName( - obj, + return _getrlimit( + arg0, + arg1, ); } - late final _object_getClassNamePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('object_getClassName'); - late final _object_getClassName = _object_getClassNamePtr - .asFunction Function(ffi.Pointer)>(); + late final _getrlimitPtr = _lookup< + ffi.NativeFunction)>>( + 'getrlimit'); + late final _getrlimit = + _getrlimitPtr.asFunction)>(); - ffi.Pointer object_getIndexedIvars( - ffi.Pointer obj, + int getrusage( + int arg0, + ffi.Pointer arg1, ) { - return _object_getIndexedIvars( - obj, + return _getrusage( + arg0, + arg1, ); } - late final _object_getIndexedIvarsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('object_getIndexedIvars'); - late final _object_getIndexedIvars = _object_getIndexedIvarsPtr - .asFunction Function(ffi.Pointer)>(); + late final _getrusagePtr = _lookup< + ffi.NativeFunction)>>( + 'getrusage'); + late final _getrusage = + _getrusagePtr.asFunction)>(); - bool sel_isMapped( - ffi.Pointer sel, + int setpriority( + int arg0, + int arg1, + int arg2, ) { - return _sel_isMapped( - sel, + return _setpriority( + arg0, + arg1, + arg2, ); } - late final _sel_isMappedPtr = - _lookup)>>( - 'sel_isMapped'); - late final _sel_isMapped = - _sel_isMappedPtr.asFunction)>(); + late final _setpriorityPtr = + _lookup>( + 'setpriority'); + late final _setpriority = + _setpriorityPtr.asFunction(); - ffi.Pointer sel_getUid( - ffi.Pointer str, + int setiopolicy_np( + int arg0, + int arg1, + int arg2, ) { - return _sel_getUid( - str, + return _setiopolicy_np( + arg0, + arg1, + arg2, ); } - late final _sel_getUidPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('sel_getUid'); - late final _sel_getUid = _sel_getUidPtr - .asFunction Function(ffi.Pointer)>(); + late final _setiopolicy_npPtr = + _lookup>( + 'setiopolicy_np'); + late final _setiopolicy_np = + _setiopolicy_npPtr.asFunction(); - ffi.Pointer objc_retainedObject( - objc_objectptr_t obj, + int setrlimit( + int arg0, + ffi.Pointer arg1, ) { - return _objc_retainedObject( - obj, + return _setrlimit( + arg0, + arg1, ); } - late final _objc_retainedObjectPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - objc_objectptr_t)>>('objc_retainedObject'); - late final _objc_retainedObject = _objc_retainedObjectPtr - .asFunction Function(objc_objectptr_t)>(); + late final _setrlimitPtr = _lookup< + ffi.NativeFunction)>>( + 'setrlimit'); + late final _setrlimit = + _setrlimitPtr.asFunction)>(); - ffi.Pointer objc_unretainedObject( - objc_objectptr_t obj, + int wait1( + ffi.Pointer arg0, ) { - return _objc_unretainedObject( - obj, + return _wait1( + arg0, ); } - late final _objc_unretainedObjectPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - objc_objectptr_t)>>('objc_unretainedObject'); - late final _objc_unretainedObject = _objc_unretainedObjectPtr - .asFunction Function(objc_objectptr_t)>(); + late final _wait1Ptr = + _lookup)>>('wait'); + late final _wait1 = + _wait1Ptr.asFunction)>(); - objc_objectptr_t objc_unretainedPointer( - ffi.Pointer obj, + int waitpid( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _objc_unretainedPointer( - obj, + return _waitpid( + arg0, + arg1, + arg2, ); } - late final _objc_unretainedPointerPtr = _lookup< + late final _waitpidPtr = _lookup< ffi.NativeFunction< - objc_objectptr_t Function( - ffi.Pointer)>>('objc_unretainedPointer'); - late final _objc_unretainedPointer = _objc_unretainedPointerPtr - .asFunction)>(); - - ffi.Pointer _registerName1(String name) { - final cstr = name.toNativeUtf8(); - final sel = _sel_registerName(cstr.cast()); - pkg_ffi.calloc.free(cstr); - return sel; - } + pid_t Function(pid_t, ffi.Pointer, ffi.Int)>>('waitpid'); + late final _waitpid = + _waitpidPtr.asFunction, int)>(); - ffi.Pointer _sel_registerName( - ffi.Pointer str, + int waitid( + int arg0, + int arg1, + ffi.Pointer arg2, + int arg3, ) { - return __sel_registerName( - str, + return _waitid( + arg0, + arg1, + arg2, + arg3, ); } - late final __sel_registerNamePtr = _lookup< + late final _waitidPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('sel_registerName'); - late final __sel_registerName = __sel_registerNamePtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer _getClass1(String name) { - final cstr = name.toNativeUtf8(); - final clazz = _objc_getClass(cstr.cast()); - pkg_ffi.calloc.free(cstr); - if (clazz == ffi.nullptr) { - throw Exception('Failed to load Objective-C class: $name'); - } - return clazz; - } + ffi.Int Function( + ffi.Int32, id_t, ffi.Pointer, ffi.Int)>>('waitid'); + late final _waitid = _waitidPtr + .asFunction, int)>(); - ffi.Pointer _objc_getClass( - ffi.Pointer str, + int wait3( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, ) { - return __objc_getClass( - str, + return _wait3( + arg0, + arg1, + arg2, ); } - late final __objc_getClassPtr = _lookup< + late final _wait3Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('objc_getClass'); - late final __objc_getClass = __objc_getClassPtr - .asFunction Function(ffi.Pointer)>(); + pid_t Function( + ffi.Pointer, ffi.Int, ffi.Pointer)>>('wait3'); + late final _wait3 = _wait3Ptr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); - ffi.Pointer _objc_retain( - ffi.Pointer value, + int wait4( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return __objc_retain( - value, + return _wait4( + arg0, + arg1, + arg2, + arg3, ); } - late final __objc_retainPtr = _lookup< + late final _wait4Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('objc_retain'); - late final __objc_retain = __objc_retainPtr - .asFunction Function(ffi.Pointer)>(); + pid_t Function(pid_t, ffi.Pointer, ffi.Int, + ffi.Pointer)>>('wait4'); + late final _wait4 = _wait4Ptr.asFunction< + int Function(int, ffi.Pointer, int, ffi.Pointer)>(); - void _objc_release( - ffi.Pointer value, + ffi.Pointer alloca( + int arg0, ) { - return __objc_release( - value, + return _alloca( + arg0, ); } - late final __objc_releasePtr = - _lookup)>>( - 'objc_release'); - late final __objc_release = - __objc_releasePtr.asFunction)>(); + late final _allocaPtr = + _lookup Function(ffi.Size)>>( + 'alloca'); + late final _alloca = + _allocaPtr.asFunction Function(int)>(); - late final _objc_releaseFinalizer2 = - ffi.NativeFinalizer(__objc_releasePtr.cast()); - late final _class_NSObject1 = _getClass1("NSObject"); - late final _sel_load1 = _registerName1("load"); - void _objc_msgSend_1( - ffi.Pointer obj, - ffi.Pointer sel, + late final ffi.Pointer ___mb_cur_max = + _lookup('__mb_cur_max'); + + int get __mb_cur_max => ___mb_cur_max.value; + + set __mb_cur_max(int value) => ___mb_cur_max.value = value; + + ffi.Pointer malloc( + int __size, ) { - return __objc_msgSend_1( - obj, - sel, + return _malloc( + __size, ); } - late final __objc_msgSend_1Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + late final _mallocPtr = + _lookup Function(ffi.Size)>>( + 'malloc'); + late final _malloc = + _mallocPtr.asFunction Function(int)>(); - late final _sel_initialize1 = _registerName1("initialize"); - late final _sel_init1 = _registerName1("init"); - instancetype _objc_msgSend_2( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer calloc( + int __count, + int __size, ) { - return __objc_msgSend_2( - obj, - sel, + return _calloc( + __count, + __size, ); } - late final __objc_msgSend_2Ptr = _lookup< + late final _callocPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Size, ffi.Size)>>('calloc'); + late final _calloc = + _callocPtr.asFunction Function(int, int)>(); - late final _sel_new1 = _registerName1("new"); - late final _sel_allocWithZone_1 = _registerName1("allocWithZone:"); - instancetype _objc_msgSend_3( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_NSZone> zone, + void free( + ffi.Pointer arg0, ) { - return __objc_msgSend_3( - obj, - sel, - zone, + return _free( + arg0, ); } - late final __objc_msgSend_3Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>>('objc_msgSend'); - late final __objc_msgSend_3 = __objc_msgSend_3Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>(); + late final _freePtr = + _lookup)>>( + 'free'); + late final _free = + _freePtr.asFunction)>(); - late final _sel_alloc1 = _registerName1("alloc"); - late final _sel_dealloc1 = _registerName1("dealloc"); - late final _sel_finalize1 = _registerName1("finalize"); - late final _sel_copy1 = _registerName1("copy"); - late final _sel_mutableCopy1 = _registerName1("mutableCopy"); - late final _sel_copyWithZone_1 = _registerName1("copyWithZone:"); - late final _sel_mutableCopyWithZone_1 = - _registerName1("mutableCopyWithZone:"); - late final _sel_instancesRespondToSelector_1 = - _registerName1("instancesRespondToSelector:"); - bool _objc_msgSend_4( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, + ffi.Pointer realloc( + ffi.Pointer __ptr, + int __size, ) { - return __objc_msgSend_4( - obj, - sel, - aSelector, + return _realloc( + __ptr, + __size, ); } - late final __objc_msgSend_4Ptr = _lookup< + late final _reallocPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('realloc'); + late final _realloc = _reallocPtr + .asFunction Function(ffi.Pointer, int)>(); - bool _objc_msgSend_0( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer clazz, + ffi.Pointer valloc( + int arg0, ) { - return __objc_msgSend_0( - obj, - sel, - clazz, + return _valloc( + arg0, ); } - late final __objc_msgSend_0Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _vallocPtr = + _lookup Function(ffi.Size)>>( + 'valloc'); + late final _valloc = + _vallocPtr.asFunction Function(int)>(); - late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); - late final _class_Protocol1 = _getClass1("Protocol"); - late final _sel_conformsToProtocol_1 = _registerName1("conformsToProtocol:"); - bool _objc_msgSend_5( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer protocol, + ffi.Pointer aligned_alloc( + int __alignment, + int __size, ) { - return __objc_msgSend_5( - obj, - sel, - protocol, + return _aligned_alloc( + __alignment, + __size, ); } - late final __objc_msgSend_5Ptr = _lookup< + late final _aligned_allocPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_5 = __objc_msgSend_5Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Size, ffi.Size)>>('aligned_alloc'); + late final _aligned_alloc = + _aligned_allocPtr.asFunction Function(int, int)>(); - late final _sel_methodForSelector_1 = _registerName1("methodForSelector:"); - IMP _objc_msgSend_6( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, + int posix_memalign( + ffi.Pointer> __memptr, + int __alignment, + int __size, ) { - return __objc_msgSend_6( - obj, - sel, - aSelector, + return _posix_memalign( + __memptr, + __alignment, + __size, ); } - late final __objc_msgSend_6Ptr = _lookup< + late final _posix_memalignPtr = _lookup< ffi.NativeFunction< - IMP Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction< - IMP Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, ffi.Size, + ffi.Size)>>('posix_memalign'); + late final _posix_memalign = _posix_memalignPtr + .asFunction>, int, int)>(); - late final _sel_instanceMethodForSelector_1 = - _registerName1("instanceMethodForSelector:"); - late final _sel_doesNotRecognizeSelector_1 = - _registerName1("doesNotRecognizeSelector:"); - void _objc_msgSend_7( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_7( - obj, - sel, - aSelector, - ); + void abort() { + return _abort(); } - late final __objc_msgSend_7Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _abortPtr = + _lookup>('abort'); + late final _abort = _abortPtr.asFunction(); - late final _sel_forwardingTargetForSelector_1 = - _registerName1("forwardingTargetForSelector:"); - ffi.Pointer _objc_msgSend_8( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, + int abs( + int arg0, ) { - return __objc_msgSend_8( - obj, - sel, - aSelector, + return _abs( + arg0, ); } - late final __objc_msgSend_8Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _absPtr = + _lookup>('abs'); + late final _abs = _absPtr.asFunction(); - late final _class_NSInvocation1 = _getClass1("NSInvocation"); - late final _sel_forwardInvocation_1 = _registerName1("forwardInvocation:"); - void _objc_msgSend_9( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anInvocation, + int atexit( + ffi.Pointer> arg0, ) { - return __objc_msgSend_9( - obj, - sel, - anInvocation, + return _atexit( + arg0, ); } - late final __objc_msgSend_9Ptr = _lookup< + late final _atexitPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_9 = __objc_msgSend_9Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer>)>>('atexit'); + late final _atexit = _atexitPtr.asFunction< + int Function(ffi.Pointer>)>(); - late final _class_NSMethodSignature1 = _getClass1("NSMethodSignature"); - late final _sel_methodSignatureForSelector_1 = - _registerName1("methodSignatureForSelector:"); - ffi.Pointer _objc_msgSend_10( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, + double atof( + ffi.Pointer arg0, ) { - return __objc_msgSend_10( - obj, - sel, - aSelector, + return _atof( + arg0, ); } - late final __objc_msgSend_10Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _atofPtr = + _lookup)>>( + 'atof'); + late final _atof = + _atofPtr.asFunction)>(); - late final _sel_instanceMethodSignatureForSelector_1 = - _registerName1("instanceMethodSignatureForSelector:"); - late final _sel_allowsWeakReference1 = _registerName1("allowsWeakReference"); - bool _objc_msgSend_11( - ffi.Pointer obj, - ffi.Pointer sel, + int atoi( + ffi.Pointer arg0, ) { - return __objc_msgSend_11( - obj, - sel, + return _atoi( + arg0, ); } - late final __objc_msgSend_11Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); + late final _atoiPtr = + _lookup)>>( + 'atoi'); + late final _atoi = _atoiPtr.asFunction)>(); - late final _sel_retainWeakReference1 = _registerName1("retainWeakReference"); - late final _sel_isSubclassOfClass_1 = _registerName1("isSubclassOfClass:"); - late final _sel_resolveClassMethod_1 = _registerName1("resolveClassMethod:"); - late final _sel_resolveInstanceMethod_1 = - _registerName1("resolveInstanceMethod:"); - late final _sel_hash1 = _registerName1("hash"); - int _objc_msgSend_12( - ffi.Pointer obj, - ffi.Pointer sel, + int atol( + ffi.Pointer arg0, ) { - return __objc_msgSend_12( - obj, - sel, + return _atol( + arg0, ); } - late final __objc_msgSend_12Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_12 = __objc_msgSend_12Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _atolPtr = + _lookup)>>( + 'atol'); + late final _atol = _atolPtr.asFunction)>(); - late final _sel_superclass1 = _registerName1("superclass"); - late final _sel_class1 = _registerName1("class"); - late final _class_NSString1 = _getClass1("NSString"); - late final _sel_length1 = _registerName1("length"); - late final _sel_characterAtIndex_1 = _registerName1("characterAtIndex:"); - int _objc_msgSend_13( - ffi.Pointer obj, - ffi.Pointer sel, - int index, + int atoll( + ffi.Pointer arg0, ) { - return __objc_msgSend_13( - obj, - sel, - index, + return _atoll( + arg0, ); } - late final __objc_msgSend_13Ptr = _lookup< - ffi.NativeFunction< - unichar Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _atollPtr = + _lookup)>>( + 'atoll'); + late final _atoll = + _atollPtr.asFunction)>(); - late final _class_NSCoder1 = _getClass1("NSCoder"); - late final _sel_initWithCoder_1 = _registerName1("initWithCoder:"); - instancetype _objc_msgSend_14( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer coder, + ffi.Pointer bsearch( + ffi.Pointer __key, + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_14( - obj, - sel, - coder, + return _bsearch( + __key, + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_14Ptr = _lookup< + late final _bsearchPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('bsearch'); + late final _bsearch = _bsearchPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); - ffi.Pointer _objc_msgSend_15( - ffi.Pointer obj, - ffi.Pointer sel, - int from, + div_t div( + int arg0, + int arg1, ) { - return __objc_msgSend_15( - obj, - sel, - from, + return _div( + arg0, + arg1, ); } - late final __objc_msgSend_15Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _divPtr = + _lookup>('div'); + late final _div = _divPtr.asFunction(); - late final _sel_substringToIndex_1 = _registerName1("substringToIndex:"); - late final _sel_substringWithRange_1 = _registerName1("substringWithRange:"); - ffi.Pointer _objc_msgSend_16( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + void exit( + int arg0, ) { - return __objc_msgSend_16( - obj, - sel, - range, + return _exit1( + arg0, ); } - late final __objc_msgSend_16Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + late final _exitPtr = + _lookup>('exit'); + late final _exit1 = _exitPtr.asFunction(); - late final _sel_getCharacters_range_1 = - _registerName1("getCharacters:range:"); - void _objc_msgSend_17( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - NSRange range, + ffi.Pointer getenv( + ffi.Pointer arg0, ) { - return __objc_msgSend_17( - obj, - sel, - buffer, - range, + return _getenv( + arg0, ); } - late final __objc_msgSend_17Ptr = _lookup< + late final _getenvPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + ffi.Pointer Function(ffi.Pointer)>>('getenv'); + late final _getenv = _getenvPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_compare_1 = _registerName1("compare:"); - int _objc_msgSend_18( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, + int labs( + int arg0, ) { - return __objc_msgSend_18( - obj, - sel, - string, + return _labs( + arg0, ); } - late final __objc_msgSend_18Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _labsPtr = + _lookup>('labs'); + late final _labs = _labsPtr.asFunction(); - late final _sel_compare_options_1 = _registerName1("compare:options:"); - int _objc_msgSend_19( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, + ldiv_t ldiv( + int arg0, + int arg1, ) { - return __objc_msgSend_19( - obj, - sel, - string, - mask, + return _ldiv( + arg0, + arg1, ); } - late final __objc_msgSend_19Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _ldivPtr = + _lookup>('ldiv'); + late final _ldiv = _ldivPtr.asFunction(); - late final _sel_compare_options_range_1 = - _registerName1("compare:options:range:"); - int _objc_msgSend_20( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - NSRange rangeOfReceiverToCompare, + int llabs( + int arg0, ) { - return __objc_msgSend_20( - obj, - sel, - string, - mask, - rangeOfReceiverToCompare, + return _llabs( + arg0, ); } - late final __objc_msgSend_20Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + late final _llabsPtr = + _lookup>('llabs'); + late final _llabs = _llabsPtr.asFunction(); - late final _sel_compare_options_range_locale_1 = - _registerName1("compare:options:range:locale:"); - int _objc_msgSend_21( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - NSRange rangeOfReceiverToCompare, - ffi.Pointer locale, + lldiv_t lldiv( + int arg0, + int arg1, ) { - return __objc_msgSend_21( - obj, - sel, - string, - mask, - rangeOfReceiverToCompare, - locale, + return _lldiv( + arg0, + arg1, ); } - late final __objc_msgSend_21Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange, ffi.Pointer)>(); + late final _lldivPtr = + _lookup>( + 'lldiv'); + late final _lldiv = _lldivPtr.asFunction(); - late final _sel_caseInsensitiveCompare_1 = - _registerName1("caseInsensitiveCompare:"); - late final _sel_localizedCompare_1 = _registerName1("localizedCompare:"); - late final _sel_localizedCaseInsensitiveCompare_1 = - _registerName1("localizedCaseInsensitiveCompare:"); - late final _sel_localizedStandardCompare_1 = - _registerName1("localizedStandardCompare:"); - late final _sel_isEqualToString_1 = _registerName1("isEqualToString:"); - bool _objc_msgSend_22( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, + int mblen( + ffi.Pointer __s, + int __n, ) { - return __objc_msgSend_22( - obj, - sel, - aString, + return _mblen( + __s, + __n, ); } - late final __objc_msgSend_22Ptr = _lookup< + late final _mblenPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Size)>>('mblen'); + late final _mblen = + _mblenPtr.asFunction, int)>(); - late final _sel_hasPrefix_1 = _registerName1("hasPrefix:"); - late final _sel_hasSuffix_1 = _registerName1("hasSuffix:"); - late final _sel_commonPrefixWithString_options_1 = - _registerName1("commonPrefixWithString:options:"); - ffi.Pointer _objc_msgSend_23( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - int mask, + int mbstowcs( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_23( - obj, - sel, - str, - mask, + return _mbstowcs( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_23Ptr = _lookup< + late final _mbstowcsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Size Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('mbstowcs'); + late final _mbstowcs = _mbstowcsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_containsString_1 = _registerName1("containsString:"); - late final _sel_localizedCaseInsensitiveContainsString_1 = - _registerName1("localizedCaseInsensitiveContainsString:"); - late final _sel_localizedStandardContainsString_1 = - _registerName1("localizedStandardContainsString:"); - late final _sel_localizedStandardRangeOfString_1 = - _registerName1("localizedStandardRangeOfString:"); - NSRange _objc_msgSend_24( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, + int mbtowc( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_24( - obj, - sel, - str, + return _mbtowc( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_24Ptr = _lookup< + late final _mbtowcPtr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('mbtowc'); + late final _mbtowc = _mbtowcPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); - late final _sel_rangeOfString_options_1 = - _registerName1("rangeOfString:options:"); - NSRange _objc_msgSend_25( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, + void qsort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_25( - obj, - sel, - searchString, - mask, + return _qsort( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_25Ptr = _lookup< + late final _qsortPtr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('qsort'); + late final _qsort = _qsortPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - late final _sel_rangeOfString_options_range_1 = - _registerName1("rangeOfString:options:range:"); - NSRange _objc_msgSend_26( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - NSRange rangeOfReceiverToSearch, + int rand() { + return _rand(); + } + + late final _randPtr = _lookup>('rand'); + late final _rand = _randPtr.asFunction(); + + void srand( + int arg0, ) { - return __objc_msgSend_26( - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, + return _srand( + arg0, ); } - late final __objc_msgSend_26Ptr = _lookup< - ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + late final _srandPtr = + _lookup>('srand'); + late final _srand = _srandPtr.asFunction(); - late final _class_NSLocale1 = _getClass1("NSLocale"); - late final _sel_rangeOfString_options_range_locale_1 = - _registerName1("rangeOfString:options:range:locale:"); - NSRange _objc_msgSend_27( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - NSRange rangeOfReceiverToSearch, - ffi.Pointer locale, + double strtod( + ffi.Pointer arg0, + ffi.Pointer> arg1, ) { - return __objc_msgSend_27( - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - locale, + return _strtod( + arg0, + arg1, ); } - late final __objc_msgSend_27Ptr = _lookup< + late final _strtodPtr = _lookup< ffi.NativeFunction< - NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange, ffi.Pointer)>(); + ffi.Double Function(ffi.Pointer, + ffi.Pointer>)>>('strtod'); + late final _strtod = _strtodPtr.asFunction< + double Function( + ffi.Pointer, ffi.Pointer>)>(); - late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); - late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); - ffi.Pointer _objc_msgSend_28( - ffi.Pointer obj, - ffi.Pointer sel, + double strtof( + ffi.Pointer arg0, + ffi.Pointer> arg1, ) { - return __objc_msgSend_28( - obj, - sel, + return _strtof( + arg0, + arg1, ); } - late final __objc_msgSend_28Ptr = _lookup< + late final _strtofPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Float Function(ffi.Pointer, + ffi.Pointer>)>>('strtof'); + late final _strtof = _strtofPtr.asFunction< + double Function( + ffi.Pointer, ffi.Pointer>)>(); - late final _sel_whitespaceCharacterSet1 = - _registerName1("whitespaceCharacterSet"); - late final _sel_whitespaceAndNewlineCharacterSet1 = - _registerName1("whitespaceAndNewlineCharacterSet"); - late final _sel_decimalDigitCharacterSet1 = - _registerName1("decimalDigitCharacterSet"); - late final _sel_letterCharacterSet1 = _registerName1("letterCharacterSet"); - late final _sel_lowercaseLetterCharacterSet1 = - _registerName1("lowercaseLetterCharacterSet"); - late final _sel_uppercaseLetterCharacterSet1 = - _registerName1("uppercaseLetterCharacterSet"); - late final _sel_nonBaseCharacterSet1 = _registerName1("nonBaseCharacterSet"); - late final _sel_alphanumericCharacterSet1 = - _registerName1("alphanumericCharacterSet"); - late final _sel_decomposableCharacterSet1 = - _registerName1("decomposableCharacterSet"); - late final _sel_illegalCharacterSet1 = _registerName1("illegalCharacterSet"); - late final _sel_punctuationCharacterSet1 = - _registerName1("punctuationCharacterSet"); - late final _sel_capitalizedLetterCharacterSet1 = - _registerName1("capitalizedLetterCharacterSet"); - late final _sel_symbolCharacterSet1 = _registerName1("symbolCharacterSet"); - late final _sel_newlineCharacterSet1 = _registerName1("newlineCharacterSet"); - late final _sel_characterSetWithRange_1 = - _registerName1("characterSetWithRange:"); - ffi.Pointer _objc_msgSend_29( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange aRange, + int strtol( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_29( - obj, - sel, - aRange, + return _strtol( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_29Ptr = _lookup< + late final _strtolPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Long Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtol'); + late final _strtol = _strtolPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final _sel_characterSetWithCharactersInString_1 = - _registerName1("characterSetWithCharactersInString:"); - ffi.Pointer _objc_msgSend_30( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, + int strtoll( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_30( - obj, - sel, - aString, + return _strtoll( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_30Ptr = _lookup< + late final _strtollPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoll'); + late final _strtoll = _strtollPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final _class_NSData1 = _getClass1("NSData"); - late final _sel_bytes1 = _registerName1("bytes"); - ffi.Pointer _objc_msgSend_31( - ffi.Pointer obj, - ffi.Pointer sel, + int strtoul( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_31( - obj, - sel, + return _strtoul( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_31Ptr = _lookup< + late final _strtoulPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoul'); + late final _strtoul = _strtoulPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final _sel_description1 = _registerName1("description"); - ffi.Pointer _objc_msgSend_32( - ffi.Pointer obj, - ffi.Pointer sel, + int strtoull( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_32( - obj, - sel, + return _strtoull( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_32Ptr = _lookup< + late final _strtoullPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoull'); + late final _strtoull = _strtoullPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final _sel_getBytes_length_1 = _registerName1("getBytes:length:"); - void _objc_msgSend_33( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int length, + int system( + ffi.Pointer arg0, ) { - return __objc_msgSend_33( - obj, - sel, - buffer, - length, + return _system( + arg0, ); } - late final __objc_msgSend_33Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _systemPtr = + _lookup)>>( + 'system'); + late final _system = + _systemPtr.asFunction)>(); - late final _sel_getBytes_range_1 = _registerName1("getBytes:range:"); - void _objc_msgSend_34( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - NSRange range, + int wcstombs( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_34( - obj, - sel, - buffer, - range, + return _wcstombs( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_34Ptr = _lookup< + late final _wcstombsPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + ffi.Size Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('wcstombs'); + late final _wcstombs = _wcstombsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); - bool _objc_msgSend_35( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, + int wctomb( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_35( - obj, - sel, - other, + return _wctomb( + arg0, + arg1, ); } - late final __objc_msgSend_35Ptr = _lookup< + late final _wctombPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.WChar)>>('wctomb'); + late final _wctomb = + _wctombPtr.asFunction, int)>(); - late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); - ffi.Pointer _objc_msgSend_36( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + void _Exit( + int arg0, ) { - return __objc_msgSend_36( - obj, - sel, - range, + return __Exit( + arg0, ); } - late final __objc_msgSend_36Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + late final __ExitPtr = + _lookup>('_Exit'); + late final __Exit = __ExitPtr.asFunction(); - late final _sel_writeToFile_atomically_1 = - _registerName1("writeToFile:atomically:"); - bool _objc_msgSend_37( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool useAuxiliaryFile, + int a64l( + ffi.Pointer arg0, ) { - return __objc_msgSend_37( - obj, - sel, - path, - useAuxiliaryFile, + return _a64l( + arg0, ); } - late final __objc_msgSend_37Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + late final _a64lPtr = + _lookup)>>( + 'a64l'); + late final _a64l = _a64lPtr.asFunction)>(); - late final _class_NSURL1 = _getClass1("NSURL"); - late final _sel_initWithScheme_host_path_1 = - _registerName1("initWithScheme:host:path:"); - instancetype _objc_msgSend_38( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer scheme, - ffi.Pointer host, - ffi.Pointer path, + double drand48() { + return _drand48(); + } + + late final _drand48Ptr = + _lookup>('drand48'); + late final _drand48 = _drand48Ptr.asFunction(); + + ffi.Pointer ecvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return __objc_msgSend_38( - obj, - sel, - scheme, - host, - path, + return _ecvt( + arg0, + arg1, + arg2, + arg3, ); } - late final __objc_msgSend_38Ptr = _lookup< + late final _ecvtPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_38 = __objc_msgSend_38Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Double, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('ecvt'); + late final _ecvt = _ecvtPtr.asFunction< + ffi.Pointer Function( + double, int, ffi.Pointer, ffi.Pointer)>(); - late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = - _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_39( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, + double erand48( + ffi.Pointer arg0, ) { - return __objc_msgSend_39( - obj, - sel, - path, - isDir, - baseURL, + return _erand48( + arg0, ); } - late final __objc_msgSend_39Ptr = _lookup< + late final _erand48Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, ffi.Pointer)>(); - - late final _sel_initFileURLWithPath_relativeToURL_1 = - _registerName1("initFileURLWithPath:relativeToURL:"); - instancetype _objc_msgSend_40( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer baseURL, + ffi.Double Function(ffi.Pointer)>>('erand48'); + late final _erand48 = + _erand48Ptr.asFunction)>(); + + ffi.Pointer fcvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return __objc_msgSend_40( - obj, - sel, - path, - baseURL, + return _fcvt( + arg0, + arg1, + arg2, + arg3, ); } - late final __objc_msgSend_40Ptr = _lookup< + late final _fcvtPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Double, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('fcvt'); + late final _fcvt = _fcvtPtr.asFunction< + ffi.Pointer Function( + double, int, ffi.Pointer, ffi.Pointer)>(); - late final _sel_initFileURLWithPath_isDirectory_1 = - _registerName1("initFileURLWithPath:isDirectory:"); - instancetype _objc_msgSend_41( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, + ffi.Pointer gcvt( + double arg0, + int arg1, + ffi.Pointer arg2, ) { - return __objc_msgSend_41( - obj, - sel, - path, - isDir, + return _gcvt( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_41Ptr = _lookup< + late final _gcvtPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer Function( + ffi.Double, ffi.Int, ffi.Pointer)>>('gcvt'); + late final _gcvt = _gcvtPtr.asFunction< + ffi.Pointer Function(double, int, ffi.Pointer)>(); - late final _sel_initFileURLWithPath_1 = - _registerName1("initFileURLWithPath:"); - instancetype _objc_msgSend_42( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + int getsubopt( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer> arg2, ) { - return __objc_msgSend_42( - obj, - sel, - path, + return _getsubopt( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_42Ptr = _lookup< + late final _getsuboptPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>)>>('getsubopt'); + late final _getsubopt = _getsuboptPtr.asFunction< + int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_fileURLWithPath_isDirectory_relativeToURL_1 = - _registerName1("fileURLWithPath:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_43( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, + int grantpt( + int arg0, ) { - return __objc_msgSend_43( - obj, - sel, - path, - isDir, - baseURL, + return _grantpt( + arg0, ); } - late final __objc_msgSend_43Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); + late final _grantptPtr = + _lookup>('grantpt'); + late final _grantpt = _grantptPtr.asFunction(); - late final _sel_fileURLWithPath_relativeToURL_1 = - _registerName1("fileURLWithPath:relativeToURL:"); - ffi.Pointer _objc_msgSend_44( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer baseURL, + ffi.Pointer initstate( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_44( - obj, - sel, - path, - baseURL, + return _initstate( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_44Ptr = _lookup< + late final _initstatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.UnsignedInt, ffi.Pointer, ffi.Size)>>('initstate'); + late final _initstate = _initstatePtr.asFunction< + ffi.Pointer Function(int, ffi.Pointer, int)>(); - late final _sel_fileURLWithPath_isDirectory_1 = - _registerName1("fileURLWithPath:isDirectory:"); - ffi.Pointer _objc_msgSend_45( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, + int jrand48( + ffi.Pointer arg0, ) { - return __objc_msgSend_45( - obj, - sel, - path, - isDir, + return _jrand48( + arg0, ); } - late final __objc_msgSend_45Ptr = _lookup< + late final _jrand48Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Long Function(ffi.Pointer)>>('jrand48'); + late final _jrand48 = + _jrand48Ptr.asFunction)>(); - late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); - ffi.Pointer _objc_msgSend_46( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer l64a( + int arg0, ) { - return __objc_msgSend_46( - obj, - sel, - path, + return _l64a( + arg0, ); } - late final __objc_msgSend_46Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _l64aPtr = + _lookup Function(ffi.Long)>>( + 'l64a'); + late final _l64a = _l64aPtr.asFunction Function(int)>(); - late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = - _registerName1( - "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_47( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, + void lcong48( + ffi.Pointer arg0, ) { - return __objc_msgSend_47( - obj, - sel, - path, - isDir, - baseURL, + return _lcong48( + arg0, ); } - late final __objc_msgSend_47Ptr = _lookup< + late final _lcong48Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer)>>('lcong48'); + late final _lcong48 = + _lcong48Ptr.asFunction)>(); - late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = - _registerName1( - "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_48( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_48( - obj, - sel, - path, - isDir, - baseURL, - ); + int lrand48() { + return _lrand48(); } - late final __objc_msgSend_48Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); + late final _lrand48Ptr = + _lookup>('lrand48'); + late final _lrand48 = _lrand48Ptr.asFunction(); - late final _sel_initWithString_1 = _registerName1("initWithString:"); - late final _sel_initWithString_relativeToURL_1 = - _registerName1("initWithString:relativeToURL:"); - late final _sel_URLWithString_1 = _registerName1("URLWithString:"); - late final _sel_URLWithString_relativeToURL_1 = - _registerName1("URLWithString:relativeToURL:"); - late final _sel_initWithDataRepresentation_relativeToURL_1 = - _registerName1("initWithDataRepresentation:relativeToURL:"); - instancetype _objc_msgSend_49( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer baseURL, + ffi.Pointer mktemp( + ffi.Pointer arg0, ) { - return __objc_msgSend_49( - obj, - sel, - data, - baseURL, + return _mktemp( + arg0, ); } - late final __objc_msgSend_49Ptr = _lookup< + late final _mktempPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer)>>('mktemp'); + late final _mktemp = _mktempPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_URLWithDataRepresentation_relativeToURL_1 = - _registerName1("URLWithDataRepresentation:relativeToURL:"); - ffi.Pointer _objc_msgSend_50( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer baseURL, + int mkstemp( + ffi.Pointer arg0, ) { - return __objc_msgSend_50( - obj, - sel, - data, - baseURL, + return _mkstemp( + arg0, ); } - late final __objc_msgSend_50Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _mkstempPtr = + _lookup)>>( + 'mkstemp'); + late final _mkstemp = + _mkstempPtr.asFunction)>(); - late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1 = - _registerName1("initAbsoluteURLWithDataRepresentation:relativeToURL:"); - late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = - _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); - late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); - ffi.Pointer _objc_msgSend_51( - ffi.Pointer obj, - ffi.Pointer sel, + int mrand48() { + return _mrand48(); + } + + late final _mrand48Ptr = + _lookup>('mrand48'); + late final _mrand48 = _mrand48Ptr.asFunction(); + + int nrand48( + ffi.Pointer arg0, ) { - return __objc_msgSend_51( - obj, - sel, + return _nrand48( + arg0, ); } - late final __objc_msgSend_51Ptr = _lookup< + late final _nrand48Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Long Function(ffi.Pointer)>>('nrand48'); + late final _nrand48 = + _nrand48Ptr.asFunction)>(); - late final _sel_absoluteString1 = _registerName1("absoluteString"); - late final _sel_relativeString1 = _registerName1("relativeString"); - late final _sel_baseURL1 = _registerName1("baseURL"); - ffi.Pointer _objc_msgSend_52( - ffi.Pointer obj, - ffi.Pointer sel, + int posix_openpt( + int arg0, ) { - return __objc_msgSend_52( - obj, - sel, + return _posix_openpt( + arg0, ); } - late final __objc_msgSend_52Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _posix_openptPtr = + _lookup>('posix_openpt'); + late final _posix_openpt = _posix_openptPtr.asFunction(); - late final _sel_absoluteURL1 = _registerName1("absoluteURL"); - late final _sel_scheme1 = _registerName1("scheme"); - late final _sel_resourceSpecifier1 = _registerName1("resourceSpecifier"); - late final _sel_host1 = _registerName1("host"); - late final _class_NSNumber1 = _getClass1("NSNumber"); - late final _class_NSValue1 = _getClass1("NSValue"); - late final _sel_getValue_size_1 = _registerName1("getValue:size:"); - late final _sel_objCType1 = _registerName1("objCType"); - ffi.Pointer _objc_msgSend_53( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer ptsname( + int arg0, ) { - return __objc_msgSend_53( - obj, - sel, + return _ptsname( + arg0, ); } - late final __objc_msgSend_53Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _ptsnamePtr = + _lookup Function(ffi.Int)>>( + 'ptsname'); + late final _ptsname = + _ptsnamePtr.asFunction Function(int)>(); - late final _sel_initWithBytes_objCType_1 = - _registerName1("initWithBytes:objCType:"); - instancetype _objc_msgSend_54( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer type, + int ptsname_r( + int fildes, + ffi.Pointer buffer, + int buflen, ) { - return __objc_msgSend_54( - obj, - sel, - value, - type, + return _ptsname_r( + fildes, + buffer, + buflen, ); } - late final __objc_msgSend_54Ptr = _lookup< + late final _ptsname_rPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('ptsname_r'); + late final _ptsname_r = + _ptsname_rPtr.asFunction, int)>(); - late final _sel_valueWithBytes_objCType_1 = - _registerName1("valueWithBytes:objCType:"); - ffi.Pointer _objc_msgSend_55( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer type, + int putenv( + ffi.Pointer arg0, ) { - return __objc_msgSend_55( - obj, - sel, - value, - type, + return _putenv( + arg0, ); } - late final __objc_msgSend_55Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _putenvPtr = + _lookup)>>( + 'putenv'); + late final _putenv = + _putenvPtr.asFunction)>(); - late final _sel_value_withObjCType_1 = _registerName1("value:withObjCType:"); - late final _sel_valueWithNonretainedObject_1 = - _registerName1("valueWithNonretainedObject:"); - ffi.Pointer _objc_msgSend_56( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_56( - obj, - sel, - anObject, - ); + int random() { + return _random(); } - late final __objc_msgSend_56Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _randomPtr = + _lookup>('random'); + late final _random = _randomPtr.asFunction(); - late final _sel_nonretainedObjectValue1 = - _registerName1("nonretainedObjectValue"); - late final _sel_valueWithPointer_1 = _registerName1("valueWithPointer:"); - ffi.Pointer _objc_msgSend_57( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pointer, + int rand_r( + ffi.Pointer arg0, ) { - return __objc_msgSend_57( - obj, - sel, - pointer, + return _rand_r( + arg0, ); } - late final __objc_msgSend_57Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _rand_rPtr = _lookup< + ffi.NativeFunction)>>( + 'rand_r'); + late final _rand_r = + _rand_rPtr.asFunction)>(); - late final _sel_pointerValue1 = _registerName1("pointerValue"); - late final _sel_isEqualToValue_1 = _registerName1("isEqualToValue:"); - bool _objc_msgSend_58( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer realpath( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_58( - obj, - sel, - value, + return _realpath( + arg0, + arg1, ); } - late final __objc_msgSend_58Ptr = _lookup< + late final _realpathPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('realpath'); + late final _realpath = _realpathPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_getValue_1 = _registerName1("getValue:"); - void _objc_msgSend_59( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer seed48( + ffi.Pointer arg0, ) { - return __objc_msgSend_59( - obj, - sel, - value, + return _seed48( + arg0, ); } - late final __objc_msgSend_59Ptr = _lookup< + late final _seed48Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('seed48'); + late final _seed48 = _seed48Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer)>(); - late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); - ffi.Pointer _objc_msgSend_60( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + int setenv( + ffi.Pointer __name, + ffi.Pointer __value, + int __overwrite, ) { - return __objc_msgSend_60( - obj, - sel, - range, + return _setenv( + __name, + __value, + __overwrite, ); } - late final __objc_msgSend_60Ptr = _lookup< + late final _setenvPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('setenv'); + late final _setenv = _setenvPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_rangeValue1 = _registerName1("rangeValue"); - NSRange _objc_msgSend_61( - ffi.Pointer obj, - ffi.Pointer sel, + void setkey( + ffi.Pointer arg0, ) { - return __objc_msgSend_61( - obj, - sel, + return _setkey( + arg0, ); } - late final __objc_msgSend_61Ptr = _lookup< - ffi.NativeFunction< - NSRange Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer)>(); + late final _setkeyPtr = + _lookup)>>( + 'setkey'); + late final _setkey = + _setkeyPtr.asFunction)>(); - late final _sel_initWithChar_1 = _registerName1("initWithChar:"); - ffi.Pointer _objc_msgSend_62( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + ffi.Pointer setstate( + ffi.Pointer arg0, ) { - return __objc_msgSend_62( - obj, - sel, - value, + return _setstate( + arg0, ); } - late final __objc_msgSend_62Ptr = _lookup< + late final _setstatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Char)>>('objc_msgSend'); - late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer)>>('setstate'); + late final _setstate = _setstatePtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_initWithUnsignedChar_1 = - _registerName1("initWithUnsignedChar:"); - ffi.Pointer _objc_msgSend_63( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void srand48( + int arg0, ) { - return __objc_msgSend_63( - obj, - sel, - value, + return _srand48( + arg0, ); } - late final __objc_msgSend_63Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); - late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _srand48Ptr = + _lookup>('srand48'); + late final _srand48 = _srand48Ptr.asFunction(); - late final _sel_initWithShort_1 = _registerName1("initWithShort:"); - ffi.Pointer _objc_msgSend_64( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void srandom( + int arg0, ) { - return __objc_msgSend_64( - obj, - sel, - value, + return _srandom( + arg0, ); } - late final __objc_msgSend_64Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Short)>>('objc_msgSend'); - late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _srandomPtr = + _lookup>( + 'srandom'); + late final _srandom = _srandomPtr.asFunction(); - late final _sel_initWithUnsignedShort_1 = - _registerName1("initWithUnsignedShort:"); - ffi.Pointer _objc_msgSend_65( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int unlockpt( + int arg0, ) { - return __objc_msgSend_65( - obj, - sel, - value, + return _unlockpt( + arg0, ); } - late final __objc_msgSend_65Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); - late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _unlockptPtr = + _lookup>('unlockpt'); + late final _unlockpt = _unlockptPtr.asFunction(); - late final _sel_initWithInt_1 = _registerName1("initWithInt:"); - ffi.Pointer _objc_msgSend_66( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int unsetenv( + ffi.Pointer arg0, ) { - return __objc_msgSend_66( - obj, - sel, - value, + return _unsetenv( + arg0, ); } - late final __objc_msgSend_66Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _unsetenvPtr = + _lookup)>>( + 'unsetenv'); + late final _unsetenv = + _unsetenvPtr.asFunction)>(); - late final _sel_initWithUnsignedInt_1 = - _registerName1("initWithUnsignedInt:"); - ffi.Pointer _objc_msgSend_67( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_67( - obj, - sel, - value, - ); + int arc4random() { + return _arc4random(); } - late final __objc_msgSend_67Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _arc4randomPtr = + _lookup>('arc4random'); + late final _arc4random = _arc4randomPtr.asFunction(); - late final _sel_initWithLong_1 = _registerName1("initWithLong:"); - ffi.Pointer _objc_msgSend_68( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void arc4random_addrandom( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_68( - obj, - sel, - value, + return _arc4random_addrandom( + arg0, + arg1, ); } - late final __objc_msgSend_68Ptr = _lookup< + late final _arc4random_addrandomPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, ffi.Int)>>('arc4random_addrandom'); + late final _arc4random_addrandom = _arc4random_addrandomPtr + .asFunction, int)>(); - late final _sel_initWithUnsignedLong_1 = - _registerName1("initWithUnsignedLong:"); - ffi.Pointer _objc_msgSend_69( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void arc4random_buf( + ffi.Pointer __buf, + int __nbytes, ) { - return __objc_msgSend_69( - obj, - sel, - value, + return _arc4random_buf( + __buf, + __nbytes, ); } - late final __objc_msgSend_69Ptr = _lookup< + late final _arc4random_bufPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, ffi.Size)>>('arc4random_buf'); + late final _arc4random_buf = _arc4random_bufPtr + .asFunction, int)>(); - late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); - ffi.Pointer _objc_msgSend_70( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_70( - obj, - sel, - value, - ); + void arc4random_stir() { + return _arc4random_stir(); } - late final __objc_msgSend_70Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); - late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _arc4random_stirPtr = + _lookup>('arc4random_stir'); + late final _arc4random_stir = + _arc4random_stirPtr.asFunction(); - late final _sel_initWithUnsignedLongLong_1 = - _registerName1("initWithUnsignedLongLong:"); - ffi.Pointer _objc_msgSend_71( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int arc4random_uniform( + int __upper_bound, ) { - return __objc_msgSend_71( - obj, - sel, - value, + return _arc4random_uniform( + __upper_bound, ); } - late final __objc_msgSend_71Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); - late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _arc4random_uniformPtr = + _lookup>( + 'arc4random_uniform'); + late final _arc4random_uniform = + _arc4random_uniformPtr.asFunction(); - late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); - ffi.Pointer _objc_msgSend_72( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + int atexit_b( + ffi.Pointer<_ObjCBlock> arg0, ) { - return __objc_msgSend_72( - obj, - sel, - value, + return _atexit_b( + arg0, ); } - late final __objc_msgSend_72Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); + late final _atexit_bPtr = + _lookup)>>( + 'atexit_b'); + late final _atexit_b = + _atexit_bPtr.asFunction)>(); - late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); - ffi.Pointer _objc_msgSend_73( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { + final d = + pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); + d.ref.reserved = 0; + d.ref.size = ffi.sizeOf<_ObjCBlock>(); + d.ref.copy_helper = ffi.nullptr; + d.ref.dispose_helper = ffi.nullptr; + d.ref.signature = ffi.nullptr; + return d; + } + + late final _objc_block_desc1 = _newBlockDesc1(); + late final _objc_concrete_global_block1 = + _lookup('_NSConcreteGlobalBlock'); + ffi.Pointer<_ObjCBlock> _newBlock1( + ffi.Pointer invoke, ffi.Pointer target) { + final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); + b.ref.isa = _objc_concrete_global_block1; + b.ref.flags = 0; + b.ref.reserved = 0; + b.ref.invoke = invoke; + b.ref.target = target; + b.ref.descriptor = _objc_block_desc1; + final copy = _Block_copy(b.cast()).cast<_ObjCBlock>(); + pkg_ffi.calloc.free(b); + return copy; + } + + ffi.Pointer _Block_copy( + ffi.Pointer value, ) { - return __objc_msgSend_73( - obj, - sel, + return __Block_copy( value, ); } - late final __objc_msgSend_73Ptr = _lookup< + late final __Block_copyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); + ffi.Pointer Function( + ffi.Pointer)>>('_Block_copy'); + late final __Block_copy = __Block_copyPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_initWithBool_1 = _registerName1("initWithBool:"); - ffi.Pointer _objc_msgSend_74( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, + void _Block_release( + ffi.Pointer value, ) { - return __objc_msgSend_74( - obj, - sel, + return __Block_release( value, ); } - late final __objc_msgSend_74Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + late final __Block_releasePtr = + _lookup)>>( + '_Block_release'); + late final __Block_release = + __Block_releasePtr.asFunction)>(); - late final _sel_initWithInteger_1 = _registerName1("initWithInteger:"); - late final _sel_initWithUnsignedInteger_1 = - _registerName1("initWithUnsignedInteger:"); - late final _sel_charValue1 = _registerName1("charValue"); - int _objc_msgSend_75( - ffi.Pointer obj, - ffi.Pointer sel, + late final _objc_releaseFinalizer2 = + ffi.NativeFinalizer(__Block_releasePtr.cast()); + ffi.Pointer bsearch_b( + ffi.Pointer __key, + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_75( - obj, - sel, + return _bsearch_b( + __key, + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_75Ptr = _lookup< + late final _bsearch_bPtr = _lookup< ffi.NativeFunction< - ffi.Char Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('bsearch_b'); + late final _bsearch_b = _bsearch_bPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); - int _objc_msgSend_76( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer cgetcap( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_76( - obj, - sel, + return _cgetcap( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_76Ptr = _lookup< + late final _cgetcapPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedChar Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>('cgetcap'); + late final _cgetcap = _cgetcapPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_shortValue1 = _registerName1("shortValue"); - int _objc_msgSend_77( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_77( - obj, - sel, - ); + int cgetclose() { + return _cgetclose(); } - late final __objc_msgSend_77Ptr = _lookup< - ffi.NativeFunction< - ffi.Short Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _cgetclosePtr = + _lookup>('cgetclose'); + late final _cgetclose = _cgetclosePtr.asFunction(); - late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); - int _objc_msgSend_78( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetent( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer arg2, ) { - return __objc_msgSend_78( - obj, - sel, + return _cgetent( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_78Ptr = _lookup< + late final _cgetentPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedShort Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer)>>('cgetent'); + late final _cgetent = _cgetentPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>, ffi.Pointer)>(); - late final _sel_intValue1 = _registerName1("intValue"); - int _objc_msgSend_79( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetfirst( + ffi.Pointer> arg0, + ffi.Pointer> arg1, ) { - return __objc_msgSend_79( - obj, - sel, + return _cgetfirst( + arg0, + arg1, ); } - late final __objc_msgSend_79Ptr = _lookup< + late final _cgetfirstPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, + ffi.Pointer>)>>('cgetfirst'); + late final _cgetfirst = _cgetfirstPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); - int _objc_msgSend_80( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetmatch( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_80( - obj, - sel, + return _cgetmatch( + arg0, + arg1, ); } - late final __objc_msgSend_80Ptr = _lookup< + late final _cgetmatchPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedInt Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('cgetmatch'); + late final _cgetmatch = _cgetmatchPtr + .asFunction, ffi.Pointer)>(); - late final _sel_longValue1 = _registerName1("longValue"); - int _objc_msgSend_81( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetnext( + ffi.Pointer> arg0, + ffi.Pointer> arg1, ) { - return __objc_msgSend_81( - obj, - sel, + return _cgetnext( + arg0, + arg1, ); } - late final __objc_msgSend_81Ptr = _lookup< + late final _cgetnextPtr = _lookup< ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, + ffi.Pointer>)>>('cgetnext'); + late final _cgetnext = _cgetnextPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); - late final _sel_longLongValue1 = _registerName1("longLongValue"); - int _objc_msgSend_82( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetnum( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return __objc_msgSend_82( - obj, - sel, + return _cgetnum( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_82Ptr = _lookup< + late final _cgetnumPtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('cgetnum'); + late final _cgetnum = _cgetnumPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_unsignedLongLongValue1 = - _registerName1("unsignedLongLongValue"); - int _objc_msgSend_83( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetset( + ffi.Pointer arg0, ) { - return __objc_msgSend_83( - obj, - sel, + return _cgetset( + arg0, ); } - late final __objc_msgSend_83Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLongLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _cgetsetPtr = + _lookup)>>( + 'cgetset'); + late final _cgetset = + _cgetsetPtr.asFunction)>(); - late final _sel_floatValue1 = _registerName1("floatValue"); - double _objc_msgSend_84( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetstr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, ) { - return __objc_msgSend_84( - obj, - sel, + return _cgetstr( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_84Ptr = _lookup< + late final _cgetstrPtr = _lookup< ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('cgetstr'); + late final _cgetstr = _cgetstrPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_doubleValue1 = _registerName1("doubleValue"); - double _objc_msgSend_85( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetustr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, ) { - return __objc_msgSend_85( - obj, - sel, + return _cgetustr( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_85Ptr = _lookup< + late final _cgetustrPtr = _lookup< ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('cgetustr'); + late final _cgetustr = _cgetustrPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_boolValue1 = _registerName1("boolValue"); - late final _sel_integerValue1 = _registerName1("integerValue"); - late final _sel_unsignedIntegerValue1 = - _registerName1("unsignedIntegerValue"); - late final _sel_stringValue1 = _registerName1("stringValue"); - int _objc_msgSend_86( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherNumber, + int daemon( + int arg0, + int arg1, ) { - return __objc_msgSend_86( - obj, - sel, - otherNumber, + return _daemon( + arg0, + arg1, ); } - late final __objc_msgSend_86Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _daemonPtr = + _lookup>('daemon'); + late final _daemon = _daemonPtr.asFunction(); - late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); - bool _objc_msgSend_87( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer number, + ffi.Pointer devname( + int arg0, + int arg1, ) { - return __objc_msgSend_87( - obj, - sel, - number, + return _devname( + arg0, + arg1, ); } - late final __objc_msgSend_87Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _devnamePtr = _lookup< + ffi.NativeFunction Function(dev_t, mode_t)>>( + 'devname'); + late final _devname = + _devnamePtr.asFunction Function(int, int)>(); - late final _sel_descriptionWithLocale_1 = - _registerName1("descriptionWithLocale:"); - ffi.Pointer _objc_msgSend_88( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, + ffi.Pointer devname_r( + int arg0, + int arg1, + ffi.Pointer buf, + int len, ) { - return __objc_msgSend_88( - obj, - sel, - locale, + return _devname_r( + arg0, + arg1, + buf, + len, ); } - late final __objc_msgSend_88Ptr = _lookup< + late final _devname_rPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + dev_t, mode_t, ffi.Pointer, ffi.Int)>>('devname_r'); + late final _devname_r = _devname_rPtr.asFunction< + ffi.Pointer Function(int, int, ffi.Pointer, int)>(); - late final _sel_numberWithChar_1 = _registerName1("numberWithChar:"); - late final _sel_numberWithUnsignedChar_1 = - _registerName1("numberWithUnsignedChar:"); - late final _sel_numberWithShort_1 = _registerName1("numberWithShort:"); - late final _sel_numberWithUnsignedShort_1 = - _registerName1("numberWithUnsignedShort:"); - late final _sel_numberWithInt_1 = _registerName1("numberWithInt:"); - late final _sel_numberWithUnsignedInt_1 = - _registerName1("numberWithUnsignedInt:"); - late final _sel_numberWithLong_1 = _registerName1("numberWithLong:"); - late final _sel_numberWithUnsignedLong_1 = - _registerName1("numberWithUnsignedLong:"); - late final _sel_numberWithLongLong_1 = _registerName1("numberWithLongLong:"); - late final _sel_numberWithUnsignedLongLong_1 = - _registerName1("numberWithUnsignedLongLong:"); - late final _sel_numberWithFloat_1 = _registerName1("numberWithFloat:"); - late final _sel_numberWithDouble_1 = _registerName1("numberWithDouble:"); - late final _sel_numberWithBool_1 = _registerName1("numberWithBool:"); - late final _sel_numberWithInteger_1 = _registerName1("numberWithInteger:"); - late final _sel_numberWithUnsignedInteger_1 = - _registerName1("numberWithUnsignedInteger:"); - late final _sel_port1 = _registerName1("port"); - ffi.Pointer _objc_msgSend_89( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer getbsize( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_89( - obj, - sel, + return _getbsize( + arg0, + arg1, ); } - late final __objc_msgSend_89Ptr = _lookup< + late final _getbsizePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('getbsize'); + late final _getbsize = _getbsizePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_user1 = _registerName1("user"); - late final _sel_password1 = _registerName1("password"); - late final _sel_path1 = _registerName1("path"); - late final _sel_fragment1 = _registerName1("fragment"); - late final _sel_parameterString1 = _registerName1("parameterString"); - late final _sel_query1 = _registerName1("query"); - late final _sel_relativePath1 = _registerName1("relativePath"); - late final _sel_hasDirectoryPath1 = _registerName1("hasDirectoryPath"); - late final _sel_getFileSystemRepresentation_maxLength_1 = - _registerName1("getFileSystemRepresentation:maxLength:"); - bool _objc_msgSend_90( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferLength, + int getloadavg( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_90( - obj, - sel, - buffer, - maxBufferLength, + return _getloadavg( + arg0, + arg1, ); } - late final __objc_msgSend_90Ptr = _lookup< + late final _getloadavgPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Int)>>('getloadavg'); + late final _getloadavg = + _getloadavgPtr.asFunction, int)>(); - late final _sel_fileSystemRepresentation1 = - _registerName1("fileSystemRepresentation"); - late final _sel_isFileURL1 = _registerName1("isFileURL"); - late final _sel_standardizedURL1 = _registerName1("standardizedURL"); - late final _class_NSError1 = _getClass1("NSError"); - late final _class_NSDictionary1 = _getClass1("NSDictionary"); - late final _sel_count1 = _registerName1("count"); - late final _sel_objectForKey_1 = _registerName1("objectForKey:"); - ffi.Pointer _objc_msgSend_91( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aKey, - ) { - return __objc_msgSend_91( - obj, - sel, - aKey, - ); + ffi.Pointer getprogname() { + return _getprogname(); } - late final __objc_msgSend_91Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _getprognamePtr = + _lookup Function()>>( + 'getprogname'); + late final _getprogname = + _getprognamePtr.asFunction Function()>(); - late final _class_NSEnumerator1 = _getClass1("NSEnumerator"); - late final _sel_nextObject1 = _registerName1("nextObject"); - late final _sel_allObjects1 = _registerName1("allObjects"); - late final _sel_keyEnumerator1 = _registerName1("keyEnumerator"); - ffi.Pointer _objc_msgSend_92( - ffi.Pointer obj, - ffi.Pointer sel, + void setprogname( + ffi.Pointer arg0, ) { - return __objc_msgSend_92( - obj, - sel, + return _setprogname( + arg0, ); } - late final __objc_msgSend_92Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _setprognamePtr = + _lookup)>>( + 'setprogname'); + late final _setprogname = + _setprognamePtr.asFunction)>(); - late final _sel_initWithObjects_forKeys_count_1 = - _registerName1("initWithObjects:forKeys:count:"); - instancetype _objc_msgSend_93( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt, + int heapsort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_93( - obj, - sel, - objects, - keys, - cnt, + return _heapsort( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_93Ptr = _lookup< + late final _heapsortPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); + ffi.Int Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('heapsort'); + late final _heapsort = _heapsortPtr.asFunction< + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - late final _class_NSArray1 = _getClass1("NSArray"); - late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); - ffi.Pointer _objc_msgSend_94( - ffi.Pointer obj, - ffi.Pointer sel, - int index, + int heapsort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_94( - obj, - sel, - index, + return _heapsort_b( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_94Ptr = _lookup< + late final _heapsort_bPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('heapsort_b'); + late final _heapsort_b = _heapsort_bPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithObjects_count_1 = - _registerName1("initWithObjects:count:"); - instancetype _objc_msgSend_95( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - int cnt, + int mergesort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_95( - obj, - sel, - objects, - cnt, + return _mergesort( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_95Ptr = _lookup< + late final _mergesortPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, int)>(); + ffi.Int Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('mergesort'); + late final _mergesort = _mergesortPtr.asFunction< + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - late final _sel_arrayByAddingObject_1 = - _registerName1("arrayByAddingObject:"); - ffi.Pointer _objc_msgSend_96( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, + int mergesort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_96( - obj, - sel, - anObject, + return _mergesort_b( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_96Ptr = _lookup< + late final _mergesort_bPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('mergesort_b'); + late final _mergesort_b = _mergesort_bPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_arrayByAddingObjectsFromArray_1 = - _registerName1("arrayByAddingObjectsFromArray:"); - ffi.Pointer _objc_msgSend_97( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + void psort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_97( - obj, - sel, - otherArray, + return _psort( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_97Ptr = _lookup< + late final _psortPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('psort'); + late final _psort = _psortPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - late final _sel_componentsJoinedByString_1 = - _registerName1("componentsJoinedByString:"); - ffi.Pointer _objc_msgSend_98( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer separator, + void psort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_98( - obj, - sel, - separator, + return _psort_b( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_98Ptr = _lookup< + late final _psort_bPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('psort_b'); + late final _psort_b = _psort_bPtr.asFunction< + void Function( + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_containsObject_1 = _registerName1("containsObject:"); - late final _sel_descriptionWithLocale_indent_1 = - _registerName1("descriptionWithLocale:indent:"); - ffi.Pointer _objc_msgSend_99( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, - int level, + void psort_r( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer arg3, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_99( - obj, - sel, - locale, - level, + return _psort_r( + __base, + __nel, + __width, + arg3, + __compar, ); } - late final __objc_msgSend_99Ptr = _lookup< + late final _psort_rPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>)>>('psort_r'); + late final _psort_r = _psort_rPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>)>(); - late final _sel_firstObjectCommonWithArray_1 = - _registerName1("firstObjectCommonWithArray:"); - ffi.Pointer _objc_msgSend_100( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + void qsort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_100( - obj, - sel, - otherArray, + return _qsort_b( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_100Ptr = _lookup< + late final _qsort_bPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('qsort_b'); + late final _qsort_b = _qsort_bPtr.asFunction< + void Function( + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); - void _objc_msgSend_101( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - NSRange range, + void qsort_r( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer arg3, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_101( - obj, - sel, - objects, - range, + return _qsort_r( + __base, + __nel, + __width, + arg3, + __compar, ); } - late final __objc_msgSend_101Ptr = _lookup< + late final _qsort_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, NSRange)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>)>>('qsort_r'); + late final _qsort_r = _qsort_rPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>)>(); - late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); - int _objc_msgSend_102( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, + int radixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, ) { - return __objc_msgSend_102( - obj, - sel, - anObject, + return _radixsort( + __base, + __nel, + __table, + __endbyte, ); } - late final __objc_msgSend_102Ptr = _lookup< + late final _radixsortPtr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('radixsort'); + late final _radixsort = _radixsortPtr.asFunction< + int Function(ffi.Pointer>, int, + ffi.Pointer, int)>(); - late final _sel_indexOfObject_inRange_1 = - _registerName1("indexOfObject:inRange:"); - int _objc_msgSend_103( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - NSRange range, + int rpmatch( + ffi.Pointer arg0, ) { - return __objc_msgSend_103( - obj, - sel, - anObject, - range, + return _rpmatch( + arg0, ); } - late final __objc_msgSend_103Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + late final _rpmatchPtr = + _lookup)>>( + 'rpmatch'); + late final _rpmatch = + _rpmatchPtr.asFunction)>(); - late final _sel_indexOfObjectIdenticalTo_1 = - _registerName1("indexOfObjectIdenticalTo:"); - late final _sel_indexOfObjectIdenticalTo_inRange_1 = - _registerName1("indexOfObjectIdenticalTo:inRange:"); - late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); - bool _objc_msgSend_104( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + int sradixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, ) { - return __objc_msgSend_104( - obj, - sel, - otherArray, + return _sradixsort( + __base, + __nel, + __table, + __endbyte, ); } - late final __objc_msgSend_104Ptr = _lookup< + late final _sradixsortPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('sradixsort'); + late final _sradixsort = _sradixsortPtr.asFunction< + int Function(ffi.Pointer>, int, + ffi.Pointer, int)>(); - late final _sel_firstObject1 = _registerName1("firstObject"); - late final _sel_lastObject1 = _registerName1("lastObject"); - late final _sel_objectEnumerator1 = _registerName1("objectEnumerator"); - late final _sel_reverseObjectEnumerator1 = - _registerName1("reverseObjectEnumerator"); - late final _sel_sortedArrayHint1 = _registerName1("sortedArrayHint"); - late final _sel_sortedArrayUsingFunction_context_1 = - _registerName1("sortedArrayUsingFunction:context:"); - ffi.Pointer _objc_msgSend_105( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - ) { - return __objc_msgSend_105( - obj, - sel, - comparator, - context, + void sranddev() { + return _sranddev(); + } + + late final _sranddevPtr = + _lookup>('sranddev'); + late final _sranddev = _sranddevPtr.asFunction(); + + void srandomdev() { + return _srandomdev(); + } + + late final _srandomdevPtr = + _lookup>('srandomdev'); + late final _srandomdev = _srandomdevPtr.asFunction(); + + ffi.Pointer reallocf( + ffi.Pointer __ptr, + int __size, + ) { + return _reallocf( + __ptr, + __size, ); } - late final __objc_msgSend_105Ptr = _lookup< + late final _reallocfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('reallocf'); + late final _reallocf = _reallocfPtr + .asFunction Function(ffi.Pointer, int)>(); - late final _sel_sortedArrayUsingFunction_context_hint_1 = - _registerName1("sortedArrayUsingFunction:context:hint:"); - ffi.Pointer _objc_msgSend_106( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - ffi.Pointer hint, + int strtonum( + ffi.Pointer __numstr, + int __minval, + int __maxval, + ffi.Pointer> __errstrp, ) { - return __objc_msgSend_106( - obj, - sel, - comparator, - context, - hint, + return _strtonum( + __numstr, + __minval, + __maxval, + __errstrp, ); } - late final __objc_msgSend_106Ptr = _lookup< + late final _strtonumPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>(); + ffi.LongLong Function(ffi.Pointer, ffi.LongLong, + ffi.LongLong, ffi.Pointer>)>>('strtonum'); + late final _strtonum = _strtonumPtr.asFunction< + int Function(ffi.Pointer, int, int, + ffi.Pointer>)>(); - late final _sel_sortedArrayUsingSelector_1 = - _registerName1("sortedArrayUsingSelector:"); - ffi.Pointer _objc_msgSend_107( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer comparator, + int strtoq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_107( - obj, - sel, - comparator, + return _strtoq( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_107Ptr = _lookup< + late final _strtoqPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoq'); + late final _strtoq = _strtoqPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); - ffi.Pointer _objc_msgSend_108( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + int strtouq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_108( - obj, - sel, - range, + return _strtouq( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_108Ptr = _lookup< + late final _strtouqPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtouq'); + late final _strtouq = _strtouqPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); - bool _objc_msgSend_109( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, + late final ffi.Pointer> _suboptarg = + _lookup>('suboptarg'); + + ffi.Pointer get suboptarg => _suboptarg.value; + + set suboptarg(ffi.Pointer value) => _suboptarg.value = value; + + int __darwin_check_fd_set_overflow( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_109( - obj, - sel, - url, - error, + return ___darwin_check_fd_set_overflow( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_109Ptr = _lookup< + late final ___darwin_check_fd_set_overflowPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Int)>>('__darwin_check_fd_set_overflow'); + late final ___darwin_check_fd_set_overflow = + ___darwin_check_fd_set_overflowPtr + .asFunction, int)>(); - late final _sel_makeObjectsPerformSelector_1 = - _registerName1("makeObjectsPerformSelector:"); - late final _sel_makeObjectsPerformSelector_withObject_1 = - _registerName1("makeObjectsPerformSelector:withObject:"); - void _objc_msgSend_110( - ffi.Pointer obj, + ffi.Pointer sel_getName( ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer argument, ) { - return __objc_msgSend_110( - obj, + return _sel_getName( sel, - aSelector, - argument, ); } - late final __objc_msgSend_110Ptr = _lookup< + late final _sel_getNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer)>>('sel_getName'); + late final _sel_getName = _sel_getNamePtr + .asFunction Function(ffi.Pointer)>(); - late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); - late final _sel_indexSet1 = _registerName1("indexSet"); - late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); - late final _sel_indexSetWithIndexesInRange_1 = - _registerName1("indexSetWithIndexesInRange:"); - instancetype _objc_msgSend_111( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + ffi.Pointer sel_registerName( + ffi.Pointer str, ) { - return __objc_msgSend_111( - obj, - sel, - range, + return _sel_registerName1( + str, ); } - late final __objc_msgSend_111Ptr = _lookup< + late final _sel_registerNamePtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer Function( + ffi.Pointer)>>('sel_registerName'); + late final _sel_registerName1 = _sel_registerNamePtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_initWithIndexesInRange_1 = - _registerName1("initWithIndexesInRange:"); - late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); - instancetype _objc_msgSend_112( + ffi.Pointer object_getClassName( ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, ) { - return __objc_msgSend_112( + return _object_getClassName( obj, - sel, - indexSet, ); } - late final __objc_msgSend_112Ptr = _lookup< + late final _object_getClassNamePtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('object_getClassName'); + late final _object_getClassName = _object_getClassNamePtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); - late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); - bool _objc_msgSend_113( + ffi.Pointer object_getIndexedIvars( ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, ) { - return __objc_msgSend_113( + return _object_getIndexedIvars( obj, - sel, - indexSet, ); } - late final __objc_msgSend_113Ptr = _lookup< + late final _object_getIndexedIvarsPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('object_getIndexedIvars'); + late final _object_getIndexedIvars = _object_getIndexedIvarsPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_firstIndex1 = _registerName1("firstIndex"); - late final _sel_lastIndex1 = _registerName1("lastIndex"); - late final _sel_indexGreaterThanIndex_1 = - _registerName1("indexGreaterThanIndex:"); - int _objc_msgSend_114( - ffi.Pointer obj, + bool sel_isMapped( ffi.Pointer sel, - int value, ) { - return __objc_msgSend_114( - obj, + return _sel_isMapped( sel, - value, ); } - late final __objc_msgSend_114Ptr = _lookup< + late final _sel_isMappedPtr = + _lookup)>>( + 'sel_isMapped'); + late final _sel_isMapped = + _sel_isMappedPtr.asFunction)>(); + + ffi.Pointer sel_getUid( + ffi.Pointer str, + ) { + return _sel_getUid( + str, + ); + } + + late final _sel_getUidPtr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer)>>('sel_getUid'); + late final _sel_getUid = _sel_getUidPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); - late final _sel_indexGreaterThanOrEqualToIndex_1 = - _registerName1("indexGreaterThanOrEqualToIndex:"); - late final _sel_indexLessThanOrEqualToIndex_1 = - _registerName1("indexLessThanOrEqualToIndex:"); - late final _sel_getIndexes_maxCount_inIndexRange_1 = - _registerName1("getIndexes:maxCount:inIndexRange:"); - int _objc_msgSend_115( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexBuffer, - int bufferSize, - NSRangePointer range, + ffi.Pointer objc_retainedObject( + objc_objectptr_t obj, ) { - return __objc_msgSend_115( + return _objc_retainedObject( obj, - sel, - indexBuffer, - bufferSize, - range, ); } - late final __objc_msgSend_115Ptr = _lookup< + late final _objc_retainedObjectPtr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRangePointer)>(); + ffi.Pointer Function( + objc_objectptr_t)>>('objc_retainedObject'); + late final _objc_retainedObject = _objc_retainedObjectPtr + .asFunction Function(objc_objectptr_t)>(); - late final _sel_countOfIndexesInRange_1 = - _registerName1("countOfIndexesInRange:"); - int _objc_msgSend_116( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + ffi.Pointer objc_unretainedObject( + objc_objectptr_t obj, ) { - return __objc_msgSend_116( + return _objc_unretainedObject( obj, - sel, - range, ); } - late final __objc_msgSend_116Ptr = _lookup< + late final _objc_unretainedObjectPtr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer Function( + objc_objectptr_t)>>('objc_unretainedObject'); + late final _objc_unretainedObject = _objc_unretainedObjectPtr + .asFunction Function(objc_objectptr_t)>(); - late final _sel_containsIndex_1 = _registerName1("containsIndex:"); - bool _objc_msgSend_117( + objc_objectptr_t objc_unretainedPointer( ffi.Pointer obj, - ffi.Pointer sel, - int value, ) { - return __objc_msgSend_117( + return _objc_unretainedPointer( obj, - sel, - value, ); } - late final __objc_msgSend_117Ptr = _lookup< + late final _objc_unretainedPointerPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + objc_objectptr_t Function( + ffi.Pointer)>>('objc_unretainedPointer'); + late final _objc_unretainedPointer = _objc_unretainedPointerPtr + .asFunction)>(); - late final _sel_containsIndexesInRange_1 = - _registerName1("containsIndexesInRange:"); - bool _objc_msgSend_118( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + ffi.Pointer _registerName1(String name) { + final cstr = name.toNativeUtf8(); + final sel = _sel_registerName(cstr.cast()); + pkg_ffi.calloc.free(cstr); + return sel; + } + + ffi.Pointer _sel_registerName( + ffi.Pointer str, ) { - return __objc_msgSend_118( - obj, - sel, - range, + return __sel_registerName( + str, ); } - late final __objc_msgSend_118Ptr = _lookup< + late final __sel_registerNamePtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer Function( + ffi.Pointer)>>('sel_registerName'); + late final __sel_registerName = __sel_registerNamePtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); - late final _sel_intersectsIndexesInRange_1 = - _registerName1("intersectsIndexesInRange:"); - ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { - final d = - pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); - d.ref.reserved = 0; - d.ref.size = ffi.sizeOf<_ObjCBlock>(); - d.ref.copy_helper = ffi.nullptr; - d.ref.dispose_helper = ffi.nullptr; - d.ref.signature = ffi.nullptr; - return d; + ffi.Pointer _getClass1(String name) { + final cstr = name.toNativeUtf8(); + final clazz = _objc_getClass(cstr.cast()); + pkg_ffi.calloc.free(cstr); + if (clazz == ffi.nullptr) { + throw Exception('Failed to load Objective-C class: $name'); + } + return clazz; } - late final _objc_block_desc1 = _newBlockDesc1(); - late final _objc_concrete_global_block1 = - _lookup('_NSConcreteGlobalBlock'); - ffi.Pointer<_ObjCBlock> _newBlock1( - ffi.Pointer invoke, ffi.Pointer target) { - final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); - b.ref.isa = _objc_concrete_global_block1; - b.ref.flags = 0; - b.ref.reserved = 0; - b.ref.invoke = invoke; - b.ref.target = target; - b.ref.descriptor = _objc_block_desc1; - final copy = _Block_copy(b.cast()).cast<_ObjCBlock>(); - pkg_ffi.calloc.free(b); - return copy; + ffi.Pointer _objc_getClass( + ffi.Pointer str, + ) { + return __objc_getClass( + str, + ); } - ffi.Pointer _Block_copy( - ffi.Pointer value, + late final __objc_getClassPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('objc_getClass'); + late final __objc_getClass = __objc_getClassPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer _objc_retain( + ffi.Pointer value, ) { - return __Block_copy( + return __objc_retain( value, ); } - late final __Block_copyPtr = _lookup< + late final __objc_retainPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('_Block_copy'); - late final __Block_copy = __Block_copyPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('objc_retain'); + late final __objc_retain = __objc_retainPtr + .asFunction Function(ffi.Pointer)>(); - void _Block_release( - ffi.Pointer value, + void _objc_release( + ffi.Pointer value, ) { - return __Block_release( + return __objc_release( value, ); } - late final __Block_releasePtr = - _lookup)>>( - '_Block_release'); - late final __Block_release = - __Block_releasePtr.asFunction)>(); + late final __objc_releasePtr = + _lookup)>>( + 'objc_release'); + late final __objc_release = + __objc_releasePtr.asFunction)>(); late final _objc_releaseFinalizer11 = - ffi.NativeFinalizer(__Block_releasePtr.cast()); - late final _sel_enumerateIndexesUsingBlock_1 = - _registerName1("enumerateIndexesUsingBlock:"); - void _objc_msgSend_119( + ffi.NativeFinalizer(__objc_releasePtr.cast()); + late final _class_NSObject1 = _getClass1("NSObject"); + late final _sel_load1 = _registerName1("load"); + void _objc_msgSend_1( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_119( + return __objc_msgSend_1( obj, sel, - block, ); } - late final __objc_msgSend_119Ptr = _lookup< + late final __objc_msgSend_1Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateIndexesWithOptions_usingBlock_1 = - _registerName1("enumerateIndexesWithOptions:usingBlock:"); - void _objc_msgSend_120( + late final _sel_initialize1 = _registerName1("initialize"); + late final _sel_init1 = _registerName1("init"); + instancetype _objc_msgSend_2( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_120( + return __objc_msgSend_2( obj, sel, - opts, - block, ); } - late final __objc_msgSend_120Ptr = _lookup< + late final __objc_msgSend_2Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateIndexesInRange_options_usingBlock_1 = - _registerName1("enumerateIndexesInRange:options:usingBlock:"); - void _objc_msgSend_121( + late final _sel_new1 = _registerName1("new"); + late final _sel_allocWithZone_1 = _registerName1("allocWithZone:"); + instancetype _objc_msgSend_3( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_NSZone> zone, ) { - return __objc_msgSend_121( + return __objc_msgSend_3( obj, sel, - range, - opts, - block, + zone, ); } - late final __objc_msgSend_121Ptr = _lookup< + late final __objc_msgSend_3Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_NSZone>)>>('objc_msgSend'); + late final __objc_msgSend_3 = __objc_msgSend_3Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_NSZone>)>(); - late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); - int _objc_msgSend_122( + late final _sel_alloc1 = _registerName1("alloc"); + late final _sel_dealloc1 = _registerName1("dealloc"); + late final _sel_finalize1 = _registerName1("finalize"); + late final _sel_copy1 = _registerName1("copy"); + late final _sel_mutableCopy1 = _registerName1("mutableCopy"); + late final _sel_copyWithZone_1 = _registerName1("copyWithZone:"); + late final _sel_mutableCopyWithZone_1 = + _registerName1("mutableCopyWithZone:"); + late final _sel_instancesRespondToSelector_1 = + _registerName1("instancesRespondToSelector:"); + bool _objc_msgSend_4( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer aSelector, ) { - return __objc_msgSend_122( + return __objc_msgSend_4( obj, sel, - predicate, + aSelector, ); } - late final __objc_msgSend_122Ptr = _lookup< + late final __objc_msgSend_4Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexWithOptions_passingTest_1 = - _registerName1("indexWithOptions:passingTest:"); - int _objc_msgSend_123( + bool _objc_msgSend_0( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer clazz, ) { - return __objc_msgSend_123( + return __objc_msgSend_0( obj, sel, - opts, - predicate, + clazz, ); } - late final __objc_msgSend_123Ptr = _lookup< + late final __objc_msgSend_0Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexInRange_options_passingTest_1 = - _registerName1("indexInRange:options:passingTest:"); - int _objc_msgSend_124( + late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); + late final _class_Protocol1 = _getClass1("Protocol"); + late final _sel_conformsToProtocol_1 = _registerName1("conformsToProtocol:"); + bool _objc_msgSend_5( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer protocol, ) { - return __objc_msgSend_124( + return __objc_msgSend_5( obj, sel, - range, - opts, - predicate, + protocol, ); } - late final __objc_msgSend_124Ptr = _lookup< + late final __objc_msgSend_5Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_5 = __objc_msgSend_5Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); - ffi.Pointer _objc_msgSend_125( + late final _sel_methodForSelector_1 = _registerName1("methodForSelector:"); + IMP _objc_msgSend_6( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer aSelector, ) { - return __objc_msgSend_125( + return __objc_msgSend_6( obj, sel, - predicate, + aSelector, ); } - late final __objc_msgSend_125Ptr = _lookup< + late final __objc_msgSend_6Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + IMP Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction< + IMP Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexesWithOptions_passingTest_1 = - _registerName1("indexesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_126( + late final _sel_instanceMethodForSelector_1 = + _registerName1("instanceMethodForSelector:"); + late final _sel_doesNotRecognizeSelector_1 = + _registerName1("doesNotRecognizeSelector:"); + void _objc_msgSend_7( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer aSelector, ) { - return __objc_msgSend_126( + return __objc_msgSend_7( obj, sel, - opts, - predicate, + aSelector, ); } - late final __objc_msgSend_126Ptr = _lookup< + late final __objc_msgSend_7Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexesInRange_options_passingTest_1 = - _registerName1("indexesInRange:options:passingTest:"); - ffi.Pointer _objc_msgSend_127( + late final _sel_forwardingTargetForSelector_1 = + _registerName1("forwardingTargetForSelector:"); + ffi.Pointer _objc_msgSend_8( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer aSelector, ) { - return __objc_msgSend_127( + return __objc_msgSend_8( obj, sel, - range, - opts, - predicate, + aSelector, ); } - late final __objc_msgSend_127Ptr = _lookup< + late final __objc_msgSend_8Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateRangesUsingBlock_1 = - _registerName1("enumerateRangesUsingBlock:"); - void _objc_msgSend_128( + late final _class_NSInvocation1 = _getClass1("NSInvocation"); + late final _sel_forwardInvocation_1 = _registerName1("forwardInvocation:"); + void _objc_msgSend_9( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer anInvocation, ) { - return __objc_msgSend_128( + return __objc_msgSend_9( obj, sel, - block, + anInvocation, ); } - late final __objc_msgSend_128Ptr = _lookup< + late final __objc_msgSend_9Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_9 = __objc_msgSend_9Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer)>(); - late final _sel_enumerateRangesWithOptions_usingBlock_1 = - _registerName1("enumerateRangesWithOptions:usingBlock:"); - void _objc_msgSend_129( + late final _class_NSMethodSignature1 = _getClass1("NSMethodSignature"); + late final _sel_methodSignatureForSelector_1 = + _registerName1("methodSignatureForSelector:"); + ffi.Pointer _objc_msgSend_10( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer aSelector, ) { - return __objc_msgSend_129( + return __objc_msgSend_10( obj, sel, - opts, - block, + aSelector, ); } - late final __objc_msgSend_129Ptr = _lookup< + late final __objc_msgSend_10Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateRangesInRange_options_usingBlock_1 = - _registerName1("enumerateRangesInRange:options:usingBlock:"); - void _objc_msgSend_130( + late final _sel_instanceMethodSignatureForSelector_1 = + _registerName1("instanceMethodSignatureForSelector:"); + late final _sel_allowsWeakReference1 = _registerName1("allowsWeakReference"); + bool _objc_msgSend_11( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_130( + return __objc_msgSend_11( obj, sel, - range, - opts, - block, ); } - late final __objc_msgSend_130Ptr = _lookup< + late final __objc_msgSend_11Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); - ffi.Pointer _objc_msgSend_131( + late final _sel_retainWeakReference1 = _registerName1("retainWeakReference"); + late final _sel_isSubclassOfClass_1 = _registerName1("isSubclassOfClass:"); + late final _sel_resolveClassMethod_1 = _registerName1("resolveClassMethod:"); + late final _sel_resolveInstanceMethod_1 = + _registerName1("resolveInstanceMethod:"); + late final _sel_hash1 = _registerName1("hash"); + int _objc_msgSend_12( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexes, ) { - return __objc_msgSend_131( + return __objc_msgSend_12( obj, sel, - indexes, ); } - late final __objc_msgSend_131Ptr = _lookup< + late final __objc_msgSend_12Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSUInteger Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_12 = __objc_msgSend_12Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_objectAtIndexedSubscript_1 = - _registerName1("objectAtIndexedSubscript:"); - late final _sel_enumerateObjectsUsingBlock_1 = - _registerName1("enumerateObjectsUsingBlock:"); - void _objc_msgSend_132( + late final _sel_superclass1 = _registerName1("superclass"); + late final _sel_class1 = _registerName1("class"); + late final _class_NSString1 = _getClass1("NSString"); + late final _sel_length1 = _registerName1("length"); + late final _sel_characterAtIndex_1 = _registerName1("characterAtIndex:"); + int _objc_msgSend_13( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + int index, ) { - return __objc_msgSend_132( + return __objc_msgSend_13( obj, sel, - block, + index, ); } - late final __objc_msgSend_132Ptr = _lookup< + late final __objc_msgSend_13Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + unichar Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_enumerateObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateObjectsWithOptions:usingBlock:"); - void _objc_msgSend_133( + late final _class_NSCoder1 = _getClass1("NSCoder"); + late final _sel_initWithCoder_1 = _registerName1("initWithCoder:"); + instancetype _objc_msgSend_14( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer coder, ) { - return __objc_msgSend_133( + return __objc_msgSend_14( obj, sel, - opts, - block, + coder, ); } - late final __objc_msgSend_133Ptr = _lookup< + late final __objc_msgSend_14Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_enumerateObjectsAtIndexes_options_usingBlock_1 = - _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); - void _objc_msgSend_134( + late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); + ffi.Pointer _objc_msgSend_15( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> block, + int from, ) { - return __objc_msgSend_134( + return __objc_msgSend_15( obj, sel, - s, - opts, - block, + from, ); } - late final __objc_msgSend_134Ptr = _lookup< + late final __objc_msgSend_15Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_indexOfObjectPassingTest_1 = - _registerName1("indexOfObjectPassingTest:"); - int _objc_msgSend_135( + late final _sel_substringToIndex_1 = _registerName1("substringToIndex:"); + late final _sel_substringWithRange_1 = _registerName1("substringWithRange:"); + ffi.Pointer _objc_msgSend_16( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + NSRange range, ) { - return __objc_msgSend_135( + return __objc_msgSend_16( obj, sel, - predicate, + range, ); } - late final __objc_msgSend_135Ptr = _lookup< + late final __objc_msgSend_16Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_indexOfObjectWithOptions_passingTest_1 = - _registerName1("indexOfObjectWithOptions:passingTest:"); - int _objc_msgSend_136( + late final _sel_getCharacters_range_1 = + _registerName1("getCharacters:range:"); + void _objc_msgSend_17( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer buffer, + NSRange range, ) { - return __objc_msgSend_136( + return __objc_msgSend_17( obj, sel, - opts, - predicate, + buffer, + range, ); } - late final __objc_msgSend_136Ptr = _lookup< + late final __objc_msgSend_17Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - late final _sel_indexOfObjectAtIndexes_options_passingTest_1 = - _registerName1("indexOfObjectAtIndexes:options:passingTest:"); - int _objc_msgSend_137( + late final _sel_compare_1 = _registerName1("compare:"); + int _objc_msgSend_18( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer string, ) { - return __objc_msgSend_137( + return __objc_msgSend_18( obj, sel, - s, - opts, - predicate, + string, ); } - late final __objc_msgSend_137Ptr = _lookup< + late final __objc_msgSend_18Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer)>(); - late final _sel_indexesOfObjectsPassingTest_1 = - _registerName1("indexesOfObjectsPassingTest:"); - ffi.Pointer _objc_msgSend_138( + late final _sel_compare_options_1 = _registerName1("compare:options:"); + int _objc_msgSend_19( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer string, + int mask, ) { - return __objc_msgSend_138( + return __objc_msgSend_19( obj, sel, - predicate, + string, + mask, ); } - late final __objc_msgSend_138Ptr = _lookup< + late final __objc_msgSend_19Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_indexesOfObjectsWithOptions_passingTest_1 = - _registerName1("indexesOfObjectsWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_139( + late final _sel_compare_options_range_1 = + _registerName1("compare:options:range:"); + int _objc_msgSend_20( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer string, + int mask, + NSRange rangeOfReceiverToCompare, ) { - return __objc_msgSend_139( + return __objc_msgSend_20( obj, sel, - opts, - predicate, + string, + mask, + rangeOfReceiverToCompare, ); } - late final __objc_msgSend_139Ptr = _lookup< + late final __objc_msgSend_20Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - late final _sel_indexesOfObjectsAtIndexes_options_passingTest_1 = - _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); - ffi.Pointer _objc_msgSend_140( + late final _sel_compare_options_range_locale_1 = + _registerName1("compare:options:range:locale:"); + int _objc_msgSend_21( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer string, + int mask, + NSRange rangeOfReceiverToCompare, + ffi.Pointer locale, ) { - return __objc_msgSend_140( + return __objc_msgSend_21( obj, sel, - s, - opts, - predicate, + string, + mask, + rangeOfReceiverToCompare, + locale, ); } - late final __objc_msgSend_140Ptr = _lookup< + late final __objc_msgSend_21Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Int32 Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); + NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange, ffi.Pointer)>(); - late final _sel_sortedArrayUsingComparator_1 = - _registerName1("sortedArrayUsingComparator:"); - ffi.Pointer _objc_msgSend_141( + late final _sel_caseInsensitiveCompare_1 = + _registerName1("caseInsensitiveCompare:"); + late final _sel_localizedCompare_1 = _registerName1("localizedCompare:"); + late final _sel_localizedCaseInsensitiveCompare_1 = + _registerName1("localizedCaseInsensitiveCompare:"); + late final _sel_localizedStandardCompare_1 = + _registerName1("localizedStandardCompare:"); + late final _sel_isEqualToString_1 = _registerName1("isEqualToString:"); + bool _objc_msgSend_22( ffi.Pointer obj, ffi.Pointer sel, - NSComparator cmptr, + ffi.Pointer aString, ) { - return __objc_msgSend_141( + return __objc_msgSend_22( obj, sel, - cmptr, + aString, ); } - late final __objc_msgSend_141Ptr = _lookup< + late final __objc_msgSend_22Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSComparator)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_sortedArrayWithOptions_usingComparator_1 = - _registerName1("sortedArrayWithOptions:usingComparator:"); - ffi.Pointer _objc_msgSend_142( + late final _sel_hasPrefix_1 = _registerName1("hasPrefix:"); + late final _sel_hasSuffix_1 = _registerName1("hasSuffix:"); + late final _sel_commonPrefixWithString_options_1 = + _registerName1("commonPrefixWithString:options:"); + ffi.Pointer _objc_msgSend_23( ffi.Pointer obj, ffi.Pointer sel, - int opts, - NSComparator cmptr, + ffi.Pointer str, + int mask, ) { - return __objc_msgSend_142( + return __objc_msgSend_23( obj, sel, - opts, - cmptr, + str, + mask, ); } - late final __objc_msgSend_142Ptr = _lookup< + late final __objc_msgSend_23Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, NSComparator)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_indexOfObject_inSortedRange_options_usingComparator_1 = - _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); - int _objc_msgSend_143( + late final _sel_containsString_1 = _registerName1("containsString:"); + late final _sel_localizedCaseInsensitiveContainsString_1 = + _registerName1("localizedCaseInsensitiveContainsString:"); + late final _sel_localizedStandardContainsString_1 = + _registerName1("localizedStandardContainsString:"); + late final _sel_localizedStandardRangeOfString_1 = + _registerName1("localizedStandardRangeOfString:"); + NSRange _objc_msgSend_24( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer obj1, - NSRange r, - int opts, - NSComparator cmp, + ffi.Pointer str, ) { - return __objc_msgSend_143( + return __objc_msgSend_24( obj, sel, - obj1, - r, - opts, - cmp, + str, ); } - late final __objc_msgSend_143Ptr = _lookup< + late final __objc_msgSend_24Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Int32, - NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange, int, NSComparator)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_array1 = _registerName1("array"); - late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); - late final _sel_arrayWithObjects_count_1 = - _registerName1("arrayWithObjects:count:"); - late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); - late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); - late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); - late final _sel_initWithArray_1 = _registerName1("initWithArray:"); - late final _sel_initWithArray_copyItems_1 = - _registerName1("initWithArray:copyItems:"); - instancetype _objc_msgSend_144( + late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); + late final _sel_rangeOfString_options_1 = + _registerName1("rangeOfString:options:"); + NSRange _objc_msgSend_25( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer array, - bool flag, + ffi.Pointer searchString, + int mask, ) { - return __objc_msgSend_144( + return __objc_msgSend_25( obj, sel, - array, - flag, + searchString, + mask, ); } - late final __objc_msgSend_144Ptr = _lookup< + late final __objc_msgSend_25Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_initWithContentsOfURL_error_1 = - _registerName1("initWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_145( + late final _sel_rangeOfString_options_range_1 = + _registerName1("rangeOfString:options:range:"); + NSRange _objc_msgSend_26( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, + ffi.Pointer searchString, + int mask, + NSRange rangeOfReceiverToSearch, ) { - return __objc_msgSend_145( + return __objc_msgSend_26( obj, sel, - url, - error, + searchString, + mask, + rangeOfReceiverToSearch, ); } - late final __objc_msgSend_145Ptr = _lookup< + late final __objc_msgSend_26Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - late final _sel_arrayWithContentsOfURL_error_1 = - _registerName1("arrayWithContentsOfURL:error:"); - late final _class_NSOrderedCollectionDifference1 = - _getClass1("NSOrderedCollectionDifference"); - late final _sel_initWithChanges_1 = _registerName1("initWithChanges:"); - late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1 = - _registerName1( - "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:"); - instancetype _objc_msgSend_146( + late final _class_NSLocale1 = _getClass1("NSLocale"); + late final _sel_rangeOfString_options_range_locale_1 = + _registerName1("rangeOfString:options:range:locale:"); + NSRange _objc_msgSend_27( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer inserts, - ffi.Pointer insertedObjects, - ffi.Pointer removes, - ffi.Pointer removedObjects, - ffi.Pointer changes, + ffi.Pointer searchString, + int mask, + NSRange rangeOfReceiverToSearch, + ffi.Pointer locale, ) { - return __objc_msgSend_146( + return __objc_msgSend_27( obj, sel, - inserts, - insertedObjects, - removes, - removedObjects, - changes, + searchString, + mask, + rangeOfReceiverToSearch, + locale, ); } - late final __objc_msgSend_146Ptr = _lookup< + late final __objc_msgSend_27Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + NSRange Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Int32, + NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange, ffi.Pointer)>(); - late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1 = - _registerName1( - "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:"); - instancetype _objc_msgSend_147( + late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); + late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); + ffi.Pointer _objc_msgSend_28( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer inserts, - ffi.Pointer insertedObjects, - ffi.Pointer removes, - ffi.Pointer removedObjects, ) { - return __objc_msgSend_147( + return __objc_msgSend_28( obj, sel, - inserts, - insertedObjects, - removes, - removedObjects, ); } - late final __objc_msgSend_147Ptr = _lookup< + late final __objc_msgSend_28Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_insertions1 = _registerName1("insertions"); - late final _sel_removals1 = _registerName1("removals"); - late final _sel_hasChanges1 = _registerName1("hasChanges"); - late final _class_NSOrderedCollectionChange1 = - _getClass1("NSOrderedCollectionChange"); - late final _sel_changeWithObject_type_index_1 = - _registerName1("changeWithObject:type:index:"); - ffi.Pointer _objc_msgSend_148( + late final _sel_whitespaceCharacterSet1 = + _registerName1("whitespaceCharacterSet"); + late final _sel_whitespaceAndNewlineCharacterSet1 = + _registerName1("whitespaceAndNewlineCharacterSet"); + late final _sel_decimalDigitCharacterSet1 = + _registerName1("decimalDigitCharacterSet"); + late final _sel_letterCharacterSet1 = _registerName1("letterCharacterSet"); + late final _sel_lowercaseLetterCharacterSet1 = + _registerName1("lowercaseLetterCharacterSet"); + late final _sel_uppercaseLetterCharacterSet1 = + _registerName1("uppercaseLetterCharacterSet"); + late final _sel_nonBaseCharacterSet1 = _registerName1("nonBaseCharacterSet"); + late final _sel_alphanumericCharacterSet1 = + _registerName1("alphanumericCharacterSet"); + late final _sel_decomposableCharacterSet1 = + _registerName1("decomposableCharacterSet"); + late final _sel_illegalCharacterSet1 = _registerName1("illegalCharacterSet"); + late final _sel_punctuationCharacterSet1 = + _registerName1("punctuationCharacterSet"); + late final _sel_capitalizedLetterCharacterSet1 = + _registerName1("capitalizedLetterCharacterSet"); + late final _sel_symbolCharacterSet1 = _registerName1("symbolCharacterSet"); + late final _sel_newlineCharacterSet1 = _registerName1("newlineCharacterSet"); + late final _sel_characterSetWithRange_1 = + _registerName1("characterSetWithRange:"); + ffi.Pointer _objc_msgSend_29( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, + NSRange aRange, ) { - return __objc_msgSend_148( + return __objc_msgSend_29( obj, sel, - anObject, - type, - index, + aRange, ); } - late final __objc_msgSend_148Ptr = _lookup< + late final __objc_msgSend_29Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_changeWithObject_type_index_associatedIndex_1 = - _registerName1("changeWithObject:type:index:associatedIndex:"); - ffi.Pointer _objc_msgSend_149( + late final _sel_characterSetWithCharactersInString_1 = + _registerName1("characterSetWithCharactersInString:"); + ffi.Pointer _objc_msgSend_30( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, - int associatedIndex, + ffi.Pointer aString, ) { - return __objc_msgSend_149( + return __objc_msgSend_30( obj, sel, - anObject, - type, - index, - associatedIndex, + aString, ); } - late final __objc_msgSend_149Ptr = _lookup< + late final __objc_msgSend_30Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSUInteger, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int, int)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_object1 = _registerName1("object"); - late final _sel_changeType1 = _registerName1("changeType"); - int _objc_msgSend_150( + late final _class_NSData1 = _getClass1("NSData"); + late final _sel_bytes1 = _registerName1("bytes"); + ffi.Pointer _objc_msgSend_31( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_150( + return __objc_msgSend_31( obj, sel, ); } - late final __objc_msgSend_150Ptr = _lookup< + late final __objc_msgSend_31Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_index1 = _registerName1("index"); - late final _sel_associatedIndex1 = _registerName1("associatedIndex"); - late final _sel_initWithObject_type_index_1 = - _registerName1("initWithObject:type:index:"); - instancetype _objc_msgSend_151( + late final _sel_description1 = _registerName1("description"); + ffi.Pointer _objc_msgSend_32( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, ) { - return __objc_msgSend_151( + return __objc_msgSend_32( obj, sel, - anObject, - type, - index, ); } - late final __objc_msgSend_151Ptr = _lookup< + late final __objc_msgSend_32Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithObject_type_index_associatedIndex_1 = - _registerName1("initWithObject:type:index:associatedIndex:"); - instancetype _objc_msgSend_152( + late final _sel_getBytes_length_1 = _registerName1("getBytes:length:"); + void _objc_msgSend_33( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, - int associatedIndex, - ) { - return __objc_msgSend_152( - obj, - sel, - anObject, - type, - index, - associatedIndex, - ); - } - - late final __objc_msgSend_152Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSUInteger, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, int)>(); - - late final _sel_differenceByTransformingChangesWithBlock_1 = - _registerName1("differenceByTransformingChangesWithBlock:"); - ffi.Pointer _objc_msgSend_153( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer buffer, + int length, ) { - return __objc_msgSend_153( + return __objc_msgSend_33( obj, sel, - block, + buffer, + length, ); } - late final __objc_msgSend_153Ptr = _lookup< + late final __objc_msgSend_33Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_inverseDifference1 = _registerName1("inverseDifference"); - late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = - _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); - ffi.Pointer _objc_msgSend_154( + late final _sel_getBytes_range_1 = _registerName1("getBytes:range:"); + void _objc_msgSend_34( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, - int options, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer buffer, + NSRange range, ) { - return __objc_msgSend_154( + return __objc_msgSend_34( obj, sel, - other, - options, - block, + buffer, + range, ); } - late final __objc_msgSend_154Ptr = _lookup< + late final __objc_msgSend_34Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - late final _sel_differenceFromArray_withOptions_1 = - _registerName1("differenceFromArray:withOptions:"); - ffi.Pointer _objc_msgSend_155( + late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); + bool _objc_msgSend_35( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer other, - int options, ) { - return __objc_msgSend_155( + return __objc_msgSend_35( obj, sel, other, - options, ); } - late final __objc_msgSend_155Ptr = _lookup< + late final __objc_msgSend_35Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_differenceFromArray_1 = - _registerName1("differenceFromArray:"); - ffi.Pointer _objc_msgSend_156( + late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); + ffi.Pointer _objc_msgSend_36( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, + NSRange range, ) { - return __objc_msgSend_156( + return __objc_msgSend_36( obj, sel, - other, + range, ); } - late final __objc_msgSend_156Ptr = _lookup< + late final __objc_msgSend_36Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_arrayByApplyingDifference_1 = - _registerName1("arrayByApplyingDifference:"); - ffi.Pointer _objc_msgSend_157( + late final _sel_writeToFile_atomically_1 = + _registerName1("writeToFile:atomically:"); + bool _objc_msgSend_37( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer difference, + ffi.Pointer path, + bool useAuxiliaryFile, ) { - return __objc_msgSend_157( + return __objc_msgSend_37( obj, sel, - difference, + path, + useAuxiliaryFile, ); } - late final __objc_msgSend_157Ptr = _lookup< + late final __objc_msgSend_37Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_getObjects_1 = _registerName1("getObjects:"); - void _objc_msgSend_158( + late final _class_NSURL1 = _getClass1("NSURL"); + late final _sel_initWithScheme_host_path_1 = + _registerName1("initWithScheme:host:path:"); + instancetype _objc_msgSend_38( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, + ffi.Pointer scheme, + ffi.Pointer host, + ffi.Pointer path, ) { - return __objc_msgSend_158( + return __objc_msgSend_38( obj, sel, - objects, + scheme, + host, + path, ); } - late final __objc_msgSend_158Ptr = _lookup< + late final __objc_msgSend_38Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_38 = __objc_msgSend_38Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_arrayWithContentsOfFile_1 = - _registerName1("arrayWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_159( + late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = + _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); + instancetype _objc_msgSend_39( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return __objc_msgSend_159( + return __objc_msgSend_39( obj, sel, path, + isDir, + baseURL, ); } - late final __objc_msgSend_159Ptr = _lookup< + late final __objc_msgSend_39Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool, ffi.Pointer)>(); - late final _sel_arrayWithContentsOfURL_1 = - _registerName1("arrayWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_160( + late final _sel_initFileURLWithPath_relativeToURL_1 = + _registerName1("initFileURLWithPath:relativeToURL:"); + instancetype _objc_msgSend_40( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer path, + ffi.Pointer baseURL, ) { - return __objc_msgSend_160( + return __objc_msgSend_40( obj, sel, - url, + path, + baseURL, ); } - late final __objc_msgSend_160Ptr = _lookup< + late final __objc_msgSend_40Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithContentsOfFile_1 = - _registerName1("initWithContentsOfFile:"); - late final _sel_initWithContentsOfURL_1 = - _registerName1("initWithContentsOfURL:"); - late final _sel_writeToURL_atomically_1 = - _registerName1("writeToURL:atomically:"); - bool _objc_msgSend_161( + late final _sel_initFileURLWithPath_isDirectory_1 = + _registerName1("initFileURLWithPath:isDirectory:"); + instancetype _objc_msgSend_41( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - bool atomically, + ffi.Pointer path, + bool isDir, ) { - return __objc_msgSend_161( + return __objc_msgSend_41( obj, sel, - url, - atomically, + path, + isDir, ); } - late final __objc_msgSend_161Ptr = _lookup< + late final __objc_msgSend_41Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); - late final _sel_allKeys1 = _registerName1("allKeys"); - ffi.Pointer _objc_msgSend_162( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_162( - obj, - sel, - ); - } - - late final __objc_msgSend_162Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allKeysForObject_1 = _registerName1("allKeysForObject:"); - late final _sel_allValues1 = _registerName1("allValues"); - late final _sel_descriptionInStringsFileFormat1 = - _registerName1("descriptionInStringsFileFormat"); - late final _sel_isEqualToDictionary_1 = - _registerName1("isEqualToDictionary:"); - bool _objc_msgSend_163( + late final _sel_initFileURLWithPath_1 = + _registerName1("initFileURLWithPath:"); + instancetype _objc_msgSend_42( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherDictionary, + ffi.Pointer path, ) { - return __objc_msgSend_163( + return __objc_msgSend_42( obj, sel, - otherDictionary, + path, ); } - late final __objc_msgSend_163Ptr = _lookup< + late final __objc_msgSend_42Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_objectsForKeys_notFoundMarker_1 = - _registerName1("objectsForKeys:notFoundMarker:"); - ffi.Pointer _objc_msgSend_164( + late final _sel_fileURLWithPath_isDirectory_relativeToURL_1 = + _registerName1("fileURLWithPath:isDirectory:relativeToURL:"); + ffi.Pointer _objc_msgSend_43( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer marker, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return __objc_msgSend_164( + return __objc_msgSend_43( obj, sel, - keys, - marker, + path, + isDir, + baseURL, ); } - late final __objc_msgSend_164Ptr = _lookup< + late final __objc_msgSend_43Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Bool, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< + late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + bool, ffi.Pointer)>(); - late final _sel_keysSortedByValueUsingSelector_1 = - _registerName1("keysSortedByValueUsingSelector:"); - late final _sel_getObjects_andKeys_count_1 = - _registerName1("getObjects:andKeys:count:"); - void _objc_msgSend_165( + late final _sel_fileURLWithPath_relativeToURL_1 = + _registerName1("fileURLWithPath:relativeToURL:"); + ffi.Pointer _objc_msgSend_44( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - int count, + ffi.Pointer path, + ffi.Pointer baseURL, ) { - return __objc_msgSend_165( + return __objc_msgSend_44( obj, sel, - objects, - keys, - count, + path, + baseURL, ); } - late final __objc_msgSend_165Ptr = _lookup< + late final __objc_msgSend_44Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< - void Function( + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_objectForKeyedSubscript_1 = - _registerName1("objectForKeyedSubscript:"); - late final _sel_enumerateKeysAndObjectsUsingBlock_1 = - _registerName1("enumerateKeysAndObjectsUsingBlock:"); - void _objc_msgSend_166( + late final _sel_fileURLWithPath_isDirectory_1 = + _registerName1("fileURLWithPath:isDirectory:"); + ffi.Pointer _objc_msgSend_45( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer path, + bool isDir, ) { - return __objc_msgSend_166( + return __objc_msgSend_45( obj, sel, - block, + path, + isDir, ); } - late final __objc_msgSend_166Ptr = _lookup< + late final __objc_msgSend_45Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); - late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); - void _objc_msgSend_167( + late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); + ffi.Pointer _objc_msgSend_46( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer path, ) { - return __objc_msgSend_167( + return __objc_msgSend_46( obj, sel, - opts, - block, + path, ); } - late final __objc_msgSend_167Ptr = _lookup< + late final __objc_msgSend_46Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_keysSortedByValueUsingComparator_1 = - _registerName1("keysSortedByValueUsingComparator:"); - late final _sel_keysSortedByValueWithOptions_usingComparator_1 = - _registerName1("keysSortedByValueWithOptions:usingComparator:"); - late final _sel_keysOfEntriesPassingTest_1 = - _registerName1("keysOfEntriesPassingTest:"); - ffi.Pointer _objc_msgSend_168( + late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = + _registerName1( + "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); + instancetype _objc_msgSend_47( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return __objc_msgSend_168( + return __objc_msgSend_47( obj, sel, - predicate, + path, + isDir, + baseURL, ); } - late final __objc_msgSend_168Ptr = _lookup< + late final __objc_msgSend_47Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool, ffi.Pointer)>(); - late final _sel_keysOfEntriesWithOptions_passingTest_1 = - _registerName1("keysOfEntriesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_169( + late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = + _registerName1( + "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); + ffi.Pointer _objc_msgSend_48( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return __objc_msgSend_169( + return __objc_msgSend_48( obj, sel, - opts, - predicate, + path, + isDir, + baseURL, ); } - late final __objc_msgSend_169Ptr = _lookup< + late final __objc_msgSend_48Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); - void _objc_msgSend_170( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - ) { - return __objc_msgSend_170( - obj, - sel, - objects, - keys, - ); - } - - late final __objc_msgSend_170Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< - void Function( + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); + ffi.Pointer, + bool, + ffi.Pointer)>(); - late final _sel_dictionaryWithContentsOfFile_1 = - _registerName1("dictionaryWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_171( + late final _sel_initWithString_1 = _registerName1("initWithString:"); + late final _sel_initWithString_relativeToURL_1 = + _registerName1("initWithString:relativeToURL:"); + late final _sel_URLWithString_1 = _registerName1("URLWithString:"); + late final _sel_URLWithString_relativeToURL_1 = + _registerName1("URLWithString:relativeToURL:"); + late final _sel_initWithDataRepresentation_relativeToURL_1 = + _registerName1("initWithDataRepresentation:relativeToURL:"); + instancetype _objc_msgSend_49( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer data, + ffi.Pointer baseURL, ) { - return __objc_msgSend_171( + return __objc_msgSend_49( obj, sel, - path, + data, + baseURL, ); } - late final __objc_msgSend_171Ptr = _lookup< + late final __objc_msgSend_49Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dictionaryWithContentsOfURL_1 = - _registerName1("dictionaryWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_172( + late final _sel_URLWithDataRepresentation_relativeToURL_1 = + _registerName1("URLWithDataRepresentation:relativeToURL:"); + ffi.Pointer _objc_msgSend_50( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer data, + ffi.Pointer baseURL, ) { - return __objc_msgSend_172( + return __objc_msgSend_50( obj, sel, - url, + data, + baseURL, ); } - late final __objc_msgSend_172Ptr = _lookup< + late final __objc_msgSend_50Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_dictionary1 = _registerName1("dictionary"); - late final _sel_dictionaryWithObject_forKey_1 = - _registerName1("dictionaryWithObject:forKey:"); - instancetype _objc_msgSend_173( + late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1 = + _registerName1("initAbsoluteURLWithDataRepresentation:relativeToURL:"); + late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = + _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); + late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); + ffi.Pointer _objc_msgSend_51( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer object, - ffi.Pointer key, ) { - return __objc_msgSend_173( + return __objc_msgSend_51( obj, sel, - object, - key, ); } - late final __objc_msgSend_173Ptr = _lookup< + late final __objc_msgSend_51Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dictionaryWithObjects_forKeys_count_1 = - _registerName1("dictionaryWithObjects:forKeys:count:"); - late final _sel_dictionaryWithObjectsAndKeys_1 = - _registerName1("dictionaryWithObjectsAndKeys:"); - late final _sel_dictionaryWithDictionary_1 = - _registerName1("dictionaryWithDictionary:"); - instancetype _objc_msgSend_174( + late final _sel_absoluteString1 = _registerName1("absoluteString"); + late final _sel_relativeString1 = _registerName1("relativeString"); + late final _sel_baseURL1 = _registerName1("baseURL"); + ffi.Pointer _objc_msgSend_52( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer dict, ) { - return __objc_msgSend_174( + return __objc_msgSend_52( obj, sel, - dict, ); } - late final __objc_msgSend_174Ptr = _lookup< + late final __objc_msgSend_52Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dictionaryWithObjects_forKeys_1 = - _registerName1("dictionaryWithObjects:forKeys:"); - instancetype _objc_msgSend_175( + late final _sel_absoluteURL1 = _registerName1("absoluteURL"); + late final _sel_scheme1 = _registerName1("scheme"); + late final _sel_resourceSpecifier1 = _registerName1("resourceSpecifier"); + late final _sel_host1 = _registerName1("host"); + late final _class_NSNumber1 = _getClass1("NSNumber"); + late final _class_NSValue1 = _getClass1("NSValue"); + late final _sel_getValue_size_1 = _registerName1("getValue:size:"); + late final _sel_objCType1 = _registerName1("objCType"); + ffi.Pointer _objc_msgSend_53( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer keys, ) { - return __objc_msgSend_175( + return __objc_msgSend_53( obj, sel, - objects, - keys, ); } - late final __objc_msgSend_175Ptr = _lookup< + late final __objc_msgSend_53Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithObjectsAndKeys_1 = - _registerName1("initWithObjectsAndKeys:"); - late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); - late final _sel_initWithDictionary_copyItems_1 = - _registerName1("initWithDictionary:copyItems:"); - instancetype _objc_msgSend_176( + late final _sel_initWithBytes_objCType_1 = + _registerName1("initWithBytes:objCType:"); + instancetype _objc_msgSend_54( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherDictionary, - bool flag, + ffi.Pointer value, + ffi.Pointer type, ) { - return __objc_msgSend_176( + return __objc_msgSend_54( obj, sel, - otherDictionary, - flag, + value, + type, ); } - late final __objc_msgSend_176Ptr = _lookup< + late final __objc_msgSend_54Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithObjects_forKeys_1 = - _registerName1("initWithObjects:forKeys:"); - ffi.Pointer _objc_msgSend_177( + late final _sel_valueWithBytes_objCType_1 = + _registerName1("valueWithBytes:objCType:"); + ffi.Pointer _objc_msgSend_55( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, + ffi.Pointer value, + ffi.Pointer type, ) { - return __objc_msgSend_177( + return __objc_msgSend_55( obj, sel, - url, - error, + value, + type, ); } - late final __objc_msgSend_177Ptr = _lookup< + late final __objc_msgSend_55Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_dictionaryWithContentsOfURL_error_1 = - _registerName1("dictionaryWithContentsOfURL:error:"); - late final _sel_sharedKeySetForKeys_1 = - _registerName1("sharedKeySetForKeys:"); - late final _sel_countByEnumeratingWithState_objects_count_1 = - _registerName1("countByEnumeratingWithState:objects:count:"); - int _objc_msgSend_178( + late final _sel_value_withObjCType_1 = _registerName1("value:withObjCType:"); + late final _sel_valueWithNonretainedObject_1 = + _registerName1("valueWithNonretainedObject:"); + ffi.Pointer _objc_msgSend_56( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer state, - ffi.Pointer> buffer, - int len, + ffi.Pointer anObject, ) { - return __objc_msgSend_178( + return __objc_msgSend_56( obj, sel, - state, - buffer, - len, + anObject, ); } - late final __objc_msgSend_178Ptr = _lookup< + late final __objc_msgSend_56Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithDomain_code_userInfo_1 = - _registerName1("initWithDomain:code:userInfo:"); - instancetype _objc_msgSend_179( + late final _sel_nonretainedObjectValue1 = + _registerName1("nonretainedObjectValue"); + late final _sel_valueWithPointer_1 = _registerName1("valueWithPointer:"); + ffi.Pointer _objc_msgSend_57( ffi.Pointer obj, ffi.Pointer sel, - NSErrorDomain domain, - int code, - ffi.Pointer dict, + ffi.Pointer pointer, ) { - return __objc_msgSend_179( + return __objc_msgSend_57( obj, sel, - domain, - code, - dict, + pointer, ); } - late final __objc_msgSend_179Ptr = _lookup< + late final __objc_msgSend_57Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSErrorDomain, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, int, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_errorWithDomain_code_userInfo_1 = - _registerName1("errorWithDomain:code:userInfo:"); - late final _sel_domain1 = _registerName1("domain"); - late final _sel_code1 = _registerName1("code"); - late final _sel_userInfo1 = _registerName1("userInfo"); - ffi.Pointer _objc_msgSend_180( + late final _sel_pointerValue1 = _registerName1("pointerValue"); + late final _sel_isEqualToValue_1 = _registerName1("isEqualToValue:"); + bool _objc_msgSend_58( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer value, ) { - return __objc_msgSend_180( + return __objc_msgSend_58( obj, sel, + value, ); } - late final __objc_msgSend_180Ptr = _lookup< + late final __objc_msgSend_58Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_localizedDescription1 = - _registerName1("localizedDescription"); - late final _sel_localizedFailureReason1 = - _registerName1("localizedFailureReason"); - late final _sel_localizedRecoverySuggestion1 = - _registerName1("localizedRecoverySuggestion"); - late final _sel_localizedRecoveryOptions1 = - _registerName1("localizedRecoveryOptions"); - late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); - late final _sel_helpAnchor1 = _registerName1("helpAnchor"); - late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); - late final _sel_setUserInfoValueProviderForDomain_provider_1 = - _registerName1("setUserInfoValueProviderForDomain:provider:"); - void _objc_msgSend_181( + late final _sel_getValue_1 = _registerName1("getValue:"); + void _objc_msgSend_59( ffi.Pointer obj, ffi.Pointer sel, - NSErrorDomain errorDomain, - ffi.Pointer<_ObjCBlock> provider, + ffi.Pointer value, ) { - return __objc_msgSend_181( + return __objc_msgSend_59( obj, sel, - errorDomain, - provider, + value, ); } - late final __objc_msgSend_181Ptr = _lookup< + late final __objc_msgSend_59Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer)>(); - late final _sel_userInfoValueProviderForDomain_1 = - _registerName1("userInfoValueProviderForDomain:"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_182( + late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); + ffi.Pointer _objc_msgSend_60( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer err, - NSErrorUserInfoKey userInfoKey, - NSErrorDomain errorDomain, + NSRange range, ) { - return __objc_msgSend_182( + return __objc_msgSend_60( obj, sel, - err, - userInfoKey, - errorDomain, + range, ); } - late final __objc_msgSend_182Ptr = _lookup< + late final __objc_msgSend_60Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSErrorUserInfoKey, - NSErrorDomain)>>('objc_msgSend'); - late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSErrorUserInfoKey, - NSErrorDomain)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_checkResourceIsReachableAndReturnError_1 = - _registerName1("checkResourceIsReachableAndReturnError:"); - bool _objc_msgSend_183( + late final _sel_rangeValue1 = _registerName1("rangeValue"); + NSRange _objc_msgSend_61( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> error, ) { - return __objc_msgSend_183( + return __objc_msgSend_61( obj, sel, - error, ); } - late final __objc_msgSend_183Ptr = _lookup< + late final __objc_msgSend_61Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + NSRange Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); - late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); - late final _sel_filePathURL1 = _registerName1("filePathURL"); - late final _sel_getResourceValue_forKey_error_1 = - _registerName1("getResourceValue:forKey:error:"); - bool _objc_msgSend_184( + late final _sel_initWithChar_1 = _registerName1("initWithChar:"); + ffi.Pointer _objc_msgSend_62( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_184( + return __objc_msgSend_62( obj, sel, value, - key, - error, ); } - late final __objc_msgSend_184Ptr = _lookup< + late final __objc_msgSend_62Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSURLResourceKey, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSURLResourceKey, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Char)>>('objc_msgSend'); + late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_resourceValuesForKeys_error_1 = - _registerName1("resourceValuesForKeys:error:"); - ffi.Pointer _objc_msgSend_185( + late final _sel_initWithUnsignedChar_1 = + _registerName1("initWithUnsignedChar:"); + ffi.Pointer _objc_msgSend_63( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_185( + return __objc_msgSend_63( obj, sel, - keys, - error, + value, ); } - late final __objc_msgSend_185Ptr = _lookup< + late final __objc_msgSend_63Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); + late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_setResourceValue_forKey_error_1 = - _registerName1("setResourceValue:forKey:error:"); - bool _objc_msgSend_186( + late final _sel_initWithShort_1 = _registerName1("initWithShort:"); + ffi.Pointer _objc_msgSend_64( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, - NSURLResourceKey key, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_186( + return __objc_msgSend_64( obj, sel, value, - key, - error, ); } - late final __objc_msgSend_186Ptr = _lookup< + late final __objc_msgSend_64Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLResourceKey, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLResourceKey, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Short)>>('objc_msgSend'); + late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_setResourceValues_error_1 = - _registerName1("setResourceValues:error:"); - bool _objc_msgSend_187( + late final _sel_initWithUnsignedShort_1 = + _registerName1("initWithUnsignedShort:"); + ffi.Pointer _objc_msgSend_65( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keyedValues, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_187( + return __objc_msgSend_65( obj, sel, - keyedValues, - error, + value, ); } - late final __objc_msgSend_187Ptr = _lookup< + late final __objc_msgSend_65Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); + late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeCachedResourceValueForKey_1 = - _registerName1("removeCachedResourceValueForKey:"); - void _objc_msgSend_188( + late final _sel_initWithInt_1 = _registerName1("initWithInt:"); + ffi.Pointer _objc_msgSend_66( ffi.Pointer obj, ffi.Pointer sel, - NSURLResourceKey key, + int value, ) { - return __objc_msgSend_188( + return __objc_msgSend_66( obj, sel, - key, + value, ); } - late final __objc_msgSend_188Ptr = _lookup< + late final __objc_msgSend_66Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSURLResourceKey)>>('objc_msgSend'); - late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, NSURLResourceKey)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>('objc_msgSend'); + late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeAllCachedResourceValues1 = - _registerName1("removeAllCachedResourceValues"); - late final _sel_setTemporaryResourceValue_forKey_1 = - _registerName1("setTemporaryResourceValue:forKey:"); - void _objc_msgSend_189( + late final _sel_initWithUnsignedInt_1 = + _registerName1("initWithUnsignedInt:"); + ffi.Pointer _objc_msgSend_67( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, - NSURLResourceKey key, + int value, ) { - return __objc_msgSend_189( + return __objc_msgSend_67( obj, sel, value, - key, ); } - late final __objc_msgSend_189Ptr = _lookup< + late final __objc_msgSend_67Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSURLResourceKey)>>('objc_msgSend'); - late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSURLResourceKey)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); + late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = - _registerName1( - "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); - ffi.Pointer _objc_msgSend_190( + late final _sel_initWithLong_1 = _registerName1("initWithLong:"); + ffi.Pointer _objc_msgSend_68( ffi.Pointer obj, ffi.Pointer sel, - int options, - ffi.Pointer keys, - ffi.Pointer relativeURL, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_190( + return __objc_msgSend_68( obj, sel, - options, - keys, - relativeURL, - error, + value, ); } - late final __objc_msgSend_190Ptr = _lookup< + late final __objc_msgSend_68Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - instancetype _objc_msgSend_191( + late final _sel_initWithUnsignedLong_1 = + _registerName1("initWithUnsignedLong:"); + ffi.Pointer _objc_msgSend_69( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bookmarkData, - int options, - ffi.Pointer relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_191( + return __objc_msgSend_69( obj, sel, - bookmarkData, - options, - relativeURL, - isStale, - error, + value, ); } - late final __objc_msgSend_191Ptr = _lookup< + late final __objc_msgSend_69Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - late final _sel_resourceValuesForKeys_fromBookmarkData_1 = - _registerName1("resourceValuesForKeys:fromBookmarkData:"); - ffi.Pointer _objc_msgSend_192( + late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); + ffi.Pointer _objc_msgSend_70( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer bookmarkData, + int value, ) { - return __objc_msgSend_192( + return __objc_msgSend_70( obj, sel, - keys, - bookmarkData, + value, ); } - late final __objc_msgSend_192Ptr = _lookup< + late final __objc_msgSend_70Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); + late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_writeBookmarkData_toURL_options_error_1 = - _registerName1("writeBookmarkData:toURL:options:error:"); - bool _objc_msgSend_193( + late final _sel_initWithUnsignedLongLong_1 = + _registerName1("initWithUnsignedLongLong:"); + ffi.Pointer _objc_msgSend_71( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bookmarkData, - ffi.Pointer bookmarkFileURL, - int options, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_193( + return __objc_msgSend_71( obj, sel, - bookmarkData, - bookmarkFileURL, - options, - error, + value, ); } - late final __objc_msgSend_193Ptr = _lookup< + late final __objc_msgSend_71Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLBookmarkFileCreationOptions, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); + late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_bookmarkDataWithContentsOfURL_error_1 = - _registerName1("bookmarkDataWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_194( + late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); + ffi.Pointer _objc_msgSend_72( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bookmarkFileURL, - ffi.Pointer> error, + double value, ) { - return __objc_msgSend_194( + return __objc_msgSend_72( obj, sel, - bookmarkFileURL, - error, + value, ); } - late final __objc_msgSend_194Ptr = _lookup< + late final __objc_msgSend_72Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>('objc_msgSend'); + late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, ffi.Pointer, double)>(); - late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = - _registerName1("URLByResolvingAliasFileAtURL:options:error:"); - instancetype _objc_msgSend_195( + late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); + ffi.Pointer _objc_msgSend_73( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer> error, + double value, ) { - return __objc_msgSend_195( + return __objc_msgSend_73( obj, sel, - url, - options, - error, + value, ); } - late final __objc_msgSend_195Ptr = _lookup< + late final __objc_msgSend_73Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, double)>(); - late final _sel_startAccessingSecurityScopedResource1 = - _registerName1("startAccessingSecurityScopedResource"); - late final _sel_stopAccessingSecurityScopedResource1 = - _registerName1("stopAccessingSecurityScopedResource"); - late final _sel_getPromisedItemResourceValue_forKey_error_1 = - _registerName1("getPromisedItemResourceValue:forKey:error:"); - late final _sel_promisedItemResourceValuesForKeys_error_1 = - _registerName1("promisedItemResourceValuesForKeys:error:"); - late final _sel_checkPromisedItemIsReachableAndReturnError_1 = - _registerName1("checkPromisedItemIsReachableAndReturnError:"); - late final _sel_fileURLWithPathComponents_1 = - _registerName1("fileURLWithPathComponents:"); - ffi.Pointer _objc_msgSend_196( + late final _sel_initWithBool_1 = _registerName1("initWithBool:"); + ffi.Pointer _objc_msgSend_74( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer components, + bool value, ) { - return __objc_msgSend_196( + return __objc_msgSend_74( obj, sel, - components, + value, ); } - late final __objc_msgSend_196Ptr = _lookup< + late final __objc_msgSend_74Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); - late final _sel_pathComponents1 = _registerName1("pathComponents"); - late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); - late final _sel_pathExtension1 = _registerName1("pathExtension"); - late final _sel_URLByAppendingPathComponent_1 = - _registerName1("URLByAppendingPathComponent:"); - late final _sel_URLByAppendingPathComponent_isDirectory_1 = - _registerName1("URLByAppendingPathComponent:isDirectory:"); - late final _sel_URLByDeletingLastPathComponent1 = - _registerName1("URLByDeletingLastPathComponent"); - late final _sel_URLByAppendingPathExtension_1 = - _registerName1("URLByAppendingPathExtension:"); - late final _sel_URLByDeletingPathExtension1 = - _registerName1("URLByDeletingPathExtension"); - late final _sel_URLByStandardizingPath1 = - _registerName1("URLByStandardizingPath"); - late final _sel_URLByResolvingSymlinksInPath1 = - _registerName1("URLByResolvingSymlinksInPath"); - late final _sel_resourceDataUsingCache_1 = - _registerName1("resourceDataUsingCache:"); - ffi.Pointer _objc_msgSend_197( + late final _sel_initWithInteger_1 = _registerName1("initWithInteger:"); + late final _sel_initWithUnsignedInteger_1 = + _registerName1("initWithUnsignedInteger:"); + late final _sel_charValue1 = _registerName1("charValue"); + int _objc_msgSend_75( ffi.Pointer obj, ffi.Pointer sel, - bool shouldUseCache, ) { - return __objc_msgSend_197( + return __objc_msgSend_75( obj, sel, - shouldUseCache, ); } - late final __objc_msgSend_197Ptr = _lookup< + late final __objc_msgSend_75Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Char Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_loadResourceDataNotifyingClient_usingCache_1 = - _registerName1("loadResourceDataNotifyingClient:usingCache:"); - void _objc_msgSend_198( + late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); + int _objc_msgSend_76( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer client, - bool shouldUseCache, ) { - return __objc_msgSend_198( + return __objc_msgSend_76( obj, sel, - client, - shouldUseCache, ); } - late final __objc_msgSend_198Ptr = _lookup< + late final __objc_msgSend_76Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.UnsignedChar Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); - late final _sel_setResourceData_1 = _registerName1("setResourceData:"); - late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); - bool _objc_msgSend_199( + late final _sel_shortValue1 = _registerName1("shortValue"); + int _objc_msgSend_77( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer property, - ffi.Pointer propertyKey, ) { - return __objc_msgSend_199( + return __objc_msgSend_77( obj, sel, - property, - propertyKey, ); } - late final __objc_msgSend_199Ptr = _lookup< + late final __objc_msgSend_77Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Short Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); - late final _sel_registerURLHandleClass_1 = - _registerName1("registerURLHandleClass:"); - void _objc_msgSend_200( + late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); + int _objc_msgSend_78( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURLHandleSubclass, ) { - return __objc_msgSend_200( + return __objc_msgSend_78( obj, sel, - anURLHandleSubclass, ); } - late final __objc_msgSend_200Ptr = _lookup< + late final __objc_msgSend_78Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.UnsignedShort Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_URLHandleClassForURL_1 = - _registerName1("URLHandleClassForURL:"); - ffi.Pointer _objc_msgSend_201( + late final _sel_intValue1 = _registerName1("intValue"); + int _objc_msgSend_79( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURL, ) { - return __objc_msgSend_201( + return __objc_msgSend_79( obj, sel, - anURL, ); } - late final __objc_msgSend_201Ptr = _lookup< + late final __objc_msgSend_79Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_status1 = _registerName1("status"); - int _objc_msgSend_202( + late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); + int _objc_msgSend_80( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_202( + return __objc_msgSend_80( obj, sel, ); } - late final __objc_msgSend_202Ptr = _lookup< + late final __objc_msgSend_80Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( + ffi.UnsignedInt Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< + late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_failureReason1 = _registerName1("failureReason"); - late final _sel_addClient_1 = _registerName1("addClient:"); - late final _sel_removeClient_1 = _registerName1("removeClient:"); - late final _sel_loadInBackground1 = _registerName1("loadInBackground"); - late final _sel_cancelLoadInBackground1 = - _registerName1("cancelLoadInBackground"); - late final _sel_resourceData1 = _registerName1("resourceData"); - late final _sel_availableResourceData1 = - _registerName1("availableResourceData"); - late final _sel_expectedResourceDataSize1 = - _registerName1("expectedResourceDataSize"); - late final _sel_flushCachedData1 = _registerName1("flushCachedData"); - late final _sel_backgroundLoadDidFailWithReason_1 = - _registerName1("backgroundLoadDidFailWithReason:"); - late final _sel_didLoadBytes_loadComplete_1 = - _registerName1("didLoadBytes:loadComplete:"); - void _objc_msgSend_203( + late final _sel_longValue1 = _registerName1("longValue"); + int _objc_msgSend_81( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer newBytes, - bool yorn, ) { - return __objc_msgSend_203( + return __objc_msgSend_81( obj, sel, - newBytes, - yorn, ); } - late final __objc_msgSend_203Ptr = _lookup< + late final __objc_msgSend_81Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Long Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); - bool _objc_msgSend_204( + late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); + late final _sel_longLongValue1 = _registerName1("longLongValue"); + int _objc_msgSend_82( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURL, ) { - return __objc_msgSend_204( + return __objc_msgSend_82( obj, sel, - anURL, ); } - late final __objc_msgSend_204Ptr = _lookup< + late final __objc_msgSend_82Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.LongLong Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); - ffi.Pointer _objc_msgSend_205( + late final _sel_unsignedLongLongValue1 = + _registerName1("unsignedLongLongValue"); + int _objc_msgSend_83( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURL, ) { - return __objc_msgSend_205( + return __objc_msgSend_83( obj, sel, - anURL, ); } - late final __objc_msgSend_205Ptr = _lookup< + late final __objc_msgSend_83Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.UnsignedLongLong Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); - ffi.Pointer _objc_msgSend_206( + late final _sel_floatValue1 = _registerName1("floatValue"); + double _objc_msgSend_84( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURL, - bool willCache, ) { - return __objc_msgSend_206( + return __objc_msgSend_84( obj, sel, - anURL, - willCache, ); } - late final __objc_msgSend_206Ptr = _lookup< + late final __objc_msgSend_84Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Float Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_propertyForKeyIfAvailable_1 = - _registerName1("propertyForKeyIfAvailable:"); - late final _sel_writeProperty_forKey_1 = - _registerName1("writeProperty:forKey:"); - late final _sel_writeData_1 = _registerName1("writeData:"); - late final _sel_loadInForeground1 = _registerName1("loadInForeground"); - late final _sel_beginLoadInBackground1 = - _registerName1("beginLoadInBackground"); - late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); - late final _sel_URLHandleUsingCache_1 = - _registerName1("URLHandleUsingCache:"); - ffi.Pointer _objc_msgSend_207( + late final _sel_doubleValue1 = _registerName1("doubleValue"); + double _objc_msgSend_85( ffi.Pointer obj, ffi.Pointer sel, - bool shouldUseCache, ) { - return __objc_msgSend_207( + return __objc_msgSend_85( obj, sel, - shouldUseCache, ); } - late final __objc_msgSend_207Ptr = _lookup< + late final __objc_msgSend_85Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Double Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_writeToFile_options_error_1 = - _registerName1("writeToFile:options:error:"); - bool _objc_msgSend_208( + late final _sel_boolValue1 = _registerName1("boolValue"); + late final _sel_integerValue1 = _registerName1("integerValue"); + late final _sel_unsignedIntegerValue1 = + _registerName1("unsignedIntegerValue"); + late final _sel_stringValue1 = _registerName1("stringValue"); + int _objc_msgSend_86( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - int writeOptionsMask, - ffi.Pointer> errorPtr, + ffi.Pointer otherNumber, ) { - return __objc_msgSend_208( + return __objc_msgSend_86( obj, sel, - path, - writeOptionsMask, - errorPtr, + otherNumber, ); } - late final __objc_msgSend_208Ptr = _lookup< + late final __objc_msgSend_86Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_writeToURL_options_error_1 = - _registerName1("writeToURL:options:error:"); - bool _objc_msgSend_209( + late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); + bool _objc_msgSend_87( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - int writeOptionsMask, - ffi.Pointer> errorPtr, + ffi.Pointer number, ) { - return __objc_msgSend_209( + return __objc_msgSend_87( obj, sel, - url, - writeOptionsMask, - errorPtr, + number, ); } - late final __objc_msgSend_209Ptr = _lookup< + late final __objc_msgSend_87Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_rangeOfData_options_range_1 = - _registerName1("rangeOfData:options:range:"); - NSRange _objc_msgSend_210( + late final _sel_descriptionWithLocale_1 = + _registerName1("descriptionWithLocale:"); + ffi.Pointer _objc_msgSend_88( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer dataToFind, - int mask, - NSRange searchRange, + ffi.Pointer locale, ) { - return __objc_msgSend_210( + return __objc_msgSend_88( obj, sel, - dataToFind, - mask, - searchRange, + locale, ); } - late final __objc_msgSend_210Ptr = _lookup< + late final __objc_msgSend_88Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateByteRangesUsingBlock_1 = - _registerName1("enumerateByteRangesUsingBlock:"); - void _objc_msgSend_211( + late final _sel_numberWithChar_1 = _registerName1("numberWithChar:"); + late final _sel_numberWithUnsignedChar_1 = + _registerName1("numberWithUnsignedChar:"); + late final _sel_numberWithShort_1 = _registerName1("numberWithShort:"); + late final _sel_numberWithUnsignedShort_1 = + _registerName1("numberWithUnsignedShort:"); + late final _sel_numberWithInt_1 = _registerName1("numberWithInt:"); + late final _sel_numberWithUnsignedInt_1 = + _registerName1("numberWithUnsignedInt:"); + late final _sel_numberWithLong_1 = _registerName1("numberWithLong:"); + late final _sel_numberWithUnsignedLong_1 = + _registerName1("numberWithUnsignedLong:"); + late final _sel_numberWithLongLong_1 = _registerName1("numberWithLongLong:"); + late final _sel_numberWithUnsignedLongLong_1 = + _registerName1("numberWithUnsignedLongLong:"); + late final _sel_numberWithFloat_1 = _registerName1("numberWithFloat:"); + late final _sel_numberWithDouble_1 = _registerName1("numberWithDouble:"); + late final _sel_numberWithBool_1 = _registerName1("numberWithBool:"); + late final _sel_numberWithInteger_1 = _registerName1("numberWithInteger:"); + late final _sel_numberWithUnsignedInteger_1 = + _registerName1("numberWithUnsignedInteger:"); + late final _sel_port1 = _registerName1("port"); + ffi.Pointer _objc_msgSend_89( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_211( + return __objc_msgSend_89( obj, sel, - block, ); } - late final __objc_msgSend_211Ptr = _lookup< + late final __objc_msgSend_89Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_data1 = _registerName1("data"); - late final _sel_dataWithBytes_length_1 = - _registerName1("dataWithBytes:length:"); - instancetype _objc_msgSend_212( + late final _sel_user1 = _registerName1("user"); + late final _sel_password1 = _registerName1("password"); + late final _sel_path1 = _registerName1("path"); + late final _sel_fragment1 = _registerName1("fragment"); + late final _sel_parameterString1 = _registerName1("parameterString"); + late final _sel_query1 = _registerName1("query"); + late final _sel_relativePath1 = _registerName1("relativePath"); + late final _sel_hasDirectoryPath1 = _registerName1("hasDirectoryPath"); + late final _sel_getFileSystemRepresentation_maxLength_1 = + _registerName1("getFileSystemRepresentation:maxLength:"); + bool _objc_msgSend_90( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, + ffi.Pointer buffer, + int maxBufferLength, ) { - return __objc_msgSend_212( + return __objc_msgSend_90( obj, sel, - bytes, - length, + buffer, + maxBufferLength, ); } - late final __objc_msgSend_212Ptr = _lookup< + late final __objc_msgSend_90Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_dataWithBytesNoCopy_length_1 = - _registerName1("dataWithBytesNoCopy:length:"); - late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = - _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_213( + late final _sel_fileSystemRepresentation1 = + _registerName1("fileSystemRepresentation"); + late final _sel_isFileURL1 = _registerName1("isFileURL"); + late final _sel_standardizedURL1 = _registerName1("standardizedURL"); + late final _class_NSError1 = _getClass1("NSError"); + late final _class_NSDictionary1 = _getClass1("NSDictionary"); + late final _sel_count1 = _registerName1("count"); + late final _sel_objectForKey_1 = _registerName1("objectForKey:"); + ffi.Pointer _objc_msgSend_91( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool b, + ffi.Pointer aKey, ) { - return __objc_msgSend_213( + return __objc_msgSend_91( obj, sel, - bytes, - length, - b, + aKey, ); } - late final __objc_msgSend_213Ptr = _lookup< + late final __objc_msgSend_91Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dataWithContentsOfFile_options_error_1 = - _registerName1("dataWithContentsOfFile:options:error:"); - instancetype _objc_msgSend_214( + late final _class_NSEnumerator1 = _getClass1("NSEnumerator"); + late final _sel_nextObject1 = _registerName1("nextObject"); + late final _sel_allObjects1 = _registerName1("allObjects"); + late final _sel_keyEnumerator1 = _registerName1("keyEnumerator"); + ffi.Pointer _objc_msgSend_92( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - int readOptionsMask, - ffi.Pointer> errorPtr, ) { - return __objc_msgSend_214( + return __objc_msgSend_92( obj, sel, - path, - readOptionsMask, - errorPtr, ); } - late final __objc_msgSend_214Ptr = _lookup< + late final __objc_msgSend_92Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dataWithContentsOfURL_options_error_1 = - _registerName1("dataWithContentsOfURL:options:error:"); - instancetype _objc_msgSend_215( + late final _sel_initWithObjects_forKeys_count_1 = + _registerName1("initWithObjects:forKeys:count:"); + instancetype _objc_msgSend_93( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - int readOptionsMask, - ffi.Pointer> errorPtr, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt, ) { - return __objc_msgSend_215( + return __objc_msgSend_93( obj, sel, - url, - readOptionsMask, - errorPtr, + objects, + keys, + cnt, ); } - late final __objc_msgSend_215Ptr = _lookup< + late final __objc_msgSend_93Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< + ffi.Pointer>, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Pointer>, + ffi.Pointer>, + int)>(); - late final _sel_dataWithContentsOfFile_1 = - _registerName1("dataWithContentsOfFile:"); - late final _sel_dataWithContentsOfURL_1 = - _registerName1("dataWithContentsOfURL:"); - late final _sel_initWithBytes_length_1 = - _registerName1("initWithBytes:length:"); - late final _sel_initWithBytesNoCopy_length_1 = - _registerName1("initWithBytesNoCopy:length:"); - late final _sel_initWithBytesNoCopy_length_freeWhenDone_1 = - _registerName1("initWithBytesNoCopy:length:freeWhenDone:"); - late final _sel_initWithBytesNoCopy_length_deallocator_1 = - _registerName1("initWithBytesNoCopy:length:deallocator:"); - instancetype _objc_msgSend_216( + late final _class_NSArray1 = _getClass1("NSArray"); + late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); + ffi.Pointer _objc_msgSend_94( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, - ffi.Pointer<_ObjCBlock> deallocator, + int index, ) { - return __objc_msgSend_216( + return __objc_msgSend_94( obj, sel, - bytes, - length, - deallocator, + index, ); } - late final __objc_msgSend_216Ptr = _lookup< + late final __objc_msgSend_94Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_initWithContentsOfFile_options_error_1 = - _registerName1("initWithContentsOfFile:options:error:"); - late final _sel_initWithContentsOfURL_options_error_1 = - _registerName1("initWithContentsOfURL:options:error:"); - late final _sel_initWithData_1 = _registerName1("initWithData:"); - instancetype _objc_msgSend_217( + late final _sel_initWithObjects_count_1 = + _registerName1("initWithObjects:count:"); + instancetype _objc_msgSend_95( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, + ffi.Pointer> objects, + int cnt, ) { - return __objc_msgSend_217( + return __objc_msgSend_95( obj, sel, - data, + objects, + cnt, ); } - late final __objc_msgSend_217Ptr = _lookup< + late final __objc_msgSend_95Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer>, int)>(); - late final _sel_dataWithData_1 = _registerName1("dataWithData:"); - late final _sel_initWithBase64EncodedString_options_1 = - _registerName1("initWithBase64EncodedString:options:"); - instancetype _objc_msgSend_218( + late final _sel_arrayByAddingObject_1 = + _registerName1("arrayByAddingObject:"); + ffi.Pointer _objc_msgSend_96( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer base64String, - int options, + ffi.Pointer anObject, ) { - return __objc_msgSend_218( + return __objc_msgSend_96( obj, sel, - base64String, - options, + anObject, ); } - late final __objc_msgSend_218Ptr = _lookup< + late final __objc_msgSend_96Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_base64EncodedStringWithOptions_1 = - _registerName1("base64EncodedStringWithOptions:"); - ffi.Pointer _objc_msgSend_219( + late final _sel_arrayByAddingObjectsFromArray_1 = + _registerName1("arrayByAddingObjectsFromArray:"); + ffi.Pointer _objc_msgSend_97( ffi.Pointer obj, ffi.Pointer sel, - int options, + ffi.Pointer otherArray, ) { - return __objc_msgSend_219( + return __objc_msgSend_97( obj, sel, - options, + otherArray, ); } - late final __objc_msgSend_219Ptr = _lookup< + late final __objc_msgSend_97Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithBase64EncodedData_options_1 = - _registerName1("initWithBase64EncodedData:options:"); - instancetype _objc_msgSend_220( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer base64Data, - int options, - ) { - return __objc_msgSend_220( - obj, - sel, - base64Data, - options, - ); - } - - late final __objc_msgSend_220Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_base64EncodedDataWithOptions_1 = - _registerName1("base64EncodedDataWithOptions:"); - ffi.Pointer _objc_msgSend_221( + late final _sel_componentsJoinedByString_1 = + _registerName1("componentsJoinedByString:"); + ffi.Pointer _objc_msgSend_98( ffi.Pointer obj, ffi.Pointer sel, - int options, + ffi.Pointer separator, ) { - return __objc_msgSend_221( + return __objc_msgSend_98( obj, sel, - options, + separator, ); } - late final __objc_msgSend_221Ptr = _lookup< + late final __objc_msgSend_98Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_decompressedDataUsingAlgorithm_error_1 = - _registerName1("decompressedDataUsingAlgorithm:error:"); - instancetype _objc_msgSend_222( + late final _sel_containsObject_1 = _registerName1("containsObject:"); + late final _sel_descriptionWithLocale_indent_1 = + _registerName1("descriptionWithLocale:indent:"); + ffi.Pointer _objc_msgSend_99( ffi.Pointer obj, ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, + ffi.Pointer locale, + int level, ) { - return __objc_msgSend_222( + return __objc_msgSend_99( obj, sel, - algorithm, - error, + locale, + level, ); } - late final __objc_msgSend_222Ptr = _lookup< + late final __objc_msgSend_99Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); + ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_compressedDataUsingAlgorithm_error_1 = - _registerName1("compressedDataUsingAlgorithm:error:"); - late final _sel_getBytes_1 = _registerName1("getBytes:"); - late final _sel_dataWithContentsOfMappedFile_1 = - _registerName1("dataWithContentsOfMappedFile:"); - late final _sel_initWithContentsOfMappedFile_1 = - _registerName1("initWithContentsOfMappedFile:"); - late final _sel_initWithBase64Encoding_1 = - _registerName1("initWithBase64Encoding:"); - late final _sel_base64Encoding1 = _registerName1("base64Encoding"); - late final _sel_characterSetWithBitmapRepresentation_1 = - _registerName1("characterSetWithBitmapRepresentation:"); - ffi.Pointer _objc_msgSend_223( + late final _sel_firstObjectCommonWithArray_1 = + _registerName1("firstObjectCommonWithArray:"); + ffi.Pointer _objc_msgSend_100( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, + ffi.Pointer otherArray, ) { - return __objc_msgSend_223( + return __objc_msgSend_100( obj, sel, - data, + otherArray, ); } - late final __objc_msgSend_223Ptr = _lookup< + late final __objc_msgSend_100Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< + late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_characterSetWithContentsOfFile_1 = - _registerName1("characterSetWithContentsOfFile:"); - late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); - bool _objc_msgSend_224( + late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); + void _objc_msgSend_101( ffi.Pointer obj, ffi.Pointer sel, - int aCharacter, + ffi.Pointer> objects, + NSRange range, ) { - return __objc_msgSend_224( + return __objc_msgSend_101( obj, sel, - aCharacter, + objects, + range, ); } - late final __objc_msgSend_224Ptr = _lookup< + late final __objc_msgSend_101Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - unichar)>>('objc_msgSend'); - late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, NSRange)>(); - late final _sel_bitmapRepresentation1 = - _registerName1("bitmapRepresentation"); - late final _sel_invertedSet1 = _registerName1("invertedSet"); - late final _sel_longCharacterIsMember_1 = - _registerName1("longCharacterIsMember:"); - bool _objc_msgSend_225( + late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); + int _objc_msgSend_102( ffi.Pointer obj, ffi.Pointer sel, - int theLongChar, + ffi.Pointer anObject, ) { - return __objc_msgSend_225( + return __objc_msgSend_102( obj, sel, - theLongChar, + anObject, ); } - late final __objc_msgSend_225Ptr = _lookup< + late final __objc_msgSend_102Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - UTF32Char)>>('objc_msgSend'); - late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); - bool _objc_msgSend_226( + late final _sel_indexOfObject_inRange_1 = + _registerName1("indexOfObject:inRange:"); + int _objc_msgSend_103( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer theOtherSet, + ffi.Pointer anObject, + NSRange range, ) { - return __objc_msgSend_226( + return __objc_msgSend_103( obj, sel, - theOtherSet, + anObject, + range, ); } - late final __objc_msgSend_226Ptr = _lookup< + late final __objc_msgSend_103Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); - bool _objc_msgSend_227( + late final _sel_indexOfObjectIdenticalTo_1 = + _registerName1("indexOfObjectIdenticalTo:"); + late final _sel_indexOfObjectIdenticalTo_inRange_1 = + _registerName1("indexOfObjectIdenticalTo:inRange:"); + late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); + bool _objc_msgSend_104( ffi.Pointer obj, ffi.Pointer sel, - int thePlane, + ffi.Pointer otherArray, ) { - return __objc_msgSend_227( + return __objc_msgSend_104( obj, sel, - thePlane, + otherArray, ); } - late final __objc_msgSend_227Ptr = _lookup< + late final __objc_msgSend_104Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Uint8)>>('objc_msgSend'); - late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_URLUserAllowedCharacterSet1 = - _registerName1("URLUserAllowedCharacterSet"); - late final _sel_URLPasswordAllowedCharacterSet1 = - _registerName1("URLPasswordAllowedCharacterSet"); - late final _sel_URLHostAllowedCharacterSet1 = - _registerName1("URLHostAllowedCharacterSet"); - late final _sel_URLPathAllowedCharacterSet1 = - _registerName1("URLPathAllowedCharacterSet"); - late final _sel_URLQueryAllowedCharacterSet1 = - _registerName1("URLQueryAllowedCharacterSet"); - late final _sel_URLFragmentAllowedCharacterSet1 = - _registerName1("URLFragmentAllowedCharacterSet"); - late final _sel_rangeOfCharacterFromSet_1 = - _registerName1("rangeOfCharacterFromSet:"); - NSRange _objc_msgSend_228( + late final _sel_firstObject1 = _registerName1("firstObject"); + late final _sel_lastObject1 = _registerName1("lastObject"); + late final _sel_objectEnumerator1 = _registerName1("objectEnumerator"); + late final _sel_reverseObjectEnumerator1 = + _registerName1("reverseObjectEnumerator"); + late final _sel_sortedArrayHint1 = _registerName1("sortedArrayHint"); + late final _sel_sortedArrayUsingFunction_context_1 = + _registerName1("sortedArrayUsingFunction:context:"); + ffi.Pointer _objc_msgSend_105( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchSet, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, ) { - return __objc_msgSend_228( + return __objc_msgSend_105( obj, sel, - searchSet, + comparator, + context, ); } - late final __objc_msgSend_228Ptr = _lookup< + late final __objc_msgSend_105Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); - late final _sel_rangeOfCharacterFromSet_options_1 = - _registerName1("rangeOfCharacterFromSet:options:"); - NSRange _objc_msgSend_229( + late final _sel_sortedArrayUsingFunction_context_hint_1 = + _registerName1("sortedArrayUsingFunction:context:hint:"); + ffi.Pointer _objc_msgSend_106( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + ffi.Pointer hint, ) { - return __objc_msgSend_229( + return __objc_msgSend_106( obj, sel, - searchSet, - mask, + comparator, + context, + hint, ); } - late final __objc_msgSend_229Ptr = _lookup< + late final __objc_msgSend_106Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_rangeOfCharacterFromSet_options_range_1 = - _registerName1("rangeOfCharacterFromSet:options:range:"); - NSRange _objc_msgSend_230( + late final _sel_sortedArrayUsingSelector_1 = + _registerName1("sortedArrayUsingSelector:"); + ffi.Pointer _objc_msgSend_107( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - NSRange rangeOfReceiverToSearch, + ffi.Pointer comparator, ) { - return __objc_msgSend_230( + return __objc_msgSend_107( obj, sel, - searchSet, - mask, - rangeOfReceiverToSearch, + comparator, ); } - late final __objc_msgSend_230Ptr = _lookup< + late final __objc_msgSend_107Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = - _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); - NSRange _objc_msgSend_231( + late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); + ffi.Pointer _objc_msgSend_108( ffi.Pointer obj, ffi.Pointer sel, - int index, + NSRange range, ) { - return __objc_msgSend_231( + return __objc_msgSend_108( obj, sel, - index, + range, ); } - late final __objc_msgSend_231Ptr = _lookup< + late final __objc_msgSend_108Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_rangeOfComposedCharacterSequencesForRange_1 = - _registerName1("rangeOfComposedCharacterSequencesForRange:"); - NSRange _objc_msgSend_232( + late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); + bool _objc_msgSend_109( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + ffi.Pointer url, + ffi.Pointer> error, ) { - return __objc_msgSend_232( + return __objc_msgSend_109( obj, sel, - range, + url, + error, ); } - late final __objc_msgSend_232Ptr = _lookup< + late final __objc_msgSend_109Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< - NSRange Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - late final _sel_stringByAppendingString_1 = - _registerName1("stringByAppendingString:"); - late final _sel_stringByAppendingFormat_1 = - _registerName1("stringByAppendingFormat:"); - late final _sel_uppercaseString1 = _registerName1("uppercaseString"); - late final _sel_lowercaseString1 = _registerName1("lowercaseString"); - late final _sel_capitalizedString1 = _registerName1("capitalizedString"); - late final _sel_localizedUppercaseString1 = - _registerName1("localizedUppercaseString"); - late final _sel_localizedLowercaseString1 = - _registerName1("localizedLowercaseString"); - late final _sel_localizedCapitalizedString1 = - _registerName1("localizedCapitalizedString"); - late final _sel_uppercaseStringWithLocale_1 = - _registerName1("uppercaseStringWithLocale:"); - ffi.Pointer _objc_msgSend_233( + late final _sel_makeObjectsPerformSelector_1 = + _registerName1("makeObjectsPerformSelector:"); + late final _sel_makeObjectsPerformSelector_withObject_1 = + _registerName1("makeObjectsPerformSelector:withObject:"); + void _objc_msgSend_110( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer locale, + ffi.Pointer aSelector, + ffi.Pointer argument, ) { - return __objc_msgSend_233( + return __objc_msgSend_110( obj, sel, - locale, + aSelector, + argument, ); } - late final __objc_msgSend_233Ptr = _lookup< + late final __objc_msgSend_110Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, + late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_lowercaseStringWithLocale_1 = - _registerName1("lowercaseStringWithLocale:"); - late final _sel_capitalizedStringWithLocale_1 = - _registerName1("capitalizedStringWithLocale:"); - late final _sel_getLineStart_end_contentsEnd_forRange_1 = - _registerName1("getLineStart:end:contentsEnd:forRange:"); - void _objc_msgSend_234( + late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); + late final _sel_indexSet1 = _registerName1("indexSet"); + late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); + late final _sel_indexSetWithIndexesInRange_1 = + _registerName1("indexSetWithIndexesInRange:"); + instancetype _objc_msgSend_111( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, NSRange range, ) { - return __objc_msgSend_234( + return __objc_msgSend_111( obj, sel, - startPtr, - lineEndPtr, - contentsEndPtr, range, ); } - late final __objc_msgSend_234Ptr = _lookup< + late final __objc_msgSend_111Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange)>(); + late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_lineRangeForRange_1 = _registerName1("lineRangeForRange:"); - late final _sel_getParagraphStart_end_contentsEnd_forRange_1 = - _registerName1("getParagraphStart:end:contentsEnd:forRange:"); - late final _sel_paragraphRangeForRange_1 = - _registerName1("paragraphRangeForRange:"); - late final _sel_enumerateSubstringsInRange_options_usingBlock_1 = - _registerName1("enumerateSubstringsInRange:options:usingBlock:"); - void _objc_msgSend_235( + late final _sel_initWithIndexesInRange_1 = + _registerName1("initWithIndexesInRange:"); + late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); + instancetype _objc_msgSend_112( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer indexSet, ) { - return __objc_msgSend_235( + return __objc_msgSend_112( obj, sel, - range, - opts, - block, + indexSet, ); } - late final __objc_msgSend_235Ptr = _lookup< + late final __objc_msgSend_112Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_enumerateLinesUsingBlock_1 = - _registerName1("enumerateLinesUsingBlock:"); - void _objc_msgSend_236( + late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); + late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); + bool _objc_msgSend_113( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer indexSet, ) { - return __objc_msgSend_236( + return __objc_msgSend_113( obj, sel, - block, + indexSet, ); } - late final __objc_msgSend_236Ptr = _lookup< + late final __objc_msgSend_113Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_UTF8String1 = _registerName1("UTF8String"); - late final _sel_fastestEncoding1 = _registerName1("fastestEncoding"); - late final _sel_smallestEncoding1 = _registerName1("smallestEncoding"); - late final _sel_dataUsingEncoding_allowLossyConversion_1 = - _registerName1("dataUsingEncoding:allowLossyConversion:"); - ffi.Pointer _objc_msgSend_237( + late final _sel_firstIndex1 = _registerName1("firstIndex"); + late final _sel_lastIndex1 = _registerName1("lastIndex"); + late final _sel_indexGreaterThanIndex_1 = + _registerName1("indexGreaterThanIndex:"); + int _objc_msgSend_114( ffi.Pointer obj, ffi.Pointer sel, - int encoding, - bool lossy, + int value, ) { - return __objc_msgSend_237( + return __objc_msgSend_114( obj, sel, - encoding, - lossy, + value, ); } - late final __objc_msgSend_237Ptr = _lookup< + late final __objc_msgSend_114Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSStringEncoding, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, bool)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); - ffi.Pointer _objc_msgSend_238( + late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); + late final _sel_indexGreaterThanOrEqualToIndex_1 = + _registerName1("indexGreaterThanOrEqualToIndex:"); + late final _sel_indexLessThanOrEqualToIndex_1 = + _registerName1("indexLessThanOrEqualToIndex:"); + late final _sel_getIndexes_maxCount_inIndexRange_1 = + _registerName1("getIndexes:maxCount:inIndexRange:"); + int _objc_msgSend_115( ffi.Pointer obj, ffi.Pointer sel, - int encoding, + ffi.Pointer indexBuffer, + int bufferSize, + NSRangePointer range, ) { - return __objc_msgSend_238( + return __objc_msgSend_115( obj, sel, - encoding, + indexBuffer, + bufferSize, + range, ); } - late final __objc_msgSend_238Ptr = _lookup< + late final __objc_msgSend_115Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRangePointer)>(); - late final _sel_canBeConvertedToEncoding_1 = - _registerName1("canBeConvertedToEncoding:"); - late final _sel_cStringUsingEncoding_1 = - _registerName1("cStringUsingEncoding:"); - ffi.Pointer _objc_msgSend_239( + late final _sel_countOfIndexesInRange_1 = + _registerName1("countOfIndexesInRange:"); + int _objc_msgSend_116( ffi.Pointer obj, ffi.Pointer sel, - int encoding, + NSRange range, ) { - return __objc_msgSend_239( + return __objc_msgSend_116( obj, sel, - encoding, + range, ); } - late final __objc_msgSend_239Ptr = _lookup< + late final __objc_msgSend_116Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_getCString_maxLength_encoding_1 = - _registerName1("getCString:maxLength:encoding:"); - bool _objc_msgSend_240( + late final _sel_containsIndex_1 = _registerName1("containsIndex:"); + bool _objc_msgSend_117( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - int encoding, + int value, ) { - return __objc_msgSend_240( + return __objc_msgSend_117( obj, sel, - buffer, - maxBufferCount, - encoding, + value, ); } - late final __objc_msgSend_240Ptr = _lookup< + late final __objc_msgSend_117Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1 = - _registerName1( - "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); - bool _objc_msgSend_241( + late final _sel_containsIndexesInRange_1 = + _registerName1("containsIndexesInRange:"); + bool _objc_msgSend_118( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, NSRange range, - NSRangePointer leftover, ) { - return __objc_msgSend_241( + return __objc_msgSend_118( obj, sel, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, range, - leftover, ); } - late final __objc_msgSend_241Ptr = _lookup< + late final __objc_msgSend_118Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - NSStringEncoding, - ffi.Int32, - NSRange, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - int, - NSRange, - NSRangePointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_maximumLengthOfBytesUsingEncoding_1 = - _registerName1("maximumLengthOfBytesUsingEncoding:"); - late final _sel_lengthOfBytesUsingEncoding_1 = - _registerName1("lengthOfBytesUsingEncoding:"); - late final _sel_availableStringEncodings1 = - _registerName1("availableStringEncodings"); - ffi.Pointer _objc_msgSend_242( + late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); + late final _sel_intersectsIndexesInRange_1 = + _registerName1("intersectsIndexesInRange:"); + late final _sel_enumerateIndexesUsingBlock_1 = + _registerName1("enumerateIndexesUsingBlock:"); + void _objc_msgSend_119( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_242( + return __objc_msgSend_119( obj, sel, + block, ); } - late final __objc_msgSend_242Ptr = _lookup< + late final __objc_msgSend_119Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_localizedNameOfStringEncoding_1 = - _registerName1("localizedNameOfStringEncoding:"); - late final _sel_defaultCStringEncoding1 = - _registerName1("defaultCStringEncoding"); - late final _sel_decomposedStringWithCanonicalMapping1 = - _registerName1("decomposedStringWithCanonicalMapping"); - late final _sel_precomposedStringWithCanonicalMapping1 = - _registerName1("precomposedStringWithCanonicalMapping"); - late final _sel_decomposedStringWithCompatibilityMapping1 = - _registerName1("decomposedStringWithCompatibilityMapping"); - late final _sel_precomposedStringWithCompatibilityMapping1 = - _registerName1("precomposedStringWithCompatibilityMapping"); - late final _sel_componentsSeparatedByString_1 = - _registerName1("componentsSeparatedByString:"); - late final _sel_componentsSeparatedByCharactersInSet_1 = - _registerName1("componentsSeparatedByCharactersInSet:"); - ffi.Pointer _objc_msgSend_243( + late final _sel_enumerateIndexesWithOptions_usingBlock_1 = + _registerName1("enumerateIndexesWithOptions:usingBlock:"); + void _objc_msgSend_120( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer separator, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_243( + return __objc_msgSend_120( obj, sel, - separator, + opts, + block, ); } - late final __objc_msgSend_243Ptr = _lookup< + late final __objc_msgSend_120Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByTrimmingCharactersInSet_1 = - _registerName1("stringByTrimmingCharactersInSet:"); - ffi.Pointer _objc_msgSend_244( + late final _sel_enumerateIndexesInRange_options_usingBlock_1 = + _registerName1("enumerateIndexesInRange:options:usingBlock:"); + void _objc_msgSend_121( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer set1, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_244( + return __objc_msgSend_121( obj, sel, - set1, + range, + opts, + block, ); } - late final __objc_msgSend_244Ptr = _lookup< + late final __objc_msgSend_121Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByPaddingToLength_withString_startingAtIndex_1 = - _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); - ffi.Pointer _objc_msgSend_245( + late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); + int _objc_msgSend_122( ffi.Pointer obj, ffi.Pointer sel, - int newLength, - ffi.Pointer padString, - int padIndex, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_245( + return __objc_msgSend_122( obj, sel, - newLength, - padString, - padIndex, + predicate, ); } - late final __objc_msgSend_245Ptr = _lookup< + late final __objc_msgSend_122Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByFoldingWithOptions_locale_1 = - _registerName1("stringByFoldingWithOptions:locale:"); - ffi.Pointer _objc_msgSend_246( + late final _sel_indexWithOptions_passingTest_1 = + _registerName1("indexWithOptions:passingTest:"); + int _objc_msgSend_123( ffi.Pointer obj, ffi.Pointer sel, - int options, - ffi.Pointer locale, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_246( + return __objc_msgSend_123( obj, sel, - options, - locale, + opts, + predicate, ); } - late final __objc_msgSend_246Ptr = _lookup< + late final __objc_msgSend_123Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_1 = - _registerName1( - "stringByReplacingOccurrencesOfString:withString:options:range:"); - ffi.Pointer _objc_msgSend_247( + late final _sel_indexInRange_options_passingTest_1 = + _registerName1("indexInRange:options:passingTest:"); + int _objc_msgSend_124( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - NSRange searchRange, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_247( + return __objc_msgSend_124( obj, sel, - target, - replacement, - options, - searchRange, + range, + opts, + predicate, ); } - late final __objc_msgSend_247Ptr = _lookup< + late final __objc_msgSend_124Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - NSRange)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByReplacingOccurrencesOfString_withString_1 = - _registerName1("stringByReplacingOccurrencesOfString:withString:"); - ffi.Pointer _objc_msgSend_248( + late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); + ffi.Pointer _objc_msgSend_125( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_248( + return __objc_msgSend_125( obj, sel, - target, - replacement, + predicate, ); } - late final __objc_msgSend_248Ptr = _lookup< + late final __objc_msgSend_125Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexesWithOptions_passingTest_1 = + _registerName1("indexesWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_126( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_126( + obj, + sel, + opts, + predicate, + ); + } + + late final __objc_msgSend_126Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByReplacingCharactersInRange_withString_1 = - _registerName1("stringByReplacingCharactersInRange:withString:"); - ffi.Pointer _objc_msgSend_249( + late final _sel_indexesInRange_options_passingTest_1 = + _registerName1("indexesInRange:options:passingTest:"); + ffi.Pointer _objc_msgSend_127( ffi.Pointer obj, ffi.Pointer sel, NSRange range, - ffi.Pointer replacement, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_249( + return __objc_msgSend_127( obj, sel, range, - replacement, + opts, + predicate, ); } - late final __objc_msgSend_249Ptr = _lookup< + late final __objc_msgSend_127Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange, ffi.Pointer)>(); + ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByApplyingTransform_reverse_1 = - _registerName1("stringByApplyingTransform:reverse:"); - ffi.Pointer _objc_msgSend_250( + late final _sel_enumerateRangesUsingBlock_1 = + _registerName1("enumerateRangesUsingBlock:"); + void _objc_msgSend_128( ffi.Pointer obj, ffi.Pointer sel, - NSStringTransform transform, - bool reverse, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_250( + return __objc_msgSend_128( obj, sel, - transform, - reverse, + block, ); } - late final __objc_msgSend_250Ptr = _lookup< + late final __objc_msgSend_128Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSStringTransform, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringTransform, bool)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_writeToURL_atomically_encoding_error_1 = - _registerName1("writeToURL:atomically:encoding:error:"); - bool _objc_msgSend_251( + late final _sel_enumerateRangesWithOptions_usingBlock_1 = + _registerName1("enumerateRangesWithOptions:usingBlock:"); + void _objc_msgSend_129( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_251( + return __objc_msgSend_129( obj, sel, - url, - useAuxiliaryFile, - enc, - error, + opts, + block, ); } - late final __objc_msgSend_251Ptr = _lookup< + late final __objc_msgSend_129Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_writeToFile_atomically_encoding_error_1 = - _registerName1("writeToFile:atomically:encoding:error:"); - bool _objc_msgSend_252( + late final _sel_enumerateRangesInRange_options_usingBlock_1 = + _registerName1("enumerateRangesInRange:options:usingBlock:"); + void _objc_msgSend_130( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_252( + return __objc_msgSend_130( obj, sel, - path, - useAuxiliaryFile, - enc, - error, + range, + opts, + block, ); } - late final __objc_msgSend_252Ptr = _lookup< + late final __objc_msgSend_130Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithCharactersNoCopy_length_freeWhenDone_1 = - _registerName1("initWithCharactersNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_253( + late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); + ffi.Pointer _objc_msgSend_131( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer characters, - int length, - bool freeBuffer, + ffi.Pointer indexes, ) { - return __objc_msgSend_253( + return __objc_msgSend_131( obj, sel, - characters, - length, - freeBuffer, + indexes, ); } - late final __objc_msgSend_253Ptr = _lookup< + late final __objc_msgSend_131Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithCharactersNoCopy_length_deallocator_1 = - _registerName1("initWithCharactersNoCopy:length:deallocator:"); - instancetype _objc_msgSend_254( + late final _sel_objectAtIndexedSubscript_1 = + _registerName1("objectAtIndexedSubscript:"); + late final _sel_enumerateObjectsUsingBlock_1 = + _registerName1("enumerateObjectsUsingBlock:"); + void _objc_msgSend_132( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer chars, - int len, - ffi.Pointer<_ObjCBlock> deallocator, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_254( + return __objc_msgSend_132( obj, sel, - chars, - len, - deallocator, + block, ); } - late final __objc_msgSend_254Ptr = _lookup< + late final __objc_msgSend_132Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithCharacters_length_1 = - _registerName1("initWithCharacters:length:"); - instancetype _objc_msgSend_255( + late final _sel_enumerateObjectsWithOptions_usingBlock_1 = + _registerName1("enumerateObjectsWithOptions:usingBlock:"); + void _objc_msgSend_133( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer characters, - int length, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_255( + return __objc_msgSend_133( obj, sel, - characters, - length, + opts, + block, ); } - late final __objc_msgSend_255Ptr = _lookup< + late final __objc_msgSend_133Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); - instancetype _objc_msgSend_256( + late final _sel_enumerateObjectsAtIndexes_options_usingBlock_1 = + _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); + void _objc_msgSend_134( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer nullTerminatedCString, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_256( + return __objc_msgSend_134( obj, sel, - nullTerminatedCString, + s, + opts, + block, ); } - late final __objc_msgSend_256Ptr = _lookup< + late final __objc_msgSend_134Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithFormat_1 = _registerName1("initWithFormat:"); - late final _sel_initWithFormat_arguments_1 = - _registerName1("initWithFormat:arguments:"); - instancetype _objc_msgSend_257( + late final _sel_indexOfObjectPassingTest_1 = + _registerName1("indexOfObjectPassingTest:"); + int _objc_msgSend_135( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - va_list argList, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_257( + return __objc_msgSend_135( obj, sel, - format, - argList, + predicate, ); } - late final __objc_msgSend_257Ptr = _lookup< + late final __objc_msgSend_135Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, va_list)>>('objc_msgSend'); - late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, va_list)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithFormat_locale_1 = - _registerName1("initWithFormat:locale:"); - instancetype _objc_msgSend_258( + late final _sel_indexOfObjectWithOptions_passingTest_1 = + _registerName1("indexOfObjectWithOptions:passingTest:"); + int _objc_msgSend_136( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_258( + return __objc_msgSend_136( obj, sel, - format, - locale, + opts, + predicate, ); } - late final __objc_msgSend_258Ptr = _lookup< + late final __objc_msgSend_136Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithFormat_locale_arguments_1 = - _registerName1("initWithFormat:locale:arguments:"); - instancetype _objc_msgSend_259( + late final _sel_indexOfObjectAtIndexes_options_passingTest_1 = + _registerName1("indexOfObjectAtIndexes:options:passingTest:"); + int _objc_msgSend_137( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, - va_list argList, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_259( + return __objc_msgSend_137( obj, sel, - format, - locale, - argList, + s, + opts, + predicate, ); } - late final __objc_msgSend_259Ptr = _lookup< + late final __objc_msgSend_137Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + NSUInteger Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - va_list)>>('objc_msgSend'); - late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, va_list)>(); + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithData_encoding_1 = - _registerName1("initWithData:encoding:"); - instancetype _objc_msgSend_260( + late final _sel_indexesOfObjectsPassingTest_1 = + _registerName1("indexesOfObjectsPassingTest:"); + ffi.Pointer _objc_msgSend_138( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, - int encoding, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_260( + return __objc_msgSend_138( obj, sel, - data, - encoding, + predicate, ); } - late final __objc_msgSend_260Ptr = _lookup< + late final __objc_msgSend_138Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithBytes_length_encoding_1 = - _registerName1("initWithBytes:length:encoding:"); - instancetype _objc_msgSend_261( + late final _sel_indexesOfObjectsWithOptions_passingTest_1 = + _registerName1("indexesOfObjectsWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_139( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_261( + return __objc_msgSend_139( obj, sel, - bytes, - len, - encoding, + opts, + predicate, ); } - late final __objc_msgSend_261Ptr = _lookup< + late final __objc_msgSend_139Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = - _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); - instancetype _objc_msgSend_262( + late final _sel_indexesOfObjectsAtIndexes_options_passingTest_1 = + _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); + ffi.Pointer _objc_msgSend_140( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - bool freeBuffer, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_262( + return __objc_msgSend_140( obj, sel, - bytes, - len, - encoding, - freeBuffer, + s, + opts, + predicate, ); } - late final __objc_msgSend_262Ptr = _lookup< + late final __objc_msgSend_140Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, bool)>(); + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithBytesNoCopy_length_encoding_deallocator_1 = - _registerName1("initWithBytesNoCopy:length:encoding:deallocator:"); - instancetype _objc_msgSend_263( + late final _sel_sortedArrayUsingComparator_1 = + _registerName1("sortedArrayUsingComparator:"); + ffi.Pointer _objc_msgSend_141( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - ffi.Pointer<_ObjCBlock> deallocator, + NSComparator cmptr, ) { - return __objc_msgSend_263( + return __objc_msgSend_141( obj, sel, - bytes, - len, - encoding, - deallocator, + cmptr, ); } - late final __objc_msgSend_263Ptr = _lookup< + late final __objc_msgSend_141Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSComparator)>(); - late final _sel_string1 = _registerName1("string"); - late final _sel_stringWithString_1 = _registerName1("stringWithString:"); - late final _sel_stringWithCharacters_length_1 = - _registerName1("stringWithCharacters:length:"); - late final _sel_stringWithUTF8String_1 = - _registerName1("stringWithUTF8String:"); - late final _sel_stringWithFormat_1 = _registerName1("stringWithFormat:"); - late final _sel_localizedStringWithFormat_1 = - _registerName1("localizedStringWithFormat:"); - late final _sel_initWithCString_encoding_1 = - _registerName1("initWithCString:encoding:"); - instancetype _objc_msgSend_264( + late final _sel_sortedArrayWithOptions_usingComparator_1 = + _registerName1("sortedArrayWithOptions:usingComparator:"); + ffi.Pointer _objc_msgSend_142( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer nullTerminatedCString, - int encoding, + int opts, + NSComparator cmptr, ) { - return __objc_msgSend_264( + return __objc_msgSend_142( obj, sel, - nullTerminatedCString, - encoding, + opts, + cmptr, ); } - late final __objc_msgSend_264Ptr = _lookup< + late final __objc_msgSend_142Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, NSComparator)>(); - late final _sel_stringWithCString_encoding_1 = - _registerName1("stringWithCString:encoding:"); - late final _sel_initWithContentsOfURL_encoding_error_1 = - _registerName1("initWithContentsOfURL:encoding:error:"); - instancetype _objc_msgSend_265( + late final _sel_indexOfObject_inSortedRange_options_usingComparator_1 = + _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); + int _objc_msgSend_143( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - int enc, - ffi.Pointer> error, + ffi.Pointer obj1, + NSRange r, + int opts, + NSComparator cmp, ) { - return __objc_msgSend_265( + return __objc_msgSend_143( obj, sel, - url, - enc, - error, + obj1, + r, + opts, + cmp, ); } - late final __objc_msgSend_265Ptr = _lookup< + late final __objc_msgSend_143Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + NSUInteger Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + NSRange, + ffi.Int32, + NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange, int, NSComparator)>(); - late final _sel_initWithContentsOfFile_encoding_error_1 = - _registerName1("initWithContentsOfFile:encoding:error:"); - instancetype _objc_msgSend_266( + late final _sel_array1 = _registerName1("array"); + late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); + late final _sel_arrayWithObjects_count_1 = + _registerName1("arrayWithObjects:count:"); + late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); + late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); + late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); + late final _sel_initWithArray_1 = _registerName1("initWithArray:"); + late final _sel_initWithArray_copyItems_1 = + _registerName1("initWithArray:copyItems:"); + instancetype _objc_msgSend_144( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - int enc, - ffi.Pointer> error, + ffi.Pointer array, + bool flag, ) { - return __objc_msgSend_266( + return __objc_msgSend_144( obj, sel, - path, - enc, - error, + array, + flag, ); } - late final __objc_msgSend_266Ptr = _lookup< + late final __objc_msgSend_144Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_stringWithContentsOfURL_encoding_error_1 = - _registerName1("stringWithContentsOfURL:encoding:error:"); - late final _sel_stringWithContentsOfFile_encoding_error_1 = - _registerName1("stringWithContentsOfFile:encoding:error:"); - late final _sel_initWithContentsOfURL_usedEncoding_error_1 = - _registerName1("initWithContentsOfURL:usedEncoding:error:"); - instancetype _objc_msgSend_267( + late final _sel_initWithContentsOfURL_error_1 = + _registerName1("initWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_145( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, - ffi.Pointer enc, ffi.Pointer> error, ) { - return __objc_msgSend_267( + return __objc_msgSend_145( obj, sel, url, - enc, error, ); } - late final __objc_msgSend_267Ptr = _lookup< + late final __objc_msgSend_145Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< - instancetype Function( + late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - late final _sel_initWithContentsOfFile_usedEncoding_error_1 = - _registerName1("initWithContentsOfFile:usedEncoding:error:"); - instancetype _objc_msgSend_268( + late final _sel_arrayWithContentsOfURL_error_1 = + _registerName1("arrayWithContentsOfURL:error:"); + late final _class_NSOrderedCollectionDifference1 = + _getClass1("NSOrderedCollectionDifference"); + late final _sel_initWithChanges_1 = _registerName1("initWithChanges:"); + late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1 = + _registerName1( + "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:"); + instancetype _objc_msgSend_146( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer enc, - ffi.Pointer> error, + ffi.Pointer inserts, + ffi.Pointer insertedObjects, + ffi.Pointer removes, + ffi.Pointer removedObjects, + ffi.Pointer changes, ) { - return __objc_msgSend_268( + return __objc_msgSend_146( obj, sel, - path, - enc, - error, + inserts, + insertedObjects, + removes, + removedObjects, + changes, ); } - late final __objc_msgSend_268Ptr = _lookup< + late final __objc_msgSend_146Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_stringWithContentsOfURL_usedEncoding_error_1 = - _registerName1("stringWithContentsOfURL:usedEncoding:error:"); - late final _sel_stringWithContentsOfFile_usedEncoding_error_1 = - _registerName1("stringWithContentsOfFile:usedEncoding:error:"); - late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1 = + late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1 = _registerName1( - "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); - int _objc_msgSend_269( + "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:"); + instancetype _objc_msgSend_147( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion, + ffi.Pointer inserts, + ffi.Pointer insertedObjects, + ffi.Pointer removes, + ffi.Pointer removedObjects, ) { - return __objc_msgSend_269( + return __objc_msgSend_147( obj, sel, - data, - opts, - string, - usedLossyConversion, + inserts, + insertedObjects, + removes, + removedObjects, ); } - late final __objc_msgSend_269Ptr = _lookup< + late final __objc_msgSend_147Ptr = _lookup< ffi.NativeFunction< - NSStringEncoding Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< - int Function( + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - late final _sel_propertyList1 = _registerName1("propertyList"); - late final _sel_propertyListFromStringsFileFormat1 = - _registerName1("propertyListFromStringsFileFormat"); - late final _sel_cString1 = _registerName1("cString"); - late final _sel_lossyCString1 = _registerName1("lossyCString"); - late final _sel_cStringLength1 = _registerName1("cStringLength"); - late final _sel_getCString_1 = _registerName1("getCString:"); - void _objc_msgSend_270( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - ) { - return __objc_msgSend_270( - obj, - sel, - bytes, - ); - } - - late final __objc_msgSend_270Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_getCString_maxLength_1 = - _registerName1("getCString:maxLength:"); - void _objc_msgSend_271( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int maxLength, - ) { - return __objc_msgSend_271( - obj, - sel, - bytes, - maxLength, - ); - } - - late final __objc_msgSend_271Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_getCString_maxLength_range_remainingRange_1 = - _registerName1("getCString:maxLength:range:remainingRange:"); - void _objc_msgSend_272( + late final _sel_insertions1 = _registerName1("insertions"); + late final _sel_removals1 = _registerName1("removals"); + late final _sel_hasChanges1 = _registerName1("hasChanges"); + late final _class_NSOrderedCollectionChange1 = + _getClass1("NSOrderedCollectionChange"); + late final _sel_changeWithObject_type_index_1 = + _registerName1("changeWithObject:type:index:"); + ffi.Pointer _objc_msgSend_148( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int maxLength, - NSRange aRange, - NSRangePointer leftoverRange, + ffi.Pointer anObject, + int type, + int index, ) { - return __objc_msgSend_272( + return __objc_msgSend_148( obj, sel, - bytes, - maxLength, - aRange, - leftoverRange, + anObject, + type, + index, ); } - late final __objc_msgSend_272Ptr = _lookup< + late final __objc_msgSend_148Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSRange, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange, NSRangePointer)>(); + ffi.Pointer, + ffi.Int32, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); - late final _sel_stringWithContentsOfFile_1 = - _registerName1("stringWithContentsOfFile:"); - late final _sel_stringWithContentsOfURL_1 = - _registerName1("stringWithContentsOfURL:"); - late final _sel_initWithCStringNoCopy_length_freeWhenDone_1 = - _registerName1("initWithCStringNoCopy:length:freeWhenDone:"); - ffi.Pointer _objc_msgSend_273( + late final _sel_changeWithObject_type_index_associatedIndex_1 = + _registerName1("changeWithObject:type:index:associatedIndex:"); + ffi.Pointer _objc_msgSend_149( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool freeBuffer, + ffi.Pointer anObject, + int type, + int index, + int associatedIndex, ) { - return __objc_msgSend_273( + return __objc_msgSend_149( obj, sel, - bytes, - length, - freeBuffer, + anObject, + type, + index, + associatedIndex, ); } - late final __objc_msgSend_273Ptr = _lookup< + late final __objc_msgSend_149Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Int32, NSUInteger, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, bool)>(); + ffi.Pointer, ffi.Pointer, int, int, int)>(); - late final _sel_initWithCString_length_1 = - _registerName1("initWithCString:length:"); - late final _sel_initWithCString_1 = _registerName1("initWithCString:"); - late final _sel_stringWithCString_length_1 = - _registerName1("stringWithCString:length:"); - late final _sel_stringWithCString_1 = _registerName1("stringWithCString:"); - late final _sel_getCharacters_1 = _registerName1("getCharacters:"); - void _objc_msgSend_274( + late final _sel_object1 = _registerName1("object"); + late final _sel_changeType1 = _registerName1("changeType"); + int _objc_msgSend_150( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, ) { - return __objc_msgSend_274( + return __objc_msgSend_150( obj, sel, - buffer, ); } - late final __objc_msgSend_274Ptr = _lookup< + late final __objc_msgSend_150Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = - _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); - late final _sel_stringByRemovingPercentEncoding1 = - _registerName1("stringByRemovingPercentEncoding"); - late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = - _registerName1("stringByAddingPercentEscapesUsingEncoding:"); - late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = - _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); - late final _sel_debugDescription1 = _registerName1("debugDescription"); - late final _sel_version1 = _registerName1("version"); - late final _sel_setVersion_1 = _registerName1("setVersion:"); - void _objc_msgSend_275( + late final _sel_index1 = _registerName1("index"); + late final _sel_associatedIndex1 = _registerName1("associatedIndex"); + late final _sel_initWithObject_type_index_1 = + _registerName1("initWithObject:type:index:"); + instancetype _objc_msgSend_151( ffi.Pointer obj, ffi.Pointer sel, - int aVersion, + ffi.Pointer anObject, + int type, + int index, ) { - return __objc_msgSend_275( + return __objc_msgSend_151( obj, sel, - aVersion, + anObject, + type, + index, ); } - late final __objc_msgSend_275Ptr = _lookup< + late final __objc_msgSend_151Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - late final _sel_classForCoder1 = _registerName1("classForCoder"); - late final _sel_replacementObjectForCoder_1 = - _registerName1("replacementObjectForCoder:"); - late final _sel_awakeAfterUsingCoder_1 = - _registerName1("awakeAfterUsingCoder:"); - late final _sel_poseAsClass_1 = _registerName1("poseAsClass:"); - late final _sel_autoContentAccessingProxy1 = - _registerName1("autoContentAccessingProxy"); - late final _sel_URL_resourceDataDidBecomeAvailable_1 = - _registerName1("URL:resourceDataDidBecomeAvailable:"); - void _objc_msgSend_276( + late final _sel_initWithObject_type_index_associatedIndex_1 = + _registerName1("initWithObject:type:index:associatedIndex:"); + instancetype _objc_msgSend_152( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer newBytes, + ffi.Pointer anObject, + int type, + int index, + int associatedIndex, ) { - return __objc_msgSend_276( + return __objc_msgSend_152( obj, sel, - sender, - newBytes, + anObject, + type, + index, + associatedIndex, ); } - late final __objc_msgSend_276Ptr = _lookup< + late final __objc_msgSend_152Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int32, + NSUInteger, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, int)>(); - late final _sel_URLResourceDidFinishLoading_1 = - _registerName1("URLResourceDidFinishLoading:"); - void _objc_msgSend_277( + late final _sel_differenceByTransformingChangesWithBlock_1 = + _registerName1("differenceByTransformingChangesWithBlock:"); + ffi.Pointer _objc_msgSend_153( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_277( + return __objc_msgSend_153( obj, sel, - sender, + block, ); } - late final __objc_msgSend_277Ptr = _lookup< + late final __objc_msgSend_153Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_URLResourceDidCancelLoading_1 = - _registerName1("URLResourceDidCancelLoading:"); - late final _sel_URL_resourceDidFailLoadingWithReason_1 = - _registerName1("URL:resourceDidFailLoadingWithReason:"); - void _objc_msgSend_278( + late final _sel_inverseDifference1 = _registerName1("inverseDifference"); + late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = + _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); + ffi.Pointer _objc_msgSend_154( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer reason, + ffi.Pointer other, + int options, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_278( + return __objc_msgSend_154( obj, sel, - sender, - reason, + other, + options, + block, ); } - late final __objc_msgSend_278Ptr = _lookup< + late final __objc_msgSend_154Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = - _registerName1( - "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); - void _objc_msgSend_279( + late final _sel_differenceFromArray_withOptions_1 = + _registerName1("differenceFromArray:withOptions:"); + ffi.Pointer _objc_msgSend_155( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, - ffi.Pointer delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo, + ffi.Pointer other, + int options, ) { - return __objc_msgSend_279( + return __objc_msgSend_155( obj, sel, - error, - recoveryOptionIndex, - delegate, - didRecoverSelector, - contextInfo, + other, + options, ); } - late final __objc_msgSend_279Ptr = _lookup< + late final __objc_msgSend_155Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSUInteger, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_attemptRecoveryFromError_optionIndex_1 = - _registerName1("attemptRecoveryFromError:optionIndex:"); - bool _objc_msgSend_280( + late final _sel_differenceFromArray_1 = + _registerName1("differenceFromArray:"); + ffi.Pointer _objc_msgSend_156( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, + ffi.Pointer other, ) { - return __objc_msgSend_280( + return __objc_msgSend_156( obj, sel, - error, - recoveryOptionIndex, + other, ); } - late final __objc_msgSend_280Ptr = _lookup< + late final __objc_msgSend_156Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final ffi.Pointer _NSFoundationVersionNumber = - _lookup('NSFoundationVersionNumber'); - - double get NSFoundationVersionNumber => _NSFoundationVersionNumber.value; - - set NSFoundationVersionNumber(double value) => - _NSFoundationVersionNumber.value = value; + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSStringFromSelector( - ffi.Pointer aSelector, - ) { - return _NSStringFromSelector( - aSelector, + late final _sel_arrayByApplyingDifference_1 = + _registerName1("arrayByApplyingDifference:"); + ffi.Pointer _objc_msgSend_157( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer difference, + ) { + return __objc_msgSend_157( + obj, + sel, + difference, ); } - late final _NSStringFromSelectorPtr = _lookup< + late final __objc_msgSend_157Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromSelector'); - late final _NSStringFromSelector = _NSStringFromSelectorPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSSelectorFromString( - ffi.Pointer aSelectorName, + late final _sel_getObjects_1 = _registerName1("getObjects:"); + void _objc_msgSend_158( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, ) { - return _NSSelectorFromString( - aSelectorName, + return __objc_msgSend_158( + obj, + sel, + objects, ); } - late final _NSSelectorFromStringPtr = _lookup< + late final __objc_msgSend_158Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSSelectorFromString'); - late final _NSSelectorFromString = _NSSelectorFromStringPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - ffi.Pointer NSStringFromClass( - ffi.Pointer aClass, + late final _sel_arrayWithContentsOfFile_1 = + _registerName1("arrayWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_159( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, ) { - return _NSStringFromClass( - aClass, + return __objc_msgSend_159( + obj, + sel, + path, ); } - late final _NSStringFromClassPtr = _lookup< + late final __objc_msgSend_159Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromClass'); - late final _NSStringFromClass = _NSStringFromClassPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSClassFromString( - ffi.Pointer aClassName, + late final _sel_arrayWithContentsOfURL_1 = + _registerName1("arrayWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_160( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, ) { - return _NSClassFromString( - aClassName, + return __objc_msgSend_160( + obj, + sel, + url, ); } - late final _NSClassFromStringPtr = _lookup< + late final __objc_msgSend_160Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSClassFromString'); - late final _NSClassFromString = _NSClassFromStringPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSStringFromProtocol( - ffi.Pointer proto, + late final _sel_initWithContentsOfFile_1 = + _registerName1("initWithContentsOfFile:"); + late final _sel_initWithContentsOfURL_1 = + _registerName1("initWithContentsOfURL:"); + late final _sel_writeToURL_atomically_1 = + _registerName1("writeToURL:atomically:"); + bool _objc_msgSend_161( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + bool atomically, ) { - return _NSStringFromProtocol( - proto, + return __objc_msgSend_161( + obj, + sel, + url, + atomically, ); } - late final _NSStringFromProtocolPtr = _lookup< + late final __objc_msgSend_161Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromProtocol'); - late final _NSStringFromProtocol = _NSStringFromProtocolPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - ffi.Pointer NSProtocolFromString( - ffi.Pointer namestr, + late final _sel_allKeys1 = _registerName1("allKeys"); + ffi.Pointer _objc_msgSend_162( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSProtocolFromString( - namestr, + return __objc_msgSend_162( + obj, + sel, ); } - late final _NSProtocolFromStringPtr = _lookup< + late final __objc_msgSend_162Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer)>>('NSProtocolFromString'); - late final _NSProtocolFromString = _NSProtocolFromStringPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSGetSizeAndAlignment( - ffi.Pointer typePtr, - ffi.Pointer sizep, - ffi.Pointer alignp, + late final _sel_allKeysForObject_1 = _registerName1("allKeysForObject:"); + late final _sel_allValues1 = _registerName1("allValues"); + late final _sel_descriptionInStringsFileFormat1 = + _registerName1("descriptionInStringsFileFormat"); + late final _sel_isEqualToDictionary_1 = + _registerName1("isEqualToDictionary:"); + bool _objc_msgSend_163( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDictionary, ) { - return _NSGetSizeAndAlignment( - typePtr, - sizep, - alignp, + return __objc_msgSend_163( + obj, + sel, + otherDictionary, ); } - late final _NSGetSizeAndAlignmentPtr = _lookup< + late final __objc_msgSend_163Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('NSGetSizeAndAlignment'); - late final _NSGetSizeAndAlignment = _NSGetSizeAndAlignmentPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - void NSLog( - ffi.Pointer format, + late final _sel_objectsForKeys_notFoundMarker_1 = + _registerName1("objectsForKeys:notFoundMarker:"); + ffi.Pointer _objc_msgSend_164( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer marker, ) { - return _NSLog( - format, + return __objc_msgSend_164( + obj, + sel, + keys, + marker, ); } - late final _NSLogPtr = - _lookup)>>( - 'NSLog'); - late final _NSLog = - _NSLogPtr.asFunction)>(); + late final __objc_msgSend_164Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void NSLogv( - ffi.Pointer format, - va_list args, + late final _sel_keysSortedByValueUsingSelector_1 = + _registerName1("keysSortedByValueUsingSelector:"); + late final _sel_getObjects_andKeys_count_1 = + _registerName1("getObjects:andKeys:count:"); + void _objc_msgSend_165( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ffi.Pointer> keys, + int count, ) { - return _NSLogv( - format, - args, + return __objc_msgSend_165( + obj, + sel, + objects, + keys, + count, ); } - late final _NSLogvPtr = _lookup< + late final __objc_msgSend_165Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, va_list)>>('NSLogv'); - late final _NSLogv = - _NSLogvPtr.asFunction, va_list)>(); - - late final ffi.Pointer _NSNotFound = - _lookup('NSNotFound'); - - int get NSNotFound => _NSNotFound.value; - - set NSNotFound(int value) => _NSNotFound.value = value; + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); - ffi.Pointer _Block_copy1( - ffi.Pointer aBlock, + late final _sel_objectForKeyedSubscript_1 = + _registerName1("objectForKeyedSubscript:"); + late final _sel_enumerateKeysAndObjectsUsingBlock_1 = + _registerName1("enumerateKeysAndObjectsUsingBlock:"); + void _objc_msgSend_166( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return __Block_copy1( - aBlock, + return __objc_msgSend_166( + obj, + sel, + block, ); } - late final __Block_copy1Ptr = _lookup< + late final __objc_msgSend_166Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('_Block_copy'); - late final __Block_copy1 = __Block_copy1Ptr - .asFunction Function(ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - void _Block_release1( - ffi.Pointer aBlock, + late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = + _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); + void _objc_msgSend_167( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __Block_release1( - aBlock, + return __objc_msgSend_167( + obj, + sel, + opts, + block, ); } - late final __Block_release1Ptr = - _lookup)>>( - '_Block_release'); - late final __Block_release1 = - __Block_release1Ptr.asFunction)>(); + late final __objc_msgSend_167Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - void _Block_object_assign( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + late final _sel_keysSortedByValueUsingComparator_1 = + _registerName1("keysSortedByValueUsingComparator:"); + late final _sel_keysSortedByValueWithOptions_usingComparator_1 = + _registerName1("keysSortedByValueWithOptions:usingComparator:"); + late final _sel_keysOfEntriesPassingTest_1 = + _registerName1("keysOfEntriesPassingTest:"); + ffi.Pointer _objc_msgSend_168( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __Block_object_assign( - arg0, - arg1, - arg2, + return __objc_msgSend_168( + obj, + sel, + predicate, ); } - late final __Block_object_assignPtr = _lookup< + late final __objc_msgSend_168Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('_Block_object_assign'); - late final __Block_object_assign = __Block_object_assignPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - void _Block_object_dispose( - ffi.Pointer arg0, - int arg1, + late final _sel_keysOfEntriesWithOptions_passingTest_1 = + _registerName1("keysOfEntriesWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_169( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __Block_object_dispose( - arg0, - arg1, + return __objc_msgSend_169( + obj, + sel, + opts, + predicate, ); } - late final __Block_object_disposePtr = _lookup< + late final __objc_msgSend_169Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Int)>>('_Block_object_dispose'); - late final __Block_object_dispose = __Block_object_disposePtr - .asFunction, int)>(); - - late final ffi.Pointer>> - __NSConcreteGlobalBlock = - _lookup>>('_NSConcreteGlobalBlock'); - - ffi.Pointer> get _NSConcreteGlobalBlock => - __NSConcreteGlobalBlock.value; - - set _NSConcreteGlobalBlock(ffi.Pointer> value) => - __NSConcreteGlobalBlock.value = value; - - late final ffi.Pointer>> - __NSConcreteStackBlock = - _lookup>>('_NSConcreteStackBlock'); - - ffi.Pointer> get _NSConcreteStackBlock => - __NSConcreteStackBlock.value; - - set _NSConcreteStackBlock(ffi.Pointer> value) => - __NSConcreteStackBlock.value = value; - - void Debugger() { - return _Debugger(); - } - - late final _DebuggerPtr = - _lookup>('Debugger'); - late final _Debugger = _DebuggerPtr.asFunction(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - void DebugStr( - ConstStr255Param debuggerMsg, + late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); + void _objc_msgSend_170( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ffi.Pointer> keys, ) { - return _DebugStr( - debuggerMsg, + return __objc_msgSend_170( + obj, + sel, + objects, + keys, ); } - late final _DebugStrPtr = - _lookup>( - 'DebugStr'); - late final _DebugStr = - _DebugStrPtr.asFunction(); - - void SysBreak() { - return _SysBreak(); - } - - late final _SysBreakPtr = - _lookup>('SysBreak'); - late final _SysBreak = _SysBreakPtr.asFunction(); + late final __objc_msgSend_170Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); - void SysBreakStr( - ConstStr255Param debuggerMsg, + late final _sel_dictionaryWithContentsOfFile_1 = + _registerName1("dictionaryWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_171( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, ) { - return _SysBreakStr( - debuggerMsg, + return __objc_msgSend_171( + obj, + sel, + path, ); } - late final _SysBreakStrPtr = - _lookup>( - 'SysBreakStr'); - late final _SysBreakStr = - _SysBreakStrPtr.asFunction(); + late final __objc_msgSend_171Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void SysBreakFunc( - ConstStr255Param debuggerMsg, + late final _sel_dictionaryWithContentsOfURL_1 = + _registerName1("dictionaryWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_172( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, ) { - return _SysBreakFunc( - debuggerMsg, + return __objc_msgSend_172( + obj, + sel, + url, ); } - late final _SysBreakFuncPtr = - _lookup>( - 'SysBreakFunc'); - late final _SysBreakFunc = - _SysBreakFuncPtr.asFunction(); - - late final ffi.Pointer _kCFCoreFoundationVersionNumber = - _lookup('kCFCoreFoundationVersionNumber'); - - double get kCFCoreFoundationVersionNumber => - _kCFCoreFoundationVersionNumber.value; + late final __objc_msgSend_172Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set kCFCoreFoundationVersionNumber(double value) => - _kCFCoreFoundationVersionNumber.value = value; - - late final ffi.Pointer _kCFNotFound = - _lookup('kCFNotFound'); - - int get kCFNotFound => _kCFNotFound.value; - - set kCFNotFound(int value) => _kCFNotFound.value = value; - - CFRange __CFRangeMake( - int loc, - int len, + late final _sel_dictionary1 = _registerName1("dictionary"); + late final _sel_dictionaryWithObject_forKey_1 = + _registerName1("dictionaryWithObject:forKey:"); + instancetype _objc_msgSend_173( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + ffi.Pointer key, ) { - return ___CFRangeMake( - loc, - len, + return __objc_msgSend_173( + obj, + sel, + object, + key, ); } - late final ___CFRangeMakePtr = - _lookup>( - '__CFRangeMake'); - late final ___CFRangeMake = - ___CFRangeMakePtr.asFunction(); - - int CFNullGetTypeID() { - return _CFNullGetTypeID(); - } - - late final _CFNullGetTypeIDPtr = - _lookup>('CFNullGetTypeID'); - late final _CFNullGetTypeID = - _CFNullGetTypeIDPtr.asFunction(); - - late final ffi.Pointer _kCFNull = _lookup('kCFNull'); - - CFNullRef get kCFNull => _kCFNull.value; - - set kCFNull(CFNullRef value) => _kCFNull.value = value; - - late final ffi.Pointer _kCFAllocatorDefault = - _lookup('kCFAllocatorDefault'); - - CFAllocatorRef get kCFAllocatorDefault => _kCFAllocatorDefault.value; - - set kCFAllocatorDefault(CFAllocatorRef value) => - _kCFAllocatorDefault.value = value; - - late final ffi.Pointer _kCFAllocatorSystemDefault = - _lookup('kCFAllocatorSystemDefault'); - - CFAllocatorRef get kCFAllocatorSystemDefault => - _kCFAllocatorSystemDefault.value; - - set kCFAllocatorSystemDefault(CFAllocatorRef value) => - _kCFAllocatorSystemDefault.value = value; - - late final ffi.Pointer _kCFAllocatorMalloc = - _lookup('kCFAllocatorMalloc'); - - CFAllocatorRef get kCFAllocatorMalloc => _kCFAllocatorMalloc.value; - - set kCFAllocatorMalloc(CFAllocatorRef value) => - _kCFAllocatorMalloc.value = value; - - late final ffi.Pointer _kCFAllocatorMallocZone = - _lookup('kCFAllocatorMallocZone'); - - CFAllocatorRef get kCFAllocatorMallocZone => _kCFAllocatorMallocZone.value; - - set kCFAllocatorMallocZone(CFAllocatorRef value) => - _kCFAllocatorMallocZone.value = value; - - late final ffi.Pointer _kCFAllocatorNull = - _lookup('kCFAllocatorNull'); - - CFAllocatorRef get kCFAllocatorNull => _kCFAllocatorNull.value; - - set kCFAllocatorNull(CFAllocatorRef value) => _kCFAllocatorNull.value = value; - - late final ffi.Pointer _kCFAllocatorUseContext = - _lookup('kCFAllocatorUseContext'); - - CFAllocatorRef get kCFAllocatorUseContext => _kCFAllocatorUseContext.value; - - set kCFAllocatorUseContext(CFAllocatorRef value) => - _kCFAllocatorUseContext.value = value; - - int CFAllocatorGetTypeID() { - return _CFAllocatorGetTypeID(); - } - - late final _CFAllocatorGetTypeIDPtr = - _lookup>('CFAllocatorGetTypeID'); - late final _CFAllocatorGetTypeID = - _CFAllocatorGetTypeIDPtr.asFunction(); + late final __objc_msgSend_173Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void CFAllocatorSetDefault( - CFAllocatorRef allocator, + late final _sel_dictionaryWithObjects_forKeys_count_1 = + _registerName1("dictionaryWithObjects:forKeys:count:"); + late final _sel_dictionaryWithObjectsAndKeys_1 = + _registerName1("dictionaryWithObjectsAndKeys:"); + late final _sel_dictionaryWithDictionary_1 = + _registerName1("dictionaryWithDictionary:"); + instancetype _objc_msgSend_174( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dict, ) { - return _CFAllocatorSetDefault( - allocator, + return __objc_msgSend_174( + obj, + sel, + dict, ); } - late final _CFAllocatorSetDefaultPtr = - _lookup>( - 'CFAllocatorSetDefault'); - late final _CFAllocatorSetDefault = - _CFAllocatorSetDefaultPtr.asFunction(); - - CFAllocatorRef CFAllocatorGetDefault() { - return _CFAllocatorGetDefault(); - } - - late final _CFAllocatorGetDefaultPtr = - _lookup>( - 'CFAllocatorGetDefault'); - late final _CFAllocatorGetDefault = - _CFAllocatorGetDefaultPtr.asFunction(); + late final __objc_msgSend_174Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - CFAllocatorRef CFAllocatorCreate( - CFAllocatorRef allocator, - ffi.Pointer context, + late final _sel_dictionaryWithObjects_forKeys_1 = + _registerName1("dictionaryWithObjects:forKeys:"); + instancetype _objc_msgSend_175( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer objects, + ffi.Pointer keys, ) { - return _CFAllocatorCreate( - allocator, - context, + return __objc_msgSend_175( + obj, + sel, + objects, + keys, ); } - late final _CFAllocatorCreatePtr = _lookup< + late final __objc_msgSend_175Ptr = _lookup< ffi.NativeFunction< - CFAllocatorRef Function(CFAllocatorRef, - ffi.Pointer)>>('CFAllocatorCreate'); - late final _CFAllocatorCreate = _CFAllocatorCreatePtr.asFunction< - CFAllocatorRef Function( - CFAllocatorRef, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer CFAllocatorAllocate( - CFAllocatorRef allocator, - int size, - int hint, + late final _sel_initWithObjectsAndKeys_1 = + _registerName1("initWithObjectsAndKeys:"); + late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); + late final _sel_initWithDictionary_copyItems_1 = + _registerName1("initWithDictionary:copyItems:"); + instancetype _objc_msgSend_176( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDictionary, + bool flag, ) { - return _CFAllocatorAllocate( - allocator, - size, - hint, + return __objc_msgSend_176( + obj, + sel, + otherDictionary, + flag, ); } - late final _CFAllocatorAllocatePtr = _lookup< + late final __objc_msgSend_176Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef, CFIndex, CFOptionFlags)>>('CFAllocatorAllocate'); - late final _CFAllocatorAllocate = _CFAllocatorAllocatePtr.asFunction< - ffi.Pointer Function(CFAllocatorRef, int, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - ffi.Pointer CFAllocatorReallocate( - CFAllocatorRef allocator, - ffi.Pointer ptr, - int newsize, - int hint, + late final _sel_initWithObjects_forKeys_1 = + _registerName1("initWithObjects:forKeys:"); + ffi.Pointer _objc_msgSend_177( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer> error, ) { - return _CFAllocatorReallocate( - allocator, - ptr, - newsize, - hint, + return __objc_msgSend_177( + obj, + sel, + url, + error, ); } - late final _CFAllocatorReallocatePtr = _lookup< + late final __objc_msgSend_177Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer, - CFIndex, CFOptionFlags)>>('CFAllocatorReallocate'); - late final _CFAllocatorReallocate = _CFAllocatorReallocatePtr.asFunction< - ffi.Pointer Function( - CFAllocatorRef, ffi.Pointer, int, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - void CFAllocatorDeallocate( - CFAllocatorRef allocator, - ffi.Pointer ptr, + late final _sel_dictionaryWithContentsOfURL_error_1 = + _registerName1("dictionaryWithContentsOfURL:error:"); + late final _sel_sharedKeySetForKeys_1 = + _registerName1("sharedKeySetForKeys:"); + late final _sel_countByEnumeratingWithState_objects_count_1 = + _registerName1("countByEnumeratingWithState:objects:count:"); + int _objc_msgSend_178( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer state, + ffi.Pointer> buffer, + int len, ) { - return _CFAllocatorDeallocate( - allocator, - ptr, + return __objc_msgSend_178( + obj, + sel, + state, + buffer, + len, ); } - late final _CFAllocatorDeallocatePtr = _lookup< + late final __objc_msgSend_178Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, ffi.Pointer)>>('CFAllocatorDeallocate'); - late final _CFAllocatorDeallocate = _CFAllocatorDeallocatePtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer)>(); + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); - int CFAllocatorGetPreferredSizeForSize( - CFAllocatorRef allocator, - int size, - int hint, + late final _sel_initWithDomain_code_userInfo_1 = + _registerName1("initWithDomain:code:userInfo:"); + instancetype _objc_msgSend_179( + ffi.Pointer obj, + ffi.Pointer sel, + NSErrorDomain domain, + int code, + ffi.Pointer dict, ) { - return _CFAllocatorGetPreferredSizeForSize( - allocator, - size, - hint, + return __objc_msgSend_179( + obj, + sel, + domain, + code, + dict, ); } - late final _CFAllocatorGetPreferredSizeForSizePtr = _lookup< + late final __objc_msgSend_179Ptr = _lookup< ffi.NativeFunction< - CFIndex Function(CFAllocatorRef, CFIndex, - CFOptionFlags)>>('CFAllocatorGetPreferredSizeForSize'); - late final _CFAllocatorGetPreferredSizeForSize = - _CFAllocatorGetPreferredSizeForSizePtr.asFunction< - int Function(CFAllocatorRef, int, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSErrorDomain, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, int, ffi.Pointer)>(); - void CFAllocatorGetContext( - CFAllocatorRef allocator, - ffi.Pointer context, + late final _sel_errorWithDomain_code_userInfo_1 = + _registerName1("errorWithDomain:code:userInfo:"); + late final _sel_domain1 = _registerName1("domain"); + late final _sel_code1 = _registerName1("code"); + late final _sel_userInfo1 = _registerName1("userInfo"); + ffi.Pointer _objc_msgSend_180( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _CFAllocatorGetContext( - allocator, - context, + return __objc_msgSend_180( + obj, + sel, ); } - late final _CFAllocatorGetContextPtr = _lookup< + late final __objc_msgSend_180Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, - ffi.Pointer)>>('CFAllocatorGetContext'); - late final _CFAllocatorGetContext = _CFAllocatorGetContextPtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int CFGetTypeID( - CFTypeRef cf, + late final _sel_localizedDescription1 = + _registerName1("localizedDescription"); + late final _sel_localizedFailureReason1 = + _registerName1("localizedFailureReason"); + late final _sel_localizedRecoverySuggestion1 = + _registerName1("localizedRecoverySuggestion"); + late final _sel_localizedRecoveryOptions1 = + _registerName1("localizedRecoveryOptions"); + late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); + late final _sel_helpAnchor1 = _registerName1("helpAnchor"); + late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); + late final _sel_setUserInfoValueProviderForDomain_provider_1 = + _registerName1("setUserInfoValueProviderForDomain:provider:"); + void _objc_msgSend_181( + ffi.Pointer obj, + ffi.Pointer sel, + NSErrorDomain errorDomain, + ffi.Pointer<_ObjCBlock> provider, ) { - return _CFGetTypeID( - cf, + return __objc_msgSend_181( + obj, + sel, + errorDomain, + provider, ); } - late final _CFGetTypeIDPtr = - _lookup>('CFGetTypeID'); - late final _CFGetTypeID = - _CFGetTypeIDPtr.asFunction(); + late final __objc_msgSend_181Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, ffi.Pointer<_ObjCBlock>)>(); - CFStringRef CFCopyTypeIDDescription( - int type_id, + late final _sel_userInfoValueProviderForDomain_1 = + _registerName1("userInfoValueProviderForDomain:"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_182( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer err, + NSErrorUserInfoKey userInfoKey, + NSErrorDomain errorDomain, ) { - return _CFCopyTypeIDDescription( - type_id, + return __objc_msgSend_182( + obj, + sel, + err, + userInfoKey, + errorDomain, ); } - late final _CFCopyTypeIDDescriptionPtr = - _lookup>( - 'CFCopyTypeIDDescription'); - late final _CFCopyTypeIDDescription = - _CFCopyTypeIDDescriptionPtr.asFunction(); + late final __objc_msgSend_182Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSErrorUserInfoKey, + NSErrorDomain)>>('objc_msgSend'); + late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSErrorUserInfoKey, + NSErrorDomain)>(); - CFTypeRef CFRetain( - CFTypeRef cf, + late final _sel_checkResourceIsReachableAndReturnError_1 = + _registerName1("checkResourceIsReachableAndReturnError:"); + bool _objc_msgSend_183( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> error, ) { - return _CFRetain( - cf, + return __objc_msgSend_183( + obj, + sel, + error, ); } - late final _CFRetainPtr = - _lookup>('CFRetain'); - late final _CFRetain = - _CFRetainPtr.asFunction(); + late final __objc_msgSend_183Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - void CFRelease( - CFTypeRef cf, + late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); + late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); + late final _sel_filePathURL1 = _registerName1("filePathURL"); + late final _sel_getResourceValue_forKey_error_1 = + _registerName1("getResourceValue:forKey:error:"); + bool _objc_msgSend_184( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error, ) { - return _CFRelease( - cf, + return __objc_msgSend_184( + obj, + sel, + value, + key, + error, ); } - late final _CFReleasePtr = - _lookup>('CFRelease'); - late final _CFRelease = _CFReleasePtr.asFunction(); + late final __objc_msgSend_184Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSURLResourceKey, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSURLResourceKey, + ffi.Pointer>)>(); - CFTypeRef CFAutorelease( - CFTypeRef arg, + late final _sel_resourceValuesForKeys_error_1 = + _registerName1("resourceValuesForKeys:error:"); + ffi.Pointer _objc_msgSend_185( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer> error, ) { - return _CFAutorelease( - arg, + return __objc_msgSend_185( + obj, + sel, + keys, + error, ); } - late final _CFAutoreleasePtr = - _lookup>( - 'CFAutorelease'); - late final _CFAutorelease = - _CFAutoreleasePtr.asFunction(); + late final __objc_msgSend_185Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - int CFGetRetainCount( - CFTypeRef cf, + late final _sel_setResourceValue_forKey_error_1 = + _registerName1("setResourceValue:forKey:error:"); + bool _objc_msgSend_186( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + NSURLResourceKey key, + ffi.Pointer> error, ) { - return _CFGetRetainCount( - cf, + return __objc_msgSend_186( + obj, + sel, + value, + key, + error, ); } - late final _CFGetRetainCountPtr = - _lookup>( - 'CFGetRetainCount'); - late final _CFGetRetainCount = - _CFGetRetainCountPtr.asFunction(); + late final __objc_msgSend_186Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLResourceKey, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLResourceKey, + ffi.Pointer>)>(); - int CFEqual( - CFTypeRef cf1, - CFTypeRef cf2, + late final _sel_setResourceValues_error_1 = + _registerName1("setResourceValues:error:"); + bool _objc_msgSend_187( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyedValues, + ffi.Pointer> error, ) { - return _CFEqual( - cf1, - cf2, + return __objc_msgSend_187( + obj, + sel, + keyedValues, + error, ); } - late final _CFEqualPtr = - _lookup>( - 'CFEqual'); - late final _CFEqual = - _CFEqualPtr.asFunction(); + late final __objc_msgSend_187Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - int CFHash( - CFTypeRef cf, + late final _sel_removeCachedResourceValueForKey_1 = + _registerName1("removeCachedResourceValueForKey:"); + void _objc_msgSend_188( + ffi.Pointer obj, + ffi.Pointer sel, + NSURLResourceKey key, ) { - return _CFHash( - cf, + return __objc_msgSend_188( + obj, + sel, + key, ); } - late final _CFHashPtr = - _lookup>('CFHash'); - late final _CFHash = _CFHashPtr.asFunction(); + late final __objc_msgSend_188Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSURLResourceKey)>>('objc_msgSend'); + late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, NSURLResourceKey)>(); - CFStringRef CFCopyDescription( - CFTypeRef cf, + late final _sel_removeAllCachedResourceValues1 = + _registerName1("removeAllCachedResourceValues"); + late final _sel_setTemporaryResourceValue_forKey_1 = + _registerName1("setTemporaryResourceValue:forKey:"); + void _objc_msgSend_189( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + NSURLResourceKey key, ) { - return _CFCopyDescription( - cf, + return __objc_msgSend_189( + obj, + sel, + value, + key, ); } - late final _CFCopyDescriptionPtr = - _lookup>( - 'CFCopyDescription'); - late final _CFCopyDescription = - _CFCopyDescriptionPtr.asFunction(); + late final __objc_msgSend_189Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSURLResourceKey)>>('objc_msgSend'); + late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSURLResourceKey)>(); - CFAllocatorRef CFGetAllocator( - CFTypeRef cf, + late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = + _registerName1( + "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); + ffi.Pointer _objc_msgSend_190( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ffi.Pointer keys, + ffi.Pointer relativeURL, + ffi.Pointer> error, ) { - return _CFGetAllocator( - cf, + return __objc_msgSend_190( + obj, + sel, + options, + keys, + relativeURL, + error, ); } - late final _CFGetAllocatorPtr = - _lookup>( - 'CFGetAllocator'); - late final _CFGetAllocator = - _CFGetAllocatorPtr.asFunction(); + late final __objc_msgSend_190Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - CFTypeRef CFMakeCollectable( - CFTypeRef cf, + late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = + _registerName1( + "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); + instancetype _objc_msgSend_191( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bookmarkData, + int options, + ffi.Pointer relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error, ) { - return _CFMakeCollectable( - cf, + return __objc_msgSend_191( + obj, + sel, + bookmarkData, + options, + relativeURL, + isStale, + error, ); } - late final _CFMakeCollectablePtr = - _lookup>( - 'CFMakeCollectable'); - late final _CFMakeCollectable = - _CFMakeCollectablePtr.asFunction(); - - ffi.Pointer NSDefaultMallocZone() { - return _NSDefaultMallocZone(); - } - - late final _NSDefaultMallocZonePtr = - _lookup Function()>>( - 'NSDefaultMallocZone'); - late final _NSDefaultMallocZone = - _NSDefaultMallocZonePtr.asFunction Function()>(); + late final __objc_msgSend_191Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - ffi.Pointer NSCreateZone( - int startSize, - int granularity, - bool canFree, + late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = + _registerName1( + "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); + late final _sel_resourceValuesForKeys_fromBookmarkData_1 = + _registerName1("resourceValuesForKeys:fromBookmarkData:"); + ffi.Pointer _objc_msgSend_192( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer bookmarkData, ) { - return _NSCreateZone( - startSize, - granularity, - canFree, + return __objc_msgSend_192( + obj, + sel, + keys, + bookmarkData, ); } - late final _NSCreateZonePtr = _lookup< + late final __objc_msgSend_192Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - NSUInteger, NSUInteger, ffi.Bool)>>('NSCreateZone'); - late final _NSCreateZone = _NSCreateZonePtr.asFunction< - ffi.Pointer Function(int, int, bool)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void NSRecycleZone( - ffi.Pointer zone, + late final _sel_writeBookmarkData_toURL_options_error_1 = + _registerName1("writeBookmarkData:toURL:options:error:"); + bool _objc_msgSend_193( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bookmarkData, + ffi.Pointer bookmarkFileURL, + int options, + ffi.Pointer> error, ) { - return _NSRecycleZone( - zone, + return __objc_msgSend_193( + obj, + sel, + bookmarkData, + bookmarkFileURL, + options, + error, ); } - late final _NSRecycleZonePtr = - _lookup)>>( - 'NSRecycleZone'); - late final _NSRecycleZone = - _NSRecycleZonePtr.asFunction)>(); + late final __objc_msgSend_193Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLBookmarkFileCreationOptions, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - void NSSetZoneName( - ffi.Pointer zone, - ffi.Pointer name, + late final _sel_bookmarkDataWithContentsOfURL_error_1 = + _registerName1("bookmarkDataWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_194( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bookmarkFileURL, + ffi.Pointer> error, ) { - return _NSSetZoneName( - zone, - name, + return __objc_msgSend_194( + obj, + sel, + bookmarkFileURL, + error, ); } - late final _NSSetZoneNamePtr = _lookup< + late final __objc_msgSend_194Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('NSSetZoneName'); - late final _NSSetZoneName = _NSSetZoneNamePtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - ffi.Pointer NSZoneName( - ffi.Pointer zone, + late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = + _registerName1("URLByResolvingAliasFileAtURL:options:error:"); + instancetype _objc_msgSend_195( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int options, + ffi.Pointer> error, ) { - return _NSZoneName( - zone, + return __objc_msgSend_195( + obj, + sel, + url, + options, + error, ); } - late final _NSZoneNamePtr = _lookup< + late final __objc_msgSend_195Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('NSZoneName'); - late final _NSZoneName = _NSZoneNamePtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - ffi.Pointer NSZoneFromPointer( - ffi.Pointer ptr, + late final _sel_startAccessingSecurityScopedResource1 = + _registerName1("startAccessingSecurityScopedResource"); + late final _sel_stopAccessingSecurityScopedResource1 = + _registerName1("stopAccessingSecurityScopedResource"); + late final _sel_getPromisedItemResourceValue_forKey_error_1 = + _registerName1("getPromisedItemResourceValue:forKey:error:"); + late final _sel_promisedItemResourceValuesForKeys_error_1 = + _registerName1("promisedItemResourceValuesForKeys:error:"); + late final _sel_checkPromisedItemIsReachableAndReturnError_1 = + _registerName1("checkPromisedItemIsReachableAndReturnError:"); + late final _sel_fileURLWithPathComponents_1 = + _registerName1("fileURLWithPathComponents:"); + ffi.Pointer _objc_msgSend_196( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer components, ) { - return _NSZoneFromPointer( - ptr, + return __objc_msgSend_196( + obj, + sel, + components, ); } - late final _NSZoneFromPointerPtr = _lookup< + late final __objc_msgSend_196Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSZoneFromPointer'); - late final _NSZoneFromPointer = _NSZoneFromPointerPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSZoneMalloc( - ffi.Pointer zone, - int size, + late final _sel_pathComponents1 = _registerName1("pathComponents"); + late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); + late final _sel_pathExtension1 = _registerName1("pathExtension"); + late final _sel_URLByAppendingPathComponent_1 = + _registerName1("URLByAppendingPathComponent:"); + late final _sel_URLByAppendingPathComponent_isDirectory_1 = + _registerName1("URLByAppendingPathComponent:isDirectory:"); + late final _sel_URLByDeletingLastPathComponent1 = + _registerName1("URLByDeletingLastPathComponent"); + late final _sel_URLByAppendingPathExtension_1 = + _registerName1("URLByAppendingPathExtension:"); + late final _sel_URLByDeletingPathExtension1 = + _registerName1("URLByDeletingPathExtension"); + late final _sel_URLByStandardizingPath1 = + _registerName1("URLByStandardizingPath"); + late final _sel_URLByResolvingSymlinksInPath1 = + _registerName1("URLByResolvingSymlinksInPath"); + late final _sel_resourceDataUsingCache_1 = + _registerName1("resourceDataUsingCache:"); + ffi.Pointer _objc_msgSend_197( + ffi.Pointer obj, + ffi.Pointer sel, + bool shouldUseCache, ) { - return _NSZoneMalloc( - zone, - size, + return __objc_msgSend_197( + obj, + sel, + shouldUseCache, ); } - late final _NSZoneMallocPtr = _lookup< + late final __objc_msgSend_197Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, NSUInteger)>>('NSZoneMalloc'); - late final _NSZoneMalloc = _NSZoneMallocPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); - ffi.Pointer NSZoneCalloc( - ffi.Pointer zone, - int numElems, - int byteSize, + late final _sel_loadResourceDataNotifyingClient_usingCache_1 = + _registerName1("loadResourceDataNotifyingClient:usingCache:"); + void _objc_msgSend_198( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer client, + bool shouldUseCache, ) { - return _NSZoneCalloc( - zone, - numElems, - byteSize, + return __objc_msgSend_198( + obj, + sel, + client, + shouldUseCache, ); } - late final _NSZoneCallocPtr = _lookup< + late final __objc_msgSend_198Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, NSUInteger, NSUInteger)>>('NSZoneCalloc'); - late final _NSZoneCalloc = _NSZoneCallocPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - ffi.Pointer NSZoneRealloc( - ffi.Pointer zone, - ffi.Pointer ptr, - int size, + late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); + late final _sel_setResourceData_1 = _registerName1("setResourceData:"); + late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); + bool _objc_msgSend_199( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer property, + ffi.Pointer propertyKey, ) { - return _NSZoneRealloc( - zone, - ptr, - size, + return __objc_msgSend_199( + obj, + sel, + property, + propertyKey, ); } - late final _NSZoneReallocPtr = _lookup< + late final __objc_msgSend_199Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('NSZoneRealloc'); - late final _NSZoneRealloc = _NSZoneReallocPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void NSZoneFree( - ffi.Pointer zone, - ffi.Pointer ptr, + late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); + late final _sel_registerURLHandleClass_1 = + _registerName1("registerURLHandleClass:"); + void _objc_msgSend_200( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURLHandleSubclass, ) { - return _NSZoneFree( - zone, - ptr, + return __objc_msgSend_200( + obj, + sel, + anURLHandleSubclass, ); } - late final _NSZoneFreePtr = _lookup< + late final __objc_msgSend_200Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('NSZoneFree'); - late final _NSZoneFree = _NSZoneFreePtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer NSAllocateCollectable( - int size, - int options, + late final _sel_URLHandleClassForURL_1 = + _registerName1("URLHandleClassForURL:"); + ffi.Pointer _objc_msgSend_201( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, ) { - return _NSAllocateCollectable( - size, - options, + return __objc_msgSend_201( + obj, + sel, + anURL, ); } - late final _NSAllocateCollectablePtr = _lookup< + late final __objc_msgSend_201Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - NSUInteger, NSUInteger)>>('NSAllocateCollectable'); - late final _NSAllocateCollectable = _NSAllocateCollectablePtr.asFunction< - ffi.Pointer Function(int, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSReallocateCollectable( - ffi.Pointer ptr, - int size, - int options, + late final _sel_status1 = _registerName1("status"); + int _objc_msgSend_202( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSReallocateCollectable( - ptr, - size, - options, + return __objc_msgSend_202( + obj, + sel, ); } - late final _NSReallocateCollectablePtr = _lookup< + late final __objc_msgSend_202Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, NSUInteger, - NSUInteger)>>('NSReallocateCollectable'); - late final _NSReallocateCollectable = _NSReallocateCollectablePtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); - - int NSPageSize() { - return _NSPageSize(); - } - - late final _NSPageSizePtr = - _lookup>('NSPageSize'); - late final _NSPageSize = _NSPageSizePtr.asFunction(); - - int NSLogPageSize() { - return _NSLogPageSize(); - } - - late final _NSLogPageSizePtr = - _lookup>('NSLogPageSize'); - late final _NSLogPageSize = _NSLogPageSizePtr.asFunction(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int NSRoundUpToMultipleOfPageSize( - int bytes, + late final _sel_failureReason1 = _registerName1("failureReason"); + late final _sel_addClient_1 = _registerName1("addClient:"); + late final _sel_removeClient_1 = _registerName1("removeClient:"); + late final _sel_loadInBackground1 = _registerName1("loadInBackground"); + late final _sel_cancelLoadInBackground1 = + _registerName1("cancelLoadInBackground"); + late final _sel_resourceData1 = _registerName1("resourceData"); + late final _sel_availableResourceData1 = + _registerName1("availableResourceData"); + late final _sel_expectedResourceDataSize1 = + _registerName1("expectedResourceDataSize"); + late final _sel_flushCachedData1 = _registerName1("flushCachedData"); + late final _sel_backgroundLoadDidFailWithReason_1 = + _registerName1("backgroundLoadDidFailWithReason:"); + late final _sel_didLoadBytes_loadComplete_1 = + _registerName1("didLoadBytes:loadComplete:"); + void _objc_msgSend_203( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer newBytes, + bool yorn, ) { - return _NSRoundUpToMultipleOfPageSize( - bytes, + return __objc_msgSend_203( + obj, + sel, + newBytes, + yorn, ); } - late final _NSRoundUpToMultipleOfPageSizePtr = - _lookup>( - 'NSRoundUpToMultipleOfPageSize'); - late final _NSRoundUpToMultipleOfPageSize = - _NSRoundUpToMultipleOfPageSizePtr.asFunction(); + late final __objc_msgSend_203Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - int NSRoundDownToMultipleOfPageSize( - int bytes, + late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); + bool _objc_msgSend_204( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, ) { - return _NSRoundDownToMultipleOfPageSize( - bytes, + return __objc_msgSend_204( + obj, + sel, + anURL, ); } - late final _NSRoundDownToMultipleOfPageSizePtr = - _lookup>( - 'NSRoundDownToMultipleOfPageSize'); - late final _NSRoundDownToMultipleOfPageSize = - _NSRoundDownToMultipleOfPageSizePtr.asFunction(); + late final __objc_msgSend_204Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer NSAllocateMemoryPages( - int bytes, + late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); + ffi.Pointer _objc_msgSend_205( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, ) { - return _NSAllocateMemoryPages( - bytes, + return __objc_msgSend_205( + obj, + sel, + anURL, ); } - late final _NSAllocateMemoryPagesPtr = - _lookup Function(NSUInteger)>>( - 'NSAllocateMemoryPages'); - late final _NSAllocateMemoryPages = _NSAllocateMemoryPagesPtr.asFunction< - ffi.Pointer Function(int)>(); + late final __objc_msgSend_205Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void NSDeallocateMemoryPages( - ffi.Pointer ptr, - int bytes, + late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); + ffi.Pointer _objc_msgSend_206( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, + bool willCache, ) { - return _NSDeallocateMemoryPages( - ptr, - bytes, + return __objc_msgSend_206( + obj, + sel, + anURL, + willCache, ); } - late final _NSDeallocateMemoryPagesPtr = _lookup< + late final __objc_msgSend_206Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, NSUInteger)>>('NSDeallocateMemoryPages'); - late final _NSDeallocateMemoryPages = _NSDeallocateMemoryPagesPtr.asFunction< - void Function(ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); - void NSCopyMemoryPages( - ffi.Pointer source, - ffi.Pointer dest, - int bytes, + late final _sel_propertyForKeyIfAvailable_1 = + _registerName1("propertyForKeyIfAvailable:"); + late final _sel_writeProperty_forKey_1 = + _registerName1("writeProperty:forKey:"); + late final _sel_writeData_1 = _registerName1("writeData:"); + late final _sel_loadInForeground1 = _registerName1("loadInForeground"); + late final _sel_beginLoadInBackground1 = + _registerName1("beginLoadInBackground"); + late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); + late final _sel_URLHandleUsingCache_1 = + _registerName1("URLHandleUsingCache:"); + ffi.Pointer _objc_msgSend_207( + ffi.Pointer obj, + ffi.Pointer sel, + bool shouldUseCache, ) { - return _NSCopyMemoryPages( - source, - dest, - bytes, + return __objc_msgSend_207( + obj, + sel, + shouldUseCache, ); } - late final _NSCopyMemoryPagesPtr = _lookup< + late final __objc_msgSend_207Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('NSCopyMemoryPages'); - late final _NSCopyMemoryPages = _NSCopyMemoryPagesPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - int NSRealMemoryAvailable() { - return _NSRealMemoryAvailable(); - } - - late final _NSRealMemoryAvailablePtr = - _lookup>( - 'NSRealMemoryAvailable'); - late final _NSRealMemoryAvailable = - _NSRealMemoryAvailablePtr.asFunction(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); - ffi.Pointer NSAllocateObject( - ffi.Pointer aClass, - int extraBytes, - ffi.Pointer zone, + late final _sel_writeToFile_options_error_1 = + _registerName1("writeToFile:options:error:"); + bool _objc_msgSend_208( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + int writeOptionsMask, + ffi.Pointer> errorPtr, ) { - return _NSAllocateObject( - aClass, - extraBytes, - zone, + return __objc_msgSend_208( + obj, + sel, + path, + writeOptionsMask, + errorPtr, ); } - late final _NSAllocateObjectPtr = _lookup< + late final __objc_msgSend_208Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, NSUInteger, - ffi.Pointer)>>('NSAllocateObject'); - late final _NSAllocateObject = _NSAllocateObjectPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - void NSDeallocateObject( - ffi.Pointer object, + late final _sel_writeToURL_options_error_1 = + _registerName1("writeToURL:options:error:"); + bool _objc_msgSend_209( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int writeOptionsMask, + ffi.Pointer> errorPtr, ) { - return _NSDeallocateObject( - object, + return __objc_msgSend_209( + obj, + sel, + url, + writeOptionsMask, + errorPtr, ); } - late final _NSDeallocateObjectPtr = - _lookup)>>( - 'NSDeallocateObject'); - late final _NSDeallocateObject = _NSDeallocateObjectPtr.asFunction< - void Function(ffi.Pointer)>(); + late final __objc_msgSend_209Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - ffi.Pointer NSCopyObject( - ffi.Pointer object, - int extraBytes, - ffi.Pointer zone, + late final _sel_rangeOfData_options_range_1 = + _registerName1("rangeOfData:options:range:"); + NSRange _objc_msgSend_210( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dataToFind, + int mask, + NSRange searchRange, ) { - return _NSCopyObject( - object, - extraBytes, - zone, + return __objc_msgSend_210( + obj, + sel, + dataToFind, + mask, + searchRange, ); } - late final _NSCopyObjectPtr = _lookup< + late final __objc_msgSend_210Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, NSUInteger, - ffi.Pointer)>>('NSCopyObject'); - late final _NSCopyObject = _NSCopyObjectPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - bool NSShouldRetainWithZone( - ffi.Pointer anObject, - ffi.Pointer requestedZone, + late final _sel_enumerateByteRangesUsingBlock_1 = + _registerName1("enumerateByteRangesUsingBlock:"); + void _objc_msgSend_211( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return _NSShouldRetainWithZone( - anObject, - requestedZone, + return __objc_msgSend_211( + obj, + sel, + block, ); } - late final _NSShouldRetainWithZonePtr = _lookup< + late final __objc_msgSend_211Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer)>>('NSShouldRetainWithZone'); - late final _NSShouldRetainWithZone = _NSShouldRetainWithZonePtr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - void NSIncrementExtraRefCount( - ffi.Pointer object, + late final _sel_data1 = _registerName1("data"); + late final _sel_dataWithBytes_length_1 = + _registerName1("dataWithBytes:length:"); + instancetype _objc_msgSend_212( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, ) { - return _NSIncrementExtraRefCount( - object, + return __objc_msgSend_212( + obj, + sel, + bytes, + length, ); } - late final _NSIncrementExtraRefCountPtr = - _lookup)>>( - 'NSIncrementExtraRefCount'); - late final _NSIncrementExtraRefCount = _NSIncrementExtraRefCountPtr - .asFunction)>(); + late final __objc_msgSend_212Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - bool NSDecrementExtraRefCountWasZero( - ffi.Pointer object, + late final _sel_dataWithBytesNoCopy_length_1 = + _registerName1("dataWithBytesNoCopy:length:"); + late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = + _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); + instancetype _objc_msgSend_213( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, + bool b, ) { - return _NSDecrementExtraRefCountWasZero( - object, + return __objc_msgSend_213( + obj, + sel, + bytes, + length, + b, ); } - late final _NSDecrementExtraRefCountWasZeroPtr = - _lookup)>>( - 'NSDecrementExtraRefCountWasZero'); - late final _NSDecrementExtraRefCountWasZero = - _NSDecrementExtraRefCountWasZeroPtr.asFunction< - bool Function(ffi.Pointer)>(); - - int NSExtraRefCount( - ffi.Pointer object, - ) { - return _NSExtraRefCount( - object, - ); - } - - late final _NSExtraRefCountPtr = - _lookup)>>( - 'NSExtraRefCount'); - late final _NSExtraRefCount = - _NSExtraRefCountPtr.asFunction)>(); - - NSRange NSUnionRange( - NSRange range1, - NSRange range2, - ) { - return _NSUnionRange( - range1, - range2, - ); - } - - late final _NSUnionRangePtr = - _lookup>( - 'NSUnionRange'); - late final _NSUnionRange = - _NSUnionRangePtr.asFunction(); + late final __objc_msgSend_213Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, bool)>(); - NSRange NSIntersectionRange( - NSRange range1, - NSRange range2, + late final _sel_dataWithContentsOfFile_options_error_1 = + _registerName1("dataWithContentsOfFile:options:error:"); + instancetype _objc_msgSend_214( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + int readOptionsMask, + ffi.Pointer> errorPtr, ) { - return _NSIntersectionRange( - range1, - range2, + return __objc_msgSend_214( + obj, + sel, + path, + readOptionsMask, + errorPtr, ); } - late final _NSIntersectionRangePtr = - _lookup>( - 'NSIntersectionRange'); - late final _NSIntersectionRange = - _NSIntersectionRangePtr.asFunction(); + late final __objc_msgSend_214Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - ffi.Pointer NSStringFromRange( - NSRange range, + late final _sel_dataWithContentsOfURL_options_error_1 = + _registerName1("dataWithContentsOfURL:options:error:"); + instancetype _objc_msgSend_215( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int readOptionsMask, + ffi.Pointer> errorPtr, ) { - return _NSStringFromRange( - range, + return __objc_msgSend_215( + obj, + sel, + url, + readOptionsMask, + errorPtr, ); } - late final _NSStringFromRangePtr = - _lookup Function(NSRange)>>( - 'NSStringFromRange'); - late final _NSStringFromRange = _NSStringFromRangePtr.asFunction< - ffi.Pointer Function(NSRange)>(); + late final __objc_msgSend_215Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - NSRange NSRangeFromString( - ffi.Pointer aString, + late final _sel_dataWithContentsOfFile_1 = + _registerName1("dataWithContentsOfFile:"); + late final _sel_dataWithContentsOfURL_1 = + _registerName1("dataWithContentsOfURL:"); + late final _sel_initWithBytes_length_1 = + _registerName1("initWithBytes:length:"); + late final _sel_initWithBytesNoCopy_length_1 = + _registerName1("initWithBytesNoCopy:length:"); + late final _sel_initWithBytesNoCopy_length_freeWhenDone_1 = + _registerName1("initWithBytesNoCopy:length:freeWhenDone:"); + late final _sel_initWithBytesNoCopy_length_deallocator_1 = + _registerName1("initWithBytesNoCopy:length:deallocator:"); + instancetype _objc_msgSend_216( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return _NSRangeFromString( - aString, + return __objc_msgSend_216( + obj, + sel, + bytes, + length, + deallocator, ); } - late final _NSRangeFromStringPtr = - _lookup)>>( - 'NSRangeFromString'); - late final _NSRangeFromString = _NSRangeFromStringPtr.asFunction< - NSRange Function(ffi.Pointer)>(); + late final __objc_msgSend_216Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _class_NSMutableIndexSet1 = _getClass1("NSMutableIndexSet"); - late final _sel_addIndexes_1 = _registerName1("addIndexes:"); - void _objc_msgSend_281( + late final _sel_initWithContentsOfFile_options_error_1 = + _registerName1("initWithContentsOfFile:options:error:"); + late final _sel_initWithContentsOfURL_options_error_1 = + _registerName1("initWithContentsOfURL:options:error:"); + late final _sel_initWithData_1 = _registerName1("initWithData:"); + instancetype _objc_msgSend_217( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexSet, + ffi.Pointer data, ) { - return __objc_msgSend_281( + return __objc_msgSend_217( obj, sel, - indexSet, + data, ); } - late final __objc_msgSend_281Ptr = _lookup< + late final __objc_msgSend_217Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_removeIndexes_1 = _registerName1("removeIndexes:"); - late final _sel_removeAllIndexes1 = _registerName1("removeAllIndexes"); - late final _sel_addIndex_1 = _registerName1("addIndex:"); - void _objc_msgSend_282( + late final _sel_dataWithData_1 = _registerName1("dataWithData:"); + late final _sel_initWithBase64EncodedString_options_1 = + _registerName1("initWithBase64EncodedString:options:"); + instancetype _objc_msgSend_218( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer base64String, + int options, ) { - return __objc_msgSend_282( + return __objc_msgSend_218( obj, sel, - value, + base64String, + options, ); } - late final __objc_msgSend_282Ptr = _lookup< + late final __objc_msgSend_218Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_removeIndex_1 = _registerName1("removeIndex:"); - late final _sel_addIndexesInRange_1 = _registerName1("addIndexesInRange:"); - void _objc_msgSend_283( + late final _sel_base64EncodedStringWithOptions_1 = + _registerName1("base64EncodedStringWithOptions:"); + ffi.Pointer _objc_msgSend_219( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + int options, ) { - return __objc_msgSend_283( + return __objc_msgSend_219( obj, sel, - range, + options, ); } - late final __objc_msgSend_283Ptr = _lookup< + late final __objc_msgSend_219Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeIndexesInRange_1 = - _registerName1("removeIndexesInRange:"); - late final _sel_shiftIndexesStartingAtIndex_by_1 = - _registerName1("shiftIndexesStartingAtIndex:by:"); - void _objc_msgSend_284( + late final _sel_initWithBase64EncodedData_options_1 = + _registerName1("initWithBase64EncodedData:options:"); + instancetype _objc_msgSend_220( ffi.Pointer obj, ffi.Pointer sel, - int index, - int delta, + ffi.Pointer base64Data, + int options, ) { - return __objc_msgSend_284( + return __objc_msgSend_220( obj, sel, - index, - delta, + base64Data, + options, ); } - late final __objc_msgSend_284Ptr = _lookup< + late final __objc_msgSend_220Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _class_NSMutableArray1 = _getClass1("NSMutableArray"); - late final _sel_addObject_1 = _registerName1("addObject:"); - late final _sel_insertObject_atIndex_1 = - _registerName1("insertObject:atIndex:"); - void _objc_msgSend_285( + late final _sel_base64EncodedDataWithOptions_1 = + _registerName1("base64EncodedDataWithOptions:"); + ffi.Pointer _objc_msgSend_221( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int index, + int options, ) { - return __objc_msgSend_285( + return __objc_msgSend_221( obj, sel, - anObject, - index, + options, ); } - late final __objc_msgSend_285Ptr = _lookup< + late final __objc_msgSend_221Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeLastObject1 = _registerName1("removeLastObject"); - late final _sel_removeObjectAtIndex_1 = - _registerName1("removeObjectAtIndex:"); - late final _sel_replaceObjectAtIndex_withObject_1 = - _registerName1("replaceObjectAtIndex:withObject:"); - void _objc_msgSend_286( + late final _sel_decompressedDataUsingAlgorithm_error_1 = + _registerName1("decompressedDataUsingAlgorithm:error:"); + instancetype _objc_msgSend_222( ffi.Pointer obj, ffi.Pointer sel, - int index, - ffi.Pointer anObject, + int algorithm, + ffi.Pointer> error, ) { - return __objc_msgSend_286( + return __objc_msgSend_222( obj, sel, - index, - anObject, + algorithm, + error, ); } - late final __objc_msgSend_286Ptr = _lookup< + late final __objc_msgSend_222Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer>)>(); - late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); - late final _sel_addObjectsFromArray_1 = - _registerName1("addObjectsFromArray:"); - void _objc_msgSend_287( + late final _sel_compressedDataUsingAlgorithm_error_1 = + _registerName1("compressedDataUsingAlgorithm:error:"); + late final _sel_getBytes_1 = _registerName1("getBytes:"); + late final _sel_dataWithContentsOfMappedFile_1 = + _registerName1("dataWithContentsOfMappedFile:"); + late final _sel_initWithContentsOfMappedFile_1 = + _registerName1("initWithContentsOfMappedFile:"); + late final _sel_initWithBase64Encoding_1 = + _registerName1("initWithBase64Encoding:"); + late final _sel_base64Encoding1 = _registerName1("base64Encoding"); + late final _sel_characterSetWithBitmapRepresentation_1 = + _registerName1("characterSetWithBitmapRepresentation:"); + ffi.Pointer _objc_msgSend_223( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherArray, + ffi.Pointer data, ) { - return __objc_msgSend_287( + return __objc_msgSend_223( obj, sel, - otherArray, + data, ); } - late final __objc_msgSend_287Ptr = _lookup< + late final __objc_msgSend_223Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = - _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); - void _objc_msgSend_288( + late final _sel_characterSetWithContentsOfFile_1 = + _registerName1("characterSetWithContentsOfFile:"); + late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); + bool _objc_msgSend_224( ffi.Pointer obj, ffi.Pointer sel, - int idx1, - int idx2, + int aCharacter, ) { - return __objc_msgSend_288( + return __objc_msgSend_224( obj, sel, - idx1, - idx2, + aCharacter, ); } - late final __objc_msgSend_288Ptr = _lookup< + late final __objc_msgSend_224Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + unichar)>>('objc_msgSend'); + late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); - late final _sel_removeObject_inRange_1 = - _registerName1("removeObject:inRange:"); - void _objc_msgSend_289( + late final _sel_bitmapRepresentation1 = + _registerName1("bitmapRepresentation"); + late final _sel_invertedSet1 = _registerName1("invertedSet"); + late final _sel_longCharacterIsMember_1 = + _registerName1("longCharacterIsMember:"); + bool _objc_msgSend_225( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - NSRange range, + int theLongChar, ) { - return __objc_msgSend_289( + return __objc_msgSend_225( obj, sel, - anObject, - range, + theLongChar, ); } - late final __objc_msgSend_289Ptr = _lookup< + late final __objc_msgSend_225Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + UTF32Char)>>('objc_msgSend'); + late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeObject_1 = _registerName1("removeObject:"); - late final _sel_removeObjectIdenticalTo_inRange_1 = - _registerName1("removeObjectIdenticalTo:inRange:"); - late final _sel_removeObjectIdenticalTo_1 = - _registerName1("removeObjectIdenticalTo:"); - late final _sel_removeObjectsFromIndices_numIndices_1 = - _registerName1("removeObjectsFromIndices:numIndices:"); - void _objc_msgSend_290( + late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); + bool _objc_msgSend_226( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indices, - int cnt, + ffi.Pointer theOtherSet, ) { - return __objc_msgSend_290( + return __objc_msgSend_226( obj, sel, - indices, - cnt, + theOtherSet, ); } - late final __objc_msgSend_290Ptr = _lookup< + late final __objc_msgSend_226Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_removeObjectsInArray_1 = - _registerName1("removeObjectsInArray:"); - late final _sel_removeObjectsInRange_1 = - _registerName1("removeObjectsInRange:"); - late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); - void _objc_msgSend_291( + late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); + bool _objc_msgSend_227( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer otherArray, - NSRange otherRange, + int thePlane, ) { - return __objc_msgSend_291( + return __objc_msgSend_227( obj, sel, - range, - otherArray, - otherRange, + thePlane, ); } - late final __objc_msgSend_291Ptr = _lookup< + late final __objc_msgSend_227Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer, NSRange)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Uint8)>>('objc_msgSend'); + late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:"); - void _objc_msgSend_292( + late final _sel_URLUserAllowedCharacterSet1 = + _registerName1("URLUserAllowedCharacterSet"); + late final _sel_URLPasswordAllowedCharacterSet1 = + _registerName1("URLPasswordAllowedCharacterSet"); + late final _sel_URLHostAllowedCharacterSet1 = + _registerName1("URLHostAllowedCharacterSet"); + late final _sel_URLPathAllowedCharacterSet1 = + _registerName1("URLPathAllowedCharacterSet"); + late final _sel_URLQueryAllowedCharacterSet1 = + _registerName1("URLQueryAllowedCharacterSet"); + late final _sel_URLFragmentAllowedCharacterSet1 = + _registerName1("URLFragmentAllowedCharacterSet"); + late final _sel_rangeOfCharacterFromSet_1 = + _registerName1("rangeOfCharacterFromSet:"); + NSRange _objc_msgSend_228( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer otherArray, + ffi.Pointer searchSet, ) { - return __objc_msgSend_292( + return __objc_msgSend_228( obj, sel, - range, - otherArray, + searchSet, ); } - late final __objc_msgSend_292Ptr = _lookup< + late final __objc_msgSend_228Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_setArray_1 = _registerName1("setArray:"); - late final _sel_sortUsingFunction_context_1 = - _registerName1("sortUsingFunction:context:"); - void _objc_msgSend_293( + late final _sel_rangeOfCharacterFromSet_options_1 = + _registerName1("rangeOfCharacterFromSet:options:"); + NSRange _objc_msgSend_229( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context, - ) { - return __objc_msgSend_293( - obj, - sel, - compare, - context, - ); - } - - late final __objc_msgSend_293Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); - - late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); - late final _sel_insertObjects_atIndexes_1 = - _registerName1("insertObjects:atIndexes:"); - void _objc_msgSend_294( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer indexes, + ffi.Pointer searchSet, + int mask, ) { - return __objc_msgSend_294( + return __objc_msgSend_229( obj, sel, - objects, - indexes, + searchSet, + mask, ); } - late final __objc_msgSend_294Ptr = _lookup< + late final __objc_msgSend_229Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_removeObjectsAtIndexes_1 = - _registerName1("removeObjectsAtIndexes:"); - late final _sel_replaceObjectsAtIndexes_withObjects_1 = - _registerName1("replaceObjectsAtIndexes:withObjects:"); - void _objc_msgSend_295( + late final _sel_rangeOfCharacterFromSet_options_range_1 = + _registerName1("rangeOfCharacterFromSet:options:range:"); + NSRange _objc_msgSend_230( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexes, - ffi.Pointer objects, + ffi.Pointer searchSet, + int mask, + NSRange rangeOfReceiverToSearch, ) { - return __objc_msgSend_295( + return __objc_msgSend_230( obj, sel, - indexes, - objects, + searchSet, + mask, + rangeOfReceiverToSearch, ); } - late final __objc_msgSend_295Ptr = _lookup< + late final __objc_msgSend_230Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - late final _sel_setObject_atIndexedSubscript_1 = - _registerName1("setObject:atIndexedSubscript:"); - late final _sel_sortUsingComparator_1 = - _registerName1("sortUsingComparator:"); - void _objc_msgSend_296( + late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = + _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); + NSRange _objc_msgSend_231( ffi.Pointer obj, ffi.Pointer sel, - NSComparator cmptr, + int index, ) { - return __objc_msgSend_296( + return __objc_msgSend_231( obj, sel, - cmptr, + index, ); } - late final __objc_msgSend_296Ptr = _lookup< + late final __objc_msgSend_231Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, NSComparator)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_sortWithOptions_usingComparator_1 = - _registerName1("sortWithOptions:usingComparator:"); - void _objc_msgSend_297( + late final _sel_rangeOfComposedCharacterSequencesForRange_1 = + _registerName1("rangeOfComposedCharacterSequencesForRange:"); + NSRange _objc_msgSend_232( ffi.Pointer obj, ffi.Pointer sel, - int opts, - NSComparator cmptr, + NSRange range, ) { - return __objc_msgSend_297( + return __objc_msgSend_232( obj, sel, - opts, - cmptr, + range, ); } - late final __objc_msgSend_297Ptr = _lookup< + late final __objc_msgSend_232Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, int, NSComparator)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< + NSRange Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); - ffi.Pointer _objc_msgSend_298( + late final _sel_stringByAppendingString_1 = + _registerName1("stringByAppendingString:"); + late final _sel_stringByAppendingFormat_1 = + _registerName1("stringByAppendingFormat:"); + late final _sel_uppercaseString1 = _registerName1("uppercaseString"); + late final _sel_lowercaseString1 = _registerName1("lowercaseString"); + late final _sel_capitalizedString1 = _registerName1("capitalizedString"); + late final _sel_localizedUppercaseString1 = + _registerName1("localizedUppercaseString"); + late final _sel_localizedLowercaseString1 = + _registerName1("localizedLowercaseString"); + late final _sel_localizedCapitalizedString1 = + _registerName1("localizedCapitalizedString"); + late final _sel_uppercaseStringWithLocale_1 = + _registerName1("uppercaseStringWithLocale:"); + ffi.Pointer _objc_msgSend_233( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer locale, ) { - return __objc_msgSend_298( + return __objc_msgSend_233( obj, sel, - path, + locale, ); } - late final __objc_msgSend_298Ptr = _lookup< + late final __objc_msgSend_233Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< + late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_299( + late final _sel_lowercaseStringWithLocale_1 = + _registerName1("lowercaseStringWithLocale:"); + late final _sel_capitalizedStringWithLocale_1 = + _registerName1("capitalizedStringWithLocale:"); + late final _sel_getLineStart_end_contentsEnd_forRange_1 = + _registerName1("getLineStart:end:contentsEnd:forRange:"); + void _objc_msgSend_234( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range, ) { - return __objc_msgSend_299( + return __objc_msgSend_234( obj, sel, - url, + startPtr, + lineEndPtr, + contentsEndPtr, + range, ); } - late final __objc_msgSend_299Ptr = _lookup< + late final __objc_msgSend_234Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange)>(); - late final _sel_applyDifference_1 = _registerName1("applyDifference:"); - void _objc_msgSend_300( + late final _sel_lineRangeForRange_1 = _registerName1("lineRangeForRange:"); + late final _sel_getParagraphStart_end_contentsEnd_forRange_1 = + _registerName1("getParagraphStart:end:contentsEnd:forRange:"); + late final _sel_paragraphRangeForRange_1 = + _registerName1("paragraphRangeForRange:"); + late final _sel_enumerateSubstringsInRange_options_usingBlock_1 = + _registerName1("enumerateSubstringsInRange:options:usingBlock:"); + void _objc_msgSend_235( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer difference, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_300( + return __objc_msgSend_235( obj, sel, - difference, + range, + opts, + block, ); } - late final __objc_msgSend_300Ptr = _lookup< + late final __objc_msgSend_235Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _class_NSMutableData1 = _getClass1("NSMutableData"); - late final _sel_mutableBytes1 = _registerName1("mutableBytes"); - late final _sel_setLength_1 = _registerName1("setLength:"); - void _objc_msgSend_301( + late final _sel_enumerateLinesUsingBlock_1 = + _registerName1("enumerateLinesUsingBlock:"); + void _objc_msgSend_236( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_301( + return __objc_msgSend_236( obj, sel, - value, + block, ); } - late final __objc_msgSend_301Ptr = _lookup< + late final __objc_msgSend_236Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); - late final _sel_appendData_1 = _registerName1("appendData:"); - void _objc_msgSend_302( + late final _sel_UTF8String1 = _registerName1("UTF8String"); + late final _sel_fastestEncoding1 = _registerName1("fastestEncoding"); + late final _sel_smallestEncoding1 = _registerName1("smallestEncoding"); + late final _sel_dataUsingEncoding_allowLossyConversion_1 = + _registerName1("dataUsingEncoding:allowLossyConversion:"); + ffi.Pointer _objc_msgSend_237( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, + int encoding, + bool lossy, ) { - return __objc_msgSend_302( + return __objc_msgSend_237( obj, sel, - other, + encoding, + lossy, ); } - late final __objc_msgSend_302Ptr = _lookup< + late final __objc_msgSend_237Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSStringEncoding, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, bool)>(); - late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); - late final _sel_replaceBytesInRange_withBytes_1 = - _registerName1("replaceBytesInRange:withBytes:"); - void _objc_msgSend_303( + late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); + ffi.Pointer _objc_msgSend_238( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer bytes, + int encoding, ) { - return __objc_msgSend_303( + return __objc_msgSend_238( obj, sel, - range, - bytes, + encoding, ); } - late final __objc_msgSend_303Ptr = _lookup< + late final __objc_msgSend_238Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); - late final _sel_setData_1 = _registerName1("setData:"); - late final _sel_replaceBytesInRange_withBytes_length_1 = - _registerName1("replaceBytesInRange:withBytes:length:"); - void _objc_msgSend_304( + late final _sel_canBeConvertedToEncoding_1 = + _registerName1("canBeConvertedToEncoding:"); + late final _sel_cStringUsingEncoding_1 = + _registerName1("cStringUsingEncoding:"); + ffi.Pointer _objc_msgSend_239( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer replacementBytes, - int replacementLength, + int encoding, ) { - return __objc_msgSend_304( + return __objc_msgSend_239( obj, sel, - range, - replacementBytes, - replacementLength, + encoding, ); } - late final __objc_msgSend_304Ptr = _lookup< + late final __objc_msgSend_239Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); - late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); - late final _sel_initWithLength_1 = _registerName1("initWithLength:"); - late final _sel_decompressUsingAlgorithm_error_1 = - _registerName1("decompressUsingAlgorithm:error:"); - bool _objc_msgSend_305( + late final _sel_getCString_maxLength_encoding_1 = + _registerName1("getCString:maxLength:encoding:"); + bool _objc_msgSend_240( ffi.Pointer obj, ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, + ffi.Pointer buffer, + int maxBufferCount, + int encoding, ) { - return __objc_msgSend_305( + return __objc_msgSend_240( obj, sel, - algorithm, - error, + buffer, + maxBufferCount, + encoding, ); } - late final __objc_msgSend_305Ptr = _lookup< + late final __objc_msgSend_240Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); + ffi.Pointer, + NSUInteger, + NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - late final _sel_compressUsingAlgorithm_error_1 = - _registerName1("compressUsingAlgorithm:error:"); - late final _class_NSPurgeableData1 = _getClass1("NSPurgeableData"); - late final _class_NSMutableDictionary1 = _getClass1("NSMutableDictionary"); - late final _sel_removeObjectForKey_1 = _registerName1("removeObjectForKey:"); - late final _sel_setObject_forKey_1 = _registerName1("setObject:forKey:"); - void _objc_msgSend_306( + late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1 = + _registerName1( + "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); + bool _objc_msgSend_241( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - ffi.Pointer aKey, + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, + NSRange range, + NSRangePointer leftover, ) { - return __objc_msgSend_306( + return __objc_msgSend_241( obj, sel, - anObject, - aKey, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, + range, + leftover, ); } - late final __objc_msgSend_306Ptr = _lookup< + late final __objc_msgSend_241Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, + NSUInteger, + ffi.Pointer, + NSStringEncoding, + ffi.Int32, + NSRange, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + int, + int, + NSRange, + NSRangePointer)>(); - late final _sel_addEntriesFromDictionary_1 = - _registerName1("addEntriesFromDictionary:"); - void _objc_msgSend_307( + late final _sel_maximumLengthOfBytesUsingEncoding_1 = + _registerName1("maximumLengthOfBytesUsingEncoding:"); + late final _sel_lengthOfBytesUsingEncoding_1 = + _registerName1("lengthOfBytesUsingEncoding:"); + late final _sel_availableStringEncodings1 = + _registerName1("availableStringEncodings"); + ffi.Pointer _objc_msgSend_242( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherDictionary, ) { - return __objc_msgSend_307( + return __objc_msgSend_242( obj, sel, - otherDictionary, ); } - late final __objc_msgSend_307Ptr = _lookup< + late final __objc_msgSend_242Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_removeObjectsForKeys_1 = - _registerName1("removeObjectsForKeys:"); - late final _sel_setDictionary_1 = _registerName1("setDictionary:"); - late final _sel_setObject_forKeyedSubscript_1 = - _registerName1("setObject:forKeyedSubscript:"); - late final _sel_dictionaryWithCapacity_1 = - _registerName1("dictionaryWithCapacity:"); - ffi.Pointer _objc_msgSend_308( + late final _sel_localizedNameOfStringEncoding_1 = + _registerName1("localizedNameOfStringEncoding:"); + late final _sel_defaultCStringEncoding1 = + _registerName1("defaultCStringEncoding"); + late final _sel_decomposedStringWithCanonicalMapping1 = + _registerName1("decomposedStringWithCanonicalMapping"); + late final _sel_precomposedStringWithCanonicalMapping1 = + _registerName1("precomposedStringWithCanonicalMapping"); + late final _sel_decomposedStringWithCompatibilityMapping1 = + _registerName1("decomposedStringWithCompatibilityMapping"); + late final _sel_precomposedStringWithCompatibilityMapping1 = + _registerName1("precomposedStringWithCompatibilityMapping"); + late final _sel_componentsSeparatedByString_1 = + _registerName1("componentsSeparatedByString:"); + late final _sel_componentsSeparatedByCharactersInSet_1 = + _registerName1("componentsSeparatedByCharactersInSet:"); + ffi.Pointer _objc_msgSend_243( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer separator, ) { - return __objc_msgSend_308( + return __objc_msgSend_243( obj, sel, - path, + separator, ); } - late final __objc_msgSend_308Ptr = _lookup< + late final __objc_msgSend_243Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< + late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_309( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + late final _sel_stringByTrimmingCharactersInSet_1 = + _registerName1("stringByTrimmingCharactersInSet:"); + ffi.Pointer _objc_msgSend_244( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer set1, ) { - return __objc_msgSend_309( + return __objc_msgSend_244( obj, sel, - url, + set1, ); } - late final __objc_msgSend_309Ptr = _lookup< + late final __objc_msgSend_244Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< + late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_dictionaryWithSharedKeySet_1 = - _registerName1("dictionaryWithSharedKeySet:"); - ffi.Pointer _objc_msgSend_310( + late final _sel_stringByPaddingToLength_withString_startingAtIndex_1 = + _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); + ffi.Pointer _objc_msgSend_245( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keyset, + int newLength, + ffi.Pointer padString, + int padIndex, ) { - return __objc_msgSend_310( + return __objc_msgSend_245( obj, sel, - keyset, + newLength, + padString, + padIndex, ); } - late final __objc_msgSend_310Ptr = _lookup< + late final __objc_msgSend_245Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, int, ffi.Pointer, int)>(); - late final _class_NSNotification1 = _getClass1("NSNotification"); - late final _sel_name1 = _registerName1("name"); - late final _sel_initWithName_object_userInfo_1 = - _registerName1("initWithName:object:userInfo:"); - instancetype _objc_msgSend_311( + late final _sel_stringByFoldingWithOptions_locale_1 = + _registerName1("stringByFoldingWithOptions:locale:"); + ffi.Pointer _objc_msgSend_246( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName name, - ffi.Pointer object, - ffi.Pointer userInfo, + int options, + ffi.Pointer locale, ) { - return __objc_msgSend_311( + return __objc_msgSend_246( obj, sel, - name, - object, - userInfo, + options, + locale, ); } - late final __objc_msgSend_311Ptr = _lookup< + late final __objc_msgSend_246Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - NSNotificationName, - ffi.Pointer, + ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); - late final _sel_notificationWithName_object_1 = - _registerName1("notificationWithName:object:"); - late final _sel_notificationWithName_object_userInfo_1 = - _registerName1("notificationWithName:object:userInfo:"); - late final _class_NSNotificationCenter1 = _getClass1("NSNotificationCenter"); - late final _sel_defaultCenter1 = _registerName1("defaultCenter"); - ffi.Pointer _objc_msgSend_312( + late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_1 = + _registerName1( + "stringByReplacingOccurrencesOfString:withString:options:range:"); + ffi.Pointer _objc_msgSend_247( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer replacement, + int options, + NSRange searchRange, ) { - return __objc_msgSend_312( + return __objc_msgSend_247( obj, sel, + target, + replacement, + options, + searchRange, ); } - late final __objc_msgSend_312Ptr = _lookup< + late final __objc_msgSend_247Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + NSRange)>(); - late final _sel_addObserver_selector_name_object_1 = - _registerName1("addObserver:selector:name:object:"); - void _objc_msgSend_313( + late final _sel_stringByReplacingOccurrencesOfString_withString_1 = + _registerName1("stringByReplacingOccurrencesOfString:withString:"); + ffi.Pointer _objc_msgSend_248( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer aSelector, - NSNotificationName aName, - ffi.Pointer anObject, + ffi.Pointer target, + ffi.Pointer replacement, ) { - return __objc_msgSend_313( + return __objc_msgSend_248( obj, sel, - observer, - aSelector, - aName, - anObject, + target, + replacement, ); } - late final __objc_msgSend_313Ptr = _lookup< + late final __objc_msgSend_248Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSNotificationName, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< - void Function( + late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSNotificationName, ffi.Pointer)>(); - late final _sel_postNotification_1 = _registerName1("postNotification:"); - void _objc_msgSend_314( + late final _sel_stringByReplacingCharactersInRange_withString_1 = + _registerName1("stringByReplacingCharactersInRange:withString:"); + ffi.Pointer _objc_msgSend_249( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer notification, + NSRange range, + ffi.Pointer replacement, ) { - return __objc_msgSend_314( + return __objc_msgSend_249( obj, sel, - notification, + range, + replacement, ); } - late final __objc_msgSend_314Ptr = _lookup< + late final __objc_msgSend_249Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange, ffi.Pointer)>(); - late final _sel_postNotificationName_object_1 = - _registerName1("postNotificationName:object:"); - void _objc_msgSend_315( + late final _sel_stringByApplyingTransform_reverse_1 = + _registerName1("stringByApplyingTransform:reverse:"); + ffi.Pointer _objc_msgSend_250( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName aName, - ffi.Pointer anObject, + NSStringTransform transform, + bool reverse, ) { - return __objc_msgSend_315( + return __objc_msgSend_250( obj, sel, - aName, - anObject, + transform, + reverse, ); } - late final __objc_msgSend_315Ptr = _lookup< + late final __objc_msgSend_250Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSStringTransform, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringTransform, bool)>(); - late final _sel_postNotificationName_object_userInfo_1 = - _registerName1("postNotificationName:object:userInfo:"); - void _objc_msgSend_316( + late final _sel_writeToURL_atomically_encoding_error_1 = + _registerName1("writeToURL:atomically:encoding:error:"); + bool _objc_msgSend_251( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName aName, - ffi.Pointer anObject, - ffi.Pointer aUserInfo, + ffi.Pointer url, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_316( + return __objc_msgSend_251( obj, sel, - aName, - anObject, - aUserInfo, + url, + useAuxiliaryFile, + enc, + error, ); } - late final __objc_msgSend_316Ptr = _lookup< + late final __objc_msgSend_251Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< - void Function( + ffi.Bool, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< + bool Function( ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer, - ffi.Pointer)>(); + bool, + int, + ffi.Pointer>)>(); - late final _sel_removeObserver_1 = _registerName1("removeObserver:"); - late final _sel_removeObserver_name_object_1 = - _registerName1("removeObserver:name:object:"); - void _objc_msgSend_317( + late final _sel_writeToFile_atomically_encoding_error_1 = + _registerName1("writeToFile:atomically:encoding:error:"); + bool _objc_msgSend_252( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer observer, - NSNotificationName aName, - ffi.Pointer anObject, + ffi.Pointer path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_317( + return __objc_msgSend_252( obj, sel, - observer, - aName, - anObject, + path, + useAuxiliaryFile, + enc, + error, ); } - late final __objc_msgSend_317Ptr = _lookup< + late final __objc_msgSend_252Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSNotificationName, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< - void Function( + ffi.Bool, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSNotificationName, - ffi.Pointer)>(); + bool, + int, + ffi.Pointer>)>(); - late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); - late final _class_NSProgress1 = _getClass1("NSProgress"); - late final _sel_currentProgress1 = _registerName1("currentProgress"); - ffi.Pointer _objc_msgSend_318( + late final _sel_initWithCharactersNoCopy_length_freeWhenDone_1 = + _registerName1("initWithCharactersNoCopy:length:freeWhenDone:"); + instancetype _objc_msgSend_253( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer characters, + int length, + bool freeBuffer, ) { - return __objc_msgSend_318( + return __objc_msgSend_253( obj, sel, + characters, + length, + freeBuffer, ); } - late final __objc_msgSend_318Ptr = _lookup< + late final __objc_msgSend_253Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, bool)>(); - late final _sel_progressWithTotalUnitCount_1 = - _registerName1("progressWithTotalUnitCount:"); - ffi.Pointer _objc_msgSend_319( + late final _sel_initWithCharactersNoCopy_length_deallocator_1 = + _registerName1("initWithCharactersNoCopy:length:deallocator:"); + instancetype _objc_msgSend_254( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, + ffi.Pointer chars, + int len, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_319( + return __objc_msgSend_254( obj, sel, - unitCount, + chars, + len, + deallocator, ); } - late final __objc_msgSend_319Ptr = _lookup< + late final __objc_msgSend_254Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_discreteProgressWithTotalUnitCount_1 = - _registerName1("discreteProgressWithTotalUnitCount:"); - late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = - _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); - ffi.Pointer _objc_msgSend_320( + late final _sel_initWithCharacters_length_1 = + _registerName1("initWithCharacters:length:"); + instancetype _objc_msgSend_255( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, - ffi.Pointer parent, - int portionOfParentTotalUnitCount, + ffi.Pointer characters, + int length, ) { - return __objc_msgSend_320( + return __objc_msgSend_255( obj, sel, - unitCount, - parent, - portionOfParentTotalUnitCount, + characters, + length, ); } - late final __objc_msgSend_320Ptr = _lookup< + late final __objc_msgSend_255Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_initWithParent_userInfo_1 = - _registerName1("initWithParent:userInfo:"); - instancetype _objc_msgSend_321( + late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); + instancetype _objc_msgSend_256( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer parentProgressOrNil, - ffi.Pointer userInfoOrNil, + ffi.Pointer nullTerminatedCString, ) { - return __objc_msgSend_321( + return __objc_msgSend_256( obj, sel, - parentProgressOrNil, - userInfoOrNil, + nullTerminatedCString, ); } - late final __objc_msgSend_321Ptr = _lookup< + late final __objc_msgSend_256Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer)>(); - late final _sel_becomeCurrentWithPendingUnitCount_1 = - _registerName1("becomeCurrentWithPendingUnitCount:"); - void _objc_msgSend_322( + late final _sel_initWithFormat_1 = _registerName1("initWithFormat:"); + late final _sel_initWithFormat_arguments_1 = + _registerName1("initWithFormat:arguments:"); + instancetype _objc_msgSend_257( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, + ffi.Pointer format, + va_list argList, ) { - return __objc_msgSend_322( + return __objc_msgSend_257( obj, sel, - unitCount, + format, + argList, ); } - late final __objc_msgSend_322Ptr = _lookup< + late final __objc_msgSend_257Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, va_list)>>('objc_msgSend'); + late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, va_list)>(); - late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = - _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); - void _objc_msgSend_323( + late final _sel_initWithFormat_locale_1 = + _registerName1("initWithFormat:locale:"); + instancetype _objc_msgSend_258( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, - ffi.Pointer<_ObjCBlock> work, + ffi.Pointer format, + ffi.Pointer locale, ) { - return __objc_msgSend_323( + return __objc_msgSend_258( obj, sel, - unitCount, - work, + format, + locale, ); } - late final __objc_msgSend_323Ptr = _lookup< + late final __objc_msgSend_258Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_resignCurrent1 = _registerName1("resignCurrent"); - late final _sel_addChild_withPendingUnitCount_1 = - _registerName1("addChild:withPendingUnitCount:"); - void _objc_msgSend_324( + late final _sel_initWithFormat_locale_arguments_1 = + _registerName1("initWithFormat:locale:arguments:"); + instancetype _objc_msgSend_259( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer child, - int inUnitCount, + ffi.Pointer format, + ffi.Pointer locale, + va_list argList, ) { - return __objc_msgSend_324( + return __objc_msgSend_259( obj, sel, - child, - inUnitCount, + format, + locale, + argList, ); } - late final __objc_msgSend_324Ptr = _lookup< + late final __objc_msgSend_259Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + va_list)>>('objc_msgSend'); + late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, va_list)>(); - late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); - int _objc_msgSend_325( + late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_1 = + _registerName1("initWithValidatedFormat:validFormatSpecifiers:error:"); + instancetype _objc_msgSend_260( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer> error, ) { - return __objc_msgSend_325( + return __objc_msgSend_260( obj, sel, + format, + validFormatSpecifiers, + error, ); } - late final __objc_msgSend_325Ptr = _lookup< + late final __objc_msgSend_260Ptr = _lookup< ffi.NativeFunction< - ffi.Int64 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); - void _objc_msgSend_326( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_326( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_326Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); - late final _sel_setCompletedUnitCount_1 = - _registerName1("setCompletedUnitCount:"); - late final _sel_setLocalizedDescription_1 = - _registerName1("setLocalizedDescription:"); - void _objc_msgSend_327( + late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1 = + _registerName1( + "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); + instancetype _objc_msgSend_261( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer locale, + ffi.Pointer> error, ) { - return __objc_msgSend_327( + return __objc_msgSend_261( obj, sel, - value, + format, + validFormatSpecifiers, + locale, + error, ); } - late final __objc_msgSend_327Ptr = _lookup< + late final __objc_msgSend_261Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_localizedAdditionalDescription1 = - _registerName1("localizedAdditionalDescription"); - late final _sel_setLocalizedAdditionalDescription_1 = - _registerName1("setLocalizedAdditionalDescription:"); - late final _sel_isCancellable1 = _registerName1("isCancellable"); - late final _sel_setCancellable_1 = _registerName1("setCancellable:"); - void _objc_msgSend_328( + late final _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1 = + _registerName1( + "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); + instancetype _objc_msgSend_262( ffi.Pointer obj, ffi.Pointer sel, - bool value, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + va_list argList, + ffi.Pointer> error, ) { - return __objc_msgSend_328( + return __objc_msgSend_262( obj, sel, - value, + format, + validFormatSpecifiers, + argList, + error, ); } - late final __objc_msgSend_328Ptr = _lookup< + late final __objc_msgSend_262Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, bool)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + va_list, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + va_list, + ffi.Pointer>)>(); - late final _sel_isPausable1 = _registerName1("isPausable"); - late final _sel_setPausable_1 = _registerName1("setPausable:"); - late final _sel_isCancelled1 = _registerName1("isCancelled"); - late final _sel_isPaused1 = _registerName1("isPaused"); - late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_329( + late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1 = + _registerName1( + "initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:"); + instancetype _objc_msgSend_263( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer locale, + va_list argList, + ffi.Pointer> error, ) { - return __objc_msgSend_329( + return __objc_msgSend_263( obj, sel, + format, + validFormatSpecifiers, + locale, + argList, + error, ); } - late final __objc_msgSend_329Ptr = _lookup< + late final __objc_msgSend_263Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + va_list, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + va_list, + ffi.Pointer>)>(); - late final _sel_setCancellationHandler_1 = - _registerName1("setCancellationHandler:"); - void _objc_msgSend_330( + late final _sel_initWithData_encoding_1 = + _registerName1("initWithData:encoding:"); + instancetype _objc_msgSend_264( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, + ffi.Pointer data, + int encoding, ) { - return __objc_msgSend_330( + return __objc_msgSend_264( obj, sel, - value, + data, + encoding, ); } - late final __objc_msgSend_330Ptr = _lookup< + late final __objc_msgSend_264Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_pausingHandler1 = _registerName1("pausingHandler"); - late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); - late final _sel_resumingHandler1 = _registerName1("resumingHandler"); - late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); - late final _sel_setUserInfoObject_forKey_1 = - _registerName1("setUserInfoObject:forKey:"); - late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); - late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); - late final _sel_isFinished1 = _registerName1("isFinished"); - late final _sel_cancel1 = _registerName1("cancel"); - late final _sel_pause1 = _registerName1("pause"); - late final _sel_resume1 = _registerName1("resume"); - late final _sel_kind1 = _registerName1("kind"); - late final _sel_setKind_1 = _registerName1("setKind:"); - late final _sel_estimatedTimeRemaining1 = - _registerName1("estimatedTimeRemaining"); - late final _sel_setEstimatedTimeRemaining_1 = - _registerName1("setEstimatedTimeRemaining:"); - void _objc_msgSend_331( + late final _sel_initWithBytes_length_encoding_1 = + _registerName1("initWithBytes:length:encoding:"); + instancetype _objc_msgSend_265( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer bytes, + int len, + int encoding, ) { - return __objc_msgSend_331( + return __objc_msgSend_265( obj, sel, - value, + bytes, + len, + encoding, ); } - late final __objc_msgSend_331Ptr = _lookup< + late final __objc_msgSend_265Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - late final _sel_throughput1 = _registerName1("throughput"); - late final _sel_setThroughput_1 = _registerName1("setThroughput:"); - late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); - late final _sel_setFileOperationKind_1 = - _registerName1("setFileOperationKind:"); - late final _sel_fileURL1 = _registerName1("fileURL"); - late final _sel_setFileURL_1 = _registerName1("setFileURL:"); - void _objc_msgSend_332( + late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = + _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); + instancetype _objc_msgSend_266( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer bytes, + int len, + int encoding, + bool freeBuffer, ) { - return __objc_msgSend_332( + return __objc_msgSend_266( obj, sel, - value, + bytes, + len, + encoding, + freeBuffer, ); } - late final __objc_msgSend_332Ptr = _lookup< + late final __objc_msgSend_266Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSStringEncoding, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, bool)>(); - late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); - late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); - late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); - late final _sel_setFileCompletedCount_1 = - _registerName1("setFileCompletedCount:"); - late final _sel_publish1 = _registerName1("publish"); - late final _sel_unpublish1 = _registerName1("unpublish"); - late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = - _registerName1("addSubscriberForFileURL:withPublishingHandler:"); - ffi.Pointer _objc_msgSend_333( + late final _sel_initWithBytesNoCopy_length_encoding_deallocator_1 = + _registerName1("initWithBytesNoCopy:length:encoding:deallocator:"); + instancetype _objc_msgSend_267( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - NSProgressPublishingHandler publishingHandler, + ffi.Pointer bytes, + int len, + int encoding, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_333( + return __objc_msgSend_267( obj, sel, - url, - publishingHandler, + bytes, + len, + encoding, + deallocator, ); } - late final __objc_msgSend_333Ptr = _lookup< + late final __objc_msgSend_267Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>>('objc_msgSend'); - late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>(); + ffi.Pointer, + NSUInteger, + NSStringEncoding, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); - late final _sel_isOld1 = _registerName1("isOld"); - late final _sel_progress1 = _registerName1("progress"); - late final _class_NSOperation1 = _getClass1("NSOperation"); - late final _sel_start1 = _registerName1("start"); - late final _sel_main1 = _registerName1("main"); - late final _sel_isExecuting1 = _registerName1("isExecuting"); - late final _sel_isConcurrent1 = _registerName1("isConcurrent"); - late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); - late final _sel_isReady1 = _registerName1("isReady"); - late final _sel_addDependency_1 = _registerName1("addDependency:"); - void _objc_msgSend_334( + late final _sel_string1 = _registerName1("string"); + late final _sel_stringWithString_1 = _registerName1("stringWithString:"); + late final _sel_stringWithCharacters_length_1 = + _registerName1("stringWithCharacters:length:"); + late final _sel_stringWithUTF8String_1 = + _registerName1("stringWithUTF8String:"); + late final _sel_stringWithFormat_1 = _registerName1("stringWithFormat:"); + late final _sel_localizedStringWithFormat_1 = + _registerName1("localizedStringWithFormat:"); + late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_1 = + _registerName1("stringWithValidatedFormat:validFormatSpecifiers:error:"); + late final _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1 = + _registerName1( + "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); + late final _sel_initWithCString_encoding_1 = + _registerName1("initWithCString:encoding:"); + instancetype _objc_msgSend_268( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer op, + ffi.Pointer nullTerminatedCString, + int encoding, ) { - return __objc_msgSend_334( + return __objc_msgSend_268( obj, sel, - op, + nullTerminatedCString, + encoding, ); } - late final __objc_msgSend_334Ptr = _lookup< + late final __objc_msgSend_268Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_removeDependency_1 = _registerName1("removeDependency:"); - late final _sel_dependencies1 = _registerName1("dependencies"); - late final _sel_queuePriority1 = _registerName1("queuePriority"); - int _objc_msgSend_335( + late final _sel_stringWithCString_encoding_1 = + _registerName1("stringWithCString:encoding:"); + late final _sel_initWithContentsOfURL_encoding_error_1 = + _registerName1("initWithContentsOfURL:encoding:error:"); + instancetype _objc_msgSend_269( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer url, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_335( + return __objc_msgSend_269( obj, sel, + url, + enc, + error, ); } - late final __objc_msgSend_335Ptr = _lookup< + late final __objc_msgSend_269Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); - void _objc_msgSend_336( + late final _sel_initWithContentsOfFile_encoding_error_1 = + _registerName1("initWithContentsOfFile:encoding:error:"); + instancetype _objc_msgSend_270( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer path, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_336( + return __objc_msgSend_270( obj, sel, - value, + path, + enc, + error, ); } - late final __objc_msgSend_336Ptr = _lookup< + late final __objc_msgSend_270Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_completionBlock1 = _registerName1("completionBlock"); - late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); - late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); - late final _sel_threadPriority1 = _registerName1("threadPriority"); - late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); - void _objc_msgSend_337( + late final _sel_stringWithContentsOfURL_encoding_error_1 = + _registerName1("stringWithContentsOfURL:encoding:error:"); + late final _sel_stringWithContentsOfFile_encoding_error_1 = + _registerName1("stringWithContentsOfFile:encoding:error:"); + late final _sel_initWithContentsOfURL_usedEncoding_error_1 = + _registerName1("initWithContentsOfURL:usedEncoding:error:"); + instancetype _objc_msgSend_271( ffi.Pointer obj, ffi.Pointer sel, - double value, + ffi.Pointer url, + ffi.Pointer enc, + ffi.Pointer> error, ) { - return __objc_msgSend_337( + return __objc_msgSend_271( obj, sel, - value, + url, + enc, + error, ); } - late final __objc_msgSend_337Ptr = _lookup< + late final __objc_msgSend_271Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_qualityOfService1 = _registerName1("qualityOfService"); - int _objc_msgSend_338( + late final _sel_initWithContentsOfFile_usedEncoding_error_1 = + _registerName1("initWithContentsOfFile:usedEncoding:error:"); + instancetype _objc_msgSend_272( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer enc, + ffi.Pointer> error, ) { - return __objc_msgSend_338( + return __objc_msgSend_272( obj, sel, + path, + enc, + error, ); } - late final __objc_msgSend_338Ptr = _lookup< + late final __objc_msgSend_272Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_setQualityOfService_1 = - _registerName1("setQualityOfService:"); - void _objc_msgSend_339( + late final _sel_stringWithContentsOfURL_usedEncoding_error_1 = + _registerName1("stringWithContentsOfURL:usedEncoding:error:"); + late final _sel_stringWithContentsOfFile_usedEncoding_error_1 = + _registerName1("stringWithContentsOfFile:usedEncoding:error:"); + late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1 = + _registerName1( + "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); + int _objc_msgSend_273( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer data, + ffi.Pointer opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion, ) { - return __objc_msgSend_339( + return __objc_msgSend_273( obj, sel, - value, + data, + opts, + string, + usedLossyConversion, ); } - late final __objc_msgSend_339Ptr = _lookup< + late final __objc_msgSend_273Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setName_1 = _registerName1("setName:"); - late final _sel_addOperation_1 = _registerName1("addOperation:"); - late final _sel_addOperations_waitUntilFinished_1 = - _registerName1("addOperations:waitUntilFinished:"); - void _objc_msgSend_340( + NSStringEncoding Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); + + late final _sel_propertyList1 = _registerName1("propertyList"); + late final _sel_propertyListFromStringsFileFormat1 = + _registerName1("propertyListFromStringsFileFormat"); + late final _sel_cString1 = _registerName1("cString"); + late final _sel_lossyCString1 = _registerName1("lossyCString"); + late final _sel_cStringLength1 = _registerName1("cStringLength"); + late final _sel_getCString_1 = _registerName1("getCString:"); + void _objc_msgSend_274( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer ops, - bool wait, + ffi.Pointer bytes, ) { - return __objc_msgSend_340( + return __objc_msgSend_274( obj, sel, - ops, - wait, + bytes, ); } - late final __objc_msgSend_340Ptr = _lookup< + late final __objc_msgSend_274Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer)>(); - late final _sel_addOperationWithBlock_1 = - _registerName1("addOperationWithBlock:"); - void _objc_msgSend_341( + late final _sel_getCString_maxLength_1 = + _registerName1("getCString:maxLength:"); + void _objc_msgSend_275( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer bytes, + int maxLength, ) { - return __objc_msgSend_341( + return __objc_msgSend_275( obj, sel, - block, + bytes, + maxLength, ); } - late final __objc_msgSend_341Ptr = _lookup< + late final __objc_msgSend_275Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, int)>(); - late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); - late final _sel_maxConcurrentOperationCount1 = - _registerName1("maxConcurrentOperationCount"); - late final _sel_setMaxConcurrentOperationCount_1 = - _registerName1("setMaxConcurrentOperationCount:"); - void _objc_msgSend_342( + late final _sel_getCString_maxLength_range_remainingRange_1 = + _registerName1("getCString:maxLength:range:remainingRange:"); + void _objc_msgSend_276( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer bytes, + int maxLength, + NSRange aRange, + NSRangePointer leftoverRange, ) { - return __objc_msgSend_342( + return __objc_msgSend_276( obj, sel, - value, + bytes, + maxLength, + aRange, + leftoverRange, ); } - late final __objc_msgSend_342Ptr = _lookup< + late final __objc_msgSend_276Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSRange, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange, NSRangePointer)>(); - late final _sel_isSuspended1 = _registerName1("isSuspended"); - late final _sel_setSuspended_1 = _registerName1("setSuspended:"); - late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); - dispatch_queue_t _objc_msgSend_343( + late final _sel_stringWithContentsOfFile_1 = + _registerName1("stringWithContentsOfFile:"); + late final _sel_stringWithContentsOfURL_1 = + _registerName1("stringWithContentsOfURL:"); + late final _sel_initWithCStringNoCopy_length_freeWhenDone_1 = + _registerName1("initWithCStringNoCopy:length:freeWhenDone:"); + ffi.Pointer _objc_msgSend_277( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer bytes, + int length, + bool freeBuffer, ) { - return __objc_msgSend_343( + return __objc_msgSend_277( obj, sel, + bytes, + length, + freeBuffer, ); } - late final __objc_msgSend_343Ptr = _lookup< + late final __objc_msgSend_277Ptr = _lookup< ffi.NativeFunction< - dispatch_queue_t Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< - dispatch_queue_t Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, bool)>(); - late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); - void _objc_msgSend_344( + late final _sel_initWithCString_length_1 = + _registerName1("initWithCString:length:"); + late final _sel_initWithCString_1 = _registerName1("initWithCString:"); + late final _sel_stringWithCString_length_1 = + _registerName1("stringWithCString:length:"); + late final _sel_stringWithCString_1 = _registerName1("stringWithCString:"); + late final _sel_getCharacters_1 = _registerName1("getCharacters:"); + void _objc_msgSend_278( ffi.Pointer obj, ffi.Pointer sel, - dispatch_queue_t value, + ffi.Pointer buffer, ) { - return __objc_msgSend_344( + return __objc_msgSend_278( obj, sel, - value, + buffer, ); } - late final __objc_msgSend_344Ptr = _lookup< + late final __objc_msgSend_278Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - dispatch_queue_t)>>('objc_msgSend'); - late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); - late final _sel_waitUntilAllOperationsAreFinished1 = - _registerName1("waitUntilAllOperationsAreFinished"); - late final _sel_currentQueue1 = _registerName1("currentQueue"); - ffi.Pointer _objc_msgSend_345( + late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = + _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); + late final _sel_stringByRemovingPercentEncoding1 = + _registerName1("stringByRemovingPercentEncoding"); + late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = + _registerName1("stringByAddingPercentEscapesUsingEncoding:"); + late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = + _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); + late final _sel_debugDescription1 = _registerName1("debugDescription"); + late final _sel_version1 = _registerName1("version"); + late final _sel_setVersion_1 = _registerName1("setVersion:"); + void _objc_msgSend_279( ffi.Pointer obj, ffi.Pointer sel, + int aVersion, ) { - return __objc_msgSend_345( + return __objc_msgSend_279( obj, sel, + aVersion, ); } - late final __objc_msgSend_345Ptr = _lookup< + late final __objc_msgSend_279Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_mainQueue1 = _registerName1("mainQueue"); - late final _sel_operations1 = _registerName1("operations"); - late final _sel_operationCount1 = _registerName1("operationCount"); - late final _sel_addObserverForName_object_queue_usingBlock_1 = - _registerName1("addObserverForName:object:queue:usingBlock:"); - ffi.Pointer _objc_msgSend_346( + late final _sel_classForCoder1 = _registerName1("classForCoder"); + late final _sel_replacementObjectForCoder_1 = + _registerName1("replacementObjectForCoder:"); + late final _sel_awakeAfterUsingCoder_1 = + _registerName1("awakeAfterUsingCoder:"); + late final _sel_poseAsClass_1 = _registerName1("poseAsClass:"); + late final _sel_autoContentAccessingProxy1 = + _registerName1("autoContentAccessingProxy"); + late final _sel_URL_resourceDataDidBecomeAvailable_1 = + _registerName1("URL:resourceDataDidBecomeAvailable:"); + void _objc_msgSend_280( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName name, - ffi.Pointer obj1, - ffi.Pointer queue, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer sender, + ffi.Pointer newBytes, ) { - return __objc_msgSend_346( + return __objc_msgSend_280( obj, sel, - name, - obj1, - queue, - block, + sender, + newBytes, ); } - late final __objc_msgSend_346Ptr = _lookup< + late final __objc_msgSend_280Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSNotificationName, - ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final ffi.Pointer - _NSSystemClockDidChangeNotification = - _lookup('NSSystemClockDidChangeNotification'); - - NSNotificationName get NSSystemClockDidChangeNotification => - _NSSystemClockDidChangeNotification.value; - - set NSSystemClockDidChangeNotification(NSNotificationName value) => - _NSSystemClockDidChangeNotification.value = value; + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _class_NSDate1 = _getClass1("NSDate"); - late final _sel_timeIntervalSinceReferenceDate1 = - _registerName1("timeIntervalSinceReferenceDate"); - late final _sel_initWithTimeIntervalSinceReferenceDate_1 = - _registerName1("initWithTimeIntervalSinceReferenceDate:"); - instancetype _objc_msgSend_347( + late final _sel_URLResourceDidFinishLoading_1 = + _registerName1("URLResourceDidFinishLoading:"); + void _objc_msgSend_281( ffi.Pointer obj, ffi.Pointer sel, - double ti, + ffi.Pointer sender, ) { - return __objc_msgSend_347( + return __objc_msgSend_281( obj, sel, - ti, + sender, ); } - late final __objc_msgSend_347Ptr = _lookup< + late final __objc_msgSend_281Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, double)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_timeIntervalSinceDate_1 = - _registerName1("timeIntervalSinceDate:"); - double _objc_msgSend_348( + late final _sel_URLResourceDidCancelLoading_1 = + _registerName1("URLResourceDidCancelLoading:"); + late final _sel_URL_resourceDidFailLoadingWithReason_1 = + _registerName1("URL:resourceDidFailLoadingWithReason:"); + void _objc_msgSend_282( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anotherDate, + ffi.Pointer sender, + ffi.Pointer reason, ) { - return __objc_msgSend_348( + return __objc_msgSend_282( obj, sel, - anotherDate, + sender, + reason, ); } - late final __objc_msgSend_348Ptr = _lookup< + late final __objc_msgSend_282Ptr = _lookup< ffi.NativeFunction< - NSTimeInterval Function(ffi.Pointer, ffi.Pointer, + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_timeIntervalSinceNow1 = - _registerName1("timeIntervalSinceNow"); - late final _sel_timeIntervalSince19701 = - _registerName1("timeIntervalSince1970"); - late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); - late final _sel_dateByAddingTimeInterval_1 = - _registerName1("dateByAddingTimeInterval:"); - late final _sel_earlierDate_1 = _registerName1("earlierDate:"); - ffi.Pointer _objc_msgSend_349( + late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = + _registerName1( + "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); + void _objc_msgSend_283( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anotherDate, + ffi.Pointer error, + int recoveryOptionIndex, + ffi.Pointer delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo, ) { - return __objc_msgSend_349( + return __objc_msgSend_283( obj, sel, - anotherDate, + error, + recoveryOptionIndex, + delegate, + didRecoverSelector, + contextInfo, ); } - late final __objc_msgSend_349Ptr = _lookup< + late final __objc_msgSend_283Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_laterDate_1 = _registerName1("laterDate:"); - int _objc_msgSend_350( + late final _sel_attemptRecoveryFromError_optionIndex_1 = + _registerName1("attemptRecoveryFromError:optionIndex:"); + bool _objc_msgSend_284( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, + ffi.Pointer error, + int recoveryOptionIndex, ) { - return __objc_msgSend_350( + return __objc_msgSend_284( obj, sel, - other, + error, + recoveryOptionIndex, ); } - late final __objc_msgSend_350Ptr = _lookup< + late final __objc_msgSend_284Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); - bool _objc_msgSend_351( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDate, + late final ffi.Pointer _NSFoundationVersionNumber = + _lookup('NSFoundationVersionNumber'); + + double get NSFoundationVersionNumber => _NSFoundationVersionNumber.value; + + set NSFoundationVersionNumber(double value) => + _NSFoundationVersionNumber.value = value; + + ffi.Pointer NSStringFromSelector( + ffi.Pointer aSelector, ) { - return __objc_msgSend_351( - obj, - sel, - otherDate, + return _NSStringFromSelector( + aSelector, ); } - late final __objc_msgSend_351Ptr = _lookup< + late final _NSStringFromSelectorPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSStringFromSelector'); + late final _NSStringFromSelector = _NSStringFromSelectorPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_date1 = _registerName1("date"); - late final _sel_dateWithTimeIntervalSinceNow_1 = - _registerName1("dateWithTimeIntervalSinceNow:"); - late final _sel_dateWithTimeIntervalSinceReferenceDate_1 = - _registerName1("dateWithTimeIntervalSinceReferenceDate:"); - late final _sel_dateWithTimeIntervalSince1970_1 = - _registerName1("dateWithTimeIntervalSince1970:"); - late final _sel_dateWithTimeInterval_sinceDate_1 = - _registerName1("dateWithTimeInterval:sinceDate:"); - instancetype _objc_msgSend_352( - ffi.Pointer obj, - ffi.Pointer sel, - double secsToBeAdded, - ffi.Pointer date, + ffi.Pointer NSSelectorFromString( + ffi.Pointer aSelectorName, ) { - return __objc_msgSend_352( - obj, - sel, - secsToBeAdded, - date, + return _NSSelectorFromString( + aSelectorName, ); } - late final __objc_msgSend_352Ptr = _lookup< + late final _NSSelectorFromStringPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSTimeInterval, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - double, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSSelectorFromString'); + late final _NSSelectorFromString = _NSSelectorFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_distantFuture1 = _registerName1("distantFuture"); - ffi.Pointer _objc_msgSend_353( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSStringFromClass( + ffi.Pointer aClass, ) { - return __objc_msgSend_353( - obj, - sel, + return _NSStringFromClass( + aClass, ); } - late final __objc_msgSend_353Ptr = _lookup< + late final _NSStringFromClassPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer)>>('NSStringFromClass'); + late final _NSStringFromClass = _NSStringFromClassPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_distantPast1 = _registerName1("distantPast"); - late final _sel_now1 = _registerName1("now"); - late final _sel_initWithTimeIntervalSinceNow_1 = - _registerName1("initWithTimeIntervalSinceNow:"); - late final _sel_initWithTimeIntervalSince1970_1 = - _registerName1("initWithTimeIntervalSince1970:"); - late final _sel_initWithTimeInterval_sinceDate_1 = - _registerName1("initWithTimeInterval:sinceDate:"); - late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); - late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); - late final _sel_supportsSecureCoding1 = - _registerName1("supportsSecureCoding"); - late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = - _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); - instancetype _objc_msgSend_354( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - int cachePolicy, - double timeoutInterval, + ffi.Pointer NSClassFromString( + ffi.Pointer aClassName, ) { - return __objc_msgSend_354( - obj, - sel, - URL, - cachePolicy, - timeoutInterval, + return _NSClassFromString( + aClassName, ); } - late final __objc_msgSend_354Ptr = _lookup< + late final _NSClassFromStringPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, double)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSClassFromString'); + late final _NSClassFromString = _NSClassFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_initWithURL_1 = _registerName1("initWithURL:"); - late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = - _registerName1("initWithURL:cachePolicy:timeoutInterval:"); - late final _sel_URL1 = _registerName1("URL"); - late final _sel_cachePolicy1 = _registerName1("cachePolicy"); - int _objc_msgSend_355( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSStringFromProtocol( + ffi.Pointer proto, ) { - return __objc_msgSend_355( - obj, - sel, + return _NSStringFromProtocol( + proto, ); } - late final __objc_msgSend_355Ptr = _lookup< + late final _NSStringFromProtocolPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSStringFromProtocol'); + late final _NSStringFromProtocol = _NSStringFromProtocolPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); - late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); - late final _sel_networkServiceType1 = _registerName1("networkServiceType"); - int _objc_msgSend_356( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSProtocolFromString( + ffi.Pointer namestr, ) { - return __objc_msgSend_356( - obj, - sel, + return _NSProtocolFromString( + namestr, ); } - late final __objc_msgSend_356Ptr = _lookup< + late final _NSProtocolFromStringPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSProtocolFromString'); + late final _NSProtocolFromString = _NSProtocolFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_allowsCellularAccess1 = - _registerName1("allowsCellularAccess"); - late final _sel_allowsExpensiveNetworkAccess1 = - _registerName1("allowsExpensiveNetworkAccess"); - late final _sel_allowsConstrainedNetworkAccess1 = - _registerName1("allowsConstrainedNetworkAccess"); - late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); - late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); - late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); - late final _sel_valueForHTTPHeaderField_1 = - _registerName1("valueForHTTPHeaderField:"); - late final _sel_HTTPBody1 = _registerName1("HTTPBody"); - late final _class_NSInputStream1 = _getClass1("NSInputStream"); - late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); - ffi.Pointer _objc_msgSend_357( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSGetSizeAndAlignment( + ffi.Pointer typePtr, + ffi.Pointer sizep, + ffi.Pointer alignp, ) { - return __objc_msgSend_357( - obj, - sel, + return _NSGetSizeAndAlignment( + typePtr, + sizep, + alignp, ); } - late final __objc_msgSend_357Ptr = _lookup< + late final _NSGetSizeAndAlignmentPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('NSGetSizeAndAlignment'); + late final _NSGetSizeAndAlignment = _NSGetSizeAndAlignmentPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_HTTPShouldHandleCookies1 = - _registerName1("HTTPShouldHandleCookies"); - late final _sel_HTTPShouldUsePipelining1 = - _registerName1("HTTPShouldUsePipelining"); - late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); - late final _sel_setURL_1 = _registerName1("setURL:"); - late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); - void _objc_msgSend_358( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void NSLog( + ffi.Pointer format, ) { - return __objc_msgSend_358( - obj, - sel, - value, + return _NSLog( + format, ); } - late final __objc_msgSend_358Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _NSLogPtr = + _lookup)>>( + 'NSLog'); + late final _NSLog = + _NSLogPtr.asFunction)>(); - late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); - late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); - late final _sel_setNetworkServiceType_1 = - _registerName1("setNetworkServiceType:"); - void _objc_msgSend_359( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void NSLogv( + ffi.Pointer format, + va_list args, ) { - return __objc_msgSend_359( - obj, - sel, - value, + return _NSLogv( + format, + args, ); } - late final __objc_msgSend_359Ptr = _lookup< + late final _NSLogvPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, va_list)>>('NSLogv'); + late final _NSLogv = + _NSLogvPtr.asFunction, va_list)>(); - late final _sel_setAllowsCellularAccess_1 = - _registerName1("setAllowsCellularAccess:"); - late final _sel_setAllowsExpensiveNetworkAccess_1 = - _registerName1("setAllowsExpensiveNetworkAccess:"); - late final _sel_setAllowsConstrainedNetworkAccess_1 = - _registerName1("setAllowsConstrainedNetworkAccess:"); - late final _sel_setAssumesHTTP3Capable_1 = - _registerName1("setAssumesHTTP3Capable:"); - late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); - late final _sel_setAllHTTPHeaderFields_1 = - _registerName1("setAllHTTPHeaderFields:"); - void _objc_msgSend_360( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_360( - obj, - sel, - value, - ); - } + late final ffi.Pointer _NSNotFound = + _lookup('NSNotFound'); - late final __objc_msgSend_360Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + int get NSNotFound => _NSNotFound.value; - late final _sel_setValue_forHTTPHeaderField_1 = - _registerName1("setValue:forHTTPHeaderField:"); - void _objc_msgSend_361( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer field, + set NSNotFound(int value) => _NSNotFound.value = value; + + ffi.Pointer _Block_copy1( + ffi.Pointer aBlock, ) { - return __objc_msgSend_361( - obj, - sel, - value, - field, + return __Block_copy1( + aBlock, ); } - late final __objc_msgSend_361Ptr = _lookup< + late final __Block_copy1Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('_Block_copy'); + late final __Block_copy1 = __Block_copy1Ptr + .asFunction Function(ffi.Pointer)>(); - late final _sel_addValue_forHTTPHeaderField_1 = - _registerName1("addValue:forHTTPHeaderField:"); - late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); - void _objc_msgSend_362( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + void _Block_release1( + ffi.Pointer aBlock, ) { - return __objc_msgSend_362( - obj, - sel, - value, + return __Block_release1( + aBlock, ); } - late final __objc_msgSend_362Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final __Block_release1Ptr = + _lookup)>>( + '_Block_release'); + late final __Block_release1 = + __Block_release1Ptr.asFunction)>(); - late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); - void _objc_msgSend_363( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + void _Block_object_assign( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_363( - obj, - sel, - value, + return __Block_object_assign( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_363Ptr = _lookup< + late final __Block_object_assignPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('_Block_object_assign'); + late final __Block_object_assign = __Block_object_assignPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_setHTTPShouldHandleCookies_1 = - _registerName1("setHTTPShouldHandleCookies:"); - late final _sel_setHTTPShouldUsePipelining_1 = - _registerName1("setHTTPShouldUsePipelining:"); - late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); - late final _sel_sharedHTTPCookieStorage1 = - _registerName1("sharedHTTPCookieStorage"); - ffi.Pointer _objc_msgSend_364( - ffi.Pointer obj, - ffi.Pointer sel, + void _Block_object_dispose( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_364( - obj, - sel, + return __Block_object_dispose( + arg0, + arg1, ); } - late final __objc_msgSend_364Ptr = _lookup< + late final __Block_object_disposePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Int)>>('_Block_object_dispose'); + late final __Block_object_dispose = __Block_object_disposePtr + .asFunction, int)>(); - late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = - _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); - ffi.Pointer _objc_msgSend_365( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, - ) { - return __objc_msgSend_365( - obj, - sel, - identifier, - ); + late final ffi.Pointer>> + __NSConcreteGlobalBlock = + _lookup>>('_NSConcreteGlobalBlock'); + + ffi.Pointer> get _NSConcreteGlobalBlock => + __NSConcreteGlobalBlock.value; + + set _NSConcreteGlobalBlock(ffi.Pointer> value) => + __NSConcreteGlobalBlock.value = value; + + late final ffi.Pointer>> + __NSConcreteStackBlock = + _lookup>>('_NSConcreteStackBlock'); + + ffi.Pointer> get _NSConcreteStackBlock => + __NSConcreteStackBlock.value; + + set _NSConcreteStackBlock(ffi.Pointer> value) => + __NSConcreteStackBlock.value = value; + + void Debugger() { + return _Debugger(); } - late final __objc_msgSend_365Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _DebuggerPtr = + _lookup>('Debugger'); + late final _Debugger = _DebuggerPtr.asFunction(); - late final _sel_cookies1 = _registerName1("cookies"); - late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); - late final _sel_setCookie_1 = _registerName1("setCookie:"); - void _objc_msgSend_366( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookie, + void DebugStr( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_366( - obj, - sel, - cookie, + return _DebugStr( + debuggerMsg, ); } - late final __objc_msgSend_366Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _DebugStrPtr = + _lookup>( + 'DebugStr'); + late final _DebugStr = + _DebugStrPtr.asFunction(); - late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); - late final _sel_removeCookiesSinceDate_1 = - _registerName1("removeCookiesSinceDate:"); - void _objc_msgSend_367( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - ) { - return __objc_msgSend_367( - obj, - sel, - date, - ); + void SysBreak() { + return _SysBreak(); } - late final __objc_msgSend_367Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _SysBreakPtr = + _lookup>('SysBreak'); + late final _SysBreak = _SysBreakPtr.asFunction(); - late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); - late final _sel_setCookies_forURL_mainDocumentURL_1 = - _registerName1("setCookies:forURL:mainDocumentURL:"); - void _objc_msgSend_368( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer URL, - ffi.Pointer mainDocumentURL, + void SysBreakStr( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_368( - obj, - sel, - cookies, - URL, - mainDocumentURL, + return _SysBreakStr( + debuggerMsg, ); } - late final __objc_msgSend_368Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _SysBreakStrPtr = + _lookup>( + 'SysBreakStr'); + late final _SysBreakStr = + _SysBreakStrPtr.asFunction(); - late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); - int _objc_msgSend_369( - ffi.Pointer obj, - ffi.Pointer sel, + void SysBreakFunc( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_369( - obj, - sel, + return _SysBreakFunc( + debuggerMsg, ); } - late final __objc_msgSend_369Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _SysBreakFuncPtr = + _lookup>( + 'SysBreakFunc'); + late final _SysBreakFunc = + _SysBreakFuncPtr.asFunction(); - late final _sel_setCookieAcceptPolicy_1 = - _registerName1("setCookieAcceptPolicy:"); - void _objc_msgSend_370( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + late final ffi.Pointer _kCFCoreFoundationVersionNumber = + _lookup('kCFCoreFoundationVersionNumber'); + + double get kCFCoreFoundationVersionNumber => + _kCFCoreFoundationVersionNumber.value; + + set kCFCoreFoundationVersionNumber(double value) => + _kCFCoreFoundationVersionNumber.value = value; + + late final ffi.Pointer _kCFNotFound = + _lookup('kCFNotFound'); + + int get kCFNotFound => _kCFNotFound.value; + + set kCFNotFound(int value) => _kCFNotFound.value = value; + + CFRange __CFRangeMake( + int loc, + int len, ) { - return __objc_msgSend_370( - obj, - sel, - value, + return ___CFRangeMake( + loc, + len, ); } - late final __objc_msgSend_370Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final ___CFRangeMakePtr = + _lookup>( + '__CFRangeMake'); + late final ___CFRangeMake = + ___CFRangeMakePtr.asFunction(); - late final _sel_sortedCookiesUsingDescriptors_1 = - _registerName1("sortedCookiesUsingDescriptors:"); - late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); - late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); - late final _sel_originalRequest1 = _registerName1("originalRequest"); - ffi.Pointer _objc_msgSend_371( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_371( - obj, - sel, - ); + int CFNullGetTypeID() { + return _CFNullGetTypeID(); } - late final __objc_msgSend_371Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _CFNullGetTypeIDPtr = + _lookup>('CFNullGetTypeID'); + late final _CFNullGetTypeID = + _CFNullGetTypeIDPtr.asFunction(); - late final _sel_currentRequest1 = _registerName1("currentRequest"); - late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); - late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = - _registerName1( - "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); - instancetype _objc_msgSend_372( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - ffi.Pointer MIMEType, - int length, - ffi.Pointer name, + late final ffi.Pointer _kCFNull = _lookup('kCFNull'); + + CFNullRef get kCFNull => _kCFNull.value; + + set kCFNull(CFNullRef value) => _kCFNull.value = value; + + late final ffi.Pointer _kCFAllocatorDefault = + _lookup('kCFAllocatorDefault'); + + CFAllocatorRef get kCFAllocatorDefault => _kCFAllocatorDefault.value; + + set kCFAllocatorDefault(CFAllocatorRef value) => + _kCFAllocatorDefault.value = value; + + late final ffi.Pointer _kCFAllocatorSystemDefault = + _lookup('kCFAllocatorSystemDefault'); + + CFAllocatorRef get kCFAllocatorSystemDefault => + _kCFAllocatorSystemDefault.value; + + set kCFAllocatorSystemDefault(CFAllocatorRef value) => + _kCFAllocatorSystemDefault.value = value; + + late final ffi.Pointer _kCFAllocatorMalloc = + _lookup('kCFAllocatorMalloc'); + + CFAllocatorRef get kCFAllocatorMalloc => _kCFAllocatorMalloc.value; + + set kCFAllocatorMalloc(CFAllocatorRef value) => + _kCFAllocatorMalloc.value = value; + + late final ffi.Pointer _kCFAllocatorMallocZone = + _lookup('kCFAllocatorMallocZone'); + + CFAllocatorRef get kCFAllocatorMallocZone => _kCFAllocatorMallocZone.value; + + set kCFAllocatorMallocZone(CFAllocatorRef value) => + _kCFAllocatorMallocZone.value = value; + + late final ffi.Pointer _kCFAllocatorNull = + _lookup('kCFAllocatorNull'); + + CFAllocatorRef get kCFAllocatorNull => _kCFAllocatorNull.value; + + set kCFAllocatorNull(CFAllocatorRef value) => _kCFAllocatorNull.value = value; + + late final ffi.Pointer _kCFAllocatorUseContext = + _lookup('kCFAllocatorUseContext'); + + CFAllocatorRef get kCFAllocatorUseContext => _kCFAllocatorUseContext.value; + + set kCFAllocatorUseContext(CFAllocatorRef value) => + _kCFAllocatorUseContext.value = value; + + int CFAllocatorGetTypeID() { + return _CFAllocatorGetTypeID(); + } + + late final _CFAllocatorGetTypeIDPtr = + _lookup>('CFAllocatorGetTypeID'); + late final _CFAllocatorGetTypeID = + _CFAllocatorGetTypeIDPtr.asFunction(); + + void CFAllocatorSetDefault( + CFAllocatorRef allocator, ) { - return __objc_msgSend_372( - obj, - sel, - URL, - MIMEType, - length, - name, + return _CFAllocatorSetDefault( + allocator, ); } - late final __objc_msgSend_372Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + late final _CFAllocatorSetDefaultPtr = + _lookup>( + 'CFAllocatorSetDefault'); + late final _CFAllocatorSetDefault = + _CFAllocatorSetDefaultPtr.asFunction(); - late final _sel_MIMEType1 = _registerName1("MIMEType"); - late final _sel_expectedContentLength1 = - _registerName1("expectedContentLength"); - late final _sel_textEncodingName1 = _registerName1("textEncodingName"); - late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); - late final _sel_response1 = _registerName1("response"); - ffi.Pointer _objc_msgSend_373( - ffi.Pointer obj, - ffi.Pointer sel, + CFAllocatorRef CFAllocatorGetDefault() { + return _CFAllocatorGetDefault(); + } + + late final _CFAllocatorGetDefaultPtr = + _lookup>( + 'CFAllocatorGetDefault'); + late final _CFAllocatorGetDefault = + _CFAllocatorGetDefaultPtr.asFunction(); + + CFAllocatorRef CFAllocatorCreate( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return __objc_msgSend_373( - obj, - sel, + return _CFAllocatorCreate( + allocator, + context, ); } - late final __objc_msgSend_373Ptr = _lookup< + late final _CFAllocatorCreatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + CFAllocatorRef Function(CFAllocatorRef, + ffi.Pointer)>>('CFAllocatorCreate'); + late final _CFAllocatorCreate = _CFAllocatorCreatePtr.asFunction< + CFAllocatorRef Function( + CFAllocatorRef, ffi.Pointer)>(); - late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); - late final _sel_setEarliestBeginDate_1 = - _registerName1("setEarliestBeginDate:"); - void _objc_msgSend_374( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer CFAllocatorAllocate( + CFAllocatorRef allocator, + int size, + int hint, ) { - return __objc_msgSend_374( - obj, - sel, - value, + return _CFAllocatorAllocate( + allocator, + size, + hint, ); } - late final __objc_msgSend_374Ptr = _lookup< + late final _CFAllocatorAllocatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + CFAllocatorRef, CFIndex, CFOptionFlags)>>('CFAllocatorAllocate'); + late final _CFAllocatorAllocate = _CFAllocatorAllocatePtr.asFunction< + ffi.Pointer Function(CFAllocatorRef, int, int)>(); - late final _sel_countOfBytesClientExpectsToSend1 = - _registerName1("countOfBytesClientExpectsToSend"); - late final _sel_setCountOfBytesClientExpectsToSend_1 = - _registerName1("setCountOfBytesClientExpectsToSend:"); - late final _sel_countOfBytesClientExpectsToReceive1 = - _registerName1("countOfBytesClientExpectsToReceive"); - late final _sel_setCountOfBytesClientExpectsToReceive_1 = - _registerName1("setCountOfBytesClientExpectsToReceive:"); - late final _sel_countOfBytesReceived1 = - _registerName1("countOfBytesReceived"); - late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); - late final _sel_countOfBytesExpectedToSend1 = - _registerName1("countOfBytesExpectedToSend"); - late final _sel_countOfBytesExpectedToReceive1 = - _registerName1("countOfBytesExpectedToReceive"); - late final _sel_taskDescription1 = _registerName1("taskDescription"); - late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); - late final _sel_state1 = _registerName1("state"); - int _objc_msgSend_375( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer CFAllocatorReallocate( + CFAllocatorRef allocator, + ffi.Pointer ptr, + int newsize, + int hint, ) { - return __objc_msgSend_375( - obj, - sel, + return _CFAllocatorReallocate( + allocator, + ptr, + newsize, + hint, ); } - late final __objc_msgSend_375Ptr = _lookup< + late final _CFAllocatorReallocatePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer, + CFIndex, CFOptionFlags)>>('CFAllocatorReallocate'); + late final _CFAllocatorReallocate = _CFAllocatorReallocatePtr.asFunction< + ffi.Pointer Function( + CFAllocatorRef, ffi.Pointer, int, int)>(); - late final _sel_error1 = _registerName1("error"); - ffi.Pointer _objc_msgSend_376( - ffi.Pointer obj, - ffi.Pointer sel, + void CFAllocatorDeallocate( + CFAllocatorRef allocator, + ffi.Pointer ptr, ) { - return __objc_msgSend_376( - obj, - sel, + return _CFAllocatorDeallocate( + allocator, + ptr, ); } - late final __objc_msgSend_376Ptr = _lookup< + late final _CFAllocatorDeallocatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + CFAllocatorRef, ffi.Pointer)>>('CFAllocatorDeallocate'); + late final _CFAllocatorDeallocate = _CFAllocatorDeallocatePtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer)>(); - late final _sel_suspend1 = _registerName1("suspend"); - late final _sel_priority1 = _registerName1("priority"); - late final _sel_setPriority_1 = _registerName1("setPriority:"); - void _objc_msgSend_377( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + int CFAllocatorGetPreferredSizeForSize( + CFAllocatorRef allocator, + int size, + int hint, ) { - return __objc_msgSend_377( - obj, - sel, - value, + return _CFAllocatorGetPreferredSizeForSize( + allocator, + size, + hint, ); } - late final __objc_msgSend_377Ptr = _lookup< + late final _CFAllocatorGetPreferredSizeForSizePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); + CFIndex Function(CFAllocatorRef, CFIndex, + CFOptionFlags)>>('CFAllocatorGetPreferredSizeForSize'); + late final _CFAllocatorGetPreferredSizeForSize = + _CFAllocatorGetPreferredSizeForSizePtr.asFunction< + int Function(CFAllocatorRef, int, int)>(); - late final _sel_prefersIncrementalDelivery1 = - _registerName1("prefersIncrementalDelivery"); - late final _sel_setPrefersIncrementalDelivery_1 = - _registerName1("setPrefersIncrementalDelivery:"); - late final _sel_storeCookies_forTask_1 = - _registerName1("storeCookies:forTask:"); - void _objc_msgSend_378( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer task, + void CFAllocatorGetContext( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return __objc_msgSend_378( - obj, - sel, - cookies, - task, + return _CFAllocatorGetContext( + allocator, + context, ); } - late final __objc_msgSend_378Ptr = _lookup< + late final _CFAllocatorGetContextPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(CFAllocatorRef, + ffi.Pointer)>>('CFAllocatorGetContext'); + late final _CFAllocatorGetContext = _CFAllocatorGetContextPtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer)>(); - late final _sel_getCookiesForTask_completionHandler_1 = - _registerName1("getCookiesForTask:completionHandler:"); - void _objc_msgSend_379( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer<_ObjCBlock> completionHandler, + int CFGetTypeID( + CFTypeRef cf, ) { - return __objc_msgSend_379( - obj, - sel, - task, - completionHandler, + return _CFGetTypeID( + cf, ); } - late final __objc_msgSend_379Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + late final _CFGetTypeIDPtr = + _lookup>('CFGetTypeID'); + late final _CFGetTypeID = + _CFGetTypeIDPtr.asFunction(); - late final ffi.Pointer - _NSHTTPCookieManagerAcceptPolicyChangedNotification = - _lookup( - 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); + CFStringRef CFCopyTypeIDDescription( + int type_id, + ) { + return _CFCopyTypeIDDescription( + type_id, + ); + } - NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; + late final _CFCopyTypeIDDescriptionPtr = + _lookup>( + 'CFCopyTypeIDDescription'); + late final _CFCopyTypeIDDescription = + _CFCopyTypeIDDescriptionPtr.asFunction(); - set NSHTTPCookieManagerAcceptPolicyChangedNotification( - NSNotificationName value) => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; + CFTypeRef CFRetain( + CFTypeRef cf, + ) { + return _CFRetain( + cf, + ); + } - late final ffi.Pointer - _NSHTTPCookieManagerCookiesChangedNotification = - _lookup( - 'NSHTTPCookieManagerCookiesChangedNotification'); + late final _CFRetainPtr = + _lookup>('CFRetain'); + late final _CFRetain = + _CFRetainPtr.asFunction(); - NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => - _NSHTTPCookieManagerCookiesChangedNotification.value; + void CFRelease( + CFTypeRef cf, + ) { + return _CFRelease( + cf, + ); + } - set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => - _NSHTTPCookieManagerCookiesChangedNotification.value = value; + late final _CFReleasePtr = + _lookup>('CFRelease'); + late final _CFRelease = _CFReleasePtr.asFunction(); - late final ffi.Pointer - _NSProgressEstimatedTimeRemainingKey = - _lookup('NSProgressEstimatedTimeRemainingKey'); + CFTypeRef CFAutorelease( + CFTypeRef arg, + ) { + return _CFAutorelease( + arg, + ); + } - NSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => - _NSProgressEstimatedTimeRemainingKey.value; + late final _CFAutoreleasePtr = + _lookup>( + 'CFAutorelease'); + late final _CFAutorelease = + _CFAutoreleasePtr.asFunction(); - set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey value) => - _NSProgressEstimatedTimeRemainingKey.value = value; + int CFGetRetainCount( + CFTypeRef cf, + ) { + return _CFGetRetainCount( + cf, + ); + } - late final ffi.Pointer _NSProgressThroughputKey = - _lookup('NSProgressThroughputKey'); + late final _CFGetRetainCountPtr = + _lookup>( + 'CFGetRetainCount'); + late final _CFGetRetainCount = + _CFGetRetainCountPtr.asFunction(); - NSProgressUserInfoKey get NSProgressThroughputKey => - _NSProgressThroughputKey.value; + int CFEqual( + CFTypeRef cf1, + CFTypeRef cf2, + ) { + return _CFEqual( + cf1, + cf2, + ); + } - set NSProgressThroughputKey(NSProgressUserInfoKey value) => - _NSProgressThroughputKey.value = value; + late final _CFEqualPtr = + _lookup>( + 'CFEqual'); + late final _CFEqual = + _CFEqualPtr.asFunction(); - late final ffi.Pointer _NSProgressKindFile = - _lookup('NSProgressKindFile'); + int CFHash( + CFTypeRef cf, + ) { + return _CFHash( + cf, + ); + } - NSProgressKind get NSProgressKindFile => _NSProgressKindFile.value; + late final _CFHashPtr = + _lookup>('CFHash'); + late final _CFHash = _CFHashPtr.asFunction(); - set NSProgressKindFile(NSProgressKind value) => - _NSProgressKindFile.value = value; + CFStringRef CFCopyDescription( + CFTypeRef cf, + ) { + return _CFCopyDescription( + cf, + ); + } - late final ffi.Pointer - _NSProgressFileOperationKindKey = - _lookup('NSProgressFileOperationKindKey'); + late final _CFCopyDescriptionPtr = + _lookup>( + 'CFCopyDescription'); + late final _CFCopyDescription = + _CFCopyDescriptionPtr.asFunction(); - NSProgressUserInfoKey get NSProgressFileOperationKindKey => - _NSProgressFileOperationKindKey.value; + CFAllocatorRef CFGetAllocator( + CFTypeRef cf, + ) { + return _CFGetAllocator( + cf, + ); + } - set NSProgressFileOperationKindKey(NSProgressUserInfoKey value) => - _NSProgressFileOperationKindKey.value = value; + late final _CFGetAllocatorPtr = + _lookup>( + 'CFGetAllocator'); + late final _CFGetAllocator = + _CFGetAllocatorPtr.asFunction(); - late final ffi.Pointer - _NSProgressFileOperationKindDownloading = - _lookup( - 'NSProgressFileOperationKindDownloading'); + CFTypeRef CFMakeCollectable( + CFTypeRef cf, + ) { + return _CFMakeCollectable( + cf, + ); + } - NSProgressFileOperationKind get NSProgressFileOperationKindDownloading => - _NSProgressFileOperationKindDownloading.value; + late final _CFMakeCollectablePtr = + _lookup>( + 'CFMakeCollectable'); + late final _CFMakeCollectable = + _CFMakeCollectablePtr.asFunction(); - set NSProgressFileOperationKindDownloading( - NSProgressFileOperationKind value) => - _NSProgressFileOperationKindDownloading.value = value; + ffi.Pointer NSDefaultMallocZone() { + return _NSDefaultMallocZone(); + } - late final ffi.Pointer - _NSProgressFileOperationKindDecompressingAfterDownloading = - _lookup( - 'NSProgressFileOperationKindDecompressingAfterDownloading'); + late final _NSDefaultMallocZonePtr = + _lookup Function()>>( + 'NSDefaultMallocZone'); + late final _NSDefaultMallocZone = + _NSDefaultMallocZonePtr.asFunction Function()>(); - NSProgressFileOperationKind - get NSProgressFileOperationKindDecompressingAfterDownloading => - _NSProgressFileOperationKindDecompressingAfterDownloading.value; - - set NSProgressFileOperationKindDecompressingAfterDownloading( - NSProgressFileOperationKind value) => - _NSProgressFileOperationKindDecompressingAfterDownloading.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindReceiving = - _lookup( - 'NSProgressFileOperationKindReceiving'); - - NSProgressFileOperationKind get NSProgressFileOperationKindReceiving => - _NSProgressFileOperationKindReceiving.value; - - set NSProgressFileOperationKindReceiving(NSProgressFileOperationKind value) => - _NSProgressFileOperationKindReceiving.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindCopying = - _lookup( - 'NSProgressFileOperationKindCopying'); - - NSProgressFileOperationKind get NSProgressFileOperationKindCopying => - _NSProgressFileOperationKindCopying.value; - - set NSProgressFileOperationKindCopying(NSProgressFileOperationKind value) => - _NSProgressFileOperationKindCopying.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindUploading = - _lookup( - 'NSProgressFileOperationKindUploading'); - - NSProgressFileOperationKind get NSProgressFileOperationKindUploading => - _NSProgressFileOperationKindUploading.value; - - set NSProgressFileOperationKindUploading(NSProgressFileOperationKind value) => - _NSProgressFileOperationKindUploading.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindDuplicating = - _lookup( - 'NSProgressFileOperationKindDuplicating'); - - NSProgressFileOperationKind get NSProgressFileOperationKindDuplicating => - _NSProgressFileOperationKindDuplicating.value; - - set NSProgressFileOperationKindDuplicating( - NSProgressFileOperationKind value) => - _NSProgressFileOperationKindDuplicating.value = value; - - late final ffi.Pointer _NSProgressFileURLKey = - _lookup('NSProgressFileURLKey'); - - NSProgressUserInfoKey get NSProgressFileURLKey => _NSProgressFileURLKey.value; - - set NSProgressFileURLKey(NSProgressUserInfoKey value) => - _NSProgressFileURLKey.value = value; - - late final ffi.Pointer _NSProgressFileTotalCountKey = - _lookup('NSProgressFileTotalCountKey'); - - NSProgressUserInfoKey get NSProgressFileTotalCountKey => - _NSProgressFileTotalCountKey.value; - - set NSProgressFileTotalCountKey(NSProgressUserInfoKey value) => - _NSProgressFileTotalCountKey.value = value; - - late final ffi.Pointer - _NSProgressFileCompletedCountKey = - _lookup('NSProgressFileCompletedCountKey'); - - NSProgressUserInfoKey get NSProgressFileCompletedCountKey => - _NSProgressFileCompletedCountKey.value; - - set NSProgressFileCompletedCountKey(NSProgressUserInfoKey value) => - _NSProgressFileCompletedCountKey.value = value; - - late final ffi.Pointer - _NSProgressFileAnimationImageKey = - _lookup('NSProgressFileAnimationImageKey'); - - NSProgressUserInfoKey get NSProgressFileAnimationImageKey => - _NSProgressFileAnimationImageKey.value; - - set NSProgressFileAnimationImageKey(NSProgressUserInfoKey value) => - _NSProgressFileAnimationImageKey.value = value; - - late final ffi.Pointer - _NSProgressFileAnimationImageOriginalRectKey = - _lookup( - 'NSProgressFileAnimationImageOriginalRectKey'); - - NSProgressUserInfoKey get NSProgressFileAnimationImageOriginalRectKey => - _NSProgressFileAnimationImageOriginalRectKey.value; - - set NSProgressFileAnimationImageOriginalRectKey( - NSProgressUserInfoKey value) => - _NSProgressFileAnimationImageOriginalRectKey.value = value; - - late final ffi.Pointer _NSProgressFileIconKey = - _lookup('NSProgressFileIconKey'); - - NSProgressUserInfoKey get NSProgressFileIconKey => - _NSProgressFileIconKey.value; - - set NSProgressFileIconKey(NSProgressUserInfoKey value) => - _NSProgressFileIconKey.value = value; - - late final ffi.Pointer _kCFTypeArrayCallBacks = - _lookup('kCFTypeArrayCallBacks'); + ffi.Pointer NSCreateZone( + int startSize, + int granularity, + bool canFree, + ) { + return _NSCreateZone( + startSize, + granularity, + canFree, + ); + } - CFArrayCallBacks get kCFTypeArrayCallBacks => _kCFTypeArrayCallBacks.ref; + late final _NSCreateZonePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + NSUInteger, NSUInteger, ffi.Bool)>>('NSCreateZone'); + late final _NSCreateZone = _NSCreateZonePtr.asFunction< + ffi.Pointer Function(int, int, bool)>(); - int CFArrayGetTypeID() { - return _CFArrayGetTypeID(); + void NSRecycleZone( + ffi.Pointer zone, + ) { + return _NSRecycleZone( + zone, + ); } - late final _CFArrayGetTypeIDPtr = - _lookup>('CFArrayGetTypeID'); - late final _CFArrayGetTypeID = - _CFArrayGetTypeIDPtr.asFunction(); + late final _NSRecycleZonePtr = + _lookup)>>( + 'NSRecycleZone'); + late final _NSRecycleZone = + _NSRecycleZonePtr.asFunction)>(); - CFArrayRef CFArrayCreate( - CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + void NSSetZoneName( + ffi.Pointer zone, + ffi.Pointer name, ) { - return _CFArrayCreate( - allocator, - values, - numValues, - callBacks, + return _NSSetZoneName( + zone, + name, ); } - late final _CFArrayCreatePtr = _lookup< + late final _NSSetZoneNamePtr = _lookup< ffi.NativeFunction< - CFArrayRef Function( - CFAllocatorRef, - ffi.Pointer>, - CFIndex, - ffi.Pointer)>>('CFArrayCreate'); - late final _CFArrayCreate = _CFArrayCreatePtr.asFunction< - CFArrayRef Function(CFAllocatorRef, ffi.Pointer>, - int, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('NSSetZoneName'); + late final _NSSetZoneName = _NSSetZoneNamePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - CFArrayRef CFArrayCreateCopy( - CFAllocatorRef allocator, - CFArrayRef theArray, + ffi.Pointer NSZoneName( + ffi.Pointer zone, ) { - return _CFArrayCreateCopy( - allocator, - theArray, + return _NSZoneName( + zone, ); } - late final _CFArrayCreateCopyPtr = _lookup< - ffi.NativeFunction>( - 'CFArrayCreateCopy'); - late final _CFArrayCreateCopy = _CFArrayCreateCopyPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFArrayRef)>(); + late final _NSZoneNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('NSZoneName'); + late final _NSZoneName = _NSZoneNamePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - CFMutableArrayRef CFArrayCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + ffi.Pointer NSZoneFromPointer( + ffi.Pointer ptr, ) { - return _CFArrayCreateMutable( - allocator, - capacity, - callBacks, + return _NSZoneFromPointer( + ptr, ); } - late final _CFArrayCreateMutablePtr = _lookup< + late final _NSZoneFromPointerPtr = _lookup< ffi.NativeFunction< - CFMutableArrayRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFArrayCreateMutable'); - late final _CFArrayCreateMutable = _CFArrayCreateMutablePtr.asFunction< - CFMutableArrayRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSZoneFromPointer'); + late final _NSZoneFromPointer = _NSZoneFromPointerPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - CFMutableArrayRef CFArrayCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFArrayRef theArray, + ffi.Pointer NSZoneMalloc( + ffi.Pointer zone, + int size, ) { - return _CFArrayCreateMutableCopy( - allocator, - capacity, - theArray, + return _NSZoneMalloc( + zone, + size, ); } - late final _CFArrayCreateMutableCopyPtr = _lookup< + late final _NSZoneMallocPtr = _lookup< ffi.NativeFunction< - CFMutableArrayRef Function(CFAllocatorRef, CFIndex, - CFArrayRef)>>('CFArrayCreateMutableCopy'); - late final _CFArrayCreateMutableCopy = - _CFArrayCreateMutableCopyPtr.asFunction< - CFMutableArrayRef Function(CFAllocatorRef, int, CFArrayRef)>(); + ffi.Pointer Function( + ffi.Pointer, NSUInteger)>>('NSZoneMalloc'); + late final _NSZoneMalloc = _NSZoneMallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int)>(); - int CFArrayGetCount( - CFArrayRef theArray, + ffi.Pointer NSZoneCalloc( + ffi.Pointer zone, + int numElems, + int byteSize, ) { - return _CFArrayGetCount( - theArray, + return _NSZoneCalloc( + zone, + numElems, + byteSize, ); } - late final _CFArrayGetCountPtr = - _lookup>( - 'CFArrayGetCount'); - late final _CFArrayGetCount = - _CFArrayGetCountPtr.asFunction(); + late final _NSZoneCallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, NSUInteger, NSUInteger)>>('NSZoneCalloc'); + late final _NSZoneCalloc = _NSZoneCallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - int CFArrayGetCountOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + ffi.Pointer NSZoneRealloc( + ffi.Pointer zone, + ffi.Pointer ptr, + int size, ) { - return _CFArrayGetCountOfValue( - theArray, - range, - value, + return _NSZoneRealloc( + zone, + ptr, + size, ); } - late final _CFArrayGetCountOfValuePtr = _lookup< + late final _NSZoneReallocPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetCountOfValue'); - late final _CFArrayGetCountOfValue = _CFArrayGetCountOfValuePtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('NSZoneRealloc'); + late final _NSZoneRealloc = _NSZoneReallocPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int CFArrayContainsValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + void NSZoneFree( + ffi.Pointer zone, + ffi.Pointer ptr, ) { - return _CFArrayContainsValue( - theArray, - range, - value, + return _NSZoneFree( + zone, + ptr, ); } - late final _CFArrayContainsValuePtr = _lookup< + late final _NSZoneFreePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayContainsValue'); - late final _CFArrayContainsValue = _CFArrayContainsValuePtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('NSZoneFree'); + late final _NSZoneFree = _NSZoneFreePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer CFArrayGetValueAtIndex( - CFArrayRef theArray, - int idx, + ffi.Pointer NSAllocateCollectable( + int size, + int options, ) { - return _CFArrayGetValueAtIndex( - theArray, - idx, + return _NSAllocateCollectable( + size, + options, ); } - late final _CFArrayGetValueAtIndexPtr = _lookup< + late final _NSAllocateCollectablePtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - CFArrayRef, CFIndex)>>('CFArrayGetValueAtIndex'); - late final _CFArrayGetValueAtIndex = _CFArrayGetValueAtIndexPtr.asFunction< - ffi.Pointer Function(CFArrayRef, int)>(); + NSUInteger, NSUInteger)>>('NSAllocateCollectable'); + late final _NSAllocateCollectable = _NSAllocateCollectablePtr.asFunction< + ffi.Pointer Function(int, int)>(); - void CFArrayGetValues( - CFArrayRef theArray, - CFRange range, - ffi.Pointer> values, + ffi.Pointer NSReallocateCollectable( + ffi.Pointer ptr, + int size, + int options, ) { - return _CFArrayGetValues( - theArray, - range, - values, + return _NSReallocateCollectable( + ptr, + size, + options, ); } - late final _CFArrayGetValuesPtr = _lookup< + late final _NSReallocateCollectablePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFArrayRef, CFRange, - ffi.Pointer>)>>('CFArrayGetValues'); - late final _CFArrayGetValues = _CFArrayGetValuesPtr.asFunction< - void Function(CFArrayRef, CFRange, ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, NSUInteger, + NSUInteger)>>('NSReallocateCollectable'); + late final _NSReallocateCollectable = _NSReallocateCollectablePtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - void CFArrayApplyFunction( - CFArrayRef theArray, - CFRange range, - CFArrayApplierFunction applier, - ffi.Pointer context, - ) { - return _CFArrayApplyFunction( - theArray, - range, - applier, - context, - ); + int NSPageSize() { + return _NSPageSize(); } - late final _CFArrayApplyFunctionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFArrayRef, CFRange, CFArrayApplierFunction, - ffi.Pointer)>>('CFArrayApplyFunction'); - late final _CFArrayApplyFunction = _CFArrayApplyFunctionPtr.asFunction< - void Function(CFArrayRef, CFRange, CFArrayApplierFunction, - ffi.Pointer)>(); + late final _NSPageSizePtr = + _lookup>('NSPageSize'); + late final _NSPageSize = _NSPageSizePtr.asFunction(); - int CFArrayGetFirstIndexOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + int NSLogPageSize() { + return _NSLogPageSize(); + } + + late final _NSLogPageSizePtr = + _lookup>('NSLogPageSize'); + late final _NSLogPageSize = _NSLogPageSizePtr.asFunction(); + + int NSRoundUpToMultipleOfPageSize( + int bytes, ) { - return _CFArrayGetFirstIndexOfValue( - theArray, - range, - value, + return _NSRoundUpToMultipleOfPageSize( + bytes, ); } - late final _CFArrayGetFirstIndexOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetFirstIndexOfValue'); - late final _CFArrayGetFirstIndexOfValue = _CFArrayGetFirstIndexOfValuePtr - .asFunction)>(); + late final _NSRoundUpToMultipleOfPageSizePtr = + _lookup>( + 'NSRoundUpToMultipleOfPageSize'); + late final _NSRoundUpToMultipleOfPageSize = + _NSRoundUpToMultipleOfPageSizePtr.asFunction(); - int CFArrayGetLastIndexOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + int NSRoundDownToMultipleOfPageSize( + int bytes, ) { - return _CFArrayGetLastIndexOfValue( - theArray, - range, - value, + return _NSRoundDownToMultipleOfPageSize( + bytes, ); } - late final _CFArrayGetLastIndexOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetLastIndexOfValue'); - late final _CFArrayGetLastIndexOfValue = _CFArrayGetLastIndexOfValuePtr - .asFunction)>(); + late final _NSRoundDownToMultipleOfPageSizePtr = + _lookup>( + 'NSRoundDownToMultipleOfPageSize'); + late final _NSRoundDownToMultipleOfPageSize = + _NSRoundDownToMultipleOfPageSizePtr.asFunction(); - int CFArrayBSearchValues( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, - CFComparatorFunction comparator, - ffi.Pointer context, + ffi.Pointer NSAllocateMemoryPages( + int bytes, ) { - return _CFArrayBSearchValues( - theArray, - range, - value, - comparator, - context, + return _NSAllocateMemoryPages( + bytes, ); } - late final _CFArrayBSearchValuesPtr = _lookup< - ffi.NativeFunction< - CFIndex Function( - CFArrayRef, - CFRange, - ffi.Pointer, - CFComparatorFunction, - ffi.Pointer)>>('CFArrayBSearchValues'); - late final _CFArrayBSearchValues = _CFArrayBSearchValuesPtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer, - CFComparatorFunction, ffi.Pointer)>(); + late final _NSAllocateMemoryPagesPtr = + _lookup Function(NSUInteger)>>( + 'NSAllocateMemoryPages'); + late final _NSAllocateMemoryPages = _NSAllocateMemoryPagesPtr.asFunction< + ffi.Pointer Function(int)>(); - void CFArrayAppendValue( - CFMutableArrayRef theArray, - ffi.Pointer value, + void NSDeallocateMemoryPages( + ffi.Pointer ptr, + int bytes, ) { - return _CFArrayAppendValue( - theArray, - value, + return _NSDeallocateMemoryPages( + ptr, + bytes, ); } - late final _CFArrayAppendValuePtr = _lookup< + late final _NSDeallocateMemoryPagesPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - CFMutableArrayRef, ffi.Pointer)>>('CFArrayAppendValue'); - late final _CFArrayAppendValue = _CFArrayAppendValuePtr.asFunction< - void Function(CFMutableArrayRef, ffi.Pointer)>(); + ffi.Pointer, NSUInteger)>>('NSDeallocateMemoryPages'); + late final _NSDeallocateMemoryPages = _NSDeallocateMemoryPagesPtr.asFunction< + void Function(ffi.Pointer, int)>(); - void CFArrayInsertValueAtIndex( - CFMutableArrayRef theArray, - int idx, - ffi.Pointer value, + void NSCopyMemoryPages( + ffi.Pointer source, + ffi.Pointer dest, + int bytes, ) { - return _CFArrayInsertValueAtIndex( - theArray, - idx, - value, + return _NSCopyMemoryPages( + source, + dest, + bytes, ); } - late final _CFArrayInsertValueAtIndexPtr = _lookup< + late final _NSCopyMemoryPagesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - ffi.Pointer)>>('CFArrayInsertValueAtIndex'); - late final _CFArrayInsertValueAtIndex = - _CFArrayInsertValueAtIndexPtr.asFunction< - void Function(CFMutableArrayRef, int, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('NSCopyMemoryPages'); + late final _NSCopyMemoryPages = _NSCopyMemoryPagesPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - void CFArraySetValueAtIndex( - CFMutableArrayRef theArray, - int idx, - ffi.Pointer value, - ) { - return _CFArraySetValueAtIndex( - theArray, - idx, - value, - ); + int NSRealMemoryAvailable() { + return _NSRealMemoryAvailable(); } - late final _CFArraySetValueAtIndexPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - ffi.Pointer)>>('CFArraySetValueAtIndex'); - late final _CFArraySetValueAtIndex = _CFArraySetValueAtIndexPtr.asFunction< - void Function(CFMutableArrayRef, int, ffi.Pointer)>(); + late final _NSRealMemoryAvailablePtr = + _lookup>( + 'NSRealMemoryAvailable'); + late final _NSRealMemoryAvailable = + _NSRealMemoryAvailablePtr.asFunction(); - void CFArrayRemoveValueAtIndex( - CFMutableArrayRef theArray, - int idx, + ffi.Pointer NSAllocateObject( + ffi.Pointer aClass, + int extraBytes, + ffi.Pointer zone, ) { - return _CFArrayRemoveValueAtIndex( - theArray, - idx, + return _NSAllocateObject( + aClass, + extraBytes, + zone, ); } - late final _CFArrayRemoveValueAtIndexPtr = _lookup< - ffi.NativeFunction>( - 'CFArrayRemoveValueAtIndex'); - late final _CFArrayRemoveValueAtIndex = _CFArrayRemoveValueAtIndexPtr - .asFunction(); + late final _NSAllocateObjectPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, NSUInteger, + ffi.Pointer)>>('NSAllocateObject'); + late final _NSAllocateObject = _NSAllocateObjectPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - void CFArrayRemoveAllValues( - CFMutableArrayRef theArray, + void NSDeallocateObject( + ffi.Pointer object, ) { - return _CFArrayRemoveAllValues( - theArray, + return _NSDeallocateObject( + object, ); } - late final _CFArrayRemoveAllValuesPtr = - _lookup>( - 'CFArrayRemoveAllValues'); - late final _CFArrayRemoveAllValues = - _CFArrayRemoveAllValuesPtr.asFunction(); + late final _NSDeallocateObjectPtr = + _lookup)>>( + 'NSDeallocateObject'); + late final _NSDeallocateObject = _NSDeallocateObjectPtr.asFunction< + void Function(ffi.Pointer)>(); - void CFArrayReplaceValues( - CFMutableArrayRef theArray, - CFRange range, - ffi.Pointer> newValues, - int newCount, + ffi.Pointer NSCopyObject( + ffi.Pointer object, + int extraBytes, + ffi.Pointer zone, ) { - return _CFArrayReplaceValues( - theArray, - range, - newValues, - newCount, + return _NSCopyObject( + object, + extraBytes, + zone, ); } - late final _CFArrayReplaceValuesPtr = _lookup< + late final _NSCopyObjectPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableArrayRef, - CFRange, - ffi.Pointer>, - CFIndex)>>('CFArrayReplaceValues'); - late final _CFArrayReplaceValues = _CFArrayReplaceValuesPtr.asFunction< - void Function(CFMutableArrayRef, CFRange, - ffi.Pointer>, int)>(); + ffi.Pointer Function(ffi.Pointer, NSUInteger, + ffi.Pointer)>>('NSCopyObject'); + late final _NSCopyObject = _NSCopyObjectPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - void CFArrayExchangeValuesAtIndices( - CFMutableArrayRef theArray, - int idx1, - int idx2, + bool NSShouldRetainWithZone( + ffi.Pointer anObject, + ffi.Pointer requestedZone, ) { - return _CFArrayExchangeValuesAtIndices( - theArray, - idx1, - idx2, + return _NSShouldRetainWithZone( + anObject, + requestedZone, ); } - late final _CFArrayExchangeValuesAtIndicesPtr = _lookup< + late final _NSShouldRetainWithZonePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - CFIndex)>>('CFArrayExchangeValuesAtIndices'); - late final _CFArrayExchangeValuesAtIndices = - _CFArrayExchangeValuesAtIndicesPtr.asFunction< - void Function(CFMutableArrayRef, int, int)>(); + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>('NSShouldRetainWithZone'); + late final _NSShouldRetainWithZone = _NSShouldRetainWithZonePtr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - void CFArraySortValues( - CFMutableArrayRef theArray, - CFRange range, - CFComparatorFunction comparator, - ffi.Pointer context, + void NSIncrementExtraRefCount( + ffi.Pointer object, ) { - return _CFArraySortValues( - theArray, - range, - comparator, - context, + return _NSIncrementExtraRefCount( + object, ); } - late final _CFArraySortValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, - ffi.Pointer)>>('CFArraySortValues'); - late final _CFArraySortValues = _CFArraySortValuesPtr.asFunction< - void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, - ffi.Pointer)>(); + late final _NSIncrementExtraRefCountPtr = + _lookup)>>( + 'NSIncrementExtraRefCount'); + late final _NSIncrementExtraRefCount = _NSIncrementExtraRefCountPtr + .asFunction)>(); - void CFArrayAppendArray( - CFMutableArrayRef theArray, - CFArrayRef otherArray, - CFRange otherRange, + bool NSDecrementExtraRefCountWasZero( + ffi.Pointer object, ) { - return _CFArrayAppendArray( - theArray, - otherArray, - otherRange, + return _NSDecrementExtraRefCountWasZero( + object, ); } - late final _CFArrayAppendArrayPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableArrayRef, CFArrayRef, CFRange)>>('CFArrayAppendArray'); - late final _CFArrayAppendArray = _CFArrayAppendArrayPtr.asFunction< - void Function(CFMutableArrayRef, CFArrayRef, CFRange)>(); + late final _NSDecrementExtraRefCountWasZeroPtr = + _lookup)>>( + 'NSDecrementExtraRefCountWasZero'); + late final _NSDecrementExtraRefCountWasZero = + _NSDecrementExtraRefCountWasZeroPtr.asFunction< + bool Function(ffi.Pointer)>(); - late final _class_OS_object1 = _getClass1("OS_object"); - ffi.Pointer os_retain( - ffi.Pointer object, + int NSExtraRefCount( + ffi.Pointer object, ) { - return _os_retain( + return _NSExtraRefCount( object, ); } - late final _os_retainPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('os_retain'); - late final _os_retain = _os_retainPtr - .asFunction Function(ffi.Pointer)>(); + late final _NSExtraRefCountPtr = + _lookup)>>( + 'NSExtraRefCount'); + late final _NSExtraRefCount = + _NSExtraRefCountPtr.asFunction)>(); - void os_release( - ffi.Pointer object, + NSRange NSUnionRange( + NSRange range1, + NSRange range2, ) { - return _os_release( - object, + return _NSUnionRange( + range1, + range2, ); } - late final _os_releasePtr = - _lookup)>>( - 'os_release'); - late final _os_release = - _os_releasePtr.asFunction)>(); + late final _NSUnionRangePtr = + _lookup>( + 'NSUnionRange'); + late final _NSUnionRange = + _NSUnionRangePtr.asFunction(); - ffi.Pointer sec_retain( - ffi.Pointer obj, + NSRange NSIntersectionRange( + NSRange range1, + NSRange range2, ) { - return _sec_retain( - obj, + return _NSIntersectionRange( + range1, + range2, ); } - late final _sec_retainPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('sec_retain'); - late final _sec_retain = _sec_retainPtr - .asFunction Function(ffi.Pointer)>(); + late final _NSIntersectionRangePtr = + _lookup>( + 'NSIntersectionRange'); + late final _NSIntersectionRange = + _NSIntersectionRangePtr.asFunction(); - void sec_release( - ffi.Pointer obj, + ffi.Pointer NSStringFromRange( + NSRange range, ) { - return _sec_release( - obj, + return _NSStringFromRange( + range, ); } - late final _sec_releasePtr = - _lookup)>>( - 'sec_release'); - late final _sec_release = - _sec_releasePtr.asFunction)>(); + late final _NSStringFromRangePtr = + _lookup Function(NSRange)>>( + 'NSStringFromRange'); + late final _NSStringFromRange = _NSStringFromRangePtr.asFunction< + ffi.Pointer Function(NSRange)>(); - CFStringRef SecCopyErrorMessageString( - int status, - ffi.Pointer reserved, + NSRange NSRangeFromString( + ffi.Pointer aString, ) { - return _SecCopyErrorMessageString( - status, - reserved, + return _NSRangeFromString( + aString, ); } - late final _SecCopyErrorMessageStringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - OSStatus, ffi.Pointer)>>('SecCopyErrorMessageString'); - late final _SecCopyErrorMessageString = _SecCopyErrorMessageStringPtr - .asFunction)>(); + late final _NSRangeFromStringPtr = + _lookup)>>( + 'NSRangeFromString'); + late final _NSRangeFromString = _NSRangeFromStringPtr.asFunction< + NSRange Function(ffi.Pointer)>(); - void __assert_rtn( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + late final _class_NSMutableIndexSet1 = _getClass1("NSMutableIndexSet"); + late final _sel_addIndexes_1 = _registerName1("addIndexes:"); + void _objc_msgSend_285( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexSet, ) { - return ___assert_rtn( - arg0, - arg1, - arg2, - arg3, + return __objc_msgSend_285( + obj, + sel, + indexSet, ); } - late final ___assert_rtnPtr = _lookup< + late final __objc_msgSend_285Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int, ffi.Pointer)>>('__assert_rtn'); - late final ___assert_rtn = ___assert_rtnPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final ffi.Pointer<_RuneLocale> __DefaultRuneLocale = - _lookup<_RuneLocale>('_DefaultRuneLocale'); - - _RuneLocale get _DefaultRuneLocale => __DefaultRuneLocale.ref; - - late final ffi.Pointer> __CurrentRuneLocale = - _lookup>('_CurrentRuneLocale'); - - ffi.Pointer<_RuneLocale> get _CurrentRuneLocale => __CurrentRuneLocale.value; - - set _CurrentRuneLocale(ffi.Pointer<_RuneLocale> value) => - __CurrentRuneLocale.value = value; + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int ___runetype( - int arg0, + late final _sel_removeIndexes_1 = _registerName1("removeIndexes:"); + late final _sel_removeAllIndexes1 = _registerName1("removeAllIndexes"); + late final _sel_addIndex_1 = _registerName1("addIndex:"); + void _objc_msgSend_286( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return ____runetype( - arg0, + return __objc_msgSend_286( + obj, + sel, + value, ); } - late final ____runetypePtr = _lookup< - ffi.NativeFunction>( - '___runetype'); - late final ____runetype = ____runetypePtr.asFunction(); + late final __objc_msgSend_286Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int ___tolower( - int arg0, + late final _sel_removeIndex_1 = _registerName1("removeIndex:"); + late final _sel_addIndexesInRange_1 = _registerName1("addIndexesInRange:"); + void _objc_msgSend_287( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, ) { - return ____tolower( - arg0, + return __objc_msgSend_287( + obj, + sel, + range, ); } - late final ____tolowerPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '___tolower'); - late final ____tolower = ____tolowerPtr.asFunction(); + late final __objc_msgSend_287Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - int ___toupper( - int arg0, + late final _sel_removeIndexesInRange_1 = + _registerName1("removeIndexesInRange:"); + late final _sel_shiftIndexesStartingAtIndex_by_1 = + _registerName1("shiftIndexesStartingAtIndex:by:"); + void _objc_msgSend_288( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + int delta, ) { - return ____toupper( - arg0, + return __objc_msgSend_288( + obj, + sel, + index, + delta, ); } - late final ____toupperPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '___toupper'); - late final ____toupper = ____toupperPtr.asFunction(); + late final __objc_msgSend_288Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - int __maskrune( - int arg0, - int arg1, + late final _class_NSMutableArray1 = _getClass1("NSMutableArray"); + late final _sel_addObject_1 = _registerName1("addObject:"); + late final _sel_insertObject_atIndex_1 = + _registerName1("insertObject:atIndex:"); + void _objc_msgSend_289( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + int index, ) { - return ___maskrune( - arg0, - arg1, + return __objc_msgSend_289( + obj, + sel, + anObject, + index, ); } - late final ___maskrunePtr = _lookup< + late final __objc_msgSend_289Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - __darwin_ct_rune_t, ffi.UnsignedLong)>>('__maskrune'); - late final ___maskrune = ___maskrunePtr.asFunction(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - int __toupper( - int arg0, + late final _sel_removeLastObject1 = _registerName1("removeLastObject"); + late final _sel_removeObjectAtIndex_1 = + _registerName1("removeObjectAtIndex:"); + late final _sel_replaceObjectAtIndex_withObject_1 = + _registerName1("replaceObjectAtIndex:withObject:"); + void _objc_msgSend_290( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ffi.Pointer anObject, ) { - return ___toupper1( - arg0, + return __objc_msgSend_290( + obj, + sel, + index, + anObject, ); } - late final ___toupperPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '__toupper'); - late final ___toupper1 = ___toupperPtr.asFunction(); + late final __objc_msgSend_290Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); - int __tolower( - int arg0, + late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); + late final _sel_addObjectsFromArray_1 = + _registerName1("addObjectsFromArray:"); + void _objc_msgSend_291( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, ) { - return ___tolower1( - arg0, + return __objc_msgSend_291( + obj, + sel, + otherArray, ); } - late final ___tolowerPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '__tolower'); - late final ___tolower1 = ___tolowerPtr.asFunction(); + late final __objc_msgSend_291Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer __error() { - return ___error(); + late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = + _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); + void _objc_msgSend_292( + ffi.Pointer obj, + ffi.Pointer sel, + int idx1, + int idx2, + ) { + return __objc_msgSend_292( + obj, + sel, + idx1, + idx2, + ); } - late final ___errorPtr = - _lookup Function()>>('__error'); - late final ___error = - ___errorPtr.asFunction Function()>(); - - ffi.Pointer localeconv() { - return _localeconv(); - } - - late final _localeconvPtr = - _lookup Function()>>('localeconv'); - late final _localeconv = - _localeconvPtr.asFunction Function()>(); + late final __objc_msgSend_292Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - ffi.Pointer setlocale( - int arg0, - ffi.Pointer arg1, + late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); + late final _sel_removeObject_inRange_1 = + _registerName1("removeObject:inRange:"); + void _objc_msgSend_293( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + NSRange range, ) { - return _setlocale( - arg0, - arg1, + return __objc_msgSend_293( + obj, + sel, + anObject, + range, ); } - late final _setlocalePtr = _lookup< + late final __objc_msgSend_293Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer)>>('setlocale'); - late final _setlocale = _setlocalePtr - .asFunction Function(int, ffi.Pointer)>(); - - int __math_errhandling() { - return ___math_errhandling(); - } - - late final ___math_errhandlingPtr = - _lookup>('__math_errhandling'); - late final ___math_errhandling = - ___math_errhandlingPtr.asFunction(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - int __fpclassifyf( - double arg0, + late final _sel_removeObject_1 = _registerName1("removeObject:"); + late final _sel_removeObjectIdenticalTo_inRange_1 = + _registerName1("removeObjectIdenticalTo:inRange:"); + late final _sel_removeObjectIdenticalTo_1 = + _registerName1("removeObjectIdenticalTo:"); + late final _sel_removeObjectsFromIndices_numIndices_1 = + _registerName1("removeObjectsFromIndices:numIndices:"); + void _objc_msgSend_294( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indices, + int cnt, ) { - return ___fpclassifyf( - arg0, + return __objc_msgSend_294( + obj, + sel, + indices, + cnt, ); } - late final ___fpclassifyfPtr = - _lookup>('__fpclassifyf'); - late final ___fpclassifyf = - ___fpclassifyfPtr.asFunction(); + late final __objc_msgSend_294Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - int __fpclassifyd( - double arg0, + late final _sel_removeObjectsInArray_1 = + _registerName1("removeObjectsInArray:"); + late final _sel_removeObjectsInRange_1 = + _registerName1("removeObjectsInRange:"); + late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = + _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); + void _objc_msgSend_295( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer otherArray, + NSRange otherRange, ) { - return ___fpclassifyd( - arg0, + return __objc_msgSend_295( + obj, + sel, + range, + otherArray, + otherRange, ); } - late final ___fpclassifydPtr = - _lookup>( - '__fpclassifyd'); - late final ___fpclassifyd = - ___fpclassifydPtr.asFunction(); + late final __objc_msgSend_295Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer, NSRange)>(); - double acosf( - double arg0, + late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = + _registerName1("replaceObjectsInRange:withObjectsFromArray:"); + void _objc_msgSend_296( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer otherArray, ) { - return _acosf( - arg0, + return __objc_msgSend_296( + obj, + sel, + range, + otherArray, ); } - late final _acosfPtr = - _lookup>('acosf'); - late final _acosf = _acosfPtr.asFunction(); + late final __objc_msgSend_296Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); - double acos( - double arg0, + late final _sel_setArray_1 = _registerName1("setArray:"); + late final _sel_sortUsingFunction_context_1 = + _registerName1("sortUsingFunction:context:"); + void _objc_msgSend_297( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context, ) { - return _acos( - arg0, + return __objc_msgSend_297( + obj, + sel, + compare, + context, ); } - late final _acosPtr = - _lookup>('acos'); - late final _acos = _acosPtr.asFunction(); + late final __objc_msgSend_297Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); - double asinf( - double arg0, + late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); + late final _sel_insertObjects_atIndexes_1 = + _registerName1("insertObjects:atIndexes:"); + void _objc_msgSend_298( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer objects, + ffi.Pointer indexes, ) { - return _asinf( - arg0, + return __objc_msgSend_298( + obj, + sel, + objects, + indexes, ); } - late final _asinfPtr = - _lookup>('asinf'); - late final _asinf = _asinfPtr.asFunction(); + late final __objc_msgSend_298Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double asin( - double arg0, + late final _sel_removeObjectsAtIndexes_1 = + _registerName1("removeObjectsAtIndexes:"); + late final _sel_replaceObjectsAtIndexes_withObjects_1 = + _registerName1("replaceObjectsAtIndexes:withObjects:"); + void _objc_msgSend_299( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + ffi.Pointer objects, ) { - return _asin( - arg0, + return __objc_msgSend_299( + obj, + sel, + indexes, + objects, ); } - late final _asinPtr = - _lookup>('asin'); - late final _asin = _asinPtr.asFunction(); + late final __objc_msgSend_299Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double atanf( - double arg0, + late final _sel_setObject_atIndexedSubscript_1 = + _registerName1("setObject:atIndexedSubscript:"); + late final _sel_sortUsingComparator_1 = + _registerName1("sortUsingComparator:"); + void _objc_msgSend_300( + ffi.Pointer obj, + ffi.Pointer sel, + NSComparator cmptr, ) { - return _atanf( - arg0, + return __objc_msgSend_300( + obj, + sel, + cmptr, ); } - late final _atanfPtr = - _lookup>('atanf'); - late final _atanf = _atanfPtr.asFunction(); + late final __objc_msgSend_300Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, NSComparator)>(); - double atan( - double arg0, + late final _sel_sortWithOptions_usingComparator_1 = + _registerName1("sortWithOptions:usingComparator:"); + void _objc_msgSend_301( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + NSComparator cmptr, ) { - return _atan( - arg0, + return __objc_msgSend_301( + obj, + sel, + opts, + cmptr, ); } - late final _atanPtr = - _lookup>('atan'); - late final _atan = _atanPtr.asFunction(); + late final __objc_msgSend_301Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, int, NSComparator)>(); - double atan2f( - double arg0, - double arg1, + late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); + ffi.Pointer _objc_msgSend_302( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, ) { - return _atan2f( - arg0, - arg1, + return __objc_msgSend_302( + obj, + sel, + path, ); } - late final _atan2fPtr = - _lookup>( - 'atan2f'); - late final _atan2f = _atan2fPtr.asFunction(); + late final __objc_msgSend_302Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double atan2( - double arg0, - double arg1, + ffi.Pointer _objc_msgSend_303( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, ) { - return _atan2( - arg0, - arg1, + return __objc_msgSend_303( + obj, + sel, + url, ); } - late final _atan2Ptr = - _lookup>( - 'atan2'); - late final _atan2 = _atan2Ptr.asFunction(); + late final __objc_msgSend_303Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double cosf( - double arg0, + late final _sel_applyDifference_1 = _registerName1("applyDifference:"); + void _objc_msgSend_304( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer difference, ) { - return _cosf( - arg0, + return __objc_msgSend_304( + obj, + sel, + difference, ); } - late final _cosfPtr = - _lookup>('cosf'); - late final _cosf = _cosfPtr.asFunction(); + late final __objc_msgSend_304Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double cos( - double arg0, + late final _class_NSMutableData1 = _getClass1("NSMutableData"); + late final _sel_mutableBytes1 = _registerName1("mutableBytes"); + late final _sel_setLength_1 = _registerName1("setLength:"); + void _objc_msgSend_305( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _cos( - arg0, + return __objc_msgSend_305( + obj, + sel, + value, ); } - late final _cosPtr = - _lookup>('cos'); - late final _cos = _cosPtr.asFunction(); + late final __objc_msgSend_305Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double sinf( - double arg0, + late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); + late final _sel_appendData_1 = _registerName1("appendData:"); + void _objc_msgSend_306( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, ) { - return _sinf( - arg0, + return __objc_msgSend_306( + obj, + sel, + other, ); } - late final _sinfPtr = - _lookup>('sinf'); - late final _sinf = _sinfPtr.asFunction(); + late final __objc_msgSend_306Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double sin( - double arg0, + late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); + late final _sel_replaceBytesInRange_withBytes_1 = + _registerName1("replaceBytesInRange:withBytes:"); + void _objc_msgSend_307( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer bytes, ) { - return _sin( - arg0, + return __objc_msgSend_307( + obj, + sel, + range, + bytes, ); } - late final _sinPtr = - _lookup>('sin'); - late final _sin = _sinPtr.asFunction(); + late final __objc_msgSend_307Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); - double tanf( - double arg0, + late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); + late final _sel_setData_1 = _registerName1("setData:"); + late final _sel_replaceBytesInRange_withBytes_length_1 = + _registerName1("replaceBytesInRange:withBytes:length:"); + void _objc_msgSend_308( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer replacementBytes, + int replacementLength, ) { - return _tanf( - arg0, + return __objc_msgSend_308( + obj, + sel, + range, + replacementBytes, + replacementLength, ); } - late final _tanfPtr = - _lookup>('tanf'); - late final _tanf = _tanfPtr.asFunction(); + late final __objc_msgSend_308Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer, int)>(); - double tan( - double arg0, + late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); + late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); + late final _sel_initWithLength_1 = _registerName1("initWithLength:"); + late final _sel_decompressUsingAlgorithm_error_1 = + _registerName1("decompressUsingAlgorithm:error:"); + bool _objc_msgSend_309( + ffi.Pointer obj, + ffi.Pointer sel, + int algorithm, + ffi.Pointer> error, ) { - return _tan( - arg0, + return __objc_msgSend_309( + obj, + sel, + algorithm, + error, ); } - late final _tanPtr = - _lookup>('tan'); - late final _tan = _tanPtr.asFunction(); - - double acoshf( - double arg0, - ) { - return _acoshf( - arg0, - ); - } + late final __objc_msgSend_309Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer>)>(); - late final _acoshfPtr = - _lookup>('acoshf'); - late final _acoshf = _acoshfPtr.asFunction(); - - double acosh( - double arg0, + late final _sel_compressUsingAlgorithm_error_1 = + _registerName1("compressUsingAlgorithm:error:"); + late final _class_NSPurgeableData1 = _getClass1("NSPurgeableData"); + late final _class_NSMutableDictionary1 = _getClass1("NSMutableDictionary"); + late final _sel_removeObjectForKey_1 = _registerName1("removeObjectForKey:"); + late final _sel_setObject_forKey_1 = _registerName1("setObject:forKey:"); + void _objc_msgSend_310( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ffi.Pointer aKey, ) { - return _acosh( - arg0, + return __objc_msgSend_310( + obj, + sel, + anObject, + aKey, ); } - late final _acoshPtr = - _lookup>('acosh'); - late final _acosh = _acoshPtr.asFunction(); + late final __objc_msgSend_310Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double asinhf( - double arg0, + late final _sel_addEntriesFromDictionary_1 = + _registerName1("addEntriesFromDictionary:"); + void _objc_msgSend_311( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDictionary, ) { - return _asinhf( - arg0, + return __objc_msgSend_311( + obj, + sel, + otherDictionary, ); } - late final _asinhfPtr = - _lookup>('asinhf'); - late final _asinhf = _asinhfPtr.asFunction(); + late final __objc_msgSend_311Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double asinh( - double arg0, + late final _sel_removeObjectsForKeys_1 = + _registerName1("removeObjectsForKeys:"); + late final _sel_setDictionary_1 = _registerName1("setDictionary:"); + late final _sel_setObject_forKeyedSubscript_1 = + _registerName1("setObject:forKeyedSubscript:"); + late final _sel_dictionaryWithCapacity_1 = + _registerName1("dictionaryWithCapacity:"); + ffi.Pointer _objc_msgSend_312( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, ) { - return _asinh( - arg0, + return __objc_msgSend_312( + obj, + sel, + path, ); } - late final _asinhPtr = - _lookup>('asinh'); - late final _asinh = _asinhPtr.asFunction(); + late final __objc_msgSend_312Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double atanhf( - double arg0, + ffi.Pointer _objc_msgSend_313( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, ) { - return _atanhf( - arg0, + return __objc_msgSend_313( + obj, + sel, + url, ); } - late final _atanhfPtr = - _lookup>('atanhf'); - late final _atanhf = _atanhfPtr.asFunction(); + late final __objc_msgSend_313Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double atanh( - double arg0, + late final _sel_dictionaryWithSharedKeySet_1 = + _registerName1("dictionaryWithSharedKeySet:"); + ffi.Pointer _objc_msgSend_314( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyset, ) { - return _atanh( - arg0, + return __objc_msgSend_314( + obj, + sel, + keyset, ); } - late final _atanhPtr = - _lookup>('atanh'); - late final _atanh = _atanhPtr.asFunction(); + late final __objc_msgSend_314Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double coshf( - double arg0, + late final _class_NSNotification1 = _getClass1("NSNotification"); + late final _sel_name1 = _registerName1("name"); + late final _sel_initWithName_object_userInfo_1 = + _registerName1("initWithName:object:userInfo:"); + instancetype _objc_msgSend_315( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName name, + ffi.Pointer object, + ffi.Pointer userInfo, ) { - return _coshf( - arg0, + return __objc_msgSend_315( + obj, + sel, + name, + object, + userInfo, ); } - late final _coshfPtr = - _lookup>('coshf'); - late final _coshf = _coshfPtr.asFunction(); + late final __objc_msgSend_315Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>(); - double cosh( - double arg0, + late final _sel_notificationWithName_object_1 = + _registerName1("notificationWithName:object:"); + late final _sel_notificationWithName_object_userInfo_1 = + _registerName1("notificationWithName:object:userInfo:"); + late final _class_NSNotificationCenter1 = _getClass1("NSNotificationCenter"); + late final _sel_defaultCenter1 = _registerName1("defaultCenter"); + ffi.Pointer _objc_msgSend_316( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _cosh( - arg0, + return __objc_msgSend_316( + obj, + sel, ); } - late final _coshPtr = - _lookup>('cosh'); - late final _cosh = _coshPtr.asFunction(); + late final __objc_msgSend_316Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double sinhf( - double arg0, + late final _sel_addObserver_selector_name_object_1 = + _registerName1("addObserver:selector:name:object:"); + void _objc_msgSend_317( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + ffi.Pointer aSelector, + NSNotificationName aName, + ffi.Pointer anObject, ) { - return _sinhf( - arg0, + return __objc_msgSend_317( + obj, + sel, + observer, + aSelector, + aName, + anObject, ); } - late final _sinhfPtr = - _lookup>('sinhf'); - late final _sinhf = _sinhfPtr.asFunction(); + late final __objc_msgSend_317Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>(); - double sinh( - double arg0, + late final _sel_postNotification_1 = _registerName1("postNotification:"); + void _objc_msgSend_318( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer notification, ) { - return _sinh( - arg0, + return __objc_msgSend_318( + obj, + sel, + notification, ); } - late final _sinhPtr = - _lookup>('sinh'); - late final _sinh = _sinhPtr.asFunction(); + late final __objc_msgSend_318Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double tanhf( - double arg0, + late final _sel_postNotificationName_object_1 = + _registerName1("postNotificationName:object:"); + void _objc_msgSend_319( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName aName, + ffi.Pointer anObject, ) { - return _tanhf( - arg0, + return __objc_msgSend_319( + obj, + sel, + aName, + anObject, ); } - late final _tanhfPtr = - _lookup>('tanhf'); - late final _tanhf = _tanhfPtr.asFunction(); + late final __objc_msgSend_319Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSNotificationName, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSNotificationName, ffi.Pointer)>(); - double tanh( - double arg0, + late final _sel_postNotificationName_object_userInfo_1 = + _registerName1("postNotificationName:object:userInfo:"); + void _objc_msgSend_320( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName aName, + ffi.Pointer anObject, + ffi.Pointer aUserInfo, ) { - return _tanh( - arg0, + return __objc_msgSend_320( + obj, + sel, + aName, + anObject, + aUserInfo, ); } - late final _tanhPtr = - _lookup>('tanh'); - late final _tanh = _tanhPtr.asFunction(); + late final __objc_msgSend_320Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>(); - double expf( - double arg0, + late final _sel_removeObserver_1 = _registerName1("removeObserver:"); + late final _sel_removeObserver_name_object_1 = + _registerName1("removeObserver:name:object:"); + void _objc_msgSend_321( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + NSNotificationName aName, + ffi.Pointer anObject, ) { - return _expf( - arg0, + return __objc_msgSend_321( + obj, + sel, + observer, + aName, + anObject, ); } - late final _expfPtr = - _lookup>('expf'); - late final _expf = _expfPtr.asFunction(); + late final __objc_msgSend_321Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>(); - double exp( - double arg0, + late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); + late final _class_NSProgress1 = _getClass1("NSProgress"); + late final _sel_currentProgress1 = _registerName1("currentProgress"); + ffi.Pointer _objc_msgSend_322( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _exp( - arg0, + return __objc_msgSend_322( + obj, + sel, ); } - late final _expPtr = - _lookup>('exp'); - late final _exp = _expPtr.asFunction(); + late final __objc_msgSend_322Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double exp2f( - double arg0, + late final _sel_progressWithTotalUnitCount_1 = + _registerName1("progressWithTotalUnitCount:"); + ffi.Pointer _objc_msgSend_323( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, ) { - return _exp2f( - arg0, + return __objc_msgSend_323( + obj, + sel, + unitCount, ); } - late final _exp2fPtr = - _lookup>('exp2f'); - late final _exp2f = _exp2fPtr.asFunction(); + late final __objc_msgSend_323Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - double exp2( - double arg0, + late final _sel_discreteProgressWithTotalUnitCount_1 = + _registerName1("discreteProgressWithTotalUnitCount:"); + late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = + _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); + ffi.Pointer _objc_msgSend_324( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ffi.Pointer parent, + int portionOfParentTotalUnitCount, ) { - return _exp2( - arg0, + return __objc_msgSend_324( + obj, + sel, + unitCount, + parent, + portionOfParentTotalUnitCount, ); } - late final _exp2Ptr = - _lookup>('exp2'); - late final _exp2 = _exp2Ptr.asFunction(); + late final __objc_msgSend_324Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); - double expm1f( - double arg0, + late final _sel_initWithParent_userInfo_1 = + _registerName1("initWithParent:userInfo:"); + instancetype _objc_msgSend_325( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer parentProgressOrNil, + ffi.Pointer userInfoOrNil, ) { - return _expm1f( - arg0, + return __objc_msgSend_325( + obj, + sel, + parentProgressOrNil, + userInfoOrNil, ); } - late final _expm1fPtr = - _lookup>('expm1f'); - late final _expm1f = _expm1fPtr.asFunction(); + late final __objc_msgSend_325Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double expm1( - double arg0, + late final _sel_becomeCurrentWithPendingUnitCount_1 = + _registerName1("becomeCurrentWithPendingUnitCount:"); + void _objc_msgSend_326( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, ) { - return _expm1( - arg0, + return __objc_msgSend_326( + obj, + sel, + unitCount, ); } - late final _expm1Ptr = - _lookup>('expm1'); - late final _expm1 = _expm1Ptr.asFunction(); + late final __objc_msgSend_326Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double logf( - double arg0, + late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = + _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); + void _objc_msgSend_327( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ffi.Pointer<_ObjCBlock> work, ) { - return _logf( - arg0, + return __objc_msgSend_327( + obj, + sel, + unitCount, + work, ); } - late final _logfPtr = - _lookup>('logf'); - late final _logf = _logfPtr.asFunction(); + late final __objc_msgSend_327Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - double log( - double arg0, - ) { - return _log( - arg0, - ); + late final _sel_resignCurrent1 = _registerName1("resignCurrent"); + late final _sel_addChild_withPendingUnitCount_1 = + _registerName1("addChild:withPendingUnitCount:"); + void _objc_msgSend_328( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer child, + int inUnitCount, + ) { + return __objc_msgSend_328( + obj, + sel, + child, + inUnitCount, + ); } - late final _logPtr = - _lookup>('log'); - late final _log = _logPtr.asFunction(); + late final __objc_msgSend_328Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - double log10f( - double arg0, + late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); + int _objc_msgSend_329( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _log10f( - arg0, + return __objc_msgSend_329( + obj, + sel, ); } - late final _log10fPtr = - _lookup>('log10f'); - late final _log10f = _log10fPtr.asFunction(); + late final __objc_msgSend_329Ptr = _lookup< + ffi.NativeFunction< + ffi.Int64 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double log10( - double arg0, + late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); + void _objc_msgSend_330( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _log10( - arg0, + return __objc_msgSend_330( + obj, + sel, + value, ); } - late final _log10Ptr = - _lookup>('log10'); - late final _log10 = _log10Ptr.asFunction(); + late final __objc_msgSend_330Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double log2f( - double arg0, + late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); + late final _sel_setCompletedUnitCount_1 = + _registerName1("setCompletedUnitCount:"); + late final _sel_setLocalizedDescription_1 = + _registerName1("setLocalizedDescription:"); + void _objc_msgSend_331( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _log2f( - arg0, + return __objc_msgSend_331( + obj, + sel, + value, ); } - late final _log2fPtr = - _lookup>('log2f'); - late final _log2f = _log2fPtr.asFunction(); + late final __objc_msgSend_331Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double log2( - double arg0, + late final _sel_localizedAdditionalDescription1 = + _registerName1("localizedAdditionalDescription"); + late final _sel_setLocalizedAdditionalDescription_1 = + _registerName1("setLocalizedAdditionalDescription:"); + late final _sel_isCancellable1 = _registerName1("isCancellable"); + late final _sel_setCancellable_1 = _registerName1("setCancellable:"); + void _objc_msgSend_332( + ffi.Pointer obj, + ffi.Pointer sel, + bool value, ) { - return _log2( - arg0, + return __objc_msgSend_332( + obj, + sel, + value, ); } - late final _log2Ptr = - _lookup>('log2'); - late final _log2 = _log2Ptr.asFunction(); + late final __objc_msgSend_332Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, bool)>(); - double log1pf( - double arg0, + late final _sel_isPausable1 = _registerName1("isPausable"); + late final _sel_setPausable_1 = _registerName1("setPausable:"); + late final _sel_isCancelled1 = _registerName1("isCancelled"); + late final _sel_isPaused1 = _registerName1("isPaused"); + late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_333( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _log1pf( - arg0, + return __objc_msgSend_333( + obj, + sel, ); } - late final _log1pfPtr = - _lookup>('log1pf'); - late final _log1pf = _log1pfPtr.asFunction(); + late final __objc_msgSend_333Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>(); - double log1p( - double arg0, + late final _sel_setCancellationHandler_1 = + _registerName1("setCancellationHandler:"); + void _objc_msgSend_334( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> value, ) { - return _log1p( - arg0, + return __objc_msgSend_334( + obj, + sel, + value, ); } - late final _log1pPtr = - _lookup>('log1p'); - late final _log1p = _log1pPtr.asFunction(); + late final __objc_msgSend_334Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - double logbf( - double arg0, + late final _sel_pausingHandler1 = _registerName1("pausingHandler"); + late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); + late final _sel_resumingHandler1 = _registerName1("resumingHandler"); + late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); + late final _sel_setUserInfoObject_forKey_1 = + _registerName1("setUserInfoObject:forKey:"); + late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); + late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); + late final _sel_isFinished1 = _registerName1("isFinished"); + late final _sel_cancel1 = _registerName1("cancel"); + late final _sel_pause1 = _registerName1("pause"); + late final _sel_resume1 = _registerName1("resume"); + late final _sel_kind1 = _registerName1("kind"); + late final _sel_setKind_1 = _registerName1("setKind:"); + late final _sel_estimatedTimeRemaining1 = + _registerName1("estimatedTimeRemaining"); + late final _sel_setEstimatedTimeRemaining_1 = + _registerName1("setEstimatedTimeRemaining:"); + void _objc_msgSend_335( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _logbf( - arg0, + return __objc_msgSend_335( + obj, + sel, + value, ); } - late final _logbfPtr = - _lookup>('logbf'); - late final _logbf = _logbfPtr.asFunction(); + late final __objc_msgSend_335Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double logb( - double arg0, + late final _sel_throughput1 = _registerName1("throughput"); + late final _sel_setThroughput_1 = _registerName1("setThroughput:"); + late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); + late final _sel_setFileOperationKind_1 = + _registerName1("setFileOperationKind:"); + late final _sel_fileURL1 = _registerName1("fileURL"); + late final _sel_setFileURL_1 = _registerName1("setFileURL:"); + void _objc_msgSend_336( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _logb( - arg0, + return __objc_msgSend_336( + obj, + sel, + value, ); } - late final _logbPtr = - _lookup>('logb'); - late final _logb = _logbPtr.asFunction(); + late final __objc_msgSend_336Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double modff( - double arg0, - ffi.Pointer arg1, + late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); + late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); + late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); + late final _sel_setFileCompletedCount_1 = + _registerName1("setFileCompletedCount:"); + late final _sel_publish1 = _registerName1("publish"); + late final _sel_unpublish1 = _registerName1("unpublish"); + late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = + _registerName1("addSubscriberForFileURL:withPublishingHandler:"); + ffi.Pointer _objc_msgSend_337( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + NSProgressPublishingHandler publishingHandler, ) { - return _modff( - arg0, - arg1, + return __objc_msgSend_337( + obj, + sel, + url, + publishingHandler, ); } - late final _modffPtr = _lookup< + late final __objc_msgSend_337Ptr = _lookup< ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Pointer)>>('modff'); - late final _modff = - _modffPtr.asFunction)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>>('objc_msgSend'); + late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>(); - double modf( - double arg0, - ffi.Pointer arg1, + late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); + late final _sel_isOld1 = _registerName1("isOld"); + late final _sel_progress1 = _registerName1("progress"); + late final _class_NSOperation1 = _getClass1("NSOperation"); + late final _sel_start1 = _registerName1("start"); + late final _sel_main1 = _registerName1("main"); + late final _sel_isExecuting1 = _registerName1("isExecuting"); + late final _sel_isConcurrent1 = _registerName1("isConcurrent"); + late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); + late final _sel_isReady1 = _registerName1("isReady"); + late final _sel_addDependency_1 = _registerName1("addDependency:"); + void _objc_msgSend_338( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer op, ) { - return _modf( - arg0, - arg1, + return __objc_msgSend_338( + obj, + sel, + op, ); } - late final _modfPtr = _lookup< + late final __objc_msgSend_338Ptr = _lookup< ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Pointer)>>('modf'); - late final _modf = - _modfPtr.asFunction)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double ldexpf( - double arg0, - int arg1, + late final _sel_removeDependency_1 = _registerName1("removeDependency:"); + late final _sel_dependencies1 = _registerName1("dependencies"); + late final _sel_queuePriority1 = _registerName1("queuePriority"); + int _objc_msgSend_339( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _ldexpf( - arg0, - arg1, + return __objc_msgSend_339( + obj, + sel, ); } - late final _ldexpfPtr = - _lookup>( - 'ldexpf'); - late final _ldexpf = _ldexpfPtr.asFunction(); + late final __objc_msgSend_339Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double ldexp( - double arg0, - int arg1, + late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); + void _objc_msgSend_340( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _ldexp( - arg0, - arg1, + return __objc_msgSend_340( + obj, + sel, + value, ); } - late final _ldexpPtr = - _lookup>( - 'ldexp'); - late final _ldexp = _ldexpPtr.asFunction(); + late final __objc_msgSend_340Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double frexpf( - double arg0, - ffi.Pointer arg1, + late final _sel_completionBlock1 = _registerName1("completionBlock"); + late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); + late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); + late final _sel_threadPriority1 = _registerName1("threadPriority"); + late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); + void _objc_msgSend_341( + ffi.Pointer obj, + ffi.Pointer sel, + double value, ) { - return _frexpf( - arg0, - arg1, + return __objc_msgSend_341( + obj, + sel, + value, ); } - late final _frexpfPtr = _lookup< + late final __objc_msgSend_341Ptr = _lookup< ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Pointer)>>('frexpf'); - late final _frexpf = - _frexpfPtr.asFunction)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); - double frexp( - double arg0, - ffi.Pointer arg1, + late final _sel_qualityOfService1 = _registerName1("qualityOfService"); + int _objc_msgSend_342( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _frexp( - arg0, - arg1, + return __objc_msgSend_342( + obj, + sel, ); } - late final _frexpPtr = _lookup< + late final __objc_msgSend_342Ptr = _lookup< ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Pointer)>>('frexp'); - late final _frexp = - _frexpPtr.asFunction)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int ilogbf( - double arg0, + late final _sel_setQualityOfService_1 = + _registerName1("setQualityOfService:"); + void _objc_msgSend_343( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _ilogbf( - arg0, + return __objc_msgSend_343( + obj, + sel, + value, ); } - late final _ilogbfPtr = - _lookup>('ilogbf'); - late final _ilogbf = _ilogbfPtr.asFunction(); + late final __objc_msgSend_343Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int ilogb( - double arg0, + late final _sel_setName_1 = _registerName1("setName:"); + late final _sel_addOperation_1 = _registerName1("addOperation:"); + late final _sel_addOperations_waitUntilFinished_1 = + _registerName1("addOperations:waitUntilFinished:"); + void _objc_msgSend_344( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer ops, + bool wait, ) { - return _ilogb( - arg0, + return __objc_msgSend_344( + obj, + sel, + ops, + wait, ); } - late final _ilogbPtr = - _lookup>('ilogb'); - late final _ilogb = _ilogbPtr.asFunction(); + late final __objc_msgSend_344Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - double scalbnf( - double arg0, - int arg1, + late final _sel_addOperationWithBlock_1 = + _registerName1("addOperationWithBlock:"); + void _objc_msgSend_345( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return _scalbnf( - arg0, - arg1, + return __objc_msgSend_345( + obj, + sel, + block, ); } - late final _scalbnfPtr = - _lookup>( - 'scalbnf'); - late final _scalbnf = _scalbnfPtr.asFunction(); + late final __objc_msgSend_345Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - double scalbn( - double arg0, - int arg1, + late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); + late final _sel_maxConcurrentOperationCount1 = + _registerName1("maxConcurrentOperationCount"); + late final _sel_setMaxConcurrentOperationCount_1 = + _registerName1("setMaxConcurrentOperationCount:"); + void _objc_msgSend_346( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _scalbn( - arg0, - arg1, + return __objc_msgSend_346( + obj, + sel, + value, ); } - late final _scalbnPtr = - _lookup>( - 'scalbn'); - late final _scalbn = _scalbnPtr.asFunction(); + late final __objc_msgSend_346Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double scalblnf( - double arg0, - int arg1, + late final _sel_isSuspended1 = _registerName1("isSuspended"); + late final _sel_setSuspended_1 = _registerName1("setSuspended:"); + late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); + dispatch_queue_t _objc_msgSend_347( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _scalblnf( - arg0, - arg1, + return __objc_msgSend_347( + obj, + sel, ); } - late final _scalblnfPtr = - _lookup>( - 'scalblnf'); - late final _scalblnf = - _scalblnfPtr.asFunction(); + late final __objc_msgSend_347Ptr = _lookup< + ffi.NativeFunction< + dispatch_queue_t Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< + dispatch_queue_t Function( + ffi.Pointer, ffi.Pointer)>(); - double scalbln( - double arg0, - int arg1, + late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); + void _objc_msgSend_348( + ffi.Pointer obj, + ffi.Pointer sel, + dispatch_queue_t value, ) { - return _scalbln( - arg0, - arg1, + return __objc_msgSend_348( + obj, + sel, + value, ); } - late final _scalblnPtr = - _lookup>( - 'scalbln'); - late final _scalbln = _scalblnPtr.asFunction(); + late final __objc_msgSend_348Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + dispatch_queue_t)>>('objc_msgSend'); + late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); - double fabsf( - double arg0, + late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); + late final _sel_waitUntilAllOperationsAreFinished1 = + _registerName1("waitUntilAllOperationsAreFinished"); + late final _sel_currentQueue1 = _registerName1("currentQueue"); + ffi.Pointer _objc_msgSend_349( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _fabsf( - arg0, + return __objc_msgSend_349( + obj, + sel, ); } - late final _fabsfPtr = - _lookup>('fabsf'); - late final _fabsf = _fabsfPtr.asFunction(); + late final __objc_msgSend_349Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double fabs( - double arg0, + late final _sel_mainQueue1 = _registerName1("mainQueue"); + late final _sel_operations1 = _registerName1("operations"); + late final _sel_operationCount1 = _registerName1("operationCount"); + late final _sel_addObserverForName_object_queue_usingBlock_1 = + _registerName1("addObserverForName:object:queue:usingBlock:"); + ffi.Pointer _objc_msgSend_350( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName name, + ffi.Pointer obj1, + ffi.Pointer queue, + ffi.Pointer<_ObjCBlock> block, ) { - return _fabs( - arg0, + return __objc_msgSend_350( + obj, + sel, + name, + obj1, + queue, + block, ); } - late final _fabsPtr = - _lookup>('fabs'); - late final _fabs = _fabsPtr.asFunction(); + late final __objc_msgSend_350Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - double cbrtf( - double arg0, - ) { - return _cbrtf( - arg0, - ); - } + late final ffi.Pointer + _NSSystemClockDidChangeNotification = + _lookup('NSSystemClockDidChangeNotification'); - late final _cbrtfPtr = - _lookup>('cbrtf'); - late final _cbrtf = _cbrtfPtr.asFunction(); + NSNotificationName get NSSystemClockDidChangeNotification => + _NSSystemClockDidChangeNotification.value; - double cbrt( - double arg0, + set NSSystemClockDidChangeNotification(NSNotificationName value) => + _NSSystemClockDidChangeNotification.value = value; + + late final _class_NSDate1 = _getClass1("NSDate"); + late final _sel_timeIntervalSinceReferenceDate1 = + _registerName1("timeIntervalSinceReferenceDate"); + late final _sel_initWithTimeIntervalSinceReferenceDate_1 = + _registerName1("initWithTimeIntervalSinceReferenceDate:"); + instancetype _objc_msgSend_351( + ffi.Pointer obj, + ffi.Pointer sel, + double ti, ) { - return _cbrt( - arg0, + return __objc_msgSend_351( + obj, + sel, + ti, ); } - late final _cbrtPtr = - _lookup>('cbrt'); - late final _cbrt = _cbrtPtr.asFunction(); + late final __objc_msgSend_351Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, double)>(); - double hypotf( - double arg0, - double arg1, + late final _sel_timeIntervalSinceDate_1 = + _registerName1("timeIntervalSinceDate:"); + double _objc_msgSend_352( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, ) { - return _hypotf( - arg0, - arg1, + return __objc_msgSend_352( + obj, + sel, + anotherDate, ); } - late final _hypotfPtr = - _lookup>( - 'hypotf'); - late final _hypotf = _hypotfPtr.asFunction(); + late final __objc_msgSend_352Ptr = _lookup< + ffi.NativeFunction< + NSTimeInterval Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double hypot( - double arg0, - double arg1, + late final _sel_timeIntervalSinceNow1 = + _registerName1("timeIntervalSinceNow"); + late final _sel_timeIntervalSince19701 = + _registerName1("timeIntervalSince1970"); + late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); + late final _sel_dateByAddingTimeInterval_1 = + _registerName1("dateByAddingTimeInterval:"); + late final _sel_earlierDate_1 = _registerName1("earlierDate:"); + ffi.Pointer _objc_msgSend_353( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, ) { - return _hypot( - arg0, - arg1, + return __objc_msgSend_353( + obj, + sel, + anotherDate, ); } - late final _hypotPtr = - _lookup>( - 'hypot'); - late final _hypot = _hypotPtr.asFunction(); + late final __objc_msgSend_353Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double powf( - double arg0, - double arg1, + late final _sel_laterDate_1 = _registerName1("laterDate:"); + int _objc_msgSend_354( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, ) { - return _powf( - arg0, - arg1, + return __objc_msgSend_354( + obj, + sel, + other, ); } - late final _powfPtr = - _lookup>( - 'powf'); - late final _powf = _powfPtr.asFunction(); + late final __objc_msgSend_354Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double pow( - double arg0, - double arg1, + late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); + bool _objc_msgSend_355( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDate, ) { - return _pow( - arg0, - arg1, + return __objc_msgSend_355( + obj, + sel, + otherDate, ); } - late final _powPtr = - _lookup>( - 'pow'); - late final _pow = _powPtr.asFunction(); + late final __objc_msgSend_355Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double sqrtf( - double arg0, + late final _sel_date1 = _registerName1("date"); + late final _sel_dateWithTimeIntervalSinceNow_1 = + _registerName1("dateWithTimeIntervalSinceNow:"); + late final _sel_dateWithTimeIntervalSinceReferenceDate_1 = + _registerName1("dateWithTimeIntervalSinceReferenceDate:"); + late final _sel_dateWithTimeIntervalSince1970_1 = + _registerName1("dateWithTimeIntervalSince1970:"); + late final _sel_dateWithTimeInterval_sinceDate_1 = + _registerName1("dateWithTimeInterval:sinceDate:"); + instancetype _objc_msgSend_356( + ffi.Pointer obj, + ffi.Pointer sel, + double secsToBeAdded, + ffi.Pointer date, ) { - return _sqrtf( - arg0, + return __objc_msgSend_356( + obj, + sel, + secsToBeAdded, + date, ); } - late final _sqrtfPtr = - _lookup>('sqrtf'); - late final _sqrtf = _sqrtfPtr.asFunction(); + late final __objc_msgSend_356Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + double, ffi.Pointer)>(); - double sqrt( - double arg0, + late final _sel_distantFuture1 = _registerName1("distantFuture"); + ffi.Pointer _objc_msgSend_357( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _sqrt( - arg0, + return __objc_msgSend_357( + obj, + sel, ); } - late final _sqrtPtr = - _lookup>('sqrt'); - late final _sqrt = _sqrtPtr.asFunction(); + late final __objc_msgSend_357Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double erff( - double arg0, + late final _sel_distantPast1 = _registerName1("distantPast"); + late final _sel_now1 = _registerName1("now"); + late final _sel_initWithTimeIntervalSinceNow_1 = + _registerName1("initWithTimeIntervalSinceNow:"); + late final _sel_initWithTimeIntervalSince1970_1 = + _registerName1("initWithTimeIntervalSince1970:"); + late final _sel_initWithTimeInterval_sinceDate_1 = + _registerName1("initWithTimeInterval:sinceDate:"); + late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); + late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); + late final _sel_supportsSecureCoding1 = + _registerName1("supportsSecureCoding"); + late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); + instancetype _objc_msgSend_358( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URL, + int cachePolicy, + double timeoutInterval, ) { - return _erff( - arg0, + return __objc_msgSend_358( + obj, + sel, + URL, + cachePolicy, + timeoutInterval, ); } - late final _erffPtr = - _lookup>('erff'); - late final _erff = _erffPtr.asFunction(); + late final __objc_msgSend_358Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, double)>(); - double erf( - double arg0, + late final _sel_initWithURL_1 = _registerName1("initWithURL:"); + late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("initWithURL:cachePolicy:timeoutInterval:"); + late final _sel_URL1 = _registerName1("URL"); + late final _sel_cachePolicy1 = _registerName1("cachePolicy"); + int _objc_msgSend_359( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _erf( - arg0, + return __objc_msgSend_359( + obj, + sel, ); } - late final _erfPtr = - _lookup>('erf'); - late final _erf = _erfPtr.asFunction(); + late final __objc_msgSend_359Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double erfcf( - double arg0, + late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); + late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); + late final _sel_networkServiceType1 = _registerName1("networkServiceType"); + int _objc_msgSend_360( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _erfcf( - arg0, + return __objc_msgSend_360( + obj, + sel, ); } - late final _erfcfPtr = - _lookup>('erfcf'); - late final _erfcf = _erfcfPtr.asFunction(); + late final __objc_msgSend_360Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double erfc( - double arg0, + late final _sel_allowsCellularAccess1 = + _registerName1("allowsCellularAccess"); + late final _sel_allowsExpensiveNetworkAccess1 = + _registerName1("allowsExpensiveNetworkAccess"); + late final _sel_allowsConstrainedNetworkAccess1 = + _registerName1("allowsConstrainedNetworkAccess"); + late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); + late final _sel_attribution1 = _registerName1("attribution"); + int _objc_msgSend_361( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _erfc( - arg0, + return __objc_msgSend_361( + obj, + sel, ); } - late final _erfcPtr = - _lookup>('erfc'); - late final _erfc = _erfcPtr.asFunction(); + late final __objc_msgSend_361Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double lgammaf( - double arg0, + late final _sel_requiresDNSSECValidation1 = + _registerName1("requiresDNSSECValidation"); + late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); + late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); + late final _sel_valueForHTTPHeaderField_1 = + _registerName1("valueForHTTPHeaderField:"); + late final _sel_HTTPBody1 = _registerName1("HTTPBody"); + late final _class_NSInputStream1 = _getClass1("NSInputStream"); + late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); + ffi.Pointer _objc_msgSend_362( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _lgammaf( - arg0, + return __objc_msgSend_362( + obj, + sel, ); } - late final _lgammafPtr = - _lookup>('lgammaf'); - late final _lgammaf = _lgammafPtr.asFunction(); + late final __objc_msgSend_362Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double lgamma( - double arg0, + late final _sel_HTTPShouldHandleCookies1 = + _registerName1("HTTPShouldHandleCookies"); + late final _sel_HTTPShouldUsePipelining1 = + _registerName1("HTTPShouldUsePipelining"); + late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); + late final _sel_setURL_1 = _registerName1("setURL:"); + late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); + void _objc_msgSend_363( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _lgamma( - arg0, + return __objc_msgSend_363( + obj, + sel, + value, ); } - late final _lgammaPtr = - _lookup>('lgamma'); - late final _lgamma = _lgammaPtr.asFunction(); + late final __objc_msgSend_363Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double tgammaf( - double arg0, + late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); + late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); + late final _sel_setNetworkServiceType_1 = + _registerName1("setNetworkServiceType:"); + void _objc_msgSend_364( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _tgammaf( - arg0, + return __objc_msgSend_364( + obj, + sel, + value, ); } - late final _tgammafPtr = - _lookup>('tgammaf'); - late final _tgammaf = _tgammafPtr.asFunction(); - - double tgamma( - double arg0, - ) { - return _tgamma( - arg0, - ); - } - - late final _tgammaPtr = - _lookup>('tgamma'); - late final _tgamma = _tgammaPtr.asFunction(); + late final __objc_msgSend_364Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double ceilf( - double arg0, + late final _sel_setAllowsCellularAccess_1 = + _registerName1("setAllowsCellularAccess:"); + late final _sel_setAllowsExpensiveNetworkAccess_1 = + _registerName1("setAllowsExpensiveNetworkAccess:"); + late final _sel_setAllowsConstrainedNetworkAccess_1 = + _registerName1("setAllowsConstrainedNetworkAccess:"); + late final _sel_setAssumesHTTP3Capable_1 = + _registerName1("setAssumesHTTP3Capable:"); + late final _sel_setAttribution_1 = _registerName1("setAttribution:"); + void _objc_msgSend_365( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _ceilf( - arg0, + return __objc_msgSend_365( + obj, + sel, + value, ); } - late final _ceilfPtr = - _lookup>('ceilf'); - late final _ceilf = _ceilfPtr.asFunction(); + late final __objc_msgSend_365Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double ceil( - double arg0, + late final _sel_setRequiresDNSSECValidation_1 = + _registerName1("setRequiresDNSSECValidation:"); + late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); + late final _sel_setAllHTTPHeaderFields_1 = + _registerName1("setAllHTTPHeaderFields:"); + void _objc_msgSend_366( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _ceil( - arg0, + return __objc_msgSend_366( + obj, + sel, + value, ); } - late final _ceilPtr = - _lookup>('ceil'); - late final _ceil = _ceilPtr.asFunction(); + late final __objc_msgSend_366Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double floorf( - double arg0, + late final _sel_setValue_forHTTPHeaderField_1 = + _registerName1("setValue:forHTTPHeaderField:"); + void _objc_msgSend_367( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer field, ) { - return _floorf( - arg0, + return __objc_msgSend_367( + obj, + sel, + value, + field, ); } - late final _floorfPtr = - _lookup>('floorf'); - late final _floorf = _floorfPtr.asFunction(); + late final __objc_msgSend_367Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double floor( - double arg0, + late final _sel_addValue_forHTTPHeaderField_1 = + _registerName1("addValue:forHTTPHeaderField:"); + late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); + void _objc_msgSend_368( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _floor( - arg0, + return __objc_msgSend_368( + obj, + sel, + value, ); } - late final _floorPtr = - _lookup>('floor'); - late final _floor = _floorPtr.asFunction(); + late final __objc_msgSend_368Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double nearbyintf( - double arg0, + late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); + void _objc_msgSend_369( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _nearbyintf( - arg0, + return __objc_msgSend_369( + obj, + sel, + value, ); } - late final _nearbyintfPtr = - _lookup>('nearbyintf'); - late final _nearbyintf = _nearbyintfPtr.asFunction(); + late final __objc_msgSend_369Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double nearbyint( - double arg0, + late final _sel_setHTTPShouldHandleCookies_1 = + _registerName1("setHTTPShouldHandleCookies:"); + late final _sel_setHTTPShouldUsePipelining_1 = + _registerName1("setHTTPShouldUsePipelining:"); + late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); + late final _sel_sharedHTTPCookieStorage1 = + _registerName1("sharedHTTPCookieStorage"); + ffi.Pointer _objc_msgSend_370( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _nearbyint( - arg0, + return __objc_msgSend_370( + obj, + sel, ); } - late final _nearbyintPtr = - _lookup>('nearbyint'); - late final _nearbyint = _nearbyintPtr.asFunction(); + late final __objc_msgSend_370Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double rintf( - double arg0, + late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = + _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); + ffi.Pointer _objc_msgSend_371( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer identifier, ) { - return _rintf( - arg0, + return __objc_msgSend_371( + obj, + sel, + identifier, ); } - late final _rintfPtr = - _lookup>('rintf'); - late final _rintf = _rintfPtr.asFunction(); + late final __objc_msgSend_371Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double rint( - double arg0, + late final _sel_cookies1 = _registerName1("cookies"); + late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); + late final _sel_setCookie_1 = _registerName1("setCookie:"); + void _objc_msgSend_372( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookie, ) { - return _rint( - arg0, + return __objc_msgSend_372( + obj, + sel, + cookie, ); } - late final _rintPtr = - _lookup>('rint'); - late final _rint = _rintPtr.asFunction(); + late final __objc_msgSend_372Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int lrintf( - double arg0, + late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); + late final _sel_removeCookiesSinceDate_1 = + _registerName1("removeCookiesSinceDate:"); + void _objc_msgSend_373( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, ) { - return _lrintf( - arg0, + return __objc_msgSend_373( + obj, + sel, + date, ); } - late final _lrintfPtr = - _lookup>('lrintf'); - late final _lrintf = _lrintfPtr.asFunction(); + late final __objc_msgSend_373Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int lrint( - double arg0, + late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); + late final _sel_setCookies_forURL_mainDocumentURL_1 = + _registerName1("setCookies:forURL:mainDocumentURL:"); + void _objc_msgSend_374( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer URL, + ffi.Pointer mainDocumentURL, ) { - return _lrint( - arg0, + return __objc_msgSend_374( + obj, + sel, + cookies, + URL, + mainDocumentURL, ); } - late final _lrintPtr = - _lookup>('lrint'); - late final _lrint = _lrintPtr.asFunction(); + late final __objc_msgSend_374Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - double roundf( - double arg0, + late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); + int _objc_msgSend_375( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _roundf( - arg0, + return __objc_msgSend_375( + obj, + sel, ); } - late final _roundfPtr = - _lookup>('roundf'); - late final _roundf = _roundfPtr.asFunction(); + late final __objc_msgSend_375Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double round( - double arg0, + late final _sel_setCookieAcceptPolicy_1 = + _registerName1("setCookieAcceptPolicy:"); + void _objc_msgSend_376( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _round( - arg0, + return __objc_msgSend_376( + obj, + sel, + value, ); } - late final _roundPtr = - _lookup>('round'); - late final _round = _roundPtr.asFunction(); + late final __objc_msgSend_376Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int lroundf( - double arg0, + late final _sel_sortedCookiesUsingDescriptors_1 = + _registerName1("sortedCookiesUsingDescriptors:"); + late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); + late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); + late final _sel_originalRequest1 = _registerName1("originalRequest"); + ffi.Pointer _objc_msgSend_377( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _lroundf( - arg0, + return __objc_msgSend_377( + obj, + sel, ); } - late final _lroundfPtr = - _lookup>('lroundf'); - late final _lroundf = _lroundfPtr.asFunction(); + late final __objc_msgSend_377Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int lround( - double arg0, + late final _sel_currentRequest1 = _registerName1("currentRequest"); + late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); + late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = + _registerName1( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); + instancetype _objc_msgSend_378( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URL, + ffi.Pointer MIMEType, + int length, + ffi.Pointer name, ) { - return _lround( - arg0, + return __objc_msgSend_378( + obj, + sel, + URL, + MIMEType, + length, + name, ); } - late final _lroundPtr = - _lookup>('lround'); - late final _lround = _lroundPtr.asFunction(); + late final __objc_msgSend_378Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - int llrintf( - double arg0, + late final _sel_MIMEType1 = _registerName1("MIMEType"); + late final _sel_expectedContentLength1 = + _registerName1("expectedContentLength"); + late final _sel_textEncodingName1 = _registerName1("textEncodingName"); + late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); + late final _sel_response1 = _registerName1("response"); + ffi.Pointer _objc_msgSend_379( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _llrintf( - arg0, + return __objc_msgSend_379( + obj, + sel, ); } - late final _llrintfPtr = - _lookup>('llrintf'); - late final _llrintf = _llrintfPtr.asFunction(); + late final __objc_msgSend_379Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int llrint( - double arg0, + late final _sel_delegate1 = _registerName1("delegate"); + late final _sel_setDelegate_1 = _registerName1("setDelegate:"); + void _objc_msgSend_380( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _llrint( - arg0, + return __objc_msgSend_380( + obj, + sel, + value, ); } - late final _llrintPtr = - _lookup>('llrint'); - late final _llrint = _llrintPtr.asFunction(); + late final __objc_msgSend_380Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int llroundf( - double arg0, + late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); + late final _sel_setEarliestBeginDate_1 = + _registerName1("setEarliestBeginDate:"); + void _objc_msgSend_381( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _llroundf( - arg0, + return __objc_msgSend_381( + obj, + sel, + value, ); } - late final _llroundfPtr = - _lookup>('llroundf'); - late final _llroundf = _llroundfPtr.asFunction(); + late final __objc_msgSend_381Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int llround( - double arg0, + late final _sel_countOfBytesClientExpectsToSend1 = + _registerName1("countOfBytesClientExpectsToSend"); + late final _sel_setCountOfBytesClientExpectsToSend_1 = + _registerName1("setCountOfBytesClientExpectsToSend:"); + late final _sel_countOfBytesClientExpectsToReceive1 = + _registerName1("countOfBytesClientExpectsToReceive"); + late final _sel_setCountOfBytesClientExpectsToReceive_1 = + _registerName1("setCountOfBytesClientExpectsToReceive:"); + late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); + late final _sel_countOfBytesReceived1 = + _registerName1("countOfBytesReceived"); + late final _sel_countOfBytesExpectedToSend1 = + _registerName1("countOfBytesExpectedToSend"); + late final _sel_countOfBytesExpectedToReceive1 = + _registerName1("countOfBytesExpectedToReceive"); + late final _sel_taskDescription1 = _registerName1("taskDescription"); + late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); + late final _sel_state1 = _registerName1("state"); + int _objc_msgSend_382( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _llround( - arg0, + return __objc_msgSend_382( + obj, + sel, ); } - late final _llroundPtr = - _lookup>('llround'); - late final _llround = _llroundPtr.asFunction(); + late final __objc_msgSend_382Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double truncf( - double arg0, + late final _sel_error1 = _registerName1("error"); + ffi.Pointer _objc_msgSend_383( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _truncf( - arg0, + return __objc_msgSend_383( + obj, + sel, ); } - late final _truncfPtr = - _lookup>('truncf'); - late final _truncf = _truncfPtr.asFunction(); + late final __objc_msgSend_383Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double trunc( - double arg0, + late final _sel_suspend1 = _registerName1("suspend"); + late final _sel_priority1 = _registerName1("priority"); + late final _sel_setPriority_1 = _registerName1("setPriority:"); + void _objc_msgSend_384( + ffi.Pointer obj, + ffi.Pointer sel, + double value, ) { - return _trunc( - arg0, + return __objc_msgSend_384( + obj, + sel, + value, ); } - late final _truncPtr = - _lookup>('trunc'); - late final _trunc = _truncPtr.asFunction(); + late final __objc_msgSend_384Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Float)>>('objc_msgSend'); + late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); - double fmodf( - double arg0, - double arg1, + late final _sel_prefersIncrementalDelivery1 = + _registerName1("prefersIncrementalDelivery"); + late final _sel_setPrefersIncrementalDelivery_1 = + _registerName1("setPrefersIncrementalDelivery:"); + late final _sel_storeCookies_forTask_1 = + _registerName1("storeCookies:forTask:"); + void _objc_msgSend_385( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer task, ) { - return _fmodf( - arg0, - arg1, + return __objc_msgSend_385( + obj, + sel, + cookies, + task, ); } - late final _fmodfPtr = - _lookup>( - 'fmodf'); - late final _fmodf = _fmodfPtr.asFunction(); + late final __objc_msgSend_385Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double fmod( - double arg0, - double arg1, + late final _sel_getCookiesForTask_completionHandler_1 = + _registerName1("getCookiesForTask:completionHandler:"); + void _objc_msgSend_386( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer<_ObjCBlock> completionHandler, ) { - return _fmod( - arg0, - arg1, + return __objc_msgSend_386( + obj, + sel, + task, + completionHandler, ); } - late final _fmodPtr = - _lookup>( - 'fmod'); - late final _fmod = _fmodPtr.asFunction(); + late final __objc_msgSend_386Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - double remainderf( - double arg0, - double arg1, - ) { - return _remainderf( - arg0, - arg1, - ); - } + late final ffi.Pointer + _NSHTTPCookieManagerAcceptPolicyChangedNotification = + _lookup( + 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); - late final _remainderfPtr = - _lookup>( - 'remainderf'); - late final _remainderf = - _remainderfPtr.asFunction(); + NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; - double remainder( - double arg0, - double arg1, - ) { - return _remainder( - arg0, - arg1, - ); - } + set NSHTTPCookieManagerAcceptPolicyChangedNotification( + NSNotificationName value) => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; - late final _remainderPtr = - _lookup>( - 'remainder'); - late final _remainder = - _remainderPtr.asFunction(); + late final ffi.Pointer + _NSHTTPCookieManagerCookiesChangedNotification = + _lookup( + 'NSHTTPCookieManagerCookiesChangedNotification'); - double remquof( - double arg0, - double arg1, - ffi.Pointer arg2, - ) { - return _remquof( - arg0, - arg1, - arg2, - ); - } + NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => + _NSHTTPCookieManagerCookiesChangedNotification.value; - late final _remquofPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function( - ffi.Float, ffi.Float, ffi.Pointer)>>('remquof'); - late final _remquof = _remquofPtr - .asFunction)>(); + set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => + _NSHTTPCookieManagerCookiesChangedNotification.value = value; - double remquo( - double arg0, - double arg1, - ffi.Pointer arg2, - ) { - return _remquo( - arg0, - arg1, - arg2, - ); - } + late final ffi.Pointer + _NSProgressEstimatedTimeRemainingKey = + _lookup('NSProgressEstimatedTimeRemainingKey'); - late final _remquoPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function( - ffi.Double, ffi.Double, ffi.Pointer)>>('remquo'); - late final _remquo = _remquoPtr - .asFunction)>(); + NSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => + _NSProgressEstimatedTimeRemainingKey.value; - double copysignf( - double arg0, - double arg1, - ) { - return _copysignf( - arg0, - arg1, - ); - } + set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey value) => + _NSProgressEstimatedTimeRemainingKey.value = value; - late final _copysignfPtr = - _lookup>( - 'copysignf'); - late final _copysignf = - _copysignfPtr.asFunction(); + late final ffi.Pointer _NSProgressThroughputKey = + _lookup('NSProgressThroughputKey'); - double copysign( - double arg0, - double arg1, - ) { - return _copysign( - arg0, - arg1, - ); - } + NSProgressUserInfoKey get NSProgressThroughputKey => + _NSProgressThroughputKey.value; - late final _copysignPtr = - _lookup>( - 'copysign'); - late final _copysign = - _copysignPtr.asFunction(); + set NSProgressThroughputKey(NSProgressUserInfoKey value) => + _NSProgressThroughputKey.value = value; - double nanf( - ffi.Pointer arg0, - ) { - return _nanf( - arg0, - ); - } + late final ffi.Pointer _NSProgressKindFile = + _lookup('NSProgressKindFile'); - late final _nanfPtr = - _lookup)>>( - 'nanf'); - late final _nanf = - _nanfPtr.asFunction)>(); + NSProgressKind get NSProgressKindFile => _NSProgressKindFile.value; - double nan( - ffi.Pointer arg0, - ) { - return _nan( - arg0, - ); - } + set NSProgressKindFile(NSProgressKind value) => + _NSProgressKindFile.value = value; - late final _nanPtr = - _lookup)>>( - 'nan'); - late final _nan = - _nanPtr.asFunction)>(); + late final ffi.Pointer + _NSProgressFileOperationKindKey = + _lookup('NSProgressFileOperationKindKey'); - double nextafterf( - double arg0, - double arg1, - ) { - return _nextafterf( - arg0, - arg1, - ); - } + NSProgressUserInfoKey get NSProgressFileOperationKindKey => + _NSProgressFileOperationKindKey.value; - late final _nextafterfPtr = - _lookup>( - 'nextafterf'); - late final _nextafterf = - _nextafterfPtr.asFunction(); + set NSProgressFileOperationKindKey(NSProgressUserInfoKey value) => + _NSProgressFileOperationKindKey.value = value; - double nextafter( - double arg0, - double arg1, - ) { - return _nextafter( - arg0, - arg1, - ); - } + late final ffi.Pointer + _NSProgressFileOperationKindDownloading = + _lookup( + 'NSProgressFileOperationKindDownloading'); - late final _nextafterPtr = - _lookup>( - 'nextafter'); - late final _nextafter = - _nextafterPtr.asFunction(); + NSProgressFileOperationKind get NSProgressFileOperationKindDownloading => + _NSProgressFileOperationKindDownloading.value; - double fdimf( - double arg0, - double arg1, - ) { - return _fdimf( - arg0, - arg1, - ); - } + set NSProgressFileOperationKindDownloading( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDownloading.value = value; - late final _fdimfPtr = - _lookup>( - 'fdimf'); - late final _fdimf = _fdimfPtr.asFunction(); + late final ffi.Pointer + _NSProgressFileOperationKindDecompressingAfterDownloading = + _lookup( + 'NSProgressFileOperationKindDecompressingAfterDownloading'); - double fdim( - double arg0, - double arg1, - ) { - return _fdim( - arg0, - arg1, - ); - } + NSProgressFileOperationKind + get NSProgressFileOperationKindDecompressingAfterDownloading => + _NSProgressFileOperationKindDecompressingAfterDownloading.value; - late final _fdimPtr = - _lookup>( - 'fdim'); - late final _fdim = _fdimPtr.asFunction(); + set NSProgressFileOperationKindDecompressingAfterDownloading( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDecompressingAfterDownloading.value = value; - double fmaxf( - double arg0, - double arg1, - ) { - return _fmaxf( - arg0, - arg1, - ); - } + late final ffi.Pointer + _NSProgressFileOperationKindReceiving = + _lookup( + 'NSProgressFileOperationKindReceiving'); - late final _fmaxfPtr = - _lookup>( - 'fmaxf'); - late final _fmaxf = _fmaxfPtr.asFunction(); + NSProgressFileOperationKind get NSProgressFileOperationKindReceiving => + _NSProgressFileOperationKindReceiving.value; - double fmax( - double arg0, - double arg1, - ) { - return _fmax( - arg0, - arg1, - ); - } + set NSProgressFileOperationKindReceiving(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindReceiving.value = value; - late final _fmaxPtr = - _lookup>( - 'fmax'); - late final _fmax = _fmaxPtr.asFunction(); + late final ffi.Pointer + _NSProgressFileOperationKindCopying = + _lookup( + 'NSProgressFileOperationKindCopying'); - double fminf( - double arg0, - double arg1, - ) { - return _fminf( - arg0, - arg1, - ); - } + NSProgressFileOperationKind get NSProgressFileOperationKindCopying => + _NSProgressFileOperationKindCopying.value; - late final _fminfPtr = - _lookup>( - 'fminf'); - late final _fminf = _fminfPtr.asFunction(); + set NSProgressFileOperationKindCopying(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindCopying.value = value; - double fmin( - double arg0, - double arg1, - ) { - return _fmin( - arg0, - arg1, - ); - } + late final ffi.Pointer + _NSProgressFileOperationKindUploading = + _lookup( + 'NSProgressFileOperationKindUploading'); - late final _fminPtr = - _lookup>( - 'fmin'); - late final _fmin = _fminPtr.asFunction(); + NSProgressFileOperationKind get NSProgressFileOperationKindUploading => + _NSProgressFileOperationKindUploading.value; - double fmaf( - double arg0, - double arg1, - double arg2, - ) { - return _fmaf( - arg0, - arg1, - arg2, - ); - } + set NSProgressFileOperationKindUploading(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindUploading.value = value; - late final _fmafPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Float, ffi.Float)>>('fmaf'); - late final _fmaf = - _fmafPtr.asFunction(); + late final ffi.Pointer + _NSProgressFileOperationKindDuplicating = + _lookup( + 'NSProgressFileOperationKindDuplicating'); - double fma( - double arg0, - double arg1, - double arg2, - ) { - return _fma( - arg0, - arg1, - arg2, - ); - } + NSProgressFileOperationKind get NSProgressFileOperationKindDuplicating => + _NSProgressFileOperationKindDuplicating.value; - late final _fmaPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Double, ffi.Double)>>('fma'); - late final _fma = - _fmaPtr.asFunction(); + set NSProgressFileOperationKindDuplicating( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDuplicating.value = value; - double __exp10f( - double arg0, - ) { - return ___exp10f( - arg0, - ); - } + late final ffi.Pointer _NSProgressFileURLKey = + _lookup('NSProgressFileURLKey'); - late final ___exp10fPtr = - _lookup>('__exp10f'); - late final ___exp10f = ___exp10fPtr.asFunction(); + NSProgressUserInfoKey get NSProgressFileURLKey => _NSProgressFileURLKey.value; - double __exp10( - double arg0, - ) { - return ___exp10( - arg0, - ); - } + set NSProgressFileURLKey(NSProgressUserInfoKey value) => + _NSProgressFileURLKey.value = value; - late final ___exp10Ptr = - _lookup>('__exp10'); - late final ___exp10 = ___exp10Ptr.asFunction(); + late final ffi.Pointer _NSProgressFileTotalCountKey = + _lookup('NSProgressFileTotalCountKey'); - double __cospif( - double arg0, - ) { - return ___cospif( - arg0, - ); - } + NSProgressUserInfoKey get NSProgressFileTotalCountKey => + _NSProgressFileTotalCountKey.value; - late final ___cospifPtr = - _lookup>('__cospif'); - late final ___cospif = ___cospifPtr.asFunction(); + set NSProgressFileTotalCountKey(NSProgressUserInfoKey value) => + _NSProgressFileTotalCountKey.value = value; - double __cospi( - double arg0, - ) { - return ___cospi( - arg0, - ); - } + late final ffi.Pointer + _NSProgressFileCompletedCountKey = + _lookup('NSProgressFileCompletedCountKey'); - late final ___cospiPtr = - _lookup>('__cospi'); - late final ___cospi = ___cospiPtr.asFunction(); + NSProgressUserInfoKey get NSProgressFileCompletedCountKey => + _NSProgressFileCompletedCountKey.value; - double __sinpif( - double arg0, - ) { - return ___sinpif( - arg0, - ); - } + set NSProgressFileCompletedCountKey(NSProgressUserInfoKey value) => + _NSProgressFileCompletedCountKey.value = value; - late final ___sinpifPtr = - _lookup>('__sinpif'); - late final ___sinpif = ___sinpifPtr.asFunction(); + late final ffi.Pointer + _NSProgressFileAnimationImageKey = + _lookup('NSProgressFileAnimationImageKey'); - double __sinpi( - double arg0, - ) { - return ___sinpi( - arg0, - ); - } + NSProgressUserInfoKey get NSProgressFileAnimationImageKey => + _NSProgressFileAnimationImageKey.value; - late final ___sinpiPtr = - _lookup>('__sinpi'); - late final ___sinpi = ___sinpiPtr.asFunction(); + set NSProgressFileAnimationImageKey(NSProgressUserInfoKey value) => + _NSProgressFileAnimationImageKey.value = value; - double __tanpif( - double arg0, - ) { - return ___tanpif( - arg0, - ); - } + late final ffi.Pointer + _NSProgressFileAnimationImageOriginalRectKey = + _lookup( + 'NSProgressFileAnimationImageOriginalRectKey'); - late final ___tanpifPtr = - _lookup>('__tanpif'); - late final ___tanpif = ___tanpifPtr.asFunction(); + NSProgressUserInfoKey get NSProgressFileAnimationImageOriginalRectKey => + _NSProgressFileAnimationImageOriginalRectKey.value; - double __tanpi( - double arg0, - ) { - return ___tanpi( - arg0, - ); + set NSProgressFileAnimationImageOriginalRectKey( + NSProgressUserInfoKey value) => + _NSProgressFileAnimationImageOriginalRectKey.value = value; + + late final ffi.Pointer _NSProgressFileIconKey = + _lookup('NSProgressFileIconKey'); + + NSProgressUserInfoKey get NSProgressFileIconKey => + _NSProgressFileIconKey.value; + + set NSProgressFileIconKey(NSProgressUserInfoKey value) => + _NSProgressFileIconKey.value = value; + + late final ffi.Pointer _kCFTypeArrayCallBacks = + _lookup('kCFTypeArrayCallBacks'); + + CFArrayCallBacks get kCFTypeArrayCallBacks => _kCFTypeArrayCallBacks.ref; + + int CFArrayGetTypeID() { + return _CFArrayGetTypeID(); } - late final ___tanpiPtr = - _lookup>('__tanpi'); - late final ___tanpi = ___tanpiPtr.asFunction(); + late final _CFArrayGetTypeIDPtr = + _lookup>('CFArrayGetTypeID'); + late final _CFArrayGetTypeID = + _CFArrayGetTypeIDPtr.asFunction(); - __float2 __sincosf_stret( - double arg0, + CFArrayRef CFArrayCreate( + CFAllocatorRef allocator, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, ) { - return ___sincosf_stret( - arg0, + return _CFArrayCreate( + allocator, + values, + numValues, + callBacks, ); } - late final ___sincosf_stretPtr = - _lookup>( - '__sincosf_stret'); - late final ___sincosf_stret = - ___sincosf_stretPtr.asFunction<__float2 Function(double)>(); + late final _CFArrayCreatePtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function( + CFAllocatorRef, + ffi.Pointer>, + CFIndex, + ffi.Pointer)>>('CFArrayCreate'); + late final _CFArrayCreate = _CFArrayCreatePtr.asFunction< + CFArrayRef Function(CFAllocatorRef, ffi.Pointer>, + int, ffi.Pointer)>(); - __double2 __sincos_stret( - double arg0, + CFArrayRef CFArrayCreateCopy( + CFAllocatorRef allocator, + CFArrayRef theArray, ) { - return ___sincos_stret( - arg0, + return _CFArrayCreateCopy( + allocator, + theArray, ); } - late final ___sincos_stretPtr = - _lookup>( - '__sincos_stret'); - late final ___sincos_stret = - ___sincos_stretPtr.asFunction<__double2 Function(double)>(); + late final _CFArrayCreateCopyPtr = _lookup< + ffi.NativeFunction>( + 'CFArrayCreateCopy'); + late final _CFArrayCreateCopy = _CFArrayCreateCopyPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFArrayRef)>(); - __float2 __sincospif_stret( - double arg0, + CFMutableArrayRef CFArrayCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, ) { - return ___sincospif_stret( - arg0, + return _CFArrayCreateMutable( + allocator, + capacity, + callBacks, ); } - late final ___sincospif_stretPtr = - _lookup>( - '__sincospif_stret'); - late final ___sincospif_stret = - ___sincospif_stretPtr.asFunction<__float2 Function(double)>(); + late final _CFArrayCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableArrayRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFArrayCreateMutable'); + late final _CFArrayCreateMutable = _CFArrayCreateMutablePtr.asFunction< + CFMutableArrayRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - __double2 __sincospi_stret( - double arg0, + CFMutableArrayRef CFArrayCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFArrayRef theArray, ) { - return ___sincospi_stret( - arg0, + return _CFArrayCreateMutableCopy( + allocator, + capacity, + theArray, ); } - late final ___sincospi_stretPtr = - _lookup>( - '__sincospi_stret'); - late final ___sincospi_stret = - ___sincospi_stretPtr.asFunction<__double2 Function(double)>(); + late final _CFArrayCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableArrayRef Function(CFAllocatorRef, CFIndex, + CFArrayRef)>>('CFArrayCreateMutableCopy'); + late final _CFArrayCreateMutableCopy = + _CFArrayCreateMutableCopyPtr.asFunction< + CFMutableArrayRef Function(CFAllocatorRef, int, CFArrayRef)>(); - double j0( - double arg0, + int CFArrayGetCount( + CFArrayRef theArray, ) { - return _j0( - arg0, + return _CFArrayGetCount( + theArray, ); } - late final _j0Ptr = - _lookup>('j0'); - late final _j0 = _j0Ptr.asFunction(); + late final _CFArrayGetCountPtr = + _lookup>( + 'CFArrayGetCount'); + late final _CFArrayGetCount = + _CFArrayGetCountPtr.asFunction(); - double j1( - double arg0, + int CFArrayGetCountOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _j1( - arg0, + return _CFArrayGetCountOfValue( + theArray, + range, + value, ); } - late final _j1Ptr = - _lookup>('j1'); - late final _j1 = _j1Ptr.asFunction(); + late final _CFArrayGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetCountOfValue'); + late final _CFArrayGetCountOfValue = _CFArrayGetCountOfValuePtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer)>(); - double jn( - int arg0, - double arg1, + int CFArrayContainsValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _jn( - arg0, - arg1, + return _CFArrayContainsValue( + theArray, + range, + value, ); } - late final _jnPtr = - _lookup>( - 'jn'); - late final _jn = _jnPtr.asFunction(); + late final _CFArrayContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayContainsValue'); + late final _CFArrayContainsValue = _CFArrayContainsValuePtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer)>(); - double y0( - double arg0, + ffi.Pointer CFArrayGetValueAtIndex( + CFArrayRef theArray, + int idx, ) { - return _y0( - arg0, + return _CFArrayGetValueAtIndex( + theArray, + idx, ); } - late final _y0Ptr = - _lookup>('y0'); - late final _y0 = _y0Ptr.asFunction(); + late final _CFArrayGetValueAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFArrayRef, CFIndex)>>('CFArrayGetValueAtIndex'); + late final _CFArrayGetValueAtIndex = _CFArrayGetValueAtIndexPtr.asFunction< + ffi.Pointer Function(CFArrayRef, int)>(); - double y1( - double arg0, + void CFArrayGetValues( + CFArrayRef theArray, + CFRange range, + ffi.Pointer> values, ) { - return _y1( - arg0, + return _CFArrayGetValues( + theArray, + range, + values, ); } - late final _y1Ptr = - _lookup>('y1'); - late final _y1 = _y1Ptr.asFunction(); + late final _CFArrayGetValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFArrayRef, CFRange, + ffi.Pointer>)>>('CFArrayGetValues'); + late final _CFArrayGetValues = _CFArrayGetValuesPtr.asFunction< + void Function(CFArrayRef, CFRange, ffi.Pointer>)>(); - double yn( - int arg0, - double arg1, + void CFArrayApplyFunction( + CFArrayRef theArray, + CFRange range, + CFArrayApplierFunction applier, + ffi.Pointer context, ) { - return _yn( - arg0, - arg1, + return _CFArrayApplyFunction( + theArray, + range, + applier, + context, ); } - late final _ynPtr = - _lookup>( - 'yn'); - late final _yn = _ynPtr.asFunction(); + late final _CFArrayApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFArrayRef, CFRange, CFArrayApplierFunction, + ffi.Pointer)>>('CFArrayApplyFunction'); + late final _CFArrayApplyFunction = _CFArrayApplyFunctionPtr.asFunction< + void Function(CFArrayRef, CFRange, CFArrayApplierFunction, + ffi.Pointer)>(); - double scalb( - double arg0, - double arg1, + int CFArrayGetFirstIndexOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _scalb( - arg0, - arg1, + return _CFArrayGetFirstIndexOfValue( + theArray, + range, + value, ); } - late final _scalbPtr = - _lookup>( - 'scalb'); - late final _scalb = _scalbPtr.asFunction(); - - late final ffi.Pointer _signgam = _lookup('signgam'); - - int get signgam => _signgam.value; - - set signgam(int value) => _signgam.value = value; + late final _CFArrayGetFirstIndexOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetFirstIndexOfValue'); + late final _CFArrayGetFirstIndexOfValue = _CFArrayGetFirstIndexOfValuePtr + .asFunction)>(); - int setjmp( - ffi.Pointer arg0, + int CFArrayGetLastIndexOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _setjmp1( - arg0, + return _CFArrayGetLastIndexOfValue( + theArray, + range, + value, ); } - late final _setjmpPtr = - _lookup)>>( - 'setjmp'); - late final _setjmp1 = - _setjmpPtr.asFunction)>(); + late final _CFArrayGetLastIndexOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetLastIndexOfValue'); + late final _CFArrayGetLastIndexOfValue = _CFArrayGetLastIndexOfValuePtr + .asFunction)>(); - void longjmp( - ffi.Pointer arg0, - int arg1, + int CFArrayBSearchValues( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, + CFComparatorFunction comparator, + ffi.Pointer context, ) { - return _longjmp1( - arg0, - arg1, + return _CFArrayBSearchValues( + theArray, + range, + value, + comparator, + context, ); } - late final _longjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'longjmp'); - late final _longjmp1 = - _longjmpPtr.asFunction, int)>(); + late final _CFArrayBSearchValuesPtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFArrayRef, + CFRange, + ffi.Pointer, + CFComparatorFunction, + ffi.Pointer)>>('CFArrayBSearchValues'); + late final _CFArrayBSearchValues = _CFArrayBSearchValuesPtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer, + CFComparatorFunction, ffi.Pointer)>(); - int _setjmp( - ffi.Pointer arg0, + void CFArrayAppendValue( + CFMutableArrayRef theArray, + ffi.Pointer value, ) { - return __setjmp( - arg0, + return _CFArrayAppendValue( + theArray, + value, ); } - late final __setjmpPtr = - _lookup)>>( - '_setjmp'); - late final __setjmp = - __setjmpPtr.asFunction)>(); + late final _CFArrayAppendValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableArrayRef, ffi.Pointer)>>('CFArrayAppendValue'); + late final _CFArrayAppendValue = _CFArrayAppendValuePtr.asFunction< + void Function(CFMutableArrayRef, ffi.Pointer)>(); - void _longjmp( - ffi.Pointer arg0, - int arg1, + void CFArrayInsertValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ffi.Pointer value, ) { - return __longjmp( - arg0, - arg1, + return _CFArrayInsertValueAtIndex( + theArray, + idx, + value, ); } - late final __longjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - '_longjmp'); - late final __longjmp = - __longjmpPtr.asFunction, int)>(); + late final _CFArrayInsertValueAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFIndex, + ffi.Pointer)>>('CFArrayInsertValueAtIndex'); + late final _CFArrayInsertValueAtIndex = + _CFArrayInsertValueAtIndexPtr.asFunction< + void Function(CFMutableArrayRef, int, ffi.Pointer)>(); - int sigsetjmp( - ffi.Pointer arg0, - int arg1, + void CFArraySetValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ffi.Pointer value, ) { - return _sigsetjmp( - arg0, - arg1, + return _CFArraySetValueAtIndex( + theArray, + idx, + value, ); } - late final _sigsetjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigsetjmp'); - late final _sigsetjmp = - _sigsetjmpPtr.asFunction, int)>(); + late final _CFArraySetValueAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFIndex, + ffi.Pointer)>>('CFArraySetValueAtIndex'); + late final _CFArraySetValueAtIndex = _CFArraySetValueAtIndexPtr.asFunction< + void Function(CFMutableArrayRef, int, ffi.Pointer)>(); - void siglongjmp( - ffi.Pointer arg0, - int arg1, + void CFArrayRemoveValueAtIndex( + CFMutableArrayRef theArray, + int idx, ) { - return _siglongjmp( - arg0, - arg1, + return _CFArrayRemoveValueAtIndex( + theArray, + idx, ); } - late final _siglongjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'siglongjmp'); - late final _siglongjmp = - _siglongjmpPtr.asFunction, int)>(); + late final _CFArrayRemoveValueAtIndexPtr = _lookup< + ffi.NativeFunction>( + 'CFArrayRemoveValueAtIndex'); + late final _CFArrayRemoveValueAtIndex = _CFArrayRemoveValueAtIndexPtr + .asFunction(); - void longjmperror() { - return _longjmperror(); + void CFArrayRemoveAllValues( + CFMutableArrayRef theArray, + ) { + return _CFArrayRemoveAllValues( + theArray, + ); } - late final _longjmperrorPtr = - _lookup>('longjmperror'); - late final _longjmperror = _longjmperrorPtr.asFunction(); + late final _CFArrayRemoveAllValuesPtr = + _lookup>( + 'CFArrayRemoveAllValues'); + late final _CFArrayRemoveAllValues = + _CFArrayRemoveAllValuesPtr.asFunction(); - ffi.Pointer> signal( - int arg0, - ffi.Pointer> arg1, + void CFArrayReplaceValues( + CFMutableArrayRef theArray, + CFRange range, + ffi.Pointer> newValues, + int newCount, ) { - return _signal( - arg0, - arg1, + return _CFArrayReplaceValues( + theArray, + range, + newValues, + newCount, ); } - late final _signalPtr = _lookup< + late final _CFArrayReplaceValuesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Int, - ffi.Pointer< - ffi.NativeFunction>)>>('signal'); - late final _signal = _signalPtr.asFunction< - ffi.Pointer> Function( - int, ffi.Pointer>)>(); - - late final ffi.Pointer>> _sys_signame = - _lookup>>('sys_signame'); - - ffi.Pointer> get sys_signame => _sys_signame.value; - - set sys_signame(ffi.Pointer> value) => - _sys_signame.value = value; - - late final ffi.Pointer>> _sys_siglist = - _lookup>>('sys_siglist'); - - ffi.Pointer> get sys_siglist => _sys_siglist.value; - - set sys_siglist(ffi.Pointer> value) => - _sys_siglist.value = value; + ffi.Void Function( + CFMutableArrayRef, + CFRange, + ffi.Pointer>, + CFIndex)>>('CFArrayReplaceValues'); + late final _CFArrayReplaceValues = _CFArrayReplaceValuesPtr.asFunction< + void Function(CFMutableArrayRef, CFRange, + ffi.Pointer>, int)>(); - int raise( - int arg0, + void CFArrayExchangeValuesAtIndices( + CFMutableArrayRef theArray, + int idx1, + int idx2, ) { - return _raise( - arg0, + return _CFArrayExchangeValuesAtIndices( + theArray, + idx1, + idx2, ); } - late final _raisePtr = - _lookup>('raise'); - late final _raise = _raisePtr.asFunction(); + late final _CFArrayExchangeValuesAtIndicesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFIndex, + CFIndex)>>('CFArrayExchangeValuesAtIndices'); + late final _CFArrayExchangeValuesAtIndices = + _CFArrayExchangeValuesAtIndicesPtr.asFunction< + void Function(CFMutableArrayRef, int, int)>(); - ffi.Pointer> bsd_signal( - int arg0, - ffi.Pointer> arg1, + void CFArraySortValues( + CFMutableArrayRef theArray, + CFRange range, + CFComparatorFunction comparator, + ffi.Pointer context, ) { - return _bsd_signal( - arg0, - arg1, + return _CFArraySortValues( + theArray, + range, + comparator, + context, ); } - late final _bsd_signalPtr = _lookup< + late final _CFArraySortValuesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Int)>>)>>('bsd_signal'); - late final _bsd_signal = _bsd_signalPtr.asFunction< - ffi.Pointer> Function( - int, ffi.Pointer>)>(); + ffi.Void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, + ffi.Pointer)>>('CFArraySortValues'); + late final _CFArraySortValues = _CFArraySortValuesPtr.asFunction< + void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, + ffi.Pointer)>(); - int kill( - int arg0, - int arg1, + void CFArrayAppendArray( + CFMutableArrayRef theArray, + CFArrayRef otherArray, + CFRange otherRange, ) { - return _kill( - arg0, - arg1, + return _CFArrayAppendArray( + theArray, + otherArray, + otherRange, ); } - late final _killPtr = - _lookup>('kill'); - late final _kill = _killPtr.asFunction(); + late final _CFArrayAppendArrayPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableArrayRef, CFArrayRef, CFRange)>>('CFArrayAppendArray'); + late final _CFArrayAppendArray = _CFArrayAppendArrayPtr.asFunction< + void Function(CFMutableArrayRef, CFArrayRef, CFRange)>(); - int killpg( - int arg0, - int arg1, + late final _class_OS_object1 = _getClass1("OS_object"); + ffi.Pointer os_retain( + ffi.Pointer object, ) { - return _killpg( - arg0, - arg1, + return _os_retain( + object, ); } - late final _killpgPtr = - _lookup>('killpg'); - late final _killpg = _killpgPtr.asFunction(); + late final _os_retainPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('os_retain'); + late final _os_retain = _os_retainPtr + .asFunction Function(ffi.Pointer)>(); - int pthread_kill( - pthread_t arg0, - int arg1, + void os_release( + ffi.Pointer object, ) { - return _pthread_kill( - arg0, - arg1, + return _os_release( + object, ); } - late final _pthread_killPtr = - _lookup>( - 'pthread_kill'); - late final _pthread_kill = - _pthread_killPtr.asFunction(); + late final _os_releasePtr = + _lookup)>>( + 'os_release'); + late final _os_release = + _os_releasePtr.asFunction)>(); - int pthread_sigmask( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer sec_retain( + ffi.Pointer obj, ) { - return _pthread_sigmask( - arg0, - arg1, - arg2, + return _sec_retain( + obj, ); } - late final _pthread_sigmaskPtr = _lookup< + late final _sec_retainPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('pthread_sigmask'); - late final _pthread_sigmask = _pthread_sigmaskPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer)>>('sec_retain'); + late final _sec_retain = _sec_retainPtr + .asFunction Function(ffi.Pointer)>(); - int sigaction1( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + void sec_release( + ffi.Pointer obj, ) { - return _sigaction1( - arg0, - arg1, - arg2, + return _sec_release( + obj, ); } - late final _sigaction1Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('sigaction'); - late final _sigaction1 = _sigaction1Ptr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + late final _sec_releasePtr = + _lookup)>>( + 'sec_release'); + late final _sec_release = + _sec_releasePtr.asFunction)>(); - int sigaddset( - ffi.Pointer arg0, - int arg1, + CFStringRef SecCopyErrorMessageString( + int status, + ffi.Pointer reserved, ) { - return _sigaddset( - arg0, - arg1, + return _SecCopyErrorMessageString( + status, + reserved, ); } - late final _sigaddsetPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigaddset'); - late final _sigaddset = - _sigaddsetPtr.asFunction, int)>(); + late final _SecCopyErrorMessageStringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + OSStatus, ffi.Pointer)>>('SecCopyErrorMessageString'); + late final _SecCopyErrorMessageString = _SecCopyErrorMessageStringPtr + .asFunction)>(); - int sigaltstack( - ffi.Pointer arg0, - ffi.Pointer arg1, + void __assert_rtn( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return _sigaltstack( + return ___assert_rtn( arg0, arg1, + arg2, + arg3, ); } - late final _sigaltstackPtr = _lookup< + late final ___assert_rtnPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sigaltstack'); - late final _sigaltstack = _sigaltstackPtr - .asFunction, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int, ffi.Pointer)>>('__assert_rtn'); + late final ___assert_rtn = ___assert_rtnPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); - int sigdelset( - ffi.Pointer arg0, - int arg1, - ) { - return _sigdelset( - arg0, - arg1, - ); - } + late final ffi.Pointer<_RuneLocale> __DefaultRuneLocale = + _lookup<_RuneLocale>('_DefaultRuneLocale'); - late final _sigdelsetPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigdelset'); - late final _sigdelset = - _sigdelsetPtr.asFunction, int)>(); + _RuneLocale get _DefaultRuneLocale => __DefaultRuneLocale.ref; - int sigemptyset( - ffi.Pointer arg0, - ) { - return _sigemptyset( - arg0, - ); - } + late final ffi.Pointer> __CurrentRuneLocale = + _lookup>('_CurrentRuneLocale'); - late final _sigemptysetPtr = - _lookup)>>( - 'sigemptyset'); - late final _sigemptyset = - _sigemptysetPtr.asFunction)>(); + ffi.Pointer<_RuneLocale> get _CurrentRuneLocale => __CurrentRuneLocale.value; - int sigfillset( - ffi.Pointer arg0, + set _CurrentRuneLocale(ffi.Pointer<_RuneLocale> value) => + __CurrentRuneLocale.value = value; + + int ___runetype( + int arg0, ) { - return _sigfillset( + return ____runetype( arg0, ); } - late final _sigfillsetPtr = - _lookup)>>( - 'sigfillset'); - late final _sigfillset = - _sigfillsetPtr.asFunction)>(); + late final ____runetypePtr = _lookup< + ffi.NativeFunction>( + '___runetype'); + late final ____runetype = ____runetypePtr.asFunction(); - int sighold( + int ___tolower( int arg0, ) { - return _sighold( + return ____tolower( arg0, ); } - late final _sigholdPtr = - _lookup>('sighold'); - late final _sighold = _sigholdPtr.asFunction(); + late final ____tolowerPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '___tolower'); + late final ____tolower = ____tolowerPtr.asFunction(); - int sigignore( + int ___toupper( int arg0, ) { - return _sigignore( + return ____toupper( arg0, ); } - late final _sigignorePtr = - _lookup>('sigignore'); - late final _sigignore = _sigignorePtr.asFunction(); + late final ____toupperPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '___toupper'); + late final ____toupper = ____toupperPtr.asFunction(); - int siginterrupt( + int __maskrune( int arg0, int arg1, ) { - return _siginterrupt( + return ___maskrune( arg0, arg1, ); } - late final _siginterruptPtr = - _lookup>( - 'siginterrupt'); - late final _siginterrupt = - _siginterruptPtr.asFunction(); + late final ___maskrunePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + __darwin_ct_rune_t, ffi.UnsignedLong)>>('__maskrune'); + late final ___maskrune = ___maskrunePtr.asFunction(); - int sigismember( - ffi.Pointer arg0, - int arg1, + int __toupper( + int arg0, ) { - return _sigismember( + return ___toupper1( arg0, - arg1, ); } - late final _sigismemberPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigismember'); - late final _sigismember = - _sigismemberPtr.asFunction, int)>(); + late final ___toupperPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '__toupper'); + late final ___toupper1 = ___toupperPtr.asFunction(); - int sigpause( + int __tolower( int arg0, ) { - return _sigpause( + return ___tolower1( arg0, ); } - late final _sigpausePtr = - _lookup>('sigpause'); - late final _sigpause = _sigpausePtr.asFunction(); + late final ___tolowerPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '__tolower'); + late final ___tolower1 = ___tolowerPtr.asFunction(); - int sigpending( - ffi.Pointer arg0, - ) { - return _sigpending( - arg0, - ); + ffi.Pointer __error() { + return ___error(); } - late final _sigpendingPtr = - _lookup)>>( - 'sigpending'); - late final _sigpending = - _sigpendingPtr.asFunction)>(); + late final ___errorPtr = + _lookup Function()>>('__error'); + late final ___error = + ___errorPtr.asFunction Function()>(); - int sigprocmask( + ffi.Pointer localeconv() { + return _localeconv(); + } + + late final _localeconvPtr = + _lookup Function()>>('localeconv'); + late final _localeconv = + _localeconvPtr.asFunction Function()>(); + + ffi.Pointer setlocale( int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg1, ) { - return _sigprocmask( + return _setlocale( arg0, arg1, - arg2, ); } - late final _sigprocmaskPtr = _lookup< + late final _setlocalePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('sigprocmask'); - late final _sigprocmask = _sigprocmaskPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('setlocale'); + late final _setlocale = _setlocalePtr + .asFunction Function(int, ffi.Pointer)>(); - int sigrelse( - int arg0, + int __math_errhandling() { + return ___math_errhandling(); + } + + late final ___math_errhandlingPtr = + _lookup>('__math_errhandling'); + late final ___math_errhandling = + ___math_errhandlingPtr.asFunction(); + + int __fpclassifyf( + double arg0, ) { - return _sigrelse( + return ___fpclassifyf( arg0, ); } - late final _sigrelsePtr = - _lookup>('sigrelse'); - late final _sigrelse = _sigrelsePtr.asFunction(); + late final ___fpclassifyfPtr = + _lookup>('__fpclassifyf'); + late final ___fpclassifyf = + ___fpclassifyfPtr.asFunction(); - ffi.Pointer> sigset( - int arg0, - ffi.Pointer> arg1, + int __fpclassifyd( + double arg0, ) { - return _sigset( + return ___fpclassifyd( arg0, - arg1, ); } - late final _sigsetPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Int, - ffi.Pointer< - ffi.NativeFunction>)>>('sigset'); - late final _sigset = _sigsetPtr.asFunction< - ffi.Pointer> Function( - int, ffi.Pointer>)>(); + late final ___fpclassifydPtr = + _lookup>( + '__fpclassifyd'); + late final ___fpclassifyd = + ___fpclassifydPtr.asFunction(); - int sigsuspend( - ffi.Pointer arg0, + double acosf( + double arg0, ) { - return _sigsuspend( + return _acosf( arg0, ); } - late final _sigsuspendPtr = - _lookup)>>( - 'sigsuspend'); - late final _sigsuspend = - _sigsuspendPtr.asFunction)>(); + late final _acosfPtr = + _lookup>('acosf'); + late final _acosf = _acosfPtr.asFunction(); - int sigwait( - ffi.Pointer arg0, - ffi.Pointer arg1, + double acos( + double arg0, ) { - return _sigwait( + return _acos( arg0, - arg1, ); } - late final _sigwaitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sigwait'); - late final _sigwait = _sigwaitPtr - .asFunction, ffi.Pointer)>(); + late final _acosPtr = + _lookup>('acos'); + late final _acos = _acosPtr.asFunction(); - void psignal( - int arg0, - ffi.Pointer arg1, + double asinf( + double arg0, ) { - return _psignal( + return _asinf( arg0, - arg1, ); } - late final _psignalPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.UnsignedInt, ffi.Pointer)>>('psignal'); - late final _psignal = - _psignalPtr.asFunction)>(); + late final _asinfPtr = + _lookup>('asinf'); + late final _asinf = _asinfPtr.asFunction(); - int sigblock( - int arg0, + double asin( + double arg0, ) { - return _sigblock( + return _asin( arg0, ); } - late final _sigblockPtr = - _lookup>('sigblock'); - late final _sigblock = _sigblockPtr.asFunction(); + late final _asinPtr = + _lookup>('asin'); + late final _asin = _asinPtr.asFunction(); - int sigsetmask( - int arg0, + double atanf( + double arg0, ) { - return _sigsetmask( + return _atanf( arg0, ); } - late final _sigsetmaskPtr = - _lookup>('sigsetmask'); - late final _sigsetmask = _sigsetmaskPtr.asFunction(); + late final _atanfPtr = + _lookup>('atanf'); + late final _atanf = _atanfPtr.asFunction(); - int sigvec1( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + double atan( + double arg0, ) { - return _sigvec1( + return _atan( arg0, - arg1, - arg2, ); } - late final _sigvec1Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Pointer)>>('sigvec'); - late final _sigvec1 = _sigvec1Ptr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + late final _atanPtr = + _lookup>('atan'); + late final _atan = _atanPtr.asFunction(); - int renameat( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + double atan2f( + double arg0, + double arg1, ) { - return _renameat( + return _atan2f( arg0, arg1, - arg2, - arg3, ); } - late final _renameatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('renameat'); - late final _renameat = _renameatPtr.asFunction< - int Function(int, ffi.Pointer, int, ffi.Pointer)>(); + late final _atan2fPtr = + _lookup>( + 'atan2f'); + late final _atan2f = _atan2fPtr.asFunction(); - int renamex_np( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + double atan2( + double arg0, + double arg1, ) { - return _renamex_np( + return _atan2( arg0, arg1, - arg2, ); } - late final _renamex_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('renamex_np'); - late final _renamex_np = _renamex_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _atan2Ptr = + _lookup>( + 'atan2'); + late final _atan2 = _atan2Ptr.asFunction(); - int renameatx_np( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, - int arg4, + double cosf( + double arg0, ) { - return _renameatx_np( + return _cosf( arg0, - arg1, - arg2, - arg3, - arg4, ); } - late final _renameatx_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Pointer, ffi.UnsignedInt)>>('renameatx_np'); - late final _renameatx_np = _renameatx_npPtr.asFunction< - int Function( - int, ffi.Pointer, int, ffi.Pointer, int)>(); - - late final ffi.Pointer> ___stdinp = - _lookup>('__stdinp'); - - ffi.Pointer get __stdinp => ___stdinp.value; - - set __stdinp(ffi.Pointer value) => ___stdinp.value = value; - - late final ffi.Pointer> ___stdoutp = - _lookup>('__stdoutp'); - - ffi.Pointer get __stdoutp => ___stdoutp.value; - - set __stdoutp(ffi.Pointer value) => ___stdoutp.value = value; - - late final ffi.Pointer> ___stderrp = - _lookup>('__stderrp'); - - ffi.Pointer get __stderrp => ___stderrp.value; - - set __stderrp(ffi.Pointer value) => ___stderrp.value = value; + late final _cosfPtr = + _lookup>('cosf'); + late final _cosf = _cosfPtr.asFunction(); - void clearerr( - ffi.Pointer arg0, + double cos( + double arg0, ) { - return _clearerr( + return _cos( arg0, ); } - late final _clearerrPtr = - _lookup)>>( - 'clearerr'); - late final _clearerr = - _clearerrPtr.asFunction)>(); + late final _cosPtr = + _lookup>('cos'); + late final _cos = _cosPtr.asFunction(); - int fclose( - ffi.Pointer arg0, + double sinf( + double arg0, ) { - return _fclose( + return _sinf( arg0, ); } - late final _fclosePtr = - _lookup)>>( - 'fclose'); - late final _fclose = _fclosePtr.asFunction)>(); + late final _sinfPtr = + _lookup>('sinf'); + late final _sinf = _sinfPtr.asFunction(); - int feof( - ffi.Pointer arg0, + double sin( + double arg0, ) { - return _feof( + return _sin( arg0, ); } - late final _feofPtr = - _lookup)>>('feof'); - late final _feof = _feofPtr.asFunction)>(); + late final _sinPtr = + _lookup>('sin'); + late final _sin = _sinPtr.asFunction(); - int ferror( - ffi.Pointer arg0, + double tanf( + double arg0, ) { - return _ferror( + return _tanf( arg0, ); } - late final _ferrorPtr = - _lookup)>>( - 'ferror'); - late final _ferror = _ferrorPtr.asFunction)>(); + late final _tanfPtr = + _lookup>('tanf'); + late final _tanf = _tanfPtr.asFunction(); - int fflush( - ffi.Pointer arg0, + double tan( + double arg0, ) { - return _fflush( + return _tan( arg0, ); } - late final _fflushPtr = - _lookup)>>( - 'fflush'); - late final _fflush = _fflushPtr.asFunction)>(); + late final _tanPtr = + _lookup>('tan'); + late final _tan = _tanPtr.asFunction(); - int fgetc( - ffi.Pointer arg0, + double acoshf( + double arg0, ) { - return _fgetc( + return _acoshf( arg0, ); } - late final _fgetcPtr = - _lookup)>>('fgetc'); - late final _fgetc = _fgetcPtr.asFunction)>(); + late final _acoshfPtr = + _lookup>('acoshf'); + late final _acoshf = _acoshfPtr.asFunction(); - int fgetpos( - ffi.Pointer arg0, - ffi.Pointer arg1, + double acosh( + double arg0, ) { - return _fgetpos( + return _acosh( arg0, - arg1, ); } - late final _fgetposPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fgetpos'); - late final _fgetpos = _fgetposPtr - .asFunction, ffi.Pointer)>(); + late final _acoshPtr = + _lookup>('acosh'); + late final _acosh = _acoshPtr.asFunction(); - ffi.Pointer fgets( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + double asinhf( + double arg0, ) { - return _fgets( + return _asinhf( arg0, - arg1, - arg2, ); } - late final _fgetsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int, ffi.Pointer)>>('fgets'); - late final _fgets = _fgetsPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + late final _asinhfPtr = + _lookup>('asinhf'); + late final _asinhf = _asinhfPtr.asFunction(); - ffi.Pointer fopen( - ffi.Pointer __filename, - ffi.Pointer __mode, + double asinh( + double arg0, ) { - return _fopen( - __filename, - __mode, + return _asinh( + arg0, ); } - late final _fopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('fopen'); - late final _fopen = _fopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _asinhPtr = + _lookup>('asinh'); + late final _asinh = _asinhPtr.asFunction(); - int fprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double atanhf( + double arg0, ) { - return _fprintf( + return _atanhf( arg0, - arg1, ); } - late final _fprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('fprintf'); - late final _fprintf = _fprintfPtr - .asFunction, ffi.Pointer)>(); + late final _atanhfPtr = + _lookup>('atanhf'); + late final _atanhf = _atanhfPtr.asFunction(); - int fputc( - int arg0, - ffi.Pointer arg1, + double atanh( + double arg0, ) { - return _fputc( + return _atanh( arg0, - arg1, ); } - late final _fputcPtr = - _lookup)>>( - 'fputc'); - late final _fputc = - _fputcPtr.asFunction)>(); + late final _atanhPtr = + _lookup>('atanh'); + late final _atanh = _atanhPtr.asFunction(); - int fputs( - ffi.Pointer arg0, - ffi.Pointer arg1, + double coshf( + double arg0, ) { - return _fputs( + return _coshf( arg0, - arg1, ); } - late final _fputsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fputs'); - late final _fputs = _fputsPtr - .asFunction, ffi.Pointer)>(); + late final _coshfPtr = + _lookup>('coshf'); + late final _coshf = _coshfPtr.asFunction(); - int fread( - ffi.Pointer __ptr, - int __size, - int __nitems, - ffi.Pointer __stream, + double cosh( + double arg0, ) { - return _fread( - __ptr, - __size, - __nitems, - __stream, + return _cosh( + arg0, ); } - late final _freadPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer)>>('fread'); - late final _fread = _freadPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + late final _coshPtr = + _lookup>('cosh'); + late final _cosh = _coshPtr.asFunction(); - ffi.Pointer freopen( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + double sinhf( + double arg0, ) { - return _freopen( + return _sinhf( arg0, - arg1, - arg2, ); } - late final _freopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('freopen'); - late final _freopen = _freopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + late final _sinhfPtr = + _lookup>('sinhf'); + late final _sinhf = _sinhfPtr.asFunction(); - int fscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double sinh( + double arg0, ) { - return _fscanf( + return _sinh( arg0, - arg1, ); } - late final _fscanfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('fscanf'); - late final _fscanf = _fscanfPtr - .asFunction, ffi.Pointer)>(); + late final _sinhPtr = + _lookup>('sinh'); + late final _sinh = _sinhPtr.asFunction(); - int fseek( - ffi.Pointer arg0, - int arg1, - int arg2, + double tanhf( + double arg0, ) { - return _fseek( + return _tanhf( arg0, - arg1, - arg2, ); } - late final _fseekPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Long, ffi.Int)>>('fseek'); - late final _fseek = - _fseekPtr.asFunction, int, int)>(); + late final _tanhfPtr = + _lookup>('tanhf'); + late final _tanhf = _tanhfPtr.asFunction(); - int fsetpos( - ffi.Pointer arg0, - ffi.Pointer arg1, + double tanh( + double arg0, ) { - return _fsetpos( + return _tanh( arg0, - arg1, ); } - late final _fsetposPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fsetpos'); - late final _fsetpos = _fsetposPtr - .asFunction, ffi.Pointer)>(); + late final _tanhPtr = + _lookup>('tanh'); + late final _tanh = _tanhPtr.asFunction(); - int ftell( - ffi.Pointer arg0, + double expf( + double arg0, ) { - return _ftell( + return _expf( arg0, ); } - late final _ftellPtr = - _lookup)>>( - 'ftell'); - late final _ftell = _ftellPtr.asFunction)>(); + late final _expfPtr = + _lookup>('expf'); + late final _expf = _expfPtr.asFunction(); - int fwrite( - ffi.Pointer __ptr, - int __size, - int __nitems, - ffi.Pointer __stream, + double exp( + double arg0, ) { - return _fwrite( - __ptr, - __size, - __nitems, - __stream, + return _exp( + arg0, ); } - late final _fwritePtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer)>>('fwrite'); - late final _fwrite = _fwritePtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + late final _expPtr = + _lookup>('exp'); + late final _exp = _expPtr.asFunction(); - int getc( - ffi.Pointer arg0, + double exp2f( + double arg0, ) { - return _getc( + return _exp2f( arg0, ); } - late final _getcPtr = - _lookup)>>('getc'); - late final _getc = _getcPtr.asFunction)>(); - - int getchar() { - return _getchar(); - } - - late final _getcharPtr = - _lookup>('getchar'); - late final _getchar = _getcharPtr.asFunction(); + late final _exp2fPtr = + _lookup>('exp2f'); + late final _exp2f = _exp2fPtr.asFunction(); - ffi.Pointer gets( - ffi.Pointer arg0, + double exp2( + double arg0, ) { - return _gets( + return _exp2( arg0, ); } - late final _getsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('gets'); - late final _gets = _getsPtr - .asFunction Function(ffi.Pointer)>(); + late final _exp2Ptr = + _lookup>('exp2'); + late final _exp2 = _exp2Ptr.asFunction(); - void perror( - ffi.Pointer arg0, + double expm1f( + double arg0, ) { - return _perror( + return _expm1f( arg0, ); } - late final _perrorPtr = - _lookup)>>( - 'perror'); - late final _perror = - _perrorPtr.asFunction)>(); + late final _expm1fPtr = + _lookup>('expm1f'); + late final _expm1f = _expm1fPtr.asFunction(); - int printf( - ffi.Pointer arg0, + double expm1( + double arg0, ) { - return _printf( + return _expm1( arg0, ); } - late final _printfPtr = - _lookup)>>( - 'printf'); - late final _printf = - _printfPtr.asFunction)>(); + late final _expm1Ptr = + _lookup>('expm1'); + late final _expm1 = _expm1Ptr.asFunction(); - int putc( - int arg0, - ffi.Pointer arg1, + double logf( + double arg0, ) { - return _putc( + return _logf( arg0, - arg1, ); } - late final _putcPtr = - _lookup)>>( - 'putc'); - late final _putc = - _putcPtr.asFunction)>(); + late final _logfPtr = + _lookup>('logf'); + late final _logf = _logfPtr.asFunction(); - int putchar( - int arg0, + double log( + double arg0, ) { - return _putchar( + return _log( arg0, ); } - late final _putcharPtr = - _lookup>('putchar'); - late final _putchar = _putcharPtr.asFunction(); + late final _logPtr = + _lookup>('log'); + late final _log = _logPtr.asFunction(); - int puts( - ffi.Pointer arg0, + double log10f( + double arg0, ) { - return _puts( + return _log10f( arg0, ); } - late final _putsPtr = - _lookup)>>( - 'puts'); - late final _puts = _putsPtr.asFunction)>(); + late final _log10fPtr = + _lookup>('log10f'); + late final _log10f = _log10fPtr.asFunction(); - int remove( - ffi.Pointer arg0, + double log10( + double arg0, ) { - return _remove( + return _log10( arg0, ); } - late final _removePtr = - _lookup)>>( - 'remove'); - late final _remove = - _removePtr.asFunction)>(); + late final _log10Ptr = + _lookup>('log10'); + late final _log10 = _log10Ptr.asFunction(); - int rename( - ffi.Pointer __old, - ffi.Pointer __new, + double log2f( + double arg0, ) { - return _rename( - __old, - __new, + return _log2f( + arg0, ); } - late final _renamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('rename'); - late final _rename = _renamePtr - .asFunction, ffi.Pointer)>(); + late final _log2fPtr = + _lookup>('log2f'); + late final _log2f = _log2fPtr.asFunction(); - void rewind( - ffi.Pointer arg0, + double log2( + double arg0, ) { - return _rewind( + return _log2( arg0, ); } - late final _rewindPtr = - _lookup)>>( - 'rewind'); - late final _rewind = - _rewindPtr.asFunction)>(); + late final _log2Ptr = + _lookup>('log2'); + late final _log2 = _log2Ptr.asFunction(); - int scanf( - ffi.Pointer arg0, + double log1pf( + double arg0, ) { - return _scanf( + return _log1pf( arg0, ); } - late final _scanfPtr = - _lookup)>>( - 'scanf'); - late final _scanf = - _scanfPtr.asFunction)>(); + late final _log1pfPtr = + _lookup>('log1pf'); + late final _log1pf = _log1pfPtr.asFunction(); - void setbuf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double log1p( + double arg0, ) { - return _setbuf( + return _log1p( arg0, - arg1, ); } - late final _setbufPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('setbuf'); - late final _setbuf = _setbufPtr - .asFunction, ffi.Pointer)>(); + late final _log1pPtr = + _lookup>('log1p'); + late final _log1p = _log1pPtr.asFunction(); - int setvbuf( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - int arg3, + double logbf( + double arg0, ) { - return _setvbuf( + return _logbf( arg0, - arg1, - arg2, - arg3, ); } - late final _setvbufPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int, - ffi.Size)>>('setvbuf'); - late final _setvbuf = _setvbufPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int)>(); + late final _logbfPtr = + _lookup>('logbf'); + late final _logbf = _logbfPtr.asFunction(); - int sprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double logb( + double arg0, ) { - return _sprintf( + return _logb( arg0, - arg1, ); } - late final _sprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sprintf'); - late final _sprintf = _sprintfPtr - .asFunction, ffi.Pointer)>(); + late final _logbPtr = + _lookup>('logb'); + late final _logb = _logbPtr.asFunction(); - int sscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double modff( + double arg0, + ffi.Pointer arg1, ) { - return _sscanf( + return _modff( arg0, arg1, ); } - late final _sscanfPtr = _lookup< + late final _modffPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sscanf'); - late final _sscanf = _sscanfPtr - .asFunction, ffi.Pointer)>(); - - ffi.Pointer tmpfile() { - return _tmpfile(); - } - - late final _tmpfilePtr = - _lookup Function()>>('tmpfile'); - late final _tmpfile = _tmpfilePtr.asFunction Function()>(); + ffi.Float Function(ffi.Float, ffi.Pointer)>>('modff'); + late final _modff = + _modffPtr.asFunction)>(); - ffi.Pointer tmpnam( - ffi.Pointer arg0, + double modf( + double arg0, + ffi.Pointer arg1, ) { - return _tmpnam( + return _modf( arg0, + arg1, ); } - late final _tmpnamPtr = _lookup< + late final _modfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('tmpnam'); - late final _tmpnam = _tmpnamPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Double Function(ffi.Double, ffi.Pointer)>>('modf'); + late final _modf = + _modfPtr.asFunction)>(); - int ungetc( - int arg0, - ffi.Pointer arg1, + double ldexpf( + double arg0, + int arg1, ) { - return _ungetc( + return _ldexpf( arg0, arg1, ); } - late final _ungetcPtr = - _lookup)>>( - 'ungetc'); - late final _ungetc = - _ungetcPtr.asFunction)>(); + late final _ldexpfPtr = + _lookup>( + 'ldexpf'); + late final _ldexpf = _ldexpfPtr.asFunction(); - int vfprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + double ldexp( + double arg0, + int arg1, ) { - return _vfprintf( + return _ldexp( arg0, arg1, - arg2, ); } - late final _vfprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, va_list)>>('vfprintf'); - late final _vfprintf = _vfprintfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + late final _ldexpPtr = + _lookup>( + 'ldexp'); + late final _ldexp = _ldexpPtr.asFunction(); - int vprintf( - ffi.Pointer arg0, - va_list arg1, + double frexpf( + double arg0, + ffi.Pointer arg1, ) { - return _vprintf( + return _frexpf( arg0, arg1, ); } - late final _vprintfPtr = _lookup< - ffi.NativeFunction, va_list)>>( - 'vprintf'); - late final _vprintf = - _vprintfPtr.asFunction, va_list)>(); + late final _frexpfPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Float, ffi.Pointer)>>('frexpf'); + late final _frexpf = + _frexpfPtr.asFunction)>(); - int vsprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + double frexp( + double arg0, + ffi.Pointer arg1, ) { - return _vsprintf( + return _frexp( arg0, arg1, - arg2, ); } - late final _vsprintfPtr = _lookup< + late final _frexpPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - va_list)>>('vsprintf'); - late final _vsprintf = _vsprintfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + ffi.Double Function(ffi.Double, ffi.Pointer)>>('frexp'); + late final _frexp = + _frexpPtr.asFunction)>(); - ffi.Pointer ctermid( - ffi.Pointer arg0, + int ilogbf( + double arg0, ) { - return _ctermid( + return _ilogbf( arg0, ); } - late final _ctermidPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctermid'); - late final _ctermid = _ctermidPtr - .asFunction Function(ffi.Pointer)>(); + late final _ilogbfPtr = + _lookup>('ilogbf'); + late final _ilogbf = _ilogbfPtr.asFunction(); - ffi.Pointer fdopen( - int arg0, - ffi.Pointer arg1, + int ilogb( + double arg0, ) { - return _fdopen( + return _ilogb( arg0, - arg1, ); } - late final _fdopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer)>>('fdopen'); - late final _fdopen = _fdopenPtr - .asFunction Function(int, ffi.Pointer)>(); + late final _ilogbPtr = + _lookup>('ilogb'); + late final _ilogb = _ilogbPtr.asFunction(); - int fileno( - ffi.Pointer arg0, + double scalbnf( + double arg0, + int arg1, ) { - return _fileno( + return _scalbnf( arg0, + arg1, ); } - late final _filenoPtr = - _lookup)>>( - 'fileno'); - late final _fileno = _filenoPtr.asFunction)>(); + late final _scalbnfPtr = + _lookup>( + 'scalbnf'); + late final _scalbnf = _scalbnfPtr.asFunction(); - int pclose( - ffi.Pointer arg0, + double scalbn( + double arg0, + int arg1, ) { - return _pclose( + return _scalbn( arg0, + arg1, ); } - late final _pclosePtr = - _lookup)>>( - 'pclose'); - late final _pclose = _pclosePtr.asFunction)>(); + late final _scalbnPtr = + _lookup>( + 'scalbn'); + late final _scalbn = _scalbnPtr.asFunction(); - ffi.Pointer popen( - ffi.Pointer arg0, - ffi.Pointer arg1, + double scalblnf( + double arg0, + int arg1, ) { - return _popen( + return _scalblnf( arg0, arg1, ); } - late final _popenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('popen'); - late final _popen = _popenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _scalblnfPtr = + _lookup>( + 'scalblnf'); + late final _scalblnf = + _scalblnfPtr.asFunction(); - int __srget( - ffi.Pointer arg0, + double scalbln( + double arg0, + int arg1, ) { - return ___srget( + return _scalbln( arg0, + arg1, ); } - late final ___srgetPtr = - _lookup)>>( - '__srget'); - late final ___srget = - ___srgetPtr.asFunction)>(); + late final _scalblnPtr = + _lookup>( + 'scalbln'); + late final _scalbln = _scalblnPtr.asFunction(); - int __svfscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + double fabsf( + double arg0, ) { - return ___svfscanf( + return _fabsf( arg0, - arg1, - arg2, ); } - late final ___svfscanfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - va_list)>>('__svfscanf'); - late final ___svfscanf = ___svfscanfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + late final _fabsfPtr = + _lookup>('fabsf'); + late final _fabsf = _fabsfPtr.asFunction(); - int __swbuf( - int arg0, - ffi.Pointer arg1, + double fabs( + double arg0, ) { - return ___swbuf( + return _fabs( arg0, - arg1, ); } - late final ___swbufPtr = - _lookup)>>( - '__swbuf'); - late final ___swbuf = - ___swbufPtr.asFunction)>(); + late final _fabsPtr = + _lookup>('fabs'); + late final _fabs = _fabsPtr.asFunction(); - void flockfile( - ffi.Pointer arg0, + double cbrtf( + double arg0, ) { - return _flockfile( + return _cbrtf( arg0, ); } - late final _flockfilePtr = - _lookup)>>( - 'flockfile'); - late final _flockfile = - _flockfilePtr.asFunction)>(); + late final _cbrtfPtr = + _lookup>('cbrtf'); + late final _cbrtf = _cbrtfPtr.asFunction(); - int ftrylockfile( - ffi.Pointer arg0, + double cbrt( + double arg0, ) { - return _ftrylockfile( + return _cbrt( arg0, ); } - late final _ftrylockfilePtr = - _lookup)>>( - 'ftrylockfile'); - late final _ftrylockfile = - _ftrylockfilePtr.asFunction)>(); + late final _cbrtPtr = + _lookup>('cbrt'); + late final _cbrt = _cbrtPtr.asFunction(); - void funlockfile( - ffi.Pointer arg0, + double hypotf( + double arg0, + double arg1, ) { - return _funlockfile( + return _hypotf( arg0, + arg1, ); } - late final _funlockfilePtr = - _lookup)>>( - 'funlockfile'); - late final _funlockfile = - _funlockfilePtr.asFunction)>(); + late final _hypotfPtr = + _lookup>( + 'hypotf'); + late final _hypotf = _hypotfPtr.asFunction(); - int getc_unlocked( - ffi.Pointer arg0, + double hypot( + double arg0, + double arg1, ) { - return _getc_unlocked( + return _hypot( arg0, + arg1, ); } - late final _getc_unlockedPtr = - _lookup)>>( - 'getc_unlocked'); - late final _getc_unlocked = - _getc_unlockedPtr.asFunction)>(); + late final _hypotPtr = + _lookup>( + 'hypot'); + late final _hypot = _hypotPtr.asFunction(); - int getchar_unlocked() { - return _getchar_unlocked(); + double powf( + double arg0, + double arg1, + ) { + return _powf( + arg0, + arg1, + ); } - late final _getchar_unlockedPtr = - _lookup>('getchar_unlocked'); - late final _getchar_unlocked = - _getchar_unlockedPtr.asFunction(); + late final _powfPtr = + _lookup>( + 'powf'); + late final _powf = _powfPtr.asFunction(); - int putc_unlocked( - int arg0, - ffi.Pointer arg1, + double pow( + double arg0, + double arg1, ) { - return _putc_unlocked( + return _pow( arg0, arg1, ); } - late final _putc_unlockedPtr = - _lookup)>>( - 'putc_unlocked'); - late final _putc_unlocked = - _putc_unlockedPtr.asFunction)>(); + late final _powPtr = + _lookup>( + 'pow'); + late final _pow = _powPtr.asFunction(); - int putchar_unlocked( - int arg0, + double sqrtf( + double arg0, ) { - return _putchar_unlocked( + return _sqrtf( arg0, ); } - late final _putchar_unlockedPtr = - _lookup>( - 'putchar_unlocked'); - late final _putchar_unlocked = - _putchar_unlockedPtr.asFunction(); + late final _sqrtfPtr = + _lookup>('sqrtf'); + late final _sqrtf = _sqrtfPtr.asFunction(); - int getw( - ffi.Pointer arg0, + double sqrt( + double arg0, ) { - return _getw( + return _sqrt( arg0, ); } - late final _getwPtr = - _lookup)>>('getw'); - late final _getw = _getwPtr.asFunction)>(); + late final _sqrtPtr = + _lookup>('sqrt'); + late final _sqrt = _sqrtPtr.asFunction(); - int putw( - int arg0, - ffi.Pointer arg1, + double erff( + double arg0, ) { - return _putw( + return _erff( arg0, - arg1, ); } - late final _putwPtr = - _lookup)>>( - 'putw'); - late final _putw = - _putwPtr.asFunction)>(); + late final _erffPtr = + _lookup>('erff'); + late final _erff = _erffPtr.asFunction(); - ffi.Pointer tempnam( - ffi.Pointer __dir, - ffi.Pointer __prefix, + double erf( + double arg0, ) { - return _tempnam( - __dir, - __prefix, + return _erf( + arg0, ); } - late final _tempnamPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('tempnam'); - late final _tempnam = _tempnamPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _erfPtr = + _lookup>('erf'); + late final _erf = _erfPtr.asFunction(); - int fseeko( - ffi.Pointer __stream, - int __offset, - int __whence, + double erfcf( + double arg0, ) { - return _fseeko( - __stream, - __offset, - __whence, + return _erfcf( + arg0, ); } - late final _fseekoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, off_t, ffi.Int)>>('fseeko'); - late final _fseeko = - _fseekoPtr.asFunction, int, int)>(); + late final _erfcfPtr = + _lookup>('erfcf'); + late final _erfcf = _erfcfPtr.asFunction(); - int ftello( - ffi.Pointer __stream, + double erfc( + double arg0, ) { - return _ftello( - __stream, + return _erfc( + arg0, ); } - late final _ftelloPtr = - _lookup)>>('ftello'); - late final _ftello = _ftelloPtr.asFunction)>(); + late final _erfcPtr = + _lookup>('erfc'); + late final _erfc = _erfcPtr.asFunction(); - int snprintf( - ffi.Pointer __str, - int __size, - ffi.Pointer __format, + double lgammaf( + double arg0, ) { - return _snprintf( - __str, - __size, - __format, + return _lgammaf( + arg0, ); } - late final _snprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer)>>('snprintf'); - late final _snprintf = _snprintfPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); + late final _lgammafPtr = + _lookup>('lgammaf'); + late final _lgammaf = _lgammafPtr.asFunction(); - int vfscanf( - ffi.Pointer __stream, - ffi.Pointer __format, - va_list arg2, + double lgamma( + double arg0, ) { - return _vfscanf( - __stream, - __format, - arg2, + return _lgamma( + arg0, ); } - late final _vfscanfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, va_list)>>('vfscanf'); - late final _vfscanf = _vfscanfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + late final _lgammaPtr = + _lookup>('lgamma'); + late final _lgamma = _lgammaPtr.asFunction(); - int vscanf( - ffi.Pointer __format, - va_list arg1, + double tgammaf( + double arg0, ) { - return _vscanf( - __format, - arg1, + return _tgammaf( + arg0, ); } - late final _vscanfPtr = _lookup< - ffi.NativeFunction, va_list)>>( - 'vscanf'); - late final _vscanf = - _vscanfPtr.asFunction, va_list)>(); + late final _tgammafPtr = + _lookup>('tgammaf'); + late final _tgammaf = _tgammafPtr.asFunction(); - int vsnprintf( - ffi.Pointer __str, - int __size, - ffi.Pointer __format, - va_list arg3, + double tgamma( + double arg0, ) { - return _vsnprintf( - __str, - __size, - __format, - arg3, + return _tgamma( + arg0, ); } - late final _vsnprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer, va_list)>>('vsnprintf'); - late final _vsnprintf = _vsnprintfPtr.asFunction< - int Function( - ffi.Pointer, int, ffi.Pointer, va_list)>(); + late final _tgammaPtr = + _lookup>('tgamma'); + late final _tgamma = _tgammaPtr.asFunction(); - int vsscanf( - ffi.Pointer __str, - ffi.Pointer __format, - va_list arg2, + double ceilf( + double arg0, ) { - return _vsscanf( - __str, - __format, - arg2, + return _ceilf( + arg0, ); } - late final _vsscanfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - va_list)>>('vsscanf'); - late final _vsscanf = _vsscanfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + late final _ceilfPtr = + _lookup>('ceilf'); + late final _ceilf = _ceilfPtr.asFunction(); - int dprintf( - int arg0, - ffi.Pointer arg1, + double ceil( + double arg0, ) { - return _dprintf( + return _ceil( arg0, - arg1, ); } - late final _dprintfPtr = _lookup< - ffi.NativeFunction)>>( - 'dprintf'); - late final _dprintf = - _dprintfPtr.asFunction)>(); + late final _ceilPtr = + _lookup>('ceil'); + late final _ceil = _ceilPtr.asFunction(); - int vdprintf( - int arg0, - ffi.Pointer arg1, - va_list arg2, + double floorf( + double arg0, ) { - return _vdprintf( + return _floorf( arg0, - arg1, - arg2, ); } - late final _vdprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, va_list)>>('vdprintf'); - late final _vdprintf = _vdprintfPtr - .asFunction, va_list)>(); + late final _floorfPtr = + _lookup>('floorf'); + late final _floorf = _floorfPtr.asFunction(); - int getdelim( - ffi.Pointer> __linep, - ffi.Pointer __linecapp, - int __delimiter, - ffi.Pointer __stream, + double floor( + double arg0, ) { - return _getdelim( - __linep, - __linecapp, - __delimiter, - __stream, + return _floor( + arg0, ); } - late final _getdelimPtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Pointer>, - ffi.Pointer, ffi.Int, ffi.Pointer)>>('getdelim'); - late final _getdelim = _getdelimPtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - int, ffi.Pointer)>(); + late final _floorPtr = + _lookup>('floor'); + late final _floor = _floorPtr.asFunction(); - int getline( - ffi.Pointer> __linep, - ffi.Pointer __linecapp, - ffi.Pointer __stream, + double nearbyintf( + double arg0, ) { - return _getline( - __linep, - __linecapp, - __stream, + return _nearbyintf( + arg0, ); } - late final _getlinePtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>>('getline'); - late final _getline = _getlinePtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - ffi.Pointer)>(); + late final _nearbyintfPtr = + _lookup>('nearbyintf'); + late final _nearbyintf = _nearbyintfPtr.asFunction(); - ffi.Pointer fmemopen( - ffi.Pointer __buf, - int __size, - ffi.Pointer __mode, + double nearbyint( + double arg0, ) { - return _fmemopen( - __buf, - __size, - __mode, + return _nearbyint( + arg0, ); } - late final _fmemopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Size, - ffi.Pointer)>>('fmemopen'); - late final _fmemopen = _fmemopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + late final _nearbyintPtr = + _lookup>('nearbyint'); + late final _nearbyint = _nearbyintPtr.asFunction(); - ffi.Pointer open_memstream( - ffi.Pointer> __bufp, - ffi.Pointer __sizep, + double rintf( + double arg0, ) { - return _open_memstream( - __bufp, - __sizep, + return _rintf( + arg0, ); } - late final _open_memstreamPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer>, - ffi.Pointer)>>('open_memstream'); - late final _open_memstream = _open_memstreamPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer>, ffi.Pointer)>(); - - late final ffi.Pointer _sys_nerr = _lookup('sys_nerr'); - - int get sys_nerr => _sys_nerr.value; + late final _rintfPtr = + _lookup>('rintf'); + late final _rintf = _rintfPtr.asFunction(); - set sys_nerr(int value) => _sys_nerr.value = value; + double rint( + double arg0, + ) { + return _rint( + arg0, + ); + } - late final ffi.Pointer>> _sys_errlist = - _lookup>>('sys_errlist'); + late final _rintPtr = + _lookup>('rint'); + late final _rint = _rintPtr.asFunction(); - ffi.Pointer> get sys_errlist => _sys_errlist.value; + int lrintf( + double arg0, + ) { + return _lrintf( + arg0, + ); + } - set sys_errlist(ffi.Pointer> value) => - _sys_errlist.value = value; + late final _lrintfPtr = + _lookup>('lrintf'); + late final _lrintf = _lrintfPtr.asFunction(); - int asprintf( - ffi.Pointer> arg0, - ffi.Pointer arg1, + int lrint( + double arg0, ) { - return _asprintf( + return _lrint( arg0, - arg1, ); } - late final _asprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer)>>('asprintf'); - late final _asprintf = _asprintfPtr.asFunction< - int Function( - ffi.Pointer>, ffi.Pointer)>(); + late final _lrintPtr = + _lookup>('lrint'); + late final _lrint = _lrintPtr.asFunction(); - ffi.Pointer ctermid_r( - ffi.Pointer arg0, + double roundf( + double arg0, ) { - return _ctermid_r( + return _roundf( arg0, ); } - late final _ctermid_rPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctermid_r'); - late final _ctermid_r = _ctermid_rPtr - .asFunction Function(ffi.Pointer)>(); + late final _roundfPtr = + _lookup>('roundf'); + late final _roundf = _roundfPtr.asFunction(); - ffi.Pointer fgetln( - ffi.Pointer arg0, - ffi.Pointer arg1, + double round( + double arg0, ) { - return _fgetln( + return _round( arg0, - arg1, ); } - late final _fgetlnPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('fgetln'); - late final _fgetln = _fgetlnPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _roundPtr = + _lookup>('round'); + late final _round = _roundPtr.asFunction(); - ffi.Pointer fmtcheck( - ffi.Pointer arg0, - ffi.Pointer arg1, + int lroundf( + double arg0, ) { - return _fmtcheck( + return _lroundf( arg0, - arg1, ); } - late final _fmtcheckPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('fmtcheck'); - late final _fmtcheck = _fmtcheckPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _lroundfPtr = + _lookup>('lroundf'); + late final _lroundf = _lroundfPtr.asFunction(); - int fpurge( - ffi.Pointer arg0, + int lround( + double arg0, ) { - return _fpurge( + return _lround( arg0, ); } - late final _fpurgePtr = - _lookup)>>( - 'fpurge'); - late final _fpurge = _fpurgePtr.asFunction)>(); + late final _lroundPtr = + _lookup>('lround'); + late final _lround = _lroundPtr.asFunction(); - void setbuffer( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int llrintf( + double arg0, ) { - return _setbuffer( + return _llrintf( arg0, - arg1, - arg2, ); } - late final _setbufferPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>>('setbuffer'); - late final _setbuffer = _setbufferPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _llrintfPtr = + _lookup>('llrintf'); + late final _llrintf = _llrintfPtr.asFunction(); - int setlinebuf( - ffi.Pointer arg0, + int llrint( + double arg0, ) { - return _setlinebuf( + return _llrint( arg0, ); } - late final _setlinebufPtr = - _lookup)>>( - 'setlinebuf'); - late final _setlinebuf = - _setlinebufPtr.asFunction)>(); + late final _llrintPtr = + _lookup>('llrint'); + late final _llrint = _llrintPtr.asFunction(); - int vasprintf( - ffi.Pointer> arg0, - ffi.Pointer arg1, - va_list arg2, + int llroundf( + double arg0, ) { - return _vasprintf( + return _llroundf( arg0, - arg1, - arg2, ); } - late final _vasprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer, va_list)>>('vasprintf'); - late final _vasprintf = _vasprintfPtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - va_list)>(); + late final _llroundfPtr = + _lookup>('llroundf'); + late final _llroundf = _llroundfPtr.asFunction(); - ffi.Pointer funopen( - ffi.Pointer arg0, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> - arg1, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> - arg2, - ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> - arg3, - ffi.Pointer)>> - arg4, + int llround( + double arg0, ) { - return _funopen( + return _llround( arg0, - arg1, - arg2, - arg3, - arg4, ); } - late final _funopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>)>>('funopen'); - late final _funopen = _funopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction)>>)>(); + late final _llroundPtr = + _lookup>('llround'); + late final _llround = _llroundPtr.asFunction(); - int __sprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, + double truncf( + double arg0, ) { - return ___sprintf_chk( + return _truncf( arg0, - arg1, - arg2, - arg3, ); } - late final ___sprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, - ffi.Pointer)>>('__sprintf_chk'); - late final ___sprintf_chk = ___sprintf_chkPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + late final _truncfPtr = + _lookup>('truncf'); + late final _truncf = _truncfPtr.asFunction(); - int __snprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, - ffi.Pointer arg4, + double trunc( + double arg0, ) { - return ___snprintf_chk( + return _trunc( arg0, - arg1, - arg2, - arg3, - arg4, ); } - late final ___snprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, - ffi.Pointer)>>('__snprintf_chk'); - late final ___snprintf_chk = ___snprintf_chkPtr.asFunction< - int Function( - ffi.Pointer, int, int, int, ffi.Pointer)>(); + late final _truncPtr = + _lookup>('trunc'); + late final _trunc = _truncPtr.asFunction(); - int __vsprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, - va_list arg4, + double fmodf( + double arg0, + double arg1, ) { - return ___vsprintf_chk( + return _fmodf( arg0, arg1, - arg2, - arg3, - arg4, ); } - late final ___vsprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, - ffi.Pointer, va_list)>>('__vsprintf_chk'); - late final ___vsprintf_chk = ___vsprintf_chkPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer, va_list)>(); + late final _fmodfPtr = + _lookup>( + 'fmodf'); + late final _fmodf = _fmodfPtr.asFunction(); - int __vsnprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, - ffi.Pointer arg4, - va_list arg5, + double fmod( + double arg0, + double arg1, ) { - return ___vsnprintf_chk( + return _fmod( arg0, arg1, - arg2, - arg3, - arg4, - arg5, ); } - late final ___vsnprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, - ffi.Pointer, va_list)>>('__vsnprintf_chk'); - late final ___vsnprintf_chk = ___vsnprintf_chkPtr.asFunction< - int Function(ffi.Pointer, int, int, int, ffi.Pointer, - va_list)>(); + late final _fmodPtr = + _lookup>( + 'fmod'); + late final _fmod = _fmodPtr.asFunction(); - int getpriority( - int arg0, - int arg1, + double remainderf( + double arg0, + double arg1, ) { - return _getpriority( + return _remainderf( arg0, arg1, ); } - late final _getpriorityPtr = - _lookup>( - 'getpriority'); - late final _getpriority = - _getpriorityPtr.asFunction(); + late final _remainderfPtr = + _lookup>( + 'remainderf'); + late final _remainderf = + _remainderfPtr.asFunction(); - int getiopolicy_np( - int arg0, - int arg1, + double remainder( + double arg0, + double arg1, ) { - return _getiopolicy_np( + return _remainder( arg0, arg1, ); } - late final _getiopolicy_npPtr = - _lookup>( - 'getiopolicy_np'); - late final _getiopolicy_np = - _getiopolicy_npPtr.asFunction(); + late final _remainderPtr = + _lookup>( + 'remainder'); + late final _remainder = + _remainderPtr.asFunction(); - int getrlimit( - int arg0, - ffi.Pointer arg1, + double remquof( + double arg0, + double arg1, + ffi.Pointer arg2, ) { - return _getrlimit( + return _remquof( arg0, arg1, + arg2, ); } - late final _getrlimitPtr = _lookup< - ffi.NativeFunction)>>( - 'getrlimit'); - late final _getrlimit = - _getrlimitPtr.asFunction)>(); + late final _remquofPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function( + ffi.Float, ffi.Float, ffi.Pointer)>>('remquof'); + late final _remquof = _remquofPtr + .asFunction)>(); - int getrusage( - int arg0, - ffi.Pointer arg1, + double remquo( + double arg0, + double arg1, + ffi.Pointer arg2, ) { - return _getrusage( + return _remquo( arg0, arg1, + arg2, ); } - late final _getrusagePtr = _lookup< - ffi.NativeFunction)>>( - 'getrusage'); - late final _getrusage = - _getrusagePtr.asFunction)>(); + late final _remquoPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function( + ffi.Double, ffi.Double, ffi.Pointer)>>('remquo'); + late final _remquo = _remquoPtr + .asFunction)>(); - int setpriority( - int arg0, - int arg1, - int arg2, + double copysignf( + double arg0, + double arg1, ) { - return _setpriority( + return _copysignf( arg0, arg1, - arg2, ); } - late final _setpriorityPtr = - _lookup>( - 'setpriority'); - late final _setpriority = - _setpriorityPtr.asFunction(); + late final _copysignfPtr = + _lookup>( + 'copysignf'); + late final _copysignf = + _copysignfPtr.asFunction(); - int setiopolicy_np( - int arg0, - int arg1, - int arg2, + double copysign( + double arg0, + double arg1, ) { - return _setiopolicy_np( + return _copysign( arg0, arg1, - arg2, ); } - late final _setiopolicy_npPtr = - _lookup>( - 'setiopolicy_np'); - late final _setiopolicy_np = - _setiopolicy_npPtr.asFunction(); + late final _copysignPtr = + _lookup>( + 'copysign'); + late final _copysign = + _copysignPtr.asFunction(); - int setrlimit( - int arg0, - ffi.Pointer arg1, + double nanf( + ffi.Pointer arg0, ) { - return _setrlimit( + return _nanf( arg0, - arg1, ); } - late final _setrlimitPtr = _lookup< - ffi.NativeFunction)>>( - 'setrlimit'); - late final _setrlimit = - _setrlimitPtr.asFunction)>(); + late final _nanfPtr = + _lookup)>>( + 'nanf'); + late final _nanf = + _nanfPtr.asFunction)>(); - int wait1( - ffi.Pointer arg0, + double nan( + ffi.Pointer arg0, ) { - return _wait1( + return _nan( arg0, ); } - late final _wait1Ptr = - _lookup)>>('wait'); - late final _wait1 = - _wait1Ptr.asFunction)>(); + late final _nanPtr = + _lookup)>>( + 'nan'); + late final _nan = + _nanPtr.asFunction)>(); - int waitpid( - int arg0, - ffi.Pointer arg1, - int arg2, + double nextafterf( + double arg0, + double arg1, ) { - return _waitpid( + return _nextafterf( arg0, arg1, - arg2, ); } - late final _waitpidPtr = _lookup< - ffi.NativeFunction< - pid_t Function(pid_t, ffi.Pointer, ffi.Int)>>('waitpid'); - late final _waitpid = - _waitpidPtr.asFunction, int)>(); + late final _nextafterfPtr = + _lookup>( + 'nextafterf'); + late final _nextafterf = + _nextafterfPtr.asFunction(); - int waitid( - int arg0, - int arg1, - ffi.Pointer arg2, - int arg3, + double nextafter( + double arg0, + double arg1, ) { - return _waitid( + return _nextafter( arg0, arg1, - arg2, - arg3, ); } - late final _waitidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, id_t, ffi.Pointer, ffi.Int)>>('waitid'); - late final _waitid = _waitidPtr - .asFunction, int)>(); + late final _nextafterPtr = + _lookup>( + 'nextafter'); + late final _nextafter = + _nextafterPtr.asFunction(); - int wait3( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + double fdimf( + double arg0, + double arg1, ) { - return _wait3( + return _fdimf( arg0, arg1, - arg2, ); } - late final _wait3Ptr = _lookup< - ffi.NativeFunction< - pid_t Function( - ffi.Pointer, ffi.Int, ffi.Pointer)>>('wait3'); - late final _wait3 = _wait3Ptr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); + late final _fdimfPtr = + _lookup>( + 'fdimf'); + late final _fdimf = _fdimfPtr.asFunction(); - int wait4( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + double fdim( + double arg0, + double arg1, ) { - return _wait4( + return _fdim( arg0, arg1, - arg2, - arg3, ); } - late final _wait4Ptr = _lookup< - ffi.NativeFunction< - pid_t Function(pid_t, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('wait4'); - late final _wait4 = _wait4Ptr.asFunction< - int Function(int, ffi.Pointer, int, ffi.Pointer)>(); + late final _fdimPtr = + _lookup>( + 'fdim'); + late final _fdim = _fdimPtr.asFunction(); - ffi.Pointer alloca( - int arg0, + double fmaxf( + double arg0, + double arg1, ) { - return _alloca( + return _fmaxf( arg0, + arg1, ); } - late final _allocaPtr = - _lookup Function(ffi.Size)>>( - 'alloca'); - late final _alloca = - _allocaPtr.asFunction Function(int)>(); - - late final ffi.Pointer ___mb_cur_max = - _lookup('__mb_cur_max'); - - int get __mb_cur_max => ___mb_cur_max.value; - - set __mb_cur_max(int value) => ___mb_cur_max.value = value; + late final _fmaxfPtr = + _lookup>( + 'fmaxf'); + late final _fmaxf = _fmaxfPtr.asFunction(); - ffi.Pointer malloc( - int __size, + double fmax( + double arg0, + double arg1, ) { - return _malloc( - __size, + return _fmax( + arg0, + arg1, ); } - late final _mallocPtr = - _lookup Function(ffi.Size)>>( - 'malloc'); - late final _malloc = - _mallocPtr.asFunction Function(int)>(); + late final _fmaxPtr = + _lookup>( + 'fmax'); + late final _fmax = _fmaxPtr.asFunction(); - ffi.Pointer calloc( - int __count, - int __size, + double fminf( + double arg0, + double arg1, ) { - return _calloc( - __count, - __size, + return _fminf( + arg0, + arg1, ); } - late final _callocPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Size, ffi.Size)>>('calloc'); - late final _calloc = - _callocPtr.asFunction Function(int, int)>(); + late final _fminfPtr = + _lookup>( + 'fminf'); + late final _fminf = _fminfPtr.asFunction(); - void free( - ffi.Pointer arg0, + double fmin( + double arg0, + double arg1, ) { - return _free( + return _fmin( arg0, + arg1, ); } - late final _freePtr = - _lookup)>>( - 'free'); - late final _free = - _freePtr.asFunction)>(); + late final _fminPtr = + _lookup>( + 'fmin'); + late final _fmin = _fminPtr.asFunction(); - ffi.Pointer realloc( - ffi.Pointer __ptr, - int __size, + double fmaf( + double arg0, + double arg1, + double arg2, ) { - return _realloc( - __ptr, - __size, + return _fmaf( + arg0, + arg1, + arg2, ); } - late final _reallocPtr = _lookup< + late final _fmafPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('realloc'); - late final _realloc = _reallocPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Float Function(ffi.Float, ffi.Float, ffi.Float)>>('fmaf'); + late final _fmaf = + _fmafPtr.asFunction(); - ffi.Pointer valloc( - int arg0, + double fma( + double arg0, + double arg1, + double arg2, ) { - return _valloc( + return _fma( arg0, + arg1, + arg2, ); } - late final _vallocPtr = - _lookup Function(ffi.Size)>>( - 'valloc'); - late final _valloc = - _vallocPtr.asFunction Function(int)>(); + late final _fmaPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Double, ffi.Double, ffi.Double)>>('fma'); + late final _fma = + _fmaPtr.asFunction(); - ffi.Pointer aligned_alloc( - int __alignment, - int __size, + double __exp10f( + double arg0, ) { - return _aligned_alloc( - __alignment, - __size, + return ___exp10f( + arg0, ); } - late final _aligned_allocPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Size, ffi.Size)>>('aligned_alloc'); - late final _aligned_alloc = - _aligned_allocPtr.asFunction Function(int, int)>(); + late final ___exp10fPtr = + _lookup>('__exp10f'); + late final ___exp10f = ___exp10fPtr.asFunction(); - int posix_memalign( - ffi.Pointer> __memptr, - int __alignment, - int __size, + double __exp10( + double arg0, ) { - return _posix_memalign( - __memptr, - __alignment, - __size, + return ___exp10( + arg0, ); } - late final _posix_memalignPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, ffi.Size, - ffi.Size)>>('posix_memalign'); - late final _posix_memalign = _posix_memalignPtr - .asFunction>, int, int)>(); + late final ___exp10Ptr = + _lookup>('__exp10'); + late final ___exp10 = ___exp10Ptr.asFunction(); - void abort() { - return _abort(); + double __cospif( + double arg0, + ) { + return ___cospif( + arg0, + ); } - late final _abortPtr = - _lookup>('abort'); - late final _abort = _abortPtr.asFunction(); + late final ___cospifPtr = + _lookup>('__cospif'); + late final ___cospif = ___cospifPtr.asFunction(); - int abs( - int arg0, + double __cospi( + double arg0, ) { - return _abs( + return ___cospi( arg0, ); } - late final _absPtr = - _lookup>('abs'); - late final _abs = _absPtr.asFunction(); + late final ___cospiPtr = + _lookup>('__cospi'); + late final ___cospi = ___cospiPtr.asFunction(); - int atexit( - ffi.Pointer> arg0, + double __sinpif( + double arg0, ) { - return _atexit( + return ___sinpif( arg0, ); } - late final _atexitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('atexit'); - late final _atexit = _atexitPtr.asFunction< - int Function(ffi.Pointer>)>(); + late final ___sinpifPtr = + _lookup>('__sinpif'); + late final ___sinpif = ___sinpifPtr.asFunction(); - double atof( - ffi.Pointer arg0, + double __sinpi( + double arg0, ) { - return _atof( + return ___sinpi( arg0, ); } - late final _atofPtr = - _lookup)>>( - 'atof'); - late final _atof = - _atofPtr.asFunction)>(); + late final ___sinpiPtr = + _lookup>('__sinpi'); + late final ___sinpi = ___sinpiPtr.asFunction(); - int atoi( - ffi.Pointer arg0, + double __tanpif( + double arg0, ) { - return _atoi( + return ___tanpif( arg0, ); } - late final _atoiPtr = - _lookup)>>( - 'atoi'); - late final _atoi = _atoiPtr.asFunction)>(); + late final ___tanpifPtr = + _lookup>('__tanpif'); + late final ___tanpif = ___tanpifPtr.asFunction(); - int atol( - ffi.Pointer arg0, + double __tanpi( + double arg0, ) { - return _atol( + return ___tanpi( arg0, ); } - late final _atolPtr = - _lookup)>>( - 'atol'); - late final _atol = _atolPtr.asFunction)>(); + late final ___tanpiPtr = + _lookup>('__tanpi'); + late final ___tanpi = ___tanpiPtr.asFunction(); - int atoll( - ffi.Pointer arg0, + __float2 __sincosf_stret( + double arg0, ) { - return _atoll( + return ___sincosf_stret( arg0, ); } - late final _atollPtr = - _lookup)>>( - 'atoll'); - late final _atoll = - _atollPtr.asFunction)>(); + late final ___sincosf_stretPtr = + _lookup>( + '__sincosf_stret'); + late final ___sincosf_stret = + ___sincosf_stretPtr.asFunction<__float2 Function(double)>(); - ffi.Pointer bsearch( - ffi.Pointer __key, - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + __double2 __sincos_stret( + double arg0, ) { - return _bsearch( - __key, - __base, - __nel, - __width, - __compar, + return ___sincos_stret( + arg0, ); } - late final _bsearchPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('bsearch'); - late final _bsearch = _bsearchPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + late final ___sincos_stretPtr = + _lookup>( + '__sincos_stret'); + late final ___sincos_stret = + ___sincos_stretPtr.asFunction<__double2 Function(double)>(); - div_t div( - int arg0, - int arg1, + __float2 __sincospif_stret( + double arg0, ) { - return _div( + return ___sincospif_stret( arg0, - arg1, ); } - late final _divPtr = - _lookup>('div'); - late final _div = _divPtr.asFunction(); + late final ___sincospif_stretPtr = + _lookup>( + '__sincospif_stret'); + late final ___sincospif_stret = + ___sincospif_stretPtr.asFunction<__float2 Function(double)>(); - void exit( - int arg0, + __double2 __sincospi_stret( + double arg0, ) { - return _exit1( + return ___sincospi_stret( arg0, ); } - late final _exitPtr = - _lookup>('exit'); - late final _exit1 = _exitPtr.asFunction(); + late final ___sincospi_stretPtr = + _lookup>( + '__sincospi_stret'); + late final ___sincospi_stret = + ___sincospi_stretPtr.asFunction<__double2 Function(double)>(); - ffi.Pointer getenv( - ffi.Pointer arg0, + double j0( + double arg0, ) { - return _getenv( + return _j0( arg0, ); } - late final _getenvPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('getenv'); - late final _getenv = _getenvPtr - .asFunction Function(ffi.Pointer)>(); + late final _j0Ptr = + _lookup>('j0'); + late final _j0 = _j0Ptr.asFunction(); - int labs( - int arg0, + double j1( + double arg0, ) { - return _labs( + return _j1( arg0, ); } - late final _labsPtr = - _lookup>('labs'); - late final _labs = _labsPtr.asFunction(); + late final _j1Ptr = + _lookup>('j1'); + late final _j1 = _j1Ptr.asFunction(); - ldiv_t ldiv( + double jn( int arg0, - int arg1, + double arg1, ) { - return _ldiv( + return _jn( arg0, arg1, ); } - late final _ldivPtr = - _lookup>('ldiv'); - late final _ldiv = _ldivPtr.asFunction(); + late final _jnPtr = + _lookup>( + 'jn'); + late final _jn = _jnPtr.asFunction(); - int llabs( - int arg0, + double y0( + double arg0, ) { - return _llabs( + return _y0( arg0, ); } - late final _llabsPtr = - _lookup>('llabs'); - late final _llabs = _llabsPtr.asFunction(); + late final _y0Ptr = + _lookup>('y0'); + late final _y0 = _y0Ptr.asFunction(); - lldiv_t lldiv( - int arg0, - int arg1, + double y1( + double arg0, ) { - return _lldiv( + return _y1( arg0, - arg1, ); } - late final _lldivPtr = - _lookup>( - 'lldiv'); - late final _lldiv = _lldivPtr.asFunction(); + late final _y1Ptr = + _lookup>('y1'); + late final _y1 = _y1Ptr.asFunction(); - int mblen( - ffi.Pointer __s, - int __n, + double yn( + int arg0, + double arg1, ) { - return _mblen( - __s, - __n, + return _yn( + arg0, + arg1, ); } - late final _mblenPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('mblen'); - late final _mblen = - _mblenPtr.asFunction, int)>(); + late final _ynPtr = + _lookup>( + 'yn'); + late final _yn = _ynPtr.asFunction(); - int mbstowcs( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + double scalb( + double arg0, + double arg1, ) { - return _mbstowcs( + return _scalb( arg0, arg1, - arg2, ); } - late final _mbstowcsPtr = _lookup< - ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('mbstowcs'); - late final _mbstowcs = _mbstowcsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _scalbPtr = + _lookup>( + 'scalb'); + late final _scalb = _scalbPtr.asFunction(); - int mbtowc( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + late final ffi.Pointer _signgam = _lookup('signgam'); + + int get signgam => _signgam.value; + + set signgam(int value) => _signgam.value = value; + + int setjmp( + ffi.Pointer arg0, ) { - return _mbtowc( + return _setjmp1( arg0, - arg1, - arg2, ); } - late final _mbtowcPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('mbtowc'); - late final _mbtowc = _mbtowcPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _setjmpPtr = + _lookup)>>( + 'setjmp'); + late final _setjmp1 = + _setjmpPtr.asFunction)>(); - void qsort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + void longjmp( + ffi.Pointer arg0, + int arg1, ) { - return _qsort( - __base, - __nel, - __width, - __compar, + return _longjmp1( + arg0, + arg1, ); } - late final _qsortPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('qsort'); - late final _qsort = _qsortPtr.asFunction< - void Function( - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + late final _longjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'longjmp'); + late final _longjmp1 = + _longjmpPtr.asFunction, int)>(); - int rand() { - return _rand(); + int _setjmp( + ffi.Pointer arg0, + ) { + return __setjmp( + arg0, + ); } - late final _randPtr = _lookup>('rand'); - late final _rand = _randPtr.asFunction(); + late final __setjmpPtr = + _lookup)>>( + '_setjmp'); + late final __setjmp = + __setjmpPtr.asFunction)>(); - void srand( - int arg0, + void _longjmp( + ffi.Pointer arg0, + int arg1, ) { - return _srand( + return __longjmp( arg0, + arg1, ); } - late final _srandPtr = - _lookup>('srand'); - late final _srand = _srandPtr.asFunction(); + late final __longjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + '_longjmp'); + late final __longjmp = + __longjmpPtr.asFunction, int)>(); - double strtod( - ffi.Pointer arg0, - ffi.Pointer> arg1, + int sigsetjmp( + ffi.Pointer arg0, + int arg1, ) { - return _strtod( + return _sigsetjmp( arg0, arg1, ); } - late final _strtodPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, - ffi.Pointer>)>>('strtod'); - late final _strtod = _strtodPtr.asFunction< - double Function( - ffi.Pointer, ffi.Pointer>)>(); + late final _sigsetjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigsetjmp'); + late final _sigsetjmp = + _sigsetjmpPtr.asFunction, int)>(); - double strtof( - ffi.Pointer arg0, - ffi.Pointer> arg1, + void siglongjmp( + ffi.Pointer arg0, + int arg1, ) { - return _strtof( + return _siglongjmp( arg0, arg1, ); } - late final _strtofPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer>)>>('strtof'); - late final _strtof = _strtofPtr.asFunction< - double Function( - ffi.Pointer, ffi.Pointer>)>(); + late final _siglongjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'siglongjmp'); + late final _siglongjmp = + _siglongjmpPtr.asFunction, int)>(); - int strtol( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, - ) { - return _strtol( - __str, - __endptr, - __base, - ); + void longjmperror() { + return _longjmperror(); } - late final _strtolPtr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtol'); - late final _strtol = _strtolPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + late final _longjmperrorPtr = + _lookup>('longjmperror'); + late final _longjmperror = _longjmperrorPtr.asFunction(); - int strtoll( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + late final ffi.Pointer>> _sys_signame = + _lookup>>('sys_signame'); + + ffi.Pointer> get sys_signame => _sys_signame.value; + + set sys_signame(ffi.Pointer> value) => + _sys_signame.value = value; + + late final ffi.Pointer>> _sys_siglist = + _lookup>>('sys_siglist'); + + ffi.Pointer> get sys_siglist => _sys_siglist.value; + + set sys_siglist(ffi.Pointer> value) => + _sys_siglist.value = value; + + int raise( + int arg0, ) { - return _strtoll( - __str, - __endptr, - __base, + return _raise( + arg0, ); } - late final _strtollPtr = _lookup< - ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoll'); - late final _strtoll = _strtollPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + late final _raisePtr = + _lookup>('raise'); + late final _raise = _raisePtr.asFunction(); - int strtoul( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + ffi.Pointer> bsd_signal( + int arg0, + ffi.Pointer> arg1, ) { - return _strtoul( - __str, - __endptr, - __base, + return _bsd_signal( + arg0, + arg1, ); } - late final _strtoulPtr = _lookup< + late final _bsd_signalPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoul'); - late final _strtoul = _strtoulPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int)>>)>>('bsd_signal'); + late final _bsd_signal = _bsd_signalPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); - int strtoull( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + int kill( + int arg0, + int arg1, ) { - return _strtoull( - __str, - __endptr, - __base, + return _kill( + arg0, + arg1, ); } - late final _strtoullPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLongLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoull'); - late final _strtoull = _strtoullPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + late final _killPtr = + _lookup>('kill'); + late final _kill = _killPtr.asFunction(); - int system( - ffi.Pointer arg0, + int killpg( + int arg0, + int arg1, ) { - return _system( + return _killpg( arg0, + arg1, ); } - late final _systemPtr = - _lookup)>>( - 'system'); - late final _system = - _systemPtr.asFunction)>(); + late final _killpgPtr = + _lookup>('killpg'); + late final _killpg = _killpgPtr.asFunction(); - int wcstombs( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int pthread_kill( + pthread_t arg0, + int arg1, ) { - return _wcstombs( + return _pthread_kill( arg0, arg1, - arg2, ); } - late final _wcstombsPtr = _lookup< - ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('wcstombs'); - late final _wcstombs = _wcstombsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _pthread_killPtr = + _lookup>( + 'pthread_kill'); + late final _pthread_kill = + _pthread_killPtr.asFunction(); - int wctomb( - ffi.Pointer arg0, - int arg1, + int pthread_sigmask( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _wctomb( + return _pthread_sigmask( arg0, arg1, + arg2, ); } - late final _wctombPtr = _lookup< + late final _pthread_sigmaskPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.WChar)>>('wctomb'); - late final _wctomb = - _wctombPtr.asFunction, int)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('pthread_sigmask'); + late final _pthread_sigmask = _pthread_sigmaskPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - void _Exit( + int sigaction1( int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return __Exit( + return _sigaction1( arg0, + arg1, + arg2, ); } - late final __ExitPtr = - _lookup>('_Exit'); - late final __Exit = __ExitPtr.asFunction(); + late final _sigaction1Ptr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('sigaction'); + late final _sigaction1 = _sigaction1Ptr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - int a64l( - ffi.Pointer arg0, + int sigaddset( + ffi.Pointer arg0, + int arg1, ) { - return _a64l( + return _sigaddset( arg0, + arg1, ); } - late final _a64lPtr = - _lookup)>>( - 'a64l'); - late final _a64l = _a64lPtr.asFunction)>(); - - double drand48() { - return _drand48(); - } - - late final _drand48Ptr = - _lookup>('drand48'); - late final _drand48 = _drand48Ptr.asFunction(); + late final _sigaddsetPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigaddset'); + late final _sigaddset = + _sigaddsetPtr.asFunction, int)>(); - ffi.Pointer ecvt( - double arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + int sigaltstack( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _ecvt( + return _sigaltstack( arg0, arg1, - arg2, - arg3, ); } - late final _ecvtPtr = _lookup< + late final _sigaltstackPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Double, ffi.Int, - ffi.Pointer, ffi.Pointer)>>('ecvt'); - late final _ecvt = _ecvtPtr.asFunction< - ffi.Pointer Function( - double, int, ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sigaltstack'); + late final _sigaltstack = _sigaltstackPtr + .asFunction, ffi.Pointer)>(); - double erand48( - ffi.Pointer arg0, + int sigdelset( + ffi.Pointer arg0, + int arg1, ) { - return _erand48( + return _sigdelset( arg0, + arg1, ); } - late final _erand48Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer)>>('erand48'); - late final _erand48 = - _erand48Ptr.asFunction)>(); + late final _sigdelsetPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigdelset'); + late final _sigdelset = + _sigdelsetPtr.asFunction, int)>(); - ffi.Pointer fcvt( - double arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + int sigemptyset( + ffi.Pointer arg0, ) { - return _fcvt( + return _sigemptyset( arg0, - arg1, - arg2, - arg3, ); } - late final _fcvtPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Double, ffi.Int, - ffi.Pointer, ffi.Pointer)>>('fcvt'); - late final _fcvt = _fcvtPtr.asFunction< - ffi.Pointer Function( - double, int, ffi.Pointer, ffi.Pointer)>(); + late final _sigemptysetPtr = + _lookup)>>( + 'sigemptyset'); + late final _sigemptyset = + _sigemptysetPtr.asFunction)>(); - ffi.Pointer gcvt( - double arg0, - int arg1, - ffi.Pointer arg2, + int sigfillset( + ffi.Pointer arg0, ) { - return _gcvt( + return _sigfillset( arg0, - arg1, - arg2, ); } - late final _gcvtPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Double, ffi.Int, ffi.Pointer)>>('gcvt'); - late final _gcvt = _gcvtPtr.asFunction< - ffi.Pointer Function(double, int, ffi.Pointer)>(); + late final _sigfillsetPtr = + _lookup)>>( + 'sigfillset'); + late final _sigfillset = + _sigfillsetPtr.asFunction)>(); - int getsubopt( - ffi.Pointer> arg0, - ffi.Pointer> arg1, - ffi.Pointer> arg2, + int sighold( + int arg0, ) { - return _getsubopt( + return _sighold( arg0, - arg1, - arg2, ); } - late final _getsuboptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>)>>('getsubopt'); - late final _getsubopt = _getsuboptPtr.asFunction< - int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>)>(); + late final _sigholdPtr = + _lookup>('sighold'); + late final _sighold = _sigholdPtr.asFunction(); - int grantpt( + int sigignore( int arg0, ) { - return _grantpt( + return _sigignore( arg0, ); } - late final _grantptPtr = - _lookup>('grantpt'); - late final _grantpt = _grantptPtr.asFunction(); + late final _sigignorePtr = + _lookup>('sigignore'); + late final _sigignore = _sigignorePtr.asFunction(); - ffi.Pointer initstate( + int siginterrupt( int arg0, - ffi.Pointer arg1, - int arg2, + int arg1, ) { - return _initstate( + return _siginterrupt( arg0, arg1, - arg2, ); } - late final _initstatePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.UnsignedInt, ffi.Pointer, ffi.Size)>>('initstate'); - late final _initstate = _initstatePtr.asFunction< - ffi.Pointer Function(int, ffi.Pointer, int)>(); + late final _siginterruptPtr = + _lookup>( + 'siginterrupt'); + late final _siginterrupt = + _siginterruptPtr.asFunction(); - int jrand48( - ffi.Pointer arg0, + int sigismember( + ffi.Pointer arg0, + int arg1, ) { - return _jrand48( + return _sigismember( arg0, + arg1, ); } - late final _jrand48Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer)>>('jrand48'); - late final _jrand48 = - _jrand48Ptr.asFunction)>(); + late final _sigismemberPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigismember'); + late final _sigismember = + _sigismemberPtr.asFunction, int)>(); - ffi.Pointer l64a( + int sigpause( int arg0, ) { - return _l64a( + return _sigpause( arg0, ); } - late final _l64aPtr = - _lookup Function(ffi.Long)>>( - 'l64a'); - late final _l64a = _l64aPtr.asFunction Function(int)>(); + late final _sigpausePtr = + _lookup>('sigpause'); + late final _sigpause = _sigpausePtr.asFunction(); - void lcong48( - ffi.Pointer arg0, + int sigpending( + ffi.Pointer arg0, ) { - return _lcong48( + return _sigpending( arg0, ); } - late final _lcong48Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>>('lcong48'); - late final _lcong48 = - _lcong48Ptr.asFunction)>(); - - int lrand48() { - return _lrand48(); - } - - late final _lrand48Ptr = - _lookup>('lrand48'); - late final _lrand48 = _lrand48Ptr.asFunction(); + late final _sigpendingPtr = + _lookup)>>( + 'sigpending'); + late final _sigpending = + _sigpendingPtr.asFunction)>(); - ffi.Pointer mktemp( - ffi.Pointer arg0, + int sigprocmask( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _mktemp( + return _sigprocmask( arg0, + arg1, + arg2, ); } - late final _mktempPtr = _lookup< + late final _sigprocmaskPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('mktemp'); - late final _mktemp = _mktempPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('sigprocmask'); + late final _sigprocmask = _sigprocmaskPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - int mkstemp( - ffi.Pointer arg0, + int sigrelse( + int arg0, ) { - return _mkstemp( + return _sigrelse( arg0, ); } - late final _mkstempPtr = - _lookup)>>( - 'mkstemp'); - late final _mkstemp = - _mkstempPtr.asFunction)>(); - - int mrand48() { - return _mrand48(); - } - - late final _mrand48Ptr = - _lookup>('mrand48'); - late final _mrand48 = _mrand48Ptr.asFunction(); + late final _sigrelsePtr = + _lookup>('sigrelse'); + late final _sigrelse = _sigrelsePtr.asFunction(); - int nrand48( - ffi.Pointer arg0, + ffi.Pointer> sigset( + int arg0, + ffi.Pointer> arg1, ) { - return _nrand48( + return _sigset( arg0, + arg1, ); } - late final _nrand48Ptr = _lookup< + late final _sigsetPtr = _lookup< ffi.NativeFunction< - ffi.Long Function(ffi.Pointer)>>('nrand48'); - late final _nrand48 = - _nrand48Ptr.asFunction)>(); + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction>)>>('sigset'); + late final _sigset = _sigsetPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); - int posix_openpt( - int arg0, + int sigsuspend( + ffi.Pointer arg0, ) { - return _posix_openpt( + return _sigsuspend( arg0, ); } - late final _posix_openptPtr = - _lookup>('posix_openpt'); - late final _posix_openpt = _posix_openptPtr.asFunction(); + late final _sigsuspendPtr = + _lookup)>>( + 'sigsuspend'); + late final _sigsuspend = + _sigsuspendPtr.asFunction)>(); - ffi.Pointer ptsname( - int arg0, + int sigwait( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _ptsname( + return _sigwait( arg0, + arg1, ); } - late final _ptsnamePtr = - _lookup Function(ffi.Int)>>( - 'ptsname'); - late final _ptsname = - _ptsnamePtr.asFunction Function(int)>(); + late final _sigwaitPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sigwait'); + late final _sigwait = _sigwaitPtr + .asFunction, ffi.Pointer)>(); - int ptsname_r( - int fildes, - ffi.Pointer buffer, - int buflen, + void psignal( + int arg0, + ffi.Pointer arg1, ) { - return _ptsname_r( - fildes, - buffer, - buflen, + return _psignal( + arg0, + arg1, ); } - late final _ptsname_rPtr = _lookup< + late final _psignalPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('ptsname_r'); - late final _ptsname_r = - _ptsname_rPtr.asFunction, int)>(); + ffi.Void Function( + ffi.UnsignedInt, ffi.Pointer)>>('psignal'); + late final _psignal = + _psignalPtr.asFunction)>(); - int putenv( - ffi.Pointer arg0, + int sigblock( + int arg0, ) { - return _putenv( + return _sigblock( arg0, ); } - late final _putenvPtr = - _lookup)>>( - 'putenv'); - late final _putenv = - _putenvPtr.asFunction)>(); - - int random() { - return _random(); - } - - late final _randomPtr = - _lookup>('random'); - late final _random = _randomPtr.asFunction(); + late final _sigblockPtr = + _lookup>('sigblock'); + late final _sigblock = _sigblockPtr.asFunction(); - int rand_r( - ffi.Pointer arg0, + int sigsetmask( + int arg0, ) { - return _rand_r( + return _sigsetmask( arg0, ); } - late final _rand_rPtr = _lookup< - ffi.NativeFunction)>>( - 'rand_r'); - late final _rand_r = - _rand_rPtr.asFunction)>(); + late final _sigsetmaskPtr = + _lookup>('sigsetmask'); + late final _sigsetmask = _sigsetmaskPtr.asFunction(); - ffi.Pointer realpath( - ffi.Pointer arg0, - ffi.Pointer arg1, + int sigvec1( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _realpath( + return _sigvec1( arg0, arg1, + arg2, ); } - late final _realpathPtr = _lookup< + late final _sigvec1Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('realpath'); - late final _realpath = _realpathPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Pointer)>>('sigvec'); + late final _sigvec1 = _sigvec1Ptr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer seed48( - ffi.Pointer arg0, + int renameat( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return _seed48( + return _renameat( arg0, + arg1, + arg2, + arg3, ); } - late final _seed48Ptr = _lookup< + late final _renameatPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('seed48'); - late final _seed48 = _seed48Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer)>>('renameat'); + late final _renameat = _renameatPtr.asFunction< + int Function(int, ffi.Pointer, int, ffi.Pointer)>(); - int setenv( - ffi.Pointer __name, - ffi.Pointer __value, - int __overwrite, + int renamex_np( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _setenv( - __name, - __value, - __overwrite, + return _renamex_np( + arg0, + arg1, + arg2, ); } - late final _setenvPtr = _lookup< + late final _renamex_npPtr = _lookup< ffi.NativeFunction< ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('setenv'); - late final _setenv = _setenvPtr.asFunction< + ffi.UnsignedInt)>>('renamex_np'); + late final _renamex_np = _renamex_npPtr.asFunction< int Function(ffi.Pointer, ffi.Pointer, int)>(); - void setkey( - ffi.Pointer arg0, + int renameatx_np( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + int arg4, ) { - return _setkey( - arg0, - ); - } - - late final _setkeyPtr = - _lookup)>>( - 'setkey'); - late final _setkey = - _setkeyPtr.asFunction)>(); - - ffi.Pointer setstate( - ffi.Pointer arg0, - ) { - return _setstate( + return _renameatx_np( arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _setstatePtr = _lookup< + late final _renameatx_npPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('setstate'); - late final _setstate = _setstatePtr - .asFunction Function(ffi.Pointer)>(); - - void srand48( - int arg0, - ) { - return _srand48( - arg0, - ); - } + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('renameatx_np'); + late final _renameatx_np = _renameatx_npPtr.asFunction< + int Function( + int, ffi.Pointer, int, ffi.Pointer, int)>(); - late final _srand48Ptr = - _lookup>('srand48'); - late final _srand48 = _srand48Ptr.asFunction(); + late final ffi.Pointer> ___stdinp = + _lookup>('__stdinp'); - void srandom( - int arg0, - ) { - return _srandom( - arg0, - ); - } + ffi.Pointer get __stdinp => ___stdinp.value; - late final _srandomPtr = - _lookup>( - 'srandom'); - late final _srandom = _srandomPtr.asFunction(); + set __stdinp(ffi.Pointer value) => ___stdinp.value = value; - int unlockpt( - int arg0, - ) { - return _unlockpt( - arg0, - ); - } + late final ffi.Pointer> ___stdoutp = + _lookup>('__stdoutp'); - late final _unlockptPtr = - _lookup>('unlockpt'); - late final _unlockpt = _unlockptPtr.asFunction(); + ffi.Pointer get __stdoutp => ___stdoutp.value; - int unsetenv( - ffi.Pointer arg0, - ) { - return _unsetenv( - arg0, - ); - } + set __stdoutp(ffi.Pointer value) => ___stdoutp.value = value; - late final _unsetenvPtr = - _lookup)>>( - 'unsetenv'); - late final _unsetenv = - _unsetenvPtr.asFunction)>(); + late final ffi.Pointer> ___stderrp = + _lookup>('__stderrp'); - int arc4random() { - return _arc4random(); - } + ffi.Pointer get __stderrp => ___stderrp.value; - late final _arc4randomPtr = - _lookup>('arc4random'); - late final _arc4random = _arc4randomPtr.asFunction(); + set __stderrp(ffi.Pointer value) => ___stderrp.value = value; - void arc4random_addrandom( - ffi.Pointer arg0, - int arg1, + void clearerr( + ffi.Pointer arg0, ) { - return _arc4random_addrandom( + return _clearerr( arg0, - arg1, ); } - late final _arc4random_addrandomPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Int)>>('arc4random_addrandom'); - late final _arc4random_addrandom = _arc4random_addrandomPtr - .asFunction, int)>(); + late final _clearerrPtr = + _lookup)>>( + 'clearerr'); + late final _clearerr = + _clearerrPtr.asFunction)>(); - void arc4random_buf( - ffi.Pointer __buf, - int __nbytes, + int fclose( + ffi.Pointer arg0, ) { - return _arc4random_buf( - __buf, - __nbytes, + return _fclose( + arg0, ); } - late final _arc4random_bufPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Size)>>('arc4random_buf'); - late final _arc4random_buf = _arc4random_bufPtr - .asFunction, int)>(); + late final _fclosePtr = + _lookup)>>( + 'fclose'); + late final _fclose = _fclosePtr.asFunction)>(); - void arc4random_stir() { - return _arc4random_stir(); + int feof( + ffi.Pointer arg0, + ) { + return _feof( + arg0, + ); } - late final _arc4random_stirPtr = - _lookup>('arc4random_stir'); - late final _arc4random_stir = - _arc4random_stirPtr.asFunction(); + late final _feofPtr = + _lookup)>>('feof'); + late final _feof = _feofPtr.asFunction)>(); - int arc4random_uniform( - int __upper_bound, + int ferror( + ffi.Pointer arg0, ) { - return _arc4random_uniform( - __upper_bound, + return _ferror( + arg0, ); } - late final _arc4random_uniformPtr = - _lookup>( - 'arc4random_uniform'); - late final _arc4random_uniform = - _arc4random_uniformPtr.asFunction(); + late final _ferrorPtr = + _lookup)>>( + 'ferror'); + late final _ferror = _ferrorPtr.asFunction)>(); - int atexit_b( - ffi.Pointer<_ObjCBlock> arg0, + int fflush( + ffi.Pointer arg0, ) { - return _atexit_b( + return _fflush( arg0, ); } - late final _atexit_bPtr = - _lookup)>>( - 'atexit_b'); - late final _atexit_b = - _atexit_bPtr.asFunction)>(); + late final _fflushPtr = + _lookup)>>( + 'fflush'); + late final _fflush = _fflushPtr.asFunction)>(); - ffi.Pointer bsearch_b( - ffi.Pointer __key, - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + int fgetc( + ffi.Pointer arg0, ) { - return _bsearch_b( - __key, - __base, - __nel, - __width, - __compar, + return _fgetc( + arg0, ); } - late final _bsearch_bPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('bsearch_b'); - late final _bsearch_b = _bsearch_bPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + late final _fgetcPtr = + _lookup)>>('fgetc'); + late final _fgetc = _fgetcPtr.asFunction)>(); - ffi.Pointer cgetcap( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int fgetpos( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _cgetcap( + return _fgetpos( arg0, arg1, - arg2, ); } - late final _cgetcapPtr = _lookup< + late final _fgetposPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>('cgetcap'); - late final _cgetcap = _cgetcapPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - int cgetclose() { - return _cgetclose(); - } - - late final _cgetclosePtr = - _lookup>('cgetclose'); - late final _cgetclose = _cgetclosePtr.asFunction(); + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fgetpos'); + late final _fgetpos = _fgetposPtr + .asFunction, ffi.Pointer)>(); - int cgetent( - ffi.Pointer> arg0, - ffi.Pointer> arg1, - ffi.Pointer arg2, + ffi.Pointer fgets( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, ) { - return _cgetent( + return _fgets( arg0, arg1, arg2, ); } - late final _cgetentPtr = _lookup< + late final _fgetsPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer)>>('cgetent'); - late final _cgetent = _cgetentPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer>, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Pointer)>>('fgets'); + late final _fgets = _fgetsPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - int cgetfirst( - ffi.Pointer> arg0, - ffi.Pointer> arg1, + ffi.Pointer fopen( + ffi.Pointer __filename, + ffi.Pointer __mode, ) { - return _cgetfirst( - arg0, - arg1, + return _fopen( + __filename, + __mode, ); } - late final _cgetfirstPtr = _lookup< + late final _fopenPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer>)>>('cgetfirst'); - late final _cgetfirst = _cgetfirstPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fopen'); + late final _fopen = _fopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int cgetmatch( - ffi.Pointer arg0, + int fprintf( + ffi.Pointer arg0, ffi.Pointer arg1, ) { - return _cgetmatch( + return _fprintf( arg0, arg1, ); } - late final _cgetmatchPtr = _lookup< + late final _fprintfPtr = _lookup< ffi.NativeFunction< ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('cgetmatch'); - late final _cgetmatch = _cgetmatchPtr - .asFunction, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>>('fprintf'); + late final _fprintf = _fprintfPtr + .asFunction, ffi.Pointer)>(); - int cgetnext( - ffi.Pointer> arg0, - ffi.Pointer> arg1, + int fputc( + int arg0, + ffi.Pointer arg1, ) { - return _cgetnext( + return _fputc( arg0, arg1, ); } - late final _cgetnextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer>)>>('cgetnext'); - late final _cgetnext = _cgetnextPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer>)>(); + late final _fputcPtr = + _lookup)>>( + 'fputc'); + late final _fputc = + _fputcPtr.asFunction)>(); - int cgetnum( + int fputs( ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg1, ) { - return _cgetnum( + return _fputs( arg0, arg1, - arg2, ); } - late final _cgetnumPtr = _lookup< + late final _fputsPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('cgetnum'); - late final _cgetnum = _cgetnumPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fputs'); + late final _fputs = _fputsPtr + .asFunction, ffi.Pointer)>(); - int cgetset( - ffi.Pointer arg0, + int fread( + ffi.Pointer __ptr, + int __size, + int __nitems, + ffi.Pointer __stream, ) { - return _cgetset( - arg0, + return _fread( + __ptr, + __size, + __nitems, + __stream, ); } - late final _cgetsetPtr = - _lookup)>>( - 'cgetset'); - late final _cgetset = - _cgetsetPtr.asFunction)>(); + late final _freadPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer)>>('fread'); + late final _fread = _freadPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); - int cgetstr( + ffi.Pointer freopen( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer> arg2, + ffi.Pointer arg2, ) { - return _cgetstr( + return _freopen( arg0, arg1, arg2, ); } - late final _cgetstrPtr = _lookup< + late final _freopenPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('cgetstr'); - late final _cgetstr = _cgetstrPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('freopen'); + late final _freopen = _freopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - int cgetustr( - ffi.Pointer arg0, + int fscanf( + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer> arg2, ) { - return _cgetustr( + return _fscanf( arg0, arg1, - arg2, ); } - late final _cgetustrPtr = _lookup< + late final _fscanfPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('cgetustr'); - late final _cgetustr = _cgetustrPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('fscanf'); + late final _fscanf = _fscanfPtr + .asFunction, ffi.Pointer)>(); - int daemon( - int arg0, + int fseek( + ffi.Pointer arg0, int arg1, + int arg2, ) { - return _daemon( + return _fseek( arg0, arg1, + arg2, ); } - late final _daemonPtr = - _lookup>('daemon'); - late final _daemon = _daemonPtr.asFunction(); + late final _fseekPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Long, ffi.Int)>>('fseek'); + late final _fseek = + _fseekPtr.asFunction, int, int)>(); - ffi.Pointer devname( - int arg0, - int arg1, + int fsetpos( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _devname( + return _fsetpos( arg0, arg1, ); } - late final _devnamePtr = _lookup< - ffi.NativeFunction Function(dev_t, mode_t)>>( - 'devname'); - late final _devname = - _devnamePtr.asFunction Function(int, int)>(); + late final _fsetposPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fsetpos'); + late final _fsetpos = _fsetposPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer devname_r( - int arg0, - int arg1, - ffi.Pointer buf, - int len, + int ftell( + ffi.Pointer arg0, ) { - return _devname_r( + return _ftell( arg0, - arg1, - buf, - len, ); } - late final _devname_rPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - dev_t, mode_t, ffi.Pointer, ffi.Int)>>('devname_r'); - late final _devname_r = _devname_rPtr.asFunction< - ffi.Pointer Function(int, int, ffi.Pointer, int)>(); + late final _ftellPtr = + _lookup)>>( + 'ftell'); + late final _ftell = _ftellPtr.asFunction)>(); - ffi.Pointer getbsize( - ffi.Pointer arg0, - ffi.Pointer arg1, + int fwrite( + ffi.Pointer __ptr, + int __size, + int __nitems, + ffi.Pointer __stream, ) { - return _getbsize( - arg0, - arg1, + return _fwrite( + __ptr, + __size, + __nitems, + __stream, ); } - late final _getbsizePtr = _lookup< + late final _fwritePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('getbsize'); - late final _getbsize = _getbsizePtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer)>>('fwrite'); + late final _fwrite = _fwritePtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); - int getloadavg( - ffi.Pointer arg0, - int arg1, + int getc( + ffi.Pointer arg0, ) { - return _getloadavg( + return _getc( arg0, - arg1, ); } - late final _getloadavgPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int)>>('getloadavg'); - late final _getloadavg = - _getloadavgPtr.asFunction, int)>(); + late final _getcPtr = + _lookup)>>('getc'); + late final _getc = _getcPtr.asFunction)>(); - ffi.Pointer getprogname() { - return _getprogname(); + int getchar() { + return _getchar(); } - late final _getprognamePtr = - _lookup Function()>>( - 'getprogname'); - late final _getprogname = - _getprognamePtr.asFunction Function()>(); + late final _getcharPtr = + _lookup>('getchar'); + late final _getchar = _getcharPtr.asFunction(); - void setprogname( + ffi.Pointer gets( ffi.Pointer arg0, ) { - return _setprogname( + return _gets( arg0, ); } - late final _setprognamePtr = - _lookup)>>( - 'setprogname'); - late final _setprogname = - _setprognamePtr.asFunction)>(); + late final _getsPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('gets'); + late final _gets = _getsPtr + .asFunction Function(ffi.Pointer)>(); - int heapsort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + void perror( + ffi.Pointer arg0, ) { - return _heapsort( - __base, - __nel, - __width, - __compar, + return _perror( + arg0, ); } - late final _heapsortPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('heapsort'); - late final _heapsort = _heapsortPtr.asFunction< - int Function( - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + late final _perrorPtr = + _lookup)>>( + 'perror'); + late final _perror = + _perrorPtr.asFunction)>(); - int heapsort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + int printf( + ffi.Pointer arg0, ) { - return _heapsort_b( - __base, - __nel, - __width, - __compar, + return _printf( + arg0, ); } - late final _heapsort_bPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('heapsort_b'); - late final _heapsort_b = _heapsort_bPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + late final _printfPtr = + _lookup)>>( + 'printf'); + late final _printf = + _printfPtr.asFunction)>(); - int mergesort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + int putc( + int arg0, + ffi.Pointer arg1, ) { - return _mergesort( - __base, - __nel, - __width, - __compar, + return _putc( + arg0, + arg1, ); } - late final _mergesortPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('mergesort'); - late final _mergesort = _mergesortPtr.asFunction< - int Function( - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + late final _putcPtr = + _lookup)>>( + 'putc'); + late final _putc = + _putcPtr.asFunction)>(); - int mergesort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + int putchar( + int arg0, ) { - return _mergesort_b( - __base, - __nel, - __width, - __compar, + return _putchar( + arg0, ); } - late final _mergesort_bPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('mergesort_b'); - late final _mergesort_b = _mergesort_bPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + late final _putcharPtr = + _lookup>('putchar'); + late final _putchar = _putcharPtr.asFunction(); - void psort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + int puts( + ffi.Pointer arg0, ) { - return _psort( - __base, - __nel, - __width, - __compar, + return _puts( + arg0, ); } - late final _psortPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('psort'); - late final _psort = _psortPtr.asFunction< - void Function( - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + late final _putsPtr = + _lookup)>>( + 'puts'); + late final _puts = _putsPtr.asFunction)>(); - void psort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + int remove( + ffi.Pointer arg0, ) { - return _psort_b( - __base, - __nel, - __width, - __compar, + return _remove( + arg0, ); } - late final _psort_bPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('psort_b'); - late final _psort_b = _psort_bPtr.asFunction< - void Function( - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + late final _removePtr = + _lookup)>>( + 'remove'); + late final _remove = + _removePtr.asFunction)>(); - void psort_r( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer arg3, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>> - __compar, + int rename( + ffi.Pointer __old, + ffi.Pointer __new, ) { - return _psort_r( - __base, - __nel, - __width, - arg3, - __compar, + return _rename( + __old, + __new, ); } - late final _psort_rPtr = _lookup< + late final _renamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>)>>('psort_r'); - late final _psort_r = _psort_rPtr.asFunction< - void Function( - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('rename'); + late final _rename = _renamePtr + .asFunction, ffi.Pointer)>(); - void qsort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + void rewind( + ffi.Pointer arg0, ) { - return _qsort_b( - __base, - __nel, - __width, - __compar, + return _rewind( + arg0, ); } - late final _qsort_bPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('qsort_b'); - late final _qsort_b = _qsort_bPtr.asFunction< - void Function( - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + late final _rewindPtr = + _lookup)>>( + 'rewind'); + late final _rewind = + _rewindPtr.asFunction)>(); - void qsort_r( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer arg3, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>> - __compar, + int scanf( + ffi.Pointer arg0, ) { - return _qsort_r( - __base, - __nel, - __width, - arg3, - __compar, + return _scanf( + arg0, ); } - late final _qsort_rPtr = _lookup< + late final _scanfPtr = + _lookup)>>( + 'scanf'); + late final _scanf = + _scanfPtr.asFunction)>(); + + void setbuf( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _setbuf( + arg0, + arg1, + ); + } + + late final _setbufPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>)>>('qsort_r'); - late final _qsort_r = _qsort_rPtr.asFunction< - void Function( - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>)>(); + ffi.Pointer, ffi.Pointer)>>('setbuf'); + late final _setbuf = _setbufPtr + .asFunction, ffi.Pointer)>(); - int radixsort( - ffi.Pointer> __base, - int __nel, - ffi.Pointer __table, - int __endbyte, + int setvbuf( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + int arg3, ) { - return _radixsort( - __base, - __nel, - __table, - __endbyte, + return _setvbuf( + arg0, + arg1, + arg2, + arg3, ); } - late final _radixsortPtr = _lookup< + late final _setvbufPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, ffi.Int, - ffi.Pointer, ffi.UnsignedInt)>>('radixsort'); - late final _radixsort = _radixsortPtr.asFunction< - int Function(ffi.Pointer>, int, - ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int, + ffi.Size)>>('setvbuf'); + late final _setvbuf = _setvbufPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, int)>(); - int rpmatch( + int sprintf( ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _rpmatch( + return _sprintf( arg0, + arg1, ); } - late final _rpmatchPtr = - _lookup)>>( - 'rpmatch'); - late final _rpmatch = - _rpmatchPtr.asFunction)>(); + late final _sprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sprintf'); + late final _sprintf = _sprintfPtr + .asFunction, ffi.Pointer)>(); - int sradixsort( - ffi.Pointer> __base, - int __nel, - ffi.Pointer __table, - int __endbyte, + int sscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _sradixsort( - __base, - __nel, - __table, - __endbyte, + return _sscanf( + arg0, + arg1, ); } - late final _sradixsortPtr = _lookup< + late final _sscanfPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, ffi.Int, - ffi.Pointer, ffi.UnsignedInt)>>('sradixsort'); - late final _sradixsort = _sradixsortPtr.asFunction< - int Function(ffi.Pointer>, int, - ffi.Pointer, int)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sscanf'); + late final _sscanf = _sscanfPtr + .asFunction, ffi.Pointer)>(); - void sranddev() { - return _sranddev(); + ffi.Pointer tmpfile() { + return _tmpfile(); } - late final _sranddevPtr = - _lookup>('sranddev'); - late final _sranddev = _sranddevPtr.asFunction(); + late final _tmpfilePtr = + _lookup Function()>>('tmpfile'); + late final _tmpfile = _tmpfilePtr.asFunction Function()>(); - void srandomdev() { - return _srandomdev(); + ffi.Pointer tmpnam( + ffi.Pointer arg0, + ) { + return _tmpnam( + arg0, + ); } - late final _srandomdevPtr = - _lookup>('srandomdev'); - late final _srandomdev = _srandomdevPtr.asFunction(); + late final _tmpnamPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('tmpnam'); + late final _tmpnam = _tmpnamPtr + .asFunction Function(ffi.Pointer)>(); - ffi.Pointer reallocf( - ffi.Pointer __ptr, - int __size, + int ungetc( + int arg0, + ffi.Pointer arg1, ) { - return _reallocf( - __ptr, - __size, + return _ungetc( + arg0, + arg1, ); } - late final _reallocfPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('reallocf'); - late final _reallocf = _reallocfPtr - .asFunction Function(ffi.Pointer, int)>(); + late final _ungetcPtr = + _lookup)>>( + 'ungetc'); + late final _ungetc = + _ungetcPtr.asFunction)>(); - int strtonum( - ffi.Pointer __numstr, - int __minval, - int __maxval, - ffi.Pointer> __errstrp, + int vfprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _strtonum( - __numstr, - __minval, - __maxval, - __errstrp, + return _vfprintf( + arg0, + arg1, + arg2, ); } - late final _strtonumPtr = _lookup< + late final _vfprintfPtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, ffi.LongLong, - ffi.LongLong, ffi.Pointer>)>>('strtonum'); - late final _strtonum = _strtonumPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer>)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer, va_list)>>('vfprintf'); + late final _vfprintf = _vfprintfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - int strtoq( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + int vprintf( + ffi.Pointer arg0, + va_list arg1, ) { - return _strtoq( - __str, - __endptr, - __base, + return _vprintf( + arg0, + arg1, ); } - late final _strtoqPtr = _lookup< - ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoq'); - late final _strtoq = _strtoqPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + late final _vprintfPtr = _lookup< + ffi.NativeFunction, va_list)>>( + 'vprintf'); + late final _vprintf = + _vprintfPtr.asFunction, va_list)>(); - int strtouq( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + int vsprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _strtouq( - __str, - __endptr, - __base, + return _vsprintf( + arg0, + arg1, + arg2, ); } - late final _strtouqPtr = _lookup< + late final _vsprintfPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtouq'); - late final _strtouq = _strtouqPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); - - late final ffi.Pointer> _suboptarg = - _lookup>('suboptarg'); - - ffi.Pointer get suboptarg => _suboptarg.value; - - set suboptarg(ffi.Pointer value) => _suboptarg.value = value; + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('vsprintf'); + late final _vsprintf = _vsprintfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - ffi.Pointer memchr( - ffi.Pointer __s, - int __c, - int __n, + ffi.Pointer ctermid( + ffi.Pointer arg0, ) { - return _memchr( - __s, - __c, - __n, + return _ctermid( + arg0, ); } - late final _memchrPtr = _lookup< + late final _ctermidPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int, ffi.Size)>>('memchr'); - late final _memchr = _memchrPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + ffi.Pointer Function(ffi.Pointer)>>('ctermid'); + late final _ctermid = _ctermidPtr + .asFunction Function(ffi.Pointer)>(); - int memcmp( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + ffi.Pointer fdopen( + int arg0, + ffi.Pointer arg1, ) { - return _memcmp( - __s1, - __s2, - __n, + return _fdopen( + arg0, + arg1, ); } - late final _memcmpPtr = _lookup< + late final _fdopenPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memcmp'); - late final _memcmp = _memcmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('fdopen'); + late final _fdopen = _fdopenPtr + .asFunction Function(int, ffi.Pointer)>(); - ffi.Pointer memcpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + int fileno( + ffi.Pointer arg0, ) { - return _memcpy( - __dst, - __src, - __n, + return _fileno( + arg0, ); } - late final _memcpyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('memcpy'); - late final _memcpy = _memcpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _filenoPtr = + _lookup)>>( + 'fileno'); + late final _fileno = _filenoPtr.asFunction)>(); - ffi.Pointer memmove( - ffi.Pointer __dst, - ffi.Pointer __src, - int __len, + int pclose( + ffi.Pointer arg0, ) { - return _memmove( - __dst, - __src, - __len, + return _pclose( + arg0, ); } - late final _memmovePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('memmove'); - late final _memmove = _memmovePtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _pclosePtr = + _lookup)>>( + 'pclose'); + late final _pclose = _pclosePtr.asFunction)>(); - ffi.Pointer memset( - ffi.Pointer __b, - int __c, - int __len, + ffi.Pointer popen( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _memset( - __b, - __c, - __len, + return _popen( + arg0, + arg1, ); } - late final _memsetPtr = _lookup< + late final _popenPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int, ffi.Size)>>('memset'); - late final _memset = _memsetPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('popen'); + late final _popen = _popenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer strcat( - ffi.Pointer __s1, - ffi.Pointer __s2, + int __srget( + ffi.Pointer arg0, ) { - return _strcat( - __s1, - __s2, + return ___srget( + arg0, ); } - late final _strcatPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strcat'); - late final _strcat = _strcatPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final ___srgetPtr = + _lookup)>>( + '__srget'); + late final ___srget = + ___srgetPtr.asFunction)>(); - ffi.Pointer strchr( - ffi.Pointer __s, - int __c, + int __svfscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _strchr( - __s, - __c, + return ___svfscanf( + arg0, + arg1, + arg2, ); } - late final _strchrPtr = _lookup< + late final ___svfscanfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('strchr'); - late final _strchr = _strchrPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('__svfscanf'); + late final ___svfscanf = ___svfscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - int strcmp( - ffi.Pointer __s1, - ffi.Pointer __s2, + int __swbuf( + int arg0, + ffi.Pointer arg1, ) { - return _strcmp( - __s1, - __s2, + return ___swbuf( + arg0, + arg1, ); } - late final _strcmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('strcmp'); - late final _strcmp = _strcmpPtr - .asFunction, ffi.Pointer)>(); + late final ___swbufPtr = + _lookup)>>( + '__swbuf'); + late final ___swbuf = + ___swbufPtr.asFunction)>(); - int strcoll( - ffi.Pointer __s1, - ffi.Pointer __s2, + void flockfile( + ffi.Pointer arg0, ) { - return _strcoll( - __s1, - __s2, + return _flockfile( + arg0, ); } - late final _strcollPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('strcoll'); - late final _strcoll = _strcollPtr - .asFunction, ffi.Pointer)>(); + late final _flockfilePtr = + _lookup)>>( + 'flockfile'); + late final _flockfile = + _flockfilePtr.asFunction)>(); - ffi.Pointer strcpy( - ffi.Pointer __dst, - ffi.Pointer __src, + int ftrylockfile( + ffi.Pointer arg0, ) { - return _strcpy( - __dst, - __src, + return _ftrylockfile( + arg0, ); } - late final _strcpyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strcpy'); - late final _strcpy = _strcpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _ftrylockfilePtr = + _lookup)>>( + 'ftrylockfile'); + late final _ftrylockfile = + _ftrylockfilePtr.asFunction)>(); - int strcspn( - ffi.Pointer __s, - ffi.Pointer __charset, + void funlockfile( + ffi.Pointer arg0, ) { - return _strcspn( - __s, - __charset, + return _funlockfile( + arg0, ); } - late final _strcspnPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>>('strcspn'); - late final _strcspn = _strcspnPtr - .asFunction, ffi.Pointer)>(); + late final _funlockfilePtr = + _lookup)>>( + 'funlockfile'); + late final _funlockfile = + _funlockfilePtr.asFunction)>(); - ffi.Pointer strerror( - int __errnum, + int getc_unlocked( + ffi.Pointer arg0, ) { - return _strerror( - __errnum, + return _getc_unlocked( + arg0, ); } - late final _strerrorPtr = - _lookup Function(ffi.Int)>>( - 'strerror'); - late final _strerror = - _strerrorPtr.asFunction Function(int)>(); + late final _getc_unlockedPtr = + _lookup)>>( + 'getc_unlocked'); + late final _getc_unlocked = + _getc_unlockedPtr.asFunction)>(); - int strlen( - ffi.Pointer __s, + int getchar_unlocked() { + return _getchar_unlocked(); + } + + late final _getchar_unlockedPtr = + _lookup>('getchar_unlocked'); + late final _getchar_unlocked = + _getchar_unlockedPtr.asFunction(); + + int putc_unlocked( + int arg0, + ffi.Pointer arg1, ) { - return _strlen( - __s, + return _putc_unlocked( + arg0, + arg1, ); } - late final _strlenPtr = _lookup< - ffi.NativeFunction)>>( - 'strlen'); - late final _strlen = - _strlenPtr.asFunction)>(); + late final _putc_unlockedPtr = + _lookup)>>( + 'putc_unlocked'); + late final _putc_unlocked = + _putc_unlockedPtr.asFunction)>(); - ffi.Pointer strncat( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + int putchar_unlocked( + int arg0, ) { - return _strncat( - __s1, - __s2, - __n, + return _putchar_unlocked( + arg0, ); } - late final _strncatPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strncat'); - late final _strncat = _strncatPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _putchar_unlockedPtr = + _lookup>( + 'putchar_unlocked'); + late final _putchar_unlocked = + _putchar_unlockedPtr.asFunction(); - int strncmp( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + int getw( + ffi.Pointer arg0, ) { - return _strncmp( - __s1, - __s2, - __n, + return _getw( + arg0, ); } - late final _strncmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('strncmp'); - late final _strncmp = _strncmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _getwPtr = + _lookup)>>('getw'); + late final _getw = _getwPtr.asFunction)>(); - ffi.Pointer strncpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + int putw( + int arg0, + ffi.Pointer arg1, ) { - return _strncpy( - __dst, - __src, - __n, + return _putw( + arg0, + arg1, ); } - late final _strncpyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strncpy'); - late final _strncpy = _strncpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _putwPtr = + _lookup)>>( + 'putw'); + late final _putw = + _putwPtr.asFunction)>(); - ffi.Pointer strpbrk( - ffi.Pointer __s, - ffi.Pointer __charset, + ffi.Pointer tempnam( + ffi.Pointer __dir, + ffi.Pointer __prefix, ) { - return _strpbrk( - __s, - __charset, + return _tempnam( + __dir, + __prefix, ); } - late final _strpbrkPtr = _lookup< + late final _tempnamPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strpbrk'); - late final _strpbrk = _strpbrkPtr.asFunction< + ffi.Pointer, ffi.Pointer)>>('tempnam'); + late final _tempnam = _tempnamPtr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer strrchr( - ffi.Pointer __s, - int __c, + int fseeko( + ffi.Pointer __stream, + int __offset, + int __whence, ) { - return _strrchr( - __s, - __c, + return _fseeko( + __stream, + __offset, + __whence, ); } - late final _strrchrPtr = _lookup< + late final _fseekoPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('strrchr'); - late final _strrchr = _strrchrPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, off_t, ffi.Int)>>('fseeko'); + late final _fseeko = + _fseekoPtr.asFunction, int, int)>(); - int strspn( - ffi.Pointer __s, - ffi.Pointer __charset, + int ftello( + ffi.Pointer __stream, ) { - return _strspn( - __s, - __charset, + return _ftello( + __stream, ); } - late final _strspnPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>>('strspn'); - late final _strspn = _strspnPtr - .asFunction, ffi.Pointer)>(); + late final _ftelloPtr = + _lookup)>>('ftello'); + late final _ftello = _ftelloPtr.asFunction)>(); - ffi.Pointer strstr( - ffi.Pointer __big, - ffi.Pointer __little, + int snprintf( + ffi.Pointer __str, + int __size, + ffi.Pointer __format, ) { - return _strstr( - __big, - __little, + return _snprintf( + __str, + __size, + __format, ); } - late final _strstrPtr = _lookup< + late final _snprintfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strstr'); - late final _strstr = _strstrPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer)>>('snprintf'); + late final _snprintf = _snprintfPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); - ffi.Pointer strtok( - ffi.Pointer __str, - ffi.Pointer __sep, + int vfscanf( + ffi.Pointer __stream, + ffi.Pointer __format, + va_list arg2, ) { - return _strtok( - __str, - __sep, + return _vfscanf( + __stream, + __format, + arg2, ); } - late final _strtokPtr = _lookup< + late final _vfscanfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strtok'); - late final _strtok = _strtokPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer, va_list)>>('vfscanf'); + late final _vfscanf = _vfscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - int strxfrm( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + int vscanf( + ffi.Pointer __format, + va_list arg1, ) { - return _strxfrm( - __s1, - __s2, - __n, + return _vscanf( + __format, + arg1, ); } - late final _strxfrmPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strxfrm'); - late final _strxfrm = _strxfrmPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _vscanfPtr = _lookup< + ffi.NativeFunction, va_list)>>( + 'vscanf'); + late final _vscanf = + _vscanfPtr.asFunction, va_list)>(); - ffi.Pointer strtok_r( + int vsnprintf( ffi.Pointer __str, - ffi.Pointer __sep, - ffi.Pointer> __lasts, + int __size, + ffi.Pointer __format, + va_list arg3, ) { - return _strtok_r( + return _vsnprintf( __str, - __sep, - __lasts, + __size, + __format, + arg3, ); } - late final _strtok_rPtr = _lookup< + late final _vsnprintfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('strtok_r'); - late final _strtok_r = _strtok_rPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer, va_list)>>('vsnprintf'); + late final _vsnprintf = _vsnprintfPtr.asFunction< + int Function( + ffi.Pointer, int, ffi.Pointer, va_list)>(); - int strerror_r( - int __errnum, - ffi.Pointer __strerrbuf, - int __buflen, + int vsscanf( + ffi.Pointer __str, + ffi.Pointer __format, + va_list arg2, ) { - return _strerror_r( - __errnum, - __strerrbuf, - __buflen, + return _vsscanf( + __str, + __format, + arg2, ); } - late final _strerror_rPtr = _lookup< + late final _vsscanfPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('strerror_r'); - late final _strerror_r = _strerror_rPtr - .asFunction, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('vsscanf'); + late final _vsscanf = _vsscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - ffi.Pointer strdup( - ffi.Pointer __s1, + int dprintf( + int arg0, + ffi.Pointer arg1, ) { - return _strdup( - __s1, + return _dprintf( + arg0, + arg1, ); } - late final _strdupPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('strdup'); - late final _strdup = _strdupPtr - .asFunction Function(ffi.Pointer)>(); + late final _dprintfPtr = _lookup< + ffi.NativeFunction)>>( + 'dprintf'); + late final _dprintf = + _dprintfPtr.asFunction)>(); - ffi.Pointer memccpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __c, - int __n, + int vdprintf( + int arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _memccpy( - __dst, - __src, - __c, - __n, + return _vdprintf( + arg0, + arg1, + arg2, ); } - late final _memccpyPtr = _lookup< + late final _vdprintfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int, ffi.Size)>>('memccpy'); - late final _memccpy = _memccpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, int)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, va_list)>>('vdprintf'); + late final _vdprintf = _vdprintfPtr + .asFunction, va_list)>(); - ffi.Pointer stpcpy( - ffi.Pointer __dst, - ffi.Pointer __src, + int getdelim( + ffi.Pointer> __linep, + ffi.Pointer __linecapp, + int __delimiter, + ffi.Pointer __stream, ) { - return _stpcpy( - __dst, - __src, + return _getdelim( + __linep, + __linecapp, + __delimiter, + __stream, ); } - late final _stpcpyPtr = _lookup< + late final _getdelimPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('stpcpy'); - late final _stpcpy = _stpcpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ssize_t Function(ffi.Pointer>, + ffi.Pointer, ffi.Int, ffi.Pointer)>>('getdelim'); + late final _getdelim = _getdelimPtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + int, ffi.Pointer)>(); - ffi.Pointer stpncpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + int getline( + ffi.Pointer> __linep, + ffi.Pointer __linecapp, + ffi.Pointer __stream, ) { - return _stpncpy( - __dst, - __src, - __n, + return _getline( + __linep, + __linecapp, + __stream, ); } - late final _stpncpyPtr = _lookup< + late final _getlinePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('stpncpy'); - late final _stpncpy = _stpncpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ssize_t Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>('getline'); + late final _getline = _getlinePtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer strndup( - ffi.Pointer __s1, - int __n, + ffi.Pointer fmemopen( + ffi.Pointer __buf, + int __size, + ffi.Pointer __mode, ) { - return _strndup( - __s1, - __n, + return _fmemopen( + __buf, + __size, + __mode, ); } - late final _strndupPtr = _lookup< + late final _fmemopenPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('strndup'); - late final _strndup = _strndupPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Pointer)>>('fmemopen'); + late final _fmemopen = _fmemopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - int strnlen( - ffi.Pointer __s1, - int __n, + ffi.Pointer open_memstream( + ffi.Pointer> __bufp, + ffi.Pointer __sizep, ) { - return _strnlen( - __s1, - __n, + return _open_memstream( + __bufp, + __sizep, ); } - late final _strnlenPtr = _lookup< + late final _open_memstreamPtr = _lookup< ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Size)>>('strnlen'); - late final _strnlen = - _strnlenPtr.asFunction, int)>(); + ffi.Pointer Function(ffi.Pointer>, + ffi.Pointer)>>('open_memstream'); + late final _open_memstream = _open_memstreamPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer>, ffi.Pointer)>(); - ffi.Pointer strsignal( - int __sig, - ) { - return _strsignal( - __sig, - ); - } + late final ffi.Pointer _sys_nerr = _lookup('sys_nerr'); - late final _strsignalPtr = - _lookup Function(ffi.Int)>>( - 'strsignal'); - late final _strsignal = - _strsignalPtr.asFunction Function(int)>(); + int get sys_nerr => _sys_nerr.value; - int memset_s( - ffi.Pointer __s, - int __smax, - int __c, - int __n, - ) { - return _memset_s( - __s, - __smax, - __c, - __n, - ); - } + set sys_nerr(int value) => _sys_nerr.value = value; - late final _memset_sPtr = _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.Pointer, rsize_t, ffi.Int, rsize_t)>>('memset_s'); - late final _memset_s = _memset_sPtr - .asFunction, int, int, int)>(); + late final ffi.Pointer>> _sys_errlist = + _lookup>>('sys_errlist'); - ffi.Pointer memmem( - ffi.Pointer __big, - int __big_len, - ffi.Pointer __little, - int __little_len, - ) { - return _memmem( - __big, - __big_len, - __little, - __little_len, - ); - } + ffi.Pointer> get sys_errlist => _sys_errlist.value; - late final _memmemPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Size, - ffi.Pointer, ffi.Size)>>('memmem'); - late final _memmem = _memmemPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer, int)>(); + set sys_errlist(ffi.Pointer> value) => + _sys_errlist.value = value; - void memset_pattern4( - ffi.Pointer __b, - ffi.Pointer __pattern4, - int __len, + int asprintf( + ffi.Pointer> arg0, + ffi.Pointer arg1, ) { - return _memset_pattern4( - __b, - __pattern4, - __len, + return _asprintf( + arg0, + arg1, ); } - late final _memset_pattern4Ptr = _lookup< + late final _asprintfPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memset_pattern4'); - late final _memset_pattern4 = _memset_pattern4Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer>, + ffi.Pointer)>>('asprintf'); + late final _asprintf = _asprintfPtr.asFunction< + int Function( + ffi.Pointer>, ffi.Pointer)>(); - void memset_pattern8( - ffi.Pointer __b, - ffi.Pointer __pattern8, - int __len, + ffi.Pointer ctermid_r( + ffi.Pointer arg0, ) { - return _memset_pattern8( - __b, - __pattern8, - __len, + return _ctermid_r( + arg0, ); } - late final _memset_pattern8Ptr = _lookup< + late final _ctermid_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memset_pattern8'); - late final _memset_pattern8 = _memset_pattern8Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer)>>('ctermid_r'); + late final _ctermid_r = _ctermid_rPtr + .asFunction Function(ffi.Pointer)>(); - void memset_pattern16( - ffi.Pointer __b, - ffi.Pointer __pattern16, - int __len, + ffi.Pointer fgetln( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _memset_pattern16( - __b, - __pattern16, - __len, + return _fgetln( + arg0, + arg1, ); } - late final _memset_pattern16Ptr = _lookup< + late final _fgetlnPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memset_pattern16'); - late final _memset_pattern16 = _memset_pattern16Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fgetln'); + late final _fgetln = _fgetlnPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer strcasestr( - ffi.Pointer __big, - ffi.Pointer __little, + ffi.Pointer fmtcheck( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _strcasestr( - __big, - __little, + return _fmtcheck( + arg0, + arg1, ); } - late final _strcasestrPtr = _lookup< + late final _fmtcheckPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strcasestr'); - late final _strcasestr = _strcasestrPtr.asFunction< + ffi.Pointer, ffi.Pointer)>>('fmtcheck'); + late final _fmtcheck = _fmtcheckPtr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer strnstr( - ffi.Pointer __big, - ffi.Pointer __little, - int __len, + int fpurge( + ffi.Pointer arg0, ) { - return _strnstr( - __big, - __little, - __len, + return _fpurge( + arg0, ); } - late final _strnstrPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strnstr'); - late final _strnstr = _strnstrPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _fpurgePtr = + _lookup)>>( + 'fpurge'); + late final _fpurge = _fpurgePtr.asFunction)>(); - int strlcat( - ffi.Pointer __dst, - ffi.Pointer __source, - int __size, + void setbuffer( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _strlcat( - __dst, - __source, - __size, + return _setbuffer( + arg0, + arg1, + arg2, ); } - late final _strlcatPtr = _lookup< + late final _setbufferPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strlcat'); - late final _strlcat = _strlcatPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>('setbuffer'); + late final _setbuffer = _setbufferPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int strlcpy( - ffi.Pointer __dst, - ffi.Pointer __source, - int __size, + int setlinebuf( + ffi.Pointer arg0, ) { - return _strlcpy( - __dst, - __source, - __size, + return _setlinebuf( + arg0, ); } - late final _strlcpyPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strlcpy'); - late final _strlcpy = _strlcpyPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _setlinebufPtr = + _lookup)>>( + 'setlinebuf'); + late final _setlinebuf = + _setlinebufPtr.asFunction)>(); - void strmode( - int __mode, - ffi.Pointer __bp, + int vasprintf( + ffi.Pointer> arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _strmode( - __mode, - __bp, + return _vasprintf( + arg0, + arg1, + arg2, ); } - late final _strmodePtr = _lookup< + late final _vasprintfPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int, ffi.Pointer)>>('strmode'); - late final _strmode = - _strmodePtr.asFunction)>(); + ffi.Int Function(ffi.Pointer>, + ffi.Pointer, va_list)>>('vasprintf'); + late final _vasprintf = _vasprintfPtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + va_list)>(); - ffi.Pointer strsep( - ffi.Pointer> __stringp, - ffi.Pointer __delim, + ffi.Pointer funopen( + ffi.Pointer arg0, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> + arg1, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> + arg2, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> + arg3, + ffi.Pointer)>> + arg4, ) { - return _strsep( - __stringp, - __delim, + return _funopen( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _strsepPtr = _lookup< + late final _funopenPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer>, - ffi.Pointer)>>('strsep'); - late final _strsep = _strsepPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer>, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer)>>)>>('funopen'); + late final _funopen = _funopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction)>>)>(); - void swab( - ffi.Pointer arg0, - ffi.Pointer arg1, + int __sprintf_chk( + ffi.Pointer arg0, + int arg1, int arg2, + ffi.Pointer arg3, ) { - return _swab( + return ___sprintf_chk( arg0, arg1, arg2, + arg3, ); } - late final _swabPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ssize_t)>>('swab'); - late final _swab = _swabPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - int timingsafe_bcmp( - ffi.Pointer __b1, - ffi.Pointer __b2, - int __len, - ) { - return _timingsafe_bcmp( - __b1, - __b2, - __len, - ); - } - - late final _timingsafe_bcmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('timingsafe_bcmp'); - late final _timingsafe_bcmp = _timingsafe_bcmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - int strsignal_r( - int __sig, - ffi.Pointer __strsignalbuf, - int __buflen, - ) { - return _strsignal_r( - __sig, - __strsignalbuf, - __buflen, - ); - } - - late final _strsignal_rPtr = _lookup< + late final ___sprintf_chkPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('strsignal_r'); - late final _strsignal_r = _strsignal_rPtr - .asFunction, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, + ffi.Pointer)>>('__sprintf_chk'); + late final ___sprintf_chk = ___sprintf_chkPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); - int bcmp( - ffi.Pointer arg0, - ffi.Pointer arg1, + int __snprintf_chk( + ffi.Pointer arg0, + int arg1, int arg2, + int arg3, + ffi.Pointer arg4, ) { - return _bcmp( + return ___snprintf_chk( arg0, arg1, arg2, + arg3, + arg4, ); } - late final _bcmpPtr = _lookup< + late final ___snprintf_chkPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Size)>>('bcmp'); - late final _bcmp = _bcmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, + ffi.Pointer)>>('__snprintf_chk'); + late final ___snprintf_chk = ___snprintf_chkPtr.asFunction< + int Function( + ffi.Pointer, int, int, int, ffi.Pointer)>(); - void bcopy( - ffi.Pointer arg0, - ffi.Pointer arg1, + int __vsprintf_chk( + ffi.Pointer arg0, + int arg1, int arg2, + ffi.Pointer arg3, + va_list arg4, ) { - return _bcopy( + return ___vsprintf_chk( arg0, arg1, arg2, + arg3, + arg4, ); } - late final _bcopyPtr = _lookup< + late final ___vsprintf_chkPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('bcopy'); - late final _bcopy = _bcopyPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, + ffi.Pointer, va_list)>>('__vsprintf_chk'); + late final ___vsprintf_chk = ___vsprintf_chkPtr.asFunction< + int Function( + ffi.Pointer, int, int, ffi.Pointer, va_list)>(); - void bzero( - ffi.Pointer arg0, + int __vsnprintf_chk( + ffi.Pointer arg0, int arg1, + int arg2, + int arg3, + ffi.Pointer arg4, + va_list arg5, ) { - return _bzero( + return ___vsnprintf_chk( arg0, arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _bzeroPtr = _lookup< + late final ___vsnprintf_chkPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size)>>('bzero'); - late final _bzero = - _bzeroPtr.asFunction, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, + ffi.Pointer, va_list)>>('__vsnprintf_chk'); + late final ___vsnprintf_chk = ___vsnprintf_chkPtr.asFunction< + int Function(ffi.Pointer, int, int, int, ffi.Pointer, + va_list)>(); - ffi.Pointer index( - ffi.Pointer arg0, - int arg1, + ffi.Pointer memchr( + ffi.Pointer __s, + int __c, + int __n, ) { - return _index( - arg0, - arg1, + return _memchr( + __s, + __c, + __n, ); } - late final _indexPtr = _lookup< + late final _memchrPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('index'); - late final _index = _indexPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Size)>>('memchr'); + late final _memchr = _memchrPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - ffi.Pointer rindex( - ffi.Pointer arg0, - int arg1, + int memcmp( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return _rindex( - arg0, - arg1, + return _memcmp( + __s1, + __s2, + __n, ); } - late final _rindexPtr = _lookup< + late final _memcmpPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('rindex'); - late final _rindex = _rindexPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memcmp'); + late final _memcmp = _memcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int ffs( - int arg0, + ffi.Pointer memcpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, ) { - return _ffs( - arg0, + return _memcpy( + __dst, + __src, + __n, ); } - late final _ffsPtr = - _lookup>('ffs'); - late final _ffs = _ffsPtr.asFunction(); + late final _memcpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('memcpy'); + late final _memcpy = _memcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int strcasecmp( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer memmove( + ffi.Pointer __dst, + ffi.Pointer __src, + int __len, ) { - return _strcasecmp( - arg0, - arg1, + return _memmove( + __dst, + __src, + __len, ); } - late final _strcasecmpPtr = _lookup< + late final _memmovePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('strcasecmp'); - late final _strcasecmp = _strcasecmpPtr - .asFunction, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('memmove'); + late final _memmove = _memmovePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int strncasecmp( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + ffi.Pointer memset( + ffi.Pointer __b, + int __c, + int __len, ) { - return _strncasecmp( - arg0, - arg1, - arg2, + return _memset( + __b, + __c, + __len, ); } - late final _strncasecmpPtr = _lookup< + late final _memsetPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('strncasecmp'); - late final _strncasecmp = _strncasecmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Size)>>('memset'); + late final _memset = _memsetPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - int ffsl( - int arg0, + ffi.Pointer strcat( + ffi.Pointer __s1, + ffi.Pointer __s2, ) { - return _ffsl( - arg0, + return _strcat( + __s1, + __s2, ); } - late final _ffslPtr = - _lookup>('ffsl'); - late final _ffsl = _ffslPtr.asFunction(); + late final _strcatPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strcat'); + late final _strcat = _strcatPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int ffsll( - int arg0, + ffi.Pointer strchr( + ffi.Pointer __s, + int __c, ) { - return _ffsll( - arg0, + return _strchr( + __s, + __c, ); } - late final _ffsllPtr = - _lookup>('ffsll'); - late final _ffsll = _ffsllPtr.asFunction(); + late final _strchrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('strchr'); + late final _strchr = _strchrPtr + .asFunction Function(ffi.Pointer, int)>(); - int fls( - int arg0, + int strcmp( + ffi.Pointer __s1, + ffi.Pointer __s2, ) { - return _fls( - arg0, + return _strcmp( + __s1, + __s2, ); } - late final _flsPtr = - _lookup>('fls'); - late final _fls = _flsPtr.asFunction(); + late final _strcmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcmp'); + late final _strcmp = _strcmpPtr + .asFunction, ffi.Pointer)>(); - int flsl( - int arg0, + int strcoll( + ffi.Pointer __s1, + ffi.Pointer __s2, ) { - return _flsl( - arg0, + return _strcoll( + __s1, + __s2, ); } - late final _flslPtr = - _lookup>('flsl'); - late final _flsl = _flslPtr.asFunction(); + late final _strcollPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcoll'); + late final _strcoll = _strcollPtr + .asFunction, ffi.Pointer)>(); - int flsll( - int arg0, + ffi.Pointer strcpy( + ffi.Pointer __dst, + ffi.Pointer __src, ) { - return _flsll( - arg0, + return _strcpy( + __dst, + __src, ); } - late final _flsllPtr = - _lookup>('flsll'); - late final _flsll = _flsllPtr.asFunction(); - - late final ffi.Pointer>> _tzname = - _lookup>>('tzname'); - - ffi.Pointer> get tzname => _tzname.value; - - set tzname(ffi.Pointer> value) => _tzname.value = value; - - late final ffi.Pointer _getdate_err = - _lookup('getdate_err'); - - int get getdate_err => _getdate_err.value; - - set getdate_err(int value) => _getdate_err.value = value; - - late final ffi.Pointer _timezone = _lookup('timezone'); - - int get timezone => _timezone.value; - - set timezone(int value) => _timezone.value = value; - - late final ffi.Pointer _daylight = _lookup('daylight'); - - int get daylight => _daylight.value; - - set daylight(int value) => _daylight.value = value; + late final _strcpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strcpy'); + late final _strcpy = _strcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer asctime( - ffi.Pointer arg0, + int strcspn( + ffi.Pointer __s, + ffi.Pointer __charset, ) { - return _asctime( - arg0, + return _strcspn( + __s, + __charset, ); } - late final _asctimePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'asctime'); - late final _asctime = - _asctimePtr.asFunction Function(ffi.Pointer)>(); - - int clock() { - return _clock(); - } - - late final _clockPtr = - _lookup>('clock'); - late final _clock = _clockPtr.asFunction(); + late final _strcspnPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>>('strcspn'); + late final _strcspn = _strcspnPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer ctime( - ffi.Pointer arg0, + ffi.Pointer strerror( + int __errnum, ) { - return _ctime( - arg0, + return _strerror( + __errnum, ); } - late final _ctimePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctime'); - late final _ctime = _ctimePtr - .asFunction Function(ffi.Pointer)>(); + late final _strerrorPtr = + _lookup Function(ffi.Int)>>( + 'strerror'); + late final _strerror = + _strerrorPtr.asFunction Function(int)>(); - double difftime( - int arg0, - int arg1, + int strlen( + ffi.Pointer __s, ) { - return _difftime( - arg0, - arg1, + return _strlen( + __s, ); } - late final _difftimePtr = - _lookup>( - 'difftime'); - late final _difftime = _difftimePtr.asFunction(); + late final _strlenPtr = _lookup< + ffi.NativeFunction)>>( + 'strlen'); + late final _strlen = + _strlenPtr.asFunction)>(); - ffi.Pointer getdate( - ffi.Pointer arg0, + ffi.Pointer strncat( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return _getdate( - arg0, + return _strncat( + __s1, + __s2, + __n, ); } - late final _getdatePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'getdate'); - late final _getdate = - _getdatePtr.asFunction Function(ffi.Pointer)>(); + late final _strncatPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strncat'); + late final _strncat = _strncatPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer gmtime( - ffi.Pointer arg0, + int strncmp( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return _gmtime( - arg0, + return _strncmp( + __s1, + __s2, + __n, ); } - late final _gmtimePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'gmtime'); - late final _gmtime = - _gmtimePtr.asFunction Function(ffi.Pointer)>(); - - ffi.Pointer localtime( - ffi.Pointer arg0, - ) { - return _localtime( - arg0, - ); - } - - late final _localtimePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'localtime'); - late final _localtime = - _localtimePtr.asFunction Function(ffi.Pointer)>(); + late final _strncmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('strncmp'); + late final _strncmp = _strncmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int mktime( - ffi.Pointer arg0, + ffi.Pointer strncpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, ) { - return _mktime( - arg0, + return _strncpy( + __dst, + __src, + __n, ); } - late final _mktimePtr = - _lookup)>>('mktime'); - late final _mktime = _mktimePtr.asFunction)>(); + late final _strncpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strncpy'); + late final _strncpy = _strncpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int strftime( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + ffi.Pointer strpbrk( + ffi.Pointer __s, + ffi.Pointer __charset, ) { - return _strftime( - arg0, - arg1, - arg2, - arg3, + return _strpbrk( + __s, + __charset, ); } - late final _strftimePtr = _lookup< + late final _strpbrkPtr = _lookup< ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Size, - ffi.Pointer, ffi.Pointer)>>('strftime'); - late final _strftime = _strftimePtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strpbrk'); + late final _strpbrk = _strpbrkPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer strptime( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer strrchr( + ffi.Pointer __s, + int __c, ) { - return _strptime( - arg0, - arg1, - arg2, + return _strrchr( + __s, + __c, ); } - late final _strptimePtr = _lookup< + late final _strrchrPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('strptime'); - late final _strptime = _strptimePtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('strrchr'); + late final _strrchr = _strrchrPtr + .asFunction Function(ffi.Pointer, int)>(); - int time( - ffi.Pointer arg0, + int strspn( + ffi.Pointer __s, + ffi.Pointer __charset, ) { - return _time( - arg0, + return _strspn( + __s, + __charset, ); } - late final _timePtr = - _lookup)>>('time'); - late final _time = _timePtr.asFunction)>(); - - void tzset() { - return _tzset(); - } - - late final _tzsetPtr = - _lookup>('tzset'); - late final _tzset = _tzsetPtr.asFunction(); + late final _strspnPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>>('strspn'); + late final _strspn = _strspnPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer asctime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer strstr( + ffi.Pointer __big, + ffi.Pointer __little, ) { - return _asctime_r( - arg0, - arg1, + return _strstr( + __big, + __little, ); } - late final _asctime_rPtr = _lookup< + late final _strstrPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('asctime_r'); - late final _asctime_r = _asctime_rPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>>('strstr'); + late final _strstr = _strstrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer ctime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer strtok( + ffi.Pointer __str, + ffi.Pointer __sep, ) { - return _ctime_r( - arg0, - arg1, + return _strtok( + __str, + __sep, ); } - late final _ctime_rPtr = _lookup< + late final _strtokPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('ctime_r'); - late final _ctime_r = _ctime_rPtr.asFunction< + ffi.Pointer, ffi.Pointer)>>('strtok'); + late final _strtok = _strtokPtr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer gmtime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, + int strxfrm( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return _gmtime_r( - arg0, - arg1, + return _strxfrm( + __s1, + __s2, + __n, ); } - late final _gmtime_rPtr = _lookup< + late final _strxfrmPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('gmtime_r'); - late final _gmtime_r = _gmtime_rPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strxfrm'); + late final _strxfrm = _strxfrmPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer localtime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer strtok_r( + ffi.Pointer __str, + ffi.Pointer __sep, + ffi.Pointer> __lasts, ) { - return _localtime_r( - arg0, - arg1, + return _strtok_r( + __str, + __sep, + __lasts, ); } - late final _localtime_rPtr = _lookup< + late final _strtok_rPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('localtime_r'); - late final _localtime_r = _localtime_rPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('strtok_r'); + late final _strtok_r = _strtok_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - int posix2time( - int arg0, + int strerror_r( + int __errnum, + ffi.Pointer __strerrbuf, + int __buflen, ) { - return _posix2time( - arg0, + return _strerror_r( + __errnum, + __strerrbuf, + __buflen, ); } - late final _posix2timePtr = - _lookup>('posix2time'); - late final _posix2time = _posix2timePtr.asFunction(); - - void tzsetwall() { - return _tzsetwall(); - } - - late final _tzsetwallPtr = - _lookup>('tzsetwall'); - late final _tzsetwall = _tzsetwallPtr.asFunction(); + late final _strerror_rPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('strerror_r'); + late final _strerror_r = _strerror_rPtr + .asFunction, int)>(); - int time2posix( - int arg0, + ffi.Pointer strdup( + ffi.Pointer __s1, ) { - return _time2posix( - arg0, + return _strdup( + __s1, ); } - late final _time2posixPtr = - _lookup>('time2posix'); - late final _time2posix = _time2posixPtr.asFunction(); + late final _strdupPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('strdup'); + late final _strdup = _strdupPtr + .asFunction Function(ffi.Pointer)>(); - int timelocal( - ffi.Pointer arg0, + ffi.Pointer memccpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __c, + int __n, ) { - return _timelocal( - arg0, + return _memccpy( + __dst, + __src, + __c, + __n, ); } - late final _timelocalPtr = - _lookup)>>( - 'timelocal'); - late final _timelocal = - _timelocalPtr.asFunction)>(); + late final _memccpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int, ffi.Size)>>('memccpy'); + late final _memccpy = _memccpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, int)>(); - int timegm( - ffi.Pointer arg0, + ffi.Pointer stpcpy( + ffi.Pointer __dst, + ffi.Pointer __src, ) { - return _timegm( - arg0, + return _stpcpy( + __dst, + __src, ); } - late final _timegmPtr = - _lookup)>>('timegm'); - late final _timegm = _timegmPtr.asFunction)>(); + late final _stpcpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('stpcpy'); + late final _stpcpy = _stpcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int nanosleep( - ffi.Pointer __rqtp, - ffi.Pointer __rmtp, + ffi.Pointer stpncpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, ) { - return _nanosleep( - __rqtp, - __rmtp, + return _stpncpy( + __dst, + __src, + __n, ); } - late final _nanosleepPtr = _lookup< + late final _stpncpyPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('nanosleep'); - late final _nanosleep = _nanosleepPtr - .asFunction, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('stpncpy'); + late final _stpncpy = _stpncpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int clock_getres( - int __clock_id, - ffi.Pointer __res, + ffi.Pointer strndup( + ffi.Pointer __s1, + int __n, ) { - return _clock_getres( - __clock_id, - __res, + return _strndup( + __s1, + __n, ); } - late final _clock_getresPtr = _lookup< + late final _strndupPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_getres'); - late final _clock_getres = - _clock_getresPtr.asFunction)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('strndup'); + late final _strndup = _strndupPtr + .asFunction Function(ffi.Pointer, int)>(); - int clock_gettime( - int __clock_id, - ffi.Pointer __tp, + int strnlen( + ffi.Pointer __s1, + int __n, ) { - return _clock_gettime( - __clock_id, - __tp, + return _strnlen( + __s1, + __n, ); } - late final _clock_gettimePtr = _lookup< + late final _strnlenPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_gettime'); - late final _clock_gettime = - _clock_gettimePtr.asFunction)>(); + ffi.Size Function(ffi.Pointer, ffi.Size)>>('strnlen'); + late final _strnlen = + _strnlenPtr.asFunction, int)>(); - int clock_gettime_nsec_np( - int __clock_id, + ffi.Pointer strsignal( + int __sig, ) { - return _clock_gettime_nsec_np( - __clock_id, + return _strsignal( + __sig, ); } - late final _clock_gettime_nsec_npPtr = - _lookup>( - 'clock_gettime_nsec_np'); - late final _clock_gettime_nsec_np = - _clock_gettime_nsec_npPtr.asFunction(); + late final _strsignalPtr = + _lookup Function(ffi.Int)>>( + 'strsignal'); + late final _strsignal = + _strsignalPtr.asFunction Function(int)>(); - int clock_settime( - int __clock_id, - ffi.Pointer __tp, + int memset_s( + ffi.Pointer __s, + int __smax, + int __c, + int __n, ) { - return _clock_settime( - __clock_id, - __tp, + return _memset_s( + __s, + __smax, + __c, + __n, ); } - late final _clock_settimePtr = _lookup< + late final _memset_sPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_settime'); - late final _clock_settime = - _clock_settimePtr.asFunction)>(); + errno_t Function( + ffi.Pointer, rsize_t, ffi.Int, rsize_t)>>('memset_s'); + late final _memset_s = _memset_sPtr + .asFunction, int, int, int)>(); - int timespec_get( - ffi.Pointer ts, - int base, + ffi.Pointer memmem( + ffi.Pointer __big, + int __big_len, + ffi.Pointer __little, + int __little_len, ) { - return _timespec_get( - ts, - base, + return _memmem( + __big, + __big_len, + __little, + __little_len, ); } - late final _timespec_getPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'timespec_get'); - late final _timespec_get = - _timespec_getPtr.asFunction, int)>(); + late final _memmemPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Pointer, ffi.Size)>>('memmem'); + late final _memmem = _memmemPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer, int)>(); - int imaxabs( - int j, + void memset_pattern4( + ffi.Pointer __b, + ffi.Pointer __pattern4, + int __len, ) { - return _imaxabs( - j, + return _memset_pattern4( + __b, + __pattern4, + __len, ); } - late final _imaxabsPtr = - _lookup>('imaxabs'); - late final _imaxabs = _imaxabsPtr.asFunction(); + late final _memset_pattern4Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memset_pattern4'); + late final _memset_pattern4 = _memset_pattern4Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - imaxdiv_t imaxdiv( - int __numer, - int __denom, + void memset_pattern8( + ffi.Pointer __b, + ffi.Pointer __pattern8, + int __len, ) { - return _imaxdiv( - __numer, - __denom, + return _memset_pattern8( + __b, + __pattern8, + __len, ); } - late final _imaxdivPtr = - _lookup>( - 'imaxdiv'); - late final _imaxdiv = _imaxdivPtr.asFunction(); + late final _memset_pattern8Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memset_pattern8'); + late final _memset_pattern8 = _memset_pattern8Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int strtoimax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + void memset_pattern16( + ffi.Pointer __b, + ffi.Pointer __pattern16, + int __len, ) { - return _strtoimax( - __nptr, - __endptr, - __base, + return _memset_pattern16( + __b, + __pattern16, + __len, ); } - late final _strtoimaxPtr = _lookup< + late final _memset_pattern16Ptr = _lookup< ffi.NativeFunction< - intmax_t Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoimax'); - late final _strtoimax = _strtoimaxPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memset_pattern16'); + late final _memset_pattern16 = _memset_pattern16Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int strtoumax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + ffi.Pointer strcasestr( + ffi.Pointer __big, + ffi.Pointer __little, ) { - return _strtoumax( - __nptr, - __endptr, - __base, + return _strcasestr( + __big, + __little, ); } - late final _strtoumaxPtr = _lookup< + late final _strcasestrPtr = _lookup< ffi.NativeFunction< - uintmax_t Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoumax'); - late final _strtoumax = _strtoumaxPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strcasestr'); + late final _strcasestr = _strcasestrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int wcstoimax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + ffi.Pointer strnstr( + ffi.Pointer __big, + ffi.Pointer __little, + int __len, ) { - return _wcstoimax( - __nptr, - __endptr, - __base, + return _strnstr( + __big, + __little, + __len, ); } - late final _wcstoimaxPtr = _lookup< + late final _strnstrPtr = _lookup< ffi.NativeFunction< - intmax_t Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('wcstoimax'); - late final _wcstoimax = _wcstoimaxPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strnstr'); + late final _strnstr = _strnstrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int wcstoumax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + int strlcat( + ffi.Pointer __dst, + ffi.Pointer __source, + int __size, ) { - return _wcstoumax( - __nptr, - __endptr, - __base, + return _strlcat( + __dst, + __source, + __size, ); } - late final _wcstoumaxPtr = _lookup< + late final _strlcatPtr = _lookup< ffi.NativeFunction< - uintmax_t Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('wcstoumax'); - late final _wcstoumax = _wcstoumaxPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); - - late final ffi.Pointer _kCFTypeBagCallBacks = - _lookup('kCFTypeBagCallBacks'); - - CFBagCallBacks get kCFTypeBagCallBacks => _kCFTypeBagCallBacks.ref; - - late final ffi.Pointer _kCFCopyStringBagCallBacks = - _lookup('kCFCopyStringBagCallBacks'); - - CFBagCallBacks get kCFCopyStringBagCallBacks => - _kCFCopyStringBagCallBacks.ref; - - int CFBagGetTypeID() { - return _CFBagGetTypeID(); - } - - late final _CFBagGetTypeIDPtr = - _lookup>('CFBagGetTypeID'); - late final _CFBagGetTypeID = _CFBagGetTypeIDPtr.asFunction(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strlcat'); + late final _strlcat = _strlcatPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - CFBagRef CFBagCreate( - CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + int strlcpy( + ffi.Pointer __dst, + ffi.Pointer __source, + int __size, ) { - return _CFBagCreate( - allocator, - values, - numValues, - callBacks, + return _strlcpy( + __dst, + __source, + __size, ); } - late final _CFBagCreatePtr = _lookup< + late final _strlcpyPtr = _lookup< ffi.NativeFunction< - CFBagRef Function(CFAllocatorRef, ffi.Pointer>, - CFIndex, ffi.Pointer)>>('CFBagCreate'); - late final _CFBagCreate = _CFBagCreatePtr.asFunction< - CFBagRef Function(CFAllocatorRef, ffi.Pointer>, int, - ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strlcpy'); + late final _strlcpy = _strlcpyPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - CFBagRef CFBagCreateCopy( - CFAllocatorRef allocator, - CFBagRef theBag, + void strmode( + int __mode, + ffi.Pointer __bp, ) { - return _CFBagCreateCopy( - allocator, - theBag, + return _strmode( + __mode, + __bp, ); } - late final _CFBagCreateCopyPtr = - _lookup>( - 'CFBagCreateCopy'); - late final _CFBagCreateCopy = _CFBagCreateCopyPtr.asFunction< - CFBagRef Function(CFAllocatorRef, CFBagRef)>(); + late final _strmodePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int, ffi.Pointer)>>('strmode'); + late final _strmode = + _strmodePtr.asFunction)>(); - CFMutableBagRef CFBagCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + ffi.Pointer strsep( + ffi.Pointer> __stringp, + ffi.Pointer __delim, ) { - return _CFBagCreateMutable( - allocator, - capacity, - callBacks, + return _strsep( + __stringp, + __delim, ); } - late final _CFBagCreateMutablePtr = _lookup< + late final _strsepPtr = _lookup< ffi.NativeFunction< - CFMutableBagRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFBagCreateMutable'); - late final _CFBagCreateMutable = _CFBagCreateMutablePtr.asFunction< - CFMutableBagRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer>, + ffi.Pointer)>>('strsep'); + late final _strsep = _strsepPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer>, ffi.Pointer)>(); - CFMutableBagRef CFBagCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFBagRef theBag, + void swab( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFBagCreateMutableCopy( - allocator, - capacity, - theBag, + return _swab( + arg0, + arg1, + arg2, ); } - late final _CFBagCreateMutableCopyPtr = _lookup< + late final _swabPtr = _lookup< ffi.NativeFunction< - CFMutableBagRef Function( - CFAllocatorRef, CFIndex, CFBagRef)>>('CFBagCreateMutableCopy'); - late final _CFBagCreateMutableCopy = _CFBagCreateMutableCopyPtr.asFunction< - CFMutableBagRef Function(CFAllocatorRef, int, CFBagRef)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ssize_t)>>('swab'); + late final _swab = _swabPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int CFBagGetCount( - CFBagRef theBag, + int timingsafe_bcmp( + ffi.Pointer __b1, + ffi.Pointer __b2, + int __len, ) { - return _CFBagGetCount( - theBag, + return _timingsafe_bcmp( + __b1, + __b2, + __len, ); } - late final _CFBagGetCountPtr = - _lookup>('CFBagGetCount'); - late final _CFBagGetCount = - _CFBagGetCountPtr.asFunction(); + late final _timingsafe_bcmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('timingsafe_bcmp'); + late final _timingsafe_bcmp = _timingsafe_bcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int CFBagGetCountOfValue( - CFBagRef theBag, - ffi.Pointer value, + int strsignal_r( + int __sig, + ffi.Pointer __strsignalbuf, + int __buflen, ) { - return _CFBagGetCountOfValue( - theBag, - value, + return _strsignal_r( + __sig, + __strsignalbuf, + __buflen, ); } - late final _CFBagGetCountOfValuePtr = _lookup< + late final _strsignal_rPtr = _lookup< ffi.NativeFunction< - CFIndex Function( - CFBagRef, ffi.Pointer)>>('CFBagGetCountOfValue'); - late final _CFBagGetCountOfValue = _CFBagGetCountOfValuePtr.asFunction< - int Function(CFBagRef, ffi.Pointer)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('strsignal_r'); + late final _strsignal_r = _strsignal_rPtr + .asFunction, int)>(); - int CFBagContainsValue( - CFBagRef theBag, - ffi.Pointer value, + int bcmp( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFBagContainsValue( - theBag, - value, + return _bcmp( + arg0, + arg1, + arg2, ); } - late final _CFBagContainsValuePtr = _lookup< + late final _bcmpPtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFBagRef, ffi.Pointer)>>('CFBagContainsValue'); - late final _CFBagContainsValue = _CFBagContainsValuePtr.asFunction< - int Function(CFBagRef, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Size)>>('bcmp'); + late final _bcmp = _bcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer CFBagGetValue( - CFBagRef theBag, - ffi.Pointer value, + void bcopy( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFBagGetValue( - theBag, - value, + return _bcopy( + arg0, + arg1, + arg2, ); } - late final _CFBagGetValuePtr = _lookup< + late final _bcopyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFBagRef, ffi.Pointer)>>('CFBagGetValue'); - late final _CFBagGetValue = _CFBagGetValuePtr.asFunction< - ffi.Pointer Function(CFBagRef, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('bcopy'); + late final _bcopy = _bcopyPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int CFBagGetValueIfPresent( - CFBagRef theBag, - ffi.Pointer candidate, - ffi.Pointer> value, + void bzero( + ffi.Pointer arg0, + int arg1, ) { - return _CFBagGetValueIfPresent( - theBag, - candidate, - value, + return _bzero( + arg0, + arg1, ); } - late final _CFBagGetValueIfPresentPtr = _lookup< + late final _bzeroPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFBagRef, ffi.Pointer, - ffi.Pointer>)>>('CFBagGetValueIfPresent'); - late final _CFBagGetValueIfPresent = _CFBagGetValueIfPresentPtr.asFunction< - int Function(CFBagRef, ffi.Pointer, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Size)>>('bzero'); + late final _bzero = + _bzeroPtr.asFunction, int)>(); - void CFBagGetValues( - CFBagRef theBag, - ffi.Pointer> values, + ffi.Pointer index( + ffi.Pointer arg0, + int arg1, ) { - return _CFBagGetValues( - theBag, - values, + return _index( + arg0, + arg1, ); } - late final _CFBagGetValuesPtr = _lookup< + late final _indexPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFBagRef, ffi.Pointer>)>>('CFBagGetValues'); - late final _CFBagGetValues = _CFBagGetValuesPtr.asFunction< - void Function(CFBagRef, ffi.Pointer>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('index'); + late final _index = _indexPtr + .asFunction Function(ffi.Pointer, int)>(); - void CFBagApplyFunction( - CFBagRef theBag, - CFBagApplierFunction applier, - ffi.Pointer context, + ffi.Pointer rindex( + ffi.Pointer arg0, + int arg1, ) { - return _CFBagApplyFunction( - theBag, - applier, - context, + return _rindex( + arg0, + arg1, ); } - late final _CFBagApplyFunctionPtr = _lookup< + late final _rindexPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFBagRef, CFBagApplierFunction, - ffi.Pointer)>>('CFBagApplyFunction'); - late final _CFBagApplyFunction = _CFBagApplyFunctionPtr.asFunction< - void Function(CFBagRef, CFBagApplierFunction, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('rindex'); + late final _rindex = _rindexPtr + .asFunction Function(ffi.Pointer, int)>(); - void CFBagAddValue( - CFMutableBagRef theBag, - ffi.Pointer value, + int ffs( + int arg0, ) { - return _CFBagAddValue( - theBag, - value, + return _ffs( + arg0, ); } - late final _CFBagAddValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagAddValue'); - late final _CFBagAddValue = _CFBagAddValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + late final _ffsPtr = + _lookup>('ffs'); + late final _ffs = _ffsPtr.asFunction(); - void CFBagReplaceValue( - CFMutableBagRef theBag, - ffi.Pointer value, + int strcasecmp( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBagReplaceValue( - theBag, - value, + return _strcasecmp( + arg0, + arg1, ); } - late final _CFBagReplaceValuePtr = _lookup< + late final _strcasecmpPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagReplaceValue'); - late final _CFBagReplaceValue = _CFBagReplaceValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcasecmp'); + late final _strcasecmp = _strcasecmpPtr + .asFunction, ffi.Pointer)>(); - void CFBagSetValue( - CFMutableBagRef theBag, - ffi.Pointer value, + int strncasecmp( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFBagSetValue( - theBag, - value, + return _strncasecmp( + arg0, + arg1, + arg2, ); } - late final _CFBagSetValuePtr = _lookup< + late final _strncasecmpPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagSetValue'); - late final _CFBagSetValue = _CFBagSetValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('strncasecmp'); + late final _strncasecmp = _strncasecmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - void CFBagRemoveValue( - CFMutableBagRef theBag, - ffi.Pointer value, + int ffsl( + int arg0, ) { - return _CFBagRemoveValue( - theBag, - value, + return _ffsl( + arg0, ); } - late final _CFBagRemoveValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagRemoveValue'); - late final _CFBagRemoveValue = _CFBagRemoveValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + late final _ffslPtr = + _lookup>('ffsl'); + late final _ffsl = _ffslPtr.asFunction(); - void CFBagRemoveAllValues( - CFMutableBagRef theBag, + int ffsll( + int arg0, ) { - return _CFBagRemoveAllValues( - theBag, + return _ffsll( + arg0, ); } - late final _CFBagRemoveAllValuesPtr = - _lookup>( - 'CFBagRemoveAllValues'); - late final _CFBagRemoveAllValues = - _CFBagRemoveAllValuesPtr.asFunction(); - - late final ffi.Pointer _kCFStringBinaryHeapCallBacks = - _lookup('kCFStringBinaryHeapCallBacks'); - - CFBinaryHeapCallBacks get kCFStringBinaryHeapCallBacks => - _kCFStringBinaryHeapCallBacks.ref; + late final _ffsllPtr = + _lookup>('ffsll'); + late final _ffsll = _ffsllPtr.asFunction(); - int CFBinaryHeapGetTypeID() { - return _CFBinaryHeapGetTypeID(); + int fls( + int arg0, + ) { + return _fls( + arg0, + ); } - late final _CFBinaryHeapGetTypeIDPtr = - _lookup>('CFBinaryHeapGetTypeID'); - late final _CFBinaryHeapGetTypeID = - _CFBinaryHeapGetTypeIDPtr.asFunction(); + late final _flsPtr = + _lookup>('fls'); + late final _fls = _flsPtr.asFunction(); - CFBinaryHeapRef CFBinaryHeapCreate( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, - ffi.Pointer compareContext, + int flsl( + int arg0, ) { - return _CFBinaryHeapCreate( - allocator, - capacity, - callBacks, - compareContext, + return _flsl( + arg0, ); } - late final _CFBinaryHeapCreatePtr = _lookup< - ffi.NativeFunction< - CFBinaryHeapRef Function( - CFAllocatorRef, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>('CFBinaryHeapCreate'); - late final _CFBinaryHeapCreate = _CFBinaryHeapCreatePtr.asFunction< - CFBinaryHeapRef Function( - CFAllocatorRef, - int, - ffi.Pointer, - ffi.Pointer)>(); + late final _flslPtr = + _lookup>('flsl'); + late final _flsl = _flslPtr.asFunction(); - CFBinaryHeapRef CFBinaryHeapCreateCopy( - CFAllocatorRef allocator, - int capacity, - CFBinaryHeapRef heap, + int flsll( + int arg0, ) { - return _CFBinaryHeapCreateCopy( - allocator, - capacity, - heap, + return _flsll( + arg0, ); } - late final _CFBinaryHeapCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFBinaryHeapRef Function(CFAllocatorRef, CFIndex, - CFBinaryHeapRef)>>('CFBinaryHeapCreateCopy'); - late final _CFBinaryHeapCreateCopy = _CFBinaryHeapCreateCopyPtr.asFunction< - CFBinaryHeapRef Function(CFAllocatorRef, int, CFBinaryHeapRef)>(); + late final _flsllPtr = + _lookup>('flsll'); + late final _flsll = _flsllPtr.asFunction(); - int CFBinaryHeapGetCount( - CFBinaryHeapRef heap, + late final ffi.Pointer>> _tzname = + _lookup>>('tzname'); + + ffi.Pointer> get tzname => _tzname.value; + + set tzname(ffi.Pointer> value) => _tzname.value = value; + + late final ffi.Pointer _getdate_err = + _lookup('getdate_err'); + + int get getdate_err => _getdate_err.value; + + set getdate_err(int value) => _getdate_err.value = value; + + late final ffi.Pointer _timezone = _lookup('timezone'); + + int get timezone => _timezone.value; + + set timezone(int value) => _timezone.value = value; + + late final ffi.Pointer _daylight = _lookup('daylight'); + + int get daylight => _daylight.value; + + set daylight(int value) => _daylight.value = value; + + ffi.Pointer asctime( + ffi.Pointer arg0, ) { - return _CFBinaryHeapGetCount( - heap, + return _asctime( + arg0, ); } - late final _CFBinaryHeapGetCountPtr = - _lookup>( - 'CFBinaryHeapGetCount'); - late final _CFBinaryHeapGetCount = - _CFBinaryHeapGetCountPtr.asFunction(); + late final _asctimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'asctime'); + late final _asctime = + _asctimePtr.asFunction Function(ffi.Pointer)>(); - int CFBinaryHeapGetCountOfValue( - CFBinaryHeapRef heap, - ffi.Pointer value, + int clock() { + return _clock(); + } + + late final _clockPtr = + _lookup>('clock'); + late final _clock = _clockPtr.asFunction(); + + ffi.Pointer ctime( + ffi.Pointer arg0, ) { - return _CFBinaryHeapGetCountOfValue( - heap, - value, + return _ctime( + arg0, ); } - late final _CFBinaryHeapGetCountOfValuePtr = _lookup< + late final _ctimePtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFBinaryHeapRef, - ffi.Pointer)>>('CFBinaryHeapGetCountOfValue'); - late final _CFBinaryHeapGetCountOfValue = _CFBinaryHeapGetCountOfValuePtr - .asFunction)>(); + ffi.Pointer Function(ffi.Pointer)>>('ctime'); + late final _ctime = _ctimePtr + .asFunction Function(ffi.Pointer)>(); - int CFBinaryHeapContainsValue( - CFBinaryHeapRef heap, - ffi.Pointer value, + double difftime( + int arg0, + int arg1, ) { - return _CFBinaryHeapContainsValue( - heap, - value, + return _difftime( + arg0, + arg1, ); } - late final _CFBinaryHeapContainsValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFBinaryHeapRef, - ffi.Pointer)>>('CFBinaryHeapContainsValue'); - late final _CFBinaryHeapContainsValue = _CFBinaryHeapContainsValuePtr - .asFunction)>(); + late final _difftimePtr = + _lookup>( + 'difftime'); + late final _difftime = _difftimePtr.asFunction(); - ffi.Pointer CFBinaryHeapGetMinimum( - CFBinaryHeapRef heap, + ffi.Pointer getdate( + ffi.Pointer arg0, ) { - return _CFBinaryHeapGetMinimum( - heap, + return _getdate( + arg0, ); } - late final _CFBinaryHeapGetMinimumPtr = _lookup< - ffi.NativeFunction Function(CFBinaryHeapRef)>>( - 'CFBinaryHeapGetMinimum'); - late final _CFBinaryHeapGetMinimum = _CFBinaryHeapGetMinimumPtr.asFunction< - ffi.Pointer Function(CFBinaryHeapRef)>(); + late final _getdatePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'getdate'); + late final _getdate = + _getdatePtr.asFunction Function(ffi.Pointer)>(); - int CFBinaryHeapGetMinimumIfPresent( - CFBinaryHeapRef heap, - ffi.Pointer> value, + ffi.Pointer gmtime( + ffi.Pointer arg0, ) { - return _CFBinaryHeapGetMinimumIfPresent( - heap, - value, + return _gmtime( + arg0, ); } - late final _CFBinaryHeapGetMinimumIfPresentPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFBinaryHeapRef, ffi.Pointer>)>>( - 'CFBinaryHeapGetMinimumIfPresent'); - late final _CFBinaryHeapGetMinimumIfPresent = - _CFBinaryHeapGetMinimumIfPresentPtr.asFunction< - int Function(CFBinaryHeapRef, ffi.Pointer>)>(); + late final _gmtimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'gmtime'); + late final _gmtime = + _gmtimePtr.asFunction Function(ffi.Pointer)>(); - void CFBinaryHeapGetValues( - CFBinaryHeapRef heap, - ffi.Pointer> values, + ffi.Pointer localtime( + ffi.Pointer arg0, ) { - return _CFBinaryHeapGetValues( - heap, - values, + return _localtime( + arg0, ); } - late final _CFBinaryHeapGetValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBinaryHeapRef, - ffi.Pointer>)>>('CFBinaryHeapGetValues'); - late final _CFBinaryHeapGetValues = _CFBinaryHeapGetValuesPtr.asFunction< - void Function(CFBinaryHeapRef, ffi.Pointer>)>(); + late final _localtimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'localtime'); + late final _localtime = + _localtimePtr.asFunction Function(ffi.Pointer)>(); - void CFBinaryHeapApplyFunction( - CFBinaryHeapRef heap, - CFBinaryHeapApplierFunction applier, - ffi.Pointer context, + int mktime( + ffi.Pointer arg0, ) { - return _CFBinaryHeapApplyFunction( - heap, - applier, - context, + return _mktime( + arg0, ); } - late final _CFBinaryHeapApplyFunctionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, - ffi.Pointer)>>('CFBinaryHeapApplyFunction'); - late final _CFBinaryHeapApplyFunction = - _CFBinaryHeapApplyFunctionPtr.asFunction< - void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, - ffi.Pointer)>(); + late final _mktimePtr = + _lookup)>>('mktime'); + late final _mktime = _mktimePtr.asFunction)>(); - void CFBinaryHeapAddValue( - CFBinaryHeapRef heap, - ffi.Pointer value, + int strftime( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _CFBinaryHeapAddValue( - heap, - value, + return _strftime( + arg0, + arg1, + arg2, + arg3, ); } - late final _CFBinaryHeapAddValuePtr = _lookup< + late final _strftimePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFBinaryHeapRef, ffi.Pointer)>>('CFBinaryHeapAddValue'); - late final _CFBinaryHeapAddValue = _CFBinaryHeapAddValuePtr.asFunction< - void Function(CFBinaryHeapRef, ffi.Pointer)>(); + ffi.Size Function(ffi.Pointer, ffi.Size, + ffi.Pointer, ffi.Pointer)>>('strftime'); + late final _strftime = _strftimePtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); - void CFBinaryHeapRemoveMinimumValue( - CFBinaryHeapRef heap, + ffi.Pointer strptime( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _CFBinaryHeapRemoveMinimumValue( - heap, + return _strptime( + arg0, + arg1, + arg2, ); } - late final _CFBinaryHeapRemoveMinimumValuePtr = - _lookup>( - 'CFBinaryHeapRemoveMinimumValue'); - late final _CFBinaryHeapRemoveMinimumValue = - _CFBinaryHeapRemoveMinimumValuePtr.asFunction< - void Function(CFBinaryHeapRef)>(); + late final _strptimePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('strptime'); + late final _strptime = _strptimePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - void CFBinaryHeapRemoveAllValues( - CFBinaryHeapRef heap, + int time( + ffi.Pointer arg0, ) { - return _CFBinaryHeapRemoveAllValues( - heap, + return _time( + arg0, ); } - late final _CFBinaryHeapRemoveAllValuesPtr = - _lookup>( - 'CFBinaryHeapRemoveAllValues'); - late final _CFBinaryHeapRemoveAllValues = _CFBinaryHeapRemoveAllValuesPtr - .asFunction(); + late final _timePtr = + _lookup)>>('time'); + late final _time = _timePtr.asFunction)>(); - int CFBitVectorGetTypeID() { - return _CFBitVectorGetTypeID(); + void tzset() { + return _tzset(); } - late final _CFBitVectorGetTypeIDPtr = - _lookup>('CFBitVectorGetTypeID'); - late final _CFBitVectorGetTypeID = - _CFBitVectorGetTypeIDPtr.asFunction(); + late final _tzsetPtr = + _lookup>('tzset'); + late final _tzset = _tzsetPtr.asFunction(); - CFBitVectorRef CFBitVectorCreate( - CFAllocatorRef allocator, - ffi.Pointer bytes, - int numBits, + ffi.Pointer asctime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBitVectorCreate( - allocator, - bytes, - numBits, + return _asctime_r( + arg0, + arg1, ); } - late final _CFBitVectorCreatePtr = _lookup< + late final _asctime_rPtr = _lookup< ffi.NativeFunction< - CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex)>>('CFBitVectorCreate'); - late final _CFBitVectorCreate = _CFBitVectorCreatePtr.asFunction< - CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('asctime_r'); + late final _asctime_r = _asctime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); - CFBitVectorRef CFBitVectorCreateCopy( - CFAllocatorRef allocator, - CFBitVectorRef bv, + ffi.Pointer ctime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBitVectorCreateCopy( - allocator, - bv, + return _ctime_r( + arg0, + arg1, ); } - late final _CFBitVectorCreateCopyPtr = _lookup< + late final _ctime_rPtr = _lookup< ffi.NativeFunction< - CFBitVectorRef Function( - CFAllocatorRef, CFBitVectorRef)>>('CFBitVectorCreateCopy'); - late final _CFBitVectorCreateCopy = _CFBitVectorCreateCopyPtr.asFunction< - CFBitVectorRef Function(CFAllocatorRef, CFBitVectorRef)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('ctime_r'); + late final _ctime_r = _ctime_rPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - CFMutableBitVectorRef CFBitVectorCreateMutable( - CFAllocatorRef allocator, - int capacity, + ffi.Pointer gmtime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBitVectorCreateMutable( - allocator, - capacity, + return _gmtime_r( + arg0, + arg1, ); } - late final _CFBitVectorCreateMutablePtr = _lookup< + late final _gmtime_rPtr = _lookup< ffi.NativeFunction< - CFMutableBitVectorRef Function( - CFAllocatorRef, CFIndex)>>('CFBitVectorCreateMutable'); - late final _CFBitVectorCreateMutable = _CFBitVectorCreateMutablePtr - .asFunction(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('gmtime_r'); + late final _gmtime_r = _gmtime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); - CFMutableBitVectorRef CFBitVectorCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFBitVectorRef bv, + ffi.Pointer localtime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBitVectorCreateMutableCopy( - allocator, - capacity, - bv, + return _localtime_r( + arg0, + arg1, ); } - late final _CFBitVectorCreateMutableCopyPtr = _lookup< + late final _localtime_rPtr = _lookup< ffi.NativeFunction< - CFMutableBitVectorRef Function(CFAllocatorRef, CFIndex, - CFBitVectorRef)>>('CFBitVectorCreateMutableCopy'); - late final _CFBitVectorCreateMutableCopy = - _CFBitVectorCreateMutableCopyPtr.asFunction< - CFMutableBitVectorRef Function( - CFAllocatorRef, int, CFBitVectorRef)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('localtime_r'); + late final _localtime_r = _localtime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); - int CFBitVectorGetCount( - CFBitVectorRef bv, + int posix2time( + int arg0, ) { - return _CFBitVectorGetCount( - bv, + return _posix2time( + arg0, ); } - late final _CFBitVectorGetCountPtr = - _lookup>( - 'CFBitVectorGetCount'); - late final _CFBitVectorGetCount = - _CFBitVectorGetCountPtr.asFunction(); + late final _posix2timePtr = + _lookup>('posix2time'); + late final _posix2time = _posix2timePtr.asFunction(); - int CFBitVectorGetCountOfBit( - CFBitVectorRef bv, - CFRange range, - int value, + void tzsetwall() { + return _tzsetwall(); + } + + late final _tzsetwallPtr = + _lookup>('tzsetwall'); + late final _tzsetwall = _tzsetwallPtr.asFunction(); + + int time2posix( + int arg0, ) { - return _CFBitVectorGetCountOfBit( - bv, - range, - value, + return _time2posix( + arg0, ); } - late final _CFBitVectorGetCountOfBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorGetCountOfBit'); - late final _CFBitVectorGetCountOfBit = _CFBitVectorGetCountOfBitPtr - .asFunction(); + late final _time2posixPtr = + _lookup>('time2posix'); + late final _time2posix = _time2posixPtr.asFunction(); - int CFBitVectorContainsBit( - CFBitVectorRef bv, - CFRange range, - int value, + int timelocal( + ffi.Pointer arg0, ) { - return _CFBitVectorContainsBit( - bv, - range, - value, + return _timelocal( + arg0, ); } - late final _CFBitVectorContainsBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorContainsBit'); - late final _CFBitVectorContainsBit = _CFBitVectorContainsBitPtr.asFunction< - int Function(CFBitVectorRef, CFRange, int)>(); + late final _timelocalPtr = + _lookup)>>( + 'timelocal'); + late final _timelocal = + _timelocalPtr.asFunction)>(); - int CFBitVectorGetBitAtIndex( - CFBitVectorRef bv, - int idx, + int timegm( + ffi.Pointer arg0, ) { - return _CFBitVectorGetBitAtIndex( - bv, - idx, + return _timegm( + arg0, ); } - late final _CFBitVectorGetBitAtIndexPtr = - _lookup>( - 'CFBitVectorGetBitAtIndex'); - late final _CFBitVectorGetBitAtIndex = _CFBitVectorGetBitAtIndexPtr - .asFunction(); + late final _timegmPtr = + _lookup)>>('timegm'); + late final _timegm = _timegmPtr.asFunction)>(); - void CFBitVectorGetBits( - CFBitVectorRef bv, - CFRange range, - ffi.Pointer bytes, + int nanosleep( + ffi.Pointer __rqtp, + ffi.Pointer __rmtp, ) { - return _CFBitVectorGetBits( - bv, - range, - bytes, + return _nanosleep( + __rqtp, + __rmtp, ); } - late final _CFBitVectorGetBitsPtr = _lookup< + late final _nanosleepPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFBitVectorRef, CFRange, - ffi.Pointer)>>('CFBitVectorGetBits'); - late final _CFBitVectorGetBits = _CFBitVectorGetBitsPtr.asFunction< - void Function(CFBitVectorRef, CFRange, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('nanosleep'); + late final _nanosleep = _nanosleepPtr + .asFunction, ffi.Pointer)>(); - int CFBitVectorGetFirstIndexOfBit( - CFBitVectorRef bv, - CFRange range, - int value, + int clock_getres( + int __clock_id, + ffi.Pointer __res, ) { - return _CFBitVectorGetFirstIndexOfBit( - bv, - range, - value, + return _clock_getres( + __clock_id, + __res, ); } - late final _CFBitVectorGetFirstIndexOfBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorGetFirstIndexOfBit'); - late final _CFBitVectorGetFirstIndexOfBit = _CFBitVectorGetFirstIndexOfBitPtr - .asFunction(); + late final _clock_getresPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_getres'); + late final _clock_getres = + _clock_getresPtr.asFunction)>(); - int CFBitVectorGetLastIndexOfBit( - CFBitVectorRef bv, - CFRange range, - int value, + int clock_gettime( + int __clock_id, + ffi.Pointer __tp, ) { - return _CFBitVectorGetLastIndexOfBit( - bv, - range, - value, + return _clock_gettime( + __clock_id, + __tp, ); } - late final _CFBitVectorGetLastIndexOfBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorGetLastIndexOfBit'); - late final _CFBitVectorGetLastIndexOfBit = _CFBitVectorGetLastIndexOfBitPtr - .asFunction(); + late final _clock_gettimePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_gettime'); + late final _clock_gettime = + _clock_gettimePtr.asFunction)>(); - void CFBitVectorSetCount( - CFMutableBitVectorRef bv, - int count, + int clock_gettime_nsec_np( + int __clock_id, ) { - return _CFBitVectorSetCount( - bv, - count, + return _clock_gettime_nsec_np( + __clock_id, ); } - late final _CFBitVectorSetCountPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFIndex)>>('CFBitVectorSetCount'); - late final _CFBitVectorSetCount = _CFBitVectorSetCountPtr.asFunction< - void Function(CFMutableBitVectorRef, int)>(); + late final _clock_gettime_nsec_npPtr = + _lookup>( + 'clock_gettime_nsec_np'); + late final _clock_gettime_nsec_np = + _clock_gettime_nsec_npPtr.asFunction(); - void CFBitVectorFlipBitAtIndex( - CFMutableBitVectorRef bv, - int idx, + int clock_settime( + int __clock_id, + ffi.Pointer __tp, ) { - return _CFBitVectorFlipBitAtIndex( - bv, - idx, + return _clock_settime( + __clock_id, + __tp, ); } - late final _CFBitVectorFlipBitAtIndexPtr = _lookup< + late final _clock_settimePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFIndex)>>('CFBitVectorFlipBitAtIndex'); - late final _CFBitVectorFlipBitAtIndex = _CFBitVectorFlipBitAtIndexPtr - .asFunction(); + ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_settime'); + late final _clock_settime = + _clock_settimePtr.asFunction)>(); - void CFBitVectorFlipBits( - CFMutableBitVectorRef bv, - CFRange range, + int timespec_get( + ffi.Pointer ts, + int base, ) { - return _CFBitVectorFlipBits( - bv, - range, + return _timespec_get( + ts, + base, ); } - late final _CFBitVectorFlipBitsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFRange)>>('CFBitVectorFlipBits'); - late final _CFBitVectorFlipBits = _CFBitVectorFlipBitsPtr.asFunction< - void Function(CFMutableBitVectorRef, CFRange)>(); + late final _timespec_getPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'timespec_get'); + late final _timespec_get = + _timespec_getPtr.asFunction, int)>(); - void CFBitVectorSetBitAtIndex( - CFMutableBitVectorRef bv, - int idx, - int value, + int imaxabs( + int j, ) { - return _CFBitVectorSetBitAtIndex( - bv, - idx, - value, + return _imaxabs( + j, ); } - late final _CFBitVectorSetBitAtIndexPtr = _lookup< + late final _imaxabsPtr = + _lookup>('imaxabs'); + late final _imaxabs = _imaxabsPtr.asFunction(); + + imaxdiv_t imaxdiv( + int __numer, + int __denom, + ) { + return _imaxdiv( + __numer, + __denom, + ); + } + + late final _imaxdivPtr = + _lookup>( + 'imaxdiv'); + late final _imaxdiv = _imaxdivPtr.asFunction(); + + int strtoimax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoimax( + __nptr, + __endptr, + __base, + ); + } + + late final _strtoimaxPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableBitVectorRef, CFIndex, - CFBit)>>('CFBitVectorSetBitAtIndex'); - late final _CFBitVectorSetBitAtIndex = _CFBitVectorSetBitAtIndexPtr - .asFunction(); + intmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoimax'); + late final _strtoimax = _strtoimaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - void CFBitVectorSetBits( - CFMutableBitVectorRef bv, - CFRange range, - int value, + int strtoumax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, ) { - return _CFBitVectorSetBits( - bv, - range, - value, + return _strtoumax( + __nptr, + __endptr, + __base, ); } - late final _CFBitVectorSetBitsPtr = _lookup< + late final _strtoumaxPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFRange, CFBit)>>('CFBitVectorSetBits'); - late final _CFBitVectorSetBits = _CFBitVectorSetBitsPtr.asFunction< - void Function(CFMutableBitVectorRef, CFRange, int)>(); + uintmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoumax'); + late final _strtoumax = _strtoumaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - void CFBitVectorSetAllBits( - CFMutableBitVectorRef bv, - int value, + int wcstoimax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, ) { - return _CFBitVectorSetAllBits( - bv, - value, + return _wcstoimax( + __nptr, + __endptr, + __base, ); } - late final _CFBitVectorSetAllBitsPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorSetAllBits'); - late final _CFBitVectorSetAllBits = _CFBitVectorSetAllBitsPtr.asFunction< - void Function(CFMutableBitVectorRef, int)>(); + late final _wcstoimaxPtr = _lookup< + ffi.NativeFunction< + intmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('wcstoimax'); + late final _wcstoimax = _wcstoimaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final ffi.Pointer - _kCFTypeDictionaryKeyCallBacks = - _lookup('kCFTypeDictionaryKeyCallBacks'); + int wcstoumax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, + ) { + return _wcstoumax( + __nptr, + __endptr, + __base, + ); + } - CFDictionaryKeyCallBacks get kCFTypeDictionaryKeyCallBacks => - _kCFTypeDictionaryKeyCallBacks.ref; + late final _wcstoumaxPtr = _lookup< + ffi.NativeFunction< + uintmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('wcstoumax'); + late final _wcstoumax = _wcstoumaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final ffi.Pointer - _kCFCopyStringDictionaryKeyCallBacks = - _lookup('kCFCopyStringDictionaryKeyCallBacks'); + late final ffi.Pointer _kCFTypeBagCallBacks = + _lookup('kCFTypeBagCallBacks'); - CFDictionaryKeyCallBacks get kCFCopyStringDictionaryKeyCallBacks => - _kCFCopyStringDictionaryKeyCallBacks.ref; + CFBagCallBacks get kCFTypeBagCallBacks => _kCFTypeBagCallBacks.ref; - late final ffi.Pointer - _kCFTypeDictionaryValueCallBacks = - _lookup('kCFTypeDictionaryValueCallBacks'); + late final ffi.Pointer _kCFCopyStringBagCallBacks = + _lookup('kCFCopyStringBagCallBacks'); - CFDictionaryValueCallBacks get kCFTypeDictionaryValueCallBacks => - _kCFTypeDictionaryValueCallBacks.ref; + CFBagCallBacks get kCFCopyStringBagCallBacks => + _kCFCopyStringBagCallBacks.ref; - int CFDictionaryGetTypeID() { - return _CFDictionaryGetTypeID(); + int CFBagGetTypeID() { + return _CFBagGetTypeID(); } - late final _CFDictionaryGetTypeIDPtr = - _lookup>('CFDictionaryGetTypeID'); - late final _CFDictionaryGetTypeID = - _CFDictionaryGetTypeIDPtr.asFunction(); + late final _CFBagGetTypeIDPtr = + _lookup>('CFBagGetTypeID'); + late final _CFBagGetTypeID = _CFBagGetTypeIDPtr.asFunction(); - CFDictionaryRef CFDictionaryCreate( + CFBagRef CFBagCreate( CFAllocatorRef allocator, - ffi.Pointer> keys, ffi.Pointer> values, int numValues, - ffi.Pointer keyCallBacks, - ffi.Pointer valueCallBacks, + ffi.Pointer callBacks, ) { - return _CFDictionaryCreate( + return _CFBagCreate( allocator, - keys, values, numValues, - keyCallBacks, - valueCallBacks, + callBacks, ); } - late final _CFDictionaryCreatePtr = _lookup< + late final _CFBagCreatePtr = _lookup< ffi.NativeFunction< - CFDictionaryRef Function( - CFAllocatorRef, - ffi.Pointer>, - ffi.Pointer>, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>('CFDictionaryCreate'); - late final _CFDictionaryCreate = _CFDictionaryCreatePtr.asFunction< - CFDictionaryRef Function( - CFAllocatorRef, - ffi.Pointer>, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer)>(); + CFBagRef Function(CFAllocatorRef, ffi.Pointer>, + CFIndex, ffi.Pointer)>>('CFBagCreate'); + late final _CFBagCreate = _CFBagCreatePtr.asFunction< + CFBagRef Function(CFAllocatorRef, ffi.Pointer>, int, + ffi.Pointer)>(); - CFDictionaryRef CFDictionaryCreateCopy( + CFBagRef CFBagCreateCopy( CFAllocatorRef allocator, - CFDictionaryRef theDict, + CFBagRef theBag, ) { - return _CFDictionaryCreateCopy( + return _CFBagCreateCopy( allocator, - theDict, + theBag, ); } - late final _CFDictionaryCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function( - CFAllocatorRef, CFDictionaryRef)>>('CFDictionaryCreateCopy'); - late final _CFDictionaryCreateCopy = _CFDictionaryCreateCopyPtr.asFunction< - CFDictionaryRef Function(CFAllocatorRef, CFDictionaryRef)>(); + late final _CFBagCreateCopyPtr = + _lookup>( + 'CFBagCreateCopy'); + late final _CFBagCreateCopy = _CFBagCreateCopyPtr.asFunction< + CFBagRef Function(CFAllocatorRef, CFBagRef)>(); - CFMutableDictionaryRef CFDictionaryCreateMutable( + CFMutableBagRef CFBagCreateMutable( CFAllocatorRef allocator, int capacity, - ffi.Pointer keyCallBacks, - ffi.Pointer valueCallBacks, + ffi.Pointer callBacks, ) { - return _CFDictionaryCreateMutable( + return _CFBagCreateMutable( allocator, capacity, - keyCallBacks, - valueCallBacks, + callBacks, ); } - late final _CFDictionaryCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableDictionaryRef Function( - CFAllocatorRef, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>( - 'CFDictionaryCreateMutable'); - late final _CFDictionaryCreateMutable = - _CFDictionaryCreateMutablePtr.asFunction< - CFMutableDictionaryRef Function( - CFAllocatorRef, - int, - ffi.Pointer, - ffi.Pointer)>(); + late final _CFBagCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableBagRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFBagCreateMutable'); + late final _CFBagCreateMutable = _CFBagCreateMutablePtr.asFunction< + CFMutableBagRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - CFMutableDictionaryRef CFDictionaryCreateMutableCopy( + CFMutableBagRef CFBagCreateMutableCopy( CFAllocatorRef allocator, int capacity, - CFDictionaryRef theDict, + CFBagRef theBag, ) { - return _CFDictionaryCreateMutableCopy( + return _CFBagCreateMutableCopy( allocator, capacity, - theDict, + theBag, ); } - late final _CFDictionaryCreateMutableCopyPtr = _lookup< + late final _CFBagCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - CFMutableDictionaryRef Function(CFAllocatorRef, CFIndex, - CFDictionaryRef)>>('CFDictionaryCreateMutableCopy'); - late final _CFDictionaryCreateMutableCopy = - _CFDictionaryCreateMutableCopyPtr.asFunction< - CFMutableDictionaryRef Function( - CFAllocatorRef, int, CFDictionaryRef)>(); + CFMutableBagRef Function( + CFAllocatorRef, CFIndex, CFBagRef)>>('CFBagCreateMutableCopy'); + late final _CFBagCreateMutableCopy = _CFBagCreateMutableCopyPtr.asFunction< + CFMutableBagRef Function(CFAllocatorRef, int, CFBagRef)>(); - int CFDictionaryGetCount( - CFDictionaryRef theDict, + int CFBagGetCount( + CFBagRef theBag, ) { - return _CFDictionaryGetCount( - theDict, + return _CFBagGetCount( + theBag, ); } - late final _CFDictionaryGetCountPtr = - _lookup>( - 'CFDictionaryGetCount'); - late final _CFDictionaryGetCount = - _CFDictionaryGetCountPtr.asFunction(); + late final _CFBagGetCountPtr = + _lookup>('CFBagGetCount'); + late final _CFBagGetCount = + _CFBagGetCountPtr.asFunction(); - int CFDictionaryGetCountOfKey( - CFDictionaryRef theDict, - ffi.Pointer key, + int CFBagGetCountOfValue( + CFBagRef theBag, + ffi.Pointer value, ) { - return _CFDictionaryGetCountOfKey( - theDict, - key, + return _CFBagGetCountOfValue( + theBag, + value, ); } - late final _CFDictionaryGetCountOfKeyPtr = _lookup< + late final _CFBagGetCountOfValuePtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryGetCountOfKey'); - late final _CFDictionaryGetCountOfKey = _CFDictionaryGetCountOfKeyPtr - .asFunction)>(); + CFIndex Function( + CFBagRef, ffi.Pointer)>>('CFBagGetCountOfValue'); + late final _CFBagGetCountOfValue = _CFBagGetCountOfValuePtr.asFunction< + int Function(CFBagRef, ffi.Pointer)>(); - int CFDictionaryGetCountOfValue( - CFDictionaryRef theDict, + int CFBagContainsValue( + CFBagRef theBag, ffi.Pointer value, ) { - return _CFDictionaryGetCountOfValue( - theDict, + return _CFBagContainsValue( + theBag, value, ); } - late final _CFDictionaryGetCountOfValuePtr = _lookup< + late final _CFBagContainsValuePtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryGetCountOfValue'); - late final _CFDictionaryGetCountOfValue = _CFDictionaryGetCountOfValuePtr - .asFunction)>(); + Boolean Function( + CFBagRef, ffi.Pointer)>>('CFBagContainsValue'); + late final _CFBagContainsValue = _CFBagContainsValuePtr.asFunction< + int Function(CFBagRef, ffi.Pointer)>(); - int CFDictionaryContainsKey( - CFDictionaryRef theDict, - ffi.Pointer key, + ffi.Pointer CFBagGetValue( + CFBagRef theBag, + ffi.Pointer value, ) { - return _CFDictionaryContainsKey( - theDict, - key, + return _CFBagGetValue( + theBag, + value, ); } - late final _CFDictionaryContainsKeyPtr = _lookup< + late final _CFBagGetValuePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryContainsKey'); - late final _CFDictionaryContainsKey = _CFDictionaryContainsKeyPtr.asFunction< - int Function(CFDictionaryRef, ffi.Pointer)>(); + ffi.Pointer Function( + CFBagRef, ffi.Pointer)>>('CFBagGetValue'); + late final _CFBagGetValue = _CFBagGetValuePtr.asFunction< + ffi.Pointer Function(CFBagRef, ffi.Pointer)>(); - int CFDictionaryContainsValue( - CFDictionaryRef theDict, - ffi.Pointer value, + int CFBagGetValueIfPresent( + CFBagRef theBag, + ffi.Pointer candidate, + ffi.Pointer> value, ) { - return _CFDictionaryContainsValue( - theDict, + return _CFBagGetValueIfPresent( + theBag, + candidate, value, ); } - late final _CFDictionaryContainsValuePtr = _lookup< + late final _CFBagGetValueIfPresentPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryContainsValue'); - late final _CFDictionaryContainsValue = _CFDictionaryContainsValuePtr - .asFunction)>(); + Boolean Function(CFBagRef, ffi.Pointer, + ffi.Pointer>)>>('CFBagGetValueIfPresent'); + late final _CFBagGetValueIfPresent = _CFBagGetValueIfPresentPtr.asFunction< + int Function(CFBagRef, ffi.Pointer, + ffi.Pointer>)>(); - ffi.Pointer CFDictionaryGetValue( - CFDictionaryRef theDict, - ffi.Pointer key, + void CFBagGetValues( + CFBagRef theBag, + ffi.Pointer> values, ) { - return _CFDictionaryGetValue( - theDict, - key, + return _CFBagGetValues( + theBag, + values, ); } - late final _CFDictionaryGetValuePtr = _lookup< + late final _CFBagGetValuesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFDictionaryRef, ffi.Pointer)>>('CFDictionaryGetValue'); - late final _CFDictionaryGetValue = _CFDictionaryGetValuePtr.asFunction< - ffi.Pointer Function(CFDictionaryRef, ffi.Pointer)>(); + ffi.Void Function( + CFBagRef, ffi.Pointer>)>>('CFBagGetValues'); + late final _CFBagGetValues = _CFBagGetValuesPtr.asFunction< + void Function(CFBagRef, ffi.Pointer>)>(); - int CFDictionaryGetValueIfPresent( - CFDictionaryRef theDict, - ffi.Pointer key, - ffi.Pointer> value, + void CFBagApplyFunction( + CFBagRef theBag, + CFBagApplierFunction applier, + ffi.Pointer context, ) { - return _CFDictionaryGetValueIfPresent( - theDict, - key, - value, + return _CFBagApplyFunction( + theBag, + applier, + context, ); } - late final _CFDictionaryGetValueIfPresentPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFDictionaryRef, ffi.Pointer, - ffi.Pointer>)>>( - 'CFDictionaryGetValueIfPresent'); - late final _CFDictionaryGetValueIfPresent = - _CFDictionaryGetValueIfPresentPtr.asFunction< - int Function(CFDictionaryRef, ffi.Pointer, - ffi.Pointer>)>(); - - void CFDictionaryGetKeysAndValues( - CFDictionaryRef theDict, - ffi.Pointer> keys, - ffi.Pointer> values, + late final _CFBagApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBagRef, CFBagApplierFunction, + ffi.Pointer)>>('CFBagApplyFunction'); + late final _CFBagApplyFunction = _CFBagApplyFunctionPtr.asFunction< + void Function(CFBagRef, CFBagApplierFunction, ffi.Pointer)>(); + + void CFBagAddValue( + CFMutableBagRef theBag, + ffi.Pointer value, ) { - return _CFDictionaryGetKeysAndValues( - theDict, - keys, - values, + return _CFBagAddValue( + theBag, + value, ); } - late final _CFDictionaryGetKeysAndValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFDictionaryRef, - ffi.Pointer>, - ffi.Pointer>)>>( - 'CFDictionaryGetKeysAndValues'); - late final _CFDictionaryGetKeysAndValues = - _CFDictionaryGetKeysAndValuesPtr.asFunction< - void Function(CFDictionaryRef, ffi.Pointer>, - ffi.Pointer>)>(); + late final _CFBagAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagAddValue'); + late final _CFBagAddValue = _CFBagAddValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - void CFDictionaryApplyFunction( - CFDictionaryRef theDict, - CFDictionaryApplierFunction applier, - ffi.Pointer context, + void CFBagReplaceValue( + CFMutableBagRef theBag, + ffi.Pointer value, ) { - return _CFDictionaryApplyFunction( - theDict, - applier, - context, + return _CFBagReplaceValue( + theBag, + value, ); } - late final _CFDictionaryApplyFunctionPtr = _lookup< + late final _CFBagReplaceValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFDictionaryRef, CFDictionaryApplierFunction, - ffi.Pointer)>>('CFDictionaryApplyFunction'); - late final _CFDictionaryApplyFunction = - _CFDictionaryApplyFunctionPtr.asFunction< - void Function(CFDictionaryRef, CFDictionaryApplierFunction, - ffi.Pointer)>(); + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagReplaceValue'); + late final _CFBagReplaceValue = _CFBagReplaceValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - void CFDictionaryAddValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, + void CFBagSetValue( + CFMutableBagRef theBag, ffi.Pointer value, ) { - return _CFDictionaryAddValue( - theDict, - key, + return _CFBagSetValue( + theBag, value, ); } - late final _CFDictionaryAddValuePtr = _lookup< + late final _CFBagSetValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>>('CFDictionaryAddValue'); - late final _CFDictionaryAddValue = _CFDictionaryAddValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagSetValue'); + late final _CFBagSetValue = _CFBagSetValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - void CFDictionarySetValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, + void CFBagRemoveValue( + CFMutableBagRef theBag, ffi.Pointer value, ) { - return _CFDictionarySetValue( - theDict, - key, + return _CFBagRemoveValue( + theBag, value, ); } - late final _CFDictionarySetValuePtr = _lookup< + late final _CFBagRemoveValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>>('CFDictionarySetValue'); - late final _CFDictionarySetValue = _CFDictionarySetValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagRemoveValue'); + late final _CFBagRemoveValue = _CFBagRemoveValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - void CFDictionaryReplaceValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, - ffi.Pointer value, + void CFBagRemoveAllValues( + CFMutableBagRef theBag, ) { - return _CFDictionaryReplaceValue( - theDict, - key, - value, + return _CFBagRemoveAllValues( + theBag, ); } - late final _CFDictionaryReplaceValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>>('CFDictionaryReplaceValue'); - late final _CFDictionaryReplaceValue = - _CFDictionaryReplaceValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>(); + late final _CFBagRemoveAllValuesPtr = + _lookup>( + 'CFBagRemoveAllValues'); + late final _CFBagRemoveAllValues = + _CFBagRemoveAllValuesPtr.asFunction(); - void CFDictionaryRemoveValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, + late final ffi.Pointer _kCFStringBinaryHeapCallBacks = + _lookup('kCFStringBinaryHeapCallBacks'); + + CFBinaryHeapCallBacks get kCFStringBinaryHeapCallBacks => + _kCFStringBinaryHeapCallBacks.ref; + + int CFBinaryHeapGetTypeID() { + return _CFBinaryHeapGetTypeID(); + } + + late final _CFBinaryHeapGetTypeIDPtr = + _lookup>('CFBinaryHeapGetTypeID'); + late final _CFBinaryHeapGetTypeID = + _CFBinaryHeapGetTypeIDPtr.asFunction(); + + CFBinaryHeapRef CFBinaryHeapCreate( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, + ffi.Pointer compareContext, ) { - return _CFDictionaryRemoveValue( - theDict, - key, + return _CFBinaryHeapCreate( + allocator, + capacity, + callBacks, + compareContext, ); } - late final _CFDictionaryRemoveValuePtr = _lookup< + late final _CFBinaryHeapCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, - ffi.Pointer)>>('CFDictionaryRemoveValue'); - late final _CFDictionaryRemoveValue = _CFDictionaryRemoveValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer)>(); + CFBinaryHeapRef Function( + CFAllocatorRef, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFBinaryHeapCreate'); + late final _CFBinaryHeapCreate = _CFBinaryHeapCreatePtr.asFunction< + CFBinaryHeapRef Function( + CFAllocatorRef, + int, + ffi.Pointer, + ffi.Pointer)>(); - void CFDictionaryRemoveAllValues( - CFMutableDictionaryRef theDict, + CFBinaryHeapRef CFBinaryHeapCreateCopy( + CFAllocatorRef allocator, + int capacity, + CFBinaryHeapRef heap, ) { - return _CFDictionaryRemoveAllValues( - theDict, + return _CFBinaryHeapCreateCopy( + allocator, + capacity, + heap, ); } - late final _CFDictionaryRemoveAllValuesPtr = - _lookup>( - 'CFDictionaryRemoveAllValues'); - late final _CFDictionaryRemoveAllValues = _CFDictionaryRemoveAllValuesPtr - .asFunction(); + late final _CFBinaryHeapCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFBinaryHeapRef Function(CFAllocatorRef, CFIndex, + CFBinaryHeapRef)>>('CFBinaryHeapCreateCopy'); + late final _CFBinaryHeapCreateCopy = _CFBinaryHeapCreateCopyPtr.asFunction< + CFBinaryHeapRef Function(CFAllocatorRef, int, CFBinaryHeapRef)>(); - int CFNotificationCenterGetTypeID() { - return _CFNotificationCenterGetTypeID(); + int CFBinaryHeapGetCount( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapGetCount( + heap, + ); } - late final _CFNotificationCenterGetTypeIDPtr = - _lookup>( - 'CFNotificationCenterGetTypeID'); - late final _CFNotificationCenterGetTypeID = - _CFNotificationCenterGetTypeIDPtr.asFunction(); + late final _CFBinaryHeapGetCountPtr = + _lookup>( + 'CFBinaryHeapGetCount'); + late final _CFBinaryHeapGetCount = + _CFBinaryHeapGetCountPtr.asFunction(); - CFNotificationCenterRef CFNotificationCenterGetLocalCenter() { - return _CFNotificationCenterGetLocalCenter(); + int CFBinaryHeapGetCountOfValue( + CFBinaryHeapRef heap, + ffi.Pointer value, + ) { + return _CFBinaryHeapGetCountOfValue( + heap, + value, + ); } - late final _CFNotificationCenterGetLocalCenterPtr = - _lookup>( - 'CFNotificationCenterGetLocalCenter'); - late final _CFNotificationCenterGetLocalCenter = - _CFNotificationCenterGetLocalCenterPtr.asFunction< - CFNotificationCenterRef Function()>(); + late final _CFBinaryHeapGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFBinaryHeapRef, + ffi.Pointer)>>('CFBinaryHeapGetCountOfValue'); + late final _CFBinaryHeapGetCountOfValue = _CFBinaryHeapGetCountOfValuePtr + .asFunction)>(); - CFNotificationCenterRef CFNotificationCenterGetDistributedCenter() { - return _CFNotificationCenterGetDistributedCenter(); + int CFBinaryHeapContainsValue( + CFBinaryHeapRef heap, + ffi.Pointer value, + ) { + return _CFBinaryHeapContainsValue( + heap, + value, + ); } - late final _CFNotificationCenterGetDistributedCenterPtr = - _lookup>( - 'CFNotificationCenterGetDistributedCenter'); - late final _CFNotificationCenterGetDistributedCenter = - _CFNotificationCenterGetDistributedCenterPtr.asFunction< - CFNotificationCenterRef Function()>(); + late final _CFBinaryHeapContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBinaryHeapRef, + ffi.Pointer)>>('CFBinaryHeapContainsValue'); + late final _CFBinaryHeapContainsValue = _CFBinaryHeapContainsValuePtr + .asFunction)>(); - CFNotificationCenterRef CFNotificationCenterGetDarwinNotifyCenter() { - return _CFNotificationCenterGetDarwinNotifyCenter(); + ffi.Pointer CFBinaryHeapGetMinimum( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapGetMinimum( + heap, + ); } - late final _CFNotificationCenterGetDarwinNotifyCenterPtr = - _lookup>( - 'CFNotificationCenterGetDarwinNotifyCenter'); - late final _CFNotificationCenterGetDarwinNotifyCenter = - _CFNotificationCenterGetDarwinNotifyCenterPtr.asFunction< - CFNotificationCenterRef Function()>(); + late final _CFBinaryHeapGetMinimumPtr = _lookup< + ffi.NativeFunction Function(CFBinaryHeapRef)>>( + 'CFBinaryHeapGetMinimum'); + late final _CFBinaryHeapGetMinimum = _CFBinaryHeapGetMinimumPtr.asFunction< + ffi.Pointer Function(CFBinaryHeapRef)>(); - void CFNotificationCenterAddObserver( - CFNotificationCenterRef center, - ffi.Pointer observer, - CFNotificationCallback callBack, - CFStringRef name, - ffi.Pointer object, - int suspensionBehavior, + int CFBinaryHeapGetMinimumIfPresent( + CFBinaryHeapRef heap, + ffi.Pointer> value, ) { - return _CFNotificationCenterAddObserver( - center, - observer, - callBack, - name, - object, - suspensionBehavior, + return _CFBinaryHeapGetMinimumIfPresent( + heap, + value, ); } - late final _CFNotificationCenterAddObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFNotificationCenterRef, - ffi.Pointer, - CFNotificationCallback, - CFStringRef, - ffi.Pointer, - ffi.Int32)>>('CFNotificationCenterAddObserver'); - late final _CFNotificationCenterAddObserver = - _CFNotificationCenterAddObserverPtr.asFunction< - void Function( - CFNotificationCenterRef, - ffi.Pointer, - CFNotificationCallback, - CFStringRef, - ffi.Pointer, - int)>(); + late final _CFBinaryHeapGetMinimumIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFBinaryHeapRef, ffi.Pointer>)>>( + 'CFBinaryHeapGetMinimumIfPresent'); + late final _CFBinaryHeapGetMinimumIfPresent = + _CFBinaryHeapGetMinimumIfPresentPtr.asFunction< + int Function(CFBinaryHeapRef, ffi.Pointer>)>(); - void CFNotificationCenterRemoveObserver( - CFNotificationCenterRef center, - ffi.Pointer observer, - CFNotificationName name, - ffi.Pointer object, + void CFBinaryHeapGetValues( + CFBinaryHeapRef heap, + ffi.Pointer> values, ) { - return _CFNotificationCenterRemoveObserver( - center, - observer, - name, - object, + return _CFBinaryHeapGetValues( + heap, + values, ); } - late final _CFNotificationCenterRemoveObserverPtr = _lookup< + late final _CFBinaryHeapGetValuesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFNotificationCenterRef, - ffi.Pointer, - CFNotificationName, - ffi.Pointer)>>('CFNotificationCenterRemoveObserver'); - late final _CFNotificationCenterRemoveObserver = - _CFNotificationCenterRemoveObserverPtr.asFunction< - void Function(CFNotificationCenterRef, ffi.Pointer, - CFNotificationName, ffi.Pointer)>(); + ffi.Void Function(CFBinaryHeapRef, + ffi.Pointer>)>>('CFBinaryHeapGetValues'); + late final _CFBinaryHeapGetValues = _CFBinaryHeapGetValuesPtr.asFunction< + void Function(CFBinaryHeapRef, ffi.Pointer>)>(); - void CFNotificationCenterRemoveEveryObserver( - CFNotificationCenterRef center, - ffi.Pointer observer, + void CFBinaryHeapApplyFunction( + CFBinaryHeapRef heap, + CFBinaryHeapApplierFunction applier, + ffi.Pointer context, ) { - return _CFNotificationCenterRemoveEveryObserver( - center, - observer, + return _CFBinaryHeapApplyFunction( + heap, + applier, + context, ); } - late final _CFNotificationCenterRemoveEveryObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFNotificationCenterRef, ffi.Pointer)>>( - 'CFNotificationCenterRemoveEveryObserver'); - late final _CFNotificationCenterRemoveEveryObserver = - _CFNotificationCenterRemoveEveryObserverPtr.asFunction< - void Function(CFNotificationCenterRef, ffi.Pointer)>(); + late final _CFBinaryHeapApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, + ffi.Pointer)>>('CFBinaryHeapApplyFunction'); + late final _CFBinaryHeapApplyFunction = + _CFBinaryHeapApplyFunctionPtr.asFunction< + void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, + ffi.Pointer)>(); - void CFNotificationCenterPostNotification( - CFNotificationCenterRef center, - CFNotificationName name, - ffi.Pointer object, - CFDictionaryRef userInfo, - int deliverImmediately, + void CFBinaryHeapAddValue( + CFBinaryHeapRef heap, + ffi.Pointer value, ) { - return _CFNotificationCenterPostNotification( - center, - name, - object, - userInfo, - deliverImmediately, + return _CFBinaryHeapAddValue( + heap, + value, ); } - late final _CFNotificationCenterPostNotificationPtr = _lookup< + late final _CFBinaryHeapAddValuePtr = _lookup< ffi.NativeFunction< ffi.Void Function( - CFNotificationCenterRef, - CFNotificationName, - ffi.Pointer, - CFDictionaryRef, - Boolean)>>('CFNotificationCenterPostNotification'); - late final _CFNotificationCenterPostNotification = - _CFNotificationCenterPostNotificationPtr.asFunction< - void Function(CFNotificationCenterRef, CFNotificationName, - ffi.Pointer, CFDictionaryRef, int)>(); + CFBinaryHeapRef, ffi.Pointer)>>('CFBinaryHeapAddValue'); + late final _CFBinaryHeapAddValue = _CFBinaryHeapAddValuePtr.asFunction< + void Function(CFBinaryHeapRef, ffi.Pointer)>(); - void CFNotificationCenterPostNotificationWithOptions( - CFNotificationCenterRef center, - CFNotificationName name, - ffi.Pointer object, - CFDictionaryRef userInfo, - int options, + void CFBinaryHeapRemoveMinimumValue( + CFBinaryHeapRef heap, ) { - return _CFNotificationCenterPostNotificationWithOptions( - center, - name, - object, - userInfo, - options, + return _CFBinaryHeapRemoveMinimumValue( + heap, ); } - late final _CFNotificationCenterPostNotificationWithOptionsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFNotificationCenterRef, CFNotificationName, - ffi.Pointer, CFDictionaryRef, CFOptionFlags)>>( - 'CFNotificationCenterPostNotificationWithOptions'); - late final _CFNotificationCenterPostNotificationWithOptions = - _CFNotificationCenterPostNotificationWithOptionsPtr.asFunction< - void Function(CFNotificationCenterRef, CFNotificationName, - ffi.Pointer, CFDictionaryRef, int)>(); + late final _CFBinaryHeapRemoveMinimumValuePtr = + _lookup>( + 'CFBinaryHeapRemoveMinimumValue'); + late final _CFBinaryHeapRemoveMinimumValue = + _CFBinaryHeapRemoveMinimumValuePtr.asFunction< + void Function(CFBinaryHeapRef)>(); - int CFLocaleGetTypeID() { - return _CFLocaleGetTypeID(); + void CFBinaryHeapRemoveAllValues( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapRemoveAllValues( + heap, + ); } - late final _CFLocaleGetTypeIDPtr = - _lookup>('CFLocaleGetTypeID'); - late final _CFLocaleGetTypeID = - _CFLocaleGetTypeIDPtr.asFunction(); + late final _CFBinaryHeapRemoveAllValuesPtr = + _lookup>( + 'CFBinaryHeapRemoveAllValues'); + late final _CFBinaryHeapRemoveAllValues = _CFBinaryHeapRemoveAllValuesPtr + .asFunction(); - CFLocaleRef CFLocaleGetSystem() { - return _CFLocaleGetSystem(); + int CFBitVectorGetTypeID() { + return _CFBitVectorGetTypeID(); } - late final _CFLocaleGetSystemPtr = - _lookup>('CFLocaleGetSystem'); - late final _CFLocaleGetSystem = - _CFLocaleGetSystemPtr.asFunction(); + late final _CFBitVectorGetTypeIDPtr = + _lookup>('CFBitVectorGetTypeID'); + late final _CFBitVectorGetTypeID = + _CFBitVectorGetTypeIDPtr.asFunction(); - CFLocaleRef CFLocaleCopyCurrent() { - return _CFLocaleCopyCurrent(); + CFBitVectorRef CFBitVectorCreate( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int numBits, + ) { + return _CFBitVectorCreate( + allocator, + bytes, + numBits, + ); } - late final _CFLocaleCopyCurrentPtr = - _lookup>( - 'CFLocaleCopyCurrent'); - late final _CFLocaleCopyCurrent = - _CFLocaleCopyCurrentPtr.asFunction(); + late final _CFBitVectorCreatePtr = _lookup< + ffi.NativeFunction< + CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFBitVectorCreate'); + late final _CFBitVectorCreate = _CFBitVectorCreatePtr.asFunction< + CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - CFArrayRef CFLocaleCopyAvailableLocaleIdentifiers() { - return _CFLocaleCopyAvailableLocaleIdentifiers(); + CFBitVectorRef CFBitVectorCreateCopy( + CFAllocatorRef allocator, + CFBitVectorRef bv, + ) { + return _CFBitVectorCreateCopy( + allocator, + bv, + ); } - late final _CFLocaleCopyAvailableLocaleIdentifiersPtr = - _lookup>( - 'CFLocaleCopyAvailableLocaleIdentifiers'); - late final _CFLocaleCopyAvailableLocaleIdentifiers = - _CFLocaleCopyAvailableLocaleIdentifiersPtr.asFunction< - CFArrayRef Function()>(); - - CFArrayRef CFLocaleCopyISOLanguageCodes() { - return _CFLocaleCopyISOLanguageCodes(); - } - - late final _CFLocaleCopyISOLanguageCodesPtr = - _lookup>( - 'CFLocaleCopyISOLanguageCodes'); - late final _CFLocaleCopyISOLanguageCodes = - _CFLocaleCopyISOLanguageCodesPtr.asFunction(); - - CFArrayRef CFLocaleCopyISOCountryCodes() { - return _CFLocaleCopyISOCountryCodes(); - } - - late final _CFLocaleCopyISOCountryCodesPtr = - _lookup>( - 'CFLocaleCopyISOCountryCodes'); - late final _CFLocaleCopyISOCountryCodes = - _CFLocaleCopyISOCountryCodesPtr.asFunction(); - - CFArrayRef CFLocaleCopyISOCurrencyCodes() { - return _CFLocaleCopyISOCurrencyCodes(); - } - - late final _CFLocaleCopyISOCurrencyCodesPtr = - _lookup>( - 'CFLocaleCopyISOCurrencyCodes'); - late final _CFLocaleCopyISOCurrencyCodes = - _CFLocaleCopyISOCurrencyCodesPtr.asFunction(); - - CFArrayRef CFLocaleCopyCommonISOCurrencyCodes() { - return _CFLocaleCopyCommonISOCurrencyCodes(); - } - - late final _CFLocaleCopyCommonISOCurrencyCodesPtr = - _lookup>( - 'CFLocaleCopyCommonISOCurrencyCodes'); - late final _CFLocaleCopyCommonISOCurrencyCodes = - _CFLocaleCopyCommonISOCurrencyCodesPtr.asFunction< - CFArrayRef Function()>(); - - CFArrayRef CFLocaleCopyPreferredLanguages() { - return _CFLocaleCopyPreferredLanguages(); - } - - late final _CFLocaleCopyPreferredLanguagesPtr = - _lookup>( - 'CFLocaleCopyPreferredLanguages'); - late final _CFLocaleCopyPreferredLanguages = - _CFLocaleCopyPreferredLanguagesPtr.asFunction(); + late final _CFBitVectorCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFBitVectorRef Function( + CFAllocatorRef, CFBitVectorRef)>>('CFBitVectorCreateCopy'); + late final _CFBitVectorCreateCopy = _CFBitVectorCreateCopyPtr.asFunction< + CFBitVectorRef Function(CFAllocatorRef, CFBitVectorRef)>(); - CFLocaleIdentifier CFLocaleCreateCanonicalLanguageIdentifierFromString( + CFMutableBitVectorRef CFBitVectorCreateMutable( CFAllocatorRef allocator, - CFStringRef localeIdentifier, + int capacity, ) { - return _CFLocaleCreateCanonicalLanguageIdentifierFromString( + return _CFBitVectorCreateMutable( allocator, - localeIdentifier, + capacity, ); } - late final _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( - 'CFLocaleCreateCanonicalLanguageIdentifierFromString'); - late final _CFLocaleCreateCanonicalLanguageIdentifierFromString = - _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); + late final _CFBitVectorCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableBitVectorRef Function( + CFAllocatorRef, CFIndex)>>('CFBitVectorCreateMutable'); + late final _CFBitVectorCreateMutable = _CFBitVectorCreateMutablePtr + .asFunction(); - CFLocaleIdentifier CFLocaleCreateCanonicalLocaleIdentifierFromString( + CFMutableBitVectorRef CFBitVectorCreateMutableCopy( CFAllocatorRef allocator, - CFStringRef localeIdentifier, + int capacity, + CFBitVectorRef bv, ) { - return _CFLocaleCreateCanonicalLocaleIdentifierFromString( + return _CFBitVectorCreateMutableCopy( allocator, - localeIdentifier, + capacity, + bv, ); } - late final _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( - 'CFLocaleCreateCanonicalLocaleIdentifierFromString'); - late final _CFLocaleCreateCanonicalLocaleIdentifierFromString = - _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); + late final _CFBitVectorCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableBitVectorRef Function(CFAllocatorRef, CFIndex, + CFBitVectorRef)>>('CFBitVectorCreateMutableCopy'); + late final _CFBitVectorCreateMutableCopy = + _CFBitVectorCreateMutableCopyPtr.asFunction< + CFMutableBitVectorRef Function( + CFAllocatorRef, int, CFBitVectorRef)>(); - CFLocaleIdentifier - CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( - CFAllocatorRef allocator, - int lcode, - int rcode, + int CFBitVectorGetCount( + CFBitVectorRef bv, ) { - return _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( - allocator, - lcode, - rcode, + return _CFBitVectorGetCount( + bv, ); } - late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr = - _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function( - CFAllocatorRef, LangCode, RegionCode)>>( - 'CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes'); - late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes = - _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr - .asFunction(); + late final _CFBitVectorGetCountPtr = + _lookup>( + 'CFBitVectorGetCount'); + late final _CFBitVectorGetCount = + _CFBitVectorGetCountPtr.asFunction(); - CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( - CFAllocatorRef allocator, - int lcid, + int CFBitVectorGetCountOfBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( - allocator, - lcid, + return _CFBitVectorGetCountOfBit( + bv, + range, + value, ); } - late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, ffi.Uint32)>>( - 'CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode'); - late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode = - _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, int)>(); + late final _CFBitVectorGetCountOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetCountOfBit'); + late final _CFBitVectorGetCountOfBit = _CFBitVectorGetCountOfBitPtr + .asFunction(); - int CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( - CFLocaleIdentifier localeIdentifier, + int CFBitVectorContainsBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( - localeIdentifier, + return _CFBitVectorContainsBit( + bv, + range, + value, ); } - late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr = - _lookup>( - 'CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier'); - late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier = - _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr.asFunction< - int Function(CFLocaleIdentifier)>(); + late final _CFBitVectorContainsBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorContainsBit'); + late final _CFBitVectorContainsBit = _CFBitVectorContainsBitPtr.asFunction< + int Function(CFBitVectorRef, CFRange, int)>(); - int CFLocaleGetLanguageCharacterDirection( - CFStringRef isoLangCode, + int CFBitVectorGetBitAtIndex( + CFBitVectorRef bv, + int idx, ) { - return _CFLocaleGetLanguageCharacterDirection( - isoLangCode, + return _CFBitVectorGetBitAtIndex( + bv, + idx, ); } - late final _CFLocaleGetLanguageCharacterDirectionPtr = - _lookup>( - 'CFLocaleGetLanguageCharacterDirection'); - late final _CFLocaleGetLanguageCharacterDirection = - _CFLocaleGetLanguageCharacterDirectionPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFBitVectorGetBitAtIndexPtr = + _lookup>( + 'CFBitVectorGetBitAtIndex'); + late final _CFBitVectorGetBitAtIndex = _CFBitVectorGetBitAtIndexPtr + .asFunction(); - int CFLocaleGetLanguageLineDirection( - CFStringRef isoLangCode, + void CFBitVectorGetBits( + CFBitVectorRef bv, + CFRange range, + ffi.Pointer bytes, ) { - return _CFLocaleGetLanguageLineDirection( - isoLangCode, + return _CFBitVectorGetBits( + bv, + range, + bytes, ); } - late final _CFLocaleGetLanguageLineDirectionPtr = - _lookup>( - 'CFLocaleGetLanguageLineDirection'); - late final _CFLocaleGetLanguageLineDirection = - _CFLocaleGetLanguageLineDirectionPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFBitVectorGetBitsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBitVectorRef, CFRange, + ffi.Pointer)>>('CFBitVectorGetBits'); + late final _CFBitVectorGetBits = _CFBitVectorGetBitsPtr.asFunction< + void Function(CFBitVectorRef, CFRange, ffi.Pointer)>(); - CFDictionaryRef CFLocaleCreateComponentsFromLocaleIdentifier( - CFAllocatorRef allocator, - CFLocaleIdentifier localeID, + int CFBitVectorGetFirstIndexOfBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleCreateComponentsFromLocaleIdentifier( - allocator, - localeID, + return _CFBitVectorGetFirstIndexOfBit( + bv, + range, + value, ); } - late final _CFLocaleCreateComponentsFromLocaleIdentifierPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>>( - 'CFLocaleCreateComponentsFromLocaleIdentifier'); - late final _CFLocaleCreateComponentsFromLocaleIdentifier = - _CFLocaleCreateComponentsFromLocaleIdentifierPtr.asFunction< - CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); + late final _CFBitVectorGetFirstIndexOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetFirstIndexOfBit'); + late final _CFBitVectorGetFirstIndexOfBit = _CFBitVectorGetFirstIndexOfBitPtr + .asFunction(); - CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromComponents( - CFAllocatorRef allocator, - CFDictionaryRef dictionary, + int CFBitVectorGetLastIndexOfBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleCreateLocaleIdentifierFromComponents( - allocator, - dictionary, + return _CFBitVectorGetLastIndexOfBit( + bv, + range, + value, ); } - late final _CFLocaleCreateLocaleIdentifierFromComponentsPtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>>( - 'CFLocaleCreateLocaleIdentifierFromComponents'); - late final _CFLocaleCreateLocaleIdentifierFromComponents = - _CFLocaleCreateLocaleIdentifierFromComponentsPtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>(); + late final _CFBitVectorGetLastIndexOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetLastIndexOfBit'); + late final _CFBitVectorGetLastIndexOfBit = _CFBitVectorGetLastIndexOfBitPtr + .asFunction(); - CFLocaleRef CFLocaleCreate( - CFAllocatorRef allocator, - CFLocaleIdentifier localeIdentifier, + void CFBitVectorSetCount( + CFMutableBitVectorRef bv, + int count, ) { - return _CFLocaleCreate( - allocator, - localeIdentifier, + return _CFBitVectorSetCount( + bv, + count, ); } - late final _CFLocaleCreatePtr = _lookup< + late final _CFBitVectorSetCountPtr = _lookup< ffi.NativeFunction< - CFLocaleRef Function( - CFAllocatorRef, CFLocaleIdentifier)>>('CFLocaleCreate'); - late final _CFLocaleCreate = _CFLocaleCreatePtr.asFunction< - CFLocaleRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); + ffi.Void Function( + CFMutableBitVectorRef, CFIndex)>>('CFBitVectorSetCount'); + late final _CFBitVectorSetCount = _CFBitVectorSetCountPtr.asFunction< + void Function(CFMutableBitVectorRef, int)>(); - CFLocaleRef CFLocaleCreateCopy( - CFAllocatorRef allocator, - CFLocaleRef locale, + void CFBitVectorFlipBitAtIndex( + CFMutableBitVectorRef bv, + int idx, ) { - return _CFLocaleCreateCopy( - allocator, - locale, + return _CFBitVectorFlipBitAtIndex( + bv, + idx, ); } - late final _CFLocaleCreateCopyPtr = _lookup< + late final _CFBitVectorFlipBitAtIndexPtr = _lookup< ffi.NativeFunction< - CFLocaleRef Function( - CFAllocatorRef, CFLocaleRef)>>('CFLocaleCreateCopy'); - late final _CFLocaleCreateCopy = _CFLocaleCreateCopyPtr.asFunction< - CFLocaleRef Function(CFAllocatorRef, CFLocaleRef)>(); + ffi.Void Function( + CFMutableBitVectorRef, CFIndex)>>('CFBitVectorFlipBitAtIndex'); + late final _CFBitVectorFlipBitAtIndex = _CFBitVectorFlipBitAtIndexPtr + .asFunction(); - CFLocaleIdentifier CFLocaleGetIdentifier( - CFLocaleRef locale, + void CFBitVectorFlipBits( + CFMutableBitVectorRef bv, + CFRange range, ) { - return _CFLocaleGetIdentifier( - locale, + return _CFBitVectorFlipBits( + bv, + range, ); } - late final _CFLocaleGetIdentifierPtr = - _lookup>( - 'CFLocaleGetIdentifier'); - late final _CFLocaleGetIdentifier = _CFLocaleGetIdentifierPtr.asFunction< - CFLocaleIdentifier Function(CFLocaleRef)>(); + late final _CFBitVectorFlipBitsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBitVectorRef, CFRange)>>('CFBitVectorFlipBits'); + late final _CFBitVectorFlipBits = _CFBitVectorFlipBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, CFRange)>(); - CFTypeRef CFLocaleGetValue( - CFLocaleRef locale, - CFLocaleKey key, + void CFBitVectorSetBitAtIndex( + CFMutableBitVectorRef bv, + int idx, + int value, ) { - return _CFLocaleGetValue( - locale, - key, + return _CFBitVectorSetBitAtIndex( + bv, + idx, + value, ); } - late final _CFLocaleGetValuePtr = - _lookup>( - 'CFLocaleGetValue'); - late final _CFLocaleGetValue = _CFLocaleGetValuePtr.asFunction< - CFTypeRef Function(CFLocaleRef, CFLocaleKey)>(); + late final _CFBitVectorSetBitAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableBitVectorRef, CFIndex, + CFBit)>>('CFBitVectorSetBitAtIndex'); + late final _CFBitVectorSetBitAtIndex = _CFBitVectorSetBitAtIndexPtr + .asFunction(); - CFStringRef CFLocaleCopyDisplayNameForPropertyValue( - CFLocaleRef displayLocale, - CFLocaleKey key, - CFStringRef value, + void CFBitVectorSetBits( + CFMutableBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleCopyDisplayNameForPropertyValue( - displayLocale, - key, + return _CFBitVectorSetBits( + bv, + range, value, ); } - late final _CFLocaleCopyDisplayNameForPropertyValuePtr = _lookup< + late final _CFBitVectorSetBitsPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFLocaleRef, CFLocaleKey, - CFStringRef)>>('CFLocaleCopyDisplayNameForPropertyValue'); - late final _CFLocaleCopyDisplayNameForPropertyValue = - _CFLocaleCopyDisplayNameForPropertyValuePtr.asFunction< - CFStringRef Function(CFLocaleRef, CFLocaleKey, CFStringRef)>(); - - late final ffi.Pointer - _kCFLocaleCurrentLocaleDidChangeNotification = - _lookup( - 'kCFLocaleCurrentLocaleDidChangeNotification'); + ffi.Void Function( + CFMutableBitVectorRef, CFRange, CFBit)>>('CFBitVectorSetBits'); + late final _CFBitVectorSetBits = _CFBitVectorSetBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, CFRange, int)>(); - CFNotificationName get kCFLocaleCurrentLocaleDidChangeNotification => - _kCFLocaleCurrentLocaleDidChangeNotification.value; + void CFBitVectorSetAllBits( + CFMutableBitVectorRef bv, + int value, + ) { + return _CFBitVectorSetAllBits( + bv, + value, + ); + } - set kCFLocaleCurrentLocaleDidChangeNotification(CFNotificationName value) => - _kCFLocaleCurrentLocaleDidChangeNotification.value = value; + late final _CFBitVectorSetAllBitsPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorSetAllBits'); + late final _CFBitVectorSetAllBits = _CFBitVectorSetAllBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, int)>(); - late final ffi.Pointer _kCFLocaleIdentifier = - _lookup('kCFLocaleIdentifier'); + late final ffi.Pointer + _kCFTypeDictionaryKeyCallBacks = + _lookup('kCFTypeDictionaryKeyCallBacks'); - CFLocaleKey get kCFLocaleIdentifier => _kCFLocaleIdentifier.value; + CFDictionaryKeyCallBacks get kCFTypeDictionaryKeyCallBacks => + _kCFTypeDictionaryKeyCallBacks.ref; - set kCFLocaleIdentifier(CFLocaleKey value) => - _kCFLocaleIdentifier.value = value; + late final ffi.Pointer + _kCFCopyStringDictionaryKeyCallBacks = + _lookup('kCFCopyStringDictionaryKeyCallBacks'); - late final ffi.Pointer _kCFLocaleLanguageCode = - _lookup('kCFLocaleLanguageCode'); + CFDictionaryKeyCallBacks get kCFCopyStringDictionaryKeyCallBacks => + _kCFCopyStringDictionaryKeyCallBacks.ref; - CFLocaleKey get kCFLocaleLanguageCode => _kCFLocaleLanguageCode.value; + late final ffi.Pointer + _kCFTypeDictionaryValueCallBacks = + _lookup('kCFTypeDictionaryValueCallBacks'); - set kCFLocaleLanguageCode(CFLocaleKey value) => - _kCFLocaleLanguageCode.value = value; + CFDictionaryValueCallBacks get kCFTypeDictionaryValueCallBacks => + _kCFTypeDictionaryValueCallBacks.ref; - late final ffi.Pointer _kCFLocaleCountryCode = - _lookup('kCFLocaleCountryCode'); + int CFDictionaryGetTypeID() { + return _CFDictionaryGetTypeID(); + } - CFLocaleKey get kCFLocaleCountryCode => _kCFLocaleCountryCode.value; + late final _CFDictionaryGetTypeIDPtr = + _lookup>('CFDictionaryGetTypeID'); + late final _CFDictionaryGetTypeID = + _CFDictionaryGetTypeIDPtr.asFunction(); - set kCFLocaleCountryCode(CFLocaleKey value) => - _kCFLocaleCountryCode.value = value; + CFDictionaryRef CFDictionaryCreate( + CFAllocatorRef allocator, + ffi.Pointer> keys, + ffi.Pointer> values, + int numValues, + ffi.Pointer keyCallBacks, + ffi.Pointer valueCallBacks, + ) { + return _CFDictionaryCreate( + allocator, + keys, + values, + numValues, + keyCallBacks, + valueCallBacks, + ); + } - late final ffi.Pointer _kCFLocaleScriptCode = - _lookup('kCFLocaleScriptCode'); + late final _CFDictionaryCreatePtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function( + CFAllocatorRef, + ffi.Pointer>, + ffi.Pointer>, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFDictionaryCreate'); + late final _CFDictionaryCreate = _CFDictionaryCreatePtr.asFunction< + CFDictionaryRef Function( + CFAllocatorRef, + ffi.Pointer>, + ffi.Pointer>, + int, + ffi.Pointer, + ffi.Pointer)>(); - CFLocaleKey get kCFLocaleScriptCode => _kCFLocaleScriptCode.value; + CFDictionaryRef CFDictionaryCreateCopy( + CFAllocatorRef allocator, + CFDictionaryRef theDict, + ) { + return _CFDictionaryCreateCopy( + allocator, + theDict, + ); + } - set kCFLocaleScriptCode(CFLocaleKey value) => - _kCFLocaleScriptCode.value = value; + late final _CFDictionaryCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function( + CFAllocatorRef, CFDictionaryRef)>>('CFDictionaryCreateCopy'); + late final _CFDictionaryCreateCopy = _CFDictionaryCreateCopyPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFDictionaryRef)>(); - late final ffi.Pointer _kCFLocaleVariantCode = - _lookup('kCFLocaleVariantCode'); - - CFLocaleKey get kCFLocaleVariantCode => _kCFLocaleVariantCode.value; - - set kCFLocaleVariantCode(CFLocaleKey value) => - _kCFLocaleVariantCode.value = value; - - late final ffi.Pointer _kCFLocaleExemplarCharacterSet = - _lookup('kCFLocaleExemplarCharacterSet'); - - CFLocaleKey get kCFLocaleExemplarCharacterSet => - _kCFLocaleExemplarCharacterSet.value; - - set kCFLocaleExemplarCharacterSet(CFLocaleKey value) => - _kCFLocaleExemplarCharacterSet.value = value; - - late final ffi.Pointer _kCFLocaleCalendarIdentifier = - _lookup('kCFLocaleCalendarIdentifier'); - - CFLocaleKey get kCFLocaleCalendarIdentifier => - _kCFLocaleCalendarIdentifier.value; - - set kCFLocaleCalendarIdentifier(CFLocaleKey value) => - _kCFLocaleCalendarIdentifier.value = value; - - late final ffi.Pointer _kCFLocaleCalendar = - _lookup('kCFLocaleCalendar'); - - CFLocaleKey get kCFLocaleCalendar => _kCFLocaleCalendar.value; - - set kCFLocaleCalendar(CFLocaleKey value) => _kCFLocaleCalendar.value = value; - - late final ffi.Pointer _kCFLocaleCollationIdentifier = - _lookup('kCFLocaleCollationIdentifier'); - - CFLocaleKey get kCFLocaleCollationIdentifier => - _kCFLocaleCollationIdentifier.value; - - set kCFLocaleCollationIdentifier(CFLocaleKey value) => - _kCFLocaleCollationIdentifier.value = value; - - late final ffi.Pointer _kCFLocaleUsesMetricSystem = - _lookup('kCFLocaleUsesMetricSystem'); - - CFLocaleKey get kCFLocaleUsesMetricSystem => _kCFLocaleUsesMetricSystem.value; - - set kCFLocaleUsesMetricSystem(CFLocaleKey value) => - _kCFLocaleUsesMetricSystem.value = value; - - late final ffi.Pointer _kCFLocaleMeasurementSystem = - _lookup('kCFLocaleMeasurementSystem'); - - CFLocaleKey get kCFLocaleMeasurementSystem => - _kCFLocaleMeasurementSystem.value; - - set kCFLocaleMeasurementSystem(CFLocaleKey value) => - _kCFLocaleMeasurementSystem.value = value; - - late final ffi.Pointer _kCFLocaleDecimalSeparator = - _lookup('kCFLocaleDecimalSeparator'); - - CFLocaleKey get kCFLocaleDecimalSeparator => _kCFLocaleDecimalSeparator.value; - - set kCFLocaleDecimalSeparator(CFLocaleKey value) => - _kCFLocaleDecimalSeparator.value = value; - - late final ffi.Pointer _kCFLocaleGroupingSeparator = - _lookup('kCFLocaleGroupingSeparator'); - - CFLocaleKey get kCFLocaleGroupingSeparator => - _kCFLocaleGroupingSeparator.value; - - set kCFLocaleGroupingSeparator(CFLocaleKey value) => - _kCFLocaleGroupingSeparator.value = value; - - late final ffi.Pointer _kCFLocaleCurrencySymbol = - _lookup('kCFLocaleCurrencySymbol'); - - CFLocaleKey get kCFLocaleCurrencySymbol => _kCFLocaleCurrencySymbol.value; - - set kCFLocaleCurrencySymbol(CFLocaleKey value) => - _kCFLocaleCurrencySymbol.value = value; - - late final ffi.Pointer _kCFLocaleCurrencyCode = - _lookup('kCFLocaleCurrencyCode'); - - CFLocaleKey get kCFLocaleCurrencyCode => _kCFLocaleCurrencyCode.value; - - set kCFLocaleCurrencyCode(CFLocaleKey value) => - _kCFLocaleCurrencyCode.value = value; - - late final ffi.Pointer _kCFLocaleCollatorIdentifier = - _lookup('kCFLocaleCollatorIdentifier'); - - CFLocaleKey get kCFLocaleCollatorIdentifier => - _kCFLocaleCollatorIdentifier.value; - - set kCFLocaleCollatorIdentifier(CFLocaleKey value) => - _kCFLocaleCollatorIdentifier.value = value; - - late final ffi.Pointer _kCFLocaleQuotationBeginDelimiterKey = - _lookup('kCFLocaleQuotationBeginDelimiterKey'); - - CFLocaleKey get kCFLocaleQuotationBeginDelimiterKey => - _kCFLocaleQuotationBeginDelimiterKey.value; - - set kCFLocaleQuotationBeginDelimiterKey(CFLocaleKey value) => - _kCFLocaleQuotationBeginDelimiterKey.value = value; - - late final ffi.Pointer _kCFLocaleQuotationEndDelimiterKey = - _lookup('kCFLocaleQuotationEndDelimiterKey'); - - CFLocaleKey get kCFLocaleQuotationEndDelimiterKey => - _kCFLocaleQuotationEndDelimiterKey.value; - - set kCFLocaleQuotationEndDelimiterKey(CFLocaleKey value) => - _kCFLocaleQuotationEndDelimiterKey.value = value; - - late final ffi.Pointer - _kCFLocaleAlternateQuotationBeginDelimiterKey = - _lookup('kCFLocaleAlternateQuotationBeginDelimiterKey'); - - CFLocaleKey get kCFLocaleAlternateQuotationBeginDelimiterKey => - _kCFLocaleAlternateQuotationBeginDelimiterKey.value; - - set kCFLocaleAlternateQuotationBeginDelimiterKey(CFLocaleKey value) => - _kCFLocaleAlternateQuotationBeginDelimiterKey.value = value; - - late final ffi.Pointer - _kCFLocaleAlternateQuotationEndDelimiterKey = - _lookup('kCFLocaleAlternateQuotationEndDelimiterKey'); - - CFLocaleKey get kCFLocaleAlternateQuotationEndDelimiterKey => - _kCFLocaleAlternateQuotationEndDelimiterKey.value; - - set kCFLocaleAlternateQuotationEndDelimiterKey(CFLocaleKey value) => - _kCFLocaleAlternateQuotationEndDelimiterKey.value = value; - - late final ffi.Pointer _kCFGregorianCalendar = - _lookup('kCFGregorianCalendar'); - - CFCalendarIdentifier get kCFGregorianCalendar => _kCFGregorianCalendar.value; - - set kCFGregorianCalendar(CFCalendarIdentifier value) => - _kCFGregorianCalendar.value = value; - - late final ffi.Pointer _kCFBuddhistCalendar = - _lookup('kCFBuddhistCalendar'); - - CFCalendarIdentifier get kCFBuddhistCalendar => _kCFBuddhistCalendar.value; - - set kCFBuddhistCalendar(CFCalendarIdentifier value) => - _kCFBuddhistCalendar.value = value; - - late final ffi.Pointer _kCFChineseCalendar = - _lookup('kCFChineseCalendar'); - - CFCalendarIdentifier get kCFChineseCalendar => _kCFChineseCalendar.value; - - set kCFChineseCalendar(CFCalendarIdentifier value) => - _kCFChineseCalendar.value = value; - - late final ffi.Pointer _kCFHebrewCalendar = - _lookup('kCFHebrewCalendar'); - - CFCalendarIdentifier get kCFHebrewCalendar => _kCFHebrewCalendar.value; - - set kCFHebrewCalendar(CFCalendarIdentifier value) => - _kCFHebrewCalendar.value = value; - - late final ffi.Pointer _kCFIslamicCalendar = - _lookup('kCFIslamicCalendar'); - - CFCalendarIdentifier get kCFIslamicCalendar => _kCFIslamicCalendar.value; - - set kCFIslamicCalendar(CFCalendarIdentifier value) => - _kCFIslamicCalendar.value = value; - - late final ffi.Pointer _kCFIslamicCivilCalendar = - _lookup('kCFIslamicCivilCalendar'); - - CFCalendarIdentifier get kCFIslamicCivilCalendar => - _kCFIslamicCivilCalendar.value; - - set kCFIslamicCivilCalendar(CFCalendarIdentifier value) => - _kCFIslamicCivilCalendar.value = value; - - late final ffi.Pointer _kCFJapaneseCalendar = - _lookup('kCFJapaneseCalendar'); - - CFCalendarIdentifier get kCFJapaneseCalendar => _kCFJapaneseCalendar.value; - - set kCFJapaneseCalendar(CFCalendarIdentifier value) => - _kCFJapaneseCalendar.value = value; - - late final ffi.Pointer _kCFRepublicOfChinaCalendar = - _lookup('kCFRepublicOfChinaCalendar'); - - CFCalendarIdentifier get kCFRepublicOfChinaCalendar => - _kCFRepublicOfChinaCalendar.value; - - set kCFRepublicOfChinaCalendar(CFCalendarIdentifier value) => - _kCFRepublicOfChinaCalendar.value = value; - - late final ffi.Pointer _kCFPersianCalendar = - _lookup('kCFPersianCalendar'); - - CFCalendarIdentifier get kCFPersianCalendar => _kCFPersianCalendar.value; - - set kCFPersianCalendar(CFCalendarIdentifier value) => - _kCFPersianCalendar.value = value; - - late final ffi.Pointer _kCFIndianCalendar = - _lookup('kCFIndianCalendar'); - - CFCalendarIdentifier get kCFIndianCalendar => _kCFIndianCalendar.value; - - set kCFIndianCalendar(CFCalendarIdentifier value) => - _kCFIndianCalendar.value = value; - - late final ffi.Pointer _kCFISO8601Calendar = - _lookup('kCFISO8601Calendar'); - - CFCalendarIdentifier get kCFISO8601Calendar => _kCFISO8601Calendar.value; - - set kCFISO8601Calendar(CFCalendarIdentifier value) => - _kCFISO8601Calendar.value = value; - - late final ffi.Pointer _kCFIslamicTabularCalendar = - _lookup('kCFIslamicTabularCalendar'); - - CFCalendarIdentifier get kCFIslamicTabularCalendar => - _kCFIslamicTabularCalendar.value; - - set kCFIslamicTabularCalendar(CFCalendarIdentifier value) => - _kCFIslamicTabularCalendar.value = value; - - late final ffi.Pointer _kCFIslamicUmmAlQuraCalendar = - _lookup('kCFIslamicUmmAlQuraCalendar'); - - CFCalendarIdentifier get kCFIslamicUmmAlQuraCalendar => - _kCFIslamicUmmAlQuraCalendar.value; - - set kCFIslamicUmmAlQuraCalendar(CFCalendarIdentifier value) => - _kCFIslamicUmmAlQuraCalendar.value = value; - - double CFAbsoluteTimeGetCurrent() { - return _CFAbsoluteTimeGetCurrent(); - } - - late final _CFAbsoluteTimeGetCurrentPtr = - _lookup>( - 'CFAbsoluteTimeGetCurrent'); - late final _CFAbsoluteTimeGetCurrent = - _CFAbsoluteTimeGetCurrentPtr.asFunction(); - - late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1970 = - _lookup('kCFAbsoluteTimeIntervalSince1970'); - - double get kCFAbsoluteTimeIntervalSince1970 => - _kCFAbsoluteTimeIntervalSince1970.value; - - set kCFAbsoluteTimeIntervalSince1970(double value) => - _kCFAbsoluteTimeIntervalSince1970.value = value; - - late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1904 = - _lookup('kCFAbsoluteTimeIntervalSince1904'); - - double get kCFAbsoluteTimeIntervalSince1904 => - _kCFAbsoluteTimeIntervalSince1904.value; - - set kCFAbsoluteTimeIntervalSince1904(double value) => - _kCFAbsoluteTimeIntervalSince1904.value = value; - - int CFDateGetTypeID() { - return _CFDateGetTypeID(); + CFMutableDictionaryRef CFDictionaryCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer keyCallBacks, + ffi.Pointer valueCallBacks, + ) { + return _CFDictionaryCreateMutable( + allocator, + capacity, + keyCallBacks, + valueCallBacks, + ); } - late final _CFDateGetTypeIDPtr = - _lookup>('CFDateGetTypeID'); - late final _CFDateGetTypeID = - _CFDateGetTypeIDPtr.asFunction(); + late final _CFDictionaryCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>( + 'CFDictionaryCreateMutable'); + late final _CFDictionaryCreateMutable = + _CFDictionaryCreateMutablePtr.asFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, + int, + ffi.Pointer, + ffi.Pointer)>(); - CFDateRef CFDateCreate( + CFMutableDictionaryRef CFDictionaryCreateMutableCopy( CFAllocatorRef allocator, - double at, + int capacity, + CFDictionaryRef theDict, ) { - return _CFDateCreate( + return _CFDictionaryCreateMutableCopy( allocator, - at, + capacity, + theDict, ); } - late final _CFDateCreatePtr = _lookup< + late final _CFDictionaryCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - CFDateRef Function(CFAllocatorRef, CFAbsoluteTime)>>('CFDateCreate'); - late final _CFDateCreate = - _CFDateCreatePtr.asFunction(); + CFMutableDictionaryRef Function(CFAllocatorRef, CFIndex, + CFDictionaryRef)>>('CFDictionaryCreateMutableCopy'); + late final _CFDictionaryCreateMutableCopy = + _CFDictionaryCreateMutableCopyPtr.asFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, int, CFDictionaryRef)>(); - double CFDateGetAbsoluteTime( - CFDateRef theDate, + int CFDictionaryGetCount( + CFDictionaryRef theDict, ) { - return _CFDateGetAbsoluteTime( - theDate, + return _CFDictionaryGetCount( + theDict, ); } - late final _CFDateGetAbsoluteTimePtr = - _lookup>( - 'CFDateGetAbsoluteTime'); - late final _CFDateGetAbsoluteTime = - _CFDateGetAbsoluteTimePtr.asFunction(); + late final _CFDictionaryGetCountPtr = + _lookup>( + 'CFDictionaryGetCount'); + late final _CFDictionaryGetCount = + _CFDictionaryGetCountPtr.asFunction(); - double CFDateGetTimeIntervalSinceDate( - CFDateRef theDate, - CFDateRef otherDate, + int CFDictionaryGetCountOfKey( + CFDictionaryRef theDict, + ffi.Pointer key, ) { - return _CFDateGetTimeIntervalSinceDate( - theDate, - otherDate, + return _CFDictionaryGetCountOfKey( + theDict, + key, ); } - late final _CFDateGetTimeIntervalSinceDatePtr = _lookup< - ffi.NativeFunction>( - 'CFDateGetTimeIntervalSinceDate'); - late final _CFDateGetTimeIntervalSinceDate = - _CFDateGetTimeIntervalSinceDatePtr.asFunction< - double Function(CFDateRef, CFDateRef)>(); + late final _CFDictionaryGetCountOfKeyPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryGetCountOfKey'); + late final _CFDictionaryGetCountOfKey = _CFDictionaryGetCountOfKeyPtr + .asFunction)>(); - int CFDateCompare( - CFDateRef theDate, - CFDateRef otherDate, - ffi.Pointer context, + int CFDictionaryGetCountOfValue( + CFDictionaryRef theDict, + ffi.Pointer value, ) { - return _CFDateCompare( - theDate, - otherDate, - context, + return _CFDictionaryGetCountOfValue( + theDict, + value, ); } - late final _CFDateComparePtr = _lookup< + late final _CFDictionaryGetCountOfValuePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - CFDateRef, CFDateRef, ffi.Pointer)>>('CFDateCompare'); - late final _CFDateCompare = _CFDateComparePtr.asFunction< - int Function(CFDateRef, CFDateRef, ffi.Pointer)>(); + CFIndex Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryGetCountOfValue'); + late final _CFDictionaryGetCountOfValue = _CFDictionaryGetCountOfValuePtr + .asFunction)>(); - int CFGregorianDateIsValid( - CFGregorianDate gdate, - int unitFlags, + int CFDictionaryContainsKey( + CFDictionaryRef theDict, + ffi.Pointer key, ) { - return _CFGregorianDateIsValid( - gdate, - unitFlags, + return _CFDictionaryContainsKey( + theDict, + key, ); } - late final _CFGregorianDateIsValidPtr = _lookup< - ffi.NativeFunction>( - 'CFGregorianDateIsValid'); - late final _CFGregorianDateIsValid = _CFGregorianDateIsValidPtr.asFunction< - int Function(CFGregorianDate, int)>(); + late final _CFDictionaryContainsKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryContainsKey'); + late final _CFDictionaryContainsKey = _CFDictionaryContainsKeyPtr.asFunction< + int Function(CFDictionaryRef, ffi.Pointer)>(); - double CFGregorianDateGetAbsoluteTime( - CFGregorianDate gdate, - CFTimeZoneRef tz, + int CFDictionaryContainsValue( + CFDictionaryRef theDict, + ffi.Pointer value, ) { - return _CFGregorianDateGetAbsoluteTime( - gdate, - tz, + return _CFDictionaryContainsValue( + theDict, + value, ); } - late final _CFGregorianDateGetAbsoluteTimePtr = _lookup< + late final _CFDictionaryContainsValuePtr = _lookup< ffi.NativeFunction< - CFAbsoluteTime Function(CFGregorianDate, - CFTimeZoneRef)>>('CFGregorianDateGetAbsoluteTime'); - late final _CFGregorianDateGetAbsoluteTime = - _CFGregorianDateGetAbsoluteTimePtr.asFunction< - double Function(CFGregorianDate, CFTimeZoneRef)>(); + Boolean Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryContainsValue'); + late final _CFDictionaryContainsValue = _CFDictionaryContainsValuePtr + .asFunction)>(); - CFGregorianDate CFAbsoluteTimeGetGregorianDate( - double at, - CFTimeZoneRef tz, + ffi.Pointer CFDictionaryGetValue( + CFDictionaryRef theDict, + ffi.Pointer key, ) { - return _CFAbsoluteTimeGetGregorianDate( - at, - tz, + return _CFDictionaryGetValue( + theDict, + key, ); } - late final _CFAbsoluteTimeGetGregorianDatePtr = _lookup< + late final _CFDictionaryGetValuePtr = _lookup< ffi.NativeFunction< - CFGregorianDate Function(CFAbsoluteTime, - CFTimeZoneRef)>>('CFAbsoluteTimeGetGregorianDate'); - late final _CFAbsoluteTimeGetGregorianDate = - _CFAbsoluteTimeGetGregorianDatePtr.asFunction< - CFGregorianDate Function(double, CFTimeZoneRef)>(); + ffi.Pointer Function( + CFDictionaryRef, ffi.Pointer)>>('CFDictionaryGetValue'); + late final _CFDictionaryGetValue = _CFDictionaryGetValuePtr.asFunction< + ffi.Pointer Function(CFDictionaryRef, ffi.Pointer)>(); - double CFAbsoluteTimeAddGregorianUnits( - double at, - CFTimeZoneRef tz, - CFGregorianUnits units, + int CFDictionaryGetValueIfPresent( + CFDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer> value, ) { - return _CFAbsoluteTimeAddGregorianUnits( - at, - tz, - units, + return _CFDictionaryGetValueIfPresent( + theDict, + key, + value, ); } - late final _CFAbsoluteTimeAddGregorianUnitsPtr = _lookup< - ffi.NativeFunction< - CFAbsoluteTime Function(CFAbsoluteTime, CFTimeZoneRef, - CFGregorianUnits)>>('CFAbsoluteTimeAddGregorianUnits'); - late final _CFAbsoluteTimeAddGregorianUnits = - _CFAbsoluteTimeAddGregorianUnitsPtr.asFunction< - double Function(double, CFTimeZoneRef, CFGregorianUnits)>(); + late final _CFDictionaryGetValueIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDictionaryRef, ffi.Pointer, + ffi.Pointer>)>>( + 'CFDictionaryGetValueIfPresent'); + late final _CFDictionaryGetValueIfPresent = + _CFDictionaryGetValueIfPresentPtr.asFunction< + int Function(CFDictionaryRef, ffi.Pointer, + ffi.Pointer>)>(); - CFGregorianUnits CFAbsoluteTimeGetDifferenceAsGregorianUnits( - double at1, - double at2, - CFTimeZoneRef tz, - int unitFlags, + void CFDictionaryGetKeysAndValues( + CFDictionaryRef theDict, + ffi.Pointer> keys, + ffi.Pointer> values, ) { - return _CFAbsoluteTimeGetDifferenceAsGregorianUnits( - at1, - at2, - tz, - unitFlags, + return _CFDictionaryGetKeysAndValues( + theDict, + keys, + values, ); } - late final _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr = _lookup< - ffi.NativeFunction< - CFGregorianUnits Function( - CFAbsoluteTime, - CFAbsoluteTime, - CFTimeZoneRef, - CFOptionFlags)>>('CFAbsoluteTimeGetDifferenceAsGregorianUnits'); - late final _CFAbsoluteTimeGetDifferenceAsGregorianUnits = - _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr.asFunction< - CFGregorianUnits Function(double, double, CFTimeZoneRef, int)>(); + late final _CFDictionaryGetKeysAndValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFDictionaryRef, + ffi.Pointer>, + ffi.Pointer>)>>( + 'CFDictionaryGetKeysAndValues'); + late final _CFDictionaryGetKeysAndValues = + _CFDictionaryGetKeysAndValuesPtr.asFunction< + void Function(CFDictionaryRef, ffi.Pointer>, + ffi.Pointer>)>(); - int CFAbsoluteTimeGetDayOfWeek( - double at, - CFTimeZoneRef tz, + void CFDictionaryApplyFunction( + CFDictionaryRef theDict, + CFDictionaryApplierFunction applier, + ffi.Pointer context, ) { - return _CFAbsoluteTimeGetDayOfWeek( - at, - tz, + return _CFDictionaryApplyFunction( + theDict, + applier, + context, ); } - late final _CFAbsoluteTimeGetDayOfWeekPtr = _lookup< - ffi.NativeFunction>( - 'CFAbsoluteTimeGetDayOfWeek'); - late final _CFAbsoluteTimeGetDayOfWeek = _CFAbsoluteTimeGetDayOfWeekPtr - .asFunction(); + late final _CFDictionaryApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFDictionaryRef, CFDictionaryApplierFunction, + ffi.Pointer)>>('CFDictionaryApplyFunction'); + late final _CFDictionaryApplyFunction = + _CFDictionaryApplyFunctionPtr.asFunction< + void Function(CFDictionaryRef, CFDictionaryApplierFunction, + ffi.Pointer)>(); - int CFAbsoluteTimeGetDayOfYear( - double at, - CFTimeZoneRef tz, + void CFDictionaryAddValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, ) { - return _CFAbsoluteTimeGetDayOfYear( - at, - tz, + return _CFDictionaryAddValue( + theDict, + key, + value, ); } - late final _CFAbsoluteTimeGetDayOfYearPtr = _lookup< - ffi.NativeFunction>( - 'CFAbsoluteTimeGetDayOfYear'); - late final _CFAbsoluteTimeGetDayOfYear = _CFAbsoluteTimeGetDayOfYearPtr - .asFunction(); + late final _CFDictionaryAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionaryAddValue'); + late final _CFDictionaryAddValue = _CFDictionaryAddValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); - int CFAbsoluteTimeGetWeekOfYear( - double at, - CFTimeZoneRef tz, + void CFDictionarySetValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, ) { - return _CFAbsoluteTimeGetWeekOfYear( - at, - tz, + return _CFDictionarySetValue( + theDict, + key, + value, ); } - late final _CFAbsoluteTimeGetWeekOfYearPtr = _lookup< - ffi.NativeFunction>( - 'CFAbsoluteTimeGetWeekOfYear'); - late final _CFAbsoluteTimeGetWeekOfYear = _CFAbsoluteTimeGetWeekOfYearPtr - .asFunction(); - - int CFDataGetTypeID() { - return _CFDataGetTypeID(); - } - - late final _CFDataGetTypeIDPtr = - _lookup>('CFDataGetTypeID'); - late final _CFDataGetTypeID = - _CFDataGetTypeIDPtr.asFunction(); + late final _CFDictionarySetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionarySetValue'); + late final _CFDictionarySetValue = _CFDictionarySetValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); - CFDataRef CFDataCreate( - CFAllocatorRef allocator, - ffi.Pointer bytes, - int length, + void CFDictionaryReplaceValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, ) { - return _CFDataCreate( - allocator, - bytes, - length, + return _CFDictionaryReplaceValue( + theDict, + key, + value, ); } - late final _CFDataCreatePtr = _lookup< + late final _CFDictionaryReplaceValuePtr = _lookup< ffi.NativeFunction< - CFDataRef Function( - CFAllocatorRef, ffi.Pointer, CFIndex)>>('CFDataCreate'); - late final _CFDataCreate = _CFDataCreatePtr.asFunction< - CFDataRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionaryReplaceValue'); + late final _CFDictionaryReplaceValue = + _CFDictionaryReplaceValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); - CFDataRef CFDataCreateWithBytesNoCopy( - CFAllocatorRef allocator, - ffi.Pointer bytes, - int length, - CFAllocatorRef bytesDeallocator, + void CFDictionaryRemoveValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, ) { - return _CFDataCreateWithBytesNoCopy( - allocator, - bytes, - length, - bytesDeallocator, + return _CFDictionaryRemoveValue( + theDict, + key, ); } - late final _CFDataCreateWithBytesNoCopyPtr = _lookup< + late final _CFDictionaryRemoveValuePtr = _lookup< ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFAllocatorRef)>>('CFDataCreateWithBytesNoCopy'); - late final _CFDataCreateWithBytesNoCopy = - _CFDataCreateWithBytesNoCopyPtr.asFunction< - CFDataRef Function( - CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + ffi.Void Function(CFMutableDictionaryRef, + ffi.Pointer)>>('CFDictionaryRemoveValue'); + late final _CFDictionaryRemoveValue = _CFDictionaryRemoveValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer)>(); - CFDataRef CFDataCreateCopy( - CFAllocatorRef allocator, - CFDataRef theData, + void CFDictionaryRemoveAllValues( + CFMutableDictionaryRef theDict, ) { - return _CFDataCreateCopy( - allocator, - theData, + return _CFDictionaryRemoveAllValues( + theDict, ); } - late final _CFDataCreateCopyPtr = _lookup< - ffi.NativeFunction>( - 'CFDataCreateCopy'); - late final _CFDataCreateCopy = _CFDataCreateCopyPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFDataRef)>(); + late final _CFDictionaryRemoveAllValuesPtr = + _lookup>( + 'CFDictionaryRemoveAllValues'); + late final _CFDictionaryRemoveAllValues = _CFDictionaryRemoveAllValuesPtr + .asFunction(); - CFMutableDataRef CFDataCreateMutable( - CFAllocatorRef allocator, - int capacity, - ) { - return _CFDataCreateMutable( - allocator, - capacity, - ); + int CFNotificationCenterGetTypeID() { + return _CFNotificationCenterGetTypeID(); } - late final _CFDataCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableDataRef Function( - CFAllocatorRef, CFIndex)>>('CFDataCreateMutable'); - late final _CFDataCreateMutable = _CFDataCreateMutablePtr.asFunction< - CFMutableDataRef Function(CFAllocatorRef, int)>(); + late final _CFNotificationCenterGetTypeIDPtr = + _lookup>( + 'CFNotificationCenterGetTypeID'); + late final _CFNotificationCenterGetTypeID = + _CFNotificationCenterGetTypeIDPtr.asFunction(); - CFMutableDataRef CFDataCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFDataRef theData, - ) { - return _CFDataCreateMutableCopy( - allocator, - capacity, - theData, - ); + CFNotificationCenterRef CFNotificationCenterGetLocalCenter() { + return _CFNotificationCenterGetLocalCenter(); } - late final _CFDataCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableDataRef Function( - CFAllocatorRef, CFIndex, CFDataRef)>>('CFDataCreateMutableCopy'); - late final _CFDataCreateMutableCopy = _CFDataCreateMutableCopyPtr.asFunction< - CFMutableDataRef Function(CFAllocatorRef, int, CFDataRef)>(); + late final _CFNotificationCenterGetLocalCenterPtr = + _lookup>( + 'CFNotificationCenterGetLocalCenter'); + late final _CFNotificationCenterGetLocalCenter = + _CFNotificationCenterGetLocalCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); - int CFDataGetLength( - CFDataRef theData, - ) { - return _CFDataGetLength( - theData, - ); + CFNotificationCenterRef CFNotificationCenterGetDistributedCenter() { + return _CFNotificationCenterGetDistributedCenter(); } - late final _CFDataGetLengthPtr = - _lookup>( - 'CFDataGetLength'); - late final _CFDataGetLength = - _CFDataGetLengthPtr.asFunction(); + late final _CFNotificationCenterGetDistributedCenterPtr = + _lookup>( + 'CFNotificationCenterGetDistributedCenter'); + late final _CFNotificationCenterGetDistributedCenter = + _CFNotificationCenterGetDistributedCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); - ffi.Pointer CFDataGetBytePtr( - CFDataRef theData, - ) { - return _CFDataGetBytePtr( - theData, - ); + CFNotificationCenterRef CFNotificationCenterGetDarwinNotifyCenter() { + return _CFNotificationCenterGetDarwinNotifyCenter(); } - late final _CFDataGetBytePtrPtr = - _lookup Function(CFDataRef)>>( - 'CFDataGetBytePtr'); - late final _CFDataGetBytePtr = - _CFDataGetBytePtrPtr.asFunction Function(CFDataRef)>(); + late final _CFNotificationCenterGetDarwinNotifyCenterPtr = + _lookup>( + 'CFNotificationCenterGetDarwinNotifyCenter'); + late final _CFNotificationCenterGetDarwinNotifyCenter = + _CFNotificationCenterGetDarwinNotifyCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); - ffi.Pointer CFDataGetMutableBytePtr( - CFMutableDataRef theData, + void CFNotificationCenterAddObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationCallback callBack, + CFStringRef name, + ffi.Pointer object, + int suspensionBehavior, ) { - return _CFDataGetMutableBytePtr( - theData, + return _CFNotificationCenterAddObserver( + center, + observer, + callBack, + name, + object, + suspensionBehavior, ); } - late final _CFDataGetMutableBytePtrPtr = _lookup< - ffi.NativeFunction Function(CFMutableDataRef)>>( - 'CFDataGetMutableBytePtr'); - late final _CFDataGetMutableBytePtr = _CFDataGetMutableBytePtrPtr.asFunction< - ffi.Pointer Function(CFMutableDataRef)>(); + late final _CFNotificationCenterAddObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationCallback, + CFStringRef, + ffi.Pointer, + ffi.Int32)>>('CFNotificationCenterAddObserver'); + late final _CFNotificationCenterAddObserver = + _CFNotificationCenterAddObserverPtr.asFunction< + void Function( + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationCallback, + CFStringRef, + ffi.Pointer, + int)>(); - void CFDataGetBytes( - CFDataRef theData, - CFRange range, - ffi.Pointer buffer, + void CFNotificationCenterRemoveObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationName name, + ffi.Pointer object, ) { - return _CFDataGetBytes( - theData, - range, - buffer, + return _CFNotificationCenterRemoveObserver( + center, + observer, + name, + object, ); } - late final _CFDataGetBytesPtr = _lookup< + late final _CFNotificationCenterRemoveObserverPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - CFDataRef, CFRange, ffi.Pointer)>>('CFDataGetBytes'); - late final _CFDataGetBytes = _CFDataGetBytesPtr.asFunction< - void Function(CFDataRef, CFRange, ffi.Pointer)>(); + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationName, + ffi.Pointer)>>('CFNotificationCenterRemoveObserver'); + late final _CFNotificationCenterRemoveObserver = + _CFNotificationCenterRemoveObserverPtr.asFunction< + void Function(CFNotificationCenterRef, ffi.Pointer, + CFNotificationName, ffi.Pointer)>(); - void CFDataSetLength( - CFMutableDataRef theData, - int length, + void CFNotificationCenterRemoveEveryObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, ) { - return _CFDataSetLength( - theData, - length, + return _CFNotificationCenterRemoveEveryObserver( + center, + observer, ); } - late final _CFDataSetLengthPtr = - _lookup>( - 'CFDataSetLength'); - late final _CFDataSetLength = - _CFDataSetLengthPtr.asFunction(); + late final _CFNotificationCenterRemoveEveryObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, ffi.Pointer)>>( + 'CFNotificationCenterRemoveEveryObserver'); + late final _CFNotificationCenterRemoveEveryObserver = + _CFNotificationCenterRemoveEveryObserverPtr.asFunction< + void Function(CFNotificationCenterRef, ffi.Pointer)>(); - void CFDataIncreaseLength( - CFMutableDataRef theData, - int extraLength, + void CFNotificationCenterPostNotification( + CFNotificationCenterRef center, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo, + int deliverImmediately, ) { - return _CFDataIncreaseLength( - theData, - extraLength, + return _CFNotificationCenterPostNotification( + center, + name, + object, + userInfo, + deliverImmediately, ); } - late final _CFDataIncreaseLengthPtr = - _lookup>( - 'CFDataIncreaseLength'); - late final _CFDataIncreaseLength = _CFDataIncreaseLengthPtr.asFunction< - void Function(CFMutableDataRef, int)>(); + late final _CFNotificationCenterPostNotificationPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, + CFNotificationName, + ffi.Pointer, + CFDictionaryRef, + Boolean)>>('CFNotificationCenterPostNotification'); + late final _CFNotificationCenterPostNotification = + _CFNotificationCenterPostNotificationPtr.asFunction< + void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, int)>(); - void CFDataAppendBytes( - CFMutableDataRef theData, - ffi.Pointer bytes, - int length, + void CFNotificationCenterPostNotificationWithOptions( + CFNotificationCenterRef center, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo, + int options, ) { - return _CFDataAppendBytes( - theData, - bytes, - length, + return _CFNotificationCenterPostNotificationWithOptions( + center, + name, + object, + userInfo, + options, ); } - late final _CFDataAppendBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableDataRef, ffi.Pointer, - CFIndex)>>('CFDataAppendBytes'); - late final _CFDataAppendBytes = _CFDataAppendBytesPtr.asFunction< - void Function(CFMutableDataRef, ffi.Pointer, int)>(); + late final _CFNotificationCenterPostNotificationWithOptionsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, CFOptionFlags)>>( + 'CFNotificationCenterPostNotificationWithOptions'); + late final _CFNotificationCenterPostNotificationWithOptions = + _CFNotificationCenterPostNotificationWithOptionsPtr.asFunction< + void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, int)>(); - void CFDataReplaceBytes( - CFMutableDataRef theData, - CFRange range, - ffi.Pointer newBytes, - int newLength, - ) { - return _CFDataReplaceBytes( - theData, - range, - newBytes, - newLength, - ); + int CFLocaleGetTypeID() { + return _CFLocaleGetTypeID(); } - late final _CFDataReplaceBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableDataRef, CFRange, ffi.Pointer, - CFIndex)>>('CFDataReplaceBytes'); - late final _CFDataReplaceBytes = _CFDataReplaceBytesPtr.asFunction< - void Function(CFMutableDataRef, CFRange, ffi.Pointer, int)>(); + late final _CFLocaleGetTypeIDPtr = + _lookup>('CFLocaleGetTypeID'); + late final _CFLocaleGetTypeID = + _CFLocaleGetTypeIDPtr.asFunction(); - void CFDataDeleteBytes( - CFMutableDataRef theData, - CFRange range, - ) { - return _CFDataDeleteBytes( - theData, - range, - ); + CFLocaleRef CFLocaleGetSystem() { + return _CFLocaleGetSystem(); } - late final _CFDataDeleteBytesPtr = - _lookup>( - 'CFDataDeleteBytes'); - late final _CFDataDeleteBytes = _CFDataDeleteBytesPtr.asFunction< - void Function(CFMutableDataRef, CFRange)>(); + late final _CFLocaleGetSystemPtr = + _lookup>('CFLocaleGetSystem'); + late final _CFLocaleGetSystem = + _CFLocaleGetSystemPtr.asFunction(); - CFRange CFDataFind( - CFDataRef theData, - CFDataRef dataToFind, - CFRange searchRange, - int compareOptions, - ) { - return _CFDataFind( - theData, - dataToFind, - searchRange, - compareOptions, - ); + CFLocaleRef CFLocaleCopyCurrent() { + return _CFLocaleCopyCurrent(); } - late final _CFDataFindPtr = _lookup< - ffi.NativeFunction< - CFRange Function( - CFDataRef, CFDataRef, CFRange, ffi.Int32)>>('CFDataFind'); - late final _CFDataFind = _CFDataFindPtr.asFunction< - CFRange Function(CFDataRef, CFDataRef, CFRange, int)>(); + late final _CFLocaleCopyCurrentPtr = + _lookup>( + 'CFLocaleCopyCurrent'); + late final _CFLocaleCopyCurrent = + _CFLocaleCopyCurrentPtr.asFunction(); - int CFCharacterSetGetTypeID() { - return _CFCharacterSetGetTypeID(); + CFArrayRef CFLocaleCopyAvailableLocaleIdentifiers() { + return _CFLocaleCopyAvailableLocaleIdentifiers(); } - late final _CFCharacterSetGetTypeIDPtr = - _lookup>( - 'CFCharacterSetGetTypeID'); - late final _CFCharacterSetGetTypeID = - _CFCharacterSetGetTypeIDPtr.asFunction(); + late final _CFLocaleCopyAvailableLocaleIdentifiersPtr = + _lookup>( + 'CFLocaleCopyAvailableLocaleIdentifiers'); + late final _CFLocaleCopyAvailableLocaleIdentifiers = + _CFLocaleCopyAvailableLocaleIdentifiersPtr.asFunction< + CFArrayRef Function()>(); - CFCharacterSetRef CFCharacterSetGetPredefined( - int theSetIdentifier, - ) { - return _CFCharacterSetGetPredefined( - theSetIdentifier, - ); + CFArrayRef CFLocaleCopyISOLanguageCodes() { + return _CFLocaleCopyISOLanguageCodes(); } - late final _CFCharacterSetGetPredefinedPtr = - _lookup>( - 'CFCharacterSetGetPredefined'); - late final _CFCharacterSetGetPredefined = _CFCharacterSetGetPredefinedPtr - .asFunction(); + late final _CFLocaleCopyISOLanguageCodesPtr = + _lookup>( + 'CFLocaleCopyISOLanguageCodes'); + late final _CFLocaleCopyISOLanguageCodes = + _CFLocaleCopyISOLanguageCodesPtr.asFunction(); - CFCharacterSetRef CFCharacterSetCreateWithCharactersInRange( - CFAllocatorRef alloc, - CFRange theRange, - ) { - return _CFCharacterSetCreateWithCharactersInRange( - alloc, - theRange, - ); + CFArrayRef CFLocaleCopyISOCountryCodes() { + return _CFLocaleCopyISOCountryCodes(); } - late final _CFCharacterSetCreateWithCharactersInRangePtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFRange)>>('CFCharacterSetCreateWithCharactersInRange'); - late final _CFCharacterSetCreateWithCharactersInRange = - _CFCharacterSetCreateWithCharactersInRangePtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFRange)>(); + late final _CFLocaleCopyISOCountryCodesPtr = + _lookup>( + 'CFLocaleCopyISOCountryCodes'); + late final _CFLocaleCopyISOCountryCodes = + _CFLocaleCopyISOCountryCodesPtr.asFunction(); - CFCharacterSetRef CFCharacterSetCreateWithCharactersInString( - CFAllocatorRef alloc, - CFStringRef theString, - ) { - return _CFCharacterSetCreateWithCharactersInString( - alloc, - theString, - ); + CFArrayRef CFLocaleCopyISOCurrencyCodes() { + return _CFLocaleCopyISOCurrencyCodes(); } - late final _CFCharacterSetCreateWithCharactersInStringPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFStringRef)>>('CFCharacterSetCreateWithCharactersInString'); - late final _CFCharacterSetCreateWithCharactersInString = - _CFCharacterSetCreateWithCharactersInStringPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFStringRef)>(); + late final _CFLocaleCopyISOCurrencyCodesPtr = + _lookup>( + 'CFLocaleCopyISOCurrencyCodes'); + late final _CFLocaleCopyISOCurrencyCodes = + _CFLocaleCopyISOCurrencyCodesPtr.asFunction(); - CFCharacterSetRef CFCharacterSetCreateWithBitmapRepresentation( - CFAllocatorRef alloc, - CFDataRef theData, - ) { - return _CFCharacterSetCreateWithBitmapRepresentation( - alloc, - theData, - ); + CFArrayRef CFLocaleCopyCommonISOCurrencyCodes() { + return _CFLocaleCopyCommonISOCurrencyCodes(); } - late final _CFCharacterSetCreateWithBitmapRepresentationPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFDataRef)>>('CFCharacterSetCreateWithBitmapRepresentation'); - late final _CFCharacterSetCreateWithBitmapRepresentation = - _CFCharacterSetCreateWithBitmapRepresentationPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFDataRef)>(); + late final _CFLocaleCopyCommonISOCurrencyCodesPtr = + _lookup>( + 'CFLocaleCopyCommonISOCurrencyCodes'); + late final _CFLocaleCopyCommonISOCurrencyCodes = + _CFLocaleCopyCommonISOCurrencyCodesPtr.asFunction< + CFArrayRef Function()>(); - CFCharacterSetRef CFCharacterSetCreateInvertedSet( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, - ) { - return _CFCharacterSetCreateInvertedSet( - alloc, - theSet, - ); + CFArrayRef CFLocaleCopyPreferredLanguages() { + return _CFLocaleCopyPreferredLanguages(); } - late final _CFCharacterSetCreateInvertedSetPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFCharacterSetRef)>>('CFCharacterSetCreateInvertedSet'); - late final _CFCharacterSetCreateInvertedSet = - _CFCharacterSetCreateInvertedSetPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + late final _CFLocaleCopyPreferredLanguagesPtr = + _lookup>( + 'CFLocaleCopyPreferredLanguages'); + late final _CFLocaleCopyPreferredLanguages = + _CFLocaleCopyPreferredLanguagesPtr.asFunction(); - int CFCharacterSetIsSupersetOfSet( - CFCharacterSetRef theSet, - CFCharacterSetRef theOtherset, + CFLocaleIdentifier CFLocaleCreateCanonicalLanguageIdentifierFromString( + CFAllocatorRef allocator, + CFStringRef localeIdentifier, ) { - return _CFCharacterSetIsSupersetOfSet( - theSet, - theOtherset, + return _CFLocaleCreateCanonicalLanguageIdentifierFromString( + allocator, + localeIdentifier, ); } - late final _CFCharacterSetIsSupersetOfSetPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFCharacterSetRef, - CFCharacterSetRef)>>('CFCharacterSetIsSupersetOfSet'); - late final _CFCharacterSetIsSupersetOfSet = _CFCharacterSetIsSupersetOfSetPtr - .asFunction(); + late final _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( + 'CFLocaleCreateCanonicalLanguageIdentifierFromString'); + late final _CFLocaleCreateCanonicalLanguageIdentifierFromString = + _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); - int CFCharacterSetHasMemberInPlane( - CFCharacterSetRef theSet, - int thePlane, + CFLocaleIdentifier CFLocaleCreateCanonicalLocaleIdentifierFromString( + CFAllocatorRef allocator, + CFStringRef localeIdentifier, ) { - return _CFCharacterSetHasMemberInPlane( - theSet, - thePlane, + return _CFLocaleCreateCanonicalLocaleIdentifierFromString( + allocator, + localeIdentifier, ); } - late final _CFCharacterSetHasMemberInPlanePtr = - _lookup>( - 'CFCharacterSetHasMemberInPlane'); - late final _CFCharacterSetHasMemberInPlane = - _CFCharacterSetHasMemberInPlanePtr.asFunction< - int Function(CFCharacterSetRef, int)>(); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( + 'CFLocaleCreateCanonicalLocaleIdentifierFromString'); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromString = + _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); - CFMutableCharacterSetRef CFCharacterSetCreateMutable( - CFAllocatorRef alloc, + CFLocaleIdentifier + CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + CFAllocatorRef allocator, + int lcode, + int rcode, ) { - return _CFCharacterSetCreateMutable( - alloc, + return _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + allocator, + lcode, + rcode, ); } - late final _CFCharacterSetCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableCharacterSetRef Function( - CFAllocatorRef)>>('CFCharacterSetCreateMutable'); - late final _CFCharacterSetCreateMutable = _CFCharacterSetCreateMutablePtr - .asFunction(); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr = + _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function( + CFAllocatorRef, LangCode, RegionCode)>>( + 'CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes'); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes = + _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr + .asFunction(); - CFCharacterSetRef CFCharacterSetCreateCopy( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, + CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + CFAllocatorRef allocator, + int lcid, ) { - return _CFCharacterSetCreateCopy( - alloc, - theSet, + return _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + allocator, + lcid, ); } - late final _CFCharacterSetCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function( - CFAllocatorRef, CFCharacterSetRef)>>('CFCharacterSetCreateCopy'); - late final _CFCharacterSetCreateCopy = - _CFCharacterSetCreateCopyPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, ffi.Uint32)>>( + 'CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode'); + late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode = + _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, int)>(); - CFMutableCharacterSetRef CFCharacterSetCreateMutableCopy( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, + int CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( + CFLocaleIdentifier localeIdentifier, ) { - return _CFCharacterSetCreateMutableCopy( - alloc, - theSet, + return _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( + localeIdentifier, ); } - late final _CFCharacterSetCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableCharacterSetRef Function(CFAllocatorRef, - CFCharacterSetRef)>>('CFCharacterSetCreateMutableCopy'); - late final _CFCharacterSetCreateMutableCopy = - _CFCharacterSetCreateMutableCopyPtr.asFunction< - CFMutableCharacterSetRef Function( - CFAllocatorRef, CFCharacterSetRef)>(); + late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr = + _lookup>( + 'CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier'); + late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier = + _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr.asFunction< + int Function(CFLocaleIdentifier)>(); - int CFCharacterSetIsCharacterMember( - CFCharacterSetRef theSet, - int theChar, + int CFLocaleGetLanguageCharacterDirection( + CFStringRef isoLangCode, ) { - return _CFCharacterSetIsCharacterMember( - theSet, - theChar, + return _CFLocaleGetLanguageCharacterDirection( + isoLangCode, ); } - late final _CFCharacterSetIsCharacterMemberPtr = - _lookup>( - 'CFCharacterSetIsCharacterMember'); - late final _CFCharacterSetIsCharacterMember = - _CFCharacterSetIsCharacterMemberPtr.asFunction< - int Function(CFCharacterSetRef, int)>(); + late final _CFLocaleGetLanguageCharacterDirectionPtr = + _lookup>( + 'CFLocaleGetLanguageCharacterDirection'); + late final _CFLocaleGetLanguageCharacterDirection = + _CFLocaleGetLanguageCharacterDirectionPtr.asFunction< + int Function(CFStringRef)>(); - int CFCharacterSetIsLongCharacterMember( - CFCharacterSetRef theSet, - int theChar, + int CFLocaleGetLanguageLineDirection( + CFStringRef isoLangCode, ) { - return _CFCharacterSetIsLongCharacterMember( - theSet, - theChar, + return _CFLocaleGetLanguageLineDirection( + isoLangCode, ); } - late final _CFCharacterSetIsLongCharacterMemberPtr = _lookup< - ffi.NativeFunction>( - 'CFCharacterSetIsLongCharacterMember'); - late final _CFCharacterSetIsLongCharacterMember = - _CFCharacterSetIsLongCharacterMemberPtr.asFunction< - int Function(CFCharacterSetRef, int)>(); + late final _CFLocaleGetLanguageLineDirectionPtr = + _lookup>( + 'CFLocaleGetLanguageLineDirection'); + late final _CFLocaleGetLanguageLineDirection = + _CFLocaleGetLanguageLineDirectionPtr.asFunction< + int Function(CFStringRef)>(); - CFDataRef CFCharacterSetCreateBitmapRepresentation( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, + CFDictionaryRef CFLocaleCreateComponentsFromLocaleIdentifier( + CFAllocatorRef allocator, + CFLocaleIdentifier localeID, ) { - return _CFCharacterSetCreateBitmapRepresentation( - alloc, - theSet, + return _CFLocaleCreateComponentsFromLocaleIdentifier( + allocator, + localeID, ); } - late final _CFCharacterSetCreateBitmapRepresentationPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, - CFCharacterSetRef)>>('CFCharacterSetCreateBitmapRepresentation'); - late final _CFCharacterSetCreateBitmapRepresentation = - _CFCharacterSetCreateBitmapRepresentationPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + late final _CFLocaleCreateComponentsFromLocaleIdentifierPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>>( + 'CFLocaleCreateComponentsFromLocaleIdentifier'); + late final _CFLocaleCreateComponentsFromLocaleIdentifier = + _CFLocaleCreateComponentsFromLocaleIdentifierPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); - void CFCharacterSetAddCharactersInRange( - CFMutableCharacterSetRef theSet, - CFRange theRange, + CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromComponents( + CFAllocatorRef allocator, + CFDictionaryRef dictionary, ) { - return _CFCharacterSetAddCharactersInRange( - theSet, - theRange, + return _CFLocaleCreateLocaleIdentifierFromComponents( + allocator, + dictionary, ); } - late final _CFCharacterSetAddCharactersInRangePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFRange)>>('CFCharacterSetAddCharactersInRange'); - late final _CFCharacterSetAddCharactersInRange = - _CFCharacterSetAddCharactersInRangePtr.asFunction< - void Function(CFMutableCharacterSetRef, CFRange)>(); + late final _CFLocaleCreateLocaleIdentifierFromComponentsPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>>( + 'CFLocaleCreateLocaleIdentifierFromComponents'); + late final _CFLocaleCreateLocaleIdentifierFromComponents = + _CFLocaleCreateLocaleIdentifierFromComponentsPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>(); - void CFCharacterSetRemoveCharactersInRange( - CFMutableCharacterSetRef theSet, - CFRange theRange, + CFLocaleRef CFLocaleCreate( + CFAllocatorRef allocator, + CFLocaleIdentifier localeIdentifier, ) { - return _CFCharacterSetRemoveCharactersInRange( - theSet, - theRange, + return _CFLocaleCreate( + allocator, + localeIdentifier, ); } - late final _CFCharacterSetRemoveCharactersInRangePtr = _lookup< + late final _CFLocaleCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFRange)>>('CFCharacterSetRemoveCharactersInRange'); - late final _CFCharacterSetRemoveCharactersInRange = - _CFCharacterSetRemoveCharactersInRangePtr.asFunction< - void Function(CFMutableCharacterSetRef, CFRange)>(); + CFLocaleRef Function( + CFAllocatorRef, CFLocaleIdentifier)>>('CFLocaleCreate'); + late final _CFLocaleCreate = _CFLocaleCreatePtr.asFunction< + CFLocaleRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); - void CFCharacterSetAddCharactersInString( - CFMutableCharacterSetRef theSet, - CFStringRef theString, + CFLocaleRef CFLocaleCreateCopy( + CFAllocatorRef allocator, + CFLocaleRef locale, ) { - return _CFCharacterSetAddCharactersInString( - theSet, - theString, + return _CFLocaleCreateCopy( + allocator, + locale, ); } - late final _CFCharacterSetAddCharactersInStringPtr = _lookup< + late final _CFLocaleCreateCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFStringRef)>>('CFCharacterSetAddCharactersInString'); - late final _CFCharacterSetAddCharactersInString = - _CFCharacterSetAddCharactersInStringPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFStringRef)>(); + CFLocaleRef Function( + CFAllocatorRef, CFLocaleRef)>>('CFLocaleCreateCopy'); + late final _CFLocaleCreateCopy = _CFLocaleCreateCopyPtr.asFunction< + CFLocaleRef Function(CFAllocatorRef, CFLocaleRef)>(); - void CFCharacterSetRemoveCharactersInString( - CFMutableCharacterSetRef theSet, - CFStringRef theString, + CFLocaleIdentifier CFLocaleGetIdentifier( + CFLocaleRef locale, ) { - return _CFCharacterSetRemoveCharactersInString( - theSet, - theString, + return _CFLocaleGetIdentifier( + locale, ); } - late final _CFCharacterSetRemoveCharactersInStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFStringRef)>>('CFCharacterSetRemoveCharactersInString'); - late final _CFCharacterSetRemoveCharactersInString = - _CFCharacterSetRemoveCharactersInStringPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFStringRef)>(); + late final _CFLocaleGetIdentifierPtr = + _lookup>( + 'CFLocaleGetIdentifier'); + late final _CFLocaleGetIdentifier = _CFLocaleGetIdentifierPtr.asFunction< + CFLocaleIdentifier Function(CFLocaleRef)>(); - void CFCharacterSetUnion( - CFMutableCharacterSetRef theSet, - CFCharacterSetRef theOtherSet, + CFTypeRef CFLocaleGetValue( + CFLocaleRef locale, + CFLocaleKey key, ) { - return _CFCharacterSetUnion( - theSet, - theOtherSet, + return _CFLocaleGetValue( + locale, + key, ); } - late final _CFCharacterSetUnionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFCharacterSetRef)>>('CFCharacterSetUnion'); - late final _CFCharacterSetUnion = _CFCharacterSetUnionPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); + late final _CFLocaleGetValuePtr = + _lookup>( + 'CFLocaleGetValue'); + late final _CFLocaleGetValue = _CFLocaleGetValuePtr.asFunction< + CFTypeRef Function(CFLocaleRef, CFLocaleKey)>(); - void CFCharacterSetIntersect( - CFMutableCharacterSetRef theSet, - CFCharacterSetRef theOtherSet, + CFStringRef CFLocaleCopyDisplayNameForPropertyValue( + CFLocaleRef displayLocale, + CFLocaleKey key, + CFStringRef value, ) { - return _CFCharacterSetIntersect( - theSet, - theOtherSet, + return _CFLocaleCopyDisplayNameForPropertyValue( + displayLocale, + key, + value, ); } - late final _CFCharacterSetIntersectPtr = _lookup< + late final _CFLocaleCopyDisplayNameForPropertyValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFCharacterSetRef)>>('CFCharacterSetIntersect'); - late final _CFCharacterSetIntersect = _CFCharacterSetIntersectPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); + CFStringRef Function(CFLocaleRef, CFLocaleKey, + CFStringRef)>>('CFLocaleCopyDisplayNameForPropertyValue'); + late final _CFLocaleCopyDisplayNameForPropertyValue = + _CFLocaleCopyDisplayNameForPropertyValuePtr.asFunction< + CFStringRef Function(CFLocaleRef, CFLocaleKey, CFStringRef)>(); - void CFCharacterSetInvert( - CFMutableCharacterSetRef theSet, - ) { - return _CFCharacterSetInvert( - theSet, - ); - } + late final ffi.Pointer + _kCFLocaleCurrentLocaleDidChangeNotification = + _lookup( + 'kCFLocaleCurrentLocaleDidChangeNotification'); - late final _CFCharacterSetInvertPtr = - _lookup>( - 'CFCharacterSetInvert'); - late final _CFCharacterSetInvert = _CFCharacterSetInvertPtr.asFunction< - void Function(CFMutableCharacterSetRef)>(); + CFNotificationName get kCFLocaleCurrentLocaleDidChangeNotification => + _kCFLocaleCurrentLocaleDidChangeNotification.value; - int CFStringGetTypeID() { - return _CFStringGetTypeID(); - } + set kCFLocaleCurrentLocaleDidChangeNotification(CFNotificationName value) => + _kCFLocaleCurrentLocaleDidChangeNotification.value = value; - late final _CFStringGetTypeIDPtr = - _lookup>('CFStringGetTypeID'); - late final _CFStringGetTypeID = - _CFStringGetTypeIDPtr.asFunction(); + late final ffi.Pointer _kCFLocaleIdentifier = + _lookup('kCFLocaleIdentifier'); - CFStringRef CFStringCreateWithPascalString( - CFAllocatorRef alloc, - ConstStr255Param pStr, - int encoding, - ) { - return _CFStringCreateWithPascalString( - alloc, - pStr, - encoding, - ); - } + CFLocaleKey get kCFLocaleIdentifier => _kCFLocaleIdentifier.value; - late final _CFStringCreateWithPascalStringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ConstStr255Param, - CFStringEncoding)>>('CFStringCreateWithPascalString'); - late final _CFStringCreateWithPascalString = - _CFStringCreateWithPascalStringPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ConstStr255Param, int)>(); + set kCFLocaleIdentifier(CFLocaleKey value) => + _kCFLocaleIdentifier.value = value; - CFStringRef CFStringCreateWithCString( - CFAllocatorRef alloc, - ffi.Pointer cStr, - int encoding, - ) { - return _CFStringCreateWithCString( - alloc, - cStr, - encoding, - ); - } + late final ffi.Pointer _kCFLocaleLanguageCode = + _lookup('kCFLocaleLanguageCode'); - late final _CFStringCreateWithCStringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, - CFStringEncoding)>>('CFStringCreateWithCString'); - late final _CFStringCreateWithCString = - _CFStringCreateWithCStringPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + CFLocaleKey get kCFLocaleLanguageCode => _kCFLocaleLanguageCode.value; - CFStringRef CFStringCreateWithBytes( - CFAllocatorRef alloc, - ffi.Pointer bytes, - int numBytes, - int encoding, - int isExternalRepresentation, - ) { - return _CFStringCreateWithBytes( - alloc, - bytes, - numBytes, - encoding, - isExternalRepresentation, - ); - } + set kCFLocaleLanguageCode(CFLocaleKey value) => + _kCFLocaleLanguageCode.value = value; - late final _CFStringCreateWithBytesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFStringEncoding, Boolean)>>('CFStringCreateWithBytes'); - late final _CFStringCreateWithBytes = _CFStringCreateWithBytesPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, ffi.Pointer, int, int, int)>(); + late final ffi.Pointer _kCFLocaleCountryCode = + _lookup('kCFLocaleCountryCode'); - CFStringRef CFStringCreateWithCharacters( - CFAllocatorRef alloc, - ffi.Pointer chars, - int numChars, - ) { - return _CFStringCreateWithCharacters( - alloc, - chars, - numChars, - ); - } + CFLocaleKey get kCFLocaleCountryCode => _kCFLocaleCountryCode.value; - late final _CFStringCreateWithCharactersPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex)>>('CFStringCreateWithCharacters'); - late final _CFStringCreateWithCharacters = - _CFStringCreateWithCharactersPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + set kCFLocaleCountryCode(CFLocaleKey value) => + _kCFLocaleCountryCode.value = value; - CFStringRef CFStringCreateWithPascalStringNoCopy( - CFAllocatorRef alloc, - ConstStr255Param pStr, - int encoding, - CFAllocatorRef contentsDeallocator, - ) { - return _CFStringCreateWithPascalStringNoCopy( - alloc, - pStr, - encoding, - contentsDeallocator, - ); - } + late final ffi.Pointer _kCFLocaleScriptCode = + _lookup('kCFLocaleScriptCode'); - late final _CFStringCreateWithPascalStringNoCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, - ConstStr255Param, - CFStringEncoding, - CFAllocatorRef)>>('CFStringCreateWithPascalStringNoCopy'); - late final _CFStringCreateWithPascalStringNoCopy = - _CFStringCreateWithPascalStringNoCopyPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, ConstStr255Param, int, CFAllocatorRef)>(); + CFLocaleKey get kCFLocaleScriptCode => _kCFLocaleScriptCode.value; - CFStringRef CFStringCreateWithCStringNoCopy( - CFAllocatorRef alloc, - ffi.Pointer cStr, - int encoding, - CFAllocatorRef contentsDeallocator, - ) { - return _CFStringCreateWithCStringNoCopy( - alloc, - cStr, - encoding, - contentsDeallocator, - ); - } + set kCFLocaleScriptCode(CFLocaleKey value) => + _kCFLocaleScriptCode.value = value; - late final _CFStringCreateWithCStringNoCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, - ffi.Pointer, - CFStringEncoding, - CFAllocatorRef)>>('CFStringCreateWithCStringNoCopy'); - late final _CFStringCreateWithCStringNoCopy = - _CFStringCreateWithCStringNoCopyPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + late final ffi.Pointer _kCFLocaleVariantCode = + _lookup('kCFLocaleVariantCode'); - CFStringRef CFStringCreateWithBytesNoCopy( - CFAllocatorRef alloc, - ffi.Pointer bytes, - int numBytes, - int encoding, - int isExternalRepresentation, - CFAllocatorRef contentsDeallocator, - ) { - return _CFStringCreateWithBytesNoCopy( - alloc, - bytes, - numBytes, - encoding, - isExternalRepresentation, - contentsDeallocator, - ); - } + CFLocaleKey get kCFLocaleVariantCode => _kCFLocaleVariantCode.value; - late final _CFStringCreateWithBytesNoCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, - ffi.Pointer, - CFIndex, - CFStringEncoding, - Boolean, - CFAllocatorRef)>>('CFStringCreateWithBytesNoCopy'); - late final _CFStringCreateWithBytesNoCopy = - _CFStringCreateWithBytesNoCopyPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, int, int, - int, CFAllocatorRef)>(); + set kCFLocaleVariantCode(CFLocaleKey value) => + _kCFLocaleVariantCode.value = value; - CFStringRef CFStringCreateWithCharactersNoCopy( - CFAllocatorRef alloc, - ffi.Pointer chars, - int numChars, - CFAllocatorRef contentsDeallocator, - ) { - return _CFStringCreateWithCharactersNoCopy( - alloc, - chars, - numChars, - contentsDeallocator, - ); - } + late final ffi.Pointer _kCFLocaleExemplarCharacterSet = + _lookup('kCFLocaleExemplarCharacterSet'); - late final _CFStringCreateWithCharactersNoCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFAllocatorRef)>>('CFStringCreateWithCharactersNoCopy'); - late final _CFStringCreateWithCharactersNoCopy = - _CFStringCreateWithCharactersNoCopyPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + CFLocaleKey get kCFLocaleExemplarCharacterSet => + _kCFLocaleExemplarCharacterSet.value; - CFStringRef CFStringCreateWithSubstring( - CFAllocatorRef alloc, - CFStringRef str, - CFRange range, - ) { - return _CFStringCreateWithSubstring( - alloc, - str, - range, - ); - } + set kCFLocaleExemplarCharacterSet(CFLocaleKey value) => + _kCFLocaleExemplarCharacterSet.value = value; - late final _CFStringCreateWithSubstringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFRange)>>('CFStringCreateWithSubstring'); - late final _CFStringCreateWithSubstring = _CFStringCreateWithSubstringPtr - .asFunction(); + late final ffi.Pointer _kCFLocaleCalendarIdentifier = + _lookup('kCFLocaleCalendarIdentifier'); - CFStringRef CFStringCreateCopy( - CFAllocatorRef alloc, - CFStringRef theString, - ) { - return _CFStringCreateCopy( - alloc, - theString, - ); - } + CFLocaleKey get kCFLocaleCalendarIdentifier => + _kCFLocaleCalendarIdentifier.value; - late final _CFStringCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef)>>('CFStringCreateCopy'); - late final _CFStringCreateCopy = _CFStringCreateCopyPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef)>(); + set kCFLocaleCalendarIdentifier(CFLocaleKey value) => + _kCFLocaleCalendarIdentifier.value = value; - CFStringRef CFStringCreateWithFormat( - CFAllocatorRef alloc, - CFDictionaryRef formatOptions, - CFStringRef format, - ) { - return _CFStringCreateWithFormat( - alloc, - formatOptions, - format, - ); - } + late final ffi.Pointer _kCFLocaleCalendar = + _lookup('kCFLocaleCalendar'); - late final _CFStringCreateWithFormatPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, - CFStringRef)>>('CFStringCreateWithFormat'); - late final _CFStringCreateWithFormat = - _CFStringCreateWithFormatPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef)>(); + CFLocaleKey get kCFLocaleCalendar => _kCFLocaleCalendar.value; - CFStringRef CFStringCreateWithFormatAndArguments( - CFAllocatorRef alloc, - CFDictionaryRef formatOptions, - CFStringRef format, - va_list arguments, - ) { - return _CFStringCreateWithFormatAndArguments( - alloc, - formatOptions, - format, - arguments, - ); - } + set kCFLocaleCalendar(CFLocaleKey value) => _kCFLocaleCalendar.value = value; - late final _CFStringCreateWithFormatAndArgumentsPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, - va_list)>>('CFStringCreateWithFormatAndArguments'); - late final _CFStringCreateWithFormatAndArguments = - _CFStringCreateWithFormatAndArgumentsPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFDictionaryRef, CFStringRef, va_list)>(); + late final ffi.Pointer _kCFLocaleCollationIdentifier = + _lookup('kCFLocaleCollationIdentifier'); - CFMutableStringRef CFStringCreateMutable( - CFAllocatorRef alloc, - int maxLength, - ) { - return _CFStringCreateMutable( - alloc, - maxLength, - ); - } + CFLocaleKey get kCFLocaleCollationIdentifier => + _kCFLocaleCollationIdentifier.value; - late final _CFStringCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableStringRef Function( - CFAllocatorRef, CFIndex)>>('CFStringCreateMutable'); - late final _CFStringCreateMutable = _CFStringCreateMutablePtr.asFunction< - CFMutableStringRef Function(CFAllocatorRef, int)>(); + set kCFLocaleCollationIdentifier(CFLocaleKey value) => + _kCFLocaleCollationIdentifier.value = value; - CFMutableStringRef CFStringCreateMutableCopy( - CFAllocatorRef alloc, - int maxLength, - CFStringRef theString, - ) { - return _CFStringCreateMutableCopy( - alloc, - maxLength, - theString, - ); - } + late final ffi.Pointer _kCFLocaleUsesMetricSystem = + _lookup('kCFLocaleUsesMetricSystem'); - late final _CFStringCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableStringRef Function(CFAllocatorRef, CFIndex, - CFStringRef)>>('CFStringCreateMutableCopy'); - late final _CFStringCreateMutableCopy = - _CFStringCreateMutableCopyPtr.asFunction< - CFMutableStringRef Function(CFAllocatorRef, int, CFStringRef)>(); + CFLocaleKey get kCFLocaleUsesMetricSystem => _kCFLocaleUsesMetricSystem.value; - CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy( - CFAllocatorRef alloc, - ffi.Pointer chars, - int numChars, - int capacity, - CFAllocatorRef externalCharactersAllocator, - ) { - return _CFStringCreateMutableWithExternalCharactersNoCopy( - alloc, - chars, - numChars, - capacity, - externalCharactersAllocator, - ); - } + set kCFLocaleUsesMetricSystem(CFLocaleKey value) => + _kCFLocaleUsesMetricSystem.value = value; - late final _CFStringCreateMutableWithExternalCharactersNoCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex, CFIndex, CFAllocatorRef)>>( - 'CFStringCreateMutableWithExternalCharactersNoCopy'); - late final _CFStringCreateMutableWithExternalCharactersNoCopy = - _CFStringCreateMutableWithExternalCharactersNoCopyPtr.asFunction< - CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, int, - int, CFAllocatorRef)>(); + late final ffi.Pointer _kCFLocaleMeasurementSystem = + _lookup('kCFLocaleMeasurementSystem'); - int CFStringGetLength( - CFStringRef theString, - ) { - return _CFStringGetLength( - theString, - ); - } + CFLocaleKey get kCFLocaleMeasurementSystem => + _kCFLocaleMeasurementSystem.value; - late final _CFStringGetLengthPtr = - _lookup>( - 'CFStringGetLength'); - late final _CFStringGetLength = - _CFStringGetLengthPtr.asFunction(); + set kCFLocaleMeasurementSystem(CFLocaleKey value) => + _kCFLocaleMeasurementSystem.value = value; - int CFStringGetCharacterAtIndex( - CFStringRef theString, - int idx, - ) { - return _CFStringGetCharacterAtIndex( - theString, - idx, - ); - } + late final ffi.Pointer _kCFLocaleDecimalSeparator = + _lookup('kCFLocaleDecimalSeparator'); - late final _CFStringGetCharacterAtIndexPtr = - _lookup>( - 'CFStringGetCharacterAtIndex'); - late final _CFStringGetCharacterAtIndex = _CFStringGetCharacterAtIndexPtr - .asFunction(); + CFLocaleKey get kCFLocaleDecimalSeparator => _kCFLocaleDecimalSeparator.value; - void CFStringGetCharacters( - CFStringRef theString, - CFRange range, - ffi.Pointer buffer, - ) { - return _CFStringGetCharacters( - theString, - range, - buffer, - ); - } + set kCFLocaleDecimalSeparator(CFLocaleKey value) => + _kCFLocaleDecimalSeparator.value = value; - late final _CFStringGetCharactersPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFStringRef, CFRange, - ffi.Pointer)>>('CFStringGetCharacters'); - late final _CFStringGetCharacters = _CFStringGetCharactersPtr.asFunction< - void Function(CFStringRef, CFRange, ffi.Pointer)>(); + late final ffi.Pointer _kCFLocaleGroupingSeparator = + _lookup('kCFLocaleGroupingSeparator'); - int CFStringGetPascalString( - CFStringRef theString, - StringPtr buffer, - int bufferSize, - int encoding, - ) { - return _CFStringGetPascalString( - theString, - buffer, - bufferSize, - encoding, - ); - } + CFLocaleKey get kCFLocaleGroupingSeparator => + _kCFLocaleGroupingSeparator.value; - late final _CFStringGetPascalStringPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, StringPtr, CFIndex, - CFStringEncoding)>>('CFStringGetPascalString'); - late final _CFStringGetPascalString = _CFStringGetPascalStringPtr.asFunction< - int Function(CFStringRef, StringPtr, int, int)>(); + set kCFLocaleGroupingSeparator(CFLocaleKey value) => + _kCFLocaleGroupingSeparator.value = value; - int CFStringGetCString( - CFStringRef theString, - ffi.Pointer buffer, - int bufferSize, - int encoding, - ) { - return _CFStringGetCString( - theString, - buffer, - bufferSize, - encoding, - ); - } + late final ffi.Pointer _kCFLocaleCurrencySymbol = + _lookup('kCFLocaleCurrencySymbol'); - late final _CFStringGetCStringPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, ffi.Pointer, CFIndex, - CFStringEncoding)>>('CFStringGetCString'); - late final _CFStringGetCString = _CFStringGetCStringPtr.asFunction< - int Function(CFStringRef, ffi.Pointer, int, int)>(); + CFLocaleKey get kCFLocaleCurrencySymbol => _kCFLocaleCurrencySymbol.value; - ConstStringPtr CFStringGetPascalStringPtr( - CFStringRef theString, - int encoding, - ) { - return _CFStringGetPascalStringPtr1( - theString, - encoding, - ); - } + set kCFLocaleCurrencySymbol(CFLocaleKey value) => + _kCFLocaleCurrencySymbol.value = value; - late final _CFStringGetPascalStringPtrPtr = _lookup< - ffi.NativeFunction< - ConstStringPtr Function( - CFStringRef, CFStringEncoding)>>('CFStringGetPascalStringPtr'); - late final _CFStringGetPascalStringPtr1 = _CFStringGetPascalStringPtrPtr - .asFunction(); + late final ffi.Pointer _kCFLocaleCurrencyCode = + _lookup('kCFLocaleCurrencyCode'); - ffi.Pointer CFStringGetCStringPtr( - CFStringRef theString, - int encoding, - ) { - return _CFStringGetCStringPtr1( - theString, - encoding, - ); - } + CFLocaleKey get kCFLocaleCurrencyCode => _kCFLocaleCurrencyCode.value; - late final _CFStringGetCStringPtrPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFStringRef, CFStringEncoding)>>('CFStringGetCStringPtr'); - late final _CFStringGetCStringPtr1 = _CFStringGetCStringPtrPtr.asFunction< - ffi.Pointer Function(CFStringRef, int)>(); + set kCFLocaleCurrencyCode(CFLocaleKey value) => + _kCFLocaleCurrencyCode.value = value; - ffi.Pointer CFStringGetCharactersPtr( - CFStringRef theString, - ) { - return _CFStringGetCharactersPtr1( - theString, - ); - } + late final ffi.Pointer _kCFLocaleCollatorIdentifier = + _lookup('kCFLocaleCollatorIdentifier'); - late final _CFStringGetCharactersPtrPtr = - _lookup Function(CFStringRef)>>( - 'CFStringGetCharactersPtr'); - late final _CFStringGetCharactersPtr1 = _CFStringGetCharactersPtrPtr - .asFunction Function(CFStringRef)>(); + CFLocaleKey get kCFLocaleCollatorIdentifier => + _kCFLocaleCollatorIdentifier.value; - int CFStringGetBytes( - CFStringRef theString, - CFRange range, - int encoding, - int lossByte, - int isExternalRepresentation, - ffi.Pointer buffer, - int maxBufLen, - ffi.Pointer usedBufLen, - ) { - return _CFStringGetBytes( - theString, - range, - encoding, - lossByte, - isExternalRepresentation, - buffer, - maxBufLen, - usedBufLen, - ); - } + set kCFLocaleCollatorIdentifier(CFLocaleKey value) => + _kCFLocaleCollatorIdentifier.value = value; - late final _CFStringGetBytesPtr = _lookup< - ffi.NativeFunction< - CFIndex Function( - CFStringRef, - CFRange, - CFStringEncoding, - UInt8, - Boolean, - ffi.Pointer, - CFIndex, - ffi.Pointer)>>('CFStringGetBytes'); - late final _CFStringGetBytes = _CFStringGetBytesPtr.asFunction< - int Function(CFStringRef, CFRange, int, int, int, ffi.Pointer, int, - ffi.Pointer)>(); + late final ffi.Pointer _kCFLocaleQuotationBeginDelimiterKey = + _lookup('kCFLocaleQuotationBeginDelimiterKey'); - CFStringRef CFStringCreateFromExternalRepresentation( - CFAllocatorRef alloc, - CFDataRef data, - int encoding, - ) { - return _CFStringCreateFromExternalRepresentation( - alloc, - data, - encoding, - ); - } + CFLocaleKey get kCFLocaleQuotationBeginDelimiterKey => + _kCFLocaleQuotationBeginDelimiterKey.value; - late final _CFStringCreateFromExternalRepresentationPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDataRef, - CFStringEncoding)>>('CFStringCreateFromExternalRepresentation'); - late final _CFStringCreateFromExternalRepresentation = - _CFStringCreateFromExternalRepresentationPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDataRef, int)>(); + set kCFLocaleQuotationBeginDelimiterKey(CFLocaleKey value) => + _kCFLocaleQuotationBeginDelimiterKey.value = value; - CFDataRef CFStringCreateExternalRepresentation( - CFAllocatorRef alloc, - CFStringRef theString, - int encoding, - int lossByte, - ) { - return _CFStringCreateExternalRepresentation( - alloc, - theString, - encoding, - lossByte, - ); - } + late final ffi.Pointer _kCFLocaleQuotationEndDelimiterKey = + _lookup('kCFLocaleQuotationEndDelimiterKey'); - late final _CFStringCreateExternalRepresentationPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFStringRef, CFStringEncoding, - UInt8)>>('CFStringCreateExternalRepresentation'); - late final _CFStringCreateExternalRepresentation = - _CFStringCreateExternalRepresentationPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFStringRef, int, int)>(); + CFLocaleKey get kCFLocaleQuotationEndDelimiterKey => + _kCFLocaleQuotationEndDelimiterKey.value; - int CFStringGetSmallestEncoding( - CFStringRef theString, - ) { - return _CFStringGetSmallestEncoding( - theString, - ); - } + set kCFLocaleQuotationEndDelimiterKey(CFLocaleKey value) => + _kCFLocaleQuotationEndDelimiterKey.value = value; - late final _CFStringGetSmallestEncodingPtr = - _lookup>( - 'CFStringGetSmallestEncoding'); - late final _CFStringGetSmallestEncoding = - _CFStringGetSmallestEncodingPtr.asFunction(); + late final ffi.Pointer + _kCFLocaleAlternateQuotationBeginDelimiterKey = + _lookup('kCFLocaleAlternateQuotationBeginDelimiterKey'); - int CFStringGetFastestEncoding( - CFStringRef theString, - ) { - return _CFStringGetFastestEncoding( - theString, - ); - } + CFLocaleKey get kCFLocaleAlternateQuotationBeginDelimiterKey => + _kCFLocaleAlternateQuotationBeginDelimiterKey.value; - late final _CFStringGetFastestEncodingPtr = - _lookup>( - 'CFStringGetFastestEncoding'); - late final _CFStringGetFastestEncoding = - _CFStringGetFastestEncodingPtr.asFunction(); + set kCFLocaleAlternateQuotationBeginDelimiterKey(CFLocaleKey value) => + _kCFLocaleAlternateQuotationBeginDelimiterKey.value = value; - int CFStringGetSystemEncoding() { - return _CFStringGetSystemEncoding(); + late final ffi.Pointer + _kCFLocaleAlternateQuotationEndDelimiterKey = + _lookup('kCFLocaleAlternateQuotationEndDelimiterKey'); + + CFLocaleKey get kCFLocaleAlternateQuotationEndDelimiterKey => + _kCFLocaleAlternateQuotationEndDelimiterKey.value; + + set kCFLocaleAlternateQuotationEndDelimiterKey(CFLocaleKey value) => + _kCFLocaleAlternateQuotationEndDelimiterKey.value = value; + + late final ffi.Pointer _kCFGregorianCalendar = + _lookup('kCFGregorianCalendar'); + + CFCalendarIdentifier get kCFGregorianCalendar => _kCFGregorianCalendar.value; + + set kCFGregorianCalendar(CFCalendarIdentifier value) => + _kCFGregorianCalendar.value = value; + + late final ffi.Pointer _kCFBuddhistCalendar = + _lookup('kCFBuddhistCalendar'); + + CFCalendarIdentifier get kCFBuddhistCalendar => _kCFBuddhistCalendar.value; + + set kCFBuddhistCalendar(CFCalendarIdentifier value) => + _kCFBuddhistCalendar.value = value; + + late final ffi.Pointer _kCFChineseCalendar = + _lookup('kCFChineseCalendar'); + + CFCalendarIdentifier get kCFChineseCalendar => _kCFChineseCalendar.value; + + set kCFChineseCalendar(CFCalendarIdentifier value) => + _kCFChineseCalendar.value = value; + + late final ffi.Pointer _kCFHebrewCalendar = + _lookup('kCFHebrewCalendar'); + + CFCalendarIdentifier get kCFHebrewCalendar => _kCFHebrewCalendar.value; + + set kCFHebrewCalendar(CFCalendarIdentifier value) => + _kCFHebrewCalendar.value = value; + + late final ffi.Pointer _kCFIslamicCalendar = + _lookup('kCFIslamicCalendar'); + + CFCalendarIdentifier get kCFIslamicCalendar => _kCFIslamicCalendar.value; + + set kCFIslamicCalendar(CFCalendarIdentifier value) => + _kCFIslamicCalendar.value = value; + + late final ffi.Pointer _kCFIslamicCivilCalendar = + _lookup('kCFIslamicCivilCalendar'); + + CFCalendarIdentifier get kCFIslamicCivilCalendar => + _kCFIslamicCivilCalendar.value; + + set kCFIslamicCivilCalendar(CFCalendarIdentifier value) => + _kCFIslamicCivilCalendar.value = value; + + late final ffi.Pointer _kCFJapaneseCalendar = + _lookup('kCFJapaneseCalendar'); + + CFCalendarIdentifier get kCFJapaneseCalendar => _kCFJapaneseCalendar.value; + + set kCFJapaneseCalendar(CFCalendarIdentifier value) => + _kCFJapaneseCalendar.value = value; + + late final ffi.Pointer _kCFRepublicOfChinaCalendar = + _lookup('kCFRepublicOfChinaCalendar'); + + CFCalendarIdentifier get kCFRepublicOfChinaCalendar => + _kCFRepublicOfChinaCalendar.value; + + set kCFRepublicOfChinaCalendar(CFCalendarIdentifier value) => + _kCFRepublicOfChinaCalendar.value = value; + + late final ffi.Pointer _kCFPersianCalendar = + _lookup('kCFPersianCalendar'); + + CFCalendarIdentifier get kCFPersianCalendar => _kCFPersianCalendar.value; + + set kCFPersianCalendar(CFCalendarIdentifier value) => + _kCFPersianCalendar.value = value; + + late final ffi.Pointer _kCFIndianCalendar = + _lookup('kCFIndianCalendar'); + + CFCalendarIdentifier get kCFIndianCalendar => _kCFIndianCalendar.value; + + set kCFIndianCalendar(CFCalendarIdentifier value) => + _kCFIndianCalendar.value = value; + + late final ffi.Pointer _kCFISO8601Calendar = + _lookup('kCFISO8601Calendar'); + + CFCalendarIdentifier get kCFISO8601Calendar => _kCFISO8601Calendar.value; + + set kCFISO8601Calendar(CFCalendarIdentifier value) => + _kCFISO8601Calendar.value = value; + + late final ffi.Pointer _kCFIslamicTabularCalendar = + _lookup('kCFIslamicTabularCalendar'); + + CFCalendarIdentifier get kCFIslamicTabularCalendar => + _kCFIslamicTabularCalendar.value; + + set kCFIslamicTabularCalendar(CFCalendarIdentifier value) => + _kCFIslamicTabularCalendar.value = value; + + late final ffi.Pointer _kCFIslamicUmmAlQuraCalendar = + _lookup('kCFIslamicUmmAlQuraCalendar'); + + CFCalendarIdentifier get kCFIslamicUmmAlQuraCalendar => + _kCFIslamicUmmAlQuraCalendar.value; + + set kCFIslamicUmmAlQuraCalendar(CFCalendarIdentifier value) => + _kCFIslamicUmmAlQuraCalendar.value = value; + + double CFAbsoluteTimeGetCurrent() { + return _CFAbsoluteTimeGetCurrent(); } - late final _CFStringGetSystemEncodingPtr = - _lookup>( - 'CFStringGetSystemEncoding'); - late final _CFStringGetSystemEncoding = - _CFStringGetSystemEncodingPtr.asFunction(); + late final _CFAbsoluteTimeGetCurrentPtr = + _lookup>( + 'CFAbsoluteTimeGetCurrent'); + late final _CFAbsoluteTimeGetCurrent = + _CFAbsoluteTimeGetCurrentPtr.asFunction(); - int CFStringGetMaximumSizeForEncoding( - int length, - int encoding, - ) { - return _CFStringGetMaximumSizeForEncoding( - length, - encoding, - ); + late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1970 = + _lookup('kCFAbsoluteTimeIntervalSince1970'); + + double get kCFAbsoluteTimeIntervalSince1970 => + _kCFAbsoluteTimeIntervalSince1970.value; + + set kCFAbsoluteTimeIntervalSince1970(double value) => + _kCFAbsoluteTimeIntervalSince1970.value = value; + + late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1904 = + _lookup('kCFAbsoluteTimeIntervalSince1904'); + + double get kCFAbsoluteTimeIntervalSince1904 => + _kCFAbsoluteTimeIntervalSince1904.value; + + set kCFAbsoluteTimeIntervalSince1904(double value) => + _kCFAbsoluteTimeIntervalSince1904.value = value; + + int CFDateGetTypeID() { + return _CFDateGetTypeID(); } - late final _CFStringGetMaximumSizeForEncodingPtr = - _lookup>( - 'CFStringGetMaximumSizeForEncoding'); - late final _CFStringGetMaximumSizeForEncoding = - _CFStringGetMaximumSizeForEncodingPtr.asFunction< - int Function(int, int)>(); + late final _CFDateGetTypeIDPtr = + _lookup>('CFDateGetTypeID'); + late final _CFDateGetTypeID = + _CFDateGetTypeIDPtr.asFunction(); - int CFStringGetFileSystemRepresentation( - CFStringRef string, - ffi.Pointer buffer, - int maxBufLen, + CFDateRef CFDateCreate( + CFAllocatorRef allocator, + double at, ) { - return _CFStringGetFileSystemRepresentation( - string, - buffer, - maxBufLen, + return _CFDateCreate( + allocator, + at, ); } - late final _CFStringGetFileSystemRepresentationPtr = _lookup< + late final _CFDateCreatePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFStringRef, ffi.Pointer, - CFIndex)>>('CFStringGetFileSystemRepresentation'); - late final _CFStringGetFileSystemRepresentation = - _CFStringGetFileSystemRepresentationPtr.asFunction< - int Function(CFStringRef, ffi.Pointer, int)>(); + CFDateRef Function(CFAllocatorRef, CFAbsoluteTime)>>('CFDateCreate'); + late final _CFDateCreate = + _CFDateCreatePtr.asFunction(); - int CFStringGetMaximumSizeOfFileSystemRepresentation( - CFStringRef string, + double CFDateGetAbsoluteTime( + CFDateRef theDate, ) { - return _CFStringGetMaximumSizeOfFileSystemRepresentation( - string, + return _CFDateGetAbsoluteTime( + theDate, ); } - late final _CFStringGetMaximumSizeOfFileSystemRepresentationPtr = - _lookup>( - 'CFStringGetMaximumSizeOfFileSystemRepresentation'); - late final _CFStringGetMaximumSizeOfFileSystemRepresentation = - _CFStringGetMaximumSizeOfFileSystemRepresentationPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFDateGetAbsoluteTimePtr = + _lookup>( + 'CFDateGetAbsoluteTime'); + late final _CFDateGetAbsoluteTime = + _CFDateGetAbsoluteTimePtr.asFunction(); - CFStringRef CFStringCreateWithFileSystemRepresentation( - CFAllocatorRef alloc, - ffi.Pointer buffer, + double CFDateGetTimeIntervalSinceDate( + CFDateRef theDate, + CFDateRef otherDate, ) { - return _CFStringCreateWithFileSystemRepresentation( - alloc, - buffer, + return _CFDateGetTimeIntervalSinceDate( + theDate, + otherDate, ); } - late final _CFStringCreateWithFileSystemRepresentationPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer)>>( - 'CFStringCreateWithFileSystemRepresentation'); - late final _CFStringCreateWithFileSystemRepresentation = - _CFStringCreateWithFileSystemRepresentationPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer)>(); + late final _CFDateGetTimeIntervalSinceDatePtr = _lookup< + ffi.NativeFunction>( + 'CFDateGetTimeIntervalSinceDate'); + late final _CFDateGetTimeIntervalSinceDate = + _CFDateGetTimeIntervalSinceDatePtr.asFunction< + double Function(CFDateRef, CFDateRef)>(); - int CFStringCompareWithOptionsAndLocale( - CFStringRef theString1, - CFStringRef theString2, - CFRange rangeToCompare, - int compareOptions, - CFLocaleRef locale, + int CFDateCompare( + CFDateRef theDate, + CFDateRef otherDate, + ffi.Pointer context, ) { - return _CFStringCompareWithOptionsAndLocale( - theString1, - theString2, - rangeToCompare, - compareOptions, - locale, + return _CFDateCompare( + theDate, + otherDate, + context, ); } - late final _CFStringCompareWithOptionsAndLocalePtr = _lookup< + late final _CFDateComparePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, - CFLocaleRef)>>('CFStringCompareWithOptionsAndLocale'); - late final _CFStringCompareWithOptionsAndLocale = - _CFStringCompareWithOptionsAndLocalePtr.asFunction< - int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef)>(); + ffi.Int32 Function( + CFDateRef, CFDateRef, ffi.Pointer)>>('CFDateCompare'); + late final _CFDateCompare = _CFDateComparePtr.asFunction< + int Function(CFDateRef, CFDateRef, ffi.Pointer)>(); - int CFStringCompareWithOptions( - CFStringRef theString1, - CFStringRef theString2, - CFRange rangeToCompare, - int compareOptions, + int CFGregorianDateIsValid( + CFGregorianDate gdate, + int unitFlags, ) { - return _CFStringCompareWithOptions( - theString1, - theString2, - rangeToCompare, - compareOptions, + return _CFGregorianDateIsValid( + gdate, + unitFlags, ); } - late final _CFStringCompareWithOptionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, - ffi.Int32)>>('CFStringCompareWithOptions'); - late final _CFStringCompareWithOptions = _CFStringCompareWithOptionsPtr - .asFunction(); + late final _CFGregorianDateIsValidPtr = _lookup< + ffi.NativeFunction>( + 'CFGregorianDateIsValid'); + late final _CFGregorianDateIsValid = _CFGregorianDateIsValidPtr.asFunction< + int Function(CFGregorianDate, int)>(); - int CFStringCompare( - CFStringRef theString1, - CFStringRef theString2, - int compareOptions, + double CFGregorianDateGetAbsoluteTime( + CFGregorianDate gdate, + CFTimeZoneRef tz, ) { - return _CFStringCompare( - theString1, - theString2, - compareOptions, + return _CFGregorianDateGetAbsoluteTime( + gdate, + tz, ); } - late final _CFStringComparePtr = _lookup< + late final _CFGregorianDateGetAbsoluteTimePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - CFStringRef, CFStringRef, ffi.Int32)>>('CFStringCompare'); - late final _CFStringCompare = _CFStringComparePtr.asFunction< - int Function(CFStringRef, CFStringRef, int)>(); + CFAbsoluteTime Function(CFGregorianDate, + CFTimeZoneRef)>>('CFGregorianDateGetAbsoluteTime'); + late final _CFGregorianDateGetAbsoluteTime = + _CFGregorianDateGetAbsoluteTimePtr.asFunction< + double Function(CFGregorianDate, CFTimeZoneRef)>(); - int CFStringFindWithOptionsAndLocale( - CFStringRef theString, - CFStringRef stringToFind, - CFRange rangeToSearch, - int searchOptions, - CFLocaleRef locale, - ffi.Pointer result, + CFGregorianDate CFAbsoluteTimeGetGregorianDate( + double at, + CFTimeZoneRef tz, ) { - return _CFStringFindWithOptionsAndLocale( - theString, - stringToFind, - rangeToSearch, - searchOptions, - locale, - result, + return _CFAbsoluteTimeGetGregorianDate( + at, + tz, ); } - late final _CFStringFindWithOptionsAndLocalePtr = _lookup< + late final _CFAbsoluteTimeGetGregorianDatePtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFStringRef, - CFStringRef, - CFRange, - ffi.Int32, - CFLocaleRef, - ffi.Pointer)>>('CFStringFindWithOptionsAndLocale'); - late final _CFStringFindWithOptionsAndLocale = - _CFStringFindWithOptionsAndLocalePtr.asFunction< - int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef, - ffi.Pointer)>(); + CFGregorianDate Function(CFAbsoluteTime, + CFTimeZoneRef)>>('CFAbsoluteTimeGetGregorianDate'); + late final _CFAbsoluteTimeGetGregorianDate = + _CFAbsoluteTimeGetGregorianDatePtr.asFunction< + CFGregorianDate Function(double, CFTimeZoneRef)>(); - int CFStringFindWithOptions( - CFStringRef theString, - CFStringRef stringToFind, - CFRange rangeToSearch, - int searchOptions, - ffi.Pointer result, + double CFAbsoluteTimeAddGregorianUnits( + double at, + CFTimeZoneRef tz, + CFGregorianUnits units, ) { - return _CFStringFindWithOptions( - theString, - stringToFind, - rangeToSearch, - searchOptions, - result, + return _CFAbsoluteTimeAddGregorianUnits( + at, + tz, + units, ); } - late final _CFStringFindWithOptionsPtr = _lookup< + late final _CFAbsoluteTimeAddGregorianUnitsPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, - ffi.Pointer)>>('CFStringFindWithOptions'); - late final _CFStringFindWithOptions = _CFStringFindWithOptionsPtr.asFunction< - int Function( - CFStringRef, CFStringRef, CFRange, int, ffi.Pointer)>(); + CFAbsoluteTime Function(CFAbsoluteTime, CFTimeZoneRef, + CFGregorianUnits)>>('CFAbsoluteTimeAddGregorianUnits'); + late final _CFAbsoluteTimeAddGregorianUnits = + _CFAbsoluteTimeAddGregorianUnitsPtr.asFunction< + double Function(double, CFTimeZoneRef, CFGregorianUnits)>(); - CFArrayRef CFStringCreateArrayWithFindResults( - CFAllocatorRef alloc, - CFStringRef theString, - CFStringRef stringToFind, - CFRange rangeToSearch, - int compareOptions, + CFGregorianUnits CFAbsoluteTimeGetDifferenceAsGregorianUnits( + double at1, + double at2, + CFTimeZoneRef tz, + int unitFlags, ) { - return _CFStringCreateArrayWithFindResults( - alloc, - theString, - stringToFind, - rangeToSearch, - compareOptions, + return _CFAbsoluteTimeGetDifferenceAsGregorianUnits( + at1, + at2, + tz, + unitFlags, ); } - late final _CFStringCreateArrayWithFindResultsPtr = _lookup< + late final _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef, CFRange, - ffi.Int32)>>('CFStringCreateArrayWithFindResults'); - late final _CFStringCreateArrayWithFindResults = - _CFStringCreateArrayWithFindResultsPtr.asFunction< - CFArrayRef Function( - CFAllocatorRef, CFStringRef, CFStringRef, CFRange, int)>(); + CFGregorianUnits Function( + CFAbsoluteTime, + CFAbsoluteTime, + CFTimeZoneRef, + CFOptionFlags)>>('CFAbsoluteTimeGetDifferenceAsGregorianUnits'); + late final _CFAbsoluteTimeGetDifferenceAsGregorianUnits = + _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr.asFunction< + CFGregorianUnits Function(double, double, CFTimeZoneRef, int)>(); - CFRange CFStringFind( - CFStringRef theString, - CFStringRef stringToFind, - int compareOptions, - ) { - return _CFStringFind( - theString, - stringToFind, - compareOptions, - ); - } - - late final _CFStringFindPtr = _lookup< - ffi.NativeFunction< - CFRange Function( - CFStringRef, CFStringRef, ffi.Int32)>>('CFStringFind'); - late final _CFStringFind = _CFStringFindPtr.asFunction< - CFRange Function(CFStringRef, CFStringRef, int)>(); - - int CFStringHasPrefix( - CFStringRef theString, - CFStringRef prefix, + int CFAbsoluteTimeGetDayOfWeek( + double at, + CFTimeZoneRef tz, ) { - return _CFStringHasPrefix( - theString, - prefix, + return _CFAbsoluteTimeGetDayOfWeek( + at, + tz, ); } - late final _CFStringHasPrefixPtr = - _lookup>( - 'CFStringHasPrefix'); - late final _CFStringHasPrefix = _CFStringHasPrefixPtr.asFunction< - int Function(CFStringRef, CFStringRef)>(); + late final _CFAbsoluteTimeGetDayOfWeekPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetDayOfWeek'); + late final _CFAbsoluteTimeGetDayOfWeek = _CFAbsoluteTimeGetDayOfWeekPtr + .asFunction(); - int CFStringHasSuffix( - CFStringRef theString, - CFStringRef suffix, + int CFAbsoluteTimeGetDayOfYear( + double at, + CFTimeZoneRef tz, ) { - return _CFStringHasSuffix( - theString, - suffix, + return _CFAbsoluteTimeGetDayOfYear( + at, + tz, ); } - late final _CFStringHasSuffixPtr = - _lookup>( - 'CFStringHasSuffix'); - late final _CFStringHasSuffix = _CFStringHasSuffixPtr.asFunction< - int Function(CFStringRef, CFStringRef)>(); + late final _CFAbsoluteTimeGetDayOfYearPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetDayOfYear'); + late final _CFAbsoluteTimeGetDayOfYear = _CFAbsoluteTimeGetDayOfYearPtr + .asFunction(); - CFRange CFStringGetRangeOfComposedCharactersAtIndex( - CFStringRef theString, - int theIndex, + int CFAbsoluteTimeGetWeekOfYear( + double at, + CFTimeZoneRef tz, ) { - return _CFStringGetRangeOfComposedCharactersAtIndex( - theString, - theIndex, + return _CFAbsoluteTimeGetWeekOfYear( + at, + tz, ); } - late final _CFStringGetRangeOfComposedCharactersAtIndexPtr = - _lookup>( - 'CFStringGetRangeOfComposedCharactersAtIndex'); - late final _CFStringGetRangeOfComposedCharactersAtIndex = - _CFStringGetRangeOfComposedCharactersAtIndexPtr.asFunction< - CFRange Function(CFStringRef, int)>(); + late final _CFAbsoluteTimeGetWeekOfYearPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetWeekOfYear'); + late final _CFAbsoluteTimeGetWeekOfYear = _CFAbsoluteTimeGetWeekOfYearPtr + .asFunction(); - int CFStringFindCharacterFromSet( - CFStringRef theString, - CFCharacterSetRef theSet, - CFRange rangeToSearch, - int searchOptions, - ffi.Pointer result, - ) { - return _CFStringFindCharacterFromSet( - theString, - theSet, - rangeToSearch, - searchOptions, - result, - ); + int CFDataGetTypeID() { + return _CFDataGetTypeID(); } - late final _CFStringFindCharacterFromSetPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, CFCharacterSetRef, CFRange, ffi.Int32, - ffi.Pointer)>>('CFStringFindCharacterFromSet'); - late final _CFStringFindCharacterFromSet = - _CFStringFindCharacterFromSetPtr.asFunction< - int Function(CFStringRef, CFCharacterSetRef, CFRange, int, - ffi.Pointer)>(); + late final _CFDataGetTypeIDPtr = + _lookup>('CFDataGetTypeID'); + late final _CFDataGetTypeID = + _CFDataGetTypeIDPtr.asFunction(); - void CFStringGetLineBounds( - CFStringRef theString, - CFRange range, - ffi.Pointer lineBeginIndex, - ffi.Pointer lineEndIndex, - ffi.Pointer contentsEndIndex, + CFDataRef CFDataCreate( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int length, ) { - return _CFStringGetLineBounds( - theString, - range, - lineBeginIndex, - lineEndIndex, - contentsEndIndex, + return _CFDataCreate( + allocator, + bytes, + length, ); } - late final _CFStringGetLineBoundsPtr = _lookup< + late final _CFDataCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFStringRef, - CFRange, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('CFStringGetLineBounds'); - late final _CFStringGetLineBounds = _CFStringGetLineBoundsPtr.asFunction< - void Function(CFStringRef, CFRange, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CFDataRef Function( + CFAllocatorRef, ffi.Pointer, CFIndex)>>('CFDataCreate'); + late final _CFDataCreate = _CFDataCreatePtr.asFunction< + CFDataRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - void CFStringGetParagraphBounds( - CFStringRef string, - CFRange range, - ffi.Pointer parBeginIndex, - ffi.Pointer parEndIndex, - ffi.Pointer contentsEndIndex, + CFDataRef CFDataCreateWithBytesNoCopy( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int length, + CFAllocatorRef bytesDeallocator, ) { - return _CFStringGetParagraphBounds( - string, - range, - parBeginIndex, - parEndIndex, - contentsEndIndex, + return _CFDataCreateWithBytesNoCopy( + allocator, + bytes, + length, + bytesDeallocator, ); } - late final _CFStringGetParagraphBoundsPtr = _lookup< + late final _CFDataCreateWithBytesNoCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFStringRef, - CFRange, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('CFStringGetParagraphBounds'); - late final _CFStringGetParagraphBounds = - _CFStringGetParagraphBoundsPtr.asFunction< - void Function(CFStringRef, CFRange, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CFDataRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFDataCreateWithBytesNoCopy'); + late final _CFDataCreateWithBytesNoCopy = + _CFDataCreateWithBytesNoCopyPtr.asFunction< + CFDataRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - int CFStringGetHyphenationLocationBeforeIndex( - CFStringRef string, - int location, - CFRange limitRange, - int options, - CFLocaleRef locale, - ffi.Pointer character, + CFDataRef CFDataCreateCopy( + CFAllocatorRef allocator, + CFDataRef theData, ) { - return _CFStringGetHyphenationLocationBeforeIndex( - string, - location, - limitRange, - options, - locale, - character, + return _CFDataCreateCopy( + allocator, + theData, ); } - late final _CFStringGetHyphenationLocationBeforeIndexPtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFStringRef, CFIndex, CFRange, CFOptionFlags, - CFLocaleRef, ffi.Pointer)>>( - 'CFStringGetHyphenationLocationBeforeIndex'); - late final _CFStringGetHyphenationLocationBeforeIndex = - _CFStringGetHyphenationLocationBeforeIndexPtr.asFunction< - int Function(CFStringRef, int, CFRange, int, CFLocaleRef, - ffi.Pointer)>(); + late final _CFDataCreateCopyPtr = _lookup< + ffi.NativeFunction>( + 'CFDataCreateCopy'); + late final _CFDataCreateCopy = _CFDataCreateCopyPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFDataRef)>(); - int CFStringIsHyphenationAvailableForLocale( - CFLocaleRef locale, + CFMutableDataRef CFDataCreateMutable( + CFAllocatorRef allocator, + int capacity, ) { - return _CFStringIsHyphenationAvailableForLocale( - locale, + return _CFDataCreateMutable( + allocator, + capacity, ); } - late final _CFStringIsHyphenationAvailableForLocalePtr = - _lookup>( - 'CFStringIsHyphenationAvailableForLocale'); - late final _CFStringIsHyphenationAvailableForLocale = - _CFStringIsHyphenationAvailableForLocalePtr.asFunction< - int Function(CFLocaleRef)>(); + late final _CFDataCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableDataRef Function( + CFAllocatorRef, CFIndex)>>('CFDataCreateMutable'); + late final _CFDataCreateMutable = _CFDataCreateMutablePtr.asFunction< + CFMutableDataRef Function(CFAllocatorRef, int)>(); - CFStringRef CFStringCreateByCombiningStrings( - CFAllocatorRef alloc, - CFArrayRef theArray, - CFStringRef separatorString, + CFMutableDataRef CFDataCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFDataRef theData, ) { - return _CFStringCreateByCombiningStrings( - alloc, - theArray, - separatorString, + return _CFDataCreateMutableCopy( + allocator, + capacity, + theData, ); } - late final _CFStringCreateByCombiningStringsPtr = _lookup< + late final _CFDataCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFArrayRef, - CFStringRef)>>('CFStringCreateByCombiningStrings'); - late final _CFStringCreateByCombiningStrings = - _CFStringCreateByCombiningStringsPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFArrayRef, CFStringRef)>(); + CFMutableDataRef Function( + CFAllocatorRef, CFIndex, CFDataRef)>>('CFDataCreateMutableCopy'); + late final _CFDataCreateMutableCopy = _CFDataCreateMutableCopyPtr.asFunction< + CFMutableDataRef Function(CFAllocatorRef, int, CFDataRef)>(); - CFArrayRef CFStringCreateArrayBySeparatingStrings( - CFAllocatorRef alloc, - CFStringRef theString, - CFStringRef separatorString, + int CFDataGetLength( + CFDataRef theData, ) { - return _CFStringCreateArrayBySeparatingStrings( - alloc, - theString, - separatorString, + return _CFDataGetLength( + theData, ); } - late final _CFStringCreateArrayBySeparatingStringsPtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFAllocatorRef, CFStringRef, - CFStringRef)>>('CFStringCreateArrayBySeparatingStrings'); - late final _CFStringCreateArrayBySeparatingStrings = - _CFStringCreateArrayBySeparatingStringsPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); + late final _CFDataGetLengthPtr = + _lookup>( + 'CFDataGetLength'); + late final _CFDataGetLength = + _CFDataGetLengthPtr.asFunction(); - int CFStringGetIntValue( - CFStringRef str, + ffi.Pointer CFDataGetBytePtr( + CFDataRef theData, ) { - return _CFStringGetIntValue( - str, + return _CFDataGetBytePtr( + theData, ); } - late final _CFStringGetIntValuePtr = - _lookup>( - 'CFStringGetIntValue'); - late final _CFStringGetIntValue = - _CFStringGetIntValuePtr.asFunction(); + late final _CFDataGetBytePtrPtr = + _lookup Function(CFDataRef)>>( + 'CFDataGetBytePtr'); + late final _CFDataGetBytePtr = + _CFDataGetBytePtrPtr.asFunction Function(CFDataRef)>(); - double CFStringGetDoubleValue( - CFStringRef str, + ffi.Pointer CFDataGetMutableBytePtr( + CFMutableDataRef theData, ) { - return _CFStringGetDoubleValue( - str, + return _CFDataGetMutableBytePtr( + theData, ); } - late final _CFStringGetDoubleValuePtr = - _lookup>( - 'CFStringGetDoubleValue'); - late final _CFStringGetDoubleValue = - _CFStringGetDoubleValuePtr.asFunction(); + late final _CFDataGetMutableBytePtrPtr = _lookup< + ffi.NativeFunction Function(CFMutableDataRef)>>( + 'CFDataGetMutableBytePtr'); + late final _CFDataGetMutableBytePtr = _CFDataGetMutableBytePtrPtr.asFunction< + ffi.Pointer Function(CFMutableDataRef)>(); - void CFStringAppend( - CFMutableStringRef theString, - CFStringRef appendedString, + void CFDataGetBytes( + CFDataRef theData, + CFRange range, + ffi.Pointer buffer, ) { - return _CFStringAppend( - theString, - appendedString, + return _CFDataGetBytes( + theData, + range, + buffer, ); } - late final _CFStringAppendPtr = _lookup< + late final _CFDataGetBytesPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - CFMutableStringRef, CFStringRef)>>('CFStringAppend'); - late final _CFStringAppend = _CFStringAppendPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef)>(); + CFDataRef, CFRange, ffi.Pointer)>>('CFDataGetBytes'); + late final _CFDataGetBytes = _CFDataGetBytesPtr.asFunction< + void Function(CFDataRef, CFRange, ffi.Pointer)>(); - void CFStringAppendCharacters( - CFMutableStringRef theString, - ffi.Pointer chars, - int numChars, + void CFDataSetLength( + CFMutableDataRef theData, + int length, ) { - return _CFStringAppendCharacters( - theString, - chars, - numChars, + return _CFDataSetLength( + theData, + length, ); } - late final _CFStringAppendCharactersPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ffi.Pointer, - CFIndex)>>('CFStringAppendCharacters'); - late final _CFStringAppendCharacters = - _CFStringAppendCharactersPtr.asFunction< - void Function(CFMutableStringRef, ffi.Pointer, int)>(); + late final _CFDataSetLengthPtr = + _lookup>( + 'CFDataSetLength'); + late final _CFDataSetLength = + _CFDataSetLengthPtr.asFunction(); - void CFStringAppendPascalString( - CFMutableStringRef theString, - ConstStr255Param pStr, - int encoding, + void CFDataIncreaseLength( + CFMutableDataRef theData, + int extraLength, ) { - return _CFStringAppendPascalString( - theString, - pStr, - encoding, + return _CFDataIncreaseLength( + theData, + extraLength, ); } - late final _CFStringAppendPascalStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ConstStr255Param, - CFStringEncoding)>>('CFStringAppendPascalString'); - late final _CFStringAppendPascalString = _CFStringAppendPascalStringPtr - .asFunction(); + late final _CFDataIncreaseLengthPtr = + _lookup>( + 'CFDataIncreaseLength'); + late final _CFDataIncreaseLength = _CFDataIncreaseLengthPtr.asFunction< + void Function(CFMutableDataRef, int)>(); - void CFStringAppendCString( - CFMutableStringRef theString, - ffi.Pointer cStr, - int encoding, + void CFDataAppendBytes( + CFMutableDataRef theData, + ffi.Pointer bytes, + int length, ) { - return _CFStringAppendCString( - theString, - cStr, - encoding, + return _CFDataAppendBytes( + theData, + bytes, + length, ); } - late final _CFStringAppendCStringPtr = _lookup< + late final _CFDataAppendBytesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ffi.Pointer, - CFStringEncoding)>>('CFStringAppendCString'); - late final _CFStringAppendCString = _CFStringAppendCStringPtr.asFunction< - void Function(CFMutableStringRef, ffi.Pointer, int)>(); + ffi.Void Function(CFMutableDataRef, ffi.Pointer, + CFIndex)>>('CFDataAppendBytes'); + late final _CFDataAppendBytes = _CFDataAppendBytesPtr.asFunction< + void Function(CFMutableDataRef, ffi.Pointer, int)>(); - void CFStringAppendFormat( - CFMutableStringRef theString, - CFDictionaryRef formatOptions, - CFStringRef format, + void CFDataReplaceBytes( + CFMutableDataRef theData, + CFRange range, + ffi.Pointer newBytes, + int newLength, ) { - return _CFStringAppendFormat( - theString, - formatOptions, - format, + return _CFDataReplaceBytes( + theData, + range, + newBytes, + newLength, ); } - late final _CFStringAppendFormatPtr = _lookup< + late final _CFDataReplaceBytesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFDictionaryRef, - CFStringRef)>>('CFStringAppendFormat'); - late final _CFStringAppendFormat = _CFStringAppendFormatPtr.asFunction< - void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef)>(); + ffi.Void Function(CFMutableDataRef, CFRange, ffi.Pointer, + CFIndex)>>('CFDataReplaceBytes'); + late final _CFDataReplaceBytes = _CFDataReplaceBytesPtr.asFunction< + void Function(CFMutableDataRef, CFRange, ffi.Pointer, int)>(); - void CFStringAppendFormatAndArguments( - CFMutableStringRef theString, - CFDictionaryRef formatOptions, - CFStringRef format, - va_list arguments, + void CFDataDeleteBytes( + CFMutableDataRef theData, + CFRange range, ) { - return _CFStringAppendFormatAndArguments( - theString, - formatOptions, - format, - arguments, + return _CFDataDeleteBytes( + theData, + range, ); } - late final _CFStringAppendFormatAndArgumentsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef, - va_list)>>('CFStringAppendFormatAndArguments'); - late final _CFStringAppendFormatAndArguments = - _CFStringAppendFormatAndArgumentsPtr.asFunction< - void Function( - CFMutableStringRef, CFDictionaryRef, CFStringRef, va_list)>(); + late final _CFDataDeleteBytesPtr = + _lookup>( + 'CFDataDeleteBytes'); + late final _CFDataDeleteBytes = _CFDataDeleteBytesPtr.asFunction< + void Function(CFMutableDataRef, CFRange)>(); - void CFStringInsert( - CFMutableStringRef str, - int idx, - CFStringRef insertedStr, + CFRange CFDataFind( + CFDataRef theData, + CFDataRef dataToFind, + CFRange searchRange, + int compareOptions, ) { - return _CFStringInsert( - str, - idx, - insertedStr, + return _CFDataFind( + theData, + dataToFind, + searchRange, + compareOptions, ); } - late final _CFStringInsertPtr = _lookup< + late final _CFDataFindPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFIndex, CFStringRef)>>('CFStringInsert'); - late final _CFStringInsert = _CFStringInsertPtr.asFunction< - void Function(CFMutableStringRef, int, CFStringRef)>(); + CFRange Function( + CFDataRef, CFDataRef, CFRange, ffi.Int32)>>('CFDataFind'); + late final _CFDataFind = _CFDataFindPtr.asFunction< + CFRange Function(CFDataRef, CFDataRef, CFRange, int)>(); - void CFStringDelete( - CFMutableStringRef theString, - CFRange range, + int CFCharacterSetGetTypeID() { + return _CFCharacterSetGetTypeID(); + } + + late final _CFCharacterSetGetTypeIDPtr = + _lookup>( + 'CFCharacterSetGetTypeID'); + late final _CFCharacterSetGetTypeID = + _CFCharacterSetGetTypeIDPtr.asFunction(); + + CFCharacterSetRef CFCharacterSetGetPredefined( + int theSetIdentifier, ) { - return _CFStringDelete( - theString, - range, + return _CFCharacterSetGetPredefined( + theSetIdentifier, ); } - late final _CFStringDeletePtr = _lookup< - ffi.NativeFunction>( - 'CFStringDelete'); - late final _CFStringDelete = _CFStringDeletePtr.asFunction< - void Function(CFMutableStringRef, CFRange)>(); + late final _CFCharacterSetGetPredefinedPtr = + _lookup>( + 'CFCharacterSetGetPredefined'); + late final _CFCharacterSetGetPredefined = _CFCharacterSetGetPredefinedPtr + .asFunction(); - void CFStringReplace( - CFMutableStringRef theString, - CFRange range, - CFStringRef replacement, + CFCharacterSetRef CFCharacterSetCreateWithCharactersInRange( + CFAllocatorRef alloc, + CFRange theRange, ) { - return _CFStringReplace( - theString, - range, - replacement, + return _CFCharacterSetCreateWithCharactersInRange( + alloc, + theRange, ); } - late final _CFStringReplacePtr = _lookup< + late final _CFCharacterSetCreateWithCharactersInRangePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFRange, CFStringRef)>>('CFStringReplace'); - late final _CFStringReplace = _CFStringReplacePtr.asFunction< - void Function(CFMutableStringRef, CFRange, CFStringRef)>(); + CFCharacterSetRef Function(CFAllocatorRef, + CFRange)>>('CFCharacterSetCreateWithCharactersInRange'); + late final _CFCharacterSetCreateWithCharactersInRange = + _CFCharacterSetCreateWithCharactersInRangePtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFRange)>(); - void CFStringReplaceAll( - CFMutableStringRef theString, - CFStringRef replacement, + CFCharacterSetRef CFCharacterSetCreateWithCharactersInString( + CFAllocatorRef alloc, + CFStringRef theString, ) { - return _CFStringReplaceAll( + return _CFCharacterSetCreateWithCharactersInString( + alloc, theString, - replacement, ); } - late final _CFStringReplaceAllPtr = _lookup< + late final _CFCharacterSetCreateWithCharactersInStringPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFStringRef)>>('CFStringReplaceAll'); - late final _CFStringReplaceAll = _CFStringReplaceAllPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef)>(); + CFCharacterSetRef Function(CFAllocatorRef, + CFStringRef)>>('CFCharacterSetCreateWithCharactersInString'); + late final _CFCharacterSetCreateWithCharactersInString = + _CFCharacterSetCreateWithCharactersInStringPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFStringRef)>(); - int CFStringFindAndReplace( - CFMutableStringRef theString, - CFStringRef stringToFind, - CFStringRef replacementString, - CFRange rangeToSearch, - int compareOptions, + CFCharacterSetRef CFCharacterSetCreateWithBitmapRepresentation( + CFAllocatorRef alloc, + CFDataRef theData, ) { - return _CFStringFindAndReplace( - theString, - stringToFind, - replacementString, - rangeToSearch, - compareOptions, + return _CFCharacterSetCreateWithBitmapRepresentation( + alloc, + theData, ); } - late final _CFStringFindAndReplacePtr = _lookup< + late final _CFCharacterSetCreateWithBitmapRepresentationPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFMutableStringRef, CFStringRef, CFStringRef, - CFRange, ffi.Int32)>>('CFStringFindAndReplace'); - late final _CFStringFindAndReplace = _CFStringFindAndReplacePtr.asFunction< - int Function( - CFMutableStringRef, CFStringRef, CFStringRef, CFRange, int)>(); + CFCharacterSetRef Function(CFAllocatorRef, + CFDataRef)>>('CFCharacterSetCreateWithBitmapRepresentation'); + late final _CFCharacterSetCreateWithBitmapRepresentation = + _CFCharacterSetCreateWithBitmapRepresentationPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFDataRef)>(); - void CFStringSetExternalCharactersNoCopy( - CFMutableStringRef theString, - ffi.Pointer chars, - int length, - int capacity, + CFCharacterSetRef CFCharacterSetCreateInvertedSet( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return _CFStringSetExternalCharactersNoCopy( - theString, - chars, - length, - capacity, + return _CFCharacterSetCreateInvertedSet( + alloc, + theSet, ); } - late final _CFStringSetExternalCharactersNoCopyPtr = _lookup< + late final _CFCharacterSetCreateInvertedSetPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ffi.Pointer, CFIndex, - CFIndex)>>('CFStringSetExternalCharactersNoCopy'); - late final _CFStringSetExternalCharactersNoCopy = - _CFStringSetExternalCharactersNoCopyPtr.asFunction< - void Function(CFMutableStringRef, ffi.Pointer, int, int)>(); + CFCharacterSetRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateInvertedSet'); + late final _CFCharacterSetCreateInvertedSet = + _CFCharacterSetCreateInvertedSetPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); - void CFStringPad( - CFMutableStringRef theString, - CFStringRef padString, - int length, - int indexIntoPad, + int CFCharacterSetIsSupersetOfSet( + CFCharacterSetRef theSet, + CFCharacterSetRef theOtherset, ) { - return _CFStringPad( - theString, - padString, - length, - indexIntoPad, + return _CFCharacterSetIsSupersetOfSet( + theSet, + theOtherset, ); } - late final _CFStringPadPtr = _lookup< + late final _CFCharacterSetIsSupersetOfSetPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFStringRef, CFIndex, - CFIndex)>>('CFStringPad'); - late final _CFStringPad = _CFStringPadPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef, int, int)>(); + Boolean Function(CFCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetIsSupersetOfSet'); + late final _CFCharacterSetIsSupersetOfSet = _CFCharacterSetIsSupersetOfSetPtr + .asFunction(); - void CFStringTrim( - CFMutableStringRef theString, - CFStringRef trimString, + int CFCharacterSetHasMemberInPlane( + CFCharacterSetRef theSet, + int thePlane, ) { - return _CFStringTrim( - theString, - trimString, + return _CFCharacterSetHasMemberInPlane( + theSet, + thePlane, ); } - late final _CFStringTrimPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFStringRef)>>('CFStringTrim'); - late final _CFStringTrim = _CFStringTrimPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef)>(); + late final _CFCharacterSetHasMemberInPlanePtr = + _lookup>( + 'CFCharacterSetHasMemberInPlane'); + late final _CFCharacterSetHasMemberInPlane = + _CFCharacterSetHasMemberInPlanePtr.asFunction< + int Function(CFCharacterSetRef, int)>(); - void CFStringTrimWhitespace( - CFMutableStringRef theString, + CFMutableCharacterSetRef CFCharacterSetCreateMutable( + CFAllocatorRef alloc, ) { - return _CFStringTrimWhitespace( - theString, + return _CFCharacterSetCreateMutable( + alloc, ); } - late final _CFStringTrimWhitespacePtr = - _lookup>( - 'CFStringTrimWhitespace'); - late final _CFStringTrimWhitespace = _CFStringTrimWhitespacePtr.asFunction< - void Function(CFMutableStringRef)>(); + late final _CFCharacterSetCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableCharacterSetRef Function( + CFAllocatorRef)>>('CFCharacterSetCreateMutable'); + late final _CFCharacterSetCreateMutable = _CFCharacterSetCreateMutablePtr + .asFunction(); - void CFStringLowercase( - CFMutableStringRef theString, - CFLocaleRef locale, + CFCharacterSetRef CFCharacterSetCreateCopy( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return _CFStringLowercase( - theString, - locale, + return _CFCharacterSetCreateCopy( + alloc, + theSet, ); } - late final _CFStringLowercasePtr = _lookup< + late final _CFCharacterSetCreateCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFLocaleRef)>>('CFStringLowercase'); - late final _CFStringLowercase = _CFStringLowercasePtr.asFunction< - void Function(CFMutableStringRef, CFLocaleRef)>(); + CFCharacterSetRef Function( + CFAllocatorRef, CFCharacterSetRef)>>('CFCharacterSetCreateCopy'); + late final _CFCharacterSetCreateCopy = + _CFCharacterSetCreateCopyPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); - void CFStringUppercase( - CFMutableStringRef theString, - CFLocaleRef locale, + CFMutableCharacterSetRef CFCharacterSetCreateMutableCopy( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return _CFStringUppercase( - theString, - locale, + return _CFCharacterSetCreateMutableCopy( + alloc, + theSet, ); } - late final _CFStringUppercasePtr = _lookup< + late final _CFCharacterSetCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFLocaleRef)>>('CFStringUppercase'); - late final _CFStringUppercase = _CFStringUppercasePtr.asFunction< - void Function(CFMutableStringRef, CFLocaleRef)>(); + CFMutableCharacterSetRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateMutableCopy'); + late final _CFCharacterSetCreateMutableCopy = + _CFCharacterSetCreateMutableCopyPtr.asFunction< + CFMutableCharacterSetRef Function( + CFAllocatorRef, CFCharacterSetRef)>(); - void CFStringCapitalize( - CFMutableStringRef theString, - CFLocaleRef locale, + int CFCharacterSetIsCharacterMember( + CFCharacterSetRef theSet, + int theChar, ) { - return _CFStringCapitalize( - theString, - locale, + return _CFCharacterSetIsCharacterMember( + theSet, + theChar, ); } - late final _CFStringCapitalizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFLocaleRef)>>('CFStringCapitalize'); - late final _CFStringCapitalize = _CFStringCapitalizePtr.asFunction< - void Function(CFMutableStringRef, CFLocaleRef)>(); + late final _CFCharacterSetIsCharacterMemberPtr = + _lookup>( + 'CFCharacterSetIsCharacterMember'); + late final _CFCharacterSetIsCharacterMember = + _CFCharacterSetIsCharacterMemberPtr.asFunction< + int Function(CFCharacterSetRef, int)>(); - void CFStringNormalize( - CFMutableStringRef theString, - int theForm, + int CFCharacterSetIsLongCharacterMember( + CFCharacterSetRef theSet, + int theChar, ) { - return _CFStringNormalize( - theString, - theForm, + return _CFCharacterSetIsLongCharacterMember( + theSet, + theChar, ); } - late final _CFStringNormalizePtr = _lookup< - ffi.NativeFunction>( - 'CFStringNormalize'); - late final _CFStringNormalize = _CFStringNormalizePtr.asFunction< - void Function(CFMutableStringRef, int)>(); + late final _CFCharacterSetIsLongCharacterMemberPtr = _lookup< + ffi.NativeFunction>( + 'CFCharacterSetIsLongCharacterMember'); + late final _CFCharacterSetIsLongCharacterMember = + _CFCharacterSetIsLongCharacterMemberPtr.asFunction< + int Function(CFCharacterSetRef, int)>(); - void CFStringFold( - CFMutableStringRef theString, - int theFlags, - CFLocaleRef theLocale, + CFDataRef CFCharacterSetCreateBitmapRepresentation( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return _CFStringFold( - theString, - theFlags, - theLocale, + return _CFCharacterSetCreateBitmapRepresentation( + alloc, + theSet, ); } - late final _CFStringFoldPtr = _lookup< + late final _CFCharacterSetCreateBitmapRepresentationPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, ffi.Int32, CFLocaleRef)>>('CFStringFold'); - late final _CFStringFold = _CFStringFoldPtr.asFunction< - void Function(CFMutableStringRef, int, CFLocaleRef)>(); + CFDataRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateBitmapRepresentation'); + late final _CFCharacterSetCreateBitmapRepresentation = + _CFCharacterSetCreateBitmapRepresentationPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFCharacterSetRef)>(); - int CFStringTransform( - CFMutableStringRef string, - ffi.Pointer range, - CFStringRef transform, - int reverse, + void CFCharacterSetAddCharactersInRange( + CFMutableCharacterSetRef theSet, + CFRange theRange, ) { - return _CFStringTransform( - string, - range, - transform, - reverse, + return _CFCharacterSetAddCharactersInRange( + theSet, + theRange, ); } - late final _CFStringTransformPtr = _lookup< + late final _CFCharacterSetAddCharactersInRangePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFMutableStringRef, ffi.Pointer, - CFStringRef, Boolean)>>('CFStringTransform'); - late final _CFStringTransform = _CFStringTransformPtr.asFunction< - int Function( - CFMutableStringRef, ffi.Pointer, CFStringRef, int)>(); + ffi.Void Function(CFMutableCharacterSetRef, + CFRange)>>('CFCharacterSetAddCharactersInRange'); + late final _CFCharacterSetAddCharactersInRange = + _CFCharacterSetAddCharactersInRangePtr.asFunction< + void Function(CFMutableCharacterSetRef, CFRange)>(); - late final ffi.Pointer _kCFStringTransformStripCombiningMarks = - _lookup('kCFStringTransformStripCombiningMarks'); + void CFCharacterSetRemoveCharactersInRange( + CFMutableCharacterSetRef theSet, + CFRange theRange, + ) { + return _CFCharacterSetRemoveCharactersInRange( + theSet, + theRange, + ); + } - CFStringRef get kCFStringTransformStripCombiningMarks => - _kCFStringTransformStripCombiningMarks.value; + late final _CFCharacterSetRemoveCharactersInRangePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFRange)>>('CFCharacterSetRemoveCharactersInRange'); + late final _CFCharacterSetRemoveCharactersInRange = + _CFCharacterSetRemoveCharactersInRangePtr.asFunction< + void Function(CFMutableCharacterSetRef, CFRange)>(); - set kCFStringTransformStripCombiningMarks(CFStringRef value) => - _kCFStringTransformStripCombiningMarks.value = value; + void CFCharacterSetAddCharactersInString( + CFMutableCharacterSetRef theSet, + CFStringRef theString, + ) { + return _CFCharacterSetAddCharactersInString( + theSet, + theString, + ); + } - late final ffi.Pointer _kCFStringTransformToLatin = - _lookup('kCFStringTransformToLatin'); + late final _CFCharacterSetAddCharactersInStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFStringRef)>>('CFCharacterSetAddCharactersInString'); + late final _CFCharacterSetAddCharactersInString = + _CFCharacterSetAddCharactersInStringPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFStringRef)>(); - CFStringRef get kCFStringTransformToLatin => _kCFStringTransformToLatin.value; + void CFCharacterSetRemoveCharactersInString( + CFMutableCharacterSetRef theSet, + CFStringRef theString, + ) { + return _CFCharacterSetRemoveCharactersInString( + theSet, + theString, + ); + } - set kCFStringTransformToLatin(CFStringRef value) => - _kCFStringTransformToLatin.value = value; + late final _CFCharacterSetRemoveCharactersInStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFStringRef)>>('CFCharacterSetRemoveCharactersInString'); + late final _CFCharacterSetRemoveCharactersInString = + _CFCharacterSetRemoveCharactersInStringPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFStringRef)>(); - late final ffi.Pointer _kCFStringTransformFullwidthHalfwidth = - _lookup('kCFStringTransformFullwidthHalfwidth'); + void CFCharacterSetUnion( + CFMutableCharacterSetRef theSet, + CFCharacterSetRef theOtherSet, + ) { + return _CFCharacterSetUnion( + theSet, + theOtherSet, + ); + } - CFStringRef get kCFStringTransformFullwidthHalfwidth => - _kCFStringTransformFullwidthHalfwidth.value; + late final _CFCharacterSetUnionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetUnion'); + late final _CFCharacterSetUnion = _CFCharacterSetUnionPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); - set kCFStringTransformFullwidthHalfwidth(CFStringRef value) => - _kCFStringTransformFullwidthHalfwidth.value = value; + void CFCharacterSetIntersect( + CFMutableCharacterSetRef theSet, + CFCharacterSetRef theOtherSet, + ) { + return _CFCharacterSetIntersect( + theSet, + theOtherSet, + ); + } - late final ffi.Pointer _kCFStringTransformLatinKatakana = - _lookup('kCFStringTransformLatinKatakana'); + late final _CFCharacterSetIntersectPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetIntersect'); + late final _CFCharacterSetIntersect = _CFCharacterSetIntersectPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); - CFStringRef get kCFStringTransformLatinKatakana => - _kCFStringTransformLatinKatakana.value; + void CFCharacterSetInvert( + CFMutableCharacterSetRef theSet, + ) { + return _CFCharacterSetInvert( + theSet, + ); + } - set kCFStringTransformLatinKatakana(CFStringRef value) => - _kCFStringTransformLatinKatakana.value = value; + late final _CFCharacterSetInvertPtr = + _lookup>( + 'CFCharacterSetInvert'); + late final _CFCharacterSetInvert = _CFCharacterSetInvertPtr.asFunction< + void Function(CFMutableCharacterSetRef)>(); - late final ffi.Pointer _kCFStringTransformLatinHiragana = - _lookup('kCFStringTransformLatinHiragana'); + int CFErrorGetTypeID() { + return _CFErrorGetTypeID(); + } - CFStringRef get kCFStringTransformLatinHiragana => - _kCFStringTransformLatinHiragana.value; + late final _CFErrorGetTypeIDPtr = + _lookup>('CFErrorGetTypeID'); + late final _CFErrorGetTypeID = + _CFErrorGetTypeIDPtr.asFunction(); - set kCFStringTransformLatinHiragana(CFStringRef value) => - _kCFStringTransformLatinHiragana.value = value; + late final ffi.Pointer _kCFErrorDomainPOSIX = + _lookup('kCFErrorDomainPOSIX'); - late final ffi.Pointer _kCFStringTransformHiraganaKatakana = - _lookup('kCFStringTransformHiraganaKatakana'); + CFErrorDomain get kCFErrorDomainPOSIX => _kCFErrorDomainPOSIX.value; - CFStringRef get kCFStringTransformHiraganaKatakana => - _kCFStringTransformHiraganaKatakana.value; + set kCFErrorDomainPOSIX(CFErrorDomain value) => + _kCFErrorDomainPOSIX.value = value; - set kCFStringTransformHiraganaKatakana(CFStringRef value) => - _kCFStringTransformHiraganaKatakana.value = value; + late final ffi.Pointer _kCFErrorDomainOSStatus = + _lookup('kCFErrorDomainOSStatus'); - late final ffi.Pointer _kCFStringTransformMandarinLatin = - _lookup('kCFStringTransformMandarinLatin'); + CFErrorDomain get kCFErrorDomainOSStatus => _kCFErrorDomainOSStatus.value; - CFStringRef get kCFStringTransformMandarinLatin => - _kCFStringTransformMandarinLatin.value; + set kCFErrorDomainOSStatus(CFErrorDomain value) => + _kCFErrorDomainOSStatus.value = value; - set kCFStringTransformMandarinLatin(CFStringRef value) => - _kCFStringTransformMandarinLatin.value = value; + late final ffi.Pointer _kCFErrorDomainMach = + _lookup('kCFErrorDomainMach'); - late final ffi.Pointer _kCFStringTransformLatinHangul = - _lookup('kCFStringTransformLatinHangul'); + CFErrorDomain get kCFErrorDomainMach => _kCFErrorDomainMach.value; - CFStringRef get kCFStringTransformLatinHangul => - _kCFStringTransformLatinHangul.value; + set kCFErrorDomainMach(CFErrorDomain value) => + _kCFErrorDomainMach.value = value; - set kCFStringTransformLatinHangul(CFStringRef value) => - _kCFStringTransformLatinHangul.value = value; + late final ffi.Pointer _kCFErrorDomainCocoa = + _lookup('kCFErrorDomainCocoa'); - late final ffi.Pointer _kCFStringTransformLatinArabic = - _lookup('kCFStringTransformLatinArabic'); + CFErrorDomain get kCFErrorDomainCocoa => _kCFErrorDomainCocoa.value; - CFStringRef get kCFStringTransformLatinArabic => - _kCFStringTransformLatinArabic.value; + set kCFErrorDomainCocoa(CFErrorDomain value) => + _kCFErrorDomainCocoa.value = value; - set kCFStringTransformLatinArabic(CFStringRef value) => - _kCFStringTransformLatinArabic.value = value; + late final ffi.Pointer _kCFErrorLocalizedDescriptionKey = + _lookup('kCFErrorLocalizedDescriptionKey'); - late final ffi.Pointer _kCFStringTransformLatinHebrew = - _lookup('kCFStringTransformLatinHebrew'); + CFStringRef get kCFErrorLocalizedDescriptionKey => + _kCFErrorLocalizedDescriptionKey.value; - CFStringRef get kCFStringTransformLatinHebrew => - _kCFStringTransformLatinHebrew.value; + set kCFErrorLocalizedDescriptionKey(CFStringRef value) => + _kCFErrorLocalizedDescriptionKey.value = value; - set kCFStringTransformLatinHebrew(CFStringRef value) => - _kCFStringTransformLatinHebrew.value = value; + late final ffi.Pointer _kCFErrorLocalizedFailureKey = + _lookup('kCFErrorLocalizedFailureKey'); - late final ffi.Pointer _kCFStringTransformLatinThai = - _lookup('kCFStringTransformLatinThai'); + CFStringRef get kCFErrorLocalizedFailureKey => + _kCFErrorLocalizedFailureKey.value; - CFStringRef get kCFStringTransformLatinThai => - _kCFStringTransformLatinThai.value; + set kCFErrorLocalizedFailureKey(CFStringRef value) => + _kCFErrorLocalizedFailureKey.value = value; - set kCFStringTransformLatinThai(CFStringRef value) => - _kCFStringTransformLatinThai.value = value; + late final ffi.Pointer _kCFErrorLocalizedFailureReasonKey = + _lookup('kCFErrorLocalizedFailureReasonKey'); - late final ffi.Pointer _kCFStringTransformLatinCyrillic = - _lookup('kCFStringTransformLatinCyrillic'); + CFStringRef get kCFErrorLocalizedFailureReasonKey => + _kCFErrorLocalizedFailureReasonKey.value; - CFStringRef get kCFStringTransformLatinCyrillic => - _kCFStringTransformLatinCyrillic.value; + set kCFErrorLocalizedFailureReasonKey(CFStringRef value) => + _kCFErrorLocalizedFailureReasonKey.value = value; - set kCFStringTransformLatinCyrillic(CFStringRef value) => - _kCFStringTransformLatinCyrillic.value = value; + late final ffi.Pointer _kCFErrorLocalizedRecoverySuggestionKey = + _lookup('kCFErrorLocalizedRecoverySuggestionKey'); - late final ffi.Pointer _kCFStringTransformLatinGreek = - _lookup('kCFStringTransformLatinGreek'); + CFStringRef get kCFErrorLocalizedRecoverySuggestionKey => + _kCFErrorLocalizedRecoverySuggestionKey.value; - CFStringRef get kCFStringTransformLatinGreek => - _kCFStringTransformLatinGreek.value; + set kCFErrorLocalizedRecoverySuggestionKey(CFStringRef value) => + _kCFErrorLocalizedRecoverySuggestionKey.value = value; - set kCFStringTransformLatinGreek(CFStringRef value) => - _kCFStringTransformLatinGreek.value = value; + late final ffi.Pointer _kCFErrorDescriptionKey = + _lookup('kCFErrorDescriptionKey'); - late final ffi.Pointer _kCFStringTransformToXMLHex = - _lookup('kCFStringTransformToXMLHex'); + CFStringRef get kCFErrorDescriptionKey => _kCFErrorDescriptionKey.value; - CFStringRef get kCFStringTransformToXMLHex => - _kCFStringTransformToXMLHex.value; + set kCFErrorDescriptionKey(CFStringRef value) => + _kCFErrorDescriptionKey.value = value; - set kCFStringTransformToXMLHex(CFStringRef value) => - _kCFStringTransformToXMLHex.value = value; + late final ffi.Pointer _kCFErrorUnderlyingErrorKey = + _lookup('kCFErrorUnderlyingErrorKey'); - late final ffi.Pointer _kCFStringTransformToUnicodeName = - _lookup('kCFStringTransformToUnicodeName'); + CFStringRef get kCFErrorUnderlyingErrorKey => + _kCFErrorUnderlyingErrorKey.value; - CFStringRef get kCFStringTransformToUnicodeName => - _kCFStringTransformToUnicodeName.value; + set kCFErrorUnderlyingErrorKey(CFStringRef value) => + _kCFErrorUnderlyingErrorKey.value = value; - set kCFStringTransformToUnicodeName(CFStringRef value) => - _kCFStringTransformToUnicodeName.value = value; + late final ffi.Pointer _kCFErrorURLKey = + _lookup('kCFErrorURLKey'); - late final ffi.Pointer _kCFStringTransformStripDiacritics = - _lookup('kCFStringTransformStripDiacritics'); + CFStringRef get kCFErrorURLKey => _kCFErrorURLKey.value; - CFStringRef get kCFStringTransformStripDiacritics => - _kCFStringTransformStripDiacritics.value; + set kCFErrorURLKey(CFStringRef value) => _kCFErrorURLKey.value = value; - set kCFStringTransformStripDiacritics(CFStringRef value) => - _kCFStringTransformStripDiacritics.value = value; + late final ffi.Pointer _kCFErrorFilePathKey = + _lookup('kCFErrorFilePathKey'); - int CFStringIsEncodingAvailable( - int encoding, + CFStringRef get kCFErrorFilePathKey => _kCFErrorFilePathKey.value; + + set kCFErrorFilePathKey(CFStringRef value) => + _kCFErrorFilePathKey.value = value; + + CFErrorRef CFErrorCreate( + CFAllocatorRef allocator, + CFErrorDomain domain, + int code, + CFDictionaryRef userInfo, ) { - return _CFStringIsEncodingAvailable( - encoding, + return _CFErrorCreate( + allocator, + domain, + code, + userInfo, ); } - late final _CFStringIsEncodingAvailablePtr = - _lookup>( - 'CFStringIsEncodingAvailable'); - late final _CFStringIsEncodingAvailable = - _CFStringIsEncodingAvailablePtr.asFunction(); + late final _CFErrorCreatePtr = _lookup< + ffi.NativeFunction< + CFErrorRef Function(CFAllocatorRef, CFErrorDomain, CFIndex, + CFDictionaryRef)>>('CFErrorCreate'); + late final _CFErrorCreate = _CFErrorCreatePtr.asFunction< + CFErrorRef Function( + CFAllocatorRef, CFErrorDomain, int, CFDictionaryRef)>(); - ffi.Pointer CFStringGetListOfAvailableEncodings() { - return _CFStringGetListOfAvailableEncodings(); + CFErrorRef CFErrorCreateWithUserInfoKeysAndValues( + CFAllocatorRef allocator, + CFErrorDomain domain, + int code, + ffi.Pointer> userInfoKeys, + ffi.Pointer> userInfoValues, + int numUserInfoValues, + ) { + return _CFErrorCreateWithUserInfoKeysAndValues( + allocator, + domain, + code, + userInfoKeys, + userInfoValues, + numUserInfoValues, + ); } - late final _CFStringGetListOfAvailableEncodingsPtr = - _lookup Function()>>( - 'CFStringGetListOfAvailableEncodings'); - late final _CFStringGetListOfAvailableEncodings = - _CFStringGetListOfAvailableEncodingsPtr.asFunction< - ffi.Pointer Function()>(); + late final _CFErrorCreateWithUserInfoKeysAndValuesPtr = _lookup< + ffi.NativeFunction< + CFErrorRef Function( + CFAllocatorRef, + CFErrorDomain, + CFIndex, + ffi.Pointer>, + ffi.Pointer>, + CFIndex)>>('CFErrorCreateWithUserInfoKeysAndValues'); + late final _CFErrorCreateWithUserInfoKeysAndValues = + _CFErrorCreateWithUserInfoKeysAndValuesPtr.asFunction< + CFErrorRef Function( + CFAllocatorRef, + CFErrorDomain, + int, + ffi.Pointer>, + ffi.Pointer>, + int)>(); - CFStringRef CFStringGetNameOfEncoding( - int encoding, + CFErrorDomain CFErrorGetDomain( + CFErrorRef err, ) { - return _CFStringGetNameOfEncoding( - encoding, + return _CFErrorGetDomain( + err, ); } - late final _CFStringGetNameOfEncodingPtr = - _lookup>( - 'CFStringGetNameOfEncoding'); - late final _CFStringGetNameOfEncoding = - _CFStringGetNameOfEncodingPtr.asFunction(); + late final _CFErrorGetDomainPtr = + _lookup>( + 'CFErrorGetDomain'); + late final _CFErrorGetDomain = + _CFErrorGetDomainPtr.asFunction(); - int CFStringConvertEncodingToNSStringEncoding( - int encoding, + int CFErrorGetCode( + CFErrorRef err, ) { - return _CFStringConvertEncodingToNSStringEncoding( - encoding, + return _CFErrorGetCode( + err, ); } - late final _CFStringConvertEncodingToNSStringEncodingPtr = - _lookup>( - 'CFStringConvertEncodingToNSStringEncoding'); - late final _CFStringConvertEncodingToNSStringEncoding = - _CFStringConvertEncodingToNSStringEncodingPtr.asFunction< - int Function(int)>(); + late final _CFErrorGetCodePtr = + _lookup>( + 'CFErrorGetCode'); + late final _CFErrorGetCode = + _CFErrorGetCodePtr.asFunction(); - int CFStringConvertNSStringEncodingToEncoding( - int encoding, + CFDictionaryRef CFErrorCopyUserInfo( + CFErrorRef err, ) { - return _CFStringConvertNSStringEncodingToEncoding( - encoding, + return _CFErrorCopyUserInfo( + err, ); } - late final _CFStringConvertNSStringEncodingToEncodingPtr = - _lookup>( - 'CFStringConvertNSStringEncodingToEncoding'); - late final _CFStringConvertNSStringEncodingToEncoding = - _CFStringConvertNSStringEncodingToEncodingPtr.asFunction< - int Function(int)>(); + late final _CFErrorCopyUserInfoPtr = + _lookup>( + 'CFErrorCopyUserInfo'); + late final _CFErrorCopyUserInfo = _CFErrorCopyUserInfoPtr.asFunction< + CFDictionaryRef Function(CFErrorRef)>(); - int CFStringConvertEncodingToWindowsCodepage( - int encoding, + CFStringRef CFErrorCopyDescription( + CFErrorRef err, ) { - return _CFStringConvertEncodingToWindowsCodepage( - encoding, + return _CFErrorCopyDescription( + err, ); } - late final _CFStringConvertEncodingToWindowsCodepagePtr = - _lookup>( - 'CFStringConvertEncodingToWindowsCodepage'); - late final _CFStringConvertEncodingToWindowsCodepage = - _CFStringConvertEncodingToWindowsCodepagePtr.asFunction< - int Function(int)>(); + late final _CFErrorCopyDescriptionPtr = + _lookup>( + 'CFErrorCopyDescription'); + late final _CFErrorCopyDescription = + _CFErrorCopyDescriptionPtr.asFunction(); - int CFStringConvertWindowsCodepageToEncoding( - int codepage, + CFStringRef CFErrorCopyFailureReason( + CFErrorRef err, ) { - return _CFStringConvertWindowsCodepageToEncoding( - codepage, + return _CFErrorCopyFailureReason( + err, ); } - late final _CFStringConvertWindowsCodepageToEncodingPtr = - _lookup>( - 'CFStringConvertWindowsCodepageToEncoding'); - late final _CFStringConvertWindowsCodepageToEncoding = - _CFStringConvertWindowsCodepageToEncodingPtr.asFunction< - int Function(int)>(); + late final _CFErrorCopyFailureReasonPtr = + _lookup>( + 'CFErrorCopyFailureReason'); + late final _CFErrorCopyFailureReason = _CFErrorCopyFailureReasonPtr + .asFunction(); - int CFStringConvertIANACharSetNameToEncoding( - CFStringRef theString, + CFStringRef CFErrorCopyRecoverySuggestion( + CFErrorRef err, ) { - return _CFStringConvertIANACharSetNameToEncoding( - theString, + return _CFErrorCopyRecoverySuggestion( + err, ); } - late final _CFStringConvertIANACharSetNameToEncodingPtr = - _lookup>( - 'CFStringConvertIANACharSetNameToEncoding'); - late final _CFStringConvertIANACharSetNameToEncoding = - _CFStringConvertIANACharSetNameToEncodingPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFErrorCopyRecoverySuggestionPtr = + _lookup>( + 'CFErrorCopyRecoverySuggestion'); + late final _CFErrorCopyRecoverySuggestion = _CFErrorCopyRecoverySuggestionPtr + .asFunction(); - CFStringRef CFStringConvertEncodingToIANACharSetName( + int CFStringGetTypeID() { + return _CFStringGetTypeID(); + } + + late final _CFStringGetTypeIDPtr = + _lookup>('CFStringGetTypeID'); + late final _CFStringGetTypeID = + _CFStringGetTypeIDPtr.asFunction(); + + CFStringRef CFStringCreateWithPascalString( + CFAllocatorRef alloc, + ConstStr255Param pStr, int encoding, ) { - return _CFStringConvertEncodingToIANACharSetName( + return _CFStringCreateWithPascalString( + alloc, + pStr, encoding, ); } - late final _CFStringConvertEncodingToIANACharSetNamePtr = - _lookup>( - 'CFStringConvertEncodingToIANACharSetName'); - late final _CFStringConvertEncodingToIANACharSetName = - _CFStringConvertEncodingToIANACharSetNamePtr.asFunction< - CFStringRef Function(int)>(); + late final _CFStringCreateWithPascalStringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ConstStr255Param, + CFStringEncoding)>>('CFStringCreateWithPascalString'); + late final _CFStringCreateWithPascalString = + _CFStringCreateWithPascalStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ConstStr255Param, int)>(); - int CFStringGetMostCompatibleMacStringEncoding( + CFStringRef CFStringCreateWithCString( + CFAllocatorRef alloc, + ffi.Pointer cStr, int encoding, ) { - return _CFStringGetMostCompatibleMacStringEncoding( + return _CFStringCreateWithCString( + alloc, + cStr, encoding, ); } - late final _CFStringGetMostCompatibleMacStringEncodingPtr = - _lookup>( - 'CFStringGetMostCompatibleMacStringEncoding'); - late final _CFStringGetMostCompatibleMacStringEncoding = - _CFStringGetMostCompatibleMacStringEncodingPtr.asFunction< - int Function(int)>(); + late final _CFStringCreateWithCStringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, + CFStringEncoding)>>('CFStringCreateWithCString'); + late final _CFStringCreateWithCString = + _CFStringCreateWithCStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - void CFShow( - CFTypeRef obj, + CFStringRef CFStringCreateWithBytes( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int numBytes, + int encoding, + int isExternalRepresentation, ) { - return _CFShow( - obj, + return _CFStringCreateWithBytes( + alloc, + bytes, + numBytes, + encoding, + isExternalRepresentation, ); } - late final _CFShowPtr = - _lookup>('CFShow'); - late final _CFShow = _CFShowPtr.asFunction(); + late final _CFStringCreateWithBytesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFStringEncoding, Boolean)>>('CFStringCreateWithBytes'); + late final _CFStringCreateWithBytes = _CFStringCreateWithBytesPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, int, int)>(); - void CFShowStr( - CFStringRef str, + CFStringRef CFStringCreateWithCharacters( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, ) { - return _CFShowStr( - str, + return _CFStringCreateWithCharacters( + alloc, + chars, + numChars, ); } - late final _CFShowStrPtr = - _lookup>('CFShowStr'); - late final _CFShowStr = - _CFShowStrPtr.asFunction(); + late final _CFStringCreateWithCharactersPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFStringCreateWithCharacters'); + late final _CFStringCreateWithCharacters = + _CFStringCreateWithCharactersPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - CFStringRef __CFStringMakeConstantString( - ffi.Pointer cStr, + CFStringRef CFStringCreateWithPascalStringNoCopy( + CFAllocatorRef alloc, + ConstStr255Param pStr, + int encoding, + CFAllocatorRef contentsDeallocator, ) { - return ___CFStringMakeConstantString( - cStr, + return _CFStringCreateWithPascalStringNoCopy( + alloc, + pStr, + encoding, + contentsDeallocator, ); } - late final ___CFStringMakeConstantStringPtr = - _lookup)>>( - '__CFStringMakeConstantString'); - late final ___CFStringMakeConstantString = ___CFStringMakeConstantStringPtr - .asFunction)>(); - - int CFTimeZoneGetTypeID() { - return _CFTimeZoneGetTypeID(); - } - - late final _CFTimeZoneGetTypeIDPtr = - _lookup>('CFTimeZoneGetTypeID'); - late final _CFTimeZoneGetTypeID = - _CFTimeZoneGetTypeIDPtr.asFunction(); - - CFTimeZoneRef CFTimeZoneCopySystem() { - return _CFTimeZoneCopySystem(); - } - - late final _CFTimeZoneCopySystemPtr = - _lookup>( - 'CFTimeZoneCopySystem'); - late final _CFTimeZoneCopySystem = - _CFTimeZoneCopySystemPtr.asFunction(); + late final _CFStringCreateWithPascalStringNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + ConstStr255Param, + CFStringEncoding, + CFAllocatorRef)>>('CFStringCreateWithPascalStringNoCopy'); + late final _CFStringCreateWithPascalStringNoCopy = + _CFStringCreateWithPascalStringNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ConstStr255Param, int, CFAllocatorRef)>(); - void CFTimeZoneResetSystem() { - return _CFTimeZoneResetSystem(); + CFStringRef CFStringCreateWithCStringNoCopy( + CFAllocatorRef alloc, + ffi.Pointer cStr, + int encoding, + CFAllocatorRef contentsDeallocator, + ) { + return _CFStringCreateWithCStringNoCopy( + alloc, + cStr, + encoding, + contentsDeallocator, + ); } - late final _CFTimeZoneResetSystemPtr = - _lookup>('CFTimeZoneResetSystem'); - late final _CFTimeZoneResetSystem = - _CFTimeZoneResetSystemPtr.asFunction(); + late final _CFStringCreateWithCStringNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + ffi.Pointer, + CFStringEncoding, + CFAllocatorRef)>>('CFStringCreateWithCStringNoCopy'); + late final _CFStringCreateWithCStringNoCopy = + _CFStringCreateWithCStringNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - CFTimeZoneRef CFTimeZoneCopyDefault() { - return _CFTimeZoneCopyDefault(); + CFStringRef CFStringCreateWithBytesNoCopy( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int numBytes, + int encoding, + int isExternalRepresentation, + CFAllocatorRef contentsDeallocator, + ) { + return _CFStringCreateWithBytesNoCopy( + alloc, + bytes, + numBytes, + encoding, + isExternalRepresentation, + contentsDeallocator, + ); } - late final _CFTimeZoneCopyDefaultPtr = - _lookup>( - 'CFTimeZoneCopyDefault'); - late final _CFTimeZoneCopyDefault = - _CFTimeZoneCopyDefaultPtr.asFunction(); + late final _CFStringCreateWithBytesNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + ffi.Pointer, + CFIndex, + CFStringEncoding, + Boolean, + CFAllocatorRef)>>('CFStringCreateWithBytesNoCopy'); + late final _CFStringCreateWithBytesNoCopy = + _CFStringCreateWithBytesNoCopyPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int, int, + int, CFAllocatorRef)>(); - void CFTimeZoneSetDefault( - CFTimeZoneRef tz, + CFStringRef CFStringCreateWithCharactersNoCopy( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, + CFAllocatorRef contentsDeallocator, ) { - return _CFTimeZoneSetDefault( - tz, + return _CFStringCreateWithCharactersNoCopy( + alloc, + chars, + numChars, + contentsDeallocator, ); } - late final _CFTimeZoneSetDefaultPtr = - _lookup>( - 'CFTimeZoneSetDefault'); - late final _CFTimeZoneSetDefault = - _CFTimeZoneSetDefaultPtr.asFunction(); - - CFArrayRef CFTimeZoneCopyKnownNames() { - return _CFTimeZoneCopyKnownNames(); - } - - late final _CFTimeZoneCopyKnownNamesPtr = - _lookup>( - 'CFTimeZoneCopyKnownNames'); - late final _CFTimeZoneCopyKnownNames = - _CFTimeZoneCopyKnownNamesPtr.asFunction(); - - CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary() { - return _CFTimeZoneCopyAbbreviationDictionary(); - } - - late final _CFTimeZoneCopyAbbreviationDictionaryPtr = - _lookup>( - 'CFTimeZoneCopyAbbreviationDictionary'); - late final _CFTimeZoneCopyAbbreviationDictionary = - _CFTimeZoneCopyAbbreviationDictionaryPtr.asFunction< - CFDictionaryRef Function()>(); + late final _CFStringCreateWithCharactersNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFStringCreateWithCharactersNoCopy'); + late final _CFStringCreateWithCharactersNoCopy = + _CFStringCreateWithCharactersNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - void CFTimeZoneSetAbbreviationDictionary( - CFDictionaryRef dict, + CFStringRef CFStringCreateWithSubstring( + CFAllocatorRef alloc, + CFStringRef str, + CFRange range, ) { - return _CFTimeZoneSetAbbreviationDictionary( - dict, + return _CFStringCreateWithSubstring( + alloc, + str, + range, ); } - late final _CFTimeZoneSetAbbreviationDictionaryPtr = - _lookup>( - 'CFTimeZoneSetAbbreviationDictionary'); - late final _CFTimeZoneSetAbbreviationDictionary = - _CFTimeZoneSetAbbreviationDictionaryPtr.asFunction< - void Function(CFDictionaryRef)>(); + late final _CFStringCreateWithSubstringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFRange)>>('CFStringCreateWithSubstring'); + late final _CFStringCreateWithSubstring = _CFStringCreateWithSubstringPtr + .asFunction(); - CFTimeZoneRef CFTimeZoneCreate( - CFAllocatorRef allocator, - CFStringRef name, - CFDataRef data, + CFStringRef CFStringCreateCopy( + CFAllocatorRef alloc, + CFStringRef theString, ) { - return _CFTimeZoneCreate( - allocator, - name, - data, + return _CFStringCreateCopy( + alloc, + theString, ); } - late final _CFTimeZoneCreatePtr = _lookup< + late final _CFStringCreateCopyPtr = _lookup< ffi.NativeFunction< - CFTimeZoneRef Function( - CFAllocatorRef, CFStringRef, CFDataRef)>>('CFTimeZoneCreate'); - late final _CFTimeZoneCreate = _CFTimeZoneCreatePtr.asFunction< - CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); + CFStringRef Function( + CFAllocatorRef, CFStringRef)>>('CFStringCreateCopy'); + late final _CFStringCreateCopy = _CFStringCreateCopyPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef)>(); - CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT( - CFAllocatorRef allocator, - double ti, + CFStringRef CFStringCreateWithFormat( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef format, ) { - return _CFTimeZoneCreateWithTimeIntervalFromGMT( - allocator, - ti, + return _CFStringCreateWithFormat( + alloc, + formatOptions, + format, ); } - late final _CFTimeZoneCreateWithTimeIntervalFromGMTPtr = _lookup< + late final _CFStringCreateWithFormatPtr = _lookup< ffi.NativeFunction< - CFTimeZoneRef Function(CFAllocatorRef, - CFTimeInterval)>>('CFTimeZoneCreateWithTimeIntervalFromGMT'); - late final _CFTimeZoneCreateWithTimeIntervalFromGMT = - _CFTimeZoneCreateWithTimeIntervalFromGMTPtr.asFunction< - CFTimeZoneRef Function(CFAllocatorRef, double)>(); + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, + CFStringRef)>>('CFStringCreateWithFormat'); + late final _CFStringCreateWithFormat = + _CFStringCreateWithFormatPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef)>(); - CFTimeZoneRef CFTimeZoneCreateWithName( - CFAllocatorRef allocator, - CFStringRef name, - int tryAbbrev, + CFStringRef CFStringCreateWithFormatAndArguments( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef format, + va_list arguments, ) { - return _CFTimeZoneCreateWithName( - allocator, - name, - tryAbbrev, + return _CFStringCreateWithFormatAndArguments( + alloc, + formatOptions, + format, + arguments, ); } - late final _CFTimeZoneCreateWithNamePtr = _lookup< + late final _CFStringCreateWithFormatAndArgumentsPtr = _lookup< ffi.NativeFunction< - CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, - Boolean)>>('CFTimeZoneCreateWithName'); - late final _CFTimeZoneCreateWithName = _CFTimeZoneCreateWithNamePtr - .asFunction(); + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + va_list)>>('CFStringCreateWithFormatAndArguments'); + late final _CFStringCreateWithFormatAndArguments = + _CFStringCreateWithFormatAndArgumentsPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFDictionaryRef, CFStringRef, va_list)>(); - CFStringRef CFTimeZoneGetName( - CFTimeZoneRef tz, + CFStringRef CFStringCreateStringWithValidatedFormat( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef validFormatSpecifiers, + CFStringRef format, + ffi.Pointer errorPtr, ) { - return _CFTimeZoneGetName( - tz, + return _CFStringCreateStringWithValidatedFormat( + alloc, + formatOptions, + validFormatSpecifiers, + format, + errorPtr, ); } - late final _CFTimeZoneGetNamePtr = - _lookup>( - 'CFTimeZoneGetName'); - late final _CFTimeZoneGetName = - _CFTimeZoneGetNamePtr.asFunction(); + late final _CFStringCreateStringWithValidatedFormatPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + CFStringRef, ffi.Pointer)>>( + 'CFStringCreateStringWithValidatedFormat'); + late final _CFStringCreateStringWithValidatedFormat = + _CFStringCreateStringWithValidatedFormatPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + CFStringRef, ffi.Pointer)>(); - CFDataRef CFTimeZoneGetData( - CFTimeZoneRef tz, + CFStringRef CFStringCreateStringWithValidatedFormatAndArguments( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef validFormatSpecifiers, + CFStringRef format, + va_list arguments, + ffi.Pointer errorPtr, ) { - return _CFTimeZoneGetData( - tz, + return _CFStringCreateStringWithValidatedFormatAndArguments( + alloc, + formatOptions, + validFormatSpecifiers, + format, + arguments, + errorPtr, ); } - late final _CFTimeZoneGetDataPtr = - _lookup>( - 'CFTimeZoneGetData'); - late final _CFTimeZoneGetData = - _CFTimeZoneGetDataPtr.asFunction(); + late final _CFStringCreateStringWithValidatedFormatAndArgumentsPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + CFStringRef, va_list, ffi.Pointer)>>( + 'CFStringCreateStringWithValidatedFormatAndArguments'); + late final _CFStringCreateStringWithValidatedFormatAndArguments = + _CFStringCreateStringWithValidatedFormatAndArgumentsPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + CFStringRef, va_list, ffi.Pointer)>(); - double CFTimeZoneGetSecondsFromGMT( - CFTimeZoneRef tz, - double at, + CFMutableStringRef CFStringCreateMutable( + CFAllocatorRef alloc, + int maxLength, ) { - return _CFTimeZoneGetSecondsFromGMT( - tz, - at, + return _CFStringCreateMutable( + alloc, + maxLength, ); } - late final _CFTimeZoneGetSecondsFromGMTPtr = _lookup< + late final _CFStringCreateMutablePtr = _lookup< ffi.NativeFunction< - CFTimeInterval Function( - CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneGetSecondsFromGMT'); - late final _CFTimeZoneGetSecondsFromGMT = _CFTimeZoneGetSecondsFromGMTPtr - .asFunction(); + CFMutableStringRef Function( + CFAllocatorRef, CFIndex)>>('CFStringCreateMutable'); + late final _CFStringCreateMutable = _CFStringCreateMutablePtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, int)>(); - CFStringRef CFTimeZoneCopyAbbreviation( - CFTimeZoneRef tz, - double at, + CFMutableStringRef CFStringCreateMutableCopy( + CFAllocatorRef alloc, + int maxLength, + CFStringRef theString, ) { - return _CFTimeZoneCopyAbbreviation( - tz, - at, + return _CFStringCreateMutableCopy( + alloc, + maxLength, + theString, ); } - late final _CFTimeZoneCopyAbbreviationPtr = _lookup< + late final _CFStringCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - CFStringRef Function( - CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneCopyAbbreviation'); - late final _CFTimeZoneCopyAbbreviation = _CFTimeZoneCopyAbbreviationPtr - .asFunction(); + CFMutableStringRef Function(CFAllocatorRef, CFIndex, + CFStringRef)>>('CFStringCreateMutableCopy'); + late final _CFStringCreateMutableCopy = + _CFStringCreateMutableCopyPtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, int, CFStringRef)>(); - int CFTimeZoneIsDaylightSavingTime( - CFTimeZoneRef tz, - double at, + CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, + int capacity, + CFAllocatorRef externalCharactersAllocator, ) { - return _CFTimeZoneIsDaylightSavingTime( - tz, - at, + return _CFStringCreateMutableWithExternalCharactersNoCopy( + alloc, + chars, + numChars, + capacity, + externalCharactersAllocator, ); } - late final _CFTimeZoneIsDaylightSavingTimePtr = _lookup< - ffi.NativeFunction>( - 'CFTimeZoneIsDaylightSavingTime'); - late final _CFTimeZoneIsDaylightSavingTime = - _CFTimeZoneIsDaylightSavingTimePtr.asFunction< - int Function(CFTimeZoneRef, double)>(); + late final _CFStringCreateMutableWithExternalCharactersNoCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex, CFIndex, CFAllocatorRef)>>( + 'CFStringCreateMutableWithExternalCharactersNoCopy'); + late final _CFStringCreateMutableWithExternalCharactersNoCopy = + _CFStringCreateMutableWithExternalCharactersNoCopyPtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, int, + int, CFAllocatorRef)>(); - double CFTimeZoneGetDaylightSavingTimeOffset( - CFTimeZoneRef tz, - double at, + int CFStringGetLength( + CFStringRef theString, ) { - return _CFTimeZoneGetDaylightSavingTimeOffset( - tz, - at, + return _CFStringGetLength( + theString, ); } - late final _CFTimeZoneGetDaylightSavingTimeOffsetPtr = _lookup< - ffi.NativeFunction< - CFTimeInterval Function(CFTimeZoneRef, - CFAbsoluteTime)>>('CFTimeZoneGetDaylightSavingTimeOffset'); - late final _CFTimeZoneGetDaylightSavingTimeOffset = - _CFTimeZoneGetDaylightSavingTimeOffsetPtr.asFunction< - double Function(CFTimeZoneRef, double)>(); + late final _CFStringGetLengthPtr = + _lookup>( + 'CFStringGetLength'); + late final _CFStringGetLength = + _CFStringGetLengthPtr.asFunction(); - double CFTimeZoneGetNextDaylightSavingTimeTransition( - CFTimeZoneRef tz, - double at, + int CFStringGetCharacterAtIndex( + CFStringRef theString, + int idx, ) { - return _CFTimeZoneGetNextDaylightSavingTimeTransition( - tz, - at, + return _CFStringGetCharacterAtIndex( + theString, + idx, ); } - late final _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr = _lookup< - ffi.NativeFunction< - CFAbsoluteTime Function(CFTimeZoneRef, CFAbsoluteTime)>>( - 'CFTimeZoneGetNextDaylightSavingTimeTransition'); - late final _CFTimeZoneGetNextDaylightSavingTimeTransition = - _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr.asFunction< - double Function(CFTimeZoneRef, double)>(); + late final _CFStringGetCharacterAtIndexPtr = + _lookup>( + 'CFStringGetCharacterAtIndex'); + late final _CFStringGetCharacterAtIndex = _CFStringGetCharacterAtIndexPtr + .asFunction(); - CFStringRef CFTimeZoneCopyLocalizedName( - CFTimeZoneRef tz, - int style, - CFLocaleRef locale, + void CFStringGetCharacters( + CFStringRef theString, + CFRange range, + ffi.Pointer buffer, ) { - return _CFTimeZoneCopyLocalizedName( - tz, - style, - locale, + return _CFStringGetCharacters( + theString, + range, + buffer, ); } - late final _CFTimeZoneCopyLocalizedNamePtr = _lookup< + late final _CFStringGetCharactersPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFTimeZoneRef, ffi.Int32, - CFLocaleRef)>>('CFTimeZoneCopyLocalizedName'); - late final _CFTimeZoneCopyLocalizedName = _CFTimeZoneCopyLocalizedNamePtr - .asFunction(); - - late final ffi.Pointer - _kCFTimeZoneSystemTimeZoneDidChangeNotification = - _lookup( - 'kCFTimeZoneSystemTimeZoneDidChangeNotification'); - - CFNotificationName get kCFTimeZoneSystemTimeZoneDidChangeNotification => - _kCFTimeZoneSystemTimeZoneDidChangeNotification.value; - - set kCFTimeZoneSystemTimeZoneDidChangeNotification( - CFNotificationName value) => - _kCFTimeZoneSystemTimeZoneDidChangeNotification.value = value; - - int CFCalendarGetTypeID() { - return _CFCalendarGetTypeID(); - } - - late final _CFCalendarGetTypeIDPtr = - _lookup>('CFCalendarGetTypeID'); - late final _CFCalendarGetTypeID = - _CFCalendarGetTypeIDPtr.asFunction(); - - CFCalendarRef CFCalendarCopyCurrent() { - return _CFCalendarCopyCurrent(); - } - - late final _CFCalendarCopyCurrentPtr = - _lookup>( - 'CFCalendarCopyCurrent'); - late final _CFCalendarCopyCurrent = - _CFCalendarCopyCurrentPtr.asFunction(); + ffi.Void Function(CFStringRef, CFRange, + ffi.Pointer)>>('CFStringGetCharacters'); + late final _CFStringGetCharacters = _CFStringGetCharactersPtr.asFunction< + void Function(CFStringRef, CFRange, ffi.Pointer)>(); - CFCalendarRef CFCalendarCreateWithIdentifier( - CFAllocatorRef allocator, - CFCalendarIdentifier identifier, + int CFStringGetPascalString( + CFStringRef theString, + StringPtr buffer, + int bufferSize, + int encoding, ) { - return _CFCalendarCreateWithIdentifier( - allocator, - identifier, + return _CFStringGetPascalString( + theString, + buffer, + bufferSize, + encoding, ); } - late final _CFCalendarCreateWithIdentifierPtr = _lookup< + late final _CFStringGetPascalStringPtr = _lookup< ffi.NativeFunction< - CFCalendarRef Function(CFAllocatorRef, - CFCalendarIdentifier)>>('CFCalendarCreateWithIdentifier'); - late final _CFCalendarCreateWithIdentifier = - _CFCalendarCreateWithIdentifierPtr.asFunction< - CFCalendarRef Function(CFAllocatorRef, CFCalendarIdentifier)>(); + Boolean Function(CFStringRef, StringPtr, CFIndex, + CFStringEncoding)>>('CFStringGetPascalString'); + late final _CFStringGetPascalString = _CFStringGetPascalStringPtr.asFunction< + int Function(CFStringRef, StringPtr, int, int)>(); - CFCalendarIdentifier CFCalendarGetIdentifier( - CFCalendarRef calendar, + int CFStringGetCString( + CFStringRef theString, + ffi.Pointer buffer, + int bufferSize, + int encoding, ) { - return _CFCalendarGetIdentifier( - calendar, + return _CFStringGetCString( + theString, + buffer, + bufferSize, + encoding, ); } - late final _CFCalendarGetIdentifierPtr = - _lookup>( - 'CFCalendarGetIdentifier'); - late final _CFCalendarGetIdentifier = _CFCalendarGetIdentifierPtr.asFunction< - CFCalendarIdentifier Function(CFCalendarRef)>(); + late final _CFStringGetCStringPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, ffi.Pointer, CFIndex, + CFStringEncoding)>>('CFStringGetCString'); + late final _CFStringGetCString = _CFStringGetCStringPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, int, int)>(); - CFLocaleRef CFCalendarCopyLocale( - CFCalendarRef calendar, + ConstStringPtr CFStringGetPascalStringPtr( + CFStringRef theString, + int encoding, ) { - return _CFCalendarCopyLocale( - calendar, + return _CFStringGetPascalStringPtr1( + theString, + encoding, ); } - late final _CFCalendarCopyLocalePtr = - _lookup>( - 'CFCalendarCopyLocale'); - late final _CFCalendarCopyLocale = _CFCalendarCopyLocalePtr.asFunction< - CFLocaleRef Function(CFCalendarRef)>(); + late final _CFStringGetPascalStringPtrPtr = _lookup< + ffi.NativeFunction< + ConstStringPtr Function( + CFStringRef, CFStringEncoding)>>('CFStringGetPascalStringPtr'); + late final _CFStringGetPascalStringPtr1 = _CFStringGetPascalStringPtrPtr + .asFunction(); - void CFCalendarSetLocale( - CFCalendarRef calendar, - CFLocaleRef locale, + ffi.Pointer CFStringGetCStringPtr( + CFStringRef theString, + int encoding, ) { - return _CFCalendarSetLocale( - calendar, - locale, + return _CFStringGetCStringPtr1( + theString, + encoding, ); } - late final _CFCalendarSetLocalePtr = _lookup< - ffi.NativeFunction>( - 'CFCalendarSetLocale'); - late final _CFCalendarSetLocale = _CFCalendarSetLocalePtr.asFunction< - void Function(CFCalendarRef, CFLocaleRef)>(); + late final _CFStringGetCStringPtrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFStringRef, CFStringEncoding)>>('CFStringGetCStringPtr'); + late final _CFStringGetCStringPtr1 = _CFStringGetCStringPtrPtr.asFunction< + ffi.Pointer Function(CFStringRef, int)>(); - CFTimeZoneRef CFCalendarCopyTimeZone( - CFCalendarRef calendar, + ffi.Pointer CFStringGetCharactersPtr( + CFStringRef theString, ) { - return _CFCalendarCopyTimeZone( - calendar, + return _CFStringGetCharactersPtr1( + theString, ); } - late final _CFCalendarCopyTimeZonePtr = - _lookup>( - 'CFCalendarCopyTimeZone'); - late final _CFCalendarCopyTimeZone = _CFCalendarCopyTimeZonePtr.asFunction< - CFTimeZoneRef Function(CFCalendarRef)>(); + late final _CFStringGetCharactersPtrPtr = + _lookup Function(CFStringRef)>>( + 'CFStringGetCharactersPtr'); + late final _CFStringGetCharactersPtr1 = _CFStringGetCharactersPtrPtr + .asFunction Function(CFStringRef)>(); - void CFCalendarSetTimeZone( - CFCalendarRef calendar, - CFTimeZoneRef tz, + int CFStringGetBytes( + CFStringRef theString, + CFRange range, + int encoding, + int lossByte, + int isExternalRepresentation, + ffi.Pointer buffer, + int maxBufLen, + ffi.Pointer usedBufLen, ) { - return _CFCalendarSetTimeZone( - calendar, - tz, + return _CFStringGetBytes( + theString, + range, + encoding, + lossByte, + isExternalRepresentation, + buffer, + maxBufLen, + usedBufLen, ); } - late final _CFCalendarSetTimeZonePtr = _lookup< - ffi.NativeFunction>( - 'CFCalendarSetTimeZone'); - late final _CFCalendarSetTimeZone = _CFCalendarSetTimeZonePtr.asFunction< - void Function(CFCalendarRef, CFTimeZoneRef)>(); + late final _CFStringGetBytesPtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFStringRef, + CFRange, + CFStringEncoding, + UInt8, + Boolean, + ffi.Pointer, + CFIndex, + ffi.Pointer)>>('CFStringGetBytes'); + late final _CFStringGetBytes = _CFStringGetBytesPtr.asFunction< + int Function(CFStringRef, CFRange, int, int, int, ffi.Pointer, int, + ffi.Pointer)>(); - int CFCalendarGetFirstWeekday( - CFCalendarRef calendar, + CFStringRef CFStringCreateFromExternalRepresentation( + CFAllocatorRef alloc, + CFDataRef data, + int encoding, ) { - return _CFCalendarGetFirstWeekday( - calendar, + return _CFStringCreateFromExternalRepresentation( + alloc, + data, + encoding, ); } - late final _CFCalendarGetFirstWeekdayPtr = - _lookup>( - 'CFCalendarGetFirstWeekday'); - late final _CFCalendarGetFirstWeekday = - _CFCalendarGetFirstWeekdayPtr.asFunction(); + late final _CFStringCreateFromExternalRepresentationPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDataRef, + CFStringEncoding)>>('CFStringCreateFromExternalRepresentation'); + late final _CFStringCreateFromExternalRepresentation = + _CFStringCreateFromExternalRepresentationPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDataRef, int)>(); - void CFCalendarSetFirstWeekday( - CFCalendarRef calendar, - int wkdy, + CFDataRef CFStringCreateExternalRepresentation( + CFAllocatorRef alloc, + CFStringRef theString, + int encoding, + int lossByte, ) { - return _CFCalendarSetFirstWeekday( - calendar, - wkdy, + return _CFStringCreateExternalRepresentation( + alloc, + theString, + encoding, + lossByte, ); } - late final _CFCalendarSetFirstWeekdayPtr = - _lookup>( - 'CFCalendarSetFirstWeekday'); - late final _CFCalendarSetFirstWeekday = _CFCalendarSetFirstWeekdayPtr - .asFunction(); + late final _CFStringCreateExternalRepresentationPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, CFStringRef, CFStringEncoding, + UInt8)>>('CFStringCreateExternalRepresentation'); + late final _CFStringCreateExternalRepresentation = + _CFStringCreateExternalRepresentationPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFStringRef, int, int)>(); - int CFCalendarGetMinimumDaysInFirstWeek( - CFCalendarRef calendar, + int CFStringGetSmallestEncoding( + CFStringRef theString, ) { - return _CFCalendarGetMinimumDaysInFirstWeek( - calendar, + return _CFStringGetSmallestEncoding( + theString, ); } - late final _CFCalendarGetMinimumDaysInFirstWeekPtr = - _lookup>( - 'CFCalendarGetMinimumDaysInFirstWeek'); - late final _CFCalendarGetMinimumDaysInFirstWeek = - _CFCalendarGetMinimumDaysInFirstWeekPtr.asFunction< - int Function(CFCalendarRef)>(); + late final _CFStringGetSmallestEncodingPtr = + _lookup>( + 'CFStringGetSmallestEncoding'); + late final _CFStringGetSmallestEncoding = + _CFStringGetSmallestEncodingPtr.asFunction(); - void CFCalendarSetMinimumDaysInFirstWeek( - CFCalendarRef calendar, - int mwd, + int CFStringGetFastestEncoding( + CFStringRef theString, ) { - return _CFCalendarSetMinimumDaysInFirstWeek( - calendar, - mwd, + return _CFStringGetFastestEncoding( + theString, ); } - late final _CFCalendarSetMinimumDaysInFirstWeekPtr = - _lookup>( - 'CFCalendarSetMinimumDaysInFirstWeek'); - late final _CFCalendarSetMinimumDaysInFirstWeek = - _CFCalendarSetMinimumDaysInFirstWeekPtr.asFunction< - void Function(CFCalendarRef, int)>(); + late final _CFStringGetFastestEncodingPtr = + _lookup>( + 'CFStringGetFastestEncoding'); + late final _CFStringGetFastestEncoding = + _CFStringGetFastestEncodingPtr.asFunction(); - CFRange CFCalendarGetMinimumRangeOfUnit( - CFCalendarRef calendar, - int unit, - ) { - return _CFCalendarGetMinimumRangeOfUnit( - calendar, - unit, - ); + int CFStringGetSystemEncoding() { + return _CFStringGetSystemEncoding(); } - late final _CFCalendarGetMinimumRangeOfUnitPtr = - _lookup>( - 'CFCalendarGetMinimumRangeOfUnit'); - late final _CFCalendarGetMinimumRangeOfUnit = - _CFCalendarGetMinimumRangeOfUnitPtr.asFunction< - CFRange Function(CFCalendarRef, int)>(); + late final _CFStringGetSystemEncodingPtr = + _lookup>( + 'CFStringGetSystemEncoding'); + late final _CFStringGetSystemEncoding = + _CFStringGetSystemEncodingPtr.asFunction(); - CFRange CFCalendarGetMaximumRangeOfUnit( - CFCalendarRef calendar, - int unit, + int CFStringGetMaximumSizeForEncoding( + int length, + int encoding, ) { - return _CFCalendarGetMaximumRangeOfUnit( - calendar, - unit, + return _CFStringGetMaximumSizeForEncoding( + length, + encoding, ); } - late final _CFCalendarGetMaximumRangeOfUnitPtr = - _lookup>( - 'CFCalendarGetMaximumRangeOfUnit'); - late final _CFCalendarGetMaximumRangeOfUnit = - _CFCalendarGetMaximumRangeOfUnitPtr.asFunction< - CFRange Function(CFCalendarRef, int)>(); + late final _CFStringGetMaximumSizeForEncodingPtr = + _lookup>( + 'CFStringGetMaximumSizeForEncoding'); + late final _CFStringGetMaximumSizeForEncoding = + _CFStringGetMaximumSizeForEncodingPtr.asFunction< + int Function(int, int)>(); - CFRange CFCalendarGetRangeOfUnit( - CFCalendarRef calendar, - int smallerUnit, - int biggerUnit, - double at, + int CFStringGetFileSystemRepresentation( + CFStringRef string, + ffi.Pointer buffer, + int maxBufLen, ) { - return _CFCalendarGetRangeOfUnit( - calendar, - smallerUnit, - biggerUnit, - at, + return _CFStringGetFileSystemRepresentation( + string, + buffer, + maxBufLen, ); } - late final _CFCalendarGetRangeOfUnitPtr = _lookup< + late final _CFStringGetFileSystemRepresentationPtr = _lookup< ffi.NativeFunction< - CFRange Function(CFCalendarRef, ffi.Int32, ffi.Int32, - CFAbsoluteTime)>>('CFCalendarGetRangeOfUnit'); - late final _CFCalendarGetRangeOfUnit = _CFCalendarGetRangeOfUnitPtr - .asFunction(); + Boolean Function(CFStringRef, ffi.Pointer, + CFIndex)>>('CFStringGetFileSystemRepresentation'); + late final _CFStringGetFileSystemRepresentation = + _CFStringGetFileSystemRepresentationPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, int)>(); - int CFCalendarGetOrdinalityOfUnit( - CFCalendarRef calendar, - int smallerUnit, - int biggerUnit, - double at, + int CFStringGetMaximumSizeOfFileSystemRepresentation( + CFStringRef string, ) { - return _CFCalendarGetOrdinalityOfUnit( - calendar, - smallerUnit, - biggerUnit, - at, + return _CFStringGetMaximumSizeOfFileSystemRepresentation( + string, ); } - late final _CFCalendarGetOrdinalityOfUnitPtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFCalendarRef, ffi.Int32, ffi.Int32, - CFAbsoluteTime)>>('CFCalendarGetOrdinalityOfUnit'); - late final _CFCalendarGetOrdinalityOfUnit = _CFCalendarGetOrdinalityOfUnitPtr - .asFunction(); + late final _CFStringGetMaximumSizeOfFileSystemRepresentationPtr = + _lookup>( + 'CFStringGetMaximumSizeOfFileSystemRepresentation'); + late final _CFStringGetMaximumSizeOfFileSystemRepresentation = + _CFStringGetMaximumSizeOfFileSystemRepresentationPtr.asFunction< + int Function(CFStringRef)>(); - int CFCalendarGetTimeRangeOfUnit( - CFCalendarRef calendar, - int unit, - double at, - ffi.Pointer startp, - ffi.Pointer tip, + CFStringRef CFStringCreateWithFileSystemRepresentation( + CFAllocatorRef alloc, + ffi.Pointer buffer, ) { - return _CFCalendarGetTimeRangeOfUnit( - calendar, - unit, - at, - startp, - tip, + return _CFStringCreateWithFileSystemRepresentation( + alloc, + buffer, ); } - late final _CFCalendarGetTimeRangeOfUnitPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFCalendarRef, - ffi.Int32, - CFAbsoluteTime, - ffi.Pointer, - ffi.Pointer)>>('CFCalendarGetTimeRangeOfUnit'); - late final _CFCalendarGetTimeRangeOfUnit = - _CFCalendarGetTimeRangeOfUnitPtr.asFunction< - int Function(CFCalendarRef, int, double, ffi.Pointer, - ffi.Pointer)>(); + late final _CFStringCreateWithFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer)>>( + 'CFStringCreateWithFileSystemRepresentation'); + late final _CFStringCreateWithFileSystemRepresentation = + _CFStringCreateWithFileSystemRepresentationPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer)>(); - int CFCalendarComposeAbsoluteTime( - CFCalendarRef calendar, - ffi.Pointer at, - ffi.Pointer componentDesc, + int CFStringCompareWithOptionsAndLocale( + CFStringRef theString1, + CFStringRef theString2, + CFRange rangeToCompare, + int compareOptions, + CFLocaleRef locale, ) { - return _CFCalendarComposeAbsoluteTime( - calendar, - at, - componentDesc, + return _CFStringCompareWithOptionsAndLocale( + theString1, + theString2, + rangeToCompare, + compareOptions, + locale, ); } - late final _CFCalendarComposeAbsoluteTimePtr = _lookup< + late final _CFStringCompareWithOptionsAndLocalePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFCalendarRef, ffi.Pointer, - ffi.Pointer)>>('CFCalendarComposeAbsoluteTime'); - late final _CFCalendarComposeAbsoluteTime = - _CFCalendarComposeAbsoluteTimePtr.asFunction< - int Function(CFCalendarRef, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, + CFLocaleRef)>>('CFStringCompareWithOptionsAndLocale'); + late final _CFStringCompareWithOptionsAndLocale = + _CFStringCompareWithOptionsAndLocalePtr.asFunction< + int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef)>(); - int CFCalendarDecomposeAbsoluteTime( - CFCalendarRef calendar, - double at, - ffi.Pointer componentDesc, + int CFStringCompareWithOptions( + CFStringRef theString1, + CFStringRef theString2, + CFRange rangeToCompare, + int compareOptions, ) { - return _CFCalendarDecomposeAbsoluteTime( - calendar, - at, - componentDesc, + return _CFStringCompareWithOptions( + theString1, + theString2, + rangeToCompare, + compareOptions, ); } - late final _CFCalendarDecomposeAbsoluteTimePtr = _lookup< + late final _CFStringCompareWithOptionsPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFCalendarRef, CFAbsoluteTime, - ffi.Pointer)>>('CFCalendarDecomposeAbsoluteTime'); - late final _CFCalendarDecomposeAbsoluteTime = - _CFCalendarDecomposeAbsoluteTimePtr.asFunction< - int Function(CFCalendarRef, double, ffi.Pointer)>(); + ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, + ffi.Int32)>>('CFStringCompareWithOptions'); + late final _CFStringCompareWithOptions = _CFStringCompareWithOptionsPtr + .asFunction(); - int CFCalendarAddComponents( - CFCalendarRef calendar, - ffi.Pointer at, - int options, - ffi.Pointer componentDesc, + int CFStringCompare( + CFStringRef theString1, + CFStringRef theString2, + int compareOptions, ) { - return _CFCalendarAddComponents( - calendar, - at, - options, - componentDesc, + return _CFStringCompare( + theString1, + theString2, + compareOptions, ); } - late final _CFCalendarAddComponentsPtr = _lookup< + late final _CFStringComparePtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFCalendarRef, - ffi.Pointer, - CFOptionFlags, - ffi.Pointer)>>('CFCalendarAddComponents'); - late final _CFCalendarAddComponents = _CFCalendarAddComponentsPtr.asFunction< - int Function(CFCalendarRef, ffi.Pointer, int, - ffi.Pointer)>(); + ffi.Int32 Function( + CFStringRef, CFStringRef, ffi.Int32)>>('CFStringCompare'); + late final _CFStringCompare = _CFStringComparePtr.asFunction< + int Function(CFStringRef, CFStringRef, int)>(); - int CFCalendarGetComponentDifference( - CFCalendarRef calendar, - double startingAT, - double resultAT, - int options, - ffi.Pointer componentDesc, + int CFStringFindWithOptionsAndLocale( + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + int searchOptions, + CFLocaleRef locale, + ffi.Pointer result, ) { - return _CFCalendarGetComponentDifference( - calendar, - startingAT, - resultAT, - options, - componentDesc, + return _CFStringFindWithOptionsAndLocale( + theString, + stringToFind, + rangeToSearch, + searchOptions, + locale, + result, ); } - late final _CFCalendarGetComponentDifferencePtr = _lookup< + late final _CFStringFindWithOptionsAndLocalePtr = _lookup< ffi.NativeFunction< Boolean Function( - CFCalendarRef, - CFAbsoluteTime, - CFAbsoluteTime, - CFOptionFlags, - ffi.Pointer)>>('CFCalendarGetComponentDifference'); - late final _CFCalendarGetComponentDifference = - _CFCalendarGetComponentDifferencePtr.asFunction< - int Function( - CFCalendarRef, double, double, int, ffi.Pointer)>(); + CFStringRef, + CFStringRef, + CFRange, + ffi.Int32, + CFLocaleRef, + ffi.Pointer)>>('CFStringFindWithOptionsAndLocale'); + late final _CFStringFindWithOptionsAndLocale = + _CFStringFindWithOptionsAndLocalePtr.asFunction< + int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef, + ffi.Pointer)>(); - CFStringRef CFDateFormatterCreateDateFormatFromTemplate( - CFAllocatorRef allocator, - CFStringRef tmplate, - int options, - CFLocaleRef locale, + int CFStringFindWithOptions( + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + int searchOptions, + ffi.Pointer result, ) { - return _CFDateFormatterCreateDateFormatFromTemplate( - allocator, - tmplate, - options, - locale, + return _CFStringFindWithOptions( + theString, + stringToFind, + rangeToSearch, + searchOptions, + result, ); } - late final _CFDateFormatterCreateDateFormatFromTemplatePtr = _lookup< + late final _CFStringFindWithOptionsPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFOptionFlags, - CFLocaleRef)>>('CFDateFormatterCreateDateFormatFromTemplate'); - late final _CFDateFormatterCreateDateFormatFromTemplate = - _CFDateFormatterCreateDateFormatFromTemplatePtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef, int, CFLocaleRef)>(); - - int CFDateFormatterGetTypeID() { - return _CFDateFormatterGetTypeID(); - } - - late final _CFDateFormatterGetTypeIDPtr = - _lookup>( - 'CFDateFormatterGetTypeID'); - late final _CFDateFormatterGetTypeID = - _CFDateFormatterGetTypeIDPtr.asFunction(); + Boolean Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, + ffi.Pointer)>>('CFStringFindWithOptions'); + late final _CFStringFindWithOptions = _CFStringFindWithOptionsPtr.asFunction< + int Function( + CFStringRef, CFStringRef, CFRange, int, ffi.Pointer)>(); - CFDateFormatterRef CFDateFormatterCreateISO8601Formatter( - CFAllocatorRef allocator, - int formatOptions, + CFArrayRef CFStringCreateArrayWithFindResults( + CFAllocatorRef alloc, + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + int compareOptions, ) { - return _CFDateFormatterCreateISO8601Formatter( - allocator, - formatOptions, + return _CFStringCreateArrayWithFindResults( + alloc, + theString, + stringToFind, + rangeToSearch, + compareOptions, ); } - late final _CFDateFormatterCreateISO8601FormatterPtr = _lookup< + late final _CFStringCreateArrayWithFindResultsPtr = _lookup< ffi.NativeFunction< - CFDateFormatterRef Function(CFAllocatorRef, - ffi.Int32)>>('CFDateFormatterCreateISO8601Formatter'); - late final _CFDateFormatterCreateISO8601Formatter = - _CFDateFormatterCreateISO8601FormatterPtr.asFunction< - CFDateFormatterRef Function(CFAllocatorRef, int)>(); + CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef, CFRange, + ffi.Int32)>>('CFStringCreateArrayWithFindResults'); + late final _CFStringCreateArrayWithFindResults = + _CFStringCreateArrayWithFindResultsPtr.asFunction< + CFArrayRef Function( + CFAllocatorRef, CFStringRef, CFStringRef, CFRange, int)>(); - CFDateFormatterRef CFDateFormatterCreate( - CFAllocatorRef allocator, - CFLocaleRef locale, - int dateStyle, - int timeStyle, + CFRange CFStringFind( + CFStringRef theString, + CFStringRef stringToFind, + int compareOptions, ) { - return _CFDateFormatterCreate( - allocator, - locale, - dateStyle, - timeStyle, + return _CFStringFind( + theString, + stringToFind, + compareOptions, ); } - late final _CFDateFormatterCreatePtr = _lookup< + late final _CFStringFindPtr = _lookup< ffi.NativeFunction< - CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, ffi.Int32, - ffi.Int32)>>('CFDateFormatterCreate'); - late final _CFDateFormatterCreate = _CFDateFormatterCreatePtr.asFunction< - CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, int, int)>(); + CFRange Function( + CFStringRef, CFStringRef, ffi.Int32)>>('CFStringFind'); + late final _CFStringFind = _CFStringFindPtr.asFunction< + CFRange Function(CFStringRef, CFStringRef, int)>(); - CFLocaleRef CFDateFormatterGetLocale( - CFDateFormatterRef formatter, + int CFStringHasPrefix( + CFStringRef theString, + CFStringRef prefix, ) { - return _CFDateFormatterGetLocale( - formatter, + return _CFStringHasPrefix( + theString, + prefix, ); } - late final _CFDateFormatterGetLocalePtr = - _lookup>( - 'CFDateFormatterGetLocale'); - late final _CFDateFormatterGetLocale = _CFDateFormatterGetLocalePtr - .asFunction(); + late final _CFStringHasPrefixPtr = + _lookup>( + 'CFStringHasPrefix'); + late final _CFStringHasPrefix = _CFStringHasPrefixPtr.asFunction< + int Function(CFStringRef, CFStringRef)>(); - int CFDateFormatterGetDateStyle( - CFDateFormatterRef formatter, + int CFStringHasSuffix( + CFStringRef theString, + CFStringRef suffix, ) { - return _CFDateFormatterGetDateStyle( - formatter, + return _CFStringHasSuffix( + theString, + suffix, ); } - late final _CFDateFormatterGetDateStylePtr = - _lookup>( - 'CFDateFormatterGetDateStyle'); - late final _CFDateFormatterGetDateStyle = _CFDateFormatterGetDateStylePtr - .asFunction(); - - int CFDateFormatterGetTimeStyle( - CFDateFormatterRef formatter, - ) { - return _CFDateFormatterGetTimeStyle( - formatter, - ); - } - - late final _CFDateFormatterGetTimeStylePtr = - _lookup>( - 'CFDateFormatterGetTimeStyle'); - late final _CFDateFormatterGetTimeStyle = _CFDateFormatterGetTimeStylePtr - .asFunction(); + late final _CFStringHasSuffixPtr = + _lookup>( + 'CFStringHasSuffix'); + late final _CFStringHasSuffix = _CFStringHasSuffixPtr.asFunction< + int Function(CFStringRef, CFStringRef)>(); - CFStringRef CFDateFormatterGetFormat( - CFDateFormatterRef formatter, + CFRange CFStringGetRangeOfComposedCharactersAtIndex( + CFStringRef theString, + int theIndex, ) { - return _CFDateFormatterGetFormat( - formatter, + return _CFStringGetRangeOfComposedCharactersAtIndex( + theString, + theIndex, ); } - late final _CFDateFormatterGetFormatPtr = - _lookup>( - 'CFDateFormatterGetFormat'); - late final _CFDateFormatterGetFormat = _CFDateFormatterGetFormatPtr - .asFunction(); + late final _CFStringGetRangeOfComposedCharactersAtIndexPtr = + _lookup>( + 'CFStringGetRangeOfComposedCharactersAtIndex'); + late final _CFStringGetRangeOfComposedCharactersAtIndex = + _CFStringGetRangeOfComposedCharactersAtIndexPtr.asFunction< + CFRange Function(CFStringRef, int)>(); - void CFDateFormatterSetFormat( - CFDateFormatterRef formatter, - CFStringRef formatString, + int CFStringFindCharacterFromSet( + CFStringRef theString, + CFCharacterSetRef theSet, + CFRange rangeToSearch, + int searchOptions, + ffi.Pointer result, ) { - return _CFDateFormatterSetFormat( - formatter, - formatString, + return _CFStringFindCharacterFromSet( + theString, + theSet, + rangeToSearch, + searchOptions, + result, ); } - late final _CFDateFormatterSetFormatPtr = _lookup< + late final _CFStringFindCharacterFromSetPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFDateFormatterRef, CFStringRef)>>('CFDateFormatterSetFormat'); - late final _CFDateFormatterSetFormat = _CFDateFormatterSetFormatPtr - .asFunction(); + Boolean Function(CFStringRef, CFCharacterSetRef, CFRange, ffi.Int32, + ffi.Pointer)>>('CFStringFindCharacterFromSet'); + late final _CFStringFindCharacterFromSet = + _CFStringFindCharacterFromSetPtr.asFunction< + int Function(CFStringRef, CFCharacterSetRef, CFRange, int, + ffi.Pointer)>(); - CFStringRef CFDateFormatterCreateStringWithDate( - CFAllocatorRef allocator, - CFDateFormatterRef formatter, - CFDateRef date, + void CFStringGetLineBounds( + CFStringRef theString, + CFRange range, + ffi.Pointer lineBeginIndex, + ffi.Pointer lineEndIndex, + ffi.Pointer contentsEndIndex, ) { - return _CFDateFormatterCreateStringWithDate( - allocator, - formatter, - date, + return _CFStringGetLineBounds( + theString, + range, + lineBeginIndex, + lineEndIndex, + contentsEndIndex, ); } - late final _CFDateFormatterCreateStringWithDatePtr = _lookup< + late final _CFStringGetLineBoundsPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, - CFDateRef)>>('CFDateFormatterCreateStringWithDate'); - late final _CFDateFormatterCreateStringWithDate = - _CFDateFormatterCreateStringWithDatePtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFDateFormatterRef, CFDateRef)>(); + ffi.Void Function( + CFStringRef, + CFRange, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('CFStringGetLineBounds'); + late final _CFStringGetLineBounds = _CFStringGetLineBoundsPtr.asFunction< + void Function(CFStringRef, CFRange, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - CFStringRef CFDateFormatterCreateStringWithAbsoluteTime( - CFAllocatorRef allocator, - CFDateFormatterRef formatter, - double at, + void CFStringGetParagraphBounds( + CFStringRef string, + CFRange range, + ffi.Pointer parBeginIndex, + ffi.Pointer parEndIndex, + ffi.Pointer contentsEndIndex, ) { - return _CFDateFormatterCreateStringWithAbsoluteTime( - allocator, - formatter, - at, + return _CFStringGetParagraphBounds( + string, + range, + parBeginIndex, + parEndIndex, + contentsEndIndex, ); } - late final _CFDateFormatterCreateStringWithAbsoluteTimePtr = _lookup< + late final _CFStringGetParagraphBoundsPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, - CFAbsoluteTime)>>('CFDateFormatterCreateStringWithAbsoluteTime'); - late final _CFDateFormatterCreateStringWithAbsoluteTime = - _CFDateFormatterCreateStringWithAbsoluteTimePtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, double)>(); + ffi.Void Function( + CFStringRef, + CFRange, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('CFStringGetParagraphBounds'); + late final _CFStringGetParagraphBounds = + _CFStringGetParagraphBoundsPtr.asFunction< + void Function(CFStringRef, CFRange, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - CFDateRef CFDateFormatterCreateDateFromString( - CFAllocatorRef allocator, - CFDateFormatterRef formatter, + int CFStringGetHyphenationLocationBeforeIndex( CFStringRef string, - ffi.Pointer rangep, + int location, + CFRange limitRange, + int options, + CFLocaleRef locale, + ffi.Pointer character, ) { - return _CFDateFormatterCreateDateFromString( - allocator, - formatter, + return _CFStringGetHyphenationLocationBeforeIndex( string, - rangep, + location, + limitRange, + options, + locale, + character, ); } - late final _CFDateFormatterCreateDateFromStringPtr = _lookup< - ffi.NativeFunction< - CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, - ffi.Pointer)>>('CFDateFormatterCreateDateFromString'); - late final _CFDateFormatterCreateDateFromString = - _CFDateFormatterCreateDateFromStringPtr.asFunction< - CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, - ffi.Pointer)>(); + late final _CFStringGetHyphenationLocationBeforeIndexPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFStringRef, CFIndex, CFRange, CFOptionFlags, + CFLocaleRef, ffi.Pointer)>>( + 'CFStringGetHyphenationLocationBeforeIndex'); + late final _CFStringGetHyphenationLocationBeforeIndex = + _CFStringGetHyphenationLocationBeforeIndexPtr.asFunction< + int Function(CFStringRef, int, CFRange, int, CFLocaleRef, + ffi.Pointer)>(); - int CFDateFormatterGetAbsoluteTimeFromString( - CFDateFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, - ffi.Pointer atp, + int CFStringIsHyphenationAvailableForLocale( + CFLocaleRef locale, ) { - return _CFDateFormatterGetAbsoluteTimeFromString( - formatter, - string, - rangep, - atp, + return _CFStringIsHyphenationAvailableForLocale( + locale, ); } - late final _CFDateFormatterGetAbsoluteTimeFromStringPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFDateFormatterRef, CFStringRef, - ffi.Pointer, ffi.Pointer)>>( - 'CFDateFormatterGetAbsoluteTimeFromString'); - late final _CFDateFormatterGetAbsoluteTimeFromString = - _CFDateFormatterGetAbsoluteTimeFromStringPtr.asFunction< - int Function(CFDateFormatterRef, CFStringRef, ffi.Pointer, - ffi.Pointer)>(); + late final _CFStringIsHyphenationAvailableForLocalePtr = + _lookup>( + 'CFStringIsHyphenationAvailableForLocale'); + late final _CFStringIsHyphenationAvailableForLocale = + _CFStringIsHyphenationAvailableForLocalePtr.asFunction< + int Function(CFLocaleRef)>(); - void CFDateFormatterSetProperty( - CFDateFormatterRef formatter, - CFStringRef key, - CFTypeRef value, + CFStringRef CFStringCreateByCombiningStrings( + CFAllocatorRef alloc, + CFArrayRef theArray, + CFStringRef separatorString, ) { - return _CFDateFormatterSetProperty( - formatter, - key, - value, + return _CFStringCreateByCombiningStrings( + alloc, + theArray, + separatorString, ); } - late final _CFDateFormatterSetPropertyPtr = _lookup< + late final _CFStringCreateByCombiningStringsPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFDateFormatterRef, CFStringRef, - CFTypeRef)>>('CFDateFormatterSetProperty'); - late final _CFDateFormatterSetProperty = _CFDateFormatterSetPropertyPtr - .asFunction(); + CFStringRef Function(CFAllocatorRef, CFArrayRef, + CFStringRef)>>('CFStringCreateByCombiningStrings'); + late final _CFStringCreateByCombiningStrings = + _CFStringCreateByCombiningStringsPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFArrayRef, CFStringRef)>(); - CFTypeRef CFDateFormatterCopyProperty( - CFDateFormatterRef formatter, - CFDateFormatterKey key, + CFArrayRef CFStringCreateArrayBySeparatingStrings( + CFAllocatorRef alloc, + CFStringRef theString, + CFStringRef separatorString, ) { - return _CFDateFormatterCopyProperty( - formatter, - key, + return _CFStringCreateArrayBySeparatingStrings( + alloc, + theString, + separatorString, ); } - late final _CFDateFormatterCopyPropertyPtr = _lookup< + late final _CFStringCreateArrayBySeparatingStringsPtr = _lookup< ffi.NativeFunction< - CFTypeRef Function(CFDateFormatterRef, - CFDateFormatterKey)>>('CFDateFormatterCopyProperty'); - late final _CFDateFormatterCopyProperty = _CFDateFormatterCopyPropertyPtr - .asFunction(); - - late final ffi.Pointer _kCFDateFormatterIsLenient = - _lookup('kCFDateFormatterIsLenient'); - - CFDateFormatterKey get kCFDateFormatterIsLenient => - _kCFDateFormatterIsLenient.value; - - set kCFDateFormatterIsLenient(CFDateFormatterKey value) => - _kCFDateFormatterIsLenient.value = value; + CFArrayRef Function(CFAllocatorRef, CFStringRef, + CFStringRef)>>('CFStringCreateArrayBySeparatingStrings'); + late final _CFStringCreateArrayBySeparatingStrings = + _CFStringCreateArrayBySeparatingStringsPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFDateFormatterTimeZone = - _lookup('kCFDateFormatterTimeZone'); + int CFStringGetIntValue( + CFStringRef str, + ) { + return _CFStringGetIntValue( + str, + ); + } - CFDateFormatterKey get kCFDateFormatterTimeZone => - _kCFDateFormatterTimeZone.value; + late final _CFStringGetIntValuePtr = + _lookup>( + 'CFStringGetIntValue'); + late final _CFStringGetIntValue = + _CFStringGetIntValuePtr.asFunction(); - set kCFDateFormatterTimeZone(CFDateFormatterKey value) => - _kCFDateFormatterTimeZone.value = value; + double CFStringGetDoubleValue( + CFStringRef str, + ) { + return _CFStringGetDoubleValue( + str, + ); + } - late final ffi.Pointer _kCFDateFormatterCalendarName = - _lookup('kCFDateFormatterCalendarName'); + late final _CFStringGetDoubleValuePtr = + _lookup>( + 'CFStringGetDoubleValue'); + late final _CFStringGetDoubleValue = + _CFStringGetDoubleValuePtr.asFunction(); - CFDateFormatterKey get kCFDateFormatterCalendarName => - _kCFDateFormatterCalendarName.value; + void CFStringAppend( + CFMutableStringRef theString, + CFStringRef appendedString, + ) { + return _CFStringAppend( + theString, + appendedString, + ); + } - set kCFDateFormatterCalendarName(CFDateFormatterKey value) => - _kCFDateFormatterCalendarName.value = value; + late final _CFStringAppendPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFStringRef)>>('CFStringAppend'); + late final _CFStringAppend = _CFStringAppendPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFDateFormatterDefaultFormat = - _lookup('kCFDateFormatterDefaultFormat'); + void CFStringAppendCharacters( + CFMutableStringRef theString, + ffi.Pointer chars, + int numChars, + ) { + return _CFStringAppendCharacters( + theString, + chars, + numChars, + ); + } - CFDateFormatterKey get kCFDateFormatterDefaultFormat => - _kCFDateFormatterDefaultFormat.value; + late final _CFStringAppendCharactersPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ffi.Pointer, + CFIndex)>>('CFStringAppendCharacters'); + late final _CFStringAppendCharacters = + _CFStringAppendCharactersPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int)>(); - set kCFDateFormatterDefaultFormat(CFDateFormatterKey value) => - _kCFDateFormatterDefaultFormat.value = value; + void CFStringAppendPascalString( + CFMutableStringRef theString, + ConstStr255Param pStr, + int encoding, + ) { + return _CFStringAppendPascalString( + theString, + pStr, + encoding, + ); + } - late final ffi.Pointer - _kCFDateFormatterTwoDigitStartDate = - _lookup('kCFDateFormatterTwoDigitStartDate'); + late final _CFStringAppendPascalStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ConstStr255Param, + CFStringEncoding)>>('CFStringAppendPascalString'); + late final _CFStringAppendPascalString = _CFStringAppendPascalStringPtr + .asFunction(); - CFDateFormatterKey get kCFDateFormatterTwoDigitStartDate => - _kCFDateFormatterTwoDigitStartDate.value; + void CFStringAppendCString( + CFMutableStringRef theString, + ffi.Pointer cStr, + int encoding, + ) { + return _CFStringAppendCString( + theString, + cStr, + encoding, + ); + } - set kCFDateFormatterTwoDigitStartDate(CFDateFormatterKey value) => - _kCFDateFormatterTwoDigitStartDate.value = value; + late final _CFStringAppendCStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ffi.Pointer, + CFStringEncoding)>>('CFStringAppendCString'); + late final _CFStringAppendCString = _CFStringAppendCStringPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int)>(); - late final ffi.Pointer _kCFDateFormatterDefaultDate = - _lookup('kCFDateFormatterDefaultDate'); + void CFStringAppendFormat( + CFMutableStringRef theString, + CFDictionaryRef formatOptions, + CFStringRef format, + ) { + return _CFStringAppendFormat( + theString, + formatOptions, + format, + ); + } - CFDateFormatterKey get kCFDateFormatterDefaultDate => - _kCFDateFormatterDefaultDate.value; + late final _CFStringAppendFormatPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFDictionaryRef, + CFStringRef)>>('CFStringAppendFormat'); + late final _CFStringAppendFormat = _CFStringAppendFormatPtr.asFunction< + void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef)>(); - set kCFDateFormatterDefaultDate(CFDateFormatterKey value) => - _kCFDateFormatterDefaultDate.value = value; + void CFStringAppendFormatAndArguments( + CFMutableStringRef theString, + CFDictionaryRef formatOptions, + CFStringRef format, + va_list arguments, + ) { + return _CFStringAppendFormatAndArguments( + theString, + formatOptions, + format, + arguments, + ); + } - late final ffi.Pointer _kCFDateFormatterCalendar = - _lookup('kCFDateFormatterCalendar'); + late final _CFStringAppendFormatAndArgumentsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef, + va_list)>>('CFStringAppendFormatAndArguments'); + late final _CFStringAppendFormatAndArguments = + _CFStringAppendFormatAndArgumentsPtr.asFunction< + void Function( + CFMutableStringRef, CFDictionaryRef, CFStringRef, va_list)>(); - CFDateFormatterKey get kCFDateFormatterCalendar => - _kCFDateFormatterCalendar.value; + void CFStringInsert( + CFMutableStringRef str, + int idx, + CFStringRef insertedStr, + ) { + return _CFStringInsert( + str, + idx, + insertedStr, + ); + } - set kCFDateFormatterCalendar(CFDateFormatterKey value) => - _kCFDateFormatterCalendar.value = value; + late final _CFStringInsertPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFIndex, CFStringRef)>>('CFStringInsert'); + late final _CFStringInsert = _CFStringInsertPtr.asFunction< + void Function(CFMutableStringRef, int, CFStringRef)>(); - late final ffi.Pointer _kCFDateFormatterEraSymbols = - _lookup('kCFDateFormatterEraSymbols'); + void CFStringDelete( + CFMutableStringRef theString, + CFRange range, + ) { + return _CFStringDelete( + theString, + range, + ); + } - CFDateFormatterKey get kCFDateFormatterEraSymbols => - _kCFDateFormatterEraSymbols.value; + late final _CFStringDeletePtr = _lookup< + ffi.NativeFunction>( + 'CFStringDelete'); + late final _CFStringDelete = _CFStringDeletePtr.asFunction< + void Function(CFMutableStringRef, CFRange)>(); - set kCFDateFormatterEraSymbols(CFDateFormatterKey value) => - _kCFDateFormatterEraSymbols.value = value; + void CFStringReplace( + CFMutableStringRef theString, + CFRange range, + CFStringRef replacement, + ) { + return _CFStringReplace( + theString, + range, + replacement, + ); + } - late final ffi.Pointer _kCFDateFormatterMonthSymbols = - _lookup('kCFDateFormatterMonthSymbols'); + late final _CFStringReplacePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFRange, CFStringRef)>>('CFStringReplace'); + late final _CFStringReplace = _CFStringReplacePtr.asFunction< + void Function(CFMutableStringRef, CFRange, CFStringRef)>(); - CFDateFormatterKey get kCFDateFormatterMonthSymbols => - _kCFDateFormatterMonthSymbols.value; + void CFStringReplaceAll( + CFMutableStringRef theString, + CFStringRef replacement, + ) { + return _CFStringReplaceAll( + theString, + replacement, + ); + } - set kCFDateFormatterMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterMonthSymbols.value = value; + late final _CFStringReplaceAllPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFStringRef)>>('CFStringReplaceAll'); + late final _CFStringReplaceAll = _CFStringReplaceAllPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); - late final ffi.Pointer - _kCFDateFormatterShortMonthSymbols = - _lookup('kCFDateFormatterShortMonthSymbols'); - - CFDateFormatterKey get kCFDateFormatterShortMonthSymbols => - _kCFDateFormatterShortMonthSymbols.value; + int CFStringFindAndReplace( + CFMutableStringRef theString, + CFStringRef stringToFind, + CFStringRef replacementString, + CFRange rangeToSearch, + int compareOptions, + ) { + return _CFStringFindAndReplace( + theString, + stringToFind, + replacementString, + rangeToSearch, + compareOptions, + ); + } - set kCFDateFormatterShortMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortMonthSymbols.value = value; + late final _CFStringFindAndReplacePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFMutableStringRef, CFStringRef, CFStringRef, + CFRange, ffi.Int32)>>('CFStringFindAndReplace'); + late final _CFStringFindAndReplace = _CFStringFindAndReplacePtr.asFunction< + int Function( + CFMutableStringRef, CFStringRef, CFStringRef, CFRange, int)>(); - late final ffi.Pointer _kCFDateFormatterWeekdaySymbols = - _lookup('kCFDateFormatterWeekdaySymbols'); + void CFStringSetExternalCharactersNoCopy( + CFMutableStringRef theString, + ffi.Pointer chars, + int length, + int capacity, + ) { + return _CFStringSetExternalCharactersNoCopy( + theString, + chars, + length, + capacity, + ); + } - CFDateFormatterKey get kCFDateFormatterWeekdaySymbols => - _kCFDateFormatterWeekdaySymbols.value; + late final _CFStringSetExternalCharactersNoCopyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ffi.Pointer, CFIndex, + CFIndex)>>('CFStringSetExternalCharactersNoCopy'); + late final _CFStringSetExternalCharactersNoCopy = + _CFStringSetExternalCharactersNoCopyPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int, int)>(); - set kCFDateFormatterWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterWeekdaySymbols.value = value; + void CFStringPad( + CFMutableStringRef theString, + CFStringRef padString, + int length, + int indexIntoPad, + ) { + return _CFStringPad( + theString, + padString, + length, + indexIntoPad, + ); + } - late final ffi.Pointer - _kCFDateFormatterShortWeekdaySymbols = - _lookup('kCFDateFormatterShortWeekdaySymbols'); + late final _CFStringPadPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFStringRef, CFIndex, + CFIndex)>>('CFStringPad'); + late final _CFStringPad = _CFStringPadPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef, int, int)>(); - CFDateFormatterKey get kCFDateFormatterShortWeekdaySymbols => - _kCFDateFormatterShortWeekdaySymbols.value; + void CFStringTrim( + CFMutableStringRef theString, + CFStringRef trimString, + ) { + return _CFStringTrim( + theString, + trimString, + ); + } - set kCFDateFormatterShortWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortWeekdaySymbols.value = value; + late final _CFStringTrimPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFStringRef)>>('CFStringTrim'); + late final _CFStringTrim = _CFStringTrimPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFDateFormatterAMSymbol = - _lookup('kCFDateFormatterAMSymbol'); + void CFStringTrimWhitespace( + CFMutableStringRef theString, + ) { + return _CFStringTrimWhitespace( + theString, + ); + } - CFDateFormatterKey get kCFDateFormatterAMSymbol => - _kCFDateFormatterAMSymbol.value; + late final _CFStringTrimWhitespacePtr = + _lookup>( + 'CFStringTrimWhitespace'); + late final _CFStringTrimWhitespace = _CFStringTrimWhitespacePtr.asFunction< + void Function(CFMutableStringRef)>(); - set kCFDateFormatterAMSymbol(CFDateFormatterKey value) => - _kCFDateFormatterAMSymbol.value = value; + void CFStringLowercase( + CFMutableStringRef theString, + CFLocaleRef locale, + ) { + return _CFStringLowercase( + theString, + locale, + ); + } - late final ffi.Pointer _kCFDateFormatterPMSymbol = - _lookup('kCFDateFormatterPMSymbol'); + late final _CFStringLowercasePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFLocaleRef)>>('CFStringLowercase'); + late final _CFStringLowercase = _CFStringLowercasePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); - CFDateFormatterKey get kCFDateFormatterPMSymbol => - _kCFDateFormatterPMSymbol.value; + void CFStringUppercase( + CFMutableStringRef theString, + CFLocaleRef locale, + ) { + return _CFStringUppercase( + theString, + locale, + ); + } - set kCFDateFormatterPMSymbol(CFDateFormatterKey value) => - _kCFDateFormatterPMSymbol.value = value; + late final _CFStringUppercasePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFLocaleRef)>>('CFStringUppercase'); + late final _CFStringUppercase = _CFStringUppercasePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); - late final ffi.Pointer _kCFDateFormatterLongEraSymbols = - _lookup('kCFDateFormatterLongEraSymbols'); + void CFStringCapitalize( + CFMutableStringRef theString, + CFLocaleRef locale, + ) { + return _CFStringCapitalize( + theString, + locale, + ); + } - CFDateFormatterKey get kCFDateFormatterLongEraSymbols => - _kCFDateFormatterLongEraSymbols.value; + late final _CFStringCapitalizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFLocaleRef)>>('CFStringCapitalize'); + late final _CFStringCapitalize = _CFStringCapitalizePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); - set kCFDateFormatterLongEraSymbols(CFDateFormatterKey value) => - _kCFDateFormatterLongEraSymbols.value = value; + void CFStringNormalize( + CFMutableStringRef theString, + int theForm, + ) { + return _CFStringNormalize( + theString, + theForm, + ); + } - late final ffi.Pointer - _kCFDateFormatterVeryShortMonthSymbols = - _lookup('kCFDateFormatterVeryShortMonthSymbols'); + late final _CFStringNormalizePtr = _lookup< + ffi.NativeFunction>( + 'CFStringNormalize'); + late final _CFStringNormalize = _CFStringNormalizePtr.asFunction< + void Function(CFMutableStringRef, int)>(); - CFDateFormatterKey get kCFDateFormatterVeryShortMonthSymbols => - _kCFDateFormatterVeryShortMonthSymbols.value; + void CFStringFold( + CFMutableStringRef theString, + int theFlags, + CFLocaleRef theLocale, + ) { + return _CFStringFold( + theString, + theFlags, + theLocale, + ); + } - set kCFDateFormatterVeryShortMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterVeryShortMonthSymbols.value = value; + late final _CFStringFoldPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, ffi.Int32, CFLocaleRef)>>('CFStringFold'); + late final _CFStringFold = _CFStringFoldPtr.asFunction< + void Function(CFMutableStringRef, int, CFLocaleRef)>(); - late final ffi.Pointer - _kCFDateFormatterStandaloneMonthSymbols = - _lookup('kCFDateFormatterStandaloneMonthSymbols'); + int CFStringTransform( + CFMutableStringRef string, + ffi.Pointer range, + CFStringRef transform, + int reverse, + ) { + return _CFStringTransform( + string, + range, + transform, + reverse, + ); + } - CFDateFormatterKey get kCFDateFormatterStandaloneMonthSymbols => - _kCFDateFormatterStandaloneMonthSymbols.value; + late final _CFStringTransformPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFMutableStringRef, ffi.Pointer, + CFStringRef, Boolean)>>('CFStringTransform'); + late final _CFStringTransform = _CFStringTransformPtr.asFunction< + int Function( + CFMutableStringRef, ffi.Pointer, CFStringRef, int)>(); - set kCFDateFormatterStandaloneMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterStandaloneMonthSymbols.value = value; + late final ffi.Pointer _kCFStringTransformStripCombiningMarks = + _lookup('kCFStringTransformStripCombiningMarks'); - late final ffi.Pointer - _kCFDateFormatterShortStandaloneMonthSymbols = - _lookup( - 'kCFDateFormatterShortStandaloneMonthSymbols'); + CFStringRef get kCFStringTransformStripCombiningMarks => + _kCFStringTransformStripCombiningMarks.value; - CFDateFormatterKey get kCFDateFormatterShortStandaloneMonthSymbols => - _kCFDateFormatterShortStandaloneMonthSymbols.value; + set kCFStringTransformStripCombiningMarks(CFStringRef value) => + _kCFStringTransformStripCombiningMarks.value = value; - set kCFDateFormatterShortStandaloneMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortStandaloneMonthSymbols.value = value; + late final ffi.Pointer _kCFStringTransformToLatin = + _lookup('kCFStringTransformToLatin'); - late final ffi.Pointer - _kCFDateFormatterVeryShortStandaloneMonthSymbols = - _lookup( - 'kCFDateFormatterVeryShortStandaloneMonthSymbols'); + CFStringRef get kCFStringTransformToLatin => _kCFStringTransformToLatin.value; - CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneMonthSymbols => - _kCFDateFormatterVeryShortStandaloneMonthSymbols.value; + set kCFStringTransformToLatin(CFStringRef value) => + _kCFStringTransformToLatin.value = value; - set kCFDateFormatterVeryShortStandaloneMonthSymbols( - CFDateFormatterKey value) => - _kCFDateFormatterVeryShortStandaloneMonthSymbols.value = value; + late final ffi.Pointer _kCFStringTransformFullwidthHalfwidth = + _lookup('kCFStringTransformFullwidthHalfwidth'); - late final ffi.Pointer - _kCFDateFormatterVeryShortWeekdaySymbols = - _lookup('kCFDateFormatterVeryShortWeekdaySymbols'); + CFStringRef get kCFStringTransformFullwidthHalfwidth => + _kCFStringTransformFullwidthHalfwidth.value; - CFDateFormatterKey get kCFDateFormatterVeryShortWeekdaySymbols => - _kCFDateFormatterVeryShortWeekdaySymbols.value; + set kCFStringTransformFullwidthHalfwidth(CFStringRef value) => + _kCFStringTransformFullwidthHalfwidth.value = value; - set kCFDateFormatterVeryShortWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterVeryShortWeekdaySymbols.value = value; + late final ffi.Pointer _kCFStringTransformLatinKatakana = + _lookup('kCFStringTransformLatinKatakana'); - late final ffi.Pointer - _kCFDateFormatterStandaloneWeekdaySymbols = - _lookup('kCFDateFormatterStandaloneWeekdaySymbols'); + CFStringRef get kCFStringTransformLatinKatakana => + _kCFStringTransformLatinKatakana.value; - CFDateFormatterKey get kCFDateFormatterStandaloneWeekdaySymbols => - _kCFDateFormatterStandaloneWeekdaySymbols.value; + set kCFStringTransformLatinKatakana(CFStringRef value) => + _kCFStringTransformLatinKatakana.value = value; - set kCFDateFormatterStandaloneWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterStandaloneWeekdaySymbols.value = value; + late final ffi.Pointer _kCFStringTransformLatinHiragana = + _lookup('kCFStringTransformLatinHiragana'); - late final ffi.Pointer - _kCFDateFormatterShortStandaloneWeekdaySymbols = - _lookup( - 'kCFDateFormatterShortStandaloneWeekdaySymbols'); + CFStringRef get kCFStringTransformLatinHiragana => + _kCFStringTransformLatinHiragana.value; - CFDateFormatterKey get kCFDateFormatterShortStandaloneWeekdaySymbols => - _kCFDateFormatterShortStandaloneWeekdaySymbols.value; + set kCFStringTransformLatinHiragana(CFStringRef value) => + _kCFStringTransformLatinHiragana.value = value; - set kCFDateFormatterShortStandaloneWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortStandaloneWeekdaySymbols.value = value; + late final ffi.Pointer _kCFStringTransformHiraganaKatakana = + _lookup('kCFStringTransformHiraganaKatakana'); - late final ffi.Pointer - _kCFDateFormatterVeryShortStandaloneWeekdaySymbols = - _lookup( - 'kCFDateFormatterVeryShortStandaloneWeekdaySymbols'); + CFStringRef get kCFStringTransformHiraganaKatakana => + _kCFStringTransformHiraganaKatakana.value; - CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneWeekdaySymbols => - _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value; + set kCFStringTransformHiraganaKatakana(CFStringRef value) => + _kCFStringTransformHiraganaKatakana.value = value; - set kCFDateFormatterVeryShortStandaloneWeekdaySymbols( - CFDateFormatterKey value) => - _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value = value; + late final ffi.Pointer _kCFStringTransformMandarinLatin = + _lookup('kCFStringTransformMandarinLatin'); - late final ffi.Pointer _kCFDateFormatterQuarterSymbols = - _lookup('kCFDateFormatterQuarterSymbols'); + CFStringRef get kCFStringTransformMandarinLatin => + _kCFStringTransformMandarinLatin.value; - CFDateFormatterKey get kCFDateFormatterQuarterSymbols => - _kCFDateFormatterQuarterSymbols.value; + set kCFStringTransformMandarinLatin(CFStringRef value) => + _kCFStringTransformMandarinLatin.value = value; - set kCFDateFormatterQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterQuarterSymbols.value = value; + late final ffi.Pointer _kCFStringTransformLatinHangul = + _lookup('kCFStringTransformLatinHangul'); - late final ffi.Pointer - _kCFDateFormatterShortQuarterSymbols = - _lookup('kCFDateFormatterShortQuarterSymbols'); + CFStringRef get kCFStringTransformLatinHangul => + _kCFStringTransformLatinHangul.value; - CFDateFormatterKey get kCFDateFormatterShortQuarterSymbols => - _kCFDateFormatterShortQuarterSymbols.value; + set kCFStringTransformLatinHangul(CFStringRef value) => + _kCFStringTransformLatinHangul.value = value; - set kCFDateFormatterShortQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortQuarterSymbols.value = value; + late final ffi.Pointer _kCFStringTransformLatinArabic = + _lookup('kCFStringTransformLatinArabic'); - late final ffi.Pointer - _kCFDateFormatterStandaloneQuarterSymbols = - _lookup('kCFDateFormatterStandaloneQuarterSymbols'); + CFStringRef get kCFStringTransformLatinArabic => + _kCFStringTransformLatinArabic.value; - CFDateFormatterKey get kCFDateFormatterStandaloneQuarterSymbols => - _kCFDateFormatterStandaloneQuarterSymbols.value; + set kCFStringTransformLatinArabic(CFStringRef value) => + _kCFStringTransformLatinArabic.value = value; - set kCFDateFormatterStandaloneQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterStandaloneQuarterSymbols.value = value; + late final ffi.Pointer _kCFStringTransformLatinHebrew = + _lookup('kCFStringTransformLatinHebrew'); - late final ffi.Pointer - _kCFDateFormatterShortStandaloneQuarterSymbols = - _lookup( - 'kCFDateFormatterShortStandaloneQuarterSymbols'); + CFStringRef get kCFStringTransformLatinHebrew => + _kCFStringTransformLatinHebrew.value; - CFDateFormatterKey get kCFDateFormatterShortStandaloneQuarterSymbols => - _kCFDateFormatterShortStandaloneQuarterSymbols.value; + set kCFStringTransformLatinHebrew(CFStringRef value) => + _kCFStringTransformLatinHebrew.value = value; - set kCFDateFormatterShortStandaloneQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortStandaloneQuarterSymbols.value = value; + late final ffi.Pointer _kCFStringTransformLatinThai = + _lookup('kCFStringTransformLatinThai'); - late final ffi.Pointer - _kCFDateFormatterGregorianStartDate = - _lookup('kCFDateFormatterGregorianStartDate'); + CFStringRef get kCFStringTransformLatinThai => + _kCFStringTransformLatinThai.value; - CFDateFormatterKey get kCFDateFormatterGregorianStartDate => - _kCFDateFormatterGregorianStartDate.value; + set kCFStringTransformLatinThai(CFStringRef value) => + _kCFStringTransformLatinThai.value = value; - set kCFDateFormatterGregorianStartDate(CFDateFormatterKey value) => - _kCFDateFormatterGregorianStartDate.value = value; + late final ffi.Pointer _kCFStringTransformLatinCyrillic = + _lookup('kCFStringTransformLatinCyrillic'); - late final ffi.Pointer - _kCFDateFormatterDoesRelativeDateFormattingKey = - _lookup( - 'kCFDateFormatterDoesRelativeDateFormattingKey'); + CFStringRef get kCFStringTransformLatinCyrillic => + _kCFStringTransformLatinCyrillic.value; - CFDateFormatterKey get kCFDateFormatterDoesRelativeDateFormattingKey => - _kCFDateFormatterDoesRelativeDateFormattingKey.value; + set kCFStringTransformLatinCyrillic(CFStringRef value) => + _kCFStringTransformLatinCyrillic.value = value; - set kCFDateFormatterDoesRelativeDateFormattingKey(CFDateFormatterKey value) => - _kCFDateFormatterDoesRelativeDateFormattingKey.value = value; + late final ffi.Pointer _kCFStringTransformLatinGreek = + _lookup('kCFStringTransformLatinGreek'); - int CFErrorGetTypeID() { - return _CFErrorGetTypeID(); - } + CFStringRef get kCFStringTransformLatinGreek => + _kCFStringTransformLatinGreek.value; - late final _CFErrorGetTypeIDPtr = - _lookup>('CFErrorGetTypeID'); - late final _CFErrorGetTypeID = - _CFErrorGetTypeIDPtr.asFunction(); + set kCFStringTransformLatinGreek(CFStringRef value) => + _kCFStringTransformLatinGreek.value = value; - late final ffi.Pointer _kCFErrorDomainPOSIX = - _lookup('kCFErrorDomainPOSIX'); + late final ffi.Pointer _kCFStringTransformToXMLHex = + _lookup('kCFStringTransformToXMLHex'); - CFErrorDomain get kCFErrorDomainPOSIX => _kCFErrorDomainPOSIX.value; + CFStringRef get kCFStringTransformToXMLHex => + _kCFStringTransformToXMLHex.value; - set kCFErrorDomainPOSIX(CFErrorDomain value) => - _kCFErrorDomainPOSIX.value = value; + set kCFStringTransformToXMLHex(CFStringRef value) => + _kCFStringTransformToXMLHex.value = value; - late final ffi.Pointer _kCFErrorDomainOSStatus = - _lookup('kCFErrorDomainOSStatus'); + late final ffi.Pointer _kCFStringTransformToUnicodeName = + _lookup('kCFStringTransformToUnicodeName'); - CFErrorDomain get kCFErrorDomainOSStatus => _kCFErrorDomainOSStatus.value; + CFStringRef get kCFStringTransformToUnicodeName => + _kCFStringTransformToUnicodeName.value; - set kCFErrorDomainOSStatus(CFErrorDomain value) => - _kCFErrorDomainOSStatus.value = value; + set kCFStringTransformToUnicodeName(CFStringRef value) => + _kCFStringTransformToUnicodeName.value = value; - late final ffi.Pointer _kCFErrorDomainMach = - _lookup('kCFErrorDomainMach'); + late final ffi.Pointer _kCFStringTransformStripDiacritics = + _lookup('kCFStringTransformStripDiacritics'); - CFErrorDomain get kCFErrorDomainMach => _kCFErrorDomainMach.value; + CFStringRef get kCFStringTransformStripDiacritics => + _kCFStringTransformStripDiacritics.value; - set kCFErrorDomainMach(CFErrorDomain value) => - _kCFErrorDomainMach.value = value; + set kCFStringTransformStripDiacritics(CFStringRef value) => + _kCFStringTransformStripDiacritics.value = value; - late final ffi.Pointer _kCFErrorDomainCocoa = - _lookup('kCFErrorDomainCocoa'); + int CFStringIsEncodingAvailable( + int encoding, + ) { + return _CFStringIsEncodingAvailable( + encoding, + ); + } - CFErrorDomain get kCFErrorDomainCocoa => _kCFErrorDomainCocoa.value; + late final _CFStringIsEncodingAvailablePtr = + _lookup>( + 'CFStringIsEncodingAvailable'); + late final _CFStringIsEncodingAvailable = + _CFStringIsEncodingAvailablePtr.asFunction(); - set kCFErrorDomainCocoa(CFErrorDomain value) => - _kCFErrorDomainCocoa.value = value; + ffi.Pointer CFStringGetListOfAvailableEncodings() { + return _CFStringGetListOfAvailableEncodings(); + } - late final ffi.Pointer _kCFErrorLocalizedDescriptionKey = - _lookup('kCFErrorLocalizedDescriptionKey'); + late final _CFStringGetListOfAvailableEncodingsPtr = + _lookup Function()>>( + 'CFStringGetListOfAvailableEncodings'); + late final _CFStringGetListOfAvailableEncodings = + _CFStringGetListOfAvailableEncodingsPtr.asFunction< + ffi.Pointer Function()>(); - CFStringRef get kCFErrorLocalizedDescriptionKey => - _kCFErrorLocalizedDescriptionKey.value; + CFStringRef CFStringGetNameOfEncoding( + int encoding, + ) { + return _CFStringGetNameOfEncoding( + encoding, + ); + } - set kCFErrorLocalizedDescriptionKey(CFStringRef value) => - _kCFErrorLocalizedDescriptionKey.value = value; + late final _CFStringGetNameOfEncodingPtr = + _lookup>( + 'CFStringGetNameOfEncoding'); + late final _CFStringGetNameOfEncoding = + _CFStringGetNameOfEncodingPtr.asFunction(); - late final ffi.Pointer _kCFErrorLocalizedFailureKey = - _lookup('kCFErrorLocalizedFailureKey'); + int CFStringConvertEncodingToNSStringEncoding( + int encoding, + ) { + return _CFStringConvertEncodingToNSStringEncoding( + encoding, + ); + } - CFStringRef get kCFErrorLocalizedFailureKey => - _kCFErrorLocalizedFailureKey.value; + late final _CFStringConvertEncodingToNSStringEncodingPtr = + _lookup>( + 'CFStringConvertEncodingToNSStringEncoding'); + late final _CFStringConvertEncodingToNSStringEncoding = + _CFStringConvertEncodingToNSStringEncodingPtr.asFunction< + int Function(int)>(); - set kCFErrorLocalizedFailureKey(CFStringRef value) => - _kCFErrorLocalizedFailureKey.value = value; + int CFStringConvertNSStringEncodingToEncoding( + int encoding, + ) { + return _CFStringConvertNSStringEncodingToEncoding( + encoding, + ); + } - late final ffi.Pointer _kCFErrorLocalizedFailureReasonKey = - _lookup('kCFErrorLocalizedFailureReasonKey'); - - CFStringRef get kCFErrorLocalizedFailureReasonKey => - _kCFErrorLocalizedFailureReasonKey.value; - - set kCFErrorLocalizedFailureReasonKey(CFStringRef value) => - _kCFErrorLocalizedFailureReasonKey.value = value; - - late final ffi.Pointer _kCFErrorLocalizedRecoverySuggestionKey = - _lookup('kCFErrorLocalizedRecoverySuggestionKey'); - - CFStringRef get kCFErrorLocalizedRecoverySuggestionKey => - _kCFErrorLocalizedRecoverySuggestionKey.value; - - set kCFErrorLocalizedRecoverySuggestionKey(CFStringRef value) => - _kCFErrorLocalizedRecoverySuggestionKey.value = value; - - late final ffi.Pointer _kCFErrorDescriptionKey = - _lookup('kCFErrorDescriptionKey'); - - CFStringRef get kCFErrorDescriptionKey => _kCFErrorDescriptionKey.value; - - set kCFErrorDescriptionKey(CFStringRef value) => - _kCFErrorDescriptionKey.value = value; - - late final ffi.Pointer _kCFErrorUnderlyingErrorKey = - _lookup('kCFErrorUnderlyingErrorKey'); - - CFStringRef get kCFErrorUnderlyingErrorKey => - _kCFErrorUnderlyingErrorKey.value; - - set kCFErrorUnderlyingErrorKey(CFStringRef value) => - _kCFErrorUnderlyingErrorKey.value = value; - - late final ffi.Pointer _kCFErrorURLKey = - _lookup('kCFErrorURLKey'); - - CFStringRef get kCFErrorURLKey => _kCFErrorURLKey.value; - - set kCFErrorURLKey(CFStringRef value) => _kCFErrorURLKey.value = value; - - late final ffi.Pointer _kCFErrorFilePathKey = - _lookup('kCFErrorFilePathKey'); - - CFStringRef get kCFErrorFilePathKey => _kCFErrorFilePathKey.value; - - set kCFErrorFilePathKey(CFStringRef value) => - _kCFErrorFilePathKey.value = value; + late final _CFStringConvertNSStringEncodingToEncodingPtr = + _lookup>( + 'CFStringConvertNSStringEncodingToEncoding'); + late final _CFStringConvertNSStringEncodingToEncoding = + _CFStringConvertNSStringEncodingToEncodingPtr.asFunction< + int Function(int)>(); - CFErrorRef CFErrorCreate( - CFAllocatorRef allocator, - CFErrorDomain domain, - int code, - CFDictionaryRef userInfo, + int CFStringConvertEncodingToWindowsCodepage( + int encoding, ) { - return _CFErrorCreate( - allocator, - domain, - code, - userInfo, + return _CFStringConvertEncodingToWindowsCodepage( + encoding, ); } - late final _CFErrorCreatePtr = _lookup< - ffi.NativeFunction< - CFErrorRef Function(CFAllocatorRef, CFErrorDomain, CFIndex, - CFDictionaryRef)>>('CFErrorCreate'); - late final _CFErrorCreate = _CFErrorCreatePtr.asFunction< - CFErrorRef Function( - CFAllocatorRef, CFErrorDomain, int, CFDictionaryRef)>(); + late final _CFStringConvertEncodingToWindowsCodepagePtr = + _lookup>( + 'CFStringConvertEncodingToWindowsCodepage'); + late final _CFStringConvertEncodingToWindowsCodepage = + _CFStringConvertEncodingToWindowsCodepagePtr.asFunction< + int Function(int)>(); - CFErrorRef CFErrorCreateWithUserInfoKeysAndValues( - CFAllocatorRef allocator, - CFErrorDomain domain, - int code, - ffi.Pointer> userInfoKeys, - ffi.Pointer> userInfoValues, - int numUserInfoValues, + int CFStringConvertWindowsCodepageToEncoding( + int codepage, ) { - return _CFErrorCreateWithUserInfoKeysAndValues( - allocator, - domain, - code, - userInfoKeys, - userInfoValues, - numUserInfoValues, + return _CFStringConvertWindowsCodepageToEncoding( + codepage, ); } - late final _CFErrorCreateWithUserInfoKeysAndValuesPtr = _lookup< - ffi.NativeFunction< - CFErrorRef Function( - CFAllocatorRef, - CFErrorDomain, - CFIndex, - ffi.Pointer>, - ffi.Pointer>, - CFIndex)>>('CFErrorCreateWithUserInfoKeysAndValues'); - late final _CFErrorCreateWithUserInfoKeysAndValues = - _CFErrorCreateWithUserInfoKeysAndValuesPtr.asFunction< - CFErrorRef Function( - CFAllocatorRef, - CFErrorDomain, - int, - ffi.Pointer>, - ffi.Pointer>, - int)>(); + late final _CFStringConvertWindowsCodepageToEncodingPtr = + _lookup>( + 'CFStringConvertWindowsCodepageToEncoding'); + late final _CFStringConvertWindowsCodepageToEncoding = + _CFStringConvertWindowsCodepageToEncodingPtr.asFunction< + int Function(int)>(); - CFErrorDomain CFErrorGetDomain( - CFErrorRef err, + int CFStringConvertIANACharSetNameToEncoding( + CFStringRef theString, ) { - return _CFErrorGetDomain( - err, + return _CFStringConvertIANACharSetNameToEncoding( + theString, ); } - late final _CFErrorGetDomainPtr = - _lookup>( - 'CFErrorGetDomain'); - late final _CFErrorGetDomain = - _CFErrorGetDomainPtr.asFunction(); + late final _CFStringConvertIANACharSetNameToEncodingPtr = + _lookup>( + 'CFStringConvertIANACharSetNameToEncoding'); + late final _CFStringConvertIANACharSetNameToEncoding = + _CFStringConvertIANACharSetNameToEncodingPtr.asFunction< + int Function(CFStringRef)>(); - int CFErrorGetCode( - CFErrorRef err, + CFStringRef CFStringConvertEncodingToIANACharSetName( + int encoding, ) { - return _CFErrorGetCode( - err, + return _CFStringConvertEncodingToIANACharSetName( + encoding, ); } - late final _CFErrorGetCodePtr = - _lookup>( - 'CFErrorGetCode'); - late final _CFErrorGetCode = - _CFErrorGetCodePtr.asFunction(); + late final _CFStringConvertEncodingToIANACharSetNamePtr = + _lookup>( + 'CFStringConvertEncodingToIANACharSetName'); + late final _CFStringConvertEncodingToIANACharSetName = + _CFStringConvertEncodingToIANACharSetNamePtr.asFunction< + CFStringRef Function(int)>(); - CFDictionaryRef CFErrorCopyUserInfo( - CFErrorRef err, + int CFStringGetMostCompatibleMacStringEncoding( + int encoding, ) { - return _CFErrorCopyUserInfo( - err, + return _CFStringGetMostCompatibleMacStringEncoding( + encoding, ); } - late final _CFErrorCopyUserInfoPtr = - _lookup>( - 'CFErrorCopyUserInfo'); - late final _CFErrorCopyUserInfo = _CFErrorCopyUserInfoPtr.asFunction< - CFDictionaryRef Function(CFErrorRef)>(); + late final _CFStringGetMostCompatibleMacStringEncodingPtr = + _lookup>( + 'CFStringGetMostCompatibleMacStringEncoding'); + late final _CFStringGetMostCompatibleMacStringEncoding = + _CFStringGetMostCompatibleMacStringEncodingPtr.asFunction< + int Function(int)>(); - CFStringRef CFErrorCopyDescription( - CFErrorRef err, + void CFShow( + CFTypeRef obj, ) { - return _CFErrorCopyDescription( - err, + return _CFShow( + obj, ); } - late final _CFErrorCopyDescriptionPtr = - _lookup>( - 'CFErrorCopyDescription'); - late final _CFErrorCopyDescription = - _CFErrorCopyDescriptionPtr.asFunction(); + late final _CFShowPtr = + _lookup>('CFShow'); + late final _CFShow = _CFShowPtr.asFunction(); - CFStringRef CFErrorCopyFailureReason( - CFErrorRef err, + void CFShowStr( + CFStringRef str, ) { - return _CFErrorCopyFailureReason( - err, + return _CFShowStr( + str, ); } - late final _CFErrorCopyFailureReasonPtr = - _lookup>( - 'CFErrorCopyFailureReason'); - late final _CFErrorCopyFailureReason = _CFErrorCopyFailureReasonPtr - .asFunction(); + late final _CFShowStrPtr = + _lookup>('CFShowStr'); + late final _CFShowStr = + _CFShowStrPtr.asFunction(); - CFStringRef CFErrorCopyRecoverySuggestion( - CFErrorRef err, + CFStringRef __CFStringMakeConstantString( + ffi.Pointer cStr, ) { - return _CFErrorCopyRecoverySuggestion( - err, + return ___CFStringMakeConstantString( + cStr, ); } - late final _CFErrorCopyRecoverySuggestionPtr = - _lookup>( - 'CFErrorCopyRecoverySuggestion'); - late final _CFErrorCopyRecoverySuggestion = _CFErrorCopyRecoverySuggestionPtr - .asFunction(); + late final ___CFStringMakeConstantStringPtr = + _lookup)>>( + '__CFStringMakeConstantString'); + late final ___CFStringMakeConstantString = ___CFStringMakeConstantStringPtr + .asFunction)>(); - late final ffi.Pointer _kCFBooleanTrue = - _lookup('kCFBooleanTrue'); + int CFTimeZoneGetTypeID() { + return _CFTimeZoneGetTypeID(); + } - CFBooleanRef get kCFBooleanTrue => _kCFBooleanTrue.value; + late final _CFTimeZoneGetTypeIDPtr = + _lookup>('CFTimeZoneGetTypeID'); + late final _CFTimeZoneGetTypeID = + _CFTimeZoneGetTypeIDPtr.asFunction(); - set kCFBooleanTrue(CFBooleanRef value) => _kCFBooleanTrue.value = value; + CFTimeZoneRef CFTimeZoneCopySystem() { + return _CFTimeZoneCopySystem(); + } - late final ffi.Pointer _kCFBooleanFalse = - _lookup('kCFBooleanFalse'); + late final _CFTimeZoneCopySystemPtr = + _lookup>( + 'CFTimeZoneCopySystem'); + late final _CFTimeZoneCopySystem = + _CFTimeZoneCopySystemPtr.asFunction(); - CFBooleanRef get kCFBooleanFalse => _kCFBooleanFalse.value; + void CFTimeZoneResetSystem() { + return _CFTimeZoneResetSystem(); + } - set kCFBooleanFalse(CFBooleanRef value) => _kCFBooleanFalse.value = value; + late final _CFTimeZoneResetSystemPtr = + _lookup>('CFTimeZoneResetSystem'); + late final _CFTimeZoneResetSystem = + _CFTimeZoneResetSystemPtr.asFunction(); - int CFBooleanGetTypeID() { - return _CFBooleanGetTypeID(); + CFTimeZoneRef CFTimeZoneCopyDefault() { + return _CFTimeZoneCopyDefault(); } - late final _CFBooleanGetTypeIDPtr = - _lookup>('CFBooleanGetTypeID'); - late final _CFBooleanGetTypeID = - _CFBooleanGetTypeIDPtr.asFunction(); + late final _CFTimeZoneCopyDefaultPtr = + _lookup>( + 'CFTimeZoneCopyDefault'); + late final _CFTimeZoneCopyDefault = + _CFTimeZoneCopyDefaultPtr.asFunction(); - int CFBooleanGetValue( - CFBooleanRef boolean, + void CFTimeZoneSetDefault( + CFTimeZoneRef tz, ) { - return _CFBooleanGetValue( - boolean, + return _CFTimeZoneSetDefault( + tz, ); } - late final _CFBooleanGetValuePtr = - _lookup>( - 'CFBooleanGetValue'); - late final _CFBooleanGetValue = - _CFBooleanGetValuePtr.asFunction(); - - late final ffi.Pointer _kCFNumberPositiveInfinity = - _lookup('kCFNumberPositiveInfinity'); - - CFNumberRef get kCFNumberPositiveInfinity => _kCFNumberPositiveInfinity.value; - - set kCFNumberPositiveInfinity(CFNumberRef value) => - _kCFNumberPositiveInfinity.value = value; - - late final ffi.Pointer _kCFNumberNegativeInfinity = - _lookup('kCFNumberNegativeInfinity'); - - CFNumberRef get kCFNumberNegativeInfinity => _kCFNumberNegativeInfinity.value; + late final _CFTimeZoneSetDefaultPtr = + _lookup>( + 'CFTimeZoneSetDefault'); + late final _CFTimeZoneSetDefault = + _CFTimeZoneSetDefaultPtr.asFunction(); - set kCFNumberNegativeInfinity(CFNumberRef value) => - _kCFNumberNegativeInfinity.value = value; + CFArrayRef CFTimeZoneCopyKnownNames() { + return _CFTimeZoneCopyKnownNames(); + } - late final ffi.Pointer _kCFNumberNaN = - _lookup('kCFNumberNaN'); + late final _CFTimeZoneCopyKnownNamesPtr = + _lookup>( + 'CFTimeZoneCopyKnownNames'); + late final _CFTimeZoneCopyKnownNames = + _CFTimeZoneCopyKnownNamesPtr.asFunction(); - CFNumberRef get kCFNumberNaN => _kCFNumberNaN.value; + CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary() { + return _CFTimeZoneCopyAbbreviationDictionary(); + } - set kCFNumberNaN(CFNumberRef value) => _kCFNumberNaN.value = value; + late final _CFTimeZoneCopyAbbreviationDictionaryPtr = + _lookup>( + 'CFTimeZoneCopyAbbreviationDictionary'); + late final _CFTimeZoneCopyAbbreviationDictionary = + _CFTimeZoneCopyAbbreviationDictionaryPtr.asFunction< + CFDictionaryRef Function()>(); - int CFNumberGetTypeID() { - return _CFNumberGetTypeID(); + void CFTimeZoneSetAbbreviationDictionary( + CFDictionaryRef dict, + ) { + return _CFTimeZoneSetAbbreviationDictionary( + dict, + ); } - late final _CFNumberGetTypeIDPtr = - _lookup>('CFNumberGetTypeID'); - late final _CFNumberGetTypeID = - _CFNumberGetTypeIDPtr.asFunction(); + late final _CFTimeZoneSetAbbreviationDictionaryPtr = + _lookup>( + 'CFTimeZoneSetAbbreviationDictionary'); + late final _CFTimeZoneSetAbbreviationDictionary = + _CFTimeZoneSetAbbreviationDictionaryPtr.asFunction< + void Function(CFDictionaryRef)>(); - CFNumberRef CFNumberCreate( + CFTimeZoneRef CFTimeZoneCreate( CFAllocatorRef allocator, - int theType, - ffi.Pointer valuePtr, + CFStringRef name, + CFDataRef data, ) { - return _CFNumberCreate( + return _CFTimeZoneCreate( allocator, - theType, - valuePtr, + name, + data, ); } - late final _CFNumberCreatePtr = _lookup< + late final _CFTimeZoneCreatePtr = _lookup< ffi.NativeFunction< - CFNumberRef Function(CFAllocatorRef, ffi.Int32, - ffi.Pointer)>>('CFNumberCreate'); - late final _CFNumberCreate = _CFNumberCreatePtr.asFunction< - CFNumberRef Function(CFAllocatorRef, int, ffi.Pointer)>(); + CFTimeZoneRef Function( + CFAllocatorRef, CFStringRef, CFDataRef)>>('CFTimeZoneCreate'); + late final _CFTimeZoneCreate = _CFTimeZoneCreatePtr.asFunction< + CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); - int CFNumberGetType( - CFNumberRef number, + CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT( + CFAllocatorRef allocator, + double ti, ) { - return _CFNumberGetType( - number, + return _CFTimeZoneCreateWithTimeIntervalFromGMT( + allocator, + ti, ); } - late final _CFNumberGetTypePtr = - _lookup>( - 'CFNumberGetType'); - late final _CFNumberGetType = - _CFNumberGetTypePtr.asFunction(); + late final _CFTimeZoneCreateWithTimeIntervalFromGMTPtr = _lookup< + ffi.NativeFunction< + CFTimeZoneRef Function(CFAllocatorRef, + CFTimeInterval)>>('CFTimeZoneCreateWithTimeIntervalFromGMT'); + late final _CFTimeZoneCreateWithTimeIntervalFromGMT = + _CFTimeZoneCreateWithTimeIntervalFromGMTPtr.asFunction< + CFTimeZoneRef Function(CFAllocatorRef, double)>(); - int CFNumberGetByteSize( - CFNumberRef number, + CFTimeZoneRef CFTimeZoneCreateWithName( + CFAllocatorRef allocator, + CFStringRef name, + int tryAbbrev, ) { - return _CFNumberGetByteSize( - number, + return _CFTimeZoneCreateWithName( + allocator, + name, + tryAbbrev, ); } - late final _CFNumberGetByteSizePtr = - _lookup>( - 'CFNumberGetByteSize'); - late final _CFNumberGetByteSize = - _CFNumberGetByteSizePtr.asFunction(); + late final _CFTimeZoneCreateWithNamePtr = _lookup< + ffi.NativeFunction< + CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, + Boolean)>>('CFTimeZoneCreateWithName'); + late final _CFTimeZoneCreateWithName = _CFTimeZoneCreateWithNamePtr + .asFunction(); - int CFNumberIsFloatType( - CFNumberRef number, + CFStringRef CFTimeZoneGetName( + CFTimeZoneRef tz, ) { - return _CFNumberIsFloatType( - number, + return _CFTimeZoneGetName( + tz, ); } - late final _CFNumberIsFloatTypePtr = - _lookup>( - 'CFNumberIsFloatType'); - late final _CFNumberIsFloatType = - _CFNumberIsFloatTypePtr.asFunction(); + late final _CFTimeZoneGetNamePtr = + _lookup>( + 'CFTimeZoneGetName'); + late final _CFTimeZoneGetName = + _CFTimeZoneGetNamePtr.asFunction(); - int CFNumberGetValue( - CFNumberRef number, - int theType, - ffi.Pointer valuePtr, + CFDataRef CFTimeZoneGetData( + CFTimeZoneRef tz, ) { - return _CFNumberGetValue( - number, - theType, - valuePtr, + return _CFTimeZoneGetData( + tz, ); } - late final _CFNumberGetValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFNumberRef, ffi.Int32, - ffi.Pointer)>>('CFNumberGetValue'); - late final _CFNumberGetValue = _CFNumberGetValuePtr.asFunction< - int Function(CFNumberRef, int, ffi.Pointer)>(); + late final _CFTimeZoneGetDataPtr = + _lookup>( + 'CFTimeZoneGetData'); + late final _CFTimeZoneGetData = + _CFTimeZoneGetDataPtr.asFunction(); - int CFNumberCompare( - CFNumberRef number, - CFNumberRef otherNumber, - ffi.Pointer context, + double CFTimeZoneGetSecondsFromGMT( + CFTimeZoneRef tz, + double at, ) { - return _CFNumberCompare( - number, - otherNumber, - context, + return _CFTimeZoneGetSecondsFromGMT( + tz, + at, ); } - late final _CFNumberComparePtr = _lookup< + late final _CFTimeZoneGetSecondsFromGMTPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFNumberRef, CFNumberRef, - ffi.Pointer)>>('CFNumberCompare'); - late final _CFNumberCompare = _CFNumberComparePtr.asFunction< - int Function(CFNumberRef, CFNumberRef, ffi.Pointer)>(); - - int CFNumberFormatterGetTypeID() { - return _CFNumberFormatterGetTypeID(); - } - - late final _CFNumberFormatterGetTypeIDPtr = - _lookup>( - 'CFNumberFormatterGetTypeID'); - late final _CFNumberFormatterGetTypeID = - _CFNumberFormatterGetTypeIDPtr.asFunction(); + CFTimeInterval Function( + CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneGetSecondsFromGMT'); + late final _CFTimeZoneGetSecondsFromGMT = _CFTimeZoneGetSecondsFromGMTPtr + .asFunction(); - CFNumberFormatterRef CFNumberFormatterCreate( - CFAllocatorRef allocator, - CFLocaleRef locale, - int style, + CFStringRef CFTimeZoneCopyAbbreviation( + CFTimeZoneRef tz, + double at, ) { - return _CFNumberFormatterCreate( - allocator, - locale, - style, + return _CFTimeZoneCopyAbbreviation( + tz, + at, ); } - late final _CFNumberFormatterCreatePtr = _lookup< + late final _CFTimeZoneCopyAbbreviationPtr = _lookup< ffi.NativeFunction< - CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, - ffi.Int32)>>('CFNumberFormatterCreate'); - late final _CFNumberFormatterCreate = _CFNumberFormatterCreatePtr.asFunction< - CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, int)>(); + CFStringRef Function( + CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneCopyAbbreviation'); + late final _CFTimeZoneCopyAbbreviation = _CFTimeZoneCopyAbbreviationPtr + .asFunction(); - CFLocaleRef CFNumberFormatterGetLocale( - CFNumberFormatterRef formatter, + int CFTimeZoneIsDaylightSavingTime( + CFTimeZoneRef tz, + double at, ) { - return _CFNumberFormatterGetLocale( - formatter, + return _CFTimeZoneIsDaylightSavingTime( + tz, + at, ); } - late final _CFNumberFormatterGetLocalePtr = - _lookup>( - 'CFNumberFormatterGetLocale'); - late final _CFNumberFormatterGetLocale = _CFNumberFormatterGetLocalePtr - .asFunction(); + late final _CFTimeZoneIsDaylightSavingTimePtr = _lookup< + ffi.NativeFunction>( + 'CFTimeZoneIsDaylightSavingTime'); + late final _CFTimeZoneIsDaylightSavingTime = + _CFTimeZoneIsDaylightSavingTimePtr.asFunction< + int Function(CFTimeZoneRef, double)>(); - int CFNumberFormatterGetStyle( - CFNumberFormatterRef formatter, + double CFTimeZoneGetDaylightSavingTimeOffset( + CFTimeZoneRef tz, + double at, ) { - return _CFNumberFormatterGetStyle( - formatter, + return _CFTimeZoneGetDaylightSavingTimeOffset( + tz, + at, ); } - late final _CFNumberFormatterGetStylePtr = - _lookup>( - 'CFNumberFormatterGetStyle'); - late final _CFNumberFormatterGetStyle = _CFNumberFormatterGetStylePtr - .asFunction(); + late final _CFTimeZoneGetDaylightSavingTimeOffsetPtr = _lookup< + ffi.NativeFunction< + CFTimeInterval Function(CFTimeZoneRef, + CFAbsoluteTime)>>('CFTimeZoneGetDaylightSavingTimeOffset'); + late final _CFTimeZoneGetDaylightSavingTimeOffset = + _CFTimeZoneGetDaylightSavingTimeOffsetPtr.asFunction< + double Function(CFTimeZoneRef, double)>(); - CFStringRef CFNumberFormatterGetFormat( - CFNumberFormatterRef formatter, + double CFTimeZoneGetNextDaylightSavingTimeTransition( + CFTimeZoneRef tz, + double at, ) { - return _CFNumberFormatterGetFormat( - formatter, + return _CFTimeZoneGetNextDaylightSavingTimeTransition( + tz, + at, ); } - late final _CFNumberFormatterGetFormatPtr = - _lookup>( - 'CFNumberFormatterGetFormat'); - late final _CFNumberFormatterGetFormat = _CFNumberFormatterGetFormatPtr - .asFunction(); + late final _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr = _lookup< + ffi.NativeFunction< + CFAbsoluteTime Function(CFTimeZoneRef, CFAbsoluteTime)>>( + 'CFTimeZoneGetNextDaylightSavingTimeTransition'); + late final _CFTimeZoneGetNextDaylightSavingTimeTransition = + _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr.asFunction< + double Function(CFTimeZoneRef, double)>(); - void CFNumberFormatterSetFormat( - CFNumberFormatterRef formatter, - CFStringRef formatString, + CFStringRef CFTimeZoneCopyLocalizedName( + CFTimeZoneRef tz, + int style, + CFLocaleRef locale, ) { - return _CFNumberFormatterSetFormat( - formatter, - formatString, + return _CFTimeZoneCopyLocalizedName( + tz, + style, + locale, ); } - late final _CFNumberFormatterSetFormatPtr = _lookup< + late final _CFTimeZoneCopyLocalizedNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFNumberFormatterRef, - CFStringRef)>>('CFNumberFormatterSetFormat'); - late final _CFNumberFormatterSetFormat = _CFNumberFormatterSetFormatPtr - .asFunction(); + CFStringRef Function(CFTimeZoneRef, ffi.Int32, + CFLocaleRef)>>('CFTimeZoneCopyLocalizedName'); + late final _CFTimeZoneCopyLocalizedName = _CFTimeZoneCopyLocalizedNamePtr + .asFunction(); - CFStringRef CFNumberFormatterCreateStringWithNumber( + late final ffi.Pointer + _kCFTimeZoneSystemTimeZoneDidChangeNotification = + _lookup( + 'kCFTimeZoneSystemTimeZoneDidChangeNotification'); + + CFNotificationName get kCFTimeZoneSystemTimeZoneDidChangeNotification => + _kCFTimeZoneSystemTimeZoneDidChangeNotification.value; + + set kCFTimeZoneSystemTimeZoneDidChangeNotification( + CFNotificationName value) => + _kCFTimeZoneSystemTimeZoneDidChangeNotification.value = value; + + int CFCalendarGetTypeID() { + return _CFCalendarGetTypeID(); + } + + late final _CFCalendarGetTypeIDPtr = + _lookup>('CFCalendarGetTypeID'); + late final _CFCalendarGetTypeID = + _CFCalendarGetTypeIDPtr.asFunction(); + + CFCalendarRef CFCalendarCopyCurrent() { + return _CFCalendarCopyCurrent(); + } + + late final _CFCalendarCopyCurrentPtr = + _lookup>( + 'CFCalendarCopyCurrent'); + late final _CFCalendarCopyCurrent = + _CFCalendarCopyCurrentPtr.asFunction(); + + CFCalendarRef CFCalendarCreateWithIdentifier( CFAllocatorRef allocator, - CFNumberFormatterRef formatter, - CFNumberRef number, + CFCalendarIdentifier identifier, ) { - return _CFNumberFormatterCreateStringWithNumber( + return _CFCalendarCreateWithIdentifier( allocator, - formatter, - number, + identifier, ); } - late final _CFNumberFormatterCreateStringWithNumberPtr = _lookup< + late final _CFCalendarCreateWithIdentifierPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, - CFNumberRef)>>('CFNumberFormatterCreateStringWithNumber'); - late final _CFNumberFormatterCreateStringWithNumber = - _CFNumberFormatterCreateStringWithNumberPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFNumberFormatterRef, CFNumberRef)>(); + CFCalendarRef Function(CFAllocatorRef, + CFCalendarIdentifier)>>('CFCalendarCreateWithIdentifier'); + late final _CFCalendarCreateWithIdentifier = + _CFCalendarCreateWithIdentifierPtr.asFunction< + CFCalendarRef Function(CFAllocatorRef, CFCalendarIdentifier)>(); - CFStringRef CFNumberFormatterCreateStringWithValue( - CFAllocatorRef allocator, - CFNumberFormatterRef formatter, - int numberType, - ffi.Pointer valuePtr, + CFCalendarIdentifier CFCalendarGetIdentifier( + CFCalendarRef calendar, ) { - return _CFNumberFormatterCreateStringWithValue( - allocator, - formatter, - numberType, - valuePtr, + return _CFCalendarGetIdentifier( + calendar, ); } - late final _CFNumberFormatterCreateStringWithValuePtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, - ffi.Int32, ffi.Pointer)>>( - 'CFNumberFormatterCreateStringWithValue'); - late final _CFNumberFormatterCreateStringWithValue = - _CFNumberFormatterCreateStringWithValuePtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, int, - ffi.Pointer)>(); + late final _CFCalendarGetIdentifierPtr = + _lookup>( + 'CFCalendarGetIdentifier'); + late final _CFCalendarGetIdentifier = _CFCalendarGetIdentifierPtr.asFunction< + CFCalendarIdentifier Function(CFCalendarRef)>(); - CFNumberRef CFNumberFormatterCreateNumberFromString( - CFAllocatorRef allocator, - CFNumberFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, - int options, + CFLocaleRef CFCalendarCopyLocale( + CFCalendarRef calendar, ) { - return _CFNumberFormatterCreateNumberFromString( - allocator, - formatter, - string, - rangep, - options, + return _CFCalendarCopyLocale( + calendar, ); } - late final _CFNumberFormatterCreateNumberFromStringPtr = _lookup< - ffi.NativeFunction< - CFNumberRef Function( - CFAllocatorRef, - CFNumberFormatterRef, - CFStringRef, - ffi.Pointer, - CFOptionFlags)>>('CFNumberFormatterCreateNumberFromString'); - late final _CFNumberFormatterCreateNumberFromString = - _CFNumberFormatterCreateNumberFromStringPtr.asFunction< - CFNumberRef Function(CFAllocatorRef, CFNumberFormatterRef, - CFStringRef, ffi.Pointer, int)>(); + late final _CFCalendarCopyLocalePtr = + _lookup>( + 'CFCalendarCopyLocale'); + late final _CFCalendarCopyLocale = _CFCalendarCopyLocalePtr.asFunction< + CFLocaleRef Function(CFCalendarRef)>(); - int CFNumberFormatterGetValueFromString( - CFNumberFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, - int numberType, - ffi.Pointer valuePtr, + void CFCalendarSetLocale( + CFCalendarRef calendar, + CFLocaleRef locale, ) { - return _CFNumberFormatterGetValueFromString( - formatter, - string, - rangep, - numberType, - valuePtr, + return _CFCalendarSetLocale( + calendar, + locale, ); } - late final _CFNumberFormatterGetValueFromStringPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFNumberFormatterRef, - CFStringRef, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('CFNumberFormatterGetValueFromString'); - late final _CFNumberFormatterGetValueFromString = - _CFNumberFormatterGetValueFromStringPtr.asFunction< - int Function(CFNumberFormatterRef, CFStringRef, ffi.Pointer, - int, ffi.Pointer)>(); + late final _CFCalendarSetLocalePtr = _lookup< + ffi.NativeFunction>( + 'CFCalendarSetLocale'); + late final _CFCalendarSetLocale = _CFCalendarSetLocalePtr.asFunction< + void Function(CFCalendarRef, CFLocaleRef)>(); - void CFNumberFormatterSetProperty( - CFNumberFormatterRef formatter, - CFNumberFormatterKey key, - CFTypeRef value, + CFTimeZoneRef CFCalendarCopyTimeZone( + CFCalendarRef calendar, ) { - return _CFNumberFormatterSetProperty( - formatter, - key, - value, + return _CFCalendarCopyTimeZone( + calendar, ); } - late final _CFNumberFormatterSetPropertyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFNumberFormatterRef, CFNumberFormatterKey, - CFTypeRef)>>('CFNumberFormatterSetProperty'); - late final _CFNumberFormatterSetProperty = - _CFNumberFormatterSetPropertyPtr.asFunction< - void Function( - CFNumberFormatterRef, CFNumberFormatterKey, CFTypeRef)>(); + late final _CFCalendarCopyTimeZonePtr = + _lookup>( + 'CFCalendarCopyTimeZone'); + late final _CFCalendarCopyTimeZone = _CFCalendarCopyTimeZonePtr.asFunction< + CFTimeZoneRef Function(CFCalendarRef)>(); - CFTypeRef CFNumberFormatterCopyProperty( - CFNumberFormatterRef formatter, - CFNumberFormatterKey key, + void CFCalendarSetTimeZone( + CFCalendarRef calendar, + CFTimeZoneRef tz, ) { - return _CFNumberFormatterCopyProperty( - formatter, - key, + return _CFCalendarSetTimeZone( + calendar, + tz, ); } - late final _CFNumberFormatterCopyPropertyPtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFNumberFormatterRef, - CFNumberFormatterKey)>>('CFNumberFormatterCopyProperty'); - late final _CFNumberFormatterCopyProperty = - _CFNumberFormatterCopyPropertyPtr.asFunction< - CFTypeRef Function(CFNumberFormatterRef, CFNumberFormatterKey)>(); - - late final ffi.Pointer _kCFNumberFormatterCurrencyCode = - _lookup('kCFNumberFormatterCurrencyCode'); - - CFNumberFormatterKey get kCFNumberFormatterCurrencyCode => - _kCFNumberFormatterCurrencyCode.value; + late final _CFCalendarSetTimeZonePtr = _lookup< + ffi.NativeFunction>( + 'CFCalendarSetTimeZone'); + late final _CFCalendarSetTimeZone = _CFCalendarSetTimeZonePtr.asFunction< + void Function(CFCalendarRef, CFTimeZoneRef)>(); - set kCFNumberFormatterCurrencyCode(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencyCode.value = value; + int CFCalendarGetFirstWeekday( + CFCalendarRef calendar, + ) { + return _CFCalendarGetFirstWeekday( + calendar, + ); + } - late final ffi.Pointer - _kCFNumberFormatterDecimalSeparator = - _lookup('kCFNumberFormatterDecimalSeparator'); + late final _CFCalendarGetFirstWeekdayPtr = + _lookup>( + 'CFCalendarGetFirstWeekday'); + late final _CFCalendarGetFirstWeekday = + _CFCalendarGetFirstWeekdayPtr.asFunction(); - CFNumberFormatterKey get kCFNumberFormatterDecimalSeparator => - _kCFNumberFormatterDecimalSeparator.value; + void CFCalendarSetFirstWeekday( + CFCalendarRef calendar, + int wkdy, + ) { + return _CFCalendarSetFirstWeekday( + calendar, + wkdy, + ); + } - set kCFNumberFormatterDecimalSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterDecimalSeparator.value = value; + late final _CFCalendarSetFirstWeekdayPtr = + _lookup>( + 'CFCalendarSetFirstWeekday'); + late final _CFCalendarSetFirstWeekday = _CFCalendarSetFirstWeekdayPtr + .asFunction(); - late final ffi.Pointer - _kCFNumberFormatterCurrencyDecimalSeparator = - _lookup( - 'kCFNumberFormatterCurrencyDecimalSeparator'); + int CFCalendarGetMinimumDaysInFirstWeek( + CFCalendarRef calendar, + ) { + return _CFCalendarGetMinimumDaysInFirstWeek( + calendar, + ); + } - CFNumberFormatterKey get kCFNumberFormatterCurrencyDecimalSeparator => - _kCFNumberFormatterCurrencyDecimalSeparator.value; + late final _CFCalendarGetMinimumDaysInFirstWeekPtr = + _lookup>( + 'CFCalendarGetMinimumDaysInFirstWeek'); + late final _CFCalendarGetMinimumDaysInFirstWeek = + _CFCalendarGetMinimumDaysInFirstWeekPtr.asFunction< + int Function(CFCalendarRef)>(); - set kCFNumberFormatterCurrencyDecimalSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencyDecimalSeparator.value = value; + void CFCalendarSetMinimumDaysInFirstWeek( + CFCalendarRef calendar, + int mwd, + ) { + return _CFCalendarSetMinimumDaysInFirstWeek( + calendar, + mwd, + ); + } - late final ffi.Pointer - _kCFNumberFormatterAlwaysShowDecimalSeparator = - _lookup( - 'kCFNumberFormatterAlwaysShowDecimalSeparator'); + late final _CFCalendarSetMinimumDaysInFirstWeekPtr = + _lookup>( + 'CFCalendarSetMinimumDaysInFirstWeek'); + late final _CFCalendarSetMinimumDaysInFirstWeek = + _CFCalendarSetMinimumDaysInFirstWeekPtr.asFunction< + void Function(CFCalendarRef, int)>(); - CFNumberFormatterKey get kCFNumberFormatterAlwaysShowDecimalSeparator => - _kCFNumberFormatterAlwaysShowDecimalSeparator.value; + CFRange CFCalendarGetMinimumRangeOfUnit( + CFCalendarRef calendar, + int unit, + ) { + return _CFCalendarGetMinimumRangeOfUnit( + calendar, + unit, + ); + } - set kCFNumberFormatterAlwaysShowDecimalSeparator( - CFNumberFormatterKey value) => - _kCFNumberFormatterAlwaysShowDecimalSeparator.value = value; + late final _CFCalendarGetMinimumRangeOfUnitPtr = + _lookup>( + 'CFCalendarGetMinimumRangeOfUnit'); + late final _CFCalendarGetMinimumRangeOfUnit = + _CFCalendarGetMinimumRangeOfUnitPtr.asFunction< + CFRange Function(CFCalendarRef, int)>(); - late final ffi.Pointer - _kCFNumberFormatterGroupingSeparator = - _lookup('kCFNumberFormatterGroupingSeparator'); + CFRange CFCalendarGetMaximumRangeOfUnit( + CFCalendarRef calendar, + int unit, + ) { + return _CFCalendarGetMaximumRangeOfUnit( + calendar, + unit, + ); + } - CFNumberFormatterKey get kCFNumberFormatterGroupingSeparator => - _kCFNumberFormatterGroupingSeparator.value; + late final _CFCalendarGetMaximumRangeOfUnitPtr = + _lookup>( + 'CFCalendarGetMaximumRangeOfUnit'); + late final _CFCalendarGetMaximumRangeOfUnit = + _CFCalendarGetMaximumRangeOfUnitPtr.asFunction< + CFRange Function(CFCalendarRef, int)>(); - set kCFNumberFormatterGroupingSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterGroupingSeparator.value = value; + CFRange CFCalendarGetRangeOfUnit( + CFCalendarRef calendar, + int smallerUnit, + int biggerUnit, + double at, + ) { + return _CFCalendarGetRangeOfUnit( + calendar, + smallerUnit, + biggerUnit, + at, + ); + } - late final ffi.Pointer - _kCFNumberFormatterUseGroupingSeparator = - _lookup('kCFNumberFormatterUseGroupingSeparator'); + late final _CFCalendarGetRangeOfUnitPtr = _lookup< + ffi.NativeFunction< + CFRange Function(CFCalendarRef, ffi.Int32, ffi.Int32, + CFAbsoluteTime)>>('CFCalendarGetRangeOfUnit'); + late final _CFCalendarGetRangeOfUnit = _CFCalendarGetRangeOfUnitPtr + .asFunction(); - CFNumberFormatterKey get kCFNumberFormatterUseGroupingSeparator => - _kCFNumberFormatterUseGroupingSeparator.value; + int CFCalendarGetOrdinalityOfUnit( + CFCalendarRef calendar, + int smallerUnit, + int biggerUnit, + double at, + ) { + return _CFCalendarGetOrdinalityOfUnit( + calendar, + smallerUnit, + biggerUnit, + at, + ); + } - set kCFNumberFormatterUseGroupingSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterUseGroupingSeparator.value = value; + late final _CFCalendarGetOrdinalityOfUnitPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFCalendarRef, ffi.Int32, ffi.Int32, + CFAbsoluteTime)>>('CFCalendarGetOrdinalityOfUnit'); + late final _CFCalendarGetOrdinalityOfUnit = _CFCalendarGetOrdinalityOfUnitPtr + .asFunction(); - late final ffi.Pointer - _kCFNumberFormatterPercentSymbol = - _lookup('kCFNumberFormatterPercentSymbol'); + int CFCalendarGetTimeRangeOfUnit( + CFCalendarRef calendar, + int unit, + double at, + ffi.Pointer startp, + ffi.Pointer tip, + ) { + return _CFCalendarGetTimeRangeOfUnit( + calendar, + unit, + at, + startp, + tip, + ); + } - CFNumberFormatterKey get kCFNumberFormatterPercentSymbol => - _kCFNumberFormatterPercentSymbol.value; + late final _CFCalendarGetTimeRangeOfUnitPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFCalendarRef, + ffi.Int32, + CFAbsoluteTime, + ffi.Pointer, + ffi.Pointer)>>('CFCalendarGetTimeRangeOfUnit'); + late final _CFCalendarGetTimeRangeOfUnit = + _CFCalendarGetTimeRangeOfUnitPtr.asFunction< + int Function(CFCalendarRef, int, double, ffi.Pointer, + ffi.Pointer)>(); - set kCFNumberFormatterPercentSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterPercentSymbol.value = value; + int CFCalendarComposeAbsoluteTime( + CFCalendarRef calendar, + ffi.Pointer at, + ffi.Pointer componentDesc, + ) { + return _CFCalendarComposeAbsoluteTime( + calendar, + at, + componentDesc, + ); + } - late final ffi.Pointer _kCFNumberFormatterZeroSymbol = - _lookup('kCFNumberFormatterZeroSymbol'); + late final _CFCalendarComposeAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFCalendarRef, ffi.Pointer, + ffi.Pointer)>>('CFCalendarComposeAbsoluteTime'); + late final _CFCalendarComposeAbsoluteTime = + _CFCalendarComposeAbsoluteTimePtr.asFunction< + int Function(CFCalendarRef, ffi.Pointer, + ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterZeroSymbol => - _kCFNumberFormatterZeroSymbol.value; + int CFCalendarDecomposeAbsoluteTime( + CFCalendarRef calendar, + double at, + ffi.Pointer componentDesc, + ) { + return _CFCalendarDecomposeAbsoluteTime( + calendar, + at, + componentDesc, + ); + } - set kCFNumberFormatterZeroSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterZeroSymbol.value = value; + late final _CFCalendarDecomposeAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFCalendarRef, CFAbsoluteTime, + ffi.Pointer)>>('CFCalendarDecomposeAbsoluteTime'); + late final _CFCalendarDecomposeAbsoluteTime = + _CFCalendarDecomposeAbsoluteTimePtr.asFunction< + int Function(CFCalendarRef, double, ffi.Pointer)>(); - late final ffi.Pointer _kCFNumberFormatterNaNSymbol = - _lookup('kCFNumberFormatterNaNSymbol'); + int CFCalendarAddComponents( + CFCalendarRef calendar, + ffi.Pointer at, + int options, + ffi.Pointer componentDesc, + ) { + return _CFCalendarAddComponents( + calendar, + at, + options, + componentDesc, + ); + } - CFNumberFormatterKey get kCFNumberFormatterNaNSymbol => - _kCFNumberFormatterNaNSymbol.value; + late final _CFCalendarAddComponentsPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFCalendarRef, + ffi.Pointer, + CFOptionFlags, + ffi.Pointer)>>('CFCalendarAddComponents'); + late final _CFCalendarAddComponents = _CFCalendarAddComponentsPtr.asFunction< + int Function(CFCalendarRef, ffi.Pointer, int, + ffi.Pointer)>(); - set kCFNumberFormatterNaNSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterNaNSymbol.value = value; + int CFCalendarGetComponentDifference( + CFCalendarRef calendar, + double startingAT, + double resultAT, + int options, + ffi.Pointer componentDesc, + ) { + return _CFCalendarGetComponentDifference( + calendar, + startingAT, + resultAT, + options, + componentDesc, + ); + } - late final ffi.Pointer - _kCFNumberFormatterInfinitySymbol = - _lookup('kCFNumberFormatterInfinitySymbol'); + late final _CFCalendarGetComponentDifferencePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFCalendarRef, + CFAbsoluteTime, + CFAbsoluteTime, + CFOptionFlags, + ffi.Pointer)>>('CFCalendarGetComponentDifference'); + late final _CFCalendarGetComponentDifference = + _CFCalendarGetComponentDifferencePtr.asFunction< + int Function( + CFCalendarRef, double, double, int, ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterInfinitySymbol => - _kCFNumberFormatterInfinitySymbol.value; + CFStringRef CFDateFormatterCreateDateFormatFromTemplate( + CFAllocatorRef allocator, + CFStringRef tmplate, + int options, + CFLocaleRef locale, + ) { + return _CFDateFormatterCreateDateFormatFromTemplate( + allocator, + tmplate, + options, + locale, + ); + } - set kCFNumberFormatterInfinitySymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterInfinitySymbol.value = value; + late final _CFDateFormatterCreateDateFormatFromTemplatePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFOptionFlags, + CFLocaleRef)>>('CFDateFormatterCreateDateFormatFromTemplate'); + late final _CFDateFormatterCreateDateFormatFromTemplate = + _CFDateFormatterCreateDateFormatFromTemplatePtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef, int, CFLocaleRef)>(); - late final ffi.Pointer _kCFNumberFormatterMinusSign = - _lookup('kCFNumberFormatterMinusSign'); + int CFDateFormatterGetTypeID() { + return _CFDateFormatterGetTypeID(); + } - CFNumberFormatterKey get kCFNumberFormatterMinusSign => - _kCFNumberFormatterMinusSign.value; + late final _CFDateFormatterGetTypeIDPtr = + _lookup>( + 'CFDateFormatterGetTypeID'); + late final _CFDateFormatterGetTypeID = + _CFDateFormatterGetTypeIDPtr.asFunction(); - set kCFNumberFormatterMinusSign(CFNumberFormatterKey value) => - _kCFNumberFormatterMinusSign.value = value; + CFDateFormatterRef CFDateFormatterCreateISO8601Formatter( + CFAllocatorRef allocator, + int formatOptions, + ) { + return _CFDateFormatterCreateISO8601Formatter( + allocator, + formatOptions, + ); + } - late final ffi.Pointer _kCFNumberFormatterPlusSign = - _lookup('kCFNumberFormatterPlusSign'); + late final _CFDateFormatterCreateISO8601FormatterPtr = _lookup< + ffi.NativeFunction< + CFDateFormatterRef Function(CFAllocatorRef, + ffi.Int32)>>('CFDateFormatterCreateISO8601Formatter'); + late final _CFDateFormatterCreateISO8601Formatter = + _CFDateFormatterCreateISO8601FormatterPtr.asFunction< + CFDateFormatterRef Function(CFAllocatorRef, int)>(); - CFNumberFormatterKey get kCFNumberFormatterPlusSign => - _kCFNumberFormatterPlusSign.value; + CFDateFormatterRef CFDateFormatterCreate( + CFAllocatorRef allocator, + CFLocaleRef locale, + int dateStyle, + int timeStyle, + ) { + return _CFDateFormatterCreate( + allocator, + locale, + dateStyle, + timeStyle, + ); + } - set kCFNumberFormatterPlusSign(CFNumberFormatterKey value) => - _kCFNumberFormatterPlusSign.value = value; + late final _CFDateFormatterCreatePtr = _lookup< + ffi.NativeFunction< + CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, ffi.Int32, + ffi.Int32)>>('CFDateFormatterCreate'); + late final _CFDateFormatterCreate = _CFDateFormatterCreatePtr.asFunction< + CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, int, int)>(); - late final ffi.Pointer - _kCFNumberFormatterCurrencySymbol = - _lookup('kCFNumberFormatterCurrencySymbol'); + CFLocaleRef CFDateFormatterGetLocale( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetLocale( + formatter, + ); + } - CFNumberFormatterKey get kCFNumberFormatterCurrencySymbol => - _kCFNumberFormatterCurrencySymbol.value; + late final _CFDateFormatterGetLocalePtr = + _lookup>( + 'CFDateFormatterGetLocale'); + late final _CFDateFormatterGetLocale = _CFDateFormatterGetLocalePtr + .asFunction(); - set kCFNumberFormatterCurrencySymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencySymbol.value = value; + int CFDateFormatterGetDateStyle( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetDateStyle( + formatter, + ); + } - late final ffi.Pointer - _kCFNumberFormatterExponentSymbol = - _lookup('kCFNumberFormatterExponentSymbol'); + late final _CFDateFormatterGetDateStylePtr = + _lookup>( + 'CFDateFormatterGetDateStyle'); + late final _CFDateFormatterGetDateStyle = _CFDateFormatterGetDateStylePtr + .asFunction(); - CFNumberFormatterKey get kCFNumberFormatterExponentSymbol => - _kCFNumberFormatterExponentSymbol.value; + int CFDateFormatterGetTimeStyle( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetTimeStyle( + formatter, + ); + } - set kCFNumberFormatterExponentSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterExponentSymbol.value = value; + late final _CFDateFormatterGetTimeStylePtr = + _lookup>( + 'CFDateFormatterGetTimeStyle'); + late final _CFDateFormatterGetTimeStyle = _CFDateFormatterGetTimeStylePtr + .asFunction(); - late final ffi.Pointer - _kCFNumberFormatterMinIntegerDigits = - _lookup('kCFNumberFormatterMinIntegerDigits'); + CFStringRef CFDateFormatterGetFormat( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetFormat( + formatter, + ); + } - CFNumberFormatterKey get kCFNumberFormatterMinIntegerDigits => - _kCFNumberFormatterMinIntegerDigits.value; + late final _CFDateFormatterGetFormatPtr = + _lookup>( + 'CFDateFormatterGetFormat'); + late final _CFDateFormatterGetFormat = _CFDateFormatterGetFormatPtr + .asFunction(); - set kCFNumberFormatterMinIntegerDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMinIntegerDigits.value = value; + void CFDateFormatterSetFormat( + CFDateFormatterRef formatter, + CFStringRef formatString, + ) { + return _CFDateFormatterSetFormat( + formatter, + formatString, + ); + } - late final ffi.Pointer - _kCFNumberFormatterMaxIntegerDigits = - _lookup('kCFNumberFormatterMaxIntegerDigits'); + late final _CFDateFormatterSetFormatPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFDateFormatterRef, CFStringRef)>>('CFDateFormatterSetFormat'); + late final _CFDateFormatterSetFormat = _CFDateFormatterSetFormatPtr + .asFunction(); - CFNumberFormatterKey get kCFNumberFormatterMaxIntegerDigits => - _kCFNumberFormatterMaxIntegerDigits.value; + CFStringRef CFDateFormatterCreateStringWithDate( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + CFDateRef date, + ) { + return _CFDateFormatterCreateStringWithDate( + allocator, + formatter, + date, + ); + } - set kCFNumberFormatterMaxIntegerDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMaxIntegerDigits.value = value; + late final _CFDateFormatterCreateStringWithDatePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, + CFDateRef)>>('CFDateFormatterCreateStringWithDate'); + late final _CFDateFormatterCreateStringWithDate = + _CFDateFormatterCreateStringWithDatePtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFDateFormatterRef, CFDateRef)>(); - late final ffi.Pointer - _kCFNumberFormatterMinFractionDigits = - _lookup('kCFNumberFormatterMinFractionDigits'); + CFStringRef CFDateFormatterCreateStringWithAbsoluteTime( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + double at, + ) { + return _CFDateFormatterCreateStringWithAbsoluteTime( + allocator, + formatter, + at, + ); + } - CFNumberFormatterKey get kCFNumberFormatterMinFractionDigits => - _kCFNumberFormatterMinFractionDigits.value; + late final _CFDateFormatterCreateStringWithAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, + CFAbsoluteTime)>>('CFDateFormatterCreateStringWithAbsoluteTime'); + late final _CFDateFormatterCreateStringWithAbsoluteTime = + _CFDateFormatterCreateStringWithAbsoluteTimePtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, double)>(); - set kCFNumberFormatterMinFractionDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMinFractionDigits.value = value; + CFDateRef CFDateFormatterCreateDateFromString( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + ) { + return _CFDateFormatterCreateDateFromString( + allocator, + formatter, + string, + rangep, + ); + } - late final ffi.Pointer - _kCFNumberFormatterMaxFractionDigits = - _lookup('kCFNumberFormatterMaxFractionDigits'); + late final _CFDateFormatterCreateDateFromStringPtr = _lookup< + ffi.NativeFunction< + CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, + ffi.Pointer)>>('CFDateFormatterCreateDateFromString'); + late final _CFDateFormatterCreateDateFromString = + _CFDateFormatterCreateDateFromStringPtr.asFunction< + CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, + ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterMaxFractionDigits => - _kCFNumberFormatterMaxFractionDigits.value; + int CFDateFormatterGetAbsoluteTimeFromString( + CFDateFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + ffi.Pointer atp, + ) { + return _CFDateFormatterGetAbsoluteTimeFromString( + formatter, + string, + rangep, + atp, + ); + } - set kCFNumberFormatterMaxFractionDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMaxFractionDigits.value = value; + late final _CFDateFormatterGetAbsoluteTimeFromStringPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDateFormatterRef, CFStringRef, + ffi.Pointer, ffi.Pointer)>>( + 'CFDateFormatterGetAbsoluteTimeFromString'); + late final _CFDateFormatterGetAbsoluteTimeFromString = + _CFDateFormatterGetAbsoluteTimeFromStringPtr.asFunction< + int Function(CFDateFormatterRef, CFStringRef, ffi.Pointer, + ffi.Pointer)>(); - late final ffi.Pointer _kCFNumberFormatterGroupingSize = - _lookup('kCFNumberFormatterGroupingSize'); + void CFDateFormatterSetProperty( + CFDateFormatterRef formatter, + CFStringRef key, + CFTypeRef value, + ) { + return _CFDateFormatterSetProperty( + formatter, + key, + value, + ); + } - CFNumberFormatterKey get kCFNumberFormatterGroupingSize => - _kCFNumberFormatterGroupingSize.value; + late final _CFDateFormatterSetPropertyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFDateFormatterRef, CFStringRef, + CFTypeRef)>>('CFDateFormatterSetProperty'); + late final _CFDateFormatterSetProperty = _CFDateFormatterSetPropertyPtr + .asFunction(); - set kCFNumberFormatterGroupingSize(CFNumberFormatterKey value) => - _kCFNumberFormatterGroupingSize.value = value; + CFTypeRef CFDateFormatterCopyProperty( + CFDateFormatterRef formatter, + CFDateFormatterKey key, + ) { + return _CFDateFormatterCopyProperty( + formatter, + key, + ); + } - late final ffi.Pointer - _kCFNumberFormatterSecondaryGroupingSize = - _lookup('kCFNumberFormatterSecondaryGroupingSize'); + late final _CFDateFormatterCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFDateFormatterRef, + CFDateFormatterKey)>>('CFDateFormatterCopyProperty'); + late final _CFDateFormatterCopyProperty = _CFDateFormatterCopyPropertyPtr + .asFunction(); - CFNumberFormatterKey get kCFNumberFormatterSecondaryGroupingSize => - _kCFNumberFormatterSecondaryGroupingSize.value; + late final ffi.Pointer _kCFDateFormatterIsLenient = + _lookup('kCFDateFormatterIsLenient'); - set kCFNumberFormatterSecondaryGroupingSize(CFNumberFormatterKey value) => - _kCFNumberFormatterSecondaryGroupingSize.value = value; + CFDateFormatterKey get kCFDateFormatterIsLenient => + _kCFDateFormatterIsLenient.value; - late final ffi.Pointer _kCFNumberFormatterRoundingMode = - _lookup('kCFNumberFormatterRoundingMode'); + set kCFDateFormatterIsLenient(CFDateFormatterKey value) => + _kCFDateFormatterIsLenient.value = value; - CFNumberFormatterKey get kCFNumberFormatterRoundingMode => - _kCFNumberFormatterRoundingMode.value; + late final ffi.Pointer _kCFDateFormatterTimeZone = + _lookup('kCFDateFormatterTimeZone'); - set kCFNumberFormatterRoundingMode(CFNumberFormatterKey value) => - _kCFNumberFormatterRoundingMode.value = value; + CFDateFormatterKey get kCFDateFormatterTimeZone => + _kCFDateFormatterTimeZone.value; - late final ffi.Pointer - _kCFNumberFormatterRoundingIncrement = - _lookup('kCFNumberFormatterRoundingIncrement'); + set kCFDateFormatterTimeZone(CFDateFormatterKey value) => + _kCFDateFormatterTimeZone.value = value; - CFNumberFormatterKey get kCFNumberFormatterRoundingIncrement => - _kCFNumberFormatterRoundingIncrement.value; + late final ffi.Pointer _kCFDateFormatterCalendarName = + _lookup('kCFDateFormatterCalendarName'); - set kCFNumberFormatterRoundingIncrement(CFNumberFormatterKey value) => - _kCFNumberFormatterRoundingIncrement.value = value; + CFDateFormatterKey get kCFDateFormatterCalendarName => + _kCFDateFormatterCalendarName.value; - late final ffi.Pointer _kCFNumberFormatterFormatWidth = - _lookup('kCFNumberFormatterFormatWidth'); + set kCFDateFormatterCalendarName(CFDateFormatterKey value) => + _kCFDateFormatterCalendarName.value = value; - CFNumberFormatterKey get kCFNumberFormatterFormatWidth => - _kCFNumberFormatterFormatWidth.value; + late final ffi.Pointer _kCFDateFormatterDefaultFormat = + _lookup('kCFDateFormatterDefaultFormat'); - set kCFNumberFormatterFormatWidth(CFNumberFormatterKey value) => - _kCFNumberFormatterFormatWidth.value = value; + CFDateFormatterKey get kCFDateFormatterDefaultFormat => + _kCFDateFormatterDefaultFormat.value; - late final ffi.Pointer - _kCFNumberFormatterPaddingPosition = - _lookup('kCFNumberFormatterPaddingPosition'); + set kCFDateFormatterDefaultFormat(CFDateFormatterKey value) => + _kCFDateFormatterDefaultFormat.value = value; - CFNumberFormatterKey get kCFNumberFormatterPaddingPosition => - _kCFNumberFormatterPaddingPosition.value; + late final ffi.Pointer + _kCFDateFormatterTwoDigitStartDate = + _lookup('kCFDateFormatterTwoDigitStartDate'); - set kCFNumberFormatterPaddingPosition(CFNumberFormatterKey value) => - _kCFNumberFormatterPaddingPosition.value = value; + CFDateFormatterKey get kCFDateFormatterTwoDigitStartDate => + _kCFDateFormatterTwoDigitStartDate.value; - late final ffi.Pointer - _kCFNumberFormatterPaddingCharacter = - _lookup('kCFNumberFormatterPaddingCharacter'); + set kCFDateFormatterTwoDigitStartDate(CFDateFormatterKey value) => + _kCFDateFormatterTwoDigitStartDate.value = value; - CFNumberFormatterKey get kCFNumberFormatterPaddingCharacter => - _kCFNumberFormatterPaddingCharacter.value; + late final ffi.Pointer _kCFDateFormatterDefaultDate = + _lookup('kCFDateFormatterDefaultDate'); - set kCFNumberFormatterPaddingCharacter(CFNumberFormatterKey value) => - _kCFNumberFormatterPaddingCharacter.value = value; + CFDateFormatterKey get kCFDateFormatterDefaultDate => + _kCFDateFormatterDefaultDate.value; - late final ffi.Pointer - _kCFNumberFormatterDefaultFormat = - _lookup('kCFNumberFormatterDefaultFormat'); + set kCFDateFormatterDefaultDate(CFDateFormatterKey value) => + _kCFDateFormatterDefaultDate.value = value; - CFNumberFormatterKey get kCFNumberFormatterDefaultFormat => - _kCFNumberFormatterDefaultFormat.value; + late final ffi.Pointer _kCFDateFormatterCalendar = + _lookup('kCFDateFormatterCalendar'); - set kCFNumberFormatterDefaultFormat(CFNumberFormatterKey value) => - _kCFNumberFormatterDefaultFormat.value = value; + CFDateFormatterKey get kCFDateFormatterCalendar => + _kCFDateFormatterCalendar.value; - late final ffi.Pointer _kCFNumberFormatterMultiplier = - _lookup('kCFNumberFormatterMultiplier'); + set kCFDateFormatterCalendar(CFDateFormatterKey value) => + _kCFDateFormatterCalendar.value = value; - CFNumberFormatterKey get kCFNumberFormatterMultiplier => - _kCFNumberFormatterMultiplier.value; + late final ffi.Pointer _kCFDateFormatterEraSymbols = + _lookup('kCFDateFormatterEraSymbols'); - set kCFNumberFormatterMultiplier(CFNumberFormatterKey value) => - _kCFNumberFormatterMultiplier.value = value; + CFDateFormatterKey get kCFDateFormatterEraSymbols => + _kCFDateFormatterEraSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterPositivePrefix = - _lookup('kCFNumberFormatterPositivePrefix'); + set kCFDateFormatterEraSymbols(CFDateFormatterKey value) => + _kCFDateFormatterEraSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterPositivePrefix => - _kCFNumberFormatterPositivePrefix.value; + late final ffi.Pointer _kCFDateFormatterMonthSymbols = + _lookup('kCFDateFormatterMonthSymbols'); - set kCFNumberFormatterPositivePrefix(CFNumberFormatterKey value) => - _kCFNumberFormatterPositivePrefix.value = value; + CFDateFormatterKey get kCFDateFormatterMonthSymbols => + _kCFDateFormatterMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterPositiveSuffix = - _lookup('kCFNumberFormatterPositiveSuffix'); + set kCFDateFormatterMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterPositiveSuffix => - _kCFNumberFormatterPositiveSuffix.value; + late final ffi.Pointer + _kCFDateFormatterShortMonthSymbols = + _lookup('kCFDateFormatterShortMonthSymbols'); - set kCFNumberFormatterPositiveSuffix(CFNumberFormatterKey value) => - _kCFNumberFormatterPositiveSuffix.value = value; + CFDateFormatterKey get kCFDateFormatterShortMonthSymbols => + _kCFDateFormatterShortMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterNegativePrefix = - _lookup('kCFNumberFormatterNegativePrefix'); + set kCFDateFormatterShortMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterNegativePrefix => - _kCFNumberFormatterNegativePrefix.value; + late final ffi.Pointer _kCFDateFormatterWeekdaySymbols = + _lookup('kCFDateFormatterWeekdaySymbols'); - set kCFNumberFormatterNegativePrefix(CFNumberFormatterKey value) => - _kCFNumberFormatterNegativePrefix.value = value; + CFDateFormatterKey get kCFDateFormatterWeekdaySymbols => + _kCFDateFormatterWeekdaySymbols.value; - late final ffi.Pointer - _kCFNumberFormatterNegativeSuffix = - _lookup('kCFNumberFormatterNegativeSuffix'); + set kCFDateFormatterWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterWeekdaySymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterNegativeSuffix => - _kCFNumberFormatterNegativeSuffix.value; + late final ffi.Pointer + _kCFDateFormatterShortWeekdaySymbols = + _lookup('kCFDateFormatterShortWeekdaySymbols'); - set kCFNumberFormatterNegativeSuffix(CFNumberFormatterKey value) => - _kCFNumberFormatterNegativeSuffix.value = value; + CFDateFormatterKey get kCFDateFormatterShortWeekdaySymbols => + _kCFDateFormatterShortWeekdaySymbols.value; - late final ffi.Pointer - _kCFNumberFormatterPerMillSymbol = - _lookup('kCFNumberFormatterPerMillSymbol'); + set kCFDateFormatterShortWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortWeekdaySymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterPerMillSymbol => - _kCFNumberFormatterPerMillSymbol.value; + late final ffi.Pointer _kCFDateFormatterAMSymbol = + _lookup('kCFDateFormatterAMSymbol'); - set kCFNumberFormatterPerMillSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterPerMillSymbol.value = value; + CFDateFormatterKey get kCFDateFormatterAMSymbol => + _kCFDateFormatterAMSymbol.value; - late final ffi.Pointer - _kCFNumberFormatterInternationalCurrencySymbol = - _lookup( - 'kCFNumberFormatterInternationalCurrencySymbol'); + set kCFDateFormatterAMSymbol(CFDateFormatterKey value) => + _kCFDateFormatterAMSymbol.value = value; - CFNumberFormatterKey get kCFNumberFormatterInternationalCurrencySymbol => - _kCFNumberFormatterInternationalCurrencySymbol.value; + late final ffi.Pointer _kCFDateFormatterPMSymbol = + _lookup('kCFDateFormatterPMSymbol'); - set kCFNumberFormatterInternationalCurrencySymbol( - CFNumberFormatterKey value) => - _kCFNumberFormatterInternationalCurrencySymbol.value = value; + CFDateFormatterKey get kCFDateFormatterPMSymbol => + _kCFDateFormatterPMSymbol.value; - late final ffi.Pointer - _kCFNumberFormatterCurrencyGroupingSeparator = - _lookup( - 'kCFNumberFormatterCurrencyGroupingSeparator'); + set kCFDateFormatterPMSymbol(CFDateFormatterKey value) => + _kCFDateFormatterPMSymbol.value = value; - CFNumberFormatterKey get kCFNumberFormatterCurrencyGroupingSeparator => - _kCFNumberFormatterCurrencyGroupingSeparator.value; + late final ffi.Pointer _kCFDateFormatterLongEraSymbols = + _lookup('kCFDateFormatterLongEraSymbols'); - set kCFNumberFormatterCurrencyGroupingSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencyGroupingSeparator.value = value; + CFDateFormatterKey get kCFDateFormatterLongEraSymbols => + _kCFDateFormatterLongEraSymbols.value; - late final ffi.Pointer _kCFNumberFormatterIsLenient = - _lookup('kCFNumberFormatterIsLenient'); + set kCFDateFormatterLongEraSymbols(CFDateFormatterKey value) => + _kCFDateFormatterLongEraSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterIsLenient => - _kCFNumberFormatterIsLenient.value; + late final ffi.Pointer + _kCFDateFormatterVeryShortMonthSymbols = + _lookup('kCFDateFormatterVeryShortMonthSymbols'); - set kCFNumberFormatterIsLenient(CFNumberFormatterKey value) => - _kCFNumberFormatterIsLenient.value = value; + CFDateFormatterKey get kCFDateFormatterVeryShortMonthSymbols => + _kCFDateFormatterVeryShortMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterUseSignificantDigits = - _lookup('kCFNumberFormatterUseSignificantDigits'); + set kCFDateFormatterVeryShortMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterVeryShortMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterUseSignificantDigits => - _kCFNumberFormatterUseSignificantDigits.value; + late final ffi.Pointer + _kCFDateFormatterStandaloneMonthSymbols = + _lookup('kCFDateFormatterStandaloneMonthSymbols'); - set kCFNumberFormatterUseSignificantDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterUseSignificantDigits.value = value; + CFDateFormatterKey get kCFDateFormatterStandaloneMonthSymbols => + _kCFDateFormatterStandaloneMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterMinSignificantDigits = - _lookup('kCFNumberFormatterMinSignificantDigits'); + set kCFDateFormatterStandaloneMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterStandaloneMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterMinSignificantDigits => - _kCFNumberFormatterMinSignificantDigits.value; + late final ffi.Pointer + _kCFDateFormatterShortStandaloneMonthSymbols = + _lookup( + 'kCFDateFormatterShortStandaloneMonthSymbols'); - set kCFNumberFormatterMinSignificantDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMinSignificantDigits.value = value; + CFDateFormatterKey get kCFDateFormatterShortStandaloneMonthSymbols => + _kCFDateFormatterShortStandaloneMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterMaxSignificantDigits = - _lookup('kCFNumberFormatterMaxSignificantDigits'); + set kCFDateFormatterShortStandaloneMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortStandaloneMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterMaxSignificantDigits => - _kCFNumberFormatterMaxSignificantDigits.value; + late final ffi.Pointer + _kCFDateFormatterVeryShortStandaloneMonthSymbols = + _lookup( + 'kCFDateFormatterVeryShortStandaloneMonthSymbols'); - set kCFNumberFormatterMaxSignificantDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMaxSignificantDigits.value = value; + CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneMonthSymbols => + _kCFDateFormatterVeryShortStandaloneMonthSymbols.value; - int CFNumberFormatterGetDecimalInfoForCurrencyCode( - CFStringRef currencyCode, - ffi.Pointer defaultFractionDigits, - ffi.Pointer roundingIncrement, - ) { - return _CFNumberFormatterGetDecimalInfoForCurrencyCode( - currencyCode, - defaultFractionDigits, - roundingIncrement, - ); - } + set kCFDateFormatterVeryShortStandaloneMonthSymbols( + CFDateFormatterKey value) => + _kCFDateFormatterVeryShortStandaloneMonthSymbols.value = value; - late final _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, ffi.Pointer, - ffi.Pointer)>>( - 'CFNumberFormatterGetDecimalInfoForCurrencyCode'); - late final _CFNumberFormatterGetDecimalInfoForCurrencyCode = - _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr.asFunction< - int Function( - CFStringRef, ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _kCFDateFormatterVeryShortWeekdaySymbols = + _lookup('kCFDateFormatterVeryShortWeekdaySymbols'); - late final ffi.Pointer _kCFPreferencesAnyApplication = - _lookup('kCFPreferencesAnyApplication'); + CFDateFormatterKey get kCFDateFormatterVeryShortWeekdaySymbols => + _kCFDateFormatterVeryShortWeekdaySymbols.value; - CFStringRef get kCFPreferencesAnyApplication => - _kCFPreferencesAnyApplication.value; + set kCFDateFormatterVeryShortWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterVeryShortWeekdaySymbols.value = value; - set kCFPreferencesAnyApplication(CFStringRef value) => - _kCFPreferencesAnyApplication.value = value; + late final ffi.Pointer + _kCFDateFormatterStandaloneWeekdaySymbols = + _lookup('kCFDateFormatterStandaloneWeekdaySymbols'); - late final ffi.Pointer _kCFPreferencesCurrentApplication = - _lookup('kCFPreferencesCurrentApplication'); + CFDateFormatterKey get kCFDateFormatterStandaloneWeekdaySymbols => + _kCFDateFormatterStandaloneWeekdaySymbols.value; - CFStringRef get kCFPreferencesCurrentApplication => - _kCFPreferencesCurrentApplication.value; + set kCFDateFormatterStandaloneWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterStandaloneWeekdaySymbols.value = value; - set kCFPreferencesCurrentApplication(CFStringRef value) => - _kCFPreferencesCurrentApplication.value = value; + late final ffi.Pointer + _kCFDateFormatterShortStandaloneWeekdaySymbols = + _lookup( + 'kCFDateFormatterShortStandaloneWeekdaySymbols'); - late final ffi.Pointer _kCFPreferencesAnyHost = - _lookup('kCFPreferencesAnyHost'); + CFDateFormatterKey get kCFDateFormatterShortStandaloneWeekdaySymbols => + _kCFDateFormatterShortStandaloneWeekdaySymbols.value; - CFStringRef get kCFPreferencesAnyHost => _kCFPreferencesAnyHost.value; + set kCFDateFormatterShortStandaloneWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortStandaloneWeekdaySymbols.value = value; - set kCFPreferencesAnyHost(CFStringRef value) => - _kCFPreferencesAnyHost.value = value; + late final ffi.Pointer + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols = + _lookup( + 'kCFDateFormatterVeryShortStandaloneWeekdaySymbols'); - late final ffi.Pointer _kCFPreferencesCurrentHost = - _lookup('kCFPreferencesCurrentHost'); + CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneWeekdaySymbols => + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value; - CFStringRef get kCFPreferencesCurrentHost => _kCFPreferencesCurrentHost.value; + set kCFDateFormatterVeryShortStandaloneWeekdaySymbols( + CFDateFormatterKey value) => + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value = value; - set kCFPreferencesCurrentHost(CFStringRef value) => - _kCFPreferencesCurrentHost.value = value; + late final ffi.Pointer _kCFDateFormatterQuarterSymbols = + _lookup('kCFDateFormatterQuarterSymbols'); - late final ffi.Pointer _kCFPreferencesAnyUser = - _lookup('kCFPreferencesAnyUser'); + CFDateFormatterKey get kCFDateFormatterQuarterSymbols => + _kCFDateFormatterQuarterSymbols.value; - CFStringRef get kCFPreferencesAnyUser => _kCFPreferencesAnyUser.value; + set kCFDateFormatterQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterQuarterSymbols.value = value; - set kCFPreferencesAnyUser(CFStringRef value) => - _kCFPreferencesAnyUser.value = value; + late final ffi.Pointer + _kCFDateFormatterShortQuarterSymbols = + _lookup('kCFDateFormatterShortQuarterSymbols'); - late final ffi.Pointer _kCFPreferencesCurrentUser = - _lookup('kCFPreferencesCurrentUser'); + CFDateFormatterKey get kCFDateFormatterShortQuarterSymbols => + _kCFDateFormatterShortQuarterSymbols.value; - CFStringRef get kCFPreferencesCurrentUser => _kCFPreferencesCurrentUser.value; + set kCFDateFormatterShortQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortQuarterSymbols.value = value; - set kCFPreferencesCurrentUser(CFStringRef value) => - _kCFPreferencesCurrentUser.value = value; + late final ffi.Pointer + _kCFDateFormatterStandaloneQuarterSymbols = + _lookup('kCFDateFormatterStandaloneQuarterSymbols'); - CFPropertyListRef CFPreferencesCopyAppValue( - CFStringRef key, - CFStringRef applicationID, - ) { - return _CFPreferencesCopyAppValue( - key, - applicationID, - ); + CFDateFormatterKey get kCFDateFormatterStandaloneQuarterSymbols => + _kCFDateFormatterStandaloneQuarterSymbols.value; + + set kCFDateFormatterStandaloneQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterStandaloneQuarterSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterShortStandaloneQuarterSymbols = + _lookup( + 'kCFDateFormatterShortStandaloneQuarterSymbols'); + + CFDateFormatterKey get kCFDateFormatterShortStandaloneQuarterSymbols => + _kCFDateFormatterShortStandaloneQuarterSymbols.value; + + set kCFDateFormatterShortStandaloneQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortStandaloneQuarterSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterGregorianStartDate = + _lookup('kCFDateFormatterGregorianStartDate'); + + CFDateFormatterKey get kCFDateFormatterGregorianStartDate => + _kCFDateFormatterGregorianStartDate.value; + + set kCFDateFormatterGregorianStartDate(CFDateFormatterKey value) => + _kCFDateFormatterGregorianStartDate.value = value; + + late final ffi.Pointer + _kCFDateFormatterDoesRelativeDateFormattingKey = + _lookup( + 'kCFDateFormatterDoesRelativeDateFormattingKey'); + + CFDateFormatterKey get kCFDateFormatterDoesRelativeDateFormattingKey => + _kCFDateFormatterDoesRelativeDateFormattingKey.value; + + set kCFDateFormatterDoesRelativeDateFormattingKey(CFDateFormatterKey value) => + _kCFDateFormatterDoesRelativeDateFormattingKey.value = value; + + late final ffi.Pointer _kCFBooleanTrue = + _lookup('kCFBooleanTrue'); + + CFBooleanRef get kCFBooleanTrue => _kCFBooleanTrue.value; + + set kCFBooleanTrue(CFBooleanRef value) => _kCFBooleanTrue.value = value; + + late final ffi.Pointer _kCFBooleanFalse = + _lookup('kCFBooleanFalse'); + + CFBooleanRef get kCFBooleanFalse => _kCFBooleanFalse.value; + + set kCFBooleanFalse(CFBooleanRef value) => _kCFBooleanFalse.value = value; + + int CFBooleanGetTypeID() { + return _CFBooleanGetTypeID(); } - late final _CFPreferencesCopyAppValuePtr = _lookup< - ffi.NativeFunction< - CFPropertyListRef Function( - CFStringRef, CFStringRef)>>('CFPreferencesCopyAppValue'); - late final _CFPreferencesCopyAppValue = _CFPreferencesCopyAppValuePtr - .asFunction(); + late final _CFBooleanGetTypeIDPtr = + _lookup>('CFBooleanGetTypeID'); + late final _CFBooleanGetTypeID = + _CFBooleanGetTypeIDPtr.asFunction(); - int CFPreferencesGetAppBooleanValue( - CFStringRef key, - CFStringRef applicationID, - ffi.Pointer keyExistsAndHasValidFormat, + int CFBooleanGetValue( + CFBooleanRef boolean, ) { - return _CFPreferencesGetAppBooleanValue( - key, - applicationID, - keyExistsAndHasValidFormat, + return _CFBooleanGetValue( + boolean, ); } - late final _CFPreferencesGetAppBooleanValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, CFStringRef, - ffi.Pointer)>>('CFPreferencesGetAppBooleanValue'); - late final _CFPreferencesGetAppBooleanValue = - _CFPreferencesGetAppBooleanValuePtr.asFunction< - int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); + late final _CFBooleanGetValuePtr = + _lookup>( + 'CFBooleanGetValue'); + late final _CFBooleanGetValue = + _CFBooleanGetValuePtr.asFunction(); - int CFPreferencesGetAppIntegerValue( - CFStringRef key, - CFStringRef applicationID, - ffi.Pointer keyExistsAndHasValidFormat, - ) { - return _CFPreferencesGetAppIntegerValue( - key, - applicationID, - keyExistsAndHasValidFormat, - ); + late final ffi.Pointer _kCFNumberPositiveInfinity = + _lookup('kCFNumberPositiveInfinity'); + + CFNumberRef get kCFNumberPositiveInfinity => _kCFNumberPositiveInfinity.value; + + set kCFNumberPositiveInfinity(CFNumberRef value) => + _kCFNumberPositiveInfinity.value = value; + + late final ffi.Pointer _kCFNumberNegativeInfinity = + _lookup('kCFNumberNegativeInfinity'); + + CFNumberRef get kCFNumberNegativeInfinity => _kCFNumberNegativeInfinity.value; + + set kCFNumberNegativeInfinity(CFNumberRef value) => + _kCFNumberNegativeInfinity.value = value; + + late final ffi.Pointer _kCFNumberNaN = + _lookup('kCFNumberNaN'); + + CFNumberRef get kCFNumberNaN => _kCFNumberNaN.value; + + set kCFNumberNaN(CFNumberRef value) => _kCFNumberNaN.value = value; + + int CFNumberGetTypeID() { + return _CFNumberGetTypeID(); } - late final _CFPreferencesGetAppIntegerValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFStringRef, CFStringRef, - ffi.Pointer)>>('CFPreferencesGetAppIntegerValue'); - late final _CFPreferencesGetAppIntegerValue = - _CFPreferencesGetAppIntegerValuePtr.asFunction< - int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); + late final _CFNumberGetTypeIDPtr = + _lookup>('CFNumberGetTypeID'); + late final _CFNumberGetTypeID = + _CFNumberGetTypeIDPtr.asFunction(); - void CFPreferencesSetAppValue( - CFStringRef key, - CFPropertyListRef value, - CFStringRef applicationID, + CFNumberRef CFNumberCreate( + CFAllocatorRef allocator, + int theType, + ffi.Pointer valuePtr, ) { - return _CFPreferencesSetAppValue( - key, - value, - applicationID, + return _CFNumberCreate( + allocator, + theType, + valuePtr, ); } - late final _CFPreferencesSetAppValuePtr = _lookup< + late final _CFNumberCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFStringRef, CFPropertyListRef, - CFStringRef)>>('CFPreferencesSetAppValue'); - late final _CFPreferencesSetAppValue = _CFPreferencesSetAppValuePtr - .asFunction(); + CFNumberRef Function(CFAllocatorRef, ffi.Int32, + ffi.Pointer)>>('CFNumberCreate'); + late final _CFNumberCreate = _CFNumberCreatePtr.asFunction< + CFNumberRef Function(CFAllocatorRef, int, ffi.Pointer)>(); - void CFPreferencesAddSuitePreferencesToApp( - CFStringRef applicationID, - CFStringRef suiteID, + int CFNumberGetType( + CFNumberRef number, ) { - return _CFPreferencesAddSuitePreferencesToApp( - applicationID, - suiteID, + return _CFNumberGetType( + number, ); } - late final _CFPreferencesAddSuitePreferencesToAppPtr = - _lookup>( - 'CFPreferencesAddSuitePreferencesToApp'); - late final _CFPreferencesAddSuitePreferencesToApp = - _CFPreferencesAddSuitePreferencesToAppPtr.asFunction< - void Function(CFStringRef, CFStringRef)>(); + late final _CFNumberGetTypePtr = + _lookup>( + 'CFNumberGetType'); + late final _CFNumberGetType = + _CFNumberGetTypePtr.asFunction(); - void CFPreferencesRemoveSuitePreferencesFromApp( - CFStringRef applicationID, - CFStringRef suiteID, + int CFNumberGetByteSize( + CFNumberRef number, ) { - return _CFPreferencesRemoveSuitePreferencesFromApp( - applicationID, - suiteID, + return _CFNumberGetByteSize( + number, ); } - late final _CFPreferencesRemoveSuitePreferencesFromAppPtr = - _lookup>( - 'CFPreferencesRemoveSuitePreferencesFromApp'); - late final _CFPreferencesRemoveSuitePreferencesFromApp = - _CFPreferencesRemoveSuitePreferencesFromAppPtr.asFunction< - void Function(CFStringRef, CFStringRef)>(); + late final _CFNumberGetByteSizePtr = + _lookup>( + 'CFNumberGetByteSize'); + late final _CFNumberGetByteSize = + _CFNumberGetByteSizePtr.asFunction(); - int CFPreferencesAppSynchronize( - CFStringRef applicationID, + int CFNumberIsFloatType( + CFNumberRef number, ) { - return _CFPreferencesAppSynchronize( - applicationID, + return _CFNumberIsFloatType( + number, ); } - late final _CFPreferencesAppSynchronizePtr = - _lookup>( - 'CFPreferencesAppSynchronize'); - late final _CFPreferencesAppSynchronize = - _CFPreferencesAppSynchronizePtr.asFunction(); + late final _CFNumberIsFloatTypePtr = + _lookup>( + 'CFNumberIsFloatType'); + late final _CFNumberIsFloatType = + _CFNumberIsFloatTypePtr.asFunction(); - CFPropertyListRef CFPreferencesCopyValue( - CFStringRef key, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + int CFNumberGetValue( + CFNumberRef number, + int theType, + ffi.Pointer valuePtr, ) { - return _CFPreferencesCopyValue( - key, - applicationID, - userName, - hostName, + return _CFNumberGetValue( + number, + theType, + valuePtr, ); } - late final _CFPreferencesCopyValuePtr = _lookup< + late final _CFNumberGetValuePtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function(CFStringRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFPreferencesCopyValue'); - late final _CFPreferencesCopyValue = _CFPreferencesCopyValuePtr.asFunction< - CFPropertyListRef Function( - CFStringRef, CFStringRef, CFStringRef, CFStringRef)>(); + Boolean Function(CFNumberRef, ffi.Int32, + ffi.Pointer)>>('CFNumberGetValue'); + late final _CFNumberGetValue = _CFNumberGetValuePtr.asFunction< + int Function(CFNumberRef, int, ffi.Pointer)>(); - CFDictionaryRef CFPreferencesCopyMultiple( - CFArrayRef keysToFetch, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + int CFNumberCompare( + CFNumberRef number, + CFNumberRef otherNumber, + ffi.Pointer context, ) { - return _CFPreferencesCopyMultiple( - keysToFetch, - applicationID, - userName, - hostName, + return _CFNumberCompare( + number, + otherNumber, + context, ); } - late final _CFPreferencesCopyMultiplePtr = _lookup< + late final _CFNumberComparePtr = _lookup< ffi.NativeFunction< - CFDictionaryRef Function(CFArrayRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFPreferencesCopyMultiple'); - late final _CFPreferencesCopyMultiple = - _CFPreferencesCopyMultiplePtr.asFunction< - CFDictionaryRef Function( - CFArrayRef, CFStringRef, CFStringRef, CFStringRef)>(); - - void CFPreferencesSetValue( - CFStringRef key, - CFPropertyListRef value, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, - ) { - return _CFPreferencesSetValue( - key, - value, - applicationID, - userName, - hostName, - ); + ffi.Int32 Function(CFNumberRef, CFNumberRef, + ffi.Pointer)>>('CFNumberCompare'); + late final _CFNumberCompare = _CFNumberComparePtr.asFunction< + int Function(CFNumberRef, CFNumberRef, ffi.Pointer)>(); + + int CFNumberFormatterGetTypeID() { + return _CFNumberFormatterGetTypeID(); } - late final _CFPreferencesSetValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFStringRef, CFPropertyListRef, CFStringRef, - CFStringRef, CFStringRef)>>('CFPreferencesSetValue'); - late final _CFPreferencesSetValue = _CFPreferencesSetValuePtr.asFunction< - void Function(CFStringRef, CFPropertyListRef, CFStringRef, CFStringRef, - CFStringRef)>(); + late final _CFNumberFormatterGetTypeIDPtr = + _lookup>( + 'CFNumberFormatterGetTypeID'); + late final _CFNumberFormatterGetTypeID = + _CFNumberFormatterGetTypeIDPtr.asFunction(); - void CFPreferencesSetMultiple( - CFDictionaryRef keysToSet, - CFArrayRef keysToRemove, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + CFNumberFormatterRef CFNumberFormatterCreate( + CFAllocatorRef allocator, + CFLocaleRef locale, + int style, ) { - return _CFPreferencesSetMultiple( - keysToSet, - keysToRemove, - applicationID, - userName, - hostName, + return _CFNumberFormatterCreate( + allocator, + locale, + style, ); } - late final _CFPreferencesSetMultiplePtr = _lookup< + late final _CFNumberFormatterCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFDictionaryRef, CFArrayRef, CFStringRef, - CFStringRef, CFStringRef)>>('CFPreferencesSetMultiple'); - late final _CFPreferencesSetMultiple = - _CFPreferencesSetMultiplePtr.asFunction< - void Function(CFDictionaryRef, CFArrayRef, CFStringRef, CFStringRef, - CFStringRef)>(); + CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, + ffi.Int32)>>('CFNumberFormatterCreate'); + late final _CFNumberFormatterCreate = _CFNumberFormatterCreatePtr.asFunction< + CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, int)>(); - int CFPreferencesSynchronize( - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + CFLocaleRef CFNumberFormatterGetLocale( + CFNumberFormatterRef formatter, ) { - return _CFPreferencesSynchronize( - applicationID, - userName, - hostName, + return _CFNumberFormatterGetLocale( + formatter, ); } - late final _CFPreferencesSynchronizePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, CFStringRef, - CFStringRef)>>('CFPreferencesSynchronize'); - late final _CFPreferencesSynchronize = _CFPreferencesSynchronizePtr - .asFunction(); + late final _CFNumberFormatterGetLocalePtr = + _lookup>( + 'CFNumberFormatterGetLocale'); + late final _CFNumberFormatterGetLocale = _CFNumberFormatterGetLocalePtr + .asFunction(); - CFArrayRef CFPreferencesCopyApplicationList( - CFStringRef userName, - CFStringRef hostName, + int CFNumberFormatterGetStyle( + CFNumberFormatterRef formatter, ) { - return _CFPreferencesCopyApplicationList( - userName, - hostName, + return _CFNumberFormatterGetStyle( + formatter, ); } - late final _CFPreferencesCopyApplicationListPtr = _lookup< - ffi.NativeFunction>( - 'CFPreferencesCopyApplicationList'); - late final _CFPreferencesCopyApplicationList = - _CFPreferencesCopyApplicationListPtr.asFunction< - CFArrayRef Function(CFStringRef, CFStringRef)>(); + late final _CFNumberFormatterGetStylePtr = + _lookup>( + 'CFNumberFormatterGetStyle'); + late final _CFNumberFormatterGetStyle = _CFNumberFormatterGetStylePtr + .asFunction(); - CFArrayRef CFPreferencesCopyKeyList( - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + CFStringRef CFNumberFormatterGetFormat( + CFNumberFormatterRef formatter, ) { - return _CFPreferencesCopyKeyList( - applicationID, - userName, - hostName, + return _CFNumberFormatterGetFormat( + formatter, ); } - late final _CFPreferencesCopyKeyListPtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFStringRef, CFStringRef, - CFStringRef)>>('CFPreferencesCopyKeyList'); - late final _CFPreferencesCopyKeyList = _CFPreferencesCopyKeyListPtr - .asFunction(); + late final _CFNumberFormatterGetFormatPtr = + _lookup>( + 'CFNumberFormatterGetFormat'); + late final _CFNumberFormatterGetFormat = _CFNumberFormatterGetFormatPtr + .asFunction(); - int CFPreferencesAppValueIsForced( - CFStringRef key, - CFStringRef applicationID, + void CFNumberFormatterSetFormat( + CFNumberFormatterRef formatter, + CFStringRef formatString, ) { - return _CFPreferencesAppValueIsForced( - key, - applicationID, + return _CFNumberFormatterSetFormat( + formatter, + formatString, ); } - late final _CFPreferencesAppValueIsForcedPtr = - _lookup>( - 'CFPreferencesAppValueIsForced'); - late final _CFPreferencesAppValueIsForced = _CFPreferencesAppValueIsForcedPtr - .asFunction(); - - int CFURLGetTypeID() { - return _CFURLGetTypeID(); - } - - late final _CFURLGetTypeIDPtr = - _lookup>('CFURLGetTypeID'); - late final _CFURLGetTypeID = _CFURLGetTypeIDPtr.asFunction(); + late final _CFNumberFormatterSetFormatPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFNumberFormatterRef, + CFStringRef)>>('CFNumberFormatterSetFormat'); + late final _CFNumberFormatterSetFormat = _CFNumberFormatterSetFormatPtr + .asFunction(); - CFURLRef CFURLCreateWithBytes( + CFStringRef CFNumberFormatterCreateStringWithNumber( CFAllocatorRef allocator, - ffi.Pointer URLBytes, - int length, - int encoding, - CFURLRef baseURL, + CFNumberFormatterRef formatter, + CFNumberRef number, ) { - return _CFURLCreateWithBytes( + return _CFNumberFormatterCreateStringWithNumber( allocator, - URLBytes, - length, - encoding, - baseURL, + formatter, + number, ); } - late final _CFURLCreateWithBytesPtr = _lookup< + late final _CFNumberFormatterCreateStringWithNumberPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFStringEncoding, CFURLRef)>>('CFURLCreateWithBytes'); - late final _CFURLCreateWithBytes = _CFURLCreateWithBytesPtr.asFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); + CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, + CFNumberRef)>>('CFNumberFormatterCreateStringWithNumber'); + late final _CFNumberFormatterCreateStringWithNumber = + _CFNumberFormatterCreateStringWithNumberPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFNumberFormatterRef, CFNumberRef)>(); - CFDataRef CFURLCreateData( + CFStringRef CFNumberFormatterCreateStringWithValue( CFAllocatorRef allocator, - CFURLRef url, - int encoding, - int escapeWhitespace, + CFNumberFormatterRef formatter, + int numberType, + ffi.Pointer valuePtr, ) { - return _CFURLCreateData( + return _CFNumberFormatterCreateStringWithValue( allocator, - url, - encoding, - escapeWhitespace, + formatter, + numberType, + valuePtr, ); } - late final _CFURLCreateDataPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, CFStringEncoding, - Boolean)>>('CFURLCreateData'); - late final _CFURLCreateData = _CFURLCreateDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, int, int)>(); + late final _CFNumberFormatterCreateStringWithValuePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, + ffi.Int32, ffi.Pointer)>>( + 'CFNumberFormatterCreateStringWithValue'); + late final _CFNumberFormatterCreateStringWithValue = + _CFNumberFormatterCreateStringWithValuePtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, int, + ffi.Pointer)>(); - CFURLRef CFURLCreateWithString( + CFNumberRef CFNumberFormatterCreateNumberFromString( CFAllocatorRef allocator, - CFStringRef URLString, - CFURLRef baseURL, + CFNumberFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + int options, ) { - return _CFURLCreateWithString( + return _CFNumberFormatterCreateNumberFromString( allocator, - URLString, - baseURL, + formatter, + string, + rangep, + options, ); } - late final _CFURLCreateWithStringPtr = _lookup< + late final _CFNumberFormatterCreateNumberFromStringPtr = _lookup< ffi.NativeFunction< - CFURLRef Function( - CFAllocatorRef, CFStringRef, CFURLRef)>>('CFURLCreateWithString'); - late final _CFURLCreateWithString = _CFURLCreateWithStringPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, CFURLRef)>(); + CFNumberRef Function( + CFAllocatorRef, + CFNumberFormatterRef, + CFStringRef, + ffi.Pointer, + CFOptionFlags)>>('CFNumberFormatterCreateNumberFromString'); + late final _CFNumberFormatterCreateNumberFromString = + _CFNumberFormatterCreateNumberFromStringPtr.asFunction< + CFNumberRef Function(CFAllocatorRef, CFNumberFormatterRef, + CFStringRef, ffi.Pointer, int)>(); - CFURLRef CFURLCreateAbsoluteURLWithBytes( - CFAllocatorRef alloc, - ffi.Pointer relativeURLBytes, - int length, - int encoding, - CFURLRef baseURL, - int useCompatibilityMode, + int CFNumberFormatterGetValueFromString( + CFNumberFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + int numberType, + ffi.Pointer valuePtr, ) { - return _CFURLCreateAbsoluteURLWithBytes( - alloc, - relativeURLBytes, - length, - encoding, - baseURL, - useCompatibilityMode, + return _CFNumberFormatterGetValueFromString( + formatter, + string, + rangep, + numberType, + valuePtr, ); } - late final _CFURLCreateAbsoluteURLWithBytesPtr = _lookup< + late final _CFNumberFormatterGetValueFromStringPtr = _lookup< ffi.NativeFunction< - CFURLRef Function( - CFAllocatorRef, - ffi.Pointer, - CFIndex, - CFStringEncoding, - CFURLRef, - Boolean)>>('CFURLCreateAbsoluteURLWithBytes'); - late final _CFURLCreateAbsoluteURLWithBytes = - _CFURLCreateAbsoluteURLWithBytesPtr.asFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer, int, int, CFURLRef, int)>(); + Boolean Function( + CFNumberFormatterRef, + CFStringRef, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('CFNumberFormatterGetValueFromString'); + late final _CFNumberFormatterGetValueFromString = + _CFNumberFormatterGetValueFromStringPtr.asFunction< + int Function(CFNumberFormatterRef, CFStringRef, ffi.Pointer, + int, ffi.Pointer)>(); - CFURLRef CFURLCreateWithFileSystemPath( - CFAllocatorRef allocator, - CFStringRef filePath, - int pathStyle, - int isDirectory, + void CFNumberFormatterSetProperty( + CFNumberFormatterRef formatter, + CFNumberFormatterKey key, + CFTypeRef value, ) { - return _CFURLCreateWithFileSystemPath( - allocator, - filePath, - pathStyle, - isDirectory, + return _CFNumberFormatterSetProperty( + formatter, + key, + value, ); } - late final _CFURLCreateWithFileSystemPathPtr = _lookup< + late final _CFNumberFormatterSetPropertyPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, - Boolean)>>('CFURLCreateWithFileSystemPath'); - late final _CFURLCreateWithFileSystemPath = _CFURLCreateWithFileSystemPathPtr - .asFunction(); + ffi.Void Function(CFNumberFormatterRef, CFNumberFormatterKey, + CFTypeRef)>>('CFNumberFormatterSetProperty'); + late final _CFNumberFormatterSetProperty = + _CFNumberFormatterSetPropertyPtr.asFunction< + void Function( + CFNumberFormatterRef, CFNumberFormatterKey, CFTypeRef)>(); - CFURLRef CFURLCreateFromFileSystemRepresentation( - CFAllocatorRef allocator, - ffi.Pointer buffer, - int bufLen, - int isDirectory, + CFTypeRef CFNumberFormatterCopyProperty( + CFNumberFormatterRef formatter, + CFNumberFormatterKey key, ) { - return _CFURLCreateFromFileSystemRepresentation( - allocator, - buffer, - bufLen, - isDirectory, + return _CFNumberFormatterCopyProperty( + formatter, + key, ); } - late final _CFURLCreateFromFileSystemRepresentationPtr = _lookup< + late final _CFNumberFormatterCopyPropertyPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - Boolean)>>('CFURLCreateFromFileSystemRepresentation'); - late final _CFURLCreateFromFileSystemRepresentation = - _CFURLCreateFromFileSystemRepresentationPtr.asFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, int, int)>(); + CFTypeRef Function(CFNumberFormatterRef, + CFNumberFormatterKey)>>('CFNumberFormatterCopyProperty'); + late final _CFNumberFormatterCopyProperty = + _CFNumberFormatterCopyPropertyPtr.asFunction< + CFTypeRef Function(CFNumberFormatterRef, CFNumberFormatterKey)>(); - CFURLRef CFURLCreateWithFileSystemPathRelativeToBase( - CFAllocatorRef allocator, - CFStringRef filePath, - int pathStyle, - int isDirectory, - CFURLRef baseURL, - ) { - return _CFURLCreateWithFileSystemPathRelativeToBase( - allocator, - filePath, - pathStyle, - isDirectory, - baseURL, - ); - } + late final ffi.Pointer _kCFNumberFormatterCurrencyCode = + _lookup('kCFNumberFormatterCurrencyCode'); - late final _CFURLCreateWithFileSystemPathRelativeToBasePtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, Boolean, - CFURLRef)>>('CFURLCreateWithFileSystemPathRelativeToBase'); - late final _CFURLCreateWithFileSystemPathRelativeToBase = - _CFURLCreateWithFileSystemPathRelativeToBasePtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, int, int, CFURLRef)>(); + CFNumberFormatterKey get kCFNumberFormatterCurrencyCode => + _kCFNumberFormatterCurrencyCode.value; - CFURLRef CFURLCreateFromFileSystemRepresentationRelativeToBase( - CFAllocatorRef allocator, - ffi.Pointer buffer, - int bufLen, - int isDirectory, - CFURLRef baseURL, - ) { - return _CFURLCreateFromFileSystemRepresentationRelativeToBase( - allocator, - buffer, - bufLen, - isDirectory, - baseURL, - ); - } + set kCFNumberFormatterCurrencyCode(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencyCode.value = value; - late final _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr = - _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - Boolean, CFURLRef)>>( - 'CFURLCreateFromFileSystemRepresentationRelativeToBase'); - late final _CFURLCreateFromFileSystemRepresentationRelativeToBase = - _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr.asFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); + late final ffi.Pointer + _kCFNumberFormatterDecimalSeparator = + _lookup('kCFNumberFormatterDecimalSeparator'); - int CFURLGetFileSystemRepresentation( - CFURLRef url, - int resolveAgainstBase, - ffi.Pointer buffer, - int maxBufLen, - ) { - return _CFURLGetFileSystemRepresentation( - url, - resolveAgainstBase, - buffer, - maxBufLen, - ); - } + CFNumberFormatterKey get kCFNumberFormatterDecimalSeparator => + _kCFNumberFormatterDecimalSeparator.value; - late final _CFURLGetFileSystemRepresentationPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, Boolean, ffi.Pointer, - CFIndex)>>('CFURLGetFileSystemRepresentation'); - late final _CFURLGetFileSystemRepresentation = - _CFURLGetFileSystemRepresentationPtr.asFunction< - int Function(CFURLRef, int, ffi.Pointer, int)>(); + set kCFNumberFormatterDecimalSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterDecimalSeparator.value = value; - CFURLRef CFURLCopyAbsoluteURL( - CFURLRef relativeURL, - ) { - return _CFURLCopyAbsoluteURL( - relativeURL, - ); - } + late final ffi.Pointer + _kCFNumberFormatterCurrencyDecimalSeparator = + _lookup( + 'kCFNumberFormatterCurrencyDecimalSeparator'); - late final _CFURLCopyAbsoluteURLPtr = - _lookup>( - 'CFURLCopyAbsoluteURL'); - late final _CFURLCopyAbsoluteURL = - _CFURLCopyAbsoluteURLPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterCurrencyDecimalSeparator => + _kCFNumberFormatterCurrencyDecimalSeparator.value; - CFStringRef CFURLGetString( - CFURLRef anURL, - ) { - return _CFURLGetString( - anURL, - ); - } + set kCFNumberFormatterCurrencyDecimalSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencyDecimalSeparator.value = value; - late final _CFURLGetStringPtr = - _lookup>( - 'CFURLGetString'); - late final _CFURLGetString = - _CFURLGetStringPtr.asFunction(); + late final ffi.Pointer + _kCFNumberFormatterAlwaysShowDecimalSeparator = + _lookup( + 'kCFNumberFormatterAlwaysShowDecimalSeparator'); - CFURLRef CFURLGetBaseURL( - CFURLRef anURL, - ) { - return _CFURLGetBaseURL( - anURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterAlwaysShowDecimalSeparator => + _kCFNumberFormatterAlwaysShowDecimalSeparator.value; - late final _CFURLGetBaseURLPtr = - _lookup>( - 'CFURLGetBaseURL'); - late final _CFURLGetBaseURL = - _CFURLGetBaseURLPtr.asFunction(); + set kCFNumberFormatterAlwaysShowDecimalSeparator( + CFNumberFormatterKey value) => + _kCFNumberFormatterAlwaysShowDecimalSeparator.value = value; - int CFURLCanBeDecomposed( - CFURLRef anURL, - ) { - return _CFURLCanBeDecomposed( - anURL, - ); - } + late final ffi.Pointer + _kCFNumberFormatterGroupingSeparator = + _lookup('kCFNumberFormatterGroupingSeparator'); - late final _CFURLCanBeDecomposedPtr = - _lookup>( - 'CFURLCanBeDecomposed'); - late final _CFURLCanBeDecomposed = - _CFURLCanBeDecomposedPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterGroupingSeparator => + _kCFNumberFormatterGroupingSeparator.value; - CFStringRef CFURLCopyScheme( - CFURLRef anURL, - ) { - return _CFURLCopyScheme( - anURL, - ); - } + set kCFNumberFormatterGroupingSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterGroupingSeparator.value = value; - late final _CFURLCopySchemePtr = - _lookup>( - 'CFURLCopyScheme'); - late final _CFURLCopyScheme = - _CFURLCopySchemePtr.asFunction(); + late final ffi.Pointer + _kCFNumberFormatterUseGroupingSeparator = + _lookup('kCFNumberFormatterUseGroupingSeparator'); - CFStringRef CFURLCopyNetLocation( - CFURLRef anURL, - ) { - return _CFURLCopyNetLocation( - anURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterUseGroupingSeparator => + _kCFNumberFormatterUseGroupingSeparator.value; - late final _CFURLCopyNetLocationPtr = - _lookup>( - 'CFURLCopyNetLocation'); - late final _CFURLCopyNetLocation = - _CFURLCopyNetLocationPtr.asFunction(); + set kCFNumberFormatterUseGroupingSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterUseGroupingSeparator.value = value; - CFStringRef CFURLCopyPath( - CFURLRef anURL, - ) { - return _CFURLCopyPath( - anURL, - ); - } + late final ffi.Pointer + _kCFNumberFormatterPercentSymbol = + _lookup('kCFNumberFormatterPercentSymbol'); - late final _CFURLCopyPathPtr = - _lookup>( - 'CFURLCopyPath'); - late final _CFURLCopyPath = - _CFURLCopyPathPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterPercentSymbol => + _kCFNumberFormatterPercentSymbol.value; - CFStringRef CFURLCopyStrictPath( - CFURLRef anURL, - ffi.Pointer isAbsolute, - ) { - return _CFURLCopyStrictPath( - anURL, - isAbsolute, - ); - } + set kCFNumberFormatterPercentSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterPercentSymbol.value = value; - late final _CFURLCopyStrictPathPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFURLRef, ffi.Pointer)>>('CFURLCopyStrictPath'); - late final _CFURLCopyStrictPath = _CFURLCopyStrictPathPtr.asFunction< - CFStringRef Function(CFURLRef, ffi.Pointer)>(); + late final ffi.Pointer _kCFNumberFormatterZeroSymbol = + _lookup('kCFNumberFormatterZeroSymbol'); - CFStringRef CFURLCopyFileSystemPath( - CFURLRef anURL, - int pathStyle, - ) { - return _CFURLCopyFileSystemPath( - anURL, - pathStyle, - ); - } + CFNumberFormatterKey get kCFNumberFormatterZeroSymbol => + _kCFNumberFormatterZeroSymbol.value; - late final _CFURLCopyFileSystemPathPtr = - _lookup>( - 'CFURLCopyFileSystemPath'); - late final _CFURLCopyFileSystemPath = _CFURLCopyFileSystemPathPtr.asFunction< - CFStringRef Function(CFURLRef, int)>(); + set kCFNumberFormatterZeroSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterZeroSymbol.value = value; - int CFURLHasDirectoryPath( - CFURLRef anURL, - ) { - return _CFURLHasDirectoryPath( - anURL, - ); - } + late final ffi.Pointer _kCFNumberFormatterNaNSymbol = + _lookup('kCFNumberFormatterNaNSymbol'); - late final _CFURLHasDirectoryPathPtr = - _lookup>( - 'CFURLHasDirectoryPath'); - late final _CFURLHasDirectoryPath = - _CFURLHasDirectoryPathPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterNaNSymbol => + _kCFNumberFormatterNaNSymbol.value; - CFStringRef CFURLCopyResourceSpecifier( - CFURLRef anURL, - ) { - return _CFURLCopyResourceSpecifier( - anURL, - ); - } + set kCFNumberFormatterNaNSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterNaNSymbol.value = value; - late final _CFURLCopyResourceSpecifierPtr = - _lookup>( - 'CFURLCopyResourceSpecifier'); - late final _CFURLCopyResourceSpecifier = _CFURLCopyResourceSpecifierPtr - .asFunction(); + late final ffi.Pointer + _kCFNumberFormatterInfinitySymbol = + _lookup('kCFNumberFormatterInfinitySymbol'); - CFStringRef CFURLCopyHostName( - CFURLRef anURL, - ) { - return _CFURLCopyHostName( - anURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterInfinitySymbol => + _kCFNumberFormatterInfinitySymbol.value; - late final _CFURLCopyHostNamePtr = - _lookup>( - 'CFURLCopyHostName'); - late final _CFURLCopyHostName = - _CFURLCopyHostNamePtr.asFunction(); + set kCFNumberFormatterInfinitySymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterInfinitySymbol.value = value; - int CFURLGetPortNumber( - CFURLRef anURL, - ) { - return _CFURLGetPortNumber( - anURL, - ); - } + late final ffi.Pointer _kCFNumberFormatterMinusSign = + _lookup('kCFNumberFormatterMinusSign'); - late final _CFURLGetPortNumberPtr = - _lookup>( - 'CFURLGetPortNumber'); - late final _CFURLGetPortNumber = - _CFURLGetPortNumberPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterMinusSign => + _kCFNumberFormatterMinusSign.value; - CFStringRef CFURLCopyUserName( - CFURLRef anURL, - ) { - return _CFURLCopyUserName( - anURL, - ); - } + set kCFNumberFormatterMinusSign(CFNumberFormatterKey value) => + _kCFNumberFormatterMinusSign.value = value; - late final _CFURLCopyUserNamePtr = - _lookup>( - 'CFURLCopyUserName'); - late final _CFURLCopyUserName = - _CFURLCopyUserNamePtr.asFunction(); + late final ffi.Pointer _kCFNumberFormatterPlusSign = + _lookup('kCFNumberFormatterPlusSign'); - CFStringRef CFURLCopyPassword( - CFURLRef anURL, - ) { - return _CFURLCopyPassword( - anURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterPlusSign => + _kCFNumberFormatterPlusSign.value; - late final _CFURLCopyPasswordPtr = - _lookup>( - 'CFURLCopyPassword'); - late final _CFURLCopyPassword = - _CFURLCopyPasswordPtr.asFunction(); + set kCFNumberFormatterPlusSign(CFNumberFormatterKey value) => + _kCFNumberFormatterPlusSign.value = value; - CFStringRef CFURLCopyParameterString( - CFURLRef anURL, - CFStringRef charactersToLeaveEscaped, - ) { - return _CFURLCopyParameterString( - anURL, - charactersToLeaveEscaped, - ); - } + late final ffi.Pointer + _kCFNumberFormatterCurrencySymbol = + _lookup('kCFNumberFormatterCurrencySymbol'); - late final _CFURLCopyParameterStringPtr = - _lookup>( - 'CFURLCopyParameterString'); - late final _CFURLCopyParameterString = _CFURLCopyParameterStringPtr - .asFunction(); + CFNumberFormatterKey get kCFNumberFormatterCurrencySymbol => + _kCFNumberFormatterCurrencySymbol.value; - CFStringRef CFURLCopyQueryString( - CFURLRef anURL, - CFStringRef charactersToLeaveEscaped, - ) { - return _CFURLCopyQueryString( - anURL, - charactersToLeaveEscaped, - ); - } + set kCFNumberFormatterCurrencySymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencySymbol.value = value; - late final _CFURLCopyQueryStringPtr = - _lookup>( - 'CFURLCopyQueryString'); - late final _CFURLCopyQueryString = _CFURLCopyQueryStringPtr.asFunction< - CFStringRef Function(CFURLRef, CFStringRef)>(); + late final ffi.Pointer + _kCFNumberFormatterExponentSymbol = + _lookup('kCFNumberFormatterExponentSymbol'); - CFStringRef CFURLCopyFragment( - CFURLRef anURL, - CFStringRef charactersToLeaveEscaped, - ) { - return _CFURLCopyFragment( - anURL, - charactersToLeaveEscaped, - ); - } + CFNumberFormatterKey get kCFNumberFormatterExponentSymbol => + _kCFNumberFormatterExponentSymbol.value; - late final _CFURLCopyFragmentPtr = - _lookup>( - 'CFURLCopyFragment'); - late final _CFURLCopyFragment = _CFURLCopyFragmentPtr.asFunction< - CFStringRef Function(CFURLRef, CFStringRef)>(); + set kCFNumberFormatterExponentSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterExponentSymbol.value = value; - CFStringRef CFURLCopyLastPathComponent( - CFURLRef url, - ) { - return _CFURLCopyLastPathComponent( - url, - ); - } + late final ffi.Pointer + _kCFNumberFormatterMinIntegerDigits = + _lookup('kCFNumberFormatterMinIntegerDigits'); - late final _CFURLCopyLastPathComponentPtr = - _lookup>( - 'CFURLCopyLastPathComponent'); - late final _CFURLCopyLastPathComponent = _CFURLCopyLastPathComponentPtr - .asFunction(); + CFNumberFormatterKey get kCFNumberFormatterMinIntegerDigits => + _kCFNumberFormatterMinIntegerDigits.value; - CFStringRef CFURLCopyPathExtension( - CFURLRef url, - ) { - return _CFURLCopyPathExtension( - url, - ); - } + set kCFNumberFormatterMinIntegerDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMinIntegerDigits.value = value; - late final _CFURLCopyPathExtensionPtr = - _lookup>( - 'CFURLCopyPathExtension'); - late final _CFURLCopyPathExtension = - _CFURLCopyPathExtensionPtr.asFunction(); + late final ffi.Pointer + _kCFNumberFormatterMaxIntegerDigits = + _lookup('kCFNumberFormatterMaxIntegerDigits'); - CFURLRef CFURLCreateCopyAppendingPathComponent( - CFAllocatorRef allocator, - CFURLRef url, - CFStringRef pathComponent, - int isDirectory, - ) { - return _CFURLCreateCopyAppendingPathComponent( - allocator, - url, - pathComponent, - isDirectory, - ); - } + CFNumberFormatterKey get kCFNumberFormatterMaxIntegerDigits => + _kCFNumberFormatterMaxIntegerDigits.value; - late final _CFURLCreateCopyAppendingPathComponentPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, - Boolean)>>('CFURLCreateCopyAppendingPathComponent'); - late final _CFURLCreateCopyAppendingPathComponent = - _CFURLCreateCopyAppendingPathComponentPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, int)>(); + set kCFNumberFormatterMaxIntegerDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMaxIntegerDigits.value = value; - CFURLRef CFURLCreateCopyDeletingLastPathComponent( - CFAllocatorRef allocator, - CFURLRef url, - ) { - return _CFURLCreateCopyDeletingLastPathComponent( - allocator, - url, - ); - } + late final ffi.Pointer + _kCFNumberFormatterMinFractionDigits = + _lookup('kCFNumberFormatterMinFractionDigits'); - late final _CFURLCreateCopyDeletingLastPathComponentPtr = - _lookup>( - 'CFURLCreateCopyDeletingLastPathComponent'); - late final _CFURLCreateCopyDeletingLastPathComponent = - _CFURLCreateCopyDeletingLastPathComponentPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef)>(); + CFNumberFormatterKey get kCFNumberFormatterMinFractionDigits => + _kCFNumberFormatterMinFractionDigits.value; - CFURLRef CFURLCreateCopyAppendingPathExtension( - CFAllocatorRef allocator, - CFURLRef url, - CFStringRef extension1, - ) { - return _CFURLCreateCopyAppendingPathExtension( - allocator, - url, - extension1, - ); - } + set kCFNumberFormatterMinFractionDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMinFractionDigits.value = value; - late final _CFURLCreateCopyAppendingPathExtensionPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, - CFStringRef)>>('CFURLCreateCopyAppendingPathExtension'); - late final _CFURLCreateCopyAppendingPathExtension = - _CFURLCreateCopyAppendingPathExtensionPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); + late final ffi.Pointer + _kCFNumberFormatterMaxFractionDigits = + _lookup('kCFNumberFormatterMaxFractionDigits'); - CFURLRef CFURLCreateCopyDeletingPathExtension( - CFAllocatorRef allocator, - CFURLRef url, - ) { - return _CFURLCreateCopyDeletingPathExtension( - allocator, - url, - ); - } + CFNumberFormatterKey get kCFNumberFormatterMaxFractionDigits => + _kCFNumberFormatterMaxFractionDigits.value; - late final _CFURLCreateCopyDeletingPathExtensionPtr = - _lookup>( - 'CFURLCreateCopyDeletingPathExtension'); - late final _CFURLCreateCopyDeletingPathExtension = - _CFURLCreateCopyDeletingPathExtensionPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef)>(); + set kCFNumberFormatterMaxFractionDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMaxFractionDigits.value = value; - int CFURLGetBytes( - CFURLRef url, - ffi.Pointer buffer, - int bufferLength, - ) { - return _CFURLGetBytes( - url, - buffer, - bufferLength, - ); - } + late final ffi.Pointer _kCFNumberFormatterGroupingSize = + _lookup('kCFNumberFormatterGroupingSize'); - late final _CFURLGetBytesPtr = _lookup< - ffi.NativeFunction< - CFIndex Function( - CFURLRef, ffi.Pointer, CFIndex)>>('CFURLGetBytes'); - late final _CFURLGetBytes = _CFURLGetBytesPtr.asFunction< - int Function(CFURLRef, ffi.Pointer, int)>(); + CFNumberFormatterKey get kCFNumberFormatterGroupingSize => + _kCFNumberFormatterGroupingSize.value; - CFRange CFURLGetByteRangeForComponent( - CFURLRef url, - int component, - ffi.Pointer rangeIncludingSeparators, - ) { - return _CFURLGetByteRangeForComponent( - url, - component, - rangeIncludingSeparators, - ); - } + set kCFNumberFormatterGroupingSize(CFNumberFormatterKey value) => + _kCFNumberFormatterGroupingSize.value = value; - late final _CFURLGetByteRangeForComponentPtr = _lookup< - ffi.NativeFunction< - CFRange Function(CFURLRef, ffi.Int32, - ffi.Pointer)>>('CFURLGetByteRangeForComponent'); - late final _CFURLGetByteRangeForComponent = _CFURLGetByteRangeForComponentPtr - .asFunction)>(); + late final ffi.Pointer + _kCFNumberFormatterSecondaryGroupingSize = + _lookup('kCFNumberFormatterSecondaryGroupingSize'); - CFStringRef CFURLCreateStringByReplacingPercentEscapes( - CFAllocatorRef allocator, - CFStringRef originalString, - CFStringRef charactersToLeaveEscaped, - ) { - return _CFURLCreateStringByReplacingPercentEscapes( - allocator, - originalString, - charactersToLeaveEscaped, - ); - } + CFNumberFormatterKey get kCFNumberFormatterSecondaryGroupingSize => + _kCFNumberFormatterSecondaryGroupingSize.value; - late final _CFURLCreateStringByReplacingPercentEscapesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFStringRef)>>('CFURLCreateStringByReplacingPercentEscapes'); - late final _CFURLCreateStringByReplacingPercentEscapes = - _CFURLCreateStringByReplacingPercentEscapesPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); + set kCFNumberFormatterSecondaryGroupingSize(CFNumberFormatterKey value) => + _kCFNumberFormatterSecondaryGroupingSize.value = value; - CFStringRef CFURLCreateStringByReplacingPercentEscapesUsingEncoding( - CFAllocatorRef allocator, - CFStringRef origString, - CFStringRef charsToLeaveEscaped, - int encoding, - ) { - return _CFURLCreateStringByReplacingPercentEscapesUsingEncoding( - allocator, - origString, - charsToLeaveEscaped, - encoding, - ); - } + late final ffi.Pointer _kCFNumberFormatterRoundingMode = + _lookup('kCFNumberFormatterRoundingMode'); - late final _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr = - _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef, - CFStringEncoding)>>( - 'CFURLCreateStringByReplacingPercentEscapesUsingEncoding'); - late final _CFURLCreateStringByReplacingPercentEscapesUsingEncoding = - _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef, CFStringRef, int)>(); + CFNumberFormatterKey get kCFNumberFormatterRoundingMode => + _kCFNumberFormatterRoundingMode.value; - CFStringRef CFURLCreateStringByAddingPercentEscapes( - CFAllocatorRef allocator, - CFStringRef originalString, - CFStringRef charactersToLeaveUnescaped, - CFStringRef legalURLCharactersToBeEscaped, - int encoding, - ) { - return _CFURLCreateStringByAddingPercentEscapes( - allocator, - originalString, - charactersToLeaveUnescaped, - legalURLCharactersToBeEscaped, - encoding, - ); - } + set kCFNumberFormatterRoundingMode(CFNumberFormatterKey value) => + _kCFNumberFormatterRoundingMode.value = value; - late final _CFURLCreateStringByAddingPercentEscapesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringEncoding)>>('CFURLCreateStringByAddingPercentEscapes'); - late final _CFURLCreateStringByAddingPercentEscapes = - _CFURLCreateStringByAddingPercentEscapesPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef, CFStringRef, CFStringRef, int)>(); + late final ffi.Pointer + _kCFNumberFormatterRoundingIncrement = + _lookup('kCFNumberFormatterRoundingIncrement'); - int CFURLIsFileReferenceURL( - CFURLRef url, - ) { - return _CFURLIsFileReferenceURL( - url, - ); - } + CFNumberFormatterKey get kCFNumberFormatterRoundingIncrement => + _kCFNumberFormatterRoundingIncrement.value; - late final _CFURLIsFileReferenceURLPtr = - _lookup>( - 'CFURLIsFileReferenceURL'); - late final _CFURLIsFileReferenceURL = - _CFURLIsFileReferenceURLPtr.asFunction(); + set kCFNumberFormatterRoundingIncrement(CFNumberFormatterKey value) => + _kCFNumberFormatterRoundingIncrement.value = value; - CFURLRef CFURLCreateFileReferenceURL( - CFAllocatorRef allocator, - CFURLRef url, - ffi.Pointer error, - ) { - return _CFURLCreateFileReferenceURL( - allocator, - url, - error, - ); - } + late final ffi.Pointer _kCFNumberFormatterFormatWidth = + _lookup('kCFNumberFormatterFormatWidth'); - late final _CFURLCreateFileReferenceURLPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, - ffi.Pointer)>>('CFURLCreateFileReferenceURL'); - late final _CFURLCreateFileReferenceURL = - _CFURLCreateFileReferenceURLPtr.asFunction< - CFURLRef Function( - CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterFormatWidth => + _kCFNumberFormatterFormatWidth.value; - CFURLRef CFURLCreateFilePathURL( - CFAllocatorRef allocator, - CFURLRef url, - ffi.Pointer error, - ) { - return _CFURLCreateFilePathURL( - allocator, - url, - error, - ); - } + set kCFNumberFormatterFormatWidth(CFNumberFormatterKey value) => + _kCFNumberFormatterFormatWidth.value = value; - late final _CFURLCreateFilePathURLPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, - ffi.Pointer)>>('CFURLCreateFilePathURL'); - late final _CFURLCreateFilePathURL = _CFURLCreateFilePathURLPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + late final ffi.Pointer + _kCFNumberFormatterPaddingPosition = + _lookup('kCFNumberFormatterPaddingPosition'); - CFURLRef CFURLCreateFromFSRef( - CFAllocatorRef allocator, - ffi.Pointer fsRef, - ) { - return _CFURLCreateFromFSRef( - allocator, - fsRef, - ); - } + CFNumberFormatterKey get kCFNumberFormatterPaddingPosition => + _kCFNumberFormatterPaddingPosition.value; - late final _CFURLCreateFromFSRefPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer)>>('CFURLCreateFromFSRef'); - late final _CFURLCreateFromFSRef = _CFURLCreateFromFSRefPtr.asFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer)>(); + set kCFNumberFormatterPaddingPosition(CFNumberFormatterKey value) => + _kCFNumberFormatterPaddingPosition.value = value; - int CFURLGetFSRef( - CFURLRef url, - ffi.Pointer fsRef, - ) { - return _CFURLGetFSRef( - url, - fsRef, - ); - } + late final ffi.Pointer + _kCFNumberFormatterPaddingCharacter = + _lookup('kCFNumberFormatterPaddingCharacter'); - late final _CFURLGetFSRefPtr = _lookup< - ffi.NativeFunction)>>( - 'CFURLGetFSRef'); - late final _CFURLGetFSRef = _CFURLGetFSRefPtr.asFunction< - int Function(CFURLRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterPaddingCharacter => + _kCFNumberFormatterPaddingCharacter.value; - int CFURLCopyResourcePropertyForKey( - CFURLRef url, - CFStringRef key, - ffi.Pointer propertyValueTypeRefPtr, - ffi.Pointer error, - ) { - return _CFURLCopyResourcePropertyForKey( - url, - key, - propertyValueTypeRefPtr, - error, - ); - } + set kCFNumberFormatterPaddingCharacter(CFNumberFormatterKey value) => + _kCFNumberFormatterPaddingCharacter.value = value; - late final _CFURLCopyResourcePropertyForKeyPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, CFStringRef, ffi.Pointer, - ffi.Pointer)>>('CFURLCopyResourcePropertyForKey'); - late final _CFURLCopyResourcePropertyForKey = - _CFURLCopyResourcePropertyForKeyPtr.asFunction< - int Function(CFURLRef, CFStringRef, ffi.Pointer, - ffi.Pointer)>(); + late final ffi.Pointer + _kCFNumberFormatterDefaultFormat = + _lookup('kCFNumberFormatterDefaultFormat'); - CFDictionaryRef CFURLCopyResourcePropertiesForKeys( - CFURLRef url, - CFArrayRef keys, - ffi.Pointer error, - ) { - return _CFURLCopyResourcePropertiesForKeys( - url, - keys, - error, - ); - } + CFNumberFormatterKey get kCFNumberFormatterDefaultFormat => + _kCFNumberFormatterDefaultFormat.value; - late final _CFURLCopyResourcePropertiesForKeysPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFURLRef, CFArrayRef, - ffi.Pointer)>>('CFURLCopyResourcePropertiesForKeys'); - late final _CFURLCopyResourcePropertiesForKeys = - _CFURLCopyResourcePropertiesForKeysPtr.asFunction< - CFDictionaryRef Function( - CFURLRef, CFArrayRef, ffi.Pointer)>(); + set kCFNumberFormatterDefaultFormat(CFNumberFormatterKey value) => + _kCFNumberFormatterDefaultFormat.value = value; - int CFURLSetResourcePropertyForKey( - CFURLRef url, - CFStringRef key, - CFTypeRef propertyValue, - ffi.Pointer error, - ) { - return _CFURLSetResourcePropertyForKey( - url, - key, - propertyValue, - error, - ); - } + late final ffi.Pointer _kCFNumberFormatterMultiplier = + _lookup('kCFNumberFormatterMultiplier'); - late final _CFURLSetResourcePropertyForKeyPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, CFStringRef, CFTypeRef, - ffi.Pointer)>>('CFURLSetResourcePropertyForKey'); - late final _CFURLSetResourcePropertyForKey = - _CFURLSetResourcePropertyForKeyPtr.asFunction< - int Function( - CFURLRef, CFStringRef, CFTypeRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterMultiplier => + _kCFNumberFormatterMultiplier.value; - int CFURLSetResourcePropertiesForKeys( - CFURLRef url, - CFDictionaryRef keyedPropertyValues, - ffi.Pointer error, - ) { - return _CFURLSetResourcePropertiesForKeys( - url, - keyedPropertyValues, - error, - ); - } + set kCFNumberFormatterMultiplier(CFNumberFormatterKey value) => + _kCFNumberFormatterMultiplier.value = value; - late final _CFURLSetResourcePropertiesForKeysPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, CFDictionaryRef, - ffi.Pointer)>>('CFURLSetResourcePropertiesForKeys'); - late final _CFURLSetResourcePropertiesForKeys = - _CFURLSetResourcePropertiesForKeysPtr.asFunction< - int Function(CFURLRef, CFDictionaryRef, ffi.Pointer)>(); + late final ffi.Pointer + _kCFNumberFormatterPositivePrefix = + _lookup('kCFNumberFormatterPositivePrefix'); - late final ffi.Pointer _kCFURLKeysOfUnsetValuesKey = - _lookup('kCFURLKeysOfUnsetValuesKey'); + CFNumberFormatterKey get kCFNumberFormatterPositivePrefix => + _kCFNumberFormatterPositivePrefix.value; - CFStringRef get kCFURLKeysOfUnsetValuesKey => - _kCFURLKeysOfUnsetValuesKey.value; + set kCFNumberFormatterPositivePrefix(CFNumberFormatterKey value) => + _kCFNumberFormatterPositivePrefix.value = value; - set kCFURLKeysOfUnsetValuesKey(CFStringRef value) => - _kCFURLKeysOfUnsetValuesKey.value = value; + late final ffi.Pointer + _kCFNumberFormatterPositiveSuffix = + _lookup('kCFNumberFormatterPositiveSuffix'); - void CFURLClearResourcePropertyCacheForKey( - CFURLRef url, - CFStringRef key, - ) { - return _CFURLClearResourcePropertyCacheForKey( - url, - key, - ); - } + CFNumberFormatterKey get kCFNumberFormatterPositiveSuffix => + _kCFNumberFormatterPositiveSuffix.value; - late final _CFURLClearResourcePropertyCacheForKeyPtr = - _lookup>( - 'CFURLClearResourcePropertyCacheForKey'); - late final _CFURLClearResourcePropertyCacheForKey = - _CFURLClearResourcePropertyCacheForKeyPtr.asFunction< - void Function(CFURLRef, CFStringRef)>(); + set kCFNumberFormatterPositiveSuffix(CFNumberFormatterKey value) => + _kCFNumberFormatterPositiveSuffix.value = value; - void CFURLClearResourcePropertyCache( - CFURLRef url, - ) { - return _CFURLClearResourcePropertyCache( - url, - ); - } + late final ffi.Pointer + _kCFNumberFormatterNegativePrefix = + _lookup('kCFNumberFormatterNegativePrefix'); - late final _CFURLClearResourcePropertyCachePtr = - _lookup>( - 'CFURLClearResourcePropertyCache'); - late final _CFURLClearResourcePropertyCache = - _CFURLClearResourcePropertyCachePtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterNegativePrefix => + _kCFNumberFormatterNegativePrefix.value; - void CFURLSetTemporaryResourcePropertyForKey( - CFURLRef url, - CFStringRef key, - CFTypeRef propertyValue, - ) { - return _CFURLSetTemporaryResourcePropertyForKey( - url, - key, - propertyValue, - ); - } + set kCFNumberFormatterNegativePrefix(CFNumberFormatterKey value) => + _kCFNumberFormatterNegativePrefix.value = value; - late final _CFURLSetTemporaryResourcePropertyForKeyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFURLRef, CFStringRef, - CFTypeRef)>>('CFURLSetTemporaryResourcePropertyForKey'); - late final _CFURLSetTemporaryResourcePropertyForKey = - _CFURLSetTemporaryResourcePropertyForKeyPtr.asFunction< - void Function(CFURLRef, CFStringRef, CFTypeRef)>(); + late final ffi.Pointer + _kCFNumberFormatterNegativeSuffix = + _lookup('kCFNumberFormatterNegativeSuffix'); - int CFURLResourceIsReachable( - CFURLRef url, - ffi.Pointer error, - ) { - return _CFURLResourceIsReachable( - url, - error, - ); - } + CFNumberFormatterKey get kCFNumberFormatterNegativeSuffix => + _kCFNumberFormatterNegativeSuffix.value; - late final _CFURLResourceIsReachablePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFURLRef, ffi.Pointer)>>('CFURLResourceIsReachable'); - late final _CFURLResourceIsReachable = _CFURLResourceIsReachablePtr - .asFunction)>(); + set kCFNumberFormatterNegativeSuffix(CFNumberFormatterKey value) => + _kCFNumberFormatterNegativeSuffix.value = value; - late final ffi.Pointer _kCFURLNameKey = - _lookup('kCFURLNameKey'); + late final ffi.Pointer + _kCFNumberFormatterPerMillSymbol = + _lookup('kCFNumberFormatterPerMillSymbol'); - CFStringRef get kCFURLNameKey => _kCFURLNameKey.value; + CFNumberFormatterKey get kCFNumberFormatterPerMillSymbol => + _kCFNumberFormatterPerMillSymbol.value; - set kCFURLNameKey(CFStringRef value) => _kCFURLNameKey.value = value; + set kCFNumberFormatterPerMillSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterPerMillSymbol.value = value; - late final ffi.Pointer _kCFURLLocalizedNameKey = - _lookup('kCFURLLocalizedNameKey'); + late final ffi.Pointer + _kCFNumberFormatterInternationalCurrencySymbol = + _lookup( + 'kCFNumberFormatterInternationalCurrencySymbol'); - CFStringRef get kCFURLLocalizedNameKey => _kCFURLLocalizedNameKey.value; + CFNumberFormatterKey get kCFNumberFormatterInternationalCurrencySymbol => + _kCFNumberFormatterInternationalCurrencySymbol.value; - set kCFURLLocalizedNameKey(CFStringRef value) => - _kCFURLLocalizedNameKey.value = value; + set kCFNumberFormatterInternationalCurrencySymbol( + CFNumberFormatterKey value) => + _kCFNumberFormatterInternationalCurrencySymbol.value = value; - late final ffi.Pointer _kCFURLIsRegularFileKey = - _lookup('kCFURLIsRegularFileKey'); + late final ffi.Pointer + _kCFNumberFormatterCurrencyGroupingSeparator = + _lookup( + 'kCFNumberFormatterCurrencyGroupingSeparator'); - CFStringRef get kCFURLIsRegularFileKey => _kCFURLIsRegularFileKey.value; + CFNumberFormatterKey get kCFNumberFormatterCurrencyGroupingSeparator => + _kCFNumberFormatterCurrencyGroupingSeparator.value; - set kCFURLIsRegularFileKey(CFStringRef value) => - _kCFURLIsRegularFileKey.value = value; + set kCFNumberFormatterCurrencyGroupingSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencyGroupingSeparator.value = value; - late final ffi.Pointer _kCFURLIsDirectoryKey = - _lookup('kCFURLIsDirectoryKey'); + late final ffi.Pointer _kCFNumberFormatterIsLenient = + _lookup('kCFNumberFormatterIsLenient'); - CFStringRef get kCFURLIsDirectoryKey => _kCFURLIsDirectoryKey.value; + CFNumberFormatterKey get kCFNumberFormatterIsLenient => + _kCFNumberFormatterIsLenient.value; - set kCFURLIsDirectoryKey(CFStringRef value) => - _kCFURLIsDirectoryKey.value = value; + set kCFNumberFormatterIsLenient(CFNumberFormatterKey value) => + _kCFNumberFormatterIsLenient.value = value; - late final ffi.Pointer _kCFURLIsSymbolicLinkKey = - _lookup('kCFURLIsSymbolicLinkKey'); + late final ffi.Pointer + _kCFNumberFormatterUseSignificantDigits = + _lookup('kCFNumberFormatterUseSignificantDigits'); - CFStringRef get kCFURLIsSymbolicLinkKey => _kCFURLIsSymbolicLinkKey.value; + CFNumberFormatterKey get kCFNumberFormatterUseSignificantDigits => + _kCFNumberFormatterUseSignificantDigits.value; - set kCFURLIsSymbolicLinkKey(CFStringRef value) => - _kCFURLIsSymbolicLinkKey.value = value; + set kCFNumberFormatterUseSignificantDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterUseSignificantDigits.value = value; - late final ffi.Pointer _kCFURLIsVolumeKey = - _lookup('kCFURLIsVolumeKey'); + late final ffi.Pointer + _kCFNumberFormatterMinSignificantDigits = + _lookup('kCFNumberFormatterMinSignificantDigits'); - CFStringRef get kCFURLIsVolumeKey => _kCFURLIsVolumeKey.value; + CFNumberFormatterKey get kCFNumberFormatterMinSignificantDigits => + _kCFNumberFormatterMinSignificantDigits.value; - set kCFURLIsVolumeKey(CFStringRef value) => _kCFURLIsVolumeKey.value = value; + set kCFNumberFormatterMinSignificantDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMinSignificantDigits.value = value; - late final ffi.Pointer _kCFURLIsPackageKey = - _lookup('kCFURLIsPackageKey'); + late final ffi.Pointer + _kCFNumberFormatterMaxSignificantDigits = + _lookup('kCFNumberFormatterMaxSignificantDigits'); - CFStringRef get kCFURLIsPackageKey => _kCFURLIsPackageKey.value; + CFNumberFormatterKey get kCFNumberFormatterMaxSignificantDigits => + _kCFNumberFormatterMaxSignificantDigits.value; - set kCFURLIsPackageKey(CFStringRef value) => - _kCFURLIsPackageKey.value = value; + set kCFNumberFormatterMaxSignificantDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMaxSignificantDigits.value = value; - late final ffi.Pointer _kCFURLIsApplicationKey = - _lookup('kCFURLIsApplicationKey'); + int CFNumberFormatterGetDecimalInfoForCurrencyCode( + CFStringRef currencyCode, + ffi.Pointer defaultFractionDigits, + ffi.Pointer roundingIncrement, + ) { + return _CFNumberFormatterGetDecimalInfoForCurrencyCode( + currencyCode, + defaultFractionDigits, + roundingIncrement, + ); + } - CFStringRef get kCFURLIsApplicationKey => _kCFURLIsApplicationKey.value; + late final _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>>( + 'CFNumberFormatterGetDecimalInfoForCurrencyCode'); + late final _CFNumberFormatterGetDecimalInfoForCurrencyCode = + _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr.asFunction< + int Function( + CFStringRef, ffi.Pointer, ffi.Pointer)>(); - set kCFURLIsApplicationKey(CFStringRef value) => - _kCFURLIsApplicationKey.value = value; + late final ffi.Pointer _kCFPreferencesAnyApplication = + _lookup('kCFPreferencesAnyApplication'); - late final ffi.Pointer _kCFURLApplicationIsScriptableKey = - _lookup('kCFURLApplicationIsScriptableKey'); + CFStringRef get kCFPreferencesAnyApplication => + _kCFPreferencesAnyApplication.value; - CFStringRef get kCFURLApplicationIsScriptableKey => - _kCFURLApplicationIsScriptableKey.value; + set kCFPreferencesAnyApplication(CFStringRef value) => + _kCFPreferencesAnyApplication.value = value; - set kCFURLApplicationIsScriptableKey(CFStringRef value) => - _kCFURLApplicationIsScriptableKey.value = value; + late final ffi.Pointer _kCFPreferencesCurrentApplication = + _lookup('kCFPreferencesCurrentApplication'); - late final ffi.Pointer _kCFURLIsSystemImmutableKey = - _lookup('kCFURLIsSystemImmutableKey'); + CFStringRef get kCFPreferencesCurrentApplication => + _kCFPreferencesCurrentApplication.value; - CFStringRef get kCFURLIsSystemImmutableKey => - _kCFURLIsSystemImmutableKey.value; + set kCFPreferencesCurrentApplication(CFStringRef value) => + _kCFPreferencesCurrentApplication.value = value; - set kCFURLIsSystemImmutableKey(CFStringRef value) => - _kCFURLIsSystemImmutableKey.value = value; + late final ffi.Pointer _kCFPreferencesAnyHost = + _lookup('kCFPreferencesAnyHost'); - late final ffi.Pointer _kCFURLIsUserImmutableKey = - _lookup('kCFURLIsUserImmutableKey'); + CFStringRef get kCFPreferencesAnyHost => _kCFPreferencesAnyHost.value; - CFStringRef get kCFURLIsUserImmutableKey => _kCFURLIsUserImmutableKey.value; + set kCFPreferencesAnyHost(CFStringRef value) => + _kCFPreferencesAnyHost.value = value; - set kCFURLIsUserImmutableKey(CFStringRef value) => - _kCFURLIsUserImmutableKey.value = value; + late final ffi.Pointer _kCFPreferencesCurrentHost = + _lookup('kCFPreferencesCurrentHost'); - late final ffi.Pointer _kCFURLIsHiddenKey = - _lookup('kCFURLIsHiddenKey'); + CFStringRef get kCFPreferencesCurrentHost => _kCFPreferencesCurrentHost.value; - CFStringRef get kCFURLIsHiddenKey => _kCFURLIsHiddenKey.value; + set kCFPreferencesCurrentHost(CFStringRef value) => + _kCFPreferencesCurrentHost.value = value; - set kCFURLIsHiddenKey(CFStringRef value) => _kCFURLIsHiddenKey.value = value; + late final ffi.Pointer _kCFPreferencesAnyUser = + _lookup('kCFPreferencesAnyUser'); - late final ffi.Pointer _kCFURLHasHiddenExtensionKey = - _lookup('kCFURLHasHiddenExtensionKey'); + CFStringRef get kCFPreferencesAnyUser => _kCFPreferencesAnyUser.value; - CFStringRef get kCFURLHasHiddenExtensionKey => - _kCFURLHasHiddenExtensionKey.value; + set kCFPreferencesAnyUser(CFStringRef value) => + _kCFPreferencesAnyUser.value = value; - set kCFURLHasHiddenExtensionKey(CFStringRef value) => - _kCFURLHasHiddenExtensionKey.value = value; + late final ffi.Pointer _kCFPreferencesCurrentUser = + _lookup('kCFPreferencesCurrentUser'); - late final ffi.Pointer _kCFURLCreationDateKey = - _lookup('kCFURLCreationDateKey'); + CFStringRef get kCFPreferencesCurrentUser => _kCFPreferencesCurrentUser.value; - CFStringRef get kCFURLCreationDateKey => _kCFURLCreationDateKey.value; + set kCFPreferencesCurrentUser(CFStringRef value) => + _kCFPreferencesCurrentUser.value = value; - set kCFURLCreationDateKey(CFStringRef value) => - _kCFURLCreationDateKey.value = value; + CFPropertyListRef CFPreferencesCopyAppValue( + CFStringRef key, + CFStringRef applicationID, + ) { + return _CFPreferencesCopyAppValue( + key, + applicationID, + ); + } - late final ffi.Pointer _kCFURLContentAccessDateKey = - _lookup('kCFURLContentAccessDateKey'); + late final _CFPreferencesCopyAppValuePtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFStringRef, CFStringRef)>>('CFPreferencesCopyAppValue'); + late final _CFPreferencesCopyAppValue = _CFPreferencesCopyAppValuePtr + .asFunction(); - CFStringRef get kCFURLContentAccessDateKey => - _kCFURLContentAccessDateKey.value; + int CFPreferencesGetAppBooleanValue( + CFStringRef key, + CFStringRef applicationID, + ffi.Pointer keyExistsAndHasValidFormat, + ) { + return _CFPreferencesGetAppBooleanValue( + key, + applicationID, + keyExistsAndHasValidFormat, + ); + } - set kCFURLContentAccessDateKey(CFStringRef value) => - _kCFURLContentAccessDateKey.value = value; + late final _CFPreferencesGetAppBooleanValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, CFStringRef, + ffi.Pointer)>>('CFPreferencesGetAppBooleanValue'); + late final _CFPreferencesGetAppBooleanValue = + _CFPreferencesGetAppBooleanValuePtr.asFunction< + int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLContentModificationDateKey = - _lookup('kCFURLContentModificationDateKey'); + int CFPreferencesGetAppIntegerValue( + CFStringRef key, + CFStringRef applicationID, + ffi.Pointer keyExistsAndHasValidFormat, + ) { + return _CFPreferencesGetAppIntegerValue( + key, + applicationID, + keyExistsAndHasValidFormat, + ); + } - CFStringRef get kCFURLContentModificationDateKey => - _kCFURLContentModificationDateKey.value; + late final _CFPreferencesGetAppIntegerValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFStringRef, CFStringRef, + ffi.Pointer)>>('CFPreferencesGetAppIntegerValue'); + late final _CFPreferencesGetAppIntegerValue = + _CFPreferencesGetAppIntegerValuePtr.asFunction< + int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); - set kCFURLContentModificationDateKey(CFStringRef value) => - _kCFURLContentModificationDateKey.value = value; + void CFPreferencesSetAppValue( + CFStringRef key, + CFPropertyListRef value, + CFStringRef applicationID, + ) { + return _CFPreferencesSetAppValue( + key, + value, + applicationID, + ); + } - late final ffi.Pointer _kCFURLAttributeModificationDateKey = - _lookup('kCFURLAttributeModificationDateKey'); + late final _CFPreferencesSetAppValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringRef, CFPropertyListRef, + CFStringRef)>>('CFPreferencesSetAppValue'); + late final _CFPreferencesSetAppValue = _CFPreferencesSetAppValuePtr + .asFunction(); - CFStringRef get kCFURLAttributeModificationDateKey => - _kCFURLAttributeModificationDateKey.value; + void CFPreferencesAddSuitePreferencesToApp( + CFStringRef applicationID, + CFStringRef suiteID, + ) { + return _CFPreferencesAddSuitePreferencesToApp( + applicationID, + suiteID, + ); + } - set kCFURLAttributeModificationDateKey(CFStringRef value) => - _kCFURLAttributeModificationDateKey.value = value; + late final _CFPreferencesAddSuitePreferencesToAppPtr = + _lookup>( + 'CFPreferencesAddSuitePreferencesToApp'); + late final _CFPreferencesAddSuitePreferencesToApp = + _CFPreferencesAddSuitePreferencesToAppPtr.asFunction< + void Function(CFStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFURLFileContentIdentifierKey = - _lookup('kCFURLFileContentIdentifierKey'); + void CFPreferencesRemoveSuitePreferencesFromApp( + CFStringRef applicationID, + CFStringRef suiteID, + ) { + return _CFPreferencesRemoveSuitePreferencesFromApp( + applicationID, + suiteID, + ); + } - CFStringRef get kCFURLFileContentIdentifierKey => - _kCFURLFileContentIdentifierKey.value; + late final _CFPreferencesRemoveSuitePreferencesFromAppPtr = + _lookup>( + 'CFPreferencesRemoveSuitePreferencesFromApp'); + late final _CFPreferencesRemoveSuitePreferencesFromApp = + _CFPreferencesRemoveSuitePreferencesFromAppPtr.asFunction< + void Function(CFStringRef, CFStringRef)>(); - set kCFURLFileContentIdentifierKey(CFStringRef value) => - _kCFURLFileContentIdentifierKey.value = value; + int CFPreferencesAppSynchronize( + CFStringRef applicationID, + ) { + return _CFPreferencesAppSynchronize( + applicationID, + ); + } - late final ffi.Pointer _kCFURLMayShareFileContentKey = - _lookup('kCFURLMayShareFileContentKey'); + late final _CFPreferencesAppSynchronizePtr = + _lookup>( + 'CFPreferencesAppSynchronize'); + late final _CFPreferencesAppSynchronize = + _CFPreferencesAppSynchronizePtr.asFunction(); - CFStringRef get kCFURLMayShareFileContentKey => - _kCFURLMayShareFileContentKey.value; + CFPropertyListRef CFPreferencesCopyValue( + CFStringRef key, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyValue( + key, + applicationID, + userName, + hostName, + ); + } - set kCFURLMayShareFileContentKey(CFStringRef value) => - _kCFURLMayShareFileContentKey.value = value; + late final _CFPreferencesCopyValuePtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function(CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyValue'); + late final _CFPreferencesCopyValue = _CFPreferencesCopyValuePtr.asFunction< + CFPropertyListRef Function( + CFStringRef, CFStringRef, CFStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFURLMayHaveExtendedAttributesKey = - _lookup('kCFURLMayHaveExtendedAttributesKey'); + CFDictionaryRef CFPreferencesCopyMultiple( + CFArrayRef keysToFetch, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyMultiple( + keysToFetch, + applicationID, + userName, + hostName, + ); + } - CFStringRef get kCFURLMayHaveExtendedAttributesKey => - _kCFURLMayHaveExtendedAttributesKey.value; + late final _CFPreferencesCopyMultiplePtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFArrayRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyMultiple'); + late final _CFPreferencesCopyMultiple = + _CFPreferencesCopyMultiplePtr.asFunction< + CFDictionaryRef Function( + CFArrayRef, CFStringRef, CFStringRef, CFStringRef)>(); - set kCFURLMayHaveExtendedAttributesKey(CFStringRef value) => - _kCFURLMayHaveExtendedAttributesKey.value = value; + void CFPreferencesSetValue( + CFStringRef key, + CFPropertyListRef value, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesSetValue( + key, + value, + applicationID, + userName, + hostName, + ); + } - late final ffi.Pointer _kCFURLIsPurgeableKey = - _lookup('kCFURLIsPurgeableKey'); + late final _CFPreferencesSetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringRef, CFPropertyListRef, CFStringRef, + CFStringRef, CFStringRef)>>('CFPreferencesSetValue'); + late final _CFPreferencesSetValue = _CFPreferencesSetValuePtr.asFunction< + void Function(CFStringRef, CFPropertyListRef, CFStringRef, CFStringRef, + CFStringRef)>(); - CFStringRef get kCFURLIsPurgeableKey => _kCFURLIsPurgeableKey.value; + void CFPreferencesSetMultiple( + CFDictionaryRef keysToSet, + CFArrayRef keysToRemove, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesSetMultiple( + keysToSet, + keysToRemove, + applicationID, + userName, + hostName, + ); + } - set kCFURLIsPurgeableKey(CFStringRef value) => - _kCFURLIsPurgeableKey.value = value; + late final _CFPreferencesSetMultiplePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFDictionaryRef, CFArrayRef, CFStringRef, + CFStringRef, CFStringRef)>>('CFPreferencesSetMultiple'); + late final _CFPreferencesSetMultiple = + _CFPreferencesSetMultiplePtr.asFunction< + void Function(CFDictionaryRef, CFArrayRef, CFStringRef, CFStringRef, + CFStringRef)>(); - late final ffi.Pointer _kCFURLIsSparseKey = - _lookup('kCFURLIsSparseKey'); + int CFPreferencesSynchronize( + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesSynchronize( + applicationID, + userName, + hostName, + ); + } - CFStringRef get kCFURLIsSparseKey => _kCFURLIsSparseKey.value; + late final _CFPreferencesSynchronizePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesSynchronize'); + late final _CFPreferencesSynchronize = _CFPreferencesSynchronizePtr + .asFunction(); - set kCFURLIsSparseKey(CFStringRef value) => _kCFURLIsSparseKey.value = value; + CFArrayRef CFPreferencesCopyApplicationList( + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyApplicationList( + userName, + hostName, + ); + } - late final ffi.Pointer _kCFURLLinkCountKey = - _lookup('kCFURLLinkCountKey'); + late final _CFPreferencesCopyApplicationListPtr = _lookup< + ffi.NativeFunction>( + 'CFPreferencesCopyApplicationList'); + late final _CFPreferencesCopyApplicationList = + _CFPreferencesCopyApplicationListPtr.asFunction< + CFArrayRef Function(CFStringRef, CFStringRef)>(); - CFStringRef get kCFURLLinkCountKey => _kCFURLLinkCountKey.value; + CFArrayRef CFPreferencesCopyKeyList( + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyKeyList( + applicationID, + userName, + hostName, + ); + } - set kCFURLLinkCountKey(CFStringRef value) => - _kCFURLLinkCountKey.value = value; + late final _CFPreferencesCopyKeyListPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyKeyList'); + late final _CFPreferencesCopyKeyList = _CFPreferencesCopyKeyListPtr + .asFunction(); - late final ffi.Pointer _kCFURLParentDirectoryURLKey = - _lookup('kCFURLParentDirectoryURLKey'); + int CFPreferencesAppValueIsForced( + CFStringRef key, + CFStringRef applicationID, + ) { + return _CFPreferencesAppValueIsForced( + key, + applicationID, + ); + } - CFStringRef get kCFURLParentDirectoryURLKey => - _kCFURLParentDirectoryURLKey.value; + late final _CFPreferencesAppValueIsForcedPtr = + _lookup>( + 'CFPreferencesAppValueIsForced'); + late final _CFPreferencesAppValueIsForced = _CFPreferencesAppValueIsForcedPtr + .asFunction(); - set kCFURLParentDirectoryURLKey(CFStringRef value) => - _kCFURLParentDirectoryURLKey.value = value; + int CFURLGetTypeID() { + return _CFURLGetTypeID(); + } - late final ffi.Pointer _kCFURLVolumeURLKey = - _lookup('kCFURLVolumeURLKey'); + late final _CFURLGetTypeIDPtr = + _lookup>('CFURLGetTypeID'); + late final _CFURLGetTypeID = _CFURLGetTypeIDPtr.asFunction(); - CFStringRef get kCFURLVolumeURLKey => _kCFURLVolumeURLKey.value; + CFURLRef CFURLCreateWithBytes( + CFAllocatorRef allocator, + ffi.Pointer URLBytes, + int length, + int encoding, + CFURLRef baseURL, + ) { + return _CFURLCreateWithBytes( + allocator, + URLBytes, + length, + encoding, + baseURL, + ); + } - set kCFURLVolumeURLKey(CFStringRef value) => - _kCFURLVolumeURLKey.value = value; + late final _CFURLCreateWithBytesPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFStringEncoding, CFURLRef)>>('CFURLCreateWithBytes'); + late final _CFURLCreateWithBytes = _CFURLCreateWithBytesPtr.asFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); - late final ffi.Pointer _kCFURLTypeIdentifierKey = - _lookup('kCFURLTypeIdentifierKey'); + CFDataRef CFURLCreateData( + CFAllocatorRef allocator, + CFURLRef url, + int encoding, + int escapeWhitespace, + ) { + return _CFURLCreateData( + allocator, + url, + encoding, + escapeWhitespace, + ); + } - CFStringRef get kCFURLTypeIdentifierKey => _kCFURLTypeIdentifierKey.value; + late final _CFURLCreateDataPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, CFStringEncoding, + Boolean)>>('CFURLCreateData'); + late final _CFURLCreateData = _CFURLCreateDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, int, int)>(); - set kCFURLTypeIdentifierKey(CFStringRef value) => - _kCFURLTypeIdentifierKey.value = value; + CFURLRef CFURLCreateWithString( + CFAllocatorRef allocator, + CFStringRef URLString, + CFURLRef baseURL, + ) { + return _CFURLCreateWithString( + allocator, + URLString, + baseURL, + ); + } - late final ffi.Pointer _kCFURLLocalizedTypeDescriptionKey = - _lookup('kCFURLLocalizedTypeDescriptionKey'); + late final _CFURLCreateWithStringPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( + CFAllocatorRef, CFStringRef, CFURLRef)>>('CFURLCreateWithString'); + late final _CFURLCreateWithString = _CFURLCreateWithStringPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, CFURLRef)>(); - CFStringRef get kCFURLLocalizedTypeDescriptionKey => - _kCFURLLocalizedTypeDescriptionKey.value; + CFURLRef CFURLCreateAbsoluteURLWithBytes( + CFAllocatorRef alloc, + ffi.Pointer relativeURLBytes, + int length, + int encoding, + CFURLRef baseURL, + int useCompatibilityMode, + ) { + return _CFURLCreateAbsoluteURLWithBytes( + alloc, + relativeURLBytes, + length, + encoding, + baseURL, + useCompatibilityMode, + ); + } - set kCFURLLocalizedTypeDescriptionKey(CFStringRef value) => - _kCFURLLocalizedTypeDescriptionKey.value = value; + late final _CFURLCreateAbsoluteURLWithBytesPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( + CFAllocatorRef, + ffi.Pointer, + CFIndex, + CFStringEncoding, + CFURLRef, + Boolean)>>('CFURLCreateAbsoluteURLWithBytes'); + late final _CFURLCreateAbsoluteURLWithBytes = + _CFURLCreateAbsoluteURLWithBytesPtr.asFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer, int, int, CFURLRef, int)>(); - late final ffi.Pointer _kCFURLLabelNumberKey = - _lookup('kCFURLLabelNumberKey'); + CFURLRef CFURLCreateWithFileSystemPath( + CFAllocatorRef allocator, + CFStringRef filePath, + int pathStyle, + int isDirectory, + ) { + return _CFURLCreateWithFileSystemPath( + allocator, + filePath, + pathStyle, + isDirectory, + ); + } - CFStringRef get kCFURLLabelNumberKey => _kCFURLLabelNumberKey.value; + late final _CFURLCreateWithFileSystemPathPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, + Boolean)>>('CFURLCreateWithFileSystemPath'); + late final _CFURLCreateWithFileSystemPath = _CFURLCreateWithFileSystemPathPtr + .asFunction(); - set kCFURLLabelNumberKey(CFStringRef value) => - _kCFURLLabelNumberKey.value = value; + CFURLRef CFURLCreateFromFileSystemRepresentation( + CFAllocatorRef allocator, + ffi.Pointer buffer, + int bufLen, + int isDirectory, + ) { + return _CFURLCreateFromFileSystemRepresentation( + allocator, + buffer, + bufLen, + isDirectory, + ); + } - late final ffi.Pointer _kCFURLLabelColorKey = - _lookup('kCFURLLabelColorKey'); + late final _CFURLCreateFromFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + Boolean)>>('CFURLCreateFromFileSystemRepresentation'); + late final _CFURLCreateFromFileSystemRepresentation = + _CFURLCreateFromFileSystemRepresentationPtr.asFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, int, int)>(); - CFStringRef get kCFURLLabelColorKey => _kCFURLLabelColorKey.value; + CFURLRef CFURLCreateWithFileSystemPathRelativeToBase( + CFAllocatorRef allocator, + CFStringRef filePath, + int pathStyle, + int isDirectory, + CFURLRef baseURL, + ) { + return _CFURLCreateWithFileSystemPathRelativeToBase( + allocator, + filePath, + pathStyle, + isDirectory, + baseURL, + ); + } - set kCFURLLabelColorKey(CFStringRef value) => - _kCFURLLabelColorKey.value = value; + late final _CFURLCreateWithFileSystemPathRelativeToBasePtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, Boolean, + CFURLRef)>>('CFURLCreateWithFileSystemPathRelativeToBase'); + late final _CFURLCreateWithFileSystemPathRelativeToBase = + _CFURLCreateWithFileSystemPathRelativeToBasePtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, int, int, CFURLRef)>(); - late final ffi.Pointer _kCFURLLocalizedLabelKey = - _lookup('kCFURLLocalizedLabelKey'); + CFURLRef CFURLCreateFromFileSystemRepresentationRelativeToBase( + CFAllocatorRef allocator, + ffi.Pointer buffer, + int bufLen, + int isDirectory, + CFURLRef baseURL, + ) { + return _CFURLCreateFromFileSystemRepresentationRelativeToBase( + allocator, + buffer, + bufLen, + isDirectory, + baseURL, + ); + } - CFStringRef get kCFURLLocalizedLabelKey => _kCFURLLocalizedLabelKey.value; + late final _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr = + _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + Boolean, CFURLRef)>>( + 'CFURLCreateFromFileSystemRepresentationRelativeToBase'); + late final _CFURLCreateFromFileSystemRepresentationRelativeToBase = + _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr.asFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); - set kCFURLLocalizedLabelKey(CFStringRef value) => - _kCFURLLocalizedLabelKey.value = value; + int CFURLGetFileSystemRepresentation( + CFURLRef url, + int resolveAgainstBase, + ffi.Pointer buffer, + int maxBufLen, + ) { + return _CFURLGetFileSystemRepresentation( + url, + resolveAgainstBase, + buffer, + maxBufLen, + ); + } - late final ffi.Pointer _kCFURLEffectiveIconKey = - _lookup('kCFURLEffectiveIconKey'); + late final _CFURLGetFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, Boolean, ffi.Pointer, + CFIndex)>>('CFURLGetFileSystemRepresentation'); + late final _CFURLGetFileSystemRepresentation = + _CFURLGetFileSystemRepresentationPtr.asFunction< + int Function(CFURLRef, int, ffi.Pointer, int)>(); - CFStringRef get kCFURLEffectiveIconKey => _kCFURLEffectiveIconKey.value; + CFURLRef CFURLCopyAbsoluteURL( + CFURLRef relativeURL, + ) { + return _CFURLCopyAbsoluteURL( + relativeURL, + ); + } - set kCFURLEffectiveIconKey(CFStringRef value) => - _kCFURLEffectiveIconKey.value = value; + late final _CFURLCopyAbsoluteURLPtr = + _lookup>( + 'CFURLCopyAbsoluteURL'); + late final _CFURLCopyAbsoluteURL = + _CFURLCopyAbsoluteURLPtr.asFunction(); - late final ffi.Pointer _kCFURLCustomIconKey = - _lookup('kCFURLCustomIconKey'); + CFStringRef CFURLGetString( + CFURLRef anURL, + ) { + return _CFURLGetString( + anURL, + ); + } - CFStringRef get kCFURLCustomIconKey => _kCFURLCustomIconKey.value; + late final _CFURLGetStringPtr = + _lookup>( + 'CFURLGetString'); + late final _CFURLGetString = + _CFURLGetStringPtr.asFunction(); - set kCFURLCustomIconKey(CFStringRef value) => - _kCFURLCustomIconKey.value = value; + CFURLRef CFURLGetBaseURL( + CFURLRef anURL, + ) { + return _CFURLGetBaseURL( + anURL, + ); + } - late final ffi.Pointer _kCFURLFileResourceIdentifierKey = - _lookup('kCFURLFileResourceIdentifierKey'); + late final _CFURLGetBaseURLPtr = + _lookup>( + 'CFURLGetBaseURL'); + late final _CFURLGetBaseURL = + _CFURLGetBaseURLPtr.asFunction(); - CFStringRef get kCFURLFileResourceIdentifierKey => - _kCFURLFileResourceIdentifierKey.value; - - set kCFURLFileResourceIdentifierKey(CFStringRef value) => - _kCFURLFileResourceIdentifierKey.value = value; - - late final ffi.Pointer _kCFURLVolumeIdentifierKey = - _lookup('kCFURLVolumeIdentifierKey'); + int CFURLCanBeDecomposed( + CFURLRef anURL, + ) { + return _CFURLCanBeDecomposed( + anURL, + ); + } - CFStringRef get kCFURLVolumeIdentifierKey => _kCFURLVolumeIdentifierKey.value; + late final _CFURLCanBeDecomposedPtr = + _lookup>( + 'CFURLCanBeDecomposed'); + late final _CFURLCanBeDecomposed = + _CFURLCanBeDecomposedPtr.asFunction(); - set kCFURLVolumeIdentifierKey(CFStringRef value) => - _kCFURLVolumeIdentifierKey.value = value; + CFStringRef CFURLCopyScheme( + CFURLRef anURL, + ) { + return _CFURLCopyScheme( + anURL, + ); + } - late final ffi.Pointer _kCFURLPreferredIOBlockSizeKey = - _lookup('kCFURLPreferredIOBlockSizeKey'); + late final _CFURLCopySchemePtr = + _lookup>( + 'CFURLCopyScheme'); + late final _CFURLCopyScheme = + _CFURLCopySchemePtr.asFunction(); - CFStringRef get kCFURLPreferredIOBlockSizeKey => - _kCFURLPreferredIOBlockSizeKey.value; + CFStringRef CFURLCopyNetLocation( + CFURLRef anURL, + ) { + return _CFURLCopyNetLocation( + anURL, + ); + } - set kCFURLPreferredIOBlockSizeKey(CFStringRef value) => - _kCFURLPreferredIOBlockSizeKey.value = value; + late final _CFURLCopyNetLocationPtr = + _lookup>( + 'CFURLCopyNetLocation'); + late final _CFURLCopyNetLocation = + _CFURLCopyNetLocationPtr.asFunction(); - late final ffi.Pointer _kCFURLIsReadableKey = - _lookup('kCFURLIsReadableKey'); + CFStringRef CFURLCopyPath( + CFURLRef anURL, + ) { + return _CFURLCopyPath( + anURL, + ); + } - CFStringRef get kCFURLIsReadableKey => _kCFURLIsReadableKey.value; + late final _CFURLCopyPathPtr = + _lookup>( + 'CFURLCopyPath'); + late final _CFURLCopyPath = + _CFURLCopyPathPtr.asFunction(); - set kCFURLIsReadableKey(CFStringRef value) => - _kCFURLIsReadableKey.value = value; + CFStringRef CFURLCopyStrictPath( + CFURLRef anURL, + ffi.Pointer isAbsolute, + ) { + return _CFURLCopyStrictPath( + anURL, + isAbsolute, + ); + } - late final ffi.Pointer _kCFURLIsWritableKey = - _lookup('kCFURLIsWritableKey'); + late final _CFURLCopyStrictPathPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFURLRef, ffi.Pointer)>>('CFURLCopyStrictPath'); + late final _CFURLCopyStrictPath = _CFURLCopyStrictPathPtr.asFunction< + CFStringRef Function(CFURLRef, ffi.Pointer)>(); - CFStringRef get kCFURLIsWritableKey => _kCFURLIsWritableKey.value; + CFStringRef CFURLCopyFileSystemPath( + CFURLRef anURL, + int pathStyle, + ) { + return _CFURLCopyFileSystemPath( + anURL, + pathStyle, + ); + } - set kCFURLIsWritableKey(CFStringRef value) => - _kCFURLIsWritableKey.value = value; + late final _CFURLCopyFileSystemPathPtr = + _lookup>( + 'CFURLCopyFileSystemPath'); + late final _CFURLCopyFileSystemPath = _CFURLCopyFileSystemPathPtr.asFunction< + CFStringRef Function(CFURLRef, int)>(); - late final ffi.Pointer _kCFURLIsExecutableKey = - _lookup('kCFURLIsExecutableKey'); + int CFURLHasDirectoryPath( + CFURLRef anURL, + ) { + return _CFURLHasDirectoryPath( + anURL, + ); + } - CFStringRef get kCFURLIsExecutableKey => _kCFURLIsExecutableKey.value; + late final _CFURLHasDirectoryPathPtr = + _lookup>( + 'CFURLHasDirectoryPath'); + late final _CFURLHasDirectoryPath = + _CFURLHasDirectoryPathPtr.asFunction(); - set kCFURLIsExecutableKey(CFStringRef value) => - _kCFURLIsExecutableKey.value = value; + CFStringRef CFURLCopyResourceSpecifier( + CFURLRef anURL, + ) { + return _CFURLCopyResourceSpecifier( + anURL, + ); + } - late final ffi.Pointer _kCFURLFileSecurityKey = - _lookup('kCFURLFileSecurityKey'); + late final _CFURLCopyResourceSpecifierPtr = + _lookup>( + 'CFURLCopyResourceSpecifier'); + late final _CFURLCopyResourceSpecifier = _CFURLCopyResourceSpecifierPtr + .asFunction(); - CFStringRef get kCFURLFileSecurityKey => _kCFURLFileSecurityKey.value; + CFStringRef CFURLCopyHostName( + CFURLRef anURL, + ) { + return _CFURLCopyHostName( + anURL, + ); + } - set kCFURLFileSecurityKey(CFStringRef value) => - _kCFURLFileSecurityKey.value = value; + late final _CFURLCopyHostNamePtr = + _lookup>( + 'CFURLCopyHostName'); + late final _CFURLCopyHostName = + _CFURLCopyHostNamePtr.asFunction(); - late final ffi.Pointer _kCFURLIsExcludedFromBackupKey = - _lookup('kCFURLIsExcludedFromBackupKey'); + int CFURLGetPortNumber( + CFURLRef anURL, + ) { + return _CFURLGetPortNumber( + anURL, + ); + } - CFStringRef get kCFURLIsExcludedFromBackupKey => - _kCFURLIsExcludedFromBackupKey.value; + late final _CFURLGetPortNumberPtr = + _lookup>( + 'CFURLGetPortNumber'); + late final _CFURLGetPortNumber = + _CFURLGetPortNumberPtr.asFunction(); - set kCFURLIsExcludedFromBackupKey(CFStringRef value) => - _kCFURLIsExcludedFromBackupKey.value = value; + CFStringRef CFURLCopyUserName( + CFURLRef anURL, + ) { + return _CFURLCopyUserName( + anURL, + ); + } - late final ffi.Pointer _kCFURLTagNamesKey = - _lookup('kCFURLTagNamesKey'); + late final _CFURLCopyUserNamePtr = + _lookup>( + 'CFURLCopyUserName'); + late final _CFURLCopyUserName = + _CFURLCopyUserNamePtr.asFunction(); - CFStringRef get kCFURLTagNamesKey => _kCFURLTagNamesKey.value; + CFStringRef CFURLCopyPassword( + CFURLRef anURL, + ) { + return _CFURLCopyPassword( + anURL, + ); + } - set kCFURLTagNamesKey(CFStringRef value) => _kCFURLTagNamesKey.value = value; + late final _CFURLCopyPasswordPtr = + _lookup>( + 'CFURLCopyPassword'); + late final _CFURLCopyPassword = + _CFURLCopyPasswordPtr.asFunction(); - late final ffi.Pointer _kCFURLPathKey = - _lookup('kCFURLPathKey'); + CFStringRef CFURLCopyParameterString( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCopyParameterString( + anURL, + charactersToLeaveEscaped, + ); + } - CFStringRef get kCFURLPathKey => _kCFURLPathKey.value; + late final _CFURLCopyParameterStringPtr = + _lookup>( + 'CFURLCopyParameterString'); + late final _CFURLCopyParameterString = _CFURLCopyParameterStringPtr + .asFunction(); - set kCFURLPathKey(CFStringRef value) => _kCFURLPathKey.value = value; + CFStringRef CFURLCopyQueryString( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCopyQueryString( + anURL, + charactersToLeaveEscaped, + ); + } - late final ffi.Pointer _kCFURLCanonicalPathKey = - _lookup('kCFURLCanonicalPathKey'); + late final _CFURLCopyQueryStringPtr = + _lookup>( + 'CFURLCopyQueryString'); + late final _CFURLCopyQueryString = _CFURLCopyQueryStringPtr.asFunction< + CFStringRef Function(CFURLRef, CFStringRef)>(); - CFStringRef get kCFURLCanonicalPathKey => _kCFURLCanonicalPathKey.value; + CFStringRef CFURLCopyFragment( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCopyFragment( + anURL, + charactersToLeaveEscaped, + ); + } - set kCFURLCanonicalPathKey(CFStringRef value) => - _kCFURLCanonicalPathKey.value = value; + late final _CFURLCopyFragmentPtr = + _lookup>( + 'CFURLCopyFragment'); + late final _CFURLCopyFragment = _CFURLCopyFragmentPtr.asFunction< + CFStringRef Function(CFURLRef, CFStringRef)>(); - late final ffi.Pointer _kCFURLIsMountTriggerKey = - _lookup('kCFURLIsMountTriggerKey'); + CFStringRef CFURLCopyLastPathComponent( + CFURLRef url, + ) { + return _CFURLCopyLastPathComponent( + url, + ); + } - CFStringRef get kCFURLIsMountTriggerKey => _kCFURLIsMountTriggerKey.value; + late final _CFURLCopyLastPathComponentPtr = + _lookup>( + 'CFURLCopyLastPathComponent'); + late final _CFURLCopyLastPathComponent = _CFURLCopyLastPathComponentPtr + .asFunction(); - set kCFURLIsMountTriggerKey(CFStringRef value) => - _kCFURLIsMountTriggerKey.value = value; + CFStringRef CFURLCopyPathExtension( + CFURLRef url, + ) { + return _CFURLCopyPathExtension( + url, + ); + } - late final ffi.Pointer _kCFURLGenerationIdentifierKey = - _lookup('kCFURLGenerationIdentifierKey'); + late final _CFURLCopyPathExtensionPtr = + _lookup>( + 'CFURLCopyPathExtension'); + late final _CFURLCopyPathExtension = + _CFURLCopyPathExtensionPtr.asFunction(); - CFStringRef get kCFURLGenerationIdentifierKey => - _kCFURLGenerationIdentifierKey.value; + CFURLRef CFURLCreateCopyAppendingPathComponent( + CFAllocatorRef allocator, + CFURLRef url, + CFStringRef pathComponent, + int isDirectory, + ) { + return _CFURLCreateCopyAppendingPathComponent( + allocator, + url, + pathComponent, + isDirectory, + ); + } - set kCFURLGenerationIdentifierKey(CFStringRef value) => - _kCFURLGenerationIdentifierKey.value = value; + late final _CFURLCreateCopyAppendingPathComponentPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, + Boolean)>>('CFURLCreateCopyAppendingPathComponent'); + late final _CFURLCreateCopyAppendingPathComponent = + _CFURLCreateCopyAppendingPathComponentPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, int)>(); - late final ffi.Pointer _kCFURLDocumentIdentifierKey = - _lookup('kCFURLDocumentIdentifierKey'); + CFURLRef CFURLCreateCopyDeletingLastPathComponent( + CFAllocatorRef allocator, + CFURLRef url, + ) { + return _CFURLCreateCopyDeletingLastPathComponent( + allocator, + url, + ); + } - CFStringRef get kCFURLDocumentIdentifierKey => - _kCFURLDocumentIdentifierKey.value; + late final _CFURLCreateCopyDeletingLastPathComponentPtr = + _lookup>( + 'CFURLCreateCopyDeletingLastPathComponent'); + late final _CFURLCreateCopyDeletingLastPathComponent = + _CFURLCreateCopyDeletingLastPathComponentPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef)>(); - set kCFURLDocumentIdentifierKey(CFStringRef value) => - _kCFURLDocumentIdentifierKey.value = value; + CFURLRef CFURLCreateCopyAppendingPathExtension( + CFAllocatorRef allocator, + CFURLRef url, + CFStringRef extension1, + ) { + return _CFURLCreateCopyAppendingPathExtension( + allocator, + url, + extension1, + ); + } - late final ffi.Pointer _kCFURLAddedToDirectoryDateKey = - _lookup('kCFURLAddedToDirectoryDateKey'); + late final _CFURLCreateCopyAppendingPathExtensionPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + CFStringRef)>>('CFURLCreateCopyAppendingPathExtension'); + late final _CFURLCreateCopyAppendingPathExtension = + _CFURLCreateCopyAppendingPathExtensionPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); - CFStringRef get kCFURLAddedToDirectoryDateKey => - _kCFURLAddedToDirectoryDateKey.value; + CFURLRef CFURLCreateCopyDeletingPathExtension( + CFAllocatorRef allocator, + CFURLRef url, + ) { + return _CFURLCreateCopyDeletingPathExtension( + allocator, + url, + ); + } - set kCFURLAddedToDirectoryDateKey(CFStringRef value) => - _kCFURLAddedToDirectoryDateKey.value = value; + late final _CFURLCreateCopyDeletingPathExtensionPtr = + _lookup>( + 'CFURLCreateCopyDeletingPathExtension'); + late final _CFURLCreateCopyDeletingPathExtension = + _CFURLCreateCopyDeletingPathExtensionPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef)>(); - late final ffi.Pointer _kCFURLQuarantinePropertiesKey = - _lookup('kCFURLQuarantinePropertiesKey'); + int CFURLGetBytes( + CFURLRef url, + ffi.Pointer buffer, + int bufferLength, + ) { + return _CFURLGetBytes( + url, + buffer, + bufferLength, + ); + } - CFStringRef get kCFURLQuarantinePropertiesKey => - _kCFURLQuarantinePropertiesKey.value; + late final _CFURLGetBytesPtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFURLRef, ffi.Pointer, CFIndex)>>('CFURLGetBytes'); + late final _CFURLGetBytes = _CFURLGetBytesPtr.asFunction< + int Function(CFURLRef, ffi.Pointer, int)>(); - set kCFURLQuarantinePropertiesKey(CFStringRef value) => - _kCFURLQuarantinePropertiesKey.value = value; + CFRange CFURLGetByteRangeForComponent( + CFURLRef url, + int component, + ffi.Pointer rangeIncludingSeparators, + ) { + return _CFURLGetByteRangeForComponent( + url, + component, + rangeIncludingSeparators, + ); + } - late final ffi.Pointer _kCFURLFileResourceTypeKey = - _lookup('kCFURLFileResourceTypeKey'); + late final _CFURLGetByteRangeForComponentPtr = _lookup< + ffi.NativeFunction< + CFRange Function(CFURLRef, ffi.Int32, + ffi.Pointer)>>('CFURLGetByteRangeForComponent'); + late final _CFURLGetByteRangeForComponent = _CFURLGetByteRangeForComponentPtr + .asFunction)>(); - CFStringRef get kCFURLFileResourceTypeKey => _kCFURLFileResourceTypeKey.value; + CFStringRef CFURLCreateStringByReplacingPercentEscapes( + CFAllocatorRef allocator, + CFStringRef originalString, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCreateStringByReplacingPercentEscapes( + allocator, + originalString, + charactersToLeaveEscaped, + ); + } - set kCFURLFileResourceTypeKey(CFStringRef value) => - _kCFURLFileResourceTypeKey.value = value; + late final _CFURLCreateStringByReplacingPercentEscapesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFStringRef)>>('CFURLCreateStringByReplacingPercentEscapes'); + late final _CFURLCreateStringByReplacingPercentEscapes = + _CFURLCreateStringByReplacingPercentEscapesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFURLFileResourceTypeNamedPipe = - _lookup('kCFURLFileResourceTypeNamedPipe'); + CFStringRef CFURLCreateStringByReplacingPercentEscapesUsingEncoding( + CFAllocatorRef allocator, + CFStringRef origString, + CFStringRef charsToLeaveEscaped, + int encoding, + ) { + return _CFURLCreateStringByReplacingPercentEscapesUsingEncoding( + allocator, + origString, + charsToLeaveEscaped, + encoding, + ); + } - CFStringRef get kCFURLFileResourceTypeNamedPipe => - _kCFURLFileResourceTypeNamedPipe.value; + late final _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr = + _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef, + CFStringEncoding)>>( + 'CFURLCreateStringByReplacingPercentEscapesUsingEncoding'); + late final _CFURLCreateStringByReplacingPercentEscapesUsingEncoding = + _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef, CFStringRef, int)>(); - set kCFURLFileResourceTypeNamedPipe(CFStringRef value) => - _kCFURLFileResourceTypeNamedPipe.value = value; + CFStringRef CFURLCreateStringByAddingPercentEscapes( + CFAllocatorRef allocator, + CFStringRef originalString, + CFStringRef charactersToLeaveUnescaped, + CFStringRef legalURLCharactersToBeEscaped, + int encoding, + ) { + return _CFURLCreateStringByAddingPercentEscapes( + allocator, + originalString, + charactersToLeaveUnescaped, + legalURLCharactersToBeEscaped, + encoding, + ); + } - late final ffi.Pointer _kCFURLFileResourceTypeCharacterSpecial = - _lookup('kCFURLFileResourceTypeCharacterSpecial'); + late final _CFURLCreateStringByAddingPercentEscapesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringEncoding)>>('CFURLCreateStringByAddingPercentEscapes'); + late final _CFURLCreateStringByAddingPercentEscapes = + _CFURLCreateStringByAddingPercentEscapesPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef, CFStringRef, CFStringRef, int)>(); - CFStringRef get kCFURLFileResourceTypeCharacterSpecial => - _kCFURLFileResourceTypeCharacterSpecial.value; + int CFURLIsFileReferenceURL( + CFURLRef url, + ) { + return _CFURLIsFileReferenceURL( + url, + ); + } - set kCFURLFileResourceTypeCharacterSpecial(CFStringRef value) => - _kCFURLFileResourceTypeCharacterSpecial.value = value; + late final _CFURLIsFileReferenceURLPtr = + _lookup>( + 'CFURLIsFileReferenceURL'); + late final _CFURLIsFileReferenceURL = + _CFURLIsFileReferenceURLPtr.asFunction(); - late final ffi.Pointer _kCFURLFileResourceTypeDirectory = - _lookup('kCFURLFileResourceTypeDirectory'); + CFURLRef CFURLCreateFileReferenceURL( + CFAllocatorRef allocator, + CFURLRef url, + ffi.Pointer error, + ) { + return _CFURLCreateFileReferenceURL( + allocator, + url, + error, + ); + } - CFStringRef get kCFURLFileResourceTypeDirectory => - _kCFURLFileResourceTypeDirectory.value; + late final _CFURLCreateFileReferenceURLPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + ffi.Pointer)>>('CFURLCreateFileReferenceURL'); + late final _CFURLCreateFileReferenceURL = + _CFURLCreateFileReferenceURLPtr.asFunction< + CFURLRef Function( + CFAllocatorRef, CFURLRef, ffi.Pointer)>(); - set kCFURLFileResourceTypeDirectory(CFStringRef value) => - _kCFURLFileResourceTypeDirectory.value = value; + CFURLRef CFURLCreateFilePathURL( + CFAllocatorRef allocator, + CFURLRef url, + ffi.Pointer error, + ) { + return _CFURLCreateFilePathURL( + allocator, + url, + error, + ); + } - late final ffi.Pointer _kCFURLFileResourceTypeBlockSpecial = - _lookup('kCFURLFileResourceTypeBlockSpecial'); + late final _CFURLCreateFilePathURLPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + ffi.Pointer)>>('CFURLCreateFilePathURL'); + late final _CFURLCreateFilePathURL = _CFURLCreateFilePathURLPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, ffi.Pointer)>(); - CFStringRef get kCFURLFileResourceTypeBlockSpecial => - _kCFURLFileResourceTypeBlockSpecial.value; + CFURLRef CFURLCreateFromFSRef( + CFAllocatorRef allocator, + ffi.Pointer fsRef, + ) { + return _CFURLCreateFromFSRef( + allocator, + fsRef, + ); + } - set kCFURLFileResourceTypeBlockSpecial(CFStringRef value) => - _kCFURLFileResourceTypeBlockSpecial.value = value; + late final _CFURLCreateFromFSRefPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer)>>('CFURLCreateFromFSRef'); + late final _CFURLCreateFromFSRef = _CFURLCreateFromFSRefPtr.asFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLFileResourceTypeRegular = - _lookup('kCFURLFileResourceTypeRegular'); + int CFURLGetFSRef( + CFURLRef url, + ffi.Pointer fsRef, + ) { + return _CFURLGetFSRef( + url, + fsRef, + ); + } - CFStringRef get kCFURLFileResourceTypeRegular => - _kCFURLFileResourceTypeRegular.value; + late final _CFURLGetFSRefPtr = _lookup< + ffi.NativeFunction)>>( + 'CFURLGetFSRef'); + late final _CFURLGetFSRef = _CFURLGetFSRefPtr.asFunction< + int Function(CFURLRef, ffi.Pointer)>(); - set kCFURLFileResourceTypeRegular(CFStringRef value) => - _kCFURLFileResourceTypeRegular.value = value; + int CFURLCopyResourcePropertyForKey( + CFURLRef url, + CFStringRef key, + ffi.Pointer propertyValueTypeRefPtr, + ffi.Pointer error, + ) { + return _CFURLCopyResourcePropertyForKey( + url, + key, + propertyValueTypeRefPtr, + error, + ); + } - late final ffi.Pointer _kCFURLFileResourceTypeSymbolicLink = - _lookup('kCFURLFileResourceTypeSymbolicLink'); + late final _CFURLCopyResourcePropertyForKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFStringRef, ffi.Pointer, + ffi.Pointer)>>('CFURLCopyResourcePropertyForKey'); + late final _CFURLCopyResourcePropertyForKey = + _CFURLCopyResourcePropertyForKeyPtr.asFunction< + int Function(CFURLRef, CFStringRef, ffi.Pointer, + ffi.Pointer)>(); - CFStringRef get kCFURLFileResourceTypeSymbolicLink => - _kCFURLFileResourceTypeSymbolicLink.value; + CFDictionaryRef CFURLCopyResourcePropertiesForKeys( + CFURLRef url, + CFArrayRef keys, + ffi.Pointer error, + ) { + return _CFURLCopyResourcePropertiesForKeys( + url, + keys, + error, + ); + } - set kCFURLFileResourceTypeSymbolicLink(CFStringRef value) => - _kCFURLFileResourceTypeSymbolicLink.value = value; + late final _CFURLCopyResourcePropertiesForKeysPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFURLRef, CFArrayRef, + ffi.Pointer)>>('CFURLCopyResourcePropertiesForKeys'); + late final _CFURLCopyResourcePropertiesForKeys = + _CFURLCopyResourcePropertiesForKeysPtr.asFunction< + CFDictionaryRef Function( + CFURLRef, CFArrayRef, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLFileResourceTypeSocket = - _lookup('kCFURLFileResourceTypeSocket'); + int CFURLSetResourcePropertyForKey( + CFURLRef url, + CFStringRef key, + CFTypeRef propertyValue, + ffi.Pointer error, + ) { + return _CFURLSetResourcePropertyForKey( + url, + key, + propertyValue, + error, + ); + } - CFStringRef get kCFURLFileResourceTypeSocket => - _kCFURLFileResourceTypeSocket.value; + late final _CFURLSetResourcePropertyForKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFStringRef, CFTypeRef, + ffi.Pointer)>>('CFURLSetResourcePropertyForKey'); + late final _CFURLSetResourcePropertyForKey = + _CFURLSetResourcePropertyForKeyPtr.asFunction< + int Function( + CFURLRef, CFStringRef, CFTypeRef, ffi.Pointer)>(); - set kCFURLFileResourceTypeSocket(CFStringRef value) => - _kCFURLFileResourceTypeSocket.value = value; + int CFURLSetResourcePropertiesForKeys( + CFURLRef url, + CFDictionaryRef keyedPropertyValues, + ffi.Pointer error, + ) { + return _CFURLSetResourcePropertiesForKeys( + url, + keyedPropertyValues, + error, + ); + } - late final ffi.Pointer _kCFURLFileResourceTypeUnknown = - _lookup('kCFURLFileResourceTypeUnknown'); + late final _CFURLSetResourcePropertiesForKeysPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFDictionaryRef, + ffi.Pointer)>>('CFURLSetResourcePropertiesForKeys'); + late final _CFURLSetResourcePropertiesForKeys = + _CFURLSetResourcePropertiesForKeysPtr.asFunction< + int Function(CFURLRef, CFDictionaryRef, ffi.Pointer)>(); - CFStringRef get kCFURLFileResourceTypeUnknown => - _kCFURLFileResourceTypeUnknown.value; + late final ffi.Pointer _kCFURLKeysOfUnsetValuesKey = + _lookup('kCFURLKeysOfUnsetValuesKey'); - set kCFURLFileResourceTypeUnknown(CFStringRef value) => - _kCFURLFileResourceTypeUnknown.value = value; + CFStringRef get kCFURLKeysOfUnsetValuesKey => + _kCFURLKeysOfUnsetValuesKey.value; - late final ffi.Pointer _kCFURLFileSizeKey = - _lookup('kCFURLFileSizeKey'); + set kCFURLKeysOfUnsetValuesKey(CFStringRef value) => + _kCFURLKeysOfUnsetValuesKey.value = value; - CFStringRef get kCFURLFileSizeKey => _kCFURLFileSizeKey.value; + void CFURLClearResourcePropertyCacheForKey( + CFURLRef url, + CFStringRef key, + ) { + return _CFURLClearResourcePropertyCacheForKey( + url, + key, + ); + } - set kCFURLFileSizeKey(CFStringRef value) => _kCFURLFileSizeKey.value = value; + late final _CFURLClearResourcePropertyCacheForKeyPtr = + _lookup>( + 'CFURLClearResourcePropertyCacheForKey'); + late final _CFURLClearResourcePropertyCacheForKey = + _CFURLClearResourcePropertyCacheForKeyPtr.asFunction< + void Function(CFURLRef, CFStringRef)>(); - late final ffi.Pointer _kCFURLFileAllocatedSizeKey = - _lookup('kCFURLFileAllocatedSizeKey'); + void CFURLClearResourcePropertyCache( + CFURLRef url, + ) { + return _CFURLClearResourcePropertyCache( + url, + ); + } - CFStringRef get kCFURLFileAllocatedSizeKey => - _kCFURLFileAllocatedSizeKey.value; + late final _CFURLClearResourcePropertyCachePtr = + _lookup>( + 'CFURLClearResourcePropertyCache'); + late final _CFURLClearResourcePropertyCache = + _CFURLClearResourcePropertyCachePtr.asFunction(); - set kCFURLFileAllocatedSizeKey(CFStringRef value) => - _kCFURLFileAllocatedSizeKey.value = value; + void CFURLSetTemporaryResourcePropertyForKey( + CFURLRef url, + CFStringRef key, + CFTypeRef propertyValue, + ) { + return _CFURLSetTemporaryResourcePropertyForKey( + url, + key, + propertyValue, + ); + } - late final ffi.Pointer _kCFURLTotalFileSizeKey = - _lookup('kCFURLTotalFileSizeKey'); + late final _CFURLSetTemporaryResourcePropertyForKeyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFURLRef, CFStringRef, + CFTypeRef)>>('CFURLSetTemporaryResourcePropertyForKey'); + late final _CFURLSetTemporaryResourcePropertyForKey = + _CFURLSetTemporaryResourcePropertyForKeyPtr.asFunction< + void Function(CFURLRef, CFStringRef, CFTypeRef)>(); - CFStringRef get kCFURLTotalFileSizeKey => _kCFURLTotalFileSizeKey.value; + int CFURLResourceIsReachable( + CFURLRef url, + ffi.Pointer error, + ) { + return _CFURLResourceIsReachable( + url, + error, + ); + } - set kCFURLTotalFileSizeKey(CFStringRef value) => - _kCFURLTotalFileSizeKey.value = value; + late final _CFURLResourceIsReachablePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFURLRef, ffi.Pointer)>>('CFURLResourceIsReachable'); + late final _CFURLResourceIsReachable = _CFURLResourceIsReachablePtr + .asFunction)>(); - late final ffi.Pointer _kCFURLTotalFileAllocatedSizeKey = - _lookup('kCFURLTotalFileAllocatedSizeKey'); + late final ffi.Pointer _kCFURLNameKey = + _lookup('kCFURLNameKey'); - CFStringRef get kCFURLTotalFileAllocatedSizeKey => - _kCFURLTotalFileAllocatedSizeKey.value; + CFStringRef get kCFURLNameKey => _kCFURLNameKey.value; - set kCFURLTotalFileAllocatedSizeKey(CFStringRef value) => - _kCFURLTotalFileAllocatedSizeKey.value = value; + set kCFURLNameKey(CFStringRef value) => _kCFURLNameKey.value = value; - late final ffi.Pointer _kCFURLIsAliasFileKey = - _lookup('kCFURLIsAliasFileKey'); + late final ffi.Pointer _kCFURLLocalizedNameKey = + _lookup('kCFURLLocalizedNameKey'); - CFStringRef get kCFURLIsAliasFileKey => _kCFURLIsAliasFileKey.value; + CFStringRef get kCFURLLocalizedNameKey => _kCFURLLocalizedNameKey.value; - set kCFURLIsAliasFileKey(CFStringRef value) => - _kCFURLIsAliasFileKey.value = value; + set kCFURLLocalizedNameKey(CFStringRef value) => + _kCFURLLocalizedNameKey.value = value; - late final ffi.Pointer _kCFURLFileProtectionKey = - _lookup('kCFURLFileProtectionKey'); + late final ffi.Pointer _kCFURLIsRegularFileKey = + _lookup('kCFURLIsRegularFileKey'); - CFStringRef get kCFURLFileProtectionKey => _kCFURLFileProtectionKey.value; + CFStringRef get kCFURLIsRegularFileKey => _kCFURLIsRegularFileKey.value; - set kCFURLFileProtectionKey(CFStringRef value) => - _kCFURLFileProtectionKey.value = value; + set kCFURLIsRegularFileKey(CFStringRef value) => + _kCFURLIsRegularFileKey.value = value; - late final ffi.Pointer _kCFURLFileProtectionNone = - _lookup('kCFURLFileProtectionNone'); + late final ffi.Pointer _kCFURLIsDirectoryKey = + _lookup('kCFURLIsDirectoryKey'); - CFStringRef get kCFURLFileProtectionNone => _kCFURLFileProtectionNone.value; + CFStringRef get kCFURLIsDirectoryKey => _kCFURLIsDirectoryKey.value; - set kCFURLFileProtectionNone(CFStringRef value) => - _kCFURLFileProtectionNone.value = value; + set kCFURLIsDirectoryKey(CFStringRef value) => + _kCFURLIsDirectoryKey.value = value; - late final ffi.Pointer _kCFURLFileProtectionComplete = - _lookup('kCFURLFileProtectionComplete'); + late final ffi.Pointer _kCFURLIsSymbolicLinkKey = + _lookup('kCFURLIsSymbolicLinkKey'); - CFStringRef get kCFURLFileProtectionComplete => - _kCFURLFileProtectionComplete.value; + CFStringRef get kCFURLIsSymbolicLinkKey => _kCFURLIsSymbolicLinkKey.value; - set kCFURLFileProtectionComplete(CFStringRef value) => - _kCFURLFileProtectionComplete.value = value; + set kCFURLIsSymbolicLinkKey(CFStringRef value) => + _kCFURLIsSymbolicLinkKey.value = value; - late final ffi.Pointer _kCFURLFileProtectionCompleteUnlessOpen = - _lookup('kCFURLFileProtectionCompleteUnlessOpen'); + late final ffi.Pointer _kCFURLIsVolumeKey = + _lookup('kCFURLIsVolumeKey'); - CFStringRef get kCFURLFileProtectionCompleteUnlessOpen => - _kCFURLFileProtectionCompleteUnlessOpen.value; + CFStringRef get kCFURLIsVolumeKey => _kCFURLIsVolumeKey.value; - set kCFURLFileProtectionCompleteUnlessOpen(CFStringRef value) => - _kCFURLFileProtectionCompleteUnlessOpen.value = value; + set kCFURLIsVolumeKey(CFStringRef value) => _kCFURLIsVolumeKey.value = value; - late final ffi.Pointer - _kCFURLFileProtectionCompleteUntilFirstUserAuthentication = - _lookup( - 'kCFURLFileProtectionCompleteUntilFirstUserAuthentication'); + late final ffi.Pointer _kCFURLIsPackageKey = + _lookup('kCFURLIsPackageKey'); - CFStringRef get kCFURLFileProtectionCompleteUntilFirstUserAuthentication => - _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value; + CFStringRef get kCFURLIsPackageKey => _kCFURLIsPackageKey.value; - set kCFURLFileProtectionCompleteUntilFirstUserAuthentication( - CFStringRef value) => - _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; + set kCFURLIsPackageKey(CFStringRef value) => + _kCFURLIsPackageKey.value = value; - late final ffi.Pointer - _kCFURLVolumeLocalizedFormatDescriptionKey = - _lookup('kCFURLVolumeLocalizedFormatDescriptionKey'); + late final ffi.Pointer _kCFURLIsApplicationKey = + _lookup('kCFURLIsApplicationKey'); - CFStringRef get kCFURLVolumeLocalizedFormatDescriptionKey => - _kCFURLVolumeLocalizedFormatDescriptionKey.value; + CFStringRef get kCFURLIsApplicationKey => _kCFURLIsApplicationKey.value; - set kCFURLVolumeLocalizedFormatDescriptionKey(CFStringRef value) => - _kCFURLVolumeLocalizedFormatDescriptionKey.value = value; + set kCFURLIsApplicationKey(CFStringRef value) => + _kCFURLIsApplicationKey.value = value; - late final ffi.Pointer _kCFURLVolumeTotalCapacityKey = - _lookup('kCFURLVolumeTotalCapacityKey'); + late final ffi.Pointer _kCFURLApplicationIsScriptableKey = + _lookup('kCFURLApplicationIsScriptableKey'); - CFStringRef get kCFURLVolumeTotalCapacityKey => - _kCFURLVolumeTotalCapacityKey.value; + CFStringRef get kCFURLApplicationIsScriptableKey => + _kCFURLApplicationIsScriptableKey.value; - set kCFURLVolumeTotalCapacityKey(CFStringRef value) => - _kCFURLVolumeTotalCapacityKey.value = value; + set kCFURLApplicationIsScriptableKey(CFStringRef value) => + _kCFURLApplicationIsScriptableKey.value = value; - late final ffi.Pointer _kCFURLVolumeAvailableCapacityKey = - _lookup('kCFURLVolumeAvailableCapacityKey'); + late final ffi.Pointer _kCFURLIsSystemImmutableKey = + _lookup('kCFURLIsSystemImmutableKey'); - CFStringRef get kCFURLVolumeAvailableCapacityKey => - _kCFURLVolumeAvailableCapacityKey.value; + CFStringRef get kCFURLIsSystemImmutableKey => + _kCFURLIsSystemImmutableKey.value; - set kCFURLVolumeAvailableCapacityKey(CFStringRef value) => - _kCFURLVolumeAvailableCapacityKey.value = value; + set kCFURLIsSystemImmutableKey(CFStringRef value) => + _kCFURLIsSystemImmutableKey.value = value; - late final ffi.Pointer - _kCFURLVolumeAvailableCapacityForImportantUsageKey = - _lookup('kCFURLVolumeAvailableCapacityForImportantUsageKey'); + late final ffi.Pointer _kCFURLIsUserImmutableKey = + _lookup('kCFURLIsUserImmutableKey'); - CFStringRef get kCFURLVolumeAvailableCapacityForImportantUsageKey => - _kCFURLVolumeAvailableCapacityForImportantUsageKey.value; + CFStringRef get kCFURLIsUserImmutableKey => _kCFURLIsUserImmutableKey.value; - set kCFURLVolumeAvailableCapacityForImportantUsageKey(CFStringRef value) => - _kCFURLVolumeAvailableCapacityForImportantUsageKey.value = value; + set kCFURLIsUserImmutableKey(CFStringRef value) => + _kCFURLIsUserImmutableKey.value = value; - late final ffi.Pointer - _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey = - _lookup( - 'kCFURLVolumeAvailableCapacityForOpportunisticUsageKey'); + late final ffi.Pointer _kCFURLIsHiddenKey = + _lookup('kCFURLIsHiddenKey'); - CFStringRef get kCFURLVolumeAvailableCapacityForOpportunisticUsageKey => - _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value; + CFStringRef get kCFURLIsHiddenKey => _kCFURLIsHiddenKey.value; - set kCFURLVolumeAvailableCapacityForOpportunisticUsageKey( - CFStringRef value) => - _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; + set kCFURLIsHiddenKey(CFStringRef value) => _kCFURLIsHiddenKey.value = value; - late final ffi.Pointer _kCFURLVolumeResourceCountKey = - _lookup('kCFURLVolumeResourceCountKey'); + late final ffi.Pointer _kCFURLHasHiddenExtensionKey = + _lookup('kCFURLHasHiddenExtensionKey'); - CFStringRef get kCFURLVolumeResourceCountKey => - _kCFURLVolumeResourceCountKey.value; + CFStringRef get kCFURLHasHiddenExtensionKey => + _kCFURLHasHiddenExtensionKey.value; - set kCFURLVolumeResourceCountKey(CFStringRef value) => - _kCFURLVolumeResourceCountKey.value = value; + set kCFURLHasHiddenExtensionKey(CFStringRef value) => + _kCFURLHasHiddenExtensionKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsPersistentIDsKey = - _lookup('kCFURLVolumeSupportsPersistentIDsKey'); + late final ffi.Pointer _kCFURLCreationDateKey = + _lookup('kCFURLCreationDateKey'); - CFStringRef get kCFURLVolumeSupportsPersistentIDsKey => - _kCFURLVolumeSupportsPersistentIDsKey.value; + CFStringRef get kCFURLCreationDateKey => _kCFURLCreationDateKey.value; - set kCFURLVolumeSupportsPersistentIDsKey(CFStringRef value) => - _kCFURLVolumeSupportsPersistentIDsKey.value = value; + set kCFURLCreationDateKey(CFStringRef value) => + _kCFURLCreationDateKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsSymbolicLinksKey = - _lookup('kCFURLVolumeSupportsSymbolicLinksKey'); + late final ffi.Pointer _kCFURLContentAccessDateKey = + _lookup('kCFURLContentAccessDateKey'); - CFStringRef get kCFURLVolumeSupportsSymbolicLinksKey => - _kCFURLVolumeSupportsSymbolicLinksKey.value; + CFStringRef get kCFURLContentAccessDateKey => + _kCFURLContentAccessDateKey.value; - set kCFURLVolumeSupportsSymbolicLinksKey(CFStringRef value) => - _kCFURLVolumeSupportsSymbolicLinksKey.value = value; + set kCFURLContentAccessDateKey(CFStringRef value) => + _kCFURLContentAccessDateKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsHardLinksKey = - _lookup('kCFURLVolumeSupportsHardLinksKey'); + late final ffi.Pointer _kCFURLContentModificationDateKey = + _lookup('kCFURLContentModificationDateKey'); - CFStringRef get kCFURLVolumeSupportsHardLinksKey => - _kCFURLVolumeSupportsHardLinksKey.value; + CFStringRef get kCFURLContentModificationDateKey => + _kCFURLContentModificationDateKey.value; - set kCFURLVolumeSupportsHardLinksKey(CFStringRef value) => - _kCFURLVolumeSupportsHardLinksKey.value = value; + set kCFURLContentModificationDateKey(CFStringRef value) => + _kCFURLContentModificationDateKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsJournalingKey = - _lookup('kCFURLVolumeSupportsJournalingKey'); + late final ffi.Pointer _kCFURLAttributeModificationDateKey = + _lookup('kCFURLAttributeModificationDateKey'); - CFStringRef get kCFURLVolumeSupportsJournalingKey => - _kCFURLVolumeSupportsJournalingKey.value; + CFStringRef get kCFURLAttributeModificationDateKey => + _kCFURLAttributeModificationDateKey.value; - set kCFURLVolumeSupportsJournalingKey(CFStringRef value) => - _kCFURLVolumeSupportsJournalingKey.value = value; + set kCFURLAttributeModificationDateKey(CFStringRef value) => + _kCFURLAttributeModificationDateKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsJournalingKey = - _lookup('kCFURLVolumeIsJournalingKey'); + late final ffi.Pointer _kCFURLFileContentIdentifierKey = + _lookup('kCFURLFileContentIdentifierKey'); - CFStringRef get kCFURLVolumeIsJournalingKey => - _kCFURLVolumeIsJournalingKey.value; + CFStringRef get kCFURLFileContentIdentifierKey => + _kCFURLFileContentIdentifierKey.value; - set kCFURLVolumeIsJournalingKey(CFStringRef value) => - _kCFURLVolumeIsJournalingKey.value = value; + set kCFURLFileContentIdentifierKey(CFStringRef value) => + _kCFURLFileContentIdentifierKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsSparseFilesKey = - _lookup('kCFURLVolumeSupportsSparseFilesKey'); + late final ffi.Pointer _kCFURLMayShareFileContentKey = + _lookup('kCFURLMayShareFileContentKey'); - CFStringRef get kCFURLVolumeSupportsSparseFilesKey => - _kCFURLVolumeSupportsSparseFilesKey.value; + CFStringRef get kCFURLMayShareFileContentKey => + _kCFURLMayShareFileContentKey.value; - set kCFURLVolumeSupportsSparseFilesKey(CFStringRef value) => - _kCFURLVolumeSupportsSparseFilesKey.value = value; + set kCFURLMayShareFileContentKey(CFStringRef value) => + _kCFURLMayShareFileContentKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsZeroRunsKey = - _lookup('kCFURLVolumeSupportsZeroRunsKey'); + late final ffi.Pointer _kCFURLMayHaveExtendedAttributesKey = + _lookup('kCFURLMayHaveExtendedAttributesKey'); - CFStringRef get kCFURLVolumeSupportsZeroRunsKey => - _kCFURLVolumeSupportsZeroRunsKey.value; + CFStringRef get kCFURLMayHaveExtendedAttributesKey => + _kCFURLMayHaveExtendedAttributesKey.value; - set kCFURLVolumeSupportsZeroRunsKey(CFStringRef value) => - _kCFURLVolumeSupportsZeroRunsKey.value = value; + set kCFURLMayHaveExtendedAttributesKey(CFStringRef value) => + _kCFURLMayHaveExtendedAttributesKey.value = value; - late final ffi.Pointer - _kCFURLVolumeSupportsCaseSensitiveNamesKey = - _lookup('kCFURLVolumeSupportsCaseSensitiveNamesKey'); + late final ffi.Pointer _kCFURLIsPurgeableKey = + _lookup('kCFURLIsPurgeableKey'); - CFStringRef get kCFURLVolumeSupportsCaseSensitiveNamesKey => - _kCFURLVolumeSupportsCaseSensitiveNamesKey.value; + CFStringRef get kCFURLIsPurgeableKey => _kCFURLIsPurgeableKey.value; - set kCFURLVolumeSupportsCaseSensitiveNamesKey(CFStringRef value) => - _kCFURLVolumeSupportsCaseSensitiveNamesKey.value = value; + set kCFURLIsPurgeableKey(CFStringRef value) => + _kCFURLIsPurgeableKey.value = value; - late final ffi.Pointer - _kCFURLVolumeSupportsCasePreservedNamesKey = - _lookup('kCFURLVolumeSupportsCasePreservedNamesKey'); + late final ffi.Pointer _kCFURLIsSparseKey = + _lookup('kCFURLIsSparseKey'); - CFStringRef get kCFURLVolumeSupportsCasePreservedNamesKey => - _kCFURLVolumeSupportsCasePreservedNamesKey.value; + CFStringRef get kCFURLIsSparseKey => _kCFURLIsSparseKey.value; - set kCFURLVolumeSupportsCasePreservedNamesKey(CFStringRef value) => - _kCFURLVolumeSupportsCasePreservedNamesKey.value = value; + set kCFURLIsSparseKey(CFStringRef value) => _kCFURLIsSparseKey.value = value; - late final ffi.Pointer - _kCFURLVolumeSupportsRootDirectoryDatesKey = - _lookup('kCFURLVolumeSupportsRootDirectoryDatesKey'); + late final ffi.Pointer _kCFURLLinkCountKey = + _lookup('kCFURLLinkCountKey'); - CFStringRef get kCFURLVolumeSupportsRootDirectoryDatesKey => - _kCFURLVolumeSupportsRootDirectoryDatesKey.value; + CFStringRef get kCFURLLinkCountKey => _kCFURLLinkCountKey.value; - set kCFURLVolumeSupportsRootDirectoryDatesKey(CFStringRef value) => - _kCFURLVolumeSupportsRootDirectoryDatesKey.value = value; + set kCFURLLinkCountKey(CFStringRef value) => + _kCFURLLinkCountKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsVolumeSizesKey = - _lookup('kCFURLVolumeSupportsVolumeSizesKey'); + late final ffi.Pointer _kCFURLParentDirectoryURLKey = + _lookup('kCFURLParentDirectoryURLKey'); - CFStringRef get kCFURLVolumeSupportsVolumeSizesKey => - _kCFURLVolumeSupportsVolumeSizesKey.value; + CFStringRef get kCFURLParentDirectoryURLKey => + _kCFURLParentDirectoryURLKey.value; - set kCFURLVolumeSupportsVolumeSizesKey(CFStringRef value) => - _kCFURLVolumeSupportsVolumeSizesKey.value = value; + set kCFURLParentDirectoryURLKey(CFStringRef value) => + _kCFURLParentDirectoryURLKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsRenamingKey = - _lookup('kCFURLVolumeSupportsRenamingKey'); + late final ffi.Pointer _kCFURLVolumeURLKey = + _lookup('kCFURLVolumeURLKey'); - CFStringRef get kCFURLVolumeSupportsRenamingKey => - _kCFURLVolumeSupportsRenamingKey.value; + CFStringRef get kCFURLVolumeURLKey => _kCFURLVolumeURLKey.value; - set kCFURLVolumeSupportsRenamingKey(CFStringRef value) => - _kCFURLVolumeSupportsRenamingKey.value = value; + set kCFURLVolumeURLKey(CFStringRef value) => + _kCFURLVolumeURLKey.value = value; - late final ffi.Pointer - _kCFURLVolumeSupportsAdvisoryFileLockingKey = - _lookup('kCFURLVolumeSupportsAdvisoryFileLockingKey'); + late final ffi.Pointer _kCFURLTypeIdentifierKey = + _lookup('kCFURLTypeIdentifierKey'); - CFStringRef get kCFURLVolumeSupportsAdvisoryFileLockingKey => - _kCFURLVolumeSupportsAdvisoryFileLockingKey.value; + CFStringRef get kCFURLTypeIdentifierKey => _kCFURLTypeIdentifierKey.value; - set kCFURLVolumeSupportsAdvisoryFileLockingKey(CFStringRef value) => - _kCFURLVolumeSupportsAdvisoryFileLockingKey.value = value; + set kCFURLTypeIdentifierKey(CFStringRef value) => + _kCFURLTypeIdentifierKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsExtendedSecurityKey = - _lookup('kCFURLVolumeSupportsExtendedSecurityKey'); + late final ffi.Pointer _kCFURLLocalizedTypeDescriptionKey = + _lookup('kCFURLLocalizedTypeDescriptionKey'); - CFStringRef get kCFURLVolumeSupportsExtendedSecurityKey => - _kCFURLVolumeSupportsExtendedSecurityKey.value; + CFStringRef get kCFURLLocalizedTypeDescriptionKey => + _kCFURLLocalizedTypeDescriptionKey.value; - set kCFURLVolumeSupportsExtendedSecurityKey(CFStringRef value) => - _kCFURLVolumeSupportsExtendedSecurityKey.value = value; + set kCFURLLocalizedTypeDescriptionKey(CFStringRef value) => + _kCFURLLocalizedTypeDescriptionKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsBrowsableKey = - _lookup('kCFURLVolumeIsBrowsableKey'); + late final ffi.Pointer _kCFURLLabelNumberKey = + _lookup('kCFURLLabelNumberKey'); - CFStringRef get kCFURLVolumeIsBrowsableKey => - _kCFURLVolumeIsBrowsableKey.value; + CFStringRef get kCFURLLabelNumberKey => _kCFURLLabelNumberKey.value; - set kCFURLVolumeIsBrowsableKey(CFStringRef value) => - _kCFURLVolumeIsBrowsableKey.value = value; + set kCFURLLabelNumberKey(CFStringRef value) => + _kCFURLLabelNumberKey.value = value; - late final ffi.Pointer _kCFURLVolumeMaximumFileSizeKey = - _lookup('kCFURLVolumeMaximumFileSizeKey'); + late final ffi.Pointer _kCFURLLabelColorKey = + _lookup('kCFURLLabelColorKey'); - CFStringRef get kCFURLVolumeMaximumFileSizeKey => - _kCFURLVolumeMaximumFileSizeKey.value; + CFStringRef get kCFURLLabelColorKey => _kCFURLLabelColorKey.value; - set kCFURLVolumeMaximumFileSizeKey(CFStringRef value) => - _kCFURLVolumeMaximumFileSizeKey.value = value; + set kCFURLLabelColorKey(CFStringRef value) => + _kCFURLLabelColorKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsEjectableKey = - _lookup('kCFURLVolumeIsEjectableKey'); + late final ffi.Pointer _kCFURLLocalizedLabelKey = + _lookup('kCFURLLocalizedLabelKey'); - CFStringRef get kCFURLVolumeIsEjectableKey => - _kCFURLVolumeIsEjectableKey.value; + CFStringRef get kCFURLLocalizedLabelKey => _kCFURLLocalizedLabelKey.value; - set kCFURLVolumeIsEjectableKey(CFStringRef value) => - _kCFURLVolumeIsEjectableKey.value = value; + set kCFURLLocalizedLabelKey(CFStringRef value) => + _kCFURLLocalizedLabelKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsRemovableKey = - _lookup('kCFURLVolumeIsRemovableKey'); + late final ffi.Pointer _kCFURLEffectiveIconKey = + _lookup('kCFURLEffectiveIconKey'); - CFStringRef get kCFURLVolumeIsRemovableKey => - _kCFURLVolumeIsRemovableKey.value; + CFStringRef get kCFURLEffectiveIconKey => _kCFURLEffectiveIconKey.value; - set kCFURLVolumeIsRemovableKey(CFStringRef value) => - _kCFURLVolumeIsRemovableKey.value = value; + set kCFURLEffectiveIconKey(CFStringRef value) => + _kCFURLEffectiveIconKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsInternalKey = - _lookup('kCFURLVolumeIsInternalKey'); + late final ffi.Pointer _kCFURLCustomIconKey = + _lookup('kCFURLCustomIconKey'); - CFStringRef get kCFURLVolumeIsInternalKey => _kCFURLVolumeIsInternalKey.value; + CFStringRef get kCFURLCustomIconKey => _kCFURLCustomIconKey.value; - set kCFURLVolumeIsInternalKey(CFStringRef value) => - _kCFURLVolumeIsInternalKey.value = value; + set kCFURLCustomIconKey(CFStringRef value) => + _kCFURLCustomIconKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsAutomountedKey = - _lookup('kCFURLVolumeIsAutomountedKey'); + late final ffi.Pointer _kCFURLFileResourceIdentifierKey = + _lookup('kCFURLFileResourceIdentifierKey'); - CFStringRef get kCFURLVolumeIsAutomountedKey => - _kCFURLVolumeIsAutomountedKey.value; + CFStringRef get kCFURLFileResourceIdentifierKey => + _kCFURLFileResourceIdentifierKey.value; - set kCFURLVolumeIsAutomountedKey(CFStringRef value) => - _kCFURLVolumeIsAutomountedKey.value = value; + set kCFURLFileResourceIdentifierKey(CFStringRef value) => + _kCFURLFileResourceIdentifierKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsLocalKey = - _lookup('kCFURLVolumeIsLocalKey'); + late final ffi.Pointer _kCFURLVolumeIdentifierKey = + _lookup('kCFURLVolumeIdentifierKey'); - CFStringRef get kCFURLVolumeIsLocalKey => _kCFURLVolumeIsLocalKey.value; + CFStringRef get kCFURLVolumeIdentifierKey => _kCFURLVolumeIdentifierKey.value; - set kCFURLVolumeIsLocalKey(CFStringRef value) => - _kCFURLVolumeIsLocalKey.value = value; + set kCFURLVolumeIdentifierKey(CFStringRef value) => + _kCFURLVolumeIdentifierKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsReadOnlyKey = - _lookup('kCFURLVolumeIsReadOnlyKey'); + late final ffi.Pointer _kCFURLPreferredIOBlockSizeKey = + _lookup('kCFURLPreferredIOBlockSizeKey'); - CFStringRef get kCFURLVolumeIsReadOnlyKey => _kCFURLVolumeIsReadOnlyKey.value; + CFStringRef get kCFURLPreferredIOBlockSizeKey => + _kCFURLPreferredIOBlockSizeKey.value; - set kCFURLVolumeIsReadOnlyKey(CFStringRef value) => - _kCFURLVolumeIsReadOnlyKey.value = value; + set kCFURLPreferredIOBlockSizeKey(CFStringRef value) => + _kCFURLPreferredIOBlockSizeKey.value = value; - late final ffi.Pointer _kCFURLVolumeCreationDateKey = - _lookup('kCFURLVolumeCreationDateKey'); + late final ffi.Pointer _kCFURLIsReadableKey = + _lookup('kCFURLIsReadableKey'); - CFStringRef get kCFURLVolumeCreationDateKey => - _kCFURLVolumeCreationDateKey.value; + CFStringRef get kCFURLIsReadableKey => _kCFURLIsReadableKey.value; - set kCFURLVolumeCreationDateKey(CFStringRef value) => - _kCFURLVolumeCreationDateKey.value = value; + set kCFURLIsReadableKey(CFStringRef value) => + _kCFURLIsReadableKey.value = value; - late final ffi.Pointer _kCFURLVolumeURLForRemountingKey = - _lookup('kCFURLVolumeURLForRemountingKey'); + late final ffi.Pointer _kCFURLIsWritableKey = + _lookup('kCFURLIsWritableKey'); - CFStringRef get kCFURLVolumeURLForRemountingKey => - _kCFURLVolumeURLForRemountingKey.value; + CFStringRef get kCFURLIsWritableKey => _kCFURLIsWritableKey.value; - set kCFURLVolumeURLForRemountingKey(CFStringRef value) => - _kCFURLVolumeURLForRemountingKey.value = value; + set kCFURLIsWritableKey(CFStringRef value) => + _kCFURLIsWritableKey.value = value; - late final ffi.Pointer _kCFURLVolumeUUIDStringKey = - _lookup('kCFURLVolumeUUIDStringKey'); + late final ffi.Pointer _kCFURLIsExecutableKey = + _lookup('kCFURLIsExecutableKey'); - CFStringRef get kCFURLVolumeUUIDStringKey => _kCFURLVolumeUUIDStringKey.value; + CFStringRef get kCFURLIsExecutableKey => _kCFURLIsExecutableKey.value; - set kCFURLVolumeUUIDStringKey(CFStringRef value) => - _kCFURLVolumeUUIDStringKey.value = value; + set kCFURLIsExecutableKey(CFStringRef value) => + _kCFURLIsExecutableKey.value = value; - late final ffi.Pointer _kCFURLVolumeNameKey = - _lookup('kCFURLVolumeNameKey'); + late final ffi.Pointer _kCFURLFileSecurityKey = + _lookup('kCFURLFileSecurityKey'); - CFStringRef get kCFURLVolumeNameKey => _kCFURLVolumeNameKey.value; + CFStringRef get kCFURLFileSecurityKey => _kCFURLFileSecurityKey.value; - set kCFURLVolumeNameKey(CFStringRef value) => - _kCFURLVolumeNameKey.value = value; + set kCFURLFileSecurityKey(CFStringRef value) => + _kCFURLFileSecurityKey.value = value; - late final ffi.Pointer _kCFURLVolumeLocalizedNameKey = - _lookup('kCFURLVolumeLocalizedNameKey'); + late final ffi.Pointer _kCFURLIsExcludedFromBackupKey = + _lookup('kCFURLIsExcludedFromBackupKey'); - CFStringRef get kCFURLVolumeLocalizedNameKey => - _kCFURLVolumeLocalizedNameKey.value; + CFStringRef get kCFURLIsExcludedFromBackupKey => + _kCFURLIsExcludedFromBackupKey.value; - set kCFURLVolumeLocalizedNameKey(CFStringRef value) => - _kCFURLVolumeLocalizedNameKey.value = value; + set kCFURLIsExcludedFromBackupKey(CFStringRef value) => + _kCFURLIsExcludedFromBackupKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsEncryptedKey = - _lookup('kCFURLVolumeIsEncryptedKey'); + late final ffi.Pointer _kCFURLTagNamesKey = + _lookup('kCFURLTagNamesKey'); - CFStringRef get kCFURLVolumeIsEncryptedKey => - _kCFURLVolumeIsEncryptedKey.value; + CFStringRef get kCFURLTagNamesKey => _kCFURLTagNamesKey.value; - set kCFURLVolumeIsEncryptedKey(CFStringRef value) => - _kCFURLVolumeIsEncryptedKey.value = value; + set kCFURLTagNamesKey(CFStringRef value) => _kCFURLTagNamesKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsRootFileSystemKey = - _lookup('kCFURLVolumeIsRootFileSystemKey'); + late final ffi.Pointer _kCFURLPathKey = + _lookup('kCFURLPathKey'); - CFStringRef get kCFURLVolumeIsRootFileSystemKey => - _kCFURLVolumeIsRootFileSystemKey.value; + CFStringRef get kCFURLPathKey => _kCFURLPathKey.value; - set kCFURLVolumeIsRootFileSystemKey(CFStringRef value) => - _kCFURLVolumeIsRootFileSystemKey.value = value; + set kCFURLPathKey(CFStringRef value) => _kCFURLPathKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsCompressionKey = - _lookup('kCFURLVolumeSupportsCompressionKey'); + late final ffi.Pointer _kCFURLCanonicalPathKey = + _lookup('kCFURLCanonicalPathKey'); - CFStringRef get kCFURLVolumeSupportsCompressionKey => - _kCFURLVolumeSupportsCompressionKey.value; + CFStringRef get kCFURLCanonicalPathKey => _kCFURLCanonicalPathKey.value; - set kCFURLVolumeSupportsCompressionKey(CFStringRef value) => - _kCFURLVolumeSupportsCompressionKey.value = value; + set kCFURLCanonicalPathKey(CFStringRef value) => + _kCFURLCanonicalPathKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsFileCloningKey = - _lookup('kCFURLVolumeSupportsFileCloningKey'); + late final ffi.Pointer _kCFURLIsMountTriggerKey = + _lookup('kCFURLIsMountTriggerKey'); - CFStringRef get kCFURLVolumeSupportsFileCloningKey => - _kCFURLVolumeSupportsFileCloningKey.value; + CFStringRef get kCFURLIsMountTriggerKey => _kCFURLIsMountTriggerKey.value; - set kCFURLVolumeSupportsFileCloningKey(CFStringRef value) => - _kCFURLVolumeSupportsFileCloningKey.value = value; + set kCFURLIsMountTriggerKey(CFStringRef value) => + _kCFURLIsMountTriggerKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsSwapRenamingKey = - _lookup('kCFURLVolumeSupportsSwapRenamingKey'); + late final ffi.Pointer _kCFURLGenerationIdentifierKey = + _lookup('kCFURLGenerationIdentifierKey'); - CFStringRef get kCFURLVolumeSupportsSwapRenamingKey => - _kCFURLVolumeSupportsSwapRenamingKey.value; + CFStringRef get kCFURLGenerationIdentifierKey => + _kCFURLGenerationIdentifierKey.value; - set kCFURLVolumeSupportsSwapRenamingKey(CFStringRef value) => - _kCFURLVolumeSupportsSwapRenamingKey.value = value; + set kCFURLGenerationIdentifierKey(CFStringRef value) => + _kCFURLGenerationIdentifierKey.value = value; - late final ffi.Pointer - _kCFURLVolumeSupportsExclusiveRenamingKey = - _lookup('kCFURLVolumeSupportsExclusiveRenamingKey'); + late final ffi.Pointer _kCFURLDocumentIdentifierKey = + _lookup('kCFURLDocumentIdentifierKey'); - CFStringRef get kCFURLVolumeSupportsExclusiveRenamingKey => - _kCFURLVolumeSupportsExclusiveRenamingKey.value; + CFStringRef get kCFURLDocumentIdentifierKey => + _kCFURLDocumentIdentifierKey.value; - set kCFURLVolumeSupportsExclusiveRenamingKey(CFStringRef value) => - _kCFURLVolumeSupportsExclusiveRenamingKey.value = value; + set kCFURLDocumentIdentifierKey(CFStringRef value) => + _kCFURLDocumentIdentifierKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsImmutableFilesKey = - _lookup('kCFURLVolumeSupportsImmutableFilesKey'); + late final ffi.Pointer _kCFURLAddedToDirectoryDateKey = + _lookup('kCFURLAddedToDirectoryDateKey'); - CFStringRef get kCFURLVolumeSupportsImmutableFilesKey => - _kCFURLVolumeSupportsImmutableFilesKey.value; + CFStringRef get kCFURLAddedToDirectoryDateKey => + _kCFURLAddedToDirectoryDateKey.value; - set kCFURLVolumeSupportsImmutableFilesKey(CFStringRef value) => - _kCFURLVolumeSupportsImmutableFilesKey.value = value; + set kCFURLAddedToDirectoryDateKey(CFStringRef value) => + _kCFURLAddedToDirectoryDateKey.value = value; - late final ffi.Pointer - _kCFURLVolumeSupportsAccessPermissionsKey = - _lookup('kCFURLVolumeSupportsAccessPermissionsKey'); + late final ffi.Pointer _kCFURLQuarantinePropertiesKey = + _lookup('kCFURLQuarantinePropertiesKey'); - CFStringRef get kCFURLVolumeSupportsAccessPermissionsKey => - _kCFURLVolumeSupportsAccessPermissionsKey.value; + CFStringRef get kCFURLQuarantinePropertiesKey => + _kCFURLQuarantinePropertiesKey.value; - set kCFURLVolumeSupportsAccessPermissionsKey(CFStringRef value) => - _kCFURLVolumeSupportsAccessPermissionsKey.value = value; + set kCFURLQuarantinePropertiesKey(CFStringRef value) => + _kCFURLQuarantinePropertiesKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsFileProtectionKey = - _lookup('kCFURLVolumeSupportsFileProtectionKey'); + late final ffi.Pointer _kCFURLFileResourceTypeKey = + _lookup('kCFURLFileResourceTypeKey'); - CFStringRef get kCFURLVolumeSupportsFileProtectionKey => - _kCFURLVolumeSupportsFileProtectionKey.value; + CFStringRef get kCFURLFileResourceTypeKey => _kCFURLFileResourceTypeKey.value; - set kCFURLVolumeSupportsFileProtectionKey(CFStringRef value) => - _kCFURLVolumeSupportsFileProtectionKey.value = value; + set kCFURLFileResourceTypeKey(CFStringRef value) => + _kCFURLFileResourceTypeKey.value = value; - late final ffi.Pointer _kCFURLIsUbiquitousItemKey = - _lookup('kCFURLIsUbiquitousItemKey'); + late final ffi.Pointer _kCFURLFileResourceTypeNamedPipe = + _lookup('kCFURLFileResourceTypeNamedPipe'); - CFStringRef get kCFURLIsUbiquitousItemKey => _kCFURLIsUbiquitousItemKey.value; + CFStringRef get kCFURLFileResourceTypeNamedPipe => + _kCFURLFileResourceTypeNamedPipe.value; - set kCFURLIsUbiquitousItemKey(CFStringRef value) => - _kCFURLIsUbiquitousItemKey.value = value; + set kCFURLFileResourceTypeNamedPipe(CFStringRef value) => + _kCFURLFileResourceTypeNamedPipe.value = value; - late final ffi.Pointer - _kCFURLUbiquitousItemHasUnresolvedConflictsKey = - _lookup('kCFURLUbiquitousItemHasUnresolvedConflictsKey'); + late final ffi.Pointer _kCFURLFileResourceTypeCharacterSpecial = + _lookup('kCFURLFileResourceTypeCharacterSpecial'); - CFStringRef get kCFURLUbiquitousItemHasUnresolvedConflictsKey => - _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value; + CFStringRef get kCFURLFileResourceTypeCharacterSpecial => + _kCFURLFileResourceTypeCharacterSpecial.value; - set kCFURLUbiquitousItemHasUnresolvedConflictsKey(CFStringRef value) => - _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value = value; + set kCFURLFileResourceTypeCharacterSpecial(CFStringRef value) => + _kCFURLFileResourceTypeCharacterSpecial.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadedKey = - _lookup('kCFURLUbiquitousItemIsDownloadedKey'); + late final ffi.Pointer _kCFURLFileResourceTypeDirectory = + _lookup('kCFURLFileResourceTypeDirectory'); - CFStringRef get kCFURLUbiquitousItemIsDownloadedKey => - _kCFURLUbiquitousItemIsDownloadedKey.value; + CFStringRef get kCFURLFileResourceTypeDirectory => + _kCFURLFileResourceTypeDirectory.value; - set kCFURLUbiquitousItemIsDownloadedKey(CFStringRef value) => - _kCFURLUbiquitousItemIsDownloadedKey.value = value; + set kCFURLFileResourceTypeDirectory(CFStringRef value) => + _kCFURLFileResourceTypeDirectory.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadingKey = - _lookup('kCFURLUbiquitousItemIsDownloadingKey'); + late final ffi.Pointer _kCFURLFileResourceTypeBlockSpecial = + _lookup('kCFURLFileResourceTypeBlockSpecial'); - CFStringRef get kCFURLUbiquitousItemIsDownloadingKey => - _kCFURLUbiquitousItemIsDownloadingKey.value; + CFStringRef get kCFURLFileResourceTypeBlockSpecial => + _kCFURLFileResourceTypeBlockSpecial.value; - set kCFURLUbiquitousItemIsDownloadingKey(CFStringRef value) => - _kCFURLUbiquitousItemIsDownloadingKey.value = value; + set kCFURLFileResourceTypeBlockSpecial(CFStringRef value) => + _kCFURLFileResourceTypeBlockSpecial.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemIsUploadedKey = - _lookup('kCFURLUbiquitousItemIsUploadedKey'); + late final ffi.Pointer _kCFURLFileResourceTypeRegular = + _lookup('kCFURLFileResourceTypeRegular'); - CFStringRef get kCFURLUbiquitousItemIsUploadedKey => - _kCFURLUbiquitousItemIsUploadedKey.value; + CFStringRef get kCFURLFileResourceTypeRegular => + _kCFURLFileResourceTypeRegular.value; - set kCFURLUbiquitousItemIsUploadedKey(CFStringRef value) => - _kCFURLUbiquitousItemIsUploadedKey.value = value; + set kCFURLFileResourceTypeRegular(CFStringRef value) => + _kCFURLFileResourceTypeRegular.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemIsUploadingKey = - _lookup('kCFURLUbiquitousItemIsUploadingKey'); + late final ffi.Pointer _kCFURLFileResourceTypeSymbolicLink = + _lookup('kCFURLFileResourceTypeSymbolicLink'); - CFStringRef get kCFURLUbiquitousItemIsUploadingKey => - _kCFURLUbiquitousItemIsUploadingKey.value; + CFStringRef get kCFURLFileResourceTypeSymbolicLink => + _kCFURLFileResourceTypeSymbolicLink.value; - set kCFURLUbiquitousItemIsUploadingKey(CFStringRef value) => - _kCFURLUbiquitousItemIsUploadingKey.value = value; + set kCFURLFileResourceTypeSymbolicLink(CFStringRef value) => + _kCFURLFileResourceTypeSymbolicLink.value = value; - late final ffi.Pointer - _kCFURLUbiquitousItemPercentDownloadedKey = - _lookup('kCFURLUbiquitousItemPercentDownloadedKey'); + late final ffi.Pointer _kCFURLFileResourceTypeSocket = + _lookup('kCFURLFileResourceTypeSocket'); - CFStringRef get kCFURLUbiquitousItemPercentDownloadedKey => - _kCFURLUbiquitousItemPercentDownloadedKey.value; + CFStringRef get kCFURLFileResourceTypeSocket => + _kCFURLFileResourceTypeSocket.value; - set kCFURLUbiquitousItemPercentDownloadedKey(CFStringRef value) => - _kCFURLUbiquitousItemPercentDownloadedKey.value = value; + set kCFURLFileResourceTypeSocket(CFStringRef value) => + _kCFURLFileResourceTypeSocket.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemPercentUploadedKey = - _lookup('kCFURLUbiquitousItemPercentUploadedKey'); + late final ffi.Pointer _kCFURLFileResourceTypeUnknown = + _lookup('kCFURLFileResourceTypeUnknown'); - CFStringRef get kCFURLUbiquitousItemPercentUploadedKey => - _kCFURLUbiquitousItemPercentUploadedKey.value; + CFStringRef get kCFURLFileResourceTypeUnknown => + _kCFURLFileResourceTypeUnknown.value; - set kCFURLUbiquitousItemPercentUploadedKey(CFStringRef value) => - _kCFURLUbiquitousItemPercentUploadedKey.value = value; + set kCFURLFileResourceTypeUnknown(CFStringRef value) => + _kCFURLFileResourceTypeUnknown.value = value; - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusKey = - _lookup('kCFURLUbiquitousItemDownloadingStatusKey'); + late final ffi.Pointer _kCFURLFileSizeKey = + _lookup('kCFURLFileSizeKey'); - CFStringRef get kCFURLUbiquitousItemDownloadingStatusKey => - _kCFURLUbiquitousItemDownloadingStatusKey.value; + CFStringRef get kCFURLFileSizeKey => _kCFURLFileSizeKey.value; - set kCFURLUbiquitousItemDownloadingStatusKey(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusKey.value = value; + set kCFURLFileSizeKey(CFStringRef value) => _kCFURLFileSizeKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemDownloadingErrorKey = - _lookup('kCFURLUbiquitousItemDownloadingErrorKey'); + late final ffi.Pointer _kCFURLFileAllocatedSizeKey = + _lookup('kCFURLFileAllocatedSizeKey'); - CFStringRef get kCFURLUbiquitousItemDownloadingErrorKey => - _kCFURLUbiquitousItemDownloadingErrorKey.value; + CFStringRef get kCFURLFileAllocatedSizeKey => + _kCFURLFileAllocatedSizeKey.value; - set kCFURLUbiquitousItemDownloadingErrorKey(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingErrorKey.value = value; + set kCFURLFileAllocatedSizeKey(CFStringRef value) => + _kCFURLFileAllocatedSizeKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemUploadingErrorKey = - _lookup('kCFURLUbiquitousItemUploadingErrorKey'); + late final ffi.Pointer _kCFURLTotalFileSizeKey = + _lookup('kCFURLTotalFileSizeKey'); - CFStringRef get kCFURLUbiquitousItemUploadingErrorKey => - _kCFURLUbiquitousItemUploadingErrorKey.value; + CFStringRef get kCFURLTotalFileSizeKey => _kCFURLTotalFileSizeKey.value; - set kCFURLUbiquitousItemUploadingErrorKey(CFStringRef value) => - _kCFURLUbiquitousItemUploadingErrorKey.value = value; + set kCFURLTotalFileSizeKey(CFStringRef value) => + _kCFURLTotalFileSizeKey.value = value; - late final ffi.Pointer - _kCFURLUbiquitousItemIsExcludedFromSyncKey = - _lookup('kCFURLUbiquitousItemIsExcludedFromSyncKey'); + late final ffi.Pointer _kCFURLTotalFileAllocatedSizeKey = + _lookup('kCFURLTotalFileAllocatedSizeKey'); - CFStringRef get kCFURLUbiquitousItemIsExcludedFromSyncKey => - _kCFURLUbiquitousItemIsExcludedFromSyncKey.value; + CFStringRef get kCFURLTotalFileAllocatedSizeKey => + _kCFURLTotalFileAllocatedSizeKey.value; - set kCFURLUbiquitousItemIsExcludedFromSyncKey(CFStringRef value) => - _kCFURLUbiquitousItemIsExcludedFromSyncKey.value = value; + set kCFURLTotalFileAllocatedSizeKey(CFStringRef value) => + _kCFURLTotalFileAllocatedSizeKey.value = value; - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusNotDownloaded = - _lookup( - 'kCFURLUbiquitousItemDownloadingStatusNotDownloaded'); + late final ffi.Pointer _kCFURLIsAliasFileKey = + _lookup('kCFURLIsAliasFileKey'); - CFStringRef get kCFURLUbiquitousItemDownloadingStatusNotDownloaded => - _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value; + CFStringRef get kCFURLIsAliasFileKey => _kCFURLIsAliasFileKey.value; - set kCFURLUbiquitousItemDownloadingStatusNotDownloaded(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; + set kCFURLIsAliasFileKey(CFStringRef value) => + _kCFURLIsAliasFileKey.value = value; - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusDownloaded = - _lookup('kCFURLUbiquitousItemDownloadingStatusDownloaded'); + late final ffi.Pointer _kCFURLFileProtectionKey = + _lookup('kCFURLFileProtectionKey'); - CFStringRef get kCFURLUbiquitousItemDownloadingStatusDownloaded => - _kCFURLUbiquitousItemDownloadingStatusDownloaded.value; + CFStringRef get kCFURLFileProtectionKey => _kCFURLFileProtectionKey.value; - set kCFURLUbiquitousItemDownloadingStatusDownloaded(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusDownloaded.value = value; + set kCFURLFileProtectionKey(CFStringRef value) => + _kCFURLFileProtectionKey.value = value; - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusCurrent = - _lookup('kCFURLUbiquitousItemDownloadingStatusCurrent'); + late final ffi.Pointer _kCFURLFileProtectionNone = + _lookup('kCFURLFileProtectionNone'); - CFStringRef get kCFURLUbiquitousItemDownloadingStatusCurrent => - _kCFURLUbiquitousItemDownloadingStatusCurrent.value; + CFStringRef get kCFURLFileProtectionNone => _kCFURLFileProtectionNone.value; - set kCFURLUbiquitousItemDownloadingStatusCurrent(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusCurrent.value = value; + set kCFURLFileProtectionNone(CFStringRef value) => + _kCFURLFileProtectionNone.value = value; - CFDataRef CFURLCreateBookmarkData( - CFAllocatorRef allocator, - CFURLRef url, - int options, - CFArrayRef resourcePropertiesToInclude, - CFURLRef relativeToURL, - ffi.Pointer error, - ) { - return _CFURLCreateBookmarkData( - allocator, - url, - options, - resourcePropertiesToInclude, - relativeToURL, - error, - ); - } + late final ffi.Pointer _kCFURLFileProtectionComplete = + _lookup('kCFURLFileProtectionComplete'); - late final _CFURLCreateBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, CFArrayRef, - CFURLRef, ffi.Pointer)>>('CFURLCreateBookmarkData'); - late final _CFURLCreateBookmarkData = _CFURLCreateBookmarkDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, int, CFArrayRef, CFURLRef, - ffi.Pointer)>(); + CFStringRef get kCFURLFileProtectionComplete => + _kCFURLFileProtectionComplete.value; - CFURLRef CFURLCreateByResolvingBookmarkData( - CFAllocatorRef allocator, - CFDataRef bookmark, - int options, - CFURLRef relativeToURL, - CFArrayRef resourcePropertiesToInclude, - ffi.Pointer isStale, - ffi.Pointer error, - ) { - return _CFURLCreateByResolvingBookmarkData( - allocator, - bookmark, - options, - relativeToURL, - resourcePropertiesToInclude, - isStale, - error, - ); - } + set kCFURLFileProtectionComplete(CFStringRef value) => + _kCFURLFileProtectionComplete.value = value; - late final _CFURLCreateByResolvingBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function( - CFAllocatorRef, - CFDataRef, - ffi.Int32, - CFURLRef, - CFArrayRef, - ffi.Pointer, - ffi.Pointer)>>('CFURLCreateByResolvingBookmarkData'); - late final _CFURLCreateByResolvingBookmarkData = - _CFURLCreateByResolvingBookmarkDataPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFDataRef, int, CFURLRef, - CFArrayRef, ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer _kCFURLFileProtectionCompleteUnlessOpen = + _lookup('kCFURLFileProtectionCompleteUnlessOpen'); - CFDictionaryRef CFURLCreateResourcePropertiesForKeysFromBookmarkData( - CFAllocatorRef allocator, - CFArrayRef resourcePropertiesToReturn, - CFDataRef bookmark, - ) { - return _CFURLCreateResourcePropertiesForKeysFromBookmarkData( - allocator, - resourcePropertiesToReturn, - bookmark, - ); - } + CFStringRef get kCFURLFileProtectionCompleteUnlessOpen => + _kCFURLFileProtectionCompleteUnlessOpen.value; - late final _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>>( - 'CFURLCreateResourcePropertiesForKeysFromBookmarkData'); - late final _CFURLCreateResourcePropertiesForKeysFromBookmarkData = - _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr.asFunction< - CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>(); + set kCFURLFileProtectionCompleteUnlessOpen(CFStringRef value) => + _kCFURLFileProtectionCompleteUnlessOpen.value = value; - CFTypeRef CFURLCreateResourcePropertyForKeyFromBookmarkData( - CFAllocatorRef allocator, - CFStringRef resourcePropertyKey, - CFDataRef bookmark, - ) { - return _CFURLCreateResourcePropertyForKeyFromBookmarkData( - allocator, - resourcePropertyKey, - bookmark, - ); - } + late final ffi.Pointer + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication = + _lookup( + 'kCFURLFileProtectionCompleteUntilFirstUserAuthentication'); - late final _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFAllocatorRef, CFStringRef, - CFDataRef)>>('CFURLCreateResourcePropertyForKeyFromBookmarkData'); - late final _CFURLCreateResourcePropertyForKeyFromBookmarkData = - _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr.asFunction< - CFTypeRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); + CFStringRef get kCFURLFileProtectionCompleteUntilFirstUserAuthentication => + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value; - CFDataRef CFURLCreateBookmarkDataFromFile( - CFAllocatorRef allocator, - CFURLRef fileURL, - ffi.Pointer errorRef, - ) { - return _CFURLCreateBookmarkDataFromFile( - allocator, - fileURL, - errorRef, - ); - } + set kCFURLFileProtectionCompleteUntilFirstUserAuthentication( + CFStringRef value) => + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; - late final _CFURLCreateBookmarkDataFromFilePtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, - ffi.Pointer)>>('CFURLCreateBookmarkDataFromFile'); - late final _CFURLCreateBookmarkDataFromFile = - _CFURLCreateBookmarkDataFromFilePtr.asFunction< - CFDataRef Function( - CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + late final ffi.Pointer + _kCFURLVolumeLocalizedFormatDescriptionKey = + _lookup('kCFURLVolumeLocalizedFormatDescriptionKey'); - int CFURLWriteBookmarkDataToFile( - CFDataRef bookmarkRef, - CFURLRef fileURL, - int options, - ffi.Pointer errorRef, - ) { - return _CFURLWriteBookmarkDataToFile( - bookmarkRef, - fileURL, - options, - errorRef, - ); - } + CFStringRef get kCFURLVolumeLocalizedFormatDescriptionKey => + _kCFURLVolumeLocalizedFormatDescriptionKey.value; - late final _CFURLWriteBookmarkDataToFilePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFDataRef, - CFURLRef, - CFURLBookmarkFileCreationOptions, - ffi.Pointer)>>('CFURLWriteBookmarkDataToFile'); - late final _CFURLWriteBookmarkDataToFile = - _CFURLWriteBookmarkDataToFilePtr.asFunction< - int Function(CFDataRef, CFURLRef, int, ffi.Pointer)>(); + set kCFURLVolumeLocalizedFormatDescriptionKey(CFStringRef value) => + _kCFURLVolumeLocalizedFormatDescriptionKey.value = value; - CFDataRef CFURLCreateBookmarkDataFromAliasRecord( - CFAllocatorRef allocatorRef, - CFDataRef aliasRecordDataRef, - ) { - return _CFURLCreateBookmarkDataFromAliasRecord( - allocatorRef, - aliasRecordDataRef, - ); - } + late final ffi.Pointer _kCFURLVolumeTotalCapacityKey = + _lookup('kCFURLVolumeTotalCapacityKey'); - late final _CFURLCreateBookmarkDataFromAliasRecordPtr = _lookup< - ffi.NativeFunction>( - 'CFURLCreateBookmarkDataFromAliasRecord'); - late final _CFURLCreateBookmarkDataFromAliasRecord = - _CFURLCreateBookmarkDataFromAliasRecordPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFDataRef)>(); + CFStringRef get kCFURLVolumeTotalCapacityKey => + _kCFURLVolumeTotalCapacityKey.value; - int CFURLStartAccessingSecurityScopedResource( - CFURLRef url, - ) { - return _CFURLStartAccessingSecurityScopedResource( - url, - ); - } + set kCFURLVolumeTotalCapacityKey(CFStringRef value) => + _kCFURLVolumeTotalCapacityKey.value = value; - late final _CFURLStartAccessingSecurityScopedResourcePtr = - _lookup>( - 'CFURLStartAccessingSecurityScopedResource'); - late final _CFURLStartAccessingSecurityScopedResource = - _CFURLStartAccessingSecurityScopedResourcePtr.asFunction< - int Function(CFURLRef)>(); + late final ffi.Pointer _kCFURLVolumeAvailableCapacityKey = + _lookup('kCFURLVolumeAvailableCapacityKey'); - void CFURLStopAccessingSecurityScopedResource( - CFURLRef url, - ) { - return _CFURLStopAccessingSecurityScopedResource( - url, - ); - } + CFStringRef get kCFURLVolumeAvailableCapacityKey => + _kCFURLVolumeAvailableCapacityKey.value; - late final _CFURLStopAccessingSecurityScopedResourcePtr = - _lookup>( - 'CFURLStopAccessingSecurityScopedResource'); - late final _CFURLStopAccessingSecurityScopedResource = - _CFURLStopAccessingSecurityScopedResourcePtr.asFunction< - void Function(CFURLRef)>(); + set kCFURLVolumeAvailableCapacityKey(CFStringRef value) => + _kCFURLVolumeAvailableCapacityKey.value = value; - late final ffi.Pointer _kCFRunLoopDefaultMode = - _lookup('kCFRunLoopDefaultMode'); + late final ffi.Pointer + _kCFURLVolumeAvailableCapacityForImportantUsageKey = + _lookup('kCFURLVolumeAvailableCapacityForImportantUsageKey'); - CFRunLoopMode get kCFRunLoopDefaultMode => _kCFRunLoopDefaultMode.value; + CFStringRef get kCFURLVolumeAvailableCapacityForImportantUsageKey => + _kCFURLVolumeAvailableCapacityForImportantUsageKey.value; - set kCFRunLoopDefaultMode(CFRunLoopMode value) => - _kCFRunLoopDefaultMode.value = value; + set kCFURLVolumeAvailableCapacityForImportantUsageKey(CFStringRef value) => + _kCFURLVolumeAvailableCapacityForImportantUsageKey.value = value; - late final ffi.Pointer _kCFRunLoopCommonModes = - _lookup('kCFRunLoopCommonModes'); + late final ffi.Pointer + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey = + _lookup( + 'kCFURLVolumeAvailableCapacityForOpportunisticUsageKey'); - CFRunLoopMode get kCFRunLoopCommonModes => _kCFRunLoopCommonModes.value; + CFStringRef get kCFURLVolumeAvailableCapacityForOpportunisticUsageKey => + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value; - set kCFRunLoopCommonModes(CFRunLoopMode value) => - _kCFRunLoopCommonModes.value = value; + set kCFURLVolumeAvailableCapacityForOpportunisticUsageKey( + CFStringRef value) => + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; - int CFRunLoopGetTypeID() { - return _CFRunLoopGetTypeID(); - } + late final ffi.Pointer _kCFURLVolumeResourceCountKey = + _lookup('kCFURLVolumeResourceCountKey'); - late final _CFRunLoopGetTypeIDPtr = - _lookup>('CFRunLoopGetTypeID'); - late final _CFRunLoopGetTypeID = - _CFRunLoopGetTypeIDPtr.asFunction(); + CFStringRef get kCFURLVolumeResourceCountKey => + _kCFURLVolumeResourceCountKey.value; - CFRunLoopRef CFRunLoopGetCurrent() { - return _CFRunLoopGetCurrent(); - } + set kCFURLVolumeResourceCountKey(CFStringRef value) => + _kCFURLVolumeResourceCountKey.value = value; - late final _CFRunLoopGetCurrentPtr = - _lookup>( - 'CFRunLoopGetCurrent'); - late final _CFRunLoopGetCurrent = - _CFRunLoopGetCurrentPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsPersistentIDsKey = + _lookup('kCFURLVolumeSupportsPersistentIDsKey'); - CFRunLoopRef CFRunLoopGetMain() { - return _CFRunLoopGetMain(); - } + CFStringRef get kCFURLVolumeSupportsPersistentIDsKey => + _kCFURLVolumeSupportsPersistentIDsKey.value; - late final _CFRunLoopGetMainPtr = - _lookup>('CFRunLoopGetMain'); - late final _CFRunLoopGetMain = - _CFRunLoopGetMainPtr.asFunction(); + set kCFURLVolumeSupportsPersistentIDsKey(CFStringRef value) => + _kCFURLVolumeSupportsPersistentIDsKey.value = value; - CFRunLoopMode CFRunLoopCopyCurrentMode( - CFRunLoopRef rl, - ) { - return _CFRunLoopCopyCurrentMode( - rl, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsSymbolicLinksKey = + _lookup('kCFURLVolumeSupportsSymbolicLinksKey'); - late final _CFRunLoopCopyCurrentModePtr = - _lookup>( - 'CFRunLoopCopyCurrentMode'); - late final _CFRunLoopCopyCurrentMode = _CFRunLoopCopyCurrentModePtr - .asFunction(); + CFStringRef get kCFURLVolumeSupportsSymbolicLinksKey => + _kCFURLVolumeSupportsSymbolicLinksKey.value; - CFArrayRef CFRunLoopCopyAllModes( - CFRunLoopRef rl, - ) { - return _CFRunLoopCopyAllModes( - rl, - ); - } + set kCFURLVolumeSupportsSymbolicLinksKey(CFStringRef value) => + _kCFURLVolumeSupportsSymbolicLinksKey.value = value; - late final _CFRunLoopCopyAllModesPtr = - _lookup>( - 'CFRunLoopCopyAllModes'); - late final _CFRunLoopCopyAllModes = - _CFRunLoopCopyAllModesPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsHardLinksKey = + _lookup('kCFURLVolumeSupportsHardLinksKey'); - void CFRunLoopAddCommonMode( - CFRunLoopRef rl, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddCommonMode( - rl, - mode, - ); - } + CFStringRef get kCFURLVolumeSupportsHardLinksKey => + _kCFURLVolumeSupportsHardLinksKey.value; - late final _CFRunLoopAddCommonModePtr = _lookup< - ffi.NativeFunction>( - 'CFRunLoopAddCommonMode'); - late final _CFRunLoopAddCommonMode = _CFRunLoopAddCommonModePtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopMode)>(); + set kCFURLVolumeSupportsHardLinksKey(CFStringRef value) => + _kCFURLVolumeSupportsHardLinksKey.value = value; - double CFRunLoopGetNextTimerFireDate( - CFRunLoopRef rl, - CFRunLoopMode mode, - ) { - return _CFRunLoopGetNextTimerFireDate( - rl, - mode, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsJournalingKey = + _lookup('kCFURLVolumeSupportsJournalingKey'); - late final _CFRunLoopGetNextTimerFireDatePtr = _lookup< - ffi.NativeFunction< - CFAbsoluteTime Function( - CFRunLoopRef, CFRunLoopMode)>>('CFRunLoopGetNextTimerFireDate'); - late final _CFRunLoopGetNextTimerFireDate = _CFRunLoopGetNextTimerFireDatePtr - .asFunction(); + CFStringRef get kCFURLVolumeSupportsJournalingKey => + _kCFURLVolumeSupportsJournalingKey.value; - void CFRunLoopRun() { - return _CFRunLoopRun(); - } + set kCFURLVolumeSupportsJournalingKey(CFStringRef value) => + _kCFURLVolumeSupportsJournalingKey.value = value; - late final _CFRunLoopRunPtr = - _lookup>('CFRunLoopRun'); - late final _CFRunLoopRun = _CFRunLoopRunPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeIsJournalingKey = + _lookup('kCFURLVolumeIsJournalingKey'); - int CFRunLoopRunInMode( - CFRunLoopMode mode, - double seconds, - int returnAfterSourceHandled, - ) { - return _CFRunLoopRunInMode( - mode, - seconds, - returnAfterSourceHandled, - ); - } + CFStringRef get kCFURLVolumeIsJournalingKey => + _kCFURLVolumeIsJournalingKey.value; - late final _CFRunLoopRunInModePtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - CFRunLoopMode, CFTimeInterval, Boolean)>>('CFRunLoopRunInMode'); - late final _CFRunLoopRunInMode = _CFRunLoopRunInModePtr.asFunction< - int Function(CFRunLoopMode, double, int)>(); + set kCFURLVolumeIsJournalingKey(CFStringRef value) => + _kCFURLVolumeIsJournalingKey.value = value; - int CFRunLoopIsWaiting( - CFRunLoopRef rl, - ) { - return _CFRunLoopIsWaiting( - rl, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsSparseFilesKey = + _lookup('kCFURLVolumeSupportsSparseFilesKey'); - late final _CFRunLoopIsWaitingPtr = - _lookup>( - 'CFRunLoopIsWaiting'); - late final _CFRunLoopIsWaiting = - _CFRunLoopIsWaitingPtr.asFunction(); + CFStringRef get kCFURLVolumeSupportsSparseFilesKey => + _kCFURLVolumeSupportsSparseFilesKey.value; - void CFRunLoopWakeUp( - CFRunLoopRef rl, - ) { - return _CFRunLoopWakeUp( - rl, - ); - } + set kCFURLVolumeSupportsSparseFilesKey(CFStringRef value) => + _kCFURLVolumeSupportsSparseFilesKey.value = value; - late final _CFRunLoopWakeUpPtr = - _lookup>( - 'CFRunLoopWakeUp'); - late final _CFRunLoopWakeUp = - _CFRunLoopWakeUpPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsZeroRunsKey = + _lookup('kCFURLVolumeSupportsZeroRunsKey'); - void CFRunLoopStop( - CFRunLoopRef rl, - ) { - return _CFRunLoopStop( - rl, - ); - } + CFStringRef get kCFURLVolumeSupportsZeroRunsKey => + _kCFURLVolumeSupportsZeroRunsKey.value; - late final _CFRunLoopStopPtr = - _lookup>( - 'CFRunLoopStop'); - late final _CFRunLoopStop = - _CFRunLoopStopPtr.asFunction(); + set kCFURLVolumeSupportsZeroRunsKey(CFStringRef value) => + _kCFURLVolumeSupportsZeroRunsKey.value = value; - void CFRunLoopPerformBlock( - CFRunLoopRef rl, - CFTypeRef mode, - ffi.Pointer<_ObjCBlock> block, - ) { - return _CFRunLoopPerformBlock( - rl, - mode, - block, - ); - } + late final ffi.Pointer + _kCFURLVolumeSupportsCaseSensitiveNamesKey = + _lookup('kCFURLVolumeSupportsCaseSensitiveNamesKey'); - late final _CFRunLoopPerformBlockPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFTypeRef, - ffi.Pointer<_ObjCBlock>)>>('CFRunLoopPerformBlock'); - late final _CFRunLoopPerformBlock = _CFRunLoopPerformBlockPtr.asFunction< - void Function(CFRunLoopRef, CFTypeRef, ffi.Pointer<_ObjCBlock>)>(); + CFStringRef get kCFURLVolumeSupportsCaseSensitiveNamesKey => + _kCFURLVolumeSupportsCaseSensitiveNamesKey.value; - int CFRunLoopContainsSource( - CFRunLoopRef rl, - CFRunLoopSourceRef source, - CFRunLoopMode mode, - ) { - return _CFRunLoopContainsSource( - rl, - source, - mode, - ); - } + set kCFURLVolumeSupportsCaseSensitiveNamesKey(CFStringRef value) => + _kCFURLVolumeSupportsCaseSensitiveNamesKey.value = value; - late final _CFRunLoopContainsSourcePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFRunLoopRef, CFRunLoopSourceRef, - CFRunLoopMode)>>('CFRunLoopContainsSource'); - late final _CFRunLoopContainsSource = _CFRunLoopContainsSourcePtr.asFunction< - int Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + late final ffi.Pointer + _kCFURLVolumeSupportsCasePreservedNamesKey = + _lookup('kCFURLVolumeSupportsCasePreservedNamesKey'); - void CFRunLoopAddSource( - CFRunLoopRef rl, - CFRunLoopSourceRef source, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddSource( - rl, - source, - mode, - ); - } + CFStringRef get kCFURLVolumeSupportsCasePreservedNamesKey => + _kCFURLVolumeSupportsCasePreservedNamesKey.value; - late final _CFRunLoopAddSourcePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, - CFRunLoopMode)>>('CFRunLoopAddSource'); - late final _CFRunLoopAddSource = _CFRunLoopAddSourcePtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + set kCFURLVolumeSupportsCasePreservedNamesKey(CFStringRef value) => + _kCFURLVolumeSupportsCasePreservedNamesKey.value = value; - void CFRunLoopRemoveSource( - CFRunLoopRef rl, - CFRunLoopSourceRef source, - CFRunLoopMode mode, - ) { - return _CFRunLoopRemoveSource( - rl, - source, - mode, - ); - } + late final ffi.Pointer + _kCFURLVolumeSupportsRootDirectoryDatesKey = + _lookup('kCFURLVolumeSupportsRootDirectoryDatesKey'); - late final _CFRunLoopRemoveSourcePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, - CFRunLoopMode)>>('CFRunLoopRemoveSource'); - late final _CFRunLoopRemoveSource = _CFRunLoopRemoveSourcePtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + CFStringRef get kCFURLVolumeSupportsRootDirectoryDatesKey => + _kCFURLVolumeSupportsRootDirectoryDatesKey.value; - int CFRunLoopContainsObserver( - CFRunLoopRef rl, - CFRunLoopObserverRef observer, - CFRunLoopMode mode, - ) { - return _CFRunLoopContainsObserver( - rl, - observer, - mode, - ); - } + set kCFURLVolumeSupportsRootDirectoryDatesKey(CFStringRef value) => + _kCFURLVolumeSupportsRootDirectoryDatesKey.value = value; - late final _CFRunLoopContainsObserverPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFRunLoopRef, CFRunLoopObserverRef, - CFRunLoopMode)>>('CFRunLoopContainsObserver'); - late final _CFRunLoopContainsObserver = - _CFRunLoopContainsObserverPtr.asFunction< - int Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + late final ffi.Pointer _kCFURLVolumeSupportsVolumeSizesKey = + _lookup('kCFURLVolumeSupportsVolumeSizesKey'); - void CFRunLoopAddObserver( - CFRunLoopRef rl, - CFRunLoopObserverRef observer, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddObserver( - rl, - observer, - mode, - ); - } + CFStringRef get kCFURLVolumeSupportsVolumeSizesKey => + _kCFURLVolumeSupportsVolumeSizesKey.value; - late final _CFRunLoopAddObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, - CFRunLoopMode)>>('CFRunLoopAddObserver'); - late final _CFRunLoopAddObserver = _CFRunLoopAddObserverPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + set kCFURLVolumeSupportsVolumeSizesKey(CFStringRef value) => + _kCFURLVolumeSupportsVolumeSizesKey.value = value; - void CFRunLoopRemoveObserver( - CFRunLoopRef rl, - CFRunLoopObserverRef observer, - CFRunLoopMode mode, - ) { - return _CFRunLoopRemoveObserver( - rl, - observer, - mode, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsRenamingKey = + _lookup('kCFURLVolumeSupportsRenamingKey'); - late final _CFRunLoopRemoveObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, - CFRunLoopMode)>>('CFRunLoopRemoveObserver'); - late final _CFRunLoopRemoveObserver = _CFRunLoopRemoveObserverPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + CFStringRef get kCFURLVolumeSupportsRenamingKey => + _kCFURLVolumeSupportsRenamingKey.value; - int CFRunLoopContainsTimer( - CFRunLoopRef rl, - CFRunLoopTimerRef timer, - CFRunLoopMode mode, - ) { - return _CFRunLoopContainsTimer( - rl, - timer, - mode, - ); - } + set kCFURLVolumeSupportsRenamingKey(CFStringRef value) => + _kCFURLVolumeSupportsRenamingKey.value = value; - late final _CFRunLoopContainsTimerPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFRunLoopRef, CFRunLoopTimerRef, - CFRunLoopMode)>>('CFRunLoopContainsTimer'); - late final _CFRunLoopContainsTimer = _CFRunLoopContainsTimerPtr.asFunction< - int Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + late final ffi.Pointer + _kCFURLVolumeSupportsAdvisoryFileLockingKey = + _lookup('kCFURLVolumeSupportsAdvisoryFileLockingKey'); - void CFRunLoopAddTimer( - CFRunLoopRef rl, - CFRunLoopTimerRef timer, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddTimer( - rl, - timer, - mode, - ); - } + CFStringRef get kCFURLVolumeSupportsAdvisoryFileLockingKey => + _kCFURLVolumeSupportsAdvisoryFileLockingKey.value; - late final _CFRunLoopAddTimerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, - CFRunLoopMode)>>('CFRunLoopAddTimer'); - late final _CFRunLoopAddTimer = _CFRunLoopAddTimerPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + set kCFURLVolumeSupportsAdvisoryFileLockingKey(CFStringRef value) => + _kCFURLVolumeSupportsAdvisoryFileLockingKey.value = value; - void CFRunLoopRemoveTimer( - CFRunLoopRef rl, - CFRunLoopTimerRef timer, - CFRunLoopMode mode, - ) { - return _CFRunLoopRemoveTimer( - rl, - timer, - mode, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsExtendedSecurityKey = + _lookup('kCFURLVolumeSupportsExtendedSecurityKey'); - late final _CFRunLoopRemoveTimerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, - CFRunLoopMode)>>('CFRunLoopRemoveTimer'); - late final _CFRunLoopRemoveTimer = _CFRunLoopRemoveTimerPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + CFStringRef get kCFURLVolumeSupportsExtendedSecurityKey => + _kCFURLVolumeSupportsExtendedSecurityKey.value; - int CFRunLoopSourceGetTypeID() { - return _CFRunLoopSourceGetTypeID(); - } + set kCFURLVolumeSupportsExtendedSecurityKey(CFStringRef value) => + _kCFURLVolumeSupportsExtendedSecurityKey.value = value; - late final _CFRunLoopSourceGetTypeIDPtr = - _lookup>( - 'CFRunLoopSourceGetTypeID'); - late final _CFRunLoopSourceGetTypeID = - _CFRunLoopSourceGetTypeIDPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeIsBrowsableKey = + _lookup('kCFURLVolumeIsBrowsableKey'); - CFRunLoopSourceRef CFRunLoopSourceCreate( - CFAllocatorRef allocator, - int order, - ffi.Pointer context, - ) { - return _CFRunLoopSourceCreate( - allocator, - order, - context, - ); - } + CFStringRef get kCFURLVolumeIsBrowsableKey => + _kCFURLVolumeIsBrowsableKey.value; - late final _CFRunLoopSourceCreatePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFRunLoopSourceCreate'); - late final _CFRunLoopSourceCreate = _CFRunLoopSourceCreatePtr.asFunction< - CFRunLoopSourceRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + set kCFURLVolumeIsBrowsableKey(CFStringRef value) => + _kCFURLVolumeIsBrowsableKey.value = value; - int CFRunLoopSourceGetOrder( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceGetOrder( - source, - ); - } + late final ffi.Pointer _kCFURLVolumeMaximumFileSizeKey = + _lookup('kCFURLVolumeMaximumFileSizeKey'); - late final _CFRunLoopSourceGetOrderPtr = - _lookup>( - 'CFRunLoopSourceGetOrder'); - late final _CFRunLoopSourceGetOrder = _CFRunLoopSourceGetOrderPtr.asFunction< - int Function(CFRunLoopSourceRef)>(); + CFStringRef get kCFURLVolumeMaximumFileSizeKey => + _kCFURLVolumeMaximumFileSizeKey.value; - void CFRunLoopSourceInvalidate( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceInvalidate( - source, - ); - } + set kCFURLVolumeMaximumFileSizeKey(CFStringRef value) => + _kCFURLVolumeMaximumFileSizeKey.value = value; - late final _CFRunLoopSourceInvalidatePtr = - _lookup>( - 'CFRunLoopSourceInvalidate'); - late final _CFRunLoopSourceInvalidate = _CFRunLoopSourceInvalidatePtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeIsEjectableKey = + _lookup('kCFURLVolumeIsEjectableKey'); - int CFRunLoopSourceIsValid( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceIsValid( - source, - ); - } + CFStringRef get kCFURLVolumeIsEjectableKey => + _kCFURLVolumeIsEjectableKey.value; - late final _CFRunLoopSourceIsValidPtr = - _lookup>( - 'CFRunLoopSourceIsValid'); - late final _CFRunLoopSourceIsValid = - _CFRunLoopSourceIsValidPtr.asFunction(); + set kCFURLVolumeIsEjectableKey(CFStringRef value) => + _kCFURLVolumeIsEjectableKey.value = value; - void CFRunLoopSourceGetContext( - CFRunLoopSourceRef source, - ffi.Pointer context, - ) { - return _CFRunLoopSourceGetContext( - source, - context, - ); - } + late final ffi.Pointer _kCFURLVolumeIsRemovableKey = + _lookup('kCFURLVolumeIsRemovableKey'); - late final _CFRunLoopSourceGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFRunLoopSourceRef, ffi.Pointer)>>( - 'CFRunLoopSourceGetContext'); - late final _CFRunLoopSourceGetContext = - _CFRunLoopSourceGetContextPtr.asFunction< - void Function( - CFRunLoopSourceRef, ffi.Pointer)>(); + CFStringRef get kCFURLVolumeIsRemovableKey => + _kCFURLVolumeIsRemovableKey.value; - void CFRunLoopSourceSignal( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceSignal( - source, - ); - } + set kCFURLVolumeIsRemovableKey(CFStringRef value) => + _kCFURLVolumeIsRemovableKey.value = value; - late final _CFRunLoopSourceSignalPtr = - _lookup>( - 'CFRunLoopSourceSignal'); - late final _CFRunLoopSourceSignal = - _CFRunLoopSourceSignalPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeIsInternalKey = + _lookup('kCFURLVolumeIsInternalKey'); - int CFRunLoopObserverGetTypeID() { - return _CFRunLoopObserverGetTypeID(); - } + CFStringRef get kCFURLVolumeIsInternalKey => _kCFURLVolumeIsInternalKey.value; - late final _CFRunLoopObserverGetTypeIDPtr = - _lookup>( - 'CFRunLoopObserverGetTypeID'); - late final _CFRunLoopObserverGetTypeID = - _CFRunLoopObserverGetTypeIDPtr.asFunction(); + set kCFURLVolumeIsInternalKey(CFStringRef value) => + _kCFURLVolumeIsInternalKey.value = value; - CFRunLoopObserverRef CFRunLoopObserverCreate( - CFAllocatorRef allocator, - int activities, - int repeats, - int order, - CFRunLoopObserverCallBack callout, - ffi.Pointer context, - ) { - return _CFRunLoopObserverCreate( - allocator, - activities, - repeats, - order, - callout, - context, - ); - } + late final ffi.Pointer _kCFURLVolumeIsAutomountedKey = + _lookup('kCFURLVolumeIsAutomountedKey'); - late final _CFRunLoopObserverCreatePtr = _lookup< - ffi.NativeFunction< - CFRunLoopObserverRef Function( - CFAllocatorRef, - CFOptionFlags, - Boolean, - CFIndex, - CFRunLoopObserverCallBack, - ffi.Pointer)>>( - 'CFRunLoopObserverCreate'); - late final _CFRunLoopObserverCreate = _CFRunLoopObserverCreatePtr.asFunction< - CFRunLoopObserverRef Function(CFAllocatorRef, int, int, int, - CFRunLoopObserverCallBack, ffi.Pointer)>(); + CFStringRef get kCFURLVolumeIsAutomountedKey => + _kCFURLVolumeIsAutomountedKey.value; - CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler( - CFAllocatorRef allocator, - int activities, - int repeats, - int order, - ffi.Pointer<_ObjCBlock> block, - ) { - return _CFRunLoopObserverCreateWithHandler( - allocator, - activities, - repeats, - order, - block, - ); - } + set kCFURLVolumeIsAutomountedKey(CFStringRef value) => + _kCFURLVolumeIsAutomountedKey.value = value; - late final _CFRunLoopObserverCreateWithHandlerPtr = _lookup< - ffi.NativeFunction< - CFRunLoopObserverRef Function( - CFAllocatorRef, - CFOptionFlags, - Boolean, - CFIndex, - ffi.Pointer<_ObjCBlock>)>>('CFRunLoopObserverCreateWithHandler'); - late final _CFRunLoopObserverCreateWithHandler = - _CFRunLoopObserverCreateWithHandlerPtr.asFunction< - CFRunLoopObserverRef Function( - CFAllocatorRef, int, int, int, ffi.Pointer<_ObjCBlock>)>(); + late final ffi.Pointer _kCFURLVolumeIsLocalKey = + _lookup('kCFURLVolumeIsLocalKey'); - int CFRunLoopObserverGetActivities( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverGetActivities( - observer, - ); - } + CFStringRef get kCFURLVolumeIsLocalKey => _kCFURLVolumeIsLocalKey.value; - late final _CFRunLoopObserverGetActivitiesPtr = - _lookup>( - 'CFRunLoopObserverGetActivities'); - late final _CFRunLoopObserverGetActivities = - _CFRunLoopObserverGetActivitiesPtr.asFunction< - int Function(CFRunLoopObserverRef)>(); + set kCFURLVolumeIsLocalKey(CFStringRef value) => + _kCFURLVolumeIsLocalKey.value = value; - int CFRunLoopObserverDoesRepeat( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverDoesRepeat( - observer, - ); - } + late final ffi.Pointer _kCFURLVolumeIsReadOnlyKey = + _lookup('kCFURLVolumeIsReadOnlyKey'); - late final _CFRunLoopObserverDoesRepeatPtr = - _lookup>( - 'CFRunLoopObserverDoesRepeat'); - late final _CFRunLoopObserverDoesRepeat = _CFRunLoopObserverDoesRepeatPtr - .asFunction(); + CFStringRef get kCFURLVolumeIsReadOnlyKey => _kCFURLVolumeIsReadOnlyKey.value; - int CFRunLoopObserverGetOrder( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverGetOrder( - observer, - ); - } + set kCFURLVolumeIsReadOnlyKey(CFStringRef value) => + _kCFURLVolumeIsReadOnlyKey.value = value; - late final _CFRunLoopObserverGetOrderPtr = - _lookup>( - 'CFRunLoopObserverGetOrder'); - late final _CFRunLoopObserverGetOrder = _CFRunLoopObserverGetOrderPtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeCreationDateKey = + _lookup('kCFURLVolumeCreationDateKey'); - void CFRunLoopObserverInvalidate( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverInvalidate( - observer, - ); - } + CFStringRef get kCFURLVolumeCreationDateKey => + _kCFURLVolumeCreationDateKey.value; - late final _CFRunLoopObserverInvalidatePtr = - _lookup>( - 'CFRunLoopObserverInvalidate'); - late final _CFRunLoopObserverInvalidate = _CFRunLoopObserverInvalidatePtr - .asFunction(); + set kCFURLVolumeCreationDateKey(CFStringRef value) => + _kCFURLVolumeCreationDateKey.value = value; - int CFRunLoopObserverIsValid( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverIsValid( - observer, - ); - } + late final ffi.Pointer _kCFURLVolumeURLForRemountingKey = + _lookup('kCFURLVolumeURLForRemountingKey'); - late final _CFRunLoopObserverIsValidPtr = - _lookup>( - 'CFRunLoopObserverIsValid'); - late final _CFRunLoopObserverIsValid = _CFRunLoopObserverIsValidPtr - .asFunction(); + CFStringRef get kCFURLVolumeURLForRemountingKey => + _kCFURLVolumeURLForRemountingKey.value; - void CFRunLoopObserverGetContext( - CFRunLoopObserverRef observer, - ffi.Pointer context, - ) { - return _CFRunLoopObserverGetContext( - observer, - context, - ); - } + set kCFURLVolumeURLForRemountingKey(CFStringRef value) => + _kCFURLVolumeURLForRemountingKey.value = value; - late final _CFRunLoopObserverGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopObserverRef, - ffi.Pointer)>>( - 'CFRunLoopObserverGetContext'); - late final _CFRunLoopObserverGetContext = - _CFRunLoopObserverGetContextPtr.asFunction< - void Function( - CFRunLoopObserverRef, ffi.Pointer)>(); + late final ffi.Pointer _kCFURLVolumeUUIDStringKey = + _lookup('kCFURLVolumeUUIDStringKey'); - int CFRunLoopTimerGetTypeID() { - return _CFRunLoopTimerGetTypeID(); - } + CFStringRef get kCFURLVolumeUUIDStringKey => _kCFURLVolumeUUIDStringKey.value; - late final _CFRunLoopTimerGetTypeIDPtr = - _lookup>( - 'CFRunLoopTimerGetTypeID'); - late final _CFRunLoopTimerGetTypeID = - _CFRunLoopTimerGetTypeIDPtr.asFunction(); + set kCFURLVolumeUUIDStringKey(CFStringRef value) => + _kCFURLVolumeUUIDStringKey.value = value; - CFRunLoopTimerRef CFRunLoopTimerCreate( - CFAllocatorRef allocator, - double fireDate, - double interval, - int flags, - int order, - CFRunLoopTimerCallBack callout, - ffi.Pointer context, - ) { - return _CFRunLoopTimerCreate( - allocator, - fireDate, - interval, - flags, - order, - callout, - context, - ); - } + late final ffi.Pointer _kCFURLVolumeNameKey = + _lookup('kCFURLVolumeNameKey'); - late final _CFRunLoopTimerCreatePtr = _lookup< - ffi.NativeFunction< - CFRunLoopTimerRef Function( - CFAllocatorRef, - CFAbsoluteTime, - CFTimeInterval, - CFOptionFlags, - CFIndex, - CFRunLoopTimerCallBack, - ffi.Pointer)>>('CFRunLoopTimerCreate'); - late final _CFRunLoopTimerCreate = _CFRunLoopTimerCreatePtr.asFunction< - CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, - CFRunLoopTimerCallBack, ffi.Pointer)>(); + CFStringRef get kCFURLVolumeNameKey => _kCFURLVolumeNameKey.value; - CFRunLoopTimerRef CFRunLoopTimerCreateWithHandler( - CFAllocatorRef allocator, - double fireDate, - double interval, - int flags, - int order, - ffi.Pointer<_ObjCBlock> block, - ) { - return _CFRunLoopTimerCreateWithHandler( - allocator, - fireDate, - interval, - flags, - order, - block, - ); - } + set kCFURLVolumeNameKey(CFStringRef value) => + _kCFURLVolumeNameKey.value = value; - late final _CFRunLoopTimerCreateWithHandlerPtr = _lookup< - ffi.NativeFunction< - CFRunLoopTimerRef Function( - CFAllocatorRef, - CFAbsoluteTime, - CFTimeInterval, - CFOptionFlags, - CFIndex, - ffi.Pointer<_ObjCBlock>)>>('CFRunLoopTimerCreateWithHandler'); - late final _CFRunLoopTimerCreateWithHandler = - _CFRunLoopTimerCreateWithHandlerPtr.asFunction< - CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, - ffi.Pointer<_ObjCBlock>)>(); + late final ffi.Pointer _kCFURLVolumeLocalizedNameKey = + _lookup('kCFURLVolumeLocalizedNameKey'); - double CFRunLoopTimerGetNextFireDate( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerGetNextFireDate( - timer, - ); - } + CFStringRef get kCFURLVolumeLocalizedNameKey => + _kCFURLVolumeLocalizedNameKey.value; - late final _CFRunLoopTimerGetNextFireDatePtr = - _lookup>( - 'CFRunLoopTimerGetNextFireDate'); - late final _CFRunLoopTimerGetNextFireDate = _CFRunLoopTimerGetNextFireDatePtr - .asFunction(); + set kCFURLVolumeLocalizedNameKey(CFStringRef value) => + _kCFURLVolumeLocalizedNameKey.value = value; - void CFRunLoopTimerSetNextFireDate( - CFRunLoopTimerRef timer, - double fireDate, - ) { - return _CFRunLoopTimerSetNextFireDate( - timer, - fireDate, - ); - } + late final ffi.Pointer _kCFURLVolumeIsEncryptedKey = + _lookup('kCFURLVolumeIsEncryptedKey'); - late final _CFRunLoopTimerSetNextFireDatePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, - CFAbsoluteTime)>>('CFRunLoopTimerSetNextFireDate'); - late final _CFRunLoopTimerSetNextFireDate = _CFRunLoopTimerSetNextFireDatePtr - .asFunction(); + CFStringRef get kCFURLVolumeIsEncryptedKey => + _kCFURLVolumeIsEncryptedKey.value; - double CFRunLoopTimerGetInterval( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerGetInterval( - timer, - ); - } + set kCFURLVolumeIsEncryptedKey(CFStringRef value) => + _kCFURLVolumeIsEncryptedKey.value = value; - late final _CFRunLoopTimerGetIntervalPtr = - _lookup>( - 'CFRunLoopTimerGetInterval'); - late final _CFRunLoopTimerGetInterval = _CFRunLoopTimerGetIntervalPtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeIsRootFileSystemKey = + _lookup('kCFURLVolumeIsRootFileSystemKey'); - int CFRunLoopTimerDoesRepeat( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerDoesRepeat( - timer, - ); - } + CFStringRef get kCFURLVolumeIsRootFileSystemKey => + _kCFURLVolumeIsRootFileSystemKey.value; - late final _CFRunLoopTimerDoesRepeatPtr = - _lookup>( - 'CFRunLoopTimerDoesRepeat'); - late final _CFRunLoopTimerDoesRepeat = _CFRunLoopTimerDoesRepeatPtr - .asFunction(); + set kCFURLVolumeIsRootFileSystemKey(CFStringRef value) => + _kCFURLVolumeIsRootFileSystemKey.value = value; - int CFRunLoopTimerGetOrder( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerGetOrder( - timer, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsCompressionKey = + _lookup('kCFURLVolumeSupportsCompressionKey'); - late final _CFRunLoopTimerGetOrderPtr = - _lookup>( - 'CFRunLoopTimerGetOrder'); - late final _CFRunLoopTimerGetOrder = - _CFRunLoopTimerGetOrderPtr.asFunction(); + CFStringRef get kCFURLVolumeSupportsCompressionKey => + _kCFURLVolumeSupportsCompressionKey.value; - void CFRunLoopTimerInvalidate( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerInvalidate( - timer, - ); - } + set kCFURLVolumeSupportsCompressionKey(CFStringRef value) => + _kCFURLVolumeSupportsCompressionKey.value = value; - late final _CFRunLoopTimerInvalidatePtr = - _lookup>( - 'CFRunLoopTimerInvalidate'); - late final _CFRunLoopTimerInvalidate = _CFRunLoopTimerInvalidatePtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsFileCloningKey = + _lookup('kCFURLVolumeSupportsFileCloningKey'); - int CFRunLoopTimerIsValid( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerIsValid( - timer, - ); - } + CFStringRef get kCFURLVolumeSupportsFileCloningKey => + _kCFURLVolumeSupportsFileCloningKey.value; - late final _CFRunLoopTimerIsValidPtr = - _lookup>( - 'CFRunLoopTimerIsValid'); - late final _CFRunLoopTimerIsValid = - _CFRunLoopTimerIsValidPtr.asFunction(); + set kCFURLVolumeSupportsFileCloningKey(CFStringRef value) => + _kCFURLVolumeSupportsFileCloningKey.value = value; - void CFRunLoopTimerGetContext( - CFRunLoopTimerRef timer, - ffi.Pointer context, - ) { - return _CFRunLoopTimerGetContext( - timer, - context, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsSwapRenamingKey = + _lookup('kCFURLVolumeSupportsSwapRenamingKey'); - late final _CFRunLoopTimerGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, - ffi.Pointer)>>('CFRunLoopTimerGetContext'); - late final _CFRunLoopTimerGetContext = - _CFRunLoopTimerGetContextPtr.asFunction< - void Function( - CFRunLoopTimerRef, ffi.Pointer)>(); + CFStringRef get kCFURLVolumeSupportsSwapRenamingKey => + _kCFURLVolumeSupportsSwapRenamingKey.value; - double CFRunLoopTimerGetTolerance( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerGetTolerance( - timer, - ); - } + set kCFURLVolumeSupportsSwapRenamingKey(CFStringRef value) => + _kCFURLVolumeSupportsSwapRenamingKey.value = value; - late final _CFRunLoopTimerGetTolerancePtr = - _lookup>( - 'CFRunLoopTimerGetTolerance'); - late final _CFRunLoopTimerGetTolerance = _CFRunLoopTimerGetTolerancePtr - .asFunction(); + late final ffi.Pointer + _kCFURLVolumeSupportsExclusiveRenamingKey = + _lookup('kCFURLVolumeSupportsExclusiveRenamingKey'); - void CFRunLoopTimerSetTolerance( - CFRunLoopTimerRef timer, - double tolerance, - ) { - return _CFRunLoopTimerSetTolerance( - timer, - tolerance, - ); - } + CFStringRef get kCFURLVolumeSupportsExclusiveRenamingKey => + _kCFURLVolumeSupportsExclusiveRenamingKey.value; - late final _CFRunLoopTimerSetTolerancePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, - CFTimeInterval)>>('CFRunLoopTimerSetTolerance'); - late final _CFRunLoopTimerSetTolerance = _CFRunLoopTimerSetTolerancePtr - .asFunction(); + set kCFURLVolumeSupportsExclusiveRenamingKey(CFStringRef value) => + _kCFURLVolumeSupportsExclusiveRenamingKey.value = value; - int CFSocketGetTypeID() { - return _CFSocketGetTypeID(); - } + late final ffi.Pointer _kCFURLVolumeSupportsImmutableFilesKey = + _lookup('kCFURLVolumeSupportsImmutableFilesKey'); - late final _CFSocketGetTypeIDPtr = - _lookup>('CFSocketGetTypeID'); - late final _CFSocketGetTypeID = - _CFSocketGetTypeIDPtr.asFunction(); + CFStringRef get kCFURLVolumeSupportsImmutableFilesKey => + _kCFURLVolumeSupportsImmutableFilesKey.value; - CFSocketRef CFSocketCreate( + set kCFURLVolumeSupportsImmutableFilesKey(CFStringRef value) => + _kCFURLVolumeSupportsImmutableFilesKey.value = value; + + late final ffi.Pointer + _kCFURLVolumeSupportsAccessPermissionsKey = + _lookup('kCFURLVolumeSupportsAccessPermissionsKey'); + + CFStringRef get kCFURLVolumeSupportsAccessPermissionsKey => + _kCFURLVolumeSupportsAccessPermissionsKey.value; + + set kCFURLVolumeSupportsAccessPermissionsKey(CFStringRef value) => + _kCFURLVolumeSupportsAccessPermissionsKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsFileProtectionKey = + _lookup('kCFURLVolumeSupportsFileProtectionKey'); + + CFStringRef get kCFURLVolumeSupportsFileProtectionKey => + _kCFURLVolumeSupportsFileProtectionKey.value; + + set kCFURLVolumeSupportsFileProtectionKey(CFStringRef value) => + _kCFURLVolumeSupportsFileProtectionKey.value = value; + + late final ffi.Pointer _kCFURLIsUbiquitousItemKey = + _lookup('kCFURLIsUbiquitousItemKey'); + + CFStringRef get kCFURLIsUbiquitousItemKey => _kCFURLIsUbiquitousItemKey.value; + + set kCFURLIsUbiquitousItemKey(CFStringRef value) => + _kCFURLIsUbiquitousItemKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemHasUnresolvedConflictsKey = + _lookup('kCFURLUbiquitousItemHasUnresolvedConflictsKey'); + + CFStringRef get kCFURLUbiquitousItemHasUnresolvedConflictsKey => + _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value; + + set kCFURLUbiquitousItemHasUnresolvedConflictsKey(CFStringRef value) => + _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadedKey = + _lookup('kCFURLUbiquitousItemIsDownloadedKey'); + + CFStringRef get kCFURLUbiquitousItemIsDownloadedKey => + _kCFURLUbiquitousItemIsDownloadedKey.value; + + set kCFURLUbiquitousItemIsDownloadedKey(CFStringRef value) => + _kCFURLUbiquitousItemIsDownloadedKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadingKey = + _lookup('kCFURLUbiquitousItemIsDownloadingKey'); + + CFStringRef get kCFURLUbiquitousItemIsDownloadingKey => + _kCFURLUbiquitousItemIsDownloadingKey.value; + + set kCFURLUbiquitousItemIsDownloadingKey(CFStringRef value) => + _kCFURLUbiquitousItemIsDownloadingKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsUploadedKey = + _lookup('kCFURLUbiquitousItemIsUploadedKey'); + + CFStringRef get kCFURLUbiquitousItemIsUploadedKey => + _kCFURLUbiquitousItemIsUploadedKey.value; + + set kCFURLUbiquitousItemIsUploadedKey(CFStringRef value) => + _kCFURLUbiquitousItemIsUploadedKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsUploadingKey = + _lookup('kCFURLUbiquitousItemIsUploadingKey'); + + CFStringRef get kCFURLUbiquitousItemIsUploadingKey => + _kCFURLUbiquitousItemIsUploadingKey.value; + + set kCFURLUbiquitousItemIsUploadingKey(CFStringRef value) => + _kCFURLUbiquitousItemIsUploadingKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemPercentDownloadedKey = + _lookup('kCFURLUbiquitousItemPercentDownloadedKey'); + + CFStringRef get kCFURLUbiquitousItemPercentDownloadedKey => + _kCFURLUbiquitousItemPercentDownloadedKey.value; + + set kCFURLUbiquitousItemPercentDownloadedKey(CFStringRef value) => + _kCFURLUbiquitousItemPercentDownloadedKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemPercentUploadedKey = + _lookup('kCFURLUbiquitousItemPercentUploadedKey'); + + CFStringRef get kCFURLUbiquitousItemPercentUploadedKey => + _kCFURLUbiquitousItemPercentUploadedKey.value; + + set kCFURLUbiquitousItemPercentUploadedKey(CFStringRef value) => + _kCFURLUbiquitousItemPercentUploadedKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusKey = + _lookup('kCFURLUbiquitousItemDownloadingStatusKey'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusKey => + _kCFURLUbiquitousItemDownloadingStatusKey.value; + + set kCFURLUbiquitousItemDownloadingStatusKey(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingStatusKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemDownloadingErrorKey = + _lookup('kCFURLUbiquitousItemDownloadingErrorKey'); + + CFStringRef get kCFURLUbiquitousItemDownloadingErrorKey => + _kCFURLUbiquitousItemDownloadingErrorKey.value; + + set kCFURLUbiquitousItemDownloadingErrorKey(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingErrorKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemUploadingErrorKey = + _lookup('kCFURLUbiquitousItemUploadingErrorKey'); + + CFStringRef get kCFURLUbiquitousItemUploadingErrorKey => + _kCFURLUbiquitousItemUploadingErrorKey.value; + + set kCFURLUbiquitousItemUploadingErrorKey(CFStringRef value) => + _kCFURLUbiquitousItemUploadingErrorKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemIsExcludedFromSyncKey = + _lookup('kCFURLUbiquitousItemIsExcludedFromSyncKey'); + + CFStringRef get kCFURLUbiquitousItemIsExcludedFromSyncKey => + _kCFURLUbiquitousItemIsExcludedFromSyncKey.value; + + set kCFURLUbiquitousItemIsExcludedFromSyncKey(CFStringRef value) => + _kCFURLUbiquitousItemIsExcludedFromSyncKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusNotDownloaded = + _lookup( + 'kCFURLUbiquitousItemDownloadingStatusNotDownloaded'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusNotDownloaded => + _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value; + + set kCFURLUbiquitousItemDownloadingStatusNotDownloaded(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusDownloaded = + _lookup('kCFURLUbiquitousItemDownloadingStatusDownloaded'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusDownloaded => + _kCFURLUbiquitousItemDownloadingStatusDownloaded.value; + + set kCFURLUbiquitousItemDownloadingStatusDownloaded(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingStatusDownloaded.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusCurrent = + _lookup('kCFURLUbiquitousItemDownloadingStatusCurrent'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusCurrent => + _kCFURLUbiquitousItemDownloadingStatusCurrent.value; + + set kCFURLUbiquitousItemDownloadingStatusCurrent(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingStatusCurrent.value = value; + + CFDataRef CFURLCreateBookmarkData( CFAllocatorRef allocator, - int protocolFamily, - int socketType, - int protocol, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, + CFURLRef url, + int options, + CFArrayRef resourcePropertiesToInclude, + CFURLRef relativeToURL, + ffi.Pointer error, ) { - return _CFSocketCreate( + return _CFURLCreateBookmarkData( allocator, - protocolFamily, - socketType, - protocol, - callBackTypes, - callout, - context, + url, + options, + resourcePropertiesToInclude, + relativeToURL, + error, ); } - late final _CFSocketCreatePtr = _lookup< + late final _CFURLCreateBookmarkDataPtr = _lookup< ffi.NativeFunction< - CFSocketRef Function( - CFAllocatorRef, - SInt32, - SInt32, - SInt32, - CFOptionFlags, - CFSocketCallBack, - ffi.Pointer)>>('CFSocketCreate'); - late final _CFSocketCreate = _CFSocketCreatePtr.asFunction< - CFSocketRef Function(CFAllocatorRef, int, int, int, int, CFSocketCallBack, - ffi.Pointer)>(); + CFDataRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, CFArrayRef, + CFURLRef, ffi.Pointer)>>('CFURLCreateBookmarkData'); + late final _CFURLCreateBookmarkData = _CFURLCreateBookmarkDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, int, CFArrayRef, CFURLRef, + ffi.Pointer)>(); - CFSocketRef CFSocketCreateWithNative( + CFURLRef CFURLCreateByResolvingBookmarkData( CFAllocatorRef allocator, - int sock, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, + CFDataRef bookmark, + int options, + CFURLRef relativeToURL, + CFArrayRef resourcePropertiesToInclude, + ffi.Pointer isStale, + ffi.Pointer error, ) { - return _CFSocketCreateWithNative( + return _CFURLCreateByResolvingBookmarkData( allocator, - sock, - callBackTypes, - callout, - context, + bookmark, + options, + relativeToURL, + resourcePropertiesToInclude, + isStale, + error, ); } - late final _CFSocketCreateWithNativePtr = _lookup< + late final _CFURLCreateByResolvingBookmarkDataPtr = _lookup< ffi.NativeFunction< - CFSocketRef Function( + CFURLRef Function( CFAllocatorRef, - CFSocketNativeHandle, - CFOptionFlags, - CFSocketCallBack, - ffi.Pointer)>>('CFSocketCreateWithNative'); - late final _CFSocketCreateWithNative = - _CFSocketCreateWithNativePtr.asFunction< - CFSocketRef Function(CFAllocatorRef, int, int, CFSocketCallBack, - ffi.Pointer)>(); + CFDataRef, + ffi.Int32, + CFURLRef, + CFArrayRef, + ffi.Pointer, + ffi.Pointer)>>('CFURLCreateByResolvingBookmarkData'); + late final _CFURLCreateByResolvingBookmarkData = + _CFURLCreateByResolvingBookmarkDataPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFDataRef, int, CFURLRef, + CFArrayRef, ffi.Pointer, ffi.Pointer)>(); - CFSocketRef CFSocketCreateWithSocketSignature( + CFDictionaryRef CFURLCreateResourcePropertiesForKeysFromBookmarkData( CFAllocatorRef allocator, - ffi.Pointer signature, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, + CFArrayRef resourcePropertiesToReturn, + CFDataRef bookmark, ) { - return _CFSocketCreateWithSocketSignature( + return _CFURLCreateResourcePropertiesForKeysFromBookmarkData( allocator, - signature, - callBackTypes, - callout, - context, + resourcePropertiesToReturn, + bookmark, ); } - late final _CFSocketCreateWithSocketSignaturePtr = _lookup< + late final _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr = _lookup< ffi.NativeFunction< - CFSocketRef Function( - CFAllocatorRef, - ffi.Pointer, - CFOptionFlags, - CFSocketCallBack, - ffi.Pointer)>>( - 'CFSocketCreateWithSocketSignature'); - late final _CFSocketCreateWithSocketSignature = - _CFSocketCreateWithSocketSignaturePtr.asFunction< - CFSocketRef Function(CFAllocatorRef, ffi.Pointer, - int, CFSocketCallBack, ffi.Pointer)>(); + CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>>( + 'CFURLCreateResourcePropertiesForKeysFromBookmarkData'); + late final _CFURLCreateResourcePropertiesForKeysFromBookmarkData = + _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>(); - CFSocketRef CFSocketCreateConnectedToSocketSignature( + CFTypeRef CFURLCreateResourcePropertyForKeyFromBookmarkData( CFAllocatorRef allocator, - ffi.Pointer signature, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, - double timeout, + CFStringRef resourcePropertyKey, + CFDataRef bookmark, ) { - return _CFSocketCreateConnectedToSocketSignature( + return _CFURLCreateResourcePropertyForKeyFromBookmarkData( allocator, - signature, - callBackTypes, - callout, - context, - timeout, + resourcePropertyKey, + bookmark, ); } - late final _CFSocketCreateConnectedToSocketSignaturePtr = _lookup< + late final _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr = _lookup< ffi.NativeFunction< - CFSocketRef Function( - CFAllocatorRef, - ffi.Pointer, - CFOptionFlags, - CFSocketCallBack, - ffi.Pointer, - CFTimeInterval)>>('CFSocketCreateConnectedToSocketSignature'); - late final _CFSocketCreateConnectedToSocketSignature = - _CFSocketCreateConnectedToSocketSignaturePtr.asFunction< - CFSocketRef Function(CFAllocatorRef, ffi.Pointer, - int, CFSocketCallBack, ffi.Pointer, double)>(); + CFTypeRef Function(CFAllocatorRef, CFStringRef, + CFDataRef)>>('CFURLCreateResourcePropertyForKeyFromBookmarkData'); + late final _CFURLCreateResourcePropertyForKeyFromBookmarkData = + _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr.asFunction< + CFTypeRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); - int CFSocketSetAddress( - CFSocketRef s, - CFDataRef address, + CFDataRef CFURLCreateBookmarkDataFromFile( + CFAllocatorRef allocator, + CFURLRef fileURL, + ffi.Pointer errorRef, ) { - return _CFSocketSetAddress( - s, - address, + return _CFURLCreateBookmarkDataFromFile( + allocator, + fileURL, + errorRef, ); } - late final _CFSocketSetAddressPtr = - _lookup>( - 'CFSocketSetAddress'); - late final _CFSocketSetAddress = - _CFSocketSetAddressPtr.asFunction(); + late final _CFURLCreateBookmarkDataFromFilePtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, + ffi.Pointer)>>('CFURLCreateBookmarkDataFromFile'); + late final _CFURLCreateBookmarkDataFromFile = + _CFURLCreateBookmarkDataFromFilePtr.asFunction< + CFDataRef Function( + CFAllocatorRef, CFURLRef, ffi.Pointer)>(); - int CFSocketConnectToAddress( - CFSocketRef s, - CFDataRef address, - double timeout, + int CFURLWriteBookmarkDataToFile( + CFDataRef bookmarkRef, + CFURLRef fileURL, + int options, + ffi.Pointer errorRef, ) { - return _CFSocketConnectToAddress( - s, - address, - timeout, + return _CFURLWriteBookmarkDataToFile( + bookmarkRef, + fileURL, + options, + errorRef, ); } - late final _CFSocketConnectToAddressPtr = _lookup< + late final _CFURLWriteBookmarkDataToFilePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFSocketRef, CFDataRef, - CFTimeInterval)>>('CFSocketConnectToAddress'); - late final _CFSocketConnectToAddress = _CFSocketConnectToAddressPtr - .asFunction(); + Boolean Function( + CFDataRef, + CFURLRef, + CFURLBookmarkFileCreationOptions, + ffi.Pointer)>>('CFURLWriteBookmarkDataToFile'); + late final _CFURLWriteBookmarkDataToFile = + _CFURLWriteBookmarkDataToFilePtr.asFunction< + int Function(CFDataRef, CFURLRef, int, ffi.Pointer)>(); - void CFSocketInvalidate( - CFSocketRef s, + CFDataRef CFURLCreateBookmarkDataFromAliasRecord( + CFAllocatorRef allocatorRef, + CFDataRef aliasRecordDataRef, ) { - return _CFSocketInvalidate( - s, + return _CFURLCreateBookmarkDataFromAliasRecord( + allocatorRef, + aliasRecordDataRef, ); } - late final _CFSocketInvalidatePtr = - _lookup>( - 'CFSocketInvalidate'); - late final _CFSocketInvalidate = - _CFSocketInvalidatePtr.asFunction(); + late final _CFURLCreateBookmarkDataFromAliasRecordPtr = _lookup< + ffi.NativeFunction>( + 'CFURLCreateBookmarkDataFromAliasRecord'); + late final _CFURLCreateBookmarkDataFromAliasRecord = + _CFURLCreateBookmarkDataFromAliasRecordPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFDataRef)>(); - int CFSocketIsValid( - CFSocketRef s, + int CFURLStartAccessingSecurityScopedResource( + CFURLRef url, ) { - return _CFSocketIsValid( - s, + return _CFURLStartAccessingSecurityScopedResource( + url, ); } - late final _CFSocketIsValidPtr = - _lookup>( - 'CFSocketIsValid'); - late final _CFSocketIsValid = - _CFSocketIsValidPtr.asFunction(); + late final _CFURLStartAccessingSecurityScopedResourcePtr = + _lookup>( + 'CFURLStartAccessingSecurityScopedResource'); + late final _CFURLStartAccessingSecurityScopedResource = + _CFURLStartAccessingSecurityScopedResourcePtr.asFunction< + int Function(CFURLRef)>(); - CFDataRef CFSocketCopyAddress( - CFSocketRef s, + void CFURLStopAccessingSecurityScopedResource( + CFURLRef url, ) { - return _CFSocketCopyAddress( - s, + return _CFURLStopAccessingSecurityScopedResource( + url, ); } - late final _CFSocketCopyAddressPtr = - _lookup>( - 'CFSocketCopyAddress'); - late final _CFSocketCopyAddress = - _CFSocketCopyAddressPtr.asFunction(); + late final _CFURLStopAccessingSecurityScopedResourcePtr = + _lookup>( + 'CFURLStopAccessingSecurityScopedResource'); + late final _CFURLStopAccessingSecurityScopedResource = + _CFURLStopAccessingSecurityScopedResourcePtr.asFunction< + void Function(CFURLRef)>(); - CFDataRef CFSocketCopyPeerAddress( - CFSocketRef s, + late final ffi.Pointer _kCFRunLoopDefaultMode = + _lookup('kCFRunLoopDefaultMode'); + + CFRunLoopMode get kCFRunLoopDefaultMode => _kCFRunLoopDefaultMode.value; + + set kCFRunLoopDefaultMode(CFRunLoopMode value) => + _kCFRunLoopDefaultMode.value = value; + + late final ffi.Pointer _kCFRunLoopCommonModes = + _lookup('kCFRunLoopCommonModes'); + + CFRunLoopMode get kCFRunLoopCommonModes => _kCFRunLoopCommonModes.value; + + set kCFRunLoopCommonModes(CFRunLoopMode value) => + _kCFRunLoopCommonModes.value = value; + + int CFRunLoopGetTypeID() { + return _CFRunLoopGetTypeID(); + } + + late final _CFRunLoopGetTypeIDPtr = + _lookup>('CFRunLoopGetTypeID'); + late final _CFRunLoopGetTypeID = + _CFRunLoopGetTypeIDPtr.asFunction(); + + CFRunLoopRef CFRunLoopGetCurrent() { + return _CFRunLoopGetCurrent(); + } + + late final _CFRunLoopGetCurrentPtr = + _lookup>( + 'CFRunLoopGetCurrent'); + late final _CFRunLoopGetCurrent = + _CFRunLoopGetCurrentPtr.asFunction(); + + CFRunLoopRef CFRunLoopGetMain() { + return _CFRunLoopGetMain(); + } + + late final _CFRunLoopGetMainPtr = + _lookup>('CFRunLoopGetMain'); + late final _CFRunLoopGetMain = + _CFRunLoopGetMainPtr.asFunction(); + + CFRunLoopMode CFRunLoopCopyCurrentMode( + CFRunLoopRef rl, ) { - return _CFSocketCopyPeerAddress( - s, + return _CFRunLoopCopyCurrentMode( + rl, ); } - late final _CFSocketCopyPeerAddressPtr = - _lookup>( - 'CFSocketCopyPeerAddress'); - late final _CFSocketCopyPeerAddress = - _CFSocketCopyPeerAddressPtr.asFunction(); + late final _CFRunLoopCopyCurrentModePtr = + _lookup>( + 'CFRunLoopCopyCurrentMode'); + late final _CFRunLoopCopyCurrentMode = _CFRunLoopCopyCurrentModePtr + .asFunction(); - void CFSocketGetContext( - CFSocketRef s, - ffi.Pointer context, + CFArrayRef CFRunLoopCopyAllModes( + CFRunLoopRef rl, ) { - return _CFSocketGetContext( - s, - context, + return _CFRunLoopCopyAllModes( + rl, ); } - late final _CFSocketGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFSocketRef, - ffi.Pointer)>>('CFSocketGetContext'); - late final _CFSocketGetContext = _CFSocketGetContextPtr.asFunction< - void Function(CFSocketRef, ffi.Pointer)>(); + late final _CFRunLoopCopyAllModesPtr = + _lookup>( + 'CFRunLoopCopyAllModes'); + late final _CFRunLoopCopyAllModes = + _CFRunLoopCopyAllModesPtr.asFunction(); - int CFSocketGetNative( - CFSocketRef s, + void CFRunLoopAddCommonMode( + CFRunLoopRef rl, + CFRunLoopMode mode, ) { - return _CFSocketGetNative( - s, + return _CFRunLoopAddCommonMode( + rl, + mode, ); } - late final _CFSocketGetNativePtr = - _lookup>( - 'CFSocketGetNative'); - late final _CFSocketGetNative = - _CFSocketGetNativePtr.asFunction(); + late final _CFRunLoopAddCommonModePtr = _lookup< + ffi.NativeFunction>( + 'CFRunLoopAddCommonMode'); + late final _CFRunLoopAddCommonMode = _CFRunLoopAddCommonModePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopMode)>(); - CFRunLoopSourceRef CFSocketCreateRunLoopSource( - CFAllocatorRef allocator, - CFSocketRef s, - int order, + double CFRunLoopGetNextTimerFireDate( + CFRunLoopRef rl, + CFRunLoopMode mode, ) { - return _CFSocketCreateRunLoopSource( - allocator, - s, - order, + return _CFRunLoopGetNextTimerFireDate( + rl, + mode, ); } - late final _CFSocketCreateRunLoopSourcePtr = _lookup< + late final _CFRunLoopGetNextTimerFireDatePtr = _lookup< ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, - CFIndex)>>('CFSocketCreateRunLoopSource'); - late final _CFSocketCreateRunLoopSource = - _CFSocketCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, int)>(); + CFAbsoluteTime Function( + CFRunLoopRef, CFRunLoopMode)>>('CFRunLoopGetNextTimerFireDate'); + late final _CFRunLoopGetNextTimerFireDate = _CFRunLoopGetNextTimerFireDatePtr + .asFunction(); - int CFSocketGetSocketFlags( - CFSocketRef s, - ) { - return _CFSocketGetSocketFlags( - s, - ); + void CFRunLoopRun() { + return _CFRunLoopRun(); } - late final _CFSocketGetSocketFlagsPtr = - _lookup>( - 'CFSocketGetSocketFlags'); - late final _CFSocketGetSocketFlags = - _CFSocketGetSocketFlagsPtr.asFunction(); + late final _CFRunLoopRunPtr = + _lookup>('CFRunLoopRun'); + late final _CFRunLoopRun = _CFRunLoopRunPtr.asFunction(); - void CFSocketSetSocketFlags( - CFSocketRef s, - int flags, + int CFRunLoopRunInMode( + CFRunLoopMode mode, + double seconds, + int returnAfterSourceHandled, ) { - return _CFSocketSetSocketFlags( - s, - flags, + return _CFRunLoopRunInMode( + mode, + seconds, + returnAfterSourceHandled, ); } - late final _CFSocketSetSocketFlagsPtr = _lookup< - ffi.NativeFunction>( - 'CFSocketSetSocketFlags'); - late final _CFSocketSetSocketFlags = - _CFSocketSetSocketFlagsPtr.asFunction(); + late final _CFRunLoopRunInModePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + CFRunLoopMode, CFTimeInterval, Boolean)>>('CFRunLoopRunInMode'); + late final _CFRunLoopRunInMode = _CFRunLoopRunInModePtr.asFunction< + int Function(CFRunLoopMode, double, int)>(); - void CFSocketDisableCallBacks( - CFSocketRef s, - int callBackTypes, + int CFRunLoopIsWaiting( + CFRunLoopRef rl, ) { - return _CFSocketDisableCallBacks( - s, - callBackTypes, + return _CFRunLoopIsWaiting( + rl, ); } - late final _CFSocketDisableCallBacksPtr = _lookup< - ffi.NativeFunction>( - 'CFSocketDisableCallBacks'); - late final _CFSocketDisableCallBacks = _CFSocketDisableCallBacksPtr - .asFunction(); + late final _CFRunLoopIsWaitingPtr = + _lookup>( + 'CFRunLoopIsWaiting'); + late final _CFRunLoopIsWaiting = + _CFRunLoopIsWaitingPtr.asFunction(); - void CFSocketEnableCallBacks( - CFSocketRef s, - int callBackTypes, + void CFRunLoopWakeUp( + CFRunLoopRef rl, ) { - return _CFSocketEnableCallBacks( - s, - callBackTypes, + return _CFRunLoopWakeUp( + rl, ); } - late final _CFSocketEnableCallBacksPtr = _lookup< - ffi.NativeFunction>( - 'CFSocketEnableCallBacks'); - late final _CFSocketEnableCallBacks = - _CFSocketEnableCallBacksPtr.asFunction(); + late final _CFRunLoopWakeUpPtr = + _lookup>( + 'CFRunLoopWakeUp'); + late final _CFRunLoopWakeUp = + _CFRunLoopWakeUpPtr.asFunction(); - int CFSocketSendData( - CFSocketRef s, - CFDataRef address, - CFDataRef data, - double timeout, + void CFRunLoopStop( + CFRunLoopRef rl, ) { - return _CFSocketSendData( - s, - address, - data, - timeout, + return _CFRunLoopStop( + rl, ); } - late final _CFSocketSendDataPtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(CFSocketRef, CFDataRef, CFDataRef, - CFTimeInterval)>>('CFSocketSendData'); - late final _CFSocketSendData = _CFSocketSendDataPtr.asFunction< - int Function(CFSocketRef, CFDataRef, CFDataRef, double)>(); + late final _CFRunLoopStopPtr = + _lookup>( + 'CFRunLoopStop'); + late final _CFRunLoopStop = + _CFRunLoopStopPtr.asFunction(); - int CFSocketRegisterValue( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - CFPropertyListRef value, + void CFRunLoopPerformBlock( + CFRunLoopRef rl, + CFTypeRef mode, + ffi.Pointer<_ObjCBlock> block, ) { - return _CFSocketRegisterValue( - nameServerSignature, - timeout, - name, - value, + return _CFRunLoopPerformBlock( + rl, + mode, + block, ); } - late final _CFSocketRegisterValuePtr = _lookup< + late final _CFRunLoopPerformBlockPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, CFTimeInterval, - CFStringRef, CFPropertyListRef)>>('CFSocketRegisterValue'); - late final _CFSocketRegisterValue = _CFSocketRegisterValuePtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef, - CFPropertyListRef)>(); + ffi.Void Function(CFRunLoopRef, CFTypeRef, + ffi.Pointer<_ObjCBlock>)>>('CFRunLoopPerformBlock'); + late final _CFRunLoopPerformBlock = _CFRunLoopPerformBlockPtr.asFunction< + void Function(CFRunLoopRef, CFTypeRef, ffi.Pointer<_ObjCBlock>)>(); - int CFSocketCopyRegisteredValue( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - ffi.Pointer value, - ffi.Pointer nameServerAddress, + int CFRunLoopContainsSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, ) { - return _CFSocketCopyRegisteredValue( - nameServerSignature, - timeout, - name, - value, - nameServerAddress, + return _CFRunLoopContainsSource( + rl, + source, + mode, ); } - late final _CFSocketCopyRegisteredValuePtr = _lookup< + late final _CFRunLoopContainsSourcePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - CFTimeInterval, - CFStringRef, - ffi.Pointer, - ffi.Pointer)>>('CFSocketCopyRegisteredValue'); - late final _CFSocketCopyRegisteredValue = - _CFSocketCopyRegisteredValuePtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef, - ffi.Pointer, ffi.Pointer)>(); + Boolean Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopContainsSource'); + late final _CFRunLoopContainsSource = _CFRunLoopContainsSourcePtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); - int CFSocketRegisterSocketSignature( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - ffi.Pointer signature, + void CFRunLoopAddSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, ) { - return _CFSocketRegisterSocketSignature( - nameServerSignature, - timeout, - name, - signature, + return _CFRunLoopAddSource( + rl, + source, + mode, ); } - late final _CFSocketRegisterSocketSignaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, CFTimeInterval, - CFStringRef, ffi.Pointer)>>( - 'CFSocketRegisterSocketSignature'); - late final _CFSocketRegisterSocketSignature = - _CFSocketRegisterSocketSignaturePtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef, - ffi.Pointer)>(); + late final _CFRunLoopAddSourcePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopAddSource'); + late final _CFRunLoopAddSource = _CFRunLoopAddSourcePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); - int CFSocketCopyRegisteredSocketSignature( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - ffi.Pointer signature, - ffi.Pointer nameServerAddress, + void CFRunLoopRemoveSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, ) { - return _CFSocketCopyRegisteredSocketSignature( - nameServerSignature, - timeout, - name, - signature, - nameServerAddress, + return _CFRunLoopRemoveSource( + rl, + source, + mode, ); } - late final _CFSocketCopyRegisteredSocketSignaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - CFTimeInterval, - CFStringRef, - ffi.Pointer, - ffi.Pointer)>>( - 'CFSocketCopyRegisteredSocketSignature'); - late final _CFSocketCopyRegisteredSocketSignature = - _CFSocketCopyRegisteredSocketSignaturePtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef, - ffi.Pointer, ffi.Pointer)>(); + late final _CFRunLoopRemoveSourcePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopRemoveSource'); + late final _CFRunLoopRemoveSource = _CFRunLoopRemoveSourcePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); - int CFSocketUnregister( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, + int CFRunLoopContainsObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, ) { - return _CFSocketUnregister( - nameServerSignature, - timeout, - name, + return _CFRunLoopContainsObserver( + rl, + observer, + mode, ); } - late final _CFSocketUnregisterPtr = _lookup< + late final _CFRunLoopContainsObserverPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, CFTimeInterval, - CFStringRef)>>('CFSocketUnregister'); - late final _CFSocketUnregister = _CFSocketUnregisterPtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef)>(); + Boolean Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopContainsObserver'); + late final _CFRunLoopContainsObserver = + _CFRunLoopContainsObserverPtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); - void CFSocketSetDefaultNameRegistryPortNumber( - int port, + void CFRunLoopAddObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, ) { - return _CFSocketSetDefaultNameRegistryPortNumber( - port, + return _CFRunLoopAddObserver( + rl, + observer, + mode, ); } - late final _CFSocketSetDefaultNameRegistryPortNumberPtr = - _lookup>( - 'CFSocketSetDefaultNameRegistryPortNumber'); - late final _CFSocketSetDefaultNameRegistryPortNumber = - _CFSocketSetDefaultNameRegistryPortNumberPtr.asFunction< - void Function(int)>(); + late final _CFRunLoopAddObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopAddObserver'); + late final _CFRunLoopAddObserver = _CFRunLoopAddObserverPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); - int CFSocketGetDefaultNameRegistryPortNumber() { - return _CFSocketGetDefaultNameRegistryPortNumber(); + void CFRunLoopRemoveObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, + ) { + return _CFRunLoopRemoveObserver( + rl, + observer, + mode, + ); } - late final _CFSocketGetDefaultNameRegistryPortNumberPtr = - _lookup>( - 'CFSocketGetDefaultNameRegistryPortNumber'); - late final _CFSocketGetDefaultNameRegistryPortNumber = - _CFSocketGetDefaultNameRegistryPortNumberPtr.asFunction(); + late final _CFRunLoopRemoveObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopRemoveObserver'); + late final _CFRunLoopRemoveObserver = _CFRunLoopRemoveObserverPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); - late final ffi.Pointer _kCFSocketCommandKey = - _lookup('kCFSocketCommandKey'); - - CFStringRef get kCFSocketCommandKey => _kCFSocketCommandKey.value; - - set kCFSocketCommandKey(CFStringRef value) => - _kCFSocketCommandKey.value = value; - - late final ffi.Pointer _kCFSocketNameKey = - _lookup('kCFSocketNameKey'); - - CFStringRef get kCFSocketNameKey => _kCFSocketNameKey.value; - - set kCFSocketNameKey(CFStringRef value) => _kCFSocketNameKey.value = value; - - late final ffi.Pointer _kCFSocketValueKey = - _lookup('kCFSocketValueKey'); - - CFStringRef get kCFSocketValueKey => _kCFSocketValueKey.value; - - set kCFSocketValueKey(CFStringRef value) => _kCFSocketValueKey.value = value; - - late final ffi.Pointer _kCFSocketResultKey = - _lookup('kCFSocketResultKey'); - - CFStringRef get kCFSocketResultKey => _kCFSocketResultKey.value; - - set kCFSocketResultKey(CFStringRef value) => - _kCFSocketResultKey.value = value; - - late final ffi.Pointer _kCFSocketErrorKey = - _lookup('kCFSocketErrorKey'); - - CFStringRef get kCFSocketErrorKey => _kCFSocketErrorKey.value; - - set kCFSocketErrorKey(CFStringRef value) => _kCFSocketErrorKey.value = value; - - late final ffi.Pointer _kCFSocketRegisterCommand = - _lookup('kCFSocketRegisterCommand'); - - CFStringRef get kCFSocketRegisterCommand => _kCFSocketRegisterCommand.value; - - set kCFSocketRegisterCommand(CFStringRef value) => - _kCFSocketRegisterCommand.value = value; - - late final ffi.Pointer _kCFSocketRetrieveCommand = - _lookup('kCFSocketRetrieveCommand'); - - CFStringRef get kCFSocketRetrieveCommand => _kCFSocketRetrieveCommand.value; - - set kCFSocketRetrieveCommand(CFStringRef value) => - _kCFSocketRetrieveCommand.value = value; - - int getattrlistbulk( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + int CFRunLoopContainsTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, ) { - return _getattrlistbulk( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFRunLoopContainsTimer( + rl, + timer, + mode, ); } - late final _getattrlistbulkPtr = _lookup< + late final _CFRunLoopContainsTimerPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer, ffi.Size, ffi.Uint64)>>('getattrlistbulk'); - late final _getattrlistbulk = _getattrlistbulkPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer, int, int)>(); + Boolean Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopContainsTimer'); + late final _CFRunLoopContainsTimer = _CFRunLoopContainsTimerPtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); - int getattrlistat( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - int arg4, - int arg5, + void CFRunLoopAddTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, ) { - return _getattrlistat( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _CFRunLoopAddTimer( + rl, + timer, + mode, ); } - late final _getattrlistatPtr = _lookup< + late final _CFRunLoopAddTimerPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedLong)>>('getattrlistat'); - late final _getattrlistat = _getattrlistatPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopAddTimer'); + late final _CFRunLoopAddTimer = _CFRunLoopAddTimerPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); - int setattrlistat( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - int arg4, - int arg5, + void CFRunLoopRemoveTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, ) { - return _setattrlistat( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _CFRunLoopRemoveTimer( + rl, + timer, + mode, ); } - late final _setattrlistatPtr = _lookup< + late final _CFRunLoopRemoveTimerPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Uint32)>>('setattrlistat'); - late final _setattrlistat = _setattrlistatPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopRemoveTimer'); + late final _CFRunLoopRemoveTimer = _CFRunLoopRemoveTimerPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); - int faccessat( - int arg0, - ffi.Pointer arg1, - int arg2, - int arg3, - ) { - return _faccessat( - arg0, - arg1, - arg2, - arg3, - ); + int CFRunLoopSourceGetTypeID() { + return _CFRunLoopSourceGetTypeID(); } - late final _faccessatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int, ffi.Int)>>('faccessat'); - late final _faccessat = _faccessatPtr - .asFunction, int, int)>(); + late final _CFRunLoopSourceGetTypeIDPtr = + _lookup>( + 'CFRunLoopSourceGetTypeID'); + late final _CFRunLoopSourceGetTypeID = + _CFRunLoopSourceGetTypeIDPtr.asFunction(); - int fchownat( - int arg0, - ffi.Pointer arg1, - int arg2, - int arg3, - int arg4, + CFRunLoopSourceRef CFRunLoopSourceCreate( + CFAllocatorRef allocator, + int order, + ffi.Pointer context, ) { - return _fchownat( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFRunLoopSourceCreate( + allocator, + order, + context, ); } - late final _fchownatPtr = _lookup< + late final _CFRunLoopSourceCreatePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, uid_t, gid_t, - ffi.Int)>>('fchownat'); - late final _fchownat = _fchownatPtr - .asFunction, int, int, int)>(); + CFRunLoopSourceRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFRunLoopSourceCreate'); + late final _CFRunLoopSourceCreate = _CFRunLoopSourceCreatePtr.asFunction< + CFRunLoopSourceRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - int linkat( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, - int arg4, + int CFRunLoopSourceGetOrder( + CFRunLoopSourceRef source, ) { - return _linkat( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFRunLoopSourceGetOrder( + source, ); } - late final _linkatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Pointer, ffi.Int)>>('linkat'); - late final _linkat = _linkatPtr.asFunction< - int Function( - int, ffi.Pointer, int, ffi.Pointer, int)>(); + late final _CFRunLoopSourceGetOrderPtr = + _lookup>( + 'CFRunLoopSourceGetOrder'); + late final _CFRunLoopSourceGetOrder = _CFRunLoopSourceGetOrderPtr.asFunction< + int Function(CFRunLoopSourceRef)>(); - int readlinkat( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, + void CFRunLoopSourceInvalidate( + CFRunLoopSourceRef source, ) { - return _readlinkat( - arg0, - arg1, - arg2, - arg3, + return _CFRunLoopSourceInvalidate( + source, ); } - late final _readlinkatPtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Int, ffi.Pointer, - ffi.Pointer, ffi.Size)>>('readlinkat'); - late final _readlinkat = _readlinkatPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, int)>(); + late final _CFRunLoopSourceInvalidatePtr = + _lookup>( + 'CFRunLoopSourceInvalidate'); + late final _CFRunLoopSourceInvalidate = _CFRunLoopSourceInvalidatePtr + .asFunction(); - int symlinkat( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + int CFRunLoopSourceIsValid( + CFRunLoopSourceRef source, ) { - return _symlinkat( - arg0, - arg1, - arg2, + return _CFRunLoopSourceIsValid( + source, ); } - late final _symlinkatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer)>>('symlinkat'); - late final _symlinkat = _symlinkatPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); + late final _CFRunLoopSourceIsValidPtr = + _lookup>( + 'CFRunLoopSourceIsValid'); + late final _CFRunLoopSourceIsValid = + _CFRunLoopSourceIsValidPtr.asFunction(); - int unlinkat( - int arg0, - ffi.Pointer arg1, - int arg2, + void CFRunLoopSourceGetContext( + CFRunLoopSourceRef source, + ffi.Pointer context, ) { - return _unlinkat( - arg0, - arg1, - arg2, + return _CFRunLoopSourceGetContext( + source, + context, ); } - late final _unlinkatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int)>>('unlinkat'); - late final _unlinkat = - _unlinkatPtr.asFunction, int)>(); + late final _CFRunLoopSourceGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFRunLoopSourceRef, ffi.Pointer)>>( + 'CFRunLoopSourceGetContext'); + late final _CFRunLoopSourceGetContext = + _CFRunLoopSourceGetContextPtr.asFunction< + void Function( + CFRunLoopSourceRef, ffi.Pointer)>(); - void _exit( - int arg0, + void CFRunLoopSourceSignal( + CFRunLoopSourceRef source, ) { - return __exit( - arg0, + return _CFRunLoopSourceSignal( + source, ); } - late final __exitPtr = - _lookup>('_exit'); - late final __exit = __exitPtr.asFunction(); + late final _CFRunLoopSourceSignalPtr = + _lookup>( + 'CFRunLoopSourceSignal'); + late final _CFRunLoopSourceSignal = + _CFRunLoopSourceSignalPtr.asFunction(); - int access( - ffi.Pointer arg0, - int arg1, - ) { - return _access( - arg0, - arg1, - ); + int CFRunLoopObserverGetTypeID() { + return _CFRunLoopObserverGetTypeID(); } - late final _accessPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'access'); - late final _access = - _accessPtr.asFunction, int)>(); + late final _CFRunLoopObserverGetTypeIDPtr = + _lookup>( + 'CFRunLoopObserverGetTypeID'); + late final _CFRunLoopObserverGetTypeID = + _CFRunLoopObserverGetTypeIDPtr.asFunction(); - int alarm( - int arg0, + CFRunLoopObserverRef CFRunLoopObserverCreate( + CFAllocatorRef allocator, + int activities, + int repeats, + int order, + CFRunLoopObserverCallBack callout, + ffi.Pointer context, ) { - return _alarm( - arg0, + return _CFRunLoopObserverCreate( + allocator, + activities, + repeats, + order, + callout, + context, ); } - late final _alarmPtr = - _lookup>( - 'alarm'); - late final _alarm = _alarmPtr.asFunction(); + late final _CFRunLoopObserverCreatePtr = _lookup< + ffi.NativeFunction< + CFRunLoopObserverRef Function( + CFAllocatorRef, + CFOptionFlags, + Boolean, + CFIndex, + CFRunLoopObserverCallBack, + ffi.Pointer)>>( + 'CFRunLoopObserverCreate'); + late final _CFRunLoopObserverCreate = _CFRunLoopObserverCreatePtr.asFunction< + CFRunLoopObserverRef Function(CFAllocatorRef, int, int, int, + CFRunLoopObserverCallBack, ffi.Pointer)>(); - int chdir( - ffi.Pointer arg0, + CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler( + CFAllocatorRef allocator, + int activities, + int repeats, + int order, + ffi.Pointer<_ObjCBlock> block, ) { - return _chdir( - arg0, + return _CFRunLoopObserverCreateWithHandler( + allocator, + activities, + repeats, + order, + block, ); } - late final _chdirPtr = - _lookup)>>( - 'chdir'); - late final _chdir = - _chdirPtr.asFunction)>(); + late final _CFRunLoopObserverCreateWithHandlerPtr = _lookup< + ffi.NativeFunction< + CFRunLoopObserverRef Function( + CFAllocatorRef, + CFOptionFlags, + Boolean, + CFIndex, + ffi.Pointer<_ObjCBlock>)>>('CFRunLoopObserverCreateWithHandler'); + late final _CFRunLoopObserverCreateWithHandler = + _CFRunLoopObserverCreateWithHandlerPtr.asFunction< + CFRunLoopObserverRef Function( + CFAllocatorRef, int, int, int, ffi.Pointer<_ObjCBlock>)>(); - int chown( - ffi.Pointer arg0, - int arg1, - int arg2, + int CFRunLoopObserverGetActivities( + CFRunLoopObserverRef observer, ) { - return _chown( - arg0, - arg1, - arg2, + return _CFRunLoopObserverGetActivities( + observer, ); } - late final _chownPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('chown'); - late final _chown = - _chownPtr.asFunction, int, int)>(); + late final _CFRunLoopObserverGetActivitiesPtr = + _lookup>( + 'CFRunLoopObserverGetActivities'); + late final _CFRunLoopObserverGetActivities = + _CFRunLoopObserverGetActivitiesPtr.asFunction< + int Function(CFRunLoopObserverRef)>(); - int close( - int arg0, + int CFRunLoopObserverDoesRepeat( + CFRunLoopObserverRef observer, ) { - return _close( - arg0, + return _CFRunLoopObserverDoesRepeat( + observer, ); } - late final _closePtr = - _lookup>('close'); - late final _close = _closePtr.asFunction(); + late final _CFRunLoopObserverDoesRepeatPtr = + _lookup>( + 'CFRunLoopObserverDoesRepeat'); + late final _CFRunLoopObserverDoesRepeat = _CFRunLoopObserverDoesRepeatPtr + .asFunction(); - int dup( - int arg0, + int CFRunLoopObserverGetOrder( + CFRunLoopObserverRef observer, ) { - return _dup( - arg0, + return _CFRunLoopObserverGetOrder( + observer, ); } - late final _dupPtr = - _lookup>('dup'); - late final _dup = _dupPtr.asFunction(); + late final _CFRunLoopObserverGetOrderPtr = + _lookup>( + 'CFRunLoopObserverGetOrder'); + late final _CFRunLoopObserverGetOrder = _CFRunLoopObserverGetOrderPtr + .asFunction(); - int dup2( - int arg0, - int arg1, + void CFRunLoopObserverInvalidate( + CFRunLoopObserverRef observer, ) { - return _dup2( - arg0, - arg1, + return _CFRunLoopObserverInvalidate( + observer, ); } - late final _dup2Ptr = - _lookup>('dup2'); - late final _dup2 = _dup2Ptr.asFunction(); + late final _CFRunLoopObserverInvalidatePtr = + _lookup>( + 'CFRunLoopObserverInvalidate'); + late final _CFRunLoopObserverInvalidate = _CFRunLoopObserverInvalidatePtr + .asFunction(); - int execl( - ffi.Pointer __path, - ffi.Pointer __arg0, + int CFRunLoopObserverIsValid( + CFRunLoopObserverRef observer, ) { - return _execl( - __path, - __arg0, + return _CFRunLoopObserverIsValid( + observer, ); } - late final _execlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('execl'); - late final _execl = _execlPtr - .asFunction, ffi.Pointer)>(); + late final _CFRunLoopObserverIsValidPtr = + _lookup>( + 'CFRunLoopObserverIsValid'); + late final _CFRunLoopObserverIsValid = _CFRunLoopObserverIsValidPtr + .asFunction(); - int execle( - ffi.Pointer __path, - ffi.Pointer __arg0, + void CFRunLoopObserverGetContext( + CFRunLoopObserverRef observer, + ffi.Pointer context, ) { - return _execle( - __path, - __arg0, + return _CFRunLoopObserverGetContext( + observer, + context, ); } - late final _execlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('execle'); - late final _execle = _execlePtr - .asFunction, ffi.Pointer)>(); + late final _CFRunLoopObserverGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef, + ffi.Pointer)>>( + 'CFRunLoopObserverGetContext'); + late final _CFRunLoopObserverGetContext = + _CFRunLoopObserverGetContextPtr.asFunction< + void Function( + CFRunLoopObserverRef, ffi.Pointer)>(); - int execlp( - ffi.Pointer __file, - ffi.Pointer __arg0, - ) { - return _execlp( - __file, - __arg0, - ); + int CFRunLoopTimerGetTypeID() { + return _CFRunLoopTimerGetTypeID(); } - late final _execlpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('execlp'); - late final _execlp = _execlpPtr - .asFunction, ffi.Pointer)>(); + late final _CFRunLoopTimerGetTypeIDPtr = + _lookup>( + 'CFRunLoopTimerGetTypeID'); + late final _CFRunLoopTimerGetTypeID = + _CFRunLoopTimerGetTypeIDPtr.asFunction(); - int execv( - ffi.Pointer __path, - ffi.Pointer> __argv, + CFRunLoopTimerRef CFRunLoopTimerCreate( + CFAllocatorRef allocator, + double fireDate, + double interval, + int flags, + int order, + CFRunLoopTimerCallBack callout, + ffi.Pointer context, ) { - return _execv( - __path, - __argv, + return _CFRunLoopTimerCreate( + allocator, + fireDate, + interval, + flags, + order, + callout, + context, ); } - late final _execvPtr = _lookup< + late final _CFRunLoopTimerCreatePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('execv'); - late final _execv = _execvPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); + CFRunLoopTimerRef Function( + CFAllocatorRef, + CFAbsoluteTime, + CFTimeInterval, + CFOptionFlags, + CFIndex, + CFRunLoopTimerCallBack, + ffi.Pointer)>>('CFRunLoopTimerCreate'); + late final _CFRunLoopTimerCreate = _CFRunLoopTimerCreatePtr.asFunction< + CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, + CFRunLoopTimerCallBack, ffi.Pointer)>(); - int execve( - ffi.Pointer __file, - ffi.Pointer> __argv, - ffi.Pointer> __envp, + CFRunLoopTimerRef CFRunLoopTimerCreateWithHandler( + CFAllocatorRef allocator, + double fireDate, + double interval, + int flags, + int order, + ffi.Pointer<_ObjCBlock> block, ) { - return _execve( - __file, - __argv, - __envp, + return _CFRunLoopTimerCreateWithHandler( + allocator, + fireDate, + interval, + flags, + order, + block, ); } - late final _execvePtr = _lookup< + late final _CFRunLoopTimerCreateWithHandlerPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('execve'); - late final _execve = _execvePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer>, - ffi.Pointer>)>(); + CFRunLoopTimerRef Function( + CFAllocatorRef, + CFAbsoluteTime, + CFTimeInterval, + CFOptionFlags, + CFIndex, + ffi.Pointer<_ObjCBlock>)>>('CFRunLoopTimerCreateWithHandler'); + late final _CFRunLoopTimerCreateWithHandler = + _CFRunLoopTimerCreateWithHandlerPtr.asFunction< + CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, + ffi.Pointer<_ObjCBlock>)>(); - int execvp( - ffi.Pointer __file, - ffi.Pointer> __argv, + double CFRunLoopTimerGetNextFireDate( + CFRunLoopTimerRef timer, ) { - return _execvp( - __file, - __argv, + return _CFRunLoopTimerGetNextFireDate( + timer, ); } - late final _execvpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('execvp'); - late final _execvp = _execvpPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); + late final _CFRunLoopTimerGetNextFireDatePtr = + _lookup>( + 'CFRunLoopTimerGetNextFireDate'); + late final _CFRunLoopTimerGetNextFireDate = _CFRunLoopTimerGetNextFireDatePtr + .asFunction(); - int fork() { - return _fork(); + void CFRunLoopTimerSetNextFireDate( + CFRunLoopTimerRef timer, + double fireDate, + ) { + return _CFRunLoopTimerSetNextFireDate( + timer, + fireDate, + ); } - late final _forkPtr = _lookup>('fork'); - late final _fork = _forkPtr.asFunction(); + late final _CFRunLoopTimerSetNextFireDatePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopTimerRef, + CFAbsoluteTime)>>('CFRunLoopTimerSetNextFireDate'); + late final _CFRunLoopTimerSetNextFireDate = _CFRunLoopTimerSetNextFireDatePtr + .asFunction(); - int fpathconf( - int arg0, - int arg1, + double CFRunLoopTimerGetInterval( + CFRunLoopTimerRef timer, ) { - return _fpathconf( - arg0, - arg1, + return _CFRunLoopTimerGetInterval( + timer, ); } - late final _fpathconfPtr = - _lookup>( - 'fpathconf'); - late final _fpathconf = _fpathconfPtr.asFunction(); + late final _CFRunLoopTimerGetIntervalPtr = + _lookup>( + 'CFRunLoopTimerGetInterval'); + late final _CFRunLoopTimerGetInterval = _CFRunLoopTimerGetIntervalPtr + .asFunction(); - ffi.Pointer getcwd( - ffi.Pointer arg0, - int arg1, + int CFRunLoopTimerDoesRepeat( + CFRunLoopTimerRef timer, ) { - return _getcwd( - arg0, - arg1, + return _CFRunLoopTimerDoesRepeat( + timer, ); } - late final _getcwdPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('getcwd'); - late final _getcwd = _getcwdPtr - .asFunction Function(ffi.Pointer, int)>(); + late final _CFRunLoopTimerDoesRepeatPtr = + _lookup>( + 'CFRunLoopTimerDoesRepeat'); + late final _CFRunLoopTimerDoesRepeat = _CFRunLoopTimerDoesRepeatPtr + .asFunction(); - int getegid() { - return _getegid(); + int CFRunLoopTimerGetOrder( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerGetOrder( + timer, + ); } - late final _getegidPtr = - _lookup>('getegid'); - late final _getegid = _getegidPtr.asFunction(); + late final _CFRunLoopTimerGetOrderPtr = + _lookup>( + 'CFRunLoopTimerGetOrder'); + late final _CFRunLoopTimerGetOrder = + _CFRunLoopTimerGetOrderPtr.asFunction(); - int geteuid() { - return _geteuid(); + void CFRunLoopTimerInvalidate( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerInvalidate( + timer, + ); } - late final _geteuidPtr = - _lookup>('geteuid'); - late final _geteuid = _geteuidPtr.asFunction(); + late final _CFRunLoopTimerInvalidatePtr = + _lookup>( + 'CFRunLoopTimerInvalidate'); + late final _CFRunLoopTimerInvalidate = _CFRunLoopTimerInvalidatePtr + .asFunction(); - int getgid() { - return _getgid(); + int CFRunLoopTimerIsValid( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerIsValid( + timer, + ); } - late final _getgidPtr = - _lookup>('getgid'); - late final _getgid = _getgidPtr.asFunction(); + late final _CFRunLoopTimerIsValidPtr = + _lookup>( + 'CFRunLoopTimerIsValid'); + late final _CFRunLoopTimerIsValid = + _CFRunLoopTimerIsValidPtr.asFunction(); - int getgroups( - int arg0, - ffi.Pointer arg1, + void CFRunLoopTimerGetContext( + CFRunLoopTimerRef timer, + ffi.Pointer context, ) { - return _getgroups( - arg0, - arg1, + return _CFRunLoopTimerGetContext( + timer, + context, ); } - late final _getgroupsPtr = _lookup< - ffi.NativeFunction)>>( - 'getgroups'); - late final _getgroups = - _getgroupsPtr.asFunction)>(); + late final _CFRunLoopTimerGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopTimerRef, + ffi.Pointer)>>('CFRunLoopTimerGetContext'); + late final _CFRunLoopTimerGetContext = + _CFRunLoopTimerGetContextPtr.asFunction< + void Function( + CFRunLoopTimerRef, ffi.Pointer)>(); - ffi.Pointer getlogin() { - return _getlogin(); + double CFRunLoopTimerGetTolerance( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerGetTolerance( + timer, + ); } - late final _getloginPtr = - _lookup Function()>>('getlogin'); - late final _getlogin = - _getloginPtr.asFunction Function()>(); + late final _CFRunLoopTimerGetTolerancePtr = + _lookup>( + 'CFRunLoopTimerGetTolerance'); + late final _CFRunLoopTimerGetTolerance = _CFRunLoopTimerGetTolerancePtr + .asFunction(); - int getpgrp() { - return _getpgrp(); + void CFRunLoopTimerSetTolerance( + CFRunLoopTimerRef timer, + double tolerance, + ) { + return _CFRunLoopTimerSetTolerance( + timer, + tolerance, + ); } - late final _getpgrpPtr = - _lookup>('getpgrp'); - late final _getpgrp = _getpgrpPtr.asFunction(); + late final _CFRunLoopTimerSetTolerancePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopTimerRef, + CFTimeInterval)>>('CFRunLoopTimerSetTolerance'); + late final _CFRunLoopTimerSetTolerance = _CFRunLoopTimerSetTolerancePtr + .asFunction(); - int getpid() { - return _getpid(); + int CFSocketGetTypeID() { + return _CFSocketGetTypeID(); } - late final _getpidPtr = - _lookup>('getpid'); - late final _getpid = _getpidPtr.asFunction(); + late final _CFSocketGetTypeIDPtr = + _lookup>('CFSocketGetTypeID'); + late final _CFSocketGetTypeID = + _CFSocketGetTypeIDPtr.asFunction(); - int getppid() { - return _getppid(); + CFSocketRef CFSocketCreate( + CFAllocatorRef allocator, + int protocolFamily, + int socketType, + int protocol, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, + ) { + return _CFSocketCreate( + allocator, + protocolFamily, + socketType, + protocol, + callBackTypes, + callout, + context, + ); } - late final _getppidPtr = - _lookup>('getppid'); - late final _getppid = _getppidPtr.asFunction(); + late final _CFSocketCreatePtr = _lookup< + ffi.NativeFunction< + CFSocketRef Function( + CFAllocatorRef, + SInt32, + SInt32, + SInt32, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer)>>('CFSocketCreate'); + late final _CFSocketCreate = _CFSocketCreatePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, int, int, int, int, CFSocketCallBack, + ffi.Pointer)>(); - int getuid() { - return _getuid(); + CFSocketRef CFSocketCreateWithNative( + CFAllocatorRef allocator, + int sock, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, + ) { + return _CFSocketCreateWithNative( + allocator, + sock, + callBackTypes, + callout, + context, + ); } - late final _getuidPtr = - _lookup>('getuid'); - late final _getuid = _getuidPtr.asFunction(); + late final _CFSocketCreateWithNativePtr = _lookup< + ffi.NativeFunction< + CFSocketRef Function( + CFAllocatorRef, + CFSocketNativeHandle, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer)>>('CFSocketCreateWithNative'); + late final _CFSocketCreateWithNative = + _CFSocketCreateWithNativePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, int, int, CFSocketCallBack, + ffi.Pointer)>(); - int isatty( - int arg0, + CFSocketRef CFSocketCreateWithSocketSignature( + CFAllocatorRef allocator, + ffi.Pointer signature, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, ) { - return _isatty( - arg0, + return _CFSocketCreateWithSocketSignature( + allocator, + signature, + callBackTypes, + callout, + context, ); } - late final _isattyPtr = - _lookup>('isatty'); - late final _isatty = _isattyPtr.asFunction(); + late final _CFSocketCreateWithSocketSignaturePtr = _lookup< + ffi.NativeFunction< + CFSocketRef Function( + CFAllocatorRef, + ffi.Pointer, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer)>>( + 'CFSocketCreateWithSocketSignature'); + late final _CFSocketCreateWithSocketSignature = + _CFSocketCreateWithSocketSignaturePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, ffi.Pointer, + int, CFSocketCallBack, ffi.Pointer)>(); - int link( - ffi.Pointer arg0, - ffi.Pointer arg1, + CFSocketRef CFSocketCreateConnectedToSocketSignature( + CFAllocatorRef allocator, + ffi.Pointer signature, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, + double timeout, ) { - return _link( - arg0, - arg1, + return _CFSocketCreateConnectedToSocketSignature( + allocator, + signature, + callBackTypes, + callout, + context, + timeout, ); } - late final _linkPtr = _lookup< + late final _CFSocketCreateConnectedToSocketSignaturePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('link'); - late final _link = _linkPtr - .asFunction, ffi.Pointer)>(); + CFSocketRef Function( + CFAllocatorRef, + ffi.Pointer, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer, + CFTimeInterval)>>('CFSocketCreateConnectedToSocketSignature'); + late final _CFSocketCreateConnectedToSocketSignature = + _CFSocketCreateConnectedToSocketSignaturePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, ffi.Pointer, + int, CFSocketCallBack, ffi.Pointer, double)>(); - int lseek( - int arg0, - int arg1, - int arg2, + int CFSocketSetAddress( + CFSocketRef s, + CFDataRef address, ) { - return _lseek( - arg0, - arg1, - arg2, + return _CFSocketSetAddress( + s, + address, ); } - late final _lseekPtr = - _lookup>( - 'lseek'); - late final _lseek = _lseekPtr.asFunction(); + late final _CFSocketSetAddressPtr = + _lookup>( + 'CFSocketSetAddress'); + late final _CFSocketSetAddress = + _CFSocketSetAddressPtr.asFunction(); - int pathconf( - ffi.Pointer arg0, - int arg1, + int CFSocketConnectToAddress( + CFSocketRef s, + CFDataRef address, + double timeout, ) { - return _pathconf( - arg0, - arg1, + return _CFSocketConnectToAddress( + s, + address, + timeout, ); } - late final _pathconfPtr = _lookup< + late final _CFSocketConnectToAddressPtr = _lookup< ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Int)>>('pathconf'); - late final _pathconf = - _pathconfPtr.asFunction, int)>(); + ffi.Int32 Function(CFSocketRef, CFDataRef, + CFTimeInterval)>>('CFSocketConnectToAddress'); + late final _CFSocketConnectToAddress = _CFSocketConnectToAddressPtr + .asFunction(); - int pause() { - return _pause(); + void CFSocketInvalidate( + CFSocketRef s, + ) { + return _CFSocketInvalidate( + s, + ); } - late final _pausePtr = - _lookup>('pause'); - late final _pause = _pausePtr.asFunction(); + late final _CFSocketInvalidatePtr = + _lookup>( + 'CFSocketInvalidate'); + late final _CFSocketInvalidate = + _CFSocketInvalidatePtr.asFunction(); - int pipe( - ffi.Pointer arg0, + int CFSocketIsValid( + CFSocketRef s, ) { - return _pipe( - arg0, + return _CFSocketIsValid( + s, ); } - late final _pipePtr = - _lookup)>>( - 'pipe'); - late final _pipe = _pipePtr.asFunction)>(); + late final _CFSocketIsValidPtr = + _lookup>( + 'CFSocketIsValid'); + late final _CFSocketIsValid = + _CFSocketIsValidPtr.asFunction(); - int read( - int arg0, - ffi.Pointer arg1, - int arg2, + CFDataRef CFSocketCopyAddress( + CFSocketRef s, ) { - return _read( - arg0, - arg1, - arg2, + return _CFSocketCopyAddress( + s, ); } - late final _readPtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('read'); - late final _read = - _readPtr.asFunction, int)>(); + late final _CFSocketCopyAddressPtr = + _lookup>( + 'CFSocketCopyAddress'); + late final _CFSocketCopyAddress = + _CFSocketCopyAddressPtr.asFunction(); - int rmdir( - ffi.Pointer arg0, + CFDataRef CFSocketCopyPeerAddress( + CFSocketRef s, ) { - return _rmdir( - arg0, + return _CFSocketCopyPeerAddress( + s, ); } - late final _rmdirPtr = - _lookup)>>( - 'rmdir'); - late final _rmdir = - _rmdirPtr.asFunction)>(); + late final _CFSocketCopyPeerAddressPtr = + _lookup>( + 'CFSocketCopyPeerAddress'); + late final _CFSocketCopyPeerAddress = + _CFSocketCopyPeerAddressPtr.asFunction(); - int setgid( - int arg0, + void CFSocketGetContext( + CFSocketRef s, + ffi.Pointer context, ) { - return _setgid( - arg0, + return _CFSocketGetContext( + s, + context, ); } - late final _setgidPtr = - _lookup>('setgid'); - late final _setgid = _setgidPtr.asFunction(); + late final _CFSocketGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFSocketRef, + ffi.Pointer)>>('CFSocketGetContext'); + late final _CFSocketGetContext = _CFSocketGetContextPtr.asFunction< + void Function(CFSocketRef, ffi.Pointer)>(); - int setpgid( - int arg0, - int arg1, + int CFSocketGetNative( + CFSocketRef s, ) { - return _setpgid( - arg0, - arg1, + return _CFSocketGetNative( + s, ); } - late final _setpgidPtr = - _lookup>('setpgid'); - late final _setpgid = _setpgidPtr.asFunction(); + late final _CFSocketGetNativePtr = + _lookup>( + 'CFSocketGetNative'); + late final _CFSocketGetNative = + _CFSocketGetNativePtr.asFunction(); - int setsid() { - return _setsid(); + CFRunLoopSourceRef CFSocketCreateRunLoopSource( + CFAllocatorRef allocator, + CFSocketRef s, + int order, + ) { + return _CFSocketCreateRunLoopSource( + allocator, + s, + order, + ); } - late final _setsidPtr = - _lookup>('setsid'); - late final _setsid = _setsidPtr.asFunction(); + late final _CFSocketCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, + CFIndex)>>('CFSocketCreateRunLoopSource'); + late final _CFSocketCreateRunLoopSource = + _CFSocketCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, int)>(); - int setuid( - int arg0, + int CFSocketGetSocketFlags( + CFSocketRef s, ) { - return _setuid( - arg0, + return _CFSocketGetSocketFlags( + s, ); } - late final _setuidPtr = - _lookup>('setuid'); - late final _setuid = _setuidPtr.asFunction(); + late final _CFSocketGetSocketFlagsPtr = + _lookup>( + 'CFSocketGetSocketFlags'); + late final _CFSocketGetSocketFlags = + _CFSocketGetSocketFlagsPtr.asFunction(); - int sleep( - int arg0, + void CFSocketSetSocketFlags( + CFSocketRef s, + int flags, ) { - return _sleep( - arg0, + return _CFSocketSetSocketFlags( + s, + flags, ); } - late final _sleepPtr = - _lookup>( - 'sleep'); - late final _sleep = _sleepPtr.asFunction(); + late final _CFSocketSetSocketFlagsPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketSetSocketFlags'); + late final _CFSocketSetSocketFlags = + _CFSocketSetSocketFlagsPtr.asFunction(); - int sysconf( - int arg0, + void CFSocketDisableCallBacks( + CFSocketRef s, + int callBackTypes, ) { - return _sysconf( - arg0, + return _CFSocketDisableCallBacks( + s, + callBackTypes, ); } - late final _sysconfPtr = - _lookup>('sysconf'); - late final _sysconf = _sysconfPtr.asFunction(); + late final _CFSocketDisableCallBacksPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketDisableCallBacks'); + late final _CFSocketDisableCallBacks = _CFSocketDisableCallBacksPtr + .asFunction(); - int tcgetpgrp( - int arg0, + void CFSocketEnableCallBacks( + CFSocketRef s, + int callBackTypes, ) { - return _tcgetpgrp( - arg0, + return _CFSocketEnableCallBacks( + s, + callBackTypes, ); } - late final _tcgetpgrpPtr = - _lookup>('tcgetpgrp'); - late final _tcgetpgrp = _tcgetpgrpPtr.asFunction(); + late final _CFSocketEnableCallBacksPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketEnableCallBacks'); + late final _CFSocketEnableCallBacks = + _CFSocketEnableCallBacksPtr.asFunction(); - int tcsetpgrp( - int arg0, - int arg1, + int CFSocketSendData( + CFSocketRef s, + CFDataRef address, + CFDataRef data, + double timeout, ) { - return _tcsetpgrp( - arg0, - arg1, + return _CFSocketSendData( + s, + address, + data, + timeout, ); } - late final _tcsetpgrpPtr = - _lookup>( - 'tcsetpgrp'); - late final _tcsetpgrp = _tcsetpgrpPtr.asFunction(); + late final _CFSocketSendDataPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFSocketRef, CFDataRef, CFDataRef, + CFTimeInterval)>>('CFSocketSendData'); + late final _CFSocketSendData = _CFSocketSendDataPtr.asFunction< + int Function(CFSocketRef, CFDataRef, CFDataRef, double)>(); - ffi.Pointer ttyname( - int arg0, + int CFSocketRegisterValue( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + CFPropertyListRef value, ) { - return _ttyname( - arg0, + return _CFSocketRegisterValue( + nameServerSignature, + timeout, + name, + value, ); } - late final _ttynamePtr = - _lookup Function(ffi.Int)>>( - 'ttyname'); - late final _ttyname = - _ttynamePtr.asFunction Function(int)>(); + late final _CFSocketRegisterValuePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, CFTimeInterval, + CFStringRef, CFPropertyListRef)>>('CFSocketRegisterValue'); + late final _CFSocketRegisterValue = _CFSocketRegisterValuePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + CFPropertyListRef)>(); - int ttyname_r( - int arg0, - ffi.Pointer arg1, - int arg2, + int CFSocketCopyRegisteredValue( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ffi.Pointer value, + ffi.Pointer nameServerAddress, ) { - return _ttyname_r( - arg0, - arg1, - arg2, + return _CFSocketCopyRegisteredValue( + nameServerSignature, + timeout, + name, + value, + nameServerAddress, ); } - late final _ttyname_rPtr = _lookup< + late final _CFSocketCopyRegisteredValuePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('ttyname_r'); - late final _ttyname_r = - _ttyname_rPtr.asFunction, int)>(); + ffi.Int32 Function( + ffi.Pointer, + CFTimeInterval, + CFStringRef, + ffi.Pointer, + ffi.Pointer)>>('CFSocketCopyRegisteredValue'); + late final _CFSocketCopyRegisteredValue = + _CFSocketCopyRegisteredValuePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + ffi.Pointer, ffi.Pointer)>(); - int unlink( - ffi.Pointer arg0, + int CFSocketRegisterSocketSignature( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ffi.Pointer signature, ) { - return _unlink( - arg0, + return _CFSocketRegisterSocketSignature( + nameServerSignature, + timeout, + name, + signature, ); } - late final _unlinkPtr = - _lookup)>>( - 'unlink'); - late final _unlink = - _unlinkPtr.asFunction)>(); + late final _CFSocketRegisterSocketSignaturePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, CFTimeInterval, + CFStringRef, ffi.Pointer)>>( + 'CFSocketRegisterSocketSignature'); + late final _CFSocketRegisterSocketSignature = + _CFSocketRegisterSocketSignaturePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + ffi.Pointer)>(); - int write( - int __fd, - ffi.Pointer __buf, - int __nbyte, + int CFSocketCopyRegisteredSocketSignature( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ffi.Pointer signature, + ffi.Pointer nameServerAddress, ) { - return _write( - __fd, - __buf, - __nbyte, + return _CFSocketCopyRegisteredSocketSignature( + nameServerSignature, + timeout, + name, + signature, + nameServerAddress, ); } - late final _writePtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('write'); - late final _write = - _writePtr.asFunction, int)>(); + late final _CFSocketCopyRegisteredSocketSignaturePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + CFTimeInterval, + CFStringRef, + ffi.Pointer, + ffi.Pointer)>>( + 'CFSocketCopyRegisteredSocketSignature'); + late final _CFSocketCopyRegisteredSocketSignature = + _CFSocketCopyRegisteredSocketSignaturePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + ffi.Pointer, ffi.Pointer)>(); - int confstr( - int arg0, - ffi.Pointer arg1, - int arg2, + int CFSocketUnregister( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, ) { - return _confstr( - arg0, - arg1, - arg2, + return _CFSocketUnregister( + nameServerSignature, + timeout, + name, ); } - late final _confstrPtr = _lookup< + late final _CFSocketUnregisterPtr = _lookup< ffi.NativeFunction< - ffi.Size Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('confstr'); - late final _confstr = - _confstrPtr.asFunction, int)>(); + ffi.Int32 Function(ffi.Pointer, CFTimeInterval, + CFStringRef)>>('CFSocketUnregister'); + late final _CFSocketUnregister = _CFSocketUnregisterPtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef)>(); - int getopt( - int arg0, - ffi.Pointer> arg1, - ffi.Pointer arg2, + void CFSocketSetDefaultNameRegistryPortNumber( + int port, ) { - return _getopt( - arg0, - arg1, - arg2, + return _CFSocketSetDefaultNameRegistryPortNumber( + port, ); } - late final _getoptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>, - ffi.Pointer)>>('getopt'); - late final _getopt = _getoptPtr.asFunction< - int Function( - int, ffi.Pointer>, ffi.Pointer)>(); + late final _CFSocketSetDefaultNameRegistryPortNumberPtr = + _lookup>( + 'CFSocketSetDefaultNameRegistryPortNumber'); + late final _CFSocketSetDefaultNameRegistryPortNumber = + _CFSocketSetDefaultNameRegistryPortNumberPtr.asFunction< + void Function(int)>(); - late final ffi.Pointer> _optarg = - _lookup>('optarg'); + int CFSocketGetDefaultNameRegistryPortNumber() { + return _CFSocketGetDefaultNameRegistryPortNumber(); + } - ffi.Pointer get optarg => _optarg.value; + late final _CFSocketGetDefaultNameRegistryPortNumberPtr = + _lookup>( + 'CFSocketGetDefaultNameRegistryPortNumber'); + late final _CFSocketGetDefaultNameRegistryPortNumber = + _CFSocketGetDefaultNameRegistryPortNumberPtr.asFunction(); - set optarg(ffi.Pointer value) => _optarg.value = value; + late final ffi.Pointer _kCFSocketCommandKey = + _lookup('kCFSocketCommandKey'); - late final ffi.Pointer _optind = _lookup('optind'); + CFStringRef get kCFSocketCommandKey => _kCFSocketCommandKey.value; - int get optind => _optind.value; + set kCFSocketCommandKey(CFStringRef value) => + _kCFSocketCommandKey.value = value; - set optind(int value) => _optind.value = value; + late final ffi.Pointer _kCFSocketNameKey = + _lookup('kCFSocketNameKey'); - late final ffi.Pointer _opterr = _lookup('opterr'); + CFStringRef get kCFSocketNameKey => _kCFSocketNameKey.value; - int get opterr => _opterr.value; + set kCFSocketNameKey(CFStringRef value) => _kCFSocketNameKey.value = value; - set opterr(int value) => _opterr.value = value; + late final ffi.Pointer _kCFSocketValueKey = + _lookup('kCFSocketValueKey'); - late final ffi.Pointer _optopt = _lookup('optopt'); + CFStringRef get kCFSocketValueKey => _kCFSocketValueKey.value; - int get optopt => _optopt.value; + set kCFSocketValueKey(CFStringRef value) => _kCFSocketValueKey.value = value; - set optopt(int value) => _optopt.value = value; + late final ffi.Pointer _kCFSocketResultKey = + _lookup('kCFSocketResultKey'); - ffi.Pointer brk( - ffi.Pointer arg0, + CFStringRef get kCFSocketResultKey => _kCFSocketResultKey.value; + + set kCFSocketResultKey(CFStringRef value) => + _kCFSocketResultKey.value = value; + + late final ffi.Pointer _kCFSocketErrorKey = + _lookup('kCFSocketErrorKey'); + + CFStringRef get kCFSocketErrorKey => _kCFSocketErrorKey.value; + + set kCFSocketErrorKey(CFStringRef value) => _kCFSocketErrorKey.value = value; + + late final ffi.Pointer _kCFSocketRegisterCommand = + _lookup('kCFSocketRegisterCommand'); + + CFStringRef get kCFSocketRegisterCommand => _kCFSocketRegisterCommand.value; + + set kCFSocketRegisterCommand(CFStringRef value) => + _kCFSocketRegisterCommand.value = value; + + late final ffi.Pointer _kCFSocketRetrieveCommand = + _lookup('kCFSocketRetrieveCommand'); + + CFStringRef get kCFSocketRetrieveCommand => _kCFSocketRetrieveCommand.value; + + set kCFSocketRetrieveCommand(CFStringRef value) => + _kCFSocketRetrieveCommand.value = value; + + int getattrlistbulk( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _brk( + return _getattrlistbulk( arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _brkPtr = _lookup< + late final _getattrlistbulkPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('brk'); - late final _brk = _brkPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer, ffi.Size, ffi.Uint64)>>('getattrlistbulk'); + late final _getattrlistbulk = _getattrlistbulkPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); - int chroot( - ffi.Pointer arg0, + int getattrlistat( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + int arg4, + int arg5, ) { - return _chroot( + return _getattrlistat( arg0, + arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _chrootPtr = - _lookup)>>( - 'chroot'); - late final _chroot = - _chrootPtr.asFunction)>(); + late final _getattrlistatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedLong)>>('getattrlistat'); + late final _getattrlistat = _getattrlistatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - ffi.Pointer crypt( - ffi.Pointer arg0, + int setattrlistat( + int arg0, ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + int arg4, + int arg5, ) { - return _crypt( + return _setattrlistat( arg0, arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _cryptPtr = _lookup< + late final _setattrlistatPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('crypt'); - late final _crypt = _cryptPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Uint32)>>('setattrlistat'); + late final _setattrlistat = _setattrlistatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - void encrypt( - ffi.Pointer arg0, - int arg1, + int freadlink( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _encrypt( + return _freadlink( arg0, arg1, + arg2, ); } - late final _encryptPtr = _lookup< + late final _freadlinkPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int)>>('encrypt'); - late final _encrypt = - _encryptPtr.asFunction, int)>(); + ssize_t Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('freadlink'); + late final _freadlink = + _freadlinkPtr.asFunction, int)>(); - int fchdir( + int faccessat( int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, ) { - return _fchdir( + return _faccessat( arg0, + arg1, + arg2, + arg3, ); } - late final _fchdirPtr = - _lookup>('fchdir'); - late final _fchdir = _fchdirPtr.asFunction(); - - int gethostid() { - return _gethostid(); - } - - late final _gethostidPtr = - _lookup>('gethostid'); - late final _gethostid = _gethostidPtr.asFunction(); + late final _faccessatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int, ffi.Int)>>('faccessat'); + late final _faccessat = _faccessatPtr + .asFunction, int, int)>(); - int getpgid( + int fchownat( int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, + int arg4, ) { - return _getpgid( + return _fchownat( arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _getpgidPtr = - _lookup>('getpgid'); - late final _getpgid = _getpgidPtr.asFunction(); + late final _fchownatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, uid_t, gid_t, + ffi.Int)>>('fchownat'); + late final _fchownat = _fchownatPtr + .asFunction, int, int, int)>(); - int getsid( + int linkat( int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + int arg4, ) { - return _getsid( - arg0, - ); - } - - late final _getsidPtr = - _lookup>('getsid'); - late final _getsid = _getsidPtr.asFunction(); - - int getdtablesize() { - return _getdtablesize(); - } - - late final _getdtablesizePtr = - _lookup>('getdtablesize'); - late final _getdtablesize = _getdtablesizePtr.asFunction(); - - int getpagesize() { - return _getpagesize(); - } - - late final _getpagesizePtr = - _lookup>('getpagesize'); - late final _getpagesize = _getpagesizePtr.asFunction(); - - ffi.Pointer getpass( - ffi.Pointer arg0, - ) { - return _getpass( + return _linkat( arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _getpassPtr = _lookup< + late final _linkatPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('getpass'); - late final _getpass = _getpassPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.Int)>>('linkat'); + late final _linkat = _linkatPtr.asFunction< + int Function( + int, ffi.Pointer, int, ffi.Pointer, int)>(); - ffi.Pointer getwd( - ffi.Pointer arg0, + int readlinkat( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, ) { - return _getwd( + return _readlinkat( arg0, + arg1, + arg2, + arg3, ); } - late final _getwdPtr = _lookup< + late final _readlinkatPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('getwd'); - late final _getwd = _getwdPtr - .asFunction Function(ffi.Pointer)>(); + ssize_t Function(ffi.Int, ffi.Pointer, + ffi.Pointer, ffi.Size)>>('readlinkat'); + late final _readlinkat = _readlinkatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, int)>(); - int lchown( + int symlinkat( ffi.Pointer arg0, int arg1, - int arg2, + ffi.Pointer arg2, ) { - return _lchown( + return _symlinkat( arg0, arg1, arg2, ); } - late final _lchownPtr = _lookup< + late final _symlinkatPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('lchown'); - late final _lchown = - _lchownPtr.asFunction, int, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, + ffi.Pointer)>>('symlinkat'); + late final _symlinkat = _symlinkatPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); - int lockf( + int unlinkat( int arg0, - int arg1, + ffi.Pointer arg1, int arg2, ) { - return _lockf( + return _unlinkat( arg0, arg1, arg2, ); } - late final _lockfPtr = - _lookup>( - 'lockf'); - late final _lockf = _lockfPtr.asFunction(); + late final _unlinkatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int)>>('unlinkat'); + late final _unlinkat = + _unlinkatPtr.asFunction, int)>(); - int nice( + void _exit( int arg0, ) { - return _nice( + return __exit( arg0, ); } - late final _nicePtr = - _lookup>('nice'); - late final _nice = _nicePtr.asFunction(); + late final __exitPtr = + _lookup>('_exit'); + late final __exit = __exitPtr.asFunction(); - int pread( - int __fd, - ffi.Pointer __buf, - int __nbyte, - int __offset, + int access( + ffi.Pointer arg0, + int arg1, ) { - return _pread( - __fd, - __buf, - __nbyte, - __offset, + return _access( + arg0, + arg1, ); } - late final _preadPtr = _lookup< - ffi.NativeFunction< - ssize_t Function( - ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pread'); - late final _pread = _preadPtr - .asFunction, int, int)>(); + late final _accessPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'access'); + late final _access = + _accessPtr.asFunction, int)>(); - int pwrite( - int __fd, - ffi.Pointer __buf, - int __nbyte, - int __offset, + int alarm( + int arg0, ) { - return _pwrite( - __fd, - __buf, - __nbyte, - __offset, + return _alarm( + arg0, ); } - late final _pwritePtr = _lookup< - ffi.NativeFunction< - ssize_t Function( - ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pwrite'); - late final _pwrite = _pwritePtr - .asFunction, int, int)>(); + late final _alarmPtr = + _lookup>( + 'alarm'); + late final _alarm = _alarmPtr.asFunction(); - ffi.Pointer sbrk( - int arg0, + int chdir( + ffi.Pointer arg0, ) { - return _sbrk( + return _chdir( arg0, ); } - late final _sbrkPtr = - _lookup Function(ffi.Int)>>( - 'sbrk'); - late final _sbrk = _sbrkPtr.asFunction Function(int)>(); - - int setpgrp() { - return _setpgrp(); - } - - late final _setpgrpPtr = - _lookup>('setpgrp'); - late final _setpgrp = _setpgrpPtr.asFunction(); + late final _chdirPtr = + _lookup)>>( + 'chdir'); + late final _chdir = + _chdirPtr.asFunction)>(); - int setregid( - int arg0, + int chown( + ffi.Pointer arg0, int arg1, + int arg2, ) { - return _setregid( + return _chown( arg0, arg1, + arg2, ); } - late final _setregidPtr = - _lookup>('setregid'); - late final _setregid = _setregidPtr.asFunction(); + late final _chownPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('chown'); + late final _chown = + _chownPtr.asFunction, int, int)>(); - int setreuid( + int close( int arg0, - int arg1, ) { - return _setreuid( + return _close( arg0, - arg1, ); } - late final _setreuidPtr = - _lookup>('setreuid'); - late final _setreuid = _setreuidPtr.asFunction(); + late final _closePtr = + _lookup>('close'); + late final _close = _closePtr.asFunction(); - void sync1() { - return _sync1(); + int dup( + int arg0, + ) { + return _dup( + arg0, + ); } - late final _sync1Ptr = - _lookup>('sync'); - late final _sync1 = _sync1Ptr.asFunction(); + late final _dupPtr = + _lookup>('dup'); + late final _dup = _dupPtr.asFunction(); - int truncate( - ffi.Pointer arg0, + int dup2( + int arg0, int arg1, ) { - return _truncate( + return _dup2( arg0, arg1, ); } - late final _truncatePtr = _lookup< - ffi.NativeFunction, off_t)>>( - 'truncate'); - late final _truncate = - _truncatePtr.asFunction, int)>(); + late final _dup2Ptr = + _lookup>('dup2'); + late final _dup2 = _dup2Ptr.asFunction(); - int ualarm( - int arg0, - int arg1, + int execl( + ffi.Pointer __path, + ffi.Pointer __arg0, ) { - return _ualarm( - arg0, - arg1, + return _execl( + __path, + __arg0, ); } - late final _ualarmPtr = - _lookup>( - 'ualarm'); - late final _ualarm = _ualarmPtr.asFunction(); + late final _execlPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('execl'); + late final _execl = _execlPtr + .asFunction, ffi.Pointer)>(); - int usleep( - int arg0, + int execle( + ffi.Pointer __path, + ffi.Pointer __arg0, ) { - return _usleep( - arg0, + return _execle( + __path, + __arg0, ); } - late final _usleepPtr = - _lookup>('usleep'); - late final _usleep = _usleepPtr.asFunction(); + late final _execlePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('execle'); + late final _execle = _execlePtr + .asFunction, ffi.Pointer)>(); - int vfork() { - return _vfork(); + int execlp( + ffi.Pointer __file, + ffi.Pointer __arg0, + ) { + return _execlp( + __file, + __arg0, + ); } - late final _vforkPtr = - _lookup>('vfork'); - late final _vfork = _vforkPtr.asFunction(); + late final _execlpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('execlp'); + late final _execlp = _execlpPtr + .asFunction, ffi.Pointer)>(); - int fsync( - int arg0, + int execv( + ffi.Pointer __path, + ffi.Pointer> __argv, ) { - return _fsync( - arg0, + return _execv( + __path, + __argv, ); } - late final _fsyncPtr = - _lookup>('fsync'); - late final _fsync = _fsyncPtr.asFunction(); + late final _execvPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer>)>>('execv'); + late final _execv = _execvPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>)>(); - int ftruncate( - int arg0, - int arg1, + int execve( + ffi.Pointer __file, + ffi.Pointer> __argv, + ffi.Pointer> __envp, ) { - return _ftruncate( - arg0, - arg1, + return _execve( + __file, + __argv, + __envp, ); } - late final _ftruncatePtr = - _lookup>( - 'ftruncate'); - late final _ftruncate = _ftruncatePtr.asFunction(); + late final _execvePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('execve'); + late final _execve = _execvePtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer>, + ffi.Pointer>)>(); - int getlogin_r( - ffi.Pointer arg0, - int arg1, + int execvp( + ffi.Pointer __file, + ffi.Pointer> __argv, ) { - return _getlogin_r( - arg0, - arg1, + return _execvp( + __file, + __argv, ); } - late final _getlogin_rPtr = _lookup< + late final _execvpPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('getlogin_r'); - late final _getlogin_r = - _getlogin_rPtr.asFunction, int)>(); + ffi.Int Function(ffi.Pointer, + ffi.Pointer>)>>('execvp'); + late final _execvp = _execvpPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>)>(); - int fchown( + int fork() { + return _fork(); + } + + late final _forkPtr = _lookup>('fork'); + late final _fork = _forkPtr.asFunction(); + + int fpathconf( int arg0, int arg1, - int arg2, ) { - return _fchown( + return _fpathconf( arg0, arg1, - arg2, ); } - late final _fchownPtr = - _lookup>( - 'fchown'); - late final _fchown = _fchownPtr.asFunction(); + late final _fpathconfPtr = + _lookup>( + 'fpathconf'); + late final _fpathconf = _fpathconfPtr.asFunction(); - int gethostname( + ffi.Pointer getcwd( ffi.Pointer arg0, int arg1, ) { - return _gethostname( + return _getcwd( arg0, arg1, ); } - late final _gethostnamePtr = _lookup< + late final _getcwdPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('gethostname'); - late final _gethostname = - _gethostnamePtr.asFunction, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('getcwd'); + late final _getcwd = _getcwdPtr + .asFunction Function(ffi.Pointer, int)>(); - int readlink( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ) { - return _readlink( - arg0, - arg1, - arg2, - ); + int getegid() { + return _getegid(); } - late final _readlinkPtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('readlink'); - late final _readlink = _readlinkPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _getegidPtr = + _lookup>('getegid'); + late final _getegid = _getegidPtr.asFunction(); - int setegid( + int geteuid() { + return _geteuid(); + } + + late final _geteuidPtr = + _lookup>('geteuid'); + late final _geteuid = _geteuidPtr.asFunction(); + + int getgid() { + return _getgid(); + } + + late final _getgidPtr = + _lookup>('getgid'); + late final _getgid = _getgidPtr.asFunction(); + + int getgroups( int arg0, + ffi.Pointer arg1, ) { - return _setegid( + return _getgroups( arg0, + arg1, ); } - late final _setegidPtr = - _lookup>('setegid'); - late final _setegid = _setegidPtr.asFunction(); + late final _getgroupsPtr = _lookup< + ffi.NativeFunction)>>( + 'getgroups'); + late final _getgroups = + _getgroupsPtr.asFunction)>(); - int seteuid( + ffi.Pointer getlogin() { + return _getlogin(); + } + + late final _getloginPtr = + _lookup Function()>>('getlogin'); + late final _getlogin = + _getloginPtr.asFunction Function()>(); + + int getpgrp() { + return _getpgrp(); + } + + late final _getpgrpPtr = + _lookup>('getpgrp'); + late final _getpgrp = _getpgrpPtr.asFunction(); + + int getpid() { + return _getpid(); + } + + late final _getpidPtr = + _lookup>('getpid'); + late final _getpid = _getpidPtr.asFunction(); + + int getppid() { + return _getppid(); + } + + late final _getppidPtr = + _lookup>('getppid'); + late final _getppid = _getppidPtr.asFunction(); + + int getuid() { + return _getuid(); + } + + late final _getuidPtr = + _lookup>('getuid'); + late final _getuid = _getuidPtr.asFunction(); + + int isatty( int arg0, ) { - return _seteuid( + return _isatty( arg0, ); } - late final _seteuidPtr = - _lookup>('seteuid'); - late final _seteuid = _seteuidPtr.asFunction(); + late final _isattyPtr = + _lookup>('isatty'); + late final _isatty = _isattyPtr.asFunction(); - int symlink( + int link( ffi.Pointer arg0, ffi.Pointer arg1, ) { - return _symlink( + return _link( arg0, arg1, ); } - late final _symlinkPtr = _lookup< + late final _linkPtr = _lookup< ffi.NativeFunction< ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('symlink'); - late final _symlink = _symlinkPtr + ffi.Pointer, ffi.Pointer)>>('link'); + late final _link = _linkPtr .asFunction, ffi.Pointer)>(); - int pselect( + int lseek( int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, + int arg1, + int arg2, ) { - return _pselect( + return _lseek( arg0, arg1, arg2, - arg3, - arg4, - arg5, ); } - late final _pselectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('pselect'); - late final _pselect = _pselectPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + late final _lseekPtr = + _lookup>( + 'lseek'); + late final _lseek = _lseekPtr.asFunction(); - int select( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, + int pathconf( + ffi.Pointer arg0, + int arg1, ) { - return _select( + return _pathconf( arg0, arg1, - arg2, - arg3, - arg4, ); } - late final _selectPtr = _lookup< + late final _pathconfPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('select'); - late final _select = _selectPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Long Function(ffi.Pointer, ffi.Int)>>('pathconf'); + late final _pathconf = + _pathconfPtr.asFunction, int)>(); - int accessx_np( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - int arg3, - ) { - return _accessx_np( - arg0, - arg1, - arg2, - arg3, - ); + int pause() { + return _pause(); } - late final _accessx_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer, uid_t)>>('accessx_np'); - late final _accessx_np = _accessx_npPtr.asFunction< - int Function( - ffi.Pointer, int, ffi.Pointer, int)>(); + late final _pausePtr = + _lookup>('pause'); + late final _pause = _pausePtr.asFunction(); - int acct( - ffi.Pointer arg0, + int pipe( + ffi.Pointer arg0, ) { - return _acct( + return _pipe( arg0, ); } - late final _acctPtr = - _lookup)>>( - 'acct'); - late final _acct = _acctPtr.asFunction)>(); + late final _pipePtr = + _lookup)>>( + 'pipe'); + late final _pipe = _pipePtr.asFunction)>(); - int add_profil( - ffi.Pointer arg0, - int arg1, + int read( + int arg0, + ffi.Pointer arg1, int arg2, - int arg3, ) { - return _add_profil( + return _read( arg0, arg1, arg2, - arg3, ); } - late final _add_profilPtr = _lookup< + late final _readPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, - ffi.UnsignedInt)>>('add_profil'); - late final _add_profil = _add_profilPtr - .asFunction, int, int, int)>(); - - void endusershell() { - return _endusershell(); - } - - late final _endusershellPtr = - _lookup>('endusershell'); - late final _endusershell = _endusershellPtr.asFunction(); + ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('read'); + late final _read = + _readPtr.asFunction, int)>(); - int execvP( - ffi.Pointer __file, - ffi.Pointer __searchpath, - ffi.Pointer> __argv, + int rmdir( + ffi.Pointer arg0, ) { - return _execvP( - __file, - __searchpath, - __argv, + return _rmdir( + arg0, ); } - late final _execvPPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('execvP'); - late final _execvP = _execvPPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + late final _rmdirPtr = + _lookup)>>( + 'rmdir'); + late final _rmdir = + _rmdirPtr.asFunction)>(); - ffi.Pointer fflagstostr( + int setgid( int arg0, ) { - return _fflagstostr( + return _setgid( arg0, ); } - late final _fflagstostrPtr = _lookup< - ffi.NativeFunction Function(ffi.UnsignedLong)>>( - 'fflagstostr'); - late final _fflagstostr = - _fflagstostrPtr.asFunction Function(int)>(); + late final _setgidPtr = + _lookup>('setgid'); + late final _setgid = _setgidPtr.asFunction(); - int getdomainname( - ffi.Pointer arg0, + int setpgid( + int arg0, int arg1, ) { - return _getdomainname( + return _setpgid( arg0, arg1, ); } - late final _getdomainnamePtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'getdomainname'); - late final _getdomainname = - _getdomainnamePtr.asFunction, int)>(); + late final _setpgidPtr = + _lookup>('setpgid'); + late final _setpgid = _setpgidPtr.asFunction(); - int getgrouplist( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + int setsid() { + return _setsid(); + } + + late final _setsidPtr = + _lookup>('setsid'); + late final _setsid = _setsidPtr.asFunction(); + + int setuid( + int arg0, ) { - return _getgrouplist( + return _setuid( arg0, - arg1, - arg2, - arg3, ); } - late final _getgrouplistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer, - ffi.Pointer)>>('getgrouplist'); - late final _getgrouplist = _getgrouplistPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, - ffi.Pointer)>(); + late final _setuidPtr = + _lookup>('setuid'); + late final _setuid = _setuidPtr.asFunction(); - int gethostuuid( - ffi.Pointer arg0, - ffi.Pointer arg1, + int sleep( + int arg0, ) { - return _gethostuuid( + return _sleep( arg0, - arg1, ); } - late final _gethostuuidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('gethostuuid'); - late final _gethostuuid = _gethostuuidPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _sleepPtr = + _lookup>( + 'sleep'); + late final _sleep = _sleepPtr.asFunction(); - int getmode( - ffi.Pointer arg0, - int arg1, + int sysconf( + int arg0, ) { - return _getmode( + return _sysconf( arg0, - arg1, ); } - late final _getmodePtr = _lookup< - ffi.NativeFunction, mode_t)>>( - 'getmode'); - late final _getmode = - _getmodePtr.asFunction, int)>(); + late final _sysconfPtr = + _lookup>('sysconf'); + late final _sysconf = _sysconfPtr.asFunction(); - int getpeereid( + int tcgetpgrp( int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, ) { - return _getpeereid( + return _tcgetpgrp( arg0, - arg1, - arg2, ); } - late final _getpeereidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Pointer)>>('getpeereid'); - late final _getpeereid = _getpeereidPtr - .asFunction, ffi.Pointer)>(); + late final _tcgetpgrpPtr = + _lookup>('tcgetpgrp'); + late final _tcgetpgrp = _tcgetpgrpPtr.asFunction(); - int getsgroups_np( - ffi.Pointer arg0, - ffi.Pointer arg1, + int tcsetpgrp( + int arg0, + int arg1, ) { - return _getsgroups_np( + return _tcsetpgrp( arg0, arg1, ); } - late final _getsgroups_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('getsgroups_np'); - late final _getsgroups_np = _getsgroups_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _tcsetpgrpPtr = + _lookup>( + 'tcsetpgrp'); + late final _tcsetpgrp = _tcsetpgrpPtr.asFunction(); - ffi.Pointer getusershell() { - return _getusershell(); + ffi.Pointer ttyname( + int arg0, + ) { + return _ttyname( + arg0, + ); } - late final _getusershellPtr = - _lookup Function()>>( - 'getusershell'); - late final _getusershell = - _getusershellPtr.asFunction Function()>(); + late final _ttynamePtr = + _lookup Function(ffi.Int)>>( + 'ttyname'); + late final _ttyname = + _ttynamePtr.asFunction Function(int)>(); - int getwgroups_np( - ffi.Pointer arg0, - ffi.Pointer arg1, + int ttyname_r( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _getwgroups_np( + return _ttyname_r( arg0, arg1, + arg2, ); } - late final _getwgroups_npPtr = _lookup< + late final _ttyname_rPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('getwgroups_np'); - late final _getwgroups_np = _getwgroups_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('ttyname_r'); + late final _ttyname_r = + _ttyname_rPtr.asFunction, int)>(); - int initgroups( + int unlink( ffi.Pointer arg0, - int arg1, ) { - return _initgroups( + return _unlink( arg0, - arg1, ); } - late final _initgroupsPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'initgroups'); - late final _initgroups = - _initgroupsPtr.asFunction, int)>(); - - int issetugid() { - return _issetugid(); - } - - late final _issetugidPtr = - _lookup>('issetugid'); - late final _issetugid = _issetugidPtr.asFunction(); + late final _unlinkPtr = + _lookup)>>( + 'unlink'); + late final _unlink = + _unlinkPtr.asFunction)>(); - ffi.Pointer mkdtemp( - ffi.Pointer arg0, + int write( + int __fd, + ffi.Pointer __buf, + int __nbyte, ) { - return _mkdtemp( - arg0, + return _write( + __fd, + __buf, + __nbyte, ); } - late final _mkdtempPtr = _lookup< + late final _writePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('mkdtemp'); - late final _mkdtemp = _mkdtempPtr - .asFunction Function(ffi.Pointer)>(); + ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('write'); + late final _write = + _writePtr.asFunction, int)>(); - int mknod( - ffi.Pointer arg0, - int arg1, + int confstr( + int arg0, + ffi.Pointer arg1, int arg2, ) { - return _mknod( + return _confstr( arg0, arg1, arg2, ); } - late final _mknodPtr = _lookup< + late final _confstrPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, mode_t, dev_t)>>('mknod'); - late final _mknod = - _mknodPtr.asFunction, int, int)>(); + ffi.Size Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('confstr'); + late final _confstr = + _confstrPtr.asFunction, int)>(); - int mkpath_np( - ffi.Pointer path, - int omode, + int getopt( + int arg0, + ffi.Pointer> arg1, + ffi.Pointer arg2, ) { - return _mkpath_np( - path, - omode, + return _getopt( + arg0, + arg1, + arg2, ); } - late final _mkpath_npPtr = _lookup< - ffi.NativeFunction, mode_t)>>( - 'mkpath_np'); - late final _mkpath_np = - _mkpath_npPtr.asFunction, int)>(); - - int mkpathat_np( - int dfd, - ffi.Pointer path, - int omode, - ) { - return _mkpathat_np( - dfd, - path, - omode, - ); - } - - late final _mkpathat_npPtr = _lookup< + late final _getoptPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, mode_t)>>('mkpathat_np'); - late final _mkpathat_np = _mkpathat_npPtr - .asFunction, int)>(); + ffi.Int Function(ffi.Int, ffi.Pointer>, + ffi.Pointer)>>('getopt'); + late final _getopt = _getoptPtr.asFunction< + int Function( + int, ffi.Pointer>, ffi.Pointer)>(); - int mkstemps( - ffi.Pointer arg0, - int arg1, - ) { - return _mkstemps( - arg0, - arg1, - ); - } + late final ffi.Pointer> _optarg = + _lookup>('optarg'); - late final _mkstempsPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'mkstemps'); - late final _mkstemps = - _mkstempsPtr.asFunction, int)>(); + ffi.Pointer get optarg => _optarg.value; - int mkostemp( - ffi.Pointer path, - int oflags, - ) { - return _mkostemp( - path, - oflags, - ); - } + set optarg(ffi.Pointer value) => _optarg.value = value; - late final _mkostempPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'mkostemp'); - late final _mkostemp = - _mkostempPtr.asFunction, int)>(); + late final ffi.Pointer _optind = _lookup('optind'); - int mkostemps( - ffi.Pointer path, - int slen, - int oflags, - ) { - return _mkostemps( - path, - slen, - oflags, - ); - } + int get optind => _optind.value; - late final _mkostempsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int, ffi.Int)>>('mkostemps'); - late final _mkostemps = - _mkostempsPtr.asFunction, int, int)>(); + set optind(int value) => _optind.value = value; - int mkstemp_dprotected_np( - ffi.Pointer path, - int dpclass, - int dpflags, - ) { - return _mkstemp_dprotected_np( - path, - dpclass, - dpflags, - ); - } + late final ffi.Pointer _opterr = _lookup('opterr'); - late final _mkstemp_dprotected_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Int)>>('mkstemp_dprotected_np'); - late final _mkstemp_dprotected_np = _mkstemp_dprotected_npPtr - .asFunction, int, int)>(); + int get opterr => _opterr.value; - ffi.Pointer mkdtempat_np( - int dfd, - ffi.Pointer path, - ) { - return _mkdtempat_np( - dfd, - path, - ); - } + set opterr(int value) => _opterr.value = value; - late final _mkdtempat_npPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer)>>('mkdtempat_np'); - late final _mkdtempat_np = _mkdtempat_npPtr - .asFunction Function(int, ffi.Pointer)>(); + late final ffi.Pointer _optopt = _lookup('optopt'); - int mkstempsat_np( - int dfd, - ffi.Pointer path, - int slen, + int get optopt => _optopt.value; + + set optopt(int value) => _optopt.value = value; + + ffi.Pointer brk( + ffi.Pointer arg0, ) { - return _mkstempsat_np( - dfd, - path, - slen, + return _brk( + arg0, ); } - late final _mkstempsat_npPtr = _lookup< + late final _brkPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int)>>('mkstempsat_np'); - late final _mkstempsat_np = _mkstempsat_npPtr - .asFunction, int)>(); + ffi.Pointer Function(ffi.Pointer)>>('brk'); + late final _brk = _brkPtr + .asFunction Function(ffi.Pointer)>(); - int mkostempsat_np( - int dfd, - ffi.Pointer path, - int slen, - int oflags, + int chroot( + ffi.Pointer arg0, ) { - return _mkostempsat_np( - dfd, - path, - slen, - oflags, + return _chroot( + arg0, ); } - late final _mkostempsat_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Int)>>('mkostempsat_np'); - late final _mkostempsat_np = _mkostempsat_npPtr - .asFunction, int, int)>(); + late final _chrootPtr = + _lookup)>>( + 'chroot'); + late final _chroot = + _chrootPtr.asFunction)>(); - int nfssvc( - int arg0, - ffi.Pointer arg1, + ffi.Pointer crypt( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _nfssvc( + return _crypt( arg0, arg1, ); } - late final _nfssvcPtr = _lookup< - ffi.NativeFunction)>>( - 'nfssvc'); - late final _nfssvc = - _nfssvcPtr.asFunction)>(); + late final _cryptPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('crypt'); + late final _crypt = _cryptPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int profil( + void encrypt( ffi.Pointer arg0, int arg1, - int arg2, - int arg3, ) { - return _profil( + return _encrypt( arg0, arg1, - arg2, - arg3, ); } - late final _profilPtr = _lookup< + late final _encryptPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, - ffi.UnsignedInt)>>('profil'); - late final _profil = _profilPtr - .asFunction, int, int, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Int)>>('encrypt'); + late final _encrypt = + _encryptPtr.asFunction, int)>(); - int pthread_setugid_np( + int fchdir( int arg0, - int arg1, ) { - return _pthread_setugid_np( + return _fchdir( arg0, - arg1, ); } - late final _pthread_setugid_npPtr = - _lookup>( - 'pthread_setugid_np'); - late final _pthread_setugid_np = - _pthread_setugid_npPtr.asFunction(); + late final _fchdirPtr = + _lookup>('fchdir'); + late final _fchdir = _fchdirPtr.asFunction(); - int pthread_getugid_np( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return _pthread_getugid_np( - arg0, - arg1, - ); + int gethostid() { + return _gethostid(); } - late final _pthread_getugid_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('pthread_getugid_np'); - late final _pthread_getugid_np = _pthread_getugid_npPtr - .asFunction, ffi.Pointer)>(); + late final _gethostidPtr = + _lookup>('gethostid'); + late final _gethostid = _gethostidPtr.asFunction(); - int reboot( + int getpgid( int arg0, ) { - return _reboot( + return _getpgid( arg0, ); } - late final _rebootPtr = - _lookup>('reboot'); - late final _reboot = _rebootPtr.asFunction(); + late final _getpgidPtr = + _lookup>('getpgid'); + late final _getpgid = _getpgidPtr.asFunction(); - int revoke( - ffi.Pointer arg0, + int getsid( + int arg0, ) { - return _revoke( + return _getsid( arg0, ); } - late final _revokePtr = - _lookup)>>( - 'revoke'); - late final _revoke = - _revokePtr.asFunction)>(); + late final _getsidPtr = + _lookup>('getsid'); + late final _getsid = _getsidPtr.asFunction(); - int rcmd( - ffi.Pointer> arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, - ) { - return _rcmd( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, - ); + int getdtablesize() { + return _getdtablesize(); } - late final _rcmdPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('rcmd'); - late final _rcmd = _rcmdPtr.asFunction< - int Function( - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _getdtablesizePtr = + _lookup>('getdtablesize'); + late final _getdtablesize = _getdtablesizePtr.asFunction(); - int rcmd_af( - ffi.Pointer> arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, - int arg6, + int getpagesize() { + return _getpagesize(); + } + + late final _getpagesizePtr = + _lookup>('getpagesize'); + late final _getpagesize = _getpagesizePtr.asFunction(); + + ffi.Pointer getpass( + ffi.Pointer arg0, ) { - return _rcmd_af( + return _getpass( arg0, - arg1, - arg2, - arg3, - arg4, - arg5, - arg6, ); } - late final _rcmd_afPtr = _lookup< + late final _getpassPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('rcmd_af'); - late final _rcmd_af = _rcmd_afPtr.asFunction< - int Function( - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + ffi.Pointer Function(ffi.Pointer)>>('getpass'); + late final _getpass = _getpassPtr + .asFunction Function(ffi.Pointer)>(); - int rresvport( - ffi.Pointer arg0, + ffi.Pointer getwd( + ffi.Pointer arg0, ) { - return _rresvport( + return _getwd( arg0, ); } - late final _rresvportPtr = - _lookup)>>( - 'rresvport'); - late final _rresvport = - _rresvportPtr.asFunction)>(); + late final _getwdPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('getwd'); + late final _getwd = _getwdPtr + .asFunction Function(ffi.Pointer)>(); - int rresvport_af( - ffi.Pointer arg0, + int lchown( + ffi.Pointer arg0, int arg1, + int arg2, ) { - return _rresvport_af( + return _lchown( arg0, arg1, + arg2, ); } - late final _rresvport_afPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'rresvport_af'); - late final _rresvport_af = - _rresvport_afPtr.asFunction, int)>(); + late final _lchownPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('lchown'); + late final _lchown = + _lchownPtr.asFunction, int, int)>(); - int iruserok( + int lockf( int arg0, int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + int arg2, ) { - return _iruserok( + return _lockf( arg0, arg1, arg2, - arg3, ); } - late final _iruserokPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.UnsignedLong, ffi.Int, ffi.Pointer, - ffi.Pointer)>>('iruserok'); - late final _iruserok = _iruserokPtr.asFunction< - int Function(int, int, ffi.Pointer, ffi.Pointer)>(); + late final _lockfPtr = + _lookup>( + 'lockf'); + late final _lockf = _lockfPtr.asFunction(); - int iruserok_sa( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, + int nice( + int arg0, ) { - return _iruserok_sa( + return _nice( arg0, - arg1, - arg2, - arg3, - arg4, ); } - late final _iruserok_saPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer, ffi.Pointer)>>('iruserok_sa'); - late final _iruserok_sa = _iruserok_saPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer, - ffi.Pointer)>(); + late final _nicePtr = + _lookup>('nice'); + late final _nice = _nicePtr.asFunction(); - int ruserok( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + int pread( + int __fd, + ffi.Pointer __buf, + int __nbyte, + int __offset, ) { - return _ruserok( - arg0, - arg1, - arg2, - arg3, + return _pread( + __fd, + __buf, + __nbyte, + __offset, ); } - late final _ruserokPtr = _lookup< + late final _preadPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer, ffi.Pointer)>>('ruserok'); - late final _ruserok = _ruserokPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, - ffi.Pointer)>(); + ssize_t Function( + ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pread'); + late final _pread = _preadPtr + .asFunction, int, int)>(); - int setdomainname( - ffi.Pointer arg0, - int arg1, + int pwrite( + int __fd, + ffi.Pointer __buf, + int __nbyte, + int __offset, ) { - return _setdomainname( - arg0, - arg1, + return _pwrite( + __fd, + __buf, + __nbyte, + __offset, ); } - late final _setdomainnamePtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'setdomainname'); - late final _setdomainname = - _setdomainnamePtr.asFunction, int)>(); + late final _pwritePtr = _lookup< + ffi.NativeFunction< + ssize_t Function( + ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pwrite'); + late final _pwrite = _pwritePtr + .asFunction, int, int)>(); - int setgroups( + ffi.Pointer sbrk( int arg0, - ffi.Pointer arg1, ) { - return _setgroups( + return _sbrk( arg0, - arg1, ); } - late final _setgroupsPtr = _lookup< - ffi.NativeFunction)>>( - 'setgroups'); - late final _setgroups = - _setgroupsPtr.asFunction)>(); + late final _sbrkPtr = + _lookup Function(ffi.Int)>>( + 'sbrk'); + late final _sbrk = _sbrkPtr.asFunction Function(int)>(); - void sethostid( + int setpgrp() { + return _setpgrp(); + } + + late final _setpgrpPtr = + _lookup>('setpgrp'); + late final _setpgrp = _setpgrpPtr.asFunction(); + + int setregid( int arg0, + int arg1, ) { - return _sethostid( + return _setregid( arg0, + arg1, ); } - late final _sethostidPtr = - _lookup>('sethostid'); - late final _sethostid = _sethostidPtr.asFunction(); + late final _setregidPtr = + _lookup>('setregid'); + late final _setregid = _setregidPtr.asFunction(); - int sethostname( - ffi.Pointer arg0, + int setreuid( + int arg0, int arg1, ) { - return _sethostname( + return _setreuid( arg0, arg1, ); } - late final _sethostnamePtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sethostname'); - late final _sethostname = - _sethostnamePtr.asFunction, int)>(); + late final _setreuidPtr = + _lookup>('setreuid'); + late final _setreuid = _setreuidPtr.asFunction(); - int setlogin( + void sync1() { + return _sync1(); + } + + late final _sync1Ptr = + _lookup>('sync'); + late final _sync1 = _sync1Ptr.asFunction(); + + int truncate( ffi.Pointer arg0, + int arg1, ) { - return _setlogin( + return _truncate( arg0, + arg1, ); } - late final _setloginPtr = - _lookup)>>( - 'setlogin'); - late final _setlogin = - _setloginPtr.asFunction)>(); + late final _truncatePtr = _lookup< + ffi.NativeFunction, off_t)>>( + 'truncate'); + late final _truncate = + _truncatePtr.asFunction, int)>(); - ffi.Pointer setmode( - ffi.Pointer arg0, + int ualarm( + int arg0, + int arg1, ) { - return _setmode( + return _ualarm( arg0, + arg1, ); } - late final _setmodePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('setmode'); - late final _setmode = _setmodePtr - .asFunction Function(ffi.Pointer)>(); + late final _ualarmPtr = + _lookup>( + 'ualarm'); + late final _ualarm = _ualarmPtr.asFunction(); - int setrgid( + int usleep( int arg0, ) { - return _setrgid( + return _usleep( arg0, ); } - late final _setrgidPtr = - _lookup>('setrgid'); - late final _setrgid = _setrgidPtr.asFunction(); + late final _usleepPtr = + _lookup>('usleep'); + late final _usleep = _usleepPtr.asFunction(); - int setruid( + int vfork() { + return _vfork(); + } + + late final _vforkPtr = + _lookup>('vfork'); + late final _vfork = _vforkPtr.asFunction(); + + int fsync( int arg0, ) { - return _setruid( + return _fsync( arg0, ); } - late final _setruidPtr = - _lookup>('setruid'); - late final _setruid = _setruidPtr.asFunction(); + late final _fsyncPtr = + _lookup>('fsync'); + late final _fsync = _fsyncPtr.asFunction(); - int setsgroups_np( + int ftruncate( int arg0, - ffi.Pointer arg1, + int arg1, ) { - return _setsgroups_np( + return _ftruncate( arg0, arg1, ); } - late final _setsgroups_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer)>>('setsgroups_np'); - late final _setsgroups_np = _setsgroups_npPtr - .asFunction)>(); - - void setusershell() { - return _setusershell(); - } - - late final _setusershellPtr = - _lookup>('setusershell'); - late final _setusershell = _setusershellPtr.asFunction(); + late final _ftruncatePtr = + _lookup>( + 'ftruncate'); + late final _ftruncate = _ftruncatePtr.asFunction(); - int setwgroups_np( - int arg0, - ffi.Pointer arg1, + int getlogin_r( + ffi.Pointer arg0, + int arg1, ) { - return _setwgroups_np( + return _getlogin_r( arg0, arg1, ); } - late final _setwgroups_npPtr = _lookup< + late final _getlogin_rPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer)>>('setwgroups_np'); - late final _setwgroups_np = _setwgroups_npPtr - .asFunction)>(); + ffi.Int Function(ffi.Pointer, ffi.Size)>>('getlogin_r'); + late final _getlogin_r = + _getlogin_rPtr.asFunction, int)>(); - int strtofflags( - ffi.Pointer> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + int fchown( + int arg0, + int arg1, + int arg2, ) { - return _strtofflags( + return _fchown( arg0, arg1, arg2, ); } - late final _strtofflagsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('strtofflags'); - late final _strtofflags = _strtofflagsPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>(); + late final _fchownPtr = + _lookup>( + 'fchown'); + late final _fchown = _fchownPtr.asFunction(); - int swapon( + int gethostname( ffi.Pointer arg0, + int arg1, ) { - return _swapon( + return _gethostname( arg0, + arg1, ); } - late final _swaponPtr = - _lookup)>>( - 'swapon'); - late final _swapon = - _swaponPtr.asFunction)>(); - - int ttyslot() { - return _ttyslot(); - } - - late final _ttyslotPtr = - _lookup>('ttyslot'); - late final _ttyslot = _ttyslotPtr.asFunction(); + late final _gethostnamePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size)>>('gethostname'); + late final _gethostname = + _gethostnamePtr.asFunction, int)>(); - int undelete( + int readlink( ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _undelete( + return _readlink( arg0, + arg1, + arg2, ); } - late final _undeletePtr = - _lookup)>>( - 'undelete'); - late final _undelete = - _undeletePtr.asFunction)>(); + late final _readlinkPtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('readlink'); + late final _readlink = _readlinkPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int unwhiteout( - ffi.Pointer arg0, + int setegid( + int arg0, ) { - return _unwhiteout( + return _setegid( arg0, ); } - late final _unwhiteoutPtr = - _lookup)>>( - 'unwhiteout'); - late final _unwhiteout = - _unwhiteoutPtr.asFunction)>(); + late final _setegidPtr = + _lookup>('setegid'); + late final _setegid = _setegidPtr.asFunction(); - int syscall( + int seteuid( int arg0, ) { - return _syscall( + return _seteuid( arg0, ); } - late final _syscallPtr = - _lookup>('syscall'); - late final _syscall = _syscallPtr.asFunction(); + late final _seteuidPtr = + _lookup>('seteuid'); + late final _seteuid = _seteuidPtr.asFunction(); - int fgetattrlist( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + int symlink( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _fgetattrlist( + return _symlink( arg0, arg1, - arg2, - arg3, - arg4, ); } - late final _fgetattrlistPtr = _lookup< + late final _symlinkPtr = _lookup< ffi.NativeFunction< ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedInt)>>('fgetattrlist'); - late final _fgetattrlist = _fgetattrlistPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer, int, int)>(); + ffi.Pointer, ffi.Pointer)>>('symlink'); + late final _symlink = _symlinkPtr + .asFunction, ffi.Pointer)>(); - int fsetattrlist( + int pselect( int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, ) { - return _fsetattrlist( + return _pselect( arg0, arg1, arg2, arg3, arg4, + arg5, ); } - late final _fsetattrlistPtr = _lookup< + late final _pselectPtr = _lookup< ffi.NativeFunction< ffi.Int Function( ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedInt)>>('fsetattrlist'); - late final _fsetattrlist = _fsetattrlistPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer, int, int)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('pselect'); + late final _pselect = _pselectPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - int getattrlist( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + int select( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) { - return _getattrlist( + return _select( arg0, arg1, arg2, @@ -33324,168 +32584,135 @@ class NativeCupertinoHttp { ); } - late final _getattrlistPtr = _lookup< + late final _selectPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedInt)>>('getattrlist'); - late final _getattrlist = _getattrlistPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('select'); + late final _select = _selectPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int setattrlist( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + int accessx_np( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, int arg3, - int arg4, ) { - return _setattrlist( + return _accessx_np( arg0, arg1, arg2, arg3, - arg4, ); } - late final _setattrlistPtr = _lookup< + late final _accessx_npPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedInt)>>('setattrlist'); - late final _setattrlist = _setattrlistPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer, uid_t)>>('accessx_np'); + late final _accessx_np = _accessx_npPtr.asFunction< + int Function( + ffi.Pointer, int, ffi.Pointer, int)>(); - int exchangedata( + int acct( ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, ) { - return _exchangedata( + return _acct( arg0, - arg1, - arg2, ); } - late final _exchangedataPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('exchangedata'); - late final _exchangedata = _exchangedataPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _acctPtr = + _lookup)>>( + 'acct'); + late final _acct = _acctPtr.asFunction)>(); - int getdirentriesattr( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + int add_profil( + ffi.Pointer arg0, + int arg1, + int arg2, int arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, - ffi.Pointer arg6, - int arg7, ) { - return _getdirentriesattr( + return _add_profil( arg0, arg1, arg2, arg3, - arg4, - arg5, - arg6, - arg7, ); } - late final _getdirentriesattrPtr = _lookup< + late final _add_profilPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt)>>('getdirentriesattr'); - late final _getdirentriesattr = _getdirentriesattrPtr.asFunction< - int Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, + ffi.UnsignedInt)>>('add_profil'); + late final _add_profil = _add_profilPtr + .asFunction, int, int, int)>(); - int searchfs( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, - ffi.Pointer arg5, + void endusershell() { + return _endusershell(); + } + + late final _endusershellPtr = + _lookup>('endusershell'); + late final _endusershell = _endusershellPtr.asFunction(); + + int execvP( + ffi.Pointer __file, + ffi.Pointer __searchpath, + ffi.Pointer> __argv, ) { - return _searchfs( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _execvP( + __file, + __searchpath, + __argv, ); } - late final _searchfsPtr = _lookup< + late final _execvPPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer)>>('searchfs'); - late final _searchfs = _searchfsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('execvP'); + late final _execvP = _execvPPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - int fsctl( + ffi.Pointer fflagstostr( + int arg0, + ) { + return _fflagstostr( + arg0, + ); + } + + late final _fflagstostrPtr = _lookup< + ffi.NativeFunction Function(ffi.UnsignedLong)>>( + 'fflagstostr'); + late final _fflagstostr = + _fflagstostrPtr.asFunction Function(int)>(); + + int getdomainname( ffi.Pointer arg0, int arg1, - ffi.Pointer arg2, - int arg3, ) { - return _fsctl( + return _getdomainname( arg0, arg1, - arg2, - arg3, ); } - late final _fsctlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.UnsignedLong, - ffi.Pointer, ffi.UnsignedInt)>>('fsctl'); - late final _fsctl = _fsctlPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, int)>(); + late final _getdomainnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'getdomainname'); + late final _getdomainname = + _getdomainnamePtr.asFunction, int)>(); - int ffsctl( - int arg0, + int getgrouplist( + ffi.Pointer arg0, int arg1, - ffi.Pointer arg2, - int arg3, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _ffsctl( + return _getgrouplist( arg0, arg1, arg2, @@ -33493,56406 +32720,56819 @@ class NativeCupertinoHttp { ); } - late final _ffsctlPtr = _lookup< + late final _getgrouplistPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.UnsignedLong, ffi.Pointer, - ffi.UnsignedInt)>>('ffsctl'); - late final _ffsctl = _ffsctlPtr - .asFunction, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer, + ffi.Pointer)>>('getgrouplist'); + late final _getgrouplist = _getgrouplistPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); - int fsync_volume_np( - int arg0, - int arg1, + int gethostuuid( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _fsync_volume_np( + return _gethostuuid( arg0, arg1, ); } - late final _fsync_volume_npPtr = - _lookup>( - 'fsync_volume_np'); - late final _fsync_volume_np = - _fsync_volume_npPtr.asFunction(); + late final _gethostuuidPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('gethostuuid'); + late final _gethostuuid = _gethostuuidPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int sync_volume_np( - ffi.Pointer arg0, + int getmode( + ffi.Pointer arg0, int arg1, ) { - return _sync_volume_np( + return _getmode( arg0, arg1, ); } - late final _sync_volume_npPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sync_volume_np'); - late final _sync_volume_np = - _sync_volume_npPtr.asFunction, int)>(); - - late final ffi.Pointer _optreset = _lookup('optreset'); - - int get optreset => _optreset.value; - - set optreset(int value) => _optreset.value = value; + late final _getmodePtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'getmode'); + late final _getmode = + _getmodePtr.asFunction, int)>(); - int open( - ffi.Pointer arg0, - int arg1, + int getpeereid( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _open( + return _getpeereid( arg0, arg1, + arg2, ); } - late final _openPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'open'); - late final _open = - _openPtr.asFunction, int)>(); + late final _getpeereidPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Pointer)>>('getpeereid'); + late final _getpeereid = _getpeereidPtr + .asFunction, ffi.Pointer)>(); - int openat( - int arg0, - ffi.Pointer arg1, - int arg2, + int getsgroups_np( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _openat( + return _getsgroups_np( arg0, arg1, - arg2, ); } - late final _openatPtr = _lookup< + late final _getsgroups_npPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int)>>('openat'); - late final _openat = - _openatPtr.asFunction, int)>(); + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('getsgroups_np'); + late final _getsgroups_np = _getsgroups_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int creat( - ffi.Pointer arg0, - int arg1, + ffi.Pointer getusershell() { + return _getusershell(); + } + + late final _getusershellPtr = + _lookup Function()>>( + 'getusershell'); + late final _getusershell = + _getusershellPtr.asFunction Function()>(); + + int getwgroups_np( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _creat( + return _getwgroups_np( arg0, arg1, ); } - late final _creatPtr = _lookup< - ffi.NativeFunction, mode_t)>>( - 'creat'); - late final _creat = - _creatPtr.asFunction, int)>(); + late final _getwgroups_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('getwgroups_np'); + late final _getwgroups_np = _getwgroups_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int fcntl( - int arg0, + int initgroups( + ffi.Pointer arg0, int arg1, ) { - return _fcntl( + return _initgroups( arg0, arg1, ); } - late final _fcntlPtr = - _lookup>('fcntl'); - late final _fcntl = _fcntlPtr.asFunction(); + late final _initgroupsPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'initgroups'); + late final _initgroups = + _initgroupsPtr.asFunction, int)>(); - int openx_np( + int issetugid() { + return _issetugid(); + } + + late final _issetugidPtr = + _lookup>('issetugid'); + late final _issetugid = _issetugidPtr.asFunction(); + + ffi.Pointer mkdtemp( ffi.Pointer arg0, - int arg1, - filesec_t arg2, ) { - return _openx_np( + return _mkdtemp( arg0, - arg1, - arg2, ); } - late final _openx_npPtr = _lookup< + late final _mkdtempPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int, filesec_t)>>('openx_np'); - late final _openx_np = _openx_npPtr - .asFunction, int, filesec_t)>(); + ffi.Pointer Function(ffi.Pointer)>>('mkdtemp'); + late final _mkdtemp = _mkdtempPtr + .asFunction Function(ffi.Pointer)>(); - int open_dprotected_np( + int mknod( ffi.Pointer arg0, int arg1, int arg2, - int arg3, ) { - return _open_dprotected_np( + return _mknod( arg0, arg1, arg2, - arg3, ); } - late final _open_dprotected_npPtr = _lookup< + late final _mknodPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Int)>>('open_dprotected_np'); - late final _open_dprotected_np = _open_dprotected_npPtr - .asFunction, int, int, int)>(); + ffi.Int Function(ffi.Pointer, mode_t, dev_t)>>('mknod'); + late final _mknod = + _mknodPtr.asFunction, int, int)>(); - int flock1( - int arg0, - int arg1, + int mkpath_np( + ffi.Pointer path, + int omode, ) { - return _flock1( - arg0, - arg1, + return _mkpath_np( + path, + omode, ); } - late final _flock1Ptr = - _lookup>('flock'); - late final _flock1 = _flock1Ptr.asFunction(); + late final _mkpath_npPtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'mkpath_np'); + late final _mkpath_np = + _mkpath_npPtr.asFunction, int)>(); - filesec_t filesec_init() { - return _filesec_init(); + int mkpathat_np( + int dfd, + ffi.Pointer path, + int omode, + ) { + return _mkpathat_np( + dfd, + path, + omode, + ); } - late final _filesec_initPtr = - _lookup>('filesec_init'); - late final _filesec_init = - _filesec_initPtr.asFunction(); + late final _mkpathat_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, mode_t)>>('mkpathat_np'); + late final _mkpathat_np = _mkpathat_npPtr + .asFunction, int)>(); - filesec_t filesec_dup( - filesec_t arg0, + int mkstemps( + ffi.Pointer arg0, + int arg1, ) { - return _filesec_dup( + return _mkstemps( arg0, + arg1, ); } - late final _filesec_dupPtr = - _lookup>('filesec_dup'); - late final _filesec_dup = - _filesec_dupPtr.asFunction(); + late final _mkstempsPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'mkstemps'); + late final _mkstemps = + _mkstempsPtr.asFunction, int)>(); - void filesec_free( - filesec_t arg0, + int mkostemp( + ffi.Pointer path, + int oflags, ) { - return _filesec_free( - arg0, + return _mkostemp( + path, + oflags, ); } - late final _filesec_freePtr = - _lookup>('filesec_free'); - late final _filesec_free = - _filesec_freePtr.asFunction(); + late final _mkostempPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'mkostemp'); + late final _mkostemp = + _mkostempPtr.asFunction, int)>(); - int filesec_get_property( - filesec_t arg0, - int arg1, - ffi.Pointer arg2, + int mkostemps( + ffi.Pointer path, + int slen, + int oflags, ) { - return _filesec_get_property( - arg0, - arg1, - arg2, + return _mkostemps( + path, + slen, + oflags, ); } - late final _filesec_get_propertyPtr = _lookup< + late final _mkostempsPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(filesec_t, ffi.Int32, - ffi.Pointer)>>('filesec_get_property'); - late final _filesec_get_property = _filesec_get_propertyPtr - .asFunction)>(); + ffi.Int Function( + ffi.Pointer, ffi.Int, ffi.Int)>>('mkostemps'); + late final _mkostemps = + _mkostempsPtr.asFunction, int, int)>(); - int filesec_query_property( - filesec_t arg0, - int arg1, - ffi.Pointer arg2, + int mkstemp_dprotected_np( + ffi.Pointer path, + int dpclass, + int dpflags, ) { - return _filesec_query_property( - arg0, - arg1, - arg2, + return _mkstemp_dprotected_np( + path, + dpclass, + dpflags, ); } - late final _filesec_query_propertyPtr = _lookup< + late final _mkstemp_dprotected_npPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(filesec_t, ffi.Int32, - ffi.Pointer)>>('filesec_query_property'); - late final _filesec_query_property = _filesec_query_propertyPtr - .asFunction)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, + ffi.Int)>>('mkstemp_dprotected_np'); + late final _mkstemp_dprotected_np = _mkstemp_dprotected_npPtr + .asFunction, int, int)>(); - int filesec_set_property( - filesec_t arg0, - int arg1, - ffi.Pointer arg2, + ffi.Pointer mkdtempat_np( + int dfd, + ffi.Pointer path, ) { - return _filesec_set_property( - arg0, - arg1, - arg2, + return _mkdtempat_np( + dfd, + path, ); } - late final _filesec_set_propertyPtr = _lookup< + late final _mkdtempat_npPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(filesec_t, ffi.Int32, - ffi.Pointer)>>('filesec_set_property'); - late final _filesec_set_property = _filesec_set_propertyPtr - .asFunction)>(); + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('mkdtempat_np'); + late final _mkdtempat_np = _mkdtempat_npPtr + .asFunction Function(int, ffi.Pointer)>(); - int filesec_unset_property( - filesec_t arg0, - int arg1, + int mkstempsat_np( + int dfd, + ffi.Pointer path, + int slen, ) { - return _filesec_unset_property( - arg0, - arg1, + return _mkstempsat_np( + dfd, + path, + slen, ); } - late final _filesec_unset_propertyPtr = - _lookup>( - 'filesec_unset_property'); - late final _filesec_unset_property = - _filesec_unset_propertyPtr.asFunction(); + late final _mkstempsat_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int)>>('mkstempsat_np'); + late final _mkstempsat_np = _mkstempsat_npPtr + .asFunction, int)>(); - late final _class_OS_os_workgroup1 = _getClass1("OS_os_workgroup"); - int os_workgroup_copy_port( - os_workgroup_t wg, - ffi.Pointer mach_port_out, + int mkostempsat_np( + int dfd, + ffi.Pointer path, + int slen, + int oflags, ) { - return _os_workgroup_copy_port( - wg, - mach_port_out, + return _mkostempsat_np( + dfd, + path, + slen, + oflags, ); } - late final _os_workgroup_copy_portPtr = _lookup< + late final _mkostempsat_npPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(os_workgroup_t, - ffi.Pointer)>>('os_workgroup_copy_port'); - late final _os_workgroup_copy_port = _os_workgroup_copy_portPtr - .asFunction)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Int)>>('mkostempsat_np'); + late final _mkostempsat_np = _mkostempsat_npPtr + .asFunction, int, int)>(); - os_workgroup_t os_workgroup_create_with_port( - ffi.Pointer name, - int mach_port, + int nfssvc( + int arg0, + ffi.Pointer arg1, ) { - return _os_workgroup_create_with_port( - name, - mach_port, + return _nfssvc( + arg0, + arg1, ); } - late final _os_workgroup_create_with_portPtr = _lookup< - ffi.NativeFunction< - os_workgroup_t Function(ffi.Pointer, - mach_port_t)>>('os_workgroup_create_with_port'); - late final _os_workgroup_create_with_port = _os_workgroup_create_with_portPtr - .asFunction, int)>(); + late final _nfssvcPtr = _lookup< + ffi.NativeFunction)>>( + 'nfssvc'); + late final _nfssvc = + _nfssvcPtr.asFunction)>(); - os_workgroup_t os_workgroup_create_with_workgroup( - ffi.Pointer name, - os_workgroup_t wg, + int profil( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, ) { - return _os_workgroup_create_with_workgroup( - name, - wg, + return _profil( + arg0, + arg1, + arg2, + arg3, ); } - late final _os_workgroup_create_with_workgroupPtr = _lookup< + late final _profilPtr = _lookup< ffi.NativeFunction< - os_workgroup_t Function(ffi.Pointer, - os_workgroup_t)>>('os_workgroup_create_with_workgroup'); - late final _os_workgroup_create_with_workgroup = - _os_workgroup_create_with_workgroupPtr.asFunction< - os_workgroup_t Function(ffi.Pointer, os_workgroup_t)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, + ffi.UnsignedInt)>>('profil'); + late final _profil = _profilPtr + .asFunction, int, int, int)>(); - int os_workgroup_join( - os_workgroup_t wg, - os_workgroup_join_token_t token_out, + int pthread_setugid_np( + int arg0, + int arg1, ) { - return _os_workgroup_join( - wg, - token_out, + return _pthread_setugid_np( + arg0, + arg1, ); } - late final _os_workgroup_joinPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - os_workgroup_t, os_workgroup_join_token_t)>>('os_workgroup_join'); - late final _os_workgroup_join = _os_workgroup_joinPtr - .asFunction(); + late final _pthread_setugid_npPtr = + _lookup>( + 'pthread_setugid_np'); + late final _pthread_setugid_np = + _pthread_setugid_npPtr.asFunction(); - void os_workgroup_leave( - os_workgroup_t wg, - os_workgroup_join_token_t token, + int pthread_getugid_np( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _os_workgroup_leave( - wg, - token, + return _pthread_getugid_np( + arg0, + arg1, ); } - late final _os_workgroup_leavePtr = _lookup< + late final _pthread_getugid_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(os_workgroup_t, - os_workgroup_join_token_t)>>('os_workgroup_leave'); - late final _os_workgroup_leave = _os_workgroup_leavePtr - .asFunction(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('pthread_getugid_np'); + late final _pthread_getugid_np = _pthread_getugid_npPtr + .asFunction, ffi.Pointer)>(); - int os_workgroup_set_working_arena( - os_workgroup_t wg, - ffi.Pointer arena, - int max_workers, - os_workgroup_working_arena_destructor_t destructor, + int reboot( + int arg0, ) { - return _os_workgroup_set_working_arena( - wg, - arena, - max_workers, - destructor, + return _reboot( + arg0, ); } - late final _os_workgroup_set_working_arenaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(os_workgroup_t, ffi.Pointer, - ffi.Uint32, os_workgroup_working_arena_destructor_t)>>( - 'os_workgroup_set_working_arena'); - late final _os_workgroup_set_working_arena = - _os_workgroup_set_working_arenaPtr.asFunction< - int Function(os_workgroup_t, ffi.Pointer, int, - os_workgroup_working_arena_destructor_t)>(); + late final _rebootPtr = + _lookup>('reboot'); + late final _reboot = _rebootPtr.asFunction(); - ffi.Pointer os_workgroup_get_working_arena( - os_workgroup_t wg, - ffi.Pointer index_out, + int revoke( + ffi.Pointer arg0, ) { - return _os_workgroup_get_working_arena( - wg, - index_out, + return _revoke( + arg0, ); } - late final _os_workgroup_get_working_arenaPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - os_workgroup_t, ffi.Pointer)>>( - 'os_workgroup_get_working_arena'); - late final _os_workgroup_get_working_arena = - _os_workgroup_get_working_arenaPtr.asFunction< - ffi.Pointer Function( - os_workgroup_t, ffi.Pointer)>(); + late final _revokePtr = + _lookup)>>( + 'revoke'); + late final _revoke = + _revokePtr.asFunction)>(); - void os_workgroup_cancel( - os_workgroup_t wg, + int rcmd( + ffi.Pointer> arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, ) { - return _os_workgroup_cancel( - wg, + return _rcmd( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _os_workgroup_cancelPtr = - _lookup>( - 'os_workgroup_cancel'); - late final _os_workgroup_cancel = - _os_workgroup_cancelPtr.asFunction(); + late final _rcmdPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('rcmd'); + late final _rcmd = _rcmdPtr.asFunction< + int Function( + ffi.Pointer>, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - bool os_workgroup_testcancel( - os_workgroup_t wg, + int rcmd_af( + ffi.Pointer> arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + int arg6, ) { - return _os_workgroup_testcancel( - wg, + return _rcmd_af( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, ); } - late final _os_workgroup_testcancelPtr = - _lookup>( - 'os_workgroup_testcancel'); - late final _os_workgroup_testcancel = - _os_workgroup_testcancelPtr.asFunction(); + late final _rcmd_afPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>>('rcmd_af'); + late final _rcmd_af = _rcmd_afPtr.asFunction< + int Function( + ffi.Pointer>, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - int os_workgroup_max_parallel_threads( - os_workgroup_t wg, - os_workgroup_mpt_attr_t attr, + int rresvport( + ffi.Pointer arg0, ) { - return _os_workgroup_max_parallel_threads( - wg, - attr, + return _rresvport( + arg0, ); } - late final _os_workgroup_max_parallel_threadsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(os_workgroup_t, - os_workgroup_mpt_attr_t)>>('os_workgroup_max_parallel_threads'); - late final _os_workgroup_max_parallel_threads = - _os_workgroup_max_parallel_threadsPtr - .asFunction(); + late final _rresvportPtr = + _lookup)>>( + 'rresvport'); + late final _rresvport = + _rresvportPtr.asFunction)>(); - late final _class_OS_os_workgroup_interval1 = - _getClass1("OS_os_workgroup_interval"); - int os_workgroup_interval_start( - os_workgroup_interval_t wg, - int start, - int deadline, - os_workgroup_interval_data_t data, + int rresvport_af( + ffi.Pointer arg0, + int arg1, ) { - return _os_workgroup_interval_start( - wg, - start, - deadline, - data, + return _rresvport_af( + arg0, + arg1, ); } - late final _os_workgroup_interval_startPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, ffi.Uint64, - os_workgroup_interval_data_t)>>('os_workgroup_interval_start'); - late final _os_workgroup_interval_start = - _os_workgroup_interval_startPtr.asFunction< - int Function(os_workgroup_interval_t, int, int, - os_workgroup_interval_data_t)>(); + late final _rresvport_afPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'rresvport_af'); + late final _rresvport_af = + _rresvport_afPtr.asFunction, int)>(); - int os_workgroup_interval_update( - os_workgroup_interval_t wg, - int deadline, - os_workgroup_interval_data_t data, + int iruserok( + int arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _os_workgroup_interval_update( - wg, - deadline, - data, + return _iruserok( + arg0, + arg1, + arg2, + arg3, ); } - late final _os_workgroup_interval_updatePtr = _lookup< + late final _iruserokPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, - os_workgroup_interval_data_t)>>('os_workgroup_interval_update'); - late final _os_workgroup_interval_update = - _os_workgroup_interval_updatePtr.asFunction< - int Function( - os_workgroup_interval_t, int, os_workgroup_interval_data_t)>(); + ffi.Int Function(ffi.UnsignedLong, ffi.Int, ffi.Pointer, + ffi.Pointer)>>('iruserok'); + late final _iruserok = _iruserokPtr.asFunction< + int Function(int, int, ffi.Pointer, ffi.Pointer)>(); - int os_workgroup_interval_finish( - os_workgroup_interval_t wg, - os_workgroup_interval_data_t data, + int iruserok_sa( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) { - return _os_workgroup_interval_finish( - wg, - data, + return _iruserok_sa( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _os_workgroup_interval_finishPtr = _lookup< + late final _iruserok_saPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(os_workgroup_interval_t, - os_workgroup_interval_data_t)>>('os_workgroup_interval_finish'); - late final _os_workgroup_interval_finish = - _os_workgroup_interval_finishPtr.asFunction< - int Function( - os_workgroup_interval_t, os_workgroup_interval_data_t)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('iruserok_sa'); + late final _iruserok_sa = _iruserok_saPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer, + ffi.Pointer)>(); - late final _class_OS_os_workgroup_parallel1 = - _getClass1("OS_os_workgroup_parallel"); - os_workgroup_parallel_t os_workgroup_parallel_create( - ffi.Pointer name, - os_workgroup_attr_t attr, + int ruserok( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _os_workgroup_parallel_create( - name, - attr, + return _ruserok( + arg0, + arg1, + arg2, + arg3, ); } - late final _os_workgroup_parallel_createPtr = _lookup< + late final _ruserokPtr = _lookup< ffi.NativeFunction< - os_workgroup_parallel_t Function(ffi.Pointer, - os_workgroup_attr_t)>>('os_workgroup_parallel_create'); - late final _os_workgroup_parallel_create = - _os_workgroup_parallel_createPtr.asFunction< - os_workgroup_parallel_t Function( - ffi.Pointer, os_workgroup_attr_t)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('ruserok'); + late final _ruserok = _ruserokPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); - int dispatch_time( - int when, - int delta, + int setdomainname( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_time( - when, - delta, + return _setdomainname( + arg0, + arg1, ); } - late final _dispatch_timePtr = _lookup< - ffi.NativeFunction< - dispatch_time_t Function( - dispatch_time_t, ffi.Int64)>>('dispatch_time'); - late final _dispatch_time = - _dispatch_timePtr.asFunction(); + late final _setdomainnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'setdomainname'); + late final _setdomainname = + _setdomainnamePtr.asFunction, int)>(); - int dispatch_walltime( - ffi.Pointer when, - int delta, + int setgroups( + int arg0, + ffi.Pointer arg1, ) { - return _dispatch_walltime( - when, - delta, + return _setgroups( + arg0, + arg1, ); } - late final _dispatch_walltimePtr = _lookup< - ffi.NativeFunction< - dispatch_time_t Function( - ffi.Pointer, ffi.Int64)>>('dispatch_walltime'); - late final _dispatch_walltime = _dispatch_walltimePtr - .asFunction, int)>(); - - int qos_class_self() { - return _qos_class_self(); - } - - late final _qos_class_selfPtr = - _lookup>('qos_class_self'); - late final _qos_class_self = _qos_class_selfPtr.asFunction(); - - int qos_class_main() { - return _qos_class_main(); - } - - late final _qos_class_mainPtr = - _lookup>('qos_class_main'); - late final _qos_class_main = _qos_class_mainPtr.asFunction(); + late final _setgroupsPtr = _lookup< + ffi.NativeFunction)>>( + 'setgroups'); + late final _setgroups = + _setgroupsPtr.asFunction)>(); - void dispatch_retain( - dispatch_object_t object, + void sethostid( + int arg0, ) { - return _dispatch_retain( - object, + return _sethostid( + arg0, ); } - late final _dispatch_retainPtr = - _lookup>( - 'dispatch_retain'); - late final _dispatch_retain = - _dispatch_retainPtr.asFunction(); + late final _sethostidPtr = + _lookup>('sethostid'); + late final _sethostid = _sethostidPtr.asFunction(); - void dispatch_release( - dispatch_object_t object, + int sethostname( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_release( - object, + return _sethostname( + arg0, + arg1, ); } - late final _dispatch_releasePtr = - _lookup>( - 'dispatch_release'); - late final _dispatch_release = - _dispatch_releasePtr.asFunction(); + late final _sethostnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sethostname'); + late final _sethostname = + _sethostnamePtr.asFunction, int)>(); - ffi.Pointer dispatch_get_context( - dispatch_object_t object, + int setlogin( + ffi.Pointer arg0, ) { - return _dispatch_get_context( - object, + return _setlogin( + arg0, ); } - late final _dispatch_get_contextPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - dispatch_object_t)>>('dispatch_get_context'); - late final _dispatch_get_context = _dispatch_get_contextPtr - .asFunction Function(dispatch_object_t)>(); + late final _setloginPtr = + _lookup)>>( + 'setlogin'); + late final _setlogin = + _setloginPtr.asFunction)>(); - void dispatch_set_context( - dispatch_object_t object, - ffi.Pointer context, + ffi.Pointer setmode( + ffi.Pointer arg0, ) { - return _dispatch_set_context( - object, - context, + return _setmode( + arg0, ); } - late final _dispatch_set_contextPtr = _lookup< + late final _setmodePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, - ffi.Pointer)>>('dispatch_set_context'); - late final _dispatch_set_context = _dispatch_set_contextPtr - .asFunction)>(); + ffi.Pointer Function(ffi.Pointer)>>('setmode'); + late final _setmode = _setmodePtr + .asFunction Function(ffi.Pointer)>(); - void dispatch_set_finalizer_f( - dispatch_object_t object, - dispatch_function_t finalizer, + int setrgid( + int arg0, ) { - return _dispatch_set_finalizer_f( - object, - finalizer, + return _setrgid( + arg0, ); } - late final _dispatch_set_finalizer_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, - dispatch_function_t)>>('dispatch_set_finalizer_f'); - late final _dispatch_set_finalizer_f = _dispatch_set_finalizer_fPtr - .asFunction(); + late final _setrgidPtr = + _lookup>('setrgid'); + late final _setrgid = _setrgidPtr.asFunction(); - void dispatch_activate( - dispatch_object_t object, + int setruid( + int arg0, ) { - return _dispatch_activate( - object, + return _setruid( + arg0, ); } - late final _dispatch_activatePtr = - _lookup>( - 'dispatch_activate'); - late final _dispatch_activate = - _dispatch_activatePtr.asFunction(); + late final _setruidPtr = + _lookup>('setruid'); + late final _setruid = _setruidPtr.asFunction(); - void dispatch_suspend( - dispatch_object_t object, + int setsgroups_np( + int arg0, + ffi.Pointer arg1, ) { - return _dispatch_suspend( - object, + return _setsgroups_np( + arg0, + arg1, ); } - late final _dispatch_suspendPtr = - _lookup>( - 'dispatch_suspend'); - late final _dispatch_suspend = - _dispatch_suspendPtr.asFunction(); + late final _setsgroups_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer)>>('setsgroups_np'); + late final _setsgroups_np = _setsgroups_npPtr + .asFunction)>(); - void dispatch_resume( - dispatch_object_t object, - ) { - return _dispatch_resume( - object, - ); + void setusershell() { + return _setusershell(); } - late final _dispatch_resumePtr = - _lookup>( - 'dispatch_resume'); - late final _dispatch_resume = - _dispatch_resumePtr.asFunction(); + late final _setusershellPtr = + _lookup>('setusershell'); + late final _setusershell = _setusershellPtr.asFunction(); - void dispatch_set_qos_class_floor( - dispatch_object_t object, - int qos_class, - int relative_priority, + int setwgroups_np( + int arg0, + ffi.Pointer arg1, ) { - return _dispatch_set_qos_class_floor( - object, - qos_class, - relative_priority, + return _setwgroups_np( + arg0, + arg1, ); } - late final _dispatch_set_qos_class_floorPtr = _lookup< + late final _setwgroups_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, ffi.Int32, - ffi.Int)>>('dispatch_set_qos_class_floor'); - late final _dispatch_set_qos_class_floor = _dispatch_set_qos_class_floorPtr - .asFunction(); + ffi.Int Function( + ffi.Int, ffi.Pointer)>>('setwgroups_np'); + late final _setwgroups_np = _setwgroups_npPtr + .asFunction)>(); - int dispatch_wait( - ffi.Pointer object, - int timeout, + int strtofflags( + ffi.Pointer> arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _dispatch_wait( - object, - timeout, + return _strtofflags( + arg0, + arg1, + arg2, ); } - late final _dispatch_waitPtr = _lookup< + late final _strtofflagsPtr = _lookup< ffi.NativeFunction< - ffi.IntPtr Function( - ffi.Pointer, dispatch_time_t)>>('dispatch_wait'); - late final _dispatch_wait = - _dispatch_waitPtr.asFunction, int)>(); + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>('strtofflags'); + late final _strtofflags = _strtofflagsPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>(); - void dispatch_notify( - ffi.Pointer object, - dispatch_object_t queue, - dispatch_block_t notification_block, + int swapon( + ffi.Pointer arg0, ) { - return _dispatch_notify( - object, - queue, - notification_block, + return _swapon( + arg0, ); } - late final _dispatch_notifyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, dispatch_object_t, - dispatch_block_t)>>('dispatch_notify'); - late final _dispatch_notify = _dispatch_notifyPtr.asFunction< - void Function( - ffi.Pointer, dispatch_object_t, dispatch_block_t)>(); + late final _swaponPtr = + _lookup)>>( + 'swapon'); + late final _swapon = + _swaponPtr.asFunction)>(); - void dispatch_cancel( - ffi.Pointer object, - ) { - return _dispatch_cancel( - object, - ); + int ttyslot() { + return _ttyslot(); } - late final _dispatch_cancelPtr = - _lookup)>>( - 'dispatch_cancel'); - late final _dispatch_cancel = - _dispatch_cancelPtr.asFunction)>(); + late final _ttyslotPtr = + _lookup>('ttyslot'); + late final _ttyslot = _ttyslotPtr.asFunction(); - int dispatch_testcancel( - ffi.Pointer object, + int undelete( + ffi.Pointer arg0, ) { - return _dispatch_testcancel( - object, - ); + return _undelete( + arg0, + ); } - late final _dispatch_testcancelPtr = - _lookup)>>( - 'dispatch_testcancel'); - late final _dispatch_testcancel = - _dispatch_testcancelPtr.asFunction)>(); + late final _undeletePtr = + _lookup)>>( + 'undelete'); + late final _undelete = + _undeletePtr.asFunction)>(); - void dispatch_debug( - dispatch_object_t object, - ffi.Pointer message, + int unwhiteout( + ffi.Pointer arg0, ) { - return _dispatch_debug( - object, - message, + return _unwhiteout( + arg0, ); } - late final _dispatch_debugPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_object_t, ffi.Pointer)>>('dispatch_debug'); - late final _dispatch_debug = _dispatch_debugPtr - .asFunction)>(); + late final _unwhiteoutPtr = + _lookup)>>( + 'unwhiteout'); + late final _unwhiteout = + _unwhiteoutPtr.asFunction)>(); - void dispatch_debugv( - dispatch_object_t object, - ffi.Pointer message, - va_list ap, + int syscall( + int arg0, ) { - return _dispatch_debugv( - object, - message, - ap, + return _syscall( + arg0, ); } - late final _dispatch_debugvPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, ffi.Pointer, - va_list)>>('dispatch_debugv'); - late final _dispatch_debugv = _dispatch_debugvPtr.asFunction< - void Function(dispatch_object_t, ffi.Pointer, va_list)>(); + late final _syscallPtr = + _lookup>('syscall'); + late final _syscall = _syscallPtr.asFunction(); - void dispatch_async( - dispatch_queue_t queue, - dispatch_block_t block, + int fgetattrlist( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _dispatch_async( - queue, - block, + return _fgetattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_asyncPtr = _lookup< + late final _fgetattrlistPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_async'); - late final _dispatch_async = _dispatch_asyncPtr - .asFunction(); + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('fgetattrlist'); + late final _fgetattrlist = _fgetattrlistPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); - void dispatch_async_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int fsetattrlist( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _dispatch_async_f( - queue, - context, - work, + return _fsetattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_async_fPtr = _lookup< + late final _fsetattrlistPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_async_f'); - late final _dispatch_async_f = _dispatch_async_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('fsetattrlist'); + late final _fsetattrlist = _fsetattrlistPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); - void dispatch_sync( - dispatch_queue_t queue, - dispatch_block_t block, + int getattrlist( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _dispatch_sync( - queue, - block, + return _getattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_syncPtr = _lookup< + late final _getattrlistPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_sync'); - late final _dispatch_sync = _dispatch_syncPtr - .asFunction(); + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('getattrlist'); + late final _getattrlist = _getattrlistPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - void dispatch_sync_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int setattrlist( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _dispatch_sync_f( - queue, - context, - work, + return _setattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_sync_fPtr = _lookup< + late final _setattrlistPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_sync_f'); - late final _dispatch_sync_f = _dispatch_sync_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('setattrlist'); + late final _setattrlist = _setattrlistPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - void dispatch_async_and_wait( - dispatch_queue_t queue, - dispatch_block_t block, + int exchangedata( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _dispatch_async_and_wait( - queue, - block, + return _exchangedata( + arg0, + arg1, + arg2, ); } - late final _dispatch_async_and_waitPtr = _lookup< + late final _exchangedataPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_async_and_wait'); - late final _dispatch_async_and_wait = _dispatch_async_and_waitPtr - .asFunction(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedInt)>>('exchangedata'); + late final _exchangedata = _exchangedataPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - void dispatch_async_and_wait_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int getdirentriesattr( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + ffi.Pointer arg6, + int arg7, ) { - return _dispatch_async_and_wait_f( - queue, - context, - work, + return _getdirentriesattr( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, ); } - late final _dispatch_async_and_wait_fPtr = _lookup< + late final _getdirentriesattrPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_async_and_wait_f'); - late final _dispatch_async_and_wait_f = - _dispatch_async_and_wait_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt)>>('getdirentriesattr'); + late final _getdirentriesattr = _getdirentriesattrPtr.asFunction< + int Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - void dispatch_apply( - int iterations, - dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> block, + int searchfs( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + ffi.Pointer arg5, ) { - return _dispatch_apply( - iterations, - queue, - block, + return _searchfs( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _dispatch_applyPtr = _lookup< + late final _searchfsPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Size, dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_apply'); - late final _dispatch_apply = _dispatch_applyPtr.asFunction< - void Function(int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer)>>('searchfs'); + late final _searchfs = _searchfsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer)>(); - void dispatch_apply_f( - int iterations, - dispatch_queue_t queue, - ffi.Pointer context, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size)>> - work, + int fsctl( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + int arg3, ) { - return _dispatch_apply_f( - iterations, - queue, - context, - work, + return _fsctl( + arg0, + arg1, + arg2, + arg3, ); } - late final _dispatch_apply_fPtr = _lookup< + late final _fsctlPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Size, - dispatch_queue_t, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Size)>>)>>('dispatch_apply_f'); - late final _dispatch_apply_f = _dispatch_apply_fPtr.asFunction< - void Function( - int, - dispatch_queue_t, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size)>>)>(); - - dispatch_queue_t dispatch_get_current_queue() { - return _dispatch_get_current_queue(); - } - - late final _dispatch_get_current_queuePtr = - _lookup>( - 'dispatch_get_current_queue'); - late final _dispatch_get_current_queue = - _dispatch_get_current_queuePtr.asFunction(); - - late final ffi.Pointer __dispatch_main_q = - _lookup('_dispatch_main_q'); - - ffi.Pointer get _dispatch_main_q => __dispatch_main_q; + ffi.Int Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer, ffi.UnsignedInt)>>('fsctl'); + late final _fsctl = _fsctlPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, int)>(); - dispatch_queue_global_t dispatch_get_global_queue( - int identifier, - int flags, + int ffsctl( + int arg0, + int arg1, + ffi.Pointer arg2, + int arg3, ) { - return _dispatch_get_global_queue( - identifier, - flags, + return _ffsctl( + arg0, + arg1, + arg2, + arg3, ); } - late final _dispatch_get_global_queuePtr = _lookup< + late final _ffsctlPtr = _lookup< ffi.NativeFunction< - dispatch_queue_global_t Function( - ffi.IntPtr, uintptr_t)>>('dispatch_get_global_queue'); - late final _dispatch_get_global_queue = _dispatch_get_global_queuePtr - .asFunction(); + ffi.Int Function(ffi.Int, ffi.UnsignedLong, ffi.Pointer, + ffi.UnsignedInt)>>('ffsctl'); + late final _ffsctl = _ffsctlPtr + .asFunction, int)>(); - late final ffi.Pointer - __dispatch_queue_attr_concurrent = - _lookup('_dispatch_queue_attr_concurrent'); + int fsync_volume_np( + int arg0, + int arg1, + ) { + return _fsync_volume_np( + arg0, + arg1, + ); + } - ffi.Pointer get _dispatch_queue_attr_concurrent => - __dispatch_queue_attr_concurrent; + late final _fsync_volume_npPtr = + _lookup>( + 'fsync_volume_np'); + late final _fsync_volume_np = + _fsync_volume_npPtr.asFunction(); - dispatch_queue_attr_t dispatch_queue_attr_make_initially_inactive( - dispatch_queue_attr_t attr, + int sync_volume_np( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_queue_attr_make_initially_inactive( - attr, + return _sync_volume_np( + arg0, + arg1, ); } - late final _dispatch_queue_attr_make_initially_inactivePtr = _lookup< - ffi.NativeFunction< - dispatch_queue_attr_t Function(dispatch_queue_attr_t)>>( - 'dispatch_queue_attr_make_initially_inactive'); - late final _dispatch_queue_attr_make_initially_inactive = - _dispatch_queue_attr_make_initially_inactivePtr - .asFunction(); + late final _sync_volume_npPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sync_volume_np'); + late final _sync_volume_np = + _sync_volume_npPtr.asFunction, int)>(); - dispatch_queue_attr_t dispatch_queue_attr_make_with_autorelease_frequency( - dispatch_queue_attr_t attr, - int frequency, + late final ffi.Pointer _optreset = _lookup('optreset'); + + int get optreset => _optreset.value; + + set optreset(int value) => _optreset.value = value; + + int open( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_queue_attr_make_with_autorelease_frequency( - attr, - frequency, + return _open( + arg0, + arg1, ); } - late final _dispatch_queue_attr_make_with_autorelease_frequencyPtr = _lookup< - ffi.NativeFunction< - dispatch_queue_attr_t Function( - dispatch_queue_attr_t, ffi.Int32)>>( - 'dispatch_queue_attr_make_with_autorelease_frequency'); - late final _dispatch_queue_attr_make_with_autorelease_frequency = - _dispatch_queue_attr_make_with_autorelease_frequencyPtr.asFunction< - dispatch_queue_attr_t Function(dispatch_queue_attr_t, int)>(); + late final _openPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'open'); + late final _open = + _openPtr.asFunction, int)>(); - dispatch_queue_attr_t dispatch_queue_attr_make_with_qos_class( - dispatch_queue_attr_t attr, - int qos_class, - int relative_priority, + int openat( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _dispatch_queue_attr_make_with_qos_class( - attr, - qos_class, - relative_priority, + return _openat( + arg0, + arg1, + arg2, ); } - late final _dispatch_queue_attr_make_with_qos_classPtr = _lookup< + late final _openatPtr = _lookup< ffi.NativeFunction< - dispatch_queue_attr_t Function(dispatch_queue_attr_t, ffi.Int32, - ffi.Int)>>('dispatch_queue_attr_make_with_qos_class'); - late final _dispatch_queue_attr_make_with_qos_class = - _dispatch_queue_attr_make_with_qos_classPtr.asFunction< - dispatch_queue_attr_t Function(dispatch_queue_attr_t, int, int)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int)>>('openat'); + late final _openat = + _openatPtr.asFunction, int)>(); - dispatch_queue_t dispatch_queue_create_with_target( - ffi.Pointer label, - dispatch_queue_attr_t attr, - dispatch_queue_t target, + int creat( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_queue_create_with_target( - label, - attr, - target, + return _creat( + arg0, + arg1, ); } - late final _dispatch_queue_create_with_targetPtr = _lookup< - ffi.NativeFunction< - dispatch_queue_t Function( - ffi.Pointer, - dispatch_queue_attr_t, - dispatch_queue_t)>>('dispatch_queue_create_with_target'); - late final _dispatch_queue_create_with_target = - _dispatch_queue_create_with_targetPtr.asFunction< - dispatch_queue_t Function(ffi.Pointer, - dispatch_queue_attr_t, dispatch_queue_t)>(); + late final _creatPtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'creat'); + late final _creat = + _creatPtr.asFunction, int)>(); - dispatch_queue_t dispatch_queue_create( - ffi.Pointer label, - dispatch_queue_attr_t attr, + int fcntl( + int arg0, + int arg1, ) { - return _dispatch_queue_create( - label, - attr, + return _fcntl( + arg0, + arg1, ); } - late final _dispatch_queue_createPtr = _lookup< - ffi.NativeFunction< - dispatch_queue_t Function(ffi.Pointer, - dispatch_queue_attr_t)>>('dispatch_queue_create'); - late final _dispatch_queue_create = _dispatch_queue_createPtr.asFunction< - dispatch_queue_t Function( - ffi.Pointer, dispatch_queue_attr_t)>(); + late final _fcntlPtr = + _lookup>('fcntl'); + late final _fcntl = _fcntlPtr.asFunction(); - ffi.Pointer dispatch_queue_get_label( - dispatch_queue_t queue, + int openx_np( + ffi.Pointer arg0, + int arg1, + filesec_t arg2, ) { - return _dispatch_queue_get_label( - queue, + return _openx_np( + arg0, + arg1, + arg2, ); } - late final _dispatch_queue_get_labelPtr = _lookup< - ffi.NativeFunction Function(dispatch_queue_t)>>( - 'dispatch_queue_get_label'); - late final _dispatch_queue_get_label = _dispatch_queue_get_labelPtr - .asFunction Function(dispatch_queue_t)>(); + late final _openx_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int, filesec_t)>>('openx_np'); + late final _openx_np = _openx_npPtr + .asFunction, int, filesec_t)>(); - int dispatch_queue_get_qos_class( - dispatch_queue_t queue, - ffi.Pointer relative_priority_ptr, + int open_dprotected_np( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, ) { - return _dispatch_queue_get_qos_class( - queue, - relative_priority_ptr, + return _open_dprotected_np( + arg0, + arg1, + arg2, + arg3, ); } - late final _dispatch_queue_get_qos_classPtr = _lookup< + late final _open_dprotected_npPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(dispatch_queue_t, - ffi.Pointer)>>('dispatch_queue_get_qos_class'); - late final _dispatch_queue_get_qos_class = _dispatch_queue_get_qos_classPtr - .asFunction)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Int)>>('open_dprotected_np'); + late final _open_dprotected_np = _open_dprotected_npPtr + .asFunction, int, int, int)>(); - void dispatch_set_target_queue( - dispatch_object_t object, - dispatch_queue_t queue, + int openat_dprotected_np( + int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, + int arg4, ) { - return _dispatch_set_target_queue( - object, - queue, + return _openat_dprotected_np( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_set_target_queuePtr = _lookup< + late final _openat_dprotected_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, - dispatch_queue_t)>>('dispatch_set_target_queue'); - late final _dispatch_set_target_queue = _dispatch_set_target_queuePtr - .asFunction(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, ffi.Int, + ffi.Int)>>('openat_dprotected_np'); + late final _openat_dprotected_np = _openat_dprotected_npPtr + .asFunction, int, int, int)>(); - void dispatch_main() { - return _dispatch_main(); + int openat_authenticated_np( + int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, + ) { + return _openat_authenticated_np( + arg0, + arg1, + arg2, + arg3, + ); } - late final _dispatch_mainPtr = - _lookup>('dispatch_main'); - late final _dispatch_main = _dispatch_mainPtr.asFunction(); + late final _openat_authenticated_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Int)>>('openat_authenticated_np'); + late final _openat_authenticated_np = _openat_authenticated_npPtr + .asFunction, int, int)>(); - void dispatch_after( - int when, - dispatch_queue_t queue, - dispatch_block_t block, + int flock1( + int arg0, + int arg1, ) { - return _dispatch_after( - when, - queue, - block, + return _flock1( + arg0, + arg1, ); } - late final _dispatch_afterPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_time_t, dispatch_queue_t, - dispatch_block_t)>>('dispatch_after'); - late final _dispatch_after = _dispatch_afterPtr - .asFunction(); + late final _flock1Ptr = + _lookup>('flock'); + late final _flock1 = _flock1Ptr.asFunction(); - void dispatch_after_f( - int when, - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + filesec_t filesec_init() { + return _filesec_init(); + } + + late final _filesec_initPtr = + _lookup>('filesec_init'); + late final _filesec_init = + _filesec_initPtr.asFunction(); + + filesec_t filesec_dup( + filesec_t arg0, ) { - return _dispatch_after_f( - when, - queue, - context, - work, + return _filesec_dup( + arg0, ); } - late final _dispatch_after_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_time_t, dispatch_queue_t, - ffi.Pointer, dispatch_function_t)>>('dispatch_after_f'); - late final _dispatch_after_f = _dispatch_after_fPtr.asFunction< - void Function( - int, dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + late final _filesec_dupPtr = + _lookup>('filesec_dup'); + late final _filesec_dup = + _filesec_dupPtr.asFunction(); - void dispatch_barrier_async( - dispatch_queue_t queue, - dispatch_block_t block, + void filesec_free( + filesec_t arg0, ) { - return _dispatch_barrier_async( - queue, - block, + return _filesec_free( + arg0, ); } - late final _dispatch_barrier_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_async'); - late final _dispatch_barrier_async = _dispatch_barrier_asyncPtr - .asFunction(); + late final _filesec_freePtr = + _lookup>('filesec_free'); + late final _filesec_free = + _filesec_freePtr.asFunction(); - void dispatch_barrier_async_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int filesec_get_property( + filesec_t arg0, + int arg1, + ffi.Pointer arg2, ) { - return _dispatch_barrier_async_f( - queue, - context, - work, + return _filesec_get_property( + arg0, + arg1, + arg2, ); } - late final _dispatch_barrier_async_fPtr = _lookup< + late final _filesec_get_propertyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_barrier_async_f'); - late final _dispatch_barrier_async_f = - _dispatch_barrier_async_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + ffi.Int Function(filesec_t, ffi.Int32, + ffi.Pointer)>>('filesec_get_property'); + late final _filesec_get_property = _filesec_get_propertyPtr + .asFunction)>(); - void dispatch_barrier_sync( - dispatch_queue_t queue, - dispatch_block_t block, + int filesec_query_property( + filesec_t arg0, + int arg1, + ffi.Pointer arg2, ) { - return _dispatch_barrier_sync( - queue, - block, + return _filesec_query_property( + arg0, + arg1, + arg2, ); } - late final _dispatch_barrier_syncPtr = _lookup< + late final _filesec_query_propertyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_sync'); - late final _dispatch_barrier_sync = _dispatch_barrier_syncPtr - .asFunction(); + ffi.Int Function(filesec_t, ffi.Int32, + ffi.Pointer)>>('filesec_query_property'); + late final _filesec_query_property = _filesec_query_propertyPtr + .asFunction)>(); - void dispatch_barrier_sync_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int filesec_set_property( + filesec_t arg0, + int arg1, + ffi.Pointer arg2, ) { - return _dispatch_barrier_sync_f( - queue, - context, - work, + return _filesec_set_property( + arg0, + arg1, + arg2, ); } - late final _dispatch_barrier_sync_fPtr = _lookup< + late final _filesec_set_propertyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_barrier_sync_f'); - late final _dispatch_barrier_sync_f = _dispatch_barrier_sync_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + ffi.Int Function(filesec_t, ffi.Int32, + ffi.Pointer)>>('filesec_set_property'); + late final _filesec_set_property = _filesec_set_propertyPtr + .asFunction)>(); - void dispatch_barrier_async_and_wait( - dispatch_queue_t queue, - dispatch_block_t block, + int filesec_unset_property( + filesec_t arg0, + int arg1, ) { - return _dispatch_barrier_async_and_wait( - queue, - block, + return _filesec_unset_property( + arg0, + arg1, ); } - late final _dispatch_barrier_async_and_waitPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, - dispatch_block_t)>>('dispatch_barrier_async_and_wait'); - late final _dispatch_barrier_async_and_wait = - _dispatch_barrier_async_and_waitPtr - .asFunction(); + late final _filesec_unset_propertyPtr = + _lookup>( + 'filesec_unset_property'); + late final _filesec_unset_property = + _filesec_unset_propertyPtr.asFunction(); - void dispatch_barrier_async_and_wait_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + late final _class_OS_os_workgroup1 = _getClass1("OS_os_workgroup"); + int os_workgroup_copy_port( + os_workgroup_t wg, + ffi.Pointer mach_port_out, ) { - return _dispatch_barrier_async_and_wait_f( - queue, - context, - work, + return _os_workgroup_copy_port( + wg, + mach_port_out, ); } - late final _dispatch_barrier_async_and_wait_fPtr = _lookup< + late final _os_workgroup_copy_portPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_barrier_async_and_wait_f'); - late final _dispatch_barrier_async_and_wait_f = - _dispatch_barrier_async_and_wait_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + ffi.Int Function(os_workgroup_t, + ffi.Pointer)>>('os_workgroup_copy_port'); + late final _os_workgroup_copy_port = _os_workgroup_copy_portPtr + .asFunction)>(); - void dispatch_queue_set_specific( - dispatch_queue_t queue, - ffi.Pointer key, - ffi.Pointer context, - dispatch_function_t destructor, + os_workgroup_t os_workgroup_create_with_port( + ffi.Pointer name, + int mach_port, ) { - return _dispatch_queue_set_specific( - queue, - key, - context, - destructor, + return _os_workgroup_create_with_port( + name, + mach_port, ); } - late final _dispatch_queue_set_specificPtr = _lookup< + late final _os_workgroup_create_with_portPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, - ffi.Pointer, - ffi.Pointer, - dispatch_function_t)>>('dispatch_queue_set_specific'); - late final _dispatch_queue_set_specific = - _dispatch_queue_set_specificPtr.asFunction< - void Function(dispatch_queue_t, ffi.Pointer, - ffi.Pointer, dispatch_function_t)>(); + os_workgroup_t Function(ffi.Pointer, + mach_port_t)>>('os_workgroup_create_with_port'); + late final _os_workgroup_create_with_port = _os_workgroup_create_with_portPtr + .asFunction, int)>(); - ffi.Pointer dispatch_queue_get_specific( - dispatch_queue_t queue, - ffi.Pointer key, + os_workgroup_t os_workgroup_create_with_workgroup( + ffi.Pointer name, + os_workgroup_t wg, ) { - return _dispatch_queue_get_specific( - queue, - key, + return _os_workgroup_create_with_workgroup( + name, + wg, ); } - late final _dispatch_queue_get_specificPtr = _lookup< + late final _os_workgroup_create_with_workgroupPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(dispatch_queue_t, - ffi.Pointer)>>('dispatch_queue_get_specific'); - late final _dispatch_queue_get_specific = - _dispatch_queue_get_specificPtr.asFunction< - ffi.Pointer Function( - dispatch_queue_t, ffi.Pointer)>(); + os_workgroup_t Function(ffi.Pointer, + os_workgroup_t)>>('os_workgroup_create_with_workgroup'); + late final _os_workgroup_create_with_workgroup = + _os_workgroup_create_with_workgroupPtr.asFunction< + os_workgroup_t Function(ffi.Pointer, os_workgroup_t)>(); - ffi.Pointer dispatch_get_specific( - ffi.Pointer key, + int os_workgroup_join( + os_workgroup_t wg, + os_workgroup_join_token_t token_out, ) { - return _dispatch_get_specific( - key, + return _os_workgroup_join( + wg, + token_out, ); } - late final _dispatch_get_specificPtr = _lookup< + late final _os_workgroup_joinPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('dispatch_get_specific'); - late final _dispatch_get_specific = _dispatch_get_specificPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Int Function( + os_workgroup_t, os_workgroup_join_token_t)>>('os_workgroup_join'); + late final _os_workgroup_join = _os_workgroup_joinPtr + .asFunction(); - void dispatch_assert_queue( - dispatch_queue_t queue, + void os_workgroup_leave( + os_workgroup_t wg, + os_workgroup_join_token_t token, ) { - return _dispatch_assert_queue( - queue, + return _os_workgroup_leave( + wg, + token, ); } - late final _dispatch_assert_queuePtr = - _lookup>( - 'dispatch_assert_queue'); - late final _dispatch_assert_queue = - _dispatch_assert_queuePtr.asFunction(); + late final _os_workgroup_leavePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(os_workgroup_t, + os_workgroup_join_token_t)>>('os_workgroup_leave'); + late final _os_workgroup_leave = _os_workgroup_leavePtr + .asFunction(); - void dispatch_assert_queue_barrier( - dispatch_queue_t queue, + int os_workgroup_set_working_arena( + os_workgroup_t wg, + ffi.Pointer arena, + int max_workers, + os_workgroup_working_arena_destructor_t destructor, ) { - return _dispatch_assert_queue_barrier( - queue, + return _os_workgroup_set_working_arena( + wg, + arena, + max_workers, + destructor, ); } - late final _dispatch_assert_queue_barrierPtr = - _lookup>( - 'dispatch_assert_queue_barrier'); - late final _dispatch_assert_queue_barrier = _dispatch_assert_queue_barrierPtr - .asFunction(); + late final _os_workgroup_set_working_arenaPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_t, ffi.Pointer, + ffi.Uint32, os_workgroup_working_arena_destructor_t)>>( + 'os_workgroup_set_working_arena'); + late final _os_workgroup_set_working_arena = + _os_workgroup_set_working_arenaPtr.asFunction< + int Function(os_workgroup_t, ffi.Pointer, int, + os_workgroup_working_arena_destructor_t)>(); - void dispatch_assert_queue_not( - dispatch_queue_t queue, + ffi.Pointer os_workgroup_get_working_arena( + os_workgroup_t wg, + ffi.Pointer index_out, ) { - return _dispatch_assert_queue_not( - queue, + return _os_workgroup_get_working_arena( + wg, + index_out, ); } - late final _dispatch_assert_queue_notPtr = - _lookup>( - 'dispatch_assert_queue_not'); - late final _dispatch_assert_queue_not = _dispatch_assert_queue_notPtr - .asFunction(); + late final _os_workgroup_get_working_arenaPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + os_workgroup_t, ffi.Pointer)>>( + 'os_workgroup_get_working_arena'); + late final _os_workgroup_get_working_arena = + _os_workgroup_get_working_arenaPtr.asFunction< + ffi.Pointer Function( + os_workgroup_t, ffi.Pointer)>(); - dispatch_block_t dispatch_block_create( - int flags, - dispatch_block_t block, + void os_workgroup_cancel( + os_workgroup_t wg, ) { - return _dispatch_block_create( - flags, - block, + return _os_workgroup_cancel( + wg, ); } - late final _dispatch_block_createPtr = _lookup< - ffi.NativeFunction< - dispatch_block_t Function( - ffi.Int32, dispatch_block_t)>>('dispatch_block_create'); - late final _dispatch_block_create = _dispatch_block_createPtr - .asFunction(); + late final _os_workgroup_cancelPtr = + _lookup>( + 'os_workgroup_cancel'); + late final _os_workgroup_cancel = + _os_workgroup_cancelPtr.asFunction(); - dispatch_block_t dispatch_block_create_with_qos_class( - int flags, - int qos_class, - int relative_priority, - dispatch_block_t block, + bool os_workgroup_testcancel( + os_workgroup_t wg, ) { - return _dispatch_block_create_with_qos_class( - flags, - qos_class, - relative_priority, - block, + return _os_workgroup_testcancel( + wg, ); } - late final _dispatch_block_create_with_qos_classPtr = _lookup< - ffi.NativeFunction< - dispatch_block_t Function(ffi.Int32, ffi.Int32, ffi.Int, - dispatch_block_t)>>('dispatch_block_create_with_qos_class'); - late final _dispatch_block_create_with_qos_class = - _dispatch_block_create_with_qos_classPtr.asFunction< - dispatch_block_t Function(int, int, int, dispatch_block_t)>(); + late final _os_workgroup_testcancelPtr = + _lookup>( + 'os_workgroup_testcancel'); + late final _os_workgroup_testcancel = + _os_workgroup_testcancelPtr.asFunction(); - void dispatch_block_perform( - int flags, - dispatch_block_t block, + int os_workgroup_max_parallel_threads( + os_workgroup_t wg, + os_workgroup_mpt_attr_t attr, ) { - return _dispatch_block_perform( - flags, - block, + return _os_workgroup_max_parallel_threads( + wg, + attr, ); } - late final _dispatch_block_performPtr = _lookup< - ffi.NativeFunction>( - 'dispatch_block_perform'); - late final _dispatch_block_perform = _dispatch_block_performPtr - .asFunction(); + late final _os_workgroup_max_parallel_threadsPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_t, + os_workgroup_mpt_attr_t)>>('os_workgroup_max_parallel_threads'); + late final _os_workgroup_max_parallel_threads = + _os_workgroup_max_parallel_threadsPtr + .asFunction(); - int dispatch_block_wait( - dispatch_block_t block, - int timeout, + late final _class_OS_os_workgroup_interval1 = + _getClass1("OS_os_workgroup_interval"); + int os_workgroup_interval_start( + os_workgroup_interval_t wg, + int start, + int deadline, + os_workgroup_interval_data_t data, ) { - return _dispatch_block_wait( - block, - timeout, + return _os_workgroup_interval_start( + wg, + start, + deadline, + data, ); } - late final _dispatch_block_waitPtr = _lookup< + late final _os_workgroup_interval_startPtr = _lookup< ffi.NativeFunction< - ffi.IntPtr Function( - dispatch_block_t, dispatch_time_t)>>('dispatch_block_wait'); - late final _dispatch_block_wait = - _dispatch_block_waitPtr.asFunction(); + ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, ffi.Uint64, + os_workgroup_interval_data_t)>>('os_workgroup_interval_start'); + late final _os_workgroup_interval_start = + _os_workgroup_interval_startPtr.asFunction< + int Function(os_workgroup_interval_t, int, int, + os_workgroup_interval_data_t)>(); - void dispatch_block_notify( - dispatch_block_t block, - dispatch_queue_t queue, - dispatch_block_t notification_block, + int os_workgroup_interval_update( + os_workgroup_interval_t wg, + int deadline, + os_workgroup_interval_data_t data, ) { - return _dispatch_block_notify( - block, - queue, - notification_block, + return _os_workgroup_interval_update( + wg, + deadline, + data, ); } - late final _dispatch_block_notifyPtr = _lookup< + late final _os_workgroup_interval_updatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_block_t, dispatch_queue_t, - dispatch_block_t)>>('dispatch_block_notify'); - late final _dispatch_block_notify = _dispatch_block_notifyPtr.asFunction< - void Function(dispatch_block_t, dispatch_queue_t, dispatch_block_t)>(); + ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, + os_workgroup_interval_data_t)>>('os_workgroup_interval_update'); + late final _os_workgroup_interval_update = + _os_workgroup_interval_updatePtr.asFunction< + int Function( + os_workgroup_interval_t, int, os_workgroup_interval_data_t)>(); - void dispatch_block_cancel( - dispatch_block_t block, + int os_workgroup_interval_finish( + os_workgroup_interval_t wg, + os_workgroup_interval_data_t data, ) { - return _dispatch_block_cancel( - block, + return _os_workgroup_interval_finish( + wg, + data, ); } - late final _dispatch_block_cancelPtr = - _lookup>( - 'dispatch_block_cancel'); - late final _dispatch_block_cancel = - _dispatch_block_cancelPtr.asFunction(); + late final _os_workgroup_interval_finishPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_interval_t, + os_workgroup_interval_data_t)>>('os_workgroup_interval_finish'); + late final _os_workgroup_interval_finish = + _os_workgroup_interval_finishPtr.asFunction< + int Function( + os_workgroup_interval_t, os_workgroup_interval_data_t)>(); - int dispatch_block_testcancel( - dispatch_block_t block, + late final _class_OS_os_workgroup_parallel1 = + _getClass1("OS_os_workgroup_parallel"); + os_workgroup_parallel_t os_workgroup_parallel_create( + ffi.Pointer name, + os_workgroup_attr_t attr, ) { - return _dispatch_block_testcancel( - block, + return _os_workgroup_parallel_create( + name, + attr, ); } - late final _dispatch_block_testcancelPtr = - _lookup>( - 'dispatch_block_testcancel'); - late final _dispatch_block_testcancel = _dispatch_block_testcancelPtr - .asFunction(); - - late final ffi.Pointer _KERNEL_SECURITY_TOKEN = - _lookup('KERNEL_SECURITY_TOKEN'); - - security_token_t get KERNEL_SECURITY_TOKEN => _KERNEL_SECURITY_TOKEN.ref; - - late final ffi.Pointer _KERNEL_AUDIT_TOKEN = - _lookup('KERNEL_AUDIT_TOKEN'); - - audit_token_t get KERNEL_AUDIT_TOKEN => _KERNEL_AUDIT_TOKEN.ref; + late final _os_workgroup_parallel_createPtr = _lookup< + ffi.NativeFunction< + os_workgroup_parallel_t Function(ffi.Pointer, + os_workgroup_attr_t)>>('os_workgroup_parallel_create'); + late final _os_workgroup_parallel_create = + _os_workgroup_parallel_createPtr.asFunction< + os_workgroup_parallel_t Function( + ffi.Pointer, os_workgroup_attr_t)>(); - int mach_msg_overwrite( - ffi.Pointer msg, - int option, - int send_size, - int rcv_size, - int rcv_name, - int timeout, - int notify, - ffi.Pointer rcv_msg, - int rcv_limit, + int dispatch_time( + int when, + int delta, ) { - return _mach_msg_overwrite( - msg, - option, - send_size, - rcv_size, - rcv_name, - timeout, - notify, - rcv_msg, - rcv_limit, + return _dispatch_time( + when, + delta, ); } - late final _mach_msg_overwritePtr = _lookup< + late final _dispatch_timePtr = _lookup< ffi.NativeFunction< - mach_msg_return_t Function( - ffi.Pointer, - mach_msg_option_t, - mach_msg_size_t, - mach_msg_size_t, - mach_port_name_t, - mach_msg_timeout_t, - mach_port_name_t, - ffi.Pointer, - mach_msg_size_t)>>('mach_msg_overwrite'); - late final _mach_msg_overwrite = _mach_msg_overwritePtr.asFunction< - int Function(ffi.Pointer, int, int, int, int, int, int, - ffi.Pointer, int)>(); + dispatch_time_t Function( + dispatch_time_t, ffi.Int64)>>('dispatch_time'); + late final _dispatch_time = + _dispatch_timePtr.asFunction(); - int mach_msg( - ffi.Pointer msg, - int option, - int send_size, - int rcv_size, - int rcv_name, - int timeout, - int notify, + int dispatch_walltime( + ffi.Pointer when, + int delta, ) { - return _mach_msg( - msg, - option, - send_size, - rcv_size, - rcv_name, - timeout, - notify, + return _dispatch_walltime( + when, + delta, ); } - late final _mach_msgPtr = _lookup< + late final _dispatch_walltimePtr = _lookup< ffi.NativeFunction< - mach_msg_return_t Function( - ffi.Pointer, - mach_msg_option_t, - mach_msg_size_t, - mach_msg_size_t, - mach_port_name_t, - mach_msg_timeout_t, - mach_port_name_t)>>('mach_msg'); - late final _mach_msg = _mach_msgPtr.asFunction< - int Function( - ffi.Pointer, int, int, int, int, int, int)>(); + dispatch_time_t Function( + ffi.Pointer, ffi.Int64)>>('dispatch_walltime'); + late final _dispatch_walltime = _dispatch_walltimePtr + .asFunction, int)>(); - int mach_voucher_deallocate( - int voucher, - ) { - return _mach_voucher_deallocate( - voucher, - ); + int qos_class_self() { + return _qos_class_self(); } - late final _mach_voucher_deallocatePtr = - _lookup>( - 'mach_voucher_deallocate'); - late final _mach_voucher_deallocate = - _mach_voucher_deallocatePtr.asFunction(); - - late final ffi.Pointer - __dispatch_source_type_data_add = - _lookup('_dispatch_source_type_data_add'); - - ffi.Pointer get _dispatch_source_type_data_add => - __dispatch_source_type_data_add; - - late final ffi.Pointer - __dispatch_source_type_data_or = - _lookup('_dispatch_source_type_data_or'); - - ffi.Pointer get _dispatch_source_type_data_or => - __dispatch_source_type_data_or; - - late final ffi.Pointer - __dispatch_source_type_data_replace = - _lookup('_dispatch_source_type_data_replace'); - - ffi.Pointer get _dispatch_source_type_data_replace => - __dispatch_source_type_data_replace; - - late final ffi.Pointer - __dispatch_source_type_mach_send = - _lookup('_dispatch_source_type_mach_send'); - - ffi.Pointer get _dispatch_source_type_mach_send => - __dispatch_source_type_mach_send; - - late final ffi.Pointer - __dispatch_source_type_mach_recv = - _lookup('_dispatch_source_type_mach_recv'); - - ffi.Pointer get _dispatch_source_type_mach_recv => - __dispatch_source_type_mach_recv; - - late final ffi.Pointer - __dispatch_source_type_memorypressure = - _lookup('_dispatch_source_type_memorypressure'); - - ffi.Pointer - get _dispatch_source_type_memorypressure => - __dispatch_source_type_memorypressure; - - late final ffi.Pointer __dispatch_source_type_proc = - _lookup('_dispatch_source_type_proc'); - - ffi.Pointer get _dispatch_source_type_proc => - __dispatch_source_type_proc; - - late final ffi.Pointer __dispatch_source_type_read = - _lookup('_dispatch_source_type_read'); - - ffi.Pointer get _dispatch_source_type_read => - __dispatch_source_type_read; - - late final ffi.Pointer __dispatch_source_type_signal = - _lookup('_dispatch_source_type_signal'); - - ffi.Pointer get _dispatch_source_type_signal => - __dispatch_source_type_signal; - - late final ffi.Pointer __dispatch_source_type_timer = - _lookup('_dispatch_source_type_timer'); - - ffi.Pointer get _dispatch_source_type_timer => - __dispatch_source_type_timer; - - late final ffi.Pointer __dispatch_source_type_vnode = - _lookup('_dispatch_source_type_vnode'); - - ffi.Pointer get _dispatch_source_type_vnode => - __dispatch_source_type_vnode; + late final _qos_class_selfPtr = + _lookup>('qos_class_self'); + late final _qos_class_self = _qos_class_selfPtr.asFunction(); - late final ffi.Pointer __dispatch_source_type_write = - _lookup('_dispatch_source_type_write'); + int qos_class_main() { + return _qos_class_main(); + } - ffi.Pointer get _dispatch_source_type_write => - __dispatch_source_type_write; + late final _qos_class_mainPtr = + _lookup>('qos_class_main'); + late final _qos_class_main = _qos_class_mainPtr.asFunction(); - dispatch_source_t dispatch_source_create( - dispatch_source_type_t type, - int handle, - int mask, - dispatch_queue_t queue, + void dispatch_retain( + dispatch_object_t object, ) { - return _dispatch_source_create( - type, - handle, - mask, - queue, + return _dispatch_retain( + object, ); } - late final _dispatch_source_createPtr = _lookup< - ffi.NativeFunction< - dispatch_source_t Function(dispatch_source_type_t, uintptr_t, - uintptr_t, dispatch_queue_t)>>('dispatch_source_create'); - late final _dispatch_source_create = _dispatch_source_createPtr.asFunction< - dispatch_source_t Function( - dispatch_source_type_t, int, int, dispatch_queue_t)>(); + late final _dispatch_retainPtr = + _lookup>( + 'dispatch_retain'); + late final _dispatch_retain = + _dispatch_retainPtr.asFunction(); - void dispatch_source_set_event_handler( - dispatch_source_t source, - dispatch_block_t handler, + void dispatch_release( + dispatch_object_t object, ) { - return _dispatch_source_set_event_handler( - source, - handler, + return _dispatch_release( + object, ); } - late final _dispatch_source_set_event_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_block_t)>>('dispatch_source_set_event_handler'); - late final _dispatch_source_set_event_handler = - _dispatch_source_set_event_handlerPtr - .asFunction(); + late final _dispatch_releasePtr = + _lookup>( + 'dispatch_release'); + late final _dispatch_release = + _dispatch_releasePtr.asFunction(); - void dispatch_source_set_event_handler_f( - dispatch_source_t source, - dispatch_function_t handler, + ffi.Pointer dispatch_get_context( + dispatch_object_t object, ) { - return _dispatch_source_set_event_handler_f( - source, - handler, + return _dispatch_get_context( + object, ); } - late final _dispatch_source_set_event_handler_fPtr = _lookup< + late final _dispatch_get_contextPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_function_t)>>('dispatch_source_set_event_handler_f'); - late final _dispatch_source_set_event_handler_f = - _dispatch_source_set_event_handler_fPtr - .asFunction(); + ffi.Pointer Function( + dispatch_object_t)>>('dispatch_get_context'); + late final _dispatch_get_context = _dispatch_get_contextPtr + .asFunction Function(dispatch_object_t)>(); - void dispatch_source_set_cancel_handler( - dispatch_source_t source, - dispatch_block_t handler, + void dispatch_set_context( + dispatch_object_t object, + ffi.Pointer context, ) { - return _dispatch_source_set_cancel_handler( - source, - handler, + return _dispatch_set_context( + object, + context, ); } - late final _dispatch_source_set_cancel_handlerPtr = _lookup< + late final _dispatch_set_contextPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_block_t)>>('dispatch_source_set_cancel_handler'); - late final _dispatch_source_set_cancel_handler = - _dispatch_source_set_cancel_handlerPtr - .asFunction(); + ffi.Void Function(dispatch_object_t, + ffi.Pointer)>>('dispatch_set_context'); + late final _dispatch_set_context = _dispatch_set_contextPtr + .asFunction)>(); - void dispatch_source_set_cancel_handler_f( - dispatch_source_t source, - dispatch_function_t handler, + void dispatch_set_finalizer_f( + dispatch_object_t object, + dispatch_function_t finalizer, ) { - return _dispatch_source_set_cancel_handler_f( - source, - handler, + return _dispatch_set_finalizer_f( + object, + finalizer, ); } - late final _dispatch_source_set_cancel_handler_fPtr = _lookup< + late final _dispatch_set_finalizer_fPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_function_t)>>('dispatch_source_set_cancel_handler_f'); - late final _dispatch_source_set_cancel_handler_f = - _dispatch_source_set_cancel_handler_fPtr - .asFunction(); + ffi.Void Function(dispatch_object_t, + dispatch_function_t)>>('dispatch_set_finalizer_f'); + late final _dispatch_set_finalizer_f = _dispatch_set_finalizer_fPtr + .asFunction(); - void dispatch_source_cancel( - dispatch_source_t source, + void dispatch_activate( + dispatch_object_t object, ) { - return _dispatch_source_cancel( - source, + return _dispatch_activate( + object, ); } - late final _dispatch_source_cancelPtr = - _lookup>( - 'dispatch_source_cancel'); - late final _dispatch_source_cancel = - _dispatch_source_cancelPtr.asFunction(); + late final _dispatch_activatePtr = + _lookup>( + 'dispatch_activate'); + late final _dispatch_activate = + _dispatch_activatePtr.asFunction(); - int dispatch_source_testcancel( - dispatch_source_t source, + void dispatch_suspend( + dispatch_object_t object, ) { - return _dispatch_source_testcancel( - source, + return _dispatch_suspend( + object, ); } - late final _dispatch_source_testcancelPtr = - _lookup>( - 'dispatch_source_testcancel'); - late final _dispatch_source_testcancel = _dispatch_source_testcancelPtr - .asFunction(); + late final _dispatch_suspendPtr = + _lookup>( + 'dispatch_suspend'); + late final _dispatch_suspend = + _dispatch_suspendPtr.asFunction(); - int dispatch_source_get_handle( - dispatch_source_t source, + void dispatch_resume( + dispatch_object_t object, ) { - return _dispatch_source_get_handle( - source, + return _dispatch_resume( + object, ); } - late final _dispatch_source_get_handlePtr = - _lookup>( - 'dispatch_source_get_handle'); - late final _dispatch_source_get_handle = _dispatch_source_get_handlePtr - .asFunction(); + late final _dispatch_resumePtr = + _lookup>( + 'dispatch_resume'); + late final _dispatch_resume = + _dispatch_resumePtr.asFunction(); - int dispatch_source_get_mask( - dispatch_source_t source, + void dispatch_set_qos_class_floor( + dispatch_object_t object, + int qos_class, + int relative_priority, ) { - return _dispatch_source_get_mask( - source, + return _dispatch_set_qos_class_floor( + object, + qos_class, + relative_priority, ); } - late final _dispatch_source_get_maskPtr = - _lookup>( - 'dispatch_source_get_mask'); - late final _dispatch_source_get_mask = _dispatch_source_get_maskPtr - .asFunction(); + late final _dispatch_set_qos_class_floorPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, ffi.Int32, + ffi.Int)>>('dispatch_set_qos_class_floor'); + late final _dispatch_set_qos_class_floor = _dispatch_set_qos_class_floorPtr + .asFunction(); - int dispatch_source_get_data( - dispatch_source_t source, + int dispatch_wait( + ffi.Pointer object, + int timeout, ) { - return _dispatch_source_get_data( - source, + return _dispatch_wait( + object, + timeout, ); } - late final _dispatch_source_get_dataPtr = - _lookup>( - 'dispatch_source_get_data'); - late final _dispatch_source_get_data = _dispatch_source_get_dataPtr - .asFunction(); + late final _dispatch_waitPtr = _lookup< + ffi.NativeFunction< + ffi.IntPtr Function( + ffi.Pointer, dispatch_time_t)>>('dispatch_wait'); + late final _dispatch_wait = + _dispatch_waitPtr.asFunction, int)>(); - void dispatch_source_merge_data( - dispatch_source_t source, - int value, + void dispatch_notify( + ffi.Pointer object, + dispatch_object_t queue, + dispatch_block_t notification_block, ) { - return _dispatch_source_merge_data( - source, - value, + return _dispatch_notify( + object, + queue, + notification_block, ); } - late final _dispatch_source_merge_dataPtr = _lookup< - ffi.NativeFunction>( - 'dispatch_source_merge_data'); - late final _dispatch_source_merge_data = _dispatch_source_merge_dataPtr - .asFunction(); + late final _dispatch_notifyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, dispatch_object_t, + dispatch_block_t)>>('dispatch_notify'); + late final _dispatch_notify = _dispatch_notifyPtr.asFunction< + void Function( + ffi.Pointer, dispatch_object_t, dispatch_block_t)>(); - void dispatch_source_set_timer( - dispatch_source_t source, - int start, - int interval, - int leeway, + void dispatch_cancel( + ffi.Pointer object, ) { - return _dispatch_source_set_timer( - source, - start, - interval, - leeway, + return _dispatch_cancel( + object, ); } - late final _dispatch_source_set_timerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, dispatch_time_t, ffi.Uint64, - ffi.Uint64)>>('dispatch_source_set_timer'); - late final _dispatch_source_set_timer = _dispatch_source_set_timerPtr - .asFunction(); + late final _dispatch_cancelPtr = + _lookup)>>( + 'dispatch_cancel'); + late final _dispatch_cancel = + _dispatch_cancelPtr.asFunction)>(); - void dispatch_source_set_registration_handler( - dispatch_source_t source, - dispatch_block_t handler, + int dispatch_testcancel( + ffi.Pointer object, ) { - return _dispatch_source_set_registration_handler( - source, - handler, + return _dispatch_testcancel( + object, ); } - late final _dispatch_source_set_registration_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_block_t)>>('dispatch_source_set_registration_handler'); - late final _dispatch_source_set_registration_handler = - _dispatch_source_set_registration_handlerPtr - .asFunction(); + late final _dispatch_testcancelPtr = + _lookup)>>( + 'dispatch_testcancel'); + late final _dispatch_testcancel = + _dispatch_testcancelPtr.asFunction)>(); - void dispatch_source_set_registration_handler_f( - dispatch_source_t source, - dispatch_function_t handler, + void dispatch_debug( + dispatch_object_t object, + ffi.Pointer message, ) { - return _dispatch_source_set_registration_handler_f( - source, - handler, + return _dispatch_debug( + object, + message, ); } - late final _dispatch_source_set_registration_handler_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, dispatch_function_t)>>( - 'dispatch_source_set_registration_handler_f'); - late final _dispatch_source_set_registration_handler_f = - _dispatch_source_set_registration_handler_fPtr - .asFunction(); + late final _dispatch_debugPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_object_t, ffi.Pointer)>>('dispatch_debug'); + late final _dispatch_debug = _dispatch_debugPtr + .asFunction)>(); - dispatch_group_t dispatch_group_create() { - return _dispatch_group_create(); + void dispatch_debugv( + dispatch_object_t object, + ffi.Pointer message, + va_list ap, + ) { + return _dispatch_debugv( + object, + message, + ap, + ); } - late final _dispatch_group_createPtr = - _lookup>( - 'dispatch_group_create'); - late final _dispatch_group_create = - _dispatch_group_createPtr.asFunction(); + late final _dispatch_debugvPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, ffi.Pointer, + va_list)>>('dispatch_debugv'); + late final _dispatch_debugv = _dispatch_debugvPtr.asFunction< + void Function(dispatch_object_t, ffi.Pointer, va_list)>(); - void dispatch_group_async( - dispatch_group_t group, + void dispatch_async( dispatch_queue_t queue, dispatch_block_t block, ) { - return _dispatch_group_async( - group, + return _dispatch_async( queue, block, ); } - late final _dispatch_group_asyncPtr = _lookup< + late final _dispatch_asyncPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_group_t, dispatch_queue_t, - dispatch_block_t)>>('dispatch_group_async'); - late final _dispatch_group_async = _dispatch_group_asyncPtr.asFunction< - void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_async'); + late final _dispatch_async = _dispatch_asyncPtr + .asFunction(); - void dispatch_group_async_f( - dispatch_group_t group, + void dispatch_async_f( dispatch_queue_t queue, ffi.Pointer context, dispatch_function_t work, ) { - return _dispatch_group_async_f( - group, + return _dispatch_async_f( queue, context, work, ); } - late final _dispatch_group_async_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_group_t, - dispatch_queue_t, - ffi.Pointer, - dispatch_function_t)>>('dispatch_group_async_f'); - late final _dispatch_group_async_f = _dispatch_group_async_fPtr.asFunction< - void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>(); - - int dispatch_group_wait( - dispatch_group_t group, - int timeout, - ) { - return _dispatch_group_wait( - group, - timeout, - ); - } - - late final _dispatch_group_waitPtr = _lookup< + late final _dispatch_async_fPtr = _lookup< ffi.NativeFunction< - ffi.IntPtr Function( - dispatch_group_t, dispatch_time_t)>>('dispatch_group_wait'); - late final _dispatch_group_wait = - _dispatch_group_waitPtr.asFunction(); + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_async_f'); + late final _dispatch_async_f = _dispatch_async_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - void dispatch_group_notify( - dispatch_group_t group, + void dispatch_sync( dispatch_queue_t queue, dispatch_block_t block, ) { - return _dispatch_group_notify( - group, + return _dispatch_sync( queue, block, ); } - late final _dispatch_group_notifyPtr = _lookup< + late final _dispatch_syncPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_group_t, dispatch_queue_t, - dispatch_block_t)>>('dispatch_group_notify'); - late final _dispatch_group_notify = _dispatch_group_notifyPtr.asFunction< - void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_sync'); + late final _dispatch_sync = _dispatch_syncPtr + .asFunction(); - void dispatch_group_notify_f( - dispatch_group_t group, + void dispatch_sync_f( dispatch_queue_t queue, ffi.Pointer context, dispatch_function_t work, ) { - return _dispatch_group_notify_f( - group, + return _dispatch_sync_f( queue, context, work, ); } - late final _dispatch_group_notify_fPtr = _lookup< + late final _dispatch_sync_fPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_group_t, - dispatch_queue_t, - ffi.Pointer, - dispatch_function_t)>>('dispatch_group_notify_f'); - late final _dispatch_group_notify_f = _dispatch_group_notify_fPtr.asFunction< - void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>(); - - void dispatch_group_enter( - dispatch_group_t group, - ) { - return _dispatch_group_enter( - group, - ); - } - - late final _dispatch_group_enterPtr = - _lookup>( - 'dispatch_group_enter'); - late final _dispatch_group_enter = - _dispatch_group_enterPtr.asFunction(); - - void dispatch_group_leave( - dispatch_group_t group, - ) { - return _dispatch_group_leave( - group, - ); - } - - late final _dispatch_group_leavePtr = - _lookup>( - 'dispatch_group_leave'); - late final _dispatch_group_leave = - _dispatch_group_leavePtr.asFunction(); - - dispatch_semaphore_t dispatch_semaphore_create( - int value, - ) { - return _dispatch_semaphore_create( - value, - ); - } - - late final _dispatch_semaphore_createPtr = - _lookup>( - 'dispatch_semaphore_create'); - late final _dispatch_semaphore_create = _dispatch_semaphore_createPtr - .asFunction(); + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_sync_f'); + late final _dispatch_sync_f = _dispatch_sync_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - int dispatch_semaphore_wait( - dispatch_semaphore_t dsema, - int timeout, + void dispatch_async_and_wait( + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _dispatch_semaphore_wait( - dsema, - timeout, + return _dispatch_async_and_wait( + queue, + block, ); } - late final _dispatch_semaphore_waitPtr = _lookup< + late final _dispatch_async_and_waitPtr = _lookup< ffi.NativeFunction< - ffi.IntPtr Function(dispatch_semaphore_t, - dispatch_time_t)>>('dispatch_semaphore_wait'); - late final _dispatch_semaphore_wait = _dispatch_semaphore_waitPtr - .asFunction(); + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_async_and_wait'); + late final _dispatch_async_and_wait = _dispatch_async_and_waitPtr + .asFunction(); - int dispatch_semaphore_signal( - dispatch_semaphore_t dsema, + void dispatch_async_and_wait_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_semaphore_signal( - dsema, + return _dispatch_async_and_wait_f( + queue, + context, + work, ); } - late final _dispatch_semaphore_signalPtr = - _lookup>( - 'dispatch_semaphore_signal'); - late final _dispatch_semaphore_signal = _dispatch_semaphore_signalPtr - .asFunction(); + late final _dispatch_async_and_wait_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_async_and_wait_f'); + late final _dispatch_async_and_wait_f = + _dispatch_async_and_wait_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - void dispatch_once( - ffi.Pointer predicate, - dispatch_block_t block, + void dispatch_apply( + int iterations, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> block, ) { - return _dispatch_once( - predicate, + return _dispatch_apply( + iterations, + queue, block, ); } - late final _dispatch_oncePtr = _lookup< + late final _dispatch_applyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - dispatch_block_t)>>('dispatch_once'); - late final _dispatch_once = _dispatch_oncePtr.asFunction< - void Function(ffi.Pointer, dispatch_block_t)>(); + ffi.Void Function(ffi.Size, dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_apply'); + late final _dispatch_apply = _dispatch_applyPtr.asFunction< + void Function(int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); - void dispatch_once_f( - ffi.Pointer predicate, + void dispatch_apply_f( + int iterations, + dispatch_queue_t queue, ffi.Pointer context, - dispatch_function_t function, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Size)>> + work, ) { - return _dispatch_once_f( - predicate, + return _dispatch_apply_f( + iterations, + queue, context, - function, + work, ); } - late final _dispatch_once_fPtr = _lookup< + late final _dispatch_apply_fPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - dispatch_function_t)>>('dispatch_once_f'); - late final _dispatch_once_f = _dispatch_once_fPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - dispatch_function_t)>(); + ffi.Void Function( + ffi.Size, + dispatch_queue_t, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Size)>>)>>('dispatch_apply_f'); + late final _dispatch_apply_f = _dispatch_apply_fPtr.asFunction< + void Function( + int, + dispatch_queue_t, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Size)>>)>(); - late final ffi.Pointer __dispatch_data_empty = - _lookup('_dispatch_data_empty'); + dispatch_queue_t dispatch_get_current_queue() { + return _dispatch_get_current_queue(); + } - ffi.Pointer get _dispatch_data_empty => - __dispatch_data_empty; + late final _dispatch_get_current_queuePtr = + _lookup>( + 'dispatch_get_current_queue'); + late final _dispatch_get_current_queue = + _dispatch_get_current_queuePtr.asFunction(); - late final ffi.Pointer __dispatch_data_destructor_free = - _lookup('_dispatch_data_destructor_free'); + late final ffi.Pointer __dispatch_main_q = + _lookup('_dispatch_main_q'); - dispatch_block_t get _dispatch_data_destructor_free => - __dispatch_data_destructor_free.value; + ffi.Pointer get _dispatch_main_q => __dispatch_main_q; - set _dispatch_data_destructor_free(dispatch_block_t value) => - __dispatch_data_destructor_free.value = value; + dispatch_queue_global_t dispatch_get_global_queue( + int identifier, + int flags, + ) { + return _dispatch_get_global_queue( + identifier, + flags, + ); + } - late final ffi.Pointer __dispatch_data_destructor_munmap = - _lookup('_dispatch_data_destructor_munmap'); + late final _dispatch_get_global_queuePtr = _lookup< + ffi.NativeFunction< + dispatch_queue_global_t Function( + ffi.IntPtr, ffi.UintPtr)>>('dispatch_get_global_queue'); + late final _dispatch_get_global_queue = _dispatch_get_global_queuePtr + .asFunction(); - dispatch_block_t get _dispatch_data_destructor_munmap => - __dispatch_data_destructor_munmap.value; + late final ffi.Pointer + __dispatch_queue_attr_concurrent = + _lookup('_dispatch_queue_attr_concurrent'); - set _dispatch_data_destructor_munmap(dispatch_block_t value) => - __dispatch_data_destructor_munmap.value = value; + ffi.Pointer get _dispatch_queue_attr_concurrent => + __dispatch_queue_attr_concurrent; - dispatch_data_t dispatch_data_create( - ffi.Pointer buffer, - int size, - dispatch_queue_t queue, - dispatch_block_t destructor, + dispatch_queue_attr_t dispatch_queue_attr_make_initially_inactive( + dispatch_queue_attr_t attr, ) { - return _dispatch_data_create( - buffer, - size, - queue, - destructor, + return _dispatch_queue_attr_make_initially_inactive( + attr, ); } - late final _dispatch_data_createPtr = _lookup< - ffi.NativeFunction< - dispatch_data_t Function(ffi.Pointer, ffi.Size, - dispatch_queue_t, dispatch_block_t)>>('dispatch_data_create'); - late final _dispatch_data_create = _dispatch_data_createPtr.asFunction< - dispatch_data_t Function( - ffi.Pointer, int, dispatch_queue_t, dispatch_block_t)>(); + late final _dispatch_queue_attr_make_initially_inactivePtr = _lookup< + ffi.NativeFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t)>>( + 'dispatch_queue_attr_make_initially_inactive'); + late final _dispatch_queue_attr_make_initially_inactive = + _dispatch_queue_attr_make_initially_inactivePtr + .asFunction(); - int dispatch_data_get_size( - dispatch_data_t data, + dispatch_queue_attr_t dispatch_queue_attr_make_with_autorelease_frequency( + dispatch_queue_attr_t attr, + int frequency, ) { - return _dispatch_data_get_size( - data, + return _dispatch_queue_attr_make_with_autorelease_frequency( + attr, + frequency, ); } - late final _dispatch_data_get_sizePtr = - _lookup>( - 'dispatch_data_get_size'); - late final _dispatch_data_get_size = - _dispatch_data_get_sizePtr.asFunction(); + late final _dispatch_queue_attr_make_with_autorelease_frequencyPtr = _lookup< + ffi.NativeFunction< + dispatch_queue_attr_t Function( + dispatch_queue_attr_t, ffi.Int32)>>( + 'dispatch_queue_attr_make_with_autorelease_frequency'); + late final _dispatch_queue_attr_make_with_autorelease_frequency = + _dispatch_queue_attr_make_with_autorelease_frequencyPtr.asFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t, int)>(); - dispatch_data_t dispatch_data_create_map( - dispatch_data_t data, - ffi.Pointer> buffer_ptr, - ffi.Pointer size_ptr, + dispatch_queue_attr_t dispatch_queue_attr_make_with_qos_class( + dispatch_queue_attr_t attr, + int qos_class, + int relative_priority, ) { - return _dispatch_data_create_map( - data, - buffer_ptr, - size_ptr, + return _dispatch_queue_attr_make_with_qos_class( + attr, + qos_class, + relative_priority, ); } - late final _dispatch_data_create_mapPtr = _lookup< + late final _dispatch_queue_attr_make_with_qos_classPtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function( - dispatch_data_t, - ffi.Pointer>, - ffi.Pointer)>>('dispatch_data_create_map'); - late final _dispatch_data_create_map = - _dispatch_data_create_mapPtr.asFunction< - dispatch_data_t Function(dispatch_data_t, - ffi.Pointer>, ffi.Pointer)>(); + dispatch_queue_attr_t Function(dispatch_queue_attr_t, ffi.Int32, + ffi.Int)>>('dispatch_queue_attr_make_with_qos_class'); + late final _dispatch_queue_attr_make_with_qos_class = + _dispatch_queue_attr_make_with_qos_classPtr.asFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t, int, int)>(); - dispatch_data_t dispatch_data_create_concat( - dispatch_data_t data1, - dispatch_data_t data2, + dispatch_queue_t dispatch_queue_create_with_target( + ffi.Pointer label, + dispatch_queue_attr_t attr, + dispatch_queue_t target, ) { - return _dispatch_data_create_concat( - data1, - data2, + return _dispatch_queue_create_with_target( + label, + attr, + target, ); } - late final _dispatch_data_create_concatPtr = _lookup< + late final _dispatch_queue_create_with_targetPtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function(dispatch_data_t, - dispatch_data_t)>>('dispatch_data_create_concat'); - late final _dispatch_data_create_concat = _dispatch_data_create_concatPtr - .asFunction(); + dispatch_queue_t Function( + ffi.Pointer, + dispatch_queue_attr_t, + dispatch_queue_t)>>('dispatch_queue_create_with_target'); + late final _dispatch_queue_create_with_target = + _dispatch_queue_create_with_targetPtr.asFunction< + dispatch_queue_t Function(ffi.Pointer, + dispatch_queue_attr_t, dispatch_queue_t)>(); - dispatch_data_t dispatch_data_create_subrange( - dispatch_data_t data, - int offset, - int length, + dispatch_queue_t dispatch_queue_create( + ffi.Pointer label, + dispatch_queue_attr_t attr, ) { - return _dispatch_data_create_subrange( - data, - offset, - length, + return _dispatch_queue_create( + label, + attr, ); } - late final _dispatch_data_create_subrangePtr = _lookup< + late final _dispatch_queue_createPtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function(dispatch_data_t, ffi.Size, - ffi.Size)>>('dispatch_data_create_subrange'); - late final _dispatch_data_create_subrange = _dispatch_data_create_subrangePtr - .asFunction(); + dispatch_queue_t Function(ffi.Pointer, + dispatch_queue_attr_t)>>('dispatch_queue_create'); + late final _dispatch_queue_create = _dispatch_queue_createPtr.asFunction< + dispatch_queue_t Function( + ffi.Pointer, dispatch_queue_attr_t)>(); - bool dispatch_data_apply( - dispatch_data_t data, - dispatch_data_applier_t applier, + ffi.Pointer dispatch_queue_get_label( + dispatch_queue_t queue, ) { - return _dispatch_data_apply( - data, - applier, + return _dispatch_queue_get_label( + queue, ); } - late final _dispatch_data_applyPtr = _lookup< + late final _dispatch_queue_get_labelPtr = _lookup< + ffi.NativeFunction Function(dispatch_queue_t)>>( + 'dispatch_queue_get_label'); + late final _dispatch_queue_get_label = _dispatch_queue_get_labelPtr + .asFunction Function(dispatch_queue_t)>(); + + int dispatch_queue_get_qos_class( + dispatch_queue_t queue, + ffi.Pointer relative_priority_ptr, + ) { + return _dispatch_queue_get_qos_class( + queue, + relative_priority_ptr, + ); + } + + late final _dispatch_queue_get_qos_classPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(dispatch_data_t, - dispatch_data_applier_t)>>('dispatch_data_apply'); - late final _dispatch_data_apply = _dispatch_data_applyPtr - .asFunction(); + ffi.Int32 Function(dispatch_queue_t, + ffi.Pointer)>>('dispatch_queue_get_qos_class'); + late final _dispatch_queue_get_qos_class = _dispatch_queue_get_qos_classPtr + .asFunction)>(); - dispatch_data_t dispatch_data_copy_region( - dispatch_data_t data, - int location, - ffi.Pointer offset_ptr, + void dispatch_set_target_queue( + dispatch_object_t object, + dispatch_queue_t queue, ) { - return _dispatch_data_copy_region( - data, - location, - offset_ptr, + return _dispatch_set_target_queue( + object, + queue, ); } - late final _dispatch_data_copy_regionPtr = _lookup< + late final _dispatch_set_target_queuePtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function(dispatch_data_t, ffi.Size, - ffi.Pointer)>>('dispatch_data_copy_region'); - late final _dispatch_data_copy_region = - _dispatch_data_copy_regionPtr.asFunction< - dispatch_data_t Function( - dispatch_data_t, int, ffi.Pointer)>(); + ffi.Void Function(dispatch_object_t, + dispatch_queue_t)>>('dispatch_set_target_queue'); + late final _dispatch_set_target_queue = _dispatch_set_target_queuePtr + .asFunction(); - void dispatch_read( - int fd, - int length, + void dispatch_main() { + return _dispatch_main(); + } + + late final _dispatch_mainPtr = + _lookup>('dispatch_main'); + late final _dispatch_main = _dispatch_mainPtr.asFunction(); + + void dispatch_after( + int when, dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> handler, + dispatch_block_t block, ) { - return _dispatch_read( - fd, - length, + return _dispatch_after( + when, queue, - handler, + block, ); } - late final _dispatch_readPtr = _lookup< + late final _dispatch_afterPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_fd_t, ffi.Size, dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_read'); - late final _dispatch_read = _dispatch_readPtr.asFunction< - void Function(int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function(dispatch_time_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_after'); + late final _dispatch_after = _dispatch_afterPtr + .asFunction(); - void dispatch_write( - int fd, - dispatch_data_t data, + void dispatch_after_f( + int when, dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> handler, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_write( - fd, - data, + return _dispatch_after_f( + when, queue, - handler, + context, + work, ); } - late final _dispatch_writePtr = _lookup< + late final _dispatch_after_fPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_fd_t, dispatch_data_t, dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_write'); - late final _dispatch_write = _dispatch_writePtr.asFunction< + ffi.Void Function(dispatch_time_t, dispatch_queue_t, + ffi.Pointer, dispatch_function_t)>>('dispatch_after_f'); + late final _dispatch_after_f = _dispatch_after_fPtr.asFunction< void Function( - int, dispatch_data_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + int, dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - dispatch_io_t dispatch_io_create( - int type, - int fd, + void dispatch_barrier_async( dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> cleanup_handler, + dispatch_block_t block, ) { - return _dispatch_io_create( - type, - fd, + return _dispatch_barrier_async( queue, - cleanup_handler, + block, ); } - late final _dispatch_io_createPtr = _lookup< + late final _dispatch_barrier_asyncPtr = _lookup< ffi.NativeFunction< - dispatch_io_t Function( - dispatch_io_type_t, - dispatch_fd_t, - dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create'); - late final _dispatch_io_create = _dispatch_io_createPtr.asFunction< - dispatch_io_t Function( - int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_async'); + late final _dispatch_barrier_async = _dispatch_barrier_asyncPtr + .asFunction(); - dispatch_io_t dispatch_io_create_with_path( - int type, - ffi.Pointer path, - int oflag, - int mode, + void dispatch_barrier_async_f( dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> cleanup_handler, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_io_create_with_path( - type, - path, - oflag, - mode, + return _dispatch_barrier_async_f( queue, - cleanup_handler, + context, + work, ); } - late final _dispatch_io_create_with_pathPtr = _lookup< + late final _dispatch_barrier_async_fPtr = _lookup< ffi.NativeFunction< - dispatch_io_t Function( - dispatch_io_type_t, - ffi.Pointer, - ffi.Int, - mode_t, - dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create_with_path'); - late final _dispatch_io_create_with_path = - _dispatch_io_create_with_pathPtr.asFunction< - dispatch_io_t Function(int, ffi.Pointer, int, int, - dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_barrier_async_f'); + late final _dispatch_barrier_async_f = + _dispatch_barrier_async_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - dispatch_io_t dispatch_io_create_with_io( - int type, - dispatch_io_t io, + void dispatch_barrier_sync( dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> cleanup_handler, + dispatch_block_t block, ) { - return _dispatch_io_create_with_io( - type, - io, + return _dispatch_barrier_sync( queue, - cleanup_handler, + block, ); } - late final _dispatch_io_create_with_ioPtr = _lookup< + late final _dispatch_barrier_syncPtr = _lookup< ffi.NativeFunction< - dispatch_io_t Function( - dispatch_io_type_t, - dispatch_io_t, - dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create_with_io'); - late final _dispatch_io_create_with_io = - _dispatch_io_create_with_ioPtr.asFunction< - dispatch_io_t Function( - int, dispatch_io_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_sync'); + late final _dispatch_barrier_sync = _dispatch_barrier_syncPtr + .asFunction(); - void dispatch_io_read( - dispatch_io_t channel, - int offset, - int length, + void dispatch_barrier_sync_f( dispatch_queue_t queue, - dispatch_io_handler_t io_handler, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_io_read( - channel, - offset, - length, + return _dispatch_barrier_sync_f( queue, - io_handler, + context, + work, ); } - late final _dispatch_io_readPtr = _lookup< + late final _dispatch_barrier_sync_fPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_io_t, off_t, ffi.Size, dispatch_queue_t, - dispatch_io_handler_t)>>('dispatch_io_read'); - late final _dispatch_io_read = _dispatch_io_readPtr.asFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_barrier_sync_f'); + late final _dispatch_barrier_sync_f = _dispatch_barrier_sync_fPtr.asFunction< void Function( - dispatch_io_t, int, int, dispatch_queue_t, dispatch_io_handler_t)>(); + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - void dispatch_io_write( - dispatch_io_t channel, - int offset, - dispatch_data_t data, + void dispatch_barrier_async_and_wait( dispatch_queue_t queue, - dispatch_io_handler_t io_handler, + dispatch_block_t block, ) { - return _dispatch_io_write( - channel, - offset, - data, + return _dispatch_barrier_async_and_wait( queue, - io_handler, + block, ); } - late final _dispatch_io_writePtr = _lookup< + late final _dispatch_barrier_async_and_waitPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_io_t, off_t, dispatch_data_t, - dispatch_queue_t, dispatch_io_handler_t)>>('dispatch_io_write'); - late final _dispatch_io_write = _dispatch_io_writePtr.asFunction< - void Function(dispatch_io_t, int, dispatch_data_t, dispatch_queue_t, - dispatch_io_handler_t)>(); + ffi.Void Function(dispatch_queue_t, + dispatch_block_t)>>('dispatch_barrier_async_and_wait'); + late final _dispatch_barrier_async_and_wait = + _dispatch_barrier_async_and_waitPtr + .asFunction(); - void dispatch_io_close( - dispatch_io_t channel, - int flags, + void dispatch_barrier_async_and_wait_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_io_close( - channel, - flags, + return _dispatch_barrier_async_and_wait_f( + queue, + context, + work, ); } - late final _dispatch_io_closePtr = _lookup< + late final _dispatch_barrier_async_and_wait_fPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_io_t, dispatch_io_close_flags_t)>>('dispatch_io_close'); - late final _dispatch_io_close = - _dispatch_io_closePtr.asFunction(); + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_barrier_async_and_wait_f'); + late final _dispatch_barrier_async_and_wait_f = + _dispatch_barrier_async_and_wait_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - void dispatch_io_barrier( - dispatch_io_t channel, - dispatch_block_t barrier, + void dispatch_queue_set_specific( + dispatch_queue_t queue, + ffi.Pointer key, + ffi.Pointer context, + dispatch_function_t destructor, ) { - return _dispatch_io_barrier( - channel, - barrier, + return _dispatch_queue_set_specific( + queue, + key, + context, + destructor, ); } - late final _dispatch_io_barrierPtr = _lookup< + late final _dispatch_queue_set_specificPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - dispatch_io_t, dispatch_block_t)>>('dispatch_io_barrier'); - late final _dispatch_io_barrier = _dispatch_io_barrierPtr - .asFunction(); + dispatch_queue_t, + ffi.Pointer, + ffi.Pointer, + dispatch_function_t)>>('dispatch_queue_set_specific'); + late final _dispatch_queue_set_specific = + _dispatch_queue_set_specificPtr.asFunction< + void Function(dispatch_queue_t, ffi.Pointer, + ffi.Pointer, dispatch_function_t)>(); - int dispatch_io_get_descriptor( - dispatch_io_t channel, + ffi.Pointer dispatch_queue_get_specific( + dispatch_queue_t queue, + ffi.Pointer key, ) { - return _dispatch_io_get_descriptor( - channel, + return _dispatch_queue_get_specific( + queue, + key, ); } - late final _dispatch_io_get_descriptorPtr = - _lookup>( - 'dispatch_io_get_descriptor'); - late final _dispatch_io_get_descriptor = - _dispatch_io_get_descriptorPtr.asFunction(); + late final _dispatch_queue_get_specificPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(dispatch_queue_t, + ffi.Pointer)>>('dispatch_queue_get_specific'); + late final _dispatch_queue_get_specific = + _dispatch_queue_get_specificPtr.asFunction< + ffi.Pointer Function( + dispatch_queue_t, ffi.Pointer)>(); - void dispatch_io_set_high_water( - dispatch_io_t channel, - int high_water, + ffi.Pointer dispatch_get_specific( + ffi.Pointer key, ) { - return _dispatch_io_set_high_water( - channel, - high_water, + return _dispatch_get_specific( + key, ); } - late final _dispatch_io_set_high_waterPtr = - _lookup>( - 'dispatch_io_set_high_water'); - late final _dispatch_io_set_high_water = _dispatch_io_set_high_waterPtr - .asFunction(); + late final _dispatch_get_specificPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('dispatch_get_specific'); + late final _dispatch_get_specific = _dispatch_get_specificPtr + .asFunction Function(ffi.Pointer)>(); - void dispatch_io_set_low_water( - dispatch_io_t channel, - int low_water, + void dispatch_assert_queue( + dispatch_queue_t queue, ) { - return _dispatch_io_set_low_water( - channel, - low_water, + return _dispatch_assert_queue( + queue, ); } - late final _dispatch_io_set_low_waterPtr = - _lookup>( - 'dispatch_io_set_low_water'); - late final _dispatch_io_set_low_water = _dispatch_io_set_low_waterPtr - .asFunction(); + late final _dispatch_assert_queuePtr = + _lookup>( + 'dispatch_assert_queue'); + late final _dispatch_assert_queue = + _dispatch_assert_queuePtr.asFunction(); - void dispatch_io_set_interval( - dispatch_io_t channel, - int interval, - int flags, + void dispatch_assert_queue_barrier( + dispatch_queue_t queue, ) { - return _dispatch_io_set_interval( - channel, - interval, - flags, + return _dispatch_assert_queue_barrier( + queue, ); } - late final _dispatch_io_set_intervalPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_io_t, ffi.Uint64, - dispatch_io_interval_flags_t)>>('dispatch_io_set_interval'); - late final _dispatch_io_set_interval = _dispatch_io_set_intervalPtr - .asFunction(); + late final _dispatch_assert_queue_barrierPtr = + _lookup>( + 'dispatch_assert_queue_barrier'); + late final _dispatch_assert_queue_barrier = _dispatch_assert_queue_barrierPtr + .asFunction(); - dispatch_workloop_t dispatch_workloop_create( - ffi.Pointer label, + void dispatch_assert_queue_not( + dispatch_queue_t queue, ) { - return _dispatch_workloop_create( - label, + return _dispatch_assert_queue_not( + queue, ); } - late final _dispatch_workloop_createPtr = _lookup< - ffi.NativeFunction< - dispatch_workloop_t Function( - ffi.Pointer)>>('dispatch_workloop_create'); - late final _dispatch_workloop_create = _dispatch_workloop_createPtr - .asFunction)>(); + late final _dispatch_assert_queue_notPtr = + _lookup>( + 'dispatch_assert_queue_not'); + late final _dispatch_assert_queue_not = _dispatch_assert_queue_notPtr + .asFunction(); - dispatch_workloop_t dispatch_workloop_create_inactive( - ffi.Pointer label, + dispatch_block_t dispatch_block_create( + int flags, + dispatch_block_t block, ) { - return _dispatch_workloop_create_inactive( - label, + return _dispatch_block_create( + flags, + block, ); } - late final _dispatch_workloop_create_inactivePtr = _lookup< + late final _dispatch_block_createPtr = _lookup< ffi.NativeFunction< - dispatch_workloop_t Function( - ffi.Pointer)>>('dispatch_workloop_create_inactive'); - late final _dispatch_workloop_create_inactive = - _dispatch_workloop_create_inactivePtr - .asFunction)>(); + dispatch_block_t Function( + ffi.Int32, dispatch_block_t)>>('dispatch_block_create'); + late final _dispatch_block_create = _dispatch_block_createPtr + .asFunction(); - void dispatch_workloop_set_autorelease_frequency( - dispatch_workloop_t workloop, - int frequency, + dispatch_block_t dispatch_block_create_with_qos_class( + int flags, + int qos_class, + int relative_priority, + dispatch_block_t block, ) { - return _dispatch_workloop_set_autorelease_frequency( - workloop, - frequency, + return _dispatch_block_create_with_qos_class( + flags, + qos_class, + relative_priority, + block, ); } - late final _dispatch_workloop_set_autorelease_frequencyPtr = _lookup< + late final _dispatch_block_create_with_qos_classPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_workloop_t, - ffi.Int32)>>('dispatch_workloop_set_autorelease_frequency'); - late final _dispatch_workloop_set_autorelease_frequency = - _dispatch_workloop_set_autorelease_frequencyPtr - .asFunction(); + dispatch_block_t Function(ffi.Int32, ffi.Int32, ffi.Int, + dispatch_block_t)>>('dispatch_block_create_with_qos_class'); + late final _dispatch_block_create_with_qos_class = + _dispatch_block_create_with_qos_classPtr.asFunction< + dispatch_block_t Function(int, int, int, dispatch_block_t)>(); - void dispatch_workloop_set_os_workgroup( - dispatch_workloop_t workloop, - os_workgroup_t workgroup, + void dispatch_block_perform( + int flags, + dispatch_block_t block, ) { - return _dispatch_workloop_set_os_workgroup( - workloop, - workgroup, + return _dispatch_block_perform( + flags, + block, ); } - late final _dispatch_workloop_set_os_workgroupPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_workloop_t, - os_workgroup_t)>>('dispatch_workloop_set_os_workgroup'); - late final _dispatch_workloop_set_os_workgroup = - _dispatch_workloop_set_os_workgroupPtr - .asFunction(); - - int CFReadStreamGetTypeID() { - return _CFReadStreamGetTypeID(); - } - - late final _CFReadStreamGetTypeIDPtr = - _lookup>('CFReadStreamGetTypeID'); - late final _CFReadStreamGetTypeID = - _CFReadStreamGetTypeIDPtr.asFunction(); - - int CFWriteStreamGetTypeID() { - return _CFWriteStreamGetTypeID(); - } - - late final _CFWriteStreamGetTypeIDPtr = - _lookup>( - 'CFWriteStreamGetTypeID'); - late final _CFWriteStreamGetTypeID = - _CFWriteStreamGetTypeIDPtr.asFunction(); - - late final ffi.Pointer _kCFStreamPropertyDataWritten = - _lookup('kCFStreamPropertyDataWritten'); - - CFStreamPropertyKey get kCFStreamPropertyDataWritten => - _kCFStreamPropertyDataWritten.value; - - set kCFStreamPropertyDataWritten(CFStreamPropertyKey value) => - _kCFStreamPropertyDataWritten.value = value; + late final _dispatch_block_performPtr = _lookup< + ffi.NativeFunction>( + 'dispatch_block_perform'); + late final _dispatch_block_perform = _dispatch_block_performPtr + .asFunction(); - CFReadStreamRef CFReadStreamCreateWithBytesNoCopy( - CFAllocatorRef alloc, - ffi.Pointer bytes, - int length, - CFAllocatorRef bytesDeallocator, + int dispatch_block_wait( + dispatch_block_t block, + int timeout, ) { - return _CFReadStreamCreateWithBytesNoCopy( - alloc, - bytes, - length, - bytesDeallocator, + return _dispatch_block_wait( + block, + timeout, ); } - late final _CFReadStreamCreateWithBytesNoCopyPtr = _lookup< + late final _dispatch_block_waitPtr = _lookup< ffi.NativeFunction< - CFReadStreamRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFAllocatorRef)>>('CFReadStreamCreateWithBytesNoCopy'); - late final _CFReadStreamCreateWithBytesNoCopy = - _CFReadStreamCreateWithBytesNoCopyPtr.asFunction< - CFReadStreamRef Function( - CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + ffi.IntPtr Function( + dispatch_block_t, dispatch_time_t)>>('dispatch_block_wait'); + late final _dispatch_block_wait = + _dispatch_block_waitPtr.asFunction(); - CFWriteStreamRef CFWriteStreamCreateWithBuffer( - CFAllocatorRef alloc, - ffi.Pointer buffer, - int bufferCapacity, + void dispatch_block_notify( + dispatch_block_t block, + dispatch_queue_t queue, + dispatch_block_t notification_block, ) { - return _CFWriteStreamCreateWithBuffer( - alloc, - buffer, - bufferCapacity, + return _dispatch_block_notify( + block, + queue, + notification_block, ); } - late final _CFWriteStreamCreateWithBufferPtr = _lookup< + late final _dispatch_block_notifyPtr = _lookup< ffi.NativeFunction< - CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex)>>('CFWriteStreamCreateWithBuffer'); - late final _CFWriteStreamCreateWithBuffer = - _CFWriteStreamCreateWithBufferPtr.asFunction< - CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + ffi.Void Function(dispatch_block_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_block_notify'); + late final _dispatch_block_notify = _dispatch_block_notifyPtr.asFunction< + void Function(dispatch_block_t, dispatch_queue_t, dispatch_block_t)>(); - CFWriteStreamRef CFWriteStreamCreateWithAllocatedBuffers( - CFAllocatorRef alloc, - CFAllocatorRef bufferAllocator, + void dispatch_block_cancel( + dispatch_block_t block, ) { - return _CFWriteStreamCreateWithAllocatedBuffers( - alloc, - bufferAllocator, + return _dispatch_block_cancel( + block, ); } - late final _CFWriteStreamCreateWithAllocatedBuffersPtr = _lookup< - ffi.NativeFunction< - CFWriteStreamRef Function(CFAllocatorRef, - CFAllocatorRef)>>('CFWriteStreamCreateWithAllocatedBuffers'); - late final _CFWriteStreamCreateWithAllocatedBuffers = - _CFWriteStreamCreateWithAllocatedBuffersPtr.asFunction< - CFWriteStreamRef Function(CFAllocatorRef, CFAllocatorRef)>(); + late final _dispatch_block_cancelPtr = + _lookup>( + 'dispatch_block_cancel'); + late final _dispatch_block_cancel = + _dispatch_block_cancelPtr.asFunction(); - CFReadStreamRef CFReadStreamCreateWithFile( - CFAllocatorRef alloc, - CFURLRef fileURL, + int dispatch_block_testcancel( + dispatch_block_t block, ) { - return _CFReadStreamCreateWithFile( - alloc, - fileURL, + return _dispatch_block_testcancel( + block, ); } - late final _CFReadStreamCreateWithFilePtr = _lookup< - ffi.NativeFunction< - CFReadStreamRef Function( - CFAllocatorRef, CFURLRef)>>('CFReadStreamCreateWithFile'); - late final _CFReadStreamCreateWithFile = _CFReadStreamCreateWithFilePtr - .asFunction(); + late final _dispatch_block_testcancelPtr = + _lookup>( + 'dispatch_block_testcancel'); + late final _dispatch_block_testcancel = _dispatch_block_testcancelPtr + .asFunction(); - CFWriteStreamRef CFWriteStreamCreateWithFile( - CFAllocatorRef alloc, - CFURLRef fileURL, + late final ffi.Pointer _KERNEL_SECURITY_TOKEN = + _lookup('KERNEL_SECURITY_TOKEN'); + + security_token_t get KERNEL_SECURITY_TOKEN => _KERNEL_SECURITY_TOKEN.ref; + + late final ffi.Pointer _KERNEL_AUDIT_TOKEN = + _lookup('KERNEL_AUDIT_TOKEN'); + + audit_token_t get KERNEL_AUDIT_TOKEN => _KERNEL_AUDIT_TOKEN.ref; + + int mach_msg_overwrite( + ffi.Pointer msg, + int option, + int send_size, + int rcv_size, + int rcv_name, + int timeout, + int notify, + ffi.Pointer rcv_msg, + int rcv_limit, ) { - return _CFWriteStreamCreateWithFile( - alloc, - fileURL, + return _mach_msg_overwrite( + msg, + option, + send_size, + rcv_size, + rcv_name, + timeout, + notify, + rcv_msg, + rcv_limit, ); } - late final _CFWriteStreamCreateWithFilePtr = _lookup< + late final _mach_msg_overwritePtr = _lookup< ffi.NativeFunction< - CFWriteStreamRef Function( - CFAllocatorRef, CFURLRef)>>('CFWriteStreamCreateWithFile'); - late final _CFWriteStreamCreateWithFile = _CFWriteStreamCreateWithFilePtr - .asFunction(); + mach_msg_return_t Function( + ffi.Pointer, + mach_msg_option_t, + mach_msg_size_t, + mach_msg_size_t, + mach_port_name_t, + mach_msg_timeout_t, + mach_port_name_t, + ffi.Pointer, + mach_msg_size_t)>>('mach_msg_overwrite'); + late final _mach_msg_overwrite = _mach_msg_overwritePtr.asFunction< + int Function(ffi.Pointer, int, int, int, int, int, int, + ffi.Pointer, int)>(); - void CFStreamCreateBoundPair( - CFAllocatorRef alloc, - ffi.Pointer readStream, - ffi.Pointer writeStream, - int transferBufferSize, + int mach_msg( + ffi.Pointer msg, + int option, + int send_size, + int rcv_size, + int rcv_name, + int timeout, + int notify, ) { - return _CFStreamCreateBoundPair( - alloc, - readStream, - writeStream, - transferBufferSize, + return _mach_msg( + msg, + option, + send_size, + rcv_size, + rcv_name, + timeout, + notify, ); } - late final _CFStreamCreateBoundPairPtr = _lookup< + late final _mach_msgPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, - ffi.Pointer, - ffi.Pointer, - CFIndex)>>('CFStreamCreateBoundPair'); - late final _CFStreamCreateBoundPair = _CFStreamCreateBoundPairPtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer, - ffi.Pointer, int)>(); + mach_msg_return_t Function( + ffi.Pointer, + mach_msg_option_t, + mach_msg_size_t, + mach_msg_size_t, + mach_port_name_t, + mach_msg_timeout_t, + mach_port_name_t)>>('mach_msg'); + late final _mach_msg = _mach_msgPtr.asFunction< + int Function( + ffi.Pointer, int, int, int, int, int, int)>(); - late final ffi.Pointer _kCFStreamPropertyAppendToFile = - _lookup('kCFStreamPropertyAppendToFile'); + int mach_voucher_deallocate( + int voucher, + ) { + return _mach_voucher_deallocate( + voucher, + ); + } - CFStreamPropertyKey get kCFStreamPropertyAppendToFile => - _kCFStreamPropertyAppendToFile.value; + late final _mach_voucher_deallocatePtr = + _lookup>( + 'mach_voucher_deallocate'); + late final _mach_voucher_deallocate = + _mach_voucher_deallocatePtr.asFunction(); - set kCFStreamPropertyAppendToFile(CFStreamPropertyKey value) => - _kCFStreamPropertyAppendToFile.value = value; + late final ffi.Pointer + __dispatch_source_type_data_add = + _lookup('_dispatch_source_type_data_add'); - late final ffi.Pointer - _kCFStreamPropertyFileCurrentOffset = - _lookup('kCFStreamPropertyFileCurrentOffset'); + ffi.Pointer get _dispatch_source_type_data_add => + __dispatch_source_type_data_add; - CFStreamPropertyKey get kCFStreamPropertyFileCurrentOffset => - _kCFStreamPropertyFileCurrentOffset.value; + late final ffi.Pointer + __dispatch_source_type_data_or = + _lookup('_dispatch_source_type_data_or'); - set kCFStreamPropertyFileCurrentOffset(CFStreamPropertyKey value) => - _kCFStreamPropertyFileCurrentOffset.value = value; + ffi.Pointer get _dispatch_source_type_data_or => + __dispatch_source_type_data_or; - late final ffi.Pointer - _kCFStreamPropertySocketNativeHandle = - _lookup('kCFStreamPropertySocketNativeHandle'); + late final ffi.Pointer + __dispatch_source_type_data_replace = + _lookup('_dispatch_source_type_data_replace'); - CFStreamPropertyKey get kCFStreamPropertySocketNativeHandle => - _kCFStreamPropertySocketNativeHandle.value; + ffi.Pointer get _dispatch_source_type_data_replace => + __dispatch_source_type_data_replace; - set kCFStreamPropertySocketNativeHandle(CFStreamPropertyKey value) => - _kCFStreamPropertySocketNativeHandle.value = value; + late final ffi.Pointer + __dispatch_source_type_mach_send = + _lookup('_dispatch_source_type_mach_send'); - late final ffi.Pointer - _kCFStreamPropertySocketRemoteHostName = - _lookup('kCFStreamPropertySocketRemoteHostName'); + ffi.Pointer get _dispatch_source_type_mach_send => + __dispatch_source_type_mach_send; - CFStreamPropertyKey get kCFStreamPropertySocketRemoteHostName => - _kCFStreamPropertySocketRemoteHostName.value; + late final ffi.Pointer + __dispatch_source_type_mach_recv = + _lookup('_dispatch_source_type_mach_recv'); - set kCFStreamPropertySocketRemoteHostName(CFStreamPropertyKey value) => - _kCFStreamPropertySocketRemoteHostName.value = value; + ffi.Pointer get _dispatch_source_type_mach_recv => + __dispatch_source_type_mach_recv; - late final ffi.Pointer - _kCFStreamPropertySocketRemotePortNumber = - _lookup('kCFStreamPropertySocketRemotePortNumber'); + late final ffi.Pointer + __dispatch_source_type_memorypressure = + _lookup('_dispatch_source_type_memorypressure'); - CFStreamPropertyKey get kCFStreamPropertySocketRemotePortNumber => - _kCFStreamPropertySocketRemotePortNumber.value; + ffi.Pointer + get _dispatch_source_type_memorypressure => + __dispatch_source_type_memorypressure; - set kCFStreamPropertySocketRemotePortNumber(CFStreamPropertyKey value) => - _kCFStreamPropertySocketRemotePortNumber.value = value; + late final ffi.Pointer __dispatch_source_type_proc = + _lookup('_dispatch_source_type_proc'); - late final ffi.Pointer _kCFStreamErrorDomainSOCKS = - _lookup('kCFStreamErrorDomainSOCKS'); + ffi.Pointer get _dispatch_source_type_proc => + __dispatch_source_type_proc; - int get kCFStreamErrorDomainSOCKS => _kCFStreamErrorDomainSOCKS.value; + late final ffi.Pointer __dispatch_source_type_read = + _lookup('_dispatch_source_type_read'); - set kCFStreamErrorDomainSOCKS(int value) => - _kCFStreamErrorDomainSOCKS.value = value; + ffi.Pointer get _dispatch_source_type_read => + __dispatch_source_type_read; - late final ffi.Pointer _kCFStreamPropertySOCKSProxy = - _lookup('kCFStreamPropertySOCKSProxy'); + late final ffi.Pointer __dispatch_source_type_signal = + _lookup('_dispatch_source_type_signal'); - CFStringRef get kCFStreamPropertySOCKSProxy => - _kCFStreamPropertySOCKSProxy.value; + ffi.Pointer get _dispatch_source_type_signal => + __dispatch_source_type_signal; - set kCFStreamPropertySOCKSProxy(CFStringRef value) => - _kCFStreamPropertySOCKSProxy.value = value; + late final ffi.Pointer __dispatch_source_type_timer = + _lookup('_dispatch_source_type_timer'); - late final ffi.Pointer _kCFStreamPropertySOCKSProxyHost = - _lookup('kCFStreamPropertySOCKSProxyHost'); + ffi.Pointer get _dispatch_source_type_timer => + __dispatch_source_type_timer; - CFStringRef get kCFStreamPropertySOCKSProxyHost => - _kCFStreamPropertySOCKSProxyHost.value; + late final ffi.Pointer __dispatch_source_type_vnode = + _lookup('_dispatch_source_type_vnode'); - set kCFStreamPropertySOCKSProxyHost(CFStringRef value) => - _kCFStreamPropertySOCKSProxyHost.value = value; + ffi.Pointer get _dispatch_source_type_vnode => + __dispatch_source_type_vnode; - late final ffi.Pointer _kCFStreamPropertySOCKSProxyPort = - _lookup('kCFStreamPropertySOCKSProxyPort'); + late final ffi.Pointer __dispatch_source_type_write = + _lookup('_dispatch_source_type_write'); - CFStringRef get kCFStreamPropertySOCKSProxyPort => - _kCFStreamPropertySOCKSProxyPort.value; + ffi.Pointer get _dispatch_source_type_write => + __dispatch_source_type_write; - set kCFStreamPropertySOCKSProxyPort(CFStringRef value) => - _kCFStreamPropertySOCKSProxyPort.value = value; + dispatch_source_t dispatch_source_create( + dispatch_source_type_t type, + int handle, + int mask, + dispatch_queue_t queue, + ) { + return _dispatch_source_create( + type, + handle, + mask, + queue, + ); + } - late final ffi.Pointer _kCFStreamPropertySOCKSVersion = - _lookup('kCFStreamPropertySOCKSVersion'); + late final _dispatch_source_createPtr = _lookup< + ffi.NativeFunction< + dispatch_source_t Function(dispatch_source_type_t, ffi.UintPtr, + ffi.UintPtr, dispatch_queue_t)>>('dispatch_source_create'); + late final _dispatch_source_create = _dispatch_source_createPtr.asFunction< + dispatch_source_t Function( + dispatch_source_type_t, int, int, dispatch_queue_t)>(); - CFStringRef get kCFStreamPropertySOCKSVersion => - _kCFStreamPropertySOCKSVersion.value; + void dispatch_source_set_event_handler( + dispatch_source_t source, + dispatch_block_t handler, + ) { + return _dispatch_source_set_event_handler( + source, + handler, + ); + } - set kCFStreamPropertySOCKSVersion(CFStringRef value) => - _kCFStreamPropertySOCKSVersion.value = value; + late final _dispatch_source_set_event_handlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_block_t)>>('dispatch_source_set_event_handler'); + late final _dispatch_source_set_event_handler = + _dispatch_source_set_event_handlerPtr + .asFunction(); - late final ffi.Pointer _kCFStreamSocketSOCKSVersion4 = - _lookup('kCFStreamSocketSOCKSVersion4'); + void dispatch_source_set_event_handler_f( + dispatch_source_t source, + dispatch_function_t handler, + ) { + return _dispatch_source_set_event_handler_f( + source, + handler, + ); + } - CFStringRef get kCFStreamSocketSOCKSVersion4 => - _kCFStreamSocketSOCKSVersion4.value; + late final _dispatch_source_set_event_handler_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_function_t)>>('dispatch_source_set_event_handler_f'); + late final _dispatch_source_set_event_handler_f = + _dispatch_source_set_event_handler_fPtr + .asFunction(); - set kCFStreamSocketSOCKSVersion4(CFStringRef value) => - _kCFStreamSocketSOCKSVersion4.value = value; + void dispatch_source_set_cancel_handler( + dispatch_source_t source, + dispatch_block_t handler, + ) { + return _dispatch_source_set_cancel_handler( + source, + handler, + ); + } - late final ffi.Pointer _kCFStreamSocketSOCKSVersion5 = - _lookup('kCFStreamSocketSOCKSVersion5'); + late final _dispatch_source_set_cancel_handlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_block_t)>>('dispatch_source_set_cancel_handler'); + late final _dispatch_source_set_cancel_handler = + _dispatch_source_set_cancel_handlerPtr + .asFunction(); - CFStringRef get kCFStreamSocketSOCKSVersion5 => - _kCFStreamSocketSOCKSVersion5.value; + void dispatch_source_set_cancel_handler_f( + dispatch_source_t source, + dispatch_function_t handler, + ) { + return _dispatch_source_set_cancel_handler_f( + source, + handler, + ); + } - set kCFStreamSocketSOCKSVersion5(CFStringRef value) => - _kCFStreamSocketSOCKSVersion5.value = value; + late final _dispatch_source_set_cancel_handler_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_function_t)>>('dispatch_source_set_cancel_handler_f'); + late final _dispatch_source_set_cancel_handler_f = + _dispatch_source_set_cancel_handler_fPtr + .asFunction(); - late final ffi.Pointer _kCFStreamPropertySOCKSUser = - _lookup('kCFStreamPropertySOCKSUser'); + void dispatch_source_cancel( + dispatch_source_t source, + ) { + return _dispatch_source_cancel( + source, + ); + } - CFStringRef get kCFStreamPropertySOCKSUser => - _kCFStreamPropertySOCKSUser.value; + late final _dispatch_source_cancelPtr = + _lookup>( + 'dispatch_source_cancel'); + late final _dispatch_source_cancel = + _dispatch_source_cancelPtr.asFunction(); - set kCFStreamPropertySOCKSUser(CFStringRef value) => - _kCFStreamPropertySOCKSUser.value = value; - - late final ffi.Pointer _kCFStreamPropertySOCKSPassword = - _lookup('kCFStreamPropertySOCKSPassword'); - - CFStringRef get kCFStreamPropertySOCKSPassword => - _kCFStreamPropertySOCKSPassword.value; - - set kCFStreamPropertySOCKSPassword(CFStringRef value) => - _kCFStreamPropertySOCKSPassword.value = value; - - late final ffi.Pointer _kCFStreamErrorDomainSSL = - _lookup('kCFStreamErrorDomainSSL'); - - int get kCFStreamErrorDomainSSL => _kCFStreamErrorDomainSSL.value; - - set kCFStreamErrorDomainSSL(int value) => - _kCFStreamErrorDomainSSL.value = value; - - late final ffi.Pointer _kCFStreamPropertySocketSecurityLevel = - _lookup('kCFStreamPropertySocketSecurityLevel'); - - CFStringRef get kCFStreamPropertySocketSecurityLevel => - _kCFStreamPropertySocketSecurityLevel.value; - - set kCFStreamPropertySocketSecurityLevel(CFStringRef value) => - _kCFStreamPropertySocketSecurityLevel.value = value; - - late final ffi.Pointer _kCFStreamSocketSecurityLevelNone = - _lookup('kCFStreamSocketSecurityLevelNone'); - - CFStringRef get kCFStreamSocketSecurityLevelNone => - _kCFStreamSocketSecurityLevelNone.value; - - set kCFStreamSocketSecurityLevelNone(CFStringRef value) => - _kCFStreamSocketSecurityLevelNone.value = value; - - late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv2 = - _lookup('kCFStreamSocketSecurityLevelSSLv2'); - - CFStringRef get kCFStreamSocketSecurityLevelSSLv2 => - _kCFStreamSocketSecurityLevelSSLv2.value; - - set kCFStreamSocketSecurityLevelSSLv2(CFStringRef value) => - _kCFStreamSocketSecurityLevelSSLv2.value = value; - - late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv3 = - _lookup('kCFStreamSocketSecurityLevelSSLv3'); - - CFStringRef get kCFStreamSocketSecurityLevelSSLv3 => - _kCFStreamSocketSecurityLevelSSLv3.value; - - set kCFStreamSocketSecurityLevelSSLv3(CFStringRef value) => - _kCFStreamSocketSecurityLevelSSLv3.value = value; - - late final ffi.Pointer _kCFStreamSocketSecurityLevelTLSv1 = - _lookup('kCFStreamSocketSecurityLevelTLSv1'); - - CFStringRef get kCFStreamSocketSecurityLevelTLSv1 => - _kCFStreamSocketSecurityLevelTLSv1.value; - - set kCFStreamSocketSecurityLevelTLSv1(CFStringRef value) => - _kCFStreamSocketSecurityLevelTLSv1.value = value; - - late final ffi.Pointer - _kCFStreamSocketSecurityLevelNegotiatedSSL = - _lookup('kCFStreamSocketSecurityLevelNegotiatedSSL'); - - CFStringRef get kCFStreamSocketSecurityLevelNegotiatedSSL => - _kCFStreamSocketSecurityLevelNegotiatedSSL.value; - - set kCFStreamSocketSecurityLevelNegotiatedSSL(CFStringRef value) => - _kCFStreamSocketSecurityLevelNegotiatedSSL.value = value; - - late final ffi.Pointer - _kCFStreamPropertyShouldCloseNativeSocket = - _lookup('kCFStreamPropertyShouldCloseNativeSocket'); - - CFStringRef get kCFStreamPropertyShouldCloseNativeSocket => - _kCFStreamPropertyShouldCloseNativeSocket.value; - - set kCFStreamPropertyShouldCloseNativeSocket(CFStringRef value) => - _kCFStreamPropertyShouldCloseNativeSocket.value = value; - - void CFStreamCreatePairWithSocket( - CFAllocatorRef alloc, - int sock, - ffi.Pointer readStream, - ffi.Pointer writeStream, + int dispatch_source_testcancel( + dispatch_source_t source, ) { - return _CFStreamCreatePairWithSocket( - alloc, - sock, - readStream, - writeStream, + return _dispatch_source_testcancel( + source, ); } - late final _CFStreamCreatePairWithSocketPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, - CFSocketNativeHandle, - ffi.Pointer, - ffi.Pointer)>>('CFStreamCreatePairWithSocket'); - late final _CFStreamCreatePairWithSocket = - _CFStreamCreatePairWithSocketPtr.asFunction< - void Function(CFAllocatorRef, int, ffi.Pointer, - ffi.Pointer)>(); + late final _dispatch_source_testcancelPtr = + _lookup>( + 'dispatch_source_testcancel'); + late final _dispatch_source_testcancel = _dispatch_source_testcancelPtr + .asFunction(); - void CFStreamCreatePairWithSocketToHost( - CFAllocatorRef alloc, - CFStringRef host, - int port, - ffi.Pointer readStream, - ffi.Pointer writeStream, + int dispatch_source_get_handle( + dispatch_source_t source, ) { - return _CFStreamCreatePairWithSocketToHost( - alloc, - host, - port, - readStream, - writeStream, + return _dispatch_source_get_handle( + source, ); } - late final _CFStreamCreatePairWithSocketToHostPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, - CFStringRef, - UInt32, - ffi.Pointer, - ffi.Pointer)>>( - 'CFStreamCreatePairWithSocketToHost'); - late final _CFStreamCreatePairWithSocketToHost = - _CFStreamCreatePairWithSocketToHostPtr.asFunction< - void Function(CFAllocatorRef, CFStringRef, int, - ffi.Pointer, ffi.Pointer)>(); + late final _dispatch_source_get_handlePtr = + _lookup>( + 'dispatch_source_get_handle'); + late final _dispatch_source_get_handle = _dispatch_source_get_handlePtr + .asFunction(); - void CFStreamCreatePairWithPeerSocketSignature( - CFAllocatorRef alloc, - ffi.Pointer signature, - ffi.Pointer readStream, - ffi.Pointer writeStream, + int dispatch_source_get_mask( + dispatch_source_t source, ) { - return _CFStreamCreatePairWithPeerSocketSignature( - alloc, - signature, - readStream, - writeStream, + return _dispatch_source_get_mask( + source, ); } - late final _CFStreamCreatePairWithPeerSocketSignaturePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'CFStreamCreatePairWithPeerSocketSignature'); - late final _CFStreamCreatePairWithPeerSocketSignature = - _CFStreamCreatePairWithPeerSocketSignaturePtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _dispatch_source_get_maskPtr = + _lookup>( + 'dispatch_source_get_mask'); + late final _dispatch_source_get_mask = _dispatch_source_get_maskPtr + .asFunction(); - int CFReadStreamGetStatus( - CFReadStreamRef stream, + int dispatch_source_get_data( + dispatch_source_t source, ) { - return _CFReadStreamGetStatus( - stream, + return _dispatch_source_get_data( + source, ); } - late final _CFReadStreamGetStatusPtr = - _lookup>( - 'CFReadStreamGetStatus'); - late final _CFReadStreamGetStatus = - _CFReadStreamGetStatusPtr.asFunction(); + late final _dispatch_source_get_dataPtr = + _lookup>( + 'dispatch_source_get_data'); + late final _dispatch_source_get_data = _dispatch_source_get_dataPtr + .asFunction(); - int CFWriteStreamGetStatus( - CFWriteStreamRef stream, + void dispatch_source_merge_data( + dispatch_source_t source, + int value, ) { - return _CFWriteStreamGetStatus( - stream, + return _dispatch_source_merge_data( + source, + value, ); } - late final _CFWriteStreamGetStatusPtr = - _lookup>( - 'CFWriteStreamGetStatus'); - late final _CFWriteStreamGetStatus = - _CFWriteStreamGetStatusPtr.asFunction(); + late final _dispatch_source_merge_dataPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_source_t, ffi.UintPtr)>>('dispatch_source_merge_data'); + late final _dispatch_source_merge_data = _dispatch_source_merge_dataPtr + .asFunction(); - CFErrorRef CFReadStreamCopyError( - CFReadStreamRef stream, + void dispatch_source_set_timer( + dispatch_source_t source, + int start, + int interval, + int leeway, ) { - return _CFReadStreamCopyError( - stream, + return _dispatch_source_set_timer( + source, + start, + interval, + leeway, ); } - late final _CFReadStreamCopyErrorPtr = - _lookup>( - 'CFReadStreamCopyError'); - late final _CFReadStreamCopyError = _CFReadStreamCopyErrorPtr.asFunction< - CFErrorRef Function(CFReadStreamRef)>(); + late final _dispatch_source_set_timerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, dispatch_time_t, ffi.Uint64, + ffi.Uint64)>>('dispatch_source_set_timer'); + late final _dispatch_source_set_timer = _dispatch_source_set_timerPtr + .asFunction(); - CFErrorRef CFWriteStreamCopyError( - CFWriteStreamRef stream, + void dispatch_source_set_registration_handler( + dispatch_source_t source, + dispatch_block_t handler, ) { - return _CFWriteStreamCopyError( - stream, + return _dispatch_source_set_registration_handler( + source, + handler, ); } - late final _CFWriteStreamCopyErrorPtr = - _lookup>( - 'CFWriteStreamCopyError'); - late final _CFWriteStreamCopyError = _CFWriteStreamCopyErrorPtr.asFunction< - CFErrorRef Function(CFWriteStreamRef)>(); + late final _dispatch_source_set_registration_handlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_block_t)>>('dispatch_source_set_registration_handler'); + late final _dispatch_source_set_registration_handler = + _dispatch_source_set_registration_handlerPtr + .asFunction(); - int CFReadStreamOpen( - CFReadStreamRef stream, + void dispatch_source_set_registration_handler_f( + dispatch_source_t source, + dispatch_function_t handler, ) { - return _CFReadStreamOpen( - stream, + return _dispatch_source_set_registration_handler_f( + source, + handler, ); } - late final _CFReadStreamOpenPtr = - _lookup>( - 'CFReadStreamOpen'); - late final _CFReadStreamOpen = - _CFReadStreamOpenPtr.asFunction(); + late final _dispatch_source_set_registration_handler_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, dispatch_function_t)>>( + 'dispatch_source_set_registration_handler_f'); + late final _dispatch_source_set_registration_handler_f = + _dispatch_source_set_registration_handler_fPtr + .asFunction(); - int CFWriteStreamOpen( - CFWriteStreamRef stream, - ) { - return _CFWriteStreamOpen( - stream, - ); + dispatch_group_t dispatch_group_create() { + return _dispatch_group_create(); } - late final _CFWriteStreamOpenPtr = - _lookup>( - 'CFWriteStreamOpen'); - late final _CFWriteStreamOpen = - _CFWriteStreamOpenPtr.asFunction(); + late final _dispatch_group_createPtr = + _lookup>( + 'dispatch_group_create'); + late final _dispatch_group_create = + _dispatch_group_createPtr.asFunction(); - void CFReadStreamClose( - CFReadStreamRef stream, + void dispatch_group_async( + dispatch_group_t group, + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _CFReadStreamClose( - stream, + return _dispatch_group_async( + group, + queue, + block, ); } - late final _CFReadStreamClosePtr = - _lookup>( - 'CFReadStreamClose'); - late final _CFReadStreamClose = - _CFReadStreamClosePtr.asFunction(); + late final _dispatch_group_asyncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_group_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_group_async'); + late final _dispatch_group_async = _dispatch_group_asyncPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); - void CFWriteStreamClose( - CFWriteStreamRef stream, + void dispatch_group_async_f( + dispatch_group_t group, + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _CFWriteStreamClose( - stream, + return _dispatch_group_async_f( + group, + queue, + context, + work, ); } - late final _CFWriteStreamClosePtr = - _lookup>( - 'CFWriteStreamClose'); - late final _CFWriteStreamClose = - _CFWriteStreamClosePtr.asFunction(); + late final _dispatch_group_async_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_group_t, + dispatch_queue_t, + ffi.Pointer, + dispatch_function_t)>>('dispatch_group_async_f'); + late final _dispatch_group_async_f = _dispatch_group_async_fPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>(); - int CFReadStreamHasBytesAvailable( - CFReadStreamRef stream, + int dispatch_group_wait( + dispatch_group_t group, + int timeout, ) { - return _CFReadStreamHasBytesAvailable( - stream, + return _dispatch_group_wait( + group, + timeout, ); } - late final _CFReadStreamHasBytesAvailablePtr = - _lookup>( - 'CFReadStreamHasBytesAvailable'); - late final _CFReadStreamHasBytesAvailable = _CFReadStreamHasBytesAvailablePtr - .asFunction(); + late final _dispatch_group_waitPtr = _lookup< + ffi.NativeFunction< + ffi.IntPtr Function( + dispatch_group_t, dispatch_time_t)>>('dispatch_group_wait'); + late final _dispatch_group_wait = + _dispatch_group_waitPtr.asFunction(); - int CFReadStreamRead( - CFReadStreamRef stream, - ffi.Pointer buffer, - int bufferLength, + void dispatch_group_notify( + dispatch_group_t group, + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _CFReadStreamRead( - stream, - buffer, - bufferLength, + return _dispatch_group_notify( + group, + queue, + block, ); } - late final _CFReadStreamReadPtr = _lookup< + late final _dispatch_group_notifyPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFReadStreamRef, ffi.Pointer, - CFIndex)>>('CFReadStreamRead'); - late final _CFReadStreamRead = _CFReadStreamReadPtr.asFunction< - int Function(CFReadStreamRef, ffi.Pointer, int)>(); + ffi.Void Function(dispatch_group_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_group_notify'); + late final _dispatch_group_notify = _dispatch_group_notifyPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); - ffi.Pointer CFReadStreamGetBuffer( - CFReadStreamRef stream, - int maxBytesToRead, - ffi.Pointer numBytesRead, + void dispatch_group_notify_f( + dispatch_group_t group, + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _CFReadStreamGetBuffer( - stream, - maxBytesToRead, - numBytesRead, + return _dispatch_group_notify_f( + group, + queue, + context, + work, ); } - late final _CFReadStreamGetBufferPtr = _lookup< + late final _dispatch_group_notify_fPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(CFReadStreamRef, CFIndex, - ffi.Pointer)>>('CFReadStreamGetBuffer'); - late final _CFReadStreamGetBuffer = _CFReadStreamGetBufferPtr.asFunction< - ffi.Pointer Function( - CFReadStreamRef, int, ffi.Pointer)>(); + ffi.Void Function( + dispatch_group_t, + dispatch_queue_t, + ffi.Pointer, + dispatch_function_t)>>('dispatch_group_notify_f'); + late final _dispatch_group_notify_f = _dispatch_group_notify_fPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>(); - int CFWriteStreamCanAcceptBytes( - CFWriteStreamRef stream, + void dispatch_group_enter( + dispatch_group_t group, ) { - return _CFWriteStreamCanAcceptBytes( - stream, + return _dispatch_group_enter( + group, ); } - late final _CFWriteStreamCanAcceptBytesPtr = - _lookup>( - 'CFWriteStreamCanAcceptBytes'); - late final _CFWriteStreamCanAcceptBytes = _CFWriteStreamCanAcceptBytesPtr - .asFunction(); + late final _dispatch_group_enterPtr = + _lookup>( + 'dispatch_group_enter'); + late final _dispatch_group_enter = + _dispatch_group_enterPtr.asFunction(); - int CFWriteStreamWrite( - CFWriteStreamRef stream, - ffi.Pointer buffer, - int bufferLength, + void dispatch_group_leave( + dispatch_group_t group, ) { - return _CFWriteStreamWrite( - stream, - buffer, - bufferLength, + return _dispatch_group_leave( + group, ); } - late final _CFWriteStreamWritePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFWriteStreamRef, ffi.Pointer, - CFIndex)>>('CFWriteStreamWrite'); - late final _CFWriteStreamWrite = _CFWriteStreamWritePtr.asFunction< - int Function(CFWriteStreamRef, ffi.Pointer, int)>(); + late final _dispatch_group_leavePtr = + _lookup>( + 'dispatch_group_leave'); + late final _dispatch_group_leave = + _dispatch_group_leavePtr.asFunction(); - CFTypeRef CFReadStreamCopyProperty( - CFReadStreamRef stream, - CFStreamPropertyKey propertyName, + dispatch_semaphore_t dispatch_semaphore_create( + int value, ) { - return _CFReadStreamCopyProperty( - stream, - propertyName, + return _dispatch_semaphore_create( + value, ); } - late final _CFReadStreamCopyPropertyPtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFReadStreamRef, - CFStreamPropertyKey)>>('CFReadStreamCopyProperty'); - late final _CFReadStreamCopyProperty = _CFReadStreamCopyPropertyPtr - .asFunction(); + late final _dispatch_semaphore_createPtr = + _lookup>( + 'dispatch_semaphore_create'); + late final _dispatch_semaphore_create = _dispatch_semaphore_createPtr + .asFunction(); - CFTypeRef CFWriteStreamCopyProperty( - CFWriteStreamRef stream, - CFStreamPropertyKey propertyName, + int dispatch_semaphore_wait( + dispatch_semaphore_t dsema, + int timeout, ) { - return _CFWriteStreamCopyProperty( - stream, - propertyName, + return _dispatch_semaphore_wait( + dsema, + timeout, ); } - late final _CFWriteStreamCopyPropertyPtr = _lookup< + late final _dispatch_semaphore_waitPtr = _lookup< ffi.NativeFunction< - CFTypeRef Function(CFWriteStreamRef, - CFStreamPropertyKey)>>('CFWriteStreamCopyProperty'); - late final _CFWriteStreamCopyProperty = _CFWriteStreamCopyPropertyPtr - .asFunction(); + ffi.IntPtr Function(dispatch_semaphore_t, + dispatch_time_t)>>('dispatch_semaphore_wait'); + late final _dispatch_semaphore_wait = _dispatch_semaphore_waitPtr + .asFunction(); - int CFReadStreamSetProperty( - CFReadStreamRef stream, - CFStreamPropertyKey propertyName, - CFTypeRef propertyValue, + int dispatch_semaphore_signal( + dispatch_semaphore_t dsema, ) { - return _CFReadStreamSetProperty( - stream, - propertyName, - propertyValue, + return _dispatch_semaphore_signal( + dsema, ); } - late final _CFReadStreamSetPropertyPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFReadStreamRef, CFStreamPropertyKey, - CFTypeRef)>>('CFReadStreamSetProperty'); - late final _CFReadStreamSetProperty = _CFReadStreamSetPropertyPtr.asFunction< - int Function(CFReadStreamRef, CFStreamPropertyKey, CFTypeRef)>(); + late final _dispatch_semaphore_signalPtr = + _lookup>( + 'dispatch_semaphore_signal'); + late final _dispatch_semaphore_signal = _dispatch_semaphore_signalPtr + .asFunction(); - int CFWriteStreamSetProperty( - CFWriteStreamRef stream, - CFStreamPropertyKey propertyName, - CFTypeRef propertyValue, + void dispatch_once( + ffi.Pointer predicate, + dispatch_block_t block, ) { - return _CFWriteStreamSetProperty( - stream, - propertyName, - propertyValue, + return _dispatch_once( + predicate, + block, ); } - late final _CFWriteStreamSetPropertyPtr = _lookup< + late final _dispatch_oncePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFWriteStreamRef, CFStreamPropertyKey, - CFTypeRef)>>('CFWriteStreamSetProperty'); - late final _CFWriteStreamSetProperty = - _CFWriteStreamSetPropertyPtr.asFunction< - int Function(CFWriteStreamRef, CFStreamPropertyKey, CFTypeRef)>(); + ffi.Void Function(ffi.Pointer, + dispatch_block_t)>>('dispatch_once'); + late final _dispatch_once = _dispatch_oncePtr.asFunction< + void Function(ffi.Pointer, dispatch_block_t)>(); - int CFReadStreamSetClient( - CFReadStreamRef stream, - int streamEvents, - CFReadStreamClientCallBack clientCB, - ffi.Pointer clientContext, + void dispatch_once_f( + ffi.Pointer predicate, + ffi.Pointer context, + dispatch_function_t function, ) { - return _CFReadStreamSetClient( - stream, - streamEvents, - clientCB, - clientContext, + return _dispatch_once_f( + predicate, + context, + function, ); } - late final _CFReadStreamSetClientPtr = _lookup< + late final _dispatch_once_fPtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFReadStreamRef, - CFOptionFlags, - CFReadStreamClientCallBack, - ffi.Pointer)>>('CFReadStreamSetClient'); - late final _CFReadStreamSetClient = _CFReadStreamSetClientPtr.asFunction< - int Function(CFReadStreamRef, int, CFReadStreamClientCallBack, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + dispatch_function_t)>>('dispatch_once_f'); + late final _dispatch_once_f = _dispatch_once_fPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + dispatch_function_t)>(); - int CFWriteStreamSetClient( - CFWriteStreamRef stream, - int streamEvents, - CFWriteStreamClientCallBack clientCB, - ffi.Pointer clientContext, + late final ffi.Pointer __dispatch_data_empty = + _lookup('_dispatch_data_empty'); + + ffi.Pointer get _dispatch_data_empty => + __dispatch_data_empty; + + late final ffi.Pointer __dispatch_data_destructor_free = + _lookup('_dispatch_data_destructor_free'); + + dispatch_block_t get _dispatch_data_destructor_free => + __dispatch_data_destructor_free.value; + + set _dispatch_data_destructor_free(dispatch_block_t value) => + __dispatch_data_destructor_free.value = value; + + late final ffi.Pointer __dispatch_data_destructor_munmap = + _lookup('_dispatch_data_destructor_munmap'); + + dispatch_block_t get _dispatch_data_destructor_munmap => + __dispatch_data_destructor_munmap.value; + + set _dispatch_data_destructor_munmap(dispatch_block_t value) => + __dispatch_data_destructor_munmap.value = value; + + dispatch_data_t dispatch_data_create( + ffi.Pointer buffer, + int size, + dispatch_queue_t queue, + dispatch_block_t destructor, ) { - return _CFWriteStreamSetClient( - stream, - streamEvents, - clientCB, - clientContext, + return _dispatch_data_create( + buffer, + size, + queue, + destructor, ); } - late final _CFWriteStreamSetClientPtr = _lookup< + late final _dispatch_data_createPtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFWriteStreamRef, - CFOptionFlags, - CFWriteStreamClientCallBack, - ffi.Pointer)>>('CFWriteStreamSetClient'); - late final _CFWriteStreamSetClient = _CFWriteStreamSetClientPtr.asFunction< - int Function(CFWriteStreamRef, int, CFWriteStreamClientCallBack, - ffi.Pointer)>(); + dispatch_data_t Function(ffi.Pointer, ffi.Size, + dispatch_queue_t, dispatch_block_t)>>('dispatch_data_create'); + late final _dispatch_data_create = _dispatch_data_createPtr.asFunction< + dispatch_data_t Function( + ffi.Pointer, int, dispatch_queue_t, dispatch_block_t)>(); - void CFReadStreamScheduleWithRunLoop( - CFReadStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + int dispatch_data_get_size( + dispatch_data_t data, ) { - return _CFReadStreamScheduleWithRunLoop( - stream, - runLoop, - runLoopMode, + return _dispatch_data_get_size( + data, ); } - late final _CFReadStreamScheduleWithRunLoopPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFReadStreamScheduleWithRunLoop'); - late final _CFReadStreamScheduleWithRunLoop = - _CFReadStreamScheduleWithRunLoopPtr.asFunction< - void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + late final _dispatch_data_get_sizePtr = + _lookup>( + 'dispatch_data_get_size'); + late final _dispatch_data_get_size = + _dispatch_data_get_sizePtr.asFunction(); - void CFWriteStreamScheduleWithRunLoop( - CFWriteStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + dispatch_data_t dispatch_data_create_map( + dispatch_data_t data, + ffi.Pointer> buffer_ptr, + ffi.Pointer size_ptr, ) { - return _CFWriteStreamScheduleWithRunLoop( - stream, - runLoop, - runLoopMode, + return _dispatch_data_create_map( + data, + buffer_ptr, + size_ptr, ); } - late final _CFWriteStreamScheduleWithRunLoopPtr = _lookup< + late final _dispatch_data_create_mapPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFWriteStreamScheduleWithRunLoop'); - late final _CFWriteStreamScheduleWithRunLoop = - _CFWriteStreamScheduleWithRunLoopPtr.asFunction< - void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + dispatch_data_t Function( + dispatch_data_t, + ffi.Pointer>, + ffi.Pointer)>>('dispatch_data_create_map'); + late final _dispatch_data_create_map = + _dispatch_data_create_mapPtr.asFunction< + dispatch_data_t Function(dispatch_data_t, + ffi.Pointer>, ffi.Pointer)>(); - void CFReadStreamUnscheduleFromRunLoop( - CFReadStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + dispatch_data_t dispatch_data_create_concat( + dispatch_data_t data1, + dispatch_data_t data2, ) { - return _CFReadStreamUnscheduleFromRunLoop( - stream, - runLoop, - runLoopMode, + return _dispatch_data_create_concat( + data1, + data2, ); } - late final _CFReadStreamUnscheduleFromRunLoopPtr = _lookup< + late final _dispatch_data_create_concatPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFReadStreamUnscheduleFromRunLoop'); - late final _CFReadStreamUnscheduleFromRunLoop = - _CFReadStreamUnscheduleFromRunLoopPtr.asFunction< - void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + dispatch_data_t Function(dispatch_data_t, + dispatch_data_t)>>('dispatch_data_create_concat'); + late final _dispatch_data_create_concat = _dispatch_data_create_concatPtr + .asFunction(); - void CFWriteStreamUnscheduleFromRunLoop( - CFWriteStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + dispatch_data_t dispatch_data_create_subrange( + dispatch_data_t data, + int offset, + int length, ) { - return _CFWriteStreamUnscheduleFromRunLoop( - stream, - runLoop, - runLoopMode, + return _dispatch_data_create_subrange( + data, + offset, + length, ); } - late final _CFWriteStreamUnscheduleFromRunLoopPtr = _lookup< + late final _dispatch_data_create_subrangePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFWriteStreamUnscheduleFromRunLoop'); - late final _CFWriteStreamUnscheduleFromRunLoop = - _CFWriteStreamUnscheduleFromRunLoopPtr.asFunction< - void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + dispatch_data_t Function(dispatch_data_t, ffi.Size, + ffi.Size)>>('dispatch_data_create_subrange'); + late final _dispatch_data_create_subrange = _dispatch_data_create_subrangePtr + .asFunction(); - void CFReadStreamSetDispatchQueue( - CFReadStreamRef stream, - dispatch_queue_t q, + bool dispatch_data_apply( + dispatch_data_t data, + dispatch_data_applier_t applier, ) { - return _CFReadStreamSetDispatchQueue( - stream, - q, + return _dispatch_data_apply( + data, + applier, ); } - late final _CFReadStreamSetDispatchQueuePtr = _lookup< + late final _dispatch_data_applyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, - dispatch_queue_t)>>('CFReadStreamSetDispatchQueue'); - late final _CFReadStreamSetDispatchQueue = _CFReadStreamSetDispatchQueuePtr - .asFunction(); + ffi.Bool Function(dispatch_data_t, + dispatch_data_applier_t)>>('dispatch_data_apply'); + late final _dispatch_data_apply = _dispatch_data_applyPtr + .asFunction(); - void CFWriteStreamSetDispatchQueue( - CFWriteStreamRef stream, - dispatch_queue_t q, + dispatch_data_t dispatch_data_copy_region( + dispatch_data_t data, + int location, + ffi.Pointer offset_ptr, ) { - return _CFWriteStreamSetDispatchQueue( - stream, - q, + return _dispatch_data_copy_region( + data, + location, + offset_ptr, ); } - late final _CFWriteStreamSetDispatchQueuePtr = _lookup< + late final _dispatch_data_copy_regionPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, - dispatch_queue_t)>>('CFWriteStreamSetDispatchQueue'); - late final _CFWriteStreamSetDispatchQueue = _CFWriteStreamSetDispatchQueuePtr - .asFunction(); + dispatch_data_t Function(dispatch_data_t, ffi.Size, + ffi.Pointer)>>('dispatch_data_copy_region'); + late final _dispatch_data_copy_region = + _dispatch_data_copy_regionPtr.asFunction< + dispatch_data_t Function( + dispatch_data_t, int, ffi.Pointer)>(); - dispatch_queue_t CFReadStreamCopyDispatchQueue( - CFReadStreamRef stream, + void dispatch_read( + int fd, + int length, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> handler, ) { - return _CFReadStreamCopyDispatchQueue( - stream, + return _dispatch_read( + fd, + length, + queue, + handler, ); } - late final _CFReadStreamCopyDispatchQueuePtr = - _lookup>( - 'CFReadStreamCopyDispatchQueue'); - late final _CFReadStreamCopyDispatchQueue = _CFReadStreamCopyDispatchQueuePtr - .asFunction(); + late final _dispatch_readPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_fd_t, ffi.Size, dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_read'); + late final _dispatch_read = _dispatch_readPtr.asFunction< + void Function(int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); - dispatch_queue_t CFWriteStreamCopyDispatchQueue( - CFWriteStreamRef stream, + void dispatch_write( + int fd, + dispatch_data_t data, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> handler, ) { - return _CFWriteStreamCopyDispatchQueue( - stream, + return _dispatch_write( + fd, + data, + queue, + handler, ); } - late final _CFWriteStreamCopyDispatchQueuePtr = - _lookup>( - 'CFWriteStreamCopyDispatchQueue'); - late final _CFWriteStreamCopyDispatchQueue = - _CFWriteStreamCopyDispatchQueuePtr.asFunction< - dispatch_queue_t Function(CFWriteStreamRef)>(); + late final _dispatch_writePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_fd_t, dispatch_data_t, dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_write'); + late final _dispatch_write = _dispatch_writePtr.asFunction< + void Function( + int, dispatch_data_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); - CFStreamError CFReadStreamGetError( - CFReadStreamRef stream, + dispatch_io_t dispatch_io_create( + int type, + int fd, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> cleanup_handler, ) { - return _CFReadStreamGetError( - stream, + return _dispatch_io_create( + type, + fd, + queue, + cleanup_handler, ); } - late final _CFReadStreamGetErrorPtr = - _lookup>( - 'CFReadStreamGetError'); - late final _CFReadStreamGetError = _CFReadStreamGetErrorPtr.asFunction< - CFStreamError Function(CFReadStreamRef)>(); + late final _dispatch_io_createPtr = _lookup< + ffi.NativeFunction< + dispatch_io_t Function( + dispatch_io_type_t, + dispatch_fd_t, + dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create'); + late final _dispatch_io_create = _dispatch_io_createPtr.asFunction< + dispatch_io_t Function( + int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); - CFStreamError CFWriteStreamGetError( - CFWriteStreamRef stream, + dispatch_io_t dispatch_io_create_with_path( + int type, + ffi.Pointer path, + int oflag, + int mode, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> cleanup_handler, ) { - return _CFWriteStreamGetError( - stream, + return _dispatch_io_create_with_path( + type, + path, + oflag, + mode, + queue, + cleanup_handler, ); } - late final _CFWriteStreamGetErrorPtr = - _lookup>( - 'CFWriteStreamGetError'); - late final _CFWriteStreamGetError = _CFWriteStreamGetErrorPtr.asFunction< - CFStreamError Function(CFWriteStreamRef)>(); + late final _dispatch_io_create_with_pathPtr = _lookup< + ffi.NativeFunction< + dispatch_io_t Function( + dispatch_io_type_t, + ffi.Pointer, + ffi.Int, + mode_t, + dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create_with_path'); + late final _dispatch_io_create_with_path = + _dispatch_io_create_with_pathPtr.asFunction< + dispatch_io_t Function(int, ffi.Pointer, int, int, + dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); - CFPropertyListRef CFPropertyListCreateFromXMLData( - CFAllocatorRef allocator, - CFDataRef xmlData, - int mutabilityOption, - ffi.Pointer errorString, + dispatch_io_t dispatch_io_create_with_io( + int type, + dispatch_io_t io, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> cleanup_handler, ) { - return _CFPropertyListCreateFromXMLData( - allocator, - xmlData, - mutabilityOption, - errorString, + return _dispatch_io_create_with_io( + type, + io, + queue, + cleanup_handler, ); } - late final _CFPropertyListCreateFromXMLDataPtr = _lookup< + late final _dispatch_io_create_with_ioPtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function(CFAllocatorRef, CFDataRef, CFOptionFlags, - ffi.Pointer)>>('CFPropertyListCreateFromXMLData'); - late final _CFPropertyListCreateFromXMLData = - _CFPropertyListCreateFromXMLDataPtr.asFunction< - CFPropertyListRef Function( - CFAllocatorRef, CFDataRef, int, ffi.Pointer)>(); + dispatch_io_t Function( + dispatch_io_type_t, + dispatch_io_t, + dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create_with_io'); + late final _dispatch_io_create_with_io = + _dispatch_io_create_with_ioPtr.asFunction< + dispatch_io_t Function( + int, dispatch_io_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); - CFDataRef CFPropertyListCreateXMLData( - CFAllocatorRef allocator, - CFPropertyListRef propertyList, + void dispatch_io_read( + dispatch_io_t channel, + int offset, + int length, + dispatch_queue_t queue, + dispatch_io_handler_t io_handler, ) { - return _CFPropertyListCreateXMLData( - allocator, - propertyList, + return _dispatch_io_read( + channel, + offset, + length, + queue, + io_handler, ); } - late final _CFPropertyListCreateXMLDataPtr = _lookup< + late final _dispatch_io_readPtr = _lookup< ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, - CFPropertyListRef)>>('CFPropertyListCreateXMLData'); - late final _CFPropertyListCreateXMLData = _CFPropertyListCreateXMLDataPtr - .asFunction(); + ffi.Void Function(dispatch_io_t, off_t, ffi.Size, dispatch_queue_t, + dispatch_io_handler_t)>>('dispatch_io_read'); + late final _dispatch_io_read = _dispatch_io_readPtr.asFunction< + void Function( + dispatch_io_t, int, int, dispatch_queue_t, dispatch_io_handler_t)>(); - CFPropertyListRef CFPropertyListCreateDeepCopy( - CFAllocatorRef allocator, - CFPropertyListRef propertyList, - int mutabilityOption, + void dispatch_io_write( + dispatch_io_t channel, + int offset, + dispatch_data_t data, + dispatch_queue_t queue, + dispatch_io_handler_t io_handler, ) { - return _CFPropertyListCreateDeepCopy( - allocator, - propertyList, - mutabilityOption, + return _dispatch_io_write( + channel, + offset, + data, + queue, + io_handler, ); } - late final _CFPropertyListCreateDeepCopyPtr = _lookup< + late final _dispatch_io_writePtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, - CFOptionFlags)>>('CFPropertyListCreateDeepCopy'); - late final _CFPropertyListCreateDeepCopy = - _CFPropertyListCreateDeepCopyPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, int)>(); - - int CFPropertyListIsValid( - CFPropertyListRef plist, - int format, + ffi.Void Function(dispatch_io_t, off_t, dispatch_data_t, + dispatch_queue_t, dispatch_io_handler_t)>>('dispatch_io_write'); + late final _dispatch_io_write = _dispatch_io_writePtr.asFunction< + void Function(dispatch_io_t, int, dispatch_data_t, dispatch_queue_t, + dispatch_io_handler_t)>(); + + void dispatch_io_close( + dispatch_io_t channel, + int flags, ) { - return _CFPropertyListIsValid( - plist, - format, + return _dispatch_io_close( + channel, + flags, ); } - late final _CFPropertyListIsValidPtr = _lookup< - ffi.NativeFunction>( - 'CFPropertyListIsValid'); - late final _CFPropertyListIsValid = _CFPropertyListIsValidPtr.asFunction< - int Function(CFPropertyListRef, int)>(); + late final _dispatch_io_closePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_io_t, dispatch_io_close_flags_t)>>('dispatch_io_close'); + late final _dispatch_io_close = + _dispatch_io_closePtr.asFunction(); - int CFPropertyListWriteToStream( - CFPropertyListRef propertyList, - CFWriteStreamRef stream, - int format, - ffi.Pointer errorString, + void dispatch_io_barrier( + dispatch_io_t channel, + dispatch_block_t barrier, ) { - return _CFPropertyListWriteToStream( - propertyList, - stream, - format, - errorString, + return _dispatch_io_barrier( + channel, + barrier, ); } - late final _CFPropertyListWriteToStreamPtr = _lookup< + late final _dispatch_io_barrierPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFPropertyListRef, CFWriteStreamRef, ffi.Int32, - ffi.Pointer)>>('CFPropertyListWriteToStream'); - late final _CFPropertyListWriteToStream = - _CFPropertyListWriteToStreamPtr.asFunction< - int Function(CFPropertyListRef, CFWriteStreamRef, int, - ffi.Pointer)>(); + ffi.Void Function( + dispatch_io_t, dispatch_block_t)>>('dispatch_io_barrier'); + late final _dispatch_io_barrier = _dispatch_io_barrierPtr + .asFunction(); - CFPropertyListRef CFPropertyListCreateFromStream( - CFAllocatorRef allocator, - CFReadStreamRef stream, - int streamLength, - int mutabilityOption, - ffi.Pointer format, - ffi.Pointer errorString, + int dispatch_io_get_descriptor( + dispatch_io_t channel, ) { - return _CFPropertyListCreateFromStream( - allocator, - stream, - streamLength, - mutabilityOption, - format, - errorString, + return _dispatch_io_get_descriptor( + channel, ); } - late final _CFPropertyListCreateFromStreamPtr = _lookup< - ffi.NativeFunction< - CFPropertyListRef Function( - CFAllocatorRef, - CFReadStreamRef, - CFIndex, - CFOptionFlags, - ffi.Pointer, - ffi.Pointer)>>('CFPropertyListCreateFromStream'); - late final _CFPropertyListCreateFromStream = - _CFPropertyListCreateFromStreamPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, - ffi.Pointer, ffi.Pointer)>(); + late final _dispatch_io_get_descriptorPtr = + _lookup>( + 'dispatch_io_get_descriptor'); + late final _dispatch_io_get_descriptor = + _dispatch_io_get_descriptorPtr.asFunction(); - CFPropertyListRef CFPropertyListCreateWithData( - CFAllocatorRef allocator, - CFDataRef data, - int options, - ffi.Pointer format, - ffi.Pointer error, + void dispatch_io_set_high_water( + dispatch_io_t channel, + int high_water, ) { - return _CFPropertyListCreateWithData( - allocator, - data, - options, - format, - error, + return _dispatch_io_set_high_water( + channel, + high_water, ); } - late final _CFPropertyListCreateWithDataPtr = _lookup< - ffi.NativeFunction< - CFPropertyListRef Function( - CFAllocatorRef, - CFDataRef, - CFOptionFlags, - ffi.Pointer, - ffi.Pointer)>>('CFPropertyListCreateWithData'); - late final _CFPropertyListCreateWithData = - _CFPropertyListCreateWithDataPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFDataRef, int, - ffi.Pointer, ffi.Pointer)>(); + late final _dispatch_io_set_high_waterPtr = + _lookup>( + 'dispatch_io_set_high_water'); + late final _dispatch_io_set_high_water = _dispatch_io_set_high_waterPtr + .asFunction(); - CFPropertyListRef CFPropertyListCreateWithStream( - CFAllocatorRef allocator, - CFReadStreamRef stream, - int streamLength, - int options, - ffi.Pointer format, - ffi.Pointer error, + void dispatch_io_set_low_water( + dispatch_io_t channel, + int low_water, ) { - return _CFPropertyListCreateWithStream( - allocator, - stream, - streamLength, - options, - format, - error, + return _dispatch_io_set_low_water( + channel, + low_water, ); } - late final _CFPropertyListCreateWithStreamPtr = _lookup< - ffi.NativeFunction< - CFPropertyListRef Function( - CFAllocatorRef, - CFReadStreamRef, - CFIndex, - CFOptionFlags, - ffi.Pointer, - ffi.Pointer)>>('CFPropertyListCreateWithStream'); - late final _CFPropertyListCreateWithStream = - _CFPropertyListCreateWithStreamPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, - ffi.Pointer, ffi.Pointer)>(); + late final _dispatch_io_set_low_waterPtr = + _lookup>( + 'dispatch_io_set_low_water'); + late final _dispatch_io_set_low_water = _dispatch_io_set_low_waterPtr + .asFunction(); - int CFPropertyListWrite( - CFPropertyListRef propertyList, - CFWriteStreamRef stream, - int format, - int options, - ffi.Pointer error, + void dispatch_io_set_interval( + dispatch_io_t channel, + int interval, + int flags, ) { - return _CFPropertyListWrite( - propertyList, - stream, - format, - options, - error, + return _dispatch_io_set_interval( + channel, + interval, + flags, ); } - late final _CFPropertyListWritePtr = _lookup< + late final _dispatch_io_set_intervalPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFPropertyListRef, CFWriteStreamRef, ffi.Int32, - CFOptionFlags, ffi.Pointer)>>('CFPropertyListWrite'); - late final _CFPropertyListWrite = _CFPropertyListWritePtr.asFunction< - int Function(CFPropertyListRef, CFWriteStreamRef, int, int, - ffi.Pointer)>(); + ffi.Void Function(dispatch_io_t, ffi.Uint64, + dispatch_io_interval_flags_t)>>('dispatch_io_set_interval'); + late final _dispatch_io_set_interval = _dispatch_io_set_intervalPtr + .asFunction(); - CFDataRef CFPropertyListCreateData( - CFAllocatorRef allocator, - CFPropertyListRef propertyList, - int format, - int options, - ffi.Pointer error, + dispatch_workloop_t dispatch_workloop_create( + ffi.Pointer label, ) { - return _CFPropertyListCreateData( - allocator, - propertyList, - format, - options, - error, + return _dispatch_workloop_create( + label, ); } - late final _CFPropertyListCreateDataPtr = _lookup< + late final _dispatch_workloop_createPtr = _lookup< ffi.NativeFunction< - CFDataRef Function( - CFAllocatorRef, - CFPropertyListRef, - ffi.Int32, - CFOptionFlags, - ffi.Pointer)>>('CFPropertyListCreateData'); - late final _CFPropertyListCreateData = - _CFPropertyListCreateDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFPropertyListRef, int, int, - ffi.Pointer)>(); - - late final ffi.Pointer _kCFTypeSetCallBacks = - _lookup('kCFTypeSetCallBacks'); - - CFSetCallBacks get kCFTypeSetCallBacks => _kCFTypeSetCallBacks.ref; - - late final ffi.Pointer _kCFCopyStringSetCallBacks = - _lookup('kCFCopyStringSetCallBacks'); - - CFSetCallBacks get kCFCopyStringSetCallBacks => - _kCFCopyStringSetCallBacks.ref; - - int CFSetGetTypeID() { - return _CFSetGetTypeID(); - } - - late final _CFSetGetTypeIDPtr = - _lookup>('CFSetGetTypeID'); - late final _CFSetGetTypeID = _CFSetGetTypeIDPtr.asFunction(); + dispatch_workloop_t Function( + ffi.Pointer)>>('dispatch_workloop_create'); + late final _dispatch_workloop_create = _dispatch_workloop_createPtr + .asFunction)>(); - CFSetRef CFSetCreate( - CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + dispatch_workloop_t dispatch_workloop_create_inactive( + ffi.Pointer label, ) { - return _CFSetCreate( - allocator, - values, - numValues, - callBacks, + return _dispatch_workloop_create_inactive( + label, ); } - late final _CFSetCreatePtr = _lookup< + late final _dispatch_workloop_create_inactivePtr = _lookup< ffi.NativeFunction< - CFSetRef Function(CFAllocatorRef, ffi.Pointer>, - CFIndex, ffi.Pointer)>>('CFSetCreate'); - late final _CFSetCreate = _CFSetCreatePtr.asFunction< - CFSetRef Function(CFAllocatorRef, ffi.Pointer>, int, - ffi.Pointer)>(); + dispatch_workloop_t Function( + ffi.Pointer)>>('dispatch_workloop_create_inactive'); + late final _dispatch_workloop_create_inactive = + _dispatch_workloop_create_inactivePtr + .asFunction)>(); - CFSetRef CFSetCreateCopy( - CFAllocatorRef allocator, - CFSetRef theSet, + void dispatch_workloop_set_autorelease_frequency( + dispatch_workloop_t workloop, + int frequency, ) { - return _CFSetCreateCopy( - allocator, - theSet, + return _dispatch_workloop_set_autorelease_frequency( + workloop, + frequency, ); } - late final _CFSetCreateCopyPtr = - _lookup>( - 'CFSetCreateCopy'); - late final _CFSetCreateCopy = _CFSetCreateCopyPtr.asFunction< - CFSetRef Function(CFAllocatorRef, CFSetRef)>(); + late final _dispatch_workloop_set_autorelease_frequencyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_workloop_t, + ffi.Int32)>>('dispatch_workloop_set_autorelease_frequency'); + late final _dispatch_workloop_set_autorelease_frequency = + _dispatch_workloop_set_autorelease_frequencyPtr + .asFunction(); - CFMutableSetRef CFSetCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + void dispatch_workloop_set_os_workgroup( + dispatch_workloop_t workloop, + os_workgroup_t workgroup, ) { - return _CFSetCreateMutable( - allocator, - capacity, - callBacks, + return _dispatch_workloop_set_os_workgroup( + workloop, + workgroup, ); } - late final _CFSetCreateMutablePtr = _lookup< + late final _dispatch_workloop_set_os_workgroupPtr = _lookup< ffi.NativeFunction< - CFMutableSetRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFSetCreateMutable'); - late final _CFSetCreateMutable = _CFSetCreateMutablePtr.asFunction< - CFMutableSetRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + ffi.Void Function(dispatch_workloop_t, + os_workgroup_t)>>('dispatch_workloop_set_os_workgroup'); + late final _dispatch_workloop_set_os_workgroup = + _dispatch_workloop_set_os_workgroupPtr + .asFunction(); - CFMutableSetRef CFSetCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFSetRef theSet, - ) { - return _CFSetCreateMutableCopy( - allocator, - capacity, - theSet, - ); + int CFReadStreamGetTypeID() { + return _CFReadStreamGetTypeID(); } - late final _CFSetCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableSetRef Function( - CFAllocatorRef, CFIndex, CFSetRef)>>('CFSetCreateMutableCopy'); - late final _CFSetCreateMutableCopy = _CFSetCreateMutableCopyPtr.asFunction< - CFMutableSetRef Function(CFAllocatorRef, int, CFSetRef)>(); + late final _CFReadStreamGetTypeIDPtr = + _lookup>('CFReadStreamGetTypeID'); + late final _CFReadStreamGetTypeID = + _CFReadStreamGetTypeIDPtr.asFunction(); - int CFSetGetCount( - CFSetRef theSet, - ) { - return _CFSetGetCount( - theSet, - ); + int CFWriteStreamGetTypeID() { + return _CFWriteStreamGetTypeID(); } - late final _CFSetGetCountPtr = - _lookup>('CFSetGetCount'); - late final _CFSetGetCount = - _CFSetGetCountPtr.asFunction(); + late final _CFWriteStreamGetTypeIDPtr = + _lookup>( + 'CFWriteStreamGetTypeID'); + late final _CFWriteStreamGetTypeID = + _CFWriteStreamGetTypeIDPtr.asFunction(); - int CFSetGetCountOfValue( - CFSetRef theSet, - ffi.Pointer value, + late final ffi.Pointer _kCFStreamPropertyDataWritten = + _lookup('kCFStreamPropertyDataWritten'); + + CFStreamPropertyKey get kCFStreamPropertyDataWritten => + _kCFStreamPropertyDataWritten.value; + + set kCFStreamPropertyDataWritten(CFStreamPropertyKey value) => + _kCFStreamPropertyDataWritten.value = value; + + CFReadStreamRef CFReadStreamCreateWithBytesNoCopy( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int length, + CFAllocatorRef bytesDeallocator, ) { - return _CFSetGetCountOfValue( - theSet, - value, + return _CFReadStreamCreateWithBytesNoCopy( + alloc, + bytes, + length, + bytesDeallocator, ); } - late final _CFSetGetCountOfValuePtr = _lookup< + late final _CFReadStreamCreateWithBytesNoCopyPtr = _lookup< ffi.NativeFunction< - CFIndex Function( - CFSetRef, ffi.Pointer)>>('CFSetGetCountOfValue'); - late final _CFSetGetCountOfValue = _CFSetGetCountOfValuePtr.asFunction< - int Function(CFSetRef, ffi.Pointer)>(); + CFReadStreamRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFReadStreamCreateWithBytesNoCopy'); + late final _CFReadStreamCreateWithBytesNoCopy = + _CFReadStreamCreateWithBytesNoCopyPtr.asFunction< + CFReadStreamRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - int CFSetContainsValue( - CFSetRef theSet, - ffi.Pointer value, + CFWriteStreamRef CFWriteStreamCreateWithBuffer( + CFAllocatorRef alloc, + ffi.Pointer buffer, + int bufferCapacity, ) { - return _CFSetContainsValue( - theSet, - value, + return _CFWriteStreamCreateWithBuffer( + alloc, + buffer, + bufferCapacity, ); } - late final _CFSetContainsValuePtr = _lookup< + late final _CFWriteStreamCreateWithBufferPtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFSetRef, ffi.Pointer)>>('CFSetContainsValue'); - late final _CFSetContainsValue = _CFSetContainsValuePtr.asFunction< - int Function(CFSetRef, ffi.Pointer)>(); + CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFWriteStreamCreateWithBuffer'); + late final _CFWriteStreamCreateWithBuffer = + _CFWriteStreamCreateWithBufferPtr.asFunction< + CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - ffi.Pointer CFSetGetValue( - CFSetRef theSet, - ffi.Pointer value, + CFWriteStreamRef CFWriteStreamCreateWithAllocatedBuffers( + CFAllocatorRef alloc, + CFAllocatorRef bufferAllocator, ) { - return _CFSetGetValue( - theSet, - value, + return _CFWriteStreamCreateWithAllocatedBuffers( + alloc, + bufferAllocator, ); } - late final _CFSetGetValuePtr = _lookup< + late final _CFWriteStreamCreateWithAllocatedBuffersPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFSetRef, ffi.Pointer)>>('CFSetGetValue'); - late final _CFSetGetValue = _CFSetGetValuePtr.asFunction< - ffi.Pointer Function(CFSetRef, ffi.Pointer)>(); + CFWriteStreamRef Function(CFAllocatorRef, + CFAllocatorRef)>>('CFWriteStreamCreateWithAllocatedBuffers'); + late final _CFWriteStreamCreateWithAllocatedBuffers = + _CFWriteStreamCreateWithAllocatedBuffersPtr.asFunction< + CFWriteStreamRef Function(CFAllocatorRef, CFAllocatorRef)>(); - int CFSetGetValueIfPresent( - CFSetRef theSet, - ffi.Pointer candidate, - ffi.Pointer> value, + CFReadStreamRef CFReadStreamCreateWithFile( + CFAllocatorRef alloc, + CFURLRef fileURL, ) { - return _CFSetGetValueIfPresent( - theSet, - candidate, - value, + return _CFReadStreamCreateWithFile( + alloc, + fileURL, ); } - late final _CFSetGetValueIfPresentPtr = _lookup< + late final _CFReadStreamCreateWithFilePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFSetRef, ffi.Pointer, - ffi.Pointer>)>>('CFSetGetValueIfPresent'); - late final _CFSetGetValueIfPresent = _CFSetGetValueIfPresentPtr.asFunction< - int Function(CFSetRef, ffi.Pointer, - ffi.Pointer>)>(); + CFReadStreamRef Function( + CFAllocatorRef, CFURLRef)>>('CFReadStreamCreateWithFile'); + late final _CFReadStreamCreateWithFile = _CFReadStreamCreateWithFilePtr + .asFunction(); - void CFSetGetValues( - CFSetRef theSet, - ffi.Pointer> values, + CFWriteStreamRef CFWriteStreamCreateWithFile( + CFAllocatorRef alloc, + CFURLRef fileURL, ) { - return _CFSetGetValues( - theSet, - values, + return _CFWriteStreamCreateWithFile( + alloc, + fileURL, ); } - late final _CFSetGetValuesPtr = _lookup< + late final _CFWriteStreamCreateWithFilePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFSetRef, ffi.Pointer>)>>('CFSetGetValues'); - late final _CFSetGetValues = _CFSetGetValuesPtr.asFunction< - void Function(CFSetRef, ffi.Pointer>)>(); + CFWriteStreamRef Function( + CFAllocatorRef, CFURLRef)>>('CFWriteStreamCreateWithFile'); + late final _CFWriteStreamCreateWithFile = _CFWriteStreamCreateWithFilePtr + .asFunction(); - void CFSetApplyFunction( - CFSetRef theSet, - CFSetApplierFunction applier, - ffi.Pointer context, + void CFStreamCreateBoundPair( + CFAllocatorRef alloc, + ffi.Pointer readStream, + ffi.Pointer writeStream, + int transferBufferSize, ) { - return _CFSetApplyFunction( - theSet, - applier, - context, + return _CFStreamCreateBoundPair( + alloc, + readStream, + writeStream, + transferBufferSize, ); } - late final _CFSetApplyFunctionPtr = _lookup< + late final _CFStreamCreateBoundPairPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFSetRef, CFSetApplierFunction, - ffi.Pointer)>>('CFSetApplyFunction'); - late final _CFSetApplyFunction = _CFSetApplyFunctionPtr.asFunction< - void Function(CFSetRef, CFSetApplierFunction, ffi.Pointer)>(); + ffi.Void Function( + CFAllocatorRef, + ffi.Pointer, + ffi.Pointer, + CFIndex)>>('CFStreamCreateBoundPair'); + late final _CFStreamCreateBoundPair = _CFStreamCreateBoundPairPtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer, + ffi.Pointer, int)>(); - void CFSetAddValue( - CFMutableSetRef theSet, - ffi.Pointer value, - ) { - return _CFSetAddValue( - theSet, - value, - ); - } + late final ffi.Pointer _kCFStreamPropertyAppendToFile = + _lookup('kCFStreamPropertyAppendToFile'); - late final _CFSetAddValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetAddValue'); - late final _CFSetAddValue = _CFSetAddValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + CFStreamPropertyKey get kCFStreamPropertyAppendToFile => + _kCFStreamPropertyAppendToFile.value; - void CFSetReplaceValue( - CFMutableSetRef theSet, - ffi.Pointer value, + set kCFStreamPropertyAppendToFile(CFStreamPropertyKey value) => + _kCFStreamPropertyAppendToFile.value = value; + + late final ffi.Pointer + _kCFStreamPropertyFileCurrentOffset = + _lookup('kCFStreamPropertyFileCurrentOffset'); + + CFStreamPropertyKey get kCFStreamPropertyFileCurrentOffset => + _kCFStreamPropertyFileCurrentOffset.value; + + set kCFStreamPropertyFileCurrentOffset(CFStreamPropertyKey value) => + _kCFStreamPropertyFileCurrentOffset.value = value; + + late final ffi.Pointer + _kCFStreamPropertySocketNativeHandle = + _lookup('kCFStreamPropertySocketNativeHandle'); + + CFStreamPropertyKey get kCFStreamPropertySocketNativeHandle => + _kCFStreamPropertySocketNativeHandle.value; + + set kCFStreamPropertySocketNativeHandle(CFStreamPropertyKey value) => + _kCFStreamPropertySocketNativeHandle.value = value; + + late final ffi.Pointer + _kCFStreamPropertySocketRemoteHostName = + _lookup('kCFStreamPropertySocketRemoteHostName'); + + CFStreamPropertyKey get kCFStreamPropertySocketRemoteHostName => + _kCFStreamPropertySocketRemoteHostName.value; + + set kCFStreamPropertySocketRemoteHostName(CFStreamPropertyKey value) => + _kCFStreamPropertySocketRemoteHostName.value = value; + + late final ffi.Pointer + _kCFStreamPropertySocketRemotePortNumber = + _lookup('kCFStreamPropertySocketRemotePortNumber'); + + CFStreamPropertyKey get kCFStreamPropertySocketRemotePortNumber => + _kCFStreamPropertySocketRemotePortNumber.value; + + set kCFStreamPropertySocketRemotePortNumber(CFStreamPropertyKey value) => + _kCFStreamPropertySocketRemotePortNumber.value = value; + + late final ffi.Pointer _kCFStreamErrorDomainSOCKS = + _lookup('kCFStreamErrorDomainSOCKS'); + + int get kCFStreamErrorDomainSOCKS => _kCFStreamErrorDomainSOCKS.value; + + set kCFStreamErrorDomainSOCKS(int value) => + _kCFStreamErrorDomainSOCKS.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSProxy = + _lookup('kCFStreamPropertySOCKSProxy'); + + CFStringRef get kCFStreamPropertySOCKSProxy => + _kCFStreamPropertySOCKSProxy.value; + + set kCFStreamPropertySOCKSProxy(CFStringRef value) => + _kCFStreamPropertySOCKSProxy.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSProxyHost = + _lookup('kCFStreamPropertySOCKSProxyHost'); + + CFStringRef get kCFStreamPropertySOCKSProxyHost => + _kCFStreamPropertySOCKSProxyHost.value; + + set kCFStreamPropertySOCKSProxyHost(CFStringRef value) => + _kCFStreamPropertySOCKSProxyHost.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSProxyPort = + _lookup('kCFStreamPropertySOCKSProxyPort'); + + CFStringRef get kCFStreamPropertySOCKSProxyPort => + _kCFStreamPropertySOCKSProxyPort.value; + + set kCFStreamPropertySOCKSProxyPort(CFStringRef value) => + _kCFStreamPropertySOCKSProxyPort.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSVersion = + _lookup('kCFStreamPropertySOCKSVersion'); + + CFStringRef get kCFStreamPropertySOCKSVersion => + _kCFStreamPropertySOCKSVersion.value; + + set kCFStreamPropertySOCKSVersion(CFStringRef value) => + _kCFStreamPropertySOCKSVersion.value = value; + + late final ffi.Pointer _kCFStreamSocketSOCKSVersion4 = + _lookup('kCFStreamSocketSOCKSVersion4'); + + CFStringRef get kCFStreamSocketSOCKSVersion4 => + _kCFStreamSocketSOCKSVersion4.value; + + set kCFStreamSocketSOCKSVersion4(CFStringRef value) => + _kCFStreamSocketSOCKSVersion4.value = value; + + late final ffi.Pointer _kCFStreamSocketSOCKSVersion5 = + _lookup('kCFStreamSocketSOCKSVersion5'); + + CFStringRef get kCFStreamSocketSOCKSVersion5 => + _kCFStreamSocketSOCKSVersion5.value; + + set kCFStreamSocketSOCKSVersion5(CFStringRef value) => + _kCFStreamSocketSOCKSVersion5.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSUser = + _lookup('kCFStreamPropertySOCKSUser'); + + CFStringRef get kCFStreamPropertySOCKSUser => + _kCFStreamPropertySOCKSUser.value; + + set kCFStreamPropertySOCKSUser(CFStringRef value) => + _kCFStreamPropertySOCKSUser.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSPassword = + _lookup('kCFStreamPropertySOCKSPassword'); + + CFStringRef get kCFStreamPropertySOCKSPassword => + _kCFStreamPropertySOCKSPassword.value; + + set kCFStreamPropertySOCKSPassword(CFStringRef value) => + _kCFStreamPropertySOCKSPassword.value = value; + + late final ffi.Pointer _kCFStreamErrorDomainSSL = + _lookup('kCFStreamErrorDomainSSL'); + + int get kCFStreamErrorDomainSSL => _kCFStreamErrorDomainSSL.value; + + set kCFStreamErrorDomainSSL(int value) => + _kCFStreamErrorDomainSSL.value = value; + + late final ffi.Pointer _kCFStreamPropertySocketSecurityLevel = + _lookup('kCFStreamPropertySocketSecurityLevel'); + + CFStringRef get kCFStreamPropertySocketSecurityLevel => + _kCFStreamPropertySocketSecurityLevel.value; + + set kCFStreamPropertySocketSecurityLevel(CFStringRef value) => + _kCFStreamPropertySocketSecurityLevel.value = value; + + late final ffi.Pointer _kCFStreamSocketSecurityLevelNone = + _lookup('kCFStreamSocketSecurityLevelNone'); + + CFStringRef get kCFStreamSocketSecurityLevelNone => + _kCFStreamSocketSecurityLevelNone.value; + + set kCFStreamSocketSecurityLevelNone(CFStringRef value) => + _kCFStreamSocketSecurityLevelNone.value = value; + + late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv2 = + _lookup('kCFStreamSocketSecurityLevelSSLv2'); + + CFStringRef get kCFStreamSocketSecurityLevelSSLv2 => + _kCFStreamSocketSecurityLevelSSLv2.value; + + set kCFStreamSocketSecurityLevelSSLv2(CFStringRef value) => + _kCFStreamSocketSecurityLevelSSLv2.value = value; + + late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv3 = + _lookup('kCFStreamSocketSecurityLevelSSLv3'); + + CFStringRef get kCFStreamSocketSecurityLevelSSLv3 => + _kCFStreamSocketSecurityLevelSSLv3.value; + + set kCFStreamSocketSecurityLevelSSLv3(CFStringRef value) => + _kCFStreamSocketSecurityLevelSSLv3.value = value; + + late final ffi.Pointer _kCFStreamSocketSecurityLevelTLSv1 = + _lookup('kCFStreamSocketSecurityLevelTLSv1'); + + CFStringRef get kCFStreamSocketSecurityLevelTLSv1 => + _kCFStreamSocketSecurityLevelTLSv1.value; + + set kCFStreamSocketSecurityLevelTLSv1(CFStringRef value) => + _kCFStreamSocketSecurityLevelTLSv1.value = value; + + late final ffi.Pointer + _kCFStreamSocketSecurityLevelNegotiatedSSL = + _lookup('kCFStreamSocketSecurityLevelNegotiatedSSL'); + + CFStringRef get kCFStreamSocketSecurityLevelNegotiatedSSL => + _kCFStreamSocketSecurityLevelNegotiatedSSL.value; + + set kCFStreamSocketSecurityLevelNegotiatedSSL(CFStringRef value) => + _kCFStreamSocketSecurityLevelNegotiatedSSL.value = value; + + late final ffi.Pointer + _kCFStreamPropertyShouldCloseNativeSocket = + _lookup('kCFStreamPropertyShouldCloseNativeSocket'); + + CFStringRef get kCFStreamPropertyShouldCloseNativeSocket => + _kCFStreamPropertyShouldCloseNativeSocket.value; + + set kCFStreamPropertyShouldCloseNativeSocket(CFStringRef value) => + _kCFStreamPropertyShouldCloseNativeSocket.value = value; + + void CFStreamCreatePairWithSocket( + CFAllocatorRef alloc, + int sock, + ffi.Pointer readStream, + ffi.Pointer writeStream, ) { - return _CFSetReplaceValue( - theSet, - value, + return _CFStreamCreatePairWithSocket( + alloc, + sock, + readStream, + writeStream, ); } - late final _CFSetReplaceValuePtr = _lookup< + late final _CFStreamCreatePairWithSocketPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetReplaceValue'); - late final _CFSetReplaceValue = _CFSetReplaceValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + CFAllocatorRef, + CFSocketNativeHandle, + ffi.Pointer, + ffi.Pointer)>>('CFStreamCreatePairWithSocket'); + late final _CFStreamCreatePairWithSocket = + _CFStreamCreatePairWithSocketPtr.asFunction< + void Function(CFAllocatorRef, int, ffi.Pointer, + ffi.Pointer)>(); - void CFSetSetValue( - CFMutableSetRef theSet, - ffi.Pointer value, + void CFStreamCreatePairWithSocketToHost( + CFAllocatorRef alloc, + CFStringRef host, + int port, + ffi.Pointer readStream, + ffi.Pointer writeStream, ) { - return _CFSetSetValue( - theSet, - value, + return _CFStreamCreatePairWithSocketToHost( + alloc, + host, + port, + readStream, + writeStream, ); } - late final _CFSetSetValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetSetValue'); - late final _CFSetSetValue = _CFSetSetValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + late final _CFStreamCreatePairWithSocketToHostPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef, + CFStringRef, + UInt32, + ffi.Pointer, + ffi.Pointer)>>( + 'CFStreamCreatePairWithSocketToHost'); + late final _CFStreamCreatePairWithSocketToHost = + _CFStreamCreatePairWithSocketToHostPtr.asFunction< + void Function(CFAllocatorRef, CFStringRef, int, + ffi.Pointer, ffi.Pointer)>(); - void CFSetRemoveValue( - CFMutableSetRef theSet, - ffi.Pointer value, + void CFStreamCreatePairWithPeerSocketSignature( + CFAllocatorRef alloc, + ffi.Pointer signature, + ffi.Pointer readStream, + ffi.Pointer writeStream, ) { - return _CFSetRemoveValue( - theSet, - value, + return _CFStreamCreatePairWithPeerSocketSignature( + alloc, + signature, + readStream, + writeStream, ); } - late final _CFSetRemoveValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetRemoveValue'); - late final _CFSetRemoveValue = _CFSetRemoveValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + late final _CFStreamCreatePairWithPeerSocketSignaturePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'CFStreamCreatePairWithPeerSocketSignature'); + late final _CFStreamCreatePairWithPeerSocketSignature = + _CFStreamCreatePairWithPeerSocketSignaturePtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void CFSetRemoveAllValues( - CFMutableSetRef theSet, + int CFReadStreamGetStatus( + CFReadStreamRef stream, ) { - return _CFSetRemoveAllValues( - theSet, + return _CFReadStreamGetStatus( + stream, ); } - late final _CFSetRemoveAllValuesPtr = - _lookup>( - 'CFSetRemoveAllValues'); - late final _CFSetRemoveAllValues = - _CFSetRemoveAllValuesPtr.asFunction(); + late final _CFReadStreamGetStatusPtr = + _lookup>( + 'CFReadStreamGetStatus'); + late final _CFReadStreamGetStatus = + _CFReadStreamGetStatusPtr.asFunction(); - int CFTreeGetTypeID() { - return _CFTreeGetTypeID(); + int CFWriteStreamGetStatus( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamGetStatus( + stream, + ); } - late final _CFTreeGetTypeIDPtr = - _lookup>('CFTreeGetTypeID'); - late final _CFTreeGetTypeID = - _CFTreeGetTypeIDPtr.asFunction(); + late final _CFWriteStreamGetStatusPtr = + _lookup>( + 'CFWriteStreamGetStatus'); + late final _CFWriteStreamGetStatus = + _CFWriteStreamGetStatusPtr.asFunction(); - CFTreeRef CFTreeCreate( - CFAllocatorRef allocator, - ffi.Pointer context, + CFErrorRef CFReadStreamCopyError( + CFReadStreamRef stream, ) { - return _CFTreeCreate( - allocator, - context, + return _CFReadStreamCopyError( + stream, ); } - late final _CFTreeCreatePtr = _lookup< - ffi.NativeFunction< - CFTreeRef Function( - CFAllocatorRef, ffi.Pointer)>>('CFTreeCreate'); - late final _CFTreeCreate = _CFTreeCreatePtr.asFunction< - CFTreeRef Function(CFAllocatorRef, ffi.Pointer)>(); + late final _CFReadStreamCopyErrorPtr = + _lookup>( + 'CFReadStreamCopyError'); + late final _CFReadStreamCopyError = _CFReadStreamCopyErrorPtr.asFunction< + CFErrorRef Function(CFReadStreamRef)>(); - CFTreeRef CFTreeGetParent( - CFTreeRef tree, + CFErrorRef CFWriteStreamCopyError( + CFWriteStreamRef stream, ) { - return _CFTreeGetParent( - tree, + return _CFWriteStreamCopyError( + stream, ); } - late final _CFTreeGetParentPtr = - _lookup>( - 'CFTreeGetParent'); - late final _CFTreeGetParent = - _CFTreeGetParentPtr.asFunction(); + late final _CFWriteStreamCopyErrorPtr = + _lookup>( + 'CFWriteStreamCopyError'); + late final _CFWriteStreamCopyError = _CFWriteStreamCopyErrorPtr.asFunction< + CFErrorRef Function(CFWriteStreamRef)>(); - CFTreeRef CFTreeGetNextSibling( - CFTreeRef tree, + int CFReadStreamOpen( + CFReadStreamRef stream, ) { - return _CFTreeGetNextSibling( - tree, + return _CFReadStreamOpen( + stream, ); } - late final _CFTreeGetNextSiblingPtr = - _lookup>( - 'CFTreeGetNextSibling'); - late final _CFTreeGetNextSibling = - _CFTreeGetNextSiblingPtr.asFunction(); + late final _CFReadStreamOpenPtr = + _lookup>( + 'CFReadStreamOpen'); + late final _CFReadStreamOpen = + _CFReadStreamOpenPtr.asFunction(); - CFTreeRef CFTreeGetFirstChild( - CFTreeRef tree, + int CFWriteStreamOpen( + CFWriteStreamRef stream, ) { - return _CFTreeGetFirstChild( - tree, + return _CFWriteStreamOpen( + stream, ); } - late final _CFTreeGetFirstChildPtr = - _lookup>( - 'CFTreeGetFirstChild'); - late final _CFTreeGetFirstChild = - _CFTreeGetFirstChildPtr.asFunction(); + late final _CFWriteStreamOpenPtr = + _lookup>( + 'CFWriteStreamOpen'); + late final _CFWriteStreamOpen = + _CFWriteStreamOpenPtr.asFunction(); - void CFTreeGetContext( - CFTreeRef tree, - ffi.Pointer context, + void CFReadStreamClose( + CFReadStreamRef stream, ) { - return _CFTreeGetContext( - tree, - context, + return _CFReadStreamClose( + stream, ); } - late final _CFTreeGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFTreeRef, ffi.Pointer)>>('CFTreeGetContext'); - late final _CFTreeGetContext = _CFTreeGetContextPtr.asFunction< - void Function(CFTreeRef, ffi.Pointer)>(); + late final _CFReadStreamClosePtr = + _lookup>( + 'CFReadStreamClose'); + late final _CFReadStreamClose = + _CFReadStreamClosePtr.asFunction(); - int CFTreeGetChildCount( - CFTreeRef tree, + void CFWriteStreamClose( + CFWriteStreamRef stream, ) { - return _CFTreeGetChildCount( - tree, + return _CFWriteStreamClose( + stream, ); } - late final _CFTreeGetChildCountPtr = - _lookup>( - 'CFTreeGetChildCount'); - late final _CFTreeGetChildCount = - _CFTreeGetChildCountPtr.asFunction(); + late final _CFWriteStreamClosePtr = + _lookup>( + 'CFWriteStreamClose'); + late final _CFWriteStreamClose = + _CFWriteStreamClosePtr.asFunction(); - CFTreeRef CFTreeGetChildAtIndex( - CFTreeRef tree, - int idx, + int CFReadStreamHasBytesAvailable( + CFReadStreamRef stream, ) { - return _CFTreeGetChildAtIndex( - tree, - idx, + return _CFReadStreamHasBytesAvailable( + stream, ); } - late final _CFTreeGetChildAtIndexPtr = - _lookup>( - 'CFTreeGetChildAtIndex'); - late final _CFTreeGetChildAtIndex = _CFTreeGetChildAtIndexPtr.asFunction< - CFTreeRef Function(CFTreeRef, int)>(); + late final _CFReadStreamHasBytesAvailablePtr = + _lookup>( + 'CFReadStreamHasBytesAvailable'); + late final _CFReadStreamHasBytesAvailable = _CFReadStreamHasBytesAvailablePtr + .asFunction(); - void CFTreeGetChildren( - CFTreeRef tree, - ffi.Pointer children, + int CFReadStreamRead( + CFReadStreamRef stream, + ffi.Pointer buffer, + int bufferLength, ) { - return _CFTreeGetChildren( - tree, - children, + return _CFReadStreamRead( + stream, + buffer, + bufferLength, ); } - late final _CFTreeGetChildrenPtr = _lookup< + late final _CFReadStreamReadPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFTreeRef, ffi.Pointer)>>('CFTreeGetChildren'); - late final _CFTreeGetChildren = _CFTreeGetChildrenPtr.asFunction< - void Function(CFTreeRef, ffi.Pointer)>(); + CFIndex Function(CFReadStreamRef, ffi.Pointer, + CFIndex)>>('CFReadStreamRead'); + late final _CFReadStreamRead = _CFReadStreamReadPtr.asFunction< + int Function(CFReadStreamRef, ffi.Pointer, int)>(); - void CFTreeApplyFunctionToChildren( - CFTreeRef tree, - CFTreeApplierFunction applier, - ffi.Pointer context, + ffi.Pointer CFReadStreamGetBuffer( + CFReadStreamRef stream, + int maxBytesToRead, + ffi.Pointer numBytesRead, ) { - return _CFTreeApplyFunctionToChildren( - tree, - applier, - context, + return _CFReadStreamGetBuffer( + stream, + maxBytesToRead, + numBytesRead, ); } - late final _CFTreeApplyFunctionToChildrenPtr = _lookup< + late final _CFReadStreamGetBufferPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFTreeRef, CFTreeApplierFunction, - ffi.Pointer)>>('CFTreeApplyFunctionToChildren'); - late final _CFTreeApplyFunctionToChildren = - _CFTreeApplyFunctionToChildrenPtr.asFunction< - void Function( - CFTreeRef, CFTreeApplierFunction, ffi.Pointer)>(); + ffi.Pointer Function(CFReadStreamRef, CFIndex, + ffi.Pointer)>>('CFReadStreamGetBuffer'); + late final _CFReadStreamGetBuffer = _CFReadStreamGetBufferPtr.asFunction< + ffi.Pointer Function( + CFReadStreamRef, int, ffi.Pointer)>(); - CFTreeRef CFTreeFindRoot( - CFTreeRef tree, + int CFWriteStreamCanAcceptBytes( + CFWriteStreamRef stream, ) { - return _CFTreeFindRoot( - tree, + return _CFWriteStreamCanAcceptBytes( + stream, ); } - late final _CFTreeFindRootPtr = - _lookup>( - 'CFTreeFindRoot'); - late final _CFTreeFindRoot = - _CFTreeFindRootPtr.asFunction(); + late final _CFWriteStreamCanAcceptBytesPtr = + _lookup>( + 'CFWriteStreamCanAcceptBytes'); + late final _CFWriteStreamCanAcceptBytes = _CFWriteStreamCanAcceptBytesPtr + .asFunction(); - void CFTreeSetContext( - CFTreeRef tree, - ffi.Pointer context, + int CFWriteStreamWrite( + CFWriteStreamRef stream, + ffi.Pointer buffer, + int bufferLength, ) { - return _CFTreeSetContext( - tree, - context, + return _CFWriteStreamWrite( + stream, + buffer, + bufferLength, ); } - late final _CFTreeSetContextPtr = _lookup< + late final _CFWriteStreamWritePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFTreeRef, ffi.Pointer)>>('CFTreeSetContext'); - late final _CFTreeSetContext = _CFTreeSetContextPtr.asFunction< - void Function(CFTreeRef, ffi.Pointer)>(); + CFIndex Function(CFWriteStreamRef, ffi.Pointer, + CFIndex)>>('CFWriteStreamWrite'); + late final _CFWriteStreamWrite = _CFWriteStreamWritePtr.asFunction< + int Function(CFWriteStreamRef, ffi.Pointer, int)>(); - void CFTreePrependChild( - CFTreeRef tree, - CFTreeRef newChild, + CFTypeRef CFReadStreamCopyProperty( + CFReadStreamRef stream, + CFStreamPropertyKey propertyName, ) { - return _CFTreePrependChild( - tree, - newChild, + return _CFReadStreamCopyProperty( + stream, + propertyName, ); } - late final _CFTreePrependChildPtr = - _lookup>( - 'CFTreePrependChild'); - late final _CFTreePrependChild = - _CFTreePrependChildPtr.asFunction(); + late final _CFReadStreamCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFReadStreamRef, + CFStreamPropertyKey)>>('CFReadStreamCopyProperty'); + late final _CFReadStreamCopyProperty = _CFReadStreamCopyPropertyPtr + .asFunction(); - void CFTreeAppendChild( - CFTreeRef tree, - CFTreeRef newChild, + CFTypeRef CFWriteStreamCopyProperty( + CFWriteStreamRef stream, + CFStreamPropertyKey propertyName, ) { - return _CFTreeAppendChild( - tree, - newChild, + return _CFWriteStreamCopyProperty( + stream, + propertyName, ); } - late final _CFTreeAppendChildPtr = - _lookup>( - 'CFTreeAppendChild'); - late final _CFTreeAppendChild = - _CFTreeAppendChildPtr.asFunction(); + late final _CFWriteStreamCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFWriteStreamRef, + CFStreamPropertyKey)>>('CFWriteStreamCopyProperty'); + late final _CFWriteStreamCopyProperty = _CFWriteStreamCopyPropertyPtr + .asFunction(); - void CFTreeInsertSibling( - CFTreeRef tree, - CFTreeRef newSibling, + int CFReadStreamSetProperty( + CFReadStreamRef stream, + CFStreamPropertyKey propertyName, + CFTypeRef propertyValue, ) { - return _CFTreeInsertSibling( - tree, - newSibling, + return _CFReadStreamSetProperty( + stream, + propertyName, + propertyValue, ); } - late final _CFTreeInsertSiblingPtr = - _lookup>( - 'CFTreeInsertSibling'); - late final _CFTreeInsertSibling = - _CFTreeInsertSiblingPtr.asFunction(); + late final _CFReadStreamSetPropertyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFReadStreamRef, CFStreamPropertyKey, + CFTypeRef)>>('CFReadStreamSetProperty'); + late final _CFReadStreamSetProperty = _CFReadStreamSetPropertyPtr.asFunction< + int Function(CFReadStreamRef, CFStreamPropertyKey, CFTypeRef)>(); - void CFTreeRemove( - CFTreeRef tree, + int CFWriteStreamSetProperty( + CFWriteStreamRef stream, + CFStreamPropertyKey propertyName, + CFTypeRef propertyValue, ) { - return _CFTreeRemove( - tree, + return _CFWriteStreamSetProperty( + stream, + propertyName, + propertyValue, ); } - late final _CFTreeRemovePtr = - _lookup>('CFTreeRemove'); - late final _CFTreeRemove = - _CFTreeRemovePtr.asFunction(); + late final _CFWriteStreamSetPropertyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFWriteStreamRef, CFStreamPropertyKey, + CFTypeRef)>>('CFWriteStreamSetProperty'); + late final _CFWriteStreamSetProperty = + _CFWriteStreamSetPropertyPtr.asFunction< + int Function(CFWriteStreamRef, CFStreamPropertyKey, CFTypeRef)>(); - void CFTreeRemoveAllChildren( - CFTreeRef tree, + int CFReadStreamSetClient( + CFReadStreamRef stream, + int streamEvents, + CFReadStreamClientCallBack clientCB, + ffi.Pointer clientContext, ) { - return _CFTreeRemoveAllChildren( - tree, + return _CFReadStreamSetClient( + stream, + streamEvents, + clientCB, + clientContext, ); } - late final _CFTreeRemoveAllChildrenPtr = - _lookup>( - 'CFTreeRemoveAllChildren'); - late final _CFTreeRemoveAllChildren = - _CFTreeRemoveAllChildrenPtr.asFunction(); + late final _CFReadStreamSetClientPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFReadStreamRef, + CFOptionFlags, + CFReadStreamClientCallBack, + ffi.Pointer)>>('CFReadStreamSetClient'); + late final _CFReadStreamSetClient = _CFReadStreamSetClientPtr.asFunction< + int Function(CFReadStreamRef, int, CFReadStreamClientCallBack, + ffi.Pointer)>(); - void CFTreeSortChildren( - CFTreeRef tree, - CFComparatorFunction comparator, - ffi.Pointer context, + int CFWriteStreamSetClient( + CFWriteStreamRef stream, + int streamEvents, + CFWriteStreamClientCallBack clientCB, + ffi.Pointer clientContext, ) { - return _CFTreeSortChildren( - tree, - comparator, - context, + return _CFWriteStreamSetClient( + stream, + streamEvents, + clientCB, + clientContext, ); } - late final _CFTreeSortChildrenPtr = _lookup< + late final _CFWriteStreamSetClientPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFTreeRef, CFComparatorFunction, - ffi.Pointer)>>('CFTreeSortChildren'); - late final _CFTreeSortChildren = _CFTreeSortChildrenPtr.asFunction< - void Function(CFTreeRef, CFComparatorFunction, ffi.Pointer)>(); + Boolean Function( + CFWriteStreamRef, + CFOptionFlags, + CFWriteStreamClientCallBack, + ffi.Pointer)>>('CFWriteStreamSetClient'); + late final _CFWriteStreamSetClient = _CFWriteStreamSetClientPtr.asFunction< + int Function(CFWriteStreamRef, int, CFWriteStreamClientCallBack, + ffi.Pointer)>(); - int CFURLCreateDataAndPropertiesFromResource( - CFAllocatorRef alloc, - CFURLRef url, - ffi.Pointer resourceData, - ffi.Pointer properties, - CFArrayRef desiredProperties, - ffi.Pointer errorCode, + void CFReadStreamScheduleWithRunLoop( + CFReadStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, ) { - return _CFURLCreateDataAndPropertiesFromResource( - alloc, - url, - resourceData, - properties, - desiredProperties, - errorCode, + return _CFReadStreamScheduleWithRunLoop( + stream, + runLoop, + runLoopMode, ); } - late final _CFURLCreateDataAndPropertiesFromResourcePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFAllocatorRef, - CFURLRef, - ffi.Pointer, - ffi.Pointer, - CFArrayRef, - ffi.Pointer)>>( - 'CFURLCreateDataAndPropertiesFromResource'); - late final _CFURLCreateDataAndPropertiesFromResource = - _CFURLCreateDataAndPropertiesFromResourcePtr.asFunction< - int Function(CFAllocatorRef, CFURLRef, ffi.Pointer, - ffi.Pointer, CFArrayRef, ffi.Pointer)>(); + late final _CFReadStreamScheduleWithRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFReadStreamScheduleWithRunLoop'); + late final _CFReadStreamScheduleWithRunLoop = + _CFReadStreamScheduleWithRunLoopPtr.asFunction< + void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - int CFURLWriteDataAndPropertiesToResource( - CFURLRef url, - CFDataRef dataToWrite, - CFDictionaryRef propertiesToWrite, - ffi.Pointer errorCode, + void CFWriteStreamScheduleWithRunLoop( + CFWriteStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, ) { - return _CFURLWriteDataAndPropertiesToResource( - url, - dataToWrite, - propertiesToWrite, - errorCode, + return _CFWriteStreamScheduleWithRunLoop( + stream, + runLoop, + runLoopMode, ); } - late final _CFURLWriteDataAndPropertiesToResourcePtr = _lookup< + late final _CFWriteStreamScheduleWithRunLoopPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFURLRef, CFDataRef, CFDictionaryRef, - ffi.Pointer)>>('CFURLWriteDataAndPropertiesToResource'); - late final _CFURLWriteDataAndPropertiesToResource = - _CFURLWriteDataAndPropertiesToResourcePtr.asFunction< - int Function( - CFURLRef, CFDataRef, CFDictionaryRef, ffi.Pointer)>(); + ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFWriteStreamScheduleWithRunLoop'); + late final _CFWriteStreamScheduleWithRunLoop = + _CFWriteStreamScheduleWithRunLoopPtr.asFunction< + void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - int CFURLDestroyResource( - CFURLRef url, - ffi.Pointer errorCode, + void CFReadStreamUnscheduleFromRunLoop( + CFReadStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, ) { - return _CFURLDestroyResource( - url, - errorCode, + return _CFReadStreamUnscheduleFromRunLoop( + stream, + runLoop, + runLoopMode, ); } - late final _CFURLDestroyResourcePtr = _lookup< - ffi.NativeFunction)>>( - 'CFURLDestroyResource'); - late final _CFURLDestroyResource = _CFURLDestroyResourcePtr.asFunction< - int Function(CFURLRef, ffi.Pointer)>(); + late final _CFReadStreamUnscheduleFromRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFReadStreamUnscheduleFromRunLoop'); + late final _CFReadStreamUnscheduleFromRunLoop = + _CFReadStreamUnscheduleFromRunLoopPtr.asFunction< + void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - CFTypeRef CFURLCreatePropertyFromResource( - CFAllocatorRef alloc, - CFURLRef url, - CFStringRef property, - ffi.Pointer errorCode, + void CFWriteStreamUnscheduleFromRunLoop( + CFWriteStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, ) { - return _CFURLCreatePropertyFromResource( - alloc, - url, - property, - errorCode, + return _CFWriteStreamUnscheduleFromRunLoop( + stream, + runLoop, + runLoopMode, ); } - late final _CFURLCreatePropertyFromResourcePtr = _lookup< + late final _CFWriteStreamUnscheduleFromRunLoopPtr = _lookup< ffi.NativeFunction< - CFTypeRef Function(CFAllocatorRef, CFURLRef, CFStringRef, - ffi.Pointer)>>('CFURLCreatePropertyFromResource'); - late final _CFURLCreatePropertyFromResource = - _CFURLCreatePropertyFromResourcePtr.asFunction< - CFTypeRef Function( - CFAllocatorRef, CFURLRef, CFStringRef, ffi.Pointer)>(); - - late final ffi.Pointer _kCFURLFileExists = - _lookup('kCFURLFileExists'); - - CFStringRef get kCFURLFileExists => _kCFURLFileExists.value; - - set kCFURLFileExists(CFStringRef value) => _kCFURLFileExists.value = value; - - late final ffi.Pointer _kCFURLFileDirectoryContents = - _lookup('kCFURLFileDirectoryContents'); - - CFStringRef get kCFURLFileDirectoryContents => - _kCFURLFileDirectoryContents.value; - - set kCFURLFileDirectoryContents(CFStringRef value) => - _kCFURLFileDirectoryContents.value = value; - - late final ffi.Pointer _kCFURLFileLength = - _lookup('kCFURLFileLength'); - - CFStringRef get kCFURLFileLength => _kCFURLFileLength.value; - - set kCFURLFileLength(CFStringRef value) => _kCFURLFileLength.value = value; - - late final ffi.Pointer _kCFURLFileLastModificationTime = - _lookup('kCFURLFileLastModificationTime'); - - CFStringRef get kCFURLFileLastModificationTime => - _kCFURLFileLastModificationTime.value; - - set kCFURLFileLastModificationTime(CFStringRef value) => - _kCFURLFileLastModificationTime.value = value; - - late final ffi.Pointer _kCFURLFilePOSIXMode = - _lookup('kCFURLFilePOSIXMode'); - - CFStringRef get kCFURLFilePOSIXMode => _kCFURLFilePOSIXMode.value; - - set kCFURLFilePOSIXMode(CFStringRef value) => - _kCFURLFilePOSIXMode.value = value; - - late final ffi.Pointer _kCFURLFileOwnerID = - _lookup('kCFURLFileOwnerID'); + ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFWriteStreamUnscheduleFromRunLoop'); + late final _CFWriteStreamUnscheduleFromRunLoop = + _CFWriteStreamUnscheduleFromRunLoopPtr.asFunction< + void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - CFStringRef get kCFURLFileOwnerID => _kCFURLFileOwnerID.value; + void CFReadStreamSetDispatchQueue( + CFReadStreamRef stream, + dispatch_queue_t q, + ) { + return _CFReadStreamSetDispatchQueue( + stream, + q, + ); + } - set kCFURLFileOwnerID(CFStringRef value) => _kCFURLFileOwnerID.value = value; + late final _CFReadStreamSetDispatchQueuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, + dispatch_queue_t)>>('CFReadStreamSetDispatchQueue'); + late final _CFReadStreamSetDispatchQueue = _CFReadStreamSetDispatchQueuePtr + .asFunction(); - late final ffi.Pointer _kCFURLHTTPStatusCode = - _lookup('kCFURLHTTPStatusCode'); + void CFWriteStreamSetDispatchQueue( + CFWriteStreamRef stream, + dispatch_queue_t q, + ) { + return _CFWriteStreamSetDispatchQueue( + stream, + q, + ); + } - CFStringRef get kCFURLHTTPStatusCode => _kCFURLHTTPStatusCode.value; + late final _CFWriteStreamSetDispatchQueuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFWriteStreamRef, + dispatch_queue_t)>>('CFWriteStreamSetDispatchQueue'); + late final _CFWriteStreamSetDispatchQueue = _CFWriteStreamSetDispatchQueuePtr + .asFunction(); - set kCFURLHTTPStatusCode(CFStringRef value) => - _kCFURLHTTPStatusCode.value = value; + dispatch_queue_t CFReadStreamCopyDispatchQueue( + CFReadStreamRef stream, + ) { + return _CFReadStreamCopyDispatchQueue( + stream, + ); + } - late final ffi.Pointer _kCFURLHTTPStatusLine = - _lookup('kCFURLHTTPStatusLine'); + late final _CFReadStreamCopyDispatchQueuePtr = + _lookup>( + 'CFReadStreamCopyDispatchQueue'); + late final _CFReadStreamCopyDispatchQueue = _CFReadStreamCopyDispatchQueuePtr + .asFunction(); - CFStringRef get kCFURLHTTPStatusLine => _kCFURLHTTPStatusLine.value; + dispatch_queue_t CFWriteStreamCopyDispatchQueue( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamCopyDispatchQueue( + stream, + ); + } - set kCFURLHTTPStatusLine(CFStringRef value) => - _kCFURLHTTPStatusLine.value = value; + late final _CFWriteStreamCopyDispatchQueuePtr = + _lookup>( + 'CFWriteStreamCopyDispatchQueue'); + late final _CFWriteStreamCopyDispatchQueue = + _CFWriteStreamCopyDispatchQueuePtr.asFunction< + dispatch_queue_t Function(CFWriteStreamRef)>(); - int CFUUIDGetTypeID() { - return _CFUUIDGetTypeID(); + CFStreamError CFReadStreamGetError( + CFReadStreamRef stream, + ) { + return _CFReadStreamGetError( + stream, + ); } - late final _CFUUIDGetTypeIDPtr = - _lookup>('CFUUIDGetTypeID'); - late final _CFUUIDGetTypeID = - _CFUUIDGetTypeIDPtr.asFunction(); + late final _CFReadStreamGetErrorPtr = + _lookup>( + 'CFReadStreamGetError'); + late final _CFReadStreamGetError = _CFReadStreamGetErrorPtr.asFunction< + CFStreamError Function(CFReadStreamRef)>(); - CFUUIDRef CFUUIDCreate( - CFAllocatorRef alloc, + CFStreamError CFWriteStreamGetError( + CFWriteStreamRef stream, ) { - return _CFUUIDCreate( - alloc, + return _CFWriteStreamGetError( + stream, ); } - late final _CFUUIDCreatePtr = - _lookup>( - 'CFUUIDCreate'); - late final _CFUUIDCreate = - _CFUUIDCreatePtr.asFunction(); + late final _CFWriteStreamGetErrorPtr = + _lookup>( + 'CFWriteStreamGetError'); + late final _CFWriteStreamGetError = _CFWriteStreamGetErrorPtr.asFunction< + CFStreamError Function(CFWriteStreamRef)>(); - CFUUIDRef CFUUIDCreateWithBytes( - CFAllocatorRef alloc, - int byte0, - int byte1, - int byte2, - int byte3, - int byte4, - int byte5, - int byte6, - int byte7, - int byte8, - int byte9, - int byte10, - int byte11, - int byte12, - int byte13, - int byte14, - int byte15, + CFPropertyListRef CFPropertyListCreateFromXMLData( + CFAllocatorRef allocator, + CFDataRef xmlData, + int mutabilityOption, + ffi.Pointer errorString, ) { - return _CFUUIDCreateWithBytes( - alloc, - byte0, - byte1, - byte2, - byte3, - byte4, - byte5, - byte6, - byte7, - byte8, - byte9, - byte10, - byte11, - byte12, - byte13, - byte14, - byte15, + return _CFPropertyListCreateFromXMLData( + allocator, + xmlData, + mutabilityOption, + errorString, ); } - late final _CFUUIDCreateWithBytesPtr = _lookup< + late final _CFPropertyListCreateFromXMLDataPtr = _lookup< ffi.NativeFunction< - CFUUIDRef Function( - CFAllocatorRef, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8)>>('CFUUIDCreateWithBytes'); - late final _CFUUIDCreateWithBytes = _CFUUIDCreateWithBytesPtr.asFunction< - CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int)>(); + CFPropertyListRef Function(CFAllocatorRef, CFDataRef, CFOptionFlags, + ffi.Pointer)>>('CFPropertyListCreateFromXMLData'); + late final _CFPropertyListCreateFromXMLData = + _CFPropertyListCreateFromXMLDataPtr.asFunction< + CFPropertyListRef Function( + CFAllocatorRef, CFDataRef, int, ffi.Pointer)>(); - CFUUIDRef CFUUIDCreateFromString( - CFAllocatorRef alloc, - CFStringRef uuidStr, + CFDataRef CFPropertyListCreateXMLData( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, ) { - return _CFUUIDCreateFromString( - alloc, - uuidStr, + return _CFPropertyListCreateXMLData( + allocator, + propertyList, ); } - late final _CFUUIDCreateFromStringPtr = _lookup< - ffi.NativeFunction>( - 'CFUUIDCreateFromString'); - late final _CFUUIDCreateFromString = _CFUUIDCreateFromStringPtr.asFunction< - CFUUIDRef Function(CFAllocatorRef, CFStringRef)>(); + late final _CFPropertyListCreateXMLDataPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, + CFPropertyListRef)>>('CFPropertyListCreateXMLData'); + late final _CFPropertyListCreateXMLData = _CFPropertyListCreateXMLDataPtr + .asFunction(); - CFStringRef CFUUIDCreateString( - CFAllocatorRef alloc, - CFUUIDRef uuid, + CFPropertyListRef CFPropertyListCreateDeepCopy( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, + int mutabilityOption, ) { - return _CFUUIDCreateString( - alloc, - uuid, + return _CFPropertyListCreateDeepCopy( + allocator, + propertyList, + mutabilityOption, ); } - late final _CFUUIDCreateStringPtr = _lookup< - ffi.NativeFunction>( - 'CFUUIDCreateString'); - late final _CFUUIDCreateString = _CFUUIDCreateStringPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFUUIDRef)>(); + late final _CFPropertyListCreateDeepCopyPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, + CFOptionFlags)>>('CFPropertyListCreateDeepCopy'); + late final _CFPropertyListCreateDeepCopy = + _CFPropertyListCreateDeepCopyPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, int)>(); - CFUUIDRef CFUUIDGetConstantUUIDWithBytes( - CFAllocatorRef alloc, - int byte0, - int byte1, - int byte2, - int byte3, - int byte4, - int byte5, - int byte6, - int byte7, - int byte8, - int byte9, - int byte10, - int byte11, - int byte12, - int byte13, - int byte14, - int byte15, + int CFPropertyListIsValid( + CFPropertyListRef plist, + int format, ) { - return _CFUUIDGetConstantUUIDWithBytes( - alloc, - byte0, - byte1, - byte2, - byte3, - byte4, - byte5, - byte6, - byte7, - byte8, - byte9, - byte10, - byte11, - byte12, - byte13, - byte14, - byte15, + return _CFPropertyListIsValid( + plist, + format, ); } - late final _CFUUIDGetConstantUUIDWithBytesPtr = _lookup< - ffi.NativeFunction< - CFUUIDRef Function( - CFAllocatorRef, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8)>>('CFUUIDGetConstantUUIDWithBytes'); - late final _CFUUIDGetConstantUUIDWithBytes = - _CFUUIDGetConstantUUIDWithBytesPtr.asFunction< - CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int)>(); + late final _CFPropertyListIsValidPtr = _lookup< + ffi.NativeFunction>( + 'CFPropertyListIsValid'); + late final _CFPropertyListIsValid = _CFPropertyListIsValidPtr.asFunction< + int Function(CFPropertyListRef, int)>(); - CFUUIDBytes CFUUIDGetUUIDBytes( - CFUUIDRef uuid, + int CFPropertyListWriteToStream( + CFPropertyListRef propertyList, + CFWriteStreamRef stream, + int format, + ffi.Pointer errorString, ) { - return _CFUUIDGetUUIDBytes( - uuid, + return _CFPropertyListWriteToStream( + propertyList, + stream, + format, + errorString, ); } - late final _CFUUIDGetUUIDBytesPtr = - _lookup>( - 'CFUUIDGetUUIDBytes'); - late final _CFUUIDGetUUIDBytes = - _CFUUIDGetUUIDBytesPtr.asFunction(); + late final _CFPropertyListWriteToStreamPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFPropertyListRef, CFWriteStreamRef, ffi.Int32, + ffi.Pointer)>>('CFPropertyListWriteToStream'); + late final _CFPropertyListWriteToStream = + _CFPropertyListWriteToStreamPtr.asFunction< + int Function(CFPropertyListRef, CFWriteStreamRef, int, + ffi.Pointer)>(); - CFUUIDRef CFUUIDCreateFromUUIDBytes( - CFAllocatorRef alloc, - CFUUIDBytes bytes, + CFPropertyListRef CFPropertyListCreateFromStream( + CFAllocatorRef allocator, + CFReadStreamRef stream, + int streamLength, + int mutabilityOption, + ffi.Pointer format, + ffi.Pointer errorString, ) { - return _CFUUIDCreateFromUUIDBytes( - alloc, - bytes, + return _CFPropertyListCreateFromStream( + allocator, + stream, + streamLength, + mutabilityOption, + format, + errorString, ); } - late final _CFUUIDCreateFromUUIDBytesPtr = _lookup< - ffi.NativeFunction>( - 'CFUUIDCreateFromUUIDBytes'); - late final _CFUUIDCreateFromUUIDBytes = _CFUUIDCreateFromUUIDBytesPtr - .asFunction(); + late final _CFPropertyListCreateFromStreamPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFAllocatorRef, + CFReadStreamRef, + CFIndex, + CFOptionFlags, + ffi.Pointer, + ffi.Pointer)>>('CFPropertyListCreateFromStream'); + late final _CFPropertyListCreateFromStream = + _CFPropertyListCreateFromStreamPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, + ffi.Pointer, ffi.Pointer)>(); - CFURLRef CFCopyHomeDirectoryURL() { - return _CFCopyHomeDirectoryURL(); + CFPropertyListRef CFPropertyListCreateWithData( + CFAllocatorRef allocator, + CFDataRef data, + int options, + ffi.Pointer format, + ffi.Pointer error, + ) { + return _CFPropertyListCreateWithData( + allocator, + data, + options, + format, + error, + ); } - late final _CFCopyHomeDirectoryURLPtr = - _lookup>( - 'CFCopyHomeDirectoryURL'); - late final _CFCopyHomeDirectoryURL = - _CFCopyHomeDirectoryURLPtr.asFunction(); - - late final ffi.Pointer _kCFBundleInfoDictionaryVersionKey = - _lookup('kCFBundleInfoDictionaryVersionKey'); - - CFStringRef get kCFBundleInfoDictionaryVersionKey => - _kCFBundleInfoDictionaryVersionKey.value; - - set kCFBundleInfoDictionaryVersionKey(CFStringRef value) => - _kCFBundleInfoDictionaryVersionKey.value = value; - - late final ffi.Pointer _kCFBundleExecutableKey = - _lookup('kCFBundleExecutableKey'); - - CFStringRef get kCFBundleExecutableKey => _kCFBundleExecutableKey.value; - - set kCFBundleExecutableKey(CFStringRef value) => - _kCFBundleExecutableKey.value = value; - - late final ffi.Pointer _kCFBundleIdentifierKey = - _lookup('kCFBundleIdentifierKey'); - - CFStringRef get kCFBundleIdentifierKey => _kCFBundleIdentifierKey.value; - - set kCFBundleIdentifierKey(CFStringRef value) => - _kCFBundleIdentifierKey.value = value; - - late final ffi.Pointer _kCFBundleVersionKey = - _lookup('kCFBundleVersionKey'); - - CFStringRef get kCFBundleVersionKey => _kCFBundleVersionKey.value; - - set kCFBundleVersionKey(CFStringRef value) => - _kCFBundleVersionKey.value = value; - - late final ffi.Pointer _kCFBundleDevelopmentRegionKey = - _lookup('kCFBundleDevelopmentRegionKey'); - - CFStringRef get kCFBundleDevelopmentRegionKey => - _kCFBundleDevelopmentRegionKey.value; - - set kCFBundleDevelopmentRegionKey(CFStringRef value) => - _kCFBundleDevelopmentRegionKey.value = value; - - late final ffi.Pointer _kCFBundleNameKey = - _lookup('kCFBundleNameKey'); - - CFStringRef get kCFBundleNameKey => _kCFBundleNameKey.value; - - set kCFBundleNameKey(CFStringRef value) => _kCFBundleNameKey.value = value; - - late final ffi.Pointer _kCFBundleLocalizationsKey = - _lookup('kCFBundleLocalizationsKey'); + late final _CFPropertyListCreateWithDataPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFAllocatorRef, + CFDataRef, + CFOptionFlags, + ffi.Pointer, + ffi.Pointer)>>('CFPropertyListCreateWithData'); + late final _CFPropertyListCreateWithData = + _CFPropertyListCreateWithDataPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFDataRef, int, + ffi.Pointer, ffi.Pointer)>(); - CFStringRef get kCFBundleLocalizationsKey => _kCFBundleLocalizationsKey.value; + CFPropertyListRef CFPropertyListCreateWithStream( + CFAllocatorRef allocator, + CFReadStreamRef stream, + int streamLength, + int options, + ffi.Pointer format, + ffi.Pointer error, + ) { + return _CFPropertyListCreateWithStream( + allocator, + stream, + streamLength, + options, + format, + error, + ); + } - set kCFBundleLocalizationsKey(CFStringRef value) => - _kCFBundleLocalizationsKey.value = value; + late final _CFPropertyListCreateWithStreamPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFAllocatorRef, + CFReadStreamRef, + CFIndex, + CFOptionFlags, + ffi.Pointer, + ffi.Pointer)>>('CFPropertyListCreateWithStream'); + late final _CFPropertyListCreateWithStream = + _CFPropertyListCreateWithStreamPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, + ffi.Pointer, ffi.Pointer)>(); - CFBundleRef CFBundleGetMainBundle() { - return _CFBundleGetMainBundle(); + int CFPropertyListWrite( + CFPropertyListRef propertyList, + CFWriteStreamRef stream, + int format, + int options, + ffi.Pointer error, + ) { + return _CFPropertyListWrite( + propertyList, + stream, + format, + options, + error, + ); } - late final _CFBundleGetMainBundlePtr = - _lookup>( - 'CFBundleGetMainBundle'); - late final _CFBundleGetMainBundle = - _CFBundleGetMainBundlePtr.asFunction(); + late final _CFPropertyListWritePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFPropertyListRef, CFWriteStreamRef, ffi.Int32, + CFOptionFlags, ffi.Pointer)>>('CFPropertyListWrite'); + late final _CFPropertyListWrite = _CFPropertyListWritePtr.asFunction< + int Function(CFPropertyListRef, CFWriteStreamRef, int, int, + ffi.Pointer)>(); - CFBundleRef CFBundleGetBundleWithIdentifier( - CFStringRef bundleID, + CFDataRef CFPropertyListCreateData( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, + int format, + int options, + ffi.Pointer error, ) { - return _CFBundleGetBundleWithIdentifier( - bundleID, + return _CFPropertyListCreateData( + allocator, + propertyList, + format, + options, + error, ); } - late final _CFBundleGetBundleWithIdentifierPtr = - _lookup>( - 'CFBundleGetBundleWithIdentifier'); - late final _CFBundleGetBundleWithIdentifier = - _CFBundleGetBundleWithIdentifierPtr.asFunction< - CFBundleRef Function(CFStringRef)>(); + late final _CFPropertyListCreateDataPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function( + CFAllocatorRef, + CFPropertyListRef, + ffi.Int32, + CFOptionFlags, + ffi.Pointer)>>('CFPropertyListCreateData'); + late final _CFPropertyListCreateData = + _CFPropertyListCreateDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFPropertyListRef, int, int, + ffi.Pointer)>(); - CFArrayRef CFBundleGetAllBundles() { - return _CFBundleGetAllBundles(); - } + late final ffi.Pointer _kCFTypeSetCallBacks = + _lookup('kCFTypeSetCallBacks'); - late final _CFBundleGetAllBundlesPtr = - _lookup>( - 'CFBundleGetAllBundles'); - late final _CFBundleGetAllBundles = - _CFBundleGetAllBundlesPtr.asFunction(); + CFSetCallBacks get kCFTypeSetCallBacks => _kCFTypeSetCallBacks.ref; - int CFBundleGetTypeID() { - return _CFBundleGetTypeID(); + late final ffi.Pointer _kCFCopyStringSetCallBacks = + _lookup('kCFCopyStringSetCallBacks'); + + CFSetCallBacks get kCFCopyStringSetCallBacks => + _kCFCopyStringSetCallBacks.ref; + + int CFSetGetTypeID() { + return _CFSetGetTypeID(); } - late final _CFBundleGetTypeIDPtr = - _lookup>('CFBundleGetTypeID'); - late final _CFBundleGetTypeID = - _CFBundleGetTypeIDPtr.asFunction(); + late final _CFSetGetTypeIDPtr = + _lookup>('CFSetGetTypeID'); + late final _CFSetGetTypeID = _CFSetGetTypeIDPtr.asFunction(); - CFBundleRef CFBundleCreate( + CFSetRef CFSetCreate( CFAllocatorRef allocator, - CFURLRef bundleURL, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, ) { - return _CFBundleCreate( + return _CFSetCreate( allocator, - bundleURL, + values, + numValues, + callBacks, ); } - late final _CFBundleCreatePtr = _lookup< - ffi.NativeFunction>( - 'CFBundleCreate'); - late final _CFBundleCreate = _CFBundleCreatePtr.asFunction< - CFBundleRef Function(CFAllocatorRef, CFURLRef)>(); + late final _CFSetCreatePtr = _lookup< + ffi.NativeFunction< + CFSetRef Function(CFAllocatorRef, ffi.Pointer>, + CFIndex, ffi.Pointer)>>('CFSetCreate'); + late final _CFSetCreate = _CFSetCreatePtr.asFunction< + CFSetRef Function(CFAllocatorRef, ffi.Pointer>, int, + ffi.Pointer)>(); - CFArrayRef CFBundleCreateBundlesFromDirectory( + CFSetRef CFSetCreateCopy( CFAllocatorRef allocator, - CFURLRef directoryURL, - CFStringRef bundleType, + CFSetRef theSet, ) { - return _CFBundleCreateBundlesFromDirectory( + return _CFSetCreateCopy( allocator, - directoryURL, - bundleType, + theSet, ); } - late final _CFBundleCreateBundlesFromDirectoryPtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFAllocatorRef, CFURLRef, - CFStringRef)>>('CFBundleCreateBundlesFromDirectory'); - late final _CFBundleCreateBundlesFromDirectory = - _CFBundleCreateBundlesFromDirectoryPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); - - CFURLRef CFBundleCopyBundleURL( - CFBundleRef bundle, + late final _CFSetCreateCopyPtr = + _lookup>( + 'CFSetCreateCopy'); + late final _CFSetCreateCopy = _CFSetCreateCopyPtr.asFunction< + CFSetRef Function(CFAllocatorRef, CFSetRef)>(); + + CFMutableSetRef CFSetCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, ) { - return _CFBundleCopyBundleURL( - bundle, + return _CFSetCreateMutable( + allocator, + capacity, + callBacks, ); } - late final _CFBundleCopyBundleURLPtr = - _lookup>( - 'CFBundleCopyBundleURL'); - late final _CFBundleCopyBundleURL = - _CFBundleCopyBundleURLPtr.asFunction(); + late final _CFSetCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableSetRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFSetCreateMutable'); + late final _CFSetCreateMutable = _CFSetCreateMutablePtr.asFunction< + CFMutableSetRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - CFTypeRef CFBundleGetValueForInfoDictionaryKey( - CFBundleRef bundle, - CFStringRef key, + CFMutableSetRef CFSetCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFSetRef theSet, ) { - return _CFBundleGetValueForInfoDictionaryKey( - bundle, - key, + return _CFSetCreateMutableCopy( + allocator, + capacity, + theSet, ); } - late final _CFBundleGetValueForInfoDictionaryKeyPtr = - _lookup>( - 'CFBundleGetValueForInfoDictionaryKey'); - late final _CFBundleGetValueForInfoDictionaryKey = - _CFBundleGetValueForInfoDictionaryKeyPtr.asFunction< - CFTypeRef Function(CFBundleRef, CFStringRef)>(); + late final _CFSetCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableSetRef Function( + CFAllocatorRef, CFIndex, CFSetRef)>>('CFSetCreateMutableCopy'); + late final _CFSetCreateMutableCopy = _CFSetCreateMutableCopyPtr.asFunction< + CFMutableSetRef Function(CFAllocatorRef, int, CFSetRef)>(); - CFDictionaryRef CFBundleGetInfoDictionary( - CFBundleRef bundle, + int CFSetGetCount( + CFSetRef theSet, ) { - return _CFBundleGetInfoDictionary( - bundle, + return _CFSetGetCount( + theSet, ); } - late final _CFBundleGetInfoDictionaryPtr = - _lookup>( - 'CFBundleGetInfoDictionary'); - late final _CFBundleGetInfoDictionary = _CFBundleGetInfoDictionaryPtr - .asFunction(); + late final _CFSetGetCountPtr = + _lookup>('CFSetGetCount'); + late final _CFSetGetCount = + _CFSetGetCountPtr.asFunction(); - CFDictionaryRef CFBundleGetLocalInfoDictionary( - CFBundleRef bundle, + int CFSetGetCountOfValue( + CFSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleGetLocalInfoDictionary( - bundle, + return _CFSetGetCountOfValue( + theSet, + value, ); } - late final _CFBundleGetLocalInfoDictionaryPtr = - _lookup>( - 'CFBundleGetLocalInfoDictionary'); - late final _CFBundleGetLocalInfoDictionary = - _CFBundleGetLocalInfoDictionaryPtr.asFunction< - CFDictionaryRef Function(CFBundleRef)>(); + late final _CFSetGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFSetRef, ffi.Pointer)>>('CFSetGetCountOfValue'); + late final _CFSetGetCountOfValue = _CFSetGetCountOfValuePtr.asFunction< + int Function(CFSetRef, ffi.Pointer)>(); - void CFBundleGetPackageInfo( - CFBundleRef bundle, - ffi.Pointer packageType, - ffi.Pointer packageCreator, + int CFSetContainsValue( + CFSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleGetPackageInfo( - bundle, - packageType, - packageCreator, + return _CFSetContainsValue( + theSet, + value, ); } - late final _CFBundleGetPackageInfoPtr = _lookup< + late final _CFSetContainsValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFBundleRef, ffi.Pointer, - ffi.Pointer)>>('CFBundleGetPackageInfo'); - late final _CFBundleGetPackageInfo = _CFBundleGetPackageInfoPtr.asFunction< - void Function(CFBundleRef, ffi.Pointer, ffi.Pointer)>(); + Boolean Function( + CFSetRef, ffi.Pointer)>>('CFSetContainsValue'); + late final _CFSetContainsValue = _CFSetContainsValuePtr.asFunction< + int Function(CFSetRef, ffi.Pointer)>(); - CFStringRef CFBundleGetIdentifier( - CFBundleRef bundle, + ffi.Pointer CFSetGetValue( + CFSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleGetIdentifier( - bundle, + return _CFSetGetValue( + theSet, + value, ); } - late final _CFBundleGetIdentifierPtr = - _lookup>( - 'CFBundleGetIdentifier'); - late final _CFBundleGetIdentifier = - _CFBundleGetIdentifierPtr.asFunction(); + late final _CFSetGetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFSetRef, ffi.Pointer)>>('CFSetGetValue'); + late final _CFSetGetValue = _CFSetGetValuePtr.asFunction< + ffi.Pointer Function(CFSetRef, ffi.Pointer)>(); - int CFBundleGetVersionNumber( - CFBundleRef bundle, + int CFSetGetValueIfPresent( + CFSetRef theSet, + ffi.Pointer candidate, + ffi.Pointer> value, ) { - return _CFBundleGetVersionNumber( - bundle, + return _CFSetGetValueIfPresent( + theSet, + candidate, + value, ); } - late final _CFBundleGetVersionNumberPtr = - _lookup>( - 'CFBundleGetVersionNumber'); - late final _CFBundleGetVersionNumber = - _CFBundleGetVersionNumberPtr.asFunction(); + late final _CFSetGetValueIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFSetRef, ffi.Pointer, + ffi.Pointer>)>>('CFSetGetValueIfPresent'); + late final _CFSetGetValueIfPresent = _CFSetGetValueIfPresentPtr.asFunction< + int Function(CFSetRef, ffi.Pointer, + ffi.Pointer>)>(); - CFStringRef CFBundleGetDevelopmentRegion( - CFBundleRef bundle, + void CFSetGetValues( + CFSetRef theSet, + ffi.Pointer> values, ) { - return _CFBundleGetDevelopmentRegion( - bundle, + return _CFSetGetValues( + theSet, + values, ); } - late final _CFBundleGetDevelopmentRegionPtr = - _lookup>( - 'CFBundleGetDevelopmentRegion'); - late final _CFBundleGetDevelopmentRegion = _CFBundleGetDevelopmentRegionPtr - .asFunction(); + late final _CFSetGetValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFSetRef, ffi.Pointer>)>>('CFSetGetValues'); + late final _CFSetGetValues = _CFSetGetValuesPtr.asFunction< + void Function(CFSetRef, ffi.Pointer>)>(); - CFURLRef CFBundleCopySupportFilesDirectoryURL( - CFBundleRef bundle, + void CFSetApplyFunction( + CFSetRef theSet, + CFSetApplierFunction applier, + ffi.Pointer context, ) { - return _CFBundleCopySupportFilesDirectoryURL( - bundle, + return _CFSetApplyFunction( + theSet, + applier, + context, ); } - late final _CFBundleCopySupportFilesDirectoryURLPtr = - _lookup>( - 'CFBundleCopySupportFilesDirectoryURL'); - late final _CFBundleCopySupportFilesDirectoryURL = - _CFBundleCopySupportFilesDirectoryURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _CFSetApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFSetRef, CFSetApplierFunction, + ffi.Pointer)>>('CFSetApplyFunction'); + late final _CFSetApplyFunction = _CFSetApplyFunctionPtr.asFunction< + void Function(CFSetRef, CFSetApplierFunction, ffi.Pointer)>(); - CFURLRef CFBundleCopyResourcesDirectoryURL( - CFBundleRef bundle, + void CFSetAddValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleCopyResourcesDirectoryURL( - bundle, + return _CFSetAddValue( + theSet, + value, ); } - late final _CFBundleCopyResourcesDirectoryURLPtr = - _lookup>( - 'CFBundleCopyResourcesDirectoryURL'); - late final _CFBundleCopyResourcesDirectoryURL = - _CFBundleCopyResourcesDirectoryURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _CFSetAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetAddValue'); + late final _CFSetAddValue = _CFSetAddValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - CFURLRef CFBundleCopyPrivateFrameworksURL( - CFBundleRef bundle, + void CFSetReplaceValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleCopyPrivateFrameworksURL( - bundle, + return _CFSetReplaceValue( + theSet, + value, ); } - late final _CFBundleCopyPrivateFrameworksURLPtr = - _lookup>( - 'CFBundleCopyPrivateFrameworksURL'); - late final _CFBundleCopyPrivateFrameworksURL = - _CFBundleCopyPrivateFrameworksURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _CFSetReplaceValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetReplaceValue'); + late final _CFSetReplaceValue = _CFSetReplaceValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - CFURLRef CFBundleCopySharedFrameworksURL( - CFBundleRef bundle, + void CFSetSetValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleCopySharedFrameworksURL( - bundle, + return _CFSetSetValue( + theSet, + value, ); } - late final _CFBundleCopySharedFrameworksURLPtr = - _lookup>( - 'CFBundleCopySharedFrameworksURL'); - late final _CFBundleCopySharedFrameworksURL = - _CFBundleCopySharedFrameworksURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _CFSetSetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetSetValue'); + late final _CFSetSetValue = _CFSetSetValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - CFURLRef CFBundleCopySharedSupportURL( - CFBundleRef bundle, + void CFSetRemoveValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleCopySharedSupportURL( - bundle, + return _CFSetRemoveValue( + theSet, + value, ); } - late final _CFBundleCopySharedSupportURLPtr = - _lookup>( - 'CFBundleCopySharedSupportURL'); - late final _CFBundleCopySharedSupportURL = _CFBundleCopySharedSupportURLPtr - .asFunction(); + late final _CFSetRemoveValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetRemoveValue'); + late final _CFSetRemoveValue = _CFSetRemoveValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - CFURLRef CFBundleCopyBuiltInPlugInsURL( - CFBundleRef bundle, + void CFSetRemoveAllValues( + CFMutableSetRef theSet, ) { - return _CFBundleCopyBuiltInPlugInsURL( - bundle, + return _CFSetRemoveAllValues( + theSet, ); } - late final _CFBundleCopyBuiltInPlugInsURLPtr = - _lookup>( - 'CFBundleCopyBuiltInPlugInsURL'); - late final _CFBundleCopyBuiltInPlugInsURL = _CFBundleCopyBuiltInPlugInsURLPtr - .asFunction(); + late final _CFSetRemoveAllValuesPtr = + _lookup>( + 'CFSetRemoveAllValues'); + late final _CFSetRemoveAllValues = + _CFSetRemoveAllValuesPtr.asFunction(); - CFDictionaryRef CFBundleCopyInfoDictionaryInDirectory( - CFURLRef bundleURL, - ) { - return _CFBundleCopyInfoDictionaryInDirectory( - bundleURL, - ); + int CFTreeGetTypeID() { + return _CFTreeGetTypeID(); } - late final _CFBundleCopyInfoDictionaryInDirectoryPtr = - _lookup>( - 'CFBundleCopyInfoDictionaryInDirectory'); - late final _CFBundleCopyInfoDictionaryInDirectory = - _CFBundleCopyInfoDictionaryInDirectoryPtr.asFunction< - CFDictionaryRef Function(CFURLRef)>(); + late final _CFTreeGetTypeIDPtr = + _lookup>('CFTreeGetTypeID'); + late final _CFTreeGetTypeID = + _CFTreeGetTypeIDPtr.asFunction(); - int CFBundleGetPackageInfoInDirectory( - CFURLRef url, - ffi.Pointer packageType, - ffi.Pointer packageCreator, + CFTreeRef CFTreeCreate( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return _CFBundleGetPackageInfoInDirectory( - url, - packageType, - packageCreator, + return _CFTreeCreate( + allocator, + context, ); } - late final _CFBundleGetPackageInfoInDirectoryPtr = _lookup< + late final _CFTreeCreatePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFURLRef, ffi.Pointer, - ffi.Pointer)>>('CFBundleGetPackageInfoInDirectory'); - late final _CFBundleGetPackageInfoInDirectory = - _CFBundleGetPackageInfoInDirectoryPtr.asFunction< - int Function(CFURLRef, ffi.Pointer, ffi.Pointer)>(); + CFTreeRef Function( + CFAllocatorRef, ffi.Pointer)>>('CFTreeCreate'); + late final _CFTreeCreate = _CFTreeCreatePtr.asFunction< + CFTreeRef Function(CFAllocatorRef, ffi.Pointer)>(); - CFURLRef CFBundleCopyResourceURL( - CFBundleRef bundle, - CFStringRef resourceName, - CFStringRef resourceType, - CFStringRef subDirName, + CFTreeRef CFTreeGetParent( + CFTreeRef tree, ) { - return _CFBundleCopyResourceURL( - bundle, - resourceName, - resourceType, - subDirName, + return _CFTreeGetParent( + tree, ); } - late final _CFBundleCopyResourceURLPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURL'); - late final _CFBundleCopyResourceURL = _CFBundleCopyResourceURLPtr.asFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + late final _CFTreeGetParentPtr = + _lookup>( + 'CFTreeGetParent'); + late final _CFTreeGetParent = + _CFTreeGetParentPtr.asFunction(); - CFArrayRef CFBundleCopyResourceURLsOfType( - CFBundleRef bundle, - CFStringRef resourceType, - CFStringRef subDirName, + CFTreeRef CFTreeGetNextSibling( + CFTreeRef tree, ) { - return _CFBundleCopyResourceURLsOfType( - bundle, - resourceType, - subDirName, + return _CFTreeGetNextSibling( + tree, ); } - late final _CFBundleCopyResourceURLsOfTypePtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFBundleRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLsOfType'); - late final _CFBundleCopyResourceURLsOfType = - _CFBundleCopyResourceURLsOfTypePtr.asFunction< - CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef)>(); + late final _CFTreeGetNextSiblingPtr = + _lookup>( + 'CFTreeGetNextSibling'); + late final _CFTreeGetNextSibling = + _CFTreeGetNextSiblingPtr.asFunction(); - CFStringRef CFBundleCopyLocalizedString( - CFBundleRef bundle, - CFStringRef key, - CFStringRef value, - CFStringRef tableName, + CFTreeRef CFTreeGetFirstChild( + CFTreeRef tree, ) { - return _CFBundleCopyLocalizedString( - bundle, - key, - value, - tableName, + return _CFTreeGetFirstChild( + tree, ); } - late final _CFBundleCopyLocalizedStringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFBundleRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyLocalizedString'); - late final _CFBundleCopyLocalizedString = - _CFBundleCopyLocalizedStringPtr.asFunction< - CFStringRef Function( - CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + late final _CFTreeGetFirstChildPtr = + _lookup>( + 'CFTreeGetFirstChild'); + late final _CFTreeGetFirstChild = + _CFTreeGetFirstChildPtr.asFunction(); - CFURLRef CFBundleCopyResourceURLInDirectory( - CFURLRef bundleURL, - CFStringRef resourceName, - CFStringRef resourceType, - CFStringRef subDirName, + void CFTreeGetContext( + CFTreeRef tree, + ffi.Pointer context, ) { - return _CFBundleCopyResourceURLInDirectory( - bundleURL, - resourceName, - resourceType, - subDirName, + return _CFTreeGetContext( + tree, + context, ); } - late final _CFBundleCopyResourceURLInDirectoryPtr = _lookup< + late final _CFTreeGetContextPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLInDirectory'); - late final _CFBundleCopyResourceURLInDirectory = - _CFBundleCopyResourceURLInDirectoryPtr.asFunction< - CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, CFStringRef)>(); + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeGetContext'); + late final _CFTreeGetContext = _CFTreeGetContextPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); - CFArrayRef CFBundleCopyResourceURLsOfTypeInDirectory( - CFURLRef bundleURL, - CFStringRef resourceType, - CFStringRef subDirName, + int CFTreeGetChildCount( + CFTreeRef tree, ) { - return _CFBundleCopyResourceURLsOfTypeInDirectory( - bundleURL, - resourceType, - subDirName, + return _CFTreeGetChildCount( + tree, ); } - late final _CFBundleCopyResourceURLsOfTypeInDirectoryPtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFURLRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLsOfTypeInDirectory'); - late final _CFBundleCopyResourceURLsOfTypeInDirectory = - _CFBundleCopyResourceURLsOfTypeInDirectoryPtr.asFunction< - CFArrayRef Function(CFURLRef, CFStringRef, CFStringRef)>(); + late final _CFTreeGetChildCountPtr = + _lookup>( + 'CFTreeGetChildCount'); + late final _CFTreeGetChildCount = + _CFTreeGetChildCountPtr.asFunction(); - CFArrayRef CFBundleCopyBundleLocalizations( - CFBundleRef bundle, + CFTreeRef CFTreeGetChildAtIndex( + CFTreeRef tree, + int idx, ) { - return _CFBundleCopyBundleLocalizations( - bundle, + return _CFTreeGetChildAtIndex( + tree, + idx, ); } - late final _CFBundleCopyBundleLocalizationsPtr = - _lookup>( - 'CFBundleCopyBundleLocalizations'); - late final _CFBundleCopyBundleLocalizations = - _CFBundleCopyBundleLocalizationsPtr.asFunction< - CFArrayRef Function(CFBundleRef)>(); + late final _CFTreeGetChildAtIndexPtr = + _lookup>( + 'CFTreeGetChildAtIndex'); + late final _CFTreeGetChildAtIndex = _CFTreeGetChildAtIndexPtr.asFunction< + CFTreeRef Function(CFTreeRef, int)>(); - CFArrayRef CFBundleCopyPreferredLocalizationsFromArray( - CFArrayRef locArray, + void CFTreeGetChildren( + CFTreeRef tree, + ffi.Pointer children, ) { - return _CFBundleCopyPreferredLocalizationsFromArray( - locArray, - ); - } + return _CFTreeGetChildren( + tree, + children, + ); + } - late final _CFBundleCopyPreferredLocalizationsFromArrayPtr = - _lookup>( - 'CFBundleCopyPreferredLocalizationsFromArray'); - late final _CFBundleCopyPreferredLocalizationsFromArray = - _CFBundleCopyPreferredLocalizationsFromArrayPtr.asFunction< - CFArrayRef Function(CFArrayRef)>(); + late final _CFTreeGetChildrenPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeGetChildren'); + late final _CFTreeGetChildren = _CFTreeGetChildrenPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); - CFArrayRef CFBundleCopyLocalizationsForPreferences( - CFArrayRef locArray, - CFArrayRef prefArray, + void CFTreeApplyFunctionToChildren( + CFTreeRef tree, + CFTreeApplierFunction applier, + ffi.Pointer context, ) { - return _CFBundleCopyLocalizationsForPreferences( - locArray, - prefArray, + return _CFTreeApplyFunctionToChildren( + tree, + applier, + context, ); } - late final _CFBundleCopyLocalizationsForPreferencesPtr = - _lookup>( - 'CFBundleCopyLocalizationsForPreferences'); - late final _CFBundleCopyLocalizationsForPreferences = - _CFBundleCopyLocalizationsForPreferencesPtr.asFunction< - CFArrayRef Function(CFArrayRef, CFArrayRef)>(); + late final _CFTreeApplyFunctionToChildrenPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFTreeRef, CFTreeApplierFunction, + ffi.Pointer)>>('CFTreeApplyFunctionToChildren'); + late final _CFTreeApplyFunctionToChildren = + _CFTreeApplyFunctionToChildrenPtr.asFunction< + void Function( + CFTreeRef, CFTreeApplierFunction, ffi.Pointer)>(); - CFURLRef CFBundleCopyResourceURLForLocalization( - CFBundleRef bundle, - CFStringRef resourceName, - CFStringRef resourceType, - CFStringRef subDirName, - CFStringRef localizationName, + CFTreeRef CFTreeFindRoot( + CFTreeRef tree, ) { - return _CFBundleCopyResourceURLForLocalization( - bundle, - resourceName, - resourceType, - subDirName, - localizationName, + return _CFTreeFindRoot( + tree, ); } - late final _CFBundleCopyResourceURLForLocalizationPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLForLocalization'); - late final _CFBundleCopyResourceURLForLocalization = - _CFBundleCopyResourceURLForLocalizationPtr.asFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, - CFStringRef)>(); + late final _CFTreeFindRootPtr = + _lookup>( + 'CFTreeFindRoot'); + late final _CFTreeFindRoot = + _CFTreeFindRootPtr.asFunction(); - CFArrayRef CFBundleCopyResourceURLsOfTypeForLocalization( - CFBundleRef bundle, - CFStringRef resourceType, - CFStringRef subDirName, - CFStringRef localizationName, + void CFTreeSetContext( + CFTreeRef tree, + ffi.Pointer context, ) { - return _CFBundleCopyResourceURLsOfTypeForLocalization( - bundle, - resourceType, - subDirName, - localizationName, + return _CFTreeSetContext( + tree, + context, ); } - late final _CFBundleCopyResourceURLsOfTypeForLocalizationPtr = _lookup< + late final _CFTreeSetContextPtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLsOfTypeForLocalization'); - late final _CFBundleCopyResourceURLsOfTypeForLocalization = - _CFBundleCopyResourceURLsOfTypeForLocalizationPtr.asFunction< - CFArrayRef Function( - CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeSetContext'); + late final _CFTreeSetContext = _CFTreeSetContextPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); - CFDictionaryRef CFBundleCopyInfoDictionaryForURL( - CFURLRef url, + void CFTreePrependChild( + CFTreeRef tree, + CFTreeRef newChild, ) { - return _CFBundleCopyInfoDictionaryForURL( - url, + return _CFTreePrependChild( + tree, + newChild, ); } - late final _CFBundleCopyInfoDictionaryForURLPtr = - _lookup>( - 'CFBundleCopyInfoDictionaryForURL'); - late final _CFBundleCopyInfoDictionaryForURL = - _CFBundleCopyInfoDictionaryForURLPtr.asFunction< - CFDictionaryRef Function(CFURLRef)>(); + late final _CFTreePrependChildPtr = + _lookup>( + 'CFTreePrependChild'); + late final _CFTreePrependChild = + _CFTreePrependChildPtr.asFunction(); - CFArrayRef CFBundleCopyLocalizationsForURL( - CFURLRef url, + void CFTreeAppendChild( + CFTreeRef tree, + CFTreeRef newChild, ) { - return _CFBundleCopyLocalizationsForURL( - url, + return _CFTreeAppendChild( + tree, + newChild, ); } - late final _CFBundleCopyLocalizationsForURLPtr = - _lookup>( - 'CFBundleCopyLocalizationsForURL'); - late final _CFBundleCopyLocalizationsForURL = - _CFBundleCopyLocalizationsForURLPtr.asFunction< - CFArrayRef Function(CFURLRef)>(); + late final _CFTreeAppendChildPtr = + _lookup>( + 'CFTreeAppendChild'); + late final _CFTreeAppendChild = + _CFTreeAppendChildPtr.asFunction(); - CFArrayRef CFBundleCopyExecutableArchitecturesForURL( - CFURLRef url, + void CFTreeInsertSibling( + CFTreeRef tree, + CFTreeRef newSibling, ) { - return _CFBundleCopyExecutableArchitecturesForURL( - url, + return _CFTreeInsertSibling( + tree, + newSibling, ); } - late final _CFBundleCopyExecutableArchitecturesForURLPtr = - _lookup>( - 'CFBundleCopyExecutableArchitecturesForURL'); - late final _CFBundleCopyExecutableArchitecturesForURL = - _CFBundleCopyExecutableArchitecturesForURLPtr.asFunction< - CFArrayRef Function(CFURLRef)>(); + late final _CFTreeInsertSiblingPtr = + _lookup>( + 'CFTreeInsertSibling'); + late final _CFTreeInsertSibling = + _CFTreeInsertSiblingPtr.asFunction(); - CFURLRef CFBundleCopyExecutableURL( - CFBundleRef bundle, + void CFTreeRemove( + CFTreeRef tree, ) { - return _CFBundleCopyExecutableURL( - bundle, + return _CFTreeRemove( + tree, ); } - late final _CFBundleCopyExecutableURLPtr = - _lookup>( - 'CFBundleCopyExecutableURL'); - late final _CFBundleCopyExecutableURL = _CFBundleCopyExecutableURLPtr - .asFunction(); + late final _CFTreeRemovePtr = + _lookup>('CFTreeRemove'); + late final _CFTreeRemove = + _CFTreeRemovePtr.asFunction(); - CFArrayRef CFBundleCopyExecutableArchitectures( - CFBundleRef bundle, + void CFTreeRemoveAllChildren( + CFTreeRef tree, ) { - return _CFBundleCopyExecutableArchitectures( - bundle, + return _CFTreeRemoveAllChildren( + tree, ); } - late final _CFBundleCopyExecutableArchitecturesPtr = - _lookup>( - 'CFBundleCopyExecutableArchitectures'); - late final _CFBundleCopyExecutableArchitectures = - _CFBundleCopyExecutableArchitecturesPtr.asFunction< - CFArrayRef Function(CFBundleRef)>(); + late final _CFTreeRemoveAllChildrenPtr = + _lookup>( + 'CFTreeRemoveAllChildren'); + late final _CFTreeRemoveAllChildren = + _CFTreeRemoveAllChildrenPtr.asFunction(); - int CFBundlePreflightExecutable( - CFBundleRef bundle, - ffi.Pointer error, + void CFTreeSortChildren( + CFTreeRef tree, + CFComparatorFunction comparator, + ffi.Pointer context, ) { - return _CFBundlePreflightExecutable( - bundle, - error, + return _CFTreeSortChildren( + tree, + comparator, + context, ); } - late final _CFBundlePreflightExecutablePtr = _lookup< + late final _CFTreeSortChildrenPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFBundleRef, - ffi.Pointer)>>('CFBundlePreflightExecutable'); - late final _CFBundlePreflightExecutable = _CFBundlePreflightExecutablePtr - .asFunction)>(); + ffi.Void Function(CFTreeRef, CFComparatorFunction, + ffi.Pointer)>>('CFTreeSortChildren'); + late final _CFTreeSortChildren = _CFTreeSortChildrenPtr.asFunction< + void Function(CFTreeRef, CFComparatorFunction, ffi.Pointer)>(); - int CFBundleLoadExecutableAndReturnError( - CFBundleRef bundle, - ffi.Pointer error, + int CFURLCreateDataAndPropertiesFromResource( + CFAllocatorRef alloc, + CFURLRef url, + ffi.Pointer resourceData, + ffi.Pointer properties, + CFArrayRef desiredProperties, + ffi.Pointer errorCode, ) { - return _CFBundleLoadExecutableAndReturnError( - bundle, - error, + return _CFURLCreateDataAndPropertiesFromResource( + alloc, + url, + resourceData, + properties, + desiredProperties, + errorCode, ); } - late final _CFBundleLoadExecutableAndReturnErrorPtr = _lookup< + late final _CFURLCreateDataAndPropertiesFromResourcePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFBundleRef, ffi.Pointer)>>( - 'CFBundleLoadExecutableAndReturnError'); - late final _CFBundleLoadExecutableAndReturnError = - _CFBundleLoadExecutableAndReturnErrorPtr.asFunction< - int Function(CFBundleRef, ffi.Pointer)>(); + Boolean Function( + CFAllocatorRef, + CFURLRef, + ffi.Pointer, + ffi.Pointer, + CFArrayRef, + ffi.Pointer)>>( + 'CFURLCreateDataAndPropertiesFromResource'); + late final _CFURLCreateDataAndPropertiesFromResource = + _CFURLCreateDataAndPropertiesFromResourcePtr.asFunction< + int Function(CFAllocatorRef, CFURLRef, ffi.Pointer, + ffi.Pointer, CFArrayRef, ffi.Pointer)>(); - int CFBundleLoadExecutable( - CFBundleRef bundle, + int CFURLWriteDataAndPropertiesToResource( + CFURLRef url, + CFDataRef dataToWrite, + CFDictionaryRef propertiesToWrite, + ffi.Pointer errorCode, ) { - return _CFBundleLoadExecutable( - bundle, + return _CFURLWriteDataAndPropertiesToResource( + url, + dataToWrite, + propertiesToWrite, + errorCode, ); } - late final _CFBundleLoadExecutablePtr = - _lookup>( - 'CFBundleLoadExecutable'); - late final _CFBundleLoadExecutable = - _CFBundleLoadExecutablePtr.asFunction(); + late final _CFURLWriteDataAndPropertiesToResourcePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFDataRef, CFDictionaryRef, + ffi.Pointer)>>('CFURLWriteDataAndPropertiesToResource'); + late final _CFURLWriteDataAndPropertiesToResource = + _CFURLWriteDataAndPropertiesToResourcePtr.asFunction< + int Function( + CFURLRef, CFDataRef, CFDictionaryRef, ffi.Pointer)>(); - int CFBundleIsExecutableLoaded( - CFBundleRef bundle, + int CFURLDestroyResource( + CFURLRef url, + ffi.Pointer errorCode, ) { - return _CFBundleIsExecutableLoaded( - bundle, + return _CFURLDestroyResource( + url, + errorCode, ); } - late final _CFBundleIsExecutableLoadedPtr = - _lookup>( - 'CFBundleIsExecutableLoaded'); - late final _CFBundleIsExecutableLoaded = - _CFBundleIsExecutableLoadedPtr.asFunction(); + late final _CFURLDestroyResourcePtr = _lookup< + ffi.NativeFunction)>>( + 'CFURLDestroyResource'); + late final _CFURLDestroyResource = _CFURLDestroyResourcePtr.asFunction< + int Function(CFURLRef, ffi.Pointer)>(); - void CFBundleUnloadExecutable( - CFBundleRef bundle, + CFTypeRef CFURLCreatePropertyFromResource( + CFAllocatorRef alloc, + CFURLRef url, + CFStringRef property, + ffi.Pointer errorCode, ) { - return _CFBundleUnloadExecutable( - bundle, + return _CFURLCreatePropertyFromResource( + alloc, + url, + property, + errorCode, ); } - late final _CFBundleUnloadExecutablePtr = - _lookup>( - 'CFBundleUnloadExecutable'); - late final _CFBundleUnloadExecutable = - _CFBundleUnloadExecutablePtr.asFunction(); + late final _CFURLCreatePropertyFromResourcePtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFAllocatorRef, CFURLRef, CFStringRef, + ffi.Pointer)>>('CFURLCreatePropertyFromResource'); + late final _CFURLCreatePropertyFromResource = + _CFURLCreatePropertyFromResourcePtr.asFunction< + CFTypeRef Function( + CFAllocatorRef, CFURLRef, CFStringRef, ffi.Pointer)>(); - ffi.Pointer CFBundleGetFunctionPointerForName( - CFBundleRef bundle, - CFStringRef functionName, - ) { - return _CFBundleGetFunctionPointerForName( - bundle, - functionName, - ); - } + late final ffi.Pointer _kCFURLFileExists = + _lookup('kCFURLFileExists'); - late final _CFBundleGetFunctionPointerForNamePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFBundleRef, CFStringRef)>>('CFBundleGetFunctionPointerForName'); - late final _CFBundleGetFunctionPointerForName = - _CFBundleGetFunctionPointerForNamePtr.asFunction< - ffi.Pointer Function(CFBundleRef, CFStringRef)>(); + CFStringRef get kCFURLFileExists => _kCFURLFileExists.value; - void CFBundleGetFunctionPointersForNames( - CFBundleRef bundle, - CFArrayRef functionNames, - ffi.Pointer> ftbl, - ) { - return _CFBundleGetFunctionPointersForNames( - bundle, - functionNames, - ftbl, - ); - } + set kCFURLFileExists(CFStringRef value) => _kCFURLFileExists.value = value; - late final _CFBundleGetFunctionPointersForNamesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBundleRef, CFArrayRef, - ffi.Pointer>)>>( - 'CFBundleGetFunctionPointersForNames'); - late final _CFBundleGetFunctionPointersForNames = - _CFBundleGetFunctionPointersForNamesPtr.asFunction< - void Function( - CFBundleRef, CFArrayRef, ffi.Pointer>)>(); + late final ffi.Pointer _kCFURLFileDirectoryContents = + _lookup('kCFURLFileDirectoryContents'); - ffi.Pointer CFBundleGetDataPointerForName( - CFBundleRef bundle, - CFStringRef symbolName, - ) { - return _CFBundleGetDataPointerForName( - bundle, - symbolName, - ); - } + CFStringRef get kCFURLFileDirectoryContents => + _kCFURLFileDirectoryContents.value; - late final _CFBundleGetDataPointerForNamePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFBundleRef, CFStringRef)>>('CFBundleGetDataPointerForName'); - late final _CFBundleGetDataPointerForName = _CFBundleGetDataPointerForNamePtr - .asFunction Function(CFBundleRef, CFStringRef)>(); + set kCFURLFileDirectoryContents(CFStringRef value) => + _kCFURLFileDirectoryContents.value = value; - void CFBundleGetDataPointersForNames( - CFBundleRef bundle, - CFArrayRef symbolNames, - ffi.Pointer> stbl, - ) { - return _CFBundleGetDataPointersForNames( - bundle, - symbolNames, - stbl, - ); - } + late final ffi.Pointer _kCFURLFileLength = + _lookup('kCFURLFileLength'); - late final _CFBundleGetDataPointersForNamesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBundleRef, CFArrayRef, - ffi.Pointer>)>>( - 'CFBundleGetDataPointersForNames'); - late final _CFBundleGetDataPointersForNames = - _CFBundleGetDataPointersForNamesPtr.asFunction< - void Function( - CFBundleRef, CFArrayRef, ffi.Pointer>)>(); + CFStringRef get kCFURLFileLength => _kCFURLFileLength.value; - CFURLRef CFBundleCopyAuxiliaryExecutableURL( - CFBundleRef bundle, - CFStringRef executableName, - ) { - return _CFBundleCopyAuxiliaryExecutableURL( - bundle, - executableName, - ); - } + set kCFURLFileLength(CFStringRef value) => _kCFURLFileLength.value = value; - late final _CFBundleCopyAuxiliaryExecutableURLPtr = - _lookup>( - 'CFBundleCopyAuxiliaryExecutableURL'); - late final _CFBundleCopyAuxiliaryExecutableURL = - _CFBundleCopyAuxiliaryExecutableURLPtr.asFunction< - CFURLRef Function(CFBundleRef, CFStringRef)>(); + late final ffi.Pointer _kCFURLFileLastModificationTime = + _lookup('kCFURLFileLastModificationTime'); - int CFBundleIsExecutableLoadable( - CFBundleRef bundle, - ) { - return _CFBundleIsExecutableLoadable( - bundle, - ); - } + CFStringRef get kCFURLFileLastModificationTime => + _kCFURLFileLastModificationTime.value; - late final _CFBundleIsExecutableLoadablePtr = - _lookup>( - 'CFBundleIsExecutableLoadable'); - late final _CFBundleIsExecutableLoadable = - _CFBundleIsExecutableLoadablePtr.asFunction(); + set kCFURLFileLastModificationTime(CFStringRef value) => + _kCFURLFileLastModificationTime.value = value; - int CFBundleIsExecutableLoadableForURL( - CFURLRef url, - ) { - return _CFBundleIsExecutableLoadableForURL( - url, - ); - } + late final ffi.Pointer _kCFURLFilePOSIXMode = + _lookup('kCFURLFilePOSIXMode'); - late final _CFBundleIsExecutableLoadableForURLPtr = - _lookup>( - 'CFBundleIsExecutableLoadableForURL'); - late final _CFBundleIsExecutableLoadableForURL = - _CFBundleIsExecutableLoadableForURLPtr.asFunction< - int Function(CFURLRef)>(); + CFStringRef get kCFURLFilePOSIXMode => _kCFURLFilePOSIXMode.value; - int CFBundleIsArchitectureLoadable( - int arch, - ) { - return _CFBundleIsArchitectureLoadable( - arch, - ); - } + set kCFURLFilePOSIXMode(CFStringRef value) => + _kCFURLFilePOSIXMode.value = value; - late final _CFBundleIsArchitectureLoadablePtr = - _lookup>( - 'CFBundleIsArchitectureLoadable'); - late final _CFBundleIsArchitectureLoadable = - _CFBundleIsArchitectureLoadablePtr.asFunction(); + late final ffi.Pointer _kCFURLFileOwnerID = + _lookup('kCFURLFileOwnerID'); - CFPlugInRef CFBundleGetPlugIn( - CFBundleRef bundle, - ) { - return _CFBundleGetPlugIn( - bundle, - ); - } + CFStringRef get kCFURLFileOwnerID => _kCFURLFileOwnerID.value; - late final _CFBundleGetPlugInPtr = - _lookup>( - 'CFBundleGetPlugIn'); - late final _CFBundleGetPlugIn = - _CFBundleGetPlugInPtr.asFunction(); + set kCFURLFileOwnerID(CFStringRef value) => _kCFURLFileOwnerID.value = value; - int CFBundleOpenBundleResourceMap( - CFBundleRef bundle, - ) { - return _CFBundleOpenBundleResourceMap( - bundle, - ); - } + late final ffi.Pointer _kCFURLHTTPStatusCode = + _lookup('kCFURLHTTPStatusCode'); - late final _CFBundleOpenBundleResourceMapPtr = - _lookup>( - 'CFBundleOpenBundleResourceMap'); - late final _CFBundleOpenBundleResourceMap = - _CFBundleOpenBundleResourceMapPtr.asFunction(); + CFStringRef get kCFURLHTTPStatusCode => _kCFURLHTTPStatusCode.value; - int CFBundleOpenBundleResourceFiles( - CFBundleRef bundle, - ffi.Pointer refNum, - ffi.Pointer localizedRefNum, - ) { - return _CFBundleOpenBundleResourceFiles( - bundle, - refNum, - localizedRefNum, - ); - } + set kCFURLHTTPStatusCode(CFStringRef value) => + _kCFURLHTTPStatusCode.value = value; - late final _CFBundleOpenBundleResourceFilesPtr = _lookup< - ffi.NativeFunction< - SInt32 Function(CFBundleRef, ffi.Pointer, - ffi.Pointer)>>('CFBundleOpenBundleResourceFiles'); - late final _CFBundleOpenBundleResourceFiles = - _CFBundleOpenBundleResourceFilesPtr.asFunction< - int Function(CFBundleRef, ffi.Pointer, - ffi.Pointer)>(); + late final ffi.Pointer _kCFURLHTTPStatusLine = + _lookup('kCFURLHTTPStatusLine'); - void CFBundleCloseBundleResourceMap( - CFBundleRef bundle, - int refNum, - ) { - return _CFBundleCloseBundleResourceMap( - bundle, - refNum, - ); - } + CFStringRef get kCFURLHTTPStatusLine => _kCFURLHTTPStatusLine.value; - late final _CFBundleCloseBundleResourceMapPtr = _lookup< - ffi.NativeFunction>( - 'CFBundleCloseBundleResourceMap'); - late final _CFBundleCloseBundleResourceMap = - _CFBundleCloseBundleResourceMapPtr.asFunction< - void Function(CFBundleRef, int)>(); + set kCFURLHTTPStatusLine(CFStringRef value) => + _kCFURLHTTPStatusLine.value = value; - int CFMessagePortGetTypeID() { - return _CFMessagePortGetTypeID(); + int CFUUIDGetTypeID() { + return _CFUUIDGetTypeID(); } - late final _CFMessagePortGetTypeIDPtr = - _lookup>( - 'CFMessagePortGetTypeID'); - late final _CFMessagePortGetTypeID = - _CFMessagePortGetTypeIDPtr.asFunction(); + late final _CFUUIDGetTypeIDPtr = + _lookup>('CFUUIDGetTypeID'); + late final _CFUUIDGetTypeID = + _CFUUIDGetTypeIDPtr.asFunction(); - CFMessagePortRef CFMessagePortCreateLocal( - CFAllocatorRef allocator, - CFStringRef name, - CFMessagePortCallBack callout, - ffi.Pointer context, - ffi.Pointer shouldFreeInfo, + CFUUIDRef CFUUIDCreate( + CFAllocatorRef alloc, ) { - return _CFMessagePortCreateLocal( - allocator, - name, - callout, - context, - shouldFreeInfo, + return _CFUUIDCreate( + alloc, ); } - late final _CFMessagePortCreateLocalPtr = _lookup< - ffi.NativeFunction< - CFMessagePortRef Function( - CFAllocatorRef, - CFStringRef, - CFMessagePortCallBack, - ffi.Pointer, - ffi.Pointer)>>('CFMessagePortCreateLocal'); - late final _CFMessagePortCreateLocal = - _CFMessagePortCreateLocalPtr.asFunction< - CFMessagePortRef Function( - CFAllocatorRef, - CFStringRef, - CFMessagePortCallBack, - ffi.Pointer, - ffi.Pointer)>(); + late final _CFUUIDCreatePtr = + _lookup>( + 'CFUUIDCreate'); + late final _CFUUIDCreate = + _CFUUIDCreatePtr.asFunction(); - CFMessagePortRef CFMessagePortCreateRemote( - CFAllocatorRef allocator, - CFStringRef name, + CFUUIDRef CFUUIDCreateWithBytes( + CFAllocatorRef alloc, + int byte0, + int byte1, + int byte2, + int byte3, + int byte4, + int byte5, + int byte6, + int byte7, + int byte8, + int byte9, + int byte10, + int byte11, + int byte12, + int byte13, + int byte14, + int byte15, ) { - return _CFMessagePortCreateRemote( - allocator, - name, + return _CFUUIDCreateWithBytes( + alloc, + byte0, + byte1, + byte2, + byte3, + byte4, + byte5, + byte6, + byte7, + byte8, + byte9, + byte10, + byte11, + byte12, + byte13, + byte14, + byte15, ); } - late final _CFMessagePortCreateRemotePtr = _lookup< + late final _CFUUIDCreateWithBytesPtr = _lookup< ffi.NativeFunction< - CFMessagePortRef Function( - CFAllocatorRef, CFStringRef)>>('CFMessagePortCreateRemote'); - late final _CFMessagePortCreateRemote = _CFMessagePortCreateRemotePtr - .asFunction(); - - int CFMessagePortIsRemote( - CFMessagePortRef ms, - ) { - return _CFMessagePortIsRemote( - ms, - ); - } - - late final _CFMessagePortIsRemotePtr = - _lookup>( - 'CFMessagePortIsRemote'); - late final _CFMessagePortIsRemote = - _CFMessagePortIsRemotePtr.asFunction(); + CFUUIDRef Function( + CFAllocatorRef, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8)>>('CFUUIDCreateWithBytes'); + late final _CFUUIDCreateWithBytes = _CFUUIDCreateWithBytesPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int)>(); - CFStringRef CFMessagePortGetName( - CFMessagePortRef ms, + CFUUIDRef CFUUIDCreateFromString( + CFAllocatorRef alloc, + CFStringRef uuidStr, ) { - return _CFMessagePortGetName( - ms, + return _CFUUIDCreateFromString( + alloc, + uuidStr, ); } - late final _CFMessagePortGetNamePtr = - _lookup>( - 'CFMessagePortGetName'); - late final _CFMessagePortGetName = _CFMessagePortGetNamePtr.asFunction< - CFStringRef Function(CFMessagePortRef)>(); + late final _CFUUIDCreateFromStringPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateFromString'); + late final _CFUUIDCreateFromString = _CFUUIDCreateFromStringPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, CFStringRef)>(); - int CFMessagePortSetName( - CFMessagePortRef ms, - CFStringRef newName, + CFStringRef CFUUIDCreateString( + CFAllocatorRef alloc, + CFUUIDRef uuid, ) { - return _CFMessagePortSetName( - ms, - newName, + return _CFUUIDCreateString( + alloc, + uuid, ); } - late final _CFMessagePortSetNamePtr = _lookup< - ffi.NativeFunction>( - 'CFMessagePortSetName'); - late final _CFMessagePortSetName = _CFMessagePortSetNamePtr.asFunction< - int Function(CFMessagePortRef, CFStringRef)>(); + late final _CFUUIDCreateStringPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateString'); + late final _CFUUIDCreateString = _CFUUIDCreateStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFUUIDRef)>(); - void CFMessagePortGetContext( - CFMessagePortRef ms, - ffi.Pointer context, + CFUUIDRef CFUUIDGetConstantUUIDWithBytes( + CFAllocatorRef alloc, + int byte0, + int byte1, + int byte2, + int byte3, + int byte4, + int byte5, + int byte6, + int byte7, + int byte8, + int byte9, + int byte10, + int byte11, + int byte12, + int byte13, + int byte14, + int byte15, ) { - return _CFMessagePortGetContext( - ms, - context, + return _CFUUIDGetConstantUUIDWithBytes( + alloc, + byte0, + byte1, + byte2, + byte3, + byte4, + byte5, + byte6, + byte7, + byte8, + byte9, + byte10, + byte11, + byte12, + byte13, + byte14, + byte15, ); } - late final _CFMessagePortGetContextPtr = _lookup< + late final _CFUUIDGetConstantUUIDWithBytesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMessagePortRef, - ffi.Pointer)>>('CFMessagePortGetContext'); - late final _CFMessagePortGetContext = _CFMessagePortGetContextPtr.asFunction< - void Function(CFMessagePortRef, ffi.Pointer)>(); + CFUUIDRef Function( + CFAllocatorRef, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8)>>('CFUUIDGetConstantUUIDWithBytes'); + late final _CFUUIDGetConstantUUIDWithBytes = + _CFUUIDGetConstantUUIDWithBytesPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int)>(); - void CFMessagePortInvalidate( - CFMessagePortRef ms, + CFUUIDBytes CFUUIDGetUUIDBytes( + CFUUIDRef uuid, ) { - return _CFMessagePortInvalidate( - ms, + return _CFUUIDGetUUIDBytes( + uuid, ); } - late final _CFMessagePortInvalidatePtr = - _lookup>( - 'CFMessagePortInvalidate'); - late final _CFMessagePortInvalidate = - _CFMessagePortInvalidatePtr.asFunction(); + late final _CFUUIDGetUUIDBytesPtr = + _lookup>( + 'CFUUIDGetUUIDBytes'); + late final _CFUUIDGetUUIDBytes = + _CFUUIDGetUUIDBytesPtr.asFunction(); - int CFMessagePortIsValid( - CFMessagePortRef ms, + CFUUIDRef CFUUIDCreateFromUUIDBytes( + CFAllocatorRef alloc, + CFUUIDBytes bytes, ) { - return _CFMessagePortIsValid( - ms, + return _CFUUIDCreateFromUUIDBytes( + alloc, + bytes, ); } - late final _CFMessagePortIsValidPtr = - _lookup>( - 'CFMessagePortIsValid'); - late final _CFMessagePortIsValid = - _CFMessagePortIsValidPtr.asFunction(); + late final _CFUUIDCreateFromUUIDBytesPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateFromUUIDBytes'); + late final _CFUUIDCreateFromUUIDBytes = _CFUUIDCreateFromUUIDBytesPtr + .asFunction(); - CFMessagePortInvalidationCallBack CFMessagePortGetInvalidationCallBack( - CFMessagePortRef ms, - ) { - return _CFMessagePortGetInvalidationCallBack( - ms, - ); + CFURLRef CFCopyHomeDirectoryURL() { + return _CFCopyHomeDirectoryURL(); } - late final _CFMessagePortGetInvalidationCallBackPtr = _lookup< - ffi.NativeFunction< - CFMessagePortInvalidationCallBack Function( - CFMessagePortRef)>>('CFMessagePortGetInvalidationCallBack'); - late final _CFMessagePortGetInvalidationCallBack = - _CFMessagePortGetInvalidationCallBackPtr.asFunction< - CFMessagePortInvalidationCallBack Function(CFMessagePortRef)>(); + late final _CFCopyHomeDirectoryURLPtr = + _lookup>( + 'CFCopyHomeDirectoryURL'); + late final _CFCopyHomeDirectoryURL = + _CFCopyHomeDirectoryURLPtr.asFunction(); - void CFMessagePortSetInvalidationCallBack( - CFMessagePortRef ms, - CFMessagePortInvalidationCallBack callout, - ) { - return _CFMessagePortSetInvalidationCallBack( - ms, - callout, - ); - } + late final ffi.Pointer _kCFBundleInfoDictionaryVersionKey = + _lookup('kCFBundleInfoDictionaryVersionKey'); - late final _CFMessagePortSetInvalidationCallBackPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMessagePortRef, CFMessagePortInvalidationCallBack)>>( - 'CFMessagePortSetInvalidationCallBack'); - late final _CFMessagePortSetInvalidationCallBack = - _CFMessagePortSetInvalidationCallBackPtr.asFunction< - void Function(CFMessagePortRef, CFMessagePortInvalidationCallBack)>(); + CFStringRef get kCFBundleInfoDictionaryVersionKey => + _kCFBundleInfoDictionaryVersionKey.value; - int CFMessagePortSendRequest( - CFMessagePortRef remote, - int msgid, - CFDataRef data, - double sendTimeout, - double rcvTimeout, - CFStringRef replyMode, - ffi.Pointer returnData, - ) { - return _CFMessagePortSendRequest( - remote, - msgid, - data, - sendTimeout, - rcvTimeout, - replyMode, - returnData, - ); - } + set kCFBundleInfoDictionaryVersionKey(CFStringRef value) => + _kCFBundleInfoDictionaryVersionKey.value = value; - late final _CFMessagePortSendRequestPtr = _lookup< - ffi.NativeFunction< - SInt32 Function( - CFMessagePortRef, - SInt32, - CFDataRef, - CFTimeInterval, - CFTimeInterval, - CFStringRef, - ffi.Pointer)>>('CFMessagePortSendRequest'); - late final _CFMessagePortSendRequest = - _CFMessagePortSendRequestPtr.asFunction< - int Function(CFMessagePortRef, int, CFDataRef, double, double, - CFStringRef, ffi.Pointer)>(); + late final ffi.Pointer _kCFBundleExecutableKey = + _lookup('kCFBundleExecutableKey'); - CFRunLoopSourceRef CFMessagePortCreateRunLoopSource( - CFAllocatorRef allocator, - CFMessagePortRef local, - int order, - ) { - return _CFMessagePortCreateRunLoopSource( - allocator, - local, - order, - ); - } + CFStringRef get kCFBundleExecutableKey => _kCFBundleExecutableKey.value; - late final _CFMessagePortCreateRunLoopSourcePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, - CFIndex)>>('CFMessagePortCreateRunLoopSource'); - late final _CFMessagePortCreateRunLoopSource = - _CFMessagePortCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, int)>(); + set kCFBundleExecutableKey(CFStringRef value) => + _kCFBundleExecutableKey.value = value; - void CFMessagePortSetDispatchQueue( - CFMessagePortRef ms, - dispatch_queue_t queue, - ) { - return _CFMessagePortSetDispatchQueue( - ms, - queue, - ); - } + late final ffi.Pointer _kCFBundleIdentifierKey = + _lookup('kCFBundleIdentifierKey'); - late final _CFMessagePortSetDispatchQueuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMessagePortRef, - dispatch_queue_t)>>('CFMessagePortSetDispatchQueue'); - late final _CFMessagePortSetDispatchQueue = _CFMessagePortSetDispatchQueuePtr - .asFunction(); + CFStringRef get kCFBundleIdentifierKey => _kCFBundleIdentifierKey.value; - late final ffi.Pointer _kCFPlugInDynamicRegistrationKey = - _lookup('kCFPlugInDynamicRegistrationKey'); + set kCFBundleIdentifierKey(CFStringRef value) => + _kCFBundleIdentifierKey.value = value; - CFStringRef get kCFPlugInDynamicRegistrationKey => - _kCFPlugInDynamicRegistrationKey.value; + late final ffi.Pointer _kCFBundleVersionKey = + _lookup('kCFBundleVersionKey'); - set kCFPlugInDynamicRegistrationKey(CFStringRef value) => - _kCFPlugInDynamicRegistrationKey.value = value; + CFStringRef get kCFBundleVersionKey => _kCFBundleVersionKey.value; - late final ffi.Pointer _kCFPlugInDynamicRegisterFunctionKey = - _lookup('kCFPlugInDynamicRegisterFunctionKey'); + set kCFBundleVersionKey(CFStringRef value) => + _kCFBundleVersionKey.value = value; - CFStringRef get kCFPlugInDynamicRegisterFunctionKey => - _kCFPlugInDynamicRegisterFunctionKey.value; + late final ffi.Pointer _kCFBundleDevelopmentRegionKey = + _lookup('kCFBundleDevelopmentRegionKey'); - set kCFPlugInDynamicRegisterFunctionKey(CFStringRef value) => - _kCFPlugInDynamicRegisterFunctionKey.value = value; + CFStringRef get kCFBundleDevelopmentRegionKey => + _kCFBundleDevelopmentRegionKey.value; - late final ffi.Pointer _kCFPlugInUnloadFunctionKey = - _lookup('kCFPlugInUnloadFunctionKey'); + set kCFBundleDevelopmentRegionKey(CFStringRef value) => + _kCFBundleDevelopmentRegionKey.value = value; - CFStringRef get kCFPlugInUnloadFunctionKey => - _kCFPlugInUnloadFunctionKey.value; + late final ffi.Pointer _kCFBundleNameKey = + _lookup('kCFBundleNameKey'); - set kCFPlugInUnloadFunctionKey(CFStringRef value) => - _kCFPlugInUnloadFunctionKey.value = value; + CFStringRef get kCFBundleNameKey => _kCFBundleNameKey.value; - late final ffi.Pointer _kCFPlugInFactoriesKey = - _lookup('kCFPlugInFactoriesKey'); + set kCFBundleNameKey(CFStringRef value) => _kCFBundleNameKey.value = value; - CFStringRef get kCFPlugInFactoriesKey => _kCFPlugInFactoriesKey.value; + late final ffi.Pointer _kCFBundleLocalizationsKey = + _lookup('kCFBundleLocalizationsKey'); - set kCFPlugInFactoriesKey(CFStringRef value) => - _kCFPlugInFactoriesKey.value = value; + CFStringRef get kCFBundleLocalizationsKey => _kCFBundleLocalizationsKey.value; - late final ffi.Pointer _kCFPlugInTypesKey = - _lookup('kCFPlugInTypesKey'); + set kCFBundleLocalizationsKey(CFStringRef value) => + _kCFBundleLocalizationsKey.value = value; - CFStringRef get kCFPlugInTypesKey => _kCFPlugInTypesKey.value; + CFBundleRef CFBundleGetMainBundle() { + return _CFBundleGetMainBundle(); + } - set kCFPlugInTypesKey(CFStringRef value) => _kCFPlugInTypesKey.value = value; + late final _CFBundleGetMainBundlePtr = + _lookup>( + 'CFBundleGetMainBundle'); + late final _CFBundleGetMainBundle = + _CFBundleGetMainBundlePtr.asFunction(); - int CFPlugInGetTypeID() { - return _CFPlugInGetTypeID(); + CFBundleRef CFBundleGetBundleWithIdentifier( + CFStringRef bundleID, + ) { + return _CFBundleGetBundleWithIdentifier( + bundleID, + ); } - late final _CFPlugInGetTypeIDPtr = - _lookup>('CFPlugInGetTypeID'); - late final _CFPlugInGetTypeID = - _CFPlugInGetTypeIDPtr.asFunction(); + late final _CFBundleGetBundleWithIdentifierPtr = + _lookup>( + 'CFBundleGetBundleWithIdentifier'); + late final _CFBundleGetBundleWithIdentifier = + _CFBundleGetBundleWithIdentifierPtr.asFunction< + CFBundleRef Function(CFStringRef)>(); - CFPlugInRef CFPlugInCreate( - CFAllocatorRef allocator, - CFURLRef plugInURL, - ) { - return _CFPlugInCreate( - allocator, - plugInURL, - ); + CFArrayRef CFBundleGetAllBundles() { + return _CFBundleGetAllBundles(); } - late final _CFPlugInCreatePtr = _lookup< - ffi.NativeFunction>( - 'CFPlugInCreate'); - late final _CFPlugInCreate = _CFPlugInCreatePtr.asFunction< - CFPlugInRef Function(CFAllocatorRef, CFURLRef)>(); + late final _CFBundleGetAllBundlesPtr = + _lookup>( + 'CFBundleGetAllBundles'); + late final _CFBundleGetAllBundles = + _CFBundleGetAllBundlesPtr.asFunction(); - CFBundleRef CFPlugInGetBundle( - CFPlugInRef plugIn, - ) { - return _CFPlugInGetBundle( - plugIn, - ); + int CFBundleGetTypeID() { + return _CFBundleGetTypeID(); } - late final _CFPlugInGetBundlePtr = - _lookup>( - 'CFPlugInGetBundle'); - late final _CFPlugInGetBundle = - _CFPlugInGetBundlePtr.asFunction(); + late final _CFBundleGetTypeIDPtr = + _lookup>('CFBundleGetTypeID'); + late final _CFBundleGetTypeID = + _CFBundleGetTypeIDPtr.asFunction(); - void CFPlugInSetLoadOnDemand( - CFPlugInRef plugIn, - int flag, + CFBundleRef CFBundleCreate( + CFAllocatorRef allocator, + CFURLRef bundleURL, ) { - return _CFPlugInSetLoadOnDemand( - plugIn, - flag, + return _CFBundleCreate( + allocator, + bundleURL, ); } - late final _CFPlugInSetLoadOnDemandPtr = - _lookup>( - 'CFPlugInSetLoadOnDemand'); - late final _CFPlugInSetLoadOnDemand = - _CFPlugInSetLoadOnDemandPtr.asFunction(); + late final _CFBundleCreatePtr = _lookup< + ffi.NativeFunction>( + 'CFBundleCreate'); + late final _CFBundleCreate = _CFBundleCreatePtr.asFunction< + CFBundleRef Function(CFAllocatorRef, CFURLRef)>(); - int CFPlugInIsLoadOnDemand( - CFPlugInRef plugIn, + CFArrayRef CFBundleCreateBundlesFromDirectory( + CFAllocatorRef allocator, + CFURLRef directoryURL, + CFStringRef bundleType, ) { - return _CFPlugInIsLoadOnDemand( - plugIn, + return _CFBundleCreateBundlesFromDirectory( + allocator, + directoryURL, + bundleType, ); } - late final _CFPlugInIsLoadOnDemandPtr = - _lookup>( - 'CFPlugInIsLoadOnDemand'); - late final _CFPlugInIsLoadOnDemand = - _CFPlugInIsLoadOnDemandPtr.asFunction(); + late final _CFBundleCreateBundlesFromDirectoryPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFAllocatorRef, CFURLRef, + CFStringRef)>>('CFBundleCreateBundlesFromDirectory'); + late final _CFBundleCreateBundlesFromDirectory = + _CFBundleCreateBundlesFromDirectoryPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); - CFArrayRef CFPlugInFindFactoriesForPlugInType( - CFUUIDRef typeUUID, + CFURLRef CFBundleCopyBundleURL( + CFBundleRef bundle, ) { - return _CFPlugInFindFactoriesForPlugInType( - typeUUID, + return _CFBundleCopyBundleURL( + bundle, ); } - late final _CFPlugInFindFactoriesForPlugInTypePtr = - _lookup>( - 'CFPlugInFindFactoriesForPlugInType'); - late final _CFPlugInFindFactoriesForPlugInType = - _CFPlugInFindFactoriesForPlugInTypePtr.asFunction< - CFArrayRef Function(CFUUIDRef)>(); + late final _CFBundleCopyBundleURLPtr = + _lookup>( + 'CFBundleCopyBundleURL'); + late final _CFBundleCopyBundleURL = + _CFBundleCopyBundleURLPtr.asFunction(); - CFArrayRef CFPlugInFindFactoriesForPlugInTypeInPlugIn( - CFUUIDRef typeUUID, - CFPlugInRef plugIn, + CFTypeRef CFBundleGetValueForInfoDictionaryKey( + CFBundleRef bundle, + CFStringRef key, ) { - return _CFPlugInFindFactoriesForPlugInTypeInPlugIn( - typeUUID, - plugIn, + return _CFBundleGetValueForInfoDictionaryKey( + bundle, + key, ); } - late final _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr = - _lookup>( - 'CFPlugInFindFactoriesForPlugInTypeInPlugIn'); - late final _CFPlugInFindFactoriesForPlugInTypeInPlugIn = - _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr.asFunction< - CFArrayRef Function(CFUUIDRef, CFPlugInRef)>(); + late final _CFBundleGetValueForInfoDictionaryKeyPtr = + _lookup>( + 'CFBundleGetValueForInfoDictionaryKey'); + late final _CFBundleGetValueForInfoDictionaryKey = + _CFBundleGetValueForInfoDictionaryKeyPtr.asFunction< + CFTypeRef Function(CFBundleRef, CFStringRef)>(); - ffi.Pointer CFPlugInInstanceCreate( - CFAllocatorRef allocator, - CFUUIDRef factoryUUID, - CFUUIDRef typeUUID, + CFDictionaryRef CFBundleGetInfoDictionary( + CFBundleRef bundle, ) { - return _CFPlugInInstanceCreate( - allocator, - factoryUUID, - typeUUID, + return _CFBundleGetInfoDictionary( + bundle, ); } - late final _CFPlugInInstanceCreatePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef, CFUUIDRef, CFUUIDRef)>>('CFPlugInInstanceCreate'); - late final _CFPlugInInstanceCreate = _CFPlugInInstanceCreatePtr.asFunction< - ffi.Pointer Function(CFAllocatorRef, CFUUIDRef, CFUUIDRef)>(); + late final _CFBundleGetInfoDictionaryPtr = + _lookup>( + 'CFBundleGetInfoDictionary'); + late final _CFBundleGetInfoDictionary = _CFBundleGetInfoDictionaryPtr + .asFunction(); - int CFPlugInRegisterFactoryFunction( - CFUUIDRef factoryUUID, - CFPlugInFactoryFunction func, + CFDictionaryRef CFBundleGetLocalInfoDictionary( + CFBundleRef bundle, ) { - return _CFPlugInRegisterFactoryFunction( - factoryUUID, - func, + return _CFBundleGetLocalInfoDictionary( + bundle, ); } - late final _CFPlugInRegisterFactoryFunctionPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFUUIDRef, - CFPlugInFactoryFunction)>>('CFPlugInRegisterFactoryFunction'); - late final _CFPlugInRegisterFactoryFunction = - _CFPlugInRegisterFactoryFunctionPtr.asFunction< - int Function(CFUUIDRef, CFPlugInFactoryFunction)>(); + late final _CFBundleGetLocalInfoDictionaryPtr = + _lookup>( + 'CFBundleGetLocalInfoDictionary'); + late final _CFBundleGetLocalInfoDictionary = + _CFBundleGetLocalInfoDictionaryPtr.asFunction< + CFDictionaryRef Function(CFBundleRef)>(); - int CFPlugInRegisterFactoryFunctionByName( - CFUUIDRef factoryUUID, - CFPlugInRef plugIn, - CFStringRef functionName, + void CFBundleGetPackageInfo( + CFBundleRef bundle, + ffi.Pointer packageType, + ffi.Pointer packageCreator, ) { - return _CFPlugInRegisterFactoryFunctionByName( - factoryUUID, - plugIn, - functionName, + return _CFBundleGetPackageInfo( + bundle, + packageType, + packageCreator, ); } - late final _CFPlugInRegisterFactoryFunctionByNamePtr = _lookup< + late final _CFBundleGetPackageInfoPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFUUIDRef, CFPlugInRef, - CFStringRef)>>('CFPlugInRegisterFactoryFunctionByName'); - late final _CFPlugInRegisterFactoryFunctionByName = - _CFPlugInRegisterFactoryFunctionByNamePtr.asFunction< - int Function(CFUUIDRef, CFPlugInRef, CFStringRef)>(); + ffi.Void Function(CFBundleRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleGetPackageInfo'); + late final _CFBundleGetPackageInfo = _CFBundleGetPackageInfoPtr.asFunction< + void Function(CFBundleRef, ffi.Pointer, ffi.Pointer)>(); - int CFPlugInUnregisterFactory( - CFUUIDRef factoryUUID, + CFStringRef CFBundleGetIdentifier( + CFBundleRef bundle, ) { - return _CFPlugInUnregisterFactory( - factoryUUID, + return _CFBundleGetIdentifier( + bundle, ); } - late final _CFPlugInUnregisterFactoryPtr = - _lookup>( - 'CFPlugInUnregisterFactory'); - late final _CFPlugInUnregisterFactory = - _CFPlugInUnregisterFactoryPtr.asFunction(); + late final _CFBundleGetIdentifierPtr = + _lookup>( + 'CFBundleGetIdentifier'); + late final _CFBundleGetIdentifier = + _CFBundleGetIdentifierPtr.asFunction(); - int CFPlugInRegisterPlugInType( - CFUUIDRef factoryUUID, - CFUUIDRef typeUUID, + int CFBundleGetVersionNumber( + CFBundleRef bundle, ) { - return _CFPlugInRegisterPlugInType( - factoryUUID, - typeUUID, + return _CFBundleGetVersionNumber( + bundle, ); } - late final _CFPlugInRegisterPlugInTypePtr = - _lookup>( - 'CFPlugInRegisterPlugInType'); - late final _CFPlugInRegisterPlugInType = _CFPlugInRegisterPlugInTypePtr - .asFunction(); + late final _CFBundleGetVersionNumberPtr = + _lookup>( + 'CFBundleGetVersionNumber'); + late final _CFBundleGetVersionNumber = + _CFBundleGetVersionNumberPtr.asFunction(); - int CFPlugInUnregisterPlugInType( - CFUUIDRef factoryUUID, - CFUUIDRef typeUUID, + CFStringRef CFBundleGetDevelopmentRegion( + CFBundleRef bundle, ) { - return _CFPlugInUnregisterPlugInType( - factoryUUID, - typeUUID, + return _CFBundleGetDevelopmentRegion( + bundle, ); } - late final _CFPlugInUnregisterPlugInTypePtr = - _lookup>( - 'CFPlugInUnregisterPlugInType'); - late final _CFPlugInUnregisterPlugInType = _CFPlugInUnregisterPlugInTypePtr - .asFunction(); + late final _CFBundleGetDevelopmentRegionPtr = + _lookup>( + 'CFBundleGetDevelopmentRegion'); + late final _CFBundleGetDevelopmentRegion = _CFBundleGetDevelopmentRegionPtr + .asFunction(); - void CFPlugInAddInstanceForFactory( - CFUUIDRef factoryID, + CFURLRef CFBundleCopySupportFilesDirectoryURL( + CFBundleRef bundle, ) { - return _CFPlugInAddInstanceForFactory( - factoryID, + return _CFBundleCopySupportFilesDirectoryURL( + bundle, ); } - late final _CFPlugInAddInstanceForFactoryPtr = - _lookup>( - 'CFPlugInAddInstanceForFactory'); - late final _CFPlugInAddInstanceForFactory = - _CFPlugInAddInstanceForFactoryPtr.asFunction(); + late final _CFBundleCopySupportFilesDirectoryURLPtr = + _lookup>( + 'CFBundleCopySupportFilesDirectoryURL'); + late final _CFBundleCopySupportFilesDirectoryURL = + _CFBundleCopySupportFilesDirectoryURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - void CFPlugInRemoveInstanceForFactory( - CFUUIDRef factoryID, + CFURLRef CFBundleCopyResourcesDirectoryURL( + CFBundleRef bundle, ) { - return _CFPlugInRemoveInstanceForFactory( - factoryID, + return _CFBundleCopyResourcesDirectoryURL( + bundle, ); } - late final _CFPlugInRemoveInstanceForFactoryPtr = - _lookup>( - 'CFPlugInRemoveInstanceForFactory'); - late final _CFPlugInRemoveInstanceForFactory = - _CFPlugInRemoveInstanceForFactoryPtr.asFunction< - void Function(CFUUIDRef)>(); + late final _CFBundleCopyResourcesDirectoryURLPtr = + _lookup>( + 'CFBundleCopyResourcesDirectoryURL'); + late final _CFBundleCopyResourcesDirectoryURL = + _CFBundleCopyResourcesDirectoryURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - int CFPlugInInstanceGetInterfaceFunctionTable( - CFPlugInInstanceRef instance, - CFStringRef interfaceName, - ffi.Pointer> ftbl, + CFURLRef CFBundleCopyPrivateFrameworksURL( + CFBundleRef bundle, ) { - return _CFPlugInInstanceGetInterfaceFunctionTable( - instance, - interfaceName, - ftbl, + return _CFBundleCopyPrivateFrameworksURL( + bundle, ); } - late final _CFPlugInInstanceGetInterfaceFunctionTablePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFPlugInInstanceRef, CFStringRef, - ffi.Pointer>)>>( - 'CFPlugInInstanceGetInterfaceFunctionTable'); - late final _CFPlugInInstanceGetInterfaceFunctionTable = - _CFPlugInInstanceGetInterfaceFunctionTablePtr.asFunction< - int Function(CFPlugInInstanceRef, CFStringRef, - ffi.Pointer>)>(); + late final _CFBundleCopyPrivateFrameworksURLPtr = + _lookup>( + 'CFBundleCopyPrivateFrameworksURL'); + late final _CFBundleCopyPrivateFrameworksURL = + _CFBundleCopyPrivateFrameworksURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - CFStringRef CFPlugInInstanceGetFactoryName( - CFPlugInInstanceRef instance, + CFURLRef CFBundleCopySharedFrameworksURL( + CFBundleRef bundle, ) { - return _CFPlugInInstanceGetFactoryName( - instance, + return _CFBundleCopySharedFrameworksURL( + bundle, ); } - late final _CFPlugInInstanceGetFactoryNamePtr = - _lookup>( - 'CFPlugInInstanceGetFactoryName'); - late final _CFPlugInInstanceGetFactoryName = - _CFPlugInInstanceGetFactoryNamePtr.asFunction< - CFStringRef Function(CFPlugInInstanceRef)>(); + late final _CFBundleCopySharedFrameworksURLPtr = + _lookup>( + 'CFBundleCopySharedFrameworksURL'); + late final _CFBundleCopySharedFrameworksURL = + _CFBundleCopySharedFrameworksURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - ffi.Pointer CFPlugInInstanceGetInstanceData( - CFPlugInInstanceRef instance, + CFURLRef CFBundleCopySharedSupportURL( + CFBundleRef bundle, ) { - return _CFPlugInInstanceGetInstanceData( - instance, + return _CFBundleCopySharedSupportURL( + bundle, ); } - late final _CFPlugInInstanceGetInstanceDataPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFPlugInInstanceRef)>>('CFPlugInInstanceGetInstanceData'); - late final _CFPlugInInstanceGetInstanceData = - _CFPlugInInstanceGetInstanceDataPtr.asFunction< - ffi.Pointer Function(CFPlugInInstanceRef)>(); + late final _CFBundleCopySharedSupportURLPtr = + _lookup>( + 'CFBundleCopySharedSupportURL'); + late final _CFBundleCopySharedSupportURL = _CFBundleCopySharedSupportURLPtr + .asFunction(); - int CFPlugInInstanceGetTypeID() { - return _CFPlugInInstanceGetTypeID(); + CFURLRef CFBundleCopyBuiltInPlugInsURL( + CFBundleRef bundle, + ) { + return _CFBundleCopyBuiltInPlugInsURL( + bundle, + ); } - late final _CFPlugInInstanceGetTypeIDPtr = - _lookup>( - 'CFPlugInInstanceGetTypeID'); - late final _CFPlugInInstanceGetTypeID = - _CFPlugInInstanceGetTypeIDPtr.asFunction(); + late final _CFBundleCopyBuiltInPlugInsURLPtr = + _lookup>( + 'CFBundleCopyBuiltInPlugInsURL'); + late final _CFBundleCopyBuiltInPlugInsURL = _CFBundleCopyBuiltInPlugInsURLPtr + .asFunction(); - CFPlugInInstanceRef CFPlugInInstanceCreateWithInstanceDataSize( - CFAllocatorRef allocator, - int instanceDataSize, - CFPlugInInstanceDeallocateInstanceDataFunction deallocateInstanceFunction, - CFStringRef factoryName, - CFPlugInInstanceGetInterfaceFunction getInterfaceFunction, + CFDictionaryRef CFBundleCopyInfoDictionaryInDirectory( + CFURLRef bundleURL, ) { - return _CFPlugInInstanceCreateWithInstanceDataSize( - allocator, - instanceDataSize, - deallocateInstanceFunction, - factoryName, - getInterfaceFunction, + return _CFBundleCopyInfoDictionaryInDirectory( + bundleURL, ); } - late final _CFPlugInInstanceCreateWithInstanceDataSizePtr = _lookup< - ffi.NativeFunction< - CFPlugInInstanceRef Function( - CFAllocatorRef, - CFIndex, - CFPlugInInstanceDeallocateInstanceDataFunction, - CFStringRef, - CFPlugInInstanceGetInterfaceFunction)>>( - 'CFPlugInInstanceCreateWithInstanceDataSize'); - late final _CFPlugInInstanceCreateWithInstanceDataSize = - _CFPlugInInstanceCreateWithInstanceDataSizePtr.asFunction< - CFPlugInInstanceRef Function( - CFAllocatorRef, - int, - CFPlugInInstanceDeallocateInstanceDataFunction, - CFStringRef, - CFPlugInInstanceGetInterfaceFunction)>(); + late final _CFBundleCopyInfoDictionaryInDirectoryPtr = + _lookup>( + 'CFBundleCopyInfoDictionaryInDirectory'); + late final _CFBundleCopyInfoDictionaryInDirectory = + _CFBundleCopyInfoDictionaryInDirectoryPtr.asFunction< + CFDictionaryRef Function(CFURLRef)>(); - int CFMachPortGetTypeID() { - return _CFMachPortGetTypeID(); + int CFBundleGetPackageInfoInDirectory( + CFURLRef url, + ffi.Pointer packageType, + ffi.Pointer packageCreator, + ) { + return _CFBundleGetPackageInfoInDirectory( + url, + packageType, + packageCreator, + ); } - late final _CFMachPortGetTypeIDPtr = - _lookup>('CFMachPortGetTypeID'); - late final _CFMachPortGetTypeID = - _CFMachPortGetTypeIDPtr.asFunction(); + late final _CFBundleGetPackageInfoInDirectoryPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleGetPackageInfoInDirectory'); + late final _CFBundleGetPackageInfoInDirectory = + _CFBundleGetPackageInfoInDirectoryPtr.asFunction< + int Function(CFURLRef, ffi.Pointer, ffi.Pointer)>(); - CFMachPortRef CFMachPortCreate( - CFAllocatorRef allocator, - CFMachPortCallBack callout, - ffi.Pointer context, - ffi.Pointer shouldFreeInfo, + CFURLRef CFBundleCopyResourceURL( + CFBundleRef bundle, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _CFMachPortCreate( - allocator, - callout, - context, - shouldFreeInfo, + return _CFBundleCopyResourceURL( + bundle, + resourceName, + resourceType, + subDirName, ); } - late final _CFMachPortCreatePtr = _lookup< + late final _CFBundleCopyResourceURLPtr = _lookup< ffi.NativeFunction< - CFMachPortRef Function( - CFAllocatorRef, - CFMachPortCallBack, - ffi.Pointer, - ffi.Pointer)>>('CFMachPortCreate'); - late final _CFMachPortCreate = _CFMachPortCreatePtr.asFunction< - CFMachPortRef Function(CFAllocatorRef, CFMachPortCallBack, - ffi.Pointer, ffi.Pointer)>(); + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURL'); + late final _CFBundleCopyResourceURL = _CFBundleCopyResourceURLPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); - CFMachPortRef CFMachPortCreateWithPort( - CFAllocatorRef allocator, - int portNum, - CFMachPortCallBack callout, - ffi.Pointer context, - ffi.Pointer shouldFreeInfo, + CFArrayRef CFBundleCopyResourceURLsOfType( + CFBundleRef bundle, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _CFMachPortCreateWithPort( - allocator, - portNum, - callout, - context, - shouldFreeInfo, + return _CFBundleCopyResourceURLsOfType( + bundle, + resourceType, + subDirName, ); } - late final _CFMachPortCreateWithPortPtr = _lookup< + late final _CFBundleCopyResourceURLsOfTypePtr = _lookup< ffi.NativeFunction< - CFMachPortRef Function( - CFAllocatorRef, - mach_port_t, - CFMachPortCallBack, - ffi.Pointer, - ffi.Pointer)>>('CFMachPortCreateWithPort'); - late final _CFMachPortCreateWithPort = - _CFMachPortCreateWithPortPtr.asFunction< - CFMachPortRef Function(CFAllocatorRef, int, CFMachPortCallBack, - ffi.Pointer, ffi.Pointer)>(); + CFArrayRef Function(CFBundleRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfType'); + late final _CFBundleCopyResourceURLsOfType = + _CFBundleCopyResourceURLsOfTypePtr.asFunction< + CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef)>(); - int CFMachPortGetPort( - CFMachPortRef port, + CFStringRef CFBundleCopyLocalizedString( + CFBundleRef bundle, + CFStringRef key, + CFStringRef value, + CFStringRef tableName, ) { - return _CFMachPortGetPort( - port, + return _CFBundleCopyLocalizedString( + bundle, + key, + value, + tableName, ); } - late final _CFMachPortGetPortPtr = - _lookup>( - 'CFMachPortGetPort'); - late final _CFMachPortGetPort = - _CFMachPortGetPortPtr.asFunction(); + late final _CFBundleCopyLocalizedStringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyLocalizedString'); + late final _CFBundleCopyLocalizedString = + _CFBundleCopyLocalizedStringPtr.asFunction< + CFStringRef Function( + CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); - void CFMachPortGetContext( - CFMachPortRef port, - ffi.Pointer context, + CFURLRef CFBundleCopyResourceURLInDirectory( + CFURLRef bundleURL, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _CFMachPortGetContext( - port, - context, + return _CFBundleCopyResourceURLInDirectory( + bundleURL, + resourceName, + resourceType, + subDirName, ); } - late final _CFMachPortGetContextPtr = _lookup< + late final _CFBundleCopyResourceURLInDirectoryPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMachPortRef, - ffi.Pointer)>>('CFMachPortGetContext'); - late final _CFMachPortGetContext = _CFMachPortGetContextPtr.asFunction< - void Function(CFMachPortRef, ffi.Pointer)>(); + CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLInDirectory'); + late final _CFBundleCopyResourceURLInDirectory = + _CFBundleCopyResourceURLInDirectoryPtr.asFunction< + CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, CFStringRef)>(); - void CFMachPortInvalidate( - CFMachPortRef port, + CFArrayRef CFBundleCopyResourceURLsOfTypeInDirectory( + CFURLRef bundleURL, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _CFMachPortInvalidate( - port, + return _CFBundleCopyResourceURLsOfTypeInDirectory( + bundleURL, + resourceType, + subDirName, ); } - late final _CFMachPortInvalidatePtr = - _lookup>( - 'CFMachPortInvalidate'); - late final _CFMachPortInvalidate = - _CFMachPortInvalidatePtr.asFunction(); + late final _CFBundleCopyResourceURLsOfTypeInDirectoryPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFURLRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfTypeInDirectory'); + late final _CFBundleCopyResourceURLsOfTypeInDirectory = + _CFBundleCopyResourceURLsOfTypeInDirectoryPtr.asFunction< + CFArrayRef Function(CFURLRef, CFStringRef, CFStringRef)>(); - int CFMachPortIsValid( - CFMachPortRef port, + CFArrayRef CFBundleCopyBundleLocalizations( + CFBundleRef bundle, ) { - return _CFMachPortIsValid( - port, + return _CFBundleCopyBundleLocalizations( + bundle, ); } - late final _CFMachPortIsValidPtr = - _lookup>( - 'CFMachPortIsValid'); - late final _CFMachPortIsValid = - _CFMachPortIsValidPtr.asFunction(); + late final _CFBundleCopyBundleLocalizationsPtr = + _lookup>( + 'CFBundleCopyBundleLocalizations'); + late final _CFBundleCopyBundleLocalizations = + _CFBundleCopyBundleLocalizationsPtr.asFunction< + CFArrayRef Function(CFBundleRef)>(); - CFMachPortInvalidationCallBack CFMachPortGetInvalidationCallBack( - CFMachPortRef port, + CFArrayRef CFBundleCopyPreferredLocalizationsFromArray( + CFArrayRef locArray, ) { - return _CFMachPortGetInvalidationCallBack( - port, + return _CFBundleCopyPreferredLocalizationsFromArray( + locArray, ); } - late final _CFMachPortGetInvalidationCallBackPtr = _lookup< - ffi.NativeFunction< - CFMachPortInvalidationCallBack Function( - CFMachPortRef)>>('CFMachPortGetInvalidationCallBack'); - late final _CFMachPortGetInvalidationCallBack = - _CFMachPortGetInvalidationCallBackPtr.asFunction< - CFMachPortInvalidationCallBack Function(CFMachPortRef)>(); + late final _CFBundleCopyPreferredLocalizationsFromArrayPtr = + _lookup>( + 'CFBundleCopyPreferredLocalizationsFromArray'); + late final _CFBundleCopyPreferredLocalizationsFromArray = + _CFBundleCopyPreferredLocalizationsFromArrayPtr.asFunction< + CFArrayRef Function(CFArrayRef)>(); - void CFMachPortSetInvalidationCallBack( - CFMachPortRef port, - CFMachPortInvalidationCallBack callout, + CFArrayRef CFBundleCopyLocalizationsForPreferences( + CFArrayRef locArray, + CFArrayRef prefArray, ) { - return _CFMachPortSetInvalidationCallBack( - port, - callout, + return _CFBundleCopyLocalizationsForPreferences( + locArray, + prefArray, ); } - late final _CFMachPortSetInvalidationCallBackPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMachPortRef, CFMachPortInvalidationCallBack)>>( - 'CFMachPortSetInvalidationCallBack'); - late final _CFMachPortSetInvalidationCallBack = - _CFMachPortSetInvalidationCallBackPtr.asFunction< - void Function(CFMachPortRef, CFMachPortInvalidationCallBack)>(); + late final _CFBundleCopyLocalizationsForPreferencesPtr = + _lookup>( + 'CFBundleCopyLocalizationsForPreferences'); + late final _CFBundleCopyLocalizationsForPreferences = + _CFBundleCopyLocalizationsForPreferencesPtr.asFunction< + CFArrayRef Function(CFArrayRef, CFArrayRef)>(); - CFRunLoopSourceRef CFMachPortCreateRunLoopSource( - CFAllocatorRef allocator, - CFMachPortRef port, - int order, + CFURLRef CFBundleCopyResourceURLForLocalization( + CFBundleRef bundle, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, + CFStringRef localizationName, ) { - return _CFMachPortCreateRunLoopSource( - allocator, - port, - order, + return _CFBundleCopyResourceURLForLocalization( + bundle, + resourceName, + resourceType, + subDirName, + localizationName, ); } - late final _CFMachPortCreateRunLoopSourcePtr = _lookup< + late final _CFBundleCopyResourceURLForLocalizationPtr = _lookup< ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, - CFIndex)>>('CFMachPortCreateRunLoopSource'); - late final _CFMachPortCreateRunLoopSource = - _CFMachPortCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, int)>(); + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLForLocalization'); + late final _CFBundleCopyResourceURLForLocalization = + _CFBundleCopyResourceURLForLocalizationPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>(); - int CFAttributedStringGetTypeID() { - return _CFAttributedStringGetTypeID(); + CFArrayRef CFBundleCopyResourceURLsOfTypeForLocalization( + CFBundleRef bundle, + CFStringRef resourceType, + CFStringRef subDirName, + CFStringRef localizationName, + ) { + return _CFBundleCopyResourceURLsOfTypeForLocalization( + bundle, + resourceType, + subDirName, + localizationName, + ); } - late final _CFAttributedStringGetTypeIDPtr = - _lookup>( - 'CFAttributedStringGetTypeID'); - late final _CFAttributedStringGetTypeID = - _CFAttributedStringGetTypeIDPtr.asFunction(); + late final _CFBundleCopyResourceURLsOfTypeForLocalizationPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfTypeForLocalization'); + late final _CFBundleCopyResourceURLsOfTypeForLocalization = + _CFBundleCopyResourceURLsOfTypeForLocalizationPtr.asFunction< + CFArrayRef Function( + CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); - CFAttributedStringRef CFAttributedStringCreate( - CFAllocatorRef alloc, - CFStringRef str, - CFDictionaryRef attributes, + CFDictionaryRef CFBundleCopyInfoDictionaryForURL( + CFURLRef url, ) { - return _CFAttributedStringCreate( - alloc, - str, - attributes, + return _CFBundleCopyInfoDictionaryForURL( + url, ); } - late final _CFAttributedStringCreatePtr = _lookup< - ffi.NativeFunction< - CFAttributedStringRef Function(CFAllocatorRef, CFStringRef, - CFDictionaryRef)>>('CFAttributedStringCreate'); - late final _CFAttributedStringCreate = - _CFAttributedStringCreatePtr.asFunction< - CFAttributedStringRef Function( - CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); + late final _CFBundleCopyInfoDictionaryForURLPtr = + _lookup>( + 'CFBundleCopyInfoDictionaryForURL'); + late final _CFBundleCopyInfoDictionaryForURL = + _CFBundleCopyInfoDictionaryForURLPtr.asFunction< + CFDictionaryRef Function(CFURLRef)>(); - CFAttributedStringRef CFAttributedStringCreateWithSubstring( - CFAllocatorRef alloc, - CFAttributedStringRef aStr, - CFRange range, + CFArrayRef CFBundleCopyLocalizationsForURL( + CFURLRef url, ) { - return _CFAttributedStringCreateWithSubstring( - alloc, - aStr, - range, + return _CFBundleCopyLocalizationsForURL( + url, ); } - late final _CFAttributedStringCreateWithSubstringPtr = _lookup< - ffi.NativeFunction< - CFAttributedStringRef Function(CFAllocatorRef, CFAttributedStringRef, - CFRange)>>('CFAttributedStringCreateWithSubstring'); - late final _CFAttributedStringCreateWithSubstring = - _CFAttributedStringCreateWithSubstringPtr.asFunction< - CFAttributedStringRef Function( - CFAllocatorRef, CFAttributedStringRef, CFRange)>(); + late final _CFBundleCopyLocalizationsForURLPtr = + _lookup>( + 'CFBundleCopyLocalizationsForURL'); + late final _CFBundleCopyLocalizationsForURL = + _CFBundleCopyLocalizationsForURLPtr.asFunction< + CFArrayRef Function(CFURLRef)>(); - CFAttributedStringRef CFAttributedStringCreateCopy( - CFAllocatorRef alloc, - CFAttributedStringRef aStr, + CFArrayRef CFBundleCopyExecutableArchitecturesForURL( + CFURLRef url, ) { - return _CFAttributedStringCreateCopy( - alloc, - aStr, + return _CFBundleCopyExecutableArchitecturesForURL( + url, ); } - late final _CFAttributedStringCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFAttributedStringRef Function(CFAllocatorRef, - CFAttributedStringRef)>>('CFAttributedStringCreateCopy'); - late final _CFAttributedStringCreateCopy = - _CFAttributedStringCreateCopyPtr.asFunction< - CFAttributedStringRef Function( - CFAllocatorRef, CFAttributedStringRef)>(); + late final _CFBundleCopyExecutableArchitecturesForURLPtr = + _lookup>( + 'CFBundleCopyExecutableArchitecturesForURL'); + late final _CFBundleCopyExecutableArchitecturesForURL = + _CFBundleCopyExecutableArchitecturesForURLPtr.asFunction< + CFArrayRef Function(CFURLRef)>(); - CFStringRef CFAttributedStringGetString( - CFAttributedStringRef aStr, + CFURLRef CFBundleCopyExecutableURL( + CFBundleRef bundle, ) { - return _CFAttributedStringGetString( - aStr, + return _CFBundleCopyExecutableURL( + bundle, ); } - late final _CFAttributedStringGetStringPtr = - _lookup>( - 'CFAttributedStringGetString'); - late final _CFAttributedStringGetString = _CFAttributedStringGetStringPtr - .asFunction(); + late final _CFBundleCopyExecutableURLPtr = + _lookup>( + 'CFBundleCopyExecutableURL'); + late final _CFBundleCopyExecutableURL = _CFBundleCopyExecutableURLPtr + .asFunction(); - int CFAttributedStringGetLength( - CFAttributedStringRef aStr, + CFArrayRef CFBundleCopyExecutableArchitectures( + CFBundleRef bundle, ) { - return _CFAttributedStringGetLength( - aStr, + return _CFBundleCopyExecutableArchitectures( + bundle, ); } - late final _CFAttributedStringGetLengthPtr = - _lookup>( - 'CFAttributedStringGetLength'); - late final _CFAttributedStringGetLength = _CFAttributedStringGetLengthPtr - .asFunction(); + late final _CFBundleCopyExecutableArchitecturesPtr = + _lookup>( + 'CFBundleCopyExecutableArchitectures'); + late final _CFBundleCopyExecutableArchitectures = + _CFBundleCopyExecutableArchitecturesPtr.asFunction< + CFArrayRef Function(CFBundleRef)>(); - CFDictionaryRef CFAttributedStringGetAttributes( - CFAttributedStringRef aStr, - int loc, - ffi.Pointer effectiveRange, + int CFBundlePreflightExecutable( + CFBundleRef bundle, + ffi.Pointer error, ) { - return _CFAttributedStringGetAttributes( - aStr, - loc, - effectiveRange, + return _CFBundlePreflightExecutable( + bundle, + error, ); } - late final _CFAttributedStringGetAttributesPtr = _lookup< + late final _CFBundlePreflightExecutablePtr = _lookup< ffi.NativeFunction< - CFDictionaryRef Function(CFAttributedStringRef, CFIndex, - ffi.Pointer)>>('CFAttributedStringGetAttributes'); - late final _CFAttributedStringGetAttributes = - _CFAttributedStringGetAttributesPtr.asFunction< - CFDictionaryRef Function( - CFAttributedStringRef, int, ffi.Pointer)>(); + Boolean Function(CFBundleRef, + ffi.Pointer)>>('CFBundlePreflightExecutable'); + late final _CFBundlePreflightExecutable = _CFBundlePreflightExecutablePtr + .asFunction)>(); - CFTypeRef CFAttributedStringGetAttribute( - CFAttributedStringRef aStr, - int loc, - CFStringRef attrName, - ffi.Pointer effectiveRange, + int CFBundleLoadExecutableAndReturnError( + CFBundleRef bundle, + ffi.Pointer error, ) { - return _CFAttributedStringGetAttribute( - aStr, - loc, - attrName, - effectiveRange, + return _CFBundleLoadExecutableAndReturnError( + bundle, + error, ); } - late final _CFAttributedStringGetAttributePtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFAttributedStringRef, CFIndex, CFStringRef, - ffi.Pointer)>>('CFAttributedStringGetAttribute'); - late final _CFAttributedStringGetAttribute = - _CFAttributedStringGetAttributePtr.asFunction< - CFTypeRef Function( - CFAttributedStringRef, int, CFStringRef, ffi.Pointer)>(); + late final _CFBundleLoadExecutableAndReturnErrorPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBundleRef, ffi.Pointer)>>( + 'CFBundleLoadExecutableAndReturnError'); + late final _CFBundleLoadExecutableAndReturnError = + _CFBundleLoadExecutableAndReturnErrorPtr.asFunction< + int Function(CFBundleRef, ffi.Pointer)>(); - CFDictionaryRef CFAttributedStringGetAttributesAndLongestEffectiveRange( - CFAttributedStringRef aStr, - int loc, - CFRange inRange, - ffi.Pointer longestEffectiveRange, + int CFBundleLoadExecutable( + CFBundleRef bundle, ) { - return _CFAttributedStringGetAttributesAndLongestEffectiveRange( - aStr, - loc, - inRange, - longestEffectiveRange, + return _CFBundleLoadExecutable( + bundle, ); } - late final _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr = - _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFAttributedStringRef, CFIndex, - CFRange, ffi.Pointer)>>( - 'CFAttributedStringGetAttributesAndLongestEffectiveRange'); - late final _CFAttributedStringGetAttributesAndLongestEffectiveRange = - _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr.asFunction< - CFDictionaryRef Function( - CFAttributedStringRef, int, CFRange, ffi.Pointer)>(); + late final _CFBundleLoadExecutablePtr = + _lookup>( + 'CFBundleLoadExecutable'); + late final _CFBundleLoadExecutable = + _CFBundleLoadExecutablePtr.asFunction(); - CFTypeRef CFAttributedStringGetAttributeAndLongestEffectiveRange( - CFAttributedStringRef aStr, - int loc, - CFStringRef attrName, - CFRange inRange, - ffi.Pointer longestEffectiveRange, + int CFBundleIsExecutableLoaded( + CFBundleRef bundle, ) { - return _CFAttributedStringGetAttributeAndLongestEffectiveRange( - aStr, - loc, - attrName, - inRange, - longestEffectiveRange, + return _CFBundleIsExecutableLoaded( + bundle, ); } - late final _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr = - _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFAttributedStringRef, CFIndex, - CFStringRef, CFRange, ffi.Pointer)>>( - 'CFAttributedStringGetAttributeAndLongestEffectiveRange'); - late final _CFAttributedStringGetAttributeAndLongestEffectiveRange = - _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr.asFunction< - CFTypeRef Function(CFAttributedStringRef, int, CFStringRef, CFRange, - ffi.Pointer)>(); + late final _CFBundleIsExecutableLoadedPtr = + _lookup>( + 'CFBundleIsExecutableLoaded'); + late final _CFBundleIsExecutableLoaded = + _CFBundleIsExecutableLoadedPtr.asFunction(); - CFMutableAttributedStringRef CFAttributedStringCreateMutableCopy( - CFAllocatorRef alloc, - int maxLength, - CFAttributedStringRef aStr, + void CFBundleUnloadExecutable( + CFBundleRef bundle, ) { - return _CFAttributedStringCreateMutableCopy( - alloc, - maxLength, - aStr, + return _CFBundleUnloadExecutable( + bundle, ); } - late final _CFAttributedStringCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableAttributedStringRef Function(CFAllocatorRef, CFIndex, - CFAttributedStringRef)>>('CFAttributedStringCreateMutableCopy'); - late final _CFAttributedStringCreateMutableCopy = - _CFAttributedStringCreateMutableCopyPtr.asFunction< - CFMutableAttributedStringRef Function( - CFAllocatorRef, int, CFAttributedStringRef)>(); + late final _CFBundleUnloadExecutablePtr = + _lookup>( + 'CFBundleUnloadExecutable'); + late final _CFBundleUnloadExecutable = + _CFBundleUnloadExecutablePtr.asFunction(); - CFMutableAttributedStringRef CFAttributedStringCreateMutable( - CFAllocatorRef alloc, - int maxLength, + ffi.Pointer CFBundleGetFunctionPointerForName( + CFBundleRef bundle, + CFStringRef functionName, ) { - return _CFAttributedStringCreateMutable( - alloc, - maxLength, + return _CFBundleGetFunctionPointerForName( + bundle, + functionName, ); } - late final _CFAttributedStringCreateMutablePtr = _lookup< + late final _CFBundleGetFunctionPointerForNamePtr = _lookup< ffi.NativeFunction< - CFMutableAttributedStringRef Function( - CFAllocatorRef, CFIndex)>>('CFAttributedStringCreateMutable'); - late final _CFAttributedStringCreateMutable = - _CFAttributedStringCreateMutablePtr.asFunction< - CFMutableAttributedStringRef Function(CFAllocatorRef, int)>(); + ffi.Pointer Function( + CFBundleRef, CFStringRef)>>('CFBundleGetFunctionPointerForName'); + late final _CFBundleGetFunctionPointerForName = + _CFBundleGetFunctionPointerForNamePtr.asFunction< + ffi.Pointer Function(CFBundleRef, CFStringRef)>(); - void CFAttributedStringReplaceString( - CFMutableAttributedStringRef aStr, - CFRange range, - CFStringRef replacement, + void CFBundleGetFunctionPointersForNames( + CFBundleRef bundle, + CFArrayRef functionNames, + ffi.Pointer> ftbl, ) { - return _CFAttributedStringReplaceString( - aStr, - range, - replacement, + return _CFBundleGetFunctionPointersForNames( + bundle, + functionNames, + ftbl, ); } - late final _CFAttributedStringReplaceStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFStringRef)>>('CFAttributedStringReplaceString'); - late final _CFAttributedStringReplaceString = - _CFAttributedStringReplaceStringPtr.asFunction< - void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); - - CFMutableStringRef CFAttributedStringGetMutableString( - CFMutableAttributedStringRef aStr, - ) { - return _CFAttributedStringGetMutableString( - aStr, - ); - } - - late final _CFAttributedStringGetMutableStringPtr = _lookup< + late final _CFBundleGetFunctionPointersForNamesPtr = _lookup< ffi.NativeFunction< - CFMutableStringRef Function(CFMutableAttributedStringRef)>>( - 'CFAttributedStringGetMutableString'); - late final _CFAttributedStringGetMutableString = - _CFAttributedStringGetMutableStringPtr.asFunction< - CFMutableStringRef Function(CFMutableAttributedStringRef)>(); + ffi.Void Function(CFBundleRef, CFArrayRef, + ffi.Pointer>)>>( + 'CFBundleGetFunctionPointersForNames'); + late final _CFBundleGetFunctionPointersForNames = + _CFBundleGetFunctionPointersForNamesPtr.asFunction< + void Function( + CFBundleRef, CFArrayRef, ffi.Pointer>)>(); - void CFAttributedStringSetAttributes( - CFMutableAttributedStringRef aStr, - CFRange range, - CFDictionaryRef replacement, - int clearOtherAttributes, + ffi.Pointer CFBundleGetDataPointerForName( + CFBundleRef bundle, + CFStringRef symbolName, ) { - return _CFAttributedStringSetAttributes( - aStr, - range, - replacement, - clearOtherAttributes, + return _CFBundleGetDataPointerForName( + bundle, + symbolName, ); } - late final _CFAttributedStringSetAttributesPtr = _lookup< + late final _CFBundleGetDataPointerForNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFDictionaryRef, Boolean)>>('CFAttributedStringSetAttributes'); - late final _CFAttributedStringSetAttributes = - _CFAttributedStringSetAttributesPtr.asFunction< - void Function( - CFMutableAttributedStringRef, CFRange, CFDictionaryRef, int)>(); + ffi.Pointer Function( + CFBundleRef, CFStringRef)>>('CFBundleGetDataPointerForName'); + late final _CFBundleGetDataPointerForName = _CFBundleGetDataPointerForNamePtr + .asFunction Function(CFBundleRef, CFStringRef)>(); - void CFAttributedStringSetAttribute( - CFMutableAttributedStringRef aStr, - CFRange range, - CFStringRef attrName, - CFTypeRef value, + void CFBundleGetDataPointersForNames( + CFBundleRef bundle, + CFArrayRef symbolNames, + ffi.Pointer> stbl, ) { - return _CFAttributedStringSetAttribute( - aStr, - range, - attrName, - value, + return _CFBundleGetDataPointersForNames( + bundle, + symbolNames, + stbl, ); } - late final _CFAttributedStringSetAttributePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, CFStringRef, - CFTypeRef)>>('CFAttributedStringSetAttribute'); - late final _CFAttributedStringSetAttribute = - _CFAttributedStringSetAttributePtr.asFunction< + late final _CFBundleGetDataPointersForNamesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBundleRef, CFArrayRef, + ffi.Pointer>)>>( + 'CFBundleGetDataPointersForNames'); + late final _CFBundleGetDataPointersForNames = + _CFBundleGetDataPointersForNamesPtr.asFunction< void Function( - CFMutableAttributedStringRef, CFRange, CFStringRef, CFTypeRef)>(); + CFBundleRef, CFArrayRef, ffi.Pointer>)>(); - void CFAttributedStringRemoveAttribute( - CFMutableAttributedStringRef aStr, - CFRange range, - CFStringRef attrName, + CFURLRef CFBundleCopyAuxiliaryExecutableURL( + CFBundleRef bundle, + CFStringRef executableName, ) { - return _CFAttributedStringRemoveAttribute( - aStr, - range, - attrName, + return _CFBundleCopyAuxiliaryExecutableURL( + bundle, + executableName, ); } - late final _CFAttributedStringRemoveAttributePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFStringRef)>>('CFAttributedStringRemoveAttribute'); - late final _CFAttributedStringRemoveAttribute = - _CFAttributedStringRemoveAttributePtr.asFunction< - void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); + late final _CFBundleCopyAuxiliaryExecutableURLPtr = + _lookup>( + 'CFBundleCopyAuxiliaryExecutableURL'); + late final _CFBundleCopyAuxiliaryExecutableURL = + _CFBundleCopyAuxiliaryExecutableURLPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef)>(); - void CFAttributedStringReplaceAttributedString( - CFMutableAttributedStringRef aStr, - CFRange range, - CFAttributedStringRef replacement, + int CFBundleIsExecutableLoadable( + CFBundleRef bundle, ) { - return _CFAttributedStringReplaceAttributedString( - aStr, - range, - replacement, + return _CFBundleIsExecutableLoadable( + bundle, ); } - late final _CFAttributedStringReplaceAttributedStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFAttributedStringRef)>>( - 'CFAttributedStringReplaceAttributedString'); - late final _CFAttributedStringReplaceAttributedString = - _CFAttributedStringReplaceAttributedStringPtr.asFunction< - void Function( - CFMutableAttributedStringRef, CFRange, CFAttributedStringRef)>(); + late final _CFBundleIsExecutableLoadablePtr = + _lookup>( + 'CFBundleIsExecutableLoadable'); + late final _CFBundleIsExecutableLoadable = + _CFBundleIsExecutableLoadablePtr.asFunction(); - void CFAttributedStringBeginEditing( - CFMutableAttributedStringRef aStr, + int CFBundleIsExecutableLoadableForURL( + CFURLRef url, ) { - return _CFAttributedStringBeginEditing( - aStr, + return _CFBundleIsExecutableLoadableForURL( + url, ); } - late final _CFAttributedStringBeginEditingPtr = _lookup< - ffi.NativeFunction>( - 'CFAttributedStringBeginEditing'); - late final _CFAttributedStringBeginEditing = - _CFAttributedStringBeginEditingPtr.asFunction< - void Function(CFMutableAttributedStringRef)>(); + late final _CFBundleIsExecutableLoadableForURLPtr = + _lookup>( + 'CFBundleIsExecutableLoadableForURL'); + late final _CFBundleIsExecutableLoadableForURL = + _CFBundleIsExecutableLoadableForURLPtr.asFunction< + int Function(CFURLRef)>(); - void CFAttributedStringEndEditing( - CFMutableAttributedStringRef aStr, + int CFBundleIsArchitectureLoadable( + int arch, ) { - return _CFAttributedStringEndEditing( - aStr, + return _CFBundleIsArchitectureLoadable( + arch, ); } - late final _CFAttributedStringEndEditingPtr = _lookup< - ffi.NativeFunction>( - 'CFAttributedStringEndEditing'); - late final _CFAttributedStringEndEditing = _CFAttributedStringEndEditingPtr - .asFunction(); - - int CFURLEnumeratorGetTypeID() { - return _CFURLEnumeratorGetTypeID(); - } - - late final _CFURLEnumeratorGetTypeIDPtr = - _lookup>( - 'CFURLEnumeratorGetTypeID'); - late final _CFURLEnumeratorGetTypeID = - _CFURLEnumeratorGetTypeIDPtr.asFunction(); + late final _CFBundleIsArchitectureLoadablePtr = + _lookup>( + 'CFBundleIsArchitectureLoadable'); + late final _CFBundleIsArchitectureLoadable = + _CFBundleIsArchitectureLoadablePtr.asFunction(); - CFURLEnumeratorRef CFURLEnumeratorCreateForDirectoryURL( - CFAllocatorRef alloc, - CFURLRef directoryURL, - int option, - CFArrayRef propertyKeys, + CFPlugInRef CFBundleGetPlugIn( + CFBundleRef bundle, ) { - return _CFURLEnumeratorCreateForDirectoryURL( - alloc, - directoryURL, - option, - propertyKeys, + return _CFBundleGetPlugIn( + bundle, ); } - late final _CFURLEnumeratorCreateForDirectoryURLPtr = _lookup< - ffi.NativeFunction< - CFURLEnumeratorRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, - CFArrayRef)>>('CFURLEnumeratorCreateForDirectoryURL'); - late final _CFURLEnumeratorCreateForDirectoryURL = - _CFURLEnumeratorCreateForDirectoryURLPtr.asFunction< - CFURLEnumeratorRef Function( - CFAllocatorRef, CFURLRef, int, CFArrayRef)>(); + late final _CFBundleGetPlugInPtr = + _lookup>( + 'CFBundleGetPlugIn'); + late final _CFBundleGetPlugIn = + _CFBundleGetPlugInPtr.asFunction(); - CFURLEnumeratorRef CFURLEnumeratorCreateForMountedVolumes( - CFAllocatorRef alloc, - int option, - CFArrayRef propertyKeys, + int CFBundleOpenBundleResourceMap( + CFBundleRef bundle, ) { - return _CFURLEnumeratorCreateForMountedVolumes( - alloc, - option, - propertyKeys, + return _CFBundleOpenBundleResourceMap( + bundle, ); } - late final _CFURLEnumeratorCreateForMountedVolumesPtr = _lookup< - ffi.NativeFunction< - CFURLEnumeratorRef Function(CFAllocatorRef, ffi.Int32, - CFArrayRef)>>('CFURLEnumeratorCreateForMountedVolumes'); - late final _CFURLEnumeratorCreateForMountedVolumes = - _CFURLEnumeratorCreateForMountedVolumesPtr.asFunction< - CFURLEnumeratorRef Function(CFAllocatorRef, int, CFArrayRef)>(); + late final _CFBundleOpenBundleResourceMapPtr = + _lookup>( + 'CFBundleOpenBundleResourceMap'); + late final _CFBundleOpenBundleResourceMap = + _CFBundleOpenBundleResourceMapPtr.asFunction(); - int CFURLEnumeratorGetNextURL( - CFURLEnumeratorRef enumerator, - ffi.Pointer url, - ffi.Pointer error, + int CFBundleOpenBundleResourceFiles( + CFBundleRef bundle, + ffi.Pointer refNum, + ffi.Pointer localizedRefNum, ) { - return _CFURLEnumeratorGetNextURL( - enumerator, - url, - error, + return _CFBundleOpenBundleResourceFiles( + bundle, + refNum, + localizedRefNum, ); } - late final _CFURLEnumeratorGetNextURLPtr = _lookup< + late final _CFBundleOpenBundleResourceFilesPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFURLEnumeratorRef, ffi.Pointer, - ffi.Pointer)>>('CFURLEnumeratorGetNextURL'); - late final _CFURLEnumeratorGetNextURL = - _CFURLEnumeratorGetNextURLPtr.asFunction< - int Function(CFURLEnumeratorRef, ffi.Pointer, - ffi.Pointer)>(); + SInt32 Function(CFBundleRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleOpenBundleResourceFiles'); + late final _CFBundleOpenBundleResourceFiles = + _CFBundleOpenBundleResourceFilesPtr.asFunction< + int Function(CFBundleRef, ffi.Pointer, + ffi.Pointer)>(); - void CFURLEnumeratorSkipDescendents( - CFURLEnumeratorRef enumerator, + void CFBundleCloseBundleResourceMap( + CFBundleRef bundle, + int refNum, ) { - return _CFURLEnumeratorSkipDescendents( - enumerator, + return _CFBundleCloseBundleResourceMap( + bundle, + refNum, ); } - late final _CFURLEnumeratorSkipDescendentsPtr = - _lookup>( - 'CFURLEnumeratorSkipDescendents'); - late final _CFURLEnumeratorSkipDescendents = - _CFURLEnumeratorSkipDescendentsPtr.asFunction< - void Function(CFURLEnumeratorRef)>(); + late final _CFBundleCloseBundleResourceMapPtr = _lookup< + ffi.NativeFunction>( + 'CFBundleCloseBundleResourceMap'); + late final _CFBundleCloseBundleResourceMap = + _CFBundleCloseBundleResourceMapPtr.asFunction< + void Function(CFBundleRef, int)>(); - int CFURLEnumeratorGetDescendentLevel( - CFURLEnumeratorRef enumerator, - ) { - return _CFURLEnumeratorGetDescendentLevel( - enumerator, - ); + int CFMessagePortGetTypeID() { + return _CFMessagePortGetTypeID(); } - late final _CFURLEnumeratorGetDescendentLevelPtr = - _lookup>( - 'CFURLEnumeratorGetDescendentLevel'); - late final _CFURLEnumeratorGetDescendentLevel = - _CFURLEnumeratorGetDescendentLevelPtr.asFunction< - int Function(CFURLEnumeratorRef)>(); + late final _CFMessagePortGetTypeIDPtr = + _lookup>( + 'CFMessagePortGetTypeID'); + late final _CFMessagePortGetTypeID = + _CFMessagePortGetTypeIDPtr.asFunction(); - int CFURLEnumeratorGetSourceDidChange( - CFURLEnumeratorRef enumerator, + CFMessagePortRef CFMessagePortCreateLocal( + CFAllocatorRef allocator, + CFStringRef name, + CFMessagePortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, ) { - return _CFURLEnumeratorGetSourceDidChange( - enumerator, + return _CFMessagePortCreateLocal( + allocator, + name, + callout, + context, + shouldFreeInfo, ); } - late final _CFURLEnumeratorGetSourceDidChangePtr = - _lookup>( - 'CFURLEnumeratorGetSourceDidChange'); - late final _CFURLEnumeratorGetSourceDidChange = - _CFURLEnumeratorGetSourceDidChangePtr.asFunction< - int Function(CFURLEnumeratorRef)>(); + late final _CFMessagePortCreateLocalPtr = _lookup< + ffi.NativeFunction< + CFMessagePortRef Function( + CFAllocatorRef, + CFStringRef, + CFMessagePortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMessagePortCreateLocal'); + late final _CFMessagePortCreateLocal = + _CFMessagePortCreateLocalPtr.asFunction< + CFMessagePortRef Function( + CFAllocatorRef, + CFStringRef, + CFMessagePortCallBack, + ffi.Pointer, + ffi.Pointer)>(); - acl_t acl_dup( - acl_t acl, + CFMessagePortRef CFMessagePortCreateRemote( + CFAllocatorRef allocator, + CFStringRef name, ) { - return _acl_dup( - acl, + return _CFMessagePortCreateRemote( + allocator, + name, ); } - late final _acl_dupPtr = - _lookup>('acl_dup'); - late final _acl_dup = _acl_dupPtr.asFunction(); + late final _CFMessagePortCreateRemotePtr = _lookup< + ffi.NativeFunction< + CFMessagePortRef Function( + CFAllocatorRef, CFStringRef)>>('CFMessagePortCreateRemote'); + late final _CFMessagePortCreateRemote = _CFMessagePortCreateRemotePtr + .asFunction(); - int acl_free( - ffi.Pointer obj_p, + int CFMessagePortIsRemote( + CFMessagePortRef ms, ) { - return _acl_free( - obj_p, + return _CFMessagePortIsRemote( + ms, ); } - late final _acl_freePtr = - _lookup)>>( - 'acl_free'); - late final _acl_free = - _acl_freePtr.asFunction)>(); + late final _CFMessagePortIsRemotePtr = + _lookup>( + 'CFMessagePortIsRemote'); + late final _CFMessagePortIsRemote = + _CFMessagePortIsRemotePtr.asFunction(); - acl_t acl_init( - int count, + CFStringRef CFMessagePortGetName( + CFMessagePortRef ms, ) { - return _acl_init( - count, + return _CFMessagePortGetName( + ms, ); } - late final _acl_initPtr = - _lookup>('acl_init'); - late final _acl_init = _acl_initPtr.asFunction(); + late final _CFMessagePortGetNamePtr = + _lookup>( + 'CFMessagePortGetName'); + late final _CFMessagePortGetName = _CFMessagePortGetNamePtr.asFunction< + CFStringRef Function(CFMessagePortRef)>(); - int acl_copy_entry( - acl_entry_t dest_d, - acl_entry_t src_d, + int CFMessagePortSetName( + CFMessagePortRef ms, + CFStringRef newName, ) { - return _acl_copy_entry( - dest_d, - src_d, + return _CFMessagePortSetName( + ms, + newName, ); } - late final _acl_copy_entryPtr = - _lookup>( - 'acl_copy_entry'); - late final _acl_copy_entry = - _acl_copy_entryPtr.asFunction(); + late final _CFMessagePortSetNamePtr = _lookup< + ffi.NativeFunction>( + 'CFMessagePortSetName'); + late final _CFMessagePortSetName = _CFMessagePortSetNamePtr.asFunction< + int Function(CFMessagePortRef, CFStringRef)>(); - int acl_create_entry( - ffi.Pointer acl_p, - ffi.Pointer entry_p, + void CFMessagePortGetContext( + CFMessagePortRef ms, + ffi.Pointer context, ) { - return _acl_create_entry( - acl_p, - entry_p, + return _CFMessagePortGetContext( + ms, + context, ); } - late final _acl_create_entryPtr = _lookup< + late final _CFMessagePortGetContextPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('acl_create_entry'); - late final _acl_create_entry = _acl_create_entryPtr - .asFunction, ffi.Pointer)>(); + ffi.Void Function(CFMessagePortRef, + ffi.Pointer)>>('CFMessagePortGetContext'); + late final _CFMessagePortGetContext = _CFMessagePortGetContextPtr.asFunction< + void Function(CFMessagePortRef, ffi.Pointer)>(); - int acl_create_entry_np( - ffi.Pointer acl_p, - ffi.Pointer entry_p, - int entry_index, + void CFMessagePortInvalidate( + CFMessagePortRef ms, ) { - return _acl_create_entry_np( - acl_p, - entry_p, - entry_index, + return _CFMessagePortInvalidate( + ms, ); } - late final _acl_create_entry_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('acl_create_entry_np'); - late final _acl_create_entry_np = _acl_create_entry_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _CFMessagePortInvalidatePtr = + _lookup>( + 'CFMessagePortInvalidate'); + late final _CFMessagePortInvalidate = + _CFMessagePortInvalidatePtr.asFunction(); - int acl_delete_entry( - acl_t acl, - acl_entry_t entry_d, + int CFMessagePortIsValid( + CFMessagePortRef ms, ) { - return _acl_delete_entry( - acl, - entry_d, + return _CFMessagePortIsValid( + ms, ); } - late final _acl_delete_entryPtr = - _lookup>( - 'acl_delete_entry'); - late final _acl_delete_entry = - _acl_delete_entryPtr.asFunction(); + late final _CFMessagePortIsValidPtr = + _lookup>( + 'CFMessagePortIsValid'); + late final _CFMessagePortIsValid = + _CFMessagePortIsValidPtr.asFunction(); - int acl_get_entry( - acl_t acl, - int entry_id, - ffi.Pointer entry_p, + CFMessagePortInvalidationCallBack CFMessagePortGetInvalidationCallBack( + CFMessagePortRef ms, ) { - return _acl_get_entry( - acl, - entry_id, - entry_p, + return _CFMessagePortGetInvalidationCallBack( + ms, ); } - late final _acl_get_entryPtr = _lookup< + late final _CFMessagePortGetInvalidationCallBackPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - acl_t, ffi.Int, ffi.Pointer)>>('acl_get_entry'); - late final _acl_get_entry = _acl_get_entryPtr - .asFunction)>(); - - int acl_valid( - acl_t acl, - ) { - return _acl_valid( - acl, - ); - } - - late final _acl_validPtr = - _lookup>('acl_valid'); - late final _acl_valid = _acl_validPtr.asFunction(); + CFMessagePortInvalidationCallBack Function( + CFMessagePortRef)>>('CFMessagePortGetInvalidationCallBack'); + late final _CFMessagePortGetInvalidationCallBack = + _CFMessagePortGetInvalidationCallBackPtr.asFunction< + CFMessagePortInvalidationCallBack Function(CFMessagePortRef)>(); - int acl_valid_fd_np( - int fd, - int type, - acl_t acl, + void CFMessagePortSetInvalidationCallBack( + CFMessagePortRef ms, + CFMessagePortInvalidationCallBack callout, ) { - return _acl_valid_fd_np( - fd, - type, - acl, + return _CFMessagePortSetInvalidationCallBack( + ms, + callout, ); } - late final _acl_valid_fd_npPtr = - _lookup>( - 'acl_valid_fd_np'); - late final _acl_valid_fd_np = - _acl_valid_fd_npPtr.asFunction(); + late final _CFMessagePortSetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMessagePortRef, CFMessagePortInvalidationCallBack)>>( + 'CFMessagePortSetInvalidationCallBack'); + late final _CFMessagePortSetInvalidationCallBack = + _CFMessagePortSetInvalidationCallBackPtr.asFunction< + void Function(CFMessagePortRef, CFMessagePortInvalidationCallBack)>(); - int acl_valid_file_np( - ffi.Pointer path, - int type, - acl_t acl, + int CFMessagePortSendRequest( + CFMessagePortRef remote, + int msgid, + CFDataRef data, + double sendTimeout, + double rcvTimeout, + CFStringRef replyMode, + ffi.Pointer returnData, ) { - return _acl_valid_file_np( - path, - type, - acl, + return _CFMessagePortSendRequest( + remote, + msgid, + data, + sendTimeout, + rcvTimeout, + replyMode, + returnData, ); } - late final _acl_valid_file_npPtr = _lookup< + late final _CFMessagePortSendRequestPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int32, acl_t)>>('acl_valid_file_np'); - late final _acl_valid_file_np = _acl_valid_file_npPtr - .asFunction, int, acl_t)>(); + SInt32 Function( + CFMessagePortRef, + SInt32, + CFDataRef, + CFTimeInterval, + CFTimeInterval, + CFStringRef, + ffi.Pointer)>>('CFMessagePortSendRequest'); + late final _CFMessagePortSendRequest = + _CFMessagePortSendRequestPtr.asFunction< + int Function(CFMessagePortRef, int, CFDataRef, double, double, + CFStringRef, ffi.Pointer)>(); - int acl_valid_link_np( - ffi.Pointer path, - int type, - acl_t acl, + CFRunLoopSourceRef CFMessagePortCreateRunLoopSource( + CFAllocatorRef allocator, + CFMessagePortRef local, + int order, ) { - return _acl_valid_link_np( - path, - type, - acl, + return _CFMessagePortCreateRunLoopSource( + allocator, + local, + order, ); } - late final _acl_valid_link_npPtr = _lookup< + late final _CFMessagePortCreateRunLoopSourcePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int32, acl_t)>>('acl_valid_link_np'); - late final _acl_valid_link_np = _acl_valid_link_npPtr - .asFunction, int, acl_t)>(); + CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, + CFIndex)>>('CFMessagePortCreateRunLoopSource'); + late final _CFMessagePortCreateRunLoopSource = + _CFMessagePortCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, int)>(); - int acl_add_perm( - acl_permset_t permset_d, - int perm, + void CFMessagePortSetDispatchQueue( + CFMessagePortRef ms, + dispatch_queue_t queue, ) { - return _acl_add_perm( - permset_d, - perm, + return _CFMessagePortSetDispatchQueue( + ms, + queue, ); } - late final _acl_add_permPtr = - _lookup>( - 'acl_add_perm'); - late final _acl_add_perm = - _acl_add_permPtr.asFunction(); + late final _CFMessagePortSetDispatchQueuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMessagePortRef, + dispatch_queue_t)>>('CFMessagePortSetDispatchQueue'); + late final _CFMessagePortSetDispatchQueue = _CFMessagePortSetDispatchQueuePtr + .asFunction(); - int acl_calc_mask( - ffi.Pointer acl_p, - ) { - return _acl_calc_mask( - acl_p, - ); + late final ffi.Pointer _kCFPlugInDynamicRegistrationKey = + _lookup('kCFPlugInDynamicRegistrationKey'); + + CFStringRef get kCFPlugInDynamicRegistrationKey => + _kCFPlugInDynamicRegistrationKey.value; + + set kCFPlugInDynamicRegistrationKey(CFStringRef value) => + _kCFPlugInDynamicRegistrationKey.value = value; + + late final ffi.Pointer _kCFPlugInDynamicRegisterFunctionKey = + _lookup('kCFPlugInDynamicRegisterFunctionKey'); + + CFStringRef get kCFPlugInDynamicRegisterFunctionKey => + _kCFPlugInDynamicRegisterFunctionKey.value; + + set kCFPlugInDynamicRegisterFunctionKey(CFStringRef value) => + _kCFPlugInDynamicRegisterFunctionKey.value = value; + + late final ffi.Pointer _kCFPlugInUnloadFunctionKey = + _lookup('kCFPlugInUnloadFunctionKey'); + + CFStringRef get kCFPlugInUnloadFunctionKey => + _kCFPlugInUnloadFunctionKey.value; + + set kCFPlugInUnloadFunctionKey(CFStringRef value) => + _kCFPlugInUnloadFunctionKey.value = value; + + late final ffi.Pointer _kCFPlugInFactoriesKey = + _lookup('kCFPlugInFactoriesKey'); + + CFStringRef get kCFPlugInFactoriesKey => _kCFPlugInFactoriesKey.value; + + set kCFPlugInFactoriesKey(CFStringRef value) => + _kCFPlugInFactoriesKey.value = value; + + late final ffi.Pointer _kCFPlugInTypesKey = + _lookup('kCFPlugInTypesKey'); + + CFStringRef get kCFPlugInTypesKey => _kCFPlugInTypesKey.value; + + set kCFPlugInTypesKey(CFStringRef value) => _kCFPlugInTypesKey.value = value; + + int CFPlugInGetTypeID() { + return _CFPlugInGetTypeID(); } - late final _acl_calc_maskPtr = - _lookup)>>( - 'acl_calc_mask'); - late final _acl_calc_mask = - _acl_calc_maskPtr.asFunction)>(); + late final _CFPlugInGetTypeIDPtr = + _lookup>('CFPlugInGetTypeID'); + late final _CFPlugInGetTypeID = + _CFPlugInGetTypeIDPtr.asFunction(); - int acl_clear_perms( - acl_permset_t permset_d, + CFPlugInRef CFPlugInCreate( + CFAllocatorRef allocator, + CFURLRef plugInURL, ) { - return _acl_clear_perms( - permset_d, + return _CFPlugInCreate( + allocator, + plugInURL, ); } - late final _acl_clear_permsPtr = - _lookup>( - 'acl_clear_perms'); - late final _acl_clear_perms = - _acl_clear_permsPtr.asFunction(); + late final _CFPlugInCreatePtr = _lookup< + ffi.NativeFunction>( + 'CFPlugInCreate'); + late final _CFPlugInCreate = _CFPlugInCreatePtr.asFunction< + CFPlugInRef Function(CFAllocatorRef, CFURLRef)>(); - int acl_delete_perm( - acl_permset_t permset_d, - int perm, + CFBundleRef CFPlugInGetBundle( + CFPlugInRef plugIn, ) { - return _acl_delete_perm( - permset_d, - perm, + return _CFPlugInGetBundle( + plugIn, ); } - late final _acl_delete_permPtr = - _lookup>( - 'acl_delete_perm'); - late final _acl_delete_perm = - _acl_delete_permPtr.asFunction(); + late final _CFPlugInGetBundlePtr = + _lookup>( + 'CFPlugInGetBundle'); + late final _CFPlugInGetBundle = + _CFPlugInGetBundlePtr.asFunction(); - int acl_get_perm_np( - acl_permset_t permset_d, - int perm, + void CFPlugInSetLoadOnDemand( + CFPlugInRef plugIn, + int flag, ) { - return _acl_get_perm_np( - permset_d, - perm, + return _CFPlugInSetLoadOnDemand( + plugIn, + flag, ); } - late final _acl_get_perm_npPtr = - _lookup>( - 'acl_get_perm_np'); - late final _acl_get_perm_np = - _acl_get_perm_npPtr.asFunction(); + late final _CFPlugInSetLoadOnDemandPtr = + _lookup>( + 'CFPlugInSetLoadOnDemand'); + late final _CFPlugInSetLoadOnDemand = + _CFPlugInSetLoadOnDemandPtr.asFunction(); - int acl_get_permset( - acl_entry_t entry_d, - ffi.Pointer permset_p, + int CFPlugInIsLoadOnDemand( + CFPlugInRef plugIn, ) { - return _acl_get_permset( - entry_d, - permset_p, + return _CFPlugInIsLoadOnDemand( + plugIn, ); } - late final _acl_get_permsetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - acl_entry_t, ffi.Pointer)>>('acl_get_permset'); - late final _acl_get_permset = _acl_get_permsetPtr - .asFunction)>(); + late final _CFPlugInIsLoadOnDemandPtr = + _lookup>( + 'CFPlugInIsLoadOnDemand'); + late final _CFPlugInIsLoadOnDemand = + _CFPlugInIsLoadOnDemandPtr.asFunction(); - int acl_set_permset( - acl_entry_t entry_d, - acl_permset_t permset_d, + CFArrayRef CFPlugInFindFactoriesForPlugInType( + CFUUIDRef typeUUID, ) { - return _acl_set_permset( - entry_d, - permset_d, + return _CFPlugInFindFactoriesForPlugInType( + typeUUID, ); } - late final _acl_set_permsetPtr = - _lookup>( - 'acl_set_permset'); - late final _acl_set_permset = _acl_set_permsetPtr - .asFunction(); + late final _CFPlugInFindFactoriesForPlugInTypePtr = + _lookup>( + 'CFPlugInFindFactoriesForPlugInType'); + late final _CFPlugInFindFactoriesForPlugInType = + _CFPlugInFindFactoriesForPlugInTypePtr.asFunction< + CFArrayRef Function(CFUUIDRef)>(); - int acl_maximal_permset_mask_np( - ffi.Pointer mask_p, + CFArrayRef CFPlugInFindFactoriesForPlugInTypeInPlugIn( + CFUUIDRef typeUUID, + CFPlugInRef plugIn, ) { - return _acl_maximal_permset_mask_np( - mask_p, + return _CFPlugInFindFactoriesForPlugInTypeInPlugIn( + typeUUID, + plugIn, ); } - late final _acl_maximal_permset_mask_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer)>>('acl_maximal_permset_mask_np'); - late final _acl_maximal_permset_mask_np = _acl_maximal_permset_mask_npPtr - .asFunction)>(); + late final _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr = + _lookup>( + 'CFPlugInFindFactoriesForPlugInTypeInPlugIn'); + late final _CFPlugInFindFactoriesForPlugInTypeInPlugIn = + _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr.asFunction< + CFArrayRef Function(CFUUIDRef, CFPlugInRef)>(); - int acl_get_permset_mask_np( - acl_entry_t entry_d, - ffi.Pointer mask_p, + ffi.Pointer CFPlugInInstanceCreate( + CFAllocatorRef allocator, + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, ) { - return _acl_get_permset_mask_np( - entry_d, - mask_p, + return _CFPlugInInstanceCreate( + allocator, + factoryUUID, + typeUUID, ); } - late final _acl_get_permset_mask_npPtr = _lookup< + late final _CFPlugInInstanceCreatePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(acl_entry_t, - ffi.Pointer)>>('acl_get_permset_mask_np'); - late final _acl_get_permset_mask_np = _acl_get_permset_mask_npPtr - .asFunction)>(); + ffi.Pointer Function( + CFAllocatorRef, CFUUIDRef, CFUUIDRef)>>('CFPlugInInstanceCreate'); + late final _CFPlugInInstanceCreate = _CFPlugInInstanceCreatePtr.asFunction< + ffi.Pointer Function(CFAllocatorRef, CFUUIDRef, CFUUIDRef)>(); - int acl_set_permset_mask_np( - acl_entry_t entry_d, - int mask, + int CFPlugInRegisterFactoryFunction( + CFUUIDRef factoryUUID, + CFPlugInFactoryFunction func, ) { - return _acl_set_permset_mask_np( - entry_d, - mask, + return _CFPlugInRegisterFactoryFunction( + factoryUUID, + func, ); } - late final _acl_set_permset_mask_npPtr = _lookup< + late final _CFPlugInRegisterFactoryFunctionPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - acl_entry_t, acl_permset_mask_t)>>('acl_set_permset_mask_np'); - late final _acl_set_permset_mask_np = - _acl_set_permset_mask_npPtr.asFunction(); + Boolean Function(CFUUIDRef, + CFPlugInFactoryFunction)>>('CFPlugInRegisterFactoryFunction'); + late final _CFPlugInRegisterFactoryFunction = + _CFPlugInRegisterFactoryFunctionPtr.asFunction< + int Function(CFUUIDRef, CFPlugInFactoryFunction)>(); - int acl_add_flag_np( - acl_flagset_t flagset_d, - int flag, + int CFPlugInRegisterFactoryFunctionByName( + CFUUIDRef factoryUUID, + CFPlugInRef plugIn, + CFStringRef functionName, ) { - return _acl_add_flag_np( - flagset_d, - flag, + return _CFPlugInRegisterFactoryFunctionByName( + factoryUUID, + plugIn, + functionName, ); } - late final _acl_add_flag_npPtr = - _lookup>( - 'acl_add_flag_np'); - late final _acl_add_flag_np = - _acl_add_flag_npPtr.asFunction(); + late final _CFPlugInRegisterFactoryFunctionByNamePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFUUIDRef, CFPlugInRef, + CFStringRef)>>('CFPlugInRegisterFactoryFunctionByName'); + late final _CFPlugInRegisterFactoryFunctionByName = + _CFPlugInRegisterFactoryFunctionByNamePtr.asFunction< + int Function(CFUUIDRef, CFPlugInRef, CFStringRef)>(); - int acl_clear_flags_np( - acl_flagset_t flagset_d, + int CFPlugInUnregisterFactory( + CFUUIDRef factoryUUID, ) { - return _acl_clear_flags_np( - flagset_d, + return _CFPlugInUnregisterFactory( + factoryUUID, ); } - late final _acl_clear_flags_npPtr = - _lookup>( - 'acl_clear_flags_np'); - late final _acl_clear_flags_np = - _acl_clear_flags_npPtr.asFunction(); + late final _CFPlugInUnregisterFactoryPtr = + _lookup>( + 'CFPlugInUnregisterFactory'); + late final _CFPlugInUnregisterFactory = + _CFPlugInUnregisterFactoryPtr.asFunction(); - int acl_delete_flag_np( - acl_flagset_t flagset_d, - int flag, + int CFPlugInRegisterPlugInType( + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, ) { - return _acl_delete_flag_np( - flagset_d, - flag, + return _CFPlugInRegisterPlugInType( + factoryUUID, + typeUUID, ); } - late final _acl_delete_flag_npPtr = - _lookup>( - 'acl_delete_flag_np'); - late final _acl_delete_flag_np = - _acl_delete_flag_npPtr.asFunction(); + late final _CFPlugInRegisterPlugInTypePtr = + _lookup>( + 'CFPlugInRegisterPlugInType'); + late final _CFPlugInRegisterPlugInType = _CFPlugInRegisterPlugInTypePtr + .asFunction(); - int acl_get_flag_np( - acl_flagset_t flagset_d, - int flag, + int CFPlugInUnregisterPlugInType( + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, ) { - return _acl_get_flag_np( - flagset_d, - flag, + return _CFPlugInUnregisterPlugInType( + factoryUUID, + typeUUID, ); } - late final _acl_get_flag_npPtr = - _lookup>( - 'acl_get_flag_np'); - late final _acl_get_flag_np = - _acl_get_flag_npPtr.asFunction(); + late final _CFPlugInUnregisterPlugInTypePtr = + _lookup>( + 'CFPlugInUnregisterPlugInType'); + late final _CFPlugInUnregisterPlugInType = _CFPlugInUnregisterPlugInTypePtr + .asFunction(); - int acl_get_flagset_np( - ffi.Pointer obj_p, - ffi.Pointer flagset_p, + void CFPlugInAddInstanceForFactory( + CFUUIDRef factoryID, ) { - return _acl_get_flagset_np( - obj_p, - flagset_p, + return _CFPlugInAddInstanceForFactory( + factoryID, ); } - late final _acl_get_flagset_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('acl_get_flagset_np'); - late final _acl_get_flagset_np = _acl_get_flagset_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _CFPlugInAddInstanceForFactoryPtr = + _lookup>( + 'CFPlugInAddInstanceForFactory'); + late final _CFPlugInAddInstanceForFactory = + _CFPlugInAddInstanceForFactoryPtr.asFunction(); - int acl_set_flagset_np( - ffi.Pointer obj_p, - acl_flagset_t flagset_d, + void CFPlugInRemoveInstanceForFactory( + CFUUIDRef factoryID, ) { - return _acl_set_flagset_np( - obj_p, - flagset_d, + return _CFPlugInRemoveInstanceForFactory( + factoryID, ); } - late final _acl_set_flagset_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, acl_flagset_t)>>('acl_set_flagset_np'); - late final _acl_set_flagset_np = _acl_set_flagset_npPtr - .asFunction, acl_flagset_t)>(); + late final _CFPlugInRemoveInstanceForFactoryPtr = + _lookup>( + 'CFPlugInRemoveInstanceForFactory'); + late final _CFPlugInRemoveInstanceForFactory = + _CFPlugInRemoveInstanceForFactoryPtr.asFunction< + void Function(CFUUIDRef)>(); - ffi.Pointer acl_get_qualifier( - acl_entry_t entry_d, + int CFPlugInInstanceGetInterfaceFunctionTable( + CFPlugInInstanceRef instance, + CFStringRef interfaceName, + ffi.Pointer> ftbl, ) { - return _acl_get_qualifier( - entry_d, + return _CFPlugInInstanceGetInterfaceFunctionTable( + instance, + interfaceName, + ftbl, ); } - late final _acl_get_qualifierPtr = - _lookup Function(acl_entry_t)>>( - 'acl_get_qualifier'); - late final _acl_get_qualifier = _acl_get_qualifierPtr - .asFunction Function(acl_entry_t)>(); + late final _CFPlugInInstanceGetInterfaceFunctionTablePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFPlugInInstanceRef, CFStringRef, + ffi.Pointer>)>>( + 'CFPlugInInstanceGetInterfaceFunctionTable'); + late final _CFPlugInInstanceGetInterfaceFunctionTable = + _CFPlugInInstanceGetInterfaceFunctionTablePtr.asFunction< + int Function(CFPlugInInstanceRef, CFStringRef, + ffi.Pointer>)>(); - int acl_get_tag_type( - acl_entry_t entry_d, - ffi.Pointer tag_type_p, + CFStringRef CFPlugInInstanceGetFactoryName( + CFPlugInInstanceRef instance, ) { - return _acl_get_tag_type( - entry_d, - tag_type_p, + return _CFPlugInInstanceGetFactoryName( + instance, ); } - late final _acl_get_tag_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - acl_entry_t, ffi.Pointer)>>('acl_get_tag_type'); - late final _acl_get_tag_type = _acl_get_tag_typePtr - .asFunction)>(); + late final _CFPlugInInstanceGetFactoryNamePtr = + _lookup>( + 'CFPlugInInstanceGetFactoryName'); + late final _CFPlugInInstanceGetFactoryName = + _CFPlugInInstanceGetFactoryNamePtr.asFunction< + CFStringRef Function(CFPlugInInstanceRef)>(); - int acl_set_qualifier( - acl_entry_t entry_d, - ffi.Pointer tag_qualifier_p, + ffi.Pointer CFPlugInInstanceGetInstanceData( + CFPlugInInstanceRef instance, ) { - return _acl_set_qualifier( - entry_d, - tag_qualifier_p, + return _CFPlugInInstanceGetInstanceData( + instance, ); } - late final _acl_set_qualifierPtr = _lookup< + late final _CFPlugInInstanceGetInstanceDataPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - acl_entry_t, ffi.Pointer)>>('acl_set_qualifier'); - late final _acl_set_qualifier = _acl_set_qualifierPtr - .asFunction)>(); + ffi.Pointer Function( + CFPlugInInstanceRef)>>('CFPlugInInstanceGetInstanceData'); + late final _CFPlugInInstanceGetInstanceData = + _CFPlugInInstanceGetInstanceDataPtr.asFunction< + ffi.Pointer Function(CFPlugInInstanceRef)>(); - int acl_set_tag_type( - acl_entry_t entry_d, - int tag_type, - ) { - return _acl_set_tag_type( - entry_d, - tag_type, - ); + int CFPlugInInstanceGetTypeID() { + return _CFPlugInInstanceGetTypeID(); } - late final _acl_set_tag_typePtr = - _lookup>( - 'acl_set_tag_type'); - late final _acl_set_tag_type = - _acl_set_tag_typePtr.asFunction(); + late final _CFPlugInInstanceGetTypeIDPtr = + _lookup>( + 'CFPlugInInstanceGetTypeID'); + late final _CFPlugInInstanceGetTypeID = + _CFPlugInInstanceGetTypeIDPtr.asFunction(); - int acl_delete_def_file( - ffi.Pointer path_p, + CFPlugInInstanceRef CFPlugInInstanceCreateWithInstanceDataSize( + CFAllocatorRef allocator, + int instanceDataSize, + CFPlugInInstanceDeallocateInstanceDataFunction deallocateInstanceFunction, + CFStringRef factoryName, + CFPlugInInstanceGetInterfaceFunction getInterfaceFunction, ) { - return _acl_delete_def_file( - path_p, + return _CFPlugInInstanceCreateWithInstanceDataSize( + allocator, + instanceDataSize, + deallocateInstanceFunction, + factoryName, + getInterfaceFunction, ); } - late final _acl_delete_def_filePtr = - _lookup)>>( - 'acl_delete_def_file'); - late final _acl_delete_def_file = - _acl_delete_def_filePtr.asFunction)>(); + late final _CFPlugInInstanceCreateWithInstanceDataSizePtr = _lookup< + ffi.NativeFunction< + CFPlugInInstanceRef Function( + CFAllocatorRef, + CFIndex, + CFPlugInInstanceDeallocateInstanceDataFunction, + CFStringRef, + CFPlugInInstanceGetInterfaceFunction)>>( + 'CFPlugInInstanceCreateWithInstanceDataSize'); + late final _CFPlugInInstanceCreateWithInstanceDataSize = + _CFPlugInInstanceCreateWithInstanceDataSizePtr.asFunction< + CFPlugInInstanceRef Function( + CFAllocatorRef, + int, + CFPlugInInstanceDeallocateInstanceDataFunction, + CFStringRef, + CFPlugInInstanceGetInterfaceFunction)>(); - acl_t acl_get_fd( - int fd, - ) { - return _acl_get_fd( - fd, - ); + int CFMachPortGetTypeID() { + return _CFMachPortGetTypeID(); } - late final _acl_get_fdPtr = - _lookup>('acl_get_fd'); - late final _acl_get_fd = _acl_get_fdPtr.asFunction(); + late final _CFMachPortGetTypeIDPtr = + _lookup>('CFMachPortGetTypeID'); + late final _CFMachPortGetTypeID = + _CFMachPortGetTypeIDPtr.asFunction(); - acl_t acl_get_fd_np( - int fd, - int type, + CFMachPortRef CFMachPortCreate( + CFAllocatorRef allocator, + CFMachPortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, ) { - return _acl_get_fd_np( - fd, - type, + return _CFMachPortCreate( + allocator, + callout, + context, + shouldFreeInfo, ); } - late final _acl_get_fd_npPtr = - _lookup>( - 'acl_get_fd_np'); - late final _acl_get_fd_np = - _acl_get_fd_npPtr.asFunction(); + late final _CFMachPortCreatePtr = _lookup< + ffi.NativeFunction< + CFMachPortRef Function( + CFAllocatorRef, + CFMachPortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMachPortCreate'); + late final _CFMachPortCreate = _CFMachPortCreatePtr.asFunction< + CFMachPortRef Function(CFAllocatorRef, CFMachPortCallBack, + ffi.Pointer, ffi.Pointer)>(); - acl_t acl_get_file( - ffi.Pointer path_p, - int type, + CFMachPortRef CFMachPortCreateWithPort( + CFAllocatorRef allocator, + int portNum, + CFMachPortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, ) { - return _acl_get_file( - path_p, - type, + return _CFMachPortCreateWithPort( + allocator, + portNum, + callout, + context, + shouldFreeInfo, ); } - late final _acl_get_filePtr = _lookup< - ffi.NativeFunction, ffi.Int32)>>( - 'acl_get_file'); - late final _acl_get_file = - _acl_get_filePtr.asFunction, int)>(); + late final _CFMachPortCreateWithPortPtr = _lookup< + ffi.NativeFunction< + CFMachPortRef Function( + CFAllocatorRef, + mach_port_t, + CFMachPortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMachPortCreateWithPort'); + late final _CFMachPortCreateWithPort = + _CFMachPortCreateWithPortPtr.asFunction< + CFMachPortRef Function(CFAllocatorRef, int, CFMachPortCallBack, + ffi.Pointer, ffi.Pointer)>(); - acl_t acl_get_link_np( - ffi.Pointer path_p, - int type, + int CFMachPortGetPort( + CFMachPortRef port, ) { - return _acl_get_link_np( - path_p, - type, + return _CFMachPortGetPort( + port, ); } - late final _acl_get_link_npPtr = _lookup< - ffi.NativeFunction, ffi.Int32)>>( - 'acl_get_link_np'); - late final _acl_get_link_np = _acl_get_link_npPtr - .asFunction, int)>(); + late final _CFMachPortGetPortPtr = + _lookup>( + 'CFMachPortGetPort'); + late final _CFMachPortGetPort = + _CFMachPortGetPortPtr.asFunction(); - int acl_set_fd( - int fd, - acl_t acl, + void CFMachPortGetContext( + CFMachPortRef port, + ffi.Pointer context, ) { - return _acl_set_fd( - fd, - acl, + return _CFMachPortGetContext( + port, + context, ); } - late final _acl_set_fdPtr = - _lookup>( - 'acl_set_fd'); - late final _acl_set_fd = - _acl_set_fdPtr.asFunction(); + late final _CFMachPortGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMachPortRef, + ffi.Pointer)>>('CFMachPortGetContext'); + late final _CFMachPortGetContext = _CFMachPortGetContextPtr.asFunction< + void Function(CFMachPortRef, ffi.Pointer)>(); - int acl_set_fd_np( - int fd, - acl_t acl, - int acl_type, + void CFMachPortInvalidate( + CFMachPortRef port, ) { - return _acl_set_fd_np( - fd, - acl, - acl_type, + return _CFMachPortInvalidate( + port, ); } - late final _acl_set_fd_npPtr = - _lookup>( - 'acl_set_fd_np'); - late final _acl_set_fd_np = - _acl_set_fd_npPtr.asFunction(); + late final _CFMachPortInvalidatePtr = + _lookup>( + 'CFMachPortInvalidate'); + late final _CFMachPortInvalidate = + _CFMachPortInvalidatePtr.asFunction(); - int acl_set_file( - ffi.Pointer path_p, - int type, - acl_t acl, + int CFMachPortIsValid( + CFMachPortRef port, ) { - return _acl_set_file( - path_p, - type, - acl, + return _CFMachPortIsValid( + port, ); } - late final _acl_set_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int32, acl_t)>>('acl_set_file'); - late final _acl_set_file = _acl_set_filePtr - .asFunction, int, acl_t)>(); + late final _CFMachPortIsValidPtr = + _lookup>( + 'CFMachPortIsValid'); + late final _CFMachPortIsValid = + _CFMachPortIsValidPtr.asFunction(); - int acl_set_link_np( - ffi.Pointer path_p, - int type, - acl_t acl, + CFMachPortInvalidationCallBack CFMachPortGetInvalidationCallBack( + CFMachPortRef port, ) { - return _acl_set_link_np( - path_p, - type, - acl, + return _CFMachPortGetInvalidationCallBack( + port, ); } - late final _acl_set_link_npPtr = _lookup< + late final _CFMachPortGetInvalidationCallBackPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int32, acl_t)>>('acl_set_link_np'); - late final _acl_set_link_np = _acl_set_link_npPtr - .asFunction, int, acl_t)>(); + CFMachPortInvalidationCallBack Function( + CFMachPortRef)>>('CFMachPortGetInvalidationCallBack'); + late final _CFMachPortGetInvalidationCallBack = + _CFMachPortGetInvalidationCallBackPtr.asFunction< + CFMachPortInvalidationCallBack Function(CFMachPortRef)>(); - int acl_copy_ext( - ffi.Pointer buf_p, - acl_t acl, - int size, + void CFMachPortSetInvalidationCallBack( + CFMachPortRef port, + CFMachPortInvalidationCallBack callout, ) { - return _acl_copy_ext( - buf_p, - acl, - size, + return _CFMachPortSetInvalidationCallBack( + port, + callout, ); } - late final _acl_copy_extPtr = _lookup< - ffi.NativeFunction< - ssize_t Function( - ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext'); - late final _acl_copy_ext = _acl_copy_extPtr - .asFunction, acl_t, int)>(); + late final _CFMachPortSetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMachPortRef, CFMachPortInvalidationCallBack)>>( + 'CFMachPortSetInvalidationCallBack'); + late final _CFMachPortSetInvalidationCallBack = + _CFMachPortSetInvalidationCallBackPtr.asFunction< + void Function(CFMachPortRef, CFMachPortInvalidationCallBack)>(); - int acl_copy_ext_native( - ffi.Pointer buf_p, - acl_t acl, - int size, + CFRunLoopSourceRef CFMachPortCreateRunLoopSource( + CFAllocatorRef allocator, + CFMachPortRef port, + int order, ) { - return _acl_copy_ext_native( - buf_p, - acl, - size, + return _CFMachPortCreateRunLoopSource( + allocator, + port, + order, ); } - late final _acl_copy_ext_nativePtr = _lookup< + late final _CFMachPortCreateRunLoopSourcePtr = _lookup< ffi.NativeFunction< - ssize_t Function( - ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext_native'); - late final _acl_copy_ext_native = _acl_copy_ext_nativePtr - .asFunction, acl_t, int)>(); + CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, + CFIndex)>>('CFMachPortCreateRunLoopSource'); + late final _CFMachPortCreateRunLoopSource = + _CFMachPortCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, int)>(); - acl_t acl_copy_int( - ffi.Pointer buf_p, - ) { - return _acl_copy_int( - buf_p, - ); + int CFAttributedStringGetTypeID() { + return _CFAttributedStringGetTypeID(); } - late final _acl_copy_intPtr = - _lookup)>>( - 'acl_copy_int'); - late final _acl_copy_int = - _acl_copy_intPtr.asFunction)>(); + late final _CFAttributedStringGetTypeIDPtr = + _lookup>( + 'CFAttributedStringGetTypeID'); + late final _CFAttributedStringGetTypeID = + _CFAttributedStringGetTypeIDPtr.asFunction(); - acl_t acl_copy_int_native( - ffi.Pointer buf_p, + CFAttributedStringRef CFAttributedStringCreate( + CFAllocatorRef alloc, + CFStringRef str, + CFDictionaryRef attributes, ) { - return _acl_copy_int_native( - buf_p, + return _CFAttributedStringCreate( + alloc, + str, + attributes, ); } - late final _acl_copy_int_nativePtr = - _lookup)>>( - 'acl_copy_int_native'); - late final _acl_copy_int_native = _acl_copy_int_nativePtr - .asFunction)>(); + late final _CFAttributedStringCreatePtr = _lookup< + ffi.NativeFunction< + CFAttributedStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFAttributedStringCreate'); + late final _CFAttributedStringCreate = + _CFAttributedStringCreatePtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - acl_t acl_from_text( - ffi.Pointer buf_p, + CFAttributedStringRef CFAttributedStringCreateWithSubstring( + CFAllocatorRef alloc, + CFAttributedStringRef aStr, + CFRange range, ) { - return _acl_from_text( - buf_p, + return _CFAttributedStringCreateWithSubstring( + alloc, + aStr, + range, ); } - late final _acl_from_textPtr = - _lookup)>>( - 'acl_from_text'); - late final _acl_from_text = - _acl_from_textPtr.asFunction)>(); + late final _CFAttributedStringCreateWithSubstringPtr = _lookup< + ffi.NativeFunction< + CFAttributedStringRef Function(CFAllocatorRef, CFAttributedStringRef, + CFRange)>>('CFAttributedStringCreateWithSubstring'); + late final _CFAttributedStringCreateWithSubstring = + _CFAttributedStringCreateWithSubstringPtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFAttributedStringRef, CFRange)>(); - int acl_size( - acl_t acl, + CFAttributedStringRef CFAttributedStringCreateCopy( + CFAllocatorRef alloc, + CFAttributedStringRef aStr, ) { - return _acl_size( - acl, + return _CFAttributedStringCreateCopy( + alloc, + aStr, ); } - late final _acl_sizePtr = - _lookup>('acl_size'); - late final _acl_size = _acl_sizePtr.asFunction(); + late final _CFAttributedStringCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFAttributedStringRef Function(CFAllocatorRef, + CFAttributedStringRef)>>('CFAttributedStringCreateCopy'); + late final _CFAttributedStringCreateCopy = + _CFAttributedStringCreateCopyPtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFAttributedStringRef)>(); - ffi.Pointer acl_to_text( - acl_t acl, - ffi.Pointer len_p, + CFStringRef CFAttributedStringGetString( + CFAttributedStringRef aStr, ) { - return _acl_to_text( - acl, - len_p, + return _CFAttributedStringGetString( + aStr, ); } - late final _acl_to_textPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - acl_t, ffi.Pointer)>>('acl_to_text'); - late final _acl_to_text = _acl_to_textPtr.asFunction< - ffi.Pointer Function(acl_t, ffi.Pointer)>(); - - int CFFileSecurityGetTypeID() { - return _CFFileSecurityGetTypeID(); - } - - late final _CFFileSecurityGetTypeIDPtr = - _lookup>( - 'CFFileSecurityGetTypeID'); - late final _CFFileSecurityGetTypeID = - _CFFileSecurityGetTypeIDPtr.asFunction(); + late final _CFAttributedStringGetStringPtr = + _lookup>( + 'CFAttributedStringGetString'); + late final _CFAttributedStringGetString = _CFAttributedStringGetStringPtr + .asFunction(); - CFFileSecurityRef CFFileSecurityCreate( - CFAllocatorRef allocator, + int CFAttributedStringGetLength( + CFAttributedStringRef aStr, ) { - return _CFFileSecurityCreate( - allocator, + return _CFAttributedStringGetLength( + aStr, ); } - late final _CFFileSecurityCreatePtr = - _lookup>( - 'CFFileSecurityCreate'); - late final _CFFileSecurityCreate = _CFFileSecurityCreatePtr.asFunction< - CFFileSecurityRef Function(CFAllocatorRef)>(); + late final _CFAttributedStringGetLengthPtr = + _lookup>( + 'CFAttributedStringGetLength'); + late final _CFAttributedStringGetLength = _CFAttributedStringGetLengthPtr + .asFunction(); - CFFileSecurityRef CFFileSecurityCreateCopy( - CFAllocatorRef allocator, - CFFileSecurityRef fileSec, + CFDictionaryRef CFAttributedStringGetAttributes( + CFAttributedStringRef aStr, + int loc, + ffi.Pointer effectiveRange, ) { - return _CFFileSecurityCreateCopy( - allocator, - fileSec, + return _CFAttributedStringGetAttributes( + aStr, + loc, + effectiveRange, ); } - late final _CFFileSecurityCreateCopyPtr = _lookup< + late final _CFAttributedStringGetAttributesPtr = _lookup< ffi.NativeFunction< - CFFileSecurityRef Function( - CFAllocatorRef, CFFileSecurityRef)>>('CFFileSecurityCreateCopy'); - late final _CFFileSecurityCreateCopy = - _CFFileSecurityCreateCopyPtr.asFunction< - CFFileSecurityRef Function(CFAllocatorRef, CFFileSecurityRef)>(); + CFDictionaryRef Function(CFAttributedStringRef, CFIndex, + ffi.Pointer)>>('CFAttributedStringGetAttributes'); + late final _CFAttributedStringGetAttributes = + _CFAttributedStringGetAttributesPtr.asFunction< + CFDictionaryRef Function( + CFAttributedStringRef, int, ffi.Pointer)>(); - int CFFileSecurityCopyOwnerUUID( - CFFileSecurityRef fileSec, - ffi.Pointer ownerUUID, + CFTypeRef CFAttributedStringGetAttribute( + CFAttributedStringRef aStr, + int loc, + CFStringRef attrName, + ffi.Pointer effectiveRange, ) { - return _CFFileSecurityCopyOwnerUUID( - fileSec, - ownerUUID, + return _CFAttributedStringGetAttribute( + aStr, + loc, + attrName, + effectiveRange, ); } - late final _CFFileSecurityCopyOwnerUUIDPtr = _lookup< + late final _CFAttributedStringGetAttributePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityCopyOwnerUUID'); - late final _CFFileSecurityCopyOwnerUUID = _CFFileSecurityCopyOwnerUUIDPtr - .asFunction)>(); - - int CFFileSecuritySetOwnerUUID( - CFFileSecurityRef fileSec, - CFUUIDRef ownerUUID, - ) { - return _CFFileSecuritySetOwnerUUID( - fileSec, - ownerUUID, - ); - } - - late final _CFFileSecuritySetOwnerUUIDPtr = _lookup< - ffi.NativeFunction>( - 'CFFileSecuritySetOwnerUUID'); - late final _CFFileSecuritySetOwnerUUID = _CFFileSecuritySetOwnerUUIDPtr - .asFunction(); + CFTypeRef Function(CFAttributedStringRef, CFIndex, CFStringRef, + ffi.Pointer)>>('CFAttributedStringGetAttribute'); + late final _CFAttributedStringGetAttribute = + _CFAttributedStringGetAttributePtr.asFunction< + CFTypeRef Function( + CFAttributedStringRef, int, CFStringRef, ffi.Pointer)>(); - int CFFileSecurityCopyGroupUUID( - CFFileSecurityRef fileSec, - ffi.Pointer groupUUID, + CFDictionaryRef CFAttributedStringGetAttributesAndLongestEffectiveRange( + CFAttributedStringRef aStr, + int loc, + CFRange inRange, + ffi.Pointer longestEffectiveRange, ) { - return _CFFileSecurityCopyGroupUUID( - fileSec, - groupUUID, + return _CFAttributedStringGetAttributesAndLongestEffectiveRange( + aStr, + loc, + inRange, + longestEffectiveRange, ); } - late final _CFFileSecurityCopyGroupUUIDPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityCopyGroupUUID'); - late final _CFFileSecurityCopyGroupUUID = _CFFileSecurityCopyGroupUUIDPtr - .asFunction)>(); + late final _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr = + _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAttributedStringRef, CFIndex, + CFRange, ffi.Pointer)>>( + 'CFAttributedStringGetAttributesAndLongestEffectiveRange'); + late final _CFAttributedStringGetAttributesAndLongestEffectiveRange = + _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr.asFunction< + CFDictionaryRef Function( + CFAttributedStringRef, int, CFRange, ffi.Pointer)>(); - int CFFileSecuritySetGroupUUID( - CFFileSecurityRef fileSec, - CFUUIDRef groupUUID, + CFTypeRef CFAttributedStringGetAttributeAndLongestEffectiveRange( + CFAttributedStringRef aStr, + int loc, + CFStringRef attrName, + CFRange inRange, + ffi.Pointer longestEffectiveRange, ) { - return _CFFileSecuritySetGroupUUID( - fileSec, - groupUUID, + return _CFAttributedStringGetAttributeAndLongestEffectiveRange( + aStr, + loc, + attrName, + inRange, + longestEffectiveRange, ); } - late final _CFFileSecuritySetGroupUUIDPtr = _lookup< - ffi.NativeFunction>( - 'CFFileSecuritySetGroupUUID'); - late final _CFFileSecuritySetGroupUUID = _CFFileSecuritySetGroupUUIDPtr - .asFunction(); + late final _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr = + _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFAttributedStringRef, CFIndex, + CFStringRef, CFRange, ffi.Pointer)>>( + 'CFAttributedStringGetAttributeAndLongestEffectiveRange'); + late final _CFAttributedStringGetAttributeAndLongestEffectiveRange = + _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr.asFunction< + CFTypeRef Function(CFAttributedStringRef, int, CFStringRef, CFRange, + ffi.Pointer)>(); - int CFFileSecurityCopyAccessControlList( - CFFileSecurityRef fileSec, - ffi.Pointer accessControlList, + CFMutableAttributedStringRef CFAttributedStringCreateMutableCopy( + CFAllocatorRef alloc, + int maxLength, + CFAttributedStringRef aStr, ) { - return _CFFileSecurityCopyAccessControlList( - fileSec, - accessControlList, + return _CFAttributedStringCreateMutableCopy( + alloc, + maxLength, + aStr, ); } - late final _CFFileSecurityCopyAccessControlListPtr = _lookup< + late final _CFAttributedStringCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityCopyAccessControlList'); - late final _CFFileSecurityCopyAccessControlList = - _CFFileSecurityCopyAccessControlListPtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + CFMutableAttributedStringRef Function(CFAllocatorRef, CFIndex, + CFAttributedStringRef)>>('CFAttributedStringCreateMutableCopy'); + late final _CFAttributedStringCreateMutableCopy = + _CFAttributedStringCreateMutableCopyPtr.asFunction< + CFMutableAttributedStringRef Function( + CFAllocatorRef, int, CFAttributedStringRef)>(); - int CFFileSecuritySetAccessControlList( - CFFileSecurityRef fileSec, - acl_t accessControlList, + CFMutableAttributedStringRef CFAttributedStringCreateMutable( + CFAllocatorRef alloc, + int maxLength, ) { - return _CFFileSecuritySetAccessControlList( - fileSec, - accessControlList, + return _CFAttributedStringCreateMutable( + alloc, + maxLength, ); } - late final _CFFileSecuritySetAccessControlListPtr = - _lookup>( - 'CFFileSecuritySetAccessControlList'); - late final _CFFileSecuritySetAccessControlList = - _CFFileSecuritySetAccessControlListPtr.asFunction< - int Function(CFFileSecurityRef, acl_t)>(); + late final _CFAttributedStringCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableAttributedStringRef Function( + CFAllocatorRef, CFIndex)>>('CFAttributedStringCreateMutable'); + late final _CFAttributedStringCreateMutable = + _CFAttributedStringCreateMutablePtr.asFunction< + CFMutableAttributedStringRef Function(CFAllocatorRef, int)>(); - int CFFileSecurityGetOwner( - CFFileSecurityRef fileSec, - ffi.Pointer owner, + void CFAttributedStringReplaceString( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef replacement, ) { - return _CFFileSecurityGetOwner( - fileSec, - owner, + return _CFAttributedStringReplaceString( + aStr, + range, + replacement, ); } - late final _CFFileSecurityGetOwnerPtr = _lookup< + late final _CFAttributedStringReplaceStringPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityGetOwner'); - late final _CFFileSecurityGetOwner = _CFFileSecurityGetOwnerPtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFStringRef)>>('CFAttributedStringReplaceString'); + late final _CFAttributedStringReplaceString = + _CFAttributedStringReplaceStringPtr.asFunction< + void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); - int CFFileSecuritySetOwner( - CFFileSecurityRef fileSec, - int owner, + CFMutableStringRef CFAttributedStringGetMutableString( + CFMutableAttributedStringRef aStr, ) { - return _CFFileSecuritySetOwner( - fileSec, - owner, + return _CFAttributedStringGetMutableString( + aStr, ); } - late final _CFFileSecuritySetOwnerPtr = - _lookup>( - 'CFFileSecuritySetOwner'); - late final _CFFileSecuritySetOwner = _CFFileSecuritySetOwnerPtr.asFunction< - int Function(CFFileSecurityRef, int)>(); + late final _CFAttributedStringGetMutableStringPtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function(CFMutableAttributedStringRef)>>( + 'CFAttributedStringGetMutableString'); + late final _CFAttributedStringGetMutableString = + _CFAttributedStringGetMutableStringPtr.asFunction< + CFMutableStringRef Function(CFMutableAttributedStringRef)>(); - int CFFileSecurityGetGroup( - CFFileSecurityRef fileSec, - ffi.Pointer group, + void CFAttributedStringSetAttributes( + CFMutableAttributedStringRef aStr, + CFRange range, + CFDictionaryRef replacement, + int clearOtherAttributes, ) { - return _CFFileSecurityGetGroup( - fileSec, - group, + return _CFAttributedStringSetAttributes( + aStr, + range, + replacement, + clearOtherAttributes, ); } - late final _CFFileSecurityGetGroupPtr = _lookup< + late final _CFAttributedStringSetAttributesPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityGetGroup'); - late final _CFFileSecurityGetGroup = _CFFileSecurityGetGroupPtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFDictionaryRef, Boolean)>>('CFAttributedStringSetAttributes'); + late final _CFAttributedStringSetAttributes = + _CFAttributedStringSetAttributesPtr.asFunction< + void Function( + CFMutableAttributedStringRef, CFRange, CFDictionaryRef, int)>(); - int CFFileSecuritySetGroup( - CFFileSecurityRef fileSec, - int group, + void CFAttributedStringSetAttribute( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef attrName, + CFTypeRef value, ) { - return _CFFileSecuritySetGroup( - fileSec, - group, + return _CFAttributedStringSetAttribute( + aStr, + range, + attrName, + value, ); } - late final _CFFileSecuritySetGroupPtr = - _lookup>( - 'CFFileSecuritySetGroup'); - late final _CFFileSecuritySetGroup = _CFFileSecuritySetGroupPtr.asFunction< - int Function(CFFileSecurityRef, int)>(); + late final _CFAttributedStringSetAttributePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, CFStringRef, + CFTypeRef)>>('CFAttributedStringSetAttribute'); + late final _CFAttributedStringSetAttribute = + _CFAttributedStringSetAttributePtr.asFunction< + void Function( + CFMutableAttributedStringRef, CFRange, CFStringRef, CFTypeRef)>(); - int CFFileSecurityGetMode( - CFFileSecurityRef fileSec, - ffi.Pointer mode, + void CFAttributedStringRemoveAttribute( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef attrName, ) { - return _CFFileSecurityGetMode( - fileSec, - mode, + return _CFAttributedStringRemoveAttribute( + aStr, + range, + attrName, ); } - late final _CFFileSecurityGetModePtr = _lookup< + late final _CFAttributedStringRemoveAttributePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityGetMode'); - late final _CFFileSecurityGetMode = _CFFileSecurityGetModePtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFStringRef)>>('CFAttributedStringRemoveAttribute'); + late final _CFAttributedStringRemoveAttribute = + _CFAttributedStringRemoveAttributePtr.asFunction< + void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); - int CFFileSecuritySetMode( - CFFileSecurityRef fileSec, - int mode, + void CFAttributedStringReplaceAttributedString( + CFMutableAttributedStringRef aStr, + CFRange range, + CFAttributedStringRef replacement, ) { - return _CFFileSecuritySetMode( - fileSec, - mode, + return _CFAttributedStringReplaceAttributedString( + aStr, + range, + replacement, ); } - late final _CFFileSecuritySetModePtr = - _lookup>( - 'CFFileSecuritySetMode'); - late final _CFFileSecuritySetMode = _CFFileSecuritySetModePtr.asFunction< - int Function(CFFileSecurityRef, int)>(); + late final _CFAttributedStringReplaceAttributedStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFAttributedStringRef)>>( + 'CFAttributedStringReplaceAttributedString'); + late final _CFAttributedStringReplaceAttributedString = + _CFAttributedStringReplaceAttributedStringPtr.asFunction< + void Function( + CFMutableAttributedStringRef, CFRange, CFAttributedStringRef)>(); - int CFFileSecurityClearProperties( - CFFileSecurityRef fileSec, - int clearPropertyMask, + void CFAttributedStringBeginEditing( + CFMutableAttributedStringRef aStr, ) { - return _CFFileSecurityClearProperties( - fileSec, - clearPropertyMask, + return _CFAttributedStringBeginEditing( + aStr, ); } - late final _CFFileSecurityClearPropertiesPtr = _lookup< - ffi.NativeFunction>( - 'CFFileSecurityClearProperties'); - late final _CFFileSecurityClearProperties = _CFFileSecurityClearPropertiesPtr - .asFunction(); + late final _CFAttributedStringBeginEditingPtr = _lookup< + ffi.NativeFunction>( + 'CFAttributedStringBeginEditing'); + late final _CFAttributedStringBeginEditing = + _CFAttributedStringBeginEditingPtr.asFunction< + void Function(CFMutableAttributedStringRef)>(); - CFStringRef CFStringTokenizerCopyBestStringLanguage( - CFStringRef string, - CFRange range, + void CFAttributedStringEndEditing( + CFMutableAttributedStringRef aStr, ) { - return _CFStringTokenizerCopyBestStringLanguage( - string, - range, + return _CFAttributedStringEndEditing( + aStr, ); } - late final _CFStringTokenizerCopyBestStringLanguagePtr = - _lookup>( - 'CFStringTokenizerCopyBestStringLanguage'); - late final _CFStringTokenizerCopyBestStringLanguage = - _CFStringTokenizerCopyBestStringLanguagePtr.asFunction< - CFStringRef Function(CFStringRef, CFRange)>(); + late final _CFAttributedStringEndEditingPtr = _lookup< + ffi.NativeFunction>( + 'CFAttributedStringEndEditing'); + late final _CFAttributedStringEndEditing = _CFAttributedStringEndEditingPtr + .asFunction(); - int CFStringTokenizerGetTypeID() { - return _CFStringTokenizerGetTypeID(); + int CFURLEnumeratorGetTypeID() { + return _CFURLEnumeratorGetTypeID(); } - late final _CFStringTokenizerGetTypeIDPtr = + late final _CFURLEnumeratorGetTypeIDPtr = _lookup>( - 'CFStringTokenizerGetTypeID'); - late final _CFStringTokenizerGetTypeID = - _CFStringTokenizerGetTypeIDPtr.asFunction(); + 'CFURLEnumeratorGetTypeID'); + late final _CFURLEnumeratorGetTypeID = + _CFURLEnumeratorGetTypeIDPtr.asFunction(); - CFStringTokenizerRef CFStringTokenizerCreate( + CFURLEnumeratorRef CFURLEnumeratorCreateForDirectoryURL( CFAllocatorRef alloc, - CFStringRef string, - CFRange range, - int options, - CFLocaleRef locale, + CFURLRef directoryURL, + int option, + CFArrayRef propertyKeys, ) { - return _CFStringTokenizerCreate( + return _CFURLEnumeratorCreateForDirectoryURL( alloc, - string, - range, - options, - locale, + directoryURL, + option, + propertyKeys, ); } - late final _CFStringTokenizerCreatePtr = _lookup< + late final _CFURLEnumeratorCreateForDirectoryURLPtr = _lookup< ffi.NativeFunction< - CFStringTokenizerRef Function(CFAllocatorRef, CFStringRef, CFRange, - CFOptionFlags, CFLocaleRef)>>('CFStringTokenizerCreate'); - late final _CFStringTokenizerCreate = _CFStringTokenizerCreatePtr.asFunction< - CFStringTokenizerRef Function( - CFAllocatorRef, CFStringRef, CFRange, int, CFLocaleRef)>(); + CFURLEnumeratorRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, + CFArrayRef)>>('CFURLEnumeratorCreateForDirectoryURL'); + late final _CFURLEnumeratorCreateForDirectoryURL = + _CFURLEnumeratorCreateForDirectoryURLPtr.asFunction< + CFURLEnumeratorRef Function( + CFAllocatorRef, CFURLRef, int, CFArrayRef)>(); - void CFStringTokenizerSetString( - CFStringTokenizerRef tokenizer, - CFStringRef string, - CFRange range, + CFURLEnumeratorRef CFURLEnumeratorCreateForMountedVolumes( + CFAllocatorRef alloc, + int option, + CFArrayRef propertyKeys, ) { - return _CFStringTokenizerSetString( - tokenizer, - string, - range, + return _CFURLEnumeratorCreateForMountedVolumes( + alloc, + option, + propertyKeys, ); } - late final _CFStringTokenizerSetStringPtr = _lookup< + late final _CFURLEnumeratorCreateForMountedVolumesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFStringTokenizerRef, CFStringRef, - CFRange)>>('CFStringTokenizerSetString'); - late final _CFStringTokenizerSetString = _CFStringTokenizerSetStringPtr - .asFunction(); + CFURLEnumeratorRef Function(CFAllocatorRef, ffi.Int32, + CFArrayRef)>>('CFURLEnumeratorCreateForMountedVolumes'); + late final _CFURLEnumeratorCreateForMountedVolumes = + _CFURLEnumeratorCreateForMountedVolumesPtr.asFunction< + CFURLEnumeratorRef Function(CFAllocatorRef, int, CFArrayRef)>(); - int CFStringTokenizerGoToTokenAtIndex( - CFStringTokenizerRef tokenizer, - int index, + int CFURLEnumeratorGetNextURL( + CFURLEnumeratorRef enumerator, + ffi.Pointer url, + ffi.Pointer error, ) { - return _CFStringTokenizerGoToTokenAtIndex( - tokenizer, - index, + return _CFURLEnumeratorGetNextURL( + enumerator, + url, + error, ); } - late final _CFStringTokenizerGoToTokenAtIndexPtr = _lookup< + late final _CFURLEnumeratorGetNextURLPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFStringTokenizerRef, - CFIndex)>>('CFStringTokenizerGoToTokenAtIndex'); - late final _CFStringTokenizerGoToTokenAtIndex = - _CFStringTokenizerGoToTokenAtIndexPtr.asFunction< - int Function(CFStringTokenizerRef, int)>(); + ffi.Int32 Function(CFURLEnumeratorRef, ffi.Pointer, + ffi.Pointer)>>('CFURLEnumeratorGetNextURL'); + late final _CFURLEnumeratorGetNextURL = + _CFURLEnumeratorGetNextURLPtr.asFunction< + int Function(CFURLEnumeratorRef, ffi.Pointer, + ffi.Pointer)>(); - int CFStringTokenizerAdvanceToNextToken( - CFStringTokenizerRef tokenizer, + void CFURLEnumeratorSkipDescendents( + CFURLEnumeratorRef enumerator, ) { - return _CFStringTokenizerAdvanceToNextToken( - tokenizer, + return _CFURLEnumeratorSkipDescendents( + enumerator, ); } - late final _CFStringTokenizerAdvanceToNextTokenPtr = - _lookup>( - 'CFStringTokenizerAdvanceToNextToken'); - late final _CFStringTokenizerAdvanceToNextToken = - _CFStringTokenizerAdvanceToNextTokenPtr.asFunction< - int Function(CFStringTokenizerRef)>(); + late final _CFURLEnumeratorSkipDescendentsPtr = + _lookup>( + 'CFURLEnumeratorSkipDescendents'); + late final _CFURLEnumeratorSkipDescendents = + _CFURLEnumeratorSkipDescendentsPtr.asFunction< + void Function(CFURLEnumeratorRef)>(); - CFRange CFStringTokenizerGetCurrentTokenRange( - CFStringTokenizerRef tokenizer, + int CFURLEnumeratorGetDescendentLevel( + CFURLEnumeratorRef enumerator, ) { - return _CFStringTokenizerGetCurrentTokenRange( - tokenizer, + return _CFURLEnumeratorGetDescendentLevel( + enumerator, ); } - late final _CFStringTokenizerGetCurrentTokenRangePtr = - _lookup>( - 'CFStringTokenizerGetCurrentTokenRange'); - late final _CFStringTokenizerGetCurrentTokenRange = - _CFStringTokenizerGetCurrentTokenRangePtr.asFunction< - CFRange Function(CFStringTokenizerRef)>(); + late final _CFURLEnumeratorGetDescendentLevelPtr = + _lookup>( + 'CFURLEnumeratorGetDescendentLevel'); + late final _CFURLEnumeratorGetDescendentLevel = + _CFURLEnumeratorGetDescendentLevelPtr.asFunction< + int Function(CFURLEnumeratorRef)>(); - CFTypeRef CFStringTokenizerCopyCurrentTokenAttribute( - CFStringTokenizerRef tokenizer, - int attribute, + int CFURLEnumeratorGetSourceDidChange( + CFURLEnumeratorRef enumerator, ) { - return _CFStringTokenizerCopyCurrentTokenAttribute( - tokenizer, - attribute, + return _CFURLEnumeratorGetSourceDidChange( + enumerator, ); } - late final _CFStringTokenizerCopyCurrentTokenAttributePtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFStringTokenizerRef, - CFOptionFlags)>>('CFStringTokenizerCopyCurrentTokenAttribute'); - late final _CFStringTokenizerCopyCurrentTokenAttribute = - _CFStringTokenizerCopyCurrentTokenAttributePtr.asFunction< - CFTypeRef Function(CFStringTokenizerRef, int)>(); + late final _CFURLEnumeratorGetSourceDidChangePtr = + _lookup>( + 'CFURLEnumeratorGetSourceDidChange'); + late final _CFURLEnumeratorGetSourceDidChange = + _CFURLEnumeratorGetSourceDidChangePtr.asFunction< + int Function(CFURLEnumeratorRef)>(); - int CFStringTokenizerGetCurrentSubTokens( - CFStringTokenizerRef tokenizer, - ffi.Pointer ranges, - int maxRangeLength, - CFMutableArrayRef derivedSubTokens, + acl_t acl_dup( + acl_t acl, ) { - return _CFStringTokenizerGetCurrentSubTokens( - tokenizer, - ranges, - maxRangeLength, - derivedSubTokens, + return _acl_dup( + acl, ); } - late final _CFStringTokenizerGetCurrentSubTokensPtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFStringTokenizerRef, ffi.Pointer, CFIndex, - CFMutableArrayRef)>>('CFStringTokenizerGetCurrentSubTokens'); - late final _CFStringTokenizerGetCurrentSubTokens = - _CFStringTokenizerGetCurrentSubTokensPtr.asFunction< - int Function(CFStringTokenizerRef, ffi.Pointer, int, - CFMutableArrayRef)>(); + late final _acl_dupPtr = + _lookup>('acl_dup'); + late final _acl_dup = _acl_dupPtr.asFunction(); - int CFFileDescriptorGetTypeID() { - return _CFFileDescriptorGetTypeID(); + int acl_free( + ffi.Pointer obj_p, + ) { + return _acl_free( + obj_p, + ); } - late final _CFFileDescriptorGetTypeIDPtr = - _lookup>( - 'CFFileDescriptorGetTypeID'); - late final _CFFileDescriptorGetTypeID = - _CFFileDescriptorGetTypeIDPtr.asFunction(); + late final _acl_freePtr = + _lookup)>>( + 'acl_free'); + late final _acl_free = + _acl_freePtr.asFunction)>(); - CFFileDescriptorRef CFFileDescriptorCreate( - CFAllocatorRef allocator, - int fd, - int closeOnInvalidate, - CFFileDescriptorCallBack callout, - ffi.Pointer context, + acl_t acl_init( + int count, ) { - return _CFFileDescriptorCreate( - allocator, - fd, - closeOnInvalidate, - callout, - context, + return _acl_init( + count, ); } - late final _CFFileDescriptorCreatePtr = _lookup< - ffi.NativeFunction< - CFFileDescriptorRef Function( - CFAllocatorRef, - CFFileDescriptorNativeDescriptor, - Boolean, - CFFileDescriptorCallBack, - ffi.Pointer)>>('CFFileDescriptorCreate'); - late final _CFFileDescriptorCreate = _CFFileDescriptorCreatePtr.asFunction< - CFFileDescriptorRef Function(CFAllocatorRef, int, int, - CFFileDescriptorCallBack, ffi.Pointer)>(); + late final _acl_initPtr = + _lookup>('acl_init'); + late final _acl_init = _acl_initPtr.asFunction(); - int CFFileDescriptorGetNativeDescriptor( - CFFileDescriptorRef f, + int acl_copy_entry( + acl_entry_t dest_d, + acl_entry_t src_d, ) { - return _CFFileDescriptorGetNativeDescriptor( - f, + return _acl_copy_entry( + dest_d, + src_d, ); } - late final _CFFileDescriptorGetNativeDescriptorPtr = _lookup< - ffi.NativeFunction< - CFFileDescriptorNativeDescriptor Function( - CFFileDescriptorRef)>>('CFFileDescriptorGetNativeDescriptor'); - late final _CFFileDescriptorGetNativeDescriptor = - _CFFileDescriptorGetNativeDescriptorPtr.asFunction< - int Function(CFFileDescriptorRef)>(); + late final _acl_copy_entryPtr = + _lookup>( + 'acl_copy_entry'); + late final _acl_copy_entry = + _acl_copy_entryPtr.asFunction(); - void CFFileDescriptorGetContext( - CFFileDescriptorRef f, - ffi.Pointer context, + int acl_create_entry( + ffi.Pointer acl_p, + ffi.Pointer entry_p, ) { - return _CFFileDescriptorGetContext( - f, - context, + return _acl_create_entry( + acl_p, + entry_p, ); } - late final _CFFileDescriptorGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFFileDescriptorRef, ffi.Pointer)>>( - 'CFFileDescriptorGetContext'); - late final _CFFileDescriptorGetContext = - _CFFileDescriptorGetContextPtr.asFunction< - void Function( - CFFileDescriptorRef, ffi.Pointer)>(); + late final _acl_create_entryPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('acl_create_entry'); + late final _acl_create_entry = _acl_create_entryPtr + .asFunction, ffi.Pointer)>(); - void CFFileDescriptorEnableCallBacks( - CFFileDescriptorRef f, - int callBackTypes, + int acl_create_entry_np( + ffi.Pointer acl_p, + ffi.Pointer entry_p, + int entry_index, ) { - return _CFFileDescriptorEnableCallBacks( - f, - callBackTypes, + return _acl_create_entry_np( + acl_p, + entry_p, + entry_index, ); } - late final _CFFileDescriptorEnableCallBacksPtr = _lookup< + late final _acl_create_entry_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFFileDescriptorRef, - CFOptionFlags)>>('CFFileDescriptorEnableCallBacks'); - late final _CFFileDescriptorEnableCallBacks = - _CFFileDescriptorEnableCallBacksPtr.asFunction< - void Function(CFFileDescriptorRef, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('acl_create_entry_np'); + late final _acl_create_entry_np = _acl_create_entry_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - void CFFileDescriptorDisableCallBacks( - CFFileDescriptorRef f, - int callBackTypes, + int acl_delete_entry( + acl_t acl, + acl_entry_t entry_d, ) { - return _CFFileDescriptorDisableCallBacks( - f, - callBackTypes, + return _acl_delete_entry( + acl, + entry_d, ); } - late final _CFFileDescriptorDisableCallBacksPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFFileDescriptorRef, - CFOptionFlags)>>('CFFileDescriptorDisableCallBacks'); - late final _CFFileDescriptorDisableCallBacks = - _CFFileDescriptorDisableCallBacksPtr.asFunction< - void Function(CFFileDescriptorRef, int)>(); + late final _acl_delete_entryPtr = + _lookup>( + 'acl_delete_entry'); + late final _acl_delete_entry = + _acl_delete_entryPtr.asFunction(); - void CFFileDescriptorInvalidate( - CFFileDescriptorRef f, + int acl_get_entry( + acl_t acl, + int entry_id, + ffi.Pointer entry_p, ) { - return _CFFileDescriptorInvalidate( - f, + return _acl_get_entry( + acl, + entry_id, + entry_p, ); } - late final _CFFileDescriptorInvalidatePtr = - _lookup>( - 'CFFileDescriptorInvalidate'); - late final _CFFileDescriptorInvalidate = _CFFileDescriptorInvalidatePtr - .asFunction(); + late final _acl_get_entryPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + acl_t, ffi.Int, ffi.Pointer)>>('acl_get_entry'); + late final _acl_get_entry = _acl_get_entryPtr + .asFunction)>(); - int CFFileDescriptorIsValid( - CFFileDescriptorRef f, + int acl_valid( + acl_t acl, ) { - return _CFFileDescriptorIsValid( - f, + return _acl_valid( + acl, ); } - late final _CFFileDescriptorIsValidPtr = - _lookup>( - 'CFFileDescriptorIsValid'); - late final _CFFileDescriptorIsValid = _CFFileDescriptorIsValidPtr.asFunction< - int Function(CFFileDescriptorRef)>(); + late final _acl_validPtr = + _lookup>('acl_valid'); + late final _acl_valid = _acl_validPtr.asFunction(); - CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource( - CFAllocatorRef allocator, - CFFileDescriptorRef f, - int order, + int acl_valid_fd_np( + int fd, + int type, + acl_t acl, ) { - return _CFFileDescriptorCreateRunLoopSource( - allocator, - f, - order, + return _acl_valid_fd_np( + fd, + type, + acl, ); } - late final _CFFileDescriptorCreateRunLoopSourcePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFFileDescriptorRef, - CFIndex)>>('CFFileDescriptorCreateRunLoopSource'); - late final _CFFileDescriptorCreateRunLoopSource = - _CFFileDescriptorCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function( - CFAllocatorRef, CFFileDescriptorRef, int)>(); + late final _acl_valid_fd_npPtr = + _lookup>( + 'acl_valid_fd_np'); + late final _acl_valid_fd_np = + _acl_valid_fd_npPtr.asFunction(); - int CFUserNotificationGetTypeID() { - return _CFUserNotificationGetTypeID(); + int acl_valid_file_np( + ffi.Pointer path, + int type, + acl_t acl, + ) { + return _acl_valid_file_np( + path, + type, + acl, + ); } - late final _CFUserNotificationGetTypeIDPtr = - _lookup>( - 'CFUserNotificationGetTypeID'); - late final _CFUserNotificationGetTypeID = - _CFUserNotificationGetTypeIDPtr.asFunction(); + late final _acl_valid_file_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int32, acl_t)>>('acl_valid_file_np'); + late final _acl_valid_file_np = _acl_valid_file_npPtr + .asFunction, int, acl_t)>(); - CFUserNotificationRef CFUserNotificationCreate( - CFAllocatorRef allocator, - double timeout, - int flags, - ffi.Pointer error, - CFDictionaryRef dictionary, + int acl_valid_link_np( + ffi.Pointer path, + int type, + acl_t acl, ) { - return _CFUserNotificationCreate( - allocator, - timeout, - flags, - error, - dictionary, + return _acl_valid_link_np( + path, + type, + acl, ); } - late final _CFUserNotificationCreatePtr = _lookup< + late final _acl_valid_link_npPtr = _lookup< ffi.NativeFunction< - CFUserNotificationRef Function( - CFAllocatorRef, - CFTimeInterval, - CFOptionFlags, - ffi.Pointer, - CFDictionaryRef)>>('CFUserNotificationCreate'); - late final _CFUserNotificationCreate = - _CFUserNotificationCreatePtr.asFunction< - CFUserNotificationRef Function(CFAllocatorRef, double, int, - ffi.Pointer, CFDictionaryRef)>(); + ffi.Int Function( + ffi.Pointer, ffi.Int32, acl_t)>>('acl_valid_link_np'); + late final _acl_valid_link_np = _acl_valid_link_npPtr + .asFunction, int, acl_t)>(); - int CFUserNotificationReceiveResponse( - CFUserNotificationRef userNotification, - double timeout, - ffi.Pointer responseFlags, + int acl_add_perm( + acl_permset_t permset_d, + int perm, ) { - return _CFUserNotificationReceiveResponse( - userNotification, - timeout, - responseFlags, + return _acl_add_perm( + permset_d, + perm, ); } - late final _CFUserNotificationReceiveResponsePtr = _lookup< - ffi.NativeFunction< - SInt32 Function(CFUserNotificationRef, CFTimeInterval, - ffi.Pointer)>>( - 'CFUserNotificationReceiveResponse'); - late final _CFUserNotificationReceiveResponse = - _CFUserNotificationReceiveResponsePtr.asFunction< - int Function( - CFUserNotificationRef, double, ffi.Pointer)>(); + late final _acl_add_permPtr = + _lookup>( + 'acl_add_perm'); + late final _acl_add_perm = + _acl_add_permPtr.asFunction(); - CFStringRef CFUserNotificationGetResponseValue( - CFUserNotificationRef userNotification, - CFStringRef key, - int idx, + int acl_calc_mask( + ffi.Pointer acl_p, ) { - return _CFUserNotificationGetResponseValue( - userNotification, - key, - idx, + return _acl_calc_mask( + acl_p, ); } - late final _CFUserNotificationGetResponseValuePtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFUserNotificationRef, CFStringRef, - CFIndex)>>('CFUserNotificationGetResponseValue'); - late final _CFUserNotificationGetResponseValue = - _CFUserNotificationGetResponseValuePtr.asFunction< - CFStringRef Function(CFUserNotificationRef, CFStringRef, int)>(); + late final _acl_calc_maskPtr = + _lookup)>>( + 'acl_calc_mask'); + late final _acl_calc_mask = + _acl_calc_maskPtr.asFunction)>(); - CFDictionaryRef CFUserNotificationGetResponseDictionary( - CFUserNotificationRef userNotification, + int acl_clear_perms( + acl_permset_t permset_d, ) { - return _CFUserNotificationGetResponseDictionary( - userNotification, + return _acl_clear_perms( + permset_d, ); } - late final _CFUserNotificationGetResponseDictionaryPtr = _lookup< - ffi.NativeFunction>( - 'CFUserNotificationGetResponseDictionary'); - late final _CFUserNotificationGetResponseDictionary = - _CFUserNotificationGetResponseDictionaryPtr.asFunction< - CFDictionaryRef Function(CFUserNotificationRef)>(); + late final _acl_clear_permsPtr = + _lookup>( + 'acl_clear_perms'); + late final _acl_clear_perms = + _acl_clear_permsPtr.asFunction(); - int CFUserNotificationUpdate( - CFUserNotificationRef userNotification, - double timeout, - int flags, - CFDictionaryRef dictionary, + int acl_delete_perm( + acl_permset_t permset_d, + int perm, ) { - return _CFUserNotificationUpdate( - userNotification, - timeout, - flags, - dictionary, + return _acl_delete_perm( + permset_d, + perm, ); } - late final _CFUserNotificationUpdatePtr = _lookup< - ffi.NativeFunction< - SInt32 Function(CFUserNotificationRef, CFTimeInterval, CFOptionFlags, - CFDictionaryRef)>>('CFUserNotificationUpdate'); - late final _CFUserNotificationUpdate = - _CFUserNotificationUpdatePtr.asFunction< - int Function(CFUserNotificationRef, double, int, CFDictionaryRef)>(); + late final _acl_delete_permPtr = + _lookup>( + 'acl_delete_perm'); + late final _acl_delete_perm = + _acl_delete_permPtr.asFunction(); - int CFUserNotificationCancel( - CFUserNotificationRef userNotification, + int acl_get_perm_np( + acl_permset_t permset_d, + int perm, ) { - return _CFUserNotificationCancel( - userNotification, + return _acl_get_perm_np( + permset_d, + perm, ); } - late final _CFUserNotificationCancelPtr = - _lookup>( - 'CFUserNotificationCancel'); - late final _CFUserNotificationCancel = _CFUserNotificationCancelPtr - .asFunction(); + late final _acl_get_perm_npPtr = + _lookup>( + 'acl_get_perm_np'); + late final _acl_get_perm_np = + _acl_get_perm_npPtr.asFunction(); - CFRunLoopSourceRef CFUserNotificationCreateRunLoopSource( - CFAllocatorRef allocator, - CFUserNotificationRef userNotification, - CFUserNotificationCallBack callout, - int order, + int acl_get_permset( + acl_entry_t entry_d, + ffi.Pointer permset_p, ) { - return _CFUserNotificationCreateRunLoopSource( - allocator, - userNotification, - callout, - order, + return _acl_get_permset( + entry_d, + permset_p, ); } - late final _CFUserNotificationCreateRunLoopSourcePtr = _lookup< + late final _acl_get_permsetPtr = _lookup< ffi.NativeFunction< - CFRunLoopSourceRef Function( - CFAllocatorRef, - CFUserNotificationRef, - CFUserNotificationCallBack, - CFIndex)>>('CFUserNotificationCreateRunLoopSource'); - late final _CFUserNotificationCreateRunLoopSource = - _CFUserNotificationCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFUserNotificationRef, - CFUserNotificationCallBack, int)>(); + ffi.Int Function( + acl_entry_t, ffi.Pointer)>>('acl_get_permset'); + late final _acl_get_permset = _acl_get_permsetPtr + .asFunction)>(); - int CFUserNotificationDisplayNotice( - double timeout, - int flags, - CFURLRef iconURL, - CFURLRef soundURL, - CFURLRef localizationURL, - CFStringRef alertHeader, - CFStringRef alertMessage, - CFStringRef defaultButtonTitle, + int acl_set_permset( + acl_entry_t entry_d, + acl_permset_t permset_d, ) { - return _CFUserNotificationDisplayNotice( - timeout, - flags, - iconURL, - soundURL, - localizationURL, - alertHeader, - alertMessage, - defaultButtonTitle, + return _acl_set_permset( + entry_d, + permset_d, ); } - late final _CFUserNotificationDisplayNoticePtr = _lookup< - ffi.NativeFunction< - SInt32 Function( - CFTimeInterval, - CFOptionFlags, - CFURLRef, - CFURLRef, - CFURLRef, - CFStringRef, - CFStringRef, - CFStringRef)>>('CFUserNotificationDisplayNotice'); - late final _CFUserNotificationDisplayNotice = - _CFUserNotificationDisplayNoticePtr.asFunction< - int Function(double, int, CFURLRef, CFURLRef, CFURLRef, CFStringRef, - CFStringRef, CFStringRef)>(); + late final _acl_set_permsetPtr = + _lookup>( + 'acl_set_permset'); + late final _acl_set_permset = _acl_set_permsetPtr + .asFunction(); - int CFUserNotificationDisplayAlert( - double timeout, - int flags, - CFURLRef iconURL, - CFURLRef soundURL, - CFURLRef localizationURL, - CFStringRef alertHeader, - CFStringRef alertMessage, - CFStringRef defaultButtonTitle, - CFStringRef alternateButtonTitle, - CFStringRef otherButtonTitle, - ffi.Pointer responseFlags, + int acl_maximal_permset_mask_np( + ffi.Pointer mask_p, ) { - return _CFUserNotificationDisplayAlert( - timeout, - flags, - iconURL, - soundURL, - localizationURL, - alertHeader, - alertMessage, - defaultButtonTitle, - alternateButtonTitle, - otherButtonTitle, - responseFlags, + return _acl_maximal_permset_mask_np( + mask_p, ); } - late final _CFUserNotificationDisplayAlertPtr = _lookup< + late final _acl_maximal_permset_mask_npPtr = _lookup< ffi.NativeFunction< - SInt32 Function( - CFTimeInterval, - CFOptionFlags, - CFURLRef, - CFURLRef, - CFURLRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringRef, - ffi.Pointer)>>('CFUserNotificationDisplayAlert'); - late final _CFUserNotificationDisplayAlert = - _CFUserNotificationDisplayAlertPtr.asFunction< - int Function( - double, - int, - CFURLRef, - CFURLRef, - CFURLRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringRef, - ffi.Pointer)>(); - - late final ffi.Pointer _kCFUserNotificationIconURLKey = - _lookup('kCFUserNotificationIconURLKey'); - - CFStringRef get kCFUserNotificationIconURLKey => - _kCFUserNotificationIconURLKey.value; - - set kCFUserNotificationIconURLKey(CFStringRef value) => - _kCFUserNotificationIconURLKey.value = value; - - late final ffi.Pointer _kCFUserNotificationSoundURLKey = - _lookup('kCFUserNotificationSoundURLKey'); - - CFStringRef get kCFUserNotificationSoundURLKey => - _kCFUserNotificationSoundURLKey.value; - - set kCFUserNotificationSoundURLKey(CFStringRef value) => - _kCFUserNotificationSoundURLKey.value = value; - - late final ffi.Pointer _kCFUserNotificationLocalizationURLKey = - _lookup('kCFUserNotificationLocalizationURLKey'); - - CFStringRef get kCFUserNotificationLocalizationURLKey => - _kCFUserNotificationLocalizationURLKey.value; - - set kCFUserNotificationLocalizationURLKey(CFStringRef value) => - _kCFUserNotificationLocalizationURLKey.value = value; - - late final ffi.Pointer _kCFUserNotificationAlertHeaderKey = - _lookup('kCFUserNotificationAlertHeaderKey'); - - CFStringRef get kCFUserNotificationAlertHeaderKey => - _kCFUserNotificationAlertHeaderKey.value; - - set kCFUserNotificationAlertHeaderKey(CFStringRef value) => - _kCFUserNotificationAlertHeaderKey.value = value; - - late final ffi.Pointer _kCFUserNotificationAlertMessageKey = - _lookup('kCFUserNotificationAlertMessageKey'); - - CFStringRef get kCFUserNotificationAlertMessageKey => - _kCFUserNotificationAlertMessageKey.value; - - set kCFUserNotificationAlertMessageKey(CFStringRef value) => - _kCFUserNotificationAlertMessageKey.value = value; - - late final ffi.Pointer - _kCFUserNotificationDefaultButtonTitleKey = - _lookup('kCFUserNotificationDefaultButtonTitleKey'); - - CFStringRef get kCFUserNotificationDefaultButtonTitleKey => - _kCFUserNotificationDefaultButtonTitleKey.value; - - set kCFUserNotificationDefaultButtonTitleKey(CFStringRef value) => - _kCFUserNotificationDefaultButtonTitleKey.value = value; - - late final ffi.Pointer - _kCFUserNotificationAlternateButtonTitleKey = - _lookup('kCFUserNotificationAlternateButtonTitleKey'); - - CFStringRef get kCFUserNotificationAlternateButtonTitleKey => - _kCFUserNotificationAlternateButtonTitleKey.value; - - set kCFUserNotificationAlternateButtonTitleKey(CFStringRef value) => - _kCFUserNotificationAlternateButtonTitleKey.value = value; - - late final ffi.Pointer _kCFUserNotificationOtherButtonTitleKey = - _lookup('kCFUserNotificationOtherButtonTitleKey'); - - CFStringRef get kCFUserNotificationOtherButtonTitleKey => - _kCFUserNotificationOtherButtonTitleKey.value; - - set kCFUserNotificationOtherButtonTitleKey(CFStringRef value) => - _kCFUserNotificationOtherButtonTitleKey.value = value; - - late final ffi.Pointer - _kCFUserNotificationProgressIndicatorValueKey = - _lookup('kCFUserNotificationProgressIndicatorValueKey'); - - CFStringRef get kCFUserNotificationProgressIndicatorValueKey => - _kCFUserNotificationProgressIndicatorValueKey.value; - - set kCFUserNotificationProgressIndicatorValueKey(CFStringRef value) => - _kCFUserNotificationProgressIndicatorValueKey.value = value; - - late final ffi.Pointer _kCFUserNotificationPopUpTitlesKey = - _lookup('kCFUserNotificationPopUpTitlesKey'); - - CFStringRef get kCFUserNotificationPopUpTitlesKey => - _kCFUserNotificationPopUpTitlesKey.value; - - set kCFUserNotificationPopUpTitlesKey(CFStringRef value) => - _kCFUserNotificationPopUpTitlesKey.value = value; - - late final ffi.Pointer _kCFUserNotificationTextFieldTitlesKey = - _lookup('kCFUserNotificationTextFieldTitlesKey'); - - CFStringRef get kCFUserNotificationTextFieldTitlesKey => - _kCFUserNotificationTextFieldTitlesKey.value; + ffi.Int Function( + ffi.Pointer)>>('acl_maximal_permset_mask_np'); + late final _acl_maximal_permset_mask_np = _acl_maximal_permset_mask_npPtr + .asFunction)>(); - set kCFUserNotificationTextFieldTitlesKey(CFStringRef value) => - _kCFUserNotificationTextFieldTitlesKey.value = value; + int acl_get_permset_mask_np( + acl_entry_t entry_d, + ffi.Pointer mask_p, + ) { + return _acl_get_permset_mask_np( + entry_d, + mask_p, + ); + } - late final ffi.Pointer _kCFUserNotificationCheckBoxTitlesKey = - _lookup('kCFUserNotificationCheckBoxTitlesKey'); + late final _acl_get_permset_mask_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(acl_entry_t, + ffi.Pointer)>>('acl_get_permset_mask_np'); + late final _acl_get_permset_mask_np = _acl_get_permset_mask_npPtr + .asFunction)>(); - CFStringRef get kCFUserNotificationCheckBoxTitlesKey => - _kCFUserNotificationCheckBoxTitlesKey.value; + int acl_set_permset_mask_np( + acl_entry_t entry_d, + int mask, + ) { + return _acl_set_permset_mask_np( + entry_d, + mask, + ); + } - set kCFUserNotificationCheckBoxTitlesKey(CFStringRef value) => - _kCFUserNotificationCheckBoxTitlesKey.value = value; + late final _acl_set_permset_mask_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + acl_entry_t, acl_permset_mask_t)>>('acl_set_permset_mask_np'); + late final _acl_set_permset_mask_np = + _acl_set_permset_mask_npPtr.asFunction(); - late final ffi.Pointer _kCFUserNotificationTextFieldValuesKey = - _lookup('kCFUserNotificationTextFieldValuesKey'); + int acl_add_flag_np( + acl_flagset_t flagset_d, + int flag, + ) { + return _acl_add_flag_np( + flagset_d, + flag, + ); + } - CFStringRef get kCFUserNotificationTextFieldValuesKey => - _kCFUserNotificationTextFieldValuesKey.value; + late final _acl_add_flag_npPtr = + _lookup>( + 'acl_add_flag_np'); + late final _acl_add_flag_np = + _acl_add_flag_npPtr.asFunction(); - set kCFUserNotificationTextFieldValuesKey(CFStringRef value) => - _kCFUserNotificationTextFieldValuesKey.value = value; + int acl_clear_flags_np( + acl_flagset_t flagset_d, + ) { + return _acl_clear_flags_np( + flagset_d, + ); + } - late final ffi.Pointer _kCFUserNotificationPopUpSelectionKey = - _lookup('kCFUserNotificationPopUpSelectionKey'); + late final _acl_clear_flags_npPtr = + _lookup>( + 'acl_clear_flags_np'); + late final _acl_clear_flags_np = + _acl_clear_flags_npPtr.asFunction(); - CFStringRef get kCFUserNotificationPopUpSelectionKey => - _kCFUserNotificationPopUpSelectionKey.value; + int acl_delete_flag_np( + acl_flagset_t flagset_d, + int flag, + ) { + return _acl_delete_flag_np( + flagset_d, + flag, + ); + } - set kCFUserNotificationPopUpSelectionKey(CFStringRef value) => - _kCFUserNotificationPopUpSelectionKey.value = value; + late final _acl_delete_flag_npPtr = + _lookup>( + 'acl_delete_flag_np'); + late final _acl_delete_flag_np = + _acl_delete_flag_npPtr.asFunction(); - late final ffi.Pointer _kCFUserNotificationAlertTopMostKey = - _lookup('kCFUserNotificationAlertTopMostKey'); + int acl_get_flag_np( + acl_flagset_t flagset_d, + int flag, + ) { + return _acl_get_flag_np( + flagset_d, + flag, + ); + } - CFStringRef get kCFUserNotificationAlertTopMostKey => - _kCFUserNotificationAlertTopMostKey.value; + late final _acl_get_flag_npPtr = + _lookup>( + 'acl_get_flag_np'); + late final _acl_get_flag_np = + _acl_get_flag_npPtr.asFunction(); - set kCFUserNotificationAlertTopMostKey(CFStringRef value) => - _kCFUserNotificationAlertTopMostKey.value = value; + int acl_get_flagset_np( + ffi.Pointer obj_p, + ffi.Pointer flagset_p, + ) { + return _acl_get_flagset_np( + obj_p, + flagset_p, + ); + } - late final ffi.Pointer _kCFUserNotificationKeyboardTypesKey = - _lookup('kCFUserNotificationKeyboardTypesKey'); + late final _acl_get_flagset_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('acl_get_flagset_np'); + late final _acl_get_flagset_np = _acl_get_flagset_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - CFStringRef get kCFUserNotificationKeyboardTypesKey => - _kCFUserNotificationKeyboardTypesKey.value; + int acl_set_flagset_np( + ffi.Pointer obj_p, + acl_flagset_t flagset_d, + ) { + return _acl_set_flagset_np( + obj_p, + flagset_d, + ); + } - set kCFUserNotificationKeyboardTypesKey(CFStringRef value) => - _kCFUserNotificationKeyboardTypesKey.value = value; + late final _acl_set_flagset_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, acl_flagset_t)>>('acl_set_flagset_np'); + late final _acl_set_flagset_np = _acl_set_flagset_npPtr + .asFunction, acl_flagset_t)>(); - int CFXMLNodeGetTypeID() { - return _CFXMLNodeGetTypeID(); + ffi.Pointer acl_get_qualifier( + acl_entry_t entry_d, + ) { + return _acl_get_qualifier( + entry_d, + ); } - late final _CFXMLNodeGetTypeIDPtr = - _lookup>('CFXMLNodeGetTypeID'); - late final _CFXMLNodeGetTypeID = - _CFXMLNodeGetTypeIDPtr.asFunction(); + late final _acl_get_qualifierPtr = + _lookup Function(acl_entry_t)>>( + 'acl_get_qualifier'); + late final _acl_get_qualifier = _acl_get_qualifierPtr + .asFunction Function(acl_entry_t)>(); - CFXMLNodeRef CFXMLNodeCreate( - CFAllocatorRef alloc, - int xmlType, - CFStringRef dataString, - ffi.Pointer additionalInfoPtr, - int version, + int acl_get_tag_type( + acl_entry_t entry_d, + ffi.Pointer tag_type_p, ) { - return _CFXMLNodeCreate( - alloc, - xmlType, - dataString, - additionalInfoPtr, - version, + return _acl_get_tag_type( + entry_d, + tag_type_p, ); } - late final _CFXMLNodeCreatePtr = _lookup< + late final _acl_get_tag_typePtr = _lookup< ffi.NativeFunction< - CFXMLNodeRef Function(CFAllocatorRef, ffi.Int32, CFStringRef, - ffi.Pointer, CFIndex)>>('CFXMLNodeCreate'); - late final _CFXMLNodeCreate = _CFXMLNodeCreatePtr.asFunction< - CFXMLNodeRef Function( - CFAllocatorRef, int, CFStringRef, ffi.Pointer, int)>(); + ffi.Int Function( + acl_entry_t, ffi.Pointer)>>('acl_get_tag_type'); + late final _acl_get_tag_type = _acl_get_tag_typePtr + .asFunction)>(); - CFXMLNodeRef CFXMLNodeCreateCopy( - CFAllocatorRef alloc, - CFXMLNodeRef origNode, + int acl_set_qualifier( + acl_entry_t entry_d, + ffi.Pointer tag_qualifier_p, ) { - return _CFXMLNodeCreateCopy( - alloc, - origNode, + return _acl_set_qualifier( + entry_d, + tag_qualifier_p, ); } - late final _CFXMLNodeCreateCopyPtr = _lookup< + late final _acl_set_qualifierPtr = _lookup< ffi.NativeFunction< - CFXMLNodeRef Function( - CFAllocatorRef, CFXMLNodeRef)>>('CFXMLNodeCreateCopy'); - late final _CFXMLNodeCreateCopy = _CFXMLNodeCreateCopyPtr.asFunction< - CFXMLNodeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); + ffi.Int Function( + acl_entry_t, ffi.Pointer)>>('acl_set_qualifier'); + late final _acl_set_qualifier = _acl_set_qualifierPtr + .asFunction)>(); - int CFXMLNodeGetTypeCode( - CFXMLNodeRef node, + int acl_set_tag_type( + acl_entry_t entry_d, + int tag_type, ) { - return _CFXMLNodeGetTypeCode( - node, + return _acl_set_tag_type( + entry_d, + tag_type, ); } - late final _CFXMLNodeGetTypeCodePtr = - _lookup>( - 'CFXMLNodeGetTypeCode'); - late final _CFXMLNodeGetTypeCode = - _CFXMLNodeGetTypeCodePtr.asFunction(); + late final _acl_set_tag_typePtr = + _lookup>( + 'acl_set_tag_type'); + late final _acl_set_tag_type = + _acl_set_tag_typePtr.asFunction(); - CFStringRef CFXMLNodeGetString( - CFXMLNodeRef node, + int acl_delete_def_file( + ffi.Pointer path_p, ) { - return _CFXMLNodeGetString( - node, + return _acl_delete_def_file( + path_p, ); } - late final _CFXMLNodeGetStringPtr = - _lookup>( - 'CFXMLNodeGetString'); - late final _CFXMLNodeGetString = - _CFXMLNodeGetStringPtr.asFunction(); + late final _acl_delete_def_filePtr = + _lookup)>>( + 'acl_delete_def_file'); + late final _acl_delete_def_file = + _acl_delete_def_filePtr.asFunction)>(); - ffi.Pointer CFXMLNodeGetInfoPtr( - CFXMLNodeRef node, + acl_t acl_get_fd( + int fd, ) { - return _CFXMLNodeGetInfoPtr( - node, + return _acl_get_fd( + fd, ); } - late final _CFXMLNodeGetInfoPtrPtr = - _lookup Function(CFXMLNodeRef)>>( - 'CFXMLNodeGetInfoPtr'); - late final _CFXMLNodeGetInfoPtr = _CFXMLNodeGetInfoPtrPtr.asFunction< - ffi.Pointer Function(CFXMLNodeRef)>(); + late final _acl_get_fdPtr = + _lookup>('acl_get_fd'); + late final _acl_get_fd = _acl_get_fdPtr.asFunction(); - int CFXMLNodeGetVersion( - CFXMLNodeRef node, + acl_t acl_get_fd_np( + int fd, + int type, ) { - return _CFXMLNodeGetVersion( - node, + return _acl_get_fd_np( + fd, + type, ); } - late final _CFXMLNodeGetVersionPtr = - _lookup>( - 'CFXMLNodeGetVersion'); - late final _CFXMLNodeGetVersion = - _CFXMLNodeGetVersionPtr.asFunction(); + late final _acl_get_fd_npPtr = + _lookup>( + 'acl_get_fd_np'); + late final _acl_get_fd_np = + _acl_get_fd_npPtr.asFunction(); - CFXMLTreeRef CFXMLTreeCreateWithNode( - CFAllocatorRef allocator, - CFXMLNodeRef node, + acl_t acl_get_file( + ffi.Pointer path_p, + int type, ) { - return _CFXMLTreeCreateWithNode( - allocator, - node, + return _acl_get_file( + path_p, + type, ); } - late final _CFXMLTreeCreateWithNodePtr = _lookup< - ffi.NativeFunction< - CFXMLTreeRef Function( - CFAllocatorRef, CFXMLNodeRef)>>('CFXMLTreeCreateWithNode'); - late final _CFXMLTreeCreateWithNode = _CFXMLTreeCreateWithNodePtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); + late final _acl_get_filePtr = _lookup< + ffi.NativeFunction, ffi.Int32)>>( + 'acl_get_file'); + late final _acl_get_file = + _acl_get_filePtr.asFunction, int)>(); - CFXMLNodeRef CFXMLTreeGetNode( - CFXMLTreeRef xmlTree, + acl_t acl_get_link_np( + ffi.Pointer path_p, + int type, ) { - return _CFXMLTreeGetNode( - xmlTree, + return _acl_get_link_np( + path_p, + type, ); } - late final _CFXMLTreeGetNodePtr = - _lookup>( - 'CFXMLTreeGetNode'); - late final _CFXMLTreeGetNode = - _CFXMLTreeGetNodePtr.asFunction(); + late final _acl_get_link_npPtr = _lookup< + ffi.NativeFunction, ffi.Int32)>>( + 'acl_get_link_np'); + late final _acl_get_link_np = _acl_get_link_npPtr + .asFunction, int)>(); - int CFXMLParserGetTypeID() { - return _CFXMLParserGetTypeID(); + int acl_set_fd( + int fd, + acl_t acl, + ) { + return _acl_set_fd( + fd, + acl, + ); } - late final _CFXMLParserGetTypeIDPtr = - _lookup>('CFXMLParserGetTypeID'); - late final _CFXMLParserGetTypeID = - _CFXMLParserGetTypeIDPtr.asFunction(); + late final _acl_set_fdPtr = + _lookup>( + 'acl_set_fd'); + late final _acl_set_fd = + _acl_set_fdPtr.asFunction(); - CFXMLParserRef CFXMLParserCreate( - CFAllocatorRef allocator, - CFDataRef xmlData, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ffi.Pointer callBacks, - ffi.Pointer context, + int acl_set_fd_np( + int fd, + acl_t acl, + int acl_type, ) { - return _CFXMLParserCreate( - allocator, - xmlData, - dataSource, - parseOptions, - versionOfNodes, - callBacks, - context, + return _acl_set_fd_np( + fd, + acl, + acl_type, ); } - late final _CFXMLParserCreatePtr = _lookup< - ffi.NativeFunction< - CFXMLParserRef Function( - CFAllocatorRef, - CFDataRef, - CFURLRef, - CFOptionFlags, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>('CFXMLParserCreate'); - late final _CFXMLParserCreate = _CFXMLParserCreatePtr.asFunction< - CFXMLParserRef Function( - CFAllocatorRef, - CFDataRef, - CFURLRef, - int, - int, - ffi.Pointer, - ffi.Pointer)>(); + late final _acl_set_fd_npPtr = + _lookup>( + 'acl_set_fd_np'); + late final _acl_set_fd_np = + _acl_set_fd_npPtr.asFunction(); - CFXMLParserRef CFXMLParserCreateWithDataFromURL( - CFAllocatorRef allocator, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ffi.Pointer callBacks, - ffi.Pointer context, + int acl_set_file( + ffi.Pointer path_p, + int type, + acl_t acl, ) { - return _CFXMLParserCreateWithDataFromURL( - allocator, - dataSource, - parseOptions, - versionOfNodes, - callBacks, - context, + return _acl_set_file( + path_p, + type, + acl, ); } - late final _CFXMLParserCreateWithDataFromURLPtr = _lookup< - ffi.NativeFunction< - CFXMLParserRef Function( - CFAllocatorRef, - CFURLRef, - CFOptionFlags, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>( - 'CFXMLParserCreateWithDataFromURL'); - late final _CFXMLParserCreateWithDataFromURL = - _CFXMLParserCreateWithDataFromURLPtr.asFunction< - CFXMLParserRef Function( - CFAllocatorRef, - CFURLRef, - int, - int, - ffi.Pointer, - ffi.Pointer)>(); + late final _acl_set_filePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int32, acl_t)>>('acl_set_file'); + late final _acl_set_file = _acl_set_filePtr + .asFunction, int, acl_t)>(); - void CFXMLParserGetContext( - CFXMLParserRef parser, - ffi.Pointer context, + int acl_set_link_np( + ffi.Pointer path_p, + int type, + acl_t acl, ) { - return _CFXMLParserGetContext( - parser, - context, + return _acl_set_link_np( + path_p, + type, + acl, ); } - late final _CFXMLParserGetContextPtr = _lookup< + late final _acl_set_link_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFXMLParserRef, - ffi.Pointer)>>('CFXMLParserGetContext'); - late final _CFXMLParserGetContext = _CFXMLParserGetContextPtr.asFunction< - void Function(CFXMLParserRef, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Int32, acl_t)>>('acl_set_link_np'); + late final _acl_set_link_np = _acl_set_link_npPtr + .asFunction, int, acl_t)>(); - void CFXMLParserGetCallBacks( - CFXMLParserRef parser, - ffi.Pointer callBacks, + int acl_copy_ext( + ffi.Pointer buf_p, + acl_t acl, + int size, ) { - return _CFXMLParserGetCallBacks( - parser, - callBacks, + return _acl_copy_ext( + buf_p, + acl, + size, ); } - late final _CFXMLParserGetCallBacksPtr = _lookup< + late final _acl_copy_extPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFXMLParserRef, - ffi.Pointer)>>('CFXMLParserGetCallBacks'); - late final _CFXMLParserGetCallBacks = _CFXMLParserGetCallBacksPtr.asFunction< - void Function(CFXMLParserRef, ffi.Pointer)>(); + ssize_t Function( + ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext'); + late final _acl_copy_ext = _acl_copy_extPtr + .asFunction, acl_t, int)>(); - CFURLRef CFXMLParserGetSourceURL( - CFXMLParserRef parser, + int acl_copy_ext_native( + ffi.Pointer buf_p, + acl_t acl, + int size, ) { - return _CFXMLParserGetSourceURL( - parser, + return _acl_copy_ext_native( + buf_p, + acl, + size, ); } - late final _CFXMLParserGetSourceURLPtr = - _lookup>( - 'CFXMLParserGetSourceURL'); - late final _CFXMLParserGetSourceURL = _CFXMLParserGetSourceURLPtr.asFunction< - CFURLRef Function(CFXMLParserRef)>(); + late final _acl_copy_ext_nativePtr = _lookup< + ffi.NativeFunction< + ssize_t Function( + ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext_native'); + late final _acl_copy_ext_native = _acl_copy_ext_nativePtr + .asFunction, acl_t, int)>(); - int CFXMLParserGetLocation( - CFXMLParserRef parser, + acl_t acl_copy_int( + ffi.Pointer buf_p, ) { - return _CFXMLParserGetLocation( - parser, + return _acl_copy_int( + buf_p, ); } - late final _CFXMLParserGetLocationPtr = - _lookup>( - 'CFXMLParserGetLocation'); - late final _CFXMLParserGetLocation = - _CFXMLParserGetLocationPtr.asFunction(); + late final _acl_copy_intPtr = + _lookup)>>( + 'acl_copy_int'); + late final _acl_copy_int = + _acl_copy_intPtr.asFunction)>(); - int CFXMLParserGetLineNumber( - CFXMLParserRef parser, + acl_t acl_copy_int_native( + ffi.Pointer buf_p, ) { - return _CFXMLParserGetLineNumber( - parser, + return _acl_copy_int_native( + buf_p, ); } - late final _CFXMLParserGetLineNumberPtr = - _lookup>( - 'CFXMLParserGetLineNumber'); - late final _CFXMLParserGetLineNumber = - _CFXMLParserGetLineNumberPtr.asFunction(); + late final _acl_copy_int_nativePtr = + _lookup)>>( + 'acl_copy_int_native'); + late final _acl_copy_int_native = _acl_copy_int_nativePtr + .asFunction)>(); - ffi.Pointer CFXMLParserGetDocument( - CFXMLParserRef parser, + acl_t acl_from_text( + ffi.Pointer buf_p, ) { - return _CFXMLParserGetDocument( - parser, + return _acl_from_text( + buf_p, ); } - late final _CFXMLParserGetDocumentPtr = _lookup< - ffi.NativeFunction Function(CFXMLParserRef)>>( - 'CFXMLParserGetDocument'); - late final _CFXMLParserGetDocument = _CFXMLParserGetDocumentPtr.asFunction< - ffi.Pointer Function(CFXMLParserRef)>(); + late final _acl_from_textPtr = + _lookup)>>( + 'acl_from_text'); + late final _acl_from_text = + _acl_from_textPtr.asFunction)>(); - int CFXMLParserGetStatusCode( - CFXMLParserRef parser, + int acl_size( + acl_t acl, ) { - return _CFXMLParserGetStatusCode( - parser, + return _acl_size( + acl, ); } - late final _CFXMLParserGetStatusCodePtr = - _lookup>( - 'CFXMLParserGetStatusCode'); - late final _CFXMLParserGetStatusCode = - _CFXMLParserGetStatusCodePtr.asFunction(); + late final _acl_sizePtr = + _lookup>('acl_size'); + late final _acl_size = _acl_sizePtr.asFunction(); - CFStringRef CFXMLParserCopyErrorDescription( - CFXMLParserRef parser, + ffi.Pointer acl_to_text( + acl_t acl, + ffi.Pointer len_p, ) { - return _CFXMLParserCopyErrorDescription( - parser, + return _acl_to_text( + acl, + len_p, ); } - late final _CFXMLParserCopyErrorDescriptionPtr = - _lookup>( - 'CFXMLParserCopyErrorDescription'); - late final _CFXMLParserCopyErrorDescription = - _CFXMLParserCopyErrorDescriptionPtr.asFunction< - CFStringRef Function(CFXMLParserRef)>(); + late final _acl_to_textPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + acl_t, ffi.Pointer)>>('acl_to_text'); + late final _acl_to_text = _acl_to_textPtr.asFunction< + ffi.Pointer Function(acl_t, ffi.Pointer)>(); - void CFXMLParserAbort( - CFXMLParserRef parser, - int errorCode, - CFStringRef errorDescription, - ) { - return _CFXMLParserAbort( - parser, - errorCode, - errorDescription, - ); + int CFFileSecurityGetTypeID() { + return _CFFileSecurityGetTypeID(); } - late final _CFXMLParserAbortPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFXMLParserRef, ffi.Int32, CFStringRef)>>('CFXMLParserAbort'); - late final _CFXMLParserAbort = _CFXMLParserAbortPtr.asFunction< - void Function(CFXMLParserRef, int, CFStringRef)>(); + late final _CFFileSecurityGetTypeIDPtr = + _lookup>( + 'CFFileSecurityGetTypeID'); + late final _CFFileSecurityGetTypeID = + _CFFileSecurityGetTypeIDPtr.asFunction(); - int CFXMLParserParse( - CFXMLParserRef parser, + CFFileSecurityRef CFFileSecurityCreate( + CFAllocatorRef allocator, ) { - return _CFXMLParserParse( - parser, + return _CFFileSecurityCreate( + allocator, ); } - late final _CFXMLParserParsePtr = - _lookup>( - 'CFXMLParserParse'); - late final _CFXMLParserParse = - _CFXMLParserParsePtr.asFunction(); + late final _CFFileSecurityCreatePtr = + _lookup>( + 'CFFileSecurityCreate'); + late final _CFFileSecurityCreate = _CFFileSecurityCreatePtr.asFunction< + CFFileSecurityRef Function(CFAllocatorRef)>(); - CFXMLTreeRef CFXMLTreeCreateFromData( + CFFileSecurityRef CFFileSecurityCreateCopy( CFAllocatorRef allocator, - CFDataRef xmlData, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, + CFFileSecurityRef fileSec, ) { - return _CFXMLTreeCreateFromData( + return _CFFileSecurityCreateCopy( allocator, - xmlData, - dataSource, - parseOptions, - versionOfNodes, + fileSec, ); } - late final _CFXMLTreeCreateFromDataPtr = _lookup< + late final _CFFileSecurityCreateCopyPtr = _lookup< ffi.NativeFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, - CFOptionFlags, CFIndex)>>('CFXMLTreeCreateFromData'); - late final _CFXMLTreeCreateFromData = _CFXMLTreeCreateFromDataPtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int)>(); + CFFileSecurityRef Function( + CFAllocatorRef, CFFileSecurityRef)>>('CFFileSecurityCreateCopy'); + late final _CFFileSecurityCreateCopy = + _CFFileSecurityCreateCopyPtr.asFunction< + CFFileSecurityRef Function(CFAllocatorRef, CFFileSecurityRef)>(); - CFXMLTreeRef CFXMLTreeCreateFromDataWithError( - CFAllocatorRef allocator, - CFDataRef xmlData, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ffi.Pointer errorDict, + int CFFileSecurityCopyOwnerUUID( + CFFileSecurityRef fileSec, + ffi.Pointer ownerUUID, ) { - return _CFXMLTreeCreateFromDataWithError( - allocator, - xmlData, - dataSource, - parseOptions, - versionOfNodes, - errorDict, + return _CFFileSecurityCopyOwnerUUID( + fileSec, + ownerUUID, ); } - late final _CFXMLTreeCreateFromDataWithErrorPtr = _lookup< - ffi.NativeFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, - CFOptionFlags, CFIndex, ffi.Pointer)>>( - 'CFXMLTreeCreateFromDataWithError'); - late final _CFXMLTreeCreateFromDataWithError = - _CFXMLTreeCreateFromDataWithErrorPtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int, - ffi.Pointer)>(); + late final _CFFileSecurityCopyOwnerUUIDPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyOwnerUUID'); + late final _CFFileSecurityCopyOwnerUUID = _CFFileSecurityCopyOwnerUUIDPtr + .asFunction)>(); - CFXMLTreeRef CFXMLTreeCreateWithDataFromURL( - CFAllocatorRef allocator, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, + int CFFileSecuritySetOwnerUUID( + CFFileSecurityRef fileSec, + CFUUIDRef ownerUUID, ) { - return _CFXMLTreeCreateWithDataFromURL( - allocator, - dataSource, - parseOptions, - versionOfNodes, + return _CFFileSecuritySetOwnerUUID( + fileSec, + ownerUUID, ); } - late final _CFXMLTreeCreateWithDataFromURLPtr = _lookup< - ffi.NativeFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, CFOptionFlags, - CFIndex)>>('CFXMLTreeCreateWithDataFromURL'); - late final _CFXMLTreeCreateWithDataFromURL = - _CFXMLTreeCreateWithDataFromURLPtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, int, int)>(); + late final _CFFileSecuritySetOwnerUUIDPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecuritySetOwnerUUID'); + late final _CFFileSecuritySetOwnerUUID = _CFFileSecuritySetOwnerUUIDPtr + .asFunction(); - CFDataRef CFXMLTreeCreateXMLData( - CFAllocatorRef allocator, - CFXMLTreeRef xmlTree, + int CFFileSecurityCopyGroupUUID( + CFFileSecurityRef fileSec, + ffi.Pointer groupUUID, ) { - return _CFXMLTreeCreateXMLData( - allocator, - xmlTree, + return _CFFileSecurityCopyGroupUUID( + fileSec, + groupUUID, ); } - late final _CFXMLTreeCreateXMLDataPtr = _lookup< - ffi.NativeFunction>( - 'CFXMLTreeCreateXMLData'); - late final _CFXMLTreeCreateXMLData = _CFXMLTreeCreateXMLDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFXMLTreeRef)>(); + late final _CFFileSecurityCopyGroupUUIDPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyGroupUUID'); + late final _CFFileSecurityCopyGroupUUID = _CFFileSecurityCopyGroupUUIDPtr + .asFunction)>(); - CFStringRef CFXMLCreateStringByEscapingEntities( - CFAllocatorRef allocator, - CFStringRef string, - CFDictionaryRef entitiesDictionary, + int CFFileSecuritySetGroupUUID( + CFFileSecurityRef fileSec, + CFUUIDRef groupUUID, ) { - return _CFXMLCreateStringByEscapingEntities( - allocator, - string, - entitiesDictionary, + return _CFFileSecuritySetGroupUUID( + fileSec, + groupUUID, ); } - late final _CFXMLCreateStringByEscapingEntitiesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFDictionaryRef)>>('CFXMLCreateStringByEscapingEntities'); - late final _CFXMLCreateStringByEscapingEntities = - _CFXMLCreateStringByEscapingEntitiesPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); + late final _CFFileSecuritySetGroupUUIDPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecuritySetGroupUUID'); + late final _CFFileSecuritySetGroupUUID = _CFFileSecuritySetGroupUUIDPtr + .asFunction(); - CFStringRef CFXMLCreateStringByUnescapingEntities( - CFAllocatorRef allocator, - CFStringRef string, - CFDictionaryRef entitiesDictionary, + int CFFileSecurityCopyAccessControlList( + CFFileSecurityRef fileSec, + ffi.Pointer accessControlList, ) { - return _CFXMLCreateStringByUnescapingEntities( - allocator, - string, - entitiesDictionary, + return _CFFileSecurityCopyAccessControlList( + fileSec, + accessControlList, ); } - late final _CFXMLCreateStringByUnescapingEntitiesPtr = _lookup< + late final _CFFileSecurityCopyAccessControlListPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFDictionaryRef)>>('CFXMLCreateStringByUnescapingEntities'); - late final _CFXMLCreateStringByUnescapingEntities = - _CFXMLCreateStringByUnescapingEntitiesPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyAccessControlList'); + late final _CFFileSecurityCopyAccessControlList = + _CFFileSecurityCopyAccessControlListPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - late final ffi.Pointer _kCFXMLTreeErrorDescription = - _lookup('kCFXMLTreeErrorDescription'); + int CFFileSecuritySetAccessControlList( + CFFileSecurityRef fileSec, + acl_t accessControlList, + ) { + return _CFFileSecuritySetAccessControlList( + fileSec, + accessControlList, + ); + } - CFStringRef get kCFXMLTreeErrorDescription => - _kCFXMLTreeErrorDescription.value; + late final _CFFileSecuritySetAccessControlListPtr = + _lookup>( + 'CFFileSecuritySetAccessControlList'); + late final _CFFileSecuritySetAccessControlList = + _CFFileSecuritySetAccessControlListPtr.asFunction< + int Function(CFFileSecurityRef, acl_t)>(); - set kCFXMLTreeErrorDescription(CFStringRef value) => - _kCFXMLTreeErrorDescription.value = value; + int CFFileSecurityGetOwner( + CFFileSecurityRef fileSec, + ffi.Pointer owner, + ) { + return _CFFileSecurityGetOwner( + fileSec, + owner, + ); + } - late final ffi.Pointer _kCFXMLTreeErrorLineNumber = - _lookup('kCFXMLTreeErrorLineNumber'); + late final _CFFileSecurityGetOwnerPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetOwner'); + late final _CFFileSecurityGetOwner = _CFFileSecurityGetOwnerPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - CFStringRef get kCFXMLTreeErrorLineNumber => _kCFXMLTreeErrorLineNumber.value; + int CFFileSecuritySetOwner( + CFFileSecurityRef fileSec, + int owner, + ) { + return _CFFileSecuritySetOwner( + fileSec, + owner, + ); + } - set kCFXMLTreeErrorLineNumber(CFStringRef value) => - _kCFXMLTreeErrorLineNumber.value = value; + late final _CFFileSecuritySetOwnerPtr = + _lookup>( + 'CFFileSecuritySetOwner'); + late final _CFFileSecuritySetOwner = _CFFileSecuritySetOwnerPtr.asFunction< + int Function(CFFileSecurityRef, int)>(); - late final ffi.Pointer _kCFXMLTreeErrorLocation = - _lookup('kCFXMLTreeErrorLocation'); - - CFStringRef get kCFXMLTreeErrorLocation => _kCFXMLTreeErrorLocation.value; - - set kCFXMLTreeErrorLocation(CFStringRef value) => - _kCFXMLTreeErrorLocation.value = value; - - late final ffi.Pointer _kCFXMLTreeErrorStatusCode = - _lookup('kCFXMLTreeErrorStatusCode'); - - CFStringRef get kCFXMLTreeErrorStatusCode => _kCFXMLTreeErrorStatusCode.value; - - set kCFXMLTreeErrorStatusCode(CFStringRef value) => - _kCFXMLTreeErrorStatusCode.value = value; - - late final ffi.Pointer _kSecPropertyTypeTitle = - _lookup('kSecPropertyTypeTitle'); - - CFStringRef get kSecPropertyTypeTitle => _kSecPropertyTypeTitle.value; - - set kSecPropertyTypeTitle(CFStringRef value) => - _kSecPropertyTypeTitle.value = value; - - late final ffi.Pointer _kSecPropertyTypeError = - _lookup('kSecPropertyTypeError'); - - CFStringRef get kSecPropertyTypeError => _kSecPropertyTypeError.value; - - set kSecPropertyTypeError(CFStringRef value) => - _kSecPropertyTypeError.value = value; - - late final ffi.Pointer _kSecTrustEvaluationDate = - _lookup('kSecTrustEvaluationDate'); - - CFStringRef get kSecTrustEvaluationDate => _kSecTrustEvaluationDate.value; - - set kSecTrustEvaluationDate(CFStringRef value) => - _kSecTrustEvaluationDate.value = value; - - late final ffi.Pointer _kSecTrustExtendedValidation = - _lookup('kSecTrustExtendedValidation'); - - CFStringRef get kSecTrustExtendedValidation => - _kSecTrustExtendedValidation.value; - - set kSecTrustExtendedValidation(CFStringRef value) => - _kSecTrustExtendedValidation.value = value; - - late final ffi.Pointer _kSecTrustOrganizationName = - _lookup('kSecTrustOrganizationName'); - - CFStringRef get kSecTrustOrganizationName => _kSecTrustOrganizationName.value; - - set kSecTrustOrganizationName(CFStringRef value) => - _kSecTrustOrganizationName.value = value; - - late final ffi.Pointer _kSecTrustResultValue = - _lookup('kSecTrustResultValue'); - - CFStringRef get kSecTrustResultValue => _kSecTrustResultValue.value; - - set kSecTrustResultValue(CFStringRef value) => - _kSecTrustResultValue.value = value; - - late final ffi.Pointer _kSecTrustRevocationChecked = - _lookup('kSecTrustRevocationChecked'); - - CFStringRef get kSecTrustRevocationChecked => - _kSecTrustRevocationChecked.value; - - set kSecTrustRevocationChecked(CFStringRef value) => - _kSecTrustRevocationChecked.value = value; - - late final ffi.Pointer _kSecTrustRevocationValidUntilDate = - _lookup('kSecTrustRevocationValidUntilDate'); - - CFStringRef get kSecTrustRevocationValidUntilDate => - _kSecTrustRevocationValidUntilDate.value; - - set kSecTrustRevocationValidUntilDate(CFStringRef value) => - _kSecTrustRevocationValidUntilDate.value = value; - - late final ffi.Pointer _kSecTrustCertificateTransparency = - _lookup('kSecTrustCertificateTransparency'); - - CFStringRef get kSecTrustCertificateTransparency => - _kSecTrustCertificateTransparency.value; - - set kSecTrustCertificateTransparency(CFStringRef value) => - _kSecTrustCertificateTransparency.value = value; - - late final ffi.Pointer - _kSecTrustCertificateTransparencyWhiteList = - _lookup('kSecTrustCertificateTransparencyWhiteList'); - - CFStringRef get kSecTrustCertificateTransparencyWhiteList => - _kSecTrustCertificateTransparencyWhiteList.value; - - set kSecTrustCertificateTransparencyWhiteList(CFStringRef value) => - _kSecTrustCertificateTransparencyWhiteList.value = value; - - int SecTrustGetTypeID() { - return _SecTrustGetTypeID(); - } - - late final _SecTrustGetTypeIDPtr = - _lookup>('SecTrustGetTypeID'); - late final _SecTrustGetTypeID = - _SecTrustGetTypeIDPtr.asFunction(); - - int SecTrustCreateWithCertificates( - CFTypeRef certificates, - CFTypeRef policies, - ffi.Pointer trust, + int CFFileSecurityGetGroup( + CFFileSecurityRef fileSec, + ffi.Pointer group, ) { - return _SecTrustCreateWithCertificates( - certificates, - policies, - trust, + return _CFFileSecurityGetGroup( + fileSec, + group, ); } - late final _SecTrustCreateWithCertificatesPtr = _lookup< + late final _CFFileSecurityGetGroupPtr = _lookup< ffi.NativeFunction< - OSStatus Function(CFTypeRef, CFTypeRef, - ffi.Pointer)>>('SecTrustCreateWithCertificates'); - late final _SecTrustCreateWithCertificates = - _SecTrustCreateWithCertificatesPtr.asFunction< - int Function(CFTypeRef, CFTypeRef, ffi.Pointer)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetGroup'); + late final _CFFileSecurityGetGroup = _CFFileSecurityGetGroupPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - int SecTrustSetPolicies( - SecTrustRef trust, - CFTypeRef policies, + int CFFileSecuritySetGroup( + CFFileSecurityRef fileSec, + int group, ) { - return _SecTrustSetPolicies( - trust, - policies, + return _CFFileSecuritySetGroup( + fileSec, + group, ); } - late final _SecTrustSetPoliciesPtr = - _lookup>( - 'SecTrustSetPolicies'); - late final _SecTrustSetPolicies = _SecTrustSetPoliciesPtr.asFunction< - int Function(SecTrustRef, CFTypeRef)>(); + late final _CFFileSecuritySetGroupPtr = + _lookup>( + 'CFFileSecuritySetGroup'); + late final _CFFileSecuritySetGroup = _CFFileSecuritySetGroupPtr.asFunction< + int Function(CFFileSecurityRef, int)>(); - int SecTrustCopyPolicies( - SecTrustRef trust, - ffi.Pointer policies, + int CFFileSecurityGetMode( + CFFileSecurityRef fileSec, + ffi.Pointer mode, ) { - return _SecTrustCopyPolicies( - trust, - policies, + return _CFFileSecurityGetMode( + fileSec, + mode, ); } - late final _SecTrustCopyPoliciesPtr = _lookup< + late final _CFFileSecurityGetModePtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SecTrustRef, ffi.Pointer)>>('SecTrustCopyPolicies'); - late final _SecTrustCopyPolicies = _SecTrustCopyPoliciesPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetMode'); + late final _CFFileSecurityGetMode = _CFFileSecurityGetModePtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - int SecTrustSetNetworkFetchAllowed( - SecTrustRef trust, - int allowFetch, + int CFFileSecuritySetMode( + CFFileSecurityRef fileSec, + int mode, ) { - return _SecTrustSetNetworkFetchAllowed( - trust, - allowFetch, + return _CFFileSecuritySetMode( + fileSec, + mode, ); } - late final _SecTrustSetNetworkFetchAllowedPtr = - _lookup>( - 'SecTrustSetNetworkFetchAllowed'); - late final _SecTrustSetNetworkFetchAllowed = - _SecTrustSetNetworkFetchAllowedPtr.asFunction< - int Function(SecTrustRef, int)>(); + late final _CFFileSecuritySetModePtr = + _lookup>( + 'CFFileSecuritySetMode'); + late final _CFFileSecuritySetMode = _CFFileSecuritySetModePtr.asFunction< + int Function(CFFileSecurityRef, int)>(); - int SecTrustGetNetworkFetchAllowed( - SecTrustRef trust, - ffi.Pointer allowFetch, + int CFFileSecurityClearProperties( + CFFileSecurityRef fileSec, + int clearPropertyMask, ) { - return _SecTrustGetNetworkFetchAllowed( - trust, - allowFetch, + return _CFFileSecurityClearProperties( + fileSec, + clearPropertyMask, ); } - late final _SecTrustGetNetworkFetchAllowedPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>('SecTrustGetNetworkFetchAllowed'); - late final _SecTrustGetNetworkFetchAllowed = - _SecTrustGetNetworkFetchAllowedPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final _CFFileSecurityClearPropertiesPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecurityClearProperties'); + late final _CFFileSecurityClearProperties = _CFFileSecurityClearPropertiesPtr + .asFunction(); - int SecTrustSetAnchorCertificates( - SecTrustRef trust, - CFArrayRef anchorCertificates, + CFStringRef CFStringTokenizerCopyBestStringLanguage( + CFStringRef string, + CFRange range, ) { - return _SecTrustSetAnchorCertificates( - trust, - anchorCertificates, + return _CFStringTokenizerCopyBestStringLanguage( + string, + range, ); } - late final _SecTrustSetAnchorCertificatesPtr = - _lookup>( - 'SecTrustSetAnchorCertificates'); - late final _SecTrustSetAnchorCertificates = _SecTrustSetAnchorCertificatesPtr - .asFunction(); + late final _CFStringTokenizerCopyBestStringLanguagePtr = + _lookup>( + 'CFStringTokenizerCopyBestStringLanguage'); + late final _CFStringTokenizerCopyBestStringLanguage = + _CFStringTokenizerCopyBestStringLanguagePtr.asFunction< + CFStringRef Function(CFStringRef, CFRange)>(); - int SecTrustSetAnchorCertificatesOnly( - SecTrustRef trust, - int anchorCertificatesOnly, - ) { - return _SecTrustSetAnchorCertificatesOnly( - trust, - anchorCertificatesOnly, - ); + int CFStringTokenizerGetTypeID() { + return _CFStringTokenizerGetTypeID(); } - late final _SecTrustSetAnchorCertificatesOnlyPtr = - _lookup>( - 'SecTrustSetAnchorCertificatesOnly'); - late final _SecTrustSetAnchorCertificatesOnly = - _SecTrustSetAnchorCertificatesOnlyPtr.asFunction< - int Function(SecTrustRef, int)>(); + late final _CFStringTokenizerGetTypeIDPtr = + _lookup>( + 'CFStringTokenizerGetTypeID'); + late final _CFStringTokenizerGetTypeID = + _CFStringTokenizerGetTypeIDPtr.asFunction(); - int SecTrustCopyCustomAnchorCertificates( - SecTrustRef trust, - ffi.Pointer anchors, + CFStringTokenizerRef CFStringTokenizerCreate( + CFAllocatorRef alloc, + CFStringRef string, + CFRange range, + int options, + CFLocaleRef locale, ) { - return _SecTrustCopyCustomAnchorCertificates( - trust, - anchors, + return _CFStringTokenizerCreate( + alloc, + string, + range, + options, + locale, ); } - late final _SecTrustCopyCustomAnchorCertificatesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, ffi.Pointer)>>( - 'SecTrustCopyCustomAnchorCertificates'); - late final _SecTrustCopyCustomAnchorCertificates = - _SecTrustCopyCustomAnchorCertificatesPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final _CFStringTokenizerCreatePtr = _lookup< + ffi.NativeFunction< + CFStringTokenizerRef Function(CFAllocatorRef, CFStringRef, CFRange, + CFOptionFlags, CFLocaleRef)>>('CFStringTokenizerCreate'); + late final _CFStringTokenizerCreate = _CFStringTokenizerCreatePtr.asFunction< + CFStringTokenizerRef Function( + CFAllocatorRef, CFStringRef, CFRange, int, CFLocaleRef)>(); - int SecTrustSetVerifyDate( - SecTrustRef trust, - CFDateRef verifyDate, + void CFStringTokenizerSetString( + CFStringTokenizerRef tokenizer, + CFStringRef string, + CFRange range, ) { - return _SecTrustSetVerifyDate( - trust, - verifyDate, + return _CFStringTokenizerSetString( + tokenizer, + string, + range, ); } - late final _SecTrustSetVerifyDatePtr = - _lookup>( - 'SecTrustSetVerifyDate'); - late final _SecTrustSetVerifyDate = _SecTrustSetVerifyDatePtr.asFunction< - int Function(SecTrustRef, CFDateRef)>(); + late final _CFStringTokenizerSetStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringTokenizerRef, CFStringRef, + CFRange)>>('CFStringTokenizerSetString'); + late final _CFStringTokenizerSetString = _CFStringTokenizerSetStringPtr + .asFunction(); - double SecTrustGetVerifyTime( - SecTrustRef trust, + int CFStringTokenizerGoToTokenAtIndex( + CFStringTokenizerRef tokenizer, + int index, ) { - return _SecTrustGetVerifyTime( - trust, + return _CFStringTokenizerGoToTokenAtIndex( + tokenizer, + index, ); } - late final _SecTrustGetVerifyTimePtr = - _lookup>( - 'SecTrustGetVerifyTime'); - late final _SecTrustGetVerifyTime = - _SecTrustGetVerifyTimePtr.asFunction(); + late final _CFStringTokenizerGoToTokenAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFStringTokenizerRef, + CFIndex)>>('CFStringTokenizerGoToTokenAtIndex'); + late final _CFStringTokenizerGoToTokenAtIndex = + _CFStringTokenizerGoToTokenAtIndexPtr.asFunction< + int Function(CFStringTokenizerRef, int)>(); - int SecTrustEvaluate( - SecTrustRef trust, - ffi.Pointer result, + int CFStringTokenizerAdvanceToNextToken( + CFStringTokenizerRef tokenizer, ) { - return _SecTrustEvaluate( - trust, - result, + return _CFStringTokenizerAdvanceToNextToken( + tokenizer, ); } - late final _SecTrustEvaluatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecTrustRef, ffi.Pointer)>>('SecTrustEvaluate'); - late final _SecTrustEvaluate = _SecTrustEvaluatePtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final _CFStringTokenizerAdvanceToNextTokenPtr = + _lookup>( + 'CFStringTokenizerAdvanceToNextToken'); + late final _CFStringTokenizerAdvanceToNextToken = + _CFStringTokenizerAdvanceToNextTokenPtr.asFunction< + int Function(CFStringTokenizerRef)>(); - int SecTrustEvaluateAsync( - SecTrustRef trust, - dispatch_queue_t queue, - SecTrustCallback result, + CFRange CFStringTokenizerGetCurrentTokenRange( + CFStringTokenizerRef tokenizer, ) { - return _SecTrustEvaluateAsync( - trust, - queue, - result, + return _CFStringTokenizerGetCurrentTokenRange( + tokenizer, ); } - late final _SecTrustEvaluateAsyncPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, dispatch_queue_t, - SecTrustCallback)>>('SecTrustEvaluateAsync'); - late final _SecTrustEvaluateAsync = _SecTrustEvaluateAsyncPtr.asFunction< - int Function(SecTrustRef, dispatch_queue_t, SecTrustCallback)>(); + late final _CFStringTokenizerGetCurrentTokenRangePtr = + _lookup>( + 'CFStringTokenizerGetCurrentTokenRange'); + late final _CFStringTokenizerGetCurrentTokenRange = + _CFStringTokenizerGetCurrentTokenRangePtr.asFunction< + CFRange Function(CFStringTokenizerRef)>(); - bool SecTrustEvaluateWithError( - SecTrustRef trust, - ffi.Pointer error, + CFTypeRef CFStringTokenizerCopyCurrentTokenAttribute( + CFStringTokenizerRef tokenizer, + int attribute, ) { - return _SecTrustEvaluateWithError( - trust, - error, + return _CFStringTokenizerCopyCurrentTokenAttribute( + tokenizer, + attribute, ); } - late final _SecTrustEvaluateWithErrorPtr = _lookup< + late final _CFStringTokenizerCopyCurrentTokenAttributePtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(SecTrustRef, - ffi.Pointer)>>('SecTrustEvaluateWithError'); - late final _SecTrustEvaluateWithError = _SecTrustEvaluateWithErrorPtr - .asFunction)>(); + CFTypeRef Function(CFStringTokenizerRef, + CFOptionFlags)>>('CFStringTokenizerCopyCurrentTokenAttribute'); + late final _CFStringTokenizerCopyCurrentTokenAttribute = + _CFStringTokenizerCopyCurrentTokenAttributePtr.asFunction< + CFTypeRef Function(CFStringTokenizerRef, int)>(); - int SecTrustEvaluateAsyncWithError( - SecTrustRef trust, - dispatch_queue_t queue, - SecTrustWithErrorCallback result, + int CFStringTokenizerGetCurrentSubTokens( + CFStringTokenizerRef tokenizer, + ffi.Pointer ranges, + int maxRangeLength, + CFMutableArrayRef derivedSubTokens, ) { - return _SecTrustEvaluateAsyncWithError( - trust, - queue, - result, + return _CFStringTokenizerGetCurrentSubTokens( + tokenizer, + ranges, + maxRangeLength, + derivedSubTokens, ); } - late final _SecTrustEvaluateAsyncWithErrorPtr = _lookup< + late final _CFStringTokenizerGetCurrentSubTokensPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecTrustRef, dispatch_queue_t, - SecTrustWithErrorCallback)>>('SecTrustEvaluateAsyncWithError'); - late final _SecTrustEvaluateAsyncWithError = - _SecTrustEvaluateAsyncWithErrorPtr.asFunction< - int Function( - SecTrustRef, dispatch_queue_t, SecTrustWithErrorCallback)>(); + CFIndex Function(CFStringTokenizerRef, ffi.Pointer, CFIndex, + CFMutableArrayRef)>>('CFStringTokenizerGetCurrentSubTokens'); + late final _CFStringTokenizerGetCurrentSubTokens = + _CFStringTokenizerGetCurrentSubTokensPtr.asFunction< + int Function(CFStringTokenizerRef, ffi.Pointer, int, + CFMutableArrayRef)>(); - int SecTrustGetTrustResult( - SecTrustRef trust, - ffi.Pointer result, - ) { - return _SecTrustGetTrustResult( - trust, - result, - ); + int CFFileDescriptorGetTypeID() { + return _CFFileDescriptorGetTypeID(); } - late final _SecTrustGetTrustResultPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecTrustRef, ffi.Pointer)>>('SecTrustGetTrustResult'); - late final _SecTrustGetTrustResult = _SecTrustGetTrustResultPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final _CFFileDescriptorGetTypeIDPtr = + _lookup>( + 'CFFileDescriptorGetTypeID'); + late final _CFFileDescriptorGetTypeID = + _CFFileDescriptorGetTypeIDPtr.asFunction(); - SecKeyRef SecTrustCopyPublicKey( - SecTrustRef trust, + CFFileDescriptorRef CFFileDescriptorCreate( + CFAllocatorRef allocator, + int fd, + int closeOnInvalidate, + CFFileDescriptorCallBack callout, + ffi.Pointer context, ) { - return _SecTrustCopyPublicKey( - trust, + return _CFFileDescriptorCreate( + allocator, + fd, + closeOnInvalidate, + callout, + context, ); } - late final _SecTrustCopyPublicKeyPtr = - _lookup>( - 'SecTrustCopyPublicKey'); - late final _SecTrustCopyPublicKey = - _SecTrustCopyPublicKeyPtr.asFunction(); + late final _CFFileDescriptorCreatePtr = _lookup< + ffi.NativeFunction< + CFFileDescriptorRef Function( + CFAllocatorRef, + CFFileDescriptorNativeDescriptor, + Boolean, + CFFileDescriptorCallBack, + ffi.Pointer)>>('CFFileDescriptorCreate'); + late final _CFFileDescriptorCreate = _CFFileDescriptorCreatePtr.asFunction< + CFFileDescriptorRef Function(CFAllocatorRef, int, int, + CFFileDescriptorCallBack, ffi.Pointer)>(); - SecKeyRef SecTrustCopyKey( - SecTrustRef trust, + int CFFileDescriptorGetNativeDescriptor( + CFFileDescriptorRef f, ) { - return _SecTrustCopyKey( - trust, + return _CFFileDescriptorGetNativeDescriptor( + f, ); } - late final _SecTrustCopyKeyPtr = - _lookup>( - 'SecTrustCopyKey'); - late final _SecTrustCopyKey = - _SecTrustCopyKeyPtr.asFunction(); + late final _CFFileDescriptorGetNativeDescriptorPtr = _lookup< + ffi.NativeFunction< + CFFileDescriptorNativeDescriptor Function( + CFFileDescriptorRef)>>('CFFileDescriptorGetNativeDescriptor'); + late final _CFFileDescriptorGetNativeDescriptor = + _CFFileDescriptorGetNativeDescriptorPtr.asFunction< + int Function(CFFileDescriptorRef)>(); - int SecTrustGetCertificateCount( - SecTrustRef trust, + void CFFileDescriptorGetContext( + CFFileDescriptorRef f, + ffi.Pointer context, ) { - return _SecTrustGetCertificateCount( - trust, + return _CFFileDescriptorGetContext( + f, + context, ); } - late final _SecTrustGetCertificateCountPtr = - _lookup>( - 'SecTrustGetCertificateCount'); - late final _SecTrustGetCertificateCount = - _SecTrustGetCertificateCountPtr.asFunction(); + late final _CFFileDescriptorGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFFileDescriptorRef, ffi.Pointer)>>( + 'CFFileDescriptorGetContext'); + late final _CFFileDescriptorGetContext = + _CFFileDescriptorGetContextPtr.asFunction< + void Function( + CFFileDescriptorRef, ffi.Pointer)>(); - SecCertificateRef SecTrustGetCertificateAtIndex( - SecTrustRef trust, - int ix, + void CFFileDescriptorEnableCallBacks( + CFFileDescriptorRef f, + int callBackTypes, ) { - return _SecTrustGetCertificateAtIndex( - trust, - ix, + return _CFFileDescriptorEnableCallBacks( + f, + callBackTypes, ); } - late final _SecTrustGetCertificateAtIndexPtr = _lookup< - ffi.NativeFunction>( - 'SecTrustGetCertificateAtIndex'); - late final _SecTrustGetCertificateAtIndex = _SecTrustGetCertificateAtIndexPtr - .asFunction(); + late final _CFFileDescriptorEnableCallBacksPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFFileDescriptorRef, + CFOptionFlags)>>('CFFileDescriptorEnableCallBacks'); + late final _CFFileDescriptorEnableCallBacks = + _CFFileDescriptorEnableCallBacksPtr.asFunction< + void Function(CFFileDescriptorRef, int)>(); - CFDataRef SecTrustCopyExceptions( - SecTrustRef trust, + void CFFileDescriptorDisableCallBacks( + CFFileDescriptorRef f, + int callBackTypes, ) { - return _SecTrustCopyExceptions( - trust, + return _CFFileDescriptorDisableCallBacks( + f, + callBackTypes, ); } - late final _SecTrustCopyExceptionsPtr = - _lookup>( - 'SecTrustCopyExceptions'); - late final _SecTrustCopyExceptions = - _SecTrustCopyExceptionsPtr.asFunction(); + late final _CFFileDescriptorDisableCallBacksPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFFileDescriptorRef, + CFOptionFlags)>>('CFFileDescriptorDisableCallBacks'); + late final _CFFileDescriptorDisableCallBacks = + _CFFileDescriptorDisableCallBacksPtr.asFunction< + void Function(CFFileDescriptorRef, int)>(); - bool SecTrustSetExceptions( - SecTrustRef trust, - CFDataRef exceptions, + void CFFileDescriptorInvalidate( + CFFileDescriptorRef f, ) { - return _SecTrustSetExceptions( - trust, - exceptions, + return _CFFileDescriptorInvalidate( + f, ); } - late final _SecTrustSetExceptionsPtr = - _lookup>( - 'SecTrustSetExceptions'); - late final _SecTrustSetExceptions = _SecTrustSetExceptionsPtr.asFunction< - bool Function(SecTrustRef, CFDataRef)>(); + late final _CFFileDescriptorInvalidatePtr = + _lookup>( + 'CFFileDescriptorInvalidate'); + late final _CFFileDescriptorInvalidate = _CFFileDescriptorInvalidatePtr + .asFunction(); - CFArrayRef SecTrustCopyProperties( - SecTrustRef trust, + int CFFileDescriptorIsValid( + CFFileDescriptorRef f, ) { - return _SecTrustCopyProperties( - trust, + return _CFFileDescriptorIsValid( + f, ); } - late final _SecTrustCopyPropertiesPtr = - _lookup>( - 'SecTrustCopyProperties'); - late final _SecTrustCopyProperties = - _SecTrustCopyPropertiesPtr.asFunction(); + late final _CFFileDescriptorIsValidPtr = + _lookup>( + 'CFFileDescriptorIsValid'); + late final _CFFileDescriptorIsValid = _CFFileDescriptorIsValidPtr.asFunction< + int Function(CFFileDescriptorRef)>(); - CFDictionaryRef SecTrustCopyResult( - SecTrustRef trust, + CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource( + CFAllocatorRef allocator, + CFFileDescriptorRef f, + int order, ) { - return _SecTrustCopyResult( - trust, + return _CFFileDescriptorCreateRunLoopSource( + allocator, + f, + order, ); } - late final _SecTrustCopyResultPtr = - _lookup>( - 'SecTrustCopyResult'); - late final _SecTrustCopyResult = _SecTrustCopyResultPtr.asFunction< - CFDictionaryRef Function(SecTrustRef)>(); + late final _CFFileDescriptorCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFFileDescriptorRef, + CFIndex)>>('CFFileDescriptorCreateRunLoopSource'); + late final _CFFileDescriptorCreateRunLoopSource = + _CFFileDescriptorCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function( + CFAllocatorRef, CFFileDescriptorRef, int)>(); - int SecTrustSetOCSPResponse( - SecTrustRef trust, - CFTypeRef responseData, - ) { - return _SecTrustSetOCSPResponse( - trust, - responseData, - ); + int CFUserNotificationGetTypeID() { + return _CFUserNotificationGetTypeID(); } - late final _SecTrustSetOCSPResponsePtr = - _lookup>( - 'SecTrustSetOCSPResponse'); - late final _SecTrustSetOCSPResponse = _SecTrustSetOCSPResponsePtr.asFunction< - int Function(SecTrustRef, CFTypeRef)>(); + late final _CFUserNotificationGetTypeIDPtr = + _lookup>( + 'CFUserNotificationGetTypeID'); + late final _CFUserNotificationGetTypeID = + _CFUserNotificationGetTypeIDPtr.asFunction(); - int SecTrustSetSignedCertificateTimestamps( - SecTrustRef trust, - CFArrayRef sctArray, + CFUserNotificationRef CFUserNotificationCreate( + CFAllocatorRef allocator, + double timeout, + int flags, + ffi.Pointer error, + CFDictionaryRef dictionary, ) { - return _SecTrustSetSignedCertificateTimestamps( - trust, - sctArray, + return _CFUserNotificationCreate( + allocator, + timeout, + flags, + error, + dictionary, ); } - late final _SecTrustSetSignedCertificateTimestampsPtr = - _lookup>( - 'SecTrustSetSignedCertificateTimestamps'); - late final _SecTrustSetSignedCertificateTimestamps = - _SecTrustSetSignedCertificateTimestampsPtr.asFunction< - int Function(SecTrustRef, CFArrayRef)>(); + late final _CFUserNotificationCreatePtr = _lookup< + ffi.NativeFunction< + CFUserNotificationRef Function( + CFAllocatorRef, + CFTimeInterval, + CFOptionFlags, + ffi.Pointer, + CFDictionaryRef)>>('CFUserNotificationCreate'); + late final _CFUserNotificationCreate = + _CFUserNotificationCreatePtr.asFunction< + CFUserNotificationRef Function(CFAllocatorRef, double, int, + ffi.Pointer, CFDictionaryRef)>(); - CFArrayRef SecTrustCopyCertificateChain( - SecTrustRef trust, + int CFUserNotificationReceiveResponse( + CFUserNotificationRef userNotification, + double timeout, + ffi.Pointer responseFlags, ) { - return _SecTrustCopyCertificateChain( - trust, + return _CFUserNotificationReceiveResponse( + userNotification, + timeout, + responseFlags, ); } - late final _SecTrustCopyCertificateChainPtr = - _lookup>( - 'SecTrustCopyCertificateChain'); - late final _SecTrustCopyCertificateChain = _SecTrustCopyCertificateChainPtr - .asFunction(); - - late final ffi.Pointer _gGuidCssm = - _lookup('gGuidCssm'); - - CSSM_GUID get gGuidCssm => _gGuidCssm.ref; - - late final ffi.Pointer _gGuidAppleFileDL = - _lookup('gGuidAppleFileDL'); - - CSSM_GUID get gGuidAppleFileDL => _gGuidAppleFileDL.ref; - - late final ffi.Pointer _gGuidAppleCSP = - _lookup('gGuidAppleCSP'); - - CSSM_GUID get gGuidAppleCSP => _gGuidAppleCSP.ref; - - late final ffi.Pointer _gGuidAppleCSPDL = - _lookup('gGuidAppleCSPDL'); - - CSSM_GUID get gGuidAppleCSPDL => _gGuidAppleCSPDL.ref; - - late final ffi.Pointer _gGuidAppleX509CL = - _lookup('gGuidAppleX509CL'); - - CSSM_GUID get gGuidAppleX509CL => _gGuidAppleX509CL.ref; - - late final ffi.Pointer _gGuidAppleX509TP = - _lookup('gGuidAppleX509TP'); - - CSSM_GUID get gGuidAppleX509TP => _gGuidAppleX509TP.ref; - - late final ffi.Pointer _gGuidAppleLDAPDL = - _lookup('gGuidAppleLDAPDL'); - - CSSM_GUID get gGuidAppleLDAPDL => _gGuidAppleLDAPDL.ref; - - late final ffi.Pointer _gGuidAppleDotMacTP = - _lookup('gGuidAppleDotMacTP'); - - CSSM_GUID get gGuidAppleDotMacTP => _gGuidAppleDotMacTP.ref; - - late final ffi.Pointer _gGuidAppleSdCSPDL = - _lookup('gGuidAppleSdCSPDL'); - - CSSM_GUID get gGuidAppleSdCSPDL => _gGuidAppleSdCSPDL.ref; - - late final ffi.Pointer _gGuidAppleDotMacDL = - _lookup('gGuidAppleDotMacDL'); - - CSSM_GUID get gGuidAppleDotMacDL => _gGuidAppleDotMacDL.ref; + late final _CFUserNotificationReceiveResponsePtr = _lookup< + ffi.NativeFunction< + SInt32 Function(CFUserNotificationRef, CFTimeInterval, + ffi.Pointer)>>( + 'CFUserNotificationReceiveResponse'); + late final _CFUserNotificationReceiveResponse = + _CFUserNotificationReceiveResponsePtr.asFunction< + int Function( + CFUserNotificationRef, double, ffi.Pointer)>(); - void cssmPerror( - ffi.Pointer how, - int error, + CFStringRef CFUserNotificationGetResponseValue( + CFUserNotificationRef userNotification, + CFStringRef key, + int idx, ) { - return _cssmPerror( - how, - error, + return _CFUserNotificationGetResponseValue( + userNotification, + key, + idx, ); } - late final _cssmPerrorPtr = _lookup< + late final _CFUserNotificationGetResponseValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, CSSM_RETURN)>>('cssmPerror'); - late final _cssmPerror = - _cssmPerrorPtr.asFunction, int)>(); + CFStringRef Function(CFUserNotificationRef, CFStringRef, + CFIndex)>>('CFUserNotificationGetResponseValue'); + late final _CFUserNotificationGetResponseValue = + _CFUserNotificationGetResponseValuePtr.asFunction< + CFStringRef Function(CFUserNotificationRef, CFStringRef, int)>(); - bool cssmOidToAlg( - ffi.Pointer oid, - ffi.Pointer alg, + CFDictionaryRef CFUserNotificationGetResponseDictionary( + CFUserNotificationRef userNotification, ) { - return _cssmOidToAlg( - oid, - alg, + return _CFUserNotificationGetResponseDictionary( + userNotification, ); } - late final _cssmOidToAlgPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer)>>('cssmOidToAlg'); - late final _cssmOidToAlg = _cssmOidToAlgPtr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); + late final _CFUserNotificationGetResponseDictionaryPtr = _lookup< + ffi.NativeFunction>( + 'CFUserNotificationGetResponseDictionary'); + late final _CFUserNotificationGetResponseDictionary = + _CFUserNotificationGetResponseDictionaryPtr.asFunction< + CFDictionaryRef Function(CFUserNotificationRef)>(); - ffi.Pointer cssmAlgToOid( - int algId, + int CFUserNotificationUpdate( + CFUserNotificationRef userNotification, + double timeout, + int flags, + CFDictionaryRef dictionary, ) { - return _cssmAlgToOid( - algId, + return _CFUserNotificationUpdate( + userNotification, + timeout, + flags, + dictionary, ); } - late final _cssmAlgToOidPtr = _lookup< + late final _CFUserNotificationUpdatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(CSSM_ALGORITHMS)>>('cssmAlgToOid'); - late final _cssmAlgToOid = - _cssmAlgToOidPtr.asFunction Function(int)>(); + SInt32 Function(CFUserNotificationRef, CFTimeInterval, CFOptionFlags, + CFDictionaryRef)>>('CFUserNotificationUpdate'); + late final _CFUserNotificationUpdate = + _CFUserNotificationUpdatePtr.asFunction< + int Function(CFUserNotificationRef, double, int, CFDictionaryRef)>(); - int SecTrustSetOptions( - SecTrustRef trustRef, - int options, + int CFUserNotificationCancel( + CFUserNotificationRef userNotification, ) { - return _SecTrustSetOptions( - trustRef, - options, + return _CFUserNotificationCancel( + userNotification, ); } - late final _SecTrustSetOptionsPtr = - _lookup>( - 'SecTrustSetOptions'); - late final _SecTrustSetOptions = - _SecTrustSetOptionsPtr.asFunction(); + late final _CFUserNotificationCancelPtr = + _lookup>( + 'CFUserNotificationCancel'); + late final _CFUserNotificationCancel = _CFUserNotificationCancelPtr + .asFunction(); - int SecTrustSetParameters( - SecTrustRef trustRef, - int action, - CFDataRef actionData, + CFRunLoopSourceRef CFUserNotificationCreateRunLoopSource( + CFAllocatorRef allocator, + CFUserNotificationRef userNotification, + CFUserNotificationCallBack callout, + int order, ) { - return _SecTrustSetParameters( - trustRef, - action, - actionData, + return _CFUserNotificationCreateRunLoopSource( + allocator, + userNotification, + callout, + order, ); } - late final _SecTrustSetParametersPtr = _lookup< + late final _CFUserNotificationCreateRunLoopSourcePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecTrustRef, CSSM_TP_ACTION, - CFDataRef)>>('SecTrustSetParameters'); - late final _SecTrustSetParameters = _SecTrustSetParametersPtr.asFunction< - int Function(SecTrustRef, int, CFDataRef)>(); - - int SecTrustSetKeychains( - SecTrustRef trust, - CFTypeRef keychainOrArray, - ) { - return _SecTrustSetKeychains( - trust, - keychainOrArray, - ); - } - - late final _SecTrustSetKeychainsPtr = - _lookup>( - 'SecTrustSetKeychains'); - late final _SecTrustSetKeychains = _SecTrustSetKeychainsPtr.asFunction< - int Function(SecTrustRef, CFTypeRef)>(); + CFRunLoopSourceRef Function( + CFAllocatorRef, + CFUserNotificationRef, + CFUserNotificationCallBack, + CFIndex)>>('CFUserNotificationCreateRunLoopSource'); + late final _CFUserNotificationCreateRunLoopSource = + _CFUserNotificationCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFUserNotificationRef, + CFUserNotificationCallBack, int)>(); - int SecTrustGetResult( - SecTrustRef trustRef, - ffi.Pointer result, - ffi.Pointer certChain, - ffi.Pointer> statusChain, + int CFUserNotificationDisplayNotice( + double timeout, + int flags, + CFURLRef iconURL, + CFURLRef soundURL, + CFURLRef localizationURL, + CFStringRef alertHeader, + CFStringRef alertMessage, + CFStringRef defaultButtonTitle, ) { - return _SecTrustGetResult( - trustRef, - result, - certChain, - statusChain, + return _CFUserNotificationDisplayNotice( + timeout, + flags, + iconURL, + soundURL, + localizationURL, + alertHeader, + alertMessage, + defaultButtonTitle, ); } - late final _SecTrustGetResultPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecTrustRef, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'SecTrustGetResult'); - late final _SecTrustGetResult = _SecTrustGetResultPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + late final _CFUserNotificationDisplayNoticePtr = _lookup< + ffi.NativeFunction< + SInt32 Function( + CFTimeInterval, + CFOptionFlags, + CFURLRef, + CFURLRef, + CFURLRef, + CFStringRef, + CFStringRef, + CFStringRef)>>('CFUserNotificationDisplayNotice'); + late final _CFUserNotificationDisplayNotice = + _CFUserNotificationDisplayNoticePtr.asFunction< + int Function(double, int, CFURLRef, CFURLRef, CFURLRef, CFStringRef, + CFStringRef, CFStringRef)>(); - int SecTrustGetCssmResult( - SecTrustRef trust, - ffi.Pointer result, + int CFUserNotificationDisplayAlert( + double timeout, + int flags, + CFURLRef iconURL, + CFURLRef soundURL, + CFURLRef localizationURL, + CFStringRef alertHeader, + CFStringRef alertMessage, + CFStringRef defaultButtonTitle, + CFStringRef alternateButtonTitle, + CFStringRef otherButtonTitle, + ffi.Pointer responseFlags, ) { - return _SecTrustGetCssmResult( - trust, - result, + return _CFUserNotificationDisplayAlert( + timeout, + flags, + iconURL, + soundURL, + localizationURL, + alertHeader, + alertMessage, + defaultButtonTitle, + alternateButtonTitle, + otherButtonTitle, + responseFlags, ); } - late final _SecTrustGetCssmResultPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>( - 'SecTrustGetCssmResult'); - late final _SecTrustGetCssmResult = _SecTrustGetCssmResultPtr.asFunction< - int Function( - SecTrustRef, ffi.Pointer)>(); - - int SecTrustGetCssmResultCode( - SecTrustRef trust, - ffi.Pointer resultCode, - ) { - return _SecTrustGetCssmResultCode( - trust, - resultCode, - ); - } - - late final _SecTrustGetCssmResultCodePtr = _lookup< + late final _CFUserNotificationDisplayAlertPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>('SecTrustGetCssmResultCode'); - late final _SecTrustGetCssmResultCode = _SecTrustGetCssmResultCodePtr - .asFunction)>(); + SInt32 Function( + CFTimeInterval, + CFOptionFlags, + CFURLRef, + CFURLRef, + CFURLRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + ffi.Pointer)>>('CFUserNotificationDisplayAlert'); + late final _CFUserNotificationDisplayAlert = + _CFUserNotificationDisplayAlertPtr.asFunction< + int Function( + double, + int, + CFURLRef, + CFURLRef, + CFURLRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + ffi.Pointer)>(); - int SecTrustGetTPHandle( - SecTrustRef trust, - ffi.Pointer handle, - ) { - return _SecTrustGetTPHandle( - trust, - handle, - ); - } + late final ffi.Pointer _kCFUserNotificationIconURLKey = + _lookup('kCFUserNotificationIconURLKey'); - late final _SecTrustGetTPHandlePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>('SecTrustGetTPHandle'); - late final _SecTrustGetTPHandle = _SecTrustGetTPHandlePtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + CFStringRef get kCFUserNotificationIconURLKey => + _kCFUserNotificationIconURLKey.value; - int SecTrustCopyAnchorCertificates( - ffi.Pointer anchors, - ) { - return _SecTrustCopyAnchorCertificates( - anchors, - ); - } + set kCFUserNotificationIconURLKey(CFStringRef value) => + _kCFUserNotificationIconURLKey.value = value; - late final _SecTrustCopyAnchorCertificatesPtr = - _lookup)>>( - 'SecTrustCopyAnchorCertificates'); - late final _SecTrustCopyAnchorCertificates = - _SecTrustCopyAnchorCertificatesPtr.asFunction< - int Function(ffi.Pointer)>(); + late final ffi.Pointer _kCFUserNotificationSoundURLKey = + _lookup('kCFUserNotificationSoundURLKey'); - int SecCertificateGetTypeID() { - return _SecCertificateGetTypeID(); - } + CFStringRef get kCFUserNotificationSoundURLKey => + _kCFUserNotificationSoundURLKey.value; - late final _SecCertificateGetTypeIDPtr = - _lookup>( - 'SecCertificateGetTypeID'); - late final _SecCertificateGetTypeID = - _SecCertificateGetTypeIDPtr.asFunction(); + set kCFUserNotificationSoundURLKey(CFStringRef value) => + _kCFUserNotificationSoundURLKey.value = value; - SecCertificateRef SecCertificateCreateWithData( - CFAllocatorRef allocator, - CFDataRef data, - ) { - return _SecCertificateCreateWithData( - allocator, - data, - ); - } + late final ffi.Pointer _kCFUserNotificationLocalizationURLKey = + _lookup('kCFUserNotificationLocalizationURLKey'); - late final _SecCertificateCreateWithDataPtr = _lookup< - ffi.NativeFunction< - SecCertificateRef Function( - CFAllocatorRef, CFDataRef)>>('SecCertificateCreateWithData'); - late final _SecCertificateCreateWithData = _SecCertificateCreateWithDataPtr - .asFunction(); + CFStringRef get kCFUserNotificationLocalizationURLKey => + _kCFUserNotificationLocalizationURLKey.value; - CFDataRef SecCertificateCopyData( - SecCertificateRef certificate, - ) { - return _SecCertificateCopyData( - certificate, - ); - } + set kCFUserNotificationLocalizationURLKey(CFStringRef value) => + _kCFUserNotificationLocalizationURLKey.value = value; - late final _SecCertificateCopyDataPtr = - _lookup>( - 'SecCertificateCopyData'); - late final _SecCertificateCopyData = _SecCertificateCopyDataPtr.asFunction< - CFDataRef Function(SecCertificateRef)>(); + late final ffi.Pointer _kCFUserNotificationAlertHeaderKey = + _lookup('kCFUserNotificationAlertHeaderKey'); - CFStringRef SecCertificateCopySubjectSummary( - SecCertificateRef certificate, - ) { - return _SecCertificateCopySubjectSummary( - certificate, - ); - } + CFStringRef get kCFUserNotificationAlertHeaderKey => + _kCFUserNotificationAlertHeaderKey.value; - late final _SecCertificateCopySubjectSummaryPtr = - _lookup>( - 'SecCertificateCopySubjectSummary'); - late final _SecCertificateCopySubjectSummary = - _SecCertificateCopySubjectSummaryPtr.asFunction< - CFStringRef Function(SecCertificateRef)>(); + set kCFUserNotificationAlertHeaderKey(CFStringRef value) => + _kCFUserNotificationAlertHeaderKey.value = value; - int SecCertificateCopyCommonName( - SecCertificateRef certificate, - ffi.Pointer commonName, - ) { - return _SecCertificateCopyCommonName( - certificate, - commonName, - ); - } + late final ffi.Pointer _kCFUserNotificationAlertMessageKey = + _lookup('kCFUserNotificationAlertMessageKey'); - late final _SecCertificateCopyCommonNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyCommonName'); - late final _SecCertificateCopyCommonName = _SecCertificateCopyCommonNamePtr - .asFunction)>(); + CFStringRef get kCFUserNotificationAlertMessageKey => + _kCFUserNotificationAlertMessageKey.value; - int SecCertificateCopyEmailAddresses( - SecCertificateRef certificate, - ffi.Pointer emailAddresses, - ) { - return _SecCertificateCopyEmailAddresses( - certificate, - emailAddresses, - ); - } + set kCFUserNotificationAlertMessageKey(CFStringRef value) => + _kCFUserNotificationAlertMessageKey.value = value; - late final _SecCertificateCopyEmailAddressesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyEmailAddresses'); - late final _SecCertificateCopyEmailAddresses = - _SecCertificateCopyEmailAddressesPtr.asFunction< - int Function(SecCertificateRef, ffi.Pointer)>(); + late final ffi.Pointer + _kCFUserNotificationDefaultButtonTitleKey = + _lookup('kCFUserNotificationDefaultButtonTitleKey'); - CFDataRef SecCertificateCopyNormalizedIssuerSequence( - SecCertificateRef certificate, - ) { - return _SecCertificateCopyNormalizedIssuerSequence( - certificate, - ); - } + CFStringRef get kCFUserNotificationDefaultButtonTitleKey => + _kCFUserNotificationDefaultButtonTitleKey.value; - late final _SecCertificateCopyNormalizedIssuerSequencePtr = - _lookup>( - 'SecCertificateCopyNormalizedIssuerSequence'); - late final _SecCertificateCopyNormalizedIssuerSequence = - _SecCertificateCopyNormalizedIssuerSequencePtr.asFunction< - CFDataRef Function(SecCertificateRef)>(); + set kCFUserNotificationDefaultButtonTitleKey(CFStringRef value) => + _kCFUserNotificationDefaultButtonTitleKey.value = value; - CFDataRef SecCertificateCopyNormalizedSubjectSequence( - SecCertificateRef certificate, - ) { - return _SecCertificateCopyNormalizedSubjectSequence( - certificate, - ); - } + late final ffi.Pointer + _kCFUserNotificationAlternateButtonTitleKey = + _lookup('kCFUserNotificationAlternateButtonTitleKey'); - late final _SecCertificateCopyNormalizedSubjectSequencePtr = - _lookup>( - 'SecCertificateCopyNormalizedSubjectSequence'); - late final _SecCertificateCopyNormalizedSubjectSequence = - _SecCertificateCopyNormalizedSubjectSequencePtr.asFunction< - CFDataRef Function(SecCertificateRef)>(); + CFStringRef get kCFUserNotificationAlternateButtonTitleKey => + _kCFUserNotificationAlternateButtonTitleKey.value; - SecKeyRef SecCertificateCopyKey( - SecCertificateRef certificate, - ) { - return _SecCertificateCopyKey( - certificate, - ); - } + set kCFUserNotificationAlternateButtonTitleKey(CFStringRef value) => + _kCFUserNotificationAlternateButtonTitleKey.value = value; - late final _SecCertificateCopyKeyPtr = - _lookup>( - 'SecCertificateCopyKey'); - late final _SecCertificateCopyKey = _SecCertificateCopyKeyPtr.asFunction< - SecKeyRef Function(SecCertificateRef)>(); + late final ffi.Pointer _kCFUserNotificationOtherButtonTitleKey = + _lookup('kCFUserNotificationOtherButtonTitleKey'); - int SecCertificateCopyPublicKey( - SecCertificateRef certificate, - ffi.Pointer key, - ) { - return _SecCertificateCopyPublicKey( - certificate, - key, - ); + CFStringRef get kCFUserNotificationOtherButtonTitleKey => + _kCFUserNotificationOtherButtonTitleKey.value; + + set kCFUserNotificationOtherButtonTitleKey(CFStringRef value) => + _kCFUserNotificationOtherButtonTitleKey.value = value; + + late final ffi.Pointer + _kCFUserNotificationProgressIndicatorValueKey = + _lookup('kCFUserNotificationProgressIndicatorValueKey'); + + CFStringRef get kCFUserNotificationProgressIndicatorValueKey => + _kCFUserNotificationProgressIndicatorValueKey.value; + + set kCFUserNotificationProgressIndicatorValueKey(CFStringRef value) => + _kCFUserNotificationProgressIndicatorValueKey.value = value; + + late final ffi.Pointer _kCFUserNotificationPopUpTitlesKey = + _lookup('kCFUserNotificationPopUpTitlesKey'); + + CFStringRef get kCFUserNotificationPopUpTitlesKey => + _kCFUserNotificationPopUpTitlesKey.value; + + set kCFUserNotificationPopUpTitlesKey(CFStringRef value) => + _kCFUserNotificationPopUpTitlesKey.value = value; + + late final ffi.Pointer _kCFUserNotificationTextFieldTitlesKey = + _lookup('kCFUserNotificationTextFieldTitlesKey'); + + CFStringRef get kCFUserNotificationTextFieldTitlesKey => + _kCFUserNotificationTextFieldTitlesKey.value; + + set kCFUserNotificationTextFieldTitlesKey(CFStringRef value) => + _kCFUserNotificationTextFieldTitlesKey.value = value; + + late final ffi.Pointer _kCFUserNotificationCheckBoxTitlesKey = + _lookup('kCFUserNotificationCheckBoxTitlesKey'); + + CFStringRef get kCFUserNotificationCheckBoxTitlesKey => + _kCFUserNotificationCheckBoxTitlesKey.value; + + set kCFUserNotificationCheckBoxTitlesKey(CFStringRef value) => + _kCFUserNotificationCheckBoxTitlesKey.value = value; + + late final ffi.Pointer _kCFUserNotificationTextFieldValuesKey = + _lookup('kCFUserNotificationTextFieldValuesKey'); + + CFStringRef get kCFUserNotificationTextFieldValuesKey => + _kCFUserNotificationTextFieldValuesKey.value; + + set kCFUserNotificationTextFieldValuesKey(CFStringRef value) => + _kCFUserNotificationTextFieldValuesKey.value = value; + + late final ffi.Pointer _kCFUserNotificationPopUpSelectionKey = + _lookup('kCFUserNotificationPopUpSelectionKey'); + + CFStringRef get kCFUserNotificationPopUpSelectionKey => + _kCFUserNotificationPopUpSelectionKey.value; + + set kCFUserNotificationPopUpSelectionKey(CFStringRef value) => + _kCFUserNotificationPopUpSelectionKey.value = value; + + late final ffi.Pointer _kCFUserNotificationAlertTopMostKey = + _lookup('kCFUserNotificationAlertTopMostKey'); + + CFStringRef get kCFUserNotificationAlertTopMostKey => + _kCFUserNotificationAlertTopMostKey.value; + + set kCFUserNotificationAlertTopMostKey(CFStringRef value) => + _kCFUserNotificationAlertTopMostKey.value = value; + + late final ffi.Pointer _kCFUserNotificationKeyboardTypesKey = + _lookup('kCFUserNotificationKeyboardTypesKey'); + + CFStringRef get kCFUserNotificationKeyboardTypesKey => + _kCFUserNotificationKeyboardTypesKey.value; + + set kCFUserNotificationKeyboardTypesKey(CFStringRef value) => + _kCFUserNotificationKeyboardTypesKey.value = value; + + int CFXMLNodeGetTypeID() { + return _CFXMLNodeGetTypeID(); } - late final _SecCertificateCopyPublicKeyPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyPublicKey'); - late final _SecCertificateCopyPublicKey = _SecCertificateCopyPublicKeyPtr - .asFunction)>(); + late final _CFXMLNodeGetTypeIDPtr = + _lookup>('CFXMLNodeGetTypeID'); + late final _CFXMLNodeGetTypeID = + _CFXMLNodeGetTypeIDPtr.asFunction(); - CFDataRef SecCertificateCopySerialNumberData( - SecCertificateRef certificate, - ffi.Pointer error, + CFXMLNodeRef CFXMLNodeCreate( + CFAllocatorRef alloc, + int xmlType, + CFStringRef dataString, + ffi.Pointer additionalInfoPtr, + int version, ) { - return _SecCertificateCopySerialNumberData( - certificate, - error, + return _CFXMLNodeCreate( + alloc, + xmlType, + dataString, + additionalInfoPtr, + version, ); } - late final _SecCertificateCopySerialNumberDataPtr = _lookup< + late final _CFXMLNodeCreatePtr = _lookup< ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopySerialNumberData'); - late final _SecCertificateCopySerialNumberData = - _SecCertificateCopySerialNumberDataPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + CFXMLNodeRef Function(CFAllocatorRef, ffi.Int32, CFStringRef, + ffi.Pointer, CFIndex)>>('CFXMLNodeCreate'); + late final _CFXMLNodeCreate = _CFXMLNodeCreatePtr.asFunction< + CFXMLNodeRef Function( + CFAllocatorRef, int, CFStringRef, ffi.Pointer, int)>(); - CFDataRef SecCertificateCopySerialNumber( - SecCertificateRef certificate, - ffi.Pointer error, + CFXMLNodeRef CFXMLNodeCreateCopy( + CFAllocatorRef alloc, + CFXMLNodeRef origNode, ) { - return _SecCertificateCopySerialNumber( - certificate, - error, + return _CFXMLNodeCreateCopy( + alloc, + origNode, ); } - late final _SecCertificateCopySerialNumberPtr = _lookup< + late final _CFXMLNodeCreateCopyPtr = _lookup< ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopySerialNumber'); - late final _SecCertificateCopySerialNumber = - _SecCertificateCopySerialNumberPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + CFXMLNodeRef Function( + CFAllocatorRef, CFXMLNodeRef)>>('CFXMLNodeCreateCopy'); + late final _CFXMLNodeCreateCopy = _CFXMLNodeCreateCopyPtr.asFunction< + CFXMLNodeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); - int SecCertificateCreateFromData( - ffi.Pointer data, - int type, - int encoding, - ffi.Pointer certificate, + int CFXMLNodeGetTypeCode( + CFXMLNodeRef node, ) { - return _SecCertificateCreateFromData( - data, - type, - encoding, - certificate, + return _CFXMLNodeGetTypeCode( + node, ); } - late final _SecCertificateCreateFromDataPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - ffi.Pointer, - CSSM_CERT_TYPE, - CSSM_CERT_ENCODING, - ffi.Pointer)>>('SecCertificateCreateFromData'); - late final _SecCertificateCreateFromData = - _SecCertificateCreateFromDataPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer)>(); + late final _CFXMLNodeGetTypeCodePtr = + _lookup>( + 'CFXMLNodeGetTypeCode'); + late final _CFXMLNodeGetTypeCode = + _CFXMLNodeGetTypeCodePtr.asFunction(); - int SecCertificateAddToKeychain( - SecCertificateRef certificate, - SecKeychainRef keychain, + CFStringRef CFXMLNodeGetString( + CFXMLNodeRef node, ) { - return _SecCertificateAddToKeychain( - certificate, - keychain, + return _CFXMLNodeGetString( + node, ); } - late final _SecCertificateAddToKeychainPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - SecKeychainRef)>>('SecCertificateAddToKeychain'); - late final _SecCertificateAddToKeychain = _SecCertificateAddToKeychainPtr - .asFunction(); + late final _CFXMLNodeGetStringPtr = + _lookup>( + 'CFXMLNodeGetString'); + late final _CFXMLNodeGetString = + _CFXMLNodeGetStringPtr.asFunction(); - int SecCertificateGetData( - SecCertificateRef certificate, - CSSM_DATA_PTR data, + ffi.Pointer CFXMLNodeGetInfoPtr( + CFXMLNodeRef node, ) { - return _SecCertificateGetData( - certificate, - data, + return _CFXMLNodeGetInfoPtr( + node, ); } - late final _SecCertificateGetDataPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecCertificateRef, CSSM_DATA_PTR)>>('SecCertificateGetData'); - late final _SecCertificateGetData = _SecCertificateGetDataPtr.asFunction< - int Function(SecCertificateRef, CSSM_DATA_PTR)>(); + late final _CFXMLNodeGetInfoPtrPtr = + _lookup Function(CFXMLNodeRef)>>( + 'CFXMLNodeGetInfoPtr'); + late final _CFXMLNodeGetInfoPtr = _CFXMLNodeGetInfoPtrPtr.asFunction< + ffi.Pointer Function(CFXMLNodeRef)>(); - int SecCertificateGetType( - SecCertificateRef certificate, - ffi.Pointer certificateType, + int CFXMLNodeGetVersion( + CFXMLNodeRef node, ) { - return _SecCertificateGetType( - certificate, - certificateType, + return _CFXMLNodeGetVersion( + node, ); } - late final _SecCertificateGetTypePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateGetType'); - late final _SecCertificateGetType = _SecCertificateGetTypePtr.asFunction< - int Function(SecCertificateRef, ffi.Pointer)>(); + late final _CFXMLNodeGetVersionPtr = + _lookup>( + 'CFXMLNodeGetVersion'); + late final _CFXMLNodeGetVersion = + _CFXMLNodeGetVersionPtr.asFunction(); - int SecCertificateGetSubject( - SecCertificateRef certificate, - ffi.Pointer> subject, + CFXMLTreeRef CFXMLTreeCreateWithNode( + CFAllocatorRef allocator, + CFXMLNodeRef node, ) { - return _SecCertificateGetSubject( - certificate, - subject, + return _CFXMLTreeCreateWithNode( + allocator, + node, ); } - late final _SecCertificateGetSubjectPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer>)>>( - 'SecCertificateGetSubject'); - late final _SecCertificateGetSubject = - _SecCertificateGetSubjectPtr.asFunction< - int Function( - SecCertificateRef, ffi.Pointer>)>(); + late final _CFXMLTreeCreateWithNodePtr = _lookup< + ffi.NativeFunction< + CFXMLTreeRef Function( + CFAllocatorRef, CFXMLNodeRef)>>('CFXMLTreeCreateWithNode'); + late final _CFXMLTreeCreateWithNode = _CFXMLTreeCreateWithNodePtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); - int SecCertificateGetIssuer( - SecCertificateRef certificate, - ffi.Pointer> issuer, + CFXMLNodeRef CFXMLTreeGetNode( + CFXMLTreeRef xmlTree, ) { - return _SecCertificateGetIssuer( - certificate, - issuer, + return _CFXMLTreeGetNode( + xmlTree, ); } - late final _SecCertificateGetIssuerPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer>)>>( - 'SecCertificateGetIssuer'); - late final _SecCertificateGetIssuer = _SecCertificateGetIssuerPtr.asFunction< - int Function( - SecCertificateRef, ffi.Pointer>)>(); + late final _CFXMLTreeGetNodePtr = + _lookup>( + 'CFXMLTreeGetNode'); + late final _CFXMLTreeGetNode = + _CFXMLTreeGetNodePtr.asFunction(); - int SecCertificateGetCLHandle( - SecCertificateRef certificate, - ffi.Pointer clHandle, + int CFXMLParserGetTypeID() { + return _CFXMLParserGetTypeID(); + } + + late final _CFXMLParserGetTypeIDPtr = + _lookup>('CFXMLParserGetTypeID'); + late final _CFXMLParserGetTypeID = + _CFXMLParserGetTypeIDPtr.asFunction(); + + CFXMLParserRef CFXMLParserCreate( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer callBacks, + ffi.Pointer context, ) { - return _SecCertificateGetCLHandle( - certificate, - clHandle, + return _CFXMLParserCreate( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, + callBacks, + context, ); } - late final _SecCertificateGetCLHandlePtr = _lookup< + late final _CFXMLParserCreatePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateGetCLHandle'); - late final _SecCertificateGetCLHandle = - _SecCertificateGetCLHandlePtr.asFunction< - int Function(SecCertificateRef, ffi.Pointer)>(); + CFXMLParserRef Function( + CFAllocatorRef, + CFDataRef, + CFURLRef, + CFOptionFlags, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFXMLParserCreate'); + late final _CFXMLParserCreate = _CFXMLParserCreatePtr.asFunction< + CFXMLParserRef Function( + CFAllocatorRef, + CFDataRef, + CFURLRef, + int, + int, + ffi.Pointer, + ffi.Pointer)>(); - int SecCertificateGetAlgorithmID( - SecCertificateRef certificate, - ffi.Pointer> algid, + CFXMLParserRef CFXMLParserCreateWithDataFromURL( + CFAllocatorRef allocator, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer callBacks, + ffi.Pointer context, ) { - return _SecCertificateGetAlgorithmID( - certificate, - algid, + return _CFXMLParserCreateWithDataFromURL( + allocator, + dataSource, + parseOptions, + versionOfNodes, + callBacks, + context, ); } - late final _SecCertificateGetAlgorithmIDPtr = _lookup< + late final _CFXMLParserCreateWithDataFromURLPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SecCertificateRef, ffi.Pointer>)>>( - 'SecCertificateGetAlgorithmID'); - late final _SecCertificateGetAlgorithmID = - _SecCertificateGetAlgorithmIDPtr.asFunction< - int Function( - SecCertificateRef, ffi.Pointer>)>(); + CFXMLParserRef Function( + CFAllocatorRef, + CFURLRef, + CFOptionFlags, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>( + 'CFXMLParserCreateWithDataFromURL'); + late final _CFXMLParserCreateWithDataFromURL = + _CFXMLParserCreateWithDataFromURLPtr.asFunction< + CFXMLParserRef Function( + CFAllocatorRef, + CFURLRef, + int, + int, + ffi.Pointer, + ffi.Pointer)>(); - int SecCertificateCopyPreference( - CFStringRef name, - int keyUsage, - ffi.Pointer certificate, + void CFXMLParserGetContext( + CFXMLParserRef parser, + ffi.Pointer context, ) { - return _SecCertificateCopyPreference( - name, - keyUsage, - certificate, + return _CFXMLParserGetContext( + parser, + context, ); } - late final _SecCertificateCopyPreferencePtr = _lookup< + late final _CFXMLParserGetContextPtr = _lookup< ffi.NativeFunction< - OSStatus Function(CFStringRef, uint32, - ffi.Pointer)>>('SecCertificateCopyPreference'); - late final _SecCertificateCopyPreference = - _SecCertificateCopyPreferencePtr.asFunction< - int Function(CFStringRef, int, ffi.Pointer)>(); + ffi.Void Function(CFXMLParserRef, + ffi.Pointer)>>('CFXMLParserGetContext'); + late final _CFXMLParserGetContext = _CFXMLParserGetContextPtr.asFunction< + void Function(CFXMLParserRef, ffi.Pointer)>(); - SecCertificateRef SecCertificateCopyPreferred( - CFStringRef name, - CFArrayRef keyUsage, + void CFXMLParserGetCallBacks( + CFXMLParserRef parser, + ffi.Pointer callBacks, ) { - return _SecCertificateCopyPreferred( - name, - keyUsage, + return _CFXMLParserGetCallBacks( + parser, + callBacks, ); } - late final _SecCertificateCopyPreferredPtr = _lookup< + late final _CFXMLParserGetCallBacksPtr = _lookup< ffi.NativeFunction< - SecCertificateRef Function( - CFStringRef, CFArrayRef)>>('SecCertificateCopyPreferred'); - late final _SecCertificateCopyPreferred = _SecCertificateCopyPreferredPtr - .asFunction(); + ffi.Void Function(CFXMLParserRef, + ffi.Pointer)>>('CFXMLParserGetCallBacks'); + late final _CFXMLParserGetCallBacks = _CFXMLParserGetCallBacksPtr.asFunction< + void Function(CFXMLParserRef, ffi.Pointer)>(); - int SecCertificateSetPreference( - SecCertificateRef certificate, - CFStringRef name, - int keyUsage, - CFDateRef date, + CFURLRef CFXMLParserGetSourceURL( + CFXMLParserRef parser, ) { - return _SecCertificateSetPreference( - certificate, - name, - keyUsage, - date, + return _CFXMLParserGetSourceURL( + parser, ); } - late final _SecCertificateSetPreferencePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, CFStringRef, uint32, - CFDateRef)>>('SecCertificateSetPreference'); - late final _SecCertificateSetPreference = - _SecCertificateSetPreferencePtr.asFunction< - int Function(SecCertificateRef, CFStringRef, int, CFDateRef)>(); + late final _CFXMLParserGetSourceURLPtr = + _lookup>( + 'CFXMLParserGetSourceURL'); + late final _CFXMLParserGetSourceURL = _CFXMLParserGetSourceURLPtr.asFunction< + CFURLRef Function(CFXMLParserRef)>(); - int SecCertificateSetPreferred( - SecCertificateRef certificate, - CFStringRef name, - CFArrayRef keyUsage, + int CFXMLParserGetLocation( + CFXMLParserRef parser, ) { - return _SecCertificateSetPreferred( - certificate, - name, - keyUsage, + return _CFXMLParserGetLocation( + parser, ); } - late final _SecCertificateSetPreferredPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, CFStringRef, - CFArrayRef)>>('SecCertificateSetPreferred'); - late final _SecCertificateSetPreferred = _SecCertificateSetPreferredPtr - .asFunction(); + late final _CFXMLParserGetLocationPtr = + _lookup>( + 'CFXMLParserGetLocation'); + late final _CFXMLParserGetLocation = + _CFXMLParserGetLocationPtr.asFunction(); - late final ffi.Pointer _kSecPropertyKeyType = - _lookup('kSecPropertyKeyType'); + int CFXMLParserGetLineNumber( + CFXMLParserRef parser, + ) { + return _CFXMLParserGetLineNumber( + parser, + ); + } - CFStringRef get kSecPropertyKeyType => _kSecPropertyKeyType.value; + late final _CFXMLParserGetLineNumberPtr = + _lookup>( + 'CFXMLParserGetLineNumber'); + late final _CFXMLParserGetLineNumber = + _CFXMLParserGetLineNumberPtr.asFunction(); - set kSecPropertyKeyType(CFStringRef value) => - _kSecPropertyKeyType.value = value; + ffi.Pointer CFXMLParserGetDocument( + CFXMLParserRef parser, + ) { + return _CFXMLParserGetDocument( + parser, + ); + } - late final ffi.Pointer _kSecPropertyKeyLabel = - _lookup('kSecPropertyKeyLabel'); + late final _CFXMLParserGetDocumentPtr = _lookup< + ffi.NativeFunction Function(CFXMLParserRef)>>( + 'CFXMLParserGetDocument'); + late final _CFXMLParserGetDocument = _CFXMLParserGetDocumentPtr.asFunction< + ffi.Pointer Function(CFXMLParserRef)>(); - CFStringRef get kSecPropertyKeyLabel => _kSecPropertyKeyLabel.value; + int CFXMLParserGetStatusCode( + CFXMLParserRef parser, + ) { + return _CFXMLParserGetStatusCode( + parser, + ); + } - set kSecPropertyKeyLabel(CFStringRef value) => - _kSecPropertyKeyLabel.value = value; + late final _CFXMLParserGetStatusCodePtr = + _lookup>( + 'CFXMLParserGetStatusCode'); + late final _CFXMLParserGetStatusCode = + _CFXMLParserGetStatusCodePtr.asFunction(); - late final ffi.Pointer _kSecPropertyKeyLocalizedLabel = - _lookup('kSecPropertyKeyLocalizedLabel'); + CFStringRef CFXMLParserCopyErrorDescription( + CFXMLParserRef parser, + ) { + return _CFXMLParserCopyErrorDescription( + parser, + ); + } - CFStringRef get kSecPropertyKeyLocalizedLabel => - _kSecPropertyKeyLocalizedLabel.value; + late final _CFXMLParserCopyErrorDescriptionPtr = + _lookup>( + 'CFXMLParserCopyErrorDescription'); + late final _CFXMLParserCopyErrorDescription = + _CFXMLParserCopyErrorDescriptionPtr.asFunction< + CFStringRef Function(CFXMLParserRef)>(); - set kSecPropertyKeyLocalizedLabel(CFStringRef value) => - _kSecPropertyKeyLocalizedLabel.value = value; + void CFXMLParserAbort( + CFXMLParserRef parser, + int errorCode, + CFStringRef errorDescription, + ) { + return _CFXMLParserAbort( + parser, + errorCode, + errorDescription, + ); + } - late final ffi.Pointer _kSecPropertyKeyValue = - _lookup('kSecPropertyKeyValue'); + late final _CFXMLParserAbortPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFXMLParserRef, ffi.Int32, CFStringRef)>>('CFXMLParserAbort'); + late final _CFXMLParserAbort = _CFXMLParserAbortPtr.asFunction< + void Function(CFXMLParserRef, int, CFStringRef)>(); - CFStringRef get kSecPropertyKeyValue => _kSecPropertyKeyValue.value; + int CFXMLParserParse( + CFXMLParserRef parser, + ) { + return _CFXMLParserParse( + parser, + ); + } - set kSecPropertyKeyValue(CFStringRef value) => - _kSecPropertyKeyValue.value = value; + late final _CFXMLParserParsePtr = + _lookup>( + 'CFXMLParserParse'); + late final _CFXMLParserParse = + _CFXMLParserParsePtr.asFunction(); - late final ffi.Pointer _kSecPropertyTypeWarning = - _lookup('kSecPropertyTypeWarning'); + CFXMLTreeRef CFXMLTreeCreateFromData( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ) { + return _CFXMLTreeCreateFromData( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, + ); + } - CFStringRef get kSecPropertyTypeWarning => _kSecPropertyTypeWarning.value; + late final _CFXMLTreeCreateFromDataPtr = _lookup< + ffi.NativeFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, + CFOptionFlags, CFIndex)>>('CFXMLTreeCreateFromData'); + late final _CFXMLTreeCreateFromData = _CFXMLTreeCreateFromDataPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int)>(); - set kSecPropertyTypeWarning(CFStringRef value) => - _kSecPropertyTypeWarning.value = value; + CFXMLTreeRef CFXMLTreeCreateFromDataWithError( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer errorDict, + ) { + return _CFXMLTreeCreateFromDataWithError( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, + errorDict, + ); + } - late final ffi.Pointer _kSecPropertyTypeSuccess = - _lookup('kSecPropertyTypeSuccess'); + late final _CFXMLTreeCreateFromDataWithErrorPtr = _lookup< + ffi.NativeFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, + CFOptionFlags, CFIndex, ffi.Pointer)>>( + 'CFXMLTreeCreateFromDataWithError'); + late final _CFXMLTreeCreateFromDataWithError = + _CFXMLTreeCreateFromDataWithErrorPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int, + ffi.Pointer)>(); - CFStringRef get kSecPropertyTypeSuccess => _kSecPropertyTypeSuccess.value; + CFXMLTreeRef CFXMLTreeCreateWithDataFromURL( + CFAllocatorRef allocator, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ) { + return _CFXMLTreeCreateWithDataFromURL( + allocator, + dataSource, + parseOptions, + versionOfNodes, + ); + } - set kSecPropertyTypeSuccess(CFStringRef value) => - _kSecPropertyTypeSuccess.value = value; + late final _CFXMLTreeCreateWithDataFromURLPtr = _lookup< + ffi.NativeFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, CFOptionFlags, + CFIndex)>>('CFXMLTreeCreateWithDataFromURL'); + late final _CFXMLTreeCreateWithDataFromURL = + _CFXMLTreeCreateWithDataFromURLPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, int, int)>(); - late final ffi.Pointer _kSecPropertyTypeSection = - _lookup('kSecPropertyTypeSection'); + CFDataRef CFXMLTreeCreateXMLData( + CFAllocatorRef allocator, + CFXMLTreeRef xmlTree, + ) { + return _CFXMLTreeCreateXMLData( + allocator, + xmlTree, + ); + } - CFStringRef get kSecPropertyTypeSection => _kSecPropertyTypeSection.value; + late final _CFXMLTreeCreateXMLDataPtr = _lookup< + ffi.NativeFunction>( + 'CFXMLTreeCreateXMLData'); + late final _CFXMLTreeCreateXMLData = _CFXMLTreeCreateXMLDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFXMLTreeRef)>(); - set kSecPropertyTypeSection(CFStringRef value) => - _kSecPropertyTypeSection.value = value; + CFStringRef CFXMLCreateStringByEscapingEntities( + CFAllocatorRef allocator, + CFStringRef string, + CFDictionaryRef entitiesDictionary, + ) { + return _CFXMLCreateStringByEscapingEntities( + allocator, + string, + entitiesDictionary, + ); + } - late final ffi.Pointer _kSecPropertyTypeData = - _lookup('kSecPropertyTypeData'); + late final _CFXMLCreateStringByEscapingEntitiesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFXMLCreateStringByEscapingEntities'); + late final _CFXMLCreateStringByEscapingEntities = + _CFXMLCreateStringByEscapingEntitiesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - CFStringRef get kSecPropertyTypeData => _kSecPropertyTypeData.value; + CFStringRef CFXMLCreateStringByUnescapingEntities( + CFAllocatorRef allocator, + CFStringRef string, + CFDictionaryRef entitiesDictionary, + ) { + return _CFXMLCreateStringByUnescapingEntities( + allocator, + string, + entitiesDictionary, + ); + } - set kSecPropertyTypeData(CFStringRef value) => - _kSecPropertyTypeData.value = value; + late final _CFXMLCreateStringByUnescapingEntitiesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFXMLCreateStringByUnescapingEntities'); + late final _CFXMLCreateStringByUnescapingEntities = + _CFXMLCreateStringByUnescapingEntitiesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - late final ffi.Pointer _kSecPropertyTypeString = - _lookup('kSecPropertyTypeString'); + late final ffi.Pointer _kCFXMLTreeErrorDescription = + _lookup('kCFXMLTreeErrorDescription'); - CFStringRef get kSecPropertyTypeString => _kSecPropertyTypeString.value; + CFStringRef get kCFXMLTreeErrorDescription => + _kCFXMLTreeErrorDescription.value; - set kSecPropertyTypeString(CFStringRef value) => - _kSecPropertyTypeString.value = value; + set kCFXMLTreeErrorDescription(CFStringRef value) => + _kCFXMLTreeErrorDescription.value = value; - late final ffi.Pointer _kSecPropertyTypeURL = - _lookup('kSecPropertyTypeURL'); + late final ffi.Pointer _kCFXMLTreeErrorLineNumber = + _lookup('kCFXMLTreeErrorLineNumber'); - CFStringRef get kSecPropertyTypeURL => _kSecPropertyTypeURL.value; + CFStringRef get kCFXMLTreeErrorLineNumber => _kCFXMLTreeErrorLineNumber.value; - set kSecPropertyTypeURL(CFStringRef value) => - _kSecPropertyTypeURL.value = value; + set kCFXMLTreeErrorLineNumber(CFStringRef value) => + _kCFXMLTreeErrorLineNumber.value = value; - late final ffi.Pointer _kSecPropertyTypeDate = - _lookup('kSecPropertyTypeDate'); + late final ffi.Pointer _kCFXMLTreeErrorLocation = + _lookup('kCFXMLTreeErrorLocation'); - CFStringRef get kSecPropertyTypeDate => _kSecPropertyTypeDate.value; + CFStringRef get kCFXMLTreeErrorLocation => _kCFXMLTreeErrorLocation.value; - set kSecPropertyTypeDate(CFStringRef value) => - _kSecPropertyTypeDate.value = value; + set kCFXMLTreeErrorLocation(CFStringRef value) => + _kCFXMLTreeErrorLocation.value = value; - late final ffi.Pointer _kSecPropertyTypeArray = - _lookup('kSecPropertyTypeArray'); + late final ffi.Pointer _kCFXMLTreeErrorStatusCode = + _lookup('kCFXMLTreeErrorStatusCode'); - CFStringRef get kSecPropertyTypeArray => _kSecPropertyTypeArray.value; + CFStringRef get kCFXMLTreeErrorStatusCode => _kCFXMLTreeErrorStatusCode.value; - set kSecPropertyTypeArray(CFStringRef value) => - _kSecPropertyTypeArray.value = value; + set kCFXMLTreeErrorStatusCode(CFStringRef value) => + _kCFXMLTreeErrorStatusCode.value = value; - late final ffi.Pointer _kSecPropertyTypeNumber = - _lookup('kSecPropertyTypeNumber'); + late final ffi.Pointer _kSecPropertyTypeTitle = + _lookup('kSecPropertyTypeTitle'); - CFStringRef get kSecPropertyTypeNumber => _kSecPropertyTypeNumber.value; + CFStringRef get kSecPropertyTypeTitle => _kSecPropertyTypeTitle.value; - set kSecPropertyTypeNumber(CFStringRef value) => - _kSecPropertyTypeNumber.value = value; + set kSecPropertyTypeTitle(CFStringRef value) => + _kSecPropertyTypeTitle.value = value; - CFDictionaryRef SecCertificateCopyValues( - SecCertificateRef certificate, - CFArrayRef keys, - ffi.Pointer error, - ) { - return _SecCertificateCopyValues( - certificate, - keys, - error, - ); - } + late final ffi.Pointer _kSecPropertyTypeError = + _lookup('kSecPropertyTypeError'); - late final _SecCertificateCopyValuesPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(SecCertificateRef, CFArrayRef, - ffi.Pointer)>>('SecCertificateCopyValues'); - late final _SecCertificateCopyValues = - _SecCertificateCopyValuesPtr.asFunction< - CFDictionaryRef Function( - SecCertificateRef, CFArrayRef, ffi.Pointer)>(); + CFStringRef get kSecPropertyTypeError => _kSecPropertyTypeError.value; - CFStringRef SecCertificateCopyLongDescription( - CFAllocatorRef alloc, - SecCertificateRef certificate, - ffi.Pointer error, - ) { - return _SecCertificateCopyLongDescription( - alloc, - certificate, - error, - ); - } + set kSecPropertyTypeError(CFStringRef value) => + _kSecPropertyTypeError.value = value; - late final _SecCertificateCopyLongDescriptionPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyLongDescription'); - late final _SecCertificateCopyLongDescription = - _SecCertificateCopyLongDescriptionPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); + late final ffi.Pointer _kSecTrustEvaluationDate = + _lookup('kSecTrustEvaluationDate'); - CFStringRef SecCertificateCopyShortDescription( - CFAllocatorRef alloc, - SecCertificateRef certificate, - ffi.Pointer error, - ) { - return _SecCertificateCopyShortDescription( - alloc, - certificate, - error, - ); - } + CFStringRef get kSecTrustEvaluationDate => _kSecTrustEvaluationDate.value; - late final _SecCertificateCopyShortDescriptionPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyShortDescription'); - late final _SecCertificateCopyShortDescription = - _SecCertificateCopyShortDescriptionPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); + set kSecTrustEvaluationDate(CFStringRef value) => + _kSecTrustEvaluationDate.value = value; - CFDataRef SecCertificateCopyNormalizedIssuerContent( - SecCertificateRef certificate, - ffi.Pointer error, - ) { - return _SecCertificateCopyNormalizedIssuerContent( - certificate, - error, - ); - } + late final ffi.Pointer _kSecTrustExtendedValidation = + _lookup('kSecTrustExtendedValidation'); - late final _SecCertificateCopyNormalizedIssuerContentPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( - 'SecCertificateCopyNormalizedIssuerContent'); - late final _SecCertificateCopyNormalizedIssuerContent = - _SecCertificateCopyNormalizedIssuerContentPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + CFStringRef get kSecTrustExtendedValidation => + _kSecTrustExtendedValidation.value; - CFDataRef SecCertificateCopyNormalizedSubjectContent( - SecCertificateRef certificate, - ffi.Pointer error, - ) { - return _SecCertificateCopyNormalizedSubjectContent( - certificate, - error, - ); - } + set kSecTrustExtendedValidation(CFStringRef value) => + _kSecTrustExtendedValidation.value = value; - late final _SecCertificateCopyNormalizedSubjectContentPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( - 'SecCertificateCopyNormalizedSubjectContent'); - late final _SecCertificateCopyNormalizedSubjectContent = - _SecCertificateCopyNormalizedSubjectContentPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + late final ffi.Pointer _kSecTrustOrganizationName = + _lookup('kSecTrustOrganizationName'); - int SecIdentityGetTypeID() { - return _SecIdentityGetTypeID(); - } + CFStringRef get kSecTrustOrganizationName => _kSecTrustOrganizationName.value; - late final _SecIdentityGetTypeIDPtr = - _lookup>('SecIdentityGetTypeID'); - late final _SecIdentityGetTypeID = - _SecIdentityGetTypeIDPtr.asFunction(); + set kSecTrustOrganizationName(CFStringRef value) => + _kSecTrustOrganizationName.value = value; - int SecIdentityCreateWithCertificate( - CFTypeRef keychainOrArray, - SecCertificateRef certificateRef, - ffi.Pointer identityRef, - ) { - return _SecIdentityCreateWithCertificate( - keychainOrArray, - certificateRef, - identityRef, - ); + late final ffi.Pointer _kSecTrustResultValue = + _lookup('kSecTrustResultValue'); + + CFStringRef get kSecTrustResultValue => _kSecTrustResultValue.value; + + set kSecTrustResultValue(CFStringRef value) => + _kSecTrustResultValue.value = value; + + late final ffi.Pointer _kSecTrustRevocationChecked = + _lookup('kSecTrustRevocationChecked'); + + CFStringRef get kSecTrustRevocationChecked => + _kSecTrustRevocationChecked.value; + + set kSecTrustRevocationChecked(CFStringRef value) => + _kSecTrustRevocationChecked.value = value; + + late final ffi.Pointer _kSecTrustRevocationValidUntilDate = + _lookup('kSecTrustRevocationValidUntilDate'); + + CFStringRef get kSecTrustRevocationValidUntilDate => + _kSecTrustRevocationValidUntilDate.value; + + set kSecTrustRevocationValidUntilDate(CFStringRef value) => + _kSecTrustRevocationValidUntilDate.value = value; + + late final ffi.Pointer _kSecTrustCertificateTransparency = + _lookup('kSecTrustCertificateTransparency'); + + CFStringRef get kSecTrustCertificateTransparency => + _kSecTrustCertificateTransparency.value; + + set kSecTrustCertificateTransparency(CFStringRef value) => + _kSecTrustCertificateTransparency.value = value; + + late final ffi.Pointer + _kSecTrustCertificateTransparencyWhiteList = + _lookup('kSecTrustCertificateTransparencyWhiteList'); + + CFStringRef get kSecTrustCertificateTransparencyWhiteList => + _kSecTrustCertificateTransparencyWhiteList.value; + + set kSecTrustCertificateTransparencyWhiteList(CFStringRef value) => + _kSecTrustCertificateTransparencyWhiteList.value = value; + + int SecTrustGetTypeID() { + return _SecTrustGetTypeID(); } - late final _SecIdentityCreateWithCertificatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - CFTypeRef, SecCertificateRef, ffi.Pointer)>>( - 'SecIdentityCreateWithCertificate'); - late final _SecIdentityCreateWithCertificate = - _SecIdentityCreateWithCertificatePtr.asFunction< - int Function( - CFTypeRef, SecCertificateRef, ffi.Pointer)>(); + late final _SecTrustGetTypeIDPtr = + _lookup>('SecTrustGetTypeID'); + late final _SecTrustGetTypeID = + _SecTrustGetTypeIDPtr.asFunction(); - int SecIdentityCopyCertificate( - SecIdentityRef identityRef, - ffi.Pointer certificateRef, + int SecTrustCreateWithCertificates( + CFTypeRef certificates, + CFTypeRef policies, + ffi.Pointer trust, ) { - return _SecIdentityCopyCertificate( - identityRef, - certificateRef, + return _SecTrustCreateWithCertificates( + certificates, + policies, + trust, ); } - late final _SecIdentityCopyCertificatePtr = _lookup< + late final _SecTrustCreateWithCertificatesPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecIdentityRef, - ffi.Pointer)>>('SecIdentityCopyCertificate'); - late final _SecIdentityCopyCertificate = - _SecIdentityCopyCertificatePtr.asFunction< - int Function(SecIdentityRef, ffi.Pointer)>(); + OSStatus Function(CFTypeRef, CFTypeRef, + ffi.Pointer)>>('SecTrustCreateWithCertificates'); + late final _SecTrustCreateWithCertificates = + _SecTrustCreateWithCertificatesPtr.asFunction< + int Function(CFTypeRef, CFTypeRef, ffi.Pointer)>(); - int SecIdentityCopyPrivateKey( - SecIdentityRef identityRef, - ffi.Pointer privateKeyRef, + int SecTrustSetPolicies( + SecTrustRef trust, + CFTypeRef policies, ) { - return _SecIdentityCopyPrivateKey( - identityRef, - privateKeyRef, + return _SecTrustSetPolicies( + trust, + policies, ); } - late final _SecIdentityCopyPrivateKeyPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecIdentityRef, - ffi.Pointer)>>('SecIdentityCopyPrivateKey'); - late final _SecIdentityCopyPrivateKey = _SecIdentityCopyPrivateKeyPtr - .asFunction)>(); + late final _SecTrustSetPoliciesPtr = + _lookup>( + 'SecTrustSetPolicies'); + late final _SecTrustSetPolicies = _SecTrustSetPoliciesPtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); - int SecIdentityCopyPreference( - CFStringRef name, - int keyUsage, - CFArrayRef validIssuers, - ffi.Pointer identity, + int SecTrustCopyPolicies( + SecTrustRef trust, + ffi.Pointer policies, ) { - return _SecIdentityCopyPreference( - name, - keyUsage, - validIssuers, - identity, + return _SecTrustCopyPolicies( + trust, + policies, ); } - late final _SecIdentityCopyPreferencePtr = _lookup< + late final _SecTrustCopyPoliciesPtr = _lookup< ffi.NativeFunction< - OSStatus Function(CFStringRef, CSSM_KEYUSE, CFArrayRef, - ffi.Pointer)>>('SecIdentityCopyPreference'); - late final _SecIdentityCopyPreference = - _SecIdentityCopyPreferencePtr.asFunction< - int Function( - CFStringRef, int, CFArrayRef, ffi.Pointer)>(); + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustCopyPolicies'); + late final _SecTrustCopyPolicies = _SecTrustCopyPoliciesPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - SecIdentityRef SecIdentityCopyPreferred( - CFStringRef name, - CFArrayRef keyUsage, - CFArrayRef validIssuers, + int SecTrustSetNetworkFetchAllowed( + SecTrustRef trust, + int allowFetch, ) { - return _SecIdentityCopyPreferred( - name, - keyUsage, - validIssuers, + return _SecTrustSetNetworkFetchAllowed( + trust, + allowFetch, ); } - late final _SecIdentityCopyPreferredPtr = _lookup< - ffi.NativeFunction< - SecIdentityRef Function(CFStringRef, CFArrayRef, - CFArrayRef)>>('SecIdentityCopyPreferred'); - late final _SecIdentityCopyPreferred = - _SecIdentityCopyPreferredPtr.asFunction< - SecIdentityRef Function(CFStringRef, CFArrayRef, CFArrayRef)>(); + late final _SecTrustSetNetworkFetchAllowedPtr = + _lookup>( + 'SecTrustSetNetworkFetchAllowed'); + late final _SecTrustSetNetworkFetchAllowed = + _SecTrustSetNetworkFetchAllowedPtr.asFunction< + int Function(SecTrustRef, int)>(); - int SecIdentitySetPreference( - SecIdentityRef identity, - CFStringRef name, - int keyUsage, + int SecTrustGetNetworkFetchAllowed( + SecTrustRef trust, + ffi.Pointer allowFetch, ) { - return _SecIdentitySetPreference( - identity, - name, - keyUsage, + return _SecTrustGetNetworkFetchAllowed( + trust, + allowFetch, ); } - late final _SecIdentitySetPreferencePtr = _lookup< + late final _SecTrustGetNetworkFetchAllowedPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecIdentityRef, CFStringRef, - CSSM_KEYUSE)>>('SecIdentitySetPreference'); - late final _SecIdentitySetPreference = _SecIdentitySetPreferencePtr - .asFunction(); + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetNetworkFetchAllowed'); + late final _SecTrustGetNetworkFetchAllowed = + _SecTrustGetNetworkFetchAllowedPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - int SecIdentitySetPreferred( - SecIdentityRef identity, - CFStringRef name, - CFArrayRef keyUsage, + int SecTrustSetAnchorCertificates( + SecTrustRef trust, + CFArrayRef anchorCertificates, ) { - return _SecIdentitySetPreferred( - identity, - name, - keyUsage, + return _SecTrustSetAnchorCertificates( + trust, + anchorCertificates, ); } - late final _SecIdentitySetPreferredPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecIdentityRef, CFStringRef, - CFArrayRef)>>('SecIdentitySetPreferred'); - late final _SecIdentitySetPreferred = _SecIdentitySetPreferredPtr.asFunction< - int Function(SecIdentityRef, CFStringRef, CFArrayRef)>(); + late final _SecTrustSetAnchorCertificatesPtr = + _lookup>( + 'SecTrustSetAnchorCertificates'); + late final _SecTrustSetAnchorCertificates = _SecTrustSetAnchorCertificatesPtr + .asFunction(); - int SecIdentityCopySystemIdentity( - CFStringRef domain, - ffi.Pointer idRef, - ffi.Pointer actualDomain, + int SecTrustSetAnchorCertificatesOnly( + SecTrustRef trust, + int anchorCertificatesOnly, ) { - return _SecIdentityCopySystemIdentity( - domain, - idRef, - actualDomain, + return _SecTrustSetAnchorCertificatesOnly( + trust, + anchorCertificatesOnly, ); } - late final _SecIdentityCopySystemIdentityPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(CFStringRef, ffi.Pointer, - ffi.Pointer)>>('SecIdentityCopySystemIdentity'); - late final _SecIdentityCopySystemIdentity = - _SecIdentityCopySystemIdentityPtr.asFunction< - int Function(CFStringRef, ffi.Pointer, - ffi.Pointer)>(); + late final _SecTrustSetAnchorCertificatesOnlyPtr = + _lookup>( + 'SecTrustSetAnchorCertificatesOnly'); + late final _SecTrustSetAnchorCertificatesOnly = + _SecTrustSetAnchorCertificatesOnlyPtr.asFunction< + int Function(SecTrustRef, int)>(); - int SecIdentitySetSystemIdentity( - CFStringRef domain, - SecIdentityRef idRef, + int SecTrustCopyCustomAnchorCertificates( + SecTrustRef trust, + ffi.Pointer anchors, ) { - return _SecIdentitySetSystemIdentity( - domain, - idRef, + return _SecTrustCopyCustomAnchorCertificates( + trust, + anchors, ); } - late final _SecIdentitySetSystemIdentityPtr = _lookup< - ffi.NativeFunction>( - 'SecIdentitySetSystemIdentity'); - late final _SecIdentitySetSystemIdentity = _SecIdentitySetSystemIdentityPtr - .asFunction(); - - late final ffi.Pointer _kSecIdentityDomainDefault = - _lookup('kSecIdentityDomainDefault'); - - CFStringRef get kSecIdentityDomainDefault => _kSecIdentityDomainDefault.value; - - set kSecIdentityDomainDefault(CFStringRef value) => - _kSecIdentityDomainDefault.value = value; - - late final ffi.Pointer _kSecIdentityDomainKerberosKDC = - _lookup('kSecIdentityDomainKerberosKDC'); - - CFStringRef get kSecIdentityDomainKerberosKDC => - _kSecIdentityDomainKerberosKDC.value; - - set kSecIdentityDomainKerberosKDC(CFStringRef value) => - _kSecIdentityDomainKerberosKDC.value = value; + late final _SecTrustCopyCustomAnchorCertificatesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, ffi.Pointer)>>( + 'SecTrustCopyCustomAnchorCertificates'); + late final _SecTrustCopyCustomAnchorCertificates = + _SecTrustCopyCustomAnchorCertificatesPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - sec_trust_t sec_trust_create( + int SecTrustSetVerifyDate( SecTrustRef trust, + CFDateRef verifyDate, ) { - return _sec_trust_create( + return _SecTrustSetVerifyDate( trust, + verifyDate, ); } - late final _sec_trust_createPtr = - _lookup>( - 'sec_trust_create'); - late final _sec_trust_create = - _sec_trust_createPtr.asFunction(); + late final _SecTrustSetVerifyDatePtr = + _lookup>( + 'SecTrustSetVerifyDate'); + late final _SecTrustSetVerifyDate = _SecTrustSetVerifyDatePtr.asFunction< + int Function(SecTrustRef, CFDateRef)>(); - SecTrustRef sec_trust_copy_ref( - sec_trust_t trust, + double SecTrustGetVerifyTime( + SecTrustRef trust, ) { - return _sec_trust_copy_ref( + return _SecTrustGetVerifyTime( trust, ); } - late final _sec_trust_copy_refPtr = - _lookup>( - 'sec_trust_copy_ref'); - late final _sec_trust_copy_ref = - _sec_trust_copy_refPtr.asFunction(); + late final _SecTrustGetVerifyTimePtr = + _lookup>( + 'SecTrustGetVerifyTime'); + late final _SecTrustGetVerifyTime = + _SecTrustGetVerifyTimePtr.asFunction(); - sec_identity_t sec_identity_create( - SecIdentityRef identity, + int SecTrustEvaluate( + SecTrustRef trust, + ffi.Pointer result, ) { - return _sec_identity_create( - identity, + return _SecTrustEvaluate( + trust, + result, ); } - late final _sec_identity_createPtr = - _lookup>( - 'sec_identity_create'); - late final _sec_identity_create = _sec_identity_createPtr - .asFunction(); + late final _SecTrustEvaluatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustEvaluate'); + late final _SecTrustEvaluate = _SecTrustEvaluatePtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - sec_identity_t sec_identity_create_with_certificates( - SecIdentityRef identity, - CFArrayRef certificates, + int SecTrustEvaluateAsync( + SecTrustRef trust, + dispatch_queue_t queue, + SecTrustCallback result, ) { - return _sec_identity_create_with_certificates( - identity, - certificates, + return _SecTrustEvaluateAsync( + trust, + queue, + result, ); } - late final _sec_identity_create_with_certificatesPtr = _lookup< + late final _SecTrustEvaluateAsyncPtr = _lookup< ffi.NativeFunction< - sec_identity_t Function(SecIdentityRef, - CFArrayRef)>>('sec_identity_create_with_certificates'); - late final _sec_identity_create_with_certificates = - _sec_identity_create_with_certificatesPtr - .asFunction(); + OSStatus Function(SecTrustRef, dispatch_queue_t, + SecTrustCallback)>>('SecTrustEvaluateAsync'); + late final _SecTrustEvaluateAsync = _SecTrustEvaluateAsyncPtr.asFunction< + int Function(SecTrustRef, dispatch_queue_t, SecTrustCallback)>(); - bool sec_identity_access_certificates( - sec_identity_t identity, - ffi.Pointer<_ObjCBlock> handler, + bool SecTrustEvaluateWithError( + SecTrustRef trust, + ffi.Pointer error, ) { - return _sec_identity_access_certificates( - identity, - handler, + return _SecTrustEvaluateWithError( + trust, + error, ); } - late final _sec_identity_access_certificatesPtr = _lookup< + late final _SecTrustEvaluateWithErrorPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(sec_identity_t, - ffi.Pointer<_ObjCBlock>)>>('sec_identity_access_certificates'); - late final _sec_identity_access_certificates = - _sec_identity_access_certificatesPtr - .asFunction)>(); + ffi.Bool Function(SecTrustRef, + ffi.Pointer)>>('SecTrustEvaluateWithError'); + late final _SecTrustEvaluateWithError = _SecTrustEvaluateWithErrorPtr + .asFunction)>(); - SecIdentityRef sec_identity_copy_ref( - sec_identity_t identity, + int SecTrustEvaluateAsyncWithError( + SecTrustRef trust, + dispatch_queue_t queue, + SecTrustWithErrorCallback result, ) { - return _sec_identity_copy_ref( - identity, + return _SecTrustEvaluateAsyncWithError( + trust, + queue, + result, ); } - late final _sec_identity_copy_refPtr = - _lookup>( - 'sec_identity_copy_ref'); - late final _sec_identity_copy_ref = _sec_identity_copy_refPtr - .asFunction(); + late final _SecTrustEvaluateAsyncWithErrorPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, dispatch_queue_t, + SecTrustWithErrorCallback)>>('SecTrustEvaluateAsyncWithError'); + late final _SecTrustEvaluateAsyncWithError = + _SecTrustEvaluateAsyncWithErrorPtr.asFunction< + int Function( + SecTrustRef, dispatch_queue_t, SecTrustWithErrorCallback)>(); - CFArrayRef sec_identity_copy_certificates_ref( - sec_identity_t identity, + int SecTrustGetTrustResult( + SecTrustRef trust, + ffi.Pointer result, ) { - return _sec_identity_copy_certificates_ref( - identity, + return _SecTrustGetTrustResult( + trust, + result, ); } - late final _sec_identity_copy_certificates_refPtr = - _lookup>( - 'sec_identity_copy_certificates_ref'); - late final _sec_identity_copy_certificates_ref = - _sec_identity_copy_certificates_refPtr - .asFunction(); + late final _SecTrustGetTrustResultPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustGetTrustResult'); + late final _SecTrustGetTrustResult = _SecTrustGetTrustResultPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - sec_certificate_t sec_certificate_create( - SecCertificateRef certificate, + SecKeyRef SecTrustCopyPublicKey( + SecTrustRef trust, ) { - return _sec_certificate_create( - certificate, + return _SecTrustCopyPublicKey( + trust, ); } - late final _sec_certificate_createPtr = _lookup< - ffi.NativeFunction>( - 'sec_certificate_create'); - late final _sec_certificate_create = _sec_certificate_createPtr - .asFunction(); + late final _SecTrustCopyPublicKeyPtr = + _lookup>( + 'SecTrustCopyPublicKey'); + late final _SecTrustCopyPublicKey = + _SecTrustCopyPublicKeyPtr.asFunction(); - SecCertificateRef sec_certificate_copy_ref( - sec_certificate_t certificate, + SecKeyRef SecTrustCopyKey( + SecTrustRef trust, ) { - return _sec_certificate_copy_ref( - certificate, + return _SecTrustCopyKey( + trust, ); } - late final _sec_certificate_copy_refPtr = _lookup< - ffi.NativeFunction>( - 'sec_certificate_copy_ref'); - late final _sec_certificate_copy_ref = _sec_certificate_copy_refPtr - .asFunction(); + late final _SecTrustCopyKeyPtr = + _lookup>( + 'SecTrustCopyKey'); + late final _SecTrustCopyKey = + _SecTrustCopyKeyPtr.asFunction(); - ffi.Pointer sec_protocol_metadata_get_negotiated_protocol( - sec_protocol_metadata_t metadata, + int SecTrustGetCertificateCount( + SecTrustRef trust, ) { - return _sec_protocol_metadata_get_negotiated_protocol( - metadata, + return _SecTrustGetCertificateCount( + trust, ); } - late final _sec_protocol_metadata_get_negotiated_protocolPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_get_negotiated_protocol'); - late final _sec_protocol_metadata_get_negotiated_protocol = - _sec_protocol_metadata_get_negotiated_protocolPtr.asFunction< - ffi.Pointer Function(sec_protocol_metadata_t)>(); + late final _SecTrustGetCertificateCountPtr = + _lookup>( + 'SecTrustGetCertificateCount'); + late final _SecTrustGetCertificateCount = + _SecTrustGetCertificateCountPtr.asFunction(); - dispatch_data_t sec_protocol_metadata_copy_peer_public_key( - sec_protocol_metadata_t metadata, + SecCertificateRef SecTrustGetCertificateAtIndex( + SecTrustRef trust, + int ix, ) { - return _sec_protocol_metadata_copy_peer_public_key( - metadata, + return _SecTrustGetCertificateAtIndex( + trust, + ix, ); } - late final _sec_protocol_metadata_copy_peer_public_keyPtr = _lookup< - ffi.NativeFunction< - dispatch_data_t Function(sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_copy_peer_public_key'); - late final _sec_protocol_metadata_copy_peer_public_key = - _sec_protocol_metadata_copy_peer_public_keyPtr - .asFunction(); + late final _SecTrustGetCertificateAtIndexPtr = _lookup< + ffi.NativeFunction>( + 'SecTrustGetCertificateAtIndex'); + late final _SecTrustGetCertificateAtIndex = _SecTrustGetCertificateAtIndexPtr + .asFunction(); - int sec_protocol_metadata_get_negotiated_tls_protocol_version( - sec_protocol_metadata_t metadata, + CFDataRef SecTrustCopyExceptions( + SecTrustRef trust, ) { - return _sec_protocol_metadata_get_negotiated_tls_protocol_version( - metadata, + return _SecTrustCopyExceptions( + trust, ); } - late final _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr = - _lookup>( - 'sec_protocol_metadata_get_negotiated_tls_protocol_version'); - late final _sec_protocol_metadata_get_negotiated_tls_protocol_version = - _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr - .asFunction(); + late final _SecTrustCopyExceptionsPtr = + _lookup>( + 'SecTrustCopyExceptions'); + late final _SecTrustCopyExceptions = + _SecTrustCopyExceptionsPtr.asFunction(); - int sec_protocol_metadata_get_negotiated_protocol_version( - sec_protocol_metadata_t metadata, + bool SecTrustSetExceptions( + SecTrustRef trust, + CFDataRef exceptions, ) { - return _sec_protocol_metadata_get_negotiated_protocol_version( - metadata, + return _SecTrustSetExceptions( + trust, + exceptions, ); } - late final _sec_protocol_metadata_get_negotiated_protocol_versionPtr = - _lookup>( - 'sec_protocol_metadata_get_negotiated_protocol_version'); - late final _sec_protocol_metadata_get_negotiated_protocol_version = - _sec_protocol_metadata_get_negotiated_protocol_versionPtr - .asFunction(); + late final _SecTrustSetExceptionsPtr = + _lookup>( + 'SecTrustSetExceptions'); + late final _SecTrustSetExceptions = _SecTrustSetExceptionsPtr.asFunction< + bool Function(SecTrustRef, CFDataRef)>(); - int sec_protocol_metadata_get_negotiated_tls_ciphersuite( - sec_protocol_metadata_t metadata, + CFArrayRef SecTrustCopyProperties( + SecTrustRef trust, ) { - return _sec_protocol_metadata_get_negotiated_tls_ciphersuite( - metadata, + return _SecTrustCopyProperties( + trust, ); } - late final _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr = - _lookup>( - 'sec_protocol_metadata_get_negotiated_tls_ciphersuite'); - late final _sec_protocol_metadata_get_negotiated_tls_ciphersuite = - _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr - .asFunction(); + late final _SecTrustCopyPropertiesPtr = + _lookup>( + 'SecTrustCopyProperties'); + late final _SecTrustCopyProperties = + _SecTrustCopyPropertiesPtr.asFunction(); - int sec_protocol_metadata_get_negotiated_ciphersuite( - sec_protocol_metadata_t metadata, + CFDictionaryRef SecTrustCopyResult( + SecTrustRef trust, ) { - return _sec_protocol_metadata_get_negotiated_ciphersuite( - metadata, + return _SecTrustCopyResult( + trust, ); } - late final _sec_protocol_metadata_get_negotiated_ciphersuitePtr = _lookup< - ffi.NativeFunction>( - 'sec_protocol_metadata_get_negotiated_ciphersuite'); - late final _sec_protocol_metadata_get_negotiated_ciphersuite = - _sec_protocol_metadata_get_negotiated_ciphersuitePtr - .asFunction(); + late final _SecTrustCopyResultPtr = + _lookup>( + 'SecTrustCopyResult'); + late final _SecTrustCopyResult = _SecTrustCopyResultPtr.asFunction< + CFDictionaryRef Function(SecTrustRef)>(); - bool sec_protocol_metadata_get_early_data_accepted( - sec_protocol_metadata_t metadata, + int SecTrustSetOCSPResponse( + SecTrustRef trust, + CFTypeRef responseData, ) { - return _sec_protocol_metadata_get_early_data_accepted( - metadata, + return _SecTrustSetOCSPResponse( + trust, + responseData, ); } - late final _sec_protocol_metadata_get_early_data_acceptedPtr = - _lookup>( - 'sec_protocol_metadata_get_early_data_accepted'); - late final _sec_protocol_metadata_get_early_data_accepted = - _sec_protocol_metadata_get_early_data_acceptedPtr - .asFunction(); + late final _SecTrustSetOCSPResponsePtr = + _lookup>( + 'SecTrustSetOCSPResponse'); + late final _SecTrustSetOCSPResponse = _SecTrustSetOCSPResponsePtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); - bool sec_protocol_metadata_access_peer_certificate_chain( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + int SecTrustSetSignedCertificateTimestamps( + SecTrustRef trust, + CFArrayRef sctArray, ) { - return _sec_protocol_metadata_access_peer_certificate_chain( - metadata, - handler, + return _SecTrustSetSignedCertificateTimestamps( + trust, + sctArray, ); } - late final _sec_protocol_metadata_access_peer_certificate_chainPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_peer_certificate_chain'); - late final _sec_protocol_metadata_access_peer_certificate_chain = - _sec_protocol_metadata_access_peer_certificate_chainPtr.asFunction< - bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + late final _SecTrustSetSignedCertificateTimestampsPtr = + _lookup>( + 'SecTrustSetSignedCertificateTimestamps'); + late final _SecTrustSetSignedCertificateTimestamps = + _SecTrustSetSignedCertificateTimestampsPtr.asFunction< + int Function(SecTrustRef, CFArrayRef)>(); - bool sec_protocol_metadata_access_ocsp_response( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + CFArrayRef SecTrustCopyCertificateChain( + SecTrustRef trust, ) { - return _sec_protocol_metadata_access_ocsp_response( - metadata, - handler, + return _SecTrustCopyCertificateChain( + trust, ); } - late final _sec_protocol_metadata_access_ocsp_responsePtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_ocsp_response'); - late final _sec_protocol_metadata_access_ocsp_response = - _sec_protocol_metadata_access_ocsp_responsePtr.asFunction< - bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + late final _SecTrustCopyCertificateChainPtr = + _lookup>( + 'SecTrustCopyCertificateChain'); + late final _SecTrustCopyCertificateChain = _SecTrustCopyCertificateChainPtr + .asFunction(); - bool sec_protocol_metadata_access_supported_signature_algorithms( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, - ) { - return _sec_protocol_metadata_access_supported_signature_algorithms( - metadata, - handler, - ); - } + late final ffi.Pointer _gGuidCssm = + _lookup('gGuidCssm'); - late final _sec_protocol_metadata_access_supported_signature_algorithmsPtr = - _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_supported_signature_algorithms'); - late final _sec_protocol_metadata_access_supported_signature_algorithms = - _sec_protocol_metadata_access_supported_signature_algorithmsPtr - .asFunction< - bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + CSSM_GUID get gGuidCssm => _gGuidCssm.ref; - bool sec_protocol_metadata_access_distinguished_names( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, - ) { - return _sec_protocol_metadata_access_distinguished_names( - metadata, - handler, - ); - } + late final ffi.Pointer _gGuidAppleFileDL = + _lookup('gGuidAppleFileDL'); - late final _sec_protocol_metadata_access_distinguished_namesPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_distinguished_names'); - late final _sec_protocol_metadata_access_distinguished_names = - _sec_protocol_metadata_access_distinguished_namesPtr.asFunction< - bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + CSSM_GUID get gGuidAppleFileDL => _gGuidAppleFileDL.ref; - bool sec_protocol_metadata_access_pre_shared_keys( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, - ) { - return _sec_protocol_metadata_access_pre_shared_keys( - metadata, - handler, - ); - } + late final ffi.Pointer _gGuidAppleCSP = + _lookup('gGuidAppleCSP'); - late final _sec_protocol_metadata_access_pre_shared_keysPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_pre_shared_keys'); - late final _sec_protocol_metadata_access_pre_shared_keys = - _sec_protocol_metadata_access_pre_shared_keysPtr.asFunction< - bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + CSSM_GUID get gGuidAppleCSP => _gGuidAppleCSP.ref; - ffi.Pointer sec_protocol_metadata_get_server_name( - sec_protocol_metadata_t metadata, - ) { - return _sec_protocol_metadata_get_server_name( - metadata, - ); - } + late final ffi.Pointer _gGuidAppleCSPDL = + _lookup('gGuidAppleCSPDL'); - late final _sec_protocol_metadata_get_server_namePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_get_server_name'); - late final _sec_protocol_metadata_get_server_name = - _sec_protocol_metadata_get_server_namePtr.asFunction< - ffi.Pointer Function(sec_protocol_metadata_t)>(); + CSSM_GUID get gGuidAppleCSPDL => _gGuidAppleCSPDL.ref; - bool sec_protocol_metadata_peers_are_equal( - sec_protocol_metadata_t metadataA, - sec_protocol_metadata_t metadataB, - ) { - return _sec_protocol_metadata_peers_are_equal( - metadataA, - metadataB, - ); - } + late final ffi.Pointer _gGuidAppleX509CL = + _lookup('gGuidAppleX509CL'); - late final _sec_protocol_metadata_peers_are_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_peers_are_equal'); - late final _sec_protocol_metadata_peers_are_equal = - _sec_protocol_metadata_peers_are_equalPtr.asFunction< - bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); + CSSM_GUID get gGuidAppleX509CL => _gGuidAppleX509CL.ref; - bool sec_protocol_metadata_challenge_parameters_are_equal( - sec_protocol_metadata_t metadataA, - sec_protocol_metadata_t metadataB, - ) { - return _sec_protocol_metadata_challenge_parameters_are_equal( - metadataA, - metadataB, - ); - } + late final ffi.Pointer _gGuidAppleX509TP = + _lookup('gGuidAppleX509TP'); - late final _sec_protocol_metadata_challenge_parameters_are_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_challenge_parameters_are_equal'); - late final _sec_protocol_metadata_challenge_parameters_are_equal = - _sec_protocol_metadata_challenge_parameters_are_equalPtr.asFunction< - bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); + CSSM_GUID get gGuidAppleX509TP => _gGuidAppleX509TP.ref; - dispatch_data_t sec_protocol_metadata_create_secret( - sec_protocol_metadata_t metadata, - int label_len, - ffi.Pointer label, - int exporter_length, - ) { - return _sec_protocol_metadata_create_secret( - metadata, - label_len, - label, - exporter_length, - ); - } + late final ffi.Pointer _gGuidAppleLDAPDL = + _lookup('gGuidAppleLDAPDL'); - late final _sec_protocol_metadata_create_secretPtr = _lookup< - ffi.NativeFunction< - dispatch_data_t Function( - sec_protocol_metadata_t, - ffi.Size, - ffi.Pointer, - ffi.Size)>>('sec_protocol_metadata_create_secret'); - late final _sec_protocol_metadata_create_secret = - _sec_protocol_metadata_create_secretPtr.asFunction< - dispatch_data_t Function( - sec_protocol_metadata_t, int, ffi.Pointer, int)>(); + CSSM_GUID get gGuidAppleLDAPDL => _gGuidAppleLDAPDL.ref; - dispatch_data_t sec_protocol_metadata_create_secret_with_context( - sec_protocol_metadata_t metadata, - int label_len, - ffi.Pointer label, - int context_len, - ffi.Pointer context, - int exporter_length, + late final ffi.Pointer _gGuidAppleDotMacTP = + _lookup('gGuidAppleDotMacTP'); + + CSSM_GUID get gGuidAppleDotMacTP => _gGuidAppleDotMacTP.ref; + + late final ffi.Pointer _gGuidAppleSdCSPDL = + _lookup('gGuidAppleSdCSPDL'); + + CSSM_GUID get gGuidAppleSdCSPDL => _gGuidAppleSdCSPDL.ref; + + late final ffi.Pointer _gGuidAppleDotMacDL = + _lookup('gGuidAppleDotMacDL'); + + CSSM_GUID get gGuidAppleDotMacDL => _gGuidAppleDotMacDL.ref; + + void cssmPerror( + ffi.Pointer how, + int error, ) { - return _sec_protocol_metadata_create_secret_with_context( - metadata, - label_len, - label, - context_len, - context, - exporter_length, + return _cssmPerror( + how, + error, ); } - late final _sec_protocol_metadata_create_secret_with_contextPtr = _lookup< + late final _cssmPerrorPtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function( - sec_protocol_metadata_t, - ffi.Size, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size)>>('sec_protocol_metadata_create_secret_with_context'); - late final _sec_protocol_metadata_create_secret_with_context = - _sec_protocol_metadata_create_secret_with_contextPtr.asFunction< - dispatch_data_t Function(sec_protocol_metadata_t, int, - ffi.Pointer, int, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, CSSM_RETURN)>>('cssmPerror'); + late final _cssmPerror = + _cssmPerrorPtr.asFunction, int)>(); - bool sec_protocol_options_are_equal( - sec_protocol_options_t optionsA, - sec_protocol_options_t optionsB, + bool cssmOidToAlg( + ffi.Pointer oid, + ffi.Pointer alg, ) { - return _sec_protocol_options_are_equal( - optionsA, - optionsB, + return _cssmOidToAlg( + oid, + alg, ); } - late final _sec_protocol_options_are_equalPtr = _lookup< + late final _cssmOidToAlgPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(sec_protocol_options_t, - sec_protocol_options_t)>>('sec_protocol_options_are_equal'); - late final _sec_protocol_options_are_equal = - _sec_protocol_options_are_equalPtr.asFunction< - bool Function(sec_protocol_options_t, sec_protocol_options_t)>(); + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>('cssmOidToAlg'); + late final _cssmOidToAlg = _cssmOidToAlgPtr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - void sec_protocol_options_set_local_identity( - sec_protocol_options_t options, - sec_identity_t identity, + ffi.Pointer cssmAlgToOid( + int algId, ) { - return _sec_protocol_options_set_local_identity( - options, - identity, + return _cssmAlgToOid( + algId, ); } - late final _sec_protocol_options_set_local_identityPtr = _lookup< + late final _cssmAlgToOidPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - sec_identity_t)>>('sec_protocol_options_set_local_identity'); - late final _sec_protocol_options_set_local_identity = - _sec_protocol_options_set_local_identityPtr - .asFunction(); + ffi.Pointer Function(CSSM_ALGORITHMS)>>('cssmAlgToOid'); + late final _cssmAlgToOid = + _cssmAlgToOidPtr.asFunction Function(int)>(); - void sec_protocol_options_append_tls_ciphersuite( - sec_protocol_options_t options, - int ciphersuite, + int SecTrustSetOptions( + SecTrustRef trustRef, + int options, ) { - return _sec_protocol_options_append_tls_ciphersuite( + return _SecTrustSetOptions( + trustRef, options, - ciphersuite, ); } - late final _sec_protocol_options_append_tls_ciphersuitePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite'); - late final _sec_protocol_options_append_tls_ciphersuite = - _sec_protocol_options_append_tls_ciphersuitePtr - .asFunction(); + late final _SecTrustSetOptionsPtr = + _lookup>( + 'SecTrustSetOptions'); + late final _SecTrustSetOptions = + _SecTrustSetOptionsPtr.asFunction(); - void sec_protocol_options_add_tls_ciphersuite( - sec_protocol_options_t options, - int ciphersuite, + int SecTrustSetParameters( + SecTrustRef trustRef, + int action, + CFDataRef actionData, ) { - return _sec_protocol_options_add_tls_ciphersuite( - options, - ciphersuite, + return _SecTrustSetParameters( + trustRef, + action, + actionData, ); } - late final _sec_protocol_options_add_tls_ciphersuitePtr = _lookup< + late final _SecTrustSetParametersPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - SSLCipherSuite)>>('sec_protocol_options_add_tls_ciphersuite'); - late final _sec_protocol_options_add_tls_ciphersuite = - _sec_protocol_options_add_tls_ciphersuitePtr - .asFunction(); + OSStatus Function(SecTrustRef, CSSM_TP_ACTION, + CFDataRef)>>('SecTrustSetParameters'); + late final _SecTrustSetParameters = _SecTrustSetParametersPtr.asFunction< + int Function(SecTrustRef, int, CFDataRef)>(); - void sec_protocol_options_append_tls_ciphersuite_group( - sec_protocol_options_t options, - int group, + int SecTrustSetKeychains( + SecTrustRef trust, + CFTypeRef keychainOrArray, ) { - return _sec_protocol_options_append_tls_ciphersuite_group( - options, - group, + return _SecTrustSetKeychains( + trust, + keychainOrArray, ); } - late final _sec_protocol_options_append_tls_ciphersuite_groupPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite_group'); - late final _sec_protocol_options_append_tls_ciphersuite_group = - _sec_protocol_options_append_tls_ciphersuite_groupPtr - .asFunction(); + late final _SecTrustSetKeychainsPtr = + _lookup>( + 'SecTrustSetKeychains'); + late final _SecTrustSetKeychains = _SecTrustSetKeychainsPtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); - void sec_protocol_options_add_tls_ciphersuite_group( - sec_protocol_options_t options, - int group, + int SecTrustGetResult( + SecTrustRef trustRef, + ffi.Pointer result, + ffi.Pointer certChain, + ffi.Pointer> statusChain, ) { - return _sec_protocol_options_add_tls_ciphersuite_group( - options, - group, + return _SecTrustGetResult( + trustRef, + result, + certChain, + statusChain, ); } - late final _sec_protocol_options_add_tls_ciphersuite_groupPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_add_tls_ciphersuite_group'); - late final _sec_protocol_options_add_tls_ciphersuite_group = - _sec_protocol_options_add_tls_ciphersuite_groupPtr - .asFunction(); + late final _SecTrustGetResultPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>( + 'SecTrustGetResult'); + late final _SecTrustGetResult = _SecTrustGetResultPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - void sec_protocol_options_set_tls_min_version( - sec_protocol_options_t options, - int version, + int SecTrustGetCssmResult( + SecTrustRef trust, + ffi.Pointer result, ) { - return _sec_protocol_options_set_tls_min_version( - options, - version, + return _SecTrustGetCssmResult( + trust, + result, ); } - late final _sec_protocol_options_set_tls_min_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_set_tls_min_version'); - late final _sec_protocol_options_set_tls_min_version = - _sec_protocol_options_set_tls_min_versionPtr - .asFunction(); + late final _SecTrustGetCssmResultPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, + ffi.Pointer)>>( + 'SecTrustGetCssmResult'); + late final _SecTrustGetCssmResult = _SecTrustGetCssmResultPtr.asFunction< + int Function( + SecTrustRef, ffi.Pointer)>(); - void sec_protocol_options_set_min_tls_protocol_version( - sec_protocol_options_t options, - int version, + int SecTrustGetCssmResultCode( + SecTrustRef trust, + ffi.Pointer resultCode, ) { - return _sec_protocol_options_set_min_tls_protocol_version( - options, - version, + return _SecTrustGetCssmResultCode( + trust, + resultCode, ); } - late final _sec_protocol_options_set_min_tls_protocol_versionPtr = _lookup< + late final _SecTrustGetCssmResultCodePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_set_min_tls_protocol_version'); - late final _sec_protocol_options_set_min_tls_protocol_version = - _sec_protocol_options_set_min_tls_protocol_versionPtr - .asFunction(); - - int sec_protocol_options_get_default_min_tls_protocol_version() { - return _sec_protocol_options_get_default_min_tls_protocol_version(); - } - - late final _sec_protocol_options_get_default_min_tls_protocol_versionPtr = - _lookup>( - 'sec_protocol_options_get_default_min_tls_protocol_version'); - late final _sec_protocol_options_get_default_min_tls_protocol_version = - _sec_protocol_options_get_default_min_tls_protocol_versionPtr - .asFunction(); - - int sec_protocol_options_get_default_min_dtls_protocol_version() { - return _sec_protocol_options_get_default_min_dtls_protocol_version(); - } - - late final _sec_protocol_options_get_default_min_dtls_protocol_versionPtr = - _lookup>( - 'sec_protocol_options_get_default_min_dtls_protocol_version'); - late final _sec_protocol_options_get_default_min_dtls_protocol_version = - _sec_protocol_options_get_default_min_dtls_protocol_versionPtr - .asFunction(); + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetCssmResultCode'); + late final _SecTrustGetCssmResultCode = _SecTrustGetCssmResultCodePtr + .asFunction)>(); - void sec_protocol_options_set_tls_max_version( - sec_protocol_options_t options, - int version, + int SecTrustGetTPHandle( + SecTrustRef trust, + ffi.Pointer handle, ) { - return _sec_protocol_options_set_tls_max_version( - options, - version, + return _SecTrustGetTPHandle( + trust, + handle, ); } - late final _sec_protocol_options_set_tls_max_versionPtr = _lookup< + late final _SecTrustGetTPHandlePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_set_tls_max_version'); - late final _sec_protocol_options_set_tls_max_version = - _sec_protocol_options_set_tls_max_versionPtr - .asFunction(); + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetTPHandle'); + late final _SecTrustGetTPHandle = _SecTrustGetTPHandlePtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - void sec_protocol_options_set_max_tls_protocol_version( - sec_protocol_options_t options, - int version, + int SecTrustCopyAnchorCertificates( + ffi.Pointer anchors, ) { - return _sec_protocol_options_set_max_tls_protocol_version( - options, - version, + return _SecTrustCopyAnchorCertificates( + anchors, ); } - late final _sec_protocol_options_set_max_tls_protocol_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_set_max_tls_protocol_version'); - late final _sec_protocol_options_set_max_tls_protocol_version = - _sec_protocol_options_set_max_tls_protocol_versionPtr - .asFunction(); + late final _SecTrustCopyAnchorCertificatesPtr = + _lookup)>>( + 'SecTrustCopyAnchorCertificates'); + late final _SecTrustCopyAnchorCertificates = + _SecTrustCopyAnchorCertificatesPtr.asFunction< + int Function(ffi.Pointer)>(); - int sec_protocol_options_get_default_max_tls_protocol_version() { - return _sec_protocol_options_get_default_max_tls_protocol_version(); + int SecCertificateGetTypeID() { + return _SecCertificateGetTypeID(); } - late final _sec_protocol_options_get_default_max_tls_protocol_versionPtr = - _lookup>( - 'sec_protocol_options_get_default_max_tls_protocol_version'); - late final _sec_protocol_options_get_default_max_tls_protocol_version = - _sec_protocol_options_get_default_max_tls_protocol_versionPtr - .asFunction(); + late final _SecCertificateGetTypeIDPtr = + _lookup>( + 'SecCertificateGetTypeID'); + late final _SecCertificateGetTypeID = + _SecCertificateGetTypeIDPtr.asFunction(); - int sec_protocol_options_get_default_max_dtls_protocol_version() { - return _sec_protocol_options_get_default_max_dtls_protocol_version(); + SecCertificateRef SecCertificateCreateWithData( + CFAllocatorRef allocator, + CFDataRef data, + ) { + return _SecCertificateCreateWithData( + allocator, + data, + ); } - late final _sec_protocol_options_get_default_max_dtls_protocol_versionPtr = - _lookup>( - 'sec_protocol_options_get_default_max_dtls_protocol_version'); - late final _sec_protocol_options_get_default_max_dtls_protocol_version = - _sec_protocol_options_get_default_max_dtls_protocol_versionPtr - .asFunction(); + late final _SecCertificateCreateWithDataPtr = _lookup< + ffi.NativeFunction< + SecCertificateRef Function( + CFAllocatorRef, CFDataRef)>>('SecCertificateCreateWithData'); + late final _SecCertificateCreateWithData = _SecCertificateCreateWithDataPtr + .asFunction(); - bool sec_protocol_options_get_enable_encrypted_client_hello( - sec_protocol_options_t options, + CFDataRef SecCertificateCopyData( + SecCertificateRef certificate, ) { - return _sec_protocol_options_get_enable_encrypted_client_hello( - options, + return _SecCertificateCopyData( + certificate, ); } - late final _sec_protocol_options_get_enable_encrypted_client_helloPtr = - _lookup>( - 'sec_protocol_options_get_enable_encrypted_client_hello'); - late final _sec_protocol_options_get_enable_encrypted_client_hello = - _sec_protocol_options_get_enable_encrypted_client_helloPtr - .asFunction(); + late final _SecCertificateCopyDataPtr = + _lookup>( + 'SecCertificateCopyData'); + late final _SecCertificateCopyData = _SecCertificateCopyDataPtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); - bool sec_protocol_options_get_quic_use_legacy_codepoint( - sec_protocol_options_t options, + CFStringRef SecCertificateCopySubjectSummary( + SecCertificateRef certificate, ) { - return _sec_protocol_options_get_quic_use_legacy_codepoint( - options, + return _SecCertificateCopySubjectSummary( + certificate, ); } - late final _sec_protocol_options_get_quic_use_legacy_codepointPtr = - _lookup>( - 'sec_protocol_options_get_quic_use_legacy_codepoint'); - late final _sec_protocol_options_get_quic_use_legacy_codepoint = - _sec_protocol_options_get_quic_use_legacy_codepointPtr - .asFunction(); + late final _SecCertificateCopySubjectSummaryPtr = + _lookup>( + 'SecCertificateCopySubjectSummary'); + late final _SecCertificateCopySubjectSummary = + _SecCertificateCopySubjectSummaryPtr.asFunction< + CFStringRef Function(SecCertificateRef)>(); - void sec_protocol_options_add_tls_application_protocol( - sec_protocol_options_t options, - ffi.Pointer application_protocol, + int SecCertificateCopyCommonName( + SecCertificateRef certificate, + ffi.Pointer commonName, ) { - return _sec_protocol_options_add_tls_application_protocol( - options, - application_protocol, + return _SecCertificateCopyCommonName( + certificate, + commonName, ); } - late final _sec_protocol_options_add_tls_application_protocolPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_options_t, ffi.Pointer)>>( - 'sec_protocol_options_add_tls_application_protocol'); - late final _sec_protocol_options_add_tls_application_protocol = - _sec_protocol_options_add_tls_application_protocolPtr.asFunction< - void Function(sec_protocol_options_t, ffi.Pointer)>(); + late final _SecCertificateCopyCommonNamePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyCommonName'); + late final _SecCertificateCopyCommonName = _SecCertificateCopyCommonNamePtr + .asFunction)>(); - void sec_protocol_options_set_tls_server_name( - sec_protocol_options_t options, - ffi.Pointer server_name, + int SecCertificateCopyEmailAddresses( + SecCertificateRef certificate, + ffi.Pointer emailAddresses, ) { - return _sec_protocol_options_set_tls_server_name( - options, - server_name, + return _SecCertificateCopyEmailAddresses( + certificate, + emailAddresses, ); } - late final _sec_protocol_options_set_tls_server_namePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_options_t, ffi.Pointer)>>( - 'sec_protocol_options_set_tls_server_name'); - late final _sec_protocol_options_set_tls_server_name = - _sec_protocol_options_set_tls_server_namePtr.asFunction< - void Function(sec_protocol_options_t, ffi.Pointer)>(); + late final _SecCertificateCopyEmailAddressesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyEmailAddresses'); + late final _SecCertificateCopyEmailAddresses = + _SecCertificateCopyEmailAddressesPtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_tls_diffie_hellman_parameters( - sec_protocol_options_t options, - dispatch_data_t params, + CFDataRef SecCertificateCopyNormalizedIssuerSequence( + SecCertificateRef certificate, ) { - return _sec_protocol_options_set_tls_diffie_hellman_parameters( - options, - params, + return _SecCertificateCopyNormalizedIssuerSequence( + certificate, ); } - late final _sec_protocol_options_set_tls_diffie_hellman_parametersPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( - 'sec_protocol_options_set_tls_diffie_hellman_parameters'); - late final _sec_protocol_options_set_tls_diffie_hellman_parameters = - _sec_protocol_options_set_tls_diffie_hellman_parametersPtr - .asFunction(); + late final _SecCertificateCopyNormalizedIssuerSequencePtr = + _lookup>( + 'SecCertificateCopyNormalizedIssuerSequence'); + late final _SecCertificateCopyNormalizedIssuerSequence = + _SecCertificateCopyNormalizedIssuerSequencePtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); - void sec_protocol_options_add_pre_shared_key( - sec_protocol_options_t options, - dispatch_data_t psk, - dispatch_data_t psk_identity, + CFDataRef SecCertificateCopyNormalizedSubjectSequence( + SecCertificateRef certificate, ) { - return _sec_protocol_options_add_pre_shared_key( - options, - psk, - psk_identity, + return _SecCertificateCopyNormalizedSubjectSequence( + certificate, ); } - late final _sec_protocol_options_add_pre_shared_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, dispatch_data_t, - dispatch_data_t)>>('sec_protocol_options_add_pre_shared_key'); - late final _sec_protocol_options_add_pre_shared_key = - _sec_protocol_options_add_pre_shared_keyPtr.asFunction< - void Function( - sec_protocol_options_t, dispatch_data_t, dispatch_data_t)>(); + late final _SecCertificateCopyNormalizedSubjectSequencePtr = + _lookup>( + 'SecCertificateCopyNormalizedSubjectSequence'); + late final _SecCertificateCopyNormalizedSubjectSequence = + _SecCertificateCopyNormalizedSubjectSequencePtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); - void sec_protocol_options_set_tls_pre_shared_key_identity_hint( - sec_protocol_options_t options, - dispatch_data_t psk_identity_hint, + SecKeyRef SecCertificateCopyKey( + SecCertificateRef certificate, ) { - return _sec_protocol_options_set_tls_pre_shared_key_identity_hint( - options, - psk_identity_hint, + return _SecCertificateCopyKey( + certificate, ); } - late final _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( - 'sec_protocol_options_set_tls_pre_shared_key_identity_hint'); - late final _sec_protocol_options_set_tls_pre_shared_key_identity_hint = - _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr - .asFunction(); + late final _SecCertificateCopyKeyPtr = + _lookup>( + 'SecCertificateCopyKey'); + late final _SecCertificateCopyKey = _SecCertificateCopyKeyPtr.asFunction< + SecKeyRef Function(SecCertificateRef)>(); - void sec_protocol_options_set_pre_shared_key_selection_block( - sec_protocol_options_t options, - sec_protocol_pre_shared_key_selection_t psk_selection_block, - dispatch_queue_t psk_selection_queue, + int SecCertificateCopyPublicKey( + SecCertificateRef certificate, + ffi.Pointer key, ) { - return _sec_protocol_options_set_pre_shared_key_selection_block( - options, - psk_selection_block, - psk_selection_queue, + return _SecCertificateCopyPublicKey( + certificate, + key, ); } - late final _sec_protocol_options_set_pre_shared_key_selection_blockPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_options_t, - sec_protocol_pre_shared_key_selection_t, - dispatch_queue_t)>>( - 'sec_protocol_options_set_pre_shared_key_selection_block'); - late final _sec_protocol_options_set_pre_shared_key_selection_block = - _sec_protocol_options_set_pre_shared_key_selection_blockPtr.asFunction< - void Function(sec_protocol_options_t, - sec_protocol_pre_shared_key_selection_t, dispatch_queue_t)>(); + late final _SecCertificateCopyPublicKeyPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyPublicKey'); + late final _SecCertificateCopyPublicKey = _SecCertificateCopyPublicKeyPtr + .asFunction)>(); - void sec_protocol_options_set_tls_tickets_enabled( - sec_protocol_options_t options, - bool tickets_enabled, + CFDataRef SecCertificateCopySerialNumberData( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _sec_protocol_options_set_tls_tickets_enabled( - options, - tickets_enabled, + return _SecCertificateCopySerialNumberData( + certificate, + error, ); } - late final _sec_protocol_options_set_tls_tickets_enabledPtr = _lookup< + late final _SecCertificateCopySerialNumberDataPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_tickets_enabled'); - late final _sec_protocol_options_set_tls_tickets_enabled = - _sec_protocol_options_set_tls_tickets_enabledPtr - .asFunction(); + CFDataRef Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopySerialNumberData'); + late final _SecCertificateCopySerialNumberData = + _SecCertificateCopySerialNumberDataPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_tls_is_fallback_attempt( - sec_protocol_options_t options, - bool is_fallback_attempt, + CFDataRef SecCertificateCopySerialNumber( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _sec_protocol_options_set_tls_is_fallback_attempt( - options, - is_fallback_attempt, + return _SecCertificateCopySerialNumber( + certificate, + error, ); } - late final _sec_protocol_options_set_tls_is_fallback_attemptPtr = _lookup< + late final _SecCertificateCopySerialNumberPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_is_fallback_attempt'); - late final _sec_protocol_options_set_tls_is_fallback_attempt = - _sec_protocol_options_set_tls_is_fallback_attemptPtr - .asFunction(); + CFDataRef Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopySerialNumber'); + late final _SecCertificateCopySerialNumber = + _SecCertificateCopySerialNumberPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_tls_resumption_enabled( - sec_protocol_options_t options, - bool resumption_enabled, + int SecCertificateCreateFromData( + ffi.Pointer data, + int type, + int encoding, + ffi.Pointer certificate, ) { - return _sec_protocol_options_set_tls_resumption_enabled( - options, - resumption_enabled, + return _SecCertificateCreateFromData( + data, + type, + encoding, + certificate, ); } - late final _sec_protocol_options_set_tls_resumption_enabledPtr = _lookup< + late final _SecCertificateCreateFromDataPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_resumption_enabled'); - late final _sec_protocol_options_set_tls_resumption_enabled = - _sec_protocol_options_set_tls_resumption_enabledPtr - .asFunction(); + OSStatus Function( + ffi.Pointer, + CSSM_CERT_TYPE, + CSSM_CERT_ENCODING, + ffi.Pointer)>>('SecCertificateCreateFromData'); + late final _SecCertificateCreateFromData = + _SecCertificateCreateFromDataPtr.asFunction< + int Function(ffi.Pointer, int, int, + ffi.Pointer)>(); - void sec_protocol_options_set_tls_false_start_enabled( - sec_protocol_options_t options, - bool false_start_enabled, + int SecCertificateAddToKeychain( + SecCertificateRef certificate, + SecKeychainRef keychain, ) { - return _sec_protocol_options_set_tls_false_start_enabled( - options, - false_start_enabled, + return _SecCertificateAddToKeychain( + certificate, + keychain, ); } - late final _sec_protocol_options_set_tls_false_start_enabledPtr = _lookup< + late final _SecCertificateAddToKeychainPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_false_start_enabled'); - late final _sec_protocol_options_set_tls_false_start_enabled = - _sec_protocol_options_set_tls_false_start_enabledPtr - .asFunction(); + OSStatus Function(SecCertificateRef, + SecKeychainRef)>>('SecCertificateAddToKeychain'); + late final _SecCertificateAddToKeychain = _SecCertificateAddToKeychainPtr + .asFunction(); - void sec_protocol_options_set_tls_ocsp_enabled( - sec_protocol_options_t options, - bool ocsp_enabled, + int SecCertificateGetData( + SecCertificateRef certificate, + CSSM_DATA_PTR data, ) { - return _sec_protocol_options_set_tls_ocsp_enabled( - options, - ocsp_enabled, + return _SecCertificateGetData( + certificate, + data, ); } - late final _sec_protocol_options_set_tls_ocsp_enabledPtr = _lookup< + late final _SecCertificateGetDataPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_ocsp_enabled'); - late final _sec_protocol_options_set_tls_ocsp_enabled = - _sec_protocol_options_set_tls_ocsp_enabledPtr - .asFunction(); + OSStatus Function( + SecCertificateRef, CSSM_DATA_PTR)>>('SecCertificateGetData'); + late final _SecCertificateGetData = _SecCertificateGetDataPtr.asFunction< + int Function(SecCertificateRef, CSSM_DATA_PTR)>(); - void sec_protocol_options_set_tls_sct_enabled( - sec_protocol_options_t options, - bool sct_enabled, + int SecCertificateGetType( + SecCertificateRef certificate, + ffi.Pointer certificateType, ) { - return _sec_protocol_options_set_tls_sct_enabled( - options, - sct_enabled, + return _SecCertificateGetType( + certificate, + certificateType, ); } - late final _sec_protocol_options_set_tls_sct_enabledPtr = _lookup< + late final _SecCertificateGetTypePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_sct_enabled'); - late final _sec_protocol_options_set_tls_sct_enabled = - _sec_protocol_options_set_tls_sct_enabledPtr - .asFunction(); + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateGetType'); + late final _SecCertificateGetType = _SecCertificateGetTypePtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_tls_renegotiation_enabled( - sec_protocol_options_t options, - bool renegotiation_enabled, + int SecCertificateGetSubject( + SecCertificateRef certificate, + ffi.Pointer> subject, ) { - return _sec_protocol_options_set_tls_renegotiation_enabled( - options, - renegotiation_enabled, + return _SecCertificateGetSubject( + certificate, + subject, ); } - late final _sec_protocol_options_set_tls_renegotiation_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_renegotiation_enabled'); - late final _sec_protocol_options_set_tls_renegotiation_enabled = - _sec_protocol_options_set_tls_renegotiation_enabledPtr - .asFunction(); + late final _SecCertificateGetSubjectPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer>)>>( + 'SecCertificateGetSubject'); + late final _SecCertificateGetSubject = + _SecCertificateGetSubjectPtr.asFunction< + int Function( + SecCertificateRef, ffi.Pointer>)>(); - void sec_protocol_options_set_peer_authentication_required( - sec_protocol_options_t options, - bool peer_authentication_required, + int SecCertificateGetIssuer( + SecCertificateRef certificate, + ffi.Pointer> issuer, ) { - return _sec_protocol_options_set_peer_authentication_required( - options, - peer_authentication_required, + return _SecCertificateGetIssuer( + certificate, + issuer, ); } - late final _sec_protocol_options_set_peer_authentication_requiredPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( - 'sec_protocol_options_set_peer_authentication_required'); - late final _sec_protocol_options_set_peer_authentication_required = - _sec_protocol_options_set_peer_authentication_requiredPtr - .asFunction(); + late final _SecCertificateGetIssuerPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer>)>>( + 'SecCertificateGetIssuer'); + late final _SecCertificateGetIssuer = _SecCertificateGetIssuerPtr.asFunction< + int Function( + SecCertificateRef, ffi.Pointer>)>(); - void sec_protocol_options_set_peer_authentication_optional( - sec_protocol_options_t options, - bool peer_authentication_optional, + int SecCertificateGetCLHandle( + SecCertificateRef certificate, + ffi.Pointer clHandle, ) { - return _sec_protocol_options_set_peer_authentication_optional( - options, - peer_authentication_optional, + return _SecCertificateGetCLHandle( + certificate, + clHandle, ); } - late final _sec_protocol_options_set_peer_authentication_optionalPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( - 'sec_protocol_options_set_peer_authentication_optional'); - late final _sec_protocol_options_set_peer_authentication_optional = - _sec_protocol_options_set_peer_authentication_optionalPtr - .asFunction(); + late final _SecCertificateGetCLHandlePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateGetCLHandle'); + late final _SecCertificateGetCLHandle = + _SecCertificateGetCLHandlePtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_enable_encrypted_client_hello( - sec_protocol_options_t options, - bool enable_encrypted_client_hello, + int SecCertificateGetAlgorithmID( + SecCertificateRef certificate, + ffi.Pointer> algid, ) { - return _sec_protocol_options_set_enable_encrypted_client_hello( - options, - enable_encrypted_client_hello, + return _SecCertificateGetAlgorithmID( + certificate, + algid, ); } - late final _sec_protocol_options_set_enable_encrypted_client_helloPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( - 'sec_protocol_options_set_enable_encrypted_client_hello'); - late final _sec_protocol_options_set_enable_encrypted_client_hello = - _sec_protocol_options_set_enable_encrypted_client_helloPtr - .asFunction(); + late final _SecCertificateGetAlgorithmIDPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecCertificateRef, ffi.Pointer>)>>( + 'SecCertificateGetAlgorithmID'); + late final _SecCertificateGetAlgorithmID = + _SecCertificateGetAlgorithmIDPtr.asFunction< + int Function( + SecCertificateRef, ffi.Pointer>)>(); - void sec_protocol_options_set_quic_use_legacy_codepoint( - sec_protocol_options_t options, - bool quic_use_legacy_codepoint, + int SecCertificateCopyPreference( + CFStringRef name, + int keyUsage, + ffi.Pointer certificate, ) { - return _sec_protocol_options_set_quic_use_legacy_codepoint( - options, - quic_use_legacy_codepoint, + return _SecCertificateCopyPreference( + name, + keyUsage, + certificate, ); } - late final _sec_protocol_options_set_quic_use_legacy_codepointPtr = _lookup< + late final _SecCertificateCopyPreferencePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_quic_use_legacy_codepoint'); - late final _sec_protocol_options_set_quic_use_legacy_codepoint = - _sec_protocol_options_set_quic_use_legacy_codepointPtr - .asFunction(); + OSStatus Function(CFStringRef, uint32, + ffi.Pointer)>>('SecCertificateCopyPreference'); + late final _SecCertificateCopyPreference = + _SecCertificateCopyPreferencePtr.asFunction< + int Function(CFStringRef, int, ffi.Pointer)>(); - void sec_protocol_options_set_key_update_block( - sec_protocol_options_t options, - sec_protocol_key_update_t key_update_block, - dispatch_queue_t key_update_queue, + SecCertificateRef SecCertificateCopyPreferred( + CFStringRef name, + CFArrayRef keyUsage, ) { - return _sec_protocol_options_set_key_update_block( - options, - key_update_block, - key_update_queue, + return _SecCertificateCopyPreferred( + name, + keyUsage, ); } - late final _sec_protocol_options_set_key_update_blockPtr = _lookup< + late final _SecCertificateCopyPreferredPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, sec_protocol_key_update_t, - dispatch_queue_t)>>('sec_protocol_options_set_key_update_block'); - late final _sec_protocol_options_set_key_update_block = - _sec_protocol_options_set_key_update_blockPtr.asFunction< - void Function(sec_protocol_options_t, sec_protocol_key_update_t, - dispatch_queue_t)>(); + SecCertificateRef Function( + CFStringRef, CFArrayRef)>>('SecCertificateCopyPreferred'); + late final _SecCertificateCopyPreferred = _SecCertificateCopyPreferredPtr + .asFunction(); - void sec_protocol_options_set_challenge_block( - sec_protocol_options_t options, - sec_protocol_challenge_t challenge_block, - dispatch_queue_t challenge_queue, + int SecCertificateSetPreference( + SecCertificateRef certificate, + CFStringRef name, + int keyUsage, + CFDateRef date, ) { - return _sec_protocol_options_set_challenge_block( - options, - challenge_block, - challenge_queue, + return _SecCertificateSetPreference( + certificate, + name, + keyUsage, + date, ); } - late final _sec_protocol_options_set_challenge_blockPtr = _lookup< + late final _SecCertificateSetPreferencePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, sec_protocol_challenge_t, - dispatch_queue_t)>>('sec_protocol_options_set_challenge_block'); - late final _sec_protocol_options_set_challenge_block = - _sec_protocol_options_set_challenge_blockPtr.asFunction< - void Function(sec_protocol_options_t, sec_protocol_challenge_t, - dispatch_queue_t)>(); + OSStatus Function(SecCertificateRef, CFStringRef, uint32, + CFDateRef)>>('SecCertificateSetPreference'); + late final _SecCertificateSetPreference = + _SecCertificateSetPreferencePtr.asFunction< + int Function(SecCertificateRef, CFStringRef, int, CFDateRef)>(); - void sec_protocol_options_set_verify_block( - sec_protocol_options_t options, - sec_protocol_verify_t verify_block, - dispatch_queue_t verify_block_queue, + int SecCertificateSetPreferred( + SecCertificateRef certificate, + CFStringRef name, + CFArrayRef keyUsage, ) { - return _sec_protocol_options_set_verify_block( - options, - verify_block, - verify_block_queue, + return _SecCertificateSetPreferred( + certificate, + name, + keyUsage, ); } - late final _sec_protocol_options_set_verify_blockPtr = _lookup< + late final _SecCertificateSetPreferredPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, sec_protocol_verify_t, - dispatch_queue_t)>>('sec_protocol_options_set_verify_block'); - late final _sec_protocol_options_set_verify_block = - _sec_protocol_options_set_verify_blockPtr.asFunction< - void Function(sec_protocol_options_t, sec_protocol_verify_t, - dispatch_queue_t)>(); + OSStatus Function(SecCertificateRef, CFStringRef, + CFArrayRef)>>('SecCertificateSetPreferred'); + late final _SecCertificateSetPreferred = _SecCertificateSetPreferredPtr + .asFunction(); - late final ffi.Pointer _kSSLSessionConfig_default = - _lookup('kSSLSessionConfig_default'); + late final ffi.Pointer _kSecPropertyKeyType = + _lookup('kSecPropertyKeyType'); - CFStringRef get kSSLSessionConfig_default => _kSSLSessionConfig_default.value; + CFStringRef get kSecPropertyKeyType => _kSecPropertyKeyType.value; - set kSSLSessionConfig_default(CFStringRef value) => - _kSSLSessionConfig_default.value = value; + set kSecPropertyKeyType(CFStringRef value) => + _kSecPropertyKeyType.value = value; - late final ffi.Pointer _kSSLSessionConfig_ATSv1 = - _lookup('kSSLSessionConfig_ATSv1'); + late final ffi.Pointer _kSecPropertyKeyLabel = + _lookup('kSecPropertyKeyLabel'); - CFStringRef get kSSLSessionConfig_ATSv1 => _kSSLSessionConfig_ATSv1.value; + CFStringRef get kSecPropertyKeyLabel => _kSecPropertyKeyLabel.value; - set kSSLSessionConfig_ATSv1(CFStringRef value) => - _kSSLSessionConfig_ATSv1.value = value; + set kSecPropertyKeyLabel(CFStringRef value) => + _kSecPropertyKeyLabel.value = value; - late final ffi.Pointer _kSSLSessionConfig_ATSv1_noPFS = - _lookup('kSSLSessionConfig_ATSv1_noPFS'); + late final ffi.Pointer _kSecPropertyKeyLocalizedLabel = + _lookup('kSecPropertyKeyLocalizedLabel'); - CFStringRef get kSSLSessionConfig_ATSv1_noPFS => - _kSSLSessionConfig_ATSv1_noPFS.value; + CFStringRef get kSecPropertyKeyLocalizedLabel => + _kSecPropertyKeyLocalizedLabel.value; - set kSSLSessionConfig_ATSv1_noPFS(CFStringRef value) => - _kSSLSessionConfig_ATSv1_noPFS.value = value; + set kSecPropertyKeyLocalizedLabel(CFStringRef value) => + _kSecPropertyKeyLocalizedLabel.value = value; - late final ffi.Pointer _kSSLSessionConfig_standard = - _lookup('kSSLSessionConfig_standard'); + late final ffi.Pointer _kSecPropertyKeyValue = + _lookup('kSecPropertyKeyValue'); - CFStringRef get kSSLSessionConfig_standard => - _kSSLSessionConfig_standard.value; + CFStringRef get kSecPropertyKeyValue => _kSecPropertyKeyValue.value; - set kSSLSessionConfig_standard(CFStringRef value) => - _kSSLSessionConfig_standard.value = value; + set kSecPropertyKeyValue(CFStringRef value) => + _kSecPropertyKeyValue.value = value; - late final ffi.Pointer _kSSLSessionConfig_RC4_fallback = - _lookup('kSSLSessionConfig_RC4_fallback'); + late final ffi.Pointer _kSecPropertyTypeWarning = + _lookup('kSecPropertyTypeWarning'); - CFStringRef get kSSLSessionConfig_RC4_fallback => - _kSSLSessionConfig_RC4_fallback.value; + CFStringRef get kSecPropertyTypeWarning => _kSecPropertyTypeWarning.value; - set kSSLSessionConfig_RC4_fallback(CFStringRef value) => - _kSSLSessionConfig_RC4_fallback.value = value; + set kSecPropertyTypeWarning(CFStringRef value) => + _kSecPropertyTypeWarning.value = value; - late final ffi.Pointer _kSSLSessionConfig_TLSv1_fallback = - _lookup('kSSLSessionConfig_TLSv1_fallback'); + late final ffi.Pointer _kSecPropertyTypeSuccess = + _lookup('kSecPropertyTypeSuccess'); - CFStringRef get kSSLSessionConfig_TLSv1_fallback => - _kSSLSessionConfig_TLSv1_fallback.value; + CFStringRef get kSecPropertyTypeSuccess => _kSecPropertyTypeSuccess.value; - set kSSLSessionConfig_TLSv1_fallback(CFStringRef value) => - _kSSLSessionConfig_TLSv1_fallback.value = value; + set kSecPropertyTypeSuccess(CFStringRef value) => + _kSecPropertyTypeSuccess.value = value; - late final ffi.Pointer _kSSLSessionConfig_TLSv1_RC4_fallback = - _lookup('kSSLSessionConfig_TLSv1_RC4_fallback'); + late final ffi.Pointer _kSecPropertyTypeSection = + _lookup('kSecPropertyTypeSection'); - CFStringRef get kSSLSessionConfig_TLSv1_RC4_fallback => - _kSSLSessionConfig_TLSv1_RC4_fallback.value; + CFStringRef get kSecPropertyTypeSection => _kSecPropertyTypeSection.value; - set kSSLSessionConfig_TLSv1_RC4_fallback(CFStringRef value) => - _kSSLSessionConfig_TLSv1_RC4_fallback.value = value; + set kSecPropertyTypeSection(CFStringRef value) => + _kSecPropertyTypeSection.value = value; - late final ffi.Pointer _kSSLSessionConfig_legacy = - _lookup('kSSLSessionConfig_legacy'); + late final ffi.Pointer _kSecPropertyTypeData = + _lookup('kSecPropertyTypeData'); - CFStringRef get kSSLSessionConfig_legacy => _kSSLSessionConfig_legacy.value; + CFStringRef get kSecPropertyTypeData => _kSecPropertyTypeData.value; - set kSSLSessionConfig_legacy(CFStringRef value) => - _kSSLSessionConfig_legacy.value = value; + set kSecPropertyTypeData(CFStringRef value) => + _kSecPropertyTypeData.value = value; - late final ffi.Pointer _kSSLSessionConfig_legacy_DHE = - _lookup('kSSLSessionConfig_legacy_DHE'); + late final ffi.Pointer _kSecPropertyTypeString = + _lookup('kSecPropertyTypeString'); - CFStringRef get kSSLSessionConfig_legacy_DHE => - _kSSLSessionConfig_legacy_DHE.value; + CFStringRef get kSecPropertyTypeString => _kSecPropertyTypeString.value; - set kSSLSessionConfig_legacy_DHE(CFStringRef value) => - _kSSLSessionConfig_legacy_DHE.value = value; + set kSecPropertyTypeString(CFStringRef value) => + _kSecPropertyTypeString.value = value; - late final ffi.Pointer _kSSLSessionConfig_anonymous = - _lookup('kSSLSessionConfig_anonymous'); + late final ffi.Pointer _kSecPropertyTypeURL = + _lookup('kSecPropertyTypeURL'); - CFStringRef get kSSLSessionConfig_anonymous => - _kSSLSessionConfig_anonymous.value; + CFStringRef get kSecPropertyTypeURL => _kSecPropertyTypeURL.value; - set kSSLSessionConfig_anonymous(CFStringRef value) => - _kSSLSessionConfig_anonymous.value = value; + set kSecPropertyTypeURL(CFStringRef value) => + _kSecPropertyTypeURL.value = value; - late final ffi.Pointer _kSSLSessionConfig_3DES_fallback = - _lookup('kSSLSessionConfig_3DES_fallback'); + late final ffi.Pointer _kSecPropertyTypeDate = + _lookup('kSecPropertyTypeDate'); - CFStringRef get kSSLSessionConfig_3DES_fallback => - _kSSLSessionConfig_3DES_fallback.value; + CFStringRef get kSecPropertyTypeDate => _kSecPropertyTypeDate.value; - set kSSLSessionConfig_3DES_fallback(CFStringRef value) => - _kSSLSessionConfig_3DES_fallback.value = value; + set kSecPropertyTypeDate(CFStringRef value) => + _kSecPropertyTypeDate.value = value; - late final ffi.Pointer _kSSLSessionConfig_TLSv1_3DES_fallback = - _lookup('kSSLSessionConfig_TLSv1_3DES_fallback'); + late final ffi.Pointer _kSecPropertyTypeArray = + _lookup('kSecPropertyTypeArray'); - CFStringRef get kSSLSessionConfig_TLSv1_3DES_fallback => - _kSSLSessionConfig_TLSv1_3DES_fallback.value; + CFStringRef get kSecPropertyTypeArray => _kSecPropertyTypeArray.value; - set kSSLSessionConfig_TLSv1_3DES_fallback(CFStringRef value) => - _kSSLSessionConfig_TLSv1_3DES_fallback.value = value; + set kSecPropertyTypeArray(CFStringRef value) => + _kSecPropertyTypeArray.value = value; - int SSLContextGetTypeID() { - return _SSLContextGetTypeID(); - } + late final ffi.Pointer _kSecPropertyTypeNumber = + _lookup('kSecPropertyTypeNumber'); - late final _SSLContextGetTypeIDPtr = - _lookup>('SSLContextGetTypeID'); - late final _SSLContextGetTypeID = - _SSLContextGetTypeIDPtr.asFunction(); + CFStringRef get kSecPropertyTypeNumber => _kSecPropertyTypeNumber.value; - SSLContextRef SSLCreateContext( - CFAllocatorRef alloc, - int protocolSide, - int connectionType, + set kSecPropertyTypeNumber(CFStringRef value) => + _kSecPropertyTypeNumber.value = value; + + CFDictionaryRef SecCertificateCopyValues( + SecCertificateRef certificate, + CFArrayRef keys, + ffi.Pointer error, ) { - return _SSLCreateContext( - alloc, - protocolSide, - connectionType, + return _SecCertificateCopyValues( + certificate, + keys, + error, ); } - late final _SSLCreateContextPtr = _lookup< + late final _SecCertificateCopyValuesPtr = _lookup< ffi.NativeFunction< - SSLContextRef Function( - CFAllocatorRef, ffi.Int32, ffi.Int32)>>('SSLCreateContext'); - late final _SSLCreateContext = _SSLCreateContextPtr.asFunction< - SSLContextRef Function(CFAllocatorRef, int, int)>(); + CFDictionaryRef Function(SecCertificateRef, CFArrayRef, + ffi.Pointer)>>('SecCertificateCopyValues'); + late final _SecCertificateCopyValues = + _SecCertificateCopyValuesPtr.asFunction< + CFDictionaryRef Function( + SecCertificateRef, CFArrayRef, ffi.Pointer)>(); - int SSLNewContext( - int isServer, - ffi.Pointer contextPtr, + CFStringRef SecCertificateCopyLongDescription( + CFAllocatorRef alloc, + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _SSLNewContext( - isServer, - contextPtr, + return _SecCertificateCopyLongDescription( + alloc, + certificate, + error, ); } - late final _SSLNewContextPtr = _lookup< + late final _SecCertificateCopyLongDescriptionPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - Boolean, ffi.Pointer)>>('SSLNewContext'); - late final _SSLNewContext = _SSLNewContextPtr.asFunction< - int Function(int, ffi.Pointer)>(); + CFStringRef Function(CFAllocatorRef, SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyLongDescription'); + late final _SecCertificateCopyLongDescription = + _SecCertificateCopyLongDescriptionPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); - int SSLDisposeContext( - SSLContextRef context, + CFStringRef SecCertificateCopyShortDescription( + CFAllocatorRef alloc, + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _SSLDisposeContext( - context, + return _SecCertificateCopyShortDescription( + alloc, + certificate, + error, ); } - late final _SSLDisposeContextPtr = - _lookup>( - 'SSLDisposeContext'); - late final _SSLDisposeContext = - _SSLDisposeContextPtr.asFunction(); + late final _SecCertificateCopyShortDescriptionPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyShortDescription'); + late final _SecCertificateCopyShortDescription = + _SecCertificateCopyShortDescriptionPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); - int SSLGetSessionState( - SSLContextRef context, - ffi.Pointer state, + CFDataRef SecCertificateCopyNormalizedIssuerContent( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _SSLGetSessionState( - context, - state, + return _SecCertificateCopyNormalizedIssuerContent( + certificate, + error, ); } - late final _SSLGetSessionStatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetSessionState'); - late final _SSLGetSessionState = _SSLGetSessionStatePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + late final _SecCertificateCopyNormalizedIssuerContentPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( + 'SecCertificateCopyNormalizedIssuerContent'); + late final _SecCertificateCopyNormalizedIssuerContent = + _SecCertificateCopyNormalizedIssuerContentPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - int SSLSetSessionOption( - SSLContextRef context, - int option, - int value, + CFDataRef SecCertificateCopyNormalizedSubjectContent( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _SSLSetSessionOption( - context, - option, - value, + return _SecCertificateCopyNormalizedSubjectContent( + certificate, + error, ); } - late final _SSLSetSessionOptionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Int32, Boolean)>>('SSLSetSessionOption'); - late final _SSLSetSessionOption = _SSLSetSessionOptionPtr.asFunction< - int Function(SSLContextRef, int, int)>(); + late final _SecCertificateCopyNormalizedSubjectContentPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( + 'SecCertificateCopyNormalizedSubjectContent'); + late final _SecCertificateCopyNormalizedSubjectContent = + _SecCertificateCopyNormalizedSubjectContentPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - int SSLGetSessionOption( - SSLContextRef context, - int option, - ffi.Pointer value, + int SecIdentityGetTypeID() { + return _SecIdentityGetTypeID(); + } + + late final _SecIdentityGetTypeIDPtr = + _lookup>('SecIdentityGetTypeID'); + late final _SecIdentityGetTypeID = + _SecIdentityGetTypeIDPtr.asFunction(); + + int SecIdentityCreateWithCertificate( + CFTypeRef keychainOrArray, + SecCertificateRef certificateRef, + ffi.Pointer identityRef, ) { - return _SSLGetSessionOption( - context, - option, - value, + return _SecIdentityCreateWithCertificate( + keychainOrArray, + certificateRef, + identityRef, ); } - late final _SSLGetSessionOptionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Int32, - ffi.Pointer)>>('SSLGetSessionOption'); - late final _SSLGetSessionOption = _SSLGetSessionOptionPtr.asFunction< - int Function(SSLContextRef, int, ffi.Pointer)>(); + late final _SecIdentityCreateWithCertificatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + CFTypeRef, SecCertificateRef, ffi.Pointer)>>( + 'SecIdentityCreateWithCertificate'); + late final _SecIdentityCreateWithCertificate = + _SecIdentityCreateWithCertificatePtr.asFunction< + int Function( + CFTypeRef, SecCertificateRef, ffi.Pointer)>(); - int SSLSetIOFuncs( - SSLContextRef context, - SSLReadFunc readFunc, - SSLWriteFunc writeFunc, + int SecIdentityCopyCertificate( + SecIdentityRef identityRef, + ffi.Pointer certificateRef, ) { - return _SSLSetIOFuncs( - context, - readFunc, - writeFunc, + return _SecIdentityCopyCertificate( + identityRef, + certificateRef, ); } - late final _SSLSetIOFuncsPtr = _lookup< + late final _SecIdentityCopyCertificatePtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, SSLReadFunc, SSLWriteFunc)>>('SSLSetIOFuncs'); - late final _SSLSetIOFuncs = _SSLSetIOFuncsPtr.asFunction< - int Function(SSLContextRef, SSLReadFunc, SSLWriteFunc)>(); + OSStatus Function(SecIdentityRef, + ffi.Pointer)>>('SecIdentityCopyCertificate'); + late final _SecIdentityCopyCertificate = + _SecIdentityCopyCertificatePtr.asFunction< + int Function(SecIdentityRef, ffi.Pointer)>(); - int SSLSetSessionConfig( - SSLContextRef context, - CFStringRef config, + int SecIdentityCopyPrivateKey( + SecIdentityRef identityRef, + ffi.Pointer privateKeyRef, ) { - return _SSLSetSessionConfig( - context, - config, + return _SecIdentityCopyPrivateKey( + identityRef, + privateKeyRef, ); } - late final _SSLSetSessionConfigPtr = _lookup< - ffi.NativeFunction>( - 'SSLSetSessionConfig'); - late final _SSLSetSessionConfig = _SSLSetSessionConfigPtr.asFunction< - int Function(SSLContextRef, CFStringRef)>(); + late final _SecIdentityCopyPrivateKeyPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecIdentityRef, + ffi.Pointer)>>('SecIdentityCopyPrivateKey'); + late final _SecIdentityCopyPrivateKey = _SecIdentityCopyPrivateKeyPtr + .asFunction)>(); - int SSLSetProtocolVersionMin( - SSLContextRef context, - int minVersion, + int SecIdentityCopyPreference( + CFStringRef name, + int keyUsage, + CFArrayRef validIssuers, + ffi.Pointer identity, ) { - return _SSLSetProtocolVersionMin( - context, - minVersion, + return _SecIdentityCopyPreference( + name, + keyUsage, + validIssuers, + identity, ); } - late final _SSLSetProtocolVersionMinPtr = - _lookup>( - 'SSLSetProtocolVersionMin'); - late final _SSLSetProtocolVersionMin = _SSLSetProtocolVersionMinPtr - .asFunction(); + late final _SecIdentityCopyPreferencePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(CFStringRef, CSSM_KEYUSE, CFArrayRef, + ffi.Pointer)>>('SecIdentityCopyPreference'); + late final _SecIdentityCopyPreference = + _SecIdentityCopyPreferencePtr.asFunction< + int Function( + CFStringRef, int, CFArrayRef, ffi.Pointer)>(); - int SSLGetProtocolVersionMin( - SSLContextRef context, - ffi.Pointer minVersion, + SecIdentityRef SecIdentityCopyPreferred( + CFStringRef name, + CFArrayRef keyUsage, + CFArrayRef validIssuers, ) { - return _SSLGetProtocolVersionMin( - context, - minVersion, + return _SecIdentityCopyPreferred( + name, + keyUsage, + validIssuers, ); } - late final _SSLGetProtocolVersionMinPtr = _lookup< + late final _SecIdentityCopyPreferredPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetProtocolVersionMin'); - late final _SSLGetProtocolVersionMin = _SSLGetProtocolVersionMinPtr - .asFunction)>(); + SecIdentityRef Function(CFStringRef, CFArrayRef, + CFArrayRef)>>('SecIdentityCopyPreferred'); + late final _SecIdentityCopyPreferred = + _SecIdentityCopyPreferredPtr.asFunction< + SecIdentityRef Function(CFStringRef, CFArrayRef, CFArrayRef)>(); - int SSLSetProtocolVersionMax( - SSLContextRef context, - int maxVersion, + int SecIdentitySetPreference( + SecIdentityRef identity, + CFStringRef name, + int keyUsage, ) { - return _SSLSetProtocolVersionMax( - context, - maxVersion, + return _SecIdentitySetPreference( + identity, + name, + keyUsage, ); } - late final _SSLSetProtocolVersionMaxPtr = - _lookup>( - 'SSLSetProtocolVersionMax'); - late final _SSLSetProtocolVersionMax = _SSLSetProtocolVersionMaxPtr - .asFunction(); + late final _SecIdentitySetPreferencePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecIdentityRef, CFStringRef, + CSSM_KEYUSE)>>('SecIdentitySetPreference'); + late final _SecIdentitySetPreference = _SecIdentitySetPreferencePtr + .asFunction(); - int SSLGetProtocolVersionMax( - SSLContextRef context, - ffi.Pointer maxVersion, + int SecIdentitySetPreferred( + SecIdentityRef identity, + CFStringRef name, + CFArrayRef keyUsage, ) { - return _SSLGetProtocolVersionMax( - context, - maxVersion, + return _SecIdentitySetPreferred( + identity, + name, + keyUsage, ); } - late final _SSLGetProtocolVersionMaxPtr = _lookup< + late final _SecIdentitySetPreferredPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetProtocolVersionMax'); - late final _SSLGetProtocolVersionMax = _SSLGetProtocolVersionMaxPtr - .asFunction)>(); + OSStatus Function(SecIdentityRef, CFStringRef, + CFArrayRef)>>('SecIdentitySetPreferred'); + late final _SecIdentitySetPreferred = _SecIdentitySetPreferredPtr.asFunction< + int Function(SecIdentityRef, CFStringRef, CFArrayRef)>(); - int SSLSetProtocolVersionEnabled( - SSLContextRef context, - int protocol, - int enable, + int SecIdentityCopySystemIdentity( + CFStringRef domain, + ffi.Pointer idRef, + ffi.Pointer actualDomain, ) { - return _SSLSetProtocolVersionEnabled( - context, - protocol, - enable, + return _SecIdentityCopySystemIdentity( + domain, + idRef, + actualDomain, ); } - late final _SSLSetProtocolVersionEnabledPtr = _lookup< + late final _SecIdentityCopySystemIdentityPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Int32, - Boolean)>>('SSLSetProtocolVersionEnabled'); - late final _SSLSetProtocolVersionEnabled = _SSLSetProtocolVersionEnabledPtr - .asFunction(); + OSStatus Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>>('SecIdentityCopySystemIdentity'); + late final _SecIdentityCopySystemIdentity = + _SecIdentityCopySystemIdentityPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>(); - int SSLGetProtocolVersionEnabled( - SSLContextRef context, - int protocol, - ffi.Pointer enable, + int SecIdentitySetSystemIdentity( + CFStringRef domain, + SecIdentityRef idRef, ) { - return _SSLGetProtocolVersionEnabled( - context, - protocol, - enable, + return _SecIdentitySetSystemIdentity( + domain, + idRef, ); } - late final _SSLGetProtocolVersionEnabledPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Int32, - ffi.Pointer)>>('SSLGetProtocolVersionEnabled'); - late final _SSLGetProtocolVersionEnabled = _SSLGetProtocolVersionEnabledPtr - .asFunction)>(); + late final _SecIdentitySetSystemIdentityPtr = _lookup< + ffi.NativeFunction>( + 'SecIdentitySetSystemIdentity'); + late final _SecIdentitySetSystemIdentity = _SecIdentitySetSystemIdentityPtr + .asFunction(); - int SSLSetProtocolVersion( - SSLContextRef context, - int version, + late final ffi.Pointer _kSecIdentityDomainDefault = + _lookup('kSecIdentityDomainDefault'); + + CFStringRef get kSecIdentityDomainDefault => _kSecIdentityDomainDefault.value; + + set kSecIdentityDomainDefault(CFStringRef value) => + _kSecIdentityDomainDefault.value = value; + + late final ffi.Pointer _kSecIdentityDomainKerberosKDC = + _lookup('kSecIdentityDomainKerberosKDC'); + + CFStringRef get kSecIdentityDomainKerberosKDC => + _kSecIdentityDomainKerberosKDC.value; + + set kSecIdentityDomainKerberosKDC(CFStringRef value) => + _kSecIdentityDomainKerberosKDC.value = value; + + sec_trust_t sec_trust_create( + SecTrustRef trust, ) { - return _SSLSetProtocolVersion( - context, - version, + return _sec_trust_create( + trust, ); } - late final _SSLSetProtocolVersionPtr = - _lookup>( - 'SSLSetProtocolVersion'); - late final _SSLSetProtocolVersion = - _SSLSetProtocolVersionPtr.asFunction(); + late final _sec_trust_createPtr = + _lookup>( + 'sec_trust_create'); + late final _sec_trust_create = + _sec_trust_createPtr.asFunction(); - int SSLGetProtocolVersion( - SSLContextRef context, - ffi.Pointer protocol, + SecTrustRef sec_trust_copy_ref( + sec_trust_t trust, ) { - return _SSLGetProtocolVersion( - context, - protocol, + return _sec_trust_copy_ref( + trust, ); } - late final _SSLGetProtocolVersionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetProtocolVersion'); - late final _SSLGetProtocolVersion = _SSLGetProtocolVersionPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + late final _sec_trust_copy_refPtr = + _lookup>( + 'sec_trust_copy_ref'); + late final _sec_trust_copy_ref = + _sec_trust_copy_refPtr.asFunction(); - int SSLSetCertificate( - SSLContextRef context, - CFArrayRef certRefs, + sec_identity_t sec_identity_create( + SecIdentityRef identity, ) { - return _SSLSetCertificate( - context, - certRefs, + return _sec_identity_create( + identity, ); } - late final _SSLSetCertificatePtr = - _lookup>( - 'SSLSetCertificate'); - late final _SSLSetCertificate = _SSLSetCertificatePtr.asFunction< - int Function(SSLContextRef, CFArrayRef)>(); + late final _sec_identity_createPtr = + _lookup>( + 'sec_identity_create'); + late final _sec_identity_create = _sec_identity_createPtr + .asFunction(); - int SSLSetConnection( - SSLContextRef context, - SSLConnectionRef connection, + sec_identity_t sec_identity_create_with_certificates( + SecIdentityRef identity, + CFArrayRef certificates, ) { - return _SSLSetConnection( - context, - connection, + return _sec_identity_create_with_certificates( + identity, + certificates, ); } - late final _SSLSetConnectionPtr = _lookup< + late final _sec_identity_create_with_certificatesPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, SSLConnectionRef)>>('SSLSetConnection'); - late final _SSLSetConnection = _SSLSetConnectionPtr.asFunction< - int Function(SSLContextRef, SSLConnectionRef)>(); + sec_identity_t Function(SecIdentityRef, + CFArrayRef)>>('sec_identity_create_with_certificates'); + late final _sec_identity_create_with_certificates = + _sec_identity_create_with_certificatesPtr + .asFunction(); - int SSLGetConnection( - SSLContextRef context, - ffi.Pointer connection, + bool sec_identity_access_certificates( + sec_identity_t identity, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLGetConnection( - context, - connection, + return _sec_identity_access_certificates( + identity, + handler, ); } - late final _SSLGetConnectionPtr = _lookup< + late final _sec_identity_access_certificatesPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetConnection'); - late final _SSLGetConnection = _SSLGetConnectionPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Bool Function(sec_identity_t, + ffi.Pointer<_ObjCBlock>)>>('sec_identity_access_certificates'); + late final _sec_identity_access_certificates = + _sec_identity_access_certificatesPtr + .asFunction)>(); - int SSLSetPeerDomainName( - SSLContextRef context, - ffi.Pointer peerName, - int peerNameLen, + SecIdentityRef sec_identity_copy_ref( + sec_identity_t identity, ) { - return _SSLSetPeerDomainName( - context, - peerName, - peerNameLen, + return _sec_identity_copy_ref( + identity, ); } - late final _SSLSetPeerDomainNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetPeerDomainName'); - late final _SSLSetPeerDomainName = _SSLSetPeerDomainNamePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer, int)>(); + late final _sec_identity_copy_refPtr = + _lookup>( + 'sec_identity_copy_ref'); + late final _sec_identity_copy_ref = _sec_identity_copy_refPtr + .asFunction(); - int SSLGetPeerDomainNameLength( - SSLContextRef context, - ffi.Pointer peerNameLen, + CFArrayRef sec_identity_copy_certificates_ref( + sec_identity_t identity, ) { - return _SSLGetPeerDomainNameLength( - context, - peerNameLen, + return _sec_identity_copy_certificates_ref( + identity, ); } - late final _SSLGetPeerDomainNameLengthPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetPeerDomainNameLength'); - late final _SSLGetPeerDomainNameLength = _SSLGetPeerDomainNameLengthPtr - .asFunction)>(); + late final _sec_identity_copy_certificates_refPtr = + _lookup>( + 'sec_identity_copy_certificates_ref'); + late final _sec_identity_copy_certificates_ref = + _sec_identity_copy_certificates_refPtr + .asFunction(); - int SSLGetPeerDomainName( - SSLContextRef context, - ffi.Pointer peerName, - ffi.Pointer peerNameLen, + sec_certificate_t sec_certificate_create( + SecCertificateRef certificate, ) { - return _SSLGetPeerDomainName( - context, - peerName, - peerNameLen, + return _sec_certificate_create( + certificate, ); } - late final _SSLGetPeerDomainNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Pointer)>>('SSLGetPeerDomainName'); - late final _SSLGetPeerDomainName = _SSLGetPeerDomainNamePtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + late final _sec_certificate_createPtr = _lookup< + ffi.NativeFunction>( + 'sec_certificate_create'); + late final _sec_certificate_create = _sec_certificate_createPtr + .asFunction(); - int SSLCopyRequestedPeerNameLength( - SSLContextRef ctx, - ffi.Pointer peerNameLen, + SecCertificateRef sec_certificate_copy_ref( + sec_certificate_t certificate, ) { - return _SSLCopyRequestedPeerNameLength( - ctx, - peerNameLen, + return _sec_certificate_copy_ref( + certificate, ); } - late final _SSLCopyRequestedPeerNameLengthPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyRequestedPeerNameLength'); - late final _SSLCopyRequestedPeerNameLength = - _SSLCopyRequestedPeerNameLengthPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + late final _sec_certificate_copy_refPtr = _lookup< + ffi.NativeFunction>( + 'sec_certificate_copy_ref'); + late final _sec_certificate_copy_ref = _sec_certificate_copy_refPtr + .asFunction(); - int SSLCopyRequestedPeerName( - SSLContextRef context, - ffi.Pointer peerName, - ffi.Pointer peerNameLen, + ffi.Pointer sec_protocol_metadata_get_negotiated_protocol( + sec_protocol_metadata_t metadata, ) { - return _SSLCopyRequestedPeerName( - context, - peerName, - peerNameLen, + return _sec_protocol_metadata_get_negotiated_protocol( + metadata, ); } - late final _SSLCopyRequestedPeerNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Pointer)>>('SSLCopyRequestedPeerName'); - late final _SSLCopyRequestedPeerName = - _SSLCopyRequestedPeerNamePtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + late final _sec_protocol_metadata_get_negotiated_protocolPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_get_negotiated_protocol'); + late final _sec_protocol_metadata_get_negotiated_protocol = + _sec_protocol_metadata_get_negotiated_protocolPtr.asFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>(); - int SSLSetDatagramHelloCookie( - SSLContextRef dtlsContext, - ffi.Pointer cookie, - int cookieLen, + dispatch_data_t sec_protocol_metadata_copy_peer_public_key( + sec_protocol_metadata_t metadata, ) { - return _SSLSetDatagramHelloCookie( - dtlsContext, - cookie, - cookieLen, + return _sec_protocol_metadata_copy_peer_public_key( + metadata, ); } - late final _SSLSetDatagramHelloCookiePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetDatagramHelloCookie'); - late final _SSLSetDatagramHelloCookie = _SSLSetDatagramHelloCookiePtr - .asFunction, int)>(); + late final _sec_protocol_metadata_copy_peer_public_keyPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_copy_peer_public_key'); + late final _sec_protocol_metadata_copy_peer_public_key = + _sec_protocol_metadata_copy_peer_public_keyPtr + .asFunction(); - int SSLSetMaxDatagramRecordSize( - SSLContextRef dtlsContext, - int maxSize, + int sec_protocol_metadata_get_negotiated_tls_protocol_version( + sec_protocol_metadata_t metadata, ) { - return _SSLSetMaxDatagramRecordSize( - dtlsContext, - maxSize, + return _sec_protocol_metadata_get_negotiated_tls_protocol_version( + metadata, ); } - late final _SSLSetMaxDatagramRecordSizePtr = - _lookup>( - 'SSLSetMaxDatagramRecordSize'); - late final _SSLSetMaxDatagramRecordSize = _SSLSetMaxDatagramRecordSizePtr - .asFunction(); + late final _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr = + _lookup>( + 'sec_protocol_metadata_get_negotiated_tls_protocol_version'); + late final _sec_protocol_metadata_get_negotiated_tls_protocol_version = + _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr + .asFunction(); - int SSLGetMaxDatagramRecordSize( - SSLContextRef dtlsContext, - ffi.Pointer maxSize, + int sec_protocol_metadata_get_negotiated_protocol_version( + sec_protocol_metadata_t metadata, ) { - return _SSLGetMaxDatagramRecordSize( - dtlsContext, - maxSize, + return _sec_protocol_metadata_get_negotiated_protocol_version( + metadata, ); } - late final _SSLGetMaxDatagramRecordSizePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetMaxDatagramRecordSize'); - late final _SSLGetMaxDatagramRecordSize = _SSLGetMaxDatagramRecordSizePtr - .asFunction)>(); + late final _sec_protocol_metadata_get_negotiated_protocol_versionPtr = + _lookup>( + 'sec_protocol_metadata_get_negotiated_protocol_version'); + late final _sec_protocol_metadata_get_negotiated_protocol_version = + _sec_protocol_metadata_get_negotiated_protocol_versionPtr + .asFunction(); - int SSLGetNegotiatedProtocolVersion( - SSLContextRef context, - ffi.Pointer protocol, + int sec_protocol_metadata_get_negotiated_tls_ciphersuite( + sec_protocol_metadata_t metadata, ) { - return _SSLGetNegotiatedProtocolVersion( - context, - protocol, + return _sec_protocol_metadata_get_negotiated_tls_ciphersuite( + metadata, ); } - late final _SSLGetNegotiatedProtocolVersionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNegotiatedProtocolVersion'); - late final _SSLGetNegotiatedProtocolVersion = - _SSLGetNegotiatedProtocolVersionPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + late final _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr = + _lookup>( + 'sec_protocol_metadata_get_negotiated_tls_ciphersuite'); + late final _sec_protocol_metadata_get_negotiated_tls_ciphersuite = + _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr + .asFunction(); - int SSLGetNumberSupportedCiphers( - SSLContextRef context, - ffi.Pointer numCiphers, + int sec_protocol_metadata_get_negotiated_ciphersuite( + sec_protocol_metadata_t metadata, ) { - return _SSLGetNumberSupportedCiphers( - context, - numCiphers, + return _sec_protocol_metadata_get_negotiated_ciphersuite( + metadata, ); } - late final _SSLGetNumberSupportedCiphersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNumberSupportedCiphers'); - late final _SSLGetNumberSupportedCiphers = _SSLGetNumberSupportedCiphersPtr - .asFunction)>(); + late final _sec_protocol_metadata_get_negotiated_ciphersuitePtr = _lookup< + ffi.NativeFunction>( + 'sec_protocol_metadata_get_negotiated_ciphersuite'); + late final _sec_protocol_metadata_get_negotiated_ciphersuite = + _sec_protocol_metadata_get_negotiated_ciphersuitePtr + .asFunction(); - int SSLGetSupportedCiphers( - SSLContextRef context, - ffi.Pointer ciphers, - ffi.Pointer numCiphers, + bool sec_protocol_metadata_get_early_data_accepted( + sec_protocol_metadata_t metadata, ) { - return _SSLGetSupportedCiphers( - context, - ciphers, - numCiphers, + return _sec_protocol_metadata_get_early_data_accepted( + metadata, ); } - late final _SSLGetSupportedCiphersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Pointer)>>('SSLGetSupportedCiphers'); - late final _SSLGetSupportedCiphers = _SSLGetSupportedCiphersPtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + late final _sec_protocol_metadata_get_early_data_acceptedPtr = + _lookup>( + 'sec_protocol_metadata_get_early_data_accepted'); + late final _sec_protocol_metadata_get_early_data_accepted = + _sec_protocol_metadata_get_early_data_acceptedPtr + .asFunction(); - int SSLGetNumberEnabledCiphers( - SSLContextRef context, - ffi.Pointer numCiphers, + bool sec_protocol_metadata_access_peer_certificate_chain( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLGetNumberEnabledCiphers( - context, - numCiphers, + return _sec_protocol_metadata_access_peer_certificate_chain( + metadata, + handler, ); } - late final _SSLGetNumberEnabledCiphersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNumberEnabledCiphers'); - late final _SSLGetNumberEnabledCiphers = _SSLGetNumberEnabledCiphersPtr - .asFunction)>(); + late final _sec_protocol_metadata_access_peer_certificate_chainPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_peer_certificate_chain'); + late final _sec_protocol_metadata_access_peer_certificate_chain = + _sec_protocol_metadata_access_peer_certificate_chainPtr.asFunction< + bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); - int SSLSetEnabledCiphers( - SSLContextRef context, - ffi.Pointer ciphers, - int numCiphers, + bool sec_protocol_metadata_access_ocsp_response( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLSetEnabledCiphers( - context, - ciphers, - numCiphers, + return _sec_protocol_metadata_access_ocsp_response( + metadata, + handler, ); } - late final _SSLSetEnabledCiphersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetEnabledCiphers'); - late final _SSLSetEnabledCiphers = _SSLSetEnabledCiphersPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer, int)>(); + late final _sec_protocol_metadata_access_ocsp_responsePtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_ocsp_response'); + late final _sec_protocol_metadata_access_ocsp_response = + _sec_protocol_metadata_access_ocsp_responsePtr.asFunction< + bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); - int SSLGetEnabledCiphers( - SSLContextRef context, - ffi.Pointer ciphers, - ffi.Pointer numCiphers, + bool sec_protocol_metadata_access_supported_signature_algorithms( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLGetEnabledCiphers( - context, - ciphers, - numCiphers, + return _sec_protocol_metadata_access_supported_signature_algorithms( + metadata, + handler, ); } - late final _SSLGetEnabledCiphersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Pointer)>>('SSLGetEnabledCiphers'); - late final _SSLGetEnabledCiphers = _SSLGetEnabledCiphersPtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + late final _sec_protocol_metadata_access_supported_signature_algorithmsPtr = + _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_supported_signature_algorithms'); + late final _sec_protocol_metadata_access_supported_signature_algorithms = + _sec_protocol_metadata_access_supported_signature_algorithmsPtr + .asFunction< + bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); - int SSLSetSessionTicketsEnabled( - SSLContextRef context, - int enabled, + bool sec_protocol_metadata_access_distinguished_names( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLSetSessionTicketsEnabled( - context, - enabled, + return _sec_protocol_metadata_access_distinguished_names( + metadata, + handler, ); } - late final _SSLSetSessionTicketsEnabledPtr = - _lookup>( - 'SSLSetSessionTicketsEnabled'); - late final _SSLSetSessionTicketsEnabled = _SSLSetSessionTicketsEnabledPtr - .asFunction(); + late final _sec_protocol_metadata_access_distinguished_namesPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_distinguished_names'); + late final _sec_protocol_metadata_access_distinguished_names = + _sec_protocol_metadata_access_distinguished_namesPtr.asFunction< + bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); - int SSLSetEnableCertVerify( - SSLContextRef context, - int enableVerify, + bool sec_protocol_metadata_access_pre_shared_keys( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLSetEnableCertVerify( - context, - enableVerify, + return _sec_protocol_metadata_access_pre_shared_keys( + metadata, + handler, ); } - late final _SSLSetEnableCertVerifyPtr = - _lookup>( - 'SSLSetEnableCertVerify'); - late final _SSLSetEnableCertVerify = - _SSLSetEnableCertVerifyPtr.asFunction(); + late final _sec_protocol_metadata_access_pre_shared_keysPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_pre_shared_keys'); + late final _sec_protocol_metadata_access_pre_shared_keys = + _sec_protocol_metadata_access_pre_shared_keysPtr.asFunction< + bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); - int SSLGetEnableCertVerify( - SSLContextRef context, - ffi.Pointer enableVerify, + ffi.Pointer sec_protocol_metadata_get_server_name( + sec_protocol_metadata_t metadata, ) { - return _SSLGetEnableCertVerify( - context, - enableVerify, + return _sec_protocol_metadata_get_server_name( + metadata, ); } - late final _SSLGetEnableCertVerifyPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetEnableCertVerify'); - late final _SSLGetEnableCertVerify = _SSLGetEnableCertVerifyPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + late final _sec_protocol_metadata_get_server_namePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_get_server_name'); + late final _sec_protocol_metadata_get_server_name = + _sec_protocol_metadata_get_server_namePtr.asFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>(); - int SSLSetAllowsExpiredCerts( - SSLContextRef context, - int allowsExpired, + bool sec_protocol_metadata_peers_are_equal( + sec_protocol_metadata_t metadataA, + sec_protocol_metadata_t metadataB, ) { - return _SSLSetAllowsExpiredCerts( - context, - allowsExpired, + return _sec_protocol_metadata_peers_are_equal( + metadataA, + metadataB, ); } - late final _SSLSetAllowsExpiredCertsPtr = - _lookup>( - 'SSLSetAllowsExpiredCerts'); - late final _SSLSetAllowsExpiredCerts = _SSLSetAllowsExpiredCertsPtr - .asFunction(); + late final _sec_protocol_metadata_peers_are_equalPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_peers_are_equal'); + late final _sec_protocol_metadata_peers_are_equal = + _sec_protocol_metadata_peers_are_equalPtr.asFunction< + bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); - int SSLGetAllowsExpiredCerts( - SSLContextRef context, - ffi.Pointer allowsExpired, + bool sec_protocol_metadata_challenge_parameters_are_equal( + sec_protocol_metadata_t metadataA, + sec_protocol_metadata_t metadataB, ) { - return _SSLGetAllowsExpiredCerts( - context, - allowsExpired, + return _sec_protocol_metadata_challenge_parameters_are_equal( + metadataA, + metadataB, ); } - late final _SSLGetAllowsExpiredCertsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetAllowsExpiredCerts'); - late final _SSLGetAllowsExpiredCerts = _SSLGetAllowsExpiredCertsPtr - .asFunction)>(); + late final _sec_protocol_metadata_challenge_parameters_are_equalPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_challenge_parameters_are_equal'); + late final _sec_protocol_metadata_challenge_parameters_are_equal = + _sec_protocol_metadata_challenge_parameters_are_equalPtr.asFunction< + bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); - int SSLSetAllowsExpiredRoots( - SSLContextRef context, - int allowsExpired, + dispatch_data_t sec_protocol_metadata_create_secret( + sec_protocol_metadata_t metadata, + int label_len, + ffi.Pointer label, + int exporter_length, ) { - return _SSLSetAllowsExpiredRoots( - context, - allowsExpired, + return _sec_protocol_metadata_create_secret( + metadata, + label_len, + label, + exporter_length, ); } - late final _SSLSetAllowsExpiredRootsPtr = - _lookup>( - 'SSLSetAllowsExpiredRoots'); - late final _SSLSetAllowsExpiredRoots = _SSLSetAllowsExpiredRootsPtr - .asFunction(); + late final _sec_protocol_metadata_create_secretPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function( + sec_protocol_metadata_t, + ffi.Size, + ffi.Pointer, + ffi.Size)>>('sec_protocol_metadata_create_secret'); + late final _sec_protocol_metadata_create_secret = + _sec_protocol_metadata_create_secretPtr.asFunction< + dispatch_data_t Function( + sec_protocol_metadata_t, int, ffi.Pointer, int)>(); - int SSLGetAllowsExpiredRoots( - SSLContextRef context, - ffi.Pointer allowsExpired, + dispatch_data_t sec_protocol_metadata_create_secret_with_context( + sec_protocol_metadata_t metadata, + int label_len, + ffi.Pointer label, + int context_len, + ffi.Pointer context, + int exporter_length, ) { - return _SSLGetAllowsExpiredRoots( + return _sec_protocol_metadata_create_secret_with_context( + metadata, + label_len, + label, + context_len, context, - allowsExpired, + exporter_length, ); } - late final _SSLGetAllowsExpiredRootsPtr = _lookup< + late final _sec_protocol_metadata_create_secret_with_contextPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetAllowsExpiredRoots'); - late final _SSLGetAllowsExpiredRoots = _SSLGetAllowsExpiredRootsPtr - .asFunction)>(); + dispatch_data_t Function( + sec_protocol_metadata_t, + ffi.Size, + ffi.Pointer, + ffi.Size, + ffi.Pointer, + ffi.Size)>>('sec_protocol_metadata_create_secret_with_context'); + late final _sec_protocol_metadata_create_secret_with_context = + _sec_protocol_metadata_create_secret_with_contextPtr.asFunction< + dispatch_data_t Function(sec_protocol_metadata_t, int, + ffi.Pointer, int, ffi.Pointer, int)>(); - int SSLSetAllowsAnyRoot( - SSLContextRef context, - int anyRoot, + bool sec_protocol_options_are_equal( + sec_protocol_options_t optionsA, + sec_protocol_options_t optionsB, ) { - return _SSLSetAllowsAnyRoot( - context, - anyRoot, + return _sec_protocol_options_are_equal( + optionsA, + optionsB, ); } - late final _SSLSetAllowsAnyRootPtr = - _lookup>( - 'SSLSetAllowsAnyRoot'); - late final _SSLSetAllowsAnyRoot = - _SSLSetAllowsAnyRootPtr.asFunction(); + late final _sec_protocol_options_are_equalPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(sec_protocol_options_t, + sec_protocol_options_t)>>('sec_protocol_options_are_equal'); + late final _sec_protocol_options_are_equal = + _sec_protocol_options_are_equalPtr.asFunction< + bool Function(sec_protocol_options_t, sec_protocol_options_t)>(); - int SSLGetAllowsAnyRoot( - SSLContextRef context, - ffi.Pointer anyRoot, + void sec_protocol_options_set_local_identity( + sec_protocol_options_t options, + sec_identity_t identity, ) { - return _SSLGetAllowsAnyRoot( - context, - anyRoot, + return _sec_protocol_options_set_local_identity( + options, + identity, ); } - late final _SSLGetAllowsAnyRootPtr = _lookup< + late final _sec_protocol_options_set_local_identityPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetAllowsAnyRoot'); - late final _SSLGetAllowsAnyRoot = _SSLGetAllowsAnyRootPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + sec_identity_t)>>('sec_protocol_options_set_local_identity'); + late final _sec_protocol_options_set_local_identity = + _sec_protocol_options_set_local_identityPtr + .asFunction(); - int SSLSetTrustedRoots( - SSLContextRef context, - CFArrayRef trustedRoots, - int replaceExisting, + void sec_protocol_options_append_tls_ciphersuite( + sec_protocol_options_t options, + int ciphersuite, ) { - return _SSLSetTrustedRoots( - context, - trustedRoots, - replaceExisting, + return _sec_protocol_options_append_tls_ciphersuite( + options, + ciphersuite, ); } - late final _SSLSetTrustedRootsPtr = _lookup< + late final _sec_protocol_options_append_tls_ciphersuitePtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, CFArrayRef, Boolean)>>('SSLSetTrustedRoots'); - late final _SSLSetTrustedRoots = _SSLSetTrustedRootsPtr.asFunction< - int Function(SSLContextRef, CFArrayRef, int)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite'); + late final _sec_protocol_options_append_tls_ciphersuite = + _sec_protocol_options_append_tls_ciphersuitePtr + .asFunction(); - int SSLCopyTrustedRoots( - SSLContextRef context, - ffi.Pointer trustedRoots, + void sec_protocol_options_add_tls_ciphersuite( + sec_protocol_options_t options, + int ciphersuite, ) { - return _SSLCopyTrustedRoots( - context, - trustedRoots, + return _sec_protocol_options_add_tls_ciphersuite( + options, + ciphersuite, ); } - late final _SSLCopyTrustedRootsPtr = _lookup< + late final _sec_protocol_options_add_tls_ciphersuitePtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLCopyTrustedRoots'); - late final _SSLCopyTrustedRoots = _SSLCopyTrustedRootsPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + SSLCipherSuite)>>('sec_protocol_options_add_tls_ciphersuite'); + late final _sec_protocol_options_add_tls_ciphersuite = + _sec_protocol_options_add_tls_ciphersuitePtr + .asFunction(); - int SSLCopyPeerCertificates( - SSLContextRef context, - ffi.Pointer certs, + void sec_protocol_options_append_tls_ciphersuite_group( + sec_protocol_options_t options, + int group, ) { - return _SSLCopyPeerCertificates( - context, - certs, + return _sec_protocol_options_append_tls_ciphersuite_group( + options, + group, ); } - late final _SSLCopyPeerCertificatesPtr = _lookup< + late final _sec_protocol_options_append_tls_ciphersuite_groupPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyPeerCertificates'); - late final _SSLCopyPeerCertificates = _SSLCopyPeerCertificatesPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite_group'); + late final _sec_protocol_options_append_tls_ciphersuite_group = + _sec_protocol_options_append_tls_ciphersuite_groupPtr + .asFunction(); - int SSLCopyPeerTrust( - SSLContextRef context, - ffi.Pointer trust, + void sec_protocol_options_add_tls_ciphersuite_group( + sec_protocol_options_t options, + int group, ) { - return _SSLCopyPeerTrust( - context, - trust, + return _sec_protocol_options_add_tls_ciphersuite_group( + options, + group, ); } - late final _SSLCopyPeerTrustPtr = _lookup< + late final _sec_protocol_options_add_tls_ciphersuite_groupPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLCopyPeerTrust'); - late final _SSLCopyPeerTrust = _SSLCopyPeerTrustPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_add_tls_ciphersuite_group'); + late final _sec_protocol_options_add_tls_ciphersuite_group = + _sec_protocol_options_add_tls_ciphersuite_groupPtr + .asFunction(); - int SSLSetPeerID( - SSLContextRef context, - ffi.Pointer peerID, - int peerIDLen, + void sec_protocol_options_set_tls_min_version( + sec_protocol_options_t options, + int version, ) { - return _SSLSetPeerID( - context, - peerID, - peerIDLen, + return _sec_protocol_options_set_tls_min_version( + options, + version, ); } - late final _SSLSetPeerIDPtr = _lookup< + late final _sec_protocol_options_set_tls_min_versionPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer, ffi.Size)>>('SSLSetPeerID'); - late final _SSLSetPeerID = _SSLSetPeerIDPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer, int)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_set_tls_min_version'); + late final _sec_protocol_options_set_tls_min_version = + _sec_protocol_options_set_tls_min_versionPtr + .asFunction(); - int SSLGetPeerID( - SSLContextRef context, - ffi.Pointer> peerID, - ffi.Pointer peerIDLen, + void sec_protocol_options_set_min_tls_protocol_version( + sec_protocol_options_t options, + int version, ) { - return _SSLGetPeerID( - context, - peerID, - peerIDLen, + return _sec_protocol_options_set_min_tls_protocol_version( + options, + version, ); } - late final _SSLGetPeerIDPtr = _lookup< + late final _sec_protocol_options_set_min_tls_protocol_versionPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer>, - ffi.Pointer)>>('SSLGetPeerID'); - late final _SSLGetPeerID = _SSLGetPeerIDPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer>, - ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_set_min_tls_protocol_version'); + late final _sec_protocol_options_set_min_tls_protocol_version = + _sec_protocol_options_set_min_tls_protocol_versionPtr + .asFunction(); - int SSLGetNegotiatedCipher( - SSLContextRef context, - ffi.Pointer cipherSuite, - ) { - return _SSLGetNegotiatedCipher( - context, - cipherSuite, - ); + int sec_protocol_options_get_default_min_tls_protocol_version() { + return _sec_protocol_options_get_default_min_tls_protocol_version(); } - late final _SSLGetNegotiatedCipherPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNegotiatedCipher'); - late final _SSLGetNegotiatedCipher = _SSLGetNegotiatedCipherPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + late final _sec_protocol_options_get_default_min_tls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_min_tls_protocol_version'); + late final _sec_protocol_options_get_default_min_tls_protocol_version = + _sec_protocol_options_get_default_min_tls_protocol_versionPtr + .asFunction(); - int SSLSetALPNProtocols( - SSLContextRef context, - CFArrayRef protocols, - ) { - return _SSLSetALPNProtocols( - context, - protocols, - ); + int sec_protocol_options_get_default_min_dtls_protocol_version() { + return _sec_protocol_options_get_default_min_dtls_protocol_version(); } - late final _SSLSetALPNProtocolsPtr = - _lookup>( - 'SSLSetALPNProtocols'); - late final _SSLSetALPNProtocols = _SSLSetALPNProtocolsPtr.asFunction< - int Function(SSLContextRef, CFArrayRef)>(); + late final _sec_protocol_options_get_default_min_dtls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_min_dtls_protocol_version'); + late final _sec_protocol_options_get_default_min_dtls_protocol_version = + _sec_protocol_options_get_default_min_dtls_protocol_versionPtr + .asFunction(); - int SSLCopyALPNProtocols( - SSLContextRef context, - ffi.Pointer protocols, + void sec_protocol_options_set_tls_max_version( + sec_protocol_options_t options, + int version, ) { - return _SSLCopyALPNProtocols( - context, - protocols, + return _sec_protocol_options_set_tls_max_version( + options, + version, ); } - late final _SSLCopyALPNProtocolsPtr = _lookup< + late final _sec_protocol_options_set_tls_max_versionPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLCopyALPNProtocols'); - late final _SSLCopyALPNProtocols = _SSLCopyALPNProtocolsPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_set_tls_max_version'); + late final _sec_protocol_options_set_tls_max_version = + _sec_protocol_options_set_tls_max_versionPtr + .asFunction(); - int SSLSetOCSPResponse( - SSLContextRef context, - CFDataRef response, + void sec_protocol_options_set_max_tls_protocol_version( + sec_protocol_options_t options, + int version, ) { - return _SSLSetOCSPResponse( - context, - response, + return _sec_protocol_options_set_max_tls_protocol_version( + options, + version, ); } - late final _SSLSetOCSPResponsePtr = - _lookup>( - 'SSLSetOCSPResponse'); - late final _SSLSetOCSPResponse = _SSLSetOCSPResponsePtr.asFunction< - int Function(SSLContextRef, CFDataRef)>(); + late final _sec_protocol_options_set_max_tls_protocol_versionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_set_max_tls_protocol_version'); + late final _sec_protocol_options_set_max_tls_protocol_version = + _sec_protocol_options_set_max_tls_protocol_versionPtr + .asFunction(); - int SSLSetEncryptionCertificate( - SSLContextRef context, - CFArrayRef certRefs, - ) { - return _SSLSetEncryptionCertificate( - context, - certRefs, - ); + int sec_protocol_options_get_default_max_tls_protocol_version() { + return _sec_protocol_options_get_default_max_tls_protocol_version(); } - late final _SSLSetEncryptionCertificatePtr = - _lookup>( - 'SSLSetEncryptionCertificate'); - late final _SSLSetEncryptionCertificate = _SSLSetEncryptionCertificatePtr - .asFunction(); + late final _sec_protocol_options_get_default_max_tls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_max_tls_protocol_version'); + late final _sec_protocol_options_get_default_max_tls_protocol_version = + _sec_protocol_options_get_default_max_tls_protocol_versionPtr + .asFunction(); - int SSLSetClientSideAuthenticate( - SSLContextRef context, - int auth, - ) { - return _SSLSetClientSideAuthenticate( - context, - auth, - ); + int sec_protocol_options_get_default_max_dtls_protocol_version() { + return _sec_protocol_options_get_default_max_dtls_protocol_version(); } - late final _SSLSetClientSideAuthenticatePtr = - _lookup>( - 'SSLSetClientSideAuthenticate'); - late final _SSLSetClientSideAuthenticate = _SSLSetClientSideAuthenticatePtr - .asFunction(); + late final _sec_protocol_options_get_default_max_dtls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_max_dtls_protocol_version'); + late final _sec_protocol_options_get_default_max_dtls_protocol_version = + _sec_protocol_options_get_default_max_dtls_protocol_versionPtr + .asFunction(); - int SSLAddDistinguishedName( - SSLContextRef context, - ffi.Pointer derDN, - int derDNLen, + bool sec_protocol_options_get_enable_encrypted_client_hello( + sec_protocol_options_t options, ) { - return _SSLAddDistinguishedName( - context, - derDN, - derDNLen, + return _sec_protocol_options_get_enable_encrypted_client_hello( + options, ); } - late final _SSLAddDistinguishedNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLAddDistinguishedName'); - late final _SSLAddDistinguishedName = _SSLAddDistinguishedNamePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer, int)>(); + late final _sec_protocol_options_get_enable_encrypted_client_helloPtr = + _lookup>( + 'sec_protocol_options_get_enable_encrypted_client_hello'); + late final _sec_protocol_options_get_enable_encrypted_client_hello = + _sec_protocol_options_get_enable_encrypted_client_helloPtr + .asFunction(); - int SSLSetCertificateAuthorities( - SSLContextRef context, - CFTypeRef certificateOrArray, - int replaceExisting, + bool sec_protocol_options_get_quic_use_legacy_codepoint( + sec_protocol_options_t options, ) { - return _SSLSetCertificateAuthorities( - context, - certificateOrArray, - replaceExisting, + return _sec_protocol_options_get_quic_use_legacy_codepoint( + options, ); } - late final _SSLSetCertificateAuthoritiesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, CFTypeRef, - Boolean)>>('SSLSetCertificateAuthorities'); - late final _SSLSetCertificateAuthorities = _SSLSetCertificateAuthoritiesPtr - .asFunction(); + late final _sec_protocol_options_get_quic_use_legacy_codepointPtr = + _lookup>( + 'sec_protocol_options_get_quic_use_legacy_codepoint'); + late final _sec_protocol_options_get_quic_use_legacy_codepoint = + _sec_protocol_options_get_quic_use_legacy_codepointPtr + .asFunction(); - int SSLCopyCertificateAuthorities( - SSLContextRef context, - ffi.Pointer certificates, + void sec_protocol_options_add_tls_application_protocol( + sec_protocol_options_t options, + ffi.Pointer application_protocol, ) { - return _SSLCopyCertificateAuthorities( - context, - certificates, + return _sec_protocol_options_add_tls_application_protocol( + options, + application_protocol, ); } - late final _SSLCopyCertificateAuthoritiesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyCertificateAuthorities'); - late final _SSLCopyCertificateAuthorities = _SSLCopyCertificateAuthoritiesPtr - .asFunction)>(); + late final _sec_protocol_options_add_tls_application_protocolPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_options_t, ffi.Pointer)>>( + 'sec_protocol_options_add_tls_application_protocol'); + late final _sec_protocol_options_add_tls_application_protocol = + _sec_protocol_options_add_tls_application_protocolPtr.asFunction< + void Function(sec_protocol_options_t, ffi.Pointer)>(); - int SSLCopyDistinguishedNames( - SSLContextRef context, - ffi.Pointer names, + void sec_protocol_options_set_tls_server_name( + sec_protocol_options_t options, + ffi.Pointer server_name, ) { - return _SSLCopyDistinguishedNames( - context, - names, + return _sec_protocol_options_set_tls_server_name( + options, + server_name, ); } - late final _SSLCopyDistinguishedNamesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyDistinguishedNames'); - late final _SSLCopyDistinguishedNames = _SSLCopyDistinguishedNamesPtr - .asFunction)>(); + late final _sec_protocol_options_set_tls_server_namePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_options_t, ffi.Pointer)>>( + 'sec_protocol_options_set_tls_server_name'); + late final _sec_protocol_options_set_tls_server_name = + _sec_protocol_options_set_tls_server_namePtr.asFunction< + void Function(sec_protocol_options_t, ffi.Pointer)>(); - int SSLGetClientCertificateState( - SSLContextRef context, - ffi.Pointer clientState, + void sec_protocol_options_set_tls_diffie_hellman_parameters( + sec_protocol_options_t options, + dispatch_data_t params, ) { - return _SSLGetClientCertificateState( - context, - clientState, + return _sec_protocol_options_set_tls_diffie_hellman_parameters( + options, + params, ); } - late final _SSLGetClientCertificateStatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetClientCertificateState'); - late final _SSLGetClientCertificateState = _SSLGetClientCertificateStatePtr - .asFunction)>(); + late final _sec_protocol_options_set_tls_diffie_hellman_parametersPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( + 'sec_protocol_options_set_tls_diffie_hellman_parameters'); + late final _sec_protocol_options_set_tls_diffie_hellman_parameters = + _sec_protocol_options_set_tls_diffie_hellman_parametersPtr + .asFunction(); - int SSLSetDiffieHellmanParams( - SSLContextRef context, - ffi.Pointer dhParams, - int dhParamsLen, + void sec_protocol_options_add_pre_shared_key( + sec_protocol_options_t options, + dispatch_data_t psk, + dispatch_data_t psk_identity, ) { - return _SSLSetDiffieHellmanParams( - context, - dhParams, - dhParamsLen, + return _sec_protocol_options_add_pre_shared_key( + options, + psk, + psk_identity, ); } - late final _SSLSetDiffieHellmanParamsPtr = _lookup< + late final _sec_protocol_options_add_pre_shared_keyPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetDiffieHellmanParams'); - late final _SSLSetDiffieHellmanParams = _SSLSetDiffieHellmanParamsPtr - .asFunction, int)>(); + ffi.Void Function(sec_protocol_options_t, dispatch_data_t, + dispatch_data_t)>>('sec_protocol_options_add_pre_shared_key'); + late final _sec_protocol_options_add_pre_shared_key = + _sec_protocol_options_add_pre_shared_keyPtr.asFunction< + void Function( + sec_protocol_options_t, dispatch_data_t, dispatch_data_t)>(); - int SSLGetDiffieHellmanParams( - SSLContextRef context, - ffi.Pointer> dhParams, - ffi.Pointer dhParamsLen, + void sec_protocol_options_set_tls_pre_shared_key_identity_hint( + sec_protocol_options_t options, + dispatch_data_t psk_identity_hint, ) { - return _SSLGetDiffieHellmanParams( - context, - dhParams, - dhParamsLen, + return _sec_protocol_options_set_tls_pre_shared_key_identity_hint( + options, + psk_identity_hint, ); } - late final _SSLGetDiffieHellmanParamsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer>, - ffi.Pointer)>>('SSLGetDiffieHellmanParams'); - late final _SSLGetDiffieHellmanParams = - _SSLGetDiffieHellmanParamsPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer>, - ffi.Pointer)>(); + late final _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( + 'sec_protocol_options_set_tls_pre_shared_key_identity_hint'); + late final _sec_protocol_options_set_tls_pre_shared_key_identity_hint = + _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr + .asFunction(); - int SSLSetRsaBlinding( - SSLContextRef context, - int blinding, + void sec_protocol_options_set_pre_shared_key_selection_block( + sec_protocol_options_t options, + sec_protocol_pre_shared_key_selection_t psk_selection_block, + dispatch_queue_t psk_selection_queue, ) { - return _SSLSetRsaBlinding( - context, - blinding, + return _sec_protocol_options_set_pre_shared_key_selection_block( + options, + psk_selection_block, + psk_selection_queue, ); } - late final _SSLSetRsaBlindingPtr = - _lookup>( - 'SSLSetRsaBlinding'); - late final _SSLSetRsaBlinding = - _SSLSetRsaBlindingPtr.asFunction(); + late final _sec_protocol_options_set_pre_shared_key_selection_blockPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_options_t, + sec_protocol_pre_shared_key_selection_t, + dispatch_queue_t)>>( + 'sec_protocol_options_set_pre_shared_key_selection_block'); + late final _sec_protocol_options_set_pre_shared_key_selection_block = + _sec_protocol_options_set_pre_shared_key_selection_blockPtr.asFunction< + void Function(sec_protocol_options_t, + sec_protocol_pre_shared_key_selection_t, dispatch_queue_t)>(); - int SSLGetRsaBlinding( - SSLContextRef context, - ffi.Pointer blinding, + void sec_protocol_options_set_tls_tickets_enabled( + sec_protocol_options_t options, + bool tickets_enabled, ) { - return _SSLGetRsaBlinding( - context, - blinding, + return _sec_protocol_options_set_tls_tickets_enabled( + options, + tickets_enabled, ); } - late final _SSLGetRsaBlindingPtr = _lookup< + late final _sec_protocol_options_set_tls_tickets_enabledPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetRsaBlinding'); - late final _SSLGetRsaBlinding = _SSLGetRsaBlindingPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_tickets_enabled'); + late final _sec_protocol_options_set_tls_tickets_enabled = + _sec_protocol_options_set_tls_tickets_enabledPtr + .asFunction(); - int SSLHandshake( - SSLContextRef context, + void sec_protocol_options_set_tls_is_fallback_attempt( + sec_protocol_options_t options, + bool is_fallback_attempt, ) { - return _SSLHandshake( - context, - ); + return _sec_protocol_options_set_tls_is_fallback_attempt( + options, + is_fallback_attempt, + ); } - late final _SSLHandshakePtr = - _lookup>( - 'SSLHandshake'); - late final _SSLHandshake = - _SSLHandshakePtr.asFunction(); + late final _sec_protocol_options_set_tls_is_fallback_attemptPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_is_fallback_attempt'); + late final _sec_protocol_options_set_tls_is_fallback_attempt = + _sec_protocol_options_set_tls_is_fallback_attemptPtr + .asFunction(); - int SSLReHandshake( - SSLContextRef context, + void sec_protocol_options_set_tls_resumption_enabled( + sec_protocol_options_t options, + bool resumption_enabled, ) { - return _SSLReHandshake( - context, + return _sec_protocol_options_set_tls_resumption_enabled( + options, + resumption_enabled, ); } - late final _SSLReHandshakePtr = - _lookup>( - 'SSLReHandshake'); - late final _SSLReHandshake = - _SSLReHandshakePtr.asFunction(); + late final _sec_protocol_options_set_tls_resumption_enabledPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_resumption_enabled'); + late final _sec_protocol_options_set_tls_resumption_enabled = + _sec_protocol_options_set_tls_resumption_enabledPtr + .asFunction(); - int SSLWrite( - SSLContextRef context, - ffi.Pointer data, - int dataLength, - ffi.Pointer processed, + void sec_protocol_options_set_tls_false_start_enabled( + sec_protocol_options_t options, + bool false_start_enabled, ) { - return _SSLWrite( - context, - data, - dataLength, - processed, + return _sec_protocol_options_set_tls_false_start_enabled( + options, + false_start_enabled, ); } - late final _SSLWritePtr = _lookup< + late final _sec_protocol_options_set_tls_false_start_enabledPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, - ffi.Pointer)>>('SSLWrite'); - late final _SSLWrite = _SSLWritePtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_false_start_enabled'); + late final _sec_protocol_options_set_tls_false_start_enabled = + _sec_protocol_options_set_tls_false_start_enabledPtr + .asFunction(); - int SSLRead( - SSLContextRef context, - ffi.Pointer data, - int dataLength, - ffi.Pointer processed, + void sec_protocol_options_set_tls_ocsp_enabled( + sec_protocol_options_t options, + bool ocsp_enabled, ) { - return _SSLRead( - context, - data, - dataLength, - processed, + return _sec_protocol_options_set_tls_ocsp_enabled( + options, + ocsp_enabled, ); } - late final _SSLReadPtr = _lookup< + late final _sec_protocol_options_set_tls_ocsp_enabledPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, - ffi.Pointer)>>('SSLRead'); - late final _SSLRead = _SSLReadPtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_ocsp_enabled'); + late final _sec_protocol_options_set_tls_ocsp_enabled = + _sec_protocol_options_set_tls_ocsp_enabledPtr + .asFunction(); - int SSLGetBufferedReadSize( - SSLContextRef context, - ffi.Pointer bufferSize, + void sec_protocol_options_set_tls_sct_enabled( + sec_protocol_options_t options, + bool sct_enabled, ) { - return _SSLGetBufferedReadSize( - context, - bufferSize, + return _sec_protocol_options_set_tls_sct_enabled( + options, + sct_enabled, ); } - late final _SSLGetBufferedReadSizePtr = _lookup< + late final _sec_protocol_options_set_tls_sct_enabledPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetBufferedReadSize'); - late final _SSLGetBufferedReadSize = _SSLGetBufferedReadSizePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_sct_enabled'); + late final _sec_protocol_options_set_tls_sct_enabled = + _sec_protocol_options_set_tls_sct_enabledPtr + .asFunction(); - int SSLGetDatagramWriteSize( - SSLContextRef dtlsContext, - ffi.Pointer bufSize, + void sec_protocol_options_set_tls_renegotiation_enabled( + sec_protocol_options_t options, + bool renegotiation_enabled, ) { - return _SSLGetDatagramWriteSize( - dtlsContext, - bufSize, + return _sec_protocol_options_set_tls_renegotiation_enabled( + options, + renegotiation_enabled, ); } - late final _SSLGetDatagramWriteSizePtr = _lookup< + late final _sec_protocol_options_set_tls_renegotiation_enabledPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetDatagramWriteSize'); - late final _SSLGetDatagramWriteSize = _SSLGetDatagramWriteSizePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_renegotiation_enabled'); + late final _sec_protocol_options_set_tls_renegotiation_enabled = + _sec_protocol_options_set_tls_renegotiation_enabledPtr + .asFunction(); - int SSLClose( - SSLContextRef context, + void sec_protocol_options_set_peer_authentication_required( + sec_protocol_options_t options, + bool peer_authentication_required, ) { - return _SSLClose( - context, + return _sec_protocol_options_set_peer_authentication_required( + options, + peer_authentication_required, ); } - late final _SSLClosePtr = - _lookup>('SSLClose'); - late final _SSLClose = _SSLClosePtr.asFunction(); + late final _sec_protocol_options_set_peer_authentication_requiredPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( + 'sec_protocol_options_set_peer_authentication_required'); + late final _sec_protocol_options_set_peer_authentication_required = + _sec_protocol_options_set_peer_authentication_requiredPtr + .asFunction(); - int SSLSetError( - SSLContextRef context, - int status, + void sec_protocol_options_set_peer_authentication_optional( + sec_protocol_options_t options, + bool peer_authentication_optional, ) { - return _SSLSetError( - context, - status, + return _sec_protocol_options_set_peer_authentication_optional( + options, + peer_authentication_optional, ); } - late final _SSLSetErrorPtr = - _lookup>( - 'SSLSetError'); - late final _SSLSetError = - _SSLSetErrorPtr.asFunction(); - - /// -1LL - late final ffi.Pointer _NSURLSessionTransferSizeUnknown = - _lookup('NSURLSessionTransferSizeUnknown'); - - int get NSURLSessionTransferSizeUnknown => - _NSURLSessionTransferSizeUnknown.value; - - set NSURLSessionTransferSizeUnknown(int value) => - _NSURLSessionTransferSizeUnknown.value = value; + late final _sec_protocol_options_set_peer_authentication_optionalPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( + 'sec_protocol_options_set_peer_authentication_optional'); + late final _sec_protocol_options_set_peer_authentication_optional = + _sec_protocol_options_set_peer_authentication_optionalPtr + .asFunction(); - late final _class_NSURLSession1 = _getClass1("NSURLSession"); - late final _sel_sharedSession1 = _registerName1("sharedSession"); - ffi.Pointer _objc_msgSend_380( - ffi.Pointer obj, - ffi.Pointer sel, + void sec_protocol_options_set_enable_encrypted_client_hello( + sec_protocol_options_t options, + bool enable_encrypted_client_hello, ) { - return __objc_msgSend_380( - obj, - sel, + return _sec_protocol_options_set_enable_encrypted_client_hello( + options, + enable_encrypted_client_hello, ); } - late final __objc_msgSend_380Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _sec_protocol_options_set_enable_encrypted_client_helloPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( + 'sec_protocol_options_set_enable_encrypted_client_hello'); + late final _sec_protocol_options_set_enable_encrypted_client_hello = + _sec_protocol_options_set_enable_encrypted_client_helloPtr + .asFunction(); - late final _class_NSURLSessionConfiguration1 = - _getClass1("NSURLSessionConfiguration"); - late final _sel_defaultSessionConfiguration1 = - _registerName1("defaultSessionConfiguration"); - ffi.Pointer _objc_msgSend_381( - ffi.Pointer obj, - ffi.Pointer sel, + void sec_protocol_options_set_quic_use_legacy_codepoint( + sec_protocol_options_t options, + bool quic_use_legacy_codepoint, ) { - return __objc_msgSend_381( - obj, - sel, + return _sec_protocol_options_set_quic_use_legacy_codepoint( + options, + quic_use_legacy_codepoint, ); } - late final __objc_msgSend_381Ptr = _lookup< + late final _sec_protocol_options_set_quic_use_legacy_codepointPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_quic_use_legacy_codepoint'); + late final _sec_protocol_options_set_quic_use_legacy_codepoint = + _sec_protocol_options_set_quic_use_legacy_codepointPtr + .asFunction(); - late final _sel_ephemeralSessionConfiguration1 = - _registerName1("ephemeralSessionConfiguration"); - late final _sel_backgroundSessionConfigurationWithIdentifier_1 = - _registerName1("backgroundSessionConfigurationWithIdentifier:"); - ffi.Pointer _objc_msgSend_382( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, + void sec_protocol_options_set_key_update_block( + sec_protocol_options_t options, + sec_protocol_key_update_t key_update_block, + dispatch_queue_t key_update_queue, ) { - return __objc_msgSend_382( - obj, - sel, - identifier, + return _sec_protocol_options_set_key_update_block( + options, + key_update_block, + key_update_queue, ); } - late final __objc_msgSend_382Ptr = _lookup< + late final _sec_protocol_options_set_key_update_blockPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, sec_protocol_key_update_t, + dispatch_queue_t)>>('sec_protocol_options_set_key_update_block'); + late final _sec_protocol_options_set_key_update_block = + _sec_protocol_options_set_key_update_blockPtr.asFunction< + void Function(sec_protocol_options_t, sec_protocol_key_update_t, + dispatch_queue_t)>(); - late final _sel_identifier1 = _registerName1("identifier"); - late final _sel_requestCachePolicy1 = _registerName1("requestCachePolicy"); - late final _sel_setRequestCachePolicy_1 = - _registerName1("setRequestCachePolicy:"); - late final _sel_timeoutIntervalForRequest1 = - _registerName1("timeoutIntervalForRequest"); - late final _sel_setTimeoutIntervalForRequest_1 = - _registerName1("setTimeoutIntervalForRequest:"); - late final _sel_timeoutIntervalForResource1 = - _registerName1("timeoutIntervalForResource"); - late final _sel_setTimeoutIntervalForResource_1 = - _registerName1("setTimeoutIntervalForResource:"); - late final _sel_waitsForConnectivity1 = - _registerName1("waitsForConnectivity"); - late final _sel_setWaitsForConnectivity_1 = - _registerName1("setWaitsForConnectivity:"); - late final _sel_isDiscretionary1 = _registerName1("isDiscretionary"); - late final _sel_setDiscretionary_1 = _registerName1("setDiscretionary:"); - late final _sel_sharedContainerIdentifier1 = - _registerName1("sharedContainerIdentifier"); - late final _sel_setSharedContainerIdentifier_1 = - _registerName1("setSharedContainerIdentifier:"); - late final _sel_sessionSendsLaunchEvents1 = - _registerName1("sessionSendsLaunchEvents"); - late final _sel_setSessionSendsLaunchEvents_1 = - _registerName1("setSessionSendsLaunchEvents:"); - late final _sel_connectionProxyDictionary1 = - _registerName1("connectionProxyDictionary"); - late final _sel_setConnectionProxyDictionary_1 = - _registerName1("setConnectionProxyDictionary:"); - late final _sel_TLSMinimumSupportedProtocol1 = - _registerName1("TLSMinimumSupportedProtocol"); - int _objc_msgSend_383( - ffi.Pointer obj, - ffi.Pointer sel, + void sec_protocol_options_set_challenge_block( + sec_protocol_options_t options, + sec_protocol_challenge_t challenge_block, + dispatch_queue_t challenge_queue, ) { - return __objc_msgSend_383( - obj, - sel, + return _sec_protocol_options_set_challenge_block( + options, + challenge_block, + challenge_queue, ); } - late final __objc_msgSend_383Ptr = _lookup< + late final _sec_protocol_options_set_challenge_blockPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, sec_protocol_challenge_t, + dispatch_queue_t)>>('sec_protocol_options_set_challenge_block'); + late final _sec_protocol_options_set_challenge_block = + _sec_protocol_options_set_challenge_blockPtr.asFunction< + void Function(sec_protocol_options_t, sec_protocol_challenge_t, + dispatch_queue_t)>(); - late final _sel_setTLSMinimumSupportedProtocol_1 = - _registerName1("setTLSMinimumSupportedProtocol:"); - void _objc_msgSend_384( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void sec_protocol_options_set_verify_block( + sec_protocol_options_t options, + sec_protocol_verify_t verify_block, + dispatch_queue_t verify_block_queue, ) { - return __objc_msgSend_384( - obj, - sel, - value, + return _sec_protocol_options_set_verify_block( + options, + verify_block, + verify_block_queue, ); } - late final __objc_msgSend_384Ptr = _lookup< + late final _sec_protocol_options_set_verify_blockPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(sec_protocol_options_t, sec_protocol_verify_t, + dispatch_queue_t)>>('sec_protocol_options_set_verify_block'); + late final _sec_protocol_options_set_verify_block = + _sec_protocol_options_set_verify_blockPtr.asFunction< + void Function(sec_protocol_options_t, sec_protocol_verify_t, + dispatch_queue_t)>(); - late final _sel_TLSMaximumSupportedProtocol1 = - _registerName1("TLSMaximumSupportedProtocol"); - late final _sel_setTLSMaximumSupportedProtocol_1 = - _registerName1("setTLSMaximumSupportedProtocol:"); - late final _sel_TLSMinimumSupportedProtocolVersion1 = - _registerName1("TLSMinimumSupportedProtocolVersion"); - int _objc_msgSend_385( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_385( - obj, - sel, - ); - } + late final ffi.Pointer _kSSLSessionConfig_default = + _lookup('kSSLSessionConfig_default'); - late final __objc_msgSend_385Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + CFStringRef get kSSLSessionConfig_default => _kSSLSessionConfig_default.value; - late final _sel_setTLSMinimumSupportedProtocolVersion_1 = - _registerName1("setTLSMinimumSupportedProtocolVersion:"); - void _objc_msgSend_386( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_386( - obj, - sel, - value, - ); - } + set kSSLSessionConfig_default(CFStringRef value) => + _kSSLSessionConfig_default.value = value; - late final __objc_msgSend_386Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final ffi.Pointer _kSSLSessionConfig_ATSv1 = + _lookup('kSSLSessionConfig_ATSv1'); - late final _sel_TLSMaximumSupportedProtocolVersion1 = - _registerName1("TLSMaximumSupportedProtocolVersion"); - late final _sel_setTLSMaximumSupportedProtocolVersion_1 = - _registerName1("setTLSMaximumSupportedProtocolVersion:"); - late final _sel_HTTPShouldSetCookies1 = - _registerName1("HTTPShouldSetCookies"); - late final _sel_setHTTPShouldSetCookies_1 = - _registerName1("setHTTPShouldSetCookies:"); - late final _sel_HTTPCookieAcceptPolicy1 = - _registerName1("HTTPCookieAcceptPolicy"); - late final _sel_setHTTPCookieAcceptPolicy_1 = - _registerName1("setHTTPCookieAcceptPolicy:"); - late final _sel_HTTPAdditionalHeaders1 = - _registerName1("HTTPAdditionalHeaders"); - late final _sel_setHTTPAdditionalHeaders_1 = - _registerName1("setHTTPAdditionalHeaders:"); - late final _sel_HTTPMaximumConnectionsPerHost1 = - _registerName1("HTTPMaximumConnectionsPerHost"); - late final _sel_setHTTPMaximumConnectionsPerHost_1 = - _registerName1("setHTTPMaximumConnectionsPerHost:"); - late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); - late final _sel_setHTTPCookieStorage_1 = - _registerName1("setHTTPCookieStorage:"); - void _objc_msgSend_387( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_387( - obj, - sel, - value, - ); - } + CFStringRef get kSSLSessionConfig_ATSv1 => _kSSLSessionConfig_ATSv1.value; - late final __objc_msgSend_387Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + set kSSLSessionConfig_ATSv1(CFStringRef value) => + _kSSLSessionConfig_ATSv1.value = value; - late final _class_NSURLCredentialStorage1 = - _getClass1("NSURLCredentialStorage"); - late final _sel_URLCredentialStorage1 = - _registerName1("URLCredentialStorage"); - ffi.Pointer _objc_msgSend_388( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_388( - obj, - sel, - ); - } + late final ffi.Pointer _kSSLSessionConfig_ATSv1_noPFS = + _lookup('kSSLSessionConfig_ATSv1_noPFS'); - late final __objc_msgSend_388Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + CFStringRef get kSSLSessionConfig_ATSv1_noPFS => + _kSSLSessionConfig_ATSv1_noPFS.value; - late final _sel_setURLCredentialStorage_1 = - _registerName1("setURLCredentialStorage:"); - void _objc_msgSend_389( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_389( - obj, - sel, - value, - ); - } + set kSSLSessionConfig_ATSv1_noPFS(CFStringRef value) => + _kSSLSessionConfig_ATSv1_noPFS.value = value; - late final __objc_msgSend_389Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final ffi.Pointer _kSSLSessionConfig_standard = + _lookup('kSSLSessionConfig_standard'); - late final _class_NSURLCache1 = _getClass1("NSURLCache"); - late final _sel_URLCache1 = _registerName1("URLCache"); - ffi.Pointer _objc_msgSend_390( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_390( - obj, - sel, + CFStringRef get kSSLSessionConfig_standard => + _kSSLSessionConfig_standard.value; + + set kSSLSessionConfig_standard(CFStringRef value) => + _kSSLSessionConfig_standard.value = value; + + late final ffi.Pointer _kSSLSessionConfig_RC4_fallback = + _lookup('kSSLSessionConfig_RC4_fallback'); + + CFStringRef get kSSLSessionConfig_RC4_fallback => + _kSSLSessionConfig_RC4_fallback.value; + + set kSSLSessionConfig_RC4_fallback(CFStringRef value) => + _kSSLSessionConfig_RC4_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_TLSv1_fallback = + _lookup('kSSLSessionConfig_TLSv1_fallback'); + + CFStringRef get kSSLSessionConfig_TLSv1_fallback => + _kSSLSessionConfig_TLSv1_fallback.value; + + set kSSLSessionConfig_TLSv1_fallback(CFStringRef value) => + _kSSLSessionConfig_TLSv1_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_TLSv1_RC4_fallback = + _lookup('kSSLSessionConfig_TLSv1_RC4_fallback'); + + CFStringRef get kSSLSessionConfig_TLSv1_RC4_fallback => + _kSSLSessionConfig_TLSv1_RC4_fallback.value; + + set kSSLSessionConfig_TLSv1_RC4_fallback(CFStringRef value) => + _kSSLSessionConfig_TLSv1_RC4_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_legacy = + _lookup('kSSLSessionConfig_legacy'); + + CFStringRef get kSSLSessionConfig_legacy => _kSSLSessionConfig_legacy.value; + + set kSSLSessionConfig_legacy(CFStringRef value) => + _kSSLSessionConfig_legacy.value = value; + + late final ffi.Pointer _kSSLSessionConfig_legacy_DHE = + _lookup('kSSLSessionConfig_legacy_DHE'); + + CFStringRef get kSSLSessionConfig_legacy_DHE => + _kSSLSessionConfig_legacy_DHE.value; + + set kSSLSessionConfig_legacy_DHE(CFStringRef value) => + _kSSLSessionConfig_legacy_DHE.value = value; + + late final ffi.Pointer _kSSLSessionConfig_anonymous = + _lookup('kSSLSessionConfig_anonymous'); + + CFStringRef get kSSLSessionConfig_anonymous => + _kSSLSessionConfig_anonymous.value; + + set kSSLSessionConfig_anonymous(CFStringRef value) => + _kSSLSessionConfig_anonymous.value = value; + + late final ffi.Pointer _kSSLSessionConfig_3DES_fallback = + _lookup('kSSLSessionConfig_3DES_fallback'); + + CFStringRef get kSSLSessionConfig_3DES_fallback => + _kSSLSessionConfig_3DES_fallback.value; + + set kSSLSessionConfig_3DES_fallback(CFStringRef value) => + _kSSLSessionConfig_3DES_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_TLSv1_3DES_fallback = + _lookup('kSSLSessionConfig_TLSv1_3DES_fallback'); + + CFStringRef get kSSLSessionConfig_TLSv1_3DES_fallback => + _kSSLSessionConfig_TLSv1_3DES_fallback.value; + + set kSSLSessionConfig_TLSv1_3DES_fallback(CFStringRef value) => + _kSSLSessionConfig_TLSv1_3DES_fallback.value = value; + + int SSLContextGetTypeID() { + return _SSLContextGetTypeID(); + } + + late final _SSLContextGetTypeIDPtr = + _lookup>('SSLContextGetTypeID'); + late final _SSLContextGetTypeID = + _SSLContextGetTypeIDPtr.asFunction(); + + SSLContextRef SSLCreateContext( + CFAllocatorRef alloc, + int protocolSide, + int connectionType, + ) { + return _SSLCreateContext( + alloc, + protocolSide, + connectionType, ); } - late final __objc_msgSend_390Ptr = _lookup< + late final _SSLCreateContextPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + SSLContextRef Function( + CFAllocatorRef, ffi.Int32, ffi.Int32)>>('SSLCreateContext'); + late final _SSLCreateContext = _SSLCreateContextPtr.asFunction< + SSLContextRef Function(CFAllocatorRef, int, int)>(); - late final _sel_setURLCache_1 = _registerName1("setURLCache:"); - void _objc_msgSend_391( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + int SSLNewContext( + int isServer, + ffi.Pointer contextPtr, ) { - return __objc_msgSend_391( - obj, - sel, - value, + return _SSLNewContext( + isServer, + contextPtr, ); } - late final __objc_msgSend_391Ptr = _lookup< + late final _SSLNewContextPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function( + Boolean, ffi.Pointer)>>('SSLNewContext'); + late final _SSLNewContext = _SSLNewContextPtr.asFunction< + int Function(int, ffi.Pointer)>(); - late final _sel_shouldUseExtendedBackgroundIdleMode1 = - _registerName1("shouldUseExtendedBackgroundIdleMode"); - late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = - _registerName1("setShouldUseExtendedBackgroundIdleMode:"); - late final _sel_protocolClasses1 = _registerName1("protocolClasses"); - late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); - void _objc_msgSend_392( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + int SSLDisposeContext( + SSLContextRef context, ) { - return __objc_msgSend_392( - obj, - sel, - value, + return _SSLDisposeContext( + context, ); } - late final __objc_msgSend_392Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _SSLDisposeContextPtr = + _lookup>( + 'SSLDisposeContext'); + late final _SSLDisposeContext = + _SSLDisposeContextPtr.asFunction(); - late final _sel_multipathServiceType1 = - _registerName1("multipathServiceType"); - int _objc_msgSend_393( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLGetSessionState( + SSLContextRef context, + ffi.Pointer state, ) { - return __objc_msgSend_393( - obj, - sel, + return _SSLGetSessionState( + context, + state, ); } - late final __objc_msgSend_393Ptr = _lookup< + late final _SSLGetSessionStatePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetSessionState'); + late final _SSLGetSessionState = _SSLGetSessionStatePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_setMultipathServiceType_1 = - _registerName1("setMultipathServiceType:"); - void _objc_msgSend_394( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLSetSessionOption( + SSLContextRef context, + int option, int value, ) { - return __objc_msgSend_394( - obj, - sel, + return _SSLSetSessionOption( + context, + option, value, ); } - late final __objc_msgSend_394Ptr = _lookup< + late final _SSLSetSessionOptionPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + OSStatus Function( + SSLContextRef, ffi.Int32, Boolean)>>('SSLSetSessionOption'); + late final _SSLSetSessionOption = _SSLSetSessionOptionPtr.asFunction< + int Function(SSLContextRef, int, int)>(); - late final _sel_backgroundSessionConfiguration_1 = - _registerName1("backgroundSessionConfiguration:"); - late final _sel_sessionWithConfiguration_1 = - _registerName1("sessionWithConfiguration:"); - ffi.Pointer _objc_msgSend_395( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer configuration, + int SSLGetSessionOption( + SSLContextRef context, + int option, + ffi.Pointer value, ) { - return __objc_msgSend_395( - obj, - sel, - configuration, + return _SSLGetSessionOption( + context, + option, + value, ); } - late final __objc_msgSend_395Ptr = _lookup< + late final _SSLGetSessionOptionPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Int32, + ffi.Pointer)>>('SSLGetSessionOption'); + late final _SSLGetSessionOption = _SSLGetSessionOptionPtr.asFunction< + int Function(SSLContextRef, int, ffi.Pointer)>(); - late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = - _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); - ffi.Pointer _objc_msgSend_396( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer configuration, - ffi.Pointer delegate, - ffi.Pointer queue, + int SSLSetIOFuncs( + SSLContextRef context, + SSLReadFunc readFunc, + SSLWriteFunc writeFunc, ) { - return __objc_msgSend_396( - obj, - sel, - configuration, - delegate, - queue, + return _SSLSetIOFuncs( + context, + readFunc, + writeFunc, ); } - late final __objc_msgSend_396Ptr = _lookup< + late final _SSLSetIOFuncsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, SSLReadFunc, SSLWriteFunc)>>('SSLSetIOFuncs'); + late final _SSLSetIOFuncs = _SSLSetIOFuncsPtr.asFunction< + int Function(SSLContextRef, SSLReadFunc, SSLWriteFunc)>(); - late final _sel_delegateQueue1 = _registerName1("delegateQueue"); - late final _sel_delegate1 = _registerName1("delegate"); - late final _sel_configuration1 = _registerName1("configuration"); - late final _sel_sessionDescription1 = _registerName1("sessionDescription"); - late final _sel_setSessionDescription_1 = - _registerName1("setSessionDescription:"); - late final _sel_finishTasksAndInvalidate1 = - _registerName1("finishTasksAndInvalidate"); - late final _sel_invalidateAndCancel1 = _registerName1("invalidateAndCancel"); - late final _sel_resetWithCompletionHandler_1 = - _registerName1("resetWithCompletionHandler:"); - late final _sel_flushWithCompletionHandler_1 = - _registerName1("flushWithCompletionHandler:"); - late final _sel_getTasksWithCompletionHandler_1 = - _registerName1("getTasksWithCompletionHandler:"); - void _objc_msgSend_397( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetSessionConfig( + SSLContextRef context, + CFStringRef config, ) { - return __objc_msgSend_397( - obj, - sel, - completionHandler, + return _SSLSetSessionConfig( + context, + config, ); } - late final __objc_msgSend_397Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetSessionConfigPtr = _lookup< + ffi.NativeFunction>( + 'SSLSetSessionConfig'); + late final _SSLSetSessionConfig = _SSLSetSessionConfigPtr.asFunction< + int Function(SSLContextRef, CFStringRef)>(); - late final _sel_getAllTasksWithCompletionHandler_1 = - _registerName1("getAllTasksWithCompletionHandler:"); - void _objc_msgSend_398( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetProtocolVersionMin( + SSLContextRef context, + int minVersion, ) { - return __objc_msgSend_398( - obj, - sel, - completionHandler, + return _SSLSetProtocolVersionMin( + context, + minVersion, ); } - late final __objc_msgSend_398Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetProtocolVersionMinPtr = + _lookup>( + 'SSLSetProtocolVersionMin'); + late final _SSLSetProtocolVersionMin = _SSLSetProtocolVersionMinPtr + .asFunction(); - late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); - late final _sel_dataTaskWithRequest_1 = - _registerName1("dataTaskWithRequest:"); - ffi.Pointer _objc_msgSend_399( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + int SSLGetProtocolVersionMin( + SSLContextRef context, + ffi.Pointer minVersion, ) { - return __objc_msgSend_399( - obj, - sel, - request, + return _SSLGetProtocolVersionMin( + context, + minVersion, ); } - late final __objc_msgSend_399Ptr = _lookup< + late final _SSLGetProtocolVersionMinPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetProtocolVersionMin'); + late final _SSLGetProtocolVersionMin = _SSLGetProtocolVersionMinPtr + .asFunction)>(); - late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); - ffi.Pointer _objc_msgSend_400( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + int SSLSetProtocolVersionMax( + SSLContextRef context, + int maxVersion, ) { - return __objc_msgSend_400( - obj, - sel, - url, + return _SSLSetProtocolVersionMax( + context, + maxVersion, ); } - late final __objc_msgSend_400Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _SSLSetProtocolVersionMaxPtr = + _lookup>( + 'SSLSetProtocolVersionMax'); + late final _SSLSetProtocolVersionMax = _SSLSetProtocolVersionMaxPtr + .asFunction(); - late final _class_NSURLSessionUploadTask1 = - _getClass1("NSURLSessionUploadTask"); - late final _sel_uploadTaskWithRequest_fromFile_1 = - _registerName1("uploadTaskWithRequest:fromFile:"); - ffi.Pointer _objc_msgSend_401( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer fileURL, + int SSLGetProtocolVersionMax( + SSLContextRef context, + ffi.Pointer maxVersion, ) { - return __objc_msgSend_401( - obj, - sel, - request, - fileURL, + return _SSLGetProtocolVersionMax( + context, + maxVersion, ); } - late final __objc_msgSend_401Ptr = _lookup< + late final _SSLGetProtocolVersionMaxPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetProtocolVersionMax'); + late final _SSLGetProtocolVersionMax = _SSLGetProtocolVersionMaxPtr + .asFunction)>(); - late final _sel_uploadTaskWithRequest_fromData_1 = - _registerName1("uploadTaskWithRequest:fromData:"); - ffi.Pointer _objc_msgSend_402( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer bodyData, + int SSLSetProtocolVersionEnabled( + SSLContextRef context, + int protocol, + int enable, ) { - return __objc_msgSend_402( - obj, - sel, - request, - bodyData, + return _SSLSetProtocolVersionEnabled( + context, + protocol, + enable, ); } - late final __objc_msgSend_402Ptr = _lookup< + late final _SSLSetProtocolVersionEnabledPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Int32, + Boolean)>>('SSLSetProtocolVersionEnabled'); + late final _SSLSetProtocolVersionEnabled = _SSLSetProtocolVersionEnabledPtr + .asFunction(); - late final _sel_uploadTaskWithStreamedRequest_1 = - _registerName1("uploadTaskWithStreamedRequest:"); - ffi.Pointer _objc_msgSend_403( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + int SSLGetProtocolVersionEnabled( + SSLContextRef context, + int protocol, + ffi.Pointer enable, ) { - return __objc_msgSend_403( - obj, - sel, - request, + return _SSLGetProtocolVersionEnabled( + context, + protocol, + enable, ); } - late final __objc_msgSend_403Ptr = _lookup< + late final _SSLGetProtocolVersionEnabledPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Int32, + ffi.Pointer)>>('SSLGetProtocolVersionEnabled'); + late final _SSLGetProtocolVersionEnabled = _SSLGetProtocolVersionEnabledPtr + .asFunction)>(); - late final _class_NSURLSessionDownloadTask1 = - _getClass1("NSURLSessionDownloadTask"); - late final _sel_cancelByProducingResumeData_1 = - _registerName1("cancelByProducingResumeData:"); - void _objc_msgSend_404( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetProtocolVersion( + SSLContextRef context, + int version, ) { - return __objc_msgSend_404( - obj, - sel, - completionHandler, + return _SSLSetProtocolVersion( + context, + version, ); } - late final __objc_msgSend_404Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetProtocolVersionPtr = + _lookup>( + 'SSLSetProtocolVersion'); + late final _SSLSetProtocolVersion = + _SSLSetProtocolVersionPtr.asFunction(); - late final _sel_downloadTaskWithRequest_1 = - _registerName1("downloadTaskWithRequest:"); - ffi.Pointer _objc_msgSend_405( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + int SSLGetProtocolVersion( + SSLContextRef context, + ffi.Pointer protocol, ) { - return __objc_msgSend_405( - obj, - sel, - request, + return _SSLGetProtocolVersion( + context, + protocol, ); } - late final __objc_msgSend_405Ptr = _lookup< + late final _SSLGetProtocolVersionPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetProtocolVersion'); + late final _SSLGetProtocolVersion = _SSLGetProtocolVersionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_downloadTaskWithURL_1 = - _registerName1("downloadTaskWithURL:"); - ffi.Pointer _objc_msgSend_406( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + int SSLSetCertificate( + SSLContextRef context, + CFArrayRef certRefs, ) { - return __objc_msgSend_406( - obj, - sel, - url, + return _SSLSetCertificate( + context, + certRefs, ); } - late final __objc_msgSend_406Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _SSLSetCertificatePtr = + _lookup>( + 'SSLSetCertificate'); + late final _SSLSetCertificate = _SSLSetCertificatePtr.asFunction< + int Function(SSLContextRef, CFArrayRef)>(); - late final _sel_downloadTaskWithResumeData_1 = - _registerName1("downloadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_407( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, + int SSLSetConnection( + SSLContextRef context, + SSLConnectionRef connection, ) { - return __objc_msgSend_407( - obj, - sel, - resumeData, + return _SSLSetConnection( + context, + connection, ); } - late final __objc_msgSend_407Ptr = _lookup< + late final _SSLSetConnectionPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, SSLConnectionRef)>>('SSLSetConnection'); + late final _SSLSetConnection = _SSLSetConnectionPtr.asFunction< + int Function(SSLContextRef, SSLConnectionRef)>(); - late final _class_NSURLSessionStreamTask1 = - _getClass1("NSURLSessionStreamTask"); - late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = - _registerName1( - "readDataOfMinLength:maxLength:timeout:completionHandler:"); - void _objc_msgSend_408( - ffi.Pointer obj, - ffi.Pointer sel, - int minBytes, - int maxBytes, - double timeout, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLGetConnection( + SSLContextRef context, + ffi.Pointer connection, ) { - return __objc_msgSend_408( - obj, - sel, - minBytes, - maxBytes, - timeout, - completionHandler, + return _SSLGetConnection( + context, + connection, ); } - late final __objc_msgSend_408Ptr = _lookup< + late final _SSLGetConnectionPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSUInteger, - NSTimeInterval, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int, - double, ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetConnection'); + late final _SSLGetConnection = _SSLGetConnectionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_writeData_timeout_completionHandler_1 = - _registerName1("writeData:timeout:completionHandler:"); - void _objc_msgSend_409( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - double timeout, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetPeerDomainName( + SSLContextRef context, + ffi.Pointer peerName, + int peerNameLen, ) { - return __objc_msgSend_409( - obj, - sel, - data, - timeout, - completionHandler, + return _SSLSetPeerDomainName( + context, + peerName, + peerNameLen, ); } - late final __objc_msgSend_409Ptr = _lookup< + late final _SSLSetPeerDomainNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSTimeInterval, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetPeerDomainName'); + late final _SSLSetPeerDomainName = _SSLSetPeerDomainNamePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - late final _sel_captureStreams1 = _registerName1("captureStreams"); - late final _sel_closeWrite1 = _registerName1("closeWrite"); - late final _sel_closeRead1 = _registerName1("closeRead"); - late final _sel_startSecureConnection1 = - _registerName1("startSecureConnection"); - late final _sel_stopSecureConnection1 = - _registerName1("stopSecureConnection"); - late final _sel_streamTaskWithHostName_port_1 = - _registerName1("streamTaskWithHostName:port:"); - ffi.Pointer _objc_msgSend_410( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer hostname, - int port, + int SSLGetPeerDomainNameLength( + SSLContextRef context, + ffi.Pointer peerNameLen, ) { - return __objc_msgSend_410( - obj, - sel, - hostname, - port, + return _SSLGetPeerDomainNameLength( + context, + peerNameLen, ); } - late final __objc_msgSend_410Ptr = _lookup< + late final _SSLGetPeerDomainNameLengthPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetPeerDomainNameLength'); + late final _SSLGetPeerDomainNameLength = _SSLGetPeerDomainNameLengthPtr + .asFunction)>(); - late final _class_NSNetService1 = _getClass1("NSNetService"); - late final _sel_streamTaskWithNetService_1 = - _registerName1("streamTaskWithNetService:"); - ffi.Pointer _objc_msgSend_411( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer service, + int SSLGetPeerDomainName( + SSLContextRef context, + ffi.Pointer peerName, + ffi.Pointer peerNameLen, ) { - return __objc_msgSend_411( - obj, - sel, - service, + return _SSLGetPeerDomainName( + context, + peerName, + peerNameLen, ); } - late final __objc_msgSend_411Ptr = _lookup< + late final _SSLGetPeerDomainNamePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLGetPeerDomainName'); + late final _SSLGetPeerDomainName = _SSLGetPeerDomainNamePtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - late final _class_NSURLSessionWebSocketTask1 = - _getClass1("NSURLSessionWebSocketTask"); - late final _class_NSURLSessionWebSocketMessage1 = - _getClass1("NSURLSessionWebSocketMessage"); - late final _sel_type1 = _registerName1("type"); - int _objc_msgSend_412( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLCopyRequestedPeerNameLength( + SSLContextRef ctx, + ffi.Pointer peerNameLen, ) { - return __objc_msgSend_412( - obj, - sel, + return _SSLCopyRequestedPeerNameLength( + ctx, + peerNameLen, ); } - late final __objc_msgSend_412Ptr = _lookup< + late final _SSLCopyRequestedPeerNameLengthPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyRequestedPeerNameLength'); + late final _SSLCopyRequestedPeerNameLength = + _SSLCopyRequestedPeerNameLengthPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_sendMessage_completionHandler_1 = - _registerName1("sendMessage:completionHandler:"); - void _objc_msgSend_413( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer message, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLCopyRequestedPeerName( + SSLContextRef context, + ffi.Pointer peerName, + ffi.Pointer peerNameLen, ) { - return __objc_msgSend_413( - obj, - sel, - message, - completionHandler, + return _SSLCopyRequestedPeerName( + context, + peerName, + peerNameLen, ); } - late final __objc_msgSend_413Ptr = _lookup< + late final _SSLCopyRequestedPeerNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLCopyRequestedPeerName'); + late final _SSLCopyRequestedPeerName = + _SSLCopyRequestedPeerNamePtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - late final _sel_receiveMessageWithCompletionHandler_1 = - _registerName1("receiveMessageWithCompletionHandler:"); - void _objc_msgSend_414( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetDatagramHelloCookie( + SSLContextRef dtlsContext, + ffi.Pointer cookie, + int cookieLen, ) { - return __objc_msgSend_414( - obj, - sel, - completionHandler, + return _SSLSetDatagramHelloCookie( + dtlsContext, + cookie, + cookieLen, ); } - late final __objc_msgSend_414Ptr = _lookup< + late final _SSLSetDatagramHelloCookiePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetDatagramHelloCookie'); + late final _SSLSetDatagramHelloCookie = _SSLSetDatagramHelloCookiePtr + .asFunction, int)>(); - late final _sel_sendPingWithPongReceiveHandler_1 = - _registerName1("sendPingWithPongReceiveHandler:"); - void _objc_msgSend_415( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> pongReceiveHandler, + int SSLSetMaxDatagramRecordSize( + SSLContextRef dtlsContext, + int maxSize, ) { - return __objc_msgSend_415( - obj, - sel, - pongReceiveHandler, + return _SSLSetMaxDatagramRecordSize( + dtlsContext, + maxSize, ); } - late final __objc_msgSend_415Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetMaxDatagramRecordSizePtr = + _lookup>( + 'SSLSetMaxDatagramRecordSize'); + late final _SSLSetMaxDatagramRecordSize = _SSLSetMaxDatagramRecordSizePtr + .asFunction(); - late final _sel_cancelWithCloseCode_reason_1 = - _registerName1("cancelWithCloseCode:reason:"); - void _objc_msgSend_416( - ffi.Pointer obj, - ffi.Pointer sel, - int closeCode, - ffi.Pointer reason, + int SSLGetMaxDatagramRecordSize( + SSLContextRef dtlsContext, + ffi.Pointer maxSize, ) { - return __objc_msgSend_416( - obj, - sel, - closeCode, - reason, + return _SSLGetMaxDatagramRecordSize( + dtlsContext, + maxSize, ); } - late final __objc_msgSend_416Ptr = _lookup< + late final _SSLGetMaxDatagramRecordSizePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetMaxDatagramRecordSize'); + late final _SSLGetMaxDatagramRecordSize = _SSLGetMaxDatagramRecordSizePtr + .asFunction)>(); - late final _sel_maximumMessageSize1 = _registerName1("maximumMessageSize"); - late final _sel_setMaximumMessageSize_1 = - _registerName1("setMaximumMessageSize:"); - late final _sel_closeCode1 = _registerName1("closeCode"); - int _objc_msgSend_417( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLGetNegotiatedProtocolVersion( + SSLContextRef context, + ffi.Pointer protocol, ) { - return __objc_msgSend_417( - obj, - sel, + return _SSLGetNegotiatedProtocolVersion( + context, + protocol, ); } - late final __objc_msgSend_417Ptr = _lookup< + late final _SSLGetNegotiatedProtocolVersionPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNegotiatedProtocolVersion'); + late final _SSLGetNegotiatedProtocolVersion = + _SSLGetNegotiatedProtocolVersionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_closeReason1 = _registerName1("closeReason"); - late final _sel_webSocketTaskWithURL_1 = - _registerName1("webSocketTaskWithURL:"); - ffi.Pointer _objc_msgSend_418( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + int SSLGetNumberSupportedCiphers( + SSLContextRef context, + ffi.Pointer numCiphers, ) { - return __objc_msgSend_418( - obj, - sel, - url, + return _SSLGetNumberSupportedCiphers( + context, + numCiphers, ); } - late final __objc_msgSend_418Ptr = _lookup< + late final _SSLGetNumberSupportedCiphersPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNumberSupportedCiphers'); + late final _SSLGetNumberSupportedCiphers = _SSLGetNumberSupportedCiphersPtr + .asFunction)>(); - late final _sel_webSocketTaskWithURL_protocols_1 = - _registerName1("webSocketTaskWithURL:protocols:"); - ffi.Pointer _objc_msgSend_419( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer protocols, + int SSLGetSupportedCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + ffi.Pointer numCiphers, ) { - return __objc_msgSend_419( - obj, - sel, - url, - protocols, + return _SSLGetSupportedCiphers( + context, + ciphers, + numCiphers, ); } - late final __objc_msgSend_419Ptr = _lookup< + late final _SSLGetSupportedCiphersPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLGetSupportedCiphers'); + late final _SSLGetSupportedCiphers = _SSLGetSupportedCiphersPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - late final _sel_webSocketTaskWithRequest_1 = - _registerName1("webSocketTaskWithRequest:"); - ffi.Pointer _objc_msgSend_420( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + int SSLGetNumberEnabledCiphers( + SSLContextRef context, + ffi.Pointer numCiphers, ) { - return __objc_msgSend_420( - obj, - sel, - request, + return _SSLGetNumberEnabledCiphers( + context, + numCiphers, ); } - late final __objc_msgSend_420Ptr = _lookup< + late final _SSLGetNumberEnabledCiphersPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNumberEnabledCiphers'); + late final _SSLGetNumberEnabledCiphers = _SSLGetNumberEnabledCiphersPtr + .asFunction)>(); - late final _sel_dataTaskWithRequest_completionHandler_1 = - _registerName1("dataTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_421( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetEnabledCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + int numCiphers, ) { - return __objc_msgSend_421( - obj, - sel, - request, - completionHandler, + return _SSLSetEnabledCiphers( + context, + ciphers, + numCiphers, ); } - late final __objc_msgSend_421Ptr = _lookup< + late final _SSLSetEnabledCiphersPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetEnabledCiphers'); + late final _SSLSetEnabledCiphers = _SSLSetEnabledCiphersPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - late final _sel_dataTaskWithURL_completionHandler_1 = - _registerName1("dataTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_422( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLGetEnabledCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + ffi.Pointer numCiphers, ) { - return __objc_msgSend_422( - obj, - sel, - url, - completionHandler, + return _SSLGetEnabledCiphers( + context, + ciphers, + numCiphers, ); } - late final __objc_msgSend_422Ptr = _lookup< + late final _SSLGetEnabledCiphersPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLGetEnabledCiphers'); + late final _SSLGetEnabledCiphers = _SSLGetEnabledCiphersPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = - _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); - ffi.Pointer _objc_msgSend_423( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer fileURL, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetSessionTicketsEnabled( + SSLContextRef context, + int enabled, ) { - return __objc_msgSend_423( - obj, - sel, - request, - fileURL, - completionHandler, + return _SSLSetSessionTicketsEnabled( + context, + enabled, ); } - late final __objc_msgSend_423Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetSessionTicketsEnabledPtr = + _lookup>( + 'SSLSetSessionTicketsEnabled'); + late final _SSLSetSessionTicketsEnabled = _SSLSetSessionTicketsEnabledPtr + .asFunction(); - late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = - _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); - ffi.Pointer _objc_msgSend_424( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer bodyData, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetEnableCertVerify( + SSLContextRef context, + int enableVerify, ) { - return __objc_msgSend_424( - obj, - sel, - request, - bodyData, - completionHandler, + return _SSLSetEnableCertVerify( + context, + enableVerify, ); } - late final __objc_msgSend_424Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetEnableCertVerifyPtr = + _lookup>( + 'SSLSetEnableCertVerify'); + late final _SSLSetEnableCertVerify = + _SSLSetEnableCertVerifyPtr.asFunction(); - late final _sel_downloadTaskWithRequest_completionHandler_1 = - _registerName1("downloadTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_425( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLGetEnableCertVerify( + SSLContextRef context, + ffi.Pointer enableVerify, ) { - return __objc_msgSend_425( - obj, - sel, - request, - completionHandler, + return _SSLGetEnableCertVerify( + context, + enableVerify, ); } - late final __objc_msgSend_425Ptr = _lookup< + late final _SSLGetEnableCertVerifyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetEnableCertVerify'); + late final _SSLGetEnableCertVerify = _SSLGetEnableCertVerifyPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_downloadTaskWithURL_completionHandler_1 = - _registerName1("downloadTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_426( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetAllowsExpiredCerts( + SSLContextRef context, + int allowsExpired, ) { - return __objc_msgSend_426( - obj, - sel, - url, - completionHandler, + return _SSLSetAllowsExpiredCerts( + context, + allowsExpired, ); } - late final __objc_msgSend_426Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetAllowsExpiredCertsPtr = + _lookup>( + 'SSLSetAllowsExpiredCerts'); + late final _SSLSetAllowsExpiredCerts = _SSLSetAllowsExpiredCertsPtr + .asFunction(); - late final _sel_downloadTaskWithResumeData_completionHandler_1 = - _registerName1("downloadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_427( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLGetAllowsExpiredCerts( + SSLContextRef context, + ffi.Pointer allowsExpired, ) { - return __objc_msgSend_427( - obj, - sel, - resumeData, - completionHandler, + return _SSLGetAllowsExpiredCerts( + context, + allowsExpired, ); } - late final __objc_msgSend_427Ptr = _lookup< + late final _SSLGetAllowsExpiredCertsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final ffi.Pointer _NSURLSessionTaskPriorityDefault = - _lookup('NSURLSessionTaskPriorityDefault'); - - double get NSURLSessionTaskPriorityDefault => - _NSURLSessionTaskPriorityDefault.value; - - set NSURLSessionTaskPriorityDefault(double value) => - _NSURLSessionTaskPriorityDefault.value = value; - - late final ffi.Pointer _NSURLSessionTaskPriorityLow = - _lookup('NSURLSessionTaskPriorityLow'); - - double get NSURLSessionTaskPriorityLow => _NSURLSessionTaskPriorityLow.value; - - set NSURLSessionTaskPriorityLow(double value) => - _NSURLSessionTaskPriorityLow.value = value; + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetAllowsExpiredCerts'); + late final _SSLGetAllowsExpiredCerts = _SSLGetAllowsExpiredCertsPtr + .asFunction)>(); - late final ffi.Pointer _NSURLSessionTaskPriorityHigh = - _lookup('NSURLSessionTaskPriorityHigh'); + int SSLSetAllowsExpiredRoots( + SSLContextRef context, + int allowsExpired, + ) { + return _SSLSetAllowsExpiredRoots( + context, + allowsExpired, + ); + } - double get NSURLSessionTaskPriorityHigh => - _NSURLSessionTaskPriorityHigh.value; + late final _SSLSetAllowsExpiredRootsPtr = + _lookup>( + 'SSLSetAllowsExpiredRoots'); + late final _SSLSetAllowsExpiredRoots = _SSLSetAllowsExpiredRootsPtr + .asFunction(); - set NSURLSessionTaskPriorityHigh(double value) => - _NSURLSessionTaskPriorityHigh.value = value; + int SSLGetAllowsExpiredRoots( + SSLContextRef context, + ffi.Pointer allowsExpired, + ) { + return _SSLGetAllowsExpiredRoots( + context, + allowsExpired, + ); + } - /// Key in the userInfo dictionary of an NSError received during a failed download. - late final ffi.Pointer> - _NSURLSessionDownloadTaskResumeData = - _lookup>('NSURLSessionDownloadTaskResumeData'); + late final _SSLGetAllowsExpiredRootsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetAllowsExpiredRoots'); + late final _SSLGetAllowsExpiredRoots = _SSLGetAllowsExpiredRootsPtr + .asFunction)>(); - ffi.Pointer get NSURLSessionDownloadTaskResumeData => - _NSURLSessionDownloadTaskResumeData.value; + int SSLSetAllowsAnyRoot( + SSLContextRef context, + int anyRoot, + ) { + return _SSLSetAllowsAnyRoot( + context, + anyRoot, + ); + } - set NSURLSessionDownloadTaskResumeData(ffi.Pointer value) => - _NSURLSessionDownloadTaskResumeData.value = value; + late final _SSLSetAllowsAnyRootPtr = + _lookup>( + 'SSLSetAllowsAnyRoot'); + late final _SSLSetAllowsAnyRoot = + _SSLSetAllowsAnyRootPtr.asFunction(); - late final _class_NSURLSessionTaskTransactionMetrics1 = - _getClass1("NSURLSessionTaskTransactionMetrics"); - late final _sel_request1 = _registerName1("request"); - late final _sel_fetchStartDate1 = _registerName1("fetchStartDate"); - late final _sel_domainLookupStartDate1 = - _registerName1("domainLookupStartDate"); - late final _sel_domainLookupEndDate1 = _registerName1("domainLookupEndDate"); - late final _sel_connectStartDate1 = _registerName1("connectStartDate"); - late final _sel_secureConnectionStartDate1 = - _registerName1("secureConnectionStartDate"); - late final _sel_secureConnectionEndDate1 = - _registerName1("secureConnectionEndDate"); - late final _sel_connectEndDate1 = _registerName1("connectEndDate"); - late final _sel_requestStartDate1 = _registerName1("requestStartDate"); - late final _sel_requestEndDate1 = _registerName1("requestEndDate"); - late final _sel_responseStartDate1 = _registerName1("responseStartDate"); - late final _sel_responseEndDate1 = _registerName1("responseEndDate"); - late final _sel_networkProtocolName1 = _registerName1("networkProtocolName"); - late final _sel_isProxyConnection1 = _registerName1("isProxyConnection"); - late final _sel_isReusedConnection1 = _registerName1("isReusedConnection"); - late final _sel_resourceFetchType1 = _registerName1("resourceFetchType"); - int _objc_msgSend_428( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLGetAllowsAnyRoot( + SSLContextRef context, + ffi.Pointer anyRoot, ) { - return __objc_msgSend_428( - obj, - sel, + return _SSLGetAllowsAnyRoot( + context, + anyRoot, ); } - late final __objc_msgSend_428Ptr = _lookup< + late final _SSLGetAllowsAnyRootPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetAllowsAnyRoot'); + late final _SSLGetAllowsAnyRoot = _SSLGetAllowsAnyRootPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_countOfRequestHeaderBytesSent1 = - _registerName1("countOfRequestHeaderBytesSent"); - late final _sel_countOfRequestBodyBytesSent1 = - _registerName1("countOfRequestBodyBytesSent"); - late final _sel_countOfRequestBodyBytesBeforeEncoding1 = - _registerName1("countOfRequestBodyBytesBeforeEncoding"); - late final _sel_countOfResponseHeaderBytesReceived1 = - _registerName1("countOfResponseHeaderBytesReceived"); - late final _sel_countOfResponseBodyBytesReceived1 = - _registerName1("countOfResponseBodyBytesReceived"); - late final _sel_countOfResponseBodyBytesAfterDecoding1 = - _registerName1("countOfResponseBodyBytesAfterDecoding"); - late final _sel_localAddress1 = _registerName1("localAddress"); - late final _sel_localPort1 = _registerName1("localPort"); - late final _sel_remoteAddress1 = _registerName1("remoteAddress"); - late final _sel_remotePort1 = _registerName1("remotePort"); - late final _sel_negotiatedTLSProtocolVersion1 = - _registerName1("negotiatedTLSProtocolVersion"); - late final _sel_negotiatedTLSCipherSuite1 = - _registerName1("negotiatedTLSCipherSuite"); - late final _sel_isCellular1 = _registerName1("isCellular"); - late final _sel_isExpensive1 = _registerName1("isExpensive"); - late final _sel_isConstrained1 = _registerName1("isConstrained"); - late final _sel_isMultipath1 = _registerName1("isMultipath"); - late final _sel_domainResolutionProtocol1 = - _registerName1("domainResolutionProtocol"); - int _objc_msgSend_429( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLSetTrustedRoots( + SSLContextRef context, + CFArrayRef trustedRoots, + int replaceExisting, ) { - return __objc_msgSend_429( - obj, - sel, + return _SSLSetTrustedRoots( + context, + trustedRoots, + replaceExisting, ); } - late final __objc_msgSend_429Ptr = _lookup< + late final _SSLSetTrustedRootsPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, CFArrayRef, Boolean)>>('SSLSetTrustedRoots'); + late final _SSLSetTrustedRoots = _SSLSetTrustedRootsPtr.asFunction< + int Function(SSLContextRef, CFArrayRef, int)>(); - late final _class_NSURLSessionTaskMetrics1 = - _getClass1("NSURLSessionTaskMetrics"); - late final _sel_transactionMetrics1 = _registerName1("transactionMetrics"); - late final _class_NSDateInterval1 = _getClass1("NSDateInterval"); - late final _sel_taskInterval1 = _registerName1("taskInterval"); - ffi.Pointer _objc_msgSend_430( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLCopyTrustedRoots( + SSLContextRef context, + ffi.Pointer trustedRoots, ) { - return __objc_msgSend_430( - obj, - sel, + return _SSLCopyTrustedRoots( + context, + trustedRoots, ); } - late final __objc_msgSend_430Ptr = _lookup< + late final _SSLCopyTrustedRootsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyTrustedRoots'); + late final _SSLCopyTrustedRoots = _SSLCopyTrustedRootsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_redirectCount1 = _registerName1("redirectCount"); - late final _class_NSItemProvider1 = _getClass1("NSItemProvider"); - late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = - _registerName1( - "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); - void _objc_msgSend_431( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, + int SSLCopyPeerCertificates( + SSLContextRef context, + ffi.Pointer certs, ) { - return __objc_msgSend_431( - obj, - sel, - typeIdentifier, - visibility, - loadHandler, + return _SSLCopyPeerCertificates( + context, + certs, ); } - late final __objc_msgSend_431Ptr = _lookup< + late final _SSLCopyPeerCertificatesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyPeerCertificates'); + late final _SSLCopyPeerCertificates = _SSLCopyPeerCertificatesPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = - _registerName1( - "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); - void _objc_msgSend_432( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int fileOptions, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, + int SSLCopyPeerTrust( + SSLContextRef context, + ffi.Pointer trust, ) { - return __objc_msgSend_432( - obj, - sel, - typeIdentifier, - fileOptions, - visibility, - loadHandler, + return _SSLCopyPeerTrust( + context, + trust, ); } - late final __objc_msgSend_432Ptr = _lookup< + late final _SSLCopyPeerTrustPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyPeerTrust'); + late final _SSLCopyPeerTrust = _SSLCopyPeerTrustPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_registeredTypeIdentifiers1 = - _registerName1("registeredTypeIdentifiers"); - late final _sel_registeredTypeIdentifiersWithFileOptions_1 = - _registerName1("registeredTypeIdentifiersWithFileOptions:"); - ffi.Pointer _objc_msgSend_433( - ffi.Pointer obj, - ffi.Pointer sel, - int fileOptions, + int SSLSetPeerID( + SSLContextRef context, + ffi.Pointer peerID, + int peerIDLen, ) { - return __objc_msgSend_433( - obj, - sel, - fileOptions, + return _SSLSetPeerID( + context, + peerID, + peerIDLen, ); } - late final __objc_msgSend_433Ptr = _lookup< + late final _SSLSetPeerIDPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer, ffi.Size)>>('SSLSetPeerID'); + late final _SSLSetPeerID = _SSLSetPeerIDPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - late final _sel_hasItemConformingToTypeIdentifier_1 = - _registerName1("hasItemConformingToTypeIdentifier:"); - late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = - _registerName1( - "hasRepresentationConformingToTypeIdentifier:fileOptions:"); - bool _objc_msgSend_434( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int fileOptions, + int SSLGetPeerID( + SSLContextRef context, + ffi.Pointer> peerID, + ffi.Pointer peerIDLen, ) { - return __objc_msgSend_434( - obj, - sel, - typeIdentifier, - fileOptions, + return _SSLGetPeerID( + context, + peerID, + peerIDLen, ); } - late final __objc_msgSend_434Ptr = _lookup< + late final _SSLGetPeerIDPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + OSStatus Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>>('SSLGetPeerID'); + late final _SSLGetPeerID = _SSLGetPeerIDPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>(); - late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadDataRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_435( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLGetNegotiatedCipher( + SSLContextRef context, + ffi.Pointer cipherSuite, ) { - return __objc_msgSend_435( - obj, - sel, - typeIdentifier, - completionHandler, + return _SSLGetNegotiatedCipher( + context, + cipherSuite, ); } - late final __objc_msgSend_435Ptr = _lookup< + late final _SSLGetNegotiatedCipherPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNegotiatedCipher'); + late final _SSLGetNegotiatedCipher = _SSLGetNegotiatedCipherPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_436( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetALPNProtocols( + SSLContextRef context, + CFArrayRef protocols, ) { - return __objc_msgSend_436( - obj, - sel, - typeIdentifier, - completionHandler, + return _SSLSetALPNProtocols( + context, + protocols, ); } - late final __objc_msgSend_436Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetALPNProtocolsPtr = + _lookup>( + 'SSLSetALPNProtocols'); + late final _SSLSetALPNProtocols = _SSLSetALPNProtocolsPtr.asFunction< + int Function(SSLContextRef, CFArrayRef)>(); - late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_437( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLCopyALPNProtocols( + SSLContextRef context, + ffi.Pointer protocols, ) { - return __objc_msgSend_437( - obj, - sel, - typeIdentifier, - completionHandler, + return _SSLCopyALPNProtocols( + context, + protocols, ); } - late final __objc_msgSend_437Ptr = _lookup< + late final _SSLCopyALPNProtocolsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyALPNProtocols'); + late final _SSLCopyALPNProtocols = _SSLCopyALPNProtocolsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_suggestedName1 = _registerName1("suggestedName"); - late final _sel_setSuggestedName_1 = _registerName1("setSuggestedName:"); - late final _sel_initWithObject_1 = _registerName1("initWithObject:"); - late final _sel_registerObject_visibility_1 = - _registerName1("registerObject:visibility:"); - void _objc_msgSend_438( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - int visibility, + int SSLSetOCSPResponse( + SSLContextRef context, + CFDataRef response, ) { - return __objc_msgSend_438( - obj, - sel, - object, - visibility, + return _SSLSetOCSPResponse( + context, + response, ); } - late final __objc_msgSend_438Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _SSLSetOCSPResponsePtr = + _lookup>( + 'SSLSetOCSPResponse'); + late final _SSLSetOCSPResponse = _SSLSetOCSPResponsePtr.asFunction< + int Function(SSLContextRef, CFDataRef)>(); - late final _sel_registerObjectOfClass_visibility_loadHandler_1 = - _registerName1("registerObjectOfClass:visibility:loadHandler:"); - void _objc_msgSend_439( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, + int SSLSetEncryptionCertificate( + SSLContextRef context, + CFArrayRef certRefs, ) { - return __objc_msgSend_439( - obj, - sel, - aClass, - visibility, - loadHandler, + return _SSLSetEncryptionCertificate( + context, + certRefs, ); } - late final __objc_msgSend_439Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetEncryptionCertificatePtr = + _lookup>( + 'SSLSetEncryptionCertificate'); + late final _SSLSetEncryptionCertificate = _SSLSetEncryptionCertificatePtr + .asFunction(); - late final _sel_canLoadObjectOfClass_1 = - _registerName1("canLoadObjectOfClass:"); - late final _sel_loadObjectOfClass_completionHandler_1 = - _registerName1("loadObjectOfClass:completionHandler:"); - ffi.Pointer _objc_msgSend_440( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetClientSideAuthenticate( + SSLContextRef context, + int auth, ) { - return __objc_msgSend_440( - obj, - sel, - aClass, - completionHandler, + return _SSLSetClientSideAuthenticate( + context, + auth, ); } - late final __objc_msgSend_440Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetClientSideAuthenticatePtr = + _lookup>( + 'SSLSetClientSideAuthenticate'); + late final _SSLSetClientSideAuthenticate = _SSLSetClientSideAuthenticatePtr + .asFunction(); - late final _sel_initWithItem_typeIdentifier_1 = - _registerName1("initWithItem:typeIdentifier:"); - instancetype _objc_msgSend_441( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer item, - ffi.Pointer typeIdentifier, + int SSLAddDistinguishedName( + SSLContextRef context, + ffi.Pointer derDN, + int derDNLen, ) { - return __objc_msgSend_441( - obj, - sel, - item, - typeIdentifier, + return _SSLAddDistinguishedName( + context, + derDN, + derDNLen, ); } - late final __objc_msgSend_441Ptr = _lookup< + late final _SSLAddDistinguishedNamePtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLAddDistinguishedName'); + late final _SSLAddDistinguishedName = _SSLAddDistinguishedNamePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - late final _sel_registerItemForTypeIdentifier_loadHandler_1 = - _registerName1("registerItemForTypeIdentifier:loadHandler:"); - void _objc_msgSend_442( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - NSItemProviderLoadHandler loadHandler, + int SSLSetCertificateAuthorities( + SSLContextRef context, + CFTypeRef certificateOrArray, + int replaceExisting, ) { - return __objc_msgSend_442( - obj, - sel, - typeIdentifier, - loadHandler, + return _SSLSetCertificateAuthorities( + context, + certificateOrArray, + replaceExisting, ); } - late final __objc_msgSend_442Ptr = _lookup< + late final _SSLSetCertificateAuthoritiesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSItemProviderLoadHandler)>(); + OSStatus Function(SSLContextRef, CFTypeRef, + Boolean)>>('SSLSetCertificateAuthorities'); + late final _SSLSetCertificateAuthorities = _SSLSetCertificateAuthoritiesPtr + .asFunction(); - late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = - _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); - void _objc_msgSend_443( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer options, - NSItemProviderCompletionHandler completionHandler, + int SSLCopyCertificateAuthorities( + SSLContextRef context, + ffi.Pointer certificates, ) { - return __objc_msgSend_443( - obj, - sel, - typeIdentifier, - options, - completionHandler, + return _SSLCopyCertificateAuthorities( + context, + certificates, ); } - late final __objc_msgSend_443Ptr = _lookup< + late final _SSLCopyCertificateAuthoritiesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSItemProviderCompletionHandler)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyCertificateAuthorities'); + late final _SSLCopyCertificateAuthorities = _SSLCopyCertificateAuthoritiesPtr + .asFunction)>(); - late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); - NSItemProviderLoadHandler _objc_msgSend_444( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLCopyDistinguishedNames( + SSLContextRef context, + ffi.Pointer names, ) { - return __objc_msgSend_444( - obj, - sel, + return _SSLCopyDistinguishedNames( + context, + names, ); } - late final __objc_msgSend_444Ptr = _lookup< + late final _SSLCopyDistinguishedNamesPtr = _lookup< ffi.NativeFunction< - NSItemProviderLoadHandler Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< - NSItemProviderLoadHandler Function( - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyDistinguishedNames'); + late final _SSLCopyDistinguishedNames = _SSLCopyDistinguishedNamesPtr + .asFunction)>(); - late final _sel_setPreviewImageHandler_1 = - _registerName1("setPreviewImageHandler:"); - void _objc_msgSend_445( - ffi.Pointer obj, - ffi.Pointer sel, - NSItemProviderLoadHandler value, + int SSLGetClientCertificateState( + SSLContextRef context, + ffi.Pointer clientState, ) { - return __objc_msgSend_445( - obj, - sel, - value, + return _SSLGetClientCertificateState( + context, + clientState, ); } - late final __objc_msgSend_445Ptr = _lookup< + late final _SSLGetClientCertificateStatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSItemProviderLoadHandler)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetClientCertificateState'); + late final _SSLGetClientCertificateState = _SSLGetClientCertificateStatePtr + .asFunction)>(); - late final _sel_loadPreviewImageWithOptions_completionHandler_1 = - _registerName1("loadPreviewImageWithOptions:completionHandler:"); - void _objc_msgSend_446( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer options, - NSItemProviderCompletionHandler completionHandler, + int SSLSetDiffieHellmanParams( + SSLContextRef context, + ffi.Pointer dhParams, + int dhParamsLen, ) { - return __objc_msgSend_446( - obj, - sel, - options, - completionHandler, + return _SSLSetDiffieHellmanParams( + context, + dhParams, + dhParamsLen, ); } - late final __objc_msgSend_446Ptr = _lookup< + late final _SSLSetDiffieHellmanParamsPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSItemProviderCompletionHandler)>(); - - late final ffi.Pointer> - _NSItemProviderPreferredImageSizeKey = - _lookup>('NSItemProviderPreferredImageSizeKey'); - - ffi.Pointer get NSItemProviderPreferredImageSizeKey => - _NSItemProviderPreferredImageSizeKey.value; + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetDiffieHellmanParams'); + late final _SSLSetDiffieHellmanParams = _SSLSetDiffieHellmanParamsPtr + .asFunction, int)>(); - set NSItemProviderPreferredImageSizeKey(ffi.Pointer value) => - _NSItemProviderPreferredImageSizeKey.value = value; + int SSLGetDiffieHellmanParams( + SSLContextRef context, + ffi.Pointer> dhParams, + ffi.Pointer dhParamsLen, + ) { + return _SSLGetDiffieHellmanParams( + context, + dhParams, + dhParamsLen, + ); + } - late final ffi.Pointer> - _NSExtensionJavaScriptPreprocessingResultsKey = - _lookup>( - 'NSExtensionJavaScriptPreprocessingResultsKey'); + late final _SSLGetDiffieHellmanParamsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>>('SSLGetDiffieHellmanParams'); + late final _SSLGetDiffieHellmanParams = + _SSLGetDiffieHellmanParamsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>(); - ffi.Pointer get NSExtensionJavaScriptPreprocessingResultsKey => - _NSExtensionJavaScriptPreprocessingResultsKey.value; - - set NSExtensionJavaScriptPreprocessingResultsKey( - ffi.Pointer value) => - _NSExtensionJavaScriptPreprocessingResultsKey.value = value; - - late final ffi.Pointer> - _NSExtensionJavaScriptFinalizeArgumentKey = - _lookup>( - 'NSExtensionJavaScriptFinalizeArgumentKey'); - - ffi.Pointer get NSExtensionJavaScriptFinalizeArgumentKey => - _NSExtensionJavaScriptFinalizeArgumentKey.value; - - set NSExtensionJavaScriptFinalizeArgumentKey(ffi.Pointer value) => - _NSExtensionJavaScriptFinalizeArgumentKey.value = value; - - late final ffi.Pointer> _NSItemProviderErrorDomain = - _lookup>('NSItemProviderErrorDomain'); - - ffi.Pointer get NSItemProviderErrorDomain => - _NSItemProviderErrorDomain.value; - - set NSItemProviderErrorDomain(ffi.Pointer value) => - _NSItemProviderErrorDomain.value = value; - - late final ffi.Pointer _NSStringTransformLatinToKatakana = - _lookup('NSStringTransformLatinToKatakana'); - - NSStringTransform get NSStringTransformLatinToKatakana => - _NSStringTransformLatinToKatakana.value; - - set NSStringTransformLatinToKatakana(NSStringTransform value) => - _NSStringTransformLatinToKatakana.value = value; - - late final ffi.Pointer _NSStringTransformLatinToHiragana = - _lookup('NSStringTransformLatinToHiragana'); - - NSStringTransform get NSStringTransformLatinToHiragana => - _NSStringTransformLatinToHiragana.value; - - set NSStringTransformLatinToHiragana(NSStringTransform value) => - _NSStringTransformLatinToHiragana.value = value; - - late final ffi.Pointer _NSStringTransformLatinToHangul = - _lookup('NSStringTransformLatinToHangul'); - - NSStringTransform get NSStringTransformLatinToHangul => - _NSStringTransformLatinToHangul.value; - - set NSStringTransformLatinToHangul(NSStringTransform value) => - _NSStringTransformLatinToHangul.value = value; - - late final ffi.Pointer _NSStringTransformLatinToArabic = - _lookup('NSStringTransformLatinToArabic'); - - NSStringTransform get NSStringTransformLatinToArabic => - _NSStringTransformLatinToArabic.value; - - set NSStringTransformLatinToArabic(NSStringTransform value) => - _NSStringTransformLatinToArabic.value = value; - - late final ffi.Pointer _NSStringTransformLatinToHebrew = - _lookup('NSStringTransformLatinToHebrew'); - - NSStringTransform get NSStringTransformLatinToHebrew => - _NSStringTransformLatinToHebrew.value; - - set NSStringTransformLatinToHebrew(NSStringTransform value) => - _NSStringTransformLatinToHebrew.value = value; - - late final ffi.Pointer _NSStringTransformLatinToThai = - _lookup('NSStringTransformLatinToThai'); - - NSStringTransform get NSStringTransformLatinToThai => - _NSStringTransformLatinToThai.value; - - set NSStringTransformLatinToThai(NSStringTransform value) => - _NSStringTransformLatinToThai.value = value; - - late final ffi.Pointer _NSStringTransformLatinToCyrillic = - _lookup('NSStringTransformLatinToCyrillic'); - - NSStringTransform get NSStringTransformLatinToCyrillic => - _NSStringTransformLatinToCyrillic.value; - - set NSStringTransformLatinToCyrillic(NSStringTransform value) => - _NSStringTransformLatinToCyrillic.value = value; - - late final ffi.Pointer _NSStringTransformLatinToGreek = - _lookup('NSStringTransformLatinToGreek'); - - NSStringTransform get NSStringTransformLatinToGreek => - _NSStringTransformLatinToGreek.value; - - set NSStringTransformLatinToGreek(NSStringTransform value) => - _NSStringTransformLatinToGreek.value = value; - - late final ffi.Pointer _NSStringTransformToLatin = - _lookup('NSStringTransformToLatin'); - - NSStringTransform get NSStringTransformToLatin => - _NSStringTransformToLatin.value; - - set NSStringTransformToLatin(NSStringTransform value) => - _NSStringTransformToLatin.value = value; - - late final ffi.Pointer _NSStringTransformMandarinToLatin = - _lookup('NSStringTransformMandarinToLatin'); - - NSStringTransform get NSStringTransformMandarinToLatin => - _NSStringTransformMandarinToLatin.value; - - set NSStringTransformMandarinToLatin(NSStringTransform value) => - _NSStringTransformMandarinToLatin.value = value; - - late final ffi.Pointer - _NSStringTransformHiraganaToKatakana = - _lookup('NSStringTransformHiraganaToKatakana'); - - NSStringTransform get NSStringTransformHiraganaToKatakana => - _NSStringTransformHiraganaToKatakana.value; - - set NSStringTransformHiraganaToKatakana(NSStringTransform value) => - _NSStringTransformHiraganaToKatakana.value = value; - - late final ffi.Pointer - _NSStringTransformFullwidthToHalfwidth = - _lookup('NSStringTransformFullwidthToHalfwidth'); - - NSStringTransform get NSStringTransformFullwidthToHalfwidth => - _NSStringTransformFullwidthToHalfwidth.value; - - set NSStringTransformFullwidthToHalfwidth(NSStringTransform value) => - _NSStringTransformFullwidthToHalfwidth.value = value; - - late final ffi.Pointer _NSStringTransformToXMLHex = - _lookup('NSStringTransformToXMLHex'); - - NSStringTransform get NSStringTransformToXMLHex => - _NSStringTransformToXMLHex.value; - - set NSStringTransformToXMLHex(NSStringTransform value) => - _NSStringTransformToXMLHex.value = value; - - late final ffi.Pointer _NSStringTransformToUnicodeName = - _lookup('NSStringTransformToUnicodeName'); - - NSStringTransform get NSStringTransformToUnicodeName => - _NSStringTransformToUnicodeName.value; - - set NSStringTransformToUnicodeName(NSStringTransform value) => - _NSStringTransformToUnicodeName.value = value; - - late final ffi.Pointer - _NSStringTransformStripCombiningMarks = - _lookup('NSStringTransformStripCombiningMarks'); - - NSStringTransform get NSStringTransformStripCombiningMarks => - _NSStringTransformStripCombiningMarks.value; - - set NSStringTransformStripCombiningMarks(NSStringTransform value) => - _NSStringTransformStripCombiningMarks.value = value; - - late final ffi.Pointer _NSStringTransformStripDiacritics = - _lookup('NSStringTransformStripDiacritics'); - - NSStringTransform get NSStringTransformStripDiacritics => - _NSStringTransformStripDiacritics.value; + int SSLSetRsaBlinding( + SSLContextRef context, + int blinding, + ) { + return _SSLSetRsaBlinding( + context, + blinding, + ); + } - set NSStringTransformStripDiacritics(NSStringTransform value) => - _NSStringTransformStripDiacritics.value = value; + late final _SSLSetRsaBlindingPtr = + _lookup>( + 'SSLSetRsaBlinding'); + late final _SSLSetRsaBlinding = + _SSLSetRsaBlindingPtr.asFunction(); - late final ffi.Pointer - _NSStringEncodingDetectionSuggestedEncodingsKey = - _lookup( - 'NSStringEncodingDetectionSuggestedEncodingsKey'); + int SSLGetRsaBlinding( + SSLContextRef context, + ffi.Pointer blinding, + ) { + return _SSLGetRsaBlinding( + context, + blinding, + ); + } - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionSuggestedEncodingsKey => - _NSStringEncodingDetectionSuggestedEncodingsKey.value; + late final _SSLGetRsaBlindingPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetRsaBlinding'); + late final _SSLGetRsaBlinding = _SSLGetRsaBlindingPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - set NSStringEncodingDetectionSuggestedEncodingsKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionSuggestedEncodingsKey.value = value; + int SSLHandshake( + SSLContextRef context, + ) { + return _SSLHandshake( + context, + ); + } - late final ffi.Pointer - _NSStringEncodingDetectionDisallowedEncodingsKey = - _lookup( - 'NSStringEncodingDetectionDisallowedEncodingsKey'); + late final _SSLHandshakePtr = + _lookup>( + 'SSLHandshake'); + late final _SSLHandshake = + _SSLHandshakePtr.asFunction(); - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionDisallowedEncodingsKey => - _NSStringEncodingDetectionDisallowedEncodingsKey.value; + int SSLReHandshake( + SSLContextRef context, + ) { + return _SSLReHandshake( + context, + ); + } - set NSStringEncodingDetectionDisallowedEncodingsKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionDisallowedEncodingsKey.value = value; + late final _SSLReHandshakePtr = + _lookup>( + 'SSLReHandshake'); + late final _SSLReHandshake = + _SSLReHandshakePtr.asFunction(); - late final ffi.Pointer - _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey = - _lookup( - 'NSStringEncodingDetectionUseOnlySuggestedEncodingsKey'); + int SSLWrite( + SSLContextRef context, + ffi.Pointer data, + int dataLength, + ffi.Pointer processed, + ) { + return _SSLWrite( + context, + data, + dataLength, + processed, + ); + } - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionUseOnlySuggestedEncodingsKey => - _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value; + late final _SSLWritePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, + ffi.Pointer)>>('SSLWrite'); + late final _SSLWrite = _SSLWritePtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); - set NSStringEncodingDetectionUseOnlySuggestedEncodingsKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value = value; + int SSLRead( + SSLContextRef context, + ffi.Pointer data, + int dataLength, + ffi.Pointer processed, + ) { + return _SSLRead( + context, + data, + dataLength, + processed, + ); + } - late final ffi.Pointer - _NSStringEncodingDetectionAllowLossyKey = - _lookup( - 'NSStringEncodingDetectionAllowLossyKey'); + late final _SSLReadPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, + ffi.Pointer)>>('SSLRead'); + late final _SSLRead = _SSLReadPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionAllowLossyKey => - _NSStringEncodingDetectionAllowLossyKey.value; + int SSLGetBufferedReadSize( + SSLContextRef context, + ffi.Pointer bufferSize, + ) { + return _SSLGetBufferedReadSize( + context, + bufferSize, + ); + } - set NSStringEncodingDetectionAllowLossyKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionAllowLossyKey.value = value; + late final _SSLGetBufferedReadSizePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetBufferedReadSize'); + late final _SSLGetBufferedReadSize = _SSLGetBufferedReadSizePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final ffi.Pointer - _NSStringEncodingDetectionFromWindowsKey = - _lookup( - 'NSStringEncodingDetectionFromWindowsKey'); + int SSLGetDatagramWriteSize( + SSLContextRef dtlsContext, + ffi.Pointer bufSize, + ) { + return _SSLGetDatagramWriteSize( + dtlsContext, + bufSize, + ); + } - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionFromWindowsKey => - _NSStringEncodingDetectionFromWindowsKey.value; + late final _SSLGetDatagramWriteSizePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetDatagramWriteSize'); + late final _SSLGetDatagramWriteSize = _SSLGetDatagramWriteSizePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - set NSStringEncodingDetectionFromWindowsKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionFromWindowsKey.value = value; + int SSLClose( + SSLContextRef context, + ) { + return _SSLClose( + context, + ); + } - late final ffi.Pointer - _NSStringEncodingDetectionLossySubstitutionKey = - _lookup( - 'NSStringEncodingDetectionLossySubstitutionKey'); + late final _SSLClosePtr = + _lookup>('SSLClose'); + late final _SSLClose = _SSLClosePtr.asFunction(); - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionLossySubstitutionKey => - _NSStringEncodingDetectionLossySubstitutionKey.value; + int SSLSetError( + SSLContextRef context, + int status, + ) { + return _SSLSetError( + context, + status, + ); + } - set NSStringEncodingDetectionLossySubstitutionKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionLossySubstitutionKey.value = value; + late final _SSLSetErrorPtr = + _lookup>( + 'SSLSetError'); + late final _SSLSetError = + _SSLSetErrorPtr.asFunction(); - late final ffi.Pointer - _NSStringEncodingDetectionLikelyLanguageKey = - _lookup( - 'NSStringEncodingDetectionLikelyLanguageKey'); + /// -1LL + late final ffi.Pointer _NSURLSessionTransferSizeUnknown = + _lookup('NSURLSessionTransferSizeUnknown'); - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionLikelyLanguageKey => - _NSStringEncodingDetectionLikelyLanguageKey.value; + int get NSURLSessionTransferSizeUnknown => + _NSURLSessionTransferSizeUnknown.value; - set NSStringEncodingDetectionLikelyLanguageKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionLikelyLanguageKey.value = value; + set NSURLSessionTransferSizeUnknown(int value) => + _NSURLSessionTransferSizeUnknown.value = value; - late final _class_NSMutableString1 = _getClass1("NSMutableString"); - late final _sel_replaceCharactersInRange_withString_1 = - _registerName1("replaceCharactersInRange:withString:"); - void _objc_msgSend_447( + late final _class_NSURLSession1 = _getClass1("NSURLSession"); + late final _sel_sharedSession1 = _registerName1("sharedSession"); + ffi.Pointer _objc_msgSend_387( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer aString, ) { - return __objc_msgSend_447( + return __objc_msgSend_387( obj, sel, - range, - aString, ); } - late final __objc_msgSend_447Ptr = _lookup< + late final __objc_msgSend_387Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_insertString_atIndex_1 = - _registerName1("insertString:atIndex:"); - void _objc_msgSend_448( + late final _class_NSURLSessionConfiguration1 = + _getClass1("NSURLSessionConfiguration"); + late final _sel_defaultSessionConfiguration1 = + _registerName1("defaultSessionConfiguration"); + ffi.Pointer _objc_msgSend_388( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aString, - int loc, ) { - return __objc_msgSend_448( + return __objc_msgSend_388( obj, sel, - aString, - loc, ); } - late final __objc_msgSend_448Ptr = _lookup< + late final __objc_msgSend_388Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_deleteCharactersInRange_1 = - _registerName1("deleteCharactersInRange:"); - late final _sel_appendString_1 = _registerName1("appendString:"); - late final _sel_appendFormat_1 = _registerName1("appendFormat:"); - late final _sel_setString_1 = _registerName1("setString:"); - late final _sel_replaceOccurrencesOfString_withString_options_range_1 = - _registerName1("replaceOccurrencesOfString:withString:options:range:"); - int _objc_msgSend_449( + late final _sel_ephemeralSessionConfiguration1 = + _registerName1("ephemeralSessionConfiguration"); + late final _sel_backgroundSessionConfigurationWithIdentifier_1 = + _registerName1("backgroundSessionConfigurationWithIdentifier:"); + ffi.Pointer _objc_msgSend_389( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - NSRange searchRange, + ffi.Pointer identifier, ) { - return __objc_msgSend_449( + return __objc_msgSend_389( obj, sel, - target, - replacement, - options, - searchRange, + identifier, ); } - late final __objc_msgSend_449Ptr = _lookup< + late final __objc_msgSend_389Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, NSRange)>(); - - late final _sel_applyTransform_reverse_range_updatedRange_1 = - _registerName1("applyTransform:reverse:range:updatedRange:"); - bool _objc_msgSend_450( - ffi.Pointer obj, - ffi.Pointer sel, - NSStringTransform transform, - bool reverse, - NSRange range, - NSRangePointer resultingRange, - ) { - return __objc_msgSend_450( - obj, - sel, - transform, - reverse, - range, - resultingRange, - ); - } + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final __objc_msgSend_450Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - NSStringTransform, - ffi.Bool, - NSRange, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - NSStringTransform, bool, NSRange, NSRangePointer)>(); - - ffi.Pointer _objc_msgSend_451( + late final _sel_identifier1 = _registerName1("identifier"); + late final _sel_requestCachePolicy1 = _registerName1("requestCachePolicy"); + late final _sel_setRequestCachePolicy_1 = + _registerName1("setRequestCachePolicy:"); + late final _sel_timeoutIntervalForRequest1 = + _registerName1("timeoutIntervalForRequest"); + late final _sel_setTimeoutIntervalForRequest_1 = + _registerName1("setTimeoutIntervalForRequest:"); + late final _sel_timeoutIntervalForResource1 = + _registerName1("timeoutIntervalForResource"); + late final _sel_setTimeoutIntervalForResource_1 = + _registerName1("setTimeoutIntervalForResource:"); + late final _sel_waitsForConnectivity1 = + _registerName1("waitsForConnectivity"); + late final _sel_setWaitsForConnectivity_1 = + _registerName1("setWaitsForConnectivity:"); + late final _sel_isDiscretionary1 = _registerName1("isDiscretionary"); + late final _sel_setDiscretionary_1 = _registerName1("setDiscretionary:"); + late final _sel_sharedContainerIdentifier1 = + _registerName1("sharedContainerIdentifier"); + late final _sel_setSharedContainerIdentifier_1 = + _registerName1("setSharedContainerIdentifier:"); + late final _sel_sessionSendsLaunchEvents1 = + _registerName1("sessionSendsLaunchEvents"); + late final _sel_setSessionSendsLaunchEvents_1 = + _registerName1("setSessionSendsLaunchEvents:"); + late final _sel_connectionProxyDictionary1 = + _registerName1("connectionProxyDictionary"); + late final _sel_setConnectionProxyDictionary_1 = + _registerName1("setConnectionProxyDictionary:"); + late final _sel_TLSMinimumSupportedProtocol1 = + _registerName1("TLSMinimumSupportedProtocol"); + int _objc_msgSend_390( ffi.Pointer obj, ffi.Pointer sel, - int capacity, ) { - return __objc_msgSend_451( + return __objc_msgSend_390( obj, sel, - capacity, ); } - late final __objc_msgSend_451Ptr = _lookup< + late final __objc_msgSend_390Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_stringWithCapacity_1 = _registerName1("stringWithCapacity:"); - late final ffi.Pointer _NSCharacterConversionException = - _lookup('NSCharacterConversionException'); + late final _sel_setTLSMinimumSupportedProtocol_1 = + _registerName1("setTLSMinimumSupportedProtocol:"); + void _objc_msgSend_391( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_391( + obj, + sel, + value, + ); + } - NSExceptionName get NSCharacterConversionException => - _NSCharacterConversionException.value; + late final __objc_msgSend_391Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - set NSCharacterConversionException(NSExceptionName value) => - _NSCharacterConversionException.value = value; + late final _sel_TLSMaximumSupportedProtocol1 = + _registerName1("TLSMaximumSupportedProtocol"); + late final _sel_setTLSMaximumSupportedProtocol_1 = + _registerName1("setTLSMaximumSupportedProtocol:"); + late final _sel_TLSMinimumSupportedProtocolVersion1 = + _registerName1("TLSMinimumSupportedProtocolVersion"); + int _objc_msgSend_392( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_392( + obj, + sel, + ); + } - late final ffi.Pointer _NSParseErrorException = - _lookup('NSParseErrorException'); + late final __objc_msgSend_392Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - NSExceptionName get NSParseErrorException => _NSParseErrorException.value; + late final _sel_setTLSMinimumSupportedProtocolVersion_1 = + _registerName1("setTLSMinimumSupportedProtocolVersion:"); + void _objc_msgSend_393( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_393( + obj, + sel, + value, + ); + } - set NSParseErrorException(NSExceptionName value) => - _NSParseErrorException.value = value; + late final __objc_msgSend_393Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _class_NSSimpleCString1 = _getClass1("NSSimpleCString"); - late final _class_NSConstantString1 = _getClass1("NSConstantString"); - late final _class_NSMutableCharacterSet1 = - _getClass1("NSMutableCharacterSet"); - late final _sel_addCharactersInRange_1 = - _registerName1("addCharactersInRange:"); - late final _sel_removeCharactersInRange_1 = - _registerName1("removeCharactersInRange:"); - late final _sel_addCharactersInString_1 = - _registerName1("addCharactersInString:"); - late final _sel_removeCharactersInString_1 = - _registerName1("removeCharactersInString:"); - late final _sel_formUnionWithCharacterSet_1 = - _registerName1("formUnionWithCharacterSet:"); - void _objc_msgSend_452( + late final _sel_TLSMaximumSupportedProtocolVersion1 = + _registerName1("TLSMaximumSupportedProtocolVersion"); + late final _sel_setTLSMaximumSupportedProtocolVersion_1 = + _registerName1("setTLSMaximumSupportedProtocolVersion:"); + late final _sel_HTTPShouldSetCookies1 = + _registerName1("HTTPShouldSetCookies"); + late final _sel_setHTTPShouldSetCookies_1 = + _registerName1("setHTTPShouldSetCookies:"); + late final _sel_HTTPCookieAcceptPolicy1 = + _registerName1("HTTPCookieAcceptPolicy"); + late final _sel_setHTTPCookieAcceptPolicy_1 = + _registerName1("setHTTPCookieAcceptPolicy:"); + late final _sel_HTTPAdditionalHeaders1 = + _registerName1("HTTPAdditionalHeaders"); + late final _sel_setHTTPAdditionalHeaders_1 = + _registerName1("setHTTPAdditionalHeaders:"); + late final _sel_HTTPMaximumConnectionsPerHost1 = + _registerName1("HTTPMaximumConnectionsPerHost"); + late final _sel_setHTTPMaximumConnectionsPerHost_1 = + _registerName1("setHTTPMaximumConnectionsPerHost:"); + late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); + late final _sel_setHTTPCookieStorage_1 = + _registerName1("setHTTPCookieStorage:"); + void _objc_msgSend_394( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherSet, + ffi.Pointer value, ) { - return __objc_msgSend_452( + return __objc_msgSend_394( obj, sel, - otherSet, + value, ); } - late final __objc_msgSend_452Ptr = _lookup< + late final __objc_msgSend_394Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< + late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_formIntersectionWithCharacterSet_1 = - _registerName1("formIntersectionWithCharacterSet:"); - late final _sel_invert1 = _registerName1("invert"); - ffi.Pointer _objc_msgSend_453( + late final _class_NSURLCredentialStorage1 = + _getClass1("NSURLCredentialStorage"); + late final _sel_URLCredentialStorage1 = + _registerName1("URLCredentialStorage"); + ffi.Pointer _objc_msgSend_395( ffi.Pointer obj, ffi.Pointer sel, - NSRange aRange, ) { - return __objc_msgSend_453( + return __objc_msgSend_395( obj, sel, - aRange, ); } - late final __objc_msgSend_453Ptr = _lookup< + late final __objc_msgSend_395Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_454( + late final _sel_setURLCredentialStorage_1 = + _registerName1("setURLCredentialStorage:"); + void _objc_msgSend_396( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aString, + ffi.Pointer value, ) { - return __objc_msgSend_454( + return __objc_msgSend_396( obj, sel, - aString, + value, ); } - late final __objc_msgSend_454Ptr = _lookup< + late final __objc_msgSend_396Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_455( + late final _class_NSURLCache1 = _getClass1("NSURLCache"); + late final _sel_URLCache1 = _registerName1("URLCache"); + ffi.Pointer _objc_msgSend_397( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, ) { - return __objc_msgSend_455( + return __objc_msgSend_397( obj, sel, - data, ); } - late final __objc_msgSend_455Ptr = _lookup< + late final __objc_msgSend_397Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final ffi.Pointer> _NSHTTPPropertyStatusCodeKey = - _lookup>('NSHTTPPropertyStatusCodeKey'); + late final _sel_setURLCache_1 = _registerName1("setURLCache:"); + void _objc_msgSend_398( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_398( + obj, + sel, + value, + ); + } - ffi.Pointer get NSHTTPPropertyStatusCodeKey => - _NSHTTPPropertyStatusCodeKey.value; + late final __objc_msgSend_398Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - set NSHTTPPropertyStatusCodeKey(ffi.Pointer value) => - _NSHTTPPropertyStatusCodeKey.value = value; + late final _sel_shouldUseExtendedBackgroundIdleMode1 = + _registerName1("shouldUseExtendedBackgroundIdleMode"); + late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = + _registerName1("setShouldUseExtendedBackgroundIdleMode:"); + late final _sel_protocolClasses1 = _registerName1("protocolClasses"); + late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); + void _objc_msgSend_399( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_399( + obj, + sel, + value, + ); + } - late final ffi.Pointer> - _NSHTTPPropertyStatusReasonKey = - _lookup>('NSHTTPPropertyStatusReasonKey'); + late final __objc_msgSend_399Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer get NSHTTPPropertyStatusReasonKey => - _NSHTTPPropertyStatusReasonKey.value; + late final _sel_multipathServiceType1 = + _registerName1("multipathServiceType"); + int _objc_msgSend_400( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_400( + obj, + sel, + ); + } - set NSHTTPPropertyStatusReasonKey(ffi.Pointer value) => - _NSHTTPPropertyStatusReasonKey.value = value; + late final __objc_msgSend_400Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final ffi.Pointer> - _NSHTTPPropertyServerHTTPVersionKey = - _lookup>('NSHTTPPropertyServerHTTPVersionKey'); + late final _sel_setMultipathServiceType_1 = + _registerName1("setMultipathServiceType:"); + void _objc_msgSend_401( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_401( + obj, + sel, + value, + ); + } - ffi.Pointer get NSHTTPPropertyServerHTTPVersionKey => - _NSHTTPPropertyServerHTTPVersionKey.value; + late final __objc_msgSend_401Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - set NSHTTPPropertyServerHTTPVersionKey(ffi.Pointer value) => - _NSHTTPPropertyServerHTTPVersionKey.value = value; + late final _sel_backgroundSessionConfiguration_1 = + _registerName1("backgroundSessionConfiguration:"); + late final _sel_sessionWithConfiguration_1 = + _registerName1("sessionWithConfiguration:"); + ffi.Pointer _objc_msgSend_402( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer configuration, + ) { + return __objc_msgSend_402( + obj, + sel, + configuration, + ); + } - late final ffi.Pointer> - _NSHTTPPropertyRedirectionHeadersKey = - _lookup>('NSHTTPPropertyRedirectionHeadersKey'); + late final __objc_msgSend_402Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer get NSHTTPPropertyRedirectionHeadersKey => - _NSHTTPPropertyRedirectionHeadersKey.value; + late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = + _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); + ffi.Pointer _objc_msgSend_403( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer configuration, + ffi.Pointer delegate, + ffi.Pointer queue, + ) { + return __objc_msgSend_403( + obj, + sel, + configuration, + delegate, + queue, + ); + } - set NSHTTPPropertyRedirectionHeadersKey(ffi.Pointer value) => - _NSHTTPPropertyRedirectionHeadersKey.value = value; + late final __objc_msgSend_403Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final ffi.Pointer> - _NSHTTPPropertyErrorPageDataKey = - _lookup>('NSHTTPPropertyErrorPageDataKey'); + late final _sel_delegateQueue1 = _registerName1("delegateQueue"); + late final _sel_configuration1 = _registerName1("configuration"); + late final _sel_sessionDescription1 = _registerName1("sessionDescription"); + late final _sel_setSessionDescription_1 = + _registerName1("setSessionDescription:"); + late final _sel_finishTasksAndInvalidate1 = + _registerName1("finishTasksAndInvalidate"); + late final _sel_invalidateAndCancel1 = _registerName1("invalidateAndCancel"); + late final _sel_resetWithCompletionHandler_1 = + _registerName1("resetWithCompletionHandler:"); + late final _sel_flushWithCompletionHandler_1 = + _registerName1("flushWithCompletionHandler:"); + late final _sel_getTasksWithCompletionHandler_1 = + _registerName1("getTasksWithCompletionHandler:"); + void _objc_msgSend_404( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_404( + obj, + sel, + completionHandler, + ); + } - ffi.Pointer get NSHTTPPropertyErrorPageDataKey => - _NSHTTPPropertyErrorPageDataKey.value; + late final __objc_msgSend_404Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - set NSHTTPPropertyErrorPageDataKey(ffi.Pointer value) => - _NSHTTPPropertyErrorPageDataKey.value = value; + late final _sel_getAllTasksWithCompletionHandler_1 = + _registerName1("getAllTasksWithCompletionHandler:"); + void _objc_msgSend_405( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_405( + obj, + sel, + completionHandler, + ); + } - late final ffi.Pointer> _NSHTTPPropertyHTTPProxy = - _lookup>('NSHTTPPropertyHTTPProxy'); + late final __objc_msgSend_405Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - ffi.Pointer get NSHTTPPropertyHTTPProxy => - _NSHTTPPropertyHTTPProxy.value; + late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); + late final _sel_dataTaskWithRequest_1 = + _registerName1("dataTaskWithRequest:"); + ffi.Pointer _objc_msgSend_406( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_406( + obj, + sel, + request, + ); + } - set NSHTTPPropertyHTTPProxy(ffi.Pointer value) => - _NSHTTPPropertyHTTPProxy.value = value; + late final __objc_msgSend_406Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final ffi.Pointer> _NSFTPPropertyUserLoginKey = - _lookup>('NSFTPPropertyUserLoginKey'); + late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); + ffi.Pointer _objc_msgSend_407( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_407( + obj, + sel, + url, + ); + } - ffi.Pointer get NSFTPPropertyUserLoginKey => - _NSFTPPropertyUserLoginKey.value; + late final __objc_msgSend_407Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set NSFTPPropertyUserLoginKey(ffi.Pointer value) => - _NSFTPPropertyUserLoginKey.value = value; + late final _class_NSURLSessionUploadTask1 = + _getClass1("NSURLSessionUploadTask"); + late final _sel_uploadTaskWithRequest_fromFile_1 = + _registerName1("uploadTaskWithRequest:fromFile:"); + ffi.Pointer _objc_msgSend_408( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer fileURL, + ) { + return __objc_msgSend_408( + obj, + sel, + request, + fileURL, + ); + } - late final ffi.Pointer> - _NSFTPPropertyUserPasswordKey = - _lookup>('NSFTPPropertyUserPasswordKey'); + late final __objc_msgSend_408Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer get NSFTPPropertyUserPasswordKey => - _NSFTPPropertyUserPasswordKey.value; + late final _sel_uploadTaskWithRequest_fromData_1 = + _registerName1("uploadTaskWithRequest:fromData:"); + ffi.Pointer _objc_msgSend_409( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer bodyData, + ) { + return __objc_msgSend_409( + obj, + sel, + request, + bodyData, + ); + } - set NSFTPPropertyUserPasswordKey(ffi.Pointer value) => - _NSFTPPropertyUserPasswordKey.value = value; + late final __objc_msgSend_409Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final ffi.Pointer> - _NSFTPPropertyActiveTransferModeKey = - _lookup>('NSFTPPropertyActiveTransferModeKey'); + late final _sel_uploadTaskWithStreamedRequest_1 = + _registerName1("uploadTaskWithStreamedRequest:"); + ffi.Pointer _objc_msgSend_410( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_410( + obj, + sel, + request, + ); + } - ffi.Pointer get NSFTPPropertyActiveTransferModeKey => - _NSFTPPropertyActiveTransferModeKey.value; + late final __objc_msgSend_410Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set NSFTPPropertyActiveTransferModeKey(ffi.Pointer value) => - _NSFTPPropertyActiveTransferModeKey.value = value; + late final _class_NSURLSessionDownloadTask1 = + _getClass1("NSURLSessionDownloadTask"); + late final _sel_cancelByProducingResumeData_1 = + _registerName1("cancelByProducingResumeData:"); + void _objc_msgSend_411( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_411( + obj, + sel, + completionHandler, + ); + } - late final ffi.Pointer> _NSFTPPropertyFileOffsetKey = - _lookup>('NSFTPPropertyFileOffsetKey'); + late final __objc_msgSend_411Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - ffi.Pointer get NSFTPPropertyFileOffsetKey => - _NSFTPPropertyFileOffsetKey.value; + late final _sel_downloadTaskWithRequest_1 = + _registerName1("downloadTaskWithRequest:"); + ffi.Pointer _objc_msgSend_412( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_412( + obj, + sel, + request, + ); + } - set NSFTPPropertyFileOffsetKey(ffi.Pointer value) => - _NSFTPPropertyFileOffsetKey.value = value; + late final __objc_msgSend_412Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final ffi.Pointer> _NSFTPPropertyFTPProxy = - _lookup>('NSFTPPropertyFTPProxy'); + late final _sel_downloadTaskWithURL_1 = + _registerName1("downloadTaskWithURL:"); + ffi.Pointer _objc_msgSend_413( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_413( + obj, + sel, + url, + ); + } - ffi.Pointer get NSFTPPropertyFTPProxy => - _NSFTPPropertyFTPProxy.value; + late final __objc_msgSend_413Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set NSFTPPropertyFTPProxy(ffi.Pointer value) => - _NSFTPPropertyFTPProxy.value = value; + late final _sel_downloadTaskWithResumeData_1 = + _registerName1("downloadTaskWithResumeData:"); + ffi.Pointer _objc_msgSend_414( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer resumeData, + ) { + return __objc_msgSend_414( + obj, + sel, + resumeData, + ); + } - /// A string constant for the "file" URL scheme. If you are using this to compare to a URL's scheme to see if it is a file URL, you should instead use the NSURL fileURL property -- the fileURL property is much faster. - late final ffi.Pointer> _NSURLFileScheme = - _lookup>('NSURLFileScheme'); + late final __objc_msgSend_414Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer get NSURLFileScheme => _NSURLFileScheme.value; + late final _class_NSURLSessionStreamTask1 = + _getClass1("NSURLSessionStreamTask"); + late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = + _registerName1( + "readDataOfMinLength:maxLength:timeout:completionHandler:"); + void _objc_msgSend_415( + ffi.Pointer obj, + ffi.Pointer sel, + int minBytes, + int maxBytes, + double timeout, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_415( + obj, + sel, + minBytes, + maxBytes, + timeout, + completionHandler, + ); + } - set NSURLFileScheme(ffi.Pointer value) => - _NSURLFileScheme.value = value; + late final __objc_msgSend_415Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSUInteger, + NSTimeInterval, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int, + double, ffi.Pointer<_ObjCBlock>)>(); - /// Key for the resource properties that have not been set after setResourceValues:error: returns an error, returned as an array of of strings. - late final ffi.Pointer _NSURLKeysOfUnsetValuesKey = - _lookup('NSURLKeysOfUnsetValuesKey'); + late final _sel_writeData_timeout_completionHandler_1 = + _registerName1("writeData:timeout:completionHandler:"); + void _objc_msgSend_416( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + double timeout, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_416( + obj, + sel, + data, + timeout, + completionHandler, + ); + } - NSURLResourceKey get NSURLKeysOfUnsetValuesKey => - _NSURLKeysOfUnsetValuesKey.value; + late final __objc_msgSend_416Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSTimeInterval, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); - set NSURLKeysOfUnsetValuesKey(NSURLResourceKey value) => - _NSURLKeysOfUnsetValuesKey.value = value; + late final _sel_captureStreams1 = _registerName1("captureStreams"); + late final _sel_closeWrite1 = _registerName1("closeWrite"); + late final _sel_closeRead1 = _registerName1("closeRead"); + late final _sel_startSecureConnection1 = + _registerName1("startSecureConnection"); + late final _sel_stopSecureConnection1 = + _registerName1("stopSecureConnection"); + late final _sel_streamTaskWithHostName_port_1 = + _registerName1("streamTaskWithHostName:port:"); + ffi.Pointer _objc_msgSend_417( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer hostname, + int port, + ) { + return __objc_msgSend_417( + obj, + sel, + hostname, + port, + ); + } - /// The resource name provided by the file system (Read-write, value type NSString) - late final ffi.Pointer _NSURLNameKey = - _lookup('NSURLNameKey'); + late final __objc_msgSend_417Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - NSURLResourceKey get NSURLNameKey => _NSURLNameKey.value; + late final _class_NSNetService1 = _getClass1("NSNetService"); + late final _sel_streamTaskWithNetService_1 = + _registerName1("streamTaskWithNetService:"); + ffi.Pointer _objc_msgSend_418( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer service, + ) { + return __objc_msgSend_418( + obj, + sel, + service, + ); + } - set NSURLNameKey(NSURLResourceKey value) => _NSURLNameKey.value = value; + late final __objc_msgSend_418Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - /// Localized or extension-hidden name as displayed to users (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedNameKey = - _lookup('NSURLLocalizedNameKey'); + late final _class_NSURLSessionWebSocketTask1 = + _getClass1("NSURLSessionWebSocketTask"); + late final _class_NSURLSessionWebSocketMessage1 = + _getClass1("NSURLSessionWebSocketMessage"); + late final _sel_type1 = _registerName1("type"); + int _objc_msgSend_419( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_419( + obj, + sel, + ); + } - NSURLResourceKey get NSURLLocalizedNameKey => _NSURLLocalizedNameKey.value; + late final __objc_msgSend_419Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - set NSURLLocalizedNameKey(NSURLResourceKey value) => - _NSURLLocalizedNameKey.value = value; + late final _sel_sendMessage_completionHandler_1 = + _registerName1("sendMessage:completionHandler:"); + void _objc_msgSend_420( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer message, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_420( + obj, + sel, + message, + completionHandler, + ); + } - /// True for regular files (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsRegularFileKey = - _lookup('NSURLIsRegularFileKey'); + late final __objc_msgSend_420Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLIsRegularFileKey => _NSURLIsRegularFileKey.value; + late final _sel_receiveMessageWithCompletionHandler_1 = + _registerName1("receiveMessageWithCompletionHandler:"); + void _objc_msgSend_421( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_421( + obj, + sel, + completionHandler, + ); + } - set NSURLIsRegularFileKey(NSURLResourceKey value) => - _NSURLIsRegularFileKey.value = value; + late final __objc_msgSend_421Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// True for directories (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsDirectoryKey = - _lookup('NSURLIsDirectoryKey'); + late final _sel_sendPingWithPongReceiveHandler_1 = + _registerName1("sendPingWithPongReceiveHandler:"); + void _objc_msgSend_422( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> pongReceiveHandler, + ) { + return __objc_msgSend_422( + obj, + sel, + pongReceiveHandler, + ); + } - NSURLResourceKey get NSURLIsDirectoryKey => _NSURLIsDirectoryKey.value; + late final __objc_msgSend_422Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - set NSURLIsDirectoryKey(NSURLResourceKey value) => - _NSURLIsDirectoryKey.value = value; + late final _sel_cancelWithCloseCode_reason_1 = + _registerName1("cancelWithCloseCode:reason:"); + void _objc_msgSend_423( + ffi.Pointer obj, + ffi.Pointer sel, + int closeCode, + ffi.Pointer reason, + ) { + return __objc_msgSend_423( + obj, + sel, + closeCode, + reason, + ); + } - /// True for symlinks (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsSymbolicLinkKey = - _lookup('NSURLIsSymbolicLinkKey'); + late final __objc_msgSend_423Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); - NSURLResourceKey get NSURLIsSymbolicLinkKey => _NSURLIsSymbolicLinkKey.value; + late final _sel_maximumMessageSize1 = _registerName1("maximumMessageSize"); + late final _sel_setMaximumMessageSize_1 = + _registerName1("setMaximumMessageSize:"); + late final _sel_closeCode1 = _registerName1("closeCode"); + int _objc_msgSend_424( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_424( + obj, + sel, + ); + } - set NSURLIsSymbolicLinkKey(NSURLResourceKey value) => - _NSURLIsSymbolicLinkKey.value = value; + late final __objc_msgSend_424Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - /// True for the root directory of a volume (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsVolumeKey = - _lookup('NSURLIsVolumeKey'); + late final _sel_closeReason1 = _registerName1("closeReason"); + late final _sel_webSocketTaskWithURL_1 = + _registerName1("webSocketTaskWithURL:"); + ffi.Pointer _objc_msgSend_425( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_425( + obj, + sel, + url, + ); + } - NSURLResourceKey get NSURLIsVolumeKey => _NSURLIsVolumeKey.value; + late final __objc_msgSend_425Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set NSURLIsVolumeKey(NSURLResourceKey value) => - _NSURLIsVolumeKey.value = value; + late final _sel_webSocketTaskWithURL_protocols_1 = + _registerName1("webSocketTaskWithURL:protocols:"); + ffi.Pointer _objc_msgSend_426( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer protocols, + ) { + return __objc_msgSend_426( + obj, + sel, + url, + protocols, + ); + } - /// True for packaged directories (Read-only 10_6 and 10_7, read-write 10_8, value type boolean NSNumber). Note: You can only set or clear this property on directories; if you try to set this property on non-directory objects, the property is ignored. If the directory is a package for some other reason (extension type, etc), setting this property to false will have no effect. - late final ffi.Pointer _NSURLIsPackageKey = - _lookup('NSURLIsPackageKey'); + late final __objc_msgSend_426Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - NSURLResourceKey get NSURLIsPackageKey => _NSURLIsPackageKey.value; + late final _sel_webSocketTaskWithRequest_1 = + _registerName1("webSocketTaskWithRequest:"); + ffi.Pointer _objc_msgSend_427( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_427( + obj, + sel, + request, + ); + } - set NSURLIsPackageKey(NSURLResourceKey value) => - _NSURLIsPackageKey.value = value; - - /// True if resource is an application (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsApplicationKey = - _lookup('NSURLIsApplicationKey'); - - NSURLResourceKey get NSURLIsApplicationKey => _NSURLIsApplicationKey.value; - - set NSURLIsApplicationKey(NSURLResourceKey value) => - _NSURLIsApplicationKey.value = value; - - /// True if the resource is scriptable. Only applies to applications (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLApplicationIsScriptableKey = - _lookup('NSURLApplicationIsScriptableKey'); + late final __objc_msgSend_427Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSURLResourceKey get NSURLApplicationIsScriptableKey => - _NSURLApplicationIsScriptableKey.value; + late final _sel_dataTaskWithRequest_completionHandler_1 = + _registerName1("dataTaskWithRequest:completionHandler:"); + ffi.Pointer _objc_msgSend_428( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_428( + obj, + sel, + request, + completionHandler, + ); + } - set NSURLApplicationIsScriptableKey(NSURLResourceKey value) => - _NSURLApplicationIsScriptableKey.value = value; + late final __objc_msgSend_428Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// True for system-immutable resources (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsSystemImmutableKey = - _lookup('NSURLIsSystemImmutableKey'); + late final _sel_dataTaskWithURL_completionHandler_1 = + _registerName1("dataTaskWithURL:completionHandler:"); + ffi.Pointer _objc_msgSend_429( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_429( + obj, + sel, + url, + completionHandler, + ); + } - NSURLResourceKey get NSURLIsSystemImmutableKey => - _NSURLIsSystemImmutableKey.value; + late final __objc_msgSend_429Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - set NSURLIsSystemImmutableKey(NSURLResourceKey value) => - _NSURLIsSystemImmutableKey.value = value; + late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = + _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); + ffi.Pointer _objc_msgSend_430( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer fileURL, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_430( + obj, + sel, + request, + fileURL, + completionHandler, + ); + } - /// True for user-immutable resources (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsUserImmutableKey = - _lookup('NSURLIsUserImmutableKey'); + late final __objc_msgSend_430Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLIsUserImmutableKey => - _NSURLIsUserImmutableKey.value; + late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = + _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); + ffi.Pointer _objc_msgSend_431( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer bodyData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_431( + obj, + sel, + request, + bodyData, + completionHandler, + ); + } - set NSURLIsUserImmutableKey(NSURLResourceKey value) => - _NSURLIsUserImmutableKey.value = value; + late final __objc_msgSend_431Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// True for resources normally not displayed to users (Read-write, value type boolean NSNumber). Note: If the resource is a hidden because its name starts with a period, setting this property to false will not change the property. - late final ffi.Pointer _NSURLIsHiddenKey = - _lookup('NSURLIsHiddenKey'); + late final _sel_downloadTaskWithRequest_completionHandler_1 = + _registerName1("downloadTaskWithRequest:completionHandler:"); + ffi.Pointer _objc_msgSend_432( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_432( + obj, + sel, + request, + completionHandler, + ); + } - NSURLResourceKey get NSURLIsHiddenKey => _NSURLIsHiddenKey.value; + late final __objc_msgSend_432Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - set NSURLIsHiddenKey(NSURLResourceKey value) => - _NSURLIsHiddenKey.value = value; + late final _sel_downloadTaskWithURL_completionHandler_1 = + _registerName1("downloadTaskWithURL:completionHandler:"); + ffi.Pointer _objc_msgSend_433( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_433( + obj, + sel, + url, + completionHandler, + ); + } - /// True for resources whose filename extension is removed from the localized name property (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLHasHiddenExtensionKey = - _lookup('NSURLHasHiddenExtensionKey'); + late final __objc_msgSend_433Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLHasHiddenExtensionKey => - _NSURLHasHiddenExtensionKey.value; + late final _sel_downloadTaskWithResumeData_completionHandler_1 = + _registerName1("downloadTaskWithResumeData:completionHandler:"); + ffi.Pointer _objc_msgSend_434( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer resumeData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_434( + obj, + sel, + resumeData, + completionHandler, + ); + } - set NSURLHasHiddenExtensionKey(NSURLResourceKey value) => - _NSURLHasHiddenExtensionKey.value = value; + late final __objc_msgSend_434Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// The date the resource was created (Read-write, value type NSDate) - late final ffi.Pointer _NSURLCreationDateKey = - _lookup('NSURLCreationDateKey'); + late final ffi.Pointer _NSURLSessionTaskPriorityDefault = + _lookup('NSURLSessionTaskPriorityDefault'); - NSURLResourceKey get NSURLCreationDateKey => _NSURLCreationDateKey.value; + double get NSURLSessionTaskPriorityDefault => + _NSURLSessionTaskPriorityDefault.value; - set NSURLCreationDateKey(NSURLResourceKey value) => - _NSURLCreationDateKey.value = value; + set NSURLSessionTaskPriorityDefault(double value) => + _NSURLSessionTaskPriorityDefault.value = value; - /// The date the resource was last accessed (Read-write, value type NSDate) - late final ffi.Pointer _NSURLContentAccessDateKey = - _lookup('NSURLContentAccessDateKey'); + late final ffi.Pointer _NSURLSessionTaskPriorityLow = + _lookup('NSURLSessionTaskPriorityLow'); - NSURLResourceKey get NSURLContentAccessDateKey => - _NSURLContentAccessDateKey.value; + double get NSURLSessionTaskPriorityLow => _NSURLSessionTaskPriorityLow.value; - set NSURLContentAccessDateKey(NSURLResourceKey value) => - _NSURLContentAccessDateKey.value = value; + set NSURLSessionTaskPriorityLow(double value) => + _NSURLSessionTaskPriorityLow.value = value; - /// The time the resource content was last modified (Read-write, value type NSDate) - late final ffi.Pointer _NSURLContentModificationDateKey = - _lookup('NSURLContentModificationDateKey'); + late final ffi.Pointer _NSURLSessionTaskPriorityHigh = + _lookup('NSURLSessionTaskPriorityHigh'); - NSURLResourceKey get NSURLContentModificationDateKey => - _NSURLContentModificationDateKey.value; + double get NSURLSessionTaskPriorityHigh => + _NSURLSessionTaskPriorityHigh.value; - set NSURLContentModificationDateKey(NSURLResourceKey value) => - _NSURLContentModificationDateKey.value = value; + set NSURLSessionTaskPriorityHigh(double value) => + _NSURLSessionTaskPriorityHigh.value = value; - /// The time the resource's attributes were last modified (Read-only, value type NSDate) - late final ffi.Pointer _NSURLAttributeModificationDateKey = - _lookup('NSURLAttributeModificationDateKey'); + /// Key in the userInfo dictionary of an NSError received during a failed download. + late final ffi.Pointer> + _NSURLSessionDownloadTaskResumeData = + _lookup>('NSURLSessionDownloadTaskResumeData'); - NSURLResourceKey get NSURLAttributeModificationDateKey => - _NSURLAttributeModificationDateKey.value; + ffi.Pointer get NSURLSessionDownloadTaskResumeData => + _NSURLSessionDownloadTaskResumeData.value; - set NSURLAttributeModificationDateKey(NSURLResourceKey value) => - _NSURLAttributeModificationDateKey.value = value; + set NSURLSessionDownloadTaskResumeData(ffi.Pointer value) => + _NSURLSessionDownloadTaskResumeData.value = value; - /// Number of hard links to the resource (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLLinkCountKey = - _lookup('NSURLLinkCountKey'); + late final _class_NSURLSessionTaskTransactionMetrics1 = + _getClass1("NSURLSessionTaskTransactionMetrics"); + late final _sel_request1 = _registerName1("request"); + late final _sel_fetchStartDate1 = _registerName1("fetchStartDate"); + late final _sel_domainLookupStartDate1 = + _registerName1("domainLookupStartDate"); + late final _sel_domainLookupEndDate1 = _registerName1("domainLookupEndDate"); + late final _sel_connectStartDate1 = _registerName1("connectStartDate"); + late final _sel_secureConnectionStartDate1 = + _registerName1("secureConnectionStartDate"); + late final _sel_secureConnectionEndDate1 = + _registerName1("secureConnectionEndDate"); + late final _sel_connectEndDate1 = _registerName1("connectEndDate"); + late final _sel_requestStartDate1 = _registerName1("requestStartDate"); + late final _sel_requestEndDate1 = _registerName1("requestEndDate"); + late final _sel_responseStartDate1 = _registerName1("responseStartDate"); + late final _sel_responseEndDate1 = _registerName1("responseEndDate"); + late final _sel_networkProtocolName1 = _registerName1("networkProtocolName"); + late final _sel_isProxyConnection1 = _registerName1("isProxyConnection"); + late final _sel_isReusedConnection1 = _registerName1("isReusedConnection"); + late final _sel_resourceFetchType1 = _registerName1("resourceFetchType"); + int _objc_msgSend_435( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_435( + obj, + sel, + ); + } - NSURLResourceKey get NSURLLinkCountKey => _NSURLLinkCountKey.value; + late final __objc_msgSend_435Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - set NSURLLinkCountKey(NSURLResourceKey value) => - _NSURLLinkCountKey.value = value; + late final _sel_countOfRequestHeaderBytesSent1 = + _registerName1("countOfRequestHeaderBytesSent"); + late final _sel_countOfRequestBodyBytesSent1 = + _registerName1("countOfRequestBodyBytesSent"); + late final _sel_countOfRequestBodyBytesBeforeEncoding1 = + _registerName1("countOfRequestBodyBytesBeforeEncoding"); + late final _sel_countOfResponseHeaderBytesReceived1 = + _registerName1("countOfResponseHeaderBytesReceived"); + late final _sel_countOfResponseBodyBytesReceived1 = + _registerName1("countOfResponseBodyBytesReceived"); + late final _sel_countOfResponseBodyBytesAfterDecoding1 = + _registerName1("countOfResponseBodyBytesAfterDecoding"); + late final _sel_localAddress1 = _registerName1("localAddress"); + late final _sel_localPort1 = _registerName1("localPort"); + late final _sel_remoteAddress1 = _registerName1("remoteAddress"); + late final _sel_remotePort1 = _registerName1("remotePort"); + late final _sel_negotiatedTLSProtocolVersion1 = + _registerName1("negotiatedTLSProtocolVersion"); + late final _sel_negotiatedTLSCipherSuite1 = + _registerName1("negotiatedTLSCipherSuite"); + late final _sel_isCellular1 = _registerName1("isCellular"); + late final _sel_isExpensive1 = _registerName1("isExpensive"); + late final _sel_isConstrained1 = _registerName1("isConstrained"); + late final _sel_isMultipath1 = _registerName1("isMultipath"); + late final _sel_domainResolutionProtocol1 = + _registerName1("domainResolutionProtocol"); + int _objc_msgSend_436( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_436( + obj, + sel, + ); + } - /// The resource's parent directory, if any (Read-only, value type NSURL) - late final ffi.Pointer _NSURLParentDirectoryURLKey = - _lookup('NSURLParentDirectoryURLKey'); + late final __objc_msgSend_436Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - NSURLResourceKey get NSURLParentDirectoryURLKey => - _NSURLParentDirectoryURLKey.value; + late final _class_NSURLSessionTaskMetrics1 = + _getClass1("NSURLSessionTaskMetrics"); + late final _sel_transactionMetrics1 = _registerName1("transactionMetrics"); + late final _class_NSDateInterval1 = _getClass1("NSDateInterval"); + late final _sel_taskInterval1 = _registerName1("taskInterval"); + ffi.Pointer _objc_msgSend_437( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_437( + obj, + sel, + ); + } - set NSURLParentDirectoryURLKey(NSURLResourceKey value) => - _NSURLParentDirectoryURLKey.value = value; + late final __objc_msgSend_437Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - /// URL of the volume on which the resource is stored (Read-only, value type NSURL) - late final ffi.Pointer _NSURLVolumeURLKey = - _lookup('NSURLVolumeURLKey'); + late final _sel_redirectCount1 = _registerName1("redirectCount"); + late final _class_NSItemProvider1 = _getClass1("NSItemProvider"); + late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = + _registerName1( + "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); + void _objc_msgSend_438( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_438( + obj, + sel, + typeIdentifier, + visibility, + loadHandler, + ); + } - NSURLResourceKey get NSURLVolumeURLKey => _NSURLVolumeURLKey.value; + late final __objc_msgSend_438Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - set NSURLVolumeURLKey(NSURLResourceKey value) => - _NSURLVolumeURLKey.value = value; + late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = + _registerName1( + "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); + void _objc_msgSend_439( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int fileOptions, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_439( + obj, + sel, + typeIdentifier, + fileOptions, + visibility, + loadHandler, + ); + } - /// Uniform type identifier (UTI) for the resource (Read-only, value type NSString) - late final ffi.Pointer _NSURLTypeIdentifierKey = - _lookup('NSURLTypeIdentifierKey'); + late final __objc_msgSend_439Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLTypeIdentifierKey => _NSURLTypeIdentifierKey.value; + late final _sel_registeredTypeIdentifiers1 = + _registerName1("registeredTypeIdentifiers"); + late final _sel_registeredTypeIdentifiersWithFileOptions_1 = + _registerName1("registeredTypeIdentifiersWithFileOptions:"); + ffi.Pointer _objc_msgSend_440( + ffi.Pointer obj, + ffi.Pointer sel, + int fileOptions, + ) { + return __objc_msgSend_440( + obj, + sel, + fileOptions, + ); + } - set NSURLTypeIdentifierKey(NSURLResourceKey value) => - _NSURLTypeIdentifierKey.value = value; + late final __objc_msgSend_440Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - /// File type (UTType) for the resource (Read-only, value type UTType) - late final ffi.Pointer _NSURLContentTypeKey = - _lookup('NSURLContentTypeKey'); - - NSURLResourceKey get NSURLContentTypeKey => _NSURLContentTypeKey.value; + late final _sel_hasItemConformingToTypeIdentifier_1 = + _registerName1("hasItemConformingToTypeIdentifier:"); + late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = + _registerName1( + "hasRepresentationConformingToTypeIdentifier:fileOptions:"); + bool _objc_msgSend_441( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int fileOptions, + ) { + return __objc_msgSend_441( + obj, + sel, + typeIdentifier, + fileOptions, + ); + } - set NSURLContentTypeKey(NSURLResourceKey value) => - _NSURLContentTypeKey.value = value; + late final __objc_msgSend_441Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - /// User-visible type or "kind" description (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedTypeDescriptionKey = - _lookup('NSURLLocalizedTypeDescriptionKey'); + late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadDataRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_442( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_442( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } - NSURLResourceKey get NSURLLocalizedTypeDescriptionKey => - _NSURLLocalizedTypeDescriptionKey.value; + late final __objc_msgSend_442Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - set NSURLLocalizedTypeDescriptionKey(NSURLResourceKey value) => - _NSURLLocalizedTypeDescriptionKey.value = value; + late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadFileRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_443( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_443( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } - /// The label number assigned to the resource (Read-write, value type NSNumber) - late final ffi.Pointer _NSURLLabelNumberKey = - _lookup('NSURLLabelNumberKey'); + late final __objc_msgSend_443Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLLabelNumberKey => _NSURLLabelNumberKey.value; + late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_444( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_444( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } - set NSURLLabelNumberKey(NSURLResourceKey value) => - _NSURLLabelNumberKey.value = value; + late final __objc_msgSend_444Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// The color of the assigned label (Read-only, value type NSColor) - late final ffi.Pointer _NSURLLabelColorKey = - _lookup('NSURLLabelColorKey'); + late final _sel_suggestedName1 = _registerName1("suggestedName"); + late final _sel_setSuggestedName_1 = _registerName1("setSuggestedName:"); + late final _sel_initWithObject_1 = _registerName1("initWithObject:"); + late final _sel_registerObject_visibility_1 = + _registerName1("registerObject:visibility:"); + void _objc_msgSend_445( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + int visibility, + ) { + return __objc_msgSend_445( + obj, + sel, + object, + visibility, + ); + } - NSURLResourceKey get NSURLLabelColorKey => _NSURLLabelColorKey.value; + late final __objc_msgSend_445Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - set NSURLLabelColorKey(NSURLResourceKey value) => - _NSURLLabelColorKey.value = value; + late final _sel_registerObjectOfClass_visibility_loadHandler_1 = + _registerName1("registerObjectOfClass:visibility:loadHandler:"); + void _objc_msgSend_446( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_446( + obj, + sel, + aClass, + visibility, + loadHandler, + ); + } - /// The user-visible label text (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedLabelKey = - _lookup('NSURLLocalizedLabelKey'); + late final __objc_msgSend_446Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLLocalizedLabelKey => _NSURLLocalizedLabelKey.value; + late final _sel_canLoadObjectOfClass_1 = + _registerName1("canLoadObjectOfClass:"); + late final _sel_loadObjectOfClass_completionHandler_1 = + _registerName1("loadObjectOfClass:completionHandler:"); + ffi.Pointer _objc_msgSend_447( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_447( + obj, + sel, + aClass, + completionHandler, + ); + } - set NSURLLocalizedLabelKey(NSURLResourceKey value) => - _NSURLLocalizedLabelKey.value = value; + late final __objc_msgSend_447Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// The icon normally displayed for the resource (Read-only, value type NSImage) - late final ffi.Pointer _NSURLEffectiveIconKey = - _lookup('NSURLEffectiveIconKey'); + late final _sel_initWithItem_typeIdentifier_1 = + _registerName1("initWithItem:typeIdentifier:"); + instancetype _objc_msgSend_448( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer item, + ffi.Pointer typeIdentifier, + ) { + return __objc_msgSend_448( + obj, + sel, + item, + typeIdentifier, + ); + } - NSURLResourceKey get NSURLEffectiveIconKey => _NSURLEffectiveIconKey.value; + late final __objc_msgSend_448Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set NSURLEffectiveIconKey(NSURLResourceKey value) => - _NSURLEffectiveIconKey.value = value; + late final _sel_registerItemForTypeIdentifier_loadHandler_1 = + _registerName1("registerItemForTypeIdentifier:loadHandler:"); + void _objc_msgSend_449( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + NSItemProviderLoadHandler loadHandler, + ) { + return __objc_msgSend_449( + obj, + sel, + typeIdentifier, + loadHandler, + ); + } - /// The custom icon assigned to the resource, if any (Currently not implemented, value type NSImage) - late final ffi.Pointer _NSURLCustomIconKey = - _lookup('NSURLCustomIconKey'); + late final __objc_msgSend_449Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderLoadHandler)>>('objc_msgSend'); + late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSItemProviderLoadHandler)>(); - NSURLResourceKey get NSURLCustomIconKey => _NSURLCustomIconKey.value; + late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = + _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); + void _objc_msgSend_450( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer options, + NSItemProviderCompletionHandler completionHandler, + ) { + return __objc_msgSend_450( + obj, + sel, + typeIdentifier, + options, + completionHandler, + ); + } - set NSURLCustomIconKey(NSURLResourceKey value) => - _NSURLCustomIconKey.value = value; + late final __objc_msgSend_450Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderCompletionHandler)>>('objc_msgSend'); + late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderCompletionHandler)>(); - /// An identifier which can be used to compare two file system objects for equality using -isEqual (i.e, two object identifiers are equal if they have the same file system path or if the paths are linked to same inode on the same file system). This identifier is not persistent across system restarts. (Read-only, value type id ) - late final ffi.Pointer _NSURLFileResourceIdentifierKey = - _lookup('NSURLFileResourceIdentifierKey'); + late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); + NSItemProviderLoadHandler _objc_msgSend_451( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_451( + obj, + sel, + ); + } - NSURLResourceKey get NSURLFileResourceIdentifierKey => - _NSURLFileResourceIdentifierKey.value; + late final __objc_msgSend_451Ptr = _lookup< + ffi.NativeFunction< + NSItemProviderLoadHandler Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< + NSItemProviderLoadHandler Function( + ffi.Pointer, ffi.Pointer)>(); - set NSURLFileResourceIdentifierKey(NSURLResourceKey value) => - _NSURLFileResourceIdentifierKey.value = value; + late final _sel_setPreviewImageHandler_1 = + _registerName1("setPreviewImageHandler:"); + void _objc_msgSend_452( + ffi.Pointer obj, + ffi.Pointer sel, + NSItemProviderLoadHandler value, + ) { + return __objc_msgSend_452( + obj, + sel, + value, + ); + } - /// An identifier that can be used to identify the volume the file system object is on. Other objects on the same volume will have the same volume identifier and can be compared using for equality using -isEqual. This identifier is not persistent across system restarts. (Read-only, value type id ) - late final ffi.Pointer _NSURLVolumeIdentifierKey = - _lookup('NSURLVolumeIdentifierKey'); + late final __objc_msgSend_452Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSItemProviderLoadHandler)>>('objc_msgSend'); + late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSItemProviderLoadHandler)>(); - NSURLResourceKey get NSURLVolumeIdentifierKey => - _NSURLVolumeIdentifierKey.value; + late final _sel_loadPreviewImageWithOptions_completionHandler_1 = + _registerName1("loadPreviewImageWithOptions:completionHandler:"); + void _objc_msgSend_453( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer options, + NSItemProviderCompletionHandler completionHandler, + ) { + return __objc_msgSend_453( + obj, + sel, + options, + completionHandler, + ); + } - set NSURLVolumeIdentifierKey(NSURLResourceKey value) => - _NSURLVolumeIdentifierKey.value = value; + late final __objc_msgSend_453Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderCompletionHandler)>>('objc_msgSend'); + late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSItemProviderCompletionHandler)>(); - /// The optimal block size when reading or writing this file's data, or nil if not available. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLPreferredIOBlockSizeKey = - _lookup('NSURLPreferredIOBlockSizeKey'); + late final ffi.Pointer> + _NSItemProviderPreferredImageSizeKey = + _lookup>('NSItemProviderPreferredImageSizeKey'); - NSURLResourceKey get NSURLPreferredIOBlockSizeKey => - _NSURLPreferredIOBlockSizeKey.value; + ffi.Pointer get NSItemProviderPreferredImageSizeKey => + _NSItemProviderPreferredImageSizeKey.value; - set NSURLPreferredIOBlockSizeKey(NSURLResourceKey value) => - _NSURLPreferredIOBlockSizeKey.value = value; + set NSItemProviderPreferredImageSizeKey(ffi.Pointer value) => + _NSItemProviderPreferredImageSizeKey.value = value; - /// true if this process (as determined by EUID) can read the resource. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsReadableKey = - _lookup('NSURLIsReadableKey'); + late final ffi.Pointer> + _NSExtensionJavaScriptPreprocessingResultsKey = + _lookup>( + 'NSExtensionJavaScriptPreprocessingResultsKey'); - NSURLResourceKey get NSURLIsReadableKey => _NSURLIsReadableKey.value; + ffi.Pointer get NSExtensionJavaScriptPreprocessingResultsKey => + _NSExtensionJavaScriptPreprocessingResultsKey.value; - set NSURLIsReadableKey(NSURLResourceKey value) => - _NSURLIsReadableKey.value = value; + set NSExtensionJavaScriptPreprocessingResultsKey( + ffi.Pointer value) => + _NSExtensionJavaScriptPreprocessingResultsKey.value = value; - /// true if this process (as determined by EUID) can write to the resource. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsWritableKey = - _lookup('NSURLIsWritableKey'); + late final ffi.Pointer> + _NSExtensionJavaScriptFinalizeArgumentKey = + _lookup>( + 'NSExtensionJavaScriptFinalizeArgumentKey'); - NSURLResourceKey get NSURLIsWritableKey => _NSURLIsWritableKey.value; + ffi.Pointer get NSExtensionJavaScriptFinalizeArgumentKey => + _NSExtensionJavaScriptFinalizeArgumentKey.value; - set NSURLIsWritableKey(NSURLResourceKey value) => - _NSURLIsWritableKey.value = value; + set NSExtensionJavaScriptFinalizeArgumentKey(ffi.Pointer value) => + _NSExtensionJavaScriptFinalizeArgumentKey.value = value; - /// true if this process (as determined by EUID) can execute a file resource or search a directory resource. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsExecutableKey = - _lookup('NSURLIsExecutableKey'); + late final ffi.Pointer> _NSItemProviderErrorDomain = + _lookup>('NSItemProviderErrorDomain'); - NSURLResourceKey get NSURLIsExecutableKey => _NSURLIsExecutableKey.value; + ffi.Pointer get NSItemProviderErrorDomain => + _NSItemProviderErrorDomain.value; - set NSURLIsExecutableKey(NSURLResourceKey value) => - _NSURLIsExecutableKey.value = value; + set NSItemProviderErrorDomain(ffi.Pointer value) => + _NSItemProviderErrorDomain.value = value; - /// The file system object's security information encapsulated in a NSFileSecurity object. (Read-write, Value type NSFileSecurity) - late final ffi.Pointer _NSURLFileSecurityKey = - _lookup('NSURLFileSecurityKey'); + late final ffi.Pointer _NSStringTransformLatinToKatakana = + _lookup('NSStringTransformLatinToKatakana'); - NSURLResourceKey get NSURLFileSecurityKey => _NSURLFileSecurityKey.value; + NSStringTransform get NSStringTransformLatinToKatakana => + _NSStringTransformLatinToKatakana.value; - set NSURLFileSecurityKey(NSURLResourceKey value) => - _NSURLFileSecurityKey.value = value; + set NSStringTransformLatinToKatakana(NSStringTransform value) => + _NSStringTransformLatinToKatakana.value = value; - /// true if resource should be excluded from backups, false otherwise (Read-write, value type boolean NSNumber). This property is only useful for excluding cache and other application support files which are not needed in a backup. Some operations commonly made to user documents will cause this property to be reset to false and so this property should not be used on user documents. - late final ffi.Pointer _NSURLIsExcludedFromBackupKey = - _lookup('NSURLIsExcludedFromBackupKey'); + late final ffi.Pointer _NSStringTransformLatinToHiragana = + _lookup('NSStringTransformLatinToHiragana'); - NSURLResourceKey get NSURLIsExcludedFromBackupKey => - _NSURLIsExcludedFromBackupKey.value; + NSStringTransform get NSStringTransformLatinToHiragana => + _NSStringTransformLatinToHiragana.value; - set NSURLIsExcludedFromBackupKey(NSURLResourceKey value) => - _NSURLIsExcludedFromBackupKey.value = value; + set NSStringTransformLatinToHiragana(NSStringTransform value) => + _NSStringTransformLatinToHiragana.value = value; - /// The array of Tag names (Read-write, value type NSArray of NSString) - late final ffi.Pointer _NSURLTagNamesKey = - _lookup('NSURLTagNamesKey'); + late final ffi.Pointer _NSStringTransformLatinToHangul = + _lookup('NSStringTransformLatinToHangul'); - NSURLResourceKey get NSURLTagNamesKey => _NSURLTagNamesKey.value; + NSStringTransform get NSStringTransformLatinToHangul => + _NSStringTransformLatinToHangul.value; - set NSURLTagNamesKey(NSURLResourceKey value) => - _NSURLTagNamesKey.value = value; + set NSStringTransformLatinToHangul(NSStringTransform value) => + _NSStringTransformLatinToHangul.value = value; - /// the URL's path as a file system path (Read-only, value type NSString) - late final ffi.Pointer _NSURLPathKey = - _lookup('NSURLPathKey'); + late final ffi.Pointer _NSStringTransformLatinToArabic = + _lookup('NSStringTransformLatinToArabic'); - NSURLResourceKey get NSURLPathKey => _NSURLPathKey.value; + NSStringTransform get NSStringTransformLatinToArabic => + _NSStringTransformLatinToArabic.value; - set NSURLPathKey(NSURLResourceKey value) => _NSURLPathKey.value = value; + set NSStringTransformLatinToArabic(NSStringTransform value) => + _NSStringTransformLatinToArabic.value = value; - /// the URL's path as a canonical absolute file system path (Read-only, value type NSString) - late final ffi.Pointer _NSURLCanonicalPathKey = - _lookup('NSURLCanonicalPathKey'); + late final ffi.Pointer _NSStringTransformLatinToHebrew = + _lookup('NSStringTransformLatinToHebrew'); - NSURLResourceKey get NSURLCanonicalPathKey => _NSURLCanonicalPathKey.value; + NSStringTransform get NSStringTransformLatinToHebrew => + _NSStringTransformLatinToHebrew.value; - set NSURLCanonicalPathKey(NSURLResourceKey value) => - _NSURLCanonicalPathKey.value = value; + set NSStringTransformLatinToHebrew(NSStringTransform value) => + _NSStringTransformLatinToHebrew.value = value; - /// true if this URL is a file system trigger directory. Traversing or opening a file system trigger will cause an attempt to mount a file system on the trigger directory. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsMountTriggerKey = - _lookup('NSURLIsMountTriggerKey'); + late final ffi.Pointer _NSStringTransformLatinToThai = + _lookup('NSStringTransformLatinToThai'); - NSURLResourceKey get NSURLIsMountTriggerKey => _NSURLIsMountTriggerKey.value; + NSStringTransform get NSStringTransformLatinToThai => + _NSStringTransformLatinToThai.value; - set NSURLIsMountTriggerKey(NSURLResourceKey value) => - _NSURLIsMountTriggerKey.value = value; + set NSStringTransformLatinToThai(NSStringTransform value) => + _NSStringTransformLatinToThai.value = value; - /// An opaque generation identifier which can be compared using isEqual: to determine if the data in a document has been modified. For URLs which refer to the same file inode, the generation identifier will change when the data in the file's data fork is changed (changes to extended attributes or other file system metadata do not change the generation identifier). For URLs which refer to the same directory inode, the generation identifier will change when direct children of that directory are added, removed or renamed (changes to the data of the direct children of that directory will not change the generation identifier). The generation identifier is persistent across system restarts. The generation identifier is tied to a specific document on a specific volume and is not transferred when the document is copied to another volume. This property is not supported by all volumes. (Read-only, value type id ) - late final ffi.Pointer _NSURLGenerationIdentifierKey = - _lookup('NSURLGenerationIdentifierKey'); - - NSURLResourceKey get NSURLGenerationIdentifierKey => - _NSURLGenerationIdentifierKey.value; - - set NSURLGenerationIdentifierKey(NSURLResourceKey value) => - _NSURLGenerationIdentifierKey.value = value; + late final ffi.Pointer _NSStringTransformLatinToCyrillic = + _lookup('NSStringTransformLatinToCyrillic'); - /// The document identifier -- a value assigned by the kernel to a document (which can be either a file or directory) and is used to identify the document regardless of where it gets moved on a volume. The document identifier survives "safe save” operations; i.e it is sticky to the path it was assigned to (-replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: is the preferred safe-save API). The document identifier is persistent across system restarts. The document identifier is not transferred when the file is copied. Document identifiers are only unique within a single volume. This property is not supported by all volumes. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLDocumentIdentifierKey = - _lookup('NSURLDocumentIdentifierKey'); + NSStringTransform get NSStringTransformLatinToCyrillic => + _NSStringTransformLatinToCyrillic.value; - NSURLResourceKey get NSURLDocumentIdentifierKey => - _NSURLDocumentIdentifierKey.value; + set NSStringTransformLatinToCyrillic(NSStringTransform value) => + _NSStringTransformLatinToCyrillic.value = value; - set NSURLDocumentIdentifierKey(NSURLResourceKey value) => - _NSURLDocumentIdentifierKey.value = value; + late final ffi.Pointer _NSStringTransformLatinToGreek = + _lookup('NSStringTransformLatinToGreek'); - /// The date the resource was created, or renamed into or within its parent directory. Note that inconsistent behavior may be observed when this attribute is requested on hard-linked items. This property is not supported by all volumes. (Read-only before macOS 10.15, iOS 13.0, watchOS 6.0, and tvOS 13.0; Read-write after, value type NSDate) - late final ffi.Pointer _NSURLAddedToDirectoryDateKey = - _lookup('NSURLAddedToDirectoryDateKey'); + NSStringTransform get NSStringTransformLatinToGreek => + _NSStringTransformLatinToGreek.value; - NSURLResourceKey get NSURLAddedToDirectoryDateKey => - _NSURLAddedToDirectoryDateKey.value; + set NSStringTransformLatinToGreek(NSStringTransform value) => + _NSStringTransformLatinToGreek.value = value; - set NSURLAddedToDirectoryDateKey(NSURLResourceKey value) => - _NSURLAddedToDirectoryDateKey.value = value; + late final ffi.Pointer _NSStringTransformToLatin = + _lookup('NSStringTransformToLatin'); - /// The quarantine properties as defined in LSQuarantine.h. To remove quarantine information from a file, pass NSNull as the value when setting this property. (Read-write, value type NSDictionary) - late final ffi.Pointer _NSURLQuarantinePropertiesKey = - _lookup('NSURLQuarantinePropertiesKey'); + NSStringTransform get NSStringTransformToLatin => + _NSStringTransformToLatin.value; - NSURLResourceKey get NSURLQuarantinePropertiesKey => - _NSURLQuarantinePropertiesKey.value; + set NSStringTransformToLatin(NSStringTransform value) => + _NSStringTransformToLatin.value = value; - set NSURLQuarantinePropertiesKey(NSURLResourceKey value) => - _NSURLQuarantinePropertiesKey.value = value; + late final ffi.Pointer _NSStringTransformMandarinToLatin = + _lookup('NSStringTransformMandarinToLatin'); - /// Returns the file system object type. (Read-only, value type NSString) - late final ffi.Pointer _NSURLFileResourceTypeKey = - _lookup('NSURLFileResourceTypeKey'); + NSStringTransform get NSStringTransformMandarinToLatin => + _NSStringTransformMandarinToLatin.value; - NSURLResourceKey get NSURLFileResourceTypeKey => - _NSURLFileResourceTypeKey.value; + set NSStringTransformMandarinToLatin(NSStringTransform value) => + _NSStringTransformMandarinToLatin.value = value; - set NSURLFileResourceTypeKey(NSURLResourceKey value) => - _NSURLFileResourceTypeKey.value = value; + late final ffi.Pointer + _NSStringTransformHiraganaToKatakana = + _lookup('NSStringTransformHiraganaToKatakana'); - /// A 64-bit value assigned by APFS that identifies a file's content data stream. Only cloned files and their originals can have the same identifier. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileContentIdentifierKey = - _lookup('NSURLFileContentIdentifierKey'); + NSStringTransform get NSStringTransformHiraganaToKatakana => + _NSStringTransformHiraganaToKatakana.value; - NSURLResourceKey get NSURLFileContentIdentifierKey => - _NSURLFileContentIdentifierKey.value; + set NSStringTransformHiraganaToKatakana(NSStringTransform value) => + _NSStringTransformHiraganaToKatakana.value = value; - set NSURLFileContentIdentifierKey(NSURLResourceKey value) => - _NSURLFileContentIdentifierKey.value = value; + late final ffi.Pointer + _NSStringTransformFullwidthToHalfwidth = + _lookup('NSStringTransformFullwidthToHalfwidth'); - /// True for cloned files and their originals that may share all, some, or no data blocks. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLMayShareFileContentKey = - _lookup('NSURLMayShareFileContentKey'); + NSStringTransform get NSStringTransformFullwidthToHalfwidth => + _NSStringTransformFullwidthToHalfwidth.value; - NSURLResourceKey get NSURLMayShareFileContentKey => - _NSURLMayShareFileContentKey.value; + set NSStringTransformFullwidthToHalfwidth(NSStringTransform value) => + _NSStringTransformFullwidthToHalfwidth.value = value; - set NSURLMayShareFileContentKey(NSURLResourceKey value) => - _NSURLMayShareFileContentKey.value = value; + late final ffi.Pointer _NSStringTransformToXMLHex = + _lookup('NSStringTransformToXMLHex'); - /// True if the file has extended attributes. False guarantees there are none. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLMayHaveExtendedAttributesKey = - _lookup('NSURLMayHaveExtendedAttributesKey'); + NSStringTransform get NSStringTransformToXMLHex => + _NSStringTransformToXMLHex.value; - NSURLResourceKey get NSURLMayHaveExtendedAttributesKey => - _NSURLMayHaveExtendedAttributesKey.value; + set NSStringTransformToXMLHex(NSStringTransform value) => + _NSStringTransformToXMLHex.value = value; - set NSURLMayHaveExtendedAttributesKey(NSURLResourceKey value) => - _NSURLMayHaveExtendedAttributesKey.value = value; + late final ffi.Pointer _NSStringTransformToUnicodeName = + _lookup('NSStringTransformToUnicodeName'); - /// True if the file can be deleted by the file system when asked to free space. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLIsPurgeableKey = - _lookup('NSURLIsPurgeableKey'); + NSStringTransform get NSStringTransformToUnicodeName => + _NSStringTransformToUnicodeName.value; - NSURLResourceKey get NSURLIsPurgeableKey => _NSURLIsPurgeableKey.value; + set NSStringTransformToUnicodeName(NSStringTransform value) => + _NSStringTransformToUnicodeName.value = value; - set NSURLIsPurgeableKey(NSURLResourceKey value) => - _NSURLIsPurgeableKey.value = value; + late final ffi.Pointer + _NSStringTransformStripCombiningMarks = + _lookup('NSStringTransformStripCombiningMarks'); - /// True if the file has sparse regions. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLIsSparseKey = - _lookup('NSURLIsSparseKey'); + NSStringTransform get NSStringTransformStripCombiningMarks => + _NSStringTransformStripCombiningMarks.value; - NSURLResourceKey get NSURLIsSparseKey => _NSURLIsSparseKey.value; + set NSStringTransformStripCombiningMarks(NSStringTransform value) => + _NSStringTransformStripCombiningMarks.value = value; - set NSURLIsSparseKey(NSURLResourceKey value) => - _NSURLIsSparseKey.value = value; + late final ffi.Pointer _NSStringTransformStripDiacritics = + _lookup('NSStringTransformStripDiacritics'); - /// The file system object type values returned for the NSURLFileResourceTypeKey - late final ffi.Pointer - _NSURLFileResourceTypeNamedPipe = - _lookup('NSURLFileResourceTypeNamedPipe'); + NSStringTransform get NSStringTransformStripDiacritics => + _NSStringTransformStripDiacritics.value; - NSURLFileResourceType get NSURLFileResourceTypeNamedPipe => - _NSURLFileResourceTypeNamedPipe.value; + set NSStringTransformStripDiacritics(NSStringTransform value) => + _NSStringTransformStripDiacritics.value = value; - set NSURLFileResourceTypeNamedPipe(NSURLFileResourceType value) => - _NSURLFileResourceTypeNamedPipe.value = value; + late final ffi.Pointer + _NSStringEncodingDetectionSuggestedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionSuggestedEncodingsKey'); - late final ffi.Pointer - _NSURLFileResourceTypeCharacterSpecial = - _lookup('NSURLFileResourceTypeCharacterSpecial'); + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionSuggestedEncodingsKey => + _NSStringEncodingDetectionSuggestedEncodingsKey.value; - NSURLFileResourceType get NSURLFileResourceTypeCharacterSpecial => - _NSURLFileResourceTypeCharacterSpecial.value; + set NSStringEncodingDetectionSuggestedEncodingsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionSuggestedEncodingsKey.value = value; - set NSURLFileResourceTypeCharacterSpecial(NSURLFileResourceType value) => - _NSURLFileResourceTypeCharacterSpecial.value = value; + late final ffi.Pointer + _NSStringEncodingDetectionDisallowedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionDisallowedEncodingsKey'); - late final ffi.Pointer - _NSURLFileResourceTypeDirectory = - _lookup('NSURLFileResourceTypeDirectory'); + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionDisallowedEncodingsKey => + _NSStringEncodingDetectionDisallowedEncodingsKey.value; - NSURLFileResourceType get NSURLFileResourceTypeDirectory => - _NSURLFileResourceTypeDirectory.value; + set NSStringEncodingDetectionDisallowedEncodingsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionDisallowedEncodingsKey.value = value; - set NSURLFileResourceTypeDirectory(NSURLFileResourceType value) => - _NSURLFileResourceTypeDirectory.value = value; + late final ffi.Pointer + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionUseOnlySuggestedEncodingsKey'); - late final ffi.Pointer - _NSURLFileResourceTypeBlockSpecial = - _lookup('NSURLFileResourceTypeBlockSpecial'); + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionUseOnlySuggestedEncodingsKey => + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value; - NSURLFileResourceType get NSURLFileResourceTypeBlockSpecial => - _NSURLFileResourceTypeBlockSpecial.value; + set NSStringEncodingDetectionUseOnlySuggestedEncodingsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value = value; - set NSURLFileResourceTypeBlockSpecial(NSURLFileResourceType value) => - _NSURLFileResourceTypeBlockSpecial.value = value; + late final ffi.Pointer + _NSStringEncodingDetectionAllowLossyKey = + _lookup( + 'NSStringEncodingDetectionAllowLossyKey'); - late final ffi.Pointer _NSURLFileResourceTypeRegular = - _lookup('NSURLFileResourceTypeRegular'); + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionAllowLossyKey => + _NSStringEncodingDetectionAllowLossyKey.value; - NSURLFileResourceType get NSURLFileResourceTypeRegular => - _NSURLFileResourceTypeRegular.value; + set NSStringEncodingDetectionAllowLossyKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionAllowLossyKey.value = value; - set NSURLFileResourceTypeRegular(NSURLFileResourceType value) => - _NSURLFileResourceTypeRegular.value = value; + late final ffi.Pointer + _NSStringEncodingDetectionFromWindowsKey = + _lookup( + 'NSStringEncodingDetectionFromWindowsKey'); - late final ffi.Pointer - _NSURLFileResourceTypeSymbolicLink = - _lookup('NSURLFileResourceTypeSymbolicLink'); + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionFromWindowsKey => + _NSStringEncodingDetectionFromWindowsKey.value; - NSURLFileResourceType get NSURLFileResourceTypeSymbolicLink => - _NSURLFileResourceTypeSymbolicLink.value; + set NSStringEncodingDetectionFromWindowsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionFromWindowsKey.value = value; - set NSURLFileResourceTypeSymbolicLink(NSURLFileResourceType value) => - _NSURLFileResourceTypeSymbolicLink.value = value; + late final ffi.Pointer + _NSStringEncodingDetectionLossySubstitutionKey = + _lookup( + 'NSStringEncodingDetectionLossySubstitutionKey'); - late final ffi.Pointer _NSURLFileResourceTypeSocket = - _lookup('NSURLFileResourceTypeSocket'); + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionLossySubstitutionKey => + _NSStringEncodingDetectionLossySubstitutionKey.value; - NSURLFileResourceType get NSURLFileResourceTypeSocket => - _NSURLFileResourceTypeSocket.value; + set NSStringEncodingDetectionLossySubstitutionKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionLossySubstitutionKey.value = value; - set NSURLFileResourceTypeSocket(NSURLFileResourceType value) => - _NSURLFileResourceTypeSocket.value = value; + late final ffi.Pointer + _NSStringEncodingDetectionLikelyLanguageKey = + _lookup( + 'NSStringEncodingDetectionLikelyLanguageKey'); - late final ffi.Pointer _NSURLFileResourceTypeUnknown = - _lookup('NSURLFileResourceTypeUnknown'); + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionLikelyLanguageKey => + _NSStringEncodingDetectionLikelyLanguageKey.value; - NSURLFileResourceType get NSURLFileResourceTypeUnknown => - _NSURLFileResourceTypeUnknown.value; + set NSStringEncodingDetectionLikelyLanguageKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionLikelyLanguageKey.value = value; - set NSURLFileResourceTypeUnknown(NSURLFileResourceType value) => - _NSURLFileResourceTypeUnknown.value = value; + late final _class_NSMutableString1 = _getClass1("NSMutableString"); + late final _sel_replaceCharactersInRange_withString_1 = + _registerName1("replaceCharactersInRange:withString:"); + void _objc_msgSend_454( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer aString, + ) { + return __objc_msgSend_454( + obj, + sel, + range, + aString, + ); + } - /// dictionary of NSImage/UIImage objects keyed by size - late final ffi.Pointer _NSURLThumbnailDictionaryKey = - _lookup('NSURLThumbnailDictionaryKey'); + late final __objc_msgSend_454Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); - NSURLResourceKey get NSURLThumbnailDictionaryKey => - _NSURLThumbnailDictionaryKey.value; + late final _sel_insertString_atIndex_1 = + _registerName1("insertString:atIndex:"); + void _objc_msgSend_455( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, + int loc, + ) { + return __objc_msgSend_455( + obj, + sel, + aString, + loc, + ); + } - set NSURLThumbnailDictionaryKey(NSURLResourceKey value) => - _NSURLThumbnailDictionaryKey.value = value; + late final __objc_msgSend_455Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - /// returns all thumbnails as a single NSImage - late final ffi.Pointer _NSURLThumbnailKey = - _lookup('NSURLThumbnailKey'); + late final _sel_deleteCharactersInRange_1 = + _registerName1("deleteCharactersInRange:"); + late final _sel_appendString_1 = _registerName1("appendString:"); + late final _sel_appendFormat_1 = _registerName1("appendFormat:"); + late final _sel_setString_1 = _registerName1("setString:"); + late final _sel_replaceOccurrencesOfString_withString_options_range_1 = + _registerName1("replaceOccurrencesOfString:withString:options:range:"); + int _objc_msgSend_456( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer replacement, + int options, + NSRange searchRange, + ) { + return __objc_msgSend_456( + obj, + sel, + target, + replacement, + options, + searchRange, + ); + } - NSURLResourceKey get NSURLThumbnailKey => _NSURLThumbnailKey.value; + late final __objc_msgSend_456Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, NSRange)>(); - set NSURLThumbnailKey(NSURLResourceKey value) => - _NSURLThumbnailKey.value = value; + late final _sel_applyTransform_reverse_range_updatedRange_1 = + _registerName1("applyTransform:reverse:range:updatedRange:"); + bool _objc_msgSend_457( + ffi.Pointer obj, + ffi.Pointer sel, + NSStringTransform transform, + bool reverse, + NSRange range, + NSRangePointer resultingRange, + ) { + return __objc_msgSend_457( + obj, + sel, + transform, + reverse, + range, + resultingRange, + ); + } - /// size key for a 1024 x 1024 thumbnail image - late final ffi.Pointer - _NSThumbnail1024x1024SizeKey = - _lookup('NSThumbnail1024x1024SizeKey'); + late final __objc_msgSend_457Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + NSStringTransform, + ffi.Bool, + NSRange, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + NSStringTransform, bool, NSRange, NSRangePointer)>(); - NSURLThumbnailDictionaryItem get NSThumbnail1024x1024SizeKey => - _NSThumbnail1024x1024SizeKey.value; + ffi.Pointer _objc_msgSend_458( + ffi.Pointer obj, + ffi.Pointer sel, + int capacity, + ) { + return __objc_msgSend_458( + obj, + sel, + capacity, + ); + } - set NSThumbnail1024x1024SizeKey(NSURLThumbnailDictionaryItem value) => - _NSThumbnail1024x1024SizeKey.value = value; + late final __objc_msgSend_458Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - /// Total file size in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileSizeKey = - _lookup('NSURLFileSizeKey'); + late final _sel_stringWithCapacity_1 = _registerName1("stringWithCapacity:"); + late final ffi.Pointer _NSCharacterConversionException = + _lookup('NSCharacterConversionException'); - NSURLResourceKey get NSURLFileSizeKey => _NSURLFileSizeKey.value; + NSExceptionName get NSCharacterConversionException => + _NSCharacterConversionException.value; - set NSURLFileSizeKey(NSURLResourceKey value) => - _NSURLFileSizeKey.value = value; + set NSCharacterConversionException(NSExceptionName value) => + _NSCharacterConversionException.value = value; - /// Total size allocated on disk for the file in bytes (number of blocks times block size) (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileAllocatedSizeKey = - _lookup('NSURLFileAllocatedSizeKey'); + late final ffi.Pointer _NSParseErrorException = + _lookup('NSParseErrorException'); - NSURLResourceKey get NSURLFileAllocatedSizeKey => - _NSURLFileAllocatedSizeKey.value; + NSExceptionName get NSParseErrorException => _NSParseErrorException.value; - set NSURLFileAllocatedSizeKey(NSURLResourceKey value) => - _NSURLFileAllocatedSizeKey.value = value; + set NSParseErrorException(NSExceptionName value) => + _NSParseErrorException.value = value; - /// Total displayable size of the file in bytes (this may include space used by metadata), or nil if not available. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLTotalFileSizeKey = - _lookup('NSURLTotalFileSizeKey'); + late final _class_NSSimpleCString1 = _getClass1("NSSimpleCString"); + late final _class_NSConstantString1 = _getClass1("NSConstantString"); + late final _class_NSMutableCharacterSet1 = + _getClass1("NSMutableCharacterSet"); + late final _sel_addCharactersInRange_1 = + _registerName1("addCharactersInRange:"); + late final _sel_removeCharactersInRange_1 = + _registerName1("removeCharactersInRange:"); + late final _sel_addCharactersInString_1 = + _registerName1("addCharactersInString:"); + late final _sel_removeCharactersInString_1 = + _registerName1("removeCharactersInString:"); + late final _sel_formUnionWithCharacterSet_1 = + _registerName1("formUnionWithCharacterSet:"); + void _objc_msgSend_459( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherSet, + ) { + return __objc_msgSend_459( + obj, + sel, + otherSet, + ); + } - NSURLResourceKey get NSURLTotalFileSizeKey => _NSURLTotalFileSizeKey.value; + late final __objc_msgSend_459Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - set NSURLTotalFileSizeKey(NSURLResourceKey value) => - _NSURLTotalFileSizeKey.value = value; + late final _sel_formIntersectionWithCharacterSet_1 = + _registerName1("formIntersectionWithCharacterSet:"); + late final _sel_invert1 = _registerName1("invert"); + ffi.Pointer _objc_msgSend_460( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange aRange, + ) { + return __objc_msgSend_460( + obj, + sel, + aRange, + ); + } - /// Total allocated size of the file in bytes (this may include space used by metadata), or nil if not available. This can be less than the value returned by NSURLTotalFileSizeKey if the resource is compressed. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLTotalFileAllocatedSizeKey = - _lookup('NSURLTotalFileAllocatedSizeKey'); + late final __objc_msgSend_460Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - NSURLResourceKey get NSURLTotalFileAllocatedSizeKey => - _NSURLTotalFileAllocatedSizeKey.value; + ffi.Pointer _objc_msgSend_461( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, + ) { + return __objc_msgSend_461( + obj, + sel, + aString, + ); + } - set NSURLTotalFileAllocatedSizeKey(NSURLResourceKey value) => - _NSURLTotalFileAllocatedSizeKey.value = value; + late final __objc_msgSend_461Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - /// true if the resource is a Finder alias file or a symlink, false otherwise ( Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsAliasFileKey = - _lookup('NSURLIsAliasFileKey'); + ffi.Pointer _objc_msgSend_462( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_462( + obj, + sel, + data, + ); + } - NSURLResourceKey get NSURLIsAliasFileKey => _NSURLIsAliasFileKey.value; + late final __objc_msgSend_462Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set NSURLIsAliasFileKey(NSURLResourceKey value) => - _NSURLIsAliasFileKey.value = value; + late final ffi.Pointer> _NSHTTPPropertyStatusCodeKey = + _lookup>('NSHTTPPropertyStatusCodeKey'); - /// The protection level for this file - late final ffi.Pointer _NSURLFileProtectionKey = - _lookup('NSURLFileProtectionKey'); + ffi.Pointer get NSHTTPPropertyStatusCodeKey => + _NSHTTPPropertyStatusCodeKey.value; - NSURLResourceKey get NSURLFileProtectionKey => _NSURLFileProtectionKey.value; + set NSHTTPPropertyStatusCodeKey(ffi.Pointer value) => + _NSHTTPPropertyStatusCodeKey.value = value; - set NSURLFileProtectionKey(NSURLResourceKey value) => - _NSURLFileProtectionKey.value = value; + late final ffi.Pointer> + _NSHTTPPropertyStatusReasonKey = + _lookup>('NSHTTPPropertyStatusReasonKey'); - /// The file has no special protections associated with it. It can be read from or written to at any time. - late final ffi.Pointer _NSURLFileProtectionNone = - _lookup('NSURLFileProtectionNone'); + ffi.Pointer get NSHTTPPropertyStatusReasonKey => + _NSHTTPPropertyStatusReasonKey.value; - NSURLFileProtectionType get NSURLFileProtectionNone => - _NSURLFileProtectionNone.value; + set NSHTTPPropertyStatusReasonKey(ffi.Pointer value) => + _NSHTTPPropertyStatusReasonKey.value = value; - set NSURLFileProtectionNone(NSURLFileProtectionType value) => - _NSURLFileProtectionNone.value = value; + late final ffi.Pointer> + _NSHTTPPropertyServerHTTPVersionKey = + _lookup>('NSHTTPPropertyServerHTTPVersionKey'); - /// The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting. - late final ffi.Pointer _NSURLFileProtectionComplete = - _lookup('NSURLFileProtectionComplete'); + ffi.Pointer get NSHTTPPropertyServerHTTPVersionKey => + _NSHTTPPropertyServerHTTPVersionKey.value; - NSURLFileProtectionType get NSURLFileProtectionComplete => - _NSURLFileProtectionComplete.value; + set NSHTTPPropertyServerHTTPVersionKey(ffi.Pointer value) => + _NSHTTPPropertyServerHTTPVersionKey.value = value; - set NSURLFileProtectionComplete(NSURLFileProtectionType value) => - _NSURLFileProtectionComplete.value = value; + late final ffi.Pointer> + _NSHTTPPropertyRedirectionHeadersKey = + _lookup>('NSHTTPPropertyRedirectionHeadersKey'); - /// The file is stored in an encrypted format on disk. Files can be created while the device is locked, but once closed, cannot be opened again until the device is unlocked. If the file is opened when unlocked, you may continue to access the file normally, even if the user locks the device. There is a small performance penalty when the file is created and opened, though not when being written to or read from. This can be mitigated by changing the file protection to NSURLFileProtectionComplete when the device is unlocked. - late final ffi.Pointer - _NSURLFileProtectionCompleteUnlessOpen = - _lookup('NSURLFileProtectionCompleteUnlessOpen'); + ffi.Pointer get NSHTTPPropertyRedirectionHeadersKey => + _NSHTTPPropertyRedirectionHeadersKey.value; - NSURLFileProtectionType get NSURLFileProtectionCompleteUnlessOpen => - _NSURLFileProtectionCompleteUnlessOpen.value; + set NSHTTPPropertyRedirectionHeadersKey(ffi.Pointer value) => + _NSHTTPPropertyRedirectionHeadersKey.value = value; - set NSURLFileProtectionCompleteUnlessOpen(NSURLFileProtectionType value) => - _NSURLFileProtectionCompleteUnlessOpen.value = value; + late final ffi.Pointer> + _NSHTTPPropertyErrorPageDataKey = + _lookup>('NSHTTPPropertyErrorPageDataKey'); - /// The file is stored in an encrypted format on disk and cannot be accessed until after the device has booted. After the user unlocks the device for the first time, your app can access the file and continue to access it even if the user subsequently locks the device. - late final ffi.Pointer - _NSURLFileProtectionCompleteUntilFirstUserAuthentication = - _lookup( - 'NSURLFileProtectionCompleteUntilFirstUserAuthentication'); + ffi.Pointer get NSHTTPPropertyErrorPageDataKey => + _NSHTTPPropertyErrorPageDataKey.value; - NSURLFileProtectionType - get NSURLFileProtectionCompleteUntilFirstUserAuthentication => - _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value; + set NSHTTPPropertyErrorPageDataKey(ffi.Pointer value) => + _NSHTTPPropertyErrorPageDataKey.value = value; - set NSURLFileProtectionCompleteUntilFirstUserAuthentication( - NSURLFileProtectionType value) => - _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; + late final ffi.Pointer> _NSHTTPPropertyHTTPProxy = + _lookup>('NSHTTPPropertyHTTPProxy'); - /// The user-visible volume format (Read-only, value type NSString) - late final ffi.Pointer - _NSURLVolumeLocalizedFormatDescriptionKey = - _lookup('NSURLVolumeLocalizedFormatDescriptionKey'); + ffi.Pointer get NSHTTPPropertyHTTPProxy => + _NSHTTPPropertyHTTPProxy.value; - NSURLResourceKey get NSURLVolumeLocalizedFormatDescriptionKey => - _NSURLVolumeLocalizedFormatDescriptionKey.value; + set NSHTTPPropertyHTTPProxy(ffi.Pointer value) => + _NSHTTPPropertyHTTPProxy.value = value; - set NSURLVolumeLocalizedFormatDescriptionKey(NSURLResourceKey value) => - _NSURLVolumeLocalizedFormatDescriptionKey.value = value; + late final ffi.Pointer> _NSFTPPropertyUserLoginKey = + _lookup>('NSFTPPropertyUserLoginKey'); - /// Total volume capacity in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeTotalCapacityKey = - _lookup('NSURLVolumeTotalCapacityKey'); + ffi.Pointer get NSFTPPropertyUserLoginKey => + _NSFTPPropertyUserLoginKey.value; - NSURLResourceKey get NSURLVolumeTotalCapacityKey => - _NSURLVolumeTotalCapacityKey.value; + set NSFTPPropertyUserLoginKey(ffi.Pointer value) => + _NSFTPPropertyUserLoginKey.value = value; - set NSURLVolumeTotalCapacityKey(NSURLResourceKey value) => - _NSURLVolumeTotalCapacityKey.value = value; + late final ffi.Pointer> + _NSFTPPropertyUserPasswordKey = + _lookup>('NSFTPPropertyUserPasswordKey'); - /// Total free space in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeAvailableCapacityKey = - _lookup('NSURLVolumeAvailableCapacityKey'); + ffi.Pointer get NSFTPPropertyUserPasswordKey => + _NSFTPPropertyUserPasswordKey.value; - NSURLResourceKey get NSURLVolumeAvailableCapacityKey => - _NSURLVolumeAvailableCapacityKey.value; + set NSFTPPropertyUserPasswordKey(ffi.Pointer value) => + _NSFTPPropertyUserPasswordKey.value = value; - set NSURLVolumeAvailableCapacityKey(NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityKey.value = value; + late final ffi.Pointer> + _NSFTPPropertyActiveTransferModeKey = + _lookup>('NSFTPPropertyActiveTransferModeKey'); - /// Total number of resources on the volume (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeResourceCountKey = - _lookup('NSURLVolumeResourceCountKey'); + ffi.Pointer get NSFTPPropertyActiveTransferModeKey => + _NSFTPPropertyActiveTransferModeKey.value; - NSURLResourceKey get NSURLVolumeResourceCountKey => - _NSURLVolumeResourceCountKey.value; + set NSFTPPropertyActiveTransferModeKey(ffi.Pointer value) => + _NSFTPPropertyActiveTransferModeKey.value = value; - set NSURLVolumeResourceCountKey(NSURLResourceKey value) => - _NSURLVolumeResourceCountKey.value = value; + late final ffi.Pointer> _NSFTPPropertyFileOffsetKey = + _lookup>('NSFTPPropertyFileOffsetKey'); - /// true if the volume format supports persistent object identifiers and can look up file system objects by their IDs (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsPersistentIDsKey = - _lookup('NSURLVolumeSupportsPersistentIDsKey'); + ffi.Pointer get NSFTPPropertyFileOffsetKey => + _NSFTPPropertyFileOffsetKey.value; - NSURLResourceKey get NSURLVolumeSupportsPersistentIDsKey => - _NSURLVolumeSupportsPersistentIDsKey.value; + set NSFTPPropertyFileOffsetKey(ffi.Pointer value) => + _NSFTPPropertyFileOffsetKey.value = value; - set NSURLVolumeSupportsPersistentIDsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsPersistentIDsKey.value = value; + late final ffi.Pointer> _NSFTPPropertyFTPProxy = + _lookup>('NSFTPPropertyFTPProxy'); - /// true if the volume format supports symbolic links (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsSymbolicLinksKey = - _lookup('NSURLVolumeSupportsSymbolicLinksKey'); + ffi.Pointer get NSFTPPropertyFTPProxy => + _NSFTPPropertyFTPProxy.value; - NSURLResourceKey get NSURLVolumeSupportsSymbolicLinksKey => - _NSURLVolumeSupportsSymbolicLinksKey.value; + set NSFTPPropertyFTPProxy(ffi.Pointer value) => + _NSFTPPropertyFTPProxy.value = value; - set NSURLVolumeSupportsSymbolicLinksKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSymbolicLinksKey.value = value; + /// A string constant for the "file" URL scheme. If you are using this to compare to a URL's scheme to see if it is a file URL, you should instead use the NSURL fileURL property -- the fileURL property is much faster. + late final ffi.Pointer> _NSURLFileScheme = + _lookup>('NSURLFileScheme'); - /// true if the volume format supports hard links (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsHardLinksKey = - _lookup('NSURLVolumeSupportsHardLinksKey'); + ffi.Pointer get NSURLFileScheme => _NSURLFileScheme.value; - NSURLResourceKey get NSURLVolumeSupportsHardLinksKey => - _NSURLVolumeSupportsHardLinksKey.value; + set NSURLFileScheme(ffi.Pointer value) => + _NSURLFileScheme.value = value; - set NSURLVolumeSupportsHardLinksKey(NSURLResourceKey value) => - _NSURLVolumeSupportsHardLinksKey.value = value; + /// Key for the resource properties that have not been set after setResourceValues:error: returns an error, returned as an array of of strings. + late final ffi.Pointer _NSURLKeysOfUnsetValuesKey = + _lookup('NSURLKeysOfUnsetValuesKey'); - /// true if the volume format supports a journal used to speed recovery in case of unplanned restart (such as a power outage or crash). This does not necessarily mean the volume is actively using a journal. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsJournalingKey = - _lookup('NSURLVolumeSupportsJournalingKey'); + NSURLResourceKey get NSURLKeysOfUnsetValuesKey => + _NSURLKeysOfUnsetValuesKey.value; - NSURLResourceKey get NSURLVolumeSupportsJournalingKey => - _NSURLVolumeSupportsJournalingKey.value; + set NSURLKeysOfUnsetValuesKey(NSURLResourceKey value) => + _NSURLKeysOfUnsetValuesKey.value = value; - set NSURLVolumeSupportsJournalingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsJournalingKey.value = value; + /// The resource name provided by the file system (Read-write, value type NSString) + late final ffi.Pointer _NSURLNameKey = + _lookup('NSURLNameKey'); - /// true if the volume is currently using a journal for speedy recovery after an unplanned restart. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsJournalingKey = - _lookup('NSURLVolumeIsJournalingKey'); + NSURLResourceKey get NSURLNameKey => _NSURLNameKey.value; - NSURLResourceKey get NSURLVolumeIsJournalingKey => - _NSURLVolumeIsJournalingKey.value; + set NSURLNameKey(NSURLResourceKey value) => _NSURLNameKey.value = value; - set NSURLVolumeIsJournalingKey(NSURLResourceKey value) => - _NSURLVolumeIsJournalingKey.value = value; + /// Localized or extension-hidden name as displayed to users (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedNameKey = + _lookup('NSURLLocalizedNameKey'); - /// true if the volume format supports sparse files, that is, files which can have 'holes' that have never been written to, and thus do not consume space on disk. A sparse file may have an allocated size on disk that is less than its logical length (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsSparseFilesKey = - _lookup('NSURLVolumeSupportsSparseFilesKey'); + NSURLResourceKey get NSURLLocalizedNameKey => _NSURLLocalizedNameKey.value; - NSURLResourceKey get NSURLVolumeSupportsSparseFilesKey => - _NSURLVolumeSupportsSparseFilesKey.value; + set NSURLLocalizedNameKey(NSURLResourceKey value) => + _NSURLLocalizedNameKey.value = value; - set NSURLVolumeSupportsSparseFilesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSparseFilesKey.value = value; + /// True for regular files (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsRegularFileKey = + _lookup('NSURLIsRegularFileKey'); - /// For security reasons, parts of a file (runs) that have never been written to must appear to contain zeroes. true if the volume keeps track of allocated but unwritten runs of a file so that it can substitute zeroes without actually writing zeroes to the media. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsZeroRunsKey = - _lookup('NSURLVolumeSupportsZeroRunsKey'); + NSURLResourceKey get NSURLIsRegularFileKey => _NSURLIsRegularFileKey.value; - NSURLResourceKey get NSURLVolumeSupportsZeroRunsKey => - _NSURLVolumeSupportsZeroRunsKey.value; + set NSURLIsRegularFileKey(NSURLResourceKey value) => + _NSURLIsRegularFileKey.value = value; - set NSURLVolumeSupportsZeroRunsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsZeroRunsKey.value = value; + /// True for directories (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsDirectoryKey = + _lookup('NSURLIsDirectoryKey'); - /// true if the volume format treats upper and lower case characters in file and directory names as different. Otherwise an upper case character is equivalent to a lower case character, and you can't have two names that differ solely in the case of the characters. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsCaseSensitiveNamesKey = - _lookup('NSURLVolumeSupportsCaseSensitiveNamesKey'); + NSURLResourceKey get NSURLIsDirectoryKey => _NSURLIsDirectoryKey.value; - NSURLResourceKey get NSURLVolumeSupportsCaseSensitiveNamesKey => - _NSURLVolumeSupportsCaseSensitiveNamesKey.value; + set NSURLIsDirectoryKey(NSURLResourceKey value) => + _NSURLIsDirectoryKey.value = value; - set NSURLVolumeSupportsCaseSensitiveNamesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCaseSensitiveNamesKey.value = value; + /// True for symlinks (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsSymbolicLinkKey = + _lookup('NSURLIsSymbolicLinkKey'); - /// true if the volume format preserves the case of file and directory names. Otherwise the volume may change the case of some characters (typically making them all upper or all lower case). (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsCasePreservedNamesKey = - _lookup('NSURLVolumeSupportsCasePreservedNamesKey'); + NSURLResourceKey get NSURLIsSymbolicLinkKey => _NSURLIsSymbolicLinkKey.value; - NSURLResourceKey get NSURLVolumeSupportsCasePreservedNamesKey => - _NSURLVolumeSupportsCasePreservedNamesKey.value; + set NSURLIsSymbolicLinkKey(NSURLResourceKey value) => + _NSURLIsSymbolicLinkKey.value = value; - set NSURLVolumeSupportsCasePreservedNamesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCasePreservedNamesKey.value = value; + /// True for the root directory of a volume (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsVolumeKey = + _lookup('NSURLIsVolumeKey'); - /// true if the volume supports reliable storage of times for the root directory. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsRootDirectoryDatesKey = - _lookup('NSURLVolumeSupportsRootDirectoryDatesKey'); + NSURLResourceKey get NSURLIsVolumeKey => _NSURLIsVolumeKey.value; - NSURLResourceKey get NSURLVolumeSupportsRootDirectoryDatesKey => - _NSURLVolumeSupportsRootDirectoryDatesKey.value; + set NSURLIsVolumeKey(NSURLResourceKey value) => + _NSURLIsVolumeKey.value = value; - set NSURLVolumeSupportsRootDirectoryDatesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsRootDirectoryDatesKey.value = value; + /// True for packaged directories (Read-only 10_6 and 10_7, read-write 10_8, value type boolean NSNumber). Note: You can only set or clear this property on directories; if you try to set this property on non-directory objects, the property is ignored. If the directory is a package for some other reason (extension type, etc), setting this property to false will have no effect. + late final ffi.Pointer _NSURLIsPackageKey = + _lookup('NSURLIsPackageKey'); - /// true if the volume supports returning volume size values (NSURLVolumeTotalCapacityKey and NSURLVolumeAvailableCapacityKey). (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsVolumeSizesKey = - _lookup('NSURLVolumeSupportsVolumeSizesKey'); + NSURLResourceKey get NSURLIsPackageKey => _NSURLIsPackageKey.value; - NSURLResourceKey get NSURLVolumeSupportsVolumeSizesKey => - _NSURLVolumeSupportsVolumeSizesKey.value; + set NSURLIsPackageKey(NSURLResourceKey value) => + _NSURLIsPackageKey.value = value; - set NSURLVolumeSupportsVolumeSizesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsVolumeSizesKey.value = value; + /// True if resource is an application (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsApplicationKey = + _lookup('NSURLIsApplicationKey'); - /// true if the volume can be renamed. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsRenamingKey = - _lookup('NSURLVolumeSupportsRenamingKey'); + NSURLResourceKey get NSURLIsApplicationKey => _NSURLIsApplicationKey.value; - NSURLResourceKey get NSURLVolumeSupportsRenamingKey => - _NSURLVolumeSupportsRenamingKey.value; + set NSURLIsApplicationKey(NSURLResourceKey value) => + _NSURLIsApplicationKey.value = value; - set NSURLVolumeSupportsRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsRenamingKey.value = value; + /// True if the resource is scriptable. Only applies to applications (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLApplicationIsScriptableKey = + _lookup('NSURLApplicationIsScriptableKey'); - /// true if the volume implements whole-file flock(2) style advisory locks, and the O_EXLOCK and O_SHLOCK flags of the open(2) call. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsAdvisoryFileLockingKey = - _lookup('NSURLVolumeSupportsAdvisoryFileLockingKey'); + NSURLResourceKey get NSURLApplicationIsScriptableKey => + _NSURLApplicationIsScriptableKey.value; - NSURLResourceKey get NSURLVolumeSupportsAdvisoryFileLockingKey => - _NSURLVolumeSupportsAdvisoryFileLockingKey.value; + set NSURLApplicationIsScriptableKey(NSURLResourceKey value) => + _NSURLApplicationIsScriptableKey.value = value; - set NSURLVolumeSupportsAdvisoryFileLockingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsAdvisoryFileLockingKey.value = value; + /// True for system-immutable resources (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsSystemImmutableKey = + _lookup('NSURLIsSystemImmutableKey'); - /// true if the volume implements extended security (ACLs). (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsExtendedSecurityKey = - _lookup('NSURLVolumeSupportsExtendedSecurityKey'); + NSURLResourceKey get NSURLIsSystemImmutableKey => + _NSURLIsSystemImmutableKey.value; - NSURLResourceKey get NSURLVolumeSupportsExtendedSecurityKey => - _NSURLVolumeSupportsExtendedSecurityKey.value; + set NSURLIsSystemImmutableKey(NSURLResourceKey value) => + _NSURLIsSystemImmutableKey.value = value; - set NSURLVolumeSupportsExtendedSecurityKey(NSURLResourceKey value) => - _NSURLVolumeSupportsExtendedSecurityKey.value = value; + /// True for user-immutable resources (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsUserImmutableKey = + _lookup('NSURLIsUserImmutableKey'); - /// true if the volume should be visible via the GUI (i.e., appear on the Desktop as a separate volume). (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsBrowsableKey = - _lookup('NSURLVolumeIsBrowsableKey'); + NSURLResourceKey get NSURLIsUserImmutableKey => + _NSURLIsUserImmutableKey.value; - NSURLResourceKey get NSURLVolumeIsBrowsableKey => - _NSURLVolumeIsBrowsableKey.value; + set NSURLIsUserImmutableKey(NSURLResourceKey value) => + _NSURLIsUserImmutableKey.value = value; - set NSURLVolumeIsBrowsableKey(NSURLResourceKey value) => - _NSURLVolumeIsBrowsableKey.value = value; + /// True for resources normally not displayed to users (Read-write, value type boolean NSNumber). Note: If the resource is a hidden because its name starts with a period, setting this property to false will not change the property. + late final ffi.Pointer _NSURLIsHiddenKey = + _lookup('NSURLIsHiddenKey'); - /// The largest file size (in bytes) supported by this file system, or nil if this cannot be determined. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeMaximumFileSizeKey = - _lookup('NSURLVolumeMaximumFileSizeKey'); + NSURLResourceKey get NSURLIsHiddenKey => _NSURLIsHiddenKey.value; - NSURLResourceKey get NSURLVolumeMaximumFileSizeKey => - _NSURLVolumeMaximumFileSizeKey.value; + set NSURLIsHiddenKey(NSURLResourceKey value) => + _NSURLIsHiddenKey.value = value; - set NSURLVolumeMaximumFileSizeKey(NSURLResourceKey value) => - _NSURLVolumeMaximumFileSizeKey.value = value; + /// True for resources whose filename extension is removed from the localized name property (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLHasHiddenExtensionKey = + _lookup('NSURLHasHiddenExtensionKey'); - /// true if the volume's media is ejectable from the drive mechanism under software control. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsEjectableKey = - _lookup('NSURLVolumeIsEjectableKey'); + NSURLResourceKey get NSURLHasHiddenExtensionKey => + _NSURLHasHiddenExtensionKey.value; - NSURLResourceKey get NSURLVolumeIsEjectableKey => - _NSURLVolumeIsEjectableKey.value; + set NSURLHasHiddenExtensionKey(NSURLResourceKey value) => + _NSURLHasHiddenExtensionKey.value = value; - set NSURLVolumeIsEjectableKey(NSURLResourceKey value) => - _NSURLVolumeIsEjectableKey.value = value; + /// The date the resource was created (Read-write, value type NSDate) + late final ffi.Pointer _NSURLCreationDateKey = + _lookup('NSURLCreationDateKey'); - /// true if the volume's media is removable from the drive mechanism. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsRemovableKey = - _lookup('NSURLVolumeIsRemovableKey'); + NSURLResourceKey get NSURLCreationDateKey => _NSURLCreationDateKey.value; - NSURLResourceKey get NSURLVolumeIsRemovableKey => - _NSURLVolumeIsRemovableKey.value; + set NSURLCreationDateKey(NSURLResourceKey value) => + _NSURLCreationDateKey.value = value; - set NSURLVolumeIsRemovableKey(NSURLResourceKey value) => - _NSURLVolumeIsRemovableKey.value = value; + /// The date the resource was last accessed (Read-write, value type NSDate) + late final ffi.Pointer _NSURLContentAccessDateKey = + _lookup('NSURLContentAccessDateKey'); - /// true if the volume's device is connected to an internal bus, false if connected to an external bus, or nil if not available. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsInternalKey = - _lookup('NSURLVolumeIsInternalKey'); + NSURLResourceKey get NSURLContentAccessDateKey => + _NSURLContentAccessDateKey.value; - NSURLResourceKey get NSURLVolumeIsInternalKey => - _NSURLVolumeIsInternalKey.value; + set NSURLContentAccessDateKey(NSURLResourceKey value) => + _NSURLContentAccessDateKey.value = value; - set NSURLVolumeIsInternalKey(NSURLResourceKey value) => - _NSURLVolumeIsInternalKey.value = value; + /// The time the resource content was last modified (Read-write, value type NSDate) + late final ffi.Pointer _NSURLContentModificationDateKey = + _lookup('NSURLContentModificationDateKey'); - /// true if the volume is automounted. Note: do not mistake this with the functionality provided by kCFURLVolumeSupportsBrowsingKey. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsAutomountedKey = - _lookup('NSURLVolumeIsAutomountedKey'); + NSURLResourceKey get NSURLContentModificationDateKey => + _NSURLContentModificationDateKey.value; - NSURLResourceKey get NSURLVolumeIsAutomountedKey => - _NSURLVolumeIsAutomountedKey.value; + set NSURLContentModificationDateKey(NSURLResourceKey value) => + _NSURLContentModificationDateKey.value = value; - set NSURLVolumeIsAutomountedKey(NSURLResourceKey value) => - _NSURLVolumeIsAutomountedKey.value = value; + /// The time the resource's attributes were last modified (Read-only, value type NSDate) + late final ffi.Pointer _NSURLAttributeModificationDateKey = + _lookup('NSURLAttributeModificationDateKey'); - /// true if the volume is stored on a local device. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsLocalKey = - _lookup('NSURLVolumeIsLocalKey'); + NSURLResourceKey get NSURLAttributeModificationDateKey => + _NSURLAttributeModificationDateKey.value; - NSURLResourceKey get NSURLVolumeIsLocalKey => _NSURLVolumeIsLocalKey.value; + set NSURLAttributeModificationDateKey(NSURLResourceKey value) => + _NSURLAttributeModificationDateKey.value = value; - set NSURLVolumeIsLocalKey(NSURLResourceKey value) => - _NSURLVolumeIsLocalKey.value = value; + /// Number of hard links to the resource (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLLinkCountKey = + _lookup('NSURLLinkCountKey'); - /// true if the volume is read-only. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsReadOnlyKey = - _lookup('NSURLVolumeIsReadOnlyKey'); + NSURLResourceKey get NSURLLinkCountKey => _NSURLLinkCountKey.value; - NSURLResourceKey get NSURLVolumeIsReadOnlyKey => - _NSURLVolumeIsReadOnlyKey.value; + set NSURLLinkCountKey(NSURLResourceKey value) => + _NSURLLinkCountKey.value = value; - set NSURLVolumeIsReadOnlyKey(NSURLResourceKey value) => - _NSURLVolumeIsReadOnlyKey.value = value; + /// The resource's parent directory, if any (Read-only, value type NSURL) + late final ffi.Pointer _NSURLParentDirectoryURLKey = + _lookup('NSURLParentDirectoryURLKey'); - /// The volume's creation date, or nil if this cannot be determined. (Read-only, value type NSDate) - late final ffi.Pointer _NSURLVolumeCreationDateKey = - _lookup('NSURLVolumeCreationDateKey'); + NSURLResourceKey get NSURLParentDirectoryURLKey => + _NSURLParentDirectoryURLKey.value; - NSURLResourceKey get NSURLVolumeCreationDateKey => - _NSURLVolumeCreationDateKey.value; + set NSURLParentDirectoryURLKey(NSURLResourceKey value) => + _NSURLParentDirectoryURLKey.value = value; - set NSURLVolumeCreationDateKey(NSURLResourceKey value) => - _NSURLVolumeCreationDateKey.value = value; + /// URL of the volume on which the resource is stored (Read-only, value type NSURL) + late final ffi.Pointer _NSURLVolumeURLKey = + _lookup('NSURLVolumeURLKey'); - /// The NSURL needed to remount a network volume, or nil if not available. (Read-only, value type NSURL) - late final ffi.Pointer _NSURLVolumeURLForRemountingKey = - _lookup('NSURLVolumeURLForRemountingKey'); + NSURLResourceKey get NSURLVolumeURLKey => _NSURLVolumeURLKey.value; - NSURLResourceKey get NSURLVolumeURLForRemountingKey => - _NSURLVolumeURLForRemountingKey.value; + set NSURLVolumeURLKey(NSURLResourceKey value) => + _NSURLVolumeURLKey.value = value; - set NSURLVolumeURLForRemountingKey(NSURLResourceKey value) => - _NSURLVolumeURLForRemountingKey.value = value; + /// Uniform type identifier (UTI) for the resource (Read-only, value type NSString) + late final ffi.Pointer _NSURLTypeIdentifierKey = + _lookup('NSURLTypeIdentifierKey'); - /// The volume's persistent UUID as a string, or nil if a persistent UUID is not available for the volume. (Read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeUUIDStringKey = - _lookup('NSURLVolumeUUIDStringKey'); + NSURLResourceKey get NSURLTypeIdentifierKey => _NSURLTypeIdentifierKey.value; - NSURLResourceKey get NSURLVolumeUUIDStringKey => - _NSURLVolumeUUIDStringKey.value; + set NSURLTypeIdentifierKey(NSURLResourceKey value) => + _NSURLTypeIdentifierKey.value = value; - set NSURLVolumeUUIDStringKey(NSURLResourceKey value) => - _NSURLVolumeUUIDStringKey.value = value; + /// File type (UTType) for the resource (Read-only, value type UTType) + late final ffi.Pointer _NSURLContentTypeKey = + _lookup('NSURLContentTypeKey'); - /// The name of the volume (Read-write if NSURLVolumeSupportsRenamingKey is YES, otherwise read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeNameKey = - _lookup('NSURLVolumeNameKey'); + NSURLResourceKey get NSURLContentTypeKey => _NSURLContentTypeKey.value; - NSURLResourceKey get NSURLVolumeNameKey => _NSURLVolumeNameKey.value; + set NSURLContentTypeKey(NSURLResourceKey value) => + _NSURLContentTypeKey.value = value; - set NSURLVolumeNameKey(NSURLResourceKey value) => - _NSURLVolumeNameKey.value = value; + /// User-visible type or "kind" description (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedTypeDescriptionKey = + _lookup('NSURLLocalizedTypeDescriptionKey'); - /// The user-presentable name of the volume (Read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeLocalizedNameKey = - _lookup('NSURLVolumeLocalizedNameKey'); + NSURLResourceKey get NSURLLocalizedTypeDescriptionKey => + _NSURLLocalizedTypeDescriptionKey.value; - NSURLResourceKey get NSURLVolumeLocalizedNameKey => - _NSURLVolumeLocalizedNameKey.value; + set NSURLLocalizedTypeDescriptionKey(NSURLResourceKey value) => + _NSURLLocalizedTypeDescriptionKey.value = value; - set NSURLVolumeLocalizedNameKey(NSURLResourceKey value) => - _NSURLVolumeLocalizedNameKey.value = value; + /// The label number assigned to the resource (Read-write, value type NSNumber) + late final ffi.Pointer _NSURLLabelNumberKey = + _lookup('NSURLLabelNumberKey'); - /// true if the volume is encrypted. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsEncryptedKey = - _lookup('NSURLVolumeIsEncryptedKey'); + NSURLResourceKey get NSURLLabelNumberKey => _NSURLLabelNumberKey.value; - NSURLResourceKey get NSURLVolumeIsEncryptedKey => - _NSURLVolumeIsEncryptedKey.value; + set NSURLLabelNumberKey(NSURLResourceKey value) => + _NSURLLabelNumberKey.value = value; - set NSURLVolumeIsEncryptedKey(NSURLResourceKey value) => - _NSURLVolumeIsEncryptedKey.value = value; + /// The color of the assigned label (Read-only, value type NSColor) + late final ffi.Pointer _NSURLLabelColorKey = + _lookup('NSURLLabelColorKey'); - /// true if the volume is the root filesystem. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsRootFileSystemKey = - _lookup('NSURLVolumeIsRootFileSystemKey'); + NSURLResourceKey get NSURLLabelColorKey => _NSURLLabelColorKey.value; - NSURLResourceKey get NSURLVolumeIsRootFileSystemKey => - _NSURLVolumeIsRootFileSystemKey.value; + set NSURLLabelColorKey(NSURLResourceKey value) => + _NSURLLabelColorKey.value = value; - set NSURLVolumeIsRootFileSystemKey(NSURLResourceKey value) => - _NSURLVolumeIsRootFileSystemKey.value = value; + /// The user-visible label text (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedLabelKey = + _lookup('NSURLLocalizedLabelKey'); - /// true if the volume supports transparent decompression of compressed files using decmpfs. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsCompressionKey = - _lookup('NSURLVolumeSupportsCompressionKey'); + NSURLResourceKey get NSURLLocalizedLabelKey => _NSURLLocalizedLabelKey.value; - NSURLResourceKey get NSURLVolumeSupportsCompressionKey => - _NSURLVolumeSupportsCompressionKey.value; + set NSURLLocalizedLabelKey(NSURLResourceKey value) => + _NSURLLocalizedLabelKey.value = value; - set NSURLVolumeSupportsCompressionKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCompressionKey.value = value; + /// The icon normally displayed for the resource (Read-only, value type NSImage) + late final ffi.Pointer _NSURLEffectiveIconKey = + _lookup('NSURLEffectiveIconKey'); - /// true if the volume supports clonefile(2) (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsFileCloningKey = - _lookup('NSURLVolumeSupportsFileCloningKey'); + NSURLResourceKey get NSURLEffectiveIconKey => _NSURLEffectiveIconKey.value; - NSURLResourceKey get NSURLVolumeSupportsFileCloningKey => - _NSURLVolumeSupportsFileCloningKey.value; + set NSURLEffectiveIconKey(NSURLResourceKey value) => + _NSURLEffectiveIconKey.value = value; - set NSURLVolumeSupportsFileCloningKey(NSURLResourceKey value) => - _NSURLVolumeSupportsFileCloningKey.value = value; + /// The custom icon assigned to the resource, if any (Currently not implemented, value type NSImage) + late final ffi.Pointer _NSURLCustomIconKey = + _lookup('NSURLCustomIconKey'); - /// true if the volume supports renamex_np(2)'s RENAME_SWAP option (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsSwapRenamingKey = - _lookup('NSURLVolumeSupportsSwapRenamingKey'); + NSURLResourceKey get NSURLCustomIconKey => _NSURLCustomIconKey.value; - NSURLResourceKey get NSURLVolumeSupportsSwapRenamingKey => - _NSURLVolumeSupportsSwapRenamingKey.value; + set NSURLCustomIconKey(NSURLResourceKey value) => + _NSURLCustomIconKey.value = value; - set NSURLVolumeSupportsSwapRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSwapRenamingKey.value = value; + /// An identifier which can be used to compare two file system objects for equality using -isEqual (i.e, two object identifiers are equal if they have the same file system path or if the paths are linked to same inode on the same file system). This identifier is not persistent across system restarts. (Read-only, value type id ) + late final ffi.Pointer _NSURLFileResourceIdentifierKey = + _lookup('NSURLFileResourceIdentifierKey'); - /// true if the volume supports renamex_np(2)'s RENAME_EXCL option (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsExclusiveRenamingKey = - _lookup('NSURLVolumeSupportsExclusiveRenamingKey'); + NSURLResourceKey get NSURLFileResourceIdentifierKey => + _NSURLFileResourceIdentifierKey.value; - NSURLResourceKey get NSURLVolumeSupportsExclusiveRenamingKey => - _NSURLVolumeSupportsExclusiveRenamingKey.value; + set NSURLFileResourceIdentifierKey(NSURLResourceKey value) => + _NSURLFileResourceIdentifierKey.value = value; - set NSURLVolumeSupportsExclusiveRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsExclusiveRenamingKey.value = value; + /// An identifier that can be used to identify the volume the file system object is on. Other objects on the same volume will have the same volume identifier and can be compared using for equality using -isEqual. This identifier is not persistent across system restarts. (Read-only, value type id ) + late final ffi.Pointer _NSURLVolumeIdentifierKey = + _lookup('NSURLVolumeIdentifierKey'); - /// true if the volume supports making files immutable with the NSURLIsUserImmutableKey or NSURLIsSystemImmutableKey properties (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsImmutableFilesKey = - _lookup('NSURLVolumeSupportsImmutableFilesKey'); + NSURLResourceKey get NSURLVolumeIdentifierKey => + _NSURLVolumeIdentifierKey.value; - NSURLResourceKey get NSURLVolumeSupportsImmutableFilesKey => - _NSURLVolumeSupportsImmutableFilesKey.value; + set NSURLVolumeIdentifierKey(NSURLResourceKey value) => + _NSURLVolumeIdentifierKey.value = value; - set NSURLVolumeSupportsImmutableFilesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsImmutableFilesKey.value = value; + /// The optimal block size when reading or writing this file's data, or nil if not available. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLPreferredIOBlockSizeKey = + _lookup('NSURLPreferredIOBlockSizeKey'); - /// true if the volume supports setting POSIX access permissions with the NSURLFileSecurityKey property (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsAccessPermissionsKey = - _lookup('NSURLVolumeSupportsAccessPermissionsKey'); + NSURLResourceKey get NSURLPreferredIOBlockSizeKey => + _NSURLPreferredIOBlockSizeKey.value; - NSURLResourceKey get NSURLVolumeSupportsAccessPermissionsKey => - _NSURLVolumeSupportsAccessPermissionsKey.value; + set NSURLPreferredIOBlockSizeKey(NSURLResourceKey value) => + _NSURLPreferredIOBlockSizeKey.value = value; - set NSURLVolumeSupportsAccessPermissionsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsAccessPermissionsKey.value = value; + /// true if this process (as determined by EUID) can read the resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsReadableKey = + _lookup('NSURLIsReadableKey'); - /// True if the volume supports the File Protection attribute (see NSURLFileProtectionKey). (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsFileProtectionKey = - _lookup('NSURLVolumeSupportsFileProtectionKey'); + NSURLResourceKey get NSURLIsReadableKey => _NSURLIsReadableKey.value; - NSURLResourceKey get NSURLVolumeSupportsFileProtectionKey => - _NSURLVolumeSupportsFileProtectionKey.value; + set NSURLIsReadableKey(NSURLResourceKey value) => + _NSURLIsReadableKey.value = value; - set NSURLVolumeSupportsFileProtectionKey(NSURLResourceKey value) => - _NSURLVolumeSupportsFileProtectionKey.value = value; + /// true if this process (as determined by EUID) can write to the resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsWritableKey = + _lookup('NSURLIsWritableKey'); - /// (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeAvailableCapacityForImportantUsageKey = - _lookup( - 'NSURLVolumeAvailableCapacityForImportantUsageKey'); + NSURLResourceKey get NSURLIsWritableKey => _NSURLIsWritableKey.value; - NSURLResourceKey get NSURLVolumeAvailableCapacityForImportantUsageKey => - _NSURLVolumeAvailableCapacityForImportantUsageKey.value; + set NSURLIsWritableKey(NSURLResourceKey value) => + _NSURLIsWritableKey.value = value; - set NSURLVolumeAvailableCapacityForImportantUsageKey( - NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityForImportantUsageKey.value = value; + /// true if this process (as determined by EUID) can execute a file resource or search a directory resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsExecutableKey = + _lookup('NSURLIsExecutableKey'); - /// (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey = - _lookup( - 'NSURLVolumeAvailableCapacityForOpportunisticUsageKey'); + NSURLResourceKey get NSURLIsExecutableKey => _NSURLIsExecutableKey.value; - NSURLResourceKey get NSURLVolumeAvailableCapacityForOpportunisticUsageKey => - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value; + set NSURLIsExecutableKey(NSURLResourceKey value) => + _NSURLIsExecutableKey.value = value; - set NSURLVolumeAvailableCapacityForOpportunisticUsageKey( - NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; + /// The file system object's security information encapsulated in a NSFileSecurity object. (Read-write, Value type NSFileSecurity) + late final ffi.Pointer _NSURLFileSecurityKey = + _lookup('NSURLFileSecurityKey'); - /// true if this item is synced to the cloud, false if it is only a local file. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsUbiquitousItemKey = - _lookup('NSURLIsUbiquitousItemKey'); + NSURLResourceKey get NSURLFileSecurityKey => _NSURLFileSecurityKey.value; - NSURLResourceKey get NSURLIsUbiquitousItemKey => - _NSURLIsUbiquitousItemKey.value; + set NSURLFileSecurityKey(NSURLResourceKey value) => + _NSURLFileSecurityKey.value = value; - set NSURLIsUbiquitousItemKey(NSURLResourceKey value) => - _NSURLIsUbiquitousItemKey.value = value; + /// true if resource should be excluded from backups, false otherwise (Read-write, value type boolean NSNumber). This property is only useful for excluding cache and other application support files which are not needed in a backup. Some operations commonly made to user documents will cause this property to be reset to false and so this property should not be used on user documents. + late final ffi.Pointer _NSURLIsExcludedFromBackupKey = + _lookup('NSURLIsExcludedFromBackupKey'); - /// true if this item has conflicts outstanding. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemHasUnresolvedConflictsKey = - _lookup('NSURLUbiquitousItemHasUnresolvedConflictsKey'); + NSURLResourceKey get NSURLIsExcludedFromBackupKey => + _NSURLIsExcludedFromBackupKey.value; - NSURLResourceKey get NSURLUbiquitousItemHasUnresolvedConflictsKey => - _NSURLUbiquitousItemHasUnresolvedConflictsKey.value; + set NSURLIsExcludedFromBackupKey(NSURLResourceKey value) => + _NSURLIsExcludedFromBackupKey.value = value; - set NSURLUbiquitousItemHasUnresolvedConflictsKey(NSURLResourceKey value) => - _NSURLUbiquitousItemHasUnresolvedConflictsKey.value = value; + /// The array of Tag names (Read-write, value type NSArray of NSString) + late final ffi.Pointer _NSURLTagNamesKey = + _lookup('NSURLTagNamesKey'); - /// equivalent to NSURLUbiquitousItemDownloadingStatusKey == NSURLUbiquitousItemDownloadingStatusCurrent. Has never behaved as documented in earlier releases, hence deprecated. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsDownloadedKey = - _lookup('NSURLUbiquitousItemIsDownloadedKey'); + NSURLResourceKey get NSURLTagNamesKey => _NSURLTagNamesKey.value; - NSURLResourceKey get NSURLUbiquitousItemIsDownloadedKey => - _NSURLUbiquitousItemIsDownloadedKey.value; + set NSURLTagNamesKey(NSURLResourceKey value) => + _NSURLTagNamesKey.value = value; - set NSURLUbiquitousItemIsDownloadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsDownloadedKey.value = value; + /// the URL's path as a file system path (Read-only, value type NSString) + late final ffi.Pointer _NSURLPathKey = + _lookup('NSURLPathKey'); - /// true if data is being downloaded for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemIsDownloadingKey = - _lookup('NSURLUbiquitousItemIsDownloadingKey'); + NSURLResourceKey get NSURLPathKey => _NSURLPathKey.value; - NSURLResourceKey get NSURLUbiquitousItemIsDownloadingKey => - _NSURLUbiquitousItemIsDownloadingKey.value; + set NSURLPathKey(NSURLResourceKey value) => _NSURLPathKey.value = value; - set NSURLUbiquitousItemIsDownloadingKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsDownloadingKey.value = value; + /// the URL's path as a canonical absolute file system path (Read-only, value type NSString) + late final ffi.Pointer _NSURLCanonicalPathKey = + _lookup('NSURLCanonicalPathKey'); - /// true if there is data present in the cloud for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsUploadedKey = - _lookup('NSURLUbiquitousItemIsUploadedKey'); + NSURLResourceKey get NSURLCanonicalPathKey => _NSURLCanonicalPathKey.value; - NSURLResourceKey get NSURLUbiquitousItemIsUploadedKey => - _NSURLUbiquitousItemIsUploadedKey.value; + set NSURLCanonicalPathKey(NSURLResourceKey value) => + _NSURLCanonicalPathKey.value = value; - set NSURLUbiquitousItemIsUploadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsUploadedKey.value = value; + /// true if this URL is a file system trigger directory. Traversing or opening a file system trigger will cause an attempt to mount a file system on the trigger directory. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsMountTriggerKey = + _lookup('NSURLIsMountTriggerKey'); - /// true if data is being uploaded for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsUploadingKey = - _lookup('NSURLUbiquitousItemIsUploadingKey'); + NSURLResourceKey get NSURLIsMountTriggerKey => _NSURLIsMountTriggerKey.value; - NSURLResourceKey get NSURLUbiquitousItemIsUploadingKey => - _NSURLUbiquitousItemIsUploadingKey.value; + set NSURLIsMountTriggerKey(NSURLResourceKey value) => + _NSURLIsMountTriggerKey.value = value; - set NSURLUbiquitousItemIsUploadingKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsUploadingKey.value = value; + /// An opaque generation identifier which can be compared using isEqual: to determine if the data in a document has been modified. For URLs which refer to the same file inode, the generation identifier will change when the data in the file's data fork is changed (changes to extended attributes or other file system metadata do not change the generation identifier). For URLs which refer to the same directory inode, the generation identifier will change when direct children of that directory are added, removed or renamed (changes to the data of the direct children of that directory will not change the generation identifier). The generation identifier is persistent across system restarts. The generation identifier is tied to a specific document on a specific volume and is not transferred when the document is copied to another volume. This property is not supported by all volumes. (Read-only, value type id ) + late final ffi.Pointer _NSURLGenerationIdentifierKey = + _lookup('NSURLGenerationIdentifierKey'); - /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead - late final ffi.Pointer - _NSURLUbiquitousItemPercentDownloadedKey = - _lookup('NSURLUbiquitousItemPercentDownloadedKey'); + NSURLResourceKey get NSURLGenerationIdentifierKey => + _NSURLGenerationIdentifierKey.value; - NSURLResourceKey get NSURLUbiquitousItemPercentDownloadedKey => - _NSURLUbiquitousItemPercentDownloadedKey.value; + set NSURLGenerationIdentifierKey(NSURLResourceKey value) => + _NSURLGenerationIdentifierKey.value = value; - set NSURLUbiquitousItemPercentDownloadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemPercentDownloadedKey.value = value; + /// The document identifier -- a value assigned by the kernel to a document (which can be either a file or directory) and is used to identify the document regardless of where it gets moved on a volume. The document identifier survives "safe save” operations; i.e it is sticky to the path it was assigned to (-replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: is the preferred safe-save API). The document identifier is persistent across system restarts. The document identifier is not transferred when the file is copied. Document identifiers are only unique within a single volume. This property is not supported by all volumes. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLDocumentIdentifierKey = + _lookup('NSURLDocumentIdentifierKey'); - /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead - late final ffi.Pointer - _NSURLUbiquitousItemPercentUploadedKey = - _lookup('NSURLUbiquitousItemPercentUploadedKey'); + NSURLResourceKey get NSURLDocumentIdentifierKey => + _NSURLDocumentIdentifierKey.value; - NSURLResourceKey get NSURLUbiquitousItemPercentUploadedKey => - _NSURLUbiquitousItemPercentUploadedKey.value; + set NSURLDocumentIdentifierKey(NSURLResourceKey value) => + _NSURLDocumentIdentifierKey.value = value; - set NSURLUbiquitousItemPercentUploadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemPercentUploadedKey.value = value; + /// The date the resource was created, or renamed into or within its parent directory. Note that inconsistent behavior may be observed when this attribute is requested on hard-linked items. This property is not supported by all volumes. (Read-only before macOS 10.15, iOS 13.0, watchOS 6.0, and tvOS 13.0; Read-write after, value type NSDate) + late final ffi.Pointer _NSURLAddedToDirectoryDateKey = + _lookup('NSURLAddedToDirectoryDateKey'); - /// returns the download status of this item. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusKey = - _lookup('NSURLUbiquitousItemDownloadingStatusKey'); + NSURLResourceKey get NSURLAddedToDirectoryDateKey => + _NSURLAddedToDirectoryDateKey.value; - NSURLResourceKey get NSURLUbiquitousItemDownloadingStatusKey => - _NSURLUbiquitousItemDownloadingStatusKey.value; + set NSURLAddedToDirectoryDateKey(NSURLResourceKey value) => + _NSURLAddedToDirectoryDateKey.value = value; - set NSURLUbiquitousItemDownloadingStatusKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadingStatusKey.value = value; + /// The quarantine properties as defined in LSQuarantine.h. To remove quarantine information from a file, pass NSNull as the value when setting this property. (Read-write, value type NSDictionary) + late final ffi.Pointer _NSURLQuarantinePropertiesKey = + _lookup('NSURLQuarantinePropertiesKey'); - /// returns the error when downloading the item from iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingErrorKey = - _lookup('NSURLUbiquitousItemDownloadingErrorKey'); + NSURLResourceKey get NSURLQuarantinePropertiesKey => + _NSURLQuarantinePropertiesKey.value; - NSURLResourceKey get NSURLUbiquitousItemDownloadingErrorKey => - _NSURLUbiquitousItemDownloadingErrorKey.value; + set NSURLQuarantinePropertiesKey(NSURLResourceKey value) => + _NSURLQuarantinePropertiesKey.value = value; - set NSURLUbiquitousItemDownloadingErrorKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadingErrorKey.value = value; + /// Returns the file system object type. (Read-only, value type NSString) + late final ffi.Pointer _NSURLFileResourceTypeKey = + _lookup('NSURLFileResourceTypeKey'); - /// returns the error when uploading the item to iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) - late final ffi.Pointer - _NSURLUbiquitousItemUploadingErrorKey = - _lookup('NSURLUbiquitousItemUploadingErrorKey'); + NSURLResourceKey get NSURLFileResourceTypeKey => + _NSURLFileResourceTypeKey.value; - NSURLResourceKey get NSURLUbiquitousItemUploadingErrorKey => - _NSURLUbiquitousItemUploadingErrorKey.value; + set NSURLFileResourceTypeKey(NSURLResourceKey value) => + _NSURLFileResourceTypeKey.value = value; - set NSURLUbiquitousItemUploadingErrorKey(NSURLResourceKey value) => - _NSURLUbiquitousItemUploadingErrorKey.value = value; + /// A 64-bit value assigned by APFS that identifies a file's content data stream. Only cloned files and their originals can have the same identifier. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileContentIdentifierKey = + _lookup('NSURLFileContentIdentifierKey'); - /// returns whether a download of this item has already been requested with an API like -startDownloadingUbiquitousItemAtURL:error: (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemDownloadRequestedKey = - _lookup('NSURLUbiquitousItemDownloadRequestedKey'); + NSURLResourceKey get NSURLFileContentIdentifierKey => + _NSURLFileContentIdentifierKey.value; - NSURLResourceKey get NSURLUbiquitousItemDownloadRequestedKey => - _NSURLUbiquitousItemDownloadRequestedKey.value; + set NSURLFileContentIdentifierKey(NSURLResourceKey value) => + _NSURLFileContentIdentifierKey.value = value; - set NSURLUbiquitousItemDownloadRequestedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadRequestedKey.value = value; + /// True for cloned files and their originals that may share all, some, or no data blocks. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLMayShareFileContentKey = + _lookup('NSURLMayShareFileContentKey'); - /// returns the name of this item's container as displayed to users. - late final ffi.Pointer - _NSURLUbiquitousItemContainerDisplayNameKey = - _lookup('NSURLUbiquitousItemContainerDisplayNameKey'); + NSURLResourceKey get NSURLMayShareFileContentKey => + _NSURLMayShareFileContentKey.value; - NSURLResourceKey get NSURLUbiquitousItemContainerDisplayNameKey => - _NSURLUbiquitousItemContainerDisplayNameKey.value; + set NSURLMayShareFileContentKey(NSURLResourceKey value) => + _NSURLMayShareFileContentKey.value = value; - set NSURLUbiquitousItemContainerDisplayNameKey(NSURLResourceKey value) => - _NSURLUbiquitousItemContainerDisplayNameKey.value = value; + /// True if the file has extended attributes. False guarantees there are none. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLMayHaveExtendedAttributesKey = + _lookup('NSURLMayHaveExtendedAttributesKey'); - /// true if the item is excluded from sync, which means it is locally on disk but won't be available on the server. An excluded item is no longer ubiquitous. (Read-write, value type boolean NSNumber - late final ffi.Pointer - _NSURLUbiquitousItemIsExcludedFromSyncKey = - _lookup('NSURLUbiquitousItemIsExcludedFromSyncKey'); + NSURLResourceKey get NSURLMayHaveExtendedAttributesKey => + _NSURLMayHaveExtendedAttributesKey.value; - NSURLResourceKey get NSURLUbiquitousItemIsExcludedFromSyncKey => - _NSURLUbiquitousItemIsExcludedFromSyncKey.value; + set NSURLMayHaveExtendedAttributesKey(NSURLResourceKey value) => + _NSURLMayHaveExtendedAttributesKey.value = value; - set NSURLUbiquitousItemIsExcludedFromSyncKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsExcludedFromSyncKey.value = value; + /// True if the file can be deleted by the file system when asked to free space. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLIsPurgeableKey = + _lookup('NSURLIsPurgeableKey'); - /// true if the ubiquitous item is shared. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsSharedKey = - _lookup('NSURLUbiquitousItemIsSharedKey'); + NSURLResourceKey get NSURLIsPurgeableKey => _NSURLIsPurgeableKey.value; - NSURLResourceKey get NSURLUbiquitousItemIsSharedKey => - _NSURLUbiquitousItemIsSharedKey.value; + set NSURLIsPurgeableKey(NSURLResourceKey value) => + _NSURLIsPurgeableKey.value = value; - set NSURLUbiquitousItemIsSharedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsSharedKey.value = value; + /// True if the file has sparse regions. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLIsSparseKey = + _lookup('NSURLIsSparseKey'); - /// returns the current user's role for this shared item, or nil if not shared. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousSharedItemCurrentUserRoleKey = - _lookup('NSURLUbiquitousSharedItemCurrentUserRoleKey'); + NSURLResourceKey get NSURLIsSparseKey => _NSURLIsSparseKey.value; - NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserRoleKey => - _NSURLUbiquitousSharedItemCurrentUserRoleKey.value; + set NSURLIsSparseKey(NSURLResourceKey value) => + _NSURLIsSparseKey.value = value; - set NSURLUbiquitousSharedItemCurrentUserRoleKey(NSURLResourceKey value) => - _NSURLUbiquitousSharedItemCurrentUserRoleKey.value = value; + /// The file system object type values returned for the NSURLFileResourceTypeKey + late final ffi.Pointer + _NSURLFileResourceTypeNamedPipe = + _lookup('NSURLFileResourceTypeNamedPipe'); - /// returns the permissions for the current user, or nil if not shared. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey = - _lookup( - 'NSURLUbiquitousSharedItemCurrentUserPermissionsKey'); + NSURLFileResourceType get NSURLFileResourceTypeNamedPipe => + _NSURLFileResourceTypeNamedPipe.value; - NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserPermissionsKey => - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value; + set NSURLFileResourceTypeNamedPipe(NSURLFileResourceType value) => + _NSURLFileResourceTypeNamedPipe.value = value; - set NSURLUbiquitousSharedItemCurrentUserPermissionsKey( - NSURLResourceKey value) => - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value = value; + late final ffi.Pointer + _NSURLFileResourceTypeCharacterSpecial = + _lookup('NSURLFileResourceTypeCharacterSpecial'); - /// returns a NSPersonNameComponents, or nil if the current user. (Read-only, value type NSPersonNameComponents) - late final ffi.Pointer - _NSURLUbiquitousSharedItemOwnerNameComponentsKey = - _lookup( - 'NSURLUbiquitousSharedItemOwnerNameComponentsKey'); + NSURLFileResourceType get NSURLFileResourceTypeCharacterSpecial => + _NSURLFileResourceTypeCharacterSpecial.value; - NSURLResourceKey get NSURLUbiquitousSharedItemOwnerNameComponentsKey => - _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value; + set NSURLFileResourceTypeCharacterSpecial(NSURLFileResourceType value) => + _NSURLFileResourceTypeCharacterSpecial.value = value; - set NSURLUbiquitousSharedItemOwnerNameComponentsKey(NSURLResourceKey value) => - _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value = value; + late final ffi.Pointer + _NSURLFileResourceTypeDirectory = + _lookup('NSURLFileResourceTypeDirectory'); - /// returns a NSPersonNameComponents for the most recent editor of the document, or nil if it is the current user. (Read-only, value type NSPersonNameComponents) - late final ffi.Pointer - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey = - _lookup( - 'NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey'); + NSURLFileResourceType get NSURLFileResourceTypeDirectory => + _NSURLFileResourceTypeDirectory.value; - NSURLResourceKey - get NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey => - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value; + set NSURLFileResourceTypeDirectory(NSURLFileResourceType value) => + _NSURLFileResourceTypeDirectory.value = value; - set NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey( - NSURLResourceKey value) => - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value = value; + late final ffi.Pointer + _NSURLFileResourceTypeBlockSpecial = + _lookup('NSURLFileResourceTypeBlockSpecial'); - /// this item has not been downloaded yet. Use startDownloadingUbiquitousItemAtURL:error: to download it. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusNotDownloaded = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusNotDownloaded'); + NSURLFileResourceType get NSURLFileResourceTypeBlockSpecial => + _NSURLFileResourceTypeBlockSpecial.value; - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusNotDownloaded => - _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value; + set NSURLFileResourceTypeBlockSpecial(NSURLFileResourceType value) => + _NSURLFileResourceTypeBlockSpecial.value = value; - set NSURLUbiquitousItemDownloadingStatusNotDownloaded( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; + late final ffi.Pointer _NSURLFileResourceTypeRegular = + _lookup('NSURLFileResourceTypeRegular'); - /// there is a local version of this item available. The most current version will get downloaded as soon as possible. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusDownloaded = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusDownloaded'); + NSURLFileResourceType get NSURLFileResourceTypeRegular => + _NSURLFileResourceTypeRegular.value; - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusDownloaded => - _NSURLUbiquitousItemDownloadingStatusDownloaded.value; + set NSURLFileResourceTypeRegular(NSURLFileResourceType value) => + _NSURLFileResourceTypeRegular.value = value; - set NSURLUbiquitousItemDownloadingStatusDownloaded( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusDownloaded.value = value; + late final ffi.Pointer + _NSURLFileResourceTypeSymbolicLink = + _lookup('NSURLFileResourceTypeSymbolicLink'); - /// there is a local version of this item and it is the most up-to-date version known to this device. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusCurrent = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusCurrent'); + NSURLFileResourceType get NSURLFileResourceTypeSymbolicLink => + _NSURLFileResourceTypeSymbolicLink.value; - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusCurrent => - _NSURLUbiquitousItemDownloadingStatusCurrent.value; + set NSURLFileResourceTypeSymbolicLink(NSURLFileResourceType value) => + _NSURLFileResourceTypeSymbolicLink.value = value; - set NSURLUbiquitousItemDownloadingStatusCurrent( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusCurrent.value = value; + late final ffi.Pointer _NSURLFileResourceTypeSocket = + _lookup('NSURLFileResourceTypeSocket'); - /// the current user is the owner of this shared item. - late final ffi.Pointer - _NSURLUbiquitousSharedItemRoleOwner = - _lookup( - 'NSURLUbiquitousSharedItemRoleOwner'); + NSURLFileResourceType get NSURLFileResourceTypeSocket => + _NSURLFileResourceTypeSocket.value; - NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleOwner => - _NSURLUbiquitousSharedItemRoleOwner.value; + set NSURLFileResourceTypeSocket(NSURLFileResourceType value) => + _NSURLFileResourceTypeSocket.value = value; - set NSURLUbiquitousSharedItemRoleOwner(NSURLUbiquitousSharedItemRole value) => - _NSURLUbiquitousSharedItemRoleOwner.value = value; + late final ffi.Pointer _NSURLFileResourceTypeUnknown = + _lookup('NSURLFileResourceTypeUnknown'); - /// the current user is a participant of this shared item. - late final ffi.Pointer - _NSURLUbiquitousSharedItemRoleParticipant = - _lookup( - 'NSURLUbiquitousSharedItemRoleParticipant'); + NSURLFileResourceType get NSURLFileResourceTypeUnknown => + _NSURLFileResourceTypeUnknown.value; - NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleParticipant => - _NSURLUbiquitousSharedItemRoleParticipant.value; - - set NSURLUbiquitousSharedItemRoleParticipant( - NSURLUbiquitousSharedItemRole value) => - _NSURLUbiquitousSharedItemRoleParticipant.value = value; + set NSURLFileResourceTypeUnknown(NSURLFileResourceType value) => + _NSURLFileResourceTypeUnknown.value = value; - /// the current user is only allowed to read this item - late final ffi.Pointer - _NSURLUbiquitousSharedItemPermissionsReadOnly = - _lookup( - 'NSURLUbiquitousSharedItemPermissionsReadOnly'); + /// dictionary of NSImage/UIImage objects keyed by size + late final ffi.Pointer _NSURLThumbnailDictionaryKey = + _lookup('NSURLThumbnailDictionaryKey'); - NSURLUbiquitousSharedItemPermissions - get NSURLUbiquitousSharedItemPermissionsReadOnly => - _NSURLUbiquitousSharedItemPermissionsReadOnly.value; + NSURLResourceKey get NSURLThumbnailDictionaryKey => + _NSURLThumbnailDictionaryKey.value; - set NSURLUbiquitousSharedItemPermissionsReadOnly( - NSURLUbiquitousSharedItemPermissions value) => - _NSURLUbiquitousSharedItemPermissionsReadOnly.value = value; + set NSURLThumbnailDictionaryKey(NSURLResourceKey value) => + _NSURLThumbnailDictionaryKey.value = value; - /// the current user is allowed to both read and write this item - late final ffi.Pointer - _NSURLUbiquitousSharedItemPermissionsReadWrite = - _lookup( - 'NSURLUbiquitousSharedItemPermissionsReadWrite'); + /// returns all thumbnails as a single NSImage + late final ffi.Pointer _NSURLThumbnailKey = + _lookup('NSURLThumbnailKey'); - NSURLUbiquitousSharedItemPermissions - get NSURLUbiquitousSharedItemPermissionsReadWrite => - _NSURLUbiquitousSharedItemPermissionsReadWrite.value; + NSURLResourceKey get NSURLThumbnailKey => _NSURLThumbnailKey.value; - set NSURLUbiquitousSharedItemPermissionsReadWrite( - NSURLUbiquitousSharedItemPermissions value) => - _NSURLUbiquitousSharedItemPermissionsReadWrite.value = value; + set NSURLThumbnailKey(NSURLResourceKey value) => + _NSURLThumbnailKey.value = value; - late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); - late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); - instancetype _objc_msgSend_456( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer value, - ) { - return __objc_msgSend_456( - obj, - sel, - name, - value, - ); - } + /// size key for a 1024 x 1024 thumbnail image + late final ffi.Pointer + _NSThumbnail1024x1024SizeKey = + _lookup('NSThumbnail1024x1024SizeKey'); - late final __objc_msgSend_456Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSURLThumbnailDictionaryItem get NSThumbnail1024x1024SizeKey => + _NSThumbnail1024x1024SizeKey.value; - late final _sel_queryItemWithName_value_1 = - _registerName1("queryItemWithName:value:"); - late final _sel_value1 = _registerName1("value"); - late final _class_NSURLComponents1 = _getClass1("NSURLComponents"); - late final _sel_initWithURL_resolvingAgainstBaseURL_1 = - _registerName1("initWithURL:resolvingAgainstBaseURL:"); - late final _sel_componentsWithURL_resolvingAgainstBaseURL_1 = - _registerName1("componentsWithURL:resolvingAgainstBaseURL:"); - late final _sel_componentsWithString_1 = - _registerName1("componentsWithString:"); - late final _sel_URLRelativeToURL_1 = _registerName1("URLRelativeToURL:"); - ffi.Pointer _objc_msgSend_457( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_457( - obj, - sel, - baseURL, - ); - } + set NSThumbnail1024x1024SizeKey(NSURLThumbnailDictionaryItem value) => + _NSThumbnail1024x1024SizeKey.value = value; - late final __objc_msgSend_457Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + /// Total file size in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileSizeKey = + _lookup('NSURLFileSizeKey'); - late final _sel_setScheme_1 = _registerName1("setScheme:"); - late final _sel_setUser_1 = _registerName1("setUser:"); - late final _sel_setPassword_1 = _registerName1("setPassword:"); - late final _sel_setHost_1 = _registerName1("setHost:"); - late final _sel_setPort_1 = _registerName1("setPort:"); - late final _sel_setPath_1 = _registerName1("setPath:"); - late final _sel_setQuery_1 = _registerName1("setQuery:"); - late final _sel_setFragment_1 = _registerName1("setFragment:"); - late final _sel_percentEncodedUser1 = _registerName1("percentEncodedUser"); - late final _sel_setPercentEncodedUser_1 = - _registerName1("setPercentEncodedUser:"); - late final _sel_percentEncodedPassword1 = - _registerName1("percentEncodedPassword"); - late final _sel_setPercentEncodedPassword_1 = - _registerName1("setPercentEncodedPassword:"); - late final _sel_percentEncodedHost1 = _registerName1("percentEncodedHost"); - late final _sel_setPercentEncodedHost_1 = - _registerName1("setPercentEncodedHost:"); - late final _sel_percentEncodedPath1 = _registerName1("percentEncodedPath"); - late final _sel_setPercentEncodedPath_1 = - _registerName1("setPercentEncodedPath:"); - late final _sel_percentEncodedQuery1 = _registerName1("percentEncodedQuery"); - late final _sel_setPercentEncodedQuery_1 = - _registerName1("setPercentEncodedQuery:"); - late final _sel_percentEncodedFragment1 = - _registerName1("percentEncodedFragment"); - late final _sel_setPercentEncodedFragment_1 = - _registerName1("setPercentEncodedFragment:"); - late final _sel_rangeOfScheme1 = _registerName1("rangeOfScheme"); - late final _sel_rangeOfUser1 = _registerName1("rangeOfUser"); - late final _sel_rangeOfPassword1 = _registerName1("rangeOfPassword"); - late final _sel_rangeOfHost1 = _registerName1("rangeOfHost"); - late final _sel_rangeOfPort1 = _registerName1("rangeOfPort"); - late final _sel_rangeOfPath1 = _registerName1("rangeOfPath"); - late final _sel_rangeOfQuery1 = _registerName1("rangeOfQuery"); - late final _sel_rangeOfFragment1 = _registerName1("rangeOfFragment"); - late final _sel_queryItems1 = _registerName1("queryItems"); - late final _sel_setQueryItems_1 = _registerName1("setQueryItems:"); - late final _sel_percentEncodedQueryItems1 = - _registerName1("percentEncodedQueryItems"); - late final _sel_setPercentEncodedQueryItems_1 = - _registerName1("setPercentEncodedQueryItems:"); - late final _class_NSFileSecurity1 = _getClass1("NSFileSecurity"); - late final _class_NSHTTPURLResponse1 = _getClass1("NSHTTPURLResponse"); - late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_1 = - _registerName1("initWithURL:statusCode:HTTPVersion:headerFields:"); - instancetype _objc_msgSend_458( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int statusCode, - ffi.Pointer HTTPVersion, - ffi.Pointer headerFields, - ) { - return __objc_msgSend_458( - obj, - sel, - url, - statusCode, - HTTPVersion, - headerFields, - ); - } + NSURLResourceKey get NSURLFileSizeKey => _NSURLFileSizeKey.value; - late final __objc_msgSend_458Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer)>(); + set NSURLFileSizeKey(NSURLResourceKey value) => + _NSURLFileSizeKey.value = value; - late final _sel_statusCode1 = _registerName1("statusCode"); - late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); - late final _sel_localizedStringForStatusCode_1 = - _registerName1("localizedStringForStatusCode:"); - ffi.Pointer _objc_msgSend_459( - ffi.Pointer obj, - ffi.Pointer sel, - int statusCode, - ) { - return __objc_msgSend_459( - obj, - sel, - statusCode, - ); - } + /// Total size allocated on disk for the file in bytes (number of blocks times block size) (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileAllocatedSizeKey = + _lookup('NSURLFileAllocatedSizeKey'); - late final __objc_msgSend_459Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + NSURLResourceKey get NSURLFileAllocatedSizeKey => + _NSURLFileAllocatedSizeKey.value; - late final ffi.Pointer _NSGenericException = - _lookup('NSGenericException'); + set NSURLFileAllocatedSizeKey(NSURLResourceKey value) => + _NSURLFileAllocatedSizeKey.value = value; - NSExceptionName get NSGenericException => _NSGenericException.value; + /// Total displayable size of the file in bytes (this may include space used by metadata), or nil if not available. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLTotalFileSizeKey = + _lookup('NSURLTotalFileSizeKey'); - set NSGenericException(NSExceptionName value) => - _NSGenericException.value = value; + NSURLResourceKey get NSURLTotalFileSizeKey => _NSURLTotalFileSizeKey.value; - late final ffi.Pointer _NSRangeException = - _lookup('NSRangeException'); + set NSURLTotalFileSizeKey(NSURLResourceKey value) => + _NSURLTotalFileSizeKey.value = value; - NSExceptionName get NSRangeException => _NSRangeException.value; + /// Total allocated size of the file in bytes (this may include space used by metadata), or nil if not available. This can be less than the value returned by NSURLTotalFileSizeKey if the resource is compressed. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLTotalFileAllocatedSizeKey = + _lookup('NSURLTotalFileAllocatedSizeKey'); - set NSRangeException(NSExceptionName value) => - _NSRangeException.value = value; + NSURLResourceKey get NSURLTotalFileAllocatedSizeKey => + _NSURLTotalFileAllocatedSizeKey.value; - late final ffi.Pointer _NSInvalidArgumentException = - _lookup('NSInvalidArgumentException'); + set NSURLTotalFileAllocatedSizeKey(NSURLResourceKey value) => + _NSURLTotalFileAllocatedSizeKey.value = value; - NSExceptionName get NSInvalidArgumentException => - _NSInvalidArgumentException.value; + /// true if the resource is a Finder alias file or a symlink, false otherwise ( Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsAliasFileKey = + _lookup('NSURLIsAliasFileKey'); - set NSInvalidArgumentException(NSExceptionName value) => - _NSInvalidArgumentException.value = value; + NSURLResourceKey get NSURLIsAliasFileKey => _NSURLIsAliasFileKey.value; - late final ffi.Pointer _NSInternalInconsistencyException = - _lookup('NSInternalInconsistencyException'); + set NSURLIsAliasFileKey(NSURLResourceKey value) => + _NSURLIsAliasFileKey.value = value; - NSExceptionName get NSInternalInconsistencyException => - _NSInternalInconsistencyException.value; + /// The protection level for this file + late final ffi.Pointer _NSURLFileProtectionKey = + _lookup('NSURLFileProtectionKey'); - set NSInternalInconsistencyException(NSExceptionName value) => - _NSInternalInconsistencyException.value = value; + NSURLResourceKey get NSURLFileProtectionKey => _NSURLFileProtectionKey.value; - late final ffi.Pointer _NSMallocException = - _lookup('NSMallocException'); + set NSURLFileProtectionKey(NSURLResourceKey value) => + _NSURLFileProtectionKey.value = value; - NSExceptionName get NSMallocException => _NSMallocException.value; + /// The file has no special protections associated with it. It can be read from or written to at any time. + late final ffi.Pointer _NSURLFileProtectionNone = + _lookup('NSURLFileProtectionNone'); - set NSMallocException(NSExceptionName value) => - _NSMallocException.value = value; + NSURLFileProtectionType get NSURLFileProtectionNone => + _NSURLFileProtectionNone.value; - late final ffi.Pointer _NSObjectInaccessibleException = - _lookup('NSObjectInaccessibleException'); + set NSURLFileProtectionNone(NSURLFileProtectionType value) => + _NSURLFileProtectionNone.value = value; - NSExceptionName get NSObjectInaccessibleException => - _NSObjectInaccessibleException.value; + /// The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting. Transient data files with this protection type should be excluded from backups using NSURLIsExcludedFromBackupKey. + late final ffi.Pointer _NSURLFileProtectionComplete = + _lookup('NSURLFileProtectionComplete'); - set NSObjectInaccessibleException(NSExceptionName value) => - _NSObjectInaccessibleException.value = value; + NSURLFileProtectionType get NSURLFileProtectionComplete => + _NSURLFileProtectionComplete.value; - late final ffi.Pointer _NSObjectNotAvailableException = - _lookup('NSObjectNotAvailableException'); + set NSURLFileProtectionComplete(NSURLFileProtectionType value) => + _NSURLFileProtectionComplete.value = value; - NSExceptionName get NSObjectNotAvailableException => - _NSObjectNotAvailableException.value; + /// The file is stored in an encrypted format on disk. Files can be created while the device is locked, but once closed, cannot be opened again until the device is unlocked. If the file is opened when unlocked, you may continue to access the file normally, even if the user locks the device. There is a small performance penalty when the file is created and opened, though not when being written to or read from. This can be mitigated by changing the file protection to NSURLFileProtectionComplete when the device is unlocked. Transient data files with this protection type should be excluded from backups using NSURLIsExcludedFromBackupKey. + late final ffi.Pointer + _NSURLFileProtectionCompleteUnlessOpen = + _lookup('NSURLFileProtectionCompleteUnlessOpen'); - set NSObjectNotAvailableException(NSExceptionName value) => - _NSObjectNotAvailableException.value = value; + NSURLFileProtectionType get NSURLFileProtectionCompleteUnlessOpen => + _NSURLFileProtectionCompleteUnlessOpen.value; - late final ffi.Pointer _NSDestinationInvalidException = - _lookup('NSDestinationInvalidException'); + set NSURLFileProtectionCompleteUnlessOpen(NSURLFileProtectionType value) => + _NSURLFileProtectionCompleteUnlessOpen.value = value; - NSExceptionName get NSDestinationInvalidException => - _NSDestinationInvalidException.value; + /// The file is stored in an encrypted format on disk and cannot be accessed until after the device has booted. After the user unlocks the device for the first time, your app can access the file and continue to access it even if the user subsequently locks the device. + late final ffi.Pointer + _NSURLFileProtectionCompleteUntilFirstUserAuthentication = + _lookup( + 'NSURLFileProtectionCompleteUntilFirstUserAuthentication'); - set NSDestinationInvalidException(NSExceptionName value) => - _NSDestinationInvalidException.value = value; + NSURLFileProtectionType + get NSURLFileProtectionCompleteUntilFirstUserAuthentication => + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value; - late final ffi.Pointer _NSPortTimeoutException = - _lookup('NSPortTimeoutException'); + set NSURLFileProtectionCompleteUntilFirstUserAuthentication( + NSURLFileProtectionType value) => + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; - NSExceptionName get NSPortTimeoutException => _NSPortTimeoutException.value; + /// The user-visible volume format (Read-only, value type NSString) + late final ffi.Pointer + _NSURLVolumeLocalizedFormatDescriptionKey = + _lookup('NSURLVolumeLocalizedFormatDescriptionKey'); - set NSPortTimeoutException(NSExceptionName value) => - _NSPortTimeoutException.value = value; + NSURLResourceKey get NSURLVolumeLocalizedFormatDescriptionKey => + _NSURLVolumeLocalizedFormatDescriptionKey.value; - late final ffi.Pointer _NSInvalidSendPortException = - _lookup('NSInvalidSendPortException'); + set NSURLVolumeLocalizedFormatDescriptionKey(NSURLResourceKey value) => + _NSURLVolumeLocalizedFormatDescriptionKey.value = value; - NSExceptionName get NSInvalidSendPortException => - _NSInvalidSendPortException.value; + /// Total volume capacity in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeTotalCapacityKey = + _lookup('NSURLVolumeTotalCapacityKey'); - set NSInvalidSendPortException(NSExceptionName value) => - _NSInvalidSendPortException.value = value; + NSURLResourceKey get NSURLVolumeTotalCapacityKey => + _NSURLVolumeTotalCapacityKey.value; - late final ffi.Pointer _NSInvalidReceivePortException = - _lookup('NSInvalidReceivePortException'); + set NSURLVolumeTotalCapacityKey(NSURLResourceKey value) => + _NSURLVolumeTotalCapacityKey.value = value; - NSExceptionName get NSInvalidReceivePortException => - _NSInvalidReceivePortException.value; + /// Total free space in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeAvailableCapacityKey = + _lookup('NSURLVolumeAvailableCapacityKey'); - set NSInvalidReceivePortException(NSExceptionName value) => - _NSInvalidReceivePortException.value = value; + NSURLResourceKey get NSURLVolumeAvailableCapacityKey => + _NSURLVolumeAvailableCapacityKey.value; - late final ffi.Pointer _NSPortSendException = - _lookup('NSPortSendException'); + set NSURLVolumeAvailableCapacityKey(NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityKey.value = value; - NSExceptionName get NSPortSendException => _NSPortSendException.value; + /// Total number of resources on the volume (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeResourceCountKey = + _lookup('NSURLVolumeResourceCountKey'); - set NSPortSendException(NSExceptionName value) => - _NSPortSendException.value = value; + NSURLResourceKey get NSURLVolumeResourceCountKey => + _NSURLVolumeResourceCountKey.value; - late final ffi.Pointer _NSPortReceiveException = - _lookup('NSPortReceiveException'); + set NSURLVolumeResourceCountKey(NSURLResourceKey value) => + _NSURLVolumeResourceCountKey.value = value; - NSExceptionName get NSPortReceiveException => _NSPortReceiveException.value; + /// true if the volume format supports persistent object identifiers and can look up file system objects by their IDs (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsPersistentIDsKey = + _lookup('NSURLVolumeSupportsPersistentIDsKey'); - set NSPortReceiveException(NSExceptionName value) => - _NSPortReceiveException.value = value; + NSURLResourceKey get NSURLVolumeSupportsPersistentIDsKey => + _NSURLVolumeSupportsPersistentIDsKey.value; - late final ffi.Pointer _NSOldStyleException = - _lookup('NSOldStyleException'); + set NSURLVolumeSupportsPersistentIDsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsPersistentIDsKey.value = value; - NSExceptionName get NSOldStyleException => _NSOldStyleException.value; + /// true if the volume format supports symbolic links (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsSymbolicLinksKey = + _lookup('NSURLVolumeSupportsSymbolicLinksKey'); - set NSOldStyleException(NSExceptionName value) => - _NSOldStyleException.value = value; + NSURLResourceKey get NSURLVolumeSupportsSymbolicLinksKey => + _NSURLVolumeSupportsSymbolicLinksKey.value; - late final ffi.Pointer _NSInconsistentArchiveException = - _lookup('NSInconsistentArchiveException'); + set NSURLVolumeSupportsSymbolicLinksKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSymbolicLinksKey.value = value; - NSExceptionName get NSInconsistentArchiveException => - _NSInconsistentArchiveException.value; + /// true if the volume format supports hard links (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsHardLinksKey = + _lookup('NSURLVolumeSupportsHardLinksKey'); - set NSInconsistentArchiveException(NSExceptionName value) => - _NSInconsistentArchiveException.value = value; + NSURLResourceKey get NSURLVolumeSupportsHardLinksKey => + _NSURLVolumeSupportsHardLinksKey.value; - late final _class_NSException1 = _getClass1("NSException"); - late final _sel_exceptionWithName_reason_userInfo_1 = - _registerName1("exceptionWithName:reason:userInfo:"); - ffi.Pointer _objc_msgSend_460( - ffi.Pointer obj, - ffi.Pointer sel, - NSExceptionName name, - ffi.Pointer reason, - ffi.Pointer userInfo, - ) { - return __objc_msgSend_460( - obj, - sel, - name, - reason, - userInfo, - ); - } + set NSURLVolumeSupportsHardLinksKey(NSURLResourceKey value) => + _NSURLVolumeSupportsHardLinksKey.value = value; - late final __objc_msgSend_460Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSExceptionName, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSExceptionName, - ffi.Pointer, - ffi.Pointer)>(); + /// true if the volume format supports a journal used to speed recovery in case of unplanned restart (such as a power outage or crash). This does not necessarily mean the volume is actively using a journal. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsJournalingKey = + _lookup('NSURLVolumeSupportsJournalingKey'); - late final _sel_initWithName_reason_userInfo_1 = - _registerName1("initWithName:reason:userInfo:"); - instancetype _objc_msgSend_461( - ffi.Pointer obj, - ffi.Pointer sel, - NSExceptionName aName, - ffi.Pointer aReason, - ffi.Pointer aUserInfo, - ) { - return __objc_msgSend_461( - obj, - sel, - aName, - aReason, - aUserInfo, - ); - } + NSURLResourceKey get NSURLVolumeSupportsJournalingKey => + _NSURLVolumeSupportsJournalingKey.value; - late final __objc_msgSend_461Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSExceptionName, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSExceptionName, ffi.Pointer, ffi.Pointer)>(); + set NSURLVolumeSupportsJournalingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsJournalingKey.value = value; - late final _sel_reason1 = _registerName1("reason"); - late final _sel_callStackReturnAddresses1 = - _registerName1("callStackReturnAddresses"); - late final _sel_callStackSymbols1 = _registerName1("callStackSymbols"); - late final _sel_raise1 = _registerName1("raise"); - late final _sel_raise_format_1 = _registerName1("raise:format:"); - late final _sel_raise_format_arguments_1 = - _registerName1("raise:format:arguments:"); - void _objc_msgSend_462( - ffi.Pointer obj, - ffi.Pointer sel, - NSExceptionName name, - ffi.Pointer format, - va_list argList, - ) { - return __objc_msgSend_462( - obj, - sel, - name, - format, - argList, - ); - } + /// true if the volume is currently using a journal for speedy recovery after an unplanned restart. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsJournalingKey = + _lookup('NSURLVolumeIsJournalingKey'); - late final __objc_msgSend_462Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSExceptionName, - ffi.Pointer, - va_list)>>('objc_msgSend'); - late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSExceptionName, ffi.Pointer, va_list)>(); + NSURLResourceKey get NSURLVolumeIsJournalingKey => + _NSURLVolumeIsJournalingKey.value; - ffi.Pointer NSGetUncaughtExceptionHandler() { - return _NSGetUncaughtExceptionHandler(); - } + set NSURLVolumeIsJournalingKey(NSURLResourceKey value) => + _NSURLVolumeIsJournalingKey.value = value; - late final _NSGetUncaughtExceptionHandlerPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer - Function()>>('NSGetUncaughtExceptionHandler'); - late final _NSGetUncaughtExceptionHandler = _NSGetUncaughtExceptionHandlerPtr - .asFunction Function()>(); + /// true if the volume format supports sparse files, that is, files which can have 'holes' that have never been written to, and thus do not consume space on disk. A sparse file may have an allocated size on disk that is less than its logical length (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsSparseFilesKey = + _lookup('NSURLVolumeSupportsSparseFilesKey'); - void NSSetUncaughtExceptionHandler( - ffi.Pointer arg0, - ) { - return _NSSetUncaughtExceptionHandler( - arg0, - ); - } + NSURLResourceKey get NSURLVolumeSupportsSparseFilesKey => + _NSURLVolumeSupportsSparseFilesKey.value; - late final _NSSetUncaughtExceptionHandlerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>>( - 'NSSetUncaughtExceptionHandler'); - late final _NSSetUncaughtExceptionHandler = _NSSetUncaughtExceptionHandlerPtr - .asFunction)>(); + set NSURLVolumeSupportsSparseFilesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSparseFilesKey.value = value; - late final ffi.Pointer> _NSAssertionHandlerKey = - _lookup>('NSAssertionHandlerKey'); + /// For security reasons, parts of a file (runs) that have never been written to must appear to contain zeroes. true if the volume keeps track of allocated but unwritten runs of a file so that it can substitute zeroes without actually writing zeroes to the media. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsZeroRunsKey = + _lookup('NSURLVolumeSupportsZeroRunsKey'); - ffi.Pointer get NSAssertionHandlerKey => - _NSAssertionHandlerKey.value; + NSURLResourceKey get NSURLVolumeSupportsZeroRunsKey => + _NSURLVolumeSupportsZeroRunsKey.value; - set NSAssertionHandlerKey(ffi.Pointer value) => - _NSAssertionHandlerKey.value = value; + set NSURLVolumeSupportsZeroRunsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsZeroRunsKey.value = value; - late final _class_NSAssertionHandler1 = _getClass1("NSAssertionHandler"); - late final _sel_currentHandler1 = _registerName1("currentHandler"); - ffi.Pointer _objc_msgSend_463( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_463( - obj, - sel, - ); - } + /// true if the volume format treats upper and lower case characters in file and directory names as different. Otherwise an upper case character is equivalent to a lower case character, and you can't have two names that differ solely in the case of the characters. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsCaseSensitiveNamesKey = + _lookup('NSURLVolumeSupportsCaseSensitiveNamesKey'); - late final __objc_msgSend_463Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + NSURLResourceKey get NSURLVolumeSupportsCaseSensitiveNamesKey => + _NSURLVolumeSupportsCaseSensitiveNamesKey.value; - late final _sel_handleFailureInMethod_object_file_lineNumber_description_1 = - _registerName1( - "handleFailureInMethod:object:file:lineNumber:description:"); - void _objc_msgSend_464( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer selector, - ffi.Pointer object, - ffi.Pointer fileName, - int line, - ffi.Pointer format, - ) { - return __objc_msgSend_464( - obj, - sel, - selector, - object, - fileName, - line, - format, - ); - } + set NSURLVolumeSupportsCaseSensitiveNamesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCaseSensitiveNamesKey.value = value; - late final __objc_msgSend_464Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + /// true if the volume format preserves the case of file and directory names. Otherwise the volume may change the case of some characters (typically making them all upper or all lower case). (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsCasePreservedNamesKey = + _lookup('NSURLVolumeSupportsCasePreservedNamesKey'); - late final _sel_handleFailureInFunction_file_lineNumber_description_1 = - _registerName1("handleFailureInFunction:file:lineNumber:description:"); - void _objc_msgSend_465( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer functionName, - ffi.Pointer fileName, - int line, - ffi.Pointer format, - ) { - return __objc_msgSend_465( - obj, - sel, - functionName, - fileName, - line, - format, - ); - } + NSURLResourceKey get NSURLVolumeSupportsCasePreservedNamesKey => + _NSURLVolumeSupportsCasePreservedNamesKey.value; - late final __objc_msgSend_465Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + set NSURLVolumeSupportsCasePreservedNamesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCasePreservedNamesKey.value = value; - late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); - late final _sel_blockOperationWithBlock_1 = - _registerName1("blockOperationWithBlock:"); - instancetype _objc_msgSend_466( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_466( - obj, - sel, - block, - ); - } + /// true if the volume supports reliable storage of times for the root directory. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsRootDirectoryDatesKey = + _lookup('NSURLVolumeSupportsRootDirectoryDatesKey'); - late final __objc_msgSend_466Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + NSURLResourceKey get NSURLVolumeSupportsRootDirectoryDatesKey => + _NSURLVolumeSupportsRootDirectoryDatesKey.value; - late final _sel_addExecutionBlock_1 = _registerName1("addExecutionBlock:"); - late final _sel_executionBlocks1 = _registerName1("executionBlocks"); - late final _class_NSInvocationOperation1 = - _getClass1("NSInvocationOperation"); - late final _sel_initWithTarget_selector_object_1 = - _registerName1("initWithTarget:selector:object:"); - instancetype _objc_msgSend_467( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer sel1, - ffi.Pointer arg, - ) { - return __objc_msgSend_467( - obj, - sel, - target, - sel1, - arg, - ); - } + set NSURLVolumeSupportsRootDirectoryDatesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsRootDirectoryDatesKey.value = value; - late final __objc_msgSend_467Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + /// true if the volume supports returning volume size values (NSURLVolumeTotalCapacityKey and NSURLVolumeAvailableCapacityKey). (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsVolumeSizesKey = + _lookup('NSURLVolumeSupportsVolumeSizesKey'); - late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); - instancetype _objc_msgSend_468( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer inv, - ) { - return __objc_msgSend_468( - obj, - sel, - inv, - ); - } + NSURLResourceKey get NSURLVolumeSupportsVolumeSizesKey => + _NSURLVolumeSupportsVolumeSizesKey.value; - late final __objc_msgSend_468Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + set NSURLVolumeSupportsVolumeSizesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsVolumeSizesKey.value = value; - late final _sel_invocation1 = _registerName1("invocation"); - ffi.Pointer _objc_msgSend_469( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_469( - obj, - sel, - ); - } + /// true if the volume can be renamed. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsRenamingKey = + _lookup('NSURLVolumeSupportsRenamingKey'); - late final __objc_msgSend_469Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + NSURLResourceKey get NSURLVolumeSupportsRenamingKey => + _NSURLVolumeSupportsRenamingKey.value; - late final _sel_result1 = _registerName1("result"); - late final ffi.Pointer - _NSInvocationOperationVoidResultException = - _lookup('NSInvocationOperationVoidResultException'); + set NSURLVolumeSupportsRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsRenamingKey.value = value; - NSExceptionName get NSInvocationOperationVoidResultException => - _NSInvocationOperationVoidResultException.value; + /// true if the volume implements whole-file flock(2) style advisory locks, and the O_EXLOCK and O_SHLOCK flags of the open(2) call. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsAdvisoryFileLockingKey = + _lookup('NSURLVolumeSupportsAdvisoryFileLockingKey'); - set NSInvocationOperationVoidResultException(NSExceptionName value) => - _NSInvocationOperationVoidResultException.value = value; + NSURLResourceKey get NSURLVolumeSupportsAdvisoryFileLockingKey => + _NSURLVolumeSupportsAdvisoryFileLockingKey.value; - late final ffi.Pointer - _NSInvocationOperationCancelledException = - _lookup('NSInvocationOperationCancelledException'); + set NSURLVolumeSupportsAdvisoryFileLockingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsAdvisoryFileLockingKey.value = value; - NSExceptionName get NSInvocationOperationCancelledException => - _NSInvocationOperationCancelledException.value; + /// true if the volume implements extended security (ACLs). (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsExtendedSecurityKey = + _lookup('NSURLVolumeSupportsExtendedSecurityKey'); - set NSInvocationOperationCancelledException(NSExceptionName value) => - _NSInvocationOperationCancelledException.value = value; + NSURLResourceKey get NSURLVolumeSupportsExtendedSecurityKey => + _NSURLVolumeSupportsExtendedSecurityKey.value; - late final ffi.Pointer - _NSOperationQueueDefaultMaxConcurrentOperationCount = - _lookup('NSOperationQueueDefaultMaxConcurrentOperationCount'); + set NSURLVolumeSupportsExtendedSecurityKey(NSURLResourceKey value) => + _NSURLVolumeSupportsExtendedSecurityKey.value = value; - int get NSOperationQueueDefaultMaxConcurrentOperationCount => - _NSOperationQueueDefaultMaxConcurrentOperationCount.value; + /// true if the volume should be visible via the GUI (i.e., appear on the Desktop as a separate volume). (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsBrowsableKey = + _lookup('NSURLVolumeIsBrowsableKey'); - set NSOperationQueueDefaultMaxConcurrentOperationCount(int value) => - _NSOperationQueueDefaultMaxConcurrentOperationCount.value = value; + NSURLResourceKey get NSURLVolumeIsBrowsableKey => + _NSURLVolumeIsBrowsableKey.value; - /// Predefined domain for errors from most AppKit and Foundation APIs. - late final ffi.Pointer _NSCocoaErrorDomain = - _lookup('NSCocoaErrorDomain'); + set NSURLVolumeIsBrowsableKey(NSURLResourceKey value) => + _NSURLVolumeIsBrowsableKey.value = value; - NSErrorDomain get NSCocoaErrorDomain => _NSCocoaErrorDomain.value; + /// The largest file size (in bytes) supported by this file system, or nil if this cannot be determined. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeMaximumFileSizeKey = + _lookup('NSURLVolumeMaximumFileSizeKey'); - set NSCocoaErrorDomain(NSErrorDomain value) => - _NSCocoaErrorDomain.value = value; + NSURLResourceKey get NSURLVolumeMaximumFileSizeKey => + _NSURLVolumeMaximumFileSizeKey.value; - /// Other predefined domains; value of "code" will correspond to preexisting values in these domains. - late final ffi.Pointer _NSPOSIXErrorDomain = - _lookup('NSPOSIXErrorDomain'); + set NSURLVolumeMaximumFileSizeKey(NSURLResourceKey value) => + _NSURLVolumeMaximumFileSizeKey.value = value; - NSErrorDomain get NSPOSIXErrorDomain => _NSPOSIXErrorDomain.value; + /// true if the volume's media is ejectable from the drive mechanism under software control. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsEjectableKey = + _lookup('NSURLVolumeIsEjectableKey'); - set NSPOSIXErrorDomain(NSErrorDomain value) => - _NSPOSIXErrorDomain.value = value; + NSURLResourceKey get NSURLVolumeIsEjectableKey => + _NSURLVolumeIsEjectableKey.value; - late final ffi.Pointer _NSOSStatusErrorDomain = - _lookup('NSOSStatusErrorDomain'); + set NSURLVolumeIsEjectableKey(NSURLResourceKey value) => + _NSURLVolumeIsEjectableKey.value = value; - NSErrorDomain get NSOSStatusErrorDomain => _NSOSStatusErrorDomain.value; + /// true if the volume's media is removable from the drive mechanism. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsRemovableKey = + _lookup('NSURLVolumeIsRemovableKey'); - set NSOSStatusErrorDomain(NSErrorDomain value) => - _NSOSStatusErrorDomain.value = value; + NSURLResourceKey get NSURLVolumeIsRemovableKey => + _NSURLVolumeIsRemovableKey.value; - late final ffi.Pointer _NSMachErrorDomain = - _lookup('NSMachErrorDomain'); + set NSURLVolumeIsRemovableKey(NSURLResourceKey value) => + _NSURLVolumeIsRemovableKey.value = value; - NSErrorDomain get NSMachErrorDomain => _NSMachErrorDomain.value; + /// true if the volume's device is connected to an internal bus, false if connected to an external bus, or nil if not available. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsInternalKey = + _lookup('NSURLVolumeIsInternalKey'); - set NSMachErrorDomain(NSErrorDomain value) => - _NSMachErrorDomain.value = value; + NSURLResourceKey get NSURLVolumeIsInternalKey => + _NSURLVolumeIsInternalKey.value; - /// Key in userInfo. A recommended standard way to embed NSErrors from underlying calls. The value of this key should be an NSError. - late final ffi.Pointer _NSUnderlyingErrorKey = - _lookup('NSUnderlyingErrorKey'); + set NSURLVolumeIsInternalKey(NSURLResourceKey value) => + _NSURLVolumeIsInternalKey.value = value; - NSErrorUserInfoKey get NSUnderlyingErrorKey => _NSUnderlyingErrorKey.value; + /// true if the volume is automounted. Note: do not mistake this with the functionality provided by kCFURLVolumeSupportsBrowsingKey. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsAutomountedKey = + _lookup('NSURLVolumeIsAutomountedKey'); - set NSUnderlyingErrorKey(NSErrorUserInfoKey value) => - _NSUnderlyingErrorKey.value = value; + NSURLResourceKey get NSURLVolumeIsAutomountedKey => + _NSURLVolumeIsAutomountedKey.value; - /// Key in userInfo. A recommended standard way to embed a list of several NSErrors from underlying calls. The value of this key should be an NSArray of NSError. This value is independent from the value of `NSUnderlyingErrorKey` - neither, one, or both may be set. - late final ffi.Pointer _NSMultipleUnderlyingErrorsKey = - _lookup('NSMultipleUnderlyingErrorsKey'); + set NSURLVolumeIsAutomountedKey(NSURLResourceKey value) => + _NSURLVolumeIsAutomountedKey.value = value; - NSErrorUserInfoKey get NSMultipleUnderlyingErrorsKey => - _NSMultipleUnderlyingErrorsKey.value; + /// true if the volume is stored on a local device. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsLocalKey = + _lookup('NSURLVolumeIsLocalKey'); - set NSMultipleUnderlyingErrorsKey(NSErrorUserInfoKey value) => - _NSMultipleUnderlyingErrorsKey.value = value; + NSURLResourceKey get NSURLVolumeIsLocalKey => _NSURLVolumeIsLocalKey.value; - /// NSString, a complete sentence (or more) describing ideally both what failed and why it failed. - late final ffi.Pointer _NSLocalizedDescriptionKey = - _lookup('NSLocalizedDescriptionKey'); + set NSURLVolumeIsLocalKey(NSURLResourceKey value) => + _NSURLVolumeIsLocalKey.value = value; - NSErrorUserInfoKey get NSLocalizedDescriptionKey => - _NSLocalizedDescriptionKey.value; + /// true if the volume is read-only. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsReadOnlyKey = + _lookup('NSURLVolumeIsReadOnlyKey'); - set NSLocalizedDescriptionKey(NSErrorUserInfoKey value) => - _NSLocalizedDescriptionKey.value = value; + NSURLResourceKey get NSURLVolumeIsReadOnlyKey => + _NSURLVolumeIsReadOnlyKey.value; - /// NSString, a complete sentence (or more) describing why the operation failed. - late final ffi.Pointer _NSLocalizedFailureReasonErrorKey = - _lookup('NSLocalizedFailureReasonErrorKey'); + set NSURLVolumeIsReadOnlyKey(NSURLResourceKey value) => + _NSURLVolumeIsReadOnlyKey.value = value; - NSErrorUserInfoKey get NSLocalizedFailureReasonErrorKey => - _NSLocalizedFailureReasonErrorKey.value; + /// The volume's creation date, or nil if this cannot be determined. (Read-only, value type NSDate) + late final ffi.Pointer _NSURLVolumeCreationDateKey = + _lookup('NSURLVolumeCreationDateKey'); - set NSLocalizedFailureReasonErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedFailureReasonErrorKey.value = value; + NSURLResourceKey get NSURLVolumeCreationDateKey => + _NSURLVolumeCreationDateKey.value; - /// NSString, a complete sentence (or more) describing what the user can do to fix the problem. - late final ffi.Pointer - _NSLocalizedRecoverySuggestionErrorKey = - _lookup('NSLocalizedRecoverySuggestionErrorKey'); + set NSURLVolumeCreationDateKey(NSURLResourceKey value) => + _NSURLVolumeCreationDateKey.value = value; - NSErrorUserInfoKey get NSLocalizedRecoverySuggestionErrorKey => - _NSLocalizedRecoverySuggestionErrorKey.value; + /// The NSURL needed to remount a network volume, or nil if not available. (Read-only, value type NSURL) + late final ffi.Pointer _NSURLVolumeURLForRemountingKey = + _lookup('NSURLVolumeURLForRemountingKey'); - set NSLocalizedRecoverySuggestionErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedRecoverySuggestionErrorKey.value = value; + NSURLResourceKey get NSURLVolumeURLForRemountingKey => + _NSURLVolumeURLForRemountingKey.value; - /// NSArray of NSStrings corresponding to button titles. - late final ffi.Pointer - _NSLocalizedRecoveryOptionsErrorKey = - _lookup('NSLocalizedRecoveryOptionsErrorKey'); + set NSURLVolumeURLForRemountingKey(NSURLResourceKey value) => + _NSURLVolumeURLForRemountingKey.value = value; - NSErrorUserInfoKey get NSLocalizedRecoveryOptionsErrorKey => - _NSLocalizedRecoveryOptionsErrorKey.value; + /// The volume's persistent UUID as a string, or nil if a persistent UUID is not available for the volume. (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeUUIDStringKey = + _lookup('NSURLVolumeUUIDStringKey'); - set NSLocalizedRecoveryOptionsErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedRecoveryOptionsErrorKey.value = value; + NSURLResourceKey get NSURLVolumeUUIDStringKey => + _NSURLVolumeUUIDStringKey.value; - /// Instance of a subclass of NSObject that conforms to the NSErrorRecoveryAttempting informal protocol - late final ffi.Pointer _NSRecoveryAttempterErrorKey = - _lookup('NSRecoveryAttempterErrorKey'); + set NSURLVolumeUUIDStringKey(NSURLResourceKey value) => + _NSURLVolumeUUIDStringKey.value = value; - NSErrorUserInfoKey get NSRecoveryAttempterErrorKey => - _NSRecoveryAttempterErrorKey.value; + /// The name of the volume (Read-write if NSURLVolumeSupportsRenamingKey is YES, otherwise read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeNameKey = + _lookup('NSURLVolumeNameKey'); - set NSRecoveryAttempterErrorKey(NSErrorUserInfoKey value) => - _NSRecoveryAttempterErrorKey.value = value; + NSURLResourceKey get NSURLVolumeNameKey => _NSURLVolumeNameKey.value; - /// NSString containing a help anchor - late final ffi.Pointer _NSHelpAnchorErrorKey = - _lookup('NSHelpAnchorErrorKey'); + set NSURLVolumeNameKey(NSURLResourceKey value) => + _NSURLVolumeNameKey.value = value; - NSErrorUserInfoKey get NSHelpAnchorErrorKey => _NSHelpAnchorErrorKey.value; + /// The user-presentable name of the volume (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeLocalizedNameKey = + _lookup('NSURLVolumeLocalizedNameKey'); - set NSHelpAnchorErrorKey(NSErrorUserInfoKey value) => - _NSHelpAnchorErrorKey.value = value; + NSURLResourceKey get NSURLVolumeLocalizedNameKey => + _NSURLVolumeLocalizedNameKey.value; - /// NSString. This provides a string which will be shown when constructing the debugDescription of the NSError, to be used when debugging or when formatting the error with %@. This string will never be used in localizedDescription, so will not be shown to the user. - late final ffi.Pointer _NSDebugDescriptionErrorKey = - _lookup('NSDebugDescriptionErrorKey'); + set NSURLVolumeLocalizedNameKey(NSURLResourceKey value) => + _NSURLVolumeLocalizedNameKey.value = value; - NSErrorUserInfoKey get NSDebugDescriptionErrorKey => - _NSDebugDescriptionErrorKey.value; + /// true if the volume is encrypted. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsEncryptedKey = + _lookup('NSURLVolumeIsEncryptedKey'); - set NSDebugDescriptionErrorKey(NSErrorUserInfoKey value) => - _NSDebugDescriptionErrorKey.value = value; + NSURLResourceKey get NSURLVolumeIsEncryptedKey => + _NSURLVolumeIsEncryptedKey.value; - /// NSString, a complete sentence (or more) describing what failed. Setting a value for this key in userInfo dictionary of errors received from framework APIs is a good way to customize and fine tune the localizedDescription of an NSError. As an example, for Foundation error code NSFileWriteOutOfSpaceError, setting the value of this key to "The image library could not be saved." will allow the localizedDescription of the error to come out as "The image library could not be saved. The volume Macintosh HD is out of space." rather than the default (say) “You can't save the file ImgDatabaseV2 because the volume Macintosh HD is out of space." - late final ffi.Pointer _NSLocalizedFailureErrorKey = - _lookup('NSLocalizedFailureErrorKey'); + set NSURLVolumeIsEncryptedKey(NSURLResourceKey value) => + _NSURLVolumeIsEncryptedKey.value = value; - NSErrorUserInfoKey get NSLocalizedFailureErrorKey => - _NSLocalizedFailureErrorKey.value; + /// true if the volume is the root filesystem. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsRootFileSystemKey = + _lookup('NSURLVolumeIsRootFileSystemKey'); - set NSLocalizedFailureErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedFailureErrorKey.value = value; + NSURLResourceKey get NSURLVolumeIsRootFileSystemKey => + _NSURLVolumeIsRootFileSystemKey.value; - /// NSNumber containing NSStringEncoding - late final ffi.Pointer _NSStringEncodingErrorKey = - _lookup('NSStringEncodingErrorKey'); + set NSURLVolumeIsRootFileSystemKey(NSURLResourceKey value) => + _NSURLVolumeIsRootFileSystemKey.value = value; - NSErrorUserInfoKey get NSStringEncodingErrorKey => - _NSStringEncodingErrorKey.value; + /// true if the volume supports transparent decompression of compressed files using decmpfs. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsCompressionKey = + _lookup('NSURLVolumeSupportsCompressionKey'); - set NSStringEncodingErrorKey(NSErrorUserInfoKey value) => - _NSStringEncodingErrorKey.value = value; + NSURLResourceKey get NSURLVolumeSupportsCompressionKey => + _NSURLVolumeSupportsCompressionKey.value; - /// NSURL - late final ffi.Pointer _NSURLErrorKey = - _lookup('NSURLErrorKey'); + set NSURLVolumeSupportsCompressionKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCompressionKey.value = value; - NSErrorUserInfoKey get NSURLErrorKey => _NSURLErrorKey.value; + /// true if the volume supports clonefile(2) (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsFileCloningKey = + _lookup('NSURLVolumeSupportsFileCloningKey'); - set NSURLErrorKey(NSErrorUserInfoKey value) => _NSURLErrorKey.value = value; + NSURLResourceKey get NSURLVolumeSupportsFileCloningKey => + _NSURLVolumeSupportsFileCloningKey.value; - /// NSString - late final ffi.Pointer _NSFilePathErrorKey = - _lookup('NSFilePathErrorKey'); + set NSURLVolumeSupportsFileCloningKey(NSURLResourceKey value) => + _NSURLVolumeSupportsFileCloningKey.value = value; - NSErrorUserInfoKey get NSFilePathErrorKey => _NSFilePathErrorKey.value; + /// true if the volume supports renamex_np(2)'s RENAME_SWAP option (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsSwapRenamingKey = + _lookup('NSURLVolumeSupportsSwapRenamingKey'); - set NSFilePathErrorKey(NSErrorUserInfoKey value) => - _NSFilePathErrorKey.value = value; + NSURLResourceKey get NSURLVolumeSupportsSwapRenamingKey => + _NSURLVolumeSupportsSwapRenamingKey.value; - /// Is this an error handle? - /// - /// Requires there to be a current isolate. - bool Dart_IsError( - Object handle, - ) { - return _Dart_IsError( - handle, - ); - } + set NSURLVolumeSupportsSwapRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSwapRenamingKey.value = value; - late final _Dart_IsErrorPtr = - _lookup>( - 'Dart_IsError'); - late final _Dart_IsError = - _Dart_IsErrorPtr.asFunction(); + /// true if the volume supports renamex_np(2)'s RENAME_EXCL option (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsExclusiveRenamingKey = + _lookup('NSURLVolumeSupportsExclusiveRenamingKey'); - /// Is this an api error handle? - /// - /// Api error handles are produced when an api function is misused. - /// This happens when a Dart embedding api function is called with - /// invalid arguments or in an invalid context. - /// - /// Requires there to be a current isolate. - bool Dart_IsApiError( - Object handle, - ) { - return _Dart_IsApiError( - handle, - ); - } + NSURLResourceKey get NSURLVolumeSupportsExclusiveRenamingKey => + _NSURLVolumeSupportsExclusiveRenamingKey.value; - late final _Dart_IsApiErrorPtr = - _lookup>( - 'Dart_IsApiError'); - late final _Dart_IsApiError = - _Dart_IsApiErrorPtr.asFunction(); + set NSURLVolumeSupportsExclusiveRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsExclusiveRenamingKey.value = value; - /// Is this an unhandled exception error handle? - /// - /// Unhandled exception error handles are produced when, during the - /// execution of Dart code, an exception is thrown but not caught. - /// This can occur in any function which triggers the execution of Dart - /// code. - /// - /// See Dart_ErrorGetException and Dart_ErrorGetStackTrace. - /// - /// Requires there to be a current isolate. - bool Dart_IsUnhandledExceptionError( - Object handle, - ) { - return _Dart_IsUnhandledExceptionError( - handle, - ); - } + /// true if the volume supports making files immutable with the NSURLIsUserImmutableKey or NSURLIsSystemImmutableKey properties (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsImmutableFilesKey = + _lookup('NSURLVolumeSupportsImmutableFilesKey'); - late final _Dart_IsUnhandledExceptionErrorPtr = - _lookup>( - 'Dart_IsUnhandledExceptionError'); - late final _Dart_IsUnhandledExceptionError = - _Dart_IsUnhandledExceptionErrorPtr.asFunction(); + NSURLResourceKey get NSURLVolumeSupportsImmutableFilesKey => + _NSURLVolumeSupportsImmutableFilesKey.value; - /// Is this a compilation error handle? - /// - /// Compilation error handles are produced when, during the execution - /// of Dart code, a compile-time error occurs. This can occur in any - /// function which triggers the execution of Dart code. - /// - /// Requires there to be a current isolate. - bool Dart_IsCompilationError( - Object handle, - ) { - return _Dart_IsCompilationError( - handle, - ); - } + set NSURLVolumeSupportsImmutableFilesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsImmutableFilesKey.value = value; - late final _Dart_IsCompilationErrorPtr = - _lookup>( - 'Dart_IsCompilationError'); - late final _Dart_IsCompilationError = - _Dart_IsCompilationErrorPtr.asFunction(); + /// true if the volume supports setting POSIX access permissions with the NSURLFileSecurityKey property (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsAccessPermissionsKey = + _lookup('NSURLVolumeSupportsAccessPermissionsKey'); - /// Is this a fatal error handle? - /// - /// Fatal error handles are produced when the system wants to shut down - /// the current isolate. - /// - /// Requires there to be a current isolate. - bool Dart_IsFatalError( - Object handle, - ) { - return _Dart_IsFatalError( - handle, - ); - } + NSURLResourceKey get NSURLVolumeSupportsAccessPermissionsKey => + _NSURLVolumeSupportsAccessPermissionsKey.value; - late final _Dart_IsFatalErrorPtr = - _lookup>( - 'Dart_IsFatalError'); - late final _Dart_IsFatalError = - _Dart_IsFatalErrorPtr.asFunction(); + set NSURLVolumeSupportsAccessPermissionsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsAccessPermissionsKey.value = value; - /// Gets the error message from an error handle. - /// - /// Requires there to be a current isolate. - /// - /// \return A C string containing an error message if the handle is - /// error. An empty C string ("") if the handle is valid. This C - /// String is scope allocated and is only valid until the next call - /// to Dart_ExitScope. - ffi.Pointer Dart_GetError( - Object handle, - ) { - return _Dart_GetError( - handle, - ); - } + /// True if the volume supports the File Protection attribute (see NSURLFileProtectionKey). (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsFileProtectionKey = + _lookup('NSURLVolumeSupportsFileProtectionKey'); - late final _Dart_GetErrorPtr = - _lookup Function(ffi.Handle)>>( - 'Dart_GetError'); - late final _Dart_GetError = - _Dart_GetErrorPtr.asFunction Function(Object)>(); + NSURLResourceKey get NSURLVolumeSupportsFileProtectionKey => + _NSURLVolumeSupportsFileProtectionKey.value; - /// Is this an error handle for an unhandled exception? - bool Dart_ErrorHasException( - Object handle, - ) { - return _Dart_ErrorHasException( - handle, - ); - } + set NSURLVolumeSupportsFileProtectionKey(NSURLResourceKey value) => + _NSURLVolumeSupportsFileProtectionKey.value = value; - late final _Dart_ErrorHasExceptionPtr = - _lookup>( - 'Dart_ErrorHasException'); - late final _Dart_ErrorHasException = - _Dart_ErrorHasExceptionPtr.asFunction(); + /// (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeAvailableCapacityForImportantUsageKey = + _lookup( + 'NSURLVolumeAvailableCapacityForImportantUsageKey'); - /// Gets the exception Object from an unhandled exception error handle. - Object Dart_ErrorGetException( - Object handle, - ) { - return _Dart_ErrorGetException( - handle, - ); - } + NSURLResourceKey get NSURLVolumeAvailableCapacityForImportantUsageKey => + _NSURLVolumeAvailableCapacityForImportantUsageKey.value; - late final _Dart_ErrorGetExceptionPtr = - _lookup>( - 'Dart_ErrorGetException'); - late final _Dart_ErrorGetException = - _Dart_ErrorGetExceptionPtr.asFunction(); + set NSURLVolumeAvailableCapacityForImportantUsageKey( + NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityForImportantUsageKey.value = value; - /// Gets the stack trace Object from an unhandled exception error handle. - Object Dart_ErrorGetStackTrace( - Object handle, - ) { - return _Dart_ErrorGetStackTrace( - handle, - ); - } + /// (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey = + _lookup( + 'NSURLVolumeAvailableCapacityForOpportunisticUsageKey'); - late final _Dart_ErrorGetStackTracePtr = - _lookup>( - 'Dart_ErrorGetStackTrace'); - late final _Dart_ErrorGetStackTrace = - _Dart_ErrorGetStackTracePtr.asFunction(); + NSURLResourceKey get NSURLVolumeAvailableCapacityForOpportunisticUsageKey => + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value; - /// Produces an api error handle with the provided error message. - /// - /// Requires there to be a current isolate. - /// - /// \param error the error message. - Object Dart_NewApiError( - ffi.Pointer error, - ) { - return _Dart_NewApiError( - error, - ); - } + set NSURLVolumeAvailableCapacityForOpportunisticUsageKey( + NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; - late final _Dart_NewApiErrorPtr = - _lookup)>>( - 'Dart_NewApiError'); - late final _Dart_NewApiError = - _Dart_NewApiErrorPtr.asFunction)>(); + /// true if this item is synced to the cloud, false if it is only a local file. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsUbiquitousItemKey = + _lookup('NSURLIsUbiquitousItemKey'); - Object Dart_NewCompilationError( - ffi.Pointer error, - ) { - return _Dart_NewCompilationError( - error, - ); - } + NSURLResourceKey get NSURLIsUbiquitousItemKey => + _NSURLIsUbiquitousItemKey.value; - late final _Dart_NewCompilationErrorPtr = - _lookup)>>( - 'Dart_NewCompilationError'); - late final _Dart_NewCompilationError = _Dart_NewCompilationErrorPtr - .asFunction)>(); + set NSURLIsUbiquitousItemKey(NSURLResourceKey value) => + _NSURLIsUbiquitousItemKey.value = value; - /// Produces a new unhandled exception error handle. - /// - /// Requires there to be a current isolate. - /// - /// \param exception An instance of a Dart object to be thrown or - /// an ApiError or CompilationError handle. - /// When an ApiError or CompilationError handle is passed in - /// a string object of the error message is created and it becomes - /// the Dart object to be thrown. - Object Dart_NewUnhandledExceptionError( - Object exception, - ) { - return _Dart_NewUnhandledExceptionError( - exception, - ); - } + /// true if this item has conflicts outstanding. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemHasUnresolvedConflictsKey = + _lookup('NSURLUbiquitousItemHasUnresolvedConflictsKey'); - late final _Dart_NewUnhandledExceptionErrorPtr = - _lookup>( - 'Dart_NewUnhandledExceptionError'); - late final _Dart_NewUnhandledExceptionError = - _Dart_NewUnhandledExceptionErrorPtr.asFunction(); + NSURLResourceKey get NSURLUbiquitousItemHasUnresolvedConflictsKey => + _NSURLUbiquitousItemHasUnresolvedConflictsKey.value; - /// Propagates an error. - /// - /// If the provided handle is an unhandled exception error, this - /// function will cause the unhandled exception to be rethrown. This - /// will proceed in the standard way, walking up Dart frames until an - /// appropriate 'catch' block is found, executing 'finally' blocks, - /// etc. - /// - /// If the error is not an unhandled exception error, we will unwind - /// the stack to the next C frame. Intervening Dart frames will be - /// discarded; specifically, 'finally' blocks will not execute. This - /// is the standard way that compilation errors (and the like) are - /// handled by the Dart runtime. - /// - /// In either case, when an error is propagated any current scopes - /// created by Dart_EnterScope will be exited. - /// - /// See the additional discussion under "Propagating Errors" at the - /// beginning of this file. - /// - /// \param An error handle (See Dart_IsError) - /// - /// \return On success, this function does not return. On failure, the - /// process is terminated. - void Dart_PropagateError( - Object handle, - ) { - return _Dart_PropagateError( - handle, - ); - } + set NSURLUbiquitousItemHasUnresolvedConflictsKey(NSURLResourceKey value) => + _NSURLUbiquitousItemHasUnresolvedConflictsKey.value = value; - late final _Dart_PropagateErrorPtr = - _lookup>( - 'Dart_PropagateError'); - late final _Dart_PropagateError = - _Dart_PropagateErrorPtr.asFunction(); + /// equivalent to NSURLUbiquitousItemDownloadingStatusKey == NSURLUbiquitousItemDownloadingStatusCurrent. Has never behaved as documented in earlier releases, hence deprecated. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsDownloadedKey = + _lookup('NSURLUbiquitousItemIsDownloadedKey'); - /// Converts an object to a string. - /// - /// May generate an unhandled exception error. - /// - /// \return The converted string if no error occurs during - /// the conversion. If an error does occur, an error handle is - /// returned. - Object Dart_ToString( - Object object, - ) { - return _Dart_ToString( - object, - ); - } + NSURLResourceKey get NSURLUbiquitousItemIsDownloadedKey => + _NSURLUbiquitousItemIsDownloadedKey.value; - late final _Dart_ToStringPtr = - _lookup>( - 'Dart_ToString'); - late final _Dart_ToString = - _Dart_ToStringPtr.asFunction(); + set NSURLUbiquitousItemIsDownloadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsDownloadedKey.value = value; - /// Checks to see if two handles refer to identically equal objects. - /// - /// If both handles refer to instances, this is equivalent to using the top-level - /// function identical() from dart:core. Otherwise, returns whether the two - /// argument handles refer to the same object. - /// - /// \param obj1 An object to be compared. - /// \param obj2 An object to be compared. - /// - /// \return True if the objects are identically equal. False otherwise. - bool Dart_IdentityEquals( - Object obj1, - Object obj2, - ) { - return _Dart_IdentityEquals( - obj1, - obj2, - ); - } + /// true if data is being downloaded for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemIsDownloadingKey = + _lookup('NSURLUbiquitousItemIsDownloadingKey'); - late final _Dart_IdentityEqualsPtr = - _lookup>( - 'Dart_IdentityEquals'); - late final _Dart_IdentityEquals = - _Dart_IdentityEqualsPtr.asFunction(); + NSURLResourceKey get NSURLUbiquitousItemIsDownloadingKey => + _NSURLUbiquitousItemIsDownloadingKey.value; - /// Allocates a handle in the current scope from a persistent handle. - Object Dart_HandleFromPersistent( - Object object, - ) { - return _Dart_HandleFromPersistent( - object, - ); - } + set NSURLUbiquitousItemIsDownloadingKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsDownloadingKey.value = value; - late final _Dart_HandleFromPersistentPtr = - _lookup>( - 'Dart_HandleFromPersistent'); - late final _Dart_HandleFromPersistent = - _Dart_HandleFromPersistentPtr.asFunction(); + /// true if there is data present in the cloud for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsUploadedKey = + _lookup('NSURLUbiquitousItemIsUploadedKey'); - /// Allocates a handle in the current scope from a weak persistent handle. - /// - /// This will be a handle to Dart_Null if the object has been garbage collected. - Object Dart_HandleFromWeakPersistent( - Dart_WeakPersistentHandle object, - ) { - return _Dart_HandleFromWeakPersistent( - object, - ); - } + NSURLResourceKey get NSURLUbiquitousItemIsUploadedKey => + _NSURLUbiquitousItemIsUploadedKey.value; - late final _Dart_HandleFromWeakPersistentPtr = _lookup< - ffi.NativeFunction>( - 'Dart_HandleFromWeakPersistent'); - late final _Dart_HandleFromWeakPersistent = _Dart_HandleFromWeakPersistentPtr - .asFunction(); + set NSURLUbiquitousItemIsUploadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsUploadedKey.value = value; - /// Allocates a persistent handle for an object. - /// - /// This handle has the lifetime of the current isolate unless it is - /// explicitly deallocated by calling Dart_DeletePersistentHandle. - /// - /// Requires there to be a current isolate. - Object Dart_NewPersistentHandle( - Object object, - ) { - return _Dart_NewPersistentHandle( - object, - ); - } + /// true if data is being uploaded for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsUploadingKey = + _lookup('NSURLUbiquitousItemIsUploadingKey'); - late final _Dart_NewPersistentHandlePtr = - _lookup>( - 'Dart_NewPersistentHandle'); - late final _Dart_NewPersistentHandle = - _Dart_NewPersistentHandlePtr.asFunction(); + NSURLResourceKey get NSURLUbiquitousItemIsUploadingKey => + _NSURLUbiquitousItemIsUploadingKey.value; - /// Assign value of local handle to a persistent handle. - /// - /// Requires there to be a current isolate. - /// - /// \param obj1 A persistent handle whose value needs to be set. - /// \param obj2 An object whose value needs to be set to the persistent handle. - /// - /// \return Success if the persistent handle was set - /// Otherwise, returns an error. - void Dart_SetPersistentHandle( - Object obj1, - Object obj2, - ) { - return _Dart_SetPersistentHandle( - obj1, - obj2, - ); - } + set NSURLUbiquitousItemIsUploadingKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsUploadingKey.value = value; - late final _Dart_SetPersistentHandlePtr = - _lookup>( - 'Dart_SetPersistentHandle'); - late final _Dart_SetPersistentHandle = - _Dart_SetPersistentHandlePtr.asFunction(); + /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead + late final ffi.Pointer + _NSURLUbiquitousItemPercentDownloadedKey = + _lookup('NSURLUbiquitousItemPercentDownloadedKey'); - /// Deallocates a persistent handle. - /// - /// Requires there to be a current isolate group. - void Dart_DeletePersistentHandle( - Object object, - ) { - return _Dart_DeletePersistentHandle( - object, - ); - } + NSURLResourceKey get NSURLUbiquitousItemPercentDownloadedKey => + _NSURLUbiquitousItemPercentDownloadedKey.value; - late final _Dart_DeletePersistentHandlePtr = - _lookup>( - 'Dart_DeletePersistentHandle'); - late final _Dart_DeletePersistentHandle = - _Dart_DeletePersistentHandlePtr.asFunction(); + set NSURLUbiquitousItemPercentDownloadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemPercentDownloadedKey.value = value; - /// Allocates a weak persistent handle for an object. - /// - /// This handle has the lifetime of the current isolate. The handle can also be - /// explicitly deallocated by calling Dart_DeleteWeakPersistentHandle. - /// - /// If the object becomes unreachable the callback is invoked with the peer as - /// argument. The callback can be executed on any thread, will have a current - /// isolate group, but will not have a current isolate. The callback can only - /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. This - /// gives the embedder the ability to cleanup data associated with the object. - /// The handle will point to the Dart_Null object after the finalizer has been - /// run. It is illegal to call into the VM with any other Dart_* functions from - /// the callback. If the handle is deleted before the object becomes - /// unreachable, the callback is never invoked. - /// - /// Requires there to be a current isolate. - /// - /// \param object An object with identity. - /// \param peer A pointer to a native object or NULL. This value is - /// provided to callback when it is invoked. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A function pointer that will be invoked sometime - /// after the object is garbage collected, unless the handle has been deleted. - /// A valid callback needs to be specified it cannot be NULL. - /// - /// \return The weak persistent handle or NULL. NULL is returned in case of bad - /// parameters. - Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle( - Object object, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewWeakPersistentHandle( - object, - peer, - external_allocation_size, - callback, - ); - } - - late final _Dart_NewWeakPersistentHandlePtr = _lookup< - ffi.NativeFunction< - Dart_WeakPersistentHandle Function( - ffi.Handle, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewWeakPersistentHandle'); - late final _Dart_NewWeakPersistentHandle = - _Dart_NewWeakPersistentHandlePtr.asFunction< - Dart_WeakPersistentHandle Function( - Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); - - /// Deletes the given weak persistent [object] handle. - /// - /// Requires there to be a current isolate group. - void Dart_DeleteWeakPersistentHandle( - Dart_WeakPersistentHandle object, - ) { - return _Dart_DeleteWeakPersistentHandle( - object, - ); - } - - late final _Dart_DeleteWeakPersistentHandlePtr = - _lookup>( - 'Dart_DeleteWeakPersistentHandle'); - late final _Dart_DeleteWeakPersistentHandle = - _Dart_DeleteWeakPersistentHandlePtr.asFunction< - void Function(Dart_WeakPersistentHandle)>(); - - /// Updates the external memory size for the given weak persistent handle. - /// - /// May trigger garbage collection. - void Dart_UpdateExternalSize( - Dart_WeakPersistentHandle object, - int external_allocation_size, - ) { - return _Dart_UpdateExternalSize( - object, - external_allocation_size, - ); - } - - late final _Dart_UpdateExternalSizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_WeakPersistentHandle, - ffi.IntPtr)>>('Dart_UpdateExternalSize'); - late final _Dart_UpdateExternalSize = _Dart_UpdateExternalSizePtr.asFunction< - void Function(Dart_WeakPersistentHandle, int)>(); - - /// Allocates a finalizable handle for an object. - /// - /// This handle has the lifetime of the current isolate group unless the object - /// pointed to by the handle is garbage collected, in this case the VM - /// automatically deletes the handle after invoking the callback associated - /// with the handle. The handle can also be explicitly deallocated by - /// calling Dart_DeleteFinalizableHandle. - /// - /// If the object becomes unreachable the callback is invoked with the - /// the peer as argument. The callback can be executed on any thread, will have - /// an isolate group, but will not have a current isolate. The callback can only - /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. - /// This gives the embedder the ability to cleanup data associated with the - /// object and clear out any cached references to the handle. All references to - /// this handle after the callback will be invalid. It is illegal to call into - /// the VM with any other Dart_* functions from the callback. If the handle is - /// deleted before the object becomes unreachable, the callback is never - /// invoked. - /// - /// Requires there to be a current isolate. - /// - /// \param object An object with identity. - /// \param peer A pointer to a native object or NULL. This value is - /// provided to callback when it is invoked. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A function pointer that will be invoked sometime - /// after the object is garbage collected, unless the handle has been deleted. - /// A valid callback needs to be specified it cannot be NULL. - /// - /// \return The finalizable handle or NULL. NULL is returned in case of bad - /// parameters. - Dart_FinalizableHandle Dart_NewFinalizableHandle( - Object object, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewFinalizableHandle( - object, - peer, - external_allocation_size, - callback, - ); - } - - late final _Dart_NewFinalizableHandlePtr = _lookup< - ffi.NativeFunction< - Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, - ffi.IntPtr, Dart_HandleFinalizer)>>('Dart_NewFinalizableHandle'); - late final _Dart_NewFinalizableHandle = - _Dart_NewFinalizableHandlePtr.asFunction< - Dart_FinalizableHandle Function( - Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); - - /// Deletes the given finalizable [object] handle. - /// - /// The caller has to provide the actual Dart object the handle was created from - /// to prove the object (and therefore the finalizable handle) is still alive. - /// - /// Requires there to be a current isolate. - void Dart_DeleteFinalizableHandle( - Dart_FinalizableHandle object, - Object strong_ref_to_object, - ) { - return _Dart_DeleteFinalizableHandle( - object, - strong_ref_to_object, - ); - } - - late final _Dart_DeleteFinalizableHandlePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, - ffi.Handle)>>('Dart_DeleteFinalizableHandle'); - late final _Dart_DeleteFinalizableHandle = _Dart_DeleteFinalizableHandlePtr - .asFunction(); - - /// Updates the external memory size for the given finalizable handle. - /// - /// The caller has to provide the actual Dart object the handle was created from - /// to prove the object (and therefore the finalizable handle) is still alive. - /// - /// May trigger garbage collection. - void Dart_UpdateFinalizableExternalSize( - Dart_FinalizableHandle object, - Object strong_ref_to_object, - int external_allocation_size, - ) { - return _Dart_UpdateFinalizableExternalSize( - object, - strong_ref_to_object, - external_allocation_size, - ); - } - - late final _Dart_UpdateFinalizableExternalSizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, - ffi.IntPtr)>>('Dart_UpdateFinalizableExternalSize'); - late final _Dart_UpdateFinalizableExternalSize = - _Dart_UpdateFinalizableExternalSizePtr.asFunction< - void Function(Dart_FinalizableHandle, Object, int)>(); - - /// Gets the version string for the Dart VM. - /// - /// The version of the Dart VM can be accessed without initializing the VM. - /// - /// \return The version string for the embedded Dart VM. - ffi.Pointer Dart_VersionString() { - return _Dart_VersionString(); - } - - late final _Dart_VersionStringPtr = - _lookup Function()>>( - 'Dart_VersionString'); - late final _Dart_VersionString = - _Dart_VersionStringPtr.asFunction Function()>(); - - /// Initialize Dart_IsolateFlags with correct version and default values. - void Dart_IsolateFlagsInitialize( - ffi.Pointer flags, - ) { - return _Dart_IsolateFlagsInitialize( - flags, - ); - } - - late final _Dart_IsolateFlagsInitializePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer)>>('Dart_IsolateFlagsInitialize'); - late final _Dart_IsolateFlagsInitialize = _Dart_IsolateFlagsInitializePtr - .asFunction)>(); - - /// Initializes the VM. - /// - /// \param params A struct containing initialization information. The version - /// field of the struct must be DART_INITIALIZE_PARAMS_CURRENT_VERSION. - /// - /// \return NULL if initialization is successful. Returns an error message - /// otherwise. The caller is responsible for freeing the error message. - ffi.Pointer Dart_Initialize( - ffi.Pointer params, - ) { - return _Dart_Initialize( - params, - ); - } - - late final _Dart_InitializePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('Dart_Initialize'); - late final _Dart_Initialize = _Dart_InitializePtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); - - /// Cleanup state in the VM before process termination. - /// - /// \return NULL if cleanup is successful. Returns an error message otherwise. - /// The caller is responsible for freeing the error message. - /// - /// NOTE: This function must not be called on a thread that was created by the VM - /// itself. - ffi.Pointer Dart_Cleanup() { - return _Dart_Cleanup(); - } - - late final _Dart_CleanupPtr = - _lookup Function()>>( - 'Dart_Cleanup'); - late final _Dart_Cleanup = - _Dart_CleanupPtr.asFunction Function()>(); - - /// Sets command line flags. Should be called before Dart_Initialize. - /// - /// \param argc The length of the arguments array. - /// \param argv An array of arguments. - /// - /// \return NULL if successful. Returns an error message otherwise. - /// The caller is responsible for freeing the error message. - /// - /// NOTE: This call does not store references to the passed in c-strings. - ffi.Pointer Dart_SetVMFlags( - int argc, - ffi.Pointer> argv, - ) { - return _Dart_SetVMFlags( - argc, - argv, - ); - } - - late final _Dart_SetVMFlagsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer>)>>('Dart_SetVMFlags'); - late final _Dart_SetVMFlags = _Dart_SetVMFlagsPtr.asFunction< - ffi.Pointer Function( - int, ffi.Pointer>)>(); - - /// Returns true if the named VM flag is of boolean type, specified, and set to - /// true. - /// - /// \param flag_name The name of the flag without leading punctuation - /// (example: "enable_asserts"). - bool Dart_IsVMFlagSet( - ffi.Pointer flag_name, - ) { - return _Dart_IsVMFlagSet( - flag_name, - ); - } - - late final _Dart_IsVMFlagSetPtr = - _lookup)>>( - 'Dart_IsVMFlagSet'); - late final _Dart_IsVMFlagSet = - _Dart_IsVMFlagSetPtr.asFunction)>(); - - /// Creates a new isolate. The new isolate becomes the current isolate. - /// - /// A snapshot can be used to restore the VM quickly to a saved state - /// and is useful for fast startup. If snapshot data is provided, the - /// isolate will be started using that snapshot data. Requires a core snapshot or - /// an app snapshot created by Dart_CreateSnapshot or - /// Dart_CreatePrecompiledSnapshot* from a VM with the same version. - /// - /// Requires there to be no current isolate. - /// - /// \param script_uri The main source file or snapshot this isolate will load. - /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child - /// isolate is created by Isolate.spawn. The embedder should use a URI that - /// allows it to load the same program into such a child isolate. - /// \param name A short name for the isolate to improve debugging messages. - /// Typically of the format 'foo.dart:main()'. - /// \param isolate_snapshot_data - /// \param isolate_snapshot_instructions Buffers containing a snapshot of the - /// isolate or NULL if no snapshot is provided. If provided, the buffers must - /// remain valid until the isolate shuts down. - /// \param flags Pointer to VM specific flags or NULL for default flags. - /// \param isolate_group_data Embedder group data. This data can be obtained - /// by calling Dart_IsolateGroupData and will be passed to the - /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and - /// Dart_IsolateGroupCleanupCallback. - /// \param isolate_data Embedder data. This data will be passed to - /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from - /// this parent isolate. - /// \param error Returns NULL if creation is successful, an error message - /// otherwise. The caller is responsible for calling free() on the error - /// message. - /// - /// \return The new isolate on success, or NULL if isolate creation failed. - Dart_Isolate Dart_CreateIsolateGroup( - ffi.Pointer script_uri, - ffi.Pointer name, - ffi.Pointer isolate_snapshot_data, - ffi.Pointer isolate_snapshot_instructions, - ffi.Pointer flags, - ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data, - ffi.Pointer> error, - ) { - return _Dart_CreateIsolateGroup( - script_uri, - name, - isolate_snapshot_data, - isolate_snapshot_instructions, - flags, - isolate_group_data, - isolate_data, - error, - ); - } - - late final _Dart_CreateIsolateGroupPtr = _lookup< - ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('Dart_CreateIsolateGroup'); - late final _Dart_CreateIsolateGroup = _Dart_CreateIsolateGroupPtr.asFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - /// Creates a new isolate inside the isolate group of [group_member]. - /// - /// Requires there to be no current isolate. - /// - /// \param group_member An isolate from the same group into which the newly created - /// isolate should be born into. Other threads may not have entered / enter this - /// member isolate. - /// \param name A short name for the isolate for debugging purposes. - /// \param shutdown_callback A callback to be called when the isolate is being - /// shutdown (may be NULL). - /// \param cleanup_callback A callback to be called when the isolate is being - /// cleaned up (may be NULL). - /// \param isolate_data The embedder-specific data associated with this isolate. - /// \param error Set to NULL if creation is successful, set to an error - /// message otherwise. The caller is responsible for calling free() on the - /// error message. - /// - /// \return The newly created isolate on success, or NULL if isolate creation - /// failed. - /// - /// If successful, the newly created isolate will become the current isolate. - Dart_Isolate Dart_CreateIsolateInGroup( - Dart_Isolate group_member, - ffi.Pointer name, - Dart_IsolateShutdownCallback shutdown_callback, - Dart_IsolateCleanupCallback cleanup_callback, - ffi.Pointer child_isolate_data, - ffi.Pointer> error, - ) { - return _Dart_CreateIsolateInGroup( - group_member, - name, - shutdown_callback, - cleanup_callback, - child_isolate_data, - error, - ); - } - - late final _Dart_CreateIsolateInGroupPtr = _lookup< - ffi.NativeFunction< - Dart_Isolate Function( - Dart_Isolate, - ffi.Pointer, - Dart_IsolateShutdownCallback, - Dart_IsolateCleanupCallback, - ffi.Pointer, - ffi.Pointer>)>>( - 'Dart_CreateIsolateInGroup'); - late final _Dart_CreateIsolateInGroup = - _Dart_CreateIsolateInGroupPtr.asFunction< - Dart_Isolate Function( - Dart_Isolate, - ffi.Pointer, - Dart_IsolateShutdownCallback, - Dart_IsolateCleanupCallback, - ffi.Pointer, - ffi.Pointer>)>(); - - /// Creates a new isolate from a Dart Kernel file. The new isolate - /// becomes the current isolate. - /// - /// Requires there to be no current isolate. - /// - /// \param script_uri The main source file or snapshot this isolate will load. - /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child - /// isolate is created by Isolate.spawn. The embedder should use a URI that - /// allows it to load the same program into such a child isolate. - /// \param name A short name for the isolate to improve debugging messages. - /// Typically of the format 'foo.dart:main()'. - /// \param kernel_buffer - /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must - /// remain valid until isolate shutdown. - /// \param flags Pointer to VM specific flags or NULL for default flags. - /// \param isolate_group_data Embedder group data. This data can be obtained - /// by calling Dart_IsolateGroupData and will be passed to the - /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and - /// Dart_IsolateGroupCleanupCallback. - /// \param isolate_data Embedder data. This data will be passed to - /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from - /// this parent isolate. - /// \param error Returns NULL if creation is successful, an error message - /// otherwise. The caller is responsible for calling free() on the error - /// message. - /// - /// \return The new isolate on success, or NULL if isolate creation failed. - Dart_Isolate Dart_CreateIsolateGroupFromKernel( - ffi.Pointer script_uri, - ffi.Pointer name, - ffi.Pointer kernel_buffer, - int kernel_buffer_size, - ffi.Pointer flags, - ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data, - ffi.Pointer> error, - ) { - return _Dart_CreateIsolateGroupFromKernel( - script_uri, - name, - kernel_buffer, - kernel_buffer_size, - flags, - isolate_group_data, - isolate_data, - error, - ); - } - - late final _Dart_CreateIsolateGroupFromKernelPtr = _lookup< - ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'Dart_CreateIsolateGroupFromKernel'); - late final _Dart_CreateIsolateGroupFromKernel = - _Dart_CreateIsolateGroupFromKernelPtr.asFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - /// Shuts down the current isolate. After this call, the current isolate is NULL. - /// Any current scopes created by Dart_EnterScope will be exited. Invokes the - /// shutdown callback and any callbacks of remaining weak persistent handles. - /// - /// Requires there to be a current isolate. - void Dart_ShutdownIsolate() { - return _Dart_ShutdownIsolate(); - } - - late final _Dart_ShutdownIsolatePtr = - _lookup>('Dart_ShutdownIsolate'); - late final _Dart_ShutdownIsolate = - _Dart_ShutdownIsolatePtr.asFunction(); - - /// Returns the current isolate. Will return NULL if there is no - /// current isolate. - Dart_Isolate Dart_CurrentIsolate() { - return _Dart_CurrentIsolate(); - } - - late final _Dart_CurrentIsolatePtr = - _lookup>( - 'Dart_CurrentIsolate'); - late final _Dart_CurrentIsolate = - _Dart_CurrentIsolatePtr.asFunction(); - - /// Returns the callback data associated with the current isolate. This - /// data was set when the isolate got created or initialized. - ffi.Pointer Dart_CurrentIsolateData() { - return _Dart_CurrentIsolateData(); - } - - late final _Dart_CurrentIsolateDataPtr = - _lookup Function()>>( - 'Dart_CurrentIsolateData'); - late final _Dart_CurrentIsolateData = _Dart_CurrentIsolateDataPtr.asFunction< - ffi.Pointer Function()>(); - - /// Returns the callback data associated with the given isolate. This - /// data was set when the isolate got created or initialized. - ffi.Pointer Dart_IsolateData( - Dart_Isolate isolate, - ) { - return _Dart_IsolateData( - isolate, - ); - } - - late final _Dart_IsolateDataPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateData'); - late final _Dart_IsolateData = _Dart_IsolateDataPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); - - /// Returns the current isolate group. Will return NULL if there is no - /// current isolate group. - Dart_IsolateGroup Dart_CurrentIsolateGroup() { - return _Dart_CurrentIsolateGroup(); - } - - late final _Dart_CurrentIsolateGroupPtr = - _lookup>( - 'Dart_CurrentIsolateGroup'); - late final _Dart_CurrentIsolateGroup = - _Dart_CurrentIsolateGroupPtr.asFunction(); - - /// Returns the callback data associated with the current isolate group. This - /// data was passed to the isolate group when it was created. - ffi.Pointer Dart_CurrentIsolateGroupData() { - return _Dart_CurrentIsolateGroupData(); - } - - late final _Dart_CurrentIsolateGroupDataPtr = - _lookup Function()>>( - 'Dart_CurrentIsolateGroupData'); - late final _Dart_CurrentIsolateGroupData = _Dart_CurrentIsolateGroupDataPtr - .asFunction Function()>(); - - /// Returns the callback data associated with the specified isolate group. This - /// data was passed to the isolate when it was created. - /// The embedder is responsible for ensuring the consistency of this data - /// with respect to the lifecycle of an isolate group. - ffi.Pointer Dart_IsolateGroupData( - Dart_Isolate isolate, - ) { - return _Dart_IsolateGroupData( - isolate, - ); - } - - late final _Dart_IsolateGroupDataPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateGroupData'); - late final _Dart_IsolateGroupData = _Dart_IsolateGroupDataPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); - - /// Returns the debugging name for the current isolate. - /// - /// This name is unique to each isolate and should only be used to make - /// debugging messages more comprehensible. - Object Dart_DebugName() { - return _Dart_DebugName(); - } - - late final _Dart_DebugNamePtr = - _lookup>('Dart_DebugName'); - late final _Dart_DebugName = - _Dart_DebugNamePtr.asFunction(); - - /// Returns the ID for an isolate which is used to query the service protocol. - /// - /// It is the responsibility of the caller to free the returned ID. - ffi.Pointer Dart_IsolateServiceId( - Dart_Isolate isolate, - ) { - return _Dart_IsolateServiceId( - isolate, - ); - } - - late final _Dart_IsolateServiceIdPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateServiceId'); - late final _Dart_IsolateServiceId = _Dart_IsolateServiceIdPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); - - /// Enters an isolate. After calling this function, - /// the current isolate will be set to the provided isolate. - /// - /// Requires there to be no current isolate. Multiple threads may not be in - /// the same isolate at once. - void Dart_EnterIsolate( - Dart_Isolate isolate, - ) { - return _Dart_EnterIsolate( - isolate, - ); - } - - late final _Dart_EnterIsolatePtr = - _lookup>( - 'Dart_EnterIsolate'); - late final _Dart_EnterIsolate = - _Dart_EnterIsolatePtr.asFunction(); - - /// Kills the given isolate. - /// - /// This function has the same effect as dart:isolate's - /// Isolate.kill(priority:immediate). - /// It can interrupt ordinary Dart code but not native code. If the isolate is - /// in the middle of a long running native function, the isolate will not be - /// killed until control returns to Dart. - /// - /// Does not require a current isolate. It is safe to kill the current isolate if - /// there is one. - void Dart_KillIsolate( - Dart_Isolate isolate, - ) { - return _Dart_KillIsolate( - isolate, - ); - } - - late final _Dart_KillIsolatePtr = - _lookup>( - 'Dart_KillIsolate'); - late final _Dart_KillIsolate = - _Dart_KillIsolatePtr.asFunction(); - - /// Notifies the VM that the embedder expects |size| bytes of memory have become - /// unreachable. The VM may use this hint to adjust the garbage collector's - /// growth policy. - /// - /// Multiple calls are interpreted as increasing, not replacing, the estimate of - /// unreachable memory. - /// - /// Requires there to be a current isolate. - void Dart_HintFreed( - int size, - ) { - return _Dart_HintFreed( - size, - ); - } - - late final _Dart_HintFreedPtr = - _lookup>( - 'Dart_HintFreed'); - late final _Dart_HintFreed = - _Dart_HintFreedPtr.asFunction(); - - /// Notifies the VM that the embedder expects to be idle until |deadline|. The VM - /// may use this time to perform garbage collection or other tasks to avoid - /// delays during execution of Dart code in the future. - /// - /// |deadline| is measured in microseconds against the system's monotonic time. - /// This clock can be accessed via Dart_TimelineGetMicros(). - /// - /// Requires there to be a current isolate. - void Dart_NotifyIdle( - int deadline, - ) { - return _Dart_NotifyIdle( - deadline, - ); - } - - late final _Dart_NotifyIdlePtr = - _lookup>( - 'Dart_NotifyIdle'); - late final _Dart_NotifyIdle = - _Dart_NotifyIdlePtr.asFunction(); - - /// Notifies the VM that the system is running low on memory. - /// - /// Does not require a current isolate. Only valid after calling Dart_Initialize. - void Dart_NotifyLowMemory() { - return _Dart_NotifyLowMemory(); - } - - late final _Dart_NotifyLowMemoryPtr = - _lookup>('Dart_NotifyLowMemory'); - late final _Dart_NotifyLowMemory = - _Dart_NotifyLowMemoryPtr.asFunction(); - - /// Starts the CPU sampling profiler. - void Dart_StartProfiling() { - return _Dart_StartProfiling(); - } - - late final _Dart_StartProfilingPtr = - _lookup>('Dart_StartProfiling'); - late final _Dart_StartProfiling = - _Dart_StartProfilingPtr.asFunction(); - - /// Stops the CPU sampling profiler. - /// - /// Note that some profile samples might still be taken after this fucntion - /// returns due to the asynchronous nature of the implementation on some - /// platforms. - void Dart_StopProfiling() { - return _Dart_StopProfiling(); - } - - late final _Dart_StopProfilingPtr = - _lookup>('Dart_StopProfiling'); - late final _Dart_StopProfiling = - _Dart_StopProfilingPtr.asFunction(); - - /// Notifies the VM that the current thread should not be profiled until a - /// matching call to Dart_ThreadEnableProfiling is made. - /// - /// NOTE: By default, if a thread has entered an isolate it will be profiled. - /// This function should be used when an embedder knows a thread is about - /// to make a blocking call and wants to avoid unnecessary interrupts by - /// the profiler. - void Dart_ThreadDisableProfiling() { - return _Dart_ThreadDisableProfiling(); - } - - late final _Dart_ThreadDisableProfilingPtr = - _lookup>( - 'Dart_ThreadDisableProfiling'); - late final _Dart_ThreadDisableProfiling = - _Dart_ThreadDisableProfilingPtr.asFunction(); - - /// Notifies the VM that the current thread should be profiled. - /// - /// NOTE: It is only legal to call this function *after* calling - /// Dart_ThreadDisableProfiling. - /// - /// NOTE: By default, if a thread has entered an isolate it will be profiled. - void Dart_ThreadEnableProfiling() { - return _Dart_ThreadEnableProfiling(); - } - - late final _Dart_ThreadEnableProfilingPtr = - _lookup>( - 'Dart_ThreadEnableProfiling'); - late final _Dart_ThreadEnableProfiling = - _Dart_ThreadEnableProfilingPtr.asFunction(); - - /// Register symbol information for the Dart VM's profiler and crash dumps. - /// - /// This consumes the output of //topaz/runtime/dart/profiler_symbols, which - /// should be treated as opaque. - void Dart_AddSymbols( - ffi.Pointer dso_name, - ffi.Pointer buffer, - int buffer_size, - ) { - return _Dart_AddSymbols( - dso_name, - buffer, - buffer_size, - ); - } - - late final _Dart_AddSymbolsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.IntPtr)>>('Dart_AddSymbols'); - late final _Dart_AddSymbols = _Dart_AddSymbolsPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// Exits an isolate. After this call, Dart_CurrentIsolate will - /// return NULL. - /// - /// Requires there to be a current isolate. - void Dart_ExitIsolate() { - return _Dart_ExitIsolate(); - } - - late final _Dart_ExitIsolatePtr = - _lookup>('Dart_ExitIsolate'); - late final _Dart_ExitIsolate = - _Dart_ExitIsolatePtr.asFunction(); - - /// Creates a full snapshot of the current isolate heap. - /// - /// A full snapshot is a compact representation of the dart vm isolate heap - /// and dart isolate heap states. These snapshots are used to initialize - /// the vm isolate on startup and fast initialization of an isolate. - /// A Snapshot of the heap is created before any dart code has executed. - /// - /// Requires there to be a current isolate. Not available in the precompiled - /// runtime (check Dart_IsPrecompiledRuntime). - /// - /// \param buffer Returns a pointer to a buffer containing the - /// snapshot. This buffer is scope allocated and is only valid - /// until the next call to Dart_ExitScope. - /// \param size Returns the size of the buffer. - /// \param is_core Create a snapshot containing core libraries. - /// Such snapshot should be agnostic to null safety mode. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateSnapshot( - ffi.Pointer> vm_snapshot_data_buffer, - ffi.Pointer vm_snapshot_data_size, - ffi.Pointer> isolate_snapshot_data_buffer, - ffi.Pointer isolate_snapshot_data_size, - bool is_core, - ) { - return _Dart_CreateSnapshot( - vm_snapshot_data_buffer, - vm_snapshot_data_size, - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - is_core, - ); - } - - late final _Dart_CreateSnapshotPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Bool)>>('Dart_CreateSnapshot'); - late final _Dart_CreateSnapshot = _Dart_CreateSnapshotPtr.asFunction< - Object Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - bool)>(); - - /// Returns whether the buffer contains a kernel file. - /// - /// \param buffer Pointer to a buffer that might contain a kernel binary. - /// \param buffer_size Size of the buffer. - /// - /// \return Whether the buffer contains a kernel binary (full or partial). - bool Dart_IsKernel( - ffi.Pointer buffer, - int buffer_size, - ) { - return _Dart_IsKernel( - buffer, - buffer_size, - ); - } - - late final _Dart_IsKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_IsKernel'); - late final _Dart_IsKernel = _Dart_IsKernelPtr.asFunction< - bool Function(ffi.Pointer, int)>(); - - /// Make isolate runnable. - /// - /// When isolates are spawned, this function is used to indicate that - /// the creation and initialization (including script loading) of the - /// isolate is complete and the isolate can start. - /// This function expects there to be no current isolate. - /// - /// \param isolate The isolate to be made runnable. - /// - /// \return NULL if successful. Returns an error message otherwise. The caller - /// is responsible for freeing the error message. - ffi.Pointer Dart_IsolateMakeRunnable( - Dart_Isolate isolate, - ) { - return _Dart_IsolateMakeRunnable( - isolate, - ); - } - - late final _Dart_IsolateMakeRunnablePtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateMakeRunnable'); - late final _Dart_IsolateMakeRunnable = _Dart_IsolateMakeRunnablePtr - .asFunction Function(Dart_Isolate)>(); - - /// Allows embedders to provide an alternative wakeup mechanism for the - /// delivery of inter-isolate messages. This setting only applies to - /// the current isolate. - /// - /// Most embedders will only call this function once, before isolate - /// execution begins. If this function is called after isolate - /// execution begins, the embedder is responsible for threading issues. - void Dart_SetMessageNotifyCallback( - Dart_MessageNotifyCallback message_notify_callback, - ) { - return _Dart_SetMessageNotifyCallback( - message_notify_callback, - ); - } - - late final _Dart_SetMessageNotifyCallbackPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetMessageNotifyCallback'); - late final _Dart_SetMessageNotifyCallback = _Dart_SetMessageNotifyCallbackPtr - .asFunction(); - - /// Query the current message notify callback for the isolate. - /// - /// \return The current message notify callback for the isolate. - Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback() { - return _Dart_GetMessageNotifyCallback(); - } - - late final _Dart_GetMessageNotifyCallbackPtr = - _lookup>( - 'Dart_GetMessageNotifyCallback'); - late final _Dart_GetMessageNotifyCallback = _Dart_GetMessageNotifyCallbackPtr - .asFunction(); - - /// If the VM flag `--pause-isolates-on-start` was passed this will be true. - /// - /// \return A boolean value indicating if pause on start was requested. - bool Dart_ShouldPauseOnStart() { - return _Dart_ShouldPauseOnStart(); - } - - late final _Dart_ShouldPauseOnStartPtr = - _lookup>( - 'Dart_ShouldPauseOnStart'); - late final _Dart_ShouldPauseOnStart = - _Dart_ShouldPauseOnStartPtr.asFunction(); - - /// Override the VM flag `--pause-isolates-on-start` for the current isolate. - /// - /// \param should_pause Should the isolate be paused on start? - /// - /// NOTE: This must be called before Dart_IsolateMakeRunnable. - void Dart_SetShouldPauseOnStart( - bool should_pause, - ) { - return _Dart_SetShouldPauseOnStart( - should_pause, - ); - } - - late final _Dart_SetShouldPauseOnStartPtr = - _lookup>( - 'Dart_SetShouldPauseOnStart'); - late final _Dart_SetShouldPauseOnStart = - _Dart_SetShouldPauseOnStartPtr.asFunction(); - - /// Is the current isolate paused on start? - /// - /// \return A boolean value indicating if the isolate is paused on start. - bool Dart_IsPausedOnStart() { - return _Dart_IsPausedOnStart(); - } - - late final _Dart_IsPausedOnStartPtr = - _lookup>('Dart_IsPausedOnStart'); - late final _Dart_IsPausedOnStart = - _Dart_IsPausedOnStartPtr.asFunction(); - - /// Called when the embedder has paused the current isolate on start and when - /// the embedder has resumed the isolate. - /// - /// \param paused Is the isolate paused on start? - void Dart_SetPausedOnStart( - bool paused, - ) { - return _Dart_SetPausedOnStart( - paused, - ); - } - - late final _Dart_SetPausedOnStartPtr = - _lookup>( - 'Dart_SetPausedOnStart'); - late final _Dart_SetPausedOnStart = - _Dart_SetPausedOnStartPtr.asFunction(); - - /// If the VM flag `--pause-isolates-on-exit` was passed this will be true. - /// - /// \return A boolean value indicating if pause on exit was requested. - bool Dart_ShouldPauseOnExit() { - return _Dart_ShouldPauseOnExit(); - } - - late final _Dart_ShouldPauseOnExitPtr = - _lookup>( - 'Dart_ShouldPauseOnExit'); - late final _Dart_ShouldPauseOnExit = - _Dart_ShouldPauseOnExitPtr.asFunction(); - - /// Override the VM flag `--pause-isolates-on-exit` for the current isolate. - /// - /// \param should_pause Should the isolate be paused on exit? - void Dart_SetShouldPauseOnExit( - bool should_pause, - ) { - return _Dart_SetShouldPauseOnExit( - should_pause, - ); - } - - late final _Dart_SetShouldPauseOnExitPtr = - _lookup>( - 'Dart_SetShouldPauseOnExit'); - late final _Dart_SetShouldPauseOnExit = - _Dart_SetShouldPauseOnExitPtr.asFunction(); - - /// Is the current isolate paused on exit? - /// - /// \return A boolean value indicating if the isolate is paused on exit. - bool Dart_IsPausedOnExit() { - return _Dart_IsPausedOnExit(); - } - - late final _Dart_IsPausedOnExitPtr = - _lookup>('Dart_IsPausedOnExit'); - late final _Dart_IsPausedOnExit = - _Dart_IsPausedOnExitPtr.asFunction(); - - /// Called when the embedder has paused the current isolate on exit and when - /// the embedder has resumed the isolate. - /// - /// \param paused Is the isolate paused on exit? - void Dart_SetPausedOnExit( - bool paused, - ) { - return _Dart_SetPausedOnExit( - paused, - ); - } - - late final _Dart_SetPausedOnExitPtr = - _lookup>( - 'Dart_SetPausedOnExit'); - late final _Dart_SetPausedOnExit = - _Dart_SetPausedOnExitPtr.asFunction(); - - /// Called when the embedder has caught a top level unhandled exception error - /// in the current isolate. - /// - /// NOTE: It is illegal to call this twice on the same isolate without first - /// clearing the sticky error to null. - /// - /// \param error The unhandled exception error. - void Dart_SetStickyError( - Object error, - ) { - return _Dart_SetStickyError( - error, - ); - } - - late final _Dart_SetStickyErrorPtr = - _lookup>( - 'Dart_SetStickyError'); - late final _Dart_SetStickyError = - _Dart_SetStickyErrorPtr.asFunction(); - - /// Does the current isolate have a sticky error? - bool Dart_HasStickyError() { - return _Dart_HasStickyError(); - } - - late final _Dart_HasStickyErrorPtr = - _lookup>('Dart_HasStickyError'); - late final _Dart_HasStickyError = - _Dart_HasStickyErrorPtr.asFunction(); - - /// Gets the sticky error for the current isolate. - /// - /// \return A handle to the sticky error object or null. - Object Dart_GetStickyError() { - return _Dart_GetStickyError(); - } - - late final _Dart_GetStickyErrorPtr = - _lookup>('Dart_GetStickyError'); - late final _Dart_GetStickyError = - _Dart_GetStickyErrorPtr.asFunction(); - - /// Handles the next pending message for the current isolate. - /// - /// May generate an unhandled exception error. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_HandleMessage() { - return _Dart_HandleMessage(); - } - - late final _Dart_HandleMessagePtr = - _lookup>('Dart_HandleMessage'); - late final _Dart_HandleMessage = - _Dart_HandleMessagePtr.asFunction(); - - /// Drains the microtask queue, then blocks the calling thread until the current - /// isolate recieves a message, then handles all messages. - /// - /// \param timeout_millis When non-zero, the call returns after the indicated - /// number of milliseconds even if no message was received. - /// \return A valid handle if no error occurs, otherwise an error handle. - Object Dart_WaitForEvent( - int timeout_millis, - ) { - return _Dart_WaitForEvent( - timeout_millis, - ); - } - - late final _Dart_WaitForEventPtr = - _lookup>( - 'Dart_WaitForEvent'); - late final _Dart_WaitForEvent = - _Dart_WaitForEventPtr.asFunction(); - - /// Handles any pending messages for the vm service for the current - /// isolate. - /// - /// This function may be used by an embedder at a breakpoint to avoid - /// pausing the vm service. - /// - /// This function can indirectly cause the message notify callback to - /// be called. - /// - /// \return true if the vm service requests the program resume - /// execution, false otherwise - bool Dart_HandleServiceMessages() { - return _Dart_HandleServiceMessages(); - } - - late final _Dart_HandleServiceMessagesPtr = - _lookup>( - 'Dart_HandleServiceMessages'); - late final _Dart_HandleServiceMessages = - _Dart_HandleServiceMessagesPtr.asFunction(); - - /// Does the current isolate have pending service messages? - /// - /// \return true if the isolate has pending service messages, false otherwise. - bool Dart_HasServiceMessages() { - return _Dart_HasServiceMessages(); - } - - late final _Dart_HasServiceMessagesPtr = - _lookup>( - 'Dart_HasServiceMessages'); - late final _Dart_HasServiceMessages = - _Dart_HasServiceMessagesPtr.asFunction(); - - /// Processes any incoming messages for the current isolate. - /// - /// This function may only be used when the embedder has not provided - /// an alternate message delivery mechanism with - /// Dart_SetMessageCallbacks. It is provided for convenience. - /// - /// This function waits for incoming messages for the current - /// isolate. As new messages arrive, they are handled using - /// Dart_HandleMessage. The routine exits when all ports to the - /// current isolate are closed. - /// - /// \return A valid handle if the run loop exited successfully. If an - /// exception or other error occurs while processing messages, an - /// error handle is returned. - Object Dart_RunLoop() { - return _Dart_RunLoop(); - } - - late final _Dart_RunLoopPtr = - _lookup>('Dart_RunLoop'); - late final _Dart_RunLoop = _Dart_RunLoopPtr.asFunction(); - - /// Lets the VM run message processing for the isolate. - /// - /// This function expects there to a current isolate and the current isolate - /// must not have an active api scope. The VM will take care of making the - /// isolate runnable (if not already), handles its message loop and will take - /// care of shutting the isolate down once it's done. - /// - /// \param errors_are_fatal Whether uncaught errors should be fatal. - /// \param on_error_port A port to notify on uncaught errors (or ILLEGAL_PORT). - /// \param on_exit_port A port to notify on exit (or ILLEGAL_PORT). - /// \param error A non-NULL pointer which will hold an error message if the call - /// fails. The error has to be free()ed by the caller. - /// - /// \return If successfull the VM takes owernship of the isolate and takes care - /// of its message loop. If not successful the caller retains owernship of the - /// isolate. - bool Dart_RunLoopAsync( - bool errors_are_fatal, - int on_error_port, - int on_exit_port, - ffi.Pointer> error, - ) { - return _Dart_RunLoopAsync( - errors_are_fatal, - on_error_port, - on_exit_port, - error, - ); - } - - late final _Dart_RunLoopAsyncPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Bool, Dart_Port, Dart_Port, - ffi.Pointer>)>>('Dart_RunLoopAsync'); - late final _Dart_RunLoopAsync = _Dart_RunLoopAsyncPtr.asFunction< - bool Function(bool, int, int, ffi.Pointer>)>(); - - /// Gets the main port id for the current isolate. - int Dart_GetMainPortId() { - return _Dart_GetMainPortId(); - } - - late final _Dart_GetMainPortIdPtr = - _lookup>('Dart_GetMainPortId'); - late final _Dart_GetMainPortId = - _Dart_GetMainPortIdPtr.asFunction(); - - /// Does the current isolate have live ReceivePorts? - /// - /// A ReceivePort is live when it has not been closed. - bool Dart_HasLivePorts() { - return _Dart_HasLivePorts(); - } - - late final _Dart_HasLivePortsPtr = - _lookup>('Dart_HasLivePorts'); - late final _Dart_HasLivePorts = - _Dart_HasLivePortsPtr.asFunction(); - - /// Posts a message for some isolate. The message is a serialized - /// object. - /// - /// Requires there to be a current isolate. - /// - /// \param port The destination port. - /// \param object An object from the current isolate. - /// - /// \return True if the message was posted. - bool Dart_Post( - int port_id, - Object object, - ) { - return _Dart_Post( - port_id, - object, - ); - } - - late final _Dart_PostPtr = - _lookup>( - 'Dart_Post'); - late final _Dart_Post = - _Dart_PostPtr.asFunction(); - - /// Returns a new SendPort with the provided port id. - /// - /// \param port_id The destination port. - /// - /// \return A new SendPort if no errors occurs. Otherwise returns - /// an error handle. - Object Dart_NewSendPort( - int port_id, - ) { - return _Dart_NewSendPort( - port_id, - ); - } - - late final _Dart_NewSendPortPtr = - _lookup>( - 'Dart_NewSendPort'); - late final _Dart_NewSendPort = - _Dart_NewSendPortPtr.asFunction(); - - /// Gets the SendPort id for the provided SendPort. - /// \param port A SendPort object whose id is desired. - /// \param port_id Returns the id of the SendPort. - /// \return Success if no error occurs. Otherwise returns - /// an error handle. - Object Dart_SendPortGetId( - Object port, - ffi.Pointer port_id, - ) { - return _Dart_SendPortGetId( - port, - port_id, - ); - } - - late final _Dart_SendPortGetIdPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_SendPortGetId'); - late final _Dart_SendPortGetId = _Dart_SendPortGetIdPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Enters a new scope. - /// - /// All new local handles will be created in this scope. Additionally, - /// some functions may return "scope allocated" memory which is only - /// valid within this scope. - /// - /// Requires there to be a current isolate. - void Dart_EnterScope() { - return _Dart_EnterScope(); - } - - late final _Dart_EnterScopePtr = - _lookup>('Dart_EnterScope'); - late final _Dart_EnterScope = - _Dart_EnterScopePtr.asFunction(); - - /// Exits a scope. - /// - /// The previous scope (if any) becomes the current scope. - /// - /// Requires there to be a current isolate. - void Dart_ExitScope() { - return _Dart_ExitScope(); - } - - late final _Dart_ExitScopePtr = - _lookup>('Dart_ExitScope'); - late final _Dart_ExitScope = _Dart_ExitScopePtr.asFunction(); - - /// The Dart VM uses "zone allocation" for temporary structures. Zones - /// support very fast allocation of small chunks of memory. The chunks - /// cannot be deallocated individually, but instead zones support - /// deallocating all chunks in one fast operation. - /// - /// This function makes it possible for the embedder to allocate - /// temporary data in the VMs zone allocator. - /// - /// Zone allocation is possible: - /// 1. when inside a scope where local handles can be allocated - /// 2. when processing a message from a native port in a native port - /// handler - /// - /// All the memory allocated this way will be reclaimed either on the - /// next call to Dart_ExitScope or when the native port handler exits. - /// - /// \param size Size of the memory to allocate. - /// - /// \return A pointer to the allocated memory. NULL if allocation - /// failed. Failure might due to is no current VM zone. - ffi.Pointer Dart_ScopeAllocate( - int size, - ) { - return _Dart_ScopeAllocate( - size, - ); - } - - late final _Dart_ScopeAllocatePtr = - _lookup Function(ffi.IntPtr)>>( - 'Dart_ScopeAllocate'); - late final _Dart_ScopeAllocate = - _Dart_ScopeAllocatePtr.asFunction Function(int)>(); - - /// Returns the null object. - /// - /// \return A handle to the null object. - Object Dart_Null() { - return _Dart_Null(); - } - - late final _Dart_NullPtr = - _lookup>('Dart_Null'); - late final _Dart_Null = _Dart_NullPtr.asFunction(); - - /// Is this object null? - bool Dart_IsNull( - Object object, - ) { - return _Dart_IsNull( - object, - ); - } - - late final _Dart_IsNullPtr = - _lookup>('Dart_IsNull'); - late final _Dart_IsNull = _Dart_IsNullPtr.asFunction(); - - /// Returns the empty string object. - /// - /// \return A handle to the empty string object. - Object Dart_EmptyString() { - return _Dart_EmptyString(); - } - - late final _Dart_EmptyStringPtr = - _lookup>('Dart_EmptyString'); - late final _Dart_EmptyString = - _Dart_EmptyStringPtr.asFunction(); - - /// Returns types that are not classes, and which therefore cannot be looked up - /// as library members by Dart_GetType. - /// - /// \return A handle to the dynamic, void or Never type. - Object Dart_TypeDynamic() { - return _Dart_TypeDynamic(); - } - - late final _Dart_TypeDynamicPtr = - _lookup>('Dart_TypeDynamic'); - late final _Dart_TypeDynamic = - _Dart_TypeDynamicPtr.asFunction(); - - Object Dart_TypeVoid() { - return _Dart_TypeVoid(); - } - - late final _Dart_TypeVoidPtr = - _lookup>('Dart_TypeVoid'); - late final _Dart_TypeVoid = _Dart_TypeVoidPtr.asFunction(); - - Object Dart_TypeNever() { - return _Dart_TypeNever(); - } - - late final _Dart_TypeNeverPtr = - _lookup>('Dart_TypeNever'); - late final _Dart_TypeNever = - _Dart_TypeNeverPtr.asFunction(); - - /// Checks if the two objects are equal. - /// - /// The result of the comparison is returned through the 'equal' - /// parameter. The return value itself is used to indicate success or - /// failure, not equality. - /// - /// May generate an unhandled exception error. - /// - /// \param obj1 An object to be compared. - /// \param obj2 An object to be compared. - /// \param equal Returns the result of the equality comparison. - /// - /// \return A valid handle if no error occurs during the comparison. - Object Dart_ObjectEquals( - Object obj1, - Object obj2, - ffi.Pointer equal, - ) { - return _Dart_ObjectEquals( - obj1, - obj2, - equal, - ); - } - - late final _Dart_ObjectEqualsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, - ffi.Pointer)>>('Dart_ObjectEquals'); - late final _Dart_ObjectEquals = _Dart_ObjectEqualsPtr.asFunction< - Object Function(Object, Object, ffi.Pointer)>(); - - /// Is this object an instance of some type? - /// - /// The result of the test is returned through the 'instanceof' parameter. - /// The return value itself is used to indicate success or failure. - /// - /// \param object An object. - /// \param type A type. - /// \param instanceof Return true if 'object' is an instance of type 'type'. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ObjectIsType( - Object object, - Object type, - ffi.Pointer instanceof, - ) { - return _Dart_ObjectIsType( - object, - type, - instanceof, - ); - } - - late final _Dart_ObjectIsTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, - ffi.Pointer)>>('Dart_ObjectIsType'); - late final _Dart_ObjectIsType = _Dart_ObjectIsTypePtr.asFunction< - Object Function(Object, Object, ffi.Pointer)>(); - - /// Query object type. - /// - /// \param object Some Object. - /// - /// \return true if Object is of the specified type. - bool Dart_IsInstance( - Object object, - ) { - return _Dart_IsInstance( - object, - ); - } - - late final _Dart_IsInstancePtr = - _lookup>( - 'Dart_IsInstance'); - late final _Dart_IsInstance = - _Dart_IsInstancePtr.asFunction(); - - bool Dart_IsNumber( - Object object, - ) { - return _Dart_IsNumber( - object, - ); - } - - late final _Dart_IsNumberPtr = - _lookup>( - 'Dart_IsNumber'); - late final _Dart_IsNumber = - _Dart_IsNumberPtr.asFunction(); - - bool Dart_IsInteger( - Object object, - ) { - return _Dart_IsInteger( - object, - ); - } - - late final _Dart_IsIntegerPtr = - _lookup>( - 'Dart_IsInteger'); - late final _Dart_IsInteger = - _Dart_IsIntegerPtr.asFunction(); - - bool Dart_IsDouble( - Object object, - ) { - return _Dart_IsDouble( - object, - ); - } - - late final _Dart_IsDoublePtr = - _lookup>( - 'Dart_IsDouble'); - late final _Dart_IsDouble = - _Dart_IsDoublePtr.asFunction(); - - bool Dart_IsBoolean( - Object object, - ) { - return _Dart_IsBoolean( - object, - ); - } - - late final _Dart_IsBooleanPtr = - _lookup>( - 'Dart_IsBoolean'); - late final _Dart_IsBoolean = - _Dart_IsBooleanPtr.asFunction(); - - bool Dart_IsString( - Object object, - ) { - return _Dart_IsString( - object, - ); - } - - late final _Dart_IsStringPtr = - _lookup>( - 'Dart_IsString'); - late final _Dart_IsString = - _Dart_IsStringPtr.asFunction(); - - bool Dart_IsStringLatin1( - Object object, - ) { - return _Dart_IsStringLatin1( - object, - ); - } - - late final _Dart_IsStringLatin1Ptr = - _lookup>( - 'Dart_IsStringLatin1'); - late final _Dart_IsStringLatin1 = - _Dart_IsStringLatin1Ptr.asFunction(); - - bool Dart_IsExternalString( - Object object, - ) { - return _Dart_IsExternalString( - object, - ); - } - - late final _Dart_IsExternalStringPtr = - _lookup>( - 'Dart_IsExternalString'); - late final _Dart_IsExternalString = - _Dart_IsExternalStringPtr.asFunction(); - - bool Dart_IsList( - Object object, - ) { - return _Dart_IsList( - object, - ); - } - - late final _Dart_IsListPtr = - _lookup>('Dart_IsList'); - late final _Dart_IsList = _Dart_IsListPtr.asFunction(); - - bool Dart_IsMap( - Object object, - ) { - return _Dart_IsMap( - object, - ); - } - - late final _Dart_IsMapPtr = - _lookup>('Dart_IsMap'); - late final _Dart_IsMap = _Dart_IsMapPtr.asFunction(); - - bool Dart_IsLibrary( - Object object, - ) { - return _Dart_IsLibrary( - object, - ); - } - - late final _Dart_IsLibraryPtr = - _lookup>( - 'Dart_IsLibrary'); - late final _Dart_IsLibrary = - _Dart_IsLibraryPtr.asFunction(); - - bool Dart_IsType( - Object handle, - ) { - return _Dart_IsType( - handle, - ); - } - - late final _Dart_IsTypePtr = - _lookup>('Dart_IsType'); - late final _Dart_IsType = _Dart_IsTypePtr.asFunction(); - - bool Dart_IsFunction( - Object handle, - ) { - return _Dart_IsFunction( - handle, - ); - } - - late final _Dart_IsFunctionPtr = - _lookup>( - 'Dart_IsFunction'); - late final _Dart_IsFunction = - _Dart_IsFunctionPtr.asFunction(); - - bool Dart_IsVariable( - Object handle, - ) { - return _Dart_IsVariable( - handle, - ); - } - - late final _Dart_IsVariablePtr = - _lookup>( - 'Dart_IsVariable'); - late final _Dart_IsVariable = - _Dart_IsVariablePtr.asFunction(); - - bool Dart_IsTypeVariable( - Object handle, - ) { - return _Dart_IsTypeVariable( - handle, - ); - } - - late final _Dart_IsTypeVariablePtr = - _lookup>( - 'Dart_IsTypeVariable'); - late final _Dart_IsTypeVariable = - _Dart_IsTypeVariablePtr.asFunction(); - - bool Dart_IsClosure( - Object object, - ) { - return _Dart_IsClosure( - object, - ); - } - - late final _Dart_IsClosurePtr = - _lookup>( - 'Dart_IsClosure'); - late final _Dart_IsClosure = - _Dart_IsClosurePtr.asFunction(); - - bool Dart_IsTypedData( - Object object, - ) { - return _Dart_IsTypedData( - object, - ); - } - - late final _Dart_IsTypedDataPtr = - _lookup>( - 'Dart_IsTypedData'); - late final _Dart_IsTypedData = - _Dart_IsTypedDataPtr.asFunction(); - - bool Dart_IsByteBuffer( - Object object, - ) { - return _Dart_IsByteBuffer( - object, - ); - } - - late final _Dart_IsByteBufferPtr = - _lookup>( - 'Dart_IsByteBuffer'); - late final _Dart_IsByteBuffer = - _Dart_IsByteBufferPtr.asFunction(); - - bool Dart_IsFuture( - Object object, - ) { - return _Dart_IsFuture( - object, - ); - } - - late final _Dart_IsFuturePtr = - _lookup>( - 'Dart_IsFuture'); - late final _Dart_IsFuture = - _Dart_IsFuturePtr.asFunction(); - - /// Gets the type of a Dart language object. - /// - /// \param instance Some Dart object. - /// - /// \return If no error occurs, the type is returned. Otherwise an - /// error handle is returned. - Object Dart_InstanceGetType( - Object instance, - ) { - return _Dart_InstanceGetType( - instance, - ); - } - - late final _Dart_InstanceGetTypePtr = - _lookup>( - 'Dart_InstanceGetType'); - late final _Dart_InstanceGetType = - _Dart_InstanceGetTypePtr.asFunction(); - - /// Returns the name for the provided class type. - /// - /// \return A valid string handle if no error occurs during the - /// operation. - Object Dart_ClassName( - Object cls_type, - ) { - return _Dart_ClassName( - cls_type, - ); - } - - late final _Dart_ClassNamePtr = - _lookup>( - 'Dart_ClassName'); - late final _Dart_ClassName = - _Dart_ClassNamePtr.asFunction(); - - /// Returns the name for the provided function or method. - /// - /// \return A valid string handle if no error occurs during the - /// operation. - Object Dart_FunctionName( - Object function, - ) { - return _Dart_FunctionName( - function, - ); - } - - late final _Dart_FunctionNamePtr = - _lookup>( - 'Dart_FunctionName'); - late final _Dart_FunctionName = - _Dart_FunctionNamePtr.asFunction(); - - /// Returns a handle to the owner of a function. - /// - /// The owner of an instance method or a static method is its defining - /// class. The owner of a top-level function is its defining - /// library. The owner of the function of a non-implicit closure is the - /// function of the method or closure that defines the non-implicit - /// closure. - /// - /// \return A valid handle to the owner of the function, or an error - /// handle if the argument is not a valid handle to a function. - Object Dart_FunctionOwner( - Object function, - ) { - return _Dart_FunctionOwner( - function, - ); - } - - late final _Dart_FunctionOwnerPtr = - _lookup>( - 'Dart_FunctionOwner'); - late final _Dart_FunctionOwner = - _Dart_FunctionOwnerPtr.asFunction(); - - /// Determines whether a function handle referes to a static function - /// of method. - /// - /// For the purposes of the embedding API, a top-level function is - /// implicitly declared static. - /// - /// \param function A handle to a function or method declaration. - /// \param is_static Returns whether the function or method is declared static. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_FunctionIsStatic( - Object function, - ffi.Pointer is_static, - ) { - return _Dart_FunctionIsStatic( - function, - is_static, - ); - } - - late final _Dart_FunctionIsStaticPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_FunctionIsStatic'); - late final _Dart_FunctionIsStatic = _Dart_FunctionIsStaticPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Is this object a closure resulting from a tear-off (closurized method)? - /// - /// Returns true for closures produced when an ordinary method is accessed - /// through a getter call. Returns false otherwise, in particular for closures - /// produced from local function declarations. - /// - /// \param object Some Object. - /// - /// \return true if Object is a tear-off. - bool Dart_IsTearOff( - Object object, - ) { - return _Dart_IsTearOff( - object, - ); - } - - late final _Dart_IsTearOffPtr = - _lookup>( - 'Dart_IsTearOff'); - late final _Dart_IsTearOff = - _Dart_IsTearOffPtr.asFunction(); - - /// Retrieves the function of a closure. - /// - /// \return A handle to the function of the closure, or an error handle if the - /// argument is not a closure. - Object Dart_ClosureFunction( - Object closure, - ) { - return _Dart_ClosureFunction( - closure, - ); - } - - late final _Dart_ClosureFunctionPtr = - _lookup>( - 'Dart_ClosureFunction'); - late final _Dart_ClosureFunction = - _Dart_ClosureFunctionPtr.asFunction(); - - /// Returns a handle to the library which contains class. - /// - /// \return A valid handle to the library with owns class, null if the class - /// has no library or an error handle if the argument is not a valid handle - /// to a class type. - Object Dart_ClassLibrary( - Object cls_type, - ) { - return _Dart_ClassLibrary( - cls_type, - ); - } - - late final _Dart_ClassLibraryPtr = - _lookup>( - 'Dart_ClassLibrary'); - late final _Dart_ClassLibrary = - _Dart_ClassLibraryPtr.asFunction(); - - /// Does this Integer fit into a 64-bit signed integer? - /// - /// \param integer An integer. - /// \param fits Returns true if the integer fits into a 64-bit signed integer. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerFitsIntoInt64( - Object integer, - ffi.Pointer fits, - ) { - return _Dart_IntegerFitsIntoInt64( - integer, - fits, - ); - } - - late final _Dart_IntegerFitsIntoInt64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IntegerFitsIntoInt64'); - late final _Dart_IntegerFitsIntoInt64 = _Dart_IntegerFitsIntoInt64Ptr - .asFunction)>(); - - /// Does this Integer fit into a 64-bit unsigned integer? - /// - /// \param integer An integer. - /// \param fits Returns true if the integer fits into a 64-bit unsigned integer. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerFitsIntoUint64( - Object integer, - ffi.Pointer fits, - ) { - return _Dart_IntegerFitsIntoUint64( - integer, - fits, - ); - } - - late final _Dart_IntegerFitsIntoUint64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer)>>('Dart_IntegerFitsIntoUint64'); - late final _Dart_IntegerFitsIntoUint64 = _Dart_IntegerFitsIntoUint64Ptr - .asFunction)>(); - - /// Returns an Integer with the provided value. - /// - /// \param value The value of the integer. - /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewInteger( - int value, - ) { - return _Dart_NewInteger( - value, - ); - } - - late final _Dart_NewIntegerPtr = - _lookup>( - 'Dart_NewInteger'); - late final _Dart_NewInteger = - _Dart_NewIntegerPtr.asFunction(); - - /// Returns an Integer with the provided value. - /// - /// \param value The unsigned value of the integer. - /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewIntegerFromUint64( - int value, - ) { - return _Dart_NewIntegerFromUint64( - value, - ); - } - - late final _Dart_NewIntegerFromUint64Ptr = - _lookup>( - 'Dart_NewIntegerFromUint64'); - late final _Dart_NewIntegerFromUint64 = - _Dart_NewIntegerFromUint64Ptr.asFunction(); - - /// Returns an Integer with the provided value. - /// - /// \param value The value of the integer represented as a C string - /// containing a hexadecimal number. - /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewIntegerFromHexCString( - ffi.Pointer value, - ) { - return _Dart_NewIntegerFromHexCString( - value, - ); - } - - late final _Dart_NewIntegerFromHexCStringPtr = - _lookup)>>( - 'Dart_NewIntegerFromHexCString'); - late final _Dart_NewIntegerFromHexCString = _Dart_NewIntegerFromHexCStringPtr - .asFunction)>(); - - /// Gets the value of an Integer. - /// - /// The integer must fit into a 64-bit signed integer, otherwise an error occurs. - /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToInt64( - Object integer, - ffi.Pointer value, - ) { - return _Dart_IntegerToInt64( - integer, - value, - ); - } - - late final _Dart_IntegerToInt64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IntegerToInt64'); - late final _Dart_IntegerToInt64 = _Dart_IntegerToInt64Ptr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Gets the value of an Integer. - /// - /// The integer must fit into a 64-bit unsigned integer, otherwise an - /// error occurs. - /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToUint64( - Object integer, - ffi.Pointer value, - ) { - return _Dart_IntegerToUint64( - integer, - value, - ); - } - - late final _Dart_IntegerToUint64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IntegerToUint64'); - late final _Dart_IntegerToUint64 = _Dart_IntegerToUint64Ptr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Gets the value of an integer as a hexadecimal C string. - /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer as a hexadecimal C - /// string. This C string is scope allocated and is only valid until - /// the next call to Dart_ExitScope. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToHexCString( - Object integer, - ffi.Pointer> value, - ) { - return _Dart_IntegerToHexCString( - integer, - value, - ); - } - - late final _Dart_IntegerToHexCStringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer>)>>('Dart_IntegerToHexCString'); - late final _Dart_IntegerToHexCString = - _Dart_IntegerToHexCStringPtr.asFunction< - Object Function(Object, ffi.Pointer>)>(); - - /// Returns a Double with the provided value. - /// - /// \param value A double. - /// - /// \return The Double object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewDouble( - double value, - ) { - return _Dart_NewDouble( - value, - ); - } - - late final _Dart_NewDoublePtr = - _lookup>( - 'Dart_NewDouble'); - late final _Dart_NewDouble = - _Dart_NewDoublePtr.asFunction(); - - /// Gets the value of a Double - /// - /// \param double_obj A Double - /// \param value Returns the value of the Double. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_DoubleValue( - Object double_obj, - ffi.Pointer value, - ) { - return _Dart_DoubleValue( - double_obj, - value, - ); - } - - late final _Dart_DoubleValuePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_DoubleValue'); - late final _Dart_DoubleValue = _Dart_DoubleValuePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Returns a closure of static function 'function_name' in the class 'class_name' - /// in the exported namespace of specified 'library'. - /// - /// \param library Library object - /// \param cls_type Type object representing a Class - /// \param function_name Name of the static function in the class - /// - /// \return A valid Dart instance if no error occurs during the operation. - Object Dart_GetStaticMethodClosure( - Object library1, - Object cls_type, - Object function_name, - ) { - return _Dart_GetStaticMethodClosure( - library1, - cls_type, - function_name, - ); - } - - late final _Dart_GetStaticMethodClosurePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, - ffi.Handle)>>('Dart_GetStaticMethodClosure'); - late final _Dart_GetStaticMethodClosure = _Dart_GetStaticMethodClosurePtr - .asFunction(); - - /// Returns the True object. - /// - /// Requires there to be a current isolate. - /// - /// \return A handle to the True object. - Object Dart_True() { - return _Dart_True(); - } - - late final _Dart_TruePtr = - _lookup>('Dart_True'); - late final _Dart_True = _Dart_TruePtr.asFunction(); - - /// Returns the False object. - /// - /// Requires there to be a current isolate. - /// - /// \return A handle to the False object. - Object Dart_False() { - return _Dart_False(); - } - - late final _Dart_FalsePtr = - _lookup>('Dart_False'); - late final _Dart_False = _Dart_FalsePtr.asFunction(); - - /// Returns a Boolean with the provided value. - /// - /// \param value true or false. - /// - /// \return The Boolean object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewBoolean( - bool value, - ) { - return _Dart_NewBoolean( - value, - ); - } - - late final _Dart_NewBooleanPtr = - _lookup>( - 'Dart_NewBoolean'); - late final _Dart_NewBoolean = - _Dart_NewBooleanPtr.asFunction(); - - /// Gets the value of a Boolean - /// - /// \param boolean_obj A Boolean - /// \param value Returns the value of the Boolean. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_BooleanValue( - Object boolean_obj, - ffi.Pointer value, - ) { - return _Dart_BooleanValue( - boolean_obj, - value, - ); - } - - late final _Dart_BooleanValuePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_BooleanValue'); - late final _Dart_BooleanValue = _Dart_BooleanValuePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Gets the length of a String. - /// - /// \param str A String. - /// \param length Returns the length of the String. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringLength( - Object str, - ffi.Pointer length, - ) { - return _Dart_StringLength( - str, - length, - ); - } - - late final _Dart_StringLengthPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_StringLength'); - late final _Dart_StringLength = _Dart_StringLengthPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Returns a String built from the provided C string - /// (There is an implicit assumption that the C string passed in contains - /// UTF-8 encoded characters and '\0' is considered as a termination - /// character). - /// - /// \param value A C String - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromCString( - ffi.Pointer str, - ) { - return _Dart_NewStringFromCString( - str, - ); - } - - late final _Dart_NewStringFromCStringPtr = - _lookup)>>( - 'Dart_NewStringFromCString'); - late final _Dart_NewStringFromCString = _Dart_NewStringFromCStringPtr - .asFunction)>(); - - /// Returns a String built from an array of UTF-8 encoded characters. - /// - /// \param utf8_array An array of UTF-8 encoded characters. - /// \param length The length of the codepoints array. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF8( - ffi.Pointer utf8_array, - int length, - ) { - return _Dart_NewStringFromUTF8( - utf8_array, - length, - ); - } - - late final _Dart_NewStringFromUTF8Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF8'); - late final _Dart_NewStringFromUTF8 = _Dart_NewStringFromUTF8Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); - - /// Returns a String built from an array of UTF-16 encoded characters. - /// - /// \param utf16_array An array of UTF-16 encoded characters. - /// \param length The length of the codepoints array. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF16( - ffi.Pointer utf16_array, - int length, - ) { - return _Dart_NewStringFromUTF16( - utf16_array, - length, - ); - } - - late final _Dart_NewStringFromUTF16Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF16'); - late final _Dart_NewStringFromUTF16 = _Dart_NewStringFromUTF16Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); - - /// Returns a String built from an array of UTF-32 encoded characters. - /// - /// \param utf32_array An array of UTF-32 encoded characters. - /// \param length The length of the codepoints array. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF32( - ffi.Pointer utf32_array, - int length, - ) { - return _Dart_NewStringFromUTF32( - utf32_array, - length, - ); - } - - late final _Dart_NewStringFromUTF32Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF32'); - late final _Dart_NewStringFromUTF32 = _Dart_NewStringFromUTF32Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); - - /// Returns a String which references an external array of - /// Latin-1 (ISO-8859-1) encoded characters. - /// - /// \param latin1_array Array of Latin-1 encoded characters. This must not move. - /// \param length The length of the characters array. - /// \param peer An external pointer to associate with this string. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A callback to be called when this string is finalized. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalLatin1String( - ffi.Pointer latin1_array, - int length, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewExternalLatin1String( - latin1_array, - length, - peer, - external_allocation_size, - callback, - ); - } - - late final _Dart_NewExternalLatin1StringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewExternalLatin1String'); - late final _Dart_NewExternalLatin1String = - _Dart_NewExternalLatin1StringPtr.asFunction< - Object Function(ffi.Pointer, int, ffi.Pointer, - int, Dart_HandleFinalizer)>(); - - /// Returns a String which references an external array of UTF-16 encoded - /// characters. - /// - /// \param utf16_array An array of UTF-16 encoded characters. This must not move. - /// \param length The length of the characters array. - /// \param peer An external pointer to associate with this string. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A callback to be called when this string is finalized. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalUTF16String( - ffi.Pointer utf16_array, - int length, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewExternalUTF16String( - utf16_array, - length, - peer, - external_allocation_size, - callback, - ); - } - - late final _Dart_NewExternalUTF16StringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewExternalUTF16String'); - late final _Dart_NewExternalUTF16String = - _Dart_NewExternalUTF16StringPtr.asFunction< - Object Function(ffi.Pointer, int, ffi.Pointer, - int, Dart_HandleFinalizer)>(); - - /// Gets the C string representation of a String. - /// (It is a sequence of UTF-8 encoded values with a '\0' termination.) - /// - /// \param str A string. - /// \param cstr Returns the String represented as a C string. - /// This C string is scope allocated and is only valid until - /// the next call to Dart_ExitScope. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToCString( - Object str, - ffi.Pointer> cstr, - ) { - return _Dart_StringToCString( - str, - cstr, - ); - } - - late final _Dart_StringToCStringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer>)>>('Dart_StringToCString'); - late final _Dart_StringToCString = _Dart_StringToCStringPtr.asFunction< - Object Function(Object, ffi.Pointer>)>(); - - /// Gets a UTF-8 encoded representation of a String. - /// - /// Any unpaired surrogate code points in the string will be converted as - /// replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need - /// to preserve unpaired surrogates, use the Dart_StringToUTF16 function. - /// - /// \param str A string. - /// \param utf8_array Returns the String represented as UTF-8 code - /// units. This UTF-8 array is scope allocated and is only valid - /// until the next call to Dart_ExitScope. - /// \param length Used to return the length of the array which was - /// actually used. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToUTF8( - Object str, - ffi.Pointer> utf8_array, - ffi.Pointer length, - ) { - return _Dart_StringToUTF8( - str, - utf8_array, - length, - ); - } - - late final _Dart_StringToUTF8Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer>, - ffi.Pointer)>>('Dart_StringToUTF8'); - late final _Dart_StringToUTF8 = _Dart_StringToUTF8Ptr.asFunction< - Object Function(Object, ffi.Pointer>, - ffi.Pointer)>(); - - /// Gets the data corresponding to the string object. This function returns - /// the data only for Latin-1 (ISO-8859-1) string objects. For all other - /// string objects it returns an error. - /// - /// \param str A string. - /// \param latin1_array An array allocated by the caller, used to return - /// the string data. - /// \param length Used to pass in the length of the provided array. - /// Used to return the length of the array which was actually used. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToLatin1( - Object str, - ffi.Pointer latin1_array, - ffi.Pointer length, - ) { - return _Dart_StringToLatin1( - str, - latin1_array, - length, - ); - } - - late final _Dart_StringToLatin1Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer, - ffi.Pointer)>>('Dart_StringToLatin1'); - late final _Dart_StringToLatin1 = _Dart_StringToLatin1Ptr.asFunction< - Object Function( - Object, ffi.Pointer, ffi.Pointer)>(); - - /// Gets the UTF-16 encoded representation of a string. - /// - /// \param str A string. - /// \param utf16_array An array allocated by the caller, used to return - /// the array of UTF-16 encoded characters. - /// \param length Used to pass in the length of the provided array. - /// Used to return the length of the array which was actually used. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToUTF16( - Object str, - ffi.Pointer utf16_array, - ffi.Pointer length, - ) { - return _Dart_StringToUTF16( - str, - utf16_array, - length, - ); - } - - late final _Dart_StringToUTF16Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer, - ffi.Pointer)>>('Dart_StringToUTF16'); - late final _Dart_StringToUTF16 = _Dart_StringToUTF16Ptr.asFunction< - Object Function( - Object, ffi.Pointer, ffi.Pointer)>(); - - /// Gets the storage size in bytes of a String. - /// - /// \param str A String. - /// \param length Returns the storage size in bytes of the String. - /// This is the size in bytes needed to store the String. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringStorageSize( - Object str, - ffi.Pointer size, - ) { - return _Dart_StringStorageSize( - str, - size, - ); - } - - late final _Dart_StringStorageSizePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_StringStorageSize'); - late final _Dart_StringStorageSize = _Dart_StringStorageSizePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Retrieves some properties associated with a String. - /// Properties retrieved are: - /// - character size of the string (one or two byte) - /// - length of the string - /// - peer pointer of string if it is an external string. - /// \param str A String. - /// \param char_size Returns the character size of the String. - /// \param str_len Returns the length of the String. - /// \param peer Returns the peer pointer associated with the String or 0 if - /// there is no peer pointer for it. - /// \return Success if no error occurs. Otherwise returns - /// an error handle. - Object Dart_StringGetProperties( - Object str, - ffi.Pointer char_size, - ffi.Pointer str_len, - ffi.Pointer> peer, - ) { - return _Dart_StringGetProperties( - str, - char_size, - str_len, - peer, - ); - } - - late final _Dart_StringGetPropertiesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('Dart_StringGetProperties'); - late final _Dart_StringGetProperties = - _Dart_StringGetPropertiesPtr.asFunction< - Object Function(Object, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - /// Returns a List of the desired length. - /// - /// \param length The length of the list. - /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewList( - int length, - ) { - return _Dart_NewList( - length, - ); - } - - late final _Dart_NewListPtr = - _lookup>( - 'Dart_NewList'); - late final _Dart_NewList = - _Dart_NewListPtr.asFunction(); - - /// TODO(bkonyi): convert this to use nullable types once NNBD is enabled. - /// /** - /// * Returns a List of the desired length with the desired legacy element type. - /// * - /// * \param element_type_id The type of elements of the list. - /// * \param length The length of the list. - /// * - /// * \return The List object if no error occurs. Otherwise returns an error - /// * handle. - /// */ - Object Dart_NewListOf( - int element_type_id, - int length, - ) { - return _Dart_NewListOf( - element_type_id, - length, - ); - } - - late final _Dart_NewListOfPtr = - _lookup>( - 'Dart_NewListOf'); - late final _Dart_NewListOf = - _Dart_NewListOfPtr.asFunction(); - - /// Returns a List of the desired length with the desired element type. - /// - /// \param element_type Handle to a nullable type object. E.g., from - /// Dart_GetType or Dart_GetNullableType. - /// - /// \param length The length of the list. - /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewListOfType( - Object element_type, - int length, - ) { - return _Dart_NewListOfType( - element_type, - length, - ); - } - - late final _Dart_NewListOfTypePtr = - _lookup>( - 'Dart_NewListOfType'); - late final _Dart_NewListOfType = - _Dart_NewListOfTypePtr.asFunction(); - - /// Returns a List of the desired length with the desired element type, filled - /// with the provided object. - /// - /// \param element_type Handle to a type object. E.g., from Dart_GetType. - /// - /// \param fill_object Handle to an object of type 'element_type' that will be - /// used to populate the list. This parameter can only be Dart_Null() if the - /// length of the list is 0 or 'element_type' is a nullable type. - /// - /// \param length The length of the list. - /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewListOfTypeFilled( - Object element_type, - Object fill_object, - int length, - ) { - return _Dart_NewListOfTypeFilled( - element_type, - fill_object, - length, - ); - } - - late final _Dart_NewListOfTypeFilledPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Handle, ffi.IntPtr)>>('Dart_NewListOfTypeFilled'); - late final _Dart_NewListOfTypeFilled = _Dart_NewListOfTypeFilledPtr - .asFunction(); - - /// Gets the length of a List. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param length Returns the length of the List. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ListLength( - Object list, - ffi.Pointer length, - ) { - return _Dart_ListLength( - list, - length, - ); - } - - late final _Dart_ListLengthPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_ListLength'); - late final _Dart_ListLength = _Dart_ListLengthPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Gets the Object at some index of a List. - /// - /// If the index is out of bounds, an error occurs. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param index A valid index into the List. - /// - /// \return The Object in the List at the specified index if no error - /// occurs. Otherwise returns an error handle. - Object Dart_ListGetAt( - Object list, - int index, - ) { - return _Dart_ListGetAt( - list, - index, - ); - } - - late final _Dart_ListGetAtPtr = - _lookup>( - 'Dart_ListGetAt'); - late final _Dart_ListGetAt = - _Dart_ListGetAtPtr.asFunction(); - - /// Gets a range of Objects from a List. - /// - /// If any of the requested index values are out of bounds, an error occurs. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param offset The offset of the first item to get. - /// \param length The number of items to get. - /// \param result A pointer to fill with the objects. - /// - /// \return Success if no error occurs during the operation. - Object Dart_ListGetRange( - Object list, - int offset, - int length, - ffi.Pointer result, - ) { - return _Dart_ListGetRange( - list, - offset, - length, - result, - ); - } - - late final _Dart_ListGetRangePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.IntPtr, - ffi.Pointer)>>('Dart_ListGetRange'); - late final _Dart_ListGetRange = _Dart_ListGetRangePtr.asFunction< - Object Function(Object, int, int, ffi.Pointer)>(); - - /// Sets the Object at some index of a List. - /// - /// If the index is out of bounds, an error occurs. - /// - /// May generate an unhandled exception error. - /// - /// \param array A List. - /// \param index A valid index into the List. - /// \param value The Object to put in the List. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ListSetAt( - Object list, - int index, - Object value, - ) { - return _Dart_ListSetAt( - list, - index, - value, - ); - } - - late final _Dart_ListSetAtPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.IntPtr, ffi.Handle)>>('Dart_ListSetAt'); - late final _Dart_ListSetAt = - _Dart_ListSetAtPtr.asFunction(); - - /// May generate an unhandled exception error. - Object Dart_ListGetAsBytes( - Object list, - int offset, - ffi.Pointer native_array, - int length, - ) { - return _Dart_ListGetAsBytes( - list, - offset, - native_array, - length, - ); - } - - late final _Dart_ListGetAsBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, - ffi.IntPtr)>>('Dart_ListGetAsBytes'); - late final _Dart_ListGetAsBytes = _Dart_ListGetAsBytesPtr.asFunction< - Object Function(Object, int, ffi.Pointer, int)>(); - - /// May generate an unhandled exception error. - Object Dart_ListSetAsBytes( - Object list, - int offset, - ffi.Pointer native_array, - int length, - ) { - return _Dart_ListSetAsBytes( - list, - offset, - native_array, - length, - ); - } - - late final _Dart_ListSetAsBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, - ffi.IntPtr)>>('Dart_ListSetAsBytes'); - late final _Dart_ListSetAsBytes = _Dart_ListSetAsBytesPtr.asFunction< - Object Function(Object, int, ffi.Pointer, int)>(); - - /// Gets the Object at some key of a Map. - /// - /// May generate an unhandled exception error. - /// - /// \param map A Map. - /// \param key An Object. - /// - /// \return The value in the map at the specified key, null if the map does not - /// contain the key, or an error handle. - Object Dart_MapGetAt( - Object map, - Object key, - ) { - return _Dart_MapGetAt( - map, - key, - ); - } - - late final _Dart_MapGetAtPtr = - _lookup>( - 'Dart_MapGetAt'); - late final _Dart_MapGetAt = - _Dart_MapGetAtPtr.asFunction(); - - /// Returns whether the Map contains a given key. - /// - /// May generate an unhandled exception error. - /// - /// \param map A Map. - /// - /// \return A handle on a boolean indicating whether map contains the key. - /// Otherwise returns an error handle. - Object Dart_MapContainsKey( - Object map, - Object key, - ) { - return _Dart_MapContainsKey( - map, - key, - ); - } - - late final _Dart_MapContainsKeyPtr = - _lookup>( - 'Dart_MapContainsKey'); - late final _Dart_MapContainsKey = - _Dart_MapContainsKeyPtr.asFunction(); - - /// Gets the list of keys of a Map. - /// - /// May generate an unhandled exception error. - /// - /// \param map A Map. - /// - /// \return The list of key Objects if no error occurs. Otherwise returns an - /// error handle. - Object Dart_MapKeys( - Object map, - ) { - return _Dart_MapKeys( - map, - ); - } - - late final _Dart_MapKeysPtr = - _lookup>( - 'Dart_MapKeys'); - late final _Dart_MapKeys = - _Dart_MapKeysPtr.asFunction(); - - /// Return type if this object is a TypedData object. - /// - /// \return kInvalid if the object is not a TypedData object or the appropriate - /// Dart_TypedData_Type. - int Dart_GetTypeOfTypedData( - Object object, - ) { - return _Dart_GetTypeOfTypedData( - object, - ); - } - - late final _Dart_GetTypeOfTypedDataPtr = - _lookup>( - 'Dart_GetTypeOfTypedData'); - late final _Dart_GetTypeOfTypedData = - _Dart_GetTypeOfTypedDataPtr.asFunction(); - - /// Return type if this object is an external TypedData object. - /// - /// \return kInvalid if the object is not an external TypedData object or - /// the appropriate Dart_TypedData_Type. - int Dart_GetTypeOfExternalTypedData( - Object object, - ) { - return _Dart_GetTypeOfExternalTypedData( - object, - ); - } - - late final _Dart_GetTypeOfExternalTypedDataPtr = - _lookup>( - 'Dart_GetTypeOfExternalTypedData'); - late final _Dart_GetTypeOfExternalTypedData = - _Dart_GetTypeOfExternalTypedDataPtr.asFunction(); - - /// Returns a TypedData object of the desired length and type. - /// - /// \param type The type of the TypedData object. - /// \param length The length of the TypedData object (length in type units). - /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewTypedData( - int type, - int length, - ) { - return _Dart_NewTypedData( - type, - length, - ); - } - - late final _Dart_NewTypedDataPtr = - _lookup>( - 'Dart_NewTypedData'); - late final _Dart_NewTypedData = - _Dart_NewTypedDataPtr.asFunction(); - - /// Returns a TypedData object which references an external data array. - /// - /// \param type The type of the data array. - /// \param data A data array. This array must not move. - /// \param length The length of the data array (length in type units). - /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalTypedData( - int type, - ffi.Pointer data, - int length, - ) { - return _Dart_NewExternalTypedData( - type, - data, - length, - ); - } - - late final _Dart_NewExternalTypedDataPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Int32, ffi.Pointer, - ffi.IntPtr)>>('Dart_NewExternalTypedData'); - late final _Dart_NewExternalTypedData = _Dart_NewExternalTypedDataPtr - .asFunction, int)>(); - - /// Returns a TypedData object which references an external data array. - /// - /// \param type The type of the data array. - /// \param data A data array. This array must not move. - /// \param length The length of the data array (length in type units). - /// \param peer A pointer to a native object or NULL. This value is - /// provided to callback when it is invoked. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A function pointer that will be invoked sometime - /// after the object is garbage collected, unless the handle has been deleted. - /// A valid callback needs to be specified it cannot be NULL. - /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalTypedDataWithFinalizer( - int type, - ffi.Pointer data, - int length, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewExternalTypedDataWithFinalizer( - type, - data, - length, - peer, - external_allocation_size, - callback, - ); - } - - late final _Dart_NewExternalTypedDataWithFinalizerPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Int32, - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewExternalTypedDataWithFinalizer'); - late final _Dart_NewExternalTypedDataWithFinalizer = - _Dart_NewExternalTypedDataWithFinalizerPtr.asFunction< - Object Function(int, ffi.Pointer, int, - ffi.Pointer, int, Dart_HandleFinalizer)>(); - - /// Returns a ByteBuffer object for the typed data. - /// - /// \param type_data The TypedData object. - /// - /// \return The ByteBuffer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewByteBuffer( - Object typed_data, - ) { - return _Dart_NewByteBuffer( - typed_data, - ); - } - - late final _Dart_NewByteBufferPtr = - _lookup>( - 'Dart_NewByteBuffer'); - late final _Dart_NewByteBuffer = - _Dart_NewByteBufferPtr.asFunction(); - - /// Acquires access to the internal data address of a TypedData object. - /// - /// \param object The typed data object whose internal data address is to - /// be accessed. - /// \param type The type of the object is returned here. - /// \param data The internal data address is returned here. - /// \param len Size of the typed array is returned here. - /// - /// Notes: - /// When the internal address of the object is acquired any calls to a - /// Dart API function that could potentially allocate an object or run - /// any Dart code will return an error. - /// - /// Any Dart API functions for accessing the data should not be called - /// before the corresponding release. In particular, the object should - /// not be acquired again before its release. This leads to undefined - /// behavior. - /// - /// \return Success if the internal data address is acquired successfully. - /// Otherwise, returns an error handle. - Object Dart_TypedDataAcquireData( - Object object, - ffi.Pointer type, - ffi.Pointer> data, - ffi.Pointer len, - ) { - return _Dart_TypedDataAcquireData( - object, - type, - data, - len, - ); - } - - late final _Dart_TypedDataAcquireDataPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('Dart_TypedDataAcquireData'); - late final _Dart_TypedDataAcquireData = - _Dart_TypedDataAcquireDataPtr.asFunction< - Object Function(Object, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// Releases access to the internal data address that was acquired earlier using - /// Dart_TypedDataAcquireData. - /// - /// \param object The typed data object whose internal data address is to be - /// released. - /// - /// \return Success if the internal data address is released successfully. - /// Otherwise, returns an error handle. - Object Dart_TypedDataReleaseData( - Object object, - ) { - return _Dart_TypedDataReleaseData( - object, - ); - } - - late final _Dart_TypedDataReleaseDataPtr = - _lookup>( - 'Dart_TypedDataReleaseData'); - late final _Dart_TypedDataReleaseData = - _Dart_TypedDataReleaseDataPtr.asFunction(); - - /// Returns the TypedData object associated with the ByteBuffer object. - /// - /// \param byte_buffer The ByteBuffer object. - /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_GetDataFromByteBuffer( - Object byte_buffer, - ) { - return _Dart_GetDataFromByteBuffer( - byte_buffer, - ); - } - - late final _Dart_GetDataFromByteBufferPtr = - _lookup>( - 'Dart_GetDataFromByteBuffer'); - late final _Dart_GetDataFromByteBuffer = - _Dart_GetDataFromByteBufferPtr.asFunction(); - - /// Invokes a constructor, creating a new object. - /// - /// This function allows hidden constructors (constructors with leading - /// underscores) to be called. - /// - /// \param type Type of object to be constructed. - /// \param constructor_name The name of the constructor to invoke. Use - /// Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. - /// This name should not include the name of the class. - /// \param number_of_arguments Size of the arguments array. - /// \param arguments An array of arguments to the constructor. - /// - /// \return If the constructor is called and completes successfully, - /// then the new object. If an error occurs during execution, then an - /// error handle is returned. - Object Dart_New( - Object type, - Object constructor_name, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_New( - type, - constructor_name, - number_of_arguments, - arguments, - ); - } - - late final _Dart_NewPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_New'); - late final _Dart_New = _Dart_NewPtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Allocate a new object without invoking a constructor. - /// - /// \param type The type of an object to be allocated. - /// - /// \return The new object. If an error occurs during execution, then an - /// error handle is returned. - Object Dart_Allocate( - Object type, - ) { - return _Dart_Allocate( - type, - ); - } - - late final _Dart_AllocatePtr = - _lookup>( - 'Dart_Allocate'); - late final _Dart_Allocate = - _Dart_AllocatePtr.asFunction(); - - /// Allocate a new object without invoking a constructor, and sets specified - /// native fields. - /// - /// \param type The type of an object to be allocated. - /// \param num_native_fields The number of native fields to set. - /// \param native_fields An array containing the value of native fields. - /// - /// \return The new object. If an error occurs during execution, then an - /// error handle is returned. - Object Dart_AllocateWithNativeFields( - Object type, - int num_native_fields, - ffi.Pointer native_fields, - ) { - return _Dart_AllocateWithNativeFields( - type, - num_native_fields, - native_fields, - ); - } - - late final _Dart_AllocateWithNativeFieldsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_AllocateWithNativeFields'); - late final _Dart_AllocateWithNativeFields = _Dart_AllocateWithNativeFieldsPtr - .asFunction)>(); - - /// Invokes a method or function. - /// - /// The 'target' parameter may be an object, type, or library. If - /// 'target' is an object, then this function will invoke an instance - /// method. If 'target' is a type, then this function will invoke a - /// static method. If 'target' is a library, then this function will - /// invoke a top-level function from that library. - /// NOTE: This API call cannot be used to invoke methods of a type object. - /// - /// This function ignores visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. - /// - /// \param target An object, type, or library. - /// \param name The name of the function or method to invoke. - /// \param number_of_arguments Size of the arguments array. - /// \param arguments An array of arguments to the function. - /// - /// \return If the function or method is called and completes - /// successfully, then the return value is returned. If an error - /// occurs during execution, then an error handle is returned. - Object Dart_Invoke( - Object target, - Object name, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_Invoke( - target, - name, - number_of_arguments, - arguments, - ); - } - - late final _Dart_InvokePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_Invoke'); - late final _Dart_Invoke = _Dart_InvokePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Invokes a Closure with the given arguments. - /// - /// May generate an unhandled exception error. - /// - /// \return If no error occurs during execution, then the result of - /// invoking the closure is returned. If an error occurs during - /// execution, then an error handle is returned. - Object Dart_InvokeClosure( - Object closure, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_InvokeClosure( - closure, - number_of_arguments, - arguments, - ); - } - - late final _Dart_InvokeClosurePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_InvokeClosure'); - late final _Dart_InvokeClosure = _Dart_InvokeClosurePtr.asFunction< - Object Function(Object, int, ffi.Pointer)>(); - - /// Invokes a Generative Constructor on an object that was previously - /// allocated using Dart_Allocate/Dart_AllocateWithNativeFields. - /// - /// The 'target' parameter must be an object. - /// - /// This function ignores visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. - /// - /// \param target An object. - /// \param name The name of the constructor to invoke. - /// Use Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. - /// \param number_of_arguments Size of the arguments array. - /// \param arguments An array of arguments to the function. - /// - /// \return If the constructor is called and completes - /// successfully, then the object is returned. If an error - /// occurs during execution, then an error handle is returned. - Object Dart_InvokeConstructor( - Object object, - Object name, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_InvokeConstructor( - object, - name, - number_of_arguments, - arguments, - ); - } - - late final _Dart_InvokeConstructorPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_InvokeConstructor'); - late final _Dart_InvokeConstructor = _Dart_InvokeConstructorPtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Gets the value of a field. - /// - /// The 'container' parameter may be an object, type, or library. If - /// 'container' is an object, then this function will access an - /// instance field. If 'container' is a type, then this function will - /// access a static field. If 'container' is a library, then this - /// function will access a top-level variable. - /// NOTE: This API call cannot be used to access fields of a type object. - /// - /// This function ignores field visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. - /// - /// \param container An object, type, or library. - /// \param name A field name. - /// - /// \return If no error occurs, then the value of the field is - /// returned. Otherwise an error handle is returned. - Object Dart_GetField( - Object container, - Object name, - ) { - return _Dart_GetField( - container, - name, - ); - } - - late final _Dart_GetFieldPtr = - _lookup>( - 'Dart_GetField'); - late final _Dart_GetField = - _Dart_GetFieldPtr.asFunction(); - - /// Sets the value of a field. - /// - /// The 'container' parameter may actually be an object, type, or - /// library. If 'container' is an object, then this function will - /// access an instance field. If 'container' is a type, then this - /// function will access a static field. If 'container' is a library, - /// then this function will access a top-level variable. - /// NOTE: This API call cannot be used to access fields of a type object. - /// - /// This function ignores field visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. - /// - /// \param container An object, type, or library. - /// \param name A field name. - /// \param value The new field value. - /// - /// \return A valid handle if no error occurs. - Object Dart_SetField( - Object container, - Object name, - Object value, - ) { - return _Dart_SetField( - container, - name, - value, - ); - } - - late final _Dart_SetFieldPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Handle, ffi.Handle)>>('Dart_SetField'); - late final _Dart_SetField = - _Dart_SetFieldPtr.asFunction(); - - /// Throws an exception. - /// - /// This function causes a Dart language exception to be thrown. This - /// will proceed in the standard way, walking up Dart frames until an - /// appropriate 'catch' block is found, executing 'finally' blocks, - /// etc. - /// - /// If an error handle is passed into this function, the error is - /// propagated immediately. See Dart_PropagateError for a discussion - /// of error propagation. - /// - /// If successful, this function does not return. Note that this means - /// that the destructors of any stack-allocated C++ objects will not be - /// called. If there are no Dart frames on the stack, an error occurs. - /// - /// \return An error handle if the exception was not thrown. - /// Otherwise the function does not return. - Object Dart_ThrowException( - Object exception, - ) { - return _Dart_ThrowException( - exception, - ); - } - - late final _Dart_ThrowExceptionPtr = - _lookup>( - 'Dart_ThrowException'); - late final _Dart_ThrowException = - _Dart_ThrowExceptionPtr.asFunction(); - - /// Rethrows an exception. - /// - /// Rethrows an exception, unwinding all dart frames on the stack. If - /// successful, this function does not return. Note that this means - /// that the destructors of any stack-allocated C++ objects will not be - /// called. If there are no Dart frames on the stack, an error occurs. - /// - /// \return An error handle if the exception was not thrown. - /// Otherwise the function does not return. - Object Dart_ReThrowException( - Object exception, - Object stacktrace, - ) { - return _Dart_ReThrowException( - exception, - stacktrace, - ); - } - - late final _Dart_ReThrowExceptionPtr = - _lookup>( - 'Dart_ReThrowException'); - late final _Dart_ReThrowException = - _Dart_ReThrowExceptionPtr.asFunction(); - - /// Gets the number of native instance fields in an object. - Object Dart_GetNativeInstanceFieldCount( - Object obj, - ffi.Pointer count, - ) { - return _Dart_GetNativeInstanceFieldCount( - obj, - count, - ); - } - - late final _Dart_GetNativeInstanceFieldCountPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer)>>('Dart_GetNativeInstanceFieldCount'); - late final _Dart_GetNativeInstanceFieldCount = - _Dart_GetNativeInstanceFieldCountPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Gets the value of a native field. - /// - /// TODO(turnidge): Document. - Object Dart_GetNativeInstanceField( - Object obj, - int index, - ffi.Pointer value, - ) { - return _Dart_GetNativeInstanceField( - obj, - index, - value, - ); - } - - late final _Dart_GetNativeInstanceFieldPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeInstanceField'); - late final _Dart_GetNativeInstanceField = _Dart_GetNativeInstanceFieldPtr - .asFunction)>(); - - /// Sets the value of a native field. - /// - /// TODO(turnidge): Document. - Object Dart_SetNativeInstanceField( - Object obj, - int index, - int value, - ) { - return _Dart_SetNativeInstanceField( - obj, - index, - value, - ); - } - - late final _Dart_SetNativeInstanceFieldPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Int, ffi.IntPtr)>>('Dart_SetNativeInstanceField'); - late final _Dart_SetNativeInstanceField = _Dart_SetNativeInstanceFieldPtr - .asFunction(); - - /// Extracts current isolate group data from the native arguments structure. - ffi.Pointer Dart_GetNativeIsolateGroupData( - Dart_NativeArguments args, - ) { - return _Dart_GetNativeIsolateGroupData( - args, - ); - } - - late final _Dart_GetNativeIsolateGroupDataPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - Dart_NativeArguments)>>('Dart_GetNativeIsolateGroupData'); - late final _Dart_GetNativeIsolateGroupData = - _Dart_GetNativeIsolateGroupDataPtr.asFunction< - ffi.Pointer Function(Dart_NativeArguments)>(); - - /// Gets the native arguments based on the types passed in and populates - /// the passed arguments buffer with appropriate native values. - /// - /// \param args the Native arguments block passed into the native call. - /// \param num_arguments length of argument descriptor array and argument - /// values array passed in. - /// \param arg_descriptors an array that describes the arguments that - /// need to be retrieved. For each argument to be retrieved the descriptor - /// contains the argument number (0, 1 etc.) and the argument type - /// described using Dart_NativeArgument_Type, e.g: - /// DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kBool, 1) indicates - /// that the first argument is to be retrieved and it should be a boolean. - /// \param arg_values array into which the native arguments need to be - /// extracted into, the array is allocated by the caller (it could be - /// stack allocated to avoid the malloc/free performance overhead). - /// - /// \return Success if all the arguments could be extracted correctly, - /// returns an error handle if there were any errors while extracting the - /// arguments (mismatched number of arguments, incorrect types, etc.). - Object Dart_GetNativeArguments( - Dart_NativeArguments args, - int num_arguments, - ffi.Pointer arg_descriptors, - ffi.Pointer arg_values, - ) { - return _Dart_GetNativeArguments( - args, - num_arguments, - arg_descriptors, - arg_values, - ); - } - - late final _Dart_GetNativeArgumentsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_NativeArguments, - ffi.Int, - ffi.Pointer, - ffi.Pointer)>>( - 'Dart_GetNativeArguments'); - late final _Dart_GetNativeArguments = _Dart_GetNativeArgumentsPtr.asFunction< - Object Function( - Dart_NativeArguments, - int, - ffi.Pointer, - ffi.Pointer)>(); - - /// Gets the native argument at some index. - Object Dart_GetNativeArgument( - Dart_NativeArguments args, - int index, - ) { - return _Dart_GetNativeArgument( - args, - index, - ); - } - - late final _Dart_GetNativeArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_NativeArguments, ffi.Int)>>('Dart_GetNativeArgument'); - late final _Dart_GetNativeArgument = _Dart_GetNativeArgumentPtr.asFunction< - Object Function(Dart_NativeArguments, int)>(); - - /// Gets the number of native arguments. - int Dart_GetNativeArgumentCount( - Dart_NativeArguments args, - ) { - return _Dart_GetNativeArgumentCount( - args, - ); - } - - late final _Dart_GetNativeArgumentCountPtr = - _lookup>( - 'Dart_GetNativeArgumentCount'); - late final _Dart_GetNativeArgumentCount = _Dart_GetNativeArgumentCountPtr - .asFunction(); - - /// Gets all the native fields of the native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param num_fields size of the intptr_t array 'field_values' passed in. - /// \param field_values intptr_t array in which native field values are returned. - /// \return Success if the native fields where copied in successfully. Otherwise - /// returns an error handle. On success the native field values are copied - /// into the 'field_values' array, if the argument at 'arg_index' is a - /// null object then 0 is copied as the native field values into the - /// 'field_values' array. - Object Dart_GetNativeFieldsOfArgument( - Dart_NativeArguments args, - int arg_index, - int num_fields, - ffi.Pointer field_values, - ) { - return _Dart_GetNativeFieldsOfArgument( - args, - arg_index, - num_fields, - field_values, - ); - } - - late final _Dart_GetNativeFieldsOfArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeFieldsOfArgument'); - late final _Dart_GetNativeFieldsOfArgument = - _Dart_GetNativeFieldsOfArgumentPtr.asFunction< - Object Function( - Dart_NativeArguments, int, int, ffi.Pointer)>(); - - /// Gets the native field of the receiver. - Object Dart_GetNativeReceiver( - Dart_NativeArguments args, - ffi.Pointer value, - ) { - return _Dart_GetNativeReceiver( - args, - value, - ); - } - - late final _Dart_GetNativeReceiverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, - ffi.Pointer)>>('Dart_GetNativeReceiver'); - late final _Dart_GetNativeReceiver = _Dart_GetNativeReceiverPtr.asFunction< - Object Function(Dart_NativeArguments, ffi.Pointer)>(); - - /// Gets a string native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param peer Returns the peer pointer if the string argument has one. - /// \return Success if the string argument has a peer, if it does not - /// have a peer then the String object is returned. Otherwise returns - /// an error handle (argument is not a String object). - Object Dart_GetNativeStringArgument( - Dart_NativeArguments args, - int arg_index, - ffi.Pointer> peer, - ) { - return _Dart_GetNativeStringArgument( - args, - arg_index, - peer, - ); - } - - late final _Dart_GetNativeStringArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer>)>>( - 'Dart_GetNativeStringArgument'); - late final _Dart_GetNativeStringArgument = - _Dart_GetNativeStringArgumentPtr.asFunction< - Object Function( - Dart_NativeArguments, int, ffi.Pointer>)>(); - - /// Gets an integer native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param value Returns the integer value if the argument is an Integer. - /// \return Success if no error occurs. Otherwise returns an error handle. - Object Dart_GetNativeIntegerArgument( - Dart_NativeArguments args, - int index, - ffi.Pointer value, - ) { - return _Dart_GetNativeIntegerArgument( - args, - index, - value, - ); - } - - late final _Dart_GetNativeIntegerArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeIntegerArgument'); - late final _Dart_GetNativeIntegerArgument = - _Dart_GetNativeIntegerArgumentPtr.asFunction< - Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); - - /// Gets a boolean native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param value Returns the boolean value if the argument is a Boolean. - /// \return Success if no error occurs. Otherwise returns an error handle. - Object Dart_GetNativeBooleanArgument( - Dart_NativeArguments args, - int index, - ffi.Pointer value, - ) { - return _Dart_GetNativeBooleanArgument( - args, - index, - value, - ); - } - - late final _Dart_GetNativeBooleanArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeBooleanArgument'); - late final _Dart_GetNativeBooleanArgument = - _Dart_GetNativeBooleanArgumentPtr.asFunction< - Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); - - /// Gets a double native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param value Returns the double value if the argument is a double. - /// \return Success if no error occurs. Otherwise returns an error handle. - Object Dart_GetNativeDoubleArgument( - Dart_NativeArguments args, - int index, - ffi.Pointer value, - ) { - return _Dart_GetNativeDoubleArgument( - args, - index, - value, - ); - } - - late final _Dart_GetNativeDoubleArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeDoubleArgument'); - late final _Dart_GetNativeDoubleArgument = - _Dart_GetNativeDoubleArgumentPtr.asFunction< - Object Function( - Dart_NativeArguments, int, ffi.Pointer)>(); - - /// Sets the return value for a native function. - /// - /// If retval is an Error handle, then error will be propagated once - /// the native functions exits. See Dart_PropagateError for a - /// discussion of how different types of errors are propagated. - void Dart_SetReturnValue( - Dart_NativeArguments args, - Object retval, - ) { - return _Dart_SetReturnValue( - args, - retval, - ); - } - - late final _Dart_SetReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Handle)>>('Dart_SetReturnValue'); - late final _Dart_SetReturnValue = _Dart_SetReturnValuePtr.asFunction< - void Function(Dart_NativeArguments, Object)>(); - - void Dart_SetWeakHandleReturnValue( - Dart_NativeArguments args, - Dart_WeakPersistentHandle rval, - ) { - return _Dart_SetWeakHandleReturnValue( - args, - rval, - ); - } - - late final _Dart_SetWeakHandleReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_NativeArguments, - Dart_WeakPersistentHandle)>>('Dart_SetWeakHandleReturnValue'); - late final _Dart_SetWeakHandleReturnValue = - _Dart_SetWeakHandleReturnValuePtr.asFunction< - void Function(Dart_NativeArguments, Dart_WeakPersistentHandle)>(); - - void Dart_SetBooleanReturnValue( - Dart_NativeArguments args, - bool retval, - ) { - return _Dart_SetBooleanReturnValue( - args, - retval, - ); - } - - late final _Dart_SetBooleanReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Bool)>>('Dart_SetBooleanReturnValue'); - late final _Dart_SetBooleanReturnValue = _Dart_SetBooleanReturnValuePtr - .asFunction(); - - void Dart_SetIntegerReturnValue( - Dart_NativeArguments args, - int retval, - ) { - return _Dart_SetIntegerReturnValue( - args, - retval, - ); - } - - late final _Dart_SetIntegerReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Int64)>>('Dart_SetIntegerReturnValue'); - late final _Dart_SetIntegerReturnValue = _Dart_SetIntegerReturnValuePtr - .asFunction(); - - void Dart_SetDoubleReturnValue( - Dart_NativeArguments args, - double retval, - ) { - return _Dart_SetDoubleReturnValue( - args, - retval, - ); - } - - late final _Dart_SetDoubleReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Double)>>('Dart_SetDoubleReturnValue'); - late final _Dart_SetDoubleReturnValue = _Dart_SetDoubleReturnValuePtr - .asFunction(); - - /// Sets the environment callback for the current isolate. This - /// callback is used to lookup environment values by name in the - /// current environment. This enables the embedder to supply values for - /// the const constructors bool.fromEnvironment, int.fromEnvironment - /// and String.fromEnvironment. - Object Dart_SetEnvironmentCallback( - Dart_EnvironmentCallback callback, - ) { - return _Dart_SetEnvironmentCallback( - callback, - ); - } - - late final _Dart_SetEnvironmentCallbackPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetEnvironmentCallback'); - late final _Dart_SetEnvironmentCallback = _Dart_SetEnvironmentCallbackPtr - .asFunction(); - - /// Sets the callback used to resolve native functions for a library. - /// - /// \param library A library. - /// \param resolver A native entry resolver. - /// - /// \return A valid handle if the native resolver was set successfully. - Object Dart_SetNativeResolver( - Object library1, - Dart_NativeEntryResolver resolver, - Dart_NativeEntrySymbol symbol, - ) { - return _Dart_SetNativeResolver( - library1, - resolver, - symbol, - ); - } - - late final _Dart_SetNativeResolverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, Dart_NativeEntryResolver, - Dart_NativeEntrySymbol)>>('Dart_SetNativeResolver'); - late final _Dart_SetNativeResolver = _Dart_SetNativeResolverPtr.asFunction< - Object Function( - Object, Dart_NativeEntryResolver, Dart_NativeEntrySymbol)>(); - - /// Returns the callback used to resolve native functions for a library. - /// - /// \param library A library. - /// \param resolver a pointer to a Dart_NativeEntryResolver - /// - /// \return A valid handle if the library was found. - Object Dart_GetNativeResolver( - Object library1, - ffi.Pointer resolver, - ) { - return _Dart_GetNativeResolver( - library1, - resolver, - ); - } - - late final _Dart_GetNativeResolverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>( - 'Dart_GetNativeResolver'); - late final _Dart_GetNativeResolver = _Dart_GetNativeResolverPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Returns the callback used to resolve native function symbols for a library. - /// - /// \param library A library. - /// \param resolver a pointer to a Dart_NativeEntrySymbol. - /// - /// \return A valid handle if the library was found. - Object Dart_GetNativeSymbol( - Object library1, - ffi.Pointer resolver, - ) { - return _Dart_GetNativeSymbol( - library1, - resolver, - ); - } - - late final _Dart_GetNativeSymbolPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer)>>('Dart_GetNativeSymbol'); - late final _Dart_GetNativeSymbol = _Dart_GetNativeSymbolPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Sets the callback used to resolve FFI native functions for a library. - /// The resolved functions are expected to be a C function pointer of the - /// correct signature (as specified in the `@FfiNative()` function - /// annotation in Dart code). - /// - /// NOTE: This is an experimental feature and might change in the future. - /// - /// \param library A library. - /// \param resolver A native function resolver. - /// - /// \return A valid handle if the native resolver was set successfully. - Object Dart_SetFfiNativeResolver( - Object library1, - Dart_FfiNativeResolver resolver, - ) { - return _Dart_SetFfiNativeResolver( - library1, - resolver, - ); - } - - late final _Dart_SetFfiNativeResolverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - Dart_FfiNativeResolver)>>('Dart_SetFfiNativeResolver'); - late final _Dart_SetFfiNativeResolver = _Dart_SetFfiNativeResolverPtr - .asFunction(); - - /// Sets library tag handler for the current isolate. This handler is - /// used to handle the various tags encountered while loading libraries - /// or scripts in the isolate. - /// - /// \param handler Handler code to be used for handling the various tags - /// encountered while loading libraries or scripts in the isolate. - /// - /// \return If no error occurs, the handler is set for the isolate. - /// Otherwise an error handle is returned. - /// - /// TODO(turnidge): Document. - Object Dart_SetLibraryTagHandler( - Dart_LibraryTagHandler handler, - ) { - return _Dart_SetLibraryTagHandler( - handler, - ); - } - - late final _Dart_SetLibraryTagHandlerPtr = - _lookup>( - 'Dart_SetLibraryTagHandler'); - late final _Dart_SetLibraryTagHandler = _Dart_SetLibraryTagHandlerPtr - .asFunction(); - - /// Sets the deferred load handler for the current isolate. This handler is - /// used to handle loading deferred imports in an AppJIT or AppAOT program. - Object Dart_SetDeferredLoadHandler( - Dart_DeferredLoadHandler handler, - ) { - return _Dart_SetDeferredLoadHandler( - handler, - ); - } - - late final _Dart_SetDeferredLoadHandlerPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetDeferredLoadHandler'); - late final _Dart_SetDeferredLoadHandler = _Dart_SetDeferredLoadHandlerPtr - .asFunction(); - - /// Notifies the VM that a deferred load completed successfully. This function - /// will eventually cause the corresponding `prefix.loadLibrary()` futures to - /// complete. - /// - /// Requires the current isolate to be the same current isolate during the - /// invocation of the Dart_DeferredLoadHandler. - Object Dart_DeferredLoadComplete( - int loading_unit_id, - ffi.Pointer snapshot_data, - ffi.Pointer snapshot_instructions, - ) { - return _Dart_DeferredLoadComplete( - loading_unit_id, - snapshot_data, - snapshot_instructions, - ); - } - - late final _Dart_DeferredLoadCompletePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.IntPtr, ffi.Pointer, - ffi.Pointer)>>('Dart_DeferredLoadComplete'); - late final _Dart_DeferredLoadComplete = - _Dart_DeferredLoadCompletePtr.asFunction< - Object Function( - int, ffi.Pointer, ffi.Pointer)>(); - - /// Notifies the VM that a deferred load failed. This function - /// will eventually cause the corresponding `prefix.loadLibrary()` futures to - /// complete with an error. - /// - /// If `transient` is true, future invocations of `prefix.loadLibrary()` will - /// trigger new load requests. If false, futures invocation will complete with - /// the same error. - /// - /// Requires the current isolate to be the same current isolate during the - /// invocation of the Dart_DeferredLoadHandler. - Object Dart_DeferredLoadCompleteError( - int loading_unit_id, - ffi.Pointer error_message, - bool transient, - ) { - return _Dart_DeferredLoadCompleteError( - loading_unit_id, - error_message, - transient, - ); - } - - late final _Dart_DeferredLoadCompleteErrorPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.IntPtr, ffi.Pointer, - ffi.Bool)>>('Dart_DeferredLoadCompleteError'); - late final _Dart_DeferredLoadCompleteError = - _Dart_DeferredLoadCompleteErrorPtr.asFunction< - Object Function(int, ffi.Pointer, bool)>(); - - /// Canonicalizes a url with respect to some library. - /// - /// The url is resolved with respect to the library's url and some url - /// normalizations are performed. - /// - /// This canonicalization function should be sufficient for most - /// embedders to implement the Dart_kCanonicalizeUrl tag. - /// - /// \param base_url The base url relative to which the url is - /// being resolved. - /// \param url The url being resolved and canonicalized. This - /// parameter is a string handle. - /// - /// \return If no error occurs, a String object is returned. Otherwise - /// an error handle is returned. - Object Dart_DefaultCanonicalizeUrl( - Object base_url, - Object url, - ) { - return _Dart_DefaultCanonicalizeUrl( - base_url, - url, - ); - } - - late final _Dart_DefaultCanonicalizeUrlPtr = - _lookup>( - 'Dart_DefaultCanonicalizeUrl'); - late final _Dart_DefaultCanonicalizeUrl = _Dart_DefaultCanonicalizeUrlPtr - .asFunction(); - - /// Loads the root library for the current isolate. - /// - /// Requires there to be no current root library. - /// - /// \param buffer A buffer which contains a kernel binary (see - /// pkg/kernel/binary.md). Must remain valid until isolate group shutdown. - /// \param buffer_size Length of the passed in buffer. - /// - /// \return A handle to the root library, or an error. - Object Dart_LoadScriptFromKernel( - ffi.Pointer kernel_buffer, - int kernel_size, - ) { - return _Dart_LoadScriptFromKernel( - kernel_buffer, - kernel_size, - ); - } - - late final _Dart_LoadScriptFromKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_LoadScriptFromKernel'); - late final _Dart_LoadScriptFromKernel = _Dart_LoadScriptFromKernelPtr - .asFunction, int)>(); - - /// Gets the library for the root script for the current isolate. - /// - /// If the root script has not yet been set for the current isolate, - /// this function returns Dart_Null(). This function never returns an - /// error handle. - /// - /// \return Returns the root Library for the current isolate or Dart_Null(). - Object Dart_RootLibrary() { - return _Dart_RootLibrary(); - } - - late final _Dart_RootLibraryPtr = - _lookup>('Dart_RootLibrary'); - late final _Dart_RootLibrary = - _Dart_RootLibraryPtr.asFunction(); - - /// Sets the root library for the current isolate. - /// - /// \return Returns an error handle if `library` is not a library handle. - Object Dart_SetRootLibrary( - Object library1, - ) { - return _Dart_SetRootLibrary( - library1, - ); - } - - late final _Dart_SetRootLibraryPtr = - _lookup>( - 'Dart_SetRootLibrary'); - late final _Dart_SetRootLibrary = - _Dart_SetRootLibraryPtr.asFunction(); - - /// Lookup or instantiate a legacy type by name and type arguments from a - /// Library. - /// - /// \param library The library containing the class or interface. - /// \param class_name The class name for the type. - /// \param number_of_type_arguments Number of type arguments. - /// For non parametric types the number of type arguments would be 0. - /// \param type_arguments Pointer to an array of type arguments. - /// For non parameteric types a NULL would be passed in for this argument. - /// - /// \return If no error occurs, the type is returned. - /// Otherwise an error handle is returned. - Object Dart_GetType( - Object library1, - Object class_name, - int number_of_type_arguments, - ffi.Pointer type_arguments, - ) { - return _Dart_GetType( - library1, - class_name, - number_of_type_arguments, - type_arguments, - ); - } - - late final _Dart_GetTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_GetType'); - late final _Dart_GetType = _Dart_GetTypePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Lookup or instantiate a nullable type by name and type arguments from - /// Library. - /// - /// \param library The library containing the class or interface. - /// \param class_name The class name for the type. - /// \param number_of_type_arguments Number of type arguments. - /// For non parametric types the number of type arguments would be 0. - /// \param type_arguments Pointer to an array of type arguments. - /// For non parameteric types a NULL would be passed in for this argument. - /// - /// \return If no error occurs, the type is returned. - /// Otherwise an error handle is returned. - Object Dart_GetNullableType( - Object library1, - Object class_name, - int number_of_type_arguments, - ffi.Pointer type_arguments, - ) { - return _Dart_GetNullableType( - library1, - class_name, - number_of_type_arguments, - type_arguments, - ); - } - - late final _Dart_GetNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_GetNullableType'); - late final _Dart_GetNullableType = _Dart_GetNullableTypePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Lookup or instantiate a non-nullable type by name and type arguments from - /// Library. - /// - /// \param library The library containing the class or interface. - /// \param class_name The class name for the type. - /// \param number_of_type_arguments Number of type arguments. - /// For non parametric types the number of type arguments would be 0. - /// \param type_arguments Pointer to an array of type arguments. - /// For non parameteric types a NULL would be passed in for this argument. - /// - /// \return If no error occurs, the type is returned. - /// Otherwise an error handle is returned. - Object Dart_GetNonNullableType( - Object library1, - Object class_name, - int number_of_type_arguments, - ffi.Pointer type_arguments, - ) { - return _Dart_GetNonNullableType( - library1, - class_name, - number_of_type_arguments, - type_arguments, - ); - } - - late final _Dart_GetNonNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_GetNonNullableType'); - late final _Dart_GetNonNullableType = _Dart_GetNonNullableTypePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Creates a nullable version of the provided type. - /// - /// \param type The type to be converted to a nullable type. - /// - /// \return If no error occurs, a nullable type is returned. - /// Otherwise an error handle is returned. - Object Dart_TypeToNullableType( - Object type, - ) { - return _Dart_TypeToNullableType( - type, - ); - } - - late final _Dart_TypeToNullableTypePtr = - _lookup>( - 'Dart_TypeToNullableType'); - late final _Dart_TypeToNullableType = - _Dart_TypeToNullableTypePtr.asFunction(); + /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead + late final ffi.Pointer + _NSURLUbiquitousItemPercentUploadedKey = + _lookup('NSURLUbiquitousItemPercentUploadedKey'); - /// Creates a non-nullable version of the provided type. - /// - /// \param type The type to be converted to a non-nullable type. - /// - /// \return If no error occurs, a non-nullable type is returned. - /// Otherwise an error handle is returned. - Object Dart_TypeToNonNullableType( - Object type, - ) { - return _Dart_TypeToNonNullableType( - type, - ); - } + NSURLResourceKey get NSURLUbiquitousItemPercentUploadedKey => + _NSURLUbiquitousItemPercentUploadedKey.value; - late final _Dart_TypeToNonNullableTypePtr = - _lookup>( - 'Dart_TypeToNonNullableType'); - late final _Dart_TypeToNonNullableType = - _Dart_TypeToNonNullableTypePtr.asFunction(); + set NSURLUbiquitousItemPercentUploadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemPercentUploadedKey.value = value; - /// A type's nullability. - /// - /// \param type A Dart type. - /// \param result An out parameter containing the result of the check. True if - /// the type is of the specified nullability, false otherwise. - /// - /// \return Returns an error handle if type is not of type Type. - Object Dart_IsNullableType( - Object type, - ffi.Pointer result, - ) { - return _Dart_IsNullableType( - type, - result, - ); - } + /// returns the download status of this item. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusKey = + _lookup('NSURLUbiquitousItemDownloadingStatusKey'); - late final _Dart_IsNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IsNullableType'); - late final _Dart_IsNullableType = _Dart_IsNullableTypePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + NSURLResourceKey get NSURLUbiquitousItemDownloadingStatusKey => + _NSURLUbiquitousItemDownloadingStatusKey.value; - Object Dart_IsNonNullableType( - Object type, - ffi.Pointer result, - ) { - return _Dart_IsNonNullableType( - type, - result, - ); - } + set NSURLUbiquitousItemDownloadingStatusKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadingStatusKey.value = value; - late final _Dart_IsNonNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IsNonNullableType'); - late final _Dart_IsNonNullableType = _Dart_IsNonNullableTypePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + /// returns the error when downloading the item from iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingErrorKey = + _lookup('NSURLUbiquitousItemDownloadingErrorKey'); - Object Dart_IsLegacyType( - Object type, - ffi.Pointer result, - ) { - return _Dart_IsLegacyType( - type, - result, - ); - } + NSURLResourceKey get NSURLUbiquitousItemDownloadingErrorKey => + _NSURLUbiquitousItemDownloadingErrorKey.value; - late final _Dart_IsLegacyTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IsLegacyType'); - late final _Dart_IsLegacyType = _Dart_IsLegacyTypePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + set NSURLUbiquitousItemDownloadingErrorKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadingErrorKey.value = value; - /// Lookup a class or interface by name from a Library. - /// - /// \param library The library containing the class or interface. - /// \param class_name The name of the class or interface. - /// - /// \return If no error occurs, the class or interface is - /// returned. Otherwise an error handle is returned. - Object Dart_GetClass( - Object library1, - Object class_name, - ) { - return _Dart_GetClass( - library1, - class_name, - ); - } + /// returns the error when uploading the item to iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) + late final ffi.Pointer + _NSURLUbiquitousItemUploadingErrorKey = + _lookup('NSURLUbiquitousItemUploadingErrorKey'); - late final _Dart_GetClassPtr = - _lookup>( - 'Dart_GetClass'); - late final _Dart_GetClass = - _Dart_GetClassPtr.asFunction(); + NSURLResourceKey get NSURLUbiquitousItemUploadingErrorKey => + _NSURLUbiquitousItemUploadingErrorKey.value; - /// Returns an import path to a Library, such as "file:///test.dart" or - /// "dart:core". - Object Dart_LibraryUrl( - Object library1, - ) { - return _Dart_LibraryUrl( - library1, - ); - } + set NSURLUbiquitousItemUploadingErrorKey(NSURLResourceKey value) => + _NSURLUbiquitousItemUploadingErrorKey.value = value; - late final _Dart_LibraryUrlPtr = - _lookup>( - 'Dart_LibraryUrl'); - late final _Dart_LibraryUrl = - _Dart_LibraryUrlPtr.asFunction(); + /// returns whether a download of this item has already been requested with an API like -startDownloadingUbiquitousItemAtURL:error: (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemDownloadRequestedKey = + _lookup('NSURLUbiquitousItemDownloadRequestedKey'); - /// Returns a URL from which a Library was loaded. - Object Dart_LibraryResolvedUrl( - Object library1, - ) { - return _Dart_LibraryResolvedUrl( - library1, - ); - } + NSURLResourceKey get NSURLUbiquitousItemDownloadRequestedKey => + _NSURLUbiquitousItemDownloadRequestedKey.value; - late final _Dart_LibraryResolvedUrlPtr = - _lookup>( - 'Dart_LibraryResolvedUrl'); - late final _Dart_LibraryResolvedUrl = - _Dart_LibraryResolvedUrlPtr.asFunction(); + set NSURLUbiquitousItemDownloadRequestedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadRequestedKey.value = value; - /// \return An array of libraries. - Object Dart_GetLoadedLibraries() { - return _Dart_GetLoadedLibraries(); - } + /// returns the name of this item's container as displayed to users. + late final ffi.Pointer + _NSURLUbiquitousItemContainerDisplayNameKey = + _lookup('NSURLUbiquitousItemContainerDisplayNameKey'); - late final _Dart_GetLoadedLibrariesPtr = - _lookup>( - 'Dart_GetLoadedLibraries'); - late final _Dart_GetLoadedLibraries = - _Dart_GetLoadedLibrariesPtr.asFunction(); + NSURLResourceKey get NSURLUbiquitousItemContainerDisplayNameKey => + _NSURLUbiquitousItemContainerDisplayNameKey.value; - Object Dart_LookupLibrary( - Object url, - ) { - return _Dart_LookupLibrary( - url, - ); - } + set NSURLUbiquitousItemContainerDisplayNameKey(NSURLResourceKey value) => + _NSURLUbiquitousItemContainerDisplayNameKey.value = value; - late final _Dart_LookupLibraryPtr = - _lookup>( - 'Dart_LookupLibrary'); - late final _Dart_LookupLibrary = - _Dart_LookupLibraryPtr.asFunction(); + /// true if the item is excluded from sync, which means it is locally on disk but won't be available on the server. An excluded item is no longer ubiquitous. (Read-write, value type boolean NSNumber + late final ffi.Pointer + _NSURLUbiquitousItemIsExcludedFromSyncKey = + _lookup('NSURLUbiquitousItemIsExcludedFromSyncKey'); - /// Report an loading error for the library. - /// - /// \param library The library that failed to load. - /// \param error The Dart error instance containing the load error. - /// - /// \return If the VM handles the error, the return value is - /// a null handle. If it doesn't handle the error, the error - /// object is returned. - Object Dart_LibraryHandleError( - Object library1, - Object error, - ) { - return _Dart_LibraryHandleError( - library1, - error, - ); - } + NSURLResourceKey get NSURLUbiquitousItemIsExcludedFromSyncKey => + _NSURLUbiquitousItemIsExcludedFromSyncKey.value; - late final _Dart_LibraryHandleErrorPtr = - _lookup>( - 'Dart_LibraryHandleError'); - late final _Dart_LibraryHandleError = - _Dart_LibraryHandleErrorPtr.asFunction(); + set NSURLUbiquitousItemIsExcludedFromSyncKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsExcludedFromSyncKey.value = value; - /// Called by the embedder to load a partial program. Does not set the root - /// library. - /// - /// \param buffer A buffer which contains a kernel binary (see - /// pkg/kernel/binary.md). Must remain valid until isolate shutdown. - /// \param buffer_size Length of the passed in buffer. - /// - /// \return A handle to the main library of the compilation unit, or an error. - Object Dart_LoadLibraryFromKernel( - ffi.Pointer kernel_buffer, - int kernel_buffer_size, - ) { - return _Dart_LoadLibraryFromKernel( - kernel_buffer, - kernel_buffer_size, - ); - } + /// true if the ubiquitous item is shared. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsSharedKey = + _lookup('NSURLUbiquitousItemIsSharedKey'); - late final _Dart_LoadLibraryFromKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_LoadLibraryFromKernel'); - late final _Dart_LoadLibraryFromKernel = _Dart_LoadLibraryFromKernelPtr - .asFunction, int)>(); + NSURLResourceKey get NSURLUbiquitousItemIsSharedKey => + _NSURLUbiquitousItemIsSharedKey.value; - /// Indicates that all outstanding load requests have been satisfied. - /// This finalizes all the new classes loaded and optionally completes - /// deferred library futures. - /// - /// Requires there to be a current isolate. - /// - /// \param complete_futures Specify true if all deferred library - /// futures should be completed, false otherwise. - /// - /// \return Success if all classes have been finalized and deferred library - /// futures are completed. Otherwise, returns an error. - Object Dart_FinalizeLoading( - bool complete_futures, - ) { - return _Dart_FinalizeLoading( - complete_futures, - ); - } + set NSURLUbiquitousItemIsSharedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsSharedKey.value = value; - late final _Dart_FinalizeLoadingPtr = - _lookup>( - 'Dart_FinalizeLoading'); - late final _Dart_FinalizeLoading = - _Dart_FinalizeLoadingPtr.asFunction(); + /// returns the current user's role for this shared item, or nil if not shared. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousSharedItemCurrentUserRoleKey = + _lookup('NSURLUbiquitousSharedItemCurrentUserRoleKey'); - /// Returns the value of peer field of 'object' in 'peer'. - /// - /// \param object An object. - /// \param peer An out parameter that returns the value of the peer - /// field. - /// - /// \return Returns an error if 'object' is a subtype of Null, num, or - /// bool. - Object Dart_GetPeer( - Object object, - ffi.Pointer> peer, - ) { - return _Dart_GetPeer( - object, - peer, - ); - } + NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserRoleKey => + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value; - late final _Dart_GetPeerPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer>)>>('Dart_GetPeer'); - late final _Dart_GetPeer = _Dart_GetPeerPtr.asFunction< - Object Function(Object, ffi.Pointer>)>(); + set NSURLUbiquitousSharedItemCurrentUserRoleKey(NSURLResourceKey value) => + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value = value; - /// Sets the value of the peer field of 'object' to the value of - /// 'peer'. - /// - /// \param object An object. - /// \param peer A value to store in the peer field. - /// - /// \return Returns an error if 'object' is a subtype of Null, num, or - /// bool. - Object Dart_SetPeer( - Object object, - ffi.Pointer peer, - ) { - return _Dart_SetPeer( - object, - peer, - ); - } + /// returns the permissions for the current user, or nil if not shared. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey = + _lookup( + 'NSURLUbiquitousSharedItemCurrentUserPermissionsKey'); - late final _Dart_SetPeerPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_SetPeer'); - late final _Dart_SetPeer = _Dart_SetPeerPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserPermissionsKey => + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value; - bool Dart_IsKernelIsolate( - Dart_Isolate isolate, - ) { - return _Dart_IsKernelIsolate( - isolate, - ); - } + set NSURLUbiquitousSharedItemCurrentUserPermissionsKey( + NSURLResourceKey value) => + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value = value; - late final _Dart_IsKernelIsolatePtr = - _lookup>( - 'Dart_IsKernelIsolate'); - late final _Dart_IsKernelIsolate = - _Dart_IsKernelIsolatePtr.asFunction(); + /// returns a NSPersonNameComponents, or nil if the current user. (Read-only, value type NSPersonNameComponents) + late final ffi.Pointer + _NSURLUbiquitousSharedItemOwnerNameComponentsKey = + _lookup( + 'NSURLUbiquitousSharedItemOwnerNameComponentsKey'); - bool Dart_KernelIsolateIsRunning() { - return _Dart_KernelIsolateIsRunning(); - } + NSURLResourceKey get NSURLUbiquitousSharedItemOwnerNameComponentsKey => + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value; - late final _Dart_KernelIsolateIsRunningPtr = - _lookup>( - 'Dart_KernelIsolateIsRunning'); - late final _Dart_KernelIsolateIsRunning = - _Dart_KernelIsolateIsRunningPtr.asFunction(); + set NSURLUbiquitousSharedItemOwnerNameComponentsKey(NSURLResourceKey value) => + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value = value; - int Dart_KernelPort() { - return _Dart_KernelPort(); - } + /// returns a NSPersonNameComponents for the most recent editor of the document, or nil if it is the current user. (Read-only, value type NSPersonNameComponents) + late final ffi.Pointer + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey = + _lookup( + 'NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey'); - late final _Dart_KernelPortPtr = - _lookup>('Dart_KernelPort'); - late final _Dart_KernelPort = - _Dart_KernelPortPtr.asFunction(); + NSURLResourceKey + get NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey => + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value; - /// Compiles the given `script_uri` to a kernel file. - /// - /// \param platform_kernel A buffer containing the kernel of the platform (e.g. - /// `vm_platform_strong.dill`). The VM does not take ownership of this memory. - /// - /// \param platform_kernel_size The length of the platform_kernel buffer. - /// - /// \param snapshot_compile Set to `true` when the compilation is for a snapshot. - /// This is used by the frontend to determine if compilation related information - /// should be printed to console (e.g., null safety mode). - /// - /// \param verbosity Specifies the logging behavior of the kernel compilation - /// service. - /// - /// \return Returns the result of the compilation. - /// - /// On a successful compilation the returned [Dart_KernelCompilationResult] has - /// a status of [Dart_KernelCompilationStatus_Ok] and the `kernel`/`kernel_size` - /// fields are set. The caller takes ownership of the malloc()ed buffer. - /// - /// On a failed compilation the `error` might be set describing the reason for - /// the failed compilation. The caller takes ownership of the malloc()ed - /// error. - /// - /// Requires there to be a current isolate. - Dart_KernelCompilationResult Dart_CompileToKernel( - ffi.Pointer script_uri, - ffi.Pointer platform_kernel, - int platform_kernel_size, - bool incremental_compile, - bool snapshot_compile, - ffi.Pointer package_config, - int verbosity, - ) { - return _Dart_CompileToKernel( - script_uri, - platform_kernel, - platform_kernel_size, - incremental_compile, - snapshot_compile, - package_config, - verbosity, - ); - } + set NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey( + NSURLResourceKey value) => + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value = value; - late final _Dart_CompileToKernelPtr = _lookup< - ffi.NativeFunction< - Dart_KernelCompilationResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.IntPtr, - ffi.Bool, - ffi.Bool, - ffi.Pointer, - ffi.Int32)>>('Dart_CompileToKernel'); - late final _Dart_CompileToKernel = _Dart_CompileToKernelPtr.asFunction< - Dart_KernelCompilationResult Function( - ffi.Pointer, - ffi.Pointer, - int, - bool, - bool, - ffi.Pointer, - int)>(); + /// this item has not been downloaded yet. Use startDownloadingUbiquitousItemAtURL:error: to download it. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusNotDownloaded = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusNotDownloaded'); - Dart_KernelCompilationResult Dart_KernelListDependencies() { - return _Dart_KernelListDependencies(); - } + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusNotDownloaded => + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value; - late final _Dart_KernelListDependenciesPtr = - _lookup>( - 'Dart_KernelListDependencies'); - late final _Dart_KernelListDependencies = _Dart_KernelListDependenciesPtr - .asFunction(); + set NSURLUbiquitousItemDownloadingStatusNotDownloaded( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; - /// Sets the kernel buffer which will be used to load Dart SDK sources - /// dynamically at runtime. - /// - /// \param platform_kernel A buffer containing kernel which has sources for the - /// Dart SDK populated. Note: The VM does not take ownership of this memory. - /// - /// \param platform_kernel_size The length of the platform_kernel buffer. - void Dart_SetDartLibrarySourcesKernel( - ffi.Pointer platform_kernel, - int platform_kernel_size, - ) { - return _Dart_SetDartLibrarySourcesKernel( - platform_kernel, - platform_kernel_size, - ); - } + /// there is a local version of this item available. The most current version will get downloaded as soon as possible. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusDownloaded = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusDownloaded'); - late final _Dart_SetDartLibrarySourcesKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_SetDartLibrarySourcesKernel'); - late final _Dart_SetDartLibrarySourcesKernel = - _Dart_SetDartLibrarySourcesKernelPtr.asFunction< - void Function(ffi.Pointer, int)>(); + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusDownloaded => + _NSURLUbiquitousItemDownloadingStatusDownloaded.value; - /// Detect the null safety opt-in status. - /// - /// When running from source, it is based on the opt-in status of `script_uri`. - /// When running from a kernel buffer, it is based on the mode used when - /// generating `kernel_buffer`. - /// When running from an appJIT or AOT snapshot, it is based on the mode used - /// when generating `snapshot_data`. - /// - /// \param script_uri Uri of the script that contains the source code - /// - /// \param package_config Uri of the package configuration file (either in format - /// of .packages or .dart_tool/package_config.json) for the null safety - /// detection to resolve package imports against. If this parameter is not - /// passed the package resolution of the parent isolate should be used. - /// - /// \param original_working_directory current working directory when the VM - /// process was launched, this is used to correctly resolve the path specified - /// for package_config. - /// - /// \param snapshot_data - /// - /// \param snapshot_instructions Buffers containing a snapshot of the - /// isolate or NULL if no snapshot is provided. If provided, the buffers must - /// remain valid until the isolate shuts down. - /// - /// \param kernel_buffer - /// - /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must - /// remain valid until isolate shutdown. - /// - /// \return Returns true if the null safety is opted in by the input being - /// run `script_uri`, `snapshot_data` or `kernel_buffer`. - bool Dart_DetectNullSafety( - ffi.Pointer script_uri, - ffi.Pointer package_config, - ffi.Pointer original_working_directory, - ffi.Pointer snapshot_data, - ffi.Pointer snapshot_instructions, - ffi.Pointer kernel_buffer, - int kernel_buffer_size, - ) { - return _Dart_DetectNullSafety( - script_uri, - package_config, - original_working_directory, - snapshot_data, - snapshot_instructions, - kernel_buffer, - kernel_buffer_size, - ); - } + set NSURLUbiquitousItemDownloadingStatusDownloaded( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusDownloaded.value = value; - late final _Dart_DetectNullSafetyPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.IntPtr)>>('Dart_DetectNullSafety'); - late final _Dart_DetectNullSafety = _Dart_DetectNullSafetyPtr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + /// there is a local version of this item and it is the most up-to-date version known to this device. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusCurrent = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusCurrent'); - /// Returns true if isolate is the service isolate. - /// - /// \param isolate An isolate - /// - /// \return Returns true if 'isolate' is the service isolate. - bool Dart_IsServiceIsolate( - Dart_Isolate isolate, - ) { - return _Dart_IsServiceIsolate( - isolate, - ); - } + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusCurrent => + _NSURLUbiquitousItemDownloadingStatusCurrent.value; - late final _Dart_IsServiceIsolatePtr = - _lookup>( - 'Dart_IsServiceIsolate'); - late final _Dart_IsServiceIsolate = - _Dart_IsServiceIsolatePtr.asFunction(); + set NSURLUbiquitousItemDownloadingStatusCurrent( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusCurrent.value = value; - /// Writes the CPU profile to the timeline as a series of 'instant' events. - /// - /// Note that this is an expensive operation. - /// - /// \param main_port The main port of the Isolate whose profile samples to write. - /// \param error An optional error, must be free()ed by caller. - /// - /// \return Returns true if the profile is successfully written and false - /// otherwise. - bool Dart_WriteProfileToTimeline( - int main_port, - ffi.Pointer> error, - ) { - return _Dart_WriteProfileToTimeline( - main_port, - error, - ); - } + /// the current user is the owner of this shared item. + late final ffi.Pointer + _NSURLUbiquitousSharedItemRoleOwner = + _lookup( + 'NSURLUbiquitousSharedItemRoleOwner'); - late final _Dart_WriteProfileToTimelinePtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - Dart_Port, ffi.Pointer>)>>( - 'Dart_WriteProfileToTimeline'); - late final _Dart_WriteProfileToTimeline = _Dart_WriteProfileToTimelinePtr - .asFunction>)>(); + NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleOwner => + _NSURLUbiquitousSharedItemRoleOwner.value; - /// Compiles all functions reachable from entry points and marks - /// the isolate to disallow future compilation. - /// - /// Entry points should be specified using `@pragma("vm:entry-point")` - /// annotation. - /// - /// \return An error handle if a compilation error or runtime error running const - /// constructors was encountered. - Object Dart_Precompile() { - return _Dart_Precompile(); - } + set NSURLUbiquitousSharedItemRoleOwner(NSURLUbiquitousSharedItemRole value) => + _NSURLUbiquitousSharedItemRoleOwner.value = value; - late final _Dart_PrecompilePtr = - _lookup>('Dart_Precompile'); - late final _Dart_Precompile = - _Dart_PrecompilePtr.asFunction(); + /// the current user is a participant of this shared item. + late final ffi.Pointer + _NSURLUbiquitousSharedItemRoleParticipant = + _lookup( + 'NSURLUbiquitousSharedItemRoleParticipant'); - Object Dart_LoadingUnitLibraryUris( - int loading_unit_id, - ) { - return _Dart_LoadingUnitLibraryUris( - loading_unit_id, - ); - } + NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleParticipant => + _NSURLUbiquitousSharedItemRoleParticipant.value; - late final _Dart_LoadingUnitLibraryUrisPtr = - _lookup>( - 'Dart_LoadingUnitLibraryUris'); - late final _Dart_LoadingUnitLibraryUris = - _Dart_LoadingUnitLibraryUrisPtr.asFunction(); + set NSURLUbiquitousSharedItemRoleParticipant( + NSURLUbiquitousSharedItemRole value) => + _NSURLUbiquitousSharedItemRoleParticipant.value = value; - /// Creates a precompiled snapshot. - /// - A root library must have been loaded. - /// - Dart_Precompile must have been called. - /// - /// Outputs an assembly file defining the symbols listed in the definitions - /// above. - /// - /// The assembly should be compiled as a static or shared library and linked or - /// loaded by the embedder. Running this snapshot requires a VM compiled with - /// DART_PRECOMPILED_SNAPSHOT. The kDartVmSnapshotData and - /// kDartVmSnapshotInstructions should be passed to Dart_Initialize. The - /// kDartIsolateSnapshotData and kDartIsolateSnapshotInstructions should be - /// passed to Dart_CreateIsolateGroup. - /// - /// The callback will be invoked one or more times to provide the assembly code. - /// - /// If stripped is true, then the assembly code will not include DWARF - /// debugging sections. - /// - /// If debug_callback_data is provided, debug_callback_data will be used with - /// the callback to provide separate debugging information. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateAppAOTSnapshotAsAssembly( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, - bool stripped, - ffi.Pointer debug_callback_data, - ) { - return _Dart_CreateAppAOTSnapshotAsAssembly( - callback, - callback_data, - stripped, - debug_callback_data, - ); - } + /// the current user is only allowed to read this item + late final ffi.Pointer + _NSURLUbiquitousSharedItemPermissionsReadOnly = + _lookup( + 'NSURLUbiquitousSharedItemPermissionsReadOnly'); - late final _Dart_CreateAppAOTSnapshotAsAssemblyPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_StreamingWriteCallback, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsAssembly'); - late final _Dart_CreateAppAOTSnapshotAsAssembly = - _Dart_CreateAppAOTSnapshotAsAssemblyPtr.asFunction< - Object Function(Dart_StreamingWriteCallback, ffi.Pointer, - bool, ffi.Pointer)>(); + NSURLUbiquitousSharedItemPermissions + get NSURLUbiquitousSharedItemPermissionsReadOnly => + _NSURLUbiquitousSharedItemPermissionsReadOnly.value; - Object Dart_CreateAppAOTSnapshotAsAssemblies( - Dart_CreateLoadingUnitCallback next_callback, - ffi.Pointer next_callback_data, - bool stripped, - Dart_StreamingWriteCallback write_callback, - Dart_StreamingCloseCallback close_callback, + set NSURLUbiquitousSharedItemPermissionsReadOnly( + NSURLUbiquitousSharedItemPermissions value) => + _NSURLUbiquitousSharedItemPermissionsReadOnly.value = value; + + /// the current user is allowed to both read and write this item + late final ffi.Pointer + _NSURLUbiquitousSharedItemPermissionsReadWrite = + _lookup( + 'NSURLUbiquitousSharedItemPermissionsReadWrite'); + + NSURLUbiquitousSharedItemPermissions + get NSURLUbiquitousSharedItemPermissionsReadWrite => + _NSURLUbiquitousSharedItemPermissionsReadWrite.value; + + set NSURLUbiquitousSharedItemPermissionsReadWrite( + NSURLUbiquitousSharedItemPermissions value) => + _NSURLUbiquitousSharedItemPermissionsReadWrite.value = value; + + late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); + late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); + instancetype _objc_msgSend_463( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer value, ) { - return _Dart_CreateAppAOTSnapshotAsAssemblies( - next_callback, - next_callback_data, - stripped, - write_callback, - close_callback, + return __objc_msgSend_463( + obj, + sel, + name, + value, ); } - late final _Dart_CreateAppAOTSnapshotAsAssembliesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - ffi.Bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>>( - 'Dart_CreateAppAOTSnapshotAsAssemblies'); - late final _Dart_CreateAppAOTSnapshotAsAssemblies = - _Dart_CreateAppAOTSnapshotAsAssembliesPtr.asFunction< - Object Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>(); + late final __objc_msgSend_463Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - /// Creates a precompiled snapshot. - /// - A root library must have been loaded. - /// - Dart_Precompile must have been called. - /// - /// Outputs an ELF shared library defining the symbols - /// - _kDartVmSnapshotData - /// - _kDartVmSnapshotInstructions - /// - _kDartIsolateSnapshotData - /// - _kDartIsolateSnapshotInstructions - /// - /// The shared library should be dynamically loaded by the embedder. - /// Running this snapshot requires a VM compiled with DART_PRECOMPILED_SNAPSHOT. - /// The kDartVmSnapshotData and kDartVmSnapshotInstructions should be passed to - /// Dart_Initialize. The kDartIsolateSnapshotData and - /// kDartIsolateSnapshotInstructions should be passed to Dart_CreateIsolate. - /// - /// The callback will be invoked one or more times to provide the binary output. - /// - /// If stripped is true, then the binary output will not include DWARF - /// debugging sections. - /// - /// If debug_callback_data is provided, debug_callback_data will be used with - /// the callback to provide separate debugging information. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateAppAOTSnapshotAsElf( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, - bool stripped, - ffi.Pointer debug_callback_data, + late final _sel_queryItemWithName_value_1 = + _registerName1("queryItemWithName:value:"); + late final _sel_value1 = _registerName1("value"); + late final _class_NSURLComponents1 = _getClass1("NSURLComponents"); + late final _sel_initWithURL_resolvingAgainstBaseURL_1 = + _registerName1("initWithURL:resolvingAgainstBaseURL:"); + late final _sel_componentsWithURL_resolvingAgainstBaseURL_1 = + _registerName1("componentsWithURL:resolvingAgainstBaseURL:"); + late final _sel_componentsWithString_1 = + _registerName1("componentsWithString:"); + late final _sel_URLRelativeToURL_1 = _registerName1("URLRelativeToURL:"); + ffi.Pointer _objc_msgSend_464( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer baseURL, ) { - return _Dart_CreateAppAOTSnapshotAsElf( - callback, - callback_data, - stripped, - debug_callback_data, + return __objc_msgSend_464( + obj, + sel, + baseURL, ); } - late final _Dart_CreateAppAOTSnapshotAsElfPtr = _lookup< + late final __objc_msgSend_464Ptr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - Dart_StreamingWriteCallback, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsElf'); - late final _Dart_CreateAppAOTSnapshotAsElf = - _Dart_CreateAppAOTSnapshotAsElfPtr.asFunction< - Object Function(Dart_StreamingWriteCallback, ffi.Pointer, - bool, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - Object Dart_CreateAppAOTSnapshotAsElfs( - Dart_CreateLoadingUnitCallback next_callback, - ffi.Pointer next_callback_data, - bool stripped, - Dart_StreamingWriteCallback write_callback, - Dart_StreamingCloseCallback close_callback, + late final _sel_setScheme_1 = _registerName1("setScheme:"); + late final _sel_setUser_1 = _registerName1("setUser:"); + late final _sel_setPassword_1 = _registerName1("setPassword:"); + late final _sel_setHost_1 = _registerName1("setHost:"); + late final _sel_setPort_1 = _registerName1("setPort:"); + late final _sel_setPath_1 = _registerName1("setPath:"); + late final _sel_setQuery_1 = _registerName1("setQuery:"); + late final _sel_setFragment_1 = _registerName1("setFragment:"); + late final _sel_percentEncodedUser1 = _registerName1("percentEncodedUser"); + late final _sel_setPercentEncodedUser_1 = + _registerName1("setPercentEncodedUser:"); + late final _sel_percentEncodedPassword1 = + _registerName1("percentEncodedPassword"); + late final _sel_setPercentEncodedPassword_1 = + _registerName1("setPercentEncodedPassword:"); + late final _sel_percentEncodedHost1 = _registerName1("percentEncodedHost"); + late final _sel_setPercentEncodedHost_1 = + _registerName1("setPercentEncodedHost:"); + late final _sel_percentEncodedPath1 = _registerName1("percentEncodedPath"); + late final _sel_setPercentEncodedPath_1 = + _registerName1("setPercentEncodedPath:"); + late final _sel_percentEncodedQuery1 = _registerName1("percentEncodedQuery"); + late final _sel_setPercentEncodedQuery_1 = + _registerName1("setPercentEncodedQuery:"); + late final _sel_percentEncodedFragment1 = + _registerName1("percentEncodedFragment"); + late final _sel_setPercentEncodedFragment_1 = + _registerName1("setPercentEncodedFragment:"); + late final _sel_encodedHost1 = _registerName1("encodedHost"); + late final _sel_setEncodedHost_1 = _registerName1("setEncodedHost:"); + late final _sel_rangeOfScheme1 = _registerName1("rangeOfScheme"); + late final _sel_rangeOfUser1 = _registerName1("rangeOfUser"); + late final _sel_rangeOfPassword1 = _registerName1("rangeOfPassword"); + late final _sel_rangeOfHost1 = _registerName1("rangeOfHost"); + late final _sel_rangeOfPort1 = _registerName1("rangeOfPort"); + late final _sel_rangeOfPath1 = _registerName1("rangeOfPath"); + late final _sel_rangeOfQuery1 = _registerName1("rangeOfQuery"); + late final _sel_rangeOfFragment1 = _registerName1("rangeOfFragment"); + late final _sel_queryItems1 = _registerName1("queryItems"); + late final _sel_setQueryItems_1 = _registerName1("setQueryItems:"); + late final _sel_percentEncodedQueryItems1 = + _registerName1("percentEncodedQueryItems"); + late final _sel_setPercentEncodedQueryItems_1 = + _registerName1("setPercentEncodedQueryItems:"); + late final _class_NSFileSecurity1 = _getClass1("NSFileSecurity"); + late final _class_NSHTTPURLResponse1 = _getClass1("NSHTTPURLResponse"); + late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_1 = + _registerName1("initWithURL:statusCode:HTTPVersion:headerFields:"); + instancetype _objc_msgSend_465( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int statusCode, + ffi.Pointer HTTPVersion, + ffi.Pointer headerFields, ) { - return _Dart_CreateAppAOTSnapshotAsElfs( - next_callback, - next_callback_data, - stripped, - write_callback, - close_callback, + return __objc_msgSend_465( + obj, + sel, + url, + statusCode, + HTTPVersion, + headerFields, ); } - late final _Dart_CreateAppAOTSnapshotAsElfsPtr = _lookup< + late final __objc_msgSend_465Ptr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - ffi.Bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>>('Dart_CreateAppAOTSnapshotAsElfs'); - late final _Dart_CreateAppAOTSnapshotAsElfs = - _Dart_CreateAppAOTSnapshotAsElfsPtr.asFunction< - Object Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); - /// Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes - /// kDartVmSnapshotData and kDartVmSnapshotInstructions. It also does - /// not strip DWARF information from the generated assembly or allow for - /// separate debug information. - Object Dart_CreateVMAOTSnapshotAsAssembly( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, + late final _sel_statusCode1 = _registerName1("statusCode"); + late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); + late final _sel_localizedStringForStatusCode_1 = + _registerName1("localizedStringForStatusCode:"); + ffi.Pointer _objc_msgSend_466( + ffi.Pointer obj, + ffi.Pointer sel, + int statusCode, ) { - return _Dart_CreateVMAOTSnapshotAsAssembly( - callback, - callback_data, + return __objc_msgSend_466( + obj, + sel, + statusCode, ); } - late final _Dart_CreateVMAOTSnapshotAsAssemblyPtr = _lookup< + late final __objc_msgSend_466Ptr = _lookup< ffi.NativeFunction< - ffi.Handle Function(Dart_StreamingWriteCallback, - ffi.Pointer)>>('Dart_CreateVMAOTSnapshotAsAssembly'); - late final _Dart_CreateVMAOTSnapshotAsAssembly = - _Dart_CreateVMAOTSnapshotAsAssemblyPtr.asFunction< - Object Function( - Dart_StreamingWriteCallback, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - /// Sorts the class-ids in depth first traversal order of the inheritance - /// tree. This is a costly operation, but it can make method dispatch - /// more efficient and is done before writing snapshots. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_SortClasses() { - return _Dart_SortClasses(); - } + late final ffi.Pointer _NSGenericException = + _lookup('NSGenericException'); - late final _Dart_SortClassesPtr = - _lookup>('Dart_SortClasses'); - late final _Dart_SortClasses = - _Dart_SortClassesPtr.asFunction(); + NSExceptionName get NSGenericException => _NSGenericException.value; - /// Creates a snapshot that caches compiled code and type feedback for faster - /// startup and quicker warmup in a subsequent process. - /// - /// Outputs a snapshot in two pieces. The pieces should be passed to - /// Dart_CreateIsolateGroup in a VM using the same VM snapshot pieces used in the - /// current VM. The instructions piece must be loaded with read and execute - /// permissions; the data piece may be loaded as read-only. - /// - /// - Requires the VM to have not been started with --precompilation. - /// - Not supported when targeting IA32. - /// - The VM writing the snapshot and the VM reading the snapshot must be the - /// same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must - /// be targeting the same architecture, and must both be in checked mode or - /// both in unchecked mode. - /// - /// The buffers are scope allocated and are only valid until the next call to - /// Dart_ExitScope. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateAppJITSnapshotAsBlobs( - ffi.Pointer> isolate_snapshot_data_buffer, - ffi.Pointer isolate_snapshot_data_size, - ffi.Pointer> isolate_snapshot_instructions_buffer, - ffi.Pointer isolate_snapshot_instructions_size, + set NSGenericException(NSExceptionName value) => + _NSGenericException.value = value; + + late final ffi.Pointer _NSRangeException = + _lookup('NSRangeException'); + + NSExceptionName get NSRangeException => _NSRangeException.value; + + set NSRangeException(NSExceptionName value) => + _NSRangeException.value = value; + + late final ffi.Pointer _NSInvalidArgumentException = + _lookup('NSInvalidArgumentException'); + + NSExceptionName get NSInvalidArgumentException => + _NSInvalidArgumentException.value; + + set NSInvalidArgumentException(NSExceptionName value) => + _NSInvalidArgumentException.value = value; + + late final ffi.Pointer _NSInternalInconsistencyException = + _lookup('NSInternalInconsistencyException'); + + NSExceptionName get NSInternalInconsistencyException => + _NSInternalInconsistencyException.value; + + set NSInternalInconsistencyException(NSExceptionName value) => + _NSInternalInconsistencyException.value = value; + + late final ffi.Pointer _NSMallocException = + _lookup('NSMallocException'); + + NSExceptionName get NSMallocException => _NSMallocException.value; + + set NSMallocException(NSExceptionName value) => + _NSMallocException.value = value; + + late final ffi.Pointer _NSObjectInaccessibleException = + _lookup('NSObjectInaccessibleException'); + + NSExceptionName get NSObjectInaccessibleException => + _NSObjectInaccessibleException.value; + + set NSObjectInaccessibleException(NSExceptionName value) => + _NSObjectInaccessibleException.value = value; + + late final ffi.Pointer _NSObjectNotAvailableException = + _lookup('NSObjectNotAvailableException'); + + NSExceptionName get NSObjectNotAvailableException => + _NSObjectNotAvailableException.value; + + set NSObjectNotAvailableException(NSExceptionName value) => + _NSObjectNotAvailableException.value = value; + + late final ffi.Pointer _NSDestinationInvalidException = + _lookup('NSDestinationInvalidException'); + + NSExceptionName get NSDestinationInvalidException => + _NSDestinationInvalidException.value; + + set NSDestinationInvalidException(NSExceptionName value) => + _NSDestinationInvalidException.value = value; + + late final ffi.Pointer _NSPortTimeoutException = + _lookup('NSPortTimeoutException'); + + NSExceptionName get NSPortTimeoutException => _NSPortTimeoutException.value; + + set NSPortTimeoutException(NSExceptionName value) => + _NSPortTimeoutException.value = value; + + late final ffi.Pointer _NSInvalidSendPortException = + _lookup('NSInvalidSendPortException'); + + NSExceptionName get NSInvalidSendPortException => + _NSInvalidSendPortException.value; + + set NSInvalidSendPortException(NSExceptionName value) => + _NSInvalidSendPortException.value = value; + + late final ffi.Pointer _NSInvalidReceivePortException = + _lookup('NSInvalidReceivePortException'); + + NSExceptionName get NSInvalidReceivePortException => + _NSInvalidReceivePortException.value; + + set NSInvalidReceivePortException(NSExceptionName value) => + _NSInvalidReceivePortException.value = value; + + late final ffi.Pointer _NSPortSendException = + _lookup('NSPortSendException'); + + NSExceptionName get NSPortSendException => _NSPortSendException.value; + + set NSPortSendException(NSExceptionName value) => + _NSPortSendException.value = value; + + late final ffi.Pointer _NSPortReceiveException = + _lookup('NSPortReceiveException'); + + NSExceptionName get NSPortReceiveException => _NSPortReceiveException.value; + + set NSPortReceiveException(NSExceptionName value) => + _NSPortReceiveException.value = value; + + late final ffi.Pointer _NSOldStyleException = + _lookup('NSOldStyleException'); + + NSExceptionName get NSOldStyleException => _NSOldStyleException.value; + + set NSOldStyleException(NSExceptionName value) => + _NSOldStyleException.value = value; + + late final ffi.Pointer _NSInconsistentArchiveException = + _lookup('NSInconsistentArchiveException'); + + NSExceptionName get NSInconsistentArchiveException => + _NSInconsistentArchiveException.value; + + set NSInconsistentArchiveException(NSExceptionName value) => + _NSInconsistentArchiveException.value = value; + + late final _class_NSException1 = _getClass1("NSException"); + late final _sel_exceptionWithName_reason_userInfo_1 = + _registerName1("exceptionWithName:reason:userInfo:"); + ffi.Pointer _objc_msgSend_467( + ffi.Pointer obj, + ffi.Pointer sel, + NSExceptionName name, + ffi.Pointer reason, + ffi.Pointer userInfo, ) { - return _Dart_CreateAppJITSnapshotAsBlobs( - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - isolate_snapshot_instructions_buffer, - isolate_snapshot_instructions_size, + return __objc_msgSend_467( + obj, + sel, + name, + reason, + userInfo, ); } - late final _Dart_CreateAppJITSnapshotAsBlobsPtr = _lookup< + late final __objc_msgSend_467Ptr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('Dart_CreateAppJITSnapshotAsBlobs'); - late final _Dart_CreateAppJITSnapshotAsBlobs = - _Dart_CreateAppJITSnapshotAsBlobsPtr.asFunction< - Object Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + ffi.Pointer)>(); - /// Like Dart_CreateAppJITSnapshotAsBlobs, but also creates a new VM snapshot. - Object Dart_CreateCoreJITSnapshotAsBlobs( - ffi.Pointer> vm_snapshot_data_buffer, - ffi.Pointer vm_snapshot_data_size, - ffi.Pointer> vm_snapshot_instructions_buffer, - ffi.Pointer vm_snapshot_instructions_size, - ffi.Pointer> isolate_snapshot_data_buffer, - ffi.Pointer isolate_snapshot_data_size, - ffi.Pointer> isolate_snapshot_instructions_buffer, - ffi.Pointer isolate_snapshot_instructions_size, + late final _sel_initWithName_reason_userInfo_1 = + _registerName1("initWithName:reason:userInfo:"); + instancetype _objc_msgSend_468( + ffi.Pointer obj, + ffi.Pointer sel, + NSExceptionName aName, + ffi.Pointer aReason, + ffi.Pointer aUserInfo, ) { - return _Dart_CreateCoreJITSnapshotAsBlobs( - vm_snapshot_data_buffer, - vm_snapshot_data_size, - vm_snapshot_instructions_buffer, - vm_snapshot_instructions_size, - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - isolate_snapshot_instructions_buffer, - isolate_snapshot_instructions_size, + return __objc_msgSend_468( + obj, + sel, + aName, + aReason, + aUserInfo, ); } - late final _Dart_CreateCoreJITSnapshotAsBlobsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('Dart_CreateCoreJITSnapshotAsBlobs'); - late final _Dart_CreateCoreJITSnapshotAsBlobs = - _Dart_CreateCoreJITSnapshotAsBlobsPtr.asFunction< - Object Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - /// Get obfuscation map for precompiled code. - /// - /// Obfuscation map is encoded as a JSON array of pairs (original name, - /// obfuscated name). - /// - /// \return Returns an error handler if the VM was built in a mode that does not - /// support obfuscation. - Object Dart_GetObfuscationMap( - ffi.Pointer> buffer, - ffi.Pointer buffer_length, + late final __objc_msgSend_468Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSExceptionName, ffi.Pointer, ffi.Pointer)>(); + + late final _sel_reason1 = _registerName1("reason"); + late final _sel_callStackReturnAddresses1 = + _registerName1("callStackReturnAddresses"); + late final _sel_callStackSymbols1 = _registerName1("callStackSymbols"); + late final _sel_raise1 = _registerName1("raise"); + late final _sel_raise_format_1 = _registerName1("raise:format:"); + late final _sel_raise_format_arguments_1 = + _registerName1("raise:format:arguments:"); + void _objc_msgSend_469( + ffi.Pointer obj, + ffi.Pointer sel, + NSExceptionName name, + ffi.Pointer format, + va_list argList, ) { - return _Dart_GetObfuscationMap( - buffer, - buffer_length, + return __objc_msgSend_469( + obj, + sel, + name, + format, + argList, ); } - late final _Dart_GetObfuscationMapPtr = _lookup< + late final __objc_msgSend_469Ptr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer>, - ffi.Pointer)>>('Dart_GetObfuscationMap'); - late final _Dart_GetObfuscationMap = _Dart_GetObfuscationMapPtr.asFunction< - Object Function( - ffi.Pointer>, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + va_list)>>('objc_msgSend'); + late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSExceptionName, ffi.Pointer, va_list)>(); - /// Returns whether the VM only supports running from precompiled snapshots and - /// not from any other kind of snapshot or from source (that is, the VM was - /// compiled with DART_PRECOMPILED_RUNTIME). - bool Dart_IsPrecompiledRuntime() { - return _Dart_IsPrecompiledRuntime(); + ffi.Pointer NSGetUncaughtExceptionHandler() { + return _NSGetUncaughtExceptionHandler(); } - late final _Dart_IsPrecompiledRuntimePtr = - _lookup>( - 'Dart_IsPrecompiledRuntime'); - late final _Dart_IsPrecompiledRuntime = - _Dart_IsPrecompiledRuntimePtr.asFunction(); + late final _NSGetUncaughtExceptionHandlerPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer + Function()>>('NSGetUncaughtExceptionHandler'); + late final _NSGetUncaughtExceptionHandler = _NSGetUncaughtExceptionHandlerPtr + .asFunction Function()>(); - /// Print a native stack trace. Used for crash handling. - /// - /// If context is NULL, prints the current stack trace. Otherwise, context - /// should be a CONTEXT* (Windows) or ucontext_t* (POSIX) from a signal handler - /// running on the current thread. - void Dart_DumpNativeStackTrace( - ffi.Pointer context, + void NSSetUncaughtExceptionHandler( + ffi.Pointer arg0, ) { - return _Dart_DumpNativeStackTrace( - context, + return _NSSetUncaughtExceptionHandler( + arg0, ); } - late final _Dart_DumpNativeStackTracePtr = - _lookup)>>( - 'Dart_DumpNativeStackTrace'); - late final _Dart_DumpNativeStackTrace = _Dart_DumpNativeStackTracePtr - .asFunction)>(); + late final _NSSetUncaughtExceptionHandlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer)>>( + 'NSSetUncaughtExceptionHandler'); + late final _NSSetUncaughtExceptionHandler = _NSSetUncaughtExceptionHandlerPtr + .asFunction)>(); - /// Indicate that the process is about to abort, and the Dart VM should not - /// attempt to cleanup resources. - void Dart_PrepareToAbort() { - return _Dart_PrepareToAbort(); - } + late final ffi.Pointer> _NSAssertionHandlerKey = + _lookup>('NSAssertionHandlerKey'); - late final _Dart_PrepareToAbortPtr = - _lookup>('Dart_PrepareToAbort'); - late final _Dart_PrepareToAbort = - _Dart_PrepareToAbortPtr.asFunction(); + ffi.Pointer get NSAssertionHandlerKey => + _NSAssertionHandlerKey.value; - /// Posts a message on some port. The message will contain the Dart_CObject - /// object graph rooted in 'message'. - /// - /// While the message is being sent the state of the graph of Dart_CObject - /// structures rooted in 'message' should not be accessed, as the message - /// generation will make temporary modifications to the data. When the message - /// has been sent the graph will be fully restored. - /// - /// If true is returned, the message was enqueued, and finalizers for external - /// typed data will eventually run, even if the receiving isolate shuts down - /// before processing the message. If false is returned, the message was not - /// enqueued and ownership of external typed data in the message remains with the - /// caller. - /// - /// This function may be called on any thread when the VM is running (that is, - /// after Dart_Initialize has returned and before Dart_Cleanup has been called). - /// - /// \param port_id The destination port. - /// \param message The message to send. - /// - /// \return True if the message was posted. - bool Dart_PostCObject( - int port_id, - ffi.Pointer message, + set NSAssertionHandlerKey(ffi.Pointer value) => + _NSAssertionHandlerKey.value = value; + + late final _class_NSAssertionHandler1 = _getClass1("NSAssertionHandler"); + late final _sel_currentHandler1 = _registerName1("currentHandler"); + ffi.Pointer _objc_msgSend_470( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _Dart_PostCObject( - port_id, - message, + return __objc_msgSend_470( + obj, + sel, ); } - late final _Dart_PostCObjectPtr = _lookup< + late final __objc_msgSend_470Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - Dart_Port, ffi.Pointer)>>('Dart_PostCObject'); - late final _Dart_PostCObject = _Dart_PostCObjectPtr.asFunction< - bool Function(int, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - /// Posts a message on some port. The message will contain the integer 'message'. - /// - /// \param port_id The destination port. - /// \param message The message to send. - /// - /// \return True if the message was posted. - bool Dart_PostInteger( - int port_id, - int message, + late final _sel_handleFailureInMethod_object_file_lineNumber_description_1 = + _registerName1( + "handleFailureInMethod:object:file:lineNumber:description:"); + void _objc_msgSend_471( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer selector, + ffi.Pointer object, + ffi.Pointer fileName, + int line, + ffi.Pointer format, ) { - return _Dart_PostInteger( - port_id, - message, + return __objc_msgSend_471( + obj, + sel, + selector, + object, + fileName, + line, + format, ); } - late final _Dart_PostIntegerPtr = - _lookup>( - 'Dart_PostInteger'); - late final _Dart_PostInteger = - _Dart_PostIntegerPtr.asFunction(); + late final __objc_msgSend_471Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - /// Creates a new native port. When messages are received on this - /// native port, then they will be dispatched to the provided native - /// message handler. - /// - /// \param name The name of this port in debugging messages. - /// \param handler The C handler to run when messages arrive on the port. - /// \param handle_concurrently Is it okay to process requests on this - /// native port concurrently? - /// - /// \return If successful, returns the port id for the native port. In - /// case of error, returns ILLEGAL_PORT. - int Dart_NewNativePort( - ffi.Pointer name, - Dart_NativeMessageHandler handler, - bool handle_concurrently, + late final _sel_handleFailureInFunction_file_lineNumber_description_1 = + _registerName1("handleFailureInFunction:file:lineNumber:description:"); + void _objc_msgSend_472( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer functionName, + ffi.Pointer fileName, + int line, + ffi.Pointer format, ) { - return _Dart_NewNativePort( - name, - handler, - handle_concurrently, + return __objc_msgSend_472( + obj, + sel, + functionName, + fileName, + line, + format, ); } - late final _Dart_NewNativePortPtr = _lookup< + late final __objc_msgSend_472Ptr = _lookup< ffi.NativeFunction< - Dart_Port Function(ffi.Pointer, Dart_NativeMessageHandler, - ffi.Bool)>>('Dart_NewNativePort'); - late final _Dart_NewNativePort = _Dart_NewNativePortPtr.asFunction< - int Function(ffi.Pointer, Dart_NativeMessageHandler, bool)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - /// Closes the native port with the given id. - /// - /// The port must have been allocated by a call to Dart_NewNativePort. - /// - /// \param native_port_id The id of the native port to close. - /// - /// \return Returns true if the port was closed successfully. - bool Dart_CloseNativePort( - int native_port_id, + late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); + late final _sel_blockOperationWithBlock_1 = + _registerName1("blockOperationWithBlock:"); + instancetype _objc_msgSend_473( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return _Dart_CloseNativePort( - native_port_id, + return __objc_msgSend_473( + obj, + sel, + block, ); } - late final _Dart_CloseNativePortPtr = - _lookup>( - 'Dart_CloseNativePort'); - late final _Dart_CloseNativePort = - _Dart_CloseNativePortPtr.asFunction(); - - /// Forces all loaded classes and functions to be compiled eagerly in - /// the current isolate.. - /// - /// TODO(turnidge): Document. - Object Dart_CompileAll() { - return _Dart_CompileAll(); - } - - late final _Dart_CompileAllPtr = - _lookup>('Dart_CompileAll'); - late final _Dart_CompileAll = - _Dart_CompileAllPtr.asFunction(); + late final __objc_msgSend_473Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// Finalizes all classes. - Object Dart_FinalizeAllClasses() { - return _Dart_FinalizeAllClasses(); + late final _sel_addExecutionBlock_1 = _registerName1("addExecutionBlock:"); + late final _sel_executionBlocks1 = _registerName1("executionBlocks"); + late final _class_NSInvocationOperation1 = + _getClass1("NSInvocationOperation"); + late final _sel_initWithTarget_selector_object_1 = + _registerName1("initWithTarget:selector:object:"); + instancetype _objc_msgSend_474( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer sel1, + ffi.Pointer arg, + ) { + return __objc_msgSend_474( + obj, + sel, + target, + sel1, + arg, + ); } - late final _Dart_FinalizeAllClassesPtr = - _lookup>( - 'Dart_FinalizeAllClasses'); - late final _Dart_FinalizeAllClasses = - _Dart_FinalizeAllClassesPtr.asFunction(); + late final __objc_msgSend_474Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - /// This function is intentionally undocumented. - /// - /// It should not be used outside internal tests. - ffi.Pointer Dart_ExecuteInternalCommand( - ffi.Pointer command, - ffi.Pointer arg, + late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); + instancetype _objc_msgSend_475( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer inv, ) { - return _Dart_ExecuteInternalCommand( - command, - arg, + return __objc_msgSend_475( + obj, + sel, + inv, ); } - late final _Dart_ExecuteInternalCommandPtr = _lookup< + late final __objc_msgSend_475Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>('Dart_ExecuteInternalCommand'); - late final _Dart_ExecuteInternalCommand = - _Dart_ExecuteInternalCommandPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - /// \mainpage Dynamically Linked Dart API - /// - /// This exposes a subset of symbols from dart_api.h and dart_native_api.h - /// available in every Dart embedder through dynamic linking. - /// - /// All symbols are postfixed with _DL to indicate that they are dynamically - /// linked and to prevent conflicts with the original symbol. - /// - /// Link `dart_api_dl.c` file into your library and invoke - /// `Dart_InitializeApiDL` with `NativeApi.initializeApiDLData`. - int Dart_InitializeApiDL( - ffi.Pointer data, + late final _sel_invocation1 = _registerName1("invocation"); + ffi.Pointer _objc_msgSend_476( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _Dart_InitializeApiDL( - data, + return __objc_msgSend_476( + obj, + sel, ); } - late final _Dart_InitializeApiDLPtr = - _lookup)>>( - 'Dart_InitializeApiDL'); - late final _Dart_InitializeApiDL = _Dart_InitializeApiDLPtr.asFunction< - int Function(ffi.Pointer)>(); - - late final ffi.Pointer _Dart_PostCObject_DL = - _lookup('Dart_PostCObject_DL'); + late final __objc_msgSend_476Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - Dart_PostCObject_Type get Dart_PostCObject_DL => _Dart_PostCObject_DL.value; + late final _sel_result1 = _registerName1("result"); + late final ffi.Pointer + _NSInvocationOperationVoidResultException = + _lookup('NSInvocationOperationVoidResultException'); - set Dart_PostCObject_DL(Dart_PostCObject_Type value) => - _Dart_PostCObject_DL.value = value; + NSExceptionName get NSInvocationOperationVoidResultException => + _NSInvocationOperationVoidResultException.value; - late final ffi.Pointer _Dart_PostInteger_DL = - _lookup('Dart_PostInteger_DL'); + set NSInvocationOperationVoidResultException(NSExceptionName value) => + _NSInvocationOperationVoidResultException.value = value; - Dart_PostInteger_Type get Dart_PostInteger_DL => _Dart_PostInteger_DL.value; + late final ffi.Pointer + _NSInvocationOperationCancelledException = + _lookup('NSInvocationOperationCancelledException'); - set Dart_PostInteger_DL(Dart_PostInteger_Type value) => - _Dart_PostInteger_DL.value = value; + NSExceptionName get NSInvocationOperationCancelledException => + _NSInvocationOperationCancelledException.value; - late final ffi.Pointer _Dart_NewNativePort_DL = - _lookup('Dart_NewNativePort_DL'); + set NSInvocationOperationCancelledException(NSExceptionName value) => + _NSInvocationOperationCancelledException.value = value; - Dart_NewNativePort_Type get Dart_NewNativePort_DL => - _Dart_NewNativePort_DL.value; + late final ffi.Pointer + _NSOperationQueueDefaultMaxConcurrentOperationCount = + _lookup('NSOperationQueueDefaultMaxConcurrentOperationCount'); - set Dart_NewNativePort_DL(Dart_NewNativePort_Type value) => - _Dart_NewNativePort_DL.value = value; + int get NSOperationQueueDefaultMaxConcurrentOperationCount => + _NSOperationQueueDefaultMaxConcurrentOperationCount.value; - late final ffi.Pointer _Dart_CloseNativePort_DL = - _lookup('Dart_CloseNativePort_DL'); + set NSOperationQueueDefaultMaxConcurrentOperationCount(int value) => + _NSOperationQueueDefaultMaxConcurrentOperationCount.value = value; - Dart_CloseNativePort_Type get Dart_CloseNativePort_DL => - _Dart_CloseNativePort_DL.value; + /// Predefined domain for errors from most AppKit and Foundation APIs. + late final ffi.Pointer _NSCocoaErrorDomain = + _lookup('NSCocoaErrorDomain'); - set Dart_CloseNativePort_DL(Dart_CloseNativePort_Type value) => - _Dart_CloseNativePort_DL.value = value; + NSErrorDomain get NSCocoaErrorDomain => _NSCocoaErrorDomain.value; - late final ffi.Pointer _Dart_IsError_DL = - _lookup('Dart_IsError_DL'); + set NSCocoaErrorDomain(NSErrorDomain value) => + _NSCocoaErrorDomain.value = value; - Dart_IsError_Type get Dart_IsError_DL => _Dart_IsError_DL.value; + /// Other predefined domains; value of "code" will correspond to preexisting values in these domains. + late final ffi.Pointer _NSPOSIXErrorDomain = + _lookup('NSPOSIXErrorDomain'); - set Dart_IsError_DL(Dart_IsError_Type value) => - _Dart_IsError_DL.value = value; + NSErrorDomain get NSPOSIXErrorDomain => _NSPOSIXErrorDomain.value; - late final ffi.Pointer _Dart_IsApiError_DL = - _lookup('Dart_IsApiError_DL'); + set NSPOSIXErrorDomain(NSErrorDomain value) => + _NSPOSIXErrorDomain.value = value; - Dart_IsApiError_Type get Dart_IsApiError_DL => _Dart_IsApiError_DL.value; + late final ffi.Pointer _NSOSStatusErrorDomain = + _lookup('NSOSStatusErrorDomain'); - set Dart_IsApiError_DL(Dart_IsApiError_Type value) => - _Dart_IsApiError_DL.value = value; + NSErrorDomain get NSOSStatusErrorDomain => _NSOSStatusErrorDomain.value; - late final ffi.Pointer - _Dart_IsUnhandledExceptionError_DL = - _lookup( - 'Dart_IsUnhandledExceptionError_DL'); + set NSOSStatusErrorDomain(NSErrorDomain value) => + _NSOSStatusErrorDomain.value = value; - Dart_IsUnhandledExceptionError_Type get Dart_IsUnhandledExceptionError_DL => - _Dart_IsUnhandledExceptionError_DL.value; + late final ffi.Pointer _NSMachErrorDomain = + _lookup('NSMachErrorDomain'); - set Dart_IsUnhandledExceptionError_DL( - Dart_IsUnhandledExceptionError_Type value) => - _Dart_IsUnhandledExceptionError_DL.value = value; + NSErrorDomain get NSMachErrorDomain => _NSMachErrorDomain.value; - late final ffi.Pointer - _Dart_IsCompilationError_DL = - _lookup('Dart_IsCompilationError_DL'); + set NSMachErrorDomain(NSErrorDomain value) => + _NSMachErrorDomain.value = value; - Dart_IsCompilationError_Type get Dart_IsCompilationError_DL => - _Dart_IsCompilationError_DL.value; + /// Key in userInfo. A recommended standard way to embed NSErrors from underlying calls. The value of this key should be an NSError. + late final ffi.Pointer _NSUnderlyingErrorKey = + _lookup('NSUnderlyingErrorKey'); - set Dart_IsCompilationError_DL(Dart_IsCompilationError_Type value) => - _Dart_IsCompilationError_DL.value = value; + NSErrorUserInfoKey get NSUnderlyingErrorKey => _NSUnderlyingErrorKey.value; - late final ffi.Pointer _Dart_IsFatalError_DL = - _lookup('Dart_IsFatalError_DL'); + set NSUnderlyingErrorKey(NSErrorUserInfoKey value) => + _NSUnderlyingErrorKey.value = value; - Dart_IsFatalError_Type get Dart_IsFatalError_DL => - _Dart_IsFatalError_DL.value; + /// Key in userInfo. A recommended standard way to embed a list of several NSErrors from underlying calls. The value of this key should be an NSArray of NSError. This value is independent from the value of `NSUnderlyingErrorKey` - neither, one, or both may be set. + late final ffi.Pointer _NSMultipleUnderlyingErrorsKey = + _lookup('NSMultipleUnderlyingErrorsKey'); - set Dart_IsFatalError_DL(Dart_IsFatalError_Type value) => - _Dart_IsFatalError_DL.value = value; + NSErrorUserInfoKey get NSMultipleUnderlyingErrorsKey => + _NSMultipleUnderlyingErrorsKey.value; - late final ffi.Pointer _Dart_GetError_DL = - _lookup('Dart_GetError_DL'); + set NSMultipleUnderlyingErrorsKey(NSErrorUserInfoKey value) => + _NSMultipleUnderlyingErrorsKey.value = value; - Dart_GetError_Type get Dart_GetError_DL => _Dart_GetError_DL.value; + /// NSString, a complete sentence (or more) describing ideally both what failed and why it failed. + late final ffi.Pointer _NSLocalizedDescriptionKey = + _lookup('NSLocalizedDescriptionKey'); - set Dart_GetError_DL(Dart_GetError_Type value) => - _Dart_GetError_DL.value = value; + NSErrorUserInfoKey get NSLocalizedDescriptionKey => + _NSLocalizedDescriptionKey.value; - late final ffi.Pointer - _Dart_ErrorHasException_DL = - _lookup('Dart_ErrorHasException_DL'); + set NSLocalizedDescriptionKey(NSErrorUserInfoKey value) => + _NSLocalizedDescriptionKey.value = value; - Dart_ErrorHasException_Type get Dart_ErrorHasException_DL => - _Dart_ErrorHasException_DL.value; + /// NSString, a complete sentence (or more) describing why the operation failed. + late final ffi.Pointer _NSLocalizedFailureReasonErrorKey = + _lookup('NSLocalizedFailureReasonErrorKey'); - set Dart_ErrorHasException_DL(Dart_ErrorHasException_Type value) => - _Dart_ErrorHasException_DL.value = value; + NSErrorUserInfoKey get NSLocalizedFailureReasonErrorKey => + _NSLocalizedFailureReasonErrorKey.value; - late final ffi.Pointer - _Dart_ErrorGetException_DL = - _lookup('Dart_ErrorGetException_DL'); + set NSLocalizedFailureReasonErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedFailureReasonErrorKey.value = value; - Dart_ErrorGetException_Type get Dart_ErrorGetException_DL => - _Dart_ErrorGetException_DL.value; + /// NSString, a complete sentence (or more) describing what the user can do to fix the problem. + late final ffi.Pointer + _NSLocalizedRecoverySuggestionErrorKey = + _lookup('NSLocalizedRecoverySuggestionErrorKey'); - set Dart_ErrorGetException_DL(Dart_ErrorGetException_Type value) => - _Dart_ErrorGetException_DL.value = value; + NSErrorUserInfoKey get NSLocalizedRecoverySuggestionErrorKey => + _NSLocalizedRecoverySuggestionErrorKey.value; - late final ffi.Pointer - _Dart_ErrorGetStackTrace_DL = - _lookup('Dart_ErrorGetStackTrace_DL'); + set NSLocalizedRecoverySuggestionErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedRecoverySuggestionErrorKey.value = value; - Dart_ErrorGetStackTrace_Type get Dart_ErrorGetStackTrace_DL => - _Dart_ErrorGetStackTrace_DL.value; + /// NSArray of NSStrings corresponding to button titles. + late final ffi.Pointer + _NSLocalizedRecoveryOptionsErrorKey = + _lookup('NSLocalizedRecoveryOptionsErrorKey'); - set Dart_ErrorGetStackTrace_DL(Dart_ErrorGetStackTrace_Type value) => - _Dart_ErrorGetStackTrace_DL.value = value; + NSErrorUserInfoKey get NSLocalizedRecoveryOptionsErrorKey => + _NSLocalizedRecoveryOptionsErrorKey.value; - late final ffi.Pointer _Dart_NewApiError_DL = - _lookup('Dart_NewApiError_DL'); + set NSLocalizedRecoveryOptionsErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedRecoveryOptionsErrorKey.value = value; - Dart_NewApiError_Type get Dart_NewApiError_DL => _Dart_NewApiError_DL.value; + /// Instance of a subclass of NSObject that conforms to the NSErrorRecoveryAttempting informal protocol + late final ffi.Pointer _NSRecoveryAttempterErrorKey = + _lookup('NSRecoveryAttempterErrorKey'); - set Dart_NewApiError_DL(Dart_NewApiError_Type value) => - _Dart_NewApiError_DL.value = value; + NSErrorUserInfoKey get NSRecoveryAttempterErrorKey => + _NSRecoveryAttempterErrorKey.value; - late final ffi.Pointer - _Dart_NewCompilationError_DL = - _lookup('Dart_NewCompilationError_DL'); + set NSRecoveryAttempterErrorKey(NSErrorUserInfoKey value) => + _NSRecoveryAttempterErrorKey.value = value; - Dart_NewCompilationError_Type get Dart_NewCompilationError_DL => - _Dart_NewCompilationError_DL.value; + /// NSString containing a help anchor + late final ffi.Pointer _NSHelpAnchorErrorKey = + _lookup('NSHelpAnchorErrorKey'); - set Dart_NewCompilationError_DL(Dart_NewCompilationError_Type value) => - _Dart_NewCompilationError_DL.value = value; + NSErrorUserInfoKey get NSHelpAnchorErrorKey => _NSHelpAnchorErrorKey.value; - late final ffi.Pointer - _Dart_NewUnhandledExceptionError_DL = - _lookup( - 'Dart_NewUnhandledExceptionError_DL'); + set NSHelpAnchorErrorKey(NSErrorUserInfoKey value) => + _NSHelpAnchorErrorKey.value = value; - Dart_NewUnhandledExceptionError_Type get Dart_NewUnhandledExceptionError_DL => - _Dart_NewUnhandledExceptionError_DL.value; + /// NSString. This provides a string which will be shown when constructing the debugDescription of the NSError, to be used when debugging or when formatting the error with %@. This string will never be used in localizedDescription, so will not be shown to the user. + late final ffi.Pointer _NSDebugDescriptionErrorKey = + _lookup('NSDebugDescriptionErrorKey'); - set Dart_NewUnhandledExceptionError_DL( - Dart_NewUnhandledExceptionError_Type value) => - _Dart_NewUnhandledExceptionError_DL.value = value; + NSErrorUserInfoKey get NSDebugDescriptionErrorKey => + _NSDebugDescriptionErrorKey.value; - late final ffi.Pointer _Dart_PropagateError_DL = - _lookup('Dart_PropagateError_DL'); + set NSDebugDescriptionErrorKey(NSErrorUserInfoKey value) => + _NSDebugDescriptionErrorKey.value = value; - Dart_PropagateError_Type get Dart_PropagateError_DL => - _Dart_PropagateError_DL.value; + /// NSString, a complete sentence (or more) describing what failed. Setting a value for this key in userInfo dictionary of errors received from framework APIs is a good way to customize and fine tune the localizedDescription of an NSError. As an example, for Foundation error code NSFileWriteOutOfSpaceError, setting the value of this key to "The image library could not be saved." will allow the localizedDescription of the error to come out as "The image library could not be saved. The volume Macintosh HD is out of space." rather than the default (say) “You can't save the file ImgDatabaseV2 because the volume Macintosh HD is out of space." + late final ffi.Pointer _NSLocalizedFailureErrorKey = + _lookup('NSLocalizedFailureErrorKey'); - set Dart_PropagateError_DL(Dart_PropagateError_Type value) => - _Dart_PropagateError_DL.value = value; + NSErrorUserInfoKey get NSLocalizedFailureErrorKey => + _NSLocalizedFailureErrorKey.value; - late final ffi.Pointer - _Dart_HandleFromPersistent_DL = - _lookup('Dart_HandleFromPersistent_DL'); + set NSLocalizedFailureErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedFailureErrorKey.value = value; - Dart_HandleFromPersistent_Type get Dart_HandleFromPersistent_DL => - _Dart_HandleFromPersistent_DL.value; + /// NSNumber containing NSStringEncoding + late final ffi.Pointer _NSStringEncodingErrorKey = + _lookup('NSStringEncodingErrorKey'); - set Dart_HandleFromPersistent_DL(Dart_HandleFromPersistent_Type value) => - _Dart_HandleFromPersistent_DL.value = value; + NSErrorUserInfoKey get NSStringEncodingErrorKey => + _NSStringEncodingErrorKey.value; - late final ffi.Pointer - _Dart_HandleFromWeakPersistent_DL = - _lookup( - 'Dart_HandleFromWeakPersistent_DL'); + set NSStringEncodingErrorKey(NSErrorUserInfoKey value) => + _NSStringEncodingErrorKey.value = value; - Dart_HandleFromWeakPersistent_Type get Dart_HandleFromWeakPersistent_DL => - _Dart_HandleFromWeakPersistent_DL.value; + /// NSURL + late final ffi.Pointer _NSURLErrorKey = + _lookup('NSURLErrorKey'); - set Dart_HandleFromWeakPersistent_DL( - Dart_HandleFromWeakPersistent_Type value) => - _Dart_HandleFromWeakPersistent_DL.value = value; + NSErrorUserInfoKey get NSURLErrorKey => _NSURLErrorKey.value; - late final ffi.Pointer - _Dart_NewPersistentHandle_DL = - _lookup('Dart_NewPersistentHandle_DL'); + set NSURLErrorKey(NSErrorUserInfoKey value) => _NSURLErrorKey.value = value; - Dart_NewPersistentHandle_Type get Dart_NewPersistentHandle_DL => - _Dart_NewPersistentHandle_DL.value; + /// NSString + late final ffi.Pointer _NSFilePathErrorKey = + _lookup('NSFilePathErrorKey'); - set Dart_NewPersistentHandle_DL(Dart_NewPersistentHandle_Type value) => - _Dart_NewPersistentHandle_DL.value = value; + NSErrorUserInfoKey get NSFilePathErrorKey => _NSFilePathErrorKey.value; - late final ffi.Pointer - _Dart_SetPersistentHandle_DL = - _lookup('Dart_SetPersistentHandle_DL'); + set NSFilePathErrorKey(NSErrorUserInfoKey value) => + _NSFilePathErrorKey.value = value; - Dart_SetPersistentHandle_Type get Dart_SetPersistentHandle_DL => - _Dart_SetPersistentHandle_DL.value; + /// Is this an error handle? + /// + /// Requires there to be a current isolate. + bool Dart_IsError( + Object handle, + ) { + return _Dart_IsError( + handle, + ); + } - set Dart_SetPersistentHandle_DL(Dart_SetPersistentHandle_Type value) => - _Dart_SetPersistentHandle_DL.value = value; + late final _Dart_IsErrorPtr = + _lookup>( + 'Dart_IsError'); + late final _Dart_IsError = + _Dart_IsErrorPtr.asFunction(); - late final ffi.Pointer - _Dart_DeletePersistentHandle_DL = - _lookup( - 'Dart_DeletePersistentHandle_DL'); + /// Is this an api error handle? + /// + /// Api error handles are produced when an api function is misused. + /// This happens when a Dart embedding api function is called with + /// invalid arguments or in an invalid context. + /// + /// Requires there to be a current isolate. + bool Dart_IsApiError( + Object handle, + ) { + return _Dart_IsApiError( + handle, + ); + } - Dart_DeletePersistentHandle_Type get Dart_DeletePersistentHandle_DL => - _Dart_DeletePersistentHandle_DL.value; + late final _Dart_IsApiErrorPtr = + _lookup>( + 'Dart_IsApiError'); + late final _Dart_IsApiError = + _Dart_IsApiErrorPtr.asFunction(); - set Dart_DeletePersistentHandle_DL(Dart_DeletePersistentHandle_Type value) => - _Dart_DeletePersistentHandle_DL.value = value; + /// Is this an unhandled exception error handle? + /// + /// Unhandled exception error handles are produced when, during the + /// execution of Dart code, an exception is thrown but not caught. + /// This can occur in any function which triggers the execution of Dart + /// code. + /// + /// See Dart_ErrorGetException and Dart_ErrorGetStackTrace. + /// + /// Requires there to be a current isolate. + bool Dart_IsUnhandledExceptionError( + Object handle, + ) { + return _Dart_IsUnhandledExceptionError( + handle, + ); + } - late final ffi.Pointer - _Dart_NewWeakPersistentHandle_DL = - _lookup( - 'Dart_NewWeakPersistentHandle_DL'); + late final _Dart_IsUnhandledExceptionErrorPtr = + _lookup>( + 'Dart_IsUnhandledExceptionError'); + late final _Dart_IsUnhandledExceptionError = + _Dart_IsUnhandledExceptionErrorPtr.asFunction(); - Dart_NewWeakPersistentHandle_Type get Dart_NewWeakPersistentHandle_DL => - _Dart_NewWeakPersistentHandle_DL.value; + /// Is this a compilation error handle? + /// + /// Compilation error handles are produced when, during the execution + /// of Dart code, a compile-time error occurs. This can occur in any + /// function which triggers the execution of Dart code. + /// + /// Requires there to be a current isolate. + bool Dart_IsCompilationError( + Object handle, + ) { + return _Dart_IsCompilationError( + handle, + ); + } - set Dart_NewWeakPersistentHandle_DL( - Dart_NewWeakPersistentHandle_Type value) => - _Dart_NewWeakPersistentHandle_DL.value = value; + late final _Dart_IsCompilationErrorPtr = + _lookup>( + 'Dart_IsCompilationError'); + late final _Dart_IsCompilationError = + _Dart_IsCompilationErrorPtr.asFunction(); - late final ffi.Pointer - _Dart_DeleteWeakPersistentHandle_DL = - _lookup( - 'Dart_DeleteWeakPersistentHandle_DL'); + /// Is this a fatal error handle? + /// + /// Fatal error handles are produced when the system wants to shut down + /// the current isolate. + /// + /// Requires there to be a current isolate. + bool Dart_IsFatalError( + Object handle, + ) { + return _Dart_IsFatalError( + handle, + ); + } - Dart_DeleteWeakPersistentHandle_Type get Dart_DeleteWeakPersistentHandle_DL => - _Dart_DeleteWeakPersistentHandle_DL.value; + late final _Dart_IsFatalErrorPtr = + _lookup>( + 'Dart_IsFatalError'); + late final _Dart_IsFatalError = + _Dart_IsFatalErrorPtr.asFunction(); - set Dart_DeleteWeakPersistentHandle_DL( - Dart_DeleteWeakPersistentHandle_Type value) => - _Dart_DeleteWeakPersistentHandle_DL.value = value; + /// Gets the error message from an error handle. + /// + /// Requires there to be a current isolate. + /// + /// \return A C string containing an error message if the handle is + /// error. An empty C string ("") if the handle is valid. This C + /// String is scope allocated and is only valid until the next call + /// to Dart_ExitScope. + ffi.Pointer Dart_GetError( + Object handle, + ) { + return _Dart_GetError( + handle, + ); + } - late final ffi.Pointer - _Dart_UpdateExternalSize_DL = - _lookup('Dart_UpdateExternalSize_DL'); + late final _Dart_GetErrorPtr = + _lookup Function(ffi.Handle)>>( + 'Dart_GetError'); + late final _Dart_GetError = + _Dart_GetErrorPtr.asFunction Function(Object)>(); - Dart_UpdateExternalSize_Type get Dart_UpdateExternalSize_DL => - _Dart_UpdateExternalSize_DL.value; + /// Is this an error handle for an unhandled exception? + bool Dart_ErrorHasException( + Object handle, + ) { + return _Dart_ErrorHasException( + handle, + ); + } - set Dart_UpdateExternalSize_DL(Dart_UpdateExternalSize_Type value) => - _Dart_UpdateExternalSize_DL.value = value; + late final _Dart_ErrorHasExceptionPtr = + _lookup>( + 'Dart_ErrorHasException'); + late final _Dart_ErrorHasException = + _Dart_ErrorHasExceptionPtr.asFunction(); - late final ffi.Pointer - _Dart_NewFinalizableHandle_DL = - _lookup('Dart_NewFinalizableHandle_DL'); + /// Gets the exception Object from an unhandled exception error handle. + Object Dart_ErrorGetException( + Object handle, + ) { + return _Dart_ErrorGetException( + handle, + ); + } - Dart_NewFinalizableHandle_Type get Dart_NewFinalizableHandle_DL => - _Dart_NewFinalizableHandle_DL.value; + late final _Dart_ErrorGetExceptionPtr = + _lookup>( + 'Dart_ErrorGetException'); + late final _Dart_ErrorGetException = + _Dart_ErrorGetExceptionPtr.asFunction(); - set Dart_NewFinalizableHandle_DL(Dart_NewFinalizableHandle_Type value) => - _Dart_NewFinalizableHandle_DL.value = value; + /// Gets the stack trace Object from an unhandled exception error handle. + Object Dart_ErrorGetStackTrace( + Object handle, + ) { + return _Dart_ErrorGetStackTrace( + handle, + ); + } - late final ffi.Pointer - _Dart_DeleteFinalizableHandle_DL = - _lookup( - 'Dart_DeleteFinalizableHandle_DL'); + late final _Dart_ErrorGetStackTracePtr = + _lookup>( + 'Dart_ErrorGetStackTrace'); + late final _Dart_ErrorGetStackTrace = + _Dart_ErrorGetStackTracePtr.asFunction(); - Dart_DeleteFinalizableHandle_Type get Dart_DeleteFinalizableHandle_DL => - _Dart_DeleteFinalizableHandle_DL.value; + /// Produces an api error handle with the provided error message. + /// + /// Requires there to be a current isolate. + /// + /// \param error the error message. + Object Dart_NewApiError( + ffi.Pointer error, + ) { + return _Dart_NewApiError( + error, + ); + } - set Dart_DeleteFinalizableHandle_DL( - Dart_DeleteFinalizableHandle_Type value) => - _Dart_DeleteFinalizableHandle_DL.value = value; + late final _Dart_NewApiErrorPtr = + _lookup)>>( + 'Dart_NewApiError'); + late final _Dart_NewApiError = + _Dart_NewApiErrorPtr.asFunction)>(); - late final ffi.Pointer - _Dart_UpdateFinalizableExternalSize_DL = - _lookup( - 'Dart_UpdateFinalizableExternalSize_DL'); + Object Dart_NewCompilationError( + ffi.Pointer error, + ) { + return _Dart_NewCompilationError( + error, + ); + } - Dart_UpdateFinalizableExternalSize_Type - get Dart_UpdateFinalizableExternalSize_DL => - _Dart_UpdateFinalizableExternalSize_DL.value; + late final _Dart_NewCompilationErrorPtr = + _lookup)>>( + 'Dart_NewCompilationError'); + late final _Dart_NewCompilationError = _Dart_NewCompilationErrorPtr + .asFunction)>(); - set Dart_UpdateFinalizableExternalSize_DL( - Dart_UpdateFinalizableExternalSize_Type value) => - _Dart_UpdateFinalizableExternalSize_DL.value = value; + /// Produces a new unhandled exception error handle. + /// + /// Requires there to be a current isolate. + /// + /// \param exception An instance of a Dart object to be thrown or + /// an ApiError or CompilationError handle. + /// When an ApiError or CompilationError handle is passed in + /// a string object of the error message is created and it becomes + /// the Dart object to be thrown. + Object Dart_NewUnhandledExceptionError( + Object exception, + ) { + return _Dart_NewUnhandledExceptionError( + exception, + ); + } - late final ffi.Pointer _Dart_Post_DL = - _lookup('Dart_Post_DL'); + late final _Dart_NewUnhandledExceptionErrorPtr = + _lookup>( + 'Dart_NewUnhandledExceptionError'); + late final _Dart_NewUnhandledExceptionError = + _Dart_NewUnhandledExceptionErrorPtr.asFunction(); - Dart_Post_Type get Dart_Post_DL => _Dart_Post_DL.value; + /// Propagates an error. + /// + /// If the provided handle is an unhandled exception error, this + /// function will cause the unhandled exception to be rethrown. This + /// will proceed in the standard way, walking up Dart frames until an + /// appropriate 'catch' block is found, executing 'finally' blocks, + /// etc. + /// + /// If the error is not an unhandled exception error, we will unwind + /// the stack to the next C frame. Intervening Dart frames will be + /// discarded; specifically, 'finally' blocks will not execute. This + /// is the standard way that compilation errors (and the like) are + /// handled by the Dart runtime. + /// + /// In either case, when an error is propagated any current scopes + /// created by Dart_EnterScope will be exited. + /// + /// See the additional discussion under "Propagating Errors" at the + /// beginning of this file. + /// + /// \param An error handle (See Dart_IsError) + /// + /// \return On success, this function does not return. On failure, the + /// process is terminated. + void Dart_PropagateError( + Object handle, + ) { + return _Dart_PropagateError( + handle, + ); + } - set Dart_Post_DL(Dart_Post_Type value) => _Dart_Post_DL.value = value; + late final _Dart_PropagateErrorPtr = + _lookup>( + 'Dart_PropagateError'); + late final _Dart_PropagateError = + _Dart_PropagateErrorPtr.asFunction(); - late final ffi.Pointer _Dart_NewSendPort_DL = - _lookup('Dart_NewSendPort_DL'); + /// Converts an object to a string. + /// + /// May generate an unhandled exception error. + /// + /// \return The converted string if no error occurs during + /// the conversion. If an error does occur, an error handle is + /// returned. + Object Dart_ToString( + Object object, + ) { + return _Dart_ToString( + object, + ); + } - Dart_NewSendPort_Type get Dart_NewSendPort_DL => _Dart_NewSendPort_DL.value; + late final _Dart_ToStringPtr = + _lookup>( + 'Dart_ToString'); + late final _Dart_ToString = + _Dart_ToStringPtr.asFunction(); - set Dart_NewSendPort_DL(Dart_NewSendPort_Type value) => - _Dart_NewSendPort_DL.value = value; + /// Checks to see if two handles refer to identically equal objects. + /// + /// If both handles refer to instances, this is equivalent to using the top-level + /// function identical() from dart:core. Otherwise, returns whether the two + /// argument handles refer to the same object. + /// + /// \param obj1 An object to be compared. + /// \param obj2 An object to be compared. + /// + /// \return True if the objects are identically equal. False otherwise. + bool Dart_IdentityEquals( + Object obj1, + Object obj2, + ) { + return _Dart_IdentityEquals( + obj1, + obj2, + ); + } - late final ffi.Pointer _Dart_SendPortGetId_DL = - _lookup('Dart_SendPortGetId_DL'); + late final _Dart_IdentityEqualsPtr = + _lookup>( + 'Dart_IdentityEquals'); + late final _Dart_IdentityEquals = + _Dart_IdentityEqualsPtr.asFunction(); - Dart_SendPortGetId_Type get Dart_SendPortGetId_DL => - _Dart_SendPortGetId_DL.value; + /// Allocates a handle in the current scope from a persistent handle. + Object Dart_HandleFromPersistent( + Object object, + ) { + return _Dart_HandleFromPersistent( + object, + ); + } - set Dart_SendPortGetId_DL(Dart_SendPortGetId_Type value) => - _Dart_SendPortGetId_DL.value = value; + late final _Dart_HandleFromPersistentPtr = + _lookup>( + 'Dart_HandleFromPersistent'); + late final _Dart_HandleFromPersistent = + _Dart_HandleFromPersistentPtr.asFunction(); - late final ffi.Pointer _Dart_EnterScope_DL = - _lookup('Dart_EnterScope_DL'); + /// Allocates a handle in the current scope from a weak persistent handle. + /// + /// This will be a handle to Dart_Null if the object has been garbage collected. + Object Dart_HandleFromWeakPersistent( + Dart_WeakPersistentHandle object, + ) { + return _Dart_HandleFromWeakPersistent( + object, + ); + } - Dart_EnterScope_Type get Dart_EnterScope_DL => _Dart_EnterScope_DL.value; + late final _Dart_HandleFromWeakPersistentPtr = _lookup< + ffi.NativeFunction>( + 'Dart_HandleFromWeakPersistent'); + late final _Dart_HandleFromWeakPersistent = _Dart_HandleFromWeakPersistentPtr + .asFunction(); - set Dart_EnterScope_DL(Dart_EnterScope_Type value) => - _Dart_EnterScope_DL.value = value; + /// Allocates a persistent handle for an object. + /// + /// This handle has the lifetime of the current isolate unless it is + /// explicitly deallocated by calling Dart_DeletePersistentHandle. + /// + /// Requires there to be a current isolate. + Object Dart_NewPersistentHandle( + Object object, + ) { + return _Dart_NewPersistentHandle( + object, + ); + } - late final ffi.Pointer _Dart_ExitScope_DL = - _lookup('Dart_ExitScope_DL'); + late final _Dart_NewPersistentHandlePtr = + _lookup>( + 'Dart_NewPersistentHandle'); + late final _Dart_NewPersistentHandle = + _Dart_NewPersistentHandlePtr.asFunction(); - Dart_ExitScope_Type get Dart_ExitScope_DL => _Dart_ExitScope_DL.value; + /// Assign value of local handle to a persistent handle. + /// + /// Requires there to be a current isolate. + /// + /// \param obj1 A persistent handle whose value needs to be set. + /// \param obj2 An object whose value needs to be set to the persistent handle. + /// + /// \return Success if the persistent handle was set + /// Otherwise, returns an error. + void Dart_SetPersistentHandle( + Object obj1, + Object obj2, + ) { + return _Dart_SetPersistentHandle( + obj1, + obj2, + ); + } - set Dart_ExitScope_DL(Dart_ExitScope_Type value) => - _Dart_ExitScope_DL.value = value; + late final _Dart_SetPersistentHandlePtr = + _lookup>( + 'Dart_SetPersistentHandle'); + late final _Dart_SetPersistentHandle = + _Dart_SetPersistentHandlePtr.asFunction(); - late final _class_CUPHTTPTaskConfiguration1 = - _getClass1("CUPHTTPTaskConfiguration"); - late final _sel_initWithPort_1 = _registerName1("initWithPort:"); - ffi.Pointer _objc_msgSend_470( - ffi.Pointer obj, - ffi.Pointer sel, - int sendPort, + /// Deallocates a persistent handle. + /// + /// Requires there to be a current isolate group. + void Dart_DeletePersistentHandle( + Object object, ) { - return __objc_msgSend_470( - obj, - sel, - sendPort, + return _Dart_DeletePersistentHandle( + object, ); } - late final __objc_msgSend_470Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, Dart_Port)>>('objc_msgSend'); - late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _Dart_DeletePersistentHandlePtr = + _lookup>( + 'Dart_DeletePersistentHandle'); + late final _Dart_DeletePersistentHandle = + _Dart_DeletePersistentHandlePtr.asFunction(); - late final _sel_sendPort1 = _registerName1("sendPort"); - late final _class_CUPHTTPClientDelegate1 = - _getClass1("CUPHTTPClientDelegate"); - late final _sel_registerTask_withConfiguration_1 = - _registerName1("registerTask:withConfiguration:"); - void _objc_msgSend_471( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer config, + /// Allocates a weak persistent handle for an object. + /// + /// This handle has the lifetime of the current isolate. The handle can also be + /// explicitly deallocated by calling Dart_DeleteWeakPersistentHandle. + /// + /// If the object becomes unreachable the callback is invoked with the peer as + /// argument. The callback can be executed on any thread, will have a current + /// isolate group, but will not have a current isolate. The callback can only + /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. This + /// gives the embedder the ability to cleanup data associated with the object. + /// The handle will point to the Dart_Null object after the finalizer has been + /// run. It is illegal to call into the VM with any other Dart_* functions from + /// the callback. If the handle is deleted before the object becomes + /// unreachable, the callback is never invoked. + /// + /// Requires there to be a current isolate. + /// + /// \param object An object with identity. + /// \param peer A pointer to a native object or NULL. This value is + /// provided to callback when it is invoked. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A function pointer that will be invoked sometime + /// after the object is garbage collected, unless the handle has been deleted. + /// A valid callback needs to be specified it cannot be NULL. + /// + /// \return The weak persistent handle or NULL. NULL is returned in case of bad + /// parameters. + Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle( + Object object, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, ) { - return __objc_msgSend_471( - obj, - sel, - task, - config, + return _Dart_NewWeakPersistentHandle( + object, + peer, + external_allocation_size, + callback, ); } - late final __objc_msgSend_471Ptr = _lookup< + late final _Dart_NewWeakPersistentHandlePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + Dart_WeakPersistentHandle Function( + ffi.Handle, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewWeakPersistentHandle'); + late final _Dart_NewWeakPersistentHandle = + _Dart_NewWeakPersistentHandlePtr.asFunction< + Dart_WeakPersistentHandle Function( + Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); - late final _class_CUPHTTPForwardedDelegate1 = - _getClass1("CUPHTTPForwardedDelegate"); - late final _sel_initWithSession_task_1 = - _registerName1("initWithSession:task:"); - ffi.Pointer _objc_msgSend_472( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, + /// Deletes the given weak persistent [object] handle. + /// + /// Requires there to be a current isolate group. + void Dart_DeleteWeakPersistentHandle( + Dart_WeakPersistentHandle object, ) { - return __objc_msgSend_472( - obj, - sel, - session, - task, + return _Dart_DeleteWeakPersistentHandle( + object, ); } - late final __objc_msgSend_472Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _Dart_DeleteWeakPersistentHandlePtr = + _lookup>( + 'Dart_DeleteWeakPersistentHandle'); + late final _Dart_DeleteWeakPersistentHandle = + _Dart_DeleteWeakPersistentHandlePtr.asFunction< + void Function(Dart_WeakPersistentHandle)>(); - late final _sel_finish1 = _registerName1("finish"); - late final _sel_session1 = _registerName1("session"); - late final _sel_task1 = _registerName1("task"); - ffi.Pointer _objc_msgSend_473( - ffi.Pointer obj, - ffi.Pointer sel, + /// Updates the external memory size for the given weak persistent handle. + /// + /// May trigger garbage collection. + void Dart_UpdateExternalSize( + Dart_WeakPersistentHandle object, + int external_allocation_size, ) { - return __objc_msgSend_473( - obj, - sel, + return _Dart_UpdateExternalSize( + object, + external_allocation_size, ); } - late final __objc_msgSend_473Ptr = _lookup< + late final _Dart_UpdateExternalSizePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(Dart_WeakPersistentHandle, + ffi.IntPtr)>>('Dart_UpdateExternalSize'); + late final _Dart_UpdateExternalSize = _Dart_UpdateExternalSizePtr.asFunction< + void Function(Dart_WeakPersistentHandle, int)>(); - late final _class_NSLock1 = _getClass1("NSLock"); - late final _sel_lock1 = _registerName1("lock"); - ffi.Pointer _objc_msgSend_474( - ffi.Pointer obj, - ffi.Pointer sel, + /// Allocates a finalizable handle for an object. + /// + /// This handle has the lifetime of the current isolate group unless the object + /// pointed to by the handle is garbage collected, in this case the VM + /// automatically deletes the handle after invoking the callback associated + /// with the handle. The handle can also be explicitly deallocated by + /// calling Dart_DeleteFinalizableHandle. + /// + /// If the object becomes unreachable the callback is invoked with the + /// the peer as argument. The callback can be executed on any thread, will have + /// an isolate group, but will not have a current isolate. The callback can only + /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. + /// This gives the embedder the ability to cleanup data associated with the + /// object and clear out any cached references to the handle. All references to + /// this handle after the callback will be invalid. It is illegal to call into + /// the VM with any other Dart_* functions from the callback. If the handle is + /// deleted before the object becomes unreachable, the callback is never + /// invoked. + /// + /// Requires there to be a current isolate. + /// + /// \param object An object with identity. + /// \param peer A pointer to a native object or NULL. This value is + /// provided to callback when it is invoked. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A function pointer that will be invoked sometime + /// after the object is garbage collected, unless the handle has been deleted. + /// A valid callback needs to be specified it cannot be NULL. + /// + /// \return The finalizable handle or NULL. NULL is returned in case of bad + /// parameters. + Dart_FinalizableHandle Dart_NewFinalizableHandle( + Object object, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, ) { - return __objc_msgSend_474( - obj, - sel, + return _Dart_NewFinalizableHandle( + object, + peer, + external_allocation_size, + callback, ); } - late final __objc_msgSend_474Ptr = _lookup< + late final _Dart_NewFinalizableHandlePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, + ffi.IntPtr, Dart_HandleFinalizer)>>('Dart_NewFinalizableHandle'); + late final _Dart_NewFinalizableHandle = + _Dart_NewFinalizableHandlePtr.asFunction< + Dart_FinalizableHandle Function( + Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); - late final _class_CUPHTTPForwardedRedirect1 = - _getClass1("CUPHTTPForwardedRedirect"); - late final _sel_initWithSession_task_response_request_1 = - _registerName1("initWithSession:task:response:request:"); - ffi.Pointer _objc_msgSend_475( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer response, - ffi.Pointer request, + /// Deletes the given finalizable [object] handle. + /// + /// The caller has to provide the actual Dart object the handle was created from + /// to prove the object (and therefore the finalizable handle) is still alive. + /// + /// Requires there to be a current isolate. + void Dart_DeleteFinalizableHandle( + Dart_FinalizableHandle object, + Object strong_ref_to_object, ) { - return __objc_msgSend_475( - obj, - sel, - session, - task, - response, - request, + return _Dart_DeleteFinalizableHandle( + object, + strong_ref_to_object, ); } - late final __objc_msgSend_475Ptr = _lookup< + late final _Dart_DeleteFinalizableHandlePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(Dart_FinalizableHandle, + ffi.Handle)>>('Dart_DeleteFinalizableHandle'); + late final _Dart_DeleteFinalizableHandle = _Dart_DeleteFinalizableHandlePtr + .asFunction(); - late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); - void _objc_msgSend_476( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + /// Updates the external memory size for the given finalizable handle. + /// + /// The caller has to provide the actual Dart object the handle was created from + /// to prove the object (and therefore the finalizable handle) is still alive. + /// + /// May trigger garbage collection. + void Dart_UpdateFinalizableExternalSize( + Dart_FinalizableHandle object, + Object strong_ref_to_object, + int external_allocation_size, ) { - return __objc_msgSend_476( - obj, - sel, - request, + return _Dart_UpdateFinalizableExternalSize( + object, + strong_ref_to_object, + external_allocation_size, ); } - late final __objc_msgSend_476Ptr = _lookup< + late final _Dart_UpdateFinalizableExternalSizePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, + ffi.IntPtr)>>('Dart_UpdateFinalizableExternalSize'); + late final _Dart_UpdateFinalizableExternalSize = + _Dart_UpdateFinalizableExternalSizePtr.asFunction< + void Function(Dart_FinalizableHandle, Object, int)>(); - ffi.Pointer _objc_msgSend_477( - ffi.Pointer obj, - ffi.Pointer sel, + /// Gets the version string for the Dart VM. + /// + /// The version of the Dart VM can be accessed without initializing the VM. + /// + /// \return The version string for the embedded Dart VM. + ffi.Pointer Dart_VersionString() { + return _Dart_VersionString(); + } + + late final _Dart_VersionStringPtr = + _lookup Function()>>( + 'Dart_VersionString'); + late final _Dart_VersionString = + _Dart_VersionStringPtr.asFunction Function()>(); + + /// Initialize Dart_IsolateFlags with correct version and default values. + void Dart_IsolateFlagsInitialize( + ffi.Pointer flags, ) { - return __objc_msgSend_477( - obj, - sel, + return _Dart_IsolateFlagsInitialize( + flags, ); } - late final __objc_msgSend_477Ptr = _lookup< + late final _Dart_IsolateFlagsInitializePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer)>>('Dart_IsolateFlagsInitialize'); + late final _Dart_IsolateFlagsInitialize = _Dart_IsolateFlagsInitializePtr + .asFunction)>(); - late final _sel_redirectRequest1 = _registerName1("redirectRequest"); - late final _class_CUPHTTPForwardedResponse1 = - _getClass1("CUPHTTPForwardedResponse"); - late final _sel_initWithSession_task_response_1 = - _registerName1("initWithSession:task:response:"); - ffi.Pointer _objc_msgSend_478( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer response, + /// Initializes the VM. + /// + /// \param params A struct containing initialization information. The version + /// field of the struct must be DART_INITIALIZE_PARAMS_CURRENT_VERSION. + /// + /// \return NULL if initialization is successful. Returns an error message + /// otherwise. The caller is responsible for freeing the error message. + ffi.Pointer Dart_Initialize( + ffi.Pointer params, ) { - return __objc_msgSend_478( - obj, - sel, - session, - task, - response, + return _Dart_Initialize( + params, ); } - late final __objc_msgSend_478Ptr = _lookup< + late final _Dart_InitializePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('Dart_Initialize'); + late final _Dart_Initialize = _Dart_InitializePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); + + /// Cleanup state in the VM before process termination. + /// + /// \return NULL if cleanup is successful. Returns an error message otherwise. + /// The caller is responsible for freeing the error message. + /// + /// NOTE: This function must not be called on a thread that was created by the VM + /// itself. + ffi.Pointer Dart_Cleanup() { + return _Dart_Cleanup(); + } - late final _sel_finishWithDisposition_1 = - _registerName1("finishWithDisposition:"); - void _objc_msgSend_479( - ffi.Pointer obj, - ffi.Pointer sel, - int disposition, + late final _Dart_CleanupPtr = + _lookup Function()>>( + 'Dart_Cleanup'); + late final _Dart_Cleanup = + _Dart_CleanupPtr.asFunction Function()>(); + + /// Sets command line flags. Should be called before Dart_Initialize. + /// + /// \param argc The length of the arguments array. + /// \param argv An array of arguments. + /// + /// \return NULL if successful. Returns an error message otherwise. + /// The caller is responsible for freeing the error message. + /// + /// NOTE: This call does not store references to the passed in c-strings. + ffi.Pointer Dart_SetVMFlags( + int argc, + ffi.Pointer> argv, ) { - return __objc_msgSend_479( - obj, - sel, - disposition, + return _Dart_SetVMFlags( + argc, + argv, ); } - late final __objc_msgSend_479Ptr = _lookup< + late final _Dart_SetVMFlagsPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Int, ffi.Pointer>)>>('Dart_SetVMFlags'); + late final _Dart_SetVMFlags = _Dart_SetVMFlagsPtr.asFunction< + ffi.Pointer Function( + int, ffi.Pointer>)>(); - late final _sel_disposition1 = _registerName1("disposition"); - int _objc_msgSend_480( - ffi.Pointer obj, - ffi.Pointer sel, + /// Returns true if the named VM flag is of boolean type, specified, and set to + /// true. + /// + /// \param flag_name The name of the flag without leading punctuation + /// (example: "enable_asserts"). + bool Dart_IsVMFlagSet( + ffi.Pointer flag_name, ) { - return __objc_msgSend_480( - obj, - sel, + return _Dart_IsVMFlagSet( + flag_name, ); } - late final __objc_msgSend_480Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _Dart_IsVMFlagSetPtr = + _lookup)>>( + 'Dart_IsVMFlagSet'); + late final _Dart_IsVMFlagSet = + _Dart_IsVMFlagSetPtr.asFunction)>(); - late final _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); - late final _sel_initWithSession_task_data_1 = - _registerName1("initWithSession:task:data:"); - ffi.Pointer _objc_msgSend_481( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer data, + /// Creates a new isolate. The new isolate becomes the current isolate. + /// + /// A snapshot can be used to restore the VM quickly to a saved state + /// and is useful for fast startup. If snapshot data is provided, the + /// isolate will be started using that snapshot data. Requires a core snapshot or + /// an app snapshot created by Dart_CreateSnapshot or + /// Dart_CreatePrecompiledSnapshot* from a VM with the same version. + /// + /// Requires there to be no current isolate. + /// + /// \param script_uri The main source file or snapshot this isolate will load. + /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child + /// isolate is created by Isolate.spawn. The embedder should use a URI that + /// allows it to load the same program into such a child isolate. + /// \param name A short name for the isolate to improve debugging messages. + /// Typically of the format 'foo.dart:main()'. + /// \param isolate_snapshot_data + /// \param isolate_snapshot_instructions Buffers containing a snapshot of the + /// isolate or NULL if no snapshot is provided. If provided, the buffers must + /// remain valid until the isolate shuts down. + /// \param flags Pointer to VM specific flags or NULL for default flags. + /// \param isolate_group_data Embedder group data. This data can be obtained + /// by calling Dart_IsolateGroupData and will be passed to the + /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and + /// Dart_IsolateGroupCleanupCallback. + /// \param isolate_data Embedder data. This data will be passed to + /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from + /// this parent isolate. + /// \param error Returns NULL if creation is successful, an error message + /// otherwise. The caller is responsible for calling free() on the error + /// message. + /// + /// \return The new isolate on success, or NULL if isolate creation failed. + Dart_Isolate Dart_CreateIsolateGroup( + ffi.Pointer script_uri, + ffi.Pointer name, + ffi.Pointer isolate_snapshot_data, + ffi.Pointer isolate_snapshot_instructions, + ffi.Pointer flags, + ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data, + ffi.Pointer> error, ) { - return __objc_msgSend_481( - obj, - sel, - session, - task, - data, + return _Dart_CreateIsolateGroup( + script_uri, + name, + isolate_snapshot_data, + isolate_snapshot_instructions, + flags, + isolate_group_data, + isolate_data, + error, ); } - late final __objc_msgSend_481Ptr = _lookup< + late final _Dart_CreateIsolateGroupPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('Dart_CreateIsolateGroup'); + late final _Dart_CreateIsolateGroup = _Dart_CreateIsolateGroupPtr.asFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _class_CUPHTTPForwardedComplete1 = - _getClass1("CUPHTTPForwardedComplete"); - late final _sel_initWithSession_task_error_1 = - _registerName1("initWithSession:task:error:"); - ffi.Pointer _objc_msgSend_482( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer error, + /// Creates a new isolate inside the isolate group of [group_member]. + /// + /// Requires there to be no current isolate. + /// + /// \param group_member An isolate from the same group into which the newly created + /// isolate should be born into. Other threads may not have entered / enter this + /// member isolate. + /// \param name A short name for the isolate for debugging purposes. + /// \param shutdown_callback A callback to be called when the isolate is being + /// shutdown (may be NULL). + /// \param cleanup_callback A callback to be called when the isolate is being + /// cleaned up (may be NULL). + /// \param isolate_data The embedder-specific data associated with this isolate. + /// \param error Set to NULL if creation is successful, set to an error + /// message otherwise. The caller is responsible for calling free() on the + /// error message. + /// + /// \return The newly created isolate on success, or NULL if isolate creation + /// failed. + /// + /// If successful, the newly created isolate will become the current isolate. + Dart_Isolate Dart_CreateIsolateInGroup( + Dart_Isolate group_member, + ffi.Pointer name, + Dart_IsolateShutdownCallback shutdown_callback, + Dart_IsolateCleanupCallback cleanup_callback, + ffi.Pointer child_isolate_data, + ffi.Pointer> error, ) { - return __objc_msgSend_482( - obj, - sel, - session, - task, + return _Dart_CreateIsolateInGroup( + group_member, + name, + shutdown_callback, + cleanup_callback, + child_isolate_data, error, ); } - late final __objc_msgSend_482Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _Dart_CreateIsolateInGroupPtr = _lookup< + ffi.NativeFunction< + Dart_Isolate Function( + Dart_Isolate, + ffi.Pointer, + Dart_IsolateShutdownCallback, + Dart_IsolateCleanupCallback, + ffi.Pointer, + ffi.Pointer>)>>( + 'Dart_CreateIsolateInGroup'); + late final _Dart_CreateIsolateInGroup = + _Dart_CreateIsolateInGroupPtr.asFunction< + Dart_Isolate Function( + Dart_Isolate, + ffi.Pointer, + Dart_IsolateShutdownCallback, + Dart_IsolateCleanupCallback, + ffi.Pointer, + ffi.Pointer>)>(); - late final _class_CUPHTTPForwardedFinishedDownloading1 = - _getClass1("CUPHTTPForwardedFinishedDownloading"); - late final _sel_initWithSession_downloadTask_url_1 = - _registerName1("initWithSession:downloadTask:url:"); - ffi.Pointer _objc_msgSend_483( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer downloadTask, - ffi.Pointer location, + /// Creates a new isolate from a Dart Kernel file. The new isolate + /// becomes the current isolate. + /// + /// Requires there to be no current isolate. + /// + /// \param script_uri The main source file or snapshot this isolate will load. + /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child + /// isolate is created by Isolate.spawn. The embedder should use a URI that + /// allows it to load the same program into such a child isolate. + /// \param name A short name for the isolate to improve debugging messages. + /// Typically of the format 'foo.dart:main()'. + /// \param kernel_buffer + /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must + /// remain valid until isolate shutdown. + /// \param flags Pointer to VM specific flags or NULL for default flags. + /// \param isolate_group_data Embedder group data. This data can be obtained + /// by calling Dart_IsolateGroupData and will be passed to the + /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and + /// Dart_IsolateGroupCleanupCallback. + /// \param isolate_data Embedder data. This data will be passed to + /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from + /// this parent isolate. + /// \param error Returns NULL if creation is successful, an error message + /// otherwise. The caller is responsible for calling free() on the error + /// message. + /// + /// \return The new isolate on success, or NULL if isolate creation failed. + Dart_Isolate Dart_CreateIsolateGroupFromKernel( + ffi.Pointer script_uri, + ffi.Pointer name, + ffi.Pointer kernel_buffer, + int kernel_buffer_size, + ffi.Pointer flags, + ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data, + ffi.Pointer> error, ) { - return __objc_msgSend_483( - obj, - sel, - session, - downloadTask, - location, + return _Dart_CreateIsolateGroupFromKernel( + script_uri, + name, + kernel_buffer, + kernel_buffer_size, + flags, + isolate_group_data, + isolate_data, + error, ); } - late final __objc_msgSend_483Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_location1 = _registerName1("location"); -} - -class __mbstate_t extends ffi.Union { - @ffi.Array.multi([128]) - external ffi.Array __mbstate8; - - @ffi.LongLong() - external int _mbstateL; -} - -class __darwin_pthread_handler_rec extends ffi.Struct { - external ffi - .Pointer)>> - __routine; - - external ffi.Pointer __arg; - - external ffi.Pointer<__darwin_pthread_handler_rec> __next; -} - -class _opaque_pthread_attr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([56]) - external ffi.Array __opaque; -} - -class _opaque_pthread_cond_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([40]) - external ffi.Array __opaque; -} - -class _opaque_pthread_condattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} - -class _opaque_pthread_mutex_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([56]) - external ffi.Array __opaque; -} - -class _opaque_pthread_mutexattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} - -class _opaque_pthread_once_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} - -class _opaque_pthread_rwlock_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([192]) - external ffi.Array __opaque; -} + late final _Dart_CreateIsolateGroupFromKernelPtr = _lookup< + ffi.NativeFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>( + 'Dart_CreateIsolateGroupFromKernel'); + late final _Dart_CreateIsolateGroupFromKernel = + _Dart_CreateIsolateGroupFromKernelPtr.asFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); -class _opaque_pthread_rwlockattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; + /// Shuts down the current isolate. After this call, the current isolate is NULL. + /// Any current scopes created by Dart_EnterScope will be exited. Invokes the + /// shutdown callback and any callbacks of remaining weak persistent handles. + /// + /// Requires there to be a current isolate. + void Dart_ShutdownIsolate() { + return _Dart_ShutdownIsolate(); + } - @ffi.Array.multi([16]) - external ffi.Array __opaque; -} + late final _Dart_ShutdownIsolatePtr = + _lookup>('Dart_ShutdownIsolate'); + late final _Dart_ShutdownIsolate = + _Dart_ShutdownIsolatePtr.asFunction(); -class _opaque_pthread_t extends ffi.Struct { - @ffi.Long() - external int __sig; + /// Returns the current isolate. Will return NULL if there is no + /// current isolate. + Dart_Isolate Dart_CurrentIsolate() { + return _Dart_CurrentIsolate(); + } - external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; + late final _Dart_CurrentIsolatePtr = + _lookup>( + 'Dart_CurrentIsolate'); + late final _Dart_CurrentIsolate = + _Dart_CurrentIsolatePtr.asFunction(); - @ffi.Array.multi([8176]) - external ffi.Array __opaque; -} + /// Returns the callback data associated with the current isolate. This + /// data was set when the isolate got created or initialized. + ffi.Pointer Dart_CurrentIsolateData() { + return _Dart_CurrentIsolateData(); + } -@ffi.Packed(1) -class _OSUnalignedU16 extends ffi.Struct { - @ffi.Uint16() - external int __val; -} + late final _Dart_CurrentIsolateDataPtr = + _lookup Function()>>( + 'Dart_CurrentIsolateData'); + late final _Dart_CurrentIsolateData = _Dart_CurrentIsolateDataPtr.asFunction< + ffi.Pointer Function()>(); -@ffi.Packed(1) -class _OSUnalignedU32 extends ffi.Struct { - @ffi.Uint32() - external int __val; -} + /// Returns the callback data associated with the given isolate. This + /// data was set when the isolate got created or initialized. + ffi.Pointer Dart_IsolateData( + Dart_Isolate isolate, + ) { + return _Dart_IsolateData( + isolate, + ); + } -@ffi.Packed(1) -class _OSUnalignedU64 extends ffi.Struct { - @ffi.Uint64() - external int __val; -} + late final _Dart_IsolateDataPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateData'); + late final _Dart_IsolateData = _Dart_IsolateDataPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); -class fd_set extends ffi.Struct { - @ffi.Array.multi([32]) - external ffi.Array<__int32_t> fds_bits; -} + /// Returns the current isolate group. Will return NULL if there is no + /// current isolate group. + Dart_IsolateGroup Dart_CurrentIsolateGroup() { + return _Dart_CurrentIsolateGroup(); + } -typedef __int32_t = ffi.Int; + late final _Dart_CurrentIsolateGroupPtr = + _lookup>( + 'Dart_CurrentIsolateGroup'); + late final _Dart_CurrentIsolateGroup = + _Dart_CurrentIsolateGroupPtr.asFunction(); -class objc_class extends ffi.Opaque {} + /// Returns the callback data associated with the current isolate group. This + /// data was passed to the isolate group when it was created. + ffi.Pointer Dart_CurrentIsolateGroupData() { + return _Dart_CurrentIsolateGroupData(); + } -class objc_object extends ffi.Struct { - external ffi.Pointer isa; -} + late final _Dart_CurrentIsolateGroupDataPtr = + _lookup Function()>>( + 'Dart_CurrentIsolateGroupData'); + late final _Dart_CurrentIsolateGroupData = _Dart_CurrentIsolateGroupDataPtr + .asFunction Function()>(); -class ObjCObject extends ffi.Opaque {} + /// Returns the callback data associated with the specified isolate group. This + /// data was passed to the isolate when it was created. + /// The embedder is responsible for ensuring the consistency of this data + /// with respect to the lifecycle of an isolate group. + ffi.Pointer Dart_IsolateGroupData( + Dart_Isolate isolate, + ) { + return _Dart_IsolateGroupData( + isolate, + ); + } -class objc_selector extends ffi.Opaque {} + late final _Dart_IsolateGroupDataPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateGroupData'); + late final _Dart_IsolateGroupData = _Dart_IsolateGroupDataPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); -class ObjCSel extends ffi.Opaque {} + /// Returns the debugging name for the current isolate. + /// + /// This name is unique to each isolate and should only be used to make + /// debugging messages more comprehensible. + Object Dart_DebugName() { + return _Dart_DebugName(); + } -typedef objc_objectptr_t = ffi.Pointer; + late final _Dart_DebugNamePtr = + _lookup>('Dart_DebugName'); + late final _Dart_DebugName = + _Dart_DebugNamePtr.asFunction(); -class _NSZone extends ffi.Opaque {} + /// Returns the ID for an isolate which is used to query the service protocol. + /// + /// It is the responsibility of the caller to free the returned ID. + ffi.Pointer Dart_IsolateServiceId( + Dart_Isolate isolate, + ) { + return _Dart_IsolateServiceId( + isolate, + ); + } -class _ObjCWrapper implements ffi.Finalizable { - final ffi.Pointer _id; - final NativeCupertinoHttp _lib; - bool _pendingRelease; + late final _Dart_IsolateServiceIdPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateServiceId'); + late final _Dart_IsolateServiceId = _Dart_IsolateServiceIdPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); - _ObjCWrapper._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._objc_retain(_id.cast()); - } - if (release) { - _lib._objc_releaseFinalizer2.attach(this, _id.cast(), detach: this); - } + /// Enters an isolate. After calling this function, + /// the current isolate will be set to the provided isolate. + /// + /// Requires there to be no current isolate. Multiple threads may not be in + /// the same isolate at once. + void Dart_EnterIsolate( + Dart_Isolate isolate, + ) { + return _Dart_EnterIsolate( + isolate, + ); } - /// Releases the reference to the underlying ObjC object held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._objc_release(_id.cast()); - _lib._objc_releaseFinalizer2.detach(this); - } else { - throw StateError( - 'Released an ObjC object that was unowned or already released.'); - } - } + late final _Dart_EnterIsolatePtr = + _lookup>( + 'Dart_EnterIsolate'); + late final _Dart_EnterIsolate = + _Dart_EnterIsolatePtr.asFunction(); - @override - bool operator ==(Object other) { - return other is _ObjCWrapper && _id == other._id; + /// Kills the given isolate. + /// + /// This function has the same effect as dart:isolate's + /// Isolate.kill(priority:immediate). + /// It can interrupt ordinary Dart code but not native code. If the isolate is + /// in the middle of a long running native function, the isolate will not be + /// killed until control returns to Dart. + /// + /// Does not require a current isolate. It is safe to kill the current isolate if + /// there is one. + void Dart_KillIsolate( + Dart_Isolate isolate, + ) { + return _Dart_KillIsolate( + isolate, + ); } - @override - int get hashCode => _id.hashCode; -} - -class NSObject extends _ObjCWrapper { - NSObject._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final _Dart_KillIsolatePtr = + _lookup>( + 'Dart_KillIsolate'); + late final _Dart_KillIsolate = + _Dart_KillIsolatePtr.asFunction(); - /// Returns a [NSObject] that points to the same underlying object as [other]. - static NSObject castFrom(T other) { - return NSObject._(other._id, other._lib, retain: true, release: true); + /// Notifies the VM that the embedder expects |size| bytes of memory have become + /// unreachable. The VM may use this hint to adjust the garbage collector's + /// growth policy. + /// + /// Multiple calls are interpreted as increasing, not replacing, the estimate of + /// unreachable memory. + /// + /// Requires there to be a current isolate. + void Dart_HintFreed( + int size, + ) { + return _Dart_HintFreed( + size, + ); } - /// Returns a [NSObject] that wraps the given raw object pointer. - static NSObject castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSObject._(other, lib, retain: retain, release: release); - } + late final _Dart_HintFreedPtr = + _lookup>( + 'Dart_HintFreed'); + late final _Dart_HintFreed = + _Dart_HintFreedPtr.asFunction(); - /// Returns whether [obj] is an instance of [NSObject]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); + /// Notifies the VM that the embedder expects to be idle until |deadline|. The VM + /// may use this time to perform garbage collection or other tasks to avoid + /// delays during execution of Dart code in the future. + /// + /// |deadline| is measured in microseconds against the system's monotonic time. + /// This clock can be accessed via Dart_TimelineGetMicros(). + /// + /// Requires there to be a current isolate. + void Dart_NotifyIdle( + int deadline, + ) { + return _Dart_NotifyIdle( + deadline, + ); } - static void load(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); - } + late final _Dart_NotifyIdlePtr = + _lookup>( + 'Dart_NotifyIdle'); + late final _Dart_NotifyIdle = + _Dart_NotifyIdlePtr.asFunction(); - static void initialize(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); + /// Notifies the VM that the system is running low on memory. + /// + /// Does not require a current isolate. Only valid after calling Dart_Initialize. + void Dart_NotifyLowMemory() { + return _Dart_NotifyLowMemory(); } - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NotifyLowMemoryPtr = + _lookup>('Dart_NotifyLowMemory'); + late final _Dart_NotifyLowMemory = + _Dart_NotifyLowMemoryPtr.asFunction(); - static NSObject new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); - return NSObject._(_ret, _lib, retain: false, release: true); + /// Starts the CPU sampling profiler. + void Dart_StartProfiling() { + return _Dart_StartProfiling(); } - static NSObject allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } + late final _Dart_StartProfilingPtr = + _lookup>('Dart_StartProfiling'); + late final _Dart_StartProfiling = + _Dart_StartProfilingPtr.asFunction(); - static NSObject alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); + /// Stops the CPU sampling profiler. + /// + /// Note that some profile samples might still be taken after this fucntion + /// returns due to the asynchronous nature of the implementation on some + /// platforms. + void Dart_StopProfiling() { + return _Dart_StopProfiling(); } - void dealloc() { - return _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); - } + late final _Dart_StopProfilingPtr = + _lookup>('Dart_StopProfiling'); + late final _Dart_StopProfiling = + _Dart_StopProfilingPtr.asFunction(); - void finalize() { - return _lib._objc_msgSend_1(_id, _lib._sel_finalize1); + /// Notifies the VM that the current thread should not be profiled until a + /// matching call to Dart_ThreadEnableProfiling is made. + /// + /// NOTE: By default, if a thread has entered an isolate it will be profiled. + /// This function should be used when an embedder knows a thread is about + /// to make a blocking call and wants to avoid unnecessary interrupts by + /// the profiler. + void Dart_ThreadDisableProfiling() { + return _Dart_ThreadDisableProfiling(); } - NSObject copy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); - return NSObject._(_ret, _lib, retain: false, release: true); - } + late final _Dart_ThreadDisableProfilingPtr = + _lookup>( + 'Dart_ThreadDisableProfiling'); + late final _Dart_ThreadDisableProfiling = + _Dart_ThreadDisableProfilingPtr.asFunction(); - NSObject mutableCopy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); - return NSObject._(_ret, _lib, retain: false, release: true); + /// Notifies the VM that the current thread should be profiled. + /// + /// NOTE: It is only legal to call this function *after* calling + /// Dart_ThreadDisableProfiling. + /// + /// NOTE: By default, if a thread has entered an isolate it will be profiled. + void Dart_ThreadEnableProfiling() { + return _Dart_ThreadEnableProfiling(); } - static NSObject copyWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } + late final _Dart_ThreadEnableProfilingPtr = + _lookup>( + 'Dart_ThreadEnableProfiling'); + late final _Dart_ThreadEnableProfiling = + _Dart_ThreadEnableProfilingPtr.asFunction(); - static NSObject mutableCopyWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); + /// Register symbol information for the Dart VM's profiler and crash dumps. + /// + /// This consumes the output of //topaz/runtime/dart/profiler_symbols, which + /// should be treated as opaque. + void Dart_AddSymbols( + ffi.Pointer dso_name, + ffi.Pointer buffer, + int buffer_size, + ) { + return _Dart_AddSymbols( + dso_name, + buffer, + buffer_size, + ); } - static bool instancesRespondToSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4(_lib._class_NSObject1, - _lib._sel_instancesRespondToSelector_1, aSelector); - } + late final _Dart_AddSymbolsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.IntPtr)>>('Dart_AddSymbols'); + late final _Dart_AddSymbols = _Dart_AddSymbolsPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - static bool conformsToProtocol_( - NativeCupertinoHttp _lib, Protocol? protocol) { - return _lib._objc_msgSend_5(_lib._class_NSObject1, - _lib._sel_conformsToProtocol_1, protocol?._id ?? ffi.nullptr); + /// Exits an isolate. After this call, Dart_CurrentIsolate will + /// return NULL. + /// + /// Requires there to be a current isolate. + void Dart_ExitIsolate() { + return _Dart_ExitIsolate(); } - IMP methodForSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); - } + late final _Dart_ExitIsolatePtr = + _lookup>('Dart_ExitIsolate'); + late final _Dart_ExitIsolate = + _Dart_ExitIsolatePtr.asFunction(); - static IMP instanceMethodForSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_lib._class_NSObject1, - _lib._sel_instanceMethodForSelector_1, aSelector); + /// Creates a full snapshot of the current isolate heap. + /// + /// A full snapshot is a compact representation of the dart vm isolate heap + /// and dart isolate heap states. These snapshots are used to initialize + /// the vm isolate on startup and fast initialization of an isolate. + /// A Snapshot of the heap is created before any dart code has executed. + /// + /// Requires there to be a current isolate. Not available in the precompiled + /// runtime (check Dart_IsPrecompiledRuntime). + /// + /// \param buffer Returns a pointer to a buffer containing the + /// snapshot. This buffer is scope allocated and is only valid + /// until the next call to Dart_ExitScope. + /// \param size Returns the size of the buffer. + /// \param is_core Create a snapshot containing core libraries. + /// Such snapshot should be agnostic to null safety mode. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateSnapshot( + ffi.Pointer> vm_snapshot_data_buffer, + ffi.Pointer vm_snapshot_data_size, + ffi.Pointer> isolate_snapshot_data_buffer, + ffi.Pointer isolate_snapshot_data_size, + bool is_core, + ) { + return _Dart_CreateSnapshot( + vm_snapshot_data_buffer, + vm_snapshot_data_size, + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + is_core, + ); } - void doesNotRecognizeSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_7( - _id, _lib._sel_doesNotRecognizeSelector_1, aSelector); - } + late final _Dart_CreateSnapshotPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Bool)>>('Dart_CreateSnapshot'); + late final _Dart_CreateSnapshot = _Dart_CreateSnapshotPtr.asFunction< + Object Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + bool)>(); - NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_8( - _id, _lib._sel_forwardingTargetForSelector_1, aSelector); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns whether the buffer contains a kernel file. + /// + /// \param buffer Pointer to a buffer that might contain a kernel binary. + /// \param buffer_size Size of the buffer. + /// + /// \return Whether the buffer contains a kernel binary (full or partial). + bool Dart_IsKernel( + ffi.Pointer buffer, + int buffer_size, + ) { + return _Dart_IsKernel( + buffer, + buffer_size, + ); } - void forwardInvocation_(NSInvocation? anInvocation) { - return _lib._objc_msgSend_9( - _id, _lib._sel_forwardInvocation_1, anInvocation?._id ?? ffi.nullptr); - } + late final _Dart_IsKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_IsKernel'); + late final _Dart_IsKernel = _Dart_IsKernelPtr.asFunction< + bool Function(ffi.Pointer, int)>(); - NSMethodSignature methodSignatureForSelector_( - ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_10( - _id, _lib._sel_methodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); + /// Make isolate runnable. + /// + /// When isolates are spawned, this function is used to indicate that + /// the creation and initialization (including script loading) of the + /// isolate is complete and the isolate can start. + /// This function expects there to be no current isolate. + /// + /// \param isolate The isolate to be made runnable. + /// + /// \return NULL if successful. Returns an error message otherwise. The caller + /// is responsible for freeing the error message. + ffi.Pointer Dart_IsolateMakeRunnable( + Dart_Isolate isolate, + ) { + return _Dart_IsolateMakeRunnable( + isolate, + ); } - static NSMethodSignature instanceMethodSignatureForSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_10(_lib._class_NSObject1, - _lib._sel_instanceMethodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IsolateMakeRunnablePtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateMakeRunnable'); + late final _Dart_IsolateMakeRunnable = _Dart_IsolateMakeRunnablePtr + .asFunction Function(Dart_Isolate)>(); - bool allowsWeakReference() { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsWeakReference1); + /// Allows embedders to provide an alternative wakeup mechanism for the + /// delivery of inter-isolate messages. This setting only applies to + /// the current isolate. + /// + /// Most embedders will only call this function once, before isolate + /// execution begins. If this function is called after isolate + /// execution begins, the embedder is responsible for threading issues. + void Dart_SetMessageNotifyCallback( + Dart_MessageNotifyCallback message_notify_callback, + ) { + return _Dart_SetMessageNotifyCallback( + message_notify_callback, + ); } - bool retainWeakReference() { - return _lib._objc_msgSend_11(_id, _lib._sel_retainWeakReference1); + late final _Dart_SetMessageNotifyCallbackPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetMessageNotifyCallback'); + late final _Dart_SetMessageNotifyCallback = _Dart_SetMessageNotifyCallbackPtr + .asFunction(); + + /// Query the current message notify callback for the isolate. + /// + /// \return The current message notify callback for the isolate. + Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback() { + return _Dart_GetMessageNotifyCallback(); } - static bool isSubclassOfClass_(NativeCupertinoHttp _lib, NSObject aClass) { - return _lib._objc_msgSend_0( - _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); + late final _Dart_GetMessageNotifyCallbackPtr = + _lookup>( + 'Dart_GetMessageNotifyCallback'); + late final _Dart_GetMessageNotifyCallback = _Dart_GetMessageNotifyCallbackPtr + .asFunction(); + + /// If the VM flag `--pause-isolates-on-start` was passed this will be true. + /// + /// \return A boolean value indicating if pause on start was requested. + bool Dart_ShouldPauseOnStart() { + return _Dart_ShouldPauseOnStart(); } - static bool resolveClassMethod_( - NativeCupertinoHttp _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); + late final _Dart_ShouldPauseOnStartPtr = + _lookup>( + 'Dart_ShouldPauseOnStart'); + late final _Dart_ShouldPauseOnStart = + _Dart_ShouldPauseOnStartPtr.asFunction(); + + /// Override the VM flag `--pause-isolates-on-start` for the current isolate. + /// + /// \param should_pause Should the isolate be paused on start? + /// + /// NOTE: This must be called before Dart_IsolateMakeRunnable. + void Dart_SetShouldPauseOnStart( + bool should_pause, + ) { + return _Dart_SetShouldPauseOnStart( + should_pause, + ); } - static bool resolveInstanceMethod_( - NativeCupertinoHttp _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); + late final _Dart_SetShouldPauseOnStartPtr = + _lookup>( + 'Dart_SetShouldPauseOnStart'); + late final _Dart_SetShouldPauseOnStart = + _Dart_SetShouldPauseOnStartPtr.asFunction(); + + /// Is the current isolate paused on start? + /// + /// \return A boolean value indicating if the isolate is paused on start. + bool Dart_IsPausedOnStart() { + return _Dart_IsPausedOnStart(); } - static int hash(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); - } + late final _Dart_IsPausedOnStartPtr = + _lookup>('Dart_IsPausedOnStart'); + late final _Dart_IsPausedOnStart = + _Dart_IsPausedOnStartPtr.asFunction(); - static NSObject superclass(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Called when the embedder has paused the current isolate on start and when + /// the embedder has resumed the isolate. + /// + /// \param paused Is the isolate paused on start? + void Dart_SetPausedOnStart( + bool paused, + ) { + return _Dart_SetPausedOnStart( + paused, + ); } - static NSObject class1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final _Dart_SetPausedOnStartPtr = + _lookup>( + 'Dart_SetPausedOnStart'); + late final _Dart_SetPausedOnStart = + _Dart_SetPausedOnStartPtr.asFunction(); - static NSString description(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_32(_lib._class_NSObject1, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); + /// If the VM flag `--pause-isolates-on-exit` was passed this will be true. + /// + /// \return A boolean value indicating if pause on exit was requested. + bool Dart_ShouldPauseOnExit() { + return _Dart_ShouldPauseOnExit(); } - static NSString debugDescription(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_32( - _lib._class_NSObject1, _lib._sel_debugDescription1); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_ShouldPauseOnExitPtr = + _lookup>( + 'Dart_ShouldPauseOnExit'); + late final _Dart_ShouldPauseOnExit = + _Dart_ShouldPauseOnExitPtr.asFunction(); - static int version(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_81(_lib._class_NSObject1, _lib._sel_version1); + /// Override the VM flag `--pause-isolates-on-exit` for the current isolate. + /// + /// \param should_pause Should the isolate be paused on exit? + void Dart_SetShouldPauseOnExit( + bool should_pause, + ) { + return _Dart_SetShouldPauseOnExit( + should_pause, + ); } - static void setVersion_(NativeCupertinoHttp _lib, int aVersion) { - return _lib._objc_msgSend_275( - _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); - } + late final _Dart_SetShouldPauseOnExitPtr = + _lookup>( + 'Dart_SetShouldPauseOnExit'); + late final _Dart_SetShouldPauseOnExit = + _Dart_SetShouldPauseOnExitPtr.asFunction(); - NSObject get classForCoder { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Is the current isolate paused on exit? + /// + /// \return A boolean value indicating if the isolate is paused on exit. + bool Dart_IsPausedOnExit() { + return _Dart_IsPausedOnExit(); } - NSObject replacementObjectForCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_replacementObjectForCoder_1, coder?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IsPausedOnExitPtr = + _lookup>('Dart_IsPausedOnExit'); + late final _Dart_IsPausedOnExit = + _Dart_IsPausedOnExitPtr.asFunction(); - NSObject awakeAfterUsingCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_awakeAfterUsingCoder_1, coder?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: false, release: true); + /// Called when the embedder has paused the current isolate on exit and when + /// the embedder has resumed the isolate. + /// + /// \param paused Is the isolate paused on exit? + void Dart_SetPausedOnExit( + bool paused, + ) { + return _Dart_SetPausedOnExit( + paused, + ); } - static void poseAsClass_(NativeCupertinoHttp _lib, NSObject aClass) { - return _lib._objc_msgSend_200( - _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); - } + late final _Dart_SetPausedOnExitPtr = + _lookup>( + 'Dart_SetPausedOnExit'); + late final _Dart_SetPausedOnExit = + _Dart_SetPausedOnExitPtr.asFunction(); - NSObject get autoContentAccessingProxy { - final _ret = - _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Called when the embedder has caught a top level unhandled exception error + /// in the current isolate. + /// + /// NOTE: It is illegal to call this twice on the same isolate without first + /// clearing the sticky error to null. + /// + /// \param error The unhandled exception error. + void Dart_SetStickyError( + Object error, + ) { + return _Dart_SetStickyError( + error, + ); } - void URL_resourceDataDidBecomeAvailable_(NSURL? sender, NSData? newBytes) { - return _lib._objc_msgSend_276( - _id, - _lib._sel_URL_resourceDataDidBecomeAvailable_1, - sender?._id ?? ffi.nullptr, - newBytes?._id ?? ffi.nullptr); - } + late final _Dart_SetStickyErrorPtr = + _lookup>( + 'Dart_SetStickyError'); + late final _Dart_SetStickyError = + _Dart_SetStickyErrorPtr.asFunction(); - void URLResourceDidFinishLoading_(NSURL? sender) { - return _lib._objc_msgSend_277(_id, _lib._sel_URLResourceDidFinishLoading_1, - sender?._id ?? ffi.nullptr); + /// Does the current isolate have a sticky error? + bool Dart_HasStickyError() { + return _Dart_HasStickyError(); } - void URLResourceDidCancelLoading_(NSURL? sender) { - return _lib._objc_msgSend_277(_id, _lib._sel_URLResourceDidCancelLoading_1, - sender?._id ?? ffi.nullptr); - } + late final _Dart_HasStickyErrorPtr = + _lookup>('Dart_HasStickyError'); + late final _Dart_HasStickyError = + _Dart_HasStickyErrorPtr.asFunction(); - void URL_resourceDidFailLoadingWithReason_(NSURL? sender, NSString? reason) { - return _lib._objc_msgSend_278( - _id, - _lib._sel_URL_resourceDidFailLoadingWithReason_1, - sender?._id ?? ffi.nullptr, - reason?._id ?? ffi.nullptr); + /// Gets the sticky error for the current isolate. + /// + /// \return A handle to the sticky error object or null. + Object Dart_GetStickyError() { + return _Dart_GetStickyError(); } - /// Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: + late final _Dart_GetStickyErrorPtr = + _lookup>('Dart_GetStickyError'); + late final _Dart_GetStickyError = + _Dart_GetStickyErrorPtr.asFunction(); + + /// Handles the next pending message for the current isolate. /// - /// - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; + /// May generate an unhandled exception error. /// - /// The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. - void - attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( - NSError? error, - int recoveryOptionIndex, - NSObject delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo) { - return _lib._objc_msgSend_279( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, - error?._id ?? ffi.nullptr, - recoveryOptionIndex, - delegate._id, - didRecoverSelector, - contextInfo); - } - - /// Given that an error alert has been presented applicaton-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and return YES if error recovery was completely successful, NO otherwise. The recovery option index is an index into the error's array of localized recovery options. - bool attemptRecoveryFromError_optionIndex_( - NSError? error, int recoveryOptionIndex) { - return _lib._objc_msgSend_280( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_1, - error?._id ?? ffi.nullptr, - recoveryOptionIndex); + /// \return A valid handle if no error occurs during the operation. + Object Dart_HandleMessage() { + return _Dart_HandleMessage(); } -} - -typedef instancetype = ffi.Pointer; -class Protocol extends _ObjCWrapper { - Protocol._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final _Dart_HandleMessagePtr = + _lookup>('Dart_HandleMessage'); + late final _Dart_HandleMessage = + _Dart_HandleMessagePtr.asFunction(); - /// Returns a [Protocol] that points to the same underlying object as [other]. - static Protocol castFrom(T other) { - return Protocol._(other._id, other._lib, retain: true, release: true); + /// Drains the microtask queue, then blocks the calling thread until the current + /// isolate recieves a message, then handles all messages. + /// + /// \param timeout_millis When non-zero, the call returns after the indicated + /// number of milliseconds even if no message was received. + /// \return A valid handle if no error occurs, otherwise an error handle. + Object Dart_WaitForEvent( + int timeout_millis, + ) { + return _Dart_WaitForEvent( + timeout_millis, + ); } - /// Returns a [Protocol] that wraps the given raw object pointer. - static Protocol castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return Protocol._(other, lib, retain: retain, release: release); - } + late final _Dart_WaitForEventPtr = + _lookup>( + 'Dart_WaitForEvent'); + late final _Dart_WaitForEvent = + _Dart_WaitForEventPtr.asFunction(); - /// Returns whether [obj] is an instance of [Protocol]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); + /// Handles any pending messages for the vm service for the current + /// isolate. + /// + /// This function may be used by an embedder at a breakpoint to avoid + /// pausing the vm service. + /// + /// This function can indirectly cause the message notify callback to + /// be called. + /// + /// \return true if the vm service requests the program resume + /// execution, false otherwise + bool Dart_HandleServiceMessages() { + return _Dart_HandleServiceMessages(); } -} - -typedef IMP = ffi.Pointer>; -class NSInvocation extends _ObjCWrapper { - NSInvocation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final _Dart_HandleServiceMessagesPtr = + _lookup>( + 'Dart_HandleServiceMessages'); + late final _Dart_HandleServiceMessages = + _Dart_HandleServiceMessagesPtr.asFunction(); - /// Returns a [NSInvocation] that points to the same underlying object as [other]. - static NSInvocation castFrom(T other) { - return NSInvocation._(other._id, other._lib, retain: true, release: true); + /// Does the current isolate have pending service messages? + /// + /// \return true if the isolate has pending service messages, false otherwise. + bool Dart_HasServiceMessages() { + return _Dart_HasServiceMessages(); } - /// Returns a [NSInvocation] that wraps the given raw object pointer. - static NSInvocation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInvocation._(other, lib, retain: retain, release: release); - } + late final _Dart_HasServiceMessagesPtr = + _lookup>( + 'Dart_HasServiceMessages'); + late final _Dart_HasServiceMessages = + _Dart_HasServiceMessagesPtr.asFunction(); - /// Returns whether [obj] is an instance of [NSInvocation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInvocation1); + /// Processes any incoming messages for the current isolate. + /// + /// This function may only be used when the embedder has not provided + /// an alternate message delivery mechanism with + /// Dart_SetMessageCallbacks. It is provided for convenience. + /// + /// This function waits for incoming messages for the current + /// isolate. As new messages arrive, they are handled using + /// Dart_HandleMessage. The routine exits when all ports to the + /// current isolate are closed. + /// + /// \return A valid handle if the run loop exited successfully. If an + /// exception or other error occurs while processing messages, an + /// error handle is returned. + Object Dart_RunLoop() { + return _Dart_RunLoop(); } -} -class NSMethodSignature extends _ObjCWrapper { - NSMethodSignature._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final _Dart_RunLoopPtr = + _lookup>('Dart_RunLoop'); + late final _Dart_RunLoop = _Dart_RunLoopPtr.asFunction(); - /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. - static NSMethodSignature castFrom(T other) { - return NSMethodSignature._(other._id, other._lib, - retain: true, release: true); + /// Lets the VM run message processing for the isolate. + /// + /// This function expects there to a current isolate and the current isolate + /// must not have an active api scope. The VM will take care of making the + /// isolate runnable (if not already), handles its message loop and will take + /// care of shutting the isolate down once it's done. + /// + /// \param errors_are_fatal Whether uncaught errors should be fatal. + /// \param on_error_port A port to notify on uncaught errors (or ILLEGAL_PORT). + /// \param on_exit_port A port to notify on exit (or ILLEGAL_PORT). + /// \param error A non-NULL pointer which will hold an error message if the call + /// fails. The error has to be free()ed by the caller. + /// + /// \return If successfull the VM takes owernship of the isolate and takes care + /// of its message loop. If not successful the caller retains owernship of the + /// isolate. + bool Dart_RunLoopAsync( + bool errors_are_fatal, + int on_error_port, + int on_exit_port, + ffi.Pointer> error, + ) { + return _Dart_RunLoopAsync( + errors_are_fatal, + on_error_port, + on_exit_port, + error, + ); } - /// Returns a [NSMethodSignature] that wraps the given raw object pointer. - static NSMethodSignature castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMethodSignature._(other, lib, retain: retain, release: release); - } + late final _Dart_RunLoopAsyncPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Bool, Dart_Port, Dart_Port, + ffi.Pointer>)>>('Dart_RunLoopAsync'); + late final _Dart_RunLoopAsync = _Dart_RunLoopAsyncPtr.asFunction< + bool Function(bool, int, int, ffi.Pointer>)>(); - /// Returns whether [obj] is an instance of [NSMethodSignature]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMethodSignature1); + /// Gets the main port id for the current isolate. + int Dart_GetMainPortId() { + return _Dart_GetMainPortId(); } -} - -typedef NSUInteger = ffi.UnsignedLong; -class NSString extends NSObject { - NSString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final _Dart_GetMainPortIdPtr = + _lookup>('Dart_GetMainPortId'); + late final _Dart_GetMainPortId = + _Dart_GetMainPortIdPtr.asFunction(); - /// Returns a [NSString] that points to the same underlying object as [other]. - static NSString castFrom(T other) { - return NSString._(other._id, other._lib, retain: true, release: true); + /// Does the current isolate have live ReceivePorts? + /// + /// A ReceivePort is live when it has not been closed. + bool Dart_HasLivePorts() { + return _Dart_HasLivePorts(); } - /// Returns a [NSString] that wraps the given raw object pointer. - static NSString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSString._(other, lib, retain: retain, release: release); - } + late final _Dart_HasLivePortsPtr = + _lookup>('Dart_HasLivePorts'); + late final _Dart_HasLivePorts = + _Dart_HasLivePortsPtr.asFunction(); - /// Returns whether [obj] is an instance of [NSString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); + /// Posts a message for some isolate. The message is a serialized + /// object. + /// + /// Requires there to be a current isolate. + /// + /// \param port The destination port. + /// \param object An object from the current isolate. + /// + /// \return True if the message was posted. + bool Dart_Post( + int port_id, + Object object, + ) { + return _Dart_Post( + port_id, + object, + ); } - factory NSString(NativeCupertinoHttp _lib, String str) { - final cstr = str.toNativeUtf16(); - final nsstr = stringWithCharacters_length_(_lib, cstr.cast(), str.length); - pkg_ffi.calloc.free(cstr); - return nsstr; - } + late final _Dart_PostPtr = + _lookup>( + 'Dart_Post'); + late final _Dart_Post = + _Dart_PostPtr.asFunction(); - @override - String toString() { - final data = - dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); - return data.bytes.cast().toDartString(length: length); + /// Returns a new SendPort with the provided port id. + /// + /// \param port_id The destination port. + /// + /// \return A new SendPort if no errors occurs. Otherwise returns + /// an error handle. + Object Dart_NewSendPort( + int port_id, + ) { + return _Dart_NewSendPort( + port_id, + ); } - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); - } + late final _Dart_NewSendPortPtr = + _lookup>( + 'Dart_NewSendPort'); + late final _Dart_NewSendPort = + _Dart_NewSendPortPtr.asFunction(); - int characterAtIndex_(int index) { - return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); + /// Gets the SendPort id for the provided SendPort. + /// \param port A SendPort object whose id is desired. + /// \param port_id Returns the id of the SendPort. + /// \return Success if no error occurs. Otherwise returns + /// an error handle. + Object Dart_SendPortGetId( + Object port, + ffi.Pointer port_id, + ) { + return _Dart_SendPortGetId( + port, + port_id, + ); } - @override - NSString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_SendPortGetIdPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_SendPortGetId'); + late final _Dart_SendPortGetId = _Dart_SendPortGetIdPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - NSString initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + /// Enters a new scope. + /// + /// All new local handles will be created in this scope. Additionally, + /// some functions may return "scope allocated" memory which is only + /// valid within this scope. + /// + /// Requires there to be a current isolate. + void Dart_EnterScope() { + return _Dart_EnterScope(); } - NSString substringFromIndex_(int from) { - final _ret = - _lib._objc_msgSend_15(_id, _lib._sel_substringFromIndex_1, from); - return NSString._(_ret, _lib, retain: true, release: true); + late final _Dart_EnterScopePtr = + _lookup>('Dart_EnterScope'); + late final _Dart_EnterScope = + _Dart_EnterScopePtr.asFunction(); + + /// Exits a scope. + /// + /// The previous scope (if any) becomes the current scope. + /// + /// Requires there to be a current isolate. + void Dart_ExitScope() { + return _Dart_ExitScope(); } - NSString substringToIndex_(int to) { - final _ret = _lib._objc_msgSend_15(_id, _lib._sel_substringToIndex_1, to); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_ExitScopePtr = + _lookup>('Dart_ExitScope'); + late final _Dart_ExitScope = _Dart_ExitScopePtr.asFunction(); - NSString substringWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_16(_id, _lib._sel_substringWithRange_1, range); - return NSString._(_ret, _lib, retain: true, release: true); + /// The Dart VM uses "zone allocation" for temporary structures. Zones + /// support very fast allocation of small chunks of memory. The chunks + /// cannot be deallocated individually, but instead zones support + /// deallocating all chunks in one fast operation. + /// + /// This function makes it possible for the embedder to allocate + /// temporary data in the VMs zone allocator. + /// + /// Zone allocation is possible: + /// 1. when inside a scope where local handles can be allocated + /// 2. when processing a message from a native port in a native port + /// handler + /// + /// All the memory allocated this way will be reclaimed either on the + /// next call to Dart_ExitScope or when the native port handler exits. + /// + /// \param size Size of the memory to allocate. + /// + /// \return A pointer to the allocated memory. NULL if allocation + /// failed. Failure might due to is no current VM zone. + ffi.Pointer Dart_ScopeAllocate( + int size, + ) { + return _Dart_ScopeAllocate( + size, + ); } - void getCharacters_range_(ffi.Pointer buffer, NSRange range) { - return _lib._objc_msgSend_17( - _id, _lib._sel_getCharacters_range_1, buffer, range); - } + late final _Dart_ScopeAllocatePtr = + _lookup Function(ffi.IntPtr)>>( + 'Dart_ScopeAllocate'); + late final _Dart_ScopeAllocate = + _Dart_ScopeAllocatePtr.asFunction Function(int)>(); - int compare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_compare_1, string?._id ?? ffi.nullptr); + /// Returns the null object. + /// + /// \return A handle to the null object. + Object Dart_Null() { + return _Dart_Null(); } - int compare_options_(NSString? string, int mask) { - return _lib._objc_msgSend_19( - _id, _lib._sel_compare_options_1, string?._id ?? ffi.nullptr, mask); - } + late final _Dart_NullPtr = + _lookup>('Dart_Null'); + late final _Dart_Null = _Dart_NullPtr.asFunction(); - int compare_options_range_( - NSString? string, int mask, NSRange rangeOfReceiverToCompare) { - return _lib._objc_msgSend_20(_id, _lib._sel_compare_options_range_1, - string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare); + /// Is this object null? + bool Dart_IsNull( + Object object, + ) { + return _Dart_IsNull( + object, + ); } - int compare_options_range_locale_(NSString? string, int mask, - NSRange rangeOfReceiverToCompare, NSObject locale) { - return _lib._objc_msgSend_21(_id, _lib._sel_compare_options_range_locale_1, - string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare, locale._id); - } + late final _Dart_IsNullPtr = + _lookup>('Dart_IsNull'); + late final _Dart_IsNull = _Dart_IsNullPtr.asFunction(); - int caseInsensitiveCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_caseInsensitiveCompare_1, string?._id ?? ffi.nullptr); + /// Returns the empty string object. + /// + /// \return A handle to the empty string object. + Object Dart_EmptyString() { + return _Dart_EmptyString(); } - int localizedCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_localizedCompare_1, string?._id ?? ffi.nullptr); - } + late final _Dart_EmptyStringPtr = + _lookup>('Dart_EmptyString'); + late final _Dart_EmptyString = + _Dart_EmptyStringPtr.asFunction(); - int localizedCaseInsensitiveCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, - _lib._sel_localizedCaseInsensitiveCompare_1, - string?._id ?? ffi.nullptr); + /// Returns types that are not classes, and which therefore cannot be looked up + /// as library members by Dart_GetType. + /// + /// \return A handle to the dynamic, void or Never type. + Object Dart_TypeDynamic() { + return _Dart_TypeDynamic(); } - int localizedStandardCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_localizedStandardCompare_1, string?._id ?? ffi.nullptr); - } + late final _Dart_TypeDynamicPtr = + _lookup>('Dart_TypeDynamic'); + late final _Dart_TypeDynamic = + _Dart_TypeDynamicPtr.asFunction(); - bool isEqualToString_(NSString? aString) { - return _lib._objc_msgSend_22( - _id, _lib._sel_isEqualToString_1, aString?._id ?? ffi.nullptr); + Object Dart_TypeVoid() { + return _Dart_TypeVoid(); } - bool hasPrefix_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_hasPrefix_1, str?._id ?? ffi.nullptr); - } + late final _Dart_TypeVoidPtr = + _lookup>('Dart_TypeVoid'); + late final _Dart_TypeVoid = _Dart_TypeVoidPtr.asFunction(); - bool hasSuffix_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_hasSuffix_1, str?._id ?? ffi.nullptr); + Object Dart_TypeNever() { + return _Dart_TypeNever(); } - NSString commonPrefixWithString_options_(NSString? str, int mask) { - final _ret = _lib._objc_msgSend_23( - _id, - _lib._sel_commonPrefixWithString_options_1, - str?._id ?? ffi.nullptr, - mask); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_TypeNeverPtr = + _lookup>('Dart_TypeNever'); + late final _Dart_TypeNever = + _Dart_TypeNeverPtr.asFunction(); - bool containsString_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_containsString_1, str?._id ?? ffi.nullptr); + /// Checks if the two objects are equal. + /// + /// The result of the comparison is returned through the 'equal' + /// parameter. The return value itself is used to indicate success or + /// failure, not equality. + /// + /// May generate an unhandled exception error. + /// + /// \param obj1 An object to be compared. + /// \param obj2 An object to be compared. + /// \param equal Returns the result of the equality comparison. + /// + /// \return A valid handle if no error occurs during the comparison. + Object Dart_ObjectEquals( + Object obj1, + Object obj2, + ffi.Pointer equal, + ) { + return _Dart_ObjectEquals( + obj1, + obj2, + equal, + ); } - bool localizedCaseInsensitiveContainsString_(NSString? str) { - return _lib._objc_msgSend_22( - _id, - _lib._sel_localizedCaseInsensitiveContainsString_1, - str?._id ?? ffi.nullptr); - } + late final _Dart_ObjectEqualsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Pointer)>>('Dart_ObjectEquals'); + late final _Dart_ObjectEquals = _Dart_ObjectEqualsPtr.asFunction< + Object Function(Object, Object, ffi.Pointer)>(); - bool localizedStandardContainsString_(NSString? str) { - return _lib._objc_msgSend_22(_id, - _lib._sel_localizedStandardContainsString_1, str?._id ?? ffi.nullptr); + /// Is this object an instance of some type? + /// + /// The result of the test is returned through the 'instanceof' parameter. + /// The return value itself is used to indicate success or failure. + /// + /// \param object An object. + /// \param type A type. + /// \param instanceof Return true if 'object' is an instance of type 'type'. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_ObjectIsType( + Object object, + Object type, + ffi.Pointer instanceof, + ) { + return _Dart_ObjectIsType( + object, + type, + instanceof, + ); } - NSRange localizedStandardRangeOfString_(NSString? str) { - return _lib._objc_msgSend_24(_id, - _lib._sel_localizedStandardRangeOfString_1, str?._id ?? ffi.nullptr); - } + late final _Dart_ObjectIsTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Pointer)>>('Dart_ObjectIsType'); + late final _Dart_ObjectIsType = _Dart_ObjectIsTypePtr.asFunction< + Object Function(Object, Object, ffi.Pointer)>(); - NSRange rangeOfString_(NSString? searchString) { - return _lib._objc_msgSend_24( - _id, _lib._sel_rangeOfString_1, searchString?._id ?? ffi.nullptr); + /// Query object type. + /// + /// \param object Some Object. + /// + /// \return true if Object is of the specified type. + bool Dart_IsInstance( + Object object, + ) { + return _Dart_IsInstance( + object, + ); } - NSRange rangeOfString_options_(NSString? searchString, int mask) { - return _lib._objc_msgSend_25(_id, _lib._sel_rangeOfString_options_1, - searchString?._id ?? ffi.nullptr, mask); - } + late final _Dart_IsInstancePtr = + _lookup>( + 'Dart_IsInstance'); + late final _Dart_IsInstance = + _Dart_IsInstancePtr.asFunction(); - NSRange rangeOfString_options_range_( - NSString? searchString, int mask, NSRange rangeOfReceiverToSearch) { - return _lib._objc_msgSend_26(_id, _lib._sel_rangeOfString_options_range_1, - searchString?._id ?? ffi.nullptr, mask, rangeOfReceiverToSearch); + bool Dart_IsNumber( + Object object, + ) { + return _Dart_IsNumber( + object, + ); } - NSRange rangeOfString_options_range_locale_(NSString? searchString, int mask, - NSRange rangeOfReceiverToSearch, NSLocale? locale) { - return _lib._objc_msgSend_27( - _id, - _lib._sel_rangeOfString_options_range_locale_1, - searchString?._id ?? ffi.nullptr, - mask, - rangeOfReceiverToSearch, - locale?._id ?? ffi.nullptr); - } + late final _Dart_IsNumberPtr = + _lookup>( + 'Dart_IsNumber'); + late final _Dart_IsNumber = + _Dart_IsNumberPtr.asFunction(); - NSRange rangeOfCharacterFromSet_(NSCharacterSet? searchSet) { - return _lib._objc_msgSend_228(_id, _lib._sel_rangeOfCharacterFromSet_1, - searchSet?._id ?? ffi.nullptr); + bool Dart_IsInteger( + Object object, + ) { + return _Dart_IsInteger( + object, + ); } - NSRange rangeOfCharacterFromSet_options_( - NSCharacterSet? searchSet, int mask) { - return _lib._objc_msgSend_229( - _id, - _lib._sel_rangeOfCharacterFromSet_options_1, - searchSet?._id ?? ffi.nullptr, - mask); - } + late final _Dart_IsIntegerPtr = + _lookup>( + 'Dart_IsInteger'); + late final _Dart_IsInteger = + _Dart_IsIntegerPtr.asFunction(); - NSRange rangeOfCharacterFromSet_options_range_( - NSCharacterSet? searchSet, int mask, NSRange rangeOfReceiverToSearch) { - return _lib._objc_msgSend_230( - _id, - _lib._sel_rangeOfCharacterFromSet_options_range_1, - searchSet?._id ?? ffi.nullptr, - mask, - rangeOfReceiverToSearch); + bool Dart_IsDouble( + Object object, + ) { + return _Dart_IsDouble( + object, + ); } - NSRange rangeOfComposedCharacterSequenceAtIndex_(int index) { - return _lib._objc_msgSend_231( - _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); - } + late final _Dart_IsDoublePtr = + _lookup>( + 'Dart_IsDouble'); + late final _Dart_IsDouble = + _Dart_IsDoublePtr.asFunction(); - NSRange rangeOfComposedCharacterSequencesForRange_(NSRange range) { - return _lib._objc_msgSend_232( - _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); + bool Dart_IsBoolean( + Object object, + ) { + return _Dart_IsBoolean( + object, + ); } - NSString stringByAppendingString_(NSString? aString) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_stringByAppendingString_1, aString?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IsBooleanPtr = + _lookup>( + 'Dart_IsBoolean'); + late final _Dart_IsBoolean = + _Dart_IsBooleanPtr.asFunction(); - NSString stringByAppendingFormat_(NSString? format) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_stringByAppendingFormat_1, format?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + bool Dart_IsString( + Object object, + ) { + return _Dart_IsString( + object, + ); } - double get doubleValue { - return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); - } + late final _Dart_IsStringPtr = + _lookup>( + 'Dart_IsString'); + late final _Dart_IsString = + _Dart_IsStringPtr.asFunction(); - double get floatValue { - return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); + bool Dart_IsStringLatin1( + Object object, + ) { + return _Dart_IsStringLatin1( + object, + ); } - int get intValue { - return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); - } + late final _Dart_IsStringLatin1Ptr = + _lookup>( + 'Dart_IsStringLatin1'); + late final _Dart_IsStringLatin1 = + _Dart_IsStringLatin1Ptr.asFunction(); - int get integerValue { - return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); + bool Dart_IsExternalString( + Object object, + ) { + return _Dart_IsExternalString( + object, + ); } - int get longLongValue { - return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); - } + late final _Dart_IsExternalStringPtr = + _lookup>( + 'Dart_IsExternalString'); + late final _Dart_IsExternalString = + _Dart_IsExternalStringPtr.asFunction(); - bool get boolValue { - return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); + bool Dart_IsList( + Object object, + ) { + return _Dart_IsList( + object, + ); } - NSString? get uppercaseString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_uppercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IsListPtr = + _lookup>('Dart_IsList'); + late final _Dart_IsList = _Dart_IsListPtr.asFunction(); - NSString? get lowercaseString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lowercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool Dart_IsMap( + Object object, + ) { + return _Dart_IsMap( + object, + ); } - NSString? get capitalizedString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_capitalizedString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IsMapPtr = + _lookup>('Dart_IsMap'); + late final _Dart_IsMap = _Dart_IsMapPtr.asFunction(); - NSString? get localizedUppercaseString { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedUppercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool Dart_IsLibrary( + Object object, + ) { + return _Dart_IsLibrary( + object, + ); } - NSString? get localizedLowercaseString { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedLowercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IsLibraryPtr = + _lookup>( + 'Dart_IsLibrary'); + late final _Dart_IsLibrary = + _Dart_IsLibraryPtr.asFunction(); - NSString? get localizedCapitalizedString { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedCapitalizedString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool Dart_IsType( + Object handle, + ) { + return _Dart_IsType( + handle, + ); } - NSString uppercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_233( - _id, _lib._sel_uppercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IsTypePtr = + _lookup>('Dart_IsType'); + late final _Dart_IsType = _Dart_IsTypePtr.asFunction(); - NSString lowercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_233( - _id, _lib._sel_lowercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + bool Dart_IsFunction( + Object handle, + ) { + return _Dart_IsFunction( + handle, + ); } - NSString capitalizedStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_233(_id, - _lib._sel_capitalizedStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + late final _Dart_IsFunctionPtr = + _lookup>( + 'Dart_IsFunction'); + late final _Dart_IsFunction = + _Dart_IsFunctionPtr.asFunction(); + + bool Dart_IsVariable( + Object handle, + ) { + return _Dart_IsVariable( + handle, + ); } - void getLineStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - NSRange range) { - return _lib._objc_msgSend_234( - _id, - _lib._sel_getLineStart_end_contentsEnd_forRange_1, - startPtr, - lineEndPtr, - contentsEndPtr, - range); + late final _Dart_IsVariablePtr = + _lookup>( + 'Dart_IsVariable'); + late final _Dart_IsVariable = + _Dart_IsVariablePtr.asFunction(); + + bool Dart_IsTypeVariable( + Object handle, + ) { + return _Dart_IsTypeVariable( + handle, + ); } - NSRange lineRangeForRange_(NSRange range) { - return _lib._objc_msgSend_232(_id, _lib._sel_lineRangeForRange_1, range); + late final _Dart_IsTypeVariablePtr = + _lookup>( + 'Dart_IsTypeVariable'); + late final _Dart_IsTypeVariable = + _Dart_IsTypeVariablePtr.asFunction(); + + bool Dart_IsClosure( + Object object, + ) { + return _Dart_IsClosure( + object, + ); } - void getParagraphStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer parEndPtr, - ffi.Pointer contentsEndPtr, - NSRange range) { - return _lib._objc_msgSend_234( - _id, - _lib._sel_getParagraphStart_end_contentsEnd_forRange_1, - startPtr, - parEndPtr, - contentsEndPtr, - range); - } + late final _Dart_IsClosurePtr = + _lookup>( + 'Dart_IsClosure'); + late final _Dart_IsClosure = + _Dart_IsClosurePtr.asFunction(); - NSRange paragraphRangeForRange_(NSRange range) { - return _lib._objc_msgSend_232( - _id, _lib._sel_paragraphRangeForRange_1, range); + bool Dart_IsTypedData( + Object object, + ) { + return _Dart_IsTypedData( + object, + ); } - void enumerateSubstringsInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock13 block) { - return _lib._objc_msgSend_235( - _id, - _lib._sel_enumerateSubstringsInRange_options_usingBlock_1, - range, - opts, - block._id); - } + late final _Dart_IsTypedDataPtr = + _lookup>( + 'Dart_IsTypedData'); + late final _Dart_IsTypedData = + _Dart_IsTypedDataPtr.asFunction(); - void enumerateLinesUsingBlock_(ObjCBlock14 block) { - return _lib._objc_msgSend_236( - _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); + bool Dart_IsByteBuffer( + Object object, + ) { + return _Dart_IsByteBuffer( + object, + ); } - ffi.Pointer get UTF8String { - return _lib._objc_msgSend_53(_id, _lib._sel_UTF8String1); - } + late final _Dart_IsByteBufferPtr = + _lookup>( + 'Dart_IsByteBuffer'); + late final _Dart_IsByteBuffer = + _Dart_IsByteBufferPtr.asFunction(); - int get fastestEncoding { - return _lib._objc_msgSend_12(_id, _lib._sel_fastestEncoding1); + bool Dart_IsFuture( + Object object, + ) { + return _Dart_IsFuture( + object, + ); } - int get smallestEncoding { - return _lib._objc_msgSend_12(_id, _lib._sel_smallestEncoding1); - } + late final _Dart_IsFuturePtr = + _lookup>( + 'Dart_IsFuture'); + late final _Dart_IsFuture = + _Dart_IsFuturePtr.asFunction(); - NSData dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { - final _ret = _lib._objc_msgSend_237(_id, - _lib._sel_dataUsingEncoding_allowLossyConversion_1, encoding, lossy); - return NSData._(_ret, _lib, retain: true, release: true); + /// Gets the type of a Dart language object. + /// + /// \param instance Some Dart object. + /// + /// \return If no error occurs, the type is returned. Otherwise an + /// error handle is returned. + Object Dart_InstanceGetType( + Object instance, + ) { + return _Dart_InstanceGetType( + instance, + ); } - NSData dataUsingEncoding_(int encoding) { - final _ret = - _lib._objc_msgSend_238(_id, _lib._sel_dataUsingEncoding_1, encoding); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final _Dart_InstanceGetTypePtr = + _lookup>( + 'Dart_InstanceGetType'); + late final _Dart_InstanceGetType = + _Dart_InstanceGetTypePtr.asFunction(); - bool canBeConvertedToEncoding_(int encoding) { - return _lib._objc_msgSend_117( - _id, _lib._sel_canBeConvertedToEncoding_1, encoding); + /// Returns the name for the provided class type. + /// + /// \return A valid string handle if no error occurs during the + /// operation. + Object Dart_ClassName( + Object cls_type, + ) { + return _Dart_ClassName( + cls_type, + ); } - ffi.Pointer cStringUsingEncoding_(int encoding) { - return _lib._objc_msgSend_239( - _id, _lib._sel_cStringUsingEncoding_1, encoding); - } + late final _Dart_ClassNamePtr = + _lookup>( + 'Dart_ClassName'); + late final _Dart_ClassName = + _Dart_ClassNamePtr.asFunction(); - bool getCString_maxLength_encoding_( - ffi.Pointer buffer, int maxBufferCount, int encoding) { - return _lib._objc_msgSend_240( - _id, - _lib._sel_getCString_maxLength_encoding_1, - buffer, - maxBufferCount, - encoding); + /// Returns the name for the provided function or method. + /// + /// \return A valid string handle if no error occurs during the + /// operation. + Object Dart_FunctionName( + Object function, + ) { + return _Dart_FunctionName( + function, + ); } - bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, - NSRange range, - NSRangePointer leftover) { - return _lib._objc_msgSend_241( - _id, - _lib._sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover); - } + late final _Dart_FunctionNamePtr = + _lookup>( + 'Dart_FunctionName'); + late final _Dart_FunctionName = + _Dart_FunctionNamePtr.asFunction(); - int maximumLengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_114( - _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); + /// Returns a handle to the owner of a function. + /// + /// The owner of an instance method or a static method is its defining + /// class. The owner of a top-level function is its defining + /// library. The owner of the function of a non-implicit closure is the + /// function of the method or closure that defines the non-implicit + /// closure. + /// + /// \return A valid handle to the owner of the function, or an error + /// handle if the argument is not a valid handle to a function. + Object Dart_FunctionOwner( + Object function, + ) { + return _Dart_FunctionOwner( + function, + ); } - int lengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_114( - _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); - } + late final _Dart_FunctionOwnerPtr = + _lookup>( + 'Dart_FunctionOwner'); + late final _Dart_FunctionOwner = + _Dart_FunctionOwnerPtr.asFunction(); - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSString1, _lib._sel_availableStringEncodings1); + /// Determines whether a function handle referes to a static function + /// of method. + /// + /// For the purposes of the embedding API, a top-level function is + /// implicitly declared static. + /// + /// \param function A handle to a function or method declaration. + /// \param is_static Returns whether the function or method is declared static. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_FunctionIsStatic( + Object function, + ffi.Pointer is_static, + ) { + return _Dart_FunctionIsStatic( + function, + is_static, + ); } - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_FunctionIsStaticPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_FunctionIsStatic'); + late final _Dart_FunctionIsStatic = _Dart_FunctionIsStaticPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); + /// Is this object a closure resulting from a tear-off (closurized method)? + /// + /// Returns true for closures produced when an ordinary method is accessed + /// through a getter call. Returns false otherwise, in particular for closures + /// produced from local function declarations. + /// + /// \param object Some Object. + /// + /// \return true if Object is a tear-off. + bool Dart_IsTearOff( + Object object, + ) { + return _Dart_IsTearOff( + object, + ); } - NSString? get decomposedStringWithCanonicalMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_decomposedStringWithCanonicalMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IsTearOffPtr = + _lookup>( + 'Dart_IsTearOff'); + late final _Dart_IsTearOff = + _Dart_IsTearOffPtr.asFunction(); - NSString? get precomposedStringWithCanonicalMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_precomposedStringWithCanonicalMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Retrieves the function of a closure. + /// + /// \return A handle to the function of the closure, or an error handle if the + /// argument is not a closure. + Object Dart_ClosureFunction( + Object closure, + ) { + return _Dart_ClosureFunction( + closure, + ); } - NSString? get decomposedStringWithCompatibilityMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_decomposedStringWithCompatibilityMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_ClosureFunctionPtr = + _lookup>( + 'Dart_ClosureFunction'); + late final _Dart_ClosureFunction = + _Dart_ClosureFunctionPtr.asFunction(); - NSString? get precomposedStringWithCompatibilityMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_precomposedStringWithCompatibilityMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Returns a handle to the library which contains class. + /// + /// \return A valid handle to the library with owns class, null if the class + /// has no library or an error handle if the argument is not a valid handle + /// to a class type. + Object Dart_ClassLibrary( + Object cls_type, + ) { + return _Dart_ClassLibrary( + cls_type, + ); } - NSArray componentsSeparatedByString_(NSString? separator) { - final _ret = _lib._objc_msgSend_159(_id, - _lib._sel_componentsSeparatedByString_1, separator?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + late final _Dart_ClassLibraryPtr = + _lookup>( + 'Dart_ClassLibrary'); + late final _Dart_ClassLibrary = + _Dart_ClassLibraryPtr.asFunction(); - NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet? separator) { - final _ret = _lib._objc_msgSend_243( - _id, - _lib._sel_componentsSeparatedByCharactersInSet_1, - separator?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Does this Integer fit into a 64-bit signed integer? + /// + /// \param integer An integer. + /// \param fits Returns true if the integer fits into a 64-bit signed integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerFitsIntoInt64( + Object integer, + ffi.Pointer fits, + ) { + return _Dart_IntegerFitsIntoInt64( + integer, + fits, + ); } - NSString stringByTrimmingCharactersInSet_(NSCharacterSet? set) { - final _ret = _lib._objc_msgSend_244(_id, - _lib._sel_stringByTrimmingCharactersInSet_1, set?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IntegerFitsIntoInt64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerFitsIntoInt64'); + late final _Dart_IntegerFitsIntoInt64 = _Dart_IntegerFitsIntoInt64Ptr + .asFunction)>(); - NSString stringByPaddingToLength_withString_startingAtIndex_( - int newLength, NSString? padString, int padIndex) { - final _ret = _lib._objc_msgSend_245( - _id, - _lib._sel_stringByPaddingToLength_withString_startingAtIndex_1, - newLength, - padString?._id ?? ffi.nullptr, - padIndex); - return NSString._(_ret, _lib, retain: true, release: true); + /// Does this Integer fit into a 64-bit unsigned integer? + /// + /// \param integer An integer. + /// \param fits Returns true if the integer fits into a 64-bit unsigned integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerFitsIntoUint64( + Object integer, + ffi.Pointer fits, + ) { + return _Dart_IntegerFitsIntoUint64( + integer, + fits, + ); } - NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { - final _ret = _lib._objc_msgSend_246( - _id, - _lib._sel_stringByFoldingWithOptions_locale_1, - options, - locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IntegerFitsIntoUint64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer)>>('Dart_IntegerFitsIntoUint64'); + late final _Dart_IntegerFitsIntoUint64 = _Dart_IntegerFitsIntoUint64Ptr + .asFunction)>(); - NSString stringByReplacingOccurrencesOfString_withString_options_range_( - NSString? target, - NSString? replacement, - int options, - NSRange searchRange) { - final _ret = _lib._objc_msgSend_247( - _id, - _lib._sel_stringByReplacingOccurrencesOfString_withString_options_range_1, - target?._id ?? ffi.nullptr, - replacement?._id ?? ffi.nullptr, - options, - searchRange); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns an Integer with the provided value. + /// + /// \param value The value of the integer. + /// + /// \return The Integer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewInteger( + int value, + ) { + return _Dart_NewInteger( + value, + ); } - NSString stringByReplacingOccurrencesOfString_withString_( - NSString? target, NSString? replacement) { - final _ret = _lib._objc_msgSend_248( - _id, - _lib._sel_stringByReplacingOccurrencesOfString_withString_1, - target?._id ?? ffi.nullptr, - replacement?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewIntegerPtr = + _lookup>( + 'Dart_NewInteger'); + late final _Dart_NewInteger = + _Dart_NewIntegerPtr.asFunction(); - NSString stringByReplacingCharactersInRange_withString_( - NSRange range, NSString? replacement) { - final _ret = _lib._objc_msgSend_249( - _id, - _lib._sel_stringByReplacingCharactersInRange_withString_1, - range, - replacement?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns an Integer with the provided value. + /// + /// \param value The unsigned value of the integer. + /// + /// \return The Integer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewIntegerFromUint64( + int value, + ) { + return _Dart_NewIntegerFromUint64( + value, + ); } - NSString stringByApplyingTransform_reverse_( - NSStringTransform transform, bool reverse) { - final _ret = _lib._objc_msgSend_250( - _id, _lib._sel_stringByApplyingTransform_reverse_1, transform, reverse); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewIntegerFromUint64Ptr = + _lookup>( + 'Dart_NewIntegerFromUint64'); + late final _Dart_NewIntegerFromUint64 = + _Dart_NewIntegerFromUint64Ptr.asFunction(); - bool writeToURL_atomically_encoding_error_(NSURL? url, bool useAuxiliaryFile, - int enc, ffi.Pointer> error) { - return _lib._objc_msgSend_251( - _id, - _lib._sel_writeToURL_atomically_encoding_error_1, - url?._id ?? ffi.nullptr, - useAuxiliaryFile, - enc, - error); + /// Returns an Integer with the provided value. + /// + /// \param value The value of the integer represented as a C string + /// containing a hexadecimal number. + /// + /// \return The Integer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewIntegerFromHexCString( + ffi.Pointer value, + ) { + return _Dart_NewIntegerFromHexCString( + value, + ); } - bool writeToFile_atomically_encoding_error_( - NSString? path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error) { - return _lib._objc_msgSend_252( - _id, - _lib._sel_writeToFile_atomically_encoding_error_1, - path?._id ?? ffi.nullptr, - useAuxiliaryFile, - enc, - error); + late final _Dart_NewIntegerFromHexCStringPtr = + _lookup)>>( + 'Dart_NewIntegerFromHexCString'); + late final _Dart_NewIntegerFromHexCString = _Dart_NewIntegerFromHexCStringPtr + .asFunction)>(); + + /// Gets the value of an Integer. + /// + /// The integer must fit into a 64-bit signed integer, otherwise an error occurs. + /// + /// \param integer An Integer. + /// \param value Returns the value of the Integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerToInt64( + Object integer, + ffi.Pointer value, + ) { + return _Dart_IntegerToInt64( + integer, + value, + ); } - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IntegerToInt64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerToInt64'); + late final _Dart_IntegerToInt64 = _Dart_IntegerToInt64Ptr.asFunction< + Object Function(Object, ffi.Pointer)>(); - int get hash { - return _lib._objc_msgSend_12(_id, _lib._sel_hash1); + /// Gets the value of an Integer. + /// + /// The integer must fit into a 64-bit unsigned integer, otherwise an + /// error occurs. + /// + /// \param integer An Integer. + /// \param value Returns the value of the Integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerToUint64( + Object integer, + ffi.Pointer value, + ) { + return _Dart_IntegerToUint64( + integer, + value, + ); } - NSString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_253( - _id, - _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, - characters, - length, - freeBuffer); - return NSString._(_ret, _lib, retain: false, release: true); - } + late final _Dart_IntegerToUint64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerToUint64'); + late final _Dart_IntegerToUint64 = _Dart_IntegerToUint64Ptr.asFunction< + Object Function(Object, ffi.Pointer)>(); - NSString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, int len, ObjCBlock15 deallocator) { - final _ret = _lib._objc_msgSend_254( - _id, - _lib._sel_initWithCharactersNoCopy_length_deallocator_1, - chars, - len, - deallocator._id); - return NSString._(_ret, _lib, retain: false, release: true); + /// Gets the value of an integer as a hexadecimal C string. + /// + /// \param integer An Integer. + /// \param value Returns the value of the Integer as a hexadecimal C + /// string. This C string is scope allocated and is only valid until + /// the next call to Dart_ExitScope. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerToHexCString( + Object integer, + ffi.Pointer> value, + ) { + return _Dart_IntegerToHexCString( + integer, + value, + ); } - NSString initWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255( - _id, _lib._sel_initWithCharacters_length_1, characters, length); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IntegerToHexCStringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer>)>>('Dart_IntegerToHexCString'); + late final _Dart_IntegerToHexCString = + _Dart_IntegerToHexCStringPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); - NSString initWithUTF8String_(ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256( - _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns a Double with the provided value. + /// + /// \param value A double. + /// + /// \return The Double object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewDouble( + double value, + ) { + return _Dart_NewDouble( + value, + ); } - NSString initWithString_(NSString? aString) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, aString?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewDoublePtr = + _lookup>( + 'Dart_NewDouble'); + late final _Dart_NewDouble = + _Dart_NewDoublePtr.asFunction(); - NSString initWithFormat_(NSString? format) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithFormat_1, format?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + /// Gets the value of a Double + /// + /// \param double_obj A Double + /// \param value Returns the value of the Double. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_DoubleValue( + Object double_obj, + ffi.Pointer value, + ) { + return _Dart_DoubleValue( + double_obj, + value, + ); } - NSString initWithFormat_arguments_(NSString? format, va_list argList) { - final _ret = _lib._objc_msgSend_257( - _id, - _lib._sel_initWithFormat_arguments_1, - format?._id ?? ffi.nullptr, - argList); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_DoubleValuePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_DoubleValue'); + late final _Dart_DoubleValue = _Dart_DoubleValuePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - NSString initWithFormat_locale_(NSString? format, NSObject locale) { - final _ret = _lib._objc_msgSend_258(_id, _lib._sel_initWithFormat_locale_1, - format?._id ?? ffi.nullptr, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns a closure of static function 'function_name' in the class 'class_name' + /// in the exported namespace of specified 'library'. + /// + /// \param library Library object + /// \param cls_type Type object representing a Class + /// \param function_name Name of the static function in the class + /// + /// \return A valid Dart instance if no error occurs during the operation. + Object Dart_GetStaticMethodClosure( + Object library1, + Object cls_type, + Object function_name, + ) { + return _Dart_GetStaticMethodClosure( + library1, + cls_type, + function_name, + ); } - NSString initWithFormat_locale_arguments_( - NSString? format, NSObject locale, va_list argList) { - final _ret = _lib._objc_msgSend_259( - _id, - _lib._sel_initWithFormat_locale_arguments_1, - format?._id ?? ffi.nullptr, - locale._id, - argList); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetStaticMethodClosurePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Handle)>>('Dart_GetStaticMethodClosure'); + late final _Dart_GetStaticMethodClosure = _Dart_GetStaticMethodClosurePtr + .asFunction(); - NSString initWithData_encoding_(NSData? data, int encoding) { - final _ret = _lib._objc_msgSend_260(_id, _lib._sel_initWithData_encoding_1, - data?._id ?? ffi.nullptr, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns the True object. + /// + /// Requires there to be a current isolate. + /// + /// \return A handle to the True object. + Object Dart_True() { + return _Dart_True(); } - NSString initWithBytes_length_encoding_( - ffi.Pointer bytes, int len, int encoding) { - final _ret = _lib._objc_msgSend_261( - _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_TruePtr = + _lookup>('Dart_True'); + late final _Dart_True = _Dart_TruePtr.asFunction(); - NSString initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _lib._objc_msgSend_262( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, - bytes, - len, - encoding, - freeBuffer); - return NSString._(_ret, _lib, retain: false, release: true); + /// Returns the False object. + /// + /// Requires there to be a current isolate. + /// + /// \return A handle to the False object. + Object Dart_False() { + return _Dart_False(); } - NSString initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - int len, - int encoding, - ObjCBlock12 deallocator) { - final _ret = _lib._objc_msgSend_263( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, - bytes, - len, - encoding, - deallocator._id); - return NSString._(_ret, _lib, retain: false, release: true); - } + late final _Dart_FalsePtr = + _lookup>('Dart_False'); + late final _Dart_False = _Dart_FalsePtr.asFunction(); - static NSString string(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_string1); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns a Boolean with the provided value. + /// + /// \param value true or false. + /// + /// \return The Boolean object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewBoolean( + bool value, + ) { + return _Dart_NewBoolean( + value, + ); } - static NSString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewBooleanPtr = + _lookup>( + 'Dart_NewBoolean'); + late final _Dart_NewBoolean = + _Dart_NewBooleanPtr.asFunction(); - static NSString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSString._(_ret, _lib, retain: true, release: true); + /// Gets the value of a Boolean + /// + /// \param boolean_obj A Boolean + /// \param value Returns the value of the Boolean. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_BooleanValue( + Object boolean_obj, + ffi.Pointer value, + ) { + return _Dart_BooleanValue( + boolean_obj, + value, + ); } - static NSString stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_BooleanValuePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_BooleanValue'); + late final _Dart_BooleanValue = _Dart_BooleanValuePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - static NSString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + /// Gets the length of a String. + /// + /// \param str A String. + /// \param length Returns the length of the String. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringLength( + Object str, + ffi.Pointer length, + ) { + return _Dart_StringLength( + str, + length, + ); } - static NSString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_StringLengthPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_StringLength'); + late final _Dart_StringLength = _Dart_StringLengthPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - NSString initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _lib._objc_msgSend_264(_id, - _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns a String built from the provided C string + /// (There is an implicit assumption that the C string passed in contains + /// UTF-8 encoded characters and '\0' is considered as a termination + /// character). + /// + /// \param value A C String + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromCString( + ffi.Pointer str, + ) { + return _Dart_NewStringFromCString( + str, + ); } - static NSString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewStringFromCStringPtr = + _lookup)>>( + 'Dart_NewStringFromCString'); + late final _Dart_NewStringFromCString = _Dart_NewStringFromCStringPtr + .asFunction)>(); - NSString initWithContentsOfURL_encoding_error_( - NSURL? url, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_265( - _id, - _lib._sel_initWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns a String built from an array of UTF-8 encoded characters. + /// + /// \param utf8_array An array of UTF-8 encoded characters. + /// \param length The length of the codepoints array. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF8( + ffi.Pointer utf8_array, + int length, + ) { + return _Dart_NewStringFromUTF8( + utf8_array, + length, + ); } - NSString initWithContentsOfFile_encoding_error_( - NSString? path, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_266( - _id, - _lib._sel_initWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewStringFromUTF8Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF8'); + late final _Dart_NewStringFromUTF8 = _Dart_NewStringFromUTF8Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); - static NSString stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_265( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns a String built from an array of UTF-16 encoded characters. + /// + /// \param utf16_array An array of UTF-16 encoded characters. + /// \param length The length of the codepoints array. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF16( + ffi.Pointer utf16_array, + int length, + ) { + return _Dart_NewStringFromUTF16( + utf16_array, + length, + ); } - static NSString stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_266( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewStringFromUTF16Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF16'); + late final _Dart_NewStringFromUTF16 = _Dart_NewStringFromUTF16Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); - NSString initWithContentsOfURL_usedEncoding_error_( - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_267( - _id, - _lib._sel_initWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns a String built from an array of UTF-32 encoded characters. + /// + /// \param utf32_array An array of UTF-32 encoded characters. + /// \param length The length of the codepoints array. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF32( + ffi.Pointer utf32_array, + int length, + ) { + return _Dart_NewStringFromUTF32( + utf32_array, + length, + ); } - NSString initWithContentsOfFile_usedEncoding_error_( - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_268( - _id, - _lib._sel_initWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewStringFromUTF32Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF32'); + late final _Dart_NewStringFromUTF32 = _Dart_NewStringFromUTF32Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); - static NSString stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_267( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns a String which references an external array of + /// Latin-1 (ISO-8859-1) encoded characters. + /// + /// \param latin1_array Array of Latin-1 encoded characters. This must not move. + /// \param length The length of the characters array. + /// \param peer An external pointer to associate with this string. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A callback to be called when this string is finalized. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalLatin1String( + ffi.Pointer latin1_array, + int length, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewExternalLatin1String( + latin1_array, + length, + peer, + external_allocation_size, + callback, + ); } - static NSString stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_268( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewExternalLatin1StringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewExternalLatin1String'); + late final _Dart_NewExternalLatin1String = + _Dart_NewExternalLatin1StringPtr.asFunction< + Object Function(ffi.Pointer, int, ffi.Pointer, + int, Dart_HandleFinalizer)>(); - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData? data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_269( - _lib._class_NSString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); + /// Returns a String which references an external array of UTF-16 encoded + /// characters. + /// + /// \param utf16_array An array of UTF-16 encoded characters. This must not move. + /// \param length The length of the characters array. + /// \param peer An external pointer to associate with this string. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A callback to be called when this string is finalized. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalUTF16String( + ffi.Pointer utf16_array, + int length, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewExternalUTF16String( + utf16_array, + length, + peer, + external_allocation_size, + callback, + ); } - NSObject propertyList() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewExternalUTF16StringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewExternalUTF16String'); + late final _Dart_NewExternalUTF16String = + _Dart_NewExternalUTF16StringPtr.asFunction< + Object Function(ffi.Pointer, int, ffi.Pointer, + int, Dart_HandleFinalizer)>(); - NSDictionary propertyListFromStringsFileFormat() { - final _ret = _lib._objc_msgSend_180( - _id, _lib._sel_propertyListFromStringsFileFormat1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + /// Gets the C string representation of a String. + /// (It is a sequence of UTF-8 encoded values with a '\0' termination.) + /// + /// \param str A string. + /// \param cstr Returns the String represented as a C string. + /// This C string is scope allocated and is only valid until + /// the next call to Dart_ExitScope. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToCString( + Object str, + ffi.Pointer> cstr, + ) { + return _Dart_StringToCString( + str, + cstr, + ); } - ffi.Pointer cString() { - return _lib._objc_msgSend_53(_id, _lib._sel_cString1); - } + late final _Dart_StringToCStringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer>)>>('Dart_StringToCString'); + late final _Dart_StringToCString = _Dart_StringToCStringPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); - ffi.Pointer lossyCString() { - return _lib._objc_msgSend_53(_id, _lib._sel_lossyCString1); + /// Gets a UTF-8 encoded representation of a String. + /// + /// Any unpaired surrogate code points in the string will be converted as + /// replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need + /// to preserve unpaired surrogates, use the Dart_StringToUTF16 function. + /// + /// \param str A string. + /// \param utf8_array Returns the String represented as UTF-8 code + /// units. This UTF-8 array is scope allocated and is only valid + /// until the next call to Dart_ExitScope. + /// \param length Used to return the length of the array which was + /// actually used. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToUTF8( + Object str, + ffi.Pointer> utf8_array, + ffi.Pointer length, + ) { + return _Dart_StringToUTF8( + str, + utf8_array, + length, + ); } - int cStringLength() { - return _lib._objc_msgSend_12(_id, _lib._sel_cStringLength1); - } + late final _Dart_StringToUTF8Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer>, + ffi.Pointer)>>('Dart_StringToUTF8'); + late final _Dart_StringToUTF8 = _Dart_StringToUTF8Ptr.asFunction< + Object Function(Object, ffi.Pointer>, + ffi.Pointer)>(); - void getCString_(ffi.Pointer bytes) { - return _lib._objc_msgSend_270(_id, _lib._sel_getCString_1, bytes); + /// Gets the data corresponding to the string object. This function returns + /// the data only for Latin-1 (ISO-8859-1) string objects. For all other + /// string objects it returns an error. + /// + /// \param str A string. + /// \param latin1_array An array allocated by the caller, used to return + /// the string data. + /// \param length Used to pass in the length of the provided array. + /// Used to return the length of the array which was actually used. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToLatin1( + Object str, + ffi.Pointer latin1_array, + ffi.Pointer length, + ) { + return _Dart_StringToLatin1( + str, + latin1_array, + length, + ); } - void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { - return _lib._objc_msgSend_271( - _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); - } + late final _Dart_StringToLatin1Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer, + ffi.Pointer)>>('Dart_StringToLatin1'); + late final _Dart_StringToLatin1 = _Dart_StringToLatin1Ptr.asFunction< + Object Function( + Object, ffi.Pointer, ffi.Pointer)>(); - void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, - int maxLength, NSRange aRange, NSRangePointer leftoverRange) { - return _lib._objc_msgSend_272( - _id, - _lib._sel_getCString_maxLength_range_remainingRange_1, - bytes, - maxLength, - aRange, - leftoverRange); + /// Gets the UTF-16 encoded representation of a string. + /// + /// \param str A string. + /// \param utf16_array An array allocated by the caller, used to return + /// the array of UTF-16 encoded characters. + /// \param length Used to pass in the length of the provided array. + /// Used to return the length of the array which was actually used. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToUTF16( + Object str, + ffi.Pointer utf16_array, + ffi.Pointer length, + ) { + return _Dart_StringToUTF16( + str, + utf16_array, + length, + ); } - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); - } + late final _Dart_StringToUTF16Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer, + ffi.Pointer)>>('Dart_StringToUTF16'); + late final _Dart_StringToUTF16 = _Dart_StringToUTF16Ptr.asFunction< + Object Function( + Object, ffi.Pointer, ffi.Pointer)>(); - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); + /// Gets the storage size in bytes of a String. + /// + /// \param str A String. + /// \param length Returns the storage size in bytes of the String. + /// This is the size in bytes needed to store the String. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringStorageSize( + Object str, + ffi.Pointer size, + ) { + return _Dart_StringStorageSize( + str, + size, + ); } - NSObject initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final _Dart_StringStorageSizePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_StringStorageSize'); + late final _Dart_StringStorageSize = _Dart_StringStorageSizePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - NSObject initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Retrieves some properties associated with a String. + /// Properties retrieved are: + /// - character size of the string (one or two byte) + /// - length of the string + /// - peer pointer of string if it is an external string. + /// \param str A String. + /// \param char_size Returns the character size of the String. + /// \param str_len Returns the length of the String. + /// \param peer Returns the peer pointer associated with the String or 0 if + /// there is no peer pointer for it. + /// \return Success if no error occurs. Otherwise returns + /// an error handle. + Object Dart_StringGetProperties( + Object str, + ffi.Pointer char_size, + ffi.Pointer str_len, + ffi.Pointer> peer, + ) { + return _Dart_StringGetProperties( + str, + char_size, + str_len, + peer, + ); } - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final _Dart_StringGetPropertiesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('Dart_StringGetProperties'); + late final _Dart_StringGetProperties = + _Dart_StringGetPropertiesPtr.asFunction< + Object Function(Object, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns a List of the desired length. + /// + /// \param length The length of the list. + /// + /// \return The List object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewList( + int length, + ) { + return _Dart_NewList( + length, + ); } - NSObject initWithCStringNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_273( - _id, - _lib._sel_initWithCStringNoCopy_length_freeWhenDone_1, - bytes, - length, - freeBuffer); - return NSObject._(_ret, _lib, retain: false, release: true); - } + late final _Dart_NewListPtr = + _lookup>( + 'Dart_NewList'); + late final _Dart_NewList = + _Dart_NewListPtr.asFunction(); - NSObject initWithCString_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_264( - _id, _lib._sel_initWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); + /// TODO(bkonyi): convert this to use nullable types once NNBD is enabled. + /// /** + /// * Returns a List of the desired length with the desired legacy element type. + /// * + /// * \param element_type_id The type of elements of the list. + /// * \param length The length of the list. + /// * + /// * \return The List object if no error occurs. Otherwise returns an error + /// * handle. + /// */ + Object Dart_NewListOf( + int element_type_id, + int length, + ) { + return _Dart_NewListOf( + element_type_id, + length, + ); } - NSObject initWithCString_(ffi.Pointer bytes) { - final _ret = - _lib._objc_msgSend_256(_id, _lib._sel_initWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewListOfPtr = + _lookup>( + 'Dart_NewListOf'); + late final _Dart_NewListOf = + _Dart_NewListOfPtr.asFunction(); - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns a List of the desired length with the desired element type. + /// + /// \param element_type Handle to a nullable type object. E.g., from + /// Dart_GetType or Dart_GetNullableType. + /// + /// \param length The length of the list. + /// + /// \return The List object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewListOfType( + Object element_type, + int length, + ) { + return _Dart_NewListOfType( + element_type, + length, + ); } - static NSObject stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( - _lib._class_NSString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewListOfTypePtr = + _lookup>( + 'Dart_NewListOfType'); + late final _Dart_NewListOfType = + _Dart_NewListOfTypePtr.asFunction(); - void getCharacters_(ffi.Pointer buffer) { - return _lib._objc_msgSend_274(_id, _lib._sel_getCharacters_1, buffer); + /// Returns a List of the desired length with the desired element type, filled + /// with the provided object. + /// + /// \param element_type Handle to a type object. E.g., from Dart_GetType. + /// + /// \param fill_object Handle to an object of type 'element_type' that will be + /// used to populate the list. This parameter can only be Dart_Null() if the + /// length of the list is 0 or 'element_type' is a nullable type. + /// + /// \param length The length of the list. + /// + /// \return The List object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewListOfTypeFilled( + Object element_type, + Object fill_object, + int length, + ) { + return _Dart_NewListOfTypeFilled( + element_type, + fill_object, + length, + ); } - /// Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode an URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. - NSString stringByAddingPercentEncodingWithAllowedCharacters_( - NSCharacterSet? allowedCharacters) { - final _ret = _lib._objc_msgSend_244( - _id, - _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, - allowedCharacters?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewListOfTypeFilledPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Handle, ffi.IntPtr)>>('Dart_NewListOfTypeFilled'); + late final _Dart_NewListOfTypeFilled = _Dart_NewListOfTypeFilledPtr + .asFunction(); - /// Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. - NSString? get stringByRemovingPercentEncoding { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_stringByRemovingPercentEncoding1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Gets the length of a List. + /// + /// May generate an unhandled exception error. + /// + /// \param list A List. + /// \param length Returns the length of the List. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_ListLength( + Object list, + ffi.Pointer length, + ) { + return _Dart_ListLength( + list, + length, + ); } - NSString stringByAddingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_15( - _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); - return NSString._(_ret, _lib, retain: true, release: true); + late final _Dart_ListLengthPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_ListLength'); + late final _Dart_ListLength = _Dart_ListLengthPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); + + /// Gets the Object at some index of a List. + /// + /// If the index is out of bounds, an error occurs. + /// + /// May generate an unhandled exception error. + /// + /// \param list A List. + /// \param index A valid index into the List. + /// + /// \return The Object in the List at the specified index if no error + /// occurs. Otherwise returns an error handle. + Object Dart_ListGetAt( + Object list, + int index, + ) { + return _Dart_ListGetAt( + list, + index, + ); } - NSString stringByReplacingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_15( - _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); - return NSString._(_ret, _lib, retain: true, release: true); + late final _Dart_ListGetAtPtr = + _lookup>( + 'Dart_ListGetAt'); + late final _Dart_ListGetAt = + _Dart_ListGetAtPtr.asFunction(); + + /// Gets a range of Objects from a List. + /// + /// If any of the requested index values are out of bounds, an error occurs. + /// + /// May generate an unhandled exception error. + /// + /// \param list A List. + /// \param offset The offset of the first item to get. + /// \param length The number of items to get. + /// \param result A pointer to fill with the objects. + /// + /// \return Success if no error occurs during the operation. + Object Dart_ListGetRange( + Object list, + int offset, + int length, + ffi.Pointer result, + ) { + return _Dart_ListGetRange( + list, + offset, + length, + result, + ); } - static NSString new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); - return NSString._(_ret, _lib, retain: false, release: true); - } + late final _Dart_ListGetRangePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.IntPtr, + ffi.Pointer)>>('Dart_ListGetRange'); + late final _Dart_ListGetRange = _Dart_ListGetRangePtr.asFunction< + Object Function(Object, int, int, ffi.Pointer)>(); - static NSString alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); - return NSString._(_ret, _lib, retain: false, release: true); + /// Sets the Object at some index of a List. + /// + /// If the index is out of bounds, an error occurs. + /// + /// May generate an unhandled exception error. + /// + /// \param array A List. + /// \param index A valid index into the List. + /// \param value The Object to put in the List. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_ListSetAt( + Object list, + int index, + Object value, + ) { + return _Dart_ListSetAt( + list, + index, + value, + ); } -} - -extension StringToNSString on String { - NSString toNSString(NativeCupertinoHttp lib) => NSString(lib, this); -} - -typedef unichar = ffi.UnsignedShort; -class NSCoder extends _ObjCWrapper { - NSCoder._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final _Dart_ListSetAtPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.IntPtr, ffi.Handle)>>('Dart_ListSetAt'); + late final _Dart_ListSetAt = + _Dart_ListSetAtPtr.asFunction(); - /// Returns a [NSCoder] that points to the same underlying object as [other]. - static NSCoder castFrom(T other) { - return NSCoder._(other._id, other._lib, retain: true, release: true); + /// May generate an unhandled exception error. + Object Dart_ListGetAsBytes( + Object list, + int offset, + ffi.Pointer native_array, + int length, + ) { + return _Dart_ListGetAsBytes( + list, + offset, + native_array, + length, + ); } - /// Returns a [NSCoder] that wraps the given raw object pointer. - static NSCoder castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCoder._(other, lib, retain: retain, release: release); - } + late final _Dart_ListGetAsBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, + ffi.IntPtr)>>('Dart_ListGetAsBytes'); + late final _Dart_ListGetAsBytes = _Dart_ListGetAsBytesPtr.asFunction< + Object Function(Object, int, ffi.Pointer, int)>(); - /// Returns whether [obj] is an instance of [NSCoder]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); + /// May generate an unhandled exception error. + Object Dart_ListSetAsBytes( + Object list, + int offset, + ffi.Pointer native_array, + int length, + ) { + return _Dart_ListSetAsBytes( + list, + offset, + native_array, + length, + ); } -} - -typedef NSRange = _NSRange; -class _NSRange extends ffi.Struct { - @NSUInteger() - external int location; + late final _Dart_ListSetAsBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, + ffi.IntPtr)>>('Dart_ListSetAsBytes'); + late final _Dart_ListSetAsBytes = _Dart_ListSetAsBytesPtr.asFunction< + Object Function(Object, int, ffi.Pointer, int)>(); - @NSUInteger() - external int length; -} + /// Gets the Object at some key of a Map. + /// + /// May generate an unhandled exception error. + /// + /// \param map A Map. + /// \param key An Object. + /// + /// \return The value in the map at the specified key, null if the map does not + /// contain the key, or an error handle. + Object Dart_MapGetAt( + Object map, + Object key, + ) { + return _Dart_MapGetAt( + map, + key, + ); + } -abstract class NSComparisonResult { - static const int NSOrderedAscending = -1; - static const int NSOrderedSame = 0; - static const int NSOrderedDescending = 1; -} + late final _Dart_MapGetAtPtr = + _lookup>( + 'Dart_MapGetAt'); + late final _Dart_MapGetAt = + _Dart_MapGetAtPtr.asFunction(); -abstract class NSStringCompareOptions { - static const int NSCaseInsensitiveSearch = 1; - static const int NSLiteralSearch = 2; - static const int NSBackwardsSearch = 4; - static const int NSAnchoredSearch = 8; - static const int NSNumericSearch = 64; - static const int NSDiacriticInsensitiveSearch = 128; - static const int NSWidthInsensitiveSearch = 256; - static const int NSForcedOrderingSearch = 512; - static const int NSRegularExpressionSearch = 1024; -} + /// Returns whether the Map contains a given key. + /// + /// May generate an unhandled exception error. + /// + /// \param map A Map. + /// + /// \return A handle on a boolean indicating whether map contains the key. + /// Otherwise returns an error handle. + Object Dart_MapContainsKey( + Object map, + Object key, + ) { + return _Dart_MapContainsKey( + map, + key, + ); + } -class NSLocale extends _ObjCWrapper { - NSLocale._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final _Dart_MapContainsKeyPtr = + _lookup>( + 'Dart_MapContainsKey'); + late final _Dart_MapContainsKey = + _Dart_MapContainsKeyPtr.asFunction(); - /// Returns a [NSLocale] that points to the same underlying object as [other]. - static NSLocale castFrom(T other) { - return NSLocale._(other._id, other._lib, retain: true, release: true); + /// Gets the list of keys of a Map. + /// + /// May generate an unhandled exception error. + /// + /// \param map A Map. + /// + /// \return The list of key Objects if no error occurs. Otherwise returns an + /// error handle. + Object Dart_MapKeys( + Object map, + ) { + return _Dart_MapKeys( + map, + ); } - /// Returns a [NSLocale] that wraps the given raw object pointer. - static NSLocale castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSLocale._(other, lib, retain: retain, release: release); - } + late final _Dart_MapKeysPtr = + _lookup>( + 'Dart_MapKeys'); + late final _Dart_MapKeys = + _Dart_MapKeysPtr.asFunction(); - /// Returns whether [obj] is an instance of [NSLocale]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLocale1); + /// Return type if this object is a TypedData object. + /// + /// \return kInvalid if the object is not a TypedData object or the appropriate + /// Dart_TypedData_Type. + int Dart_GetTypeOfTypedData( + Object object, + ) { + return _Dart_GetTypeOfTypedData( + object, + ); } -} -class NSCharacterSet extends NSObject { - NSCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final _Dart_GetTypeOfTypedDataPtr = + _lookup>( + 'Dart_GetTypeOfTypedData'); + late final _Dart_GetTypeOfTypedData = + _Dart_GetTypeOfTypedDataPtr.asFunction(); - /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. - static NSCharacterSet castFrom(T other) { - return NSCharacterSet._(other._id, other._lib, retain: true, release: true); + /// Return type if this object is an external TypedData object. + /// + /// \return kInvalid if the object is not an external TypedData object or + /// the appropriate Dart_TypedData_Type. + int Dart_GetTypeOfExternalTypedData( + Object object, + ) { + return _Dart_GetTypeOfExternalTypedData( + object, + ); } - /// Returns a [NSCharacterSet] that wraps the given raw object pointer. - static NSCharacterSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCharacterSet._(other, lib, retain: retain, release: release); - } + late final _Dart_GetTypeOfExternalTypedDataPtr = + _lookup>( + 'Dart_GetTypeOfExternalTypedData'); + late final _Dart_GetTypeOfExternalTypedData = + _Dart_GetTypeOfExternalTypedDataPtr.asFunction(); - /// Returns whether [obj] is an instance of [NSCharacterSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSCharacterSet1); + /// Returns a TypedData object of the desired length and type. + /// + /// \param type The type of the TypedData object. + /// \param length The length of the TypedData object (length in type units). + /// + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewTypedData( + int type, + int length, + ) { + return _Dart_NewTypedData( + type, + length, + ); } - static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewTypedDataPtr = + _lookup>( + 'Dart_NewTypedData'); + late final _Dart_NewTypedData = + _Dart_NewTypedDataPtr.asFunction(); - static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Returns a TypedData object which references an external data array. + /// + /// \param type The type of the data array. + /// \param data A data array. This array must not move. + /// \param length The length of the data array (length in type units). + /// + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalTypedData( + int type, + ffi.Pointer data, + int length, + ) { + return _Dart_NewExternalTypedData( + type, + data, + length, + ); } - static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSCharacterSet1, - _lib._sel_whitespaceAndNewlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewExternalTypedDataPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Int32, ffi.Pointer, + ffi.IntPtr)>>('Dart_NewExternalTypedData'); + late final _Dart_NewExternalTypedData = _Dart_NewExternalTypedDataPtr + .asFunction, int)>(); - static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Returns a TypedData object which references an external data array. + /// + /// \param type The type of the data array. + /// \param data A data array. This array must not move. + /// \param length The length of the data array (length in type units). + /// \param peer A pointer to a native object or NULL. This value is + /// provided to callback when it is invoked. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A function pointer that will be invoked sometime + /// after the object is garbage collected, unless the handle has been deleted. + /// A valid callback needs to be specified it cannot be NULL. + /// + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalTypedDataWithFinalizer( + int type, + ffi.Pointer data, + int length, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, + ) { + return _Dart_NewExternalTypedDataWithFinalizer( + type, + data, + length, + peer, + external_allocation_size, + callback, + ); } - static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewExternalTypedDataWithFinalizerPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Int32, + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewExternalTypedDataWithFinalizer'); + late final _Dart_NewExternalTypedDataWithFinalizer = + _Dart_NewExternalTypedDataWithFinalizerPtr.asFunction< + Object Function(int, ffi.Pointer, int, + ffi.Pointer, int, Dart_HandleFinalizer)>(); - static NSCharacterSet? getLowercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Returns a ByteBuffer object for the typed data. + /// + /// \param type_data The TypedData object. + /// + /// \return The ByteBuffer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewByteBuffer( + Object typed_data, + ) { + return _Dart_NewByteBuffer( + typed_data, + ); } - static NSCharacterSet? getUppercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewByteBufferPtr = + _lookup>( + 'Dart_NewByteBuffer'); + late final _Dart_NewByteBuffer = + _Dart_NewByteBufferPtr.asFunction(); - static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Acquires access to the internal data address of a TypedData object. + /// + /// \param object The typed data object whose internal data address is to + /// be accessed. + /// \param type The type of the object is returned here. + /// \param data The internal data address is returned here. + /// \param len Size of the typed array is returned here. + /// + /// Notes: + /// When the internal address of the object is acquired any calls to a + /// Dart API function that could potentially allocate an object or run + /// any Dart code will return an error. + /// + /// Any Dart API functions for accessing the data should not be called + /// before the corresponding release. In particular, the object should + /// not be acquired again before its release. This leads to undefined + /// behavior. + /// + /// \return Success if the internal data address is acquired successfully. + /// Otherwise, returns an error handle. + Object Dart_TypedDataAcquireData( + Object object, + ffi.Pointer type, + ffi.Pointer> data, + ffi.Pointer len, + ) { + return _Dart_TypedDataAcquireData( + object, + type, + data, + len, + ); } - static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_TypedDataAcquireDataPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('Dart_TypedDataAcquireData'); + late final _Dart_TypedDataAcquireData = + _Dart_TypedDataAcquireDataPtr.asFunction< + Object Function(Object, ffi.Pointer, + ffi.Pointer>, ffi.Pointer)>(); - static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Releases access to the internal data address that was acquired earlier using + /// Dart_TypedDataAcquireData. + /// + /// \param object The typed data object whose internal data address is to be + /// released. + /// + /// \return Success if the internal data address is released successfully. + /// Otherwise, returns an error handle. + Object Dart_TypedDataReleaseData( + Object object, + ) { + return _Dart_TypedDataReleaseData( + object, + ); } - static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_TypedDataReleaseDataPtr = + _lookup>( + 'Dart_TypedDataReleaseData'); + late final _Dart_TypedDataReleaseData = + _Dart_TypedDataReleaseDataPtr.asFunction(); - static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Returns the TypedData object associated with the ByteBuffer object. + /// + /// \param byte_buffer The ByteBuffer object. + /// + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_GetDataFromByteBuffer( + Object byte_buffer, + ) { + return _Dart_GetDataFromByteBuffer( + byte_buffer, + ); } - static NSCharacterSet? getCapitalizedLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetDataFromByteBufferPtr = + _lookup>( + 'Dart_GetDataFromByteBuffer'); + late final _Dart_GetDataFromByteBuffer = + _Dart_GetDataFromByteBufferPtr.asFunction(); - static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Invokes a constructor, creating a new object. + /// + /// This function allows hidden constructors (constructors with leading + /// underscores) to be called. + /// + /// \param type Type of object to be constructed. + /// \param constructor_name The name of the constructor to invoke. Use + /// Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. + /// This name should not include the name of the class. + /// \param number_of_arguments Size of the arguments array. + /// \param arguments An array of arguments to the constructor. + /// + /// \return If the constructor is called and completes successfully, + /// then the new object. If an error occurs during execution, then an + /// error handle is returned. + Object Dart_New( + Object type, + Object constructor_name, + int number_of_arguments, + ffi.Pointer arguments, + ) { + return _Dart_New( + type, + constructor_name, + number_of_arguments, + arguments, + ); } - static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: false, release: true); - } + late final _Dart_NewPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_New'); + late final _Dart_New = _Dart_NewPtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); - static NSCharacterSet characterSetWithRange_( - NativeCupertinoHttp _lib, NSRange aRange) { - final _ret = _lib._objc_msgSend_29( - _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Allocate a new object without invoking a constructor. + /// + /// \param type The type of an object to be allocated. + /// + /// \return The new object. If an error occurs during execution, then an + /// error handle is returned. + Object Dart_Allocate( + Object type, + ) { + return _Dart_Allocate( + type, + ); } - static NSCharacterSet characterSetWithCharactersInString_( - NativeCupertinoHttp _lib, NSString? aString) { - final _ret = _lib._objc_msgSend_30( - _lib._class_NSCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, - aString?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_AllocatePtr = + _lookup>( + 'Dart_Allocate'); + late final _Dart_Allocate = + _Dart_AllocatePtr.asFunction(); - static NSCharacterSet characterSetWithBitmapRepresentation_( - NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_223( - _lib._class_NSCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, - data?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Allocate a new object without invoking a constructor, and sets specified + /// native fields. + /// + /// \param type The type of an object to be allocated. + /// \param num_native_fields The number of native fields to set. + /// \param native_fields An array containing the value of native fields. + /// + /// \return The new object. If an error occurs during execution, then an + /// error handle is returned. + Object Dart_AllocateWithNativeFields( + Object type, + int num_native_fields, + ffi.Pointer native_fields, + ) { + return _Dart_AllocateWithNativeFields( + type, + num_native_fields, + native_fields, + ); } - static NSCharacterSet characterSetWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? fName) { - final _ret = _lib._objc_msgSend_30(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_AllocateWithNativeFieldsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_AllocateWithNativeFields'); + late final _Dart_AllocateWithNativeFields = _Dart_AllocateWithNativeFieldsPtr + .asFunction)>(); - NSCharacterSet initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Invokes a method or function. + /// + /// The 'target' parameter may be an object, type, or library. If + /// 'target' is an object, then this function will invoke an instance + /// method. If 'target' is a type, then this function will invoke a + /// static method. If 'target' is a library, then this function will + /// invoke a top-level function from that library. + /// NOTE: This API call cannot be used to invoke methods of a type object. + /// + /// This function ignores visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param target An object, type, or library. + /// \param name The name of the function or method to invoke. + /// \param number_of_arguments Size of the arguments array. + /// \param arguments An array of arguments to the function. + /// + /// \return If the function or method is called and completes + /// successfully, then the return value is returned. If an error + /// occurs during execution, then an error handle is returned. + Object Dart_Invoke( + Object target, + Object name, + int number_of_arguments, + ffi.Pointer arguments, + ) { + return _Dart_Invoke( + target, + name, + number_of_arguments, + arguments, + ); } - bool characterIsMember_(int aCharacter) { - return _lib._objc_msgSend_224( - _id, _lib._sel_characterIsMember_1, aCharacter); - } + late final _Dart_InvokePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_Invoke'); + late final _Dart_Invoke = _Dart_InvokePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); - NSData? get bitmapRepresentation { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_bitmapRepresentation1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + /// Invokes a Closure with the given arguments. + /// + /// May generate an unhandled exception error. + /// + /// \return If no error occurs during execution, then the result of + /// invoking the closure is returned. If an error occurs during + /// execution, then an error handle is returned. + Object Dart_InvokeClosure( + Object closure, + int number_of_arguments, + ffi.Pointer arguments, + ) { + return _Dart_InvokeClosure( + closure, + number_of_arguments, + arguments, + ); } - NSCharacterSet? get invertedSet { - final _ret = _lib._objc_msgSend_28(_id, _lib._sel_invertedSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_InvokeClosurePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_InvokeClosure'); + late final _Dart_InvokeClosure = _Dart_InvokeClosurePtr.asFunction< + Object Function(Object, int, ffi.Pointer)>(); - bool longCharacterIsMember_(int theLongChar) { - return _lib._objc_msgSend_225( - _id, _lib._sel_longCharacterIsMember_1, theLongChar); + /// Invokes a Generative Constructor on an object that was previously + /// allocated using Dart_Allocate/Dart_AllocateWithNativeFields. + /// + /// The 'target' parameter must be an object. + /// + /// This function ignores visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param target An object. + /// \param name The name of the constructor to invoke. + /// Use Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. + /// \param number_of_arguments Size of the arguments array. + /// \param arguments An array of arguments to the function. + /// + /// \return If the constructor is called and completes + /// successfully, then the object is returned. If an error + /// occurs during execution, then an error handle is returned. + Object Dart_InvokeConstructor( + Object object, + Object name, + int number_of_arguments, + ffi.Pointer arguments, + ) { + return _Dart_InvokeConstructor( + object, + name, + number_of_arguments, + arguments, + ); } - bool isSupersetOfSet_(NSCharacterSet? theOtherSet) { - return _lib._objc_msgSend_226( - _id, _lib._sel_isSupersetOfSet_1, theOtherSet?._id ?? ffi.nullptr); - } + late final _Dart_InvokeConstructorPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_InvokeConstructor'); + late final _Dart_InvokeConstructor = _Dart_InvokeConstructorPtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); - bool hasMemberInPlane_(int thePlane) { - return _lib._objc_msgSend_227(_id, _lib._sel_hasMemberInPlane_1, thePlane); + /// Gets the value of a field. + /// + /// The 'container' parameter may be an object, type, or library. If + /// 'container' is an object, then this function will access an + /// instance field. If 'container' is a type, then this function will + /// access a static field. If 'container' is a library, then this + /// function will access a top-level variable. + /// NOTE: This API call cannot be used to access fields of a type object. + /// + /// This function ignores field visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param container An object, type, or library. + /// \param name A field name. + /// + /// \return If no error occurs, then the value of the field is + /// returned. Otherwise an error handle is returned. + Object Dart_GetField( + Object container, + Object name, + ) { + return _Dart_GetField( + container, + name, + ); } - /// Returns a character set containing the characters allowed in an URL's user subcomponent. - static NSCharacterSet? getURLUserAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetFieldPtr = + _lookup>( + 'Dart_GetField'); + late final _Dart_GetField = + _Dart_GetFieldPtr.asFunction(); - /// Returns a character set containing the characters allowed in an URL's password subcomponent. - static NSCharacterSet? getURLPasswordAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Sets the value of a field. + /// + /// The 'container' parameter may actually be an object, type, or + /// library. If 'container' is an object, then this function will + /// access an instance field. If 'container' is a type, then this + /// function will access a static field. If 'container' is a library, + /// then this function will access a top-level variable. + /// NOTE: This API call cannot be used to access fields of a type object. + /// + /// This function ignores field visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param container An object, type, or library. + /// \param name A field name. + /// \param value The new field value. + /// + /// \return A valid handle if no error occurs. + Object Dart_SetField( + Object container, + Object name, + Object value, + ) { + return _Dart_SetField( + container, + name, + value, + ); } - /// Returns a character set containing the characters allowed in an URL's host subcomponent. - static NSCharacterSet? getURLHostAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_SetFieldPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Handle, ffi.Handle)>>('Dart_SetField'); + late final _Dart_SetField = + _Dart_SetFieldPtr.asFunction(); - /// Returns a character set containing the characters allowed in an URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - static NSCharacterSet? getURLPathAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Throws an exception. + /// + /// This function causes a Dart language exception to be thrown. This + /// will proceed in the standard way, walking up Dart frames until an + /// appropriate 'catch' block is found, executing 'finally' blocks, + /// etc. + /// + /// If an error handle is passed into this function, the error is + /// propagated immediately. See Dart_PropagateError for a discussion + /// of error propagation. + /// + /// If successful, this function does not return. Note that this means + /// that the destructors of any stack-allocated C++ objects will not be + /// called. If there are no Dart frames on the stack, an error occurs. + /// + /// \return An error handle if the exception was not thrown. + /// Otherwise the function does not return. + Object Dart_ThrowException( + Object exception, + ) { + return _Dart_ThrowException( + exception, + ); } - /// Returns a character set containing the characters allowed in an URL's query component. - static NSCharacterSet? getURLQueryAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + late final _Dart_ThrowExceptionPtr = + _lookup>( + 'Dart_ThrowException'); + late final _Dart_ThrowException = + _Dart_ThrowExceptionPtr.asFunction(); - /// Returns a character set containing the characters allowed in an URL's fragment component. - static NSCharacterSet? getURLFragmentAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Rethrows an exception. + /// + /// Rethrows an exception, unwinding all dart frames on the stack. If + /// successful, this function does not return. Note that this means + /// that the destructors of any stack-allocated C++ objects will not be + /// called. If there are no Dart frames on the stack, an error occurs. + /// + /// \return An error handle if the exception was not thrown. + /// Otherwise the function does not return. + Object Dart_ReThrowException( + Object exception, + Object stacktrace, + ) { + return _Dart_ReThrowException( + exception, + stacktrace, + ); } - static NSCharacterSet new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } + late final _Dart_ReThrowExceptionPtr = + _lookup>( + 'Dart_ReThrowException'); + late final _Dart_ReThrowException = + _Dart_ReThrowExceptionPtr.asFunction(); - static NSCharacterSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); + /// Gets the number of native instance fields in an object. + Object Dart_GetNativeInstanceFieldCount( + Object obj, + ffi.Pointer count, + ) { + return _Dart_GetNativeInstanceFieldCount( + obj, + count, + ); } -} -class NSData extends NSObject { - NSData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final _Dart_GetNativeInstanceFieldCountPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer)>>('Dart_GetNativeInstanceFieldCount'); + late final _Dart_GetNativeInstanceFieldCount = + _Dart_GetNativeInstanceFieldCountPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Returns a [NSData] that points to the same underlying object as [other]. - static NSData castFrom(T other) { - return NSData._(other._id, other._lib, retain: true, release: true); + /// Gets the value of a native field. + /// + /// TODO(turnidge): Document. + Object Dart_GetNativeInstanceField( + Object obj, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeInstanceField( + obj, + index, + value, + ); } - /// Returns a [NSData] that wraps the given raw object pointer. - static NSData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSData._(other, lib, retain: retain, release: release); - } + late final _Dart_GetNativeInstanceFieldPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeInstanceField'); + late final _Dart_GetNativeInstanceField = _Dart_GetNativeInstanceFieldPtr + .asFunction)>(); - /// Returns whether [obj] is an instance of [NSData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); + /// Sets the value of a native field. + /// + /// TODO(turnidge): Document. + Object Dart_SetNativeInstanceField( + Object obj, + int index, + int value, + ) { + return _Dart_SetNativeInstanceField( + obj, + index, + value, + ); } - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); + late final _Dart_SetNativeInstanceFieldPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Int, ffi.IntPtr)>>('Dart_SetNativeInstanceField'); + late final _Dart_SetNativeInstanceField = _Dart_SetNativeInstanceFieldPtr + .asFunction(); + + /// Extracts current isolate group data from the native arguments structure. + ffi.Pointer Dart_GetNativeIsolateGroupData( + Dart_NativeArguments args, + ) { + return _Dart_GetNativeIsolateGroupData( + args, + ); } - /// The -bytes method returns a pointer to a contiguous region of memory managed by the receiver. - /// If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer - /// Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data. - ffi.Pointer get bytes { - return _lib._objc_msgSend_31(_id, _lib._sel_bytes1); - } + late final _Dart_GetNativeIsolateGroupDataPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + Dart_NativeArguments)>>('Dart_GetNativeIsolateGroupData'); + late final _Dart_GetNativeIsolateGroupData = + _Dart_GetNativeIsolateGroupDataPtr.asFunction< + ffi.Pointer Function(Dart_NativeArguments)>(); - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Gets the native arguments based on the types passed in and populates + /// the passed arguments buffer with appropriate native values. + /// + /// \param args the Native arguments block passed into the native call. + /// \param num_arguments length of argument descriptor array and argument + /// values array passed in. + /// \param arg_descriptors an array that describes the arguments that + /// need to be retrieved. For each argument to be retrieved the descriptor + /// contains the argument number (0, 1 etc.) and the argument type + /// described using Dart_NativeArgument_Type, e.g: + /// DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kBool, 1) indicates + /// that the first argument is to be retrieved and it should be a boolean. + /// \param arg_values array into which the native arguments need to be + /// extracted into, the array is allocated by the caller (it could be + /// stack allocated to avoid the malloc/free performance overhead). + /// + /// \return Success if all the arguments could be extracted correctly, + /// returns an error handle if there were any errors while extracting the + /// arguments (mismatched number of arguments, incorrect types, etc.). + Object Dart_GetNativeArguments( + Dart_NativeArguments args, + int num_arguments, + ffi.Pointer arg_descriptors, + ffi.Pointer arg_values, + ) { + return _Dart_GetNativeArguments( + args, + num_arguments, + arg_descriptors, + arg_values, + ); } - void getBytes_length_(ffi.Pointer buffer, int length) { - return _lib._objc_msgSend_33( - _id, _lib._sel_getBytes_length_1, buffer, length); - } + late final _Dart_GetNativeArgumentsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_NativeArguments, + ffi.Int, + ffi.Pointer, + ffi.Pointer)>>( + 'Dart_GetNativeArguments'); + late final _Dart_GetNativeArguments = _Dart_GetNativeArgumentsPtr.asFunction< + Object Function( + Dart_NativeArguments, + int, + ffi.Pointer, + ffi.Pointer)>(); - void getBytes_range_(ffi.Pointer buffer, NSRange range) { - return _lib._objc_msgSend_34( - _id, _lib._sel_getBytes_range_1, buffer, range); + /// Gets the native argument at some index. + Object Dart_GetNativeArgument( + Dart_NativeArguments args, + int index, + ) { + return _Dart_GetNativeArgument( + args, + index, + ); } - bool isEqualToData_(NSData? other) { - return _lib._objc_msgSend_35( - _id, _lib._sel_isEqualToData_1, other?._id ?? ffi.nullptr); - } + late final _Dart_GetNativeArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_NativeArguments, ffi.Int)>>('Dart_GetNativeArgument'); + late final _Dart_GetNativeArgument = _Dart_GetNativeArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int)>(); - NSData subdataWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_36(_id, _lib._sel_subdataWithRange_1, range); - return NSData._(_ret, _lib, retain: true, release: true); + /// Gets the number of native arguments. + int Dart_GetNativeArgumentCount( + Dart_NativeArguments args, + ) { + return _Dart_GetNativeArgumentCount( + args, + ); } - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); - } + late final _Dart_GetNativeArgumentCountPtr = + _lookup>( + 'Dart_GetNativeArgumentCount'); + late final _Dart_GetNativeArgumentCount = _Dart_GetNativeArgumentCountPtr + .asFunction(); - /// the atomically flag is ignored if the url is not of a type the supports atomic writes - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); + /// Gets all the native fields of the native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param num_fields size of the intptr_t array 'field_values' passed in. + /// \param field_values intptr_t array in which native field values are returned. + /// \return Success if the native fields where copied in successfully. Otherwise + /// returns an error handle. On success the native field values are copied + /// into the 'field_values' array, if the argument at 'arg_index' is a + /// null object then 0 is copied as the native field values into the + /// 'field_values' array. + Object Dart_GetNativeFieldsOfArgument( + Dart_NativeArguments args, + int arg_index, + int num_fields, + ffi.Pointer field_values, + ) { + return _Dart_GetNativeFieldsOfArgument( + args, + arg_index, + num_fields, + field_values, + ); } - bool writeToFile_options_error_(NSString? path, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_208(_id, _lib._sel_writeToFile_options_error_1, - path?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); - } + late final _Dart_GetNativeFieldsOfArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeFieldsOfArgument'); + late final _Dart_GetNativeFieldsOfArgument = + _Dart_GetNativeFieldsOfArgumentPtr.asFunction< + Object Function( + Dart_NativeArguments, int, int, ffi.Pointer)>(); - bool writeToURL_options_error_(NSURL? url, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_209(_id, _lib._sel_writeToURL_options_error_1, - url?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); + /// Gets the native field of the receiver. + Object Dart_GetNativeReceiver( + Dart_NativeArguments args, + ffi.Pointer value, + ) { + return _Dart_GetNativeReceiver( + args, + value, + ); } - NSRange rangeOfData_options_range_( - NSData? dataToFind, int mask, NSRange searchRange) { - return _lib._objc_msgSend_210(_id, _lib._sel_rangeOfData_options_range_1, - dataToFind?._id ?? ffi.nullptr, mask, searchRange); - } + late final _Dart_GetNativeReceiverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, + ffi.Pointer)>>('Dart_GetNativeReceiver'); + late final _Dart_GetNativeReceiver = _Dart_GetNativeReceiverPtr.asFunction< + Object Function(Dart_NativeArguments, ffi.Pointer)>(); - /// 'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES. - void enumerateByteRangesUsingBlock_(ObjCBlock11 block) { - return _lib._objc_msgSend_211( - _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._id); + /// Gets a string native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param peer Returns the peer pointer if the string argument has one. + /// \return Success if the string argument has a peer, if it does not + /// have a peer then the String object is returned. Otherwise returns + /// an error handle (argument is not a String object). + Object Dart_GetNativeStringArgument( + Dart_NativeArguments args, + int arg_index, + ffi.Pointer> peer, + ) { + return _Dart_GetNativeStringArgument( + args, + arg_index, + peer, + ); } - static NSData data(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetNativeStringArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer>)>>( + 'Dart_GetNativeStringArgument'); + late final _Dart_GetNativeStringArgument = + _Dart_GetNativeStringArgumentPtr.asFunction< + Object Function( + Dart_NativeArguments, int, ffi.Pointer>)>(); - static NSData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212( - _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); + /// Gets an integer native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param value Returns the integer value if the argument is an Integer. + /// \return Success if no error occurs. Otherwise returns an error handle. + Object Dart_GetNativeIntegerArgument( + Dart_NativeArguments args, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeIntegerArgument( + args, + index, + value, + ); } - static NSData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); - } + late final _Dart_GetNativeIntegerArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeIntegerArgument'); + late final _Dart_GetNativeIntegerArgument = + _Dart_GetNativeIntegerArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); - static NSData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - int length, - bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); + /// Gets a boolean native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param value Returns the boolean value if the argument is a Boolean. + /// \return Success if no error occurs. Otherwise returns an error handle. + Object Dart_GetNativeBooleanArgument( + Dart_NativeArguments args, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeBooleanArgument( + args, + index, + value, + ); } - static NSData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetNativeBooleanArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeBooleanArgument'); + late final _Dart_GetNativeBooleanArgument = + _Dart_GetNativeBooleanArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); - static NSData dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); + /// Gets a double native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param value Returns the double value if the argument is a double. + /// \return Success if no error occurs. Otherwise returns an error handle. + Object Dart_GetNativeDoubleArgument( + Dart_NativeArguments args, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeDoubleArgument( + args, + index, + value, + ); } - static NSData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetNativeDoubleArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeDoubleArgument'); + late final _Dart_GetNativeDoubleArgument = + _Dart_GetNativeDoubleArgumentPtr.asFunction< + Object Function( + Dart_NativeArguments, int, ffi.Pointer)>(); - static NSData dataWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + /// Sets the return value for a native function. + /// + /// If retval is an Error handle, then error will be propagated once + /// the native functions exits. See Dart_PropagateError for a + /// discussion of how different types of errors are propagated. + void Dart_SetReturnValue( + Dart_NativeArguments args, + Object retval, + ) { + return _Dart_SetReturnValue( + args, + retval, + ); } - NSData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212( - _id, _lib._sel_initWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final _Dart_SetReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Handle)>>('Dart_SetReturnValue'); + late final _Dart_SetReturnValue = _Dart_SetReturnValuePtr.asFunction< + void Function(Dart_NativeArguments, Object)>(); - NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212( - _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); + void Dart_SetWeakHandleReturnValue( + Dart_NativeArguments args, + Dart_WeakPersistentHandle rval, + ) { + return _Dart_SetWeakHandleReturnValue( + args, + rval, + ); } - NSData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_213(_id, - _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); - } + late final _Dart_SetWeakHandleReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(Dart_NativeArguments, + Dart_WeakPersistentHandle)>>('Dart_SetWeakHandleReturnValue'); + late final _Dart_SetWeakHandleReturnValue = + _Dart_SetWeakHandleReturnValuePtr.asFunction< + void Function(Dart_NativeArguments, Dart_WeakPersistentHandle)>(); - NSData initWithBytesNoCopy_length_deallocator_( - ffi.Pointer bytes, int length, ObjCBlock12 deallocator) { - final _ret = _lib._objc_msgSend_216( - _id, - _lib._sel_initWithBytesNoCopy_length_deallocator_1, - bytes, - length, - deallocator._id); - return NSData._(_ret, _lib, retain: false, release: true); + void Dart_SetBooleanReturnValue( + Dart_NativeArguments args, + bool retval, + ) { + return _Dart_SetBooleanReturnValue( + args, + retval, + ); } - NSData initWithContentsOfFile_options_error_(NSString? path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( - _id, - _lib._sel_initWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final _Dart_SetBooleanReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Bool)>>('Dart_SetBooleanReturnValue'); + late final _Dart_SetBooleanReturnValue = _Dart_SetBooleanReturnValuePtr + .asFunction(); - NSData initWithContentsOfURL_options_error_(NSURL? url, int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( - _id, - _lib._sel_initWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); + void Dart_SetIntegerReturnValue( + Dart_NativeArguments args, + int retval, + ) { + return _Dart_SetIntegerReturnValue( + args, + retval, + ); } - NSData initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final _Dart_SetIntegerReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Int64)>>('Dart_SetIntegerReturnValue'); + late final _Dart_SetIntegerReturnValue = _Dart_SetIntegerReturnValuePtr + .asFunction(); - NSData initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + void Dart_SetDoubleReturnValue( + Dart_NativeArguments args, + double retval, + ) { + return _Dart_SetDoubleReturnValue( + args, + retval, + ); } - NSData initWithData_(NSData? data) { - final _ret = _lib._objc_msgSend_217( - _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final _Dart_SetDoubleReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Double)>>('Dart_SetDoubleReturnValue'); + late final _Dart_SetDoubleReturnValue = _Dart_SetDoubleReturnValuePtr + .asFunction(); - static NSData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + /// Sets the environment callback for the current isolate. This + /// callback is used to lookup environment values by name in the + /// current environment. This enables the embedder to supply values for + /// the const constructors bool.fromEnvironment, int.fromEnvironment + /// and String.fromEnvironment. + Object Dart_SetEnvironmentCallback( + Dart_EnvironmentCallback callback, + ) { + return _Dart_SetEnvironmentCallback( + callback, + ); } - /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. - NSData initWithBase64EncodedString_options_( - NSString? base64String, int options) { - final _ret = _lib._objc_msgSend_218( - _id, - _lib._sel_initWithBase64EncodedString_options_1, - base64String?._id ?? ffi.nullptr, - options); - return NSData._(_ret, _lib, retain: true, release: true); + late final _Dart_SetEnvironmentCallbackPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetEnvironmentCallback'); + late final _Dart_SetEnvironmentCallback = _Dart_SetEnvironmentCallbackPtr + .asFunction(); + + /// Sets the callback used to resolve native functions for a library. + /// + /// \param library A library. + /// \param resolver A native entry resolver. + /// + /// \return A valid handle if the native resolver was set successfully. + Object Dart_SetNativeResolver( + Object library1, + Dart_NativeEntryResolver resolver, + Dart_NativeEntrySymbol symbol, + ) { + return _Dart_SetNativeResolver( + library1, + resolver, + symbol, + ); } - /// Create a Base-64 encoded NSString from the receiver's contents using the given options. - NSString base64EncodedStringWithOptions_(int options) { - final _ret = _lib._objc_msgSend_219( - _id, _lib._sel_base64EncodedStringWithOptions_1, options); - return NSString._(_ret, _lib, retain: true, release: true); + late final _Dart_SetNativeResolverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, Dart_NativeEntryResolver, + Dart_NativeEntrySymbol)>>('Dart_SetNativeResolver'); + late final _Dart_SetNativeResolver = _Dart_SetNativeResolverPtr.asFunction< + Object Function( + Object, Dart_NativeEntryResolver, Dart_NativeEntrySymbol)>(); + + /// Returns the callback used to resolve native functions for a library. + /// + /// \param library A library. + /// \param resolver a pointer to a Dart_NativeEntryResolver + /// + /// \return A valid handle if the library was found. + Object Dart_GetNativeResolver( + Object library1, + ffi.Pointer resolver, + ) { + return _Dart_GetNativeResolver( + library1, + resolver, + ); } - /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. - NSData initWithBase64EncodedData_options_(NSData? base64Data, int options) { - final _ret = _lib._objc_msgSend_220( - _id, - _lib._sel_initWithBase64EncodedData_options_1, - base64Data?._id ?? ffi.nullptr, - options); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetNativeResolverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>( + 'Dart_GetNativeResolver'); + late final _Dart_GetNativeResolver = _Dart_GetNativeResolverPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options. - NSData base64EncodedDataWithOptions_(int options) { - final _ret = _lib._objc_msgSend_221( - _id, _lib._sel_base64EncodedDataWithOptions_1, options); - return NSData._(_ret, _lib, retain: true, release: true); + /// Returns the callback used to resolve native function symbols for a library. + /// + /// \param library A library. + /// \param resolver a pointer to a Dart_NativeEntrySymbol. + /// + /// \return A valid handle if the library was found. + Object Dart_GetNativeSymbol( + Object library1, + ffi.Pointer resolver, + ) { + return _Dart_GetNativeSymbol( + library1, + resolver, + ); } - /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. - NSData decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_222(_id, - _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetNativeSymbolPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer)>>('Dart_GetNativeSymbol'); + late final _Dart_GetNativeSymbol = _Dart_GetNativeSymbolPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - NSData compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_222( - _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); - return NSData._(_ret, _lib, retain: true, release: true); + /// Sets the callback used to resolve FFI native functions for a library. + /// The resolved functions are expected to be a C function pointer of the + /// correct signature (as specified in the `@FfiNative()` function + /// annotation in Dart code). + /// + /// NOTE: This is an experimental feature and might change in the future. + /// + /// \param library A library. + /// \param resolver A native function resolver. + /// + /// \return A valid handle if the native resolver was set successfully. + Object Dart_SetFfiNativeResolver( + Object library1, + Dart_FfiNativeResolver resolver, + ) { + return _Dart_SetFfiNativeResolver( + library1, + resolver, + ); } - void getBytes_(ffi.Pointer buffer) { - return _lib._objc_msgSend_59(_id, _lib._sel_getBytes_1, buffer); - } + late final _Dart_SetFfiNativeResolverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + Dart_FfiNativeResolver)>>('Dart_SetFfiNativeResolver'); + late final _Dart_SetFfiNativeResolver = _Dart_SetFfiNativeResolverPtr + .asFunction(); - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Sets library tag handler for the current isolate. This handler is + /// used to handle the various tags encountered while loading libraries + /// or scripts in the isolate. + /// + /// \param handler Handler code to be used for handling the various tags + /// encountered while loading libraries or scripts in the isolate. + /// + /// \return If no error occurs, the handler is set for the isolate. + /// Otherwise an error handle is returned. + /// + /// TODO(turnidge): Document. + Object Dart_SetLibraryTagHandler( + Dart_LibraryTagHandler handler, + ) { + return _Dart_SetLibraryTagHandler( + handler, + ); } - NSObject initWithContentsOfMappedFile_(NSString? path) { - final _ret = _lib._objc_msgSend_42(_id, - _lib._sel_initWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final _Dart_SetLibraryTagHandlerPtr = + _lookup>( + 'Dart_SetLibraryTagHandler'); + late final _Dart_SetLibraryTagHandler = _Dart_SetLibraryTagHandlerPtr + .asFunction(); - /// These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0. - NSObject initWithBase64Encoding_(NSString? base64String) { - final _ret = _lib._objc_msgSend_42(_id, _lib._sel_initWithBase64Encoding_1, - base64String?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Sets the deferred load handler for the current isolate. This handler is + /// used to handle loading deferred imports in an AppJIT or AppAOT program. + Object Dart_SetDeferredLoadHandler( + Dart_DeferredLoadHandler handler, + ) { + return _Dart_SetDeferredLoadHandler( + handler, + ); } - NSString base64Encoding() { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_base64Encoding1); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_SetDeferredLoadHandlerPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetDeferredLoadHandler'); + late final _Dart_SetDeferredLoadHandler = _Dart_SetDeferredLoadHandlerPtr + .asFunction(); - static NSData new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); - return NSData._(_ret, _lib, retain: false, release: true); + /// Notifies the VM that a deferred load completed successfully. This function + /// will eventually cause the corresponding `prefix.loadLibrary()` futures to + /// complete. + /// + /// Requires the current isolate to be the same current isolate during the + /// invocation of the Dart_DeferredLoadHandler. + Object Dart_DeferredLoadComplete( + int loading_unit_id, + ffi.Pointer snapshot_data, + ffi.Pointer snapshot_instructions, + ) { + return _Dart_DeferredLoadComplete( + loading_unit_id, + snapshot_data, + snapshot_instructions, + ); } - static NSData alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); - return NSData._(_ret, _lib, retain: false, release: true); + late final _Dart_DeferredLoadCompletePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.IntPtr, ffi.Pointer, + ffi.Pointer)>>('Dart_DeferredLoadComplete'); + late final _Dart_DeferredLoadComplete = + _Dart_DeferredLoadCompletePtr.asFunction< + Object Function( + int, ffi.Pointer, ffi.Pointer)>(); + + /// Notifies the VM that a deferred load failed. This function + /// will eventually cause the corresponding `prefix.loadLibrary()` futures to + /// complete with an error. + /// + /// If `transient` is true, future invocations of `prefix.loadLibrary()` will + /// trigger new load requests. If false, futures invocation will complete with + /// the same error. + /// + /// Requires the current isolate to be the same current isolate during the + /// invocation of the Dart_DeferredLoadHandler. + Object Dart_DeferredLoadCompleteError( + int loading_unit_id, + ffi.Pointer error_message, + bool transient, + ) { + return _Dart_DeferredLoadCompleteError( + loading_unit_id, + error_message, + transient, + ); } -} -class NSURL extends NSObject { - NSURL._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final _Dart_DeferredLoadCompleteErrorPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.IntPtr, ffi.Pointer, + ffi.Bool)>>('Dart_DeferredLoadCompleteError'); + late final _Dart_DeferredLoadCompleteError = + _Dart_DeferredLoadCompleteErrorPtr.asFunction< + Object Function(int, ffi.Pointer, bool)>(); - /// Returns a [NSURL] that points to the same underlying object as [other]. - static NSURL castFrom(T other) { - return NSURL._(other._id, other._lib, retain: true, release: true); + /// Canonicalizes a url with respect to some library. + /// + /// The url is resolved with respect to the library's url and some url + /// normalizations are performed. + /// + /// This canonicalization function should be sufficient for most + /// embedders to implement the Dart_kCanonicalizeUrl tag. + /// + /// \param base_url The base url relative to which the url is + /// being resolved. + /// \param url The url being resolved and canonicalized. This + /// parameter is a string handle. + /// + /// \return If no error occurs, a String object is returned. Otherwise + /// an error handle is returned. + Object Dart_DefaultCanonicalizeUrl( + Object base_url, + Object url, + ) { + return _Dart_DefaultCanonicalizeUrl( + base_url, + url, + ); } - /// Returns a [NSURL] that wraps the given raw object pointer. - static NSURL castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURL._(other, lib, retain: retain, release: release); - } + late final _Dart_DefaultCanonicalizeUrlPtr = + _lookup>( + 'Dart_DefaultCanonicalizeUrl'); + late final _Dart_DefaultCanonicalizeUrl = _Dart_DefaultCanonicalizeUrlPtr + .asFunction(); - /// Returns whether [obj] is an instance of [NSURL]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); + /// Loads the root library for the current isolate. + /// + /// Requires there to be no current root library. + /// + /// \param buffer A buffer which contains a kernel binary (see + /// pkg/kernel/binary.md). Must remain valid until isolate group shutdown. + /// \param buffer_size Length of the passed in buffer. + /// + /// \return A handle to the root library, or an error. + Object Dart_LoadScriptFromKernel( + ffi.Pointer kernel_buffer, + int kernel_size, + ) { + return _Dart_LoadScriptFromKernel( + kernel_buffer, + kernel_size, + ); } - /// this call percent-encodes both the host and path, so this cannot be used to set a username/password or port in the hostname part or with a IPv6 '[...]' type address. NSURLComponents handles IPv6 addresses correctly. - NSURL initWithScheme_host_path_( - NSString? scheme, NSString? host, NSString? path) { - final _ret = _lib._objc_msgSend_38( - _id, - _lib._sel_initWithScheme_host_path_1, - scheme?._id ?? ffi.nullptr, - host?._id ?? ffi.nullptr, - path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_LoadScriptFromKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_LoadScriptFromKernel'); + late final _Dart_LoadScriptFromKernel = _Dart_LoadScriptFromKernelPtr + .asFunction, int)>(); - /// Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL. - NSURL initFileURLWithPath_isDirectory_relativeToURL_( - NSString? path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_39( - _id, - _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, - path?._id ?? ffi.nullptr, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + /// Gets the library for the root script for the current isolate. + /// + /// If the root script has not yet been set for the current isolate, + /// this function returns Dart_Null(). This function never returns an + /// error handle. + /// + /// \return Returns the root Library for the current isolate or Dart_Null(). + Object Dart_RootLibrary() { + return _Dart_RootLibrary(); } - /// Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. - NSURL initFileURLWithPath_relativeToURL_(NSString? path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_40( - _id, - _lib._sel_initFileURLWithPath_relativeToURL_1, - path?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_RootLibraryPtr = + _lookup>('Dart_RootLibrary'); + late final _Dart_RootLibrary = + _Dart_RootLibraryPtr.asFunction(); - NSURL initFileURLWithPath_isDirectory_(NSString? path, bool isDir) { - final _ret = _lib._objc_msgSend_41( - _id, - _lib._sel_initFileURLWithPath_isDirectory_1, - path?._id ?? ffi.nullptr, - isDir); - return NSURL._(_ret, _lib, retain: true, release: true); + /// Sets the root library for the current isolate. + /// + /// \return Returns an error handle if `library` is not a library handle. + Object Dart_SetRootLibrary( + Object library1, + ) { + return _Dart_SetRootLibrary( + library1, + ); } - /// Better to use initFileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. - NSURL initFileURLWithPath_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initFileURLWithPath_1, path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_SetRootLibraryPtr = + _lookup>( + 'Dart_SetRootLibrary'); + late final _Dart_SetRootLibrary = + _Dart_SetRootLibraryPtr.asFunction(); - /// Initializes and returns a newly created file NSURL referencing the local file or directory at path, relative to a base URL. - static NSURL fileURLWithPath_isDirectory_relativeToURL_( - NativeCupertinoHttp _lib, NSString? path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_43( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, - path?._id ?? ffi.nullptr, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + /// Lookup or instantiate a legacy type by name and type arguments from a + /// Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The class name for the type. + /// \param number_of_type_arguments Number of type arguments. + /// For non parametric types the number of type arguments would be 0. + /// \param type_arguments Pointer to an array of type arguments. + /// For non parameteric types a NULL would be passed in for this argument. + /// + /// \return If no error occurs, the type is returned. + /// Otherwise an error handle is returned. + Object Dart_GetType( + Object library1, + Object class_name, + int number_of_type_arguments, + ffi.Pointer type_arguments, + ) { + return _Dart_GetType( + library1, + class_name, + number_of_type_arguments, + type_arguments, + ); } - /// Better to use fileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. - static NSURL fileURLWithPath_relativeToURL_( - NativeCupertinoHttp _lib, NSString? path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_44( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_relativeToURL_1, - path?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_GetType'); + late final _Dart_GetType = _Dart_GetTypePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); - static NSURL fileURLWithPath_isDirectory_( - NativeCupertinoHttp _lib, NSString? path, bool isDir) { - final _ret = _lib._objc_msgSend_45( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_1, - path?._id ?? ffi.nullptr, - isDir); - return NSURL._(_ret, _lib, retain: true, release: true); + /// Lookup or instantiate a nullable type by name and type arguments from + /// Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The class name for the type. + /// \param number_of_type_arguments Number of type arguments. + /// For non parametric types the number of type arguments would be 0. + /// \param type_arguments Pointer to an array of type arguments. + /// For non parameteric types a NULL would be passed in for this argument. + /// + /// \return If no error occurs, the type is returned. + /// Otherwise an error handle is returned. + Object Dart_GetNullableType( + Object library1, + Object class_name, + int number_of_type_arguments, + ffi.Pointer type_arguments, + ) { + return _Dart_GetNullableType( + library1, + class_name, + number_of_type_arguments, + type_arguments, + ); } - /// Better to use fileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. - static NSURL fileURLWithPath_(NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_46(_lib._class_NSURL1, - _lib._sel_fileURLWithPath_1, path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_GetNullableType'); + late final _Dart_GetNullableType = _Dart_GetNullableTypePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); - /// Initializes a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. - NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_47( - _id, - _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + /// Lookup or instantiate a non-nullable type by name and type arguments from + /// Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The class name for the type. + /// \param number_of_type_arguments Number of type arguments. + /// For non parametric types the number of type arguments would be 0. + /// \param type_arguments Pointer to an array of type arguments. + /// For non parameteric types a NULL would be passed in for this argument. + /// + /// \return If no error occurs, the type is returned. + /// Otherwise an error handle is returned. + Object Dart_GetNonNullableType( + Object library1, + Object class_name, + int number_of_type_arguments, + ffi.Pointer type_arguments, + ) { + return _Dart_GetNonNullableType( + library1, + class_name, + number_of_type_arguments, + type_arguments, + ); } - /// Initializes and returns a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. - static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - NativeCupertinoHttp _lib, - ffi.Pointer path, - bool isDir, - NSURL? baseURL) { - final _ret = _lib._objc_msgSend_48( - _lib._class_NSURL1, - _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetNonNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_GetNonNullableType'); + late final _Dart_GetNonNullableType = _Dart_GetNonNullableTypePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); - /// These methods expect their string arguments to contain any percent escape codes that are necessary. It is an error for URLString to be nil. - NSURL initWithString_(NSString? URLString) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + /// Creates a nullable version of the provided type. + /// + /// \param type The type to be converted to a nullable type. + /// + /// \return If no error occurs, a nullable type is returned. + /// Otherwise an error handle is returned. + Object Dart_TypeToNullableType( + Object type, + ) { + return _Dart_TypeToNullableType( + type, + ); } - NSURL initWithString_relativeToURL_(NSString? URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_40( - _id, - _lib._sel_initWithString_relativeToURL_1, - URLString?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_TypeToNullableTypePtr = + _lookup>( + 'Dart_TypeToNullableType'); + late final _Dart_TypeToNullableType = + _Dart_TypeToNullableTypePtr.asFunction(); - static NSURL URLWithString_(NativeCupertinoHttp _lib, NSString? URLString) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSURL1, - _lib._sel_URLWithString_1, URLString?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + /// Creates a non-nullable version of the provided type. + /// + /// \param type The type to be converted to a non-nullable type. + /// + /// \return If no error occurs, a non-nullable type is returned. + /// Otherwise an error handle is returned. + Object Dart_TypeToNonNullableType( + Object type, + ) { + return _Dart_TypeToNonNullableType( + type, + ); } - static NSURL URLWithString_relativeToURL_( - NativeCupertinoHttp _lib, NSString? URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_40( - _lib._class_NSURL1, - _lib._sel_URLWithString_relativeToURL_1, - URLString?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_TypeToNonNullableTypePtr = + _lookup>( + 'Dart_TypeToNonNullableType'); + late final _Dart_TypeToNonNullableType = + _Dart_TypeToNonNullableTypePtr.asFunction(); - /// Initializes a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - NSURL initWithDataRepresentation_relativeToURL_( - NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_49( - _id, - _lib._sel_initWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + /// A type's nullability. + /// + /// \param type A Dart type. + /// \param result An out parameter containing the result of the check. True if + /// the type is of the specified nullability, false otherwise. + /// + /// \return Returns an error handle if type is not of type Type. + Object Dart_IsNullableType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsNullableType( + type, + result, + ); } - /// Initializes and returns a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - static NSURL URLWithDataRepresentation_relativeToURL_( - NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_50( - _lib._class_NSURL1, - _lib._sel_URLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IsNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IsNullableType'); + late final _Dart_IsNullableType = _Dart_IsNullableTypePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Initializes a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( - NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_49( - _id, - _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + Object Dart_IsNonNullableType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsNonNullableType( + type, + result, + ); } - /// Initializes and returns a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - static NSURL absoluteURLWithDataRepresentation_relativeToURL_( - NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_50( - _lib._class_NSURL1, - _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IsNonNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IsNonNullableType'); + late final _Dart_IsNonNullableType = _Dart_IsNonNullableTypePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Returns the data representation of the URL's relativeString. If the URL was initialized with -initWithData:relativeToURL:, the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with NSUTF8StringEncoding. - NSData? get dataRepresentation { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_dataRepresentation1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + Object Dart_IsLegacyType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsLegacyType( + type, + result, + ); } - NSString? get absoluteString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_absoluteString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IsLegacyTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IsLegacyType'); + late final _Dart_IsLegacyType = _Dart_IsLegacyTypePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// The relative portion of a URL. If baseURL is nil, or if the receiver is itself absolute, this is the same as absoluteString - NSString? get relativeString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativeString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Lookup a class or interface by name from a Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The name of the class or interface. + /// + /// \return If no error occurs, the class or interface is + /// returned. Otherwise an error handle is returned. + Object Dart_GetClass( + Object library1, + Object class_name, + ) { + return _Dart_GetClass( + library1, + class_name, + ); } - /// may be nil. - NSURL? get baseURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_baseURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetClassPtr = + _lookup>( + 'Dart_GetClass'); + late final _Dart_GetClass = + _Dart_GetClassPtr.asFunction(); - /// if the receiver is itself absolute, this will return self. - NSURL? get absoluteURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_absoluteURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + /// Returns an import path to a Library, such as "file:///test.dart" or + /// "dart:core". + Object Dart_LibraryUrl( + Object library1, + ) { + return _Dart_LibraryUrl( + library1, + ); } - /// Any URL is composed of these two basic pieces. The full URL would be the concatenation of [myURL scheme], ':', [myURL resourceSpecifier] - NSString? get scheme { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_LibraryUrlPtr = + _lookup>( + 'Dart_LibraryUrl'); + late final _Dart_LibraryUrl = + _Dart_LibraryUrlPtr.asFunction(); - NSString? get resourceSpecifier { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_resourceSpecifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Returns a URL from which a Library was loaded. + Object Dart_LibraryResolvedUrl( + Object library1, + ) { + return _Dart_LibraryResolvedUrl( + library1, + ); } - /// If the URL conforms to rfc 1808 (the most common form of URL), the following accessors will return the various components; otherwise they return nil. The litmus test for conformance is as recommended in RFC 1808 - whether the first two characters of resourceSpecifier is @"//". In all cases, they return the component's value after resolving the receiver against its base URL. - NSString? get host { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_LibraryResolvedUrlPtr = + _lookup>( + 'Dart_LibraryResolvedUrl'); + late final _Dart_LibraryResolvedUrl = + _Dart_LibraryResolvedUrlPtr.asFunction(); - NSNumber? get port { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + /// \return An array of libraries. + Object Dart_GetLoadedLibraries() { + return _Dart_GetLoadedLibraries(); } - NSString? get user { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetLoadedLibrariesPtr = + _lookup>( + 'Dart_GetLoadedLibraries'); + late final _Dart_GetLoadedLibraries = + _Dart_GetLoadedLibrariesPtr.asFunction(); - NSString? get password { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + Object Dart_LookupLibrary( + Object url, + ) { + return _Dart_LookupLibrary( + url, + ); } - NSString? get path { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_LookupLibraryPtr = + _lookup>( + 'Dart_LookupLibrary'); + late final _Dart_LookupLibrary = + _Dart_LookupLibraryPtr.asFunction(); - NSString? get fragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Report an loading error for the library. + /// + /// \param library The library that failed to load. + /// \param error The Dart error instance containing the load error. + /// + /// \return If the VM handles the error, the return value is + /// a null handle. If it doesn't handle the error, the error + /// object is returned. + Object Dart_LibraryHandleError( + Object library1, + Object error, + ) { + return _Dart_LibraryHandleError( + library1, + error, + ); } - NSString? get parameterString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_parameterString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_LibraryHandleErrorPtr = + _lookup>( + 'Dart_LibraryHandleError'); + late final _Dart_LibraryHandleError = + _Dart_LibraryHandleErrorPtr.asFunction(); - NSString? get query { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Called by the embedder to load a partial program. Does not set the root + /// library. + /// + /// \param buffer A buffer which contains a kernel binary (see + /// pkg/kernel/binary.md). Must remain valid until isolate shutdown. + /// \param buffer_size Length of the passed in buffer. + /// + /// \return A handle to the main library of the compilation unit, or an error. + Object Dart_LoadLibraryFromKernel( + ffi.Pointer kernel_buffer, + int kernel_buffer_size, + ) { + return _Dart_LoadLibraryFromKernel( + kernel_buffer, + kernel_buffer_size, + ); } - /// The same as path if baseURL is nil - NSString? get relativePath { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativePath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_LoadLibraryFromKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_LoadLibraryFromKernel'); + late final _Dart_LoadLibraryFromKernel = _Dart_LoadLibraryFromKernelPtr + .asFunction, int)>(); - /// Determines if a given URL string's path represents a directory (i.e. the path component in the URL string ends with a '/' character). This does not check the resource the URL refers to. - bool get hasDirectoryPath { - return _lib._objc_msgSend_11(_id, _lib._sel_hasDirectoryPath1); + /// Indicates that all outstanding load requests have been satisfied. + /// This finalizes all the new classes loaded and optionally completes + /// deferred library futures. + /// + /// Requires there to be a current isolate. + /// + /// \param complete_futures Specify true if all deferred library + /// futures should be completed, false otherwise. + /// + /// \return Success if all classes have been finalized and deferred library + /// futures are completed. Otherwise, returns an error. + Object Dart_FinalizeLoading( + bool complete_futures, + ) { + return _Dart_FinalizeLoading( + complete_futures, + ); } - /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer buffer, int maxBufferLength) { - return _lib._objc_msgSend_90( - _id, - _lib._sel_getFileSystemRepresentation_maxLength_1, - buffer, - maxBufferLength); - } + late final _Dart_FinalizeLoadingPtr = + _lookup>( + 'Dart_FinalizeLoading'); + late final _Dart_FinalizeLoading = + _Dart_FinalizeLoadingPtr.asFunction(); - /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. The returned C string will be automatically freed just as a returned object would be released; your code should copy the representation or use getFileSystemRepresentation:maxLength: if it needs to store the representation outside of the autorelease context in which the representation is created. - ffi.Pointer get fileSystemRepresentation { - return _lib._objc_msgSend_53(_id, _lib._sel_fileSystemRepresentation1); + /// Returns the value of peer field of 'object' in 'peer'. + /// + /// \param object An object. + /// \param peer An out parameter that returns the value of the peer + /// field. + /// + /// \return Returns an error if 'object' is a subtype of Null, num, or + /// bool. + Object Dart_GetPeer( + Object object, + ffi.Pointer> peer, + ) { + return _Dart_GetPeer( + object, + peer, + ); } - /// Whether the scheme is file:; if [myURL isFileURL] is YES, then [myURL path] is suitable for input into NSFileManager or NSPathUtilities. - bool get fileURL { - return _lib._objc_msgSend_11(_id, _lib._sel_isFileURL1); - } + late final _Dart_GetPeerPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer>)>>('Dart_GetPeer'); + late final _Dart_GetPeer = _Dart_GetPeerPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); - NSURL? get standardizedURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_standardizedURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + /// Sets the value of the peer field of 'object' to the value of + /// 'peer'. + /// + /// \param object An object. + /// \param peer A value to store in the peer field. + /// + /// \return Returns an error if 'object' is a subtype of Null, num, or + /// bool. + Object Dart_SetPeer( + Object object, + ffi.Pointer peer, + ) { + return _Dart_SetPeer( + object, + peer, + ); } - /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. - bool checkResourceIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_183( - _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); - } + late final _Dart_SetPeerPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_SetPeer'); + late final _Dart_SetPeer = _Dart_SetPeerPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Returns whether the URL is a file reference URL. Symbol is present in iOS 4, but performs no operation. - bool isFileReferenceURL() { - return _lib._objc_msgSend_11(_id, _lib._sel_isFileReferenceURL1); + bool Dart_IsKernelIsolate( + Dart_Isolate isolate, + ) { + return _Dart_IsKernelIsolate( + isolate, + ); } - /// Returns a file reference URL that refers to the same resource as a specified file URL. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:). Symbol is present in iOS 4, but performs no operation. - NSURL fileReferenceURL() { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileReferenceURL1); - return NSURL._(_ret, _lib, retain: true, release: true); + late final _Dart_IsKernelIsolatePtr = + _lookup>( + 'Dart_IsKernelIsolate'); + late final _Dart_IsKernelIsolate = + _Dart_IsKernelIsolatePtr.asFunction(); + + bool Dart_KernelIsolateIsRunning() { + return _Dart_KernelIsolateIsRunning(); } - /// Returns a file path URL that refers to the same resource as a specified URL. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. Symbol is present in iOS 4, but performs no operation. - NSURL? get filePathURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_filePathURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + late final _Dart_KernelIsolateIsRunningPtr = + _lookup>( + 'Dart_KernelIsolateIsRunning'); + late final _Dart_KernelIsolateIsRunning = + _Dart_KernelIsolateIsRunningPtr.asFunction(); + + int Dart_KernelPort() { + return _Dart_KernelPort(); } - /// Returns the resource value identified by a given resource key. This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this method returns YES and value is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool getResourceValue_forKey_error_( - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_184( - _id, _lib._sel_getResourceValue_forKey_error_1, value, key, error); + late final _Dart_KernelPortPtr = + _lookup>('Dart_KernelPort'); + late final _Dart_KernelPort = + _Dart_KernelPortPtr.asFunction(); + + /// Compiles the given `script_uri` to a kernel file. + /// + /// \param platform_kernel A buffer containing the kernel of the platform (e.g. + /// `vm_platform_strong.dill`). The VM does not take ownership of this memory. + /// + /// \param platform_kernel_size The length of the platform_kernel buffer. + /// + /// \param snapshot_compile Set to `true` when the compilation is for a snapshot. + /// This is used by the frontend to determine if compilation related information + /// should be printed to console (e.g., null safety mode). + /// + /// \param verbosity Specifies the logging behavior of the kernel compilation + /// service. + /// + /// \return Returns the result of the compilation. + /// + /// On a successful compilation the returned [Dart_KernelCompilationResult] has + /// a status of [Dart_KernelCompilationStatus_Ok] and the `kernel`/`kernel_size` + /// fields are set. The caller takes ownership of the malloc()ed buffer. + /// + /// On a failed compilation the `error` might be set describing the reason for + /// the failed compilation. The caller takes ownership of the malloc()ed + /// error. + /// + /// Requires there to be a current isolate. + Dart_KernelCompilationResult Dart_CompileToKernel( + ffi.Pointer script_uri, + ffi.Pointer platform_kernel, + int platform_kernel_size, + bool incremental_compile, + bool snapshot_compile, + ffi.Pointer package_config, + int verbosity, + ) { + return _Dart_CompileToKernel( + script_uri, + platform_kernel, + platform_kernel_size, + incremental_compile, + snapshot_compile, + package_config, + verbosity, + ); } - /// Returns the resource values identified by specified array of resource keys. This method first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this method returns NULL, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - NSDictionary resourceValuesForKeys_error_( - NSArray? keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_185( - _id, - _lib._sel_resourceValuesForKeys_error_1, - keys?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + late final _Dart_CompileToKernelPtr = _lookup< + ffi.NativeFunction< + Dart_KernelCompilationResult Function( + ffi.Pointer, + ffi.Pointer, + ffi.IntPtr, + ffi.Bool, + ffi.Bool, + ffi.Pointer, + ffi.Int32)>>('Dart_CompileToKernel'); + late final _Dart_CompileToKernel = _Dart_CompileToKernelPtr.asFunction< + Dart_KernelCompilationResult Function( + ffi.Pointer, + ffi.Pointer, + int, + bool, + bool, + ffi.Pointer, + int)>(); - /// Sets the resource value identified by a given resource key. This method writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool setResourceValue_forKey_error_(NSObject value, NSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_186( - _id, _lib._sel_setResourceValue_forKey_error_1, value._id, key, error); + Dart_KernelCompilationResult Dart_KernelListDependencies() { + return _Dart_KernelListDependencies(); } - /// Sets any number of resource values of a URL's resource. This method writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to this method or to -setResourceValue:forKey:error: to guarantee the order. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool setResourceValues_error_( - NSDictionary? keyedValues, ffi.Pointer> error) { - return _lib._objc_msgSend_187(_id, _lib._sel_setResourceValues_error_1, - keyedValues?._id ?? ffi.nullptr, error); - } + late final _Dart_KernelListDependenciesPtr = + _lookup>( + 'Dart_KernelListDependencies'); + late final _Dart_KernelListDependencies = _Dart_KernelListDependenciesPtr + .asFunction(); - /// Removes the cached resource value identified by a given resource value key from the URL object. Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources. - void removeCachedResourceValueForKey_(NSURLResourceKey key) { - return _lib._objc_msgSend_188( - _id, _lib._sel_removeCachedResourceValueForKey_1, key); + /// Sets the kernel buffer which will be used to load Dart SDK sources + /// dynamically at runtime. + /// + /// \param platform_kernel A buffer containing kernel which has sources for the + /// Dart SDK populated. Note: The VM does not take ownership of this memory. + /// + /// \param platform_kernel_size The length of the platform_kernel buffer. + void Dart_SetDartLibrarySourcesKernel( + ffi.Pointer platform_kernel, + int platform_kernel_size, + ) { + return _Dart_SetDartLibrarySourcesKernel( + platform_kernel, + platform_kernel_size, + ); } - /// Removes all cached resource values and all temporary resource values from the URL object. This method is currently applicable only to URLs for file system resources. - void removeAllCachedResourceValues() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); - } + late final _Dart_SetDartLibrarySourcesKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_SetDartLibrarySourcesKernel'); + late final _Dart_SetDartLibrarySourcesKernel = + _Dart_SetDartLibrarySourcesKernelPtr.asFunction< + void Function(ffi.Pointer, int)>(); - /// Sets a temporary resource value on the URL object. Temporary resource values are for client use. Temporary resource values exist only in memory and are never written to the resource's backing store. Once set, a temporary resource value can be copied from the URL object with -getResourceValue:forKey:error: or -resourceValuesForKeys:error:. To remove a temporary resource value from the URL object, use -removeCachedResourceValueForKey:. Care should be taken to ensure the key that identifies a temporary resource value is unique and does not conflict with system defined keys (using reverse domain name notation in your temporary resource value keys is recommended). This method is currently applicable only to URLs for file system resources. - void setTemporaryResourceValue_forKey_(NSObject value, NSURLResourceKey key) { - return _lib._objc_msgSend_189( - _id, _lib._sel_setTemporaryResourceValue_forKey_1, value._id, key); + /// Detect the null safety opt-in status. + /// + /// When running from source, it is based on the opt-in status of `script_uri`. + /// When running from a kernel buffer, it is based on the mode used when + /// generating `kernel_buffer`. + /// When running from an appJIT or AOT snapshot, it is based on the mode used + /// when generating `snapshot_data`. + /// + /// \param script_uri Uri of the script that contains the source code + /// + /// \param package_config Uri of the package configuration file (either in format + /// of .packages or .dart_tool/package_config.json) for the null safety + /// detection to resolve package imports against. If this parameter is not + /// passed the package resolution of the parent isolate should be used. + /// + /// \param original_working_directory current working directory when the VM + /// process was launched, this is used to correctly resolve the path specified + /// for package_config. + /// + /// \param snapshot_data + /// + /// \param snapshot_instructions Buffers containing a snapshot of the + /// isolate or NULL if no snapshot is provided. If provided, the buffers must + /// remain valid until the isolate shuts down. + /// + /// \param kernel_buffer + /// + /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must + /// remain valid until isolate shutdown. + /// + /// \return Returns true if the null safety is opted in by the input being + /// run `script_uri`, `snapshot_data` or `kernel_buffer`. + bool Dart_DetectNullSafety( + ffi.Pointer script_uri, + ffi.Pointer package_config, + ffi.Pointer original_working_directory, + ffi.Pointer snapshot_data, + ffi.Pointer snapshot_instructions, + ffi.Pointer kernel_buffer, + int kernel_buffer_size, + ) { + return _Dart_DetectNullSafety( + script_uri, + package_config, + original_working_directory, + snapshot_data, + snapshot_instructions, + kernel_buffer, + kernel_buffer_size, + ); } - /// Returns bookmark data for the URL, created with specified options and resource values. If this method returns nil, the optional error is populated. - NSData - bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( - int options, - NSArray? keys, - NSURL? relativeURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_190( - _id, - _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, - options, - keys?._id ?? ffi.nullptr, - relativeURL?._id ?? ffi.nullptr, - error); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final _Dart_DetectNullSafetyPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.IntPtr)>>('Dart_DetectNullSafety'); + late final _Dart_DetectNullSafety = _Dart_DetectNullSafetyPtr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - /// Initializes a newly created NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. - NSURL - initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NSData? bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_191( - _id, - _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData?._id ?? ffi.nullptr, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return NSURL._(_ret, _lib, retain: true, release: true); + /// Returns true if isolate is the service isolate. + /// + /// \param isolate An isolate + /// + /// \return Returns true if 'isolate' is the service isolate. + bool Dart_IsServiceIsolate( + Dart_Isolate isolate, + ) { + return _Dart_IsServiceIsolate( + isolate, + ); } - /// Creates and Initializes an NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. - static NSURL - URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NativeCupertinoHttp _lib, - NSData? bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_191( - _lib._class_NSURL1, - _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData?._id ?? ffi.nullptr, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_IsServiceIsolatePtr = + _lookup>( + 'Dart_IsServiceIsolate'); + late final _Dart_IsServiceIsolate = + _Dart_IsServiceIsolatePtr.asFunction(); - /// Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available in the bookmark data. - static NSDictionary resourceValuesForKeys_fromBookmarkData_( - NativeCupertinoHttp _lib, NSArray? keys, NSData? bookmarkData) { - final _ret = _lib._objc_msgSend_192( - _lib._class_NSURL1, - _lib._sel_resourceValuesForKeys_fromBookmarkData_1, - keys?._id ?? ffi.nullptr, - bookmarkData?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + /// Writes the CPU profile to the timeline as a series of 'instant' events. + /// + /// Note that this is an expensive operation. + /// + /// \param main_port The main port of the Isolate whose profile samples to write. + /// \param error An optional error, must be free()ed by caller. + /// + /// \return Returns true if the profile is successfully written and false + /// otherwise. + bool Dart_WriteProfileToTimeline( + int main_port, + ffi.Pointer> error, + ) { + return _Dart_WriteProfileToTimeline( + main_port, + error, + ); } - /// Creates an alias file on disk at a specified location with specified bookmark data. bookmarkData must have been created with the NSURLBookmarkCreationSuitableForBookmarkFile option. bookmarkFileURL must either refer to an existing file (which will be overwritten), or to location in an existing directory. If this method returns NO, the optional error is populated. - static bool writeBookmarkData_toURL_options_error_( - NativeCupertinoHttp _lib, - NSData? bookmarkData, - NSURL? bookmarkFileURL, - int options, - ffi.Pointer> error) { - return _lib._objc_msgSend_193( - _lib._class_NSURL1, - _lib._sel_writeBookmarkData_toURL_options_error_1, - bookmarkData?._id ?? ffi.nullptr, - bookmarkFileURL?._id ?? ffi.nullptr, - options, - error); - } + late final _Dart_WriteProfileToTimelinePtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + Dart_Port, ffi.Pointer>)>>( + 'Dart_WriteProfileToTimeline'); + late final _Dart_WriteProfileToTimeline = _Dart_WriteProfileToTimelinePtr + .asFunction>)>(); - /// Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. If bookmarkFileURL refers to an alias file created prior to OS X v10.6 that contains Alias Manager information but no bookmark data, this method synthesizes bookmark data for the file. If this method returns nil, the optional error is populated. - static NSData bookmarkDataWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? bookmarkFileURL, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_194( - _lib._class_NSURL1, - _lib._sel_bookmarkDataWithContentsOfURL_error_1, - bookmarkFileURL?._id ?? ffi.nullptr, - error); - return NSData._(_ret, _lib, retain: true, release: true); + /// Compiles all functions reachable from entry points and marks + /// the isolate to disallow future compilation. + /// + /// Entry points should be specified using `@pragma("vm:entry-point")` + /// annotation. + /// + /// \return An error handle if a compilation error or runtime error running const + /// constructors was encountered. + Object Dart_Precompile() { + return _Dart_Precompile(); } - /// Creates and initializes a NSURL that refers to the location specified by resolving the alias file at url. If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, the NSURL returned is the same as url argument. This method fails and returns nil if the url argument is unreachable, or if the original file or directory could not be located or is not reachable, or if the original file or directory is on a volume that could not be located or mounted. If this method fails, the optional error is populated. The NSURLBookmarkResolutionWithSecurityScope option is not supported by this method. - static NSURL URLByResolvingAliasFileAtURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int options, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_195( - _lib._class_NSURL1, - _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, - url?._id ?? ffi.nullptr, - options, - error); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_PrecompilePtr = + _lookup>('Dart_Precompile'); + late final _Dart_Precompile = + _Dart_PrecompilePtr.asFunction(); - /// Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. When access to this resource is no longer needed the client must call stopAccessingSecurityScopedResource. Each call to startAccessingSecurityScopedResource must be balanced with a call to stopAccessingSecurityScopedResource (Note: this is not reference counted). - bool startAccessingSecurityScopedResource() { - return _lib._objc_msgSend_11( - _id, _lib._sel_startAccessingSecurityScopedResource1); + Object Dart_LoadingUnitLibraryUris( + int loading_unit_id, + ) { + return _Dart_LoadingUnitLibraryUris( + loading_unit_id, + ); } - /// Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource. - void stopAccessingSecurityScopedResource() { - return _lib._objc_msgSend_1( - _id, _lib._sel_stopAccessingSecurityScopedResource1); - } + late final _Dart_LoadingUnitLibraryUrisPtr = + _lookup>( + 'Dart_LoadingUnitLibraryUris'); + late final _Dart_LoadingUnitLibraryUris = + _Dart_LoadingUnitLibraryUrisPtr.asFunction(); - /// Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: - /// - NSMetadataQueryUbiquitousDataScope - /// - NSMetadataQueryUbiquitousDocumentsScope - /// - An NSFilePresenter presenting the contents of the directory located by -URLForUbiquitousContainerIdentifier: or a subdirectory thereof + /// Creates a precompiled snapshot. + /// - A root library must have been loaded. + /// - Dart_Precompile must have been called. /// - /// The following methods behave identically to their similarly named methods above (-getResourceValue:forKey:error:, etc.), except that they allow you to get resource values and check for presence regardless of whether the promised item's contents currently exist at the URL. You must use these APIs instead of the normal NSURL resource value APIs if and only if any of the following are true: - /// - You are using a URL that you know came directly from one of the above APIs - /// - You are inside the accessor block of a coordinated read or write that used NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingContentIndependentMetadataOnly + /// Outputs an assembly file defining the symbols listed in the definitions + /// above. /// - /// Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. - bool getPromisedItemResourceValue_forKey_error_( - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_184( - _id, - _lib._sel_getPromisedItemResourceValue_forKey_error_1, - value, - key, - error); + /// The assembly should be compiled as a static or shared library and linked or + /// loaded by the embedder. Running this snapshot requires a VM compiled with + /// DART_PRECOMPILED_SNAPSHOT. The kDartVmSnapshotData and + /// kDartVmSnapshotInstructions should be passed to Dart_Initialize. The + /// kDartIsolateSnapshotData and kDartIsolateSnapshotInstructions should be + /// passed to Dart_CreateIsolateGroup. + /// + /// The callback will be invoked one or more times to provide the assembly code. + /// + /// If stripped is true, then the assembly code will not include DWARF + /// debugging sections. + /// + /// If debug_callback_data is provided, debug_callback_data will be used with + /// the callback to provide separate debugging information. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateAppAOTSnapshotAsAssembly( + Dart_StreamingWriteCallback callback, + ffi.Pointer callback_data, + bool stripped, + ffi.Pointer debug_callback_data, + ) { + return _Dart_CreateAppAOTSnapshotAsAssembly( + callback, + callback_data, + stripped, + debug_callback_data, + ); } - NSDictionary promisedItemResourceValuesForKeys_error_( - NSArray? keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_185( - _id, - _lib._sel_promisedItemResourceValuesForKeys_error_1, - keys?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + late final _Dart_CreateAppAOTSnapshotAsAssemblyPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_StreamingWriteCallback, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsAssembly'); + late final _Dart_CreateAppAOTSnapshotAsAssembly = + _Dart_CreateAppAOTSnapshotAsAssemblyPtr.asFunction< + Object Function(Dart_StreamingWriteCallback, ffi.Pointer, + bool, ffi.Pointer)>(); - bool checkPromisedItemIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_183( - _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); + Object Dart_CreateAppAOTSnapshotAsAssemblies( + Dart_CreateLoadingUnitCallback next_callback, + ffi.Pointer next_callback_data, + bool stripped, + Dart_StreamingWriteCallback write_callback, + Dart_StreamingCloseCallback close_callback, + ) { + return _Dart_CreateAppAOTSnapshotAsAssemblies( + next_callback, + next_callback_data, + stripped, + write_callback, + close_callback, + ); } - /// The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. - static NSURL fileURLWithPathComponents_( - NativeCupertinoHttp _lib, NSArray? components) { - final _ret = _lib._objc_msgSend_196(_lib._class_NSURL1, - _lib._sel_fileURLWithPathComponents_1, components?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_CreateAppAOTSnapshotAsAssembliesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + ffi.Bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>>( + 'Dart_CreateAppAOTSnapshotAsAssemblies'); + late final _Dart_CreateAppAOTSnapshotAsAssemblies = + _Dart_CreateAppAOTSnapshotAsAssembliesPtr.asFunction< + Object Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>(); - NSArray? get pathComponents { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_pathComponents1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + /// Creates a precompiled snapshot. + /// - A root library must have been loaded. + /// - Dart_Precompile must have been called. + /// + /// Outputs an ELF shared library defining the symbols + /// - _kDartVmSnapshotData + /// - _kDartVmSnapshotInstructions + /// - _kDartIsolateSnapshotData + /// - _kDartIsolateSnapshotInstructions + /// + /// The shared library should be dynamically loaded by the embedder. + /// Running this snapshot requires a VM compiled with DART_PRECOMPILED_SNAPSHOT. + /// The kDartVmSnapshotData and kDartVmSnapshotInstructions should be passed to + /// Dart_Initialize. The kDartIsolateSnapshotData and + /// kDartIsolateSnapshotInstructions should be passed to Dart_CreateIsolate. + /// + /// The callback will be invoked one or more times to provide the binary output. + /// + /// If stripped is true, then the binary output will not include DWARF + /// debugging sections. + /// + /// If debug_callback_data is provided, debug_callback_data will be used with + /// the callback to provide separate debugging information. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateAppAOTSnapshotAsElf( + Dart_StreamingWriteCallback callback, + ffi.Pointer callback_data, + bool stripped, + ffi.Pointer debug_callback_data, + ) { + return _Dart_CreateAppAOTSnapshotAsElf( + callback, + callback_data, + stripped, + debug_callback_data, + ); } - NSString? get lastPathComponent { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lastPathComponent1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + late final _Dart_CreateAppAOTSnapshotAsElfPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_StreamingWriteCallback, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsElf'); + late final _Dart_CreateAppAOTSnapshotAsElf = + _Dart_CreateAppAOTSnapshotAsElfPtr.asFunction< + Object Function(Dart_StreamingWriteCallback, ffi.Pointer, + bool, ffi.Pointer)>(); + + Object Dart_CreateAppAOTSnapshotAsElfs( + Dart_CreateLoadingUnitCallback next_callback, + ffi.Pointer next_callback_data, + bool stripped, + Dart_StreamingWriteCallback write_callback, + Dart_StreamingCloseCallback close_callback, + ) { + return _Dart_CreateAppAOTSnapshotAsElfs( + next_callback, + next_callback_data, + stripped, + write_callback, + close_callback, + ); } - NSString? get pathExtension { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_pathExtension1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final _Dart_CreateAppAOTSnapshotAsElfsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + ffi.Bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>>('Dart_CreateAppAOTSnapshotAsElfs'); + late final _Dart_CreateAppAOTSnapshotAsElfs = + _Dart_CreateAppAOTSnapshotAsElfsPtr.asFunction< + Object Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>(); - NSURL URLByAppendingPathComponent_(NSString? pathComponent) { - final _ret = _lib._objc_msgSend_46( - _id, - _lib._sel_URLByAppendingPathComponent_1, - pathComponent?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + /// Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes + /// kDartVmSnapshotData and kDartVmSnapshotInstructions. It also does + /// not strip DWARF information from the generated assembly or allow for + /// separate debug information. + Object Dart_CreateVMAOTSnapshotAsAssembly( + Dart_StreamingWriteCallback callback, + ffi.Pointer callback_data, + ) { + return _Dart_CreateVMAOTSnapshotAsAssembly( + callback, + callback_data, + ); } - NSURL URLByAppendingPathComponent_isDirectory_( - NSString? pathComponent, bool isDirectory) { - final _ret = _lib._objc_msgSend_45( - _id, - _lib._sel_URLByAppendingPathComponent_isDirectory_1, - pathComponent?._id ?? ffi.nullptr, - isDirectory); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_CreateVMAOTSnapshotAsAssemblyPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_StreamingWriteCallback, + ffi.Pointer)>>('Dart_CreateVMAOTSnapshotAsAssembly'); + late final _Dart_CreateVMAOTSnapshotAsAssembly = + _Dart_CreateVMAOTSnapshotAsAssemblyPtr.asFunction< + Object Function( + Dart_StreamingWriteCallback, ffi.Pointer)>(); - NSURL? get URLByDeletingLastPathComponent { - final _ret = - _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingLastPathComponent1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + /// Sorts the class-ids in depth first traversal order of the inheritance + /// tree. This is a costly operation, but it can make method dispatch + /// more efficient and is done before writing snapshots. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_SortClasses() { + return _Dart_SortClasses(); } - NSURL URLByAppendingPathExtension_(NSString? pathExtension) { - final _ret = _lib._objc_msgSend_46( - _id, - _lib._sel_URLByAppendingPathExtension_1, - pathExtension?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_SortClassesPtr = + _lookup>('Dart_SortClasses'); + late final _Dart_SortClasses = + _Dart_SortClassesPtr.asFunction(); - NSURL? get URLByDeletingPathExtension { - final _ret = - _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingPathExtension1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + /// Creates a snapshot that caches compiled code and type feedback for faster + /// startup and quicker warmup in a subsequent process. + /// + /// Outputs a snapshot in two pieces. The pieces should be passed to + /// Dart_CreateIsolateGroup in a VM using the same VM snapshot pieces used in the + /// current VM. The instructions piece must be loaded with read and execute + /// permissions; the data piece may be loaded as read-only. + /// + /// - Requires the VM to have not been started with --precompilation. + /// - Not supported when targeting IA32. + /// - The VM writing the snapshot and the VM reading the snapshot must be the + /// same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must + /// be targeting the same architecture, and must both be in checked mode or + /// both in unchecked mode. + /// + /// The buffers are scope allocated and are only valid until the next call to + /// Dart_ExitScope. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateAppJITSnapshotAsBlobs( + ffi.Pointer> isolate_snapshot_data_buffer, + ffi.Pointer isolate_snapshot_data_size, + ffi.Pointer> isolate_snapshot_instructions_buffer, + ffi.Pointer isolate_snapshot_instructions_size, + ) { + return _Dart_CreateAppJITSnapshotAsBlobs( + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + isolate_snapshot_instructions_buffer, + isolate_snapshot_instructions_size, + ); } - /// The following methods work only on `file:` scheme URLs; for non-`file:` scheme URLs, these methods return the URL unchanged. - NSURL? get URLByStandardizingPath { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URLByStandardizingPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + late final _Dart_CreateAppJITSnapshotAsBlobsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('Dart_CreateAppJITSnapshotAsBlobs'); + late final _Dart_CreateAppJITSnapshotAsBlobs = + _Dart_CreateAppJITSnapshotAsBlobsPtr.asFunction< + Object Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); - NSURL? get URLByResolvingSymlinksInPath { - final _ret = - _lib._objc_msgSend_52(_id, _lib._sel_URLByResolvingSymlinksInPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + /// Like Dart_CreateAppJITSnapshotAsBlobs, but also creates a new VM snapshot. + Object Dart_CreateCoreJITSnapshotAsBlobs( + ffi.Pointer> vm_snapshot_data_buffer, + ffi.Pointer vm_snapshot_data_size, + ffi.Pointer> vm_snapshot_instructions_buffer, + ffi.Pointer vm_snapshot_instructions_size, + ffi.Pointer> isolate_snapshot_data_buffer, + ffi.Pointer isolate_snapshot_data_size, + ffi.Pointer> isolate_snapshot_instructions_buffer, + ffi.Pointer isolate_snapshot_instructions_size, + ) { + return _Dart_CreateCoreJITSnapshotAsBlobs( + vm_snapshot_data_buffer, + vm_snapshot_data_size, + vm_snapshot_instructions_buffer, + vm_snapshot_instructions_size, + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + isolate_snapshot_instructions_buffer, + isolate_snapshot_instructions_size, + ); } - /// Blocks to load the data if necessary. If shouldUseCache is YES, then if an equivalent URL has already been loaded and cached, its resource data will be returned immediately. If shouldUseCache is NO, a new load will be started - NSData resourceDataUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_197( - _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final _Dart_CreateCoreJITSnapshotAsBlobsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('Dart_CreateCoreJITSnapshotAsBlobs'); + late final _Dart_CreateCoreJITSnapshotAsBlobs = + _Dart_CreateCoreJITSnapshotAsBlobsPtr.asFunction< + Object Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); - /// Starts an asynchronous load of the data, registering delegate to receive notification. Only one such background load can proceed at a time. - void loadResourceDataNotifyingClient_usingCache_( - NSObject client, bool shouldUseCache) { - return _lib._objc_msgSend_198( - _id, - _lib._sel_loadResourceDataNotifyingClient_usingCache_1, - client._id, - shouldUseCache); + /// Get obfuscation map for precompiled code. + /// + /// Obfuscation map is encoded as a JSON array of pairs (original name, + /// obfuscated name). + /// + /// \return Returns an error handler if the VM was built in a mode that does not + /// support obfuscation. + Object Dart_GetObfuscationMap( + ffi.Pointer> buffer, + ffi.Pointer buffer_length, + ) { + return _Dart_GetObfuscationMap( + buffer, + buffer_length, + ); } - NSObject propertyForKey_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final _Dart_GetObfuscationMapPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer>, + ffi.Pointer)>>('Dart_GetObfuscationMap'); + late final _Dart_GetObfuscationMap = _Dart_GetObfuscationMapPtr.asFunction< + Object Function( + ffi.Pointer>, ffi.Pointer)>(); - /// These attempt to write the given arguments for the resource specified by the URL; they return success or failure - bool setResourceData_(NSData? data) { - return _lib._objc_msgSend_35( - _id, _lib._sel_setResourceData_1, data?._id ?? ffi.nullptr); + /// Returns whether the VM only supports running from precompiled snapshots and + /// not from any other kind of snapshot or from source (that is, the VM was + /// compiled with DART_PRECOMPILED_RUNTIME). + bool Dart_IsPrecompiledRuntime() { + return _Dart_IsPrecompiledRuntime(); } - bool setProperty_forKey_(NSObject property, NSString? propertyKey) { - return _lib._objc_msgSend_199(_id, _lib._sel_setProperty_forKey_1, - property._id, propertyKey?._id ?? ffi.nullptr); - } + late final _Dart_IsPrecompiledRuntimePtr = + _lookup>( + 'Dart_IsPrecompiledRuntime'); + late final _Dart_IsPrecompiledRuntime = + _Dart_IsPrecompiledRuntimePtr.asFunction(); - /// Sophisticated clients will want to ask for this, then message the handle directly. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded - NSURLHandle URLHandleUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_207( - _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); - return NSURLHandle._(_ret, _lib, retain: true, release: true); + /// Print a native stack trace. Used for crash handling. + /// + /// If context is NULL, prints the current stack trace. Otherwise, context + /// should be a CONTEXT* (Windows) or ucontext_t* (POSIX) from a signal handler + /// running on the current thread. + void Dart_DumpNativeStackTrace( + ffi.Pointer context, + ) { + return _Dart_DumpNativeStackTrace( + context, + ); } - static NSURL new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); - return NSURL._(_ret, _lib, retain: false, release: true); - } + late final _Dart_DumpNativeStackTracePtr = + _lookup)>>( + 'Dart_DumpNativeStackTrace'); + late final _Dart_DumpNativeStackTrace = _Dart_DumpNativeStackTracePtr + .asFunction)>(); - static NSURL alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); - return NSURL._(_ret, _lib, retain: false, release: true); + /// Indicate that the process is about to abort, and the Dart VM should not + /// attempt to cleanup resources. + void Dart_PrepareToAbort() { + return _Dart_PrepareToAbort(); } -} - -class NSNumber extends NSValue { - NSNumber._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSNumber] that points to the same underlying object as [other]. - static NSNumber castFrom(T other) { - return NSNumber._(other._id, other._lib, retain: true, release: true); - } + late final _Dart_PrepareToAbortPtr = + _lookup>('Dart_PrepareToAbort'); + late final _Dart_PrepareToAbort = + _Dart_PrepareToAbortPtr.asFunction(); - /// Returns a [NSNumber] that wraps the given raw object pointer. - static NSNumber castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumber._(other, lib, retain: retain, release: release); + /// Posts a message on some port. The message will contain the Dart_CObject + /// object graph rooted in 'message'. + /// + /// While the message is being sent the state of the graph of Dart_CObject + /// structures rooted in 'message' should not be accessed, as the message + /// generation will make temporary modifications to the data. When the message + /// has been sent the graph will be fully restored. + /// + /// If true is returned, the message was enqueued, and finalizers for external + /// typed data will eventually run, even if the receiving isolate shuts down + /// before processing the message. If false is returned, the message was not + /// enqueued and ownership of external typed data in the message remains with the + /// caller. + /// + /// This function may be called on any thread when the VM is running (that is, + /// after Dart_Initialize has returned and before Dart_Cleanup has been called). + /// + /// \param port_id The destination port. + /// \param message The message to send. + /// + /// \return True if the message was posted. + bool Dart_PostCObject( + int port_id, + ffi.Pointer message, + ) { + return _Dart_PostCObject( + port_id, + message, + ); } - /// Returns whether [obj] is an instance of [NSNumber]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); - } + late final _Dart_PostCObjectPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + Dart_Port, ffi.Pointer)>>('Dart_PostCObject'); + late final _Dart_PostCObject = _Dart_PostCObjectPtr.asFunction< + bool Function(int, ffi.Pointer)>(); - @override - NSNumber initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// Posts a message on some port. The message will contain the integer 'message'. + /// + /// \param port_id The destination port. + /// \param message The message to send. + /// + /// \return True if the message was posted. + bool Dart_PostInteger( + int port_id, + int message, + ) { + return _Dart_PostInteger( + port_id, + message, + ); } - NSNumber initWithChar_(int value) { - final _ret = _lib._objc_msgSend_62(_id, _lib._sel_initWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final _Dart_PostIntegerPtr = + _lookup>( + 'Dart_PostInteger'); + late final _Dart_PostInteger = + _Dart_PostIntegerPtr.asFunction(); - NSNumber initWithUnsignedChar_(int value) { - final _ret = - _lib._objc_msgSend_63(_id, _lib._sel_initWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// Creates a new native port. When messages are received on this + /// native port, then they will be dispatched to the provided native + /// message handler. + /// + /// \param name The name of this port in debugging messages. + /// \param handler The C handler to run when messages arrive on the port. + /// \param handle_concurrently Is it okay to process requests on this + /// native port concurrently? + /// + /// \return If successful, returns the port id for the native port. In + /// case of error, returns ILLEGAL_PORT. + int Dart_NewNativePort( + ffi.Pointer name, + Dart_NativeMessageHandler handler, + bool handle_concurrently, + ) { + return _Dart_NewNativePort( + name, + handler, + handle_concurrently, + ); } - NSNumber initWithShort_(int value) { - final _ret = _lib._objc_msgSend_64(_id, _lib._sel_initWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final _Dart_NewNativePortPtr = _lookup< + ffi.NativeFunction< + Dart_Port Function(ffi.Pointer, Dart_NativeMessageHandler, + ffi.Bool)>>('Dart_NewNativePort'); + late final _Dart_NewNativePort = _Dart_NewNativePortPtr.asFunction< + int Function(ffi.Pointer, Dart_NativeMessageHandler, bool)>(); - NSNumber initWithUnsignedShort_(int value) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_initWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// Closes the native port with the given id. + /// + /// The port must have been allocated by a call to Dart_NewNativePort. + /// + /// \param native_port_id The id of the native port to close. + /// + /// \return Returns true if the port was closed successfully. + bool Dart_CloseNativePort( + int native_port_id, + ) { + return _Dart_CloseNativePort( + native_port_id, + ); } - NSNumber initWithInt_(int value) { - final _ret = _lib._objc_msgSend_66(_id, _lib._sel_initWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final _Dart_CloseNativePortPtr = + _lookup>( + 'Dart_CloseNativePort'); + late final _Dart_CloseNativePort = + _Dart_CloseNativePortPtr.asFunction(); - NSNumber initWithUnsignedInt_(int value) { - final _ret = - _lib._objc_msgSend_67(_id, _lib._sel_initWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// Forces all loaded classes and functions to be compiled eagerly in + /// the current isolate.. + /// + /// TODO(turnidge): Document. + Object Dart_CompileAll() { + return _Dart_CompileAll(); } - NSNumber initWithLong_(int value) { - final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final _Dart_CompileAllPtr = + _lookup>('Dart_CompileAll'); + late final _Dart_CompileAll = + _Dart_CompileAllPtr.asFunction(); - NSNumber initWithUnsignedLong_(int value) { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// Finalizes all classes. + Object Dart_FinalizeAllClasses() { + return _Dart_FinalizeAllClasses(); } - NSNumber initWithLongLong_(int value) { - final _ret = - _lib._objc_msgSend_70(_id, _lib._sel_initWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final _Dart_FinalizeAllClassesPtr = + _lookup>( + 'Dart_FinalizeAllClasses'); + late final _Dart_FinalizeAllClasses = + _Dart_FinalizeAllClassesPtr.asFunction(); - NSNumber initWithUnsignedLongLong_(int value) { - final _ret = - _lib._objc_msgSend_71(_id, _lib._sel_initWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// This function is intentionally undocumented. + /// + /// It should not be used outside internal tests. + ffi.Pointer Dart_ExecuteInternalCommand( + ffi.Pointer command, + ffi.Pointer arg, + ) { + return _Dart_ExecuteInternalCommand( + command, + arg, + ); } - NSNumber initWithFloat_(double value) { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_initWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final _Dart_ExecuteInternalCommandPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>('Dart_ExecuteInternalCommand'); + late final _Dart_ExecuteInternalCommand = + _Dart_ExecuteInternalCommandPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - NSNumber initWithDouble_(double value) { - final _ret = _lib._objc_msgSend_73(_id, _lib._sel_initWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// \mainpage Dynamically Linked Dart API + /// + /// This exposes a subset of symbols from dart_api.h and dart_native_api.h + /// available in every Dart embedder through dynamic linking. + /// + /// All symbols are postfixed with _DL to indicate that they are dynamically + /// linked and to prevent conflicts with the original symbol. + /// + /// Link `dart_api_dl.c` file into your library and invoke + /// `Dart_InitializeApiDL` with `NativeApi.initializeApiDLData`. + int Dart_InitializeApiDL( + ffi.Pointer data, + ) { + return _Dart_InitializeApiDL( + data, + ); } - NSNumber initWithBool_(bool value) { - final _ret = _lib._objc_msgSend_74(_id, _lib._sel_initWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final _Dart_InitializeApiDLPtr = + _lookup)>>( + 'Dart_InitializeApiDL'); + late final _Dart_InitializeApiDL = _Dart_InitializeApiDLPtr.asFunction< + int Function(ffi.Pointer)>(); - NSNumber initWithInteger_(int value) { - final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer _Dart_PostCObject_DL = + _lookup('Dart_PostCObject_DL'); - NSNumber initWithUnsignedInteger_(int value) { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + Dart_PostCObject_Type get Dart_PostCObject_DL => _Dart_PostCObject_DL.value; - int get charValue { - return _lib._objc_msgSend_75(_id, _lib._sel_charValue1); - } + set Dart_PostCObject_DL(Dart_PostCObject_Type value) => + _Dart_PostCObject_DL.value = value; - int get unsignedCharValue { - return _lib._objc_msgSend_76(_id, _lib._sel_unsignedCharValue1); - } + late final ffi.Pointer _Dart_PostInteger_DL = + _lookup('Dart_PostInteger_DL'); - int get shortValue { - return _lib._objc_msgSend_77(_id, _lib._sel_shortValue1); - } + Dart_PostInteger_Type get Dart_PostInteger_DL => _Dart_PostInteger_DL.value; - int get unsignedShortValue { - return _lib._objc_msgSend_78(_id, _lib._sel_unsignedShortValue1); - } + set Dart_PostInteger_DL(Dart_PostInteger_Type value) => + _Dart_PostInteger_DL.value = value; - int get intValue { - return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); - } + late final ffi.Pointer _Dart_NewNativePort_DL = + _lookup('Dart_NewNativePort_DL'); - int get unsignedIntValue { - return _lib._objc_msgSend_80(_id, _lib._sel_unsignedIntValue1); - } + Dart_NewNativePort_Type get Dart_NewNativePort_DL => + _Dart_NewNativePort_DL.value; - int get longValue { - return _lib._objc_msgSend_81(_id, _lib._sel_longValue1); - } + set Dart_NewNativePort_DL(Dart_NewNativePort_Type value) => + _Dart_NewNativePort_DL.value = value; - int get unsignedLongValue { - return _lib._objc_msgSend_12(_id, _lib._sel_unsignedLongValue1); - } + late final ffi.Pointer _Dart_CloseNativePort_DL = + _lookup('Dart_CloseNativePort_DL'); - int get longLongValue { - return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); - } + Dart_CloseNativePort_Type get Dart_CloseNativePort_DL => + _Dart_CloseNativePort_DL.value; - int get unsignedLongLongValue { - return _lib._objc_msgSend_83(_id, _lib._sel_unsignedLongLongValue1); - } + set Dart_CloseNativePort_DL(Dart_CloseNativePort_Type value) => + _Dart_CloseNativePort_DL.value = value; - double get floatValue { - return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); - } + late final ffi.Pointer _Dart_IsError_DL = + _lookup('Dart_IsError_DL'); - double get doubleValue { - return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); - } + Dart_IsError_Type get Dart_IsError_DL => _Dart_IsError_DL.value; - bool get boolValue { - return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); - } + set Dart_IsError_DL(Dart_IsError_Type value) => + _Dart_IsError_DL.value = value; - int get integerValue { - return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); - } + late final ffi.Pointer _Dart_IsApiError_DL = + _lookup('Dart_IsApiError_DL'); - int get unsignedIntegerValue { - return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); - } + Dart_IsApiError_Type get Dart_IsApiError_DL => _Dart_IsApiError_DL.value; - NSString? get stringValue { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_stringValue1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + set Dart_IsApiError_DL(Dart_IsApiError_Type value) => + _Dart_IsApiError_DL.value = value; - int compare_(NSNumber? otherNumber) { - return _lib._objc_msgSend_86( - _id, _lib._sel_compare_1, otherNumber?._id ?? ffi.nullptr); - } + late final ffi.Pointer + _Dart_IsUnhandledExceptionError_DL = + _lookup( + 'Dart_IsUnhandledExceptionError_DL'); - bool isEqualToNumber_(NSNumber? number) { - return _lib._objc_msgSend_87( - _id, _lib._sel_isEqualToNumber_1, number?._id ?? ffi.nullptr); - } + Dart_IsUnhandledExceptionError_Type get Dart_IsUnhandledExceptionError_DL => + _Dart_IsUnhandledExceptionError_DL.value; - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } + set Dart_IsUnhandledExceptionError_DL( + Dart_IsUnhandledExceptionError_Type value) => + _Dart_IsUnhandledExceptionError_DL.value = value; - static NSNumber numberWithChar_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_62( - _lib._class_NSNumber1, _lib._sel_numberWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_IsCompilationError_DL = + _lookup('Dart_IsCompilationError_DL'); - static NSNumber numberWithUnsignedChar_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_63( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + Dart_IsCompilationError_Type get Dart_IsCompilationError_DL => + _Dart_IsCompilationError_DL.value; - static NSNumber numberWithShort_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_64( - _lib._class_NSNumber1, _lib._sel_numberWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + set Dart_IsCompilationError_DL(Dart_IsCompilationError_Type value) => + _Dart_IsCompilationError_DL.value = value; - static NSNumber numberWithUnsignedShort_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer _Dart_IsFatalError_DL = + _lookup('Dart_IsFatalError_DL'); - static NSNumber numberWithInt_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_66( - _lib._class_NSNumber1, _lib._sel_numberWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + Dart_IsFatalError_Type get Dart_IsFatalError_DL => + _Dart_IsFatalError_DL.value; - static NSNumber numberWithUnsignedInt_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_67( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + set Dart_IsFatalError_DL(Dart_IsFatalError_Type value) => + _Dart_IsFatalError_DL.value = value; - static NSNumber numberWithLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_68( - _lib._class_NSNumber1, _lib._sel_numberWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer _Dart_GetError_DL = + _lookup('Dart_GetError_DL'); - static NSNumber numberWithUnsignedLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + Dart_GetError_Type get Dart_GetError_DL => _Dart_GetError_DL.value; - static NSNumber numberWithLongLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_70( - _lib._class_NSNumber1, _lib._sel_numberWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + set Dart_GetError_DL(Dart_GetError_Type value) => + _Dart_GetError_DL.value = value; - static NSNumber numberWithUnsignedLongLong_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_71( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_ErrorHasException_DL = + _lookup('Dart_ErrorHasException_DL'); - static NSNumber numberWithFloat_(NativeCupertinoHttp _lib, double value) { - final _ret = _lib._objc_msgSend_72( - _lib._class_NSNumber1, _lib._sel_numberWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + Dart_ErrorHasException_Type get Dart_ErrorHasException_DL => + _Dart_ErrorHasException_DL.value; - static NSNumber numberWithDouble_(NativeCupertinoHttp _lib, double value) { - final _ret = _lib._objc_msgSend_73( - _lib._class_NSNumber1, _lib._sel_numberWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + set Dart_ErrorHasException_DL(Dart_ErrorHasException_Type value) => + _Dart_ErrorHasException_DL.value = value; - static NSNumber numberWithBool_(NativeCupertinoHttp _lib, bool value) { - final _ret = _lib._objc_msgSend_74( - _lib._class_NSNumber1, _lib._sel_numberWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_ErrorGetException_DL = + _lookup('Dart_ErrorGetException_DL'); - static NSNumber numberWithInteger_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_68( - _lib._class_NSNumber1, _lib._sel_numberWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + Dart_ErrorGetException_Type get Dart_ErrorGetException_DL => + _Dart_ErrorGetException_DL.value; - static NSNumber numberWithUnsignedInteger_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + set Dart_ErrorGetException_DL(Dart_ErrorGetException_Type value) => + _Dart_ErrorGetException_DL.value = value; - static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55(_lib._class_NSNumber1, - _lib._sel_valueWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_ErrorGetStackTrace_DL = + _lookup('Dart_ErrorGetStackTrace_DL'); - static NSValue value_withObjCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSNumber1, _lib._sel_value_withObjCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } + Dart_ErrorGetStackTrace_Type get Dart_ErrorGetStackTrace_DL => + _Dart_ErrorGetStackTrace_DL.value; - static NSValue valueWithNonretainedObject_( - NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_56(_lib._class_NSNumber1, - _lib._sel_valueWithNonretainedObject_1, anObject._id); - return NSValue._(_ret, _lib, retain: true, release: true); - } + set Dart_ErrorGetStackTrace_DL(Dart_ErrorGetStackTrace_Type value) => + _Dart_ErrorGetStackTrace_DL.value = value; - static NSValue valueWithPointer_( - NativeCupertinoHttp _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_57( - _lib._class_NSNumber1, _lib._sel_valueWithPointer_1, pointer); - return NSValue._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer _Dart_NewApiError_DL = + _lookup('Dart_NewApiError_DL'); - static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_60( - _lib._class_NSNumber1, _lib._sel_valueWithRange_1, range); - return NSValue._(_ret, _lib, retain: true, release: true); - } + Dart_NewApiError_Type get Dart_NewApiError_DL => _Dart_NewApiError_DL.value; - static NSNumber new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } + set Dart_NewApiError_DL(Dart_NewApiError_Type value) => + _Dart_NewApiError_DL.value = value; - static NSNumber alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } -} + late final ffi.Pointer + _Dart_NewCompilationError_DL = + _lookup('Dart_NewCompilationError_DL'); -class NSValue extends NSObject { - NSValue._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + Dart_NewCompilationError_Type get Dart_NewCompilationError_DL => + _Dart_NewCompilationError_DL.value; - /// Returns a [NSValue] that points to the same underlying object as [other]. - static NSValue castFrom(T other) { - return NSValue._(other._id, other._lib, retain: true, release: true); - } + set Dart_NewCompilationError_DL(Dart_NewCompilationError_Type value) => + _Dart_NewCompilationError_DL.value = value; - /// Returns a [NSValue] that wraps the given raw object pointer. - static NSValue castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSValue._(other, lib, retain: retain, release: release); - } + late final ffi.Pointer + _Dart_NewUnhandledExceptionError_DL = + _lookup( + 'Dart_NewUnhandledExceptionError_DL'); - /// Returns whether [obj] is an instance of [NSValue]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); - } + Dart_NewUnhandledExceptionError_Type get Dart_NewUnhandledExceptionError_DL => + _Dart_NewUnhandledExceptionError_DL.value; - void getValue_size_(ffi.Pointer value, int size) { - return _lib._objc_msgSend_33(_id, _lib._sel_getValue_size_1, value, size); - } + set Dart_NewUnhandledExceptionError_DL( + Dart_NewUnhandledExceptionError_Type value) => + _Dart_NewUnhandledExceptionError_DL.value = value; - ffi.Pointer get objCType { - return _lib._objc_msgSend_53(_id, _lib._sel_objCType1); - } + late final ffi.Pointer _Dart_PropagateError_DL = + _lookup('Dart_PropagateError_DL'); - NSValue initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_54( - _id, _lib._sel_initWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } + Dart_PropagateError_Type get Dart_PropagateError_DL => + _Dart_PropagateError_DL.value; - NSValue initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSValue._(_ret, _lib, retain: true, release: true); - } + set Dart_PropagateError_DL(Dart_PropagateError_Type value) => + _Dart_PropagateError_DL.value = value; - static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSValue1, _lib._sel_valueWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_HandleFromPersistent_DL = + _lookup('Dart_HandleFromPersistent_DL'); - static NSValue value_withObjCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSValue1, _lib._sel_value_withObjCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } + Dart_HandleFromPersistent_Type get Dart_HandleFromPersistent_DL => + _Dart_HandleFromPersistent_DL.value; - static NSValue valueWithNonretainedObject_( - NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_56(_lib._class_NSValue1, - _lib._sel_valueWithNonretainedObject_1, anObject._id); - return NSValue._(_ret, _lib, retain: true, release: true); - } + set Dart_HandleFromPersistent_DL(Dart_HandleFromPersistent_Type value) => + _Dart_HandleFromPersistent_DL.value = value; - NSObject get nonretainedObjectValue { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nonretainedObjectValue1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_HandleFromWeakPersistent_DL = + _lookup( + 'Dart_HandleFromWeakPersistent_DL'); - static NSValue valueWithPointer_( - NativeCupertinoHttp _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_57( - _lib._class_NSValue1, _lib._sel_valueWithPointer_1, pointer); - return NSValue._(_ret, _lib, retain: true, release: true); - } + Dart_HandleFromWeakPersistent_Type get Dart_HandleFromWeakPersistent_DL => + _Dart_HandleFromWeakPersistent_DL.value; - ffi.Pointer get pointerValue { - return _lib._objc_msgSend_31(_id, _lib._sel_pointerValue1); - } + set Dart_HandleFromWeakPersistent_DL( + Dart_HandleFromWeakPersistent_Type value) => + _Dart_HandleFromWeakPersistent_DL.value = value; - bool isEqualToValue_(NSValue? value) { - return _lib._objc_msgSend_58( - _id, _lib._sel_isEqualToValue_1, value?._id ?? ffi.nullptr); - } + late final ffi.Pointer + _Dart_NewPersistentHandle_DL = + _lookup('Dart_NewPersistentHandle_DL'); - void getValue_(ffi.Pointer value) { - return _lib._objc_msgSend_59(_id, _lib._sel_getValue_1, value); - } + Dart_NewPersistentHandle_Type get Dart_NewPersistentHandle_DL => + _Dart_NewPersistentHandle_DL.value; - static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_60( - _lib._class_NSValue1, _lib._sel_valueWithRange_1, range); - return NSValue._(_ret, _lib, retain: true, release: true); - } + set Dart_NewPersistentHandle_DL(Dart_NewPersistentHandle_Type value) => + _Dart_NewPersistentHandle_DL.value = value; - NSRange get rangeValue { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeValue1); - } + late final ffi.Pointer + _Dart_SetPersistentHandle_DL = + _lookup('Dart_SetPersistentHandle_DL'); - static NSValue new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); - return NSValue._(_ret, _lib, retain: false, release: true); - } + Dart_SetPersistentHandle_Type get Dart_SetPersistentHandle_DL => + _Dart_SetPersistentHandle_DL.value; - static NSValue alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); - return NSValue._(_ret, _lib, retain: false, release: true); - } -} + set Dart_SetPersistentHandle_DL(Dart_SetPersistentHandle_Type value) => + _Dart_SetPersistentHandle_DL.value = value; -typedef NSInteger = ffi.Long; + late final ffi.Pointer + _Dart_DeletePersistentHandle_DL = + _lookup( + 'Dart_DeletePersistentHandle_DL'); -class NSError extends NSObject { - NSError._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + Dart_DeletePersistentHandle_Type get Dart_DeletePersistentHandle_DL => + _Dart_DeletePersistentHandle_DL.value; - /// Returns a [NSError] that points to the same underlying object as [other]. - static NSError castFrom(T other) { - return NSError._(other._id, other._lib, retain: true, release: true); - } + set Dart_DeletePersistentHandle_DL(Dart_DeletePersistentHandle_Type value) => + _Dart_DeletePersistentHandle_DL.value = value; - /// Returns a [NSError] that wraps the given raw object pointer. - static NSError castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSError._(other, lib, retain: retain, release: release); - } + late final ffi.Pointer + _Dart_NewWeakPersistentHandle_DL = + _lookup( + 'Dart_NewWeakPersistentHandle_DL'); - /// Returns whether [obj] is an instance of [NSError]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); - } + Dart_NewWeakPersistentHandle_Type get Dart_NewWeakPersistentHandle_DL => + _Dart_NewWeakPersistentHandle_DL.value; - /// Domain cannot be nil; dict may be nil if no userInfo desired. - NSError initWithDomain_code_userInfo_( - NSErrorDomain domain, int code, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_179( - _id, - _lib._sel_initWithDomain_code_userInfo_1, - domain, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } + set Dart_NewWeakPersistentHandle_DL( + Dart_NewWeakPersistentHandle_Type value) => + _Dart_NewWeakPersistentHandle_DL.value = value; - static NSError errorWithDomain_code_userInfo_(NativeCupertinoHttp _lib, - NSErrorDomain domain, int code, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_179( - _lib._class_NSError1, - _lib._sel_errorWithDomain_code_userInfo_1, - domain, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_DeleteWeakPersistentHandle_DL = + _lookup( + 'Dart_DeleteWeakPersistentHandle_DL'); - /// These define the error. Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts. Codes are domain-specific. - NSErrorDomain get domain { - return _lib._objc_msgSend_32(_id, _lib._sel_domain1); - } + Dart_DeleteWeakPersistentHandle_Type get Dart_DeleteWeakPersistentHandle_DL => + _Dart_DeleteWeakPersistentHandle_DL.value; - int get code { - return _lib._objc_msgSend_81(_id, _lib._sel_code1); - } + set Dart_DeleteWeakPersistentHandle_DL( + Dart_DeleteWeakPersistentHandle_Type value) => + _Dart_DeleteWeakPersistentHandle_DL.value = value; - /// Additional info which may be used to describe the error further. Examples of keys that might be included in here are "Line Number", "Failed URL", etc. Embedding other errors in here can also be used as a way to communicate underlying reasons for failures; for instance "File System Error" embedded in the userInfo of an NSError returned from a higher level document object. If the embedded error information is itself NSError, the standard key NSUnderlyingErrorKey can be used. - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_UpdateExternalSize_DL = + _lookup('Dart_UpdateExternalSize_DL'); - /// The primary user-presentable message for the error, for instance for NSFileReadNoPermissionError: "The file "File Name" couldn't be opened because you don't have permission to view it.". This message should ideally indicate what failed and why it failed. This value either comes from NSLocalizedDescriptionKey, or NSLocalizedFailureErrorKey+NSLocalizedFailureReasonErrorKey, or NSLocalizedFailureErrorKey. The steps this takes to construct the description include: - /// 1. Look for NSLocalizedDescriptionKey in userInfo, use value as-is if present. - /// 2. Look for NSLocalizedFailureErrorKey in userInfo. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. - /// 3. Fetch NSLocalizedDescriptionKey from userInfoValueProvider, use value as-is if present. - /// 4. Fetch NSLocalizedFailureErrorKey from userInfoValueProvider. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. - /// 5. Look for NSLocalizedFailureReasonErrorKey in userInfo or from userInfoValueProvider; combine with generic "Operation failed" message. - /// 6. Last resort localized but barely-presentable string manufactured from domain and code. The result is never nil. - NSString? get localizedDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + Dart_UpdateExternalSize_Type get Dart_UpdateExternalSize_DL => + _Dart_UpdateExternalSize_DL.value; - /// Return a complete sentence which describes why the operation failed. For instance, for NSFileReadNoPermissionError: "You don't have permission.". In many cases this will be just the "because" part of the error message (but as a complete sentence, which makes localization easier). Default implementation of this picks up the value of NSLocalizedFailureReasonErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. - NSString? get localizedFailureReason { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedFailureReason1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + set Dart_UpdateExternalSize_DL(Dart_UpdateExternalSize_Type value) => + _Dart_UpdateExternalSize_DL.value = value; - /// Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel. For instance, for NSFileReadNoPermissionError: "To view or change permissions, select the item in the Finder and choose File > Get Info.". Default implementation of this picks up the value of NSLocalizedRecoverySuggestionErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. - NSString? get localizedRecoverySuggestion { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedRecoverySuggestion1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_NewFinalizableHandle_DL = + _lookup('Dart_NewFinalizableHandle_DL'); - /// Return titles of buttons that are appropriate for displaying in an alert. These should match the string provided as a part of localizedRecoverySuggestion. The first string would be the title of the right-most and default button, the second one next to it, and so on. If used in an alert the corresponding default return values are NSAlertFirstButtonReturn + n. Default implementation of this picks up the value of NSLocalizedRecoveryOptionsErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. nil return usually implies no special suggestion, which would imply a single "OK" button. - NSArray? get localizedRecoveryOptions { - final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_localizedRecoveryOptions1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + Dart_NewFinalizableHandle_Type get Dart_NewFinalizableHandle_DL => + _Dart_NewFinalizableHandle_DL.value; - /// Return an object that conforms to the NSErrorRecoveryAttempting informal protocol. The recovery attempter must be an object that can correctly interpret an index into the array returned by localizedRecoveryOptions. The default implementation of this picks up the value of NSRecoveryAttempterErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. - NSObject get recoveryAttempter { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_recoveryAttempter1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + set Dart_NewFinalizableHandle_DL(Dart_NewFinalizableHandle_Type value) => + _Dart_NewFinalizableHandle_DL.value = value; - /// Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user. This is done automatically by +[NSAlert alertWithError:], which the presentError: variants in NSApplication go through. The default implementation of this picks up the value of the NSHelpAnchorErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. - NSString? get helpAnchor { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_helpAnchor1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_DeleteFinalizableHandle_DL = + _lookup( + 'Dart_DeleteFinalizableHandle_DL'); - /// Return a list of underlying errors, if any. It includes the values of both NSUnderlyingErrorKey and NSMultipleUnderlyingErrorsKey. If there are no underlying errors, returns an empty array. - NSArray? get underlyingErrors { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_underlyingErrors1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + Dart_DeleteFinalizableHandle_Type get Dart_DeleteFinalizableHandle_DL => + _Dart_DeleteFinalizableHandle_DL.value; - /// Specify a block which will be called from the implementations of localizedDescription, localizedFailureReason, localizedRecoverySuggestion, localizedRecoveryOptions, recoveryAttempter, helpAnchor, and debugDescription when the underlying value for these is not present in the userInfo dictionary of NSError instances with the specified domain. The provider will be called with the userInfo key corresponding to the queried property: For instance, NSLocalizedDescriptionKey for localizedDescription. The provider should return nil for any keys it is not able to provide and, very importantly, any keys it does not recognize (since we may extend the list of keys in future releases). - /// - /// The specified block will be called synchronously at the time when the above properties are queried. The results are not cached. - /// - /// This provider is optional. It enables localization and formatting of error messages to be done lazily; rather than populating the userInfo at NSError creation time, these keys will be fetched on-demand when asked for. - /// - /// It is expected that only the “owner” of an NSError domain specifies the provider for the domain, and this is done once. This facility is not meant for consumers of errors to customize the userInfo entries. This facility should not be used to customize the behaviors of error domains provided by the system. - /// - /// If an appropriate result for the requested key cannot be provided, return nil rather than choosing to manufacture a generic fallback response such as "Operation could not be completed, error 42." NSError will take care of the fallback cases. - static void setUserInfoValueProviderForDomain_provider_( - NativeCupertinoHttp _lib, - NSErrorDomain errorDomain, - ObjCBlock10 provider) { - return _lib._objc_msgSend_181( - _lib._class_NSError1, - _lib._sel_setUserInfoValueProviderForDomain_provider_1, - errorDomain, - provider._id); - } + set Dart_DeleteFinalizableHandle_DL( + Dart_DeleteFinalizableHandle_Type value) => + _Dart_DeleteFinalizableHandle_DL.value = value; - static ObjCBlock10 userInfoValueProviderForDomain_(NativeCupertinoHttp _lib, - NSError? err, NSErrorUserInfoKey userInfoKey, NSErrorDomain errorDomain) { - final _ret = _lib._objc_msgSend_182( - _lib._class_NSError1, - _lib._sel_userInfoValueProviderForDomain_1, - err?._id ?? ffi.nullptr, - userInfoKey, - errorDomain); - return ObjCBlock10._(_ret, _lib); - } + late final ffi.Pointer + _Dart_UpdateFinalizableExternalSize_DL = + _lookup( + 'Dart_UpdateFinalizableExternalSize_DL'); - static NSError new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); - return NSError._(_ret, _lib, retain: false, release: true); - } + Dart_UpdateFinalizableExternalSize_Type + get Dart_UpdateFinalizableExternalSize_DL => + _Dart_UpdateFinalizableExternalSize_DL.value; - static NSError alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); - return NSError._(_ret, _lib, retain: false, release: true); - } -} + set Dart_UpdateFinalizableExternalSize_DL( + Dart_UpdateFinalizableExternalSize_Type value) => + _Dart_UpdateFinalizableExternalSize_DL.value = value; -typedef NSErrorDomain = ffi.Pointer; + late final ffi.Pointer _Dart_Post_DL = + _lookup('Dart_Post_DL'); -/// Immutable Dictionary -class NSDictionary extends NSObject { - NSDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + Dart_Post_Type get Dart_Post_DL => _Dart_Post_DL.value; - /// Returns a [NSDictionary] that points to the same underlying object as [other]. - static NSDictionary castFrom(T other) { - return NSDictionary._(other._id, other._lib, retain: true, release: true); - } + set Dart_Post_DL(Dart_Post_Type value) => _Dart_Post_DL.value = value; - /// Returns a [NSDictionary] that wraps the given raw object pointer. - static NSDictionary castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDictionary._(other, lib, retain: retain, release: release); - } + late final ffi.Pointer _Dart_NewSendPort_DL = + _lookup('Dart_NewSendPort_DL'); - /// Returns whether [obj] is an instance of [NSDictionary]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); - } + Dart_NewSendPort_Type get Dart_NewSendPort_DL => _Dart_NewSendPort_DL.value; - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } + set Dart_NewSendPort_DL(Dart_NewSendPort_Type value) => + _Dart_NewSendPort_DL.value = value; - NSObject objectForKey_(NSObject aKey) { - final _ret = _lib._objc_msgSend_91(_id, _lib._sel_objectForKey_1, aKey._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer _Dart_SendPortGetId_DL = + _lookup('Dart_SendPortGetId_DL'); - NSEnumerator keyEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_keyEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } + Dart_SendPortGetId_Type get Dart_SendPortGetId_DL => + _Dart_SendPortGetId_DL.value; - @override - NSDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + set Dart_SendPortGetId_DL(Dart_SendPortGetId_Type value) => + _Dart_SendPortGetId_DL.value = value; - NSDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_93( - _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer _Dart_EnterScope_DL = + _lookup('Dart_EnterScope_DL'); - NSDictionary initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + Dart_EnterScope_Type get Dart_EnterScope_DL => _Dart_EnterScope_DL.value; - NSArray? get allKeys { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allKeys1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + set Dart_EnterScope_DL(Dart_EnterScope_Type value) => + _Dart_EnterScope_DL.value = value; - NSArray allKeysForObject_(NSObject anObject) { - final _ret = - _lib._objc_msgSend_96(_id, _lib._sel_allKeysForObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer _Dart_ExitScope_DL = + _lookup('Dart_ExitScope_DL'); - NSArray? get allValues { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allValues1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + Dart_ExitScope_Type get Dart_ExitScope_DL => _Dart_ExitScope_DL.value; - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + set Dart_ExitScope_DL(Dart_ExitScope_Type value) => + _Dart_ExitScope_DL.value = value; - NSString? get descriptionInStringsFileFormat { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_descriptionInStringsFileFormat1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + late final _class_CUPHTTPTaskConfiguration1 = + _getClass1("CUPHTTPTaskConfiguration"); + late final _sel_initWithPort_1 = _registerName1("initWithPort:"); + ffi.Pointer _objc_msgSend_477( + ffi.Pointer obj, + ffi.Pointer sel, + int sendPort, + ) { + return __objc_msgSend_477( + obj, + sel, + sendPort, + ); } - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_477Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, Dart_Port)>>('objc_msgSend'); + late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - NSString descriptionWithLocale_indent_(NSObject locale, int level) { - final _ret = _lib._objc_msgSend_99( - _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); - return NSString._(_ret, _lib, retain: true, release: true); + late final _sel_sendPort1 = _registerName1("sendPort"); + late final _class_CUPHTTPClientDelegate1 = + _getClass1("CUPHTTPClientDelegate"); + late final _sel_registerTask_withConfiguration_1 = + _registerName1("registerTask:withConfiguration:"); + void _objc_msgSend_478( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer config, + ) { + return __objc_msgSend_478( + obj, + sel, + task, + config, + ); } - bool isEqualToDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_163(_id, _lib._sel_isEqualToDictionary_1, - otherDictionary?._id ?? ffi.nullptr); - } + late final __objc_msgSend_478Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); + late final _class_CUPHTTPForwardedDelegate1 = + _getClass1("CUPHTTPForwardedDelegate"); + late final _sel_initWithSession_task_1 = + _registerName1("initWithSession:task:"); + ffi.Pointer _objc_msgSend_479( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ) { + return __objc_msgSend_479( + obj, + sel, + session, + task, + ); } - NSArray objectsForKeys_notFoundMarker_(NSArray? keys, NSObject marker) { - final _ret = _lib._objc_msgSend_164( - _id, - _lib._sel_objectsForKeys_notFoundMarker_1, - keys?._id ?? ffi.nullptr, - marker._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_479Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. - bool writeToURL_error_( - NSURL? url, ffi.Pointer> error) { - return _lib._objc_msgSend_109( - _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); + late final _sel_finish1 = _registerName1("finish"); + late final _sel_session1 = _registerName1("session"); + late final _sel_task1 = _registerName1("task"); + ffi.Pointer _objc_msgSend_480( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_480( + obj, + sel, + ); } - NSArray keysSortedByValueUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_107( - _id, _lib._sel_keysSortedByValueUsingSelector_1, comparator); - return NSArray._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_480Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - /// count refers to the number of elements in the dictionary - void getObjects_andKeys_count_(ffi.Pointer> objects, - ffi.Pointer> keys, int count) { - return _lib._objc_msgSend_165( - _id, _lib._sel_getObjects_andKeys_count_1, objects, keys, count); + late final _class_NSLock1 = _getClass1("NSLock"); + late final _sel_lock1 = _registerName1("lock"); + ffi.Pointer _objc_msgSend_481( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_481( + obj, + sel, + ); } - NSObject objectForKeyedSubscript_(NSObject key) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_objectForKeyedSubscript_1, key._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_481Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - void enumerateKeysAndObjectsUsingBlock_(ObjCBlock8 block) { - return _lib._objc_msgSend_166( - _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); + late final _class_CUPHTTPForwardedRedirect1 = + _getClass1("CUPHTTPForwardedRedirect"); + late final _sel_initWithSession_task_response_request_1 = + _registerName1("initWithSession:task:response:request:"); + ffi.Pointer _objc_msgSend_482( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer response, + ffi.Pointer request, + ) { + return __objc_msgSend_482( + obj, + sel, + session, + task, + response, + request, + ); } - void enumerateKeysAndObjectsWithOptions_usingBlock_( - int opts, ObjCBlock8 block) { - return _lib._objc_msgSend_167( - _id, - _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, - opts, - block._id); - } + late final __objc_msgSend_482Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - NSArray keysSortedByValueUsingComparator_(NSComparator cmptr) { - final _ret = _lib._objc_msgSend_141( - _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); + late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); + void _objc_msgSend_483( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_483( + obj, + sel, + request, + ); } - NSArray keysSortedByValueWithOptions_usingComparator_( - int opts, NSComparator cmptr) { - final _ret = _lib._objc_msgSend_142(_id, - _lib._sel_keysSortedByValueWithOptions_usingComparator_1, opts, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_483Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - NSObject keysOfEntriesPassingTest_(ObjCBlock9 predicate) { - final _ret = _lib._objc_msgSend_168( - _id, _lib._sel_keysOfEntriesPassingTest_1, predicate._id); - return NSObject._(_ret, _lib, retain: true, release: true); + ffi.Pointer _objc_msgSend_484( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_484( + obj, + sel, + ); } - NSObject keysOfEntriesWithOptions_passingTest_( - int opts, ObjCBlock9 predicate) { - final _ret = _lib._objc_msgSend_169(_id, - _lib._sel_keysOfEntriesWithOptions_passingTest_1, opts, predicate._id); - return NSObject._(_ret, _lib, retain: true, release: true); + late final __objc_msgSend_484Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_redirectRequest1 = _registerName1("redirectRequest"); + late final _class_CUPHTTPForwardedResponse1 = + _getClass1("CUPHTTPForwardedResponse"); + late final _sel_initWithSession_task_response_1 = + _registerName1("initWithSession:task:response:"); + ffi.Pointer _objc_msgSend_485( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer response, + ) { + return __objc_msgSend_485( + obj, + sel, + session, + task, + response, + ); } - /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:andKeys:count: - void getObjects_andKeys_(ffi.Pointer> objects, - ffi.Pointer> keys) { - return _lib._objc_msgSend_170( - _id, _lib._sel_getObjects_andKeys_1, objects, keys); + late final __objc_msgSend_485Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_finishWithDisposition_1 = + _registerName1("finishWithDisposition:"); + void _objc_msgSend_486( + ffi.Pointer obj, + ffi.Pointer sel, + int disposition, + ) { + return __objc_msgSend_486( + obj, + sel, + disposition, + ); } - /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. - static NSDictionary dictionaryWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_171(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_486Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - static NSDictionary dictionaryWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_172(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + late final _sel_disposition1 = _registerName1("disposition"); + int _objc_msgSend_487( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_487( + obj, + sel, + ); } - NSDictionary initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_171( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_487Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - NSDictionary initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_172( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + late final _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); + late final _sel_initWithSession_task_data_1 = + _registerName1("initWithSession:task:data:"); + ffi.Pointer _objc_msgSend_488( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer data, + ) { + return __objc_msgSend_488( + obj, + sel, + session, + task, + data, + ); } - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); - } + late final __objc_msgSend_488Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - /// the atomically flag is ignored if url of a type that cannot be written atomically. - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); + late final _class_CUPHTTPForwardedComplete1 = + _getClass1("CUPHTTPForwardedComplete"); + late final _sel_initWithSession_task_error_1 = + _registerName1("initWithSession:task:error:"); + ffi.Pointer _objc_msgSend_489( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer error, + ) { + return __objc_msgSend_489( + obj, + sel, + session, + task, + error, + ); } - static NSDictionary dictionary(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_489Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - static NSDictionary dictionaryWithObject_forKey_( - NativeCupertinoHttp _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_173(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); + late final _class_CUPHTTPForwardedFinishedDownloading1 = + _getClass1("CUPHTTPForwardedFinishedDownloading"); + late final _sel_initWithSession_downloadTask_url_1 = + _registerName1("initWithSession:downloadTask:url:"); + ffi.Pointer _objc_msgSend_490( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer downloadTask, + ffi.Pointer location, + ) { + return __objc_msgSend_490( + obj, + sel, + session, + downloadTask, + location, + ); } - static NSDictionary dictionaryWithObjects_forKeys_count_( - NativeCupertinoHttp _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_93(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_490Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - static NSDictionary dictionaryWithObjectsAndKeys_( - NativeCupertinoHttp _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_91(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); + late final _sel_location1 = _registerName1("location"); + Dart_CObject NSObjectToCObject( + ffi.Pointer n, + ) { + return _NSObjectToCObject( + n, + ); } - static NSDictionary dictionaryWithDictionary_( - NativeCupertinoHttp _lib, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_174(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + late final _NSObjectToCObjectPtr = _lookup< + ffi.NativeFunction)>>( + 'NSObjectToCObject'); + late final _NSObjectToCObject = _NSObjectToCObjectPtr.asFunction< + Dart_CObject Function(ffi.Pointer)>(); - static NSDictionary dictionaryWithObjects_forKeys_( - NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_175( - _lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void CUPHTTPSendMessage( + ffi.Pointer task, + ffi.Pointer message, + int sendPort, + ) { + return _CUPHTTPSendMessage( + task, + message, + sendPort, + ); } - NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + late final _CUPHTTPSendMessagePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + Dart_Port)>>('CUPHTTPSendMessage'); + late final _CUPHTTPSendMessage = _CUPHTTPSendMessagePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - NSDictionary initWithDictionary_(NSDictionary? otherDictionary) { - final _ret = _lib._objc_msgSend_174(_id, _lib._sel_initWithDictionary_1, - otherDictionary?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void CUPHTTPReceiveMessage( + ffi.Pointer task, + int sendPort, + ) { + return _CUPHTTPReceiveMessage( + task, + sendPort, + ); } - NSDictionary initWithDictionary_copyItems_( - NSDictionary? otherDictionary, bool flag) { - final _ret = _lib._objc_msgSend_176( - _id, - _lib._sel_initWithDictionary_copyItems_1, - otherDictionary?._id ?? ffi.nullptr, - flag); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } + late final _CUPHTTPReceiveMessagePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, Dart_Port)>>('CUPHTTPReceiveMessage'); + late final _CUPHTTPReceiveMessage = _CUPHTTPReceiveMessagePtr.asFunction< + void Function(ffi.Pointer, int)>(); +} - NSDictionary initWithObjects_forKeys_(NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_175( - _id, - _lib._sel_initWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +class __mbstate_t extends ffi.Union { + @ffi.Array.multi([128]) + external ffi.Array __mbstate8; - /// Reads dictionary stored in NSPropertyList format from the specified url. - NSDictionary initWithContentsOfURL_error_( - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_177( - _id, - _lib._sel_initWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + @ffi.LongLong() + external int _mbstateL; +} - /// Reads dictionary stored in NSPropertyList format from the specified url. - static NSDictionary dictionaryWithContentsOfURL_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_177( - _lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +class __darwin_pthread_handler_rec extends ffi.Struct { + external ffi + .Pointer)>> + __routine; - /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. - /// The keys are copied from the array and must be copyable. - /// If the array parameter is nil or not an NSArray, an exception is thrown. - /// If the array of keys is empty, an empty key set is returned. - /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). - /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. - /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. - static NSObject sharedKeySetForKeys_( - NativeCupertinoHttp _lib, NSArray? keys) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSDictionary1, - _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer __arg; - int countByEnumeratingWithState_objects_count_( - ffi.Pointer state, - ffi.Pointer> buffer, - int len) { - return _lib._objc_msgSend_178( - _id, - _lib._sel_countByEnumeratingWithState_objects_count_1, - state, - buffer, - len); - } + external ffi.Pointer<__darwin_pthread_handler_rec> __next; +} - static NSDictionary new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } +class _opaque_pthread_attr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - static NSDictionary alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } + @ffi.Array.multi([56]) + external ffi.Array __opaque; } -class NSEnumerator extends NSObject { - NSEnumerator._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +class _opaque_pthread_cond_t extends ffi.Struct { + @ffi.Long() + external int __sig; - /// Returns a [NSEnumerator] that points to the same underlying object as [other]. - static NSEnumerator castFrom(T other) { - return NSEnumerator._(other._id, other._lib, retain: true, release: true); - } + @ffi.Array.multi([40]) + external ffi.Array __opaque; +} - /// Returns a [NSEnumerator] that wraps the given raw object pointer. - static NSEnumerator castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSEnumerator._(other, lib, retain: retain, release: release); - } +class _opaque_pthread_condattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - /// Returns whether [obj] is an instance of [NSEnumerator]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSEnumerator1); - } + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} - NSObject nextObject() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nextObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +class _opaque_pthread_mutex_t extends ffi.Struct { + @ffi.Long() + external int __sig; - NSObject? get allObjects { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([56]) + external ffi.Array __opaque; +} - static NSEnumerator new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } +class _opaque_pthread_mutexattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - static NSEnumerator alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } + @ffi.Array.multi([8]) + external ffi.Array __opaque; } -/// Immutable Array -class NSArray extends NSObject { - NSArray._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +class _opaque_pthread_once_t extends ffi.Struct { + @ffi.Long() + external int __sig; - /// Returns a [NSArray] that points to the same underlying object as [other]. - static NSArray castFrom(T other) { - return NSArray._(other._id, other._lib, retain: true, release: true); - } + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} - /// Returns a [NSArray] that wraps the given raw object pointer. - static NSArray castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSArray._(other, lib, retain: retain, release: release); - } +class _opaque_pthread_rwlock_t extends ffi.Struct { + @ffi.Long() + external int __sig; - /// Returns whether [obj] is an instance of [NSArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); - } + @ffi.Array.multi([192]) + external ffi.Array __opaque; +} - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } +class _opaque_pthread_rwlockattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - NSObject objectAtIndex_(int index) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndex_1, index); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array __opaque; +} - @override - NSArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class _opaque_pthread_t extends ffi.Struct { + @ffi.Long() + external int __sig; - NSArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_95( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; - NSArray initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([8176]) + external ffi.Array __opaque; +} - NSArray arrayByAddingObject_(NSObject anObject) { - final _ret = _lib._objc_msgSend_96( - _id, _lib._sel_arrayByAddingObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } +abstract class idtype_t { + static const int P_ALL = 0; + static const int P_PID = 1; + static const int P_PGID = 2; +} - NSArray arrayByAddingObjectsFromArray_(NSArray? otherArray) { - final _ret = _lib._objc_msgSend_97( - _id, - _lib._sel_arrayByAddingObjectsFromArray_1, - otherArray?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class __darwin_arm_exception_state extends ffi.Struct { + @__uint32_t() + external int __exception; - NSString componentsJoinedByString_(NSString? separator) { - final _ret = _lib._objc_msgSend_98(_id, - _lib._sel_componentsJoinedByString_1, separator?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __fsr; - bool containsObject_(NSObject anObject) { - return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); - } + @__uint32_t() + external int __far; +} - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +typedef __uint32_t = ffi.UnsignedInt; - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } +class __darwin_arm_exception_state64 extends ffi.Struct { + @__uint64_t() + external int __far; - NSString descriptionWithLocale_indent_(NSObject locale, int level) { - final _ret = _lib._objc_msgSend_99( - _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); - return NSString._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __esr; - NSObject firstObjectCommonWithArray_(NSArray? otherArray) { - final _ret = _lib._objc_msgSend_100(_id, - _lib._sel_firstObjectCommonWithArray_1, otherArray?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __exception; +} - void getObjects_range_( - ffi.Pointer> objects, NSRange range) { - return _lib._objc_msgSend_101( - _id, _lib._sel_getObjects_range_1, objects, range); - } +typedef __uint64_t = ffi.UnsignedLongLong; - int indexOfObject_(NSObject anObject) { - return _lib._objc_msgSend_102(_id, _lib._sel_indexOfObject_1, anObject._id); - } +class __darwin_arm_thread_state extends ffi.Struct { + @ffi.Array.multi([13]) + external ffi.Array<__uint32_t> __r; - int indexOfObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_103( - _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); - } + @__uint32_t() + external int __sp; - int indexOfObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_102( - _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); - } + @__uint32_t() + external int __lr; - int indexOfObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_103( - _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); - } + @__uint32_t() + external int __pc; - bool isEqualToArray_(NSArray? otherArray) { - return _lib._objc_msgSend_104( - _id, _lib._sel_isEqualToArray_1, otherArray?._id ?? ffi.nullptr); - } + @__uint32_t() + external int __cpsr; +} - NSObject get firstObject { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_firstObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +class __darwin_arm_thread_state64 extends ffi.Struct { + @ffi.Array.multi([29]) + external ffi.Array<__uint64_t> __x; - NSObject get lastObject { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_lastObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @__uint64_t() + external int __fp; - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } + @__uint64_t() + external int __lr; - NSEnumerator reverseObjectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_reverseObjectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } + @__uint64_t() + external int __sp; - NSData? get sortedArrayHint { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_sortedArrayHint1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } + @__uint64_t() + external int __pc; - NSArray sortedArrayUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context) { - final _ret = _lib._objc_msgSend_105( - _id, _lib._sel_sortedArrayUsingFunction_context_1, comparator, context); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __cpsr; - NSArray sortedArrayUsingFunction_context_hint_( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - NSData? hint) { - final _ret = _lib._objc_msgSend_106( - _id, - _lib._sel_sortedArrayUsingFunction_context_hint_1, - comparator, - context, - hint?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __pad; +} - NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_107( - _id, _lib._sel_sortedArrayUsingSelector_1, comparator); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class __darwin_arm_vfp_state extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array<__uint32_t> __r; - NSArray subarrayWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_108(_id, _lib._sel_subarrayWithRange_1, range); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __fpscr; +} - /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. - bool writeToURL_error_( - NSURL? url, ffi.Pointer> error) { - return _lib._objc_msgSend_109( - _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); - } +class __darwin_arm_neon_state64 extends ffi.Opaque {} - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_7( - _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); - } +class __darwin_arm_neon_state extends ffi.Opaque {} - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject argument) { - return _lib._objc_msgSend_110( - _id, - _lib._sel_makeObjectsPerformSelector_withObject_1, - aSelector, - argument._id); - } +class __arm_pagein_state extends ffi.Struct { + @ffi.Int() + external int __pagein_error; +} - NSArray objectsAtIndexes_(NSIndexSet? indexes) { - final _ret = _lib._objc_msgSend_131( - _id, _lib._sel_objectsAtIndexes_1, indexes?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class __arm_legacy_debug_state extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; - NSObject objectAtIndexedSubscript_(int idx) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndexedSubscript_1, idx); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; - void enumerateObjectsUsingBlock_(ObjCBlock3 block) { - return _lib._objc_msgSend_132( - _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; - void enumerateObjectsWithOptions_usingBlock_(int opts, ObjCBlock3 block) { - return _lib._objc_msgSend_133(_id, - _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; +} - void enumerateObjectsAtIndexes_options_usingBlock_( - NSIndexSet? s, int opts, ObjCBlock3 block) { - return _lib._objc_msgSend_134( - _id, - _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, - s?._id ?? ffi.nullptr, - opts, - block._id); - } +class __darwin_arm_debug_state32 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; - int indexOfObjectPassingTest_(ObjCBlock4 predicate) { - return _lib._objc_msgSend_135( - _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; - int indexOfObjectWithOptions_passingTest_(int opts, ObjCBlock4 predicate) { - return _lib._objc_msgSend_136(_id, - _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; - int indexOfObjectAtIndexes_options_passingTest_( - NSIndexSet? s, int opts, ObjCBlock4 predicate) { - return _lib._objc_msgSend_137( - _id, - _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, - s?._id ?? ffi.nullptr, - opts, - predicate._id); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; - NSIndexSet indexesOfObjectsPassingTest_(ObjCBlock4 predicate) { - final _ret = _lib._objc_msgSend_138( - _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + @__uint64_t() + external int __mdscr_el1; +} - NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock4 predicate) { - final _ret = _lib._objc_msgSend_139( - _id, - _lib._sel_indexesOfObjectsWithOptions_passingTest_1, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +class __darwin_arm_debug_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bvr; - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( - NSIndexSet? s, int opts, ObjCBlock4 predicate) { - final _ret = _lib._objc_msgSend_140( - _id, - _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, - s?._id ?? ffi.nullptr, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bcr; - NSArray sortedArrayUsingComparator_(NSComparator cmptr) { - final _ret = _lib._objc_msgSend_141( - _id, _lib._sel_sortedArrayUsingComparator_1, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wvr; - NSArray sortedArrayWithOptions_usingComparator_( - int opts, NSComparator cmptr) { - final _ret = _lib._objc_msgSend_142( - _id, _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wcr; - /// binary search - int indexOfObject_inSortedRange_options_usingComparator_( - NSObject obj, NSRange r, int opts, NSComparator cmp) { - return _lib._objc_msgSend_143( - _id, - _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, - obj._id, - r, - opts, - cmp); - } + @__uint64_t() + external int __mdscr_el1; +} - static NSArray array(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class __darwin_arm_cpmu_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __ctrs; +} - static NSArray arrayWithObject_(NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_91( - _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class __darwin_mcontext32 extends ffi.Struct { + external __darwin_arm_exception_state __es; - static NSArray arrayWithObjects_count_(NativeCupertinoHttp _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_95( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); - } + external __darwin_arm_thread_state __ss; - static NSArray arrayWithObjects_( - NativeCupertinoHttp _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_91( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } + external __darwin_arm_vfp_state __fs; +} - static NSArray arrayWithArray_(NativeCupertinoHttp _lib, NSArray? array) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSArray1, - _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class __darwin_mcontext64 extends ffi.Opaque {} - NSArray initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_91(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class __darwin_sigaltstack extends ffi.Struct { + external ffi.Pointer ss_sp; - NSArray initWithArray_(NSArray? array) { - final _ret = _lib._objc_msgSend_100( - _id, _lib._sel_initWithArray_1, array?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @__darwin_size_t() + external int ss_size; - NSArray initWithArray_copyItems_(NSArray? array, bool flag) { - final _ret = _lib._objc_msgSend_144(_id, - _lib._sel_initWithArray_copyItems_1, array?._id ?? ffi.nullptr, flag); - return NSArray._(_ret, _lib, retain: false, release: true); - } + @ffi.Int() + external int ss_flags; +} - /// Reads array stored in NSPropertyList format from the specified url. - NSArray initWithContentsOfURL_error_( - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_145( - _id, - _lib._sel_initWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); - } +typedef __darwin_size_t = ffi.UnsignedLong; - /// Reads array stored in NSPropertyList format from the specified url. - static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_145( - _lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class __darwin_ucontext extends ffi.Struct { + @ffi.Int() + external int uc_onstack; - NSOrderedCollectionDifference - differenceFromArray_withOptions_usingEquivalenceTest_( - NSArray? other, int options, ObjCBlock7 block) { - final _ret = _lib._objc_msgSend_154( - _id, - _lib._sel_differenceFromArray_withOptions_usingEquivalenceTest_1, - other?._id ?? ffi.nullptr, - options, - block._id); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } + @__darwin_sigset_t() + external int uc_sigmask; - NSOrderedCollectionDifference differenceFromArray_withOptions_( - NSArray? other, int options) { - final _ret = _lib._objc_msgSend_155( - _id, - _lib._sel_differenceFromArray_withOptions_1, - other?._id ?? ffi.nullptr, - options); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } + external __darwin_sigaltstack uc_stack; - /// Uses isEqual: to determine the difference between the parameter and the receiver - NSOrderedCollectionDifference differenceFromArray_(NSArray? other) { - final _ret = _lib._objc_msgSend_156( - _id, _lib._sel_differenceFromArray_1, other?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } + external ffi.Pointer<__darwin_ucontext> uc_link; - NSArray arrayByApplyingDifference_( - NSOrderedCollectionDifference? difference) { - final _ret = _lib._objc_msgSend_157(_id, - _lib._sel_arrayByApplyingDifference_1, difference?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @__darwin_size_t() + external int uc_mcsize; - /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead. - void getObjects_(ffi.Pointer> objects) { - return _lib._objc_msgSend_158(_id, _lib._sel_getObjects_1, objects); - } + external ffi.Pointer<__darwin_mcontext64> uc_mcontext; +} - /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. - static NSArray arrayWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_159(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +typedef __darwin_sigset_t = __uint32_t; - static NSArray arrayWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_160(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class sigval extends ffi.Union { + @ffi.Int() + external int sival_int; - NSArray initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_159( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer sival_ptr; +} - NSArray initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class sigevent extends ffi.Struct { + @ffi.Int() + external int sigev_notify; - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); - } + @ffi.Int() + external int sigev_signo; - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); - } + external sigval sigev_value; - static NSArray new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); - return NSArray._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer> + sigev_notify_function; - static NSArray alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); - return NSArray._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer sigev_notify_attributes; } -class NSIndexSet extends NSObject { - NSIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef pthread_attr_t = __darwin_pthread_attr_t; +typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; - /// Returns a [NSIndexSet] that points to the same underlying object as [other]. - static NSIndexSet castFrom(T other) { - return NSIndexSet._(other._id, other._lib, retain: true, release: true); - } +class __siginfo extends ffi.Struct { + @ffi.Int() + external int si_signo; - /// Returns a [NSIndexSet] that wraps the given raw object pointer. - static NSIndexSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexSet._(other, lib, retain: retain, release: release); - } + @ffi.Int() + external int si_errno; - /// Returns whether [obj] is an instance of [NSIndexSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); - } + @ffi.Int() + external int si_code; - static NSIndexSet indexSet(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + @pid_t() + external int si_pid; - static NSIndexSet indexSetWithIndex_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + @uid_t() + external int si_uid; - static NSIndexSet indexSetWithIndexesInRange_( - NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_111( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int si_status; - NSIndexSet initWithIndexesInRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_111(_id, _lib._sel_initWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer si_addr; - NSIndexSet initWithIndexSet_(NSIndexSet? indexSet) { - final _ret = _lib._objc_msgSend_112( - _id, _lib._sel_initWithIndexSet_1, indexSet?._id ?? ffi.nullptr); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + external sigval si_value; - NSIndexSet initWithIndex_(int value) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Long() + external int si_band; - bool isEqualToIndexSet_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_113( - _id, _lib._sel_isEqualToIndexSet_1, indexSet?._id ?? ffi.nullptr); - } + @ffi.Array.multi([7]) + external ffi.Array __pad; +} - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } +typedef pid_t = __darwin_pid_t; +typedef __darwin_pid_t = __int32_t; +typedef __int32_t = ffi.Int; +typedef uid_t = __darwin_uid_t; +typedef __darwin_uid_t = __uint32_t; - int get firstIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); - } +class __sigaction_u extends ffi.Union { + external ffi.Pointer> + __sa_handler; - int get lastIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); - } + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer)>> + __sa_sigaction; +} - int indexGreaterThanIndex_(int value) { - return _lib._objc_msgSend_114( - _id, _lib._sel_indexGreaterThanIndex_1, value); - } +class __sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; - int indexLessThanIndex_(int value) { - return _lib._objc_msgSend_114(_id, _lib._sel_indexLessThanIndex_1, value); - } + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Pointer, ffi.Pointer)>> sa_tramp; - int indexGreaterThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_114( - _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); - } + @sigset_t() + external int sa_mask; - int indexLessThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_114( - _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); - } + @ffi.Int() + external int sa_flags; +} - int getIndexes_maxCount_inIndexRange_(ffi.Pointer indexBuffer, - int bufferSize, NSRangePointer range) { - return _lib._objc_msgSend_115( - _id, - _lib._sel_getIndexes_maxCount_inIndexRange_1, - indexBuffer, - bufferSize, - range); - } +typedef siginfo_t = __siginfo; +typedef sigset_t = __darwin_sigset_t; - int countOfIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_116( - _id, _lib._sel_countOfIndexesInRange_1, range); - } +class sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; - bool containsIndex_(int value) { - return _lib._objc_msgSend_117(_id, _lib._sel_containsIndex_1, value); - } + @sigset_t() + external int sa_mask; - bool containsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_118( - _id, _lib._sel_containsIndexesInRange_1, range); - } + @ffi.Int() + external int sa_flags; +} - bool containsIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_113( - _id, _lib._sel_containsIndexes_1, indexSet?._id ?? ffi.nullptr); - } +class sigvec extends ffi.Struct { + external ffi.Pointer> + sv_handler; - bool intersectsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_118( - _id, _lib._sel_intersectsIndexesInRange_1, range); - } + @ffi.Int() + external int sv_mask; - void enumerateIndexesUsingBlock_(ObjCBlock block) { - return _lib._objc_msgSend_119( - _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); - } + @ffi.Int() + external int sv_flags; +} - void enumerateIndexesWithOptions_usingBlock_(int opts, ObjCBlock block) { - return _lib._objc_msgSend_120(_id, - _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); - } +class sigstack extends ffi.Struct { + external ffi.Pointer ss_sp; - void enumerateIndexesInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock block) { - return _lib._objc_msgSend_121( - _id, - _lib._sel_enumerateIndexesInRange_options_usingBlock_1, - range, - opts, - block._id); - } + @ffi.Int() + external int ss_onstack; +} - int indexPassingTest_(ObjCBlock1 predicate) { - return _lib._objc_msgSend_122( - _id, _lib._sel_indexPassingTest_1, predicate._id); - } +class timeval extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; - int indexWithOptions_passingTest_(int opts, ObjCBlock1 predicate) { - return _lib._objc_msgSend_123( - _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); - } + @__darwin_suseconds_t() + external int tv_usec; +} - int indexInRange_options_passingTest_( - NSRange range, int opts, ObjCBlock1 predicate) { - return _lib._objc_msgSend_124( - _id, - _lib._sel_indexInRange_options_passingTest_1, - range, - opts, - predicate._id); - } +typedef __darwin_time_t = ffi.Long; +typedef __darwin_suseconds_t = __int32_t; - NSIndexSet indexesPassingTest_(ObjCBlock1 predicate) { - final _ret = _lib._objc_msgSend_125( - _id, _lib._sel_indexesPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +class rusage extends ffi.Struct { + external timeval ru_utime; - NSIndexSet indexesWithOptions_passingTest_(int opts, ObjCBlock1 predicate) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + external timeval ru_stime; - NSIndexSet indexesInRange_options_passingTest_( - NSRange range, int opts, ObjCBlock1 predicate) { - final _ret = _lib._objc_msgSend_127( - _id, - _lib._sel_indexesInRange_options_passingTest_1, - range, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Long() + external int ru_maxrss; - void enumerateRangesUsingBlock_(ObjCBlock2 block) { - return _lib._objc_msgSend_128( - _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); - } + @ffi.Long() + external int ru_ixrss; - void enumerateRangesWithOptions_usingBlock_(int opts, ObjCBlock2 block) { - return _lib._objc_msgSend_129(_id, - _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); - } + @ffi.Long() + external int ru_idrss; - void enumerateRangesInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock2 block) { - return _lib._objc_msgSend_130( - _id, - _lib._sel_enumerateRangesInRange_options_usingBlock_1, - range, - opts, - block._id); - } + @ffi.Long() + external int ru_isrss; - static NSIndexSet new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } + @ffi.Long() + external int ru_minflt; - static NSIndexSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } -} + @ffi.Long() + external int ru_majflt; -typedef NSRangePointer = ffi.Pointer; + @ffi.Long() + external int ru_nswap; -class _ObjCBlockBase implements ffi.Finalizable { - final ffi.Pointer<_ObjCBlock> _id; - final NativeCupertinoHttp _lib; - bool _pendingRelease; + @ffi.Long() + external int ru_inblock; - _ObjCBlockBase._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._Block_copy(_id.cast()); - } - if (release) { - _lib._objc_releaseFinalizer11.attach(this, _id.cast(), detach: this); - } - } + @ffi.Long() + external int ru_oublock; - /// Releases the reference to the underlying ObjC block held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._Block_release(_id.cast()); - _lib._objc_releaseFinalizer11.detach(this); - } else { - throw StateError( - 'Released an ObjC block that was unowned or already released.'); - } - } + @ffi.Long() + external int ru_msgsnd; - @override - bool operator ==(Object other) { - return other is _ObjCBlockBase && _id == other._id; - } + @ffi.Long() + external int ru_msgrcv; - @override - int get hashCode => _id.hashCode; -} + @ffi.Long() + external int ru_nsignals; -void _ObjCBlock_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); -} + @ffi.Long() + external int ru_nvcsw; -final _ObjCBlock_closureRegistry = {}; -int _ObjCBlock_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_registerClosure(Function fn) { - final id = ++_ObjCBlock_closureRegistryIndex; - _ObjCBlock_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + @ffi.Long() + external int ru_nivcsw; } -void _ObjCBlock_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return _ObjCBlock_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +class rusage_info_v0 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; -class ObjCBlock extends _ObjCBlockBase { - ObjCBlock._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + @ffi.Uint64() + external int ri_user_time; - /// Creates a block from a C function pointer. - ObjCBlock.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - NSUInteger arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint64() + external int ri_system_time; - /// Creates a block from a Dart function. - ObjCBlock.fromFunction(NativeCupertinoHttp lib, - void Function(int arg0, ffi.Pointer arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock_closureTrampoline) - .cast(), - _ObjCBlock_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, int arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Uint64() + external int ri_interrupt_wkups; -class _ObjCBlockDesc extends ffi.Struct { - @ffi.UnsignedLong() - external int reserved; + @ffi.Uint64() + external int ri_pageins; - @ffi.UnsignedLong() - external int size; + @ffi.Uint64() + external int ri_wired_size; - external ffi.Pointer copy_helper; + @ffi.Uint64() + external int ri_resident_size; - external ffi.Pointer dispose_helper; + @ffi.Uint64() + external int ri_phys_footprint; - external ffi.Pointer signature; + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; } -class _ObjCBlock extends ffi.Struct { - external ffi.Pointer isa; +class rusage_info_v1 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - @ffi.Int() - external int flags; + @ffi.Uint64() + external int ri_user_time; - @ffi.Int() - external int reserved; + @ffi.Uint64() + external int ri_system_time; - external ffi.Pointer invoke; + @ffi.Uint64() + external int ri_pkg_idle_wkups; - external ffi.Pointer<_ObjCBlockDesc> descriptor; + @ffi.Uint64() + external int ri_interrupt_wkups; - external ffi.Pointer target; -} + @ffi.Uint64() + external int ri_pageins; -abstract class NSEnumerationOptions { - static const int NSEnumerationConcurrent = 1; - static const int NSEnumerationReverse = 2; -} + @ffi.Uint64() + external int ri_wired_size; -bool _ObjCBlock1_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); -} + @ffi.Uint64() + external int ri_resident_size; -final _ObjCBlock1_closureRegistry = {}; -int _ObjCBlock1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock1_registerClosure(Function fn) { - final id = ++_ObjCBlock1_closureRegistryIndex; - _ObjCBlock1_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @ffi.Uint64() + external int ri_phys_footprint; -bool _ObjCBlock1_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return _ObjCBlock1_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + @ffi.Uint64() + external int ri_proc_start_abstime; -class ObjCBlock1 extends _ObjCBlockBase { - ObjCBlock1._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + @ffi.Uint64() + external int ri_proc_exit_abstime; - /// Creates a block from a C function pointer. - ObjCBlock1.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock1_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint64() + external int ri_child_user_time; - /// Creates a block from a Dart function. - ObjCBlock1.fromFunction(NativeCupertinoHttp lib, - bool Function(int arg0, ffi.Pointer arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock1_closureTrampoline, false) - .cast(), - _ObjCBlock1_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call(int arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock> block, int arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + @ffi.Uint64() + external int ri_child_system_time; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; -void _ObjCBlock2_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function( - NSRange arg0, ffi.Pointer arg1)>()(arg0, arg1); -} + @ffi.Uint64() + external int ri_child_interrupt_wkups; -final _ObjCBlock2_closureRegistry = {}; -int _ObjCBlock2_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock2_registerClosure(Function fn) { - final id = ++_ObjCBlock2_closureRegistryIndex; - _ObjCBlock2_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @ffi.Uint64() + external int ri_child_pageins; -void _ObjCBlock2_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { - return _ObjCBlock2_closureRegistry[block.ref.target.address]!(arg0, arg1); + @ffi.Uint64() + external int ri_child_elapsed_abstime; } -class ObjCBlock2 extends _ObjCBlockBase { - ObjCBlock2._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class rusage_info_v2 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - /// Creates a block from a C function pointer. - ObjCBlock2.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSRange arg0, ffi.Pointer arg1)>( - _ObjCBlock2_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint64() + external int ri_user_time; - /// Creates a block from a Dart function. - ObjCBlock2.fromFunction(NativeCupertinoHttp lib, - void Function(NSRange arg0, ffi.Pointer arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSRange arg0, ffi.Pointer arg1)>( - _ObjCBlock2_closureTrampoline) - .cast(), - _ObjCBlock2_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(NSRange arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + @ffi.Uint64() + external int ri_system_time; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Uint64() + external int ri_pkg_idle_wkups; -void _ObjCBlock3_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + @ffi.Uint64() + external int ri_interrupt_wkups; -final _ObjCBlock3_closureRegistry = {}; -int _ObjCBlock3_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock3_registerClosure(Function fn) { - final id = ++_ObjCBlock3_closureRegistryIndex; - _ObjCBlock3_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; -void _ObjCBlock3_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _ObjCBlock3_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + @ffi.Uint64() + external int ri_resident_size; -class ObjCBlock3 extends _ObjCBlockBase { - ObjCBlock3._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + @ffi.Uint64() + external int ri_phys_footprint; - /// Creates a block from a C function pointer. - ObjCBlock3.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - NSUInteger arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock3_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint64() + external int ri_proc_start_abstime; - /// Creates a block from a Dart function. - ObjCBlock3.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock3_closureTrampoline) - .cast(), - _ObjCBlock3_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Uint64() + external int ri_child_user_time; -bool _ObjCBlock4_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + @ffi.Uint64() + external int ri_child_system_time; -final _ObjCBlock4_closureRegistry = {}; -int _ObjCBlock4_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock4_registerClosure(Function fn) { - final id = ++_ObjCBlock4_closureRegistryIndex; - _ObjCBlock4_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; -bool _ObjCBlock4_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _ObjCBlock4_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + @ffi.Uint64() + external int ri_child_interrupt_wkups; -class ObjCBlock4 extends _ObjCBlockBase { - ObjCBlock4._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + @ffi.Uint64() + external int ri_child_pageins; - /// Creates a block from a C function pointer. - ObjCBlock4.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - NSUInteger arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock4_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint64() + external int ri_child_elapsed_abstime; - /// Creates a block from a Dart function. - ObjCBlock4.fromFunction( - NativeCupertinoHttp lib, - bool Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock4_closureTrampoline, false) - .cast(), - _ObjCBlock4_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call( - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @ffi.Uint64() + external int ri_diskio_byteswritten; } -typedef NSComparator = ffi.Pointer<_ObjCBlock>; -int _ObjCBlock5_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} +class rusage_info_v3 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; -final _ObjCBlock5_closureRegistry = {}; -int _ObjCBlock5_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock5_registerClosure(Function fn) { - final id = ++_ObjCBlock5_closureRegistryIndex; - _ObjCBlock5_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @ffi.Uint64() + external int ri_user_time; -int _ObjCBlock5_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock5_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + @ffi.Uint64() + external int ri_system_time; -class ObjCBlock5 extends _ObjCBlockBase { - ObjCBlock5._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + @ffi.Uint64() + external int ri_pkg_idle_wkups; - /// Creates a block from a C function pointer. - ObjCBlock5.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock5_fnPtrTrampoline, 0) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint64() + external int ri_interrupt_wkups; - /// Creates a block from a Dart function. - ObjCBlock5.fromFunction( - NativeCupertinoHttp lib, - int Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock5_closureTrampoline, 0) - .cast(), - _ObjCBlock5_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - int call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + @ffi.Uint64() + external int ri_pageins; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Uint64() + external int ri_wired_size; -abstract class NSSortOptions { - static const int NSSortConcurrent = 1; - static const int NSSortStable = 16; -} + @ffi.Uint64() + external int ri_resident_size; -abstract class NSBinarySearchingOptions { - static const int NSBinarySearchingFirstEqual = 256; - static const int NSBinarySearchingLastEqual = 512; - static const int NSBinarySearchingInsertionIndex = 1024; -} + @ffi.Uint64() + external int ri_phys_footprint; -class NSOrderedCollectionDifference extends NSObject { - NSOrderedCollectionDifference._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Uint64() + external int ri_proc_start_abstime; - /// Returns a [NSOrderedCollectionDifference] that points to the same underlying object as [other]. - static NSOrderedCollectionDifference castFrom( - T other) { - return NSOrderedCollectionDifference._(other._id, other._lib, - retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - /// Returns a [NSOrderedCollectionDifference] that wraps the given raw object pointer. - static NSOrderedCollectionDifference castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrderedCollectionDifference._(other, lib, - retain: retain, release: release); - } + @ffi.Uint64() + external int ri_child_user_time; - /// Returns whether [obj] is an instance of [NSOrderedCollectionDifference]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOrderedCollectionDifference1); - } + @ffi.Uint64() + external int ri_child_system_time; - NSOrderedCollectionDifference initWithChanges_(NSObject? changes) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_initWithChanges_1, changes?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - NSOrderedCollectionDifference - initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_( - NSIndexSet? inserts, - NSObject? insertedObjects, - NSIndexSet? removes, - NSObject? removedObjects, - NSObject? changes) { - final _ret = _lib._objc_msgSend_146( - _id, - _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1, - inserts?._id ?? ffi.nullptr, - insertedObjects?._id ?? ffi.nullptr, - removes?._id ?? ffi.nullptr, - removedObjects?._id ?? ffi.nullptr, - changes?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - NSOrderedCollectionDifference - initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_( - NSIndexSet? inserts, - NSObject? insertedObjects, - NSIndexSet? removes, - NSObject? removedObjects) { - final _ret = _lib._objc_msgSend_147( - _id, - _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1, - inserts?._id ?? ffi.nullptr, - insertedObjects?._id ?? ffi.nullptr, - removes?._id ?? ffi.nullptr, - removedObjects?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pageins; - NSObject? get insertions { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_insertions1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - NSObject? get removals { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_removals1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - bool get hasChanges { - return _lib._objc_msgSend_11(_id, _lib._sel_hasChanges1); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - NSOrderedCollectionDifference differenceByTransformingChangesWithBlock_( - ObjCBlock6 block) { - final _ret = _lib._objc_msgSend_153( - _id, _lib._sel_differenceByTransformingChangesWithBlock_1, block._id); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_default; - NSOrderedCollectionDifference inverseDifference() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_inverseDifference1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - static NSOrderedCollectionDifference new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionDifference1, _lib._sel_new1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: false, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_background; - static NSOrderedCollectionDifference alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionDifference1, _lib._sel_alloc1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: false, release: true); - } -} + @ffi.Uint64() + external int ri_cpu_time_qos_utility; -ffi.Pointer _ObjCBlock6_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>()(arg0); -} + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; -final _ObjCBlock6_closureRegistry = {}; -int _ObjCBlock6_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock6_registerClosure(Function fn) { - final id = ++_ObjCBlock6_closureRegistryIndex; - _ObjCBlock6_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; -ffi.Pointer _ObjCBlock6_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock6_closureRegistry[block.ref.target.address]!(arg0); + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; } -class ObjCBlock6 extends _ObjCBlockBase { - ObjCBlock6._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class rusage_info_v4 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - /// Creates a block from a C function pointer. - ObjCBlock6.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock6_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint64() + external int ri_user_time; - /// Creates a block from a Dart function. - ObjCBlock6.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock6_closureTrampoline) - .cast(), - _ObjCBlock6_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } + @ffi.Uint64() + external int ri_system_time; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Uint64() + external int ri_pkg_idle_wkups; -class NSOrderedCollectionChange extends NSObject { - NSOrderedCollectionChange._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Uint64() + external int ri_interrupt_wkups; - /// Returns a [NSOrderedCollectionChange] that points to the same underlying object as [other]. - static NSOrderedCollectionChange castFrom(T other) { - return NSOrderedCollectionChange._(other._id, other._lib, - retain: true, release: true); - } + @ffi.Uint64() + external int ri_pageins; - /// Returns a [NSOrderedCollectionChange] that wraps the given raw object pointer. - static NSOrderedCollectionChange castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrderedCollectionChange._(other, lib, - retain: retain, release: release); - } + @ffi.Uint64() + external int ri_wired_size; - /// Returns whether [obj] is an instance of [NSOrderedCollectionChange]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOrderedCollectionChange1); - } + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; - static NSOrderedCollectionChange changeWithObject_type_index_( - NativeCupertinoHttp _lib, NSObject anObject, int type, int index) { - final _ret = _lib._objc_msgSend_148(_lib._class_NSOrderedCollectionChange1, - _lib._sel_changeWithObject_type_index_1, anObject._id, type, index); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - static NSOrderedCollectionChange changeWithObject_type_index_associatedIndex_( - NativeCupertinoHttp _lib, - NSObject anObject, - int type, - int index, - int associatedIndex) { - final _ret = _lib._objc_msgSend_149( - _lib._class_NSOrderedCollectionChange1, - _lib._sel_changeWithObject_type_index_associatedIndex_1, - anObject._id, - type, - index, - associatedIndex); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - NSObject get object { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_user_time; - int get changeType { - return _lib._objc_msgSend_150(_id, _lib._sel_changeType1); - } + @ffi.Uint64() + external int ri_child_system_time; - int get index { - return _lib._objc_msgSend_12(_id, _lib._sel_index1); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - int get associatedIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_associatedIndex1); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - @override - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pageins; - NSOrderedCollectionChange initWithObject_type_index_( - NSObject anObject, int type, int index) { - final _ret = _lib._objc_msgSend_151( - _id, _lib._sel_initWithObject_type_index_1, anObject._id, type, index); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - NSOrderedCollectionChange initWithObject_type_index_associatedIndex_( - NSObject anObject, int type, int index, int associatedIndex) { - final _ret = _lib._objc_msgSend_152( - _id, - _lib._sel_initWithObject_type_index_associatedIndex_1, - anObject._id, - type, - index, - associatedIndex); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - static NSOrderedCollectionChange new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionChange1, _lib._sel_new1); - return NSOrderedCollectionChange._(_ret, _lib, - retain: false, release: true); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - static NSOrderedCollectionChange alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionChange1, _lib._sel_alloc1); - return NSOrderedCollectionChange._(_ret, _lib, - retain: false, release: true); - } -} + @ffi.Uint64() + external int ri_cpu_time_qos_default; -abstract class NSCollectionChangeType { - static const int NSCollectionChangeInsert = 0; - static const int NSCollectionChangeRemove = 1; -} + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; -abstract class NSOrderedCollectionDifferenceCalculationOptions { - static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = - 1; - static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = - 2; - static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; -} + @ffi.Uint64() + external int ri_cpu_time_qos_background; -bool _ObjCBlock7_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} + @ffi.Uint64() + external int ri_cpu_time_qos_utility; -final _ObjCBlock7_closureRegistry = {}; -int _ObjCBlock7_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock7_registerClosure(Function fn) { - final id = ++_ObjCBlock7_closureRegistryIndex; - _ObjCBlock7_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; -bool _ObjCBlock7_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock7_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; -class ObjCBlock7 extends _ObjCBlockBase { - ObjCBlock7._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - /// Creates a block from a C function pointer. - ObjCBlock7.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock7_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint64() + external int ri_billed_system_time; - /// Creates a block from a Dart function. - ObjCBlock7.fromFunction( - NativeCupertinoHttp lib, - bool Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock7_closureTrampoline, false) - .cast(), - _ObjCBlock7_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + @ffi.Uint64() + external int ri_serviced_system_time; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Uint64() + external int ri_logical_writes; -void _ObjCBlock8_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; -final _ObjCBlock8_closureRegistry = {}; -int _ObjCBlock8_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock8_registerClosure(Function fn) { - final id = ++_ObjCBlock8_closureRegistryIndex; - _ObjCBlock8_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @ffi.Uint64() + external int ri_instructions; -void _ObjCBlock8_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock8_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + @ffi.Uint64() + external int ri_cycles; -class ObjCBlock8 extends _ObjCBlockBase { - ObjCBlock8._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + @ffi.Uint64() + external int ri_billed_energy; - /// Creates a block from a C function pointer. - ObjCBlock8.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock8_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint64() + external int ri_serviced_energy; - /// Creates a block from a Dart function. - ObjCBlock8.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock8_closureTrampoline) - .cast(), - _ObjCBlock8_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + @ffi.Uint64() + external int ri_interval_max_phys_footprint; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @ffi.Uint64() + external int ri_runnable_time; } -bool _ObjCBlock9_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} +class rusage_info_v5 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; -final _ObjCBlock9_closureRegistry = {}; -int _ObjCBlock9_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock9_registerClosure(Function fn) { - final id = ++_ObjCBlock9_closureRegistryIndex; - _ObjCBlock9_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @ffi.Uint64() + external int ri_user_time; -bool _ObjCBlock9_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock9_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + @ffi.Uint64() + external int ri_system_time; -class ObjCBlock9 extends _ObjCBlockBase { - ObjCBlock9._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + @ffi.Uint64() + external int ri_pkg_idle_wkups; - /// Creates a block from a C function pointer. - ObjCBlock9.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock9_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint64() + external int ri_interrupt_wkups; - /// Creates a block from a Dart function. - ObjCBlock9.fromFunction( - NativeCupertinoHttp lib, - bool Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock9_closureTrampoline, false) - .cast(), - _ObjCBlock9_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + @ffi.Uint64() + external int ri_pageins; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Uint64() + external int ri_wired_size; -class NSFastEnumerationState extends ffi.Struct { - @ffi.UnsignedLong() - external int state; + @ffi.Uint64() + external int ri_resident_size; - external ffi.Pointer> itemsPtr; + @ffi.Uint64() + external int ri_phys_footprint; - external ffi.Pointer mutationsPtr; + @ffi.Uint64() + external int ri_proc_start_abstime; - @ffi.Array.multi([5]) - external ffi.Array extra; -} + @ffi.Uint64() + external int ri_proc_exit_abstime; -ffi.Pointer _ObjCBlock10_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>()(arg0, arg1); -} + @ffi.Uint64() + external int ri_child_user_time; -final _ObjCBlock10_closureRegistry = {}; -int _ObjCBlock10_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock10_registerClosure(Function fn) { - final id = ++_ObjCBlock10_closureRegistryIndex; - _ObjCBlock10_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @ffi.Uint64() + external int ri_child_system_time; -ffi.Pointer _ObjCBlock10_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) { - return _ObjCBlock10_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; -class ObjCBlock10 extends _ObjCBlockBase { - ObjCBlock10._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + @ffi.Uint64() + external int ri_child_interrupt_wkups; - /// Creates a block from a C function pointer. - ObjCBlock10.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>( - _ObjCBlock10_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint64() + external int ri_child_pageins; - /// Creates a block from a Dart function. - ObjCBlock10.fromFunction( - NativeCupertinoHttp lib, - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>( - _ObjCBlock10_closureTrampoline) - .cast(), - _ObjCBlock10_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call( - ffi.Pointer arg0, NSErrorUserInfoKey arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>()(_id, arg0, arg1); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Uint64() + external int ri_diskio_byteswritten; -typedef NSErrorUserInfoKey = ffi.Pointer; -typedef NSURLResourceKey = ffi.Pointer; + @ffi.Uint64() + external int ri_cpu_time_qos_default; -/// Working with Bookmarks and alias (bookmark) files -abstract class NSURLBookmarkCreationOptions { - /// This option does nothing and has no effect on bookmark resolution - static const int NSURLBookmarkCreationPreferFileIDResolution = 256; + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - /// creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways - static const int NSURLBookmarkCreationMinimalBookmark = 512; + @ffi.Uint64() + external int ri_cpu_time_qos_background; - /// include the properties required by writeBookmarkData:toURL:options: in the bookmark data created - static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - /// include information in the bookmark data which allows the same sandboxed process to access the resource after being relaunched - static const int NSURLBookmarkCreationWithSecurityScope = 2048; + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; - /// if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted - static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; -} + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; -abstract class NSURLBookmarkResolutionOptions { - /// don't perform any user interaction during bookmark resolution - static const int NSURLBookmarkResolutionWithoutUI = 256; + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - /// don't mount a volume during bookmark resolution - static const int NSURLBookmarkResolutionWithoutMounting = 512; + @ffi.Uint64() + external int ri_billed_system_time; - /// use the secure information included at creation time to provide the ability to access the resource in a sandboxed process - static const int NSURLBookmarkResolutionWithSecurityScope = 1024; -} + @ffi.Uint64() + external int ri_serviced_system_time; -typedef NSURLBookmarkFileCreationOptions = NSUInteger; + @ffi.Uint64() + external int ri_logical_writes; -class NSURLHandle extends NSObject { - NSURLHandle._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; - /// Returns a [NSURLHandle] that points to the same underlying object as [other]. - static NSURLHandle castFrom(T other) { - return NSURLHandle._(other._id, other._lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_instructions; - /// Returns a [NSURLHandle] that wraps the given raw object pointer. - static NSURLHandle castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLHandle._(other, lib, retain: retain, release: release); - } + @ffi.Uint64() + external int ri_cycles; - /// Returns whether [obj] is an instance of [NSURLHandle]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); - } + @ffi.Uint64() + external int ri_billed_energy; - static void registerURLHandleClass_( - NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { - return _lib._objc_msgSend_200(_lib._class_NSURLHandle1, - _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); - } + @ffi.Uint64() + external int ri_serviced_energy; - static NSObject URLHandleClassForURL_( - NativeCupertinoHttp _lib, NSURL? anURL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSURLHandle1, - _lib._sel_URLHandleClassForURL_1, anURL?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_interval_max_phys_footprint; - int status() { - return _lib._objc_msgSend_202(_id, _lib._sel_status1); - } + @ffi.Uint64() + external int ri_runnable_time; - NSString failureReason() { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_failureReason1); - return NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_flags; +} - void addClient_(NSObject? client) { - return _lib._objc_msgSend_200( - _id, _lib._sel_addClient_1, client?._id ?? ffi.nullptr); - } +class rusage_info_v6 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - void removeClient_(NSObject? client) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeClient_1, client?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_user_time; - void loadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); - } + @ffi.Uint64() + external int ri_system_time; - void cancelLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - NSData resourceData() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_resourceData1); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - NSData availableResourceData() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_availableResourceData1); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_pageins; - int expectedResourceDataSize() { - return _lib._objc_msgSend_82(_id, _lib._sel_expectedResourceDataSize1); - } + @ffi.Uint64() + external int ri_wired_size; - void flushCachedData() { - return _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); - } + @ffi.Uint64() + external int ri_resident_size; - void backgroundLoadDidFailWithReason_(NSString? reason) { - return _lib._objc_msgSend_188( - _id, - _lib._sel_backgroundLoadDidFailWithReason_1, - reason?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_phys_footprint; - void didLoadBytes_loadComplete_(NSData? newBytes, bool yorn) { - return _lib._objc_msgSend_203(_id, _lib._sel_didLoadBytes_loadComplete_1, - newBytes?._id ?? ffi.nullptr, yorn); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL? anURL) { - return _lib._objc_msgSend_204(_lib._class_NSURLHandle1, - _lib._sel_canInitWithURL_1, anURL?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - static NSURLHandle cachedHandleForURL_( - NativeCupertinoHttp _lib, NSURL? anURL) { - final _ret = _lib._objc_msgSend_205(_lib._class_NSURLHandle1, - _lib._sel_cachedHandleForURL_1, anURL?._id ?? ffi.nullptr); - return NSURLHandle._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_user_time; - NSObject initWithURL_cached_(NSURL? anURL, bool willCache) { - final _ret = _lib._objc_msgSend_206(_id, _lib._sel_initWithURL_cached_1, - anURL?._id ?? ffi.nullptr, willCache); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_system_time; - NSObject propertyForKey_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - NSObject propertyForKeyIfAvailable_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_42(_id, - _lib._sel_propertyForKeyIfAvailable_1, propertyKey?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - bool writeProperty_forKey_(NSObject propertyValue, NSString? propertyKey) { - return _lib._objc_msgSend_199(_id, _lib._sel_writeProperty_forKey_1, - propertyValue._id, propertyKey?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_child_pageins; - bool writeData_(NSData? data) { - return _lib._objc_msgSend_35( - _id, _lib._sel_writeData_1, data?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - NSData loadInForeground() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_loadInForeground1); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - void beginLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - void endLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); - } + @ffi.Uint64() + external int ri_cpu_time_qos_default; - static NSURLHandle new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - static NSURLHandle alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } -} + @ffi.Uint64() + external int ri_cpu_time_qos_background; -abstract class NSURLHandleStatus { - static const int NSURLHandleNotLoaded = 0; - static const int NSURLHandleLoadSucceeded = 1; - static const int NSURLHandleLoadInProgress = 2; - static const int NSURLHandleLoadFailed = 3; -} + @ffi.Uint64() + external int ri_cpu_time_qos_utility; -abstract class NSDataWritingOptions { - /// Hint to use auxiliary file when saving; equivalent to atomically:YES - static const int NSDataWritingAtomic = 1; + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; - /// Hint to prevent overwriting an existing file. Cannot be combined with NSDataWritingAtomic. - static const int NSDataWritingWithoutOverwriting = 2; - static const int NSDataWritingFileProtectionNone = 268435456; - static const int NSDataWritingFileProtectionComplete = 536870912; - static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; - static const int - NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = - 1073741824; - static const int NSDataWritingFileProtectionMask = 4026531840; + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; - /// Deprecated name for NSDataWritingAtomic - static const int NSAtomicWrite = 1; -} + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; -/// Data Search Options -abstract class NSDataSearchOptions { - static const int NSDataSearchBackwards = 1; - static const int NSDataSearchAnchored = 2; -} + @ffi.Uint64() + external int ri_billed_system_time; -void _ObjCBlock11_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + @ffi.Uint64() + external int ri_serviced_system_time; -final _ObjCBlock11_closureRegistry = {}; -int _ObjCBlock11_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock11_registerClosure(Function fn) { - final id = ++_ObjCBlock11_closureRegistryIndex; - _ObjCBlock11_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @ffi.Uint64() + external int ri_logical_writes; -void _ObjCBlock11_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return _ObjCBlock11_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; -class ObjCBlock11 extends _ObjCBlockBase { - ObjCBlock11._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + @ffi.Uint64() + external int ri_instructions; - /// Creates a block from a C function pointer. - ObjCBlock11.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>( - _ObjCBlock11_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint64() + external int ri_cycles; - /// Creates a block from a Dart function. - ObjCBlock11.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>( - _ObjCBlock11_closureTrampoline) - .cast(), - _ObjCBlock11_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + @ffi.Uint64() + external int ri_billed_energy; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Uint64() + external int ri_serviced_energy; -/// Read/Write Options -abstract class NSDataReadingOptions { - /// Hint to map the file in if possible and safe - static const int NSDataReadingMappedIfSafe = 1; + @ffi.Uint64() + external int ri_interval_max_phys_footprint; - /// Hint to get the file not to be cached in the kernel - static const int NSDataReadingUncached = 2; + @ffi.Uint64() + external int ri_runnable_time; - /// Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given. - static const int NSDataReadingMappedAlways = 8; + @ffi.Uint64() + external int ri_flags; - /// Deprecated name for NSDataReadingMappedIfSafe - static const int NSDataReadingMapped = 1; + @ffi.Uint64() + external int ri_user_ptime; - /// Deprecated name for NSDataReadingMapped - static const int NSMappedRead = 1; + @ffi.Uint64() + external int ri_system_ptime; - /// Deprecated name for NSDataReadingUncached - static const int NSUncachedRead = 2; -} + @ffi.Uint64() + external int ri_pinstructions; -void _ObjCBlock12_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); + @ffi.Uint64() + external int ri_pcycles; + + @ffi.Uint64() + external int ri_energy_nj; + + @ffi.Uint64() + external int ri_penergy_nj; + + @ffi.Array.multi([14]) + external ffi.Array ri_reserved; } -final _ObjCBlock12_closureRegistry = {}; -int _ObjCBlock12_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock12_registerClosure(Function fn) { - final id = ++_ObjCBlock12_closureRegistryIndex; - _ObjCBlock12_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +class rlimit extends ffi.Struct { + @rlim_t() + external int rlim_cur; + + @rlim_t() + external int rlim_max; } -void _ObjCBlock12_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return _ObjCBlock12_closureRegistry[block.ref.target.address]!(arg0, arg1); +typedef rlim_t = __uint64_t; + +class proc_rlimit_control_wakeupmon extends ffi.Struct { + @ffi.Uint32() + external int wm_flags; + + @ffi.Int32() + external int wm_rate; } -class ObjCBlock12 extends _ObjCBlockBase { - ObjCBlock12._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef id_t = __darwin_id_t; +typedef __darwin_id_t = __uint32_t; - /// Creates a block from a C function pointer. - ObjCBlock12.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, NSUInteger arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock12_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +@ffi.Packed(1) +class _OSUnalignedU16 extends ffi.Struct { + @ffi.Uint16() + external int __val; +} - /// Creates a block from a Dart function. - ObjCBlock12.fromFunction(NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, int arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock12_closureTrampoline) - .cast(), - _ObjCBlock12_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); - } +@ffi.Packed(1) +class _OSUnalignedU32 extends ffi.Struct { + @ffi.Uint32() + external int __val; +} - ffi.Pointer<_ObjCBlock> get pointer => _id; +@ffi.Packed(1) +class _OSUnalignedU64 extends ffi.Struct { + @ffi.Uint64() + external int __val; } -abstract class NSDataBase64DecodingOptions { - /// Use the following option to modify the decoding algorithm so that it ignores unknown non-Base64 bytes, including line ending characters. - static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; +class wait extends ffi.Opaque {} + +class div_t extends ffi.Struct { + @ffi.Int() + external int quot; + + @ffi.Int() + external int rem; } -/// Base 64 Options -abstract class NSDataBase64EncodingOptions { - /// Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default. - static const int NSDataBase64Encoding64CharacterLineLength = 1; - static const int NSDataBase64Encoding76CharacterLineLength = 2; +class ldiv_t extends ffi.Struct { + @ffi.Long() + external int quot; - /// Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF. - static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; - static const int NSDataBase64EncodingEndLineWithLineFeed = 32; + @ffi.Long() + external int rem; } -/// Various algorithms provided for compression APIs. See NSData and NSMutableData. -abstract class NSDataCompressionAlgorithm { - /// LZFSE is the recommended compression algorithm if you don't have a specific reason to use another algorithm. Note that LZFSE is intended for use with Apple devices only. This algorithm generally compresses better than Zlib, but not as well as LZMA. It is generally slower than LZ4. - static const int NSDataCompressionAlgorithmLZFSE = 0; +class lldiv_t extends ffi.Struct { + @ffi.LongLong() + external int quot; - /// LZ4 is appropriate if compression speed is critical. LZ4 generally sacrifices compression ratio in order to achieve its greater speed. - /// This implementation of LZ4 makes a small modification to the standard format, which is described in greater detail in . - static const int NSDataCompressionAlgorithmLZ4 = 1; + @ffi.LongLong() + external int rem; +} - /// LZMA is appropriate if compression ratio is critical and memory usage and compression speed are not a factor. LZMA is an order of magnitude slower for both compression and decompression than other algorithms. It can also use a very large amount of memory, so if you need to compress large amounts of data on embedded devices with limited memory you should probably avoid LZMA. - /// Encoding uses LZMA level 6 only, but decompression works with any compression level. - static const int NSDataCompressionAlgorithmLZMA = 2; +class _ObjCBlockBase implements ffi.Finalizable { + final ffi.Pointer<_ObjCBlock> _id; + final NativeCupertinoHttp _lib; + bool _pendingRelease; - /// Zlib is appropriate if you want a good balance between compression speed and compression ratio, but only if you need interoperability with non-Apple platforms. Otherwise, LZFSE is generally a better choice than Zlib. - /// Encoding uses Zlib level 5 only, but decompression works with any compression level. It uses the raw DEFLATE format as described in IETF RFC 1951. - static const int NSDataCompressionAlgorithmZlib = 3; -} + _ObjCBlockBase._(this._id, this._lib, + {bool retain = false, bool release = false}) + : _pendingRelease = release { + if (retain) { + _lib._Block_copy(_id.cast()); + } + if (release) { + _lib._objc_releaseFinalizer2.attach(this, _id.cast(), detach: this); + } + } -typedef UTF32Char = UInt32; -typedef UInt32 = ffi.UnsignedInt; + /// Releases the reference to the underlying ObjC block held by this wrapper. + /// Throws a StateError if this wrapper doesn't currently hold a reference. + void release() { + if (_pendingRelease) { + _pendingRelease = false; + _lib._Block_release(_id.cast()); + _lib._objc_releaseFinalizer2.detach(this); + } else { + throw StateError( + 'Released an ObjC block that was unowned or already released.'); + } + } -abstract class NSStringEnumerationOptions { - static const int NSStringEnumerationByLines = 0; - static const int NSStringEnumerationByParagraphs = 1; - static const int NSStringEnumerationByComposedCharacterSequences = 2; - static const int NSStringEnumerationByWords = 3; - static const int NSStringEnumerationBySentences = 4; - static const int NSStringEnumerationByCaretPositions = 5; - static const int NSStringEnumerationByDeletionClusters = 6; - static const int NSStringEnumerationReverse = 256; - static const int NSStringEnumerationSubstringNotRequired = 512; - static const int NSStringEnumerationLocalized = 1024; + @override + bool operator ==(Object other) { + return other is _ObjCBlockBase && _id == other._id; + } + + @override + int get hashCode => _id.hashCode; } -void _ObjCBlock13_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3) { +void _ObjCBlock_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block) { return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - NSRange arg2, ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>()(arg0, arg1, arg2, arg3); + .cast>() + .asFunction()(); } -final _ObjCBlock13_closureRegistry = {}; -int _ObjCBlock13_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock13_registerClosure(Function fn) { - final id = ++_ObjCBlock13_closureRegistryIndex; - _ObjCBlock13_closureRegistry[id] = fn; +final _ObjCBlock_closureRegistry = {}; +int _ObjCBlock_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_registerClosure(Function fn) { + final id = ++_ObjCBlock_closureRegistryIndex; + _ObjCBlock_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock13_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3) { - return _ObjCBlock13_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2, arg3); +void _ObjCBlock_closureTrampoline(ffi.Pointer<_ObjCBlock> block) { + return _ObjCBlock_closureRegistry[block.ref.target.address]!(); } -class ObjCBlock13 extends _ObjCBlockBase { - ObjCBlock13._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock extends _ObjCBlockBase { + ObjCBlock._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock13.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - NSRange arg2, ffi.Pointer arg3)>> - ptr) + ObjCBlock.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>( - _ObjCBlock13_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( + _ObjCBlock_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock13.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, NSRange arg1, NSRange arg2, - ffi.Pointer arg3) - fn) + ObjCBlock.fromFunction(NativeCupertinoHttp lib, void Function() fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>( - _ObjCBlock13_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( + _ObjCBlock_closureTrampoline) .cast(), - _ObjCBlock13_registerClosure(fn)), + _ObjCBlock_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, NSRange arg1, NSRange arg2, - ffi.Pointer arg3) { + void call() { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>()(_id, arg0, arg1, arg2, arg3); + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() + .asFunction block)>()(_id); } ffi.Pointer<_ObjCBlock> get pointer => _id; } -void _ObjCBlock14_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} +class _ObjCBlockDesc extends ffi.Struct { + @ffi.UnsignedLong() + external int reserved; -final _ObjCBlock14_closureRegistry = {}; -int _ObjCBlock14_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock14_registerClosure(Function fn) { - final id = ++_ObjCBlock14_closureRegistryIndex; - _ObjCBlock14_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @ffi.UnsignedLong() + external int size; -void _ObjCBlock14_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock14_closureRegistry[block.ref.target.address]!(arg0, arg1); + external ffi.Pointer copy_helper; + + external ffi.Pointer dispose_helper; + + external ffi.Pointer signature; } -class ObjCBlock14 extends _ObjCBlockBase { - ObjCBlock14._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class _ObjCBlock extends ffi.Struct { + external ffi.Pointer isa; - /// Creates a block from a C function pointer. - ObjCBlock14.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock14_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Int() + external int flags; - /// Creates a block from a Dart function. - ObjCBlock14.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock14_closureTrampoline) - .cast(), - _ObjCBlock14_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + @ffi.Int() + external int reserved; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + external ffi.Pointer invoke; -typedef NSStringEncoding = NSUInteger; + external ffi.Pointer<_ObjCBlockDesc> descriptor; -abstract class NSStringEncodingConversionOptions { - static const int NSStringEncodingConversionAllowLossy = 1; - static const int NSStringEncodingConversionExternalRepresentation = 2; + external ffi.Pointer target; } -typedef NSStringTransform = ffi.Pointer; -void _ObjCBlock15_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { +int _ObjCBlock1_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { return block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() + ffi.Int Function( + ffi.Pointer arg0, ffi.Pointer arg1)>>() .asFunction< - void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); + int Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); } -final _ObjCBlock15_closureRegistry = {}; -int _ObjCBlock15_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock15_registerClosure(Function fn) { - final id = ++_ObjCBlock15_closureRegistryIndex; - _ObjCBlock15_closureRegistry[id] = fn; +final _ObjCBlock1_closureRegistry = {}; +int _ObjCBlock1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock1_registerClosure(Function fn) { + final id = ++_ObjCBlock1_closureRegistryIndex; + _ObjCBlock1_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock15_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return _ObjCBlock15_closureRegistry[block.ref.target.address]!(arg0, arg1); +int _ObjCBlock1_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock1_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock15 extends _ObjCBlockBase { - ObjCBlock15._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock1 extends _ObjCBlockBase { + ObjCBlock1._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock15.fromFunctionPointer( + ObjCBlock1.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, NSUInteger arg1)>> + ffi.Int Function( + ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock15_fnPtrTrampoline) + ffi.Int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock1_fnPtrTrampoline, 0) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock15.fromFunction(NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, int arg1) fn) + ObjCBlock1.fromFunction(NativeCupertinoHttp lib, + int Function(ffi.Pointer arg0, ffi.Pointer arg1) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock15_closureTrampoline) + ffi.Int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock1_closureTrampoline, 0) .cast(), - _ObjCBlock15_registerClosure(fn)), + _ObjCBlock1_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, int arg1) { + int call(ffi.Pointer arg0, ffi.Pointer arg1) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSUInteger arg1)>>() + ffi.Int Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); + int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef va_list = __builtin_va_list; -typedef __builtin_va_list = ffi.Pointer; - -abstract class NSQualityOfService { - static const int NSQualityOfServiceUserInteractive = 33; - static const int NSQualityOfServiceUserInitiated = 25; - static const int NSQualityOfServiceUtility = 17; - static const int NSQualityOfServiceBackground = 9; - static const int NSQualityOfServiceDefault = -1; -} - -abstract class ptrauth_key { - static const int ptrauth_key_asia = 0; - static const int ptrauth_key_asib = 1; - static const int ptrauth_key_asda = 2; - static const int ptrauth_key_asdb = 3; - static const int ptrauth_key_process_independent_code = 0; - static const int ptrauth_key_process_dependent_code = 1; - static const int ptrauth_key_process_independent_data = 2; - static const int ptrauth_key_process_dependent_data = 3; - static const int ptrauth_key_function_pointer = 0; - static const int ptrauth_key_return_address = 1; - static const int ptrauth_key_frame_pointer = 3; - static const int ptrauth_key_block_function = 0; - static const int ptrauth_key_cxx_vtable_pointer = 2; - static const int ptrauth_key_method_list_pointer = 2; - static const int ptrauth_key_objc_isa_pointer = 2; - static const int ptrauth_key_objc_super_pointer = 2; - static const int ptrauth_key_block_descriptor_pointer = 2; - static const int ptrauth_key_objc_sel_pointer = 3; - static const int ptrauth_key_objc_class_ro_pointer = 2; -} - -@ffi.Packed(2) -class wide extends ffi.Struct { - @UInt32() - external int lo; - - @SInt32() - external int hi; -} - -typedef SInt32 = ffi.Int; - -@ffi.Packed(2) -class UnsignedWide extends ffi.Struct { - @UInt32() - external int lo; - - @UInt32() - external int hi; -} - -class Float80 extends ffi.Struct { - @SInt16() - external int exp; - - @ffi.Array.multi([4]) - external ffi.Array man; -} - -typedef SInt16 = ffi.Short; -typedef UInt16 = ffi.UnsignedShort; - -class Float96 extends ffi.Struct { - @ffi.Array.multi([2]) - external ffi.Array exp; - - @ffi.Array.multi([4]) - external ffi.Array man; -} - -@ffi.Packed(2) -class Float32Point extends ffi.Struct { - @Float32() - external double x; - - @Float32() - external double y; -} - -typedef Float32 = ffi.Float; - -@ffi.Packed(2) -class ProcessSerialNumber extends ffi.Struct { - @UInt32() - external int highLongOfPSN; - - @UInt32() - external int lowLongOfPSN; -} - -class Point extends ffi.Struct { - @ffi.Short() - external int v; +typedef dev_t = __darwin_dev_t; +typedef __darwin_dev_t = __int32_t; +typedef mode_t = __darwin_mode_t; +typedef __darwin_mode_t = __uint16_t; +typedef __uint16_t = ffi.UnsignedShort; - @ffi.Short() - external int h; +class fd_set extends ffi.Struct { + @ffi.Array.multi([32]) + external ffi.Array<__int32_t> fds_bits; } -class Rect extends ffi.Struct { - @ffi.Short() - external int top; - - @ffi.Short() - external int left; - - @ffi.Short() - external int bottom; +class objc_class extends ffi.Opaque {} - @ffi.Short() - external int right; +class objc_object extends ffi.Struct { + external ffi.Pointer isa; } -@ffi.Packed(2) -class FixedPoint extends ffi.Struct { - @Fixed() - external int x; +class ObjCObject extends ffi.Opaque {} - @Fixed() - external int y; -} +class objc_selector extends ffi.Opaque {} -typedef Fixed = SInt32; +class _malloc_zone_t extends ffi.Opaque {} -@ffi.Packed(2) -class FixedRect extends ffi.Struct { - @Fixed() - external int left; +class ObjCSel extends ffi.Opaque {} - @Fixed() - external int top; +typedef objc_objectptr_t = ffi.Pointer; - @Fixed() - external int right; +class _NSZone extends ffi.Opaque {} - @Fixed() - external int bottom; -} +class _ObjCWrapper implements ffi.Finalizable { + final ffi.Pointer _id; + final NativeCupertinoHttp _lib; + bool _pendingRelease; -class TimeBaseRecord extends ffi.Opaque {} + _ObjCWrapper._(this._id, this._lib, + {bool retain = false, bool release = false}) + : _pendingRelease = release { + if (retain) { + _lib._objc_retain(_id.cast()); + } + if (release) { + _lib._objc_releaseFinalizer11.attach(this, _id.cast(), detach: this); + } + } -@ffi.Packed(2) -class TimeRecord extends ffi.Struct { - external CompTimeValue value; + /// Releases the reference to the underlying ObjC object held by this wrapper. + /// Throws a StateError if this wrapper doesn't currently hold a reference. + void release() { + if (_pendingRelease) { + _pendingRelease = false; + _lib._objc_release(_id.cast()); + _lib._objc_releaseFinalizer11.detach(this); + } else { + throw StateError( + 'Released an ObjC object that was unowned or already released.'); + } + } - @TimeScale() - external int scale; + @override + bool operator ==(Object other) { + return other is _ObjCWrapper && _id == other._id; + } - external TimeBase base; + @override + int get hashCode => _id.hashCode; + ffi.Pointer get pointer => _id; } -typedef CompTimeValue = wide; -typedef TimeScale = SInt32; -typedef TimeBase = ffi.Pointer; - -class NumVersion extends ffi.Struct { - @UInt8() - external int nonRelRev; +class NSObject extends _ObjCWrapper { + NSObject._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @UInt8() - external int stage; + /// Returns a [NSObject] that points to the same underlying object as [other]. + static NSObject castFrom(T other) { + return NSObject._(other._id, other._lib, retain: true, release: true); + } - @UInt8() - external int minorAndBugRev; + /// Returns a [NSObject] that wraps the given raw object pointer. + static NSObject castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSObject._(other, lib, retain: retain, release: release); + } - @UInt8() - external int majorRev; -} + /// Returns whether [obj] is an instance of [NSObject]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); + } -typedef UInt8 = ffi.UnsignedChar; + static void load(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); + } -class NumVersionVariant extends ffi.Union { - external NumVersion parts; + static void initialize(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); + } - @UInt32() - external int whole; -} + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSObject._(_ret, _lib, retain: true, release: true); + } -class VersRec extends ffi.Struct { - external NumVersion numericVersion; + static NSObject new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); + return NSObject._(_ret, _lib, retain: false, release: true); + } - @ffi.Short() - external int countryCode; + static NSObject allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } - @ffi.Array.multi([256]) - external ffi.Array shortVersion; + static NSObject alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); + return NSObject._(_ret, _lib, retain: false, release: true); + } - @ffi.Array.multi([256]) - external ffi.Array reserved; -} + void dealloc() { + return _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); + } -typedef ConstStr255Param = ffi.Pointer; + void finalize() { + return _lib._objc_msgSend_1(_id, _lib._sel_finalize1); + } -class __CFString extends ffi.Opaque {} + NSObject copy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); + return NSObject._(_ret, _lib, retain: false, release: true); + } -abstract class CFComparisonResult { - static const int kCFCompareLessThan = -1; - static const int kCFCompareEqualTo = 0; - static const int kCFCompareGreaterThan = 1; -} + NSObject mutableCopy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); + return NSObject._(_ret, _lib, retain: false, release: true); + } -typedef CFIndex = ffi.Long; + static NSObject copyWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } -class CFRange extends ffi.Struct { - @CFIndex() - external int location; + static NSObject mutableCopyWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } - @CFIndex() - external int length; -} + static bool instancesRespondToSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_4(_lib._class_NSObject1, + _lib._sel_instancesRespondToSelector_1, aSelector); + } -class __CFNull extends ffi.Opaque {} + static bool conformsToProtocol_( + NativeCupertinoHttp _lib, Protocol? protocol) { + return _lib._objc_msgSend_5(_lib._class_NSObject1, + _lib._sel_conformsToProtocol_1, protocol?._id ?? ffi.nullptr); + } -typedef CFTypeID = ffi.UnsignedLong; -typedef CFNullRef = ffi.Pointer<__CFNull>; + IMP methodForSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); + } -class __CFAllocator extends ffi.Opaque {} + static IMP instanceMethodForSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_lib._class_NSObject1, + _lib._sel_instanceMethodForSelector_1, aSelector); + } -typedef CFAllocatorRef = ffi.Pointer<__CFAllocator>; + void doesNotRecognizeSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_7( + _id, _lib._sel_doesNotRecognizeSelector_1, aSelector); + } -class CFAllocatorContext extends ffi.Struct { - @CFIndex() - external int version; + NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_8( + _id, _lib._sel_forwardingTargetForSelector_1, aSelector); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer info; + void forwardInvocation_(NSInvocation? anInvocation) { + return _lib._objc_msgSend_9( + _id, _lib._sel_forwardInvocation_1, anInvocation?._id ?? ffi.nullptr); + } - external CFAllocatorRetainCallBack retain; + NSMethodSignature methodSignatureForSelector_( + ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_10( + _id, _lib._sel_methodSignatureForSelector_1, aSelector); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); + } - external CFAllocatorReleaseCallBack release; + static NSMethodSignature instanceMethodSignatureForSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_10(_lib._class_NSObject1, + _lib._sel_instanceMethodSignatureForSelector_1, aSelector); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); + } - external CFAllocatorCopyDescriptionCallBack copyDescription; + bool allowsWeakReference() { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsWeakReference1); + } - external CFAllocatorAllocateCallBack allocate; + bool retainWeakReference() { + return _lib._objc_msgSend_11(_id, _lib._sel_retainWeakReference1); + } - external CFAllocatorReallocateCallBack reallocate; + static bool isSubclassOfClass_(NativeCupertinoHttp _lib, NSObject aClass) { + return _lib._objc_msgSend_0( + _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); + } - external CFAllocatorDeallocateCallBack deallocate; + static bool resolveClassMethod_( + NativeCupertinoHttp _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); + } - external CFAllocatorPreferredSizeCallBack preferredSize; -} + static bool resolveInstanceMethod_( + NativeCupertinoHttp _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); + } -typedef CFAllocatorRetainCallBack = ffi.Pointer< - ffi.NativeFunction Function(ffi.Pointer)>>; -typedef CFAllocatorReleaseCallBack - = ffi.Pointer)>>; -typedef CFAllocatorCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFStringRef = ffi.Pointer<__CFString>; -typedef CFAllocatorAllocateCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFIndex, CFOptionFlags, ffi.Pointer)>>; -typedef CFOptionFlags = ffi.UnsignedLong; -typedef CFAllocatorReallocateCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, CFIndex, - CFOptionFlags, ffi.Pointer)>>; -typedef CFAllocatorDeallocateCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFAllocatorPreferredSizeCallBack = ffi.Pointer< - ffi.NativeFunction< - CFIndex Function(CFIndex, CFOptionFlags, ffi.Pointer)>>; -typedef CFTypeRef = ffi.Pointer; -typedef Boolean = ffi.UnsignedChar; -typedef CFHashCode = ffi.UnsignedLong; -typedef NSZone = _NSZone; + static int hash(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); + } -class NSMutableIndexSet extends NSIndexSet { - NSMutableIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static NSObject superclass(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); + return NSObject._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSMutableIndexSet] that points to the same underlying object as [other]. - static NSMutableIndexSet castFrom(T other) { - return NSMutableIndexSet._(other._id, other._lib, - retain: true, release: true); + static NSObject class1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSMutableIndexSet] that wraps the given raw object pointer. - static NSMutableIndexSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableIndexSet._(other, lib, retain: retain, release: release); + static NSString description(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_32(_lib._class_NSObject1, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSMutableIndexSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableIndexSet1); + static NSString debugDescription(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_32( + _lib._class_NSObject1, _lib._sel_debugDescription1); + return NSString._(_ret, _lib, retain: true, release: true); } - void addIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_281( - _id, _lib._sel_addIndexes_1, indexSet?._id ?? ffi.nullptr); + static int version(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_81(_lib._class_NSObject1, _lib._sel_version1); } - void removeIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_281( - _id, _lib._sel_removeIndexes_1, indexSet?._id ?? ffi.nullptr); + static void setVersion_(NativeCupertinoHttp _lib, int aVersion) { + return _lib._objc_msgSend_279( + _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); } - void removeAllIndexes() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllIndexes1); + NSObject get classForCoder { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); + return NSObject._(_ret, _lib, retain: true, release: true); } - void addIndex_(int value) { - return _lib._objc_msgSend_282(_id, _lib._sel_addIndex_1, value); + NSObject replacementObjectForCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_replacementObjectForCoder_1, coder?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - void removeIndex_(int value) { - return _lib._objc_msgSend_282(_id, _lib._sel_removeIndex_1, value); + NSObject awakeAfterUsingCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_awakeAfterUsingCoder_1, coder?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: false, release: true); } - void addIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_283(_id, _lib._sel_addIndexesInRange_1, range); + static void poseAsClass_(NativeCupertinoHttp _lib, NSObject aClass) { + return _lib._objc_msgSend_200( + _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); } - void removeIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_283(_id, _lib._sel_removeIndexesInRange_1, range); + NSObject get autoContentAccessingProxy { + final _ret = + _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); + return NSObject._(_ret, _lib, retain: true, release: true); } - void shiftIndexesStartingAtIndex_by_(int index, int delta) { - return _lib._objc_msgSend_284( - _id, _lib._sel_shiftIndexesStartingAtIndex_by_1, index, delta); + void URL_resourceDataDidBecomeAvailable_(NSURL? sender, NSData? newBytes) { + return _lib._objc_msgSend_280( + _id, + _lib._sel_URL_resourceDataDidBecomeAvailable_1, + sender?._id ?? ffi.nullptr, + newBytes?._id ?? ffi.nullptr); } - static NSMutableIndexSet indexSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableIndexSet1, _lib._sel_indexSet1); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + void URLResourceDidFinishLoading_(NSURL? sender) { + return _lib._objc_msgSend_281(_id, _lib._sel_URLResourceDidFinishLoading_1, + sender?._id ?? ffi.nullptr); } - static NSMutableIndexSet indexSetWithIndex_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSMutableIndexSet1, _lib._sel_indexSetWithIndex_1, value); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + void URLResourceDidCancelLoading_(NSURL? sender) { + return _lib._objc_msgSend_281(_id, _lib._sel_URLResourceDidCancelLoading_1, + sender?._id ?? ffi.nullptr); } - static NSMutableIndexSet indexSetWithIndexesInRange_( - NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_111(_lib._class_NSMutableIndexSet1, - _lib._sel_indexSetWithIndexesInRange_1, range); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + void URL_resourceDidFailLoadingWithReason_(NSURL? sender, NSString? reason) { + return _lib._objc_msgSend_282( + _id, + _lib._sel_URL_resourceDidFailLoadingWithReason_1, + sender?._id ?? ffi.nullptr, + reason?._id ?? ffi.nullptr); } - static NSMutableIndexSet new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_new1); - return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + /// Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: + /// + /// - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; + /// + /// The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. + void + attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( + NSError? error, + int recoveryOptionIndex, + NSObject delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo) { + return _lib._objc_msgSend_283( + _id, + _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, + error?._id ?? ffi.nullptr, + recoveryOptionIndex, + delegate._id, + didRecoverSelector, + contextInfo); } - static NSMutableIndexSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_alloc1); - return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + /// Given that an error alert has been presented applicaton-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and return YES if error recovery was completely successful, NO otherwise. The recovery option index is an index into the error's array of localized recovery options. + bool attemptRecoveryFromError_optionIndex_( + NSError? error, int recoveryOptionIndex) { + return _lib._objc_msgSend_284( + _id, + _lib._sel_attemptRecoveryFromError_optionIndex_1, + error?._id ?? ffi.nullptr, + recoveryOptionIndex); } } -/// Mutable Array -class NSMutableArray extends NSArray { - NSMutableArray._(ffi.Pointer id, NativeCupertinoHttp lib, +typedef instancetype = ffi.Pointer; + +class Protocol extends _ObjCWrapper { + Protocol._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSMutableArray] that points to the same underlying object as [other]. - static NSMutableArray castFrom(T other) { - return NSMutableArray._(other._id, other._lib, retain: true, release: true); + /// Returns a [Protocol] that points to the same underlying object as [other]. + static Protocol castFrom(T other) { + return Protocol._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSMutableArray] that wraps the given raw object pointer. - static NSMutableArray castFromPointer( + /// Returns a [Protocol] that wraps the given raw object pointer. + static Protocol castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSMutableArray._(other, lib, retain: retain, release: release); + return Protocol._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSMutableArray]. + /// Returns whether [obj] is an instance of [Protocol]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableArray1); - } - - void addObject_(NSObject anObject) { - return _lib._objc_msgSend_200(_id, _lib._sel_addObject_1, anObject._id); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); } +} - void insertObject_atIndex_(NSObject anObject, int index) { - return _lib._objc_msgSend_285( - _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); - } +typedef IMP = ffi.Pointer>; - void removeLastObject() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); - } +class NSInvocation extends _ObjCWrapper { + NSInvocation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - void removeObjectAtIndex_(int index) { - return _lib._objc_msgSend_282(_id, _lib._sel_removeObjectAtIndex_1, index); + /// Returns a [NSInvocation] that points to the same underlying object as [other]. + static NSInvocation castFrom(T other) { + return NSInvocation._(other._id, other._lib, retain: true, release: true); } - void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { - return _lib._objc_msgSend_286( - _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); + /// Returns a [NSInvocation] that wraps the given raw object pointer. + static NSInvocation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInvocation._(other, lib, retain: retain, release: release); } - @override - NSMutableArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSInvocation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInvocation1); } +} - NSMutableArray initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } +class NSMethodSignature extends _ObjCWrapper { + NSMethodSignature._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @override - NSMutableArray initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. + static NSMethodSignature castFrom(T other) { + return NSMethodSignature._(other._id, other._lib, + retain: true, release: true); } - void addObjectsFromArray_(NSArray? otherArray) { - return _lib._objc_msgSend_287( - _id, _lib._sel_addObjectsFromArray_1, otherArray?._id ?? ffi.nullptr); + /// Returns a [NSMethodSignature] that wraps the given raw object pointer. + static NSMethodSignature castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMethodSignature._(other, lib, retain: retain, release: release); } - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - return _lib._objc_msgSend_288( - _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); + /// Returns whether [obj] is an instance of [NSMethodSignature]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMethodSignature1); } +} - void removeAllObjects() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } +typedef NSUInteger = ffi.UnsignedLong; - void removeObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_289( - _id, _lib._sel_removeObject_inRange_1, anObject._id, range); - } +class NSString extends NSObject { + NSString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - void removeObject_(NSObject anObject) { - return _lib._objc_msgSend_200(_id, _lib._sel_removeObject_1, anObject._id); + /// Returns a [NSString] that points to the same underlying object as [other]. + static NSString castFrom(T other) { + return NSString._(other._id, other._lib, retain: true, release: true); } - void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_289( - _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); + /// Returns a [NSString] that wraps the given raw object pointer. + static NSString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSString._(other, lib, retain: retain, release: release); } - void removeObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); + /// Returns whether [obj] is an instance of [NSString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); } - void removeObjectsFromIndices_numIndices_( - ffi.Pointer indices, int cnt) { - return _lib._objc_msgSend_290( - _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); + factory NSString(NativeCupertinoHttp _lib, String str) { + final cstr = str.toNativeUtf16(); + final nsstr = stringWithCharacters_length_(_lib, cstr.cast(), str.length); + pkg_ffi.calloc.free(cstr); + return nsstr; } - void removeObjectsInArray_(NSArray? otherArray) { - return _lib._objc_msgSend_287( - _id, _lib._sel_removeObjectsInArray_1, otherArray?._id ?? ffi.nullptr); + @override + String toString() { + final data = + dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); + return data.bytes.cast().toDartString(length: length); } - void removeObjectsInRange_(NSRange range) { - return _lib._objc_msgSend_283(_id, _lib._sel_removeObjectsInRange_1, range); + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); } - void replaceObjectsInRange_withObjectsFromArray_range_( - NSRange range, NSArray? otherArray, NSRange otherRange) { - return _lib._objc_msgSend_291( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, - range, - otherArray?._id ?? ffi.nullptr, - otherRange); + int characterAtIndex_(int index) { + return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); } - void replaceObjectsInRange_withObjectsFromArray_( - NSRange range, NSArray? otherArray) { - return _lib._objc_msgSend_292( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, - range, - otherArray?._id ?? ffi.nullptr); + @override + NSString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSString._(_ret, _lib, retain: true, release: true); } - void setArray_(NSArray? otherArray) { - return _lib._objc_msgSend_287( - _id, _lib._sel_setArray_1, otherArray?._id ?? ffi.nullptr); + NSString initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - void sortUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context) { - return _lib._objc_msgSend_293( - _id, _lib._sel_sortUsingFunction_context_1, compare, context); + NSString substringFromIndex_(int from) { + final _ret = + _lib._objc_msgSend_15(_id, _lib._sel_substringFromIndex_1, from); + return NSString._(_ret, _lib, retain: true, release: true); } - void sortUsingSelector_(ffi.Pointer comparator) { - return _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); + NSString substringToIndex_(int to) { + final _ret = _lib._objc_msgSend_15(_id, _lib._sel_substringToIndex_1, to); + return NSString._(_ret, _lib, retain: true, release: true); } - void insertObjects_atIndexes_(NSArray? objects, NSIndexSet? indexes) { - return _lib._objc_msgSend_294(_id, _lib._sel_insertObjects_atIndexes_1, - objects?._id ?? ffi.nullptr, indexes?._id ?? ffi.nullptr); + NSString substringWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_16(_id, _lib._sel_substringWithRange_1, range); + return NSString._(_ret, _lib, retain: true, release: true); } - void removeObjectsAtIndexes_(NSIndexSet? indexes) { - return _lib._objc_msgSend_281( - _id, _lib._sel_removeObjectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + void getCharacters_range_(ffi.Pointer buffer, NSRange range) { + return _lib._objc_msgSend_17( + _id, _lib._sel_getCharacters_range_1, buffer, range); } - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet? indexes, NSArray? objects) { - return _lib._objc_msgSend_295( - _id, - _lib._sel_replaceObjectsAtIndexes_withObjects_1, - indexes?._id ?? ffi.nullptr, - objects?._id ?? ffi.nullptr); + int compare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_compare_1, string?._id ?? ffi.nullptr); } - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - return _lib._objc_msgSend_285( - _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); + int compare_options_(NSString? string, int mask) { + return _lib._objc_msgSend_19( + _id, _lib._sel_compare_options_1, string?._id ?? ffi.nullptr, mask); } - void sortUsingComparator_(NSComparator cmptr) { - return _lib._objc_msgSend_296(_id, _lib._sel_sortUsingComparator_1, cmptr); + int compare_options_range_( + NSString? string, int mask, NSRange rangeOfReceiverToCompare) { + return _lib._objc_msgSend_20(_id, _lib._sel_compare_options_range_1, + string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare); } - void sortWithOptions_usingComparator_(int opts, NSComparator cmptr) { - return _lib._objc_msgSend_297( - _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr); + int compare_options_range_locale_(NSString? string, int mask, + NSRange rangeOfReceiverToCompare, NSObject locale) { + return _lib._objc_msgSend_21(_id, _lib._sel_compare_options_range_locale_1, + string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare, locale._id); } - static NSMutableArray arrayWithCapacity_( - NativeCupertinoHttp _lib, int numItems) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + int caseInsensitiveCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_caseInsensitiveCompare_1, string?._id ?? ffi.nullptr); } - static NSMutableArray arrayWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_298(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + int localizedCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_localizedCompare_1, string?._id ?? ffi.nullptr); } - static NSMutableArray arrayWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_299(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + int localizedCaseInsensitiveCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, + _lib._sel_localizedCaseInsensitiveCompare_1, + string?._id ?? ffi.nullptr); } - NSMutableArray initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_298( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + int localizedStandardCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_localizedStandardCompare_1, string?._id ?? ffi.nullptr); } - NSMutableArray initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_299( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + bool isEqualToString_(NSString? aString) { + return _lib._objc_msgSend_22( + _id, _lib._sel_isEqualToString_1, aString?._id ?? ffi.nullptr); } - void applyDifference_(NSOrderedCollectionDifference? difference) { - return _lib._objc_msgSend_300( - _id, _lib._sel_applyDifference_1, difference?._id ?? ffi.nullptr); + bool hasPrefix_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_hasPrefix_1, str?._id ?? ffi.nullptr); } - static NSMutableArray array(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + bool hasSuffix_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_hasSuffix_1, str?._id ?? ffi.nullptr); } - static NSMutableArray arrayWithObject_( - NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_91( - _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + NSString commonPrefixWithString_options_(NSString? str, int mask) { + final _ret = _lib._objc_msgSend_23( + _id, + _lib._sel_commonPrefixWithString_options_1, + str?._id ?? ffi.nullptr, + mask); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableArray arrayWithObjects_count_(NativeCupertinoHttp _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_95(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + bool containsString_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_containsString_1, str?._id ?? ffi.nullptr); } - static NSMutableArray arrayWithObjects_( - NativeCupertinoHttp _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_1, firstObj._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + bool localizedCaseInsensitiveContainsString_(NSString? str) { + return _lib._objc_msgSend_22( + _id, + _lib._sel_localizedCaseInsensitiveContainsString_1, + str?._id ?? ffi.nullptr); } - static NSMutableArray arrayWithArray_( - NativeCupertinoHttp _lib, NSArray? array) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableArray1, - _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + bool localizedStandardContainsString_(NSString? str) { + return _lib._objc_msgSend_22(_id, + _lib._sel_localizedStandardContainsString_1, str?._id ?? ffi.nullptr); } - /// Reads array stored in NSPropertyList format from the specified url. - static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_145( - _lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); + NSRange localizedStandardRangeOfString_(NSString? str) { + return _lib._objc_msgSend_24(_id, + _lib._sel_localizedStandardRangeOfString_1, str?._id ?? ffi.nullptr); } - static NSMutableArray new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); + NSRange rangeOfString_(NSString? searchString) { + return _lib._objc_msgSend_24( + _id, _lib._sel_rangeOfString_1, searchString?._id ?? ffi.nullptr); } - static NSMutableArray alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); + NSRange rangeOfString_options_(NSString? searchString, int mask) { + return _lib._objc_msgSend_25(_id, _lib._sel_rangeOfString_options_1, + searchString?._id ?? ffi.nullptr, mask); } -} -/// Mutable Data -class NSMutableData extends NSData { - NSMutableData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + NSRange rangeOfString_options_range_( + NSString? searchString, int mask, NSRange rangeOfReceiverToSearch) { + return _lib._objc_msgSend_26(_id, _lib._sel_rangeOfString_options_range_1, + searchString?._id ?? ffi.nullptr, mask, rangeOfReceiverToSearch); + } - /// Returns a [NSMutableData] that points to the same underlying object as [other]. - static NSMutableData castFrom(T other) { - return NSMutableData._(other._id, other._lib, retain: true, release: true); + NSRange rangeOfString_options_range_locale_(NSString? searchString, int mask, + NSRange rangeOfReceiverToSearch, NSLocale? locale) { + return _lib._objc_msgSend_27( + _id, + _lib._sel_rangeOfString_options_range_locale_1, + searchString?._id ?? ffi.nullptr, + mask, + rangeOfReceiverToSearch, + locale?._id ?? ffi.nullptr); } - /// Returns a [NSMutableData] that wraps the given raw object pointer. - static NSMutableData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableData._(other, lib, retain: retain, release: release); + NSRange rangeOfCharacterFromSet_(NSCharacterSet? searchSet) { + return _lib._objc_msgSend_228(_id, _lib._sel_rangeOfCharacterFromSet_1, + searchSet?._id ?? ffi.nullptr); } - /// Returns whether [obj] is an instance of [NSMutableData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); + NSRange rangeOfCharacterFromSet_options_( + NSCharacterSet? searchSet, int mask) { + return _lib._objc_msgSend_229( + _id, + _lib._sel_rangeOfCharacterFromSet_options_1, + searchSet?._id ?? ffi.nullptr, + mask); } - ffi.Pointer get mutableBytes { - return _lib._objc_msgSend_31(_id, _lib._sel_mutableBytes1); + NSRange rangeOfCharacterFromSet_options_range_( + NSCharacterSet? searchSet, int mask, NSRange rangeOfReceiverToSearch) { + return _lib._objc_msgSend_230( + _id, + _lib._sel_rangeOfCharacterFromSet_options_range_1, + searchSet?._id ?? ffi.nullptr, + mask, + rangeOfReceiverToSearch); } - @override - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); + NSRange rangeOfComposedCharacterSequenceAtIndex_(int index) { + return _lib._objc_msgSend_231( + _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); } - set length(int value) { - _lib._objc_msgSend_301(_id, _lib._sel_setLength_1, value); + NSRange rangeOfComposedCharacterSequencesForRange_(NSRange range) { + return _lib._objc_msgSend_232( + _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); } - void appendBytes_length_(ffi.Pointer bytes, int length) { - return _lib._objc_msgSend_33( - _id, _lib._sel_appendBytes_length_1, bytes, length); + NSString stringByAppendingString_(NSString? aString) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_stringByAppendingString_1, aString?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - void appendData_(NSData? other) { - return _lib._objc_msgSend_302( - _id, _lib._sel_appendData_1, other?._id ?? ffi.nullptr); + NSString stringByAppendingFormat_(NSString? format) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_stringByAppendingFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - void increaseLengthBy_(int extraLength) { - return _lib._objc_msgSend_282( - _id, _lib._sel_increaseLengthBy_1, extraLength); + double get doubleValue { + return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); } - void replaceBytesInRange_withBytes_( - NSRange range, ffi.Pointer bytes) { - return _lib._objc_msgSend_303( - _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); + double get floatValue { + return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); } - void resetBytesInRange_(NSRange range) { - return _lib._objc_msgSend_283(_id, _lib._sel_resetBytesInRange_1, range); + int get intValue { + return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); } - void setData_(NSData? data) { - return _lib._objc_msgSend_302( - _id, _lib._sel_setData_1, data?._id ?? ffi.nullptr); + int get integerValue { + return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); } - void replaceBytesInRange_withBytes_length_(NSRange range, - ffi.Pointer replacementBytes, int replacementLength) { - return _lib._objc_msgSend_304( - _id, - _lib._sel_replaceBytesInRange_withBytes_length_1, - range, - replacementBytes, - replacementLength); + int get longLongValue { + return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); } - static NSMutableData dataWithCapacity_( - NativeCupertinoHttp _lib, int aNumItems) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return NSMutableData._(_ret, _lib, retain: true, release: true); + bool get boolValue { + return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); } - static NSMutableData dataWithLength_(NativeCupertinoHttp _lib, int length) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); + NSString? get uppercaseString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_uppercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSMutableData initWithCapacity_(int capacity) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableData._(_ret, _lib, retain: true, release: true); + NSString? get lowercaseString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lowercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSMutableData initWithLength_(int length) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithLength_1, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); + NSString? get capitalizedString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_capitalizedString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - /// These methods compress or decompress the receiver's contents in-place using the specified algorithm. If the operation is not successful, these methods leave the receiver unchanged.. - bool decompressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_305( - _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); + NSString? get localizedUppercaseString { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedUppercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - bool compressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_305( - _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); + NSString? get localizedLowercaseString { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedLowercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableData data(NativeCupertinoHttp _lib) { + NSString? get localizedCapitalizedString { final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); - return NSMutableData._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_32(_id, _lib._sel_localizedCapitalizedString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, - _lib._sel_dataWithBytes_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); + NSString uppercaseStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_233( + _id, _lib._sel_uppercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: false, release: true); + NSString lowercaseStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_233( + _id, _lib._sel_lowercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - int length, - bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSMutableData._(_ret, _lib, retain: false, release: true); + NSString capitalizedStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_233(_id, + _lib._sel_capitalizedStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + void getLineStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range) { + return _lib._objc_msgSend_234( + _id, + _lib._sel_getLineStart_end_contentsEnd_forRange_1, + startPtr, + lineEndPtr, + contentsEndPtr, + range); } - static NSMutableData dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + NSRange lineRangeForRange_(NSRange range) { + return _lib._objc_msgSend_232(_id, _lib._sel_lineRangeForRange_1, range); } - static NSMutableData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + void getParagraphStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer parEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range) { + return _lib._objc_msgSend_234( + _id, + _lib._sel_getParagraphStart_end_contentsEnd_forRange_1, + startPtr, + parEndPtr, + contentsEndPtr, + range); } - static NSMutableData dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + NSRange paragraphRangeForRange_(NSRange range) { + return _lib._objc_msgSend_232( + _id, _lib._sel_paragraphRangeForRange_1, range); } - static NSMutableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSMutableData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + void enumerateSubstringsInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock15 block) { + return _lib._objc_msgSend_235( + _id, + _lib._sel_enumerateSubstringsInRange_options_usingBlock_1, + range, + opts, + block._id); } - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + void enumerateLinesUsingBlock_(ObjCBlock16 block) { + return _lib._objc_msgSend_236( + _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); } - static NSMutableData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); - return NSMutableData._(_ret, _lib, retain: false, release: true); + ffi.Pointer get UTF8String { + return _lib._objc_msgSend_53(_id, _lib._sel_UTF8String1); } - static NSMutableData alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); - return NSMutableData._(_ret, _lib, retain: false, release: true); + int get fastestEncoding { + return _lib._objc_msgSend_12(_id, _lib._sel_fastestEncoding1); } -} -/// Purgeable Data -class NSPurgeableData extends NSMutableData { - NSPurgeableData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + int get smallestEncoding { + return _lib._objc_msgSend_12(_id, _lib._sel_smallestEncoding1); + } - /// Returns a [NSPurgeableData] that points to the same underlying object as [other]. - static NSPurgeableData castFrom(T other) { - return NSPurgeableData._(other._id, other._lib, - retain: true, release: true); + NSData dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { + final _ret = _lib._objc_msgSend_237(_id, + _lib._sel_dataUsingEncoding_allowLossyConversion_1, encoding, lossy); + return NSData._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSPurgeableData] that wraps the given raw object pointer. - static NSPurgeableData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPurgeableData._(other, lib, retain: retain, release: release); + NSData dataUsingEncoding_(int encoding) { + final _ret = + _lib._objc_msgSend_238(_id, _lib._sel_dataUsingEncoding_1, encoding); + return NSData._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSPurgeableData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSPurgeableData1); + bool canBeConvertedToEncoding_(int encoding) { + return _lib._objc_msgSend_117( + _id, _lib._sel_canBeConvertedToEncoding_1, encoding); } - static NSPurgeableData dataWithCapacity_( - NativeCupertinoHttp _lib, int aNumItems) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSPurgeableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + ffi.Pointer cStringUsingEncoding_(int encoding) { + return _lib._objc_msgSend_239( + _id, _lib._sel_cStringUsingEncoding_1, encoding); + } + + bool getCString_maxLength_encoding_( + ffi.Pointer buffer, int maxBufferCount, int encoding) { + return _lib._objc_msgSend_240( + _id, + _lib._sel_getCString_maxLength_encoding_1, + buffer, + maxBufferCount, + encoding); } - static NSPurgeableData dataWithLength_(NativeCupertinoHttp _lib, int length) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSPurgeableData1, _lib._sel_dataWithLength_1, length); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, + NSRange range, + NSRangePointer leftover) { + return _lib._objc_msgSend_241( + _id, + _lib._sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, + range, + leftover); } - static NSPurgeableData data(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_data1); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + int maximumLengthOfBytesUsingEncoding_(int enc) { + return _lib._objc_msgSend_114( + _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); } - static NSPurgeableData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytes_length_1, bytes, length); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + int lengthOfBytesUsingEncoding_(int enc) { + return _lib._objc_msgSend_114( + _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); } - static NSPurgeableData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSString1, _lib._sel_availableStringEncodings1); } - static NSPurgeableData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - int length, - bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( - _lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); } - static NSPurgeableData dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( - _lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + NSString? get decomposedStringWithCanonicalMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_decomposedStringWithCanonicalMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + NSString? get precomposedStringWithCanonicalMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_precomposedStringWithCanonicalMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + NSString? get decomposedStringWithCompatibilityMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_decomposedStringWithCompatibilityMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSPurgeableData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + NSString? get precomposedStringWithCompatibilityMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_precomposedStringWithCompatibilityMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + NSArray componentsSeparatedByString_(NSString? separator) { + final _ret = _lib._objc_msgSend_159(_id, + _lib._sel_componentsSeparatedByString_1, separator?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_new1); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); + NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet? separator) { + final _ret = _lib._objc_msgSend_243( + _id, + _lib._sel_componentsSeparatedByCharactersInSet_1, + separator?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_alloc1); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); + NSString stringByTrimmingCharactersInSet_(NSCharacterSet? set) { + final _ret = _lib._objc_msgSend_244(_id, + _lib._sel_stringByTrimmingCharactersInSet_1, set?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } -} -/// Mutable Dictionary -class NSMutableDictionary extends NSDictionary { - NSMutableDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + NSString stringByPaddingToLength_withString_startingAtIndex_( + int newLength, NSString? padString, int padIndex) { + final _ret = _lib._objc_msgSend_245( + _id, + _lib._sel_stringByPaddingToLength_withString_startingAtIndex_1, + newLength, + padString?._id ?? ffi.nullptr, + padIndex); + return NSString._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. - static NSMutableDictionary castFrom(T other) { - return NSMutableDictionary._(other._id, other._lib, - retain: true, release: true); + NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { + final _ret = _lib._objc_msgSend_246( + _id, + _lib._sel_stringByFoldingWithOptions_locale_1, + options, + locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. - static NSMutableDictionary castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableDictionary._(other, lib, retain: retain, release: release); + NSString stringByReplacingOccurrencesOfString_withString_options_range_( + NSString? target, + NSString? replacement, + int options, + NSRange searchRange) { + final _ret = _lib._objc_msgSend_247( + _id, + _lib._sel_stringByReplacingOccurrencesOfString_withString_options_range_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr, + options, + searchRange); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSMutableDictionary]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableDictionary1); + NSString stringByReplacingOccurrencesOfString_withString_( + NSString? target, NSString? replacement) { + final _ret = _lib._objc_msgSend_248( + _id, + _lib._sel_stringByReplacingOccurrencesOfString_withString_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - void removeObjectForKey_(NSObject aKey) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObjectForKey_1, aKey._id); + NSString stringByReplacingCharactersInRange_withString_( + NSRange range, NSString? replacement) { + final _ret = _lib._objc_msgSend_249( + _id, + _lib._sel_stringByReplacingCharactersInRange_withString_1, + range, + replacement?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - void setObject_forKey_(NSObject anObject, NSObject aKey) { - return _lib._objc_msgSend_306( - _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); + NSString stringByApplyingTransform_reverse_( + NSStringTransform transform, bool reverse) { + final _ret = _lib._objc_msgSend_250( + _id, _lib._sel_stringByApplyingTransform_reverse_1, transform, reverse); + return NSString._(_ret, _lib, retain: true, release: true); } - @override - NSMutableDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + bool writeToURL_atomically_encoding_error_(NSURL? url, bool useAuxiliaryFile, + int enc, ffi.Pointer> error) { + return _lib._objc_msgSend_251( + _id, + _lib._sel_writeToURL_atomically_encoding_error_1, + url?._id ?? ffi.nullptr, + useAuxiliaryFile, + enc, + error); } - NSMutableDictionary initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + bool writeToFile_atomically_encoding_error_( + NSString? path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error) { + return _lib._objc_msgSend_252( + _id, + _lib._sel_writeToFile_atomically_encoding_error_1, + path?._id ?? ffi.nullptr, + useAuxiliaryFile, + enc, + error); } - @override - NSMutableDictionary initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - void addEntriesFromDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_307(_id, _lib._sel_addEntriesFromDictionary_1, - otherDictionary?._id ?? ffi.nullptr); + int get hash { + return _lib._objc_msgSend_12(_id, _lib._sel_hash1); } - void removeAllObjects() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + NSString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, int length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_253( + _id, + _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, + characters, + length, + freeBuffer); + return NSString._(_ret, _lib, retain: false, release: true); } - void removeObjectsForKeys_(NSArray? keyArray) { - return _lib._objc_msgSend_287( - _id, _lib._sel_removeObjectsForKeys_1, keyArray?._id ?? ffi.nullptr); + NSString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, int len, ObjCBlock17 deallocator) { + final _ret = _lib._objc_msgSend_254( + _id, + _lib._sel_initWithCharactersNoCopy_length_deallocator_1, + chars, + len, + deallocator._id); + return NSString._(_ret, _lib, retain: false, release: true); } - void setDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_307( - _id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr); + NSString initWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255( + _id, _lib._sel_initWithCharacters_length_1, characters, length); + return NSString._(_ret, _lib, retain: true, release: true); } - void setObject_forKeyedSubscript_(NSObject obj, NSObject key) { - return _lib._objc_msgSend_306( - _id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id); + NSString initWithUTF8String_(ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256( + _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithCapacity_( - NativeCupertinoHttp _lib, int numItems) { - final _ret = _lib._objc_msgSend_94(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString initWithString_(NSString? aString) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, aString?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_308(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString initWithFormat_(NSString? format) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_309(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString initWithFormat_arguments_(NSString? format, va_list argList) { + final _ret = _lib._objc_msgSend_257( + _id, + _lib._sel_initWithFormat_arguments_1, + format?._id ?? ffi.nullptr, + argList); + return NSString._(_ret, _lib, retain: true, release: true); } - NSMutableDictionary initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_308( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString initWithFormat_locale_(NSString? format, NSObject locale) { + final _ret = _lib._objc_msgSend_258(_id, _lib._sel_initWithFormat_locale_1, + format?._id ?? ffi.nullptr, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); } - NSMutableDictionary initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_309( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString initWithFormat_locale_arguments_( + NSString? format, NSObject locale, va_list argList) { + final _ret = _lib._objc_msgSend_259( + _id, + _lib._sel_initWithFormat_locale_arguments_1, + format?._id ?? ffi.nullptr, + locale._id, + argList); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Create a mutable dictionary which is optimized for dealing with a known set of keys. - /// Keys that are not in the key set can still be set into the dictionary, but that usage is not optimal. - /// As with any dictionary, the keys must be copyable. - /// If keyset is nil, an exception is thrown. - /// If keyset is not an object returned by +sharedKeySetForKeys:, an exception is thrown. - static NSMutableDictionary dictionaryWithSharedKeySet_( - NativeCupertinoHttp _lib, NSObject keyset) { - final _ret = _lib._objc_msgSend_310(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString initWithValidatedFormat_validFormatSpecifiers_error_( + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionary(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString initWithValidatedFormat_validFormatSpecifiers_locale_error_( + NSString? format, + NSString? validFormatSpecifiers, + NSObject locale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_261( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + locale._id, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithObject_forKey_( - NativeCupertinoHttp _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_173(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString initWithValidatedFormat_validFormatSpecifiers_arguments_error_( + NSString? format, + NSString? validFormatSpecifiers, + va_list argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_262( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + argList, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithObjects_forKeys_count_( - NativeCupertinoHttp _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_93(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString + initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( + NSString? format, + NSString? validFormatSpecifiers, + NSObject locale, + va_list argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_263( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + locale._id, + argList, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithObjectsAndKeys_( - NativeCupertinoHttp _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString initWithData_encoding_(NSData? data, int encoding) { + final _ret = _lib._objc_msgSend_264(_id, _lib._sel_initWithData_encoding_1, + data?._id ?? ffi.nullptr, encoding); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithDictionary_( - NativeCupertinoHttp _lib, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_174(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString initWithBytes_length_encoding_( + ffi.Pointer bytes, int len, int encoding) { + final _ret = _lib._objc_msgSend_265( + _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithObjects_forKeys_( - NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_175( - _lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSString initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { + final _ret = _lib._objc_msgSend_266( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, + bytes, + len, + encoding, + freeBuffer); + return NSString._(_ret, _lib, retain: false, release: true); } - /// Reads dictionary stored in NSPropertyList format from the specified url. - static NSDictionary dictionaryWithContentsOfURL_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_177( - _lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSString initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + int len, + int encoding, + ObjCBlock14 deallocator) { + final _ret = _lib._objc_msgSend_267( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, + bytes, + len, + encoding, + deallocator._id); + return NSString._(_ret, _lib, retain: false, release: true); } - /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. - /// The keys are copied from the array and must be copyable. - /// If the array parameter is nil or not an NSArray, an exception is thrown. - /// If the array of keys is empty, an empty key set is returned. - /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). - /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. - /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. - static NSObject sharedKeySetForKeys_( - NativeCupertinoHttp _lib, NSArray? keys) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableDictionary1, - _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSString string(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_string1); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + static NSString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_alloc1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + static NSString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSString._(_ret, _lib, retain: true, release: true); } -} -class NSNotification extends NSObject { - NSNotification._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static NSString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSString._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSNotification] that points to the same underlying object as [other]. - static NSNotification castFrom(T other) { - return NSNotification._(other._id, other._lib, retain: true, release: true); + static NSString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSNotification] that wraps the given raw object pointer. - static NSNotification castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNotification._(other, lib, retain: retain, release: release); + static NSString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSNotification]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSNotification1); + static NSString stringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSString1, + _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - NSNotificationName get name { - return _lib._objc_msgSend_32(_id, _lib._sel_name1); + static NSString + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSString1, + _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - NSObject get object { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSString initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, int encoding) { + final _ret = _lib._objc_msgSend_268(_id, + _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); + return NSString._(_ret, _lib, retain: true, release: true); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + static NSString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSString._(_ret, _lib, retain: true, release: true); } - NSNotification initWithName_object_userInfo_( - NSNotificationName name, NSObject object, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_311( + NSString initWithContentsOfURL_encoding_error_( + NSURL? url, int enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_269( _id, - _lib._sel_initWithName_object_userInfo_1, - name, - object._id, - userInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); - } - - NSNotification initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + _lib._sel_initWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSNotification notificationWithName_object_( - NativeCupertinoHttp _lib, NSNotificationName aName, NSObject anObject) { - final _ret = _lib._objc_msgSend_258(_lib._class_NSNotification1, - _lib._sel_notificationWithName_object_1, aName, anObject._id); - return NSNotification._(_ret, _lib, retain: true, release: true); + NSString initWithContentsOfFile_encoding_error_( + NSString? path, int enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_270( + _id, + _lib._sel_initWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSNotification notificationWithName_object_userInfo_( + static NSString stringWithContentsOfURL_encoding_error_( NativeCupertinoHttp _lib, - NSNotificationName aName, - NSObject anObject, - NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_311( - _lib._class_NSNotification1, - _lib._sel_notificationWithName_object_userInfo_1, - aName, - anObject._id, - aUserInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_269( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - @override - NSNotification init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNotification._(_ret, _lib, retain: true, release: true); + static NSString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_270( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSNotification new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); - return NSNotification._(_ret, _lib, retain: false, release: true); + NSString initWithContentsOfURL_usedEncoding_error_( + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_271( + _id, + _lib._sel_initWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSNotification alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); - return NSNotification._(_ret, _lib, retain: false, release: true); + NSString initWithContentsOfFile_usedEncoding_error_( + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_272( + _id, + _lib._sel_initWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); } -} - -typedef NSNotificationName = ffi.Pointer; - -class NSNotificationCenter extends NSObject { - NSNotificationCenter._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSNotificationCenter] that points to the same underlying object as [other]. - static NSNotificationCenter castFrom(T other) { - return NSNotificationCenter._(other._id, other._lib, - retain: true, release: true); + static NSString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_271( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSNotificationCenter] that wraps the given raw object pointer. - static NSNotificationCenter castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNotificationCenter._(other, lib, retain: retain, release: release); + static NSString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_272( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSNotificationCenter]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSNotificationCenter1); + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_273( + _lib._class_NSString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); } - static NSNotificationCenter? getDefaultCenter(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_312( - _lib._class_NSNotificationCenter1, _lib._sel_defaultCenter1); - return _ret.address == 0 - ? null - : NSNotificationCenter._(_ret, _lib, retain: true, release: true); + NSObject propertyList() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); + return NSObject._(_ret, _lib, retain: true, release: true); } - void addObserver_selector_name_object_( - NSObject observer, - ffi.Pointer aSelector, - NSNotificationName aName, - NSObject anObject) { - return _lib._objc_msgSend_313( - _id, - _lib._sel_addObserver_selector_name_object_1, - observer._id, - aSelector, - aName, - anObject._id); + NSDictionary propertyListFromStringsFileFormat() { + final _ret = _lib._objc_msgSend_180( + _id, _lib._sel_propertyListFromStringsFileFormat1); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - void postNotification_(NSNotification? notification) { - return _lib._objc_msgSend_314( - _id, _lib._sel_postNotification_1, notification?._id ?? ffi.nullptr); + ffi.Pointer cString() { + return _lib._objc_msgSend_53(_id, _lib._sel_cString1); } - void postNotificationName_object_( - NSNotificationName aName, NSObject anObject) { - return _lib._objc_msgSend_315( - _id, _lib._sel_postNotificationName_object_1, aName, anObject._id); + ffi.Pointer lossyCString() { + return _lib._objc_msgSend_53(_id, _lib._sel_lossyCString1); } - void postNotificationName_object_userInfo_( - NSNotificationName aName, NSObject anObject, NSDictionary? aUserInfo) { - return _lib._objc_msgSend_316( - _id, - _lib._sel_postNotificationName_object_userInfo_1, - aName, - anObject._id, - aUserInfo?._id ?? ffi.nullptr); + int cStringLength() { + return _lib._objc_msgSend_12(_id, _lib._sel_cStringLength1); } - void removeObserver_(NSObject observer) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObserver_1, observer._id); + void getCString_(ffi.Pointer bytes) { + return _lib._objc_msgSend_274(_id, _lib._sel_getCString_1, bytes); } - void removeObserver_name_object_( - NSObject observer, NSNotificationName aName, NSObject anObject) { - return _lib._objc_msgSend_317(_id, _lib._sel_removeObserver_name_object_1, - observer._id, aName, anObject._id); + void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { + return _lib._objc_msgSend_275( + _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); } - NSObject addObserverForName_object_queue_usingBlock_(NSNotificationName name, - NSObject obj, NSOperationQueue? queue, ObjCBlock18 block) { - final _ret = _lib._objc_msgSend_346( + void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, + int maxLength, NSRange aRange, NSRangePointer leftoverRange) { + return _lib._objc_msgSend_276( _id, - _lib._sel_addObserverForName_object_queue_usingBlock_1, - name, - obj._id, - queue?._id ?? ffi.nullptr, - block._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSNotificationCenter new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotificationCenter1, _lib._sel_new1); - return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + _lib._sel_getCString_maxLength_range_remainingRange_1, + bytes, + maxLength, + aRange, + leftoverRange); } - static NSNotificationCenter alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNotificationCenter1, _lib._sel_alloc1); - return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); } -} - -class NSOperationQueue extends NSObject { - NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. - static NSOperationQueue castFrom(T other) { - return NSOperationQueue._(other._id, other._lib, - retain: true, release: true); + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); } - /// Returns a [NSOperationQueue] that wraps the given raw object pointer. - static NSOperationQueue castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperationQueue._(other, lib, retain: retain, release: release); + NSObject initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSOperationQueue]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOperationQueue1); + NSObject initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// @property progress - /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue - /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the - /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the - /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super - /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress - /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% - /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 - /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be - /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by - /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving - /// progress scenario. - /// - /// @example - /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; - /// queue.progress.totalUnitCount = 10; - NSProgress? get progress { - final _ret = _lib._objc_msgSend_318(_id, _lib._sel_progress1); - return _ret.address == 0 - ? null - : NSProgress._(_ret, _lib, retain: true, release: true); + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - void addOperation_(NSOperation? op) { - return _lib._objc_msgSend_334( - _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { - return _lib._objc_msgSend_340( + NSObject initWithCStringNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_277( _id, - _lib._sel_addOperations_waitUntilFinished_1, - ops?._id ?? ffi.nullptr, - wait); + _lib._sel_initWithCStringNoCopy_length_freeWhenDone_1, + bytes, + length, + freeBuffer); + return NSObject._(_ret, _lib, retain: false, release: true); } - void addOperationWithBlock_(ObjCBlock16 block) { - return _lib._objc_msgSend_341( - _id, _lib._sel_addOperationWithBlock_1, block._id); + NSObject initWithCString_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_268( + _id, _lib._sel_initWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// @method addBarrierBlock: - /// @param barrier A block to execute - /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and - /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the - /// `dispatch_barrier_async` function. - void addBarrierBlock_(ObjCBlock16 barrier) { - return _lib._objc_msgSend_341( - _id, _lib._sel_addBarrierBlock_1, barrier._id); + NSObject initWithCString_(ffi.Pointer bytes) { + final _ret = + _lib._objc_msgSend_256(_id, _lib._sel_initWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); } - int get maxConcurrentOperationCount { - return _lib._objc_msgSend_81(_id, _lib._sel_maxConcurrentOperationCount1); + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); } - set maxConcurrentOperationCount(int value) { - _lib._objc_msgSend_342( - _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); } - bool get suspended { - return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); + void getCharacters_(ffi.Pointer buffer) { + return _lib._objc_msgSend_278(_id, _lib._sel_getCharacters_1, buffer); } - set suspended(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setSuspended_1, value); + /// Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode a URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. + NSString stringByAddingPercentEncodingWithAllowedCharacters_( + NSCharacterSet? allowedCharacters) { + final _ret = _lib._objc_msgSend_244( + _id, + _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, + allowedCharacters?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + /// Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. + NSString? get stringByRemovingPercentEncoding { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_stringByRemovingPercentEncoding1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } - set name(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + NSString stringByAddingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_15( + _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); + return NSString._(_ret, _lib, retain: true, release: true); } - int get qualityOfService { - return _lib._objc_msgSend_338(_id, _lib._sel_qualityOfService1); + NSString stringByReplacingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_15( + _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); + return NSString._(_ret, _lib, retain: true, release: true); } - set qualityOfService(int value) { - _lib._objc_msgSend_339(_id, _lib._sel_setQualityOfService_1, value); + static NSString new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); + return NSString._(_ret, _lib, retain: false, release: true); } - /// actually retain - dispatch_queue_t get underlyingQueue { - return _lib._objc_msgSend_343(_id, _lib._sel_underlyingQueue1); + static NSString alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); + return NSString._(_ret, _lib, retain: false, release: true); } +} - /// actually retain - set underlyingQueue(dispatch_queue_t value) { - _lib._objc_msgSend_344(_id, _lib._sel_setUnderlyingQueue_1, value); - } +extension StringToNSString on String { + NSString toNSString(NativeCupertinoHttp lib) => NSString(lib, this); +} - void cancelAllOperations() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); - } +typedef unichar = ffi.UnsignedShort; - void waitUntilAllOperationsAreFinished() { - return _lib._objc_msgSend_1( - _id, _lib._sel_waitUntilAllOperationsAreFinished1); - } +class NSCoder extends _ObjCWrapper { + NSCoder._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_345( - _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); + /// Returns a [NSCoder] that points to the same underlying object as [other]. + static NSCoder castFrom(T other) { + return NSCoder._(other._id, other._lib, retain: true, release: true); } - static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_345( - _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); + /// Returns a [NSCoder] that wraps the given raw object pointer. + static NSCoder castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCoder._(other, lib, retain: retain, release: release); } - /// These two functions are inherently a race condition and should be avoided if possible - NSArray? get operations { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_operations1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSCoder]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); } +} - int get operationCount { - return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); - } +typedef NSRange = _NSRange; - static NSOperationQueue new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); - } +class _NSRange extends ffi.Struct { + @NSUInteger() + external int location; - static NSOperationQueue alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); - } + @NSUInteger() + external int length; } -class NSProgress extends NSObject { - NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; +} + +abstract class NSStringCompareOptions { + static const int NSCaseInsensitiveSearch = 1; + static const int NSLiteralSearch = 2; + static const int NSBackwardsSearch = 4; + static const int NSAnchoredSearch = 8; + static const int NSNumericSearch = 64; + static const int NSDiacriticInsensitiveSearch = 128; + static const int NSWidthInsensitiveSearch = 256; + static const int NSForcedOrderingSearch = 512; + static const int NSRegularExpressionSearch = 1024; +} + +class NSLocale extends _ObjCWrapper { + NSLocale._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSProgress] that points to the same underlying object as [other]. - static NSProgress castFrom(T other) { - return NSProgress._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSLocale] that points to the same underlying object as [other]. + static NSLocale castFrom(T other) { + return NSLocale._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSProgress] that wraps the given raw object pointer. - static NSProgress castFromPointer( + /// Returns a [NSLocale] that wraps the given raw object pointer. + static NSLocale castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSProgress._(other, lib, retain: retain, release: release); + return NSLocale._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSProgress]. + /// Returns whether [obj] is an instance of [NSLocale]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); - } - - static NSProgress currentProgress(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_318( - _lib._class_NSProgress1, _lib._sel_currentProgress1); - return NSProgress._(_ret, _lib, retain: true, release: true); - } - - static NSProgress progressWithTotalUnitCount_( - NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_319(_lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); - } - - static NSProgress discreteProgressWithTotalUnitCount_( - NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_319(_lib._class_NSProgress1, - _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); - } - - static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( - NativeCupertinoHttp _lib, - int unitCount, - NSProgress? parent, - int portionOfParentTotalUnitCount) { - final _ret = _lib._objc_msgSend_320( - _lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, - unitCount, - parent?._id ?? ffi.nullptr, - portionOfParentTotalUnitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); - } - - NSProgress initWithParent_userInfo_( - NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { - final _ret = _lib._objc_msgSend_321( - _id, - _lib._sel_initWithParent_userInfo_1, - parentProgressOrNil?._id ?? ffi.nullptr, - userInfoOrNil?._id ?? ffi.nullptr); - return NSProgress._(_ret, _lib, retain: true, release: true); - } - - void becomeCurrentWithPendingUnitCount_(int unitCount) { - return _lib._objc_msgSend_322( - _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLocale1); } +} - void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock16 work) { - return _lib._objc_msgSend_323( - _id, - _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, - unitCount, - work._id); - } +class NSCharacterSet extends NSObject { + NSCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - void resignCurrent() { - return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. + static NSCharacterSet castFrom(T other) { + return NSCharacterSet._(other._id, other._lib, retain: true, release: true); } - void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { - return _lib._objc_msgSend_324( - _id, - _lib._sel_addChild_withPendingUnitCount_1, - child?._id ?? ffi.nullptr, - inUnitCount); + /// Returns a [NSCharacterSet] that wraps the given raw object pointer. + static NSCharacterSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCharacterSet._(other, lib, retain: retain, release: release); } - int get totalUnitCount { - return _lib._objc_msgSend_325(_id, _lib._sel_totalUnitCount1); + /// Returns whether [obj] is an instance of [NSCharacterSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSCharacterSet1); } - set totalUnitCount(int value) { - _lib._objc_msgSend_326(_id, _lib._sel_setTotalUnitCount_1, value); + static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - int get completedUnitCount { - return _lib._objc_msgSend_325(_id, _lib._sel_completedUnitCount1); + static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - set completedUnitCount(int value) { - _lib._objc_msgSend_326(_id, _lib._sel_setCompletedUnitCount_1, value); + static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSCharacterSet1, + _lib._sel_whitespaceAndNewlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSString? get localizedDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); + static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - set localizedDescription(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); + static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSString? get localizedAdditionalDescription { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedAdditionalDescription1); + static NSCharacterSet? getLowercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - set localizedAdditionalDescription(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setLocalizedAdditionalDescription_1, - value?._id ?? ffi.nullptr); + static NSCharacterSet? getUppercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - bool get cancellable { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); + static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - set cancellable(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setCancellable_1, value); + static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - bool get pausable { - return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); + static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - set pausable(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setPausable_1, value); + static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - bool get paused { - return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); + static NSCharacterSet? getCapitalizedLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - ObjCBlock16 get cancellationHandler { - final _ret = _lib._objc_msgSend_329(_id, _lib._sel_cancellationHandler1); - return ObjCBlock16._(_ret, _lib); + static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - set cancellationHandler(ObjCBlock16 value) { - _lib._objc_msgSend_330(_id, _lib._sel_setCancellationHandler_1, value._id); + static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: false, release: true); } - ObjCBlock16 get pausingHandler { - final _ret = _lib._objc_msgSend_329(_id, _lib._sel_pausingHandler1); - return ObjCBlock16._(_ret, _lib); + static NSCharacterSet characterSetWithRange_( + NativeCupertinoHttp _lib, NSRange aRange) { + final _ret = _lib._objc_msgSend_29( + _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - set pausingHandler(ObjCBlock16 value) { - _lib._objc_msgSend_330(_id, _lib._sel_setPausingHandler_1, value._id); + static NSCharacterSet characterSetWithCharactersInString_( + NativeCupertinoHttp _lib, NSString? aString) { + final _ret = _lib._objc_msgSend_30( + _lib._class_NSCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, + aString?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - ObjCBlock16 get resumingHandler { - final _ret = _lib._objc_msgSend_329(_id, _lib._sel_resumingHandler1); - return ObjCBlock16._(_ret, _lib); + static NSCharacterSet characterSetWithBitmapRepresentation_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_223( + _lib._class_NSCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, + data?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - set resumingHandler(ObjCBlock16 value) { - _lib._objc_msgSend_330(_id, _lib._sel_setResumingHandler_1, value._id); + static NSCharacterSet characterSetWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? fName) { + final _ret = _lib._objc_msgSend_30(_lib._class_NSCharacterSet1, + _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - void setUserInfoObject_forKey_( - NSObject objectOrNil, NSProgressUserInfoKey key) { - return _lib._objc_msgSend_189( - _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); + NSCharacterSet initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - bool get indeterminate { - return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); + bool characterIsMember_(int aCharacter) { + return _lib._objc_msgSend_224( + _id, _lib._sel_characterIsMember_1, aCharacter); } - double get fractionCompleted { - return _lib._objc_msgSend_85(_id, _lib._sel_fractionCompleted1); + NSData? get bitmapRepresentation { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_bitmapRepresentation1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + NSCharacterSet? get invertedSet { + final _ret = _lib._objc_msgSend_28(_id, _lib._sel_invertedSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + bool longCharacterIsMember_(int theLongChar) { + return _lib._objc_msgSend_225( + _id, _lib._sel_longCharacterIsMember_1, theLongChar); } - void pause() { - return _lib._objc_msgSend_1(_id, _lib._sel_pause1); + bool isSupersetOfSet_(NSCharacterSet? theOtherSet) { + return _lib._objc_msgSend_226( + _id, _lib._sel_isSupersetOfSet_1, theOtherSet?._id ?? ffi.nullptr); } - void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + bool hasMemberInPlane_(int thePlane) { + return _lib._objc_msgSend_227(_id, _lib._sel_hasMemberInPlane_1, thePlane); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + /// Returns a character set containing the characters allowed in a URL's user subcomponent. + static NSCharacterSet? getURLUserAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSProgressKind get kind { - return _lib._objc_msgSend_32(_id, _lib._sel_kind1); - } - - set kind(NSProgressKind value) { - _lib._objc_msgSend_327(_id, _lib._sel_setKind_1, value); + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSNumber? get estimatedTimeRemaining { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_estimatedTimeRemaining1); + /// Returns a character set containing the characters allowed in a URL's password subcomponent. + static NSCharacterSet? getURLPasswordAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - set estimatedTimeRemaining(NSNumber? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSNumber? get throughput { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_throughput1); + /// Returns a character set containing the characters allowed in a URL's host subcomponent. + static NSCharacterSet? getURLHostAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - set throughput(NSNumber? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); - } - - NSProgressFileOperationKind get fileOperationKind { - return _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); - } - - set fileOperationKind(NSProgressFileOperationKind value) { - _lib._objc_msgSend_327(_id, _lib._sel_setFileOperationKind_1, value); + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSURL? get fileURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileURL1); + /// Returns a character set containing the characters allowed in a URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + static NSCharacterSet? getURLPathAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - set fileURL(NSURL? value) { - _lib._objc_msgSend_332( - _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSNumber? get fileTotalCount { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileTotalCount1); + /// Returns a character set containing the characters allowed in a URL's query component. + static NSCharacterSet? getURLQueryAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - set fileTotalCount(NSNumber? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSNumber? get fileCompletedCount { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileCompletedCount1); + /// Returns a character set containing the characters allowed in a URL's fragment component. + static NSCharacterSet? getURLFragmentAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - set fileCompletedCount(NSNumber? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); + static NSCharacterSet new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); } - void publish() { - return _lib._objc_msgSend_1(_id, _lib._sel_publish1); + static NSCharacterSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); } +} - void unpublish() { - return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); - } +class NSData extends NSObject { + NSData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - static NSObject addSubscriberForFileURL_withPublishingHandler_( - NativeCupertinoHttp _lib, - NSURL? url, - NSProgressPublishingHandler publishingHandler) { - final _ret = _lib._objc_msgSend_333( - _lib._class_NSProgress1, - _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, - url?._id ?? ffi.nullptr, - publishingHandler); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns a [NSData] that points to the same underlying object as [other]. + static NSData castFrom(T other) { + return NSData._(other._id, other._lib, retain: true, release: true); } - static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { - return _lib._objc_msgSend_200( - _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + /// Returns a [NSData] that wraps the given raw object pointer. + static NSData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSData._(other, lib, retain: retain, release: release); } - bool get old { - return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); + /// Returns whether [obj] is an instance of [NSData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); } - static NSProgress new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); - return NSProgress._(_ret, _lib, retain: false, release: true); + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); } - static NSProgress alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); - return NSProgress._(_ret, _lib, retain: false, release: true); + /// The -bytes method returns a pointer to a contiguous region of memory managed by the receiver. + /// If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer + /// Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data. + ffi.Pointer get bytes { + return _lib._objc_msgSend_31(_id, _lib._sel_bytes1); } -} - -void _ObjCBlock16_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block) { - return block.ref.target - .cast>() - .asFunction()(); -} - -final _ObjCBlock16_closureRegistry = {}; -int _ObjCBlock16_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock16_registerClosure(Function fn) { - final id = ++_ObjCBlock16_closureRegistryIndex; - _ObjCBlock16_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock16_closureTrampoline(ffi.Pointer<_ObjCBlock> block) { - return _ObjCBlock16_closureRegistry[block.ref.target.address]!(); -} - -class ObjCBlock16 extends _ObjCBlockBase { - ObjCBlock16._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock16.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( - _ObjCBlock16_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - /// Creates a block from a Dart function. - ObjCBlock16.fromFunction(NativeCupertinoHttp lib, void Function() fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( - _ObjCBlock16_closureTrampoline) - .cast(), - _ObjCBlock16_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call() { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() - .asFunction block)>()(_id); + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} - -typedef NSProgressUserInfoKey = ffi.Pointer; -typedef NSProgressKind = ffi.Pointer; -typedef NSProgressFileOperationKind = ffi.Pointer; -typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; -NSProgressUnpublishingHandler _ObjCBlock17_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>()(arg0); -} - -final _ObjCBlock17_closureRegistry = {}; -int _ObjCBlock17_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock17_registerClosure(Function fn) { - final id = ++_ObjCBlock17_closureRegistryIndex; - _ObjCBlock17_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -NSProgressUnpublishingHandler _ObjCBlock17_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock17_closureRegistry[block.ref.target.address]!(arg0); -} - -class ObjCBlock17 extends _ObjCBlockBase { - ObjCBlock17._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock17.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock17_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + void getBytes_length_(ffi.Pointer buffer, int length) { + return _lib._objc_msgSend_33( + _id, _lib._sel_getBytes_length_1, buffer, length); + } - /// Creates a block from a Dart function. - ObjCBlock17.fromFunction(NativeCupertinoHttp lib, - NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock17_closureTrampoline) - .cast(), - _ObjCBlock17_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - NSProgressUnpublishingHandler call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); + void getBytes_range_(ffi.Pointer buffer, NSRange range) { + return _lib._objc_msgSend_34( + _id, _lib._sel_getBytes_range_1, buffer, range); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + bool isEqualToData_(NSData? other) { + return _lib._objc_msgSend_35( + _id, _lib._sel_isEqualToData_1, other?._id ?? ffi.nullptr); + } -typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; + NSData subdataWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_36(_id, _lib._sel_subdataWithRange_1, range); + return NSData._(_ret, _lib, retain: true, release: true); + } -class NSOperation extends NSObject { - NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } - /// Returns a [NSOperation] that points to the same underlying object as [other]. - static NSOperation castFrom(T other) { - return NSOperation._(other._id, other._lib, retain: true, release: true); + /// the atomically flag is ignored if the url is not of a type the supports atomic writes + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); } - /// Returns a [NSOperation] that wraps the given raw object pointer. - static NSOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperation._(other, lib, retain: retain, release: release); + bool writeToFile_options_error_(NSString? path, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _lib._objc_msgSend_208(_id, _lib._sel_writeToFile_options_error_1, + path?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); } - /// Returns whether [obj] is an instance of [NSOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); + bool writeToURL_options_error_(NSURL? url, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _lib._objc_msgSend_209(_id, _lib._sel_writeToURL_options_error_1, + url?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); } - void start() { - return _lib._objc_msgSend_1(_id, _lib._sel_start1); + NSRange rangeOfData_options_range_( + NSData? dataToFind, int mask, NSRange searchRange) { + return _lib._objc_msgSend_210(_id, _lib._sel_rangeOfData_options_range_1, + dataToFind?._id ?? ffi.nullptr, mask, searchRange); } - void main() { - return _lib._objc_msgSend_1(_id, _lib._sel_main1); + /// 'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES. + void enumerateByteRangesUsingBlock_(ObjCBlock13 block) { + return _lib._objc_msgSend_211( + _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._id); } - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + static NSData data(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); + return NSData._(_ret, _lib, retain: true, release: true); } - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + static NSData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212( + _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); + return NSData._(_ret, _lib, retain: true, release: true); } - bool get executing { - return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); + static NSData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSData._(_ret, _lib, retain: false, release: true); } - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + static NSData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_213(_lib._class_NSData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSData._(_ret, _lib, retain: false, release: true); } - /// To be deprecated; use and override 'asynchronous' below - bool get concurrent { - return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); + static NSData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _lib._class_NSData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); } - bool get asynchronous { - return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); + static NSData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); } - bool get ready { - return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); + static NSData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); } - void addDependency_(NSOperation? op) { - return _lib._objc_msgSend_334( - _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); + static NSData dataWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); } - void removeDependency_(NSOperation? op) { - return _lib._objc_msgSend_334( - _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); + NSData initWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212( + _id, _lib._sel_initWithBytes_length_1, bytes, length); + return NSData._(_ret, _lib, retain: true, release: true); } - NSArray? get dependencies { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_dependencies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212( + _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); + return NSData._(_ret, _lib, retain: false, release: true); } - int get queuePriority { - return _lib._objc_msgSend_335(_id, _lib._sel_queuePriority1); + NSData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _lib._objc_msgSend_213(_id, + _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSData._(_ret, _lib, retain: false, release: true); } - set queuePriority(int value) { - _lib._objc_msgSend_336(_id, _lib._sel_setQueuePriority_1, value); + NSData initWithBytesNoCopy_length_deallocator_( + ffi.Pointer bytes, int length, ObjCBlock14 deallocator) { + final _ret = _lib._objc_msgSend_216( + _id, + _lib._sel_initWithBytesNoCopy_length_deallocator_1, + bytes, + length, + deallocator._id); + return NSData._(_ret, _lib, retain: false, release: true); } - ObjCBlock16 get completionBlock { - final _ret = _lib._objc_msgSend_329(_id, _lib._sel_completionBlock1); - return ObjCBlock16._(_ret, _lib); + NSData initWithContentsOfFile_options_error_(NSString? path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _id, + _lib._sel_initWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); } - set completionBlock(ObjCBlock16 value) { - _lib._objc_msgSend_330(_id, _lib._sel_setCompletionBlock_1, value._id); + NSData initWithContentsOfURL_options_error_(NSURL? url, int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _id, + _lib._sel_initWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); } - void waitUntilFinished() { - return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); + NSData initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); } - double get threadPriority { - return _lib._objc_msgSend_85(_id, _lib._sel_threadPriority1); + NSData initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); } - set threadPriority(double value) { - _lib._objc_msgSend_337(_id, _lib._sel_setThreadPriority_1, value); + NSData initWithData_(NSData? data) { + final _ret = _lib._objc_msgSend_217( + _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); } - int get qualityOfService { - return _lib._objc_msgSend_338(_id, _lib._sel_qualityOfService1); + static NSData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); } - set qualityOfService(int value) { - _lib._objc_msgSend_339(_id, _lib._sel_setQualityOfService_1, value); + /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. + NSData initWithBase64EncodedString_options_( + NSString? base64String, int options) { + final _ret = _lib._objc_msgSend_218( + _id, + _lib._sel_initWithBase64EncodedString_options_1, + base64String?._id ?? ffi.nullptr, + options); + return NSData._(_ret, _lib, retain: true, release: true); } - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Create a Base-64 encoded NSString from the receiver's contents using the given options. + NSString base64EncodedStringWithOptions_(int options) { + final _ret = _lib._objc_msgSend_219( + _id, _lib._sel_base64EncodedStringWithOptions_1, options); + return NSString._(_ret, _lib, retain: true, release: true); } - set name(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. + NSData initWithBase64EncodedData_options_(NSData? base64Data, int options) { + final _ret = _lib._objc_msgSend_220( + _id, + _lib._sel_initWithBase64EncodedData_options_1, + base64Data?._id ?? ffi.nullptr, + options); + return NSData._(_ret, _lib, retain: true, release: true); } - static NSOperation new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); - return NSOperation._(_ret, _lib, retain: false, release: true); + /// Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options. + NSData base64EncodedDataWithOptions_(int options) { + final _ret = _lib._objc_msgSend_221( + _id, _lib._sel_base64EncodedDataWithOptions_1, options); + return NSData._(_ret, _lib, retain: true, release: true); } - static NSOperation alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); - return NSOperation._(_ret, _lib, retain: false, release: true); + /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. + NSData decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_222(_id, + _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); + return NSData._(_ret, _lib, retain: true, release: true); } -} -abstract class NSOperationQueuePriority { - static const int NSOperationQueuePriorityVeryLow = -8; - static const int NSOperationQueuePriorityLow = -4; - static const int NSOperationQueuePriorityNormal = 0; - static const int NSOperationQueuePriorityHigh = 4; - static const int NSOperationQueuePriorityVeryHigh = 8; -} + NSData compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_222( + _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); + return NSData._(_ret, _lib, retain: true, release: true); + } -typedef dispatch_queue_t = ffi.Pointer; -void _ObjCBlock18_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} + void getBytes_(ffi.Pointer buffer) { + return _lib._objc_msgSend_59(_id, _lib._sel_getBytes_1, buffer); + } -final _ObjCBlock18_closureRegistry = {}; -int _ObjCBlock18_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock18_registerClosure(Function fn) { - final id = ++_ObjCBlock18_closureRegistryIndex; - _ObjCBlock18_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock18_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock18_closureRegistry[block.ref.target.address]!(arg0); -} + NSObject initWithContentsOfMappedFile_(NSString? path) { + final _ret = _lib._objc_msgSend_42(_id, + _lib._sel_initWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock18 extends _ObjCBlockBase { - ObjCBlock18._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0. + NSObject initWithBase64Encoding_(NSString? base64String) { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_initWithBase64Encoding_1, + base64String?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock18.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock18_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + NSString base64Encoding() { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_base64Encoding1); + return NSString._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock18.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock18_closureTrampoline) - .cast(), - _ObjCBlock18_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); + static NSData new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); + return NSData._(_ret, _lib, retain: false, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; + static NSData alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); + return NSData._(_ret, _lib, retain: false, release: true); + } } -class NSDate extends NSObject { - NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSURL extends NSObject { + NSURL._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSDate] that points to the same underlying object as [other]. - static NSDate castFrom(T other) { - return NSDate._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSURL] that points to the same underlying object as [other]. + static NSURL castFrom(T other) { + return NSURL._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSDate] that wraps the given raw object pointer. - static NSDate castFromPointer( + /// Returns a [NSURL] that wraps the given raw object pointer. + static NSURL castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSDate._(other, lib, retain: retain, release: release); + return NSURL._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURL]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); + } + + /// this call percent-encodes both the host and path, so this cannot be used to set a username/password or port in the hostname part or with a IPv6 '[...]' type address. NSURLComponents handles IPv6 addresses correctly. + NSURL initWithScheme_host_path_( + NSString? scheme, NSString? host, NSString? path) { + final _ret = _lib._objc_msgSend_38( + _id, + _lib._sel_initWithScheme_host_path_1, + scheme?._id ?? ffi.nullptr, + host?._id ?? ffi.nullptr, + path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL. + NSURL initFileURLWithPath_isDirectory_relativeToURL_( + NSString? path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_39( + _id, + _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, + path?._id ?? ffi.nullptr, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. + NSURL initFileURLWithPath_relativeToURL_(NSString? path, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _id, + _lib._sel_initFileURLWithPath_relativeToURL_1, + path?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + NSURL initFileURLWithPath_isDirectory_(NSString? path, bool isDir) { + final _ret = _lib._objc_msgSend_41( + _id, + _lib._sel_initFileURLWithPath_isDirectory_1, + path?._id ?? ffi.nullptr, + isDir); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Better to use initFileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. + NSURL initFileURLWithPath_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initFileURLWithPath_1, path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created file NSURL referencing the local file or directory at path, relative to a base URL. + static NSURL fileURLWithPath_isDirectory_relativeToURL_( + NativeCupertinoHttp _lib, NSString? path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_43( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, + path?._id ?? ffi.nullptr, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Better to use fileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. + static NSURL fileURLWithPath_relativeToURL_( + NativeCupertinoHttp _lib, NSString? path, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_44( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_relativeToURL_1, + path?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + static NSURL fileURLWithPath_isDirectory_( + NativeCupertinoHttp _lib, NSString? path, bool isDir) { + final _ret = _lib._objc_msgSend_45( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_1, + path?._id ?? ffi.nullptr, + isDir); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Better to use fileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. + static NSURL fileURLWithPath_(NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_46(_lib._class_NSURL1, + _lib._sel_fileURLWithPath_1, path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. + NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + ffi.Pointer path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_47( + _id, + _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, + path, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. + static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + NativeCupertinoHttp _lib, + ffi.Pointer path, + bool isDir, + NSURL? baseURL) { + final _ret = _lib._objc_msgSend_48( + _lib._class_NSURL1, + _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, + path, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSDate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); + /// These methods expect their string arguments to contain any percent escape codes that are necessary. It is an error for URLString to be nil. + NSURL initWithString_(NSString? URLString) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - double get timeIntervalSinceReferenceDate { - return _lib._objc_msgSend_85( - _id, _lib._sel_timeIntervalSinceReferenceDate1); + NSURL initWithString_relativeToURL_(NSString? URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _id, + _lib._sel_initWithString_relativeToURL_1, + URLString?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - @override - NSDate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDate._(_ret, _lib, retain: true, release: true); + static NSURL URLWithString_(NativeCupertinoHttp _lib, NSString? URLString) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSURL1, + _lib._sel_URLWithString_1, URLString?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _lib._objc_msgSend_347( - _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); + static NSURL URLWithString_relativeToURL_( + NativeCupertinoHttp _lib, NSString? URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _lib._class_NSURL1, + _lib._sel_URLWithString_relativeToURL_1, + URLString?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - NSDate initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); + /// Initializes a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + NSURL initWithDataRepresentation_relativeToURL_( + NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_49( + _id, + _lib._sel_initWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - double timeIntervalSinceDate_(NSDate? anotherDate) { - return _lib._objc_msgSend_348(_id, _lib._sel_timeIntervalSinceDate_1, - anotherDate?._id ?? ffi.nullptr); + /// Initializes and returns a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + static NSURL URLWithDataRepresentation_relativeToURL_( + NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_50( + _lib._class_NSURL1, + _lib._sel_URLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - double get timeIntervalSinceNow { - return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSinceNow1); + /// Initializes a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( + NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_49( + _id, + _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - double get timeIntervalSince1970 { - return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSince19701); + /// Initializes and returns a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + static NSURL absoluteURLWithDataRepresentation_relativeToURL_( + NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_50( + _lib._class_NSURL1, + _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - NSObject addTimeInterval_(double seconds) { - final _ret = - _lib._objc_msgSend_347(_id, _lib._sel_addTimeInterval_1, seconds); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns the data representation of the URL's relativeString. If the URL was initialized with -initWithData:relativeToURL:, the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with NSUTF8StringEncoding. + NSData? get dataRepresentation { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_dataRepresentation1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - NSDate dateByAddingTimeInterval_(double ti) { - final _ret = - _lib._objc_msgSend_347(_id, _lib._sel_dateByAddingTimeInterval_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); + NSString? get absoluteString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_absoluteString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSDate earlierDate_(NSDate? anotherDate) { - final _ret = _lib._objc_msgSend_349( - _id, _lib._sel_earlierDate_1, anotherDate?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); + /// The relative portion of a URL. If baseURL is nil, or if the receiver is itself absolute, this is the same as absoluteString + NSString? get relativeString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativeString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSDate laterDate_(NSDate? anotherDate) { - final _ret = _lib._objc_msgSend_349( - _id, _lib._sel_laterDate_1, anotherDate?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); + /// may be nil. + NSURL? get baseURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_baseURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - int compare_(NSDate? other) { - return _lib._objc_msgSend_350( - _id, _lib._sel_compare_1, other?._id ?? ffi.nullptr); + /// if the receiver is itself absolute, this will return self. + NSURL? get absoluteURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_absoluteURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - bool isEqualToDate_(NSDate? otherDate) { - return _lib._objc_msgSend_351( - _id, _lib._sel_isEqualToDate_1, otherDate?._id ?? ffi.nullptr); + /// Any URL is composed of these two basic pieces. The full URL would be the concatenation of [myURL scheme], ':', [myURL resourceSpecifier] + NSString? get scheme { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + NSString? get resourceSpecifier { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_resourceSpecifier1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); + /// If the URL conforms to rfc 1808 (the most common form of URL), the following accessors will return the various components; otherwise they return nil. The litmus test for conformance is as recommended in RFC 1808 - whether the first two characters of resourceSpecifier is @"//". In all cases, they return the component's value after resolving the receiver against its base URL. + NSString? get host { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSDate date(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); - return NSDate._(_ret, _lib, retain: true, release: true); + NSNumber? get port { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); } - static NSDate dateWithTimeIntervalSinceNow_( - NativeCupertinoHttp _lib, double secs) { - final _ret = _lib._objc_msgSend_347( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); + NSString? get user { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSDate dateWithTimeIntervalSinceReferenceDate_( - NativeCupertinoHttp _lib, double ti) { - final _ret = _lib._objc_msgSend_347(_lib._class_NSDate1, - _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); + NSString? get password { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSDate dateWithTimeIntervalSince1970_( - NativeCupertinoHttp _lib, double secs) { - final _ret = _lib._objc_msgSend_347( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); + NSString? get path { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSDate dateWithTimeInterval_sinceDate_( - NativeCupertinoHttp _lib, double secsToBeAdded, NSDate? date) { - final _ret = _lib._objc_msgSend_352( - _lib._class_NSDate1, - _lib._sel_dateWithTimeInterval_sinceDate_1, - secsToBeAdded, - date?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); + NSString? get fragment { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSDate? getDistantFuture(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_353(_lib._class_NSDate1, _lib._sel_distantFuture1); + NSString? get parameterString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_parameterString1); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - static NSDate? getDistantPast(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_353(_lib._class_NSDate1, _lib._sel_distantPast1); + NSString? get query { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - static NSDate? getNow(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_353(_lib._class_NSDate1, _lib._sel_now1); + /// The same as path if baseURL is nil + NSString? get relativePath { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativePath1); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - NSDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _lib._objc_msgSend_347( - _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); + /// Determines if a given URL string's path represents a directory (i.e. the path component in the URL string ends with a '/' character). This does not check the resource the URL refers to. + bool get hasDirectoryPath { + return _lib._objc_msgSend_11(_id, _lib._sel_hasDirectoryPath1); } - NSDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _lib._objc_msgSend_347( - _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); + /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. + bool getFileSystemRepresentation_maxLength_( + ffi.Pointer buffer, int maxBufferLength) { + return _lib._objc_msgSend_90( + _id, + _lib._sel_getFileSystemRepresentation_maxLength_1, + buffer, + maxBufferLength); } - NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate? date) { - final _ret = _lib._objc_msgSend_352( - _id, - _lib._sel_initWithTimeInterval_sinceDate_1, - secsToBeAdded, - date?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); + /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. The returned C string will be automatically freed just as a returned object would be released; your code should copy the representation or use getFileSystemRepresentation:maxLength: if it needs to store the representation outside of the autorelease context in which the representation is created. + ffi.Pointer get fileSystemRepresentation { + return _lib._objc_msgSend_53(_id, _lib._sel_fileSystemRepresentation1); } - static NSDate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); - return NSDate._(_ret, _lib, retain: false, release: true); + /// Whether the scheme is file:; if [myURL isFileURL] is YES, then [myURL path] is suitable for input into NSFileManager or NSPathUtilities. + bool get fileURL { + return _lib._objc_msgSend_11(_id, _lib._sel_isFileURL1); } - static NSDate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); - return NSDate._(_ret, _lib, retain: false, release: true); + NSURL? get standardizedURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_standardizedURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } -} -typedef NSTimeInterval = ffi.Double; + /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. + bool checkResourceIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_183( + _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); + } -/// ! -/// @enum NSURLRequestCachePolicy -/// -/// @discussion The NSURLRequestCachePolicy enum defines constants that -/// can be used to specify the type of interactions that take place with -/// the caching system when the URL loading system processes a request. -/// Specifically, these constants cover interactions that have to do -/// with whether already-existing cache data is returned to satisfy a -/// URL load request. -/// -/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the -/// caching logic defined in the protocol implementation, if any, is -/// used for a particular URL load request. This is the default policy -/// for URL load requests. -/// -/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the -/// data for the URL load should be loaded from the origin source. No -/// existing local cache data, regardless of its freshness or validity, -/// should be used to satisfy a URL load request. -/// -/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that -/// not only should the local cache data be ignored, but that proxies and -/// other intermediates should be instructed to disregard their caches -/// so far as the protocol allows. -/// -/// @constant NSURLRequestReloadIgnoringCacheData Older name for -/// NSURLRequestReloadIgnoringLocalCacheData. -/// -/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the -/// existing cache data should be used to satisfy a URL load request, -/// regardless of its age or expiration date. However, if there is no -/// existing data in the cache corresponding to a URL load request, -/// the URL is loaded from the origin source. -/// -/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the -/// existing cache data should be used to satisfy a URL load request, -/// regardless of its age or expiration date. However, if there is no -/// existing data in the cache corresponding to a URL load request, no -/// attempt is made to load the URL from the origin source, and the -/// load is considered to have failed. This constant specifies a -/// behavior that is similar to an "offline" mode. -/// -/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that -/// the existing cache data may be used provided the origin source -/// confirms its validity, otherwise the URL is loaded from the -/// origin source. -abstract class NSURLRequestCachePolicy { - static const int NSURLRequestUseProtocolCachePolicy = 0; - static const int NSURLRequestReloadIgnoringLocalCacheData = 1; - static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; - static const int NSURLRequestReloadIgnoringCacheData = 1; - static const int NSURLRequestReturnCacheDataElseLoad = 2; - static const int NSURLRequestReturnCacheDataDontLoad = 3; - static const int NSURLRequestReloadRevalidatingCacheData = 5; -} + /// Returns whether the URL is a file reference URL. Symbol is present in iOS 4, but performs no operation. + bool isFileReferenceURL() { + return _lib._objc_msgSend_11(_id, _lib._sel_isFileReferenceURL1); + } -/// ! -/// @enum NSURLRequestNetworkServiceType -/// -/// @discussion The NSURLRequestNetworkServiceType enum defines constants that -/// can be used to specify the service type to associate with this request. The -/// service type is used to provide the networking layers a hint of the purpose -/// of the request. -/// -/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest -/// when created. This value should be left unchanged for the vast majority of requests. -/// -/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP -/// control traffic. -/// -/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video -/// traffic. -/// -/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background -/// traffic (such as a file download). -/// -/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. -/// -/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. -/// -/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. -/// -/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. -/// -/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. -abstract class NSURLRequestNetworkServiceType { - /// Standard internet traffic - static const int NSURLNetworkServiceTypeDefault = 0; + /// Returns a file reference URL that refers to the same resource as a specified file URL. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:). Symbol is present in iOS 4, but performs no operation. + NSURL fileReferenceURL() { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileReferenceURL1); + return NSURL._(_ret, _lib, retain: true, release: true); + } - /// Voice over IP control traffic - static const int NSURLNetworkServiceTypeVoIP = 1; + /// Returns a file path URL that refers to the same resource as a specified URL. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. Symbol is present in iOS 4, but performs no operation. + NSURL? get filePathURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_filePathURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } - /// Video traffic - static const int NSURLNetworkServiceTypeVideo = 2; + /// Returns the resource value identified by a given resource key. This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this method returns YES and value is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool getResourceValue_forKey_error_( + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_184( + _id, _lib._sel_getResourceValue_forKey_error_1, value, key, error); + } - /// Background traffic - static const int NSURLNetworkServiceTypeBackground = 3; + /// Returns the resource values identified by specified array of resource keys. This method first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this method returns NULL, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + NSDictionary resourceValuesForKeys_error_( + NSArray? keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_185( + _id, + _lib._sel_resourceValuesForKeys_error_1, + keys?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - /// Voice data - static const int NSURLNetworkServiceTypeVoice = 4; + /// Sets the resource value identified by a given resource key. This method writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool setResourceValue_forKey_error_(NSObject value, NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_186( + _id, _lib._sel_setResourceValue_forKey_error_1, value._id, key, error); + } - /// Responsive data - static const int NSURLNetworkServiceTypeResponsiveData = 6; + /// Sets any number of resource values of a URL's resource. This method writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to this method or to -setResourceValue:forKey:error: to guarantee the order. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool setResourceValues_error_( + NSDictionary? keyedValues, ffi.Pointer> error) { + return _lib._objc_msgSend_187(_id, _lib._sel_setResourceValues_error_1, + keyedValues?._id ?? ffi.nullptr, error); + } - /// Multimedia Audio/Video Streaming - static const int NSURLNetworkServiceTypeAVStreaming = 8; + /// Removes the cached resource value identified by a given resource value key from the URL object. Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources. + void removeCachedResourceValueForKey_(NSURLResourceKey key) { + return _lib._objc_msgSend_188( + _id, _lib._sel_removeCachedResourceValueForKey_1, key); + } - /// Responsive Multimedia Audio/Video - static const int NSURLNetworkServiceTypeResponsiveAV = 9; + /// Removes all cached resource values and all temporary resource values from the URL object. This method is currently applicable only to URLs for file system resources. + void removeAllCachedResourceValues() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); + } - /// Call Signaling - static const int NSURLNetworkServiceTypeCallSignaling = 11; -} + /// NS_SWIFT_SENDABLE + void setTemporaryResourceValue_forKey_(NSObject value, NSURLResourceKey key) { + return _lib._objc_msgSend_189( + _id, _lib._sel_setTemporaryResourceValue_forKey_1, value._id, key); + } -/// ! -/// @class NSURLRequest -/// -/// @abstract An NSURLRequest object represents a URL load request in a -/// manner independent of protocol and URL scheme. -/// -/// @discussion NSURLRequest encapsulates two basic data elements about -/// a URL load request: -///
    -///
  • The URL to load. -///
  • The policy to use when consulting the URL content cache made -/// available by the implementation. -///
-/// In addition, NSURLRequest is designed to be extended to support -/// protocol-specific data by adding categories to access a property -/// object provided in an interface targeted at protocol implementors. -///
    -///
  • Protocol implementors should direct their attention to the -/// NSURLRequestExtensibility category on NSURLRequest for more -/// information on how to provide extensions on NSURLRequest to -/// support protocol-specific request information. -///
  • Clients of this API who wish to create NSURLRequest objects to -/// load URL content should consult the protocol-specific NSURLRequest -/// categories that are available. The NSHTTPURLRequest category on -/// NSURLRequest is an example. -///
-///

-/// Objects of this class are used to create NSURLConnection instances, -/// which can are used to perform the load of a URL, or as input to the -/// NSURLConnection class method which performs synchronous loads. -class NSURLRequest extends NSObject { - NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// Returns bookmark data for the URL, created with specified options and resource values. If this method returns nil, the optional error is populated. + NSData + bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( + int options, + NSArray? keys, + NSURL? relativeURL, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_190( + _id, + _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, + options, + keys?._id ?? ffi.nullptr, + relativeURL?._id ?? ffi.nullptr, + error); + return NSData._(_ret, _lib, retain: true, release: true); + } + + /// Initializes a newly created NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. + NSURL + initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NSData? bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_191( + _id, + _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, + bookmarkData?._id ?? ffi.nullptr, + options, + relativeURL?._id ?? ffi.nullptr, + isStale, + error); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Creates and Initializes an NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. + static NSURL + URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NativeCupertinoHttp _lib, + NSData? bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_191( + _lib._class_NSURL1, + _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, + bookmarkData?._id ?? ffi.nullptr, + options, + relativeURL?._id ?? ffi.nullptr, + isStale, + error); + return NSURL._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSURLRequest] that points to the same underlying object as [other]. - static NSURLRequest castFrom(T other) { - return NSURLRequest._(other._id, other._lib, retain: true, release: true); + /// Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available in the bookmark data. + static NSDictionary resourceValuesForKeys_fromBookmarkData_( + NativeCupertinoHttp _lib, NSArray? keys, NSData? bookmarkData) { + final _ret = _lib._objc_msgSend_192( + _lib._class_NSURL1, + _lib._sel_resourceValuesForKeys_fromBookmarkData_1, + keys?._id ?? ffi.nullptr, + bookmarkData?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSURLRequest] that wraps the given raw object pointer. - static NSURLRequest castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLRequest._(other, lib, retain: retain, release: release); + /// Creates an alias file on disk at a specified location with specified bookmark data. bookmarkData must have been created with the NSURLBookmarkCreationSuitableForBookmarkFile option. bookmarkFileURL must either refer to an existing file (which will be overwritten), or to location in an existing directory. If this method returns NO, the optional error is populated. + static bool writeBookmarkData_toURL_options_error_( + NativeCupertinoHttp _lib, + NSData? bookmarkData, + NSURL? bookmarkFileURL, + int options, + ffi.Pointer> error) { + return _lib._objc_msgSend_193( + _lib._class_NSURL1, + _lib._sel_writeBookmarkData_toURL_options_error_1, + bookmarkData?._id ?? ffi.nullptr, + bookmarkFileURL?._id ?? ffi.nullptr, + options, + error); } - /// Returns whether [obj] is an instance of [NSURLRequest]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); + /// Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. If bookmarkFileURL refers to an alias file created prior to OS X v10.6 that contains Alias Manager information but no bookmark data, this method synthesizes bookmark data for the file. If this method returns nil, the optional error is populated. + static NSData bookmarkDataWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? bookmarkFileURL, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_194( + _lib._class_NSURL1, + _lib._sel_bookmarkDataWithContentsOfURL_error_1, + bookmarkFileURL?._id ?? ffi.nullptr, + error); + return NSData._(_ret, _lib, retain: true, release: true); } - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL? URL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSURLRequest1, - _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + /// Creates and initializes a NSURL that refers to the location specified by resolving the alias file at url. If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, the NSURL returned is the same as url argument. This method fails and returns nil if the url argument is unreachable, or if the original file or directory could not be located or is not reachable, or if the original file or directory is on a volume that could not be located or mounted. If this method fails, the optional error is populated. The NSURLBookmarkResolutionWithSecurityScope option is not supported by this method. + static NSURL URLByResolvingAliasFileAtURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int options, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_195( + _lib._class_NSURL1, + _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, + url?._id ?? ffi.nullptr, + options, + error); + return NSURL._(_ret, _lib, retain: true, release: true); } - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { + /// Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. When access to this resource is no longer needed the client must call stopAccessingSecurityScopedResource. Each call to startAccessingSecurityScopedResource must be balanced with a call to stopAccessingSecurityScopedResource (Note: this is not reference counted). + bool startAccessingSecurityScopedResource() { return _lib._objc_msgSend_11( - _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); + _id, _lib._sel_startAccessingSecurityScopedResource1); } - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NativeCupertinoHttp _lib, - NSURL? URL, - int cachePolicy, - double timeoutInterval) { - final _ret = _lib._objc_msgSend_354( - _lib._class_NSURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + /// Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource. + void stopAccessingSecurityScopedResource() { + return _lib._objc_msgSend_1( + _id, _lib._sel_stopAccessingSecurityScopedResource1); } - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_(NSURL? URL) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithURL_1, URL?._id ?? ffi.nullptr); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + /// Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: + /// - NSMetadataQueryUbiquitousDataScope + /// - NSMetadataQueryUbiquitousDocumentsScope + /// - An NSFilePresenter presenting the contents of the directory located by -URLForUbiquitousContainerIdentifier: or a subdirectory thereof + /// + /// The following methods behave identically to their similarly named methods above (-getResourceValue:forKey:error:, etc.), except that they allow you to get resource values and check for presence regardless of whether the promised item's contents currently exist at the URL. You must use these APIs instead of the normal NSURL resource value APIs if and only if any of the following are true: + /// - You are using a URL that you know came directly from one of the above APIs + /// - You are inside the accessor block of a coordinated read or write that used NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingContentIndependentMetadataOnly + /// + /// Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. + bool getPromisedItemResourceValue_forKey_error_( + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_184( + _id, + _lib._sel_getPromisedItemResourceValue_forKey_error_1, + value, + key, + error); } - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL and - /// cache policy. - /// @discussion This is the designated initializer for the - /// NSURLRequest class. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL? URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_354( + NSDictionary promisedItemResourceValuesForKeys_error_( + NSArray? keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_185( _id, - _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + _lib._sel_promisedItemResourceValuesForKeys_error_1, + keys?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + bool checkPromisedItemIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_183( + _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); } - /// ! - /// @abstract Returns the cache policy of the receiver. - /// @result The cache policy of the receiver. - int get cachePolicy { - return _lib._objc_msgSend_355(_id, _lib._sel_cachePolicy1); + /// The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. + static NSURL fileURLWithPathComponents_( + NativeCupertinoHttp _lib, NSArray? components) { + final _ret = _lib._objc_msgSend_196(_lib._class_NSURL1, + _lib._sel_fileURLWithPathComponents_1, components?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval alloted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - /// @result The timeout interval of the receiver. - double get timeoutInterval { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); + NSArray? get pathComponents { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_pathComponents1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract The main document URL associated with this load. - /// @discussion This URL is used for the cookie "same domain as main - /// document" policy. There may also be other future uses. - /// See setMainDocumentURL: - /// NOTE: In the current implementation, this value is unused by the - /// framework. A fully functional version of this method will be available - /// in the future. - /// @result The main document URL. - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); + NSString? get lastPathComponent { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lastPathComponent1); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. - /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have - /// not explicitly set a networkServiceType (using the setNetworkServiceType method). - /// @result The NSURLRequestNetworkServiceType associated with this request. - int get networkServiceType { - return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); + NSString? get pathExtension { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_pathExtension1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @result YES if the receiver is allowed to use the built in cellular radios to - /// satify the request, NO otherwise. - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); + NSURL URLByAppendingPathComponent_(NSString? pathComponent) { + final _ret = _lib._objc_msgSend_46( + _id, + _lib._sel_URLByAppendingPathComponent_1, + pathComponent?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @result YES if the receiver is allowed to use an interface marked as expensive to - /// satify the request, NO otherwise. - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + NSURL URLByAppendingPathComponent_isDirectory_( + NSString? pathComponent, bool isDirectory) { + final _ret = _lib._objc_msgSend_45( + _id, + _lib._sel_URLByAppendingPathComponent_isDirectory_1, + pathComponent?._id ?? ffi.nullptr, + isDirectory); + return NSURL._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @result YES if the receiver is allowed to use an interface marked as constrained to - /// satify the request, NO otherwise. - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); + NSURL? get URLByDeletingLastPathComponent { + final _ret = + _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingLastPathComponent1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); + NSURL URLByAppendingPathExtension_(NSString? pathExtension) { + final _ret = _lib._objc_msgSend_46( + _id, + _lib._sel_URLByAppendingPathExtension_1, + pathExtension?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the HTTP request method of the receiver. - /// @result the HTTP request method of the receiver. - NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); + NSURL? get URLByDeletingPathExtension { + final _ret = + _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingPathExtension1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSURL._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns a dictionary containing all the HTTP header fields - /// of the receiver. - /// @result a dictionary containing all the HTTP header fields of the - /// receiver. - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); + /// The following methods work only on `file:` scheme URLs; for non-`file:` scheme URLs, these methods return the URL unchanged. + NSURL? get URLByStandardizingPath { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URLByStandardizingPath1); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @method valueForHTTPHeaderField: - /// @abstract Returns the value which corresponds to the given header - /// field. Note that, in keeping with the HTTP RFC, HTTP header field - /// names are case-insensitive. - /// @param field the header field name to use for the lookup - /// (case-insensitive). - /// @result the value associated with the given header field, or nil if - /// there is no value associated with the given header field. - NSString valueForHTTPHeaderField_(NSString? field) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + : NSURL._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - /// @result The request body data of the receiver. - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); + NSURL? get URLByResolvingSymlinksInPath { + final _ret = + _lib._objc_msgSend_52(_id, _lib._sel_URLByResolvingSymlinksInPath1); return _ret.address == 0 ? null - : NSData._(_ret, _lib, retain: true, release: true); + : NSURL._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the request body stream of the receiver - /// if any has been set - /// @discussion The stream is returned for examination only; it is - /// not safe for the caller to manipulate the stream in any way. Also - /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only - /// one can be set on a given request. Also note that the body stream is - /// preserved across copies, but is LOST when the request is coded via the - /// NSCoding protocol - /// @result The request body stream of the receiver. - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + /// Blocks to load the data if necessary. If shouldUseCache is YES, then if an equivalent URL has already been loaded and cached, its resource data will be returned immediately. If shouldUseCache is NO, a new load will be started + NSData resourceDataUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_197( + _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); + return NSData._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Determine whether default cookie handling will happen for - /// this request. - /// @discussion NOTE: This value is not used prior to 10.3 - /// @result YES if cookies will be sent with and set for this request; - /// otherwise NO. - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); + /// Starts an asynchronous load of the data, registering delegate to receive notification. Only one such background load can proceed at a time. + void loadResourceDataNotifyingClient_usingCache_( + NSObject client, bool shouldUseCache) { + return _lib._objc_msgSend_198( + _id, + _lib._sel_loadResourceDataNotifyingClient_usingCache_1, + client._id, + shouldUseCache); } - /// ! - /// @abstract Reports whether the receiver is not expected to wait for the - /// previous response before transmitting. - /// @result YES if the receiver should transmit before the previous response - /// is received. NO if the receiver should wait for the previous response - /// before transmitting. - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + NSObject propertyForKey_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSURLRequest new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); + /// These attempt to write the given arguments for the resource specified by the URL; they return success or failure + bool setResourceData_(NSData? data) { + return _lib._objc_msgSend_35( + _id, _lib._sel_setResourceData_1, data?._id ?? ffi.nullptr); } - static NSURLRequest alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); + bool setProperty_forKey_(NSObject property, NSString? propertyKey) { + return _lib._objc_msgSend_199(_id, _lib._sel_setProperty_forKey_1, + property._id, propertyKey?._id ?? ffi.nullptr); + } + + /// Sophisticated clients will want to ask for this, then message the handle directly. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded + NSURLHandle URLHandleUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_207( + _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); + return NSURLHandle._(_ret, _lib, retain: true, release: true); + } + + static NSURL new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); + return NSURL._(_ret, _lib, retain: false, release: true); + } + + static NSURL alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); + return NSURL._(_ret, _lib, retain: false, release: true); } } -class NSInputStream extends _ObjCWrapper { - NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSNumber extends NSValue { + NSNumber._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSInputStream] that points to the same underlying object as [other]. - static NSInputStream castFrom(T other) { - return NSInputStream._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSNumber] that points to the same underlying object as [other]. + static NSNumber castFrom(T other) { + return NSNumber._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSInputStream] that wraps the given raw object pointer. - static NSInputStream castFromPointer( + /// Returns a [NSNumber] that wraps the given raw object pointer. + static NSNumber castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSInputStream._(other, lib, retain: retain, release: release); + return NSNumber._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSInputStream]. + /// Returns whether [obj] is an instance of [NSNumber]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); } -} -/// ! -/// @class NSMutableURLRequest -/// -/// @abstract An NSMutableURLRequest object represents a mutable URL load -/// request in a manner independent of protocol and URL scheme. -/// -/// @discussion This specialization of NSURLRequest is provided to aid -/// developers who may find it more convenient to mutate a single request -/// object for a series of URL loads instead of creating an immutable -/// NSURLRequest for each load. This programming model is supported by -/// the following contract stipulation between NSMutableURLRequest and -/// NSURLConnection: NSURLConnection makes a deep copy of each -/// NSMutableURLRequest object passed to one of its initializers. -///

NSMutableURLRequest is designed to be extended to support -/// protocol-specific data by adding categories to access a property -/// object provided in an interface targeted at protocol implementors. -///

    -///
  • Protocol implementors should direct their attention to the -/// NSMutableURLRequestExtensibility category on -/// NSMutableURLRequest for more information on how to provide -/// extensions on NSMutableURLRequest to support protocol-specific -/// request information. -///
  • Clients of this API who wish to create NSMutableURLRequest -/// objects to load URL content should consult the protocol-specific -/// NSMutableURLRequest categories that are available. The -/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an -/// example. -///
-class NSMutableURLRequest extends NSURLRequest { - NSMutableURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @override + NSNumber initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithChar_(int value) { + final _ret = _lib._objc_msgSend_62(_id, _lib._sel_initWithChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedChar_(int value) { + final _ret = + _lib._objc_msgSend_63(_id, _lib._sel_initWithUnsignedChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithShort_(int value) { + final _ret = _lib._objc_msgSend_64(_id, _lib._sel_initWithShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedShort_(int value) { + final _ret = + _lib._objc_msgSend_65(_id, _lib._sel_initWithUnsignedShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithInt_(int value) { + final _ret = _lib._objc_msgSend_66(_id, _lib._sel_initWithInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedInt_(int value) { + final _ret = + _lib._objc_msgSend_67(_id, _lib._sel_initWithUnsignedInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithLong_(int value) { + final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + NSNumber initWithUnsignedLong_(int value) { + final _ret = + _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. - static NSMutableURLRequest castFrom(T other) { - return NSMutableURLRequest._(other._id, other._lib, - retain: true, release: true); + NSNumber initWithLongLong_(int value) { + final _ret = + _lib._objc_msgSend_70(_id, _lib._sel_initWithLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. - static NSMutableURLRequest castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableURLRequest._(other, lib, retain: retain, release: release); + NSNumber initWithUnsignedLongLong_(int value) { + final _ret = + _lib._objc_msgSend_71(_id, _lib._sel_initWithUnsignedLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSMutableURLRequest]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableURLRequest1); + NSNumber initWithFloat_(double value) { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_initWithFloat_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract The URL of the receiver. - @override - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + NSNumber initWithDouble_(double value) { + final _ret = _lib._objc_msgSend_73(_id, _lib._sel_initWithDouble_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract The URL of the receiver. - set URL(NSURL? value) { - _lib._objc_msgSend_332(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); + NSNumber initWithBool_(bool value) { + final _ret = _lib._objc_msgSend_74(_id, _lib._sel_initWithBool_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract The cache policy of the receiver. - @override - int get cachePolicy { - return _lib._objc_msgSend_355(_id, _lib._sel_cachePolicy1); + NSNumber initWithInteger_(int value) { + final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract The cache policy of the receiver. - set cachePolicy(int value) { - _lib._objc_msgSend_358(_id, _lib._sel_setCachePolicy_1, value); + NSNumber initWithUnsignedInteger_(int value) { + final _ret = + _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Sets the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - @override - double get timeoutInterval { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); + int get charValue { + return _lib._objc_msgSend_75(_id, _lib._sel_charValue1); } - /// ! - /// @abstract Sets the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - set timeoutInterval(double value) { - _lib._objc_msgSend_337(_id, _lib._sel_setTimeoutInterval_1, value); + int get unsignedCharValue { + return _lib._objc_msgSend_76(_id, _lib._sel_unsignedCharValue1); } - /// ! - /// @abstract Sets the main document URL - /// @discussion The caller should pass the URL for an appropriate main - /// document, if known. For example, when loading a web page, the URL - /// of the main html document for the top-level frame should be - /// passed. This main document will be used to implement the cookie - /// "only from same domain as main document" policy, and possibly - /// other things in the future. - /// NOTE: In the current implementation, the passed-in value is unused by the - /// framework. A fully functional version of this method will be available - /// in the future. - @override - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + int get shortValue { + return _lib._objc_msgSend_77(_id, _lib._sel_shortValue1); } - /// ! - /// @abstract Sets the main document URL - /// @discussion The caller should pass the URL for an appropriate main - /// document, if known. For example, when loading a web page, the URL - /// of the main html document for the top-level frame should be - /// passed. This main document will be used to implement the cookie - /// "only from same domain as main document" policy, and possibly - /// other things in the future. - /// NOTE: In the current implementation, the passed-in value is unused by the - /// framework. A fully functional version of this method will be available - /// in the future. - set mainDocumentURL(NSURL? value) { - _lib._objc_msgSend_332( - _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); + int get unsignedShortValue { + return _lib._objc_msgSend_78(_id, _lib._sel_unsignedShortValue1); } - /// ! - /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request - /// @discussion This method is used to provide the network layers with a hint as to the purpose - /// of the request. Most clients should not need to use this method. - @override - int get networkServiceType { - return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); + int get intValue { + return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); } - /// ! - /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request - /// @discussion This method is used to provide the network layers with a hint as to the purpose - /// of the request. Most clients should not need to use this method. - set networkServiceType(int value) { - _lib._objc_msgSend_359(_id, _lib._sel_setNetworkServiceType_1, value); + int get unsignedIntValue { + return _lib._objc_msgSend_80(_id, _lib._sel_unsignedIntValue1); } - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @discussion NO if the receiver should not be allowed to use the built in - /// cellular radios to satisfy the request, YES otherwise. The default is YES. - @override - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); + int get longValue { + return _lib._objc_msgSend_81(_id, _lib._sel_longValue1); } - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @discussion NO if the receiver should not be allowed to use the built in - /// cellular radios to satisfy the request, YES otherwise. The default is YES. - set allowsCellularAccess(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setAllowsCellularAccess_1, value); + int get unsignedLongValue { + return _lib._objc_msgSend_12(_id, _lib._sel_unsignedLongValue1); } - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to - /// satify the request, YES otherwise. - @override - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + int get longLongValue { + return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); } - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to - /// satify the request, YES otherwise. - set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + int get unsignedLongLongValue { + return _lib._objc_msgSend_83(_id, _lib._sel_unsignedLongLongValue1); } - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to - /// satify the request, YES otherwise. - @override - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); + double get floatValue { + return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); } - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to - /// satify the request, YES otherwise. - set allowsConstrainedNetworkAccess(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + double get doubleValue { + return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); } - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - @override - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); + bool get boolValue { + return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); } - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - set assumesHTTP3Capable(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setAssumesHTTP3Capable_1, value); + int get integerValue { + return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); } - /// ! - /// @abstract Sets the HTTP request method of the receiver. - @override - NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); + int get unsignedIntegerValue { + return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); + } + + NSString? get stringValue { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_stringValue1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Sets the HTTP request method of the receiver. - set HTTPMethod(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setHTTPMethod_1, value?._id ?? ffi.nullptr); + int compare_(NSNumber? otherNumber) { + return _lib._objc_msgSend_86( + _id, _lib._sel_compare_1, otherNumber?._id ?? ffi.nullptr); } - /// ! - /// @abstract Sets the HTTP header fields of the receiver to the given - /// dictionary. - /// @discussion This method replaces all header fields that may have - /// existed before this method call. - ///

Since HTTP header fields must be string values, each object and - /// key in the dictionary passed to this method must answer YES when - /// sent an -isKindOfClass:[NSString class] message. If either - /// the key or value for a key-value pair answers NO when sent this - /// message, the key-value pair is skipped. - @override - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + bool isEqualToNumber_(NSNumber? number) { + return _lib._objc_msgSend_87( + _id, _lib._sel_isEqualToNumber_1, number?._id ?? ffi.nullptr); } - /// ! - /// @abstract Sets the HTTP header fields of the receiver to the given - /// dictionary. - /// @discussion This method replaces all header fields that may have - /// existed before this method call. - ///

Since HTTP header fields must be string values, each object and - /// key in the dictionary passed to this method must answer YES when - /// sent an -isKindOfClass:[NSString class] message. If either - /// the key or value for a key-value pair answers NO when sent this - /// message, the key-value pair is skipped. - set allHTTPHeaderFields(NSDictionary? value) { - _lib._objc_msgSend_360( - _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); } - /// ! - /// @method setValue:forHTTPHeaderField: - /// @abstract Sets the value of the given HTTP header field. - /// @discussion If a value was previously set for the given header - /// field, that value is replaced with the given value. Note that, in - /// keeping with the HTTP RFC, HTTP header field names are - /// case-insensitive. - /// @param value the header field value. - /// @param field the header field name (case-insensitive). - void setValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_361(_id, _lib._sel_setValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + static NSNumber numberWithChar_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_62( + _lib._class_NSNumber1, _lib._sel_numberWithChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @method addValue:forHTTPHeaderField: - /// @abstract Adds an HTTP header field in the current header - /// dictionary. - /// @discussion This method provides a way to add values to header - /// fields incrementally. If a value was previously set for the given - /// header field, the given value is appended to the previously-existing - /// value. The appropriate field delimiter, a comma in the case of HTTP, - /// is added by the implementation, and should not be added to the given - /// value by the caller. Note that, in keeping with the HTTP RFC, HTTP - /// header field names are case-insensitive. - /// @param value the header field value. - /// @param field the header field name (case-insensitive). - void addValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_361(_id, _lib._sel_addValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + static NSNumber numberWithUnsignedChar_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_63( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Sets the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - @override - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithShort_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_64( + _lib._class_NSNumber1, _lib._sel_numberWithShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Sets the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - set HTTPBody(NSData? value) { - _lib._objc_msgSend_362( - _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); + static NSNumber numberWithUnsignedShort_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_65( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Sets the request body to be the contents of the given stream. - /// @discussion The provided stream should be unopened; the request will take - /// over the stream's delegate. The entire stream's contents will be - /// transmitted as the HTTP body of the request. Note that the body stream - /// and the body data (set by setHTTPBody:, above) are mutually exclusive - /// - setting one will clear the other. - @override - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithInt_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_66( + _lib._class_NSNumber1, _lib._sel_numberWithInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Sets the request body to be the contents of the given stream. - /// @discussion The provided stream should be unopened; the request will take - /// over the stream's delegate. The entire stream's contents will be - /// transmitted as the HTTP body of the request. Note that the body stream - /// and the body data (set by setHTTPBody:, above) are mutually exclusive - /// - setting one will clear the other. - set HTTPBodyStream(NSInputStream? value) { - _lib._objc_msgSend_363( - _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); + static NSNumber numberWithUnsignedInt_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_67( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Decide whether default cookie handling will happen for - /// this request (YES if cookies should be sent with and set for this request; - /// otherwise NO). - /// @discussion The default is YES - in other words, cookies are sent from and - /// stored to the cookie manager by default. - /// NOTE: In releases prior to 10.3, this value is ignored - @override - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); + static NSNumber numberWithLong_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSNumber1, _lib._sel_numberWithLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Decide whether default cookie handling will happen for - /// this request (YES if cookies should be sent with and set for this request; - /// otherwise NO). - /// @discussion The default is YES - in other words, cookies are sent from and - /// stored to the cookie manager by default. - /// NOTE: In releases prior to 10.3, this value is ignored - set HTTPShouldHandleCookies(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); + static NSNumber numberWithUnsignedLong_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_69( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Sets whether the request should not wait for the previous response - /// before transmitting (YES if the receiver should transmit before the previous response is - /// received. NO to wait for the previous response before transmitting) - /// @discussion Calling this method with a YES value does not guarantee HTTP - /// pipelining behavior. This method may have no effect if an HTTP proxy is - /// configured, or if the HTTP request uses an unsafe request method (e.g., POST - /// requests will not pipeline). Pipelining behavior also may not begin until - /// the second request on a given TCP connection. There may be other situations - /// where pipelining does not occur even though YES was set. - /// HTTP 1.1 allows the client to send multiple requests to the server without - /// waiting for a response. Though HTTP 1.1 requires support for pipelining, - /// some servers report themselves as being HTTP 1.1 but do not support - /// pipelining (disconnecting, sending resources misordered, omitting part of - /// a resource, etc.). - @override - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + static NSNumber numberWithLongLong_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_70( + _lib._class_NSNumber1, _lib._sel_numberWithLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Sets whether the request should not wait for the previous response - /// before transmitting (YES if the receiver should transmit before the previous response is - /// received. NO to wait for the previous response before transmitting) - /// @discussion Calling this method with a YES value does not guarantee HTTP - /// pipelining behavior. This method may have no effect if an HTTP proxy is - /// configured, or if the HTTP request uses an unsafe request method (e.g., POST - /// requests will not pipeline). Pipelining behavior also may not begin until - /// the second request on a given TCP connection. There may be other situations - /// where pipelining does not occur even though YES was set. - /// HTTP 1.1 allows the client to send multiple requests to the server without - /// waiting for a response. Though HTTP 1.1 requires support for pipelining, - /// some servers report themselves as being HTTP 1.1 but do not support - /// pipelining (disconnecting, sending resources misordered, omitting part of - /// a resource, etc.). - set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + static NSNumber numberWithUnsignedLongLong_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_71( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSMutableURLRequest requestWithURL_( - NativeCupertinoHttp _lib, NSURL? URL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableURLRequest1, - _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithFloat_(NativeCupertinoHttp _lib, double value) { + final _ret = _lib._objc_msgSend_72( + _lib._class_NSNumber1, _lib._sel_numberWithFloat_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_11( - _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); + static NSNumber numberWithDouble_(NativeCupertinoHttp _lib, double value) { + final _ret = _lib._objc_msgSend_73( + _lib._class_NSNumber1, _lib._sel_numberWithDouble_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NativeCupertinoHttp _lib, - NSURL? URL, - int cachePolicy, - double timeoutInterval) { - final _ret = _lib._objc_msgSend_354( - _lib._class_NSMutableURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithBool_(NativeCupertinoHttp _lib, bool value) { + final _ret = _lib._objc_msgSend_74( + _lib._class_NSNumber1, _lib._sel_numberWithBool_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - static NSMutableURLRequest new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + static NSNumber numberWithInteger_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSNumber1, _lib._sel_numberWithInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSNumber numberWithUnsignedInteger_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_69( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55(_lib._class_NSNumber1, + _lib._sel_valueWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue value_withObjCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSNumber1, _lib._sel_value_withObjCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithNonretainedObject_( + NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_56(_lib._class_NSNumber1, + _lib._sel_valueWithNonretainedObject_1, anObject._id); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithPointer_( + NativeCupertinoHttp _lib, ffi.Pointer pointer) { + final _ret = _lib._objc_msgSend_57( + _lib._class_NSNumber1, _lib._sel_valueWithPointer_1, pointer); + return NSValue._(_ret, _lib, retain: true, release: true); + } + + static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_60( + _lib._class_NSNumber1, _lib._sel_valueWithRange_1, range); + return NSValue._(_ret, _lib, retain: true, release: true); } - static NSMutableURLRequest alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + static NSNumber new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); + return NSNumber._(_ret, _lib, retain: false, release: true); } -} - -abstract class NSURLRequestAttribution { - static const int NSURLRequestAttributionDeveloper = 0; - static const int NSURLRequestAttributionUser = 1; -} -abstract class NSHTTPCookieAcceptPolicy { - static const int NSHTTPCookieAcceptPolicyAlways = 0; - static const int NSHTTPCookieAcceptPolicyNever = 1; - static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; + static NSNumber alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); + return NSNumber._(_ret, _lib, retain: false, release: true); + } } -class NSHTTPCookieStorage extends NSObject { - NSHTTPCookieStorage._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSValue extends NSObject { + NSValue._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. - static NSHTTPCookieStorage castFrom(T other) { - return NSHTTPCookieStorage._(other._id, other._lib, - retain: true, release: true); + /// Returns a [NSValue] that points to the same underlying object as [other]. + static NSValue castFrom(T other) { + return NSValue._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. - static NSHTTPCookieStorage castFromPointer( + /// Returns a [NSValue] that wraps the given raw object pointer. + static NSValue castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); + return NSValue._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. + /// Returns whether [obj] is an instance of [NSValue]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSHTTPCookieStorage1); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); } - static NSHTTPCookieStorage? getSharedHTTPCookieStorage( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_364( - _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + void getValue_size_(ffi.Pointer value, int size) { + return _lib._objc_msgSend_33(_id, _lib._sel_getValue_size_1, value, size); } - static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_365( - _lib._class_NSHTTPCookieStorage1, - _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, - identifier?._id ?? ffi.nullptr); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + ffi.Pointer get objCType { + return _lib._objc_msgSend_53(_id, _lib._sel_objCType1); } - NSArray? get cookies { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_cookies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + NSValue initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_54( + _id, _lib._sel_initWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - void setCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_366( - _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); + NSValue initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSValue._(_ret, _lib, retain: true, release: true); } - void deleteCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_366( - _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); + static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSValue1, _lib._sel_valueWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - void removeCookiesSinceDate_(NSDate? date) { - return _lib._objc_msgSend_367( - _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); + static NSValue value_withObjCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSValue1, _lib._sel_value_withObjCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - NSArray cookiesForURL_(NSURL? URL) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_cookiesForURL_1, URL?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSValue valueWithNonretainedObject_( + NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_56(_lib._class_NSValue1, + _lib._sel_valueWithNonretainedObject_1, anObject._id); + return NSValue._(_ret, _lib, retain: true, release: true); } - void setCookies_forURL_mainDocumentURL_( - NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { - return _lib._objc_msgSend_368( - _id, - _lib._sel_setCookies_forURL_mainDocumentURL_1, - cookies?._id ?? ffi.nullptr, - URL?._id ?? ffi.nullptr, - mainDocumentURL?._id ?? ffi.nullptr); + NSObject get nonretainedObjectValue { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nonretainedObjectValue1); + return NSObject._(_ret, _lib, retain: true, release: true); } - int get cookieAcceptPolicy { - return _lib._objc_msgSend_369(_id, _lib._sel_cookieAcceptPolicy1); + static NSValue valueWithPointer_( + NativeCupertinoHttp _lib, ffi.Pointer pointer) { + final _ret = _lib._objc_msgSend_57( + _lib._class_NSValue1, _lib._sel_valueWithPointer_1, pointer); + return NSValue._(_ret, _lib, retain: true, release: true); } - set cookieAcceptPolicy(int value) { - _lib._objc_msgSend_370(_id, _lib._sel_setCookieAcceptPolicy_1, value); + ffi.Pointer get pointerValue { + return _lib._objc_msgSend_31(_id, _lib._sel_pointerValue1); } - NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { - final _ret = _lib._objc_msgSend_97( - _id, - _lib._sel_sortedCookiesUsingDescriptors_1, - sortOrder?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + bool isEqualToValue_(NSValue? value) { + return _lib._objc_msgSend_58( + _id, _lib._sel_isEqualToValue_1, value?._id ?? ffi.nullptr); } - void storeCookies_forTask_(NSArray? cookies, NSURLSessionTask? task) { - return _lib._objc_msgSend_378(_id, _lib._sel_storeCookies_forTask_1, - cookies?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); + void getValue_(ffi.Pointer value) { + return _lib._objc_msgSend_59(_id, _lib._sel_getValue_1, value); } - void getCookiesForTask_completionHandler_( - NSURLSessionTask? task, ObjCBlock19 completionHandler) { - return _lib._objc_msgSend_379( - _id, - _lib._sel_getCookiesForTask_completionHandler_1, - task?._id ?? ffi.nullptr, - completionHandler._id); + static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_60( + _lib._class_NSValue1, _lib._sel_valueWithRange_1, range); + return NSValue._(_ret, _lib, retain: true, release: true); } - static NSHTTPCookieStorage new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + NSRange get rangeValue { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeValue1); } - static NSHTTPCookieStorage alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + static NSValue new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); + return NSValue._(_ret, _lib, retain: false, release: true); + } + + static NSValue alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); + return NSValue._(_ret, _lib, retain: false, release: true); } } -class NSHTTPCookie extends _ObjCWrapper { - NSHTTPCookie._(ffi.Pointer id, NativeCupertinoHttp lib, +typedef NSInteger = ffi.Long; + +class NSError extends NSObject { + NSError._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. - static NSHTTPCookie castFrom(T other) { - return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSError] that points to the same underlying object as [other]. + static NSError castFrom(T other) { + return NSError._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. - static NSHTTPCookie castFromPointer( + /// Returns a [NSError] that wraps the given raw object pointer. + static NSError castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSHTTPCookie._(other, lib, retain: retain, release: release); + return NSError._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSHTTPCookie]. + /// Returns whether [obj] is an instance of [NSError]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); } -} -/// NSURLSessionTask - a cancelable object that refers to the lifetime -/// of processing a given request. -class NSURLSessionTask extends NSObject { - NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// Domain cannot be nil; dict may be nil if no userInfo desired. + NSError initWithDomain_code_userInfo_( + NSErrorDomain domain, int code, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_179( + _id, + _lib._sel_initWithDomain_code_userInfo_1, + domain, + code, + dict?._id ?? ffi.nullptr); + return NSError._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. - static NSURLSessionTask castFrom(T other) { - return NSURLSessionTask._(other._id, other._lib, - retain: true, release: true); + static NSError errorWithDomain_code_userInfo_(NativeCupertinoHttp _lib, + NSErrorDomain domain, int code, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_179( + _lib._class_NSError1, + _lib._sel_errorWithDomain_code_userInfo_1, + domain, + code, + dict?._id ?? ffi.nullptr); + return NSError._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. - static NSURLSessionTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTask._(other, lib, retain: retain, release: release); + /// These define the error. Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts. Codes are domain-specific. + NSErrorDomain get domain { + return _lib._objc_msgSend_32(_id, _lib._sel_domain1); } - /// Returns whether [obj] is an instance of [NSURLSessionTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTask1); + int get code { + return _lib._objc_msgSend_81(_id, _lib._sel_code1); } - /// an identifier for this task, assigned by and unique to the owning session - int get taskIdentifier { - return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); + /// Additional info which may be used to describe the error further. Examples of keys that might be included in here are "Line Number", "Failed URL", etc. Embedding other errors in here can also be used as a way to communicate underlying reasons for failures; for instance "File System Error" embedded in the userInfo of an NSError returned from a higher level document object. If the embedded error information is itself NSError, the standard key NSUnderlyingErrorKey can be used. + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - /// may be nil if this is a stream task - NSURLRequest? get originalRequest { - final _ret = _lib._objc_msgSend_371(_id, _lib._sel_originalRequest1); + /// The primary user-presentable message for the error, for instance for NSFileReadNoPermissionError: "The file "File Name" couldn't be opened because you don't have permission to view it.". This message should ideally indicate what failed and why it failed. This value either comes from NSLocalizedDescriptionKey, or NSLocalizedFailureErrorKey+NSLocalizedFailureReasonErrorKey, or NSLocalizedFailureErrorKey. The steps this takes to construct the description include: + /// 1. Look for NSLocalizedDescriptionKey in userInfo, use value as-is if present. + /// 2. Look for NSLocalizedFailureErrorKey in userInfo. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. + /// 3. Fetch NSLocalizedDescriptionKey from userInfoValueProvider, use value as-is if present. + /// 4. Fetch NSLocalizedFailureErrorKey from userInfoValueProvider. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. + /// 5. Look for NSLocalizedFailureReasonErrorKey in userInfo or from userInfoValueProvider; combine with generic "Operation failed" message. + /// 6. Last resort localized but barely-presentable string manufactured from domain and code. The result is never nil. + NSString? get localizedDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); return _ret.address == 0 ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - /// may differ from originalRequest due to http server redirection - NSURLRequest? get currentRequest { - final _ret = _lib._objc_msgSend_371(_id, _lib._sel_currentRequest1); + /// Return a complete sentence which describes why the operation failed. For instance, for NSFileReadNoPermissionError: "You don't have permission.". In many cases this will be just the "because" part of the error message (but as a complete sentence, which makes localization easier). Default implementation of this picks up the value of NSLocalizedFailureReasonErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. + NSString? get localizedFailureReason { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedFailureReason1); return _ret.address == 0 ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - /// may be nil if no response has been received - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_373(_id, _lib._sel_response1); + /// Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel. For instance, for NSFileReadNoPermissionError: "To view or change permissions, select the item in the Finder and choose File > Get Info.". Default implementation of this picks up the value of NSLocalizedRecoverySuggestionErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. + NSString? get localizedRecoverySuggestion { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedRecoverySuggestion1); return _ret.address == 0 ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - /// NSProgress object which represents the task progress. - /// It can be used for task progress tracking. - NSProgress? get progress { - final _ret = _lib._objc_msgSend_318(_id, _lib._sel_progress1); + /// Return titles of buttons that are appropriate for displaying in an alert. These should match the string provided as a part of localizedRecoverySuggestion. The first string would be the title of the right-most and default button, the second one next to it, and so on. If used in an alert the corresponding default return values are NSAlertFirstButtonReturn + n. Default implementation of this picks up the value of NSLocalizedRecoveryOptionsErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. nil return usually implies no special suggestion, which would imply a single "OK" button. + NSArray? get localizedRecoveryOptions { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_localizedRecoveryOptions1); return _ret.address == 0 ? null - : NSProgress._(_ret, _lib, retain: true, release: true); + : NSArray._(_ret, _lib, retain: true, release: true); } - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - NSDate? get earliestBeginDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_earliestBeginDate1); + /// Return an object that conforms to the NSErrorRecoveryAttempting informal protocol. The recovery attempter must be an object that can correctly interpret an index into the array returned by localizedRecoveryOptions. The default implementation of this picks up the value of NSRecoveryAttempterErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. + NSObject get recoveryAttempter { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_recoveryAttempter1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user. This is done automatically by +[NSAlert alertWithError:], which the presentError: variants in NSApplication go through. The default implementation of this picks up the value of the NSHelpAnchorErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. + NSString? get helpAnchor { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_helpAnchor1); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. + /// Return a list of underlying errors, if any. It includes the values of both NSUnderlyingErrorKey and NSMultipleUnderlyingErrorsKey. If there are no underlying errors, returns an empty array. + NSArray? get underlyingErrors { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_underlyingErrors1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// Specify a block which will be called from the implementations of localizedDescription, localizedFailureReason, localizedRecoverySuggestion, localizedRecoveryOptions, recoveryAttempter, helpAnchor, and debugDescription when the underlying value for these is not present in the userInfo dictionary of NSError instances with the specified domain. The provider will be called with the userInfo key corresponding to the queried property: For instance, NSLocalizedDescriptionKey for localizedDescription. The provider should return nil for any keys it is not able to provide and, very importantly, any keys it does not recognize (since we may extend the list of keys in future releases). /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - set earliestBeginDate(NSDate? value) { - _lib._objc_msgSend_374( - _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); + /// The specified block will be called synchronously at the time when the above properties are queried. The results are not cached. + /// + /// This provider is optional. It enables localization and formatting of error messages to be done lazily; rather than populating the userInfo at NSError creation time, these keys will be fetched on-demand when asked for. + /// + /// It is expected that only the “owner” of an NSError domain specifies the provider for the domain, and this is done once. This facility is not meant for consumers of errors to customize the userInfo entries. This facility should not be used to customize the behaviors of error domains provided by the system. + /// + /// If an appropriate result for the requested key cannot be provided, return nil rather than choosing to manufacture a generic fallback response such as "Operation could not be completed, error 42." NSError will take care of the fallback cases. + static void setUserInfoValueProviderForDomain_provider_( + NativeCupertinoHttp _lib, + NSErrorDomain errorDomain, + ObjCBlock12 provider) { + return _lib._objc_msgSend_181( + _lib._class_NSError1, + _lib._sel_setUserInfoValueProviderForDomain_provider_1, + errorDomain, + provider._id); } - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - int get countOfBytesClientExpectsToSend { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfBytesClientExpectsToSend1); + static ObjCBlock12 userInfoValueProviderForDomain_(NativeCupertinoHttp _lib, + NSError? err, NSErrorUserInfoKey userInfoKey, NSErrorDomain errorDomain) { + final _ret = _lib._objc_msgSend_182( + _lib._class_NSError1, + _lib._sel_userInfoValueProviderForDomain_1, + err?._id ?? ffi.nullptr, + userInfoKey, + errorDomain); + return ObjCBlock12._(_ret, _lib); } - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - set countOfBytesClientExpectsToSend(int value) { - _lib._objc_msgSend_326( - _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); + static NSError new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); + return NSError._(_ret, _lib, retain: false, release: true); } - int get countOfBytesClientExpectsToReceive { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfBytesClientExpectsToReceive1); + static NSError alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); + return NSError._(_ret, _lib, retain: false, release: true); } +} - set countOfBytesClientExpectsToReceive(int value) { - _lib._objc_msgSend_326( - _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); +typedef NSErrorDomain = ffi.Pointer; + +/// Immutable Dictionary +class NSDictionary extends NSObject { + NSDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDictionary] that points to the same underlying object as [other]. + static NSDictionary castFrom(T other) { + return NSDictionary._(other._id, other._lib, retain: true, release: true); } - /// number of body bytes already received - int get countOfBytesReceived { - return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesReceived1); + /// Returns a [NSDictionary] that wraps the given raw object pointer. + static NSDictionary castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDictionary._(other, lib, retain: retain, release: release); } - /// number of body bytes already sent - int get countOfBytesSent { - return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesSent1); + /// Returns whether [obj] is an instance of [NSDictionary]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); } - /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request - int get countOfBytesExpectedToSend { - return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesExpectedToSend1); + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. - int get countOfBytesExpectedToReceive { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfBytesExpectedToReceive1); + NSObject objectForKey_(NSObject aKey) { + final _ret = _lib._objc_msgSend_91(_id, _lib._sel_objectForKey_1, aKey._id); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - NSString? get taskDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_taskDescription1); + NSEnumerator keyEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_keyEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + @override + NSDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_93( + _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSArray? get allKeys { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allKeys1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSArray._(_ret, _lib, retain: true, release: true); } - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - set taskDescription(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); + NSArray allKeysForObject_(NSObject anObject) { + final _ret = + _lib._objc_msgSend_96(_id, _lib._sel_allKeysForObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// -cancel returns immediately, but marks a task as being canceled. - /// The task will signal -URLSession:task:didCompleteWithError: with an - /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some - /// cases, the task may signal other work before it acknowledges the - /// cancelation. -cancel may be sent to a task that has been suspended. - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + NSArray? get allValues { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allValues1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - /// The current state of the task within the session. - int get state { - return _lib._objc_msgSend_375(_id, _lib._sel_state1); + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - /// The error, if any, delivered via -URLSession:task:didCompleteWithError: - /// This property will be nil in the event that no error occured. - NSError? get error { - final _ret = _lib._objc_msgSend_376(_id, _lib._sel_error1); + NSString? get descriptionInStringsFileFormat { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_descriptionInStringsFileFormat1); return _ret.address == 0 ? null - : NSError._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - /// Suspending a task will prevent the NSURLSession from continuing to - /// load data. There may still be delegate calls made on behalf of - /// this task (for instance, to report data received while suspending) - /// but no further transmissions will be made on behalf of the task - /// until -resume is sent. The timeout timer associated with the task - /// will be disabled while a task is suspended. -suspend and -resume are - /// nestable. - void suspend() { - return _lib._objc_msgSend_1(_id, _lib._sel_suspend1); + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); } - void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + NSString descriptionWithLocale_indent_(NSObject locale, int level) { + final _ret = _lib._objc_msgSend_99( + _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. - /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. - /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - double get priority { - return _lib._objc_msgSend_84(_id, _lib._sel_priority1); + bool isEqualToDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_163(_id, _lib._sel_isEqualToDictionary_1, + otherDictionary?._id ?? ffi.nullptr); } - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. - /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. - /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - set priority(double value) { - _lib._objc_msgSend_377(_id, _lib._sel_setPriority_1, value); + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + NSArray objectsForKeys_notFoundMarker_(NSArray? keys, NSObject marker) { + final _ret = _lib._objc_msgSend_164( + _id, + _lib._sel_objectsForKeys_notFoundMarker_1, + keys?._id ?? ffi.nullptr, + marker._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. - /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - bool get prefersIncrementalDelivery { - return _lib._objc_msgSend_11(_id, _lib._sel_prefersIncrementalDelivery1); + /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. + bool writeToURL_error_( + NSURL? url, ffi.Pointer> error) { + return _lib._objc_msgSend_109( + _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); } - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. - /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - set prefersIncrementalDelivery(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setPrefersIncrementalDelivery_1, value); + NSArray keysSortedByValueUsingSelector_(ffi.Pointer comparator) { + final _ret = _lib._objc_msgSend_107( + _id, _lib._sel_keysSortedByValueUsingSelector_1, comparator); + return NSArray._(_ret, _lib, retain: true, release: true); } - @override - NSURLSessionTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTask._(_ret, _lib, retain: true, release: true); + /// count refers to the number of elements in the dictionary + void getObjects_andKeys_count_(ffi.Pointer> objects, + ffi.Pointer> keys, int count) { + return _lib._objc_msgSend_165( + _id, _lib._sel_getObjects_andKeys_count_1, objects, keys, count); } - static NSURLSessionTask new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + NSObject objectForKeyedSubscript_(NSObject key) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_objectForKeyedSubscript_1, key._id); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + void enumerateKeysAndObjectsUsingBlock_(ObjCBlock10 block) { + return _lib._objc_msgSend_166( + _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); } -} -class NSURLResponse extends NSObject { - NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + void enumerateKeysAndObjectsWithOptions_usingBlock_( + int opts, ObjCBlock10 block) { + return _lib._objc_msgSend_167( + _id, + _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, + opts, + block._id); + } - /// Returns a [NSURLResponse] that points to the same underlying object as [other]. - static NSURLResponse castFrom(T other) { - return NSURLResponse._(other._id, other._lib, retain: true, release: true); + NSArray keysSortedByValueUsingComparator_(NSComparator cmptr) { + final _ret = _lib._objc_msgSend_141( + _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSURLResponse] that wraps the given raw object pointer. - static NSURLResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLResponse._(other, lib, retain: retain, release: release); + NSArray keysSortedByValueWithOptions_usingComparator_( + int opts, NSComparator cmptr) { + final _ret = _lib._objc_msgSend_142(_id, + _lib._sel_keysSortedByValueWithOptions_usingComparator_1, opts, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); + NSObject keysOfEntriesPassingTest_(ObjCBlock11 predicate) { + final _ret = _lib._objc_msgSend_168( + _id, _lib._sel_keysOfEntriesPassingTest_1, predicate._id); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// ! - /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: - /// @abstract Initialize an NSURLResponse with the provided values. - /// @param URL the URL - /// @param MIMEType the MIME content type of the response - /// @param length the expected content length of the associated data - /// @param name the name of the text encoding for the associated data, if applicable, else nil - /// @result The initialized NSURLResponse. - /// @discussion This is the designated initializer for NSURLResponse. - NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - NSURL? URL, NSString? MIMEType, int length, NSString? name) { - final _ret = _lib._objc_msgSend_372( - _id, - _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, - URL?._id ?? ffi.nullptr, - MIMEType?._id ?? ffi.nullptr, - length, - name?._id ?? ffi.nullptr); - return NSURLResponse._(_ret, _lib, retain: true, release: true); + NSObject keysOfEntriesWithOptions_passingTest_( + int opts, ObjCBlock11 predicate) { + final _ret = _lib._objc_msgSend_169(_id, + _lib._sel_keysOfEntriesWithOptions_passingTest_1, opts, predicate._id); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:andKeys:count: + void getObjects_andKeys_(ffi.Pointer> objects, + ffi.Pointer> keys) { + return _lib._objc_msgSend_170( + _id, _lib._sel_getObjects_andKeys_1, objects, keys); } - /// ! - /// @abstract Returns the MIME type of the receiver. - /// @discussion The MIME type is based on the information provided - /// from an origin source. However, that value may be changed or - /// corrected by a protocol implementation if it can be determined - /// that the origin server or source reported the information - /// incorrectly or imprecisely. An attempt to guess the MIME type may - /// be made if the origin source did not report any such information. - /// @result The MIME type of the receiver. - NSString? get MIMEType { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_MIMEType1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. + static NSDictionary dictionaryWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_171(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the expected content length of the receiver. - /// @discussion Some protocol implementations report a content length - /// as part of delivering load metadata, but not all protocols - /// guarantee the amount of data that will be delivered in actuality. - /// Hence, this method returns an expected amount. Clients should use - /// this value as an advisory, and should be prepared to deal with - /// either more or less data. - /// @result The expected content length of the receiver, or -1 if - /// there is no expectation that can be arrived at regarding expected - /// content length. - int get expectedContentLength { - return _lib._objc_msgSend_82(_id, _lib._sel_expectedContentLength1); + static NSDictionary dictionaryWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_172(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the name of the text encoding of the receiver. - /// @discussion This name will be the actual string reported by the - /// origin source during the course of performing a protocol-specific - /// URL load. Clients can inspect this string and convert it to an - /// NSStringEncoding or CFStringEncoding using the methods and - /// functions made available in the appropriate framework. - /// @result The name of the text encoding of the receiver, or nil if no - /// text encoding was specified. - NSString? get textEncodingName { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_textEncodingName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSDictionary initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_171( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns a suggested filename if the resource were saved to disk. - /// @discussion The method first checks if the server has specified a filename using the - /// content disposition header. If no valid filename is specified using that mechanism, - /// this method checks the last path component of the URL. If no valid filename can be - /// obtained using the last path component, this method uses the URL's host as the filename. - /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. - /// In mose cases, this method appends the proper file extension based on the MIME type. - /// This method always returns a valid filename. - /// @result A suggested filename to use if saving the resource to disk. - NSString? get suggestedFilename { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedFilename1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSDictionary initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_172( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSURLResponse new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); } - static NSURLResponse alloc(NativeCupertinoHttp _lib) { + /// the atomically flag is ignored if url of a type that cannot be written atomically. + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } + + static NSDictionary dictionary(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); + return NSDictionary._(_ret, _lib, retain: true, release: true); } -} -abstract class NSURLSessionTaskState { - /// The task is currently being serviced by the session - static const int NSURLSessionTaskStateRunning = 0; - static const int NSURLSessionTaskStateSuspended = 1; + static NSDictionary dictionaryWithObject_forKey_( + NativeCupertinoHttp _lib, NSObject object, NSObject key) { + final _ret = _lib._objc_msgSend_173(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. - static const int NSURLSessionTaskStateCanceling = 2; + static NSDictionary dictionaryWithObjects_forKeys_count_( + NativeCupertinoHttp _lib, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_93(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - /// The task has completed and the session will receive no more delegate notifications - static const int NSURLSessionTaskStateCompleted = 3; -} + static NSDictionary dictionaryWithObjectsAndKeys_( + NativeCupertinoHttp _lib, NSObject firstObject) { + final _ret = _lib._objc_msgSend_91(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock19_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} + static NSDictionary dictionaryWithDictionary_( + NativeCupertinoHttp _lib, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_174(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } -final _ObjCBlock19_closureRegistry = {}; -int _ObjCBlock19_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock19_registerClosure(Function fn) { - final id = ++_ObjCBlock19_closureRegistryIndex; - _ObjCBlock19_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static NSDictionary dictionaryWithObjects_forKeys_( + NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_175( + _lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock19_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock19_closureRegistry[block.ref.target.address]!(arg0); -} + NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock19 extends _ObjCBlockBase { - ObjCBlock19._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + NSDictionary initWithDictionary_(NSDictionary? otherDictionary) { + final _ret = _lib._objc_msgSend_174(_id, _lib._sel_initWithDictionary_1, + otherDictionary?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock19.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock19_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + NSDictionary initWithDictionary_copyItems_( + NSDictionary? otherDictionary, bool flag) { + final _ret = _lib._objc_msgSend_176( + _id, + _lib._sel_initWithDictionary_copyItems_1, + otherDictionary?._id ?? ffi.nullptr, + flag); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock19.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock19_closureTrampoline) - .cast(), - _ObjCBlock19_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); + NSDictionary initWithObjects_forKeys_(NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_175( + _id, + _lib._sel_initWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// Reads dictionary stored in NSPropertyList format from the specified url. + NSDictionary initWithContentsOfURL_error_( + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_177( + _id, + _lib._sel_initWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } -class CFArrayCallBacks extends ffi.Struct { - @CFIndex() - external int version; + /// Reads dictionary stored in NSPropertyList format from the specified url. + static NSDictionary dictionaryWithContentsOfURL_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_177( + _lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - external CFArrayRetainCallBack retain; + /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. + /// The keys are copied from the array and must be copyable. + /// If the array parameter is nil or not an NSArray, an exception is thrown. + /// If the array of keys is empty, an empty key set is returned. + /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). + /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. + /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. + static NSObject sharedKeySetForKeys_( + NativeCupertinoHttp _lib, NSArray? keys) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSDictionary1, + _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external CFArrayReleaseCallBack release; + int countByEnumeratingWithState_objects_count_( + ffi.Pointer state, + ffi.Pointer> buffer, + int len) { + return _lib._objc_msgSend_178( + _id, + _lib._sel_countByEnumeratingWithState_objects_count_1, + state, + buffer, + len); + } - external CFArrayCopyDescriptionCallBack copyDescription; + static NSDictionary new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } - external CFArrayEqualCallBack equal; + static NSDictionary alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } } -typedef CFArrayRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFArrayReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFArrayCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFArrayEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>>; - -class __CFArray extends ffi.Opaque {} - -typedef CFArrayRef = ffi.Pointer<__CFArray>; -typedef CFMutableArrayRef = ffi.Pointer<__CFArray>; -typedef CFArrayApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFComparatorFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>; - -class OS_object extends NSObject { - OS_object._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSEnumerator extends NSObject { + NSEnumerator._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [OS_object] that points to the same underlying object as [other]. - static OS_object castFrom(T other) { - return OS_object._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSEnumerator] that points to the same underlying object as [other]. + static NSEnumerator castFrom(T other) { + return NSEnumerator._(other._id, other._lib, retain: true, release: true); } - /// Returns a [OS_object] that wraps the given raw object pointer. - static OS_object castFromPointer( + /// Returns a [NSEnumerator] that wraps the given raw object pointer. + static NSEnumerator castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return OS_object._(other, lib, retain: retain, release: release); + return NSEnumerator._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [OS_object]. + /// Returns whether [obj] is an instance of [NSEnumerator]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_OS_object1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSEnumerator1); } - @override - OS_object init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_object._(_ret, _lib, retain: true, release: true); + NSObject nextObject() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nextObject1); + return NSObject._(_ret, _lib, retain: true, release: true); } - static OS_object new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_new1); - return OS_object._(_ret, _lib, retain: false, release: true); + NSObject? get allObjects { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static OS_object alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_alloc1); - return OS_object._(_ret, _lib, retain: false, release: true); + static NSEnumerator new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); + return NSEnumerator._(_ret, _lib, retain: false, release: true); } -} - -class __SecCertificate extends ffi.Opaque {} -class __SecIdentity extends ffi.Opaque {} - -class __SecKey extends ffi.Opaque {} + static NSEnumerator alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); + return NSEnumerator._(_ret, _lib, retain: false, release: true); + } +} -class __SecPolicy extends ffi.Opaque {} +/// Immutable Array +class NSArray extends NSObject { + NSArray._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class __SecAccessControl extends ffi.Opaque {} + /// Returns a [NSArray] that points to the same underlying object as [other]. + static NSArray castFrom(T other) { + return NSArray._(other._id, other._lib, retain: true, release: true); + } -class __SecKeychain extends ffi.Opaque {} + /// Returns a [NSArray] that wraps the given raw object pointer. + static NSArray castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSArray._(other, lib, retain: retain, release: release); + } -class __SecKeychainItem extends ffi.Opaque {} + /// Returns whether [obj] is an instance of [NSArray]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); + } -class __SecKeychainSearch extends ffi.Opaque {} + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); + } -class SecKeychainAttribute extends ffi.Struct { - @SecKeychainAttrType() - external int tag; + NSObject objectAtIndex_(int index) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndex_1, index); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @UInt32() - external int length; + @override + NSArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer data; -} + NSArray initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_95( + _id, _lib._sel_initWithObjects_count_1, objects, cnt); + return NSArray._(_ret, _lib, retain: true, release: true); + } -typedef SecKeychainAttrType = OSType; -typedef OSType = FourCharCode; -typedef FourCharCode = UInt32; + NSArray initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } -class SecKeychainAttributeList extends ffi.Struct { - @UInt32() - external int count; + NSArray arrayByAddingObject_(NSObject anObject) { + final _ret = _lib._objc_msgSend_96( + _id, _lib._sel_arrayByAddingObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer attr; -} + NSArray arrayByAddingObjectsFromArray_(NSArray? otherArray) { + final _ret = _lib._objc_msgSend_97( + _id, + _lib._sel_arrayByAddingObjectsFromArray_1, + otherArray?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } -class __SecTrustedApplication extends ffi.Opaque {} + NSString componentsJoinedByString_(NSString? separator) { + final _ret = _lib._objc_msgSend_98(_id, + _lib._sel_componentsJoinedByString_1, separator?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } -class __SecAccess extends ffi.Opaque {} + bool containsObject_(NSObject anObject) { + return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); + } -class __SecACL extends ffi.Opaque {} + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -class __SecPassword extends ffi.Opaque {} + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } -class SecKeychainAttributeInfo extends ffi.Struct { - @UInt32() - external int count; + NSString descriptionWithLocale_indent_(NSObject locale, int level) { + final _ret = _lib._objc_msgSend_99( + _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); + return NSString._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer tag; + NSObject firstObjectCommonWithArray_(NSArray? otherArray) { + final _ret = _lib._objc_msgSend_100(_id, + _lib._sel_firstObjectCommonWithArray_1, otherArray?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer format; -} + void getObjects_range_( + ffi.Pointer> objects, NSRange range) { + return _lib._objc_msgSend_101( + _id, _lib._sel_getObjects_range_1, objects, range); + } -typedef OSStatus = SInt32; + int indexOfObject_(NSObject anObject) { + return _lib._objc_msgSend_102(_id, _lib._sel_indexOfObject_1, anObject._id); + } -class _RuneEntry extends ffi.Struct { - @__darwin_rune_t() - external int __min; + int indexOfObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_103( + _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); + } - @__darwin_rune_t() - external int __max; + int indexOfObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_102( + _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); + } - @__darwin_rune_t() - external int __map; + int indexOfObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_103( + _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); + } - external ffi.Pointer<__uint32_t> __types; -} + bool isEqualToArray_(NSArray? otherArray) { + return _lib._objc_msgSend_104( + _id, _lib._sel_isEqualToArray_1, otherArray?._id ?? ffi.nullptr); + } -typedef __darwin_rune_t = __darwin_wchar_t; -typedef __darwin_wchar_t = ffi.Int; -typedef __uint32_t = ffi.UnsignedInt; + NSObject get firstObject { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_firstObject1); + return NSObject._(_ret, _lib, retain: true, release: true); + } -class _RuneRange extends ffi.Struct { - @ffi.Int() - external int __nranges; + NSObject get lastObject { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_lastObject1); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer<_RuneEntry> __ranges; -} + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } -class _RuneCharClass extends ffi.Struct { - @ffi.Array.multi([14]) - external ffi.Array __name; + NSEnumerator reverseObjectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_reverseObjectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } - @__uint32_t() - external int __mask; -} + NSData? get sortedArrayHint { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_sortedArrayHint1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } -class _RuneLocale extends ffi.Struct { - @ffi.Array.multi([8]) - external ffi.Array __magic; + NSArray sortedArrayUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context) { + final _ret = _lib._objc_msgSend_105( + _id, _lib._sel_sortedArrayUsingFunction_context_1, comparator, context); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Array.multi([32]) - external ffi.Array __encoding; + NSArray sortedArrayUsingFunction_context_hint_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + NSData? hint) { + final _ret = _lib._objc_msgSend_106( + _id, + _lib._sel_sortedArrayUsingFunction_context_hint_1, + comparator, + context, + hint?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - __darwin_rune_t Function(ffi.Pointer, __darwin_size_t, - ffi.Pointer>)>> __sgetrune; + NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { + final _ret = _lib._objc_msgSend_107( + _id, _lib._sel_sortedArrayUsingSelector_1, comparator); + return NSArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(__darwin_rune_t, ffi.Pointer, - __darwin_size_t, ffi.Pointer>)>> __sputrune; + NSArray subarrayWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_108(_id, _lib._sel_subarrayWithRange_1, range); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @__darwin_rune_t() - external int __invalid_rune; + /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. + bool writeToURL_error_( + NSURL? url, ffi.Pointer> error) { + return _lib._objc_msgSend_109( + _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); + } - @ffi.Array.multi([256]) - external ffi.Array<__uint32_t> __runetype; + void makeObjectsPerformSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_7( + _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); + } - @ffi.Array.multi([256]) - external ffi.Array<__darwin_rune_t> __maplower; + void makeObjectsPerformSelector_withObject_( + ffi.Pointer aSelector, NSObject argument) { + return _lib._objc_msgSend_110( + _id, + _lib._sel_makeObjectsPerformSelector_withObject_1, + aSelector, + argument._id); + } - @ffi.Array.multi([256]) - external ffi.Array<__darwin_rune_t> __mapupper; + NSArray objectsAtIndexes_(NSIndexSet? indexes) { + final _ret = _lib._objc_msgSend_131( + _id, _lib._sel_objectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - external _RuneRange __runetype_ext; + NSObject objectAtIndexedSubscript_(int idx) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndexedSubscript_1, idx); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external _RuneRange __maplower_ext; + void enumerateObjectsUsingBlock_(ObjCBlock5 block) { + return _lib._objc_msgSend_132( + _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); + } - external _RuneRange __mapupper_ext; + void enumerateObjectsWithOptions_usingBlock_(int opts, ObjCBlock5 block) { + return _lib._objc_msgSend_133(_id, + _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); + } - external ffi.Pointer __variable; + void enumerateObjectsAtIndexes_options_usingBlock_( + NSIndexSet? s, int opts, ObjCBlock5 block) { + return _lib._objc_msgSend_134( + _id, + _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, + s?._id ?? ffi.nullptr, + opts, + block._id); + } - @ffi.Int() - external int __variable_len; + int indexOfObjectPassingTest_(ObjCBlock6 predicate) { + return _lib._objc_msgSend_135( + _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); + } - @ffi.Int() - external int __ncharclasses; + int indexOfObjectWithOptions_passingTest_(int opts, ObjCBlock6 predicate) { + return _lib._objc_msgSend_136(_id, + _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); + } - external ffi.Pointer<_RuneCharClass> __charclasses; -} + int indexOfObjectAtIndexes_options_passingTest_( + NSIndexSet? s, int opts, ObjCBlock6 predicate) { + return _lib._objc_msgSend_137( + _id, + _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, + s?._id ?? ffi.nullptr, + opts, + predicate._id); + } -typedef __darwin_size_t = ffi.UnsignedLong; -typedef __darwin_ct_rune_t = ffi.Int; + NSIndexSet indexesOfObjectsPassingTest_(ObjCBlock6 predicate) { + final _ret = _lib._objc_msgSend_138( + _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } -class lconv extends ffi.Struct { - external ffi.Pointer decimal_point; + NSIndexSet indexesOfObjectsWithOptions_passingTest_( + int opts, ObjCBlock6 predicate) { + final _ret = _lib._objc_msgSend_139( + _id, + _lib._sel_indexesOfObjectsWithOptions_passingTest_1, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer thousands_sep; + NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( + NSIndexSet? s, int opts, ObjCBlock6 predicate) { + final _ret = _lib._objc_msgSend_140( + _id, + _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, + s?._id ?? ffi.nullptr, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer grouping; + NSArray sortedArrayUsingComparator_(NSComparator cmptr) { + final _ret = _lib._objc_msgSend_141( + _id, _lib._sel_sortedArrayUsingComparator_1, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer int_curr_symbol; + NSArray sortedArrayWithOptions_usingComparator_( + int opts, NSComparator cmptr) { + final _ret = _lib._objc_msgSend_142( + _id, _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer currency_symbol; + /// binary search + int indexOfObject_inSortedRange_options_usingComparator_( + NSObject obj, NSRange r, int opts, NSComparator cmp) { + return _lib._objc_msgSend_143( + _id, + _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, + obj._id, + r, + opts, + cmp); + } - external ffi.Pointer mon_decimal_point; + static NSArray array(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); + return NSArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer mon_thousands_sep; + static NSArray arrayWithObject_(NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer mon_grouping; + static NSArray arrayWithObjects_count_(NativeCupertinoHttp _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_95( + _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); + return NSArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer positive_sign; + static NSArray arrayWithObjects_( + NativeCupertinoHttp _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer negative_sign; + static NSArray arrayWithArray_(NativeCupertinoHttp _lib, NSArray? array) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSArray1, + _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Char() - external int int_frac_digits; + NSArray initWithObjects_(NSObject firstObj) { + final _ret = + _lib._objc_msgSend_91(_id, _lib._sel_initWithObjects_1, firstObj._id); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Char() - external int frac_digits; + NSArray initWithArray_(NSArray? array) { + final _ret = _lib._objc_msgSend_100( + _id, _lib._sel_initWithArray_1, array?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Char() - external int p_cs_precedes; + NSArray initWithArray_copyItems_(NSArray? array, bool flag) { + final _ret = _lib._objc_msgSend_144(_id, + _lib._sel_initWithArray_copyItems_1, array?._id ?? ffi.nullptr, flag); + return NSArray._(_ret, _lib, retain: false, release: true); + } - @ffi.Char() - external int p_sep_by_space; + /// Reads array stored in NSPropertyList format from the specified url. + NSArray initWithContentsOfURL_error_( + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_145( + _id, + _lib._sel_initWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Char() - external int n_cs_precedes; + /// Reads array stored in NSPropertyList format from the specified url. + static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_145( + _lib._class_NSArray1, + _lib._sel_arrayWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Char() - external int n_sep_by_space; + NSOrderedCollectionDifference + differenceFromArray_withOptions_usingEquivalenceTest_( + NSArray? other, int options, ObjCBlock9 block) { + final _ret = _lib._objc_msgSend_154( + _id, + _lib._sel_differenceFromArray_withOptions_usingEquivalenceTest_1, + other?._id ?? ffi.nullptr, + options, + block._id); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } - @ffi.Char() - external int p_sign_posn; + NSOrderedCollectionDifference differenceFromArray_withOptions_( + NSArray? other, int options) { + final _ret = _lib._objc_msgSend_155( + _id, + _lib._sel_differenceFromArray_withOptions_1, + other?._id ?? ffi.nullptr, + options); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } - @ffi.Char() - external int n_sign_posn; + /// Uses isEqual: to determine the difference between the parameter and the receiver + NSOrderedCollectionDifference differenceFromArray_(NSArray? other) { + final _ret = _lib._objc_msgSend_156( + _id, _lib._sel_differenceFromArray_1, other?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } - @ffi.Char() - external int int_p_cs_precedes; + NSArray arrayByApplyingDifference_( + NSOrderedCollectionDifference? difference) { + final _ret = _lib._objc_msgSend_157(_id, + _lib._sel_arrayByApplyingDifference_1, difference?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Char() - external int int_n_cs_precedes; + /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead. + void getObjects_(ffi.Pointer> objects) { + return _lib._objc_msgSend_158(_id, _lib._sel_getObjects_1, objects); + } - @ffi.Char() - external int int_p_sep_by_space; + /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. + static NSArray arrayWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_159(_lib._class_NSArray1, + _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Char() - external int int_n_sep_by_space; + static NSArray arrayWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_160(_lib._class_NSArray1, + _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Char() - external int int_p_sign_posn; + NSArray initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_159( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Char() - external int int_n_sign_posn; -} + NSArray initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_160( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } -class __float2 extends ffi.Struct { - @ffi.Float() - external double __sinval; + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } - @ffi.Float() - external double __cosval; -} + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } -class __double2 extends ffi.Struct { - @ffi.Double() - external double __sinval; + static NSArray new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); + return NSArray._(_ret, _lib, retain: false, release: true); + } - @ffi.Double() - external double __cosval; + static NSArray alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); + return NSArray._(_ret, _lib, retain: false, release: true); + } } -class exception extends ffi.Struct { - @ffi.Int() - external int type; +class NSIndexSet extends NSObject { + NSIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external ffi.Pointer name; + /// Returns a [NSIndexSet] that points to the same underlying object as [other]. + static NSIndexSet castFrom(T other) { + return NSIndexSet._(other._id, other._lib, retain: true, release: true); + } - @ffi.Double() - external double arg1; + /// Returns a [NSIndexSet] that wraps the given raw object pointer. + static NSIndexSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSIndexSet._(other, lib, retain: retain, release: release); + } - @ffi.Double() - external double arg2; + /// Returns whether [obj] is an instance of [NSIndexSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); + } - @ffi.Double() - external double retval; -} + static NSIndexSet indexSet(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } -class __darwin_arm_exception_state extends ffi.Struct { - @__uint32_t() - external int __exception; + static NSIndexSet indexSetWithIndex_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } - @__uint32_t() - external int __fsr; + static NSIndexSet indexSetWithIndexesInRange_( + NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_111( + _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } - @__uint32_t() - external int __far; -} + NSIndexSet initWithIndexesInRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_111(_id, _lib._sel_initWithIndexesInRange_1, range); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } -class __darwin_arm_exception_state64 extends ffi.Struct { - @__uint64_t() - external int __far; + NSIndexSet initWithIndexSet_(NSIndexSet? indexSet) { + final _ret = _lib._objc_msgSend_112( + _id, _lib._sel_initWithIndexSet_1, indexSet?._id ?? ffi.nullptr); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } - @__uint32_t() - external int __esr; + NSIndexSet initWithIndex_(int value) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithIndex_1, value); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } - @__uint32_t() - external int __exception; -} + bool isEqualToIndexSet_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_113( + _id, _lib._sel_isEqualToIndexSet_1, indexSet?._id ?? ffi.nullptr); + } -typedef __uint64_t = ffi.UnsignedLongLong; + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); + } -class __darwin_arm_thread_state extends ffi.Struct { - @ffi.Array.multi([13]) - external ffi.Array<__uint32_t> __r; + int get firstIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); + } - @__uint32_t() - external int __sp; + int get lastIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); + } - @__uint32_t() - external int __lr; + int indexGreaterThanIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexGreaterThanIndex_1, value); + } - @__uint32_t() - external int __pc; + int indexLessThanIndex_(int value) { + return _lib._objc_msgSend_114(_id, _lib._sel_indexLessThanIndex_1, value); + } - @__uint32_t() - external int __cpsr; -} + int indexGreaterThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); + } -class __darwin_arm_thread_state64 extends ffi.Struct { - @ffi.Array.multi([29]) - external ffi.Array<__uint64_t> __x; + int indexLessThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); + } - @__uint64_t() - external int __fp; + int getIndexes_maxCount_inIndexRange_(ffi.Pointer indexBuffer, + int bufferSize, NSRangePointer range) { + return _lib._objc_msgSend_115( + _id, + _lib._sel_getIndexes_maxCount_inIndexRange_1, + indexBuffer, + bufferSize, + range); + } - @__uint64_t() - external int __lr; + int countOfIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_116( + _id, _lib._sel_countOfIndexesInRange_1, range); + } - @__uint64_t() - external int __sp; + bool containsIndex_(int value) { + return _lib._objc_msgSend_117(_id, _lib._sel_containsIndex_1, value); + } - @__uint64_t() - external int __pc; + bool containsIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_118( + _id, _lib._sel_containsIndexesInRange_1, range); + } - @__uint32_t() - external int __cpsr; + bool containsIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_113( + _id, _lib._sel_containsIndexes_1, indexSet?._id ?? ffi.nullptr); + } - @__uint32_t() - external int __pad; -} + bool intersectsIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_118( + _id, _lib._sel_intersectsIndexesInRange_1, range); + } -class __darwin_arm_vfp_state extends ffi.Struct { - @ffi.Array.multi([64]) - external ffi.Array<__uint32_t> __r; + void enumerateIndexesUsingBlock_(ObjCBlock2 block) { + return _lib._objc_msgSend_119( + _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); + } - @__uint32_t() - external int __fpscr; -} + void enumerateIndexesWithOptions_usingBlock_(int opts, ObjCBlock2 block) { + return _lib._objc_msgSend_120(_id, + _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); + } -class __darwin_arm_neon_state64 extends ffi.Opaque {} + void enumerateIndexesInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock2 block) { + return _lib._objc_msgSend_121( + _id, + _lib._sel_enumerateIndexesInRange_options_usingBlock_1, + range, + opts, + block._id); + } -class __darwin_arm_neon_state extends ffi.Opaque {} + int indexPassingTest_(ObjCBlock3 predicate) { + return _lib._objc_msgSend_122( + _id, _lib._sel_indexPassingTest_1, predicate._id); + } -class __arm_pagein_state extends ffi.Struct { - @ffi.Int() - external int __pagein_error; -} + int indexWithOptions_passingTest_(int opts, ObjCBlock3 predicate) { + return _lib._objc_msgSend_123( + _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); + } -class __arm_legacy_debug_state extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bvr; + int indexInRange_options_passingTest_( + NSRange range, int opts, ObjCBlock3 predicate) { + return _lib._objc_msgSend_124( + _id, + _lib._sel_indexInRange_options_passingTest_1, + range, + opts, + predicate._id); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bcr; + NSIndexSet indexesPassingTest_(ObjCBlock3 predicate) { + final _ret = _lib._objc_msgSend_125( + _id, _lib._sel_indexesPassingTest_1, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wvr; + NSIndexSet indexesWithOptions_passingTest_(int opts, ObjCBlock3 predicate) { + final _ret = _lib._objc_msgSend_126( + _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wcr; -} + NSIndexSet indexesInRange_options_passingTest_( + NSRange range, int opts, ObjCBlock3 predicate) { + final _ret = _lib._objc_msgSend_127( + _id, + _lib._sel_indexesInRange_options_passingTest_1, + range, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } -class __darwin_arm_debug_state32 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bvr; + void enumerateRangesUsingBlock_(ObjCBlock4 block) { + return _lib._objc_msgSend_128( + _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bcr; + void enumerateRangesWithOptions_usingBlock_(int opts, ObjCBlock4 block) { + return _lib._objc_msgSend_129(_id, + _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wvr; + void enumerateRangesInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock4 block) { + return _lib._objc_msgSend_130( + _id, + _lib._sel_enumerateRangesInRange_options_usingBlock_1, + range, + opts, + block._id); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wcr; + static NSIndexSet new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); + return NSIndexSet._(_ret, _lib, retain: false, release: true); + } - @__uint64_t() - external int __mdscr_el1; + static NSIndexSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); + return NSIndexSet._(_ret, _lib, retain: false, release: true); + } } -class __darwin_arm_debug_state64 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __bvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __bcr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __wvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __wcr; +typedef NSRangePointer = ffi.Pointer; +void _ObjCBlock2_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); +} - @__uint64_t() - external int __mdscr_el1; +final _ObjCBlock2_closureRegistry = {}; +int _ObjCBlock2_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock2_registerClosure(Function fn) { + final id = ++_ObjCBlock2_closureRegistryIndex; + _ObjCBlock2_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class __darwin_arm_cpmu_state64 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __ctrs; +void _ObjCBlock2_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return _ObjCBlock2_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class __darwin_mcontext32 extends ffi.Struct { - external __darwin_arm_exception_state __es; +class ObjCBlock2 extends _ObjCBlockBase { + ObjCBlock2._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external __darwin_arm_thread_state __ss; + /// Creates a block from a C function pointer. + ObjCBlock2.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + NSUInteger arg0, ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock2_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external __darwin_arm_vfp_state __fs; + /// Creates a block from a Dart function. + ObjCBlock2.fromFunction(NativeCupertinoHttp lib, + void Function(int arg0, ffi.Pointer arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock2_closureTrampoline) + .cast(), + _ObjCBlock2_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(int arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, int arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; } -class __darwin_mcontext64 extends ffi.Opaque {} +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; +} -class __darwin_sigaltstack extends ffi.Struct { - external ffi.Pointer ss_sp; +bool _ObjCBlock3_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + bool Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); +} - @__darwin_size_t() - external int ss_size; +final _ObjCBlock3_closureRegistry = {}; +int _ObjCBlock3_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock3_registerClosure(Function fn) { + final id = ++_ObjCBlock3_closureRegistryIndex; + _ObjCBlock3_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Int() - external int ss_flags; +bool _ObjCBlock3_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return _ObjCBlock3_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class __darwin_ucontext extends ffi.Struct { - @ffi.Int() - external int uc_onstack; +class ObjCBlock3 extends _ObjCBlockBase { + ObjCBlock3._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @__darwin_sigset_t() - external int uc_sigmask; + /// Creates a block from a C function pointer. + ObjCBlock3.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock3_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external __darwin_sigaltstack uc_stack; + /// Creates a block from a Dart function. + ObjCBlock3.fromFunction(NativeCupertinoHttp lib, + bool Function(int arg0, ffi.Pointer arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock3_closureTrampoline, false) + .cast(), + _ObjCBlock3_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call(int arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer<_ObjCBlock> block, int arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } - external ffi.Pointer<__darwin_ucontext> uc_link; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - @__darwin_size_t() - external int uc_mcsize; +void _ObjCBlock4_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function( + NSRange arg0, ffi.Pointer arg1)>()(arg0, arg1); +} - external ffi.Pointer<__darwin_mcontext64> uc_mcontext; +final _ObjCBlock4_closureRegistry = {}; +int _ObjCBlock4_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock4_registerClosure(Function fn) { + final id = ++_ObjCBlock4_closureRegistryIndex; + _ObjCBlock4_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -typedef __darwin_sigset_t = __uint32_t; +void _ObjCBlock4_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { + return _ObjCBlock4_closureRegistry[block.ref.target.address]!(arg0, arg1); +} -class sigval extends ffi.Union { - @ffi.Int() - external int sival_int; +class ObjCBlock4 extends _ObjCBlockBase { + ObjCBlock4._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external ffi.Pointer sival_ptr; -} + /// Creates a block from a C function pointer. + ObjCBlock4.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSRange arg0, ffi.Pointer arg1)>( + _ObjCBlock4_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -class sigevent extends ffi.Struct { - @ffi.Int() - external int sigev_notify; + /// Creates a block from a Dart function. + ObjCBlock4.fromFunction(NativeCupertinoHttp lib, + void Function(NSRange arg0, ffi.Pointer arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSRange arg0, ffi.Pointer arg1)>( + _ObjCBlock4_closureTrampoline) + .cast(), + _ObjCBlock4_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(NSRange arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } - @ffi.Int() - external int sigev_signo; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - external sigval sigev_value; +void _ObjCBlock5_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} - external ffi.Pointer> - sigev_notify_function; +final _ObjCBlock5_closureRegistry = {}; +int _ObjCBlock5_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock5_registerClosure(Function fn) { + final id = ++_ObjCBlock5_closureRegistryIndex; + _ObjCBlock5_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external ffi.Pointer sigev_notify_attributes; +void _ObjCBlock5_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _ObjCBlock5_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); } -typedef pthread_attr_t = __darwin_pthread_attr_t; -typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; +class ObjCBlock5 extends _ObjCBlockBase { + ObjCBlock5._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class __siginfo extends ffi.Struct { - @ffi.Int() - external int si_signo; + /// Creates a block from a C function pointer. + ObjCBlock5.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + NSUInteger arg1, ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock5_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Int() - external int si_errno; + /// Creates a block from a Dart function. + ObjCBlock5.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock5_closureTrampoline) + .cast(), + _ObjCBlock5_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } - @ffi.Int() - external int si_code; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - @pid_t() - external int si_pid; +bool _ObjCBlock6_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} - @uid_t() - external int si_uid; +final _ObjCBlock6_closureRegistry = {}; +int _ObjCBlock6_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock6_registerClosure(Function fn) { + final id = ++_ObjCBlock6_closureRegistryIndex; + _ObjCBlock6_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Int() - external int si_status; +bool _ObjCBlock6_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _ObjCBlock6_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - external ffi.Pointer si_addr; +class ObjCBlock6 extends _ObjCBlockBase { + ObjCBlock6._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external sigval si_value; + /// Creates a block from a C function pointer. + ObjCBlock6.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + NSUInteger arg1, ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock6_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Long() - external int si_band; + /// Creates a block from a Dart function. + ObjCBlock6.fromFunction( + NativeCupertinoHttp lib, + bool Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock6_closureTrampoline, false) + .cast(), + _ObjCBlock6_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call( + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } - @ffi.Array.multi([7]) - external ffi.Array __pad; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef pid_t = __darwin_pid_t; -typedef __darwin_pid_t = __int32_t; -typedef uid_t = __darwin_uid_t; -typedef __darwin_uid_t = __uint32_t; - -class __sigaction_u extends ffi.Union { - external ffi.Pointer> - __sa_handler; - - external ffi.Pointer< +typedef NSComparator = ffi.Pointer<_ObjCBlock>; +int _ObjCBlock7_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer)>> - __sa_sigaction; + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); } -class __sigaction extends ffi.Struct { - external __sigaction_u __sigaction_u1; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer, ffi.Pointer)>> sa_tramp; - - @sigset_t() - external int sa_mask; +final _ObjCBlock7_closureRegistry = {}; +int _ObjCBlock7_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock7_registerClosure(Function fn) { + final id = ++_ObjCBlock7_closureRegistryIndex; + _ObjCBlock7_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Int() - external int sa_flags; +int _ObjCBlock7_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock7_closureRegistry[block.ref.target.address]!(arg0, arg1); } -typedef siginfo_t = __siginfo; -typedef sigset_t = __darwin_sigset_t; +class ObjCBlock7 extends _ObjCBlockBase { + ObjCBlock7._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class sigaction extends ffi.Struct { - external __sigaction_u __sigaction_u1; + /// Creates a block from a C function pointer. + ObjCBlock7.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock7_fnPtrTrampoline, 0) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @sigset_t() - external int sa_mask; + /// Creates a block from a Dart function. + ObjCBlock7.fromFunction( + NativeCupertinoHttp lib, + int Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock7_closureTrampoline, 0) + .cast(), + _ObjCBlock7_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + int call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } - @ffi.Int() - external int sa_flags; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -class sigvec extends ffi.Struct { - external ffi.Pointer> - sv_handler; - - @ffi.Int() - external int sv_mask; - - @ffi.Int() - external int sv_flags; +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; } -class sigstack extends ffi.Struct { - external ffi.Pointer ss_sp; - - @ffi.Int() - external int ss_onstack; +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; } -typedef pthread_t = __darwin_pthread_t; -typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; -typedef stack_t = __darwin_sigaltstack; +class NSOrderedCollectionDifference extends NSObject { + NSOrderedCollectionDifference._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class __sbuf extends ffi.Struct { - external ffi.Pointer _base; + /// Returns a [NSOrderedCollectionDifference] that points to the same underlying object as [other]. + static NSOrderedCollectionDifference castFrom( + T other) { + return NSOrderedCollectionDifference._(other._id, other._lib, + retain: true, release: true); + } - @ffi.Int() - external int _size; -} + /// Returns a [NSOrderedCollectionDifference] that wraps the given raw object pointer. + static NSOrderedCollectionDifference castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOrderedCollectionDifference._(other, lib, + retain: retain, release: release); + } -class __sFILEX extends ffi.Opaque {} + /// Returns whether [obj] is an instance of [NSOrderedCollectionDifference]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOrderedCollectionDifference1); + } -class __sFILE extends ffi.Struct { - external ffi.Pointer _p; + NSOrderedCollectionDifference initWithChanges_(NSObject? changes) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_initWithChanges_1, changes?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } - @ffi.Int() - external int _r; + NSOrderedCollectionDifference + initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_( + NSIndexSet? inserts, + NSObject? insertedObjects, + NSIndexSet? removes, + NSObject? removedObjects, + NSObject? changes) { + final _ret = _lib._objc_msgSend_146( + _id, + _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1, + inserts?._id ?? ffi.nullptr, + insertedObjects?._id ?? ffi.nullptr, + removes?._id ?? ffi.nullptr, + removedObjects?._id ?? ffi.nullptr, + changes?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } - @ffi.Int() - external int _w; + NSOrderedCollectionDifference + initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_( + NSIndexSet? inserts, + NSObject? insertedObjects, + NSIndexSet? removes, + NSObject? removedObjects) { + final _ret = _lib._objc_msgSend_147( + _id, + _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1, + inserts?._id ?? ffi.nullptr, + insertedObjects?._id ?? ffi.nullptr, + removes?._id ?? ffi.nullptr, + removedObjects?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } - @ffi.Short() - external int _flags; + NSObject? get insertions { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_insertions1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Short() - external int _file; + NSObject? get removals { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_removals1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } - external __sbuf _bf; + bool get hasChanges { + return _lib._objc_msgSend_11(_id, _lib._sel_hasChanges1); + } - @ffi.Int() - external int _lbfsize; + NSOrderedCollectionDifference differenceByTransformingChangesWithBlock_( + ObjCBlock8 block) { + final _ret = _lib._objc_msgSend_153( + _id, _lib._sel_differenceByTransformingChangesWithBlock_1, block._id); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } - external ffi.Pointer _cookie; + NSOrderedCollectionDifference inverseDifference() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_inverseDifference1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } - external ffi - .Pointer)>> - _close; + static NSOrderedCollectionDifference new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionDifference1, _lib._sel_new1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: false, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> _read; + static NSOrderedCollectionDifference alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionDifference1, _lib._sel_alloc1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: false, release: true); + } +} - external ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> _seek; +ffi.Pointer _ObjCBlock8_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>()(arg0); +} - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> _write; +final _ObjCBlock8_closureRegistry = {}; +int _ObjCBlock8_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock8_registerClosure(Function fn) { + final id = ++_ObjCBlock8_closureRegistryIndex; + _ObjCBlock8_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external __sbuf _ub; +ffi.Pointer _ObjCBlock8_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock8_closureRegistry[block.ref.target.address]!(arg0); +} - external ffi.Pointer<__sFILEX> _extra; +class ObjCBlock8 extends _ObjCBlockBase { + ObjCBlock8._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Int() - external int _ur; + /// Creates a block from a C function pointer. + ObjCBlock8.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock8_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Array.multi([3]) - external ffi.Array _ubuf; + /// Creates a block from a Dart function. + ObjCBlock8.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock8_closureTrampoline) + .cast(), + _ObjCBlock8_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } - @ffi.Array.multi([1]) - external ffi.Array _nbuf; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - external __sbuf _lb; +class NSOrderedCollectionChange extends NSObject { + NSOrderedCollectionChange._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Int() - external int _blksize; + /// Returns a [NSOrderedCollectionChange] that points to the same underlying object as [other]. + static NSOrderedCollectionChange castFrom(T other) { + return NSOrderedCollectionChange._(other._id, other._lib, + retain: true, release: true); + } - @fpos_t() - external int _offset; -} + /// Returns a [NSOrderedCollectionChange] that wraps the given raw object pointer. + static NSOrderedCollectionChange castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOrderedCollectionChange._(other, lib, + retain: retain, release: release); + } -typedef fpos_t = __darwin_off_t; -typedef __darwin_off_t = __int64_t; -typedef __int64_t = ffi.LongLong; -typedef FILE = __sFILE; -typedef off_t = __darwin_off_t; -typedef ssize_t = __darwin_ssize_t; -typedef __darwin_ssize_t = ffi.Long; + /// Returns whether [obj] is an instance of [NSOrderedCollectionChange]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOrderedCollectionChange1); + } -abstract class idtype_t { - static const int P_ALL = 0; - static const int P_PID = 1; - static const int P_PGID = 2; -} + static NSOrderedCollectionChange changeWithObject_type_index_( + NativeCupertinoHttp _lib, NSObject anObject, int type, int index) { + final _ret = _lib._objc_msgSend_148(_lib._class_NSOrderedCollectionChange1, + _lib._sel_changeWithObject_type_index_1, anObject._id, type, index); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + } -class timeval extends ffi.Struct { - @__darwin_time_t() - external int tv_sec; + static NSOrderedCollectionChange changeWithObject_type_index_associatedIndex_( + NativeCupertinoHttp _lib, + NSObject anObject, + int type, + int index, + int associatedIndex) { + final _ret = _lib._objc_msgSend_149( + _lib._class_NSOrderedCollectionChange1, + _lib._sel_changeWithObject_type_index_associatedIndex_1, + anObject._id, + type, + index, + associatedIndex); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + } - @__darwin_suseconds_t() - external int tv_usec; -} + NSObject get object { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); + return NSObject._(_ret, _lib, retain: true, release: true); + } -typedef __darwin_time_t = ffi.Long; -typedef __darwin_suseconds_t = __int32_t; + int get changeType { + return _lib._objc_msgSend_150(_id, _lib._sel_changeType1); + } -class rusage extends ffi.Struct { - external timeval ru_utime; + int get index { + return _lib._objc_msgSend_12(_id, _lib._sel_index1); + } - external timeval ru_stime; + int get associatedIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_associatedIndex1); + } - @ffi.Long() - external int ru_maxrss; + @override + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Long() - external int ru_ixrss; + NSOrderedCollectionChange initWithObject_type_index_( + NSObject anObject, int type, int index) { + final _ret = _lib._objc_msgSend_151( + _id, _lib._sel_initWithObject_type_index_1, anObject._id, type, index); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + } - @ffi.Long() - external int ru_idrss; + NSOrderedCollectionChange initWithObject_type_index_associatedIndex_( + NSObject anObject, int type, int index, int associatedIndex) { + final _ret = _lib._objc_msgSend_152( + _id, + _lib._sel_initWithObject_type_index_associatedIndex_1, + anObject._id, + type, + index, + associatedIndex); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + } - @ffi.Long() - external int ru_isrss; + static NSOrderedCollectionChange new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionChange1, _lib._sel_new1); + return NSOrderedCollectionChange._(_ret, _lib, + retain: false, release: true); + } - @ffi.Long() - external int ru_minflt; + static NSOrderedCollectionChange alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionChange1, _lib._sel_alloc1); + return NSOrderedCollectionChange._(_ret, _lib, + retain: false, release: true); + } +} - @ffi.Long() - external int ru_majflt; +abstract class NSCollectionChangeType { + static const int NSCollectionChangeInsert = 0; + static const int NSCollectionChangeRemove = 1; +} - @ffi.Long() - external int ru_nswap; +abstract class NSOrderedCollectionDifferenceCalculationOptions { + static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = + 1; + static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = + 2; + static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; +} - @ffi.Long() - external int ru_inblock; +bool _ObjCBlock9_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} - @ffi.Long() - external int ru_oublock; +final _ObjCBlock9_closureRegistry = {}; +int _ObjCBlock9_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock9_registerClosure(Function fn) { + final id = ++_ObjCBlock9_closureRegistryIndex; + _ObjCBlock9_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Long() - external int ru_msgsnd; +bool _ObjCBlock9_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock9_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @ffi.Long() - external int ru_msgrcv; +class ObjCBlock9 extends _ObjCBlockBase { + ObjCBlock9._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Long() - external int ru_nsignals; + /// Creates a block from a C function pointer. + ObjCBlock9.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock9_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Long() - external int ru_nvcsw; + /// Creates a block from a Dart function. + ObjCBlock9.fromFunction( + NativeCupertinoHttp lib, + bool Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock9_closureTrampoline, false) + .cast(), + _ObjCBlock9_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } - @ffi.Long() - external int ru_nivcsw; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -class rusage_info_v0 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; - - @ffi.Uint64() - external int ri_user_time; +void _ObjCBlock10_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} - @ffi.Uint64() - external int ri_system_time; +final _ObjCBlock10_closureRegistry = {}; +int _ObjCBlock10_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock10_registerClosure(Function fn) { + final id = ++_ObjCBlock10_closureRegistryIndex; + _ObjCBlock10_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_pkg_idle_wkups; +void _ObjCBlock10_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock10_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - @ffi.Uint64() - external int ri_interrupt_wkups; +class ObjCBlock10 extends _ObjCBlockBase { + ObjCBlock10._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_pageins; + /// Creates a block from a C function pointer. + ObjCBlock10.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock10_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_wired_size; + /// Creates a block from a Dart function. + ObjCBlock10.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock10_closureTrampoline) + .cast(), + _ObjCBlock10_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } - @ffi.Uint64() - external int ri_resident_size; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - @ffi.Uint64() - external int ri_phys_footprint; +bool _ObjCBlock11_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1, ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} - @ffi.Uint64() - external int ri_proc_start_abstime; +final _ObjCBlock11_closureRegistry = {}; +int _ObjCBlock11_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock11_registerClosure(Function fn) { + final id = ++_ObjCBlock11_closureRegistryIndex; + _ObjCBlock11_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_proc_exit_abstime; +bool _ObjCBlock11_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock11_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); } -class rusage_info_v1 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; +class ObjCBlock11 extends _ObjCBlockBase { + ObjCBlock11._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_user_time; + /// Creates a block from a C function pointer. + ObjCBlock11.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock11_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_system_time; + /// Creates a block from a Dart function. + ObjCBlock11.fromFunction( + NativeCupertinoHttp lib, + bool Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock11_closureTrampoline, false) + .cast(), + _ObjCBlock11_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - @ffi.Uint64() - external int ri_interrupt_wkups; +class NSFastEnumerationState extends ffi.Struct { + @ffi.UnsignedLong() + external int state; - @ffi.Uint64() - external int ri_pageins; + external ffi.Pointer> itemsPtr; - @ffi.Uint64() - external int ri_wired_size; + external ffi.Pointer mutationsPtr; - @ffi.Uint64() - external int ri_resident_size; + @ffi.Array.multi([5]) + external ffi.Array extra; +} - @ffi.Uint64() - external int ri_phys_footprint; +ffi.Pointer _ObjCBlock12_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>()(arg0, arg1); +} - @ffi.Uint64() - external int ri_proc_start_abstime; +final _ObjCBlock12_closureRegistry = {}; +int _ObjCBlock12_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock12_registerClosure(Function fn) { + final id = ++_ObjCBlock12_closureRegistryIndex; + _ObjCBlock12_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_proc_exit_abstime; +ffi.Pointer _ObjCBlock12_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) { + return _ObjCBlock12_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @ffi.Uint64() - external int ri_child_user_time; +class ObjCBlock12 extends _ObjCBlockBase { + ObjCBlock12._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock12.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>( + _ObjCBlock12_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_child_system_time; + /// Creates a block from a Dart function. + ObjCBlock12.fromFunction( + NativeCupertinoHttp lib, + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>( + _ObjCBlock12_closureTrampoline) + .cast(), + _ObjCBlock12_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call( + ffi.Pointer arg0, NSErrorUserInfoKey arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>()(_id, arg0, arg1); + } - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - @ffi.Uint64() - external int ri_child_interrupt_wkups; +typedef NSErrorUserInfoKey = ffi.Pointer; +typedef NSURLResourceKey = ffi.Pointer; - @ffi.Uint64() - external int ri_child_pageins; +/// Working with Bookmarks and alias (bookmark) files +abstract class NSURLBookmarkCreationOptions { + /// This option does nothing and has no effect on bookmark resolution + static const int NSURLBookmarkCreationPreferFileIDResolution = 256; - @ffi.Uint64() - external int ri_child_elapsed_abstime; -} + /// creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways + static const int NSURLBookmarkCreationMinimalBookmark = 512; -class rusage_info_v2 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; + /// include the properties required by writeBookmarkData:toURL:options: in the bookmark data created + static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; - @ffi.Uint64() - external int ri_user_time; + /// include information in the bookmark data which allows the same sandboxed process to access the resource after being relaunched + static const int NSURLBookmarkCreationWithSecurityScope = 2048; - @ffi.Uint64() - external int ri_system_time; + /// if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted + static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; - @ffi.Uint64() - external int ri_pkg_idle_wkups; + /// Disable automatic embedding of an implicit security scope. The resolving process will not be able gain access to the resource by security scope, either implicitly or explicitly, through the returned URL. Not applicable to security-scoped bookmarks. + static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = + 536870912; +} - @ffi.Uint64() - external int ri_interrupt_wkups; +abstract class NSURLBookmarkResolutionOptions { + /// don't perform any user interaction during bookmark resolution + static const int NSURLBookmarkResolutionWithoutUI = 256; - @ffi.Uint64() - external int ri_pageins; + /// don't mount a volume during bookmark resolution + static const int NSURLBookmarkResolutionWithoutMounting = 512; - @ffi.Uint64() - external int ri_wired_size; + /// use the secure information included at creation time to provide the ability to access the resource in a sandboxed process + static const int NSURLBookmarkResolutionWithSecurityScope = 1024; - @ffi.Uint64() - external int ri_resident_size; + /// Disable implicitly starting access of the ephemeral security-scoped resource during resolution. Instead, call `-[NSURL startAccessingSecurityScopedResource]` on the returned URL when ready to use the resource. Not applicable to security-scoped bookmarks. + static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; +} - @ffi.Uint64() - external int ri_phys_footprint; +typedef NSURLBookmarkFileCreationOptions = NSUInteger; - @ffi.Uint64() - external int ri_proc_start_abstime; +class NSURLHandle extends NSObject { + NSURLHandle._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Uint64() - external int ri_proc_exit_abstime; + /// Returns a [NSURLHandle] that points to the same underlying object as [other]. + static NSURLHandle castFrom(T other) { + return NSURLHandle._(other._id, other._lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_user_time; + /// Returns a [NSURLHandle] that wraps the given raw object pointer. + static NSURLHandle castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLHandle._(other, lib, retain: retain, release: release); + } - @ffi.Uint64() - external int ri_child_system_time; + /// Returns whether [obj] is an instance of [NSURLHandle]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); + } - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + static void registerURLHandleClass_( + NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { + return _lib._objc_msgSend_200(_lib._class_NSURLHandle1, + _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); + } - @ffi.Uint64() - external int ri_child_interrupt_wkups; + static NSObject URLHandleClassForURL_( + NativeCupertinoHttp _lib, NSURL? anURL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSURLHandle1, + _lib._sel_URLHandleClassForURL_1, anURL?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_pageins; + int status() { + return _lib._objc_msgSend_202(_id, _lib._sel_status1); + } - @ffi.Uint64() - external int ri_child_elapsed_abstime; + NSString failureReason() { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_failureReason1); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_diskio_bytesread; + void addClient_(NSObject? client) { + return _lib._objc_msgSend_200( + _id, _lib._sel_addClient_1, client?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_diskio_byteswritten; -} + void removeClient_(NSObject? client) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeClient_1, client?._id ?? ffi.nullptr); + } -class rusage_info_v3 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; + void loadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); + } - @ffi.Uint64() - external int ri_user_time; + void cancelLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); + } - @ffi.Uint64() - external int ri_system_time; + NSData resourceData() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_resourceData1); + return NSData._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + NSData availableResourceData() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_availableResourceData1); + return NSData._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_interrupt_wkups; + int expectedResourceDataSize() { + return _lib._objc_msgSend_82(_id, _lib._sel_expectedResourceDataSize1); + } - @ffi.Uint64() - external int ri_pageins; + void flushCachedData() { + return _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); + } - @ffi.Uint64() - external int ri_wired_size; + void backgroundLoadDidFailWithReason_(NSString? reason) { + return _lib._objc_msgSend_188( + _id, + _lib._sel_backgroundLoadDidFailWithReason_1, + reason?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_resident_size; + void didLoadBytes_loadComplete_(NSData? newBytes, bool yorn) { + return _lib._objc_msgSend_203(_id, _lib._sel_didLoadBytes_loadComplete_1, + newBytes?._id ?? ffi.nullptr, yorn); + } - @ffi.Uint64() - external int ri_phys_footprint; + static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL? anURL) { + return _lib._objc_msgSend_204(_lib._class_NSURLHandle1, + _lib._sel_canInitWithURL_1, anURL?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_proc_start_abstime; + static NSURLHandle cachedHandleForURL_( + NativeCupertinoHttp _lib, NSURL? anURL) { + final _ret = _lib._objc_msgSend_205(_lib._class_NSURLHandle1, + _lib._sel_cachedHandleForURL_1, anURL?._id ?? ffi.nullptr); + return NSURLHandle._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_proc_exit_abstime; + NSObject initWithURL_cached_(NSURL? anURL, bool willCache) { + final _ret = _lib._objc_msgSend_206(_id, _lib._sel_initWithURL_cached_1, + anURL?._id ?? ffi.nullptr, willCache); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_user_time; + NSObject propertyForKey_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_system_time; + NSObject propertyForKeyIfAvailable_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_42(_id, + _lib._sel_propertyForKeyIfAvailable_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + bool writeProperty_forKey_(NSObject propertyValue, NSString? propertyKey) { + return _lib._objc_msgSend_199(_id, _lib._sel_writeProperty_forKey_1, + propertyValue._id, propertyKey?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_child_interrupt_wkups; + bool writeData_(NSData? data) { + return _lib._objc_msgSend_35( + _id, _lib._sel_writeData_1, data?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_child_pageins; + NSData loadInForeground() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_loadInForeground1); + return NSData._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_elapsed_abstime; + void beginLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); + } - @ffi.Uint64() - external int ri_diskio_bytesread; + void endLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); + } - @ffi.Uint64() - external int ri_diskio_byteswritten; + static NSURLHandle new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); + return NSURLHandle._(_ret, _lib, retain: false, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_default; + static NSURLHandle alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); + return NSURLHandle._(_ret, _lib, retain: false, release: true); + } +} - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; +abstract class NSURLHandleStatus { + static const int NSURLHandleNotLoaded = 0; + static const int NSURLHandleLoadSucceeded = 1; + static const int NSURLHandleLoadInProgress = 2; + static const int NSURLHandleLoadFailed = 3; +} - @ffi.Uint64() - external int ri_cpu_time_qos_background; +abstract class NSDataWritingOptions { + /// Hint to use auxiliary file when saving; equivalent to atomically:YES + static const int NSDataWritingAtomic = 1; - @ffi.Uint64() - external int ri_cpu_time_qos_utility; + /// Hint to prevent overwriting an existing file. Cannot be combined with NSDataWritingAtomic. + static const int NSDataWritingWithoutOverwriting = 2; + static const int NSDataWritingFileProtectionNone = 268435456; + static const int NSDataWritingFileProtectionComplete = 536870912; + static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; + static const int + NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = + 1073741824; + static const int NSDataWritingFileProtectionMask = 4026531840; - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; + /// Deprecated name for NSDataWritingAtomic + static const int NSAtomicWrite = 1; +} - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; +/// Data Search Options +abstract class NSDataSearchOptions { + static const int NSDataSearchBackwards = 1; + static const int NSDataSearchAnchored = 2; +} - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; +void _ObjCBlock13_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} - @ffi.Uint64() - external int ri_billed_system_time; +final _ObjCBlock13_closureRegistry = {}; +int _ObjCBlock13_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock13_registerClosure(Function fn) { + final id = ++_ObjCBlock13_closureRegistryIndex; + _ObjCBlock13_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_serviced_system_time; +void _ObjCBlock13_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return _ObjCBlock13_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); } -class rusage_info_v4 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; +class ObjCBlock13 extends _ObjCBlockBase { + ObjCBlock13._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_user_time; + /// Creates a block from a C function pointer. + ObjCBlock13.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>( + _ObjCBlock13_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_system_time; + /// Creates a block from a Dart function. + ObjCBlock13.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>( + _ObjCBlock13_closureTrampoline) + .cast(), + _ObjCBlock13_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - @ffi.Uint64() - external int ri_interrupt_wkups; +/// Read/Write Options +abstract class NSDataReadingOptions { + /// Hint to map the file in if possible and safe + static const int NSDataReadingMappedIfSafe = 1; - @ffi.Uint64() - external int ri_pageins; + /// Hint to get the file not to be cached in the kernel + static const int NSDataReadingUncached = 2; - @ffi.Uint64() - external int ri_wired_size; + /// Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given. + static const int NSDataReadingMappedAlways = 8; - @ffi.Uint64() - external int ri_resident_size; + /// Deprecated name for NSDataReadingMappedIfSafe + static const int NSDataReadingMapped = 1; - @ffi.Uint64() - external int ri_phys_footprint; + /// Deprecated name for NSDataReadingMapped + static const int NSMappedRead = 1; - @ffi.Uint64() - external int ri_proc_start_abstime; + /// Deprecated name for NSDataReadingUncached + static const int NSUncachedRead = 2; +} - @ffi.Uint64() - external int ri_proc_exit_abstime; +void _ObjCBlock14_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); +} - @ffi.Uint64() - external int ri_child_user_time; +final _ObjCBlock14_closureRegistry = {}; +int _ObjCBlock14_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock14_registerClosure(Function fn) { + final id = ++_ObjCBlock14_closureRegistryIndex; + _ObjCBlock14_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_child_system_time; +void _ObjCBlock14_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return _ObjCBlock14_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; +class ObjCBlock14 extends _ObjCBlockBase { + ObjCBlock14._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_child_interrupt_wkups; + /// Creates a block from a C function pointer. + ObjCBlock14.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock14_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_child_pageins; + /// Creates a block from a Dart function. + ObjCBlock14.fromFunction(NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock14_closureTrampoline) + .cast(), + _ObjCBlock14_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); + } - @ffi.Uint64() - external int ri_child_elapsed_abstime; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - @ffi.Uint64() - external int ri_diskio_bytesread; +abstract class NSDataBase64DecodingOptions { + /// Use the following option to modify the decoding algorithm so that it ignores unknown non-Base64 bytes, including line ending characters. + static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; +} - @ffi.Uint64() - external int ri_diskio_byteswritten; +/// Base 64 Options +abstract class NSDataBase64EncodingOptions { + /// Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default. + static const int NSDataBase64Encoding64CharacterLineLength = 1; + static const int NSDataBase64Encoding76CharacterLineLength = 2; - @ffi.Uint64() - external int ri_cpu_time_qos_default; + /// Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF. + static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; + static const int NSDataBase64EncodingEndLineWithLineFeed = 32; +} - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; +/// Various algorithms provided for compression APIs. See NSData and NSMutableData. +abstract class NSDataCompressionAlgorithm { + /// LZFSE is the recommended compression algorithm if you don't have a specific reason to use another algorithm. Note that LZFSE is intended for use with Apple devices only. This algorithm generally compresses better than Zlib, but not as well as LZMA. It is generally slower than LZ4. + static const int NSDataCompressionAlgorithmLZFSE = 0; - @ffi.Uint64() - external int ri_cpu_time_qos_background; + /// LZ4 is appropriate if compression speed is critical. LZ4 generally sacrifices compression ratio in order to achieve its greater speed. + /// This implementation of LZ4 makes a small modification to the standard format, which is described in greater detail in . + static const int NSDataCompressionAlgorithmLZ4 = 1; - @ffi.Uint64() - external int ri_cpu_time_qos_utility; + /// LZMA is appropriate if compression ratio is critical and memory usage and compression speed are not a factor. LZMA is an order of magnitude slower for both compression and decompression than other algorithms. It can also use a very large amount of memory, so if you need to compress large amounts of data on embedded devices with limited memory you should probably avoid LZMA. + /// Encoding uses LZMA level 6 only, but decompression works with any compression level. + static const int NSDataCompressionAlgorithmLZMA = 2; - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; + /// Zlib is appropriate if you want a good balance between compression speed and compression ratio, but only if you need interoperability with non-Apple platforms. Otherwise, LZFSE is generally a better choice than Zlib. + /// Encoding uses Zlib level 5 only, but decompression works with any compression level. It uses the raw DEFLATE format as described in IETF RFC 1951. + static const int NSDataCompressionAlgorithmZlib = 3; +} - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; +typedef UTF32Char = UInt32; +typedef UInt32 = ffi.UnsignedInt; - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; +abstract class NSStringEnumerationOptions { + static const int NSStringEnumerationByLines = 0; + static const int NSStringEnumerationByParagraphs = 1; + static const int NSStringEnumerationByComposedCharacterSequences = 2; + static const int NSStringEnumerationByWords = 3; + static const int NSStringEnumerationBySentences = 4; + static const int NSStringEnumerationByCaretPositions = 5; + static const int NSStringEnumerationByDeletionClusters = 6; + static const int NSStringEnumerationReverse = 256; + static const int NSStringEnumerationSubstringNotRequired = 512; + static const int NSStringEnumerationLocalized = 1024; +} - @ffi.Uint64() - external int ri_billed_system_time; +void _ObjCBlock15_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + NSRange arg2, ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>()(arg0, arg1, arg2, arg3); +} - @ffi.Uint64() - external int ri_serviced_system_time; +final _ObjCBlock15_closureRegistry = {}; +int _ObjCBlock15_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock15_registerClosure(Function fn) { + final id = ++_ObjCBlock15_closureRegistryIndex; + _ObjCBlock15_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_logical_writes; +void _ObjCBlock15_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) { + return _ObjCBlock15_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2, arg3); +} - @ffi.Uint64() - external int ri_lifetime_max_phys_footprint; +class ObjCBlock15 extends _ObjCBlockBase { + ObjCBlock15._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_instructions; + /// Creates a block from a C function pointer. + ObjCBlock15.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + NSRange arg2, ffi.Pointer arg3)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>( + _ObjCBlock15_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_cycles; + /// Creates a block from a Dart function. + ObjCBlock15.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>( + _ObjCBlock15_closureTrampoline) + .cast(), + _ObjCBlock15_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>()(_id, arg0, arg1, arg2, arg3); + } - @ffi.Uint64() - external int ri_billed_energy; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - @ffi.Uint64() - external int ri_serviced_energy; +void _ObjCBlock16_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} - @ffi.Uint64() - external int ri_interval_max_phys_footprint; +final _ObjCBlock16_closureRegistry = {}; +int _ObjCBlock16_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock16_registerClosure(Function fn) { + final id = ++_ObjCBlock16_closureRegistryIndex; + _ObjCBlock16_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_runnable_time; +void _ObjCBlock16_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock16_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class rusage_info_v5 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; +class ObjCBlock16 extends _ObjCBlockBase { + ObjCBlock16._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_user_time; + /// Creates a block from a C function pointer. + ObjCBlock16.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock16_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_system_time; + /// Creates a block from a Dart function. + ObjCBlock16.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock16_closureTrampoline) + .cast(), + _ObjCBlock16_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - @ffi.Uint64() - external int ri_interrupt_wkups; +typedef NSStringEncoding = NSUInteger; - @ffi.Uint64() - external int ri_pageins; +abstract class NSStringEncodingConversionOptions { + static const int NSStringEncodingConversionAllowLossy = 1; + static const int NSStringEncodingConversionExternalRepresentation = 2; +} - @ffi.Uint64() - external int ri_wired_size; +typedef NSStringTransform = ffi.Pointer; +void _ObjCBlock17_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); +} - @ffi.Uint64() - external int ri_resident_size; +final _ObjCBlock17_closureRegistry = {}; +int _ObjCBlock17_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock17_registerClosure(Function fn) { + final id = ++_ObjCBlock17_closureRegistryIndex; + _ObjCBlock17_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_phys_footprint; +void _ObjCBlock17_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return _ObjCBlock17_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @ffi.Uint64() - external int ri_proc_start_abstime; +class ObjCBlock17 extends _ObjCBlockBase { + ObjCBlock17._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_proc_exit_abstime; + /// Creates a block from a C function pointer. + ObjCBlock17.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock17_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_child_user_time; + /// Creates a block from a Dart function. + ObjCBlock17.fromFunction(NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock17_closureTrampoline) + .cast(), + _ObjCBlock17_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); + } - @ffi.Uint64() - external int ri_child_system_time; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; +typedef va_list = __builtin_va_list; +typedef __builtin_va_list = ffi.Pointer; - @ffi.Uint64() - external int ri_child_interrupt_wkups; +abstract class NSQualityOfService { + static const int NSQualityOfServiceUserInteractive = 33; + static const int NSQualityOfServiceUserInitiated = 25; + static const int NSQualityOfServiceUtility = 17; + static const int NSQualityOfServiceBackground = 9; + static const int NSQualityOfServiceDefault = -1; +} - @ffi.Uint64() - external int ri_child_pageins; +abstract class ptrauth_key { + static const int ptrauth_key_asia = 0; + static const int ptrauth_key_asib = 1; + static const int ptrauth_key_asda = 2; + static const int ptrauth_key_asdb = 3; + static const int ptrauth_key_process_independent_code = 0; + static const int ptrauth_key_process_dependent_code = 1; + static const int ptrauth_key_process_independent_data = 2; + static const int ptrauth_key_process_dependent_data = 3; + static const int ptrauth_key_function_pointer = 0; + static const int ptrauth_key_return_address = 1; + static const int ptrauth_key_frame_pointer = 3; + static const int ptrauth_key_block_function = 0; + static const int ptrauth_key_cxx_vtable_pointer = 2; + static const int ptrauth_key_method_list_pointer = 2; + static const int ptrauth_key_objc_isa_pointer = 2; + static const int ptrauth_key_objc_super_pointer = 2; + static const int ptrauth_key_block_descriptor_pointer = 2; + static const int ptrauth_key_objc_sel_pointer = 3; + static const int ptrauth_key_objc_class_ro_pointer = 2; +} - @ffi.Uint64() - external int ri_child_elapsed_abstime; +@ffi.Packed(2) +class wide extends ffi.Struct { + @UInt32() + external int lo; - @ffi.Uint64() - external int ri_diskio_bytesread; + @SInt32() + external int hi; +} - @ffi.Uint64() - external int ri_diskio_byteswritten; +typedef SInt32 = ffi.Int; - @ffi.Uint64() - external int ri_cpu_time_qos_default; +@ffi.Packed(2) +class UnsignedWide extends ffi.Struct { + @UInt32() + external int lo; - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; + @UInt32() + external int hi; +} - @ffi.Uint64() - external int ri_cpu_time_qos_background; +class Float80 extends ffi.Struct { + @SInt16() + external int exp; - @ffi.Uint64() - external int ri_cpu_time_qos_utility; + @ffi.Array.multi([4]) + external ffi.Array man; +} - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; +typedef SInt16 = ffi.Short; +typedef UInt16 = ffi.UnsignedShort; - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; +class Float96 extends ffi.Struct { + @ffi.Array.multi([2]) + external ffi.Array exp; - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; + @ffi.Array.multi([4]) + external ffi.Array man; +} - @ffi.Uint64() - external int ri_billed_system_time; +@ffi.Packed(2) +class Float32Point extends ffi.Struct { + @Float32() + external double x; - @ffi.Uint64() - external int ri_serviced_system_time; + @Float32() + external double y; +} - @ffi.Uint64() - external int ri_logical_writes; +typedef Float32 = ffi.Float; - @ffi.Uint64() - external int ri_lifetime_max_phys_footprint; +@ffi.Packed(2) +class ProcessSerialNumber extends ffi.Struct { + @UInt32() + external int highLongOfPSN; - @ffi.Uint64() - external int ri_instructions; + @UInt32() + external int lowLongOfPSN; +} - @ffi.Uint64() - external int ri_cycles; +class Point extends ffi.Struct { + @ffi.Short() + external int v; - @ffi.Uint64() - external int ri_billed_energy; + @ffi.Short() + external int h; +} - @ffi.Uint64() - external int ri_serviced_energy; +class Rect extends ffi.Struct { + @ffi.Short() + external int top; - @ffi.Uint64() - external int ri_interval_max_phys_footprint; + @ffi.Short() + external int left; - @ffi.Uint64() - external int ri_runnable_time; + @ffi.Short() + external int bottom; - @ffi.Uint64() - external int ri_flags; + @ffi.Short() + external int right; } -class rlimit extends ffi.Struct { - @rlim_t() - external int rlim_cur; +@ffi.Packed(2) +class FixedPoint extends ffi.Struct { + @Fixed() + external int x; - @rlim_t() - external int rlim_max; + @Fixed() + external int y; } -typedef rlim_t = __uint64_t; +typedef Fixed = SInt32; -class proc_rlimit_control_wakeupmon extends ffi.Struct { - @ffi.Uint32() - external int wm_flags; +@ffi.Packed(2) +class FixedRect extends ffi.Struct { + @Fixed() + external int left; - @ffi.Int32() - external int wm_rate; + @Fixed() + external int top; + + @Fixed() + external int right; + + @Fixed() + external int bottom; } -typedef id_t = __darwin_id_t; -typedef __darwin_id_t = __uint32_t; +class TimeBaseRecord extends ffi.Opaque {} -class wait extends ffi.Opaque {} +@ffi.Packed(2) +class TimeRecord extends ffi.Struct { + external CompTimeValue value; -class div_t extends ffi.Struct { - @ffi.Int() - external int quot; + @TimeScale() + external int scale; - @ffi.Int() - external int rem; + external TimeBase base; } -class ldiv_t extends ffi.Struct { - @ffi.Long() - external int quot; +typedef CompTimeValue = wide; +typedef TimeScale = SInt32; +typedef TimeBase = ffi.Pointer; - @ffi.Long() - external int rem; -} +class NumVersion extends ffi.Struct { + @UInt8() + external int nonRelRev; -class lldiv_t extends ffi.Struct { - @ffi.LongLong() - external int quot; + @UInt8() + external int stage; - @ffi.LongLong() - external int rem; -} + @UInt8() + external int minorAndBugRev; -int _ObjCBlock20_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); + @UInt8() + external int majorRev; } -final _ObjCBlock20_closureRegistry = {}; -int _ObjCBlock20_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock20_registerClosure(Function fn) { - final id = ++_ObjCBlock20_closureRegistryIndex; - _ObjCBlock20_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +typedef UInt8 = ffi.UnsignedChar; -int _ObjCBlock20_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock20_closureRegistry[block.ref.target.address]!(arg0, arg1); +class NumVersionVariant extends ffi.Union { + external NumVersion parts; + + @UInt32() + external int whole; } -class ObjCBlock20 extends _ObjCBlockBase { - ObjCBlock20._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class VersRec extends ffi.Struct { + external NumVersion numericVersion; - /// Creates a block from a C function pointer. - ObjCBlock20.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock20_fnPtrTrampoline, 0) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Short() + external int countryCode; - /// Creates a block from a Dart function. - ObjCBlock20.fromFunction(NativeCupertinoHttp lib, - int Function(ffi.Pointer arg0, ffi.Pointer arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock20_closureTrampoline, 0) - .cast(), - _ObjCBlock20_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - int call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + @ffi.Array.multi([256]) + external ffi.Array shortVersion; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @ffi.Array.multi([256]) + external ffi.Array reserved; } -typedef dev_t = __darwin_dev_t; -typedef __darwin_dev_t = __int32_t; -typedef mode_t = __darwin_mode_t; -typedef __darwin_mode_t = __uint16_t; -typedef __uint16_t = ffi.UnsignedShort; -typedef errno_t = ffi.Int; -typedef rsize_t = __darwin_size_t; +typedef ConstStr255Param = ffi.Pointer; -class timespec extends ffi.Struct { - @__darwin_time_t() - external int tv_sec; +class __CFString extends ffi.Opaque {} - @ffi.Long() - external int tv_nsec; +abstract class CFComparisonResult { + static const int kCFCompareLessThan = -1; + static const int kCFCompareEqualTo = 0; + static const int kCFCompareGreaterThan = 1; } -class tm extends ffi.Struct { - @ffi.Int() - external int tm_sec; +typedef CFIndex = ffi.Long; - @ffi.Int() - external int tm_min; +class CFRange extends ffi.Struct { + @CFIndex() + external int location; - @ffi.Int() - external int tm_hour; + @CFIndex() + external int length; +} - @ffi.Int() - external int tm_mday; +class __CFNull extends ffi.Opaque {} - @ffi.Int() - external int tm_mon; +typedef CFTypeID = ffi.UnsignedLong; +typedef CFNullRef = ffi.Pointer<__CFNull>; - @ffi.Int() - external int tm_year; +class __CFAllocator extends ffi.Opaque {} - @ffi.Int() - external int tm_wday; +typedef CFAllocatorRef = ffi.Pointer<__CFAllocator>; - @ffi.Int() - external int tm_yday; +class CFAllocatorContext extends ffi.Struct { + @CFIndex() + external int version; - @ffi.Int() - external int tm_isdst; + external ffi.Pointer info; - @ffi.Long() - external int tm_gmtoff; + external CFAllocatorRetainCallBack retain; - external ffi.Pointer tm_zone; -} + external CFAllocatorReleaseCallBack release; -typedef clock_t = __darwin_clock_t; -typedef __darwin_clock_t = ffi.UnsignedLong; -typedef time_t = __darwin_time_t; + external CFAllocatorCopyDescriptionCallBack copyDescription; -abstract class clockid_t { - static const int _CLOCK_REALTIME = 0; - static const int _CLOCK_MONOTONIC = 6; - static const int _CLOCK_MONOTONIC_RAW = 4; - static const int _CLOCK_MONOTONIC_RAW_APPROX = 5; - static const int _CLOCK_UPTIME_RAW = 8; - static const int _CLOCK_UPTIME_RAW_APPROX = 9; - static const int _CLOCK_PROCESS_CPUTIME_ID = 12; - static const int _CLOCK_THREAD_CPUTIME_ID = 16; -} + external CFAllocatorAllocateCallBack allocate; -typedef intmax_t = ffi.Long; + external CFAllocatorReallocateCallBack reallocate; -class imaxdiv_t extends ffi.Struct { - @intmax_t() - external int quot; + external CFAllocatorDeallocateCallBack deallocate; - @intmax_t() - external int rem; + external CFAllocatorPreferredSizeCallBack preferredSize; } -typedef uintmax_t = ffi.UnsignedLong; +typedef CFAllocatorRetainCallBack = ffi.Pointer< + ffi.NativeFunction Function(ffi.Pointer)>>; +typedef CFAllocatorReleaseCallBack + = ffi.Pointer)>>; +typedef CFAllocatorCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFStringRef = ffi.Pointer<__CFString>; +typedef CFAllocatorAllocateCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFIndex, CFOptionFlags, ffi.Pointer)>>; +typedef CFOptionFlags = ffi.UnsignedLong; +typedef CFAllocatorReallocateCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, CFIndex, + CFOptionFlags, ffi.Pointer)>>; +typedef CFAllocatorDeallocateCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFAllocatorPreferredSizeCallBack = ffi.Pointer< + ffi.NativeFunction< + CFIndex Function(CFIndex, CFOptionFlags, ffi.Pointer)>>; +typedef CFTypeRef = ffi.Pointer; +typedef Boolean = ffi.UnsignedChar; +typedef CFHashCode = ffi.UnsignedLong; +typedef NSZone = _NSZone; -class CFBagCallBacks extends ffi.Struct { - @CFIndex() - external int version; +class NSMutableIndexSet extends NSIndexSet { + NSMutableIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external CFBagRetainCallBack retain; + /// Returns a [NSMutableIndexSet] that points to the same underlying object as [other]. + static NSMutableIndexSet castFrom(T other) { + return NSMutableIndexSet._(other._id, other._lib, + retain: true, release: true); + } - external CFBagReleaseCallBack release; + /// Returns a [NSMutableIndexSet] that wraps the given raw object pointer. + static NSMutableIndexSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableIndexSet._(other, lib, retain: retain, release: release); + } - external CFBagCopyDescriptionCallBack copyDescription; + /// Returns whether [obj] is an instance of [NSMutableIndexSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableIndexSet1); + } - external CFBagEqualCallBack equal; + void addIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_285( + _id, _lib._sel_addIndexes_1, indexSet?._id ?? ffi.nullptr); + } - external CFBagHashCallBack hash; -} + void removeIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_285( + _id, _lib._sel_removeIndexes_1, indexSet?._id ?? ffi.nullptr); + } -typedef CFBagRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFBagReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFBagCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFBagEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFBagHashCallBack = ffi - .Pointer)>>; + void removeAllIndexes() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllIndexes1); + } -class __CFBag extends ffi.Opaque {} + void addIndex_(int value) { + return _lib._objc_msgSend_286(_id, _lib._sel_addIndex_1, value); + } -typedef CFBagRef = ffi.Pointer<__CFBag>; -typedef CFMutableBagRef = ffi.Pointer<__CFBag>; -typedef CFBagApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + void removeIndex_(int value) { + return _lib._objc_msgSend_286(_id, _lib._sel_removeIndex_1, value); + } -class CFBinaryHeapCompareContext extends ffi.Struct { - @CFIndex() - external int version; + void addIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_287(_id, _lib._sel_addIndexesInRange_1, range); + } - external ffi.Pointer info; + void removeIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_287(_id, _lib._sel_removeIndexesInRange_1, range); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + void shiftIndexesStartingAtIndex_by_(int index, int delta) { + return _lib._objc_msgSend_288( + _id, _lib._sel_shiftIndexesStartingAtIndex_by_1, index, delta); + } - external ffi - .Pointer)>> - release; + static NSMutableIndexSet indexSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableIndexSet1, _lib._sel_indexSet1); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + static NSMutableIndexSet indexSetWithIndex_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableIndexSet1, _lib._sel_indexSetWithIndex_1, value); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } -class CFBinaryHeapCallBacks extends ffi.Struct { - @CFIndex() - external int version; + static NSMutableIndexSet indexSetWithIndexesInRange_( + NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_111(_lib._class_NSMutableIndexSet1, + _lib._sel_indexSetWithIndexesInRange_1, range); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef, ffi.Pointer)>> retain; + static NSMutableIndexSet new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_new1); + return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>> release; + static NSMutableIndexSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_alloc1); + return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + } +} - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; +/// Mutable Array +class NSMutableArray extends NSArray { + NSMutableArray._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>> compare; -} + /// Returns a [NSMutableArray] that points to the same underlying object as [other]. + static NSMutableArray castFrom(T other) { + return NSMutableArray._(other._id, other._lib, retain: true, release: true); + } -class __CFBinaryHeap extends ffi.Opaque {} + /// Returns a [NSMutableArray] that wraps the given raw object pointer. + static NSMutableArray castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableArray._(other, lib, retain: retain, release: release); + } -typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; -typedef CFBinaryHeapApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + /// Returns whether [obj] is an instance of [NSMutableArray]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableArray1); + } -class __CFBitVector extends ffi.Opaque {} + void addObject_(NSObject anObject) { + return _lib._objc_msgSend_200(_id, _lib._sel_addObject_1, anObject._id); + } -typedef CFBitVectorRef = ffi.Pointer<__CFBitVector>; -typedef CFMutableBitVectorRef = ffi.Pointer<__CFBitVector>; -typedef CFBit = UInt32; + void insertObject_atIndex_(NSObject anObject, int index) { + return _lib._objc_msgSend_289( + _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); + } -abstract class __CFByteOrder { - static const int CFByteOrderUnknown = 0; - static const int CFByteOrderLittleEndian = 1; - static const int CFByteOrderBigEndian = 2; -} + void removeLastObject() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); + } -class CFSwappedFloat32 extends ffi.Struct { - @ffi.Uint32() - external int v; -} + void removeObjectAtIndex_(int index) { + return _lib._objc_msgSend_286(_id, _lib._sel_removeObjectAtIndex_1, index); + } -class CFSwappedFloat64 extends ffi.Struct { - @ffi.Uint64() - external int v; -} + void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { + return _lib._objc_msgSend_290( + _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); + } -class CFDictionaryKeyCallBacks extends ffi.Struct { - @CFIndex() - external int version; + @override + NSMutableArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - external CFDictionaryRetainCallBack retain; + NSMutableArray initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - external CFDictionaryReleaseCallBack release; + @override + NSMutableArray initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - external CFDictionaryCopyDescriptionCallBack copyDescription; + void addObjectsFromArray_(NSArray? otherArray) { + return _lib._objc_msgSend_291( + _id, _lib._sel_addObjectsFromArray_1, otherArray?._id ?? ffi.nullptr); + } - external CFDictionaryEqualCallBack equal; + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + return _lib._objc_msgSend_292( + _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); + } - external CFDictionaryHashCallBack hash; -} + void removeAllObjects() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } -typedef CFDictionaryRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFDictionaryReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFDictionaryCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFDictionaryEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFDictionaryHashCallBack = ffi - .Pointer)>>; + void removeObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_293( + _id, _lib._sel_removeObject_inRange_1, anObject._id, range); + } -class CFDictionaryValueCallBacks extends ffi.Struct { - @CFIndex() - external int version; + void removeObject_(NSObject anObject) { + return _lib._objc_msgSend_200(_id, _lib._sel_removeObject_1, anObject._id); + } - external CFDictionaryRetainCallBack retain; + void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_293( + _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); + } - external CFDictionaryReleaseCallBack release; + void removeObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); + } - external CFDictionaryCopyDescriptionCallBack copyDescription; + void removeObjectsFromIndices_numIndices_( + ffi.Pointer indices, int cnt) { + return _lib._objc_msgSend_294( + _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); + } - external CFDictionaryEqualCallBack equal; -} + void removeObjectsInArray_(NSArray? otherArray) { + return _lib._objc_msgSend_291( + _id, _lib._sel_removeObjectsInArray_1, otherArray?._id ?? ffi.nullptr); + } -class __CFDictionary extends ffi.Opaque {} + void removeObjectsInRange_(NSRange range) { + return _lib._objc_msgSend_287(_id, _lib._sel_removeObjectsInRange_1, range); + } -typedef CFDictionaryRef = ffi.Pointer<__CFDictionary>; -typedef CFMutableDictionaryRef = ffi.Pointer<__CFDictionary>; -typedef CFDictionaryApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>; + void replaceObjectsInRange_withObjectsFromArray_range_( + NSRange range, NSArray? otherArray, NSRange otherRange) { + return _lib._objc_msgSend_295( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, + range, + otherArray?._id ?? ffi.nullptr, + otherRange); + } -class __CFNotificationCenter extends ffi.Opaque {} + void replaceObjectsInRange_withObjectsFromArray_( + NSRange range, NSArray? otherArray) { + return _lib._objc_msgSend_296( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, + range, + otherArray?._id ?? ffi.nullptr); + } -abstract class CFNotificationSuspensionBehavior { - static const int CFNotificationSuspensionBehaviorDrop = 1; - static const int CFNotificationSuspensionBehaviorCoalesce = 2; - static const int CFNotificationSuspensionBehaviorHold = 3; - static const int CFNotificationSuspensionBehaviorDeliverImmediately = 4; -} + void setArray_(NSArray? otherArray) { + return _lib._objc_msgSend_291( + _id, _lib._sel_setArray_1, otherArray?._id ?? ffi.nullptr); + } -typedef CFNotificationCenterRef = ffi.Pointer<__CFNotificationCenter>; -typedef CFNotificationCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFNotificationCenterRef, ffi.Pointer, - CFNotificationName, ffi.Pointer, CFDictionaryRef)>>; -typedef CFNotificationName = CFStringRef; + void sortUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context) { + return _lib._objc_msgSend_297( + _id, _lib._sel_sortUsingFunction_context_1, compare, context); + } -class __CFLocale extends ffi.Opaque {} + void sortUsingSelector_(ffi.Pointer comparator) { + return _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); + } -typedef CFLocaleRef = ffi.Pointer<__CFLocale>; -typedef CFLocaleIdentifier = CFStringRef; -typedef LangCode = SInt16; -typedef RegionCode = SInt16; + void insertObjects_atIndexes_(NSArray? objects, NSIndexSet? indexes) { + return _lib._objc_msgSend_298(_id, _lib._sel_insertObjects_atIndexes_1, + objects?._id ?? ffi.nullptr, indexes?._id ?? ffi.nullptr); + } -abstract class CFLocaleLanguageDirection { - static const int kCFLocaleLanguageDirectionUnknown = 0; - static const int kCFLocaleLanguageDirectionLeftToRight = 1; - static const int kCFLocaleLanguageDirectionRightToLeft = 2; - static const int kCFLocaleLanguageDirectionTopToBottom = 3; - static const int kCFLocaleLanguageDirectionBottomToTop = 4; -} + void removeObjectsAtIndexes_(NSIndexSet? indexes) { + return _lib._objc_msgSend_285( + _id, _lib._sel_removeObjectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + } -typedef CFLocaleKey = CFStringRef; -typedef CFCalendarIdentifier = CFStringRef; -typedef CFAbsoluteTime = CFTimeInterval; -typedef CFTimeInterval = ffi.Double; + void replaceObjectsAtIndexes_withObjects_( + NSIndexSet? indexes, NSArray? objects) { + return _lib._objc_msgSend_299( + _id, + _lib._sel_replaceObjectsAtIndexes_withObjects_1, + indexes?._id ?? ffi.nullptr, + objects?._id ?? ffi.nullptr); + } -class __CFDate extends ffi.Opaque {} + void setObject_atIndexedSubscript_(NSObject obj, int idx) { + return _lib._objc_msgSend_289( + _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); + } -typedef CFDateRef = ffi.Pointer<__CFDate>; + void sortUsingComparator_(NSComparator cmptr) { + return _lib._objc_msgSend_300(_id, _lib._sel_sortUsingComparator_1, cmptr); + } -class __CFTimeZone extends ffi.Opaque {} + void sortWithOptions_usingComparator_(int opts, NSComparator cmptr) { + return _lib._objc_msgSend_301( + _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr); + } -class CFGregorianDate extends ffi.Struct { - @SInt32() - external int year; + static NSMutableArray arrayWithCapacity_( + NativeCupertinoHttp _lib, int numItems) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - @SInt8() - external int month; + static NSMutableArray arrayWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_302(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - @SInt8() - external int day; + static NSMutableArray arrayWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_303(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - @SInt8() - external int hour; + NSMutableArray initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_302( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - @SInt8() - external int minute; + NSMutableArray initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_303( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Double() - external double second; -} + void applyDifference_(NSOrderedCollectionDifference? difference) { + return _lib._objc_msgSend_304( + _id, _lib._sel_applyDifference_1, difference?._id ?? ffi.nullptr); + } -typedef SInt8 = ffi.SignedChar; + static NSMutableArray array(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -class CFGregorianUnits extends ffi.Struct { - @SInt32() - external int years; + static NSMutableArray arrayWithObject_( + NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - @SInt32() - external int months; + static NSMutableArray arrayWithObjects_count_(NativeCupertinoHttp _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_95(_lib._class_NSMutableArray1, + _lib._sel_arrayWithObjects_count_1, objects, cnt); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - @SInt32() - external int days; + static NSMutableArray arrayWithObjects_( + NativeCupertinoHttp _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableArray1, + _lib._sel_arrayWithObjects_1, firstObj._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - @SInt32() - external int hours; + static NSMutableArray arrayWithArray_( + NativeCupertinoHttp _lib, NSArray? array) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableArray1, + _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - @SInt32() - external int minutes; + /// Reads array stored in NSPropertyList format from the specified url. + static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_145( + _lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Double() - external double seconds; -} + static NSMutableArray new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } -abstract class CFGregorianUnitFlags { - static const int kCFGregorianUnitsYears = 1; - static const int kCFGregorianUnitsMonths = 2; - static const int kCFGregorianUnitsDays = 4; - static const int kCFGregorianUnitsHours = 8; - static const int kCFGregorianUnitsMinutes = 16; - static const int kCFGregorianUnitsSeconds = 32; - static const int kCFGregorianAllUnits = 16777215; + static NSMutableArray alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } } -typedef CFTimeZoneRef = ffi.Pointer<__CFTimeZone>; - -class __CFData extends ffi.Opaque {} +/// Mutable Data +class NSMutableData extends NSData { + NSMutableData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -typedef CFDataRef = ffi.Pointer<__CFData>; -typedef CFMutableDataRef = ffi.Pointer<__CFData>; + /// Returns a [NSMutableData] that points to the same underlying object as [other]. + static NSMutableData castFrom(T other) { + return NSMutableData._(other._id, other._lib, retain: true, release: true); + } -abstract class CFDataSearchFlags { - static const int kCFDataSearchBackwards = 1; - static const int kCFDataSearchAnchored = 2; -} + /// Returns a [NSMutableData] that wraps the given raw object pointer. + static NSMutableData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableData._(other, lib, retain: retain, release: release); + } -class __CFCharacterSet extends ffi.Opaque {} + /// Returns whether [obj] is an instance of [NSMutableData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); + } -abstract class CFCharacterSetPredefinedSet { - static const int kCFCharacterSetControl = 1; - static const int kCFCharacterSetWhitespace = 2; - static const int kCFCharacterSetWhitespaceAndNewline = 3; - static const int kCFCharacterSetDecimalDigit = 4; - static const int kCFCharacterSetLetter = 5; - static const int kCFCharacterSetLowercaseLetter = 6; - static const int kCFCharacterSetUppercaseLetter = 7; - static const int kCFCharacterSetNonBase = 8; - static const int kCFCharacterSetDecomposable = 9; - static const int kCFCharacterSetAlphaNumeric = 10; - static const int kCFCharacterSetPunctuation = 11; - static const int kCFCharacterSetCapitalizedLetter = 13; - static const int kCFCharacterSetSymbol = 14; - static const int kCFCharacterSetNewline = 15; - static const int kCFCharacterSetIllegal = 12; -} + ffi.Pointer get mutableBytes { + return _lib._objc_msgSend_31(_id, _lib._sel_mutableBytes1); + } -typedef CFCharacterSetRef = ffi.Pointer<__CFCharacterSet>; -typedef CFMutableCharacterSetRef = ffi.Pointer<__CFCharacterSet>; -typedef UniChar = UInt16; + @override + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); + } -abstract class CFStringBuiltInEncodings { - static const int kCFStringEncodingMacRoman = 0; - static const int kCFStringEncodingWindowsLatin1 = 1280; - static const int kCFStringEncodingISOLatin1 = 513; - static const int kCFStringEncodingNextStepLatin = 2817; - static const int kCFStringEncodingASCII = 1536; - static const int kCFStringEncodingUnicode = 256; - static const int kCFStringEncodingUTF8 = 134217984; - static const int kCFStringEncodingNonLossyASCII = 3071; - static const int kCFStringEncodingUTF16 = 256; - static const int kCFStringEncodingUTF16BE = 268435712; - static const int kCFStringEncodingUTF16LE = 335544576; - static const int kCFStringEncodingUTF32 = 201326848; - static const int kCFStringEncodingUTF32BE = 402653440; - static const int kCFStringEncodingUTF32LE = 469762304; -} + set length(int value) { + _lib._objc_msgSend_305(_id, _lib._sel_setLength_1, value); + } -typedef CFStringEncoding = UInt32; -typedef CFMutableStringRef = ffi.Pointer<__CFString>; -typedef StringPtr = ffi.Pointer; -typedef ConstStringPtr = ffi.Pointer; + void appendBytes_length_(ffi.Pointer bytes, int length) { + return _lib._objc_msgSend_33( + _id, _lib._sel_appendBytes_length_1, bytes, length); + } -abstract class CFStringCompareFlags { - static const int kCFCompareCaseInsensitive = 1; - static const int kCFCompareBackwards = 4; - static const int kCFCompareAnchored = 8; - static const int kCFCompareNonliteral = 16; - static const int kCFCompareLocalized = 32; - static const int kCFCompareNumerically = 64; - static const int kCFCompareDiacriticInsensitive = 128; - static const int kCFCompareWidthInsensitive = 256; - static const int kCFCompareForcedOrdering = 512; -} + void appendData_(NSData? other) { + return _lib._objc_msgSend_306( + _id, _lib._sel_appendData_1, other?._id ?? ffi.nullptr); + } -abstract class CFStringNormalizationForm { - static const int kCFStringNormalizationFormD = 0; - static const int kCFStringNormalizationFormKD = 1; - static const int kCFStringNormalizationFormC = 2; - static const int kCFStringNormalizationFormKC = 3; -} + void increaseLengthBy_(int extraLength) { + return _lib._objc_msgSend_286( + _id, _lib._sel_increaseLengthBy_1, extraLength); + } -class CFStringInlineBuffer extends ffi.Struct { - @ffi.Array.multi([64]) - external ffi.Array buffer; + void replaceBytesInRange_withBytes_( + NSRange range, ffi.Pointer bytes) { + return _lib._objc_msgSend_307( + _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); + } - external CFStringRef theString; + void resetBytesInRange_(NSRange range) { + return _lib._objc_msgSend_287(_id, _lib._sel_resetBytesInRange_1, range); + } - external ffi.Pointer directUniCharBuffer; + void setData_(NSData? data) { + return _lib._objc_msgSend_306( + _id, _lib._sel_setData_1, data?._id ?? ffi.nullptr); + } - external ffi.Pointer directCStringBuffer; + void replaceBytesInRange_withBytes_length_(NSRange range, + ffi.Pointer replacementBytes, int replacementLength) { + return _lib._objc_msgSend_308( + _id, + _lib._sel_replaceBytesInRange_withBytes_length_1, + range, + replacementBytes, + replacementLength); + } - external CFRange rangeToBuffer; + static NSMutableData dataWithCapacity_( + NativeCupertinoHttp _lib, int aNumItems) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } - @CFIndex() - external int bufferedRangeStart; + static NSMutableData dataWithLength_(NativeCupertinoHttp _lib, int length) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } - @CFIndex() - external int bufferedRangeEnd; -} + NSMutableData initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, capacity); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFTimeZoneNameStyle { - static const int kCFTimeZoneNameStyleStandard = 0; - static const int kCFTimeZoneNameStyleShortStandard = 1; - static const int kCFTimeZoneNameStyleDaylightSaving = 2; - static const int kCFTimeZoneNameStyleShortDaylightSaving = 3; - static const int kCFTimeZoneNameStyleGeneric = 4; - static const int kCFTimeZoneNameStyleShortGeneric = 5; -} + NSMutableData initWithLength_(int length) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithLength_1, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -class __CFCalendar extends ffi.Opaque {} + /// These methods compress or decompress the receiver's contents in-place using the specified algorithm. If the operation is not successful, these methods leave the receiver unchanged.. + bool decompressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_309( + _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); + } -typedef CFCalendarRef = ffi.Pointer<__CFCalendar>; + bool compressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_309( + _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); + } -abstract class CFCalendarUnit { - static const int kCFCalendarUnitEra = 2; - static const int kCFCalendarUnitYear = 4; - static const int kCFCalendarUnitMonth = 8; - static const int kCFCalendarUnitDay = 16; - static const int kCFCalendarUnitHour = 32; - static const int kCFCalendarUnitMinute = 64; - static const int kCFCalendarUnitSecond = 128; - static const int kCFCalendarUnitWeek = 256; - static const int kCFCalendarUnitWeekday = 512; - static const int kCFCalendarUnitWeekdayOrdinal = 1024; - static const int kCFCalendarUnitQuarter = 2048; - static const int kCFCalendarUnitWeekOfMonth = 4096; - static const int kCFCalendarUnitWeekOfYear = 8192; - static const int kCFCalendarUnitYearForWeekOfYear = 16384; -} + static NSMutableData data(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -class __CFDateFormatter extends ffi.Opaque {} + static NSMutableData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, + _lib._sel_dataWithBytes_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFDateFormatterStyle { - static const int kCFDateFormatterNoStyle = 0; - static const int kCFDateFormatterShortStyle = 1; - static const int kCFDateFormatterMediumStyle = 2; - static const int kCFDateFormatterLongStyle = 3; - static const int kCFDateFormatterFullStyle = 4; -} + static NSMutableData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } -abstract class CFISO8601DateFormatOptions { - static const int kCFISO8601DateFormatWithYear = 1; - static const int kCFISO8601DateFormatWithMonth = 2; - static const int kCFISO8601DateFormatWithWeekOfYear = 4; - static const int kCFISO8601DateFormatWithDay = 16; - static const int kCFISO8601DateFormatWithTime = 32; - static const int kCFISO8601DateFormatWithTimeZone = 64; - static const int kCFISO8601DateFormatWithSpaceBetweenDateAndTime = 128; - static const int kCFISO8601DateFormatWithDashSeparatorInDate = 256; - static const int kCFISO8601DateFormatWithColonSeparatorInTime = 512; - static const int kCFISO8601DateFormatWithColonSeparatorInTimeZone = 1024; - static const int kCFISO8601DateFormatWithFractionalSeconds = 2048; - static const int kCFISO8601DateFormatWithFullDate = 275; - static const int kCFISO8601DateFormatWithFullTime = 1632; - static const int kCFISO8601DateFormatWithInternetDateTime = 1907; -} + static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_213(_lib._class_NSMutableData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } -typedef CFDateFormatterRef = ffi.Pointer<__CFDateFormatter>; -typedef CFDateFormatterKey = CFStringRef; + static NSMutableData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -class __CFError extends ffi.Opaque {} + static NSMutableData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -typedef CFErrorDomain = CFStringRef; -typedef CFErrorRef = ffi.Pointer<__CFError>; + static NSMutableData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -class __CFBoolean extends ffi.Opaque {} + static NSMutableData dataWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -typedef CFBooleanRef = ffi.Pointer<__CFBoolean>; + static NSMutableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSMutableData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFNumberType { - static const int kCFNumberSInt8Type = 1; - static const int kCFNumberSInt16Type = 2; - static const int kCFNumberSInt32Type = 3; - static const int kCFNumberSInt64Type = 4; - static const int kCFNumberFloat32Type = 5; - static const int kCFNumberFloat64Type = 6; - static const int kCFNumberCharType = 7; - static const int kCFNumberShortType = 8; - static const int kCFNumberIntType = 9; - static const int kCFNumberLongType = 10; - static const int kCFNumberLongLongType = 11; - static const int kCFNumberFloatType = 12; - static const int kCFNumberDoubleType = 13; - static const int kCFNumberCFIndexType = 14; - static const int kCFNumberNSIntegerType = 15; - static const int kCFNumberCGFloatType = 16; - static const int kCFNumberMaxType = 16; + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } } -class __CFNumber extends ffi.Opaque {} +/// Purgeable Data +class NSPurgeableData extends NSMutableData { + NSPurgeableData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -typedef CFNumberRef = ffi.Pointer<__CFNumber>; + /// Returns a [NSPurgeableData] that points to the same underlying object as [other]. + static NSPurgeableData castFrom(T other) { + return NSPurgeableData._(other._id, other._lib, + retain: true, release: true); + } -class __CFNumberFormatter extends ffi.Opaque {} + /// Returns a [NSPurgeableData] that wraps the given raw object pointer. + static NSPurgeableData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSPurgeableData._(other, lib, retain: retain, release: release); + } -abstract class CFNumberFormatterStyle { - static const int kCFNumberFormatterNoStyle = 0; - static const int kCFNumberFormatterDecimalStyle = 1; - static const int kCFNumberFormatterCurrencyStyle = 2; - static const int kCFNumberFormatterPercentStyle = 3; - static const int kCFNumberFormatterScientificStyle = 4; - static const int kCFNumberFormatterSpellOutStyle = 5; - static const int kCFNumberFormatterOrdinalStyle = 6; - static const int kCFNumberFormatterCurrencyISOCodeStyle = 8; - static const int kCFNumberFormatterCurrencyPluralStyle = 9; - static const int kCFNumberFormatterCurrencyAccountingStyle = 10; -} + /// Returns whether [obj] is an instance of [NSPurgeableData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSPurgeableData1); + } -typedef CFNumberFormatterRef = ffi.Pointer<__CFNumberFormatter>; + static NSPurgeableData dataWithCapacity_( + NativeCupertinoHttp _lib, int aNumItems) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSPurgeableData1, _lib._sel_dataWithCapacity_1, aNumItems); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFNumberFormatterOptionFlags { - static const int kCFNumberFormatterParseIntegersOnly = 1; -} + static NSPurgeableData dataWithLength_(NativeCupertinoHttp _lib, int length) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSPurgeableData1, _lib._sel_dataWithLength_1, length); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -typedef CFNumberFormatterKey = CFStringRef; + static NSPurgeableData data(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_data1); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFNumberFormatterRoundingMode { - static const int kCFNumberFormatterRoundCeiling = 0; - static const int kCFNumberFormatterRoundFloor = 1; - static const int kCFNumberFormatterRoundDown = 2; - static const int kCFNumberFormatterRoundUp = 3; - static const int kCFNumberFormatterRoundHalfEven = 4; - static const int kCFNumberFormatterRoundHalfDown = 5; - static const int kCFNumberFormatterRoundHalfUp = 6; -} + static NSPurgeableData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytes_length_1, bytes, length); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFNumberFormatterPadPosition { - static const int kCFNumberFormatterPadBeforePrefix = 0; - static const int kCFNumberFormatterPadAfterPrefix = 1; - static const int kCFNumberFormatterPadBeforeSuffix = 2; - static const int kCFNumberFormatterPadAfterSuffix = 3; -} + static NSPurgeableData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } -typedef CFPropertyListRef = CFTypeRef; + static NSPurgeableData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_213(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } -abstract class CFURLPathStyle { - static const int kCFURLPOSIXPathStyle = 0; - static const int kCFURLHFSPathStyle = 1; - static const int kCFURLWindowsPathStyle = 2; -} + static NSPurgeableData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -class __CFURL extends ffi.Opaque {} + static NSPurgeableData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -typedef CFURLRef = ffi.Pointer<__CFURL>; + static NSPurgeableData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFURLComponentType { - static const int kCFURLComponentScheme = 1; - static const int kCFURLComponentNetLocation = 2; - static const int kCFURLComponentPath = 3; - static const int kCFURLComponentResourceSpecifier = 4; - static const int kCFURLComponentUser = 5; - static const int kCFURLComponentPassword = 6; - static const int kCFURLComponentUserInfo = 7; - static const int kCFURLComponentHost = 8; - static const int kCFURLComponentPort = 9; - static const int kCFURLComponentParameterString = 10; - static const int kCFURLComponentQuery = 11; - static const int kCFURLComponentFragment = 12; -} + static NSPurgeableData dataWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -class FSRef extends ffi.Opaque {} + static NSPurgeableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSPurgeableData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFURLBookmarkCreationOptions { - static const int kCFURLBookmarkCreationMinimalBookmarkMask = 512; - static const int kCFURLBookmarkCreationSuitableForBookmarkFile = 1024; - static const int kCFURLBookmarkCreationWithSecurityScope = 2048; - static const int kCFURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = - 4096; - static const int kCFURLBookmarkCreationWithoutImplicitSecurityScope = - 536870912; - static const int kCFURLBookmarkCreationPreferFileIDResolutionMask = 256; -} + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -abstract class CFURLBookmarkResolutionOptions { - static const int kCFURLBookmarkResolutionWithoutUIMask = 256; - static const int kCFURLBookmarkResolutionWithoutMountingMask = 512; - static const int kCFURLBookmarkResolutionWithSecurityScope = 1024; - static const int kCFURLBookmarkResolutionWithoutImplicitStartAccessing = - 32768; - static const int kCFBookmarkResolutionWithoutUIMask = 256; - static const int kCFBookmarkResolutionWithoutMountingMask = 512; + static NSPurgeableData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_new1); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } + + static NSPurgeableData alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_alloc1); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } } -typedef CFURLBookmarkFileCreationOptions = CFOptionFlags; +/// Mutable Dictionary +class NSMutableDictionary extends NSDictionary { + NSMutableDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class mach_port_status extends ffi.Struct { - @mach_port_rights_t() - external int mps_pset; + /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. + static NSMutableDictionary castFrom(T other) { + return NSMutableDictionary._(other._id, other._lib, + retain: true, release: true); + } - @mach_port_seqno_t() - external int mps_seqno; + /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. + static NSMutableDictionary castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableDictionary._(other, lib, retain: retain, release: release); + } - @mach_port_mscount_t() - external int mps_mscount; + /// Returns whether [obj] is an instance of [NSMutableDictionary]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableDictionary1); + } - @mach_port_msgcount_t() - external int mps_qlimit; + void removeObjectForKey_(NSObject aKey) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObjectForKey_1, aKey._id); + } - @mach_port_msgcount_t() - external int mps_msgcount; + void setObject_forKey_(NSObject anObject, NSObject aKey) { + return _lib._objc_msgSend_310( + _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); + } - @mach_port_rights_t() - external int mps_sorights; + @override + NSMutableDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - @boolean_t() - external int mps_srights; + NSMutableDictionary initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - @boolean_t() - external int mps_pdrequest; + @override + NSMutableDictionary initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - @boolean_t() - external int mps_nsrequest; + void addEntriesFromDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_311(_id, _lib._sel_addEntriesFromDictionary_1, + otherDictionary?._id ?? ffi.nullptr); + } - @natural_t() - external int mps_flags; -} + void removeAllObjects() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } -typedef mach_port_rights_t = natural_t; -typedef natural_t = __darwin_natural_t; -typedef __darwin_natural_t = ffi.UnsignedInt; -typedef mach_port_seqno_t = natural_t; -typedef mach_port_mscount_t = natural_t; -typedef mach_port_msgcount_t = natural_t; -typedef boolean_t = ffi.Int; + void removeObjectsForKeys_(NSArray? keyArray) { + return _lib._objc_msgSend_291( + _id, _lib._sel_removeObjectsForKeys_1, keyArray?._id ?? ffi.nullptr); + } -class mach_port_limits extends ffi.Struct { - @mach_port_msgcount_t() - external int mpl_qlimit; -} + void setDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_311( + _id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr); + } -class mach_port_info_ext extends ffi.Struct { - external mach_port_status_t mpie_status; + void setObject_forKeyedSubscript_(NSObject obj, NSObject key) { + return _lib._objc_msgSend_310( + _id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id); + } - @mach_port_msgcount_t() - external int mpie_boost_cnt; + static NSMutableDictionary dictionaryWithCapacity_( + NativeCupertinoHttp _lib, int numItems) { + final _ret = _lib._objc_msgSend_94(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - @ffi.Array.multi([6]) - external ffi.Array reserved; -} + static NSMutableDictionary dictionaryWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_312(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -typedef mach_port_status_t = mach_port_status; + static NSMutableDictionary dictionaryWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_313(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -class mach_port_guard_info extends ffi.Struct { - @ffi.Uint64() - external int mpgi_guard; -} + NSMutableDictionary initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_312( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -class mach_port_qos extends ffi.Opaque {} + NSMutableDictionary initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_313( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -class mach_service_port_info extends ffi.Struct { - @ffi.Array.multi([255]) - external ffi.Array mspi_string_name; + /// Create a mutable dictionary which is optimized for dealing with a known set of keys. + /// Keys that are not in the key set can still be set into the dictionary, but that usage is not optimal. + /// As with any dictionary, the keys must be copyable. + /// If keyset is nil, an exception is thrown. + /// If keyset is not an object returned by +sharedKeySetForKeys:, an exception is thrown. + static NSMutableDictionary dictionaryWithSharedKeySet_( + NativeCupertinoHttp _lib, NSObject keyset) { + final _ret = _lib._objc_msgSend_314(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint8() - external int mspi_domain_type; -} + static NSMutableDictionary dictionary(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -class mach_port_options extends ffi.Struct { - @ffi.Uint32() - external int flags; + static NSMutableDictionary dictionaryWithObject_forKey_( + NativeCupertinoHttp _lib, NSObject object, NSObject key) { + final _ret = _lib._objc_msgSend_173(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - external mach_port_limits_t mpl; -} + static NSMutableDictionary dictionaryWithObjects_forKeys_count_( + NativeCupertinoHttp _lib, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_93(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -typedef mach_port_limits_t = mach_port_limits; + static NSMutableDictionary dictionaryWithObjectsAndKeys_( + NativeCupertinoHttp _lib, NSObject firstObject) { + final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -abstract class mach_port_guard_exception_codes { - static const int kGUARD_EXC_DESTROY = 1; - static const int kGUARD_EXC_MOD_REFS = 2; - static const int kGUARD_EXC_SET_CONTEXT = 4; - static const int kGUARD_EXC_UNGUARDED = 8; - static const int kGUARD_EXC_INCORRECT_GUARD = 16; - static const int kGUARD_EXC_IMMOVABLE = 32; - static const int kGUARD_EXC_STRICT_REPLY = 64; - static const int kGUARD_EXC_MSG_FILTERED = 128; - static const int kGUARD_EXC_INVALID_RIGHT = 256; - static const int kGUARD_EXC_INVALID_NAME = 512; - static const int kGUARD_EXC_INVALID_VALUE = 1024; - static const int kGUARD_EXC_INVALID_ARGUMENT = 2048; - static const int kGUARD_EXC_RIGHT_EXISTS = 4096; - static const int kGUARD_EXC_KERN_NO_SPACE = 8192; - static const int kGUARD_EXC_KERN_FAILURE = 16384; - static const int kGUARD_EXC_KERN_RESOURCE = 32768; - static const int kGUARD_EXC_SEND_INVALID_REPLY = 65536; - static const int kGUARD_EXC_SEND_INVALID_VOUCHER = 131072; - static const int kGUARD_EXC_SEND_INVALID_RIGHT = 262144; - static const int kGUARD_EXC_RCV_INVALID_NAME = 524288; - static const int kGUARD_EXC_RCV_GUARDED_DESC = 1048576; - static const int kGUARD_EXC_MOD_REFS_NON_FATAL = 2097152; - static const int kGUARD_EXC_IMMOVABLE_NON_FATAL = 4194304; -} + static NSMutableDictionary dictionaryWithDictionary_( + NativeCupertinoHttp _lib, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_174(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -class __CFRunLoop extends ffi.Opaque {} + static NSMutableDictionary dictionaryWithObjects_forKeys_( + NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_175( + _lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -class __CFRunLoopSource extends ffi.Opaque {} + /// Reads dictionary stored in NSPropertyList format from the specified url. + static NSDictionary dictionaryWithContentsOfURL_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_177( + _lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } -class __CFRunLoopObserver extends ffi.Opaque {} + /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. + /// The keys are copied from the array and must be copyable. + /// If the array parameter is nil or not an NSArray, an exception is thrown. + /// If the array of keys is empty, an empty key set is returned. + /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). + /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. + /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. + static NSObject sharedKeySetForKeys_( + NativeCupertinoHttp _lib, NSArray? keys) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableDictionary1, + _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -class __CFRunLoopTimer extends ffi.Opaque {} + static NSMutableDictionary new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } -abstract class CFRunLoopRunResult { - static const int kCFRunLoopRunFinished = 1; - static const int kCFRunLoopRunStopped = 2; - static const int kCFRunLoopRunTimedOut = 3; - static const int kCFRunLoopRunHandledSource = 4; + static NSMutableDictionary alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_alloc1); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } } -abstract class CFRunLoopActivity { - static const int kCFRunLoopEntry = 1; - static const int kCFRunLoopBeforeTimers = 2; - static const int kCFRunLoopBeforeSources = 4; - static const int kCFRunLoopBeforeWaiting = 32; - static const int kCFRunLoopAfterWaiting = 64; - static const int kCFRunLoopExit = 128; - static const int kCFRunLoopAllActivities = 268435455; -} +class NSNotification extends NSObject { + NSNotification._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -typedef CFRunLoopMode = CFStringRef; -typedef CFRunLoopRef = ffi.Pointer<__CFRunLoop>; -typedef CFRunLoopSourceRef = ffi.Pointer<__CFRunLoopSource>; -typedef CFRunLoopObserverRef = ffi.Pointer<__CFRunLoopObserver>; -typedef CFRunLoopTimerRef = ffi.Pointer<__CFRunLoopTimer>; + /// Returns a [NSNotification] that points to the same underlying object as [other]. + static NSNotification castFrom(T other) { + return NSNotification._(other._id, other._lib, retain: true, release: true); + } -class CFRunLoopSourceContext extends ffi.Struct { - @CFIndex() - external int version; + /// Returns a [NSNotification] that wraps the given raw object pointer. + static NSNotification castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNotification._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNotification]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSNotification1); + } + + NSNotificationName get name { + return _lib._objc_msgSend_32(_id, _lib._sel_name1); + } - external ffi.Pointer info; + NSObject get object { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } - external ffi - .Pointer)>> - release; + NSNotification initWithName_object_userInfo_( + NSNotificationName name, NSObject object, NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_315( + _id, + _lib._sel_initWithName_object_userInfo_1, + name, + object._id, + userInfo?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; + NSNotification initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>> - equal; + static NSNotification notificationWithName_object_( + NativeCupertinoHttp _lib, NSNotificationName aName, NSObject anObject) { + final _ret = _lib._objc_msgSend_258(_lib._class_NSNotification1, + _lib._sel_notificationWithName_object_1, aName, anObject._id); + return NSNotification._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction)>> hash; + static NSNotification notificationWithName_object_userInfo_( + NativeCupertinoHttp _lib, + NSNotificationName aName, + NSObject anObject, + NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_315( + _lib._class_NSNotification1, + _lib._sel_notificationWithName_object_userInfo_1, + aName, + anObject._id, + aUserInfo?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, CFRunLoopRef, CFRunLoopMode)>> schedule; + @override + NSNotification init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSNotification._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, CFRunLoopRef, CFRunLoopMode)>> cancel; + static NSNotification new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); + return NSNotification._(_ret, _lib, retain: false, release: true); + } - external ffi - .Pointer)>> - perform; + static NSNotification alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); + return NSNotification._(_ret, _lib, retain: false, release: true); + } } -class CFRunLoopSourceContext1 extends ffi.Struct { - @CFIndex() - external int version; +typedef NSNotificationName = ffi.Pointer; - external ffi.Pointer info; +class NSNotificationCenter extends NSObject { + NSNotificationCenter._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + /// Returns a [NSNotificationCenter] that points to the same underlying object as [other]. + static NSNotificationCenter castFrom(T other) { + return NSNotificationCenter._(other._id, other._lib, + retain: true, release: true); + } - external ffi - .Pointer)>> - release; + /// Returns a [NSNotificationCenter] that wraps the given raw object pointer. + static NSNotificationCenter castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNotificationCenter._(other, lib, retain: retain, release: release); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; + /// Returns whether [obj] is an instance of [NSNotificationCenter]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSNotificationCenter1); + } - external ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>> - equal; + static NSNotificationCenter? getDefaultCenter(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_316( + _lib._class_NSNotificationCenter1, _lib._sel_defaultCenter1); + return _ret.address == 0 + ? null + : NSNotificationCenter._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction)>> hash; + void addObserver_selector_name_object_( + NSObject observer, + ffi.Pointer aSelector, + NSNotificationName aName, + NSObject anObject) { + return _lib._objc_msgSend_317( + _id, + _lib._sel_addObserver_selector_name_object_1, + observer._id, + aSelector, + aName, + anObject._id); + } - external ffi.Pointer< - ffi.NativeFunction)>> getPort; + void postNotification_(NSNotification? notification) { + return _lib._objc_msgSend_318( + _id, _lib._sel_postNotification_1, notification?._id ?? ffi.nullptr); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, CFIndex, - CFAllocatorRef, ffi.Pointer)>> perform; -} + void postNotificationName_object_( + NSNotificationName aName, NSObject anObject) { + return _lib._objc_msgSend_319( + _id, _lib._sel_postNotificationName_object_1, aName, anObject._id); + } -typedef mach_port_t = __darwin_mach_port_t; -typedef __darwin_mach_port_t = __darwin_mach_port_name_t; -typedef __darwin_mach_port_name_t = __darwin_natural_t; + void postNotificationName_object_userInfo_( + NSNotificationName aName, NSObject anObject, NSDictionary? aUserInfo) { + return _lib._objc_msgSend_320( + _id, + _lib._sel_postNotificationName_object_userInfo_1, + aName, + anObject._id, + aUserInfo?._id ?? ffi.nullptr); + } -class CFRunLoopObserverContext extends ffi.Struct { - @CFIndex() - external int version; + void removeObserver_(NSObject observer) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObserver_1, observer._id); + } - external ffi.Pointer info; + void removeObserver_name_object_( + NSObject observer, NSNotificationName aName, NSObject anObject) { + return _lib._objc_msgSend_321(_id, _lib._sel_removeObserver_name_object_1, + observer._id, aName, anObject._id); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + NSObject addObserverForName_object_queue_usingBlock_(NSNotificationName name, + NSObject obj, NSOperationQueue? queue, ObjCBlock19 block) { + final _ret = _lib._objc_msgSend_350( + _id, + _lib._sel_addObserverForName_object_queue_usingBlock_1, + name, + obj._id, + queue?._id ?? ffi.nullptr, + block._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external ffi - .Pointer)>> - release; + static NSNotificationCenter new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotificationCenter1, _lib._sel_new1); + return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; + static NSNotificationCenter alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSNotificationCenter1, _lib._sel_alloc1); + return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + } } -typedef CFRunLoopObserverCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFRunLoopObserverRef, ffi.Int32, ffi.Pointer)>>; -void _ObjCBlock21_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() - .asFunction< - void Function(CFRunLoopObserverRef arg0, int arg1)>()(arg0, arg1); -} +class NSOperationQueue extends NSObject { + NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -final _ObjCBlock21_closureRegistry = {}; -int _ObjCBlock21_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock21_registerClosure(Function fn) { - final id = ++_ObjCBlock21_closureRegistryIndex; - _ObjCBlock21_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. + static NSOperationQueue castFrom(T other) { + return NSOperationQueue._(other._id, other._lib, + retain: true, release: true); + } -void _ObjCBlock21_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { - return _ObjCBlock21_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + /// Returns a [NSOperationQueue] that wraps the given raw object pointer. + static NSOperationQueue castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOperationQueue._(other, lib, retain: retain, release: release); + } -class ObjCBlock21 extends _ObjCBlockBase { - ObjCBlock21._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSOperationQueue]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOperationQueue1); + } - /// Creates a block from a C function pointer. - ObjCBlock21.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>> - ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, - ffi.Int32 arg1)>(_ObjCBlock21_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// @property progress + /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue + /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the + /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the + /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super + /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress + /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% + /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 + /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be + /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by + /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving + /// progress scenario. + /// + /// @example + /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; + /// queue.progress.totalUnitCount = 10; + NSProgress? get progress { + final _ret = _lib._objc_msgSend_322(_id, _lib._sel_progress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock21.fromFunction(NativeCupertinoHttp lib, - void Function(CFRunLoopObserverRef arg0, int arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, - ffi.Int32 arg1)>(_ObjCBlock21_closureTrampoline) - .cast(), - _ObjCBlock21_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(CFRunLoopObserverRef arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, int arg1)>()(_id, arg0, arg1); + void addOperation_(NSOperation? op) { + return _lib._objc_msgSend_338( + _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { + return _lib._objc_msgSend_344( + _id, + _lib._sel_addOperations_waitUntilFinished_1, + ops?._id ?? ffi.nullptr, + wait); + } -class CFRunLoopTimerContext extends ffi.Struct { - @CFIndex() - external int version; + void addOperationWithBlock_(ObjCBlock block) { + return _lib._objc_msgSend_345( + _id, _lib._sel_addOperationWithBlock_1, block._id); + } - external ffi.Pointer info; + /// @method addBarrierBlock: + /// @param barrier A block to execute + /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and + /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the + /// `dispatch_barrier_async` function. + void addBarrierBlock_(ObjCBlock barrier) { + return _lib._objc_msgSend_345( + _id, _lib._sel_addBarrierBlock_1, barrier._id); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + int get maxConcurrentOperationCount { + return _lib._objc_msgSend_81(_id, _lib._sel_maxConcurrentOperationCount1); + } - external ffi - .Pointer)>> - release; + set maxConcurrentOperationCount(int value) { + _lib._objc_msgSend_346( + _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + bool get suspended { + return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); + } -typedef CFRunLoopTimerCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, ffi.Pointer)>>; -void _ObjCBlock22_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); -} + set suspended(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setSuspended_1, value); + } -final _ObjCBlock22_closureRegistry = {}; -int _ObjCBlock22_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock22_registerClosure(Function fn) { - final id = ++_ObjCBlock22_closureRegistryIndex; - _ObjCBlock22_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock22_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { - return _ObjCBlock22_closureRegistry[block.ref.target.address]!(arg0); -} + set name(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } -class ObjCBlock22 extends _ObjCBlockBase { - ObjCBlock22._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + int get qualityOfService { + return _lib._objc_msgSend_342(_id, _lib._sel_qualityOfService1); + } - /// Creates a block from a C function pointer. - ObjCBlock22.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopTimerRef arg0)>( - _ObjCBlock22_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + set qualityOfService(int value) { + _lib._objc_msgSend_343(_id, _lib._sel_setQualityOfService_1, value); + } - /// Creates a block from a Dart function. - ObjCBlock22.fromFunction( - NativeCupertinoHttp lib, void Function(CFRunLoopTimerRef arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopTimerRef arg0)>( - _ObjCBlock22_closureTrampoline) - .cast(), - _ObjCBlock22_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(CFRunLoopTimerRef arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopTimerRef arg0)>()(_id, arg0); + /// actually retain + dispatch_queue_t get underlyingQueue { + return _lib._objc_msgSend_347(_id, _lib._sel_underlyingQueue1); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// actually retain + set underlyingQueue(dispatch_queue_t value) { + _lib._objc_msgSend_348(_id, _lib._sel_setUnderlyingQueue_1, value); + } -class __CFSocket extends ffi.Opaque {} + void cancelAllOperations() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + } -abstract class CFSocketError { - static const int kCFSocketSuccess = 0; - static const int kCFSocketError = -1; - static const int kCFSocketTimeout = -2; -} + void waitUntilAllOperationsAreFinished() { + return _lib._objc_msgSend_1( + _id, _lib._sel_waitUntilAllOperationsAreFinished1); + } -class CFSocketSignature extends ffi.Struct { - @SInt32() - external int protocolFamily; + static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_349( + _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } - @SInt32() - external int socketType; + static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_349( + _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } - @SInt32() - external int protocol; + /// These two functions are inherently a race condition and should be avoided if possible + NSArray? get operations { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_operations1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } - external CFDataRef address; -} + int get operationCount { + return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); + } -abstract class CFSocketCallBackType { - static const int kCFSocketNoCallBack = 0; - static const int kCFSocketReadCallBack = 1; - static const int kCFSocketAcceptCallBack = 2; - static const int kCFSocketDataCallBack = 3; - static const int kCFSocketConnectCallBack = 4; - static const int kCFSocketWriteCallBack = 8; + static NSOperationQueue new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } + + static NSOperationQueue alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } } -class CFSocketContext extends ffi.Struct { - @CFIndex() - external int version; +class NSProgress extends NSObject { + NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSProgress] that points to the same underlying object as [other]. + static NSProgress castFrom(T other) { + return NSProgress._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSProgress] that wraps the given raw object pointer. + static NSProgress castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSProgress._(other, lib, retain: retain, release: release); + } - external ffi.Pointer info; + /// Returns whether [obj] is an instance of [NSProgress]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + static NSProgress currentProgress(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_322( + _lib._class_NSProgress1, _lib._sel_currentProgress1); + return NSProgress._(_ret, _lib, retain: true, release: true); + } - external ffi - .Pointer)>> - release; + static NSProgress progressWithTotalUnitCount_( + NativeCupertinoHttp _lib, int unitCount) { + final _ret = _lib._objc_msgSend_323(_lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + static NSProgress discreteProgressWithTotalUnitCount_( + NativeCupertinoHttp _lib, int unitCount) { + final _ret = _lib._objc_msgSend_323(_lib._class_NSProgress1, + _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -typedef CFSocketRef = ffi.Pointer<__CFSocket>; -typedef CFSocketCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFSocketRef, ffi.Int32, CFDataRef, - ffi.Pointer, ffi.Pointer)>>; -typedef CFSocketNativeHandle = ffi.Int; + static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( + NativeCupertinoHttp _lib, + int unitCount, + NSProgress? parent, + int portionOfParentTotalUnitCount) { + final _ret = _lib._objc_msgSend_324( + _lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, + unitCount, + parent?._id ?? ffi.nullptr, + portionOfParentTotalUnitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -class accessx_descriptor extends ffi.Struct { - @ffi.UnsignedInt() - external int ad_name_offset; + NSProgress initWithParent_userInfo_( + NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { + final _ret = _lib._objc_msgSend_325( + _id, + _lib._sel_initWithParent_userInfo_1, + parentProgressOrNil?._id ?? ffi.nullptr, + userInfoOrNil?._id ?? ffi.nullptr); + return NSProgress._(_ret, _lib, retain: true, release: true); + } - @ffi.Int() - external int ad_flags; + void becomeCurrentWithPendingUnitCount_(int unitCount) { + return _lib._objc_msgSend_326( + _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + } - @ffi.Array.multi([2]) - external ffi.Array ad_pad; -} + void performAsCurrentWithPendingUnitCount_usingBlock_( + int unitCount, ObjCBlock work) { + return _lib._objc_msgSend_327( + _id, + _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, + unitCount, + work._id); + } -typedef gid_t = __darwin_gid_t; -typedef __darwin_gid_t = __uint32_t; -typedef useconds_t = __darwin_useconds_t; -typedef __darwin_useconds_t = __uint32_t; + void resignCurrent() { + return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + } -class fssearchblock extends ffi.Opaque {} + void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { + return _lib._objc_msgSend_328( + _id, + _lib._sel_addChild_withPendingUnitCount_1, + child?._id ?? ffi.nullptr, + inUnitCount); + } -class searchstate extends ffi.Opaque {} + int get totalUnitCount { + return _lib._objc_msgSend_329(_id, _lib._sel_totalUnitCount1); + } -class flock extends ffi.Struct { - @off_t() - external int l_start; + set totalUnitCount(int value) { + _lib._objc_msgSend_330(_id, _lib._sel_setTotalUnitCount_1, value); + } - @off_t() - external int l_len; + int get completedUnitCount { + return _lib._objc_msgSend_329(_id, _lib._sel_completedUnitCount1); + } - @pid_t() - external int l_pid; + set completedUnitCount(int value) { + _lib._objc_msgSend_330(_id, _lib._sel_setCompletedUnitCount_1, value); + } - @ffi.Short() - external int l_type; + NSString? get localizedDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Short() - external int l_whence; -} + set localizedDescription(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); + } -class flocktimeout extends ffi.Struct { - external flock fl; + NSString? get localizedAdditionalDescription { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedAdditionalDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - external timespec timeout; -} + set localizedAdditionalDescription(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setLocalizedAdditionalDescription_1, + value?._id ?? ffi.nullptr); + } -class radvisory extends ffi.Struct { - @off_t() - external int ra_offset; + bool get cancellable { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); + } - @ffi.Int() - external int ra_count; -} + set cancellable(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setCancellable_1, value); + } -class fsignatures extends ffi.Struct { - @off_t() - external int fs_file_start; + bool get pausable { + return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); + } - external ffi.Pointer fs_blob_start; + set pausable(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setPausable_1, value); + } - @ffi.Size() - external int fs_blob_size; + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + } - @ffi.Size() - external int fs_fsignatures_size; + bool get paused { + return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); + } - @ffi.Array.multi([20]) - external ffi.Array fs_cdhash; + ObjCBlock get cancellationHandler { + final _ret = _lib._objc_msgSend_333(_id, _lib._sel_cancellationHandler1); + return ObjCBlock._(_ret, _lib); + } - @ffi.Int() - external int fs_hash_type; -} + set cancellationHandler(ObjCBlock value) { + _lib._objc_msgSend_334(_id, _lib._sel_setCancellationHandler_1, value._id); + } -class fsupplement extends ffi.Struct { - @off_t() - external int fs_file_start; + ObjCBlock get pausingHandler { + final _ret = _lib._objc_msgSend_333(_id, _lib._sel_pausingHandler1); + return ObjCBlock._(_ret, _lib); + } - @off_t() - external int fs_blob_start; + set pausingHandler(ObjCBlock value) { + _lib._objc_msgSend_334(_id, _lib._sel_setPausingHandler_1, value._id); + } - @ffi.Size() - external int fs_blob_size; + ObjCBlock get resumingHandler { + final _ret = _lib._objc_msgSend_333(_id, _lib._sel_resumingHandler1); + return ObjCBlock._(_ret, _lib); + } - @ffi.Int() - external int fs_orig_fd; -} + set resumingHandler(ObjCBlock value) { + _lib._objc_msgSend_334(_id, _lib._sel_setResumingHandler_1, value._id); + } -class fchecklv extends ffi.Struct { - @off_t() - external int lv_file_start; + void setUserInfoObject_forKey_( + NSObject objectOrNil, NSProgressUserInfoKey key) { + return _lib._objc_msgSend_189( + _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); + } - @ffi.Size() - external int lv_error_message_size; + bool get indeterminate { + return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); + } - external ffi.Pointer lv_error_message; -} + double get fractionCompleted { + return _lib._objc_msgSend_85(_id, _lib._sel_fractionCompleted1); + } -class fgetsigsinfo extends ffi.Struct { - @off_t() - external int fg_file_start; + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + } - @ffi.Int() - external int fg_info_request; + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } - @ffi.Int() - external int fg_sig_is_platform; -} + void pause() { + return _lib._objc_msgSend_1(_id, _lib._sel_pause1); + } -class fstore extends ffi.Struct { - @ffi.UnsignedInt() - external int fst_flags; + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } - @ffi.Int() - external int fst_posmode; + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } - @off_t() - external int fst_offset; + NSProgressKind get kind { + return _lib._objc_msgSend_32(_id, _lib._sel_kind1); + } - @off_t() - external int fst_length; + set kind(NSProgressKind value) { + _lib._objc_msgSend_331(_id, _lib._sel_setKind_1, value); + } - @off_t() - external int fst_bytesalloc; -} + NSNumber? get estimatedTimeRemaining { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_estimatedTimeRemaining1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } -class fpunchhole extends ffi.Struct { - @ffi.UnsignedInt() - external int fp_flags; + set estimatedTimeRemaining(NSNumber? value) { + _lib._objc_msgSend_335( + _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + } - @ffi.UnsignedInt() - external int reserved; + NSNumber? get throughput { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_throughput1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } - @off_t() - external int fp_offset; + set throughput(NSNumber? value) { + _lib._objc_msgSend_335( + _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + } - @off_t() - external int fp_length; -} + NSProgressFileOperationKind get fileOperationKind { + return _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); + } -class ftrimactivefile extends ffi.Struct { - @off_t() - external int fta_offset; + set fileOperationKind(NSProgressFileOperationKind value) { + _lib._objc_msgSend_331(_id, _lib._sel_setFileOperationKind_1, value); + } - @off_t() - external int fta_length; -} + NSURL? get fileURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -class fspecread extends ffi.Struct { - @ffi.UnsignedInt() - external int fsr_flags; + set fileURL(NSURL? value) { + _lib._objc_msgSend_336( + _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + } - @ffi.UnsignedInt() - external int reserved; + NSNumber? get fileTotalCount { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileTotalCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } - @off_t() - external int fsr_offset; + set fileTotalCount(NSNumber? value) { + _lib._objc_msgSend_335( + _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + } - @off_t() - external int fsr_length; -} + NSNumber? get fileCompletedCount { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileCompletedCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } -class fbootstraptransfer extends ffi.Struct { - @off_t() - external int fbt_offset; + set fileCompletedCount(NSNumber? value) { + _lib._objc_msgSend_335( + _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); + } - @ffi.Size() - external int fbt_length; + void publish() { + return _lib._objc_msgSend_1(_id, _lib._sel_publish1); + } - external ffi.Pointer fbt_buffer; -} + void unpublish() { + return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + } -@ffi.Packed(4) -class log2phys extends ffi.Struct { - @ffi.UnsignedInt() - external int l2p_flags; + static NSObject addSubscriberForFileURL_withPublishingHandler_( + NativeCupertinoHttp _lib, + NSURL? url, + NSProgressPublishingHandler publishingHandler) { + final _ret = _lib._objc_msgSend_337( + _lib._class_NSProgress1, + _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, + url?._id ?? ffi.nullptr, + publishingHandler); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @off_t() - external int l2p_contigbytes; + static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { + return _lib._objc_msgSend_200( + _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + } - @off_t() - external int l2p_devoffset; -} + bool get old { + return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); + } -class _filesec extends ffi.Opaque {} + static NSProgress new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } -abstract class filesec_property_t { - static const int FILESEC_OWNER = 1; - static const int FILESEC_GROUP = 2; - static const int FILESEC_UUID = 3; - static const int FILESEC_MODE = 4; - static const int FILESEC_ACL = 5; - static const int FILESEC_GRPUUID = 6; - static const int FILESEC_ACL_RAW = 100; - static const int FILESEC_ACL_ALLOCSIZE = 101; + static NSProgress alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } } -typedef filesec_t = ffi.Pointer<_filesec>; - -abstract class os_clockid_t { - static const int OS_CLOCK_MACH_ABSOLUTE_TIME = 32; +typedef NSProgressUserInfoKey = ffi.Pointer; +typedef NSProgressKind = ffi.Pointer; +typedef NSProgressFileOperationKind = ffi.Pointer; +typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; +NSProgressUnpublishingHandler _ObjCBlock18_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>()(arg0); } -class os_workgroup_attr_opaque_s extends ffi.Struct { - @ffi.Uint32() - external int sig; +final _ObjCBlock18_closureRegistry = {}; +int _ObjCBlock18_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock18_registerClosure(Function fn) { + final id = ++_ObjCBlock18_closureRegistryIndex; + _ObjCBlock18_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Array.multi([60]) - external ffi.Array opaque; +NSProgressUnpublishingHandler _ObjCBlock18_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock18_closureRegistry[block.ref.target.address]!(arg0); } -class os_workgroup_interval_data_opaque_s extends ffi.Struct { - @ffi.Uint32() - external int sig; +class ObjCBlock18 extends _ObjCBlockBase { + ObjCBlock18._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Array.multi([56]) - external ffi.Array opaque; -} + /// Creates a block from a C function pointer. + ObjCBlock18.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock18_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -class os_workgroup_join_token_opaque_s extends ffi.Struct { - @ffi.Uint32() - external int sig; + /// Creates a block from a Dart function. + ObjCBlock18.fromFunction(NativeCupertinoHttp lib, + NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock18_closureTrampoline) + .cast(), + _ObjCBlock18_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + NSProgressUnpublishingHandler call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } - @ffi.Array.multi([36]) - external ffi.Array opaque; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -class OS_os_workgroup extends OS_object { - OS_os_workgroup._(ffi.Pointer id, NativeCupertinoHttp lib, +typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; + +class NSOperation extends NSObject { + NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [OS_os_workgroup] that points to the same underlying object as [other]. - static OS_os_workgroup castFrom(T other) { - return OS_os_workgroup._(other._id, other._lib, - retain: true, release: true); + /// Returns a [NSOperation] that points to the same underlying object as [other]. + static NSOperation castFrom(T other) { + return NSOperation._(other._id, other._lib, retain: true, release: true); } - /// Returns a [OS_os_workgroup] that wraps the given raw object pointer. - static OS_os_workgroup castFromPointer( + /// Returns a [NSOperation] that wraps the given raw object pointer. + static NSOperation castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return OS_os_workgroup._(other, lib, retain: retain, release: release); + return NSOperation._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [OS_os_workgroup]. + /// Returns whether [obj] is an instance of [NSOperation]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_OS_os_workgroup1); - } - - @override - OS_os_workgroup init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_os_workgroup._(_ret, _lib, retain: true, release: true); - } - - static OS_os_workgroup new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_OS_os_workgroup1, _lib._sel_new1); - return OS_os_workgroup._(_ret, _lib, retain: false, release: true); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); } - static OS_os_workgroup alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_OS_os_workgroup1, _lib._sel_alloc1); - return OS_os_workgroup._(_ret, _lib, retain: false, release: true); + void start() { + return _lib._objc_msgSend_1(_id, _lib._sel_start1); } -} -typedef os_workgroup_t = ffi.Pointer; -typedef os_workgroup_join_token_t - = ffi.Pointer; -typedef os_workgroup_working_arena_destructor_t - = ffi.Pointer)>>; -typedef os_workgroup_index = ffi.Uint32; + void main() { + return _lib._objc_msgSend_1(_id, _lib._sel_main1); + } -class os_workgroup_max_parallel_threads_attr_s extends ffi.Opaque {} + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + } -typedef os_workgroup_mpt_attr_t - = ffi.Pointer; + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } -class OS_os_workgroup_interval extends OS_os_workgroup { - OS_os_workgroup_interval._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + bool get executing { + return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); + } - /// Returns a [OS_os_workgroup_interval] that points to the same underlying object as [other]. - static OS_os_workgroup_interval castFrom(T other) { - return OS_os_workgroup_interval._(other._id, other._lib, - retain: true, release: true); + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); } - /// Returns a [OS_os_workgroup_interval] that wraps the given raw object pointer. - static OS_os_workgroup_interval castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return OS_os_workgroup_interval._(other, lib, - retain: retain, release: release); + /// To be deprecated; use and override 'asynchronous' below + bool get concurrent { + return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); } - /// Returns whether [obj] is an instance of [OS_os_workgroup_interval]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_OS_os_workgroup_interval1); + bool get asynchronous { + return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); } - @override - OS_os_workgroup_interval init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_os_workgroup_interval._(_ret, _lib, retain: true, release: true); + bool get ready { + return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); } - static OS_os_workgroup_interval new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_OS_os_workgroup_interval1, _lib._sel_new1); - return OS_os_workgroup_interval._(_ret, _lib, retain: false, release: true); + void addDependency_(NSOperation? op) { + return _lib._objc_msgSend_338( + _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); } - static OS_os_workgroup_interval alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_OS_os_workgroup_interval1, _lib._sel_alloc1); - return OS_os_workgroup_interval._(_ret, _lib, retain: false, release: true); + void removeDependency_(NSOperation? op) { + return _lib._objc_msgSend_338( + _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); } -} -typedef os_workgroup_interval_t = ffi.Pointer; -typedef os_workgroup_interval_data_t - = ffi.Pointer; + NSArray? get dependencies { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_dependencies1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -class OS_os_workgroup_parallel extends OS_os_workgroup { - OS_os_workgroup_parallel._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + int get queuePriority { + return _lib._objc_msgSend_339(_id, _lib._sel_queuePriority1); + } - /// Returns a [OS_os_workgroup_parallel] that points to the same underlying object as [other]. - static OS_os_workgroup_parallel castFrom(T other) { - return OS_os_workgroup_parallel._(other._id, other._lib, - retain: true, release: true); + set queuePriority(int value) { + _lib._objc_msgSend_340(_id, _lib._sel_setQueuePriority_1, value); } - /// Returns a [OS_os_workgroup_parallel] that wraps the given raw object pointer. - static OS_os_workgroup_parallel castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return OS_os_workgroup_parallel._(other, lib, - retain: retain, release: release); + ObjCBlock get completionBlock { + final _ret = _lib._objc_msgSend_333(_id, _lib._sel_completionBlock1); + return ObjCBlock._(_ret, _lib); } - /// Returns whether [obj] is an instance of [OS_os_workgroup_parallel]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_OS_os_workgroup_parallel1); + set completionBlock(ObjCBlock value) { + _lib._objc_msgSend_334(_id, _lib._sel_setCompletionBlock_1, value._id); } - @override - OS_os_workgroup_parallel init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_os_workgroup_parallel._(_ret, _lib, retain: true, release: true); + void waitUntilFinished() { + return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); } - static OS_os_workgroup_parallel new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_OS_os_workgroup_parallel1, _lib._sel_new1); - return OS_os_workgroup_parallel._(_ret, _lib, retain: false, release: true); + double get threadPriority { + return _lib._objc_msgSend_85(_id, _lib._sel_threadPriority1); } - static OS_os_workgroup_parallel alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_OS_os_workgroup_parallel1, _lib._sel_alloc1); - return OS_os_workgroup_parallel._(_ret, _lib, retain: false, release: true); + set threadPriority(double value) { + _lib._objc_msgSend_341(_id, _lib._sel_setThreadPriority_1, value); } -} -typedef os_workgroup_parallel_t = ffi.Pointer; -typedef os_workgroup_attr_t = ffi.Pointer; + int get qualityOfService { + return _lib._objc_msgSend_342(_id, _lib._sel_qualityOfService1); + } -class time_value extends ffi.Struct { - @integer_t() - external int seconds; + set qualityOfService(int value) { + _lib._objc_msgSend_343(_id, _lib._sel_setQualityOfService_1, value); + } - @integer_t() - external int microseconds; -} + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -typedef integer_t = ffi.Int; + set name(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } -class mach_timespec extends ffi.Struct { - @ffi.UnsignedInt() - external int tv_sec; + static NSOperation new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); + return NSOperation._(_ret, _lib, retain: false, release: true); + } - @clock_res_t() - external int tv_nsec; + static NSOperation alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); + return NSOperation._(_ret, _lib, retain: false, release: true); + } } -typedef clock_res_t = ffi.Int; -typedef dispatch_time_t = ffi.Uint64; - -abstract class qos_class_t { - static const int QOS_CLASS_USER_INTERACTIVE = 33; - static const int QOS_CLASS_USER_INITIATED = 25; - static const int QOS_CLASS_DEFAULT = 21; - static const int QOS_CLASS_UTILITY = 17; - static const int QOS_CLASS_BACKGROUND = 9; - static const int QOS_CLASS_UNSPECIFIED = 0; +abstract class NSOperationQueuePriority { + static const int NSOperationQueuePriorityVeryLow = -8; + static const int NSOperationQueuePriorityLow = -4; + static const int NSOperationQueuePriorityNormal = 0; + static const int NSOperationQueuePriorityHigh = 4; + static const int NSOperationQueuePriorityVeryHigh = 8; } -typedef dispatch_object_t = ffi.Pointer; -typedef dispatch_function_t - = ffi.Pointer)>>; -typedef dispatch_block_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock23_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { +typedef dispatch_queue_t = ffi.Pointer; +void _ObjCBlock19_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { return block.ref.target - .cast>() - .asFunction()(arg0); + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); } -final _ObjCBlock23_closureRegistry = {}; -int _ObjCBlock23_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock23_registerClosure(Function fn) { - final id = ++_ObjCBlock23_closureRegistryIndex; - _ObjCBlock23_closureRegistry[id] = fn; +final _ObjCBlock19_closureRegistry = {}; +int _ObjCBlock19_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock19_registerClosure(Function fn) { + final id = ++_ObjCBlock19_closureRegistryIndex; + _ObjCBlock19_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock23_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock23_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock19_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock19_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock23 extends _ObjCBlockBase { - ObjCBlock23._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock19 extends _ObjCBlockBase { + ObjCBlock19._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock23.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) + ObjCBlock19.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Size arg0)>(_ObjCBlock23_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock19_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock23.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + ObjCBlock19.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Size arg0)>(_ObjCBlock23_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock19_closureTrampoline) .cast(), - _ObjCBlock23_registerClosure(fn)), + _ObjCBlock19_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0) { + void call(ffi.Pointer arg0) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Size arg0)>>() + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); } ffi.Pointer<_ObjCBlock> get pointer => _id; } -class dispatch_queue_s extends ffi.Opaque {} - -typedef dispatch_queue_global_t = ffi.Pointer; -typedef uintptr_t = ffi.UnsignedLong; - -class dispatch_queue_attr_s extends ffi.Opaque {} - -typedef dispatch_queue_attr_t = ffi.Pointer; +class NSDate extends NSObject { + NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -abstract class dispatch_autorelease_frequency_t { - static const int DISPATCH_AUTORELEASE_FREQUENCY_INHERIT = 0; - static const int DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM = 1; - static const int DISPATCH_AUTORELEASE_FREQUENCY_NEVER = 2; -} + /// Returns a [NSDate] that points to the same underlying object as [other]. + static NSDate castFrom(T other) { + return NSDate._(other._id, other._lib, retain: true, release: true); + } -abstract class dispatch_block_flags_t { - static const int DISPATCH_BLOCK_BARRIER = 1; - static const int DISPATCH_BLOCK_DETACHED = 2; - static const int DISPATCH_BLOCK_ASSIGN_CURRENT = 4; - static const int DISPATCH_BLOCK_NO_QOS_CLASS = 8; - static const int DISPATCH_BLOCK_INHERIT_QOS_CLASS = 16; - static const int DISPATCH_BLOCK_ENFORCE_QOS_CLASS = 32; -} + /// Returns a [NSDate] that wraps the given raw object pointer. + static NSDate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDate._(other, lib, retain: retain, release: release); + } -class mach_msg_type_descriptor_t extends ffi.Opaque {} + /// Returns whether [obj] is an instance of [NSDate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); + } -class mach_msg_port_descriptor_t extends ffi.Opaque {} + double get timeIntervalSinceReferenceDate { + return _lib._objc_msgSend_85( + _id, _lib._sel_timeIntervalSinceReferenceDate1); + } -class mach_msg_ool_descriptor32_t extends ffi.Opaque {} + @override + NSDate init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_ool_descriptor64_t extends ffi.Opaque {} + NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _lib._objc_msgSend_351( + _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_ool_descriptor_t extends ffi.Opaque {} + NSDate initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_ool_ports_descriptor32_t extends ffi.Opaque {} + double timeIntervalSinceDate_(NSDate? anotherDate) { + return _lib._objc_msgSend_352(_id, _lib._sel_timeIntervalSinceDate_1, + anotherDate?._id ?? ffi.nullptr); + } -class mach_msg_ool_ports_descriptor64_t extends ffi.Opaque {} + double get timeIntervalSinceNow { + return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSinceNow1); + } -class mach_msg_ool_ports_descriptor_t extends ffi.Opaque {} + double get timeIntervalSince1970 { + return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSince19701); + } -class mach_msg_guarded_port_descriptor32_t extends ffi.Opaque {} + NSObject addTimeInterval_(double seconds) { + final _ret = + _lib._objc_msgSend_351(_id, _lib._sel_addTimeInterval_1, seconds); + return NSObject._(_ret, _lib, retain: true, release: true); + } -class mach_msg_guarded_port_descriptor64_t extends ffi.Opaque {} + NSDate dateByAddingTimeInterval_(double ti) { + final _ret = + _lib._objc_msgSend_351(_id, _lib._sel_dateByAddingTimeInterval_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_guarded_port_descriptor_t extends ffi.Opaque {} + NSDate earlierDate_(NSDate? anotherDate) { + final _ret = _lib._objc_msgSend_353( + _id, _lib._sel_earlierDate_1, anotherDate?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_descriptor_t extends ffi.Opaque {} + NSDate laterDate_(NSDate? anotherDate) { + final _ret = _lib._objc_msgSend_353( + _id, _lib._sel_laterDate_1, anotherDate?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_body_t extends ffi.Struct { - @mach_msg_size_t() - external int msgh_descriptor_count; -} + int compare_(NSDate? other) { + return _lib._objc_msgSend_354( + _id, _lib._sel_compare_1, other?._id ?? ffi.nullptr); + } -typedef mach_msg_size_t = natural_t; + bool isEqualToDate_(NSDate? otherDate) { + return _lib._objc_msgSend_355( + _id, _lib._sel_isEqualToDate_1, otherDate?._id ?? ffi.nullptr); + } -class mach_msg_header_t extends ffi.Struct { - @mach_msg_bits_t() - external int msgh_bits; + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @mach_msg_size_t() - external int msgh_size; + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } - @mach_port_t() - external int msgh_remote_port; + static NSDate date(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); + return NSDate._(_ret, _lib, retain: true, release: true); + } - @mach_port_t() - external int msgh_local_port; + static NSDate dateWithTimeIntervalSinceNow_( + NativeCupertinoHttp _lib, double secs) { + final _ret = _lib._objc_msgSend_351( + _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } - @mach_port_name_t() - external int msgh_voucher_port; + static NSDate dateWithTimeIntervalSinceReferenceDate_( + NativeCupertinoHttp _lib, double ti) { + final _ret = _lib._objc_msgSend_351(_lib._class_NSDate1, + _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } - @mach_msg_id_t() - external int msgh_id; -} + static NSDate dateWithTimeIntervalSince1970_( + NativeCupertinoHttp _lib, double secs) { + final _ret = _lib._objc_msgSend_351( + _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } -typedef mach_msg_bits_t = ffi.UnsignedInt; -typedef mach_port_name_t = natural_t; -typedef mach_msg_id_t = integer_t; + static NSDate dateWithTimeInterval_sinceDate_( + NativeCupertinoHttp _lib, double secsToBeAdded, NSDate? date) { + final _ret = _lib._objc_msgSend_356( + _lib._class_NSDate1, + _lib._sel_dateWithTimeInterval_sinceDate_1, + secsToBeAdded, + date?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_base_t extends ffi.Struct { - external mach_msg_header_t header; + static NSDate? getDistantFuture(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_357(_lib._class_NSDate1, _lib._sel_distantFuture1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } - external mach_msg_body_t body; -} + static NSDate? getDistantPast(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_357(_lib._class_NSDate1, _lib._sel_distantPast1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + static NSDate? getNow(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_357(_lib._class_NSDate1, _lib._sel_now1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } - @mach_msg_trailer_size_t() - external int msgh_trailer_size; -} + NSDate initWithTimeIntervalSinceNow_(double secs) { + final _ret = _lib._objc_msgSend_351( + _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } -typedef mach_msg_trailer_type_t = ffi.UnsignedInt; -typedef mach_msg_trailer_size_t = ffi.UnsignedInt; + NSDate initWithTimeIntervalSince1970_(double secs) { + final _ret = _lib._objc_msgSend_351( + _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_seqno_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate? date) { + final _ret = _lib._objc_msgSend_356( + _id, + _lib._sel_initWithTimeInterval_sinceDate_1, + secsToBeAdded, + date?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + static NSDate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); + return NSDate._(_ret, _lib, retain: false, release: true); + } - @mach_port_seqno_t() - external int msgh_seqno; + static NSDate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); + return NSDate._(_ret, _lib, retain: false, release: true); + } } -class security_token_t extends ffi.Struct { - @ffi.Array.multi([2]) - external ffi.Array val; +typedef NSTimeInterval = ffi.Double; + +/// ! +/// @enum NSURLRequestCachePolicy +/// +/// @discussion The NSURLRequestCachePolicy enum defines constants that +/// can be used to specify the type of interactions that take place with +/// the caching system when the URL loading system processes a request. +/// Specifically, these constants cover interactions that have to do +/// with whether already-existing cache data is returned to satisfy a +/// URL load request. +/// +/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the +/// caching logic defined in the protocol implementation, if any, is +/// used for a particular URL load request. This is the default policy +/// for URL load requests. +/// +/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the +/// data for the URL load should be loaded from the origin source. No +/// existing local cache data, regardless of its freshness or validity, +/// should be used to satisfy a URL load request. +/// +/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that +/// not only should the local cache data be ignored, but that proxies and +/// other intermediates should be instructed to disregard their caches +/// so far as the protocol allows. +/// +/// @constant NSURLRequestReloadIgnoringCacheData Older name for +/// NSURLRequestReloadIgnoringLocalCacheData. +/// +/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, +/// the URL is loaded from the origin source. +/// +/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, no +/// attempt is made to load the URL from the origin source, and the +/// load is considered to have failed. This constant specifies a +/// behavior that is similar to an "offline" mode. +/// +/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that +/// the existing cache data may be used provided the origin source +/// confirms its validity, otherwise the URL is loaded from the +/// origin source. +abstract class NSURLRequestCachePolicy { + static const int NSURLRequestUseProtocolCachePolicy = 0; + static const int NSURLRequestReloadIgnoringLocalCacheData = 1; + static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; + static const int NSURLRequestReloadIgnoringCacheData = 1; + static const int NSURLRequestReturnCacheDataElseLoad = 2; + static const int NSURLRequestReturnCacheDataDontLoad = 3; + static const int NSURLRequestReloadRevalidatingCacheData = 5; } -class mach_msg_security_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; - - @mach_msg_trailer_size_t() - external int msgh_trailer_size; +/// ! +/// @enum NSURLRequestNetworkServiceType +/// +/// @discussion The NSURLRequestNetworkServiceType enum defines constants that +/// can be used to specify the service type to associate with this request. The +/// service type is used to provide the networking layers a hint of the purpose +/// of the request. +/// +/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest +/// when created. This value should be left unchanged for the vast majority of requests. +/// +/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP +/// control traffic. +/// +/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video +/// traffic. +/// +/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background +/// traffic (such as a file download). +/// +/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. +/// +/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. +/// +/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. +abstract class NSURLRequestNetworkServiceType { + /// Standard internet traffic + static const int NSURLNetworkServiceTypeDefault = 0; - @mach_port_seqno_t() - external int msgh_seqno; + /// Voice over IP control traffic + static const int NSURLNetworkServiceTypeVoIP = 1; - external security_token_t msgh_sender; -} + /// Video traffic + static const int NSURLNetworkServiceTypeVideo = 2; -class audit_token_t extends ffi.Struct { - @ffi.Array.multi([8]) - external ffi.Array val; -} + /// Background traffic + static const int NSURLNetworkServiceTypeBackground = 3; -class mach_msg_audit_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + /// Voice data + static const int NSURLNetworkServiceTypeVoice = 4; - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + /// Responsive data + static const int NSURLNetworkServiceTypeResponsiveData = 6; - @mach_port_seqno_t() - external int msgh_seqno; + /// Multimedia Audio/Video Streaming + static const int NSURLNetworkServiceTypeAVStreaming = 8; - external security_token_t msgh_sender; + /// Responsive Multimedia Audio/Video + static const int NSURLNetworkServiceTypeResponsiveAV = 9; - external audit_token_t msgh_audit; + /// Call Signaling + static const int NSURLNetworkServiceTypeCallSignaling = 11; } -@ffi.Packed(4) -class mach_msg_context_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; - - @mach_msg_trailer_size_t() - external int msgh_trailer_size; - - @mach_port_seqno_t() - external int msgh_seqno; - - external security_token_t msgh_sender; - - external audit_token_t msgh_audit; - - @mach_port_context_t() - external int msgh_context; +/// ! +/// @enum NSURLRequestAttribution +/// +/// @discussion The NSURLRequestAttribution enum is used to indicate whether the +/// user or developer specified the URL. +/// +/// @constant NSURLRequestAttributionDeveloper Indicates that the URL was specified +/// by the developer. This is the default value for an NSURLRequest when created. +/// +/// @constant NSURLRequestAttributionUser Indicates that the URL was specified by +/// the user. +abstract class NSURLRequestAttribution { + static const int NSURLRequestAttributionDeveloper = 0; + static const int NSURLRequestAttributionUser = 1; } -typedef mach_port_context_t = vm_offset_t; -typedef vm_offset_t = uintptr_t; +/// ! +/// @class NSURLRequest +/// +/// @abstract An NSURLRequest object represents a URL load request in a +/// manner independent of protocol and URL scheme. +/// +/// @discussion NSURLRequest encapsulates two basic data elements about +/// a URL load request: +///

    +///
  • The URL to load. +///
  • The policy to use when consulting the URL content cache made +/// available by the implementation. +///
+/// In addition, NSURLRequest is designed to be extended to support +/// protocol-specific data by adding categories to access a property +/// object provided in an interface targeted at protocol implementors. +///
    +///
  • Protocol implementors should direct their attention to the +/// NSURLRequestExtensibility category on NSURLRequest for more +/// information on how to provide extensions on NSURLRequest to +/// support protocol-specific request information. +///
  • Clients of this API who wish to create NSURLRequest objects to +/// load URL content should consult the protocol-specific NSURLRequest +/// categories that are available. The NSHTTPURLRequest category on +/// NSURLRequest is an example. +///
+///

+/// Objects of this class are used to create NSURLConnection instances, +/// which can are used to perform the load of a URL, or as input to the +/// NSURLConnection class method which performs synchronous loads. +class NSURLRequest extends NSObject { + NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class msg_labels_t extends ffi.Struct { - @mach_port_name_t() - external int sender; -} + /// Returns a [NSURLRequest] that points to the same underlying object as [other]. + static NSURLRequest castFrom(T other) { + return NSURLRequest._(other._id, other._lib, retain: true, release: true); + } -@ffi.Packed(4) -class mach_msg_mac_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + /// Returns a [NSURLRequest] that wraps the given raw object pointer. + static NSURLRequest castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLRequest._(other, lib, retain: retain, release: release); + } - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + /// Returns whether [obj] is an instance of [NSURLRequest]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); + } - @mach_port_seqno_t() - external int msgh_seqno; + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL? URL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSURLRequest1, + _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } - external security_token_t msgh_sender; + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_11( + _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); + } - external audit_token_t msgh_audit; + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + NativeCupertinoHttp _lib, + NSURL? URL, + int cachePolicy, + double timeoutInterval) { + final _ret = _lib._objc_msgSend_358( + _lib._class_NSURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } - @mach_port_context_t() - external int msgh_context; + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_(NSURL? URL) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithURL_1, URL?._id ?? ffi.nullptr); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } - @mach_msg_filter_id() - external int msgh_ad; + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL and + /// cache policy. + /// @discussion This is the designated initializer for the + /// NSURLRequest class. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_cachePolicy_timeoutInterval_( + NSURL? URL, int cachePolicy, double timeoutInterval) { + final _ret = _lib._objc_msgSend_358( + _id, + _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } - external msg_labels_t msgh_labels; -} + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -typedef mach_msg_filter_id = ffi.Int; + /// ! + /// @abstract Returns the cache policy of the receiver. + /// @result The cache policy of the receiver. + int get cachePolicy { + return _lib._objc_msgSend_359(_id, _lib._sel_cachePolicy1); + } -class mach_msg_empty_send_t extends ffi.Struct { - external mach_msg_header_t header; -} + /// ! + /// @abstract Returns the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + /// @result The timeout interval of the receiver. + double get timeoutInterval { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); + } -class mach_msg_empty_rcv_t extends ffi.Struct { - external mach_msg_header_t header; + /// ! + /// @abstract The main document URL associated with this load. + /// @discussion This URL is used for the cookie "same domain as main + /// document" policy, and attributing the request as a sub-resource + /// of a user-specified URL. There may also be other future uses. + /// See setMainDocumentURL: + /// @result The main document URL. + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } - external mach_msg_trailer_t trailer; -} + /// ! + /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. + /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have + /// not explicitly set a networkServiceType (using the setNetworkServiceType method). + /// @result The NSURLRequestNetworkServiceType associated with this request. + int get networkServiceType { + return _lib._objc_msgSend_360(_id, _lib._sel_networkServiceType1); + } -class mach_msg_empty_t extends ffi.Union { - external mach_msg_empty_send_t send; + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @result YES if the receiver is allowed to use the built in cellular radios to + /// satisfy the request, NO otherwise. + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); + } - external mach_msg_empty_rcv_t rcv; -} + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @result YES if the receiver is allowed to use an interface marked as expensive to + /// satisfy the request, NO otherwise. + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } -typedef mach_msg_return_t = kern_return_t; -typedef kern_return_t = ffi.Int; -typedef mach_msg_option_t = integer_t; -typedef mach_msg_timeout_t = natural_t; + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @result YES if the receiver is allowed to use an interface marked as constrained to + /// satisfy the request, NO otherwise. + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } -class dispatch_source_type_s extends ffi.Opaque {} + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); + } -typedef dispatch_source_t = ffi.Pointer; -typedef dispatch_source_type_t = ffi.Pointer; -typedef dispatch_group_t = ffi.Pointer; -typedef dispatch_semaphore_t = ffi.Pointer; -typedef dispatch_once_t = ffi.IntPtr; + /// ! + /// @abstract Returns the NSURLRequestAttribution associated with this request. + /// @discussion This will return NSURLRequestAttributionDeveloper for requests that + /// have not explicitly set an attribution. + /// @result The NSURLRequestAttribution associated with this request. + int get attribution { + return _lib._objc_msgSend_361(_id, _lib._sel_attribution1); + } -class dispatch_data_s extends ffi.Opaque {} + /// ! + /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. + /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, + /// No otherwise. Defaults to NO. + bool get requiresDNSSECValidation { + return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); + } -typedef dispatch_data_t = ffi.Pointer; -typedef dispatch_data_applier_t = ffi.Pointer<_ObjCBlock>; -bool _ObjCBlock24_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, - ffi.Pointer arg2, ffi.Size arg3)>>() - .asFunction< - bool Function(dispatch_data_t arg0, int arg1, - ffi.Pointer arg2, int arg3)>()(arg0, arg1, arg2, arg3); -} + /// ! + /// @abstract Returns the HTTP request method of the receiver. + /// @result the HTTP request method of the receiver. + NSString? get HTTPMethod { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -final _ObjCBlock24_closureRegistry = {}; -int _ObjCBlock24_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock24_registerClosure(Function fn) { - final id = ++_ObjCBlock24_closureRegistryIndex; - _ObjCBlock24_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// ! + /// @abstract Returns a dictionary containing all the HTTP header fields + /// of the receiver. + /// @result a dictionary containing all the HTTP header fields of the + /// receiver. + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } -bool _ObjCBlock24_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { - return _ObjCBlock24_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2, arg3); -} + /// ! + /// @method valueForHTTPHeaderField: + /// @abstract Returns the value which corresponds to the given header + /// field. Note that, in keeping with the HTTP RFC, HTTP header field + /// names are case-insensitive. + /// @param field the header field name to use for the lookup + /// (case-insensitive). + /// @result the value associated with the given header field, or nil if + /// there is no value associated with the given header field. + NSString valueForHTTPHeaderField_(NSString? field) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock24 extends _ObjCBlockBase { - ObjCBlock24._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// ! + /// @abstract Returns the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + /// @result The request body data of the receiver. + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock24.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, - ffi.Pointer arg2, ffi.Size arg3)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Size arg1, - ffi.Pointer arg2, - ffi.Size arg3)>(_ObjCBlock24_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// ! + /// @abstract Returns the request body stream of the receiver + /// if any has been set + /// @discussion The stream is returned for examination only; it is + /// not safe for the caller to manipulate the stream in any way. Also + /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only + /// one can be set on a given request. Also note that the body stream is + /// preserved across copies, but is LOST when the request is coded via the + /// NSCoding protocol + /// @result The request body stream of the receiver. + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock24.fromFunction( - NativeCupertinoHttp lib, - bool Function(dispatch_data_t arg0, int arg1, ffi.Pointer arg2, - int arg3) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Size arg1, - ffi.Pointer arg2, - ffi.Size arg3)>( - _ObjCBlock24_closureTrampoline, false) - .cast(), - _ObjCBlock24_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call( - dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Size arg1, - ffi.Pointer arg2, - ffi.Size arg3)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - int arg1, - ffi.Pointer arg2, - int arg3)>()(_id, arg0, arg1, arg2, arg3); + /// ! + /// @abstract Determine whether default cookie handling will happen for + /// this request. + /// @discussion NOTE: This value is not used prior to 10.3 + /// @result YES if cookies will be sent with and set for this request; + /// otherwise NO. + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); + } + + /// ! + /// @abstract Reports whether the receiver is not expected to wait for the + /// previous response before transmitting. + /// @result YES if the receiver should transmit before the previous response + /// is received. NO if the receiver should wait for the previous response + /// before transmitting. + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + static NSURLRequest new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); + } -typedef dispatch_fd_t = ffi.Int; -void _ObjCBlock25_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>>() - .asFunction()(arg0, arg1); + static NSURLRequest alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); + } } -final _ObjCBlock25_closureRegistry = {}; -int _ObjCBlock25_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock25_registerClosure(Function fn) { - final id = ++_ObjCBlock25_closureRegistryIndex; - _ObjCBlock25_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +class NSInputStream extends _ObjCWrapper { + NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -void _ObjCBlock25_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { - return _ObjCBlock25_closureRegistry[block.ref.target.address]!(arg0, arg1); + /// Returns a [NSInputStream] that points to the same underlying object as [other]. + static NSInputStream castFrom(T other) { + return NSInputStream._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSInputStream] that wraps the given raw object pointer. + static NSInputStream castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInputStream._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSInputStream]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); + } } -class ObjCBlock25 extends _ObjCBlockBase { - ObjCBlock25._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +/// ! +/// @class NSMutableURLRequest +/// +/// @abstract An NSMutableURLRequest object represents a mutable URL load +/// request in a manner independent of protocol and URL scheme. +/// +/// @discussion This specialization of NSURLRequest is provided to aid +/// developers who may find it more convenient to mutate a single request +/// object for a series of URL loads instead of creating an immutable +/// NSURLRequest for each load. This programming model is supported by +/// the following contract stipulation between NSMutableURLRequest and +/// NSURLConnection: NSURLConnection makes a deep copy of each +/// NSMutableURLRequest object passed to one of its initializers. +///

NSMutableURLRequest is designed to be extended to support +/// protocol-specific data by adding categories to access a property +/// object provided in an interface targeted at protocol implementors. +///

    +///
  • Protocol implementors should direct their attention to the +/// NSMutableURLRequestExtensibility category on +/// NSMutableURLRequest for more information on how to provide +/// extensions on NSMutableURLRequest to support protocol-specific +/// request information. +///
  • Clients of this API who wish to create NSMutableURLRequest +/// objects to load URL content should consult the protocol-specific +/// NSMutableURLRequest categories that are available. The +/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an +/// example. +///
+class NSMutableURLRequest extends NSURLRequest { + NSMutableURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - /// Creates a block from a C function pointer. - ObjCBlock25.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Int arg1)>(_ObjCBlock25_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. + static NSMutableURLRequest castFrom(T other) { + return NSMutableURLRequest._(other._id, other._lib, + retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock25.fromFunction( - NativeCupertinoHttp lib, void Function(dispatch_data_t arg0, int arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Int arg1)>(_ObjCBlock25_closureTrampoline) - .cast(), - _ObjCBlock25_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(dispatch_data_t arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, ffi.Int arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, - int arg1)>()(_id, arg0, arg1); + /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. + static NSMutableURLRequest castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableURLRequest._(other, lib, retain: retain, release: release); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// Returns whether [obj] is an instance of [NSMutableURLRequest]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableURLRequest1); + } -typedef dispatch_io_t = ffi.Pointer; -typedef dispatch_io_type_t = ffi.UnsignedLong; -void _ObjCBlock26_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); -} + /// ! + /// @abstract The URL of the receiver. + @override + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -final _ObjCBlock26_closureRegistry = {}; -int _ObjCBlock26_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock26_registerClosure(Function fn) { - final id = ++_ObjCBlock26_closureRegistryIndex; - _ObjCBlock26_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// ! + /// @abstract The URL of the receiver. + set URL(NSURL? value) { + _lib._objc_msgSend_336(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); + } -void _ObjCBlock26_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock26_closureRegistry[block.ref.target.address]!(arg0); -} + /// ! + /// @abstract The cache policy of the receiver. + @override + int get cachePolicy { + return _lib._objc_msgSend_359(_id, _lib._sel_cachePolicy1); + } -class ObjCBlock26 extends _ObjCBlockBase { - ObjCBlock26._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// ! + /// @abstract The cache policy of the receiver. + set cachePolicy(int value) { + _lib._objc_msgSend_363(_id, _lib._sel_setCachePolicy_1, value); + } - /// Creates a block from a C function pointer. - ObjCBlock26.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Int arg0)>(_ObjCBlock26_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + @override + double get timeoutInterval { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); + } - /// Creates a block from a Dart function. - ObjCBlock26.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Int arg0)>(_ObjCBlock26_closureTrampoline) - .cast(), - _ObjCBlock26_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Int arg0)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + set timeoutInterval(double value) { + _lib._objc_msgSend_341(_id, _lib._sel_setTimeoutInterval_1, value); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document is used to implement the cookie "only + /// from same domain as main document" policy, attributing this request + /// as a sub-resource of a user-specified URL, and possibly other things + /// in the future. + @override + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -typedef dispatch_io_handler_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock27_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() - .asFunction< - void Function( - bool arg0, dispatch_data_t arg1, int arg2)>()(arg0, arg1, arg2); -} + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document is used to implement the cookie "only + /// from same domain as main document" policy, attributing this request + /// as a sub-resource of a user-specified URL, and possibly other things + /// in the future. + set mainDocumentURL(NSURL? value) { + _lib._objc_msgSend_336( + _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); + } -final _ObjCBlock27_closureRegistry = {}; -int _ObjCBlock27_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock27_registerClosure(Function fn) { - final id = ++_ObjCBlock27_closureRegistryIndex; - _ObjCBlock27_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + @override + int get networkServiceType { + return _lib._objc_msgSend_360(_id, _lib._sel_networkServiceType1); + } -void _ObjCBlock27_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { - return _ObjCBlock27_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + set networkServiceType(int value) { + _lib._objc_msgSend_364(_id, _lib._sel_setNetworkServiceType_1, value); + } -class ObjCBlock27 extends _ObjCBlockBase { - ObjCBlock27._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + @override + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); + } - /// Creates a block from a C function pointer. - ObjCBlock27.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0, - dispatch_data_t arg1, - ffi.Int arg2)>(_ObjCBlock27_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + set allowsCellularAccess(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setAllowsCellularAccess_1, value); + } - /// Creates a block from a Dart function. - ObjCBlock27.fromFunction(NativeCupertinoHttp lib, - void Function(bool arg0, dispatch_data_t arg1, int arg2) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0, - dispatch_data_t arg1, - ffi.Int arg2)>(_ObjCBlock27_closureTrampoline) - .cast(), - _ObjCBlock27_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(bool arg0, dispatch_data_t arg1, int arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0, - dispatch_data_t arg1, ffi.Int arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, bool arg0, - dispatch_data_t arg1, int arg2)>()(_id, arg0, arg1, arg2); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satisfy the request, YES otherwise. + @override + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satisfy the request, YES otherwise. + set allowsExpensiveNetworkAccess(bool value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + } -typedef dispatch_io_close_flags_t = ffi.UnsignedLong; -typedef dispatch_io_interval_flags_t = ffi.UnsignedLong; -typedef dispatch_workloop_t = ffi.Pointer; + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satisfy the request, YES otherwise. + @override + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } -class CFStreamError extends ffi.Struct { - @CFIndex() - external int domain; + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satisfy the request, YES otherwise. + set allowsConstrainedNetworkAccess(bool value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + } - @SInt32() - external int error; -} + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + @override + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); + } -abstract class CFStreamStatus { - static const int kCFStreamStatusNotOpen = 0; - static const int kCFStreamStatusOpening = 1; - static const int kCFStreamStatusOpen = 2; - static const int kCFStreamStatusReading = 3; - static const int kCFStreamStatusWriting = 4; - static const int kCFStreamStatusAtEnd = 5; - static const int kCFStreamStatusClosed = 6; - static const int kCFStreamStatusError = 7; -} + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + set assumesHTTP3Capable(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setAssumesHTTP3Capable_1, value); + } -abstract class CFStreamEventType { - static const int kCFStreamEventNone = 0; - static const int kCFStreamEventOpenCompleted = 1; - static const int kCFStreamEventHasBytesAvailable = 2; - static const int kCFStreamEventCanAcceptBytes = 4; - static const int kCFStreamEventErrorOccurred = 8; - static const int kCFStreamEventEndEncountered = 16; -} + /// ! + /// @abstract Sets the NSURLRequestAttribution to associate with this request. + /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the + /// user. Defaults to NSURLRequestAttributionDeveloper. + @override + int get attribution { + return _lib._objc_msgSend_361(_id, _lib._sel_attribution1); + } -class CFStreamClientContext extends ffi.Struct { - @CFIndex() - external int version; + /// ! + /// @abstract Sets the NSURLRequestAttribution to associate with this request. + /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the + /// user. Defaults to NSURLRequestAttributionDeveloper. + set attribution(int value) { + _lib._objc_msgSend_365(_id, _lib._sel_setAttribution_1, value); + } - external ffi.Pointer info; + /// ! + /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. + /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, + /// No otherwise. Defaults to NO. + @override + bool get requiresDNSSECValidation { + return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); + } + + /// ! + /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. + /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, + /// No otherwise. Defaults to NO. + set requiresDNSSECValidation(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setRequiresDNSSECValidation_1, value); + } + + /// ! + /// @abstract Sets the HTTP request method of the receiver. + @override + NSString? get HTTPMethod { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Sets the HTTP request method of the receiver. + set HTTPMethod(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setHTTPMethod_1, value?._id ?? ffi.nullptr); + } + + /// ! + /// @abstract Sets the HTTP header fields of the receiver to the given + /// dictionary. + /// @discussion This method replaces all header fields that may have + /// existed before this method call. + ///

Since HTTP header fields must be string values, each object and + /// key in the dictionary passed to this method must answer YES when + /// sent an -isKindOfClass:[NSString class] message. If either + /// the key or value for a key-value pair answers NO when sent this + /// message, the key-value pair is skipped. + @override + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Sets the HTTP header fields of the receiver to the given + /// dictionary. + /// @discussion This method replaces all header fields that may have + /// existed before this method call. + ///

Since HTTP header fields must be string values, each object and + /// key in the dictionary passed to this method must answer YES when + /// sent an -isKindOfClass:[NSString class] message. If either + /// the key or value for a key-value pair answers NO when sent this + /// message, the key-value pair is skipped. + set allHTTPHeaderFields(NSDictionary? value) { + _lib._objc_msgSend_366( + _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + /// ! + /// @method setValue:forHTTPHeaderField: + /// @abstract Sets the value of the given HTTP header field. + /// @discussion If a value was previously set for the given header + /// field, that value is replaced with the given value. Note that, in + /// keeping with the HTTP RFC, HTTP header field names are + /// case-insensitive. + /// @param value the header field value. + /// @param field the header field name (case-insensitive). + void setValue_forHTTPHeaderField_(NSString? value, NSString? field) { + return _lib._objc_msgSend_367(_id, _lib._sel_setValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + } - external ffi - .Pointer)>> - release; + /// ! + /// @method addValue:forHTTPHeaderField: + /// @abstract Adds an HTTP header field in the current header + /// dictionary. + /// @discussion This method provides a way to add values to header + /// fields incrementally. If a value was previously set for the given + /// header field, the given value is appended to the previously-existing + /// value. The appropriate field delimiter, a comma in the case of HTTP, + /// is added by the implementation, and should not be added to the given + /// value by the caller. Note that, in keeping with the HTTP RFC, HTTP + /// header field names are case-insensitive. + /// @param value the header field value. + /// @param field the header field name (case-insensitive). + void addValue_forHTTPHeaderField_(NSString? value, NSString? field) { + return _lib._objc_msgSend_367(_id, _lib._sel_addValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + /// ! + /// @abstract Sets the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + @override + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } -class __CFReadStream extends ffi.Opaque {} + /// ! + /// @abstract Sets the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + set HTTPBody(NSData? value) { + _lib._objc_msgSend_368( + _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); + } -class __CFWriteStream extends ffi.Opaque {} + /// ! + /// @abstract Sets the request body to be the contents of the given stream. + /// @discussion The provided stream should be unopened; the request will take + /// over the stream's delegate. The entire stream's contents will be + /// transmitted as the HTTP body of the request. Note that the body stream + /// and the body data (set by setHTTPBody:, above) are mutually exclusive + /// - setting one will clear the other. + @override + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } -typedef CFStreamPropertyKey = CFStringRef; -typedef CFReadStreamRef = ffi.Pointer<__CFReadStream>; -typedef CFWriteStreamRef = ffi.Pointer<__CFWriteStream>; -typedef CFReadStreamClientCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, ffi.Int32, ffi.Pointer)>>; -typedef CFWriteStreamClientCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, ffi.Int32, ffi.Pointer)>>; + /// ! + /// @abstract Sets the request body to be the contents of the given stream. + /// @discussion The provided stream should be unopened; the request will take + /// over the stream's delegate. The entire stream's contents will be + /// transmitted as the HTTP body of the request. Note that the body stream + /// and the body data (set by setHTTPBody:, above) are mutually exclusive + /// - setting one will clear the other. + set HTTPBodyStream(NSInputStream? value) { + _lib._objc_msgSend_369( + _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); + } -abstract class CFStreamErrorDomain { - static const int kCFStreamErrorDomainCustom = -1; - static const int kCFStreamErrorDomainPOSIX = 1; - static const int kCFStreamErrorDomainMacOSStatus = 2; -} + /// ! + /// @abstract Decide whether default cookie handling will happen for + /// this request (YES if cookies should be sent with and set for this request; + /// otherwise NO). + /// @discussion The default is YES - in other words, cookies are sent from and + /// stored to the cookie manager by default. + /// NOTE: In releases prior to 10.3, this value is ignored + @override + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); + } -abstract class CFPropertyListMutabilityOptions { - static const int kCFPropertyListImmutable = 0; - static const int kCFPropertyListMutableContainers = 1; - static const int kCFPropertyListMutableContainersAndLeaves = 2; -} + /// ! + /// @abstract Decide whether default cookie handling will happen for + /// this request (YES if cookies should be sent with and set for this request; + /// otherwise NO). + /// @discussion The default is YES - in other words, cookies are sent from and + /// stored to the cookie manager by default. + /// NOTE: In releases prior to 10.3, this value is ignored + set HTTPShouldHandleCookies(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); + } -abstract class CFPropertyListFormat { - static const int kCFPropertyListOpenStepFormat = 1; - static const int kCFPropertyListXMLFormat_v1_0 = 100; - static const int kCFPropertyListBinaryFormat_v1_0 = 200; -} + /// ! + /// @abstract Sets whether the request should not wait for the previous response + /// before transmitting (YES if the receiver should transmit before the previous response is + /// received. NO to wait for the previous response before transmitting) + /// @discussion Calling this method with a YES value does not guarantee HTTP + /// pipelining behavior. This method may have no effect if an HTTP proxy is + /// configured, or if the HTTP request uses an unsafe request method (e.g., POST + /// requests will not pipeline). Pipelining behavior also may not begin until + /// the second request on a given TCP connection. There may be other situations + /// where pipelining does not occur even though YES was set. + /// HTTP 1.1 allows the client to send multiple requests to the server without + /// waiting for a response. Though HTTP 1.1 requires support for pipelining, + /// some servers report themselves as being HTTP 1.1 but do not support + /// pipelining (disconnecting, sending resources misordered, omitting part of + /// a resource, etc.). + @override + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + } -class CFSetCallBacks extends ffi.Struct { - @CFIndex() - external int version; + /// ! + /// @abstract Sets whether the request should not wait for the previous response + /// before transmitting (YES if the receiver should transmit before the previous response is + /// received. NO to wait for the previous response before transmitting) + /// @discussion Calling this method with a YES value does not guarantee HTTP + /// pipelining behavior. This method may have no effect if an HTTP proxy is + /// configured, or if the HTTP request uses an unsafe request method (e.g., POST + /// requests will not pipeline). Pipelining behavior also may not begin until + /// the second request on a given TCP connection. There may be other situations + /// where pipelining does not occur even though YES was set. + /// HTTP 1.1 allows the client to send multiple requests to the server without + /// waiting for a response. Though HTTP 1.1 requires support for pipelining, + /// some servers report themselves as being HTTP 1.1 but do not support + /// pipelining (disconnecting, sending resources misordered, omitting part of + /// a resource, etc.). + set HTTPShouldUsePipelining(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + } - external CFSetRetainCallBack retain; + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_( + NativeCupertinoHttp _lib, NSURL? URL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableURLRequest1, + _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } - external CFSetReleaseCallBack release; + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_11( + _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); + } - external CFSetCopyDescriptionCallBack copyDescription; + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( + NativeCupertinoHttp _lib, + NSURL? URL, + int cachePolicy, + double timeoutInterval) { + final _ret = _lib._objc_msgSend_358( + _lib._class_NSMutableURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } - external CFSetEqualCallBack equal; + static NSMutableURLRequest new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + } - external CFSetHashCallBack hash; + static NSMutableURLRequest alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + } } -typedef CFSetRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFSetReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFSetCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFSetEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFSetHashCallBack = ffi - .Pointer)>>; +abstract class NSHTTPCookieAcceptPolicy { + static const int NSHTTPCookieAcceptPolicyAlways = 0; + static const int NSHTTPCookieAcceptPolicyNever = 1; + static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; +} -class __CFSet extends ffi.Opaque {} +class NSHTTPCookieStorage extends NSObject { + NSHTTPCookieStorage._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -typedef CFSetRef = ffi.Pointer<__CFSet>; -typedef CFMutableSetRef = ffi.Pointer<__CFSet>; -typedef CFSetApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + static NSHTTPCookieStorage castFrom(T other) { + return NSHTTPCookieStorage._(other._id, other._lib, + retain: true, release: true); + } -abstract class CFStringEncodings { - static const int kCFStringEncodingMacJapanese = 1; - static const int kCFStringEncodingMacChineseTrad = 2; - static const int kCFStringEncodingMacKorean = 3; - static const int kCFStringEncodingMacArabic = 4; - static const int kCFStringEncodingMacHebrew = 5; - static const int kCFStringEncodingMacGreek = 6; - static const int kCFStringEncodingMacCyrillic = 7; - static const int kCFStringEncodingMacDevanagari = 9; - static const int kCFStringEncodingMacGurmukhi = 10; - static const int kCFStringEncodingMacGujarati = 11; - static const int kCFStringEncodingMacOriya = 12; - static const int kCFStringEncodingMacBengali = 13; - static const int kCFStringEncodingMacTamil = 14; - static const int kCFStringEncodingMacTelugu = 15; - static const int kCFStringEncodingMacKannada = 16; - static const int kCFStringEncodingMacMalayalam = 17; - static const int kCFStringEncodingMacSinhalese = 18; - static const int kCFStringEncodingMacBurmese = 19; - static const int kCFStringEncodingMacKhmer = 20; - static const int kCFStringEncodingMacThai = 21; - static const int kCFStringEncodingMacLaotian = 22; - static const int kCFStringEncodingMacGeorgian = 23; - static const int kCFStringEncodingMacArmenian = 24; - static const int kCFStringEncodingMacChineseSimp = 25; - static const int kCFStringEncodingMacTibetan = 26; - static const int kCFStringEncodingMacMongolian = 27; - static const int kCFStringEncodingMacEthiopic = 28; - static const int kCFStringEncodingMacCentralEurRoman = 29; - static const int kCFStringEncodingMacVietnamese = 30; - static const int kCFStringEncodingMacExtArabic = 31; - static const int kCFStringEncodingMacSymbol = 33; - static const int kCFStringEncodingMacDingbats = 34; - static const int kCFStringEncodingMacTurkish = 35; - static const int kCFStringEncodingMacCroatian = 36; - static const int kCFStringEncodingMacIcelandic = 37; - static const int kCFStringEncodingMacRomanian = 38; - static const int kCFStringEncodingMacCeltic = 39; - static const int kCFStringEncodingMacGaelic = 40; - static const int kCFStringEncodingMacFarsi = 140; - static const int kCFStringEncodingMacUkrainian = 152; - static const int kCFStringEncodingMacInuit = 236; - static const int kCFStringEncodingMacVT100 = 252; - static const int kCFStringEncodingMacHFS = 255; - static const int kCFStringEncodingISOLatin2 = 514; - static const int kCFStringEncodingISOLatin3 = 515; - static const int kCFStringEncodingISOLatin4 = 516; - static const int kCFStringEncodingISOLatinCyrillic = 517; - static const int kCFStringEncodingISOLatinArabic = 518; - static const int kCFStringEncodingISOLatinGreek = 519; - static const int kCFStringEncodingISOLatinHebrew = 520; - static const int kCFStringEncodingISOLatin5 = 521; - static const int kCFStringEncodingISOLatin6 = 522; - static const int kCFStringEncodingISOLatinThai = 523; - static const int kCFStringEncodingISOLatin7 = 525; - static const int kCFStringEncodingISOLatin8 = 526; - static const int kCFStringEncodingISOLatin9 = 527; - static const int kCFStringEncodingISOLatin10 = 528; - static const int kCFStringEncodingDOSLatinUS = 1024; - static const int kCFStringEncodingDOSGreek = 1029; - static const int kCFStringEncodingDOSBalticRim = 1030; - static const int kCFStringEncodingDOSLatin1 = 1040; - static const int kCFStringEncodingDOSGreek1 = 1041; - static const int kCFStringEncodingDOSLatin2 = 1042; - static const int kCFStringEncodingDOSCyrillic = 1043; - static const int kCFStringEncodingDOSTurkish = 1044; - static const int kCFStringEncodingDOSPortuguese = 1045; - static const int kCFStringEncodingDOSIcelandic = 1046; - static const int kCFStringEncodingDOSHebrew = 1047; - static const int kCFStringEncodingDOSCanadianFrench = 1048; - static const int kCFStringEncodingDOSArabic = 1049; - static const int kCFStringEncodingDOSNordic = 1050; - static const int kCFStringEncodingDOSRussian = 1051; - static const int kCFStringEncodingDOSGreek2 = 1052; - static const int kCFStringEncodingDOSThai = 1053; - static const int kCFStringEncodingDOSJapanese = 1056; - static const int kCFStringEncodingDOSChineseSimplif = 1057; - static const int kCFStringEncodingDOSKorean = 1058; - static const int kCFStringEncodingDOSChineseTrad = 1059; - static const int kCFStringEncodingWindowsLatin2 = 1281; - static const int kCFStringEncodingWindowsCyrillic = 1282; - static const int kCFStringEncodingWindowsGreek = 1283; - static const int kCFStringEncodingWindowsLatin5 = 1284; - static const int kCFStringEncodingWindowsHebrew = 1285; - static const int kCFStringEncodingWindowsArabic = 1286; - static const int kCFStringEncodingWindowsBalticRim = 1287; - static const int kCFStringEncodingWindowsVietnamese = 1288; - static const int kCFStringEncodingWindowsKoreanJohab = 1296; - static const int kCFStringEncodingANSEL = 1537; - static const int kCFStringEncodingJIS_X0201_76 = 1568; - static const int kCFStringEncodingJIS_X0208_83 = 1569; - static const int kCFStringEncodingJIS_X0208_90 = 1570; - static const int kCFStringEncodingJIS_X0212_90 = 1571; - static const int kCFStringEncodingJIS_C6226_78 = 1572; - static const int kCFStringEncodingShiftJIS_X0213 = 1576; - static const int kCFStringEncodingShiftJIS_X0213_MenKuTen = 1577; - static const int kCFStringEncodingGB_2312_80 = 1584; - static const int kCFStringEncodingGBK_95 = 1585; - static const int kCFStringEncodingGB_18030_2000 = 1586; - static const int kCFStringEncodingKSC_5601_87 = 1600; - static const int kCFStringEncodingKSC_5601_92_Johab = 1601; - static const int kCFStringEncodingCNS_11643_92_P1 = 1617; - static const int kCFStringEncodingCNS_11643_92_P2 = 1618; - static const int kCFStringEncodingCNS_11643_92_P3 = 1619; - static const int kCFStringEncodingISO_2022_JP = 2080; - static const int kCFStringEncodingISO_2022_JP_2 = 2081; - static const int kCFStringEncodingISO_2022_JP_1 = 2082; - static const int kCFStringEncodingISO_2022_JP_3 = 2083; - static const int kCFStringEncodingISO_2022_CN = 2096; - static const int kCFStringEncodingISO_2022_CN_EXT = 2097; - static const int kCFStringEncodingISO_2022_KR = 2112; - static const int kCFStringEncodingEUC_JP = 2336; - static const int kCFStringEncodingEUC_CN = 2352; - static const int kCFStringEncodingEUC_TW = 2353; - static const int kCFStringEncodingEUC_KR = 2368; - static const int kCFStringEncodingShiftJIS = 2561; - static const int kCFStringEncodingKOI8_R = 2562; - static const int kCFStringEncodingBig5 = 2563; - static const int kCFStringEncodingMacRomanLatin1 = 2564; - static const int kCFStringEncodingHZ_GB_2312 = 2565; - static const int kCFStringEncodingBig5_HKSCS_1999 = 2566; - static const int kCFStringEncodingVISCII = 2567; - static const int kCFStringEncodingKOI8_U = 2568; - static const int kCFStringEncodingBig5_E = 2569; - static const int kCFStringEncodingNextStepJapanese = 2818; - static const int kCFStringEncodingEBCDIC_US = 3073; - static const int kCFStringEncodingEBCDIC_CP037 = 3074; - static const int kCFStringEncodingUTF7 = 67109120; - static const int kCFStringEncodingUTF7_IMAP = 2576; - static const int kCFStringEncodingShiftJIS_X0213_00 = 1576; -} + /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. + static NSHTTPCookieStorage castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); + } -class CFTreeContext extends ffi.Struct { - @CFIndex() - external int version; + /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSHTTPCookieStorage1); + } - external ffi.Pointer info; + static NSHTTPCookieStorage? getSharedHTTPCookieStorage( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_370( + _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } - external CFTreeRetainCallBack retain; + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_371( + _lib._class_NSHTTPCookieStorage1, + _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, + identifier?._id ?? ffi.nullptr); + return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } - external CFTreeReleaseCallBack release; + NSArray? get cookies { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_cookies1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } - external CFTreeCopyDescriptionCallBack copyDescription; -} + void setCookie_(NSHTTPCookie? cookie) { + return _lib._objc_msgSend_372( + _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); + } -typedef CFTreeRetainCallBack = ffi.Pointer< - ffi.NativeFunction Function(ffi.Pointer)>>; -typedef CFTreeReleaseCallBack - = ffi.Pointer)>>; -typedef CFTreeCopyDescriptionCallBack = ffi - .Pointer)>>; + void deleteCookie_(NSHTTPCookie? cookie) { + return _lib._objc_msgSend_372( + _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); + } -class __CFTree extends ffi.Opaque {} + void removeCookiesSinceDate_(NSDate? date) { + return _lib._objc_msgSend_373( + _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); + } -typedef CFTreeRef = ffi.Pointer<__CFTree>; -typedef CFTreeApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + NSArray cookiesForURL_(NSURL? URL) { + final _ret = _lib._objc_msgSend_160( + _id, _lib._sel_cookiesForURL_1, URL?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } -abstract class CFURLError { - static const int kCFURLUnknownError = -10; - static const int kCFURLUnknownSchemeError = -11; - static const int kCFURLResourceNotFoundError = -12; - static const int kCFURLResourceAccessViolationError = -13; - static const int kCFURLRemoteHostUnavailableError = -14; - static const int kCFURLImproperArgumentsError = -15; - static const int kCFURLUnknownPropertyKeyError = -16; - static const int kCFURLPropertyKeyUnavailableError = -17; - static const int kCFURLTimeoutError = -18; -} + void setCookies_forURL_mainDocumentURL_( + NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { + return _lib._objc_msgSend_374( + _id, + _lib._sel_setCookies_forURL_mainDocumentURL_1, + cookies?._id ?? ffi.nullptr, + URL?._id ?? ffi.nullptr, + mainDocumentURL?._id ?? ffi.nullptr); + } -class __CFUUID extends ffi.Opaque {} + int get cookieAcceptPolicy { + return _lib._objc_msgSend_375(_id, _lib._sel_cookieAcceptPolicy1); + } -class CFUUIDBytes extends ffi.Struct { - @UInt8() - external int byte0; + set cookieAcceptPolicy(int value) { + _lib._objc_msgSend_376(_id, _lib._sel_setCookieAcceptPolicy_1, value); + } - @UInt8() - external int byte1; + NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { + final _ret = _lib._objc_msgSend_97( + _id, + _lib._sel_sortedCookiesUsingDescriptors_1, + sortOrder?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @UInt8() - external int byte2; + void storeCookies_forTask_(NSArray? cookies, NSURLSessionTask? task) { + return _lib._objc_msgSend_385(_id, _lib._sel_storeCookies_forTask_1, + cookies?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); + } - @UInt8() - external int byte3; + void getCookiesForTask_completionHandler_( + NSURLSessionTask? task, ObjCBlock20 completionHandler) { + return _lib._objc_msgSend_386( + _id, + _lib._sel_getCookiesForTask_completionHandler_1, + task?._id ?? ffi.nullptr, + completionHandler._id); + } - @UInt8() - external int byte4; + static NSHTTPCookieStorage new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + } - @UInt8() - external int byte5; + static NSHTTPCookieStorage alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + } +} - @UInt8() - external int byte6; +class NSHTTPCookie extends _ObjCWrapper { + NSHTTPCookie._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @UInt8() - external int byte7; + /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. + static NSHTTPCookie castFrom(T other) { + return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); + } - @UInt8() - external int byte8; + /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. + static NSHTTPCookie castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPCookie._(other, lib, retain: retain, release: release); + } - @UInt8() - external int byte9; + /// Returns whether [obj] is an instance of [NSHTTPCookie]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); + } +} - @UInt8() - external int byte10; +/// NSURLSessionTask - a cancelable object that refers to the lifetime +/// of processing a given request. +class NSURLSessionTask extends NSObject { + NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @UInt8() - external int byte11; + /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. + static NSURLSessionTask castFrom(T other) { + return NSURLSessionTask._(other._id, other._lib, + retain: true, release: true); + } - @UInt8() - external int byte12; + /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. + static NSURLSessionTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionTask._(other, lib, retain: retain, release: release); + } - @UInt8() - external int byte13; + /// Returns whether [obj] is an instance of [NSURLSessionTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionTask1); + } - @UInt8() - external int byte14; + /// an identifier for this task, assigned by and unique to the owning session + int get taskIdentifier { + return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); + } - @UInt8() - external int byte15; -} + /// may be nil if this is a stream task + NSURLRequest? get originalRequest { + final _ret = _lib._objc_msgSend_377(_id, _lib._sel_originalRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } -typedef CFUUIDRef = ffi.Pointer<__CFUUID>; + /// may differ from originalRequest due to http server redirection + NSURLRequest? get currentRequest { + final _ret = _lib._objc_msgSend_377(_id, _lib._sel_currentRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } -class __CFBundle extends ffi.Opaque {} + /// may be nil if no response has been received + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_379(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } -typedef CFBundleRef = ffi.Pointer<__CFBundle>; -typedef cpu_type_t = integer_t; -typedef CFPlugInRef = ffi.Pointer<__CFBundle>; -typedef CFBundleRefNum = ffi.Int; + /// Sets a task-specific delegate. Methods not implemented on this delegate will + /// still be forwarded to the session delegate. + /// + /// Cannot be modified after task resumes. Not supported on background session. + /// + /// Delegate is strongly referenced until the task completes, after which it is + /// reset to `nil`. + NSObject? get delegate { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } -class __CFMessagePort extends ffi.Opaque {} + /// Sets a task-specific delegate. Methods not implemented on this delegate will + /// still be forwarded to the session delegate. + /// + /// Cannot be modified after task resumes. Not supported on background session. + /// + /// Delegate is strongly referenced until the task completes, after which it is + /// reset to `nil`. + set delegate(NSObject? value) { + _lib._objc_msgSend_380( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + } -class CFMessagePortContext extends ffi.Struct { - @CFIndex() - external int version; + /// NSProgress object which represents the task progress. + /// It can be used for task progress tracking. + NSProgress? get progress { + final _ret = _lib._objc_msgSend_322(_id, _lib._sel_progress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer info; + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + NSDate? get earliestBeginDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_earliestBeginDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + set earliestBeginDate(NSDate? value) { + _lib._objc_msgSend_381( + _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); + } - external ffi - .Pointer)>> - release; + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + int get countOfBytesClientExpectsToSend { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfBytesClientExpectsToSend1); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + set countOfBytesClientExpectsToSend(int value) { + _lib._objc_msgSend_330( + _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); + } -typedef CFMessagePortRef = ffi.Pointer<__CFMessagePort>; -typedef CFMessagePortCallBack = ffi.Pointer< - ffi.NativeFunction< - CFDataRef Function( - CFMessagePortRef, SInt32, CFDataRef, ffi.Pointer)>>; -typedef CFMessagePortInvalidationCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFMessagePortRef, ffi.Pointer)>>; -typedef CFPlugInFactoryFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, CFUUIDRef)>>; + int get countOfBytesClientExpectsToReceive { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfBytesClientExpectsToReceive1); + } -class __CFPlugInInstance extends ffi.Opaque {} + set countOfBytesClientExpectsToReceive(int value) { + _lib._objc_msgSend_330( + _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); + } -typedef CFPlugInInstanceRef = ffi.Pointer<__CFPlugInInstance>; -typedef CFPlugInInstanceDeallocateInstanceDataFunction - = ffi.Pointer)>>; -typedef CFPlugInInstanceGetInterfaceFunction = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(CFPlugInInstanceRef, CFStringRef, - ffi.Pointer>)>>; + /// number of body bytes already sent + int get countOfBytesSent { + return _lib._objc_msgSend_329(_id, _lib._sel_countOfBytesSent1); + } -class __CFMachPort extends ffi.Opaque {} + /// number of body bytes already received + int get countOfBytesReceived { + return _lib._objc_msgSend_329(_id, _lib._sel_countOfBytesReceived1); + } -class CFMachPortContext extends ffi.Struct { - @CFIndex() - external int version; + /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request + int get countOfBytesExpectedToSend { + return _lib._objc_msgSend_329(_id, _lib._sel_countOfBytesExpectedToSend1); + } - external ffi.Pointer info; + /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. + int get countOfBytesExpectedToReceive { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfBytesExpectedToReceive1); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + NSString? get taskDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_taskDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - external ffi - .Pointer)>> - release; + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + set taskDescription(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + /// -cancel returns immediately, but marks a task as being canceled. + /// The task will signal -URLSession:task:didCompleteWithError: with an + /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some + /// cases, the task may signal other work before it acknowledges the + /// cancelation. -cancel may be sent to a task that has been suspended. + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } -typedef CFMachPortRef = ffi.Pointer<__CFMachPort>; -typedef CFMachPortCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFMachPortRef, ffi.Pointer, CFIndex, - ffi.Pointer)>>; -typedef CFMachPortInvalidationCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFMachPortRef, ffi.Pointer)>>; + /// The current state of the task within the session. + int get state { + return _lib._objc_msgSend_382(_id, _lib._sel_state1); + } -class __CFAttributedString extends ffi.Opaque {} + /// The error, if any, delivered via -URLSession:task:didCompleteWithError: + /// This property will be nil in the event that no error occurred. + NSError? get error { + final _ret = _lib._objc_msgSend_383(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } -typedef CFAttributedStringRef = ffi.Pointer<__CFAttributedString>; -typedef CFMutableAttributedStringRef = ffi.Pointer<__CFAttributedString>; + /// Suspending a task will prevent the NSURLSession from continuing to + /// load data. There may still be delegate calls made on behalf of + /// this task (for instance, to report data received while suspending) + /// but no further transmissions will be made on behalf of the task + /// until -resume is sent. The timeout timer associated with the task + /// will be disabled while a task is suspended. -suspend and -resume are + /// nestable. + void suspend() { + return _lib._objc_msgSend_1(_id, _lib._sel_suspend1); + } -class __CFURLEnumerator extends ffi.Opaque {} + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } -abstract class CFURLEnumeratorOptions { - static const int kCFURLEnumeratorDefaultBehavior = 0; - static const int kCFURLEnumeratorDescendRecursively = 1; - static const int kCFURLEnumeratorSkipInvisibles = 2; - static const int kCFURLEnumeratorGenerateFileReferenceURLs = 4; - static const int kCFURLEnumeratorSkipPackageContents = 8; - static const int kCFURLEnumeratorIncludeDirectoriesPreOrder = 16; - static const int kCFURLEnumeratorIncludeDirectoriesPostOrder = 32; - static const int kCFURLEnumeratorGenerateRelativePathURLs = 64; -} + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. + /// + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + double get priority { + return _lib._objc_msgSend_84(_id, _lib._sel_priority1); + } -typedef CFURLEnumeratorRef = ffi.Pointer<__CFURLEnumerator>; + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. + /// + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + set priority(double value) { + _lib._objc_msgSend_384(_id, _lib._sel_setPriority_1, value); + } -abstract class CFURLEnumeratorResult { - static const int kCFURLEnumeratorSuccess = 1; - static const int kCFURLEnumeratorEnd = 2; - static const int kCFURLEnumeratorError = 3; - static const int kCFURLEnumeratorDirectoryPostOrderSuccess = 4; -} + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + bool get prefersIncrementalDelivery { + return _lib._objc_msgSend_11(_id, _lib._sel_prefersIncrementalDelivery1); + } -class guid_t extends ffi.Union { - @ffi.Array.multi([16]) - external ffi.Array g_guid; + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + set prefersIncrementalDelivery(bool value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setPrefersIncrementalDelivery_1, value); + } - @ffi.Array.multi([4]) - external ffi.Array g_guid_asint; -} + @override + NSURLSessionTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } -@ffi.Packed(1) -class ntsid_t extends ffi.Struct { - @u_int8_t() - external int sid_kind; + static NSURLSessionTask new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } - @u_int8_t() - external int sid_authcount; + static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } +} - @ffi.Array.multi([6]) - external ffi.Array sid_authority; +class NSURLResponse extends NSObject { + NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Array.multi([16]) - external ffi.Array sid_authorities; -} + /// Returns a [NSURLResponse] that points to the same underlying object as [other]. + static NSURLResponse castFrom(T other) { + return NSURLResponse._(other._id, other._lib, retain: true, release: true); + } -typedef u_int8_t = ffi.UnsignedChar; -typedef u_int32_t = ffi.UnsignedInt; + /// Returns a [NSURLResponse] that wraps the given raw object pointer. + static NSURLResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLResponse._(other, lib, retain: retain, release: release); + } -class kauth_identity_extlookup extends ffi.Struct { - @u_int32_t() - external int el_seqno; + /// Returns whether [obj] is an instance of [NSURLResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); + } - @u_int32_t() - external int el_result; + /// ! + /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: + /// @abstract Initialize an NSURLResponse with the provided values. + /// @param URL the URL + /// @param MIMEType the MIME content type of the response + /// @param length the expected content length of the associated data + /// @param name the name of the text encoding for the associated data, if applicable, else nil + /// @result The initialized NSURLResponse. + /// @discussion This is the designated initializer for NSURLResponse. + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + NSURL? URL, NSString? MIMEType, int length, NSString? name) { + final _ret = _lib._objc_msgSend_378( + _id, + _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, + URL?._id ?? ffi.nullptr, + MIMEType?._id ?? ffi.nullptr, + length, + name?._id ?? ffi.nullptr); + return NSURLResponse._(_ret, _lib, retain: true, release: true); + } - @u_int32_t() - external int el_flags; + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } - @__darwin_pid_t() - external int el_info_pid; + /// ! + /// @abstract Returns the MIME type of the receiver. + /// @discussion The MIME type is based on the information provided + /// from an origin source. However, that value may be changed or + /// corrected by a protocol implementation if it can be determined + /// that the origin server or source reported the information + /// incorrectly or imprecisely. An attempt to guess the MIME type may + /// be made if the origin source did not report any such information. + /// @result The MIME type of the receiver. + NSString? get MIMEType { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_MIMEType1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @u_int64_t() - external int el_extend; + /// ! + /// @abstract Returns the expected content length of the receiver. + /// @discussion Some protocol implementations report a content length + /// as part of delivering load metadata, but not all protocols + /// guarantee the amount of data that will be delivered in actuality. + /// Hence, this method returns an expected amount. Clients should use + /// this value as an advisory, and should be prepared to deal with + /// either more or less data. + /// @result The expected content length of the receiver, or -1 if + /// there is no expectation that can be arrived at regarding expected + /// content length. + int get expectedContentLength { + return _lib._objc_msgSend_82(_id, _lib._sel_expectedContentLength1); + } - @u_int32_t() - external int el_info_reserved_1; + /// ! + /// @abstract Returns the name of the text encoding of the receiver. + /// @discussion This name will be the actual string reported by the + /// origin source during the course of performing a protocol-specific + /// URL load. Clients can inspect this string and convert it to an + /// NSStringEncoding or CFStringEncoding using the methods and + /// functions made available in the appropriate framework. + /// @result The name of the text encoding of the receiver, or nil if no + /// text encoding was specified. + NSString? get textEncodingName { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_textEncodingName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @uid_t() - external int el_uid; + /// ! + /// @abstract Returns a suggested filename if the resource were saved to disk. + /// @discussion The method first checks if the server has specified a filename using the + /// content disposition header. If no valid filename is specified using that mechanism, + /// this method checks the last path component of the URL. If no valid filename can be + /// obtained using the last path component, this method uses the URL's host as the filename. + /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. + /// In most cases, this method appends the proper file extension based on the MIME type. + /// This method always returns a valid filename. + /// @result A suggested filename to use if saving the resource to disk. + NSString? get suggestedFilename { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedFilename1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - external guid_t el_uguid; + static NSURLResponse new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); + } - @u_int32_t() - external int el_uguid_valid; + static NSURLResponse alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); + } +} - external ntsid_t el_usid; +abstract class NSURLSessionTaskState { + /// The task is currently being serviced by the session + static const int NSURLSessionTaskStateRunning = 0; + static const int NSURLSessionTaskStateSuspended = 1; - @u_int32_t() - external int el_usid_valid; + /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. + static const int NSURLSessionTaskStateCanceling = 2; - @gid_t() - external int el_gid; + /// The task has completed and the session will receive no more delegate notifications + static const int NSURLSessionTaskStateCompleted = 3; +} - external guid_t el_gguid; +void _ObjCBlock20_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} - @u_int32_t() - external int el_gguid_valid; +final _ObjCBlock20_closureRegistry = {}; +int _ObjCBlock20_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock20_registerClosure(Function fn) { + final id = ++_ObjCBlock20_closureRegistryIndex; + _ObjCBlock20_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external ntsid_t el_gsid; +void _ObjCBlock20_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock20_closureRegistry[block.ref.target.address]!(arg0); +} - @u_int32_t() - external int el_gsid_valid; +class ObjCBlock20 extends _ObjCBlockBase { + ObjCBlock20._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @u_int32_t() - external int el_member_valid; + /// Creates a block from a C function pointer. + ObjCBlock20.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock20_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @u_int32_t() - external int el_sup_grp_cnt; + /// Creates a block from a Dart function. + ObjCBlock20.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock20_closureTrampoline) + .cast(), + _ObjCBlock20_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } - @ffi.Array.multi([16]) - external ffi.Array el_sup_groups; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef u_int64_t = ffi.UnsignedLongLong; - -class kauth_cache_sizes extends ffi.Struct { - @u_int32_t() - external int kcs_group_size; +class CFArrayCallBacks extends ffi.Struct { + @CFIndex() + external int version; - @u_int32_t() - external int kcs_id_size; -} + external CFArrayRetainCallBack retain; -class kauth_ace extends ffi.Struct { - external guid_t ace_applicable; + external CFArrayReleaseCallBack release; - @u_int32_t() - external int ace_flags; + external CFArrayCopyDescriptionCallBack copyDescription; - @kauth_ace_rights_t() - external int ace_rights; + external CFArrayEqualCallBack equal; } -typedef kauth_ace_rights_t = u_int32_t; +typedef CFArrayRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFArrayReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFArrayCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFArrayEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>>; -class kauth_acl extends ffi.Struct { - @u_int32_t() - external int acl_entrycount; +class __CFArray extends ffi.Opaque {} - @u_int32_t() - external int acl_flags; +typedef CFArrayRef = ffi.Pointer<__CFArray>; +typedef CFMutableArrayRef = ffi.Pointer<__CFArray>; +typedef CFArrayApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFComparatorFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>; - @ffi.Array.multi([1]) - external ffi.Array acl_ace; -} +class OS_object extends NSObject { + OS_object._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class kauth_filesec extends ffi.Struct { - @u_int32_t() - external int fsec_magic; + /// Returns a [OS_object] that points to the same underlying object as [other]. + static OS_object castFrom(T other) { + return OS_object._(other._id, other._lib, retain: true, release: true); + } - external guid_t fsec_owner; + /// Returns a [OS_object] that wraps the given raw object pointer. + static OS_object castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return OS_object._(other, lib, retain: retain, release: release); + } - external guid_t fsec_group; + /// Returns whether [obj] is an instance of [OS_object]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_OS_object1); + } - external kauth_acl fsec_acl; -} + @override + OS_object init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_object._(_ret, _lib, retain: true, release: true); + } -abstract class acl_perm_t { - static const int ACL_READ_DATA = 2; - static const int ACL_LIST_DIRECTORY = 2; - static const int ACL_WRITE_DATA = 4; - static const int ACL_ADD_FILE = 4; - static const int ACL_EXECUTE = 8; - static const int ACL_SEARCH = 8; - static const int ACL_DELETE = 16; - static const int ACL_APPEND_DATA = 32; - static const int ACL_ADD_SUBDIRECTORY = 32; - static const int ACL_DELETE_CHILD = 64; - static const int ACL_READ_ATTRIBUTES = 128; - static const int ACL_WRITE_ATTRIBUTES = 256; - static const int ACL_READ_EXTATTRIBUTES = 512; - static const int ACL_WRITE_EXTATTRIBUTES = 1024; - static const int ACL_READ_SECURITY = 2048; - static const int ACL_WRITE_SECURITY = 4096; - static const int ACL_CHANGE_OWNER = 8192; - static const int ACL_SYNCHRONIZE = 1048576; -} + static OS_object new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_new1); + return OS_object._(_ret, _lib, retain: false, release: true); + } -abstract class acl_tag_t { - static const int ACL_UNDEFINED_TAG = 0; - static const int ACL_EXTENDED_ALLOW = 1; - static const int ACL_EXTENDED_DENY = 2; + static OS_object alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_alloc1); + return OS_object._(_ret, _lib, retain: false, release: true); + } } -abstract class acl_type_t { - static const int ACL_TYPE_EXTENDED = 256; - static const int ACL_TYPE_ACCESS = 0; - static const int ACL_TYPE_DEFAULT = 1; - static const int ACL_TYPE_AFS = 2; - static const int ACL_TYPE_CODA = 3; - static const int ACL_TYPE_NTFS = 4; - static const int ACL_TYPE_NWFS = 5; -} +class __SecCertificate extends ffi.Opaque {} -abstract class acl_entry_id_t { - static const int ACL_FIRST_ENTRY = 0; - static const int ACL_NEXT_ENTRY = -1; - static const int ACL_LAST_ENTRY = -2; -} +class __SecIdentity extends ffi.Opaque {} -abstract class acl_flag_t { - static const int ACL_FLAG_DEFER_INHERIT = 1; - static const int ACL_FLAG_NO_INHERIT = 131072; - static const int ACL_ENTRY_INHERITED = 16; - static const int ACL_ENTRY_FILE_INHERIT = 32; - static const int ACL_ENTRY_DIRECTORY_INHERIT = 64; - static const int ACL_ENTRY_LIMIT_INHERIT = 128; - static const int ACL_ENTRY_ONLY_INHERIT = 256; -} +class __SecKey extends ffi.Opaque {} -class _acl extends ffi.Opaque {} +class __SecPolicy extends ffi.Opaque {} -class _acl_entry extends ffi.Opaque {} +class __SecAccessControl extends ffi.Opaque {} -class _acl_permset extends ffi.Opaque {} +class __SecKeychain extends ffi.Opaque {} -class _acl_flagset extends ffi.Opaque {} +class __SecKeychainItem extends ffi.Opaque {} -typedef acl_t = ffi.Pointer<_acl>; -typedef acl_entry_t = ffi.Pointer<_acl_entry>; -typedef acl_permset_t = ffi.Pointer<_acl_permset>; -typedef acl_permset_mask_t = u_int64_t; -typedef acl_flagset_t = ffi.Pointer<_acl_flagset>; +class __SecKeychainSearch extends ffi.Opaque {} -class __CFFileSecurity extends ffi.Opaque {} +class SecKeychainAttribute extends ffi.Struct { + @SecKeychainAttrType() + external int tag; -typedef CFFileSecurityRef = ffi.Pointer<__CFFileSecurity>; + @UInt32() + external int length; -abstract class CFFileSecurityClearOptions { - static const int kCFFileSecurityClearOwner = 1; - static const int kCFFileSecurityClearGroup = 2; - static const int kCFFileSecurityClearMode = 4; - static const int kCFFileSecurityClearOwnerUUID = 8; - static const int kCFFileSecurityClearGroupUUID = 16; - static const int kCFFileSecurityClearAccessControlList = 32; + external ffi.Pointer data; } -class __CFStringTokenizer extends ffi.Opaque {} +typedef SecKeychainAttrType = OSType; +typedef OSType = FourCharCode; +typedef FourCharCode = UInt32; -abstract class CFStringTokenizerTokenType { - static const int kCFStringTokenizerTokenNone = 0; - static const int kCFStringTokenizerTokenNormal = 1; - static const int kCFStringTokenizerTokenHasSubTokensMask = 2; - static const int kCFStringTokenizerTokenHasDerivedSubTokensMask = 4; - static const int kCFStringTokenizerTokenHasHasNumbersMask = 8; - static const int kCFStringTokenizerTokenHasNonLettersMask = 16; - static const int kCFStringTokenizerTokenIsCJWordMask = 32; +class SecKeychainAttributeList extends ffi.Struct { + @UInt32() + external int count; + + external ffi.Pointer attr; } -typedef CFStringTokenizerRef = ffi.Pointer<__CFStringTokenizer>; +class __SecTrustedApplication extends ffi.Opaque {} -class __CFFileDescriptor extends ffi.Opaque {} +class __SecAccess extends ffi.Opaque {} -class CFFileDescriptorContext extends ffi.Struct { - @CFIndex() - external int version; +class __SecACL extends ffi.Opaque {} - external ffi.Pointer info; +class __SecPassword extends ffi.Opaque {} - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; +class SecKeychainAttributeInfo extends ffi.Struct { + @UInt32() + external int count; - external ffi - .Pointer)>> - release; + external ffi.Pointer tag; - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; + external ffi.Pointer format; } -typedef CFFileDescriptorRef = ffi.Pointer<__CFFileDescriptor>; -typedef CFFileDescriptorNativeDescriptor = ffi.Int; -typedef CFFileDescriptorCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFFileDescriptorRef, CFOptionFlags, ffi.Pointer)>>; +typedef OSStatus = SInt32; -class __CFUserNotification extends ffi.Opaque {} +class _RuneEntry extends ffi.Struct { + @__darwin_rune_t() + external int __min; -typedef CFUserNotificationRef = ffi.Pointer<__CFUserNotification>; -typedef CFUserNotificationCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFUserNotificationRef, CFOptionFlags)>>; + @__darwin_rune_t() + external int __max; -class __CFXMLNode extends ffi.Opaque {} + @__darwin_rune_t() + external int __map; -abstract class CFXMLNodeTypeCode { - static const int kCFXMLNodeTypeDocument = 1; - static const int kCFXMLNodeTypeElement = 2; - static const int kCFXMLNodeTypeAttribute = 3; - static const int kCFXMLNodeTypeProcessingInstruction = 4; - static const int kCFXMLNodeTypeComment = 5; - static const int kCFXMLNodeTypeText = 6; - static const int kCFXMLNodeTypeCDATASection = 7; - static const int kCFXMLNodeTypeDocumentFragment = 8; - static const int kCFXMLNodeTypeEntity = 9; - static const int kCFXMLNodeTypeEntityReference = 10; - static const int kCFXMLNodeTypeDocumentType = 11; - static const int kCFXMLNodeTypeWhitespace = 12; - static const int kCFXMLNodeTypeNotation = 13; - static const int kCFXMLNodeTypeElementTypeDeclaration = 14; - static const int kCFXMLNodeTypeAttributeListDeclaration = 15; + external ffi.Pointer<__uint32_t> __types; } -class CFXMLElementInfo extends ffi.Struct { - external CFDictionaryRef attributes; - - external CFArrayRef attributeOrder; +typedef __darwin_rune_t = __darwin_wchar_t; +typedef __darwin_wchar_t = ffi.Int; - @Boolean() - external int isEmpty; +class _RuneRange extends ffi.Struct { + @ffi.Int() + external int __nranges; - @ffi.Array.multi([3]) - external ffi.Array _reserved; + external ffi.Pointer<_RuneEntry> __ranges; } -class CFXMLProcessingInstructionInfo extends ffi.Struct { - external CFStringRef dataString; +class _RuneCharClass extends ffi.Struct { + @ffi.Array.multi([14]) + external ffi.Array __name; + + @__uint32_t() + external int __mask; } -class CFXMLDocumentInfo extends ffi.Struct { - external CFURLRef sourceURL; +class _RuneLocale extends ffi.Struct { + @ffi.Array.multi([8]) + external ffi.Array __magic; - @CFStringEncoding() - external int encoding; -} + @ffi.Array.multi([32]) + external ffi.Array __encoding; -class CFXMLExternalID extends ffi.Struct { - external CFURLRef systemID; + external ffi.Pointer< + ffi.NativeFunction< + __darwin_rune_t Function(ffi.Pointer, __darwin_size_t, + ffi.Pointer>)>> __sgetrune; - external CFStringRef publicID; -} + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(__darwin_rune_t, ffi.Pointer, + __darwin_size_t, ffi.Pointer>)>> __sputrune; -class CFXMLDocumentTypeInfo extends ffi.Struct { - external CFXMLExternalID externalID; -} + @__darwin_rune_t() + external int __invalid_rune; -class CFXMLNotationInfo extends ffi.Struct { - external CFXMLExternalID externalID; -} + @ffi.Array.multi([256]) + external ffi.Array<__uint32_t> __runetype; -class CFXMLElementTypeDeclarationInfo extends ffi.Struct { - external CFStringRef contentDescription; -} + @ffi.Array.multi([256]) + external ffi.Array<__darwin_rune_t> __maplower; -class CFXMLAttributeDeclarationInfo extends ffi.Struct { - external CFStringRef attributeName; + @ffi.Array.multi([256]) + external ffi.Array<__darwin_rune_t> __mapupper; - external CFStringRef typeString; + external _RuneRange __runetype_ext; - external CFStringRef defaultString; -} + external _RuneRange __maplower_ext; -class CFXMLAttributeListDeclarationInfo extends ffi.Struct { - @CFIndex() - external int numberOfAttributes; + external _RuneRange __mapupper_ext; - external ffi.Pointer attributes; -} + external ffi.Pointer __variable; -abstract class CFXMLEntityTypeCode { - static const int kCFXMLEntityTypeParameter = 0; - static const int kCFXMLEntityTypeParsedInternal = 1; - static const int kCFXMLEntityTypeParsedExternal = 2; - static const int kCFXMLEntityTypeUnparsed = 3; - static const int kCFXMLEntityTypeCharacter = 4; + @ffi.Int() + external int __variable_len; + + @ffi.Int() + external int __ncharclasses; + + external ffi.Pointer<_RuneCharClass> __charclasses; } -class CFXMLEntityInfo extends ffi.Struct { - @ffi.Int32() - external int entityType; +typedef __darwin_ct_rune_t = ffi.Int; - external CFStringRef replacementText; +class lconv extends ffi.Struct { + external ffi.Pointer decimal_point; - external CFXMLExternalID entityID; + external ffi.Pointer thousands_sep; - external CFStringRef notationName; -} + external ffi.Pointer grouping; -class CFXMLEntityReferenceInfo extends ffi.Struct { - @ffi.Int32() - external int entityType; -} + external ffi.Pointer int_curr_symbol; -typedef CFXMLNodeRef = ffi.Pointer<__CFXMLNode>; -typedef CFXMLTreeRef = CFTreeRef; + external ffi.Pointer currency_symbol; -class __CFXMLParser extends ffi.Opaque {} + external ffi.Pointer mon_decimal_point; -abstract class CFXMLParserOptions { - static const int kCFXMLParserValidateDocument = 1; - static const int kCFXMLParserSkipMetaData = 2; - static const int kCFXMLParserReplacePhysicalEntities = 4; - static const int kCFXMLParserSkipWhitespace = 8; - static const int kCFXMLParserResolveExternalEntities = 16; - static const int kCFXMLParserAddImpliedAttributes = 32; - static const int kCFXMLParserAllOptions = 16777215; - static const int kCFXMLParserNoOptions = 0; -} + external ffi.Pointer mon_thousands_sep; -abstract class CFXMLParserStatusCode { - static const int kCFXMLStatusParseNotBegun = -2; - static const int kCFXMLStatusParseInProgress = -1; - static const int kCFXMLStatusParseSuccessful = 0; - static const int kCFXMLErrorUnexpectedEOF = 1; - static const int kCFXMLErrorUnknownEncoding = 2; - static const int kCFXMLErrorEncodingConversionFailure = 3; - static const int kCFXMLErrorMalformedProcessingInstruction = 4; - static const int kCFXMLErrorMalformedDTD = 5; - static const int kCFXMLErrorMalformedName = 6; - static const int kCFXMLErrorMalformedCDSect = 7; - static const int kCFXMLErrorMalformedCloseTag = 8; - static const int kCFXMLErrorMalformedStartTag = 9; - static const int kCFXMLErrorMalformedDocument = 10; - static const int kCFXMLErrorElementlessDocument = 11; - static const int kCFXMLErrorMalformedComment = 12; - static const int kCFXMLErrorMalformedCharacterReference = 13; - static const int kCFXMLErrorMalformedParsedCharacterData = 14; - static const int kCFXMLErrorNoData = 15; -} + external ffi.Pointer mon_grouping; -class CFXMLParserCallBacks extends ffi.Struct { - @CFIndex() - external int version; + external ffi.Pointer positive_sign; - external CFXMLParserCreateXMLStructureCallBack createXMLStructure; + external ffi.Pointer negative_sign; - external CFXMLParserAddChildCallBack addChild; + @ffi.Char() + external int int_frac_digits; - external CFXMLParserEndXMLStructureCallBack endXMLStructure; + @ffi.Char() + external int frac_digits; - external CFXMLParserResolveExternalEntityCallBack resolveExternalEntity; + @ffi.Char() + external int p_cs_precedes; - external CFXMLParserHandleErrorCallBack handleError; -} + @ffi.Char() + external int p_sep_by_space; -typedef CFXMLParserCreateXMLStructureCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFXMLParserRef, CFXMLNodeRef, ffi.Pointer)>>; -typedef CFXMLParserRef = ffi.Pointer<__CFXMLParser>; -typedef CFXMLParserAddChildCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFXMLParserRef, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>; -typedef CFXMLParserEndXMLStructureCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFXMLParserRef, ffi.Pointer, ffi.Pointer)>>; -typedef CFXMLParserResolveExternalEntityCallBack = ffi.Pointer< - ffi.NativeFunction< - CFDataRef Function(CFXMLParserRef, ffi.Pointer, - ffi.Pointer)>>; -typedef CFXMLParserHandleErrorCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(CFXMLParserRef, ffi.Int32, ffi.Pointer)>>; + @ffi.Char() + external int n_cs_precedes; -class CFXMLParserContext extends ffi.Struct { - @CFIndex() - external int version; + @ffi.Char() + external int n_sep_by_space; - external ffi.Pointer info; + @ffi.Char() + external int p_sign_posn; - external CFXMLParserRetainCallBack retain; + @ffi.Char() + external int n_sign_posn; - external CFXMLParserReleaseCallBack release; + @ffi.Char() + external int int_p_cs_precedes; - external CFXMLParserCopyDescriptionCallBack copyDescription; -} + @ffi.Char() + external int int_n_cs_precedes; -typedef CFXMLParserRetainCallBack = ffi.Pointer< - ffi.NativeFunction Function(ffi.Pointer)>>; -typedef CFXMLParserReleaseCallBack - = ffi.Pointer)>>; -typedef CFXMLParserCopyDescriptionCallBack = ffi - .Pointer)>>; + @ffi.Char() + external int int_p_sep_by_space; -abstract class SecTrustResultType { - static const int kSecTrustResultInvalid = 0; - static const int kSecTrustResultProceed = 1; - static const int kSecTrustResultConfirm = 2; - static const int kSecTrustResultDeny = 3; - static const int kSecTrustResultUnspecified = 4; - static const int kSecTrustResultRecoverableTrustFailure = 5; - static const int kSecTrustResultFatalTrustFailure = 6; - static const int kSecTrustResultOtherError = 7; -} + @ffi.Char() + external int int_n_sep_by_space; -class __SecTrust extends ffi.Opaque {} + @ffi.Char() + external int int_p_sign_posn; -typedef SecTrustRef = ffi.Pointer<__SecTrust>; -typedef SecTrustCallback = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock28_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>>() - .asFunction()(arg0, arg1); + @ffi.Char() + external int int_n_sign_posn; } -final _ObjCBlock28_closureRegistry = {}; -int _ObjCBlock28_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock28_registerClosure(Function fn) { - final id = ++_ObjCBlock28_closureRegistryIndex; - _ObjCBlock28_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +class __float2 extends ffi.Struct { + @ffi.Float() + external double __sinval; + + @ffi.Float() + external double __cosval; } -void _ObjCBlock28_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { - return _ObjCBlock28_closureRegistry[block.ref.target.address]!(arg0, arg1); +class __double2 extends ffi.Struct { + @ffi.Double() + external double __sinval; + + @ffi.Double() + external double __cosval; } -class ObjCBlock28 extends _ObjCBlockBase { - ObjCBlock28._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class exception extends ffi.Struct { + @ffi.Int() + external int type; - /// Creates a block from a C function pointer. - ObjCBlock28.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>> - ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - ffi.Int32 arg1)>(_ObjCBlock28_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external ffi.Pointer name; - /// Creates a block from a Dart function. - ObjCBlock28.fromFunction( - NativeCupertinoHttp lib, void Function(SecTrustRef arg0, int arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - ffi.Int32 arg1)>(_ObjCBlock28_closureTrampoline) - .cast(), - _ObjCBlock28_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(SecTrustRef arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, ffi.Int32 arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, - int arg1)>()(_id, arg0, arg1); - } + @ffi.Double() + external double arg1; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Double() + external double arg2; -typedef SecTrustWithErrorCallback = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock29_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, bool arg1, CFErrorRef arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() - .asFunction< - void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2)>()( - arg0, arg1, arg2); + @ffi.Double() + external double retval; } -final _ObjCBlock29_closureRegistry = {}; -int _ObjCBlock29_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock29_registerClosure(Function fn) { - final id = ++_ObjCBlock29_closureRegistryIndex; - _ObjCBlock29_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +typedef pthread_t = __darwin_pthread_t; +typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; +typedef stack_t = __darwin_sigaltstack; -void _ObjCBlock29_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, bool arg1, CFErrorRef arg2) { - return _ObjCBlock29_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +class __sbuf extends ffi.Struct { + external ffi.Pointer _base; + + @ffi.Int() + external int _size; } -class ObjCBlock29 extends _ObjCBlockBase { - ObjCBlock29._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class __sFILEX extends ffi.Opaque {} - /// Creates a block from a C function pointer. - ObjCBlock29.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - ffi.Bool arg1, - CFErrorRef arg2)>(_ObjCBlock29_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class __sFILE extends ffi.Struct { + external ffi.Pointer _p; - /// Creates a block from a Dart function. - ObjCBlock29.fromFunction(NativeCupertinoHttp lib, - void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - ffi.Bool arg1, - CFErrorRef arg2)>(_ObjCBlock29_closureTrampoline) - .cast(), - _ObjCBlock29_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(SecTrustRef arg0, bool arg1, CFErrorRef arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, - bool arg1, CFErrorRef arg2)>()(_id, arg0, arg1, arg2); - } + @ffi.Int() + external int _r; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Int() + external int _w; -typedef SecKeyRef = ffi.Pointer<__SecKey>; -typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; + @ffi.Short() + external int _flags; -class cssm_data extends ffi.Struct { - @ffi.Size() - external int Length; + @ffi.Short() + external int _file; - external ffi.Pointer Data; -} + external __sbuf _bf; -class SecAsn1AlgId extends ffi.Struct { - external SecAsn1Oid algorithm; + @ffi.Int() + external int _lbfsize; - external SecAsn1Item parameters; -} + external ffi.Pointer _cookie; -typedef SecAsn1Oid = cssm_data; -typedef SecAsn1Item = cssm_data; + external ffi + .Pointer)>> + _close; -class SecAsn1PubKeyInfo extends ffi.Struct { - external SecAsn1AlgId algorithm; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> _read; - external SecAsn1Item subjectPublicKey; -} + external ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> _seek; -class SecAsn1Template_struct extends ffi.Struct { - @ffi.Uint32() - external int kind; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> _write; - @ffi.Uint32() - external int offset; + external __sbuf _ub; - external ffi.Pointer sub; + external ffi.Pointer<__sFILEX> _extra; - @ffi.Uint32() - external int size; -} + @ffi.Int() + external int _ur; -class cssm_guid extends ffi.Struct { - @uint32() - external int Data1; + @ffi.Array.multi([3]) + external ffi.Array _ubuf; - @uint16() - external int Data2; + @ffi.Array.multi([1]) + external ffi.Array _nbuf; - @uint16() - external int Data3; + external __sbuf _lb; - @ffi.Array.multi([8]) - external ffi.Array Data4; + @ffi.Int() + external int _blksize; + + @fpos_t() + external int _offset; } -typedef uint32 = ffi.Uint32; -typedef uint16 = ffi.Uint16; -typedef uint8 = ffi.Uint8; +typedef fpos_t = __darwin_off_t; +typedef __darwin_off_t = __int64_t; +typedef __int64_t = ffi.LongLong; +typedef FILE = __sFILE; +typedef off_t = __darwin_off_t; +typedef ssize_t = __darwin_ssize_t; +typedef __darwin_ssize_t = ffi.Long; +typedef errno_t = ffi.Int; +typedef rsize_t = ffi.UnsignedLong; -class cssm_version extends ffi.Struct { - @uint32() - external int Major; +class timespec extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; - @uint32() - external int Minor; + @ffi.Long() + external int tv_nsec; } -class cssm_subservice_uid extends ffi.Struct { - external CSSM_GUID Guid; +class tm extends ffi.Struct { + @ffi.Int() + external int tm_sec; - external CSSM_VERSION Version; + @ffi.Int() + external int tm_min; - @uint32() - external int SubserviceId; + @ffi.Int() + external int tm_hour; - @CSSM_SERVICE_TYPE() - external int SubserviceType; -} + @ffi.Int() + external int tm_mday; -typedef CSSM_GUID = cssm_guid; -typedef CSSM_VERSION = cssm_version; -typedef CSSM_SERVICE_TYPE = CSSM_SERVICE_MASK; -typedef CSSM_SERVICE_MASK = uint32; + @ffi.Int() + external int tm_mon; -class cssm_net_address extends ffi.Struct { - @CSSM_NET_ADDRESS_TYPE() - external int AddressType; + @ffi.Int() + external int tm_year; - external SecAsn1Item Address; -} + @ffi.Int() + external int tm_wday; -typedef CSSM_NET_ADDRESS_TYPE = uint32; + @ffi.Int() + external int tm_yday; -class cssm_crypto_data extends ffi.Struct { - external SecAsn1Item Param; + @ffi.Int() + external int tm_isdst; - external CSSM_CALLBACK Callback; + @ffi.Long() + external int tm_gmtoff; - external ffi.Pointer CallerCtx; + external ffi.Pointer tm_zone; } -typedef CSSM_CALLBACK = ffi.Pointer< - ffi.NativeFunction< - CSSM_RETURN Function(CSSM_DATA_PTR, ffi.Pointer)>>; -typedef CSSM_RETURN = sint32; -typedef sint32 = ffi.Int32; -typedef CSSM_DATA_PTR = ffi.Pointer; +typedef clock_t = __darwin_clock_t; +typedef __darwin_clock_t = ffi.UnsignedLong; +typedef time_t = __darwin_time_t; -class cssm_list_element extends ffi.Struct { - external ffi.Pointer NextElement; +abstract class clockid_t { + static const int _CLOCK_REALTIME = 0; + static const int _CLOCK_MONOTONIC = 6; + static const int _CLOCK_MONOTONIC_RAW = 4; + static const int _CLOCK_MONOTONIC_RAW_APPROX = 5; + static const int _CLOCK_UPTIME_RAW = 8; + static const int _CLOCK_UPTIME_RAW_APPROX = 9; + static const int _CLOCK_PROCESS_CPUTIME_ID = 12; + static const int _CLOCK_THREAD_CPUTIME_ID = 16; +} - @CSSM_WORDID_TYPE() - external int WordID; +typedef intmax_t = ffi.Long; - @CSSM_LIST_ELEMENT_TYPE() - external int ElementType; +class imaxdiv_t extends ffi.Struct { + @intmax_t() + external int quot; - external UnnamedUnion1 Element; + @intmax_t() + external int rem; } -typedef CSSM_WORDID_TYPE = sint32; -typedef CSSM_LIST_ELEMENT_TYPE = uint32; +typedef uintmax_t = ffi.UnsignedLong; -class UnnamedUnion1 extends ffi.Union { - external CSSM_LIST Sublist; +class CFBagCallBacks extends ffi.Struct { + @CFIndex() + external int version; - external SecAsn1Item Word; -} + external CFBagRetainCallBack retain; -typedef CSSM_LIST = cssm_list; + external CFBagReleaseCallBack release; -class cssm_list extends ffi.Struct { - @CSSM_LIST_TYPE() - external int ListType; + external CFBagCopyDescriptionCallBack copyDescription; - external CSSM_LIST_ELEMENT_PTR Head; + external CFBagEqualCallBack equal; - external CSSM_LIST_ELEMENT_PTR Tail; + external CFBagHashCallBack hash; } -typedef CSSM_LIST_TYPE = uint32; -typedef CSSM_LIST_ELEMENT_PTR = ffi.Pointer; +typedef CFBagRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFBagReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFBagCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFBagEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFBagHashCallBack = ffi + .Pointer)>>; -class CSSM_TUPLE extends ffi.Struct { - external CSSM_LIST Issuer; +class __CFBag extends ffi.Opaque {} - external CSSM_LIST Subject; +typedef CFBagRef = ffi.Pointer<__CFBag>; +typedef CFMutableBagRef = ffi.Pointer<__CFBag>; +typedef CFBagApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; - @CSSM_BOOL() - external int Delegate; +class CFBinaryHeapCompareContext extends ffi.Struct { + @CFIndex() + external int version; - external CSSM_LIST AuthorizationTag; + external ffi.Pointer info; - external CSSM_LIST ValidityPeriod; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; + + external ffi + .Pointer)>> + release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; } -typedef CSSM_BOOL = sint32; +class CFBinaryHeapCallBacks extends ffi.Struct { + @CFIndex() + external int version; -class cssm_tuplegroup extends ffi.Struct { - @uint32() - external int NumberOfTuples; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFAllocatorRef, ffi.Pointer)>> retain; - external CSSM_TUPLE_PTR Tuples; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>> release; + + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> compare; } -typedef CSSM_TUPLE_PTR = ffi.Pointer; +class __CFBinaryHeap extends ffi.Opaque {} -class cssm_sample extends ffi.Struct { - external CSSM_LIST TypedSample; +typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; +typedef CFBinaryHeapApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; - external ffi.Pointer Verifier; -} +class __CFBitVector extends ffi.Opaque {} -typedef CSSM_SUBSERVICE_UID = cssm_subservice_uid; +typedef CFBitVectorRef = ffi.Pointer<__CFBitVector>; +typedef CFMutableBitVectorRef = ffi.Pointer<__CFBitVector>; +typedef CFBit = UInt32; -class cssm_samplegroup extends ffi.Struct { - @uint32() - external int NumberOfSamples; +abstract class __CFByteOrder { + static const int CFByteOrderUnknown = 0; + static const int CFByteOrderLittleEndian = 1; + static const int CFByteOrderBigEndian = 2; +} - external ffi.Pointer Samples; +class CFSwappedFloat32 extends ffi.Struct { + @ffi.Uint32() + external int v; } -typedef CSSM_SAMPLE = cssm_sample; +class CFSwappedFloat64 extends ffi.Struct { + @ffi.Uint64() + external int v; +} -class cssm_memory_funcs extends ffi.Struct { - external CSSM_MALLOC malloc_func; +class CFDictionaryKeyCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external CFDictionaryRetainCallBack retain; - external CSSM_FREE free_func; + external CFDictionaryReleaseCallBack release; - external CSSM_REALLOC realloc_func; + external CFDictionaryCopyDescriptionCallBack copyDescription; - external CSSM_CALLOC calloc_func; + external CFDictionaryEqualCallBack equal; - external ffi.Pointer AllocRef; + external CFDictionaryHashCallBack hash; } -typedef CSSM_MALLOC = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CSSM_SIZE, ffi.Pointer)>>; -typedef CSSM_SIZE = ffi.Size; -typedef CSSM_FREE = ffi.Pointer< +typedef CFDictionaryRetainCallBack = ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef CSSM_REALLOC = ffi.Pointer< + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFDictionaryReleaseCallBack = ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, CSSM_SIZE, ffi.Pointer)>>; -typedef CSSM_CALLOC = ffi.Pointer< + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFDictionaryCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFDictionaryEqualCallBack = ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function( - uint32, CSSM_SIZE, ffi.Pointer)>>; + Boolean Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFDictionaryHashCallBack = ffi + .Pointer)>>; -class cssm_encoded_cert extends ffi.Struct { - @CSSM_CERT_TYPE() - external int CertType; +class CFDictionaryValueCallBacks extends ffi.Struct { + @CFIndex() + external int version; - @CSSM_CERT_ENCODING() - external int CertEncoding; + external CFDictionaryRetainCallBack retain; - external SecAsn1Item CertBlob; + external CFDictionaryReleaseCallBack release; + + external CFDictionaryCopyDescriptionCallBack copyDescription; + + external CFDictionaryEqualCallBack equal; } -typedef CSSM_CERT_TYPE = uint32; -typedef CSSM_CERT_ENCODING = uint32; +class __CFDictionary extends ffi.Opaque {} -class cssm_parsed_cert extends ffi.Struct { - @CSSM_CERT_TYPE() - external int CertType; +typedef CFDictionaryRef = ffi.Pointer<__CFDictionary>; +typedef CFMutableDictionaryRef = ffi.Pointer<__CFDictionary>; +typedef CFDictionaryApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>; - @CSSM_CERT_PARSE_FORMAT() - external int ParsedCertFormat; +class __CFNotificationCenter extends ffi.Opaque {} - external ffi.Pointer ParsedCert; +abstract class CFNotificationSuspensionBehavior { + static const int CFNotificationSuspensionBehaviorDrop = 1; + static const int CFNotificationSuspensionBehaviorCoalesce = 2; + static const int CFNotificationSuspensionBehaviorHold = 3; + static const int CFNotificationSuspensionBehaviorDeliverImmediately = 4; } -typedef CSSM_CERT_PARSE_FORMAT = uint32; +typedef CFNotificationCenterRef = ffi.Pointer<__CFNotificationCenter>; +typedef CFNotificationCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFNotificationCenterRef, ffi.Pointer, + CFNotificationName, ffi.Pointer, CFDictionaryRef)>>; +typedef CFNotificationName = CFStringRef; -class cssm_cert_pair extends ffi.Struct { - external CSSM_ENCODED_CERT EncodedCert; +class __CFLocale extends ffi.Opaque {} - external CSSM_PARSED_CERT ParsedCert; +typedef CFLocaleRef = ffi.Pointer<__CFLocale>; +typedef CFLocaleIdentifier = CFStringRef; +typedef LangCode = SInt16; +typedef RegionCode = SInt16; + +abstract class CFLocaleLanguageDirection { + static const int kCFLocaleLanguageDirectionUnknown = 0; + static const int kCFLocaleLanguageDirectionLeftToRight = 1; + static const int kCFLocaleLanguageDirectionRightToLeft = 2; + static const int kCFLocaleLanguageDirectionTopToBottom = 3; + static const int kCFLocaleLanguageDirectionBottomToTop = 4; } -typedef CSSM_ENCODED_CERT = cssm_encoded_cert; -typedef CSSM_PARSED_CERT = cssm_parsed_cert; +typedef CFLocaleKey = CFStringRef; +typedef CFCalendarIdentifier = CFStringRef; +typedef CFAbsoluteTime = CFTimeInterval; +typedef CFTimeInterval = ffi.Double; -class cssm_certgroup extends ffi.Struct { - @CSSM_CERT_TYPE() - external int CertType; +class __CFDate extends ffi.Opaque {} - @CSSM_CERT_ENCODING() - external int CertEncoding; +typedef CFDateRef = ffi.Pointer<__CFDate>; - @uint32() - external int NumCerts; +class __CFTimeZone extends ffi.Opaque {} - external UnnamedUnion2 GroupList; +class CFGregorianDate extends ffi.Struct { + @SInt32() + external int year; - @CSSM_CERTGROUP_TYPE() - external int CertGroupType; + @SInt8() + external int month; - external ffi.Pointer Reserved; + @SInt8() + external int day; + + @SInt8() + external int hour; + + @SInt8() + external int minute; + + @ffi.Double() + external double second; } -class UnnamedUnion2 extends ffi.Union { - external CSSM_DATA_PTR CertList; +typedef SInt8 = ffi.SignedChar; - external CSSM_ENCODED_CERT_PTR EncodedCertList; +class CFGregorianUnits extends ffi.Struct { + @SInt32() + external int years; - external CSSM_PARSED_CERT_PTR ParsedCertList; + @SInt32() + external int months; - external CSSM_CERT_PAIR_PTR PairCertList; -} + @SInt32() + external int days; -typedef CSSM_ENCODED_CERT_PTR = ffi.Pointer; -typedef CSSM_PARSED_CERT_PTR = ffi.Pointer; -typedef CSSM_CERT_PAIR_PTR = ffi.Pointer; -typedef CSSM_CERTGROUP_TYPE = uint32; + @SInt32() + external int hours; -class cssm_base_certs extends ffi.Struct { - @CSSM_TP_HANDLE() - external int TPHandle; + @SInt32() + external int minutes; - @CSSM_CL_HANDLE() - external int CLHandle; + @ffi.Double() + external double seconds; +} - external CSSM_CERTGROUP Certs; +abstract class CFGregorianUnitFlags { + static const int kCFGregorianUnitsYears = 1; + static const int kCFGregorianUnitsMonths = 2; + static const int kCFGregorianUnitsDays = 4; + static const int kCFGregorianUnitsHours = 8; + static const int kCFGregorianUnitsMinutes = 16; + static const int kCFGregorianUnitsSeconds = 32; + static const int kCFGregorianAllUnits = 16777215; } -typedef CSSM_TP_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_MODULE_HANDLE = CSSM_HANDLE; -typedef CSSM_HANDLE = CSSM_INTPTR; -typedef CSSM_INTPTR = ffi.IntPtr; -typedef CSSM_CL_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_CERTGROUP = cssm_certgroup; +typedef CFTimeZoneRef = ffi.Pointer<__CFTimeZone>; -class cssm_access_credentials extends ffi.Struct { - @ffi.Array.multi([68]) - external ffi.Array EntryTag; +class __CFData extends ffi.Opaque {} - external CSSM_BASE_CERTS BaseCerts; +typedef CFDataRef = ffi.Pointer<__CFData>; +typedef CFMutableDataRef = ffi.Pointer<__CFData>; - external CSSM_SAMPLEGROUP Samples; +abstract class CFDataSearchFlags { + static const int kCFDataSearchBackwards = 1; + static const int kCFDataSearchAnchored = 2; +} - external CSSM_CHALLENGE_CALLBACK Callback; +class __CFCharacterSet extends ffi.Opaque {} - external ffi.Pointer CallerCtx; +abstract class CFCharacterSetPredefinedSet { + static const int kCFCharacterSetControl = 1; + static const int kCFCharacterSetWhitespace = 2; + static const int kCFCharacterSetWhitespaceAndNewline = 3; + static const int kCFCharacterSetDecimalDigit = 4; + static const int kCFCharacterSetLetter = 5; + static const int kCFCharacterSetLowercaseLetter = 6; + static const int kCFCharacterSetUppercaseLetter = 7; + static const int kCFCharacterSetNonBase = 8; + static const int kCFCharacterSetDecomposable = 9; + static const int kCFCharacterSetAlphaNumeric = 10; + static const int kCFCharacterSetPunctuation = 11; + static const int kCFCharacterSetCapitalizedLetter = 13; + static const int kCFCharacterSetSymbol = 14; + static const int kCFCharacterSetNewline = 15; + static const int kCFCharacterSetIllegal = 12; } -typedef CSSM_BASE_CERTS = cssm_base_certs; -typedef CSSM_SAMPLEGROUP = cssm_samplegroup; -typedef CSSM_CHALLENGE_CALLBACK = ffi.Pointer< - ffi.NativeFunction< - CSSM_RETURN Function(ffi.Pointer, CSSM_SAMPLEGROUP_PTR, - ffi.Pointer, ffi.Pointer)>>; -typedef CSSM_SAMPLEGROUP_PTR = ffi.Pointer; -typedef CSSM_MEMORY_FUNCS = cssm_memory_funcs; +typedef CFCharacterSetRef = ffi.Pointer<__CFCharacterSet>; +typedef CFMutableCharacterSetRef = ffi.Pointer<__CFCharacterSet>; +typedef UniChar = UInt16; -class cssm_authorizationgroup extends ffi.Struct { - @uint32() - external int NumberOfAuthTags; +class __CFError extends ffi.Opaque {} - external ffi.Pointer AuthTags; +typedef CFErrorDomain = CFStringRef; +typedef CFErrorRef = ffi.Pointer<__CFError>; + +abstract class CFStringBuiltInEncodings { + static const int kCFStringEncodingMacRoman = 0; + static const int kCFStringEncodingWindowsLatin1 = 1280; + static const int kCFStringEncodingISOLatin1 = 513; + static const int kCFStringEncodingNextStepLatin = 2817; + static const int kCFStringEncodingASCII = 1536; + static const int kCFStringEncodingUnicode = 256; + static const int kCFStringEncodingUTF8 = 134217984; + static const int kCFStringEncodingNonLossyASCII = 3071; + static const int kCFStringEncodingUTF16 = 256; + static const int kCFStringEncodingUTF16BE = 268435712; + static const int kCFStringEncodingUTF16LE = 335544576; + static const int kCFStringEncodingUTF32 = 201326848; + static const int kCFStringEncodingUTF32BE = 402653440; + static const int kCFStringEncodingUTF32LE = 469762304; } -typedef CSSM_ACL_AUTHORIZATION_TAG = sint32; +typedef CFStringEncoding = UInt32; +typedef CFMutableStringRef = ffi.Pointer<__CFString>; +typedef StringPtr = ffi.Pointer; +typedef ConstStringPtr = ffi.Pointer; -class cssm_acl_validity_period extends ffi.Struct { - external SecAsn1Item StartDate; +abstract class CFStringCompareFlags { + static const int kCFCompareCaseInsensitive = 1; + static const int kCFCompareBackwards = 4; + static const int kCFCompareAnchored = 8; + static const int kCFCompareNonliteral = 16; + static const int kCFCompareLocalized = 32; + static const int kCFCompareNumerically = 64; + static const int kCFCompareDiacriticInsensitive = 128; + static const int kCFCompareWidthInsensitive = 256; + static const int kCFCompareForcedOrdering = 512; +} - external SecAsn1Item EndDate; +abstract class CFStringNormalizationForm { + static const int kCFStringNormalizationFormD = 0; + static const int kCFStringNormalizationFormKD = 1; + static const int kCFStringNormalizationFormC = 2; + static const int kCFStringNormalizationFormKC = 3; } -class cssm_acl_entry_prototype extends ffi.Struct { - external CSSM_LIST TypedSubject; +class CFStringInlineBuffer extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array buffer; - @CSSM_BOOL() - external int Delegate; + external CFStringRef theString; - external CSSM_AUTHORIZATIONGROUP Authorization; + external ffi.Pointer directUniCharBuffer; - external CSSM_ACL_VALIDITY_PERIOD TimeRange; + external ffi.Pointer directCStringBuffer; - @ffi.Array.multi([68]) - external ffi.Array EntryTag; -} + external CFRange rangeToBuffer; -typedef CSSM_AUTHORIZATIONGROUP = cssm_authorizationgroup; -typedef CSSM_ACL_VALIDITY_PERIOD = cssm_acl_validity_period; + @CFIndex() + external int bufferedRangeStart; -class cssm_acl_owner_prototype extends ffi.Struct { - external CSSM_LIST TypedSubject; + @CFIndex() + external int bufferedRangeEnd; +} - @CSSM_BOOL() - external int Delegate; +abstract class CFTimeZoneNameStyle { + static const int kCFTimeZoneNameStyleStandard = 0; + static const int kCFTimeZoneNameStyleShortStandard = 1; + static const int kCFTimeZoneNameStyleDaylightSaving = 2; + static const int kCFTimeZoneNameStyleShortDaylightSaving = 3; + static const int kCFTimeZoneNameStyleGeneric = 4; + static const int kCFTimeZoneNameStyleShortGeneric = 5; } -class cssm_acl_entry_input extends ffi.Struct { - external CSSM_ACL_ENTRY_PROTOTYPE Prototype; +class __CFCalendar extends ffi.Opaque {} - external CSSM_ACL_SUBJECT_CALLBACK Callback; +typedef CFCalendarRef = ffi.Pointer<__CFCalendar>; - external ffi.Pointer CallerContext; +abstract class CFCalendarUnit { + static const int kCFCalendarUnitEra = 2; + static const int kCFCalendarUnitYear = 4; + static const int kCFCalendarUnitMonth = 8; + static const int kCFCalendarUnitDay = 16; + static const int kCFCalendarUnitHour = 32; + static const int kCFCalendarUnitMinute = 64; + static const int kCFCalendarUnitSecond = 128; + static const int kCFCalendarUnitWeek = 256; + static const int kCFCalendarUnitWeekday = 512; + static const int kCFCalendarUnitWeekdayOrdinal = 1024; + static const int kCFCalendarUnitQuarter = 2048; + static const int kCFCalendarUnitWeekOfMonth = 4096; + static const int kCFCalendarUnitWeekOfYear = 8192; + static const int kCFCalendarUnitYearForWeekOfYear = 16384; } -typedef CSSM_ACL_ENTRY_PROTOTYPE = cssm_acl_entry_prototype; -typedef CSSM_ACL_SUBJECT_CALLBACK = ffi.Pointer< - ffi.NativeFunction< - CSSM_RETURN Function(ffi.Pointer, CSSM_LIST_PTR, - ffi.Pointer, ffi.Pointer)>>; -typedef CSSM_LIST_PTR = ffi.Pointer; - -class cssm_resource_control_context extends ffi.Struct { - external CSSM_ACCESS_CREDENTIALS_PTR AccessCred; +class CGPoint extends ffi.Struct { + @CGFloat() + external double x; - external CSSM_ACL_ENTRY_INPUT InitialAclEntry; + @CGFloat() + external double y; } -typedef CSSM_ACCESS_CREDENTIALS_PTR = ffi.Pointer; -typedef CSSM_ACL_ENTRY_INPUT = cssm_acl_entry_input; +typedef CGFloat = ffi.Double; -class cssm_acl_entry_info extends ffi.Struct { - external CSSM_ACL_ENTRY_PROTOTYPE EntryPublicInfo; +class CGSize extends ffi.Struct { + @CGFloat() + external double width; - @CSSM_ACL_HANDLE() - external int EntryHandle; + @CGFloat() + external double height; } -typedef CSSM_ACL_HANDLE = CSSM_HANDLE; +class CGVector extends ffi.Struct { + @CGFloat() + external double dx; -class cssm_acl_edit extends ffi.Struct { - @CSSM_ACL_EDIT_MODE() - external int EditMode; + @CGFloat() + external double dy; +} - @CSSM_ACL_HANDLE() - external int OldEntryHandle; +class CGRect extends ffi.Struct { + external CGPoint origin; - external ffi.Pointer NewEntry; + external CGSize size; } -typedef CSSM_ACL_EDIT_MODE = uint32; +abstract class CGRectEdge { + static const int CGRectMinXEdge = 0; + static const int CGRectMinYEdge = 1; + static const int CGRectMaxXEdge = 2; + static const int CGRectMaxYEdge = 3; +} -class cssm_func_name_addr extends ffi.Struct { - @ffi.Array.multi([68]) - external ffi.Array Name; +class CGAffineTransform extends ffi.Struct { + @CGFloat() + external double a; - external CSSM_PROC_ADDR Address; -} + @CGFloat() + external double b; -typedef CSSM_PROC_ADDR = ffi.Pointer>; + @CGFloat() + external double c; -class cssm_date extends ffi.Struct { - @ffi.Array.multi([4]) - external ffi.Array Year; + @CGFloat() + external double d; - @ffi.Array.multi([2]) - external ffi.Array Month; + @CGFloat() + external double tx; - @ffi.Array.multi([2]) - external ffi.Array Day; + @CGFloat() + external double ty; } -class cssm_range extends ffi.Struct { - @uint32() - external int Min; +class CGAffineTransformComponents extends ffi.Struct { + external CGSize scale; - @uint32() - external int Max; -} + @CGFloat() + external double horizontalShear; -class cssm_query_size_data extends ffi.Struct { - @uint32() - external int SizeInputBlock; + @CGFloat() + external double rotation; - @uint32() - external int SizeOutputBlock; + external CGVector translation; } -class cssm_key_size extends ffi.Struct { - @uint32() - external int LogicalKeySizeInBits; +class __CFDateFormatter extends ffi.Opaque {} - @uint32() - external int EffectiveKeySizeInBits; +abstract class CFDateFormatterStyle { + static const int kCFDateFormatterNoStyle = 0; + static const int kCFDateFormatterShortStyle = 1; + static const int kCFDateFormatterMediumStyle = 2; + static const int kCFDateFormatterLongStyle = 3; + static const int kCFDateFormatterFullStyle = 4; } -class cssm_keyheader extends ffi.Struct { - @CSSM_HEADERVERSION() - external int HeaderVersion; - - external CSSM_GUID CspId; +abstract class CFISO8601DateFormatOptions { + static const int kCFISO8601DateFormatWithYear = 1; + static const int kCFISO8601DateFormatWithMonth = 2; + static const int kCFISO8601DateFormatWithWeekOfYear = 4; + static const int kCFISO8601DateFormatWithDay = 16; + static const int kCFISO8601DateFormatWithTime = 32; + static const int kCFISO8601DateFormatWithTimeZone = 64; + static const int kCFISO8601DateFormatWithSpaceBetweenDateAndTime = 128; + static const int kCFISO8601DateFormatWithDashSeparatorInDate = 256; + static const int kCFISO8601DateFormatWithColonSeparatorInTime = 512; + static const int kCFISO8601DateFormatWithColonSeparatorInTimeZone = 1024; + static const int kCFISO8601DateFormatWithFractionalSeconds = 2048; + static const int kCFISO8601DateFormatWithFullDate = 275; + static const int kCFISO8601DateFormatWithFullTime = 1632; + static const int kCFISO8601DateFormatWithInternetDateTime = 1907; +} - @CSSM_KEYBLOB_TYPE() - external int BlobType; +typedef CFDateFormatterRef = ffi.Pointer<__CFDateFormatter>; +typedef CFDateFormatterKey = CFStringRef; - @CSSM_KEYBLOB_FORMAT() - external int Format; +class __CFBoolean extends ffi.Opaque {} - @CSSM_ALGORITHMS() - external int AlgorithmId; +typedef CFBooleanRef = ffi.Pointer<__CFBoolean>; - @CSSM_KEYCLASS() - external int KeyClass; +abstract class CFNumberType { + static const int kCFNumberSInt8Type = 1; + static const int kCFNumberSInt16Type = 2; + static const int kCFNumberSInt32Type = 3; + static const int kCFNumberSInt64Type = 4; + static const int kCFNumberFloat32Type = 5; + static const int kCFNumberFloat64Type = 6; + static const int kCFNumberCharType = 7; + static const int kCFNumberShortType = 8; + static const int kCFNumberIntType = 9; + static const int kCFNumberLongType = 10; + static const int kCFNumberLongLongType = 11; + static const int kCFNumberFloatType = 12; + static const int kCFNumberDoubleType = 13; + static const int kCFNumberCFIndexType = 14; + static const int kCFNumberNSIntegerType = 15; + static const int kCFNumberCGFloatType = 16; + static const int kCFNumberMaxType = 16; +} - @uint32() - external int LogicalKeySizeInBits; +class __CFNumber extends ffi.Opaque {} - @CSSM_KEYATTR_FLAGS() - external int KeyAttr; +typedef CFNumberRef = ffi.Pointer<__CFNumber>; - @CSSM_KEYUSE() - external int KeyUsage; +class __CFNumberFormatter extends ffi.Opaque {} - external CSSM_DATE StartDate; +abstract class CFNumberFormatterStyle { + static const int kCFNumberFormatterNoStyle = 0; + static const int kCFNumberFormatterDecimalStyle = 1; + static const int kCFNumberFormatterCurrencyStyle = 2; + static const int kCFNumberFormatterPercentStyle = 3; + static const int kCFNumberFormatterScientificStyle = 4; + static const int kCFNumberFormatterSpellOutStyle = 5; + static const int kCFNumberFormatterOrdinalStyle = 6; + static const int kCFNumberFormatterCurrencyISOCodeStyle = 8; + static const int kCFNumberFormatterCurrencyPluralStyle = 9; + static const int kCFNumberFormatterCurrencyAccountingStyle = 10; +} - external CSSM_DATE EndDate; +typedef CFNumberFormatterRef = ffi.Pointer<__CFNumberFormatter>; - @CSSM_ALGORITHMS() - external int WrapAlgorithmId; +abstract class CFNumberFormatterOptionFlags { + static const int kCFNumberFormatterParseIntegersOnly = 1; +} - @CSSM_ENCRYPT_MODE() - external int WrapMode; +typedef CFNumberFormatterKey = CFStringRef; - @uint32() - external int Reserved; +abstract class CFNumberFormatterRoundingMode { + static const int kCFNumberFormatterRoundCeiling = 0; + static const int kCFNumberFormatterRoundFloor = 1; + static const int kCFNumberFormatterRoundDown = 2; + static const int kCFNumberFormatterRoundUp = 3; + static const int kCFNumberFormatterRoundHalfEven = 4; + static const int kCFNumberFormatterRoundHalfDown = 5; + static const int kCFNumberFormatterRoundHalfUp = 6; } -typedef CSSM_HEADERVERSION = uint32; -typedef CSSM_KEYBLOB_TYPE = uint32; -typedef CSSM_KEYBLOB_FORMAT = uint32; -typedef CSSM_ALGORITHMS = uint32; -typedef CSSM_KEYCLASS = uint32; -typedef CSSM_KEYATTR_FLAGS = uint32; -typedef CSSM_KEYUSE = uint32; -typedef CSSM_DATE = cssm_date; -typedef CSSM_ENCRYPT_MODE = uint32; +abstract class CFNumberFormatterPadPosition { + static const int kCFNumberFormatterPadBeforePrefix = 0; + static const int kCFNumberFormatterPadAfterPrefix = 1; + static const int kCFNumberFormatterPadBeforeSuffix = 2; + static const int kCFNumberFormatterPadAfterSuffix = 3; +} -class cssm_key extends ffi.Struct { - external CSSM_KEYHEADER KeyHeader; +typedef CFPropertyListRef = CFTypeRef; - external SecAsn1Item KeyData; +abstract class CFURLPathStyle { + static const int kCFURLPOSIXPathStyle = 0; + static const int kCFURLHFSPathStyle = 1; + static const int kCFURLWindowsPathStyle = 2; } -typedef CSSM_KEYHEADER = cssm_keyheader; +class __CFURL extends ffi.Opaque {} -class cssm_dl_db_handle extends ffi.Struct { - @CSSM_DL_HANDLE() - external int DLHandle; +typedef CFURLRef = ffi.Pointer<__CFURL>; - @CSSM_DB_HANDLE() - external int DBHandle; +abstract class CFURLComponentType { + static const int kCFURLComponentScheme = 1; + static const int kCFURLComponentNetLocation = 2; + static const int kCFURLComponentPath = 3; + static const int kCFURLComponentResourceSpecifier = 4; + static const int kCFURLComponentUser = 5; + static const int kCFURLComponentPassword = 6; + static const int kCFURLComponentUserInfo = 7; + static const int kCFURLComponentHost = 8; + static const int kCFURLComponentPort = 9; + static const int kCFURLComponentParameterString = 10; + static const int kCFURLComponentQuery = 11; + static const int kCFURLComponentFragment = 12; } -typedef CSSM_DL_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_DB_HANDLE = CSSM_MODULE_HANDLE; - -class cssm_context_attribute extends ffi.Struct { - @CSSM_ATTRIBUTE_TYPE() - external int AttributeType; +class FSRef extends ffi.Opaque {} - @uint32() - external int AttributeLength; +abstract class CFURLBookmarkCreationOptions { + static const int kCFURLBookmarkCreationMinimalBookmarkMask = 512; + static const int kCFURLBookmarkCreationSuitableForBookmarkFile = 1024; + static const int kCFURLBookmarkCreationWithSecurityScope = 2048; + static const int kCFURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = + 4096; + static const int kCFURLBookmarkCreationWithoutImplicitSecurityScope = + 536870912; + static const int kCFURLBookmarkCreationPreferFileIDResolutionMask = 256; +} - external cssm_context_attribute_value Attribute; +abstract class CFURLBookmarkResolutionOptions { + static const int kCFURLBookmarkResolutionWithoutUIMask = 256; + static const int kCFURLBookmarkResolutionWithoutMountingMask = 512; + static const int kCFURLBookmarkResolutionWithSecurityScope = 1024; + static const int kCFURLBookmarkResolutionWithoutImplicitStartAccessing = + 32768; + static const int kCFBookmarkResolutionWithoutUIMask = 256; + static const int kCFBookmarkResolutionWithoutMountingMask = 512; } -typedef CSSM_ATTRIBUTE_TYPE = uint32; +typedef CFURLBookmarkFileCreationOptions = CFOptionFlags; -class cssm_context_attribute_value extends ffi.Union { - external ffi.Pointer String; +class mach_port_status extends ffi.Struct { + @mach_port_rights_t() + external int mps_pset; - @uint32() - external int Uint32; + @mach_port_seqno_t() + external int mps_seqno; - external CSSM_ACCESS_CREDENTIALS_PTR AccessCredentials; + @mach_port_mscount_t() + external int mps_mscount; - external CSSM_KEY_PTR Key; + @mach_port_msgcount_t() + external int mps_qlimit; - external CSSM_DATA_PTR Data; + @mach_port_msgcount_t() + external int mps_msgcount; - @CSSM_PADDING() - external int Padding; + @mach_port_rights_t() + external int mps_sorights; - external CSSM_DATE_PTR Date; + @boolean_t() + external int mps_srights; - external CSSM_RANGE_PTR Range; + @boolean_t() + external int mps_pdrequest; - external CSSM_CRYPTO_DATA_PTR CryptoData; + @boolean_t() + external int mps_nsrequest; - external CSSM_VERSION_PTR Version; + @natural_t() + external int mps_flags; +} - external CSSM_DL_DB_HANDLE_PTR DLDBHandle; +typedef mach_port_rights_t = natural_t; +typedef natural_t = __darwin_natural_t; +typedef __darwin_natural_t = ffi.UnsignedInt; +typedef mach_port_seqno_t = natural_t; +typedef mach_port_mscount_t = natural_t; +typedef mach_port_msgcount_t = natural_t; +typedef boolean_t = ffi.Int; - external ffi.Pointer KRProfile; +class mach_port_limits extends ffi.Struct { + @mach_port_msgcount_t() + external int mpl_qlimit; } -typedef CSSM_KEY_PTR = ffi.Pointer; -typedef CSSM_PADDING = uint32; -typedef CSSM_DATE_PTR = ffi.Pointer; -typedef CSSM_RANGE_PTR = ffi.Pointer; -typedef CSSM_CRYPTO_DATA_PTR = ffi.Pointer; -typedef CSSM_VERSION_PTR = ffi.Pointer; -typedef CSSM_DL_DB_HANDLE_PTR = ffi.Pointer; +class mach_port_info_ext extends ffi.Struct { + external mach_port_status_t mpie_status; -class cssm_kr_profile extends ffi.Opaque {} + @mach_port_msgcount_t() + external int mpie_boost_cnt; -class cssm_context extends ffi.Struct { - @CSSM_CONTEXT_TYPE() - external int ContextType; + @ffi.Array.multi([6]) + external ffi.Array reserved; +} - @CSSM_ALGORITHMS() - external int AlgorithmType; +typedef mach_port_status_t = mach_port_status; - @uint32() - external int NumberOfAttributes; +class mach_port_guard_info extends ffi.Struct { + @ffi.Uint64() + external int mpgi_guard; +} - external CSSM_CONTEXT_ATTRIBUTE_PTR ContextAttributes; +class mach_port_qos extends ffi.Opaque {} - @CSSM_CSP_HANDLE() - external int CSPHandle; +class mach_service_port_info extends ffi.Struct { + @ffi.Array.multi([255]) + external ffi.Array mspi_string_name; - @CSSM_BOOL() - external int Privileged; + @ffi.Uint8() + external int mspi_domain_type; +} - @uint32() - external int EncryptionProhibited; +class mach_port_options extends ffi.Struct { + @ffi.Uint32() + external int flags; - @uint32() - external int WorkFactor; + external mach_port_limits_t mpl; - @uint32() - external int Reserved; + external UnnamedUnion1 unnamed; } -typedef CSSM_CONTEXT_TYPE = uint32; -typedef CSSM_CONTEXT_ATTRIBUTE_PTR = ffi.Pointer; -typedef CSSM_CSP_HANDLE = CSSM_MODULE_HANDLE; +typedef mach_port_limits_t = mach_port_limits; -class cssm_pkcs1_oaep_params extends ffi.Struct { - @uint32() - external int HashAlgorithm; +class UnnamedUnion1 extends ffi.Union { + @ffi.Array.multi([2]) + external ffi.Array reserved; - external SecAsn1Item HashParams; + @mach_port_name_t() + external int work_interval_port; - @CSSM_PKCS_OAEP_MGF() - external int MGF; + external mach_service_port_info_t service_port_info; - external SecAsn1Item MGFParams; + @mach_port_name_t() + external int service_port_name; +} - @CSSM_PKCS_OAEP_PSOURCE() - external int PSource; +typedef mach_port_name_t = natural_t; +typedef mach_service_port_info_t = ffi.Pointer; - external SecAsn1Item PSourceParams; +abstract class mach_port_guard_exception_codes { + static const int kGUARD_EXC_DESTROY = 1; + static const int kGUARD_EXC_MOD_REFS = 2; + static const int kGUARD_EXC_INVALID_OPTIONS = 3; + static const int kGUARD_EXC_SET_CONTEXT = 4; + static const int kGUARD_EXC_UNGUARDED = 8; + static const int kGUARD_EXC_INCORRECT_GUARD = 16; + static const int kGUARD_EXC_IMMOVABLE = 32; + static const int kGUARD_EXC_STRICT_REPLY = 64; + static const int kGUARD_EXC_MSG_FILTERED = 128; + static const int kGUARD_EXC_INVALID_RIGHT = 256; + static const int kGUARD_EXC_INVALID_NAME = 512; + static const int kGUARD_EXC_INVALID_VALUE = 1024; + static const int kGUARD_EXC_INVALID_ARGUMENT = 2048; + static const int kGUARD_EXC_RIGHT_EXISTS = 4096; + static const int kGUARD_EXC_KERN_NO_SPACE = 8192; + static const int kGUARD_EXC_KERN_FAILURE = 16384; + static const int kGUARD_EXC_KERN_RESOURCE = 32768; + static const int kGUARD_EXC_SEND_INVALID_REPLY = 65536; + static const int kGUARD_EXC_SEND_INVALID_VOUCHER = 131072; + static const int kGUARD_EXC_SEND_INVALID_RIGHT = 262144; + static const int kGUARD_EXC_RCV_INVALID_NAME = 524288; + static const int kGUARD_EXC_RCV_GUARDED_DESC = 1048576; + static const int kGUARD_EXC_MOD_REFS_NON_FATAL = 2097152; + static const int kGUARD_EXC_IMMOVABLE_NON_FATAL = 4194304; + static const int kGUARD_EXC_REQUIRE_REPLY_PORT_SEMANTICS = 8388608; } -typedef CSSM_PKCS_OAEP_MGF = uint32; -typedef CSSM_PKCS_OAEP_PSOURCE = uint32; +class __CFRunLoop extends ffi.Opaque {} -class cssm_csp_operational_statistics extends ffi.Struct { - @CSSM_BOOL() - external int UserAuthenticated; +class __CFRunLoopSource extends ffi.Opaque {} - @CSSM_CSP_FLAGS() - external int DeviceFlags; +class __CFRunLoopObserver extends ffi.Opaque {} - @uint32() - external int TokenMaxSessionCount; +class __CFRunLoopTimer extends ffi.Opaque {} - @uint32() - external int TokenOpenedSessionCount; +abstract class CFRunLoopRunResult { + static const int kCFRunLoopRunFinished = 1; + static const int kCFRunLoopRunStopped = 2; + static const int kCFRunLoopRunTimedOut = 3; + static const int kCFRunLoopRunHandledSource = 4; +} - @uint32() - external int TokenMaxRWSessionCount; +abstract class CFRunLoopActivity { + static const int kCFRunLoopEntry = 1; + static const int kCFRunLoopBeforeTimers = 2; + static const int kCFRunLoopBeforeSources = 4; + static const int kCFRunLoopBeforeWaiting = 32; + static const int kCFRunLoopAfterWaiting = 64; + static const int kCFRunLoopExit = 128; + static const int kCFRunLoopAllActivities = 268435455; +} - @uint32() - external int TokenOpenedRWSessionCount; +typedef CFRunLoopMode = CFStringRef; +typedef CFRunLoopRef = ffi.Pointer<__CFRunLoop>; +typedef CFRunLoopSourceRef = ffi.Pointer<__CFRunLoopSource>; +typedef CFRunLoopObserverRef = ffi.Pointer<__CFRunLoopObserver>; +typedef CFRunLoopTimerRef = ffi.Pointer<__CFRunLoopTimer>; - @uint32() - external int TokenTotalPublicMem; +class CFRunLoopSourceContext extends ffi.Struct { + @CFIndex() + external int version; - @uint32() - external int TokenFreePublicMem; + external ffi.Pointer info; - @uint32() - external int TokenTotalPrivateMem; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; - @uint32() - external int TokenFreePrivateMem; -} + external ffi + .Pointer)>> + release; -typedef CSSM_CSP_FLAGS = uint32; + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; -class cssm_pkcs5_pbkdf1_params extends ffi.Struct { - external SecAsn1Item Passphrase; + external ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>> + equal; - external SecAsn1Item InitVector; -} + external ffi.Pointer< + ffi.NativeFunction)>> hash; -class cssm_pkcs5_pbkdf2_params extends ffi.Struct { - external SecAsn1Item Passphrase; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, CFRunLoopRef, CFRunLoopMode)>> schedule; - @CSSM_PKCS5_PBKDF2_PRF() - external int PseudoRandomFunction; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, CFRunLoopRef, CFRunLoopMode)>> cancel; + + external ffi + .Pointer)>> + perform; } -typedef CSSM_PKCS5_PBKDF2_PRF = uint32; +class CFRunLoopSourceContext1 extends ffi.Struct { + @CFIndex() + external int version; -class cssm_kea_derive_params extends ffi.Struct { - external SecAsn1Item Rb; + external ffi.Pointer info; - external SecAsn1Item Yb; -} + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; -class cssm_tp_authority_id extends ffi.Struct { - external ffi.Pointer AuthorityCert; + external ffi + .Pointer)>> + release; - external CSSM_NET_ADDRESS_PTR AuthorityLocation; -} + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; -typedef CSSM_NET_ADDRESS_PTR = ffi.Pointer; + external ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>> + equal; -class cssm_field extends ffi.Struct { - external SecAsn1Oid FieldOid; + external ffi.Pointer< + ffi.NativeFunction)>> hash; - external SecAsn1Item FieldValue; + external ffi.Pointer< + ffi.NativeFunction)>> getPort; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, CFIndex, + CFAllocatorRef, ffi.Pointer)>> perform; } -class cssm_tp_policyinfo extends ffi.Struct { - @uint32() - external int NumberOfPolicyIds; +typedef mach_port_t = __darwin_mach_port_t; +typedef __darwin_mach_port_t = __darwin_mach_port_name_t; +typedef __darwin_mach_port_name_t = __darwin_natural_t; - external CSSM_FIELD_PTR PolicyIds; +class CFRunLoopObserverContext extends ffi.Struct { + @CFIndex() + external int version; - external ffi.Pointer PolicyControl; -} + external ffi.Pointer info; -typedef CSSM_FIELD_PTR = ffi.Pointer; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; -class cssm_dl_db_list extends ffi.Struct { - @uint32() - external int NumHandles; + external ffi + .Pointer)>> + release; - external CSSM_DL_DB_HANDLE_PTR DLDBHandle; + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; } -class cssm_tp_callerauth_context extends ffi.Struct { - external CSSM_TP_POLICYINFO Policy; - - external CSSM_TIMESTRING VerifyTime; +typedef CFRunLoopObserverCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFRunLoopObserverRef, ffi.Int32, ffi.Pointer)>>; +void _ObjCBlock21_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() + .asFunction< + void Function(CFRunLoopObserverRef arg0, int arg1)>()(arg0, arg1); +} - @CSSM_TP_STOP_ON() - external int VerificationAbortOn; +final _ObjCBlock21_closureRegistry = {}; +int _ObjCBlock21_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock21_registerClosure(Function fn) { + final id = ++_ObjCBlock21_closureRegistryIndex; + _ObjCBlock21_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external CSSM_TP_VERIFICATION_RESULTS_CALLBACK CallbackWithVerifiedCert; +void _ObjCBlock21_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { + return _ObjCBlock21_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @uint32() - external int NumberOfAnchorCerts; +class ObjCBlock21 extends _ObjCBlockBase { + ObjCBlock21._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external CSSM_DATA_PTR AnchorCerts; + /// Creates a block from a C function pointer. + ObjCBlock21.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>> + ptr) + : this._( + lib + ._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, + ffi.Int32 arg1)>(_ObjCBlock21_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external CSSM_DL_DB_LIST_PTR DBList; + /// Creates a block from a Dart function. + ObjCBlock21.fromFunction(NativeCupertinoHttp lib, + void Function(CFRunLoopObserverRef arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, + ffi.Int32 arg1)>(_ObjCBlock21_closureTrampoline) + .cast(), + _ObjCBlock21_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(CFRunLoopObserverRef arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, int arg1)>()(_id, arg0, arg1); + } - external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef CSSM_TP_POLICYINFO = cssm_tp_policyinfo; -typedef CSSM_TIMESTRING = ffi.Pointer; -typedef CSSM_TP_STOP_ON = uint32; -typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACK = ffi.Pointer< - ffi.NativeFunction< - CSSM_RETURN Function( - CSSM_MODULE_HANDLE, ffi.Pointer, CSSM_DATA_PTR)>>; -typedef CSSM_DL_DB_LIST_PTR = ffi.Pointer; +class CFRunLoopTimerContext extends ffi.Struct { + @CFIndex() + external int version; -class cssm_encoded_crl extends ffi.Struct { - @CSSM_CRL_TYPE() - external int CrlType; + external ffi.Pointer info; - @CSSM_CRL_ENCODING() - external int CrlEncoding; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; - external SecAsn1Item CrlBlob; -} + external ffi + .Pointer)>> + release; -typedef CSSM_CRL_TYPE = uint32; -typedef CSSM_CRL_ENCODING = uint32; + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; +} -class cssm_parsed_crl extends ffi.Struct { - @CSSM_CRL_TYPE() - external int CrlType; +typedef CFRunLoopTimerCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopTimerRef, ffi.Pointer)>>; +void _ObjCBlock22_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} - @CSSM_CRL_PARSE_FORMAT() - external int ParsedCrlFormat; +final _ObjCBlock22_closureRegistry = {}; +int _ObjCBlock22_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock22_registerClosure(Function fn) { + final id = ++_ObjCBlock22_closureRegistryIndex; + _ObjCBlock22_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external ffi.Pointer ParsedCrl; +void _ObjCBlock22_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { + return _ObjCBlock22_closureRegistry[block.ref.target.address]!(arg0); } -typedef CSSM_CRL_PARSE_FORMAT = uint32; +class ObjCBlock22 extends _ObjCBlockBase { + ObjCBlock22._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class cssm_crl_pair extends ffi.Struct { - external CSSM_ENCODED_CRL EncodedCrl; + /// Creates a block from a C function pointer. + ObjCBlock22.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopTimerRef arg0)>( + _ObjCBlock22_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock22.fromFunction( + NativeCupertinoHttp lib, void Function(CFRunLoopTimerRef arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopTimerRef arg0)>( + _ObjCBlock22_closureTrampoline) + .cast(), + _ObjCBlock22_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(CFRunLoopTimerRef arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopTimerRef arg0)>()(_id, arg0); + } - external CSSM_PARSED_CRL ParsedCrl; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef CSSM_ENCODED_CRL = cssm_encoded_crl; -typedef CSSM_PARSED_CRL = cssm_parsed_crl; +class __CFSocket extends ffi.Opaque {} -class cssm_crlgroup extends ffi.Struct { - @CSSM_CRL_TYPE() - external int CrlType; +abstract class CFSocketError { + static const int kCFSocketSuccess = 0; + static const int kCFSocketError = -1; + static const int kCFSocketTimeout = -2; +} - @CSSM_CRL_ENCODING() - external int CrlEncoding; +class CFSocketSignature extends ffi.Struct { + @SInt32() + external int protocolFamily; - @uint32() - external int NumberOfCrls; + @SInt32() + external int socketType; - external UnnamedUnion3 GroupCrlList; + @SInt32() + external int protocol; - @CSSM_CRLGROUP_TYPE() - external int CrlGroupType; + external CFDataRef address; } -class UnnamedUnion3 extends ffi.Union { - external CSSM_DATA_PTR CrlList; - - external CSSM_ENCODED_CRL_PTR EncodedCrlList; - - external CSSM_PARSED_CRL_PTR ParsedCrlList; - - external CSSM_CRL_PAIR_PTR PairCrlList; +abstract class CFSocketCallBackType { + static const int kCFSocketNoCallBack = 0; + static const int kCFSocketReadCallBack = 1; + static const int kCFSocketAcceptCallBack = 2; + static const int kCFSocketDataCallBack = 3; + static const int kCFSocketConnectCallBack = 4; + static const int kCFSocketWriteCallBack = 8; } -typedef CSSM_ENCODED_CRL_PTR = ffi.Pointer; -typedef CSSM_PARSED_CRL_PTR = ffi.Pointer; -typedef CSSM_CRL_PAIR_PTR = ffi.Pointer; -typedef CSSM_CRLGROUP_TYPE = uint32; +class CFSocketContext extends ffi.Struct { + @CFIndex() + external int version; -class cssm_fieldgroup extends ffi.Struct { - @ffi.Int() - external int NumberOfFields; + external ffi.Pointer info; - external CSSM_FIELD_PTR Fields; -} + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; -class cssm_evidence extends ffi.Struct { - @CSSM_EVIDENCE_FORM() - external int EvidenceForm; + external ffi + .Pointer)>> + release; - external ffi.Pointer Evidence; + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; } -typedef CSSM_EVIDENCE_FORM = uint32; - -class cssm_tp_verify_context extends ffi.Struct { - @CSSM_TP_ACTION() - external int Action; +typedef CFSocketRef = ffi.Pointer<__CFSocket>; +typedef CFSocketCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFSocketRef, ffi.Int32, CFDataRef, + ffi.Pointer, ffi.Pointer)>>; +typedef CFSocketNativeHandle = ffi.Int; - external SecAsn1Item ActionData; +class accessx_descriptor extends ffi.Struct { + @ffi.UnsignedInt() + external int ad_name_offset; - external CSSM_CRLGROUP Crls; + @ffi.Int() + external int ad_flags; - external CSSM_TP_CALLERAUTH_CONTEXT_PTR Cred; + @ffi.Array.multi([2]) + external ffi.Array ad_pad; } -typedef CSSM_TP_ACTION = uint32; -typedef CSSM_CRLGROUP = cssm_crlgroup; -typedef CSSM_TP_CALLERAUTH_CONTEXT_PTR - = ffi.Pointer; +typedef gid_t = __darwin_gid_t; +typedef __darwin_gid_t = __uint32_t; +typedef useconds_t = __darwin_useconds_t; +typedef __darwin_useconds_t = __uint32_t; -class cssm_tp_verify_context_result extends ffi.Struct { - @uint32() - external int NumberOfEvidences; +class fssearchblock extends ffi.Opaque {} - external CSSM_EVIDENCE_PTR Evidence; -} +class searchstate extends ffi.Opaque {} -typedef CSSM_EVIDENCE_PTR = ffi.Pointer; +class flock extends ffi.Struct { + @off_t() + external int l_start; -class cssm_tp_request_set extends ffi.Struct { - @uint32() - external int NumberOfRequests; + @off_t() + external int l_len; - external ffi.Pointer Requests; -} + @pid_t() + external int l_pid; -class cssm_tp_result_set extends ffi.Struct { - @uint32() - external int NumberOfResults; + @ffi.Short() + external int l_type; - external ffi.Pointer Results; + @ffi.Short() + external int l_whence; } -class cssm_tp_confirm_response extends ffi.Struct { - @uint32() - external int NumberOfResponses; +class flocktimeout extends ffi.Struct { + external flock fl; - external CSSM_TP_CONFIRM_STATUS_PTR Responses; + external timespec timeout; } -typedef CSSM_TP_CONFIRM_STATUS_PTR = ffi.Pointer; - -class cssm_tp_certissue_input extends ffi.Struct { - external CSSM_SUBSERVICE_UID CSPSubserviceUid; +class radvisory extends ffi.Struct { + @off_t() + external int ra_offset; - @CSSM_CL_HANDLE() - external int CLHandle; + @ffi.Int() + external int ra_count; +} - @uint32() - external int NumberOfTemplateFields; +class fsignatures extends ffi.Struct { + @off_t() + external int fs_file_start; - external CSSM_FIELD_PTR SubjectCertFields; + external ffi.Pointer fs_blob_start; - @CSSM_TP_SERVICES() - external int MoreServiceRequests; + @ffi.Size() + external int fs_blob_size; - @uint32() - external int NumberOfServiceControls; + @ffi.Size() + external int fs_fsignatures_size; - external CSSM_FIELD_PTR ServiceControls; + @ffi.Array.multi([20]) + external ffi.Array fs_cdhash; - external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; + @ffi.Int() + external int fs_hash_type; } -typedef CSSM_TP_SERVICES = uint32; +class fsupplement extends ffi.Struct { + @off_t() + external int fs_file_start; -class cssm_tp_certissue_output extends ffi.Struct { - @CSSM_TP_CERTISSUE_STATUS() - external int IssueStatus; + @off_t() + external int fs_blob_start; - external CSSM_CERTGROUP_PTR CertGroup; + @ffi.Size() + external int fs_blob_size; - @CSSM_TP_SERVICES() - external int PerformedServiceRequests; + @ffi.Int() + external int fs_orig_fd; } -typedef CSSM_TP_CERTISSUE_STATUS = uint32; -typedef CSSM_CERTGROUP_PTR = ffi.Pointer; - -class cssm_tp_certchange_input extends ffi.Struct { - @CSSM_TP_CERTCHANGE_ACTION() - external int Action; - - @CSSM_TP_CERTCHANGE_REASON() - external int Reason; - - @CSSM_CL_HANDLE() - external int CLHandle; - - external CSSM_DATA_PTR Cert; - - external CSSM_FIELD_PTR ChangeInfo; +class fchecklv extends ffi.Struct { + @off_t() + external int lv_file_start; - external CSSM_TIMESTRING StartTime; + @ffi.Size() + external int lv_error_message_size; - external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; + external ffi.Pointer lv_error_message; } -typedef CSSM_TP_CERTCHANGE_ACTION = uint32; -typedef CSSM_TP_CERTCHANGE_REASON = uint32; +class fgetsigsinfo extends ffi.Struct { + @off_t() + external int fg_file_start; -class cssm_tp_certchange_output extends ffi.Struct { - @CSSM_TP_CERTCHANGE_STATUS() - external int ActionStatus; + @ffi.Int() + external int fg_info_request; - external CSSM_FIELD RevokeInfo; + @ffi.Int() + external int fg_sig_is_platform; } -typedef CSSM_TP_CERTCHANGE_STATUS = uint32; -typedef CSSM_FIELD = cssm_field; +class fstore extends ffi.Struct { + @ffi.UnsignedInt() + external int fst_flags; -class cssm_tp_certverify_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; + @ffi.Int() + external int fst_posmode; - external CSSM_DATA_PTR Cert; + @off_t() + external int fst_offset; - external CSSM_TP_VERIFY_CONTEXT_PTR VerifyContext; + @off_t() + external int fst_length; + + @off_t() + external int fst_bytesalloc; } -typedef CSSM_TP_VERIFY_CONTEXT_PTR = ffi.Pointer; +class fpunchhole extends ffi.Struct { + @ffi.UnsignedInt() + external int fp_flags; -class cssm_tp_certverify_output extends ffi.Struct { - @CSSM_TP_CERTVERIFY_STATUS() - external int VerifyStatus; + @ffi.UnsignedInt() + external int reserved; - @uint32() - external int NumberOfEvidence; + @off_t() + external int fp_offset; - external CSSM_EVIDENCE_PTR Evidence; + @off_t() + external int fp_length; } -typedef CSSM_TP_CERTVERIFY_STATUS = uint32; - -class cssm_tp_certnotarize_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; +class ftrimactivefile extends ffi.Struct { + @off_t() + external int fta_offset; - @uint32() - external int NumberOfFields; + @off_t() + external int fta_length; +} - external CSSM_FIELD_PTR MoreFields; +class fspecread extends ffi.Struct { + @ffi.UnsignedInt() + external int fsr_flags; - external CSSM_FIELD_PTR SignScope; + @ffi.UnsignedInt() + external int reserved; - @uint32() - external int ScopeSize; + @off_t() + external int fsr_offset; - @CSSM_TP_SERVICES() - external int MoreServiceRequests; + @off_t() + external int fsr_length; +} - @uint32() - external int NumberOfServiceControls; +@ffi.Packed(4) +class log2phys extends ffi.Struct { + @ffi.UnsignedInt() + external int l2p_flags; - external CSSM_FIELD_PTR ServiceControls; + @off_t() + external int l2p_contigbytes; - external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; + @off_t() + external int l2p_devoffset; } -class cssm_tp_certnotarize_output extends ffi.Struct { - @CSSM_TP_CERTNOTARIZE_STATUS() - external int NotarizeStatus; - - external CSSM_CERTGROUP_PTR NotarizedCertGroup; +class _filesec extends ffi.Opaque {} - @CSSM_TP_SERVICES() - external int PerformedServiceRequests; +abstract class filesec_property_t { + static const int FILESEC_OWNER = 1; + static const int FILESEC_GROUP = 2; + static const int FILESEC_UUID = 3; + static const int FILESEC_MODE = 4; + static const int FILESEC_ACL = 5; + static const int FILESEC_GRPUUID = 6; + static const int FILESEC_ACL_RAW = 100; + static const int FILESEC_ACL_ALLOCSIZE = 101; } -typedef CSSM_TP_CERTNOTARIZE_STATUS = uint32; - -class cssm_tp_certreclaim_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; +typedef filesec_t = ffi.Pointer<_filesec>; - @uint32() - external int NumberOfSelectionFields; +abstract class os_clockid_t { + static const int OS_CLOCK_MACH_ABSOLUTE_TIME = 32; +} - external CSSM_FIELD_PTR SelectionFields; +class os_workgroup_attr_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; - external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; + @ffi.Array.multi([60]) + external ffi.Array opaque; } -class cssm_tp_certreclaim_output extends ffi.Struct { - @CSSM_TP_CERTRECLAIM_STATUS() - external int ReclaimStatus; - - external CSSM_CERTGROUP_PTR ReclaimedCertGroup; +class os_workgroup_interval_data_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; - @CSSM_LONG_HANDLE() - external int KeyCacheHandle; + @ffi.Array.multi([56]) + external ffi.Array opaque; } -typedef CSSM_TP_CERTRECLAIM_STATUS = uint32; -typedef CSSM_LONG_HANDLE = uint64; -typedef uint64 = ffi.Uint64; +class os_workgroup_join_token_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; -class cssm_tp_crlissue_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; + @ffi.Array.multi([36]) + external ffi.Array opaque; +} - @uint32() - external int CrlIdentifier; +class OS_os_workgroup extends OS_object { + OS_os_workgroup._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external CSSM_TIMESTRING CrlThisTime; + /// Returns a [OS_os_workgroup] that points to the same underlying object as [other]. + static OS_os_workgroup castFrom(T other) { + return OS_os_workgroup._(other._id, other._lib, + retain: true, release: true); + } - external CSSM_FIELD_PTR PolicyIdentifier; + /// Returns a [OS_os_workgroup] that wraps the given raw object pointer. + static OS_os_workgroup castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return OS_os_workgroup._(other, lib, retain: retain, release: release); + } - external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; -} + /// Returns whether [obj] is an instance of [OS_os_workgroup]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_OS_os_workgroup1); + } -class cssm_tp_crlissue_output extends ffi.Struct { - @CSSM_TP_CRLISSUE_STATUS() - external int IssueStatus; + @override + OS_os_workgroup init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_os_workgroup._(_ret, _lib, retain: true, release: true); + } - external CSSM_ENCODED_CRL_PTR Crl; + static OS_os_workgroup new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_OS_os_workgroup1, _lib._sel_new1); + return OS_os_workgroup._(_ret, _lib, retain: false, release: true); + } - external CSSM_TIMESTRING CrlNextTime; + static OS_os_workgroup alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_OS_os_workgroup1, _lib._sel_alloc1); + return OS_os_workgroup._(_ret, _lib, retain: false, release: true); + } } -typedef CSSM_TP_CRLISSUE_STATUS = uint32; +typedef os_workgroup_t = ffi.Pointer; +typedef os_workgroup_join_token_t + = ffi.Pointer; +typedef os_workgroup_working_arena_destructor_t + = ffi.Pointer)>>; +typedef os_workgroup_index = ffi.Uint32; -class cssm_cert_bundle_header extends ffi.Struct { - @CSSM_CERT_BUNDLE_TYPE() - external int BundleType; +class os_workgroup_max_parallel_threads_attr_s extends ffi.Opaque {} - @CSSM_CERT_BUNDLE_ENCODING() - external int BundleEncoding; -} +typedef os_workgroup_mpt_attr_t + = ffi.Pointer; -typedef CSSM_CERT_BUNDLE_TYPE = uint32; -typedef CSSM_CERT_BUNDLE_ENCODING = uint32; +class OS_os_workgroup_interval extends OS_os_workgroup { + OS_os_workgroup_interval._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class cssm_cert_bundle extends ffi.Struct { - external CSSM_CERT_BUNDLE_HEADER BundleHeader; + /// Returns a [OS_os_workgroup_interval] that points to the same underlying object as [other]. + static OS_os_workgroup_interval castFrom(T other) { + return OS_os_workgroup_interval._(other._id, other._lib, + retain: true, release: true); + } - external SecAsn1Item Bundle; -} + /// Returns a [OS_os_workgroup_interval] that wraps the given raw object pointer. + static OS_os_workgroup_interval castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return OS_os_workgroup_interval._(other, lib, + retain: retain, release: release); + } -typedef CSSM_CERT_BUNDLE_HEADER = cssm_cert_bundle_header; + /// Returns whether [obj] is an instance of [OS_os_workgroup_interval]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_OS_os_workgroup_interval1); + } -class cssm_db_attribute_info extends ffi.Struct { - @CSSM_DB_ATTRIBUTE_NAME_FORMAT() - external int AttributeNameFormat; + @override + OS_os_workgroup_interval init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_os_workgroup_interval._(_ret, _lib, retain: true, release: true); + } - external cssm_db_attribute_label Label; + static OS_os_workgroup_interval new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_OS_os_workgroup_interval1, _lib._sel_new1); + return OS_os_workgroup_interval._(_ret, _lib, retain: false, release: true); + } - @CSSM_DB_ATTRIBUTE_FORMAT() - external int AttributeFormat; + static OS_os_workgroup_interval alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_OS_os_workgroup_interval1, _lib._sel_alloc1); + return OS_os_workgroup_interval._(_ret, _lib, retain: false, release: true); + } } -typedef CSSM_DB_ATTRIBUTE_NAME_FORMAT = uint32; +typedef os_workgroup_interval_t = ffi.Pointer; +typedef os_workgroup_interval_data_t + = ffi.Pointer; -class cssm_db_attribute_label extends ffi.Union { - external ffi.Pointer AttributeName; +class OS_os_workgroup_parallel extends OS_os_workgroup { + OS_os_workgroup_parallel._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external SecAsn1Oid AttributeOID; + /// Returns a [OS_os_workgroup_parallel] that points to the same underlying object as [other]. + static OS_os_workgroup_parallel castFrom(T other) { + return OS_os_workgroup_parallel._(other._id, other._lib, + retain: true, release: true); + } - @uint32() - external int AttributeID; -} + /// Returns a [OS_os_workgroup_parallel] that wraps the given raw object pointer. + static OS_os_workgroup_parallel castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return OS_os_workgroup_parallel._(other, lib, + retain: retain, release: release); + } -typedef CSSM_DB_ATTRIBUTE_FORMAT = uint32; + /// Returns whether [obj] is an instance of [OS_os_workgroup_parallel]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_OS_os_workgroup_parallel1); + } -class cssm_db_attribute_data extends ffi.Struct { - external CSSM_DB_ATTRIBUTE_INFO Info; + @override + OS_os_workgroup_parallel init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_os_workgroup_parallel._(_ret, _lib, retain: true, release: true); + } - @uint32() - external int NumberOfValues; + static OS_os_workgroup_parallel new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_OS_os_workgroup_parallel1, _lib._sel_new1); + return OS_os_workgroup_parallel._(_ret, _lib, retain: false, release: true); + } - external CSSM_DATA_PTR Value; + static OS_os_workgroup_parallel alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_OS_os_workgroup_parallel1, _lib._sel_alloc1); + return OS_os_workgroup_parallel._(_ret, _lib, retain: false, release: true); + } } -typedef CSSM_DB_ATTRIBUTE_INFO = cssm_db_attribute_info; - -class cssm_db_record_attribute_info extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int DataRecordType; +typedef os_workgroup_parallel_t = ffi.Pointer; +typedef os_workgroup_attr_t = ffi.Pointer; - @uint32() - external int NumberOfAttributes; +class time_value extends ffi.Struct { + @integer_t() + external int seconds; - external CSSM_DB_ATTRIBUTE_INFO_PTR AttributeInfo; + @integer_t() + external int microseconds; } -typedef CSSM_DB_RECORDTYPE = uint32; -typedef CSSM_DB_ATTRIBUTE_INFO_PTR = ffi.Pointer; - -class cssm_db_record_attribute_data extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int DataRecordType; - - @uint32() - external int SemanticInformation; +typedef integer_t = ffi.Int; - @uint32() - external int NumberOfAttributes; +class mach_timespec extends ffi.Struct { + @ffi.UnsignedInt() + external int tv_sec; - external CSSM_DB_ATTRIBUTE_DATA_PTR AttributeData; + @clock_res_t() + external int tv_nsec; } -typedef CSSM_DB_ATTRIBUTE_DATA_PTR = ffi.Pointer; - -class cssm_db_parsing_module_info extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int RecordType; +typedef clock_res_t = ffi.Int; +typedef dispatch_time_t = ffi.Uint64; - external CSSM_SUBSERVICE_UID ModuleSubserviceUid; +abstract class qos_class_t { + static const int QOS_CLASS_USER_INTERACTIVE = 33; + static const int QOS_CLASS_USER_INITIATED = 25; + static const int QOS_CLASS_DEFAULT = 21; + static const int QOS_CLASS_UTILITY = 17; + static const int QOS_CLASS_BACKGROUND = 9; + static const int QOS_CLASS_UNSPECIFIED = 0; } -class cssm_db_index_info extends ffi.Struct { - @CSSM_DB_INDEX_TYPE() - external int IndexType; +typedef dispatch_object_t = ffi.Pointer; +typedef dispatch_function_t + = ffi.Pointer)>>; +typedef dispatch_block_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock23_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} - @CSSM_DB_INDEXED_DATA_LOCATION() - external int IndexedDataLocation; +final _ObjCBlock23_closureRegistry = {}; +int _ObjCBlock23_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock23_registerClosure(Function fn) { + final id = ++_ObjCBlock23_closureRegistryIndex; + _ObjCBlock23_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external CSSM_DB_ATTRIBUTE_INFO Info; +void _ObjCBlock23_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock23_closureRegistry[block.ref.target.address]!(arg0); } -typedef CSSM_DB_INDEX_TYPE = uint32; -typedef CSSM_DB_INDEXED_DATA_LOCATION = uint32; +class ObjCBlock23 extends _ObjCBlockBase { + ObjCBlock23._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class cssm_db_unique_record extends ffi.Struct { - external CSSM_DB_INDEX_INFO RecordLocator; + /// Creates a block from a C function pointer. + ObjCBlock23.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Size arg0)>(_ObjCBlock23_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external SecAsn1Item RecordIdentifier; + /// Creates a block from a Dart function. + ObjCBlock23.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Size arg0)>(_ObjCBlock23_closureTrampoline) + .cast(), + _ObjCBlock23_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(int arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Size arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef CSSM_DB_INDEX_INFO = cssm_db_index_info; +class dispatch_queue_s extends ffi.Opaque {} -class cssm_db_record_index_info extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int DataRecordType; +typedef dispatch_queue_global_t = ffi.Pointer; - @uint32() - external int NumberOfIndexes; +class dispatch_queue_attr_s extends ffi.Opaque {} - external CSSM_DB_INDEX_INFO_PTR IndexInfo; +typedef dispatch_queue_attr_t = ffi.Pointer; + +abstract class dispatch_autorelease_frequency_t { + static const int DISPATCH_AUTORELEASE_FREQUENCY_INHERIT = 0; + static const int DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM = 1; + static const int DISPATCH_AUTORELEASE_FREQUENCY_NEVER = 2; } -typedef CSSM_DB_INDEX_INFO_PTR = ffi.Pointer; +abstract class dispatch_block_flags_t { + static const int DISPATCH_BLOCK_BARRIER = 1; + static const int DISPATCH_BLOCK_DETACHED = 2; + static const int DISPATCH_BLOCK_ASSIGN_CURRENT = 4; + static const int DISPATCH_BLOCK_NO_QOS_CLASS = 8; + static const int DISPATCH_BLOCK_INHERIT_QOS_CLASS = 16; + static const int DISPATCH_BLOCK_ENFORCE_QOS_CLASS = 32; +} -class cssm_dbinfo extends ffi.Struct { - @uint32() - external int NumberOfRecordTypes; +class mach_msg_type_descriptor_t extends ffi.Opaque {} - external CSSM_DB_PARSING_MODULE_INFO_PTR DefaultParsingModules; +class mach_msg_port_descriptor_t extends ffi.Opaque {} - external CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR RecordAttributeNames; +class mach_msg_ool_descriptor32_t extends ffi.Opaque {} - external CSSM_DB_RECORD_INDEX_INFO_PTR RecordIndexes; +class mach_msg_ool_descriptor64_t extends ffi.Opaque {} - @CSSM_BOOL() - external int IsLocal; +class mach_msg_ool_descriptor_t extends ffi.Opaque {} - external ffi.Pointer AccessPath; +class mach_msg_ool_ports_descriptor32_t extends ffi.Opaque {} - external ffi.Pointer Reserved; -} +class mach_msg_ool_ports_descriptor64_t extends ffi.Opaque {} -typedef CSSM_DB_PARSING_MODULE_INFO_PTR - = ffi.Pointer; -typedef CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR - = ffi.Pointer; -typedef CSSM_DB_RECORD_INDEX_INFO_PTR = ffi.Pointer; +class mach_msg_ool_ports_descriptor_t extends ffi.Opaque {} -class cssm_selection_predicate extends ffi.Struct { - @CSSM_DB_OPERATOR() - external int DbOperator; +class mach_msg_guarded_port_descriptor32_t extends ffi.Opaque {} - external CSSM_DB_ATTRIBUTE_DATA Attribute; -} +class mach_msg_guarded_port_descriptor64_t extends ffi.Opaque {} -typedef CSSM_DB_OPERATOR = uint32; -typedef CSSM_DB_ATTRIBUTE_DATA = cssm_db_attribute_data; +class mach_msg_guarded_port_descriptor_t extends ffi.Opaque {} -class cssm_query_limits extends ffi.Struct { - @uint32() - external int TimeLimit; +class mach_msg_descriptor_t extends ffi.Opaque {} - @uint32() - external int SizeLimit; +class mach_msg_body_t extends ffi.Struct { + @mach_msg_size_t() + external int msgh_descriptor_count; } -class cssm_query extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int RecordType; - - @CSSM_DB_CONJUNCTIVE() - external int Conjunctive; +typedef mach_msg_size_t = natural_t; - @uint32() - external int NumSelectionPredicates; +class mach_msg_header_t extends ffi.Struct { + @mach_msg_bits_t() + external int msgh_bits; - external CSSM_SELECTION_PREDICATE_PTR SelectionPredicate; + @mach_msg_size_t() + external int msgh_size; - external CSSM_QUERY_LIMITS QueryLimits; + @mach_port_t() + external int msgh_remote_port; - @CSSM_QUERY_FLAGS() - external int QueryFlags; -} + @mach_port_t() + external int msgh_local_port; -typedef CSSM_DB_CONJUNCTIVE = uint32; -typedef CSSM_SELECTION_PREDICATE_PTR = ffi.Pointer; -typedef CSSM_QUERY_LIMITS = cssm_query_limits; -typedef CSSM_QUERY_FLAGS = uint32; + @mach_port_name_t() + external int msgh_voucher_port; -class cssm_dl_pkcs11_attributes extends ffi.Struct { - @uint32() - external int DeviceAccessFlags; + @mach_msg_id_t() + external int msgh_id; } -class cssm_name_list extends ffi.Struct { - @uint32() - external int NumStrings; - - external ffi.Pointer> String; -} +typedef mach_msg_bits_t = ffi.UnsignedInt; +typedef mach_msg_id_t = integer_t; -class cssm_db_schema_attribute_info extends ffi.Struct { - @uint32() - external int AttributeId; +class mach_msg_base_t extends ffi.Struct { + external mach_msg_header_t header; - external ffi.Pointer AttributeName; + external mach_msg_body_t body; +} - external SecAsn1Oid AttributeNameID; +class mach_msg_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; - @CSSM_DB_ATTRIBUTE_FORMAT() - external int DataType; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; } -class cssm_db_schema_index_info extends ffi.Struct { - @uint32() - external int AttributeId; +typedef mach_msg_trailer_type_t = ffi.UnsignedInt; +typedef mach_msg_trailer_size_t = ffi.UnsignedInt; - @uint32() - external int IndexId; +class mach_msg_seqno_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; - @CSSM_DB_INDEX_TYPE() - external int IndexType; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - @CSSM_DB_INDEXED_DATA_LOCATION() - external int IndexedDataLocation; + @mach_port_seqno_t() + external int msgh_seqno; } -class cssm_x509_type_value_pair extends ffi.Struct { - external SecAsn1Oid type; - - @CSSM_BER_TAG() - external int valueType; - - external SecAsn1Item value; +class security_token_t extends ffi.Struct { + @ffi.Array.multi([2]) + external ffi.Array val; } -typedef CSSM_BER_TAG = uint8; - -class cssm_x509_rdn extends ffi.Struct { - @uint32() - external int numberOfPairs; +class mach_msg_security_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; - external CSSM_X509_TYPE_VALUE_PAIR_PTR AttributeTypeAndValue; -} + @mach_msg_trailer_size_t() + external int msgh_trailer_size; -typedef CSSM_X509_TYPE_VALUE_PAIR_PTR = ffi.Pointer; + @mach_port_seqno_t() + external int msgh_seqno; -class cssm_x509_name extends ffi.Struct { - @uint32() - external int numberOfRDNs; + external security_token_t msgh_sender; +} - external CSSM_X509_RDN_PTR RelativeDistinguishedName; +class audit_token_t extends ffi.Struct { + @ffi.Array.multi([8]) + external ffi.Array val; } -typedef CSSM_X509_RDN_PTR = ffi.Pointer; +class mach_msg_audit_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -class cssm_x509_time extends ffi.Struct { - @CSSM_BER_TAG() - external int timeType; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - external SecAsn1Item time; -} + @mach_port_seqno_t() + external int msgh_seqno; -class x509_validity extends ffi.Struct { - external CSSM_X509_TIME notBefore; + external security_token_t msgh_sender; - external CSSM_X509_TIME notAfter; + external audit_token_t msgh_audit; } -typedef CSSM_X509_TIME = cssm_x509_time; +@ffi.Packed(4) +class mach_msg_context_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -class cssm_x509ext_basicConstraints extends ffi.Struct { - @CSSM_BOOL() - external int cA; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - @CSSM_X509_OPTION() - external int pathLenConstraintPresent; + @mach_port_seqno_t() + external int msgh_seqno; - @uint32() - external int pathLenConstraint; -} + external security_token_t msgh_sender; -typedef CSSM_X509_OPTION = CSSM_BOOL; + external audit_token_t msgh_audit; -abstract class extension_data_format { - static const int CSSM_X509_DATAFORMAT_ENCODED = 0; - static const int CSSM_X509_DATAFORMAT_PARSED = 1; - static const int CSSM_X509_DATAFORMAT_PAIR = 2; + @mach_port_context_t() + external int msgh_context; } -class cssm_x509_extensionTagAndValue extends ffi.Struct { - @CSSM_BER_TAG() - external int type; +typedef mach_port_context_t = vm_offset_t; +typedef vm_offset_t = ffi.UintPtr; - external SecAsn1Item value; +class msg_labels_t extends ffi.Struct { + @mach_port_name_t() + external int sender; } -class cssm_x509ext_pair extends ffi.Struct { - external CSSM_X509EXT_TAGandVALUE tagAndValue; +@ffi.Packed(4) +class mach_msg_mac_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; - external ffi.Pointer parsedValue; -} + @mach_msg_trailer_size_t() + external int msgh_trailer_size; -typedef CSSM_X509EXT_TAGandVALUE = cssm_x509_extensionTagAndValue; + @mach_port_seqno_t() + external int msgh_seqno; -class cssm_x509_extension extends ffi.Struct { - external SecAsn1Oid extnId; + external security_token_t msgh_sender; - @CSSM_BOOL() - external int critical; + external audit_token_t msgh_audit; - @ffi.Int32() - external int format; + @mach_port_context_t() + external int msgh_context; - external cssm_x509ext_value value; + @mach_msg_filter_id() + external int msgh_ad; - external SecAsn1Item BERvalue; + external msg_labels_t msgh_labels; } -class cssm_x509ext_value extends ffi.Union { - external ffi.Pointer tagAndValue; - - external ffi.Pointer parsedValue; +typedef mach_msg_filter_id = ffi.Int; - external ffi.Pointer valuePair; +class mach_msg_empty_send_t extends ffi.Struct { + external mach_msg_header_t header; } -typedef CSSM_X509EXT_PAIR = cssm_x509ext_pair; - -class cssm_x509_extensions extends ffi.Struct { - @uint32() - external int numberOfExtensions; +class mach_msg_empty_rcv_t extends ffi.Struct { + external mach_msg_header_t header; - external CSSM_X509_EXTENSION_PTR extensions; + external mach_msg_trailer_t trailer; } -typedef CSSM_X509_EXTENSION_PTR = ffi.Pointer; - -class cssm_x509_tbs_certificate extends ffi.Struct { - external SecAsn1Item version; - - external SecAsn1Item serialNumber; +class mach_msg_empty_t extends ffi.Union { + external mach_msg_empty_send_t send; - external SecAsn1AlgId signature; + external mach_msg_empty_rcv_t rcv; +} - external CSSM_X509_NAME issuer; +typedef mach_msg_return_t = kern_return_t; +typedef kern_return_t = ffi.Int; +typedef mach_msg_option_t = integer_t; +typedef mach_msg_timeout_t = natural_t; - external CSSM_X509_VALIDITY validity; +class dispatch_source_type_s extends ffi.Opaque {} - external CSSM_X509_NAME subject; +typedef dispatch_source_t = ffi.Pointer; +typedef dispatch_source_type_t = ffi.Pointer; +typedef dispatch_group_t = ffi.Pointer; +typedef dispatch_semaphore_t = ffi.Pointer; +typedef dispatch_once_t = ffi.IntPtr; - external SecAsn1PubKeyInfo subjectPublicKeyInfo; +class dispatch_data_s extends ffi.Opaque {} - external SecAsn1Item issuerUniqueIdentifier; +typedef dispatch_data_t = ffi.Pointer; +typedef dispatch_data_applier_t = ffi.Pointer<_ObjCBlock>; +bool _ObjCBlock24_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, + ffi.Pointer arg2, ffi.Size arg3)>>() + .asFunction< + bool Function(dispatch_data_t arg0, int arg1, + ffi.Pointer arg2, int arg3)>()(arg0, arg1, arg2, arg3); +} - external SecAsn1Item subjectUniqueIdentifier; +final _ObjCBlock24_closureRegistry = {}; +int _ObjCBlock24_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock24_registerClosure(Function fn) { + final id = ++_ObjCBlock24_closureRegistryIndex; + _ObjCBlock24_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external CSSM_X509_EXTENSIONS extensions; +bool _ObjCBlock24_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { + return _ObjCBlock24_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2, arg3); } -typedef CSSM_X509_NAME = cssm_x509_name; -typedef CSSM_X509_VALIDITY = x509_validity; -typedef CSSM_X509_EXTENSIONS = cssm_x509_extensions; +class ObjCBlock24 extends _ObjCBlockBase { + ObjCBlock24._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class cssm_x509_signature extends ffi.Struct { - external SecAsn1AlgId algorithmIdentifier; + /// Creates a block from a C function pointer. + ObjCBlock24.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, + ffi.Pointer arg2, ffi.Size arg3)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Size arg1, + ffi.Pointer arg2, + ffi.Size arg3)>(_ObjCBlock24_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock24.fromFunction( + NativeCupertinoHttp lib, + bool Function(dispatch_data_t arg0, int arg1, ffi.Pointer arg2, + int arg3) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Size arg1, + ffi.Pointer arg2, + ffi.Size arg3)>( + _ObjCBlock24_closureTrampoline, false) + .cast(), + _ObjCBlock24_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call( + dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Size arg1, + ffi.Pointer arg2, + ffi.Size arg3)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + int arg1, + ffi.Pointer arg2, + int arg3)>()(_id, arg0, arg1, arg2, arg3); + } - external SecAsn1Item encrypted; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -class cssm_x509_signed_certificate extends ffi.Struct { - external CSSM_X509_TBS_CERTIFICATE certificate; +typedef dispatch_fd_t = ffi.Int; +void _ObjCBlock25_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>>() + .asFunction()(arg0, arg1); +} - external CSSM_X509_SIGNATURE signature; +final _ObjCBlock25_closureRegistry = {}; +int _ObjCBlock25_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock25_registerClosure(Function fn) { + final id = ++_ObjCBlock25_closureRegistryIndex; + _ObjCBlock25_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -typedef CSSM_X509_TBS_CERTIFICATE = cssm_x509_tbs_certificate; -typedef CSSM_X509_SIGNATURE = cssm_x509_signature; +void _ObjCBlock25_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { + return _ObjCBlock25_closureRegistry[block.ref.target.address]!(arg0, arg1); +} -class cssm_x509ext_policyQualifierInfo extends ffi.Struct { - external SecAsn1Oid policyQualifierId; +class ObjCBlock25 extends _ObjCBlockBase { + ObjCBlock25._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external SecAsn1Item value; -} + /// Creates a block from a C function pointer. + ObjCBlock25.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Int arg1)>(_ObjCBlock25_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -class cssm_x509ext_policyQualifiers extends ffi.Struct { - @uint32() - external int numberOfPolicyQualifiers; + /// Creates a block from a Dart function. + ObjCBlock25.fromFunction( + NativeCupertinoHttp lib, void Function(dispatch_data_t arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Int arg1)>(_ObjCBlock25_closureTrampoline) + .cast(), + _ObjCBlock25_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(dispatch_data_t arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, ffi.Int arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, + int arg1)>()(_id, arg0, arg1); + } - external ffi.Pointer policyQualifier; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef CSSM_X509EXT_POLICYQUALIFIERINFO = cssm_x509ext_policyQualifierInfo; +typedef dispatch_io_t = ffi.Pointer; +typedef dispatch_io_type_t = ffi.UnsignedLong; +void _ObjCBlock26_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} -class cssm_x509ext_policyInfo extends ffi.Struct { - external SecAsn1Oid policyIdentifier; +final _ObjCBlock26_closureRegistry = {}; +int _ObjCBlock26_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock26_registerClosure(Function fn) { + final id = ++_ObjCBlock26_closureRegistryIndex; + _ObjCBlock26_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external CSSM_X509EXT_POLICYQUALIFIERS policyQualifiers; +void _ObjCBlock26_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock26_closureRegistry[block.ref.target.address]!(arg0); } -typedef CSSM_X509EXT_POLICYQUALIFIERS = cssm_x509ext_policyQualifiers; +class ObjCBlock26 extends _ObjCBlockBase { + ObjCBlock26._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class cssm_x509_revoked_cert_entry extends ffi.Struct { - external SecAsn1Item certificateSerialNumber; + /// Creates a block from a C function pointer. + ObjCBlock26.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Int arg0)>(_ObjCBlock26_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external CSSM_X509_TIME revocationDate; + /// Creates a block from a Dart function. + ObjCBlock26.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Int arg0)>(_ObjCBlock26_closureTrampoline) + .cast(), + _ObjCBlock26_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(int arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Int arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); + } - external CSSM_X509_EXTENSIONS extensions; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -class cssm_x509_revoked_cert_list extends ffi.Struct { - @uint32() - external int numberOfRevokedCertEntries; - - external CSSM_X509_REVOKED_CERT_ENTRY_PTR revokedCertEntry; +typedef dispatch_io_handler_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock27_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() + .asFunction< + void Function( + bool arg0, dispatch_data_t arg1, int arg2)>()(arg0, arg1, arg2); } -typedef CSSM_X509_REVOKED_CERT_ENTRY_PTR - = ffi.Pointer; - -class cssm_x509_tbs_certlist extends ffi.Struct { - external SecAsn1Item version; - - external SecAsn1AlgId signature; +final _ObjCBlock27_closureRegistry = {}; +int _ObjCBlock27_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock27_registerClosure(Function fn) { + final id = ++_ObjCBlock27_closureRegistryIndex; + _ObjCBlock27_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external CSSM_X509_NAME issuer; +void _ObjCBlock27_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { + return _ObjCBlock27_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - external CSSM_X509_TIME thisUpdate; +class ObjCBlock27 extends _ObjCBlockBase { + ObjCBlock27._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external CSSM_X509_TIME nextUpdate; + /// Creates a block from a C function pointer. + ObjCBlock27.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0, + dispatch_data_t arg1, + ffi.Int arg2)>(_ObjCBlock27_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external CSSM_X509_REVOKED_CERT_LIST_PTR revokedCertificates; + /// Creates a block from a Dart function. + ObjCBlock27.fromFunction(NativeCupertinoHttp lib, + void Function(bool arg0, dispatch_data_t arg1, int arg2) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0, + dispatch_data_t arg1, + ffi.Int arg2)>(_ObjCBlock27_closureTrampoline) + .cast(), + _ObjCBlock27_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(bool arg0, dispatch_data_t arg1, int arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0, + dispatch_data_t arg1, ffi.Int arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, bool arg0, + dispatch_data_t arg1, int arg2)>()(_id, arg0, arg1, arg2); + } - external CSSM_X509_EXTENSIONS extensions; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef CSSM_X509_REVOKED_CERT_LIST_PTR - = ffi.Pointer; +typedef dispatch_io_close_flags_t = ffi.UnsignedLong; +typedef dispatch_io_interval_flags_t = ffi.UnsignedLong; +typedef dispatch_workloop_t = ffi.Pointer; -class cssm_x509_signed_crl extends ffi.Struct { - external CSSM_X509_TBS_CERTLIST tbsCertList; +class CFStreamError extends ffi.Struct { + @CFIndex() + external int domain; - external CSSM_X509_SIGNATURE signature; + @SInt32() + external int error; } -typedef CSSM_X509_TBS_CERTLIST = cssm_x509_tbs_certlist; - -abstract class __CE_GeneralNameType { - static const int GNT_OtherName = 0; - static const int GNT_RFC822Name = 1; - static const int GNT_DNSName = 2; - static const int GNT_X400Address = 3; - static const int GNT_DirectoryName = 4; - static const int GNT_EdiPartyName = 5; - static const int GNT_URI = 6; - static const int GNT_IPAddress = 7; - static const int GNT_RegisteredID = 8; +abstract class CFStreamStatus { + static const int kCFStreamStatusNotOpen = 0; + static const int kCFStreamStatusOpening = 1; + static const int kCFStreamStatusOpen = 2; + static const int kCFStreamStatusReading = 3; + static const int kCFStreamStatusWriting = 4; + static const int kCFStreamStatusAtEnd = 5; + static const int kCFStreamStatusClosed = 6; + static const int kCFStreamStatusError = 7; } -class __CE_OtherName extends ffi.Struct { - external SecAsn1Oid typeId; - - external SecAsn1Item value; +abstract class CFStreamEventType { + static const int kCFStreamEventNone = 0; + static const int kCFStreamEventOpenCompleted = 1; + static const int kCFStreamEventHasBytesAvailable = 2; + static const int kCFStreamEventCanAcceptBytes = 4; + static const int kCFStreamEventErrorOccurred = 8; + static const int kCFStreamEventEndEncountered = 16; } -class __CE_GeneralName extends ffi.Struct { - @ffi.Int32() - external int nameType; +class CFStreamClientContext extends ffi.Struct { + @CFIndex() + external int version; - @CSSM_BOOL() - external int berEncoded; + external ffi.Pointer info; - external SecAsn1Item name; -} + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; -class __CE_GeneralNames extends ffi.Struct { - @uint32() - external int numNames; + external ffi + .Pointer)>> + release; - external ffi.Pointer generalName; + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; } -typedef CE_GeneralName = __CE_GeneralName; - -class __CE_AuthorityKeyID extends ffi.Struct { - @CSSM_BOOL() - external int keyIdentifierPresent; - - external SecAsn1Item keyIdentifier; +class __CFReadStream extends ffi.Opaque {} - @CSSM_BOOL() - external int generalNamesPresent; +class __CFWriteStream extends ffi.Opaque {} - external ffi.Pointer generalNames; +typedef CFStreamPropertyKey = CFStringRef; +typedef CFReadStreamRef = ffi.Pointer<__CFReadStream>; +typedef CFWriteStreamRef = ffi.Pointer<__CFWriteStream>; +typedef CFReadStreamClientCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, ffi.Int32, ffi.Pointer)>>; +typedef CFWriteStreamClientCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFWriteStreamRef, ffi.Int32, ffi.Pointer)>>; - @CSSM_BOOL() - external int serialNumberPresent; +abstract class CFStreamErrorDomain { + static const int kCFStreamErrorDomainCustom = -1; + static const int kCFStreamErrorDomainPOSIX = 1; + static const int kCFStreamErrorDomainMacOSStatus = 2; +} - external SecAsn1Item serialNumber; +abstract class CFPropertyListMutabilityOptions { + static const int kCFPropertyListImmutable = 0; + static const int kCFPropertyListMutableContainers = 1; + static const int kCFPropertyListMutableContainersAndLeaves = 2; } -typedef CE_GeneralNames = __CE_GeneralNames; +abstract class CFPropertyListFormat { + static const int kCFPropertyListOpenStepFormat = 1; + static const int kCFPropertyListXMLFormat_v1_0 = 100; + static const int kCFPropertyListBinaryFormat_v1_0 = 200; +} -class __CE_ExtendedKeyUsage extends ffi.Struct { - @uint32() - external int numPurposes; +class CFSetCallBacks extends ffi.Struct { + @CFIndex() + external int version; - external CSSM_OID_PTR purposes; -} + external CFSetRetainCallBack retain; -typedef CSSM_OID_PTR = ffi.Pointer; + external CFSetReleaseCallBack release; -class __CE_BasicConstraints extends ffi.Struct { - @CSSM_BOOL() - external int cA; + external CFSetCopyDescriptionCallBack copyDescription; - @CSSM_BOOL() - external int pathLenConstraintPresent; + external CFSetEqualCallBack equal; - @uint32() - external int pathLenConstraint; + external CFSetHashCallBack hash; } -class __CE_PolicyQualifierInfo extends ffi.Struct { - external SecAsn1Oid policyQualifierId; +typedef CFSetRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFSetReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFSetCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFSetEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFSetHashCallBack = ffi + .Pointer)>>; - external SecAsn1Item qualifier; +class __CFSet extends ffi.Opaque {} + +typedef CFSetRef = ffi.Pointer<__CFSet>; +typedef CFMutableSetRef = ffi.Pointer<__CFSet>; +typedef CFSetApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + +abstract class CFStringEncodings { + static const int kCFStringEncodingMacJapanese = 1; + static const int kCFStringEncodingMacChineseTrad = 2; + static const int kCFStringEncodingMacKorean = 3; + static const int kCFStringEncodingMacArabic = 4; + static const int kCFStringEncodingMacHebrew = 5; + static const int kCFStringEncodingMacGreek = 6; + static const int kCFStringEncodingMacCyrillic = 7; + static const int kCFStringEncodingMacDevanagari = 9; + static const int kCFStringEncodingMacGurmukhi = 10; + static const int kCFStringEncodingMacGujarati = 11; + static const int kCFStringEncodingMacOriya = 12; + static const int kCFStringEncodingMacBengali = 13; + static const int kCFStringEncodingMacTamil = 14; + static const int kCFStringEncodingMacTelugu = 15; + static const int kCFStringEncodingMacKannada = 16; + static const int kCFStringEncodingMacMalayalam = 17; + static const int kCFStringEncodingMacSinhalese = 18; + static const int kCFStringEncodingMacBurmese = 19; + static const int kCFStringEncodingMacKhmer = 20; + static const int kCFStringEncodingMacThai = 21; + static const int kCFStringEncodingMacLaotian = 22; + static const int kCFStringEncodingMacGeorgian = 23; + static const int kCFStringEncodingMacArmenian = 24; + static const int kCFStringEncodingMacChineseSimp = 25; + static const int kCFStringEncodingMacTibetan = 26; + static const int kCFStringEncodingMacMongolian = 27; + static const int kCFStringEncodingMacEthiopic = 28; + static const int kCFStringEncodingMacCentralEurRoman = 29; + static const int kCFStringEncodingMacVietnamese = 30; + static const int kCFStringEncodingMacExtArabic = 31; + static const int kCFStringEncodingMacSymbol = 33; + static const int kCFStringEncodingMacDingbats = 34; + static const int kCFStringEncodingMacTurkish = 35; + static const int kCFStringEncodingMacCroatian = 36; + static const int kCFStringEncodingMacIcelandic = 37; + static const int kCFStringEncodingMacRomanian = 38; + static const int kCFStringEncodingMacCeltic = 39; + static const int kCFStringEncodingMacGaelic = 40; + static const int kCFStringEncodingMacFarsi = 140; + static const int kCFStringEncodingMacUkrainian = 152; + static const int kCFStringEncodingMacInuit = 236; + static const int kCFStringEncodingMacVT100 = 252; + static const int kCFStringEncodingMacHFS = 255; + static const int kCFStringEncodingISOLatin2 = 514; + static const int kCFStringEncodingISOLatin3 = 515; + static const int kCFStringEncodingISOLatin4 = 516; + static const int kCFStringEncodingISOLatinCyrillic = 517; + static const int kCFStringEncodingISOLatinArabic = 518; + static const int kCFStringEncodingISOLatinGreek = 519; + static const int kCFStringEncodingISOLatinHebrew = 520; + static const int kCFStringEncodingISOLatin5 = 521; + static const int kCFStringEncodingISOLatin6 = 522; + static const int kCFStringEncodingISOLatinThai = 523; + static const int kCFStringEncodingISOLatin7 = 525; + static const int kCFStringEncodingISOLatin8 = 526; + static const int kCFStringEncodingISOLatin9 = 527; + static const int kCFStringEncodingISOLatin10 = 528; + static const int kCFStringEncodingDOSLatinUS = 1024; + static const int kCFStringEncodingDOSGreek = 1029; + static const int kCFStringEncodingDOSBalticRim = 1030; + static const int kCFStringEncodingDOSLatin1 = 1040; + static const int kCFStringEncodingDOSGreek1 = 1041; + static const int kCFStringEncodingDOSLatin2 = 1042; + static const int kCFStringEncodingDOSCyrillic = 1043; + static const int kCFStringEncodingDOSTurkish = 1044; + static const int kCFStringEncodingDOSPortuguese = 1045; + static const int kCFStringEncodingDOSIcelandic = 1046; + static const int kCFStringEncodingDOSHebrew = 1047; + static const int kCFStringEncodingDOSCanadianFrench = 1048; + static const int kCFStringEncodingDOSArabic = 1049; + static const int kCFStringEncodingDOSNordic = 1050; + static const int kCFStringEncodingDOSRussian = 1051; + static const int kCFStringEncodingDOSGreek2 = 1052; + static const int kCFStringEncodingDOSThai = 1053; + static const int kCFStringEncodingDOSJapanese = 1056; + static const int kCFStringEncodingDOSChineseSimplif = 1057; + static const int kCFStringEncodingDOSKorean = 1058; + static const int kCFStringEncodingDOSChineseTrad = 1059; + static const int kCFStringEncodingWindowsLatin2 = 1281; + static const int kCFStringEncodingWindowsCyrillic = 1282; + static const int kCFStringEncodingWindowsGreek = 1283; + static const int kCFStringEncodingWindowsLatin5 = 1284; + static const int kCFStringEncodingWindowsHebrew = 1285; + static const int kCFStringEncodingWindowsArabic = 1286; + static const int kCFStringEncodingWindowsBalticRim = 1287; + static const int kCFStringEncodingWindowsVietnamese = 1288; + static const int kCFStringEncodingWindowsKoreanJohab = 1296; + static const int kCFStringEncodingANSEL = 1537; + static const int kCFStringEncodingJIS_X0201_76 = 1568; + static const int kCFStringEncodingJIS_X0208_83 = 1569; + static const int kCFStringEncodingJIS_X0208_90 = 1570; + static const int kCFStringEncodingJIS_X0212_90 = 1571; + static const int kCFStringEncodingJIS_C6226_78 = 1572; + static const int kCFStringEncodingShiftJIS_X0213 = 1576; + static const int kCFStringEncodingShiftJIS_X0213_MenKuTen = 1577; + static const int kCFStringEncodingGB_2312_80 = 1584; + static const int kCFStringEncodingGBK_95 = 1585; + static const int kCFStringEncodingGB_18030_2000 = 1586; + static const int kCFStringEncodingKSC_5601_87 = 1600; + static const int kCFStringEncodingKSC_5601_92_Johab = 1601; + static const int kCFStringEncodingCNS_11643_92_P1 = 1617; + static const int kCFStringEncodingCNS_11643_92_P2 = 1618; + static const int kCFStringEncodingCNS_11643_92_P3 = 1619; + static const int kCFStringEncodingISO_2022_JP = 2080; + static const int kCFStringEncodingISO_2022_JP_2 = 2081; + static const int kCFStringEncodingISO_2022_JP_1 = 2082; + static const int kCFStringEncodingISO_2022_JP_3 = 2083; + static const int kCFStringEncodingISO_2022_CN = 2096; + static const int kCFStringEncodingISO_2022_CN_EXT = 2097; + static const int kCFStringEncodingISO_2022_KR = 2112; + static const int kCFStringEncodingEUC_JP = 2336; + static const int kCFStringEncodingEUC_CN = 2352; + static const int kCFStringEncodingEUC_TW = 2353; + static const int kCFStringEncodingEUC_KR = 2368; + static const int kCFStringEncodingShiftJIS = 2561; + static const int kCFStringEncodingKOI8_R = 2562; + static const int kCFStringEncodingBig5 = 2563; + static const int kCFStringEncodingMacRomanLatin1 = 2564; + static const int kCFStringEncodingHZ_GB_2312 = 2565; + static const int kCFStringEncodingBig5_HKSCS_1999 = 2566; + static const int kCFStringEncodingVISCII = 2567; + static const int kCFStringEncodingKOI8_U = 2568; + static const int kCFStringEncodingBig5_E = 2569; + static const int kCFStringEncodingNextStepJapanese = 2818; + static const int kCFStringEncodingEBCDIC_US = 3073; + static const int kCFStringEncodingEBCDIC_CP037 = 3074; + static const int kCFStringEncodingUTF7 = 67109120; + static const int kCFStringEncodingUTF7_IMAP = 2576; + static const int kCFStringEncodingShiftJIS_X0213_00 = 1576; } -class __CE_PolicyInformation extends ffi.Struct { - external SecAsn1Oid certPolicyId; - - @uint32() - external int numPolicyQualifiers; +class CFTreeContext extends ffi.Struct { + @CFIndex() + external int version; - external ffi.Pointer policyQualifiers; -} + external ffi.Pointer info; -typedef CE_PolicyQualifierInfo = __CE_PolicyQualifierInfo; + external CFTreeRetainCallBack retain; -class __CE_CertPolicies extends ffi.Struct { - @uint32() - external int numPolicies; + external CFTreeReleaseCallBack release; - external ffi.Pointer policies; + external CFTreeCopyDescriptionCallBack copyDescription; } -typedef CE_PolicyInformation = __CE_PolicyInformation; +typedef CFTreeRetainCallBack = ffi.Pointer< + ffi.NativeFunction Function(ffi.Pointer)>>; +typedef CFTreeReleaseCallBack + = ffi.Pointer)>>; +typedef CFTreeCopyDescriptionCallBack = ffi + .Pointer)>>; -abstract class __CE_CrlDistributionPointNameType { - static const int CE_CDNT_FullName = 0; - static const int CE_CDNT_NameRelativeToCrlIssuer = 1; -} +class __CFTree extends ffi.Opaque {} -class __CE_DistributionPointName extends ffi.Struct { - @ffi.Int32() - external int nameType; +typedef CFTreeRef = ffi.Pointer<__CFTree>; +typedef CFTreeApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; - external UnnamedUnion4 dpn; +abstract class CFURLError { + static const int kCFURLUnknownError = -10; + static const int kCFURLUnknownSchemeError = -11; + static const int kCFURLResourceNotFoundError = -12; + static const int kCFURLResourceAccessViolationError = -13; + static const int kCFURLRemoteHostUnavailableError = -14; + static const int kCFURLImproperArgumentsError = -15; + static const int kCFURLUnknownPropertyKeyError = -16; + static const int kCFURLPropertyKeyUnavailableError = -17; + static const int kCFURLTimeoutError = -18; } -class UnnamedUnion4 extends ffi.Union { - external ffi.Pointer fullName; +class __CFUUID extends ffi.Opaque {} - external CSSM_X509_RDN_PTR rdn; -} +class CFUUIDBytes extends ffi.Struct { + @UInt8() + external int byte0; -class __CE_CRLDistributionPoint extends ffi.Struct { - external ffi.Pointer distPointName; + @UInt8() + external int byte1; - @CSSM_BOOL() - external int reasonsPresent; + @UInt8() + external int byte2; - @CE_CrlDistReasonFlags() - external int reasons; + @UInt8() + external int byte3; - external ffi.Pointer crlIssuer; -} + @UInt8() + external int byte4; -typedef CE_DistributionPointName = __CE_DistributionPointName; -typedef CE_CrlDistReasonFlags = uint8; + @UInt8() + external int byte5; -class __CE_CRLDistPointsSyntax extends ffi.Struct { - @uint32() - external int numDistPoints; + @UInt8() + external int byte6; - external ffi.Pointer distPoints; -} + @UInt8() + external int byte7; -typedef CE_CRLDistributionPoint = __CE_CRLDistributionPoint; + @UInt8() + external int byte8; -class __CE_AccessDescription extends ffi.Struct { - external SecAsn1Oid accessMethod; + @UInt8() + external int byte9; - external CE_GeneralName accessLocation; -} + @UInt8() + external int byte10; -class __CE_AuthorityInfoAccess extends ffi.Struct { - @uint32() - external int numAccessDescriptions; + @UInt8() + external int byte11; - external ffi.Pointer accessDescriptions; -} + @UInt8() + external int byte12; -typedef CE_AccessDescription = __CE_AccessDescription; + @UInt8() + external int byte13; -class __CE_SemanticsInformation extends ffi.Struct { - external ffi.Pointer semanticsIdentifier; + @UInt8() + external int byte14; - external ffi.Pointer - nameRegistrationAuthorities; + @UInt8() + external int byte15; } -typedef CE_NameRegistrationAuthorities = CE_GeneralNames; - -class __CE_QC_Statement extends ffi.Struct { - external SecAsn1Oid statementId; - - external ffi.Pointer semanticsInfo; - - external ffi.Pointer otherInfo; -} +typedef CFUUIDRef = ffi.Pointer<__CFUUID>; -typedef CE_SemanticsInformation = __CE_SemanticsInformation; +class __CFBundle extends ffi.Opaque {} -class __CE_QC_Statements extends ffi.Struct { - @uint32() - external int numQCStatements; +typedef CFBundleRef = ffi.Pointer<__CFBundle>; +typedef cpu_type_t = integer_t; +typedef CFPlugInRef = ffi.Pointer<__CFBundle>; +typedef CFBundleRefNum = ffi.Int; - external ffi.Pointer qcStatements; -} +class __CFMessagePort extends ffi.Opaque {} -typedef CE_QC_Statement = __CE_QC_Statement; +class CFMessagePortContext extends ffi.Struct { + @CFIndex() + external int version; -class __CE_IssuingDistributionPoint extends ffi.Struct { - external ffi.Pointer distPointName; + external ffi.Pointer info; - @CSSM_BOOL() - external int onlyUserCertsPresent; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; - @CSSM_BOOL() - external int onlyUserCerts; + external ffi + .Pointer)>> + release; - @CSSM_BOOL() - external int onlyCACertsPresent; + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; +} - @CSSM_BOOL() - external int onlyCACerts; +typedef CFMessagePortRef = ffi.Pointer<__CFMessagePort>; +typedef CFMessagePortCallBack = ffi.Pointer< + ffi.NativeFunction< + CFDataRef Function( + CFMessagePortRef, SInt32, CFDataRef, ffi.Pointer)>>; +typedef CFMessagePortInvalidationCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFMessagePortRef, ffi.Pointer)>>; +typedef CFPlugInFactoryFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFAllocatorRef, CFUUIDRef)>>; - @CSSM_BOOL() - external int onlySomeReasonsPresent; +class __CFPlugInInstance extends ffi.Opaque {} - @CE_CrlDistReasonFlags() - external int onlySomeReasons; +typedef CFPlugInInstanceRef = ffi.Pointer<__CFPlugInInstance>; +typedef CFPlugInInstanceDeallocateInstanceDataFunction + = ffi.Pointer)>>; +typedef CFPlugInInstanceGetInterfaceFunction = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(CFPlugInInstanceRef, CFStringRef, + ffi.Pointer>)>>; - @CSSM_BOOL() - external int indirectCrlPresent; +class __CFMachPort extends ffi.Opaque {} - @CSSM_BOOL() - external int indirectCrl; -} +class CFMachPortContext extends ffi.Struct { + @CFIndex() + external int version; -class __CE_GeneralSubtree extends ffi.Struct { - external ffi.Pointer base; + external ffi.Pointer info; - @uint32() - external int minimum; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; - @CSSM_BOOL() - external int maximumPresent; + external ffi + .Pointer)>> + release; - @uint32() - external int maximum; + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; } -class __CE_GeneralSubtrees extends ffi.Struct { - @uint32() - external int numSubtrees; +typedef CFMachPortRef = ffi.Pointer<__CFMachPort>; +typedef CFMachPortCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFMachPortRef, ffi.Pointer, CFIndex, + ffi.Pointer)>>; +typedef CFMachPortInvalidationCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFMachPortRef, ffi.Pointer)>>; - external ffi.Pointer subtrees; -} +class __CFAttributedString extends ffi.Opaque {} -typedef CE_GeneralSubtree = __CE_GeneralSubtree; +typedef CFAttributedStringRef = ffi.Pointer<__CFAttributedString>; +typedef CFMutableAttributedStringRef = ffi.Pointer<__CFAttributedString>; -class __CE_NameConstraints extends ffi.Struct { - external ffi.Pointer permitted; +class __CFURLEnumerator extends ffi.Opaque {} - external ffi.Pointer excluded; +abstract class CFURLEnumeratorOptions { + static const int kCFURLEnumeratorDefaultBehavior = 0; + static const int kCFURLEnumeratorDescendRecursively = 1; + static const int kCFURLEnumeratorSkipInvisibles = 2; + static const int kCFURLEnumeratorGenerateFileReferenceURLs = 4; + static const int kCFURLEnumeratorSkipPackageContents = 8; + static const int kCFURLEnumeratorIncludeDirectoriesPreOrder = 16; + static const int kCFURLEnumeratorIncludeDirectoriesPostOrder = 32; + static const int kCFURLEnumeratorGenerateRelativePathURLs = 64; } -typedef CE_GeneralSubtrees = __CE_GeneralSubtrees; - -class __CE_PolicyMapping extends ffi.Struct { - external SecAsn1Oid issuerDomainPolicy; +typedef CFURLEnumeratorRef = ffi.Pointer<__CFURLEnumerator>; - external SecAsn1Oid subjectDomainPolicy; +abstract class CFURLEnumeratorResult { + static const int kCFURLEnumeratorSuccess = 1; + static const int kCFURLEnumeratorEnd = 2; + static const int kCFURLEnumeratorError = 3; + static const int kCFURLEnumeratorDirectoryPostOrderSuccess = 4; } -class __CE_PolicyMappings extends ffi.Struct { - @uint32() - external int numPolicyMappings; +class guid_t extends ffi.Union { + @ffi.Array.multi([16]) + external ffi.Array g_guid; - external ffi.Pointer policyMappings; + @ffi.Array.multi([4]) + external ffi.Array g_guid_asint; } -typedef CE_PolicyMapping = __CE_PolicyMapping; - -class __CE_PolicyConstraints extends ffi.Struct { - @CSSM_BOOL() - external int requireExplicitPolicyPresent; - - @uint32() - external int requireExplicitPolicy; +@ffi.Packed(1) +class ntsid_t extends ffi.Struct { + @u_int8_t() + external int sid_kind; - @CSSM_BOOL() - external int inhibitPolicyMappingPresent; + @u_int8_t() + external int sid_authcount; - @uint32() - external int inhibitPolicyMapping; -} + @ffi.Array.multi([6]) + external ffi.Array sid_authority; -abstract class __CE_DataType { - static const int DT_AuthorityKeyID = 0; - static const int DT_SubjectKeyID = 1; - static const int DT_KeyUsage = 2; - static const int DT_SubjectAltName = 3; - static const int DT_IssuerAltName = 4; - static const int DT_ExtendedKeyUsage = 5; - static const int DT_BasicConstraints = 6; - static const int DT_CertPolicies = 7; - static const int DT_NetscapeCertType = 8; - static const int DT_CrlNumber = 9; - static const int DT_DeltaCrl = 10; - static const int DT_CrlReason = 11; - static const int DT_CrlDistributionPoints = 12; - static const int DT_IssuingDistributionPoint = 13; - static const int DT_AuthorityInfoAccess = 14; - static const int DT_Other = 15; - static const int DT_QC_Statements = 16; - static const int DT_NameConstraints = 17; - static const int DT_PolicyMappings = 18; - static const int DT_PolicyConstraints = 19; - static const int DT_InhibitAnyPolicy = 20; + @ffi.Array.multi([16]) + external ffi.Array sid_authorities; } -class CE_Data extends ffi.Union { - external CE_AuthorityKeyID authorityKeyID; - - external CE_SubjectKeyID subjectKeyID; - - @CE_KeyUsage() - external int keyUsage; - - external CE_GeneralNames subjectAltName; - - external CE_GeneralNames issuerAltName; - - external CE_ExtendedKeyUsage extendedKeyUsage; - - external CE_BasicConstraints basicConstraints; - - external CE_CertPolicies certPolicies; - - @CE_NetscapeCertType() - external int netscapeCertType; - - @CE_CrlNumber() - external int crlNumber; - - @CE_DeltaCrl() - external int deltaCrl; - - @CE_CrlReason() - external int crlReason; - - external CE_CRLDistPointsSyntax crlDistPoints; - - external CE_IssuingDistributionPoint issuingDistPoint; - - external CE_AuthorityInfoAccess authorityInfoAccess; - - external CE_QC_Statements qualifiedCertStatements; - - external CE_NameConstraints nameConstraints; - - external CE_PolicyMappings policyMappings; +typedef u_int8_t = ffi.UnsignedChar; +typedef u_int32_t = ffi.UnsignedInt; - external CE_PolicyConstraints policyConstraints; +class kauth_identity_extlookup extends ffi.Struct { + @u_int32_t() + external int el_seqno; - @CE_InhibitAnyPolicy() - external int inhibitAnyPolicy; + @u_int32_t() + external int el_result; - external SecAsn1Item rawData; -} + @u_int32_t() + external int el_flags; -typedef CE_AuthorityKeyID = __CE_AuthorityKeyID; -typedef CE_SubjectKeyID = SecAsn1Item; -typedef CE_KeyUsage = uint16; -typedef CE_ExtendedKeyUsage = __CE_ExtendedKeyUsage; -typedef CE_BasicConstraints = __CE_BasicConstraints; -typedef CE_CertPolicies = __CE_CertPolicies; -typedef CE_NetscapeCertType = uint16; -typedef CE_CrlNumber = uint32; -typedef CE_DeltaCrl = uint32; -typedef CE_CrlReason = uint32; -typedef CE_CRLDistPointsSyntax = __CE_CRLDistPointsSyntax; -typedef CE_IssuingDistributionPoint = __CE_IssuingDistributionPoint; -typedef CE_AuthorityInfoAccess = __CE_AuthorityInfoAccess; -typedef CE_QC_Statements = __CE_QC_Statements; -typedef CE_NameConstraints = __CE_NameConstraints; -typedef CE_PolicyMappings = __CE_PolicyMappings; -typedef CE_PolicyConstraints = __CE_PolicyConstraints; -typedef CE_InhibitAnyPolicy = uint32; + @__darwin_pid_t() + external int el_info_pid; -class __CE_DataAndType extends ffi.Struct { - @ffi.Int32() - external int type; + @u_int64_t() + external int el_extend; - external CE_Data extension1; + @u_int32_t() + external int el_info_reserved_1; - @CSSM_BOOL() - external int critical; -} + @uid_t() + external int el_uid; -class cssm_acl_process_subject_selector extends ffi.Struct { - @uint16() - external int version; + external guid_t el_uguid; - @uint16() - external int mask; + @u_int32_t() + external int el_uguid_valid; - @uint32() - external int uid; + external ntsid_t el_usid; - @uint32() - external int gid; -} + @u_int32_t() + external int el_usid_valid; -class cssm_acl_keychain_prompt_selector extends ffi.Struct { - @uint16() - external int version; + @gid_t() + external int el_gid; - @uint16() - external int flags; -} + external guid_t el_gguid; -abstract class cssm_appledl_open_parameters_mask { - static const int kCSSM_APPLEDL_MASK_MODE = 1; -} + @u_int32_t() + external int el_gguid_valid; -class cssm_appledl_open_parameters extends ffi.Struct { - @uint32() - external int length; + external ntsid_t el_gsid; - @uint32() - external int version; + @u_int32_t() + external int el_gsid_valid; - @CSSM_BOOL() - external int autoCommit; + @u_int32_t() + external int el_member_valid; - @uint32() - external int mask; + @u_int32_t() + external int el_sup_grp_cnt; - @mode_t() - external int mode; + @ffi.Array.multi([16]) + external ffi.Array el_sup_groups; } -class cssm_applecspdl_db_settings_parameters extends ffi.Struct { - @uint32() - external int idleTimeout; - - @uint8() - external int lockOnSleep; -} +typedef u_int64_t = ffi.UnsignedLongLong; -class cssm_applecspdl_db_is_locked_parameters extends ffi.Struct { - @uint8() - external int isLocked; -} +class kauth_cache_sizes extends ffi.Struct { + @u_int32_t() + external int kcs_group_size; -class cssm_applecspdl_db_change_password_parameters extends ffi.Struct { - external ffi.Pointer accessCredentials; + @u_int32_t() + external int kcs_id_size; } -typedef CSSM_ACCESS_CREDENTIALS = cssm_access_credentials; +class kauth_ace extends ffi.Struct { + external guid_t ace_applicable; -class CSSM_APPLE_TP_NAME_OID extends ffi.Struct { - external ffi.Pointer string; + @u_int32_t() + external int ace_flags; - external ffi.Pointer oid; + @kauth_ace_rights_t() + external int ace_rights; } -class CSSM_APPLE_TP_CERT_REQUEST extends ffi.Struct { - @CSSM_CSP_HANDLE() - external int cspHand; - - @CSSM_CL_HANDLE() - external int clHand; - - @uint32() - external int serialNumber; - - @uint32() - external int numSubjectNames; - - external ffi.Pointer subjectNames; - - @uint32() - external int numIssuerNames; - - external ffi.Pointer issuerNames; - - external CSSM_X509_NAME_PTR issuerNameX509; - - external ffi.Pointer certPublicKey; - - external ffi.Pointer issuerPrivateKey; - - @CSSM_ALGORITHMS() - external int signatureAlg; +typedef kauth_ace_rights_t = u_int32_t; - external SecAsn1Oid signatureOid; +class kauth_acl extends ffi.Struct { + @u_int32_t() + external int acl_entrycount; - @uint32() - external int notBefore; + @u_int32_t() + external int acl_flags; - @uint32() - external int notAfter; + @ffi.Array.multi([1]) + external ffi.Array acl_ace; +} - @uint32() - external int numExtensions; +class kauth_filesec extends ffi.Struct { + @u_int32_t() + external int fsec_magic; - external ffi.Pointer extensions; + external guid_t fsec_owner; - external ffi.Pointer challengeString; + external guid_t fsec_group; + + external kauth_acl fsec_acl; } -typedef CSSM_X509_NAME_PTR = ffi.Pointer; -typedef CSSM_KEY = cssm_key; -typedef CE_DataAndType = __CE_DataAndType; +abstract class acl_perm_t { + static const int ACL_READ_DATA = 2; + static const int ACL_LIST_DIRECTORY = 2; + static const int ACL_WRITE_DATA = 4; + static const int ACL_ADD_FILE = 4; + static const int ACL_EXECUTE = 8; + static const int ACL_SEARCH = 8; + static const int ACL_DELETE = 16; + static const int ACL_APPEND_DATA = 32; + static const int ACL_ADD_SUBDIRECTORY = 32; + static const int ACL_DELETE_CHILD = 64; + static const int ACL_READ_ATTRIBUTES = 128; + static const int ACL_WRITE_ATTRIBUTES = 256; + static const int ACL_READ_EXTATTRIBUTES = 512; + static const int ACL_WRITE_EXTATTRIBUTES = 1024; + static const int ACL_READ_SECURITY = 2048; + static const int ACL_WRITE_SECURITY = 4096; + static const int ACL_CHANGE_OWNER = 8192; + static const int ACL_SYNCHRONIZE = 1048576; +} -class CSSM_APPLE_TP_SSL_OPTIONS extends ffi.Struct { - @uint32() - external int Version; +abstract class acl_tag_t { + static const int ACL_UNDEFINED_TAG = 0; + static const int ACL_EXTENDED_ALLOW = 1; + static const int ACL_EXTENDED_DENY = 2; +} - @uint32() - external int ServerNameLen; +abstract class acl_type_t { + static const int ACL_TYPE_EXTENDED = 256; + static const int ACL_TYPE_ACCESS = 0; + static const int ACL_TYPE_DEFAULT = 1; + static const int ACL_TYPE_AFS = 2; + static const int ACL_TYPE_CODA = 3; + static const int ACL_TYPE_NTFS = 4; + static const int ACL_TYPE_NWFS = 5; +} - external ffi.Pointer ServerName; +abstract class acl_entry_id_t { + static const int ACL_FIRST_ENTRY = 0; + static const int ACL_NEXT_ENTRY = -1; + static const int ACL_LAST_ENTRY = -2; +} - @uint32() - external int Flags; +abstract class acl_flag_t { + static const int ACL_FLAG_DEFER_INHERIT = 1; + static const int ACL_FLAG_NO_INHERIT = 131072; + static const int ACL_ENTRY_INHERITED = 16; + static const int ACL_ENTRY_FILE_INHERIT = 32; + static const int ACL_ENTRY_DIRECTORY_INHERIT = 64; + static const int ACL_ENTRY_LIMIT_INHERIT = 128; + static const int ACL_ENTRY_ONLY_INHERIT = 256; } -class CSSM_APPLE_TP_CRL_OPTIONS extends ffi.Struct { - @uint32() - external int Version; +class _acl extends ffi.Opaque {} - @CSSM_APPLE_TP_CRL_OPT_FLAGS() - external int CrlFlags; +class _acl_entry extends ffi.Opaque {} - external CSSM_DL_DB_HANDLE_PTR crlStore; -} +class _acl_permset extends ffi.Opaque {} -typedef CSSM_APPLE_TP_CRL_OPT_FLAGS = uint32; +class _acl_flagset extends ffi.Opaque {} -class CSSM_APPLE_TP_SMIME_OPTIONS extends ffi.Struct { - @uint32() - external int Version; +typedef acl_t = ffi.Pointer<_acl>; +typedef acl_entry_t = ffi.Pointer<_acl_entry>; +typedef acl_permset_t = ffi.Pointer<_acl_permset>; +typedef acl_permset_mask_t = u_int64_t; +typedef acl_flagset_t = ffi.Pointer<_acl_flagset>; - @CE_KeyUsage() - external int IntendedUsage; +class __CFFileSecurity extends ffi.Opaque {} - @uint32() - external int SenderEmailLen; +typedef CFFileSecurityRef = ffi.Pointer<__CFFileSecurity>; - external ffi.Pointer SenderEmail; +abstract class CFFileSecurityClearOptions { + static const int kCFFileSecurityClearOwner = 1; + static const int kCFFileSecurityClearGroup = 2; + static const int kCFFileSecurityClearMode = 4; + static const int kCFFileSecurityClearOwnerUUID = 8; + static const int kCFFileSecurityClearGroupUUID = 16; + static const int kCFFileSecurityClearAccessControlList = 32; } -class CSSM_APPLE_TP_ACTION_DATA extends ffi.Struct { - @uint32() - external int Version; +class __CFStringTokenizer extends ffi.Opaque {} - @CSSM_APPLE_TP_ACTION_FLAGS() - external int ActionFlags; +abstract class CFStringTokenizerTokenType { + static const int kCFStringTokenizerTokenNone = 0; + static const int kCFStringTokenizerTokenNormal = 1; + static const int kCFStringTokenizerTokenHasSubTokensMask = 2; + static const int kCFStringTokenizerTokenHasDerivedSubTokensMask = 4; + static const int kCFStringTokenizerTokenHasHasNumbersMask = 8; + static const int kCFStringTokenizerTokenHasNonLettersMask = 16; + static const int kCFStringTokenizerTokenIsCJWordMask = 32; } -typedef CSSM_APPLE_TP_ACTION_FLAGS = uint32; +typedef CFStringTokenizerRef = ffi.Pointer<__CFStringTokenizer>; -class CSSM_TP_APPLE_EVIDENCE_INFO extends ffi.Struct { - @CSSM_TP_APPLE_CERT_STATUS() - external int StatusBits; +class __CFFileDescriptor extends ffi.Opaque {} - @uint32() - external int NumStatusCodes; +class CFFileDescriptorContext extends ffi.Struct { + @CFIndex() + external int version; - external ffi.Pointer StatusCodes; + external ffi.Pointer info; - @uint32() - external int Index; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; - external CSSM_DL_DB_HANDLE DlDbHandle; + external ffi + .Pointer)>> + release; - external CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord; + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; } -typedef CSSM_TP_APPLE_CERT_STATUS = uint32; -typedef CSSM_DL_DB_HANDLE = cssm_dl_db_handle; -typedef CSSM_DB_UNIQUE_RECORD_PTR = ffi.Pointer; +typedef CFFileDescriptorRef = ffi.Pointer<__CFFileDescriptor>; +typedef CFFileDescriptorNativeDescriptor = ffi.Int; +typedef CFFileDescriptorCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFFileDescriptorRef, CFOptionFlags, ffi.Pointer)>>; -class CSSM_TP_APPLE_EVIDENCE_HEADER extends ffi.Struct { - @uint32() - external int Version; -} +class __CFUserNotification extends ffi.Opaque {} -class CSSM_APPLE_CL_CSR_REQUEST extends ffi.Struct { - external CSSM_X509_NAME_PTR subjectNameX509; +typedef CFUserNotificationRef = ffi.Pointer<__CFUserNotification>; +typedef CFUserNotificationCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFUserNotificationRef, CFOptionFlags)>>; - @CSSM_ALGORITHMS() - external int signatureAlg; +class __CFXMLNode extends ffi.Opaque {} - external SecAsn1Oid signatureOid; +abstract class CFXMLNodeTypeCode { + static const int kCFXMLNodeTypeDocument = 1; + static const int kCFXMLNodeTypeElement = 2; + static const int kCFXMLNodeTypeAttribute = 3; + static const int kCFXMLNodeTypeProcessingInstruction = 4; + static const int kCFXMLNodeTypeComment = 5; + static const int kCFXMLNodeTypeText = 6; + static const int kCFXMLNodeTypeCDATASection = 7; + static const int kCFXMLNodeTypeDocumentFragment = 8; + static const int kCFXMLNodeTypeEntity = 9; + static const int kCFXMLNodeTypeEntityReference = 10; + static const int kCFXMLNodeTypeDocumentType = 11; + static const int kCFXMLNodeTypeWhitespace = 12; + static const int kCFXMLNodeTypeNotation = 13; + static const int kCFXMLNodeTypeElementTypeDeclaration = 14; + static const int kCFXMLNodeTypeAttributeListDeclaration = 15; +} - @CSSM_CSP_HANDLE() - external int cspHand; +class CFXMLElementInfo extends ffi.Struct { + external CFDictionaryRef attributes; - external ffi.Pointer subjectPublicKey; + external CFArrayRef attributeOrder; - external ffi.Pointer subjectPrivateKey; + @Boolean() + external int isEmpty; - external ffi.Pointer challengeString; + @ffi.Array.multi([3]) + external ffi.Array _reserved; } -abstract class SecTrustOptionFlags { - static const int kSecTrustOptionAllowExpired = 1; - static const int kSecTrustOptionLeafIsCA = 2; - static const int kSecTrustOptionFetchIssuerFromNet = 4; - static const int kSecTrustOptionAllowExpiredRoot = 8; - static const int kSecTrustOptionRequireRevPerCert = 16; - static const int kSecTrustOptionUseTrustSettings = 32; - static const int kSecTrustOptionImplicitAnchors = 64; +class CFXMLProcessingInstructionInfo extends ffi.Struct { + external CFStringRef dataString; } -typedef CSSM_TP_VERIFY_CONTEXT_RESULT_PTR - = ffi.Pointer; -typedef SecKeychainRef = ffi.Pointer<__SecKeychain>; +class CFXMLDocumentInfo extends ffi.Struct { + external CFURLRef sourceURL; -abstract class SecKeyUsage { - static const int kSecKeyUsageUnspecified = 0; - static const int kSecKeyUsageDigitalSignature = 1; - static const int kSecKeyUsageNonRepudiation = 2; - static const int kSecKeyUsageContentCommitment = 2; - static const int kSecKeyUsageKeyEncipherment = 4; - static const int kSecKeyUsageDataEncipherment = 8; - static const int kSecKeyUsageKeyAgreement = 16; - static const int kSecKeyUsageKeyCertSign = 32; - static const int kSecKeyUsageCRLSign = 64; - static const int kSecKeyUsageEncipherOnly = 128; - static const int kSecKeyUsageDecipherOnly = 256; - static const int kSecKeyUsageCritical = -2147483648; - static const int kSecKeyUsageAll = 2147483647; + @CFStringEncoding() + external int encoding; } -typedef SecIdentityRef = ffi.Pointer<__SecIdentity>; +class CFXMLExternalID extends ffi.Struct { + external CFURLRef systemID; -abstract class SSLCiphersuiteGroup { - static const int kSSLCiphersuiteGroupDefault = 0; - static const int kSSLCiphersuiteGroupCompatibility = 1; - static const int kSSLCiphersuiteGroupLegacy = 2; - static const int kSSLCiphersuiteGroupATS = 3; - static const int kSSLCiphersuiteGroupATSCompatibility = 4; + external CFStringRef publicID; } -abstract class tls_protocol_version_t { - static const int tls_protocol_version_TLSv10 = 769; - static const int tls_protocol_version_TLSv11 = 770; - static const int tls_protocol_version_TLSv12 = 771; - static const int tls_protocol_version_TLSv13 = 772; - static const int tls_protocol_version_DTLSv10 = -257; - static const int tls_protocol_version_DTLSv12 = -259; +class CFXMLDocumentTypeInfo extends ffi.Struct { + external CFXMLExternalID externalID; } -abstract class tls_ciphersuite_t { - static const int tls_ciphersuite_RSA_WITH_3DES_EDE_CBC_SHA = 10; - static const int tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA = 47; - static const int tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA = 53; - static const int tls_ciphersuite_RSA_WITH_AES_128_GCM_SHA256 = 156; - static const int tls_ciphersuite_RSA_WITH_AES_256_GCM_SHA384 = 157; - static const int tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA256 = 60; - static const int tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA256 = 61; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; - static const int tls_ciphersuite_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; - static const int tls_ciphersuite_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = - -13144; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = - -13143; - static const int tls_ciphersuite_AES_128_GCM_SHA256 = 4865; - static const int tls_ciphersuite_AES_256_GCM_SHA384 = 4866; - static const int tls_ciphersuite_CHACHA20_POLY1305_SHA256 = 4867; +class CFXMLNotationInfo extends ffi.Struct { + external CFXMLExternalID externalID; } -abstract class tls_ciphersuite_group_t { - static const int tls_ciphersuite_group_default = 0; - static const int tls_ciphersuite_group_compatibility = 1; - static const int tls_ciphersuite_group_legacy = 2; - static const int tls_ciphersuite_group_ats = 3; - static const int tls_ciphersuite_group_ats_compatibility = 4; +class CFXMLElementTypeDeclarationInfo extends ffi.Struct { + external CFStringRef contentDescription; } -abstract class SSLProtocol { - static const int kSSLProtocolUnknown = 0; - static const int kTLSProtocol1 = 4; - static const int kTLSProtocol11 = 7; - static const int kTLSProtocol12 = 8; - static const int kDTLSProtocol1 = 9; - static const int kTLSProtocol13 = 10; - static const int kDTLSProtocol12 = 11; - static const int kTLSProtocolMaxSupported = 999; - static const int kSSLProtocol2 = 1; - static const int kSSLProtocol3 = 2; - static const int kSSLProtocol3Only = 3; - static const int kTLSProtocol1Only = 5; - static const int kSSLProtocolAll = 6; -} +class CFXMLAttributeDeclarationInfo extends ffi.Struct { + external CFStringRef attributeName; -typedef sec_trust_t = ffi.Pointer; -typedef sec_identity_t = ffi.Pointer; -void _ObjCBlock30_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); + external CFStringRef typeString; + + external CFStringRef defaultString; } -final _ObjCBlock30_closureRegistry = {}; -int _ObjCBlock30_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock30_registerClosure(Function fn) { - final id = ++_ObjCBlock30_closureRegistryIndex; - _ObjCBlock30_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +class CFXMLAttributeListDeclarationInfo extends ffi.Struct { + @CFIndex() + external int numberOfAttributes; + + external ffi.Pointer attributes; } -void _ObjCBlock30_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { - return _ObjCBlock30_closureRegistry[block.ref.target.address]!(arg0); +abstract class CFXMLEntityTypeCode { + static const int kCFXMLEntityTypeParameter = 0; + static const int kCFXMLEntityTypeParsedInternal = 1; + static const int kCFXMLEntityTypeParsedExternal = 2; + static const int kCFXMLEntityTypeUnparsed = 3; + static const int kCFXMLEntityTypeCharacter = 4; } -class ObjCBlock30 extends _ObjCBlockBase { - ObjCBlock30._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class CFXMLEntityInfo extends ffi.Struct { + @ffi.Int32() + external int entityType; - /// Creates a block from a C function pointer. - ObjCBlock30.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - sec_certificate_t arg0)>( - _ObjCBlock30_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CFStringRef replacementText; - /// Creates a block from a Dart function. - ObjCBlock30.fromFunction( - NativeCupertinoHttp lib, void Function(sec_certificate_t arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - sec_certificate_t arg0)>( - _ObjCBlock30_closureTrampoline) - .cast(), - _ObjCBlock30_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(sec_certificate_t arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - sec_certificate_t arg0)>()(_id, arg0); - } + external CFXMLExternalID entityID; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CFStringRef notationName; } -typedef sec_certificate_t = ffi.Pointer; -typedef sec_protocol_metadata_t = ffi.Pointer; -typedef SSLCipherSuite = ffi.Uint16; -void _ObjCBlock31_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); +class CFXMLEntityReferenceInfo extends ffi.Struct { + @ffi.Int32() + external int entityType; } -final _ObjCBlock31_closureRegistry = {}; -int _ObjCBlock31_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock31_registerClosure(Function fn) { - final id = ++_ObjCBlock31_closureRegistryIndex; - _ObjCBlock31_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CFXMLNodeRef = ffi.Pointer<__CFXMLNode>; +typedef CFXMLTreeRef = CFTreeRef; + +class __CFXMLParser extends ffi.Opaque {} + +abstract class CFXMLParserOptions { + static const int kCFXMLParserValidateDocument = 1; + static const int kCFXMLParserSkipMetaData = 2; + static const int kCFXMLParserReplacePhysicalEntities = 4; + static const int kCFXMLParserSkipWhitespace = 8; + static const int kCFXMLParserResolveExternalEntities = 16; + static const int kCFXMLParserAddImpliedAttributes = 32; + static const int kCFXMLParserAllOptions = 16777215; + static const int kCFXMLParserNoOptions = 0; } -void _ObjCBlock31_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock31_closureRegistry[block.ref.target.address]!(arg0); +abstract class CFXMLParserStatusCode { + static const int kCFXMLStatusParseNotBegun = -2; + static const int kCFXMLStatusParseInProgress = -1; + static const int kCFXMLStatusParseSuccessful = 0; + static const int kCFXMLErrorUnexpectedEOF = 1; + static const int kCFXMLErrorUnknownEncoding = 2; + static const int kCFXMLErrorEncodingConversionFailure = 3; + static const int kCFXMLErrorMalformedProcessingInstruction = 4; + static const int kCFXMLErrorMalformedDTD = 5; + static const int kCFXMLErrorMalformedName = 6; + static const int kCFXMLErrorMalformedCDSect = 7; + static const int kCFXMLErrorMalformedCloseTag = 8; + static const int kCFXMLErrorMalformedStartTag = 9; + static const int kCFXMLErrorMalformedDocument = 10; + static const int kCFXMLErrorElementlessDocument = 11; + static const int kCFXMLErrorMalformedComment = 12; + static const int kCFXMLErrorMalformedCharacterReference = 13; + static const int kCFXMLErrorMalformedParsedCharacterData = 14; + static const int kCFXMLErrorNoData = 15; } -class ObjCBlock31 extends _ObjCBlockBase { - ObjCBlock31._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class CFXMLParserCallBacks extends ffi.Struct { + @CFIndex() + external int version; - /// Creates a block from a C function pointer. - ObjCBlock31.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Uint16 arg0)>(_ObjCBlock31_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CFXMLParserCreateXMLStructureCallBack createXMLStructure; - /// Creates a block from a Dart function. - ObjCBlock31.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Uint16 arg0)>(_ObjCBlock31_closureTrampoline) - .cast(), - _ObjCBlock31_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Uint16 arg0)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); - } + external CFXMLParserAddChildCallBack addChild; + + external CFXMLParserEndXMLStructureCallBack endXMLStructure; + + external CFXMLParserResolveExternalEntityCallBack resolveExternalEntity; + + external CFXMLParserHandleErrorCallBack handleError; +} + +typedef CFXMLParserCreateXMLStructureCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFXMLParserRef, CFXMLNodeRef, ffi.Pointer)>>; +typedef CFXMLParserRef = ffi.Pointer<__CFXMLParser>; +typedef CFXMLParserAddChildCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFXMLParserRef, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>; +typedef CFXMLParserEndXMLStructureCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFXMLParserRef, ffi.Pointer, ffi.Pointer)>>; +typedef CFXMLParserResolveExternalEntityCallBack = ffi.Pointer< + ffi.NativeFunction< + CFDataRef Function(CFXMLParserRef, ffi.Pointer, + ffi.Pointer)>>; +typedef CFXMLParserHandleErrorCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(CFXMLParserRef, ffi.Int32, ffi.Pointer)>>; - ffi.Pointer<_ObjCBlock> get pointer => _id; +class CFXMLParserContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external CFXMLParserRetainCallBack retain; + + external CFXMLParserReleaseCallBack release; + + external CFXMLParserCopyDescriptionCallBack copyDescription; } -void _ObjCBlock32_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { +typedef CFXMLParserRetainCallBack = ffi.Pointer< + ffi.NativeFunction Function(ffi.Pointer)>>; +typedef CFXMLParserReleaseCallBack + = ffi.Pointer)>>; +typedef CFXMLParserCopyDescriptionCallBack = ffi + .Pointer)>>; + +abstract class SecTrustResultType { + static const int kSecTrustResultInvalid = 0; + static const int kSecTrustResultProceed = 1; + static const int kSecTrustResultConfirm = 2; + static const int kSecTrustResultDeny = 3; + static const int kSecTrustResultUnspecified = 4; + static const int kSecTrustResultRecoverableTrustFailure = 5; + static const int kSecTrustResultFatalTrustFailure = 6; + static const int kSecTrustResultOtherError = 7; +} + +class __SecTrust extends ffi.Opaque {} + +typedef SecTrustRef = ffi.Pointer<__SecTrust>; +typedef SecTrustCallback = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock28_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { return block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, dispatch_data_t arg1)>>() - .asFunction< - void Function( - dispatch_data_t arg0, dispatch_data_t arg1)>()(arg0, arg1); + ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>>() + .asFunction()(arg0, arg1); } -final _ObjCBlock32_closureRegistry = {}; -int _ObjCBlock32_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock32_registerClosure(Function fn) { - final id = ++_ObjCBlock32_closureRegistryIndex; - _ObjCBlock32_closureRegistry[id] = fn; +final _ObjCBlock28_closureRegistry = {}; +int _ObjCBlock28_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock28_registerClosure(Function fn) { + final id = ++_ObjCBlock28_closureRegistryIndex; + _ObjCBlock28_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock32_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { - return _ObjCBlock32_closureRegistry[block.ref.target.address]!(arg0, arg1); +void _ObjCBlock28_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { + return _ObjCBlock28_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock32 extends _ObjCBlockBase { - ObjCBlock32._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock28 extends _ObjCBlockBase { + ObjCBlock28._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock32.fromFunctionPointer( + ObjCBlock28.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - dispatch_data_t arg0, dispatch_data_t arg1)>> + ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>> ptr) : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - dispatch_data_t arg1)>(_ObjCBlock32_fnPtrTrampoline) - .cast(), - ptr.cast()), + lib + ._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + ffi.Int32 arg1)>(_ObjCBlock28_fnPtrTrampoline) + .cast(), + ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock32.fromFunction(NativeCupertinoHttp lib, - void Function(dispatch_data_t arg0, dispatch_data_t arg1) fn) + ObjCBlock28.fromFunction( + NativeCupertinoHttp lib, void Function(SecTrustRef arg0, int arg1) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, dispatch_data_t arg1)>( - _ObjCBlock32_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + ffi.Int32 arg1)>(_ObjCBlock28_closureTrampoline) .cast(), - _ObjCBlock32_registerClosure(fn)), + _ObjCBlock28_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(dispatch_data_t arg0, dispatch_data_t arg1) { + void call(SecTrustRef arg0, int arg1) { return _id.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, dispatch_data_t arg1)>>() + SecTrustRef arg0, ffi.Int32 arg1)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, - dispatch_data_t arg1)>()(_id, arg0, arg1); + void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, + int arg1)>()(_id, arg0, arg1); } ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef sec_protocol_options_t = ffi.Pointer; -typedef sec_protocol_pre_shared_key_selection_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock33_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) { +typedef SecTrustWithErrorCallback = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock29_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, bool arg1, CFErrorRef arg2) { return block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>>() + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() .asFunction< - void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>()( + void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2)>()( arg0, arg1, arg2); } -final _ObjCBlock33_closureRegistry = {}; -int _ObjCBlock33_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock33_registerClosure(Function fn) { - final id = ++_ObjCBlock33_closureRegistryIndex; - _ObjCBlock33_closureRegistry[id] = fn; +final _ObjCBlock29_closureRegistry = {}; +int _ObjCBlock29_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock29_registerClosure(Function fn) { + final id = ++_ObjCBlock29_closureRegistryIndex; + _ObjCBlock29_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock33_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) { - return _ObjCBlock33_closureRegistry[block.ref.target.address]!( +void _ObjCBlock29_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, bool arg1, CFErrorRef arg2) { + return _ObjCBlock29_closureRegistry[block.ref.target.address]!( arg0, arg1, arg2); } -class ObjCBlock33 extends _ObjCBlockBase { - ObjCBlock33._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock29 extends _ObjCBlockBase { + ObjCBlock29._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock33.fromFunctionPointer( + ObjCBlock29.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>> + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>(_ObjCBlock33_fnPtrTrampoline) + SecTrustRef arg0, + ffi.Bool arg1, + CFErrorRef arg2)>(_ObjCBlock29_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock33.fromFunction( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) - fn) + ObjCBlock29.fromFunction(NativeCupertinoHttp lib, + void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>(_ObjCBlock33_closureTrampoline) + SecTrustRef arg0, + ffi.Bool arg1, + CFErrorRef arg2)>(_ObjCBlock29_closureTrampoline) .cast(), - _ObjCBlock33_registerClosure(fn)), + _ObjCBlock29_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(sec_protocol_metadata_t arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) { + void call(SecTrustRef arg0, bool arg1, CFErrorRef arg2) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>>() + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>()(_id, arg0, arg1, arg2); + void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, + bool arg1, CFErrorRef arg2)>()(_id, arg0, arg1, arg2); } ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef sec_protocol_pre_shared_key_selection_complete_t - = ffi.Pointer<_ObjCBlock>; -typedef sec_protocol_key_update_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock34_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>>() - .asFunction< - void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>()(arg0, arg1); +typedef SecKeyRef = ffi.Pointer<__SecKey>; +typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; + +class cssm_data extends ffi.Struct { + @ffi.Size() + external int Length; + + external ffi.Pointer Data; } -final _ObjCBlock34_closureRegistry = {}; -int _ObjCBlock34_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock34_registerClosure(Function fn) { - final id = ++_ObjCBlock34_closureRegistryIndex; - _ObjCBlock34_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +class SecAsn1AlgId extends ffi.Struct { + external SecAsn1Oid algorithm; + + external SecAsn1Item parameters; } -void _ObjCBlock34_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { - return _ObjCBlock34_closureRegistry[block.ref.target.address]!(arg0, arg1); +typedef SecAsn1Oid = cssm_data; +typedef SecAsn1Item = cssm_data; + +class SecAsn1PubKeyInfo extends ffi.Struct { + external SecAsn1AlgId algorithm; + + external SecAsn1Item subjectPublicKey; } -class ObjCBlock34 extends _ObjCBlockBase { - ObjCBlock34._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class SecAsn1Template_struct extends ffi.Struct { + @ffi.Uint32() + external int kind; - /// Creates a block from a C function pointer. - ObjCBlock34.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>( - _ObjCBlock34_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Uint32() + external int offset; - /// Creates a block from a Dart function. - ObjCBlock34.fromFunction( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>( - _ObjCBlock34_closureTrampoline) - .cast(), - _ObjCBlock34_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>()(_id, arg0, arg1); - } + external ffi.Pointer sub; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @ffi.Uint32() + external int size; } -typedef sec_protocol_key_update_complete_t = ffi.Pointer<_ObjCBlock>; -typedef sec_protocol_challenge_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock35_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>>() - .asFunction< - void Function(sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>()(arg0, arg1); +class cssm_guid extends ffi.Struct { + @uint32() + external int Data1; + + @uint16() + external int Data2; + + @uint16() + external int Data3; + + @ffi.Array.multi([8]) + external ffi.Array Data4; } -final _ObjCBlock35_closureRegistry = {}; -int _ObjCBlock35_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock35_registerClosure(Function fn) { - final id = ++_ObjCBlock35_closureRegistryIndex; - _ObjCBlock35_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef uint32 = ffi.Uint32; +typedef uint16 = ffi.Uint16; +typedef uint8 = ffi.Uint8; + +class cssm_version extends ffi.Struct { + @uint32() + external int Major; + + @uint32() + external int Minor; } -void _ObjCBlock35_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { - return _ObjCBlock35_closureRegistry[block.ref.target.address]!(arg0, arg1); +class cssm_subservice_uid extends ffi.Struct { + external CSSM_GUID Guid; + + external CSSM_VERSION Version; + + @uint32() + external int SubserviceId; + + @CSSM_SERVICE_TYPE() + external int SubserviceType; } -class ObjCBlock35 extends _ObjCBlockBase { - ObjCBlock35._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_GUID = cssm_guid; +typedef CSSM_VERSION = cssm_version; +typedef CSSM_SERVICE_TYPE = CSSM_SERVICE_MASK; +typedef CSSM_SERVICE_MASK = uint32; - /// Creates a block from a C function pointer. - ObjCBlock35.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>( - _ObjCBlock35_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class cssm_net_address extends ffi.Struct { + @CSSM_NET_ADDRESS_TYPE() + external int AddressType; - /// Creates a block from a Dart function. - ObjCBlock35.fromFunction( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>( - _ObjCBlock35_closureTrampoline) - .cast(), - _ObjCBlock35_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>()(_id, arg0, arg1); - } + external SecAsn1Item Address; +} - ffi.Pointer<_ObjCBlock> get pointer => _id; +typedef CSSM_NET_ADDRESS_TYPE = uint32; + +class cssm_crypto_data extends ffi.Struct { + external SecAsn1Item Param; + + external CSSM_CALLBACK Callback; + + external ffi.Pointer CallerCtx; } -typedef sec_protocol_challenge_complete_t = ffi.Pointer<_ObjCBlock>; -typedef sec_protocol_verify_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock36_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>>() - .asFunction< - void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>()(arg0, arg1, arg2); +typedef CSSM_CALLBACK = ffi.Pointer< + ffi.NativeFunction< + CSSM_RETURN Function(CSSM_DATA_PTR, ffi.Pointer)>>; +typedef CSSM_RETURN = sint32; +typedef sint32 = ffi.Int32; +typedef CSSM_DATA_PTR = ffi.Pointer; + +class cssm_list_element extends ffi.Struct { + external ffi.Pointer NextElement; + + @CSSM_WORDID_TYPE() + external int WordID; + + @CSSM_LIST_ELEMENT_TYPE() + external int ElementType; + + external UnnamedUnion2 Element; } -final _ObjCBlock36_closureRegistry = {}; -int _ObjCBlock36_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock36_registerClosure(Function fn) { - final id = ++_ObjCBlock36_closureRegistryIndex; - _ObjCBlock36_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CSSM_WORDID_TYPE = sint32; +typedef CSSM_LIST_ELEMENT_TYPE = uint32; + +class UnnamedUnion2 extends ffi.Union { + external CSSM_LIST Sublist; + + external SecAsn1Item Word; +} + +typedef CSSM_LIST = cssm_list; + +class cssm_list extends ffi.Struct { + @CSSM_LIST_TYPE() + external int ListType; + + external CSSM_LIST_ELEMENT_PTR Head; + + external CSSM_LIST_ELEMENT_PTR Tail; +} + +typedef CSSM_LIST_TYPE = uint32; +typedef CSSM_LIST_ELEMENT_PTR = ffi.Pointer; + +class CSSM_TUPLE extends ffi.Struct { + external CSSM_LIST Issuer; + + external CSSM_LIST Subject; + + @CSSM_BOOL() + external int Delegate; + + external CSSM_LIST AuthorizationTag; + + external CSSM_LIST ValidityPeriod; +} + +typedef CSSM_BOOL = sint32; + +class cssm_tuplegroup extends ffi.Struct { + @uint32() + external int NumberOfTuples; + + external CSSM_TUPLE_PTR Tuples; +} + +typedef CSSM_TUPLE_PTR = ffi.Pointer; + +class cssm_sample extends ffi.Struct { + external CSSM_LIST TypedSample; + + external ffi.Pointer Verifier; } -void _ObjCBlock36_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) { - return _ObjCBlock36_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +typedef CSSM_SUBSERVICE_UID = cssm_subservice_uid; + +class cssm_samplegroup extends ffi.Struct { + @uint32() + external int NumberOfSamples; + + external ffi.Pointer Samples; } -class ObjCBlock36 extends _ObjCBlockBase { - ObjCBlock36._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_SAMPLE = cssm_sample; - /// Creates a block from a C function pointer. - ObjCBlock36.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_trust_t arg1, sec_protocol_verify_complete_t arg2)>> - ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>( - _ObjCBlock36_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class cssm_memory_funcs extends ffi.Struct { + external CSSM_MALLOC malloc_func; - /// Creates a block from a Dart function. - ObjCBlock36.fromFunction( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>( - _ObjCBlock36_closureTrampoline) - .cast(), - _ObjCBlock36_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>()(_id, arg0, arg1, arg2); - } + external CSSM_FREE free_func; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CSSM_REALLOC realloc_func; + + external CSSM_CALLOC calloc_func; + + external ffi.Pointer AllocRef; } -typedef sec_protocol_verify_complete_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock37_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); +typedef CSSM_MALLOC = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CSSM_SIZE, ffi.Pointer)>>; +typedef CSSM_SIZE = ffi.Size; +typedef CSSM_FREE = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +typedef CSSM_REALLOC = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, CSSM_SIZE, ffi.Pointer)>>; +typedef CSSM_CALLOC = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + uint32, CSSM_SIZE, ffi.Pointer)>>; + +class cssm_encoded_cert extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; + + @CSSM_CERT_ENCODING() + external int CertEncoding; + + external SecAsn1Item CertBlob; } -final _ObjCBlock37_closureRegistry = {}; -int _ObjCBlock37_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock37_registerClosure(Function fn) { - final id = ++_ObjCBlock37_closureRegistryIndex; - _ObjCBlock37_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CSSM_CERT_TYPE = uint32; +typedef CSSM_CERT_ENCODING = uint32; + +class cssm_parsed_cert extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; + + @CSSM_CERT_PARSE_FORMAT() + external int ParsedCertFormat; + + external ffi.Pointer ParsedCert; } -void _ObjCBlock37_closureTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { - return _ObjCBlock37_closureRegistry[block.ref.target.address]!(arg0); +typedef CSSM_CERT_PARSE_FORMAT = uint32; + +class cssm_cert_pair extends ffi.Struct { + external CSSM_ENCODED_CERT EncodedCert; + + external CSSM_PARSED_CERT ParsedCert; } -class ObjCBlock37 extends _ObjCBlockBase { - ObjCBlock37._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_ENCODED_CERT = cssm_encoded_cert; +typedef CSSM_PARSED_CERT = cssm_parsed_cert; - /// Creates a block from a C function pointer. - ObjCBlock37.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0)>(_ObjCBlock37_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class cssm_certgroup extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; - /// Creates a block from a Dart function. - ObjCBlock37.fromFunction(NativeCupertinoHttp lib, void Function(bool arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0)>(_ObjCBlock37_closureTrampoline) - .cast(), - _ObjCBlock37_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(bool arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, bool arg0)>()(_id, arg0); - } + @CSSM_CERT_ENCODING() + external int CertEncoding; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @uint32() + external int NumCerts; + + external UnnamedUnion3 GroupList; + + @CSSM_CERTGROUP_TYPE() + external int CertGroupType; + + external ffi.Pointer Reserved; } -class SSLContext extends ffi.Opaque {} +class UnnamedUnion3 extends ffi.Union { + external CSSM_DATA_PTR CertList; -abstract class SSLSessionOption { - static const int kSSLSessionOptionBreakOnServerAuth = 0; - static const int kSSLSessionOptionBreakOnCertRequested = 1; - static const int kSSLSessionOptionBreakOnClientAuth = 2; - static const int kSSLSessionOptionFalseStart = 3; - static const int kSSLSessionOptionSendOneByteRecord = 4; - static const int kSSLSessionOptionAllowServerIdentityChange = 5; - static const int kSSLSessionOptionFallback = 6; - static const int kSSLSessionOptionBreakOnClientHello = 7; - static const int kSSLSessionOptionAllowRenegotiation = 8; - static const int kSSLSessionOptionEnableSessionTickets = 9; + external CSSM_ENCODED_CERT_PTR EncodedCertList; + + external CSSM_PARSED_CERT_PTR ParsedCertList; + + external CSSM_CERT_PAIR_PTR PairCertList; } -abstract class SSLSessionState { - static const int kSSLIdle = 0; - static const int kSSLHandshake = 1; - static const int kSSLConnected = 2; - static const int kSSLClosed = 3; - static const int kSSLAborted = 4; +typedef CSSM_ENCODED_CERT_PTR = ffi.Pointer; +typedef CSSM_PARSED_CERT_PTR = ffi.Pointer; +typedef CSSM_CERT_PAIR_PTR = ffi.Pointer; +typedef CSSM_CERTGROUP_TYPE = uint32; + +class cssm_base_certs extends ffi.Struct { + @CSSM_TP_HANDLE() + external int TPHandle; + + @CSSM_CL_HANDLE() + external int CLHandle; + + external CSSM_CERTGROUP Certs; } -abstract class SSLClientCertificateState { - static const int kSSLClientCertNone = 0; - static const int kSSLClientCertRequested = 1; - static const int kSSLClientCertSent = 2; - static const int kSSLClientCertRejected = 3; +typedef CSSM_TP_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_MODULE_HANDLE = CSSM_HANDLE; +typedef CSSM_HANDLE = CSSM_INTPTR; +typedef CSSM_INTPTR = ffi.IntPtr; +typedef CSSM_CL_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_CERTGROUP = cssm_certgroup; + +class cssm_access_credentials extends ffi.Struct { + @ffi.Array.multi([68]) + external ffi.Array EntryTag; + + external CSSM_BASE_CERTS BaseCerts; + + external CSSM_SAMPLEGROUP Samples; + + external CSSM_CHALLENGE_CALLBACK Callback; + + external ffi.Pointer CallerCtx; } -abstract class SSLProtocolSide { - static const int kSSLServerSide = 0; - static const int kSSLClientSide = 1; +typedef CSSM_BASE_CERTS = cssm_base_certs; +typedef CSSM_SAMPLEGROUP = cssm_samplegroup; +typedef CSSM_CHALLENGE_CALLBACK = ffi.Pointer< + ffi.NativeFunction< + CSSM_RETURN Function(ffi.Pointer, CSSM_SAMPLEGROUP_PTR, + ffi.Pointer, ffi.Pointer)>>; +typedef CSSM_SAMPLEGROUP_PTR = ffi.Pointer; +typedef CSSM_MEMORY_FUNCS = cssm_memory_funcs; + +class cssm_authorizationgroup extends ffi.Struct { + @uint32() + external int NumberOfAuthTags; + + external ffi.Pointer AuthTags; } -abstract class SSLConnectionType { - static const int kSSLStreamType = 0; - static const int kSSLDatagramType = 1; +typedef CSSM_ACL_AUTHORIZATION_TAG = sint32; + +class cssm_acl_validity_period extends ffi.Struct { + external SecAsn1Item StartDate; + + external SecAsn1Item EndDate; } -typedef SSLContextRef = ffi.Pointer; -typedef SSLReadFunc = ffi.Pointer< - ffi.NativeFunction< - OSStatus Function( - SSLConnectionRef, ffi.Pointer, ffi.Pointer)>>; -typedef SSLConnectionRef = ffi.Pointer; -typedef SSLWriteFunc = ffi.Pointer< - ffi.NativeFunction< - OSStatus Function( - SSLConnectionRef, ffi.Pointer, ffi.Pointer)>>; +class cssm_acl_entry_prototype extends ffi.Struct { + external CSSM_LIST TypedSubject; -abstract class SSLAuthenticate { - static const int kNeverAuthenticate = 0; - static const int kAlwaysAuthenticate = 1; - static const int kTryAuthenticate = 2; + @CSSM_BOOL() + external int Delegate; + + external CSSM_AUTHORIZATIONGROUP Authorization; + + external CSSM_ACL_VALIDITY_PERIOD TimeRange; + + @ffi.Array.multi([68]) + external ffi.Array EntryTag; } -/// NSURLSession is a replacement API for NSURLConnection. It provides -/// options that affect the policy of, and various aspects of the -/// mechanism by which NSURLRequest objects are retrieved from the -/// network. -/// -/// An NSURLSession may be bound to a delegate object. The delegate is -/// invoked for certain events during the lifetime of a session, such as -/// server authentication or determining whether a resource to be loaded -/// should be converted into a download. -/// -/// NSURLSession instances are threadsafe. -/// -/// The default NSURLSession uses a system provided delegate and is -/// appropriate to use in place of existing code that uses -/// +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] -/// -/// An NSURLSession creates NSURLSessionTask objects which represent the -/// action of a resource being loaded. These are analogous to -/// NSURLConnection objects but provide for more control and a unified -/// delegate model. -/// -/// NSURLSessionTask objects are always created in a suspended state and -/// must be sent the -resume message before they will execute. -/// -/// Subclasses of NSURLSessionTask are used to syntactically -/// differentiate between data and file downloads. -/// -/// An NSURLSessionDataTask receives the resource as a series of calls to -/// the URLSession:dataTask:didReceiveData: delegate method. This is type of -/// task most commonly associated with retrieving objects for immediate parsing -/// by the consumer. -/// -/// An NSURLSessionUploadTask differs from an NSURLSessionDataTask -/// in how its instance is constructed. Upload tasks are explicitly created -/// by referencing a file or data object to upload, or by utilizing the -/// -URLSession:task:needNewBodyStream: delegate message to supply an upload -/// body. -/// -/// An NSURLSessionDownloadTask will directly write the response data to -/// a temporary file. When completed, the delegate is sent -/// URLSession:downloadTask:didFinishDownloadingToURL: and given an opportunity -/// to move this file to a permanent location in its sandboxed container, or to -/// otherwise read the file. If canceled, an NSURLSessionDownloadTask can -/// produce a data blob that can be used to resume a download at a later -/// time. -/// -/// Beginning with iOS 9 and Mac OS X 10.11, NSURLSessionStream is -/// available as a task type. This allows for direct TCP/IP connection -/// to a given host and port with optional secure handshaking and -/// navigation of proxies. Data tasks may also be upgraded to a -/// NSURLSessionStream task via the HTTP Upgrade: header and appropriate -/// use of the pipelining option of NSURLSessionConfiguration. See RFC -/// 2817 and RFC 6455 for information about the Upgrade: header, and -/// comments below on turning data tasks into stream tasks. -/// -/// An NSURLSessionWebSocketTask is a task that allows clients to connect to servers supporting -/// WebSocket. The task will perform the HTTP handshake to upgrade the connection -/// and once the WebSocket handshake is successful, the client can read and write -/// messages that will be framed using the WebSocket protocol by the framework. -class NSURLSession extends NSObject { - NSURLSession._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_AUTHORIZATIONGROUP = cssm_authorizationgroup; +typedef CSSM_ACL_VALIDITY_PERIOD = cssm_acl_validity_period; - /// Returns a [NSURLSession] that points to the same underlying object as [other]. - static NSURLSession castFrom(T other) { - return NSURLSession._(other._id, other._lib, retain: true, release: true); - } +class cssm_acl_owner_prototype extends ffi.Struct { + external CSSM_LIST TypedSubject; - /// Returns a [NSURLSession] that wraps the given raw object pointer. - static NSURLSession castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSession._(other, lib, retain: retain, release: release); - } + @CSSM_BOOL() + external int Delegate; +} - /// Returns whether [obj] is an instance of [NSURLSession]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLSession1); - } +class cssm_acl_entry_input extends ffi.Struct { + external CSSM_ACL_ENTRY_PROTOTYPE Prototype; - /// The shared session uses the currently set global NSURLCache, - /// NSHTTPCookieStorage and NSURLCredentialStorage objects. - static NSURLSession? getSharedSession(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_380( - _lib._class_NSURLSession1, _lib._sel_sharedSession1); - return _ret.address == 0 - ? null - : NSURLSession._(_ret, _lib, retain: true, release: true); - } + external CSSM_ACL_SUBJECT_CALLBACK Callback; - /// Customization of NSURLSession occurs during creation of a new session. - /// If you only need to use the convenience routines with custom - /// configuration options it is not necessary to specify a delegate. - /// If you do specify a delegate, the delegate will be retained until after - /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. - static NSURLSession sessionWithConfiguration_( - NativeCupertinoHttp _lib, NSURLSessionConfiguration? configuration) { - final _ret = _lib._objc_msgSend_395( - _lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_1, - configuration?._id ?? ffi.nullptr); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer CallerContext; +} - static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( - NativeCupertinoHttp _lib, - NSURLSessionConfiguration? configuration, - NSObject? delegate, - NSOperationQueue? queue) { - final _ret = _lib._objc_msgSend_396( - _lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, - configuration?._id ?? ffi.nullptr, - delegate?._id ?? ffi.nullptr, - queue?._id ?? ffi.nullptr); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_ACL_ENTRY_PROTOTYPE = cssm_acl_entry_prototype; +typedef CSSM_ACL_SUBJECT_CALLBACK = ffi.Pointer< + ffi.NativeFunction< + CSSM_RETURN Function(ffi.Pointer, CSSM_LIST_PTR, + ffi.Pointer, ffi.Pointer)>>; +typedef CSSM_LIST_PTR = ffi.Pointer; - NSOperationQueue? get delegateQueue { - final _ret = _lib._objc_msgSend_345(_id, _lib._sel_delegateQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); - } +class cssm_resource_control_context extends ffi.Struct { + external CSSM_ACCESS_CREDENTIALS_PTR AccessCred; - NSObject? get delegate { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + external CSSM_ACL_ENTRY_INPUT InitialAclEntry; +} - NSURLSessionConfiguration? get configuration { - final _ret = _lib._objc_msgSend_381(_id, _lib._sel_configuration1); - return _ret.address == 0 - ? null - : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_ACCESS_CREDENTIALS_PTR = ffi.Pointer; +typedef CSSM_ACL_ENTRY_INPUT = cssm_acl_entry_input; - /// The sessionDescription property is available for the developer to - /// provide a descriptive label for the session. - NSString? get sessionDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_sessionDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +class cssm_acl_entry_info extends ffi.Struct { + external CSSM_ACL_ENTRY_PROTOTYPE EntryPublicInfo; - /// The sessionDescription property is available for the developer to - /// provide a descriptive label for the session. - set sessionDescription(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); - } + @CSSM_ACL_HANDLE() + external int EntryHandle; +} - /// -finishTasksAndInvalidate returns immediately and existing tasks will be allowed - /// to run to completion. New tasks may not be created. The session - /// will continue to make delegate callbacks until URLSession:didBecomeInvalidWithError: - /// has been issued. - /// - /// -finishTasksAndInvalidate and -invalidateAndCancel do not - /// have any effect on the shared session singleton. - /// - /// When invalidating a background session, it is not safe to create another background - /// session with the same identifier until URLSession:didBecomeInvalidWithError: has - /// been issued. - void finishTasksAndInvalidate() { - return _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); - } +typedef CSSM_ACL_HANDLE = CSSM_HANDLE; - /// -invalidateAndCancel acts as -finishTasksAndInvalidate, but issues - /// -cancel to all outstanding tasks for this session. Note task - /// cancellation is subject to the state of the task, and some tasks may - /// have already have completed at the time they are sent -cancel. - void invalidateAndCancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); - } +class cssm_acl_edit extends ffi.Struct { + @CSSM_ACL_EDIT_MODE() + external int EditMode; - /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue if not nil. - void resetWithCompletionHandler_(ObjCBlock16 completionHandler) { - return _lib._objc_msgSend_341( - _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); - } + @CSSM_ACL_HANDLE() + external int OldEntryHandle; - /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue if not nil. - void flushWithCompletionHandler_(ObjCBlock16 completionHandler) { - return _lib._objc_msgSend_341( - _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); - } + external ffi.Pointer NewEntry; +} + +typedef CSSM_ACL_EDIT_MODE = uint32; + +class cssm_func_name_addr extends ffi.Struct { + @ffi.Array.multi([68]) + external ffi.Array Name; - /// invokes completionHandler with outstanding data, upload and download tasks. - void getTasksWithCompletionHandler_(ObjCBlock38 completionHandler) { - return _lib._objc_msgSend_397( - _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); - } + external CSSM_PROC_ADDR Address; +} - /// invokes completionHandler with all outstanding tasks. - void getAllTasksWithCompletionHandler_(ObjCBlock19 completionHandler) { - return _lib._objc_msgSend_398(_id, - _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._id); - } +typedef CSSM_PROC_ADDR = ffi.Pointer>; - /// Creates a data task with the given request. The request may have a body stream. - NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_399( - _id, _lib._sel_dataTaskWithRequest_1, request?._id ?? ffi.nullptr); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } +class cssm_date extends ffi.Struct { + @ffi.Array.multi([4]) + external ffi.Array Year; - /// Creates a data task to retrieve the contents of the given URL. - NSURLSessionDataTask dataTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_400( - _id, _lib._sel_dataTaskWithURL_1, url?._id ?? ffi.nullptr); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([2]) + external ffi.Array Month; - /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( - NSURLRequest? request, NSURL? fileURL) { - final _ret = _lib._objc_msgSend_401( - _id, - _lib._sel_uploadTaskWithRequest_fromFile_1, - request?._id ?? ffi.nullptr, - fileURL?._id ?? ffi.nullptr); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([2]) + external ffi.Array Day; +} - /// Creates an upload task with the given request. The body of the request is provided from the bodyData. - NSURLSessionUploadTask uploadTaskWithRequest_fromData_( - NSURLRequest? request, NSData? bodyData) { - final _ret = _lib._objc_msgSend_402( - _id, - _lib._sel_uploadTaskWithRequest_fromData_1, - request?._id ?? ffi.nullptr, - bodyData?._id ?? ffi.nullptr); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } +class cssm_range extends ffi.Struct { + @uint32() + external int Min; - /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. - NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_403(_id, - _lib._sel_uploadTaskWithStreamedRequest_1, request?._id ?? ffi.nullptr); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int Max; +} - /// Creates a download task with the given request. - NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_405( - _id, _lib._sel_downloadTaskWithRequest_1, request?._id ?? ffi.nullptr); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +class cssm_query_size_data extends ffi.Struct { + @uint32() + external int SizeInputBlock; - /// Creates a download task to download the contents of the given URL. - NSURLSessionDownloadTask downloadTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_406( - _id, _lib._sel_downloadTaskWithURL_1, url?._id ?? ffi.nullptr); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int SizeOutputBlock; +} - /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. - NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData? resumeData) { - final _ret = _lib._objc_msgSend_407(_id, - _lib._sel_downloadTaskWithResumeData_1, resumeData?._id ?? ffi.nullptr); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +class cssm_key_size extends ffi.Struct { + @uint32() + external int LogicalKeySizeInBits; - /// Creates a bidirectional stream task to a given host and port. - NSURLSessionStreamTask streamTaskWithHostName_port_( - NSString? hostname, int port) { - final _ret = _lib._objc_msgSend_410( - _id, - _lib._sel_streamTaskWithHostName_port_1, - hostname?._id ?? ffi.nullptr, - port); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int EffectiveKeySizeInBits; +} - /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. - /// The NSNetService will be resolved before any IO completes. - NSURLSessionStreamTask streamTaskWithNetService_(NSNetService? service) { - final _ret = _lib._objc_msgSend_411( - _id, _lib._sel_streamTaskWithNetService_1, service?._id ?? ffi.nullptr); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } +class cssm_keyheader extends ffi.Struct { + @CSSM_HEADERVERSION() + external int HeaderVersion; - /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. - NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_418( - _id, _lib._sel_webSocketTaskWithURL_1, url?._id ?? ffi.nullptr); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_GUID CspId; - /// Creates a WebSocket task given the url and an array of protocols. The protocols will be used in the WebSocket handshake to - /// negotiate a prefered protocol with the server - /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC - NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( - NSURL? url, NSArray? protocols) { - final _ret = _lib._objc_msgSend_419( - _id, - _lib._sel_webSocketTaskWithURL_protocols_1, - url?._id ?? ffi.nullptr, - protocols?._id ?? ffi.nullptr); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } + @CSSM_KEYBLOB_TYPE() + external int BlobType; - /// Creates a WebSocket task given the request. The request properties can be modified and will be used by the task during the HTTP handshake phase. - /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol - /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. - NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_420( - _id, _lib._sel_webSocketTaskWithRequest_1, request?._id ?? ffi.nullptr); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } + @CSSM_KEYBLOB_FORMAT() + external int Format; - @override - NSURLSession init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } + @CSSM_ALGORITHMS() + external int AlgorithmId; - static NSURLSession new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_new1); - return NSURLSession._(_ret, _lib, retain: false, release: true); - } + @CSSM_KEYCLASS() + external int KeyClass; - /// data task convenience methods. These methods create tasks that - /// bypass the normal delegate calls for response and data delivery, - /// and provide a simple cancelable asynchronous interface to receiving - /// data. Errors will be returned in the NSURLErrorDomain, - /// see . The delegate, if any, will still be - /// called for authentication challenges. - NSURLSessionDataTask dataTaskWithRequest_completionHandler_( - NSURLRequest? request, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_421( - _id, - _lib._sel_dataTaskWithRequest_completionHandler_1, - request?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int LogicalKeySizeInBits; - NSURLSessionDataTask dataTaskWithURL_completionHandler_( - NSURL? url, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_422( - _id, - _lib._sel_dataTaskWithURL_completionHandler_1, - url?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } + @CSSM_KEYATTR_FLAGS() + external int KeyAttr; - /// upload convenience method. - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( - NSURLRequest? request, NSURL? fileURL, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_423( - _id, - _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, - request?._id ?? ffi.nullptr, - fileURL?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + @CSSM_KEYUSE() + external int KeyUsage; - NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( - NSURLRequest? request, NSData? bodyData, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_424( - _id, - _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, - request?._id ?? ffi.nullptr, - bodyData?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_DATE StartDate; - /// download task convenience methods. When a download successfully - /// completes, the NSURL will point to a file that must be read or - /// copied during the invocation of the completion routine. The file - /// will be removed automatically. - NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( - NSURLRequest? request, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_425( - _id, - _lib._sel_downloadTaskWithRequest_completionHandler_1, - request?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_DATE EndDate; - NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( - NSURL? url, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_426( - _id, - _lib._sel_downloadTaskWithURL_completionHandler_1, - url?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } + @CSSM_ALGORITHMS() + external int WrapAlgorithmId; - NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( - NSData? resumeData, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_427( - _id, - _lib._sel_downloadTaskWithResumeData_completionHandler_1, - resumeData?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } + @CSSM_ENCRYPT_MODE() + external int WrapMode; - static NSURLSession alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_alloc1); - return NSURLSession._(_ret, _lib, retain: false, release: true); - } + @uint32() + external int Reserved; } -/// Configuration options for an NSURLSession. When a session is -/// created, a copy of the configuration object is made - you cannot -/// modify the configuration of a session after it has been created. -/// -/// The shared session uses the global singleton credential, cache -/// and cookie storage objects. -/// -/// An ephemeral session has no persistent disk storage for cookies, -/// cache or credentials. -/// -/// A background session can be used to perform networking operations -/// on behalf of a suspended application, within certain constraints. -class NSURLSessionConfiguration extends NSObject { - NSURLSessionConfiguration._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_HEADERVERSION = uint32; +typedef CSSM_KEYBLOB_TYPE = uint32; +typedef CSSM_KEYBLOB_FORMAT = uint32; +typedef CSSM_ALGORITHMS = uint32; +typedef CSSM_KEYCLASS = uint32; +typedef CSSM_KEYATTR_FLAGS = uint32; +typedef CSSM_KEYUSE = uint32; +typedef CSSM_DATE = cssm_date; +typedef CSSM_ENCRYPT_MODE = uint32; - /// Returns a [NSURLSessionConfiguration] that points to the same underlying object as [other]. - static NSURLSessionConfiguration castFrom(T other) { - return NSURLSessionConfiguration._(other._id, other._lib, - retain: true, release: true); - } +class cssm_key extends ffi.Struct { + external CSSM_KEYHEADER KeyHeader; - /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. - static NSURLSessionConfiguration castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionConfiguration._(other, lib, - retain: retain, release: release); - } + external SecAsn1Item KeyData; +} - /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionConfiguration1); - } +typedef CSSM_KEYHEADER = cssm_keyheader; - static NSURLSessionConfiguration? getDefaultSessionConfiguration( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_381(_lib._class_NSURLSessionConfiguration1, - _lib._sel_defaultSessionConfiguration1); - return _ret.address == 0 - ? null - : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +class cssm_dl_db_handle extends ffi.Struct { + @CSSM_DL_HANDLE() + external int DLHandle; - static NSURLSessionConfiguration? getEphemeralSessionConfiguration( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_381(_lib._class_NSURLSessionConfiguration1, - _lib._sel_ephemeralSessionConfiguration1); - return _ret.address == 0 - ? null - : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } + @CSSM_DB_HANDLE() + external int DBHandle; +} - static NSURLSessionConfiguration - backgroundSessionConfigurationWithIdentifier_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_382( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfigurationWithIdentifier_1, - identifier?._id ?? ffi.nullptr); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_DL_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_DB_HANDLE = CSSM_MODULE_HANDLE; - /// identifier for the background session configuration - NSString? get identifier { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_identifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +class cssm_context_attribute extends ffi.Struct { + @CSSM_ATTRIBUTE_TYPE() + external int AttributeType; - /// default cache policy for requests - int get requestCachePolicy { - return _lib._objc_msgSend_355(_id, _lib._sel_requestCachePolicy1); - } + @uint32() + external int AttributeLength; - /// default cache policy for requests - set requestCachePolicy(int value) { - _lib._objc_msgSend_358(_id, _lib._sel_setRequestCachePolicy_1, value); - } + external cssm_context_attribute_value Attribute; +} - /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. - double get timeoutIntervalForRequest { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForRequest1); - } +typedef CSSM_ATTRIBUTE_TYPE = uint32; - /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. - set timeoutIntervalForRequest(double value) { - _lib._objc_msgSend_337( - _id, _lib._sel_setTimeoutIntervalForRequest_1, value); - } +class cssm_context_attribute_value extends ffi.Union { + external ffi.Pointer String; - /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. - double get timeoutIntervalForResource { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForResource1); - } + @uint32() + external int Uint32; - /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. - set timeoutIntervalForResource(double value) { - _lib._objc_msgSend_337( - _id, _lib._sel_setTimeoutIntervalForResource_1, value); - } + external CSSM_ACCESS_CREDENTIALS_PTR AccessCredentials; - /// type of service for requests. - int get networkServiceType { - return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); - } + external CSSM_KEY_PTR Key; - /// type of service for requests. - set networkServiceType(int value) { - _lib._objc_msgSend_359(_id, _lib._sel_setNetworkServiceType_1, value); - } + external CSSM_DATA_PTR Data; - /// allow request to route over cellular. - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } + @CSSM_PADDING() + external int Padding; - /// allow request to route over cellular. - set allowsCellularAccess(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setAllowsCellularAccess_1, value); - } + external CSSM_DATE_PTR Date; - /// allow request to route over expensive networks. Defaults to YES. - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } + external CSSM_RANGE_PTR Range; - /// allow request to route over expensive networks. Defaults to YES. - set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); - } + external CSSM_CRYPTO_DATA_PTR CryptoData; - /// allow request to route over networks in constrained mode. Defaults to YES. - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } + external CSSM_VERSION_PTR Version; - /// allow request to route over networks in constrained mode. Defaults to YES. - set allowsConstrainedNetworkAccess(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); - } + external CSSM_DL_DB_HANDLE_PTR DLDBHandle; - /// Causes tasks to wait for network connectivity to become available, rather - /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) - /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest - /// property does not apply, but the timeoutIntervalForResource property does. - /// - /// Unsatisfactory connectivity (that requires waiting) includes cases where the - /// device has limited or insufficient connectivity for a task (e.g., only has a - /// cellular connection but the allowsCellularAccess property is NO, or requires - /// a VPN connection in order to reach the desired host). - /// - /// Default value is NO. Ignored by background sessions, as background sessions - /// always wait for connectivity. - bool get waitsForConnectivity { - return _lib._objc_msgSend_11(_id, _lib._sel_waitsForConnectivity1); - } + external ffi.Pointer KRProfile; +} - /// Causes tasks to wait for network connectivity to become available, rather - /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) - /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest - /// property does not apply, but the timeoutIntervalForResource property does. - /// - /// Unsatisfactory connectivity (that requires waiting) includes cases where the - /// device has limited or insufficient connectivity for a task (e.g., only has a - /// cellular connection but the allowsCellularAccess property is NO, or requires - /// a VPN connection in order to reach the desired host). - /// - /// Default value is NO. Ignored by background sessions, as background sessions - /// always wait for connectivity. - set waitsForConnectivity(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setWaitsForConnectivity_1, value); - } +typedef CSSM_KEY_PTR = ffi.Pointer; +typedef CSSM_PADDING = uint32; +typedef CSSM_DATE_PTR = ffi.Pointer; +typedef CSSM_RANGE_PTR = ffi.Pointer; +typedef CSSM_CRYPTO_DATA_PTR = ffi.Pointer; +typedef CSSM_VERSION_PTR = ffi.Pointer; +typedef CSSM_DL_DB_HANDLE_PTR = ffi.Pointer; - /// allows background tasks to be scheduled at the discretion of the system for optimal performance. - bool get discretionary { - return _lib._objc_msgSend_11(_id, _lib._sel_isDiscretionary1); - } +class cssm_kr_profile extends ffi.Opaque {} - /// allows background tasks to be scheduled at the discretion of the system for optimal performance. - set discretionary(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setDiscretionary_1, value); - } +class cssm_context extends ffi.Struct { + @CSSM_CONTEXT_TYPE() + external int ContextType; - /// The identifier of the shared data container into which files in background sessions should be downloaded. - /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or - /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. - NSString? get sharedContainerIdentifier { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_sharedContainerIdentifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @CSSM_ALGORITHMS() + external int AlgorithmType; - /// The identifier of the shared data container into which files in background sessions should be downloaded. - /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or - /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. - set sharedContainerIdentifier(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setSharedContainerIdentifier_1, - value?._id ?? ffi.nullptr); - } + @uint32() + external int NumberOfAttributes; - /// Allows the app to be resumed or launched in the background when tasks in background sessions complete - /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: - /// and the default value is YES. - /// - /// NOTE: macOS apps based on AppKit do not support background launch. - bool get sessionSendsLaunchEvents { - return _lib._objc_msgSend_11(_id, _lib._sel_sessionSendsLaunchEvents1); - } + external CSSM_CONTEXT_ATTRIBUTE_PTR ContextAttributes; - /// Allows the app to be resumed or launched in the background when tasks in background sessions complete - /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: - /// and the default value is YES. - /// - /// NOTE: macOS apps based on AppKit do not support background launch. - set sessionSendsLaunchEvents(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); - } + @CSSM_CSP_HANDLE() + external int CSPHandle; - /// The proxy dictionary, as described by - NSDictionary? get connectionProxyDictionary { - final _ret = - _lib._objc_msgSend_180(_id, _lib._sel_connectionProxyDictionary1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } + @CSSM_BOOL() + external int Privileged; - /// The proxy dictionary, as described by - set connectionProxyDictionary(NSDictionary? value) { - _lib._objc_msgSend_360(_id, _lib._sel_setConnectionProxyDictionary_1, - value?._id ?? ffi.nullptr); - } + @uint32() + external int EncryptionProhibited; - /// The minimum allowable versions of the TLS protocol, from - int get TLSMinimumSupportedProtocol { - return _lib._objc_msgSend_383(_id, _lib._sel_TLSMinimumSupportedProtocol1); - } + @uint32() + external int WorkFactor; + + @uint32() + external int Reserved; +} + +typedef CSSM_CONTEXT_TYPE = uint32; +typedef CSSM_CONTEXT_ATTRIBUTE_PTR = ffi.Pointer; +typedef CSSM_CSP_HANDLE = CSSM_MODULE_HANDLE; - /// The minimum allowable versions of the TLS protocol, from - set TLSMinimumSupportedProtocol(int value) { - _lib._objc_msgSend_384( - _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); - } +class cssm_pkcs1_oaep_params extends ffi.Struct { + @uint32() + external int HashAlgorithm; - /// The maximum allowable versions of the TLS protocol, from - int get TLSMaximumSupportedProtocol { - return _lib._objc_msgSend_383(_id, _lib._sel_TLSMaximumSupportedProtocol1); - } + external SecAsn1Item HashParams; - /// The maximum allowable versions of the TLS protocol, from - set TLSMaximumSupportedProtocol(int value) { - _lib._objc_msgSend_384( - _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); - } + @CSSM_PKCS_OAEP_MGF() + external int MGF; - /// The minimum allowable versions of the TLS protocol, from - int get TLSMinimumSupportedProtocolVersion { - return _lib._objc_msgSend_385( - _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); - } + external SecAsn1Item MGFParams; - /// The minimum allowable versions of the TLS protocol, from - set TLSMinimumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_386( - _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); - } + @CSSM_PKCS_OAEP_PSOURCE() + external int PSource; - /// The maximum allowable versions of the TLS protocol, from - int get TLSMaximumSupportedProtocolVersion { - return _lib._objc_msgSend_385( - _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); - } + external SecAsn1Item PSourceParams; +} - /// The maximum allowable versions of the TLS protocol, from - set TLSMaximumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_386( - _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); - } +typedef CSSM_PKCS_OAEP_MGF = uint32; +typedef CSSM_PKCS_OAEP_PSOURCE = uint32; - /// Allow the use of HTTP pipelining - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); - } +class cssm_csp_operational_statistics extends ffi.Struct { + @CSSM_BOOL() + external int UserAuthenticated; - /// Allow the use of HTTP pipelining - set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); - } + @CSSM_CSP_FLAGS() + external int DeviceFlags; - /// Allow the session to set cookies on requests - bool get HTTPShouldSetCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldSetCookies1); - } + @uint32() + external int TokenMaxSessionCount; - /// Allow the session to set cookies on requests - set HTTPShouldSetCookies(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldSetCookies_1, value); - } + @uint32() + external int TokenOpenedSessionCount; - /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. - int get HTTPCookieAcceptPolicy { - return _lib._objc_msgSend_369(_id, _lib._sel_HTTPCookieAcceptPolicy1); - } + @uint32() + external int TokenMaxRWSessionCount; - /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. - set HTTPCookieAcceptPolicy(int value) { - _lib._objc_msgSend_370(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); - } + @uint32() + external int TokenOpenedRWSessionCount; - /// Specifies additional headers which will be set on outgoing requests. - /// Note that these headers are added to the request only if not already present. - NSDictionary? get HTTPAdditionalHeaders { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_HTTPAdditionalHeaders1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int TokenTotalPublicMem; - /// Specifies additional headers which will be set on outgoing requests. - /// Note that these headers are added to the request only if not already present. - set HTTPAdditionalHeaders(NSDictionary? value) { - _lib._objc_msgSend_360( - _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); - } + @uint32() + external int TokenFreePublicMem; - /// The maximum number of simultanous persistent connections per host - int get HTTPMaximumConnectionsPerHost { - return _lib._objc_msgSend_81(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); - } + @uint32() + external int TokenTotalPrivateMem; - /// The maximum number of simultanous persistent connections per host - set HTTPMaximumConnectionsPerHost(int value) { - _lib._objc_msgSend_342( - _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); - } + @uint32() + external int TokenFreePrivateMem; +} - /// The cookie storage object to use, or nil to indicate that no cookies should be handled - NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _lib._objc_msgSend_364(_id, _lib._sel_HTTPCookieStorage1); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_CSP_FLAGS = uint32; - /// The cookie storage object to use, or nil to indicate that no cookies should be handled - set HTTPCookieStorage(NSHTTPCookieStorage? value) { - _lib._objc_msgSend_387( - _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); - } +class cssm_pkcs5_pbkdf1_params extends ffi.Struct { + external SecAsn1Item Passphrase; - /// The credential storage object, or nil to indicate that no credential storage is to be used - NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _lib._objc_msgSend_388(_id, _lib._sel_URLCredentialStorage1); - return _ret.address == 0 - ? null - : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); - } + external SecAsn1Item InitVector; +} - /// The credential storage object, or nil to indicate that no credential storage is to be used - set URLCredentialStorage(NSURLCredentialStorage? value) { - _lib._objc_msgSend_389( - _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); - } +class cssm_pkcs5_pbkdf2_params extends ffi.Struct { + external SecAsn1Item Passphrase; - /// The URL resource cache, or nil to indicate that no caching is to be performed - NSURLCache? get URLCache { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_URLCache1); - return _ret.address == 0 - ? null - : NSURLCache._(_ret, _lib, retain: true, release: true); - } + @CSSM_PKCS5_PBKDF2_PRF() + external int PseudoRandomFunction; +} - /// The URL resource cache, or nil to indicate that no caching is to be performed - set URLCache(NSURLCache? value) { - _lib._objc_msgSend_391( - _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); - } +typedef CSSM_PKCS5_PBKDF2_PRF = uint32; - /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open - /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) - bool get shouldUseExtendedBackgroundIdleMode { - return _lib._objc_msgSend_11( - _id, _lib._sel_shouldUseExtendedBackgroundIdleMode1); - } +class cssm_kea_derive_params extends ffi.Struct { + external SecAsn1Item Rb; - /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open - /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) - set shouldUseExtendedBackgroundIdleMode(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); - } + external SecAsn1Item Yb; +} - /// An optional array of Class objects which subclass NSURLProtocol. - /// The Class will be sent +canInitWithRequest: when determining if - /// an instance of the class can be used for a given URL scheme. - /// You should not use +[NSURLProtocol registerClass:], as that - /// method will register your class with the default session rather - /// than with an instance of NSURLSession. - /// Custom NSURLProtocol subclasses are not available to background - /// sessions. - NSArray? get protocolClasses { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_protocolClasses1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +class cssm_tp_authority_id extends ffi.Struct { + external ffi.Pointer AuthorityCert; - /// An optional array of Class objects which subclass NSURLProtocol. - /// The Class will be sent +canInitWithRequest: when determining if - /// an instance of the class can be used for a given URL scheme. - /// You should not use +[NSURLProtocol registerClass:], as that - /// method will register your class with the default session rather - /// than with an instance of NSURLSession. - /// Custom NSURLProtocol subclasses are not available to background - /// sessions. - set protocolClasses(NSArray? value) { - _lib._objc_msgSend_392( - _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); - } + external CSSM_NET_ADDRESS_PTR AuthorityLocation; +} - /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone - int get multipathServiceType { - return _lib._objc_msgSend_393(_id, _lib._sel_multipathServiceType1); - } +typedef CSSM_NET_ADDRESS_PTR = ffi.Pointer; - /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone - set multipathServiceType(int value) { - _lib._objc_msgSend_394(_id, _lib._sel_setMultipathServiceType_1, value); - } +class cssm_field extends ffi.Struct { + external SecAsn1Oid FieldOid; - @override - NSURLSessionConfiguration init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } + external SecAsn1Item FieldValue; +} - static NSURLSessionConfiguration new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionConfiguration1, _lib._sel_new1); - return NSURLSessionConfiguration._(_ret, _lib, - retain: false, release: true); - } +class cssm_tp_policyinfo extends ffi.Struct { + @uint32() + external int NumberOfPolicyIds; - static NSURLSessionConfiguration backgroundSessionConfiguration_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_382( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfiguration_1, - identifier?._id ?? ffi.nullptr); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } + external CSSM_FIELD_PTR PolicyIds; - static NSURLSessionConfiguration alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); - return NSURLSessionConfiguration._(_ret, _lib, - retain: false, release: true); - } + external ffi.Pointer PolicyControl; } -class NSURLCredentialStorage extends _ObjCWrapper { - NSURLCredentialStorage._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLCredentialStorage] that points to the same underlying object as [other]. - static NSURLCredentialStorage castFrom(T other) { - return NSURLCredentialStorage._(other._id, other._lib, - retain: true, release: true); - } +typedef CSSM_FIELD_PTR = ffi.Pointer; - /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. - static NSURLCredentialStorage castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCredentialStorage._(other, lib, - retain: retain, release: release); - } +class cssm_dl_db_list extends ffi.Struct { + @uint32() + external int NumHandles; - /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLCredentialStorage1); - } + external CSSM_DL_DB_HANDLE_PTR DLDBHandle; } -class NSURLCache extends _ObjCWrapper { - NSURLCache._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +class cssm_tp_callerauth_context extends ffi.Struct { + external CSSM_TP_POLICYINFO Policy; - /// Returns a [NSURLCache] that points to the same underlying object as [other]. - static NSURLCache castFrom(T other) { - return NSURLCache._(other._id, other._lib, retain: true, release: true); - } + external CSSM_TIMESTRING VerifyTime; - /// Returns a [NSURLCache] that wraps the given raw object pointer. - static NSURLCache castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCache._(other, lib, retain: retain, release: release); - } + @CSSM_TP_STOP_ON() + external int VerificationAbortOn; - /// Returns whether [obj] is an instance of [NSURLCache]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); - } -} + external CSSM_TP_VERIFICATION_RESULTS_CALLBACK CallbackWithVerifiedCert; -/// ! -/// @enum NSURLSessionMultipathServiceType -/// -/// @discussion The NSURLSessionMultipathServiceType enum defines constants that -/// can be used to specify the multipath service type to associate an NSURLSession. The -/// multipath service type determines whether multipath TCP should be attempted and the conditions -/// for creating and switching between subflows. Using these service types requires the appropriate entitlement. Any connection attempt will fail if the process does not have the required entitlement. -/// A primary interface is a generally less expensive interface in terms of both cost and power (such as WiFi or ethernet). A secondary interface is more expensive (such as 3G or LTE). -/// -/// @constant NSURLSessionMultipathServiceTypeNone Specifies that multipath tcp should not be used. Connections will use a single flow. -/// This is the default value. No entitlement is required to set this value. -/// -/// @constant NSURLSessionMultipathServiceTypeHandover Specifies that a secondary subflow should only be used -/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entilement. -/// -/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secodary subflow should be used if the -/// primary subflow is not performing adequately (packet loss, high round trip times, bandwidth issues). The secondary -/// subflow will be created more aggressively than with NSURLSessionMultipathServiceTypeHandover. Requires the com.apple.developer.networking.multipath entitlement. -/// -/// @constant NSURLSessionMultipathServiceTypeAggregate Specifies that multiple subflows across multiple interfaces should be -/// used for better bandwidth. This mode is only available for experimentation on devices configured for development use. -/// It can be enabled in the Developer section of the Settings app. -abstract class NSURLSessionMultipathServiceType { - /// None - no multipath (default) - static const int NSURLSessionMultipathServiceTypeNone = 0; + @uint32() + external int NumberOfAnchorCerts; - /// Handover - secondary flows brought up when primary flow is not performing adequately. - static const int NSURLSessionMultipathServiceTypeHandover = 1; + external CSSM_DATA_PTR AnchorCerts; - /// Interactive - secondary flows created more aggressively. - static const int NSURLSessionMultipathServiceTypeInteractive = 2; + external CSSM_DL_DB_LIST_PTR DBList; - /// Aggregate - multiple subflows used for greater bandwitdh. - static const int NSURLSessionMultipathServiceTypeAggregate = 3; + external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } -void _ObjCBlock38_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} +typedef CSSM_TP_POLICYINFO = cssm_tp_policyinfo; +typedef CSSM_TIMESTRING = ffi.Pointer; +typedef CSSM_TP_STOP_ON = uint32; +typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACK = ffi.Pointer< + ffi.NativeFunction< + CSSM_RETURN Function( + CSSM_MODULE_HANDLE, ffi.Pointer, CSSM_DATA_PTR)>>; +typedef CSSM_DL_DB_LIST_PTR = ffi.Pointer; -final _ObjCBlock38_closureRegistry = {}; -int _ObjCBlock38_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock38_registerClosure(Function fn) { - final id = ++_ObjCBlock38_closureRegistryIndex; - _ObjCBlock38_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +class cssm_encoded_crl extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; -void _ObjCBlock38_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock38_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); + @CSSM_CRL_ENCODING() + external int CrlEncoding; + + external SecAsn1Item CrlBlob; } -class ObjCBlock38 extends _ObjCBlockBase { - ObjCBlock38._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_CRL_TYPE = uint32; +typedef CSSM_CRL_ENCODING = uint32; - /// Creates a block from a C function pointer. - ObjCBlock38.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock38_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class cssm_parsed_crl extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; - /// Creates a block from a Dart function. - ObjCBlock38.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock38_closureTrampoline) - .cast(), - _ObjCBlock38_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + @CSSM_CRL_PARSE_FORMAT() + external int ParsedCrlFormat; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external ffi.Pointer ParsedCrl; } -/// An NSURLSessionDataTask does not provide any additional -/// functionality over an NSURLSessionTask and its presence is merely -/// to provide lexical differentiation from download and upload tasks. -class NSURLSessionDataTask extends NSURLSessionTask { - NSURLSessionDataTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_CRL_PARSE_FORMAT = uint32; - /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. - static NSURLSessionDataTask castFrom(T other) { - return NSURLSessionDataTask._(other._id, other._lib, - retain: true, release: true); - } +class cssm_crl_pair extends ffi.Struct { + external CSSM_ENCODED_CRL EncodedCrl; - /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. - static NSURLSessionDataTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDataTask._(other, lib, retain: retain, release: release); - } + external CSSM_PARSED_CRL ParsedCrl; +} - /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionDataTask1); - } +typedef CSSM_ENCODED_CRL = cssm_encoded_crl; +typedef CSSM_PARSED_CRL = cssm_parsed_crl; - @override - NSURLSessionDataTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } +class cssm_crlgroup extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; - static NSURLSessionDataTask new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); - } + @CSSM_CRL_ENCODING() + external int CrlEncoding; - static NSURLSessionDataTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); - } + @uint32() + external int NumberOfCrls; + + external UnnamedUnion4 GroupCrlList; + + @CSSM_CRLGROUP_TYPE() + external int CrlGroupType; } -/// An NSURLSessionUploadTask does not currently provide any additional -/// functionality over an NSURLSessionDataTask. All delegate messages -/// that may be sent referencing an NSURLSessionDataTask equally apply -/// to NSURLSessionUploadTasks. -class NSURLSessionUploadTask extends NSURLSessionDataTask { - NSURLSessionUploadTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +class UnnamedUnion4 extends ffi.Union { + external CSSM_DATA_PTR CrlList; - /// Returns a [NSURLSessionUploadTask] that points to the same underlying object as [other]. - static NSURLSessionUploadTask castFrom(T other) { - return NSURLSessionUploadTask._(other._id, other._lib, - retain: true, release: true); - } + external CSSM_ENCODED_CRL_PTR EncodedCrlList; - /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. - static NSURLSessionUploadTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionUploadTask._(other, lib, - retain: retain, release: release); - } + external CSSM_PARSED_CRL_PTR ParsedCrlList; + + external CSSM_CRL_PAIR_PTR PairCrlList; +} - /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionUploadTask1); - } +typedef CSSM_ENCODED_CRL_PTR = ffi.Pointer; +typedef CSSM_PARSED_CRL_PTR = ffi.Pointer; +typedef CSSM_CRL_PAIR_PTR = ffi.Pointer; +typedef CSSM_CRLGROUP_TYPE = uint32; - @override - NSURLSessionUploadTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } +class cssm_fieldgroup extends ffi.Struct { + @ffi.Int() + external int NumberOfFields; - static NSURLSessionUploadTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionUploadTask1, _lib._sel_new1); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } + external CSSM_FIELD_PTR Fields; +} - static NSURLSessionUploadTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionUploadTask1, _lib._sel_alloc1); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } +class cssm_evidence extends ffi.Struct { + @CSSM_EVIDENCE_FORM() + external int EvidenceForm; + + external ffi.Pointer Evidence; } -/// NSURLSessionDownloadTask is a task that represents a download to -/// local storage. -class NSURLSessionDownloadTask extends NSURLSessionTask { - NSURLSessionDownloadTask._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_EVIDENCE_FORM = uint32; - /// Returns a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. - static NSURLSessionDownloadTask castFrom(T other) { - return NSURLSessionDownloadTask._(other._id, other._lib, - retain: true, release: true); - } +class cssm_tp_verify_context extends ffi.Struct { + @CSSM_TP_ACTION() + external int Action; - /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. - static NSURLSessionDownloadTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDownloadTask._(other, lib, - retain: retain, release: release); - } + external SecAsn1Item ActionData; - /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionDownloadTask1); - } + external CSSM_CRLGROUP Crls; - /// Cancel the download (and calls the superclass -cancel). If - /// conditions will allow for resuming the download in the future, the - /// callback will be called with an opaque data blob, which may be used - /// with -downloadTaskWithResumeData: to attempt to resume the download. - /// If resume data cannot be created, the completion handler will be - /// called with nil resumeData. - void cancelByProducingResumeData_(ObjCBlock39 completionHandler) { - return _lib._objc_msgSend_404( - _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); - } + external CSSM_TP_CALLERAUTH_CONTEXT_PTR Cred; +} - @override - NSURLSessionDownloadTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_TP_ACTION = uint32; +typedef CSSM_CRLGROUP = cssm_crlgroup; +typedef CSSM_TP_CALLERAUTH_CONTEXT_PTR + = ffi.Pointer; - static NSURLSessionDownloadTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_new1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); - } +class cssm_tp_verify_context_result extends ffi.Struct { + @uint32() + external int NumberOfEvidences; - static NSURLSessionDownloadTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_alloc1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); - } + external CSSM_EVIDENCE_PTR Evidence; } -void _ObjCBlock39_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); +typedef CSSM_EVIDENCE_PTR = ffi.Pointer; + +class cssm_tp_request_set extends ffi.Struct { + @uint32() + external int NumberOfRequests; + + external ffi.Pointer Requests; } -final _ObjCBlock39_closureRegistry = {}; -int _ObjCBlock39_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock39_registerClosure(Function fn) { - final id = ++_ObjCBlock39_closureRegistryIndex; - _ObjCBlock39_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +class cssm_tp_result_set extends ffi.Struct { + @uint32() + external int NumberOfResults; + + external ffi.Pointer Results; } -void _ObjCBlock39_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock39_closureRegistry[block.ref.target.address]!(arg0); +class cssm_tp_confirm_response extends ffi.Struct { + @uint32() + external int NumberOfResponses; + + external CSSM_TP_CONFIRM_STATUS_PTR Responses; } -class ObjCBlock39 extends _ObjCBlockBase { - ObjCBlock39._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_TP_CONFIRM_STATUS_PTR = ffi.Pointer; - /// Creates a block from a C function pointer. - ObjCBlock39.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock39_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class cssm_tp_certissue_input extends ffi.Struct { + external CSSM_SUBSERVICE_UID CSPSubserviceUid; - /// Creates a block from a Dart function. - ObjCBlock39.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock39_closureTrampoline) - .cast(), - _ObjCBlock39_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } + @CSSM_CL_HANDLE() + external int CLHandle; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @uint32() + external int NumberOfTemplateFields; -/// An NSURLSessionStreamTask provides an interface to perform reads -/// and writes to a TCP/IP stream created via NSURLSession. This task -/// may be explicitly created from an NSURLSession, or created as a -/// result of the appropriate disposition response to a -/// -URLSession:dataTask:didReceiveResponse: delegate message. -/// -/// NSURLSessionStreamTask can be used to perform asynchronous reads -/// and writes. Reads and writes are enquened and executed serially, -/// with the completion handler being invoked on the sessions delegate -/// queuee. If an error occurs, or the task is canceled, all -/// outstanding read and write calls will have their completion -/// handlers invoked with an appropriate error. -/// -/// It is also possible to create NSInputStream and NSOutputStream -/// instances from an NSURLSessionTask by sending -/// -captureStreams to the task. All outstanding read and writess are -/// completed before the streams are created. Once the streams are -/// delivered to the session delegate, the task is considered complete -/// and will receive no more messsages. These streams are -/// disassociated from the underlying session. -class NSURLSessionStreamTask extends NSURLSessionTask { - NSURLSessionStreamTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + external CSSM_FIELD_PTR SubjectCertFields; - /// Returns a [NSURLSessionStreamTask] that points to the same underlying object as [other]. - static NSURLSessionStreamTask castFrom(T other) { - return NSURLSessionStreamTask._(other._id, other._lib, - retain: true, release: true); - } + @CSSM_TP_SERVICES() + external int MoreServiceRequests; - /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. - static NSURLSessionStreamTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionStreamTask._(other, lib, - retain: retain, release: release); - } + @uint32() + external int NumberOfServiceControls; - /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionStreamTask1); - } + external CSSM_FIELD_PTR ServiceControls; - /// Read minBytes, or at most maxBytes bytes and invoke the completion - /// handler on the sessions delegate queue with the data or an error. - /// If an error occurs, any outstanding reads will also fail, and new - /// read requests will error out immediately. - void readDataOfMinLength_maxLength_timeout_completionHandler_(int minBytes, - int maxBytes, double timeout, ObjCBlock40 completionHandler) { - return _lib._objc_msgSend_408( - _id, - _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, - minBytes, - maxBytes, - timeout, - completionHandler._id); - } + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; +} - /// Write the data completely to the underlying socket. If all the - /// bytes have not been written by the timeout, a timeout error will - /// occur. Note that invocation of the completion handler does not - /// guarantee that the remote side has received all the bytes, only - /// that they have been written to the kernel. - void writeData_timeout_completionHandler_( - NSData? data, double timeout, ObjCBlock41 completionHandler) { - return _lib._objc_msgSend_409( - _id, - _lib._sel_writeData_timeout_completionHandler_1, - data?._id ?? ffi.nullptr, - timeout, - completionHandler._id); - } +typedef CSSM_TP_SERVICES = uint32; - /// -captureStreams completes any already enqueued reads - /// and writes, and then invokes the - /// URLSession:streamTask:didBecomeInputStream:outputStream: delegate - /// message. When that message is received, the task object is - /// considered completed and will not receive any more delegate - /// messages. - void captureStreams() { - return _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); - } +class cssm_tp_certissue_output extends ffi.Struct { + @CSSM_TP_CERTISSUE_STATUS() + external int IssueStatus; - /// Enqueue a request to close the write end of the underlying socket. - /// All outstanding IO will complete before the write side of the - /// socket is closed. The server, however, may continue to write bytes - /// back to the client, so best practice is to continue reading from - /// the server until you receive EOF. - void closeWrite() { - return _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); - } + external CSSM_CERTGROUP_PTR CertGroup; - /// Enqueue a request to close the read side of the underlying socket. - /// All outstanding IO will complete before the read side is closed. - /// You may continue writing to the server. - void closeRead() { - return _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); - } + @CSSM_TP_SERVICES() + external int PerformedServiceRequests; +} - /// Begin encrypted handshake. The hanshake begins after all pending - /// IO has completed. TLS authentication callbacks are sent to the - /// session's -URLSession:task:didReceiveChallenge:completionHandler: - void startSecureConnection() { - return _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); - } +typedef CSSM_TP_CERTISSUE_STATUS = uint32; +typedef CSSM_CERTGROUP_PTR = ffi.Pointer; - /// Cleanly close a secure connection after all pending secure IO has - /// completed. - /// - /// @warning This API is non-functional. - void stopSecureConnection() { - return _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); - } +class cssm_tp_certchange_input extends ffi.Struct { + @CSSM_TP_CERTCHANGE_ACTION() + external int Action; - @override - NSURLSessionStreamTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } + @CSSM_TP_CERTCHANGE_REASON() + external int Reason; - static NSURLSessionStreamTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionStreamTask1, _lib._sel_new1); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); - } + @CSSM_CL_HANDLE() + external int CLHandle; - static NSURLSessionStreamTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); - } -} + external CSSM_DATA_PTR Cert; -void _ObjCBlock40_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + external CSSM_FIELD_PTR ChangeInfo; -final _ObjCBlock40_closureRegistry = {}; -int _ObjCBlock40_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock40_registerClosure(Function fn) { - final id = ++_ObjCBlock40_closureRegistryIndex; - _ObjCBlock40_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + external CSSM_TIMESTRING StartTime; + + external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } -void _ObjCBlock40_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _ObjCBlock40_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +typedef CSSM_TP_CERTCHANGE_ACTION = uint32; +typedef CSSM_TP_CERTCHANGE_REASON = uint32; + +class cssm_tp_certchange_output extends ffi.Struct { + @CSSM_TP_CERTCHANGE_STATUS() + external int ActionStatus; + + external CSSM_FIELD RevokeInfo; } -class ObjCBlock40 extends _ObjCBlockBase { - ObjCBlock40._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_TP_CERTCHANGE_STATUS = uint32; +typedef CSSM_FIELD = cssm_field; - /// Creates a block from a C function pointer. - ObjCBlock40.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock40_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class cssm_tp_certverify_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; - /// Creates a block from a Dart function. - ObjCBlock40.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock40_closureTrampoline) - .cast(), - _ObjCBlock40_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + external CSSM_DATA_PTR Cert; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CSSM_TP_VERIFY_CONTEXT_PTR VerifyContext; } -void _ObjCBlock41_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} +typedef CSSM_TP_VERIFY_CONTEXT_PTR = ffi.Pointer; -final _ObjCBlock41_closureRegistry = {}; -int _ObjCBlock41_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock41_registerClosure(Function fn) { - final id = ++_ObjCBlock41_closureRegistryIndex; - _ObjCBlock41_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +class cssm_tp_certverify_output extends ffi.Struct { + @CSSM_TP_CERTVERIFY_STATUS() + external int VerifyStatus; -void _ObjCBlock41_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock41_closureRegistry[block.ref.target.address]!(arg0); + @uint32() + external int NumberOfEvidence; + + external CSSM_EVIDENCE_PTR Evidence; } -class ObjCBlock41 extends _ObjCBlockBase { - ObjCBlock41._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_TP_CERTVERIFY_STATUS = uint32; - /// Creates a block from a C function pointer. - ObjCBlock41.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock41_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class cssm_tp_certnotarize_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; - /// Creates a block from a Dart function. - ObjCBlock41.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock41_closureTrampoline) - .cast(), - _ObjCBlock41_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } + @uint32() + external int NumberOfFields; + + external CSSM_FIELD_PTR MoreFields; + + external CSSM_FIELD_PTR SignScope; + + @uint32() + external int ScopeSize; + + @CSSM_TP_SERVICES() + external int MoreServiceRequests; + + @uint32() + external int NumberOfServiceControls; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + external CSSM_FIELD_PTR ServiceControls; -class NSNetService extends _ObjCWrapper { - NSNetService._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; +} - /// Returns a [NSNetService] that points to the same underlying object as [other]. - static NSNetService castFrom(T other) { - return NSNetService._(other._id, other._lib, retain: true, release: true); - } +class cssm_tp_certnotarize_output extends ffi.Struct { + @CSSM_TP_CERTNOTARIZE_STATUS() + external int NotarizeStatus; - /// Returns a [NSNetService] that wraps the given raw object pointer. - static NSNetService castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNetService._(other, lib, retain: retain, release: release); - } + external CSSM_CERTGROUP_PTR NotarizedCertGroup; - /// Returns whether [obj] is an instance of [NSNetService]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNetService1); - } + @CSSM_TP_SERVICES() + external int PerformedServiceRequests; } -/// A WebSocket task can be created with a ws or wss url. A client can also provide -/// a list of protocols it wishes to advertise during the WebSocket handshake phase. -/// Once the handshake is successfully completed the client will be notified through an optional delegate. -/// All reads and writes enqueued before the completion of the handshake will be queued up and -/// executed once the hanshake succeeds. Before the handshake completes, the client can be called to handle -/// redirection or authentication using the same delegates as NSURLSessionTask. WebSocket task will also provide -/// support for cookies and will store cookies to the cookie storage on the session and will attach cookies to -/// outgoing HTTP handshake requests. -class NSURLSessionWebSocketTask extends NSURLSessionTask { - NSURLSessionWebSocketTask._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. - static NSURLSessionWebSocketTask castFrom(T other) { - return NSURLSessionWebSocketTask._(other._id, other._lib, - retain: true, release: true); - } +typedef CSSM_TP_CERTNOTARIZE_STATUS = uint32; - /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. - static NSURLSessionWebSocketTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionWebSocketTask._(other, lib, - retain: retain, release: release); - } +class cssm_tp_certreclaim_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionWebSocketTask1); - } + @uint32() + external int NumberOfSelectionFields; - /// Sends a WebSocket message. If an error occurs, any outstanding work will also fail. - /// Note that invocation of the completion handler does not - /// guarantee that the remote side has received all the bytes, only - /// that they have been written to the kernel. - void sendMessage_completionHandler_( - NSURLSessionWebSocketMessage? message, ObjCBlock41 completionHandler) { - return _lib._objc_msgSend_413( - _id, - _lib._sel_sendMessage_completionHandler_1, - message?._id ?? ffi.nullptr, - completionHandler._id); - } + external CSSM_FIELD_PTR SelectionFields; - /// Reads a WebSocket message once all the frames of the message are available. - /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out - /// and all outstanding work will also fail resulting in the end of the task. - void receiveMessageWithCompletionHandler_(ObjCBlock42 completionHandler) { - return _lib._objc_msgSend_414(_id, - _lib._sel_receiveMessageWithCompletionHandler_1, completionHandler._id); - } + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; +} - /// Sends a ping frame from the client side. The pongReceiveHandler is invoked when the client - /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving - /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. - /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. - void sendPingWithPongReceiveHandler_(ObjCBlock41 pongReceiveHandler) { - return _lib._objc_msgSend_415(_id, - _lib._sel_sendPingWithPongReceiveHandler_1, pongReceiveHandler._id); - } +class cssm_tp_certreclaim_output extends ffi.Struct { + @CSSM_TP_CERTRECLAIM_STATUS() + external int ReclaimStatus; - /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. - /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. - void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { - return _lib._objc_msgSend_416(_id, _lib._sel_cancelWithCloseCode_reason_1, - closeCode, reason?._id ?? ffi.nullptr); - } + external CSSM_CERTGROUP_PTR ReclaimedCertGroup; - /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Recieve calls will error out if this value is reached - int get maximumMessageSize { - return _lib._objc_msgSend_81(_id, _lib._sel_maximumMessageSize1); - } + @CSSM_LONG_HANDLE() + external int KeyCacheHandle; +} - /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Recieve calls will error out if this value is reached - set maximumMessageSize(int value) { - _lib._objc_msgSend_342(_id, _lib._sel_setMaximumMessageSize_1, value); - } +typedef CSSM_TP_CERTRECLAIM_STATUS = uint32; +typedef CSSM_LONG_HANDLE = uint64; +typedef uint64 = ffi.Uint64; - /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid - int get closeCode { - return _lib._objc_msgSend_417(_id, _lib._sel_closeCode1); - } +class cssm_tp_crlissue_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; - /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running - NSData? get closeReason { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_closeReason1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int CrlIdentifier; - @override - NSURLSessionWebSocketTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_TIMESTRING CrlThisTime; - static NSURLSessionWebSocketTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_new1); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); - } + external CSSM_FIELD_PTR PolicyIdentifier; - static NSURLSessionWebSocketTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_alloc1); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); - } + external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } -/// The client can create a WebSocket message object that will be passed to the send calls -/// and will be delivered from the receive calls. The message can be initialized with data or string. -/// If initialized with data, the string property will be nil and vice versa. -class NSURLSessionWebSocketMessage extends NSObject { - NSURLSessionWebSocketMessage._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +class cssm_tp_crlissue_output extends ffi.Struct { + @CSSM_TP_CRLISSUE_STATUS() + external int IssueStatus; - /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. - static NSURLSessionWebSocketMessage castFrom( - T other) { - return NSURLSessionWebSocketMessage._(other._id, other._lib, - retain: true, release: true); - } + external CSSM_ENCODED_CRL_PTR Crl; - /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. - static NSURLSessionWebSocketMessage castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionWebSocketMessage._(other, lib, - retain: retain, release: release); - } + external CSSM_TIMESTRING CrlNextTime; +} - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionWebSocketMessage1); - } +typedef CSSM_TP_CRLISSUE_STATUS = uint32; - /// Create a message with data type - NSURLSessionWebSocketMessage initWithData_(NSData? data) { - final _ret = _lib._objc_msgSend_217( - _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } +class cssm_cert_bundle_header extends ffi.Struct { + @CSSM_CERT_BUNDLE_TYPE() + external int BundleType; - /// Create a message with string type - NSURLSessionWebSocketMessage initWithString_(NSString? string) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, string?._id ?? ffi.nullptr); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } + @CSSM_CERT_BUNDLE_ENCODING() + external int BundleEncoding; +} - int get type { - return _lib._objc_msgSend_412(_id, _lib._sel_type1); - } +typedef CSSM_CERT_BUNDLE_TYPE = uint32; +typedef CSSM_CERT_BUNDLE_ENCODING = uint32; - NSData? get data { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } +class cssm_cert_bundle extends ffi.Struct { + external CSSM_CERT_BUNDLE_HEADER BundleHeader; - NSString? get string { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + external SecAsn1Item Bundle; +} - @override - NSURLSessionWebSocketMessage init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } +typedef CSSM_CERT_BUNDLE_HEADER = cssm_cert_bundle_header; - static NSURLSessionWebSocketMessage new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_new1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); - } +class cssm_db_attribute_info extends ffi.Struct { + @CSSM_DB_ATTRIBUTE_NAME_FORMAT() + external int AttributeNameFormat; - static NSURLSessionWebSocketMessage alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_alloc1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); - } -} + external cssm_db_attribute_label Label; -abstract class NSURLSessionWebSocketMessageType { - static const int NSURLSessionWebSocketMessageTypeData = 0; - static const int NSURLSessionWebSocketMessageTypeString = 1; + @CSSM_DB_ATTRIBUTE_FORMAT() + external int AttributeFormat; } -void _ObjCBlock42_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} +typedef CSSM_DB_ATTRIBUTE_NAME_FORMAT = uint32; -final _ObjCBlock42_closureRegistry = {}; -int _ObjCBlock42_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock42_registerClosure(Function fn) { - final id = ++_ObjCBlock42_closureRegistryIndex; - _ObjCBlock42_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +class cssm_db_attribute_label extends ffi.Union { + external ffi.Pointer AttributeName; -void _ObjCBlock42_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock42_closureRegistry[block.ref.target.address]!(arg0, arg1); + external SecAsn1Oid AttributeOID; + + @uint32() + external int AttributeID; } -class ObjCBlock42 extends _ObjCBlockBase { - ObjCBlock42._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_DB_ATTRIBUTE_FORMAT = uint32; - /// Creates a block from a C function pointer. - ObjCBlock42.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock42_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class cssm_db_attribute_data extends ffi.Struct { + external CSSM_DB_ATTRIBUTE_INFO Info; - /// Creates a block from a Dart function. - ObjCBlock42.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock42_closureTrampoline) - .cast(), - _ObjCBlock42_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + @uint32() + external int NumberOfValues; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CSSM_DATA_PTR Value; } -/// The WebSocket close codes follow the close codes given in the RFC -abstract class NSURLSessionWebSocketCloseCode { - static const int NSURLSessionWebSocketCloseCodeInvalid = 0; - static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; - static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; - static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; - static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; - static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; - static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; - static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; - static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; - static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; - static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = - 1010; - static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; - static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; -} +typedef CSSM_DB_ATTRIBUTE_INFO = cssm_db_attribute_info; -void _ObjCBlock43_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} +class cssm_db_record_attribute_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; -final _ObjCBlock43_closureRegistry = {}; -int _ObjCBlock43_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock43_registerClosure(Function fn) { - final id = ++_ObjCBlock43_closureRegistryIndex; - _ObjCBlock43_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @uint32() + external int NumberOfAttributes; -void _ObjCBlock43_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock43_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); + external CSSM_DB_ATTRIBUTE_INFO_PTR AttributeInfo; } -class ObjCBlock43 extends _ObjCBlockBase { - ObjCBlock43._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_DB_RECORDTYPE = uint32; +typedef CSSM_DB_ATTRIBUTE_INFO_PTR = ffi.Pointer; - /// Creates a block from a C function pointer. - ObjCBlock43.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock43_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class cssm_db_record_attribute_data extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; - /// Creates a block from a Dart function. - ObjCBlock43.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock43_closureTrampoline) - .cast(), - _ObjCBlock43_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + @uint32() + external int SemanticInformation; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @uint32() + external int NumberOfAttributes; -void _ObjCBlock44_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); + external CSSM_DB_ATTRIBUTE_DATA_PTR AttributeData; } -final _ObjCBlock44_closureRegistry = {}; -int _ObjCBlock44_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock44_registerClosure(Function fn) { - final id = ++_ObjCBlock44_closureRegistryIndex; - _ObjCBlock44_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +typedef CSSM_DB_ATTRIBUTE_DATA_PTR = ffi.Pointer; -void _ObjCBlock44_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock44_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +class cssm_db_parsing_module_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int RecordType; + + external CSSM_SUBSERVICE_UID ModuleSubserviceUid; } -class ObjCBlock44 extends _ObjCBlockBase { - ObjCBlock44._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class cssm_db_index_info extends ffi.Struct { + @CSSM_DB_INDEX_TYPE() + external int IndexType; + + @CSSM_DB_INDEXED_DATA_LOCATION() + external int IndexedDataLocation; + + external CSSM_DB_ATTRIBUTE_INFO Info; +} - /// Creates a block from a C function pointer. - ObjCBlock44.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock44_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +typedef CSSM_DB_INDEX_TYPE = uint32; +typedef CSSM_DB_INDEXED_DATA_LOCATION = uint32; - /// Creates a block from a Dart function. - ObjCBlock44.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock44_closureTrampoline) - .cast(), - _ObjCBlock44_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } +class cssm_db_unique_record extends ffi.Struct { + external CSSM_DB_INDEX_INFO RecordLocator; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external SecAsn1Item RecordIdentifier; } -/// Disposition options for various delegate messages -abstract class NSURLSessionDelayedRequestDisposition { - /// Use the original request provided when the task was created; the request parameter is ignored. - static const int NSURLSessionDelayedRequestContinueLoading = 0; +typedef CSSM_DB_INDEX_INFO = cssm_db_index_info; - /// Use the specified request, which may not be nil. - static const int NSURLSessionDelayedRequestUseNewRequest = 1; +class cssm_db_record_index_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; - /// Cancel the task; the request parameter is ignored. - static const int NSURLSessionDelayedRequestCancel = 2; + @uint32() + external int NumberOfIndexes; + + external CSSM_DB_INDEX_INFO_PTR IndexInfo; } -abstract class NSURLSessionAuthChallengeDisposition { - /// Use the specified credential, which may be nil - static const int NSURLSessionAuthChallengeUseCredential = 0; +typedef CSSM_DB_INDEX_INFO_PTR = ffi.Pointer; - /// Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored. - static const int NSURLSessionAuthChallengePerformDefaultHandling = 1; +class cssm_dbinfo extends ffi.Struct { + @uint32() + external int NumberOfRecordTypes; - /// The entire request will be canceled; the credential parameter is ignored. - static const int NSURLSessionAuthChallengeCancelAuthenticationChallenge = 2; + external CSSM_DB_PARSING_MODULE_INFO_PTR DefaultParsingModules; - /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. - static const int NSURLSessionAuthChallengeRejectProtectionSpace = 3; -} + external CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR RecordAttributeNames; -abstract class NSURLSessionResponseDisposition { - /// Cancel the load, this is the same as -[task cancel] - static const int NSURLSessionResponseCancel = 0; + external CSSM_DB_RECORD_INDEX_INFO_PTR RecordIndexes; - /// Allow the load to continue - static const int NSURLSessionResponseAllow = 1; + @CSSM_BOOL() + external int IsLocal; - /// Turn this request into a download - static const int NSURLSessionResponseBecomeDownload = 2; + external ffi.Pointer AccessPath; - /// Turn this task into a stream task - static const int NSURLSessionResponseBecomeStream = 3; + external ffi.Pointer Reserved; } -/// The resource fetch type. -abstract class NSURLSessionTaskMetricsResourceFetchType { - static const int NSURLSessionTaskMetricsResourceFetchTypeUnknown = 0; +typedef CSSM_DB_PARSING_MODULE_INFO_PTR + = ffi.Pointer; +typedef CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR + = ffi.Pointer; +typedef CSSM_DB_RECORD_INDEX_INFO_PTR = ffi.Pointer; - /// The resource was loaded over the network. - static const int NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad = 1; +class cssm_selection_predicate extends ffi.Struct { + @CSSM_DB_OPERATOR() + external int DbOperator; - /// The resource was pushed by the server to the client. - static const int NSURLSessionTaskMetricsResourceFetchTypeServerPush = 2; + external CSSM_DB_ATTRIBUTE_DATA Attribute; +} - /// The resource was retrieved from the local storage. - static const int NSURLSessionTaskMetricsResourceFetchTypeLocalCache = 3; +typedef CSSM_DB_OPERATOR = uint32; +typedef CSSM_DB_ATTRIBUTE_DATA = cssm_db_attribute_data; + +class cssm_query_limits extends ffi.Struct { + @uint32() + external int TimeLimit; + + @uint32() + external int SizeLimit; } -/// DNS protocol used for domain resolution. -abstract class NSURLSessionTaskMetricsDomainResolutionProtocol { - static const int NSURLSessionTaskMetricsDomainResolutionProtocolUnknown = 0; +class cssm_query extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int RecordType; - /// Resolution used DNS over UDP. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolUDP = 1; + @CSSM_DB_CONJUNCTIVE() + external int Conjunctive; - /// Resolution used DNS over TCP. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolTCP = 2; + @uint32() + external int NumSelectionPredicates; - /// Resolution used DNS over TLS. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolTLS = 3; + external CSSM_SELECTION_PREDICATE_PTR SelectionPredicate; - /// Resolution used DNS over HTTPS. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS = 4; + external CSSM_QUERY_LIMITS QueryLimits; + + @CSSM_QUERY_FLAGS() + external int QueryFlags; } -/// This class defines the performance metrics collected for a request/response transaction during the task execution. -class NSURLSessionTaskTransactionMetrics extends NSObject { - NSURLSessionTaskTransactionMetrics._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_DB_CONJUNCTIVE = uint32; +typedef CSSM_SELECTION_PREDICATE_PTR = ffi.Pointer; +typedef CSSM_QUERY_LIMITS = cssm_query_limits; +typedef CSSM_QUERY_FLAGS = uint32; - /// Returns a [NSURLSessionTaskTransactionMetrics] that points to the same underlying object as [other]. - static NSURLSessionTaskTransactionMetrics castFrom( - T other) { - return NSURLSessionTaskTransactionMetrics._(other._id, other._lib, - retain: true, release: true); - } +class cssm_dl_pkcs11_attributes extends ffi.Struct { + @uint32() + external int DeviceAccessFlags; +} - /// Returns a [NSURLSessionTaskTransactionMetrics] that wraps the given raw object pointer. - static NSURLSessionTaskTransactionMetrics castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTaskTransactionMetrics._(other, lib, - retain: retain, release: release); - } +class cssm_name_list extends ffi.Struct { + @uint32() + external int NumStrings; - /// Returns whether [obj] is an instance of [NSURLSessionTaskTransactionMetrics]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTaskTransactionMetrics1); - } + external ffi.Pointer> String; +} - /// Represents the transaction request. - NSURLRequest? get request { - final _ret = _lib._objc_msgSend_371(_id, _lib._sel_request1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } +class cssm_db_schema_attribute_info extends ffi.Struct { + @uint32() + external int AttributeId; - /// Represents the transaction response. Can be nil if error occurred and no response was generated. - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_373(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer AttributeName; - /// fetchStartDate returns the time when the user agent started fetching the resource, whether or not the resource was retrieved from the server or local resources. - /// - /// The following metrics will be set to nil, if a persistent connection was used or the resource was retrieved from local resources: - /// - /// domainLookupStartDate - /// domainLookupEndDate - /// connectStartDate - /// connectEndDate - /// secureConnectionStartDate - /// secureConnectionEndDate - NSDate? get fetchStartDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_fetchStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + external SecAsn1Oid AttributeNameID; - /// domainLookupStartDate returns the time immediately before the user agent started the name lookup for the resource. - NSDate? get domainLookupStartDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_domainLookupStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + @CSSM_DB_ATTRIBUTE_FORMAT() + external int DataType; +} - /// domainLookupEndDate returns the time after the name lookup was completed. - NSDate? get domainLookupEndDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_domainLookupEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +class cssm_db_schema_index_info extends ffi.Struct { + @uint32() + external int AttributeId; - /// connectStartDate is the time immediately before the user agent started establishing the connection to the server. - /// - /// For example, this would correspond to the time immediately before the user agent started trying to establish the TCP connection. - NSDate? get connectStartDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_connectStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int IndexId; - /// If an encrypted connection was used, secureConnectionStartDate is the time immediately before the user agent started the security handshake to secure the current connection. - /// - /// For example, this would correspond to the time immediately before the user agent started the TLS handshake. - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSDate? get secureConnectionStartDate { - final _ret = - _lib._objc_msgSend_353(_id, _lib._sel_secureConnectionStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + @CSSM_DB_INDEX_TYPE() + external int IndexType; - /// If an encrypted connection was used, secureConnectionEndDate is the time immediately after the security handshake completed. - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSDate? get secureConnectionEndDate { - final _ret = - _lib._objc_msgSend_353(_id, _lib._sel_secureConnectionEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + @CSSM_DB_INDEXED_DATA_LOCATION() + external int IndexedDataLocation; +} - /// connectEndDate is the time immediately after the user agent finished establishing the connection to the server, including completion of security-related and other handshakes. - NSDate? get connectEndDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_connectEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +class cssm_x509_type_value_pair extends ffi.Struct { + external SecAsn1Oid type; - /// requestStartDate is the time immediately before the user agent started requesting the source, regardless of whether the resource was retrieved from the server or local resources. - /// - /// For example, this would correspond to the time immediately before the user agent sent an HTTP GET request. - NSDate? get requestStartDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_requestStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + @CSSM_BER_TAG() + external int valueType; - /// requestEndDate is the time immediately after the user agent finished requesting the source, regardless of whether the resource was retrieved from the server or local resources. - /// - /// For example, this would correspond to the time immediately after the user agent finished sending the last byte of the request. - NSDate? get requestEndDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_requestEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + external SecAsn1Item value; +} - /// responseStartDate is the time immediately after the user agent received the first byte of the response from the server or from local resources. - /// - /// For example, this would correspond to the time immediately after the user agent received the first byte of an HTTP response. - NSDate? get responseStartDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_responseStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_BER_TAG = uint8; - /// responseEndDate is the time immediately after the user agent received the last byte of the resource. - NSDate? get responseEndDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_responseEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +class cssm_x509_rdn extends ffi.Struct { + @uint32() + external int numberOfPairs; - /// The network protocol used to fetch the resource, as identified by the ALPN Protocol ID Identification Sequence [RFC7301]. - /// E.g., h2, http/1.1, spdy/3.1. - /// - /// When a proxy is configured AND a tunnel connection is established, then this attribute returns the value for the tunneled protocol. - /// - /// For example: - /// If no proxy were used, and HTTP/2 was negotiated, then h2 would be returned. - /// If HTTP/1.1 were used to the proxy, and the tunneled connection was HTTP/2, then h2 would be returned. - /// If HTTP/1.1 were used to the proxy, and there were no tunnel, then http/1.1 would be returned. - NSString? get networkProtocolName { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_networkProtocolName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_TYPE_VALUE_PAIR_PTR AttributeTypeAndValue; +} - /// This property is set to YES if a proxy connection was used to fetch the resource. - bool get proxyConnection { - return _lib._objc_msgSend_11(_id, _lib._sel_isProxyConnection1); - } +typedef CSSM_X509_TYPE_VALUE_PAIR_PTR = ffi.Pointer; - /// This property is set to YES if a persistent connection was used to fetch the resource. - bool get reusedConnection { - return _lib._objc_msgSend_11(_id, _lib._sel_isReusedConnection1); - } +class cssm_x509_name extends ffi.Struct { + @uint32() + external int numberOfRDNs; - /// Indicates whether the resource was loaded, pushed or retrieved from the local cache. - int get resourceFetchType { - return _lib._objc_msgSend_428(_id, _lib._sel_resourceFetchType1); - } + external CSSM_X509_RDN_PTR RelativeDistinguishedName; +} - /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. - int get countOfRequestHeaderBytesSent { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfRequestHeaderBytesSent1); - } +typedef CSSM_X509_RDN_PTR = ffi.Pointer; - /// countOfRequestBodyBytesSent is the number of bytes transferred for request body. - /// It includes protocol-specific framing, transfer encoding, and content encoding. - int get countOfRequestBodyBytesSent { - return _lib._objc_msgSend_325(_id, _lib._sel_countOfRequestBodyBytesSent1); - } +class cssm_x509_time extends ffi.Struct { + @CSSM_BER_TAG() + external int timeType; - /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. - int get countOfRequestBodyBytesBeforeEncoding { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); - } + external SecAsn1Item time; +} - /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. - int get countOfResponseHeaderBytesReceived { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfResponseHeaderBytesReceived1); - } +class x509_validity extends ffi.Struct { + external CSSM_X509_TIME notBefore; - /// countOfResponseBodyBytesReceived is the number of bytes transferred for response header. - /// It includes protocol-specific framing, transfer encoding, and content encoding. - int get countOfResponseBodyBytesReceived { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfResponseBodyBytesReceived1); - } + external CSSM_X509_TIME notAfter; +} - /// countOfResponseBodyBytesAfterDecoding is the size of data delivered to your delegate or completion handler. - int get countOfResponseBodyBytesAfterDecoding { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfResponseBodyBytesAfterDecoding1); - } +typedef CSSM_X509_TIME = cssm_x509_time; - /// localAddress is the IP address string of the local interface for the connection. - /// - /// For multipath protocols, this is the local address of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSString? get localAddress { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localAddress1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +class cssm_x509ext_basicConstraints extends ffi.Struct { + @CSSM_BOOL() + external int cA; - /// localPort is the port number of the local interface for the connection. - /// - /// For multipath protocols, this is the local port of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSNumber? get localPort { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_localPort1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } + @CSSM_X509_OPTION() + external int pathLenConstraintPresent; - /// remoteAddress is the IP address string of the remote interface for the connection. - /// - /// For multipath protocols, this is the remote address of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSString? get remoteAddress { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_remoteAddress1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int pathLenConstraint; +} - /// remotePort is the port number of the remote interface for the connection. - /// - /// For multipath protocols, this is the remote port of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSNumber? get remotePort { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_remotePort1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_X509_OPTION = CSSM_BOOL; - /// negotiatedTLSProtocolVersion is the TLS protocol version negotiated for the connection. - /// It is a 2-byte sequence in host byte order. - /// - /// Please refer to tls_protocol_version_t enum in Security/SecProtocolTypes.h - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSNumber? get negotiatedTLSProtocolVersion { - final _ret = - _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSProtocolVersion1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +abstract class extension_data_format { + static const int CSSM_X509_DATAFORMAT_ENCODED = 0; + static const int CSSM_X509_DATAFORMAT_PARSED = 1; + static const int CSSM_X509_DATAFORMAT_PAIR = 2; +} - /// negotiatedTLSCipherSuite is the TLS cipher suite negotiated for the connection. - /// It is a 2-byte sequence in host byte order. - /// - /// Please refer to tls_ciphersuite_t enum in Security/SecProtocolTypes.h - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSNumber? get negotiatedTLSCipherSuite { - final _ret = - _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSCipherSuite1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +class cssm_x509_extensionTagAndValue extends ffi.Struct { + @CSSM_BER_TAG() + external int type; - /// Whether the connection is established over a cellular interface. - bool get cellular { - return _lib._objc_msgSend_11(_id, _lib._sel_isCellular1); - } + external SecAsn1Item value; +} - /// Whether the connection is established over an expensive interface. - bool get expensive { - return _lib._objc_msgSend_11(_id, _lib._sel_isExpensive1); - } +class cssm_x509ext_pair extends ffi.Struct { + external CSSM_X509EXT_TAGandVALUE tagAndValue; + + external ffi.Pointer parsedValue; +} + +typedef CSSM_X509EXT_TAGandVALUE = cssm_x509_extensionTagAndValue; + +class cssm_x509_extension extends ffi.Struct { + external SecAsn1Oid extnId; - /// Whether the connection is established over a constrained interface. - bool get constrained { - return _lib._objc_msgSend_11(_id, _lib._sel_isConstrained1); - } + @CSSM_BOOL() + external int critical; - /// Whether a multipath protocol is successfully negotiated for the connection. - bool get multipath { - return _lib._objc_msgSend_11(_id, _lib._sel_isMultipath1); - } + @ffi.Int32() + external int format; - /// DNS protocol used for domain resolution. - int get domainResolutionProtocol { - return _lib._objc_msgSend_429(_id, _lib._sel_domainResolutionProtocol1); - } + external cssm_x509ext_value value; - @override - NSURLSessionTaskTransactionMetrics init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: true, release: true); - } + external SecAsn1Item BERvalue; +} - static NSURLSessionTaskTransactionMetrics new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_new1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: false, release: true); - } +class cssm_x509ext_value extends ffi.Union { + external ffi.Pointer tagAndValue; - static NSURLSessionTaskTransactionMetrics alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_alloc1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: false, release: true); - } + external ffi.Pointer parsedValue; + + external ffi.Pointer valuePair; } -class NSURLSessionTaskMetrics extends NSObject { - NSURLSessionTaskMetrics._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_X509EXT_PAIR = cssm_x509ext_pair; - /// Returns a [NSURLSessionTaskMetrics] that points to the same underlying object as [other]. - static NSURLSessionTaskMetrics castFrom(T other) { - return NSURLSessionTaskMetrics._(other._id, other._lib, - retain: true, release: true); - } +class cssm_x509_extensions extends ffi.Struct { + @uint32() + external int numberOfExtensions; - /// Returns a [NSURLSessionTaskMetrics] that wraps the given raw object pointer. - static NSURLSessionTaskMetrics castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTaskMetrics._(other, lib, - retain: retain, release: release); - } + external CSSM_X509_EXTENSION_PTR extensions; +} - /// Returns whether [obj] is an instance of [NSURLSessionTaskMetrics]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTaskMetrics1); - } +typedef CSSM_X509_EXTENSION_PTR = ffi.Pointer; - /// transactionMetrics array contains the metrics collected for every request/response transaction created during the task execution. - NSArray? get transactionMetrics { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_transactionMetrics1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +class cssm_x509_tbs_certificate extends ffi.Struct { + external SecAsn1Item version; - /// Interval from the task creation time to the task completion time. - /// Task creation time is the time when the task was instantiated. - /// Task completion time is the time when the task is about to change its internal state to completed. - NSDateInterval? get taskInterval { - final _ret = _lib._objc_msgSend_430(_id, _lib._sel_taskInterval1); - return _ret.address == 0 - ? null - : NSDateInterval._(_ret, _lib, retain: true, release: true); - } + external SecAsn1Item serialNumber; - /// redirectCount is the number of redirects that were recorded. - int get redirectCount { - return _lib._objc_msgSend_12(_id, _lib._sel_redirectCount1); - } + external SecAsn1AlgId signature; - @override - NSURLSessionTaskMetrics init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_NAME issuer; - static NSURLSessionTaskMetrics new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskMetrics1, _lib._sel_new1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); - } + external CSSM_X509_VALIDITY validity; - static NSURLSessionTaskMetrics alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskMetrics1, _lib._sel_alloc1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); - } -} + external CSSM_X509_NAME subject; -class NSDateInterval extends _ObjCWrapper { - NSDateInterval._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + external SecAsn1PubKeyInfo subjectPublicKeyInfo; - /// Returns a [NSDateInterval] that points to the same underlying object as [other]. - static NSDateInterval castFrom(T other) { - return NSDateInterval._(other._id, other._lib, retain: true, release: true); - } + external SecAsn1Item issuerUniqueIdentifier; - /// Returns a [NSDateInterval] that wraps the given raw object pointer. - static NSDateInterval castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDateInterval._(other, lib, retain: retain, release: release); - } + external SecAsn1Item subjectUniqueIdentifier; - /// Returns whether [obj] is an instance of [NSDateInterval]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSDateInterval1); - } + external CSSM_X509_EXTENSIONS extensions; } -abstract class NSItemProviderRepresentationVisibility { - static const int NSItemProviderRepresentationVisibilityAll = 0; - static const int NSItemProviderRepresentationVisibilityTeam = 1; - static const int NSItemProviderRepresentationVisibilityGroup = 2; - static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; -} +typedef CSSM_X509_NAME = cssm_x509_name; +typedef CSSM_X509_VALIDITY = x509_validity; +typedef CSSM_X509_EXTENSIONS = cssm_x509_extensions; -abstract class NSItemProviderFileOptions { - static const int NSItemProviderFileOptionOpenInPlace = 1; -} +class cssm_x509_signature extends ffi.Struct { + external SecAsn1AlgId algorithmIdentifier; -class NSItemProvider extends NSObject { - NSItemProvider._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + external SecAsn1Item encrypted; +} - /// Returns a [NSItemProvider] that points to the same underlying object as [other]. - static NSItemProvider castFrom(T other) { - return NSItemProvider._(other._id, other._lib, retain: true, release: true); - } +class cssm_x509_signed_certificate extends ffi.Struct { + external CSSM_X509_TBS_CERTIFICATE certificate; - /// Returns a [NSItemProvider] that wraps the given raw object pointer. - static NSItemProvider castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSItemProvider._(other, lib, retain: retain, release: release); - } + external CSSM_X509_SIGNATURE signature; +} - /// Returns whether [obj] is an instance of [NSItemProvider]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSItemProvider1); - } +typedef CSSM_X509_TBS_CERTIFICATE = cssm_x509_tbs_certificate; +typedef CSSM_X509_SIGNATURE = cssm_x509_signature; - @override - NSItemProvider init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } +class cssm_x509ext_policyQualifierInfo extends ffi.Struct { + external SecAsn1Oid policyQualifierId; - void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( - NSString? typeIdentifier, int visibility, ObjCBlock45 loadHandler) { - return _lib._objc_msgSend_431( - _id, - _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - visibility, - loadHandler._id); - } + external SecAsn1Item value; +} - void - registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( - NSString? typeIdentifier, - int fileOptions, - int visibility, - ObjCBlock47 loadHandler) { - return _lib._objc_msgSend_432( - _id, - _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - fileOptions, - visibility, - loadHandler._id); - } +class cssm_x509ext_policyQualifiers extends ffi.Struct { + @uint32() + external int numberOfPolicyQualifiers; - NSArray? get registeredTypeIdentifiers { - final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_registeredTypeIdentifiers1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer policyQualifier; +} - NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { - final _ret = _lib._objc_msgSend_433( - _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); - return NSArray._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_X509EXT_POLICYQUALIFIERINFO = cssm_x509ext_policyQualifierInfo; - bool hasItemConformingToTypeIdentifier_(NSString? typeIdentifier) { - return _lib._objc_msgSend_22( - _id, - _lib._sel_hasItemConformingToTypeIdentifier_1, - typeIdentifier?._id ?? ffi.nullptr); - } +class cssm_x509ext_policyInfo extends ffi.Struct { + external SecAsn1Oid policyIdentifier; - bool hasRepresentationConformingToTypeIdentifier_fileOptions_( - NSString? typeIdentifier, int fileOptions) { - return _lib._objc_msgSend_434( - _id, - _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, - typeIdentifier?._id ?? ffi.nullptr, - fileOptions); - } + external CSSM_X509EXT_POLICYQUALIFIERS policyQualifiers; +} - NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( - NSString? typeIdentifier, ObjCBlock46 completionHandler) { - final _ret = _lib._objc_msgSend_435( - _id, - _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_X509EXT_POLICYQUALIFIERS = cssm_x509ext_policyQualifiers; - NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( - NSString? typeIdentifier, ObjCBlock49 completionHandler) { - final _ret = _lib._objc_msgSend_436( - _id, - _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +class cssm_x509_revoked_cert_entry extends ffi.Struct { + external SecAsn1Item certificateSerialNumber; - NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( - NSString? typeIdentifier, ObjCBlock48 completionHandler) { - final _ret = _lib._objc_msgSend_437( - _id, - _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_TIME revocationDate; - NSString? get suggestedName { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_EXTENSIONS extensions; +} - set suggestedName(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); - } +class cssm_x509_revoked_cert_list extends ffi.Struct { + @uint32() + external int numberOfRevokedCertEntries; - NSItemProvider initWithObject_(NSObject? object) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_initWithObject_1, object?._id ?? ffi.nullptr); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_REVOKED_CERT_ENTRY_PTR revokedCertEntry; +} - void registerObject_visibility_(NSObject? object, int visibility) { - return _lib._objc_msgSend_438(_id, _lib._sel_registerObject_visibility_1, - object?._id ?? ffi.nullptr, visibility); - } +typedef CSSM_X509_REVOKED_CERT_ENTRY_PTR + = ffi.Pointer; - void registerObjectOfClass_visibility_loadHandler_( - NSObject? aClass, int visibility, ObjCBlock50 loadHandler) { - return _lib._objc_msgSend_439( - _id, - _lib._sel_registerObjectOfClass_visibility_loadHandler_1, - aClass?._id ?? ffi.nullptr, - visibility, - loadHandler._id); - } +class cssm_x509_tbs_certlist extends ffi.Struct { + external SecAsn1Item version; - bool canLoadObjectOfClass_(NSObject? aClass) { - return _lib._objc_msgSend_0( - _id, _lib._sel_canLoadObjectOfClass_1, aClass?._id ?? ffi.nullptr); - } + external SecAsn1AlgId signature; - NSProgress loadObjectOfClass_completionHandler_( - NSObject? aClass, ObjCBlock51 completionHandler) { - final _ret = _lib._objc_msgSend_440( - _id, - _lib._sel_loadObjectOfClass_completionHandler_1, - aClass?._id ?? ffi.nullptr, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_NAME issuer; - NSItemProvider initWithItem_typeIdentifier_( - NSObject? item, NSString? typeIdentifier) { - final _ret = _lib._objc_msgSend_441( - _id, - _lib._sel_initWithItem_typeIdentifier_1, - item?._id ?? ffi.nullptr, - typeIdentifier?._id ?? ffi.nullptr); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_TIME thisUpdate; - NSItemProvider initWithContentsOfURL_(NSURL? fileURL) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithContentsOfURL_1, fileURL?._id ?? ffi.nullptr); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_TIME nextUpdate; - void registerItemForTypeIdentifier_loadHandler_( - NSString? typeIdentifier, NSItemProviderLoadHandler loadHandler) { - return _lib._objc_msgSend_442( - _id, - _lib._sel_registerItemForTypeIdentifier_loadHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - loadHandler); - } + external CSSM_X509_REVOKED_CERT_LIST_PTR revokedCertificates; - void loadItemForTypeIdentifier_options_completionHandler_( - NSString? typeIdentifier, - NSDictionary? options, - NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_443( - _id, - _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - options?._id ?? ffi.nullptr, - completionHandler); - } + external CSSM_X509_EXTENSIONS extensions; +} - NSItemProviderLoadHandler get previewImageHandler { - return _lib._objc_msgSend_444(_id, _lib._sel_previewImageHandler1); - } +typedef CSSM_X509_REVOKED_CERT_LIST_PTR + = ffi.Pointer; - set previewImageHandler(NSItemProviderLoadHandler value) { - _lib._objc_msgSend_445(_id, _lib._sel_setPreviewImageHandler_1, value); - } +class cssm_x509_signed_crl extends ffi.Struct { + external CSSM_X509_TBS_CERTLIST tbsCertList; - void loadPreviewImageWithOptions_completionHandler_(NSDictionary? options, - NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_446( - _id, - _lib._sel_loadPreviewImageWithOptions_completionHandler_1, - options?._id ?? ffi.nullptr, - completionHandler); - } + external CSSM_X509_SIGNATURE signature; +} - static NSItemProvider new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_new1); - return NSItemProvider._(_ret, _lib, retain: false, release: true); - } +typedef CSSM_X509_TBS_CERTLIST = cssm_x509_tbs_certlist; - static NSItemProvider alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_alloc1); - return NSItemProvider._(_ret, _lib, retain: false, release: true); - } +abstract class __CE_GeneralNameType { + static const int GNT_OtherName = 0; + static const int GNT_RFC822Name = 1; + static const int GNT_DNSName = 2; + static const int GNT_X400Address = 3; + static const int GNT_DirectoryName = 4; + static const int GNT_EdiPartyName = 5; + static const int GNT_URI = 6; + static const int GNT_IPAddress = 7; + static const int GNT_RegisteredID = 8; } -ffi.Pointer _ObjCBlock45_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>()(arg0); +class __CE_OtherName extends ffi.Struct { + external SecAsn1Oid typeId; + + external SecAsn1Item value; } -final _ObjCBlock45_closureRegistry = {}; -int _ObjCBlock45_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock45_registerClosure(Function fn) { - final id = ++_ObjCBlock45_closureRegistryIndex; - _ObjCBlock45_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +class __CE_GeneralName extends ffi.Struct { + @ffi.Int32() + external int nameType; + + @CSSM_BOOL() + external int berEncoded; + + external SecAsn1Item name; } -ffi.Pointer _ObjCBlock45_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock45_closureRegistry[block.ref.target.address]!(arg0); +class __CE_GeneralNames extends ffi.Struct { + @uint32() + external int numNames; + + external ffi.Pointer generalName; } -class ObjCBlock45 extends _ObjCBlockBase { - ObjCBlock45._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CE_GeneralName = __CE_GeneralName; - /// Creates a block from a C function pointer. - ObjCBlock45.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock45_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class __CE_AuthorityKeyID extends ffi.Struct { + @CSSM_BOOL() + external int keyIdentifierPresent; - /// Creates a block from a Dart function. - ObjCBlock45.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock45_closureTrampoline) - .cast(), - _ObjCBlock45_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); - } + external SecAsn1Item keyIdentifier; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @CSSM_BOOL() + external int generalNamesPresent; -void _ObjCBlock46_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} + external ffi.Pointer generalNames; -final _ObjCBlock46_closureRegistry = {}; -int _ObjCBlock46_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock46_registerClosure(Function fn) { - final id = ++_ObjCBlock46_closureRegistryIndex; - _ObjCBlock46_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + @CSSM_BOOL() + external int serialNumberPresent; + + external SecAsn1Item serialNumber; } -void _ObjCBlock46_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock46_closureRegistry[block.ref.target.address]!(arg0, arg1); +typedef CE_GeneralNames = __CE_GeneralNames; + +class __CE_ExtendedKeyUsage extends ffi.Struct { + @uint32() + external int numPurposes; + + external CSSM_OID_PTR purposes; } -class ObjCBlock46 extends _ObjCBlockBase { - ObjCBlock46._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_OID_PTR = ffi.Pointer; - /// Creates a block from a C function pointer. - ObjCBlock46.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock46_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class __CE_BasicConstraints extends ffi.Struct { + @CSSM_BOOL() + external int cA; - /// Creates a block from a Dart function. - ObjCBlock46.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock46_closureTrampoline) - .cast(), - _ObjCBlock46_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + @CSSM_BOOL() + external int pathLenConstraintPresent; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @uint32() + external int pathLenConstraint; } -ffi.Pointer _ObjCBlock47_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>()(arg0); +class __CE_PolicyQualifierInfo extends ffi.Struct { + external SecAsn1Oid policyQualifierId; + + external SecAsn1Item qualifier; } -final _ObjCBlock47_closureRegistry = {}; -int _ObjCBlock47_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock47_registerClosure(Function fn) { - final id = ++_ObjCBlock47_closureRegistryIndex; - _ObjCBlock47_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +class __CE_PolicyInformation extends ffi.Struct { + external SecAsn1Oid certPolicyId; + + @uint32() + external int numPolicyQualifiers; + + external ffi.Pointer policyQualifiers; } -ffi.Pointer _ObjCBlock47_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock47_closureRegistry[block.ref.target.address]!(arg0); +typedef CE_PolicyQualifierInfo = __CE_PolicyQualifierInfo; + +class __CE_CertPolicies extends ffi.Struct { + @uint32() + external int numPolicies; + + external ffi.Pointer policies; } -class ObjCBlock47 extends _ObjCBlockBase { - ObjCBlock47._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CE_PolicyInformation = __CE_PolicyInformation; - /// Creates a block from a C function pointer. - ObjCBlock47.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock47_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +abstract class __CE_CrlDistributionPointNameType { + static const int CE_CDNT_FullName = 0; + static const int CE_CDNT_NameRelativeToCrlIssuer = 1; +} - /// Creates a block from a Dart function. - ObjCBlock47.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock47_closureTrampoline) - .cast(), - _ObjCBlock47_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); - } +class __CE_DistributionPointName extends ffi.Struct { + @ffi.Int32() + external int nameType; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external UnnamedUnion5 dpn; } -void _ObjCBlock48_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); +class UnnamedUnion5 extends ffi.Union { + external ffi.Pointer fullName; + + external CSSM_X509_RDN_PTR rdn; } -final _ObjCBlock48_closureRegistry = {}; -int _ObjCBlock48_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock48_registerClosure(Function fn) { - final id = ++_ObjCBlock48_closureRegistryIndex; - _ObjCBlock48_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +class __CE_CRLDistributionPoint extends ffi.Struct { + external ffi.Pointer distPointName; + + @CSSM_BOOL() + external int reasonsPresent; + + @CE_CrlDistReasonFlags() + external int reasons; + + external ffi.Pointer crlIssuer; } -void _ObjCBlock48_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _ObjCBlock48_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +typedef CE_DistributionPointName = __CE_DistributionPointName; +typedef CE_CrlDistReasonFlags = uint8; + +class __CE_CRLDistPointsSyntax extends ffi.Struct { + @uint32() + external int numDistPoints; + + external ffi.Pointer distPoints; } -class ObjCBlock48 extends _ObjCBlockBase { - ObjCBlock48._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CE_CRLDistributionPoint = __CE_CRLDistributionPoint; - /// Creates a block from a C function pointer. - ObjCBlock48.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock48_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class __CE_AccessDescription extends ffi.Struct { + external SecAsn1Oid accessMethod; - /// Creates a block from a Dart function. - ObjCBlock48.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock48_closureTrampoline) - .cast(), - _ObjCBlock48_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + external CE_GeneralName accessLocation; +} - ffi.Pointer<_ObjCBlock> get pointer => _id; +class __CE_AuthorityInfoAccess extends ffi.Struct { + @uint32() + external int numAccessDescriptions; + + external ffi.Pointer accessDescriptions; } -void _ObjCBlock49_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); +typedef CE_AccessDescription = __CE_AccessDescription; + +class __CE_SemanticsInformation extends ffi.Struct { + external ffi.Pointer semanticsIdentifier; + + external ffi.Pointer + nameRegistrationAuthorities; } -final _ObjCBlock49_closureRegistry = {}; -int _ObjCBlock49_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock49_registerClosure(Function fn) { - final id = ++_ObjCBlock49_closureRegistryIndex; - _ObjCBlock49_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CE_NameRegistrationAuthorities = CE_GeneralNames; + +class __CE_QC_Statement extends ffi.Struct { + external SecAsn1Oid statementId; + + external ffi.Pointer semanticsInfo; + + external ffi.Pointer otherInfo; } -void _ObjCBlock49_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock49_closureRegistry[block.ref.target.address]!(arg0, arg1); +typedef CE_SemanticsInformation = __CE_SemanticsInformation; + +class __CE_QC_Statements extends ffi.Struct { + @uint32() + external int numQCStatements; + + external ffi.Pointer qcStatements; } -class ObjCBlock49 extends _ObjCBlockBase { - ObjCBlock49._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CE_QC_Statement = __CE_QC_Statement; - /// Creates a block from a C function pointer. - ObjCBlock49.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock49_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class __CE_IssuingDistributionPoint extends ffi.Struct { + external ffi.Pointer distPointName; - /// Creates a block from a Dart function. - ObjCBlock49.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock49_closureTrampoline) - .cast(), - _ObjCBlock49_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + @CSSM_BOOL() + external int onlyUserCertsPresent; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @CSSM_BOOL() + external int onlyUserCerts; -ffi.Pointer _ObjCBlock50_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>()(arg0); + @CSSM_BOOL() + external int onlyCACertsPresent; + + @CSSM_BOOL() + external int onlyCACerts; + + @CSSM_BOOL() + external int onlySomeReasonsPresent; + + @CE_CrlDistReasonFlags() + external int onlySomeReasons; + + @CSSM_BOOL() + external int indirectCrlPresent; + + @CSSM_BOOL() + external int indirectCrl; } -final _ObjCBlock50_closureRegistry = {}; -int _ObjCBlock50_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock50_registerClosure(Function fn) { - final id = ++_ObjCBlock50_closureRegistryIndex; - _ObjCBlock50_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +class __CE_GeneralSubtree extends ffi.Struct { + external ffi.Pointer base; + + @uint32() + external int minimum; + + @CSSM_BOOL() + external int maximumPresent; + + @uint32() + external int maximum; } -ffi.Pointer _ObjCBlock50_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock50_closureRegistry[block.ref.target.address]!(arg0); +class __CE_GeneralSubtrees extends ffi.Struct { + @uint32() + external int numSubtrees; + + external ffi.Pointer subtrees; } -class ObjCBlock50 extends _ObjCBlockBase { - ObjCBlock50._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CE_GeneralSubtree = __CE_GeneralSubtree; - /// Creates a block from a C function pointer. - ObjCBlock50.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock50_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class __CE_NameConstraints extends ffi.Struct { + external ffi.Pointer permitted; - /// Creates a block from a Dart function. - ObjCBlock50.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock50_closureTrampoline) - .cast(), - _ObjCBlock50_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); - } + external ffi.Pointer excluded; +} - ffi.Pointer<_ObjCBlock> get pointer => _id; +typedef CE_GeneralSubtrees = __CE_GeneralSubtrees; + +class __CE_PolicyMapping extends ffi.Struct { + external SecAsn1Oid issuerDomainPolicy; + + external SecAsn1Oid subjectDomainPolicy; } -void _ObjCBlock51_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); +class __CE_PolicyMappings extends ffi.Struct { + @uint32() + external int numPolicyMappings; + + external ffi.Pointer policyMappings; } -final _ObjCBlock51_closureRegistry = {}; -int _ObjCBlock51_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock51_registerClosure(Function fn) { - final id = ++_ObjCBlock51_closureRegistryIndex; - _ObjCBlock51_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CE_PolicyMapping = __CE_PolicyMapping; + +class __CE_PolicyConstraints extends ffi.Struct { + @CSSM_BOOL() + external int requireExplicitPolicyPresent; + + @uint32() + external int requireExplicitPolicy; + + @CSSM_BOOL() + external int inhibitPolicyMappingPresent; + + @uint32() + external int inhibitPolicyMapping; } -void _ObjCBlock51_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock51_closureRegistry[block.ref.target.address]!(arg0, arg1); +abstract class __CE_DataType { + static const int DT_AuthorityKeyID = 0; + static const int DT_SubjectKeyID = 1; + static const int DT_KeyUsage = 2; + static const int DT_SubjectAltName = 3; + static const int DT_IssuerAltName = 4; + static const int DT_ExtendedKeyUsage = 5; + static const int DT_BasicConstraints = 6; + static const int DT_CertPolicies = 7; + static const int DT_NetscapeCertType = 8; + static const int DT_CrlNumber = 9; + static const int DT_DeltaCrl = 10; + static const int DT_CrlReason = 11; + static const int DT_CrlDistributionPoints = 12; + static const int DT_IssuingDistributionPoint = 13; + static const int DT_AuthorityInfoAccess = 14; + static const int DT_Other = 15; + static const int DT_QC_Statements = 16; + static const int DT_NameConstraints = 17; + static const int DT_PolicyMappings = 18; + static const int DT_PolicyConstraints = 19; + static const int DT_InhibitAnyPolicy = 20; } -class ObjCBlock51 extends _ObjCBlockBase { - ObjCBlock51._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class CE_Data extends ffi.Union { + external CE_AuthorityKeyID authorityKeyID; - /// Creates a block from a C function pointer. - ObjCBlock51.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock51_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CE_SubjectKeyID subjectKeyID; - /// Creates a block from a Dart function. - ObjCBlock51.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock51_closureTrampoline) - .cast(), - _ObjCBlock51_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + @CE_KeyUsage() + external int keyUsage; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + external CE_GeneralNames subjectAltName; -typedef NSItemProviderLoadHandler = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock52_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + external CE_GeneralNames issuerAltName; -final _ObjCBlock52_closureRegistry = {}; -int _ObjCBlock52_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock52_registerClosure(Function fn) { - final id = ++_ObjCBlock52_closureRegistryIndex; - _ObjCBlock52_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + external CE_ExtendedKeyUsage extendedKeyUsage; -void _ObjCBlock52_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock52_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + external CE_BasicConstraints basicConstraints; -class ObjCBlock52 extends _ObjCBlockBase { - ObjCBlock52._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + external CE_CertPolicies certPolicies; - /// Creates a block from a C function pointer. - ObjCBlock52.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock52_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @CE_NetscapeCertType() + external int netscapeCertType; - /// Creates a block from a Dart function. - ObjCBlock52.fromFunction( - NativeCupertinoHttp lib, - void Function(NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock52_closureTrampoline) - .cast(), - _ObjCBlock52_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + @CE_CrlNumber() + external int crlNumber; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @CE_DeltaCrl() + external int deltaCrl; -typedef NSItemProviderCompletionHandler = ffi.Pointer<_ObjCBlock>; + @CE_CrlReason() + external int crlReason; -abstract class NSItemProviderErrorCode { - static const int NSItemProviderUnknownError = -1; - static const int NSItemProviderItemUnavailableError = -1000; - static const int NSItemProviderUnexpectedValueClassError = -1100; - static const int NSItemProviderUnavailableCoercionError = -1200; -} + external CE_CRLDistPointsSyntax crlDistPoints; -typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; + external CE_IssuingDistributionPoint issuingDistPoint; -class NSMutableString extends NSString { - NSMutableString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + external CE_AuthorityInfoAccess authorityInfoAccess; - /// Returns a [NSMutableString] that points to the same underlying object as [other]. - static NSMutableString castFrom(T other) { - return NSMutableString._(other._id, other._lib, - retain: true, release: true); - } + external CE_QC_Statements qualifiedCertStatements; - /// Returns a [NSMutableString] that wraps the given raw object pointer. - static NSMutableString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableString._(other, lib, retain: retain, release: release); - } + external CE_NameConstraints nameConstraints; - /// Returns whether [obj] is an instance of [NSMutableString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableString1); - } + external CE_PolicyMappings policyMappings; - void replaceCharactersInRange_withString_(NSRange range, NSString? aString) { - return _lib._objc_msgSend_447( - _id, - _lib._sel_replaceCharactersInRange_withString_1, - range, - aString?._id ?? ffi.nullptr); - } + external CE_PolicyConstraints policyConstraints; - void insertString_atIndex_(NSString? aString, int loc) { - return _lib._objc_msgSend_448(_id, _lib._sel_insertString_atIndex_1, - aString?._id ?? ffi.nullptr, loc); - } + @CE_InhibitAnyPolicy() + external int inhibitAnyPolicy; - void deleteCharactersInRange_(NSRange range) { - return _lib._objc_msgSend_283( - _id, _lib._sel_deleteCharactersInRange_1, range); - } + external SecAsn1Item rawData; +} - void appendString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_appendString_1, aString?._id ?? ffi.nullptr); - } +typedef CE_AuthorityKeyID = __CE_AuthorityKeyID; +typedef CE_SubjectKeyID = SecAsn1Item; +typedef CE_KeyUsage = uint16; +typedef CE_ExtendedKeyUsage = __CE_ExtendedKeyUsage; +typedef CE_BasicConstraints = __CE_BasicConstraints; +typedef CE_CertPolicies = __CE_CertPolicies; +typedef CE_NetscapeCertType = uint16; +typedef CE_CrlNumber = uint32; +typedef CE_DeltaCrl = uint32; +typedef CE_CrlReason = uint32; +typedef CE_CRLDistPointsSyntax = __CE_CRLDistPointsSyntax; +typedef CE_IssuingDistributionPoint = __CE_IssuingDistributionPoint; +typedef CE_AuthorityInfoAccess = __CE_AuthorityInfoAccess; +typedef CE_QC_Statements = __CE_QC_Statements; +typedef CE_NameConstraints = __CE_NameConstraints; +typedef CE_PolicyMappings = __CE_PolicyMappings; +typedef CE_PolicyConstraints = __CE_PolicyConstraints; +typedef CE_InhibitAnyPolicy = uint32; - void appendFormat_(NSString? format) { - return _lib._objc_msgSend_188( - _id, _lib._sel_appendFormat_1, format?._id ?? ffi.nullptr); - } +class __CE_DataAndType extends ffi.Struct { + @ffi.Int32() + external int type; - void setString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_setString_1, aString?._id ?? ffi.nullptr); - } + external CE_Data extension1; - int replaceOccurrencesOfString_withString_options_range_(NSString? target, - NSString? replacement, int options, NSRange searchRange) { - return _lib._objc_msgSend_449( - _id, - _lib._sel_replaceOccurrencesOfString_withString_options_range_1, - target?._id ?? ffi.nullptr, - replacement?._id ?? ffi.nullptr, - options, - searchRange); - } + @CSSM_BOOL() + external int critical; +} - bool applyTransform_reverse_range_updatedRange_(NSStringTransform transform, - bool reverse, NSRange range, NSRangePointer resultingRange) { - return _lib._objc_msgSend_450( - _id, - _lib._sel_applyTransform_reverse_range_updatedRange_1, - transform, - reverse, - range, - resultingRange); - } +class cssm_acl_process_subject_selector extends ffi.Struct { + @uint16() + external int version; - NSMutableString initWithCapacity_(int capacity) { - final _ret = - _lib._objc_msgSend_451(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + @uint16() + external int mask; - static NSMutableString stringWithCapacity_( - NativeCupertinoHttp _lib, int capacity) { - final _ret = _lib._objc_msgSend_451( - _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int uid; - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); - } + @uint32() + external int gid; +} - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSMutableString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } +class cssm_acl_keychain_prompt_selector extends ffi.Struct { + @uint16() + external int version; - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); - } + @uint16() + external int flags; +} - static NSMutableString string(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_string1); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +abstract class cssm_appledl_open_parameters_mask { + static const int kCSSM_APPLEDL_MASK_MODE = 1; +} - static NSMutableString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +class cssm_appledl_open_parameters extends ffi.Struct { + @uint32() + external int length; - static NSMutableString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSMutableString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int version; - static NSMutableString stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSMutableString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + @CSSM_BOOL() + external int autoCommit; - static NSMutableString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int mask; - static NSMutableString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + @mode_t() + external int mode; +} - static NSMutableString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSMutableString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +class cssm_applecspdl_db_settings_parameters extends ffi.Struct { + @uint32() + external int idleTimeout; - static NSMutableString stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_265( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + @uint8() + external int lockOnSleep; +} - static NSMutableString stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_266( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +class cssm_applecspdl_db_is_locked_parameters extends ffi.Struct { + @uint8() + external int isLocked; +} - static NSMutableString stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_267( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +class cssm_applecspdl_db_change_password_parameters extends ffi.Struct { + external ffi.Pointer accessCredentials; +} - static NSMutableString stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_268( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_ACCESS_CREDENTIALS = cssm_access_credentials; - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData? data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_269( - _lib._class_NSMutableString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } +class CSSM_APPLE_TP_NAME_OID extends ffi.Struct { + external ffi.Pointer string; + + external ffi.Pointer oid; +} + +class CSSM_APPLE_TP_CERT_REQUEST extends ffi.Struct { + @CSSM_CSP_HANDLE() + external int cspHand; + + @CSSM_CL_HANDLE() + external int clHand; + + @uint32() + external int serialNumber; + + @uint32() + external int numSubjectNames; + + external ffi.Pointer subjectNames; + + @uint32() + external int numIssuerNames; - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer issuerNames; - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_NAME_PTR issuerNameX509; - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSMutableString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer certPublicKey; - static NSObject stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( - _lib._class_NSMutableString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer issuerPrivateKey; - static NSMutableString new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_new1); - return NSMutableString._(_ret, _lib, retain: false, release: true); - } + @CSSM_ALGORITHMS() + external int signatureAlg; - static NSMutableString alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_alloc1); - return NSMutableString._(_ret, _lib, retain: false, release: true); - } -} + external SecAsn1Oid signatureOid; -typedef NSExceptionName = ffi.Pointer; + @uint32() + external int notBefore; -class NSSimpleCString extends NSString { - NSSimpleCString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @uint32() + external int notAfter; - /// Returns a [NSSimpleCString] that points to the same underlying object as [other]. - static NSSimpleCString castFrom(T other) { - return NSSimpleCString._(other._id, other._lib, - retain: true, release: true); - } + @uint32() + external int numExtensions; - /// Returns a [NSSimpleCString] that wraps the given raw object pointer. - static NSSimpleCString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSSimpleCString._(other, lib, retain: retain, release: release); - } + external ffi.Pointer extensions; - /// Returns whether [obj] is an instance of [NSSimpleCString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSSimpleCString1); - } + external ffi.Pointer challengeString; +} - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSSimpleCString1, _lib._sel_availableStringEncodings1); - } +typedef CSSM_X509_NAME_PTR = ffi.Pointer; +typedef CSSM_KEY = cssm_key; +typedef CE_DataAndType = __CE_DataAndType; - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSSimpleCString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } +class CSSM_APPLE_TP_SSL_OPTIONS extends ffi.Struct { + @uint32() + external int Version; - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSSimpleCString1, _lib._sel_defaultCStringEncoding1); - } + @uint32() + external int ServerNameLen; - static NSSimpleCString string(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_string1); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer ServerName; - static NSSimpleCString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int Flags; +} - static NSSimpleCString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSSimpleCString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +class CSSM_APPLE_TP_CRL_OPTIONS extends ffi.Struct { + @uint32() + external int Version; - static NSSimpleCString stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSSimpleCString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + @CSSM_APPLE_TP_CRL_OPT_FLAGS() + external int CrlFlags; - static NSSimpleCString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + external CSSM_DL_DB_HANDLE_PTR crlStore; +} - static NSSimpleCString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_APPLE_TP_CRL_OPT_FLAGS = uint32; - static NSSimpleCString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSSimpleCString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +class CSSM_APPLE_TP_SMIME_OPTIONS extends ffi.Struct { + @uint32() + external int Version; - static NSSimpleCString stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_265( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + @CE_KeyUsage() + external int IntendedUsage; - static NSSimpleCString stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_266( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int SenderEmailLen; - static NSSimpleCString stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_267( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer SenderEmail; +} - static NSSimpleCString stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_268( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +class CSSM_APPLE_TP_ACTION_DATA extends ffi.Struct { + @uint32() + external int Version; - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData? data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_269( - _lib._class_NSSimpleCString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } + @CSSM_APPLE_TP_ACTION_FLAGS() + external int ActionFlags; +} - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_APPLE_TP_ACTION_FLAGS = uint32; - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +class CSSM_TP_APPLE_EVIDENCE_INFO extends ffi.Struct { + @CSSM_TP_APPLE_CERT_STATUS() + external int StatusBits; - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSSimpleCString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int NumStatusCodes; - static NSObject stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( - _lib._class_NSSimpleCString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer StatusCodes; - static NSSimpleCString new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_new1); - return NSSimpleCString._(_ret, _lib, retain: false, release: true); - } + @uint32() + external int Index; - static NSSimpleCString alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_alloc1); - return NSSimpleCString._(_ret, _lib, retain: false, release: true); - } + external CSSM_DL_DB_HANDLE DlDbHandle; + + external CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord; } -class NSConstantString extends NSSimpleCString { - NSConstantString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_TP_APPLE_CERT_STATUS = uint32; +typedef CSSM_DL_DB_HANDLE = cssm_dl_db_handle; +typedef CSSM_DB_UNIQUE_RECORD_PTR = ffi.Pointer; - /// Returns a [NSConstantString] that points to the same underlying object as [other]. - static NSConstantString castFrom(T other) { - return NSConstantString._(other._id, other._lib, - retain: true, release: true); - } +class CSSM_TP_APPLE_EVIDENCE_HEADER extends ffi.Struct { + @uint32() + external int Version; +} - /// Returns a [NSConstantString] that wraps the given raw object pointer. - static NSConstantString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSConstantString._(other, lib, retain: retain, release: release); - } +class CSSM_APPLE_CL_CSR_REQUEST extends ffi.Struct { + external CSSM_X509_NAME_PTR subjectNameX509; - /// Returns whether [obj] is an instance of [NSConstantString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSConstantString1); - } + @CSSM_ALGORITHMS() + external int signatureAlg; - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSConstantString1, _lib._sel_availableStringEncodings1); - } + external SecAsn1Oid signatureOid; - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSConstantString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } + @CSSM_CSP_HANDLE() + external int cspHand; - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSConstantString1, _lib._sel_defaultCStringEncoding1); - } + external ffi.Pointer subjectPublicKey; - static NSConstantString string(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_string1); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer subjectPrivateKey; - static NSConstantString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer challengeString; +} - static NSConstantString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSConstantString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +abstract class SecTrustOptionFlags { + static const int kSecTrustOptionAllowExpired = 1; + static const int kSecTrustOptionLeafIsCA = 2; + static const int kSecTrustOptionFetchIssuerFromNet = 4; + static const int kSecTrustOptionAllowExpiredRoot = 8; + static const int kSecTrustOptionRequireRevPerCert = 16; + static const int kSecTrustOptionUseTrustSettings = 32; + static const int kSecTrustOptionImplicitAnchors = 64; +} - static NSConstantString stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSConstantString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_TP_VERIFY_CONTEXT_RESULT_PTR + = ffi.Pointer; +typedef SecKeychainRef = ffi.Pointer<__SecKeychain>; - static NSConstantString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +abstract class SecKeyUsage { + static const int kSecKeyUsageUnspecified = 0; + static const int kSecKeyUsageDigitalSignature = 1; + static const int kSecKeyUsageNonRepudiation = 2; + static const int kSecKeyUsageContentCommitment = 2; + static const int kSecKeyUsageKeyEncipherment = 4; + static const int kSecKeyUsageDataEncipherment = 8; + static const int kSecKeyUsageKeyAgreement = 16; + static const int kSecKeyUsageKeyCertSign = 32; + static const int kSecKeyUsageCRLSign = 64; + static const int kSecKeyUsageEncipherOnly = 128; + static const int kSecKeyUsageDecipherOnly = 256; + static const int kSecKeyUsageCritical = -2147483648; + static const int kSecKeyUsageAll = 2147483647; +} - static NSConstantString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +typedef SecIdentityRef = ffi.Pointer<__SecIdentity>; - static NSConstantString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSConstantString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +abstract class SSLCiphersuiteGroup { + static const int kSSLCiphersuiteGroupDefault = 0; + static const int kSSLCiphersuiteGroupCompatibility = 1; + static const int kSSLCiphersuiteGroupLegacy = 2; + static const int kSSLCiphersuiteGroupATS = 3; + static const int kSSLCiphersuiteGroupATSCompatibility = 4; +} - static NSConstantString stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_265( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +abstract class tls_protocol_version_t { + static const int tls_protocol_version_TLSv10 = 769; + static const int tls_protocol_version_TLSv11 = 770; + static const int tls_protocol_version_TLSv12 = 771; + static const int tls_protocol_version_TLSv13 = 772; + static const int tls_protocol_version_DTLSv10 = -257; + static const int tls_protocol_version_DTLSv12 = -259; +} - static NSConstantString stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_266( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +abstract class tls_ciphersuite_t { + static const int tls_ciphersuite_RSA_WITH_3DES_EDE_CBC_SHA = 10; + static const int tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA = 47; + static const int tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA = 53; + static const int tls_ciphersuite_RSA_WITH_AES_128_GCM_SHA256 = 156; + static const int tls_ciphersuite_RSA_WITH_AES_256_GCM_SHA384 = 157; + static const int tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA256 = 60; + static const int tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA256 = 61; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; + static const int tls_ciphersuite_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; + static const int tls_ciphersuite_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = + -13144; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = + -13143; + static const int tls_ciphersuite_AES_128_GCM_SHA256 = 4865; + static const int tls_ciphersuite_AES_256_GCM_SHA384 = 4866; + static const int tls_ciphersuite_CHACHA20_POLY1305_SHA256 = 4867; +} + +abstract class tls_ciphersuite_group_t { + static const int tls_ciphersuite_group_default = 0; + static const int tls_ciphersuite_group_compatibility = 1; + static const int tls_ciphersuite_group_legacy = 2; + static const int tls_ciphersuite_group_ats = 3; + static const int tls_ciphersuite_group_ats_compatibility = 4; +} + +abstract class SSLProtocol { + static const int kSSLProtocolUnknown = 0; + static const int kTLSProtocol1 = 4; + static const int kTLSProtocol11 = 7; + static const int kTLSProtocol12 = 8; + static const int kDTLSProtocol1 = 9; + static const int kTLSProtocol13 = 10; + static const int kDTLSProtocol12 = 11; + static const int kTLSProtocolMaxSupported = 999; + static const int kSSLProtocol2 = 1; + static const int kSSLProtocol3 = 2; + static const int kSSLProtocol3Only = 3; + static const int kTLSProtocol1Only = 5; + static const int kSSLProtocolAll = 6; +} + +typedef sec_trust_t = ffi.Pointer; +typedef sec_identity_t = ffi.Pointer; +void _ObjCBlock30_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} + +final _ObjCBlock30_closureRegistry = {}; +int _ObjCBlock30_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock30_registerClosure(Function fn) { + final id = ++_ObjCBlock30_closureRegistryIndex; + _ObjCBlock30_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock30_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { + return _ObjCBlock30_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock30 extends _ObjCBlockBase { + ObjCBlock30._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - static NSConstantString stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_267( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock30.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + sec_certificate_t arg0)>( + _ObjCBlock30_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - static NSConstantString stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_268( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock30.fromFunction( + NativeCupertinoHttp lib, void Function(sec_certificate_t arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + sec_certificate_t arg0)>( + _ObjCBlock30_closureTrampoline) + .cast(), + _ObjCBlock30_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(sec_certificate_t arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + sec_certificate_t arg0)>()(_id, arg0); } - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData? data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_269( - _lib._class_NSConstantString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +typedef sec_certificate_t = ffi.Pointer; +typedef sec_protocol_metadata_t = ffi.Pointer; +typedef SSLCipherSuite = ffi.Uint16; +void _ObjCBlock31_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock31_closureRegistry = {}; +int _ObjCBlock31_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock31_registerClosure(Function fn) { + final id = ++_ObjCBlock31_closureRegistryIndex; + _ObjCBlock31_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSConstantString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock31_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock31_closureRegistry[block.ref.target.address]!(arg0); +} - static NSObject stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( - _lib._class_NSConstantString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock31 extends _ObjCBlockBase { + ObjCBlock31._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - static NSConstantString new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_new1); - return NSConstantString._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock31.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Uint16 arg0)>(_ObjCBlock31_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - static NSConstantString alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_alloc1); - return NSConstantString._(_ret, _lib, retain: false, release: true); + /// Creates a block from a Dart function. + ObjCBlock31.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Uint16 arg0)>(_ObjCBlock31_closureTrampoline) + .cast(), + _ObjCBlock31_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(int arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Uint16 arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); } + + ffi.Pointer<_ObjCBlock> get pointer => _id; } -class NSMutableCharacterSet extends NSCharacterSet { - NSMutableCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +void _ObjCBlock32_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(dispatch_data_t arg0, dispatch_data_t arg1)>>() + .asFunction< + void Function( + dispatch_data_t arg0, dispatch_data_t arg1)>()(arg0, arg1); +} - /// Returns a [NSMutableCharacterSet] that points to the same underlying object as [other]. - static NSMutableCharacterSet castFrom(T other) { - return NSMutableCharacterSet._(other._id, other._lib, - retain: true, release: true); - } +final _ObjCBlock32_closureRegistry = {}; +int _ObjCBlock32_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock32_registerClosure(Function fn) { + final id = ++_ObjCBlock32_closureRegistryIndex; + _ObjCBlock32_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns a [NSMutableCharacterSet] that wraps the given raw object pointer. - static NSMutableCharacterSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableCharacterSet._(other, lib, - retain: retain, release: release); - } +void _ObjCBlock32_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { + return _ObjCBlock32_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - /// Returns whether [obj] is an instance of [NSMutableCharacterSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableCharacterSet1); - } +class ObjCBlock32 extends _ObjCBlockBase { + ObjCBlock32._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - void addCharactersInRange_(NSRange aRange) { - return _lib._objc_msgSend_283( - _id, _lib._sel_addCharactersInRange_1, aRange); - } + /// Creates a block from a C function pointer. + ObjCBlock32.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + dispatch_data_t arg0, dispatch_data_t arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + dispatch_data_t arg1)>(_ObjCBlock32_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - void removeCharactersInRange_(NSRange aRange) { - return _lib._objc_msgSend_283( - _id, _lib._sel_removeCharactersInRange_1, aRange); + /// Creates a block from a Dart function. + ObjCBlock32.fromFunction(NativeCupertinoHttp lib, + void Function(dispatch_data_t arg0, dispatch_data_t arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, dispatch_data_t arg1)>( + _ObjCBlock32_closureTrampoline) + .cast(), + _ObjCBlock32_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(dispatch_data_t arg0, dispatch_data_t arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, dispatch_data_t arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, + dispatch_data_t arg1)>()(_id, arg0, arg1); } - void addCharactersInString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_addCharactersInString_1, aString?._id ?? ffi.nullptr); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - void removeCharactersInString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_removeCharactersInString_1, aString?._id ?? ffi.nullptr); - } +typedef sec_protocol_options_t = ffi.Pointer; +typedef sec_protocol_pre_shared_key_selection_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock33_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>>() + .asFunction< + void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>()( + arg0, arg1, arg2); +} - void formUnionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_452(_id, _lib._sel_formUnionWithCharacterSet_1, - otherSet?._id ?? ffi.nullptr); - } +final _ObjCBlock33_closureRegistry = {}; +int _ObjCBlock33_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock33_registerClosure(Function fn) { + final id = ++_ObjCBlock33_closureRegistryIndex; + _ObjCBlock33_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - void formIntersectionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_452( - _id, - _lib._sel_formIntersectionWithCharacterSet_1, - otherSet?._id ?? ffi.nullptr); - } +void _ObjCBlock33_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) { + return _ObjCBlock33_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - void invert() { - return _lib._objc_msgSend_1(_id, _lib._sel_invert1); - } +class ObjCBlock33 extends _ObjCBlockBase { + ObjCBlock33._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_controlCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock33.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>(_ObjCBlock33_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock33.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>(_ObjCBlock33_closureTrampoline) + .cast(), + _ObjCBlock33_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(sec_protocol_metadata_t arg0, dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>()(_id, arg0, arg1, arg2); } - static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_whitespaceAndNewlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_decimalDigitCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +typedef sec_protocol_pre_shared_key_selection_complete_t + = ffi.Pointer<_ObjCBlock>; +typedef sec_protocol_key_update_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock34_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>>() + .asFunction< + void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>()(arg0, arg1); +} - static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_letterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock34_closureRegistry = {}; +int _ObjCBlock34_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock34_registerClosure(Function fn) { + final id = ++_ObjCBlock34_closureRegistryIndex; + _ObjCBlock34_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSCharacterSet? getLowercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_lowercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock34_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { + return _ObjCBlock34_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - static NSCharacterSet? getUppercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_uppercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock34 extends _ObjCBlockBase { + ObjCBlock34._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock34.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>( + _ObjCBlock34_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_alphanumericCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock34.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>( + _ObjCBlock34_closureTrampoline) + .cast(), + _ObjCBlock34_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>()(_id, arg0, arg1); } - static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_decomposableCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_illegalCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +typedef sec_protocol_key_update_complete_t = ffi.Pointer<_ObjCBlock>; +typedef sec_protocol_challenge_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock35_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>>() + .asFunction< + void Function(sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>()(arg0, arg1); +} - static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_punctuationCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock35_closureRegistry = {}; +int _ObjCBlock35_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock35_registerClosure(Function fn) { + final id = ++_ObjCBlock35_closureRegistryIndex; + _ObjCBlock35_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSCharacterSet? getCapitalizedLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_capitalizedLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock35_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { + return _ObjCBlock35_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_symbolCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock35 extends _ObjCBlockBase { + ObjCBlock35._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_newlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock35.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>( + _ObjCBlock35_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - static NSMutableCharacterSet characterSetWithRange_( - NativeCupertinoHttp _lib, NSRange aRange) { - final _ret = _lib._objc_msgSend_453(_lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithRange_1, aRange); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock35.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>( + _ObjCBlock35_closureTrampoline) + .cast(), + _ObjCBlock35_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>()(_id, arg0, arg1); } - static NSMutableCharacterSet characterSetWithCharactersInString_( - NativeCupertinoHttp _lib, NSString? aString) { - final _ret = _lib._objc_msgSend_454( - _lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, - aString?._id ?? ffi.nullptr); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - static NSMutableCharacterSet characterSetWithBitmapRepresentation_( - NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_455( - _lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, - data?._id ?? ffi.nullptr); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } +typedef sec_protocol_challenge_complete_t = ffi.Pointer<_ObjCBlock>; +typedef sec_protocol_verify_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock36_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>>() + .asFunction< + void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>()(arg0, arg1, arg2); +} - static NSMutableCharacterSet characterSetWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? fName) { - final _ret = _lib._objc_msgSend_454(_lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock36_closureRegistry = {}; +int _ObjCBlock36_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock36_registerClosure(Function fn) { + final id = ++_ObjCBlock36_closureRegistryIndex; + _ObjCBlock36_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns a character set containing the characters allowed in an URL's user subcomponent. - static NSCharacterSet? getURLUserAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLUserAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock36_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) { + return _ObjCBlock36_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - /// Returns a character set containing the characters allowed in an URL's password subcomponent. - static NSCharacterSet? getURLPasswordAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLPasswordAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock36 extends _ObjCBlockBase { + ObjCBlock36._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - /// Returns a character set containing the characters allowed in an URL's host subcomponent. - static NSCharacterSet? getURLHostAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLHostAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock36.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_trust_t arg1, sec_protocol_verify_complete_t arg2)>> + ptr) + : this._( + lib + ._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>( + _ObjCBlock36_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - /// Returns a character set containing the characters allowed in an URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - static NSCharacterSet? getURLPathAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLPathAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock36.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>( + _ObjCBlock36_closureTrampoline) + .cast(), + _ObjCBlock36_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>()(_id, arg0, arg1, arg2); } - /// Returns a character set containing the characters allowed in an URL's query component. - static NSCharacterSet? getURLQueryAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLQueryAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - /// Returns a character set containing the characters allowed in an URL's fragment component. - static NSCharacterSet? getURLFragmentAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLFragmentAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +typedef sec_protocol_verify_complete_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock37_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} - static NSMutableCharacterSet new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableCharacterSet1, _lib._sel_new1); - return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); - } +final _ObjCBlock37_closureRegistry = {}; +int _ObjCBlock37_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock37_registerClosure(Function fn) { + final id = ++_ObjCBlock37_closureRegistryIndex; + _ObjCBlock37_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSMutableCharacterSet alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableCharacterSet1, _lib._sel_alloc1); - return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); - } +void _ObjCBlock37_closureTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { + return _ObjCBlock37_closureRegistry[block.ref.target.address]!(arg0); } -typedef NSURLFileResourceType = ffi.Pointer; -typedef NSURLThumbnailDictionaryItem = ffi.Pointer; -typedef NSURLFileProtectionType = ffi.Pointer; -typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; -typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; -typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; +class ObjCBlock37 extends _ObjCBlockBase { + ObjCBlock37._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -/// NSURLQueryItem encapsulates a single query name-value pair. The name and value strings of a query name-value pair are not percent encoded. For use with the NSURLComponents queryItems property. -class NSURLQueryItem extends NSObject { - NSURLQueryItem._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// Creates a block from a C function pointer. + ObjCBlock37.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0)>(_ObjCBlock37_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - /// Returns a [NSURLQueryItem] that points to the same underlying object as [other]. - static NSURLQueryItem castFrom(T other) { - return NSURLQueryItem._(other._id, other._lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock37.fromFunction(NativeCupertinoHttp lib, void Function(bool arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0)>(_ObjCBlock37_closureTrampoline) + .cast(), + _ObjCBlock37_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(bool arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, bool arg0)>()(_id, arg0); } - /// Returns a [NSURLQueryItem] that wraps the given raw object pointer. - static NSURLQueryItem castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLQueryItem._(other, lib, retain: retain, release: release); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - /// Returns whether [obj] is an instance of [NSURLQueryItem]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLQueryItem1); - } +class SSLContext extends ffi.Opaque {} - NSURLQueryItem initWithName_value_(NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_456(_id, _lib._sel_initWithName_value_1, - name?._id ?? ffi.nullptr, value?._id ?? ffi.nullptr); - return NSURLQueryItem._(_ret, _lib, retain: true, release: true); - } +abstract class SSLSessionOption { + static const int kSSLSessionOptionBreakOnServerAuth = 0; + static const int kSSLSessionOptionBreakOnCertRequested = 1; + static const int kSSLSessionOptionBreakOnClientAuth = 2; + static const int kSSLSessionOptionFalseStart = 3; + static const int kSSLSessionOptionSendOneByteRecord = 4; + static const int kSSLSessionOptionAllowServerIdentityChange = 5; + static const int kSSLSessionOptionFallback = 6; + static const int kSSLSessionOptionBreakOnClientHello = 7; + static const int kSSLSessionOptionAllowRenegotiation = 8; + static const int kSSLSessionOptionEnableSessionTickets = 9; +} - static NSURLQueryItem queryItemWithName_value_( - NativeCupertinoHttp _lib, NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_456( - _lib._class_NSURLQueryItem1, - _lib._sel_queryItemWithName_value_1, - name?._id ?? ffi.nullptr, - value?._id ?? ffi.nullptr); - return NSURLQueryItem._(_ret, _lib, retain: true, release: true); - } +abstract class SSLSessionState { + static const int kSSLIdle = 0; + static const int kSSLHandshake = 1; + static const int kSSLConnected = 2; + static const int kSSLClosed = 3; + static const int kSSLAborted = 4; +} - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +abstract class SSLClientCertificateState { + static const int kSSLClientCertNone = 0; + static const int kSSLClientCertRequested = 1; + static const int kSSLClientCertSent = 2; + static const int kSSLClientCertRejected = 3; +} - NSString? get value { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_value1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +abstract class SSLProtocolSide { + static const int kSSLServerSide = 0; + static const int kSSLClientSide = 1; +} - static NSURLQueryItem new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_new1); - return NSURLQueryItem._(_ret, _lib, retain: false, release: true); - } +abstract class SSLConnectionType { + static const int kSSLStreamType = 0; + static const int kSSLDatagramType = 1; +} - static NSURLQueryItem alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_alloc1); - return NSURLQueryItem._(_ret, _lib, retain: false, release: true); - } +typedef SSLContextRef = ffi.Pointer; +typedef SSLReadFunc = ffi.Pointer< + ffi.NativeFunction< + OSStatus Function( + SSLConnectionRef, ffi.Pointer, ffi.Pointer)>>; +typedef SSLConnectionRef = ffi.Pointer; +typedef SSLWriteFunc = ffi.Pointer< + ffi.NativeFunction< + OSStatus Function( + SSLConnectionRef, ffi.Pointer, ffi.Pointer)>>; + +abstract class SSLAuthenticate { + static const int kNeverAuthenticate = 0; + static const int kAlwaysAuthenticate = 1; + static const int kTryAuthenticate = 2; } -class NSURLComponents extends NSObject { - NSURLComponents._(ffi.Pointer id, NativeCupertinoHttp lib, +/// NSURLSession is a replacement API for NSURLConnection. It provides +/// options that affect the policy of, and various aspects of the +/// mechanism by which NSURLRequest objects are retrieved from the +/// network. +/// +/// An NSURLSession may be bound to a delegate object. The delegate is +/// invoked for certain events during the lifetime of a session, such as +/// server authentication or determining whether a resource to be loaded +/// should be converted into a download. +/// +/// NSURLSession instances are thread-safe. +/// +/// The default NSURLSession uses a system provided delegate and is +/// appropriate to use in place of existing code that uses +/// +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] +/// +/// An NSURLSession creates NSURLSessionTask objects which represent the +/// action of a resource being loaded. These are analogous to +/// NSURLConnection objects but provide for more control and a unified +/// delegate model. +/// +/// NSURLSessionTask objects are always created in a suspended state and +/// must be sent the -resume message before they will execute. +/// +/// Subclasses of NSURLSessionTask are used to syntactically +/// differentiate between data and file downloads. +/// +/// An NSURLSessionDataTask receives the resource as a series of calls to +/// the URLSession:dataTask:didReceiveData: delegate method. This is type of +/// task most commonly associated with retrieving objects for immediate parsing +/// by the consumer. +/// +/// An NSURLSessionUploadTask differs from an NSURLSessionDataTask +/// in how its instance is constructed. Upload tasks are explicitly created +/// by referencing a file or data object to upload, or by utilizing the +/// -URLSession:task:needNewBodyStream: delegate message to supply an upload +/// body. +/// +/// An NSURLSessionDownloadTask will directly write the response data to +/// a temporary file. When completed, the delegate is sent +/// URLSession:downloadTask:didFinishDownloadingToURL: and given an opportunity +/// to move this file to a permanent location in its sandboxed container, or to +/// otherwise read the file. If canceled, an NSURLSessionDownloadTask can +/// produce a data blob that can be used to resume a download at a later +/// time. +/// +/// Beginning with iOS 9 and Mac OS X 10.11, NSURLSessionStream is +/// available as a task type. This allows for direct TCP/IP connection +/// to a given host and port with optional secure handshaking and +/// navigation of proxies. Data tasks may also be upgraded to a +/// NSURLSessionStream task via the HTTP Upgrade: header and appropriate +/// use of the pipelining option of NSURLSessionConfiguration. See RFC +/// 2817 and RFC 6455 for information about the Upgrade: header, and +/// comments below on turning data tasks into stream tasks. +/// +/// An NSURLSessionWebSocketTask is a task that allows clients to connect to servers supporting +/// WebSocket. The task will perform the HTTP handshake to upgrade the connection +/// and once the WebSocket handshake is successful, the client can read and write +/// messages that will be framed using the WebSocket protocol by the framework. +class NSURLSession extends NSObject { + NSURLSession._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSURLComponents] that points to the same underlying object as [other]. - static NSURLComponents castFrom(T other) { - return NSURLComponents._(other._id, other._lib, - retain: true, release: true); + /// Returns a [NSURLSession] that points to the same underlying object as [other]. + static NSURLSession castFrom(T other) { + return NSURLSession._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSURLComponents] that wraps the given raw object pointer. - static NSURLComponents castFromPointer( + /// Returns a [NSURLSession] that wraps the given raw object pointer. + static NSURLSession castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSURLComponents._(other, lib, retain: retain, release: release); + return NSURLSession._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSURLComponents]. + /// Returns whether [obj] is an instance of [NSURLSession]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLComponents1); - } - - /// Initialize a NSURLComponents with all components undefined. Designated initializer. - @override - NSURLComponents init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } - - /// Initialize a NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. - NSURLComponents initWithURL_resolvingAgainstBaseURL_( - NSURL? url, bool resolve) { - final _ret = _lib._objc_msgSend_206( - _id, - _lib._sel_initWithURL_resolvingAgainstBaseURL_1, - url?._id ?? ffi.nullptr, - resolve); - return NSURLComponents._(_ret, _lib, retain: true, release: true); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLSession1); } - /// Initializes and returns a newly created NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. - static NSURLComponents componentsWithURL_resolvingAgainstBaseURL_( - NativeCupertinoHttp _lib, NSURL? url, bool resolve) { - final _ret = _lib._objc_msgSend_206( - _lib._class_NSURLComponents1, - _lib._sel_componentsWithURL_resolvingAgainstBaseURL_1, - url?._id ?? ffi.nullptr, - resolve); - return NSURLComponents._(_ret, _lib, retain: true, release: true); + /// The shared session uses the currently set global NSURLCache, + /// NSHTTPCookieStorage and NSURLCredentialStorage objects. + static NSURLSession? getSharedSession(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_387( + _lib._class_NSURLSession1, _lib._sel_sharedSession1); + return _ret.address == 0 + ? null + : NSURLSession._(_ret, _lib, retain: true, release: true); } - /// Initialize a NSURLComponents with a URL string. If the URLString is malformed, nil is returned. - NSURLComponents initWithString_(NSString? URLString) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); - return NSURLComponents._(_ret, _lib, retain: true, release: true); + /// Customization of NSURLSession occurs during creation of a new session. + /// If you only need to use the convenience routines with custom + /// configuration options it is not necessary to specify a delegate. + /// If you do specify a delegate, the delegate will be retained until after + /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. + static NSURLSession sessionWithConfiguration_( + NativeCupertinoHttp _lib, NSURLSessionConfiguration? configuration) { + final _ret = _lib._objc_msgSend_402( + _lib._class_NSURLSession1, + _lib._sel_sessionWithConfiguration_1, + configuration?._id ?? ffi.nullptr); + return NSURLSession._(_ret, _lib, retain: true, release: true); } - /// Initializes and returns a newly created NSURLComponents with a URL string. If the URLString is malformed, nil is returned. - static NSURLComponents componentsWithString_( - NativeCupertinoHttp _lib, NSString? URLString) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSURLComponents1, - _lib._sel_componentsWithString_1, URLString?._id ?? ffi.nullptr); - return NSURLComponents._(_ret, _lib, retain: true, release: true); + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NativeCupertinoHttp _lib, + NSURLSessionConfiguration? configuration, + NSObject? delegate, + NSOperationQueue? queue) { + final _ret = _lib._objc_msgSend_403( + _lib._class_NSURLSession1, + _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, + configuration?._id ?? ffi.nullptr, + delegate?._id ?? ffi.nullptr, + queue?._id ?? ffi.nullptr); + return NSURLSession._(_ret, _lib, retain: true, release: true); } - /// Returns a URL created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + NSOperationQueue? get delegateQueue { + final _ret = _lib._objc_msgSend_349(_id, _lib._sel_delegateQueue1); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); + : NSOperationQueue._(_ret, _lib, retain: true, release: true); } - /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSURL URLRelativeToURL_(NSURL? baseURL) { - final _ret = _lib._objc_msgSend_457( - _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + NSObject? get delegate { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - /// Returns a URL string created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSString? get string { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); + NSURLSessionConfiguration? get configuration { + final _ret = _lib._objc_msgSend_388(_id, _lib._sel_configuration1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - /// Attempting to set the scheme with an invalid scheme string will cause an exception. - NSString? get scheme { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); + /// The sessionDescription property is available for the developer to + /// provide a descriptive label for the session. + NSString? get sessionDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_sessionDescription1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } - /// Attempting to set the scheme with an invalid scheme string will cause an exception. - set scheme(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); + /// The sessionDescription property is available for the developer to + /// provide a descriptive label for the session. + set sessionDescription(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); } - NSString? get user { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// -finishTasksAndInvalidate returns immediately and existing tasks will be allowed + /// to run to completion. New tasks may not be created. The session + /// will continue to make delegate callbacks until URLSession:didBecomeInvalidWithError: + /// has been issued. + /// + /// -finishTasksAndInvalidate and -invalidateAndCancel do not + /// have any effect on the shared session singleton. + /// + /// When invalidating a background session, it is not safe to create another background + /// session with the same identifier until URLSession:didBecomeInvalidWithError: has + /// been issued. + void finishTasksAndInvalidate() { + return _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); } - set user(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); + /// -invalidateAndCancel acts as -finishTasksAndInvalidate, but issues + /// -cancel to all outstanding tasks for this session. Note task + /// cancellation is subject to the state of the task, and some tasks may + /// have already have completed at the time they are sent -cancel. + void invalidateAndCancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); } - NSString? get password { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue. + void resetWithCompletionHandler_(ObjCBlock completionHandler) { + return _lib._objc_msgSend_345( + _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); } - set password(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); + /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue. + void flushWithCompletionHandler_(ObjCBlock completionHandler) { + return _lib._objc_msgSend_345( + _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); } - NSString? get host { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// invokes completionHandler with outstanding data, upload and download tasks. + void getTasksWithCompletionHandler_(ObjCBlock38 completionHandler) { + return _lib._objc_msgSend_404( + _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); } - set host(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); + /// invokes completionHandler with all outstanding tasks. + void getAllTasksWithCompletionHandler_(ObjCBlock20 completionHandler) { + return _lib._objc_msgSend_405(_id, + _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._id); } - /// Attempting to set a negative port number will cause an exception. - NSNumber? get port { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + /// Creates a data task with the given request. The request may have a body stream. + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_406( + _id, _lib._sel_dataTaskWithRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } - /// Attempting to set a negative port number will cause an exception. - set port(NSNumber? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); + /// Creates a data task to retrieve the contents of the given URL. + NSURLSessionDataTask dataTaskWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_407( + _id, _lib._sel_dataTaskWithURL_1, url?._id ?? ffi.nullptr); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } - NSString? get path { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest? request, NSURL? fileURL) { + final _ret = _lib._objc_msgSend_408( + _id, + _lib._sel_uploadTaskWithRequest_fromFile_1, + request?._id ?? ffi.nullptr, + fileURL?._id ?? ffi.nullptr); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } - set path(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); + /// Creates an upload task with the given request. The body of the request is provided from the bodyData. + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest? request, NSData? bodyData) { + final _ret = _lib._objc_msgSend_409( + _id, + _lib._sel_uploadTaskWithRequest_fromData_1, + request?._id ?? ffi.nullptr, + bodyData?._id ?? ffi.nullptr); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } - NSString? get query { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_410(_id, + _lib._sel_uploadTaskWithStreamedRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } - set query(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); + /// Creates a download task with the given request. + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_412( + _id, _lib._sel_downloadTaskWithRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - NSString? get fragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates a download task to download the contents of the given URL. + NSURLSessionDownloadTask downloadTaskWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_413( + _id, _lib._sel_downloadTaskWithURL_1, url?._id ?? ffi.nullptr); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - set fragment(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); + /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. + NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData? resumeData) { + final _ret = _lib._objc_msgSend_414(_id, + _lib._sel_downloadTaskWithResumeData_1, resumeData?._id ?? ffi.nullptr); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - NSString? get percentEncodedUser { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedUser1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates a bidirectional stream task to a given host and port. + NSURLSessionStreamTask streamTaskWithHostName_port_( + NSString? hostname, int port) { + final _ret = _lib._objc_msgSend_417( + _id, + _lib._sel_streamTaskWithHostName_port_1, + hostname?._id ?? ffi.nullptr, + port); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); } - /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - set percentEncodedUser(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); + /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. + /// The NSNetService will be resolved before any IO completes. + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService? service) { + final _ret = _lib._objc_msgSend_418( + _id, _lib._sel_streamTaskWithNetService_1, service?._id ?? ffi.nullptr); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); } - NSString? get percentEncodedPassword { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPassword1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. + NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_425( + _id, _lib._sel_webSocketTaskWithURL_1, url?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } - set percentEncodedPassword(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); + /// Creates a WebSocket task given the url and an array of protocols. The protocols will be used in the WebSocket handshake to + /// negotiate a preferred protocol with the server + /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + NSURL? url, NSArray? protocols) { + final _ret = _lib._objc_msgSend_426( + _id, + _lib._sel_webSocketTaskWithURL_protocols_1, + url?._id ?? ffi.nullptr, + protocols?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } - NSString? get percentEncodedHost { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedHost1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates a WebSocket task given the request. The request properties can be modified and will be used by the task during the HTTP handshake phase. + /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol + /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_427( + _id, _lib._sel_webSocketTaskWithRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } - set percentEncodedHost(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); + @override + NSURLSession init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSession._(_ret, _lib, retain: true, release: true); } - NSString? get percentEncodedPath { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSURLSession new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_new1); + return NSURLSession._(_ret, _lib, retain: false, release: true); } - set percentEncodedPath(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); + /// data task convenience methods. These methods create tasks that + /// bypass the normal delegate calls for response and data delivery, + /// and provide a simple cancelable asynchronous interface to receiving + /// data. Errors will be returned in the NSURLErrorDomain, + /// see . The delegate, if any, will still be + /// called for authentication challenges. + NSURLSessionDataTask dataTaskWithRequest_completionHandler_( + NSURLRequest? request, ObjCBlock43 completionHandler) { + final _ret = _lib._objc_msgSend_428( + _id, + _lib._sel_dataTaskWithRequest_completionHandler_1, + request?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } - NSString? get percentEncodedQuery { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedQuery1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSURLSessionDataTask dataTaskWithURL_completionHandler_( + NSURL? url, ObjCBlock43 completionHandler) { + final _ret = _lib._objc_msgSend_429( + _id, + _lib._sel_dataTaskWithURL_completionHandler_1, + url?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } - set percentEncodedQuery(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); + /// upload convenience method. + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest? request, NSURL? fileURL, ObjCBlock43 completionHandler) { + final _ret = _lib._objc_msgSend_430( + _id, + _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, + request?._id ?? ffi.nullptr, + fileURL?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } - NSString? get percentEncodedFragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedFragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest? request, NSData? bodyData, ObjCBlock43 completionHandler) { + final _ret = _lib._objc_msgSend_431( + _id, + _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, + request?._id ?? ffi.nullptr, + bodyData?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } - set percentEncodedFragment(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); + /// download task convenience methods. When a download successfully + /// completes, the NSURL will point to a file that must be read or + /// copied during the invocation of the completion routine. The file + /// will be removed automatically. + NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( + NSURLRequest? request, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_432( + _id, + _lib._sel_downloadTaskWithRequest_completionHandler_1, + request?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - /// These properties return the character range of a component in the URL string returned by -[NSURLComponents string]. If the component does not exist in the NSURLComponents object, {NSNotFound, 0} is returned. Note: Zero length components are legal. For example, the URL string "scheme://:@/?#" has a zero length user, password, host, query and fragment; the URL strings "scheme:" and "" both have a zero length path. - NSRange get rangeOfScheme { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfScheme1); + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( + NSURL? url, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_433( + _id, + _lib._sel_downloadTaskWithURL_completionHandler_1, + url?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - NSRange get rangeOfUser { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfUser1); + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + NSData? resumeData, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_434( + _id, + _lib._sel_downloadTaskWithResumeData_completionHandler_1, + resumeData?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - NSRange get rangeOfPassword { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPassword1); + static NSURLSession alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_alloc1); + return NSURLSession._(_ret, _lib, retain: false, release: true); } +} - NSRange get rangeOfHost { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfHost1); - } +/// Configuration options for an NSURLSession. When a session is +/// created, a copy of the configuration object is made - you cannot +/// modify the configuration of a session after it has been created. +/// +/// The shared session uses the global singleton credential, cache +/// and cookie storage objects. +/// +/// An ephemeral session has no persistent disk storage for cookies, +/// cache or credentials. +/// +/// A background session can be used to perform networking operations +/// on behalf of a suspended application, within certain constraints. +class NSURLSessionConfiguration extends NSObject { + NSURLSessionConfiguration._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - NSRange get rangeOfPort { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPort1); + /// Returns a [NSURLSessionConfiguration] that points to the same underlying object as [other]. + static NSURLSessionConfiguration castFrom(T other) { + return NSURLSessionConfiguration._(other._id, other._lib, + retain: true, release: true); } - NSRange get rangeOfPath { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPath1); + /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. + static NSURLSessionConfiguration castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionConfiguration._(other, lib, + retain: retain, release: release); } - NSRange get rangeOfQuery { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfQuery1); + /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionConfiguration1); } - NSRange get rangeOfFragment { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfFragment1); + static NSURLSessionConfiguration? getDefaultSessionConfiguration( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_388(_lib._class_NSURLSessionConfiguration1, + _lib._sel_defaultSessionConfiguration1); + return _ret.address == 0 + ? null + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - /// The query component as an array of NSURLQueryItems for this NSURLComponents. - /// - /// Each NSURLQueryItem represents a single key-value pair, - /// - /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. - /// - /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. - /// - /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. - /// - /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. - NSArray? get queryItems { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_queryItems1); + static NSURLSessionConfiguration? getEphemeralSessionConfiguration( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_388(_lib._class_NSURLSessionConfiguration1, + _lib._sel_ephemeralSessionConfiguration1); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - /// The query component as an array of NSURLQueryItems for this NSURLComponents. - /// - /// Each NSURLQueryItem represents a single key-value pair, - /// - /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. - /// - /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. - /// - /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. - /// - /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. - set queryItems(NSArray? value) { - _lib._objc_msgSend_392( - _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); + static NSURLSessionConfiguration + backgroundSessionConfigurationWithIdentifier_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_389( + _lib._class_NSURLSessionConfiguration1, + _lib._sel_backgroundSessionConfigurationWithIdentifier_1, + identifier?._id ?? ffi.nullptr); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. - /// - /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. - NSArray? get percentEncodedQueryItems { - final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_percentEncodedQueryItems1); + /// identifier for the background session configuration + NSString? get identifier { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_identifier1); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. - /// - /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. - set percentEncodedQueryItems(NSArray? value) { - _lib._objc_msgSend_392(_id, _lib._sel_setPercentEncodedQueryItems_1, - value?._id ?? ffi.nullptr); + /// default cache policy for requests + int get requestCachePolicy { + return _lib._objc_msgSend_359(_id, _lib._sel_requestCachePolicy1); } - static NSURLComponents new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_new1); - return NSURLComponents._(_ret, _lib, retain: false, release: true); + /// default cache policy for requests + set requestCachePolicy(int value) { + _lib._objc_msgSend_363(_id, _lib._sel_setRequestCachePolicy_1, value); } - static NSURLComponents alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_alloc1); - return NSURLComponents._(_ret, _lib, retain: false, release: true); + /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. + double get timeoutIntervalForRequest { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForRequest1); } -} -/// NSFileSecurity encapsulates a file system object's security information. NSFileSecurity and CFFileSecurity are toll-free bridged. Use the CFFileSecurity API for access to the low-level file security properties encapsulated by NSFileSecurity. -class NSFileSecurity extends NSObject { - NSFileSecurity._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. + set timeoutIntervalForRequest(double value) { + _lib._objc_msgSend_341( + _id, _lib._sel_setTimeoutIntervalForRequest_1, value); + } - /// Returns a [NSFileSecurity] that points to the same underlying object as [other]. - static NSFileSecurity castFrom(T other) { - return NSFileSecurity._(other._id, other._lib, retain: true, release: true); + /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. + double get timeoutIntervalForResource { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForResource1); } - /// Returns a [NSFileSecurity] that wraps the given raw object pointer. - static NSFileSecurity castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileSecurity._(other, lib, retain: retain, release: release); + /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. + set timeoutIntervalForResource(double value) { + _lib._objc_msgSend_341( + _id, _lib._sel_setTimeoutIntervalForResource_1, value); } - /// Returns whether [obj] is an instance of [NSFileSecurity]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSFileSecurity1); + /// type of service for requests. + int get networkServiceType { + return _lib._objc_msgSend_360(_id, _lib._sel_networkServiceType1); } - NSFileSecurity initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSFileSecurity._(_ret, _lib, retain: true, release: true); + /// type of service for requests. + set networkServiceType(int value) { + _lib._objc_msgSend_364(_id, _lib._sel_setNetworkServiceType_1, value); } - static NSFileSecurity new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_new1); - return NSFileSecurity._(_ret, _lib, retain: false, release: true); + /// allow request to route over cellular. + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); } - static NSFileSecurity alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_alloc1); - return NSFileSecurity._(_ret, _lib, retain: false, release: true); + /// allow request to route over cellular. + set allowsCellularAccess(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setAllowsCellularAccess_1, value); } -} -/// ! -/// @class NSHTTPURLResponse -/// -/// @abstract An NSHTTPURLResponse object represents a response to an -/// HTTP URL load. It is a specialization of NSURLResponse which -/// provides conveniences for accessing information specific to HTTP -/// protocol responses. -class NSHTTPURLResponse extends NSURLResponse { - NSHTTPURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// allow request to route over expensive networks. Defaults to YES. + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } - /// Returns a [NSHTTPURLResponse] that points to the same underlying object as [other]. - static NSHTTPURLResponse castFrom(T other) { - return NSHTTPURLResponse._(other._id, other._lib, - retain: true, release: true); + /// allow request to route over expensive networks. Defaults to YES. + set allowsExpensiveNetworkAccess(bool value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); } - /// Returns a [NSHTTPURLResponse] that wraps the given raw object pointer. - static NSHTTPURLResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPURLResponse._(other, lib, retain: retain, release: release); + /// allow request to route over networks in constrained mode. Defaults to YES. + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); } - /// Returns whether [obj] is an instance of [NSHTTPURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSHTTPURLResponse1); + /// allow request to route over networks in constrained mode. Defaults to YES. + set allowsConstrainedNetworkAccess(bool value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); } - /// ! - /// @method initWithURL:statusCode:HTTPVersion:headerFields: - /// @abstract initializer for NSHTTPURLResponse objects. - /// @param url the URL from which the response was generated. - /// @param statusCode an HTTP status code. - /// @param HTTPVersion The version of the HTTP response as represented by the server. This is typically represented as "HTTP/1.1". - /// @param headerFields A dictionary representing the header keys and values of the server response. - /// @result the instance of the object, or NULL if an error occurred during initialization. - /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. - NSHTTPURLResponse initWithURL_statusCode_HTTPVersion_headerFields_(NSURL? url, - int statusCode, NSString? HTTPVersion, NSDictionary? headerFields) { - final _ret = _lib._objc_msgSend_458( - _id, - _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, - url?._id ?? ffi.nullptr, - statusCode, - HTTPVersion?._id ?? ffi.nullptr, - headerFields?._id ?? ffi.nullptr); - return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. + bool get requiresDNSSECValidation { + return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); } - /// ! - /// @abstract Returns the HTTP status code of the receiver. - /// @result The HTTP status code of the receiver. - int get statusCode { - return _lib._objc_msgSend_81(_id, _lib._sel_statusCode1); + /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. + set requiresDNSSECValidation(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setRequiresDNSSECValidation_1, value); } - /// ! - /// @abstract Returns a dictionary containing all the HTTP header fields - /// of the receiver. - /// @discussion By examining this header dictionary, clients can see - /// the "raw" header information which was reported to the protocol - /// implementation by the HTTP server. This may be of use to - /// sophisticated or special-purpose HTTP clients. - /// @result A dictionary containing all the HTTP header fields of the - /// receiver. - NSDictionary? get allHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHeaderFields1); + /// Causes tasks to wait for network connectivity to become available, rather + /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) + /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest + /// property does not apply, but the timeoutIntervalForResource property does. + /// + /// Unsatisfactory connectivity (that requires waiting) includes cases where the + /// device has limited or insufficient connectivity for a task (e.g., only has a + /// cellular connection but the allowsCellularAccess property is NO, or requires + /// a VPN connection in order to reach the desired host). + /// + /// Default value is NO. Ignored by background sessions, as background sessions + /// always wait for connectivity. + bool get waitsForConnectivity { + return _lib._objc_msgSend_11(_id, _lib._sel_waitsForConnectivity1); + } + + /// Causes tasks to wait for network connectivity to become available, rather + /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) + /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest + /// property does not apply, but the timeoutIntervalForResource property does. + /// + /// Unsatisfactory connectivity (that requires waiting) includes cases where the + /// device has limited or insufficient connectivity for a task (e.g., only has a + /// cellular connection but the allowsCellularAccess property is NO, or requires + /// a VPN connection in order to reach the desired host). + /// + /// Default value is NO. Ignored by background sessions, as background sessions + /// always wait for connectivity. + set waitsForConnectivity(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setWaitsForConnectivity_1, value); + } + + /// allows background tasks to be scheduled at the discretion of the system for optimal performance. + bool get discretionary { + return _lib._objc_msgSend_11(_id, _lib._sel_isDiscretionary1); + } + + /// allows background tasks to be scheduled at the discretion of the system for optimal performance. + set discretionary(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setDiscretionary_1, value); + } + + /// The identifier of the shared data container into which files in background sessions should be downloaded. + /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or + /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. + NSString? get sharedContainerIdentifier { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_sharedContainerIdentifier1); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - /// ! - /// @method valueForHTTPHeaderField: - /// @abstract Returns the value which corresponds to the given header - /// field. Note that, in keeping with the HTTP RFC, HTTP header field - /// names are case-insensitive. - /// @param field the header field name to use for the lookup - /// (case-insensitive). - /// @result the value associated with the given header field, or nil if - /// there is no value associated with the given header field. - NSString valueForHTTPHeaderField_(NSString? field) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + /// The identifier of the shared data container into which files in background sessions should be downloaded. + /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or + /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. + set sharedContainerIdentifier(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setSharedContainerIdentifier_1, + value?._id ?? ffi.nullptr); } - /// ! - /// @method localizedStringForStatusCode: - /// @abstract Convenience method which returns a localized string - /// corresponding to the status code for this response. - /// @param statusCode the status code to use to produce a localized string. - /// @result A localized string corresponding to the given status code. - static NSString localizedStringForStatusCode_( - NativeCupertinoHttp _lib, int statusCode) { - final _ret = _lib._objc_msgSend_459(_lib._class_NSHTTPURLResponse1, - _lib._sel_localizedStringForStatusCode_1, statusCode); - return NSString._(_ret, _lib, retain: true, release: true); + /// Allows the app to be resumed or launched in the background when tasks in background sessions complete + /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: + /// and the default value is YES. + /// + /// NOTE: macOS apps based on AppKit do not support background launch. + bool get sessionSendsLaunchEvents { + return _lib._objc_msgSend_11(_id, _lib._sel_sessionSendsLaunchEvents1); } - static NSHTTPURLResponse new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_new1); - return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + /// Allows the app to be resumed or launched in the background when tasks in background sessions complete + /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: + /// and the default value is YES. + /// + /// NOTE: macOS apps based on AppKit do not support background launch. + set sessionSendsLaunchEvents(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); } - static NSHTTPURLResponse alloc(NativeCupertinoHttp _lib) { + /// The proxy dictionary, as described by + NSDictionary? get connectionProxyDictionary { final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_alloc1); - return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_180(_id, _lib._sel_connectionProxyDictionary1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } -} -class NSException extends NSObject { - NSException._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// The proxy dictionary, as described by + set connectionProxyDictionary(NSDictionary? value) { + _lib._objc_msgSend_366(_id, _lib._sel_setConnectionProxyDictionary_1, + value?._id ?? ffi.nullptr); + } - /// Returns a [NSException] that points to the same underlying object as [other]. - static NSException castFrom(T other) { - return NSException._(other._id, other._lib, retain: true, release: true); + /// The minimum allowable versions of the TLS protocol, from + int get TLSMinimumSupportedProtocol { + return _lib._objc_msgSend_390(_id, _lib._sel_TLSMinimumSupportedProtocol1); } - /// Returns a [NSException] that wraps the given raw object pointer. - static NSException castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSException._(other, lib, retain: retain, release: release); + /// The minimum allowable versions of the TLS protocol, from + set TLSMinimumSupportedProtocol(int value) { + _lib._objc_msgSend_391( + _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); } - /// Returns whether [obj] is an instance of [NSException]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSException1); + /// The maximum allowable versions of the TLS protocol, from + int get TLSMaximumSupportedProtocol { + return _lib._objc_msgSend_390(_id, _lib._sel_TLSMaximumSupportedProtocol1); } - static NSException exceptionWithName_reason_userInfo_( - NativeCupertinoHttp _lib, - NSExceptionName name, - NSString? reason, - NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_460( - _lib._class_NSException1, - _lib._sel_exceptionWithName_reason_userInfo_1, - name, - reason?._id ?? ffi.nullptr, - userInfo?._id ?? ffi.nullptr); - return NSException._(_ret, _lib, retain: true, release: true); + /// The maximum allowable versions of the TLS protocol, from + set TLSMaximumSupportedProtocol(int value) { + _lib._objc_msgSend_391( + _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); } - NSException initWithName_reason_userInfo_( - NSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_461( - _id, - _lib._sel_initWithName_reason_userInfo_1, - aName, - aReason?._id ?? ffi.nullptr, - aUserInfo?._id ?? ffi.nullptr); - return NSException._(_ret, _lib, retain: true, release: true); + /// The minimum allowable versions of the TLS protocol, from + int get TLSMinimumSupportedProtocolVersion { + return _lib._objc_msgSend_392( + _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); } - NSExceptionName get name { - return _lib._objc_msgSend_32(_id, _lib._sel_name1); + /// The minimum allowable versions of the TLS protocol, from + set TLSMinimumSupportedProtocolVersion(int value) { + _lib._objc_msgSend_393( + _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); } - NSString? get reason { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_reason1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// The maximum allowable versions of the TLS protocol, from + int get TLSMaximumSupportedProtocolVersion { + return _lib._objc_msgSend_392( + _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + /// The maximum allowable versions of the TLS protocol, from + set TLSMaximumSupportedProtocolVersion(int value) { + _lib._objc_msgSend_393( + _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); } - NSArray? get callStackReturnAddresses { - final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_callStackReturnAddresses1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + /// Allow the use of HTTP pipelining + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); } - NSArray? get callStackSymbols { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_callStackSymbols1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + /// Allow the use of HTTP pipelining + set HTTPShouldUsePipelining(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); } - void raise() { - return _lib._objc_msgSend_1(_id, _lib._sel_raise1); + /// Allow the session to set cookies on requests + bool get HTTPShouldSetCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldSetCookies1); } - static void raise_format_( - NativeCupertinoHttp _lib, NSExceptionName name, NSString? format) { - return _lib._objc_msgSend_361(_lib._class_NSException1, - _lib._sel_raise_format_1, name, format?._id ?? ffi.nullptr); + /// Allow the session to set cookies on requests + set HTTPShouldSetCookies(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldSetCookies_1, value); } - static void raise_format_arguments_(NativeCupertinoHttp _lib, - NSExceptionName name, NSString? format, va_list argList) { - return _lib._objc_msgSend_462( - _lib._class_NSException1, - _lib._sel_raise_format_arguments_1, - name, - format?._id ?? ffi.nullptr, - argList); + /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. + int get HTTPCookieAcceptPolicy { + return _lib._objc_msgSend_375(_id, _lib._sel_HTTPCookieAcceptPolicy1); } - static NSException new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_new1); - return NSException._(_ret, _lib, retain: false, release: true); + /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. + set HTTPCookieAcceptPolicy(int value) { + _lib._objc_msgSend_376(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); } - static NSException alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); - return NSException._(_ret, _lib, retain: false, release: true); + /// Specifies additional headers which will be set on outgoing requests. + /// Note that these headers are added to the request only if not already present. + NSDictionary? get HTTPAdditionalHeaders { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_HTTPAdditionalHeaders1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } -} -typedef NSUncaughtExceptionHandler - = ffi.NativeFunction)>; + /// Specifies additional headers which will be set on outgoing requests. + /// Note that these headers are added to the request only if not already present. + set HTTPAdditionalHeaders(NSDictionary? value) { + _lib._objc_msgSend_366( + _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); + } -class NSAssertionHandler extends NSObject { - NSAssertionHandler._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// The maximum number of simultaneous persistent connections per host + int get HTTPMaximumConnectionsPerHost { + return _lib._objc_msgSend_81(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); + } - /// Returns a [NSAssertionHandler] that points to the same underlying object as [other]. - static NSAssertionHandler castFrom(T other) { - return NSAssertionHandler._(other._id, other._lib, - retain: true, release: true); + /// The maximum number of simultaneous persistent connections per host + set HTTPMaximumConnectionsPerHost(int value) { + _lib._objc_msgSend_346( + _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); } - /// Returns a [NSAssertionHandler] that wraps the given raw object pointer. - static NSAssertionHandler castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSAssertionHandler._(other, lib, retain: retain, release: release); + /// The cookie storage object to use, or nil to indicate that no cookies should be handled + NSHTTPCookieStorage? get HTTPCookieStorage { + final _ret = _lib._objc_msgSend_370(_id, _lib._sel_HTTPCookieStorage1); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSAssertionHandler]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSAssertionHandler1); + /// The cookie storage object to use, or nil to indicate that no cookies should be handled + set HTTPCookieStorage(NSHTTPCookieStorage? value) { + _lib._objc_msgSend_394( + _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); } - static NSAssertionHandler? getCurrentHandler(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_463( - _lib._class_NSAssertionHandler1, _lib._sel_currentHandler1); + /// The credential storage object, or nil to indicate that no credential storage is to be used + NSURLCredentialStorage? get URLCredentialStorage { + final _ret = _lib._objc_msgSend_395(_id, _lib._sel_URLCredentialStorage1); return _ret.address == 0 ? null - : NSAssertionHandler._(_ret, _lib, retain: true, release: true); + : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); } - void handleFailureInMethod_object_file_lineNumber_description_( - ffi.Pointer selector, - NSObject object, - NSString? fileName, - int line, - NSString? format) { - return _lib._objc_msgSend_464( - _id, - _lib._sel_handleFailureInMethod_object_file_lineNumber_description_1, - selector, - object._id, - fileName?._id ?? ffi.nullptr, - line, - format?._id ?? ffi.nullptr); + /// The credential storage object, or nil to indicate that no credential storage is to be used + set URLCredentialStorage(NSURLCredentialStorage? value) { + _lib._objc_msgSend_396( + _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); } - void handleFailureInFunction_file_lineNumber_description_( - NSString? functionName, NSString? fileName, int line, NSString? format) { - return _lib._objc_msgSend_465( - _id, - _lib._sel_handleFailureInFunction_file_lineNumber_description_1, - functionName?._id ?? ffi.nullptr, - fileName?._id ?? ffi.nullptr, - line, - format?._id ?? ffi.nullptr); + /// The URL resource cache, or nil to indicate that no caching is to be performed + NSURLCache? get URLCache { + final _ret = _lib._objc_msgSend_397(_id, _lib._sel_URLCache1); + return _ret.address == 0 + ? null + : NSURLCache._(_ret, _lib, retain: true, release: true); } - static NSAssertionHandler new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_new1); - return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + /// The URL resource cache, or nil to indicate that no caching is to be performed + set URLCache(NSURLCache? value) { + _lib._objc_msgSend_398( + _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); } - static NSAssertionHandler alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_alloc1); - return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open + /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) + bool get shouldUseExtendedBackgroundIdleMode { + return _lib._objc_msgSend_11( + _id, _lib._sel_shouldUseExtendedBackgroundIdleMode1); } -} -class NSBlockOperation extends NSOperation { - NSBlockOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open + /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) + set shouldUseExtendedBackgroundIdleMode(bool value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); + } - /// Returns a [NSBlockOperation] that points to the same underlying object as [other]. - static NSBlockOperation castFrom(T other) { - return NSBlockOperation._(other._id, other._lib, - retain: true, release: true); + /// An optional array of Class objects which subclass NSURLProtocol. + /// The Class will be sent +canInitWithRequest: when determining if + /// an instance of the class can be used for a given URL scheme. + /// You should not use +[NSURLProtocol registerClass:], as that + /// method will register your class with the default session rather + /// than with an instance of NSURLSession. + /// Custom NSURLProtocol subclasses are not available to background + /// sessions. + NSArray? get protocolClasses { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_protocolClasses1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSBlockOperation] that wraps the given raw object pointer. - static NSBlockOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSBlockOperation._(other, lib, retain: retain, release: release); + /// An optional array of Class objects which subclass NSURLProtocol. + /// The Class will be sent +canInitWithRequest: when determining if + /// an instance of the class can be used for a given URL scheme. + /// You should not use +[NSURLProtocol registerClass:], as that + /// method will register your class with the default session rather + /// than with an instance of NSURLSession. + /// Custom NSURLProtocol subclasses are not available to background + /// sessions. + set protocolClasses(NSArray? value) { + _lib._objc_msgSend_399( + _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); } - /// Returns whether [obj] is an instance of [NSBlockOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSBlockOperation1); + /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone + int get multipathServiceType { + return _lib._objc_msgSend_400(_id, _lib._sel_multipathServiceType1); } - static NSBlockOperation blockOperationWithBlock_( - NativeCupertinoHttp _lib, ObjCBlock16 block) { - final _ret = _lib._objc_msgSend_466(_lib._class_NSBlockOperation1, - _lib._sel_blockOperationWithBlock_1, block._id); - return NSBlockOperation._(_ret, _lib, retain: true, release: true); + /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone + set multipathServiceType(int value) { + _lib._objc_msgSend_401(_id, _lib._sel_setMultipathServiceType_1, value); } - void addExecutionBlock_(ObjCBlock16 block) { - return _lib._objc_msgSend_341( - _id, _lib._sel_addExecutionBlock_1, block._id); + @override + NSURLSessionConfiguration init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - NSArray? get executionBlocks { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_executionBlocks1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static NSURLSessionConfiguration new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionConfiguration1, _lib._sel_new1); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, release: true); } - static NSBlockOperation new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_new1); - return NSBlockOperation._(_ret, _lib, retain: false, release: true); + static NSURLSessionConfiguration backgroundSessionConfiguration_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_389( + _lib._class_NSURLSessionConfiguration1, + _lib._sel_backgroundSessionConfiguration_1, + identifier?._id ?? ffi.nullptr); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - static NSBlockOperation alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_alloc1); - return NSBlockOperation._(_ret, _lib, retain: false, release: true); + static NSURLSessionConfiguration alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, release: true); } } -class NSInvocationOperation extends NSOperation { - NSInvocationOperation._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSURLCredentialStorage extends _ObjCWrapper { + NSURLCredentialStorage._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSInvocationOperation] that points to the same underlying object as [other]. - static NSInvocationOperation castFrom(T other) { - return NSInvocationOperation._(other._id, other._lib, + /// Returns a [NSURLCredentialStorage] that points to the same underlying object as [other]. + static NSURLCredentialStorage castFrom(T other) { + return NSURLCredentialStorage._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSInvocationOperation] that wraps the given raw object pointer. - static NSInvocationOperation castFromPointer( + /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. + static NSURLCredentialStorage castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSInvocationOperation._(other, lib, + return NSURLCredentialStorage._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSInvocationOperation]. + /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSInvocationOperation1); - } - - NSInvocationOperation initWithTarget_selector_object_( - NSObject target, ffi.Pointer sel, NSObject arg) { - final _ret = _lib._objc_msgSend_467(_id, - _lib._sel_initWithTarget_selector_object_1, target._id, sel, arg._id); - return NSInvocationOperation._(_ret, _lib, retain: true, release: true); - } - - NSInvocationOperation initWithInvocation_(NSInvocation? inv) { - final _ret = _lib._objc_msgSend_468( - _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); - return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + obj._lib._class_NSURLCredentialStorage1); } +} - NSInvocation? get invocation { - final _ret = _lib._objc_msgSend_469(_id, _lib._sel_invocation1); - return _ret.address == 0 - ? null - : NSInvocation._(_ret, _lib, retain: true, release: true); - } +class NSURLCache extends _ObjCWrapper { + NSURLCache._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - NSObject get result { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_result1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns a [NSURLCache] that points to the same underlying object as [other]. + static NSURLCache castFrom(T other) { + return NSURLCache._(other._id, other._lib, retain: true, release: true); } - static NSInvocationOperation new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocationOperation1, _lib._sel_new1); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + /// Returns a [NSURLCache] that wraps the given raw object pointer. + static NSURLCache castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLCache._(other, lib, retain: retain, release: release); } - static NSInvocationOperation alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocationOperation1, _lib._sel_alloc1); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSURLCache]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); } } -class _Dart_Isolate extends ffi.Opaque {} - -class _Dart_IsolateGroup extends ffi.Opaque {} - -class _Dart_Handle extends ffi.Opaque {} - -class _Dart_WeakPersistentHandle extends ffi.Opaque {} - -class _Dart_FinalizableHandle extends ffi.Opaque {} - -typedef Dart_WeakPersistentHandle = ffi.Pointer<_Dart_WeakPersistentHandle>; - -/// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the -/// version when changing this struct. -typedef Dart_HandleFinalizer = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef Dart_FinalizableHandle = ffi.Pointer<_Dart_FinalizableHandle>; - -class Dart_IsolateFlags extends ffi.Struct { - @ffi.Int32() - external int version; - - @ffi.Bool() - external bool enable_asserts; - - @ffi.Bool() - external bool use_field_guards; - - @ffi.Bool() - external bool use_osr; - - @ffi.Bool() - external bool obfuscate; - - @ffi.Bool() - external bool load_vmservice_library; - - @ffi.Bool() - external bool copy_parent_code; - - @ffi.Bool() - external bool null_safety; - - @ffi.Bool() - external bool is_system_isolate; -} - -/// Forward declaration -class Dart_CodeObserver extends ffi.Struct { - external ffi.Pointer data; - - external Dart_OnNewCodeCallback on_new_code; -} - -/// Callback provided by the embedder that is used by the VM to notify on code -/// object creation, *before* it is invoked the first time. -/// This is useful for embedders wanting to e.g. keep track of PCs beyond -/// the lifetime of the garbage collected code objects. -/// Note that an address range may be used by more than one code object over the -/// lifecycle of a process. Clients of this function should record timestamps for -/// these compilation events and when collecting PCs to disambiguate reused -/// address ranges. -typedef Dart_OnNewCodeCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - uintptr_t, uintptr_t)>>; - -/// Describes how to initialize the VM. Used with Dart_Initialize. -/// -/// \param version Identifies the version of the struct used by the client. -/// should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. -/// \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate -/// or NULL if no snapshot is provided. If provided, the buffer must remain -/// valid until Dart_Cleanup returns. -/// \param instructions_snapshot A buffer containing a snapshot of precompiled -/// instructions, or NULL if no snapshot is provided. If provided, the buffer -/// must remain valid until Dart_Cleanup returns. -/// \param initialize_isolate A function to be called during isolate -/// initialization inside an existing isolate group. -/// See Dart_InitializeIsolateCallback. -/// \param create_group A function to be called during isolate group creation. -/// See Dart_IsolateGroupCreateCallback. -/// \param shutdown A function to be called right before an isolate is shutdown. -/// See Dart_IsolateShutdownCallback. -/// \param cleanup A function to be called after an isolate was shutdown. -/// See Dart_IsolateCleanupCallback. -/// \param cleanup_group A function to be called after an isolate group is shutdown. -/// See Dart_IsolateGroupCleanupCallback. -/// \param get_service_assets A function to be called by the service isolate when -/// it requires the vmservice assets archive. -/// See Dart_GetVMServiceAssetsArchive. -/// \param code_observer An external code observer callback function. -/// The observer can be invoked as early as during the Dart_Initialize() call. -class Dart_InitializeParams extends ffi.Struct { - @ffi.Int32() - external int version; - - external ffi.Pointer vm_snapshot_data; - - external ffi.Pointer vm_snapshot_instructions; - - external Dart_IsolateGroupCreateCallback create_group; - - external Dart_InitializeIsolateCallback initialize_isolate; - - external Dart_IsolateShutdownCallback shutdown_isolate; - - external Dart_IsolateCleanupCallback cleanup_isolate; - - external Dart_IsolateGroupCleanupCallback cleanup_group; - - external Dart_ThreadExitCallback thread_exit; - - external Dart_FileOpenCallback file_open; - - external Dart_FileReadCallback file_read; - - external Dart_FileWriteCallback file_write; - - external Dart_FileCloseCallback file_close; - - external Dart_EntropySource entropy_source; - - external Dart_GetVMServiceAssetsArchive get_service_assets; - - @ffi.Bool() - external bool start_kernel_isolate; - - external ffi.Pointer code_observer; -} - -/// An isolate creation and initialization callback function. -/// -/// This callback, provided by the embedder, is called when the VM -/// needs to create an isolate. The callback should create an isolate -/// by calling Dart_CreateIsolateGroup and load any scripts required for -/// execution. -/// -/// This callback may be called on a different thread than the one -/// running the parent isolate. +/// ! +/// @enum NSURLSessionMultipathServiceType /// -/// When the function returns NULL, it is the responsibility of this -/// function to ensure that Dart_ShutdownIsolate has been called if -/// required (for example, if the isolate was created successfully by -/// Dart_CreateIsolateGroup() but the root library fails to load -/// successfully, then the function should call Dart_ShutdownIsolate -/// before returning). +/// @discussion The NSURLSessionMultipathServiceType enum defines constants that +/// can be used to specify the multipath service type to associate an NSURLSession. The +/// multipath service type determines whether multipath TCP should be attempted and the conditions +/// for creating and switching between subflows. Using these service types requires the appropriate entitlement. Any connection attempt will fail if the process does not have the required entitlement. +/// A primary interface is a generally less expensive interface in terms of both cost and power (such as WiFi or ethernet). A secondary interface is more expensive (such as 3G or LTE). /// -/// When the function returns NULL, the function should set *error to -/// a malloc-allocated buffer containing a useful error message. The -/// caller of this function (the VM) will make sure that the buffer is -/// freed. +/// @constant NSURLSessionMultipathServiceTypeNone Specifies that multipath tcp should not be used. Connections will use a single flow. +/// This is the default value. No entitlement is required to set this value. /// -/// \param script_uri The uri of the main source file or snapshot to load. -/// Either the URI of the parent isolate set in Dart_CreateIsolateGroup for -/// Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the -/// library tag handler of the parent isolate. -/// The callback is responsible for loading the program by a call to -/// Dart_LoadScriptFromKernel. -/// \param main The name of the main entry point this isolate will -/// eventually run. This is provided for advisory purposes only to -/// improve debugging messages. The main function is not invoked by -/// this function. -/// \param package_root Ignored. -/// \param package_config Uri of the package configuration file (either in format -/// of .packages or .dart_tool/package_config.json) for this isolate -/// to resolve package imports against. If this parameter is not passed the -/// package resolution of the parent isolate should be used. -/// \param flags Default flags for this isolate being spawned. Either inherited -/// from the spawning isolate or passed as parameters when spawning the -/// isolate from Dart code. -/// \param isolate_data The isolate data which was passed to the -/// parent isolate when it was created by calling Dart_CreateIsolateGroup(). -/// \param error A structure into which the embedder can place a -/// C string containing an error message in the case of failures. +/// @constant NSURLSessionMultipathServiceTypeHandover Specifies that a secondary subflow should only be used +/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entitlement. /// -/// \return The embedder returns NULL if the creation and -/// initialization was not successful and the isolate if successful. -typedef Dart_IsolateGroupCreateCallback = ffi.Pointer< - ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>; - -/// An isolate is the unit of concurrency in Dart. Each isolate has -/// its own memory and thread of control. No state is shared between -/// isolates. Instead, isolates communicate by message passing. +/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secondary subflow should be used if the +/// primary subflow is not performing adequately (packet loss, high round trip times, bandwidth issues). The secondary +/// subflow will be created more aggressively than with NSURLSessionMultipathServiceTypeHandover. Requires the com.apple.developer.networking.multipath entitlement. /// -/// Each thread keeps track of its current isolate, which is the -/// isolate which is ready to execute on the current thread. The -/// current isolate may be NULL, in which case no isolate is ready to -/// execute. Most of the Dart apis require there to be a current -/// isolate in order to function without error. The current isolate is -/// set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. -typedef Dart_Isolate = ffi.Pointer<_Dart_Isolate>; +/// @constant NSURLSessionMultipathServiceTypeAggregate Specifies that multiple subflows across multiple interfaces should be +/// used for better bandwidth. This mode is only available for experimentation on devices configured for development use. +/// It can be enabled in the Developer section of the Settings app. +abstract class NSURLSessionMultipathServiceType { + /// None - no multipath (default) + static const int NSURLSessionMultipathServiceTypeNone = 0; -/// An isolate initialization callback function. -/// -/// This callback, provided by the embedder, is called when the VM has created an -/// isolate within an existing isolate group (i.e. from the same source as an -/// existing isolate). -/// -/// The callback should setup native resolvers and might want to set a custom -/// message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as -/// runnable. -/// -/// This callback may be called on a different thread than the one -/// running the parent isolate. -/// -/// When the function returns `false`, it is the responsibility of this -/// function to ensure that `Dart_ShutdownIsolate` has been called. -/// -/// When the function returns `false`, the function should set *error to -/// a malloc-allocated buffer containing a useful error message. The -/// caller of this function (the VM) will make sure that the buffer is -/// freed. -/// -/// \param child_isolate_data The callback data to associate with the new -/// child isolate. -/// \param error A structure into which the embedder can place a -/// C string containing an error message in the case the initialization fails. -/// -/// \return The embedder returns true if the initialization was successful and -/// false otherwise (in which case the VM will terminate the isolate). -typedef Dart_InitializeIsolateCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer>, - ffi.Pointer>)>>; + /// Handover - secondary flows brought up when primary flow is not performing adequately. + static const int NSURLSessionMultipathServiceTypeHandover = 1; -/// An isolate shutdown callback function. -/// -/// This callback, provided by the embedder, is called before the vm -/// shuts down an isolate. The isolate being shutdown will be the current -/// isolate. It is safe to run Dart code. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -/// \param isolate_data The same callback data which was passed to the isolate -/// when it was created. -typedef Dart_IsolateShutdownCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + /// Interactive - secondary flows created more aggressively. + static const int NSURLSessionMultipathServiceTypeInteractive = 2; -/// An isolate cleanup callback function. -/// -/// This callback, provided by the embedder, is called after the vm -/// shuts down an isolate. There will be no current isolate and it is *not* -/// safe to run Dart code. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -/// \param isolate_data The same callback data which was passed to the isolate -/// when it was created. -typedef Dart_IsolateCleanupCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + /// Aggregate - multiple subflows used for greater bandwidth. + static const int NSURLSessionMultipathServiceTypeAggregate = 3; +} -/// An isolate group cleanup callback function. -/// -/// This callback, provided by the embedder, is called after the vm -/// shuts down an isolate group. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -typedef Dart_IsolateGroupCleanupCallback - = ffi.Pointer)>>; +void _ObjCBlock38_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} -/// A thread death callback function. -/// This callback, provided by the embedder, is called before a thread in the -/// vm thread pool exits. -/// This function could be used to dispose of native resources that -/// are associated and attached to the thread, in order to avoid leaks. -typedef Dart_ThreadExitCallback - = ffi.Pointer>; +final _ObjCBlock38_closureRegistry = {}; +int _ObjCBlock38_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock38_registerClosure(Function fn) { + final id = ++_ObjCBlock38_closureRegistryIndex; + _ObjCBlock38_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -/// Callbacks provided by the embedder for file operations. If the -/// embedder does not allow file operations these callbacks can be -/// NULL. -/// -/// Dart_FileOpenCallback - opens a file for reading or writing. -/// \param name The name of the file to open. -/// \param write A boolean variable which indicates if the file is to -/// opened for writing. If there is an existing file it needs to truncated. -/// -/// Dart_FileReadCallback - Read contents of file. -/// \param data Buffer allocated in the callback into which the contents -/// of the file are read into. It is the responsibility of the caller to -/// free this buffer. -/// \param file_length A variable into which the length of the file is returned. -/// In the case of an error this value would be -1. -/// \param stream Handle to the opened file. -/// -/// Dart_FileWriteCallback - Write data into file. -/// \param data Buffer which needs to be written into the file. -/// \param length Length of the buffer. -/// \param stream Handle to the opened file. -/// -/// Dart_FileCloseCallback - Closes the opened file. -/// \param stream Handle to the opened file. -typedef Dart_FileOpenCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Bool)>>; -typedef Dart_FileReadCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>>; -typedef Dart_FileWriteCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.IntPtr, ffi.Pointer)>>; -typedef Dart_FileCloseCallback - = ffi.Pointer)>>; -typedef Dart_EntropySource = ffi.Pointer< - ffi.NativeFunction, ffi.IntPtr)>>; +void _ObjCBlock38_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock38_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} -/// Callback provided by the embedder that is used by the vmservice isolate -/// to request the asset archive. The asset archive must be an uncompressed tar -/// archive that is stored in a Uint8List. -/// -/// If the embedder has no vmservice isolate assets, the callback can be NULL. -/// -/// \return The embedder must return a handle to a Uint8List containing an -/// uncompressed tar archive or null. -typedef Dart_GetVMServiceAssetsArchive - = ffi.Pointer>; -typedef Dart_IsolateGroup = ffi.Pointer<_Dart_IsolateGroup>; +class ObjCBlock38 extends _ObjCBlockBase { + ObjCBlock38._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -/// A message notification callback. -/// -/// This callback allows the embedder to provide an alternate wakeup -/// mechanism for the delivery of inter-isolate messages. It is the -/// responsibility of the embedder to call Dart_HandleMessage to -/// process the message. -typedef Dart_MessageNotifyCallback - = ffi.Pointer>; + /// Creates a block from a C function pointer. + ObjCBlock38.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock38_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -/// A port is used to send or receive inter-isolate messages -typedef Dart_Port = ffi.Int64; + /// Creates a block from a Dart function. + ObjCBlock38.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock38_closureTrampoline) + .cast(), + _ObjCBlock38_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } -abstract class Dart_CoreType_Id { - static const int Dart_CoreType_Dynamic = 0; - static const int Dart_CoreType_Int = 1; - static const int Dart_CoreType_String = 2; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -/// ========== -/// Typed Data -/// ========== -abstract class Dart_TypedData_Type { - static const int Dart_TypedData_kByteData = 0; - static const int Dart_TypedData_kInt8 = 1; - static const int Dart_TypedData_kUint8 = 2; - static const int Dart_TypedData_kUint8Clamped = 3; - static const int Dart_TypedData_kInt16 = 4; - static const int Dart_TypedData_kUint16 = 5; - static const int Dart_TypedData_kInt32 = 6; - static const int Dart_TypedData_kUint32 = 7; - static const int Dart_TypedData_kInt64 = 8; - static const int Dart_TypedData_kUint64 = 9; - static const int Dart_TypedData_kFloat32 = 10; - static const int Dart_TypedData_kFloat64 = 11; - static const int Dart_TypedData_kInt32x4 = 12; - static const int Dart_TypedData_kFloat32x4 = 13; - static const int Dart_TypedData_kFloat64x2 = 14; - static const int Dart_TypedData_kInvalid = 15; -} +/// An NSURLSessionDataTask does not provide any additional +/// functionality over an NSURLSessionTask and its presence is merely +/// to provide lexical differentiation from download and upload tasks. +class NSURLSessionDataTask extends NSURLSessionTask { + NSURLSessionDataTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class _Dart_NativeArguments extends ffi.Opaque {} + /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. + static NSURLSessionDataTask castFrom(T other) { + return NSURLSessionDataTask._(other._id, other._lib, + retain: true, release: true); + } -/// The arguments to a native function. -/// -/// This object is passed to a native function to represent its -/// arguments and return value. It allows access to the arguments to a -/// native function by index. It also allows the return value of a -/// native function to be set. -typedef Dart_NativeArguments = ffi.Pointer<_Dart_NativeArguments>; + /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. + static NSURLSessionDataTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionDataTask._(other, lib, retain: retain, release: release); + } -abstract class Dart_NativeArgument_Type { - static const int Dart_NativeArgument_kBool = 0; - static const int Dart_NativeArgument_kInt32 = 1; - static const int Dart_NativeArgument_kUint32 = 2; - static const int Dart_NativeArgument_kInt64 = 3; - static const int Dart_NativeArgument_kUint64 = 4; - static const int Dart_NativeArgument_kDouble = 5; - static const int Dart_NativeArgument_kString = 6; - static const int Dart_NativeArgument_kInstance = 7; - static const int Dart_NativeArgument_kNativeFields = 8; -} + /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionDataTask1); + } -class _Dart_NativeArgument_Descriptor extends ffi.Struct { - @ffi.Uint8() - external int type; + @override + NSURLSessionDataTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint8() - external int index; -} + static NSURLSessionDataTask new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } -class _Dart_NativeArgument_Value extends ffi.Opaque {} + static NSURLSessionDataTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } +} -typedef Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor; -typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; +/// An NSURLSessionUploadTask does not currently provide any additional +/// functionality over an NSURLSessionDataTask. All delegate messages +/// that may be sent referencing an NSURLSessionDataTask equally apply +/// to NSURLSessionUploadTasks. +class NSURLSessionUploadTask extends NSURLSessionDataTask { + NSURLSessionUploadTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -/// An environment lookup callback function. -/// -/// \param name The name of the value to lookup in the environment. -/// -/// \return A valid handle to a string if the name exists in the -/// current environment or Dart_Null() if not. -typedef Dart_EnvironmentCallback - = ffi.Pointer>; + /// Returns a [NSURLSessionUploadTask] that points to the same underlying object as [other]. + static NSURLSessionUploadTask castFrom(T other) { + return NSURLSessionUploadTask._(other._id, other._lib, + retain: true, release: true); + } -/// Native entry resolution callback. -/// -/// For libraries and scripts which have native functions, the embedder -/// can provide a native entry resolver. This callback is used to map a -/// name/arity to a Dart_NativeFunction. If no function is found, the -/// callback should return NULL. -/// -/// The parameters to the native resolver function are: -/// \param name a Dart string which is the name of the native function. -/// \param num_of_arguments is the number of arguments expected by the -/// native function. -/// \param auto_setup_scope is a boolean flag that can be set by the resolver -/// to indicate if this function needs a Dart API scope (see Dart_EnterScope/ -/// Dart_ExitScope) to be setup automatically by the VM before calling into -/// the native function. By default most native functions would require this -/// to be true but some light weight native functions which do not call back -/// into the VM through the Dart API may not require a Dart scope to be -/// setup automatically. -/// -/// \return A valid Dart_NativeFunction which resolves to a native entry point -/// for the native function. -/// -/// See Dart_SetNativeResolver. -typedef Dart_NativeEntryResolver = ffi.Pointer< - ffi.NativeFunction< - Dart_NativeFunction Function( - ffi.Handle, ffi.Int, ffi.Pointer)>>; + /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. + static NSURLSessionUploadTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionUploadTask._(other, lib, + retain: retain, release: release); + } -/// A native function. -typedef Dart_NativeFunction - = ffi.Pointer>; + /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionUploadTask1); + } -/// Native entry symbol lookup callback. -/// -/// For libraries and scripts which have native functions, the embedder -/// can provide a callback for mapping a native entry to a symbol. This callback -/// maps a native function entry PC to the native function name. If no native -/// entry symbol can be found, the callback should return NULL. -/// -/// The parameters to the native reverse resolver function are: -/// \param nf A Dart_NativeFunction. -/// -/// \return A const UTF-8 string containing the symbol name or NULL. -/// -/// See Dart_SetNativeResolver. -typedef Dart_NativeEntrySymbol = ffi.Pointer< - ffi.NativeFunction Function(Dart_NativeFunction)>>; + @override + NSURLSessionUploadTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } -/// FFI Native C function pointer resolver callback. -/// -/// See Dart_SetFfiNativeResolver. -typedef Dart_FfiNativeResolver = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, uintptr_t)>>; + static NSURLSessionUploadTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionUploadTask1, _lib._sel_new1); + return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + } -/// ===================== -/// Scripts and Libraries -/// ===================== -abstract class Dart_LibraryTag { - static const int Dart_kCanonicalizeUrl = 0; - static const int Dart_kImportTag = 1; - static const int Dart_kKernelTag = 2; + static NSURLSessionUploadTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionUploadTask1, _lib._sel_alloc1); + return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + } } -/// The library tag handler is a multi-purpose callback provided by the -/// embedder to the Dart VM. The embedder implements the tag handler to -/// provide the ability to load Dart scripts and imports. -/// -/// -- TAGS -- -/// -/// Dart_kCanonicalizeUrl -/// -/// This tag indicates that the embedder should canonicalize 'url' with -/// respect to 'library'. For most embedders, the -/// Dart_DefaultCanonicalizeUrl function is a sufficient implementation -/// of this tag. The return value should be a string holding the -/// canonicalized url. -/// -/// Dart_kImportTag -/// -/// This tag is used to load a library from IsolateMirror.loadUri. The embedder -/// should call Dart_LoadLibraryFromKernel to provide the library to the VM. The -/// return value should be an error or library (the result from -/// Dart_LoadLibraryFromKernel). -/// -/// Dart_kKernelTag -/// -/// This tag is used to load the intermediate file (kernel) generated by -/// the Dart front end. This tag is typically used when a 'hot-reload' -/// of an application is needed and the VM is 'use dart front end' mode. -/// The dart front end typically compiles all the scripts, imports and part -/// files into one intermediate file hence we don't use the source/import or -/// script tags. The return value should be an error or a TypedData containing -/// the kernel bytes. -typedef Dart_LibraryTagHandler = ffi.Pointer< - ffi.NativeFunction>; +/// NSURLSessionDownloadTask is a task that represents a download to +/// local storage. +class NSURLSessionDownloadTask extends NSURLSessionTask { + NSURLSessionDownloadTask._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -/// Handles deferred loading requests. When this handler is invoked, it should -/// eventually load the deferred loading unit with the given id and call -/// Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is -/// recommended that the loading occur asynchronously, but it is permitted to -/// call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the -/// handler returns. -/// -/// If an error is returned, it will be propogated through -/// `prefix.loadLibrary()`. This is useful for synchronous -/// implementations, which must propogate any unwind errors from -/// Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler -/// should return a non-error such as `Dart_Null()`. -typedef Dart_DeferredLoadHandler - = ffi.Pointer>; + /// Returns a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. + static NSURLSessionDownloadTask castFrom(T other) { + return NSURLSessionDownloadTask._(other._id, other._lib, + retain: true, release: true); + } -/// TODO(33433): Remove kernel service from the embedding API. -abstract class Dart_KernelCompilationStatus { - static const int Dart_KernelCompilationStatus_Unknown = -1; - static const int Dart_KernelCompilationStatus_Ok = 0; - static const int Dart_KernelCompilationStatus_Error = 1; - static const int Dart_KernelCompilationStatus_Crash = 2; - static const int Dart_KernelCompilationStatus_MsgFailed = 3; -} + /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. + static NSURLSessionDownloadTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionDownloadTask._(other, lib, + retain: retain, release: release); + } -class Dart_KernelCompilationResult extends ffi.Struct { - @ffi.Int32() - external int status; + /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionDownloadTask1); + } - @ffi.Bool() - external bool null_safety; + /// Cancel the download (and calls the superclass -cancel). If + /// conditions will allow for resuming the download in the future, the + /// callback will be called with an opaque data blob, which may be used + /// with -downloadTaskWithResumeData: to attempt to resume the download. + /// If resume data cannot be created, the completion handler will be + /// called with nil resumeData. + void cancelByProducingResumeData_(ObjCBlock39 completionHandler) { + return _lib._objc_msgSend_411( + _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); + } - external ffi.Pointer error; + @override + NSURLSessionDownloadTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer kernel; + static NSURLSessionDownloadTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_new1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + } - @ffi.IntPtr() - external int kernel_size; + static NSURLSessionDownloadTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_alloc1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + } } -abstract class Dart_KernelCompilationVerbosityLevel { - static const int Dart_KernelCompilationVerbosityLevel_Error = 0; - static const int Dart_KernelCompilationVerbosityLevel_Warning = 1; - static const int Dart_KernelCompilationVerbosityLevel_Info = 2; - static const int Dart_KernelCompilationVerbosityLevel_All = 3; +void _ObjCBlock39_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); } -class Dart_SourceFile extends ffi.Struct { - external ffi.Pointer uri; +final _ObjCBlock39_closureRegistry = {}; +int _ObjCBlock39_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock39_registerClosure(Function fn) { + final id = ++_ObjCBlock39_closureRegistryIndex; + _ObjCBlock39_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external ffi.Pointer source; +void _ObjCBlock39_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock39_closureRegistry[block.ref.target.address]!(arg0); } -typedef Dart_StreamingWriteCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.IntPtr)>>; -typedef Dart_CreateLoadingUnitCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer>, - ffi.Pointer>)>>; -typedef Dart_StreamingCloseCallback - = ffi.Pointer)>>; +class ObjCBlock39 extends _ObjCBlockBase { + ObjCBlock39._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -/// A Dart_CObject is used for representing Dart objects as native C -/// data outside the Dart heap. These objects are totally detached from -/// the Dart heap. Only a subset of the Dart objects have a -/// representation as a Dart_CObject. -/// -/// The string encoding in the 'value.as_string' is UTF-8. + /// Creates a block from a C function pointer. + ObjCBlock39.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock39_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock39.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock39_closureTrampoline) + .cast(), + _ObjCBlock39_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +/// An NSURLSessionStreamTask provides an interface to perform reads +/// and writes to a TCP/IP stream created via NSURLSession. This task +/// may be explicitly created from an NSURLSession, or created as a +/// result of the appropriate disposition response to a +/// -URLSession:dataTask:didReceiveResponse: delegate message. /// -/// All the different types from dart:typed_data are exposed as type -/// kTypedData. The specific type from dart:typed_data is in the type -/// field of the as_typed_data structure. The length in the -/// as_typed_data structure is always in bytes. +/// NSURLSessionStreamTask can be used to perform asynchronous reads +/// and writes. Reads and writes are enqueued and executed serially, +/// with the completion handler being invoked on the sessions delegate +/// queue. If an error occurs, or the task is canceled, all +/// outstanding read and write calls will have their completion +/// handlers invoked with an appropriate error. /// -/// The data for kTypedData is copied on message send and ownership remains with -/// the caller. The ownership of data for kExternalTyped is passed to the VM on -/// message send and returned when the VM invokes the -/// Dart_HandleFinalizer callback; a non-NULL callback must be provided. -abstract class Dart_CObject_Type { - static const int Dart_CObject_kNull = 0; - static const int Dart_CObject_kBool = 1; - static const int Dart_CObject_kInt32 = 2; - static const int Dart_CObject_kInt64 = 3; - static const int Dart_CObject_kDouble = 4; - static const int Dart_CObject_kString = 5; - static const int Dart_CObject_kArray = 6; - static const int Dart_CObject_kTypedData = 7; - static const int Dart_CObject_kExternalTypedData = 8; - static const int Dart_CObject_kSendPort = 9; - static const int Dart_CObject_kCapability = 10; - static const int Dart_CObject_kNativePointer = 11; - static const int Dart_CObject_kUnsupported = 12; - static const int Dart_CObject_kNumberOfTypes = 13; -} +/// It is also possible to create NSInputStream and NSOutputStream +/// instances from an NSURLSessionTask by sending +/// -captureStreams to the task. All outstanding reads and writes are +/// completed before the streams are created. Once the streams are +/// delivered to the session delegate, the task is considered complete +/// and will receive no more messages. These streams are +/// disassociated from the underlying session. +class NSURLSessionStreamTask extends NSURLSessionTask { + NSURLSessionStreamTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class _Dart_CObject extends ffi.Struct { - @ffi.Int32() - external int type; + /// Returns a [NSURLSessionStreamTask] that points to the same underlying object as [other]. + static NSURLSessionStreamTask castFrom(T other) { + return NSURLSessionStreamTask._(other._id, other._lib, + retain: true, release: true); + } - external UnnamedUnion5 value; -} + /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. + static NSURLSessionStreamTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionStreamTask._(other, lib, + retain: retain, release: release); + } -class UnnamedUnion5 extends ffi.Union { - @ffi.Bool() - external bool as_bool; + /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionStreamTask1); + } - @ffi.Int32() - external int as_int32; + /// Read minBytes, or at most maxBytes bytes and invoke the completion + /// handler on the sessions delegate queue with the data or an error. + /// If an error occurs, any outstanding reads will also fail, and new + /// read requests will error out immediately. + void readDataOfMinLength_maxLength_timeout_completionHandler_(int minBytes, + int maxBytes, double timeout, ObjCBlock40 completionHandler) { + return _lib._objc_msgSend_415( + _id, + _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, + minBytes, + maxBytes, + timeout, + completionHandler._id); + } - @ffi.Int64() - external int as_int64; + /// Write the data completely to the underlying socket. If all the + /// bytes have not been written by the timeout, a timeout error will + /// occur. Note that invocation of the completion handler does not + /// guarantee that the remote side has received all the bytes, only + /// that they have been written to the kernel. + void writeData_timeout_completionHandler_( + NSData? data, double timeout, ObjCBlock41 completionHandler) { + return _lib._objc_msgSend_416( + _id, + _lib._sel_writeData_timeout_completionHandler_1, + data?._id ?? ffi.nullptr, + timeout, + completionHandler._id); + } - @ffi.Double() - external double as_double; + /// -captureStreams completes any already enqueued reads + /// and writes, and then invokes the + /// URLSession:streamTask:didBecomeInputStream:outputStream: delegate + /// message. When that message is received, the task object is + /// considered completed and will not receive any more delegate + /// messages. + void captureStreams() { + return _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); + } - external ffi.Pointer as_string; + /// Enqueue a request to close the write end of the underlying socket. + /// All outstanding IO will complete before the write side of the + /// socket is closed. The server, however, may continue to write bytes + /// back to the client, so best practice is to continue reading from + /// the server until you receive EOF. + void closeWrite() { + return _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); + } - external UnnamedStruct5 as_send_port; + /// Enqueue a request to close the read side of the underlying socket. + /// All outstanding IO will complete before the read side is closed. + /// You may continue writing to the server. + void closeRead() { + return _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); + } - external UnnamedStruct6 as_capability; + /// Begin encrypted handshake. The handshake begins after all pending + /// IO has completed. TLS authentication callbacks are sent to the + /// session's -URLSession:task:didReceiveChallenge:completionHandler: + void startSecureConnection() { + return _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); + } - external UnnamedStruct7 as_array; + /// Cleanly close a secure connection after all pending secure IO has + /// completed. + /// + /// @warning This API is non-functional. + void stopSecureConnection() { + return _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); + } - external UnnamedStruct8 as_typed_data; + @override + NSURLSessionStreamTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + } - external UnnamedStruct9 as_external_typed_data; + static NSURLSessionStreamTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionStreamTask1, _lib._sel_new1); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + } - external UnnamedStruct10 as_native_pointer; + static NSURLSessionStreamTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + } } -class UnnamedStruct5 extends ffi.Struct { - @Dart_Port() - external int id; - - @Dart_Port() - external int origin_id; +void _ObjCBlock40_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); } -class UnnamedStruct6 extends ffi.Struct { - @ffi.Int64() - external int id; +final _ObjCBlock40_closureRegistry = {}; +int _ObjCBlock40_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock40_registerClosure(Function fn) { + final id = ++_ObjCBlock40_closureRegistryIndex; + _ObjCBlock40_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class UnnamedStruct7 extends ffi.Struct { - @ffi.IntPtr() - external int length; - - external ffi.Pointer> values; +void _ObjCBlock40_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _ObjCBlock40_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); } -class UnnamedStruct8 extends ffi.Struct { - @ffi.Int32() - external int type; - - /// in elements, not bytes - @ffi.IntPtr() - external int length; +class ObjCBlock40 extends _ObjCBlockBase { + ObjCBlock40._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external ffi.Pointer values; -} + /// Creates a block from a C function pointer. + ObjCBlock40.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock40_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -class UnnamedStruct9 extends ffi.Struct { - @ffi.Int32() - external int type; + /// Creates a block from a Dart function. + ObjCBlock40.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock40_closureTrampoline) + .cast(), + _ObjCBlock40_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } - /// in elements, not bytes - @ffi.IntPtr() - external int length; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - external ffi.Pointer data; +void _ObjCBlock41_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} - external ffi.Pointer peer; +final _ObjCBlock41_closureRegistry = {}; +int _ObjCBlock41_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock41_registerClosure(Function fn) { + final id = ++_ObjCBlock41_closureRegistryIndex; + _ObjCBlock41_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external Dart_HandleFinalizer callback; +void _ObjCBlock41_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock41_closureRegistry[block.ref.target.address]!(arg0); } -class UnnamedStruct10 extends ffi.Struct { - @ffi.IntPtr() - external int ptr; +class ObjCBlock41 extends _ObjCBlockBase { + ObjCBlock41._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.IntPtr() - external int size; + /// Creates a block from a C function pointer. + ObjCBlock41.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock41_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external Dart_HandleFinalizer callback; + /// Creates a block from a Dart function. + ObjCBlock41.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock41_closureTrampoline) + .cast(), + _ObjCBlock41_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef Dart_CObject = _Dart_CObject; +class NSNetService extends _ObjCWrapper { + NSNetService._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -/// A native message handler. -/// -/// This handler is associated with a native port by calling -/// Dart_NewNativePort. -/// -/// The message received is decoded into the message structure. The -/// lifetime of the message data is controlled by the caller. All the -/// data references from the message are allocated by the caller and -/// will be reclaimed when returning to it. -typedef Dart_NativeMessageHandler = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_Port, ffi.Pointer)>>; -typedef Dart_PostCObject_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(Dart_Port_DL, ffi.Pointer)>>; + /// Returns a [NSNetService] that points to the same underlying object as [other]. + static NSNetService castFrom(T other) { + return NSNetService._(other._id, other._lib, retain: true, release: true); + } -/// ============================================================================ -/// IMPORTANT! Never update these signatures without properly updating -/// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. -/// -/// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types -/// to trigger compile-time errors if the sybols in those files are updated -/// without updating these. -/// -/// Function return and argument types, and typedefs are carbon copied. Structs -/// are typechecked nominally in C/C++, so they are not copied, instead a -/// comment is added to their definition. -typedef Dart_Port_DL = ffi.Int64; -typedef Dart_PostInteger_Type = ffi - .Pointer>; -typedef Dart_NewNativePort_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_Port_DL Function( - ffi.Pointer, Dart_NativeMessageHandler_DL, ffi.Bool)>>; -typedef Dart_NativeMessageHandler_DL = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_Port_DL, ffi.Pointer)>>; -typedef Dart_CloseNativePort_Type - = ffi.Pointer>; -typedef Dart_IsError_Type - = ffi.Pointer>; -typedef Dart_IsApiError_Type - = ffi.Pointer>; -typedef Dart_IsUnhandledExceptionError_Type - = ffi.Pointer>; -typedef Dart_IsCompilationError_Type - = ffi.Pointer>; -typedef Dart_IsFatalError_Type - = ffi.Pointer>; -typedef Dart_GetError_Type = ffi - .Pointer Function(ffi.Handle)>>; -typedef Dart_ErrorHasException_Type - = ffi.Pointer>; -typedef Dart_ErrorGetException_Type - = ffi.Pointer>; -typedef Dart_ErrorGetStackTrace_Type - = ffi.Pointer>; -typedef Dart_NewApiError_Type = ffi - .Pointer)>>; -typedef Dart_NewCompilationError_Type = ffi - .Pointer)>>; -typedef Dart_NewUnhandledExceptionError_Type - = ffi.Pointer>; -typedef Dart_PropagateError_Type - = ffi.Pointer>; -typedef Dart_HandleFromPersistent_Type - = ffi.Pointer>; -typedef Dart_HandleFromWeakPersistent_Type = ffi.Pointer< - ffi.NativeFunction>; -typedef Dart_NewPersistentHandle_Type - = ffi.Pointer>; -typedef Dart_SetPersistentHandle_Type = ffi - .Pointer>; -typedef Dart_DeletePersistentHandle_Type - = ffi.Pointer>; -typedef Dart_NewWeakPersistentHandle_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_WeakPersistentHandle Function(ffi.Handle, ffi.Pointer, - ffi.IntPtr, Dart_HandleFinalizer)>>; -typedef Dart_DeleteWeakPersistentHandle_Type = ffi - .Pointer>; -typedef Dart_UpdateExternalSize_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_WeakPersistentHandle, ffi.IntPtr)>>; -typedef Dart_NewFinalizableHandle_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, - ffi.IntPtr, Dart_HandleFinalizer)>>; -typedef Dart_DeleteFinalizableHandle_Type = ffi.Pointer< - ffi.NativeFunction>; -typedef Dart_UpdateFinalizableExternalSize_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, ffi.IntPtr)>>; -typedef Dart_Post_Type = ffi - .Pointer>; -typedef Dart_NewSendPort_Type - = ffi.Pointer>; -typedef Dart_SendPortGetId_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer)>>; -typedef Dart_EnterScope_Type - = ffi.Pointer>; -typedef Dart_ExitScope_Type - = ffi.Pointer>; + /// Returns a [NSNetService] that wraps the given raw object pointer. + static NSNetService castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNetService._(other, lib, retain: retain, release: release); + } -/// The type of message being sent to a Dart port. See CUPHTTPClientDelegate. -abstract class MessageType { - static const int ResponseMessage = 0; - static const int DataMessage = 1; - static const int CompletedMessage = 2; - static const int RedirectMessage = 3; - static const int FinishedDownloading = 4; + /// Returns whether [obj] is an instance of [NSNetService]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNetService1); + } } -/// The configuration associated with a NSURLSessionTask. -/// See CUPHTTPClientDelegate. -class CUPHTTPTaskConfiguration extends NSObject { - CUPHTTPTaskConfiguration._( +/// A WebSocket task can be created with a ws or wss url. A client can also provide +/// a list of protocols it wishes to advertise during the WebSocket handshake phase. +/// Once the handshake is successfully completed the client will be notified through an optional delegate. +/// All reads and writes enqueued before the completion of the handshake will be queued up and +/// executed once the handshake succeeds. Before the handshake completes, the client can be called to handle +/// redirection or authentication using the same delegates as NSURLSessionTask. WebSocket task will also provide +/// support for cookies and will store cookies to the cookie storage on the session and will attach cookies to +/// outgoing HTTP handshake requests. +class NSURLSessionWebSocketTask extends NSURLSessionTask { + NSURLSessionWebSocketTask._( ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [CUPHTTPTaskConfiguration] that points to the same underlying object as [other]. - static CUPHTTPTaskConfiguration castFrom(T other) { - return CUPHTTPTaskConfiguration._(other._id, other._lib, + /// Returns a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. + static NSURLSessionWebSocketTask castFrom(T other) { + return NSURLSessionWebSocketTask._(other._id, other._lib, retain: true, release: true); } - /// Returns a [CUPHTTPTaskConfiguration] that wraps the given raw object pointer. - static CUPHTTPTaskConfiguration castFromPointer( + /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. + static NSURLSessionWebSocketTask castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return CUPHTTPTaskConfiguration._(other, lib, + return NSURLSessionWebSocketTask._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [CUPHTTPTaskConfiguration]. + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPTaskConfiguration1); + obj._lib._class_NSURLSessionWebSocketTask1); } - NSObject initWithPort_(int sendPort) { - final _ret = - _lib._objc_msgSend_470(_id, _lib._sel_initWithPort_1, sendPort); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Sends a WebSocket message. If an error occurs, any outstanding work will also fail. + /// Note that invocation of the completion handler does not + /// guarantee that the remote side has received all the bytes, only + /// that they have been written to the kernel. + void sendMessage_completionHandler_( + NSURLSessionWebSocketMessage? message, ObjCBlock41 completionHandler) { + return _lib._objc_msgSend_420( + _id, + _lib._sel_sendMessage_completionHandler_1, + message?._id ?? ffi.nullptr, + completionHandler._id); } - int get sendPort { - return _lib._objc_msgSend_325(_id, _lib._sel_sendPort1); + /// Reads a WebSocket message once all the frames of the message are available. + /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out + /// and all outstanding work will also fail resulting in the end of the task. + void receiveMessageWithCompletionHandler_(ObjCBlock42 completionHandler) { + return _lib._objc_msgSend_421(_id, + _lib._sel_receiveMessageWithCompletionHandler_1, completionHandler._id); } - static CUPHTTPTaskConfiguration new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_new1); - return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + /// Sends a ping frame from the client side. The pongReceiveHandler is invoked when the client + /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving + /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. + /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. + void sendPingWithPongReceiveHandler_(ObjCBlock41 pongReceiveHandler) { + return _lib._objc_msgSend_422(_id, + _lib._sel_sendPingWithPongReceiveHandler_1, pongReceiveHandler._id); } - static CUPHTTPTaskConfiguration alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_alloc1); - return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. + /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. + void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { + return _lib._objc_msgSend_423(_id, _lib._sel_cancelWithCloseCode_reason_1, + closeCode, reason?._id ?? ffi.nullptr); } -} - -/// A delegate for NSURLSession that forwards events for registered -/// NSURLSessionTasks and forwards them to a port for consumption in Dart. -/// -/// The messages sent to the port are contained in a List with one of 3 -/// possible formats: -/// -/// 1. When the delegate receives a HTTP redirect response: -/// [MessageType::RedirectMessage, ] -/// -/// 2. When the delegate receives a HTTP response: -/// [MessageType::ResponseMessage, ] -/// -/// 3. When the delegate receives some HTTP data: -/// [MessageType::DataMessage, ] -/// -/// 4. When the delegate is informed that the response is complete: -/// [MessageType::CompletedMessage, ] -class CUPHTTPClientDelegate extends NSObject { - CUPHTTPClientDelegate._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [CUPHTTPClientDelegate] that points to the same underlying object as [other]. - static CUPHTTPClientDelegate castFrom(T other) { - return CUPHTTPClientDelegate._(other._id, other._lib, - retain: true, release: true); + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached + int get maximumMessageSize { + return _lib._objc_msgSend_81(_id, _lib._sel_maximumMessageSize1); } - /// Returns a [CUPHTTPClientDelegate] that wraps the given raw object pointer. - static CUPHTTPClientDelegate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPClientDelegate._(other, lib, - retain: retain, release: release); + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached + set maximumMessageSize(int value) { + _lib._objc_msgSend_346(_id, _lib._sel_setMaximumMessageSize_1, value); } - /// Returns whether [obj] is an instance of [CUPHTTPClientDelegate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPClientDelegate1); + /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid + int get closeCode { + return _lib._objc_msgSend_424(_id, _lib._sel_closeCode1); } - /// Instruct the delegate to forward events for the given task to the port - /// specified in the configuration. - void registerTask_withConfiguration_( - NSURLSessionTask? task, CUPHTTPTaskConfiguration? config) { - return _lib._objc_msgSend_471( - _id, - _lib._sel_registerTask_withConfiguration_1, - task?._id ?? ffi.nullptr, - config?._id ?? ffi.nullptr); + /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running + NSData? get closeReason { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_closeReason1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - static CUPHTTPClientDelegate new1(NativeCupertinoHttp _lib) { + @override + NSURLSessionWebSocketTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionWebSocketTask new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPClientDelegate1, _lib._sel_new1); - return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + _lib._class_NSURLSessionWebSocketTask1, _lib._sel_new1); + return NSURLSessionWebSocketTask._(_ret, _lib, + retain: false, release: true); } - static CUPHTTPClientDelegate alloc(NativeCupertinoHttp _lib) { + static NSURLSessionWebSocketTask alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPClientDelegate1, _lib._sel_alloc1); - return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + _lib._class_NSURLSessionWebSocketTask1, _lib._sel_alloc1); + return NSURLSessionWebSocketTask._(_ret, _lib, + retain: false, release: true); } } -/// An object used to communicate redirect information to Dart code. -/// -/// The flow is: -/// 1. CUPHTTPClientDelegate receives a message from the URL Loading System. -/// 2. CUPHTTPClientDelegate creates a new CUPHTTPForwardedDelegate subclass. -/// 3. CUPHTTPClientDelegate sends the CUPHTTPForwardedDelegate to the -/// configured Dart_Port. -/// 4. CUPHTTPClientDelegate waits on CUPHTTPForwardedDelegate.lock -/// 5. When the Dart code is done process the message received on the port, -/// it calls [CUPHTTPForwardedDelegate finish*], which releases the lock. -/// 6. CUPHTTPClientDelegate continues running. -class CUPHTTPForwardedDelegate extends NSObject { - CUPHTTPForwardedDelegate._( +/// The client can create a WebSocket message object that will be passed to the send calls +/// and will be delivered from the receive calls. The message can be initialized with data or string. +/// If initialized with data, the string property will be nil and vice versa. +class NSURLSessionWebSocketMessage extends NSObject { + NSURLSessionWebSocketMessage._( ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [CUPHTTPForwardedDelegate] that points to the same underlying object as [other]. - static CUPHTTPForwardedDelegate castFrom(T other) { - return CUPHTTPForwardedDelegate._(other._id, other._lib, + /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. + static NSURLSessionWebSocketMessage castFrom( + T other) { + return NSURLSessionWebSocketMessage._(other._id, other._lib, retain: true, release: true); } - /// Returns a [CUPHTTPForwardedDelegate] that wraps the given raw object pointer. - static CUPHTTPForwardedDelegate castFromPointer( + /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. + static NSURLSessionWebSocketMessage castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return CUPHTTPForwardedDelegate._(other, lib, + return NSURLSessionWebSocketMessage._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedDelegate]. + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedDelegate1); + obj._lib._class_NSURLSessionWebSocketMessage1); } - NSObject initWithSession_task_( - NSURLSession? session, NSURLSessionTask? task) { - final _ret = _lib._objc_msgSend_472(_id, _lib._sel_initWithSession_task_1, - session?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Create a message with data type + NSURLSessionWebSocketMessage initWithData_(NSData? data) { + final _ret = _lib._objc_msgSend_217( + _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); } - /// Indicates that the task should continue executing using the given request. - void finish() { - return _lib._objc_msgSend_1(_id, _lib._sel_finish1); + /// Create a message with string type + NSURLSessionWebSocketMessage initWithString_(NSString? string) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, string?._id ?? ffi.nullptr); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); } - NSURLSession? get session { - final _ret = _lib._objc_msgSend_380(_id, _lib._sel_session1); - return _ret.address == 0 - ? null - : NSURLSession._(_ret, _lib, retain: true, release: true); + int get type { + return _lib._objc_msgSend_419(_id, _lib._sel_type1); } - NSURLSessionTask? get task { - final _ret = _lib._objc_msgSend_473(_id, _lib._sel_task1); + NSData? get data { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); return _ret.address == 0 ? null - : NSURLSessionTask._(_ret, _lib, retain: true, release: true); + : NSData._(_ret, _lib, retain: true, release: true); } - /// This property is meant to be used only by CUPHTTPClientDelegate. - NSLock? get lock { - final _ret = _lib._objc_msgSend_474(_id, _lib._sel_lock1); + NSString? get string { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); return _ret.address == 0 ? null - : NSLock._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - static CUPHTTPForwardedDelegate new1(NativeCupertinoHttp _lib) { + @override + NSURLSessionWebSocketMessage init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } + + static NSURLSessionWebSocketMessage new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_new1); - return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_new1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: false, release: true); } - static CUPHTTPForwardedDelegate alloc(NativeCupertinoHttp _lib) { + static NSURLSessionWebSocketMessage alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_alloc1); - return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_alloc1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: false, release: true); } } -class NSLock extends _ObjCWrapper { - NSLock._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +abstract class NSURLSessionWebSocketMessageType { + static const int NSURLSessionWebSocketMessageTypeData = 0; + static const int NSURLSessionWebSocketMessageTypeString = 1; +} - /// Returns a [NSLock] that points to the same underlying object as [other]. - static NSLock castFrom(T other) { - return NSLock._(other._id, other._lib, retain: true, release: true); - } +void _ObjCBlock42_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} - /// Returns a [NSLock] that wraps the given raw object pointer. - static NSLock castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSLock._(other, lib, retain: retain, release: release); - } +final _ObjCBlock42_closureRegistry = {}; +int _ObjCBlock42_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock42_registerClosure(Function fn) { + final id = ++_ObjCBlock42_closureRegistryIndex; + _ObjCBlock42_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns whether [obj] is an instance of [NSLock]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLock1); +void _ObjCBlock42_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock42_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock42 extends _ObjCBlockBase { + ObjCBlock42._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock42.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock42_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock42.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock42_closureTrampoline) + .cast(), + _ObjCBlock42_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } + + ffi.Pointer<_ObjCBlock> get pointer => _id; } -class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedRedirect._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +/// The WebSocket close codes follow the close codes given in the RFC +abstract class NSURLSessionWebSocketCloseCode { + static const int NSURLSessionWebSocketCloseCodeInvalid = 0; + static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; + static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; + static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; + static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; + static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; + static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; + static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; + static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; + static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; + static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = + 1010; + static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; + static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; +} - /// Returns a [CUPHTTPForwardedRedirect] that points to the same underlying object as [other]. - static CUPHTTPForwardedRedirect castFrom(T other) { - return CUPHTTPForwardedRedirect._(other._id, other._lib, - retain: true, release: true); +void _ObjCBlock43_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock43_closureRegistry = {}; +int _ObjCBlock43_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock43_registerClosure(Function fn) { + final id = ++_ObjCBlock43_closureRegistryIndex; + _ObjCBlock43_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock43_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock43_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock43 extends _ObjCBlockBase { + ObjCBlock43._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock43.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock43_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock43.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock43_closureTrampoline) + .cast(), + _ObjCBlock43_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); } - /// Returns a [CUPHTTPForwardedRedirect] that wraps the given raw object pointer. - static CUPHTTPForwardedRedirect castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedRedirect._(other, lib, - retain: retain, release: release); + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +void _ObjCBlock44_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock44_closureRegistry = {}; +int _ObjCBlock44_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock44_registerClosure(Function fn) { + final id = ++_ObjCBlock44_closureRegistryIndex; + _ObjCBlock44_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock44_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock44_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock44 extends _ObjCBlockBase { + ObjCBlock44._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock44.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock44_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock44.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock44_closureTrampoline) + .cast(), + _ObjCBlock44_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedRedirect]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedRedirect1); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +/// Disposition options for various delegate messages +abstract class NSURLSessionDelayedRequestDisposition { + /// Use the original request provided when the task was created; the request parameter is ignored. + static const int NSURLSessionDelayedRequestContinueLoading = 0; + + /// Use the specified request, which may not be nil. + static const int NSURLSessionDelayedRequestUseNewRequest = 1; + + /// Cancel the task; the request parameter is ignored. + static const int NSURLSessionDelayedRequestCancel = 2; +} + +abstract class NSURLSessionAuthChallengeDisposition { + /// Use the specified credential, which may be nil + static const int NSURLSessionAuthChallengeUseCredential = 0; + + /// Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored. + static const int NSURLSessionAuthChallengePerformDefaultHandling = 1; + + /// The entire request will be canceled; the credential parameter is ignored. + static const int NSURLSessionAuthChallengeCancelAuthenticationChallenge = 2; + + /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. + static const int NSURLSessionAuthChallengeRejectProtectionSpace = 3; +} + +abstract class NSURLSessionResponseDisposition { + /// Cancel the load, this is the same as -[task cancel] + static const int NSURLSessionResponseCancel = 0; + + /// Allow the load to continue + static const int NSURLSessionResponseAllow = 1; + + /// Turn this request into a download + static const int NSURLSessionResponseBecomeDownload = 2; + + /// Turn this task into a stream task + static const int NSURLSessionResponseBecomeStream = 3; +} + +/// The resource fetch type. +abstract class NSURLSessionTaskMetricsResourceFetchType { + static const int NSURLSessionTaskMetricsResourceFetchTypeUnknown = 0; + + /// The resource was loaded over the network. + static const int NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad = 1; - NSObject initWithSession_task_response_request_( - NSURLSession? session, - NSURLSessionTask? task, - NSHTTPURLResponse? response, - NSURLRequest? request) { - final _ret = _lib._objc_msgSend_475( - _id, - _lib._sel_initWithSession_task_response_request_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - response?._id ?? ffi.nullptr, - request?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + /// The resource was pushed by the server to the client. + static const int NSURLSessionTaskMetricsResourceFetchTypeServerPush = 2; - /// Indicates that the task should continue executing using the given request. - /// If the request is NIL then the redirect is not followed and the task is - /// complete. - void finishWithRequest_(NSURLRequest? request) { - return _lib._objc_msgSend_476( - _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); - } + /// The resource was retrieved from the local storage. + static const int NSURLSessionTaskMetricsResourceFetchTypeLocalCache = 3; +} - NSHTTPURLResponse? get response { - final _ret = _lib._objc_msgSend_477(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); - } +/// DNS protocol used for domain resolution. +abstract class NSURLSessionTaskMetricsDomainResolutionProtocol { + static const int NSURLSessionTaskMetricsDomainResolutionProtocolUnknown = 0; - NSURLRequest? get request { - final _ret = _lib._objc_msgSend_371(_id, _lib._sel_request1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } + /// Resolution used DNS over UDP. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolUDP = 1; - /// This property is meant to be used only by CUPHTTPClientDelegate. - NSURLRequest? get redirectRequest { - final _ret = _lib._objc_msgSend_371(_id, _lib._sel_redirectRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } + /// Resolution used DNS over TCP. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolTCP = 2; - static CUPHTTPForwardedRedirect new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_new1); - return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); - } + /// Resolution used DNS over TLS. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolTLS = 3; - static CUPHTTPForwardedRedirect alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_alloc1); - return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); - } + /// Resolution used DNS over HTTPS. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS = 4; } -class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedResponse._( +/// This class defines the performance metrics collected for a request/response transaction during the task execution. +class NSURLSessionTaskTransactionMetrics extends NSObject { + NSURLSessionTaskTransactionMetrics._( ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [CUPHTTPForwardedResponse] that points to the same underlying object as [other]. - static CUPHTTPForwardedResponse castFrom(T other) { - return CUPHTTPForwardedResponse._(other._id, other._lib, + /// Returns a [NSURLSessionTaskTransactionMetrics] that points to the same underlying object as [other]. + static NSURLSessionTaskTransactionMetrics castFrom( + T other) { + return NSURLSessionTaskTransactionMetrics._(other._id, other._lib, retain: true, release: true); } - /// Returns a [CUPHTTPForwardedResponse] that wraps the given raw object pointer. - static CUPHTTPForwardedResponse castFromPointer( + /// Returns a [NSURLSessionTaskTransactionMetrics] that wraps the given raw object pointer. + static NSURLSessionTaskTransactionMetrics castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return CUPHTTPForwardedResponse._(other, lib, + return NSURLSessionTaskTransactionMetrics._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedResponse]. + /// Returns whether [obj] is an instance of [NSURLSessionTaskTransactionMetrics]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedResponse1); - } - - NSObject initWithSession_task_response_( - NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { - final _ret = _lib._objc_msgSend_478( - _id, - _lib._sel_initWithSession_task_response_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - response?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + obj._lib._class_NSURLSessionTaskTransactionMetrics1); } - void finishWithDisposition_(int disposition) { - return _lib._objc_msgSend_479( - _id, _lib._sel_finishWithDisposition_1, disposition); + /// Represents the transaction request. + NSURLRequest? get request { + final _ret = _lib._objc_msgSend_377(_id, _lib._sel_request1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); } + /// Represents the transaction response. Can be nil if error occurred and no response was generated. NSURLResponse? get response { - final _ret = _lib._objc_msgSend_373(_id, _lib._sel_response1); + final _ret = _lib._objc_msgSend_379(_id, _lib._sel_response1); return _ret.address == 0 ? null : NSURLResponse._(_ret, _lib, retain: true, release: true); } - /// This property is meant to be used only by CUPHTTPClientDelegate. - int get disposition { - return _lib._objc_msgSend_480(_id, _lib._sel_disposition1); - } - - static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedResponse1, _lib._sel_new1); - return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); - } - - static CUPHTTPForwardedResponse alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedResponse1, _lib._sel_alloc1); - return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); - } -} - -class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [CUPHTTPForwardedData] that points to the same underlying object as [other]. - static CUPHTTPForwardedData castFrom(T other) { - return CUPHTTPForwardedData._(other._id, other._lib, - retain: true, release: true); + /// fetchStartDate returns the time when the user agent started fetching the resource, whether or not the resource was retrieved from the server or local resources. + /// + /// The following metrics will be set to nil, if a persistent connection was used or the resource was retrieved from local resources: + /// + /// domainLookupStartDate + /// domainLookupEndDate + /// connectStartDate + /// connectEndDate + /// secureConnectionStartDate + /// secureConnectionEndDate + NSDate? get fetchStartDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_fetchStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - /// Returns a [CUPHTTPForwardedData] that wraps the given raw object pointer. - static CUPHTTPForwardedData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedData._(other, lib, retain: retain, release: release); + /// domainLookupStartDate returns the time immediately before the user agent started the name lookup for the resource. + NSDate? get domainLookupStartDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_domainLookupStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedData1); + /// domainLookupEndDate returns the time after the name lookup was completed. + NSDate? get domainLookupEndDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_domainLookupEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - NSObject initWithSession_task_data_( - NSURLSession? session, NSURLSessionTask? task, NSData? data) { - final _ret = _lib._objc_msgSend_481( - _id, - _lib._sel_initWithSession_task_data_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - data?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// connectStartDate is the time immediately before the user agent started establishing the connection to the server. + /// + /// For example, this would correspond to the time immediately before the user agent started trying to establish the TCP connection. + NSDate? get connectStartDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_connectStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - NSData? get data { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); + /// If an encrypted connection was used, secureConnectionStartDate is the time immediately before the user agent started the security handshake to secure the current connection. + /// + /// For example, this would correspond to the time immediately before the user agent started the TLS handshake. + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSDate? get secureConnectionStartDate { + final _ret = + _lib._objc_msgSend_357(_id, _lib._sel_secureConnectionStartDate1); return _ret.address == 0 ? null - : NSData._(_ret, _lib, retain: true, release: true); + : NSDate._(_ret, _lib, retain: true, release: true); } - static CUPHTTPForwardedData new1(NativeCupertinoHttp _lib) { + /// If an encrypted connection was used, secureConnectionEndDate is the time immediately after the security handshake completed. + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSDate? get secureConnectionEndDate { final _ret = - _lib._objc_msgSend_2(_lib._class_CUPHTTPForwardedData1, _lib._sel_new1); - return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_357(_id, _lib._sel_secureConnectionEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - static CUPHTTPForwardedData alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedData1, _lib._sel_alloc1); - return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + /// connectEndDate is the time immediately after the user agent finished establishing the connection to the server, including completion of security-related and other handshakes. + NSDate? get connectEndDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_connectEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } -} - -class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedComplete._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [CUPHTTPForwardedComplete] that points to the same underlying object as [other]. - static CUPHTTPForwardedComplete castFrom(T other) { - return CUPHTTPForwardedComplete._(other._id, other._lib, - retain: true, release: true); + /// requestStartDate is the time immediately before the user agent started requesting the source, regardless of whether the resource was retrieved from the server or local resources. + /// + /// For example, this would correspond to the time immediately before the user agent sent an HTTP GET request. + NSDate? get requestStartDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_requestStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - /// Returns a [CUPHTTPForwardedComplete] that wraps the given raw object pointer. - static CUPHTTPForwardedComplete castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedComplete._(other, lib, - retain: retain, release: release); + /// requestEndDate is the time immediately after the user agent finished requesting the source, regardless of whether the resource was retrieved from the server or local resources. + /// + /// For example, this would correspond to the time immediately after the user agent finished sending the last byte of the request. + NSDate? get requestEndDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_requestEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedComplete]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedComplete1); + /// responseStartDate is the time immediately after the user agent received the first byte of the response from the server or from local resources. + /// + /// For example, this would correspond to the time immediately after the user agent received the first byte of an HTTP response. + NSDate? get responseStartDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_responseStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - NSObject initWithSession_task_error_( - NSURLSession? session, NSURLSessionTask? task, NSError? error) { - final _ret = _lib._objc_msgSend_482( - _id, - _lib._sel_initWithSession_task_error_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - error?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// responseEndDate is the time immediately after the user agent received the last byte of the resource. + NSDate? get responseEndDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_responseEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - NSError? get error { - final _ret = _lib._objc_msgSend_376(_id, _lib._sel_error1); + /// The network protocol used to fetch the resource, as identified by the ALPN Protocol ID Identification Sequence [RFC7301]. + /// E.g., h3, h2, http/1.1. + /// + /// When a proxy is configured AND a tunnel connection is established, then this attribute returns the value for the tunneled protocol. + /// + /// For example: + /// If no proxy were used, and HTTP/2 was negotiated, then h2 would be returned. + /// If HTTP/1.1 were used to the proxy, and the tunneled connection was HTTP/2, then h2 would be returned. + /// If HTTP/1.1 were used to the proxy, and there were no tunnel, then http/1.1 would be returned. + NSString? get networkProtocolName { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_networkProtocolName1); return _ret.address == 0 ? null - : NSError._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - static CUPHTTPForwardedComplete new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedComplete1, _lib._sel_new1); - return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + /// This property is set to YES if a proxy connection was used to fetch the resource. + bool get proxyConnection { + return _lib._objc_msgSend_11(_id, _lib._sel_isProxyConnection1); } - static CUPHTTPForwardedComplete alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedComplete1, _lib._sel_alloc1); - return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + /// This property is set to YES if a persistent connection was used to fetch the resource. + bool get reusedConnection { + return _lib._objc_msgSend_11(_id, _lib._sel_isReusedConnection1); } -} - -class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedFinishedDownloading._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [CUPHTTPForwardedFinishedDownloading] that points to the same underlying object as [other]. - static CUPHTTPForwardedFinishedDownloading castFrom( - T other) { - return CUPHTTPForwardedFinishedDownloading._(other._id, other._lib, - retain: true, release: true); + /// Indicates whether the resource was loaded, pushed or retrieved from the local cache. + int get resourceFetchType { + return _lib._objc_msgSend_435(_id, _lib._sel_resourceFetchType1); } - /// Returns a [CUPHTTPForwardedFinishedDownloading] that wraps the given raw object pointer. - static CUPHTTPForwardedFinishedDownloading castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedFinishedDownloading._(other, lib, - retain: retain, release: release); + /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. + int get countOfRequestHeaderBytesSent { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfRequestHeaderBytesSent1); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedFinishedDownloading]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedFinishedDownloading1); + /// countOfRequestBodyBytesSent is the number of bytes transferred for request body. + /// It includes protocol-specific framing, transfer encoding, and content encoding. + int get countOfRequestBodyBytesSent { + return _lib._objc_msgSend_329(_id, _lib._sel_countOfRequestBodyBytesSent1); } - NSObject initWithSession_downloadTask_url_(NSURLSession? session, - NSURLSessionDownloadTask? downloadTask, NSURL? location) { - final _ret = _lib._objc_msgSend_483( - _id, - _lib._sel_initWithSession_downloadTask_url_1, - session?._id ?? ffi.nullptr, - downloadTask?._id ?? ffi.nullptr, - location?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. + int get countOfRequestBodyBytesBeforeEncoding { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); } - NSURL? get location { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_location1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. + int get countOfResponseHeaderBytesReceived { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfResponseHeaderBytesReceived1); } - static CUPHTTPForwardedFinishedDownloading new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_new1); - return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, - retain: false, release: true); + /// countOfResponseBodyBytesReceived is the number of bytes transferred for response header. + /// It includes protocol-specific framing, transfer encoding, and content encoding. + int get countOfResponseBodyBytesReceived { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfResponseBodyBytesReceived1); } - static CUPHTTPForwardedFinishedDownloading alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_alloc1); - return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, - retain: false, release: true); + /// countOfResponseBodyBytesAfterDecoding is the size of data delivered to your delegate or completion handler. + int get countOfResponseBodyBytesAfterDecoding { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfResponseBodyBytesAfterDecoding1); } -} - -const int noErr = 0; - -const int kNilOptions = 0; - -const int kVariableLengthArray = 1; - -const int kUnknownType = 1061109567; - -const int normal = 0; - -const int bold = 1; - -const int italic = 2; - -const int underline = 4; - -const int outline = 8; -const int shadow = 16; - -const int condense = 32; - -const int extend = 64; - -const int developStage = 32; - -const int alphaStage = 64; - -const int betaStage = 96; - -const int finalStage = 128; - -const int NSScannedOption = 1; - -const int NSCollectorDisabledOption = 2; - -const int errSecSuccess = 0; - -const int errSecUnimplemented = -4; - -const int errSecDiskFull = -34; - -const int errSecDskFull = -34; - -const int errSecIO = -36; - -const int errSecOpWr = -49; - -const int errSecParam = -50; - -const int errSecWrPerm = -61; - -const int errSecAllocate = -108; - -const int errSecUserCanceled = -128; - -const int errSecBadReq = -909; - -const int errSecInternalComponent = -2070; - -const int errSecCoreFoundationUnknown = -4960; - -const int errSecMissingEntitlement = -34018; - -const int errSecRestrictedAPI = -34020; - -const int errSecNotAvailable = -25291; - -const int errSecReadOnly = -25292; - -const int errSecAuthFailed = -25293; - -const int errSecNoSuchKeychain = -25294; - -const int errSecInvalidKeychain = -25295; - -const int errSecDuplicateKeychain = -25296; - -const int errSecDuplicateCallback = -25297; - -const int errSecInvalidCallback = -25298; - -const int errSecDuplicateItem = -25299; - -const int errSecItemNotFound = -25300; - -const int errSecBufferTooSmall = -25301; - -const int errSecDataTooLarge = -25302; - -const int errSecNoSuchAttr = -25303; - -const int errSecInvalidItemRef = -25304; - -const int errSecInvalidSearchRef = -25305; - -const int errSecNoSuchClass = -25306; - -const int errSecNoDefaultKeychain = -25307; - -const int errSecInteractionNotAllowed = -25308; - -const int errSecReadOnlyAttr = -25309; - -const int errSecWrongSecVersion = -25310; - -const int errSecKeySizeNotAllowed = -25311; - -const int errSecNoStorageModule = -25312; - -const int errSecNoCertificateModule = -25313; - -const int errSecNoPolicyModule = -25314; - -const int errSecInteractionRequired = -25315; - -const int errSecDataNotAvailable = -25316; - -const int errSecDataNotModifiable = -25317; - -const int errSecCreateChainFailed = -25318; - -const int errSecInvalidPrefsDomain = -25319; - -const int errSecInDarkWake = -25320; - -const int errSecACLNotSimple = -25240; - -const int errSecPolicyNotFound = -25241; + /// localAddress is the IP address string of the local interface for the connection. + /// + /// For multipath protocols, this is the local address of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSString? get localAddress { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localAddress1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidTrustSetting = -25242; + /// localPort is the port number of the local interface for the connection. + /// + /// For multipath protocols, this is the local port of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSNumber? get localPort { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_localPort1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } -const int errSecNoAccessForItem = -25243; + /// remoteAddress is the IP address string of the remote interface for the connection. + /// + /// For multipath protocols, this is the remote address of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSString? get remoteAddress { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_remoteAddress1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidOwnerEdit = -25244; + /// remotePort is the port number of the remote interface for the connection. + /// + /// For multipath protocols, this is the remote port of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSNumber? get remotePort { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_remotePort1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } -const int errSecTrustNotAvailable = -25245; + /// negotiatedTLSProtocolVersion is the TLS protocol version negotiated for the connection. + /// It is a 2-byte sequence in host byte order. + /// + /// Please refer to tls_protocol_version_t enum in Security/SecProtocolTypes.h + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSNumber? get negotiatedTLSProtocolVersion { + final _ret = + _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSProtocolVersion1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedFormat = -25256; + /// negotiatedTLSCipherSuite is the TLS cipher suite negotiated for the connection. + /// It is a 2-byte sequence in host byte order. + /// + /// Please refer to tls_ciphersuite_t enum in Security/SecProtocolTypes.h + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSNumber? get negotiatedTLSCipherSuite { + final _ret = + _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSCipherSuite1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } -const int errSecUnknownFormat = -25257; + /// Whether the connection is established over a cellular interface. + bool get cellular { + return _lib._objc_msgSend_11(_id, _lib._sel_isCellular1); + } -const int errSecKeyIsSensitive = -25258; + /// Whether the connection is established over an expensive interface. + bool get expensive { + return _lib._objc_msgSend_11(_id, _lib._sel_isExpensive1); + } -const int errSecMultiplePrivKeys = -25259; + /// Whether the connection is established over a constrained interface. + bool get constrained { + return _lib._objc_msgSend_11(_id, _lib._sel_isConstrained1); + } -const int errSecPassphraseRequired = -25260; + /// Whether a multipath protocol is successfully negotiated for the connection. + bool get multipath { + return _lib._objc_msgSend_11(_id, _lib._sel_isMultipath1); + } -const int errSecInvalidPasswordRef = -25261; + /// DNS protocol used for domain resolution. + int get domainResolutionProtocol { + return _lib._objc_msgSend_436(_id, _lib._sel_domainResolutionProtocol1); + } -const int errSecInvalidTrustSettings = -25262; + @override + NSURLSessionTaskTransactionMetrics init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: true, release: true); + } -const int errSecNoTrustSettings = -25263; + static NSURLSessionTaskTransactionMetrics new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_new1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: false, release: true); + } -const int errSecPkcs12VerifyFailure = -25264; + static NSURLSessionTaskTransactionMetrics alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_alloc1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: false, release: true); + } +} -const int errSecNotSigner = -26267; +class NSURLSessionTaskMetrics extends NSObject { + NSURLSessionTaskMetrics._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecDecode = -26275; + /// Returns a [NSURLSessionTaskMetrics] that points to the same underlying object as [other]. + static NSURLSessionTaskMetrics castFrom(T other) { + return NSURLSessionTaskMetrics._(other._id, other._lib, + retain: true, release: true); + } -const int errSecServiceNotAvailable = -67585; + /// Returns a [NSURLSessionTaskMetrics] that wraps the given raw object pointer. + static NSURLSessionTaskMetrics castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionTaskMetrics._(other, lib, + retain: retain, release: release); + } -const int errSecInsufficientClientID = -67586; + /// Returns whether [obj] is an instance of [NSURLSessionTaskMetrics]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionTaskMetrics1); + } -const int errSecDeviceReset = -67587; + /// transactionMetrics array contains the metrics collected for every request/response transaction created during the task execution. + NSArray? get transactionMetrics { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_transactionMetrics1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSecDeviceFailed = -67588; + /// Interval from the task creation time to the task completion time. + /// Task creation time is the time when the task was instantiated. + /// Task completion time is the time when the task is about to change its internal state to completed. + NSDateInterval? get taskInterval { + final _ret = _lib._objc_msgSend_437(_id, _lib._sel_taskInterval1); + return _ret.address == 0 + ? null + : NSDateInterval._(_ret, _lib, retain: true, release: true); + } -const int errSecAppleAddAppACLSubject = -67589; + /// redirectCount is the number of redirects that were recorded. + int get redirectCount { + return _lib._objc_msgSend_12(_id, _lib._sel_redirectCount1); + } -const int errSecApplePublicKeyIncomplete = -67590; + @override + NSURLSessionTaskMetrics init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: true, release: true); + } -const int errSecAppleSignatureMismatch = -67591; + static NSURLSessionTaskMetrics new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTaskMetrics1, _lib._sel_new1); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); + } -const int errSecAppleInvalidKeyStartDate = -67592; + static NSURLSessionTaskMetrics alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionTaskMetrics1, _lib._sel_alloc1); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); + } +} -const int errSecAppleInvalidKeyEndDate = -67593; +class NSDateInterval extends _ObjCWrapper { + NSDateInterval._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecConversionError = -67594; + /// Returns a [NSDateInterval] that points to the same underlying object as [other]. + static NSDateInterval castFrom(T other) { + return NSDateInterval._(other._id, other._lib, retain: true, release: true); + } -const int errSecAppleSSLv2Rollback = -67595; + /// Returns a [NSDateInterval] that wraps the given raw object pointer. + static NSDateInterval castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDateInterval._(other, lib, retain: retain, release: release); + } -const int errSecQuotaExceeded = -67596; + /// Returns whether [obj] is an instance of [NSDateInterval]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSDateInterval1); + } +} -const int errSecFileTooBig = -67597; +abstract class NSItemProviderRepresentationVisibility { + static const int NSItemProviderRepresentationVisibilityAll = 0; + static const int NSItemProviderRepresentationVisibilityTeam = 1; + static const int NSItemProviderRepresentationVisibilityGroup = 2; + static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; +} -const int errSecInvalidDatabaseBlob = -67598; +abstract class NSItemProviderFileOptions { + static const int NSItemProviderFileOptionOpenInPlace = 1; +} -const int errSecInvalidKeyBlob = -67599; +class NSItemProvider extends NSObject { + NSItemProvider._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecIncompatibleDatabaseBlob = -67600; + /// Returns a [NSItemProvider] that points to the same underlying object as [other]. + static NSItemProvider castFrom(T other) { + return NSItemProvider._(other._id, other._lib, retain: true, release: true); + } -const int errSecIncompatibleKeyBlob = -67601; + /// Returns a [NSItemProvider] that wraps the given raw object pointer. + static NSItemProvider castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSItemProvider._(other, lib, retain: retain, release: release); + } -const int errSecHostNameMismatch = -67602; + /// Returns whether [obj] is an instance of [NSItemProvider]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSItemProvider1); + } -const int errSecUnknownCriticalExtensionFlag = -67603; + @override + NSItemProvider init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } -const int errSecNoBasicConstraints = -67604; + void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( + NSString? typeIdentifier, int visibility, ObjCBlock45 loadHandler) { + return _lib._objc_msgSend_438( + _id, + _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + visibility, + loadHandler._id); + } -const int errSecNoBasicConstraintsCA = -67605; + void + registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( + NSString? typeIdentifier, + int fileOptions, + int visibility, + ObjCBlock47 loadHandler) { + return _lib._objc_msgSend_439( + _id, + _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + fileOptions, + visibility, + loadHandler._id); + } -const int errSecInvalidAuthorityKeyID = -67606; + NSArray? get registeredTypeIdentifiers { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_registeredTypeIdentifiers1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidSubjectKeyID = -67607; + NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { + final _ret = _lib._objc_msgSend_440( + _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); + return NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidKeyUsageForPolicy = -67608; + bool hasItemConformingToTypeIdentifier_(NSString? typeIdentifier) { + return _lib._objc_msgSend_22( + _id, + _lib._sel_hasItemConformingToTypeIdentifier_1, + typeIdentifier?._id ?? ffi.nullptr); + } -const int errSecInvalidExtendedKeyUsage = -67609; + bool hasRepresentationConformingToTypeIdentifier_fileOptions_( + NSString? typeIdentifier, int fileOptions) { + return _lib._objc_msgSend_441( + _id, + _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, + typeIdentifier?._id ?? ffi.nullptr, + fileOptions); + } -const int errSecInvalidIDLinkage = -67610; + NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( + NSString? typeIdentifier, ObjCBlock46 completionHandler) { + final _ret = _lib._objc_msgSend_442( + _id, + _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -const int errSecPathLengthConstraintExceeded = -67611; + NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( + NSString? typeIdentifier, ObjCBlock49 completionHandler) { + final _ret = _lib._objc_msgSend_443( + _id, + _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidRoot = -67612; + NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( + NSString? typeIdentifier, ObjCBlock48 completionHandler) { + final _ret = _lib._objc_msgSend_444( + _id, + _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -const int errSecCRLExpired = -67613; + NSString? get suggestedName { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecCRLNotValidYet = -67614; + set suggestedName(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); + } -const int errSecCRLNotFound = -67615; + NSItemProvider initWithObject_(NSObject? object) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_initWithObject_1, object?._id ?? ffi.nullptr); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } -const int errSecCRLServerDown = -67616; + void registerObject_visibility_(NSObject? object, int visibility) { + return _lib._objc_msgSend_445(_id, _lib._sel_registerObject_visibility_1, + object?._id ?? ffi.nullptr, visibility); + } -const int errSecCRLBadURI = -67617; + void registerObjectOfClass_visibility_loadHandler_( + NSObject? aClass, int visibility, ObjCBlock50 loadHandler) { + return _lib._objc_msgSend_446( + _id, + _lib._sel_registerObjectOfClass_visibility_loadHandler_1, + aClass?._id ?? ffi.nullptr, + visibility, + loadHandler._id); + } -const int errSecUnknownCertExtension = -67618; + bool canLoadObjectOfClass_(NSObject? aClass) { + return _lib._objc_msgSend_0( + _id, _lib._sel_canLoadObjectOfClass_1, aClass?._id ?? ffi.nullptr); + } -const int errSecUnknownCRLExtension = -67619; + NSProgress loadObjectOfClass_completionHandler_( + NSObject? aClass, ObjCBlock51 completionHandler) { + final _ret = _lib._objc_msgSend_447( + _id, + _lib._sel_loadObjectOfClass_completionHandler_1, + aClass?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -const int errSecCRLNotTrusted = -67620; + NSItemProvider initWithItem_typeIdentifier_( + NSObject? item, NSString? typeIdentifier) { + final _ret = _lib._objc_msgSend_448( + _id, + _lib._sel_initWithItem_typeIdentifier_1, + item?._id ?? ffi.nullptr, + typeIdentifier?._id ?? ffi.nullptr); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } -const int errSecCRLPolicyFailed = -67621; + NSItemProvider initWithContentsOfURL_(NSURL? fileURL) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithContentsOfURL_1, fileURL?._id ?? ffi.nullptr); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } -const int errSecIDPFailure = -67622; + void registerItemForTypeIdentifier_loadHandler_( + NSString? typeIdentifier, NSItemProviderLoadHandler loadHandler) { + return _lib._objc_msgSend_449( + _id, + _lib._sel_registerItemForTypeIdentifier_loadHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + loadHandler); + } -const int errSecSMIMEEmailAddressesNotFound = -67623; + void loadItemForTypeIdentifier_options_completionHandler_( + NSString? typeIdentifier, + NSDictionary? options, + NSItemProviderCompletionHandler completionHandler) { + return _lib._objc_msgSend_450( + _id, + _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + options?._id ?? ffi.nullptr, + completionHandler); + } -const int errSecSMIMEBadExtendedKeyUsage = -67624; + NSItemProviderLoadHandler get previewImageHandler { + return _lib._objc_msgSend_451(_id, _lib._sel_previewImageHandler1); + } -const int errSecSMIMEBadKeyUsage = -67625; + set previewImageHandler(NSItemProviderLoadHandler value) { + _lib._objc_msgSend_452(_id, _lib._sel_setPreviewImageHandler_1, value); + } -const int errSecSMIMEKeyUsageNotCritical = -67626; + void loadPreviewImageWithOptions_completionHandler_(NSDictionary? options, + NSItemProviderCompletionHandler completionHandler) { + return _lib._objc_msgSend_453( + _id, + _lib._sel_loadPreviewImageWithOptions_completionHandler_1, + options?._id ?? ffi.nullptr, + completionHandler); + } -const int errSecSMIMENoEmailAddress = -67627; + static NSItemProvider new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_new1); + return NSItemProvider._(_ret, _lib, retain: false, release: true); + } -const int errSecSMIMESubjAltNameNotCritical = -67628; + static NSItemProvider alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_alloc1); + return NSItemProvider._(_ret, _lib, retain: false, release: true); + } +} -const int errSecSSLBadExtendedKeyUsage = -67629; +ffi.Pointer _ObjCBlock45_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>()(arg0); +} -const int errSecOCSPBadResponse = -67630; +final _ObjCBlock45_closureRegistry = {}; +int _ObjCBlock45_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock45_registerClosure(Function fn) { + final id = ++_ObjCBlock45_closureRegistryIndex; + _ObjCBlock45_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecOCSPBadRequest = -67631; +ffi.Pointer _ObjCBlock45_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return _ObjCBlock45_closureRegistry[block.ref.target.address]!(arg0); +} -const int errSecOCSPUnavailable = -67632; +class ObjCBlock45 extends _ObjCBlockBase { + ObjCBlock45._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecOCSPStatusUnrecognized = -67633; + /// Creates a block from a C function pointer. + ObjCBlock45.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock45_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecEndOfData = -67634; + /// Creates a block from a Dart function. + ObjCBlock45.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock45_closureTrampoline) + .cast(), + _ObjCBlock45_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); + } -const int errSecIncompleteCertRevocationCheck = -67635; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} -const int errSecNetworkFailure = -67636; +void _ObjCBlock46_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} -const int errSecOCSPNotTrustedToAnchor = -67637; +final _ObjCBlock46_closureRegistry = {}; +int _ObjCBlock46_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock46_registerClosure(Function fn) { + final id = ++_ObjCBlock46_closureRegistryIndex; + _ObjCBlock46_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecRecordModified = -67638; +void _ObjCBlock46_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock46_closureRegistry[block.ref.target.address]!(arg0, arg1); +} -const int errSecOCSPSignatureError = -67639; +class ObjCBlock46 extends _ObjCBlockBase { + ObjCBlock46._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecOCSPNoSigner = -67640; + /// Creates a block from a C function pointer. + ObjCBlock46.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock46_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecOCSPResponderMalformedReq = -67641; + /// Creates a block from a Dart function. + ObjCBlock46.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock46_closureTrampoline) + .cast(), + _ObjCBlock46_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } -const int errSecOCSPResponderInternalError = -67642; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} -const int errSecOCSPResponderTryLater = -67643; +ffi.Pointer _ObjCBlock47_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>()(arg0); +} -const int errSecOCSPResponderSignatureRequired = -67644; +final _ObjCBlock47_closureRegistry = {}; +int _ObjCBlock47_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock47_registerClosure(Function fn) { + final id = ++_ObjCBlock47_closureRegistryIndex; + _ObjCBlock47_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecOCSPResponderUnauthorized = -67645; +ffi.Pointer _ObjCBlock47_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return _ObjCBlock47_closureRegistry[block.ref.target.address]!(arg0); +} -const int errSecOCSPResponseNonceMismatch = -67646; +class ObjCBlock47 extends _ObjCBlockBase { + ObjCBlock47._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecCodeSigningBadCertChainLength = -67647; + /// Creates a block from a C function pointer. + ObjCBlock47.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock47_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecCodeSigningNoBasicConstraints = -67648; + /// Creates a block from a Dart function. + ObjCBlock47.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock47_closureTrampoline) + .cast(), + _ObjCBlock47_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); + } -const int errSecCodeSigningBadPathLengthConstraint = -67649; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} -const int errSecCodeSigningNoExtendedKeyUsage = -67650; +void _ObjCBlock48_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} -const int errSecCodeSigningDevelopment = -67651; +final _ObjCBlock48_closureRegistry = {}; +int _ObjCBlock48_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock48_registerClosure(Function fn) { + final id = ++_ObjCBlock48_closureRegistryIndex; + _ObjCBlock48_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecResourceSignBadCertChainLength = -67652; +void _ObjCBlock48_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _ObjCBlock48_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} -const int errSecResourceSignBadExtKeyUsage = -67653; +class ObjCBlock48 extends _ObjCBlockBase { + ObjCBlock48._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecTrustSettingDeny = -67654; + /// Creates a block from a C function pointer. + ObjCBlock48.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock48_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecInvalidSubjectName = -67655; + /// Creates a block from a Dart function. + ObjCBlock48.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock48_closureTrampoline) + .cast(), + _ObjCBlock48_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } -const int errSecUnknownQualifiedCertStatement = -67656; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} -const int errSecMobileMeRequestQueued = -67657; +void _ObjCBlock49_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} -const int errSecMobileMeRequestRedirected = -67658; +final _ObjCBlock49_closureRegistry = {}; +int _ObjCBlock49_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock49_registerClosure(Function fn) { + final id = ++_ObjCBlock49_closureRegistryIndex; + _ObjCBlock49_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecMobileMeServerError = -67659; +void _ObjCBlock49_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock49_closureRegistry[block.ref.target.address]!(arg0, arg1); +} -const int errSecMobileMeServerNotAvailable = -67660; +class ObjCBlock49 extends _ObjCBlockBase { + ObjCBlock49._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecMobileMeServerAlreadyExists = -67661; + /// Creates a block from a C function pointer. + ObjCBlock49.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock49_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecMobileMeServerServiceErr = -67662; + /// Creates a block from a Dart function. + ObjCBlock49.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock49_closureTrampoline) + .cast(), + _ObjCBlock49_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } -const int errSecMobileMeRequestAlreadyPending = -67663; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} -const int errSecMobileMeNoRequestPending = -67664; +ffi.Pointer _ObjCBlock50_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>()(arg0); +} -const int errSecMobileMeCSRVerifyFailure = -67665; +final _ObjCBlock50_closureRegistry = {}; +int _ObjCBlock50_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock50_registerClosure(Function fn) { + final id = ++_ObjCBlock50_closureRegistryIndex; + _ObjCBlock50_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecMobileMeFailedConsistencyCheck = -67666; +ffi.Pointer _ObjCBlock50_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return _ObjCBlock50_closureRegistry[block.ref.target.address]!(arg0); +} -const int errSecNotInitialized = -67667; +class ObjCBlock50 extends _ObjCBlockBase { + ObjCBlock50._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecInvalidHandleUsage = -67668; + /// Creates a block from a C function pointer. + ObjCBlock50.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock50_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecPVCReferentNotFound = -67669; + /// Creates a block from a Dart function. + ObjCBlock50.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock50_closureTrampoline) + .cast(), + _ObjCBlock50_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); + } -const int errSecFunctionIntegrityFail = -67670; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} -const int errSecInternalError = -67671; +void _ObjCBlock51_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} -const int errSecMemoryError = -67672; +final _ObjCBlock51_closureRegistry = {}; +int _ObjCBlock51_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock51_registerClosure(Function fn) { + final id = ++_ObjCBlock51_closureRegistryIndex; + _ObjCBlock51_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecInvalidData = -67673; +void _ObjCBlock51_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock51_closureRegistry[block.ref.target.address]!(arg0, arg1); +} -const int errSecMDSError = -67674; +class ObjCBlock51 extends _ObjCBlockBase { + ObjCBlock51._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecInvalidPointer = -67675; + /// Creates a block from a C function pointer. + ObjCBlock51.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock51_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecSelfCheckFailed = -67676; + /// Creates a block from a Dart function. + ObjCBlock51.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock51_closureTrampoline) + .cast(), + _ObjCBlock51_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } -const int errSecFunctionFailed = -67677; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} -const int errSecModuleManifestVerifyFailed = -67678; +typedef NSItemProviderLoadHandler = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock52_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} -const int errSecInvalidGUID = -67679; +final _ObjCBlock52_closureRegistry = {}; +int _ObjCBlock52_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock52_registerClosure(Function fn) { + final id = ++_ObjCBlock52_closureRegistryIndex; + _ObjCBlock52_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecInvalidHandle = -67680; +void _ObjCBlock52_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock52_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} -const int errSecInvalidDBList = -67681; +class ObjCBlock52 extends _ObjCBlockBase { + ObjCBlock52._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecInvalidPassthroughID = -67682; + /// Creates a block from a C function pointer. + ObjCBlock52.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock52_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecInvalidNetworkAddress = -67683; + /// Creates a block from a Dart function. + ObjCBlock52.fromFunction( + NativeCupertinoHttp lib, + void Function(NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock52_closureTrampoline) + .cast(), + _ObjCBlock52_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } -const int errSecCRLAlreadySigned = -67684; + ffi.Pointer<_ObjCBlock> get pointer => _id; +} -const int errSecInvalidNumberOfFields = -67685; +typedef NSItemProviderCompletionHandler = ffi.Pointer<_ObjCBlock>; -const int errSecVerificationFailure = -67686; +abstract class NSItemProviderErrorCode { + static const int NSItemProviderUnknownError = -1; + static const int NSItemProviderItemUnavailableError = -1000; + static const int NSItemProviderUnexpectedValueClassError = -1100; + static const int NSItemProviderUnavailableCoercionError = -1200; +} -const int errSecUnknownTag = -67687; +typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; -const int errSecInvalidSignature = -67688; +class NSMutableString extends NSString { + NSMutableString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecInvalidName = -67689; + /// Returns a [NSMutableString] that points to the same underlying object as [other]. + static NSMutableString castFrom(T other) { + return NSMutableString._(other._id, other._lib, + retain: true, release: true); + } -const int errSecInvalidCertificateRef = -67690; + /// Returns a [NSMutableString] that wraps the given raw object pointer. + static NSMutableString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableString._(other, lib, retain: retain, release: release); + } -const int errSecInvalidCertificateGroup = -67691; + /// Returns whether [obj] is an instance of [NSMutableString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableString1); + } -const int errSecTagNotFound = -67692; + void replaceCharactersInRange_withString_(NSRange range, NSString? aString) { + return _lib._objc_msgSend_454( + _id, + _lib._sel_replaceCharactersInRange_withString_1, + range, + aString?._id ?? ffi.nullptr); + } -const int errSecInvalidQuery = -67693; + void insertString_atIndex_(NSString? aString, int loc) { + return _lib._objc_msgSend_455(_id, _lib._sel_insertString_atIndex_1, + aString?._id ?? ffi.nullptr, loc); + } -const int errSecInvalidValue = -67694; + void deleteCharactersInRange_(NSRange range) { + return _lib._objc_msgSend_287( + _id, _lib._sel_deleteCharactersInRange_1, range); + } -const int errSecCallbackFailed = -67695; + void appendString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_appendString_1, aString?._id ?? ffi.nullptr); + } -const int errSecACLDeleteFailed = -67696; + void appendFormat_(NSString? format) { + return _lib._objc_msgSend_188( + _id, _lib._sel_appendFormat_1, format?._id ?? ffi.nullptr); + } -const int errSecACLReplaceFailed = -67697; + void setString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_setString_1, aString?._id ?? ffi.nullptr); + } -const int errSecACLAddFailed = -67698; + int replaceOccurrencesOfString_withString_options_range_(NSString? target, + NSString? replacement, int options, NSRange searchRange) { + return _lib._objc_msgSend_456( + _id, + _lib._sel_replaceOccurrencesOfString_withString_options_range_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr, + options, + searchRange); + } -const int errSecACLChangeFailed = -67699; + bool applyTransform_reverse_range_updatedRange_(NSStringTransform transform, + bool reverse, NSRange range, NSRangePointer resultingRange) { + return _lib._objc_msgSend_457( + _id, + _lib._sel_applyTransform_reverse_range_updatedRange_1, + transform, + reverse, + range, + resultingRange); + } -const int errSecInvalidAccessCredentials = -67700; + NSMutableString initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_458(_id, _lib._sel_initWithCapacity_1, capacity); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidRecord = -67701; + static NSMutableString stringWithCapacity_( + NativeCupertinoHttp _lib, int capacity) { + final _ret = _lib._objc_msgSend_458( + _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidACL = -67702; + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); + } -const int errSecInvalidSampleValue = -67703; + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSMutableString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecIncompatibleVersion = -67704; + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); + } -const int errSecPrivilegeNotGranted = -67705; + static NSMutableString string(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_string1); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidScope = -67706; + static NSMutableString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecPVCAlreadyConfigured = -67707; + static NSMutableString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSMutableString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidPVC = -67708; + static NSMutableString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSMutableString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecEMMLoadFailed = -67709; + static NSMutableString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecEMMUnloadFailed = -67710; + static NSMutableString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecAddinLoadFailed = -67711; + static NSMutableString stringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSMutableString1, + _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidKeyRef = -67712; + static NSMutableString + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSMutableString1, + _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidKeyHierarchy = -67713; + static NSMutableString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSMutableString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecAddinUnloadFailed = -67714; + static NSMutableString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_269( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecLibraryReferenceNotFound = -67715; + static NSMutableString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_270( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAddinFunctionTable = -67716; + static NSMutableString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_271( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidServiceMask = -67717; + static NSMutableString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_272( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecModuleNotLoaded = -67718; + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_273( + _lib._class_NSMutableString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } -const int errSecInvalidSubServiceID = -67719; + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecAttributeNotInContext = -67720; + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecModuleManagerInitializeFailed = -67721; + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSMutableString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecModuleManagerNotFound = -67722; + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSMutableString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecEventNotificationCallbackNotFound = -67723; + static NSMutableString new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_new1); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } -const int errSecInputLengthError = -67724; + static NSMutableString alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_alloc1); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } +} -const int errSecOutputLengthError = -67725; +typedef NSExceptionName = ffi.Pointer; -const int errSecPrivilegeNotSupported = -67726; +class NSSimpleCString extends NSString { + NSSimpleCString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecDeviceError = -67727; + /// Returns a [NSSimpleCString] that points to the same underlying object as [other]. + static NSSimpleCString castFrom(T other) { + return NSSimpleCString._(other._id, other._lib, + retain: true, release: true); + } -const int errSecAttachHandleBusy = -67728; + /// Returns a [NSSimpleCString] that wraps the given raw object pointer. + static NSSimpleCString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSSimpleCString._(other, lib, retain: retain, release: release); + } -const int errSecNotLoggedIn = -67729; + /// Returns whether [obj] is an instance of [NSSimpleCString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSSimpleCString1); + } -const int errSecAlgorithmMismatch = -67730; + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSSimpleCString1, _lib._sel_availableStringEncodings1); + } -const int errSecKeyUsageIncorrect = -67731; + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSSimpleCString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecKeyBlobTypeIncorrect = -67732; + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSSimpleCString1, _lib._sel_defaultCStringEncoding1); + } -const int errSecKeyHeaderInconsistent = -67733; + static NSSimpleCString string(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_string1); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedKeyFormat = -67734; + static NSSimpleCString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedKeySize = -67735; + static NSSimpleCString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSSimpleCString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidKeyUsageMask = -67736; + static NSSimpleCString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSSimpleCString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedKeyUsageMask = -67737; + static NSSimpleCString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidKeyAttributeMask = -67738; + static NSSimpleCString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedKeyAttributeMask = -67739; + static NSSimpleCString stringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidKeyLabel = -67740; + static NSSimpleCString + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSSimpleCString1, + _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedKeyLabel = -67741; + static NSSimpleCString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSSimpleCString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidKeyFormat = -67742; + static NSSimpleCString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_269( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedVectorOfBuffers = -67743; + static NSSimpleCString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_270( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidInputVector = -67744; + static NSSimpleCString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_271( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidOutputVector = -67745; + static NSSimpleCString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_272( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidContext = -67746; + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_273( + _lib._class_NSSimpleCString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } -const int errSecInvalidAlgorithm = -67747; + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeKey = -67748; + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeKey = -67749; + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSSimpleCString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeInitVector = -67750; + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSSimpleCString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeInitVector = -67751; + static NSSimpleCString new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_new1); + return NSSimpleCString._(_ret, _lib, retain: false, release: true); + } -const int errSecInvalidAttributeSalt = -67752; + static NSSimpleCString alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_alloc1); + return NSSimpleCString._(_ret, _lib, retain: false, release: true); + } +} -const int errSecMissingAttributeSalt = -67753; +class NSConstantString extends NSSimpleCString { + NSConstantString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecInvalidAttributePadding = -67754; + /// Returns a [NSConstantString] that points to the same underlying object as [other]. + static NSConstantString castFrom(T other) { + return NSConstantString._(other._id, other._lib, + retain: true, release: true); + } -const int errSecMissingAttributePadding = -67755; + /// Returns a [NSConstantString] that wraps the given raw object pointer. + static NSConstantString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSConstantString._(other, lib, retain: retain, release: release); + } -const int errSecInvalidAttributeRandom = -67756; + /// Returns whether [obj] is an instance of [NSConstantString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSConstantString1); + } -const int errSecMissingAttributeRandom = -67757; + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSConstantString1, _lib._sel_availableStringEncodings1); + } -const int errSecInvalidAttributeSeed = -67758; + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSConstantString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeSeed = -67759; + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSConstantString1, _lib._sel_defaultCStringEncoding1); + } -const int errSecInvalidAttributePassphrase = -67760; + static NSConstantString string(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_string1); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributePassphrase = -67761; + static NSConstantString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeKeyLength = -67762; + static NSConstantString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSConstantString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeKeyLength = -67763; + static NSConstantString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSConstantString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeBlockSize = -67764; + static NSConstantString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeBlockSize = -67765; + static NSConstantString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeOutputSize = -67766; + static NSConstantString + stringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSConstantString1, + _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeOutputSize = -67767; + static NSConstantString + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSConstantString1, + _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeRounds = -67768; + static NSConstantString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSConstantString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeRounds = -67769; + static NSConstantString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_269( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAlgorithmParms = -67770; + static NSConstantString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_270( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAlgorithmParms = -67771; + static NSConstantString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_271( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeLabel = -67772; + static NSConstantString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_272( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeLabel = -67773; + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_273( + _lib._class_NSConstantString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } -const int errSecInvalidAttributeKeyType = -67774; + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeKeyType = -67775; + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeMode = -67776; + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSConstantString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeMode = -67777; + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSConstantString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeEffectiveBits = -67778; + static NSConstantString new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_new1); + return NSConstantString._(_ret, _lib, retain: false, release: true); + } -const int errSecMissingAttributeEffectiveBits = -67779; + static NSConstantString alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_alloc1); + return NSConstantString._(_ret, _lib, retain: false, release: true); + } +} -const int errSecInvalidAttributeStartDate = -67780; +class NSMutableCharacterSet extends NSCharacterSet { + NSMutableCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecMissingAttributeStartDate = -67781; + /// Returns a [NSMutableCharacterSet] that points to the same underlying object as [other]. + static NSMutableCharacterSet castFrom(T other) { + return NSMutableCharacterSet._(other._id, other._lib, + retain: true, release: true); + } -const int errSecInvalidAttributeEndDate = -67782; + /// Returns a [NSMutableCharacterSet] that wraps the given raw object pointer. + static NSMutableCharacterSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableCharacterSet._(other, lib, + retain: retain, release: release); + } -const int errSecMissingAttributeEndDate = -67783; + /// Returns whether [obj] is an instance of [NSMutableCharacterSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableCharacterSet1); + } -const int errSecInvalidAttributeVersion = -67784; + void addCharactersInRange_(NSRange aRange) { + return _lib._objc_msgSend_287( + _id, _lib._sel_addCharactersInRange_1, aRange); + } -const int errSecMissingAttributeVersion = -67785; + void removeCharactersInRange_(NSRange aRange) { + return _lib._objc_msgSend_287( + _id, _lib._sel_removeCharactersInRange_1, aRange); + } -const int errSecInvalidAttributePrime = -67786; + void addCharactersInString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_addCharactersInString_1, aString?._id ?? ffi.nullptr); + } -const int errSecMissingAttributePrime = -67787; + void removeCharactersInString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_removeCharactersInString_1, aString?._id ?? ffi.nullptr); + } -const int errSecInvalidAttributeBase = -67788; + void formUnionWithCharacterSet_(NSCharacterSet? otherSet) { + return _lib._objc_msgSend_459(_id, _lib._sel_formUnionWithCharacterSet_1, + otherSet?._id ?? ffi.nullptr); + } -const int errSecMissingAttributeBase = -67789; + void formIntersectionWithCharacterSet_(NSCharacterSet? otherSet) { + return _lib._objc_msgSend_459( + _id, + _lib._sel_formIntersectionWithCharacterSet_1, + otherSet?._id ?? ffi.nullptr); + } -const int errSecInvalidAttributeSubprime = -67790; + void invert() { + return _lib._objc_msgSend_1(_id, _lib._sel_invert1); + } -const int errSecMissingAttributeSubprime = -67791; + static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_controlCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeIterationCount = -67792; + static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_whitespaceCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeIterationCount = -67793; + static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_whitespaceAndNewlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeDLDBHandle = -67794; + static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_decimalDigitCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeDLDBHandle = -67795; + static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_letterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeAccessCredentials = -67796; + static NSCharacterSet? getLowercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_lowercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeAccessCredentials = -67797; + static NSCharacterSet? getUppercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_uppercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributePublicKeyFormat = -67798; + static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_nonBaseCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributePublicKeyFormat = -67799; + static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_alphanumericCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributePrivateKeyFormat = -67800; + static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_decomposableCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributePrivateKeyFormat = -67801; + static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_illegalCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeSymmetricKeyFormat = -67802; + static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_punctuationCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeSymmetricKeyFormat = -67803; + static NSCharacterSet? getCapitalizedLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_capitalizedLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeWrappedKeyFormat = -67804; + static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_symbolCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeWrappedKeyFormat = -67805; + static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_newlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: false, release: true); + } -const int errSecStagedOperationInProgress = -67806; + static NSMutableCharacterSet characterSetWithRange_( + NativeCupertinoHttp _lib, NSRange aRange) { + final _ret = _lib._objc_msgSend_460(_lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithRange_1, aRange); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecStagedOperationNotStarted = -67807; + static NSMutableCharacterSet characterSetWithCharactersInString_( + NativeCupertinoHttp _lib, NSString? aString) { + final _ret = _lib._objc_msgSend_461( + _lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, + aString?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecVerifyFailed = -67808; + static NSMutableCharacterSet characterSetWithBitmapRepresentation_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_462( + _lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, + data?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecQuerySizeUnknown = -67809; + static NSMutableCharacterSet characterSetWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? fName) { + final _ret = _lib._objc_msgSend_461(_lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecBlockSizeMismatch = -67810; + /// Returns a character set containing the characters allowed in a URL's user subcomponent. + static NSCharacterSet? getURLUserAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLUserAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecPublicKeyInconsistent = -67811; + /// Returns a character set containing the characters allowed in a URL's password subcomponent. + static NSCharacterSet? getURLPasswordAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLPasswordAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecDeviceVerifyFailed = -67812; + /// Returns a character set containing the characters allowed in a URL's host subcomponent. + static NSCharacterSet? getURLHostAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLHostAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidLoginName = -67813; + /// Returns a character set containing the characters allowed in a URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + static NSCharacterSet? getURLPathAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLPathAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecAlreadyLoggedIn = -67814; + /// Returns a character set containing the characters allowed in a URL's query component. + static NSCharacterSet? getURLQueryAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLQueryAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidDigestAlgorithm = -67815; + /// Returns a character set containing the characters allowed in a URL's fragment component. + static NSCharacterSet? getURLFragmentAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLFragmentAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidCRLGroup = -67816; + static NSMutableCharacterSet new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableCharacterSet1, _lib._sel_new1); + return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); + } -const int errSecCertificateCannotOperate = -67817; + static NSMutableCharacterSet alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableCharacterSet1, _lib._sel_alloc1); + return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); + } +} -const int errSecCertificateExpired = -67818; +typedef NSURLFileResourceType = ffi.Pointer; +typedef NSURLThumbnailDictionaryItem = ffi.Pointer; +typedef NSURLFileProtectionType = ffi.Pointer; +typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; +typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; +typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; -const int errSecCertificateNotValidYet = -67819; +/// NSURLQueryItem encapsulates a single query name-value pair. The name and value strings of a query name-value pair are not percent encoded. For use with the NSURLComponents queryItems property. +class NSURLQueryItem extends NSObject { + NSURLQueryItem._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecCertificateRevoked = -67820; + /// Returns a [NSURLQueryItem] that points to the same underlying object as [other]. + static NSURLQueryItem castFrom(T other) { + return NSURLQueryItem._(other._id, other._lib, retain: true, release: true); + } -const int errSecCertificateSuspended = -67821; + /// Returns a [NSURLQueryItem] that wraps the given raw object pointer. + static NSURLQueryItem castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLQueryItem._(other, lib, retain: retain, release: release); + } -const int errSecInsufficientCredentials = -67822; + /// Returns whether [obj] is an instance of [NSURLQueryItem]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLQueryItem1); + } -const int errSecInvalidAction = -67823; + NSURLQueryItem initWithName_value_(NSString? name, NSString? value) { + final _ret = _lib._objc_msgSend_463(_id, _lib._sel_initWithName_value_1, + name?._id ?? ffi.nullptr, value?._id ?? ffi.nullptr); + return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAuthority = -67824; + static NSURLQueryItem queryItemWithName_value_( + NativeCupertinoHttp _lib, NSString? name, NSString? value) { + final _ret = _lib._objc_msgSend_463( + _lib._class_NSURLQueryItem1, + _lib._sel_queryItemWithName_value_1, + name?._id ?? ffi.nullptr, + value?._id ?? ffi.nullptr); + return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + } -const int errSecVerifyActionFailed = -67825; + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidCertAuthority = -67826; + NSString? get value { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_value1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidCRLAuthority = -67827; + static NSURLQueryItem new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_new1); + return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + } -const int errSecInvaldCRLAuthority = -67827; + static NSURLQueryItem alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_alloc1); + return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + } +} -const int errSecInvalidCRLEncoding = -67828; +class NSURLComponents extends NSObject { + NSURLComponents._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecInvalidCRLType = -67829; + /// Returns a [NSURLComponents] that points to the same underlying object as [other]. + static NSURLComponents castFrom(T other) { + return NSURLComponents._(other._id, other._lib, + retain: true, release: true); + } -const int errSecInvalidCRL = -67830; + /// Returns a [NSURLComponents] that wraps the given raw object pointer. + static NSURLComponents castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLComponents._(other, lib, retain: retain, release: release); + } -const int errSecInvalidFormType = -67831; + /// Returns whether [obj] is an instance of [NSURLComponents]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLComponents1); + } -const int errSecInvalidID = -67832; + /// Initialize a NSURLComponents with all components undefined. Designated initializer. + @override + NSURLComponents init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidIdentifier = -67833; + /// Initialize a NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. + NSURLComponents initWithURL_resolvingAgainstBaseURL_( + NSURL? url, bool resolve) { + final _ret = _lib._objc_msgSend_206( + _id, + _lib._sel_initWithURL_resolvingAgainstBaseURL_1, + url?._id ?? ffi.nullptr, + resolve); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidIndex = -67834; + /// Initializes and returns a newly created NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. + static NSURLComponents componentsWithURL_resolvingAgainstBaseURL_( + NativeCupertinoHttp _lib, NSURL? url, bool resolve) { + final _ret = _lib._objc_msgSend_206( + _lib._class_NSURLComponents1, + _lib._sel_componentsWithURL_resolvingAgainstBaseURL_1, + url?._id ?? ffi.nullptr, + resolve); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidPolicyIdentifiers = -67835; + /// Initialize a NSURLComponents with a URL string. If the URLString is malformed, nil is returned. + NSURLComponents initWithString_(NSString? URLString) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidTimeString = -67836; + /// Initializes and returns a newly created NSURLComponents with a URL string. If the URLString is malformed, nil is returned. + static NSURLComponents componentsWithString_( + NativeCupertinoHttp _lib, NSString? URLString) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSURLComponents1, + _lib._sel_componentsWithString_1, URLString?._id ?? ffi.nullptr); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidReason = -67837; + /// Returns a URL created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidRequestInputs = -67838; + /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSURL URLRelativeToURL_(NSURL? baseURL) { + final _ret = _lib._objc_msgSend_464( + _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidResponseVector = -67839; + /// Returns a URL string created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSString? get string { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidStopOnPolicy = -67840; + /// Attempting to set the scheme with an invalid scheme string will cause an exception. + NSString? get scheme { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidTuple = -67841; + /// Attempting to set the scheme with an invalid scheme string will cause an exception. + set scheme(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); + } -const int errSecMultipleValuesUnsupported = -67842; + NSString? get user { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecNotTrusted = -67843; + set user(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); + } -const int errSecNoDefaultAuthority = -67844; + NSString? get password { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecRejectedForm = -67845; + set password(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); + } -const int errSecRequestLost = -67846; + NSString? get host { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecRequestRejected = -67847; + set host(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); + } -const int errSecUnsupportedAddressType = -67848; + /// Attempting to set a negative port number will cause an exception. + NSNumber? get port { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedService = -67849; + /// Attempting to set a negative port number will cause an exception. + set port(NSNumber? value) { + _lib._objc_msgSend_335(_id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidTupleGroup = -67850; + NSString? get path { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidBaseACLs = -67851; + set path(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidTupleCredentials = -67852; + NSString? get query { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidTupleCredendtials = -67852; + set query(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidEncoding = -67853; + NSString? get fragment { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidValidityPeriod = -67854; + set fragment(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidRequestor = -67855; + /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + NSString? get percentEncodedUser { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedUser1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecRequestDescriptor = -67856; + /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + set percentEncodedUser(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidBundleInfo = -67857; + NSString? get percentEncodedPassword { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPassword1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidCRLIndex = -67858; + set percentEncodedPassword(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); + } -const int errSecNoFieldValues = -67859; + NSString? get percentEncodedHost { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedHost1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedFieldFormat = -67860; + set percentEncodedHost(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); + } -const int errSecUnsupportedIndexInfo = -67861; + NSString? get percentEncodedPath { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedLocality = -67862; + set percentEncodedPath(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); + } -const int errSecUnsupportedNumAttributes = -67863; + NSString? get percentEncodedQuery { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedQuery1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedNumIndexes = -67864; + set percentEncodedQuery(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); + } -const int errSecUnsupportedNumRecordTypes = -67865; + NSString? get percentEncodedFragment { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedFragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecFieldSpecifiedMultiple = -67866; + set percentEncodedFragment(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); + } -const int errSecIncompatibleFieldFormat = -67867; + NSString? get encodedHost { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_encodedHost1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidParsingModule = -67868; + set encodedHost(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setEncodedHost_1, value?._id ?? ffi.nullptr); + } -const int errSecDatabaseLocked = -67869; + /// These properties return the character range of a component in the URL string returned by -[NSURLComponents string]. If the component does not exist in the NSURLComponents object, {NSNotFound, 0} is returned. Note: Zero length components are legal. For example, the URL string "scheme://:@/?#" has a zero length user, password, host, query and fragment; the URL strings "scheme:" and "" both have a zero length path. + NSRange get rangeOfScheme { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfScheme1); + } -const int errSecDatastoreIsOpen = -67870; + NSRange get rangeOfUser { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfUser1); + } -const int errSecMissingValue = -67871; + NSRange get rangeOfPassword { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPassword1); + } -const int errSecUnsupportedQueryLimits = -67872; + NSRange get rangeOfHost { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfHost1); + } -const int errSecUnsupportedNumSelectionPreds = -67873; + NSRange get rangeOfPort { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPort1); + } -const int errSecUnsupportedOperator = -67874; + NSRange get rangeOfPath { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPath1); + } -const int errSecInvalidDBLocation = -67875; + NSRange get rangeOfQuery { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfQuery1); + } -const int errSecInvalidAccessRequest = -67876; + NSRange get rangeOfFragment { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfFragment1); + } -const int errSecInvalidIndexInfo = -67877; + /// The query component as an array of NSURLQueryItems for this NSURLComponents. + /// + /// Each NSURLQueryItem represents a single key-value pair, + /// + /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. + /// + /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. + /// + /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. + /// + /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. + NSArray? get queryItems { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_queryItems1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidNewOwner = -67878; + /// The query component as an array of NSURLQueryItems for this NSURLComponents. + /// + /// Each NSURLQueryItem represents a single key-value pair, + /// + /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. + /// + /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. + /// + /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. + /// + /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. + set queryItems(NSArray? value) { + _lib._objc_msgSend_399( + _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidModifyMode = -67879; + /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. + /// + /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. + NSArray? get percentEncodedQueryItems { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_percentEncodedQueryItems1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingRequiredExtension = -67880; + /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. + /// + /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. + set percentEncodedQueryItems(NSArray? value) { + _lib._objc_msgSend_399(_id, _lib._sel_setPercentEncodedQueryItems_1, + value?._id ?? ffi.nullptr); + } -const int errSecExtendedKeyUsageNotCritical = -67881; + static NSURLComponents new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_new1); + return NSURLComponents._(_ret, _lib, retain: false, release: true); + } -const int errSecTimestampMissing = -67882; + static NSURLComponents alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_alloc1); + return NSURLComponents._(_ret, _lib, retain: false, release: true); + } +} -const int errSecTimestampInvalid = -67883; +/// NSFileSecurity encapsulates a file system object's security information. NSFileSecurity and CFFileSecurity are toll-free bridged. Use the CFFileSecurity API for access to the low-level file security properties encapsulated by NSFileSecurity. +class NSFileSecurity extends NSObject { + NSFileSecurity._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecTimestampNotTrusted = -67884; + /// Returns a [NSFileSecurity] that points to the same underlying object as [other]. + static NSFileSecurity castFrom(T other) { + return NSFileSecurity._(other._id, other._lib, retain: true, release: true); + } -const int errSecTimestampServiceNotAvailable = -67885; + /// Returns a [NSFileSecurity] that wraps the given raw object pointer. + static NSFileSecurity castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSFileSecurity._(other, lib, retain: retain, release: release); + } -const int errSecTimestampBadAlg = -67886; + /// Returns whether [obj] is an instance of [NSFileSecurity]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSFileSecurity1); + } -const int errSecTimestampBadRequest = -67887; + NSFileSecurity initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSFileSecurity._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampBadDataFormat = -67888; + static NSFileSecurity new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_new1); + return NSFileSecurity._(_ret, _lib, retain: false, release: true); + } -const int errSecTimestampTimeNotAvailable = -67889; + static NSFileSecurity alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_alloc1); + return NSFileSecurity._(_ret, _lib, retain: false, release: true); + } +} -const int errSecTimestampUnacceptedPolicy = -67890; +/// ! +/// @class NSHTTPURLResponse +/// +/// @abstract An NSHTTPURLResponse object represents a response to an +/// HTTP URL load. It is a specialization of NSURLResponse which +/// provides conveniences for accessing information specific to HTTP +/// protocol responses. +class NSHTTPURLResponse extends NSURLResponse { + NSHTTPURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecTimestampUnacceptedExtension = -67891; + /// Returns a [NSHTTPURLResponse] that points to the same underlying object as [other]. + static NSHTTPURLResponse castFrom(T other) { + return NSHTTPURLResponse._(other._id, other._lib, + retain: true, release: true); + } -const int errSecTimestampAddInfoNotAvailable = -67892; + /// Returns a [NSHTTPURLResponse] that wraps the given raw object pointer. + static NSHTTPURLResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPURLResponse._(other, lib, retain: retain, release: release); + } -const int errSecTimestampSystemFailure = -67893; + /// Returns whether [obj] is an instance of [NSHTTPURLResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSHTTPURLResponse1); + } -const int errSecSigningTimeMissing = -67894; + /// ! + /// @method initWithURL:statusCode:HTTPVersion:headerFields: + /// @abstract initializer for NSHTTPURLResponse objects. + /// @param url the URL from which the response was generated. + /// @param statusCode an HTTP status code. + /// @param HTTPVersion The version of the HTTP response as represented by the server. This is typically represented as "HTTP/1.1". + /// @param headerFields A dictionary representing the header keys and values of the server response. + /// @result the instance of the object, or NULL if an error occurred during initialization. + /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. + NSHTTPURLResponse initWithURL_statusCode_HTTPVersion_headerFields_(NSURL? url, + int statusCode, NSString? HTTPVersion, NSDictionary? headerFields) { + final _ret = _lib._objc_msgSend_465( + _id, + _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, + url?._id ?? ffi.nullptr, + statusCode, + HTTPVersion?._id ?? ffi.nullptr, + headerFields?._id ?? ffi.nullptr); + return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampRejection = -67895; + /// ! + /// @abstract Returns the HTTP status code of the receiver. + /// @result The HTTP status code of the receiver. + int get statusCode { + return _lib._objc_msgSend_81(_id, _lib._sel_statusCode1); + } -const int errSecTimestampWaiting = -67896; + /// ! + /// @abstract Returns a dictionary containing all the HTTP header fields + /// of the receiver. + /// @discussion By examining this header dictionary, clients can see + /// the "raw" header information which was reported to the protocol + /// implementation by the HTTP server. This may be of use to + /// sophisticated or special-purpose HTTP clients. + /// @result A dictionary containing all the HTTP header fields of the + /// receiver. + NSDictionary? get allHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampRevocationWarning = -67897; + /// ! + /// @method valueForHTTPHeaderField: + /// @abstract Returns the value which corresponds to the given header + /// field. Note that, in keeping with the HTTP RFC, HTTP header field + /// names are case-insensitive. + /// @param field the header field name to use for the lookup + /// (case-insensitive). + /// @result the value associated with the given header field, or nil if + /// there is no value associated with the given header field. + NSString valueForHTTPHeaderField_(NSString? field) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampRevocationNotification = -67898; + /// ! + /// @method localizedStringForStatusCode: + /// @abstract Convenience method which returns a localized string + /// corresponding to the status code for this response. + /// @param statusCode the status code to use to produce a localized string. + /// @result A localized string corresponding to the given status code. + static NSString localizedStringForStatusCode_( + NativeCupertinoHttp _lib, int statusCode) { + final _ret = _lib._objc_msgSend_466(_lib._class_NSHTTPURLResponse1, + _lib._sel_localizedStringForStatusCode_1, statusCode); + return NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecCertificatePolicyNotAllowed = -67899; + static NSHTTPURLResponse new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_new1); + return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + } -const int errSecCertificateNameNotAllowed = -67900; + static NSHTTPURLResponse alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_alloc1); + return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + } +} -const int errSecCertificateValidityPeriodTooLong = -67901; +class NSException extends NSObject { + NSException._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecCertificateIsCA = -67902; + /// Returns a [NSException] that points to the same underlying object as [other]. + static NSException castFrom(T other) { + return NSException._(other._id, other._lib, retain: true, release: true); + } -const int errSecCertificateDuplicateExtension = -67903; + /// Returns a [NSException] that wraps the given raw object pointer. + static NSException castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSException._(other, lib, retain: retain, release: release); + } -const int errSSLProtocol = -9800; + /// Returns whether [obj] is an instance of [NSException]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSException1); + } -const int errSSLNegotiation = -9801; + static NSException exceptionWithName_reason_userInfo_( + NativeCupertinoHttp _lib, + NSExceptionName name, + NSString? reason, + NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_467( + _lib._class_NSException1, + _lib._sel_exceptionWithName_reason_userInfo_1, + name, + reason?._id ?? ffi.nullptr, + userInfo?._id ?? ffi.nullptr); + return NSException._(_ret, _lib, retain: true, release: true); + } -const int errSSLFatalAlert = -9802; + NSException initWithName_reason_userInfo_( + NSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_468( + _id, + _lib._sel_initWithName_reason_userInfo_1, + aName, + aReason?._id ?? ffi.nullptr, + aUserInfo?._id ?? ffi.nullptr); + return NSException._(_ret, _lib, retain: true, release: true); + } -const int errSSLWouldBlock = -9803; + NSExceptionName get name { + return _lib._objc_msgSend_32(_id, _lib._sel_name1); + } -const int errSSLSessionNotFound = -9804; + NSString? get reason { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_reason1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSSLClosedGraceful = -9805; + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } -const int errSSLClosedAbort = -9806; + NSArray? get callStackReturnAddresses { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_callStackReturnAddresses1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSSLXCertChainInvalid = -9807; + NSArray? get callStackSymbols { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_callStackSymbols1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSSLBadCert = -9808; + void raise() { + return _lib._objc_msgSend_1(_id, _lib._sel_raise1); + } -const int errSSLCrypto = -9809; + static void raise_format_( + NativeCupertinoHttp _lib, NSExceptionName name, NSString? format) { + return _lib._objc_msgSend_367(_lib._class_NSException1, + _lib._sel_raise_format_1, name, format?._id ?? ffi.nullptr); + } -const int errSSLInternal = -9810; + static void raise_format_arguments_(NativeCupertinoHttp _lib, + NSExceptionName name, NSString? format, va_list argList) { + return _lib._objc_msgSend_469( + _lib._class_NSException1, + _lib._sel_raise_format_arguments_1, + name, + format?._id ?? ffi.nullptr, + argList); + } -const int errSSLModuleAttach = -9811; + static NSException new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_new1); + return NSException._(_ret, _lib, retain: false, release: true); + } -const int errSSLUnknownRootCert = -9812; + static NSException alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); + return NSException._(_ret, _lib, retain: false, release: true); + } +} -const int errSSLNoRootCert = -9813; +typedef NSUncaughtExceptionHandler + = ffi.NativeFunction)>; -const int errSSLCertExpired = -9814; +class NSAssertionHandler extends NSObject { + NSAssertionHandler._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSSLCertNotYetValid = -9815; + /// Returns a [NSAssertionHandler] that points to the same underlying object as [other]. + static NSAssertionHandler castFrom(T other) { + return NSAssertionHandler._(other._id, other._lib, + retain: true, release: true); + } -const int errSSLClosedNoNotify = -9816; + /// Returns a [NSAssertionHandler] that wraps the given raw object pointer. + static NSAssertionHandler castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSAssertionHandler._(other, lib, retain: retain, release: release); + } -const int errSSLBufferOverflow = -9817; + /// Returns whether [obj] is an instance of [NSAssertionHandler]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSAssertionHandler1); + } -const int errSSLBadCipherSuite = -9818; + static NSAssertionHandler? getCurrentHandler(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_470( + _lib._class_NSAssertionHandler1, _lib._sel_currentHandler1); + return _ret.address == 0 + ? null + : NSAssertionHandler._(_ret, _lib, retain: true, release: true); + } -const int errSSLPeerUnexpectedMsg = -9819; + void handleFailureInMethod_object_file_lineNumber_description_( + ffi.Pointer selector, + NSObject object, + NSString? fileName, + int line, + NSString? format) { + return _lib._objc_msgSend_471( + _id, + _lib._sel_handleFailureInMethod_object_file_lineNumber_description_1, + selector, + object._id, + fileName?._id ?? ffi.nullptr, + line, + format?._id ?? ffi.nullptr); + } -const int errSSLPeerBadRecordMac = -9820; + void handleFailureInFunction_file_lineNumber_description_( + NSString? functionName, NSString? fileName, int line, NSString? format) { + return _lib._objc_msgSend_472( + _id, + _lib._sel_handleFailureInFunction_file_lineNumber_description_1, + functionName?._id ?? ffi.nullptr, + fileName?._id ?? ffi.nullptr, + line, + format?._id ?? ffi.nullptr); + } -const int errSSLPeerDecryptionFail = -9821; + static NSAssertionHandler new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_new1); + return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + } -const int errSSLPeerRecordOverflow = -9822; + static NSAssertionHandler alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_alloc1); + return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + } +} -const int errSSLPeerDecompressFail = -9823; +class NSBlockOperation extends NSOperation { + NSBlockOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSSLPeerHandshakeFail = -9824; + /// Returns a [NSBlockOperation] that points to the same underlying object as [other]. + static NSBlockOperation castFrom(T other) { + return NSBlockOperation._(other._id, other._lib, + retain: true, release: true); + } -const int errSSLPeerBadCert = -9825; + /// Returns a [NSBlockOperation] that wraps the given raw object pointer. + static NSBlockOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSBlockOperation._(other, lib, retain: retain, release: release); + } -const int errSSLPeerUnsupportedCert = -9826; + /// Returns whether [obj] is an instance of [NSBlockOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSBlockOperation1); + } -const int errSSLPeerCertRevoked = -9827; + static NSBlockOperation blockOperationWithBlock_( + NativeCupertinoHttp _lib, ObjCBlock block) { + final _ret = _lib._objc_msgSend_473(_lib._class_NSBlockOperation1, + _lib._sel_blockOperationWithBlock_1, block._id); + return NSBlockOperation._(_ret, _lib, retain: true, release: true); + } -const int errSSLPeerCertExpired = -9828; + void addExecutionBlock_(ObjCBlock block) { + return _lib._objc_msgSend_345( + _id, _lib._sel_addExecutionBlock_1, block._id); + } -const int errSSLPeerCertUnknown = -9829; + NSArray? get executionBlocks { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_executionBlocks1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSSLIllegalParam = -9830; + static NSBlockOperation new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_new1); + return NSBlockOperation._(_ret, _lib, retain: false, release: true); + } -const int errSSLPeerUnknownCA = -9831; + static NSBlockOperation alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_alloc1); + return NSBlockOperation._(_ret, _lib, retain: false, release: true); + } +} -const int errSSLPeerAccessDenied = -9832; +class NSInvocationOperation extends NSOperation { + NSInvocationOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSSLPeerDecodeError = -9833; + /// Returns a [NSInvocationOperation] that points to the same underlying object as [other]. + static NSInvocationOperation castFrom(T other) { + return NSInvocationOperation._(other._id, other._lib, + retain: true, release: true); + } -const int errSSLPeerDecryptError = -9834; + /// Returns a [NSInvocationOperation] that wraps the given raw object pointer. + static NSInvocationOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInvocationOperation._(other, lib, + retain: retain, release: release); + } -const int errSSLPeerExportRestriction = -9835; + /// Returns whether [obj] is an instance of [NSInvocationOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSInvocationOperation1); + } -const int errSSLPeerProtocolVersion = -9836; + NSInvocationOperation initWithTarget_selector_object_( + NSObject target, ffi.Pointer sel, NSObject arg) { + final _ret = _lib._objc_msgSend_474(_id, + _lib._sel_initWithTarget_selector_object_1, target._id, sel, arg._id); + return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + } -const int errSSLPeerInsufficientSecurity = -9837; + NSInvocationOperation initWithInvocation_(NSInvocation? inv) { + final _ret = _lib._objc_msgSend_475( + _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); + return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + } -const int errSSLPeerInternalError = -9838; + NSInvocation? get invocation { + final _ret = _lib._objc_msgSend_476(_id, _lib._sel_invocation1); + return _ret.address == 0 + ? null + : NSInvocation._(_ret, _lib, retain: true, release: true); + } -const int errSSLPeerUserCancelled = -9839; + NSObject get result { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_result1); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSSLPeerNoRenegotiation = -9840; + static NSInvocationOperation new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInvocationOperation1, _lib._sel_new1); + return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + } -const int errSSLPeerAuthCompleted = -9841; + static NSInvocationOperation alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInvocationOperation1, _lib._sel_alloc1); + return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + } +} -const int errSSLClientCertRequested = -9842; +class _Dart_Isolate extends ffi.Opaque {} -const int errSSLHostNameMismatch = -9843; +class _Dart_IsolateGroup extends ffi.Opaque {} -const int errSSLConnectionRefused = -9844; +class _Dart_Handle extends ffi.Opaque {} -const int errSSLDecryptionFail = -9845; +class _Dart_WeakPersistentHandle extends ffi.Opaque {} -const int errSSLBadRecordMac = -9846; +class _Dart_FinalizableHandle extends ffi.Opaque {} -const int errSSLRecordOverflow = -9847; +typedef Dart_WeakPersistentHandle = ffi.Pointer<_Dart_WeakPersistentHandle>; -const int errSSLBadConfiguration = -9848; +/// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the +/// version when changing this struct. +typedef Dart_HandleFinalizer = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +typedef Dart_FinalizableHandle = ffi.Pointer<_Dart_FinalizableHandle>; -const int errSSLUnexpectedRecord = -9849; +class Dart_IsolateFlags extends ffi.Struct { + @ffi.Int32() + external int version; -const int errSSLWeakPeerEphemeralDHKey = -9850; + @ffi.Bool() + external bool enable_asserts; -const int errSSLClientHelloReceived = -9851; + @ffi.Bool() + external bool use_field_guards; -const int errSSLTransportReset = -9852; + @ffi.Bool() + external bool use_osr; -const int errSSLNetworkTimeout = -9853; + @ffi.Bool() + external bool obfuscate; -const int errSSLConfigurationFailed = -9854; + @ffi.Bool() + external bool load_vmservice_library; -const int errSSLUnsupportedExtension = -9855; + @ffi.Bool() + external bool copy_parent_code; -const int errSSLUnexpectedMessage = -9856; + @ffi.Bool() + external bool null_safety; -const int errSSLDecompressFail = -9857; + @ffi.Bool() + external bool is_system_isolate; +} -const int errSSLHandshakeFail = -9858; +/// Forward declaration +class Dart_CodeObserver extends ffi.Struct { + external ffi.Pointer data; -const int errSSLDecodeError = -9859; + external Dart_OnNewCodeCallback on_new_code; +} -const int errSSLInappropriateFallback = -9860; +/// Callback provided by the embedder that is used by the VM to notify on code +/// object creation, *before* it is invoked the first time. +/// This is useful for embedders wanting to e.g. keep track of PCs beyond +/// the lifetime of the garbage collected code objects. +/// Note that an address range may be used by more than one code object over the +/// lifecycle of a process. Clients of this function should record timestamps for +/// these compilation events and when collecting PCs to disambiguate reused +/// address ranges. +typedef Dart_OnNewCodeCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.UintPtr, ffi.UintPtr)>>; -const int errSSLMissingExtension = -9861; +/// Describes how to initialize the VM. Used with Dart_Initialize. +/// +/// \param version Identifies the version of the struct used by the client. +/// should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. +/// \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate +/// or NULL if no snapshot is provided. If provided, the buffer must remain +/// valid until Dart_Cleanup returns. +/// \param instructions_snapshot A buffer containing a snapshot of precompiled +/// instructions, or NULL if no snapshot is provided. If provided, the buffer +/// must remain valid until Dart_Cleanup returns. +/// \param initialize_isolate A function to be called during isolate +/// initialization inside an existing isolate group. +/// See Dart_InitializeIsolateCallback. +/// \param create_group A function to be called during isolate group creation. +/// See Dart_IsolateGroupCreateCallback. +/// \param shutdown A function to be called right before an isolate is shutdown. +/// See Dart_IsolateShutdownCallback. +/// \param cleanup A function to be called after an isolate was shutdown. +/// See Dart_IsolateCleanupCallback. +/// \param cleanup_group A function to be called after an isolate group is shutdown. +/// See Dart_IsolateGroupCleanupCallback. +/// \param get_service_assets A function to be called by the service isolate when +/// it requires the vmservice assets archive. +/// See Dart_GetVMServiceAssetsArchive. +/// \param code_observer An external code observer callback function. +/// The observer can be invoked as early as during the Dart_Initialize() call. +class Dart_InitializeParams extends ffi.Struct { + @ffi.Int32() + external int version; -const int errSSLBadCertificateStatusResponse = -9862; + external ffi.Pointer vm_snapshot_data; -const int errSSLCertificateRequired = -9863; + external ffi.Pointer vm_snapshot_instructions; -const int errSSLUnknownPSKIdentity = -9864; + external Dart_IsolateGroupCreateCallback create_group; -const int errSSLUnrecognizedName = -9865; + external Dart_InitializeIsolateCallback initialize_isolate; -const int errSSLATSViolation = -9880; + external Dart_IsolateShutdownCallback shutdown_isolate; -const int errSSLATSMinimumVersionViolation = -9881; + external Dart_IsolateCleanupCallback cleanup_isolate; -const int errSSLATSCiphersuiteViolation = -9882; + external Dart_IsolateGroupCleanupCallback cleanup_group; -const int errSSLATSMinimumKeySizeViolation = -9883; + external Dart_ThreadExitCallback thread_exit; -const int errSSLATSLeafCertificateHashAlgorithmViolation = -9884; + external Dart_FileOpenCallback file_open; -const int errSSLATSCertificateHashAlgorithmViolation = -9885; + external Dart_FileReadCallback file_read; -const int errSSLATSCertificateTrustViolation = -9886; + external Dart_FileWriteCallback file_write; -const int errSSLEarlyDataRejected = -9890; + external Dart_FileCloseCallback file_close; -const int OSUnknownByteOrder = 0; + external Dart_EntropySource entropy_source; -const int OSLittleEndian = 1; + external Dart_GetVMServiceAssetsArchive get_service_assets; -const int OSBigEndian = 2; + @ffi.Bool() + external bool start_kernel_isolate; -const int kCFNotificationDeliverImmediately = 1; + external ffi.Pointer code_observer; +} -const int kCFNotificationPostToAllSessions = 2; +/// An isolate creation and initialization callback function. +/// +/// This callback, provided by the embedder, is called when the VM +/// needs to create an isolate. The callback should create an isolate +/// by calling Dart_CreateIsolateGroup and load any scripts required for +/// execution. +/// +/// This callback may be called on a different thread than the one +/// running the parent isolate. +/// +/// When the function returns NULL, it is the responsibility of this +/// function to ensure that Dart_ShutdownIsolate has been called if +/// required (for example, if the isolate was created successfully by +/// Dart_CreateIsolateGroup() but the root library fails to load +/// successfully, then the function should call Dart_ShutdownIsolate +/// before returning). +/// +/// When the function returns NULL, the function should set *error to +/// a malloc-allocated buffer containing a useful error message. The +/// caller of this function (the VM) will make sure that the buffer is +/// freed. +/// +/// \param script_uri The uri of the main source file or snapshot to load. +/// Either the URI of the parent isolate set in Dart_CreateIsolateGroup for +/// Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the +/// library tag handler of the parent isolate. +/// The callback is responsible for loading the program by a call to +/// Dart_LoadScriptFromKernel. +/// \param main The name of the main entry point this isolate will +/// eventually run. This is provided for advisory purposes only to +/// improve debugging messages. The main function is not invoked by +/// this function. +/// \param package_root Ignored. +/// \param package_config Uri of the package configuration file (either in format +/// of .packages or .dart_tool/package_config.json) for this isolate +/// to resolve package imports against. If this parameter is not passed the +/// package resolution of the parent isolate should be used. +/// \param flags Default flags for this isolate being spawned. Either inherited +/// from the spawning isolate or passed as parameters when spawning the +/// isolate from Dart code. +/// \param isolate_data The isolate data which was passed to the +/// parent isolate when it was created by calling Dart_CreateIsolateGroup(). +/// \param error A structure into which the embedder can place a +/// C string containing an error message in the case of failures. +/// +/// \return The embedder returns NULL if the creation and +/// initialization was not successful and the isolate if successful. +typedef Dart_IsolateGroupCreateCallback = ffi.Pointer< + ffi.NativeFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>; -const int kCFCalendarComponentsWrap = 1; +/// An isolate is the unit of concurrency in Dart. Each isolate has +/// its own memory and thread of control. No state is shared between +/// isolates. Instead, isolates communicate by message passing. +/// +/// Each thread keeps track of its current isolate, which is the +/// isolate which is ready to execute on the current thread. The +/// current isolate may be NULL, in which case no isolate is ready to +/// execute. Most of the Dart apis require there to be a current +/// isolate in order to function without error. The current isolate is +/// set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. +typedef Dart_Isolate = ffi.Pointer<_Dart_Isolate>; -const int kCFSocketAutomaticallyReenableReadCallBack = 1; +/// An isolate initialization callback function. +/// +/// This callback, provided by the embedder, is called when the VM has created an +/// isolate within an existing isolate group (i.e. from the same source as an +/// existing isolate). +/// +/// The callback should setup native resolvers and might want to set a custom +/// message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as +/// runnable. +/// +/// This callback may be called on a different thread than the one +/// running the parent isolate. +/// +/// When the function returns `false`, it is the responsibility of this +/// function to ensure that `Dart_ShutdownIsolate` has been called. +/// +/// When the function returns `false`, the function should set *error to +/// a malloc-allocated buffer containing a useful error message. The +/// caller of this function (the VM) will make sure that the buffer is +/// freed. +/// +/// \param child_isolate_data The callback data to associate with the new +/// child isolate. +/// \param error A structure into which the embedder can place a +/// C string containing an error message in the case the initialization fails. +/// +/// \return The embedder returns true if the initialization was successful and +/// false otherwise (in which case the VM will terminate the isolate). +typedef Dart_InitializeIsolateCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer>, + ffi.Pointer>)>>; -const int kCFSocketAutomaticallyReenableAcceptCallBack = 2; +/// An isolate shutdown callback function. +/// +/// This callback, provided by the embedder, is called before the vm +/// shuts down an isolate. The isolate being shutdown will be the current +/// isolate. It is safe to run Dart code. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +/// \param isolate_data The same callback data which was passed to the isolate +/// when it was created. +typedef Dart_IsolateShutdownCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -const int kCFSocketAutomaticallyReenableDataCallBack = 3; +/// An isolate cleanup callback function. +/// +/// This callback, provided by the embedder, is called after the vm +/// shuts down an isolate. There will be no current isolate and it is *not* +/// safe to run Dart code. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +/// \param isolate_data The same callback data which was passed to the isolate +/// when it was created. +typedef Dart_IsolateCleanupCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -const int kCFSocketAutomaticallyReenableWriteCallBack = 8; +/// An isolate group cleanup callback function. +/// +/// This callback, provided by the embedder, is called after the vm +/// shuts down an isolate group. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +typedef Dart_IsolateGroupCleanupCallback + = ffi.Pointer)>>; -const int kCFSocketLeaveErrors = 64; +/// A thread death callback function. +/// This callback, provided by the embedder, is called before a thread in the +/// vm thread pool exits. +/// This function could be used to dispose of native resources that +/// are associated and attached to the thread, in order to avoid leaks. +typedef Dart_ThreadExitCallback + = ffi.Pointer>; -const int kCFSocketCloseOnInvalidate = 128; +/// Callbacks provided by the embedder for file operations. If the +/// embedder does not allow file operations these callbacks can be +/// NULL. +/// +/// Dart_FileOpenCallback - opens a file for reading or writing. +/// \param name The name of the file to open. +/// \param write A boolean variable which indicates if the file is to +/// opened for writing. If there is an existing file it needs to truncated. +/// +/// Dart_FileReadCallback - Read contents of file. +/// \param data Buffer allocated in the callback into which the contents +/// of the file are read into. It is the responsibility of the caller to +/// free this buffer. +/// \param file_length A variable into which the length of the file is returned. +/// In the case of an error this value would be -1. +/// \param stream Handle to the opened file. +/// +/// Dart_FileWriteCallback - Write data into file. +/// \param data Buffer which needs to be written into the file. +/// \param length Length of the buffer. +/// \param stream Handle to the opened file. +/// +/// Dart_FileCloseCallback - Closes the opened file. +/// \param stream Handle to the opened file. +typedef Dart_FileOpenCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Bool)>>; +typedef Dart_FileReadCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>; +typedef Dart_FileWriteCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.IntPtr, ffi.Pointer)>>; +typedef Dart_FileCloseCallback + = ffi.Pointer)>>; +typedef Dart_EntropySource = ffi.Pointer< + ffi.NativeFunction, ffi.IntPtr)>>; -const int DISPATCH_WALLTIME_NOW = -2; +/// Callback provided by the embedder that is used by the vmservice isolate +/// to request the asset archive. The asset archive must be an uncompressed tar +/// archive that is stored in a Uint8List. +/// +/// If the embedder has no vmservice isolate assets, the callback can be NULL. +/// +/// \return The embedder must return a handle to a Uint8List containing an +/// uncompressed tar archive or null. +typedef Dart_GetVMServiceAssetsArchive + = ffi.Pointer>; +typedef Dart_IsolateGroup = ffi.Pointer<_Dart_IsolateGroup>; -const int kCFPropertyListReadCorruptError = 3840; +/// A message notification callback. +/// +/// This callback allows the embedder to provide an alternate wakeup +/// mechanism for the delivery of inter-isolate messages. It is the +/// responsibility of the embedder to call Dart_HandleMessage to +/// process the message. +typedef Dart_MessageNotifyCallback + = ffi.Pointer>; -const int kCFPropertyListReadUnknownVersionError = 3841; +/// A port is used to send or receive inter-isolate messages +typedef Dart_Port = ffi.Int64; -const int kCFPropertyListReadStreamError = 3842; +abstract class Dart_CoreType_Id { + static const int Dart_CoreType_Dynamic = 0; + static const int Dart_CoreType_Int = 1; + static const int Dart_CoreType_String = 2; +} -const int kCFPropertyListWriteStreamError = 3851; +/// ========== +/// Typed Data +/// ========== +abstract class Dart_TypedData_Type { + static const int Dart_TypedData_kByteData = 0; + static const int Dart_TypedData_kInt8 = 1; + static const int Dart_TypedData_kUint8 = 2; + static const int Dart_TypedData_kUint8Clamped = 3; + static const int Dart_TypedData_kInt16 = 4; + static const int Dart_TypedData_kUint16 = 5; + static const int Dart_TypedData_kInt32 = 6; + static const int Dart_TypedData_kUint32 = 7; + static const int Dart_TypedData_kInt64 = 8; + static const int Dart_TypedData_kUint64 = 9; + static const int Dart_TypedData_kFloat32 = 10; + static const int Dart_TypedData_kFloat64 = 11; + static const int Dart_TypedData_kInt32x4 = 12; + static const int Dart_TypedData_kFloat32x4 = 13; + static const int Dart_TypedData_kFloat64x2 = 14; + static const int Dart_TypedData_kInvalid = 15; +} -const int kCFBundleExecutableArchitectureI386 = 7; +class _Dart_NativeArguments extends ffi.Opaque {} -const int kCFBundleExecutableArchitecturePPC = 18; +/// The arguments to a native function. +/// +/// This object is passed to a native function to represent its +/// arguments and return value. It allows access to the arguments to a +/// native function by index. It also allows the return value of a +/// native function to be set. +typedef Dart_NativeArguments = ffi.Pointer<_Dart_NativeArguments>; -const int kCFBundleExecutableArchitectureX86_64 = 16777223; +abstract class Dart_NativeArgument_Type { + static const int Dart_NativeArgument_kBool = 0; + static const int Dart_NativeArgument_kInt32 = 1; + static const int Dart_NativeArgument_kUint32 = 2; + static const int Dart_NativeArgument_kInt64 = 3; + static const int Dart_NativeArgument_kUint64 = 4; + static const int Dart_NativeArgument_kDouble = 5; + static const int Dart_NativeArgument_kString = 6; + static const int Dart_NativeArgument_kInstance = 7; + static const int Dart_NativeArgument_kNativeFields = 8; +} -const int kCFBundleExecutableArchitecturePPC64 = 16777234; +class _Dart_NativeArgument_Descriptor extends ffi.Struct { + @ffi.Uint8() + external int type; -const int kCFBundleExecutableArchitectureARM64 = 16777228; + @ffi.Uint8() + external int index; +} -const int kCFMessagePortSuccess = 0; +class _Dart_NativeArgument_Value extends ffi.Opaque {} -const int kCFMessagePortSendTimeout = -1; +typedef Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor; +typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; -const int kCFMessagePortReceiveTimeout = -2; +/// An environment lookup callback function. +/// +/// \param name The name of the value to lookup in the environment. +/// +/// \return A valid handle to a string if the name exists in the +/// current environment or Dart_Null() if not. +typedef Dart_EnvironmentCallback + = ffi.Pointer>; -const int kCFMessagePortIsInvalid = -3; +/// Native entry resolution callback. +/// +/// For libraries and scripts which have native functions, the embedder +/// can provide a native entry resolver. This callback is used to map a +/// name/arity to a Dart_NativeFunction. If no function is found, the +/// callback should return NULL. +/// +/// The parameters to the native resolver function are: +/// \param name a Dart string which is the name of the native function. +/// \param num_of_arguments is the number of arguments expected by the +/// native function. +/// \param auto_setup_scope is a boolean flag that can be set by the resolver +/// to indicate if this function needs a Dart API scope (see Dart_EnterScope/ +/// Dart_ExitScope) to be setup automatically by the VM before calling into +/// the native function. By default most native functions would require this +/// to be true but some light weight native functions which do not call back +/// into the VM through the Dart API may not require a Dart scope to be +/// setup automatically. +/// +/// \return A valid Dart_NativeFunction which resolves to a native entry point +/// for the native function. +/// +/// See Dart_SetNativeResolver. +typedef Dart_NativeEntryResolver = ffi.Pointer< + ffi.NativeFunction< + Dart_NativeFunction Function( + ffi.Handle, ffi.Int, ffi.Pointer)>>; -const int kCFMessagePortTransportError = -4; +/// A native function. +typedef Dart_NativeFunction + = ffi.Pointer>; -const int kCFMessagePortBecameInvalidError = -5; +/// Native entry symbol lookup callback. +/// +/// For libraries and scripts which have native functions, the embedder +/// can provide a callback for mapping a native entry to a symbol. This callback +/// maps a native function entry PC to the native function name. If no native +/// entry symbol can be found, the callback should return NULL. +/// +/// The parameters to the native reverse resolver function are: +/// \param nf A Dart_NativeFunction. +/// +/// \return A const UTF-8 string containing the symbol name or NULL. +/// +/// See Dart_SetNativeResolver. +typedef Dart_NativeEntrySymbol = ffi.Pointer< + ffi.NativeFunction Function(Dart_NativeFunction)>>; -const int kCFStringTokenizerUnitWord = 0; +/// FFI Native C function pointer resolver callback. +/// +/// See Dart_SetFfiNativeResolver. +typedef Dart_FfiNativeResolver = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.UintPtr)>>; -const int kCFStringTokenizerUnitSentence = 1; +/// ===================== +/// Scripts and Libraries +/// ===================== +abstract class Dart_LibraryTag { + static const int Dart_kCanonicalizeUrl = 0; + static const int Dart_kImportTag = 1; + static const int Dart_kKernelTag = 2; +} -const int kCFStringTokenizerUnitParagraph = 2; +/// The library tag handler is a multi-purpose callback provided by the +/// embedder to the Dart VM. The embedder implements the tag handler to +/// provide the ability to load Dart scripts and imports. +/// +/// -- TAGS -- +/// +/// Dart_kCanonicalizeUrl +/// +/// This tag indicates that the embedder should canonicalize 'url' with +/// respect to 'library'. For most embedders, the +/// Dart_DefaultCanonicalizeUrl function is a sufficient implementation +/// of this tag. The return value should be a string holding the +/// canonicalized url. +/// +/// Dart_kImportTag +/// +/// This tag is used to load a library from IsolateMirror.loadUri. The embedder +/// should call Dart_LoadLibraryFromKernel to provide the library to the VM. The +/// return value should be an error or library (the result from +/// Dart_LoadLibraryFromKernel). +/// +/// Dart_kKernelTag +/// +/// This tag is used to load the intermediate file (kernel) generated by +/// the Dart front end. This tag is typically used when a 'hot-reload' +/// of an application is needed and the VM is 'use dart front end' mode. +/// The dart front end typically compiles all the scripts, imports and part +/// files into one intermediate file hence we don't use the source/import or +/// script tags. The return value should be an error or a TypedData containing +/// the kernel bytes. +typedef Dart_LibraryTagHandler = ffi.Pointer< + ffi.NativeFunction>; -const int kCFStringTokenizerUnitLineBreak = 3; +/// Handles deferred loading requests. When this handler is invoked, it should +/// eventually load the deferred loading unit with the given id and call +/// Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is +/// recommended that the loading occur asynchronously, but it is permitted to +/// call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the +/// handler returns. +/// +/// If an error is returned, it will be propogated through +/// `prefix.loadLibrary()`. This is useful for synchronous +/// implementations, which must propogate any unwind errors from +/// Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler +/// should return a non-error such as `Dart_Null()`. +typedef Dart_DeferredLoadHandler + = ffi.Pointer>; -const int kCFStringTokenizerUnitWordBoundary = 4; +/// TODO(33433): Remove kernel service from the embedding API. +abstract class Dart_KernelCompilationStatus { + static const int Dart_KernelCompilationStatus_Unknown = -1; + static const int Dart_KernelCompilationStatus_Ok = 0; + static const int Dart_KernelCompilationStatus_Error = 1; + static const int Dart_KernelCompilationStatus_Crash = 2; + static const int Dart_KernelCompilationStatus_MsgFailed = 3; +} -const int kCFStringTokenizerAttributeLatinTranscription = 65536; +class Dart_KernelCompilationResult extends ffi.Struct { + @ffi.Int32() + external int status; -const int kCFStringTokenizerAttributeLanguage = 131072; + @ffi.Bool() + external bool null_safety; -const int kCFFileDescriptorReadCallBack = 1; + external ffi.Pointer error; -const int kCFFileDescriptorWriteCallBack = 2; + external ffi.Pointer kernel; -const int kCFUserNotificationStopAlertLevel = 0; + @ffi.IntPtr() + external int kernel_size; +} -const int kCFUserNotificationNoteAlertLevel = 1; +abstract class Dart_KernelCompilationVerbosityLevel { + static const int Dart_KernelCompilationVerbosityLevel_Error = 0; + static const int Dart_KernelCompilationVerbosityLevel_Warning = 1; + static const int Dart_KernelCompilationVerbosityLevel_Info = 2; + static const int Dart_KernelCompilationVerbosityLevel_All = 3; +} -const int kCFUserNotificationCautionAlertLevel = 2; +class Dart_SourceFile extends ffi.Struct { + external ffi.Pointer uri; -const int kCFUserNotificationPlainAlertLevel = 3; + external ffi.Pointer source; +} -const int kCFUserNotificationDefaultResponse = 0; +typedef Dart_StreamingWriteCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.IntPtr)>>; +typedef Dart_CreateLoadingUnitCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer>, + ffi.Pointer>)>>; +typedef Dart_StreamingCloseCallback + = ffi.Pointer)>>; -const int kCFUserNotificationAlternateResponse = 1; +/// A Dart_CObject is used for representing Dart objects as native C +/// data outside the Dart heap. These objects are totally detached from +/// the Dart heap. Only a subset of the Dart objects have a +/// representation as a Dart_CObject. +/// +/// The string encoding in the 'value.as_string' is UTF-8. +/// +/// All the different types from dart:typed_data are exposed as type +/// kTypedData. The specific type from dart:typed_data is in the type +/// field of the as_typed_data structure. The length in the +/// as_typed_data structure is always in bytes. +/// +/// The data for kTypedData is copied on message send and ownership remains with +/// the caller. The ownership of data for kExternalTyped is passed to the VM on +/// message send and returned when the VM invokes the +/// Dart_HandleFinalizer callback; a non-NULL callback must be provided. +abstract class Dart_CObject_Type { + static const int Dart_CObject_kNull = 0; + static const int Dart_CObject_kBool = 1; + static const int Dart_CObject_kInt32 = 2; + static const int Dart_CObject_kInt64 = 3; + static const int Dart_CObject_kDouble = 4; + static const int Dart_CObject_kString = 5; + static const int Dart_CObject_kArray = 6; + static const int Dart_CObject_kTypedData = 7; + static const int Dart_CObject_kExternalTypedData = 8; + static const int Dart_CObject_kSendPort = 9; + static const int Dart_CObject_kCapability = 10; + static const int Dart_CObject_kNativePointer = 11; + static const int Dart_CObject_kUnsupported = 12; + static const int Dart_CObject_kNumberOfTypes = 13; +} -const int kCFUserNotificationOtherResponse = 2; +class _Dart_CObject extends ffi.Struct { + @ffi.Int32() + external int type; -const int kCFUserNotificationCancelResponse = 3; + external UnnamedUnion6 value; +} -const int kCFUserNotificationNoDefaultButtonFlag = 32; +class UnnamedUnion6 extends ffi.Union { + @ffi.Bool() + external bool as_bool; -const int kCFUserNotificationUseRadioButtonsFlag = 64; + @ffi.Int32() + external int as_int32; -const int kCFXMLNodeCurrentVersion = 1; + @ffi.Int64() + external int as_int64; -const int CSSM_INVALID_HANDLE = 0; + @ffi.Double() + external double as_double; -const int CSSM_FALSE = 0; + external ffi.Pointer as_string; -const int CSSM_TRUE = 1; + external UnnamedStruct5 as_send_port; -const int CSSM_OK = 0; + external UnnamedStruct6 as_capability; -const int CSSM_MODULE_STRING_SIZE = 64; + external UnnamedStruct7 as_array; -const int CSSM_KEY_HIERARCHY_NONE = 0; + external UnnamedStruct8 as_typed_data; -const int CSSM_KEY_HIERARCHY_INTEG = 1; + external UnnamedStruct9 as_external_typed_data; -const int CSSM_KEY_HIERARCHY_EXPORT = 2; + external UnnamedStruct10 as_native_pointer; +} -const int CSSM_PVC_NONE = 0; +class UnnamedStruct5 extends ffi.Struct { + @Dart_Port() + external int id; -const int CSSM_PVC_APP = 1; + @Dart_Port() + external int origin_id; +} -const int CSSM_PVC_SP = 2; +class UnnamedStruct6 extends ffi.Struct { + @ffi.Int64() + external int id; +} -const int CSSM_PRIVILEGE_SCOPE_NONE = 0; +class UnnamedStruct7 extends ffi.Struct { + @ffi.IntPtr() + external int length; -const int CSSM_PRIVILEGE_SCOPE_PROCESS = 1; + external ffi.Pointer> values; +} -const int CSSM_PRIVILEGE_SCOPE_THREAD = 2; +class UnnamedStruct8 extends ffi.Struct { + @ffi.Int32() + external int type; -const int CSSM_SERVICE_CSSM = 1; + /// in elements, not bytes + @ffi.IntPtr() + external int length; -const int CSSM_SERVICE_CSP = 2; + external ffi.Pointer values; +} -const int CSSM_SERVICE_DL = 4; +class UnnamedStruct9 extends ffi.Struct { + @ffi.Int32() + external int type; -const int CSSM_SERVICE_CL = 8; + /// in elements, not bytes + @ffi.IntPtr() + external int length; -const int CSSM_SERVICE_TP = 16; + external ffi.Pointer data; -const int CSSM_SERVICE_AC = 32; + external ffi.Pointer peer; -const int CSSM_SERVICE_KR = 64; + external Dart_HandleFinalizer callback; +} -const int CSSM_NOTIFY_INSERT = 1; +class UnnamedStruct10 extends ffi.Struct { + @ffi.IntPtr() + external int ptr; -const int CSSM_NOTIFY_REMOVE = 2; + @ffi.IntPtr() + external int size; -const int CSSM_NOTIFY_FAULT = 3; + external Dart_HandleFinalizer callback; +} -const int CSSM_ATTACH_READ_ONLY = 1; +typedef Dart_CObject = _Dart_CObject; -const int CSSM_USEE_LAST = 255; +/// A native message handler. +/// +/// This handler is associated with a native port by calling +/// Dart_NewNativePort. +/// +/// The message received is decoded into the message structure. The +/// lifetime of the message data is controlled by the caller. All the +/// data references from the message are allocated by the caller and +/// will be reclaimed when returning to it. +typedef Dart_NativeMessageHandler = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_Port, ffi.Pointer)>>; +typedef Dart_PostCObject_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(Dart_Port_DL, ffi.Pointer)>>; -const int CSSM_USEE_NONE = 0; +/// ============================================================================ +/// IMPORTANT! Never update these signatures without properly updating +/// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. +/// +/// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types +/// to trigger compile-time errors if the sybols in those files are updated +/// without updating these. +/// +/// Function return and argument types, and typedefs are carbon copied. Structs +/// are typechecked nominally in C/C++, so they are not copied, instead a +/// comment is added to their definition. +typedef Dart_Port_DL = ffi.Int64; +typedef Dart_PostInteger_Type = ffi + .Pointer>; +typedef Dart_NewNativePort_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_Port_DL Function( + ffi.Pointer, Dart_NativeMessageHandler_DL, ffi.Bool)>>; +typedef Dart_NativeMessageHandler_DL = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_Port_DL, ffi.Pointer)>>; +typedef Dart_CloseNativePort_Type + = ffi.Pointer>; +typedef Dart_IsError_Type + = ffi.Pointer>; +typedef Dart_IsApiError_Type + = ffi.Pointer>; +typedef Dart_IsUnhandledExceptionError_Type + = ffi.Pointer>; +typedef Dart_IsCompilationError_Type + = ffi.Pointer>; +typedef Dart_IsFatalError_Type + = ffi.Pointer>; +typedef Dart_GetError_Type = ffi + .Pointer Function(ffi.Handle)>>; +typedef Dart_ErrorHasException_Type + = ffi.Pointer>; +typedef Dart_ErrorGetException_Type + = ffi.Pointer>; +typedef Dart_ErrorGetStackTrace_Type + = ffi.Pointer>; +typedef Dart_NewApiError_Type = ffi + .Pointer)>>; +typedef Dart_NewCompilationError_Type = ffi + .Pointer)>>; +typedef Dart_NewUnhandledExceptionError_Type + = ffi.Pointer>; +typedef Dart_PropagateError_Type + = ffi.Pointer>; +typedef Dart_HandleFromPersistent_Type + = ffi.Pointer>; +typedef Dart_HandleFromWeakPersistent_Type = ffi.Pointer< + ffi.NativeFunction>; +typedef Dart_NewPersistentHandle_Type + = ffi.Pointer>; +typedef Dart_SetPersistentHandle_Type = ffi + .Pointer>; +typedef Dart_DeletePersistentHandle_Type + = ffi.Pointer>; +typedef Dart_NewWeakPersistentHandle_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_WeakPersistentHandle Function(ffi.Handle, ffi.Pointer, + ffi.IntPtr, Dart_HandleFinalizer)>>; +typedef Dart_DeleteWeakPersistentHandle_Type = ffi + .Pointer>; +typedef Dart_UpdateExternalSize_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_WeakPersistentHandle, ffi.IntPtr)>>; +typedef Dart_NewFinalizableHandle_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, + ffi.IntPtr, Dart_HandleFinalizer)>>; +typedef Dart_DeleteFinalizableHandle_Type = ffi.Pointer< + ffi.NativeFunction>; +typedef Dart_UpdateFinalizableExternalSize_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, ffi.IntPtr)>>; +typedef Dart_Post_Type = ffi + .Pointer>; +typedef Dart_NewSendPort_Type + = ffi.Pointer>; +typedef Dart_SendPortGetId_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer)>>; +typedef Dart_EnterScope_Type + = ffi.Pointer>; +typedef Dart_ExitScope_Type + = ffi.Pointer>; -const int CSSM_USEE_DOMESTIC = 1; +/// The type of message being sent to a Dart port. See CUPHTTPClientDelegate. +abstract class MessageType { + static const int ResponseMessage = 0; + static const int DataMessage = 1; + static const int CompletedMessage = 2; + static const int RedirectMessage = 3; + static const int FinishedDownloading = 4; +} -const int CSSM_USEE_FINANCIAL = 2; +/// The configuration associated with a NSURLSessionTask. +/// See CUPHTTPClientDelegate. +class CUPHTTPTaskConfiguration extends NSObject { + CUPHTTPTaskConfiguration._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_USEE_KRLE = 3; + /// Returns a [CUPHTTPTaskConfiguration] that points to the same underlying object as [other]. + static CUPHTTPTaskConfiguration castFrom(T other) { + return CUPHTTPTaskConfiguration._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_USEE_KRENT = 4; + /// Returns a [CUPHTTPTaskConfiguration] that wraps the given raw object pointer. + static CUPHTTPTaskConfiguration castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPTaskConfiguration._(other, lib, + retain: retain, release: release); + } -const int CSSM_USEE_SSL = 5; + /// Returns whether [obj] is an instance of [CUPHTTPTaskConfiguration]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPTaskConfiguration1); + } -const int CSSM_USEE_AUTHENTICATION = 6; + NSObject initWithPort_(int sendPort) { + final _ret = + _lib._objc_msgSend_477(_id, _lib._sel_initWithPort_1, sendPort); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_USEE_KEYEXCH = 7; + int get sendPort { + return _lib._objc_msgSend_329(_id, _lib._sel_sendPort1); + } -const int CSSM_USEE_MEDICAL = 8; + static CUPHTTPTaskConfiguration new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_new1); + return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + } -const int CSSM_USEE_INSURANCE = 9; + static CUPHTTPTaskConfiguration alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_alloc1); + return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_USEE_WEAK = 10; +/// A delegate for NSURLSession that forwards events for registered +/// NSURLSessionTasks and forwards them to a port for consumption in Dart. +/// +/// The messages sent to the port are contained in a List with one of 3 +/// possible formats: +/// +/// 1. When the delegate receives a HTTP redirect response: +/// [MessageType::RedirectMessage, ] +/// +/// 2. When the delegate receives a HTTP response: +/// [MessageType::ResponseMessage, ] +/// +/// 3. When the delegate receives some HTTP data: +/// [MessageType::DataMessage, ] +/// +/// 4. When the delegate is informed that the response is complete: +/// [MessageType::CompletedMessage, ] +class CUPHTTPClientDelegate extends NSObject { + CUPHTTPClientDelegate._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_ADDR_NONE = 0; + /// Returns a [CUPHTTPClientDelegate] that points to the same underlying object as [other]. + static CUPHTTPClientDelegate castFrom(T other) { + return CUPHTTPClientDelegate._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_ADDR_CUSTOM = 1; + /// Returns a [CUPHTTPClientDelegate] that wraps the given raw object pointer. + static CUPHTTPClientDelegate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPClientDelegate._(other, lib, + retain: retain, release: release); + } -const int CSSM_ADDR_URL = 2; + /// Returns whether [obj] is an instance of [CUPHTTPClientDelegate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPClientDelegate1); + } -const int CSSM_ADDR_SOCKADDR = 3; + /// Instruct the delegate to forward events for the given task to the port + /// specified in the configuration. + void registerTask_withConfiguration_( + NSURLSessionTask? task, CUPHTTPTaskConfiguration? config) { + return _lib._objc_msgSend_478( + _id, + _lib._sel_registerTask_withConfiguration_1, + task?._id ?? ffi.nullptr, + config?._id ?? ffi.nullptr); + } -const int CSSM_ADDR_NAME = 4; + static CUPHTTPClientDelegate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPClientDelegate1, _lib._sel_new1); + return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + } -const int CSSM_NET_PROTO_NONE = 0; + static CUPHTTPClientDelegate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPClientDelegate1, _lib._sel_alloc1); + return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_NET_PROTO_CUSTOM = 1; +/// An object used to communicate redirect information to Dart code. +/// +/// The flow is: +/// 1. CUPHTTPClientDelegate receives a message from the URL Loading System. +/// 2. CUPHTTPClientDelegate creates a new CUPHTTPForwardedDelegate subclass. +/// 3. CUPHTTPClientDelegate sends the CUPHTTPForwardedDelegate to the +/// configured Dart_Port. +/// 4. CUPHTTPClientDelegate waits on CUPHTTPForwardedDelegate.lock +/// 5. When the Dart code is done process the message received on the port, +/// it calls [CUPHTTPForwardedDelegate finish*], which releases the lock. +/// 6. CUPHTTPClientDelegate continues running. +class CUPHTTPForwardedDelegate extends NSObject { + CUPHTTPForwardedDelegate._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_NET_PROTO_UNSPECIFIED = 2; + /// Returns a [CUPHTTPForwardedDelegate] that points to the same underlying object as [other]. + static CUPHTTPForwardedDelegate castFrom(T other) { + return CUPHTTPForwardedDelegate._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_NET_PROTO_LDAP = 3; + /// Returns a [CUPHTTPForwardedDelegate] that wraps the given raw object pointer. + static CUPHTTPForwardedDelegate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedDelegate._(other, lib, + retain: retain, release: release); + } -const int CSSM_NET_PROTO_LDAPS = 4; + /// Returns whether [obj] is an instance of [CUPHTTPForwardedDelegate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedDelegate1); + } -const int CSSM_NET_PROTO_LDAPNS = 5; + NSObject initWithSession_task_( + NSURLSession? session, NSURLSessionTask? task) { + final _ret = _lib._objc_msgSend_479(_id, _lib._sel_initWithSession_task_1, + session?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_NET_PROTO_X500DAP = 6; + /// Indicates that the task should continue executing using the given request. + void finish() { + return _lib._objc_msgSend_1(_id, _lib._sel_finish1); + } -const int CSSM_NET_PROTO_FTP = 7; + NSURLSession? get session { + final _ret = _lib._objc_msgSend_387(_id, _lib._sel_session1); + return _ret.address == 0 + ? null + : NSURLSession._(_ret, _lib, retain: true, release: true); + } -const int CSSM_NET_PROTO_FTPS = 8; + NSURLSessionTask? get task { + final _ret = _lib._objc_msgSend_480(_id, _lib._sel_task1); + return _ret.address == 0 + ? null + : NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } -const int CSSM_NET_PROTO_OCSP = 9; + /// This property is meant to be used only by CUPHTTPClientDelegate. + NSLock? get lock { + final _ret = _lib._objc_msgSend_481(_id, _lib._sel_lock1); + return _ret.address == 0 + ? null + : NSLock._(_ret, _lib, retain: true, release: true); + } -const int CSSM_NET_PROTO_CMP = 10; + static CUPHTTPForwardedDelegate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_new1); + return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + } -const int CSSM_NET_PROTO_CMPS = 11; + static CUPHTTPForwardedDelegate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_alloc1); + return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_WORDID__UNK_ = -1; +class NSLock extends _ObjCWrapper { + NSLock._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_WORDID__NLU_ = 0; + /// Returns a [NSLock] that points to the same underlying object as [other]. + static NSLock castFrom(T other) { + return NSLock._(other._id, other._lib, retain: true, release: true); + } -const int CSSM_WORDID__STAR_ = 1; + /// Returns a [NSLock] that wraps the given raw object pointer. + static NSLock castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSLock._(other, lib, retain: retain, release: release); + } -const int CSSM_WORDID_A = 2; + /// Returns whether [obj] is an instance of [NSLock]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLock1); + } +} -const int CSSM_WORDID_ACL = 3; +class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedRedirect._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_WORDID_ALPHA = 4; + /// Returns a [CUPHTTPForwardedRedirect] that points to the same underlying object as [other]. + static CUPHTTPForwardedRedirect castFrom(T other) { + return CUPHTTPForwardedRedirect._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_WORDID_B = 5; + /// Returns a [CUPHTTPForwardedRedirect] that wraps the given raw object pointer. + static CUPHTTPForwardedRedirect castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedRedirect._(other, lib, + retain: retain, release: release); + } -const int CSSM_WORDID_BER = 6; + /// Returns whether [obj] is an instance of [CUPHTTPForwardedRedirect]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedRedirect1); + } -const int CSSM_WORDID_BINARY = 7; + NSObject initWithSession_task_response_request_( + NSURLSession? session, + NSURLSessionTask? task, + NSHTTPURLResponse? response, + NSURLRequest? request) { + final _ret = _lib._objc_msgSend_482( + _id, + _lib._sel_initWithSession_task_response_request_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + response?._id ?? ffi.nullptr, + request?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_BIOMETRIC = 8; + /// Indicates that the task should continue executing using the given request. + /// If the request is NIL then the redirect is not followed and the task is + /// complete. + void finishWithRequest_(NSURLRequest? request) { + return _lib._objc_msgSend_483( + _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); + } -const int CSSM_WORDID_C = 9; + NSHTTPURLResponse? get response { + final _ret = _lib._objc_msgSend_484(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_CANCELED = 10; + NSURLRequest? get request { + final _ret = _lib._objc_msgSend_377(_id, _lib._sel_request1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_CERT = 11; + /// This property is meant to be used only by CUPHTTPClientDelegate. + NSURLRequest? get redirectRequest { + final _ret = _lib._objc_msgSend_377(_id, _lib._sel_redirectRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_COMMENT = 12; + static CUPHTTPForwardedRedirect new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_new1); + return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + } -const int CSSM_WORDID_CRL = 13; + static CUPHTTPForwardedRedirect alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_alloc1); + return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_WORDID_CUSTOM = 14; +class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedResponse._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_WORDID_D = 15; + /// Returns a [CUPHTTPForwardedResponse] that points to the same underlying object as [other]. + static CUPHTTPForwardedResponse castFrom(T other) { + return CUPHTTPForwardedResponse._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_WORDID_DATE = 16; + /// Returns a [CUPHTTPForwardedResponse] that wraps the given raw object pointer. + static CUPHTTPForwardedResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedResponse._(other, lib, + retain: retain, release: release); + } -const int CSSM_WORDID_DB_DELETE = 17; + /// Returns whether [obj] is an instance of [CUPHTTPForwardedResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedResponse1); + } -const int CSSM_WORDID_DB_EXEC_STORED_QUERY = 18; + NSObject initWithSession_task_response_( + NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { + final _ret = _lib._objc_msgSend_485( + _id, + _lib._sel_initWithSession_task_response_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + response?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_DB_INSERT = 19; + void finishWithDisposition_(int disposition) { + return _lib._objc_msgSend_486( + _id, _lib._sel_finishWithDisposition_1, disposition); + } -const int CSSM_WORDID_DB_MODIFY = 20; + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_379(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_DB_READ = 21; + /// This property is meant to be used only by CUPHTTPClientDelegate. + int get disposition { + return _lib._objc_msgSend_487(_id, _lib._sel_disposition1); + } -const int CSSM_WORDID_DBS_CREATE = 22; + static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedResponse1, _lib._sel_new1); + return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + } -const int CSSM_WORDID_DBS_DELETE = 23; + static CUPHTTPForwardedResponse alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedResponse1, _lib._sel_alloc1); + return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_WORDID_DECRYPT = 24; +class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_WORDID_DELETE = 25; + /// Returns a [CUPHTTPForwardedData] that points to the same underlying object as [other]. + static CUPHTTPForwardedData castFrom(T other) { + return CUPHTTPForwardedData._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_WORDID_DELTA_CRL = 26; + /// Returns a [CUPHTTPForwardedData] that wraps the given raw object pointer. + static CUPHTTPForwardedData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedData._(other, lib, retain: retain, release: release); + } -const int CSSM_WORDID_DER = 27; + /// Returns whether [obj] is an instance of [CUPHTTPForwardedData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedData1); + } -const int CSSM_WORDID_DERIVE = 28; + NSObject initWithSession_task_data_( + NSURLSession? session, NSURLSessionTask? task, NSData? data) { + final _ret = _lib._objc_msgSend_488( + _id, + _lib._sel_initWithSession_task_data_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + data?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_DISPLAY = 29; + NSData? get data { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_DO = 30; + static CUPHTTPForwardedData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_CUPHTTPForwardedData1, _lib._sel_new1); + return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + } -const int CSSM_WORDID_DSA = 31; + static CUPHTTPForwardedData alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedData1, _lib._sel_alloc1); + return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_WORDID_DSA_SHA1 = 32; +class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedComplete._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_WORDID_E = 33; + /// Returns a [CUPHTTPForwardedComplete] that points to the same underlying object as [other]. + static CUPHTTPForwardedComplete castFrom(T other) { + return CUPHTTPForwardedComplete._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_WORDID_ELGAMAL = 34; + /// Returns a [CUPHTTPForwardedComplete] that wraps the given raw object pointer. + static CUPHTTPForwardedComplete castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedComplete._(other, lib, + retain: retain, release: release); + } -const int CSSM_WORDID_ENCRYPT = 35; + /// Returns whether [obj] is an instance of [CUPHTTPForwardedComplete]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedComplete1); + } -const int CSSM_WORDID_ENTRY = 36; + NSObject initWithSession_task_error_( + NSURLSession? session, NSURLSessionTask? task, NSError? error) { + final _ret = _lib._objc_msgSend_489( + _id, + _lib._sel_initWithSession_task_error_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + error?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_EXPORT_CLEAR = 37; + NSError? get error { + final _ret = _lib._objc_msgSend_383(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_EXPORT_WRAPPED = 38; + static CUPHTTPForwardedComplete new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedComplete1, _lib._sel_new1); + return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + } -const int CSSM_WORDID_G = 39; + static CUPHTTPForwardedComplete alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedComplete1, _lib._sel_alloc1); + return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_WORDID_GE = 40; +class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedFinishedDownloading._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_WORDID_GENKEY = 41; + /// Returns a [CUPHTTPForwardedFinishedDownloading] that points to the same underlying object as [other]. + static CUPHTTPForwardedFinishedDownloading castFrom( + T other) { + return CUPHTTPForwardedFinishedDownloading._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_WORDID_HASH = 42; + /// Returns a [CUPHTTPForwardedFinishedDownloading] that wraps the given raw object pointer. + static CUPHTTPForwardedFinishedDownloading castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedFinishedDownloading._(other, lib, + retain: retain, release: release); + } -const int CSSM_WORDID_HASHED_PASSWORD = 43; + /// Returns whether [obj] is an instance of [CUPHTTPForwardedFinishedDownloading]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedFinishedDownloading1); + } -const int CSSM_WORDID_HASHED_SUBJECT = 44; + NSObject initWithSession_downloadTask_url_(NSURLSession? session, + NSURLSessionDownloadTask? downloadTask, NSURL? location) { + final _ret = _lib._objc_msgSend_490( + _id, + _lib._sel_initWithSession_downloadTask_url_1, + session?._id ?? ffi.nullptr, + downloadTask?._id ?? ffi.nullptr, + location?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_HAVAL = 45; + NSURL? get location { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_location1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_IBCHASH = 46; + static CUPHTTPForwardedFinishedDownloading new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_new1); + return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, + retain: false, release: true); + } -const int CSSM_WORDID_IMPORT_CLEAR = 47; + static CUPHTTPForwardedFinishedDownloading alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_alloc1); + return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, + retain: false, release: true); + } +} -const int CSSM_WORDID_IMPORT_WRAPPED = 48; +const int noErr = 0; -const int CSSM_WORDID_INTEL = 49; +const int kNilOptions = 0; -const int CSSM_WORDID_ISSUER = 50; +const int kVariableLengthArray = 1; -const int CSSM_WORDID_ISSUER_INFO = 51; +const int kUnknownType = 1061109567; -const int CSSM_WORDID_K_OF_N = 52; +const int normal = 0; -const int CSSM_WORDID_KEA = 53; +const int bold = 1; -const int CSSM_WORDID_KEYHOLDER = 54; +const int italic = 2; -const int CSSM_WORDID_L = 55; +const int underline = 4; -const int CSSM_WORDID_LE = 56; +const int outline = 8; -const int CSSM_WORDID_LOGIN = 57; +const int shadow = 16; -const int CSSM_WORDID_LOGIN_NAME = 58; +const int condense = 32; -const int CSSM_WORDID_MAC = 59; +const int extend = 64; -const int CSSM_WORDID_MD2 = 60; +const int developStage = 32; -const int CSSM_WORDID_MD2WITHRSA = 61; +const int alphaStage = 64; -const int CSSM_WORDID_MD4 = 62; +const int betaStage = 96; -const int CSSM_WORDID_MD5 = 63; +const int finalStage = 128; -const int CSSM_WORDID_MD5WITHRSA = 64; +const int NSScannedOption = 1; -const int CSSM_WORDID_N = 65; +const int NSCollectorDisabledOption = 2; -const int CSSM_WORDID_NAME = 66; +const int errSecSuccess = 0; -const int CSSM_WORDID_NDR = 67; +const int errSecUnimplemented = -4; -const int CSSM_WORDID_NHASH = 68; +const int errSecDiskFull = -34; -const int CSSM_WORDID_NOT_AFTER = 69; +const int errSecDskFull = -34; -const int CSSM_WORDID_NOT_BEFORE = 70; +const int errSecIO = -36; -const int CSSM_WORDID_NULL = 71; +const int errSecOpWr = -49; -const int CSSM_WORDID_NUMERIC = 72; +const int errSecParam = -50; -const int CSSM_WORDID_OBJECT_HASH = 73; +const int errSecWrPerm = -61; -const int CSSM_WORDID_ONE_TIME = 74; +const int errSecAllocate = -108; -const int CSSM_WORDID_ONLINE = 75; +const int errSecUserCanceled = -128; -const int CSSM_WORDID_OWNER = 76; +const int errSecBadReq = -909; -const int CSSM_WORDID_P = 77; +const int errSecInternalComponent = -2070; -const int CSSM_WORDID_PAM_NAME = 78; +const int errSecCoreFoundationUnknown = -4960; -const int CSSM_WORDID_PASSWORD = 79; +const int errSecMissingEntitlement = -34018; -const int CSSM_WORDID_PGP = 80; +const int errSecRestrictedAPI = -34020; -const int CSSM_WORDID_PREFIX = 81; +const int errSecNotAvailable = -25291; -const int CSSM_WORDID_PRIVATE_KEY = 82; +const int errSecReadOnly = -25292; -const int CSSM_WORDID_PROMPTED_BIOMETRIC = 83; +const int errSecAuthFailed = -25293; -const int CSSM_WORDID_PROMPTED_PASSWORD = 84; +const int errSecNoSuchKeychain = -25294; -const int CSSM_WORDID_PROPAGATE = 85; +const int errSecInvalidKeychain = -25295; -const int CSSM_WORDID_PROTECTED_BIOMETRIC = 86; +const int errSecDuplicateKeychain = -25296; -const int CSSM_WORDID_PROTECTED_PASSWORD = 87; +const int errSecDuplicateCallback = -25297; -const int CSSM_WORDID_PROTECTED_PIN = 88; +const int errSecInvalidCallback = -25298; -const int CSSM_WORDID_PUBLIC_KEY = 89; +const int errSecDuplicateItem = -25299; -const int CSSM_WORDID_PUBLIC_KEY_FROM_CERT = 90; +const int errSecItemNotFound = -25300; -const int CSSM_WORDID_Q = 91; +const int errSecBufferTooSmall = -25301; -const int CSSM_WORDID_RANGE = 92; +const int errSecDataTooLarge = -25302; -const int CSSM_WORDID_REVAL = 93; +const int errSecNoSuchAttr = -25303; -const int CSSM_WORDID_RIPEMAC = 94; +const int errSecInvalidItemRef = -25304; -const int CSSM_WORDID_RIPEMD = 95; +const int errSecInvalidSearchRef = -25305; -const int CSSM_WORDID_RIPEMD160 = 96; +const int errSecNoSuchClass = -25306; -const int CSSM_WORDID_RSA = 97; +const int errSecNoDefaultKeychain = -25307; -const int CSSM_WORDID_RSA_ISO9796 = 98; +const int errSecInteractionNotAllowed = -25308; -const int CSSM_WORDID_RSA_PKCS = 99; +const int errSecReadOnlyAttr = -25309; -const int CSSM_WORDID_RSA_PKCS_MD5 = 100; +const int errSecWrongSecVersion = -25310; -const int CSSM_WORDID_RSA_PKCS_SHA1 = 101; +const int errSecKeySizeNotAllowed = -25311; -const int CSSM_WORDID_RSA_PKCS1 = 102; +const int errSecNoStorageModule = -25312; -const int CSSM_WORDID_RSA_PKCS1_MD5 = 103; +const int errSecNoCertificateModule = -25313; -const int CSSM_WORDID_RSA_PKCS1_SHA1 = 104; +const int errSecNoPolicyModule = -25314; -const int CSSM_WORDID_RSA_PKCS1_SIG = 105; +const int errSecInteractionRequired = -25315; -const int CSSM_WORDID_RSA_RAW = 106; +const int errSecDataNotAvailable = -25316; -const int CSSM_WORDID_SDSIV1 = 107; +const int errSecDataNotModifiable = -25317; -const int CSSM_WORDID_SEQUENCE = 108; +const int errSecCreateChainFailed = -25318; -const int CSSM_WORDID_SET = 109; +const int errSecInvalidPrefsDomain = -25319; -const int CSSM_WORDID_SEXPR = 110; +const int errSecInDarkWake = -25320; -const int CSSM_WORDID_SHA1 = 111; +const int errSecACLNotSimple = -25240; -const int CSSM_WORDID_SHA1WITHDSA = 112; +const int errSecPolicyNotFound = -25241; -const int CSSM_WORDID_SHA1WITHECDSA = 113; +const int errSecInvalidTrustSetting = -25242; -const int CSSM_WORDID_SHA1WITHRSA = 114; +const int errSecNoAccessForItem = -25243; -const int CSSM_WORDID_SIGN = 115; +const int errSecInvalidOwnerEdit = -25244; -const int CSSM_WORDID_SIGNATURE = 116; +const int errSecTrustNotAvailable = -25245; -const int CSSM_WORDID_SIGNED_NONCE = 117; +const int errSecUnsupportedFormat = -25256; -const int CSSM_WORDID_SIGNED_SECRET = 118; +const int errSecUnknownFormat = -25257; -const int CSSM_WORDID_SPKI = 119; +const int errSecKeyIsSensitive = -25258; -const int CSSM_WORDID_SUBJECT = 120; +const int errSecMultiplePrivKeys = -25259; -const int CSSM_WORDID_SUBJECT_INFO = 121; +const int errSecPassphraseRequired = -25260; -const int CSSM_WORDID_TAG = 122; +const int errSecInvalidPasswordRef = -25261; -const int CSSM_WORDID_THRESHOLD = 123; +const int errSecInvalidTrustSettings = -25262; -const int CSSM_WORDID_TIME = 124; +const int errSecNoTrustSettings = -25263; -const int CSSM_WORDID_URI = 125; +const int errSecPkcs12VerifyFailure = -25264; -const int CSSM_WORDID_VERSION = 126; +const int errSecNotSigner = -26267; -const int CSSM_WORDID_X509_ATTRIBUTE = 127; +const int errSecDecode = -26275; -const int CSSM_WORDID_X509V1 = 128; +const int errSecServiceNotAvailable = -67585; -const int CSSM_WORDID_X509V2 = 129; +const int errSecInsufficientClientID = -67586; -const int CSSM_WORDID_X509V3 = 130; +const int errSecDeviceReset = -67587; -const int CSSM_WORDID_X9_ATTRIBUTE = 131; +const int errSecDeviceFailed = -67588; -const int CSSM_WORDID_VENDOR_START = 65536; +const int errSecAppleAddAppACLSubject = -67589; -const int CSSM_WORDID_VENDOR_END = 2147418112; +const int errSecApplePublicKeyIncomplete = -67590; -const int CSSM_LIST_ELEMENT_DATUM = 0; +const int errSecAppleSignatureMismatch = -67591; -const int CSSM_LIST_ELEMENT_SUBLIST = 1; +const int errSecAppleInvalidKeyStartDate = -67592; -const int CSSM_LIST_ELEMENT_WORDID = 2; +const int errSecAppleInvalidKeyEndDate = -67593; -const int CSSM_LIST_TYPE_UNKNOWN = 0; +const int errSecConversionError = -67594; -const int CSSM_LIST_TYPE_CUSTOM = 1; +const int errSecAppleSSLv2Rollback = -67595; -const int CSSM_LIST_TYPE_SEXPR = 2; +const int errSecQuotaExceeded = -67596; -const int CSSM_SAMPLE_TYPE_PASSWORD = 79; +const int errSecFileTooBig = -67597; -const int CSSM_SAMPLE_TYPE_HASHED_PASSWORD = 43; +const int errSecInvalidDatabaseBlob = -67598; -const int CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD = 87; +const int errSecInvalidKeyBlob = -67599; -const int CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD = 84; +const int errSecIncompatibleDatabaseBlob = -67600; -const int CSSM_SAMPLE_TYPE_SIGNED_NONCE = 117; +const int errSecIncompatibleKeyBlob = -67601; -const int CSSM_SAMPLE_TYPE_SIGNED_SECRET = 118; +const int errSecHostNameMismatch = -67602; -const int CSSM_SAMPLE_TYPE_BIOMETRIC = 8; +const int errSecUnknownCriticalExtensionFlag = -67603; -const int CSSM_SAMPLE_TYPE_PROTECTED_BIOMETRIC = 86; +const int errSecNoBasicConstraints = -67604; -const int CSSM_SAMPLE_TYPE_PROMPTED_BIOMETRIC = 83; +const int errSecNoBasicConstraintsCA = -67605; -const int CSSM_SAMPLE_TYPE_THRESHOLD = 123; +const int errSecInvalidAuthorityKeyID = -67606; -const int CSSM_CERT_UNKNOWN = 0; +const int errSecInvalidSubjectKeyID = -67607; -const int CSSM_CERT_X_509v1 = 1; +const int errSecInvalidKeyUsageForPolicy = -67608; -const int CSSM_CERT_X_509v2 = 2; +const int errSecInvalidExtendedKeyUsage = -67609; -const int CSSM_CERT_X_509v3 = 3; +const int errSecInvalidIDLinkage = -67610; -const int CSSM_CERT_PGP = 4; +const int errSecPathLengthConstraintExceeded = -67611; -const int CSSM_CERT_SPKI = 5; +const int errSecInvalidRoot = -67612; -const int CSSM_CERT_SDSIv1 = 6; +const int errSecCRLExpired = -67613; -const int CSSM_CERT_Intel = 8; +const int errSecCRLNotValidYet = -67614; -const int CSSM_CERT_X_509_ATTRIBUTE = 9; +const int errSecCRLNotFound = -67615; -const int CSSM_CERT_X9_ATTRIBUTE = 10; +const int errSecCRLServerDown = -67616; -const int CSSM_CERT_TUPLE = 11; +const int errSecCRLBadURI = -67617; -const int CSSM_CERT_ACL_ENTRY = 12; +const int errSecUnknownCertExtension = -67618; -const int CSSM_CERT_MULTIPLE = 32766; +const int errSecUnknownCRLExtension = -67619; -const int CSSM_CERT_LAST = 32767; +const int errSecCRLNotTrusted = -67620; -const int CSSM_CL_CUSTOM_CERT_TYPE = 32768; +const int errSecCRLPolicyFailed = -67621; -const int CSSM_CERT_ENCODING_UNKNOWN = 0; +const int errSecIDPFailure = -67622; -const int CSSM_CERT_ENCODING_CUSTOM = 1; +const int errSecSMIMEEmailAddressesNotFound = -67623; -const int CSSM_CERT_ENCODING_BER = 2; +const int errSecSMIMEBadExtendedKeyUsage = -67624; -const int CSSM_CERT_ENCODING_DER = 3; +const int errSecSMIMEBadKeyUsage = -67625; -const int CSSM_CERT_ENCODING_NDR = 4; +const int errSecSMIMEKeyUsageNotCritical = -67626; -const int CSSM_CERT_ENCODING_SEXPR = 5; +const int errSecSMIMENoEmailAddress = -67627; -const int CSSM_CERT_ENCODING_PGP = 6; +const int errSecSMIMESubjAltNameNotCritical = -67628; -const int CSSM_CERT_ENCODING_MULTIPLE = 32766; +const int errSecSSLBadExtendedKeyUsage = -67629; -const int CSSM_CERT_ENCODING_LAST = 32767; +const int errSecOCSPBadResponse = -67630; -const int CSSM_CL_CUSTOM_CERT_ENCODING = 32768; +const int errSecOCSPBadRequest = -67631; -const int CSSM_CERT_PARSE_FORMAT_NONE = 0; +const int errSecOCSPUnavailable = -67632; -const int CSSM_CERT_PARSE_FORMAT_CUSTOM = 1; +const int errSecOCSPStatusUnrecognized = -67633; -const int CSSM_CERT_PARSE_FORMAT_SEXPR = 2; +const int errSecEndOfData = -67634; -const int CSSM_CERT_PARSE_FORMAT_COMPLEX = 3; +const int errSecIncompleteCertRevocationCheck = -67635; -const int CSSM_CERT_PARSE_FORMAT_OID_NAMED = 4; +const int errSecNetworkFailure = -67636; -const int CSSM_CERT_PARSE_FORMAT_TUPLE = 5; +const int errSecOCSPNotTrustedToAnchor = -67637; -const int CSSM_CERT_PARSE_FORMAT_MULTIPLE = 32766; +const int errSecRecordModified = -67638; -const int CSSM_CERT_PARSE_FORMAT_LAST = 32767; +const int errSecOCSPSignatureError = -67639; -const int CSSM_CL_CUSTOM_CERT_PARSE_FORMAT = 32768; +const int errSecOCSPNoSigner = -67640; -const int CSSM_CERTGROUP_DATA = 0; +const int errSecOCSPResponderMalformedReq = -67641; -const int CSSM_CERTGROUP_ENCODED_CERT = 1; +const int errSecOCSPResponderInternalError = -67642; -const int CSSM_CERTGROUP_PARSED_CERT = 2; +const int errSecOCSPResponderTryLater = -67643; -const int CSSM_CERTGROUP_CERT_PAIR = 3; +const int errSecOCSPResponderSignatureRequired = -67644; -const int CSSM_ACL_SUBJECT_TYPE_ANY = 1; +const int errSecOCSPResponderUnauthorized = -67645; -const int CSSM_ACL_SUBJECT_TYPE_THRESHOLD = 123; +const int errSecOCSPResponseNonceMismatch = -67646; -const int CSSM_ACL_SUBJECT_TYPE_PASSWORD = 79; +const int errSecCodeSigningBadCertChainLength = -67647; -const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD = 87; +const int errSecCodeSigningNoBasicConstraints = -67648; -const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD = 84; +const int errSecCodeSigningBadPathLengthConstraint = -67649; -const int CSSM_ACL_SUBJECT_TYPE_PUBLIC_KEY = 89; +const int errSecCodeSigningNoExtendedKeyUsage = -67650; -const int CSSM_ACL_SUBJECT_TYPE_HASHED_SUBJECT = 44; +const int errSecCodeSigningDevelopment = -67651; -const int CSSM_ACL_SUBJECT_TYPE_BIOMETRIC = 8; +const int errSecResourceSignBadCertChainLength = -67652; -const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_BIOMETRIC = 86; +const int errSecResourceSignBadExtKeyUsage = -67653; -const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_BIOMETRIC = 83; +const int errSecTrustSettingDeny = -67654; -const int CSSM_ACL_SUBJECT_TYPE_LOGIN_NAME = 58; +const int errSecInvalidSubjectName = -67655; -const int CSSM_ACL_SUBJECT_TYPE_EXT_PAM_NAME = 78; +const int errSecUnknownQualifiedCertStatement = -67656; -const int CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START = 65536; +const int errSecMobileMeRequestQueued = -67657; -const int CSSM_ACL_AUTHORIZATION_ANY = 1; +const int errSecMobileMeRequestRedirected = -67658; -const int CSSM_ACL_AUTHORIZATION_LOGIN = 57; +const int errSecMobileMeServerError = -67659; -const int CSSM_ACL_AUTHORIZATION_GENKEY = 41; +const int errSecMobileMeServerNotAvailable = -67660; -const int CSSM_ACL_AUTHORIZATION_DELETE = 25; +const int errSecMobileMeServerAlreadyExists = -67661; -const int CSSM_ACL_AUTHORIZATION_EXPORT_WRAPPED = 38; +const int errSecMobileMeServerServiceErr = -67662; -const int CSSM_ACL_AUTHORIZATION_EXPORT_CLEAR = 37; +const int errSecMobileMeRequestAlreadyPending = -67663; -const int CSSM_ACL_AUTHORIZATION_IMPORT_WRAPPED = 48; +const int errSecMobileMeNoRequestPending = -67664; -const int CSSM_ACL_AUTHORIZATION_IMPORT_CLEAR = 47; +const int errSecMobileMeCSRVerifyFailure = -67665; -const int CSSM_ACL_AUTHORIZATION_SIGN = 115; +const int errSecMobileMeFailedConsistencyCheck = -67666; -const int CSSM_ACL_AUTHORIZATION_ENCRYPT = 35; +const int errSecNotInitialized = -67667; -const int CSSM_ACL_AUTHORIZATION_DECRYPT = 24; +const int errSecInvalidHandleUsage = -67668; -const int CSSM_ACL_AUTHORIZATION_MAC = 59; +const int errSecPVCReferentNotFound = -67669; -const int CSSM_ACL_AUTHORIZATION_DERIVE = 28; +const int errSecFunctionIntegrityFail = -67670; -const int CSSM_ACL_AUTHORIZATION_DBS_CREATE = 22; +const int errSecInternalError = -67671; -const int CSSM_ACL_AUTHORIZATION_DBS_DELETE = 23; +const int errSecMemoryError = -67672; -const int CSSM_ACL_AUTHORIZATION_DB_READ = 21; +const int errSecInvalidData = -67673; -const int CSSM_ACL_AUTHORIZATION_DB_INSERT = 19; +const int errSecMDSError = -67674; -const int CSSM_ACL_AUTHORIZATION_DB_MODIFY = 20; +const int errSecInvalidPointer = -67675; -const int CSSM_ACL_AUTHORIZATION_DB_DELETE = 17; +const int errSecSelfCheckFailed = -67676; -const int CSSM_ACL_EDIT_MODE_ADD = 1; +const int errSecFunctionFailed = -67677; -const int CSSM_ACL_EDIT_MODE_DELETE = 2; +const int errSecModuleManifestVerifyFailed = -67678; -const int CSSM_ACL_EDIT_MODE_REPLACE = 3; +const int errSecInvalidGUID = -67679; -const int CSSM_KEYHEADER_VERSION = 2; +const int errSecInvalidHandle = -67680; -const int CSSM_KEYBLOB_RAW = 0; +const int errSecInvalidDBList = -67681; -const int CSSM_KEYBLOB_REFERENCE = 2; +const int errSecInvalidPassthroughID = -67682; -const int CSSM_KEYBLOB_WRAPPED = 3; +const int errSecInvalidNetworkAddress = -67683; -const int CSSM_KEYBLOB_OTHER = -1; +const int errSecCRLAlreadySigned = -67684; -const int CSSM_KEYBLOB_RAW_FORMAT_NONE = 0; +const int errSecInvalidNumberOfFields = -67685; -const int CSSM_KEYBLOB_RAW_FORMAT_PKCS1 = 1; +const int errSecVerificationFailure = -67686; -const int CSSM_KEYBLOB_RAW_FORMAT_PKCS3 = 2; +const int errSecUnknownTag = -67687; -const int CSSM_KEYBLOB_RAW_FORMAT_MSCAPI = 3; +const int errSecInvalidSignature = -67688; -const int CSSM_KEYBLOB_RAW_FORMAT_PGP = 4; +const int errSecInvalidName = -67689; -const int CSSM_KEYBLOB_RAW_FORMAT_FIPS186 = 5; +const int errSecInvalidCertificateRef = -67690; -const int CSSM_KEYBLOB_RAW_FORMAT_BSAFE = 6; +const int errSecInvalidCertificateGroup = -67691; -const int CSSM_KEYBLOB_RAW_FORMAT_CCA = 9; +const int errSecTagNotFound = -67692; -const int CSSM_KEYBLOB_RAW_FORMAT_PKCS8 = 10; +const int errSecInvalidQuery = -67693; -const int CSSM_KEYBLOB_RAW_FORMAT_SPKI = 11; +const int errSecInvalidValue = -67694; -const int CSSM_KEYBLOB_RAW_FORMAT_OCTET_STRING = 12; +const int errSecCallbackFailed = -67695; -const int CSSM_KEYBLOB_RAW_FORMAT_OTHER = -1; +const int errSecACLDeleteFailed = -67696; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_NONE = 0; +const int errSecACLReplaceFailed = -67697; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS8 = 1; +const int errSecACLAddFailed = -67698; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS7 = 2; +const int errSecACLChangeFailed = -67699; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_MSCAPI = 3; +const int errSecInvalidAccessCredentials = -67700; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_OTHER = -1; +const int errSecInvalidRecord = -67701; -const int CSSM_KEYBLOB_REF_FORMAT_INTEGER = 0; +const int errSecInvalidACL = -67702; -const int CSSM_KEYBLOB_REF_FORMAT_STRING = 1; +const int errSecInvalidSampleValue = -67703; -const int CSSM_KEYBLOB_REF_FORMAT_SPKI = 2; +const int errSecIncompatibleVersion = -67704; -const int CSSM_KEYBLOB_REF_FORMAT_OTHER = -1; +const int errSecPrivilegeNotGranted = -67705; -const int CSSM_KEYCLASS_PUBLIC_KEY = 0; +const int errSecInvalidScope = -67706; -const int CSSM_KEYCLASS_PRIVATE_KEY = 1; +const int errSecPVCAlreadyConfigured = -67707; -const int CSSM_KEYCLASS_SESSION_KEY = 2; +const int errSecInvalidPVC = -67708; -const int CSSM_KEYCLASS_SECRET_PART = 3; +const int errSecEMMLoadFailed = -67709; -const int CSSM_KEYCLASS_OTHER = -1; +const int errSecEMMUnloadFailed = -67710; -const int CSSM_KEYATTR_RETURN_DEFAULT = 0; +const int errSecAddinLoadFailed = -67711; -const int CSSM_KEYATTR_RETURN_DATA = 268435456; +const int errSecInvalidKeyRef = -67712; -const int CSSM_KEYATTR_RETURN_REF = 536870912; +const int errSecInvalidKeyHierarchy = -67713; -const int CSSM_KEYATTR_RETURN_NONE = 1073741824; +const int errSecAddinUnloadFailed = -67714; -const int CSSM_KEYATTR_PERMANENT = 1; +const int errSecLibraryReferenceNotFound = -67715; -const int CSSM_KEYATTR_PRIVATE = 2; +const int errSecInvalidAddinFunctionTable = -67716; -const int CSSM_KEYATTR_MODIFIABLE = 4; +const int errSecInvalidServiceMask = -67717; -const int CSSM_KEYATTR_SENSITIVE = 8; +const int errSecModuleNotLoaded = -67718; -const int CSSM_KEYATTR_EXTRACTABLE = 32; +const int errSecInvalidSubServiceID = -67719; -const int CSSM_KEYATTR_ALWAYS_SENSITIVE = 16; +const int errSecAttributeNotInContext = -67720; -const int CSSM_KEYATTR_NEVER_EXTRACTABLE = 64; +const int errSecModuleManagerInitializeFailed = -67721; -const int CSSM_KEYUSE_ANY = -2147483648; +const int errSecModuleManagerNotFound = -67722; -const int CSSM_KEYUSE_ENCRYPT = 1; +const int errSecEventNotificationCallbackNotFound = -67723; -const int CSSM_KEYUSE_DECRYPT = 2; +const int errSecInputLengthError = -67724; -const int CSSM_KEYUSE_SIGN = 4; +const int errSecOutputLengthError = -67725; -const int CSSM_KEYUSE_VERIFY = 8; +const int errSecPrivilegeNotSupported = -67726; -const int CSSM_KEYUSE_SIGN_RECOVER = 16; +const int errSecDeviceError = -67727; -const int CSSM_KEYUSE_VERIFY_RECOVER = 32; +const int errSecAttachHandleBusy = -67728; -const int CSSM_KEYUSE_WRAP = 64; +const int errSecNotLoggedIn = -67729; -const int CSSM_KEYUSE_UNWRAP = 128; +const int errSecAlgorithmMismatch = -67730; -const int CSSM_KEYUSE_DERIVE = 256; +const int errSecKeyUsageIncorrect = -67731; -const int CSSM_ALGID_NONE = 0; +const int errSecKeyBlobTypeIncorrect = -67732; -const int CSSM_ALGID_CUSTOM = 1; +const int errSecKeyHeaderInconsistent = -67733; -const int CSSM_ALGID_DH = 2; +const int errSecUnsupportedKeyFormat = -67734; -const int CSSM_ALGID_PH = 3; +const int errSecUnsupportedKeySize = -67735; -const int CSSM_ALGID_KEA = 4; +const int errSecInvalidKeyUsageMask = -67736; -const int CSSM_ALGID_MD2 = 5; +const int errSecUnsupportedKeyUsageMask = -67737; -const int CSSM_ALGID_MD4 = 6; +const int errSecInvalidKeyAttributeMask = -67738; -const int CSSM_ALGID_MD5 = 7; +const int errSecUnsupportedKeyAttributeMask = -67739; -const int CSSM_ALGID_SHA1 = 8; +const int errSecInvalidKeyLabel = -67740; -const int CSSM_ALGID_NHASH = 9; +const int errSecUnsupportedKeyLabel = -67741; -const int CSSM_ALGID_HAVAL = 10; +const int errSecInvalidKeyFormat = -67742; -const int CSSM_ALGID_RIPEMD = 11; +const int errSecUnsupportedVectorOfBuffers = -67743; -const int CSSM_ALGID_IBCHASH = 12; +const int errSecInvalidInputVector = -67744; -const int CSSM_ALGID_RIPEMAC = 13; +const int errSecInvalidOutputVector = -67745; -const int CSSM_ALGID_DES = 14; +const int errSecInvalidContext = -67746; -const int CSSM_ALGID_DESX = 15; +const int errSecInvalidAlgorithm = -67747; -const int CSSM_ALGID_RDES = 16; +const int errSecInvalidAttributeKey = -67748; -const int CSSM_ALGID_3DES_3KEY_EDE = 17; +const int errSecMissingAttributeKey = -67749; -const int CSSM_ALGID_3DES_2KEY_EDE = 18; +const int errSecInvalidAttributeInitVector = -67750; -const int CSSM_ALGID_3DES_1KEY_EEE = 19; +const int errSecMissingAttributeInitVector = -67751; -const int CSSM_ALGID_3DES_3KEY = 17; +const int errSecInvalidAttributeSalt = -67752; -const int CSSM_ALGID_3DES_3KEY_EEE = 20; +const int errSecMissingAttributeSalt = -67753; -const int CSSM_ALGID_3DES_2KEY = 18; +const int errSecInvalidAttributePadding = -67754; -const int CSSM_ALGID_3DES_2KEY_EEE = 21; +const int errSecMissingAttributePadding = -67755; -const int CSSM_ALGID_3DES_1KEY = 20; +const int errSecInvalidAttributeRandom = -67756; -const int CSSM_ALGID_IDEA = 22; +const int errSecMissingAttributeRandom = -67757; -const int CSSM_ALGID_RC2 = 23; +const int errSecInvalidAttributeSeed = -67758; -const int CSSM_ALGID_RC5 = 24; +const int errSecMissingAttributeSeed = -67759; -const int CSSM_ALGID_RC4 = 25; +const int errSecInvalidAttributePassphrase = -67760; -const int CSSM_ALGID_SEAL = 26; +const int errSecMissingAttributePassphrase = -67761; -const int CSSM_ALGID_CAST = 27; +const int errSecInvalidAttributeKeyLength = -67762; -const int CSSM_ALGID_BLOWFISH = 28; +const int errSecMissingAttributeKeyLength = -67763; -const int CSSM_ALGID_SKIPJACK = 29; +const int errSecInvalidAttributeBlockSize = -67764; -const int CSSM_ALGID_LUCIFER = 30; +const int errSecMissingAttributeBlockSize = -67765; -const int CSSM_ALGID_MADRYGA = 31; +const int errSecInvalidAttributeOutputSize = -67766; -const int CSSM_ALGID_FEAL = 32; +const int errSecMissingAttributeOutputSize = -67767; -const int CSSM_ALGID_REDOC = 33; +const int errSecInvalidAttributeRounds = -67768; -const int CSSM_ALGID_REDOC3 = 34; +const int errSecMissingAttributeRounds = -67769; -const int CSSM_ALGID_LOKI = 35; +const int errSecInvalidAlgorithmParms = -67770; -const int CSSM_ALGID_KHUFU = 36; +const int errSecMissingAlgorithmParms = -67771; -const int CSSM_ALGID_KHAFRE = 37; +const int errSecInvalidAttributeLabel = -67772; -const int CSSM_ALGID_MMB = 38; +const int errSecMissingAttributeLabel = -67773; -const int CSSM_ALGID_GOST = 39; +const int errSecInvalidAttributeKeyType = -67774; -const int CSSM_ALGID_SAFER = 40; +const int errSecMissingAttributeKeyType = -67775; -const int CSSM_ALGID_CRAB = 41; +const int errSecInvalidAttributeMode = -67776; -const int CSSM_ALGID_RSA = 42; +const int errSecMissingAttributeMode = -67777; -const int CSSM_ALGID_DSA = 43; +const int errSecInvalidAttributeEffectiveBits = -67778; -const int CSSM_ALGID_MD5WithRSA = 44; +const int errSecMissingAttributeEffectiveBits = -67779; -const int CSSM_ALGID_MD2WithRSA = 45; +const int errSecInvalidAttributeStartDate = -67780; -const int CSSM_ALGID_ElGamal = 46; +const int errSecMissingAttributeStartDate = -67781; -const int CSSM_ALGID_MD2Random = 47; +const int errSecInvalidAttributeEndDate = -67782; -const int CSSM_ALGID_MD5Random = 48; +const int errSecMissingAttributeEndDate = -67783; -const int CSSM_ALGID_SHARandom = 49; +const int errSecInvalidAttributeVersion = -67784; -const int CSSM_ALGID_DESRandom = 50; +const int errSecMissingAttributeVersion = -67785; -const int CSSM_ALGID_SHA1WithRSA = 51; +const int errSecInvalidAttributePrime = -67786; -const int CSSM_ALGID_CDMF = 52; +const int errSecMissingAttributePrime = -67787; -const int CSSM_ALGID_CAST3 = 53; +const int errSecInvalidAttributeBase = -67788; -const int CSSM_ALGID_CAST5 = 54; +const int errSecMissingAttributeBase = -67789; -const int CSSM_ALGID_GenericSecret = 55; +const int errSecInvalidAttributeSubprime = -67790; -const int CSSM_ALGID_ConcatBaseAndKey = 56; +const int errSecMissingAttributeSubprime = -67791; -const int CSSM_ALGID_ConcatKeyAndBase = 57; +const int errSecInvalidAttributeIterationCount = -67792; -const int CSSM_ALGID_ConcatBaseAndData = 58; +const int errSecMissingAttributeIterationCount = -67793; -const int CSSM_ALGID_ConcatDataAndBase = 59; +const int errSecInvalidAttributeDLDBHandle = -67794; -const int CSSM_ALGID_XORBaseAndData = 60; +const int errSecMissingAttributeDLDBHandle = -67795; -const int CSSM_ALGID_ExtractFromKey = 61; +const int errSecInvalidAttributeAccessCredentials = -67796; -const int CSSM_ALGID_SSL3PrePrimaryGen = 62; +const int errSecMissingAttributeAccessCredentials = -67797; -const int CSSM_ALGID_SSL3PreMasterGen = 62; +const int errSecInvalidAttributePublicKeyFormat = -67798; -const int CSSM_ALGID_SSL3PrimaryDerive = 63; +const int errSecMissingAttributePublicKeyFormat = -67799; -const int CSSM_ALGID_SSL3MasterDerive = 63; +const int errSecInvalidAttributePrivateKeyFormat = -67800; -const int CSSM_ALGID_SSL3KeyAndMacDerive = 64; +const int errSecMissingAttributePrivateKeyFormat = -67801; -const int CSSM_ALGID_SSL3MD5_MAC = 65; +const int errSecInvalidAttributeSymmetricKeyFormat = -67802; -const int CSSM_ALGID_SSL3SHA1_MAC = 66; +const int errSecMissingAttributeSymmetricKeyFormat = -67803; -const int CSSM_ALGID_PKCS5_PBKDF1_MD5 = 67; +const int errSecInvalidAttributeWrappedKeyFormat = -67804; -const int CSSM_ALGID_PKCS5_PBKDF1_MD2 = 68; +const int errSecMissingAttributeWrappedKeyFormat = -67805; -const int CSSM_ALGID_PKCS5_PBKDF1_SHA1 = 69; +const int errSecStagedOperationInProgress = -67806; -const int CSSM_ALGID_WrapLynks = 70; +const int errSecStagedOperationNotStarted = -67807; -const int CSSM_ALGID_WrapSET_OAEP = 71; +const int errSecVerifyFailed = -67808; -const int CSSM_ALGID_BATON = 72; +const int errSecQuerySizeUnknown = -67809; -const int CSSM_ALGID_ECDSA = 73; +const int errSecBlockSizeMismatch = -67810; -const int CSSM_ALGID_MAYFLY = 74; +const int errSecPublicKeyInconsistent = -67811; -const int CSSM_ALGID_JUNIPER = 75; +const int errSecDeviceVerifyFailed = -67812; -const int CSSM_ALGID_FASTHASH = 76; +const int errSecInvalidLoginName = -67813; -const int CSSM_ALGID_3DES = 77; +const int errSecAlreadyLoggedIn = -67814; -const int CSSM_ALGID_SSL3MD5 = 78; +const int errSecInvalidDigestAlgorithm = -67815; -const int CSSM_ALGID_SSL3SHA1 = 79; +const int errSecInvalidCRLGroup = -67816; -const int CSSM_ALGID_FortezzaTimestamp = 80; +const int errSecCertificateCannotOperate = -67817; -const int CSSM_ALGID_SHA1WithDSA = 81; +const int errSecCertificateExpired = -67818; -const int CSSM_ALGID_SHA1WithECDSA = 82; +const int errSecCertificateNotValidYet = -67819; -const int CSSM_ALGID_DSA_BSAFE = 83; +const int errSecCertificateRevoked = -67820; -const int CSSM_ALGID_ECDH = 84; +const int errSecCertificateSuspended = -67821; -const int CSSM_ALGID_ECMQV = 85; +const int errSecInsufficientCredentials = -67822; -const int CSSM_ALGID_PKCS12_SHA1_PBE = 86; +const int errSecInvalidAction = -67823; -const int CSSM_ALGID_ECNRA = 87; +const int errSecInvalidAuthority = -67824; -const int CSSM_ALGID_SHA1WithECNRA = 88; +const int errSecVerifyActionFailed = -67825; -const int CSSM_ALGID_ECES = 89; +const int errSecInvalidCertAuthority = -67826; -const int CSSM_ALGID_ECAES = 90; +const int errSecInvalidCRLAuthority = -67827; -const int CSSM_ALGID_SHA1HMAC = 91; +const int errSecInvaldCRLAuthority = -67827; -const int CSSM_ALGID_FIPS186Random = 92; +const int errSecInvalidCRLEncoding = -67828; -const int CSSM_ALGID_ECC = 93; +const int errSecInvalidCRLType = -67829; -const int CSSM_ALGID_MQV = 94; +const int errSecInvalidCRL = -67830; -const int CSSM_ALGID_NRA = 95; +const int errSecInvalidFormType = -67831; -const int CSSM_ALGID_IntelPlatformRandom = 96; +const int errSecInvalidID = -67832; -const int CSSM_ALGID_UTC = 97; +const int errSecInvalidIdentifier = -67833; -const int CSSM_ALGID_HAVAL3 = 98; +const int errSecInvalidIndex = -67834; -const int CSSM_ALGID_HAVAL4 = 99; +const int errSecInvalidPolicyIdentifiers = -67835; -const int CSSM_ALGID_HAVAL5 = 100; +const int errSecInvalidTimeString = -67836; -const int CSSM_ALGID_TIGER = 101; +const int errSecInvalidReason = -67837; -const int CSSM_ALGID_MD5HMAC = 102; +const int errSecInvalidRequestInputs = -67838; -const int CSSM_ALGID_PKCS5_PBKDF2 = 103; +const int errSecInvalidResponseVector = -67839; -const int CSSM_ALGID_RUNNING_COUNTER = 104; +const int errSecInvalidStopOnPolicy = -67840; -const int CSSM_ALGID_LAST = 2147483647; +const int errSecInvalidTuple = -67841; -const int CSSM_ALGID_VENDOR_DEFINED = -2147483648; +const int errSecMultipleValuesUnsupported = -67842; -const int CSSM_ALGMODE_NONE = 0; +const int errSecNotTrusted = -67843; -const int CSSM_ALGMODE_CUSTOM = 1; +const int errSecNoDefaultAuthority = -67844; -const int CSSM_ALGMODE_ECB = 2; +const int errSecRejectedForm = -67845; -const int CSSM_ALGMODE_ECBPad = 3; +const int errSecRequestLost = -67846; -const int CSSM_ALGMODE_CBC = 4; +const int errSecRequestRejected = -67847; -const int CSSM_ALGMODE_CBC_IV8 = 5; +const int errSecUnsupportedAddressType = -67848; -const int CSSM_ALGMODE_CBCPadIV8 = 6; +const int errSecUnsupportedService = -67849; -const int CSSM_ALGMODE_CFB = 7; +const int errSecInvalidTupleGroup = -67850; -const int CSSM_ALGMODE_CFB_IV8 = 8; +const int errSecInvalidBaseACLs = -67851; -const int CSSM_ALGMODE_CFBPadIV8 = 9; +const int errSecInvalidTupleCredentials = -67852; -const int CSSM_ALGMODE_OFB = 10; +const int errSecInvalidTupleCredendtials = -67852; -const int CSSM_ALGMODE_OFB_IV8 = 11; +const int errSecInvalidEncoding = -67853; -const int CSSM_ALGMODE_OFBPadIV8 = 12; +const int errSecInvalidValidityPeriod = -67854; -const int CSSM_ALGMODE_COUNTER = 13; +const int errSecInvalidRequestor = -67855; -const int CSSM_ALGMODE_BC = 14; +const int errSecRequestDescriptor = -67856; -const int CSSM_ALGMODE_PCBC = 15; +const int errSecInvalidBundleInfo = -67857; -const int CSSM_ALGMODE_CBCC = 16; +const int errSecInvalidCRLIndex = -67858; -const int CSSM_ALGMODE_OFBNLF = 17; +const int errSecNoFieldValues = -67859; -const int CSSM_ALGMODE_PBC = 18; +const int errSecUnsupportedFieldFormat = -67860; -const int CSSM_ALGMODE_PFB = 19; +const int errSecUnsupportedIndexInfo = -67861; -const int CSSM_ALGMODE_CBCPD = 20; +const int errSecUnsupportedLocality = -67862; -const int CSSM_ALGMODE_PUBLIC_KEY = 21; +const int errSecUnsupportedNumAttributes = -67863; -const int CSSM_ALGMODE_PRIVATE_KEY = 22; +const int errSecUnsupportedNumIndexes = -67864; -const int CSSM_ALGMODE_SHUFFLE = 23; +const int errSecUnsupportedNumRecordTypes = -67865; -const int CSSM_ALGMODE_ECB64 = 24; +const int errSecFieldSpecifiedMultiple = -67866; -const int CSSM_ALGMODE_CBC64 = 25; +const int errSecIncompatibleFieldFormat = -67867; -const int CSSM_ALGMODE_OFB64 = 26; +const int errSecInvalidParsingModule = -67868; -const int CSSM_ALGMODE_CFB32 = 28; +const int errSecDatabaseLocked = -67869; -const int CSSM_ALGMODE_CFB16 = 29; +const int errSecDatastoreIsOpen = -67870; -const int CSSM_ALGMODE_CFB8 = 30; +const int errSecMissingValue = -67871; -const int CSSM_ALGMODE_WRAP = 31; +const int errSecUnsupportedQueryLimits = -67872; -const int CSSM_ALGMODE_PRIVATE_WRAP = 32; +const int errSecUnsupportedNumSelectionPreds = -67873; -const int CSSM_ALGMODE_RELAYX = 33; +const int errSecUnsupportedOperator = -67874; -const int CSSM_ALGMODE_ECB128 = 34; +const int errSecInvalidDBLocation = -67875; -const int CSSM_ALGMODE_ECB96 = 35; +const int errSecInvalidAccessRequest = -67876; -const int CSSM_ALGMODE_CBC128 = 36; +const int errSecInvalidIndexInfo = -67877; -const int CSSM_ALGMODE_OAEP_HASH = 37; +const int errSecInvalidNewOwner = -67878; -const int CSSM_ALGMODE_PKCS1_EME_V15 = 38; +const int errSecInvalidModifyMode = -67879; -const int CSSM_ALGMODE_PKCS1_EME_OAEP = 39; +const int errSecMissingRequiredExtension = -67880; -const int CSSM_ALGMODE_PKCS1_EMSA_V15 = 40; +const int errSecExtendedKeyUsageNotCritical = -67881; -const int CSSM_ALGMODE_ISO_9796 = 41; +const int errSecTimestampMissing = -67882; -const int CSSM_ALGMODE_X9_31 = 42; +const int errSecTimestampInvalid = -67883; -const int CSSM_ALGMODE_LAST = 2147483647; +const int errSecTimestampNotTrusted = -67884; -const int CSSM_ALGMODE_VENDOR_DEFINED = -2147483648; +const int errSecTimestampServiceNotAvailable = -67885; -const int CSSM_CSP_SOFTWARE = 1; +const int errSecTimestampBadAlg = -67886; -const int CSSM_CSP_HARDWARE = 2; +const int errSecTimestampBadRequest = -67887; -const int CSSM_CSP_HYBRID = 3; +const int errSecTimestampBadDataFormat = -67888; -const int CSSM_ALGCLASS_NONE = 0; +const int errSecTimestampTimeNotAvailable = -67889; -const int CSSM_ALGCLASS_CUSTOM = 1; +const int errSecTimestampUnacceptedPolicy = -67890; -const int CSSM_ALGCLASS_SIGNATURE = 2; +const int errSecTimestampUnacceptedExtension = -67891; -const int CSSM_ALGCLASS_SYMMETRIC = 3; +const int errSecTimestampAddInfoNotAvailable = -67892; -const int CSSM_ALGCLASS_DIGEST = 4; +const int errSecTimestampSystemFailure = -67893; -const int CSSM_ALGCLASS_RANDOMGEN = 5; +const int errSecSigningTimeMissing = -67894; -const int CSSM_ALGCLASS_UNIQUEGEN = 6; +const int errSecTimestampRejection = -67895; -const int CSSM_ALGCLASS_MAC = 7; +const int errSecTimestampWaiting = -67896; -const int CSSM_ALGCLASS_ASYMMETRIC = 8; +const int errSecTimestampRevocationWarning = -67897; -const int CSSM_ALGCLASS_KEYGEN = 9; +const int errSecTimestampRevocationNotification = -67898; -const int CSSM_ALGCLASS_DERIVEKEY = 10; +const int errSecCertificatePolicyNotAllowed = -67899; -const int CSSM_ATTRIBUTE_DATA_NONE = 0; +const int errSecCertificateNameNotAllowed = -67900; -const int CSSM_ATTRIBUTE_DATA_UINT32 = 268435456; +const int errSecCertificateValidityPeriodTooLong = -67901; -const int CSSM_ATTRIBUTE_DATA_CSSM_DATA = 536870912; +const int errSecCertificateIsCA = -67902; -const int CSSM_ATTRIBUTE_DATA_CRYPTO_DATA = 805306368; +const int errSecCertificateDuplicateExtension = -67903; -const int CSSM_ATTRIBUTE_DATA_KEY = 1073741824; +const int errSSLProtocol = -9800; -const int CSSM_ATTRIBUTE_DATA_STRING = 1342177280; +const int errSSLNegotiation = -9801; -const int CSSM_ATTRIBUTE_DATA_DATE = 1610612736; +const int errSSLFatalAlert = -9802; -const int CSSM_ATTRIBUTE_DATA_RANGE = 1879048192; +const int errSSLWouldBlock = -9803; -const int CSSM_ATTRIBUTE_DATA_ACCESS_CREDENTIALS = -2147483648; +const int errSSLSessionNotFound = -9804; -const int CSSM_ATTRIBUTE_DATA_VERSION = 16777216; +const int errSSLClosedGraceful = -9805; -const int CSSM_ATTRIBUTE_DATA_DL_DB_HANDLE = 33554432; +const int errSSLClosedAbort = -9806; -const int CSSM_ATTRIBUTE_DATA_KR_PROFILE = 50331648; +const int errSSLXCertChainInvalid = -9807; -const int CSSM_ATTRIBUTE_TYPE_MASK = -16777216; +const int errSSLBadCert = -9808; -const int CSSM_ATTRIBUTE_NONE = 0; +const int errSSLCrypto = -9809; -const int CSSM_ATTRIBUTE_CUSTOM = 536870913; +const int errSSLInternal = -9810; -const int CSSM_ATTRIBUTE_DESCRIPTION = 1342177282; +const int errSSLModuleAttach = -9811; -const int CSSM_ATTRIBUTE_KEY = 1073741827; +const int errSSLUnknownRootCert = -9812; -const int CSSM_ATTRIBUTE_INIT_VECTOR = 536870916; +const int errSSLNoRootCert = -9813; -const int CSSM_ATTRIBUTE_SALT = 536870917; +const int errSSLCertExpired = -9814; -const int CSSM_ATTRIBUTE_PADDING = 268435462; +const int errSSLCertNotYetValid = -9815; -const int CSSM_ATTRIBUTE_RANDOM = 536870919; +const int errSSLClosedNoNotify = -9816; -const int CSSM_ATTRIBUTE_SEED = 805306376; +const int errSSLBufferOverflow = -9817; -const int CSSM_ATTRIBUTE_PASSPHRASE = 805306377; +const int errSSLBadCipherSuite = -9818; -const int CSSM_ATTRIBUTE_KEY_LENGTH = 268435466; +const int errSSLPeerUnexpectedMsg = -9819; -const int CSSM_ATTRIBUTE_KEY_LENGTH_RANGE = 1879048203; +const int errSSLPeerBadRecordMac = -9820; -const int CSSM_ATTRIBUTE_BLOCK_SIZE = 268435468; +const int errSSLPeerDecryptionFail = -9821; -const int CSSM_ATTRIBUTE_OUTPUT_SIZE = 268435469; +const int errSSLPeerRecordOverflow = -9822; -const int CSSM_ATTRIBUTE_ROUNDS = 268435470; +const int errSSLPeerDecompressFail = -9823; -const int CSSM_ATTRIBUTE_IV_SIZE = 268435471; +const int errSSLPeerHandshakeFail = -9824; -const int CSSM_ATTRIBUTE_ALG_PARAMS = 536870928; +const int errSSLPeerBadCert = -9825; -const int CSSM_ATTRIBUTE_LABEL = 536870929; +const int errSSLPeerUnsupportedCert = -9826; -const int CSSM_ATTRIBUTE_KEY_TYPE = 268435474; +const int errSSLPeerCertRevoked = -9827; -const int CSSM_ATTRIBUTE_MODE = 268435475; +const int errSSLPeerCertExpired = -9828; -const int CSSM_ATTRIBUTE_EFFECTIVE_BITS = 268435476; +const int errSSLPeerCertUnknown = -9829; -const int CSSM_ATTRIBUTE_START_DATE = 1610612757; +const int errSSLIllegalParam = -9830; -const int CSSM_ATTRIBUTE_END_DATE = 1610612758; +const int errSSLPeerUnknownCA = -9831; -const int CSSM_ATTRIBUTE_KEYUSAGE = 268435479; +const int errSSLPeerAccessDenied = -9832; -const int CSSM_ATTRIBUTE_KEYATTR = 268435480; +const int errSSLPeerDecodeError = -9833; -const int CSSM_ATTRIBUTE_VERSION = 16777241; +const int errSSLPeerDecryptError = -9834; -const int CSSM_ATTRIBUTE_PRIME = 536870938; +const int errSSLPeerExportRestriction = -9835; -const int CSSM_ATTRIBUTE_BASE = 536870939; +const int errSSLPeerProtocolVersion = -9836; -const int CSSM_ATTRIBUTE_SUBPRIME = 536870940; +const int errSSLPeerInsufficientSecurity = -9837; -const int CSSM_ATTRIBUTE_ALG_ID = 268435485; +const int errSSLPeerInternalError = -9838; -const int CSSM_ATTRIBUTE_ITERATION_COUNT = 268435486; +const int errSSLPeerUserCancelled = -9839; -const int CSSM_ATTRIBUTE_ROUNDS_RANGE = 1879048223; +const int errSSLPeerNoRenegotiation = -9840; -const int CSSM_ATTRIBUTE_KRPROFILE_LOCAL = 50331680; +const int errSSLPeerAuthCompleted = -9841; -const int CSSM_ATTRIBUTE_KRPROFILE_REMOTE = 50331681; +const int errSSLClientCertRequested = -9842; -const int CSSM_ATTRIBUTE_CSP_HANDLE = 268435490; +const int errSSLHostNameMismatch = -9843; -const int CSSM_ATTRIBUTE_DL_DB_HANDLE = 33554467; +const int errSSLConnectionRefused = -9844; -const int CSSM_ATTRIBUTE_ACCESS_CREDENTIALS = -2147483612; +const int errSSLDecryptionFail = -9845; -const int CSSM_ATTRIBUTE_PUBLIC_KEY_FORMAT = 268435493; +const int errSSLBadRecordMac = -9846; -const int CSSM_ATTRIBUTE_PRIVATE_KEY_FORMAT = 268435494; +const int errSSLRecordOverflow = -9847; -const int CSSM_ATTRIBUTE_SYMMETRIC_KEY_FORMAT = 268435495; +const int errSSLBadConfiguration = -9848; -const int CSSM_ATTRIBUTE_WRAPPED_KEY_FORMAT = 268435496; +const int errSSLUnexpectedRecord = -9849; -const int CSSM_PADDING_NONE = 0; +const int errSSLWeakPeerEphemeralDHKey = -9850; -const int CSSM_PADDING_CUSTOM = 1; +const int errSSLClientHelloReceived = -9851; -const int CSSM_PADDING_ZERO = 2; +const int errSSLTransportReset = -9852; -const int CSSM_PADDING_ONE = 3; +const int errSSLNetworkTimeout = -9853; -const int CSSM_PADDING_ALTERNATE = 4; +const int errSSLConfigurationFailed = -9854; -const int CSSM_PADDING_FF = 5; +const int errSSLUnsupportedExtension = -9855; -const int CSSM_PADDING_PKCS5 = 6; +const int errSSLUnexpectedMessage = -9856; -const int CSSM_PADDING_PKCS7 = 7; +const int errSSLDecompressFail = -9857; -const int CSSM_PADDING_CIPHERSTEALING = 8; +const int errSSLHandshakeFail = -9858; -const int CSSM_PADDING_RANDOM = 9; +const int errSSLDecodeError = -9859; -const int CSSM_PADDING_PKCS1 = 10; +const int errSSLInappropriateFallback = -9860; -const int CSSM_PADDING_SIGRAW = 11; +const int errSSLMissingExtension = -9861; -const int CSSM_PADDING_VENDOR_DEFINED = -2147483648; +const int errSSLBadCertificateStatusResponse = -9862; -const int CSSM_CSP_TOK_RNG = 1; +const int errSSLCertificateRequired = -9863; -const int CSSM_CSP_TOK_CLOCK_EXISTS = 64; +const int errSSLUnknownPSKIdentity = -9864; -const int CSSM_CSP_RDR_TOKENPRESENT = 1; +const int errSSLUnrecognizedName = -9865; -const int CSSM_CSP_RDR_EXISTS = 2; +const int errSSLATSViolation = -9880; -const int CSSM_CSP_RDR_HW = 4; +const int errSSLATSMinimumVersionViolation = -9881; -const int CSSM_CSP_TOK_WRITE_PROTECTED = 2; +const int errSSLATSCiphersuiteViolation = -9882; -const int CSSM_CSP_TOK_LOGIN_REQUIRED = 4; +const int errSSLATSMinimumKeySizeViolation = -9883; -const int CSSM_CSP_TOK_USER_PIN_INITIALIZED = 8; +const int errSSLATSLeafCertificateHashAlgorithmViolation = -9884; -const int CSSM_CSP_TOK_PROT_AUTHENTICATION = 256; +const int errSSLATSCertificateHashAlgorithmViolation = -9885; -const int CSSM_CSP_TOK_USER_PIN_EXPIRED = 1048576; +const int errSSLATSCertificateTrustViolation = -9886; -const int CSSM_CSP_TOK_SESSION_KEY_PASSWORD = 2097152; +const int errSSLEarlyDataRejected = -9890; -const int CSSM_CSP_TOK_PRIVATE_KEY_PASSWORD = 4194304; +const int OSUnknownByteOrder = 0; -const int CSSM_CSP_STORES_PRIVATE_KEYS = 16777216; +const int OSLittleEndian = 1; -const int CSSM_CSP_STORES_PUBLIC_KEYS = 33554432; +const int OSBigEndian = 2; -const int CSSM_CSP_STORES_SESSION_KEYS = 67108864; +const int kCFNotificationDeliverImmediately = 1; -const int CSSM_CSP_STORES_CERTIFICATES = 134217728; +const int kCFNotificationPostToAllSessions = 2; -const int CSSM_CSP_STORES_GENERIC = 268435456; +const int kCFCalendarComponentsWrap = 1; -const int CSSM_PKCS_OAEP_MGF_NONE = 0; +const int kCFSocketAutomaticallyReenableReadCallBack = 1; -const int CSSM_PKCS_OAEP_MGF1_SHA1 = 1; +const int kCFSocketAutomaticallyReenableAcceptCallBack = 2; -const int CSSM_PKCS_OAEP_MGF1_MD5 = 2; +const int kCFSocketAutomaticallyReenableDataCallBack = 3; -const int CSSM_PKCS_OAEP_PSOURCE_NONE = 0; +const int kCFSocketAutomaticallyReenableWriteCallBack = 8; -const int CSSM_PKCS_OAEP_PSOURCE_Pspecified = 1; +const int kCFSocketLeaveErrors = 64; -const int CSSM_VALUE_NOT_AVAILABLE = -1; +const int kCFSocketCloseOnInvalidate = 128; -const int CSSM_PKCS5_PBKDF2_PRF_HMAC_SHA1 = 0; +const int DISPATCH_WALLTIME_NOW = -2; -const int CSSM_TP_AUTHORITY_REQUEST_CERTISSUE = 1; +const int kCFPropertyListReadCorruptError = 3840; -const int CSSM_TP_AUTHORITY_REQUEST_CERTREVOKE = 2; +const int kCFPropertyListReadUnknownVersionError = 3841; -const int CSSM_TP_AUTHORITY_REQUEST_CERTSUSPEND = 3; +const int kCFPropertyListReadStreamError = 3842; -const int CSSM_TP_AUTHORITY_REQUEST_CERTRESUME = 4; +const int kCFPropertyListWriteStreamError = 3851; -const int CSSM_TP_AUTHORITY_REQUEST_CERTVERIFY = 5; +const int kCFBundleExecutableArchitectureI386 = 7; -const int CSSM_TP_AUTHORITY_REQUEST_CERTNOTARIZE = 6; +const int kCFBundleExecutableArchitecturePPC = 18; -const int CSSM_TP_AUTHORITY_REQUEST_CERTUSERECOVER = 7; +const int kCFBundleExecutableArchitectureX86_64 = 16777223; -const int CSSM_TP_AUTHORITY_REQUEST_CRLISSUE = 256; +const int kCFBundleExecutableArchitecturePPC64 = 16777234; -const int CSSM_TP_KEY_ARCHIVE = 1; +const int kCFBundleExecutableArchitectureARM64 = 16777228; -const int CSSM_TP_CERT_PUBLISH = 2; +const int kCFMessagePortSuccess = 0; -const int CSSM_TP_CERT_NOTIFY_RENEW = 4; +const int kCFMessagePortSendTimeout = -1; -const int CSSM_TP_CERT_DIR_UPDATE = 8; +const int kCFMessagePortReceiveTimeout = -2; -const int CSSM_TP_CRL_DISTRIBUTE = 16; +const int kCFMessagePortIsInvalid = -3; -const int CSSM_TP_ACTION_DEFAULT = 0; +const int kCFMessagePortTransportError = -4; -const int CSSM_TP_STOP_ON_POLICY = 0; +const int kCFMessagePortBecameInvalidError = -5; -const int CSSM_TP_STOP_ON_NONE = 1; +const int kCFStringTokenizerUnitWord = 0; -const int CSSM_TP_STOP_ON_FIRST_PASS = 2; +const int kCFStringTokenizerUnitSentence = 1; -const int CSSM_TP_STOP_ON_FIRST_FAIL = 3; +const int kCFStringTokenizerUnitParagraph = 2; -const int CSSM_CRL_PARSE_FORMAT_NONE = 0; +const int kCFStringTokenizerUnitLineBreak = 3; -const int CSSM_CRL_PARSE_FORMAT_CUSTOM = 1; +const int kCFStringTokenizerUnitWordBoundary = 4; -const int CSSM_CRL_PARSE_FORMAT_SEXPR = 2; +const int kCFStringTokenizerAttributeLatinTranscription = 65536; -const int CSSM_CRL_PARSE_FORMAT_COMPLEX = 3; +const int kCFStringTokenizerAttributeLanguage = 131072; -const int CSSM_CRL_PARSE_FORMAT_OID_NAMED = 4; +const int kCFFileDescriptorReadCallBack = 1; -const int CSSM_CRL_PARSE_FORMAT_TUPLE = 5; +const int kCFFileDescriptorWriteCallBack = 2; -const int CSSM_CRL_PARSE_FORMAT_MULTIPLE = 32766; +const int kCFUserNotificationStopAlertLevel = 0; -const int CSSM_CRL_PARSE_FORMAT_LAST = 32767; +const int kCFUserNotificationNoteAlertLevel = 1; -const int CSSM_CL_CUSTOM_CRL_PARSE_FORMAT = 32768; +const int kCFUserNotificationCautionAlertLevel = 2; -const int CSSM_CRL_TYPE_UNKNOWN = 0; +const int kCFUserNotificationPlainAlertLevel = 3; -const int CSSM_CRL_TYPE_X_509v1 = 1; +const int kCFUserNotificationDefaultResponse = 0; -const int CSSM_CRL_TYPE_X_509v2 = 2; +const int kCFUserNotificationAlternateResponse = 1; -const int CSSM_CRL_TYPE_SPKI = 3; +const int kCFUserNotificationOtherResponse = 2; -const int CSSM_CRL_TYPE_MULTIPLE = 32766; +const int kCFUserNotificationCancelResponse = 3; -const int CSSM_CRL_ENCODING_UNKNOWN = 0; +const int kCFUserNotificationNoDefaultButtonFlag = 32; -const int CSSM_CRL_ENCODING_CUSTOM = 1; +const int kCFUserNotificationUseRadioButtonsFlag = 64; -const int CSSM_CRL_ENCODING_BER = 2; +const int kCFXMLNodeCurrentVersion = 1; -const int CSSM_CRL_ENCODING_DER = 3; +const int CSSM_INVALID_HANDLE = 0; -const int CSSM_CRL_ENCODING_BLOOM = 4; +const int CSSM_FALSE = 0; -const int CSSM_CRL_ENCODING_SEXPR = 5; +const int CSSM_TRUE = 1; -const int CSSM_CRL_ENCODING_MULTIPLE = 32766; +const int CSSM_OK = 0; -const int CSSM_CRLGROUP_DATA = 0; +const int CSSM_MODULE_STRING_SIZE = 64; -const int CSSM_CRLGROUP_ENCODED_CRL = 1; +const int CSSM_KEY_HIERARCHY_NONE = 0; -const int CSSM_CRLGROUP_PARSED_CRL = 2; +const int CSSM_KEY_HIERARCHY_INTEG = 1; -const int CSSM_CRLGROUP_CRL_PAIR = 3; +const int CSSM_KEY_HIERARCHY_EXPORT = 2; -const int CSSM_EVIDENCE_FORM_UNSPECIFIC = 0; +const int CSSM_PVC_NONE = 0; -const int CSSM_EVIDENCE_FORM_CERT = 1; +const int CSSM_PVC_APP = 1; -const int CSSM_EVIDENCE_FORM_CRL = 2; +const int CSSM_PVC_SP = 2; -const int CSSM_EVIDENCE_FORM_CERT_ID = 3; +const int CSSM_PRIVILEGE_SCOPE_NONE = 0; -const int CSSM_EVIDENCE_FORM_CRL_ID = 4; +const int CSSM_PRIVILEGE_SCOPE_PROCESS = 1; -const int CSSM_EVIDENCE_FORM_VERIFIER_TIME = 5; +const int CSSM_PRIVILEGE_SCOPE_THREAD = 2; -const int CSSM_EVIDENCE_FORM_CRL_THISTIME = 6; +const int CSSM_SERVICE_CSSM = 1; -const int CSSM_EVIDENCE_FORM_CRL_NEXTTIME = 7; +const int CSSM_SERVICE_CSP = 2; -const int CSSM_EVIDENCE_FORM_POLICYINFO = 8; +const int CSSM_SERVICE_DL = 4; -const int CSSM_EVIDENCE_FORM_TUPLEGROUP = 9; +const int CSSM_SERVICE_CL = 8; -const int CSSM_TP_CONFIRM_STATUS_UNKNOWN = 0; +const int CSSM_SERVICE_TP = 16; -const int CSSM_TP_CONFIRM_ACCEPT = 1; +const int CSSM_SERVICE_AC = 32; -const int CSSM_TP_CONFIRM_REJECT = 2; +const int CSSM_SERVICE_KR = 64; -const int CSSM_ESTIMATED_TIME_UNKNOWN = -1; +const int CSSM_NOTIFY_INSERT = 1; -const int CSSM_ELAPSED_TIME_UNKNOWN = -1; +const int CSSM_NOTIFY_REMOVE = 2; -const int CSSM_ELAPSED_TIME_COMPLETE = -2; +const int CSSM_NOTIFY_FAULT = 3; -const int CSSM_TP_CERTISSUE_STATUS_UNKNOWN = 0; +const int CSSM_ATTACH_READ_ONLY = 1; -const int CSSM_TP_CERTISSUE_OK = 1; +const int CSSM_USEE_LAST = 255; -const int CSSM_TP_CERTISSUE_OKWITHCERTMODS = 2; +const int CSSM_USEE_NONE = 0; -const int CSSM_TP_CERTISSUE_OKWITHSERVICEMODS = 3; +const int CSSM_USEE_DOMESTIC = 1; -const int CSSM_TP_CERTISSUE_REJECTED = 4; +const int CSSM_USEE_FINANCIAL = 2; -const int CSSM_TP_CERTISSUE_NOT_AUTHORIZED = 5; +const int CSSM_USEE_KRLE = 3; -const int CSSM_TP_CERTISSUE_WILL_BE_REVOKED = 6; +const int CSSM_USEE_KRENT = 4; -const int CSSM_TP_CERTCHANGE_NONE = 0; +const int CSSM_USEE_SSL = 5; -const int CSSM_TP_CERTCHANGE_REVOKE = 1; +const int CSSM_USEE_AUTHENTICATION = 6; -const int CSSM_TP_CERTCHANGE_HOLD = 2; +const int CSSM_USEE_KEYEXCH = 7; -const int CSSM_TP_CERTCHANGE_RELEASE = 3; +const int CSSM_USEE_MEDICAL = 8; -const int CSSM_TP_CERTCHANGE_REASON_UNKNOWN = 0; +const int CSSM_USEE_INSURANCE = 9; -const int CSSM_TP_CERTCHANGE_REASON_KEYCOMPROMISE = 1; +const int CSSM_USEE_WEAK = 10; -const int CSSM_TP_CERTCHANGE_REASON_CACOMPROMISE = 2; +const int CSSM_ADDR_NONE = 0; -const int CSSM_TP_CERTCHANGE_REASON_CEASEOPERATION = 3; +const int CSSM_ADDR_CUSTOM = 1; -const int CSSM_TP_CERTCHANGE_REASON_AFFILIATIONCHANGE = 4; +const int CSSM_ADDR_URL = 2; -const int CSSM_TP_CERTCHANGE_REASON_SUPERCEDED = 5; +const int CSSM_ADDR_SOCKADDR = 3; -const int CSSM_TP_CERTCHANGE_REASON_SUSPECTEDCOMPROMISE = 6; +const int CSSM_ADDR_NAME = 4; -const int CSSM_TP_CERTCHANGE_REASON_HOLDRELEASE = 7; +const int CSSM_NET_PROTO_NONE = 0; -const int CSSM_TP_CERTCHANGE_STATUS_UNKNOWN = 0; +const int CSSM_NET_PROTO_CUSTOM = 1; -const int CSSM_TP_CERTCHANGE_OK = 1; +const int CSSM_NET_PROTO_UNSPECIFIED = 2; -const int CSSM_TP_CERTCHANGE_OKWITHNEWTIME = 2; +const int CSSM_NET_PROTO_LDAP = 3; -const int CSSM_TP_CERTCHANGE_WRONGCA = 3; +const int CSSM_NET_PROTO_LDAPS = 4; -const int CSSM_TP_CERTCHANGE_REJECTED = 4; +const int CSSM_NET_PROTO_LDAPNS = 5; -const int CSSM_TP_CERTCHANGE_NOT_AUTHORIZED = 5; +const int CSSM_NET_PROTO_X500DAP = 6; -const int CSSM_TP_CERTVERIFY_UNKNOWN = 0; +const int CSSM_NET_PROTO_FTP = 7; -const int CSSM_TP_CERTVERIFY_VALID = 1; +const int CSSM_NET_PROTO_FTPS = 8; -const int CSSM_TP_CERTVERIFY_INVALID = 2; +const int CSSM_NET_PROTO_OCSP = 9; -const int CSSM_TP_CERTVERIFY_REVOKED = 3; +const int CSSM_NET_PROTO_CMP = 10; -const int CSSM_TP_CERTVERIFY_SUSPENDED = 4; +const int CSSM_NET_PROTO_CMPS = 11; -const int CSSM_TP_CERTVERIFY_EXPIRED = 5; +const int CSSM_WORDID__UNK_ = -1; -const int CSSM_TP_CERTVERIFY_NOT_VALID_YET = 6; +const int CSSM_WORDID__NLU_ = 0; -const int CSSM_TP_CERTVERIFY_INVALID_AUTHORITY = 7; +const int CSSM_WORDID__STAR_ = 1; -const int CSSM_TP_CERTVERIFY_INVALID_SIGNATURE = 8; +const int CSSM_WORDID_A = 2; -const int CSSM_TP_CERTVERIFY_INVALID_CERT_VALUE = 9; +const int CSSM_WORDID_ACL = 3; -const int CSSM_TP_CERTVERIFY_INVALID_CERTGROUP = 10; +const int CSSM_WORDID_ALPHA = 4; -const int CSSM_TP_CERTVERIFY_INVALID_POLICY = 11; +const int CSSM_WORDID_B = 5; -const int CSSM_TP_CERTVERIFY_INVALID_POLICY_IDS = 12; +const int CSSM_WORDID_BER = 6; -const int CSSM_TP_CERTVERIFY_INVALID_BASIC_CONSTRAINTS = 13; +const int CSSM_WORDID_BINARY = 7; -const int CSSM_TP_CERTVERIFY_INVALID_CRL_DIST_PT = 14; +const int CSSM_WORDID_BIOMETRIC = 8; -const int CSSM_TP_CERTVERIFY_INVALID_NAME_TREE = 15; +const int CSSM_WORDID_C = 9; -const int CSSM_TP_CERTVERIFY_UNKNOWN_CRITICAL_EXT = 16; +const int CSSM_WORDID_CANCELED = 10; -const int CSSM_TP_CERTNOTARIZE_STATUS_UNKNOWN = 0; +const int CSSM_WORDID_CERT = 11; -const int CSSM_TP_CERTNOTARIZE_OK = 1; +const int CSSM_WORDID_COMMENT = 12; -const int CSSM_TP_CERTNOTARIZE_OKWITHOUTFIELDS = 2; +const int CSSM_WORDID_CRL = 13; -const int CSSM_TP_CERTNOTARIZE_OKWITHSERVICEMODS = 3; +const int CSSM_WORDID_CUSTOM = 14; -const int CSSM_TP_CERTNOTARIZE_REJECTED = 4; +const int CSSM_WORDID_D = 15; -const int CSSM_TP_CERTNOTARIZE_NOT_AUTHORIZED = 5; +const int CSSM_WORDID_DATE = 16; -const int CSSM_TP_CERTRECLAIM_STATUS_UNKNOWN = 0; +const int CSSM_WORDID_DB_DELETE = 17; -const int CSSM_TP_CERTRECLAIM_OK = 1; +const int CSSM_WORDID_DB_EXEC_STORED_QUERY = 18; -const int CSSM_TP_CERTRECLAIM_NOMATCH = 2; +const int CSSM_WORDID_DB_INSERT = 19; -const int CSSM_TP_CERTRECLAIM_REJECTED = 3; +const int CSSM_WORDID_DB_MODIFY = 20; -const int CSSM_TP_CERTRECLAIM_NOT_AUTHORIZED = 4; +const int CSSM_WORDID_DB_READ = 21; -const int CSSM_TP_CRLISSUE_STATUS_UNKNOWN = 0; +const int CSSM_WORDID_DBS_CREATE = 22; -const int CSSM_TP_CRLISSUE_OK = 1; +const int CSSM_WORDID_DBS_DELETE = 23; -const int CSSM_TP_CRLISSUE_NOT_CURRENT = 2; +const int CSSM_WORDID_DECRYPT = 24; -const int CSSM_TP_CRLISSUE_INVALID_DOMAIN = 3; +const int CSSM_WORDID_DELETE = 25; -const int CSSM_TP_CRLISSUE_UNKNOWN_IDENTIFIER = 4; +const int CSSM_WORDID_DELTA_CRL = 26; -const int CSSM_TP_CRLISSUE_REJECTED = 5; +const int CSSM_WORDID_DER = 27; -const int CSSM_TP_CRLISSUE_NOT_AUTHORIZED = 6; +const int CSSM_WORDID_DERIVE = 28; -const int CSSM_TP_FORM_TYPE_GENERIC = 0; +const int CSSM_WORDID_DISPLAY = 29; -const int CSSM_TP_FORM_TYPE_REGISTRATION = 1; +const int CSSM_WORDID_DO = 30; -const int CSSM_CL_TEMPLATE_INTERMEDIATE_CERT = 1; +const int CSSM_WORDID_DSA = 31; -const int CSSM_CL_TEMPLATE_PKIX_CERTTEMPLATE = 2; +const int CSSM_WORDID_DSA_SHA1 = 32; -const int CSSM_CERT_BUNDLE_UNKNOWN = 0; +const int CSSM_WORDID_E = 33; -const int CSSM_CERT_BUNDLE_CUSTOM = 1; +const int CSSM_WORDID_ELGAMAL = 34; -const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_DATA = 2; +const int CSSM_WORDID_ENCRYPT = 35; -const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_ENVELOPED_DATA = 3; +const int CSSM_WORDID_ENTRY = 36; -const int CSSM_CERT_BUNDLE_PKCS12 = 4; +const int CSSM_WORDID_EXPORT_CLEAR = 37; -const int CSSM_CERT_BUNDLE_PFX = 5; +const int CSSM_WORDID_EXPORT_WRAPPED = 38; -const int CSSM_CERT_BUNDLE_SPKI_SEQUENCE = 6; +const int CSSM_WORDID_G = 39; -const int CSSM_CERT_BUNDLE_PGP_KEYRING = 7; +const int CSSM_WORDID_GE = 40; -const int CSSM_CERT_BUNDLE_LAST = 32767; +const int CSSM_WORDID_GENKEY = 41; -const int CSSM_CL_CUSTOM_CERT_BUNDLE_TYPE = 32768; +const int CSSM_WORDID_HASH = 42; -const int CSSM_CERT_BUNDLE_ENCODING_UNKNOWN = 0; +const int CSSM_WORDID_HASHED_PASSWORD = 43; -const int CSSM_CERT_BUNDLE_ENCODING_CUSTOM = 1; +const int CSSM_WORDID_HASHED_SUBJECT = 44; -const int CSSM_CERT_BUNDLE_ENCODING_BER = 2; +const int CSSM_WORDID_HAVAL = 45; -const int CSSM_CERT_BUNDLE_ENCODING_DER = 3; +const int CSSM_WORDID_IBCHASH = 46; -const int CSSM_CERT_BUNDLE_ENCODING_SEXPR = 4; +const int CSSM_WORDID_IMPORT_CLEAR = 47; -const int CSSM_CERT_BUNDLE_ENCODING_PGP = 5; +const int CSSM_WORDID_IMPORT_WRAPPED = 48; -const int CSSM_FIELDVALUE_COMPLEX_DATA_TYPE = -1; +const int CSSM_WORDID_INTEL = 49; -const int CSSM_DB_ATTRIBUTE_NAME_AS_STRING = 0; +const int CSSM_WORDID_ISSUER = 50; -const int CSSM_DB_ATTRIBUTE_NAME_AS_OID = 1; +const int CSSM_WORDID_ISSUER_INFO = 51; -const int CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER = 2; +const int CSSM_WORDID_K_OF_N = 52; -const int CSSM_DB_ATTRIBUTE_FORMAT_STRING = 0; +const int CSSM_WORDID_KEA = 53; -const int CSSM_DB_ATTRIBUTE_FORMAT_SINT32 = 1; +const int CSSM_WORDID_KEYHOLDER = 54; -const int CSSM_DB_ATTRIBUTE_FORMAT_UINT32 = 2; +const int CSSM_WORDID_L = 55; -const int CSSM_DB_ATTRIBUTE_FORMAT_BIG_NUM = 3; +const int CSSM_WORDID_LE = 56; -const int CSSM_DB_ATTRIBUTE_FORMAT_REAL = 4; +const int CSSM_WORDID_LOGIN = 57; -const int CSSM_DB_ATTRIBUTE_FORMAT_TIME_DATE = 5; +const int CSSM_WORDID_LOGIN_NAME = 58; -const int CSSM_DB_ATTRIBUTE_FORMAT_BLOB = 6; +const int CSSM_WORDID_MAC = 59; -const int CSSM_DB_ATTRIBUTE_FORMAT_MULTI_UINT32 = 7; +const int CSSM_WORDID_MD2 = 60; -const int CSSM_DB_ATTRIBUTE_FORMAT_COMPLEX = 8; +const int CSSM_WORDID_MD2WITHRSA = 61; -const int CSSM_DB_RECORDTYPE_SCHEMA_START = 0; +const int CSSM_WORDID_MD4 = 62; -const int CSSM_DB_RECORDTYPE_SCHEMA_END = 4; +const int CSSM_WORDID_MD5 = 63; -const int CSSM_DB_RECORDTYPE_OPEN_GROUP_START = 10; +const int CSSM_WORDID_MD5WITHRSA = 64; -const int CSSM_DB_RECORDTYPE_OPEN_GROUP_END = 18; +const int CSSM_WORDID_N = 65; -const int CSSM_DB_RECORDTYPE_APP_DEFINED_START = -2147483648; +const int CSSM_WORDID_NAME = 66; -const int CSSM_DB_RECORDTYPE_APP_DEFINED_END = -1; +const int CSSM_WORDID_NDR = 67; -const int CSSM_DL_DB_SCHEMA_INFO = 0; +const int CSSM_WORDID_NHASH = 68; -const int CSSM_DL_DB_SCHEMA_INDEXES = 1; +const int CSSM_WORDID_NOT_AFTER = 69; -const int CSSM_DL_DB_SCHEMA_ATTRIBUTES = 2; +const int CSSM_WORDID_NOT_BEFORE = 70; -const int CSSM_DL_DB_SCHEMA_PARSING_MODULE = 3; +const int CSSM_WORDID_NULL = 71; -const int CSSM_DL_DB_RECORD_ANY = 10; +const int CSSM_WORDID_NUMERIC = 72; -const int CSSM_DL_DB_RECORD_CERT = 11; +const int CSSM_WORDID_OBJECT_HASH = 73; -const int CSSM_DL_DB_RECORD_CRL = 12; +const int CSSM_WORDID_ONE_TIME = 74; -const int CSSM_DL_DB_RECORD_POLICY = 13; +const int CSSM_WORDID_ONLINE = 75; -const int CSSM_DL_DB_RECORD_GENERIC = 14; +const int CSSM_WORDID_OWNER = 76; -const int CSSM_DL_DB_RECORD_PUBLIC_KEY = 15; +const int CSSM_WORDID_P = 77; -const int CSSM_DL_DB_RECORD_PRIVATE_KEY = 16; +const int CSSM_WORDID_PAM_NAME = 78; -const int CSSM_DL_DB_RECORD_SYMMETRIC_KEY = 17; +const int CSSM_WORDID_PASSWORD = 79; -const int CSSM_DL_DB_RECORD_ALL_KEYS = 18; +const int CSSM_WORDID_PGP = 80; -const int CSSM_DB_CERT_USE_TRUSTED = 1; +const int CSSM_WORDID_PREFIX = 81; -const int CSSM_DB_CERT_USE_SYSTEM = 2; +const int CSSM_WORDID_PRIVATE_KEY = 82; -const int CSSM_DB_CERT_USE_OWNER = 4; +const int CSSM_WORDID_PROMPTED_BIOMETRIC = 83; -const int CSSM_DB_CERT_USE_REVOKED = 8; +const int CSSM_WORDID_PROMPTED_PASSWORD = 84; -const int CSSM_DB_CERT_USE_SIGNING = 16; +const int CSSM_WORDID_PROPAGATE = 85; -const int CSSM_DB_CERT_USE_PRIVACY = 32; +const int CSSM_WORDID_PROTECTED_BIOMETRIC = 86; -const int CSSM_DB_INDEX_UNIQUE = 0; +const int CSSM_WORDID_PROTECTED_PASSWORD = 87; -const int CSSM_DB_INDEX_NONUNIQUE = 1; +const int CSSM_WORDID_PROTECTED_PIN = 88; -const int CSSM_DB_INDEX_ON_UNKNOWN = 0; +const int CSSM_WORDID_PUBLIC_KEY = 89; -const int CSSM_DB_INDEX_ON_ATTRIBUTE = 1; +const int CSSM_WORDID_PUBLIC_KEY_FROM_CERT = 90; -const int CSSM_DB_INDEX_ON_RECORD = 2; +const int CSSM_WORDID_Q = 91; -const int CSSM_DB_ACCESS_READ = 1; +const int CSSM_WORDID_RANGE = 92; -const int CSSM_DB_ACCESS_WRITE = 2; +const int CSSM_WORDID_REVAL = 93; -const int CSSM_DB_ACCESS_PRIVILEGED = 4; +const int CSSM_WORDID_RIPEMAC = 94; -const int CSSM_DB_MODIFY_ATTRIBUTE_NONE = 0; +const int CSSM_WORDID_RIPEMD = 95; -const int CSSM_DB_MODIFY_ATTRIBUTE_ADD = 1; +const int CSSM_WORDID_RIPEMD160 = 96; -const int CSSM_DB_MODIFY_ATTRIBUTE_DELETE = 2; +const int CSSM_WORDID_RSA = 97; -const int CSSM_DB_MODIFY_ATTRIBUTE_REPLACE = 3; +const int CSSM_WORDID_RSA_ISO9796 = 98; -const int CSSM_DB_EQUAL = 0; +const int CSSM_WORDID_RSA_PKCS = 99; -const int CSSM_DB_NOT_EQUAL = 1; +const int CSSM_WORDID_RSA_PKCS_MD5 = 100; -const int CSSM_DB_LESS_THAN = 2; +const int CSSM_WORDID_RSA_PKCS_SHA1 = 101; -const int CSSM_DB_GREATER_THAN = 3; +const int CSSM_WORDID_RSA_PKCS1 = 102; -const int CSSM_DB_CONTAINS = 4; +const int CSSM_WORDID_RSA_PKCS1_MD5 = 103; -const int CSSM_DB_CONTAINS_INITIAL_SUBSTRING = 5; +const int CSSM_WORDID_RSA_PKCS1_SHA1 = 104; -const int CSSM_DB_CONTAINS_FINAL_SUBSTRING = 6; +const int CSSM_WORDID_RSA_PKCS1_SIG = 105; -const int CSSM_DB_NONE = 0; +const int CSSM_WORDID_RSA_RAW = 106; -const int CSSM_DB_AND = 1; +const int CSSM_WORDID_SDSIV1 = 107; -const int CSSM_DB_OR = 2; +const int CSSM_WORDID_SEQUENCE = 108; -const int CSSM_QUERY_TIMELIMIT_NONE = 0; +const int CSSM_WORDID_SET = 109; -const int CSSM_QUERY_SIZELIMIT_NONE = 0; +const int CSSM_WORDID_SEXPR = 110; -const int CSSM_QUERY_RETURN_DATA = 1; +const int CSSM_WORDID_SHA1 = 111; -const int CSSM_DL_UNKNOWN = 0; +const int CSSM_WORDID_SHA1WITHDSA = 112; -const int CSSM_DL_CUSTOM = 1; +const int CSSM_WORDID_SHA1WITHECDSA = 113; -const int CSSM_DL_LDAP = 2; +const int CSSM_WORDID_SHA1WITHRSA = 114; -const int CSSM_DL_ODBC = 3; +const int CSSM_WORDID_SIGN = 115; -const int CSSM_DL_PKCS11 = 4; +const int CSSM_WORDID_SIGNATURE = 116; -const int CSSM_DL_FFS = 5; +const int CSSM_WORDID_SIGNED_NONCE = 117; -const int CSSM_DL_MEMORY = 6; +const int CSSM_WORDID_SIGNED_SECRET = 118; -const int CSSM_DL_REMOTEDIR = 7; +const int CSSM_WORDID_SPKI = 119; -const int CSSM_DB_DATASTORES_UNKNOWN = -1; +const int CSSM_WORDID_SUBJECT = 120; -const int CSSM_DB_TRANSACTIONAL_MODE = 0; +const int CSSM_WORDID_SUBJECT_INFO = 121; -const int CSSM_DB_FILESYSTEMSCAN_MODE = 1; +const int CSSM_WORDID_TAG = 122; -const int CSSM_BASE_ERROR = -2147418112; +const int CSSM_WORDID_THRESHOLD = 123; -const int CSSM_ERRORCODE_MODULE_EXTENT = 2048; +const int CSSM_WORDID_TIME = 124; -const int CSSM_ERRORCODE_CUSTOM_OFFSET = 1024; +const int CSSM_WORDID_URI = 125; -const int CSSM_ERRORCODE_COMMON_EXTENT = 256; +const int CSSM_WORDID_VERSION = 126; -const int CSSM_CSSM_BASE_ERROR = -2147418112; +const int CSSM_WORDID_X509_ATTRIBUTE = 127; -const int CSSM_CSSM_PRIVATE_ERROR = -2147417088; +const int CSSM_WORDID_X509V1 = 128; -const int CSSM_CSP_BASE_ERROR = -2147416064; +const int CSSM_WORDID_X509V2 = 129; -const int CSSM_CSP_PRIVATE_ERROR = -2147415040; +const int CSSM_WORDID_X509V3 = 130; -const int CSSM_DL_BASE_ERROR = -2147414016; +const int CSSM_WORDID_X9_ATTRIBUTE = 131; -const int CSSM_DL_PRIVATE_ERROR = -2147412992; +const int CSSM_WORDID_VENDOR_START = 65536; -const int CSSM_CL_BASE_ERROR = -2147411968; +const int CSSM_WORDID_VENDOR_END = 2147418112; -const int CSSM_CL_PRIVATE_ERROR = -2147410944; +const int CSSM_LIST_ELEMENT_DATUM = 0; -const int CSSM_TP_BASE_ERROR = -2147409920; +const int CSSM_LIST_ELEMENT_SUBLIST = 1; -const int CSSM_TP_PRIVATE_ERROR = -2147408896; +const int CSSM_LIST_ELEMENT_WORDID = 2; -const int CSSM_KR_BASE_ERROR = -2147407872; +const int CSSM_LIST_TYPE_UNKNOWN = 0; -const int CSSM_KR_PRIVATE_ERROR = -2147406848; +const int CSSM_LIST_TYPE_CUSTOM = 1; -const int CSSM_AC_BASE_ERROR = -2147405824; +const int CSSM_LIST_TYPE_SEXPR = 2; -const int CSSM_AC_PRIVATE_ERROR = -2147404800; +const int CSSM_SAMPLE_TYPE_PASSWORD = 79; -const int CSSM_MDS_BASE_ERROR = -2147414016; +const int CSSM_SAMPLE_TYPE_HASHED_PASSWORD = 43; -const int CSSM_MDS_PRIVATE_ERROR = -2147412992; +const int CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD = 87; -const int CSSMERR_CSSM_INVALID_ADDIN_HANDLE = -2147417855; +const int CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD = 84; -const int CSSMERR_CSSM_NOT_INITIALIZED = -2147417854; +const int CSSM_SAMPLE_TYPE_SIGNED_NONCE = 117; -const int CSSMERR_CSSM_INVALID_HANDLE_USAGE = -2147417853; +const int CSSM_SAMPLE_TYPE_SIGNED_SECRET = 118; -const int CSSMERR_CSSM_PVC_REFERENT_NOT_FOUND = -2147417852; +const int CSSM_SAMPLE_TYPE_BIOMETRIC = 8; -const int CSSMERR_CSSM_FUNCTION_INTEGRITY_FAIL = -2147417851; +const int CSSM_SAMPLE_TYPE_PROTECTED_BIOMETRIC = 86; -const int CSSM_ERRCODE_INTERNAL_ERROR = 1; +const int CSSM_SAMPLE_TYPE_PROMPTED_BIOMETRIC = 83; -const int CSSM_ERRCODE_MEMORY_ERROR = 2; +const int CSSM_SAMPLE_TYPE_THRESHOLD = 123; -const int CSSM_ERRCODE_MDS_ERROR = 3; +const int CSSM_CERT_UNKNOWN = 0; -const int CSSM_ERRCODE_INVALID_POINTER = 4; +const int CSSM_CERT_X_509v1 = 1; -const int CSSM_ERRCODE_INVALID_INPUT_POINTER = 5; +const int CSSM_CERT_X_509v2 = 2; -const int CSSM_ERRCODE_INVALID_OUTPUT_POINTER = 6; +const int CSSM_CERT_X_509v3 = 3; -const int CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED = 7; +const int CSSM_CERT_PGP = 4; -const int CSSM_ERRCODE_SELF_CHECK_FAILED = 8; +const int CSSM_CERT_SPKI = 5; -const int CSSM_ERRCODE_OS_ACCESS_DENIED = 9; +const int CSSM_CERT_SDSIv1 = 6; -const int CSSM_ERRCODE_FUNCTION_FAILED = 10; +const int CSSM_CERT_Intel = 8; -const int CSSM_ERRCODE_MODULE_MANIFEST_VERIFY_FAILED = 11; +const int CSSM_CERT_X_509_ATTRIBUTE = 9; -const int CSSM_ERRCODE_INVALID_GUID = 12; +const int CSSM_CERT_X9_ATTRIBUTE = 10; -const int CSSM_ERRCODE_OPERATION_AUTH_DENIED = 32; +const int CSSM_CERT_TUPLE = 11; -const int CSSM_ERRCODE_OBJECT_USE_AUTH_DENIED = 33; +const int CSSM_CERT_ACL_ENTRY = 12; -const int CSSM_ERRCODE_OBJECT_MANIP_AUTH_DENIED = 34; +const int CSSM_CERT_MULTIPLE = 32766; -const int CSSM_ERRCODE_OBJECT_ACL_NOT_SUPPORTED = 35; +const int CSSM_CERT_LAST = 32767; -const int CSSM_ERRCODE_OBJECT_ACL_REQUIRED = 36; +const int CSSM_CL_CUSTOM_CERT_TYPE = 32768; -const int CSSM_ERRCODE_INVALID_ACCESS_CREDENTIALS = 37; +const int CSSM_CERT_ENCODING_UNKNOWN = 0; -const int CSSM_ERRCODE_INVALID_ACL_BASE_CERTS = 38; +const int CSSM_CERT_ENCODING_CUSTOM = 1; -const int CSSM_ERRCODE_ACL_BASE_CERTS_NOT_SUPPORTED = 39; +const int CSSM_CERT_ENCODING_BER = 2; -const int CSSM_ERRCODE_INVALID_SAMPLE_VALUE = 40; +const int CSSM_CERT_ENCODING_DER = 3; -const int CSSM_ERRCODE_SAMPLE_VALUE_NOT_SUPPORTED = 41; +const int CSSM_CERT_ENCODING_NDR = 4; -const int CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE = 42; +const int CSSM_CERT_ENCODING_SEXPR = 5; -const int CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED = 43; +const int CSSM_CERT_ENCODING_PGP = 6; -const int CSSM_ERRCODE_INVALID_ACL_CHALLENGE_CALLBACK = 44; +const int CSSM_CERT_ENCODING_MULTIPLE = 32766; -const int CSSM_ERRCODE_ACL_CHALLENGE_CALLBACK_FAILED = 45; +const int CSSM_CERT_ENCODING_LAST = 32767; -const int CSSM_ERRCODE_INVALID_ACL_ENTRY_TAG = 46; +const int CSSM_CL_CUSTOM_CERT_ENCODING = 32768; -const int CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND = 47; +const int CSSM_CERT_PARSE_FORMAT_NONE = 0; -const int CSSM_ERRCODE_INVALID_ACL_EDIT_MODE = 48; +const int CSSM_CERT_PARSE_FORMAT_CUSTOM = 1; -const int CSSM_ERRCODE_ACL_CHANGE_FAILED = 49; +const int CSSM_CERT_PARSE_FORMAT_SEXPR = 2; -const int CSSM_ERRCODE_INVALID_NEW_ACL_ENTRY = 50; +const int CSSM_CERT_PARSE_FORMAT_COMPLEX = 3; -const int CSSM_ERRCODE_INVALID_NEW_ACL_OWNER = 51; +const int CSSM_CERT_PARSE_FORMAT_OID_NAMED = 4; -const int CSSM_ERRCODE_ACL_DELETE_FAILED = 52; +const int CSSM_CERT_PARSE_FORMAT_TUPLE = 5; -const int CSSM_ERRCODE_ACL_REPLACE_FAILED = 53; +const int CSSM_CERT_PARSE_FORMAT_MULTIPLE = 32766; -const int CSSM_ERRCODE_ACL_ADD_FAILED = 54; +const int CSSM_CERT_PARSE_FORMAT_LAST = 32767; -const int CSSM_ERRCODE_INVALID_CONTEXT_HANDLE = 64; +const int CSSM_CL_CUSTOM_CERT_PARSE_FORMAT = 32768; -const int CSSM_ERRCODE_INCOMPATIBLE_VERSION = 65; +const int CSSM_CERTGROUP_DATA = 0; -const int CSSM_ERRCODE_INVALID_CERTGROUP_POINTER = 66; +const int CSSM_CERTGROUP_ENCODED_CERT = 1; -const int CSSM_ERRCODE_INVALID_CERT_POINTER = 67; +const int CSSM_CERTGROUP_PARSED_CERT = 2; -const int CSSM_ERRCODE_INVALID_CRL_POINTER = 68; +const int CSSM_CERTGROUP_CERT_PAIR = 3; -const int CSSM_ERRCODE_INVALID_FIELD_POINTER = 69; +const int CSSM_ACL_SUBJECT_TYPE_ANY = 1; -const int CSSM_ERRCODE_INVALID_DATA = 70; +const int CSSM_ACL_SUBJECT_TYPE_THRESHOLD = 123; -const int CSSM_ERRCODE_CRL_ALREADY_SIGNED = 71; +const int CSSM_ACL_SUBJECT_TYPE_PASSWORD = 79; -const int CSSM_ERRCODE_INVALID_NUMBER_OF_FIELDS = 72; +const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD = 87; -const int CSSM_ERRCODE_VERIFICATION_FAILURE = 73; +const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD = 84; -const int CSSM_ERRCODE_INVALID_DB_HANDLE = 74; +const int CSSM_ACL_SUBJECT_TYPE_PUBLIC_KEY = 89; -const int CSSM_ERRCODE_PRIVILEGE_NOT_GRANTED = 75; +const int CSSM_ACL_SUBJECT_TYPE_HASHED_SUBJECT = 44; -const int CSSM_ERRCODE_INVALID_DB_LIST = 76; +const int CSSM_ACL_SUBJECT_TYPE_BIOMETRIC = 8; -const int CSSM_ERRCODE_INVALID_DB_LIST_POINTER = 77; +const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_BIOMETRIC = 86; -const int CSSM_ERRCODE_UNKNOWN_FORMAT = 78; +const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_BIOMETRIC = 83; -const int CSSM_ERRCODE_UNKNOWN_TAG = 79; +const int CSSM_ACL_SUBJECT_TYPE_LOGIN_NAME = 58; -const int CSSM_ERRCODE_INVALID_CSP_HANDLE = 80; +const int CSSM_ACL_SUBJECT_TYPE_EXT_PAM_NAME = 78; -const int CSSM_ERRCODE_INVALID_DL_HANDLE = 81; +const int CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START = 65536; -const int CSSM_ERRCODE_INVALID_CL_HANDLE = 82; +const int CSSM_ACL_AUTHORIZATION_ANY = 1; -const int CSSM_ERRCODE_INVALID_TP_HANDLE = 83; +const int CSSM_ACL_AUTHORIZATION_LOGIN = 57; -const int CSSM_ERRCODE_INVALID_KR_HANDLE = 84; +const int CSSM_ACL_AUTHORIZATION_GENKEY = 41; -const int CSSM_ERRCODE_INVALID_AC_HANDLE = 85; +const int CSSM_ACL_AUTHORIZATION_DELETE = 25; -const int CSSM_ERRCODE_INVALID_PASSTHROUGH_ID = 86; +const int CSSM_ACL_AUTHORIZATION_EXPORT_WRAPPED = 38; -const int CSSM_ERRCODE_INVALID_NETWORK_ADDR = 87; +const int CSSM_ACL_AUTHORIZATION_EXPORT_CLEAR = 37; -const int CSSM_ERRCODE_INVALID_CRYPTO_DATA = 88; +const int CSSM_ACL_AUTHORIZATION_IMPORT_WRAPPED = 48; -const int CSSMERR_CSSM_INTERNAL_ERROR = -2147418111; +const int CSSM_ACL_AUTHORIZATION_IMPORT_CLEAR = 47; -const int CSSMERR_CSSM_MEMORY_ERROR = -2147418110; +const int CSSM_ACL_AUTHORIZATION_SIGN = 115; -const int CSSMERR_CSSM_MDS_ERROR = -2147418109; +const int CSSM_ACL_AUTHORIZATION_ENCRYPT = 35; -const int CSSMERR_CSSM_INVALID_POINTER = -2147418108; +const int CSSM_ACL_AUTHORIZATION_DECRYPT = 24; -const int CSSMERR_CSSM_INVALID_INPUT_POINTER = -2147418107; +const int CSSM_ACL_AUTHORIZATION_MAC = 59; -const int CSSMERR_CSSM_INVALID_OUTPUT_POINTER = -2147418106; +const int CSSM_ACL_AUTHORIZATION_DERIVE = 28; -const int CSSMERR_CSSM_FUNCTION_NOT_IMPLEMENTED = -2147418105; +const int CSSM_ACL_AUTHORIZATION_DBS_CREATE = 22; -const int CSSMERR_CSSM_SELF_CHECK_FAILED = -2147418104; +const int CSSM_ACL_AUTHORIZATION_DBS_DELETE = 23; -const int CSSMERR_CSSM_OS_ACCESS_DENIED = -2147418103; +const int CSSM_ACL_AUTHORIZATION_DB_READ = 21; -const int CSSMERR_CSSM_FUNCTION_FAILED = -2147418102; +const int CSSM_ACL_AUTHORIZATION_DB_INSERT = 19; -const int CSSMERR_CSSM_MODULE_MANIFEST_VERIFY_FAILED = -2147418101; +const int CSSM_ACL_AUTHORIZATION_DB_MODIFY = 20; -const int CSSMERR_CSSM_INVALID_GUID = -2147418100; +const int CSSM_ACL_AUTHORIZATION_DB_DELETE = 17; -const int CSSMERR_CSSM_INVALID_CONTEXT_HANDLE = -2147418048; +const int CSSM_ACL_EDIT_MODE_ADD = 1; -const int CSSMERR_CSSM_INCOMPATIBLE_VERSION = -2147418047; +const int CSSM_ACL_EDIT_MODE_DELETE = 2; -const int CSSMERR_CSSM_PRIVILEGE_NOT_GRANTED = -2147418037; +const int CSSM_ACL_EDIT_MODE_REPLACE = 3; -const int CSSM_CSSM_BASE_CSSM_ERROR = -2147417840; +const int CSSM_KEYHEADER_VERSION = 2; -const int CSSMERR_CSSM_SCOPE_NOT_SUPPORTED = -2147417839; +const int CSSM_KEYBLOB_RAW = 0; -const int CSSMERR_CSSM_PVC_ALREADY_CONFIGURED = -2147417838; +const int CSSM_KEYBLOB_REFERENCE = 2; -const int CSSMERR_CSSM_INVALID_PVC = -2147417837; +const int CSSM_KEYBLOB_WRAPPED = 3; -const int CSSMERR_CSSM_EMM_LOAD_FAILED = -2147417836; +const int CSSM_KEYBLOB_OTHER = -1; -const int CSSMERR_CSSM_EMM_UNLOAD_FAILED = -2147417835; +const int CSSM_KEYBLOB_RAW_FORMAT_NONE = 0; -const int CSSMERR_CSSM_ADDIN_LOAD_FAILED = -2147417834; +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS1 = 1; -const int CSSMERR_CSSM_INVALID_KEY_HIERARCHY = -2147417833; +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS3 = 2; -const int CSSMERR_CSSM_ADDIN_UNLOAD_FAILED = -2147417832; +const int CSSM_KEYBLOB_RAW_FORMAT_MSCAPI = 3; -const int CSSMERR_CSSM_LIB_REF_NOT_FOUND = -2147417831; +const int CSSM_KEYBLOB_RAW_FORMAT_PGP = 4; -const int CSSMERR_CSSM_INVALID_ADDIN_FUNCTION_TABLE = -2147417830; +const int CSSM_KEYBLOB_RAW_FORMAT_FIPS186 = 5; -const int CSSMERR_CSSM_EMM_AUTHENTICATE_FAILED = -2147417829; +const int CSSM_KEYBLOB_RAW_FORMAT_BSAFE = 6; -const int CSSMERR_CSSM_ADDIN_AUTHENTICATE_FAILED = -2147417828; +const int CSSM_KEYBLOB_RAW_FORMAT_CCA = 9; -const int CSSMERR_CSSM_INVALID_SERVICE_MASK = -2147417827; +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS8 = 10; -const int CSSMERR_CSSM_MODULE_NOT_LOADED = -2147417826; +const int CSSM_KEYBLOB_RAW_FORMAT_SPKI = 11; -const int CSSMERR_CSSM_INVALID_SUBSERVICEID = -2147417825; +const int CSSM_KEYBLOB_RAW_FORMAT_OCTET_STRING = 12; -const int CSSMERR_CSSM_BUFFER_TOO_SMALL = -2147417824; +const int CSSM_KEYBLOB_RAW_FORMAT_OTHER = -1; -const int CSSMERR_CSSM_INVALID_ATTRIBUTE = -2147417823; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_NONE = 0; -const int CSSMERR_CSSM_ATTRIBUTE_NOT_IN_CONTEXT = -2147417822; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS8 = 1; -const int CSSMERR_CSSM_MODULE_MANAGER_INITIALIZE_FAIL = -2147417821; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS7 = 2; -const int CSSMERR_CSSM_MODULE_MANAGER_NOT_FOUND = -2147417820; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_MSCAPI = 3; -const int CSSMERR_CSSM_EVENT_NOTIFICATION_CALLBACK_NOT_FOUND = -2147417819; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OTHER = -1; -const int CSSMERR_CSP_INTERNAL_ERROR = -2147416063; +const int CSSM_KEYBLOB_REF_FORMAT_INTEGER = 0; -const int CSSMERR_CSP_MEMORY_ERROR = -2147416062; +const int CSSM_KEYBLOB_REF_FORMAT_STRING = 1; -const int CSSMERR_CSP_MDS_ERROR = -2147416061; +const int CSSM_KEYBLOB_REF_FORMAT_SPKI = 2; -const int CSSMERR_CSP_INVALID_POINTER = -2147416060; +const int CSSM_KEYBLOB_REF_FORMAT_OTHER = -1; -const int CSSMERR_CSP_INVALID_INPUT_POINTER = -2147416059; +const int CSSM_KEYCLASS_PUBLIC_KEY = 0; -const int CSSMERR_CSP_INVALID_OUTPUT_POINTER = -2147416058; +const int CSSM_KEYCLASS_PRIVATE_KEY = 1; -const int CSSMERR_CSP_FUNCTION_NOT_IMPLEMENTED = -2147416057; +const int CSSM_KEYCLASS_SESSION_KEY = 2; -const int CSSMERR_CSP_SELF_CHECK_FAILED = -2147416056; +const int CSSM_KEYCLASS_SECRET_PART = 3; -const int CSSMERR_CSP_OS_ACCESS_DENIED = -2147416055; +const int CSSM_KEYCLASS_OTHER = -1; -const int CSSMERR_CSP_FUNCTION_FAILED = -2147416054; +const int CSSM_KEYATTR_RETURN_DEFAULT = 0; -const int CSSMERR_CSP_OPERATION_AUTH_DENIED = -2147416032; +const int CSSM_KEYATTR_RETURN_DATA = 268435456; -const int CSSMERR_CSP_OBJECT_USE_AUTH_DENIED = -2147416031; +const int CSSM_KEYATTR_RETURN_REF = 536870912; -const int CSSMERR_CSP_OBJECT_MANIP_AUTH_DENIED = -2147416030; +const int CSSM_KEYATTR_RETURN_NONE = 1073741824; -const int CSSMERR_CSP_OBJECT_ACL_NOT_SUPPORTED = -2147416029; +const int CSSM_KEYATTR_PERMANENT = 1; -const int CSSMERR_CSP_OBJECT_ACL_REQUIRED = -2147416028; +const int CSSM_KEYATTR_PRIVATE = 2; -const int CSSMERR_CSP_INVALID_ACCESS_CREDENTIALS = -2147416027; +const int CSSM_KEYATTR_MODIFIABLE = 4; -const int CSSMERR_CSP_INVALID_ACL_BASE_CERTS = -2147416026; +const int CSSM_KEYATTR_SENSITIVE = 8; -const int CSSMERR_CSP_ACL_BASE_CERTS_NOT_SUPPORTED = -2147416025; +const int CSSM_KEYATTR_EXTRACTABLE = 32; -const int CSSMERR_CSP_INVALID_SAMPLE_VALUE = -2147416024; +const int CSSM_KEYATTR_ALWAYS_SENSITIVE = 16; -const int CSSMERR_CSP_SAMPLE_VALUE_NOT_SUPPORTED = -2147416023; +const int CSSM_KEYATTR_NEVER_EXTRACTABLE = 64; -const int CSSMERR_CSP_INVALID_ACL_SUBJECT_VALUE = -2147416022; +const int CSSM_KEYUSE_ANY = -2147483648; -const int CSSMERR_CSP_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147416021; +const int CSSM_KEYUSE_ENCRYPT = 1; -const int CSSMERR_CSP_INVALID_ACL_CHALLENGE_CALLBACK = -2147416020; +const int CSSM_KEYUSE_DECRYPT = 2; -const int CSSMERR_CSP_ACL_CHALLENGE_CALLBACK_FAILED = -2147416019; +const int CSSM_KEYUSE_SIGN = 4; -const int CSSMERR_CSP_INVALID_ACL_ENTRY_TAG = -2147416018; +const int CSSM_KEYUSE_VERIFY = 8; -const int CSSMERR_CSP_ACL_ENTRY_TAG_NOT_FOUND = -2147416017; +const int CSSM_KEYUSE_SIGN_RECOVER = 16; -const int CSSMERR_CSP_INVALID_ACL_EDIT_MODE = -2147416016; +const int CSSM_KEYUSE_VERIFY_RECOVER = 32; -const int CSSMERR_CSP_ACL_CHANGE_FAILED = -2147416015; +const int CSSM_KEYUSE_WRAP = 64; -const int CSSMERR_CSP_INVALID_NEW_ACL_ENTRY = -2147416014; +const int CSSM_KEYUSE_UNWRAP = 128; -const int CSSMERR_CSP_INVALID_NEW_ACL_OWNER = -2147416013; +const int CSSM_KEYUSE_DERIVE = 256; -const int CSSMERR_CSP_ACL_DELETE_FAILED = -2147416012; +const int CSSM_ALGID_NONE = 0; -const int CSSMERR_CSP_ACL_REPLACE_FAILED = -2147416011; +const int CSSM_ALGID_CUSTOM = 1; -const int CSSMERR_CSP_ACL_ADD_FAILED = -2147416010; +const int CSSM_ALGID_DH = 2; -const int CSSMERR_CSP_INVALID_CONTEXT_HANDLE = -2147416000; +const int CSSM_ALGID_PH = 3; -const int CSSMERR_CSP_PRIVILEGE_NOT_GRANTED = -2147415989; +const int CSSM_ALGID_KEA = 4; -const int CSSMERR_CSP_INVALID_DATA = -2147415994; +const int CSSM_ALGID_MD2 = 5; -const int CSSMERR_CSP_INVALID_PASSTHROUGH_ID = -2147415978; +const int CSSM_ALGID_MD4 = 6; -const int CSSMERR_CSP_INVALID_CRYPTO_DATA = -2147415976; +const int CSSM_ALGID_MD5 = 7; -const int CSSM_CSP_BASE_CSP_ERROR = -2147415808; +const int CSSM_ALGID_SHA1 = 8; -const int CSSMERR_CSP_INPUT_LENGTH_ERROR = -2147415807; +const int CSSM_ALGID_NHASH = 9; -const int CSSMERR_CSP_OUTPUT_LENGTH_ERROR = -2147415806; +const int CSSM_ALGID_HAVAL = 10; -const int CSSMERR_CSP_PRIVILEGE_NOT_SUPPORTED = -2147415805; +const int CSSM_ALGID_RIPEMD = 11; -const int CSSMERR_CSP_DEVICE_ERROR = -2147415804; +const int CSSM_ALGID_IBCHASH = 12; -const int CSSMERR_CSP_DEVICE_MEMORY_ERROR = -2147415803; +const int CSSM_ALGID_RIPEMAC = 13; -const int CSSMERR_CSP_ATTACH_HANDLE_BUSY = -2147415802; +const int CSSM_ALGID_DES = 14; -const int CSSMERR_CSP_NOT_LOGGED_IN = -2147415801; +const int CSSM_ALGID_DESX = 15; -const int CSSMERR_CSP_INVALID_KEY = -2147415792; +const int CSSM_ALGID_RDES = 16; -const int CSSMERR_CSP_INVALID_KEY_REFERENCE = -2147415791; +const int CSSM_ALGID_3DES_3KEY_EDE = 17; -const int CSSMERR_CSP_INVALID_KEY_CLASS = -2147415790; +const int CSSM_ALGID_3DES_2KEY_EDE = 18; -const int CSSMERR_CSP_ALGID_MISMATCH = -2147415789; +const int CSSM_ALGID_3DES_1KEY_EEE = 19; -const int CSSMERR_CSP_KEY_USAGE_INCORRECT = -2147415788; +const int CSSM_ALGID_3DES_3KEY = 17; -const int CSSMERR_CSP_KEY_BLOB_TYPE_INCORRECT = -2147415787; +const int CSSM_ALGID_3DES_3KEY_EEE = 20; -const int CSSMERR_CSP_KEY_HEADER_INCONSISTENT = -2147415786; +const int CSSM_ALGID_3DES_2KEY = 18; -const int CSSMERR_CSP_UNSUPPORTED_KEY_FORMAT = -2147415785; +const int CSSM_ALGID_3DES_2KEY_EEE = 21; -const int CSSMERR_CSP_UNSUPPORTED_KEY_SIZE = -2147415784; +const int CSSM_ALGID_3DES_1KEY = 20; -const int CSSMERR_CSP_INVALID_KEY_POINTER = -2147415783; +const int CSSM_ALGID_IDEA = 22; -const int CSSMERR_CSP_INVALID_KEYUSAGE_MASK = -2147415782; +const int CSSM_ALGID_RC2 = 23; -const int CSSMERR_CSP_UNSUPPORTED_KEYUSAGE_MASK = -2147415781; +const int CSSM_ALGID_RC5 = 24; -const int CSSMERR_CSP_INVALID_KEYATTR_MASK = -2147415780; +const int CSSM_ALGID_RC4 = 25; -const int CSSMERR_CSP_UNSUPPORTED_KEYATTR_MASK = -2147415779; +const int CSSM_ALGID_SEAL = 26; -const int CSSMERR_CSP_INVALID_KEY_LABEL = -2147415778; +const int CSSM_ALGID_CAST = 27; -const int CSSMERR_CSP_UNSUPPORTED_KEY_LABEL = -2147415777; +const int CSSM_ALGID_BLOWFISH = 28; -const int CSSMERR_CSP_INVALID_KEY_FORMAT = -2147415776; +const int CSSM_ALGID_SKIPJACK = 29; -const int CSSMERR_CSP_INVALID_DATA_COUNT = -2147415768; +const int CSSM_ALGID_LUCIFER = 30; -const int CSSMERR_CSP_VECTOR_OF_BUFS_UNSUPPORTED = -2147415767; +const int CSSM_ALGID_MADRYGA = 31; -const int CSSMERR_CSP_INVALID_INPUT_VECTOR = -2147415766; +const int CSSM_ALGID_FEAL = 32; -const int CSSMERR_CSP_INVALID_OUTPUT_VECTOR = -2147415765; +const int CSSM_ALGID_REDOC = 33; -const int CSSMERR_CSP_INVALID_CONTEXT = -2147415760; +const int CSSM_ALGID_REDOC3 = 34; -const int CSSMERR_CSP_INVALID_ALGORITHM = -2147415759; +const int CSSM_ALGID_LOKI = 35; -const int CSSMERR_CSP_INVALID_ATTR_KEY = -2147415754; +const int CSSM_ALGID_KHUFU = 36; -const int CSSMERR_CSP_MISSING_ATTR_KEY = -2147415753; +const int CSSM_ALGID_KHAFRE = 37; -const int CSSMERR_CSP_INVALID_ATTR_INIT_VECTOR = -2147415752; +const int CSSM_ALGID_MMB = 38; -const int CSSMERR_CSP_MISSING_ATTR_INIT_VECTOR = -2147415751; +const int CSSM_ALGID_GOST = 39; -const int CSSMERR_CSP_INVALID_ATTR_SALT = -2147415750; +const int CSSM_ALGID_SAFER = 40; -const int CSSMERR_CSP_MISSING_ATTR_SALT = -2147415749; +const int CSSM_ALGID_CRAB = 41; -const int CSSMERR_CSP_INVALID_ATTR_PADDING = -2147415748; +const int CSSM_ALGID_RSA = 42; -const int CSSMERR_CSP_MISSING_ATTR_PADDING = -2147415747; +const int CSSM_ALGID_DSA = 43; -const int CSSMERR_CSP_INVALID_ATTR_RANDOM = -2147415746; +const int CSSM_ALGID_MD5WithRSA = 44; -const int CSSMERR_CSP_MISSING_ATTR_RANDOM = -2147415745; +const int CSSM_ALGID_MD2WithRSA = 45; -const int CSSMERR_CSP_INVALID_ATTR_SEED = -2147415744; +const int CSSM_ALGID_ElGamal = 46; -const int CSSMERR_CSP_MISSING_ATTR_SEED = -2147415743; +const int CSSM_ALGID_MD2Random = 47; -const int CSSMERR_CSP_INVALID_ATTR_PASSPHRASE = -2147415742; +const int CSSM_ALGID_MD5Random = 48; -const int CSSMERR_CSP_MISSING_ATTR_PASSPHRASE = -2147415741; +const int CSSM_ALGID_SHARandom = 49; -const int CSSMERR_CSP_INVALID_ATTR_KEY_LENGTH = -2147415740; +const int CSSM_ALGID_DESRandom = 50; -const int CSSMERR_CSP_MISSING_ATTR_KEY_LENGTH = -2147415739; +const int CSSM_ALGID_SHA1WithRSA = 51; -const int CSSMERR_CSP_INVALID_ATTR_BLOCK_SIZE = -2147415738; +const int CSSM_ALGID_CDMF = 52; -const int CSSMERR_CSP_MISSING_ATTR_BLOCK_SIZE = -2147415737; +const int CSSM_ALGID_CAST3 = 53; -const int CSSMERR_CSP_INVALID_ATTR_OUTPUT_SIZE = -2147415708; +const int CSSM_ALGID_CAST5 = 54; -const int CSSMERR_CSP_MISSING_ATTR_OUTPUT_SIZE = -2147415707; +const int CSSM_ALGID_GenericSecret = 55; -const int CSSMERR_CSP_INVALID_ATTR_ROUNDS = -2147415706; +const int CSSM_ALGID_ConcatBaseAndKey = 56; -const int CSSMERR_CSP_MISSING_ATTR_ROUNDS = -2147415705; +const int CSSM_ALGID_ConcatKeyAndBase = 57; -const int CSSMERR_CSP_INVALID_ATTR_ALG_PARAMS = -2147415704; +const int CSSM_ALGID_ConcatBaseAndData = 58; -const int CSSMERR_CSP_MISSING_ATTR_ALG_PARAMS = -2147415703; +const int CSSM_ALGID_ConcatDataAndBase = 59; -const int CSSMERR_CSP_INVALID_ATTR_LABEL = -2147415702; +const int CSSM_ALGID_XORBaseAndData = 60; -const int CSSMERR_CSP_MISSING_ATTR_LABEL = -2147415701; +const int CSSM_ALGID_ExtractFromKey = 61; -const int CSSMERR_CSP_INVALID_ATTR_KEY_TYPE = -2147415700; +const int CSSM_ALGID_SSL3PrePrimaryGen = 62; -const int CSSMERR_CSP_MISSING_ATTR_KEY_TYPE = -2147415699; +const int CSSM_ALGID_SSL3PreMasterGen = 62; -const int CSSMERR_CSP_INVALID_ATTR_MODE = -2147415698; +const int CSSM_ALGID_SSL3PrimaryDerive = 63; -const int CSSMERR_CSP_MISSING_ATTR_MODE = -2147415697; +const int CSSM_ALGID_SSL3MasterDerive = 63; -const int CSSMERR_CSP_INVALID_ATTR_EFFECTIVE_BITS = -2147415696; +const int CSSM_ALGID_SSL3KeyAndMacDerive = 64; -const int CSSMERR_CSP_MISSING_ATTR_EFFECTIVE_BITS = -2147415695; +const int CSSM_ALGID_SSL3MD5_MAC = 65; -const int CSSMERR_CSP_INVALID_ATTR_START_DATE = -2147415694; +const int CSSM_ALGID_SSL3SHA1_MAC = 66; -const int CSSMERR_CSP_MISSING_ATTR_START_DATE = -2147415693; +const int CSSM_ALGID_PKCS5_PBKDF1_MD5 = 67; -const int CSSMERR_CSP_INVALID_ATTR_END_DATE = -2147415692; +const int CSSM_ALGID_PKCS5_PBKDF1_MD2 = 68; -const int CSSMERR_CSP_MISSING_ATTR_END_DATE = -2147415691; +const int CSSM_ALGID_PKCS5_PBKDF1_SHA1 = 69; -const int CSSMERR_CSP_INVALID_ATTR_VERSION = -2147415690; +const int CSSM_ALGID_WrapLynks = 70; -const int CSSMERR_CSP_MISSING_ATTR_VERSION = -2147415689; +const int CSSM_ALGID_WrapSET_OAEP = 71; -const int CSSMERR_CSP_INVALID_ATTR_PRIME = -2147415688; +const int CSSM_ALGID_BATON = 72; -const int CSSMERR_CSP_MISSING_ATTR_PRIME = -2147415687; +const int CSSM_ALGID_ECDSA = 73; -const int CSSMERR_CSP_INVALID_ATTR_BASE = -2147415686; +const int CSSM_ALGID_MAYFLY = 74; -const int CSSMERR_CSP_MISSING_ATTR_BASE = -2147415685; +const int CSSM_ALGID_JUNIPER = 75; -const int CSSMERR_CSP_INVALID_ATTR_SUBPRIME = -2147415684; +const int CSSM_ALGID_FASTHASH = 76; -const int CSSMERR_CSP_MISSING_ATTR_SUBPRIME = -2147415683; +const int CSSM_ALGID_3DES = 77; -const int CSSMERR_CSP_INVALID_ATTR_ITERATION_COUNT = -2147415682; +const int CSSM_ALGID_SSL3MD5 = 78; -const int CSSMERR_CSP_MISSING_ATTR_ITERATION_COUNT = -2147415681; +const int CSSM_ALGID_SSL3SHA1 = 79; -const int CSSMERR_CSP_INVALID_ATTR_DL_DB_HANDLE = -2147415680; +const int CSSM_ALGID_FortezzaTimestamp = 80; -const int CSSMERR_CSP_MISSING_ATTR_DL_DB_HANDLE = -2147415679; +const int CSSM_ALGID_SHA1WithDSA = 81; -const int CSSMERR_CSP_INVALID_ATTR_ACCESS_CREDENTIALS = -2147415678; +const int CSSM_ALGID_SHA1WithECDSA = 82; -const int CSSMERR_CSP_MISSING_ATTR_ACCESS_CREDENTIALS = -2147415677; +const int CSSM_ALGID_DSA_BSAFE = 83; -const int CSSMERR_CSP_INVALID_ATTR_PUBLIC_KEY_FORMAT = -2147415676; +const int CSSM_ALGID_ECDH = 84; -const int CSSMERR_CSP_MISSING_ATTR_PUBLIC_KEY_FORMAT = -2147415675; +const int CSSM_ALGID_ECMQV = 85; -const int CSSMERR_CSP_INVALID_ATTR_PRIVATE_KEY_FORMAT = -2147415674; +const int CSSM_ALGID_PKCS12_SHA1_PBE = 86; -const int CSSMERR_CSP_MISSING_ATTR_PRIVATE_KEY_FORMAT = -2147415673; +const int CSSM_ALGID_ECNRA = 87; -const int CSSMERR_CSP_INVALID_ATTR_SYMMETRIC_KEY_FORMAT = -2147415672; +const int CSSM_ALGID_SHA1WithECNRA = 88; -const int CSSMERR_CSP_MISSING_ATTR_SYMMETRIC_KEY_FORMAT = -2147415671; +const int CSSM_ALGID_ECES = 89; -const int CSSMERR_CSP_INVALID_ATTR_WRAPPED_KEY_FORMAT = -2147415670; +const int CSSM_ALGID_ECAES = 90; -const int CSSMERR_CSP_MISSING_ATTR_WRAPPED_KEY_FORMAT = -2147415669; +const int CSSM_ALGID_SHA1HMAC = 91; -const int CSSMERR_CSP_STAGED_OPERATION_IN_PROGRESS = -2147415736; +const int CSSM_ALGID_FIPS186Random = 92; -const int CSSMERR_CSP_STAGED_OPERATION_NOT_STARTED = -2147415735; +const int CSSM_ALGID_ECC = 93; -const int CSSMERR_CSP_VERIFY_FAILED = -2147415734; +const int CSSM_ALGID_MQV = 94; -const int CSSMERR_CSP_INVALID_SIGNATURE = -2147415733; +const int CSSM_ALGID_NRA = 95; -const int CSSMERR_CSP_QUERY_SIZE_UNKNOWN = -2147415732; +const int CSSM_ALGID_IntelPlatformRandom = 96; -const int CSSMERR_CSP_BLOCK_SIZE_MISMATCH = -2147415731; +const int CSSM_ALGID_UTC = 97; -const int CSSMERR_CSP_PRIVATE_KEY_NOT_FOUND = -2147415730; +const int CSSM_ALGID_HAVAL3 = 98; -const int CSSMERR_CSP_PUBLIC_KEY_INCONSISTENT = -2147415729; +const int CSSM_ALGID_HAVAL4 = 99; -const int CSSMERR_CSP_DEVICE_VERIFY_FAILED = -2147415728; +const int CSSM_ALGID_HAVAL5 = 100; -const int CSSMERR_CSP_INVALID_LOGIN_NAME = -2147415727; +const int CSSM_ALGID_TIGER = 101; -const int CSSMERR_CSP_ALREADY_LOGGED_IN = -2147415726; +const int CSSM_ALGID_MD5HMAC = 102; -const int CSSMERR_CSP_PRIVATE_KEY_ALREADY_EXISTS = -2147415725; +const int CSSM_ALGID_PKCS5_PBKDF2 = 103; -const int CSSMERR_CSP_KEY_LABEL_ALREADY_EXISTS = -2147415724; +const int CSSM_ALGID_RUNNING_COUNTER = 104; -const int CSSMERR_CSP_INVALID_DIGEST_ALGORITHM = -2147415723; +const int CSSM_ALGID_LAST = 2147483647; -const int CSSMERR_CSP_CRYPTO_DATA_CALLBACK_FAILED = -2147415722; +const int CSSM_ALGID_VENDOR_DEFINED = -2147483648; -const int CSSMERR_TP_INTERNAL_ERROR = -2147409919; +const int CSSM_ALGMODE_NONE = 0; -const int CSSMERR_TP_MEMORY_ERROR = -2147409918; +const int CSSM_ALGMODE_CUSTOM = 1; -const int CSSMERR_TP_MDS_ERROR = -2147409917; +const int CSSM_ALGMODE_ECB = 2; -const int CSSMERR_TP_INVALID_POINTER = -2147409916; +const int CSSM_ALGMODE_ECBPad = 3; -const int CSSMERR_TP_INVALID_INPUT_POINTER = -2147409915; +const int CSSM_ALGMODE_CBC = 4; -const int CSSMERR_TP_INVALID_OUTPUT_POINTER = -2147409914; +const int CSSM_ALGMODE_CBC_IV8 = 5; -const int CSSMERR_TP_FUNCTION_NOT_IMPLEMENTED = -2147409913; +const int CSSM_ALGMODE_CBCPadIV8 = 6; -const int CSSMERR_TP_SELF_CHECK_FAILED = -2147409912; +const int CSSM_ALGMODE_CFB = 7; -const int CSSMERR_TP_OS_ACCESS_DENIED = -2147409911; +const int CSSM_ALGMODE_CFB_IV8 = 8; -const int CSSMERR_TP_FUNCTION_FAILED = -2147409910; +const int CSSM_ALGMODE_CFBPadIV8 = 9; -const int CSSMERR_TP_INVALID_CONTEXT_HANDLE = -2147409856; +const int CSSM_ALGMODE_OFB = 10; -const int CSSMERR_TP_INVALID_DATA = -2147409850; +const int CSSM_ALGMODE_OFB_IV8 = 11; -const int CSSMERR_TP_INVALID_DB_LIST = -2147409844; +const int CSSM_ALGMODE_OFBPadIV8 = 12; -const int CSSMERR_TP_INVALID_CERTGROUP_POINTER = -2147409854; +const int CSSM_ALGMODE_COUNTER = 13; -const int CSSMERR_TP_INVALID_CERT_POINTER = -2147409853; +const int CSSM_ALGMODE_BC = 14; -const int CSSMERR_TP_INVALID_CRL_POINTER = -2147409852; +const int CSSM_ALGMODE_PCBC = 15; -const int CSSMERR_TP_INVALID_FIELD_POINTER = -2147409851; +const int CSSM_ALGMODE_CBCC = 16; -const int CSSMERR_TP_INVALID_NETWORK_ADDR = -2147409833; +const int CSSM_ALGMODE_OFBNLF = 17; -const int CSSMERR_TP_CRL_ALREADY_SIGNED = -2147409849; +const int CSSM_ALGMODE_PBC = 18; -const int CSSMERR_TP_INVALID_NUMBER_OF_FIELDS = -2147409848; +const int CSSM_ALGMODE_PFB = 19; -const int CSSMERR_TP_VERIFICATION_FAILURE = -2147409847; +const int CSSM_ALGMODE_CBCPD = 20; -const int CSSMERR_TP_INVALID_DB_HANDLE = -2147409846; +const int CSSM_ALGMODE_PUBLIC_KEY = 21; -const int CSSMERR_TP_UNKNOWN_FORMAT = -2147409842; +const int CSSM_ALGMODE_PRIVATE_KEY = 22; -const int CSSMERR_TP_UNKNOWN_TAG = -2147409841; +const int CSSM_ALGMODE_SHUFFLE = 23; -const int CSSMERR_TP_INVALID_PASSTHROUGH_ID = -2147409834; +const int CSSM_ALGMODE_ECB64 = 24; -const int CSSMERR_TP_INVALID_CSP_HANDLE = -2147409840; +const int CSSM_ALGMODE_CBC64 = 25; -const int CSSMERR_TP_INVALID_DL_HANDLE = -2147409839; +const int CSSM_ALGMODE_OFB64 = 26; -const int CSSMERR_TP_INVALID_CL_HANDLE = -2147409838; +const int CSSM_ALGMODE_CFB32 = 28; -const int CSSMERR_TP_INVALID_DB_LIST_POINTER = -2147409843; +const int CSSM_ALGMODE_CFB16 = 29; -const int CSSM_TP_BASE_TP_ERROR = -2147409664; +const int CSSM_ALGMODE_CFB8 = 30; -const int CSSMERR_TP_INVALID_CALLERAUTH_CONTEXT_POINTER = -2147409663; +const int CSSM_ALGMODE_WRAP = 31; -const int CSSMERR_TP_INVALID_IDENTIFIER_POINTER = -2147409662; +const int CSSM_ALGMODE_PRIVATE_WRAP = 32; -const int CSSMERR_TP_INVALID_KEYCACHE_HANDLE = -2147409661; +const int CSSM_ALGMODE_RELAYX = 33; -const int CSSMERR_TP_INVALID_CERTGROUP = -2147409660; +const int CSSM_ALGMODE_ECB128 = 34; -const int CSSMERR_TP_INVALID_CRLGROUP = -2147409659; +const int CSSM_ALGMODE_ECB96 = 35; -const int CSSMERR_TP_INVALID_CRLGROUP_POINTER = -2147409658; +const int CSSM_ALGMODE_CBC128 = 36; -const int CSSMERR_TP_AUTHENTICATION_FAILED = -2147409657; +const int CSSM_ALGMODE_OAEP_HASH = 37; -const int CSSMERR_TP_CERTGROUP_INCOMPLETE = -2147409656; +const int CSSM_ALGMODE_PKCS1_EME_V15 = 38; -const int CSSMERR_TP_CERTIFICATE_CANT_OPERATE = -2147409655; +const int CSSM_ALGMODE_PKCS1_EME_OAEP = 39; -const int CSSMERR_TP_CERT_EXPIRED = -2147409654; +const int CSSM_ALGMODE_PKCS1_EMSA_V15 = 40; -const int CSSMERR_TP_CERT_NOT_VALID_YET = -2147409653; +const int CSSM_ALGMODE_ISO_9796 = 41; -const int CSSMERR_TP_CERT_REVOKED = -2147409652; +const int CSSM_ALGMODE_X9_31 = 42; -const int CSSMERR_TP_CERT_SUSPENDED = -2147409651; +const int CSSM_ALGMODE_LAST = 2147483647; -const int CSSMERR_TP_INSUFFICIENT_CREDENTIALS = -2147409650; +const int CSSM_ALGMODE_VENDOR_DEFINED = -2147483648; -const int CSSMERR_TP_INVALID_ACTION = -2147409649; +const int CSSM_CSP_SOFTWARE = 1; -const int CSSMERR_TP_INVALID_ACTION_DATA = -2147409648; +const int CSSM_CSP_HARDWARE = 2; -const int CSSMERR_TP_INVALID_ANCHOR_CERT = -2147409646; +const int CSSM_CSP_HYBRID = 3; -const int CSSMERR_TP_INVALID_AUTHORITY = -2147409645; +const int CSSM_ALGCLASS_NONE = 0; -const int CSSMERR_TP_VERIFY_ACTION_FAILED = -2147409644; +const int CSSM_ALGCLASS_CUSTOM = 1; -const int CSSMERR_TP_INVALID_CERTIFICATE = -2147409643; +const int CSSM_ALGCLASS_SIGNATURE = 2; -const int CSSMERR_TP_INVALID_CERT_AUTHORITY = -2147409642; +const int CSSM_ALGCLASS_SYMMETRIC = 3; -const int CSSMERR_TP_INVALID_CRL_AUTHORITY = -2147409641; +const int CSSM_ALGCLASS_DIGEST = 4; -const int CSSMERR_TP_INVALID_CRL_ENCODING = -2147409640; +const int CSSM_ALGCLASS_RANDOMGEN = 5; -const int CSSMERR_TP_INVALID_CRL_TYPE = -2147409639; +const int CSSM_ALGCLASS_UNIQUEGEN = 6; -const int CSSMERR_TP_INVALID_CRL = -2147409638; +const int CSSM_ALGCLASS_MAC = 7; -const int CSSMERR_TP_INVALID_FORM_TYPE = -2147409637; +const int CSSM_ALGCLASS_ASYMMETRIC = 8; -const int CSSMERR_TP_INVALID_ID = -2147409636; +const int CSSM_ALGCLASS_KEYGEN = 9; -const int CSSMERR_TP_INVALID_IDENTIFIER = -2147409635; +const int CSSM_ALGCLASS_DERIVEKEY = 10; -const int CSSMERR_TP_INVALID_INDEX = -2147409634; +const int CSSM_ATTRIBUTE_DATA_NONE = 0; -const int CSSMERR_TP_INVALID_NAME = -2147409633; +const int CSSM_ATTRIBUTE_DATA_UINT32 = 268435456; -const int CSSMERR_TP_INVALID_POLICY_IDENTIFIERS = -2147409632; +const int CSSM_ATTRIBUTE_DATA_CSSM_DATA = 536870912; -const int CSSMERR_TP_INVALID_TIMESTRING = -2147409631; +const int CSSM_ATTRIBUTE_DATA_CRYPTO_DATA = 805306368; -const int CSSMERR_TP_INVALID_REASON = -2147409630; +const int CSSM_ATTRIBUTE_DATA_KEY = 1073741824; -const int CSSMERR_TP_INVALID_REQUEST_INPUTS = -2147409629; +const int CSSM_ATTRIBUTE_DATA_STRING = 1342177280; -const int CSSMERR_TP_INVALID_RESPONSE_VECTOR = -2147409628; +const int CSSM_ATTRIBUTE_DATA_DATE = 1610612736; -const int CSSMERR_TP_INVALID_SIGNATURE = -2147409627; +const int CSSM_ATTRIBUTE_DATA_RANGE = 1879048192; -const int CSSMERR_TP_INVALID_STOP_ON_POLICY = -2147409626; +const int CSSM_ATTRIBUTE_DATA_ACCESS_CREDENTIALS = -2147483648; -const int CSSMERR_TP_INVALID_CALLBACK = -2147409625; +const int CSSM_ATTRIBUTE_DATA_VERSION = 16777216; -const int CSSMERR_TP_INVALID_TUPLE = -2147409624; +const int CSSM_ATTRIBUTE_DATA_DL_DB_HANDLE = 33554432; -const int CSSMERR_TP_NOT_SIGNER = -2147409623; +const int CSSM_ATTRIBUTE_DATA_KR_PROFILE = 50331648; -const int CSSMERR_TP_NOT_TRUSTED = -2147409622; +const int CSSM_ATTRIBUTE_TYPE_MASK = -16777216; -const int CSSMERR_TP_NO_DEFAULT_AUTHORITY = -2147409621; +const int CSSM_ATTRIBUTE_NONE = 0; -const int CSSMERR_TP_REJECTED_FORM = -2147409620; +const int CSSM_ATTRIBUTE_CUSTOM = 536870913; -const int CSSMERR_TP_REQUEST_LOST = -2147409619; +const int CSSM_ATTRIBUTE_DESCRIPTION = 1342177282; -const int CSSMERR_TP_REQUEST_REJECTED = -2147409618; +const int CSSM_ATTRIBUTE_KEY = 1073741827; -const int CSSMERR_TP_UNSUPPORTED_ADDR_TYPE = -2147409617; +const int CSSM_ATTRIBUTE_INIT_VECTOR = 536870916; -const int CSSMERR_TP_UNSUPPORTED_SERVICE = -2147409616; +const int CSSM_ATTRIBUTE_SALT = 536870917; -const int CSSMERR_TP_INVALID_TUPLEGROUP_POINTER = -2147409615; +const int CSSM_ATTRIBUTE_PADDING = 268435462; -const int CSSMERR_TP_INVALID_TUPLEGROUP = -2147409614; +const int CSSM_ATTRIBUTE_RANDOM = 536870919; -const int CSSMERR_AC_INTERNAL_ERROR = -2147405823; +const int CSSM_ATTRIBUTE_SEED = 805306376; -const int CSSMERR_AC_MEMORY_ERROR = -2147405822; +const int CSSM_ATTRIBUTE_PASSPHRASE = 805306377; -const int CSSMERR_AC_MDS_ERROR = -2147405821; +const int CSSM_ATTRIBUTE_KEY_LENGTH = 268435466; -const int CSSMERR_AC_INVALID_POINTER = -2147405820; +const int CSSM_ATTRIBUTE_KEY_LENGTH_RANGE = 1879048203; -const int CSSMERR_AC_INVALID_INPUT_POINTER = -2147405819; +const int CSSM_ATTRIBUTE_BLOCK_SIZE = 268435468; -const int CSSMERR_AC_INVALID_OUTPUT_POINTER = -2147405818; +const int CSSM_ATTRIBUTE_OUTPUT_SIZE = 268435469; -const int CSSMERR_AC_FUNCTION_NOT_IMPLEMENTED = -2147405817; +const int CSSM_ATTRIBUTE_ROUNDS = 268435470; -const int CSSMERR_AC_SELF_CHECK_FAILED = -2147405816; +const int CSSM_ATTRIBUTE_IV_SIZE = 268435471; -const int CSSMERR_AC_OS_ACCESS_DENIED = -2147405815; +const int CSSM_ATTRIBUTE_ALG_PARAMS = 536870928; -const int CSSMERR_AC_FUNCTION_FAILED = -2147405814; +const int CSSM_ATTRIBUTE_LABEL = 536870929; -const int CSSMERR_AC_INVALID_CONTEXT_HANDLE = -2147405760; +const int CSSM_ATTRIBUTE_KEY_TYPE = 268435474; -const int CSSMERR_AC_INVALID_DATA = -2147405754; +const int CSSM_ATTRIBUTE_MODE = 268435475; -const int CSSMERR_AC_INVALID_DB_LIST = -2147405748; +const int CSSM_ATTRIBUTE_EFFECTIVE_BITS = 268435476; -const int CSSMERR_AC_INVALID_PASSTHROUGH_ID = -2147405738; +const int CSSM_ATTRIBUTE_START_DATE = 1610612757; -const int CSSMERR_AC_INVALID_DL_HANDLE = -2147405743; +const int CSSM_ATTRIBUTE_END_DATE = 1610612758; -const int CSSMERR_AC_INVALID_CL_HANDLE = -2147405742; +const int CSSM_ATTRIBUTE_KEYUSAGE = 268435479; -const int CSSMERR_AC_INVALID_TP_HANDLE = -2147405741; +const int CSSM_ATTRIBUTE_KEYATTR = 268435480; -const int CSSMERR_AC_INVALID_DB_HANDLE = -2147405750; +const int CSSM_ATTRIBUTE_VERSION = 16777241; -const int CSSMERR_AC_INVALID_DB_LIST_POINTER = -2147405747; +const int CSSM_ATTRIBUTE_PRIME = 536870938; -const int CSSM_AC_BASE_AC_ERROR = -2147405568; +const int CSSM_ATTRIBUTE_BASE = 536870939; -const int CSSMERR_AC_INVALID_BASE_ACLS = -2147405567; +const int CSSM_ATTRIBUTE_SUBPRIME = 536870940; -const int CSSMERR_AC_INVALID_TUPLE_CREDENTIALS = -2147405566; +const int CSSM_ATTRIBUTE_ALG_ID = 268435485; -const int CSSMERR_AC_INVALID_ENCODING = -2147405565; +const int CSSM_ATTRIBUTE_ITERATION_COUNT = 268435486; -const int CSSMERR_AC_INVALID_VALIDITY_PERIOD = -2147405564; +const int CSSM_ATTRIBUTE_ROUNDS_RANGE = 1879048223; -const int CSSMERR_AC_INVALID_REQUESTOR = -2147405563; +const int CSSM_ATTRIBUTE_KRPROFILE_LOCAL = 50331680; -const int CSSMERR_AC_INVALID_REQUEST_DESCRIPTOR = -2147405562; +const int CSSM_ATTRIBUTE_KRPROFILE_REMOTE = 50331681; -const int CSSMERR_CL_INTERNAL_ERROR = -2147411967; +const int CSSM_ATTRIBUTE_CSP_HANDLE = 268435490; -const int CSSMERR_CL_MEMORY_ERROR = -2147411966; +const int CSSM_ATTRIBUTE_DL_DB_HANDLE = 33554467; -const int CSSMERR_CL_MDS_ERROR = -2147411965; +const int CSSM_ATTRIBUTE_ACCESS_CREDENTIALS = -2147483612; -const int CSSMERR_CL_INVALID_POINTER = -2147411964; +const int CSSM_ATTRIBUTE_PUBLIC_KEY_FORMAT = 268435493; -const int CSSMERR_CL_INVALID_INPUT_POINTER = -2147411963; +const int CSSM_ATTRIBUTE_PRIVATE_KEY_FORMAT = 268435494; -const int CSSMERR_CL_INVALID_OUTPUT_POINTER = -2147411962; +const int CSSM_ATTRIBUTE_SYMMETRIC_KEY_FORMAT = 268435495; -const int CSSMERR_CL_FUNCTION_NOT_IMPLEMENTED = -2147411961; +const int CSSM_ATTRIBUTE_WRAPPED_KEY_FORMAT = 268435496; -const int CSSMERR_CL_SELF_CHECK_FAILED = -2147411960; +const int CSSM_PADDING_NONE = 0; -const int CSSMERR_CL_OS_ACCESS_DENIED = -2147411959; +const int CSSM_PADDING_CUSTOM = 1; -const int CSSMERR_CL_FUNCTION_FAILED = -2147411958; +const int CSSM_PADDING_ZERO = 2; -const int CSSMERR_CL_INVALID_CONTEXT_HANDLE = -2147411904; +const int CSSM_PADDING_ONE = 3; -const int CSSMERR_CL_INVALID_CERTGROUP_POINTER = -2147411902; +const int CSSM_PADDING_ALTERNATE = 4; -const int CSSMERR_CL_INVALID_CERT_POINTER = -2147411901; +const int CSSM_PADDING_FF = 5; -const int CSSMERR_CL_INVALID_CRL_POINTER = -2147411900; +const int CSSM_PADDING_PKCS5 = 6; -const int CSSMERR_CL_INVALID_FIELD_POINTER = -2147411899; +const int CSSM_PADDING_PKCS7 = 7; -const int CSSMERR_CL_INVALID_DATA = -2147411898; +const int CSSM_PADDING_CIPHERSTEALING = 8; -const int CSSMERR_CL_CRL_ALREADY_SIGNED = -2147411897; +const int CSSM_PADDING_RANDOM = 9; -const int CSSMERR_CL_INVALID_NUMBER_OF_FIELDS = -2147411896; +const int CSSM_PADDING_PKCS1 = 10; -const int CSSMERR_CL_VERIFICATION_FAILURE = -2147411895; +const int CSSM_PADDING_SIGRAW = 11; -const int CSSMERR_CL_UNKNOWN_FORMAT = -2147411890; +const int CSSM_PADDING_VENDOR_DEFINED = -2147483648; -const int CSSMERR_CL_UNKNOWN_TAG = -2147411889; +const int CSSM_CSP_TOK_RNG = 1; -const int CSSMERR_CL_INVALID_PASSTHROUGH_ID = -2147411882; +const int CSSM_CSP_TOK_CLOCK_EXISTS = 64; -const int CSSM_CL_BASE_CL_ERROR = -2147411712; +const int CSSM_CSP_RDR_TOKENPRESENT = 1; -const int CSSMERR_CL_INVALID_BUNDLE_POINTER = -2147411711; +const int CSSM_CSP_RDR_EXISTS = 2; -const int CSSMERR_CL_INVALID_CACHE_HANDLE = -2147411710; +const int CSSM_CSP_RDR_HW = 4; -const int CSSMERR_CL_INVALID_RESULTS_HANDLE = -2147411709; +const int CSSM_CSP_TOK_WRITE_PROTECTED = 2; -const int CSSMERR_CL_INVALID_BUNDLE_INFO = -2147411708; +const int CSSM_CSP_TOK_LOGIN_REQUIRED = 4; -const int CSSMERR_CL_INVALID_CRL_INDEX = -2147411707; +const int CSSM_CSP_TOK_USER_PIN_INITIALIZED = 8; -const int CSSMERR_CL_INVALID_SCOPE = -2147411706; +const int CSSM_CSP_TOK_PROT_AUTHENTICATION = 256; -const int CSSMERR_CL_NO_FIELD_VALUES = -2147411705; +const int CSSM_CSP_TOK_USER_PIN_EXPIRED = 1048576; -const int CSSMERR_CL_SCOPE_NOT_SUPPORTED = -2147411704; +const int CSSM_CSP_TOK_SESSION_KEY_PASSWORD = 2097152; -const int CSSMERR_DL_INTERNAL_ERROR = -2147414015; +const int CSSM_CSP_TOK_PRIVATE_KEY_PASSWORD = 4194304; -const int CSSMERR_DL_MEMORY_ERROR = -2147414014; +const int CSSM_CSP_STORES_PRIVATE_KEYS = 16777216; -const int CSSMERR_DL_MDS_ERROR = -2147414013; +const int CSSM_CSP_STORES_PUBLIC_KEYS = 33554432; -const int CSSMERR_DL_INVALID_POINTER = -2147414012; +const int CSSM_CSP_STORES_SESSION_KEYS = 67108864; -const int CSSMERR_DL_INVALID_INPUT_POINTER = -2147414011; +const int CSSM_CSP_STORES_CERTIFICATES = 134217728; -const int CSSMERR_DL_INVALID_OUTPUT_POINTER = -2147414010; +const int CSSM_CSP_STORES_GENERIC = 268435456; -const int CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED = -2147414009; +const int CSSM_PKCS_OAEP_MGF_NONE = 0; -const int CSSMERR_DL_SELF_CHECK_FAILED = -2147414008; +const int CSSM_PKCS_OAEP_MGF1_SHA1 = 1; -const int CSSMERR_DL_OS_ACCESS_DENIED = -2147414007; +const int CSSM_PKCS_OAEP_MGF1_MD5 = 2; -const int CSSMERR_DL_FUNCTION_FAILED = -2147414006; +const int CSSM_PKCS_OAEP_PSOURCE_NONE = 0; -const int CSSMERR_DL_INVALID_CSP_HANDLE = -2147413936; +const int CSSM_PKCS_OAEP_PSOURCE_Pspecified = 1; -const int CSSMERR_DL_INVALID_DL_HANDLE = -2147413935; +const int CSSM_VALUE_NOT_AVAILABLE = -1; -const int CSSMERR_DL_INVALID_CL_HANDLE = -2147413934; +const int CSSM_PKCS5_PBKDF2_PRF_HMAC_SHA1 = 0; -const int CSSMERR_DL_INVALID_DB_LIST_POINTER = -2147413939; +const int CSSM_TP_AUTHORITY_REQUEST_CERTISSUE = 1; -const int CSSMERR_DL_OPERATION_AUTH_DENIED = -2147413984; +const int CSSM_TP_AUTHORITY_REQUEST_CERTREVOKE = 2; -const int CSSMERR_DL_OBJECT_USE_AUTH_DENIED = -2147413983; +const int CSSM_TP_AUTHORITY_REQUEST_CERTSUSPEND = 3; -const int CSSMERR_DL_OBJECT_MANIP_AUTH_DENIED = -2147413982; +const int CSSM_TP_AUTHORITY_REQUEST_CERTRESUME = 4; -const int CSSMERR_DL_OBJECT_ACL_NOT_SUPPORTED = -2147413981; +const int CSSM_TP_AUTHORITY_REQUEST_CERTVERIFY = 5; -const int CSSMERR_DL_OBJECT_ACL_REQUIRED = -2147413980; +const int CSSM_TP_AUTHORITY_REQUEST_CERTNOTARIZE = 6; -const int CSSMERR_DL_INVALID_ACCESS_CREDENTIALS = -2147413979; +const int CSSM_TP_AUTHORITY_REQUEST_CERTUSERECOVER = 7; -const int CSSMERR_DL_INVALID_ACL_BASE_CERTS = -2147413978; +const int CSSM_TP_AUTHORITY_REQUEST_CRLISSUE = 256; -const int CSSMERR_DL_ACL_BASE_CERTS_NOT_SUPPORTED = -2147413977; +const int CSSM_TP_KEY_ARCHIVE = 1; -const int CSSMERR_DL_INVALID_SAMPLE_VALUE = -2147413976; +const int CSSM_TP_CERT_PUBLISH = 2; -const int CSSMERR_DL_SAMPLE_VALUE_NOT_SUPPORTED = -2147413975; +const int CSSM_TP_CERT_NOTIFY_RENEW = 4; -const int CSSMERR_DL_INVALID_ACL_SUBJECT_VALUE = -2147413974; +const int CSSM_TP_CERT_DIR_UPDATE = 8; -const int CSSMERR_DL_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147413973; +const int CSSM_TP_CRL_DISTRIBUTE = 16; -const int CSSMERR_DL_INVALID_ACL_CHALLENGE_CALLBACK = -2147413972; +const int CSSM_TP_ACTION_DEFAULT = 0; -const int CSSMERR_DL_ACL_CHALLENGE_CALLBACK_FAILED = -2147413971; +const int CSSM_TP_STOP_ON_POLICY = 0; -const int CSSMERR_DL_INVALID_ACL_ENTRY_TAG = -2147413970; +const int CSSM_TP_STOP_ON_NONE = 1; -const int CSSMERR_DL_ACL_ENTRY_TAG_NOT_FOUND = -2147413969; +const int CSSM_TP_STOP_ON_FIRST_PASS = 2; -const int CSSMERR_DL_INVALID_ACL_EDIT_MODE = -2147413968; +const int CSSM_TP_STOP_ON_FIRST_FAIL = 3; -const int CSSMERR_DL_ACL_CHANGE_FAILED = -2147413967; +const int CSSM_CRL_PARSE_FORMAT_NONE = 0; -const int CSSMERR_DL_INVALID_NEW_ACL_ENTRY = -2147413966; +const int CSSM_CRL_PARSE_FORMAT_CUSTOM = 1; -const int CSSMERR_DL_INVALID_NEW_ACL_OWNER = -2147413965; +const int CSSM_CRL_PARSE_FORMAT_SEXPR = 2; -const int CSSMERR_DL_ACL_DELETE_FAILED = -2147413964; +const int CSSM_CRL_PARSE_FORMAT_COMPLEX = 3; -const int CSSMERR_DL_ACL_REPLACE_FAILED = -2147413963; +const int CSSM_CRL_PARSE_FORMAT_OID_NAMED = 4; -const int CSSMERR_DL_ACL_ADD_FAILED = -2147413962; +const int CSSM_CRL_PARSE_FORMAT_TUPLE = 5; -const int CSSMERR_DL_INVALID_DB_HANDLE = -2147413942; +const int CSSM_CRL_PARSE_FORMAT_MULTIPLE = 32766; -const int CSSMERR_DL_INVALID_PASSTHROUGH_ID = -2147413930; +const int CSSM_CRL_PARSE_FORMAT_LAST = 32767; -const int CSSMERR_DL_INVALID_NETWORK_ADDR = -2147413929; +const int CSSM_CL_CUSTOM_CRL_PARSE_FORMAT = 32768; -const int CSSM_DL_BASE_DL_ERROR = -2147413760; +const int CSSM_CRL_TYPE_UNKNOWN = 0; -const int CSSMERR_DL_DATABASE_CORRUPT = -2147413759; +const int CSSM_CRL_TYPE_X_509v1 = 1; -const int CSSMERR_DL_INVALID_RECORD_INDEX = -2147413752; +const int CSSM_CRL_TYPE_X_509v2 = 2; -const int CSSMERR_DL_INVALID_RECORDTYPE = -2147413751; +const int CSSM_CRL_TYPE_SPKI = 3; -const int CSSMERR_DL_INVALID_FIELD_NAME = -2147413750; +const int CSSM_CRL_TYPE_MULTIPLE = 32766; -const int CSSMERR_DL_UNSUPPORTED_FIELD_FORMAT = -2147413749; +const int CSSM_CRL_ENCODING_UNKNOWN = 0; -const int CSSMERR_DL_UNSUPPORTED_INDEX_INFO = -2147413748; +const int CSSM_CRL_ENCODING_CUSTOM = 1; -const int CSSMERR_DL_UNSUPPORTED_LOCALITY = -2147413747; +const int CSSM_CRL_ENCODING_BER = 2; -const int CSSMERR_DL_UNSUPPORTED_NUM_ATTRIBUTES = -2147413746; +const int CSSM_CRL_ENCODING_DER = 3; -const int CSSMERR_DL_UNSUPPORTED_NUM_INDEXES = -2147413745; +const int CSSM_CRL_ENCODING_BLOOM = 4; -const int CSSMERR_DL_UNSUPPORTED_NUM_RECORDTYPES = -2147413744; +const int CSSM_CRL_ENCODING_SEXPR = 5; -const int CSSMERR_DL_UNSUPPORTED_RECORDTYPE = -2147413743; +const int CSSM_CRL_ENCODING_MULTIPLE = 32766; -const int CSSMERR_DL_FIELD_SPECIFIED_MULTIPLE = -2147413742; +const int CSSM_CRLGROUP_DATA = 0; -const int CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT = -2147413741; +const int CSSM_CRLGROUP_ENCODED_CRL = 1; -const int CSSMERR_DL_INVALID_PARSING_MODULE = -2147413740; +const int CSSM_CRLGROUP_PARSED_CRL = 2; -const int CSSMERR_DL_INVALID_DB_NAME = -2147413738; +const int CSSM_CRLGROUP_CRL_PAIR = 3; -const int CSSMERR_DL_DATASTORE_DOESNOT_EXIST = -2147413737; +const int CSSM_EVIDENCE_FORM_UNSPECIFIC = 0; -const int CSSMERR_DL_DATASTORE_ALREADY_EXISTS = -2147413736; +const int CSSM_EVIDENCE_FORM_CERT = 1; -const int CSSMERR_DL_DB_LOCKED = -2147413735; +const int CSSM_EVIDENCE_FORM_CRL = 2; -const int CSSMERR_DL_DATASTORE_IS_OPEN = -2147413734; +const int CSSM_EVIDENCE_FORM_CERT_ID = 3; -const int CSSMERR_DL_RECORD_NOT_FOUND = -2147413733; +const int CSSM_EVIDENCE_FORM_CRL_ID = 4; -const int CSSMERR_DL_MISSING_VALUE = -2147413732; +const int CSSM_EVIDENCE_FORM_VERIFIER_TIME = 5; -const int CSSMERR_DL_UNSUPPORTED_QUERY = -2147413731; +const int CSSM_EVIDENCE_FORM_CRL_THISTIME = 6; -const int CSSMERR_DL_UNSUPPORTED_QUERY_LIMITS = -2147413730; +const int CSSM_EVIDENCE_FORM_CRL_NEXTTIME = 7; -const int CSSMERR_DL_UNSUPPORTED_NUM_SELECTION_PREDS = -2147413729; +const int CSSM_EVIDENCE_FORM_POLICYINFO = 8; -const int CSSMERR_DL_UNSUPPORTED_OPERATOR = -2147413727; +const int CSSM_EVIDENCE_FORM_TUPLEGROUP = 9; -const int CSSMERR_DL_INVALID_RESULTS_HANDLE = -2147413726; +const int CSSM_TP_CONFIRM_STATUS_UNKNOWN = 0; -const int CSSMERR_DL_INVALID_DB_LOCATION = -2147413725; +const int CSSM_TP_CONFIRM_ACCEPT = 1; -const int CSSMERR_DL_INVALID_ACCESS_REQUEST = -2147413724; +const int CSSM_TP_CONFIRM_REJECT = 2; -const int CSSMERR_DL_INVALID_INDEX_INFO = -2147413723; +const int CSSM_ESTIMATED_TIME_UNKNOWN = -1; -const int CSSMERR_DL_INVALID_SELECTION_TAG = -2147413722; +const int CSSM_ELAPSED_TIME_UNKNOWN = -1; -const int CSSMERR_DL_INVALID_NEW_OWNER = -2147413721; +const int CSSM_ELAPSED_TIME_COMPLETE = -2; -const int CSSMERR_DL_INVALID_RECORD_UID = -2147413720; +const int CSSM_TP_CERTISSUE_STATUS_UNKNOWN = 0; -const int CSSMERR_DL_INVALID_UNIQUE_INDEX_DATA = -2147413719; +const int CSSM_TP_CERTISSUE_OK = 1; -const int CSSMERR_DL_INVALID_MODIFY_MODE = -2147413718; +const int CSSM_TP_CERTISSUE_OKWITHCERTMODS = 2; -const int CSSMERR_DL_INVALID_OPEN_PARAMETERS = -2147413717; +const int CSSM_TP_CERTISSUE_OKWITHSERVICEMODS = 3; -const int CSSMERR_DL_RECORD_MODIFIED = -2147413716; +const int CSSM_TP_CERTISSUE_REJECTED = 4; -const int CSSMERR_DL_ENDOFDATA = -2147413715; +const int CSSM_TP_CERTISSUE_NOT_AUTHORIZED = 5; -const int CSSMERR_DL_INVALID_QUERY = -2147413714; +const int CSSM_TP_CERTISSUE_WILL_BE_REVOKED = 6; -const int CSSMERR_DL_INVALID_VALUE = -2147413713; +const int CSSM_TP_CERTCHANGE_NONE = 0; -const int CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTED = -2147413712; +const int CSSM_TP_CERTCHANGE_REVOKE = 1; -const int CSSMERR_DL_STALE_UNIQUE_RECORD = -2147413711; +const int CSSM_TP_CERTCHANGE_HOLD = 2; -const int CSSM_WORDID_KEYCHAIN_PROMPT = 65536; +const int CSSM_TP_CERTCHANGE_RELEASE = 3; -const int CSSM_WORDID_KEYCHAIN_LOCK = 65537; +const int CSSM_TP_CERTCHANGE_REASON_UNKNOWN = 0; -const int CSSM_WORDID_KEYCHAIN_CHANGE_LOCK = 65538; +const int CSSM_TP_CERTCHANGE_REASON_KEYCOMPROMISE = 1; -const int CSSM_WORDID_PROCESS = 65539; +const int CSSM_TP_CERTCHANGE_REASON_CACOMPROMISE = 2; -const int CSSM_WORDID__RESERVED_1 = 65540; +const int CSSM_TP_CERTCHANGE_REASON_CEASEOPERATION = 3; -const int CSSM_WORDID_SYMMETRIC_KEY = 65541; +const int CSSM_TP_CERTCHANGE_REASON_AFFILIATIONCHANGE = 4; -const int CSSM_WORDID_SYSTEM = 65542; +const int CSSM_TP_CERTCHANGE_REASON_SUPERCEDED = 5; -const int CSSM_WORDID_KEY = 65543; +const int CSSM_TP_CERTCHANGE_REASON_SUSPECTEDCOMPROMISE = 6; -const int CSSM_WORDID_PIN = 65544; +const int CSSM_TP_CERTCHANGE_REASON_HOLDRELEASE = 7; -const int CSSM_WORDID_PREAUTH = 65545; +const int CSSM_TP_CERTCHANGE_STATUS_UNKNOWN = 0; -const int CSSM_WORDID_PREAUTH_SOURCE = 65546; +const int CSSM_TP_CERTCHANGE_OK = 1; -const int CSSM_WORDID_ASYMMETRIC_KEY = 65547; +const int CSSM_TP_CERTCHANGE_OKWITHNEWTIME = 2; -const int CSSM_WORDID_PARTITION = 65548; +const int CSSM_TP_CERTCHANGE_WRONGCA = 3; -const int CSSM_WORDID_KEYBAG_KEY = 65549; +const int CSSM_TP_CERTCHANGE_REJECTED = 4; -const int CSSM_WORDID__FIRST_UNUSED = 65550; +const int CSSM_TP_CERTCHANGE_NOT_AUTHORIZED = 5; -const int CSSM_ACL_SUBJECT_TYPE_KEYCHAIN_PROMPT = 65536; +const int CSSM_TP_CERTVERIFY_UNKNOWN = 0; -const int CSSM_ACL_SUBJECT_TYPE_PROCESS = 65539; +const int CSSM_TP_CERTVERIFY_VALID = 1; -const int CSSM_ACL_SUBJECT_TYPE_CODE_SIGNATURE = 116; +const int CSSM_TP_CERTVERIFY_INVALID = 2; -const int CSSM_ACL_SUBJECT_TYPE_COMMENT = 12; +const int CSSM_TP_CERTVERIFY_REVOKED = 3; -const int CSSM_ACL_SUBJECT_TYPE_SYMMETRIC_KEY = 65541; +const int CSSM_TP_CERTVERIFY_SUSPENDED = 4; -const int CSSM_ACL_SUBJECT_TYPE_PREAUTH = 65545; +const int CSSM_TP_CERTVERIFY_EXPIRED = 5; -const int CSSM_ACL_SUBJECT_TYPE_PREAUTH_SOURCE = 65546; +const int CSSM_TP_CERTVERIFY_NOT_VALID_YET = 6; -const int CSSM_ACL_SUBJECT_TYPE_ASYMMETRIC_KEY = 65547; +const int CSSM_TP_CERTVERIFY_INVALID_AUTHORITY = 7; -const int CSSM_ACL_SUBJECT_TYPE_PARTITION = 65548; +const int CSSM_TP_CERTVERIFY_INVALID_SIGNATURE = 8; -const int CSSM_SAMPLE_TYPE_KEYCHAIN_PROMPT = 65536; +const int CSSM_TP_CERTVERIFY_INVALID_CERT_VALUE = 9; -const int CSSM_SAMPLE_TYPE_KEYCHAIN_LOCK = 65537; +const int CSSM_TP_CERTVERIFY_INVALID_CERTGROUP = 10; -const int CSSM_SAMPLE_TYPE_KEYCHAIN_CHANGE_LOCK = 65538; +const int CSSM_TP_CERTVERIFY_INVALID_POLICY = 11; -const int CSSM_SAMPLE_TYPE_PROCESS = 65539; +const int CSSM_TP_CERTVERIFY_INVALID_POLICY_IDS = 12; -const int CSSM_SAMPLE_TYPE_COMMENT = 12; +const int CSSM_TP_CERTVERIFY_INVALID_BASIC_CONSTRAINTS = 13; -const int CSSM_SAMPLE_TYPE_RETRY_ID = 85; +const int CSSM_TP_CERTVERIFY_INVALID_CRL_DIST_PT = 14; -const int CSSM_SAMPLE_TYPE_SYMMETRIC_KEY = 65541; +const int CSSM_TP_CERTVERIFY_INVALID_NAME_TREE = 15; -const int CSSM_SAMPLE_TYPE_PREAUTH = 65545; +const int CSSM_TP_CERTVERIFY_UNKNOWN_CRITICAL_EXT = 16; -const int CSSM_SAMPLE_TYPE_ASYMMETRIC_KEY = 65547; +const int CSSM_TP_CERTNOTARIZE_STATUS_UNKNOWN = 0; -const int CSSM_SAMPLE_TYPE_KEYBAG_KEY = 65549; +const int CSSM_TP_CERTNOTARIZE_OK = 1; -const int CSSM_ACL_AUTHORIZATION_CHANGE_ACL = 65536; +const int CSSM_TP_CERTNOTARIZE_OKWITHOUTFIELDS = 2; -const int CSSM_ACL_AUTHORIZATION_CHANGE_OWNER = 65537; +const int CSSM_TP_CERTNOTARIZE_OKWITHSERVICEMODS = 3; -const int CSSM_ACL_AUTHORIZATION_PARTITION_ID = 65538; +const int CSSM_TP_CERTNOTARIZE_REJECTED = 4; -const int CSSM_ACL_AUTHORIZATION_INTEGRITY = 65539; +const int CSSM_TP_CERTNOTARIZE_NOT_AUTHORIZED = 5; -const int CSSM_ACL_AUTHORIZATION_PREAUTH_BASE = 16842752; +const int CSSM_TP_CERTRECLAIM_STATUS_UNKNOWN = 0; -const int CSSM_ACL_AUTHORIZATION_PREAUTH_END = 16908288; +const int CSSM_TP_CERTRECLAIM_OK = 1; -const int CSSM_ACL_CODE_SIGNATURE_INVALID = 0; +const int CSSM_TP_CERTRECLAIM_NOMATCH = 2; -const int CSSM_ACL_CODE_SIGNATURE_OSX = 1; +const int CSSM_TP_CERTRECLAIM_REJECTED = 3; -const int CSSM_ACL_MATCH_UID = 1; +const int CSSM_TP_CERTRECLAIM_NOT_AUTHORIZED = 4; -const int CSSM_ACL_MATCH_GID = 2; +const int CSSM_TP_CRLISSUE_STATUS_UNKNOWN = 0; -const int CSSM_ACL_MATCH_HONOR_ROOT = 256; +const int CSSM_TP_CRLISSUE_OK = 1; -const int CSSM_ACL_MATCH_BITS = 3; +const int CSSM_TP_CRLISSUE_NOT_CURRENT = 2; -const int CSSM_ACL_PROCESS_SELECTOR_CURRENT_VERSION = 257; +const int CSSM_TP_CRLISSUE_INVALID_DOMAIN = 3; -const int CSSM_ACL_KEYCHAIN_PROMPT_CURRENT_VERSION = 257; +const int CSSM_TP_CRLISSUE_UNKNOWN_IDENTIFIER = 4; -const int CSSM_ACL_KEYCHAIN_PROMPT_REQUIRE_PASSPHRASE = 1; +const int CSSM_TP_CRLISSUE_REJECTED = 5; -const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED = 16; +const int CSSM_TP_CRLISSUE_NOT_AUTHORIZED = 6; -const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED_ACT = 32; +const int CSSM_TP_FORM_TYPE_GENERIC = 0; -const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID = 64; +const int CSSM_TP_FORM_TYPE_REGISTRATION = 1; -const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID_ACT = 128; +const int CSSM_CL_TEMPLATE_INTERMEDIATE_CERT = 1; -const int CSSM_ACL_PREAUTH_TRACKING_COUNT_MASK = 255; +const int CSSM_CL_TEMPLATE_PKIX_CERTTEMPLATE = 2; -const int CSSM_ACL_PREAUTH_TRACKING_BLOCKED = 0; +const int CSSM_CERT_BUNDLE_UNKNOWN = 0; -const int CSSM_ACL_PREAUTH_TRACKING_UNKNOWN = 1073741824; +const int CSSM_CERT_BUNDLE_CUSTOM = 1; -const int CSSM_ACL_PREAUTH_TRACKING_AUTHORIZED = -2147483648; +const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_DATA = 2; -const int CSSM_DB_ACCESS_RESET = 65536; +const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_ENVELOPED_DATA = 3; -const int CSSM_ALGID_APPLE_YARROW = -2147483648; +const int CSSM_CERT_BUNDLE_PKCS12 = 4; -const int CSSM_ALGID_AES = -2147483647; +const int CSSM_CERT_BUNDLE_PFX = 5; -const int CSSM_ALGID_FEE = -2147483646; +const int CSSM_CERT_BUNDLE_SPKI_SEQUENCE = 6; -const int CSSM_ALGID_FEE_MD5 = -2147483645; +const int CSSM_CERT_BUNDLE_PGP_KEYRING = 7; -const int CSSM_ALGID_FEE_SHA1 = -2147483644; +const int CSSM_CERT_BUNDLE_LAST = 32767; -const int CSSM_ALGID_FEED = -2147483643; +const int CSSM_CL_CUSTOM_CERT_BUNDLE_TYPE = 32768; -const int CSSM_ALGID_FEEDEXP = -2147483642; +const int CSSM_CERT_BUNDLE_ENCODING_UNKNOWN = 0; -const int CSSM_ALGID_ASC = -2147483641; +const int CSSM_CERT_BUNDLE_ENCODING_CUSTOM = 1; -const int CSSM_ALGID_SHA1HMAC_LEGACY = -2147483640; +const int CSSM_CERT_BUNDLE_ENCODING_BER = 2; -const int CSSM_ALGID_KEYCHAIN_KEY = -2147483639; +const int CSSM_CERT_BUNDLE_ENCODING_DER = 3; -const int CSSM_ALGID_PKCS12_PBE_ENCR = -2147483638; +const int CSSM_CERT_BUNDLE_ENCODING_SEXPR = 4; -const int CSSM_ALGID_PKCS12_PBE_MAC = -2147483637; +const int CSSM_CERT_BUNDLE_ENCODING_PGP = 5; -const int CSSM_ALGID_SECURE_PASSPHRASE = -2147483636; +const int CSSM_FIELDVALUE_COMPLEX_DATA_TYPE = -1; -const int CSSM_ALGID_PBE_OPENSSL_MD5 = -2147483635; +const int CSSM_DB_ATTRIBUTE_NAME_AS_STRING = 0; -const int CSSM_ALGID_SHA256 = -2147483634; +const int CSSM_DB_ATTRIBUTE_NAME_AS_OID = 1; -const int CSSM_ALGID_SHA384 = -2147483633; +const int CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER = 2; -const int CSSM_ALGID_SHA512 = -2147483632; +const int CSSM_DB_ATTRIBUTE_FORMAT_STRING = 0; -const int CSSM_ALGID_ENTROPY_DEFAULT = -2147483631; +const int CSSM_DB_ATTRIBUTE_FORMAT_SINT32 = 1; -const int CSSM_ALGID_SHA224 = -2147483630; +const int CSSM_DB_ATTRIBUTE_FORMAT_UINT32 = 2; -const int CSSM_ALGID_SHA224WithRSA = -2147483629; +const int CSSM_DB_ATTRIBUTE_FORMAT_BIG_NUM = 3; -const int CSSM_ALGID_SHA256WithRSA = -2147483628; +const int CSSM_DB_ATTRIBUTE_FORMAT_REAL = 4; -const int CSSM_ALGID_SHA384WithRSA = -2147483627; +const int CSSM_DB_ATTRIBUTE_FORMAT_TIME_DATE = 5; -const int CSSM_ALGID_SHA512WithRSA = -2147483626; +const int CSSM_DB_ATTRIBUTE_FORMAT_BLOB = 6; -const int CSSM_ALGID_OPENSSH1 = -2147483625; +const int CSSM_DB_ATTRIBUTE_FORMAT_MULTI_UINT32 = 7; -const int CSSM_ALGID_SHA224WithECDSA = -2147483624; +const int CSSM_DB_ATTRIBUTE_FORMAT_COMPLEX = 8; -const int CSSM_ALGID_SHA256WithECDSA = -2147483623; +const int CSSM_DB_RECORDTYPE_SCHEMA_START = 0; -const int CSSM_ALGID_SHA384WithECDSA = -2147483622; +const int CSSM_DB_RECORDTYPE_SCHEMA_END = 4; -const int CSSM_ALGID_SHA512WithECDSA = -2147483621; +const int CSSM_DB_RECORDTYPE_OPEN_GROUP_START = 10; -const int CSSM_ALGID_ECDSA_SPECIFIED = -2147483620; +const int CSSM_DB_RECORDTYPE_OPEN_GROUP_END = 18; -const int CSSM_ALGID_ECDH_X963_KDF = -2147483619; +const int CSSM_DB_RECORDTYPE_APP_DEFINED_START = -2147483648; -const int CSSM_ALGID__FIRST_UNUSED = -2147483618; +const int CSSM_DB_RECORDTYPE_APP_DEFINED_END = -1; -const int CSSM_PADDING_APPLE_SSLv2 = -2147483648; +const int CSSM_DL_DB_SCHEMA_INFO = 0; -const int CSSM_KEYBLOB_RAW_FORMAT_VENDOR_DEFINED = -2147483648; +const int CSSM_DL_DB_SCHEMA_INDEXES = 1; -const int CSSM_KEYBLOB_RAW_FORMAT_X509 = -2147483648; +const int CSSM_DL_DB_SCHEMA_ATTRIBUTES = 2; -const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH = -2147483647; +const int CSSM_DL_DB_SCHEMA_PARSING_MODULE = 3; -const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSL = -2147483646; +const int CSSM_DL_DB_RECORD_ANY = 10; -const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH2 = -2147483645; +const int CSSM_DL_DB_RECORD_CERT = 11; -const int CSSM_CUSTOM_COMMON_ERROR_EXTENT = 224; +const int CSSM_DL_DB_RECORD_CRL = 12; -const int CSSM_ERRCODE_NO_USER_INTERACTION = 224; +const int CSSM_DL_DB_RECORD_POLICY = 13; -const int CSSM_ERRCODE_USER_CANCELED = 225; +const int CSSM_DL_DB_RECORD_GENERIC = 14; -const int CSSM_ERRCODE_SERVICE_NOT_AVAILABLE = 226; +const int CSSM_DL_DB_RECORD_PUBLIC_KEY = 15; -const int CSSM_ERRCODE_INSUFFICIENT_CLIENT_IDENTIFICATION = 227; +const int CSSM_DL_DB_RECORD_PRIVATE_KEY = 16; -const int CSSM_ERRCODE_DEVICE_RESET = 228; +const int CSSM_DL_DB_RECORD_SYMMETRIC_KEY = 17; -const int CSSM_ERRCODE_DEVICE_FAILED = 229; +const int CSSM_DL_DB_RECORD_ALL_KEYS = 18; -const int CSSM_ERRCODE_IN_DARK_WAKE = 230; +const int CSSM_DB_CERT_USE_TRUSTED = 1; -const int CSSMERR_CSSM_NO_USER_INTERACTION = -2147417888; +const int CSSM_DB_CERT_USE_SYSTEM = 2; -const int CSSMERR_AC_NO_USER_INTERACTION = -2147405600; +const int CSSM_DB_CERT_USE_OWNER = 4; -const int CSSMERR_CSP_NO_USER_INTERACTION = -2147415840; +const int CSSM_DB_CERT_USE_REVOKED = 8; -const int CSSMERR_CL_NO_USER_INTERACTION = -2147411744; +const int CSSM_DB_CERT_USE_SIGNING = 16; -const int CSSMERR_DL_NO_USER_INTERACTION = -2147413792; +const int CSSM_DB_CERT_USE_PRIVACY = 32; -const int CSSMERR_TP_NO_USER_INTERACTION = -2147409696; +const int CSSM_DB_INDEX_UNIQUE = 0; -const int CSSMERR_CSSM_USER_CANCELED = -2147417887; +const int CSSM_DB_INDEX_NONUNIQUE = 1; -const int CSSMERR_AC_USER_CANCELED = -2147405599; +const int CSSM_DB_INDEX_ON_UNKNOWN = 0; -const int CSSMERR_CSP_USER_CANCELED = -2147415839; +const int CSSM_DB_INDEX_ON_ATTRIBUTE = 1; -const int CSSMERR_CL_USER_CANCELED = -2147411743; +const int CSSM_DB_INDEX_ON_RECORD = 2; -const int CSSMERR_DL_USER_CANCELED = -2147413791; +const int CSSM_DB_ACCESS_READ = 1; -const int CSSMERR_TP_USER_CANCELED = -2147409695; +const int CSSM_DB_ACCESS_WRITE = 2; -const int CSSMERR_CSSM_SERVICE_NOT_AVAILABLE = -2147417886; +const int CSSM_DB_ACCESS_PRIVILEGED = 4; -const int CSSMERR_AC_SERVICE_NOT_AVAILABLE = -2147405598; +const int CSSM_DB_MODIFY_ATTRIBUTE_NONE = 0; -const int CSSMERR_CSP_SERVICE_NOT_AVAILABLE = -2147415838; +const int CSSM_DB_MODIFY_ATTRIBUTE_ADD = 1; -const int CSSMERR_CL_SERVICE_NOT_AVAILABLE = -2147411742; +const int CSSM_DB_MODIFY_ATTRIBUTE_DELETE = 2; -const int CSSMERR_DL_SERVICE_NOT_AVAILABLE = -2147413790; +const int CSSM_DB_MODIFY_ATTRIBUTE_REPLACE = 3; -const int CSSMERR_TP_SERVICE_NOT_AVAILABLE = -2147409694; +const int CSSM_DB_EQUAL = 0; -const int CSSMERR_CSSM_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147417885; +const int CSSM_DB_NOT_EQUAL = 1; -const int CSSMERR_AC_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147405597; +const int CSSM_DB_LESS_THAN = 2; -const int CSSMERR_CSP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147415837; +const int CSSM_DB_GREATER_THAN = 3; -const int CSSMERR_CL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147411741; +const int CSSM_DB_CONTAINS = 4; -const int CSSMERR_DL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147413789; +const int CSSM_DB_CONTAINS_INITIAL_SUBSTRING = 5; -const int CSSMERR_TP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147409693; +const int CSSM_DB_CONTAINS_FINAL_SUBSTRING = 6; -const int CSSMERR_CSSM_DEVICE_RESET = -2147417884; +const int CSSM_DB_NONE = 0; -const int CSSMERR_AC_DEVICE_RESET = -2147405596; +const int CSSM_DB_AND = 1; -const int CSSMERR_CSP_DEVICE_RESET = -2147415836; +const int CSSM_DB_OR = 2; -const int CSSMERR_CL_DEVICE_RESET = -2147411740; +const int CSSM_QUERY_TIMELIMIT_NONE = 0; -const int CSSMERR_DL_DEVICE_RESET = -2147413788; +const int CSSM_QUERY_SIZELIMIT_NONE = 0; -const int CSSMERR_TP_DEVICE_RESET = -2147409692; +const int CSSM_QUERY_RETURN_DATA = 1; -const int CSSMERR_CSSM_DEVICE_FAILED = -2147417883; +const int CSSM_DL_UNKNOWN = 0; -const int CSSMERR_AC_DEVICE_FAILED = -2147405595; +const int CSSM_DL_CUSTOM = 1; -const int CSSMERR_CSP_DEVICE_FAILED = -2147415835; +const int CSSM_DL_LDAP = 2; -const int CSSMERR_CL_DEVICE_FAILED = -2147411739; +const int CSSM_DL_ODBC = 3; -const int CSSMERR_DL_DEVICE_FAILED = -2147413787; +const int CSSM_DL_PKCS11 = 4; -const int CSSMERR_TP_DEVICE_FAILED = -2147409691; +const int CSSM_DL_FFS = 5; -const int CSSMERR_CSSM_IN_DARK_WAKE = -2147417882; +const int CSSM_DL_MEMORY = 6; -const int CSSMERR_AC_IN_DARK_WAKE = -2147405594; +const int CSSM_DL_REMOTEDIR = 7; -const int CSSMERR_CSP_IN_DARK_WAKE = -2147415834; +const int CSSM_DB_DATASTORES_UNKNOWN = -1; -const int CSSMERR_CL_IN_DARK_WAKE = -2147411738; +const int CSSM_DB_TRANSACTIONAL_MODE = 0; -const int CSSMERR_DL_IN_DARK_WAKE = -2147413786; +const int CSSM_DB_FILESYSTEMSCAN_MODE = 1; -const int CSSMERR_TP_IN_DARK_WAKE = -2147409690; +const int CSSM_BASE_ERROR = -2147418112; -const int CSSMERR_CSP_APPLE_ADD_APPLICATION_ACL_SUBJECT = -2147415040; +const int CSSM_ERRORCODE_MODULE_EXTENT = 2048; -const int CSSMERR_CSP_APPLE_PUBLIC_KEY_INCOMPLETE = -2147415039; +const int CSSM_ERRORCODE_CUSTOM_OFFSET = 1024; -const int CSSMERR_CSP_APPLE_SIGNATURE_MISMATCH = -2147415038; +const int CSSM_ERRORCODE_COMMON_EXTENT = 256; -const int CSSMERR_CSP_APPLE_INVALID_KEY_START_DATE = -2147415037; +const int CSSM_CSSM_BASE_ERROR = -2147418112; -const int CSSMERR_CSP_APPLE_INVALID_KEY_END_DATE = -2147415036; +const int CSSM_CSSM_PRIVATE_ERROR = -2147417088; -const int CSSMERR_CSPDL_APPLE_DL_CONVERSION_ERROR = -2147415035; +const int CSSM_CSP_BASE_ERROR = -2147416064; -const int CSSMERR_CSP_APPLE_SSLv2_ROLLBACK = -2147415034; +const int CSSM_CSP_PRIVATE_ERROR = -2147415040; -const int CSSM_DL_DB_RECORD_GENERIC_PASSWORD = -2147483648; +const int CSSM_DL_BASE_ERROR = -2147414016; -const int CSSM_DL_DB_RECORD_INTERNET_PASSWORD = -2147483647; +const int CSSM_DL_PRIVATE_ERROR = -2147412992; -const int CSSM_DL_DB_RECORD_APPLESHARE_PASSWORD = -2147483646; +const int CSSM_CL_BASE_ERROR = -2147411968; -const int CSSM_DL_DB_RECORD_X509_CERTIFICATE = -2147479552; +const int CSSM_CL_PRIVATE_ERROR = -2147410944; -const int CSSM_DL_DB_RECORD_USER_TRUST = -2147479551; +const int CSSM_TP_BASE_ERROR = -2147409920; -const int CSSM_DL_DB_RECORD_X509_CRL = -2147479550; +const int CSSM_TP_PRIVATE_ERROR = -2147408896; -const int CSSM_DL_DB_RECORD_UNLOCK_REFERRAL = -2147479549; +const int CSSM_KR_BASE_ERROR = -2147407872; -const int CSSM_DL_DB_RECORD_EXTENDED_ATTRIBUTE = -2147479548; +const int CSSM_KR_PRIVATE_ERROR = -2147406848; -const int CSSM_DL_DB_RECORD_METADATA = -2147450880; +const int CSSM_AC_BASE_ERROR = -2147405824; -const int CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT = 0; +const int CSSM_AC_PRIVATE_ERROR = -2147404800; -const int CSSM_APPLEFILEDL_COMMIT = 1; +const int CSSM_MDS_BASE_ERROR = -2147414016; -const int CSSM_APPLEFILEDL_ROLLBACK = 2; +const int CSSM_MDS_PRIVATE_ERROR = -2147412992; -const int CSSM_APPLEFILEDL_TAKE_FILE_LOCK = 3; +const int CSSMERR_CSSM_INVALID_ADDIN_HANDLE = -2147417855; -const int CSSM_APPLEFILEDL_MAKE_BACKUP = 4; +const int CSSMERR_CSSM_NOT_INITIALIZED = -2147417854; -const int CSSM_APPLEFILEDL_MAKE_COPY = 5; +const int CSSMERR_CSSM_INVALID_HANDLE_USAGE = -2147417853; -const int CSSM_APPLEFILEDL_DELETE_FILE = 6; +const int CSSMERR_CSSM_PVC_REFERENT_NOT_FOUND = -2147417852; -const int CSSM_APPLE_UNLOCK_TYPE_KEY_DIRECT = 1; +const int CSSMERR_CSSM_FUNCTION_INTEGRITY_FAIL = -2147417851; -const int CSSM_APPLE_UNLOCK_TYPE_WRAPPED_PRIVATE = 2; +const int CSSM_ERRCODE_INTERNAL_ERROR = 1; -const int CSSM_APPLE_UNLOCK_TYPE_KEYBAG = 3; +const int CSSM_ERRCODE_MEMORY_ERROR = 2; -const int CSSMERR_APPLEDL_INVALID_OPEN_PARAMETERS = -2147412992; +const int CSSM_ERRCODE_MDS_ERROR = 3; -const int CSSMERR_APPLEDL_DISK_FULL = -2147412991; +const int CSSM_ERRCODE_INVALID_POINTER = 4; -const int CSSMERR_APPLEDL_QUOTA_EXCEEDED = -2147412990; +const int CSSM_ERRCODE_INVALID_INPUT_POINTER = 5; -const int CSSMERR_APPLEDL_FILE_TOO_BIG = -2147412989; +const int CSSM_ERRCODE_INVALID_OUTPUT_POINTER = 6; -const int CSSMERR_APPLEDL_INVALID_DATABASE_BLOB = -2147412988; +const int CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED = 7; -const int CSSMERR_APPLEDL_INVALID_KEY_BLOB = -2147412987; +const int CSSM_ERRCODE_SELF_CHECK_FAILED = 8; -const int CSSMERR_APPLEDL_INCOMPATIBLE_DATABASE_BLOB = -2147412986; +const int CSSM_ERRCODE_OS_ACCESS_DENIED = 9; -const int CSSMERR_APPLEDL_INCOMPATIBLE_KEY_BLOB = -2147412985; +const int CSSM_ERRCODE_FUNCTION_FAILED = 10; -const int CSSMERR_APPLETP_HOSTNAME_MISMATCH = -2147408896; +const int CSSM_ERRCODE_MODULE_MANIFEST_VERIFY_FAILED = 11; -const int CSSMERR_APPLETP_UNKNOWN_CRITICAL_EXTEN = -2147408895; +const int CSSM_ERRCODE_INVALID_GUID = 12; -const int CSSMERR_APPLETP_NO_BASIC_CONSTRAINTS = -2147408894; +const int CSSM_ERRCODE_OPERATION_AUTH_DENIED = 32; -const int CSSMERR_APPLETP_INVALID_CA = -2147408893; +const int CSSM_ERRCODE_OBJECT_USE_AUTH_DENIED = 33; -const int CSSMERR_APPLETP_INVALID_AUTHORITY_ID = -2147408892; +const int CSSM_ERRCODE_OBJECT_MANIP_AUTH_DENIED = 34; -const int CSSMERR_APPLETP_INVALID_SUBJECT_ID = -2147408891; +const int CSSM_ERRCODE_OBJECT_ACL_NOT_SUPPORTED = 35; -const int CSSMERR_APPLETP_INVALID_KEY_USAGE = -2147408890; +const int CSSM_ERRCODE_OBJECT_ACL_REQUIRED = 36; -const int CSSMERR_APPLETP_INVALID_EXTENDED_KEY_USAGE = -2147408889; +const int CSSM_ERRCODE_INVALID_ACCESS_CREDENTIALS = 37; -const int CSSMERR_APPLETP_INVALID_ID_LINKAGE = -2147408888; +const int CSSM_ERRCODE_INVALID_ACL_BASE_CERTS = 38; -const int CSSMERR_APPLETP_PATH_LEN_CONSTRAINT = -2147408887; +const int CSSM_ERRCODE_ACL_BASE_CERTS_NOT_SUPPORTED = 39; -const int CSSMERR_APPLETP_INVALID_ROOT = -2147408886; +const int CSSM_ERRCODE_INVALID_SAMPLE_VALUE = 40; -const int CSSMERR_APPLETP_CRL_EXPIRED = -2147408885; +const int CSSM_ERRCODE_SAMPLE_VALUE_NOT_SUPPORTED = 41; -const int CSSMERR_APPLETP_CRL_NOT_VALID_YET = -2147408884; +const int CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE = 42; -const int CSSMERR_APPLETP_CRL_NOT_FOUND = -2147408883; +const int CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED = 43; -const int CSSMERR_APPLETP_CRL_SERVER_DOWN = -2147408882; +const int CSSM_ERRCODE_INVALID_ACL_CHALLENGE_CALLBACK = 44; -const int CSSMERR_APPLETP_CRL_BAD_URI = -2147408881; +const int CSSM_ERRCODE_ACL_CHALLENGE_CALLBACK_FAILED = 45; -const int CSSMERR_APPLETP_UNKNOWN_CERT_EXTEN = -2147408880; +const int CSSM_ERRCODE_INVALID_ACL_ENTRY_TAG = 46; -const int CSSMERR_APPLETP_UNKNOWN_CRL_EXTEN = -2147408879; +const int CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND = 47; -const int CSSMERR_APPLETP_CRL_NOT_TRUSTED = -2147408878; +const int CSSM_ERRCODE_INVALID_ACL_EDIT_MODE = 48; -const int CSSMERR_APPLETP_CRL_INVALID_ANCHOR_CERT = -2147408877; +const int CSSM_ERRCODE_ACL_CHANGE_FAILED = 49; -const int CSSMERR_APPLETP_CRL_POLICY_FAIL = -2147408876; +const int CSSM_ERRCODE_INVALID_NEW_ACL_ENTRY = 50; -const int CSSMERR_APPLETP_IDP_FAIL = -2147408875; +const int CSSM_ERRCODE_INVALID_NEW_ACL_OWNER = 51; -const int CSSMERR_APPLETP_CERT_NOT_FOUND_FROM_ISSUER = -2147408874; +const int CSSM_ERRCODE_ACL_DELETE_FAILED = 52; -const int CSSMERR_APPLETP_BAD_CERT_FROM_ISSUER = -2147408873; +const int CSSM_ERRCODE_ACL_REPLACE_FAILED = 53; -const int CSSMERR_APPLETP_SMIME_EMAIL_ADDRS_NOT_FOUND = -2147408872; +const int CSSM_ERRCODE_ACL_ADD_FAILED = 54; -const int CSSMERR_APPLETP_SMIME_BAD_EXT_KEY_USE = -2147408871; +const int CSSM_ERRCODE_INVALID_CONTEXT_HANDLE = 64; -const int CSSMERR_APPLETP_SMIME_BAD_KEY_USE = -2147408870; +const int CSSM_ERRCODE_INCOMPATIBLE_VERSION = 65; -const int CSSMERR_APPLETP_SMIME_KEYUSAGE_NOT_CRITICAL = -2147408869; +const int CSSM_ERRCODE_INVALID_CERTGROUP_POINTER = 66; -const int CSSMERR_APPLETP_SMIME_NO_EMAIL_ADDRS = -2147408868; +const int CSSM_ERRCODE_INVALID_CERT_POINTER = 67; -const int CSSMERR_APPLETP_SMIME_SUBJ_ALT_NAME_NOT_CRIT = -2147408867; +const int CSSM_ERRCODE_INVALID_CRL_POINTER = 68; -const int CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE = -2147408866; +const int CSSM_ERRCODE_INVALID_FIELD_POINTER = 69; -const int CSSMERR_APPLETP_OCSP_BAD_RESPONSE = -2147408865; +const int CSSM_ERRCODE_INVALID_DATA = 70; -const int CSSMERR_APPLETP_OCSP_BAD_REQUEST = -2147408864; +const int CSSM_ERRCODE_CRL_ALREADY_SIGNED = 71; -const int CSSMERR_APPLETP_OCSP_UNAVAILABLE = -2147408863; +const int CSSM_ERRCODE_INVALID_NUMBER_OF_FIELDS = 72; -const int CSSMERR_APPLETP_OCSP_STATUS_UNRECOGNIZED = -2147408862; +const int CSSM_ERRCODE_VERIFICATION_FAILURE = 73; -const int CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK = -2147408861; +const int CSSM_ERRCODE_INVALID_DB_HANDLE = 74; -const int CSSMERR_APPLETP_NETWORK_FAILURE = -2147408860; +const int CSSM_ERRCODE_PRIVILEGE_NOT_GRANTED = 75; -const int CSSMERR_APPLETP_OCSP_NOT_TRUSTED = -2147408859; +const int CSSM_ERRCODE_INVALID_DB_LIST = 76; -const int CSSMERR_APPLETP_OCSP_INVALID_ANCHOR_CERT = -2147408858; +const int CSSM_ERRCODE_INVALID_DB_LIST_POINTER = 77; -const int CSSMERR_APPLETP_OCSP_SIG_ERROR = -2147408857; +const int CSSM_ERRCODE_UNKNOWN_FORMAT = 78; -const int CSSMERR_APPLETP_OCSP_NO_SIGNER = -2147408856; +const int CSSM_ERRCODE_UNKNOWN_TAG = 79; -const int CSSMERR_APPLETP_OCSP_RESP_MALFORMED_REQ = -2147408855; +const int CSSM_ERRCODE_INVALID_CSP_HANDLE = 80; -const int CSSMERR_APPLETP_OCSP_RESP_INTERNAL_ERR = -2147408854; +const int CSSM_ERRCODE_INVALID_DL_HANDLE = 81; -const int CSSMERR_APPLETP_OCSP_RESP_TRY_LATER = -2147408853; +const int CSSM_ERRCODE_INVALID_CL_HANDLE = 82; -const int CSSMERR_APPLETP_OCSP_RESP_SIG_REQUIRED = -2147408852; +const int CSSM_ERRCODE_INVALID_TP_HANDLE = 83; -const int CSSMERR_APPLETP_OCSP_RESP_UNAUTHORIZED = -2147408851; +const int CSSM_ERRCODE_INVALID_KR_HANDLE = 84; -const int CSSMERR_APPLETP_OCSP_NONCE_MISMATCH = -2147408850; +const int CSSM_ERRCODE_INVALID_AC_HANDLE = 85; -const int CSSMERR_APPLETP_CS_BAD_CERT_CHAIN_LENGTH = -2147408849; +const int CSSM_ERRCODE_INVALID_PASSTHROUGH_ID = 86; -const int CSSMERR_APPLETP_CS_NO_BASIC_CONSTRAINTS = -2147408848; +const int CSSM_ERRCODE_INVALID_NETWORK_ADDR = 87; -const int CSSMERR_APPLETP_CS_BAD_PATH_LENGTH = -2147408847; +const int CSSM_ERRCODE_INVALID_CRYPTO_DATA = 88; -const int CSSMERR_APPLETP_CS_NO_EXTENDED_KEY_USAGE = -2147408846; +const int CSSMERR_CSSM_INTERNAL_ERROR = -2147418111; -const int CSSMERR_APPLETP_CODE_SIGN_DEVELOPMENT = -2147408845; +const int CSSMERR_CSSM_MEMORY_ERROR = -2147418110; -const int CSSMERR_APPLETP_RS_BAD_CERT_CHAIN_LENGTH = -2147408844; +const int CSSMERR_CSSM_MDS_ERROR = -2147418109; -const int CSSMERR_APPLETP_RS_BAD_EXTENDED_KEY_USAGE = -2147408843; +const int CSSMERR_CSSM_INVALID_POINTER = -2147418108; -const int CSSMERR_APPLETP_TRUST_SETTING_DENY = -2147408842; +const int CSSMERR_CSSM_INVALID_INPUT_POINTER = -2147418107; -const int CSSMERR_APPLETP_INVALID_EMPTY_SUBJECT = -2147408841; +const int CSSMERR_CSSM_INVALID_OUTPUT_POINTER = -2147418106; -const int CSSMERR_APPLETP_UNKNOWN_QUAL_CERT_STATEMENT = -2147408840; +const int CSSMERR_CSSM_FUNCTION_NOT_IMPLEMENTED = -2147418105; -const int CSSMERR_APPLETP_MISSING_REQUIRED_EXTENSION = -2147408839; +const int CSSMERR_CSSM_SELF_CHECK_FAILED = -2147418104; -const int CSSMERR_APPLETP_EXT_KEYUSAGE_NOT_CRITICAL = -2147408838; +const int CSSMERR_CSSM_OS_ACCESS_DENIED = -2147418103; -const int CSSMERR_APPLETP_IDENTIFIER_MISSING = -2147408837; +const int CSSMERR_CSSM_FUNCTION_FAILED = -2147418102; -const int CSSMERR_APPLETP_CA_PIN_MISMATCH = -2147408836; +const int CSSMERR_CSSM_MODULE_MANIFEST_VERIFY_FAILED = -2147418101; -const int CSSMERR_APPLETP_LEAF_PIN_MISMATCH = -2147408835; +const int CSSMERR_CSSM_INVALID_GUID = -2147418100; -const int CSSMERR_APPLE_DOTMAC_REQ_QUEUED = -2147408796; +const int CSSMERR_CSSM_INVALID_CONTEXT_HANDLE = -2147418048; -const int CSSMERR_APPLE_DOTMAC_REQ_REDIRECT = -2147408795; +const int CSSMERR_CSSM_INCOMPATIBLE_VERSION = -2147418047; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ERR = -2147408794; +const int CSSMERR_CSSM_PRIVILEGE_NOT_GRANTED = -2147418037; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_PARAM = -2147408793; +const int CSSM_CSSM_BASE_CSSM_ERROR = -2147417840; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_AUTH = -2147408792; +const int CSSMERR_CSSM_SCOPE_NOT_SUPPORTED = -2147417839; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_UNIMPL = -2147408791; +const int CSSMERR_CSSM_PVC_ALREADY_CONFIGURED = -2147417838; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_NOT_AVAIL = -2147408790; +const int CSSMERR_CSSM_INVALID_PVC = -2147417837; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ALREADY_EXIST = -2147408789; +const int CSSMERR_CSSM_EMM_LOAD_FAILED = -2147417836; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_SERVICE_ERROR = -2147408788; +const int CSSMERR_CSSM_EMM_UNLOAD_FAILED = -2147417835; -const int CSSMERR_APPLE_DOTMAC_REQ_IS_PENDING = -2147408787; +const int CSSMERR_CSSM_ADDIN_LOAD_FAILED = -2147417834; -const int CSSMERR_APPLE_DOTMAC_NO_REQ_PENDING = -2147408786; +const int CSSMERR_CSSM_INVALID_KEY_HIERARCHY = -2147417833; -const int CSSMERR_APPLE_DOTMAC_CSR_VERIFY_FAIL = -2147408785; +const int CSSMERR_CSSM_ADDIN_UNLOAD_FAILED = -2147417832; -const int CSSMERR_APPLE_DOTMAC_FAILED_CONSISTENCY_CHECK = -2147408784; +const int CSSMERR_CSSM_LIB_REF_NOT_FOUND = -2147417831; -const int CSSM_APPLEDL_OPEN_PARAMETERS_VERSION = 1; +const int CSSMERR_CSSM_INVALID_ADDIN_FUNCTION_TABLE = -2147417830; -const int CSSM_APPLECSPDL_DB_LOCK = 0; +const int CSSMERR_CSSM_EMM_AUTHENTICATE_FAILED = -2147417829; -const int CSSM_APPLECSPDL_DB_UNLOCK = 1; +const int CSSMERR_CSSM_ADDIN_AUTHENTICATE_FAILED = -2147417828; -const int CSSM_APPLECSPDL_DB_GET_SETTINGS = 2; +const int CSSMERR_CSSM_INVALID_SERVICE_MASK = -2147417827; -const int CSSM_APPLECSPDL_DB_SET_SETTINGS = 3; +const int CSSMERR_CSSM_MODULE_NOT_LOADED = -2147417826; -const int CSSM_APPLECSPDL_DB_IS_LOCKED = 4; +const int CSSMERR_CSSM_INVALID_SUBSERVICEID = -2147417825; -const int CSSM_APPLECSPDL_DB_CHANGE_PASSWORD = 5; +const int CSSMERR_CSSM_BUFFER_TOO_SMALL = -2147417824; -const int CSSM_APPLECSPDL_DB_GET_HANDLE = 6; +const int CSSMERR_CSSM_INVALID_ATTRIBUTE = -2147417823; -const int CSSM_APPLESCPDL_CSP_GET_KEYHANDLE = 7; +const int CSSMERR_CSSM_ATTRIBUTE_NOT_IN_CONTEXT = -2147417822; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_8 = 8; +const int CSSMERR_CSSM_MODULE_MANAGER_INITIALIZE_FAIL = -2147417821; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_9 = 9; +const int CSSMERR_CSSM_MODULE_MANAGER_NOT_FOUND = -2147417820; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_10 = 10; +const int CSSMERR_CSSM_EVENT_NOTIFICATION_CALLBACK_NOT_FOUND = -2147417819; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_11 = 11; +const int CSSMERR_CSP_INTERNAL_ERROR = -2147416063; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_12 = 12; +const int CSSMERR_CSP_MEMORY_ERROR = -2147416062; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_13 = 13; +const int CSSMERR_CSP_MDS_ERROR = -2147416061; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_14 = 14; +const int CSSMERR_CSP_INVALID_POINTER = -2147416060; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_15 = 15; +const int CSSMERR_CSP_INVALID_INPUT_POINTER = -2147416059; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_16 = 16; +const int CSSMERR_CSP_INVALID_OUTPUT_POINTER = -2147416058; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_17 = 17; +const int CSSMERR_CSP_FUNCTION_NOT_IMPLEMENTED = -2147416057; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_18 = 18; +const int CSSMERR_CSP_SELF_CHECK_FAILED = -2147416056; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_19 = 19; +const int CSSMERR_CSP_OS_ACCESS_DENIED = -2147416055; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_20 = 20; +const int CSSMERR_CSP_FUNCTION_FAILED = -2147416054; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_21 = 21; +const int CSSMERR_CSP_OPERATION_AUTH_DENIED = -2147416032; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_22 = 22; +const int CSSMERR_CSP_OBJECT_USE_AUTH_DENIED = -2147416031; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_23 = 23; +const int CSSMERR_CSP_OBJECT_MANIP_AUTH_DENIED = -2147416030; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_24 = 24; +const int CSSMERR_CSP_OBJECT_ACL_NOT_SUPPORTED = -2147416029; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_25 = 25; +const int CSSMERR_CSP_OBJECT_ACL_REQUIRED = -2147416028; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_26 = 26; +const int CSSMERR_CSP_INVALID_ACCESS_CREDENTIALS = -2147416027; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_27 = 27; +const int CSSMERR_CSP_INVALID_ACL_BASE_CERTS = -2147416026; -const int CSSM_APPLECSP_KEYDIGEST = 256; +const int CSSMERR_CSP_ACL_BASE_CERTS_NOT_SUPPORTED = -2147416025; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_APPLE_CUSTOM = 100; +const int CSSMERR_CSP_INVALID_SAMPLE_VALUE = -2147416024; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSL = 101; +const int CSSMERR_CSP_SAMPLE_VALUE_NOT_SUPPORTED = -2147416023; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSH1 = 102; +const int CSSMERR_CSP_INVALID_ACL_SUBJECT_VALUE = -2147416022; -const int CSSM_ATTRIBUTE_VENDOR_DEFINED = 8388608; +const int CSSMERR_CSP_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147416021; -const int CSSM_ATTRIBUTE_PUBLIC_KEY = 1082130432; +const int CSSMERR_CSP_INVALID_ACL_CHALLENGE_CALLBACK = -2147416020; -const int CSSM_ATTRIBUTE_FEE_PRIME_TYPE = 276824065; +const int CSSMERR_CSP_ACL_CHALLENGE_CALLBACK_FAILED = -2147416019; -const int CSSM_ATTRIBUTE_FEE_CURVE_TYPE = 276824066; +const int CSSMERR_CSP_INVALID_ACL_ENTRY_TAG = -2147416018; -const int CSSM_ATTRIBUTE_ASC_OPTIMIZATION = 276824067; +const int CSSMERR_CSP_ACL_ENTRY_TAG_NOT_FOUND = -2147416017; -const int CSSM_ATTRIBUTE_RSA_BLINDING = 276824068; +const int CSSMERR_CSP_INVALID_ACL_EDIT_MODE = -2147416016; -const int CSSM_ATTRIBUTE_PARAM_KEY = 1082130437; +const int CSSMERR_CSP_ACL_CHANGE_FAILED = -2147416015; -const int CSSM_ATTRIBUTE_PROMPT = 545259526; +const int CSSMERR_CSP_INVALID_NEW_ACL_ENTRY = -2147416014; -const int CSSM_ATTRIBUTE_ALERT_TITLE = 545259527; +const int CSSMERR_CSP_INVALID_NEW_ACL_OWNER = -2147416013; -const int CSSM_ATTRIBUTE_VERIFY_PASSPHRASE = 276824072; +const int CSSMERR_CSP_ACL_DELETE_FAILED = -2147416012; -const int CSSM_FEE_PRIME_TYPE_DEFAULT = 0; +const int CSSMERR_CSP_ACL_REPLACE_FAILED = -2147416011; -const int CSSM_FEE_PRIME_TYPE_MERSENNE = 1; +const int CSSMERR_CSP_ACL_ADD_FAILED = -2147416010; -const int CSSM_FEE_PRIME_TYPE_FEE = 2; +const int CSSMERR_CSP_INVALID_CONTEXT_HANDLE = -2147416000; -const int CSSM_FEE_PRIME_TYPE_GENERAL = 3; +const int CSSMERR_CSP_PRIVILEGE_NOT_GRANTED = -2147415989; -const int CSSM_FEE_CURVE_TYPE_DEFAULT = 0; +const int CSSMERR_CSP_INVALID_DATA = -2147415994; -const int CSSM_FEE_CURVE_TYPE_MONTGOMERY = 1; +const int CSSMERR_CSP_INVALID_PASSTHROUGH_ID = -2147415978; -const int CSSM_FEE_CURVE_TYPE_WEIERSTRASS = 2; +const int CSSMERR_CSP_INVALID_CRYPTO_DATA = -2147415976; -const int CSSM_FEE_CURVE_TYPE_ANSI_X9_62 = 3; +const int CSSM_CSP_BASE_CSP_ERROR = -2147415808; -const int CSSM_ASC_OPTIMIZE_DEFAULT = 0; +const int CSSMERR_CSP_INPUT_LENGTH_ERROR = -2147415807; -const int CSSM_ASC_OPTIMIZE_SIZE = 1; +const int CSSMERR_CSP_OUTPUT_LENGTH_ERROR = -2147415806; -const int CSSM_ASC_OPTIMIZE_SECURITY = 2; +const int CSSMERR_CSP_PRIVILEGE_NOT_SUPPORTED = -2147415805; -const int CSSM_ASC_OPTIMIZE_TIME = 3; +const int CSSMERR_CSP_DEVICE_ERROR = -2147415804; -const int CSSM_ASC_OPTIMIZE_TIME_SIZE = 4; +const int CSSMERR_CSP_DEVICE_MEMORY_ERROR = -2147415803; -const int CSSM_ASC_OPTIMIZE_ASCII = 5; +const int CSSMERR_CSP_ATTACH_HANDLE_BUSY = -2147415802; -const int CSSM_KEYATTR_PARTIAL = 65536; +const int CSSMERR_CSP_NOT_LOGGED_IN = -2147415801; -const int CSSM_KEYATTR_PUBLIC_KEY_ENCRYPT = 131072; +const int CSSMERR_CSP_INVALID_KEY = -2147415792; -const int CSSM_TP_ACTION_REQUIRE_CRL_PER_CERT = 1; +const int CSSMERR_CSP_INVALID_KEY_REFERENCE = -2147415791; -const int CSSM_TP_ACTION_FETCH_CRL_FROM_NET = 2; +const int CSSMERR_CSP_INVALID_KEY_CLASS = -2147415790; -const int CSSM_TP_ACTION_CRL_SUFFICIENT = 4; +const int CSSMERR_CSP_ALGID_MISMATCH = -2147415789; -const int CSSM_TP_ACTION_REQUIRE_CRL_IF_PRESENT = 8; +const int CSSMERR_CSP_KEY_USAGE_INCORRECT = -2147415788; -const int CSSM_TP_ACTION_ALLOW_EXPIRED = 1; +const int CSSMERR_CSP_KEY_BLOB_TYPE_INCORRECT = -2147415787; -const int CSSM_TP_ACTION_LEAF_IS_CA = 2; +const int CSSMERR_CSP_KEY_HEADER_INCONSISTENT = -2147415786; -const int CSSM_TP_ACTION_FETCH_CERT_FROM_NET = 4; +const int CSSMERR_CSP_UNSUPPORTED_KEY_FORMAT = -2147415785; -const int CSSM_TP_ACTION_ALLOW_EXPIRED_ROOT = 8; +const int CSSMERR_CSP_UNSUPPORTED_KEY_SIZE = -2147415784; -const int CSSM_TP_ACTION_REQUIRE_REV_PER_CERT = 16; +const int CSSMERR_CSP_INVALID_KEY_POINTER = -2147415783; -const int CSSM_TP_ACTION_TRUST_SETTINGS = 32; +const int CSSMERR_CSP_INVALID_KEYUSAGE_MASK = -2147415782; -const int CSSM_TP_ACTION_IMPLICIT_ANCHORS = 64; +const int CSSMERR_CSP_UNSUPPORTED_KEYUSAGE_MASK = -2147415781; -const int CSSM_CERT_STATUS_EXPIRED = 1; +const int CSSMERR_CSP_INVALID_KEYATTR_MASK = -2147415780; -const int CSSM_CERT_STATUS_NOT_VALID_YET = 2; +const int CSSMERR_CSP_UNSUPPORTED_KEYATTR_MASK = -2147415779; -const int CSSM_CERT_STATUS_IS_IN_INPUT_CERTS = 4; +const int CSSMERR_CSP_INVALID_KEY_LABEL = -2147415778; -const int CSSM_CERT_STATUS_IS_IN_ANCHORS = 8; +const int CSSMERR_CSP_UNSUPPORTED_KEY_LABEL = -2147415777; -const int CSSM_CERT_STATUS_IS_ROOT = 16; +const int CSSMERR_CSP_INVALID_KEY_FORMAT = -2147415776; -const int CSSM_CERT_STATUS_IS_FROM_NET = 32; +const int CSSMERR_CSP_INVALID_DATA_COUNT = -2147415768; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_USER = 64; +const int CSSMERR_CSP_VECTOR_OF_BUFS_UNSUPPORTED = -2147415767; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_ADMIN = 128; +const int CSSMERR_CSP_INVALID_INPUT_VECTOR = -2147415766; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_SYSTEM = 256; +const int CSSMERR_CSP_INVALID_OUTPUT_VECTOR = -2147415765; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_TRUST = 512; +const int CSSMERR_CSP_INVALID_CONTEXT = -2147415760; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_DENY = 1024; +const int CSSMERR_CSP_INVALID_ALGORITHM = -2147415759; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_IGNORED_ERROR = 2048; +const int CSSMERR_CSP_INVALID_ATTR_KEY = -2147415754; -const int CSSM_EVIDENCE_FORM_APPLE_HEADER = -2147483648; +const int CSSMERR_CSP_MISSING_ATTR_KEY = -2147415753; -const int CSSM_EVIDENCE_FORM_APPLE_CERTGROUP = -2147483647; +const int CSSMERR_CSP_INVALID_ATTR_INIT_VECTOR = -2147415752; -const int CSSM_EVIDENCE_FORM_APPLE_CERT_INFO = -2147483646; +const int CSSMERR_CSP_MISSING_ATTR_INIT_VECTOR = -2147415751; -const int CSSM_APPLEX509CL_OBTAIN_CSR = 0; +const int CSSMERR_CSP_INVALID_ATTR_SALT = -2147415750; -const int CSSM_APPLEX509CL_VERIFY_CSR = 1; +const int CSSMERR_CSP_MISSING_ATTR_SALT = -2147415749; -const int kSecSubjectItemAttr = 1937072746; +const int CSSMERR_CSP_INVALID_ATTR_PADDING = -2147415748; -const int kSecIssuerItemAttr = 1769173877; +const int CSSMERR_CSP_MISSING_ATTR_PADDING = -2147415747; -const int kSecSerialNumberItemAttr = 1936614002; +const int CSSMERR_CSP_INVALID_ATTR_RANDOM = -2147415746; -const int kSecPublicKeyHashItemAttr = 1752198009; +const int CSSMERR_CSP_MISSING_ATTR_RANDOM = -2147415745; -const int kSecSubjectKeyIdentifierItemAttr = 1936419172; +const int CSSMERR_CSP_INVALID_ATTR_SEED = -2147415744; -const int kSecCertTypeItemAttr = 1668577648; +const int CSSMERR_CSP_MISSING_ATTR_SEED = -2147415743; -const int kSecCertEncodingItemAttr = 1667591779; +const int CSSMERR_CSP_INVALID_ATTR_PASSPHRASE = -2147415742; -const int SSL_NULL_WITH_NULL_NULL = 0; +const int CSSMERR_CSP_MISSING_ATTR_PASSPHRASE = -2147415741; -const int SSL_RSA_WITH_NULL_MD5 = 1; +const int CSSMERR_CSP_INVALID_ATTR_KEY_LENGTH = -2147415740; -const int SSL_RSA_WITH_NULL_SHA = 2; +const int CSSMERR_CSP_MISSING_ATTR_KEY_LENGTH = -2147415739; -const int SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3; +const int CSSMERR_CSP_INVALID_ATTR_BLOCK_SIZE = -2147415738; -const int SSL_RSA_WITH_RC4_128_MD5 = 4; +const int CSSMERR_CSP_MISSING_ATTR_BLOCK_SIZE = -2147415737; -const int SSL_RSA_WITH_RC4_128_SHA = 5; +const int CSSMERR_CSP_INVALID_ATTR_OUTPUT_SIZE = -2147415708; -const int SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6; +const int CSSMERR_CSP_MISSING_ATTR_OUTPUT_SIZE = -2147415707; -const int SSL_RSA_WITH_IDEA_CBC_SHA = 7; +const int CSSMERR_CSP_INVALID_ATTR_ROUNDS = -2147415706; -const int SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8; +const int CSSMERR_CSP_MISSING_ATTR_ROUNDS = -2147415705; -const int SSL_RSA_WITH_DES_CBC_SHA = 9; +const int CSSMERR_CSP_INVALID_ATTR_ALG_PARAMS = -2147415704; -const int SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10; +const int CSSMERR_CSP_MISSING_ATTR_ALG_PARAMS = -2147415703; -const int SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11; +const int CSSMERR_CSP_INVALID_ATTR_LABEL = -2147415702; -const int SSL_DH_DSS_WITH_DES_CBC_SHA = 12; +const int CSSMERR_CSP_MISSING_ATTR_LABEL = -2147415701; -const int SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; +const int CSSMERR_CSP_INVALID_ATTR_KEY_TYPE = -2147415700; -const int SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14; +const int CSSMERR_CSP_MISSING_ATTR_KEY_TYPE = -2147415699; -const int SSL_DH_RSA_WITH_DES_CBC_SHA = 15; +const int CSSMERR_CSP_INVALID_ATTR_MODE = -2147415698; -const int SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; +const int CSSMERR_CSP_MISSING_ATTR_MODE = -2147415697; -const int SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17; +const int CSSMERR_CSP_INVALID_ATTR_EFFECTIVE_BITS = -2147415696; -const int SSL_DHE_DSS_WITH_DES_CBC_SHA = 18; +const int CSSMERR_CSP_MISSING_ATTR_EFFECTIVE_BITS = -2147415695; -const int SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; +const int CSSMERR_CSP_INVALID_ATTR_START_DATE = -2147415694; -const int SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20; +const int CSSMERR_CSP_MISSING_ATTR_START_DATE = -2147415693; -const int SSL_DHE_RSA_WITH_DES_CBC_SHA = 21; +const int CSSMERR_CSP_INVALID_ATTR_END_DATE = -2147415692; -const int SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; +const int CSSMERR_CSP_MISSING_ATTR_END_DATE = -2147415691; -const int SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23; +const int CSSMERR_CSP_INVALID_ATTR_VERSION = -2147415690; -const int SSL_DH_anon_WITH_RC4_128_MD5 = 24; +const int CSSMERR_CSP_MISSING_ATTR_VERSION = -2147415689; -const int SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25; +const int CSSMERR_CSP_INVALID_ATTR_PRIME = -2147415688; -const int SSL_DH_anon_WITH_DES_CBC_SHA = 26; +const int CSSMERR_CSP_MISSING_ATTR_PRIME = -2147415687; -const int SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; +const int CSSMERR_CSP_INVALID_ATTR_BASE = -2147415686; -const int SSL_FORTEZZA_DMS_WITH_NULL_SHA = 28; +const int CSSMERR_CSP_MISSING_ATTR_BASE = -2147415685; -const int SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = 29; +const int CSSMERR_CSP_INVALID_ATTR_SUBPRIME = -2147415684; -const int TLS_RSA_WITH_AES_128_CBC_SHA = 47; +const int CSSMERR_CSP_MISSING_ATTR_SUBPRIME = -2147415683; -const int TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48; +const int CSSMERR_CSP_INVALID_ATTR_ITERATION_COUNT = -2147415682; -const int TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49; +const int CSSMERR_CSP_MISSING_ATTR_ITERATION_COUNT = -2147415681; -const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50; +const int CSSMERR_CSP_INVALID_ATTR_DL_DB_HANDLE = -2147415680; -const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51; +const int CSSMERR_CSP_MISSING_ATTR_DL_DB_HANDLE = -2147415679; -const int TLS_DH_anon_WITH_AES_128_CBC_SHA = 52; +const int CSSMERR_CSP_INVALID_ATTR_ACCESS_CREDENTIALS = -2147415678; -const int TLS_RSA_WITH_AES_256_CBC_SHA = 53; +const int CSSMERR_CSP_MISSING_ATTR_ACCESS_CREDENTIALS = -2147415677; -const int TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54; +const int CSSMERR_CSP_INVALID_ATTR_PUBLIC_KEY_FORMAT = -2147415676; -const int TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55; +const int CSSMERR_CSP_MISSING_ATTR_PUBLIC_KEY_FORMAT = -2147415675; -const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56; +const int CSSMERR_CSP_INVALID_ATTR_PRIVATE_KEY_FORMAT = -2147415674; -const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57; +const int CSSMERR_CSP_MISSING_ATTR_PRIVATE_KEY_FORMAT = -2147415673; -const int TLS_DH_anon_WITH_AES_256_CBC_SHA = 58; +const int CSSMERR_CSP_INVALID_ATTR_SYMMETRIC_KEY_FORMAT = -2147415672; -const int TLS_ECDH_ECDSA_WITH_NULL_SHA = -16383; +const int CSSMERR_CSP_MISSING_ATTR_SYMMETRIC_KEY_FORMAT = -2147415671; -const int TLS_ECDH_ECDSA_WITH_RC4_128_SHA = -16382; +const int CSSMERR_CSP_INVALID_ATTR_WRAPPED_KEY_FORMAT = -2147415670; -const int TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = -16381; +const int CSSMERR_CSP_MISSING_ATTR_WRAPPED_KEY_FORMAT = -2147415669; -const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = -16380; +const int CSSMERR_CSP_STAGED_OPERATION_IN_PROGRESS = -2147415736; -const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = -16379; +const int CSSMERR_CSP_STAGED_OPERATION_NOT_STARTED = -2147415735; -const int TLS_ECDHE_ECDSA_WITH_NULL_SHA = -16378; +const int CSSMERR_CSP_VERIFY_FAILED = -2147415734; -const int TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = -16377; +const int CSSMERR_CSP_INVALID_SIGNATURE = -2147415733; -const int TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; +const int CSSMERR_CSP_QUERY_SIZE_UNKNOWN = -2147415732; -const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; +const int CSSMERR_CSP_BLOCK_SIZE_MISMATCH = -2147415731; -const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; +const int CSSMERR_CSP_PRIVATE_KEY_NOT_FOUND = -2147415730; -const int TLS_ECDH_RSA_WITH_NULL_SHA = -16373; +const int CSSMERR_CSP_PUBLIC_KEY_INCONSISTENT = -2147415729; -const int TLS_ECDH_RSA_WITH_RC4_128_SHA = -16372; +const int CSSMERR_CSP_DEVICE_VERIFY_FAILED = -2147415728; -const int TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = -16371; +const int CSSMERR_CSP_INVALID_LOGIN_NAME = -2147415727; -const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = -16370; +const int CSSMERR_CSP_ALREADY_LOGGED_IN = -2147415726; -const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = -16369; +const int CSSMERR_CSP_PRIVATE_KEY_ALREADY_EXISTS = -2147415725; -const int TLS_ECDHE_RSA_WITH_NULL_SHA = -16368; +const int CSSMERR_CSP_KEY_LABEL_ALREADY_EXISTS = -2147415724; -const int TLS_ECDHE_RSA_WITH_RC4_128_SHA = -16367; +const int CSSMERR_CSP_INVALID_DIGEST_ALGORITHM = -2147415723; -const int TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; +const int CSSMERR_CSP_CRYPTO_DATA_CALLBACK_FAILED = -2147415722; -const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; +const int CSSMERR_TP_INTERNAL_ERROR = -2147409919; -const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; +const int CSSMERR_TP_MEMORY_ERROR = -2147409918; -const int TLS_ECDH_anon_WITH_NULL_SHA = -16363; +const int CSSMERR_TP_MDS_ERROR = -2147409917; -const int TLS_ECDH_anon_WITH_RC4_128_SHA = -16362; +const int CSSMERR_TP_INVALID_POINTER = -2147409916; -const int TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = -16361; +const int CSSMERR_TP_INVALID_INPUT_POINTER = -2147409915; -const int TLS_ECDH_anon_WITH_AES_128_CBC_SHA = -16360; +const int CSSMERR_TP_INVALID_OUTPUT_POINTER = -2147409914; -const int TLS_ECDH_anon_WITH_AES_256_CBC_SHA = -16359; +const int CSSMERR_TP_FUNCTION_NOT_IMPLEMENTED = -2147409913; -const int TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = -16331; +const int CSSMERR_TP_SELF_CHECK_FAILED = -2147409912; -const int TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = -16330; +const int CSSMERR_TP_OS_ACCESS_DENIED = -2147409911; -const int TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = -13141; +const int CSSMERR_TP_FUNCTION_FAILED = -2147409910; -const int TLS_NULL_WITH_NULL_NULL = 0; +const int CSSMERR_TP_INVALID_CONTEXT_HANDLE = -2147409856; -const int TLS_RSA_WITH_NULL_MD5 = 1; +const int CSSMERR_TP_INVALID_DATA = -2147409850; -const int TLS_RSA_WITH_NULL_SHA = 2; +const int CSSMERR_TP_INVALID_DB_LIST = -2147409844; -const int TLS_RSA_WITH_RC4_128_MD5 = 4; +const int CSSMERR_TP_INVALID_CERTGROUP_POINTER = -2147409854; -const int TLS_RSA_WITH_RC4_128_SHA = 5; +const int CSSMERR_TP_INVALID_CERT_POINTER = -2147409853; -const int TLS_RSA_WITH_3DES_EDE_CBC_SHA = 10; +const int CSSMERR_TP_INVALID_CRL_POINTER = -2147409852; -const int TLS_RSA_WITH_NULL_SHA256 = 59; +const int CSSMERR_TP_INVALID_FIELD_POINTER = -2147409851; -const int TLS_RSA_WITH_AES_128_CBC_SHA256 = 60; +const int CSSMERR_TP_INVALID_NETWORK_ADDR = -2147409833; -const int TLS_RSA_WITH_AES_256_CBC_SHA256 = 61; +const int CSSMERR_TP_CRL_ALREADY_SIGNED = -2147409849; -const int TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; +const int CSSMERR_TP_INVALID_NUMBER_OF_FIELDS = -2147409848; -const int TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; +const int CSSMERR_TP_VERIFICATION_FAILURE = -2147409847; -const int TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; +const int CSSMERR_TP_INVALID_DB_HANDLE = -2147409846; -const int TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; +const int CSSMERR_TP_UNKNOWN_FORMAT = -2147409842; -const int TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 62; +const int CSSMERR_TP_UNKNOWN_TAG = -2147409841; -const int TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 63; +const int CSSMERR_TP_INVALID_PASSTHROUGH_ID = -2147409834; -const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 64; +const int CSSMERR_TP_INVALID_CSP_HANDLE = -2147409840; -const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 103; +const int CSSMERR_TP_INVALID_DL_HANDLE = -2147409839; -const int TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 104; +const int CSSMERR_TP_INVALID_CL_HANDLE = -2147409838; -const int TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 105; +const int CSSMERR_TP_INVALID_DB_LIST_POINTER = -2147409843; -const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 106; +const int CSSM_TP_BASE_TP_ERROR = -2147409664; -const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 107; +const int CSSMERR_TP_INVALID_CALLERAUTH_CONTEXT_POINTER = -2147409663; -const int TLS_DH_anon_WITH_RC4_128_MD5 = 24; +const int CSSMERR_TP_INVALID_IDENTIFIER_POINTER = -2147409662; -const int TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; +const int CSSMERR_TP_INVALID_KEYCACHE_HANDLE = -2147409661; -const int TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 108; +const int CSSMERR_TP_INVALID_CERTGROUP = -2147409660; -const int TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 109; +const int CSSMERR_TP_INVALID_CRLGROUP = -2147409659; -const int TLS_PSK_WITH_RC4_128_SHA = 138; +const int CSSMERR_TP_INVALID_CRLGROUP_POINTER = -2147409658; -const int TLS_PSK_WITH_3DES_EDE_CBC_SHA = 139; +const int CSSMERR_TP_AUTHENTICATION_FAILED = -2147409657; -const int TLS_PSK_WITH_AES_128_CBC_SHA = 140; +const int CSSMERR_TP_CERTGROUP_INCOMPLETE = -2147409656; -const int TLS_PSK_WITH_AES_256_CBC_SHA = 141; +const int CSSMERR_TP_CERTIFICATE_CANT_OPERATE = -2147409655; -const int TLS_DHE_PSK_WITH_RC4_128_SHA = 142; +const int CSSMERR_TP_CERT_EXPIRED = -2147409654; -const int TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = 143; +const int CSSMERR_TP_CERT_NOT_VALID_YET = -2147409653; -const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA = 144; +const int CSSMERR_TP_CERT_REVOKED = -2147409652; -const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA = 145; +const int CSSMERR_TP_CERT_SUSPENDED = -2147409651; -const int TLS_RSA_PSK_WITH_RC4_128_SHA = 146; +const int CSSMERR_TP_INSUFFICIENT_CREDENTIALS = -2147409650; -const int TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = 147; +const int CSSMERR_TP_INVALID_ACTION = -2147409649; -const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA = 148; +const int CSSMERR_TP_INVALID_ACTION_DATA = -2147409648; -const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA = 149; +const int CSSMERR_TP_INVALID_ANCHOR_CERT = -2147409646; -const int TLS_PSK_WITH_NULL_SHA = 44; +const int CSSMERR_TP_INVALID_AUTHORITY = -2147409645; -const int TLS_DHE_PSK_WITH_NULL_SHA = 45; +const int CSSMERR_TP_VERIFY_ACTION_FAILED = -2147409644; -const int TLS_RSA_PSK_WITH_NULL_SHA = 46; +const int CSSMERR_TP_INVALID_CERTIFICATE = -2147409643; -const int TLS_RSA_WITH_AES_128_GCM_SHA256 = 156; +const int CSSMERR_TP_INVALID_CERT_AUTHORITY = -2147409642; -const int TLS_RSA_WITH_AES_256_GCM_SHA384 = 157; +const int CSSMERR_TP_INVALID_CRL_AUTHORITY = -2147409641; -const int TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 158; +const int CSSMERR_TP_INVALID_CRL_ENCODING = -2147409640; -const int TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 159; +const int CSSMERR_TP_INVALID_CRL_TYPE = -2147409639; -const int TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = 160; +const int CSSMERR_TP_INVALID_CRL = -2147409638; -const int TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = 161; +const int CSSMERR_TP_INVALID_FORM_TYPE = -2147409637; -const int TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = 162; +const int CSSMERR_TP_INVALID_ID = -2147409636; -const int TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = 163; +const int CSSMERR_TP_INVALID_IDENTIFIER = -2147409635; -const int TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = 164; +const int CSSMERR_TP_INVALID_INDEX = -2147409634; -const int TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = 165; +const int CSSMERR_TP_INVALID_NAME = -2147409633; -const int TLS_DH_anon_WITH_AES_128_GCM_SHA256 = 166; +const int CSSMERR_TP_INVALID_POLICY_IDENTIFIERS = -2147409632; -const int TLS_DH_anon_WITH_AES_256_GCM_SHA384 = 167; +const int CSSMERR_TP_INVALID_TIMESTRING = -2147409631; -const int TLS_PSK_WITH_AES_128_GCM_SHA256 = 168; +const int CSSMERR_TP_INVALID_REASON = -2147409630; -const int TLS_PSK_WITH_AES_256_GCM_SHA384 = 169; +const int CSSMERR_TP_INVALID_REQUEST_INPUTS = -2147409629; -const int TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 170; +const int CSSMERR_TP_INVALID_RESPONSE_VECTOR = -2147409628; -const int TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 171; +const int CSSMERR_TP_INVALID_SIGNATURE = -2147409627; -const int TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = 172; +const int CSSMERR_TP_INVALID_STOP_ON_POLICY = -2147409626; -const int TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = 173; +const int CSSMERR_TP_INVALID_CALLBACK = -2147409625; -const int TLS_PSK_WITH_AES_128_CBC_SHA256 = 174; +const int CSSMERR_TP_INVALID_TUPLE = -2147409624; -const int TLS_PSK_WITH_AES_256_CBC_SHA384 = 175; +const int CSSMERR_TP_NOT_SIGNER = -2147409623; -const int TLS_PSK_WITH_NULL_SHA256 = 176; +const int CSSMERR_TP_NOT_TRUSTED = -2147409622; -const int TLS_PSK_WITH_NULL_SHA384 = 177; +const int CSSMERR_TP_NO_DEFAULT_AUTHORITY = -2147409621; -const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = 178; +const int CSSMERR_TP_REJECTED_FORM = -2147409620; -const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = 179; +const int CSSMERR_TP_REQUEST_LOST = -2147409619; -const int TLS_DHE_PSK_WITH_NULL_SHA256 = 180; +const int CSSMERR_TP_REQUEST_REJECTED = -2147409618; -const int TLS_DHE_PSK_WITH_NULL_SHA384 = 181; +const int CSSMERR_TP_UNSUPPORTED_ADDR_TYPE = -2147409617; -const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = 182; +const int CSSMERR_TP_UNSUPPORTED_SERVICE = -2147409616; -const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = 183; +const int CSSMERR_TP_INVALID_TUPLEGROUP_POINTER = -2147409615; -const int TLS_RSA_PSK_WITH_NULL_SHA256 = 184; +const int CSSMERR_TP_INVALID_TUPLEGROUP = -2147409614; -const int TLS_RSA_PSK_WITH_NULL_SHA384 = 185; +const int CSSMERR_AC_INTERNAL_ERROR = -2147405823; -const int TLS_AES_128_GCM_SHA256 = 4865; +const int CSSMERR_AC_MEMORY_ERROR = -2147405822; -const int TLS_AES_256_GCM_SHA384 = 4866; +const int CSSMERR_AC_MDS_ERROR = -2147405821; -const int TLS_CHACHA20_POLY1305_SHA256 = 4867; +const int CSSMERR_AC_INVALID_POINTER = -2147405820; -const int TLS_AES_128_CCM_SHA256 = 4868; +const int CSSMERR_AC_INVALID_INPUT_POINTER = -2147405819; -const int TLS_AES_128_CCM_8_SHA256 = 4869; +const int CSSMERR_AC_INVALID_OUTPUT_POINTER = -2147405818; -const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; +const int CSSMERR_AC_FUNCTION_NOT_IMPLEMENTED = -2147405817; -const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; +const int CSSMERR_AC_SELF_CHECK_FAILED = -2147405816; -const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = -16347; +const int CSSMERR_AC_OS_ACCESS_DENIED = -2147405815; -const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = -16346; +const int CSSMERR_AC_FUNCTION_FAILED = -2147405814; -const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; +const int CSSMERR_AC_INVALID_CONTEXT_HANDLE = -2147405760; -const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; +const int CSSMERR_AC_INVALID_DATA = -2147405754; -const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = -16343; +const int CSSMERR_AC_INVALID_DB_LIST = -2147405748; -const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = -16342; +const int CSSMERR_AC_INVALID_PASSTHROUGH_ID = -2147405738; -const int TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; +const int CSSMERR_AC_INVALID_DL_HANDLE = -2147405743; -const int TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; +const int CSSMERR_AC_INVALID_CL_HANDLE = -2147405742; -const int TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = -16339; +const int CSSMERR_AC_INVALID_TP_HANDLE = -2147405741; -const int TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = -16338; +const int CSSMERR_AC_INVALID_DB_HANDLE = -2147405750; -const int TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; +const int CSSMERR_AC_INVALID_DB_LIST_POINTER = -2147405747; -const int TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; +const int CSSM_AC_BASE_AC_ERROR = -2147405568; -const int TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = -16335; +const int CSSMERR_AC_INVALID_BASE_ACLS = -2147405567; -const int TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = -16334; +const int CSSMERR_AC_INVALID_TUPLE_CREDENTIALS = -2147405566; -const int TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = -13144; +const int CSSMERR_AC_INVALID_ENCODING = -2147405565; -const int TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = -13143; +const int CSSMERR_AC_INVALID_VALIDITY_PERIOD = -2147405564; -const int TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 255; +const int CSSMERR_AC_INVALID_REQUESTOR = -2147405563; -const int SSL_RSA_WITH_RC2_CBC_MD5 = -128; +const int CSSMERR_AC_INVALID_REQUEST_DESCRIPTOR = -2147405562; -const int SSL_RSA_WITH_IDEA_CBC_MD5 = -127; +const int CSSMERR_CL_INTERNAL_ERROR = -2147411967; -const int SSL_RSA_WITH_DES_CBC_MD5 = -126; +const int CSSMERR_CL_MEMORY_ERROR = -2147411966; -const int SSL_RSA_WITH_3DES_EDE_CBC_MD5 = -125; +const int CSSMERR_CL_MDS_ERROR = -2147411965; -const int SSL_NO_SUCH_CIPHERSUITE = -1; +const int CSSMERR_CL_INVALID_POINTER = -2147411964; -const int NSASCIIStringEncoding = 1; +const int CSSMERR_CL_INVALID_INPUT_POINTER = -2147411963; -const int NSNEXTSTEPStringEncoding = 2; +const int CSSMERR_CL_INVALID_OUTPUT_POINTER = -2147411962; -const int NSJapaneseEUCStringEncoding = 3; +const int CSSMERR_CL_FUNCTION_NOT_IMPLEMENTED = -2147411961; -const int NSUTF8StringEncoding = 4; +const int CSSMERR_CL_SELF_CHECK_FAILED = -2147411960; -const int NSISOLatin1StringEncoding = 5; +const int CSSMERR_CL_OS_ACCESS_DENIED = -2147411959; -const int NSSymbolStringEncoding = 6; +const int CSSMERR_CL_FUNCTION_FAILED = -2147411958; -const int NSNonLossyASCIIStringEncoding = 7; +const int CSSMERR_CL_INVALID_CONTEXT_HANDLE = -2147411904; -const int NSShiftJISStringEncoding = 8; +const int CSSMERR_CL_INVALID_CERTGROUP_POINTER = -2147411902; -const int NSISOLatin2StringEncoding = 9; +const int CSSMERR_CL_INVALID_CERT_POINTER = -2147411901; -const int NSUnicodeStringEncoding = 10; +const int CSSMERR_CL_INVALID_CRL_POINTER = -2147411900; -const int NSWindowsCP1251StringEncoding = 11; +const int CSSMERR_CL_INVALID_FIELD_POINTER = -2147411899; -const int NSWindowsCP1252StringEncoding = 12; +const int CSSMERR_CL_INVALID_DATA = -2147411898; -const int NSWindowsCP1253StringEncoding = 13; +const int CSSMERR_CL_CRL_ALREADY_SIGNED = -2147411897; -const int NSWindowsCP1254StringEncoding = 14; +const int CSSMERR_CL_INVALID_NUMBER_OF_FIELDS = -2147411896; -const int NSWindowsCP1250StringEncoding = 15; +const int CSSMERR_CL_VERIFICATION_FAILURE = -2147411895; -const int NSISO2022JPStringEncoding = 21; +const int CSSMERR_CL_UNKNOWN_FORMAT = -2147411890; -const int NSMacOSRomanStringEncoding = 30; +const int CSSMERR_CL_UNKNOWN_TAG = -2147411889; -const int NSUTF16StringEncoding = 10; +const int CSSMERR_CL_INVALID_PASSTHROUGH_ID = -2147411882; -const int NSUTF16BigEndianStringEncoding = 2415919360; +const int CSSM_CL_BASE_CL_ERROR = -2147411712; -const int NSUTF16LittleEndianStringEncoding = 2483028224; +const int CSSMERR_CL_INVALID_BUNDLE_POINTER = -2147411711; -const int NSUTF32StringEncoding = 2348810496; +const int CSSMERR_CL_INVALID_CACHE_HANDLE = -2147411710; -const int NSUTF32BigEndianStringEncoding = 2550137088; +const int CSSMERR_CL_INVALID_RESULTS_HANDLE = -2147411709; -const int NSUTF32LittleEndianStringEncoding = 2617245952; +const int CSSMERR_CL_INVALID_BUNDLE_INFO = -2147411708; -const int NSProprietaryStringEncoding = 65536; +const int CSSMERR_CL_INVALID_CRL_INDEX = -2147411707; -const int NSOpenStepUnicodeReservedBase = 62464; +const int CSSMERR_CL_INVALID_SCOPE = -2147411706; -const int kNativeArgNumberPos = 0; +const int CSSMERR_CL_NO_FIELD_VALUES = -2147411705; -const int kNativeArgNumberSize = 8; +const int CSSMERR_CL_SCOPE_NOT_SUPPORTED = -2147411704; -const int kNativeArgTypePos = 8; +const int CSSMERR_DL_INTERNAL_ERROR = -2147414015; -const int kNativeArgTypeSize = 8; +const int CSSMERR_DL_MEMORY_ERROR = -2147414014; -const int DYNAMIC_TARGETS_ENABLED = 0; +const int CSSMERR_DL_MDS_ERROR = -2147414013; -const int TARGET_OS_MAC = 1; +const int CSSMERR_DL_INVALID_POINTER = -2147414012; -const int TARGET_OS_WIN32 = 0; +const int CSSMERR_DL_INVALID_INPUT_POINTER = -2147414011; -const int TARGET_OS_WINDOWS = 0; +const int CSSMERR_DL_INVALID_OUTPUT_POINTER = -2147414010; -const int TARGET_OS_UNIX = 0; +const int CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED = -2147414009; -const int TARGET_OS_LINUX = 0; +const int CSSMERR_DL_SELF_CHECK_FAILED = -2147414008; -const int TARGET_OS_OSX = 1; +const int CSSMERR_DL_OS_ACCESS_DENIED = -2147414007; -const int TARGET_OS_IPHONE = 0; +const int CSSMERR_DL_FUNCTION_FAILED = -2147414006; -const int TARGET_OS_IOS = 0; +const int CSSMERR_DL_INVALID_CSP_HANDLE = -2147413936; -const int TARGET_OS_WATCH = 0; +const int CSSMERR_DL_INVALID_DL_HANDLE = -2147413935; -const int TARGET_OS_TV = 0; +const int CSSMERR_DL_INVALID_CL_HANDLE = -2147413934; -const int TARGET_OS_MACCATALYST = 0; +const int CSSMERR_DL_INVALID_DB_LIST_POINTER = -2147413939; -const int TARGET_OS_UIKITFORMAC = 0; +const int CSSMERR_DL_OPERATION_AUTH_DENIED = -2147413984; -const int TARGET_OS_SIMULATOR = 0; +const int CSSMERR_DL_OBJECT_USE_AUTH_DENIED = -2147413983; -const int TARGET_OS_EMBEDDED = 0; +const int CSSMERR_DL_OBJECT_MANIP_AUTH_DENIED = -2147413982; -const int TARGET_OS_RTKIT = 0; +const int CSSMERR_DL_OBJECT_ACL_NOT_SUPPORTED = -2147413981; -const int TARGET_OS_DRIVERKIT = 0; +const int CSSMERR_DL_OBJECT_ACL_REQUIRED = -2147413980; -const int TARGET_IPHONE_SIMULATOR = 0; +const int CSSMERR_DL_INVALID_ACCESS_CREDENTIALS = -2147413979; -const int TARGET_OS_NANO = 0; +const int CSSMERR_DL_INVALID_ACL_BASE_CERTS = -2147413978; -const int TARGET_ABI_USES_IOS_VALUES = 1; +const int CSSMERR_DL_ACL_BASE_CERTS_NOT_SUPPORTED = -2147413977; -const int TARGET_CPU_PPC = 0; +const int CSSMERR_DL_INVALID_SAMPLE_VALUE = -2147413976; -const int TARGET_CPU_PPC64 = 0; +const int CSSMERR_DL_SAMPLE_VALUE_NOT_SUPPORTED = -2147413975; -const int TARGET_CPU_68K = 0; +const int CSSMERR_DL_INVALID_ACL_SUBJECT_VALUE = -2147413974; -const int TARGET_CPU_X86 = 0; +const int CSSMERR_DL_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147413973; -const int TARGET_CPU_X86_64 = 0; +const int CSSMERR_DL_INVALID_ACL_CHALLENGE_CALLBACK = -2147413972; -const int TARGET_CPU_ARM = 0; +const int CSSMERR_DL_ACL_CHALLENGE_CALLBACK_FAILED = -2147413971; -const int TARGET_CPU_ARM64 = 1; +const int CSSMERR_DL_INVALID_ACL_ENTRY_TAG = -2147413970; -const int TARGET_CPU_MIPS = 0; +const int CSSMERR_DL_ACL_ENTRY_TAG_NOT_FOUND = -2147413969; -const int TARGET_CPU_SPARC = 0; +const int CSSMERR_DL_INVALID_ACL_EDIT_MODE = -2147413968; -const int TARGET_CPU_ALPHA = 0; +const int CSSMERR_DL_ACL_CHANGE_FAILED = -2147413967; -const int TARGET_RT_MAC_CFM = 0; +const int CSSMERR_DL_INVALID_NEW_ACL_ENTRY = -2147413966; -const int TARGET_RT_MAC_MACHO = 1; +const int CSSMERR_DL_INVALID_NEW_ACL_OWNER = -2147413965; -const int TARGET_RT_LITTLE_ENDIAN = 1; +const int CSSMERR_DL_ACL_DELETE_FAILED = -2147413964; -const int TARGET_RT_BIG_ENDIAN = 0; +const int CSSMERR_DL_ACL_REPLACE_FAILED = -2147413963; -const int TARGET_RT_64_BIT = 1; +const int CSSMERR_DL_ACL_ADD_FAILED = -2147413962; -const int __DARWIN_ONLY_64_BIT_INO_T = 1; +const int CSSMERR_DL_INVALID_DB_HANDLE = -2147413942; -const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; +const int CSSMERR_DL_INVALID_PASSTHROUGH_ID = -2147413930; -const int __DARWIN_ONLY_VERS_1050 = 1; +const int CSSMERR_DL_INVALID_NETWORK_ADDR = -2147413929; -const int __DARWIN_UNIX03 = 1; +const int CSSM_DL_BASE_DL_ERROR = -2147413760; -const int __DARWIN_64_BIT_INO_T = 1; +const int CSSMERR_DL_DATABASE_CORRUPT = -2147413759; -const int __DARWIN_VERS_1050 = 1; +const int CSSMERR_DL_INVALID_RECORD_INDEX = -2147413752; -const int __DARWIN_NON_CANCELABLE = 0; +const int CSSMERR_DL_INVALID_RECORDTYPE = -2147413751; -const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN'; +const int CSSMERR_DL_INVALID_FIELD_NAME = -2147413750; -const int __DARWIN_C_ANSI = 4096; +const int CSSMERR_DL_UNSUPPORTED_FIELD_FORMAT = -2147413749; -const int __DARWIN_C_FULL = 900000; +const int CSSMERR_DL_UNSUPPORTED_INDEX_INFO = -2147413748; -const int __DARWIN_C_LEVEL = 900000; +const int CSSMERR_DL_UNSUPPORTED_LOCALITY = -2147413747; -const int __STDC_WANT_LIB_EXT1__ = 1; +const int CSSMERR_DL_UNSUPPORTED_NUM_ATTRIBUTES = -2147413746; -const int __DARWIN_NO_LONG_LONG = 0; +const int CSSMERR_DL_UNSUPPORTED_NUM_INDEXES = -2147413745; -const int _DARWIN_FEATURE_64_BIT_INODE = 1; +const int CSSMERR_DL_UNSUPPORTED_NUM_RECORDTYPES = -2147413744; -const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1; +const int CSSMERR_DL_UNSUPPORTED_RECORDTYPE = -2147413743; -const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1; +const int CSSMERR_DL_FIELD_SPECIFIED_MULTIPLE = -2147413742; -const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1; +const int CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT = -2147413741; -const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3; +const int CSSMERR_DL_INVALID_PARSING_MODULE = -2147413740; -const int __has_ptrcheck = 0; +const int CSSMERR_DL_INVALID_DB_NAME = -2147413738; -const int __DARWIN_NULL = 0; +const int CSSMERR_DL_DATASTORE_DOESNOT_EXIST = -2147413737; -const int __PTHREAD_SIZE__ = 8176; +const int CSSMERR_DL_DATASTORE_ALREADY_EXISTS = -2147413736; -const int __PTHREAD_ATTR_SIZE__ = 56; +const int CSSMERR_DL_DB_LOCKED = -2147413735; -const int __PTHREAD_MUTEXATTR_SIZE__ = 8; +const int CSSMERR_DL_DATASTORE_IS_OPEN = -2147413734; -const int __PTHREAD_MUTEX_SIZE__ = 56; +const int CSSMERR_DL_RECORD_NOT_FOUND = -2147413733; -const int __PTHREAD_CONDATTR_SIZE__ = 8; +const int CSSMERR_DL_MISSING_VALUE = -2147413732; -const int __PTHREAD_COND_SIZE__ = 40; +const int CSSMERR_DL_UNSUPPORTED_QUERY = -2147413731; -const int __PTHREAD_ONCE_SIZE__ = 8; +const int CSSMERR_DL_UNSUPPORTED_QUERY_LIMITS = -2147413730; -const int __PTHREAD_RWLOCK_SIZE__ = 192; +const int CSSMERR_DL_UNSUPPORTED_NUM_SELECTION_PREDS = -2147413729; -const int __PTHREAD_RWLOCKATTR_SIZE__ = 16; +const int CSSMERR_DL_UNSUPPORTED_OPERATOR = -2147413727; -const int _QUAD_HIGHWORD = 1; +const int CSSMERR_DL_INVALID_RESULTS_HANDLE = -2147413726; -const int _QUAD_LOWWORD = 0; +const int CSSMERR_DL_INVALID_DB_LOCATION = -2147413725; -const int __DARWIN_LITTLE_ENDIAN = 1234; +const int CSSMERR_DL_INVALID_ACCESS_REQUEST = -2147413724; -const int __DARWIN_BIG_ENDIAN = 4321; +const int CSSMERR_DL_INVALID_INDEX_INFO = -2147413723; -const int __DARWIN_PDP_ENDIAN = 3412; +const int CSSMERR_DL_INVALID_SELECTION_TAG = -2147413722; -const int __DARWIN_BYTE_ORDER = 1234; +const int CSSMERR_DL_INVALID_NEW_OWNER = -2147413721; -const int LITTLE_ENDIAN = 1234; +const int CSSMERR_DL_INVALID_RECORD_UID = -2147413720; -const int BIG_ENDIAN = 4321; +const int CSSMERR_DL_INVALID_UNIQUE_INDEX_DATA = -2147413719; -const int PDP_ENDIAN = 3412; +const int CSSMERR_DL_INVALID_MODIFY_MODE = -2147413718; -const int BYTE_ORDER = 1234; +const int CSSMERR_DL_INVALID_OPEN_PARAMETERS = -2147413717; -const int __WORDSIZE = 64; +const int CSSMERR_DL_RECORD_MODIFIED = -2147413716; -const int INT8_MAX = 127; +const int CSSMERR_DL_ENDOFDATA = -2147413715; -const int INT16_MAX = 32767; +const int CSSMERR_DL_INVALID_QUERY = -2147413714; -const int INT32_MAX = 2147483647; +const int CSSMERR_DL_INVALID_VALUE = -2147413713; -const int INT64_MAX = 9223372036854775807; +const int CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTED = -2147413712; -const int INT8_MIN = -128; +const int CSSMERR_DL_STALE_UNIQUE_RECORD = -2147413711; -const int INT16_MIN = -32768; +const int CSSM_WORDID_KEYCHAIN_PROMPT = 65536; -const int INT32_MIN = -2147483648; +const int CSSM_WORDID_KEYCHAIN_LOCK = 65537; -const int INT64_MIN = -9223372036854775808; +const int CSSM_WORDID_KEYCHAIN_CHANGE_LOCK = 65538; -const int UINT8_MAX = 255; +const int CSSM_WORDID_PROCESS = 65539; -const int UINT16_MAX = 65535; +const int CSSM_WORDID__RESERVED_1 = 65540; -const int UINT32_MAX = 4294967295; +const int CSSM_WORDID_SYMMETRIC_KEY = 65541; -const int UINT64_MAX = -1; +const int CSSM_WORDID_SYSTEM = 65542; -const int INT_LEAST8_MIN = -128; +const int CSSM_WORDID_KEY = 65543; -const int INT_LEAST16_MIN = -32768; +const int CSSM_WORDID_PIN = 65544; -const int INT_LEAST32_MIN = -2147483648; +const int CSSM_WORDID_PREAUTH = 65545; -const int INT_LEAST64_MIN = -9223372036854775808; +const int CSSM_WORDID_PREAUTH_SOURCE = 65546; -const int INT_LEAST8_MAX = 127; +const int CSSM_WORDID_ASYMMETRIC_KEY = 65547; -const int INT_LEAST16_MAX = 32767; +const int CSSM_WORDID_PARTITION = 65548; -const int INT_LEAST32_MAX = 2147483647; +const int CSSM_WORDID_KEYBAG_KEY = 65549; -const int INT_LEAST64_MAX = 9223372036854775807; +const int CSSM_WORDID__FIRST_UNUSED = 65550; -const int UINT_LEAST8_MAX = 255; +const int CSSM_ACL_SUBJECT_TYPE_KEYCHAIN_PROMPT = 65536; -const int UINT_LEAST16_MAX = 65535; +const int CSSM_ACL_SUBJECT_TYPE_PROCESS = 65539; -const int UINT_LEAST32_MAX = 4294967295; +const int CSSM_ACL_SUBJECT_TYPE_CODE_SIGNATURE = 116; -const int UINT_LEAST64_MAX = -1; +const int CSSM_ACL_SUBJECT_TYPE_COMMENT = 12; -const int INT_FAST8_MIN = -128; +const int CSSM_ACL_SUBJECT_TYPE_SYMMETRIC_KEY = 65541; -const int INT_FAST16_MIN = -32768; +const int CSSM_ACL_SUBJECT_TYPE_PREAUTH = 65545; -const int INT_FAST32_MIN = -2147483648; +const int CSSM_ACL_SUBJECT_TYPE_PREAUTH_SOURCE = 65546; -const int INT_FAST64_MIN = -9223372036854775808; +const int CSSM_ACL_SUBJECT_TYPE_ASYMMETRIC_KEY = 65547; -const int INT_FAST8_MAX = 127; +const int CSSM_ACL_SUBJECT_TYPE_PARTITION = 65548; -const int INT_FAST16_MAX = 32767; +const int CSSM_SAMPLE_TYPE_KEYCHAIN_PROMPT = 65536; -const int INT_FAST32_MAX = 2147483647; +const int CSSM_SAMPLE_TYPE_KEYCHAIN_LOCK = 65537; -const int INT_FAST64_MAX = 9223372036854775807; +const int CSSM_SAMPLE_TYPE_KEYCHAIN_CHANGE_LOCK = 65538; -const int UINT_FAST8_MAX = 255; +const int CSSM_SAMPLE_TYPE_PROCESS = 65539; -const int UINT_FAST16_MAX = 65535; +const int CSSM_SAMPLE_TYPE_COMMENT = 12; -const int UINT_FAST32_MAX = 4294967295; +const int CSSM_SAMPLE_TYPE_RETRY_ID = 85; -const int UINT_FAST64_MAX = -1; +const int CSSM_SAMPLE_TYPE_SYMMETRIC_KEY = 65541; -const int INTPTR_MAX = 9223372036854775807; +const int CSSM_SAMPLE_TYPE_PREAUTH = 65545; -const int INTPTR_MIN = -9223372036854775808; +const int CSSM_SAMPLE_TYPE_ASYMMETRIC_KEY = 65547; -const int UINTPTR_MAX = -1; +const int CSSM_SAMPLE_TYPE_KEYBAG_KEY = 65549; -const int INTMAX_MAX = 9223372036854775807; +const int CSSM_ACL_AUTHORIZATION_CHANGE_ACL = 65536; -const int UINTMAX_MAX = -1; +const int CSSM_ACL_AUTHORIZATION_CHANGE_OWNER = 65537; -const int INTMAX_MIN = -9223372036854775808; +const int CSSM_ACL_AUTHORIZATION_PARTITION_ID = 65538; -const int PTRDIFF_MIN = -9223372036854775808; +const int CSSM_ACL_AUTHORIZATION_INTEGRITY = 65539; -const int PTRDIFF_MAX = 9223372036854775807; +const int CSSM_ACL_AUTHORIZATION_PREAUTH_BASE = 16842752; -const int SIZE_MAX = -1; +const int CSSM_ACL_AUTHORIZATION_PREAUTH_END = 16908288; -const int RSIZE_MAX = 9223372036854775807; +const int CSSM_ACL_CODE_SIGNATURE_INVALID = 0; -const int WCHAR_MAX = 2147483647; +const int CSSM_ACL_CODE_SIGNATURE_OSX = 1; -const int WCHAR_MIN = -2147483648; +const int CSSM_ACL_MATCH_UID = 1; -const int WINT_MIN = -2147483648; +const int CSSM_ACL_MATCH_GID = 2; -const int WINT_MAX = 2147483647; +const int CSSM_ACL_MATCH_HONOR_ROOT = 256; -const int SIG_ATOMIC_MIN = -2147483648; +const int CSSM_ACL_MATCH_BITS = 3; -const int SIG_ATOMIC_MAX = 2147483647; +const int CSSM_ACL_PROCESS_SELECTOR_CURRENT_VERSION = 257; -const int __API_TO_BE_DEPRECATED = 100000; +const int CSSM_ACL_KEYCHAIN_PROMPT_CURRENT_VERSION = 257; -const int __MAC_10_0 = 1000; +const int CSSM_ACL_KEYCHAIN_PROMPT_REQUIRE_PASSPHRASE = 1; -const int __MAC_10_1 = 1010; +const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED = 16; -const int __MAC_10_2 = 1020; +const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED_ACT = 32; -const int __MAC_10_3 = 1030; +const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID = 64; -const int __MAC_10_4 = 1040; +const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID_ACT = 128; -const int __MAC_10_5 = 1050; +const int CSSM_ACL_PREAUTH_TRACKING_COUNT_MASK = 255; -const int __MAC_10_6 = 1060; +const int CSSM_ACL_PREAUTH_TRACKING_BLOCKED = 0; -const int __MAC_10_7 = 1070; +const int CSSM_ACL_PREAUTH_TRACKING_UNKNOWN = 1073741824; -const int __MAC_10_8 = 1080; +const int CSSM_ACL_PREAUTH_TRACKING_AUTHORIZED = -2147483648; -const int __MAC_10_9 = 1090; +const int CSSM_DB_ACCESS_RESET = 65536; -const int __MAC_10_10 = 101000; +const int CSSM_ALGID_APPLE_YARROW = -2147483648; -const int __MAC_10_10_2 = 101002; +const int CSSM_ALGID_AES = -2147483647; -const int __MAC_10_10_3 = 101003; +const int CSSM_ALGID_FEE = -2147483646; -const int __MAC_10_11 = 101100; +const int CSSM_ALGID_FEE_MD5 = -2147483645; -const int __MAC_10_11_2 = 101102; +const int CSSM_ALGID_FEE_SHA1 = -2147483644; -const int __MAC_10_11_3 = 101103; +const int CSSM_ALGID_FEED = -2147483643; -const int __MAC_10_11_4 = 101104; +const int CSSM_ALGID_FEEDEXP = -2147483642; -const int __MAC_10_12 = 101200; +const int CSSM_ALGID_ASC = -2147483641; -const int __MAC_10_12_1 = 101201; +const int CSSM_ALGID_SHA1HMAC_LEGACY = -2147483640; -const int __MAC_10_12_2 = 101202; +const int CSSM_ALGID_KEYCHAIN_KEY = -2147483639; -const int __MAC_10_12_4 = 101204; +const int CSSM_ALGID_PKCS12_PBE_ENCR = -2147483638; -const int __MAC_10_13 = 101300; +const int CSSM_ALGID_PKCS12_PBE_MAC = -2147483637; -const int __MAC_10_13_1 = 101301; +const int CSSM_ALGID_SECURE_PASSPHRASE = -2147483636; -const int __MAC_10_13_2 = 101302; +const int CSSM_ALGID_PBE_OPENSSL_MD5 = -2147483635; -const int __MAC_10_13_4 = 101304; +const int CSSM_ALGID_SHA256 = -2147483634; -const int __MAC_10_14 = 101400; +const int CSSM_ALGID_SHA384 = -2147483633; -const int __MAC_10_14_1 = 101401; +const int CSSM_ALGID_SHA512 = -2147483632; -const int __MAC_10_14_4 = 101404; +const int CSSM_ALGID_ENTROPY_DEFAULT = -2147483631; -const int __MAC_10_14_6 = 101406; +const int CSSM_ALGID_SHA224 = -2147483630; -const int __MAC_10_15 = 101500; +const int CSSM_ALGID_SHA224WithRSA = -2147483629; -const int __MAC_10_15_1 = 101501; +const int CSSM_ALGID_SHA256WithRSA = -2147483628; -const int __MAC_10_15_4 = 101504; +const int CSSM_ALGID_SHA384WithRSA = -2147483627; -const int __MAC_10_16 = 101600; +const int CSSM_ALGID_SHA512WithRSA = -2147483626; -const int __MAC_11_0 = 110000; +const int CSSM_ALGID_OPENSSH1 = -2147483625; -const int __MAC_11_1 = 110100; +const int CSSM_ALGID_SHA224WithECDSA = -2147483624; -const int __MAC_11_3 = 110300; +const int CSSM_ALGID_SHA256WithECDSA = -2147483623; -const int __MAC_11_4 = 110400; +const int CSSM_ALGID_SHA384WithECDSA = -2147483622; -const int __MAC_11_5 = 110500; +const int CSSM_ALGID_SHA512WithECDSA = -2147483621; -const int __MAC_11_6 = 110600; +const int CSSM_ALGID_ECDSA_SPECIFIED = -2147483620; -const int __MAC_12_0 = 120000; +const int CSSM_ALGID_ECDH_X963_KDF = -2147483619; -const int __MAC_12_1 = 120100; +const int CSSM_ALGID__FIRST_UNUSED = -2147483618; -const int __MAC_12_2 = 120200; +const int CSSM_PADDING_APPLE_SSLv2 = -2147483648; -const int __MAC_12_3 = 120300; +const int CSSM_KEYBLOB_RAW_FORMAT_VENDOR_DEFINED = -2147483648; -const int __IPHONE_2_0 = 20000; +const int CSSM_KEYBLOB_RAW_FORMAT_X509 = -2147483648; -const int __IPHONE_2_1 = 20100; +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH = -2147483647; -const int __IPHONE_2_2 = 20200; +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSL = -2147483646; -const int __IPHONE_3_0 = 30000; +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH2 = -2147483645; -const int __IPHONE_3_1 = 30100; +const int CSSM_CUSTOM_COMMON_ERROR_EXTENT = 224; -const int __IPHONE_3_2 = 30200; +const int CSSM_ERRCODE_NO_USER_INTERACTION = 224; -const int __IPHONE_4_0 = 40000; +const int CSSM_ERRCODE_USER_CANCELED = 225; -const int __IPHONE_4_1 = 40100; +const int CSSM_ERRCODE_SERVICE_NOT_AVAILABLE = 226; -const int __IPHONE_4_2 = 40200; +const int CSSM_ERRCODE_INSUFFICIENT_CLIENT_IDENTIFICATION = 227; -const int __IPHONE_4_3 = 40300; +const int CSSM_ERRCODE_DEVICE_RESET = 228; -const int __IPHONE_5_0 = 50000; +const int CSSM_ERRCODE_DEVICE_FAILED = 229; -const int __IPHONE_5_1 = 50100; +const int CSSM_ERRCODE_IN_DARK_WAKE = 230; -const int __IPHONE_6_0 = 60000; +const int CSSMERR_CSSM_NO_USER_INTERACTION = -2147417888; -const int __IPHONE_6_1 = 60100; +const int CSSMERR_AC_NO_USER_INTERACTION = -2147405600; -const int __IPHONE_7_0 = 70000; +const int CSSMERR_CSP_NO_USER_INTERACTION = -2147415840; -const int __IPHONE_7_1 = 70100; +const int CSSMERR_CL_NO_USER_INTERACTION = -2147411744; -const int __IPHONE_8_0 = 80000; +const int CSSMERR_DL_NO_USER_INTERACTION = -2147413792; -const int __IPHONE_8_1 = 80100; +const int CSSMERR_TP_NO_USER_INTERACTION = -2147409696; -const int __IPHONE_8_2 = 80200; +const int CSSMERR_CSSM_USER_CANCELED = -2147417887; -const int __IPHONE_8_3 = 80300; +const int CSSMERR_AC_USER_CANCELED = -2147405599; -const int __IPHONE_8_4 = 80400; +const int CSSMERR_CSP_USER_CANCELED = -2147415839; -const int __IPHONE_9_0 = 90000; +const int CSSMERR_CL_USER_CANCELED = -2147411743; -const int __IPHONE_9_1 = 90100; +const int CSSMERR_DL_USER_CANCELED = -2147413791; -const int __IPHONE_9_2 = 90200; +const int CSSMERR_TP_USER_CANCELED = -2147409695; -const int __IPHONE_9_3 = 90300; +const int CSSMERR_CSSM_SERVICE_NOT_AVAILABLE = -2147417886; -const int __IPHONE_10_0 = 100000; +const int CSSMERR_AC_SERVICE_NOT_AVAILABLE = -2147405598; -const int __IPHONE_10_1 = 100100; +const int CSSMERR_CSP_SERVICE_NOT_AVAILABLE = -2147415838; -const int __IPHONE_10_2 = 100200; +const int CSSMERR_CL_SERVICE_NOT_AVAILABLE = -2147411742; -const int __IPHONE_10_3 = 100300; +const int CSSMERR_DL_SERVICE_NOT_AVAILABLE = -2147413790; -const int __IPHONE_11_0 = 110000; +const int CSSMERR_TP_SERVICE_NOT_AVAILABLE = -2147409694; -const int __IPHONE_11_1 = 110100; +const int CSSMERR_CSSM_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147417885; -const int __IPHONE_11_2 = 110200; +const int CSSMERR_AC_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147405597; -const int __IPHONE_11_3 = 110300; +const int CSSMERR_CSP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147415837; -const int __IPHONE_11_4 = 110400; +const int CSSMERR_CL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147411741; -const int __IPHONE_12_0 = 120000; +const int CSSMERR_DL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147413789; -const int __IPHONE_12_1 = 120100; +const int CSSMERR_TP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147409693; -const int __IPHONE_12_2 = 120200; +const int CSSMERR_CSSM_DEVICE_RESET = -2147417884; -const int __IPHONE_12_3 = 120300; +const int CSSMERR_AC_DEVICE_RESET = -2147405596; -const int __IPHONE_12_4 = 120400; +const int CSSMERR_CSP_DEVICE_RESET = -2147415836; -const int __IPHONE_13_0 = 130000; +const int CSSMERR_CL_DEVICE_RESET = -2147411740; -const int __IPHONE_13_1 = 130100; +const int CSSMERR_DL_DEVICE_RESET = -2147413788; -const int __IPHONE_13_2 = 130200; +const int CSSMERR_TP_DEVICE_RESET = -2147409692; -const int __IPHONE_13_3 = 130300; +const int CSSMERR_CSSM_DEVICE_FAILED = -2147417883; -const int __IPHONE_13_4 = 130400; +const int CSSMERR_AC_DEVICE_FAILED = -2147405595; -const int __IPHONE_13_5 = 130500; +const int CSSMERR_CSP_DEVICE_FAILED = -2147415835; -const int __IPHONE_13_6 = 130600; +const int CSSMERR_CL_DEVICE_FAILED = -2147411739; -const int __IPHONE_13_7 = 130700; +const int CSSMERR_DL_DEVICE_FAILED = -2147413787; -const int __IPHONE_14_0 = 140000; +const int CSSMERR_TP_DEVICE_FAILED = -2147409691; -const int __IPHONE_14_1 = 140100; +const int CSSMERR_CSSM_IN_DARK_WAKE = -2147417882; -const int __IPHONE_14_2 = 140200; +const int CSSMERR_AC_IN_DARK_WAKE = -2147405594; -const int __IPHONE_14_3 = 140300; +const int CSSMERR_CSP_IN_DARK_WAKE = -2147415834; -const int __IPHONE_14_5 = 140500; +const int CSSMERR_CL_IN_DARK_WAKE = -2147411738; -const int __IPHONE_14_6 = 140600; +const int CSSMERR_DL_IN_DARK_WAKE = -2147413786; -const int __IPHONE_14_7 = 140700; +const int CSSMERR_TP_IN_DARK_WAKE = -2147409690; -const int __IPHONE_14_8 = 140800; +const int CSSMERR_CSP_APPLE_ADD_APPLICATION_ACL_SUBJECT = -2147415040; -const int __IPHONE_15_0 = 150000; +const int CSSMERR_CSP_APPLE_PUBLIC_KEY_INCOMPLETE = -2147415039; -const int __IPHONE_15_1 = 150100; +const int CSSMERR_CSP_APPLE_SIGNATURE_MISMATCH = -2147415038; -const int __IPHONE_15_2 = 150200; +const int CSSMERR_CSP_APPLE_INVALID_KEY_START_DATE = -2147415037; -const int __IPHONE_15_3 = 150300; +const int CSSMERR_CSP_APPLE_INVALID_KEY_END_DATE = -2147415036; -const int __IPHONE_15_4 = 150400; +const int CSSMERR_CSPDL_APPLE_DL_CONVERSION_ERROR = -2147415035; -const int __TVOS_9_0 = 90000; +const int CSSMERR_CSP_APPLE_SSLv2_ROLLBACK = -2147415034; -const int __TVOS_9_1 = 90100; +const int CSSM_DL_DB_RECORD_GENERIC_PASSWORD = -2147483648; -const int __TVOS_9_2 = 90200; +const int CSSM_DL_DB_RECORD_INTERNET_PASSWORD = -2147483647; -const int __TVOS_10_0 = 100000; +const int CSSM_DL_DB_RECORD_APPLESHARE_PASSWORD = -2147483646; -const int __TVOS_10_0_1 = 100001; +const int CSSM_DL_DB_RECORD_X509_CERTIFICATE = -2147479552; -const int __TVOS_10_1 = 100100; +const int CSSM_DL_DB_RECORD_USER_TRUST = -2147479551; -const int __TVOS_10_2 = 100200; +const int CSSM_DL_DB_RECORD_X509_CRL = -2147479550; -const int __TVOS_11_0 = 110000; +const int CSSM_DL_DB_RECORD_UNLOCK_REFERRAL = -2147479549; -const int __TVOS_11_1 = 110100; +const int CSSM_DL_DB_RECORD_EXTENDED_ATTRIBUTE = -2147479548; -const int __TVOS_11_2 = 110200; +const int CSSM_DL_DB_RECORD_METADATA = -2147450880; -const int __TVOS_11_3 = 110300; +const int CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT = 0; -const int __TVOS_11_4 = 110400; +const int CSSM_APPLEFILEDL_COMMIT = 1; -const int __TVOS_12_0 = 120000; +const int CSSM_APPLEFILEDL_ROLLBACK = 2; -const int __TVOS_12_1 = 120100; +const int CSSM_APPLEFILEDL_TAKE_FILE_LOCK = 3; -const int __TVOS_12_2 = 120200; +const int CSSM_APPLEFILEDL_MAKE_BACKUP = 4; -const int __TVOS_12_3 = 120300; +const int CSSM_APPLEFILEDL_MAKE_COPY = 5; -const int __TVOS_12_4 = 120400; +const int CSSM_APPLEFILEDL_DELETE_FILE = 6; -const int __TVOS_13_0 = 130000; +const int CSSM_APPLE_UNLOCK_TYPE_KEY_DIRECT = 1; -const int __TVOS_13_2 = 130200; +const int CSSM_APPLE_UNLOCK_TYPE_WRAPPED_PRIVATE = 2; -const int __TVOS_13_3 = 130300; +const int CSSM_APPLE_UNLOCK_TYPE_KEYBAG = 3; -const int __TVOS_13_4 = 130400; +const int CSSMERR_APPLEDL_INVALID_OPEN_PARAMETERS = -2147412992; -const int __TVOS_14_0 = 140000; +const int CSSMERR_APPLEDL_DISK_FULL = -2147412991; -const int __TVOS_14_1 = 140100; +const int CSSMERR_APPLEDL_QUOTA_EXCEEDED = -2147412990; -const int __TVOS_14_2 = 140200; +const int CSSMERR_APPLEDL_FILE_TOO_BIG = -2147412989; -const int __TVOS_14_3 = 140300; +const int CSSMERR_APPLEDL_INVALID_DATABASE_BLOB = -2147412988; -const int __TVOS_14_5 = 140500; +const int CSSMERR_APPLEDL_INVALID_KEY_BLOB = -2147412987; -const int __TVOS_14_6 = 140600; +const int CSSMERR_APPLEDL_INCOMPATIBLE_DATABASE_BLOB = -2147412986; -const int __TVOS_14_7 = 140700; +const int CSSMERR_APPLEDL_INCOMPATIBLE_KEY_BLOB = -2147412985; -const int __TVOS_15_0 = 150000; +const int CSSMERR_APPLETP_HOSTNAME_MISMATCH = -2147408896; -const int __TVOS_15_1 = 150100; +const int CSSMERR_APPLETP_UNKNOWN_CRITICAL_EXTEN = -2147408895; -const int __TVOS_15_2 = 150200; +const int CSSMERR_APPLETP_NO_BASIC_CONSTRAINTS = -2147408894; -const int __TVOS_15_3 = 150300; +const int CSSMERR_APPLETP_INVALID_CA = -2147408893; -const int __TVOS_15_4 = 150400; +const int CSSMERR_APPLETP_INVALID_AUTHORITY_ID = -2147408892; -const int __WATCHOS_1_0 = 10000; +const int CSSMERR_APPLETP_INVALID_SUBJECT_ID = -2147408891; -const int __WATCHOS_2_0 = 20000; +const int CSSMERR_APPLETP_INVALID_KEY_USAGE = -2147408890; -const int __WATCHOS_2_1 = 20100; +const int CSSMERR_APPLETP_INVALID_EXTENDED_KEY_USAGE = -2147408889; -const int __WATCHOS_2_2 = 20200; +const int CSSMERR_APPLETP_INVALID_ID_LINKAGE = -2147408888; -const int __WATCHOS_3_0 = 30000; +const int CSSMERR_APPLETP_PATH_LEN_CONSTRAINT = -2147408887; -const int __WATCHOS_3_1 = 30100; +const int CSSMERR_APPLETP_INVALID_ROOT = -2147408886; -const int __WATCHOS_3_1_1 = 30101; +const int CSSMERR_APPLETP_CRL_EXPIRED = -2147408885; -const int __WATCHOS_3_2 = 30200; +const int CSSMERR_APPLETP_CRL_NOT_VALID_YET = -2147408884; -const int __WATCHOS_4_0 = 40000; +const int CSSMERR_APPLETP_CRL_NOT_FOUND = -2147408883; -const int __WATCHOS_4_1 = 40100; +const int CSSMERR_APPLETP_CRL_SERVER_DOWN = -2147408882; -const int __WATCHOS_4_2 = 40200; +const int CSSMERR_APPLETP_CRL_BAD_URI = -2147408881; -const int __WATCHOS_4_3 = 40300; +const int CSSMERR_APPLETP_UNKNOWN_CERT_EXTEN = -2147408880; -const int __WATCHOS_5_0 = 50000; +const int CSSMERR_APPLETP_UNKNOWN_CRL_EXTEN = -2147408879; -const int __WATCHOS_5_1 = 50100; +const int CSSMERR_APPLETP_CRL_NOT_TRUSTED = -2147408878; -const int __WATCHOS_5_2 = 50200; +const int CSSMERR_APPLETP_CRL_INVALID_ANCHOR_CERT = -2147408877; -const int __WATCHOS_5_3 = 50300; +const int CSSMERR_APPLETP_CRL_POLICY_FAIL = -2147408876; -const int __WATCHOS_6_0 = 60000; +const int CSSMERR_APPLETP_IDP_FAIL = -2147408875; -const int __WATCHOS_6_1 = 60100; +const int CSSMERR_APPLETP_CERT_NOT_FOUND_FROM_ISSUER = -2147408874; -const int __WATCHOS_6_2 = 60200; +const int CSSMERR_APPLETP_BAD_CERT_FROM_ISSUER = -2147408873; -const int __WATCHOS_7_0 = 70000; +const int CSSMERR_APPLETP_SMIME_EMAIL_ADDRS_NOT_FOUND = -2147408872; -const int __WATCHOS_7_1 = 70100; +const int CSSMERR_APPLETP_SMIME_BAD_EXT_KEY_USE = -2147408871; -const int __WATCHOS_7_2 = 70200; +const int CSSMERR_APPLETP_SMIME_BAD_KEY_USE = -2147408870; -const int __WATCHOS_7_3 = 70300; +const int CSSMERR_APPLETP_SMIME_KEYUSAGE_NOT_CRITICAL = -2147408869; -const int __WATCHOS_7_4 = 70400; +const int CSSMERR_APPLETP_SMIME_NO_EMAIL_ADDRS = -2147408868; -const int __WATCHOS_7_5 = 70500; +const int CSSMERR_APPLETP_SMIME_SUBJ_ALT_NAME_NOT_CRIT = -2147408867; -const int __WATCHOS_7_6 = 70600; +const int CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE = -2147408866; -const int __WATCHOS_8_0 = 80000; +const int CSSMERR_APPLETP_OCSP_BAD_RESPONSE = -2147408865; -const int __WATCHOS_8_1 = 80100; +const int CSSMERR_APPLETP_OCSP_BAD_REQUEST = -2147408864; -const int __WATCHOS_8_3 = 80300; +const int CSSMERR_APPLETP_OCSP_UNAVAILABLE = -2147408863; -const int __WATCHOS_8_4 = 80400; +const int CSSMERR_APPLETP_OCSP_STATUS_UNRECOGNIZED = -2147408862; -const int __WATCHOS_8_5 = 80500; +const int CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK = -2147408861; -const int MAC_OS_X_VERSION_10_0 = 1000; +const int CSSMERR_APPLETP_NETWORK_FAILURE = -2147408860; -const int MAC_OS_X_VERSION_10_1 = 1010; +const int CSSMERR_APPLETP_OCSP_NOT_TRUSTED = -2147408859; -const int MAC_OS_X_VERSION_10_2 = 1020; +const int CSSMERR_APPLETP_OCSP_INVALID_ANCHOR_CERT = -2147408858; -const int MAC_OS_X_VERSION_10_3 = 1030; +const int CSSMERR_APPLETP_OCSP_SIG_ERROR = -2147408857; -const int MAC_OS_X_VERSION_10_4 = 1040; +const int CSSMERR_APPLETP_OCSP_NO_SIGNER = -2147408856; -const int MAC_OS_X_VERSION_10_5 = 1050; +const int CSSMERR_APPLETP_OCSP_RESP_MALFORMED_REQ = -2147408855; -const int MAC_OS_X_VERSION_10_6 = 1060; +const int CSSMERR_APPLETP_OCSP_RESP_INTERNAL_ERR = -2147408854; -const int MAC_OS_X_VERSION_10_7 = 1070; +const int CSSMERR_APPLETP_OCSP_RESP_TRY_LATER = -2147408853; -const int MAC_OS_X_VERSION_10_8 = 1080; +const int CSSMERR_APPLETP_OCSP_RESP_SIG_REQUIRED = -2147408852; -const int MAC_OS_X_VERSION_10_9 = 1090; +const int CSSMERR_APPLETP_OCSP_RESP_UNAUTHORIZED = -2147408851; -const int MAC_OS_X_VERSION_10_10 = 101000; +const int CSSMERR_APPLETP_OCSP_NONCE_MISMATCH = -2147408850; -const int MAC_OS_X_VERSION_10_10_2 = 101002; +const int CSSMERR_APPLETP_CS_BAD_CERT_CHAIN_LENGTH = -2147408849; -const int MAC_OS_X_VERSION_10_10_3 = 101003; +const int CSSMERR_APPLETP_CS_NO_BASIC_CONSTRAINTS = -2147408848; -const int MAC_OS_X_VERSION_10_11 = 101100; +const int CSSMERR_APPLETP_CS_BAD_PATH_LENGTH = -2147408847; -const int MAC_OS_X_VERSION_10_11_2 = 101102; +const int CSSMERR_APPLETP_CS_NO_EXTENDED_KEY_USAGE = -2147408846; -const int MAC_OS_X_VERSION_10_11_3 = 101103; +const int CSSMERR_APPLETP_CODE_SIGN_DEVELOPMENT = -2147408845; -const int MAC_OS_X_VERSION_10_11_4 = 101104; +const int CSSMERR_APPLETP_RS_BAD_CERT_CHAIN_LENGTH = -2147408844; -const int MAC_OS_X_VERSION_10_12 = 101200; +const int CSSMERR_APPLETP_RS_BAD_EXTENDED_KEY_USAGE = -2147408843; -const int MAC_OS_X_VERSION_10_12_1 = 101201; +const int CSSMERR_APPLETP_TRUST_SETTING_DENY = -2147408842; -const int MAC_OS_X_VERSION_10_12_2 = 101202; +const int CSSMERR_APPLETP_INVALID_EMPTY_SUBJECT = -2147408841; -const int MAC_OS_X_VERSION_10_12_4 = 101204; +const int CSSMERR_APPLETP_UNKNOWN_QUAL_CERT_STATEMENT = -2147408840; -const int MAC_OS_X_VERSION_10_13 = 101300; +const int CSSMERR_APPLETP_MISSING_REQUIRED_EXTENSION = -2147408839; -const int MAC_OS_X_VERSION_10_13_1 = 101301; +const int CSSMERR_APPLETP_EXT_KEYUSAGE_NOT_CRITICAL = -2147408838; -const int MAC_OS_X_VERSION_10_13_2 = 101302; +const int CSSMERR_APPLETP_IDENTIFIER_MISSING = -2147408837; -const int MAC_OS_X_VERSION_10_13_4 = 101304; +const int CSSMERR_APPLETP_CA_PIN_MISMATCH = -2147408836; -const int MAC_OS_X_VERSION_10_14 = 101400; +const int CSSMERR_APPLETP_LEAF_PIN_MISMATCH = -2147408835; -const int MAC_OS_X_VERSION_10_14_1 = 101401; +const int CSSMERR_APPLE_DOTMAC_REQ_QUEUED = -2147408796; -const int MAC_OS_X_VERSION_10_14_4 = 101404; +const int CSSMERR_APPLE_DOTMAC_REQ_REDIRECT = -2147408795; -const int MAC_OS_X_VERSION_10_14_6 = 101406; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ERR = -2147408794; -const int MAC_OS_X_VERSION_10_15 = 101500; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_PARAM = -2147408793; -const int MAC_OS_X_VERSION_10_15_1 = 101501; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_AUTH = -2147408792; -const int MAC_OS_X_VERSION_10_16 = 101600; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_UNIMPL = -2147408791; -const int MAC_OS_VERSION_11_0 = 110000; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_NOT_AVAIL = -2147408790; -const int MAC_OS_VERSION_12_0 = 120000; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ALREADY_EXIST = -2147408789; -const int __DRIVERKIT_19_0 = 190000; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_SERVICE_ERROR = -2147408788; -const int __DRIVERKIT_20_0 = 200000; +const int CSSMERR_APPLE_DOTMAC_REQ_IS_PENDING = -2147408787; -const int __DRIVERKIT_21_0 = 210000; +const int CSSMERR_APPLE_DOTMAC_NO_REQ_PENDING = -2147408786; -const int __MAC_OS_X_VERSION_MIN_REQUIRED = 120000; +const int CSSMERR_APPLE_DOTMAC_CSR_VERIFY_FAIL = -2147408785; -const int __MAC_OS_X_VERSION_MAX_ALLOWED = 120300; +const int CSSMERR_APPLE_DOTMAC_FAILED_CONSISTENCY_CHECK = -2147408784; -const int __ENABLE_LEGACY_MAC_AVAILABILITY = 1; +const int CSSM_APPLEDL_OPEN_PARAMETERS_VERSION = 1; -const int __DARWIN_FD_SETSIZE = 1024; +const int CSSM_APPLECSPDL_DB_LOCK = 0; -const int __DARWIN_NBBY = 8; +const int CSSM_APPLECSPDL_DB_UNLOCK = 1; -const int NBBY = 8; +const int CSSM_APPLECSPDL_DB_GET_SETTINGS = 2; -const int FD_SETSIZE = 1024; +const int CSSM_APPLECSPDL_DB_SET_SETTINGS = 3; -const int MAC_OS_VERSION_11_1 = 110100; +const int CSSM_APPLECSPDL_DB_IS_LOCKED = 4; -const int MAC_OS_VERSION_11_3 = 110300; +const int CSSM_APPLECSPDL_DB_CHANGE_PASSWORD = 5; -const int MAC_OS_X_VERSION_MIN_REQUIRED = 120000; +const int CSSM_APPLECSPDL_DB_GET_HANDLE = 6; -const int MAC_OS_X_VERSION_MAX_ALLOWED = 120000; +const int CSSM_APPLESCPDL_CSP_GET_KEYHANDLE = 7; -const int __AVAILABILITY_MACROS_USES_AVAILABILITY = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_8 = 8; -const int OBJC_API_VERSION = 2; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_9 = 9; -const int OBJC_NO_GC = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_10 = 10; -const int NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_11 = 11; -const int OBJC_OLD_DISPATCH_PROTOTYPES = 0; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_12 = 12; -const int true1 = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_13 = 13; -const int false1 = 0; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_14 = 14; -const int __bool_true_false_are_defined = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_15 = 15; -const int OBJC_BOOL_IS_BOOL = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_16 = 16; -const int YES = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_17 = 17; -const int NO = 0; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_18 = 18; -const int NSIntegerMax = 9223372036854775807; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_19 = 19; -const int NSIntegerMin = -9223372036854775808; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_20 = 20; -const int NSUIntegerMax = -1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_21 = 21; -const int NSINTEGER_DEFINED = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_22 = 22; -const int __GNUC_VA_LIST = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_23 = 23; -const int __DARWIN_CLK_TCK = 100; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_24 = 24; -const int CHAR_BIT = 8; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_25 = 25; -const int MB_LEN_MAX = 6; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_26 = 26; -const int CLK_TCK = 100; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_27 = 27; -const int SCHAR_MAX = 127; +const int CSSM_APPLECSP_KEYDIGEST = 256; -const int SCHAR_MIN = -128; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_APPLE_CUSTOM = 100; -const int UCHAR_MAX = 255; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSL = 101; -const int CHAR_MAX = 127; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSH1 = 102; -const int CHAR_MIN = -128; +const int CSSM_ATTRIBUTE_VENDOR_DEFINED = 8388608; -const int USHRT_MAX = 65535; +const int CSSM_ATTRIBUTE_PUBLIC_KEY = 1082130432; -const int SHRT_MAX = 32767; +const int CSSM_ATTRIBUTE_FEE_PRIME_TYPE = 276824065; -const int SHRT_MIN = -32768; +const int CSSM_ATTRIBUTE_FEE_CURVE_TYPE = 276824066; -const int UINT_MAX = 4294967295; +const int CSSM_ATTRIBUTE_ASC_OPTIMIZATION = 276824067; -const int INT_MAX = 2147483647; +const int CSSM_ATTRIBUTE_RSA_BLINDING = 276824068; -const int INT_MIN = -2147483648; +const int CSSM_ATTRIBUTE_PARAM_KEY = 1082130437; -const int ULONG_MAX = -1; +const int CSSM_ATTRIBUTE_PROMPT = 545259526; -const int LONG_MAX = 9223372036854775807; +const int CSSM_ATTRIBUTE_ALERT_TITLE = 545259527; -const int LONG_MIN = -9223372036854775808; +const int CSSM_ATTRIBUTE_VERIFY_PASSPHRASE = 276824072; -const int ULLONG_MAX = -1; +const int CSSM_FEE_PRIME_TYPE_DEFAULT = 0; -const int LLONG_MAX = 9223372036854775807; +const int CSSM_FEE_PRIME_TYPE_MERSENNE = 1; -const int LLONG_MIN = -9223372036854775808; +const int CSSM_FEE_PRIME_TYPE_FEE = 2; -const int LONG_BIT = 64; +const int CSSM_FEE_PRIME_TYPE_GENERAL = 3; -const int SSIZE_MAX = 9223372036854775807; +const int CSSM_FEE_CURVE_TYPE_DEFAULT = 0; -const int WORD_BIT = 32; +const int CSSM_FEE_CURVE_TYPE_MONTGOMERY = 1; -const int SIZE_T_MAX = -1; +const int CSSM_FEE_CURVE_TYPE_WEIERSTRASS = 2; -const int UQUAD_MAX = -1; +const int CSSM_FEE_CURVE_TYPE_ANSI_X9_62 = 3; -const int QUAD_MAX = 9223372036854775807; +const int CSSM_ASC_OPTIMIZE_DEFAULT = 0; -const int QUAD_MIN = -9223372036854775808; +const int CSSM_ASC_OPTIMIZE_SIZE = 1; -const int ARG_MAX = 1048576; +const int CSSM_ASC_OPTIMIZE_SECURITY = 2; -const int CHILD_MAX = 266; +const int CSSM_ASC_OPTIMIZE_TIME = 3; -const int GID_MAX = 2147483647; +const int CSSM_ASC_OPTIMIZE_TIME_SIZE = 4; -const int LINK_MAX = 32767; +const int CSSM_ASC_OPTIMIZE_ASCII = 5; -const int MAX_CANON = 1024; +const int CSSM_KEYATTR_PARTIAL = 65536; -const int MAX_INPUT = 1024; +const int CSSM_KEYATTR_PUBLIC_KEY_ENCRYPT = 131072; -const int NAME_MAX = 255; +const int CSSM_TP_ACTION_REQUIRE_CRL_PER_CERT = 1; -const int NGROUPS_MAX = 16; +const int CSSM_TP_ACTION_FETCH_CRL_FROM_NET = 2; -const int UID_MAX = 2147483647; +const int CSSM_TP_ACTION_CRL_SUFFICIENT = 4; -const int OPEN_MAX = 10240; +const int CSSM_TP_ACTION_REQUIRE_CRL_IF_PRESENT = 8; -const int PATH_MAX = 1024; +const int CSSM_TP_ACTION_ALLOW_EXPIRED = 1; -const int PIPE_BUF = 512; +const int CSSM_TP_ACTION_LEAF_IS_CA = 2; -const int BC_BASE_MAX = 99; +const int CSSM_TP_ACTION_FETCH_CERT_FROM_NET = 4; -const int BC_DIM_MAX = 2048; +const int CSSM_TP_ACTION_ALLOW_EXPIRED_ROOT = 8; -const int BC_SCALE_MAX = 99; +const int CSSM_TP_ACTION_REQUIRE_REV_PER_CERT = 16; -const int BC_STRING_MAX = 1000; +const int CSSM_TP_ACTION_TRUST_SETTINGS = 32; -const int CHARCLASS_NAME_MAX = 14; +const int CSSM_TP_ACTION_IMPLICIT_ANCHORS = 64; -const int COLL_WEIGHTS_MAX = 2; +const int CSSM_CERT_STATUS_EXPIRED = 1; -const int EQUIV_CLASS_MAX = 2; +const int CSSM_CERT_STATUS_NOT_VALID_YET = 2; -const int EXPR_NEST_MAX = 32; +const int CSSM_CERT_STATUS_IS_IN_INPUT_CERTS = 4; -const int LINE_MAX = 2048; +const int CSSM_CERT_STATUS_IS_IN_ANCHORS = 8; -const int RE_DUP_MAX = 255; +const int CSSM_CERT_STATUS_IS_ROOT = 16; -const int NZERO = 20; +const int CSSM_CERT_STATUS_IS_FROM_NET = 32; -const int _POSIX_ARG_MAX = 4096; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_USER = 64; -const int _POSIX_CHILD_MAX = 25; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_ADMIN = 128; -const int _POSIX_LINK_MAX = 8; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_SYSTEM = 256; -const int _POSIX_MAX_CANON = 255; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_TRUST = 512; -const int _POSIX_MAX_INPUT = 255; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_DENY = 1024; -const int _POSIX_NAME_MAX = 14; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_IGNORED_ERROR = 2048; -const int _POSIX_NGROUPS_MAX = 8; +const int CSSM_EVIDENCE_FORM_APPLE_HEADER = -2147483648; -const int _POSIX_OPEN_MAX = 20; +const int CSSM_EVIDENCE_FORM_APPLE_CERTGROUP = -2147483647; -const int _POSIX_PATH_MAX = 256; +const int CSSM_EVIDENCE_FORM_APPLE_CERT_INFO = -2147483646; -const int _POSIX_PIPE_BUF = 512; +const int CSSM_APPLEX509CL_OBTAIN_CSR = 0; -const int _POSIX_SSIZE_MAX = 32767; +const int CSSM_APPLEX509CL_VERIFY_CSR = 1; -const int _POSIX_STREAM_MAX = 8; +const int kSecSubjectItemAttr = 1937072746; -const int _POSIX_TZNAME_MAX = 6; +const int kSecIssuerItemAttr = 1769173877; -const int _POSIX2_BC_BASE_MAX = 99; +const int kSecSerialNumberItemAttr = 1936614002; -const int _POSIX2_BC_DIM_MAX = 2048; +const int kSecPublicKeyHashItemAttr = 1752198009; -const int _POSIX2_BC_SCALE_MAX = 99; +const int kSecSubjectKeyIdentifierItemAttr = 1936419172; -const int _POSIX2_BC_STRING_MAX = 1000; +const int kSecCertTypeItemAttr = 1668577648; -const int _POSIX2_EQUIV_CLASS_MAX = 2; +const int kSecCertEncodingItemAttr = 1667591779; -const int _POSIX2_EXPR_NEST_MAX = 32; +const int SSL_NULL_WITH_NULL_NULL = 0; -const int _POSIX2_LINE_MAX = 2048; +const int SSL_RSA_WITH_NULL_MD5 = 1; -const int _POSIX2_RE_DUP_MAX = 255; +const int SSL_RSA_WITH_NULL_SHA = 2; -const int _POSIX_AIO_LISTIO_MAX = 2; +const int SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3; -const int _POSIX_AIO_MAX = 1; +const int SSL_RSA_WITH_RC4_128_MD5 = 4; -const int _POSIX_DELAYTIMER_MAX = 32; +const int SSL_RSA_WITH_RC4_128_SHA = 5; -const int _POSIX_MQ_OPEN_MAX = 8; +const int SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6; -const int _POSIX_MQ_PRIO_MAX = 32; +const int SSL_RSA_WITH_IDEA_CBC_SHA = 7; -const int _POSIX_RTSIG_MAX = 8; +const int SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8; -const int _POSIX_SEM_NSEMS_MAX = 256; +const int SSL_RSA_WITH_DES_CBC_SHA = 9; -const int _POSIX_SEM_VALUE_MAX = 32767; +const int SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10; -const int _POSIX_SIGQUEUE_MAX = 32; +const int SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11; -const int _POSIX_TIMER_MAX = 32; +const int SSL_DH_DSS_WITH_DES_CBC_SHA = 12; -const int _POSIX_CLOCKRES_MIN = 20000000; +const int SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; -const int _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4; +const int SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14; -const int _POSIX_THREAD_KEYS_MAX = 128; +const int SSL_DH_RSA_WITH_DES_CBC_SHA = 15; -const int _POSIX_THREAD_THREADS_MAX = 64; +const int SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; -const int PTHREAD_DESTRUCTOR_ITERATIONS = 4; +const int SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17; -const int PTHREAD_KEYS_MAX = 512; +const int SSL_DHE_DSS_WITH_DES_CBC_SHA = 18; -const int PTHREAD_STACK_MIN = 16384; +const int SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; -const int _POSIX_HOST_NAME_MAX = 255; +const int SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20; -const int _POSIX_LOGIN_NAME_MAX = 9; +const int SSL_DHE_RSA_WITH_DES_CBC_SHA = 21; -const int _POSIX_SS_REPL_MAX = 4; +const int SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; -const int _POSIX_SYMLINK_MAX = 255; +const int SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23; -const int _POSIX_SYMLOOP_MAX = 8; +const int SSL_DH_anon_WITH_RC4_128_MD5 = 24; -const int _POSIX_TRACE_EVENT_NAME_MAX = 30; +const int SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25; -const int _POSIX_TRACE_NAME_MAX = 8; +const int SSL_DH_anon_WITH_DES_CBC_SHA = 26; -const int _POSIX_TRACE_SYS_MAX = 8; +const int SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; -const int _POSIX_TRACE_USER_EVENT_MAX = 32; +const int SSL_FORTEZZA_DMS_WITH_NULL_SHA = 28; -const int _POSIX_TTY_NAME_MAX = 9; +const int SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = 29; -const int _POSIX2_CHARCLASS_NAME_MAX = 14; +const int TLS_RSA_WITH_AES_128_CBC_SHA = 47; -const int _POSIX2_COLL_WEIGHTS_MAX = 2; +const int TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48; -const int _POSIX_RE_DUP_MAX = 255; +const int TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49; -const int OFF_MIN = -9223372036854775808; +const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50; -const int OFF_MAX = 9223372036854775807; +const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51; -const int PASS_MAX = 128; +const int TLS_DH_anon_WITH_AES_128_CBC_SHA = 52; -const int NL_ARGMAX = 9; +const int TLS_RSA_WITH_AES_256_CBC_SHA = 53; -const int NL_LANGMAX = 14; +const int TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54; -const int NL_MSGMAX = 32767; +const int TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55; -const int NL_NMAX = 1; +const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56; -const int NL_SETMAX = 255; +const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57; -const int NL_TEXTMAX = 2048; +const int TLS_DH_anon_WITH_AES_256_CBC_SHA = 58; -const int _XOPEN_IOV_MAX = 16; +const int TLS_ECDH_ECDSA_WITH_NULL_SHA = -16383; -const int IOV_MAX = 1024; +const int TLS_ECDH_ECDSA_WITH_RC4_128_SHA = -16382; -const int _XOPEN_NAME_MAX = 255; +const int TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = -16381; -const int _XOPEN_PATH_MAX = 1024; +const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = -16380; -const int NS_BLOCKS_AVAILABLE = 1; +const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = -16379; -const int __COREFOUNDATION_CFAVAILABILITY__ = 1; +const int TLS_ECDHE_ECDSA_WITH_NULL_SHA = -16378; -const int API_TO_BE_DEPRECATED = 100000; +const int TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = -16377; -const int __CF_ENUM_FIXED_IS_AVAILABLE = 1; +const int TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; -const double NSFoundationVersionNumber10_0 = 397.4; +const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; -const double NSFoundationVersionNumber10_1 = 425.0; +const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; -const double NSFoundationVersionNumber10_1_1 = 425.0; +const int TLS_ECDH_RSA_WITH_NULL_SHA = -16373; -const double NSFoundationVersionNumber10_1_2 = 425.0; +const int TLS_ECDH_RSA_WITH_RC4_128_SHA = -16372; -const double NSFoundationVersionNumber10_1_3 = 425.0; +const int TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = -16371; -const double NSFoundationVersionNumber10_1_4 = 425.0; +const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = -16370; -const double NSFoundationVersionNumber10_2 = 462.0; +const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = -16369; -const double NSFoundationVersionNumber10_2_1 = 462.0; +const int TLS_ECDHE_RSA_WITH_NULL_SHA = -16368; -const double NSFoundationVersionNumber10_2_2 = 462.0; +const int TLS_ECDHE_RSA_WITH_RC4_128_SHA = -16367; -const double NSFoundationVersionNumber10_2_3 = 462.0; +const int TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; -const double NSFoundationVersionNumber10_2_4 = 462.0; +const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; -const double NSFoundationVersionNumber10_2_5 = 462.0; +const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; -const double NSFoundationVersionNumber10_2_6 = 462.0; +const int TLS_ECDH_anon_WITH_NULL_SHA = -16363; -const double NSFoundationVersionNumber10_2_7 = 462.7; +const int TLS_ECDH_anon_WITH_RC4_128_SHA = -16362; -const double NSFoundationVersionNumber10_2_8 = 462.7; +const int TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = -16361; -const double NSFoundationVersionNumber10_3 = 500.0; +const int TLS_ECDH_anon_WITH_AES_128_CBC_SHA = -16360; -const double NSFoundationVersionNumber10_3_1 = 500.0; +const int TLS_ECDH_anon_WITH_AES_256_CBC_SHA = -16359; -const double NSFoundationVersionNumber10_3_2 = 500.3; +const int TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = -16331; -const double NSFoundationVersionNumber10_3_3 = 500.54; +const int TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = -16330; -const double NSFoundationVersionNumber10_3_4 = 500.56; +const int TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = -13141; -const double NSFoundationVersionNumber10_3_5 = 500.56; +const int TLS_NULL_WITH_NULL_NULL = 0; -const double NSFoundationVersionNumber10_3_6 = 500.56; +const int TLS_RSA_WITH_NULL_MD5 = 1; -const double NSFoundationVersionNumber10_3_7 = 500.56; +const int TLS_RSA_WITH_NULL_SHA = 2; -const double NSFoundationVersionNumber10_3_8 = 500.56; +const int TLS_RSA_WITH_RC4_128_MD5 = 4; -const double NSFoundationVersionNumber10_3_9 = 500.58; +const int TLS_RSA_WITH_RC4_128_SHA = 5; -const double NSFoundationVersionNumber10_4 = 567.0; +const int TLS_RSA_WITH_3DES_EDE_CBC_SHA = 10; -const double NSFoundationVersionNumber10_4_1 = 567.0; +const int TLS_RSA_WITH_NULL_SHA256 = 59; -const double NSFoundationVersionNumber10_4_2 = 567.12; +const int TLS_RSA_WITH_AES_128_CBC_SHA256 = 60; -const double NSFoundationVersionNumber10_4_3 = 567.21; +const int TLS_RSA_WITH_AES_256_CBC_SHA256 = 61; -const double NSFoundationVersionNumber10_4_4_Intel = 567.23; +const int TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; -const double NSFoundationVersionNumber10_4_4_PowerPC = 567.21; +const int TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; -const double NSFoundationVersionNumber10_4_5 = 567.25; +const int TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; -const double NSFoundationVersionNumber10_4_6 = 567.26; +const int TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; -const double NSFoundationVersionNumber10_4_7 = 567.27; +const int TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 62; -const double NSFoundationVersionNumber10_4_8 = 567.28; +const int TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 63; -const double NSFoundationVersionNumber10_4_9 = 567.29; +const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 64; -const double NSFoundationVersionNumber10_4_10 = 567.29; +const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 103; -const double NSFoundationVersionNumber10_4_11 = 567.36; +const int TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 104; -const double NSFoundationVersionNumber10_5 = 677.0; +const int TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 105; -const double NSFoundationVersionNumber10_5_1 = 677.1; +const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 106; -const double NSFoundationVersionNumber10_5_2 = 677.15; +const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 107; -const double NSFoundationVersionNumber10_5_3 = 677.19; +const int TLS_DH_anon_WITH_RC4_128_MD5 = 24; -const double NSFoundationVersionNumber10_5_4 = 677.19; +const int TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; -const double NSFoundationVersionNumber10_5_5 = 677.21; +const int TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 108; -const double NSFoundationVersionNumber10_5_6 = 677.22; +const int TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 109; -const double NSFoundationVersionNumber10_5_7 = 677.24; +const int TLS_PSK_WITH_RC4_128_SHA = 138; -const double NSFoundationVersionNumber10_5_8 = 677.26; +const int TLS_PSK_WITH_3DES_EDE_CBC_SHA = 139; -const double NSFoundationVersionNumber10_6 = 751.0; +const int TLS_PSK_WITH_AES_128_CBC_SHA = 140; -const double NSFoundationVersionNumber10_6_1 = 751.0; +const int TLS_PSK_WITH_AES_256_CBC_SHA = 141; -const double NSFoundationVersionNumber10_6_2 = 751.14; +const int TLS_DHE_PSK_WITH_RC4_128_SHA = 142; -const double NSFoundationVersionNumber10_6_3 = 751.21; +const int TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = 143; -const double NSFoundationVersionNumber10_6_4 = 751.29; +const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA = 144; -const double NSFoundationVersionNumber10_6_5 = 751.42; +const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA = 145; -const double NSFoundationVersionNumber10_6_6 = 751.53; +const int TLS_RSA_PSK_WITH_RC4_128_SHA = 146; -const double NSFoundationVersionNumber10_6_7 = 751.53; +const int TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = 147; -const double NSFoundationVersionNumber10_6_8 = 751.62; +const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA = 148; -const double NSFoundationVersionNumber10_7 = 833.1; +const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA = 149; -const double NSFoundationVersionNumber10_7_1 = 833.1; +const int TLS_PSK_WITH_NULL_SHA = 44; -const double NSFoundationVersionNumber10_7_2 = 833.2; +const int TLS_DHE_PSK_WITH_NULL_SHA = 45; -const double NSFoundationVersionNumber10_7_3 = 833.24; +const int TLS_RSA_PSK_WITH_NULL_SHA = 46; -const double NSFoundationVersionNumber10_7_4 = 833.25; +const int TLS_RSA_WITH_AES_128_GCM_SHA256 = 156; -const double NSFoundationVersionNumber10_8 = 945.0; +const int TLS_RSA_WITH_AES_256_GCM_SHA384 = 157; -const double NSFoundationVersionNumber10_8_1 = 945.0; +const int TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 158; -const double NSFoundationVersionNumber10_8_2 = 945.11; +const int TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 159; -const double NSFoundationVersionNumber10_8_3 = 945.16; +const int TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = 160; -const double NSFoundationVersionNumber10_8_4 = 945.18; +const int TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = 161; -const int NSFoundationVersionNumber10_9 = 1056; +const int TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = 162; -const int NSFoundationVersionNumber10_9_1 = 1056; +const int TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = 163; -const double NSFoundationVersionNumber10_9_2 = 1056.13; +const int TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = 164; -const double NSFoundationVersionNumber10_10 = 1151.16; +const int TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = 165; -const double NSFoundationVersionNumber10_10_1 = 1151.16; +const int TLS_DH_anon_WITH_AES_128_GCM_SHA256 = 166; -const double NSFoundationVersionNumber10_10_2 = 1152.14; +const int TLS_DH_anon_WITH_AES_256_GCM_SHA384 = 167; -const double NSFoundationVersionNumber10_10_3 = 1153.2; +const int TLS_PSK_WITH_AES_128_GCM_SHA256 = 168; -const double NSFoundationVersionNumber10_10_4 = 1153.2; +const int TLS_PSK_WITH_AES_256_GCM_SHA384 = 169; -const int NSFoundationVersionNumber10_10_5 = 1154; +const int TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 170; -const int NSFoundationVersionNumber10_10_Max = 1199; +const int TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 171; -const int NSFoundationVersionNumber10_11 = 1252; +const int TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = 172; -const double NSFoundationVersionNumber10_11_1 = 1255.1; +const int TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = 173; -const double NSFoundationVersionNumber10_11_2 = 1256.1; +const int TLS_PSK_WITH_AES_128_CBC_SHA256 = 174; -const double NSFoundationVersionNumber10_11_3 = 1256.1; +const int TLS_PSK_WITH_AES_256_CBC_SHA384 = 175; -const int NSFoundationVersionNumber10_11_4 = 1258; +const int TLS_PSK_WITH_NULL_SHA256 = 176; -const int NSFoundationVersionNumber10_11_Max = 1299; +const int TLS_PSK_WITH_NULL_SHA384 = 177; -const int __COREFOUNDATION_CFBASE__ = 1; +const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = 178; -const int UNIVERSAL_INTERFACES_VERSION = 1024; +const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = 179; -const int PRAGMA_IMPORT = 0; +const int TLS_DHE_PSK_WITH_NULL_SHA256 = 180; -const int PRAGMA_ONCE = 0; +const int TLS_DHE_PSK_WITH_NULL_SHA384 = 181; -const int PRAGMA_STRUCT_PACK = 1; +const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = 182; -const int PRAGMA_STRUCT_PACKPUSH = 1; +const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = 183; -const int PRAGMA_STRUCT_ALIGN = 0; +const int TLS_RSA_PSK_WITH_NULL_SHA256 = 184; -const int PRAGMA_ENUM_PACK = 0; +const int TLS_RSA_PSK_WITH_NULL_SHA384 = 185; -const int PRAGMA_ENUM_ALWAYSINT = 0; +const int TLS_AES_128_GCM_SHA256 = 4865; -const int PRAGMA_ENUM_OPTIONS = 0; +const int TLS_AES_256_GCM_SHA384 = 4866; -const int TYPE_EXTENDED = 0; +const int TLS_CHACHA20_POLY1305_SHA256 = 4867; -const int TYPE_LONGDOUBLE_IS_DOUBLE = 0; +const int TLS_AES_128_CCM_SHA256 = 4868; -const int TYPE_LONGLONG = 1; +const int TLS_AES_128_CCM_8_SHA256 = 4869; -const int FUNCTION_PASCAL = 0; +const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; -const int FUNCTION_DECLSPEC = 0; +const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; -const int FUNCTION_WIN32CC = 0; +const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = -16347; -const int TARGET_API_MAC_OS8 = 0; +const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = -16346; -const int TARGET_API_MAC_CARBON = 1; +const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; -const int TARGET_API_MAC_OSX = 1; +const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; -const int TARGET_CARBON = 1; +const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = -16343; -const int OLDROUTINENAMES = 0; +const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = -16342; -const int OPAQUE_TOOLBOX_STRUCTS = 1; +const int TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; -const int OPAQUE_UPP_TYPES = 1; +const int TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; -const int ACCESSOR_CALLS_ARE_FUNCTIONS = 1; +const int TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = -16339; -const int CALL_NOT_IN_CARBON = 0; +const int TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = -16338; -const int MIXEDMODE_CALLS_ARE_FUNCTIONS = 1; +const int TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; -const int ALLOW_OBSOLETE_CARBON_MACMEMORY = 0; +const int TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; -const int ALLOW_OBSOLETE_CARBON_OSUTILS = 0; +const int TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = -16335; -const int NULL = 0; +const int TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = -16334; -const int kInvalidID = 0; +const int TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = -13144; -const int TRUE = 1; +const int TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = -13143; -const int FALSE = 0; +const int TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 255; -const double kCFCoreFoundationVersionNumber10_0 = 196.4; +const int SSL_RSA_WITH_RC2_CBC_MD5 = -128; -const double kCFCoreFoundationVersionNumber10_0_3 = 196.5; +const int SSL_RSA_WITH_IDEA_CBC_MD5 = -127; -const double kCFCoreFoundationVersionNumber10_1 = 226.0; +const int SSL_RSA_WITH_DES_CBC_MD5 = -126; -const double kCFCoreFoundationVersionNumber10_1_1 = 226.0; +const int SSL_RSA_WITH_3DES_EDE_CBC_MD5 = -125; -const double kCFCoreFoundationVersionNumber10_1_2 = 227.2; +const int SSL_NO_SUCH_CIPHERSUITE = -1; -const double kCFCoreFoundationVersionNumber10_1_3 = 227.2; +const int NSASCIIStringEncoding = 1; -const double kCFCoreFoundationVersionNumber10_1_4 = 227.3; +const int NSNEXTSTEPStringEncoding = 2; -const double kCFCoreFoundationVersionNumber10_2 = 263.0; +const int NSJapaneseEUCStringEncoding = 3; -const double kCFCoreFoundationVersionNumber10_2_1 = 263.1; +const int NSUTF8StringEncoding = 4; -const double kCFCoreFoundationVersionNumber10_2_2 = 263.1; +const int NSISOLatin1StringEncoding = 5; -const double kCFCoreFoundationVersionNumber10_2_3 = 263.3; +const int NSSymbolStringEncoding = 6; -const double kCFCoreFoundationVersionNumber10_2_4 = 263.3; +const int NSNonLossyASCIIStringEncoding = 7; -const double kCFCoreFoundationVersionNumber10_2_5 = 263.5; +const int NSShiftJISStringEncoding = 8; -const double kCFCoreFoundationVersionNumber10_2_6 = 263.5; +const int NSISOLatin2StringEncoding = 9; -const double kCFCoreFoundationVersionNumber10_2_7 = 263.5; +const int NSUnicodeStringEncoding = 10; -const double kCFCoreFoundationVersionNumber10_2_8 = 263.5; +const int NSWindowsCP1251StringEncoding = 11; -const double kCFCoreFoundationVersionNumber10_3 = 299.0; +const int NSWindowsCP1252StringEncoding = 12; -const double kCFCoreFoundationVersionNumber10_3_1 = 299.0; +const int NSWindowsCP1253StringEncoding = 13; -const double kCFCoreFoundationVersionNumber10_3_2 = 299.0; +const int NSWindowsCP1254StringEncoding = 14; -const double kCFCoreFoundationVersionNumber10_3_3 = 299.3; +const int NSWindowsCP1250StringEncoding = 15; -const double kCFCoreFoundationVersionNumber10_3_4 = 299.31; +const int NSISO2022JPStringEncoding = 21; -const double kCFCoreFoundationVersionNumber10_3_5 = 299.31; +const int NSMacOSRomanStringEncoding = 30; -const double kCFCoreFoundationVersionNumber10_3_6 = 299.32; +const int NSUTF16StringEncoding = 10; -const double kCFCoreFoundationVersionNumber10_3_7 = 299.33; +const int NSUTF16BigEndianStringEncoding = 2415919360; -const double kCFCoreFoundationVersionNumber10_3_8 = 299.33; +const int NSUTF16LittleEndianStringEncoding = 2483028224; -const double kCFCoreFoundationVersionNumber10_3_9 = 299.35; +const int NSUTF32StringEncoding = 2348810496; -const double kCFCoreFoundationVersionNumber10_4 = 368.0; +const int NSUTF32BigEndianStringEncoding = 2550137088; -const double kCFCoreFoundationVersionNumber10_4_1 = 368.1; +const int NSUTF32LittleEndianStringEncoding = 2617245952; -const double kCFCoreFoundationVersionNumber10_4_2 = 368.11; +const int NSProprietaryStringEncoding = 65536; -const double kCFCoreFoundationVersionNumber10_4_3 = 368.18; +const int NSOpenStepUnicodeReservedBase = 62464; -const double kCFCoreFoundationVersionNumber10_4_4_Intel = 368.26; +const int kNativeArgNumberPos = 0; -const double kCFCoreFoundationVersionNumber10_4_4_PowerPC = 368.25; +const int kNativeArgNumberSize = 8; -const double kCFCoreFoundationVersionNumber10_4_5_Intel = 368.26; +const int kNativeArgTypePos = 8; -const double kCFCoreFoundationVersionNumber10_4_5_PowerPC = 368.25; +const int kNativeArgTypeSize = 8; -const double kCFCoreFoundationVersionNumber10_4_6_Intel = 368.26; +const int DYNAMIC_TARGETS_ENABLED = 0; -const double kCFCoreFoundationVersionNumber10_4_6_PowerPC = 368.25; +const int TARGET_OS_MAC = 1; -const double kCFCoreFoundationVersionNumber10_4_7 = 368.27; +const int TARGET_OS_WIN32 = 0; -const double kCFCoreFoundationVersionNumber10_4_8 = 368.27; +const int TARGET_OS_WINDOWS = 0; -const double kCFCoreFoundationVersionNumber10_4_9 = 368.28; +const int TARGET_OS_UNIX = 0; -const double kCFCoreFoundationVersionNumber10_4_10 = 368.28; +const int TARGET_OS_LINUX = 0; -const double kCFCoreFoundationVersionNumber10_4_11 = 368.31; +const int TARGET_OS_OSX = 1; -const double kCFCoreFoundationVersionNumber10_5 = 476.0; +const int TARGET_OS_IPHONE = 0; -const double kCFCoreFoundationVersionNumber10_5_1 = 476.0; +const int TARGET_OS_IOS = 0; -const double kCFCoreFoundationVersionNumber10_5_2 = 476.1; +const int TARGET_OS_WATCH = 0; -const double kCFCoreFoundationVersionNumber10_5_3 = 476.13; +const int TARGET_OS_TV = 0; -const double kCFCoreFoundationVersionNumber10_5_4 = 476.14; +const int TARGET_OS_MACCATALYST = 0; -const double kCFCoreFoundationVersionNumber10_5_5 = 476.15; +const int TARGET_OS_UIKITFORMAC = 0; -const double kCFCoreFoundationVersionNumber10_5_6 = 476.17; +const int TARGET_OS_SIMULATOR = 0; -const double kCFCoreFoundationVersionNumber10_5_7 = 476.18; +const int TARGET_OS_EMBEDDED = 0; -const double kCFCoreFoundationVersionNumber10_5_8 = 476.19; +const int TARGET_OS_RTKIT = 0; -const double kCFCoreFoundationVersionNumber10_6 = 550.0; +const int TARGET_OS_DRIVERKIT = 0; -const double kCFCoreFoundationVersionNumber10_6_1 = 550.0; +const int TARGET_IPHONE_SIMULATOR = 0; -const double kCFCoreFoundationVersionNumber10_6_2 = 550.13; +const int TARGET_OS_NANO = 0; -const double kCFCoreFoundationVersionNumber10_6_3 = 550.19; +const int TARGET_ABI_USES_IOS_VALUES = 1; -const double kCFCoreFoundationVersionNumber10_6_4 = 550.29; +const int TARGET_CPU_PPC = 0; -const double kCFCoreFoundationVersionNumber10_6_5 = 550.42; +const int TARGET_CPU_PPC64 = 0; -const double kCFCoreFoundationVersionNumber10_6_6 = 550.42; +const int TARGET_CPU_68K = 0; -const double kCFCoreFoundationVersionNumber10_6_7 = 550.42; +const int TARGET_CPU_X86 = 0; -const double kCFCoreFoundationVersionNumber10_6_8 = 550.43; +const int TARGET_CPU_X86_64 = 0; -const double kCFCoreFoundationVersionNumber10_7 = 635.0; +const int TARGET_CPU_ARM = 0; -const double kCFCoreFoundationVersionNumber10_7_1 = 635.0; +const int TARGET_CPU_ARM64 = 1; -const double kCFCoreFoundationVersionNumber10_7_2 = 635.15; +const int TARGET_CPU_MIPS = 0; -const double kCFCoreFoundationVersionNumber10_7_3 = 635.19; +const int TARGET_CPU_SPARC = 0; -const double kCFCoreFoundationVersionNumber10_7_4 = 635.21; +const int TARGET_CPU_ALPHA = 0; -const double kCFCoreFoundationVersionNumber10_7_5 = 635.21; +const int TARGET_RT_MAC_CFM = 0; -const double kCFCoreFoundationVersionNumber10_8 = 744.0; +const int TARGET_RT_MAC_MACHO = 1; -const double kCFCoreFoundationVersionNumber10_8_1 = 744.0; +const int TARGET_RT_LITTLE_ENDIAN = 1; -const double kCFCoreFoundationVersionNumber10_8_2 = 744.12; +const int TARGET_RT_BIG_ENDIAN = 0; -const double kCFCoreFoundationVersionNumber10_8_3 = 744.18; +const int TARGET_RT_64_BIT = 1; -const double kCFCoreFoundationVersionNumber10_8_4 = 744.19; +const int __API_TO_BE_DEPRECATED = 100000; -const double kCFCoreFoundationVersionNumber10_9 = 855.11; +const int __API_TO_BE_DEPRECATED_MACOS = 100000; -const double kCFCoreFoundationVersionNumber10_9_1 = 855.11; +const int __API_TO_BE_DEPRECATED_IOS = 100000; -const double kCFCoreFoundationVersionNumber10_9_2 = 855.14; +const int __API_TO_BE_DEPRECATED_TVOS = 100000; -const double kCFCoreFoundationVersionNumber10_10 = 1151.16; +const int __API_TO_BE_DEPRECATED_WATCHOS = 100000; -const double kCFCoreFoundationVersionNumber10_10_1 = 1151.16; +const int __API_TO_BE_DEPRECATED_MACCATALYST = 100000; -const int kCFCoreFoundationVersionNumber10_10_2 = 1152; +const int __API_TO_BE_DEPRECATED_DRIVERKIT = 100000; -const double kCFCoreFoundationVersionNumber10_10_3 = 1153.18; +const int __MAC_10_0 = 1000; -const double kCFCoreFoundationVersionNumber10_10_4 = 1153.18; +const int __MAC_10_1 = 1010; -const double kCFCoreFoundationVersionNumber10_10_5 = 1153.18; +const int __MAC_10_2 = 1020; -const int kCFCoreFoundationVersionNumber10_10_Max = 1199; +const int __MAC_10_3 = 1030; -const int kCFCoreFoundationVersionNumber10_11 = 1253; +const int __MAC_10_4 = 1040; -const double kCFCoreFoundationVersionNumber10_11_1 = 1255.1; +const int __MAC_10_5 = 1050; -const double kCFCoreFoundationVersionNumber10_11_2 = 1256.14; +const int __MAC_10_6 = 1060; -const double kCFCoreFoundationVersionNumber10_11_3 = 1256.14; +const int __MAC_10_7 = 1070; -const double kCFCoreFoundationVersionNumber10_11_4 = 1258.1; +const int __MAC_10_8 = 1080; -const int kCFCoreFoundationVersionNumber10_11_Max = 1299; +const int __MAC_10_9 = 1090; -const int ISA_PTRAUTH_DISCRIMINATOR = 27361; +const int __MAC_10_10 = 101000; -const double NSTimeIntervalSince1970 = 978307200.0; +const int __MAC_10_10_2 = 101002; -const int __COREFOUNDATION_CFARRAY__ = 1; +const int __MAC_10_10_3 = 101003; -const int OS_OBJECT_HAVE_OBJC_SUPPORT = 0; +const int __MAC_10_11 = 101100; -const int OS_OBJECT_USE_OBJC = 0; +const int __MAC_10_11_2 = 101102; -const int OS_OBJECT_SWIFT3 = 0; +const int __MAC_10_11_3 = 101103; -const int OS_OBJECT_USE_OBJC_RETAIN_RELEASE = 0; +const int __MAC_10_11_4 = 101104; -const int SEC_OS_IPHONE = 0; +const int __MAC_10_12 = 101200; -const int SEC_OS_OSX = 1; +const int __MAC_10_12_1 = 101201; -const int SEC_OS_OSX_INCLUDES = 1; +const int __MAC_10_12_2 = 101202; -const int SECURITY_TYPE_UNIFICATION = 1; +const int __MAC_10_12_4 = 101204; -const int __COREFOUNDATION_COREFOUNDATION__ = 1; +const int __MAC_10_13 = 101300; -const int __COREFOUNDATION__ = 1; +const int __MAC_10_13_1 = 101301; -const String __ASSERT_FILE_NAME = 'temp_for_macros.hpp'; +const int __MAC_10_13_2 = 101302; -const int __DARWIN_WCHAR_MAX = 2147483647; +const int __MAC_10_13_4 = 101304; -const int __DARWIN_WCHAR_MIN = -2147483648; +const int __MAC_10_14 = 101400; -const int _FORTIFY_SOURCE = 2; +const int __MAC_10_14_1 = 101401; -const int _CACHED_RUNES = 256; +const int __MAC_10_14_4 = 101404; -const int _CRMASK = -256; +const int __MAC_10_14_6 = 101406; -const String _RUNE_MAGIC_A = 'RuneMagA'; +const int __MAC_10_15 = 101500; -const int _CTYPE_A = 256; +const int __MAC_10_15_1 = 101501; -const int _CTYPE_C = 512; +const int __MAC_10_15_4 = 101504; -const int _CTYPE_D = 1024; +const int __MAC_10_16 = 101600; -const int _CTYPE_G = 2048; +const int __MAC_11_0 = 110000; -const int _CTYPE_L = 4096; +const int __MAC_11_1 = 110100; -const int _CTYPE_P = 8192; +const int __MAC_11_3 = 110300; -const int _CTYPE_S = 16384; +const int __MAC_11_4 = 110400; -const int _CTYPE_U = 32768; +const int __MAC_11_5 = 110500; -const int _CTYPE_X = 65536; +const int __MAC_11_6 = 110600; -const int _CTYPE_B = 131072; +const int __MAC_12_0 = 120000; -const int _CTYPE_R = 262144; +const int __MAC_12_1 = 120100; -const int _CTYPE_I = 524288; +const int __MAC_12_2 = 120200; -const int _CTYPE_T = 1048576; +const int __MAC_12_3 = 120300; -const int _CTYPE_Q = 2097152; +const int __MAC_13_0 = 130000; -const int _CTYPE_SW0 = 536870912; +const int __IPHONE_2_0 = 20000; -const int _CTYPE_SW1 = 1073741824; +const int __IPHONE_2_1 = 20100; -const int _CTYPE_SW2 = 2147483648; +const int __IPHONE_2_2 = 20200; -const int _CTYPE_SW3 = 3221225472; +const int __IPHONE_3_0 = 30000; -const int _CTYPE_SWM = 3758096384; +const int __IPHONE_3_1 = 30100; -const int _CTYPE_SWS = 30; +const int __IPHONE_3_2 = 30200; -const int EPERM = 1; +const int __IPHONE_4_0 = 40000; -const int ENOENT = 2; +const int __IPHONE_4_1 = 40100; -const int ESRCH = 3; +const int __IPHONE_4_2 = 40200; -const int EINTR = 4; +const int __IPHONE_4_3 = 40300; -const int EIO = 5; +const int __IPHONE_5_0 = 50000; -const int ENXIO = 6; +const int __IPHONE_5_1 = 50100; -const int E2BIG = 7; +const int __IPHONE_6_0 = 60000; -const int ENOEXEC = 8; +const int __IPHONE_6_1 = 60100; -const int EBADF = 9; +const int __IPHONE_7_0 = 70000; -const int ECHILD = 10; +const int __IPHONE_7_1 = 70100; -const int EDEADLK = 11; +const int __IPHONE_8_0 = 80000; -const int ENOMEM = 12; +const int __IPHONE_8_1 = 80100; -const int EACCES = 13; +const int __IPHONE_8_2 = 80200; -const int EFAULT = 14; +const int __IPHONE_8_3 = 80300; -const int ENOTBLK = 15; +const int __IPHONE_8_4 = 80400; -const int EBUSY = 16; +const int __IPHONE_9_0 = 90000; -const int EEXIST = 17; +const int __IPHONE_9_1 = 90100; -const int EXDEV = 18; +const int __IPHONE_9_2 = 90200; -const int ENODEV = 19; +const int __IPHONE_9_3 = 90300; -const int ENOTDIR = 20; +const int __IPHONE_10_0 = 100000; -const int EISDIR = 21; +const int __IPHONE_10_1 = 100100; -const int EINVAL = 22; +const int __IPHONE_10_2 = 100200; -const int ENFILE = 23; +const int __IPHONE_10_3 = 100300; -const int EMFILE = 24; +const int __IPHONE_11_0 = 110000; -const int ENOTTY = 25; +const int __IPHONE_11_1 = 110100; -const int ETXTBSY = 26; +const int __IPHONE_11_2 = 110200; -const int EFBIG = 27; +const int __IPHONE_11_3 = 110300; -const int ENOSPC = 28; +const int __IPHONE_11_4 = 110400; -const int ESPIPE = 29; +const int __IPHONE_12_0 = 120000; -const int EROFS = 30; +const int __IPHONE_12_1 = 120100; -const int EMLINK = 31; +const int __IPHONE_12_2 = 120200; -const int EPIPE = 32; +const int __IPHONE_12_3 = 120300; -const int EDOM = 33; +const int __IPHONE_12_4 = 120400; -const int ERANGE = 34; +const int __IPHONE_13_0 = 130000; -const int EAGAIN = 35; +const int __IPHONE_13_1 = 130100; -const int EWOULDBLOCK = 35; +const int __IPHONE_13_2 = 130200; -const int EINPROGRESS = 36; +const int __IPHONE_13_3 = 130300; -const int EALREADY = 37; +const int __IPHONE_13_4 = 130400; -const int ENOTSOCK = 38; +const int __IPHONE_13_5 = 130500; -const int EDESTADDRREQ = 39; +const int __IPHONE_13_6 = 130600; -const int EMSGSIZE = 40; +const int __IPHONE_13_7 = 130700; -const int EPROTOTYPE = 41; +const int __IPHONE_14_0 = 140000; -const int ENOPROTOOPT = 42; +const int __IPHONE_14_1 = 140100; -const int EPROTONOSUPPORT = 43; +const int __IPHONE_14_2 = 140200; -const int ESOCKTNOSUPPORT = 44; +const int __IPHONE_14_3 = 140300; -const int ENOTSUP = 45; +const int __IPHONE_14_5 = 140500; -const int EPFNOSUPPORT = 46; +const int __IPHONE_14_6 = 140600; -const int EAFNOSUPPORT = 47; +const int __IPHONE_14_7 = 140700; -const int EADDRINUSE = 48; +const int __IPHONE_14_8 = 140800; -const int EADDRNOTAVAIL = 49; +const int __IPHONE_15_0 = 150000; -const int ENETDOWN = 50; +const int __IPHONE_15_1 = 150100; -const int ENETUNREACH = 51; +const int __IPHONE_15_2 = 150200; -const int ENETRESET = 52; +const int __IPHONE_15_3 = 150300; -const int ECONNABORTED = 53; +const int __IPHONE_15_4 = 150400; -const int ECONNRESET = 54; +const int __IPHONE_16_0 = 160000; -const int ENOBUFS = 55; +const int __IPHONE_16_1 = 160100; -const int EISCONN = 56; +const int __TVOS_9_0 = 90000; -const int ENOTCONN = 57; +const int __TVOS_9_1 = 90100; -const int ESHUTDOWN = 58; +const int __TVOS_9_2 = 90200; -const int ETOOMANYREFS = 59; +const int __TVOS_10_0 = 100000; -const int ETIMEDOUT = 60; +const int __TVOS_10_0_1 = 100001; -const int ECONNREFUSED = 61; +const int __TVOS_10_1 = 100100; -const int ELOOP = 62; +const int __TVOS_10_2 = 100200; -const int ENAMETOOLONG = 63; +const int __TVOS_11_0 = 110000; -const int EHOSTDOWN = 64; +const int __TVOS_11_1 = 110100; -const int EHOSTUNREACH = 65; +const int __TVOS_11_2 = 110200; -const int ENOTEMPTY = 66; +const int __TVOS_11_3 = 110300; -const int EPROCLIM = 67; +const int __TVOS_11_4 = 110400; -const int EUSERS = 68; +const int __TVOS_12_0 = 120000; -const int EDQUOT = 69; +const int __TVOS_12_1 = 120100; -const int ESTALE = 70; +const int __TVOS_12_2 = 120200; -const int EREMOTE = 71; +const int __TVOS_12_3 = 120300; -const int EBADRPC = 72; +const int __TVOS_12_4 = 120400; -const int ERPCMISMATCH = 73; +const int __TVOS_13_0 = 130000; -const int EPROGUNAVAIL = 74; +const int __TVOS_13_2 = 130200; -const int EPROGMISMATCH = 75; +const int __TVOS_13_3 = 130300; -const int EPROCUNAVAIL = 76; +const int __TVOS_13_4 = 130400; -const int ENOLCK = 77; +const int __TVOS_14_0 = 140000; -const int ENOSYS = 78; +const int __TVOS_14_1 = 140100; -const int EFTYPE = 79; +const int __TVOS_14_2 = 140200; -const int EAUTH = 80; +const int __TVOS_14_3 = 140300; -const int ENEEDAUTH = 81; +const int __TVOS_14_5 = 140500; -const int EPWROFF = 82; +const int __TVOS_14_6 = 140600; -const int EDEVERR = 83; +const int __TVOS_14_7 = 140700; -const int EOVERFLOW = 84; +const int __TVOS_15_0 = 150000; -const int EBADEXEC = 85; +const int __TVOS_15_1 = 150100; -const int EBADARCH = 86; +const int __TVOS_15_2 = 150200; -const int ESHLIBVERS = 87; +const int __TVOS_15_3 = 150300; -const int EBADMACHO = 88; +const int __TVOS_15_4 = 150400; -const int ECANCELED = 89; +const int __TVOS_16_0 = 160000; -const int EIDRM = 90; +const int __TVOS_16_1 = 160100; -const int ENOMSG = 91; +const int __WATCHOS_1_0 = 10000; -const int EILSEQ = 92; +const int __WATCHOS_2_0 = 20000; -const int ENOATTR = 93; +const int __WATCHOS_2_1 = 20100; -const int EBADMSG = 94; +const int __WATCHOS_2_2 = 20200; -const int EMULTIHOP = 95; +const int __WATCHOS_3_0 = 30000; -const int ENODATA = 96; +const int __WATCHOS_3_1 = 30100; -const int ENOLINK = 97; +const int __WATCHOS_3_1_1 = 30101; -const int ENOSR = 98; +const int __WATCHOS_3_2 = 30200; -const int ENOSTR = 99; +const int __WATCHOS_4_0 = 40000; -const int EPROTO = 100; +const int __WATCHOS_4_1 = 40100; -const int ETIME = 101; +const int __WATCHOS_4_2 = 40200; -const int EOPNOTSUPP = 102; +const int __WATCHOS_4_3 = 40300; -const int ENOPOLICY = 103; +const int __WATCHOS_5_0 = 50000; -const int ENOTRECOVERABLE = 104; +const int __WATCHOS_5_1 = 50100; -const int EOWNERDEAD = 105; +const int __WATCHOS_5_2 = 50200; -const int EQFULL = 106; +const int __WATCHOS_5_3 = 50300; -const int ELAST = 106; +const int __WATCHOS_6_0 = 60000; -const int FLT_EVAL_METHOD = 0; +const int __WATCHOS_6_1 = 60100; -const int FLT_RADIX = 2; +const int __WATCHOS_6_2 = 60200; -const int FLT_MANT_DIG = 24; +const int __WATCHOS_7_0 = 70000; -const int DBL_MANT_DIG = 53; +const int __WATCHOS_7_1 = 70100; -const int LDBL_MANT_DIG = 53; +const int __WATCHOS_7_2 = 70200; -const int FLT_DIG = 6; +const int __WATCHOS_7_3 = 70300; -const int DBL_DIG = 15; +const int __WATCHOS_7_4 = 70400; -const int LDBL_DIG = 15; +const int __WATCHOS_7_5 = 70500; -const int FLT_MIN_EXP = -125; +const int __WATCHOS_7_6 = 70600; -const int DBL_MIN_EXP = -1021; +const int __WATCHOS_8_0 = 80000; -const int LDBL_MIN_EXP = -1021; +const int __WATCHOS_8_1 = 80100; -const int FLT_MIN_10_EXP = -37; +const int __WATCHOS_8_3 = 80300; -const int DBL_MIN_10_EXP = -307; +const int __WATCHOS_8_4 = 80400; -const int LDBL_MIN_10_EXP = -307; +const int __WATCHOS_8_5 = 80500; -const int FLT_MAX_EXP = 128; +const int __WATCHOS_9_0 = 90000; -const int DBL_MAX_EXP = 1024; +const int __WATCHOS_9_1 = 90100; -const int LDBL_MAX_EXP = 1024; +const int MAC_OS_X_VERSION_10_0 = 1000; -const int FLT_MAX_10_EXP = 38; +const int MAC_OS_X_VERSION_10_1 = 1010; -const int DBL_MAX_10_EXP = 308; +const int MAC_OS_X_VERSION_10_2 = 1020; -const int LDBL_MAX_10_EXP = 308; +const int MAC_OS_X_VERSION_10_3 = 1030; -const double FLT_MAX = 3.4028234663852886e+38; +const int MAC_OS_X_VERSION_10_4 = 1040; -const double DBL_MAX = 1.7976931348623157e+308; +const int MAC_OS_X_VERSION_10_5 = 1050; -const double LDBL_MAX = 1.7976931348623157e+308; +const int MAC_OS_X_VERSION_10_6 = 1060; -const double FLT_EPSILON = 1.1920928955078125e-7; +const int MAC_OS_X_VERSION_10_7 = 1070; -const double DBL_EPSILON = 2.220446049250313e-16; +const int MAC_OS_X_VERSION_10_8 = 1080; -const double LDBL_EPSILON = 2.220446049250313e-16; +const int MAC_OS_X_VERSION_10_9 = 1090; -const double FLT_MIN = 1.1754943508222875e-38; +const int MAC_OS_X_VERSION_10_10 = 101000; -const double DBL_MIN = 2.2250738585072014e-308; +const int MAC_OS_X_VERSION_10_10_2 = 101002; -const double LDBL_MIN = 2.2250738585072014e-308; +const int MAC_OS_X_VERSION_10_10_3 = 101003; -const int DECIMAL_DIG = 17; +const int MAC_OS_X_VERSION_10_11 = 101100; -const int FLT_HAS_SUBNORM = 1; +const int MAC_OS_X_VERSION_10_11_2 = 101102; -const int DBL_HAS_SUBNORM = 1; +const int MAC_OS_X_VERSION_10_11_3 = 101103; -const int LDBL_HAS_SUBNORM = 1; +const int MAC_OS_X_VERSION_10_11_4 = 101104; -const double FLT_TRUE_MIN = 1.401298464324817e-45; +const int MAC_OS_X_VERSION_10_12 = 101200; -const double DBL_TRUE_MIN = 5e-324; +const int MAC_OS_X_VERSION_10_12_1 = 101201; -const double LDBL_TRUE_MIN = 5e-324; +const int MAC_OS_X_VERSION_10_12_2 = 101202; -const int FLT_DECIMAL_DIG = 9; +const int MAC_OS_X_VERSION_10_12_4 = 101204; -const int DBL_DECIMAL_DIG = 17; +const int MAC_OS_X_VERSION_10_13 = 101300; -const int LDBL_DECIMAL_DIG = 17; +const int MAC_OS_X_VERSION_10_13_1 = 101301; -const int LC_ALL = 0; +const int MAC_OS_X_VERSION_10_13_2 = 101302; -const int LC_COLLATE = 1; +const int MAC_OS_X_VERSION_10_13_4 = 101304; -const int LC_CTYPE = 2; +const int MAC_OS_X_VERSION_10_14 = 101400; -const int LC_MONETARY = 3; +const int MAC_OS_X_VERSION_10_14_1 = 101401; -const int LC_NUMERIC = 4; +const int MAC_OS_X_VERSION_10_14_4 = 101404; -const int LC_TIME = 5; +const int MAC_OS_X_VERSION_10_14_6 = 101406; -const int LC_MESSAGES = 6; +const int MAC_OS_X_VERSION_10_15 = 101500; -const int _LC_LAST = 7; +const int MAC_OS_X_VERSION_10_15_1 = 101501; -const double HUGE_VAL = double.infinity; +const int MAC_OS_X_VERSION_10_16 = 101600; -const double HUGE_VALF = double.infinity; +const int MAC_OS_VERSION_11_0 = 110000; -const double HUGE_VALL = double.infinity; +const int MAC_OS_VERSION_12_0 = 120000; -const double NAN = double.nan; +const int MAC_OS_VERSION_13_0 = 130000; -const double INFINITY = double.infinity; +const int __DRIVERKIT_19_0 = 190000; -const int FP_NAN = 1; +const int __DRIVERKIT_20_0 = 200000; -const int FP_INFINITE = 2; +const int __DRIVERKIT_21_0 = 210000; -const int FP_ZERO = 3; +const int __MAC_OS_X_VERSION_MIN_REQUIRED = 130000; -const int FP_NORMAL = 4; +const int __MAC_OS_X_VERSION_MAX_ALLOWED = 130000; -const int FP_SUBNORMAL = 5; +const int __ENABLE_LEGACY_MAC_AVAILABILITY = 1; -const int FP_SUPERNORMAL = 6; +const int __DARWIN_ONLY_64_BIT_INO_T = 1; -const int FP_FAST_FMA = 1; +const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; -const int FP_FAST_FMAF = 1; +const int __DARWIN_ONLY_VERS_1050 = 1; -const int FP_FAST_FMAL = 1; +const int __DARWIN_UNIX03 = 1; -const int FP_ILOGB0 = -2147483648; +const int __DARWIN_64_BIT_INO_T = 1; -const int FP_ILOGBNAN = -2147483648; +const int __DARWIN_VERS_1050 = 1; -const int MATH_ERRNO = 1; +const int __DARWIN_NON_CANCELABLE = 0; -const int MATH_ERREXCEPT = 2; +const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN'; -const double M_E = 2.718281828459045; +const int __DARWIN_C_ANSI = 4096; -const double M_LOG2E = 1.4426950408889634; +const int __DARWIN_C_FULL = 900000; -const double M_LOG10E = 0.4342944819032518; +const int __DARWIN_C_LEVEL = 900000; -const double M_LN2 = 0.6931471805599453; +const int __STDC_WANT_LIB_EXT1__ = 1; -const double M_LN10 = 2.302585092994046; +const int __DARWIN_NO_LONG_LONG = 0; -const double M_PI = 3.141592653589793; +const int _DARWIN_FEATURE_64_BIT_INODE = 1; -const double M_PI_2 = 1.5707963267948966; +const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1; -const double M_PI_4 = 0.7853981633974483; +const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1; -const double M_1_PI = 0.3183098861837907; +const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1; -const double M_2_PI = 0.6366197723675814; +const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3; -const double M_2_SQRTPI = 1.1283791670955126; +const int __has_ptrcheck = 0; -const double M_SQRT2 = 1.4142135623730951; +const int __DARWIN_NULL = 0; -const double M_SQRT1_2 = 0.7071067811865476; +const int __PTHREAD_SIZE__ = 8176; -const double MAXFLOAT = 3.4028234663852886e+38; +const int __PTHREAD_ATTR_SIZE__ = 56; -const int FP_SNAN = 1; +const int __PTHREAD_MUTEXATTR_SIZE__ = 8; -const int FP_QNAN = 1; +const int __PTHREAD_MUTEX_SIZE__ = 56; -const double HUGE = 3.4028234663852886e+38; +const int __PTHREAD_CONDATTR_SIZE__ = 8; -const double X_TLOSS = 14148475504056880.0; +const int __PTHREAD_COND_SIZE__ = 40; -const int DOMAIN = 1; +const int __PTHREAD_ONCE_SIZE__ = 8; -const int SING = 2; +const int __PTHREAD_RWLOCK_SIZE__ = 192; -const int OVERFLOW = 3; +const int __PTHREAD_RWLOCKATTR_SIZE__ = 16; -const int UNDERFLOW = 4; +const int __DARWIN_WCHAR_MAX = 2147483647; -const int TLOSS = 5; +const int __DARWIN_WCHAR_MIN = -2147483648; -const int PLOSS = 6; +const int __DARWIN_WEOF = -1; -const int _JBLEN = 48; +const int _FORTIFY_SOURCE = 2; const int __DARWIN_NSIG = 32; @@ -89964,6 +89604,8 @@ const int SIGUSR1 = 30; const int SIGUSR2 = 31; +const int USER_ADDR_NULL = 0; + const int __DARWIN_OPAQUE_ARM_THREAD_STATE64 = 0; const int SIGEV_NONE = 0; @@ -90108,75 +89750,111 @@ const int SV_NOCLDSTOP = 8; const int SV_SIGINFO = 64; -const int RENAME_SECLUDE = 1; +const int __WORDSIZE = 64; + +const int INT8_MAX = 127; + +const int INT16_MAX = 32767; -const int RENAME_SWAP = 2; +const int INT32_MAX = 2147483647; -const int RENAME_EXCL = 4; +const int INT64_MAX = 9223372036854775807; -const int RENAME_RESERVED1 = 8; +const int INT8_MIN = -128; -const int RENAME_NOFOLLOW_ANY = 16; +const int INT16_MIN = -32768; -const int __SLBF = 1; +const int INT32_MIN = -2147483648; -const int __SNBF = 2; +const int INT64_MIN = -9223372036854775808; -const int __SRD = 4; +const int UINT8_MAX = 255; -const int __SWR = 8; +const int UINT16_MAX = 65535; -const int __SRW = 16; +const int UINT32_MAX = 4294967295; -const int __SEOF = 32; +const int UINT64_MAX = -1; -const int __SERR = 64; +const int INT_LEAST8_MIN = -128; -const int __SMBF = 128; +const int INT_LEAST16_MIN = -32768; -const int __SAPP = 256; +const int INT_LEAST32_MIN = -2147483648; -const int __SSTR = 512; +const int INT_LEAST64_MIN = -9223372036854775808; -const int __SOPT = 1024; +const int INT_LEAST8_MAX = 127; -const int __SNPT = 2048; +const int INT_LEAST16_MAX = 32767; -const int __SOFF = 4096; +const int INT_LEAST32_MAX = 2147483647; -const int __SMOD = 8192; +const int INT_LEAST64_MAX = 9223372036854775807; -const int __SALC = 16384; +const int UINT_LEAST8_MAX = 255; -const int __SIGN = 32768; +const int UINT_LEAST16_MAX = 65535; -const int _IOFBF = 0; +const int UINT_LEAST32_MAX = 4294967295; -const int _IOLBF = 1; +const int UINT_LEAST64_MAX = -1; -const int _IONBF = 2; +const int INT_FAST8_MIN = -128; -const int BUFSIZ = 1024; +const int INT_FAST16_MIN = -32768; -const int EOF = -1; +const int INT_FAST32_MIN = -2147483648; -const int FOPEN_MAX = 20; +const int INT_FAST64_MIN = -9223372036854775808; -const int FILENAME_MAX = 1024; +const int INT_FAST8_MAX = 127; -const String P_tmpdir = '/var/tmp/'; +const int INT_FAST16_MAX = 32767; -const int L_tmpnam = 1024; +const int INT_FAST32_MAX = 2147483647; -const int TMP_MAX = 308915776; +const int INT_FAST64_MAX = 9223372036854775807; -const int SEEK_SET = 0; +const int UINT_FAST8_MAX = 255; -const int SEEK_CUR = 1; +const int UINT_FAST16_MAX = 65535; -const int SEEK_END = 2; +const int UINT_FAST32_MAX = 4294967295; -const int L_ctermid = 1024; +const int UINT_FAST64_MAX = -1; + +const int INTPTR_MAX = 9223372036854775807; + +const int INTPTR_MIN = -9223372036854775808; + +const int UINTPTR_MAX = -1; + +const int INTMAX_MAX = 9223372036854775807; + +const int UINTMAX_MAX = -1; + +const int INTMAX_MIN = -9223372036854775808; + +const int PTRDIFF_MIN = -9223372036854775808; + +const int PTRDIFF_MAX = 9223372036854775807; + +const int SIZE_MAX = -1; + +const int RSIZE_MAX = 9223372036854775807; + +const int WCHAR_MAX = 2147483647; + +const int WCHAR_MIN = -2147483648; + +const int WINT_MIN = -2147483648; + +const int WINT_MAX = 2147483647; + +const int SIG_ATOMIC_MIN = -2147483648; + +const int SIG_ATOMIC_MAX = 2147483647; const int PRIO_PROCESS = 0; @@ -90212,10 +89890,18 @@ const int RUSAGE_INFO_V4 = 4; const int RUSAGE_INFO_V5 = 5; -const int RUSAGE_INFO_CURRENT = 5; +const int RUSAGE_INFO_V6 = 6; + +const int RUSAGE_INFO_CURRENT = 6; const int RU_PROC_RUNS_RESLIDE = 1; +const int RLIM_INFINITY = 9223372036854775807; + +const int RLIM_SAVED_MAX = 9223372036854775807; + +const int RLIM_SAVED_CUR = 9223372036854775807; + const int RLIMIT_CPU = 0; const int RLIMIT_FSIZE = 1; @@ -90280,6 +89966,8 @@ const int IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE = 8; const int IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES = 9; +const int IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY = 10; + const int IOPOL_SCOPE_PROCESS = 0; const int IOPOL_SCOPE_THREAD = 1; @@ -90336,6 +90024,10 @@ const int IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF = 0; const int IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON = 1; +const int IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT = 0; + +const int IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON = 1; + const int WNOHANG = 1; const int WUNTRACED = 2; @@ -90356,13 +90048,87 @@ const int WAIT_ANY = -1; const int WAIT_MYPGRP = 0; +const int _QUAD_HIGHWORD = 1; + +const int _QUAD_LOWWORD = 0; + +const int __DARWIN_LITTLE_ENDIAN = 1234; + +const int __DARWIN_BIG_ENDIAN = 4321; + +const int __DARWIN_PDP_ENDIAN = 3412; + +const int __DARWIN_BYTE_ORDER = 1234; + +const int LITTLE_ENDIAN = 1234; + +const int BIG_ENDIAN = 4321; + +const int PDP_ENDIAN = 3412; + +const int BYTE_ORDER = 1234; + +const int NULL = 0; + const int EXIT_FAILURE = 1; const int EXIT_SUCCESS = 0; const int RAND_MAX = 2147483647; -const int TIME_UTC = 1; +const int __DARWIN_FD_SETSIZE = 1024; + +const int __DARWIN_NBBY = 8; + +const int __DARWIN_NFDBITS = 32; + +const int NBBY = 8; + +const int NFDBITS = 32; + +const int FD_SETSIZE = 1024; + +const int true1 = 1; + +const int false1 = 0; + +const int __bool_true_false_are_defined = 1; + +const int __GNUC_VA_LIST = 1; + +const int _POSIX_THREAD_KEYS_MAX = 128; + +const int API_TO_BE_DEPRECATED = 100000; + +const int API_TO_BE_DEPRECATED_MACOS = 100000; + +const int API_TO_BE_DEPRECATED_IOS = 100000; + +const int API_TO_BE_DEPRECATED_TVOS = 100000; + +const int API_TO_BE_DEPRECATED_WATCHOS = 100000; + +const int API_TO_BE_DEPRECATED_DRIVERKIT = 100000; + +const int TRUE = 1; + +const int FALSE = 0; + +const int OS_OBJECT_HAVE_OBJC_SUPPORT = 0; + +const int OS_OBJECT_USE_OBJC = 0; + +const int OS_OBJECT_SWIFT3 = 0; + +const int OS_OBJECT_USE_OBJC_RETAIN_RELEASE = 0; + +const String __ASSERT_FILE_NAME = 'temp_for_macros.hpp'; + +const int SEEK_SET = 0; + +const int SEEK_CUR = 1; + +const int SEEK_END = 2; const String __PRI_8_LENGTH_MODIFIER__ = 'hh'; @@ -90682,57 +90448,47 @@ const String SCNuMAX = 'ju'; const String SCNxMAX = 'jx'; -const int __COREFOUNDATION_CFBAG__ = 1; - -const int __COREFOUNDATION_CFBINARYHEAP__ = 1; - -const int __COREFOUNDATION_CFBITVECTOR__ = 1; - -const int __COREFOUNDATION_CFBYTEORDER__ = 1; - -const int CF_USE_OSBYTEORDER_H = 1; - -const int __COREFOUNDATION_CFCALENDAR__ = 1; +const int MACH_PORT_NULL = 0; -const int __COREFOUNDATION_CFLOCALE__ = 1; +const int MACH_PORT_DEAD = 4294967295; -const int __COREFOUNDATION_CFDICTIONARY__ = 1; +const int MACH_PORT_RIGHT_SEND = 0; -const int __COREFOUNDATION_CFNOTIFICATIONCENTER__ = 1; +const int MACH_PORT_RIGHT_RECEIVE = 1; -const int __COREFOUNDATION_CFDATE__ = 1; +const int MACH_PORT_RIGHT_SEND_ONCE = 2; -const int __COREFOUNDATION_CFTIMEZONE__ = 1; +const int MACH_PORT_RIGHT_PORT_SET = 3; -const int __COREFOUNDATION_CFDATA__ = 1; +const int MACH_PORT_RIGHT_DEAD_NAME = 4; -const int __COREFOUNDATION_CFSTRING__ = 1; +const int MACH_PORT_RIGHT_LABELH = 5; -const int __COREFOUNDATION_CFCHARACTERSET__ = 1; +const int MACH_PORT_RIGHT_NUMBER = 6; -const int kCFStringEncodingInvalidId = 4294967295; +const int MACH_PORT_TYPE_NONE = 0; -const int __kCFStringInlineBufferLength = 64; +const int MACH_PORT_TYPE_SEND = 65536; -const int __COREFOUNDATION_CFDATEFORMATTER__ = 1; +const int MACH_PORT_TYPE_RECEIVE = 131072; -const int __COREFOUNDATION_CFERROR__ = 1; +const int MACH_PORT_TYPE_SEND_ONCE = 262144; -const int __COREFOUNDATION_CFNUMBER__ = 1; +const int MACH_PORT_TYPE_PORT_SET = 524288; -const int __COREFOUNDATION_CFNUMBERFORMATTER__ = 1; +const int MACH_PORT_TYPE_DEAD_NAME = 1048576; -const int __COREFOUNDATION_CFPREFERENCES__ = 1; +const int MACH_PORT_TYPE_LABELH = 2097152; -const int __COREFOUNDATION_CFPROPERTYLIST__ = 1; +const int MACH_PORT_TYPE_SEND_RECEIVE = 196608; -const int __COREFOUNDATION_CFSTREAM__ = 1; +const int MACH_PORT_TYPE_SEND_RIGHTS = 327680; -const int __COREFOUNDATION_CFURL__ = 1; +const int MACH_PORT_TYPE_PORT_RIGHTS = 458752; -const int __COREFOUNDATION_CFRUNLOOP__ = 1; +const int MACH_PORT_TYPE_PORT_OR_DEAD = 1507328; -const int MACH_PORT_NULL = 0; +const int MACH_PORT_TYPE_ALL_RIGHTS = 2031616; const int MACH_PORT_TYPE_DNREQUEST = 2147483648; @@ -90792,10 +90548,20 @@ const int MACH_PORT_INFO_EXT = 7; const int MACH_PORT_GUARD_INFO = 8; +const int MACH_PORT_LIMITS_INFO_COUNT = 1; + +const int MACH_PORT_RECEIVE_STATUS_COUNT = 10; + const int MACH_PORT_DNREQUESTS_SIZE_COUNT = 1; +const int MACH_PORT_INFO_EXT_COUNT = 17; + +const int MACH_PORT_GUARD_INFO_COUNT = 2; + const int MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN = 255; +const int MACH_SERVICE_PORT_INFO_COUNT = 0; + const int MPO_CONTEXT_AS_GUARD = 1; const int MPO_QLIMIT = 2; @@ -90820,6 +90586,12 @@ const int MPO_SERVICE_PORT = 1024; const int MPO_CONNECTION_PORT = 2048; +const int MPO_REPLY_PORT = 4096; + +const int MPO_ENFORCE_REPLY_PORT_SEMANTICS = 8192; + +const int MPO_PROVISIONAL_REPLY_PORT = 16384; + const int GUARD_TYPE_MACH_PORT = 1; const int MAX_FATAL_kGUARD_EXC_CODE = 128; @@ -90852,8 +90624,6 @@ const int MPG_STRICT = 1; const int MPG_IMMOVABLE_RECEIVE = 2; -const int __COREFOUNDATION_CFSOCKET__ = 1; - const int _POSIX_VERSION = 200112; const int _POSIX2_VERSION = 200112; @@ -91536,6 +91306,10 @@ const int O_CLOEXEC = 16777216; const int O_NOFOLLOW_ANY = 536870912; +const int O_EXEC = 1073741824; + +const int O_SEARCH = 1074790400; + const int AT_FDCWD = -2; const int AT_EACCESS = 16; @@ -91556,6 +91330,10 @@ const int O_DP_GETRAWENCRYPTED = 1; const int O_DP_GETRAWUNENCRYPTED = 2; +const int O_DP_AUTHENTICATE = 4; + +const int AUTH_OPEN_NOAUTHFD = -1; + const int FAPPEND = 8; const int FASYNC = 64; @@ -91680,7 +91458,11 @@ const int F_ADDFILESUPPL = 104; const int F_GETSIGSINFO = 105; -const int F_FSRESERVED = 106; +const int F_SETLEASE = 106; + +const int F_GETLEASE = 107; + +const int F_TRANSFEREXTENTS = 110; const int FCNTL_FS_SPECIFIC_BASE = 65536; @@ -91754,6 +91536,8 @@ const int F_ALLOCATECONTIG = 2; const int F_ALLOCATEALL = 4; +const int F_ALLOCATEPERSIST = 8; + const int F_PEOFPOSMODE = 3; const int F_VOLPOSMODE = 4; @@ -91774,6 +91558,8 @@ const int O_POPUP = 2147483648; const int O_ALERT = 536870912; +const int FILESEC_GUID = 3; + const int DISPATCH_API_VERSION = 20181008; const int __OS_WORKGROUP_ATTR_SIZE__ = 60; @@ -91958,6 +91744,8 @@ const int KERN_NOT_FOUND = 56; const int KERN_RETURN_MAX = 256; +const int MACH_MSG_TIMEOUT_NONE = 0; + const int MACH_MSGH_BITS_ZERO = 0; const int MACH_MSGH_BITS_REMOTE_MASK = 31; @@ -91984,6 +91772,8 @@ const int MACH_MSGH_BITS_CIRCULAR = 268435456; const int MACH_MSGH_BITS_USED = 2954829599; +const int MACH_MSG_PRIORITY_UNSPECIFIED = 0; + const int MACH_MSG_TYPE_MOVE_RECEIVE = 16; const int MACH_MSG_TYPE_MOVE_SEND = 17; @@ -92030,8 +91820,22 @@ const int MACH_MSG_OOL_VOLATILE_DESCRIPTOR = 3; const int MACH_MSG_GUARDED_PORT_DESCRIPTOR = 4; +const int MACH_MSG_DESCRIPTOR_MAX = 4; + const int MACH_MSG_TRAILER_FORMAT_0 = 0; +const int MACH_MSG_FILTER_POLICY_ALLOW = 0; + +const int MACH_MSG_TRAILER_MINIMUM_SIZE = 8; + +const int MAX_TRAILER_SIZE = 68; + +const int MACH_MSG_TRAILER_FORMAT_0_SIZE = 20; + +const int MACH_MSG_SIZE_MAX = 4294967295; + +const int MACH_MSG_SIZE_RELIABLE = 262144; + const int MACH_MSGH_KIND_NORMAL = 0; const int MACH_MSGH_KIND_NOTIFICATION = 1; @@ -92048,6 +91852,8 @@ const int MACH_MSG_TYPE_PORT_SEND_ONCE = 18; const int MACH_MSG_TYPE_LAST = 22; +const int MACH_MSG_TYPE_POLYMORPHIC = 4294967295; + const int MACH_MSG_OPTION_NONE = 0; const int MACH_SEND_MSG = 1; @@ -92168,12 +91974,18 @@ const int MACH_SEND_INVALID_TRAILER = 268435473; const int MACH_SEND_INVALID_CONTEXT = 268435474; +const int MACH_SEND_INVALID_OPTIONS = 268435475; + const int MACH_SEND_INVALID_RT_OOL_SIZE = 268435477; const int MACH_SEND_NO_GRANT_DEST = 268435478; const int MACH_SEND_MSG_FILTERED = 268435479; +const int MACH_SEND_AUX_TOO_SMALL = 268435480; + +const int MACH_SEND_AUX_TOO_LARGE = 268435481; + const int MACH_RCV_IN_PROGRESS = 268451841; const int MACH_RCV_INVALID_NAME = 268451842; @@ -92208,6 +92020,8 @@ const int MACH_RCV_IN_PROGRESS_TIMED = 268451857; const int MACH_RCV_INVALID_REPLY = 268451858; +const int MACH_RCV_INVALID_ARGUMENTS = 268451859; + const int DISPATCH_MACH_SEND_DEAD = 1; const int DISPATCH_MEMORYPRESSURE_NORMAL = 1; @@ -92254,666 +92068,14 @@ const int DISPATCH_IO_STOP = 1; const int DISPATCH_IO_STRICT_INTERVAL = 1; -const int __COREFOUNDATION_CFSET__ = 1; - -const int __COREFOUNDATION_CFSTRINGENCODINGEXT__ = 1; - -const int __COREFOUNDATION_CFTREE__ = 1; - -const int __COREFOUNDATION_CFURLACCESS__ = 1; - -const int __COREFOUNDATION_CFUUID__ = 1; - -const int __COREFOUNDATION_CFUTILITIES__ = 1; - -const int __COREFOUNDATION_CFBUNDLE__ = 1; - -const int CPU_STATE_MAX = 4; - -const int CPU_STATE_USER = 0; - -const int CPU_STATE_SYSTEM = 1; - -const int CPU_STATE_IDLE = 2; - -const int CPU_STATE_NICE = 3; - -const int CPU_ARCH_MASK = 4278190080; - -const int CPU_ARCH_ABI64 = 16777216; - -const int CPU_ARCH_ABI64_32 = 33554432; - -const int CPU_SUBTYPE_MASK = 4278190080; - -const int CPU_SUBTYPE_LIB64 = 2147483648; - -const int CPU_SUBTYPE_PTRAUTH_ABI = 2147483648; - -const int CPU_SUBTYPE_INTEL_FAMILY_MAX = 15; - -const int CPU_SUBTYPE_INTEL_MODEL_ALL = 0; - -const int CPU_SUBTYPE_ARM64_PTR_AUTH_MASK = 251658240; - -const int CPUFAMILY_UNKNOWN = 0; - -const int CPUFAMILY_POWERPC_G3 = 3471054153; - -const int CPUFAMILY_POWERPC_G4 = 2009171118; - -const int CPUFAMILY_POWERPC_G5 = 3983988906; - -const int CPUFAMILY_INTEL_6_13 = 2855483691; - -const int CPUFAMILY_INTEL_PENRYN = 2028621756; - -const int CPUFAMILY_INTEL_NEHALEM = 1801080018; - -const int CPUFAMILY_INTEL_WESTMERE = 1463508716; - -const int CPUFAMILY_INTEL_SANDYBRIDGE = 1418770316; - -const int CPUFAMILY_INTEL_IVYBRIDGE = 526772277; - -const int CPUFAMILY_INTEL_HASWELL = 280134364; - -const int CPUFAMILY_INTEL_BROADWELL = 1479463068; - -const int CPUFAMILY_INTEL_SKYLAKE = 939270559; - -const int CPUFAMILY_INTEL_KABYLAKE = 260141638; - -const int CPUFAMILY_INTEL_ICELAKE = 943936839; - -const int CPUFAMILY_INTEL_COMETLAKE = 486055998; - -const int CPUFAMILY_ARM_9 = 3878847406; - -const int CPUFAMILY_ARM_11 = 2415272152; - -const int CPUFAMILY_ARM_XSCALE = 1404044789; - -const int CPUFAMILY_ARM_12 = 3172666089; - -const int CPUFAMILY_ARM_13 = 214503012; - -const int CPUFAMILY_ARM_14 = 2517073649; - -const int CPUFAMILY_ARM_15 = 2823887818; - -const int CPUFAMILY_ARM_SWIFT = 506291073; - -const int CPUFAMILY_ARM_CYCLONE = 933271106; - -const int CPUFAMILY_ARM_TYPHOON = 747742334; - -const int CPUFAMILY_ARM_TWISTER = 2465937352; - -const int CPUFAMILY_ARM_HURRICANE = 1741614739; - -const int CPUFAMILY_ARM_MONSOON_MISTRAL = 3894312694; - -const int CPUFAMILY_ARM_VORTEX_TEMPEST = 131287967; - -const int CPUFAMILY_ARM_LIGHTNING_THUNDER = 1176831186; - -const int CPUFAMILY_ARM_FIRESTORM_ICESTORM = 458787763; - -const int CPUFAMILY_ARM_BLIZZARD_AVALANCHE = 3660830781; - -const int CPUSUBFAMILY_UNKNOWN = 0; - -const int CPUSUBFAMILY_ARM_HP = 1; - -const int CPUSUBFAMILY_ARM_HG = 2; - -const int CPUSUBFAMILY_ARM_M = 3; - -const int CPUSUBFAMILY_ARM_HS = 4; - -const int CPUSUBFAMILY_ARM_HC_HD = 5; - -const int CPUFAMILY_INTEL_6_23 = 2028621756; - -const int CPUFAMILY_INTEL_6_26 = 1801080018; - -const int __COREFOUNDATION_CFMESSAGEPORT__ = 1; - -const int __COREFOUNDATION_CFPLUGIN__ = 1; - -const int COREFOUNDATION_CFPLUGINCOM_SEPARATE = 1; - -const int __COREFOUNDATION_CFMACHPORT__ = 1; - -const int __COREFOUNDATION_CFATTRIBUTEDSTRING__ = 1; - -const int __COREFOUNDATION_CFURLENUMERATOR__ = 1; - -const int __COREFOUNDATION_CFFILESECURITY__ = 1; - -const int KAUTH_GUID_SIZE = 16; - -const int KAUTH_NTSID_MAX_AUTHORITIES = 16; - -const int KAUTH_NTSID_HDRSIZE = 8; - -const int KAUTH_EXTLOOKUP_SUCCESS = 0; - -const int KAUTH_EXTLOOKUP_BADRQ = 1; - -const int KAUTH_EXTLOOKUP_FAILURE = 2; - -const int KAUTH_EXTLOOKUP_FATAL = 3; - -const int KAUTH_EXTLOOKUP_INPROG = 100; - -const int KAUTH_EXTLOOKUP_VALID_UID = 1; - -const int KAUTH_EXTLOOKUP_VALID_UGUID = 2; - -const int KAUTH_EXTLOOKUP_VALID_USID = 4; - -const int KAUTH_EXTLOOKUP_VALID_GID = 8; - -const int KAUTH_EXTLOOKUP_VALID_GGUID = 16; - -const int KAUTH_EXTLOOKUP_VALID_GSID = 32; - -const int KAUTH_EXTLOOKUP_WANT_UID = 64; - -const int KAUTH_EXTLOOKUP_WANT_UGUID = 128; - -const int KAUTH_EXTLOOKUP_WANT_USID = 256; - -const int KAUTH_EXTLOOKUP_WANT_GID = 512; - -const int KAUTH_EXTLOOKUP_WANT_GGUID = 1024; - -const int KAUTH_EXTLOOKUP_WANT_GSID = 2048; - -const int KAUTH_EXTLOOKUP_WANT_MEMBERSHIP = 4096; - -const int KAUTH_EXTLOOKUP_VALID_MEMBERSHIP = 8192; - -const int KAUTH_EXTLOOKUP_ISMEMBER = 16384; - -const int KAUTH_EXTLOOKUP_VALID_PWNAM = 32768; - -const int KAUTH_EXTLOOKUP_WANT_PWNAM = 65536; - -const int KAUTH_EXTLOOKUP_VALID_GRNAM = 131072; - -const int KAUTH_EXTLOOKUP_WANT_GRNAM = 262144; - -const int KAUTH_EXTLOOKUP_VALID_SUPGRPS = 524288; - -const int KAUTH_EXTLOOKUP_WANT_SUPGRPS = 1048576; - -const int KAUTH_EXTLOOKUP_REGISTER = 0; - -const int KAUTH_EXTLOOKUP_RESULT = 1; - -const int KAUTH_EXTLOOKUP_WORKER = 2; - -const int KAUTH_EXTLOOKUP_DEREGISTER = 4; - -const int KAUTH_GET_CACHE_SIZES = 8; - -const int KAUTH_SET_CACHE_SIZES = 16; - -const int KAUTH_CLEAR_CACHES = 32; - -const String IDENTITYSVC_ENTITLEMENT = 'com.apple.private.identitysvc'; - -const int KAUTH_ACE_KINDMASK = 15; - -const int KAUTH_ACE_PERMIT = 1; - -const int KAUTH_ACE_DENY = 2; - -const int KAUTH_ACE_AUDIT = 3; - -const int KAUTH_ACE_ALARM = 4; - -const int KAUTH_ACE_INHERITED = 16; - -const int KAUTH_ACE_FILE_INHERIT = 32; - -const int KAUTH_ACE_DIRECTORY_INHERIT = 64; - -const int KAUTH_ACE_LIMIT_INHERIT = 128; - -const int KAUTH_ACE_ONLY_INHERIT = 256; - -const int KAUTH_ACE_SUCCESS = 512; - -const int KAUTH_ACE_FAILURE = 1024; - -const int KAUTH_ACE_INHERIT_CONTROL_FLAGS = 480; - -const int KAUTH_ACE_GENERIC_ALL = 2097152; - -const int KAUTH_ACE_GENERIC_EXECUTE = 4194304; - -const int KAUTH_ACE_GENERIC_WRITE = 8388608; - -const int KAUTH_ACE_GENERIC_READ = 16777216; - -const int KAUTH_ACL_MAX_ENTRIES = 128; - -const int KAUTH_ACL_FLAGS_PRIVATE = 65535; - -const int KAUTH_ACL_DEFER_INHERIT = 65536; - -const int KAUTH_ACL_NO_INHERIT = 131072; - -const int KAUTH_FILESEC_MAGIC = 19710317; - -const int KAUTH_FILESEC_FLAGS_PRIVATE = 65535; - -const int KAUTH_FILESEC_DEFER_INHERIT = 65536; - -const int KAUTH_FILESEC_NO_INHERIT = 131072; - -const String KAUTH_FILESEC_XATTR = 'com.apple.system.Security'; - -const int KAUTH_ENDIAN_HOST = 1; - -const int KAUTH_ENDIAN_DISK = 2; - -const int KAUTH_VNODE_READ_DATA = 2; - -const int KAUTH_VNODE_LIST_DIRECTORY = 2; - -const int KAUTH_VNODE_WRITE_DATA = 4; - -const int KAUTH_VNODE_ADD_FILE = 4; - -const int KAUTH_VNODE_EXECUTE = 8; - -const int KAUTH_VNODE_SEARCH = 8; - -const int KAUTH_VNODE_DELETE = 16; - -const int KAUTH_VNODE_APPEND_DATA = 32; - -const int KAUTH_VNODE_ADD_SUBDIRECTORY = 32; - -const int KAUTH_VNODE_DELETE_CHILD = 64; - -const int KAUTH_VNODE_READ_ATTRIBUTES = 128; - -const int KAUTH_VNODE_WRITE_ATTRIBUTES = 256; - -const int KAUTH_VNODE_READ_EXTATTRIBUTES = 512; - -const int KAUTH_VNODE_WRITE_EXTATTRIBUTES = 1024; - -const int KAUTH_VNODE_READ_SECURITY = 2048; - -const int KAUTH_VNODE_WRITE_SECURITY = 4096; - -const int KAUTH_VNODE_TAKE_OWNERSHIP = 8192; - -const int KAUTH_VNODE_CHANGE_OWNER = 8192; - -const int KAUTH_VNODE_SYNCHRONIZE = 1048576; - -const int KAUTH_VNODE_LINKTARGET = 33554432; - -const int KAUTH_VNODE_CHECKIMMUTABLE = 67108864; - -const int KAUTH_VNODE_ACCESS = 2147483648; - -const int KAUTH_VNODE_NOIMMUTABLE = 1073741824; - -const int KAUTH_VNODE_SEARCHBYANYONE = 536870912; - -const int KAUTH_VNODE_GENERIC_READ_BITS = 2690; - -const int KAUTH_VNODE_GENERIC_WRITE_BITS = 5492; - -const int KAUTH_VNODE_GENERIC_EXECUTE_BITS = 8; - -const int KAUTH_VNODE_GENERIC_ALL_BITS = 8190; - -const int KAUTH_VNODE_WRITE_RIGHTS = 100676980; - -const int __DARWIN_ACL_READ_DATA = 2; - -const int __DARWIN_ACL_LIST_DIRECTORY = 2; - -const int __DARWIN_ACL_WRITE_DATA = 4; - -const int __DARWIN_ACL_ADD_FILE = 4; - -const int __DARWIN_ACL_EXECUTE = 8; - -const int __DARWIN_ACL_SEARCH = 8; - -const int __DARWIN_ACL_DELETE = 16; - -const int __DARWIN_ACL_APPEND_DATA = 32; - -const int __DARWIN_ACL_ADD_SUBDIRECTORY = 32; - -const int __DARWIN_ACL_DELETE_CHILD = 64; - -const int __DARWIN_ACL_READ_ATTRIBUTES = 128; - -const int __DARWIN_ACL_WRITE_ATTRIBUTES = 256; - -const int __DARWIN_ACL_READ_EXTATTRIBUTES = 512; - -const int __DARWIN_ACL_WRITE_EXTATTRIBUTES = 1024; - -const int __DARWIN_ACL_READ_SECURITY = 2048; - -const int __DARWIN_ACL_WRITE_SECURITY = 4096; - -const int __DARWIN_ACL_CHANGE_OWNER = 8192; - -const int __DARWIN_ACL_SYNCHRONIZE = 1048576; - -const int __DARWIN_ACL_EXTENDED_ALLOW = 1; - -const int __DARWIN_ACL_EXTENDED_DENY = 2; - -const int __DARWIN_ACL_ENTRY_INHERITED = 16; - -const int __DARWIN_ACL_ENTRY_FILE_INHERIT = 32; - -const int __DARWIN_ACL_ENTRY_DIRECTORY_INHERIT = 64; - -const int __DARWIN_ACL_ENTRY_LIMIT_INHERIT = 128; - -const int __DARWIN_ACL_ENTRY_ONLY_INHERIT = 256; - -const int __DARWIN_ACL_FLAG_NO_INHERIT = 131072; - -const int ACL_MAX_ENTRIES = 128; - -const int ACL_UNDEFINED_ID = 0; - -const int __COREFOUNDATION_CFSTRINGTOKENIZER__ = 1; - -const int __COREFOUNDATION_CFFILEDESCRIPTOR__ = 1; - -const int __COREFOUNDATION_CFUSERNOTIFICATION__ = 1; - -const int __COREFOUNDATION_CFXMLNODE__ = 1; - -const int __COREFOUNDATION_CFXMLPARSER__ = 1; - -const int _CSSMTYPE_H_ = 1; - -const int _CSSMCONFIG_H_ = 1; - -const int SEC_ASN1_TAG_MASK = 255; - -const int SEC_ASN1_TAGNUM_MASK = 31; - -const int SEC_ASN1_BOOLEAN = 1; - -const int SEC_ASN1_INTEGER = 2; - -const int SEC_ASN1_BIT_STRING = 3; - -const int SEC_ASN1_OCTET_STRING = 4; - -const int SEC_ASN1_NULL = 5; - -const int SEC_ASN1_OBJECT_ID = 6; - -const int SEC_ASN1_OBJECT_DESCRIPTOR = 7; - -const int SEC_ASN1_REAL = 9; - -const int SEC_ASN1_ENUMERATED = 10; - -const int SEC_ASN1_EMBEDDED_PDV = 11; - -const int SEC_ASN1_UTF8_STRING = 12; - -const int SEC_ASN1_SEQUENCE = 16; - -const int SEC_ASN1_SET = 17; - -const int SEC_ASN1_NUMERIC_STRING = 18; - -const int SEC_ASN1_PRINTABLE_STRING = 19; - -const int SEC_ASN1_T61_STRING = 20; - -const int SEC_ASN1_VIDEOTEX_STRING = 21; - -const int SEC_ASN1_IA5_STRING = 22; - -const int SEC_ASN1_UTC_TIME = 23; - -const int SEC_ASN1_GENERALIZED_TIME = 24; - -const int SEC_ASN1_GRAPHIC_STRING = 25; - -const int SEC_ASN1_VISIBLE_STRING = 26; - -const int SEC_ASN1_GENERAL_STRING = 27; - -const int SEC_ASN1_UNIVERSAL_STRING = 28; - -const int SEC_ASN1_BMP_STRING = 30; - -const int SEC_ASN1_HIGH_TAG_NUMBER = 31; - -const int SEC_ASN1_TELETEX_STRING = 20; - -const int SEC_ASN1_METHOD_MASK = 32; - -const int SEC_ASN1_PRIMITIVE = 0; - -const int SEC_ASN1_CONSTRUCTED = 32; - -const int SEC_ASN1_CLASS_MASK = 192; - -const int SEC_ASN1_UNIVERSAL = 0; - -const int SEC_ASN1_APPLICATION = 64; - -const int SEC_ASN1_CONTEXT_SPECIFIC = 128; - -const int SEC_ASN1_PRIVATE = 192; - -const int SEC_ASN1_OPTIONAL = 256; - -const int SEC_ASN1_EXPLICIT = 512; - -const int SEC_ASN1_ANY = 1024; - -const int SEC_ASN1_INLINE = 2048; - -const int SEC_ASN1_POINTER = 4096; - -const int SEC_ASN1_GROUP = 8192; - -const int SEC_ASN1_DYNAMIC = 16384; - -const int SEC_ASN1_SKIP = 32768; - -const int SEC_ASN1_INNER = 65536; - -const int SEC_ASN1_SAVE = 131072; - -const int SEC_ASN1_SKIP_REST = 524288; - -const int SEC_ASN1_CHOICE = 1048576; - -const int SEC_ASN1_SIGNED_INT = 8388608; - -const int SEC_ASN1_SEQUENCE_OF = 8208; - -const int SEC_ASN1_SET_OF = 8209; - -const int SEC_ASN1_ANY_CONTENTS = 66560; - -const int _CSSMAPPLE_H_ = 1; - -const int _CSSMERR_H_ = 1; - -const int _X509DEFS_H_ = 1; - -const int BER_TAG_UNKNOWN = 0; - -const int BER_TAG_BOOLEAN = 1; - -const int BER_TAG_INTEGER = 2; - -const int BER_TAG_BIT_STRING = 3; - -const int BER_TAG_OCTET_STRING = 4; - -const int BER_TAG_NULL = 5; - -const int BER_TAG_OID = 6; - -const int BER_TAG_OBJECT_DESCRIPTOR = 7; - -const int BER_TAG_EXTERNAL = 8; - -const int BER_TAG_REAL = 9; - -const int BER_TAG_ENUMERATED = 10; - -const int BER_TAG_PKIX_UTF8_STRING = 12; - -const int BER_TAG_SEQUENCE = 16; - -const int BER_TAG_SET = 17; - -const int BER_TAG_NUMERIC_STRING = 18; - -const int BER_TAG_PRINTABLE_STRING = 19; - -const int BER_TAG_T61_STRING = 20; - -const int BER_TAG_TELETEX_STRING = 20; - -const int BER_TAG_VIDEOTEX_STRING = 21; - -const int BER_TAG_IA5_STRING = 22; - -const int BER_TAG_UTC_TIME = 23; - -const int BER_TAG_GENERALIZED_TIME = 24; - -const int BER_TAG_GRAPHIC_STRING = 25; - -const int BER_TAG_ISO646_STRING = 26; - -const int BER_TAG_GENERAL_STRING = 27; - -const int BER_TAG_VISIBLE_STRING = 26; - -const int BER_TAG_PKIX_UNIVERSAL_STRING = 28; - -const int BER_TAG_PKIX_BMP_STRING = 30; - -const int CE_KU_DigitalSignature = 32768; - -const int CE_KU_NonRepudiation = 16384; - -const int CE_KU_KeyEncipherment = 8192; - -const int CE_KU_DataEncipherment = 4096; - -const int CE_KU_KeyAgreement = 2048; - -const int CE_KU_KeyCertSign = 1024; - -const int CE_KU_CRLSign = 512; - -const int CE_KU_EncipherOnly = 256; - -const int CE_KU_DecipherOnly = 128; - -const int CE_CR_Unspecified = 0; - -const int CE_CR_KeyCompromise = 1; - -const int CE_CR_CACompromise = 2; - -const int CE_CR_AffiliationChanged = 3; - -const int CE_CR_Superseded = 4; - -const int CE_CR_CessationOfOperation = 5; - -const int CE_CR_CertificateHold = 6; - -const int CE_CR_RemoveFromCRL = 8; - -const int CE_CD_Unspecified = 128; - -const int CE_CD_KeyCompromise = 64; - -const int CE_CD_CACompromise = 32; - -const int CE_CD_AffiliationChanged = 16; - -const int CE_CD_Superseded = 8; - -const int CE_CD_CessationOfOperation = 4; - -const int CE_CD_CertificateHold = 2; - -const int CSSM_APPLE_TP_SSL_OPTS_VERSION = 1; - -const int CSSM_APPLE_TP_SSL_CLIENT = 1; - -const int CSSM_APPLE_TP_CRL_OPTS_VERSION = 0; - -const int CSSM_APPLE_TP_SMIME_OPTS_VERSION = 0; - -const int CSSM_APPLE_TP_ACTION_VERSION = 0; - -const int CSSM_TP_APPLE_EVIDENCE_VERSION = 0; - -const int CSSM_EVIDENCE_FORM_APPLE_CUSTOM = 2147483648; - -const String CSSM_APPLE_CRL_END_OF_TIME = '99991231235959'; - -const String kKeychainSuffix = '.keychain'; - -const String kKeychainDbSuffix = '.keychain-db'; - -const String kSystemKeychainName = 'System.keychain'; - -const String kSystemKeychainDir = '/Library/Keychains/'; - -const String kSystemUnlockFile = '/var/db/SystemKey'; - -const String kSystemKeychainPath = '/Library/Keychains/System.keychain'; - -const String CSSM_APPLE_ACL_TAG_PARTITION_ID = '___PARTITION___'; - -const String CSSM_APPLE_ACL_TAG_INTEGRITY = '___INTEGRITY___'; - -const int errSecErrnoBase = 100000; - -const int errSecErrnoLimit = 100255; - -const int SEC_PROTOCOL_CERT_COMPRESSION_DEFAULT = 1; - -const int NSMaximumStringLength = 2147483646; - -const int NS_UNICHAR_IS_EIGHT_BIT = 0; - const int NSURLResponseUnknownLength = -1; const int DART_FLAGS_CURRENT_VERSION = 12; const int DART_INITIALIZE_PARAMS_CURRENT_VERSION = 4; +const int ILLEGAL_PORT = 0; + const String DART_KERNEL_ISOLATE_NAME = 'kernel-service'; const String DART_VM_SERVICE_ISOLATE_NAME = 'vm-service'; diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m new file mode 100644 index 0000000000..b05d1fc717 --- /dev/null +++ b/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m @@ -0,0 +1 @@ +#include "../../src/CUPHTTPCompletionHelper.m" diff --git a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m index a1eff15f9a..e04d3f3a8c 100644 --- a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m +++ b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m @@ -7,15 +7,9 @@ #import #include +#import "CUPHTTPCompletionHelper.h" #import "CUPHTTPForwardedDelegate.h" -static Dart_CObject NSObjectToCObject(NSObject* n) { - Dart_CObject cobj; - cobj.type = Dart_CObject_kInt64; - cobj.value.as_int64 = (int64_t) n; - return cobj; -} - static Dart_CObject MessageTypeToCObject(MessageType messageType) { Dart_CObject cobj; cobj.type = Dart_CObject_kInt64; diff --git a/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h b/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h new file mode 100644 index 0000000000..501b80b1fc --- /dev/null +++ b/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h @@ -0,0 +1,31 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Normally, we'd "import " +// but that would mean that ffigen would process every file in the Foundation +// framework, which is huge. So just import the headers that we need. +#import +#import + +#include "dart-sdk/include/dart_api_dl.h" + +/** + * Creates a `Dart_CObject` containing the given `NSObject` pointer as an int. + */ +Dart_CObject NSObjectToCObject(NSObject* n); + +/** + * Executes [NSURLSessionWebSocketTask sendMessage:completionHandler:] and + * sends the results of the completion handler to the given `Dart_Port`. + */ +extern void CUPHTTPSendMessage(NSURLSessionWebSocketTask *task, + NSURLSessionWebSocketMessage *message, + Dart_Port sendPort); + +/** + * Executes [NSURLSessionWebSocketTask receiveMessageWithCompletionHandler:] + * and sends the results of the completion handler to the given `Dart_Port`. + */ +extern void CUPHTTPReceiveMessage(NSURLSessionWebSocketTask *task, + Dart_Port sendPort); diff --git a/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m new file mode 100644 index 0000000000..9f8137d395 --- /dev/null +++ b/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m @@ -0,0 +1,45 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#import "CUPHTTPCompletionHelper.h" + +#import +#include + +Dart_CObject NSObjectToCObject(NSObject* n) { + Dart_CObject cobj; + cobj.type = Dart_CObject_kInt64; + cobj.value.as_int64 = (int64_t) n; + return cobj; +} + +void CUPHTTPSendMessage(NSURLSessionWebSocketTask *task, NSURLSessionWebSocketMessage *message, Dart_Port sendPort) { + [task sendMessage: message + completionHandler: ^(NSError *error) { + [error retain]; + Dart_CObject message_cobj = NSObjectToCObject(error); + const bool success = Dart_PostCObject_DL(sendPort, &message_cobj); + NSCAssert(success, @"Dart_PostCObject_DL failed."); + }]; +} + +void CUPHTTPReceiveMessage(NSURLSessionWebSocketTask *task, Dart_Port sendPort) { + [task + receiveMessageWithCompletionHandler: ^(NSURLSessionWebSocketMessage *message, NSError *error) { + [message retain]; + [error retain]; + + Dart_CObject cmessage = NSObjectToCObject(message); + Dart_CObject cerror = NSObjectToCObject(error); + Dart_CObject* message_carray[] = { &cmessage, &cerror }; + + Dart_CObject message_cobj; + message_cobj.type = Dart_CObject_kArray; + message_cobj.value.as_array.length = 2; + message_cobj.value.as_array.values = message_carray; + + const bool success = Dart_PostCObject_DL(sendPort, &message_cobj); + NSCAssert(success, @"Dart_PostCObject_DL failed."); + }]; +} From 14914ec4af6f532b3abced53b8bbfe6a4925aed0 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 16 May 2023 15:07:39 -0700 Subject: [PATCH 220/448] Revert "Support the NSURLSession WebSocket API (#921)" (#931) This reverts commit 981b63b57ec717c1172dacc5b1a5d38096783d8f. --- .../url_session_task_test.dart | 135 - pkgs/cupertino_http/ffigen.yaml | 25 +- .../ios/Classes/CUPHTTPCompletionHelper.m | 1 - .../cupertino_http/lib/src/cupertino_api.dart | 191 +- .../lib/src/native_cupertino_bindings.dart | 59602 ++++++++-------- .../macos/Classes/CUPHTTPCompletionHelper.m | 1 - .../src/CUPHTTPClientDelegate.m | 8 +- .../src/CUPHTTPCompletionHelper.h | 31 - .../src/CUPHTTPCompletionHelper.m | 45 - 9 files changed, 30245 insertions(+), 29794 deletions(-) delete mode 100644 pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m delete mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m delete mode 100644 pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h delete mode 100644 pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m diff --git a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart index 35e411b84a..0c5c56b2ec 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart @@ -9,139 +9,6 @@ import 'package:flutter/foundation.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; -void testWebSocketTask() { - group('websocket', () { - late HttpServer server; - int? lastCloseCode; - String? lastCloseReason; - - setUp(() async { - lastCloseCode = null; - lastCloseReason = null; - server = await HttpServer.bind('localhost', 0) - ..listen((request) { - if (request.uri.path.endsWith('error')) { - request.response.statusCode = 500; - request.response.close(); - } else { - WebSocketTransformer.upgrade(request) - .then((websocket) => websocket.listen((event) { - final code = request.uri.queryParameters['code']; - final reason = request.uri.queryParameters['reason']; - - websocket.add(event); - if (!request.uri.queryParameters.containsKey('noclose')) { - websocket.close( - code == null ? null : int.parse(code), reason); - } - }, onDone: () { - lastCloseCode = websocket.closeCode; - lastCloseReason = websocket.closeReason; - })); - } - }); - }); - - tearDown(() async { - await server.close(); - }); - - test('client code and reason', () async { - final session = URLSession.sharedSession(); - final task = session.webSocketTaskWithRequest(URLRequest.fromUrl( - Uri.parse('ws://localhost:${server.port}/?noclose'))) - ..resume(); - await task - .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); - await task.receiveMessage(); - task.cancelWithCloseCode( - 4998, Data.fromUint8List(Uint8List.fromList('Bye'.codeUnits))); - - // Allow the server to run and save the close code. - while (lastCloseCode == null) { - await Future.delayed(const Duration(milliseconds: 10)); - } - expect(lastCloseCode, 4998); - expect(lastCloseReason, 'Bye'); - }); - - test('server code and reason', () async { - final session = URLSession.sharedSession(); - final task = session.webSocketTaskWithRequest(URLRequest.fromUrl( - Uri.parse('ws://localhost:${server.port}/?code=4999&reason=fun'))) - ..resume(); - await task - .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); - await task.receiveMessage(); - await expectLater(task.receiveMessage(), - throwsA(isA().having((e) => e.code, 'code', 57 // NOT_CONNECTED - ))); - - expect(task.closeCode, 4999); - expect(task.closeReason!.bytes, 'fun'.codeUnits); - task.cancel(); - }); - - test('data message', () async { - final session = URLSession.sharedSession(); - final task = session.webSocketTaskWithRequest( - URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}'))) - ..resume(); - await task.sendMessage(URLSessionWebSocketMessage.fromData( - Data.fromUint8List(Uint8List.fromList([1, 2, 3])))); - final receivedMessage = await task.receiveMessage(); - expect(receivedMessage.type, - URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeData); - expect(receivedMessage.data!.bytes, [1, 2, 3]); - expect(receivedMessage.string, null); - task.cancel(); - }); - - test('text message', () async { - final session = URLSession.sharedSession(); - final task = session.webSocketTaskWithRequest( - URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}'))) - ..resume(); - await task - .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); - final receivedMessage = await task.receiveMessage(); - expect(receivedMessage.type, - URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeString); - expect(receivedMessage.data, null); - expect(receivedMessage.string, 'Hello World!'); - task.cancel(); - }); - - test('send failure', () async { - final session = URLSession.sharedSession(); - final task = session.webSocketTaskWithRequest( - URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}/error'))) - ..resume(); - await expectLater( - task.sendMessage( - URLSessionWebSocketMessage.fromString('Hello World!')), - throwsA(isA().having( - (e) => e.code, 'code', -1011 // NSURLErrorBadServerResponse - ))); - task.cancel(); - }); - - test('receive failure', () async { - final session = URLSession.sharedSession(); - final task = session.webSocketTaskWithRequest( - URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}'))) - ..resume(); - await task - .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); - await task.receiveMessage(); - await expectLater(task.receiveMessage(), - throwsA(isA().having((e) => e.code, 'code', 57 // NOT_CONNECTED - ))); - task.cancel(); - }); - }); -} - void testURLSessionTask( URLSessionTask Function(URLSession session, Uri url) f) { group('task states', () { @@ -364,6 +231,4 @@ void main() { testURLSessionTask((session, uri) => session.downloadTaskWithRequest(URLRequest.fromUrl(uri))); }); - - testWebSocketTask(); } diff --git a/pkgs/cupertino_http/ffigen.yaml b/pkgs/cupertino_http/ffigen.yaml index 2ac2ce517f..b4cd26c595 100644 --- a/pkgs/cupertino_http/ffigen.yaml +++ b/pkgs/cupertino_http/ffigen.yaml @@ -8,21 +8,20 @@ language: 'objc' output: 'lib/src/native_cupertino_bindings.dart' headers: entry-points: - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSData.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLRequest.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSProgress.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLResponse.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSHTTPCookieStorage.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSOperation.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSError.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSData.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLRequest.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSProgress.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLResponse.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSHTTPCookieStorage.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSOperation.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSError.h' + - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' - 'src/CUPHTTPClientDelegate.h' - 'src/CUPHTTPForwardedDelegate.h' - - 'src/CUPHTTPCompletionHelper.h' preamble: | // ignore_for_file: always_specify_types // ignore_for_file: camel_case_types diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m deleted file mode 100644 index b05d1fc717..0000000000 --- a/pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPCompletionHelper.m" diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 11d68b68d7..4092f4d4de 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -26,7 +26,6 @@ /// ``` library; -import 'dart:async'; import 'dart:ffi'; import 'dart:isolate'; import 'dart:math'; @@ -112,18 +111,10 @@ enum URLRequestNetworkService { networkServiceTypeCallSignaling } -/// The type of a WebSocket message i.e. text or data. -/// -/// See [NSURLSessionWebSocketMessageType](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessagetype) -enum URLSessionWebSocketMessageType { - urlSessionWebSocketMessageTypeData, - urlSessionWebSocketMessageTypeString, -} - /// Information about a failure. /// /// See [NSError](https://developer.apple.com/documentation/foundation/nserror) -class Error extends _ObjectHolder implements Exception { +class Error extends _ObjectHolder { Error._(super.c); /// The numeric code for the error e.g. -1003 (kCFURLErrorCannotFindHost). @@ -501,54 +492,6 @@ enum URLSessionTaskState { urlSessionTaskStateCompleted, } -/// A WebSocket message. -/// -/// See [NSURLSessionWebSocketMessage](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage) -class URLSessionWebSocketMessage - extends _ObjectHolder { - URLSessionWebSocketMessage._(super.nsObject); - - /// Create a WebSocket data message. - /// - /// See [NSURLSessionWebSocketMessage initWithData:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181192-initwithdata) - factory URLSessionWebSocketMessage.fromData(Data d) => - URLSessionWebSocketMessage._( - ncb.NSURLSessionWebSocketMessage.alloc(linkedLibs) - .initWithData_(d._nsObject)); - - /// Create a WebSocket string message. - /// - /// See [NSURLSessionWebSocketMessage initWitString:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181193-initwithstring) - factory URLSessionWebSocketMessage.fromString(String s) => - URLSessionWebSocketMessage._( - ncb.NSURLSessionWebSocketMessage.alloc(linkedLibs) - .initWithString_(s.toNSString(linkedLibs))); - - /// The data associated with the WebSocket message. - /// - /// Will be `null` if the [URLSessionWebSocketMessage] is a string message. - /// - /// See [NSURLSessionWebSocketMessage.data](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181191-data) - Data? get data => _nsObject.data == null ? null : Data._(_nsObject.data!); - - /// The string associated with the WebSocket message. - /// - /// Will be `null` if the [URLSessionWebSocketMessage] is a data message. - /// - /// See [NSURLSessionWebSocketMessage.string](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181194-string) - String? get string => toStringOrNull(_nsObject.string); - - /// The type of the WebSocket message. - /// - /// See [NSURLSessionWebSocketMessage.type](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181195-type) - URLSessionWebSocketMessageType get type => - URLSessionWebSocketMessageType.values[_nsObject.type]; - - @override - String toString() => - '[URLSessionWebSocketMessage type=$type string=$string data=$data]'; -} - /// A task associated with downloading a URI. /// /// See [NSURLSessionTask](https://developer.apple.com/documentation/foundation/nsurlsessiontask) @@ -665,18 +608,18 @@ class URLSessionTask extends _ObjectHolder { /// The number of content bytes that are expected to be received from the /// server. /// - /// See [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410663-countofbytesexpectedtoreceive) + /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410663-countofbytesexpectedtoreceive) int get countOfBytesExpectedToReceive => _nsObject.countOfBytesExpectedToReceive; /// The number of content bytes that have been received from the server. /// - /// See [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411581-countofbytesreceived) + /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411581-countofbytesreceived) int get countOfBytesReceived => _nsObject.countOfBytesReceived; /// The number of content bytes that the task expects to send to the server. /// - /// See [NSURLSessionTask.countOfBytesExpectedToSend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411534-countofbytesexpectedtosend) + /// [NSURLSessionTask.countOfBytesExpectedToSend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411534-countofbytesexpectedtosend) int get countOfBytesExpectedToSend => _nsObject.countOfBytesExpectedToSend; /// Whether the body of the response should be delivered incrementally or not. @@ -686,12 +629,12 @@ class URLSessionTask extends _ObjectHolder { /// Whether the body of the response should be delivered incrementally or not. /// - /// See [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) + /// [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) bool get prefersIncrementalDelivery => _nsObject.prefersIncrementalDelivery; /// Whether the body of the response should be delivered incrementally or not. /// - /// See [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) + /// [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) set prefersIncrementalDelivery(bool value) => _nsObject.prefersIncrementalDelivery = value; @@ -721,109 +664,6 @@ class URLSessionDownloadTask extends URLSessionTask { String toString() => _toStringHelper('URLSessionDownloadTask'); } -/// A task associated with a WebSocket connection. -/// -/// See [NSURLSessionWebSocketTask](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask) -class URLSessionWebSocketTask extends URLSessionTask { - final ncb.NSURLSessionWebSocketTask _urlSessionWebSocketTask; - - URLSessionWebSocketTask._(ncb.NSURLSessionWebSocketTask super.c) - : _urlSessionWebSocketTask = c, - super._(); - - /// The close code set when the WebSocket connection is closed. - /// - /// See [NSURLSessionWebSocketTask.closeCode](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181201-closecode) - int get closeCode => _urlSessionWebSocketTask.closeCode; - - /// The close reason set when the WebSocket connection is closed. - /// If there is no close reason available this property will be null. - /// - /// See [NSURLSessionWebSocketTask.closeReason](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181202-closereason) - Data? get closeReason { - final reason = _urlSessionWebSocketTask.closeReason; - if (reason == null) { - return null; - } else { - return Data._(reason); - } - } - - /// Sends a single WebSocket message. - /// - /// The returned future will complete successfully when the message is sent - /// and with an [Error] on failure. - /// - /// See [NSURLSessionWebSocketTask.sendMessage:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181205-sendmessage) - Future sendMessage(URLSessionWebSocketMessage message) async { - final completer = Completer(); - final completionPort = ReceivePort(); - completionPort.listen((message) { - final ep = Pointer.fromAddress(message as int); - if (ep.address == 0) { - completer.complete(); - } else { - final error = Error._(ncb.NSError.castFromPointer(linkedLibs, ep, - retain: false, release: true)); - completer.completeError(error); - } - completionPort.close(); - }); - - helperLibs.CUPHTTPSendMessage(_urlSessionWebSocketTask.pointer, - message._nsObject.pointer, completionPort.sendPort.nativePort); - await completer.future; - } - - /// Receives a single WebSocket message. - /// - /// Throws an [Error] on failure. - /// - /// See [NSURLSessionWebSocketTask.receiveMessageWithCompletionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181204-receivemessagewithcompletionhand) - Future receiveMessage() async { - final completer = Completer(); - final completionPort = ReceivePort(); - completionPort.listen((d) { - final messageAndError = d as List; - - final mp = Pointer.fromAddress(messageAndError[0] as int); - final ep = Pointer.fromAddress(messageAndError[1] as int); - - final message = mp.address == 0 - ? null - : URLSessionWebSocketMessage._( - ncb.NSURLSessionWebSocketMessage.castFromPointer(linkedLibs, mp, - retain: false, release: true)); - final error = ep.address == 0 - ? null - : Error._(ncb.NSError.castFromPointer(linkedLibs, ep, - retain: false, release: true)); - - if (error != null) { - completer.completeError(error); - } else { - completer.complete(message); - } - completionPort.close(); - }); - - helperLibs.CUPHTTPReceiveMessage( - _urlSessionWebSocketTask.pointer, completionPort.sendPort.nativePort); - return completer.future; - } - - /// Sends close frame with the given code and optional reason. - /// - /// See [NSURLSessionWebSocketTask.cancelWithCloseCode:reason:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181200-cancelwithclosecode) - void cancelWithCloseCode(int closeCode, Data? reason) { - _urlSessionWebSocketTask.cancelWithCloseCode_reason_( - closeCode, reason?._nsObject); - } - - @override - String toString() => _toStringHelper('NSURLSessionWebSocketTask'); -} - /// A request to load a URL. /// /// See [NSURLRequest](https://developer.apple.com/documentation/foundation/nsurlrequest) @@ -1314,23 +1154,4 @@ class URLSession extends _ObjectHolder { onResponse: _onResponse); return task; } - - /// Creates a [URLSessionWebSocketTask] that represents a connection to a - /// WebSocket endpoint. - /// - /// To add custom protocols, add a "Sec-WebSocket-Protocol" header with a list - /// of protocols to [request]. - /// - /// See [NSURLSession webSocketTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/3235750-websockettaskwithrequest) - URLSessionWebSocketTask webSocketTaskWithRequest(URLRequest request) { - final task = URLSessionWebSocketTask._( - _nsObject.webSocketTaskWithRequest_(request._nsObject)); - _setupDelegation(_delegate, this, task, - onComplete: _onComplete, - onData: _onData, - onFinishedDownloading: _onFinishedDownloading, - onRedirect: _onRedirect, - onResponse: _onResponse); - return task; - } } diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index f08662793b..82724c8cc3 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -27,5406 +27,6407 @@ class NativeCupertinoHttp { lookup) : _lookup = lookup; - ffi.Pointer> signal( + int __darwin_check_fd_set_overflow( int arg0, - ffi.Pointer> arg1, + ffi.Pointer arg1, + int arg2, ) { - return _signal( + return ___darwin_check_fd_set_overflow( arg0, arg1, + arg2, ); } - late final _signalPtr = _lookup< + late final ___darwin_check_fd_set_overflowPtr = _lookup< ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Int, - ffi.Pointer< - ffi.NativeFunction>)>>('signal'); - late final _signal = _signalPtr.asFunction< - ffi.Pointer> Function( - int, ffi.Pointer>)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Int)>>('__darwin_check_fd_set_overflow'); + late final ___darwin_check_fd_set_overflow = + ___darwin_check_fd_set_overflowPtr + .asFunction, int)>(); - int getpriority( - int arg0, - int arg1, + ffi.Pointer sel_getName( + ffi.Pointer sel, ) { - return _getpriority( - arg0, - arg1, + return _sel_getName( + sel, ); } - late final _getpriorityPtr = - _lookup>( - 'getpriority'); - late final _getpriority = - _getpriorityPtr.asFunction(); + late final _sel_getNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('sel_getName'); + late final _sel_getName = _sel_getNamePtr + .asFunction Function(ffi.Pointer)>(); - int getiopolicy_np( - int arg0, - int arg1, + ffi.Pointer sel_registerName( + ffi.Pointer str, ) { - return _getiopolicy_np( - arg0, - arg1, + return _sel_registerName1( + str, ); } - late final _getiopolicy_npPtr = - _lookup>( - 'getiopolicy_np'); - late final _getiopolicy_np = - _getiopolicy_npPtr.asFunction(); + late final _sel_registerNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('sel_registerName'); + late final _sel_registerName1 = _sel_registerNamePtr + .asFunction Function(ffi.Pointer)>(); - int getrlimit( - int arg0, - ffi.Pointer arg1, + ffi.Pointer object_getClassName( + ffi.Pointer obj, ) { - return _getrlimit( - arg0, - arg1, + return _object_getClassName( + obj, ); } - late final _getrlimitPtr = _lookup< - ffi.NativeFunction)>>( - 'getrlimit'); - late final _getrlimit = - _getrlimitPtr.asFunction)>(); + late final _object_getClassNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('object_getClassName'); + late final _object_getClassName = _object_getClassNamePtr + .asFunction Function(ffi.Pointer)>(); - int getrusage( - int arg0, - ffi.Pointer arg1, + ffi.Pointer object_getIndexedIvars( + ffi.Pointer obj, ) { - return _getrusage( - arg0, - arg1, + return _object_getIndexedIvars( + obj, ); } - late final _getrusagePtr = _lookup< - ffi.NativeFunction)>>( - 'getrusage'); - late final _getrusage = - _getrusagePtr.asFunction)>(); + late final _object_getIndexedIvarsPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('object_getIndexedIvars'); + late final _object_getIndexedIvars = _object_getIndexedIvarsPtr + .asFunction Function(ffi.Pointer)>(); - int setpriority( - int arg0, - int arg1, - int arg2, + bool sel_isMapped( + ffi.Pointer sel, ) { - return _setpriority( - arg0, - arg1, - arg2, + return _sel_isMapped( + sel, ); } - late final _setpriorityPtr = - _lookup>( - 'setpriority'); - late final _setpriority = - _setpriorityPtr.asFunction(); + late final _sel_isMappedPtr = + _lookup)>>( + 'sel_isMapped'); + late final _sel_isMapped = + _sel_isMappedPtr.asFunction)>(); - int setiopolicy_np( - int arg0, - int arg1, - int arg2, + ffi.Pointer sel_getUid( + ffi.Pointer str, ) { - return _setiopolicy_np( - arg0, - arg1, - arg2, + return _sel_getUid( + str, ); } - late final _setiopolicy_npPtr = - _lookup>( - 'setiopolicy_np'); - late final _setiopolicy_np = - _setiopolicy_npPtr.asFunction(); + late final _sel_getUidPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('sel_getUid'); + late final _sel_getUid = _sel_getUidPtr + .asFunction Function(ffi.Pointer)>(); - int setrlimit( - int arg0, - ffi.Pointer arg1, + ffi.Pointer objc_retainedObject( + objc_objectptr_t obj, ) { - return _setrlimit( - arg0, - arg1, + return _objc_retainedObject( + obj, ); } - late final _setrlimitPtr = _lookup< - ffi.NativeFunction)>>( - 'setrlimit'); - late final _setrlimit = - _setrlimitPtr.asFunction)>(); + late final _objc_retainedObjectPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + objc_objectptr_t)>>('objc_retainedObject'); + late final _objc_retainedObject = _objc_retainedObjectPtr + .asFunction Function(objc_objectptr_t)>(); - int wait1( - ffi.Pointer arg0, + ffi.Pointer objc_unretainedObject( + objc_objectptr_t obj, ) { - return _wait1( - arg0, + return _objc_unretainedObject( + obj, ); } - late final _wait1Ptr = - _lookup)>>('wait'); - late final _wait1 = - _wait1Ptr.asFunction)>(); + late final _objc_unretainedObjectPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + objc_objectptr_t)>>('objc_unretainedObject'); + late final _objc_unretainedObject = _objc_unretainedObjectPtr + .asFunction Function(objc_objectptr_t)>(); - int waitpid( - int arg0, - ffi.Pointer arg1, - int arg2, + objc_objectptr_t objc_unretainedPointer( + ffi.Pointer obj, ) { - return _waitpid( - arg0, - arg1, - arg2, + return _objc_unretainedPointer( + obj, ); } - late final _waitpidPtr = _lookup< + late final _objc_unretainedPointerPtr = _lookup< ffi.NativeFunction< - pid_t Function(pid_t, ffi.Pointer, ffi.Int)>>('waitpid'); - late final _waitpid = - _waitpidPtr.asFunction, int)>(); + objc_objectptr_t Function( + ffi.Pointer)>>('objc_unretainedPointer'); + late final _objc_unretainedPointer = _objc_unretainedPointerPtr + .asFunction)>(); - int waitid( - int arg0, - int arg1, - ffi.Pointer arg2, - int arg3, + ffi.Pointer _registerName1(String name) { + final cstr = name.toNativeUtf8(); + final sel = _sel_registerName(cstr.cast()); + pkg_ffi.calloc.free(cstr); + return sel; + } + + ffi.Pointer _sel_registerName( + ffi.Pointer str, ) { - return _waitid( - arg0, - arg1, - arg2, - arg3, + return __sel_registerName( + str, ); } - late final _waitidPtr = _lookup< + late final __sel_registerNamePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, id_t, ffi.Pointer, ffi.Int)>>('waitid'); - late final _waitid = _waitidPtr - .asFunction, int)>(); + ffi.Pointer Function( + ffi.Pointer)>>('sel_registerName'); + late final __sel_registerName = __sel_registerNamePtr + .asFunction Function(ffi.Pointer)>(); - int wait3( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + ffi.Pointer _getClass1(String name) { + final cstr = name.toNativeUtf8(); + final clazz = _objc_getClass(cstr.cast()); + pkg_ffi.calloc.free(cstr); + if (clazz == ffi.nullptr) { + throw Exception('Failed to load Objective-C class: $name'); + } + return clazz; + } + + ffi.Pointer _objc_getClass( + ffi.Pointer str, ) { - return _wait3( - arg0, - arg1, - arg2, + return __objc_getClass( + str, ); } - late final _wait3Ptr = _lookup< + late final __objc_getClassPtr = _lookup< ffi.NativeFunction< - pid_t Function( - ffi.Pointer, ffi.Int, ffi.Pointer)>>('wait3'); - late final _wait3 = _wait3Ptr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('objc_getClass'); + late final __objc_getClass = __objc_getClassPtr + .asFunction Function(ffi.Pointer)>(); - int wait4( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + ffi.Pointer _objc_retain( + ffi.Pointer value, ) { - return _wait4( - arg0, - arg1, - arg2, - arg3, + return __objc_retain( + value, ); } - late final _wait4Ptr = _lookup< + late final __objc_retainPtr = _lookup< ffi.NativeFunction< - pid_t Function(pid_t, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('wait4'); - late final _wait4 = _wait4Ptr.asFunction< - int Function(int, ffi.Pointer, int, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('objc_retain'); + late final __objc_retain = __objc_retainPtr + .asFunction Function(ffi.Pointer)>(); - ffi.Pointer alloca( - int arg0, + void _objc_release( + ffi.Pointer value, ) { - return _alloca( - arg0, + return __objc_release( + value, ); } - late final _allocaPtr = - _lookup Function(ffi.Size)>>( - 'alloca'); - late final _alloca = - _allocaPtr.asFunction Function(int)>(); - - late final ffi.Pointer ___mb_cur_max = - _lookup('__mb_cur_max'); - - int get __mb_cur_max => ___mb_cur_max.value; - - set __mb_cur_max(int value) => ___mb_cur_max.value = value; + late final __objc_releasePtr = + _lookup)>>( + 'objc_release'); + late final __objc_release = + __objc_releasePtr.asFunction)>(); - ffi.Pointer malloc( - int __size, + late final _objc_releaseFinalizer2 = + ffi.NativeFinalizer(__objc_releasePtr.cast()); + late final _class_NSObject1 = _getClass1("NSObject"); + late final _sel_load1 = _registerName1("load"); + void _objc_msgSend_1( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _malloc( - __size, + return __objc_msgSend_1( + obj, + sel, ); } - late final _mallocPtr = - _lookup Function(ffi.Size)>>( - 'malloc'); - late final _malloc = - _mallocPtr.asFunction Function(int)>(); + late final __objc_msgSend_1Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer calloc( - int __count, - int __size, + late final _sel_initialize1 = _registerName1("initialize"); + late final _sel_init1 = _registerName1("init"); + instancetype _objc_msgSend_2( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _calloc( - __count, - __size, + return __objc_msgSend_2( + obj, + sel, ); } - late final _callocPtr = _lookup< + late final __objc_msgSend_2Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Size, ffi.Size)>>('calloc'); - late final _calloc = - _callocPtr.asFunction Function(int, int)>(); + instancetype Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer)>(); - void free( - ffi.Pointer arg0, + late final _sel_new1 = _registerName1("new"); + late final _sel_allocWithZone_1 = _registerName1("allocWithZone:"); + instancetype _objc_msgSend_3( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_NSZone> zone, ) { - return _free( - arg0, + return __objc_msgSend_3( + obj, + sel, + zone, ); } - late final _freePtr = - _lookup)>>( - 'free'); - late final _free = - _freePtr.asFunction)>(); + late final __objc_msgSend_3Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_NSZone>)>>('objc_msgSend'); + late final __objc_msgSend_3 = __objc_msgSend_3Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_NSZone>)>(); - ffi.Pointer realloc( - ffi.Pointer __ptr, - int __size, + late final _sel_alloc1 = _registerName1("alloc"); + late final _sel_dealloc1 = _registerName1("dealloc"); + late final _sel_finalize1 = _registerName1("finalize"); + late final _sel_copy1 = _registerName1("copy"); + late final _sel_mutableCopy1 = _registerName1("mutableCopy"); + late final _sel_copyWithZone_1 = _registerName1("copyWithZone:"); + late final _sel_mutableCopyWithZone_1 = + _registerName1("mutableCopyWithZone:"); + late final _sel_instancesRespondToSelector_1 = + _registerName1("instancesRespondToSelector:"); + bool _objc_msgSend_4( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, ) { - return _realloc( - __ptr, - __size, + return __objc_msgSend_4( + obj, + sel, + aSelector, ); } - late final _reallocPtr = _lookup< + late final __objc_msgSend_4Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('realloc'); - late final _realloc = _reallocPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer valloc( - int arg0, + bool _objc_msgSend_0( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer clazz, ) { - return _valloc( - arg0, + return __objc_msgSend_0( + obj, + sel, + clazz, ); } - late final _vallocPtr = - _lookup Function(ffi.Size)>>( - 'valloc'); - late final _valloc = - _vallocPtr.asFunction Function(int)>(); + late final __objc_msgSend_0Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer aligned_alloc( - int __alignment, - int __size, + late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); + late final _class_Protocol1 = _getClass1("Protocol"); + late final _sel_conformsToProtocol_1 = _registerName1("conformsToProtocol:"); + bool _objc_msgSend_5( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer protocol, ) { - return _aligned_alloc( - __alignment, - __size, + return __objc_msgSend_5( + obj, + sel, + protocol, ); } - late final _aligned_allocPtr = _lookup< + late final __objc_msgSend_5Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Size, ffi.Size)>>('aligned_alloc'); - late final _aligned_alloc = - _aligned_allocPtr.asFunction Function(int, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_5 = __objc_msgSend_5Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int posix_memalign( - ffi.Pointer> __memptr, - int __alignment, - int __size, + late final _sel_methodForSelector_1 = _registerName1("methodForSelector:"); + IMP _objc_msgSend_6( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, ) { - return _posix_memalign( - __memptr, - __alignment, - __size, + return __objc_msgSend_6( + obj, + sel, + aSelector, ); } - late final _posix_memalignPtr = _lookup< + late final __objc_msgSend_6Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, ffi.Size, - ffi.Size)>>('posix_memalign'); - late final _posix_memalign = _posix_memalignPtr - .asFunction>, int, int)>(); + IMP Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction< + IMP Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - void abort() { - return _abort(); - } - - late final _abortPtr = - _lookup>('abort'); - late final _abort = _abortPtr.asFunction(); - - int abs( - int arg0, - ) { - return _abs( - arg0, - ); - } - - late final _absPtr = - _lookup>('abs'); - late final _abs = _absPtr.asFunction(); - - int atexit( - ffi.Pointer> arg0, + late final _sel_instanceMethodForSelector_1 = + _registerName1("instanceMethodForSelector:"); + late final _sel_doesNotRecognizeSelector_1 = + _registerName1("doesNotRecognizeSelector:"); + void _objc_msgSend_7( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, ) { - return _atexit( - arg0, + return __objc_msgSend_7( + obj, + sel, + aSelector, ); } - late final _atexitPtr = _lookup< + late final __objc_msgSend_7Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('atexit'); - late final _atexit = _atexitPtr.asFunction< - int Function(ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double atof( - ffi.Pointer arg0, + late final _sel_forwardingTargetForSelector_1 = + _registerName1("forwardingTargetForSelector:"); + ffi.Pointer _objc_msgSend_8( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, ) { - return _atof( - arg0, + return __objc_msgSend_8( + obj, + sel, + aSelector, ); } - late final _atofPtr = - _lookup)>>( - 'atof'); - late final _atof = - _atofPtr.asFunction)>(); + late final __objc_msgSend_8Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int atoi( - ffi.Pointer arg0, + late final _class_NSInvocation1 = _getClass1("NSInvocation"); + late final _sel_forwardInvocation_1 = _registerName1("forwardInvocation:"); + void _objc_msgSend_9( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anInvocation, ) { - return _atoi( - arg0, + return __objc_msgSend_9( + obj, + sel, + anInvocation, ); } - late final _atoiPtr = - _lookup)>>( - 'atoi'); - late final _atoi = _atoiPtr.asFunction)>(); + late final __objc_msgSend_9Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_9 = __objc_msgSend_9Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int atol( - ffi.Pointer arg0, + late final _class_NSMethodSignature1 = _getClass1("NSMethodSignature"); + late final _sel_methodSignatureForSelector_1 = + _registerName1("methodSignatureForSelector:"); + ffi.Pointer _objc_msgSend_10( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, ) { - return _atol( - arg0, + return __objc_msgSend_10( + obj, + sel, + aSelector, ); } - late final _atolPtr = - _lookup)>>( - 'atol'); - late final _atol = _atolPtr.asFunction)>(); + late final __objc_msgSend_10Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int atoll( - ffi.Pointer arg0, + late final _sel_instanceMethodSignatureForSelector_1 = + _registerName1("instanceMethodSignatureForSelector:"); + late final _sel_allowsWeakReference1 = _registerName1("allowsWeakReference"); + bool _objc_msgSend_11( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _atoll( - arg0, + return __objc_msgSend_11( + obj, + sel, ); } - late final _atollPtr = - _lookup)>>( - 'atoll'); - late final _atoll = - _atollPtr.asFunction)>(); + late final __objc_msgSend_11Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer bsearch( - ffi.Pointer __key, - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + late final _sel_retainWeakReference1 = _registerName1("retainWeakReference"); + late final _sel_isSubclassOfClass_1 = _registerName1("isSubclassOfClass:"); + late final _sel_resolveClassMethod_1 = _registerName1("resolveClassMethod:"); + late final _sel_resolveInstanceMethod_1 = + _registerName1("resolveInstanceMethod:"); + late final _sel_hash1 = _registerName1("hash"); + int _objc_msgSend_12( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _bsearch( - __key, - __base, - __nel, - __width, - __compar, + return __objc_msgSend_12( + obj, + sel, ); } - late final _bsearchPtr = _lookup< + late final __objc_msgSend_12Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('bsearch'); - late final _bsearch = _bsearchPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + NSUInteger Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_12 = __objc_msgSend_12Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - div_t div( - int arg0, - int arg1, + late final _sel_superclass1 = _registerName1("superclass"); + late final _sel_class1 = _registerName1("class"); + late final _class_NSString1 = _getClass1("NSString"); + late final _sel_length1 = _registerName1("length"); + late final _sel_characterAtIndex_1 = _registerName1("characterAtIndex:"); + int _objc_msgSend_13( + ffi.Pointer obj, + ffi.Pointer sel, + int index, ) { - return _div( - arg0, - arg1, + return __objc_msgSend_13( + obj, + sel, + index, ); } - late final _divPtr = - _lookup>('div'); - late final _div = _divPtr.asFunction(); + late final __objc_msgSend_13Ptr = _lookup< + ffi.NativeFunction< + unichar Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - void exit( - int arg0, + late final _class_NSCoder1 = _getClass1("NSCoder"); + late final _sel_initWithCoder_1 = _registerName1("initWithCoder:"); + instancetype _objc_msgSend_14( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer coder, ) { - return _exit1( - arg0, + return __objc_msgSend_14( + obj, + sel, + coder, ); } - late final _exitPtr = - _lookup>('exit'); - late final _exit1 = _exitPtr.asFunction(); + late final __objc_msgSend_14Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer getenv( - ffi.Pointer arg0, + late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); + ffi.Pointer _objc_msgSend_15( + ffi.Pointer obj, + ffi.Pointer sel, + int from, ) { - return _getenv( - arg0, + return __objc_msgSend_15( + obj, + sel, + from, ); } - late final _getenvPtr = _lookup< + late final __objc_msgSend_15Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('getenv'); - late final _getenv = _getenvPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int labs( - int arg0, + late final _sel_substringToIndex_1 = _registerName1("substringToIndex:"); + late final _sel_substringWithRange_1 = _registerName1("substringWithRange:"); + ffi.Pointer _objc_msgSend_16( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, ) { - return _labs( - arg0, + return __objc_msgSend_16( + obj, + sel, + range, ); } - late final _labsPtr = - _lookup>('labs'); - late final _labs = _labsPtr.asFunction(); + late final __objc_msgSend_16Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - ldiv_t ldiv( - int arg0, - int arg1, + late final _sel_getCharacters_range_1 = + _registerName1("getCharacters:range:"); + void _objc_msgSend_17( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + NSRange range, ) { - return _ldiv( - arg0, - arg1, + return __objc_msgSend_17( + obj, + sel, + buffer, + range, ); } - late final _ldivPtr = - _lookup>('ldiv'); - late final _ldiv = _ldivPtr.asFunction(); + late final __objc_msgSend_17Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - int llabs( - int arg0, + late final _sel_compare_1 = _registerName1("compare:"); + int _objc_msgSend_18( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, ) { - return _llabs( - arg0, + return __objc_msgSend_18( + obj, + sel, + string, ); } - late final _llabsPtr = - _lookup>('llabs'); - late final _llabs = _llabsPtr.asFunction(); + late final __objc_msgSend_18Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - lldiv_t lldiv( - int arg0, - int arg1, + late final _sel_compare_options_1 = _registerName1("compare:options:"); + int _objc_msgSend_19( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int mask, ) { - return _lldiv( - arg0, - arg1, + return __objc_msgSend_19( + obj, + sel, + string, + mask, ); } - late final _lldivPtr = - _lookup>( - 'lldiv'); - late final _lldiv = _lldivPtr.asFunction(); + late final __objc_msgSend_19Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - int mblen( - ffi.Pointer __s, - int __n, + late final _sel_compare_options_range_1 = + _registerName1("compare:options:range:"); + int _objc_msgSend_20( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int mask, + NSRange rangeOfReceiverToCompare, ) { - return _mblen( - __s, - __n, + return __objc_msgSend_20( + obj, + sel, + string, + mask, + rangeOfReceiverToCompare, ); } - late final _mblenPtr = _lookup< + late final __objc_msgSend_20Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('mblen'); - late final _mblen = - _mblenPtr.asFunction, int)>(); + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - int mbstowcs( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + late final _sel_compare_options_range_locale_1 = + _registerName1("compare:options:range:locale:"); + int _objc_msgSend_21( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer string, + int mask, + NSRange rangeOfReceiverToCompare, + ffi.Pointer locale, ) { - return _mbstowcs( - arg0, - arg1, - arg2, + return __objc_msgSend_21( + obj, + sel, + string, + mask, + rangeOfReceiverToCompare, + locale, ); } - late final _mbstowcsPtr = _lookup< + late final __objc_msgSend_21Ptr = _lookup< ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('mbstowcs'); - late final _mbstowcs = _mbstowcsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange, ffi.Pointer)>(); - int mbtowc( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + late final _sel_caseInsensitiveCompare_1 = + _registerName1("caseInsensitiveCompare:"); + late final _sel_localizedCompare_1 = _registerName1("localizedCompare:"); + late final _sel_localizedCaseInsensitiveCompare_1 = + _registerName1("localizedCaseInsensitiveCompare:"); + late final _sel_localizedStandardCompare_1 = + _registerName1("localizedStandardCompare:"); + late final _sel_isEqualToString_1 = _registerName1("isEqualToString:"); + bool _objc_msgSend_22( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, ) { - return _mbtowc( - arg0, - arg1, - arg2, + return __objc_msgSend_22( + obj, + sel, + aString, ); } - late final _mbtowcPtr = _lookup< + late final __objc_msgSend_22Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('mbtowc'); - late final _mbtowc = _mbtowcPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - void qsort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + late final _sel_hasPrefix_1 = _registerName1("hasPrefix:"); + late final _sel_hasSuffix_1 = _registerName1("hasSuffix:"); + late final _sel_commonPrefixWithString_options_1 = + _registerName1("commonPrefixWithString:options:"); + ffi.Pointer _objc_msgSend_23( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer str, + int mask, ) { - return _qsort( - __base, - __nel, - __width, - __compar, + return __objc_msgSend_23( + obj, + sel, + str, + mask, ); } - late final _qsortPtr = _lookup< + late final __objc_msgSend_23Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('qsort'); - late final _qsort = _qsortPtr.asFunction< - void Function( - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); - - int rand() { - return _rand(); - } - - late final _randPtr = _lookup>('rand'); - late final _rand = _randPtr.asFunction(); - - void srand( - int arg0, - ) { - return _srand( - arg0, - ); - } - - late final _srandPtr = - _lookup>('srand'); - late final _srand = _srandPtr.asFunction(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - double strtod( - ffi.Pointer arg0, - ffi.Pointer> arg1, + late final _sel_containsString_1 = _registerName1("containsString:"); + late final _sel_localizedCaseInsensitiveContainsString_1 = + _registerName1("localizedCaseInsensitiveContainsString:"); + late final _sel_localizedStandardContainsString_1 = + _registerName1("localizedStandardContainsString:"); + late final _sel_localizedStandardRangeOfString_1 = + _registerName1("localizedStandardRangeOfString:"); + NSRange _objc_msgSend_24( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer str, ) { - return _strtod( - arg0, - arg1, + return __objc_msgSend_24( + obj, + sel, + str, ); } - late final _strtodPtr = _lookup< + late final __objc_msgSend_24Ptr = _lookup< ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, - ffi.Pointer>)>>('strtod'); - late final _strtod = _strtodPtr.asFunction< - double Function( - ffi.Pointer, ffi.Pointer>)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double strtof( - ffi.Pointer arg0, - ffi.Pointer> arg1, + late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); + late final _sel_rangeOfString_options_1 = + _registerName1("rangeOfString:options:"); + NSRange _objc_msgSend_25( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, ) { - return _strtof( - arg0, - arg1, + return __objc_msgSend_25( + obj, + sel, + searchString, + mask, ); } - late final _strtofPtr = _lookup< + late final __objc_msgSend_25Ptr = _lookup< ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer>)>>('strtof'); - late final _strtof = _strtofPtr.asFunction< - double Function( - ffi.Pointer, ffi.Pointer>)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - int strtol( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + late final _sel_rangeOfString_options_range_1 = + _registerName1("rangeOfString:options:range:"); + NSRange _objc_msgSend_26( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + NSRange rangeOfReceiverToSearch, ) { - return _strtol( - __str, - __endptr, - __base, + return __objc_msgSend_26( + obj, + sel, + searchString, + mask, + rangeOfReceiverToSearch, ); } - late final _strtolPtr = _lookup< + late final __objc_msgSend_26Ptr = _lookup< ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtol'); - late final _strtol = _strtolPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - int strtoll( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + late final _class_NSLocale1 = _getClass1("NSLocale"); + late final _sel_rangeOfString_options_range_locale_1 = + _registerName1("rangeOfString:options:range:locale:"); + NSRange _objc_msgSend_27( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer searchString, + int mask, + NSRange rangeOfReceiverToSearch, + ffi.Pointer locale, ) { - return _strtoll( - __str, - __endptr, - __base, + return __objc_msgSend_27( + obj, + sel, + searchString, + mask, + rangeOfReceiverToSearch, + locale, ); } - late final _strtollPtr = _lookup< + late final __objc_msgSend_27Ptr = _lookup< ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoll'); - late final _strtoll = _strtollPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange, ffi.Pointer)>(); - int strtoul( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); + late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); + ffi.Pointer _objc_msgSend_28( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _strtoul( - __str, - __endptr, - __base, + return __objc_msgSend_28( + obj, + sel, ); } - late final _strtoulPtr = _lookup< + late final __objc_msgSend_28Ptr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoul'); - late final _strtoul = _strtoulPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int strtoull( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + late final _sel_whitespaceCharacterSet1 = + _registerName1("whitespaceCharacterSet"); + late final _sel_whitespaceAndNewlineCharacterSet1 = + _registerName1("whitespaceAndNewlineCharacterSet"); + late final _sel_decimalDigitCharacterSet1 = + _registerName1("decimalDigitCharacterSet"); + late final _sel_letterCharacterSet1 = _registerName1("letterCharacterSet"); + late final _sel_lowercaseLetterCharacterSet1 = + _registerName1("lowercaseLetterCharacterSet"); + late final _sel_uppercaseLetterCharacterSet1 = + _registerName1("uppercaseLetterCharacterSet"); + late final _sel_nonBaseCharacterSet1 = _registerName1("nonBaseCharacterSet"); + late final _sel_alphanumericCharacterSet1 = + _registerName1("alphanumericCharacterSet"); + late final _sel_decomposableCharacterSet1 = + _registerName1("decomposableCharacterSet"); + late final _sel_illegalCharacterSet1 = _registerName1("illegalCharacterSet"); + late final _sel_punctuationCharacterSet1 = + _registerName1("punctuationCharacterSet"); + late final _sel_capitalizedLetterCharacterSet1 = + _registerName1("capitalizedLetterCharacterSet"); + late final _sel_symbolCharacterSet1 = _registerName1("symbolCharacterSet"); + late final _sel_newlineCharacterSet1 = _registerName1("newlineCharacterSet"); + late final _sel_characterSetWithRange_1 = + _registerName1("characterSetWithRange:"); + ffi.Pointer _objc_msgSend_29( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange aRange, ) { - return _strtoull( - __str, - __endptr, - __base, + return __objc_msgSend_29( + obj, + sel, + aRange, ); } - late final _strtoullPtr = _lookup< + late final __objc_msgSend_29Ptr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoull'); - late final _strtoull = _strtoullPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - int system( - ffi.Pointer arg0, + late final _sel_characterSetWithCharactersInString_1 = + _registerName1("characterSetWithCharactersInString:"); + ffi.Pointer _objc_msgSend_30( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, ) { - return _system( - arg0, + return __objc_msgSend_30( + obj, + sel, + aString, ); } - late final _systemPtr = - _lookup)>>( - 'system'); - late final _system = - _systemPtr.asFunction)>(); + late final __objc_msgSend_30Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int wcstombs( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + late final _class_NSData1 = _getClass1("NSData"); + late final _sel_bytes1 = _registerName1("bytes"); + ffi.Pointer _objc_msgSend_31( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _wcstombs( - arg0, - arg1, - arg2, + return __objc_msgSend_31( + obj, + sel, ); } - late final _wcstombsPtr = _lookup< + late final __objc_msgSend_31Ptr = _lookup< ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('wcstombs'); - late final _wcstombs = _wcstombsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int wctomb( - ffi.Pointer arg0, - int arg1, + late final _sel_description1 = _registerName1("description"); + ffi.Pointer _objc_msgSend_32( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _wctomb( - arg0, - arg1, + return __objc_msgSend_32( + obj, + sel, ); } - late final _wctombPtr = _lookup< + late final __objc_msgSend_32Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.WChar)>>('wctomb'); - late final _wctomb = - _wctombPtr.asFunction, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - void _Exit( - int arg0, + late final _sel_getBytes_length_1 = _registerName1("getBytes:length:"); + void _objc_msgSend_33( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + int length, ) { - return __Exit( - arg0, + return __objc_msgSend_33( + obj, + sel, + buffer, + length, ); } - late final __ExitPtr = - _lookup>('_Exit'); - late final __Exit = __ExitPtr.asFunction(); + late final __objc_msgSend_33Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - int a64l( - ffi.Pointer arg0, + late final _sel_getBytes_range_1 = _registerName1("getBytes:range:"); + void _objc_msgSend_34( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + NSRange range, ) { - return _a64l( - arg0, + return __objc_msgSend_34( + obj, + sel, + buffer, + range, ); } - late final _a64lPtr = - _lookup)>>( - 'a64l'); - late final _a64l = _a64lPtr.asFunction)>(); - - double drand48() { - return _drand48(); - } - - late final _drand48Ptr = - _lookup>('drand48'); - late final _drand48 = _drand48Ptr.asFunction(); + late final __objc_msgSend_34Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - ffi.Pointer ecvt( - double arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); + bool _objc_msgSend_35( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, ) { - return _ecvt( - arg0, - arg1, - arg2, - arg3, + return __objc_msgSend_35( + obj, + sel, + other, ); } - late final _ecvtPtr = _lookup< + late final __objc_msgSend_35Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Double, ffi.Int, - ffi.Pointer, ffi.Pointer)>>('ecvt'); - late final _ecvt = _ecvtPtr.asFunction< - ffi.Pointer Function( - double, int, ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double erand48( - ffi.Pointer arg0, + late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); + ffi.Pointer _objc_msgSend_36( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, ) { - return _erand48( - arg0, + return __objc_msgSend_36( + obj, + sel, + range, ); } - late final _erand48Ptr = _lookup< + late final __objc_msgSend_36Ptr = _lookup< ffi.NativeFunction< - ffi.Double Function(ffi.Pointer)>>('erand48'); - late final _erand48 = - _erand48Ptr.asFunction)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - ffi.Pointer fcvt( - double arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + late final _sel_writeToFile_atomically_1 = + _registerName1("writeToFile:atomically:"); + bool _objc_msgSend_37( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool useAuxiliaryFile, ) { - return _fcvt( - arg0, - arg1, - arg2, - arg3, + return __objc_msgSend_37( + obj, + sel, + path, + useAuxiliaryFile, ); } - late final _fcvtPtr = _lookup< + late final __objc_msgSend_37Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Double, ffi.Int, - ffi.Pointer, ffi.Pointer)>>('fcvt'); - late final _fcvt = _fcvtPtr.asFunction< - ffi.Pointer Function( - double, int, ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - ffi.Pointer gcvt( - double arg0, - int arg1, - ffi.Pointer arg2, + late final _class_NSURL1 = _getClass1("NSURL"); + late final _sel_initWithScheme_host_path_1 = + _registerName1("initWithScheme:host:path:"); + instancetype _objc_msgSend_38( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer scheme, + ffi.Pointer host, + ffi.Pointer path, ) { - return _gcvt( - arg0, - arg1, - arg2, + return __objc_msgSend_38( + obj, + sel, + scheme, + host, + path, ); } - late final _gcvtPtr = _lookup< + late final __objc_msgSend_38Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Double, ffi.Int, ffi.Pointer)>>('gcvt'); - late final _gcvt = _gcvtPtr.asFunction< - ffi.Pointer Function(double, int, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_38 = __objc_msgSend_38Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - int getsubopt( - ffi.Pointer> arg0, - ffi.Pointer> arg1, - ffi.Pointer> arg2, + late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = + _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); + instancetype _objc_msgSend_39( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return _getsubopt( - arg0, - arg1, - arg2, + return __objc_msgSend_39( + obj, + sel, + path, + isDir, + baseURL, ); } - late final _getsuboptPtr = _lookup< + late final __objc_msgSend_39Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>)>>('getsubopt'); - late final _getsubopt = _getsuboptPtr.asFunction< - int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool, ffi.Pointer)>(); - int grantpt( - int arg0, + late final _sel_initFileURLWithPath_relativeToURL_1 = + _registerName1("initFileURLWithPath:relativeToURL:"); + instancetype _objc_msgSend_40( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer baseURL, ) { - return _grantpt( - arg0, + return __objc_msgSend_40( + obj, + sel, + path, + baseURL, ); } - late final _grantptPtr = - _lookup>('grantpt'); - late final _grantpt = _grantptPtr.asFunction(); + late final __objc_msgSend_40Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer initstate( - int arg0, - ffi.Pointer arg1, - int arg2, + late final _sel_initFileURLWithPath_isDirectory_1 = + _registerName1("initFileURLWithPath:isDirectory:"); + instancetype _objc_msgSend_41( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, ) { - return _initstate( - arg0, - arg1, - arg2, + return __objc_msgSend_41( + obj, + sel, + path, + isDir, ); } - late final _initstatePtr = _lookup< + late final __objc_msgSend_41Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.UnsignedInt, ffi.Pointer, ffi.Size)>>('initstate'); - late final _initstate = _initstatePtr.asFunction< - ffi.Pointer Function(int, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - int jrand48( - ffi.Pointer arg0, + late final _sel_initFileURLWithPath_1 = + _registerName1("initFileURLWithPath:"); + instancetype _objc_msgSend_42( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, ) { - return _jrand48( - arg0, + return __objc_msgSend_42( + obj, + sel, + path, ); } - late final _jrand48Ptr = _lookup< + late final __objc_msgSend_42Ptr = _lookup< ffi.NativeFunction< - ffi.Long Function(ffi.Pointer)>>('jrand48'); - late final _jrand48 = - _jrand48Ptr.asFunction)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer l64a( - int arg0, + late final _sel_fileURLWithPath_isDirectory_relativeToURL_1 = + _registerName1("fileURLWithPath:isDirectory:relativeToURL:"); + ffi.Pointer _objc_msgSend_43( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return _l64a( - arg0, + return __objc_msgSend_43( + obj, + sel, + path, + isDir, + baseURL, ); } - late final _l64aPtr = - _lookup Function(ffi.Long)>>( - 'l64a'); - late final _l64a = _l64aPtr.asFunction Function(int)>(); + late final __objc_msgSend_43Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); - void lcong48( - ffi.Pointer arg0, + late final _sel_fileURLWithPath_relativeToURL_1 = + _registerName1("fileURLWithPath:relativeToURL:"); + ffi.Pointer _objc_msgSend_44( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer baseURL, ) { - return _lcong48( - arg0, + return __objc_msgSend_44( + obj, + sel, + path, + baseURL, ); } - late final _lcong48Ptr = _lookup< + late final __objc_msgSend_44Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>>('lcong48'); - late final _lcong48 = - _lcong48Ptr.asFunction)>(); - - int lrand48() { - return _lrand48(); - } - - late final _lrand48Ptr = - _lookup>('lrand48'); - late final _lrand48 = _lrand48Ptr.asFunction(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer mktemp( - ffi.Pointer arg0, + late final _sel_fileURLWithPath_isDirectory_1 = + _registerName1("fileURLWithPath:isDirectory:"); + ffi.Pointer _objc_msgSend_45( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, ) { - return _mktemp( - arg0, + return __objc_msgSend_45( + obj, + sel, + path, + isDir, ); } - late final _mktempPtr = _lookup< + late final __objc_msgSend_45Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('mktemp'); - late final _mktemp = _mktempPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); - int mkstemp( - ffi.Pointer arg0, + late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); + ffi.Pointer _objc_msgSend_46( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, ) { - return _mkstemp( - arg0, + return __objc_msgSend_46( + obj, + sel, + path, ); } - late final _mkstempPtr = - _lookup)>>( - 'mkstemp'); - late final _mkstemp = - _mkstempPtr.asFunction)>(); - - int mrand48() { - return _mrand48(); - } - - late final _mrand48Ptr = - _lookup>('mrand48'); - late final _mrand48 = _mrand48Ptr.asFunction(); + late final __objc_msgSend_46Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int nrand48( - ffi.Pointer arg0, + late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = + _registerName1( + "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); + instancetype _objc_msgSend_47( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return _nrand48( - arg0, + return __objc_msgSend_47( + obj, + sel, + path, + isDir, + baseURL, ); } - late final _nrand48Ptr = _lookup< + late final __objc_msgSend_47Ptr = _lookup< ffi.NativeFunction< - ffi.Long Function(ffi.Pointer)>>('nrand48'); - late final _nrand48 = - _nrand48Ptr.asFunction)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool, ffi.Pointer)>(); - int posix_openpt( - int arg0, + late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = + _registerName1( + "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); + ffi.Pointer _objc_msgSend_48( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return _posix_openpt( - arg0, + return __objc_msgSend_48( + obj, + sel, + path, + isDir, + baseURL, ); } - late final _posix_openptPtr = - _lookup>('posix_openpt'); - late final _posix_openpt = _posix_openptPtr.asFunction(); + late final __objc_msgSend_48Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); - ffi.Pointer ptsname( - int arg0, + late final _sel_initWithString_1 = _registerName1("initWithString:"); + late final _sel_initWithString_relativeToURL_1 = + _registerName1("initWithString:relativeToURL:"); + late final _sel_URLWithString_1 = _registerName1("URLWithString:"); + late final _sel_URLWithString_relativeToURL_1 = + _registerName1("URLWithString:relativeToURL:"); + late final _sel_initWithDataRepresentation_relativeToURL_1 = + _registerName1("initWithDataRepresentation:relativeToURL:"); + instancetype _objc_msgSend_49( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ffi.Pointer baseURL, ) { - return _ptsname( - arg0, + return __objc_msgSend_49( + obj, + sel, + data, + baseURL, ); } - late final _ptsnamePtr = - _lookup Function(ffi.Int)>>( - 'ptsname'); - late final _ptsname = - _ptsnamePtr.asFunction Function(int)>(); + late final __objc_msgSend_49Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int ptsname_r( - int fildes, - ffi.Pointer buffer, - int buflen, + late final _sel_URLWithDataRepresentation_relativeToURL_1 = + _registerName1("URLWithDataRepresentation:relativeToURL:"); + ffi.Pointer _objc_msgSend_50( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ffi.Pointer baseURL, ) { - return _ptsname_r( - fildes, - buffer, - buflen, + return __objc_msgSend_50( + obj, + sel, + data, + baseURL, ); } - late final _ptsname_rPtr = _lookup< + late final __objc_msgSend_50Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('ptsname_r'); - late final _ptsname_r = - _ptsname_rPtr.asFunction, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - int putenv( - ffi.Pointer arg0, + late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1 = + _registerName1("initAbsoluteURLWithDataRepresentation:relativeToURL:"); + late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = + _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); + late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); + ffi.Pointer _objc_msgSend_51( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _putenv( - arg0, + return __objc_msgSend_51( + obj, + sel, ); } - late final _putenvPtr = - _lookup)>>( - 'putenv'); - late final _putenv = - _putenvPtr.asFunction)>(); - - int random() { - return _random(); - } - - late final _randomPtr = - _lookup>('random'); - late final _random = _randomPtr.asFunction(); + late final __objc_msgSend_51Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int rand_r( - ffi.Pointer arg0, + late final _sel_absoluteString1 = _registerName1("absoluteString"); + late final _sel_relativeString1 = _registerName1("relativeString"); + late final _sel_baseURL1 = _registerName1("baseURL"); + ffi.Pointer _objc_msgSend_52( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _rand_r( - arg0, + return __objc_msgSend_52( + obj, + sel, ); } - late final _rand_rPtr = _lookup< - ffi.NativeFunction)>>( - 'rand_r'); - late final _rand_r = - _rand_rPtr.asFunction)>(); + late final __objc_msgSend_52Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer realpath( - ffi.Pointer arg0, - ffi.Pointer arg1, + late final _sel_absoluteURL1 = _registerName1("absoluteURL"); + late final _sel_scheme1 = _registerName1("scheme"); + late final _sel_resourceSpecifier1 = _registerName1("resourceSpecifier"); + late final _sel_host1 = _registerName1("host"); + late final _class_NSNumber1 = _getClass1("NSNumber"); + late final _class_NSValue1 = _getClass1("NSValue"); + late final _sel_getValue_size_1 = _registerName1("getValue:size:"); + late final _sel_objCType1 = _registerName1("objCType"); + ffi.Pointer _objc_msgSend_53( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _realpath( - arg0, - arg1, + return __objc_msgSend_53( + obj, + sel, ); } - late final _realpathPtr = _lookup< + late final __objc_msgSend_53Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('realpath'); - late final _realpath = _realpathPtr.asFunction< + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer seed48( - ffi.Pointer arg0, + late final _sel_initWithBytes_objCType_1 = + _registerName1("initWithBytes:objCType:"); + instancetype _objc_msgSend_54( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer type, ) { - return _seed48( - arg0, + return __objc_msgSend_54( + obj, + sel, + value, + type, ); } - late final _seed48Ptr = _lookup< + late final __objc_msgSend_54Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('seed48'); - late final _seed48 = _seed48Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int setenv( - ffi.Pointer __name, - ffi.Pointer __value, - int __overwrite, + late final _sel_valueWithBytes_objCType_1 = + _registerName1("valueWithBytes:objCType:"); + ffi.Pointer _objc_msgSend_55( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer type, ) { - return _setenv( - __name, - __value, - __overwrite, + return __objc_msgSend_55( + obj, + sel, + value, + type, ); } - late final _setenvPtr = _lookup< + late final __objc_msgSend_55Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('setenv'); - late final _setenv = _setenvPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void setkey( - ffi.Pointer arg0, + late final _sel_value_withObjCType_1 = _registerName1("value:withObjCType:"); + late final _sel_valueWithNonretainedObject_1 = + _registerName1("valueWithNonretainedObject:"); + ffi.Pointer _objc_msgSend_56( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, ) { - return _setkey( - arg0, + return __objc_msgSend_56( + obj, + sel, + anObject, ); } - late final _setkeyPtr = - _lookup)>>( - 'setkey'); - late final _setkey = - _setkeyPtr.asFunction)>(); + late final __objc_msgSend_56Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer setstate( - ffi.Pointer arg0, + late final _sel_nonretainedObjectValue1 = + _registerName1("nonretainedObjectValue"); + late final _sel_valueWithPointer_1 = _registerName1("valueWithPointer:"); + ffi.Pointer _objc_msgSend_57( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer pointer, ) { - return _setstate( - arg0, + return __objc_msgSend_57( + obj, + sel, + pointer, ); } - late final _setstatePtr = _lookup< + late final __objc_msgSend_57Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('setstate'); - late final _setstate = _setstatePtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void srand48( - int arg0, + late final _sel_pointerValue1 = _registerName1("pointerValue"); + late final _sel_isEqualToValue_1 = _registerName1("isEqualToValue:"); + bool _objc_msgSend_58( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _srand48( - arg0, + return __objc_msgSend_58( + obj, + sel, + value, ); } - late final _srand48Ptr = - _lookup>('srand48'); - late final _srand48 = _srand48Ptr.asFunction(); + late final __objc_msgSend_58Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - void srandom( - int arg0, + late final _sel_getValue_1 = _registerName1("getValue:"); + void _objc_msgSend_59( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _srandom( - arg0, + return __objc_msgSend_59( + obj, + sel, + value, ); } - late final _srandomPtr = - _lookup>( - 'srandom'); - late final _srandom = _srandomPtr.asFunction(); + late final __objc_msgSend_59Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int unlockpt( - int arg0, + late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); + ffi.Pointer _objc_msgSend_60( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, ) { - return _unlockpt( - arg0, + return __objc_msgSend_60( + obj, + sel, + range, ); } - late final _unlockptPtr = - _lookup>('unlockpt'); - late final _unlockpt = _unlockptPtr.asFunction(); + late final __objc_msgSend_60Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - int unsetenv( - ffi.Pointer arg0, + late final _sel_rangeValue1 = _registerName1("rangeValue"); + NSRange _objc_msgSend_61( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _unsetenv( - arg0, + return __objc_msgSend_61( + obj, + sel, ); } - late final _unsetenvPtr = - _lookup)>>( - 'unsetenv'); - late final _unsetenv = - _unsetenvPtr.asFunction)>(); + late final __objc_msgSend_61Ptr = _lookup< + ffi.NativeFunction< + NSRange Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer)>(); - int arc4random() { - return _arc4random(); + late final _sel_initWithChar_1 = _registerName1("initWithChar:"); + ffi.Pointer _objc_msgSend_62( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_62( + obj, + sel, + value, + ); } - late final _arc4randomPtr = - _lookup>('arc4random'); - late final _arc4random = _arc4randomPtr.asFunction(); + late final __objc_msgSend_62Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Char)>>('objc_msgSend'); + late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - void arc4random_addrandom( - ffi.Pointer arg0, - int arg1, + late final _sel_initWithUnsignedChar_1 = + _registerName1("initWithUnsignedChar:"); + ffi.Pointer _objc_msgSend_63( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _arc4random_addrandom( - arg0, - arg1, + return __objc_msgSend_63( + obj, + sel, + value, ); } - late final _arc4random_addrandomPtr = _lookup< + late final __objc_msgSend_63Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Int)>>('arc4random_addrandom'); - late final _arc4random_addrandom = _arc4random_addrandomPtr - .asFunction, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); + late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - void arc4random_buf( - ffi.Pointer __buf, - int __nbytes, + late final _sel_initWithShort_1 = _registerName1("initWithShort:"); + ffi.Pointer _objc_msgSend_64( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _arc4random_buf( - __buf, - __nbytes, + return __objc_msgSend_64( + obj, + sel, + value, ); } - late final _arc4random_bufPtr = _lookup< + late final __objc_msgSend_64Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Size)>>('arc4random_buf'); - late final _arc4random_buf = _arc4random_bufPtr - .asFunction, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Short)>>('objc_msgSend'); + late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - void arc4random_stir() { - return _arc4random_stir(); + late final _sel_initWithUnsignedShort_1 = + _registerName1("initWithUnsignedShort:"); + ffi.Pointer _objc_msgSend_65( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_65( + obj, + sel, + value, + ); } - late final _arc4random_stirPtr = - _lookup>('arc4random_stir'); - late final _arc4random_stir = - _arc4random_stirPtr.asFunction(); + late final __objc_msgSend_65Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); + late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int arc4random_uniform( - int __upper_bound, + late final _sel_initWithInt_1 = _registerName1("initWithInt:"); + ffi.Pointer _objc_msgSend_66( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _arc4random_uniform( - __upper_bound, + return __objc_msgSend_66( + obj, + sel, + value, ); } - late final _arc4random_uniformPtr = - _lookup>( - 'arc4random_uniform'); - late final _arc4random_uniform = - _arc4random_uniformPtr.asFunction(); + late final __objc_msgSend_66Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>('objc_msgSend'); + late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int atexit_b( - ffi.Pointer<_ObjCBlock> arg0, + late final _sel_initWithUnsignedInt_1 = + _registerName1("initWithUnsignedInt:"); + ffi.Pointer _objc_msgSend_67( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _atexit_b( - arg0, + return __objc_msgSend_67( + obj, + sel, + value, ); } - late final _atexit_bPtr = - _lookup)>>( - 'atexit_b'); - late final _atexit_b = - _atexit_bPtr.asFunction)>(); + late final __objc_msgSend_67Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); + late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { - final d = - pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); - d.ref.reserved = 0; - d.ref.size = ffi.sizeOf<_ObjCBlock>(); - d.ref.copy_helper = ffi.nullptr; - d.ref.dispose_helper = ffi.nullptr; - d.ref.signature = ffi.nullptr; - return d; + late final _sel_initWithLong_1 = _registerName1("initWithLong:"); + ffi.Pointer _objc_msgSend_68( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_68( + obj, + sel, + value, + ); } - late final _objc_block_desc1 = _newBlockDesc1(); - late final _objc_concrete_global_block1 = - _lookup('_NSConcreteGlobalBlock'); - ffi.Pointer<_ObjCBlock> _newBlock1( - ffi.Pointer invoke, ffi.Pointer target) { - final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); - b.ref.isa = _objc_concrete_global_block1; - b.ref.flags = 0; - b.ref.reserved = 0; - b.ref.invoke = invoke; - b.ref.target = target; - b.ref.descriptor = _objc_block_desc1; - final copy = _Block_copy(b.cast()).cast<_ObjCBlock>(); - pkg_ffi.calloc.free(b); - return copy; - } + late final __objc_msgSend_68Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer _Block_copy( - ffi.Pointer value, + late final _sel_initWithUnsignedLong_1 = + _registerName1("initWithUnsignedLong:"); + ffi.Pointer _objc_msgSend_69( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return __Block_copy( + return __objc_msgSend_69( + obj, + sel, value, ); } - late final __Block_copyPtr = _lookup< + late final __objc_msgSend_69Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('_Block_copy'); - late final __Block_copy = __Block_copyPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - void _Block_release( - ffi.Pointer value, + late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); + ffi.Pointer _objc_msgSend_70( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return __Block_release( + return __objc_msgSend_70( + obj, + sel, value, ); } - late final __Block_releasePtr = - _lookup)>>( - '_Block_release'); - late final __Block_release = - __Block_releasePtr.asFunction)>(); + late final __objc_msgSend_70Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); + late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _objc_releaseFinalizer2 = - ffi.NativeFinalizer(__Block_releasePtr.cast()); - ffi.Pointer bsearch_b( - ffi.Pointer __key, - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + late final _sel_initWithUnsignedLongLong_1 = + _registerName1("initWithUnsignedLongLong:"); + ffi.Pointer _objc_msgSend_71( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _bsearch_b( - __key, - __base, - __nel, - __width, - __compar, + return __objc_msgSend_71( + obj, + sel, + value, ); } - late final _bsearch_bPtr = _lookup< + late final __objc_msgSend_71Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('bsearch_b'); - late final _bsearch_b = _bsearch_bPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); + late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer cgetcap( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); + ffi.Pointer _objc_msgSend_72( + ffi.Pointer obj, + ffi.Pointer sel, + double value, ) { - return _cgetcap( - arg0, - arg1, - arg2, + return __objc_msgSend_72( + obj, + sel, + value, ); } - late final _cgetcapPtr = _lookup< + late final __objc_msgSend_72Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>('cgetcap'); - late final _cgetcap = _cgetcapPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - int cgetclose() { - return _cgetclose(); - } - - late final _cgetclosePtr = - _lookup>('cgetclose'); - late final _cgetclose = _cgetclosePtr.asFunction(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>('objc_msgSend'); + late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, double)>(); - int cgetent( - ffi.Pointer> arg0, - ffi.Pointer> arg1, - ffi.Pointer arg2, + late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); + ffi.Pointer _objc_msgSend_73( + ffi.Pointer obj, + ffi.Pointer sel, + double value, ) { - return _cgetent( - arg0, - arg1, - arg2, + return __objc_msgSend_73( + obj, + sel, + value, ); } - late final _cgetentPtr = _lookup< + late final __objc_msgSend_73Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer)>>('cgetent'); - late final _cgetent = _cgetentPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer>, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, double)>(); - int cgetfirst( - ffi.Pointer> arg0, - ffi.Pointer> arg1, + late final _sel_initWithBool_1 = _registerName1("initWithBool:"); + ffi.Pointer _objc_msgSend_74( + ffi.Pointer obj, + ffi.Pointer sel, + bool value, ) { - return _cgetfirst( - arg0, - arg1, + return __objc_msgSend_74( + obj, + sel, + value, ); } - late final _cgetfirstPtr = _lookup< + late final __objc_msgSend_74Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer>)>>('cgetfirst'); - late final _cgetfirst = _cgetfirstPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); - int cgetmatch( - ffi.Pointer arg0, - ffi.Pointer arg1, + late final _sel_initWithInteger_1 = _registerName1("initWithInteger:"); + late final _sel_initWithUnsignedInteger_1 = + _registerName1("initWithUnsignedInteger:"); + late final _sel_charValue1 = _registerName1("charValue"); + int _objc_msgSend_75( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _cgetmatch( - arg0, - arg1, + return __objc_msgSend_75( + obj, + sel, ); } - late final _cgetmatchPtr = _lookup< + late final __objc_msgSend_75Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('cgetmatch'); - late final _cgetmatch = _cgetmatchPtr - .asFunction, ffi.Pointer)>(); + ffi.Char Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int cgetnext( - ffi.Pointer> arg0, - ffi.Pointer> arg1, + late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); + int _objc_msgSend_76( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _cgetnext( - arg0, - arg1, + return __objc_msgSend_76( + obj, + sel, ); } - late final _cgetnextPtr = _lookup< + late final __objc_msgSend_76Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer>)>>('cgetnext'); - late final _cgetnext = _cgetnextPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer>)>(); + ffi.UnsignedChar Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int cgetnum( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + late final _sel_shortValue1 = _registerName1("shortValue"); + int _objc_msgSend_77( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _cgetnum( - arg0, - arg1, - arg2, + return __objc_msgSend_77( + obj, + sel, ); } - late final _cgetnumPtr = _lookup< + late final __objc_msgSend_77Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('cgetnum'); - late final _cgetnum = _cgetnumPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Short Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int cgetset( - ffi.Pointer arg0, + late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); + int _objc_msgSend_78( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _cgetset( - arg0, + return __objc_msgSend_78( + obj, + sel, ); } - late final _cgetsetPtr = - _lookup)>>( - 'cgetset'); - late final _cgetset = - _cgetsetPtr.asFunction)>(); + late final __objc_msgSend_78Ptr = _lookup< + ffi.NativeFunction< + ffi.UnsignedShort Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int cgetstr( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, + late final _sel_intValue1 = _registerName1("intValue"); + int _objc_msgSend_79( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _cgetstr( - arg0, - arg1, - arg2, + return __objc_msgSend_79( + obj, + sel, ); } - late final _cgetstrPtr = _lookup< + late final __objc_msgSend_79Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('cgetstr'); - late final _cgetstr = _cgetstrPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int cgetustr( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer> arg2, + late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); + int _objc_msgSend_80( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _cgetustr( - arg0, - arg1, - arg2, + return __objc_msgSend_80( + obj, + sel, ); } - late final _cgetustrPtr = _lookup< + late final __objc_msgSend_80Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('cgetustr'); - late final _cgetustr = _cgetustrPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + ffi.UnsignedInt Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int daemon( - int arg0, - int arg1, + late final _sel_longValue1 = _registerName1("longValue"); + int _objc_msgSend_81( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _daemon( - arg0, - arg1, + return __objc_msgSend_81( + obj, + sel, ); } - late final _daemonPtr = - _lookup>('daemon'); - late final _daemon = _daemonPtr.asFunction(); + late final __objc_msgSend_81Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer devname( - int arg0, - int arg1, + late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); + late final _sel_longLongValue1 = _registerName1("longLongValue"); + int _objc_msgSend_82( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _devname( - arg0, - arg1, + return __objc_msgSend_82( + obj, + sel, ); } - late final _devnamePtr = _lookup< - ffi.NativeFunction Function(dev_t, mode_t)>>( - 'devname'); - late final _devname = - _devnamePtr.asFunction Function(int, int)>(); + late final __objc_msgSend_82Ptr = _lookup< + ffi.NativeFunction< + ffi.LongLong Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer devname_r( - int arg0, - int arg1, - ffi.Pointer buf, - int len, + late final _sel_unsignedLongLongValue1 = + _registerName1("unsignedLongLongValue"); + int _objc_msgSend_83( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _devname_r( - arg0, - arg1, - buf, - len, + return __objc_msgSend_83( + obj, + sel, ); } - late final _devname_rPtr = _lookup< + late final __objc_msgSend_83Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - dev_t, mode_t, ffi.Pointer, ffi.Int)>>('devname_r'); - late final _devname_r = _devname_rPtr.asFunction< - ffi.Pointer Function(int, int, ffi.Pointer, int)>(); + ffi.UnsignedLongLong Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer getbsize( - ffi.Pointer arg0, - ffi.Pointer arg1, + late final _sel_floatValue1 = _registerName1("floatValue"); + double _objc_msgSend_84( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _getbsize( - arg0, - arg1, + return __objc_msgSend_84( + obj, + sel, ); } - late final _getbsizePtr = _lookup< + late final __objc_msgSend_84Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('getbsize'); - late final _getbsize = _getbsizePtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Float Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); - int getloadavg( - ffi.Pointer arg0, - int arg1, + late final _sel_doubleValue1 = _registerName1("doubleValue"); + double _objc_msgSend_85( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _getloadavg( - arg0, - arg1, + return __objc_msgSend_85( + obj, + sel, ); } - late final _getloadavgPtr = _lookup< + late final __objc_msgSend_85Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int)>>('getloadavg'); - late final _getloadavg = - _getloadavgPtr.asFunction, int)>(); - - ffi.Pointer getprogname() { - return _getprogname(); - } - - late final _getprognamePtr = - _lookup Function()>>( - 'getprogname'); - late final _getprogname = - _getprognamePtr.asFunction Function()>(); + ffi.Double Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); - void setprogname( - ffi.Pointer arg0, + late final _sel_boolValue1 = _registerName1("boolValue"); + late final _sel_integerValue1 = _registerName1("integerValue"); + late final _sel_unsignedIntegerValue1 = + _registerName1("unsignedIntegerValue"); + late final _sel_stringValue1 = _registerName1("stringValue"); + int _objc_msgSend_86( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherNumber, ) { - return _setprogname( - arg0, + return __objc_msgSend_86( + obj, + sel, + otherNumber, ); } - late final _setprognamePtr = - _lookup)>>( - 'setprogname'); - late final _setprogname = - _setprognamePtr.asFunction)>(); + late final __objc_msgSend_86Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int heapsort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); + bool _objc_msgSend_87( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer number, ) { - return _heapsort( - __base, - __nel, - __width, - __compar, + return __objc_msgSend_87( + obj, + sel, + number, ); } - late final _heapsortPtr = _lookup< + late final __objc_msgSend_87Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('heapsort'); - late final _heapsort = _heapsortPtr.asFunction< - int Function( - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int heapsort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + late final _sel_descriptionWithLocale_1 = + _registerName1("descriptionWithLocale:"); + ffi.Pointer _objc_msgSend_88( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer locale, ) { - return _heapsort_b( - __base, - __nel, - __width, - __compar, + return __objc_msgSend_88( + obj, + sel, + locale, ); } - late final _heapsort_bPtr = _lookup< + late final __objc_msgSend_88Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('heapsort_b'); - late final _heapsort_b = _heapsort_bPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int mergesort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + late final _sel_numberWithChar_1 = _registerName1("numberWithChar:"); + late final _sel_numberWithUnsignedChar_1 = + _registerName1("numberWithUnsignedChar:"); + late final _sel_numberWithShort_1 = _registerName1("numberWithShort:"); + late final _sel_numberWithUnsignedShort_1 = + _registerName1("numberWithUnsignedShort:"); + late final _sel_numberWithInt_1 = _registerName1("numberWithInt:"); + late final _sel_numberWithUnsignedInt_1 = + _registerName1("numberWithUnsignedInt:"); + late final _sel_numberWithLong_1 = _registerName1("numberWithLong:"); + late final _sel_numberWithUnsignedLong_1 = + _registerName1("numberWithUnsignedLong:"); + late final _sel_numberWithLongLong_1 = _registerName1("numberWithLongLong:"); + late final _sel_numberWithUnsignedLongLong_1 = + _registerName1("numberWithUnsignedLongLong:"); + late final _sel_numberWithFloat_1 = _registerName1("numberWithFloat:"); + late final _sel_numberWithDouble_1 = _registerName1("numberWithDouble:"); + late final _sel_numberWithBool_1 = _registerName1("numberWithBool:"); + late final _sel_numberWithInteger_1 = _registerName1("numberWithInteger:"); + late final _sel_numberWithUnsignedInteger_1 = + _registerName1("numberWithUnsignedInteger:"); + late final _sel_port1 = _registerName1("port"); + ffi.Pointer _objc_msgSend_89( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _mergesort( - __base, - __nel, - __width, - __compar, + return __objc_msgSend_89( + obj, + sel, ); } - late final _mergesortPtr = _lookup< + late final __objc_msgSend_89Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('mergesort'); - late final _mergesort = _mergesortPtr.asFunction< - int Function( - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int mergesort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + late final _sel_user1 = _registerName1("user"); + late final _sel_password1 = _registerName1("password"); + late final _sel_path1 = _registerName1("path"); + late final _sel_fragment1 = _registerName1("fragment"); + late final _sel_parameterString1 = _registerName1("parameterString"); + late final _sel_query1 = _registerName1("query"); + late final _sel_relativePath1 = _registerName1("relativePath"); + late final _sel_hasDirectoryPath1 = _registerName1("hasDirectoryPath"); + late final _sel_getFileSystemRepresentation_maxLength_1 = + _registerName1("getFileSystemRepresentation:maxLength:"); + bool _objc_msgSend_90( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + int maxBufferLength, ) { - return _mergesort_b( - __base, - __nel, - __width, - __compar, + return __objc_msgSend_90( + obj, + sel, + buffer, + maxBufferLength, ); } - late final _mergesort_bPtr = _lookup< + late final __objc_msgSend_90Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('mergesort_b'); - late final _mergesort_b = _mergesort_bPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - void psort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + late final _sel_fileSystemRepresentation1 = + _registerName1("fileSystemRepresentation"); + late final _sel_isFileURL1 = _registerName1("isFileURL"); + late final _sel_standardizedURL1 = _registerName1("standardizedURL"); + late final _class_NSError1 = _getClass1("NSError"); + late final _class_NSDictionary1 = _getClass1("NSDictionary"); + late final _sel_count1 = _registerName1("count"); + late final _sel_objectForKey_1 = _registerName1("objectForKey:"); + ffi.Pointer _objc_msgSend_91( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aKey, ) { - return _psort( - __base, - __nel, - __width, - __compar, + return __objc_msgSend_91( + obj, + sel, + aKey, ); } - late final _psortPtr = _lookup< + late final __objc_msgSend_91Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('psort'); - late final _psort = _psortPtr.asFunction< - void Function( - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void psort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + late final _class_NSEnumerator1 = _getClass1("NSEnumerator"); + late final _sel_nextObject1 = _registerName1("nextObject"); + late final _sel_allObjects1 = _registerName1("allObjects"); + late final _sel_keyEnumerator1 = _registerName1("keyEnumerator"); + ffi.Pointer _objc_msgSend_92( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _psort_b( - __base, - __nel, - __width, - __compar, + return __objc_msgSend_92( + obj, + sel, ); } - late final _psort_bPtr = _lookup< + late final __objc_msgSend_92Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('psort_b'); - late final _psort_b = _psort_bPtr.asFunction< - void Function( - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - void psort_r( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer arg3, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>> - __compar, + late final _sel_initWithObjects_forKeys_count_1 = + _registerName1("initWithObjects:forKeys:count:"); + instancetype _objc_msgSend_93( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt, ) { - return _psort_r( - __base, - __nel, - __width, - arg3, - __compar, + return __objc_msgSend_93( + obj, + sel, + objects, + keys, + cnt, ); } - late final _psort_rPtr = _lookup< + late final __objc_msgSend_93Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>)>>('psort_r'); - late final _psort_r = _psort_rPtr.asFunction< - void Function( - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); - void qsort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + late final _class_NSArray1 = _getClass1("NSArray"); + late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); + ffi.Pointer _objc_msgSend_94( + ffi.Pointer obj, + ffi.Pointer sel, + int index, ) { - return _qsort_b( - __base, - __nel, - __width, - __compar, + return __objc_msgSend_94( + obj, + sel, + index, ); } - late final _qsort_bPtr = _lookup< + late final __objc_msgSend_94Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('qsort_b'); - late final _qsort_b = _qsort_bPtr.asFunction< - void Function( - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - void qsort_r( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer arg3, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>> - __compar, + late final _sel_initWithObjects_count_1 = + _registerName1("initWithObjects:count:"); + instancetype _objc_msgSend_95( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + int cnt, ) { - return _qsort_r( - __base, - __nel, - __width, - arg3, - __compar, + return __objc_msgSend_95( + obj, + sel, + objects, + cnt, ); } - late final _qsort_rPtr = _lookup< + late final __objc_msgSend_95Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>)>>('qsort_r'); - late final _qsort_r = _qsort_rPtr.asFunction< - void Function( - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, int)>(); - int radixsort( - ffi.Pointer> __base, - int __nel, - ffi.Pointer __table, - int __endbyte, + late final _sel_arrayByAddingObject_1 = + _registerName1("arrayByAddingObject:"); + ffi.Pointer _objc_msgSend_96( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, ) { - return _radixsort( - __base, - __nel, - __table, - __endbyte, + return __objc_msgSend_96( + obj, + sel, + anObject, ); } - late final _radixsortPtr = _lookup< + late final __objc_msgSend_96Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, ffi.Int, - ffi.Pointer, ffi.UnsignedInt)>>('radixsort'); - late final _radixsort = _radixsortPtr.asFunction< - int Function(ffi.Pointer>, int, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int rpmatch( - ffi.Pointer arg0, + late final _sel_arrayByAddingObjectsFromArray_1 = + _registerName1("arrayByAddingObjectsFromArray:"); + ffi.Pointer _objc_msgSend_97( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, ) { - return _rpmatch( - arg0, + return __objc_msgSend_97( + obj, + sel, + otherArray, ); } - late final _rpmatchPtr = - _lookup)>>( - 'rpmatch'); - late final _rpmatch = - _rpmatchPtr.asFunction)>(); + late final __objc_msgSend_97Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int sradixsort( - ffi.Pointer> __base, - int __nel, - ffi.Pointer __table, - int __endbyte, + late final _sel_componentsJoinedByString_1 = + _registerName1("componentsJoinedByString:"); + ffi.Pointer _objc_msgSend_98( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer separator, ) { - return _sradixsort( - __base, - __nel, - __table, - __endbyte, + return __objc_msgSend_98( + obj, + sel, + separator, ); } - late final _sradixsortPtr = _lookup< + late final __objc_msgSend_98Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, ffi.Int, - ffi.Pointer, ffi.UnsignedInt)>>('sradixsort'); - late final _sradixsort = _sradixsortPtr.asFunction< - int Function(ffi.Pointer>, int, - ffi.Pointer, int)>(); - - void sranddev() { - return _sranddev(); - } - - late final _sranddevPtr = - _lookup>('sranddev'); - late final _sranddev = _sranddevPtr.asFunction(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void srandomdev() { - return _srandomdev(); + late final _sel_containsObject_1 = _registerName1("containsObject:"); + late final _sel_descriptionWithLocale_indent_1 = + _registerName1("descriptionWithLocale:indent:"); + ffi.Pointer _objc_msgSend_99( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer locale, + int level, + ) { + return __objc_msgSend_99( + obj, + sel, + locale, + level, + ); } - late final _srandomdevPtr = - _lookup>('srandomdev'); - late final _srandomdev = _srandomdevPtr.asFunction(); + late final __objc_msgSend_99Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer reallocf( - ffi.Pointer __ptr, - int __size, + late final _sel_firstObjectCommonWithArray_1 = + _registerName1("firstObjectCommonWithArray:"); + ffi.Pointer _objc_msgSend_100( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, ) { - return _reallocf( - __ptr, - __size, + return __objc_msgSend_100( + obj, + sel, + otherArray, ); } - late final _reallocfPtr = _lookup< + late final __objc_msgSend_100Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('reallocf'); - late final _reallocf = _reallocfPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int strtonum( - ffi.Pointer __numstr, - int __minval, - int __maxval, - ffi.Pointer> __errstrp, + late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); + void _objc_msgSend_101( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + NSRange range, ) { - return _strtonum( - __numstr, - __minval, - __maxval, - __errstrp, + return __objc_msgSend_101( + obj, + sel, + objects, + range, ); } - late final _strtonumPtr = _lookup< + late final __objc_msgSend_101Ptr = _lookup< ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, ffi.LongLong, - ffi.LongLong, ffi.Pointer>)>>('strtonum'); - late final _strtonum = _strtonumPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, NSRange)>(); - int strtoq( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); + int _objc_msgSend_102( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, ) { - return _strtoq( - __str, - __endptr, - __base, + return __objc_msgSend_102( + obj, + sel, + anObject, ); } - late final _strtoqPtr = _lookup< + late final __objc_msgSend_102Ptr = _lookup< ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoq'); - late final _strtoq = _strtoqPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); - - int strtouq( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, - ) { - return _strtouq( - __str, - __endptr, - __base, - ); - } - - late final _strtouqPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLongLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtouq'); - late final _strtouq = _strtouqPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); - - late final ffi.Pointer> _suboptarg = - _lookup>('suboptarg'); - - ffi.Pointer get suboptarg => _suboptarg.value; - - set suboptarg(ffi.Pointer value) => _suboptarg.value = value; + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int __darwin_check_fd_set_overflow( - int arg0, - ffi.Pointer arg1, - int arg2, + late final _sel_indexOfObject_inRange_1 = + _registerName1("indexOfObject:inRange:"); + int _objc_msgSend_103( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + NSRange range, ) { - return ___darwin_check_fd_set_overflow( - arg0, - arg1, - arg2, + return __objc_msgSend_103( + obj, + sel, + anObject, + range, ); } - late final ___darwin_check_fd_set_overflowPtr = _lookup< + late final __objc_msgSend_103Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Int)>>('__darwin_check_fd_set_overflow'); - late final ___darwin_check_fd_set_overflow = - ___darwin_check_fd_set_overflowPtr - .asFunction, int)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - ffi.Pointer sel_getName( + late final _sel_indexOfObjectIdenticalTo_1 = + _registerName1("indexOfObjectIdenticalTo:"); + late final _sel_indexOfObjectIdenticalTo_inRange_1 = + _registerName1("indexOfObjectIdenticalTo:inRange:"); + late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); + bool _objc_msgSend_104( + ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer otherArray, ) { - return _sel_getName( + return __objc_msgSend_104( + obj, sel, + otherArray, ); } - late final _sel_getNamePtr = _lookup< + late final __objc_msgSend_104Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('sel_getName'); - late final _sel_getName = _sel_getNamePtr - .asFunction Function(ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer sel_registerName( - ffi.Pointer str, + late final _sel_firstObject1 = _registerName1("firstObject"); + late final _sel_lastObject1 = _registerName1("lastObject"); + late final _sel_objectEnumerator1 = _registerName1("objectEnumerator"); + late final _sel_reverseObjectEnumerator1 = + _registerName1("reverseObjectEnumerator"); + late final _sel_sortedArrayHint1 = _registerName1("sortedArrayHint"); + late final _sel_sortedArrayUsingFunction_context_1 = + _registerName1("sortedArrayUsingFunction:context:"); + ffi.Pointer _objc_msgSend_105( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, ) { - return _sel_registerName1( - str, + return __objc_msgSend_105( + obj, + sel, + comparator, + context, ); } - late final _sel_registerNamePtr = _lookup< + late final __objc_msgSend_105Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('sel_registerName'); - late final _sel_registerName1 = _sel_registerNamePtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); - ffi.Pointer object_getClassName( + late final _sel_sortedArrayUsingFunction_context_hint_1 = + _registerName1("sortedArrayUsingFunction:context:hint:"); + ffi.Pointer _objc_msgSend_106( ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + ffi.Pointer hint, ) { - return _object_getClassName( + return __objc_msgSend_106( obj, + sel, + comparator, + context, + hint, ); } - late final _object_getClassNamePtr = _lookup< + late final __objc_msgSend_106Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('object_getClassName'); - late final _object_getClassName = _object_getClassNamePtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer object_getIndexedIvars( + late final _sel_sortedArrayUsingSelector_1 = + _registerName1("sortedArrayUsingSelector:"); + ffi.Pointer _objc_msgSend_107( ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer comparator, ) { - return _object_getIndexedIvars( + return __objc_msgSend_107( obj, + sel, + comparator, ); } - late final _object_getIndexedIvarsPtr = _lookup< + late final __objc_msgSend_107Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('object_getIndexedIvars'); - late final _object_getIndexedIvars = _object_getIndexedIvarsPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - bool sel_isMapped( + late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); + ffi.Pointer _objc_msgSend_108( + ffi.Pointer obj, ffi.Pointer sel, + NSRange range, ) { - return _sel_isMapped( + return __objc_msgSend_108( + obj, sel, + range, ); } - late final _sel_isMappedPtr = - _lookup)>>( - 'sel_isMapped'); - late final _sel_isMapped = - _sel_isMappedPtr.asFunction)>(); - - ffi.Pointer sel_getUid( - ffi.Pointer str, - ) { - return _sel_getUid( - str, - ); - } - - late final _sel_getUidPtr = _lookup< + late final __objc_msgSend_108Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('sel_getUid'); - late final _sel_getUid = _sel_getUidPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - ffi.Pointer objc_retainedObject( - objc_objectptr_t obj, + late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); + bool _objc_msgSend_109( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer> error, ) { - return _objc_retainedObject( + return __objc_msgSend_109( obj, + sel, + url, + error, ); } - late final _objc_retainedObjectPtr = _lookup< + late final __objc_msgSend_109Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - objc_objectptr_t)>>('objc_retainedObject'); - late final _objc_retainedObject = _objc_retainedObjectPtr - .asFunction Function(objc_objectptr_t)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - ffi.Pointer objc_unretainedObject( - objc_objectptr_t obj, + late final _sel_makeObjectsPerformSelector_1 = + _registerName1("makeObjectsPerformSelector:"); + late final _sel_makeObjectsPerformSelector_withObject_1 = + _registerName1("makeObjectsPerformSelector:withObject:"); + void _objc_msgSend_110( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aSelector, + ffi.Pointer argument, ) { - return _objc_unretainedObject( + return __objc_msgSend_110( obj, + sel, + aSelector, + argument, ); } - late final _objc_unretainedObjectPtr = _lookup< + late final __objc_msgSend_110Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - objc_objectptr_t)>>('objc_unretainedObject'); - late final _objc_unretainedObject = _objc_unretainedObjectPtr - .asFunction Function(objc_objectptr_t)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - objc_objectptr_t objc_unretainedPointer( + late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); + late final _sel_indexSet1 = _registerName1("indexSet"); + late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); + late final _sel_indexSetWithIndexesInRange_1 = + _registerName1("indexSetWithIndexesInRange:"); + instancetype _objc_msgSend_111( ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, ) { - return _objc_unretainedPointer( + return __objc_msgSend_111( obj, + sel, + range, ); } - late final _objc_unretainedPointerPtr = _lookup< + late final __objc_msgSend_111Ptr = _lookup< ffi.NativeFunction< - objc_objectptr_t Function( - ffi.Pointer)>>('objc_unretainedPointer'); - late final _objc_unretainedPointer = _objc_unretainedPointerPtr - .asFunction)>(); - - ffi.Pointer _registerName1(String name) { - final cstr = name.toNativeUtf8(); - final sel = _sel_registerName(cstr.cast()); - pkg_ffi.calloc.free(cstr); - return sel; - } + instancetype Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - ffi.Pointer _sel_registerName( - ffi.Pointer str, + late final _sel_initWithIndexesInRange_1 = + _registerName1("initWithIndexesInRange:"); + late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); + instancetype _objc_msgSend_112( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexSet, ) { - return __sel_registerName( - str, + return __objc_msgSend_112( + obj, + sel, + indexSet, ); } - late final __sel_registerNamePtr = _lookup< + late final __objc_msgSend_112Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('sel_registerName'); - late final __sel_registerName = __sel_registerNamePtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer _getClass1(String name) { - final cstr = name.toNativeUtf8(); - final clazz = _objc_getClass(cstr.cast()); - pkg_ffi.calloc.free(cstr); - if (clazz == ffi.nullptr) { - throw Exception('Failed to load Objective-C class: $name'); - } - return clazz; - } + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer _objc_getClass( - ffi.Pointer str, + late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); + late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); + bool _objc_msgSend_113( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexSet, ) { - return __objc_getClass( - str, + return __objc_msgSend_113( + obj, + sel, + indexSet, ); } - late final __objc_getClassPtr = _lookup< + late final __objc_msgSend_113Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('objc_getClass'); - late final __objc_getClass = __objc_getClassPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer _objc_retain( - ffi.Pointer value, + late final _sel_firstIndex1 = _registerName1("firstIndex"); + late final _sel_lastIndex1 = _registerName1("lastIndex"); + late final _sel_indexGreaterThanIndex_1 = + _registerName1("indexGreaterThanIndex:"); + int _objc_msgSend_114( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return __objc_retain( + return __objc_msgSend_114( + obj, + sel, value, ); } - late final __objc_retainPtr = _lookup< + late final __objc_msgSend_114Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('objc_retain'); - late final __objc_retain = __objc_retainPtr - .asFunction Function(ffi.Pointer)>(); - - void _objc_release( - ffi.Pointer value, - ) { - return __objc_release( - value, - ); - } - - late final __objc_releasePtr = - _lookup)>>( - 'objc_release'); - late final __objc_release = - __objc_releasePtr.asFunction)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _objc_releaseFinalizer11 = - ffi.NativeFinalizer(__objc_releasePtr.cast()); - late final _class_NSObject1 = _getClass1("NSObject"); - late final _sel_load1 = _registerName1("load"); - void _objc_msgSend_1( + late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); + late final _sel_indexGreaterThanOrEqualToIndex_1 = + _registerName1("indexGreaterThanOrEqualToIndex:"); + late final _sel_indexLessThanOrEqualToIndex_1 = + _registerName1("indexLessThanOrEqualToIndex:"); + late final _sel_getIndexes_maxCount_inIndexRange_1 = + _registerName1("getIndexes:maxCount:inIndexRange:"); + int _objc_msgSend_115( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer indexBuffer, + int bufferSize, + NSRangePointer range, ) { - return __objc_msgSend_1( + return __objc_msgSend_115( obj, sel, + indexBuffer, + bufferSize, + range, ); } - late final __objc_msgSend_1Ptr = _lookup< + late final __objc_msgSend_115Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRangePointer)>(); - late final _sel_initialize1 = _registerName1("initialize"); - late final _sel_init1 = _registerName1("init"); - instancetype _objc_msgSend_2( + late final _sel_countOfIndexesInRange_1 = + _registerName1("countOfIndexesInRange:"); + int _objc_msgSend_116( ffi.Pointer obj, ffi.Pointer sel, + NSRange range, ) { - return __objc_msgSend_2( + return __objc_msgSend_116( obj, sel, + range, ); } - late final __objc_msgSend_2Ptr = _lookup< + late final __objc_msgSend_116Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_new1 = _registerName1("new"); - late final _sel_allocWithZone_1 = _registerName1("allocWithZone:"); - instancetype _objc_msgSend_3( + late final _sel_containsIndex_1 = _registerName1("containsIndex:"); + bool _objc_msgSend_117( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_NSZone> zone, + int value, ) { - return __objc_msgSend_3( + return __objc_msgSend_117( obj, sel, - zone, + value, ); } - late final __objc_msgSend_3Ptr = _lookup< + late final __objc_msgSend_117Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>>('objc_msgSend'); - late final __objc_msgSend_3 = __objc_msgSend_3Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_alloc1 = _registerName1("alloc"); - late final _sel_dealloc1 = _registerName1("dealloc"); - late final _sel_finalize1 = _registerName1("finalize"); - late final _sel_copy1 = _registerName1("copy"); - late final _sel_mutableCopy1 = _registerName1("mutableCopy"); - late final _sel_copyWithZone_1 = _registerName1("copyWithZone:"); - late final _sel_mutableCopyWithZone_1 = - _registerName1("mutableCopyWithZone:"); - late final _sel_instancesRespondToSelector_1 = - _registerName1("instancesRespondToSelector:"); - bool _objc_msgSend_4( + late final _sel_containsIndexesInRange_1 = + _registerName1("containsIndexesInRange:"); + bool _objc_msgSend_118( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aSelector, + NSRange range, ) { - return __objc_msgSend_4( + return __objc_msgSend_118( obj, sel, - aSelector, + range, ); } - late final __objc_msgSend_4Ptr = _lookup< + late final __objc_msgSend_118Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - bool _objc_msgSend_0( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer clazz, + late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); + late final _sel_intersectsIndexesInRange_1 = + _registerName1("intersectsIndexesInRange:"); + ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { + final d = + pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); + d.ref.reserved = 0; + d.ref.size = ffi.sizeOf<_ObjCBlock>(); + d.ref.copy_helper = ffi.nullptr; + d.ref.dispose_helper = ffi.nullptr; + d.ref.signature = ffi.nullptr; + return d; + } + + late final _objc_block_desc1 = _newBlockDesc1(); + late final _objc_concrete_global_block1 = + _lookup('_NSConcreteGlobalBlock'); + ffi.Pointer<_ObjCBlock> _newBlock1( + ffi.Pointer invoke, ffi.Pointer target) { + final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); + b.ref.isa = _objc_concrete_global_block1; + b.ref.flags = 0; + b.ref.reserved = 0; + b.ref.invoke = invoke; + b.ref.target = target; + b.ref.descriptor = _objc_block_desc1; + final copy = _Block_copy(b.cast()).cast<_ObjCBlock>(); + pkg_ffi.calloc.free(b); + return copy; + } + + ffi.Pointer _Block_copy( + ffi.Pointer value, ) { - return __objc_msgSend_0( - obj, - sel, - clazz, + return __Block_copy( + value, ); } - late final __objc_msgSend_0Ptr = _lookup< + late final __Block_copyPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('_Block_copy'); + late final __Block_copy = __Block_copyPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); - late final _class_Protocol1 = _getClass1("Protocol"); - late final _sel_conformsToProtocol_1 = _registerName1("conformsToProtocol:"); - bool _objc_msgSend_5( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer protocol, + void _Block_release( + ffi.Pointer value, ) { - return __objc_msgSend_5( - obj, - sel, - protocol, + return __Block_release( + value, ); } - late final __objc_msgSend_5Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_5 = __objc_msgSend_5Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final __Block_releasePtr = + _lookup)>>( + '_Block_release'); + late final __Block_release = + __Block_releasePtr.asFunction)>(); - late final _sel_methodForSelector_1 = _registerName1("methodForSelector:"); - IMP _objc_msgSend_6( + late final _objc_releaseFinalizer11 = + ffi.NativeFinalizer(__Block_releasePtr.cast()); + late final _sel_enumerateIndexesUsingBlock_1 = + _registerName1("enumerateIndexesUsingBlock:"); + void _objc_msgSend_119( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aSelector, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_6( + return __objc_msgSend_119( obj, sel, - aSelector, + block, ); } - late final __objc_msgSend_6Ptr = _lookup< + late final __objc_msgSend_119Ptr = _lookup< ffi.NativeFunction< - IMP Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction< - IMP Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_instanceMethodForSelector_1 = - _registerName1("instanceMethodForSelector:"); - late final _sel_doesNotRecognizeSelector_1 = - _registerName1("doesNotRecognizeSelector:"); - void _objc_msgSend_7( + late final _sel_enumerateIndexesWithOptions_usingBlock_1 = + _registerName1("enumerateIndexesWithOptions:usingBlock:"); + void _objc_msgSend_120( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aSelector, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_7( + return __objc_msgSend_120( obj, sel, - aSelector, + opts, + block, ); } - late final __objc_msgSend_7Ptr = _lookup< + late final __objc_msgSend_120Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_forwardingTargetForSelector_1 = - _registerName1("forwardingTargetForSelector:"); - ffi.Pointer _objc_msgSend_8( + late final _sel_enumerateIndexesInRange_options_usingBlock_1 = + _registerName1("enumerateIndexesInRange:options:usingBlock:"); + void _objc_msgSend_121( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aSelector, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_8( + return __objc_msgSend_121( obj, sel, - aSelector, + range, + opts, + block, ); } - late final __objc_msgSend_8Ptr = _lookup< + late final __objc_msgSend_121Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _class_NSInvocation1 = _getClass1("NSInvocation"); - late final _sel_forwardInvocation_1 = _registerName1("forwardInvocation:"); - void _objc_msgSend_9( + late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); + int _objc_msgSend_122( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anInvocation, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_9( + return __objc_msgSend_122( obj, sel, - anInvocation, + predicate, ); } - late final __objc_msgSend_9Ptr = _lookup< + late final __objc_msgSend_122Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_9 = __objc_msgSend_9Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _class_NSMethodSignature1 = _getClass1("NSMethodSignature"); - late final _sel_methodSignatureForSelector_1 = - _registerName1("methodSignatureForSelector:"); - ffi.Pointer _objc_msgSend_10( + late final _sel_indexWithOptions_passingTest_1 = + _registerName1("indexWithOptions:passingTest:"); + int _objc_msgSend_123( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aSelector, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_10( + return __objc_msgSend_123( obj, sel, - aSelector, + opts, + predicate, ); } - late final __objc_msgSend_10Ptr = _lookup< + late final __objc_msgSend_123Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_instanceMethodSignatureForSelector_1 = - _registerName1("instanceMethodSignatureForSelector:"); - late final _sel_allowsWeakReference1 = _registerName1("allowsWeakReference"); - bool _objc_msgSend_11( + late final _sel_indexInRange_options_passingTest_1 = + _registerName1("indexInRange:options:passingTest:"); + int _objc_msgSend_124( ffi.Pointer obj, ffi.Pointer sel, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_11( + return __objc_msgSend_124( obj, sel, + range, + opts, + predicate, ); } - late final __objc_msgSend_11Ptr = _lookup< + late final __objc_msgSend_124Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_retainWeakReference1 = _registerName1("retainWeakReference"); - late final _sel_isSubclassOfClass_1 = _registerName1("isSubclassOfClass:"); - late final _sel_resolveClassMethod_1 = _registerName1("resolveClassMethod:"); - late final _sel_resolveInstanceMethod_1 = - _registerName1("resolveInstanceMethod:"); - late final _sel_hash1 = _registerName1("hash"); - int _objc_msgSend_12( + late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); + ffi.Pointer _objc_msgSend_125( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_12( + return __objc_msgSend_125( obj, sel, + predicate, ); } - late final __objc_msgSend_12Ptr = _lookup< + late final __objc_msgSend_125Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_12 = __objc_msgSend_12Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_superclass1 = _registerName1("superclass"); - late final _sel_class1 = _registerName1("class"); - late final _class_NSString1 = _getClass1("NSString"); - late final _sel_length1 = _registerName1("length"); - late final _sel_characterAtIndex_1 = _registerName1("characterAtIndex:"); - int _objc_msgSend_13( + late final _sel_indexesWithOptions_passingTest_1 = + _registerName1("indexesWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_126( ffi.Pointer obj, ffi.Pointer sel, - int index, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_13( + return __objc_msgSend_126( obj, sel, - index, + opts, + predicate, ); } - late final __objc_msgSend_13Ptr = _lookup< + late final __objc_msgSend_126Ptr = _lookup< ffi.NativeFunction< - unichar Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _class_NSCoder1 = _getClass1("NSCoder"); - late final _sel_initWithCoder_1 = _registerName1("initWithCoder:"); - instancetype _objc_msgSend_14( + late final _sel_indexesInRange_options_passingTest_1 = + _registerName1("indexesInRange:options:passingTest:"); + ffi.Pointer _objc_msgSend_127( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer coder, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_14( + return __objc_msgSend_127( obj, sel, - coder, + range, + opts, + predicate, ); } - late final __objc_msgSend_14Ptr = _lookup< + late final __objc_msgSend_127Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); - ffi.Pointer _objc_msgSend_15( + late final _sel_enumerateRangesUsingBlock_1 = + _registerName1("enumerateRangesUsingBlock:"); + void _objc_msgSend_128( ffi.Pointer obj, ffi.Pointer sel, - int from, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_15( + return __objc_msgSend_128( obj, sel, - from, + block, ); } - late final __objc_msgSend_15Ptr = _lookup< + late final __objc_msgSend_128Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_substringToIndex_1 = _registerName1("substringToIndex:"); - late final _sel_substringWithRange_1 = _registerName1("substringWithRange:"); - ffi.Pointer _objc_msgSend_16( + late final _sel_enumerateRangesWithOptions_usingBlock_1 = + _registerName1("enumerateRangesWithOptions:usingBlock:"); + void _objc_msgSend_129( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_16( + return __objc_msgSend_129( obj, sel, - range, + opts, + block, ); } - late final __objc_msgSend_16Ptr = _lookup< + late final __objc_msgSend_129Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_getCharacters_range_1 = - _registerName1("getCharacters:range:"); - void _objc_msgSend_17( + late final _sel_enumerateRangesInRange_options_usingBlock_1 = + _registerName1("enumerateRangesInRange:options:usingBlock:"); + void _objc_msgSend_130( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_17( + return __objc_msgSend_130( obj, sel, - buffer, range, + opts, + block, ); } - late final __objc_msgSend_17Ptr = _lookup< + late final __objc_msgSend_130Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_compare_1 = _registerName1("compare:"); - int _objc_msgSend_18( + late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); + ffi.Pointer _objc_msgSend_131( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer string, + ffi.Pointer indexes, ) { - return __objc_msgSend_18( + return __objc_msgSend_131( obj, sel, - string, + indexes, ); } - late final __objc_msgSend_18Ptr = _lookup< + late final __objc_msgSend_131Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_compare_options_1 = _registerName1("compare:options:"); - int _objc_msgSend_19( + late final _sel_objectAtIndexedSubscript_1 = + _registerName1("objectAtIndexedSubscript:"); + late final _sel_enumerateObjectsUsingBlock_1 = + _registerName1("enumerateObjectsUsingBlock:"); + void _objc_msgSend_132( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer string, - int mask, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_19( + return __objc_msgSend_132( obj, sel, - string, - mask, + block, ); } - late final __objc_msgSend_19Ptr = _lookup< + late final __objc_msgSend_132Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_compare_options_range_1 = - _registerName1("compare:options:range:"); - int _objc_msgSend_20( + late final _sel_enumerateObjectsWithOptions_usingBlock_1 = + _registerName1("enumerateObjectsWithOptions:usingBlock:"); + void _objc_msgSend_133( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer string, - int mask, - NSRange rangeOfReceiverToCompare, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_20( + return __objc_msgSend_133( obj, sel, - string, - mask, - rangeOfReceiverToCompare, + opts, + block, ); } - late final __objc_msgSend_20Ptr = _lookup< + late final __objc_msgSend_133Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_compare_options_range_locale_1 = - _registerName1("compare:options:range:locale:"); - int _objc_msgSend_21( + late final _sel_enumerateObjectsAtIndexes_options_usingBlock_1 = + _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); + void _objc_msgSend_134( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer string, - int mask, - NSRange rangeOfReceiverToCompare, - ffi.Pointer locale, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_21( + return __objc_msgSend_134( obj, sel, - string, - mask, - rangeOfReceiverToCompare, - locale, + s, + opts, + block, ); } - late final __objc_msgSend_21Ptr = _lookup< + late final __objc_msgSend_134Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32, - NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange, ffi.Pointer)>(); + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_caseInsensitiveCompare_1 = - _registerName1("caseInsensitiveCompare:"); - late final _sel_localizedCompare_1 = _registerName1("localizedCompare:"); - late final _sel_localizedCaseInsensitiveCompare_1 = - _registerName1("localizedCaseInsensitiveCompare:"); - late final _sel_localizedStandardCompare_1 = - _registerName1("localizedStandardCompare:"); - late final _sel_isEqualToString_1 = _registerName1("isEqualToString:"); - bool _objc_msgSend_22( + late final _sel_indexOfObjectPassingTest_1 = + _registerName1("indexOfObjectPassingTest:"); + int _objc_msgSend_135( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aString, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_22( + return __objc_msgSend_135( obj, sel, - aString, + predicate, ); } - late final __objc_msgSend_22Ptr = _lookup< + late final __objc_msgSend_135Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_hasPrefix_1 = _registerName1("hasPrefix:"); - late final _sel_hasSuffix_1 = _registerName1("hasSuffix:"); - late final _sel_commonPrefixWithString_options_1 = - _registerName1("commonPrefixWithString:options:"); - ffi.Pointer _objc_msgSend_23( + late final _sel_indexOfObjectWithOptions_passingTest_1 = + _registerName1("indexOfObjectWithOptions:passingTest:"); + int _objc_msgSend_136( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer str, - int mask, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_23( + return __objc_msgSend_136( obj, sel, - str, - mask, + opts, + predicate, ); } - late final __objc_msgSend_23Ptr = _lookup< + late final __objc_msgSend_136Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_containsString_1 = _registerName1("containsString:"); - late final _sel_localizedCaseInsensitiveContainsString_1 = - _registerName1("localizedCaseInsensitiveContainsString:"); - late final _sel_localizedStandardContainsString_1 = - _registerName1("localizedStandardContainsString:"); - late final _sel_localizedStandardRangeOfString_1 = - _registerName1("localizedStandardRangeOfString:"); - NSRange _objc_msgSend_24( + late final _sel_indexOfObjectAtIndexes_options_passingTest_1 = + _registerName1("indexOfObjectAtIndexes:options:passingTest:"); + int _objc_msgSend_137( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer str, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_24( + return __objc_msgSend_137( obj, sel, - str, + s, + opts, + predicate, ); } - late final __objc_msgSend_24Ptr = _lookup< + late final __objc_msgSend_137Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); - late final _sel_rangeOfString_options_1 = - _registerName1("rangeOfString:options:"); - NSRange _objc_msgSend_25( + late final _sel_indexesOfObjectsPassingTest_1 = + _registerName1("indexesOfObjectsPassingTest:"); + ffi.Pointer _objc_msgSend_138( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchString, - int mask, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_25( + return __objc_msgSend_138( obj, sel, - searchString, - mask, + predicate, ); } - late final __objc_msgSend_25Ptr = _lookup< + late final __objc_msgSend_138Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_rangeOfString_options_range_1 = - _registerName1("rangeOfString:options:range:"); - NSRange _objc_msgSend_26( + late final _sel_indexesOfObjectsWithOptions_passingTest_1 = + _registerName1("indexesOfObjectsWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_139( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - NSRange rangeOfReceiverToSearch, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_26( + return __objc_msgSend_139( obj, sel, - searchString, - mask, - rangeOfReceiverToSearch, + opts, + predicate, ); } - late final __objc_msgSend_26Ptr = _lookup< + late final __objc_msgSend_139Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _class_NSLocale1 = _getClass1("NSLocale"); - late final _sel_rangeOfString_options_range_locale_1 = - _registerName1("rangeOfString:options:range:locale:"); - NSRange _objc_msgSend_27( + late final _sel_indexesOfObjectsAtIndexes_options_passingTest_1 = + _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); + ffi.Pointer _objc_msgSend_140( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - NSRange rangeOfReceiverToSearch, - ffi.Pointer locale, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_27( + return __objc_msgSend_140( obj, sel, - searchString, - mask, - rangeOfReceiverToSearch, - locale, + s, + opts, + predicate, ); } - late final __objc_msgSend_27Ptr = _lookup< + late final __objc_msgSend_140Ptr = _lookup< ffi.NativeFunction< - NSRange Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32, - NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange, ffi.Pointer)>(); + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_ObjCBlock>)>(); - late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); - late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); - ffi.Pointer _objc_msgSend_28( + late final _sel_sortedArrayUsingComparator_1 = + _registerName1("sortedArrayUsingComparator:"); + ffi.Pointer _objc_msgSend_141( ffi.Pointer obj, ffi.Pointer sel, + NSComparator cmptr, ) { - return __objc_msgSend_28( + return __objc_msgSend_141( obj, sel, + cmptr, ); } - late final __objc_msgSend_28Ptr = _lookup< + late final __objc_msgSend_141Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer, NSComparator)>(); - late final _sel_whitespaceCharacterSet1 = - _registerName1("whitespaceCharacterSet"); - late final _sel_whitespaceAndNewlineCharacterSet1 = - _registerName1("whitespaceAndNewlineCharacterSet"); - late final _sel_decimalDigitCharacterSet1 = - _registerName1("decimalDigitCharacterSet"); - late final _sel_letterCharacterSet1 = _registerName1("letterCharacterSet"); - late final _sel_lowercaseLetterCharacterSet1 = - _registerName1("lowercaseLetterCharacterSet"); - late final _sel_uppercaseLetterCharacterSet1 = - _registerName1("uppercaseLetterCharacterSet"); - late final _sel_nonBaseCharacterSet1 = _registerName1("nonBaseCharacterSet"); - late final _sel_alphanumericCharacterSet1 = - _registerName1("alphanumericCharacterSet"); - late final _sel_decomposableCharacterSet1 = - _registerName1("decomposableCharacterSet"); - late final _sel_illegalCharacterSet1 = _registerName1("illegalCharacterSet"); - late final _sel_punctuationCharacterSet1 = - _registerName1("punctuationCharacterSet"); - late final _sel_capitalizedLetterCharacterSet1 = - _registerName1("capitalizedLetterCharacterSet"); - late final _sel_symbolCharacterSet1 = _registerName1("symbolCharacterSet"); - late final _sel_newlineCharacterSet1 = _registerName1("newlineCharacterSet"); - late final _sel_characterSetWithRange_1 = - _registerName1("characterSetWithRange:"); - ffi.Pointer _objc_msgSend_29( + late final _sel_sortedArrayWithOptions_usingComparator_1 = + _registerName1("sortedArrayWithOptions:usingComparator:"); + ffi.Pointer _objc_msgSend_142( ffi.Pointer obj, ffi.Pointer sel, - NSRange aRange, + int opts, + NSComparator cmptr, ) { - return __objc_msgSend_29( + return __objc_msgSend_142( obj, sel, - aRange, + opts, + cmptr, ); } - late final __objc_msgSend_29Ptr = _lookup< + late final __objc_msgSend_142Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< + ffi.Pointer, ffi.Int32, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer, ffi.Pointer, int, NSComparator)>(); - late final _sel_characterSetWithCharactersInString_1 = - _registerName1("characterSetWithCharactersInString:"); - ffi.Pointer _objc_msgSend_30( + late final _sel_indexOfObject_inSortedRange_options_usingComparator_1 = + _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); + int _objc_msgSend_143( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aString, + ffi.Pointer obj1, + NSRange r, + int opts, + NSComparator cmp, ) { - return __objc_msgSend_30( + return __objc_msgSend_143( obj, sel, - aString, + obj1, + r, + opts, + cmp, ); } - late final __objc_msgSend_30Ptr = _lookup< + late final __objc_msgSend_143Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange, + ffi.Int32, + NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange, int, NSComparator)>(); - late final _class_NSData1 = _getClass1("NSData"); - late final _sel_bytes1 = _registerName1("bytes"); - ffi.Pointer _objc_msgSend_31( + late final _sel_array1 = _registerName1("array"); + late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); + late final _sel_arrayWithObjects_count_1 = + _registerName1("arrayWithObjects:count:"); + late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); + late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); + late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); + late final _sel_initWithArray_1 = _registerName1("initWithArray:"); + late final _sel_initWithArray_copyItems_1 = + _registerName1("initWithArray:copyItems:"); + instancetype _objc_msgSend_144( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer array, + bool flag, ) { - return __objc_msgSend_31( + return __objc_msgSend_144( obj, sel, + array, + flag, ); } - late final __objc_msgSend_31Ptr = _lookup< + late final __objc_msgSend_144Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_description1 = _registerName1("description"); - ffi.Pointer _objc_msgSend_32( + late final _sel_initWithContentsOfURL_error_1 = + _registerName1("initWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_145( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer> error, ) { - return __objc_msgSend_32( + return __objc_msgSend_145( obj, sel, + url, + error, ); } - late final __objc_msgSend_32Ptr = _lookup< + late final __objc_msgSend_145Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_getBytes_length_1 = _registerName1("getBytes:length:"); - void _objc_msgSend_33( + late final _sel_arrayWithContentsOfURL_error_1 = + _registerName1("arrayWithContentsOfURL:error:"); + late final _class_NSOrderedCollectionDifference1 = + _getClass1("NSOrderedCollectionDifference"); + late final _sel_initWithChanges_1 = _registerName1("initWithChanges:"); + late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1 = + _registerName1( + "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:"); + instancetype _objc_msgSend_146( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, - int length, + ffi.Pointer inserts, + ffi.Pointer insertedObjects, + ffi.Pointer removes, + ffi.Pointer removedObjects, + ffi.Pointer changes, ) { - return __objc_msgSend_33( + return __objc_msgSend_146( obj, sel, - buffer, - length, + inserts, + insertedObjects, + removes, + removedObjects, + changes, ); } - late final __objc_msgSend_33Ptr = _lookup< + late final __objc_msgSend_146Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_getBytes_range_1 = _registerName1("getBytes:range:"); - void _objc_msgSend_34( + late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1 = + _registerName1( + "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:"); + instancetype _objc_msgSend_147( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, - NSRange range, + ffi.Pointer inserts, + ffi.Pointer insertedObjects, + ffi.Pointer removes, + ffi.Pointer removedObjects, ) { - return __objc_msgSend_34( + return __objc_msgSend_147( obj, sel, - buffer, - range, + inserts, + insertedObjects, + removes, + removedObjects, ); } - late final __objc_msgSend_34Ptr = _lookup< + late final __objc_msgSend_147Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); - bool _objc_msgSend_35( + late final _sel_insertions1 = _registerName1("insertions"); + late final _sel_removals1 = _registerName1("removals"); + late final _sel_hasChanges1 = _registerName1("hasChanges"); + late final _class_NSOrderedCollectionChange1 = + _getClass1("NSOrderedCollectionChange"); + late final _sel_changeWithObject_type_index_1 = + _registerName1("changeWithObject:type:index:"); + ffi.Pointer _objc_msgSend_148( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, + ffi.Pointer anObject, + int type, + int index, ) { - return __objc_msgSend_35( + return __objc_msgSend_148( obj, sel, - other, + anObject, + type, + index, ); } - late final __objc_msgSend_35Ptr = _lookup< + late final __objc_msgSend_148Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); - late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); - ffi.Pointer _objc_msgSend_36( + late final _sel_changeWithObject_type_index_associatedIndex_1 = + _registerName1("changeWithObject:type:index:associatedIndex:"); + ffi.Pointer _objc_msgSend_149( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + ffi.Pointer anObject, + int type, + int index, + int associatedIndex, ) { - return __objc_msgSend_36( + return __objc_msgSend_149( obj, sel, - range, + anObject, + type, + index, + associatedIndex, ); } - late final __objc_msgSend_36Ptr = _lookup< + late final __objc_msgSend_149Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSUInteger, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int, int)>(); - late final _sel_writeToFile_atomically_1 = - _registerName1("writeToFile:atomically:"); - bool _objc_msgSend_37( + late final _sel_object1 = _registerName1("object"); + late final _sel_changeType1 = _registerName1("changeType"); + int _objc_msgSend_150( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - bool useAuxiliaryFile, ) { - return __objc_msgSend_37( + return __objc_msgSend_150( obj, sel, - path, - useAuxiliaryFile, ); } - late final __objc_msgSend_37Ptr = _lookup< + late final __objc_msgSend_150Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _class_NSURL1 = _getClass1("NSURL"); - late final _sel_initWithScheme_host_path_1 = - _registerName1("initWithScheme:host:path:"); - instancetype _objc_msgSend_38( + late final _sel_index1 = _registerName1("index"); + late final _sel_associatedIndex1 = _registerName1("associatedIndex"); + late final _sel_initWithObject_type_index_1 = + _registerName1("initWithObject:type:index:"); + instancetype _objc_msgSend_151( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer scheme, - ffi.Pointer host, - ffi.Pointer path, + ffi.Pointer anObject, + int type, + int index, ) { - return __objc_msgSend_38( + return __objc_msgSend_151( obj, sel, - scheme, - host, - path, + anObject, + type, + index, ); } - late final __objc_msgSend_38Ptr = _lookup< + late final __objc_msgSend_151Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_38 = __objc_msgSend_38Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = - _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_39( + late final _sel_initWithObject_type_index_associatedIndex_1 = + _registerName1("initWithObject:type:index:associatedIndex:"); + instancetype _objc_msgSend_152( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, + ffi.Pointer anObject, + int type, + int index, + int associatedIndex, ) { - return __objc_msgSend_39( + return __objc_msgSend_152( obj, sel, - path, - isDir, - baseURL, + anObject, + type, + index, + associatedIndex, ); } - late final __objc_msgSend_39Ptr = _lookup< + late final __objc_msgSend_152Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< + ffi.Int32, + NSUInteger, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, ffi.Pointer)>(); + ffi.Pointer, int, int, int)>(); - late final _sel_initFileURLWithPath_relativeToURL_1 = - _registerName1("initFileURLWithPath:relativeToURL:"); - instancetype _objc_msgSend_40( + late final _sel_differenceByTransformingChangesWithBlock_1 = + _registerName1("differenceByTransformingChangesWithBlock:"); + ffi.Pointer _objc_msgSend_153( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer baseURL, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_40( + return __objc_msgSend_153( obj, sel, - path, - baseURL, + block, ); } - late final __objc_msgSend_40Ptr = _lookup< + late final __objc_msgSend_153Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_inverseDifference1 = _registerName1("inverseDifference"); + late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = + _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); + ffi.Pointer _objc_msgSend_154( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, + int options, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_154( + obj, + sel, + other, + options, + block, + ); + } + + late final __objc_msgSend_154Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initFileURLWithPath_isDirectory_1 = - _registerName1("initFileURLWithPath:isDirectory:"); - instancetype _objc_msgSend_41( + late final _sel_differenceFromArray_withOptions_1 = + _registerName1("differenceFromArray:withOptions:"); + ffi.Pointer _objc_msgSend_155( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - bool isDir, + ffi.Pointer other, + int options, ) { - return __objc_msgSend_41( + return __objc_msgSend_155( obj, sel, - path, - isDir, + other, + options, ); } - late final __objc_msgSend_41Ptr = _lookup< + late final __objc_msgSend_155Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_initFileURLWithPath_1 = - _registerName1("initFileURLWithPath:"); - instancetype _objc_msgSend_42( + late final _sel_differenceFromArray_1 = + _registerName1("differenceFromArray:"); + ffi.Pointer _objc_msgSend_156( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer other, ) { - return __objc_msgSend_42( + return __objc_msgSend_156( obj, sel, - path, + other, ); } - late final __objc_msgSend_42Ptr = _lookup< + late final __objc_msgSend_156Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_fileURLWithPath_isDirectory_relativeToURL_1 = - _registerName1("fileURLWithPath:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_43( + late final _sel_arrayByApplyingDifference_1 = + _registerName1("arrayByApplyingDifference:"); + ffi.Pointer _objc_msgSend_157( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, + ffi.Pointer difference, ) { - return __objc_msgSend_43( + return __objc_msgSend_157( obj, sel, - path, - isDir, - baseURL, + difference, ); } - late final __objc_msgSend_43Ptr = _lookup< + late final __objc_msgSend_157Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_fileURLWithPath_relativeToURL_1 = - _registerName1("fileURLWithPath:relativeToURL:"); - ffi.Pointer _objc_msgSend_44( + late final _sel_getObjects_1 = _registerName1("getObjects:"); + void _objc_msgSend_158( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer baseURL, + ffi.Pointer> objects, ) { - return __objc_msgSend_44( + return __objc_msgSend_158( obj, sel, - path, - baseURL, + objects, ); } - late final __objc_msgSend_44Ptr = _lookup< + late final __objc_msgSend_158Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_fileURLWithPath_isDirectory_1 = - _registerName1("fileURLWithPath:isDirectory:"); - ffi.Pointer _objc_msgSend_45( + late final _sel_arrayWithContentsOfFile_1 = + _registerName1("arrayWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_159( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, - bool isDir, ) { - return __objc_msgSend_45( + return __objc_msgSend_159( obj, sel, path, - isDir, ); } - late final __objc_msgSend_45Ptr = _lookup< + late final __objc_msgSend_159Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); - ffi.Pointer _objc_msgSend_46( + late final _sel_arrayWithContentsOfURL_1 = + _registerName1("arrayWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_160( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer url, ) { - return __objc_msgSend_46( + return __objc_msgSend_160( obj, sel, - path, + url, ); } - late final __objc_msgSend_46Ptr = _lookup< + late final __objc_msgSend_160Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< + late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = - _registerName1( - "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_47( + late final _sel_initWithContentsOfFile_1 = + _registerName1("initWithContentsOfFile:"); + late final _sel_initWithContentsOfURL_1 = + _registerName1("initWithContentsOfURL:"); + late final _sel_writeToURL_atomically_1 = + _registerName1("writeToURL:atomically:"); + bool _objc_msgSend_161( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, + ffi.Pointer url, + bool atomically, ) { - return __objc_msgSend_47( + return __objc_msgSend_161( obj, sel, - path, - isDir, - baseURL, + url, + atomically, ); } - late final __objc_msgSend_47Ptr = _lookup< + late final __objc_msgSend_161Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = - _registerName1( - "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_48( + late final _sel_allKeys1 = _registerName1("allKeys"); + ffi.Pointer _objc_msgSend_162( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, ) { - return __objc_msgSend_48( + return __objc_msgSend_162( obj, sel, - path, - isDir, - baseURL, ); } - late final __objc_msgSend_48Ptr = _lookup< + late final __objc_msgSend_162Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithString_1 = _registerName1("initWithString:"); - late final _sel_initWithString_relativeToURL_1 = - _registerName1("initWithString:relativeToURL:"); - late final _sel_URLWithString_1 = _registerName1("URLWithString:"); - late final _sel_URLWithString_relativeToURL_1 = - _registerName1("URLWithString:relativeToURL:"); - late final _sel_initWithDataRepresentation_relativeToURL_1 = - _registerName1("initWithDataRepresentation:relativeToURL:"); - instancetype _objc_msgSend_49( + late final _sel_allKeysForObject_1 = _registerName1("allKeysForObject:"); + late final _sel_allValues1 = _registerName1("allValues"); + late final _sel_descriptionInStringsFileFormat1 = + _registerName1("descriptionInStringsFileFormat"); + late final _sel_isEqualToDictionary_1 = + _registerName1("isEqualToDictionary:"); + bool _objc_msgSend_163( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer baseURL, + ffi.Pointer otherDictionary, ) { - return __objc_msgSend_49( + return __objc_msgSend_163( obj, sel, - data, - baseURL, + otherDictionary, ); } - late final __objc_msgSend_49Ptr = _lookup< + late final __objc_msgSend_163Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_URLWithDataRepresentation_relativeToURL_1 = - _registerName1("URLWithDataRepresentation:relativeToURL:"); - ffi.Pointer _objc_msgSend_50( + late final _sel_objectsForKeys_notFoundMarker_1 = + _registerName1("objectsForKeys:notFoundMarker:"); + ffi.Pointer _objc_msgSend_164( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer baseURL, + ffi.Pointer keys, + ffi.Pointer marker, ) { - return __objc_msgSend_50( + return __objc_msgSend_164( obj, sel, - data, - baseURL, + keys, + marker, ); } - late final __objc_msgSend_50Ptr = _lookup< + late final __objc_msgSend_164Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< + late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1 = - _registerName1("initAbsoluteURLWithDataRepresentation:relativeToURL:"); - late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = - _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); - late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); - ffi.Pointer _objc_msgSend_51( + late final _sel_keysSortedByValueUsingSelector_1 = + _registerName1("keysSortedByValueUsingSelector:"); + late final _sel_getObjects_andKeys_count_1 = + _registerName1("getObjects:andKeys:count:"); + void _objc_msgSend_165( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer> objects, + ffi.Pointer> keys, + int count, ) { - return __objc_msgSend_51( + return __objc_msgSend_165( obj, sel, + objects, + keys, + count, ); } - late final __objc_msgSend_51Ptr = _lookup< + late final __objc_msgSend_165Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); - late final _sel_absoluteString1 = _registerName1("absoluteString"); - late final _sel_relativeString1 = _registerName1("relativeString"); - late final _sel_baseURL1 = _registerName1("baseURL"); - ffi.Pointer _objc_msgSend_52( + late final _sel_objectForKeyedSubscript_1 = + _registerName1("objectForKeyedSubscript:"); + late final _sel_enumerateKeysAndObjectsUsingBlock_1 = + _registerName1("enumerateKeysAndObjectsUsingBlock:"); + void _objc_msgSend_166( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_52( + return __objc_msgSend_166( obj, sel, + block, ); } - late final __objc_msgSend_52Ptr = _lookup< + late final __objc_msgSend_166Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_absoluteURL1 = _registerName1("absoluteURL"); - late final _sel_scheme1 = _registerName1("scheme"); - late final _sel_resourceSpecifier1 = _registerName1("resourceSpecifier"); - late final _sel_host1 = _registerName1("host"); - late final _class_NSNumber1 = _getClass1("NSNumber"); - late final _class_NSValue1 = _getClass1("NSValue"); - late final _sel_getValue_size_1 = _registerName1("getValue:size:"); - late final _sel_objCType1 = _registerName1("objCType"); - ffi.Pointer _objc_msgSend_53( + late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = + _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); + void _objc_msgSend_167( ffi.Pointer obj, ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_53( + return __objc_msgSend_167( obj, sel, + opts, + block, ); } - late final __objc_msgSend_53Ptr = _lookup< + late final __objc_msgSend_167Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithBytes_objCType_1 = - _registerName1("initWithBytes:objCType:"); - instancetype _objc_msgSend_54( + late final _sel_keysSortedByValueUsingComparator_1 = + _registerName1("keysSortedByValueUsingComparator:"); + late final _sel_keysSortedByValueWithOptions_usingComparator_1 = + _registerName1("keysSortedByValueWithOptions:usingComparator:"); + late final _sel_keysOfEntriesPassingTest_1 = + _registerName1("keysOfEntriesPassingTest:"); + ffi.Pointer _objc_msgSend_168( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer type, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_54( + return __objc_msgSend_168( obj, sel, - value, - type, + predicate, ); } - late final __objc_msgSend_54Ptr = _lookup< + late final __objc_msgSend_168Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_valueWithBytes_objCType_1 = - _registerName1("valueWithBytes:objCType:"); - ffi.Pointer _objc_msgSend_55( + late final _sel_keysOfEntriesWithOptions_passingTest_1 = + _registerName1("keysOfEntriesWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_169( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer type, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_55( + return __objc_msgSend_169( obj, sel, - value, - type, + opts, + predicate, ); } - late final __objc_msgSend_55Ptr = _lookup< + late final __objc_msgSend_169Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< - ffi.Pointer Function( + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); + void _objc_msgSend_170( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ffi.Pointer> keys, + ) { + return __objc_msgSend_170( + obj, + sel, + objects, + keys, + ); + } + + late final __objc_msgSend_170Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< + void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_value_withObjCType_1 = _registerName1("value:withObjCType:"); - late final _sel_valueWithNonretainedObject_1 = - _registerName1("valueWithNonretainedObject:"); - ffi.Pointer _objc_msgSend_56( + late final _sel_dictionaryWithContentsOfFile_1 = + _registerName1("dictionaryWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_171( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, + ffi.Pointer path, ) { - return __objc_msgSend_56( + return __objc_msgSend_171( obj, sel, - anObject, + path, ); } - late final __objc_msgSend_56Ptr = _lookup< + late final __objc_msgSend_171Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< + late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_nonretainedObjectValue1 = - _registerName1("nonretainedObjectValue"); - late final _sel_valueWithPointer_1 = _registerName1("valueWithPointer:"); - ffi.Pointer _objc_msgSend_57( + late final _sel_dictionaryWithContentsOfURL_1 = + _registerName1("dictionaryWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_172( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer pointer, + ffi.Pointer url, ) { - return __objc_msgSend_57( + return __objc_msgSend_172( obj, sel, - pointer, + url, ); } - late final __objc_msgSend_57Ptr = _lookup< + late final __objc_msgSend_172Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_pointerValue1 = _registerName1("pointerValue"); - late final _sel_isEqualToValue_1 = _registerName1("isEqualToValue:"); - bool _objc_msgSend_58( + late final _sel_dictionary1 = _registerName1("dictionary"); + late final _sel_dictionaryWithObject_forKey_1 = + _registerName1("dictionaryWithObject:forKey:"); + instancetype _objc_msgSend_173( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer object, + ffi.Pointer key, ) { - return __objc_msgSend_58( + return __objc_msgSend_173( obj, sel, - value, + object, + key, ); } - late final __objc_msgSend_58Ptr = _lookup< + late final __objc_msgSend_173Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_getValue_1 = _registerName1("getValue:"); - void _objc_msgSend_59( + late final _sel_dictionaryWithObjects_forKeys_count_1 = + _registerName1("dictionaryWithObjects:forKeys:count:"); + late final _sel_dictionaryWithObjectsAndKeys_1 = + _registerName1("dictionaryWithObjectsAndKeys:"); + late final _sel_dictionaryWithDictionary_1 = + _registerName1("dictionaryWithDictionary:"); + instancetype _objc_msgSend_174( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer dict, ) { - return __objc_msgSend_59( + return __objc_msgSend_174( obj, sel, - value, + dict, ); } - late final __objc_msgSend_59Ptr = _lookup< + late final __objc_msgSend_174Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); - ffi.Pointer _objc_msgSend_60( + late final _sel_dictionaryWithObjects_forKeys_1 = + _registerName1("dictionaryWithObjects:forKeys:"); + instancetype _objc_msgSend_175( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + ffi.Pointer objects, + ffi.Pointer keys, ) { - return __objc_msgSend_60( + return __objc_msgSend_175( obj, sel, - range, + objects, + keys, ); } - late final __objc_msgSend_60Ptr = _lookup< + late final __objc_msgSend_175Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_rangeValue1 = _registerName1("rangeValue"); - NSRange _objc_msgSend_61( + late final _sel_initWithObjectsAndKeys_1 = + _registerName1("initWithObjectsAndKeys:"); + late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); + late final _sel_initWithDictionary_copyItems_1 = + _registerName1("initWithDictionary:copyItems:"); + instancetype _objc_msgSend_176( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer otherDictionary, + bool flag, ) { - return __objc_msgSend_61( + return __objc_msgSend_176( obj, sel, + otherDictionary, + flag, ); } - late final __objc_msgSend_61Ptr = _lookup< + late final __objc_msgSend_176Ptr = _lookup< ffi.NativeFunction< - NSRange Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_initWithChar_1 = _registerName1("initWithChar:"); - ffi.Pointer _objc_msgSend_62( + late final _sel_initWithObjects_forKeys_1 = + _registerName1("initWithObjects:forKeys:"); + ffi.Pointer _objc_msgSend_177( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer url, + ffi.Pointer> error, ) { - return __objc_msgSend_62( + return __objc_msgSend_177( obj, sel, - value, + url, + error, ); } - late final __objc_msgSend_62Ptr = _lookup< + late final __objc_msgSend_177Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Char)>>('objc_msgSend'); - late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_initWithUnsignedChar_1 = - _registerName1("initWithUnsignedChar:"); - ffi.Pointer _objc_msgSend_63( + late final _sel_dictionaryWithContentsOfURL_error_1 = + _registerName1("dictionaryWithContentsOfURL:error:"); + late final _sel_sharedKeySetForKeys_1 = + _registerName1("sharedKeySetForKeys:"); + late final _sel_countByEnumeratingWithState_objects_count_1 = + _registerName1("countByEnumeratingWithState:objects:count:"); + int _objc_msgSend_178( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer state, + ffi.Pointer> buffer, + int len, ) { - return __objc_msgSend_63( + return __objc_msgSend_178( obj, sel, - value, + state, + buffer, + len, ); } - late final __objc_msgSend_63Ptr = _lookup< + late final __objc_msgSend_178Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); - late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); - late final _sel_initWithShort_1 = _registerName1("initWithShort:"); - ffi.Pointer _objc_msgSend_64( + late final _sel_initWithDomain_code_userInfo_1 = + _registerName1("initWithDomain:code:userInfo:"); + instancetype _objc_msgSend_179( ffi.Pointer obj, ffi.Pointer sel, - int value, + NSErrorDomain domain, + int code, + ffi.Pointer dict, ) { - return __objc_msgSend_64( + return __objc_msgSend_179( obj, sel, - value, + domain, + code, + dict, ); } - late final __objc_msgSend_64Ptr = _lookup< + late final __objc_msgSend_179Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Short)>>('objc_msgSend'); - late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSErrorDomain, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, int, ffi.Pointer)>(); - late final _sel_initWithUnsignedShort_1 = - _registerName1("initWithUnsignedShort:"); - ffi.Pointer _objc_msgSend_65( + late final _sel_errorWithDomain_code_userInfo_1 = + _registerName1("errorWithDomain:code:userInfo:"); + late final _sel_domain1 = _registerName1("domain"); + late final _sel_code1 = _registerName1("code"); + late final _sel_userInfo1 = _registerName1("userInfo"); + ffi.Pointer _objc_msgSend_180( ffi.Pointer obj, ffi.Pointer sel, - int value, ) { - return __objc_msgSend_65( + return __objc_msgSend_180( obj, sel, - value, ); } - late final __objc_msgSend_65Ptr = _lookup< + late final __objc_msgSend_180Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); - late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithInt_1 = _registerName1("initWithInt:"); - ffi.Pointer _objc_msgSend_66( + late final _sel_localizedDescription1 = + _registerName1("localizedDescription"); + late final _sel_localizedFailureReason1 = + _registerName1("localizedFailureReason"); + late final _sel_localizedRecoverySuggestion1 = + _registerName1("localizedRecoverySuggestion"); + late final _sel_localizedRecoveryOptions1 = + _registerName1("localizedRecoveryOptions"); + late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); + late final _sel_helpAnchor1 = _registerName1("helpAnchor"); + late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); + late final _sel_setUserInfoValueProviderForDomain_provider_1 = + _registerName1("setUserInfoValueProviderForDomain:provider:"); + void _objc_msgSend_181( ffi.Pointer obj, ffi.Pointer sel, - int value, + NSErrorDomain errorDomain, + ffi.Pointer<_ObjCBlock> provider, ) { - return __objc_msgSend_66( + return __objc_msgSend_181( obj, sel, - value, + errorDomain, + provider, ); } - late final __objc_msgSend_66Ptr = _lookup< + late final __objc_msgSend_181Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithUnsignedInt_1 = - _registerName1("initWithUnsignedInt:"); - ffi.Pointer _objc_msgSend_67( + late final _sel_userInfoValueProviderForDomain_1 = + _registerName1("userInfoValueProviderForDomain:"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_182( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer err, + NSErrorUserInfoKey userInfoKey, + NSErrorDomain errorDomain, ) { - return __objc_msgSend_67( + return __objc_msgSend_182( obj, sel, - value, + err, + userInfoKey, + errorDomain, ); } - late final __objc_msgSend_67Ptr = _lookup< + late final __objc_msgSend_182Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSErrorUserInfoKey, + NSErrorDomain)>>('objc_msgSend'); + late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSErrorUserInfoKey, + NSErrorDomain)>(); - late final _sel_initWithLong_1 = _registerName1("initWithLong:"); - ffi.Pointer _objc_msgSend_68( + late final _sel_checkResourceIsReachableAndReturnError_1 = + _registerName1("checkResourceIsReachableAndReturnError:"); + bool _objc_msgSend_183( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer> error, ) { - return __objc_msgSend_68( + return __objc_msgSend_183( obj, sel, - value, + error, ); } - late final __objc_msgSend_68Ptr = _lookup< + late final __objc_msgSend_183Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_initWithUnsignedLong_1 = - _registerName1("initWithUnsignedLong:"); - ffi.Pointer _objc_msgSend_69( + late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); + late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); + late final _sel_filePathURL1 = _registerName1("filePathURL"); + late final _sel_getResourceValue_forKey_error_1 = + _registerName1("getResourceValue:forKey:error:"); + bool _objc_msgSend_184( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error, ) { - return __objc_msgSend_69( + return __objc_msgSend_184( obj, sel, value, + key, + error, ); } - late final __objc_msgSend_69Ptr = _lookup< + late final __objc_msgSend_184Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSURLResourceKey, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSURLResourceKey, + ffi.Pointer>)>(); - late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); - ffi.Pointer _objc_msgSend_70( + late final _sel_resourceValuesForKeys_error_1 = + _registerName1("resourceValuesForKeys:error:"); + ffi.Pointer _objc_msgSend_185( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer keys, + ffi.Pointer> error, ) { - return __objc_msgSend_70( + return __objc_msgSend_185( obj, sel, - value, + keys, + error, ); } - late final __objc_msgSend_70Ptr = _lookup< + late final __objc_msgSend_185Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); - late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_initWithUnsignedLongLong_1 = - _registerName1("initWithUnsignedLongLong:"); - ffi.Pointer _objc_msgSend_71( + late final _sel_setResourceValue_forKey_error_1 = + _registerName1("setResourceValue:forKey:error:"); + bool _objc_msgSend_186( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer value, + NSURLResourceKey key, + ffi.Pointer> error, ) { - return __objc_msgSend_71( + return __objc_msgSend_186( obj, sel, value, + key, + error, ); } - late final __objc_msgSend_71Ptr = _lookup< + late final __objc_msgSend_186Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); - late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLResourceKey, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLResourceKey, + ffi.Pointer>)>(); - late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); - ffi.Pointer _objc_msgSend_72( + late final _sel_setResourceValues_error_1 = + _registerName1("setResourceValues:error:"); + bool _objc_msgSend_187( ffi.Pointer obj, ffi.Pointer sel, - double value, + ffi.Pointer keyedValues, + ffi.Pointer> error, ) { - return __objc_msgSend_72( + return __objc_msgSend_187( obj, sel, - value, + keyedValues, + error, ); } - late final __objc_msgSend_72Ptr = _lookup< + late final __objc_msgSend_187Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); - ffi.Pointer _objc_msgSend_73( + late final _sel_removeCachedResourceValueForKey_1 = + _registerName1("removeCachedResourceValueForKey:"); + void _objc_msgSend_188( ffi.Pointer obj, ffi.Pointer sel, - double value, + NSURLResourceKey key, ) { - return __objc_msgSend_73( + return __objc_msgSend_188( obj, sel, - value, + key, ); } - late final __objc_msgSend_73Ptr = _lookup< + late final __objc_msgSend_188Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSURLResourceKey)>>('objc_msgSend'); + late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, NSURLResourceKey)>(); - late final _sel_initWithBool_1 = _registerName1("initWithBool:"); - ffi.Pointer _objc_msgSend_74( + late final _sel_removeAllCachedResourceValues1 = + _registerName1("removeAllCachedResourceValues"); + late final _sel_setTemporaryResourceValue_forKey_1 = + _registerName1("setTemporaryResourceValue:forKey:"); + void _objc_msgSend_189( ffi.Pointer obj, ffi.Pointer sel, - bool value, + ffi.Pointer value, + NSURLResourceKey key, ) { - return __objc_msgSend_74( + return __objc_msgSend_189( obj, sel, value, + key, ); } - late final __objc_msgSend_74Ptr = _lookup< + late final __objc_msgSend_189Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSURLResourceKey)>>('objc_msgSend'); + late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSURLResourceKey)>(); - late final _sel_initWithInteger_1 = _registerName1("initWithInteger:"); - late final _sel_initWithUnsignedInteger_1 = - _registerName1("initWithUnsignedInteger:"); - late final _sel_charValue1 = _registerName1("charValue"); - int _objc_msgSend_75( + late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = + _registerName1( + "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); + ffi.Pointer _objc_msgSend_190( ffi.Pointer obj, ffi.Pointer sel, + int options, + ffi.Pointer keys, + ffi.Pointer relativeURL, + ffi.Pointer> error, ) { - return __objc_msgSend_75( + return __objc_msgSend_190( obj, sel, + options, + keys, + relativeURL, + error, ); } - late final __objc_msgSend_75Ptr = _lookup< + late final __objc_msgSend_190Ptr = _lookup< ffi.NativeFunction< - ffi.Char Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); - int _objc_msgSend_76( + late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = + _registerName1( + "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); + instancetype _objc_msgSend_191( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer bookmarkData, + int options, + ffi.Pointer relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error, ) { - return __objc_msgSend_76( + return __objc_msgSend_191( obj, sel, + bookmarkData, + options, + relativeURL, + isStale, + error, ); } - late final __objc_msgSend_76Ptr = _lookup< + late final __objc_msgSend_191Ptr = _lookup< ffi.NativeFunction< - ffi.UnsignedChar Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_shortValue1 = _registerName1("shortValue"); - int _objc_msgSend_77( + late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = + _registerName1( + "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); + late final _sel_resourceValuesForKeys_fromBookmarkData_1 = + _registerName1("resourceValuesForKeys:fromBookmarkData:"); + ffi.Pointer _objc_msgSend_192( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer bookmarkData, ) { - return __objc_msgSend_77( + return __objc_msgSend_192( obj, sel, + keys, + bookmarkData, ); } - late final __objc_msgSend_77Ptr = _lookup< + late final __objc_msgSend_192Ptr = _lookup< ffi.NativeFunction< - ffi.Short Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); - int _objc_msgSend_78( + late final _sel_writeBookmarkData_toURL_options_error_1 = + _registerName1("writeBookmarkData:toURL:options:error:"); + bool _objc_msgSend_193( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer bookmarkData, + ffi.Pointer bookmarkFileURL, + int options, + ffi.Pointer> error, ) { - return __objc_msgSend_78( + return __objc_msgSend_193( obj, sel, + bookmarkData, + bookmarkFileURL, + options, + error, ); } - late final __objc_msgSend_78Ptr = _lookup< + late final __objc_msgSend_193Ptr = _lookup< ffi.NativeFunction< - ffi.UnsignedShort Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLBookmarkFileCreationOptions, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_intValue1 = _registerName1("intValue"); - int _objc_msgSend_79( + late final _sel_bookmarkDataWithContentsOfURL_error_1 = + _registerName1("bookmarkDataWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_194( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer bookmarkFileURL, + ffi.Pointer> error, ) { - return __objc_msgSend_79( + return __objc_msgSend_194( obj, sel, + bookmarkFileURL, + error, ); } - late final __objc_msgSend_79Ptr = _lookup< + late final __objc_msgSend_194Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); - int _objc_msgSend_80( + late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = + _registerName1("URLByResolvingAliasFileAtURL:options:error:"); + instancetype _objc_msgSend_195( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer url, + int options, + ffi.Pointer> error, ) { - return __objc_msgSend_80( + return __objc_msgSend_195( obj, sel, + url, + options, + error, ); } - late final __objc_msgSend_80Ptr = _lookup< + late final __objc_msgSend_195Ptr = _lookup< ffi.NativeFunction< - ffi.UnsignedInt Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_longValue1 = _registerName1("longValue"); - int _objc_msgSend_81( + late final _sel_startAccessingSecurityScopedResource1 = + _registerName1("startAccessingSecurityScopedResource"); + late final _sel_stopAccessingSecurityScopedResource1 = + _registerName1("stopAccessingSecurityScopedResource"); + late final _sel_getPromisedItemResourceValue_forKey_error_1 = + _registerName1("getPromisedItemResourceValue:forKey:error:"); + late final _sel_promisedItemResourceValuesForKeys_error_1 = + _registerName1("promisedItemResourceValuesForKeys:error:"); + late final _sel_checkPromisedItemIsReachableAndReturnError_1 = + _registerName1("checkPromisedItemIsReachableAndReturnError:"); + late final _sel_fileURLWithPathComponents_1 = + _registerName1("fileURLWithPathComponents:"); + ffi.Pointer _objc_msgSend_196( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer components, ) { - return __objc_msgSend_81( + return __objc_msgSend_196( obj, sel, + components, ); } - late final __objc_msgSend_81Ptr = _lookup< + late final __objc_msgSend_196Ptr = _lookup< ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); - late final _sel_longLongValue1 = _registerName1("longLongValue"); - int _objc_msgSend_82( + late final _sel_pathComponents1 = _registerName1("pathComponents"); + late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); + late final _sel_pathExtension1 = _registerName1("pathExtension"); + late final _sel_URLByAppendingPathComponent_1 = + _registerName1("URLByAppendingPathComponent:"); + late final _sel_URLByAppendingPathComponent_isDirectory_1 = + _registerName1("URLByAppendingPathComponent:isDirectory:"); + late final _sel_URLByDeletingLastPathComponent1 = + _registerName1("URLByDeletingLastPathComponent"); + late final _sel_URLByAppendingPathExtension_1 = + _registerName1("URLByAppendingPathExtension:"); + late final _sel_URLByDeletingPathExtension1 = + _registerName1("URLByDeletingPathExtension"); + late final _sel_URLByStandardizingPath1 = + _registerName1("URLByStandardizingPath"); + late final _sel_URLByResolvingSymlinksInPath1 = + _registerName1("URLByResolvingSymlinksInPath"); + late final _sel_resourceDataUsingCache_1 = + _registerName1("resourceDataUsingCache:"); + ffi.Pointer _objc_msgSend_197( ffi.Pointer obj, ffi.Pointer sel, + bool shouldUseCache, ) { - return __objc_msgSend_82( + return __objc_msgSend_197( obj, sel, + shouldUseCache, ); } - late final __objc_msgSend_82Ptr = _lookup< + late final __objc_msgSend_197Ptr = _lookup< ffi.NativeFunction< - ffi.LongLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); - late final _sel_unsignedLongLongValue1 = - _registerName1("unsignedLongLongValue"); - int _objc_msgSend_83( + late final _sel_loadResourceDataNotifyingClient_usingCache_1 = + _registerName1("loadResourceDataNotifyingClient:usingCache:"); + void _objc_msgSend_198( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer client, + bool shouldUseCache, ) { - return __objc_msgSend_83( + return __objc_msgSend_198( obj, sel, + client, + shouldUseCache, ); } - late final __objc_msgSend_83Ptr = _lookup< + late final __objc_msgSend_198Ptr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_floatValue1 = _registerName1("floatValue"); - double _objc_msgSend_84( + late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); + late final _sel_setResourceData_1 = _registerName1("setResourceData:"); + late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); + bool _objc_msgSend_199( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer property, + ffi.Pointer propertyKey, ) { - return __objc_msgSend_84( + return __objc_msgSend_199( obj, sel, + property, + propertyKey, ); } - late final __objc_msgSend_84Ptr = _lookup< + late final __objc_msgSend_199Ptr = _lookup< ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_doubleValue1 = _registerName1("doubleValue"); - double _objc_msgSend_85( + late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); + late final _sel_registerURLHandleClass_1 = + _registerName1("registerURLHandleClass:"); + void _objc_msgSend_200( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer anURLHandleSubclass, ) { - return __objc_msgSend_85( + return __objc_msgSend_200( obj, sel, + anURLHandleSubclass, ); } - late final __objc_msgSend_85Ptr = _lookup< + late final __objc_msgSend_200Ptr = _lookup< ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_boolValue1 = _registerName1("boolValue"); - late final _sel_integerValue1 = _registerName1("integerValue"); - late final _sel_unsignedIntegerValue1 = - _registerName1("unsignedIntegerValue"); - late final _sel_stringValue1 = _registerName1("stringValue"); - int _objc_msgSend_86( + late final _sel_URLHandleClassForURL_1 = + _registerName1("URLHandleClassForURL:"); + ffi.Pointer _objc_msgSend_201( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherNumber, + ffi.Pointer anURL, ) { - return __objc_msgSend_86( + return __objc_msgSend_201( obj, sel, - otherNumber, + anURL, ); } - late final __objc_msgSend_86Ptr = _lookup< + late final __objc_msgSend_201Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); - bool _objc_msgSend_87( + late final _sel_status1 = _registerName1("status"); + int _objc_msgSend_202( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer number, ) { - return __objc_msgSend_87( + return __objc_msgSend_202( obj, sel, - number, ); } - late final __objc_msgSend_87Ptr = _lookup< + late final __objc_msgSend_202Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_descriptionWithLocale_1 = - _registerName1("descriptionWithLocale:"); - ffi.Pointer _objc_msgSend_88( + late final _sel_failureReason1 = _registerName1("failureReason"); + late final _sel_addClient_1 = _registerName1("addClient:"); + late final _sel_removeClient_1 = _registerName1("removeClient:"); + late final _sel_loadInBackground1 = _registerName1("loadInBackground"); + late final _sel_cancelLoadInBackground1 = + _registerName1("cancelLoadInBackground"); + late final _sel_resourceData1 = _registerName1("resourceData"); + late final _sel_availableResourceData1 = + _registerName1("availableResourceData"); + late final _sel_expectedResourceDataSize1 = + _registerName1("expectedResourceDataSize"); + late final _sel_flushCachedData1 = _registerName1("flushCachedData"); + late final _sel_backgroundLoadDidFailWithReason_1 = + _registerName1("backgroundLoadDidFailWithReason:"); + late final _sel_didLoadBytes_loadComplete_1 = + _registerName1("didLoadBytes:loadComplete:"); + void _objc_msgSend_203( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer locale, + ffi.Pointer newBytes, + bool yorn, ) { - return __objc_msgSend_88( + return __objc_msgSend_203( obj, sel, - locale, + newBytes, + yorn, ); } - late final __objc_msgSend_88Ptr = _lookup< + late final __objc_msgSend_203Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_numberWithChar_1 = _registerName1("numberWithChar:"); - late final _sel_numberWithUnsignedChar_1 = - _registerName1("numberWithUnsignedChar:"); - late final _sel_numberWithShort_1 = _registerName1("numberWithShort:"); - late final _sel_numberWithUnsignedShort_1 = - _registerName1("numberWithUnsignedShort:"); - late final _sel_numberWithInt_1 = _registerName1("numberWithInt:"); - late final _sel_numberWithUnsignedInt_1 = - _registerName1("numberWithUnsignedInt:"); - late final _sel_numberWithLong_1 = _registerName1("numberWithLong:"); - late final _sel_numberWithUnsignedLong_1 = - _registerName1("numberWithUnsignedLong:"); - late final _sel_numberWithLongLong_1 = _registerName1("numberWithLongLong:"); - late final _sel_numberWithUnsignedLongLong_1 = - _registerName1("numberWithUnsignedLongLong:"); - late final _sel_numberWithFloat_1 = _registerName1("numberWithFloat:"); - late final _sel_numberWithDouble_1 = _registerName1("numberWithDouble:"); - late final _sel_numberWithBool_1 = _registerName1("numberWithBool:"); - late final _sel_numberWithInteger_1 = _registerName1("numberWithInteger:"); - late final _sel_numberWithUnsignedInteger_1 = - _registerName1("numberWithUnsignedInteger:"); - late final _sel_port1 = _registerName1("port"); - ffi.Pointer _objc_msgSend_89( + late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); + bool _objc_msgSend_204( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer anURL, ) { - return __objc_msgSend_89( + return __objc_msgSend_204( obj, sel, + anURL, ); } - late final __objc_msgSend_89Ptr = _lookup< + late final __objc_msgSend_204Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_user1 = _registerName1("user"); - late final _sel_password1 = _registerName1("password"); - late final _sel_path1 = _registerName1("path"); - late final _sel_fragment1 = _registerName1("fragment"); - late final _sel_parameterString1 = _registerName1("parameterString"); - late final _sel_query1 = _registerName1("query"); - late final _sel_relativePath1 = _registerName1("relativePath"); - late final _sel_hasDirectoryPath1 = _registerName1("hasDirectoryPath"); - late final _sel_getFileSystemRepresentation_maxLength_1 = - _registerName1("getFileSystemRepresentation:maxLength:"); - bool _objc_msgSend_90( + late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); + ffi.Pointer _objc_msgSend_205( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferLength, + ffi.Pointer anURL, ) { - return __objc_msgSend_90( + return __objc_msgSend_205( obj, sel, - buffer, - maxBufferLength, + anURL, ); } - late final __objc_msgSend_90Ptr = _lookup< + late final __objc_msgSend_205Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_fileSystemRepresentation1 = - _registerName1("fileSystemRepresentation"); - late final _sel_isFileURL1 = _registerName1("isFileURL"); - late final _sel_standardizedURL1 = _registerName1("standardizedURL"); - late final _class_NSError1 = _getClass1("NSError"); - late final _class_NSDictionary1 = _getClass1("NSDictionary"); - late final _sel_count1 = _registerName1("count"); - late final _sel_objectForKey_1 = _registerName1("objectForKey:"); - ffi.Pointer _objc_msgSend_91( + late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); + ffi.Pointer _objc_msgSend_206( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aKey, + ffi.Pointer anURL, + bool willCache, ) { - return __objc_msgSend_91( + return __objc_msgSend_206( obj, sel, - aKey, + anURL, + willCache, ); } - late final __objc_msgSend_91Ptr = _lookup< + late final __objc_msgSend_206Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer, bool)>(); - late final _class_NSEnumerator1 = _getClass1("NSEnumerator"); - late final _sel_nextObject1 = _registerName1("nextObject"); - late final _sel_allObjects1 = _registerName1("allObjects"); - late final _sel_keyEnumerator1 = _registerName1("keyEnumerator"); - ffi.Pointer _objc_msgSend_92( + late final _sel_propertyForKeyIfAvailable_1 = + _registerName1("propertyForKeyIfAvailable:"); + late final _sel_writeProperty_forKey_1 = + _registerName1("writeProperty:forKey:"); + late final _sel_writeData_1 = _registerName1("writeData:"); + late final _sel_loadInForeground1 = _registerName1("loadInForeground"); + late final _sel_beginLoadInBackground1 = + _registerName1("beginLoadInBackground"); + late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); + late final _sel_URLHandleUsingCache_1 = + _registerName1("URLHandleUsingCache:"); + ffi.Pointer _objc_msgSend_207( ffi.Pointer obj, ffi.Pointer sel, + bool shouldUseCache, ) { - return __objc_msgSend_92( + return __objc_msgSend_207( obj, sel, + shouldUseCache, ); } - late final __objc_msgSend_92Ptr = _lookup< + late final __objc_msgSend_207Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer, bool)>(); - late final _sel_initWithObjects_forKeys_count_1 = - _registerName1("initWithObjects:forKeys:count:"); - instancetype _objc_msgSend_93( + late final _sel_writeToFile_options_error_1 = + _registerName1("writeToFile:options:error:"); + bool _objc_msgSend_208( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt, + ffi.Pointer path, + int writeOptionsMask, + ffi.Pointer> errorPtr, ) { - return __objc_msgSend_93( + return __objc_msgSend_208( obj, sel, - objects, - keys, - cnt, + path, + writeOptionsMask, + errorPtr, ); } - late final __objc_msgSend_93Ptr = _lookup< + late final __objc_msgSend_208Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< - instancetype Function( + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< + bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _class_NSArray1 = _getClass1("NSArray"); - late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); - ffi.Pointer _objc_msgSend_94( + late final _sel_writeToURL_options_error_1 = + _registerName1("writeToURL:options:error:"); + bool _objc_msgSend_209( ffi.Pointer obj, ffi.Pointer sel, - int index, + ffi.Pointer url, + int writeOptionsMask, + ffi.Pointer> errorPtr, ) { - return __objc_msgSend_94( + return __objc_msgSend_209( obj, sel, - index, + url, + writeOptionsMask, + errorPtr, ); } - late final __objc_msgSend_94Ptr = _lookup< + late final __objc_msgSend_209Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_initWithObjects_count_1 = - _registerName1("initWithObjects:count:"); - instancetype _objc_msgSend_95( + late final _sel_rangeOfData_options_range_1 = + _registerName1("rangeOfData:options:range:"); + NSRange _objc_msgSend_210( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, - int cnt, + ffi.Pointer dataToFind, + int mask, + NSRange searchRange, ) { - return __objc_msgSend_95( + return __objc_msgSend_210( obj, sel, - objects, - cnt, + dataToFind, + mask, + searchRange, ); } - late final __objc_msgSend_95Ptr = _lookup< + late final __objc_msgSend_210Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, int)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - late final _sel_arrayByAddingObject_1 = - _registerName1("arrayByAddingObject:"); - ffi.Pointer _objc_msgSend_96( + late final _sel_enumerateByteRangesUsingBlock_1 = + _registerName1("enumerateByteRangesUsingBlock:"); + void _objc_msgSend_211( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_96( + return __objc_msgSend_211( obj, sel, - anObject, + block, ); } - late final __objc_msgSend_96Ptr = _lookup< + late final __objc_msgSend_211Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_arrayByAddingObjectsFromArray_1 = - _registerName1("arrayByAddingObjectsFromArray:"); - ffi.Pointer _objc_msgSend_97( + late final _sel_data1 = _registerName1("data"); + late final _sel_dataWithBytes_length_1 = + _registerName1("dataWithBytes:length:"); + instancetype _objc_msgSend_212( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherArray, + ffi.Pointer bytes, + int length, ) { - return __objc_msgSend_97( + return __objc_msgSend_212( obj, sel, - otherArray, + bytes, + length, ); } - late final __objc_msgSend_97Ptr = _lookup< + late final __objc_msgSend_212Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_componentsJoinedByString_1 = - _registerName1("componentsJoinedByString:"); - ffi.Pointer _objc_msgSend_98( + late final _sel_dataWithBytesNoCopy_length_1 = + _registerName1("dataWithBytesNoCopy:length:"); + late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = + _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); + instancetype _objc_msgSend_213( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer separator, + ffi.Pointer bytes, + int length, + bool b, ) { - return __objc_msgSend_98( + return __objc_msgSend_213( obj, sel, - separator, + bytes, + length, + b, ); } - late final __objc_msgSend_98Ptr = _lookup< + late final __objc_msgSend_213Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, bool)>(); - late final _sel_containsObject_1 = _registerName1("containsObject:"); - late final _sel_descriptionWithLocale_indent_1 = - _registerName1("descriptionWithLocale:indent:"); - ffi.Pointer _objc_msgSend_99( + late final _sel_dataWithContentsOfFile_options_error_1 = + _registerName1("dataWithContentsOfFile:options:error:"); + instancetype _objc_msgSend_214( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer locale, - int level, + ffi.Pointer path, + int readOptionsMask, + ffi.Pointer> errorPtr, ) { - return __objc_msgSend_99( + return __objc_msgSend_214( obj, sel, - locale, - level, + path, + readOptionsMask, + errorPtr, ); } - late final __objc_msgSend_99Ptr = _lookup< + late final __objc_msgSend_214Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_firstObjectCommonWithArray_1 = - _registerName1("firstObjectCommonWithArray:"); - ffi.Pointer _objc_msgSend_100( + late final _sel_dataWithContentsOfURL_options_error_1 = + _registerName1("dataWithContentsOfURL:options:error:"); + instancetype _objc_msgSend_215( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherArray, + ffi.Pointer url, + int readOptionsMask, + ffi.Pointer> errorPtr, ) { - return __objc_msgSend_100( + return __objc_msgSend_215( obj, sel, - otherArray, + url, + readOptionsMask, + errorPtr, ); } - late final __objc_msgSend_100Ptr = _lookup< + late final __objc_msgSend_215Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); - void _objc_msgSend_101( + late final _sel_dataWithContentsOfFile_1 = + _registerName1("dataWithContentsOfFile:"); + late final _sel_dataWithContentsOfURL_1 = + _registerName1("dataWithContentsOfURL:"); + late final _sel_initWithBytes_length_1 = + _registerName1("initWithBytes:length:"); + late final _sel_initWithBytesNoCopy_length_1 = + _registerName1("initWithBytesNoCopy:length:"); + late final _sel_initWithBytesNoCopy_length_freeWhenDone_1 = + _registerName1("initWithBytesNoCopy:length:freeWhenDone:"); + late final _sel_initWithBytesNoCopy_length_deallocator_1 = + _registerName1("initWithBytesNoCopy:length:deallocator:"); + instancetype _objc_msgSend_216( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, - NSRange range, + ffi.Pointer bytes, + int length, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_101( + return __objc_msgSend_216( obj, sel, - objects, - range, + bytes, + length, + deallocator, ); } - late final __objc_msgSend_101Ptr = _lookup< + late final __objc_msgSend_216Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, NSRange)>(); - - late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); - int _objc_msgSend_102( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_102( - obj, - sel, - anObject, - ); - } - - late final __objc_msgSend_102Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_indexOfObject_inRange_1 = - _registerName1("indexOfObject:inRange:"); - int _objc_msgSend_103( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - NSRange range, - ) { - return __objc_msgSend_103( - obj, - sel, - anObject, - range, - ); - } - - late final __objc_msgSend_103Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_indexOfObjectIdenticalTo_1 = - _registerName1("indexOfObjectIdenticalTo:"); - late final _sel_indexOfObjectIdenticalTo_inRange_1 = - _registerName1("indexOfObjectIdenticalTo:inRange:"); - late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); - bool _objc_msgSend_104( + late final _sel_initWithContentsOfFile_options_error_1 = + _registerName1("initWithContentsOfFile:options:error:"); + late final _sel_initWithContentsOfURL_options_error_1 = + _registerName1("initWithContentsOfURL:options:error:"); + late final _sel_initWithData_1 = _registerName1("initWithData:"); + instancetype _objc_msgSend_217( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherArray, + ffi.Pointer data, ) { - return __objc_msgSend_104( + return __objc_msgSend_217( obj, sel, - otherArray, + data, ); } - late final __objc_msgSend_104Ptr = _lookup< + late final __objc_msgSend_217Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_firstObject1 = _registerName1("firstObject"); - late final _sel_lastObject1 = _registerName1("lastObject"); - late final _sel_objectEnumerator1 = _registerName1("objectEnumerator"); - late final _sel_reverseObjectEnumerator1 = - _registerName1("reverseObjectEnumerator"); - late final _sel_sortedArrayHint1 = _registerName1("sortedArrayHint"); - late final _sel_sortedArrayUsingFunction_context_1 = - _registerName1("sortedArrayUsingFunction:context:"); - ffi.Pointer _objc_msgSend_105( + late final _sel_dataWithData_1 = _registerName1("dataWithData:"); + late final _sel_initWithBase64EncodedString_options_1 = + _registerName1("initWithBase64EncodedString:options:"); + instancetype _objc_msgSend_218( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, + ffi.Pointer base64String, + int options, ) { - return __objc_msgSend_105( + return __objc_msgSend_218( obj, sel, - comparator, - context, + base64String, + options, ); } - late final __objc_msgSend_105Ptr = _lookup< + late final __objc_msgSend_218Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_sortedArrayUsingFunction_context_hint_1 = - _registerName1("sortedArrayUsingFunction:context:hint:"); - ffi.Pointer _objc_msgSend_106( + late final _sel_base64EncodedStringWithOptions_1 = + _registerName1("base64EncodedStringWithOptions:"); + ffi.Pointer _objc_msgSend_219( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - ffi.Pointer hint, + int options, ) { - return __objc_msgSend_106( + return __objc_msgSend_219( obj, sel, - comparator, - context, - hint, + options, ); } - late final __objc_msgSend_106Ptr = _lookup< + late final __objc_msgSend_219Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_sortedArrayUsingSelector_1 = - _registerName1("sortedArrayUsingSelector:"); - ffi.Pointer _objc_msgSend_107( + late final _sel_initWithBase64EncodedData_options_1 = + _registerName1("initWithBase64EncodedData:options:"); + instancetype _objc_msgSend_220( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer comparator, + ffi.Pointer base64Data, + int options, ) { - return __objc_msgSend_107( + return __objc_msgSend_220( obj, sel, - comparator, + base64Data, + options, ); } - late final __objc_msgSend_107Ptr = _lookup< + late final __objc_msgSend_220Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); - ffi.Pointer _objc_msgSend_108( + late final _sel_base64EncodedDataWithOptions_1 = + _registerName1("base64EncodedDataWithOptions:"); + ffi.Pointer _objc_msgSend_221( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + int options, ) { - return __objc_msgSend_108( + return __objc_msgSend_221( obj, sel, - range, + options, ); } - late final __objc_msgSend_108Ptr = _lookup< + late final __objc_msgSend_221Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); - bool _objc_msgSend_109( + late final _sel_decompressedDataUsingAlgorithm_error_1 = + _registerName1("decompressedDataUsingAlgorithm:error:"); + instancetype _objc_msgSend_222( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + int algorithm, ffi.Pointer> error, ) { - return __objc_msgSend_109( + return __objc_msgSend_222( obj, sel, - url, + algorithm, error, ); } - late final __objc_msgSend_109Ptr = _lookup< + late final __objc_msgSend_222Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Int32, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); + late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer>)>(); - late final _sel_makeObjectsPerformSelector_1 = - _registerName1("makeObjectsPerformSelector:"); - late final _sel_makeObjectsPerformSelector_withObject_1 = - _registerName1("makeObjectsPerformSelector:withObject:"); - void _objc_msgSend_110( + late final _sel_compressedDataUsingAlgorithm_error_1 = + _registerName1("compressedDataUsingAlgorithm:error:"); + late final _sel_getBytes_1 = _registerName1("getBytes:"); + late final _sel_dataWithContentsOfMappedFile_1 = + _registerName1("dataWithContentsOfMappedFile:"); + late final _sel_initWithContentsOfMappedFile_1 = + _registerName1("initWithContentsOfMappedFile:"); + late final _sel_initWithBase64Encoding_1 = + _registerName1("initWithBase64Encoding:"); + late final _sel_base64Encoding1 = _registerName1("base64Encoding"); + late final _sel_characterSetWithBitmapRepresentation_1 = + _registerName1("characterSetWithBitmapRepresentation:"); + ffi.Pointer _objc_msgSend_223( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer argument, + ffi.Pointer data, ) { - return __objc_msgSend_110( + return __objc_msgSend_223( obj, sel, - aSelector, - argument, + data, ); } - late final __objc_msgSend_110Ptr = _lookup< + late final __objc_msgSend_223Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); - late final _sel_indexSet1 = _registerName1("indexSet"); - late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); - late final _sel_indexSetWithIndexesInRange_1 = - _registerName1("indexSetWithIndexesInRange:"); - instancetype _objc_msgSend_111( + late final _sel_characterSetWithContentsOfFile_1 = + _registerName1("characterSetWithContentsOfFile:"); + late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); + bool _objc_msgSend_224( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + int aCharacter, ) { - return __objc_msgSend_111( + return __objc_msgSend_224( obj, sel, - range, + aCharacter, ); } - late final __objc_msgSend_111Ptr = _lookup< + late final __objc_msgSend_224Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + unichar)>>('objc_msgSend'); + late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_initWithIndexesInRange_1 = - _registerName1("initWithIndexesInRange:"); - late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); - instancetype _objc_msgSend_112( + late final _sel_bitmapRepresentation1 = + _registerName1("bitmapRepresentation"); + late final _sel_invertedSet1 = _registerName1("invertedSet"); + late final _sel_longCharacterIsMember_1 = + _registerName1("longCharacterIsMember:"); + bool _objc_msgSend_225( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexSet, + int theLongChar, ) { - return __objc_msgSend_112( + return __objc_msgSend_225( obj, sel, - indexSet, + theLongChar, ); } - late final __objc_msgSend_112Ptr = _lookup< + late final __objc_msgSend_225Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + UTF32Char)>>('objc_msgSend'); + late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); - late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); - bool _objc_msgSend_113( + late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); + bool _objc_msgSend_226( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexSet, + ffi.Pointer theOtherSet, ) { - return __objc_msgSend_113( + return __objc_msgSend_226( obj, sel, - indexSet, + theOtherSet, ); } - late final __objc_msgSend_113Ptr = _lookup< + late final __objc_msgSend_226Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< + late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_firstIndex1 = _registerName1("firstIndex"); - late final _sel_lastIndex1 = _registerName1("lastIndex"); - late final _sel_indexGreaterThanIndex_1 = - _registerName1("indexGreaterThanIndex:"); - int _objc_msgSend_114( + late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); + bool _objc_msgSend_227( ffi.Pointer obj, ffi.Pointer sel, - int value, + int thePlane, ) { - return __objc_msgSend_114( + return __objc_msgSend_227( obj, sel, - value, + thePlane, ); } - late final __objc_msgSend_114Ptr = _lookup< + late final __objc_msgSend_227Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Uint8)>>('objc_msgSend'); + late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); - late final _sel_indexGreaterThanOrEqualToIndex_1 = - _registerName1("indexGreaterThanOrEqualToIndex:"); - late final _sel_indexLessThanOrEqualToIndex_1 = - _registerName1("indexLessThanOrEqualToIndex:"); - late final _sel_getIndexes_maxCount_inIndexRange_1 = - _registerName1("getIndexes:maxCount:inIndexRange:"); - int _objc_msgSend_115( + late final _sel_URLUserAllowedCharacterSet1 = + _registerName1("URLUserAllowedCharacterSet"); + late final _sel_URLPasswordAllowedCharacterSet1 = + _registerName1("URLPasswordAllowedCharacterSet"); + late final _sel_URLHostAllowedCharacterSet1 = + _registerName1("URLHostAllowedCharacterSet"); + late final _sel_URLPathAllowedCharacterSet1 = + _registerName1("URLPathAllowedCharacterSet"); + late final _sel_URLQueryAllowedCharacterSet1 = + _registerName1("URLQueryAllowedCharacterSet"); + late final _sel_URLFragmentAllowedCharacterSet1 = + _registerName1("URLFragmentAllowedCharacterSet"); + late final _sel_rangeOfCharacterFromSet_1 = + _registerName1("rangeOfCharacterFromSet:"); + NSRange _objc_msgSend_228( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexBuffer, - int bufferSize, - NSRangePointer range, + ffi.Pointer searchSet, ) { - return __objc_msgSend_115( + return __objc_msgSend_228( obj, sel, - indexBuffer, - bufferSize, - range, + searchSet, ); } - late final __objc_msgSend_115Ptr = _lookup< + late final __objc_msgSend_228Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRangePointer)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_countOfIndexesInRange_1 = - _registerName1("countOfIndexesInRange:"); - int _objc_msgSend_116( + late final _sel_rangeOfCharacterFromSet_options_1 = + _registerName1("rangeOfCharacterFromSet:options:"); + NSRange _objc_msgSend_229( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + ffi.Pointer searchSet, + int mask, ) { - return __objc_msgSend_116( + return __objc_msgSend_229( obj, sel, - range, + searchSet, + mask, ); } - late final __objc_msgSend_116Ptr = _lookup< + late final __objc_msgSend_229Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_containsIndex_1 = _registerName1("containsIndex:"); - bool _objc_msgSend_117( + late final _sel_rangeOfCharacterFromSet_options_range_1 = + _registerName1("rangeOfCharacterFromSet:options:range:"); + NSRange _objc_msgSend_230( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer searchSet, + int mask, + NSRange rangeOfReceiverToSearch, ) { - return __objc_msgSend_117( + return __objc_msgSend_230( obj, sel, - value, + searchSet, + mask, + rangeOfReceiverToSearch, ); } - late final __objc_msgSend_117Ptr = _lookup< + late final __objc_msgSend_230Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - late final _sel_containsIndexesInRange_1 = - _registerName1("containsIndexesInRange:"); - bool _objc_msgSend_118( + late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = + _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); + NSRange _objc_msgSend_231( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + int index, ) { - return __objc_msgSend_118( + return __objc_msgSend_231( obj, sel, - range, + index, ); } - late final __objc_msgSend_118Ptr = _lookup< + late final __objc_msgSend_231Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); - late final _sel_intersectsIndexesInRange_1 = - _registerName1("intersectsIndexesInRange:"); - late final _sel_enumerateIndexesUsingBlock_1 = - _registerName1("enumerateIndexesUsingBlock:"); - void _objc_msgSend_119( + late final _sel_rangeOfComposedCharacterSequencesForRange_1 = + _registerName1("rangeOfComposedCharacterSequencesForRange:"); + NSRange _objc_msgSend_232( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + NSRange range, ) { - return __objc_msgSend_119( + return __objc_msgSend_232( obj, sel, - block, + range, ); } - late final __objc_msgSend_119Ptr = _lookup< + late final __objc_msgSend_232Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_enumerateIndexesWithOptions_usingBlock_1 = - _registerName1("enumerateIndexesWithOptions:usingBlock:"); - void _objc_msgSend_120( + NSRange Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< + NSRange Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); + + late final _sel_stringByAppendingString_1 = + _registerName1("stringByAppendingString:"); + late final _sel_stringByAppendingFormat_1 = + _registerName1("stringByAppendingFormat:"); + late final _sel_uppercaseString1 = _registerName1("uppercaseString"); + late final _sel_lowercaseString1 = _registerName1("lowercaseString"); + late final _sel_capitalizedString1 = _registerName1("capitalizedString"); + late final _sel_localizedUppercaseString1 = + _registerName1("localizedUppercaseString"); + late final _sel_localizedLowercaseString1 = + _registerName1("localizedLowercaseString"); + late final _sel_localizedCapitalizedString1 = + _registerName1("localizedCapitalizedString"); + late final _sel_uppercaseStringWithLocale_1 = + _registerName1("uppercaseStringWithLocale:"); + ffi.Pointer _objc_msgSend_233( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer locale, ) { - return __objc_msgSend_120( + return __objc_msgSend_233( obj, sel, - opts, - block, + locale, ); } - late final __objc_msgSend_120Ptr = _lookup< + late final __objc_msgSend_233Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateIndexesInRange_options_usingBlock_1 = - _registerName1("enumerateIndexesInRange:options:usingBlock:"); - void _objc_msgSend_121( + late final _sel_lowercaseStringWithLocale_1 = + _registerName1("lowercaseStringWithLocale:"); + late final _sel_capitalizedStringWithLocale_1 = + _registerName1("capitalizedStringWithLocale:"); + late final _sel_getLineStart_end_contentsEnd_forRange_1 = + _registerName1("getLineStart:end:contentsEnd:forRange:"); + void _objc_msgSend_234( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range, + ) { + return __objc_msgSend_234( + obj, + sel, + startPtr, + lineEndPtr, + contentsEndPtr, + range, + ); + } + + late final __objc_msgSend_234Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange)>(); + + late final _sel_lineRangeForRange_1 = _registerName1("lineRangeForRange:"); + late final _sel_getParagraphStart_end_contentsEnd_forRange_1 = + _registerName1("getParagraphStart:end:contentsEnd:forRange:"); + late final _sel_paragraphRangeForRange_1 = + _registerName1("paragraphRangeForRange:"); + late final _sel_enumerateSubstringsInRange_options_usingBlock_1 = + _registerName1("enumerateSubstringsInRange:options:usingBlock:"); + void _objc_msgSend_235( ffi.Pointer obj, ffi.Pointer sel, NSRange range, int opts, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_121( + return __objc_msgSend_235( obj, sel, range, @@ -5435,13238 +6436,12013 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_121Ptr = _lookup< + late final __objc_msgSend_235Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< + late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); - int _objc_msgSend_122( + late final _sel_enumerateLinesUsingBlock_1 = + _registerName1("enumerateLinesUsingBlock:"); + void _objc_msgSend_236( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_122( + return __objc_msgSend_236( obj, sel, - predicate, + block, ); } - late final __objc_msgSend_122Ptr = _lookup< + late final __objc_msgSend_236Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_indexWithOptions_passingTest_1 = - _registerName1("indexWithOptions:passingTest:"); - int _objc_msgSend_123( + late final _sel_UTF8String1 = _registerName1("UTF8String"); + late final _sel_fastestEncoding1 = _registerName1("fastestEncoding"); + late final _sel_smallestEncoding1 = _registerName1("smallestEncoding"); + late final _sel_dataUsingEncoding_allowLossyConversion_1 = + _registerName1("dataUsingEncoding:allowLossyConversion:"); + ffi.Pointer _objc_msgSend_237( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + int encoding, + bool lossy, ) { - return __objc_msgSend_123( + return __objc_msgSend_237( obj, sel, - opts, - predicate, + encoding, + lossy, ); } - late final __objc_msgSend_123Ptr = _lookup< + late final __objc_msgSend_237Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSStringEncoding, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, bool)>(); - late final _sel_indexInRange_options_passingTest_1 = - _registerName1("indexInRange:options:passingTest:"); - int _objc_msgSend_124( + late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); + ffi.Pointer _objc_msgSend_238( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + int encoding, ) { - return __objc_msgSend_124( + return __objc_msgSend_238( obj, sel, - range, - opts, - predicate, + encoding, ); } - late final __objc_msgSend_124Ptr = _lookup< + late final __objc_msgSend_238Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); - ffi.Pointer _objc_msgSend_125( + late final _sel_canBeConvertedToEncoding_1 = + _registerName1("canBeConvertedToEncoding:"); + late final _sel_cStringUsingEncoding_1 = + _registerName1("cStringUsingEncoding:"); + ffi.Pointer _objc_msgSend_239( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + int encoding, ) { - return __objc_msgSend_125( + return __objc_msgSend_239( obj, sel, - predicate, + encoding, ); } - late final __objc_msgSend_125Ptr = _lookup< + late final __objc_msgSend_239Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_indexesWithOptions_passingTest_1 = - _registerName1("indexesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_126( + late final _sel_getCString_maxLength_encoding_1 = + _registerName1("getCString:maxLength:encoding:"); + bool _objc_msgSend_240( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer buffer, + int maxBufferCount, + int encoding, ) { - return __objc_msgSend_126( + return __objc_msgSend_240( obj, sel, - opts, - predicate, + buffer, + maxBufferCount, + encoding, ); } - late final __objc_msgSend_126Ptr = _lookup< + late final __objc_msgSend_240Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, + NSUInteger, + NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - late final _sel_indexesInRange_options_passingTest_1 = - _registerName1("indexesInRange:options:passingTest:"); - ffi.Pointer _objc_msgSend_127( + late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1 = + _registerName1( + "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); + bool _objc_msgSend_241( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + NSRangePointer leftover, ) { - return __objc_msgSend_127( + return __objc_msgSend_241( obj, sel, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, range, - opts, - predicate, + leftover, ); } - late final __objc_msgSend_127Ptr = _lookup< + late final __objc_msgSend_241Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - NSRange, + ffi.Pointer, + NSUInteger, + ffi.Pointer, + NSStringEncoding, ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); + NSRange, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + int, + int, + NSRange, + NSRangePointer)>(); - late final _sel_enumerateRangesUsingBlock_1 = - _registerName1("enumerateRangesUsingBlock:"); - void _objc_msgSend_128( + late final _sel_maximumLengthOfBytesUsingEncoding_1 = + _registerName1("maximumLengthOfBytesUsingEncoding:"); + late final _sel_lengthOfBytesUsingEncoding_1 = + _registerName1("lengthOfBytesUsingEncoding:"); + late final _sel_availableStringEncodings1 = + _registerName1("availableStringEncodings"); + ffi.Pointer _objc_msgSend_242( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_128( + return __objc_msgSend_242( obj, sel, - block, ); } - late final __objc_msgSend_128Ptr = _lookup< + late final __objc_msgSend_242Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateRangesWithOptions_usingBlock_1 = - _registerName1("enumerateRangesWithOptions:usingBlock:"); - void _objc_msgSend_129( + late final _sel_localizedNameOfStringEncoding_1 = + _registerName1("localizedNameOfStringEncoding:"); + late final _sel_defaultCStringEncoding1 = + _registerName1("defaultCStringEncoding"); + late final _sel_decomposedStringWithCanonicalMapping1 = + _registerName1("decomposedStringWithCanonicalMapping"); + late final _sel_precomposedStringWithCanonicalMapping1 = + _registerName1("precomposedStringWithCanonicalMapping"); + late final _sel_decomposedStringWithCompatibilityMapping1 = + _registerName1("decomposedStringWithCompatibilityMapping"); + late final _sel_precomposedStringWithCompatibilityMapping1 = + _registerName1("precomposedStringWithCompatibilityMapping"); + late final _sel_componentsSeparatedByString_1 = + _registerName1("componentsSeparatedByString:"); + late final _sel_componentsSeparatedByCharactersInSet_1 = + _registerName1("componentsSeparatedByCharactersInSet:"); + ffi.Pointer _objc_msgSend_243( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer separator, ) { - return __objc_msgSend_129( + return __objc_msgSend_243( obj, sel, - opts, - block, + separator, ); } - late final __objc_msgSend_129Ptr = _lookup< + late final __objc_msgSend_243Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateRangesInRange_options_usingBlock_1 = - _registerName1("enumerateRangesInRange:options:usingBlock:"); - void _objc_msgSend_130( + late final _sel_stringByTrimmingCharactersInSet_1 = + _registerName1("stringByTrimmingCharactersInSet:"); + ffi.Pointer _objc_msgSend_244( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer set1, ) { - return __objc_msgSend_130( + return __objc_msgSend_244( obj, sel, - range, - opts, - block, + set1, ); } - late final __objc_msgSend_130Ptr = _lookup< + late final __objc_msgSend_244Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); - ffi.Pointer _objc_msgSend_131( + late final _sel_stringByPaddingToLength_withString_startingAtIndex_1 = + _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); + ffi.Pointer _objc_msgSend_245( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexes, + int newLength, + ffi.Pointer padString, + int padIndex, ) { - return __objc_msgSend_131( + return __objc_msgSend_245( obj, sel, - indexes, + newLength, + padString, + padIndex, ); } - late final __objc_msgSend_131Ptr = _lookup< + late final __objc_msgSend_245Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, int, ffi.Pointer, int)>(); - late final _sel_objectAtIndexedSubscript_1 = - _registerName1("objectAtIndexedSubscript:"); - late final _sel_enumerateObjectsUsingBlock_1 = - _registerName1("enumerateObjectsUsingBlock:"); - void _objc_msgSend_132( + late final _sel_stringByFoldingWithOptions_locale_1 = + _registerName1("stringByFoldingWithOptions:locale:"); + ffi.Pointer _objc_msgSend_246( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + int options, + ffi.Pointer locale, ) { - return __objc_msgSend_132( + return __objc_msgSend_246( obj, sel, - block, + options, + locale, ); } - late final __objc_msgSend_132Ptr = _lookup< + late final __objc_msgSend_246Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); - late final _sel_enumerateObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateObjectsWithOptions:usingBlock:"); - void _objc_msgSend_133( + late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_1 = + _registerName1( + "stringByReplacingOccurrencesOfString:withString:options:range:"); + ffi.Pointer _objc_msgSend_247( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer target, + ffi.Pointer replacement, + int options, + NSRange searchRange, ) { - return __objc_msgSend_133( + return __objc_msgSend_247( obj, sel, - opts, - block, + target, + replacement, + options, + searchRange, ); } - late final __objc_msgSend_133Ptr = _lookup< + late final __objc_msgSend_247Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + NSRange)>(); - late final _sel_enumerateObjectsAtIndexes_options_usingBlock_1 = - _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); - void _objc_msgSend_134( + late final _sel_stringByReplacingOccurrencesOfString_withString_1 = + _registerName1("stringByReplacingOccurrencesOfString:withString:"); + ffi.Pointer _objc_msgSend_248( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer target, + ffi.Pointer replacement, ) { - return __objc_msgSend_134( + return __objc_msgSend_248( obj, sel, - s, - opts, - block, + target, + replacement, ); } - late final __objc_msgSend_134Ptr = _lookup< + late final __objc_msgSend_248Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexOfObjectPassingTest_1 = - _registerName1("indexOfObjectPassingTest:"); - int _objc_msgSend_135( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_135( - obj, - sel, - predicate, - ); - } - - late final __objc_msgSend_135Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexOfObjectWithOptions_passingTest_1 = - _registerName1("indexOfObjectWithOptions:passingTest:"); - int _objc_msgSend_136( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_136( - obj, - sel, - opts, - predicate, - ); - } - - late final __objc_msgSend_136Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexOfObjectAtIndexes_options_passingTest_1 = - _registerName1("indexOfObjectAtIndexes:options:passingTest:"); - int _objc_msgSend_137( + late final _sel_stringByReplacingCharactersInRange_withString_1 = + _registerName1("stringByReplacingCharactersInRange:withString:"); + ffi.Pointer _objc_msgSend_249( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + NSRange range, + ffi.Pointer replacement, ) { - return __objc_msgSend_137( + return __objc_msgSend_249( obj, sel, - s, - opts, - predicate, + range, + replacement, ); } - late final __objc_msgSend_137Ptr = _lookup< + late final __objc_msgSend_249Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange, ffi.Pointer)>(); - late final _sel_indexesOfObjectsPassingTest_1 = - _registerName1("indexesOfObjectsPassingTest:"); - ffi.Pointer _objc_msgSend_138( + late final _sel_stringByApplyingTransform_reverse_1 = + _registerName1("stringByApplyingTransform:reverse:"); + ffi.Pointer _objc_msgSend_250( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + NSStringTransform transform, + bool reverse, ) { - return __objc_msgSend_138( + return __objc_msgSend_250( obj, sel, - predicate, + transform, + reverse, ); } - late final __objc_msgSend_138Ptr = _lookup< + late final __objc_msgSend_250Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSStringTransform, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, NSStringTransform, bool)>(); - late final _sel_indexesOfObjectsWithOptions_passingTest_1 = - _registerName1("indexesOfObjectsWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_139( + late final _sel_writeToURL_atomically_encoding_error_1 = + _registerName1("writeToURL:atomically:encoding:error:"); + bool _objc_msgSend_251( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer url, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_139( + return __objc_msgSend_251( obj, sel, - opts, - predicate, + url, + useAuxiliaryFile, + enc, + error, ); } - late final __objc_msgSend_139Ptr = _lookup< + late final __objc_msgSend_251Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, + ffi.Bool, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); - late final _sel_indexesOfObjectsAtIndexes_options_passingTest_1 = - _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); - ffi.Pointer _objc_msgSend_140( + late final _sel_writeToFile_atomically_encoding_error_1 = + _registerName1("writeToFile:atomically:encoding:error:"); + bool _objc_msgSend_252( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_140( + return __objc_msgSend_252( obj, sel, - s, - opts, - predicate, + path, + useAuxiliaryFile, + enc, + error, ); } - late final __objc_msgSend_140Ptr = _lookup< + late final __objc_msgSend_252Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< - ffi.Pointer Function( + ffi.Bool, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + bool, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer>)>(); - late final _sel_sortedArrayUsingComparator_1 = - _registerName1("sortedArrayUsingComparator:"); - ffi.Pointer _objc_msgSend_141( + late final _sel_initWithCharactersNoCopy_length_freeWhenDone_1 = + _registerName1("initWithCharactersNoCopy:length:freeWhenDone:"); + instancetype _objc_msgSend_253( ffi.Pointer obj, ffi.Pointer sel, - NSComparator cmptr, + ffi.Pointer characters, + int length, + bool freeBuffer, ) { - return __objc_msgSend_141( + return __objc_msgSend_253( obj, sel, - cmptr, + characters, + length, + freeBuffer, ); } - late final __objc_msgSend_141Ptr = _lookup< + late final __objc_msgSend_253Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSComparator)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, bool)>(); - late final _sel_sortedArrayWithOptions_usingComparator_1 = - _registerName1("sortedArrayWithOptions:usingComparator:"); - ffi.Pointer _objc_msgSend_142( + late final _sel_initWithCharactersNoCopy_length_deallocator_1 = + _registerName1("initWithCharactersNoCopy:length:deallocator:"); + instancetype _objc_msgSend_254( ffi.Pointer obj, ffi.Pointer sel, - int opts, - NSComparator cmptr, + ffi.Pointer chars, + int len, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_142( + return __objc_msgSend_254( obj, sel, - opts, - cmptr, + chars, + len, + deallocator, ); } - late final __objc_msgSend_142Ptr = _lookup< + late final __objc_msgSend_254Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, NSComparator)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_indexOfObject_inSortedRange_options_usingComparator_1 = - _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); - int _objc_msgSend_143( + late final _sel_initWithCharacters_length_1 = + _registerName1("initWithCharacters:length:"); + instancetype _objc_msgSend_255( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer obj1, - NSRange r, - int opts, - NSComparator cmp, + ffi.Pointer characters, + int length, ) { - return __objc_msgSend_143( + return __objc_msgSend_255( obj, sel, - obj1, - r, - opts, - cmp, + characters, + length, ); } - late final __objc_msgSend_143Ptr = _lookup< + late final __objc_msgSend_255Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Int32, - NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange, int, NSComparator)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_array1 = _registerName1("array"); - late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); - late final _sel_arrayWithObjects_count_1 = - _registerName1("arrayWithObjects:count:"); - late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); - late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); - late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); - late final _sel_initWithArray_1 = _registerName1("initWithArray:"); - late final _sel_initWithArray_copyItems_1 = - _registerName1("initWithArray:copyItems:"); - instancetype _objc_msgSend_144( + late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); + instancetype _objc_msgSend_256( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer array, - bool flag, + ffi.Pointer nullTerminatedCString, ) { - return __objc_msgSend_144( + return __objc_msgSend_256( obj, sel, - array, - flag, + nullTerminatedCString, ); } - late final __objc_msgSend_144Ptr = _lookup< + late final __objc_msgSend_256Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer)>(); - late final _sel_initWithContentsOfURL_error_1 = - _registerName1("initWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_145( + late final _sel_initWithFormat_1 = _registerName1("initWithFormat:"); + late final _sel_initWithFormat_arguments_1 = + _registerName1("initWithFormat:arguments:"); + instancetype _objc_msgSend_257( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, + ffi.Pointer format, + va_list argList, ) { - return __objc_msgSend_145( + return __objc_msgSend_257( obj, sel, - url, - error, + format, + argList, ); } - late final __objc_msgSend_145Ptr = _lookup< + late final __objc_msgSend_257Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, va_list)>>('objc_msgSend'); + late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, va_list)>(); - late final _sel_arrayWithContentsOfURL_error_1 = - _registerName1("arrayWithContentsOfURL:error:"); - late final _class_NSOrderedCollectionDifference1 = - _getClass1("NSOrderedCollectionDifference"); - late final _sel_initWithChanges_1 = _registerName1("initWithChanges:"); - late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1 = - _registerName1( - "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:"); - instancetype _objc_msgSend_146( + late final _sel_initWithFormat_locale_1 = + _registerName1("initWithFormat:locale:"); + instancetype _objc_msgSend_258( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer inserts, - ffi.Pointer insertedObjects, - ffi.Pointer removes, - ffi.Pointer removedObjects, - ffi.Pointer changes, + ffi.Pointer format, + ffi.Pointer locale, ) { - return __objc_msgSend_146( + return __objc_msgSend_258( obj, sel, - inserts, - insertedObjects, - removes, - removedObjects, - changes, + format, + locale, ); } - late final __objc_msgSend_146Ptr = _lookup< + late final __objc_msgSend_258Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1 = - _registerName1( - "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:"); - instancetype _objc_msgSend_147( + late final _sel_initWithFormat_locale_arguments_1 = + _registerName1("initWithFormat:locale:arguments:"); + instancetype _objc_msgSend_259( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer inserts, - ffi.Pointer insertedObjects, - ffi.Pointer removes, - ffi.Pointer removedObjects, + ffi.Pointer format, + ffi.Pointer locale, + va_list argList, ) { - return __objc_msgSend_147( + return __objc_msgSend_259( obj, sel, - inserts, - insertedObjects, - removes, - removedObjects, + format, + locale, + argList, ); } - late final __objc_msgSend_147Ptr = _lookup< + late final __objc_msgSend_259Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + va_list)>>('objc_msgSend'); + late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, va_list)>(); - late final _sel_insertions1 = _registerName1("insertions"); - late final _sel_removals1 = _registerName1("removals"); - late final _sel_hasChanges1 = _registerName1("hasChanges"); - late final _class_NSOrderedCollectionChange1 = - _getClass1("NSOrderedCollectionChange"); - late final _sel_changeWithObject_type_index_1 = - _registerName1("changeWithObject:type:index:"); - ffi.Pointer _objc_msgSend_148( + late final _sel_initWithData_encoding_1 = + _registerName1("initWithData:encoding:"); + instancetype _objc_msgSend_260( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, + ffi.Pointer data, + int encoding, ) { - return __objc_msgSend_148( + return __objc_msgSend_260( obj, sel, - anObject, - type, - index, + data, + encoding, ); } - late final __objc_msgSend_148Ptr = _lookup< + late final __objc_msgSend_260Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_changeWithObject_type_index_associatedIndex_1 = - _registerName1("changeWithObject:type:index:associatedIndex:"); - ffi.Pointer _objc_msgSend_149( + late final _sel_initWithBytes_length_encoding_1 = + _registerName1("initWithBytes:length:encoding:"); + instancetype _objc_msgSend_261( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, - int associatedIndex, + ffi.Pointer bytes, + int len, + int encoding, ) { - return __objc_msgSend_149( + return __objc_msgSend_261( obj, sel, - anObject, - type, - index, - associatedIndex, + bytes, + len, + encoding, ); } - late final __objc_msgSend_149Ptr = _lookup< + late final __objc_msgSend_261Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32, + ffi.Pointer, NSUInteger, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int, int)>(); + NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - late final _sel_object1 = _registerName1("object"); - late final _sel_changeType1 = _registerName1("changeType"); - int _objc_msgSend_150( + late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = + _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); + instancetype _objc_msgSend_262( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer bytes, + int len, + int encoding, + bool freeBuffer, ) { - return __objc_msgSend_150( + return __objc_msgSend_262( obj, sel, + bytes, + len, + encoding, + freeBuffer, ); } - late final __objc_msgSend_150Ptr = _lookup< + late final __objc_msgSend_262Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSStringEncoding, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, bool)>(); - late final _sel_index1 = _registerName1("index"); - late final _sel_associatedIndex1 = _registerName1("associatedIndex"); - late final _sel_initWithObject_type_index_1 = - _registerName1("initWithObject:type:index:"); - instancetype _objc_msgSend_151( + late final _sel_initWithBytesNoCopy_length_encoding_deallocator_1 = + _registerName1("initWithBytesNoCopy:length:encoding:deallocator:"); + instancetype _objc_msgSend_263( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, + ffi.Pointer bytes, + int len, + int encoding, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_151( + return __objc_msgSend_263( obj, sel, - anObject, - type, - index, + bytes, + len, + encoding, + deallocator, ); } - late final __objc_msgSend_151Ptr = _lookup< + late final __objc_msgSend_263Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSStringEncoding, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_string1 = _registerName1("string"); + late final _sel_stringWithString_1 = _registerName1("stringWithString:"); + late final _sel_stringWithCharacters_length_1 = + _registerName1("stringWithCharacters:length:"); + late final _sel_stringWithUTF8String_1 = + _registerName1("stringWithUTF8String:"); + late final _sel_stringWithFormat_1 = _registerName1("stringWithFormat:"); + late final _sel_localizedStringWithFormat_1 = + _registerName1("localizedStringWithFormat:"); + late final _sel_initWithCString_encoding_1 = + _registerName1("initWithCString:encoding:"); + instancetype _objc_msgSend_264( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer nullTerminatedCString, + int encoding, + ) { + return __objc_msgSend_264( + obj, + sel, + nullTerminatedCString, + encoding, + ); + } + + late final __objc_msgSend_264Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Pointer, int)>(); - late final _sel_initWithObject_type_index_associatedIndex_1 = - _registerName1("initWithObject:type:index:associatedIndex:"); - instancetype _objc_msgSend_152( + late final _sel_stringWithCString_encoding_1 = + _registerName1("stringWithCString:encoding:"); + late final _sel_initWithContentsOfURL_encoding_error_1 = + _registerName1("initWithContentsOfURL:encoding:error:"); + instancetype _objc_msgSend_265( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, - int associatedIndex, + ffi.Pointer url, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_152( + return __objc_msgSend_265( obj, sel, - anObject, - type, - index, - associatedIndex, + url, + enc, + error, ); } - late final __objc_msgSend_152Ptr = _lookup< + late final __objc_msgSend_265Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - NSUInteger, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, int)>(); + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_differenceByTransformingChangesWithBlock_1 = - _registerName1("differenceByTransformingChangesWithBlock:"); - ffi.Pointer _objc_msgSend_153( + late final _sel_initWithContentsOfFile_encoding_error_1 = + _registerName1("initWithContentsOfFile:encoding:error:"); + instancetype _objc_msgSend_266( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer path, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_153( + return __objc_msgSend_266( obj, sel, - block, + path, + enc, + error, ); } - late final __objc_msgSend_153Ptr = _lookup< + late final __objc_msgSend_266Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_inverseDifference1 = _registerName1("inverseDifference"); - late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = - _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); - ffi.Pointer _objc_msgSend_154( + late final _sel_stringWithContentsOfURL_encoding_error_1 = + _registerName1("stringWithContentsOfURL:encoding:error:"); + late final _sel_stringWithContentsOfFile_encoding_error_1 = + _registerName1("stringWithContentsOfFile:encoding:error:"); + late final _sel_initWithContentsOfURL_usedEncoding_error_1 = + _registerName1("initWithContentsOfURL:usedEncoding:error:"); + instancetype _objc_msgSend_267( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, - int options, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer url, + ffi.Pointer enc, + ffi.Pointer> error, ) { - return __objc_msgSend_154( + return __objc_msgSend_267( obj, sel, - other, - options, - block, + url, + enc, + error, ); } - late final __objc_msgSend_154Ptr = _lookup< + late final __objc_msgSend_267Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< - ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_differenceFromArray_withOptions_1 = - _registerName1("differenceFromArray:withOptions:"); - ffi.Pointer _objc_msgSend_155( + late final _sel_initWithContentsOfFile_usedEncoding_error_1 = + _registerName1("initWithContentsOfFile:usedEncoding:error:"); + instancetype _objc_msgSend_268( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, - int options, + ffi.Pointer path, + ffi.Pointer enc, + ffi.Pointer> error, ) { - return __objc_msgSend_155( + return __objc_msgSend_268( obj, sel, - other, - options, + path, + enc, + error, ); } - late final __objc_msgSend_155Ptr = _lookup< + late final __objc_msgSend_268Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_differenceFromArray_1 = - _registerName1("differenceFromArray:"); - ffi.Pointer _objc_msgSend_156( + late final _sel_stringWithContentsOfURL_usedEncoding_error_1 = + _registerName1("stringWithContentsOfURL:usedEncoding:error:"); + late final _sel_stringWithContentsOfFile_usedEncoding_error_1 = + _registerName1("stringWithContentsOfFile:usedEncoding:error:"); + late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1 = + _registerName1( + "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); + int _objc_msgSend_269( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, + ffi.Pointer data, + ffi.Pointer opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion, ) { - return __objc_msgSend_156( + return __objc_msgSend_269( obj, sel, - other, + data, + opts, + string, + usedLossyConversion, ); } - late final __objc_msgSend_156Ptr = _lookup< + late final __objc_msgSend_269Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSStringEncoding Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); - late final _sel_arrayByApplyingDifference_1 = - _registerName1("arrayByApplyingDifference:"); - ffi.Pointer _objc_msgSend_157( + late final _sel_propertyList1 = _registerName1("propertyList"); + late final _sel_propertyListFromStringsFileFormat1 = + _registerName1("propertyListFromStringsFileFormat"); + late final _sel_cString1 = _registerName1("cString"); + late final _sel_lossyCString1 = _registerName1("lossyCString"); + late final _sel_cStringLength1 = _registerName1("cStringLength"); + late final _sel_getCString_1 = _registerName1("getCString:"); + void _objc_msgSend_270( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer difference, + ffi.Pointer bytes, ) { - return __objc_msgSend_157( + return __objc_msgSend_270( obj, sel, - difference, + bytes, ); } - late final __objc_msgSend_157Ptr = _lookup< + late final __objc_msgSend_270Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_getObjects_1 = _registerName1("getObjects:"); - void _objc_msgSend_158( + late final _sel_getCString_maxLength_1 = + _registerName1("getCString:maxLength:"); + void _objc_msgSend_271( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, + ffi.Pointer bytes, + int maxLength, ) { - return __objc_msgSend_158( + return __objc_msgSend_271( obj, sel, - objects, + bytes, + maxLength, ); } - late final __objc_msgSend_158Ptr = _lookup< + late final __objc_msgSend_271Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, int)>(); - late final _sel_arrayWithContentsOfFile_1 = - _registerName1("arrayWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_159( + late final _sel_getCString_maxLength_range_remainingRange_1 = + _registerName1("getCString:maxLength:range:remainingRange:"); + void _objc_msgSend_272( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer bytes, + int maxLength, + NSRange aRange, + NSRangePointer leftoverRange, ) { - return __objc_msgSend_159( + return __objc_msgSend_272( obj, sel, - path, + bytes, + maxLength, + aRange, + leftoverRange, ); } - late final __objc_msgSend_159Ptr = _lookup< + late final __objc_msgSend_272Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSRange, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange, NSRangePointer)>(); - late final _sel_arrayWithContentsOfURL_1 = - _registerName1("arrayWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_160( + late final _sel_stringWithContentsOfFile_1 = + _registerName1("stringWithContentsOfFile:"); + late final _sel_stringWithContentsOfURL_1 = + _registerName1("stringWithContentsOfURL:"); + late final _sel_initWithCStringNoCopy_length_freeWhenDone_1 = + _registerName1("initWithCStringNoCopy:length:freeWhenDone:"); + ffi.Pointer _objc_msgSend_273( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer bytes, + int length, + bool freeBuffer, ) { - return __objc_msgSend_160( + return __objc_msgSend_273( obj, sel, - url, + bytes, + length, + freeBuffer, ); } - late final __objc_msgSend_160Ptr = _lookup< + late final __objc_msgSend_273Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer, int, bool)>(); - late final _sel_initWithContentsOfFile_1 = - _registerName1("initWithContentsOfFile:"); - late final _sel_initWithContentsOfURL_1 = - _registerName1("initWithContentsOfURL:"); - late final _sel_writeToURL_atomically_1 = - _registerName1("writeToURL:atomically:"); - bool _objc_msgSend_161( + late final _sel_initWithCString_length_1 = + _registerName1("initWithCString:length:"); + late final _sel_initWithCString_1 = _registerName1("initWithCString:"); + late final _sel_stringWithCString_length_1 = + _registerName1("stringWithCString:length:"); + late final _sel_stringWithCString_1 = _registerName1("stringWithCString:"); + late final _sel_getCharacters_1 = _registerName1("getCharacters:"); + void _objc_msgSend_274( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - bool atomically, + ffi.Pointer buffer, ) { - return __objc_msgSend_161( + return __objc_msgSend_274( obj, sel, - url, - atomically, + buffer, ); } - late final __objc_msgSend_161Ptr = _lookup< + late final __objc_msgSend_274Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_allKeys1 = _registerName1("allKeys"); - ffi.Pointer _objc_msgSend_162( + late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = + _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); + late final _sel_stringByRemovingPercentEncoding1 = + _registerName1("stringByRemovingPercentEncoding"); + late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = + _registerName1("stringByAddingPercentEscapesUsingEncoding:"); + late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = + _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); + late final _sel_debugDescription1 = _registerName1("debugDescription"); + late final _sel_version1 = _registerName1("version"); + late final _sel_setVersion_1 = _registerName1("setVersion:"); + void _objc_msgSend_275( ffi.Pointer obj, ffi.Pointer sel, + int aVersion, ) { - return __objc_msgSend_162( + return __objc_msgSend_275( obj, sel, + aVersion, ); } - late final __objc_msgSend_162Ptr = _lookup< + late final __objc_msgSend_275Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_allKeysForObject_1 = _registerName1("allKeysForObject:"); - late final _sel_allValues1 = _registerName1("allValues"); - late final _sel_descriptionInStringsFileFormat1 = - _registerName1("descriptionInStringsFileFormat"); - late final _sel_isEqualToDictionary_1 = - _registerName1("isEqualToDictionary:"); - bool _objc_msgSend_163( + late final _sel_classForCoder1 = _registerName1("classForCoder"); + late final _sel_replacementObjectForCoder_1 = + _registerName1("replacementObjectForCoder:"); + late final _sel_awakeAfterUsingCoder_1 = + _registerName1("awakeAfterUsingCoder:"); + late final _sel_poseAsClass_1 = _registerName1("poseAsClass:"); + late final _sel_autoContentAccessingProxy1 = + _registerName1("autoContentAccessingProxy"); + late final _sel_URL_resourceDataDidBecomeAvailable_1 = + _registerName1("URL:resourceDataDidBecomeAvailable:"); + void _objc_msgSend_276( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherDictionary, + ffi.Pointer sender, + ffi.Pointer newBytes, ) { - return __objc_msgSend_163( + return __objc_msgSend_276( obj, sel, - otherDictionary, + sender, + newBytes, ); } - late final __objc_msgSend_163Ptr = _lookup< + late final __objc_msgSend_276Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_URLResourceDidFinishLoading_1 = + _registerName1("URLResourceDidFinishLoading:"); + void _objc_msgSend_277( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer sender, + ) { + return __objc_msgSend_277( + obj, + sel, + sender, + ); + } + + late final __objc_msgSend_277Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_objectsForKeys_notFoundMarker_1 = - _registerName1("objectsForKeys:notFoundMarker:"); - ffi.Pointer _objc_msgSend_164( + late final _sel_URLResourceDidCancelLoading_1 = + _registerName1("URLResourceDidCancelLoading:"); + late final _sel_URL_resourceDidFailLoadingWithReason_1 = + _registerName1("URL:resourceDidFailLoadingWithReason:"); + void _objc_msgSend_278( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer marker, + ffi.Pointer sender, + ffi.Pointer reason, ) { - return __objc_msgSend_164( + return __objc_msgSend_278( obj, sel, - keys, - marker, + sender, + reason, ); } - late final __objc_msgSend_164Ptr = _lookup< + late final __objc_msgSend_278Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_keysSortedByValueUsingSelector_1 = - _registerName1("keysSortedByValueUsingSelector:"); - late final _sel_getObjects_andKeys_count_1 = - _registerName1("getObjects:andKeys:count:"); - void _objc_msgSend_165( + late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = + _registerName1( + "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); + void _objc_msgSend_279( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - int count, + ffi.Pointer error, + int recoveryOptionIndex, + ffi.Pointer delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo, ) { - return __objc_msgSend_165( + return __objc_msgSend_279( obj, sel, - objects, - keys, - count, + error, + recoveryOptionIndex, + delegate, + didRecoverSelector, + contextInfo, ); } - late final __objc_msgSend_165Ptr = _lookup< + late final __objc_msgSend_279Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< + ffi.Pointer, + NSUInteger, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_objectForKeyedSubscript_1 = - _registerName1("objectForKeyedSubscript:"); - late final _sel_enumerateKeysAndObjectsUsingBlock_1 = - _registerName1("enumerateKeysAndObjectsUsingBlock:"); - void _objc_msgSend_166( + late final _sel_attemptRecoveryFromError_optionIndex_1 = + _registerName1("attemptRecoveryFromError:optionIndex:"); + bool _objc_msgSend_280( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer error, + int recoveryOptionIndex, ) { - return __objc_msgSend_166( + return __objc_msgSend_280( obj, sel, - block, + error, + recoveryOptionIndex, ); } - late final __objc_msgSend_166Ptr = _lookup< + late final __objc_msgSend_280Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); - void _objc_msgSend_167( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + late final ffi.Pointer _NSFoundationVersionNumber = + _lookup('NSFoundationVersionNumber'); + + double get NSFoundationVersionNumber => _NSFoundationVersionNumber.value; + + set NSFoundationVersionNumber(double value) => + _NSFoundationVersionNumber.value = value; + + ffi.Pointer NSStringFromSelector( + ffi.Pointer aSelector, ) { - return __objc_msgSend_167( - obj, - sel, - opts, - block, + return _NSStringFromSelector( + aSelector, ); } - late final __objc_msgSend_167Ptr = _lookup< + late final _NSStringFromSelectorPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSStringFromSelector'); + late final _NSStringFromSelector = _NSStringFromSelectorPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_keysSortedByValueUsingComparator_1 = - _registerName1("keysSortedByValueUsingComparator:"); - late final _sel_keysSortedByValueWithOptions_usingComparator_1 = - _registerName1("keysSortedByValueWithOptions:usingComparator:"); - late final _sel_keysOfEntriesPassingTest_1 = - _registerName1("keysOfEntriesPassingTest:"); - ffi.Pointer _objc_msgSend_168( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer NSSelectorFromString( + ffi.Pointer aSelectorName, ) { - return __objc_msgSend_168( - obj, - sel, - predicate, + return _NSSelectorFromString( + aSelectorName, ); } - late final __objc_msgSend_168Ptr = _lookup< + late final _NSSelectorFromStringPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSSelectorFromString'); + late final _NSSelectorFromString = _NSSelectorFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_keysOfEntriesWithOptions_passingTest_1 = - _registerName1("keysOfEntriesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_169( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer NSStringFromClass( + ffi.Pointer aClass, ) { - return __objc_msgSend_169( - obj, - sel, - opts, - predicate, + return _NSStringFromClass( + aClass, ); } - late final __objc_msgSend_169Ptr = _lookup< + late final _NSStringFromClassPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer)>>('NSStringFromClass'); + late final _NSStringFromClass = _NSStringFromClassPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); - void _objc_msgSend_170( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, + ffi.Pointer NSClassFromString( + ffi.Pointer aClassName, ) { - return __objc_msgSend_170( - obj, - sel, - objects, - keys, + return _NSClassFromString( + aClassName, ); } - late final __objc_msgSend_170Ptr = _lookup< + late final _NSClassFromStringPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSClassFromString'); + late final _NSClassFromString = _NSClassFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_dictionaryWithContentsOfFile_1 = - _registerName1("dictionaryWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_171( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer NSStringFromProtocol( + ffi.Pointer proto, ) { - return __objc_msgSend_171( - obj, - sel, - path, + return _NSStringFromProtocol( + proto, ); } - late final __objc_msgSend_171Ptr = _lookup< + late final _NSStringFromProtocolPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSStringFromProtocol'); + late final _NSStringFromProtocol = _NSStringFromProtocolPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_dictionaryWithContentsOfURL_1 = - _registerName1("dictionaryWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_172( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer NSProtocolFromString( + ffi.Pointer namestr, ) { - return __objc_msgSend_172( - obj, - sel, - url, + return _NSProtocolFromString( + namestr, ); } - late final __objc_msgSend_172Ptr = _lookup< + late final _NSProtocolFromStringPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSProtocolFromString'); + late final _NSProtocolFromString = _NSProtocolFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_dictionary1 = _registerName1("dictionary"); - late final _sel_dictionaryWithObject_forKey_1 = - _registerName1("dictionaryWithObject:forKey:"); - instancetype _objc_msgSend_173( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - ffi.Pointer key, + ffi.Pointer NSGetSizeAndAlignment( + ffi.Pointer typePtr, + ffi.Pointer sizep, + ffi.Pointer alignp, ) { - return __objc_msgSend_173( - obj, - sel, - object, - key, + return _NSGetSizeAndAlignment( + typePtr, + sizep, + alignp, ); } - late final __objc_msgSend_173Ptr = _lookup< + late final _NSGetSizeAndAlignmentPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('NSGetSizeAndAlignment'); + late final _NSGetSizeAndAlignment = _NSGetSizeAndAlignmentPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dictionaryWithObjects_forKeys_count_1 = - _registerName1("dictionaryWithObjects:forKeys:count:"); - late final _sel_dictionaryWithObjectsAndKeys_1 = - _registerName1("dictionaryWithObjectsAndKeys:"); - late final _sel_dictionaryWithDictionary_1 = - _registerName1("dictionaryWithDictionary:"); - instancetype _objc_msgSend_174( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dict, + void NSLog( + ffi.Pointer format, ) { - return __objc_msgSend_174( - obj, - sel, - dict, + return _NSLog( + format, ); } - late final __objc_msgSend_174Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _NSLogPtr = + _lookup)>>( + 'NSLog'); + late final _NSLog = + _NSLogPtr.asFunction)>(); - late final _sel_dictionaryWithObjects_forKeys_1 = - _registerName1("dictionaryWithObjects:forKeys:"); - instancetype _objc_msgSend_175( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer keys, + void NSLogv( + ffi.Pointer format, + va_list args, ) { - return __objc_msgSend_175( - obj, - sel, - objects, - keys, + return _NSLogv( + format, + args, ); } - late final __objc_msgSend_175Ptr = _lookup< + late final _NSLogvPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, va_list)>>('NSLogv'); + late final _NSLogv = + _NSLogvPtr.asFunction, va_list)>(); - late final _sel_initWithObjectsAndKeys_1 = - _registerName1("initWithObjectsAndKeys:"); - late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); - late final _sel_initWithDictionary_copyItems_1 = - _registerName1("initWithDictionary:copyItems:"); - instancetype _objc_msgSend_176( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDictionary, - bool flag, + late final ffi.Pointer _NSNotFound = + _lookup('NSNotFound'); + + int get NSNotFound => _NSNotFound.value; + + set NSNotFound(int value) => _NSNotFound.value = value; + + ffi.Pointer _Block_copy1( + ffi.Pointer aBlock, ) { - return __objc_msgSend_176( - obj, - sel, - otherDictionary, - flag, + return __Block_copy1( + aBlock, ); } - late final __objc_msgSend_176Ptr = _lookup< + late final __Block_copy1Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer Function( + ffi.Pointer)>>('_Block_copy'); + late final __Block_copy1 = __Block_copy1Ptr + .asFunction Function(ffi.Pointer)>(); - late final _sel_initWithObjects_forKeys_1 = - _registerName1("initWithObjects:forKeys:"); - ffi.Pointer _objc_msgSend_177( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, + void _Block_release1( + ffi.Pointer aBlock, ) { - return __objc_msgSend_177( - obj, - sel, - url, - error, + return __Block_release1( + aBlock, ); } - late final __objc_msgSend_177Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + late final __Block_release1Ptr = + _lookup)>>( + '_Block_release'); + late final __Block_release1 = + __Block_release1Ptr.asFunction)>(); - late final _sel_dictionaryWithContentsOfURL_error_1 = - _registerName1("dictionaryWithContentsOfURL:error:"); - late final _sel_sharedKeySetForKeys_1 = - _registerName1("sharedKeySetForKeys:"); - late final _sel_countByEnumeratingWithState_objects_count_1 = - _registerName1("countByEnumeratingWithState:objects:count:"); - int _objc_msgSend_178( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer state, - ffi.Pointer> buffer, - int len, + void _Block_object_assign( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_178( - obj, - sel, - state, - buffer, - len, + return __Block_object_assign( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_178Ptr = _lookup< + late final __Block_object_assignPtr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('_Block_object_assign'); + late final __Block_object_assign = __Block_object_assignPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_initWithDomain_code_userInfo_1 = - _registerName1("initWithDomain:code:userInfo:"); - instancetype _objc_msgSend_179( - ffi.Pointer obj, - ffi.Pointer sel, - NSErrorDomain domain, - int code, - ffi.Pointer dict, + void _Block_object_dispose( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_179( - obj, - sel, - domain, - code, - dict, + return __Block_object_dispose( + arg0, + arg1, ); } - late final __objc_msgSend_179Ptr = _lookup< + late final __Block_object_disposePtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSErrorDomain, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, int, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Int)>>('_Block_object_dispose'); + late final __Block_object_dispose = __Block_object_disposePtr + .asFunction, int)>(); - late final _sel_errorWithDomain_code_userInfo_1 = - _registerName1("errorWithDomain:code:userInfo:"); - late final _sel_domain1 = _registerName1("domain"); - late final _sel_code1 = _registerName1("code"); - late final _sel_userInfo1 = _registerName1("userInfo"); - ffi.Pointer _objc_msgSend_180( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_180( - obj, - sel, - ); + late final ffi.Pointer>> + __NSConcreteGlobalBlock = + _lookup>>('_NSConcreteGlobalBlock'); + + ffi.Pointer> get _NSConcreteGlobalBlock => + __NSConcreteGlobalBlock.value; + + set _NSConcreteGlobalBlock(ffi.Pointer> value) => + __NSConcreteGlobalBlock.value = value; + + late final ffi.Pointer>> + __NSConcreteStackBlock = + _lookup>>('_NSConcreteStackBlock'); + + ffi.Pointer> get _NSConcreteStackBlock => + __NSConcreteStackBlock.value; + + set _NSConcreteStackBlock(ffi.Pointer> value) => + __NSConcreteStackBlock.value = value; + + void Debugger() { + return _Debugger(); } - late final __objc_msgSend_180Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _DebuggerPtr = + _lookup>('Debugger'); + late final _Debugger = _DebuggerPtr.asFunction(); - late final _sel_localizedDescription1 = - _registerName1("localizedDescription"); - late final _sel_localizedFailureReason1 = - _registerName1("localizedFailureReason"); - late final _sel_localizedRecoverySuggestion1 = - _registerName1("localizedRecoverySuggestion"); - late final _sel_localizedRecoveryOptions1 = - _registerName1("localizedRecoveryOptions"); - late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); - late final _sel_helpAnchor1 = _registerName1("helpAnchor"); - late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); - late final _sel_setUserInfoValueProviderForDomain_provider_1 = - _registerName1("setUserInfoValueProviderForDomain:provider:"); - void _objc_msgSend_181( - ffi.Pointer obj, - ffi.Pointer sel, - NSErrorDomain errorDomain, - ffi.Pointer<_ObjCBlock> provider, + void DebugStr( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_181( - obj, - sel, - errorDomain, - provider, + return _DebugStr( + debuggerMsg, ); } - late final __objc_msgSend_181Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, ffi.Pointer<_ObjCBlock>)>(); + late final _DebugStrPtr = + _lookup>( + 'DebugStr'); + late final _DebugStr = + _DebugStrPtr.asFunction(); - late final _sel_userInfoValueProviderForDomain_1 = - _registerName1("userInfoValueProviderForDomain:"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_182( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer err, - NSErrorUserInfoKey userInfoKey, - NSErrorDomain errorDomain, + void SysBreak() { + return _SysBreak(); + } + + late final _SysBreakPtr = + _lookup>('SysBreak'); + late final _SysBreak = _SysBreakPtr.asFunction(); + + void SysBreakStr( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_182( - obj, - sel, - err, - userInfoKey, - errorDomain, + return _SysBreakStr( + debuggerMsg, ); } - late final __objc_msgSend_182Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSErrorUserInfoKey, - NSErrorDomain)>>('objc_msgSend'); - late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSErrorUserInfoKey, - NSErrorDomain)>(); + late final _SysBreakStrPtr = + _lookup>( + 'SysBreakStr'); + late final _SysBreakStr = + _SysBreakStrPtr.asFunction(); - late final _sel_checkResourceIsReachableAndReturnError_1 = - _registerName1("checkResourceIsReachableAndReturnError:"); - bool _objc_msgSend_183( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> error, + void SysBreakFunc( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_183( - obj, - sel, - error, + return _SysBreakFunc( + debuggerMsg, ); } - late final __objc_msgSend_183Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + late final _SysBreakFuncPtr = + _lookup>( + 'SysBreakFunc'); + late final _SysBreakFunc = + _SysBreakFuncPtr.asFunction(); - late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); - late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); - late final _sel_filePathURL1 = _registerName1("filePathURL"); - late final _sel_getResourceValue_forKey_error_1 = - _registerName1("getResourceValue:forKey:error:"); - bool _objc_msgSend_184( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error, + late final ffi.Pointer _kCFCoreFoundationVersionNumber = + _lookup('kCFCoreFoundationVersionNumber'); + + double get kCFCoreFoundationVersionNumber => + _kCFCoreFoundationVersionNumber.value; + + set kCFCoreFoundationVersionNumber(double value) => + _kCFCoreFoundationVersionNumber.value = value; + + late final ffi.Pointer _kCFNotFound = + _lookup('kCFNotFound'); + + int get kCFNotFound => _kCFNotFound.value; + + set kCFNotFound(int value) => _kCFNotFound.value = value; + + CFRange __CFRangeMake( + int loc, + int len, ) { - return __objc_msgSend_184( - obj, - sel, - value, - key, - error, + return ___CFRangeMake( + loc, + len, ); } - late final __objc_msgSend_184Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSURLResourceKey, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSURLResourceKey, - ffi.Pointer>)>(); + late final ___CFRangeMakePtr = + _lookup>( + '__CFRangeMake'); + late final ___CFRangeMake = + ___CFRangeMakePtr.asFunction(); - late final _sel_resourceValuesForKeys_error_1 = - _registerName1("resourceValuesForKeys:error:"); - ffi.Pointer _objc_msgSend_185( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer> error, + int CFNullGetTypeID() { + return _CFNullGetTypeID(); + } + + late final _CFNullGetTypeIDPtr = + _lookup>('CFNullGetTypeID'); + late final _CFNullGetTypeID = + _CFNullGetTypeIDPtr.asFunction(); + + late final ffi.Pointer _kCFNull = _lookup('kCFNull'); + + CFNullRef get kCFNull => _kCFNull.value; + + set kCFNull(CFNullRef value) => _kCFNull.value = value; + + late final ffi.Pointer _kCFAllocatorDefault = + _lookup('kCFAllocatorDefault'); + + CFAllocatorRef get kCFAllocatorDefault => _kCFAllocatorDefault.value; + + set kCFAllocatorDefault(CFAllocatorRef value) => + _kCFAllocatorDefault.value = value; + + late final ffi.Pointer _kCFAllocatorSystemDefault = + _lookup('kCFAllocatorSystemDefault'); + + CFAllocatorRef get kCFAllocatorSystemDefault => + _kCFAllocatorSystemDefault.value; + + set kCFAllocatorSystemDefault(CFAllocatorRef value) => + _kCFAllocatorSystemDefault.value = value; + + late final ffi.Pointer _kCFAllocatorMalloc = + _lookup('kCFAllocatorMalloc'); + + CFAllocatorRef get kCFAllocatorMalloc => _kCFAllocatorMalloc.value; + + set kCFAllocatorMalloc(CFAllocatorRef value) => + _kCFAllocatorMalloc.value = value; + + late final ffi.Pointer _kCFAllocatorMallocZone = + _lookup('kCFAllocatorMallocZone'); + + CFAllocatorRef get kCFAllocatorMallocZone => _kCFAllocatorMallocZone.value; + + set kCFAllocatorMallocZone(CFAllocatorRef value) => + _kCFAllocatorMallocZone.value = value; + + late final ffi.Pointer _kCFAllocatorNull = + _lookup('kCFAllocatorNull'); + + CFAllocatorRef get kCFAllocatorNull => _kCFAllocatorNull.value; + + set kCFAllocatorNull(CFAllocatorRef value) => _kCFAllocatorNull.value = value; + + late final ffi.Pointer _kCFAllocatorUseContext = + _lookup('kCFAllocatorUseContext'); + + CFAllocatorRef get kCFAllocatorUseContext => _kCFAllocatorUseContext.value; + + set kCFAllocatorUseContext(CFAllocatorRef value) => + _kCFAllocatorUseContext.value = value; + + int CFAllocatorGetTypeID() { + return _CFAllocatorGetTypeID(); + } + + late final _CFAllocatorGetTypeIDPtr = + _lookup>('CFAllocatorGetTypeID'); + late final _CFAllocatorGetTypeID = + _CFAllocatorGetTypeIDPtr.asFunction(); + + void CFAllocatorSetDefault( + CFAllocatorRef allocator, ) { - return __objc_msgSend_185( - obj, - sel, - keys, - error, + return _CFAllocatorSetDefault( + allocator, ); } - late final __objc_msgSend_185Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + late final _CFAllocatorSetDefaultPtr = + _lookup>( + 'CFAllocatorSetDefault'); + late final _CFAllocatorSetDefault = + _CFAllocatorSetDefaultPtr.asFunction(); - late final _sel_setResourceValue_forKey_error_1 = - _registerName1("setResourceValue:forKey:error:"); - bool _objc_msgSend_186( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - NSURLResourceKey key, - ffi.Pointer> error, + CFAllocatorRef CFAllocatorGetDefault() { + return _CFAllocatorGetDefault(); + } + + late final _CFAllocatorGetDefaultPtr = + _lookup>( + 'CFAllocatorGetDefault'); + late final _CFAllocatorGetDefault = + _CFAllocatorGetDefaultPtr.asFunction(); + + CFAllocatorRef CFAllocatorCreate( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return __objc_msgSend_186( - obj, - sel, - value, - key, - error, + return _CFAllocatorCreate( + allocator, + context, ); } - late final __objc_msgSend_186Ptr = _lookup< + late final _CFAllocatorCreatePtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLResourceKey, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLResourceKey, - ffi.Pointer>)>(); + CFAllocatorRef Function(CFAllocatorRef, + ffi.Pointer)>>('CFAllocatorCreate'); + late final _CFAllocatorCreate = _CFAllocatorCreatePtr.asFunction< + CFAllocatorRef Function( + CFAllocatorRef, ffi.Pointer)>(); - late final _sel_setResourceValues_error_1 = - _registerName1("setResourceValues:error:"); - bool _objc_msgSend_187( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyedValues, - ffi.Pointer> error, + ffi.Pointer CFAllocatorAllocate( + CFAllocatorRef allocator, + int size, + int hint, ) { - return __objc_msgSend_187( - obj, - sel, - keyedValues, - error, + return _CFAllocatorAllocate( + allocator, + size, + hint, ); } - late final __objc_msgSend_187Ptr = _lookup< + late final _CFAllocatorAllocatePtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); + ffi.Pointer Function( + CFAllocatorRef, CFIndex, CFOptionFlags)>>('CFAllocatorAllocate'); + late final _CFAllocatorAllocate = _CFAllocatorAllocatePtr.asFunction< + ffi.Pointer Function(CFAllocatorRef, int, int)>(); - late final _sel_removeCachedResourceValueForKey_1 = - _registerName1("removeCachedResourceValueForKey:"); - void _objc_msgSend_188( - ffi.Pointer obj, - ffi.Pointer sel, - NSURLResourceKey key, + ffi.Pointer CFAllocatorReallocate( + CFAllocatorRef allocator, + ffi.Pointer ptr, + int newsize, + int hint, ) { - return __objc_msgSend_188( - obj, - sel, - key, + return _CFAllocatorReallocate( + allocator, + ptr, + newsize, + hint, ); } - late final __objc_msgSend_188Ptr = _lookup< + late final _CFAllocatorReallocatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSURLResourceKey)>>('objc_msgSend'); - late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, NSURLResourceKey)>(); + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer, + CFIndex, CFOptionFlags)>>('CFAllocatorReallocate'); + late final _CFAllocatorReallocate = _CFAllocatorReallocatePtr.asFunction< + ffi.Pointer Function( + CFAllocatorRef, ffi.Pointer, int, int)>(); - late final _sel_removeAllCachedResourceValues1 = - _registerName1("removeAllCachedResourceValues"); - late final _sel_setTemporaryResourceValue_forKey_1 = - _registerName1("setTemporaryResourceValue:forKey:"); - void _objc_msgSend_189( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - NSURLResourceKey key, + void CFAllocatorDeallocate( + CFAllocatorRef allocator, + ffi.Pointer ptr, ) { - return __objc_msgSend_189( - obj, - sel, - value, - key, + return _CFAllocatorDeallocate( + allocator, + ptr, ); } - late final __objc_msgSend_189Ptr = _lookup< + late final _CFAllocatorDeallocatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSURLResourceKey)>>('objc_msgSend'); - late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSURLResourceKey)>(); - - late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = - _registerName1( - "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); - ffi.Pointer _objc_msgSend_190( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer keys, - ffi.Pointer relativeURL, - ffi.Pointer> error, + ffi.Void Function( + CFAllocatorRef, ffi.Pointer)>>('CFAllocatorDeallocate'); + late final _CFAllocatorDeallocate = _CFAllocatorDeallocatePtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer)>(); + + int CFAllocatorGetPreferredSizeForSize( + CFAllocatorRef allocator, + int size, + int hint, ) { - return __objc_msgSend_190( - obj, - sel, - options, - keys, - relativeURL, - error, + return _CFAllocatorGetPreferredSizeForSize( + allocator, + size, + hint, ); } - late final __objc_msgSend_190Ptr = _lookup< + late final _CFAllocatorGetPreferredSizeForSizePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + CFIndex Function(CFAllocatorRef, CFIndex, + CFOptionFlags)>>('CFAllocatorGetPreferredSizeForSize'); + late final _CFAllocatorGetPreferredSizeForSize = + _CFAllocatorGetPreferredSizeForSizePtr.asFunction< + int Function(CFAllocatorRef, int, int)>(); - late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - instancetype _objc_msgSend_191( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bookmarkData, - int options, - ffi.Pointer relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error, + void CFAllocatorGetContext( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return __objc_msgSend_191( - obj, - sel, - bookmarkData, - options, - relativeURL, - isStale, - error, + return _CFAllocatorGetContext( + allocator, + context, ); } - late final __objc_msgSend_191Ptr = _lookup< + late final _CFAllocatorGetContextPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Void Function(CFAllocatorRef, + ffi.Pointer)>>('CFAllocatorGetContext'); + late final _CFAllocatorGetContext = _CFAllocatorGetContextPtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer)>(); - late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - late final _sel_resourceValuesForKeys_fromBookmarkData_1 = - _registerName1("resourceValuesForKeys:fromBookmarkData:"); - ffi.Pointer _objc_msgSend_192( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer bookmarkData, + int CFGetTypeID( + CFTypeRef cf, ) { - return __objc_msgSend_192( - obj, - sel, - keys, - bookmarkData, + return _CFGetTypeID( + cf, ); } - late final __objc_msgSend_192Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _CFGetTypeIDPtr = + _lookup>('CFGetTypeID'); + late final _CFGetTypeID = + _CFGetTypeIDPtr.asFunction(); - late final _sel_writeBookmarkData_toURL_options_error_1 = - _registerName1("writeBookmarkData:toURL:options:error:"); - bool _objc_msgSend_193( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bookmarkData, - ffi.Pointer bookmarkFileURL, - int options, - ffi.Pointer> error, + CFStringRef CFCopyTypeIDDescription( + int type_id, ) { - return __objc_msgSend_193( - obj, - sel, - bookmarkData, - bookmarkFileURL, - options, - error, + return _CFCopyTypeIDDescription( + type_id, ); } - late final __objc_msgSend_193Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLBookmarkFileCreationOptions, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + late final _CFCopyTypeIDDescriptionPtr = + _lookup>( + 'CFCopyTypeIDDescription'); + late final _CFCopyTypeIDDescription = + _CFCopyTypeIDDescriptionPtr.asFunction(); - late final _sel_bookmarkDataWithContentsOfURL_error_1 = - _registerName1("bookmarkDataWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_194( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bookmarkFileURL, - ffi.Pointer> error, + CFTypeRef CFRetain( + CFTypeRef cf, ) { - return __objc_msgSend_194( - obj, - sel, - bookmarkFileURL, - error, + return _CFRetain( + cf, ); } - late final __objc_msgSend_194Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + late final _CFRetainPtr = + _lookup>('CFRetain'); + late final _CFRetain = + _CFRetainPtr.asFunction(); - late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = - _registerName1("URLByResolvingAliasFileAtURL:options:error:"); - instancetype _objc_msgSend_195( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer> error, + void CFRelease( + CFTypeRef cf, ) { - return __objc_msgSend_195( - obj, - sel, - url, - options, - error, + return _CFRelease( + cf, ); } - late final __objc_msgSend_195Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + late final _CFReleasePtr = + _lookup>('CFRelease'); + late final _CFRelease = _CFReleasePtr.asFunction(); - late final _sel_startAccessingSecurityScopedResource1 = - _registerName1("startAccessingSecurityScopedResource"); - late final _sel_stopAccessingSecurityScopedResource1 = - _registerName1("stopAccessingSecurityScopedResource"); - late final _sel_getPromisedItemResourceValue_forKey_error_1 = - _registerName1("getPromisedItemResourceValue:forKey:error:"); - late final _sel_promisedItemResourceValuesForKeys_error_1 = - _registerName1("promisedItemResourceValuesForKeys:error:"); - late final _sel_checkPromisedItemIsReachableAndReturnError_1 = - _registerName1("checkPromisedItemIsReachableAndReturnError:"); - late final _sel_fileURLWithPathComponents_1 = - _registerName1("fileURLWithPathComponents:"); - ffi.Pointer _objc_msgSend_196( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer components, + CFTypeRef CFAutorelease( + CFTypeRef arg, ) { - return __objc_msgSend_196( - obj, - sel, - components, + return _CFAutorelease( + arg, ); } - late final __objc_msgSend_196Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFAutoreleasePtr = + _lookup>( + 'CFAutorelease'); + late final _CFAutorelease = + _CFAutoreleasePtr.asFunction(); - late final _sel_pathComponents1 = _registerName1("pathComponents"); - late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); - late final _sel_pathExtension1 = _registerName1("pathExtension"); - late final _sel_URLByAppendingPathComponent_1 = - _registerName1("URLByAppendingPathComponent:"); - late final _sel_URLByAppendingPathComponent_isDirectory_1 = - _registerName1("URLByAppendingPathComponent:isDirectory:"); - late final _sel_URLByDeletingLastPathComponent1 = - _registerName1("URLByDeletingLastPathComponent"); - late final _sel_URLByAppendingPathExtension_1 = - _registerName1("URLByAppendingPathExtension:"); - late final _sel_URLByDeletingPathExtension1 = - _registerName1("URLByDeletingPathExtension"); - late final _sel_URLByStandardizingPath1 = - _registerName1("URLByStandardizingPath"); - late final _sel_URLByResolvingSymlinksInPath1 = - _registerName1("URLByResolvingSymlinksInPath"); - late final _sel_resourceDataUsingCache_1 = - _registerName1("resourceDataUsingCache:"); - ffi.Pointer _objc_msgSend_197( - ffi.Pointer obj, - ffi.Pointer sel, - bool shouldUseCache, + int CFGetRetainCount( + CFTypeRef cf, ) { - return __objc_msgSend_197( - obj, - sel, - shouldUseCache, + return _CFGetRetainCount( + cf, ); } - late final __objc_msgSend_197Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + late final _CFGetRetainCountPtr = + _lookup>( + 'CFGetRetainCount'); + late final _CFGetRetainCount = + _CFGetRetainCountPtr.asFunction(); - late final _sel_loadResourceDataNotifyingClient_usingCache_1 = - _registerName1("loadResourceDataNotifyingClient:usingCache:"); - void _objc_msgSend_198( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer client, - bool shouldUseCache, + int CFEqual( + CFTypeRef cf1, + CFTypeRef cf2, ) { - return __objc_msgSend_198( - obj, - sel, - client, - shouldUseCache, + return _CFEqual( + cf1, + cf2, ); } - late final __objc_msgSend_198Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + late final _CFEqualPtr = + _lookup>( + 'CFEqual'); + late final _CFEqual = + _CFEqualPtr.asFunction(); - late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); - late final _sel_setResourceData_1 = _registerName1("setResourceData:"); - late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); - bool _objc_msgSend_199( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer property, - ffi.Pointer propertyKey, + int CFHash( + CFTypeRef cf, ) { - return __objc_msgSend_199( - obj, - sel, - property, - propertyKey, + return _CFHash( + cf, ); } - late final __objc_msgSend_199Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFHashPtr = + _lookup>('CFHash'); + late final _CFHash = _CFHashPtr.asFunction(); - late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); - late final _sel_registerURLHandleClass_1 = - _registerName1("registerURLHandleClass:"); - void _objc_msgSend_200( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURLHandleSubclass, + CFStringRef CFCopyDescription( + CFTypeRef cf, ) { - return __objc_msgSend_200( - obj, - sel, - anURLHandleSubclass, + return _CFCopyDescription( + cf, ); } - late final __objc_msgSend_200Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _CFCopyDescriptionPtr = + _lookup>( + 'CFCopyDescription'); + late final _CFCopyDescription = + _CFCopyDescriptionPtr.asFunction(); - late final _sel_URLHandleClassForURL_1 = - _registerName1("URLHandleClassForURL:"); - ffi.Pointer _objc_msgSend_201( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, + CFAllocatorRef CFGetAllocator( + CFTypeRef cf, ) { - return __objc_msgSend_201( - obj, - sel, - anURL, + return _CFGetAllocator( + cf, ); } - late final __objc_msgSend_201Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFGetAllocatorPtr = + _lookup>( + 'CFGetAllocator'); + late final _CFGetAllocator = + _CFGetAllocatorPtr.asFunction(); - late final _sel_status1 = _registerName1("status"); - int _objc_msgSend_202( - ffi.Pointer obj, - ffi.Pointer sel, + CFTypeRef CFMakeCollectable( + CFTypeRef cf, ) { - return __objc_msgSend_202( - obj, - sel, + return _CFMakeCollectable( + cf, ); } - late final __objc_msgSend_202Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _CFMakeCollectablePtr = + _lookup>( + 'CFMakeCollectable'); + late final _CFMakeCollectable = + _CFMakeCollectablePtr.asFunction(); - late final _sel_failureReason1 = _registerName1("failureReason"); - late final _sel_addClient_1 = _registerName1("addClient:"); - late final _sel_removeClient_1 = _registerName1("removeClient:"); - late final _sel_loadInBackground1 = _registerName1("loadInBackground"); - late final _sel_cancelLoadInBackground1 = - _registerName1("cancelLoadInBackground"); - late final _sel_resourceData1 = _registerName1("resourceData"); - late final _sel_availableResourceData1 = - _registerName1("availableResourceData"); - late final _sel_expectedResourceDataSize1 = - _registerName1("expectedResourceDataSize"); - late final _sel_flushCachedData1 = _registerName1("flushCachedData"); - late final _sel_backgroundLoadDidFailWithReason_1 = - _registerName1("backgroundLoadDidFailWithReason:"); - late final _sel_didLoadBytes_loadComplete_1 = - _registerName1("didLoadBytes:loadComplete:"); - void _objc_msgSend_203( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer newBytes, - bool yorn, + ffi.Pointer NSDefaultMallocZone() { + return _NSDefaultMallocZone(); + } + + late final _NSDefaultMallocZonePtr = + _lookup Function()>>( + 'NSDefaultMallocZone'); + late final _NSDefaultMallocZone = + _NSDefaultMallocZonePtr.asFunction Function()>(); + + ffi.Pointer NSCreateZone( + int startSize, + int granularity, + bool canFree, ) { - return __objc_msgSend_203( - obj, - sel, - newBytes, - yorn, + return _NSCreateZone( + startSize, + granularity, + canFree, ); } - late final __objc_msgSend_203Ptr = _lookup< + late final _NSCreateZonePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); - bool _objc_msgSend_204( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, + ffi.Pointer Function( + NSUInteger, NSUInteger, ffi.Bool)>>('NSCreateZone'); + late final _NSCreateZone = _NSCreateZonePtr.asFunction< + ffi.Pointer Function(int, int, bool)>(); + + void NSRecycleZone( + ffi.Pointer zone, ) { - return __objc_msgSend_204( - obj, - sel, - anURL, + return _NSRecycleZone( + zone, ); } - late final __objc_msgSend_204Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _NSRecycleZonePtr = + _lookup)>>( + 'NSRecycleZone'); + late final _NSRecycleZone = + _NSRecycleZonePtr.asFunction)>(); - late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); - ffi.Pointer _objc_msgSend_205( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, + void NSSetZoneName( + ffi.Pointer zone, + ffi.Pointer name, ) { - return __objc_msgSend_205( - obj, - sel, - anURL, + return _NSSetZoneName( + zone, + name, ); } - late final __objc_msgSend_205Ptr = _lookup< + late final _NSSetZoneNamePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('NSSetZoneName'); + late final _NSSetZoneName = _NSSetZoneNamePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); - ffi.Pointer _objc_msgSend_206( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, - bool willCache, + ffi.Pointer NSZoneName( + ffi.Pointer zone, ) { - return __objc_msgSend_206( - obj, - sel, - anURL, - willCache, + return _NSZoneName( + zone, ); } - late final __objc_msgSend_206Ptr = _lookup< + late final _NSZoneNamePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Pointer Function(ffi.Pointer)>>('NSZoneName'); + late final _NSZoneName = _NSZoneNamePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_propertyForKeyIfAvailable_1 = - _registerName1("propertyForKeyIfAvailable:"); - late final _sel_writeProperty_forKey_1 = - _registerName1("writeProperty:forKey:"); - late final _sel_writeData_1 = _registerName1("writeData:"); - late final _sel_loadInForeground1 = _registerName1("loadInForeground"); - late final _sel_beginLoadInBackground1 = - _registerName1("beginLoadInBackground"); - late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); - late final _sel_URLHandleUsingCache_1 = - _registerName1("URLHandleUsingCache:"); - ffi.Pointer _objc_msgSend_207( - ffi.Pointer obj, - ffi.Pointer sel, - bool shouldUseCache, + ffi.Pointer NSZoneFromPointer( + ffi.Pointer ptr, ) { - return __objc_msgSend_207( - obj, - sel, - shouldUseCache, + return _NSZoneFromPointer( + ptr, ); } - late final __objc_msgSend_207Ptr = _lookup< + late final _NSZoneFromPointerPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSZoneFromPointer'); + late final _NSZoneFromPointer = _NSZoneFromPointerPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_writeToFile_options_error_1 = - _registerName1("writeToFile:options:error:"); - bool _objc_msgSend_208( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - int writeOptionsMask, - ffi.Pointer> errorPtr, + ffi.Pointer NSZoneMalloc( + ffi.Pointer zone, + int size, ) { - return __objc_msgSend_208( - obj, - sel, - path, - writeOptionsMask, - errorPtr, + return _NSZoneMalloc( + zone, + size, ); } - late final __objc_msgSend_208Ptr = _lookup< + late final _NSZoneMallocPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Pointer Function( + ffi.Pointer, NSUInteger)>>('NSZoneMalloc'); + late final _NSZoneMalloc = _NSZoneMallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int)>(); - late final _sel_writeToURL_options_error_1 = - _registerName1("writeToURL:options:error:"); - bool _objc_msgSend_209( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int writeOptionsMask, - ffi.Pointer> errorPtr, + ffi.Pointer NSZoneCalloc( + ffi.Pointer zone, + int numElems, + int byteSize, ) { - return __objc_msgSend_209( - obj, - sel, - url, - writeOptionsMask, - errorPtr, + return _NSZoneCalloc( + zone, + numElems, + byteSize, ); } - late final __objc_msgSend_209Ptr = _lookup< + late final _NSZoneCallocPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Pointer Function( + ffi.Pointer, NSUInteger, NSUInteger)>>('NSZoneCalloc'); + late final _NSZoneCalloc = _NSZoneCallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - late final _sel_rangeOfData_options_range_1 = - _registerName1("rangeOfData:options:range:"); - NSRange _objc_msgSend_210( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataToFind, - int mask, - NSRange searchRange, + ffi.Pointer NSZoneRealloc( + ffi.Pointer zone, + ffi.Pointer ptr, + int size, ) { - return __objc_msgSend_210( - obj, - sel, - dataToFind, - mask, - searchRange, + return _NSZoneRealloc( + zone, + ptr, + size, ); } - late final __objc_msgSend_210Ptr = _lookup< + late final _NSZoneReallocPtr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('NSZoneRealloc'); + late final _NSZoneRealloc = _NSZoneReallocPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_enumerateByteRangesUsingBlock_1 = - _registerName1("enumerateByteRangesUsingBlock:"); - void _objc_msgSend_211( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + void NSZoneFree( + ffi.Pointer zone, + ffi.Pointer ptr, ) { - return __objc_msgSend_211( - obj, - sel, - block, + return _NSZoneFree( + zone, + ptr, ); } - late final __objc_msgSend_211Ptr = _lookup< + late final _NSZoneFreePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('NSZoneFree'); + late final _NSZoneFree = _NSZoneFreePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_data1 = _registerName1("data"); - late final _sel_dataWithBytes_length_1 = - _registerName1("dataWithBytes:length:"); - instancetype _objc_msgSend_212( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, + ffi.Pointer NSAllocateCollectable( + int size, + int options, ) { - return __objc_msgSend_212( - obj, - sel, - bytes, - length, + return _NSAllocateCollectable( + size, + options, ); } - late final __objc_msgSend_212Ptr = _lookup< + late final _NSAllocateCollectablePtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function( + NSUInteger, NSUInteger)>>('NSAllocateCollectable'); + late final _NSAllocateCollectable = _NSAllocateCollectablePtr.asFunction< + ffi.Pointer Function(int, int)>(); - late final _sel_dataWithBytesNoCopy_length_1 = - _registerName1("dataWithBytesNoCopy:length:"); - late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = - _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_213( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool b, + ffi.Pointer NSReallocateCollectable( + ffi.Pointer ptr, + int size, + int options, ) { - return __objc_msgSend_213( - obj, - sel, - bytes, - length, - b, + return _NSReallocateCollectable( + ptr, + size, + options, ); } - late final __objc_msgSend_213Ptr = _lookup< + late final _NSReallocateCollectablePtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); + ffi.Pointer Function(ffi.Pointer, NSUInteger, + NSUInteger)>>('NSReallocateCollectable'); + late final _NSReallocateCollectable = _NSReallocateCollectablePtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - late final _sel_dataWithContentsOfFile_options_error_1 = - _registerName1("dataWithContentsOfFile:options:error:"); - instancetype _objc_msgSend_214( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - int readOptionsMask, - ffi.Pointer> errorPtr, + int NSPageSize() { + return _NSPageSize(); + } + + late final _NSPageSizePtr = + _lookup>('NSPageSize'); + late final _NSPageSize = _NSPageSizePtr.asFunction(); + + int NSLogPageSize() { + return _NSLogPageSize(); + } + + late final _NSLogPageSizePtr = + _lookup>('NSLogPageSize'); + late final _NSLogPageSize = _NSLogPageSizePtr.asFunction(); + + int NSRoundUpToMultipleOfPageSize( + int bytes, ) { - return __objc_msgSend_214( - obj, - sel, - path, - readOptionsMask, - errorPtr, + return _NSRoundUpToMultipleOfPageSize( + bytes, ); } - late final __objc_msgSend_214Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + late final _NSRoundUpToMultipleOfPageSizePtr = + _lookup>( + 'NSRoundUpToMultipleOfPageSize'); + late final _NSRoundUpToMultipleOfPageSize = + _NSRoundUpToMultipleOfPageSizePtr.asFunction(); - late final _sel_dataWithContentsOfURL_options_error_1 = - _registerName1("dataWithContentsOfURL:options:error:"); - instancetype _objc_msgSend_215( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int readOptionsMask, - ffi.Pointer> errorPtr, + int NSRoundDownToMultipleOfPageSize( + int bytes, ) { - return __objc_msgSend_215( - obj, - sel, - url, - readOptionsMask, - errorPtr, + return _NSRoundDownToMultipleOfPageSize( + bytes, ); } - late final __objc_msgSend_215Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + late final _NSRoundDownToMultipleOfPageSizePtr = + _lookup>( + 'NSRoundDownToMultipleOfPageSize'); + late final _NSRoundDownToMultipleOfPageSize = + _NSRoundDownToMultipleOfPageSizePtr.asFunction(); - late final _sel_dataWithContentsOfFile_1 = - _registerName1("dataWithContentsOfFile:"); - late final _sel_dataWithContentsOfURL_1 = - _registerName1("dataWithContentsOfURL:"); - late final _sel_initWithBytes_length_1 = - _registerName1("initWithBytes:length:"); - late final _sel_initWithBytesNoCopy_length_1 = - _registerName1("initWithBytesNoCopy:length:"); - late final _sel_initWithBytesNoCopy_length_freeWhenDone_1 = - _registerName1("initWithBytesNoCopy:length:freeWhenDone:"); - late final _sel_initWithBytesNoCopy_length_deallocator_1 = - _registerName1("initWithBytesNoCopy:length:deallocator:"); - instancetype _objc_msgSend_216( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - ffi.Pointer<_ObjCBlock> deallocator, + ffi.Pointer NSAllocateMemoryPages( + int bytes, ) { - return __objc_msgSend_216( - obj, - sel, + return _NSAllocateMemoryPages( bytes, - length, - deallocator, ); } - late final __objc_msgSend_216Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + late final _NSAllocateMemoryPagesPtr = + _lookup Function(NSUInteger)>>( + 'NSAllocateMemoryPages'); + late final _NSAllocateMemoryPages = _NSAllocateMemoryPagesPtr.asFunction< + ffi.Pointer Function(int)>(); - late final _sel_initWithContentsOfFile_options_error_1 = - _registerName1("initWithContentsOfFile:options:error:"); - late final _sel_initWithContentsOfURL_options_error_1 = - _registerName1("initWithContentsOfURL:options:error:"); - late final _sel_initWithData_1 = _registerName1("initWithData:"); - instancetype _objc_msgSend_217( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, + void NSDeallocateMemoryPages( + ffi.Pointer ptr, + int bytes, ) { - return __objc_msgSend_217( - obj, - sel, - data, + return _NSDeallocateMemoryPages( + ptr, + bytes, ); } - late final __objc_msgSend_217Ptr = _lookup< + late final _NSDeallocateMemoryPagesPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, NSUInteger)>>('NSDeallocateMemoryPages'); + late final _NSDeallocateMemoryPages = _NSDeallocateMemoryPagesPtr.asFunction< + void Function(ffi.Pointer, int)>(); - late final _sel_dataWithData_1 = _registerName1("dataWithData:"); - late final _sel_initWithBase64EncodedString_options_1 = - _registerName1("initWithBase64EncodedString:options:"); - instancetype _objc_msgSend_218( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer base64String, - int options, + void NSCopyMemoryPages( + ffi.Pointer source, + ffi.Pointer dest, + int bytes, ) { - return __objc_msgSend_218( - obj, - sel, - base64String, - options, + return _NSCopyMemoryPages( + source, + dest, + bytes, ); } - late final __objc_msgSend_218Ptr = _lookup< + late final _NSCopyMemoryPagesPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('NSCopyMemoryPages'); + late final _NSCopyMemoryPages = _NSCopyMemoryPagesPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_base64EncodedStringWithOptions_1 = - _registerName1("base64EncodedStringWithOptions:"); - ffi.Pointer _objc_msgSend_219( - ffi.Pointer obj, - ffi.Pointer sel, - int options, + int NSRealMemoryAvailable() { + return _NSRealMemoryAvailable(); + } + + late final _NSRealMemoryAvailablePtr = + _lookup>( + 'NSRealMemoryAvailable'); + late final _NSRealMemoryAvailable = + _NSRealMemoryAvailablePtr.asFunction(); + + ffi.Pointer NSAllocateObject( + ffi.Pointer aClass, + int extraBytes, + ffi.Pointer zone, ) { - return __objc_msgSend_219( - obj, - sel, - options, + return _NSAllocateObject( + aClass, + extraBytes, + zone, ); } - late final __objc_msgSend_219Ptr = _lookup< + late final _NSAllocateObjectPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, NSUInteger, + ffi.Pointer)>>('NSAllocateObject'); + late final _NSAllocateObject = _NSAllocateObjectPtr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer, int, ffi.Pointer)>(); - late final _sel_initWithBase64EncodedData_options_1 = - _registerName1("initWithBase64EncodedData:options:"); - instancetype _objc_msgSend_220( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer base64Data, - int options, + void NSDeallocateObject( + ffi.Pointer object, ) { - return __objc_msgSend_220( - obj, - sel, - base64Data, - options, + return _NSDeallocateObject( + object, ); } - late final __objc_msgSend_220Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _NSDeallocateObjectPtr = + _lookup)>>( + 'NSDeallocateObject'); + late final _NSDeallocateObject = _NSDeallocateObjectPtr.asFunction< + void Function(ffi.Pointer)>(); - late final _sel_base64EncodedDataWithOptions_1 = - _registerName1("base64EncodedDataWithOptions:"); - ffi.Pointer _objc_msgSend_221( - ffi.Pointer obj, - ffi.Pointer sel, - int options, + ffi.Pointer NSCopyObject( + ffi.Pointer object, + int extraBytes, + ffi.Pointer zone, ) { - return __objc_msgSend_221( - obj, - sel, - options, + return _NSCopyObject( + object, + extraBytes, + zone, ); } - late final __objc_msgSend_221Ptr = _lookup< + late final _NSCopyObjectPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, NSUInteger, + ffi.Pointer)>>('NSCopyObject'); + late final _NSCopyObject = _NSCopyObjectPtr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer, int, ffi.Pointer)>(); - late final _sel_decompressedDataUsingAlgorithm_error_1 = - _registerName1("decompressedDataUsingAlgorithm:error:"); - instancetype _objc_msgSend_222( - ffi.Pointer obj, - ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, + bool NSShouldRetainWithZone( + ffi.Pointer anObject, + ffi.Pointer requestedZone, ) { - return __objc_msgSend_222( - obj, - sel, - algorithm, - error, + return _NSShouldRetainWithZone( + anObject, + requestedZone, ); } - late final __objc_msgSend_222Ptr = _lookup< + late final _NSShouldRetainWithZonePtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>('NSShouldRetainWithZone'); + late final _NSShouldRetainWithZone = _NSShouldRetainWithZonePtr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_compressedDataUsingAlgorithm_error_1 = - _registerName1("compressedDataUsingAlgorithm:error:"); - late final _sel_getBytes_1 = _registerName1("getBytes:"); - late final _sel_dataWithContentsOfMappedFile_1 = - _registerName1("dataWithContentsOfMappedFile:"); - late final _sel_initWithContentsOfMappedFile_1 = - _registerName1("initWithContentsOfMappedFile:"); - late final _sel_initWithBase64Encoding_1 = - _registerName1("initWithBase64Encoding:"); - late final _sel_base64Encoding1 = _registerName1("base64Encoding"); - late final _sel_characterSetWithBitmapRepresentation_1 = - _registerName1("characterSetWithBitmapRepresentation:"); - ffi.Pointer _objc_msgSend_223( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, + void NSIncrementExtraRefCount( + ffi.Pointer object, ) { - return __objc_msgSend_223( - obj, - sel, - data, + return _NSIncrementExtraRefCount( + object, ); } - late final __objc_msgSend_223Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _NSIncrementExtraRefCountPtr = + _lookup)>>( + 'NSIncrementExtraRefCount'); + late final _NSIncrementExtraRefCount = _NSIncrementExtraRefCountPtr + .asFunction)>(); - late final _sel_characterSetWithContentsOfFile_1 = - _registerName1("characterSetWithContentsOfFile:"); - late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); - bool _objc_msgSend_224( - ffi.Pointer obj, - ffi.Pointer sel, - int aCharacter, + bool NSDecrementExtraRefCountWasZero( + ffi.Pointer object, ) { - return __objc_msgSend_224( - obj, - sel, - aCharacter, + return _NSDecrementExtraRefCountWasZero( + object, ); } - late final __objc_msgSend_224Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - unichar)>>('objc_msgSend'); - late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _NSDecrementExtraRefCountWasZeroPtr = + _lookup)>>( + 'NSDecrementExtraRefCountWasZero'); + late final _NSDecrementExtraRefCountWasZero = + _NSDecrementExtraRefCountWasZeroPtr.asFunction< + bool Function(ffi.Pointer)>(); - late final _sel_bitmapRepresentation1 = - _registerName1("bitmapRepresentation"); - late final _sel_invertedSet1 = _registerName1("invertedSet"); - late final _sel_longCharacterIsMember_1 = - _registerName1("longCharacterIsMember:"); - bool _objc_msgSend_225( - ffi.Pointer obj, - ffi.Pointer sel, - int theLongChar, + int NSExtraRefCount( + ffi.Pointer object, ) { - return __objc_msgSend_225( - obj, - sel, - theLongChar, + return _NSExtraRefCount( + object, ); } - late final __objc_msgSend_225Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - UTF32Char)>>('objc_msgSend'); - late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _NSExtraRefCountPtr = + _lookup)>>( + 'NSExtraRefCount'); + late final _NSExtraRefCount = + _NSExtraRefCountPtr.asFunction)>(); - late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); - bool _objc_msgSend_226( + NSRange NSUnionRange( + NSRange range1, + NSRange range2, + ) { + return _NSUnionRange( + range1, + range2, + ); + } + + late final _NSUnionRangePtr = + _lookup>( + 'NSUnionRange'); + late final _NSUnionRange = + _NSUnionRangePtr.asFunction(); + + NSRange NSIntersectionRange( + NSRange range1, + NSRange range2, + ) { + return _NSIntersectionRange( + range1, + range2, + ); + } + + late final _NSIntersectionRangePtr = + _lookup>( + 'NSIntersectionRange'); + late final _NSIntersectionRange = + _NSIntersectionRangePtr.asFunction(); + + ffi.Pointer NSStringFromRange( + NSRange range, + ) { + return _NSStringFromRange( + range, + ); + } + + late final _NSStringFromRangePtr = + _lookup Function(NSRange)>>( + 'NSStringFromRange'); + late final _NSStringFromRange = _NSStringFromRangePtr.asFunction< + ffi.Pointer Function(NSRange)>(); + + NSRange NSRangeFromString( + ffi.Pointer aString, + ) { + return _NSRangeFromString( + aString, + ); + } + + late final _NSRangeFromStringPtr = + _lookup)>>( + 'NSRangeFromString'); + late final _NSRangeFromString = _NSRangeFromStringPtr.asFunction< + NSRange Function(ffi.Pointer)>(); + + late final _class_NSMutableIndexSet1 = _getClass1("NSMutableIndexSet"); + late final _sel_addIndexes_1 = _registerName1("addIndexes:"); + void _objc_msgSend_281( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer theOtherSet, + ffi.Pointer indexSet, ) { - return __objc_msgSend_226( + return __objc_msgSend_281( obj, sel, - theOtherSet, + indexSet, ); } - late final __objc_msgSend_226Ptr = _lookup< + late final __objc_msgSend_281Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); - bool _objc_msgSend_227( + late final _sel_removeIndexes_1 = _registerName1("removeIndexes:"); + late final _sel_removeAllIndexes1 = _registerName1("removeAllIndexes"); + late final _sel_addIndex_1 = _registerName1("addIndex:"); + void _objc_msgSend_282( ffi.Pointer obj, ffi.Pointer sel, - int thePlane, + int value, ) { - return __objc_msgSend_227( + return __objc_msgSend_282( obj, sel, - thePlane, + value, ); } - late final __objc_msgSend_227Ptr = _lookup< + late final __objc_msgSend_282Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Uint8)>>('objc_msgSend'); - late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_URLUserAllowedCharacterSet1 = - _registerName1("URLUserAllowedCharacterSet"); - late final _sel_URLPasswordAllowedCharacterSet1 = - _registerName1("URLPasswordAllowedCharacterSet"); - late final _sel_URLHostAllowedCharacterSet1 = - _registerName1("URLHostAllowedCharacterSet"); - late final _sel_URLPathAllowedCharacterSet1 = - _registerName1("URLPathAllowedCharacterSet"); - late final _sel_URLQueryAllowedCharacterSet1 = - _registerName1("URLQueryAllowedCharacterSet"); - late final _sel_URLFragmentAllowedCharacterSet1 = - _registerName1("URLFragmentAllowedCharacterSet"); - late final _sel_rangeOfCharacterFromSet_1 = - _registerName1("rangeOfCharacterFromSet:"); - NSRange _objc_msgSend_228( + late final _sel_removeIndex_1 = _registerName1("removeIndex:"); + late final _sel_addIndexesInRange_1 = _registerName1("addIndexesInRange:"); + void _objc_msgSend_283( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchSet, + NSRange range, ) { - return __objc_msgSend_228( + return __objc_msgSend_283( obj, sel, - searchSet, + range, ); } - late final __objc_msgSend_228Ptr = _lookup< + late final __objc_msgSend_283Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_rangeOfCharacterFromSet_options_1 = - _registerName1("rangeOfCharacterFromSet:options:"); - NSRange _objc_msgSend_229( + late final _sel_removeIndexesInRange_1 = + _registerName1("removeIndexesInRange:"); + late final _sel_shiftIndexesStartingAtIndex_by_1 = + _registerName1("shiftIndexesStartingAtIndex:by:"); + void _objc_msgSend_284( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, + int index, + int delta, ) { - return __objc_msgSend_229( + return __objc_msgSend_284( obj, sel, - searchSet, - mask, + index, + delta, ); } - late final __objc_msgSend_229Ptr = _lookup< + late final __objc_msgSend_284Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - late final _sel_rangeOfCharacterFromSet_options_range_1 = - _registerName1("rangeOfCharacterFromSet:options:range:"); - NSRange _objc_msgSend_230( + late final _class_NSMutableArray1 = _getClass1("NSMutableArray"); + late final _sel_addObject_1 = _registerName1("addObject:"); + late final _sel_insertObject_atIndex_1 = + _registerName1("insertObject:atIndex:"); + void _objc_msgSend_285( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - NSRange rangeOfReceiverToSearch, + ffi.Pointer anObject, + int index, ) { - return __objc_msgSend_230( + return __objc_msgSend_285( obj, sel, - searchSet, - mask, - rangeOfReceiverToSearch, + anObject, + index, ); } - late final __objc_msgSend_230Ptr = _lookup< + late final __objc_msgSend_285Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = - _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); - NSRange _objc_msgSend_231( + late final _sel_removeLastObject1 = _registerName1("removeLastObject"); + late final _sel_removeObjectAtIndex_1 = + _registerName1("removeObjectAtIndex:"); + late final _sel_replaceObjectAtIndex_withObject_1 = + _registerName1("replaceObjectAtIndex:withObject:"); + void _objc_msgSend_286( ffi.Pointer obj, ffi.Pointer sel, int index, + ffi.Pointer anObject, ) { - return __objc_msgSend_231( + return __objc_msgSend_286( obj, sel, index, + anObject, ); } - late final __objc_msgSend_231Ptr = _lookup< + late final __objc_msgSend_286Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); - late final _sel_rangeOfComposedCharacterSequencesForRange_1 = - _registerName1("rangeOfComposedCharacterSequencesForRange:"); - NSRange _objc_msgSend_232( + late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); + late final _sel_addObjectsFromArray_1 = + _registerName1("addObjectsFromArray:"); + void _objc_msgSend_287( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + ffi.Pointer otherArray, ) { - return __objc_msgSend_232( + return __objc_msgSend_287( obj, sel, - range, + otherArray, ); } - late final __objc_msgSend_232Ptr = _lookup< + late final __objc_msgSend_287Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< - NSRange Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_stringByAppendingString_1 = - _registerName1("stringByAppendingString:"); - late final _sel_stringByAppendingFormat_1 = - _registerName1("stringByAppendingFormat:"); - late final _sel_uppercaseString1 = _registerName1("uppercaseString"); - late final _sel_lowercaseString1 = _registerName1("lowercaseString"); - late final _sel_capitalizedString1 = _registerName1("capitalizedString"); - late final _sel_localizedUppercaseString1 = - _registerName1("localizedUppercaseString"); - late final _sel_localizedLowercaseString1 = - _registerName1("localizedLowercaseString"); - late final _sel_localizedCapitalizedString1 = - _registerName1("localizedCapitalizedString"); - late final _sel_uppercaseStringWithLocale_1 = - _registerName1("uppercaseStringWithLocale:"); - ffi.Pointer _objc_msgSend_233( + late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = + _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); + void _objc_msgSend_288( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer locale, + int idx1, + int idx2, ) { - return __objc_msgSend_233( + return __objc_msgSend_288( obj, sel, - locale, + idx1, + idx2, ); } - late final __objc_msgSend_233Ptr = _lookup< + late final __objc_msgSend_288Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - late final _sel_lowercaseStringWithLocale_1 = - _registerName1("lowercaseStringWithLocale:"); - late final _sel_capitalizedStringWithLocale_1 = - _registerName1("capitalizedStringWithLocale:"); - late final _sel_getLineStart_end_contentsEnd_forRange_1 = - _registerName1("getLineStart:end:contentsEnd:forRange:"); - void _objc_msgSend_234( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - NSRange range, - ) { - return __objc_msgSend_234( - obj, - sel, - startPtr, - lineEndPtr, - contentsEndPtr, - range, - ); - } - - late final __objc_msgSend_234Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange)>(); - - late final _sel_lineRangeForRange_1 = _registerName1("lineRangeForRange:"); - late final _sel_getParagraphStart_end_contentsEnd_forRange_1 = - _registerName1("getParagraphStart:end:contentsEnd:forRange:"); - late final _sel_paragraphRangeForRange_1 = - _registerName1("paragraphRangeForRange:"); - late final _sel_enumerateSubstringsInRange_options_usingBlock_1 = - _registerName1("enumerateSubstringsInRange:options:usingBlock:"); - void _objc_msgSend_235( + late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); + late final _sel_removeObject_inRange_1 = + _registerName1("removeObject:inRange:"); + void _objc_msgSend_289( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer anObject, NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_235( + return __objc_msgSend_289( obj, sel, + anObject, range, - opts, - block, ); } - late final __objc_msgSend_235Ptr = _lookup< + late final __objc_msgSend_289Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - late final _sel_enumerateLinesUsingBlock_1 = - _registerName1("enumerateLinesUsingBlock:"); - void _objc_msgSend_236( + late final _sel_removeObject_1 = _registerName1("removeObject:"); + late final _sel_removeObjectIdenticalTo_inRange_1 = + _registerName1("removeObjectIdenticalTo:inRange:"); + late final _sel_removeObjectIdenticalTo_1 = + _registerName1("removeObjectIdenticalTo:"); + late final _sel_removeObjectsFromIndices_numIndices_1 = + _registerName1("removeObjectsFromIndices:numIndices:"); + void _objc_msgSend_290( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer indices, + int cnt, ) { - return __objc_msgSend_236( + return __objc_msgSend_290( obj, sel, - block, + indices, + cnt, ); } - late final __objc_msgSend_236Ptr = _lookup< + late final __objc_msgSend_290Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, int)>(); - late final _sel_UTF8String1 = _registerName1("UTF8String"); - late final _sel_fastestEncoding1 = _registerName1("fastestEncoding"); - late final _sel_smallestEncoding1 = _registerName1("smallestEncoding"); - late final _sel_dataUsingEncoding_allowLossyConversion_1 = - _registerName1("dataUsingEncoding:allowLossyConversion:"); - ffi.Pointer _objc_msgSend_237( + late final _sel_removeObjectsInArray_1 = + _registerName1("removeObjectsInArray:"); + late final _sel_removeObjectsInRange_1 = + _registerName1("removeObjectsInRange:"); + late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = + _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); + void _objc_msgSend_291( ffi.Pointer obj, ffi.Pointer sel, - int encoding, - bool lossy, + NSRange range, + ffi.Pointer otherArray, + NSRange otherRange, ) { - return __objc_msgSend_237( + return __objc_msgSend_291( obj, sel, - encoding, - lossy, + range, + otherArray, + otherRange, ); } - late final __objc_msgSend_237Ptr = _lookup< + late final __objc_msgSend_291Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSStringEncoding, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, bool)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer, NSRange)>(); - late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); - ffi.Pointer _objc_msgSend_238( + late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = + _registerName1("replaceObjectsInRange:withObjectsFromArray:"); + void _objc_msgSend_292( ffi.Pointer obj, ffi.Pointer sel, - int encoding, + NSRange range, + ffi.Pointer otherArray, ) { - return __objc_msgSend_238( + return __objc_msgSend_292( obj, sel, - encoding, + range, + otherArray, ); } - late final __objc_msgSend_238Ptr = _lookup< + late final __objc_msgSend_292Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); - late final _sel_canBeConvertedToEncoding_1 = - _registerName1("canBeConvertedToEncoding:"); - late final _sel_cStringUsingEncoding_1 = - _registerName1("cStringUsingEncoding:"); - ffi.Pointer _objc_msgSend_239( + late final _sel_setArray_1 = _registerName1("setArray:"); + late final _sel_sortUsingFunction_context_1 = + _registerName1("sortUsingFunction:context:"); + void _objc_msgSend_293( ffi.Pointer obj, ffi.Pointer sel, - int encoding, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context, ) { - return __objc_msgSend_239( + return __objc_msgSend_293( obj, sel, - encoding, + compare, + context, ); } - late final __objc_msgSend_239Ptr = _lookup< + late final __objc_msgSend_293Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); - late final _sel_getCString_maxLength_encoding_1 = - _registerName1("getCString:maxLength:encoding:"); - bool _objc_msgSend_240( + late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); + late final _sel_insertObjects_atIndexes_1 = + _registerName1("insertObjects:atIndexes:"); + void _objc_msgSend_294( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - int encoding, + ffi.Pointer objects, + ffi.Pointer indexes, ) { - return __objc_msgSend_240( + return __objc_msgSend_294( obj, sel, - buffer, - maxBufferCount, - encoding, + objects, + indexes, ); } - late final __objc_msgSend_240Ptr = _lookup< + late final __objc_msgSend_294Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1 = - _registerName1( - "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); - bool _objc_msgSend_241( + late final _sel_removeObjectsAtIndexes_1 = + _registerName1("removeObjectsAtIndexes:"); + late final _sel_replaceObjectsAtIndexes_withObjects_1 = + _registerName1("replaceObjectsAtIndexes:withObjects:"); + void _objc_msgSend_295( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, - NSRange range, - NSRangePointer leftover, + ffi.Pointer indexes, + ffi.Pointer objects, ) { - return __objc_msgSend_241( + return __objc_msgSend_295( obj, sel, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover, + indexes, + objects, ); } - late final __objc_msgSend_241Ptr = _lookup< + late final __objc_msgSend_295Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - NSStringEncoding, - ffi.Int32, - NSRange, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - int, - NSRange, - NSRangePointer)>(); + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_maximumLengthOfBytesUsingEncoding_1 = - _registerName1("maximumLengthOfBytesUsingEncoding:"); - late final _sel_lengthOfBytesUsingEncoding_1 = - _registerName1("lengthOfBytesUsingEncoding:"); - late final _sel_availableStringEncodings1 = - _registerName1("availableStringEncodings"); - ffi.Pointer _objc_msgSend_242( + late final _sel_setObject_atIndexedSubscript_1 = + _registerName1("setObject:atIndexedSubscript:"); + late final _sel_sortUsingComparator_1 = + _registerName1("sortUsingComparator:"); + void _objc_msgSend_296( ffi.Pointer obj, ffi.Pointer sel, + NSComparator cmptr, ) { - return __objc_msgSend_242( + return __objc_msgSend_296( obj, sel, + cmptr, ); } - late final __objc_msgSend_242Ptr = _lookup< + late final __objc_msgSend_296Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, NSComparator)>(); - late final _sel_localizedNameOfStringEncoding_1 = - _registerName1("localizedNameOfStringEncoding:"); - late final _sel_defaultCStringEncoding1 = - _registerName1("defaultCStringEncoding"); - late final _sel_decomposedStringWithCanonicalMapping1 = - _registerName1("decomposedStringWithCanonicalMapping"); - late final _sel_precomposedStringWithCanonicalMapping1 = - _registerName1("precomposedStringWithCanonicalMapping"); - late final _sel_decomposedStringWithCompatibilityMapping1 = - _registerName1("decomposedStringWithCompatibilityMapping"); - late final _sel_precomposedStringWithCompatibilityMapping1 = - _registerName1("precomposedStringWithCompatibilityMapping"); - late final _sel_componentsSeparatedByString_1 = - _registerName1("componentsSeparatedByString:"); - late final _sel_componentsSeparatedByCharactersInSet_1 = - _registerName1("componentsSeparatedByCharactersInSet:"); - ffi.Pointer _objc_msgSend_243( + late final _sel_sortWithOptions_usingComparator_1 = + _registerName1("sortWithOptions:usingComparator:"); + void _objc_msgSend_297( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer separator, + int opts, + NSComparator cmptr, ) { - return __objc_msgSend_243( + return __objc_msgSend_297( obj, sel, - separator, + opts, + cmptr, ); } - late final __objc_msgSend_243Ptr = _lookup< + late final __objc_msgSend_297Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, int, NSComparator)>(); - late final _sel_stringByTrimmingCharactersInSet_1 = - _registerName1("stringByTrimmingCharactersInSet:"); - ffi.Pointer _objc_msgSend_244( + late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); + ffi.Pointer _objc_msgSend_298( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer set1, + ffi.Pointer path, ) { - return __objc_msgSend_244( + return __objc_msgSend_298( obj, sel, - set1, + path, ); } - late final __objc_msgSend_244Ptr = _lookup< + late final __objc_msgSend_298Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< + late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_stringByPaddingToLength_withString_startingAtIndex_1 = - _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); - ffi.Pointer _objc_msgSend_245( + ffi.Pointer _objc_msgSend_299( ffi.Pointer obj, ffi.Pointer sel, - int newLength, - ffi.Pointer padString, - int padIndex, + ffi.Pointer url, ) { - return __objc_msgSend_245( + return __objc_msgSend_299( obj, sel, - newLength, - padString, - padIndex, + url, ); } - late final __objc_msgSend_245Ptr = _lookup< + late final __objc_msgSend_299Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_stringByFoldingWithOptions_locale_1 = - _registerName1("stringByFoldingWithOptions:locale:"); - ffi.Pointer _objc_msgSend_246( + late final _sel_applyDifference_1 = _registerName1("applyDifference:"); + void _objc_msgSend_300( ffi.Pointer obj, ffi.Pointer sel, - int options, - ffi.Pointer locale, + ffi.Pointer difference, ) { - return __objc_msgSend_246( + return __objc_msgSend_300( obj, sel, - options, - locale, + difference, ); } - late final __objc_msgSend_246Ptr = _lookup< + late final __objc_msgSend_300Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); + late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_1 = - _registerName1( - "stringByReplacingOccurrencesOfString:withString:options:range:"); - ffi.Pointer _objc_msgSend_247( + late final _class_NSMutableData1 = _getClass1("NSMutableData"); + late final _sel_mutableBytes1 = _registerName1("mutableBytes"); + late final _sel_setLength_1 = _registerName1("setLength:"); + void _objc_msgSend_301( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - NSRange searchRange, + int value, ) { - return __objc_msgSend_247( + return __objc_msgSend_301( obj, sel, - target, - replacement, - options, - searchRange, + value, ); } - late final __objc_msgSend_247Ptr = _lookup< + late final __objc_msgSend_301Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - NSRange)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_stringByReplacingOccurrencesOfString_withString_1 = - _registerName1("stringByReplacingOccurrencesOfString:withString:"); - ffi.Pointer _objc_msgSend_248( + late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); + late final _sel_appendData_1 = _registerName1("appendData:"); + void _objc_msgSend_302( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, + ffi.Pointer other, ) { - return __objc_msgSend_248( + return __objc_msgSend_302( obj, sel, - target, - replacement, + other, ); } - late final __objc_msgSend_248Ptr = _lookup< + late final __objc_msgSend_302Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_stringByReplacingCharactersInRange_withString_1 = - _registerName1("stringByReplacingCharactersInRange:withString:"); - ffi.Pointer _objc_msgSend_249( + late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); + late final _sel_replaceBytesInRange_withBytes_1 = + _registerName1("replaceBytesInRange:withBytes:"); + void _objc_msgSend_303( ffi.Pointer obj, ffi.Pointer sel, NSRange range, - ffi.Pointer replacement, + ffi.Pointer bytes, ) { - return __objc_msgSend_249( + return __objc_msgSend_303( obj, sel, range, - replacement, + bytes, ); } - late final __objc_msgSend_249Ptr = _lookup< + late final __objc_msgSend_303Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); - late final _sel_stringByApplyingTransform_reverse_1 = - _registerName1("stringByApplyingTransform:reverse:"); - ffi.Pointer _objc_msgSend_250( + late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); + late final _sel_setData_1 = _registerName1("setData:"); + late final _sel_replaceBytesInRange_withBytes_length_1 = + _registerName1("replaceBytesInRange:withBytes:length:"); + void _objc_msgSend_304( ffi.Pointer obj, ffi.Pointer sel, - NSStringTransform transform, - bool reverse, + NSRange range, + ffi.Pointer replacementBytes, + int replacementLength, ) { - return __objc_msgSend_250( + return __objc_msgSend_304( obj, sel, - transform, - reverse, + range, + replacementBytes, + replacementLength, ); } - late final __objc_msgSend_250Ptr = _lookup< + late final __objc_msgSend_304Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSStringTransform, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringTransform, bool)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer, int)>(); - late final _sel_writeToURL_atomically_encoding_error_1 = - _registerName1("writeToURL:atomically:encoding:error:"); - bool _objc_msgSend_251( + late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); + late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); + late final _sel_initWithLength_1 = _registerName1("initWithLength:"); + late final _sel_decompressUsingAlgorithm_error_1 = + _registerName1("decompressUsingAlgorithm:error:"); + bool _objc_msgSend_305( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - bool useAuxiliaryFile, - int enc, + int algorithm, ffi.Pointer> error, ) { - return __objc_msgSend_251( + return __objc_msgSend_305( obj, sel, - url, - useAuxiliaryFile, - enc, + algorithm, error, ); } - late final __objc_msgSend_251Ptr = _lookup< + late final __objc_msgSend_305Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool, - NSStringEncoding, + ffi.Int32, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, + late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer>)>(); - late final _sel_writeToFile_atomically_encoding_error_1 = - _registerName1("writeToFile:atomically:encoding:error:"); - bool _objc_msgSend_252( + late final _sel_compressUsingAlgorithm_error_1 = + _registerName1("compressUsingAlgorithm:error:"); + late final _class_NSPurgeableData1 = _getClass1("NSPurgeableData"); + late final _class_NSMutableDictionary1 = _getClass1("NSMutableDictionary"); + late final _sel_removeObjectForKey_1 = _registerName1("removeObjectForKey:"); + late final _sel_setObject_forKey_1 = _registerName1("setObject:forKey:"); + void _objc_msgSend_306( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error, + ffi.Pointer anObject, + ffi.Pointer aKey, ) { - return __objc_msgSend_252( + return __objc_msgSend_306( obj, sel, - path, - useAuxiliaryFile, - enc, - error, + anObject, + aKey, ); } - late final __objc_msgSend_252Ptr = _lookup< + late final __objc_msgSend_306Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Bool, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithCharactersNoCopy_length_freeWhenDone_1 = - _registerName1("initWithCharactersNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_253( + late final _sel_addEntriesFromDictionary_1 = + _registerName1("addEntriesFromDictionary:"); + void _objc_msgSend_307( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer characters, - int length, - bool freeBuffer, + ffi.Pointer otherDictionary, ) { - return __objc_msgSend_253( + return __objc_msgSend_307( obj, sel, - characters, - length, - freeBuffer, + otherDictionary, ); } - late final __objc_msgSend_253Ptr = _lookup< + late final __objc_msgSend_307Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_initWithCharactersNoCopy_length_deallocator_1 = - _registerName1("initWithCharactersNoCopy:length:deallocator:"); - instancetype _objc_msgSend_254( + late final _sel_removeObjectsForKeys_1 = + _registerName1("removeObjectsForKeys:"); + late final _sel_setDictionary_1 = _registerName1("setDictionary:"); + late final _sel_setObject_forKeyedSubscript_1 = + _registerName1("setObject:forKeyedSubscript:"); + late final _sel_dictionaryWithCapacity_1 = + _registerName1("dictionaryWithCapacity:"); + ffi.Pointer _objc_msgSend_308( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer chars, - int len, - ffi.Pointer<_ObjCBlock> deallocator, + ffi.Pointer path, ) { - return __objc_msgSend_254( + return __objc_msgSend_308( obj, sel, - chars, - len, - deallocator, + path, ); } - late final __objc_msgSend_254Ptr = _lookup< + late final __objc_msgSend_308Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithCharacters_length_1 = - _registerName1("initWithCharacters:length:"); - instancetype _objc_msgSend_255( + ffi.Pointer _objc_msgSend_309( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer characters, - int length, + ffi.Pointer url, ) { - return __objc_msgSend_255( + return __objc_msgSend_309( obj, sel, - characters, - length, + url, ); } - late final __objc_msgSend_255Ptr = _lookup< + late final __objc_msgSend_309Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); - instancetype _objc_msgSend_256( + late final _sel_dictionaryWithSharedKeySet_1 = + _registerName1("dictionaryWithSharedKeySet:"); + ffi.Pointer _objc_msgSend_310( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer nullTerminatedCString, + ffi.Pointer keyset, ) { - return __objc_msgSend_256( + return __objc_msgSend_310( obj, sel, - nullTerminatedCString, + keyset, ); } - late final __objc_msgSend_256Ptr = _lookup< + late final __objc_msgSend_310Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithFormat_1 = _registerName1("initWithFormat:"); - late final _sel_initWithFormat_arguments_1 = - _registerName1("initWithFormat:arguments:"); - instancetype _objc_msgSend_257( + late final _class_NSNotification1 = _getClass1("NSNotification"); + late final _sel_name1 = _registerName1("name"); + late final _sel_initWithName_object_userInfo_1 = + _registerName1("initWithName:object:userInfo:"); + instancetype _objc_msgSend_311( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - va_list argList, + NSNotificationName name, + ffi.Pointer object, + ffi.Pointer userInfo, ) { - return __objc_msgSend_257( + return __objc_msgSend_311( obj, sel, - format, - argList, + name, + object, + userInfo, ); } - late final __objc_msgSend_257Ptr = _lookup< + late final __objc_msgSend_311Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, va_list)>>('objc_msgSend'); - late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, va_list)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_initWithFormat_locale_1 = - _registerName1("initWithFormat:locale:"); - instancetype _objc_msgSend_258( + late final _sel_notificationWithName_object_1 = + _registerName1("notificationWithName:object:"); + late final _sel_notificationWithName_object_userInfo_1 = + _registerName1("notificationWithName:object:userInfo:"); + late final _class_NSNotificationCenter1 = _getClass1("NSNotificationCenter"); + late final _sel_defaultCenter1 = _registerName1("defaultCenter"); + ffi.Pointer _objc_msgSend_312( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, ) { - return __objc_msgSend_258( + return __objc_msgSend_312( obj, sel, - format, - locale, ); } - late final __objc_msgSend_258Ptr = _lookup< + late final __objc_msgSend_312Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithFormat_locale_arguments_1 = - _registerName1("initWithFormat:locale:arguments:"); - instancetype _objc_msgSend_259( + late final _sel_addObserver_selector_name_object_1 = + _registerName1("addObserver:selector:name:object:"); + void _objc_msgSend_313( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, - va_list argList, + ffi.Pointer observer, + ffi.Pointer aSelector, + NSNotificationName aName, + ffi.Pointer anObject, ) { - return __objc_msgSend_259( + return __objc_msgSend_313( obj, sel, - format, - locale, - argList, + observer, + aSelector, + aName, + anObject, ); } - late final __objc_msgSend_259Ptr = _lookup< + late final __objc_msgSend_313Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - va_list)>>('objc_msgSend'); - late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, va_list)>(); + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>(); - late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_1 = - _registerName1("initWithValidatedFormat:validFormatSpecifiers:error:"); - instancetype _objc_msgSend_260( + late final _sel_postNotification_1 = _registerName1("postNotification:"); + void _objc_msgSend_314( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer> error, + ffi.Pointer notification, ) { - return __objc_msgSend_260( + return __objc_msgSend_314( obj, sel, - format, - validFormatSpecifiers, - error, + notification, ); } - late final __objc_msgSend_260Ptr = _lookup< + late final __objc_msgSend_314Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1 = - _registerName1( - "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); - instancetype _objc_msgSend_261( + late final _sel_postNotificationName_object_1 = + _registerName1("postNotificationName:object:"); + void _objc_msgSend_315( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer locale, - ffi.Pointer> error, + NSNotificationName aName, + ffi.Pointer anObject, ) { - return __objc_msgSend_261( + return __objc_msgSend_315( obj, sel, - format, - validFormatSpecifiers, - locale, - error, + aName, + anObject, ); } - late final __objc_msgSend_261Ptr = _lookup< + late final __objc_msgSend_315Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSNotificationName, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSNotificationName, ffi.Pointer)>(); - late final _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1 = - _registerName1( - "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); - instancetype _objc_msgSend_262( + late final _sel_postNotificationName_object_userInfo_1 = + _registerName1("postNotificationName:object:userInfo:"); + void _objc_msgSend_316( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - va_list argList, - ffi.Pointer> error, + NSNotificationName aName, + ffi.Pointer anObject, + ffi.Pointer aUserInfo, ) { - return __objc_msgSend_262( + return __objc_msgSend_316( obj, sel, - format, - validFormatSpecifiers, - argList, - error, + aName, + anObject, + aUserInfo, ); } - late final __objc_msgSend_262Ptr = _lookup< + late final __objc_msgSend_316Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, + NSNotificationName, ffi.Pointer, - ffi.Pointer, - va_list, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< - instancetype Function( + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< + void Function( ffi.Pointer, ffi.Pointer, + NSNotificationName, ffi.Pointer, - ffi.Pointer, - va_list, - ffi.Pointer>)>(); + ffi.Pointer)>(); - late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1 = - _registerName1( - "initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:"); - instancetype _objc_msgSend_263( + late final _sel_removeObserver_1 = _registerName1("removeObserver:"); + late final _sel_removeObserver_name_object_1 = + _registerName1("removeObserver:name:object:"); + void _objc_msgSend_317( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer locale, - va_list argList, - ffi.Pointer> error, + ffi.Pointer observer, + NSNotificationName aName, + ffi.Pointer anObject, ) { - return __objc_msgSend_263( + return __objc_msgSend_317( obj, sel, - format, - validFormatSpecifiers, - locale, - argList, - error, + observer, + aName, + anObject, ); } - late final __objc_msgSend_263Ptr = _lookup< + late final __objc_msgSend_317Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - va_list, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< - instancetype Function( + NSNotificationName, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - va_list, - ffi.Pointer>)>(); + NSNotificationName, + ffi.Pointer)>(); - late final _sel_initWithData_encoding_1 = - _registerName1("initWithData:encoding:"); - instancetype _objc_msgSend_264( + late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); + late final _class_NSProgress1 = _getClass1("NSProgress"); + late final _sel_currentProgress1 = _registerName1("currentProgress"); + ffi.Pointer _objc_msgSend_318( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, - int encoding, ) { - return __objc_msgSend_264( + return __objc_msgSend_318( obj, sel, - data, - encoding, ); } - late final __objc_msgSend_264Ptr = _lookup< + late final __objc_msgSend_318Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithBytes_length_encoding_1 = - _registerName1("initWithBytes:length:encoding:"); - instancetype _objc_msgSend_265( + late final _sel_progressWithTotalUnitCount_1 = + _registerName1("progressWithTotalUnitCount:"); + ffi.Pointer _objc_msgSend_319( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, + int unitCount, ) { - return __objc_msgSend_265( + return __objc_msgSend_319( obj, sel, - bytes, - len, - encoding, + unitCount, ); } - late final __objc_msgSend_265Ptr = _lookup< + late final __objc_msgSend_319Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = - _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); - instancetype _objc_msgSend_266( + late final _sel_discreteProgressWithTotalUnitCount_1 = + _registerName1("discreteProgressWithTotalUnitCount:"); + late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = + _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); + ffi.Pointer _objc_msgSend_320( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - bool freeBuffer, + int unitCount, + ffi.Pointer parent, + int portionOfParentTotalUnitCount, ) { - return __objc_msgSend_266( + return __objc_msgSend_320( obj, sel, - bytes, - len, - encoding, - freeBuffer, + unitCount, + parent, + portionOfParentTotalUnitCount, ); } - late final __objc_msgSend_266Ptr = _lookup< + late final __objc_msgSend_320Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, bool)>(); + ffi.Int64, + ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); - late final _sel_initWithBytesNoCopy_length_encoding_deallocator_1 = - _registerName1("initWithBytesNoCopy:length:encoding:deallocator:"); - instancetype _objc_msgSend_267( + late final _sel_initWithParent_userInfo_1 = + _registerName1("initWithParent:userInfo:"); + instancetype _objc_msgSend_321( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - ffi.Pointer<_ObjCBlock> deallocator, + ffi.Pointer parentProgressOrNil, + ffi.Pointer userInfoOrNil, ) { - return __objc_msgSend_267( + return __objc_msgSend_321( obj, sel, - bytes, - len, - encoding, - deallocator, + parentProgressOrNil, + userInfoOrNil, ); } - late final __objc_msgSend_267Ptr = _lookup< + late final __objc_msgSend_321Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_string1 = _registerName1("string"); - late final _sel_stringWithString_1 = _registerName1("stringWithString:"); - late final _sel_stringWithCharacters_length_1 = - _registerName1("stringWithCharacters:length:"); - late final _sel_stringWithUTF8String_1 = - _registerName1("stringWithUTF8String:"); - late final _sel_stringWithFormat_1 = _registerName1("stringWithFormat:"); - late final _sel_localizedStringWithFormat_1 = - _registerName1("localizedStringWithFormat:"); - late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_1 = - _registerName1("stringWithValidatedFormat:validFormatSpecifiers:error:"); - late final _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1 = - _registerName1( - "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); - late final _sel_initWithCString_encoding_1 = - _registerName1("initWithCString:encoding:"); - instancetype _objc_msgSend_268( + late final _sel_becomeCurrentWithPendingUnitCount_1 = + _registerName1("becomeCurrentWithPendingUnitCount:"); + void _objc_msgSend_322( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer nullTerminatedCString, - int encoding, + int unitCount, ) { - return __objc_msgSend_268( + return __objc_msgSend_322( obj, sel, - nullTerminatedCString, - encoding, + unitCount, ); } - late final __objc_msgSend_268Ptr = _lookup< + late final __objc_msgSend_322Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_stringWithCString_encoding_1 = - _registerName1("stringWithCString:encoding:"); - late final _sel_initWithContentsOfURL_encoding_error_1 = - _registerName1("initWithContentsOfURL:encoding:error:"); - instancetype _objc_msgSend_269( + late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = + _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); + void _objc_msgSend_323( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - int enc, - ffi.Pointer> error, + int unitCount, + ffi.Pointer<_ObjCBlock> work, ) { - return __objc_msgSend_269( + return __objc_msgSend_323( obj, sel, - url, - enc, - error, + unitCount, + work, ); } - late final __objc_msgSend_269Ptr = _lookup< + late final __objc_msgSend_323Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithContentsOfFile_encoding_error_1 = - _registerName1("initWithContentsOfFile:encoding:error:"); - instancetype _objc_msgSend_270( + late final _sel_resignCurrent1 = _registerName1("resignCurrent"); + late final _sel_addChild_withPendingUnitCount_1 = + _registerName1("addChild:withPendingUnitCount:"); + void _objc_msgSend_324( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - int enc, - ffi.Pointer> error, + ffi.Pointer child, + int inUnitCount, ) { - return __objc_msgSend_270( + return __objc_msgSend_324( obj, sel, - path, - enc, - error, + child, + inUnitCount, ); } - late final __objc_msgSend_270Ptr = _lookup< + late final __objc_msgSend_324Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_stringWithContentsOfURL_encoding_error_1 = - _registerName1("stringWithContentsOfURL:encoding:error:"); - late final _sel_stringWithContentsOfFile_encoding_error_1 = - _registerName1("stringWithContentsOfFile:encoding:error:"); - late final _sel_initWithContentsOfURL_usedEncoding_error_1 = - _registerName1("initWithContentsOfURL:usedEncoding:error:"); - instancetype _objc_msgSend_271( + late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); + int _objc_msgSend_325( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer enc, - ffi.Pointer> error, ) { - return __objc_msgSend_271( + return __objc_msgSend_325( obj, sel, - url, - enc, - error, ); } - late final __objc_msgSend_271Ptr = _lookup< + late final __objc_msgSend_325Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Int64 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithContentsOfFile_usedEncoding_error_1 = - _registerName1("initWithContentsOfFile:usedEncoding:error:"); - instancetype _objc_msgSend_272( + late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); + void _objc_msgSend_326( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer enc, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_272( + return __objc_msgSend_326( obj, sel, - path, - enc, - error, + value, ); } - late final __objc_msgSend_272Ptr = _lookup< + late final __objc_msgSend_326Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_stringWithContentsOfURL_usedEncoding_error_1 = - _registerName1("stringWithContentsOfURL:usedEncoding:error:"); - late final _sel_stringWithContentsOfFile_usedEncoding_error_1 = - _registerName1("stringWithContentsOfFile:usedEncoding:error:"); - late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1 = - _registerName1( - "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); - int _objc_msgSend_273( + late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); + late final _sel_setCompletedUnitCount_1 = + _registerName1("setCompletedUnitCount:"); + late final _sel_setLocalizedDescription_1 = + _registerName1("setLocalizedDescription:"); + void _objc_msgSend_327( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion, + ffi.Pointer value, ) { - return __objc_msgSend_273( + return __objc_msgSend_327( obj, sel, - data, - opts, - string, - usedLossyConversion, + value, ); } - late final __objc_msgSend_273Ptr = _lookup< + late final __objc_msgSend_327Ptr = _lookup< ffi.NativeFunction< - NSStringEncoding Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_propertyList1 = _registerName1("propertyList"); - late final _sel_propertyListFromStringsFileFormat1 = - _registerName1("propertyListFromStringsFileFormat"); - late final _sel_cString1 = _registerName1("cString"); - late final _sel_lossyCString1 = _registerName1("lossyCString"); - late final _sel_cStringLength1 = _registerName1("cStringLength"); - late final _sel_getCString_1 = _registerName1("getCString:"); - void _objc_msgSend_274( + late final _sel_localizedAdditionalDescription1 = + _registerName1("localizedAdditionalDescription"); + late final _sel_setLocalizedAdditionalDescription_1 = + _registerName1("setLocalizedAdditionalDescription:"); + late final _sel_isCancellable1 = _registerName1("isCancellable"); + late final _sel_setCancellable_1 = _registerName1("setCancellable:"); + void _objc_msgSend_328( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, + bool value, ) { - return __objc_msgSend_274( + return __objc_msgSend_328( obj, sel, - bytes, + value, ); } - late final __objc_msgSend_274Ptr = _lookup< + late final __objc_msgSend_328Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, bool)>(); - late final _sel_getCString_maxLength_1 = - _registerName1("getCString:maxLength:"); - void _objc_msgSend_275( + late final _sel_isPausable1 = _registerName1("isPausable"); + late final _sel_setPausable_1 = _registerName1("setPausable:"); + late final _sel_isCancelled1 = _registerName1("isCancelled"); + late final _sel_isPaused1 = _registerName1("isPaused"); + late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_329( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int maxLength, ) { - return __objc_msgSend_275( + return __objc_msgSend_329( obj, sel, - bytes, - maxLength, ); } - late final __objc_msgSend_275Ptr = _lookup< + late final __objc_msgSend_329Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_getCString_maxLength_range_remainingRange_1 = - _registerName1("getCString:maxLength:range:remainingRange:"); - void _objc_msgSend_276( + late final _sel_setCancellationHandler_1 = + _registerName1("setCancellationHandler:"); + void _objc_msgSend_330( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int maxLength, - NSRange aRange, - NSRangePointer leftoverRange, + ffi.Pointer<_ObjCBlock> value, ) { - return __objc_msgSend_276( + return __objc_msgSend_330( obj, sel, - bytes, - maxLength, - aRange, - leftoverRange, + value, ); } - late final __objc_msgSend_276Ptr = _lookup< + late final __objc_msgSend_330Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSRange, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange, NSRangePointer)>(); + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringWithContentsOfFile_1 = - _registerName1("stringWithContentsOfFile:"); - late final _sel_stringWithContentsOfURL_1 = - _registerName1("stringWithContentsOfURL:"); - late final _sel_initWithCStringNoCopy_length_freeWhenDone_1 = - _registerName1("initWithCStringNoCopy:length:freeWhenDone:"); - ffi.Pointer _objc_msgSend_277( + late final _sel_pausingHandler1 = _registerName1("pausingHandler"); + late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); + late final _sel_resumingHandler1 = _registerName1("resumingHandler"); + late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); + late final _sel_setUserInfoObject_forKey_1 = + _registerName1("setUserInfoObject:forKey:"); + late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); + late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); + late final _sel_isFinished1 = _registerName1("isFinished"); + late final _sel_cancel1 = _registerName1("cancel"); + late final _sel_pause1 = _registerName1("pause"); + late final _sel_resume1 = _registerName1("resume"); + late final _sel_kind1 = _registerName1("kind"); + late final _sel_setKind_1 = _registerName1("setKind:"); + late final _sel_estimatedTimeRemaining1 = + _registerName1("estimatedTimeRemaining"); + late final _sel_setEstimatedTimeRemaining_1 = + _registerName1("setEstimatedTimeRemaining:"); + void _objc_msgSend_331( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool freeBuffer, + ffi.Pointer value, ) { - return __objc_msgSend_277( + return __objc_msgSend_331( obj, sel, - bytes, - length, - freeBuffer, + value, ); } - late final __objc_msgSend_277Ptr = _lookup< + late final __objc_msgSend_331Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, bool)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_initWithCString_length_1 = - _registerName1("initWithCString:length:"); - late final _sel_initWithCString_1 = _registerName1("initWithCString:"); - late final _sel_stringWithCString_length_1 = - _registerName1("stringWithCString:length:"); - late final _sel_stringWithCString_1 = _registerName1("stringWithCString:"); - late final _sel_getCharacters_1 = _registerName1("getCharacters:"); - void _objc_msgSend_278( + late final _sel_throughput1 = _registerName1("throughput"); + late final _sel_setThroughput_1 = _registerName1("setThroughput:"); + late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); + late final _sel_setFileOperationKind_1 = + _registerName1("setFileOperationKind:"); + late final _sel_fileURL1 = _registerName1("fileURL"); + late final _sel_setFileURL_1 = _registerName1("setFileURL:"); + void _objc_msgSend_332( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, + ffi.Pointer value, ) { - return __objc_msgSend_278( + return __objc_msgSend_332( obj, sel, - buffer, + value, ); } - late final __objc_msgSend_278Ptr = _lookup< + late final __objc_msgSend_332Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer)>(); - late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = - _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); - late final _sel_stringByRemovingPercentEncoding1 = - _registerName1("stringByRemovingPercentEncoding"); - late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = - _registerName1("stringByAddingPercentEscapesUsingEncoding:"); - late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = - _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); - late final _sel_debugDescription1 = _registerName1("debugDescription"); - late final _sel_version1 = _registerName1("version"); - late final _sel_setVersion_1 = _registerName1("setVersion:"); - void _objc_msgSend_279( - ffi.Pointer obj, - ffi.Pointer sel, - int aVersion, - ) { - return __objc_msgSend_279( - obj, - sel, - aVersion, - ); - } - - late final __objc_msgSend_279Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_classForCoder1 = _registerName1("classForCoder"); - late final _sel_replacementObjectForCoder_1 = - _registerName1("replacementObjectForCoder:"); - late final _sel_awakeAfterUsingCoder_1 = - _registerName1("awakeAfterUsingCoder:"); - late final _sel_poseAsClass_1 = _registerName1("poseAsClass:"); - late final _sel_autoContentAccessingProxy1 = - _registerName1("autoContentAccessingProxy"); - late final _sel_URL_resourceDataDidBecomeAvailable_1 = - _registerName1("URL:resourceDataDidBecomeAvailable:"); - void _objc_msgSend_280( + late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); + late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); + late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); + late final _sel_setFileCompletedCount_1 = + _registerName1("setFileCompletedCount:"); + late final _sel_publish1 = _registerName1("publish"); + late final _sel_unpublish1 = _registerName1("unpublish"); + late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = + _registerName1("addSubscriberForFileURL:withPublishingHandler:"); + ffi.Pointer _objc_msgSend_333( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer newBytes, + ffi.Pointer url, + NSProgressPublishingHandler publishingHandler, ) { - return __objc_msgSend_280( + return __objc_msgSend_333( obj, sel, - sender, - newBytes, + url, + publishingHandler, ); } - late final __objc_msgSend_280Ptr = _lookup< + late final __objc_msgSend_333Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSProgressPublishingHandler)>>('objc_msgSend'); + late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>(); - late final _sel_URLResourceDidFinishLoading_1 = - _registerName1("URLResourceDidFinishLoading:"); - void _objc_msgSend_281( + late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); + late final _sel_isOld1 = _registerName1("isOld"); + late final _sel_progress1 = _registerName1("progress"); + late final _class_NSOperation1 = _getClass1("NSOperation"); + late final _sel_start1 = _registerName1("start"); + late final _sel_main1 = _registerName1("main"); + late final _sel_isExecuting1 = _registerName1("isExecuting"); + late final _sel_isConcurrent1 = _registerName1("isConcurrent"); + late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); + late final _sel_isReady1 = _registerName1("isReady"); + late final _sel_addDependency_1 = _registerName1("addDependency:"); + void _objc_msgSend_334( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, + ffi.Pointer op, ) { - return __objc_msgSend_281( + return __objc_msgSend_334( obj, sel, - sender, + op, ); } - late final __objc_msgSend_281Ptr = _lookup< + late final __objc_msgSend_334Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< + late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_URLResourceDidCancelLoading_1 = - _registerName1("URLResourceDidCancelLoading:"); - late final _sel_URL_resourceDidFailLoadingWithReason_1 = - _registerName1("URL:resourceDidFailLoadingWithReason:"); - void _objc_msgSend_282( + late final _sel_removeDependency_1 = _registerName1("removeDependency:"); + late final _sel_dependencies1 = _registerName1("dependencies"); + late final _sel_queuePriority1 = _registerName1("queuePriority"); + int _objc_msgSend_335( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer reason, ) { - return __objc_msgSend_282( + return __objc_msgSend_335( obj, sel, - sender, - reason, ); } - late final __objc_msgSend_282Ptr = _lookup< + late final __objc_msgSend_335Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = - _registerName1( - "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); - void _objc_msgSend_283( + late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); + void _objc_msgSend_336( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, - ffi.Pointer delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo, + int value, ) { - return __objc_msgSend_283( + return __objc_msgSend_336( obj, sel, - error, - recoveryOptionIndex, - delegate, - didRecoverSelector, - contextInfo, + value, ); } - late final __objc_msgSend_283Ptr = _lookup< + late final __objc_msgSend_336Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_attemptRecoveryFromError_optionIndex_1 = - _registerName1("attemptRecoveryFromError:optionIndex:"); - bool _objc_msgSend_284( + late final _sel_completionBlock1 = _registerName1("completionBlock"); + late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); + late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); + late final _sel_threadPriority1 = _registerName1("threadPriority"); + late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); + void _objc_msgSend_337( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, + double value, ) { - return __objc_msgSend_284( + return __objc_msgSend_337( obj, sel, - error, - recoveryOptionIndex, + value, ); } - late final __objc_msgSend_284Ptr = _lookup< + late final __objc_msgSend_337Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final ffi.Pointer _NSFoundationVersionNumber = - _lookup('NSFoundationVersionNumber'); - - double get NSFoundationVersionNumber => _NSFoundationVersionNumber.value; - - set NSFoundationVersionNumber(double value) => - _NSFoundationVersionNumber.value = value; + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); - ffi.Pointer NSStringFromSelector( - ffi.Pointer aSelector, + late final _sel_qualityOfService1 = _registerName1("qualityOfService"); + int _objc_msgSend_338( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSStringFromSelector( - aSelector, + return __objc_msgSend_338( + obj, + sel, ); } - late final _NSStringFromSelectorPtr = _lookup< + late final __objc_msgSend_338Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromSelector'); - late final _NSStringFromSelector = _NSStringFromSelectorPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSSelectorFromString( - ffi.Pointer aSelectorName, + late final _sel_setQualityOfService_1 = + _registerName1("setQualityOfService:"); + void _objc_msgSend_339( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _NSSelectorFromString( - aSelectorName, + return __objc_msgSend_339( + obj, + sel, + value, ); } - late final _NSSelectorFromStringPtr = _lookup< + late final __objc_msgSend_339Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSSelectorFromString'); - late final _NSSelectorFromString = _NSSelectorFromStringPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer NSStringFromClass( - ffi.Pointer aClass, + late final _sel_setName_1 = _registerName1("setName:"); + late final _sel_addOperation_1 = _registerName1("addOperation:"); + late final _sel_addOperations_waitUntilFinished_1 = + _registerName1("addOperations:waitUntilFinished:"); + void _objc_msgSend_340( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer ops, + bool wait, ) { - return _NSStringFromClass( - aClass, + return __objc_msgSend_340( + obj, + sel, + ops, + wait, ); } - late final _NSStringFromClassPtr = _lookup< + late final __objc_msgSend_340Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromClass'); - late final _NSStringFromClass = _NSStringFromClassPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - ffi.Pointer NSClassFromString( - ffi.Pointer aClassName, + late final _sel_addOperationWithBlock_1 = + _registerName1("addOperationWithBlock:"); + void _objc_msgSend_341( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return _NSClassFromString( - aClassName, + return __objc_msgSend_341( + obj, + sel, + block, ); } - late final _NSClassFromStringPtr = _lookup< + late final __objc_msgSend_341Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSClassFromString'); - late final _NSClassFromString = _NSClassFromStringPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - ffi.Pointer NSStringFromProtocol( - ffi.Pointer proto, + late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); + late final _sel_maxConcurrentOperationCount1 = + _registerName1("maxConcurrentOperationCount"); + late final _sel_setMaxConcurrentOperationCount_1 = + _registerName1("setMaxConcurrentOperationCount:"); + void _objc_msgSend_342( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _NSStringFromProtocol( - proto, + return __objc_msgSend_342( + obj, + sel, + value, ); } - late final _NSStringFromProtocolPtr = _lookup< + late final __objc_msgSend_342Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromProtocol'); - late final _NSStringFromProtocol = _NSStringFromProtocolPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer NSProtocolFromString( - ffi.Pointer namestr, + late final _sel_isSuspended1 = _registerName1("isSuspended"); + late final _sel_setSuspended_1 = _registerName1("setSuspended:"); + late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); + dispatch_queue_t _objc_msgSend_343( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSProtocolFromString( - namestr, + return __objc_msgSend_343( + obj, + sel, ); } - late final _NSProtocolFromStringPtr = _lookup< + late final __objc_msgSend_343Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSProtocolFromString'); - late final _NSProtocolFromString = _NSProtocolFromStringPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + dispatch_queue_t Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< + dispatch_queue_t Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSGetSizeAndAlignment( - ffi.Pointer typePtr, - ffi.Pointer sizep, - ffi.Pointer alignp, + late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); + void _objc_msgSend_344( + ffi.Pointer obj, + ffi.Pointer sel, + dispatch_queue_t value, ) { - return _NSGetSizeAndAlignment( - typePtr, - sizep, - alignp, + return __objc_msgSend_344( + obj, + sel, + value, ); } - late final _NSGetSizeAndAlignmentPtr = _lookup< + late final __objc_msgSend_344Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('NSGetSizeAndAlignment'); - late final _NSGetSizeAndAlignment = _NSGetSizeAndAlignmentPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + dispatch_queue_t)>>('objc_msgSend'); + late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); - void NSLog( - ffi.Pointer format, + late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); + late final _sel_waitUntilAllOperationsAreFinished1 = + _registerName1("waitUntilAllOperationsAreFinished"); + late final _sel_currentQueue1 = _registerName1("currentQueue"); + ffi.Pointer _objc_msgSend_345( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSLog( - format, + return __objc_msgSend_345( + obj, + sel, ); } - late final _NSLogPtr = - _lookup)>>( - 'NSLog'); - late final _NSLog = - _NSLogPtr.asFunction)>(); + late final __objc_msgSend_345Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - void NSLogv( - ffi.Pointer format, - va_list args, + late final _sel_mainQueue1 = _registerName1("mainQueue"); + late final _sel_operations1 = _registerName1("operations"); + late final _sel_operationCount1 = _registerName1("operationCount"); + late final _sel_addObserverForName_object_queue_usingBlock_1 = + _registerName1("addObserverForName:object:queue:usingBlock:"); + ffi.Pointer _objc_msgSend_346( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName name, + ffi.Pointer obj1, + ffi.Pointer queue, + ffi.Pointer<_ObjCBlock> block, ) { - return _NSLogv( - format, - args, + return __objc_msgSend_346( + obj, + sel, + name, + obj1, + queue, + block, ); } - late final _NSLogvPtr = _lookup< + late final __objc_msgSend_346Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, va_list)>>('NSLogv'); - late final _NSLogv = - _NSLogvPtr.asFunction, va_list)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final ffi.Pointer _NSNotFound = - _lookup('NSNotFound'); + late final ffi.Pointer + _NSSystemClockDidChangeNotification = + _lookup('NSSystemClockDidChangeNotification'); - int get NSNotFound => _NSNotFound.value; + NSNotificationName get NSSystemClockDidChangeNotification => + _NSSystemClockDidChangeNotification.value; - set NSNotFound(int value) => _NSNotFound.value = value; + set NSSystemClockDidChangeNotification(NSNotificationName value) => + _NSSystemClockDidChangeNotification.value = value; - ffi.Pointer _Block_copy1( - ffi.Pointer aBlock, + late final _class_NSDate1 = _getClass1("NSDate"); + late final _sel_timeIntervalSinceReferenceDate1 = + _registerName1("timeIntervalSinceReferenceDate"); + late final _sel_initWithTimeIntervalSinceReferenceDate_1 = + _registerName1("initWithTimeIntervalSinceReferenceDate:"); + instancetype _objc_msgSend_347( + ffi.Pointer obj, + ffi.Pointer sel, + double ti, ) { - return __Block_copy1( - aBlock, + return __objc_msgSend_347( + obj, + sel, + ti, ); } - late final __Block_copy1Ptr = _lookup< + late final __objc_msgSend_347Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('_Block_copy'); - late final __Block_copy1 = __Block_copy1Ptr - .asFunction Function(ffi.Pointer)>(); - - void _Block_release1( - ffi.Pointer aBlock, - ) { - return __Block_release1( - aBlock, - ); - } - - late final __Block_release1Ptr = - _lookup)>>( - '_Block_release'); - late final __Block_release1 = - __Block_release1Ptr.asFunction)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, double)>(); - void _Block_object_assign( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + late final _sel_timeIntervalSinceDate_1 = + _registerName1("timeIntervalSinceDate:"); + double _objc_msgSend_348( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, ) { - return __Block_object_assign( - arg0, - arg1, - arg2, + return __objc_msgSend_348( + obj, + sel, + anotherDate, ); } - late final __Block_object_assignPtr = _lookup< + late final __objc_msgSend_348Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('_Block_object_assign'); - late final __Block_object_assign = __Block_object_assignPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + NSTimeInterval Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - void _Block_object_dispose( - ffi.Pointer arg0, - int arg1, + late final _sel_timeIntervalSinceNow1 = + _registerName1("timeIntervalSinceNow"); + late final _sel_timeIntervalSince19701 = + _registerName1("timeIntervalSince1970"); + late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); + late final _sel_dateByAddingTimeInterval_1 = + _registerName1("dateByAddingTimeInterval:"); + late final _sel_earlierDate_1 = _registerName1("earlierDate:"); + ffi.Pointer _objc_msgSend_349( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, ) { - return __Block_object_dispose( - arg0, - arg1, + return __objc_msgSend_349( + obj, + sel, + anotherDate, ); } - late final __Block_object_disposePtr = _lookup< + late final __objc_msgSend_349Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Int)>>('_Block_object_dispose'); - late final __Block_object_dispose = __Block_object_disposePtr - .asFunction, int)>(); - - late final ffi.Pointer>> - __NSConcreteGlobalBlock = - _lookup>>('_NSConcreteGlobalBlock'); - - ffi.Pointer> get _NSConcreteGlobalBlock => - __NSConcreteGlobalBlock.value; - - set _NSConcreteGlobalBlock(ffi.Pointer> value) => - __NSConcreteGlobalBlock.value = value; - - late final ffi.Pointer>> - __NSConcreteStackBlock = - _lookup>>('_NSConcreteStackBlock'); - - ffi.Pointer> get _NSConcreteStackBlock => - __NSConcreteStackBlock.value; - - set _NSConcreteStackBlock(ffi.Pointer> value) => - __NSConcreteStackBlock.value = value; - - void Debugger() { - return _Debugger(); - } - - late final _DebuggerPtr = - _lookup>('Debugger'); - late final _Debugger = _DebuggerPtr.asFunction(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void DebugStr( - ConstStr255Param debuggerMsg, + late final _sel_laterDate_1 = _registerName1("laterDate:"); + int _objc_msgSend_350( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, ) { - return _DebugStr( - debuggerMsg, + return __objc_msgSend_350( + obj, + sel, + other, ); } - late final _DebugStrPtr = - _lookup>( - 'DebugStr'); - late final _DebugStr = - _DebugStrPtr.asFunction(); - - void SysBreak() { - return _SysBreak(); - } - - late final _SysBreakPtr = - _lookup>('SysBreak'); - late final _SysBreak = _SysBreakPtr.asFunction(); + late final __objc_msgSend_350Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - void SysBreakStr( - ConstStr255Param debuggerMsg, + late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); + bool _objc_msgSend_351( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDate, ) { - return _SysBreakStr( - debuggerMsg, + return __objc_msgSend_351( + obj, + sel, + otherDate, ); } - late final _SysBreakStrPtr = - _lookup>( - 'SysBreakStr'); - late final _SysBreakStr = - _SysBreakStrPtr.asFunction(); + late final __objc_msgSend_351Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - void SysBreakFunc( - ConstStr255Param debuggerMsg, + late final _sel_date1 = _registerName1("date"); + late final _sel_dateWithTimeIntervalSinceNow_1 = + _registerName1("dateWithTimeIntervalSinceNow:"); + late final _sel_dateWithTimeIntervalSinceReferenceDate_1 = + _registerName1("dateWithTimeIntervalSinceReferenceDate:"); + late final _sel_dateWithTimeIntervalSince1970_1 = + _registerName1("dateWithTimeIntervalSince1970:"); + late final _sel_dateWithTimeInterval_sinceDate_1 = + _registerName1("dateWithTimeInterval:sinceDate:"); + instancetype _objc_msgSend_352( + ffi.Pointer obj, + ffi.Pointer sel, + double secsToBeAdded, + ffi.Pointer date, ) { - return _SysBreakFunc( - debuggerMsg, + return __objc_msgSend_352( + obj, + sel, + secsToBeAdded, + date, ); } - late final _SysBreakFuncPtr = - _lookup>( - 'SysBreakFunc'); - late final _SysBreakFunc = - _SysBreakFuncPtr.asFunction(); - - late final ffi.Pointer _kCFCoreFoundationVersionNumber = - _lookup('kCFCoreFoundationVersionNumber'); - - double get kCFCoreFoundationVersionNumber => - _kCFCoreFoundationVersionNumber.value; - - set kCFCoreFoundationVersionNumber(double value) => - _kCFCoreFoundationVersionNumber.value = value; - - late final ffi.Pointer _kCFNotFound = - _lookup('kCFNotFound'); - - int get kCFNotFound => _kCFNotFound.value; - - set kCFNotFound(int value) => _kCFNotFound.value = value; + late final __objc_msgSend_352Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + double, ffi.Pointer)>(); - CFRange __CFRangeMake( - int loc, - int len, + late final _sel_distantFuture1 = _registerName1("distantFuture"); + ffi.Pointer _objc_msgSend_353( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return ___CFRangeMake( - loc, - len, + return __objc_msgSend_353( + obj, + sel, ); } - late final ___CFRangeMakePtr = - _lookup>( - '__CFRangeMake'); - late final ___CFRangeMake = - ___CFRangeMakePtr.asFunction(); - - int CFNullGetTypeID() { - return _CFNullGetTypeID(); - } - - late final _CFNullGetTypeIDPtr = - _lookup>('CFNullGetTypeID'); - late final _CFNullGetTypeID = - _CFNullGetTypeIDPtr.asFunction(); - - late final ffi.Pointer _kCFNull = _lookup('kCFNull'); - - CFNullRef get kCFNull => _kCFNull.value; - - set kCFNull(CFNullRef value) => _kCFNull.value = value; - - late final ffi.Pointer _kCFAllocatorDefault = - _lookup('kCFAllocatorDefault'); - - CFAllocatorRef get kCFAllocatorDefault => _kCFAllocatorDefault.value; - - set kCFAllocatorDefault(CFAllocatorRef value) => - _kCFAllocatorDefault.value = value; - - late final ffi.Pointer _kCFAllocatorSystemDefault = - _lookup('kCFAllocatorSystemDefault'); - - CFAllocatorRef get kCFAllocatorSystemDefault => - _kCFAllocatorSystemDefault.value; - - set kCFAllocatorSystemDefault(CFAllocatorRef value) => - _kCFAllocatorSystemDefault.value = value; - - late final ffi.Pointer _kCFAllocatorMalloc = - _lookup('kCFAllocatorMalloc'); - - CFAllocatorRef get kCFAllocatorMalloc => _kCFAllocatorMalloc.value; - - set kCFAllocatorMalloc(CFAllocatorRef value) => - _kCFAllocatorMalloc.value = value; - - late final ffi.Pointer _kCFAllocatorMallocZone = - _lookup('kCFAllocatorMallocZone'); - - CFAllocatorRef get kCFAllocatorMallocZone => _kCFAllocatorMallocZone.value; - - set kCFAllocatorMallocZone(CFAllocatorRef value) => - _kCFAllocatorMallocZone.value = value; - - late final ffi.Pointer _kCFAllocatorNull = - _lookup('kCFAllocatorNull'); - - CFAllocatorRef get kCFAllocatorNull => _kCFAllocatorNull.value; - - set kCFAllocatorNull(CFAllocatorRef value) => _kCFAllocatorNull.value = value; - - late final ffi.Pointer _kCFAllocatorUseContext = - _lookup('kCFAllocatorUseContext'); - - CFAllocatorRef get kCFAllocatorUseContext => _kCFAllocatorUseContext.value; - - set kCFAllocatorUseContext(CFAllocatorRef value) => - _kCFAllocatorUseContext.value = value; - - int CFAllocatorGetTypeID() { - return _CFAllocatorGetTypeID(); - } - - late final _CFAllocatorGetTypeIDPtr = - _lookup>('CFAllocatorGetTypeID'); - late final _CFAllocatorGetTypeID = - _CFAllocatorGetTypeIDPtr.asFunction(); + late final __objc_msgSend_353Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - void CFAllocatorSetDefault( - CFAllocatorRef allocator, + late final _sel_distantPast1 = _registerName1("distantPast"); + late final _sel_now1 = _registerName1("now"); + late final _sel_initWithTimeIntervalSinceNow_1 = + _registerName1("initWithTimeIntervalSinceNow:"); + late final _sel_initWithTimeIntervalSince1970_1 = + _registerName1("initWithTimeIntervalSince1970:"); + late final _sel_initWithTimeInterval_sinceDate_1 = + _registerName1("initWithTimeInterval:sinceDate:"); + late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); + late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); + late final _sel_supportsSecureCoding1 = + _registerName1("supportsSecureCoding"); + late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); + instancetype _objc_msgSend_354( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URL, + int cachePolicy, + double timeoutInterval, ) { - return _CFAllocatorSetDefault( - allocator, + return __objc_msgSend_354( + obj, + sel, + URL, + cachePolicy, + timeoutInterval, ); } - late final _CFAllocatorSetDefaultPtr = - _lookup>( - 'CFAllocatorSetDefault'); - late final _CFAllocatorSetDefault = - _CFAllocatorSetDefaultPtr.asFunction(); - - CFAllocatorRef CFAllocatorGetDefault() { - return _CFAllocatorGetDefault(); - } - - late final _CFAllocatorGetDefaultPtr = - _lookup>( - 'CFAllocatorGetDefault'); - late final _CFAllocatorGetDefault = - _CFAllocatorGetDefaultPtr.asFunction(); + late final __objc_msgSend_354Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, double)>(); - CFAllocatorRef CFAllocatorCreate( - CFAllocatorRef allocator, - ffi.Pointer context, + late final _sel_initWithURL_1 = _registerName1("initWithURL:"); + late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("initWithURL:cachePolicy:timeoutInterval:"); + late final _sel_URL1 = _registerName1("URL"); + late final _sel_cachePolicy1 = _registerName1("cachePolicy"); + int _objc_msgSend_355( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _CFAllocatorCreate( - allocator, - context, + return __objc_msgSend_355( + obj, + sel, ); } - late final _CFAllocatorCreatePtr = _lookup< + late final __objc_msgSend_355Ptr = _lookup< ffi.NativeFunction< - CFAllocatorRef Function(CFAllocatorRef, - ffi.Pointer)>>('CFAllocatorCreate'); - late final _CFAllocatorCreate = _CFAllocatorCreatePtr.asFunction< - CFAllocatorRef Function( - CFAllocatorRef, ffi.Pointer)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer CFAllocatorAllocate( - CFAllocatorRef allocator, - int size, - int hint, + late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); + late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); + late final _sel_networkServiceType1 = _registerName1("networkServiceType"); + int _objc_msgSend_356( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _CFAllocatorAllocate( - allocator, - size, - hint, + return __objc_msgSend_356( + obj, + sel, ); } - late final _CFAllocatorAllocatePtr = _lookup< + late final __objc_msgSend_356Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef, CFIndex, CFOptionFlags)>>('CFAllocatorAllocate'); - late final _CFAllocatorAllocate = _CFAllocatorAllocatePtr.asFunction< - ffi.Pointer Function(CFAllocatorRef, int, int)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer CFAllocatorReallocate( - CFAllocatorRef allocator, - ffi.Pointer ptr, - int newsize, - int hint, + late final _sel_allowsCellularAccess1 = + _registerName1("allowsCellularAccess"); + late final _sel_allowsExpensiveNetworkAccess1 = + _registerName1("allowsExpensiveNetworkAccess"); + late final _sel_allowsConstrainedNetworkAccess1 = + _registerName1("allowsConstrainedNetworkAccess"); + late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); + late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); + late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); + late final _sel_valueForHTTPHeaderField_1 = + _registerName1("valueForHTTPHeaderField:"); + late final _sel_HTTPBody1 = _registerName1("HTTPBody"); + late final _class_NSInputStream1 = _getClass1("NSInputStream"); + late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); + ffi.Pointer _objc_msgSend_357( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _CFAllocatorReallocate( - allocator, - ptr, - newsize, - hint, + return __objc_msgSend_357( + obj, + sel, ); } - late final _CFAllocatorReallocatePtr = _lookup< + late final __objc_msgSend_357Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer, - CFIndex, CFOptionFlags)>>('CFAllocatorReallocate'); - late final _CFAllocatorReallocate = _CFAllocatorReallocatePtr.asFunction< - ffi.Pointer Function( - CFAllocatorRef, ffi.Pointer, int, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - void CFAllocatorDeallocate( - CFAllocatorRef allocator, - ffi.Pointer ptr, + late final _sel_HTTPShouldHandleCookies1 = + _registerName1("HTTPShouldHandleCookies"); + late final _sel_HTTPShouldUsePipelining1 = + _registerName1("HTTPShouldUsePipelining"); + late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); + late final _sel_setURL_1 = _registerName1("setURL:"); + late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); + void _objc_msgSend_358( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _CFAllocatorDeallocate( - allocator, - ptr, + return __objc_msgSend_358( + obj, + sel, + value, ); } - late final _CFAllocatorDeallocatePtr = _lookup< + late final __objc_msgSend_358Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, ffi.Pointer)>>('CFAllocatorDeallocate'); - late final _CFAllocatorDeallocate = _CFAllocatorDeallocatePtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int CFAllocatorGetPreferredSizeForSize( - CFAllocatorRef allocator, - int size, - int hint, + late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); + late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); + late final _sel_setNetworkServiceType_1 = + _registerName1("setNetworkServiceType:"); + void _objc_msgSend_359( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _CFAllocatorGetPreferredSizeForSize( - allocator, - size, - hint, + return __objc_msgSend_359( + obj, + sel, + value, ); } - late final _CFAllocatorGetPreferredSizeForSizePtr = _lookup< + late final __objc_msgSend_359Ptr = _lookup< ffi.NativeFunction< - CFIndex Function(CFAllocatorRef, CFIndex, - CFOptionFlags)>>('CFAllocatorGetPreferredSizeForSize'); - late final _CFAllocatorGetPreferredSizeForSize = - _CFAllocatorGetPreferredSizeForSizePtr.asFunction< - int Function(CFAllocatorRef, int, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - void CFAllocatorGetContext( - CFAllocatorRef allocator, - ffi.Pointer context, + late final _sel_setAllowsCellularAccess_1 = + _registerName1("setAllowsCellularAccess:"); + late final _sel_setAllowsExpensiveNetworkAccess_1 = + _registerName1("setAllowsExpensiveNetworkAccess:"); + late final _sel_setAllowsConstrainedNetworkAccess_1 = + _registerName1("setAllowsConstrainedNetworkAccess:"); + late final _sel_setAssumesHTTP3Capable_1 = + _registerName1("setAssumesHTTP3Capable:"); + late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); + late final _sel_setAllHTTPHeaderFields_1 = + _registerName1("setAllHTTPHeaderFields:"); + void _objc_msgSend_360( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _CFAllocatorGetContext( - allocator, - context, + return __objc_msgSend_360( + obj, + sel, + value, ); } - late final _CFAllocatorGetContextPtr = _lookup< + late final __objc_msgSend_360Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, - ffi.Pointer)>>('CFAllocatorGetContext'); - late final _CFAllocatorGetContext = _CFAllocatorGetContextPtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int CFGetTypeID( - CFTypeRef cf, - ) { - return _CFGetTypeID( - cf, - ); - } - - late final _CFGetTypeIDPtr = - _lookup>('CFGetTypeID'); - late final _CFGetTypeID = - _CFGetTypeIDPtr.asFunction(); - - CFStringRef CFCopyTypeIDDescription( - int type_id, - ) { - return _CFCopyTypeIDDescription( - type_id, - ); - } - - late final _CFCopyTypeIDDescriptionPtr = - _lookup>( - 'CFCopyTypeIDDescription'); - late final _CFCopyTypeIDDescription = - _CFCopyTypeIDDescriptionPtr.asFunction(); - - CFTypeRef CFRetain( - CFTypeRef cf, + late final _sel_setValue_forHTTPHeaderField_1 = + _registerName1("setValue:forHTTPHeaderField:"); + void _objc_msgSend_361( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer field, ) { - return _CFRetain( - cf, + return __objc_msgSend_361( + obj, + sel, + value, + field, ); } - late final _CFRetainPtr = - _lookup>('CFRetain'); - late final _CFRetain = - _CFRetainPtr.asFunction(); + late final __objc_msgSend_361Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void CFRelease( - CFTypeRef cf, + late final _sel_addValue_forHTTPHeaderField_1 = + _registerName1("addValue:forHTTPHeaderField:"); + late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); + void _objc_msgSend_362( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _CFRelease( - cf, + return __objc_msgSend_362( + obj, + sel, + value, ); } - late final _CFReleasePtr = - _lookup>('CFRelease'); - late final _CFRelease = _CFReleasePtr.asFunction(); + late final __objc_msgSend_362Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - CFTypeRef CFAutorelease( - CFTypeRef arg, + late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); + void _objc_msgSend_363( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _CFAutorelease( - arg, + return __objc_msgSend_363( + obj, + sel, + value, ); } - late final _CFAutoreleasePtr = - _lookup>( - 'CFAutorelease'); - late final _CFAutorelease = - _CFAutoreleasePtr.asFunction(); + late final __objc_msgSend_363Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int CFGetRetainCount( - CFTypeRef cf, + late final _sel_setHTTPShouldHandleCookies_1 = + _registerName1("setHTTPShouldHandleCookies:"); + late final _sel_setHTTPShouldUsePipelining_1 = + _registerName1("setHTTPShouldUsePipelining:"); + late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); + late final _sel_sharedHTTPCookieStorage1 = + _registerName1("sharedHTTPCookieStorage"); + ffi.Pointer _objc_msgSend_364( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _CFGetRetainCount( - cf, + return __objc_msgSend_364( + obj, + sel, ); } - late final _CFGetRetainCountPtr = - _lookup>( - 'CFGetRetainCount'); - late final _CFGetRetainCount = - _CFGetRetainCountPtr.asFunction(); + late final __objc_msgSend_364Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int CFEqual( - CFTypeRef cf1, - CFTypeRef cf2, + late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = + _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); + ffi.Pointer _objc_msgSend_365( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer identifier, ) { - return _CFEqual( - cf1, - cf2, + return __objc_msgSend_365( + obj, + sel, + identifier, ); } - late final _CFEqualPtr = - _lookup>( - 'CFEqual'); - late final _CFEqual = - _CFEqualPtr.asFunction(); + late final __objc_msgSend_365Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int CFHash( - CFTypeRef cf, + late final _sel_cookies1 = _registerName1("cookies"); + late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); + late final _sel_setCookie_1 = _registerName1("setCookie:"); + void _objc_msgSend_366( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookie, ) { - return _CFHash( - cf, + return __objc_msgSend_366( + obj, + sel, + cookie, ); } - late final _CFHashPtr = - _lookup>('CFHash'); - late final _CFHash = _CFHashPtr.asFunction(); + late final __objc_msgSend_366Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - CFStringRef CFCopyDescription( - CFTypeRef cf, + late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); + late final _sel_removeCookiesSinceDate_1 = + _registerName1("removeCookiesSinceDate:"); + void _objc_msgSend_367( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, ) { - return _CFCopyDescription( - cf, + return __objc_msgSend_367( + obj, + sel, + date, ); } - late final _CFCopyDescriptionPtr = - _lookup>( - 'CFCopyDescription'); - late final _CFCopyDescription = - _CFCopyDescriptionPtr.asFunction(); + late final __objc_msgSend_367Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - CFAllocatorRef CFGetAllocator( - CFTypeRef cf, + late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); + late final _sel_setCookies_forURL_mainDocumentURL_1 = + _registerName1("setCookies:forURL:mainDocumentURL:"); + void _objc_msgSend_368( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer URL, + ffi.Pointer mainDocumentURL, ) { - return _CFGetAllocator( - cf, + return __objc_msgSend_368( + obj, + sel, + cookies, + URL, + mainDocumentURL, ); } - late final _CFGetAllocatorPtr = - _lookup>( - 'CFGetAllocator'); - late final _CFGetAllocator = - _CFGetAllocatorPtr.asFunction(); + late final __objc_msgSend_368Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - CFTypeRef CFMakeCollectable( - CFTypeRef cf, + late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); + int _objc_msgSend_369( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _CFMakeCollectable( - cf, + return __objc_msgSend_369( + obj, + sel, ); } - late final _CFMakeCollectablePtr = - _lookup>( - 'CFMakeCollectable'); - late final _CFMakeCollectable = - _CFMakeCollectablePtr.asFunction(); - - ffi.Pointer NSDefaultMallocZone() { - return _NSDefaultMallocZone(); - } - - late final _NSDefaultMallocZonePtr = - _lookup Function()>>( - 'NSDefaultMallocZone'); - late final _NSDefaultMallocZone = - _NSDefaultMallocZonePtr.asFunction Function()>(); + late final __objc_msgSend_369Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSCreateZone( - int startSize, - int granularity, - bool canFree, + late final _sel_setCookieAcceptPolicy_1 = + _registerName1("setCookieAcceptPolicy:"); + void _objc_msgSend_370( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _NSCreateZone( - startSize, - granularity, - canFree, + return __objc_msgSend_370( + obj, + sel, + value, ); } - late final _NSCreateZonePtr = _lookup< + late final __objc_msgSend_370Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - NSUInteger, NSUInteger, ffi.Bool)>>('NSCreateZone'); - late final _NSCreateZone = _NSCreateZonePtr.asFunction< - ffi.Pointer Function(int, int, bool)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - void NSRecycleZone( - ffi.Pointer zone, + late final _sel_sortedCookiesUsingDescriptors_1 = + _registerName1("sortedCookiesUsingDescriptors:"); + late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); + late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); + late final _sel_originalRequest1 = _registerName1("originalRequest"); + ffi.Pointer _objc_msgSend_371( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSRecycleZone( - zone, + return __objc_msgSend_371( + obj, + sel, ); } - late final _NSRecycleZonePtr = - _lookup)>>( - 'NSRecycleZone'); - late final _NSRecycleZone = - _NSRecycleZonePtr.asFunction)>(); + late final __objc_msgSend_371Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - void NSSetZoneName( - ffi.Pointer zone, + late final _sel_currentRequest1 = _registerName1("currentRequest"); + late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); + late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = + _registerName1( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); + instancetype _objc_msgSend_372( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URL, + ffi.Pointer MIMEType, + int length, ffi.Pointer name, ) { - return _NSSetZoneName( - zone, + return __objc_msgSend_372( + obj, + sel, + URL, + MIMEType, + length, name, ); } - late final _NSSetZoneNamePtr = _lookup< + late final __objc_msgSend_372Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('NSSetZoneName'); - late final _NSSetZoneName = _NSSetZoneNamePtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - ffi.Pointer NSZoneName( - ffi.Pointer zone, + late final _sel_MIMEType1 = _registerName1("MIMEType"); + late final _sel_expectedContentLength1 = + _registerName1("expectedContentLength"); + late final _sel_textEncodingName1 = _registerName1("textEncodingName"); + late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); + late final _sel_response1 = _registerName1("response"); + ffi.Pointer _objc_msgSend_373( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSZoneName( - zone, + return __objc_msgSend_373( + obj, + sel, ); } - late final _NSZoneNamePtr = _lookup< + late final __objc_msgSend_373Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('NSZoneName'); - late final _NSZoneName = _NSZoneNamePtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSZoneFromPointer( - ffi.Pointer ptr, + late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); + late final _sel_setEarliestBeginDate_1 = + _registerName1("setEarliestBeginDate:"); + void _objc_msgSend_374( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _NSZoneFromPointer( - ptr, + return __objc_msgSend_374( + obj, + sel, + value, ); } - late final _NSZoneFromPointerPtr = _lookup< + late final __objc_msgSend_374Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSZoneFromPointer'); - late final _NSZoneFromPointer = _NSZoneFromPointerPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer NSZoneMalloc( - ffi.Pointer zone, - int size, + late final _sel_countOfBytesClientExpectsToSend1 = + _registerName1("countOfBytesClientExpectsToSend"); + late final _sel_setCountOfBytesClientExpectsToSend_1 = + _registerName1("setCountOfBytesClientExpectsToSend:"); + late final _sel_countOfBytesClientExpectsToReceive1 = + _registerName1("countOfBytesClientExpectsToReceive"); + late final _sel_setCountOfBytesClientExpectsToReceive_1 = + _registerName1("setCountOfBytesClientExpectsToReceive:"); + late final _sel_countOfBytesReceived1 = + _registerName1("countOfBytesReceived"); + late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); + late final _sel_countOfBytesExpectedToSend1 = + _registerName1("countOfBytesExpectedToSend"); + late final _sel_countOfBytesExpectedToReceive1 = + _registerName1("countOfBytesExpectedToReceive"); + late final _sel_taskDescription1 = _registerName1("taskDescription"); + late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); + late final _sel_state1 = _registerName1("state"); + int _objc_msgSend_375( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSZoneMalloc( - zone, - size, + return __objc_msgSend_375( + obj, + sel, ); } - late final _NSZoneMallocPtr = _lookup< + late final __objc_msgSend_375Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, NSUInteger)>>('NSZoneMalloc'); - late final _NSZoneMalloc = _NSZoneMallocPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSZoneCalloc( - ffi.Pointer zone, - int numElems, - int byteSize, + late final _sel_error1 = _registerName1("error"); + ffi.Pointer _objc_msgSend_376( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSZoneCalloc( - zone, - numElems, - byteSize, + return __objc_msgSend_376( + obj, + sel, ); } - late final _NSZoneCallocPtr = _lookup< + late final __objc_msgSend_376Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, NSUInteger, NSUInteger)>>('NSZoneCalloc'); - late final _NSZoneCalloc = _NSZoneCallocPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSZoneRealloc( - ffi.Pointer zone, - ffi.Pointer ptr, - int size, + late final _sel_suspend1 = _registerName1("suspend"); + late final _sel_priority1 = _registerName1("priority"); + late final _sel_setPriority_1 = _registerName1("setPriority:"); + void _objc_msgSend_377( + ffi.Pointer obj, + ffi.Pointer sel, + double value, ) { - return _NSZoneRealloc( - zone, - ptr, - size, + return __objc_msgSend_377( + obj, + sel, + value, ); } - late final _NSZoneReallocPtr = _lookup< + late final __objc_msgSend_377Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('NSZoneRealloc'); - late final _NSZoneRealloc = _NSZoneReallocPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Float)>>('objc_msgSend'); + late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); - void NSZoneFree( - ffi.Pointer zone, - ffi.Pointer ptr, + late final _sel_prefersIncrementalDelivery1 = + _registerName1("prefersIncrementalDelivery"); + late final _sel_setPrefersIncrementalDelivery_1 = + _registerName1("setPrefersIncrementalDelivery:"); + late final _sel_storeCookies_forTask_1 = + _registerName1("storeCookies:forTask:"); + void _objc_msgSend_378( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer task, ) { - return _NSZoneFree( - zone, - ptr, + return __objc_msgSend_378( + obj, + sel, + cookies, + task, ); } - late final _NSZoneFreePtr = _lookup< + late final __objc_msgSend_378Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('NSZoneFree'); - late final _NSZoneFree = _NSZoneFreePtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSAllocateCollectable( - int size, - int options, + late final _sel_getCookiesForTask_completionHandler_1 = + _registerName1("getCookiesForTask:completionHandler:"); + void _objc_msgSend_379( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer<_ObjCBlock> completionHandler, ) { - return _NSAllocateCollectable( - size, - options, + return __objc_msgSend_379( + obj, + sel, + task, + completionHandler, ); } - late final _NSAllocateCollectablePtr = _lookup< + late final __objc_msgSend_379Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - NSUInteger, NSUInteger)>>('NSAllocateCollectable'); - late final _NSAllocateCollectable = _NSAllocateCollectablePtr.asFunction< - ffi.Pointer Function(int, int)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - ffi.Pointer NSReallocateCollectable( - ffi.Pointer ptr, - int size, - int options, - ) { - return _NSReallocateCollectable( - ptr, - size, - options, - ); - } + late final ffi.Pointer + _NSHTTPCookieManagerAcceptPolicyChangedNotification = + _lookup( + 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); - late final _NSReallocateCollectablePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, NSUInteger, - NSUInteger)>>('NSReallocateCollectable'); - late final _NSReallocateCollectable = _NSReallocateCollectablePtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; - int NSPageSize() { - return _NSPageSize(); - } + set NSHTTPCookieManagerAcceptPolicyChangedNotification( + NSNotificationName value) => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; - late final _NSPageSizePtr = - _lookup>('NSPageSize'); - late final _NSPageSize = _NSPageSizePtr.asFunction(); + late final ffi.Pointer + _NSHTTPCookieManagerCookiesChangedNotification = + _lookup( + 'NSHTTPCookieManagerCookiesChangedNotification'); - int NSLogPageSize() { - return _NSLogPageSize(); - } + NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => + _NSHTTPCookieManagerCookiesChangedNotification.value; - late final _NSLogPageSizePtr = - _lookup>('NSLogPageSize'); - late final _NSLogPageSize = _NSLogPageSizePtr.asFunction(); + set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => + _NSHTTPCookieManagerCookiesChangedNotification.value = value; - int NSRoundUpToMultipleOfPageSize( - int bytes, - ) { - return _NSRoundUpToMultipleOfPageSize( - bytes, - ); + late final ffi.Pointer + _NSProgressEstimatedTimeRemainingKey = + _lookup('NSProgressEstimatedTimeRemainingKey'); + + NSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => + _NSProgressEstimatedTimeRemainingKey.value; + + set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey value) => + _NSProgressEstimatedTimeRemainingKey.value = value; + + late final ffi.Pointer _NSProgressThroughputKey = + _lookup('NSProgressThroughputKey'); + + NSProgressUserInfoKey get NSProgressThroughputKey => + _NSProgressThroughputKey.value; + + set NSProgressThroughputKey(NSProgressUserInfoKey value) => + _NSProgressThroughputKey.value = value; + + late final ffi.Pointer _NSProgressKindFile = + _lookup('NSProgressKindFile'); + + NSProgressKind get NSProgressKindFile => _NSProgressKindFile.value; + + set NSProgressKindFile(NSProgressKind value) => + _NSProgressKindFile.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindKey = + _lookup('NSProgressFileOperationKindKey'); + + NSProgressUserInfoKey get NSProgressFileOperationKindKey => + _NSProgressFileOperationKindKey.value; + + set NSProgressFileOperationKindKey(NSProgressUserInfoKey value) => + _NSProgressFileOperationKindKey.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindDownloading = + _lookup( + 'NSProgressFileOperationKindDownloading'); + + NSProgressFileOperationKind get NSProgressFileOperationKindDownloading => + _NSProgressFileOperationKindDownloading.value; + + set NSProgressFileOperationKindDownloading( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDownloading.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindDecompressingAfterDownloading = + _lookup( + 'NSProgressFileOperationKindDecompressingAfterDownloading'); + + NSProgressFileOperationKind + get NSProgressFileOperationKindDecompressingAfterDownloading => + _NSProgressFileOperationKindDecompressingAfterDownloading.value; + + set NSProgressFileOperationKindDecompressingAfterDownloading( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDecompressingAfterDownloading.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindReceiving = + _lookup( + 'NSProgressFileOperationKindReceiving'); + + NSProgressFileOperationKind get NSProgressFileOperationKindReceiving => + _NSProgressFileOperationKindReceiving.value; + + set NSProgressFileOperationKindReceiving(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindReceiving.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindCopying = + _lookup( + 'NSProgressFileOperationKindCopying'); + + NSProgressFileOperationKind get NSProgressFileOperationKindCopying => + _NSProgressFileOperationKindCopying.value; + + set NSProgressFileOperationKindCopying(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindCopying.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindUploading = + _lookup( + 'NSProgressFileOperationKindUploading'); + + NSProgressFileOperationKind get NSProgressFileOperationKindUploading => + _NSProgressFileOperationKindUploading.value; + + set NSProgressFileOperationKindUploading(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindUploading.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindDuplicating = + _lookup( + 'NSProgressFileOperationKindDuplicating'); + + NSProgressFileOperationKind get NSProgressFileOperationKindDuplicating => + _NSProgressFileOperationKindDuplicating.value; + + set NSProgressFileOperationKindDuplicating( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDuplicating.value = value; + + late final ffi.Pointer _NSProgressFileURLKey = + _lookup('NSProgressFileURLKey'); + + NSProgressUserInfoKey get NSProgressFileURLKey => _NSProgressFileURLKey.value; + + set NSProgressFileURLKey(NSProgressUserInfoKey value) => + _NSProgressFileURLKey.value = value; + + late final ffi.Pointer _NSProgressFileTotalCountKey = + _lookup('NSProgressFileTotalCountKey'); + + NSProgressUserInfoKey get NSProgressFileTotalCountKey => + _NSProgressFileTotalCountKey.value; + + set NSProgressFileTotalCountKey(NSProgressUserInfoKey value) => + _NSProgressFileTotalCountKey.value = value; + + late final ffi.Pointer + _NSProgressFileCompletedCountKey = + _lookup('NSProgressFileCompletedCountKey'); + + NSProgressUserInfoKey get NSProgressFileCompletedCountKey => + _NSProgressFileCompletedCountKey.value; + + set NSProgressFileCompletedCountKey(NSProgressUserInfoKey value) => + _NSProgressFileCompletedCountKey.value = value; + + late final ffi.Pointer + _NSProgressFileAnimationImageKey = + _lookup('NSProgressFileAnimationImageKey'); + + NSProgressUserInfoKey get NSProgressFileAnimationImageKey => + _NSProgressFileAnimationImageKey.value; + + set NSProgressFileAnimationImageKey(NSProgressUserInfoKey value) => + _NSProgressFileAnimationImageKey.value = value; + + late final ffi.Pointer + _NSProgressFileAnimationImageOriginalRectKey = + _lookup( + 'NSProgressFileAnimationImageOriginalRectKey'); + + NSProgressUserInfoKey get NSProgressFileAnimationImageOriginalRectKey => + _NSProgressFileAnimationImageOriginalRectKey.value; + + set NSProgressFileAnimationImageOriginalRectKey( + NSProgressUserInfoKey value) => + _NSProgressFileAnimationImageOriginalRectKey.value = value; + + late final ffi.Pointer _NSProgressFileIconKey = + _lookup('NSProgressFileIconKey'); + + NSProgressUserInfoKey get NSProgressFileIconKey => + _NSProgressFileIconKey.value; + + set NSProgressFileIconKey(NSProgressUserInfoKey value) => + _NSProgressFileIconKey.value = value; + + late final ffi.Pointer _kCFTypeArrayCallBacks = + _lookup('kCFTypeArrayCallBacks'); + + CFArrayCallBacks get kCFTypeArrayCallBacks => _kCFTypeArrayCallBacks.ref; + + int CFArrayGetTypeID() { + return _CFArrayGetTypeID(); } - late final _NSRoundUpToMultipleOfPageSizePtr = - _lookup>( - 'NSRoundUpToMultipleOfPageSize'); - late final _NSRoundUpToMultipleOfPageSize = - _NSRoundUpToMultipleOfPageSizePtr.asFunction(); + late final _CFArrayGetTypeIDPtr = + _lookup>('CFArrayGetTypeID'); + late final _CFArrayGetTypeID = + _CFArrayGetTypeIDPtr.asFunction(); - int NSRoundDownToMultipleOfPageSize( - int bytes, + CFArrayRef CFArrayCreate( + CFAllocatorRef allocator, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, ) { - return _NSRoundDownToMultipleOfPageSize( - bytes, + return _CFArrayCreate( + allocator, + values, + numValues, + callBacks, ); } - late final _NSRoundDownToMultipleOfPageSizePtr = - _lookup>( - 'NSRoundDownToMultipleOfPageSize'); - late final _NSRoundDownToMultipleOfPageSize = - _NSRoundDownToMultipleOfPageSizePtr.asFunction(); + late final _CFArrayCreatePtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function( + CFAllocatorRef, + ffi.Pointer>, + CFIndex, + ffi.Pointer)>>('CFArrayCreate'); + late final _CFArrayCreate = _CFArrayCreatePtr.asFunction< + CFArrayRef Function(CFAllocatorRef, ffi.Pointer>, + int, ffi.Pointer)>(); - ffi.Pointer NSAllocateMemoryPages( - int bytes, + CFArrayRef CFArrayCreateCopy( + CFAllocatorRef allocator, + CFArrayRef theArray, ) { - return _NSAllocateMemoryPages( - bytes, + return _CFArrayCreateCopy( + allocator, + theArray, ); } - late final _NSAllocateMemoryPagesPtr = - _lookup Function(NSUInteger)>>( - 'NSAllocateMemoryPages'); - late final _NSAllocateMemoryPages = _NSAllocateMemoryPagesPtr.asFunction< - ffi.Pointer Function(int)>(); + late final _CFArrayCreateCopyPtr = _lookup< + ffi.NativeFunction>( + 'CFArrayCreateCopy'); + late final _CFArrayCreateCopy = _CFArrayCreateCopyPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFArrayRef)>(); - void NSDeallocateMemoryPages( - ffi.Pointer ptr, - int bytes, + CFMutableArrayRef CFArrayCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, ) { - return _NSDeallocateMemoryPages( - ptr, - bytes, + return _CFArrayCreateMutable( + allocator, + capacity, + callBacks, ); } - late final _NSDeallocateMemoryPagesPtr = _lookup< + late final _CFArrayCreateMutablePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, NSUInteger)>>('NSDeallocateMemoryPages'); - late final _NSDeallocateMemoryPages = _NSDeallocateMemoryPagesPtr.asFunction< - void Function(ffi.Pointer, int)>(); + CFMutableArrayRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFArrayCreateMutable'); + late final _CFArrayCreateMutable = _CFArrayCreateMutablePtr.asFunction< + CFMutableArrayRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - void NSCopyMemoryPages( - ffi.Pointer source, - ffi.Pointer dest, - int bytes, + CFMutableArrayRef CFArrayCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFArrayRef theArray, ) { - return _NSCopyMemoryPages( - source, - dest, - bytes, + return _CFArrayCreateMutableCopy( + allocator, + capacity, + theArray, ); } - late final _NSCopyMemoryPagesPtr = _lookup< + late final _CFArrayCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('NSCopyMemoryPages'); - late final _NSCopyMemoryPages = _NSCopyMemoryPagesPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + CFMutableArrayRef Function(CFAllocatorRef, CFIndex, + CFArrayRef)>>('CFArrayCreateMutableCopy'); + late final _CFArrayCreateMutableCopy = + _CFArrayCreateMutableCopyPtr.asFunction< + CFMutableArrayRef Function(CFAllocatorRef, int, CFArrayRef)>(); - int NSRealMemoryAvailable() { - return _NSRealMemoryAvailable(); + int CFArrayGetCount( + CFArrayRef theArray, + ) { + return _CFArrayGetCount( + theArray, + ); } - late final _NSRealMemoryAvailablePtr = - _lookup>( - 'NSRealMemoryAvailable'); - late final _NSRealMemoryAvailable = - _NSRealMemoryAvailablePtr.asFunction(); + late final _CFArrayGetCountPtr = + _lookup>( + 'CFArrayGetCount'); + late final _CFArrayGetCount = + _CFArrayGetCountPtr.asFunction(); - ffi.Pointer NSAllocateObject( - ffi.Pointer aClass, - int extraBytes, - ffi.Pointer zone, + int CFArrayGetCountOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _NSAllocateObject( - aClass, - extraBytes, - zone, + return _CFArrayGetCountOfValue( + theArray, + range, + value, ); } - late final _NSAllocateObjectPtr = _lookup< + late final _CFArrayGetCountOfValuePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, NSUInteger, - ffi.Pointer)>>('NSAllocateObject'); - late final _NSAllocateObject = _NSAllocateObjectPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetCountOfValue'); + late final _CFArrayGetCountOfValue = _CFArrayGetCountOfValuePtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer)>(); - void NSDeallocateObject( - ffi.Pointer object, + int CFArrayContainsValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _NSDeallocateObject( - object, + return _CFArrayContainsValue( + theArray, + range, + value, ); } - late final _NSDeallocateObjectPtr = - _lookup)>>( - 'NSDeallocateObject'); - late final _NSDeallocateObject = _NSDeallocateObjectPtr.asFunction< - void Function(ffi.Pointer)>(); + late final _CFArrayContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayContainsValue'); + late final _CFArrayContainsValue = _CFArrayContainsValuePtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer)>(); - ffi.Pointer NSCopyObject( - ffi.Pointer object, - int extraBytes, - ffi.Pointer zone, + ffi.Pointer CFArrayGetValueAtIndex( + CFArrayRef theArray, + int idx, ) { - return _NSCopyObject( - object, - extraBytes, - zone, + return _CFArrayGetValueAtIndex( + theArray, + idx, ); } - late final _NSCopyObjectPtr = _lookup< + late final _CFArrayGetValueAtIndexPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, NSUInteger, - ffi.Pointer)>>('NSCopyObject'); - late final _NSCopyObject = _NSCopyObjectPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + ffi.Pointer Function( + CFArrayRef, CFIndex)>>('CFArrayGetValueAtIndex'); + late final _CFArrayGetValueAtIndex = _CFArrayGetValueAtIndexPtr.asFunction< + ffi.Pointer Function(CFArrayRef, int)>(); - bool NSShouldRetainWithZone( - ffi.Pointer anObject, - ffi.Pointer requestedZone, + void CFArrayGetValues( + CFArrayRef theArray, + CFRange range, + ffi.Pointer> values, ) { - return _NSShouldRetainWithZone( - anObject, - requestedZone, + return _CFArrayGetValues( + theArray, + range, + values, ); } - late final _NSShouldRetainWithZonePtr = _lookup< + late final _CFArrayGetValuesPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer)>>('NSShouldRetainWithZone'); - late final _NSShouldRetainWithZone = _NSShouldRetainWithZonePtr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(CFArrayRef, CFRange, + ffi.Pointer>)>>('CFArrayGetValues'); + late final _CFArrayGetValues = _CFArrayGetValuesPtr.asFunction< + void Function(CFArrayRef, CFRange, ffi.Pointer>)>(); - void NSIncrementExtraRefCount( - ffi.Pointer object, + void CFArrayApplyFunction( + CFArrayRef theArray, + CFRange range, + CFArrayApplierFunction applier, + ffi.Pointer context, ) { - return _NSIncrementExtraRefCount( - object, + return _CFArrayApplyFunction( + theArray, + range, + applier, + context, ); } - late final _NSIncrementExtraRefCountPtr = - _lookup)>>( - 'NSIncrementExtraRefCount'); - late final _NSIncrementExtraRefCount = _NSIncrementExtraRefCountPtr - .asFunction)>(); + late final _CFArrayApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFArrayRef, CFRange, CFArrayApplierFunction, + ffi.Pointer)>>('CFArrayApplyFunction'); + late final _CFArrayApplyFunction = _CFArrayApplyFunctionPtr.asFunction< + void Function(CFArrayRef, CFRange, CFArrayApplierFunction, + ffi.Pointer)>(); - bool NSDecrementExtraRefCountWasZero( - ffi.Pointer object, + int CFArrayGetFirstIndexOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _NSDecrementExtraRefCountWasZero( - object, + return _CFArrayGetFirstIndexOfValue( + theArray, + range, + value, ); } - late final _NSDecrementExtraRefCountWasZeroPtr = - _lookup)>>( - 'NSDecrementExtraRefCountWasZero'); - late final _NSDecrementExtraRefCountWasZero = - _NSDecrementExtraRefCountWasZeroPtr.asFunction< - bool Function(ffi.Pointer)>(); + late final _CFArrayGetFirstIndexOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetFirstIndexOfValue'); + late final _CFArrayGetFirstIndexOfValue = _CFArrayGetFirstIndexOfValuePtr + .asFunction)>(); - int NSExtraRefCount( - ffi.Pointer object, + int CFArrayGetLastIndexOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _NSExtraRefCount( - object, + return _CFArrayGetLastIndexOfValue( + theArray, + range, + value, ); } - late final _NSExtraRefCountPtr = - _lookup)>>( - 'NSExtraRefCount'); - late final _NSExtraRefCount = - _NSExtraRefCountPtr.asFunction)>(); + late final _CFArrayGetLastIndexOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetLastIndexOfValue'); + late final _CFArrayGetLastIndexOfValue = _CFArrayGetLastIndexOfValuePtr + .asFunction)>(); - NSRange NSUnionRange( - NSRange range1, - NSRange range2, + int CFArrayBSearchValues( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, + CFComparatorFunction comparator, + ffi.Pointer context, ) { - return _NSUnionRange( - range1, - range2, + return _CFArrayBSearchValues( + theArray, + range, + value, + comparator, + context, ); } - late final _NSUnionRangePtr = - _lookup>( - 'NSUnionRange'); - late final _NSUnionRange = - _NSUnionRangePtr.asFunction(); + late final _CFArrayBSearchValuesPtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFArrayRef, + CFRange, + ffi.Pointer, + CFComparatorFunction, + ffi.Pointer)>>('CFArrayBSearchValues'); + late final _CFArrayBSearchValues = _CFArrayBSearchValuesPtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer, + CFComparatorFunction, ffi.Pointer)>(); - NSRange NSIntersectionRange( - NSRange range1, - NSRange range2, + void CFArrayAppendValue( + CFMutableArrayRef theArray, + ffi.Pointer value, ) { - return _NSIntersectionRange( - range1, - range2, + return _CFArrayAppendValue( + theArray, + value, ); } - late final _NSIntersectionRangePtr = - _lookup>( - 'NSIntersectionRange'); - late final _NSIntersectionRange = - _NSIntersectionRangePtr.asFunction(); + late final _CFArrayAppendValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableArrayRef, ffi.Pointer)>>('CFArrayAppendValue'); + late final _CFArrayAppendValue = _CFArrayAppendValuePtr.asFunction< + void Function(CFMutableArrayRef, ffi.Pointer)>(); - ffi.Pointer NSStringFromRange( - NSRange range, + void CFArrayInsertValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ffi.Pointer value, ) { - return _NSStringFromRange( - range, + return _CFArrayInsertValueAtIndex( + theArray, + idx, + value, ); } - late final _NSStringFromRangePtr = - _lookup Function(NSRange)>>( - 'NSStringFromRange'); - late final _NSStringFromRange = _NSStringFromRangePtr.asFunction< - ffi.Pointer Function(NSRange)>(); + late final _CFArrayInsertValueAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFIndex, + ffi.Pointer)>>('CFArrayInsertValueAtIndex'); + late final _CFArrayInsertValueAtIndex = + _CFArrayInsertValueAtIndexPtr.asFunction< + void Function(CFMutableArrayRef, int, ffi.Pointer)>(); - NSRange NSRangeFromString( - ffi.Pointer aString, + void CFArraySetValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ffi.Pointer value, ) { - return _NSRangeFromString( - aString, + return _CFArraySetValueAtIndex( + theArray, + idx, + value, ); } - late final _NSRangeFromStringPtr = - _lookup)>>( - 'NSRangeFromString'); - late final _NSRangeFromString = _NSRangeFromStringPtr.asFunction< - NSRange Function(ffi.Pointer)>(); + late final _CFArraySetValueAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFIndex, + ffi.Pointer)>>('CFArraySetValueAtIndex'); + late final _CFArraySetValueAtIndex = _CFArraySetValueAtIndexPtr.asFunction< + void Function(CFMutableArrayRef, int, ffi.Pointer)>(); - late final _class_NSMutableIndexSet1 = _getClass1("NSMutableIndexSet"); - late final _sel_addIndexes_1 = _registerName1("addIndexes:"); - void _objc_msgSend_285( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, + void CFArrayRemoveValueAtIndex( + CFMutableArrayRef theArray, + int idx, ) { - return __objc_msgSend_285( - obj, - sel, - indexSet, + return _CFArrayRemoveValueAtIndex( + theArray, + idx, ); } - late final __objc_msgSend_285Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _CFArrayRemoveValueAtIndexPtr = _lookup< + ffi.NativeFunction>( + 'CFArrayRemoveValueAtIndex'); + late final _CFArrayRemoveValueAtIndex = _CFArrayRemoveValueAtIndexPtr + .asFunction(); - late final _sel_removeIndexes_1 = _registerName1("removeIndexes:"); - late final _sel_removeAllIndexes1 = _registerName1("removeAllIndexes"); - late final _sel_addIndex_1 = _registerName1("addIndex:"); - void _objc_msgSend_286( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void CFArrayRemoveAllValues( + CFMutableArrayRef theArray, ) { - return __objc_msgSend_286( - obj, - sel, - value, + return _CFArrayRemoveAllValues( + theArray, ); } - late final __objc_msgSend_286Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _CFArrayRemoveAllValuesPtr = + _lookup>( + 'CFArrayRemoveAllValues'); + late final _CFArrayRemoveAllValues = + _CFArrayRemoveAllValuesPtr.asFunction(); - late final _sel_removeIndex_1 = _registerName1("removeIndex:"); - late final _sel_addIndexesInRange_1 = _registerName1("addIndexesInRange:"); - void _objc_msgSend_287( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + void CFArrayReplaceValues( + CFMutableArrayRef theArray, + CFRange range, + ffi.Pointer> newValues, + int newCount, ) { - return __objc_msgSend_287( - obj, - sel, + return _CFArrayReplaceValues( + theArray, range, + newValues, + newCount, ); } - late final __objc_msgSend_287Ptr = _lookup< + late final _CFArrayReplaceValuesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Void Function( + CFMutableArrayRef, + CFRange, + ffi.Pointer>, + CFIndex)>>('CFArrayReplaceValues'); + late final _CFArrayReplaceValues = _CFArrayReplaceValuesPtr.asFunction< + void Function(CFMutableArrayRef, CFRange, + ffi.Pointer>, int)>(); - late final _sel_removeIndexesInRange_1 = - _registerName1("removeIndexesInRange:"); - late final _sel_shiftIndexesStartingAtIndex_by_1 = - _registerName1("shiftIndexesStartingAtIndex:by:"); - void _objc_msgSend_288( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - int delta, + void CFArrayExchangeValuesAtIndices( + CFMutableArrayRef theArray, + int idx1, + int idx2, ) { - return __objc_msgSend_288( - obj, - sel, - index, - delta, + return _CFArrayExchangeValuesAtIndices( + theArray, + idx1, + idx2, ); } - late final __objc_msgSend_288Ptr = _lookup< + late final _CFArrayExchangeValuesAtIndicesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + ffi.Void Function(CFMutableArrayRef, CFIndex, + CFIndex)>>('CFArrayExchangeValuesAtIndices'); + late final _CFArrayExchangeValuesAtIndices = + _CFArrayExchangeValuesAtIndicesPtr.asFunction< + void Function(CFMutableArrayRef, int, int)>(); - late final _class_NSMutableArray1 = _getClass1("NSMutableArray"); - late final _sel_addObject_1 = _registerName1("addObject:"); - late final _sel_insertObject_atIndex_1 = - _registerName1("insertObject:atIndex:"); - void _objc_msgSend_289( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - int index, + void CFArraySortValues( + CFMutableArrayRef theArray, + CFRange range, + CFComparatorFunction comparator, + ffi.Pointer context, ) { - return __objc_msgSend_289( - obj, - sel, - anObject, - index, + return _CFArraySortValues( + theArray, + range, + comparator, + context, ); } - late final __objc_msgSend_289Ptr = _lookup< + late final _CFArraySortValuesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, + ffi.Pointer)>>('CFArraySortValues'); + late final _CFArraySortValues = _CFArraySortValuesPtr.asFunction< + void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, + ffi.Pointer)>(); - late final _sel_removeLastObject1 = _registerName1("removeLastObject"); - late final _sel_removeObjectAtIndex_1 = - _registerName1("removeObjectAtIndex:"); - late final _sel_replaceObjectAtIndex_withObject_1 = - _registerName1("replaceObjectAtIndex:withObject:"); - void _objc_msgSend_290( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer anObject, + void CFArrayAppendArray( + CFMutableArrayRef theArray, + CFArrayRef otherArray, + CFRange otherRange, ) { - return __objc_msgSend_290( - obj, - sel, - index, - anObject, + return _CFArrayAppendArray( + theArray, + otherArray, + otherRange, ); } - late final __objc_msgSend_290Ptr = _lookup< + late final _CFArrayAppendArrayPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); + ffi.Void Function( + CFMutableArrayRef, CFArrayRef, CFRange)>>('CFArrayAppendArray'); + late final _CFArrayAppendArray = _CFArrayAppendArrayPtr.asFunction< + void Function(CFMutableArrayRef, CFArrayRef, CFRange)>(); - late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); - late final _sel_addObjectsFromArray_1 = - _registerName1("addObjectsFromArray:"); - void _objc_msgSend_291( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + late final _class_OS_object1 = _getClass1("OS_object"); + ffi.Pointer os_retain( + ffi.Pointer object, ) { - return __objc_msgSend_291( - obj, - sel, - otherArray, + return _os_retain( + object, ); } - late final __objc_msgSend_291Ptr = _lookup< + late final _os_retainPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer)>>('os_retain'); + late final _os_retain = _os_retainPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = - _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); - void _objc_msgSend_292( - ffi.Pointer obj, - ffi.Pointer sel, - int idx1, - int idx2, + void os_release( + ffi.Pointer object, ) { - return __objc_msgSend_292( - obj, - sel, - idx1, - idx2, + return _os_release( + object, ); } - late final __objc_msgSend_292Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + late final _os_releasePtr = + _lookup)>>( + 'os_release'); + late final _os_release = + _os_releasePtr.asFunction)>(); - late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); - late final _sel_removeObject_inRange_1 = - _registerName1("removeObject:inRange:"); - void _objc_msgSend_293( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - NSRange range, + ffi.Pointer sec_retain( + ffi.Pointer obj, ) { - return __objc_msgSend_293( + return _sec_retain( obj, - sel, - anObject, - range, ); } - late final __objc_msgSend_293Ptr = _lookup< + late final _sec_retainPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + ffi.Pointer Function(ffi.Pointer)>>('sec_retain'); + late final _sec_retain = _sec_retainPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_removeObject_1 = _registerName1("removeObject:"); - late final _sel_removeObjectIdenticalTo_inRange_1 = - _registerName1("removeObjectIdenticalTo:inRange:"); - late final _sel_removeObjectIdenticalTo_1 = - _registerName1("removeObjectIdenticalTo:"); - late final _sel_removeObjectsFromIndices_numIndices_1 = - _registerName1("removeObjectsFromIndices:numIndices:"); - void _objc_msgSend_294( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indices, - int cnt, + void sec_release( + ffi.Pointer obj, ) { - return __objc_msgSend_294( + return _sec_release( obj, - sel, - indices, - cnt, ); } - late final __objc_msgSend_294Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _sec_releasePtr = + _lookup)>>( + 'sec_release'); + late final _sec_release = + _sec_releasePtr.asFunction)>(); - late final _sel_removeObjectsInArray_1 = - _registerName1("removeObjectsInArray:"); - late final _sel_removeObjectsInRange_1 = - _registerName1("removeObjectsInRange:"); - late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); - void _objc_msgSend_295( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - ffi.Pointer otherArray, - NSRange otherRange, + CFStringRef SecCopyErrorMessageString( + int status, + ffi.Pointer reserved, ) { - return __objc_msgSend_295( - obj, - sel, - range, - otherArray, - otherRange, + return _SecCopyErrorMessageString( + status, + reserved, ); } - late final __objc_msgSend_295Ptr = _lookup< + late final _SecCopyErrorMessageStringPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer, NSRange)>(); + CFStringRef Function( + OSStatus, ffi.Pointer)>>('SecCopyErrorMessageString'); + late final _SecCopyErrorMessageString = _SecCopyErrorMessageStringPtr + .asFunction)>(); - late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:"); - void _objc_msgSend_296( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - ffi.Pointer otherArray, + void __assert_rtn( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return __objc_msgSend_296( - obj, - sel, - range, - otherArray, + return ___assert_rtn( + arg0, + arg1, + arg2, + arg3, ); } - late final __objc_msgSend_296Ptr = _lookup< + late final ___assert_rtnPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int, ffi.Pointer)>>('__assert_rtn'); + late final ___assert_rtn = ___assert_rtnPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); - late final _sel_setArray_1 = _registerName1("setArray:"); - late final _sel_sortUsingFunction_context_1 = - _registerName1("sortUsingFunction:context:"); - void _objc_msgSend_297( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context, + late final ffi.Pointer<_RuneLocale> __DefaultRuneLocale = + _lookup<_RuneLocale>('_DefaultRuneLocale'); + + _RuneLocale get _DefaultRuneLocale => __DefaultRuneLocale.ref; + + late final ffi.Pointer> __CurrentRuneLocale = + _lookup>('_CurrentRuneLocale'); + + ffi.Pointer<_RuneLocale> get _CurrentRuneLocale => __CurrentRuneLocale.value; + + set _CurrentRuneLocale(ffi.Pointer<_RuneLocale> value) => + __CurrentRuneLocale.value = value; + + int ___runetype( + int arg0, ) { - return __objc_msgSend_297( - obj, - sel, - compare, - context, + return ____runetype( + arg0, ); } - late final __objc_msgSend_297Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); + late final ____runetypePtr = _lookup< + ffi.NativeFunction>( + '___runetype'); + late final ____runetype = ____runetypePtr.asFunction(); - late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); - late final _sel_insertObjects_atIndexes_1 = - _registerName1("insertObjects:atIndexes:"); - void _objc_msgSend_298( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer indexes, + int ___tolower( + int arg0, ) { - return __objc_msgSend_298( - obj, - sel, - objects, - indexes, + return ____tolower( + arg0, ); } - late final __objc_msgSend_298Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final ____tolowerPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '___tolower'); + late final ____tolower = ____tolowerPtr.asFunction(); - late final _sel_removeObjectsAtIndexes_1 = - _registerName1("removeObjectsAtIndexes:"); - late final _sel_replaceObjectsAtIndexes_withObjects_1 = - _registerName1("replaceObjectsAtIndexes:withObjects:"); - void _objc_msgSend_299( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - ffi.Pointer objects, + int ___toupper( + int arg0, ) { - return __objc_msgSend_299( - obj, - sel, - indexes, - objects, + return ____toupper( + arg0, ); } - late final __objc_msgSend_299Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final ____toupperPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '___toupper'); + late final ____toupper = ____toupperPtr.asFunction(); - late final _sel_setObject_atIndexedSubscript_1 = - _registerName1("setObject:atIndexedSubscript:"); - late final _sel_sortUsingComparator_1 = - _registerName1("sortUsingComparator:"); - void _objc_msgSend_300( - ffi.Pointer obj, - ffi.Pointer sel, - NSComparator cmptr, + int __maskrune( + int arg0, + int arg1, ) { - return __objc_msgSend_300( - obj, - sel, - cmptr, + return ___maskrune( + arg0, + arg1, ); } - late final __objc_msgSend_300Ptr = _lookup< + late final ___maskrunePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, NSComparator)>(); + ffi.Int Function( + __darwin_ct_rune_t, ffi.UnsignedLong)>>('__maskrune'); + late final ___maskrune = ___maskrunePtr.asFunction(); - late final _sel_sortWithOptions_usingComparator_1 = - _registerName1("sortWithOptions:usingComparator:"); - void _objc_msgSend_301( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - NSComparator cmptr, + int __toupper( + int arg0, ) { - return __objc_msgSend_301( - obj, - sel, - opts, - cmptr, + return ___toupper1( + arg0, ); } - late final __objc_msgSend_301Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, int, NSComparator)>(); + late final ___toupperPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '__toupper'); + late final ___toupper1 = ___toupperPtr.asFunction(); - late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); - ffi.Pointer _objc_msgSend_302( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + int __tolower( + int arg0, ) { - return __objc_msgSend_302( - obj, - sel, - path, + return ___tolower1( + arg0, ); } - late final __objc_msgSend_302Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final ___tolowerPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '__tolower'); + late final ___tolower1 = ___tolowerPtr.asFunction(); - ffi.Pointer _objc_msgSend_303( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_303( - obj, - sel, - url, - ); + ffi.Pointer __error() { + return ___error(); } - late final __objc_msgSend_303Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final ___errorPtr = + _lookup Function()>>('__error'); + late final ___error = + ___errorPtr.asFunction Function()>(); - late final _sel_applyDifference_1 = _registerName1("applyDifference:"); - void _objc_msgSend_304( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer difference, - ) { - return __objc_msgSend_304( - obj, - sel, - difference, - ); + ffi.Pointer localeconv() { + return _localeconv(); } - late final __objc_msgSend_304Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _localeconvPtr = + _lookup Function()>>('localeconv'); + late final _localeconv = + _localeconvPtr.asFunction Function()>(); - late final _class_NSMutableData1 = _getClass1("NSMutableData"); - late final _sel_mutableBytes1 = _registerName1("mutableBytes"); - late final _sel_setLength_1 = _registerName1("setLength:"); - void _objc_msgSend_305( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + ffi.Pointer setlocale( + int arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_305( - obj, - sel, - value, + return _setlocale( + arg0, + arg1, ); } - late final __objc_msgSend_305Ptr = _lookup< + late final _setlocalePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('setlocale'); + late final _setlocale = _setlocalePtr + .asFunction Function(int, ffi.Pointer)>(); - late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); - late final _sel_appendData_1 = _registerName1("appendData:"); - void _objc_msgSend_306( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, + int __math_errhandling() { + return ___math_errhandling(); + } + + late final ___math_errhandlingPtr = + _lookup>('__math_errhandling'); + late final ___math_errhandling = + ___math_errhandlingPtr.asFunction(); + + int __fpclassifyf( + double arg0, ) { - return __objc_msgSend_306( - obj, - sel, - other, + return ___fpclassifyf( + arg0, ); } - late final __objc_msgSend_306Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final ___fpclassifyfPtr = + _lookup>('__fpclassifyf'); + late final ___fpclassifyf = + ___fpclassifyfPtr.asFunction(); - late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); - late final _sel_replaceBytesInRange_withBytes_1 = - _registerName1("replaceBytesInRange:withBytes:"); - void _objc_msgSend_307( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - ffi.Pointer bytes, + int __fpclassifyd( + double arg0, ) { - return __objc_msgSend_307( - obj, - sel, - range, - bytes, + return ___fpclassifyd( + arg0, ); } - late final __objc_msgSend_307Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>(); + late final ___fpclassifydPtr = + _lookup>( + '__fpclassifyd'); + late final ___fpclassifyd = + ___fpclassifydPtr.asFunction(); - late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); - late final _sel_setData_1 = _registerName1("setData:"); - late final _sel_replaceBytesInRange_withBytes_length_1 = - _registerName1("replaceBytesInRange:withBytes:length:"); - void _objc_msgSend_308( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - ffi.Pointer replacementBytes, - int replacementLength, + double acosf( + double arg0, ) { - return __objc_msgSend_308( - obj, - sel, - range, - replacementBytes, - replacementLength, + return _acosf( + arg0, ); } - late final __objc_msgSend_308Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer, int)>(); + late final _acosfPtr = + _lookup>('acosf'); + late final _acosf = _acosfPtr.asFunction(); - late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); - late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); - late final _sel_initWithLength_1 = _registerName1("initWithLength:"); - late final _sel_decompressUsingAlgorithm_error_1 = - _registerName1("decompressUsingAlgorithm:error:"); - bool _objc_msgSend_309( - ffi.Pointer obj, - ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, + double acos( + double arg0, ) { - return __objc_msgSend_309( - obj, - sel, - algorithm, - error, + return _acos( + arg0, ); } - late final __objc_msgSend_309Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); + late final _acosPtr = + _lookup>('acos'); + late final _acos = _acosPtr.asFunction(); - late final _sel_compressUsingAlgorithm_error_1 = - _registerName1("compressUsingAlgorithm:error:"); - late final _class_NSPurgeableData1 = _getClass1("NSPurgeableData"); - late final _class_NSMutableDictionary1 = _getClass1("NSMutableDictionary"); - late final _sel_removeObjectForKey_1 = _registerName1("removeObjectForKey:"); - late final _sel_setObject_forKey_1 = _registerName1("setObject:forKey:"); - void _objc_msgSend_310( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ffi.Pointer aKey, + double asinf( + double arg0, ) { - return __objc_msgSend_310( - obj, - sel, - anObject, - aKey, + return _asinf( + arg0, ); } - late final __objc_msgSend_310Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _asinfPtr = + _lookup>('asinf'); + late final _asinf = _asinfPtr.asFunction(); - late final _sel_addEntriesFromDictionary_1 = - _registerName1("addEntriesFromDictionary:"); - void _objc_msgSend_311( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDictionary, + double asin( + double arg0, ) { - return __objc_msgSend_311( - obj, - sel, - otherDictionary, + return _asin( + arg0, ); } - late final __objc_msgSend_311Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _asinPtr = + _lookup>('asin'); + late final _asin = _asinPtr.asFunction(); - late final _sel_removeObjectsForKeys_1 = - _registerName1("removeObjectsForKeys:"); - late final _sel_setDictionary_1 = _registerName1("setDictionary:"); - late final _sel_setObject_forKeyedSubscript_1 = - _registerName1("setObject:forKeyedSubscript:"); - late final _sel_dictionaryWithCapacity_1 = - _registerName1("dictionaryWithCapacity:"); - ffi.Pointer _objc_msgSend_312( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + double atanf( + double arg0, ) { - return __objc_msgSend_312( - obj, - sel, - path, + return _atanf( + arg0, ); } - late final __objc_msgSend_312Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _atanfPtr = + _lookup>('atanf'); + late final _atanf = _atanfPtr.asFunction(); - ffi.Pointer _objc_msgSend_313( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + double atan( + double arg0, ) { - return __objc_msgSend_313( - obj, - sel, - url, + return _atan( + arg0, ); } - late final __objc_msgSend_313Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _atanPtr = + _lookup>('atan'); + late final _atan = _atanPtr.asFunction(); - late final _sel_dictionaryWithSharedKeySet_1 = - _registerName1("dictionaryWithSharedKeySet:"); - ffi.Pointer _objc_msgSend_314( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyset, + double atan2f( + double arg0, + double arg1, ) { - return __objc_msgSend_314( - obj, - sel, - keyset, + return _atan2f( + arg0, + arg1, ); } - late final __objc_msgSend_314Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _atan2fPtr = + _lookup>( + 'atan2f'); + late final _atan2f = _atan2fPtr.asFunction(); - late final _class_NSNotification1 = _getClass1("NSNotification"); - late final _sel_name1 = _registerName1("name"); - late final _sel_initWithName_object_userInfo_1 = - _registerName1("initWithName:object:userInfo:"); - instancetype _objc_msgSend_315( - ffi.Pointer obj, - ffi.Pointer sel, - NSNotificationName name, - ffi.Pointer object, - ffi.Pointer userInfo, + double atan2( + double arg0, + double arg1, ) { - return __objc_msgSend_315( - obj, - sel, - name, - object, - userInfo, + return _atan2( + arg0, + arg1, ); } - late final __objc_msgSend_315Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer)>(); + late final _atan2Ptr = + _lookup>( + 'atan2'); + late final _atan2 = _atan2Ptr.asFunction(); - late final _sel_notificationWithName_object_1 = - _registerName1("notificationWithName:object:"); - late final _sel_notificationWithName_object_userInfo_1 = - _registerName1("notificationWithName:object:userInfo:"); - late final _class_NSNotificationCenter1 = _getClass1("NSNotificationCenter"); - late final _sel_defaultCenter1 = _registerName1("defaultCenter"); - ffi.Pointer _objc_msgSend_316( - ffi.Pointer obj, - ffi.Pointer sel, + double cosf( + double arg0, ) { - return __objc_msgSend_316( - obj, - sel, + return _cosf( + arg0, ); } - late final __objc_msgSend_316Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _cosfPtr = + _lookup>('cosf'); + late final _cosf = _cosfPtr.asFunction(); - late final _sel_addObserver_selector_name_object_1 = - _registerName1("addObserver:selector:name:object:"); - void _objc_msgSend_317( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer aSelector, - NSNotificationName aName, - ffi.Pointer anObject, + double cos( + double arg0, ) { - return __objc_msgSend_317( - obj, - sel, - observer, - aSelector, - aName, - anObject, + return _cos( + arg0, ); } - late final __objc_msgSend_317Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer)>(); + late final _cosPtr = + _lookup>('cos'); + late final _cos = _cosPtr.asFunction(); - late final _sel_postNotification_1 = _registerName1("postNotification:"); - void _objc_msgSend_318( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer notification, + double sinf( + double arg0, ) { - return __objc_msgSend_318( - obj, - sel, - notification, + return _sinf( + arg0, ); } - late final __objc_msgSend_318Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _sinfPtr = + _lookup>('sinf'); + late final _sinf = _sinfPtr.asFunction(); - late final _sel_postNotificationName_object_1 = - _registerName1("postNotificationName:object:"); - void _objc_msgSend_319( - ffi.Pointer obj, - ffi.Pointer sel, - NSNotificationName aName, - ffi.Pointer anObject, + double sin( + double arg0, ) { - return __objc_msgSend_319( - obj, - sel, - aName, - anObject, + return _sin( + arg0, ); } - late final __objc_msgSend_319Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer)>(); + late final _sinPtr = + _lookup>('sin'); + late final _sin = _sinPtr.asFunction(); - late final _sel_postNotificationName_object_userInfo_1 = - _registerName1("postNotificationName:object:userInfo:"); - void _objc_msgSend_320( - ffi.Pointer obj, - ffi.Pointer sel, - NSNotificationName aName, - ffi.Pointer anObject, - ffi.Pointer aUserInfo, + double tanf( + double arg0, ) { - return __objc_msgSend_320( - obj, - sel, - aName, - anObject, - aUserInfo, + return _tanf( + arg0, ); } - late final __objc_msgSend_320Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer)>(); + late final _tanfPtr = + _lookup>('tanf'); + late final _tanf = _tanfPtr.asFunction(); - late final _sel_removeObserver_1 = _registerName1("removeObserver:"); - late final _sel_removeObserver_name_object_1 = - _registerName1("removeObserver:name:object:"); - void _objc_msgSend_321( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - NSNotificationName aName, - ffi.Pointer anObject, + double tan( + double arg0, ) { - return __objc_msgSend_321( - obj, - sel, - observer, - aName, - anObject, + return _tan( + arg0, ); } - late final __objc_msgSend_321Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer)>(); + late final _tanPtr = + _lookup>('tan'); + late final _tan = _tanPtr.asFunction(); - late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); - late final _class_NSProgress1 = _getClass1("NSProgress"); - late final _sel_currentProgress1 = _registerName1("currentProgress"); - ffi.Pointer _objc_msgSend_322( - ffi.Pointer obj, - ffi.Pointer sel, + double acoshf( + double arg0, ) { - return __objc_msgSend_322( - obj, - sel, + return _acoshf( + arg0, ); } - late final __objc_msgSend_322Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _acoshfPtr = + _lookup>('acoshf'); + late final _acoshf = _acoshfPtr.asFunction(); - late final _sel_progressWithTotalUnitCount_1 = - _registerName1("progressWithTotalUnitCount:"); - ffi.Pointer _objc_msgSend_323( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, + double acosh( + double arg0, ) { - return __objc_msgSend_323( - obj, - sel, - unitCount, + return _acosh( + arg0, ); } - late final __objc_msgSend_323Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _acoshPtr = + _lookup>('acosh'); + late final _acosh = _acoshPtr.asFunction(); - late final _sel_discreteProgressWithTotalUnitCount_1 = - _registerName1("discreteProgressWithTotalUnitCount:"); - late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = - _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); - ffi.Pointer _objc_msgSend_324( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, - ffi.Pointer parent, - int portionOfParentTotalUnitCount, + double asinhf( + double arg0, ) { - return __objc_msgSend_324( - obj, - sel, - unitCount, - parent, - portionOfParentTotalUnitCount, + return _asinhf( + arg0, ); } - late final __objc_msgSend_324Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); + late final _asinhfPtr = + _lookup>('asinhf'); + late final _asinhf = _asinhfPtr.asFunction(); - late final _sel_initWithParent_userInfo_1 = - _registerName1("initWithParent:userInfo:"); - instancetype _objc_msgSend_325( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer parentProgressOrNil, - ffi.Pointer userInfoOrNil, + double asinh( + double arg0, ) { - return __objc_msgSend_325( - obj, - sel, - parentProgressOrNil, - userInfoOrNil, + return _asinh( + arg0, ); } - late final __objc_msgSend_325Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _asinhPtr = + _lookup>('asinh'); + late final _asinh = _asinhPtr.asFunction(); - late final _sel_becomeCurrentWithPendingUnitCount_1 = - _registerName1("becomeCurrentWithPendingUnitCount:"); - void _objc_msgSend_326( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, + double atanhf( + double arg0, ) { - return __objc_msgSend_326( - obj, - sel, - unitCount, + return _atanhf( + arg0, ); } - late final __objc_msgSend_326Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _atanhfPtr = + _lookup>('atanhf'); + late final _atanhf = _atanhfPtr.asFunction(); - late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = - _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); - void _objc_msgSend_327( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, - ffi.Pointer<_ObjCBlock> work, + double atanh( + double arg0, ) { - return __objc_msgSend_327( - obj, - sel, - unitCount, - work, + return _atanh( + arg0, ); } - late final __objc_msgSend_327Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + late final _atanhPtr = + _lookup>('atanh'); + late final _atanh = _atanhPtr.asFunction(); - late final _sel_resignCurrent1 = _registerName1("resignCurrent"); - late final _sel_addChild_withPendingUnitCount_1 = - _registerName1("addChild:withPendingUnitCount:"); - void _objc_msgSend_328( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - int inUnitCount, + double coshf( + double arg0, ) { - return __objc_msgSend_328( - obj, - sel, - child, - inUnitCount, + return _coshf( + arg0, ); } - late final __objc_msgSend_328Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _coshfPtr = + _lookup>('coshf'); + late final _coshf = _coshfPtr.asFunction(); - late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); - int _objc_msgSend_329( - ffi.Pointer obj, - ffi.Pointer sel, + double cosh( + double arg0, ) { - return __objc_msgSend_329( - obj, - sel, + return _cosh( + arg0, ); } - late final __objc_msgSend_329Ptr = _lookup< - ffi.NativeFunction< - ffi.Int64 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _coshPtr = + _lookup>('cosh'); + late final _cosh = _coshPtr.asFunction(); - late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); - void _objc_msgSend_330( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + double sinhf( + double arg0, ) { - return __objc_msgSend_330( - obj, - sel, - value, + return _sinhf( + arg0, ); } - late final __objc_msgSend_330Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _sinhfPtr = + _lookup>('sinhf'); + late final _sinhf = _sinhfPtr.asFunction(); - late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); - late final _sel_setCompletedUnitCount_1 = - _registerName1("setCompletedUnitCount:"); - late final _sel_setLocalizedDescription_1 = - _registerName1("setLocalizedDescription:"); - void _objc_msgSend_331( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + double sinh( + double arg0, ) { - return __objc_msgSend_331( - obj, - sel, - value, + return _sinh( + arg0, ); } - late final __objc_msgSend_331Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _sinhPtr = + _lookup>('sinh'); + late final _sinh = _sinhPtr.asFunction(); - late final _sel_localizedAdditionalDescription1 = - _registerName1("localizedAdditionalDescription"); - late final _sel_setLocalizedAdditionalDescription_1 = - _registerName1("setLocalizedAdditionalDescription:"); - late final _sel_isCancellable1 = _registerName1("isCancellable"); - late final _sel_setCancellable_1 = _registerName1("setCancellable:"); - void _objc_msgSend_332( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, + double tanhf( + double arg0, ) { - return __objc_msgSend_332( - obj, - sel, - value, + return _tanhf( + arg0, ); } - late final __objc_msgSend_332Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, bool)>(); + late final _tanhfPtr = + _lookup>('tanhf'); + late final _tanhf = _tanhfPtr.asFunction(); - late final _sel_isPausable1 = _registerName1("isPausable"); - late final _sel_setPausable_1 = _registerName1("setPausable:"); - late final _sel_isCancelled1 = _registerName1("isCancelled"); - late final _sel_isPaused1 = _registerName1("isPaused"); - late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_333( - ffi.Pointer obj, - ffi.Pointer sel, + double tanh( + double arg0, ) { - return __objc_msgSend_333( - obj, - sel, + return _tanh( + arg0, ); } - late final __objc_msgSend_333Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); + late final _tanhPtr = + _lookup>('tanh'); + late final _tanh = _tanhPtr.asFunction(); - late final _sel_setCancellationHandler_1 = - _registerName1("setCancellationHandler:"); - void _objc_msgSend_334( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, + double expf( + double arg0, ) { - return __objc_msgSend_334( - obj, - sel, - value, + return _expf( + arg0, ); } - late final __objc_msgSend_334Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _expfPtr = + _lookup>('expf'); + late final _expf = _expfPtr.asFunction(); - late final _sel_pausingHandler1 = _registerName1("pausingHandler"); - late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); - late final _sel_resumingHandler1 = _registerName1("resumingHandler"); - late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); - late final _sel_setUserInfoObject_forKey_1 = - _registerName1("setUserInfoObject:forKey:"); - late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); - late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); - late final _sel_isFinished1 = _registerName1("isFinished"); - late final _sel_cancel1 = _registerName1("cancel"); - late final _sel_pause1 = _registerName1("pause"); - late final _sel_resume1 = _registerName1("resume"); - late final _sel_kind1 = _registerName1("kind"); - late final _sel_setKind_1 = _registerName1("setKind:"); - late final _sel_estimatedTimeRemaining1 = - _registerName1("estimatedTimeRemaining"); - late final _sel_setEstimatedTimeRemaining_1 = - _registerName1("setEstimatedTimeRemaining:"); - void _objc_msgSend_335( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + double exp( + double arg0, ) { - return __objc_msgSend_335( - obj, - sel, - value, + return _exp( + arg0, ); } - late final __objc_msgSend_335Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _expPtr = + _lookup>('exp'); + late final _exp = _expPtr.asFunction(); - late final _sel_throughput1 = _registerName1("throughput"); - late final _sel_setThroughput_1 = _registerName1("setThroughput:"); - late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); - late final _sel_setFileOperationKind_1 = - _registerName1("setFileOperationKind:"); - late final _sel_fileURL1 = _registerName1("fileURL"); - late final _sel_setFileURL_1 = _registerName1("setFileURL:"); - void _objc_msgSend_336( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + double exp2f( + double arg0, ) { - return __objc_msgSend_336( - obj, - sel, - value, + return _exp2f( + arg0, ); } - late final __objc_msgSend_336Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _exp2fPtr = + _lookup>('exp2f'); + late final _exp2f = _exp2fPtr.asFunction(); - late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); - late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); - late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); - late final _sel_setFileCompletedCount_1 = - _registerName1("setFileCompletedCount:"); - late final _sel_publish1 = _registerName1("publish"); - late final _sel_unpublish1 = _registerName1("unpublish"); - late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = - _registerName1("addSubscriberForFileURL:withPublishingHandler:"); - ffi.Pointer _objc_msgSend_337( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - NSProgressPublishingHandler publishingHandler, + double exp2( + double arg0, ) { - return __objc_msgSend_337( - obj, - sel, - url, - publishingHandler, + return _exp2( + arg0, ); } - late final __objc_msgSend_337Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>>('objc_msgSend'); - late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>(); + late final _exp2Ptr = + _lookup>('exp2'); + late final _exp2 = _exp2Ptr.asFunction(); - late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); - late final _sel_isOld1 = _registerName1("isOld"); - late final _sel_progress1 = _registerName1("progress"); - late final _class_NSOperation1 = _getClass1("NSOperation"); - late final _sel_start1 = _registerName1("start"); - late final _sel_main1 = _registerName1("main"); - late final _sel_isExecuting1 = _registerName1("isExecuting"); - late final _sel_isConcurrent1 = _registerName1("isConcurrent"); - late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); - late final _sel_isReady1 = _registerName1("isReady"); - late final _sel_addDependency_1 = _registerName1("addDependency:"); - void _objc_msgSend_338( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer op, + double expm1f( + double arg0, ) { - return __objc_msgSend_338( - obj, - sel, - op, + return _expm1f( + arg0, ); } - late final __objc_msgSend_338Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _expm1fPtr = + _lookup>('expm1f'); + late final _expm1f = _expm1fPtr.asFunction(); - late final _sel_removeDependency_1 = _registerName1("removeDependency:"); - late final _sel_dependencies1 = _registerName1("dependencies"); - late final _sel_queuePriority1 = _registerName1("queuePriority"); - int _objc_msgSend_339( - ffi.Pointer obj, - ffi.Pointer sel, + double expm1( + double arg0, ) { - return __objc_msgSend_339( - obj, - sel, + return _expm1( + arg0, ); } - late final __objc_msgSend_339Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _expm1Ptr = + _lookup>('expm1'); + late final _expm1 = _expm1Ptr.asFunction(); - late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); - void _objc_msgSend_340( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + double logf( + double arg0, ) { - return __objc_msgSend_340( - obj, - sel, - value, + return _logf( + arg0, ); } - late final __objc_msgSend_340Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _logfPtr = + _lookup>('logf'); + late final _logf = _logfPtr.asFunction(); - late final _sel_completionBlock1 = _registerName1("completionBlock"); - late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); - late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); - late final _sel_threadPriority1 = _registerName1("threadPriority"); - late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); - void _objc_msgSend_341( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + double log( + double arg0, ) { - return __objc_msgSend_341( - obj, - sel, - value, + return _log( + arg0, ); } - late final __objc_msgSend_341Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); + late final _logPtr = + _lookup>('log'); + late final _log = _logPtr.asFunction(); - late final _sel_qualityOfService1 = _registerName1("qualityOfService"); - int _objc_msgSend_342( - ffi.Pointer obj, - ffi.Pointer sel, + double log10f( + double arg0, ) { - return __objc_msgSend_342( - obj, - sel, + return _log10f( + arg0, ); } - late final __objc_msgSend_342Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _log10fPtr = + _lookup>('log10f'); + late final _log10f = _log10fPtr.asFunction(); - late final _sel_setQualityOfService_1 = - _registerName1("setQualityOfService:"); - void _objc_msgSend_343( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + double log10( + double arg0, ) { - return __objc_msgSend_343( - obj, - sel, - value, + return _log10( + arg0, ); } - late final __objc_msgSend_343Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _log10Ptr = + _lookup>('log10'); + late final _log10 = _log10Ptr.asFunction(); - late final _sel_setName_1 = _registerName1("setName:"); - late final _sel_addOperation_1 = _registerName1("addOperation:"); - late final _sel_addOperations_waitUntilFinished_1 = - _registerName1("addOperations:waitUntilFinished:"); - void _objc_msgSend_344( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ops, - bool wait, + double log2f( + double arg0, ) { - return __objc_msgSend_344( - obj, - sel, - ops, - wait, + return _log2f( + arg0, ); } - late final __objc_msgSend_344Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + late final _log2fPtr = + _lookup>('log2f'); + late final _log2f = _log2fPtr.asFunction(); - late final _sel_addOperationWithBlock_1 = - _registerName1("addOperationWithBlock:"); - void _objc_msgSend_345( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + double log2( + double arg0, ) { - return __objc_msgSend_345( - obj, - sel, - block, + return _log2( + arg0, ); } - late final __objc_msgSend_345Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _log2Ptr = + _lookup>('log2'); + late final _log2 = _log2Ptr.asFunction(); - late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); - late final _sel_maxConcurrentOperationCount1 = - _registerName1("maxConcurrentOperationCount"); - late final _sel_setMaxConcurrentOperationCount_1 = - _registerName1("setMaxConcurrentOperationCount:"); - void _objc_msgSend_346( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + double log1pf( + double arg0, ) { - return __objc_msgSend_346( - obj, - sel, - value, + return _log1pf( + arg0, ); } - late final __objc_msgSend_346Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _log1pfPtr = + _lookup>('log1pf'); + late final _log1pf = _log1pfPtr.asFunction(); - late final _sel_isSuspended1 = _registerName1("isSuspended"); - late final _sel_setSuspended_1 = _registerName1("setSuspended:"); - late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); - dispatch_queue_t _objc_msgSend_347( - ffi.Pointer obj, - ffi.Pointer sel, + double log1p( + double arg0, ) { - return __objc_msgSend_347( - obj, - sel, + return _log1p( + arg0, ); } - late final __objc_msgSend_347Ptr = _lookup< - ffi.NativeFunction< - dispatch_queue_t Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< - dispatch_queue_t Function( - ffi.Pointer, ffi.Pointer)>(); + late final _log1pPtr = + _lookup>('log1p'); + late final _log1p = _log1pPtr.asFunction(); - late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); - void _objc_msgSend_348( - ffi.Pointer obj, - ffi.Pointer sel, - dispatch_queue_t value, + double logbf( + double arg0, ) { - return __objc_msgSend_348( - obj, - sel, - value, + return _logbf( + arg0, ); } - late final __objc_msgSend_348Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - dispatch_queue_t)>>('objc_msgSend'); - late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); + late final _logbfPtr = + _lookup>('logbf'); + late final _logbf = _logbfPtr.asFunction(); - late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); - late final _sel_waitUntilAllOperationsAreFinished1 = - _registerName1("waitUntilAllOperationsAreFinished"); - late final _sel_currentQueue1 = _registerName1("currentQueue"); - ffi.Pointer _objc_msgSend_349( - ffi.Pointer obj, - ffi.Pointer sel, + double logb( + double arg0, ) { - return __objc_msgSend_349( - obj, - sel, + return _logb( + arg0, ); } - late final __objc_msgSend_349Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _logbPtr = + _lookup>('logb'); + late final _logb = _logbPtr.asFunction(); - late final _sel_mainQueue1 = _registerName1("mainQueue"); - late final _sel_operations1 = _registerName1("operations"); - late final _sel_operationCount1 = _registerName1("operationCount"); - late final _sel_addObserverForName_object_queue_usingBlock_1 = - _registerName1("addObserverForName:object:queue:usingBlock:"); - ffi.Pointer _objc_msgSend_350( - ffi.Pointer obj, - ffi.Pointer sel, - NSNotificationName name, - ffi.Pointer obj1, - ffi.Pointer queue, - ffi.Pointer<_ObjCBlock> block, + double modff( + double arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_350( - obj, - sel, - name, - obj1, - queue, - block, + return _modff( + arg0, + arg1, ); } - late final __objc_msgSend_350Ptr = _lookup< + late final _modffPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final ffi.Pointer - _NSSystemClockDidChangeNotification = - _lookup('NSSystemClockDidChangeNotification'); - - NSNotificationName get NSSystemClockDidChangeNotification => - _NSSystemClockDidChangeNotification.value; - - set NSSystemClockDidChangeNotification(NSNotificationName value) => - _NSSystemClockDidChangeNotification.value = value; + ffi.Float Function(ffi.Float, ffi.Pointer)>>('modff'); + late final _modff = + _modffPtr.asFunction)>(); - late final _class_NSDate1 = _getClass1("NSDate"); - late final _sel_timeIntervalSinceReferenceDate1 = - _registerName1("timeIntervalSinceReferenceDate"); - late final _sel_initWithTimeIntervalSinceReferenceDate_1 = - _registerName1("initWithTimeIntervalSinceReferenceDate:"); - instancetype _objc_msgSend_351( - ffi.Pointer obj, - ffi.Pointer sel, - double ti, + double modf( + double arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_351( - obj, - sel, - ti, + return _modf( + arg0, + arg1, ); } - late final __objc_msgSend_351Ptr = _lookup< + late final _modfPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, double)>(); + ffi.Double Function(ffi.Double, ffi.Pointer)>>('modf'); + late final _modf = + _modfPtr.asFunction)>(); - late final _sel_timeIntervalSinceDate_1 = - _registerName1("timeIntervalSinceDate:"); - double _objc_msgSend_352( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anotherDate, + double ldexpf( + double arg0, + int arg1, ) { - return __objc_msgSend_352( - obj, - sel, - anotherDate, + return _ldexpf( + arg0, + arg1, ); } - late final __objc_msgSend_352Ptr = _lookup< - ffi.NativeFunction< - NSTimeInterval Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _ldexpfPtr = + _lookup>( + 'ldexpf'); + late final _ldexpf = _ldexpfPtr.asFunction(); - late final _sel_timeIntervalSinceNow1 = - _registerName1("timeIntervalSinceNow"); - late final _sel_timeIntervalSince19701 = - _registerName1("timeIntervalSince1970"); - late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); - late final _sel_dateByAddingTimeInterval_1 = - _registerName1("dateByAddingTimeInterval:"); - late final _sel_earlierDate_1 = _registerName1("earlierDate:"); - ffi.Pointer _objc_msgSend_353( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anotherDate, + double ldexp( + double arg0, + int arg1, ) { - return __objc_msgSend_353( - obj, - sel, - anotherDate, + return _ldexp( + arg0, + arg1, ); } - late final __objc_msgSend_353Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _ldexpPtr = + _lookup>( + 'ldexp'); + late final _ldexp = _ldexpPtr.asFunction(); - late final _sel_laterDate_1 = _registerName1("laterDate:"); - int _objc_msgSend_354( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, + double frexpf( + double arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_354( - obj, - sel, - other, + return _frexpf( + arg0, + arg1, ); } - late final __objc_msgSend_354Ptr = _lookup< + late final _frexpfPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Float Function(ffi.Float, ffi.Pointer)>>('frexpf'); + late final _frexpf = + _frexpfPtr.asFunction)>(); - late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); - bool _objc_msgSend_355( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDate, + double frexp( + double arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_355( - obj, - sel, - otherDate, + return _frexp( + arg0, + arg1, ); } - late final __objc_msgSend_355Ptr = _lookup< + late final _frexpPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Double Function(ffi.Double, ffi.Pointer)>>('frexp'); + late final _frexp = + _frexpPtr.asFunction)>(); - late final _sel_date1 = _registerName1("date"); - late final _sel_dateWithTimeIntervalSinceNow_1 = - _registerName1("dateWithTimeIntervalSinceNow:"); - late final _sel_dateWithTimeIntervalSinceReferenceDate_1 = - _registerName1("dateWithTimeIntervalSinceReferenceDate:"); - late final _sel_dateWithTimeIntervalSince1970_1 = - _registerName1("dateWithTimeIntervalSince1970:"); - late final _sel_dateWithTimeInterval_sinceDate_1 = - _registerName1("dateWithTimeInterval:sinceDate:"); - instancetype _objc_msgSend_356( - ffi.Pointer obj, - ffi.Pointer sel, - double secsToBeAdded, - ffi.Pointer date, + int ilogbf( + double arg0, ) { - return __objc_msgSend_356( - obj, - sel, - secsToBeAdded, - date, + return _ilogbf( + arg0, ); } - late final __objc_msgSend_356Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSTimeInterval, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - double, ffi.Pointer)>(); + late final _ilogbfPtr = + _lookup>('ilogbf'); + late final _ilogbf = _ilogbfPtr.asFunction(); - late final _sel_distantFuture1 = _registerName1("distantFuture"); - ffi.Pointer _objc_msgSend_357( - ffi.Pointer obj, - ffi.Pointer sel, + int ilogb( + double arg0, ) { - return __objc_msgSend_357( - obj, - sel, + return _ilogb( + arg0, ); } - late final __objc_msgSend_357Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _ilogbPtr = + _lookup>('ilogb'); + late final _ilogb = _ilogbPtr.asFunction(); - late final _sel_distantPast1 = _registerName1("distantPast"); - late final _sel_now1 = _registerName1("now"); - late final _sel_initWithTimeIntervalSinceNow_1 = - _registerName1("initWithTimeIntervalSinceNow:"); - late final _sel_initWithTimeIntervalSince1970_1 = - _registerName1("initWithTimeIntervalSince1970:"); - late final _sel_initWithTimeInterval_sinceDate_1 = - _registerName1("initWithTimeInterval:sinceDate:"); - late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); - late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); - late final _sel_supportsSecureCoding1 = - _registerName1("supportsSecureCoding"); - late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = - _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); - instancetype _objc_msgSend_358( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - int cachePolicy, - double timeoutInterval, + double scalbnf( + double arg0, + int arg1, ) { - return __objc_msgSend_358( - obj, - sel, - URL, - cachePolicy, - timeoutInterval, + return _scalbnf( + arg0, + arg1, ); } - late final __objc_msgSend_358Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, double)>(); + late final _scalbnfPtr = + _lookup>( + 'scalbnf'); + late final _scalbnf = _scalbnfPtr.asFunction(); - late final _sel_initWithURL_1 = _registerName1("initWithURL:"); - late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = - _registerName1("initWithURL:cachePolicy:timeoutInterval:"); - late final _sel_URL1 = _registerName1("URL"); - late final _sel_cachePolicy1 = _registerName1("cachePolicy"); - int _objc_msgSend_359( - ffi.Pointer obj, - ffi.Pointer sel, + double scalbn( + double arg0, + int arg1, ) { - return __objc_msgSend_359( - obj, - sel, + return _scalbn( + arg0, + arg1, ); } - late final __objc_msgSend_359Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _scalbnPtr = + _lookup>( + 'scalbn'); + late final _scalbn = _scalbnPtr.asFunction(); - late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); - late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); - late final _sel_networkServiceType1 = _registerName1("networkServiceType"); - int _objc_msgSend_360( - ffi.Pointer obj, - ffi.Pointer sel, + double scalblnf( + double arg0, + int arg1, ) { - return __objc_msgSend_360( - obj, - sel, + return _scalblnf( + arg0, + arg1, ); } - late final __objc_msgSend_360Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _scalblnfPtr = + _lookup>( + 'scalblnf'); + late final _scalblnf = + _scalblnfPtr.asFunction(); - late final _sel_allowsCellularAccess1 = - _registerName1("allowsCellularAccess"); - late final _sel_allowsExpensiveNetworkAccess1 = - _registerName1("allowsExpensiveNetworkAccess"); - late final _sel_allowsConstrainedNetworkAccess1 = - _registerName1("allowsConstrainedNetworkAccess"); - late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); - late final _sel_attribution1 = _registerName1("attribution"); - int _objc_msgSend_361( - ffi.Pointer obj, - ffi.Pointer sel, + double scalbln( + double arg0, + int arg1, ) { - return __objc_msgSend_361( - obj, - sel, + return _scalbln( + arg0, + arg1, ); } - late final __objc_msgSend_361Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _scalblnPtr = + _lookup>( + 'scalbln'); + late final _scalbln = _scalblnPtr.asFunction(); - late final _sel_requiresDNSSECValidation1 = - _registerName1("requiresDNSSECValidation"); - late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); - late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); - late final _sel_valueForHTTPHeaderField_1 = - _registerName1("valueForHTTPHeaderField:"); - late final _sel_HTTPBody1 = _registerName1("HTTPBody"); - late final _class_NSInputStream1 = _getClass1("NSInputStream"); - late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); - ffi.Pointer _objc_msgSend_362( - ffi.Pointer obj, - ffi.Pointer sel, + double fabsf( + double arg0, ) { - return __objc_msgSend_362( - obj, - sel, + return _fabsf( + arg0, ); } - late final __objc_msgSend_362Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _fabsfPtr = + _lookup>('fabsf'); + late final _fabsf = _fabsfPtr.asFunction(); - late final _sel_HTTPShouldHandleCookies1 = - _registerName1("HTTPShouldHandleCookies"); - late final _sel_HTTPShouldUsePipelining1 = - _registerName1("HTTPShouldUsePipelining"); - late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); - late final _sel_setURL_1 = _registerName1("setURL:"); - late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); - void _objc_msgSend_363( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + double fabs( + double arg0, ) { - return __objc_msgSend_363( - obj, - sel, - value, + return _fabs( + arg0, ); } - late final __objc_msgSend_363Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _fabsPtr = + _lookup>('fabs'); + late final _fabs = _fabsPtr.asFunction(); - late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); - late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); - late final _sel_setNetworkServiceType_1 = - _registerName1("setNetworkServiceType:"); - void _objc_msgSend_364( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + double cbrtf( + double arg0, ) { - return __objc_msgSend_364( - obj, - sel, - value, + return _cbrtf( + arg0, ); } - late final __objc_msgSend_364Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _cbrtfPtr = + _lookup>('cbrtf'); + late final _cbrtf = _cbrtfPtr.asFunction(); - late final _sel_setAllowsCellularAccess_1 = - _registerName1("setAllowsCellularAccess:"); - late final _sel_setAllowsExpensiveNetworkAccess_1 = - _registerName1("setAllowsExpensiveNetworkAccess:"); - late final _sel_setAllowsConstrainedNetworkAccess_1 = - _registerName1("setAllowsConstrainedNetworkAccess:"); - late final _sel_setAssumesHTTP3Capable_1 = - _registerName1("setAssumesHTTP3Capable:"); - late final _sel_setAttribution_1 = _registerName1("setAttribution:"); - void _objc_msgSend_365( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + double cbrt( + double arg0, ) { - return __objc_msgSend_365( - obj, - sel, - value, + return _cbrt( + arg0, ); } - late final __objc_msgSend_365Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _cbrtPtr = + _lookup>('cbrt'); + late final _cbrt = _cbrtPtr.asFunction(); - late final _sel_setRequiresDNSSECValidation_1 = - _registerName1("setRequiresDNSSECValidation:"); - late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); - late final _sel_setAllHTTPHeaderFields_1 = - _registerName1("setAllHTTPHeaderFields:"); - void _objc_msgSend_366( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + double hypotf( + double arg0, + double arg1, ) { - return __objc_msgSend_366( - obj, - sel, - value, + return _hypotf( + arg0, + arg1, ); } - late final __objc_msgSend_366Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _hypotfPtr = + _lookup>( + 'hypotf'); + late final _hypotf = _hypotfPtr.asFunction(); - late final _sel_setValue_forHTTPHeaderField_1 = - _registerName1("setValue:forHTTPHeaderField:"); - void _objc_msgSend_367( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer field, + double hypot( + double arg0, + double arg1, ) { - return __objc_msgSend_367( - obj, - sel, - value, - field, + return _hypot( + arg0, + arg1, ); } - late final __objc_msgSend_367Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _hypotPtr = + _lookup>( + 'hypot'); + late final _hypot = _hypotPtr.asFunction(); - late final _sel_addValue_forHTTPHeaderField_1 = - _registerName1("addValue:forHTTPHeaderField:"); - late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); - void _objc_msgSend_368( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + double powf( + double arg0, + double arg1, ) { - return __objc_msgSend_368( - obj, - sel, - value, + return _powf( + arg0, + arg1, ); } - late final __objc_msgSend_368Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _powfPtr = + _lookup>( + 'powf'); + late final _powf = _powfPtr.asFunction(); - late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); - void _objc_msgSend_369( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + double pow( + double arg0, + double arg1, ) { - return __objc_msgSend_369( - obj, - sel, - value, + return _pow( + arg0, + arg1, ); } - late final __objc_msgSend_369Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _powPtr = + _lookup>( + 'pow'); + late final _pow = _powPtr.asFunction(); - late final _sel_setHTTPShouldHandleCookies_1 = - _registerName1("setHTTPShouldHandleCookies:"); - late final _sel_setHTTPShouldUsePipelining_1 = - _registerName1("setHTTPShouldUsePipelining:"); - late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); - late final _sel_sharedHTTPCookieStorage1 = - _registerName1("sharedHTTPCookieStorage"); - ffi.Pointer _objc_msgSend_370( - ffi.Pointer obj, - ffi.Pointer sel, + double sqrtf( + double arg0, ) { - return __objc_msgSend_370( - obj, - sel, + return _sqrtf( + arg0, ); } - late final __objc_msgSend_370Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _sqrtfPtr = + _lookup>('sqrtf'); + late final _sqrtf = _sqrtfPtr.asFunction(); - late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = - _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); - ffi.Pointer _objc_msgSend_371( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, + double sqrt( + double arg0, ) { - return __objc_msgSend_371( - obj, - sel, - identifier, + return _sqrt( + arg0, ); } - late final __objc_msgSend_371Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _sqrtPtr = + _lookup>('sqrt'); + late final _sqrt = _sqrtPtr.asFunction(); - late final _sel_cookies1 = _registerName1("cookies"); - late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); - late final _sel_setCookie_1 = _registerName1("setCookie:"); - void _objc_msgSend_372( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookie, + double erff( + double arg0, ) { - return __objc_msgSend_372( - obj, - sel, - cookie, + return _erff( + arg0, ); } - late final __objc_msgSend_372Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _erffPtr = + _lookup>('erff'); + late final _erff = _erffPtr.asFunction(); - late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); - late final _sel_removeCookiesSinceDate_1 = - _registerName1("removeCookiesSinceDate:"); - void _objc_msgSend_373( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, + double erf( + double arg0, ) { - return __objc_msgSend_373( - obj, - sel, - date, + return _erf( + arg0, ); } - late final __objc_msgSend_373Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _erfPtr = + _lookup>('erf'); + late final _erf = _erfPtr.asFunction(); - late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); - late final _sel_setCookies_forURL_mainDocumentURL_1 = - _registerName1("setCookies:forURL:mainDocumentURL:"); - void _objc_msgSend_374( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer URL, - ffi.Pointer mainDocumentURL, + double erfcf( + double arg0, ) { - return __objc_msgSend_374( - obj, - sel, - cookies, - URL, - mainDocumentURL, + return _erfcf( + arg0, ); } - late final __objc_msgSend_374Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _erfcfPtr = + _lookup>('erfcf'); + late final _erfcf = _erfcfPtr.asFunction(); - late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); - int _objc_msgSend_375( - ffi.Pointer obj, - ffi.Pointer sel, + double erfc( + double arg0, ) { - return __objc_msgSend_375( - obj, - sel, + return _erfc( + arg0, ); } - late final __objc_msgSend_375Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _erfcPtr = + _lookup>('erfc'); + late final _erfc = _erfcPtr.asFunction(); - late final _sel_setCookieAcceptPolicy_1 = - _registerName1("setCookieAcceptPolicy:"); - void _objc_msgSend_376( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + double lgammaf( + double arg0, ) { - return __objc_msgSend_376( - obj, - sel, - value, + return _lgammaf( + arg0, ); } - late final __objc_msgSend_376Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _lgammafPtr = + _lookup>('lgammaf'); + late final _lgammaf = _lgammafPtr.asFunction(); - late final _sel_sortedCookiesUsingDescriptors_1 = - _registerName1("sortedCookiesUsingDescriptors:"); - late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); - late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); - late final _sel_originalRequest1 = _registerName1("originalRequest"); - ffi.Pointer _objc_msgSend_377( - ffi.Pointer obj, - ffi.Pointer sel, + double lgamma( + double arg0, ) { - return __objc_msgSend_377( - obj, - sel, + return _lgamma( + arg0, ); } - late final __objc_msgSend_377Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _lgammaPtr = + _lookup>('lgamma'); + late final _lgamma = _lgammaPtr.asFunction(); - late final _sel_currentRequest1 = _registerName1("currentRequest"); - late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); - late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = - _registerName1( - "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); - instancetype _objc_msgSend_378( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - ffi.Pointer MIMEType, - int length, - ffi.Pointer name, + double tgammaf( + double arg0, ) { - return __objc_msgSend_378( - obj, - sel, - URL, - MIMEType, - length, - name, + return _tgammaf( + arg0, ); } - late final __objc_msgSend_378Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + late final _tgammafPtr = + _lookup>('tgammaf'); + late final _tgammaf = _tgammafPtr.asFunction(); - late final _sel_MIMEType1 = _registerName1("MIMEType"); - late final _sel_expectedContentLength1 = - _registerName1("expectedContentLength"); - late final _sel_textEncodingName1 = _registerName1("textEncodingName"); - late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); - late final _sel_response1 = _registerName1("response"); - ffi.Pointer _objc_msgSend_379( - ffi.Pointer obj, - ffi.Pointer sel, + double tgamma( + double arg0, ) { - return __objc_msgSend_379( - obj, - sel, + return _tgamma( + arg0, ); } - late final __objc_msgSend_379Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _tgammaPtr = + _lookup>('tgamma'); + late final _tgamma = _tgammaPtr.asFunction(); - late final _sel_delegate1 = _registerName1("delegate"); - late final _sel_setDelegate_1 = _registerName1("setDelegate:"); - void _objc_msgSend_380( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + double ceilf( + double arg0, ) { - return __objc_msgSend_380( - obj, - sel, - value, + return _ceilf( + arg0, ); } - late final __objc_msgSend_380Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _ceilfPtr = + _lookup>('ceilf'); + late final _ceilf = _ceilfPtr.asFunction(); - late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); - late final _sel_setEarliestBeginDate_1 = - _registerName1("setEarliestBeginDate:"); - void _objc_msgSend_381( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + double ceil( + double arg0, ) { - return __objc_msgSend_381( - obj, - sel, - value, + return _ceil( + arg0, ); } - late final __objc_msgSend_381Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _ceilPtr = + _lookup>('ceil'); + late final _ceil = _ceilPtr.asFunction(); - late final _sel_countOfBytesClientExpectsToSend1 = - _registerName1("countOfBytesClientExpectsToSend"); - late final _sel_setCountOfBytesClientExpectsToSend_1 = - _registerName1("setCountOfBytesClientExpectsToSend:"); - late final _sel_countOfBytesClientExpectsToReceive1 = - _registerName1("countOfBytesClientExpectsToReceive"); - late final _sel_setCountOfBytesClientExpectsToReceive_1 = - _registerName1("setCountOfBytesClientExpectsToReceive:"); - late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); - late final _sel_countOfBytesReceived1 = - _registerName1("countOfBytesReceived"); - late final _sel_countOfBytesExpectedToSend1 = - _registerName1("countOfBytesExpectedToSend"); - late final _sel_countOfBytesExpectedToReceive1 = - _registerName1("countOfBytesExpectedToReceive"); - late final _sel_taskDescription1 = _registerName1("taskDescription"); - late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); - late final _sel_state1 = _registerName1("state"); - int _objc_msgSend_382( - ffi.Pointer obj, - ffi.Pointer sel, + double floorf( + double arg0, ) { - return __objc_msgSend_382( - obj, - sel, + return _floorf( + arg0, ); } - late final __objc_msgSend_382Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _floorfPtr = + _lookup>('floorf'); + late final _floorf = _floorfPtr.asFunction(); - late final _sel_error1 = _registerName1("error"); - ffi.Pointer _objc_msgSend_383( - ffi.Pointer obj, - ffi.Pointer sel, + double floor( + double arg0, ) { - return __objc_msgSend_383( - obj, - sel, + return _floor( + arg0, ); } - late final __objc_msgSend_383Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _floorPtr = + _lookup>('floor'); + late final _floor = _floorPtr.asFunction(); - late final _sel_suspend1 = _registerName1("suspend"); - late final _sel_priority1 = _registerName1("priority"); - late final _sel_setPriority_1 = _registerName1("setPriority:"); - void _objc_msgSend_384( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + double nearbyintf( + double arg0, ) { - return __objc_msgSend_384( - obj, - sel, - value, + return _nearbyintf( + arg0, ); } - late final __objc_msgSend_384Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); + late final _nearbyintfPtr = + _lookup>('nearbyintf'); + late final _nearbyintf = _nearbyintfPtr.asFunction(); - late final _sel_prefersIncrementalDelivery1 = - _registerName1("prefersIncrementalDelivery"); - late final _sel_setPrefersIncrementalDelivery_1 = - _registerName1("setPrefersIncrementalDelivery:"); - late final _sel_storeCookies_forTask_1 = - _registerName1("storeCookies:forTask:"); - void _objc_msgSend_385( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer task, + double nearbyint( + double arg0, ) { - return __objc_msgSend_385( - obj, - sel, - cookies, - task, + return _nearbyint( + arg0, ); } - late final __objc_msgSend_385Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _nearbyintPtr = + _lookup>('nearbyint'); + late final _nearbyint = _nearbyintPtr.asFunction(); - late final _sel_getCookiesForTask_completionHandler_1 = - _registerName1("getCookiesForTask:completionHandler:"); - void _objc_msgSend_386( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer<_ObjCBlock> completionHandler, + double rintf( + double arg0, ) { - return __objc_msgSend_386( - obj, - sel, - task, - completionHandler, + return _rintf( + arg0, ); } - late final __objc_msgSend_386Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final ffi.Pointer - _NSHTTPCookieManagerAcceptPolicyChangedNotification = - _lookup( - 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); + late final _rintfPtr = + _lookup>('rintf'); + late final _rintf = _rintfPtr.asFunction(); - NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; + double rint( + double arg0, + ) { + return _rint( + arg0, + ); + } - set NSHTTPCookieManagerAcceptPolicyChangedNotification( - NSNotificationName value) => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; - - late final ffi.Pointer - _NSHTTPCookieManagerCookiesChangedNotification = - _lookup( - 'NSHTTPCookieManagerCookiesChangedNotification'); - - NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => - _NSHTTPCookieManagerCookiesChangedNotification.value; - - set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => - _NSHTTPCookieManagerCookiesChangedNotification.value = value; - - late final ffi.Pointer - _NSProgressEstimatedTimeRemainingKey = - _lookup('NSProgressEstimatedTimeRemainingKey'); - - NSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => - _NSProgressEstimatedTimeRemainingKey.value; - - set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey value) => - _NSProgressEstimatedTimeRemainingKey.value = value; - - late final ffi.Pointer _NSProgressThroughputKey = - _lookup('NSProgressThroughputKey'); - - NSProgressUserInfoKey get NSProgressThroughputKey => - _NSProgressThroughputKey.value; - - set NSProgressThroughputKey(NSProgressUserInfoKey value) => - _NSProgressThroughputKey.value = value; - - late final ffi.Pointer _NSProgressKindFile = - _lookup('NSProgressKindFile'); - - NSProgressKind get NSProgressKindFile => _NSProgressKindFile.value; - - set NSProgressKindFile(NSProgressKind value) => - _NSProgressKindFile.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindKey = - _lookup('NSProgressFileOperationKindKey'); - - NSProgressUserInfoKey get NSProgressFileOperationKindKey => - _NSProgressFileOperationKindKey.value; - - set NSProgressFileOperationKindKey(NSProgressUserInfoKey value) => - _NSProgressFileOperationKindKey.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindDownloading = - _lookup( - 'NSProgressFileOperationKindDownloading'); - - NSProgressFileOperationKind get NSProgressFileOperationKindDownloading => - _NSProgressFileOperationKindDownloading.value; - - set NSProgressFileOperationKindDownloading( - NSProgressFileOperationKind value) => - _NSProgressFileOperationKindDownloading.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindDecompressingAfterDownloading = - _lookup( - 'NSProgressFileOperationKindDecompressingAfterDownloading'); - - NSProgressFileOperationKind - get NSProgressFileOperationKindDecompressingAfterDownloading => - _NSProgressFileOperationKindDecompressingAfterDownloading.value; - - set NSProgressFileOperationKindDecompressingAfterDownloading( - NSProgressFileOperationKind value) => - _NSProgressFileOperationKindDecompressingAfterDownloading.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindReceiving = - _lookup( - 'NSProgressFileOperationKindReceiving'); - - NSProgressFileOperationKind get NSProgressFileOperationKindReceiving => - _NSProgressFileOperationKindReceiving.value; - - set NSProgressFileOperationKindReceiving(NSProgressFileOperationKind value) => - _NSProgressFileOperationKindReceiving.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindCopying = - _lookup( - 'NSProgressFileOperationKindCopying'); - - NSProgressFileOperationKind get NSProgressFileOperationKindCopying => - _NSProgressFileOperationKindCopying.value; - - set NSProgressFileOperationKindCopying(NSProgressFileOperationKind value) => - _NSProgressFileOperationKindCopying.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindUploading = - _lookup( - 'NSProgressFileOperationKindUploading'); - - NSProgressFileOperationKind get NSProgressFileOperationKindUploading => - _NSProgressFileOperationKindUploading.value; - - set NSProgressFileOperationKindUploading(NSProgressFileOperationKind value) => - _NSProgressFileOperationKindUploading.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindDuplicating = - _lookup( - 'NSProgressFileOperationKindDuplicating'); - - NSProgressFileOperationKind get NSProgressFileOperationKindDuplicating => - _NSProgressFileOperationKindDuplicating.value; - - set NSProgressFileOperationKindDuplicating( - NSProgressFileOperationKind value) => - _NSProgressFileOperationKindDuplicating.value = value; - - late final ffi.Pointer _NSProgressFileURLKey = - _lookup('NSProgressFileURLKey'); - - NSProgressUserInfoKey get NSProgressFileURLKey => _NSProgressFileURLKey.value; - - set NSProgressFileURLKey(NSProgressUserInfoKey value) => - _NSProgressFileURLKey.value = value; - - late final ffi.Pointer _NSProgressFileTotalCountKey = - _lookup('NSProgressFileTotalCountKey'); - - NSProgressUserInfoKey get NSProgressFileTotalCountKey => - _NSProgressFileTotalCountKey.value; - - set NSProgressFileTotalCountKey(NSProgressUserInfoKey value) => - _NSProgressFileTotalCountKey.value = value; - - late final ffi.Pointer - _NSProgressFileCompletedCountKey = - _lookup('NSProgressFileCompletedCountKey'); - - NSProgressUserInfoKey get NSProgressFileCompletedCountKey => - _NSProgressFileCompletedCountKey.value; - - set NSProgressFileCompletedCountKey(NSProgressUserInfoKey value) => - _NSProgressFileCompletedCountKey.value = value; - - late final ffi.Pointer - _NSProgressFileAnimationImageKey = - _lookup('NSProgressFileAnimationImageKey'); + late final _rintPtr = + _lookup>('rint'); + late final _rint = _rintPtr.asFunction(); - NSProgressUserInfoKey get NSProgressFileAnimationImageKey => - _NSProgressFileAnimationImageKey.value; + int lrintf( + double arg0, + ) { + return _lrintf( + arg0, + ); + } - set NSProgressFileAnimationImageKey(NSProgressUserInfoKey value) => - _NSProgressFileAnimationImageKey.value = value; + late final _lrintfPtr = + _lookup>('lrintf'); + late final _lrintf = _lrintfPtr.asFunction(); - late final ffi.Pointer - _NSProgressFileAnimationImageOriginalRectKey = - _lookup( - 'NSProgressFileAnimationImageOriginalRectKey'); + int lrint( + double arg0, + ) { + return _lrint( + arg0, + ); + } - NSProgressUserInfoKey get NSProgressFileAnimationImageOriginalRectKey => - _NSProgressFileAnimationImageOriginalRectKey.value; + late final _lrintPtr = + _lookup>('lrint'); + late final _lrint = _lrintPtr.asFunction(); - set NSProgressFileAnimationImageOriginalRectKey( - NSProgressUserInfoKey value) => - _NSProgressFileAnimationImageOriginalRectKey.value = value; + double roundf( + double arg0, + ) { + return _roundf( + arg0, + ); + } - late final ffi.Pointer _NSProgressFileIconKey = - _lookup('NSProgressFileIconKey'); + late final _roundfPtr = + _lookup>('roundf'); + late final _roundf = _roundfPtr.asFunction(); - NSProgressUserInfoKey get NSProgressFileIconKey => - _NSProgressFileIconKey.value; + double round( + double arg0, + ) { + return _round( + arg0, + ); + } - set NSProgressFileIconKey(NSProgressUserInfoKey value) => - _NSProgressFileIconKey.value = value; + late final _roundPtr = + _lookup>('round'); + late final _round = _roundPtr.asFunction(); - late final ffi.Pointer _kCFTypeArrayCallBacks = - _lookup('kCFTypeArrayCallBacks'); + int lroundf( + double arg0, + ) { + return _lroundf( + arg0, + ); + } - CFArrayCallBacks get kCFTypeArrayCallBacks => _kCFTypeArrayCallBacks.ref; + late final _lroundfPtr = + _lookup>('lroundf'); + late final _lroundf = _lroundfPtr.asFunction(); - int CFArrayGetTypeID() { - return _CFArrayGetTypeID(); + int lround( + double arg0, + ) { + return _lround( + arg0, + ); } - late final _CFArrayGetTypeIDPtr = - _lookup>('CFArrayGetTypeID'); - late final _CFArrayGetTypeID = - _CFArrayGetTypeIDPtr.asFunction(); + late final _lroundPtr = + _lookup>('lround'); + late final _lround = _lroundPtr.asFunction(); - CFArrayRef CFArrayCreate( - CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + int llrintf( + double arg0, ) { - return _CFArrayCreate( - allocator, - values, - numValues, - callBacks, + return _llrintf( + arg0, ); } - late final _CFArrayCreatePtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function( - CFAllocatorRef, - ffi.Pointer>, - CFIndex, - ffi.Pointer)>>('CFArrayCreate'); - late final _CFArrayCreate = _CFArrayCreatePtr.asFunction< - CFArrayRef Function(CFAllocatorRef, ffi.Pointer>, - int, ffi.Pointer)>(); + late final _llrintfPtr = + _lookup>('llrintf'); + late final _llrintf = _llrintfPtr.asFunction(); - CFArrayRef CFArrayCreateCopy( - CFAllocatorRef allocator, - CFArrayRef theArray, + int llrint( + double arg0, ) { - return _CFArrayCreateCopy( - allocator, - theArray, + return _llrint( + arg0, ); } - late final _CFArrayCreateCopyPtr = _lookup< - ffi.NativeFunction>( - 'CFArrayCreateCopy'); - late final _CFArrayCreateCopy = _CFArrayCreateCopyPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFArrayRef)>(); + late final _llrintPtr = + _lookup>('llrint'); + late final _llrint = _llrintPtr.asFunction(); - CFMutableArrayRef CFArrayCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + int llroundf( + double arg0, ) { - return _CFArrayCreateMutable( - allocator, - capacity, - callBacks, + return _llroundf( + arg0, ); } - late final _CFArrayCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableArrayRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFArrayCreateMutable'); - late final _CFArrayCreateMutable = _CFArrayCreateMutablePtr.asFunction< - CFMutableArrayRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + late final _llroundfPtr = + _lookup>('llroundf'); + late final _llroundf = _llroundfPtr.asFunction(); - CFMutableArrayRef CFArrayCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFArrayRef theArray, + int llround( + double arg0, ) { - return _CFArrayCreateMutableCopy( - allocator, - capacity, - theArray, + return _llround( + arg0, ); } - late final _CFArrayCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableArrayRef Function(CFAllocatorRef, CFIndex, - CFArrayRef)>>('CFArrayCreateMutableCopy'); - late final _CFArrayCreateMutableCopy = - _CFArrayCreateMutableCopyPtr.asFunction< - CFMutableArrayRef Function(CFAllocatorRef, int, CFArrayRef)>(); + late final _llroundPtr = + _lookup>('llround'); + late final _llround = _llroundPtr.asFunction(); - int CFArrayGetCount( - CFArrayRef theArray, + double truncf( + double arg0, ) { - return _CFArrayGetCount( - theArray, + return _truncf( + arg0, ); } - late final _CFArrayGetCountPtr = - _lookup>( - 'CFArrayGetCount'); - late final _CFArrayGetCount = - _CFArrayGetCountPtr.asFunction(); + late final _truncfPtr = + _lookup>('truncf'); + late final _truncf = _truncfPtr.asFunction(); - int CFArrayGetCountOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + double trunc( + double arg0, ) { - return _CFArrayGetCountOfValue( - theArray, - range, - value, + return _trunc( + arg0, ); } - late final _CFArrayGetCountOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetCountOfValue'); - late final _CFArrayGetCountOfValue = _CFArrayGetCountOfValuePtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer)>(); + late final _truncPtr = + _lookup>('trunc'); + late final _trunc = _truncPtr.asFunction(); - int CFArrayContainsValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + double fmodf( + double arg0, + double arg1, ) { - return _CFArrayContainsValue( - theArray, - range, - value, + return _fmodf( + arg0, + arg1, ); } - late final _CFArrayContainsValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayContainsValue'); - late final _CFArrayContainsValue = _CFArrayContainsValuePtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer)>(); + late final _fmodfPtr = + _lookup>( + 'fmodf'); + late final _fmodf = _fmodfPtr.asFunction(); - ffi.Pointer CFArrayGetValueAtIndex( - CFArrayRef theArray, - int idx, + double fmod( + double arg0, + double arg1, ) { - return _CFArrayGetValueAtIndex( - theArray, - idx, + return _fmod( + arg0, + arg1, ); } - late final _CFArrayGetValueAtIndexPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFArrayRef, CFIndex)>>('CFArrayGetValueAtIndex'); - late final _CFArrayGetValueAtIndex = _CFArrayGetValueAtIndexPtr.asFunction< - ffi.Pointer Function(CFArrayRef, int)>(); + late final _fmodPtr = + _lookup>( + 'fmod'); + late final _fmod = _fmodPtr.asFunction(); - void CFArrayGetValues( - CFArrayRef theArray, - CFRange range, - ffi.Pointer> values, + double remainderf( + double arg0, + double arg1, ) { - return _CFArrayGetValues( - theArray, - range, - values, + return _remainderf( + arg0, + arg1, ); } - late final _CFArrayGetValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFArrayRef, CFRange, - ffi.Pointer>)>>('CFArrayGetValues'); - late final _CFArrayGetValues = _CFArrayGetValuesPtr.asFunction< - void Function(CFArrayRef, CFRange, ffi.Pointer>)>(); + late final _remainderfPtr = + _lookup>( + 'remainderf'); + late final _remainderf = + _remainderfPtr.asFunction(); - void CFArrayApplyFunction( - CFArrayRef theArray, - CFRange range, - CFArrayApplierFunction applier, - ffi.Pointer context, + double remainder( + double arg0, + double arg1, ) { - return _CFArrayApplyFunction( - theArray, - range, - applier, - context, + return _remainder( + arg0, + arg1, ); } - late final _CFArrayApplyFunctionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFArrayRef, CFRange, CFArrayApplierFunction, - ffi.Pointer)>>('CFArrayApplyFunction'); - late final _CFArrayApplyFunction = _CFArrayApplyFunctionPtr.asFunction< - void Function(CFArrayRef, CFRange, CFArrayApplierFunction, - ffi.Pointer)>(); + late final _remainderPtr = + _lookup>( + 'remainder'); + late final _remainder = + _remainderPtr.asFunction(); - int CFArrayGetFirstIndexOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + double remquof( + double arg0, + double arg1, + ffi.Pointer arg2, ) { - return _CFArrayGetFirstIndexOfValue( - theArray, - range, - value, + return _remquof( + arg0, + arg1, + arg2, ); } - late final _CFArrayGetFirstIndexOfValuePtr = _lookup< + late final _remquofPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetFirstIndexOfValue'); - late final _CFArrayGetFirstIndexOfValue = _CFArrayGetFirstIndexOfValuePtr - .asFunction)>(); + ffi.Float Function( + ffi.Float, ffi.Float, ffi.Pointer)>>('remquof'); + late final _remquof = _remquofPtr + .asFunction)>(); - int CFArrayGetLastIndexOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + double remquo( + double arg0, + double arg1, + ffi.Pointer arg2, ) { - return _CFArrayGetLastIndexOfValue( - theArray, - range, - value, + return _remquo( + arg0, + arg1, + arg2, ); } - late final _CFArrayGetLastIndexOfValuePtr = _lookup< + late final _remquoPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetLastIndexOfValue'); - late final _CFArrayGetLastIndexOfValue = _CFArrayGetLastIndexOfValuePtr - .asFunction)>(); + ffi.Double Function( + ffi.Double, ffi.Double, ffi.Pointer)>>('remquo'); + late final _remquo = _remquoPtr + .asFunction)>(); - int CFArrayBSearchValues( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, - CFComparatorFunction comparator, - ffi.Pointer context, + double copysignf( + double arg0, + double arg1, ) { - return _CFArrayBSearchValues( - theArray, - range, - value, - comparator, - context, + return _copysignf( + arg0, + arg1, ); } - late final _CFArrayBSearchValuesPtr = _lookup< - ffi.NativeFunction< - CFIndex Function( - CFArrayRef, - CFRange, - ffi.Pointer, - CFComparatorFunction, - ffi.Pointer)>>('CFArrayBSearchValues'); - late final _CFArrayBSearchValues = _CFArrayBSearchValuesPtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer, - CFComparatorFunction, ffi.Pointer)>(); + late final _copysignfPtr = + _lookup>( + 'copysignf'); + late final _copysignf = + _copysignfPtr.asFunction(); - void CFArrayAppendValue( - CFMutableArrayRef theArray, - ffi.Pointer value, + double copysign( + double arg0, + double arg1, ) { - return _CFArrayAppendValue( - theArray, - value, + return _copysign( + arg0, + arg1, ); } - late final _CFArrayAppendValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableArrayRef, ffi.Pointer)>>('CFArrayAppendValue'); - late final _CFArrayAppendValue = _CFArrayAppendValuePtr.asFunction< - void Function(CFMutableArrayRef, ffi.Pointer)>(); + late final _copysignPtr = + _lookup>( + 'copysign'); + late final _copysign = + _copysignPtr.asFunction(); - void CFArrayInsertValueAtIndex( - CFMutableArrayRef theArray, - int idx, - ffi.Pointer value, + double nanf( + ffi.Pointer arg0, ) { - return _CFArrayInsertValueAtIndex( - theArray, - idx, - value, + return _nanf( + arg0, ); } - late final _CFArrayInsertValueAtIndexPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - ffi.Pointer)>>('CFArrayInsertValueAtIndex'); - late final _CFArrayInsertValueAtIndex = - _CFArrayInsertValueAtIndexPtr.asFunction< - void Function(CFMutableArrayRef, int, ffi.Pointer)>(); + late final _nanfPtr = + _lookup)>>( + 'nanf'); + late final _nanf = + _nanfPtr.asFunction)>(); - void CFArraySetValueAtIndex( - CFMutableArrayRef theArray, - int idx, - ffi.Pointer value, + double nan( + ffi.Pointer arg0, ) { - return _CFArraySetValueAtIndex( - theArray, - idx, - value, + return _nan( + arg0, ); } - late final _CFArraySetValueAtIndexPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - ffi.Pointer)>>('CFArraySetValueAtIndex'); - late final _CFArraySetValueAtIndex = _CFArraySetValueAtIndexPtr.asFunction< - void Function(CFMutableArrayRef, int, ffi.Pointer)>(); + late final _nanPtr = + _lookup)>>( + 'nan'); + late final _nan = + _nanPtr.asFunction)>(); - void CFArrayRemoveValueAtIndex( - CFMutableArrayRef theArray, - int idx, + double nextafterf( + double arg0, + double arg1, ) { - return _CFArrayRemoveValueAtIndex( - theArray, - idx, + return _nextafterf( + arg0, + arg1, ); } - late final _CFArrayRemoveValueAtIndexPtr = _lookup< - ffi.NativeFunction>( - 'CFArrayRemoveValueAtIndex'); - late final _CFArrayRemoveValueAtIndex = _CFArrayRemoveValueAtIndexPtr - .asFunction(); + late final _nextafterfPtr = + _lookup>( + 'nextafterf'); + late final _nextafterf = + _nextafterfPtr.asFunction(); - void CFArrayRemoveAllValues( - CFMutableArrayRef theArray, + double nextafter( + double arg0, + double arg1, ) { - return _CFArrayRemoveAllValues( - theArray, + return _nextafter( + arg0, + arg1, ); } - late final _CFArrayRemoveAllValuesPtr = - _lookup>( - 'CFArrayRemoveAllValues'); - late final _CFArrayRemoveAllValues = - _CFArrayRemoveAllValuesPtr.asFunction(); + late final _nextafterPtr = + _lookup>( + 'nextafter'); + late final _nextafter = + _nextafterPtr.asFunction(); - void CFArrayReplaceValues( - CFMutableArrayRef theArray, - CFRange range, - ffi.Pointer> newValues, - int newCount, + double fdimf( + double arg0, + double arg1, ) { - return _CFArrayReplaceValues( - theArray, - range, - newValues, - newCount, + return _fdimf( + arg0, + arg1, ); } - late final _CFArrayReplaceValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableArrayRef, - CFRange, - ffi.Pointer>, - CFIndex)>>('CFArrayReplaceValues'); - late final _CFArrayReplaceValues = _CFArrayReplaceValuesPtr.asFunction< - void Function(CFMutableArrayRef, CFRange, - ffi.Pointer>, int)>(); + late final _fdimfPtr = + _lookup>( + 'fdimf'); + late final _fdimf = _fdimfPtr.asFunction(); - void CFArrayExchangeValuesAtIndices( - CFMutableArrayRef theArray, - int idx1, - int idx2, + double fdim( + double arg0, + double arg1, ) { - return _CFArrayExchangeValuesAtIndices( - theArray, - idx1, - idx2, + return _fdim( + arg0, + arg1, ); } - late final _CFArrayExchangeValuesAtIndicesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - CFIndex)>>('CFArrayExchangeValuesAtIndices'); - late final _CFArrayExchangeValuesAtIndices = - _CFArrayExchangeValuesAtIndicesPtr.asFunction< - void Function(CFMutableArrayRef, int, int)>(); + late final _fdimPtr = + _lookup>( + 'fdim'); + late final _fdim = _fdimPtr.asFunction(); - void CFArraySortValues( - CFMutableArrayRef theArray, - CFRange range, - CFComparatorFunction comparator, - ffi.Pointer context, + double fmaxf( + double arg0, + double arg1, ) { - return _CFArraySortValues( - theArray, - range, - comparator, - context, + return _fmaxf( + arg0, + arg1, ); } - late final _CFArraySortValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, - ffi.Pointer)>>('CFArraySortValues'); - late final _CFArraySortValues = _CFArraySortValuesPtr.asFunction< - void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, - ffi.Pointer)>(); + late final _fmaxfPtr = + _lookup>( + 'fmaxf'); + late final _fmaxf = _fmaxfPtr.asFunction(); - void CFArrayAppendArray( - CFMutableArrayRef theArray, - CFArrayRef otherArray, - CFRange otherRange, + double fmax( + double arg0, + double arg1, ) { - return _CFArrayAppendArray( - theArray, - otherArray, - otherRange, + return _fmax( + arg0, + arg1, ); } - late final _CFArrayAppendArrayPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableArrayRef, CFArrayRef, CFRange)>>('CFArrayAppendArray'); - late final _CFArrayAppendArray = _CFArrayAppendArrayPtr.asFunction< - void Function(CFMutableArrayRef, CFArrayRef, CFRange)>(); + late final _fmaxPtr = + _lookup>( + 'fmax'); + late final _fmax = _fmaxPtr.asFunction(); - late final _class_OS_object1 = _getClass1("OS_object"); - ffi.Pointer os_retain( - ffi.Pointer object, + double fminf( + double arg0, + double arg1, ) { - return _os_retain( - object, + return _fminf( + arg0, + arg1, ); } - late final _os_retainPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('os_retain'); - late final _os_retain = _os_retainPtr - .asFunction Function(ffi.Pointer)>(); + late final _fminfPtr = + _lookup>( + 'fminf'); + late final _fminf = _fminfPtr.asFunction(); - void os_release( - ffi.Pointer object, + double fmin( + double arg0, + double arg1, ) { - return _os_release( - object, + return _fmin( + arg0, + arg1, ); } - late final _os_releasePtr = - _lookup)>>( - 'os_release'); - late final _os_release = - _os_releasePtr.asFunction)>(); + late final _fminPtr = + _lookup>( + 'fmin'); + late final _fmin = _fminPtr.asFunction(); - ffi.Pointer sec_retain( - ffi.Pointer obj, + double fmaf( + double arg0, + double arg1, + double arg2, ) { - return _sec_retain( - obj, + return _fmaf( + arg0, + arg1, + arg2, ); } - late final _sec_retainPtr = _lookup< + late final _fmafPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('sec_retain'); - late final _sec_retain = _sec_retainPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Float Function(ffi.Float, ffi.Float, ffi.Float)>>('fmaf'); + late final _fmaf = + _fmafPtr.asFunction(); - void sec_release( - ffi.Pointer obj, + double fma( + double arg0, + double arg1, + double arg2, ) { - return _sec_release( - obj, + return _fma( + arg0, + arg1, + arg2, ); } - late final _sec_releasePtr = - _lookup)>>( - 'sec_release'); - late final _sec_release = - _sec_releasePtr.asFunction)>(); + late final _fmaPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Double, ffi.Double, ffi.Double)>>('fma'); + late final _fma = + _fmaPtr.asFunction(); - CFStringRef SecCopyErrorMessageString( - int status, - ffi.Pointer reserved, + double __exp10f( + double arg0, ) { - return _SecCopyErrorMessageString( - status, - reserved, + return ___exp10f( + arg0, ); } - late final _SecCopyErrorMessageStringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - OSStatus, ffi.Pointer)>>('SecCopyErrorMessageString'); - late final _SecCopyErrorMessageString = _SecCopyErrorMessageStringPtr - .asFunction)>(); + late final ___exp10fPtr = + _lookup>('__exp10f'); + late final ___exp10f = ___exp10fPtr.asFunction(); - void __assert_rtn( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + double __exp10( + double arg0, ) { - return ___assert_rtn( + return ___exp10( arg0, - arg1, - arg2, - arg3, ); } - late final ___assert_rtnPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int, ffi.Pointer)>>('__assert_rtn'); - late final ___assert_rtn = ___assert_rtnPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final ffi.Pointer<_RuneLocale> __DefaultRuneLocale = - _lookup<_RuneLocale>('_DefaultRuneLocale'); - - _RuneLocale get _DefaultRuneLocale => __DefaultRuneLocale.ref; - - late final ffi.Pointer> __CurrentRuneLocale = - _lookup>('_CurrentRuneLocale'); - - ffi.Pointer<_RuneLocale> get _CurrentRuneLocale => __CurrentRuneLocale.value; - - set _CurrentRuneLocale(ffi.Pointer<_RuneLocale> value) => - __CurrentRuneLocale.value = value; + late final ___exp10Ptr = + _lookup>('__exp10'); + late final ___exp10 = ___exp10Ptr.asFunction(); - int ___runetype( - int arg0, + double __cospif( + double arg0, ) { - return ____runetype( + return ___cospif( arg0, ); } - late final ____runetypePtr = _lookup< - ffi.NativeFunction>( - '___runetype'); - late final ____runetype = ____runetypePtr.asFunction(); + late final ___cospifPtr = + _lookup>('__cospif'); + late final ___cospif = ___cospifPtr.asFunction(); - int ___tolower( - int arg0, + double __cospi( + double arg0, ) { - return ____tolower( + return ___cospi( arg0, ); } - late final ____tolowerPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '___tolower'); - late final ____tolower = ____tolowerPtr.asFunction(); + late final ___cospiPtr = + _lookup>('__cospi'); + late final ___cospi = ___cospiPtr.asFunction(); - int ___toupper( - int arg0, + double __sinpif( + double arg0, ) { - return ____toupper( + return ___sinpif( arg0, ); } - late final ____toupperPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '___toupper'); - late final ____toupper = ____toupperPtr.asFunction(); + late final ___sinpifPtr = + _lookup>('__sinpif'); + late final ___sinpif = ___sinpifPtr.asFunction(); - int __maskrune( - int arg0, - int arg1, + double __sinpi( + double arg0, ) { - return ___maskrune( + return ___sinpi( arg0, - arg1, ); } - late final ___maskrunePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - __darwin_ct_rune_t, ffi.UnsignedLong)>>('__maskrune'); - late final ___maskrune = ___maskrunePtr.asFunction(); + late final ___sinpiPtr = + _lookup>('__sinpi'); + late final ___sinpi = ___sinpiPtr.asFunction(); - int __toupper( - int arg0, + double __tanpif( + double arg0, ) { - return ___toupper1( + return ___tanpif( arg0, ); } - late final ___toupperPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '__toupper'); - late final ___toupper1 = ___toupperPtr.asFunction(); + late final ___tanpifPtr = + _lookup>('__tanpif'); + late final ___tanpif = ___tanpifPtr.asFunction(); - int __tolower( - int arg0, + double __tanpi( + double arg0, ) { - return ___tolower1( + return ___tanpi( arg0, ); } - late final ___tolowerPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '__tolower'); - late final ___tolower1 = ___tolowerPtr.asFunction(); - - ffi.Pointer __error() { - return ___error(); - } - - late final ___errorPtr = - _lookup Function()>>('__error'); - late final ___error = - ___errorPtr.asFunction Function()>(); + late final ___tanpiPtr = + _lookup>('__tanpi'); + late final ___tanpi = ___tanpiPtr.asFunction(); - ffi.Pointer localeconv() { - return _localeconv(); + __float2 __sincosf_stret( + double arg0, + ) { + return ___sincosf_stret( + arg0, + ); } - late final _localeconvPtr = - _lookup Function()>>('localeconv'); - late final _localeconv = - _localeconvPtr.asFunction Function()>(); + late final ___sincosf_stretPtr = + _lookup>( + '__sincosf_stret'); + late final ___sincosf_stret = + ___sincosf_stretPtr.asFunction<__float2 Function(double)>(); - ffi.Pointer setlocale( - int arg0, - ffi.Pointer arg1, + __double2 __sincos_stret( + double arg0, ) { - return _setlocale( + return ___sincos_stret( arg0, - arg1, ); } - late final _setlocalePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer)>>('setlocale'); - late final _setlocale = _setlocalePtr - .asFunction Function(int, ffi.Pointer)>(); - - int __math_errhandling() { - return ___math_errhandling(); - } - - late final ___math_errhandlingPtr = - _lookup>('__math_errhandling'); - late final ___math_errhandling = - ___math_errhandlingPtr.asFunction(); - - int __fpclassifyf( - double arg0, - ) { - return ___fpclassifyf( - arg0, - ); - } - - late final ___fpclassifyfPtr = - _lookup>('__fpclassifyf'); - late final ___fpclassifyf = - ___fpclassifyfPtr.asFunction(); + late final ___sincos_stretPtr = + _lookup>( + '__sincos_stret'); + late final ___sincos_stret = + ___sincos_stretPtr.asFunction<__double2 Function(double)>(); - int __fpclassifyd( + __float2 __sincospif_stret( double arg0, ) { - return ___fpclassifyd( + return ___sincospif_stret( arg0, ); } - late final ___fpclassifydPtr = - _lookup>( - '__fpclassifyd'); - late final ___fpclassifyd = - ___fpclassifydPtr.asFunction(); + late final ___sincospif_stretPtr = + _lookup>( + '__sincospif_stret'); + late final ___sincospif_stret = + ___sincospif_stretPtr.asFunction<__float2 Function(double)>(); - double acosf( + __double2 __sincospi_stret( double arg0, ) { - return _acosf( + return ___sincospi_stret( arg0, ); } - late final _acosfPtr = - _lookup>('acosf'); - late final _acosf = _acosfPtr.asFunction(); + late final ___sincospi_stretPtr = + _lookup>( + '__sincospi_stret'); + late final ___sincospi_stret = + ___sincospi_stretPtr.asFunction<__double2 Function(double)>(); - double acos( + double j0( double arg0, ) { - return _acos( + return _j0( arg0, ); } - late final _acosPtr = - _lookup>('acos'); - late final _acos = _acosPtr.asFunction(); + late final _j0Ptr = + _lookup>('j0'); + late final _j0 = _j0Ptr.asFunction(); - double asinf( + double j1( double arg0, ) { - return _asinf( + return _j1( arg0, ); } - late final _asinfPtr = - _lookup>('asinf'); - late final _asinf = _asinfPtr.asFunction(); + late final _j1Ptr = + _lookup>('j1'); + late final _j1 = _j1Ptr.asFunction(); - double asin( - double arg0, + double jn( + int arg0, + double arg1, ) { - return _asin( + return _jn( arg0, + arg1, ); } - late final _asinPtr = - _lookup>('asin'); - late final _asin = _asinPtr.asFunction(); + late final _jnPtr = + _lookup>( + 'jn'); + late final _jn = _jnPtr.asFunction(); - double atanf( + double y0( double arg0, ) { - return _atanf( + return _y0( arg0, ); } - late final _atanfPtr = - _lookup>('atanf'); - late final _atanf = _atanfPtr.asFunction(); + late final _y0Ptr = + _lookup>('y0'); + late final _y0 = _y0Ptr.asFunction(); - double atan( + double y1( double arg0, ) { - return _atan( + return _y1( arg0, ); } - late final _atanPtr = - _lookup>('atan'); - late final _atan = _atanPtr.asFunction(); + late final _y1Ptr = + _lookup>('y1'); + late final _y1 = _y1Ptr.asFunction(); - double atan2f( - double arg0, + double yn( + int arg0, double arg1, ) { - return _atan2f( + return _yn( arg0, arg1, ); } - late final _atan2fPtr = - _lookup>( - 'atan2f'); - late final _atan2f = _atan2fPtr.asFunction(); + late final _ynPtr = + _lookup>( + 'yn'); + late final _yn = _ynPtr.asFunction(); - double atan2( + double scalb( double arg0, double arg1, ) { - return _atan2( + return _scalb( arg0, arg1, ); } - late final _atan2Ptr = + late final _scalbPtr = _lookup>( - 'atan2'); - late final _atan2 = _atan2Ptr.asFunction(); + 'scalb'); + late final _scalb = _scalbPtr.asFunction(); - double cosf( - double arg0, + late final ffi.Pointer _signgam = _lookup('signgam'); + + int get signgam => _signgam.value; + + set signgam(int value) => _signgam.value = value; + + int setjmp( + ffi.Pointer arg0, ) { - return _cosf( + return _setjmp1( arg0, ); } - late final _cosfPtr = - _lookup>('cosf'); - late final _cosf = _cosfPtr.asFunction(); + late final _setjmpPtr = + _lookup)>>( + 'setjmp'); + late final _setjmp1 = + _setjmpPtr.asFunction)>(); - double cos( - double arg0, + void longjmp( + ffi.Pointer arg0, + int arg1, ) { - return _cos( + return _longjmp1( arg0, + arg1, ); } - late final _cosPtr = - _lookup>('cos'); - late final _cos = _cosPtr.asFunction(); + late final _longjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'longjmp'); + late final _longjmp1 = + _longjmpPtr.asFunction, int)>(); - double sinf( - double arg0, + int _setjmp( + ffi.Pointer arg0, ) { - return _sinf( + return __setjmp( arg0, ); } - late final _sinfPtr = - _lookup>('sinf'); - late final _sinf = _sinfPtr.asFunction(); + late final __setjmpPtr = + _lookup)>>( + '_setjmp'); + late final __setjmp = + __setjmpPtr.asFunction)>(); - double sin( - double arg0, + void _longjmp( + ffi.Pointer arg0, + int arg1, ) { - return _sin( + return __longjmp( arg0, + arg1, ); } - late final _sinPtr = - _lookup>('sin'); - late final _sin = _sinPtr.asFunction(); + late final __longjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + '_longjmp'); + late final __longjmp = + __longjmpPtr.asFunction, int)>(); - double tanf( - double arg0, + int sigsetjmp( + ffi.Pointer arg0, + int arg1, ) { - return _tanf( + return _sigsetjmp( arg0, + arg1, ); } - late final _tanfPtr = - _lookup>('tanf'); - late final _tanf = _tanfPtr.asFunction(); + late final _sigsetjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigsetjmp'); + late final _sigsetjmp = + _sigsetjmpPtr.asFunction, int)>(); - double tan( - double arg0, + void siglongjmp( + ffi.Pointer arg0, + int arg1, ) { - return _tan( + return _siglongjmp( arg0, + arg1, ); } - late final _tanPtr = - _lookup>('tan'); - late final _tan = _tanPtr.asFunction(); + late final _siglongjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'siglongjmp'); + late final _siglongjmp = + _siglongjmpPtr.asFunction, int)>(); - double acoshf( - double arg0, - ) { - return _acoshf( - arg0, - ); + void longjmperror() { + return _longjmperror(); } - late final _acoshfPtr = - _lookup>('acoshf'); - late final _acoshf = _acoshfPtr.asFunction(); + late final _longjmperrorPtr = + _lookup>('longjmperror'); + late final _longjmperror = _longjmperrorPtr.asFunction(); - double acosh( - double arg0, + ffi.Pointer> signal( + int arg0, + ffi.Pointer> arg1, ) { - return _acosh( + return _signal( arg0, + arg1, ); } - late final _acoshPtr = - _lookup>('acosh'); - late final _acosh = _acoshPtr.asFunction(); + late final _signalPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction>)>>('signal'); + late final _signal = _signalPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); - double asinhf( - double arg0, + late final ffi.Pointer>> _sys_signame = + _lookup>>('sys_signame'); + + ffi.Pointer> get sys_signame => _sys_signame.value; + + set sys_signame(ffi.Pointer> value) => + _sys_signame.value = value; + + late final ffi.Pointer>> _sys_siglist = + _lookup>>('sys_siglist'); + + ffi.Pointer> get sys_siglist => _sys_siglist.value; + + set sys_siglist(ffi.Pointer> value) => + _sys_siglist.value = value; + + int raise( + int arg0, ) { - return _asinhf( + return _raise( arg0, ); } - late final _asinhfPtr = - _lookup>('asinhf'); - late final _asinhf = _asinhfPtr.asFunction(); + late final _raisePtr = + _lookup>('raise'); + late final _raise = _raisePtr.asFunction(); - double asinh( - double arg0, + ffi.Pointer> bsd_signal( + int arg0, + ffi.Pointer> arg1, ) { - return _asinh( + return _bsd_signal( arg0, + arg1, ); } - late final _asinhPtr = - _lookup>('asinh'); - late final _asinh = _asinhPtr.asFunction(); + late final _bsd_signalPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int)>>)>>('bsd_signal'); + late final _bsd_signal = _bsd_signalPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); - double atanhf( - double arg0, + int kill( + int arg0, + int arg1, ) { - return _atanhf( + return _kill( arg0, + arg1, ); } - late final _atanhfPtr = - _lookup>('atanhf'); - late final _atanhf = _atanhfPtr.asFunction(); + late final _killPtr = + _lookup>('kill'); + late final _kill = _killPtr.asFunction(); - double atanh( - double arg0, + int killpg( + int arg0, + int arg1, ) { - return _atanh( + return _killpg( arg0, + arg1, ); } - late final _atanhPtr = - _lookup>('atanh'); - late final _atanh = _atanhPtr.asFunction(); + late final _killpgPtr = + _lookup>('killpg'); + late final _killpg = _killpgPtr.asFunction(); - double coshf( - double arg0, + int pthread_kill( + pthread_t arg0, + int arg1, ) { - return _coshf( + return _pthread_kill( arg0, + arg1, ); } - late final _coshfPtr = - _lookup>('coshf'); - late final _coshf = _coshfPtr.asFunction(); + late final _pthread_killPtr = + _lookup>( + 'pthread_kill'); + late final _pthread_kill = + _pthread_killPtr.asFunction(); - double cosh( - double arg0, + int pthread_sigmask( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _cosh( + return _pthread_sigmask( arg0, + arg1, + arg2, ); } - late final _coshPtr = - _lookup>('cosh'); - late final _cosh = _coshPtr.asFunction(); + late final _pthread_sigmaskPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('pthread_sigmask'); + late final _pthread_sigmask = _pthread_sigmaskPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - double sinhf( - double arg0, + int sigaction1( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _sinhf( + return _sigaction1( arg0, + arg1, + arg2, ); } - late final _sinhfPtr = - _lookup>('sinhf'); - late final _sinhf = _sinhfPtr.asFunction(); + late final _sigaction1Ptr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('sigaction'); + late final _sigaction1 = _sigaction1Ptr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - double sinh( - double arg0, + int sigaddset( + ffi.Pointer arg0, + int arg1, ) { - return _sinh( + return _sigaddset( arg0, + arg1, ); } - late final _sinhPtr = - _lookup>('sinh'); - late final _sinh = _sinhPtr.asFunction(); + late final _sigaddsetPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigaddset'); + late final _sigaddset = + _sigaddsetPtr.asFunction, int)>(); - double tanhf( - double arg0, + int sigaltstack( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _tanhf( + return _sigaltstack( arg0, + arg1, ); } - late final _tanhfPtr = - _lookup>('tanhf'); - late final _tanhf = _tanhfPtr.asFunction(); + late final _sigaltstackPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sigaltstack'); + late final _sigaltstack = _sigaltstackPtr + .asFunction, ffi.Pointer)>(); - double tanh( - double arg0, + int sigdelset( + ffi.Pointer arg0, + int arg1, ) { - return _tanh( + return _sigdelset( arg0, + arg1, ); } - late final _tanhPtr = - _lookup>('tanh'); - late final _tanh = _tanhPtr.asFunction(); + late final _sigdelsetPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigdelset'); + late final _sigdelset = + _sigdelsetPtr.asFunction, int)>(); - double expf( - double arg0, + int sigemptyset( + ffi.Pointer arg0, ) { - return _expf( + return _sigemptyset( arg0, ); } - late final _expfPtr = - _lookup>('expf'); - late final _expf = _expfPtr.asFunction(); + late final _sigemptysetPtr = + _lookup)>>( + 'sigemptyset'); + late final _sigemptyset = + _sigemptysetPtr.asFunction)>(); - double exp( - double arg0, + int sigfillset( + ffi.Pointer arg0, ) { - return _exp( + return _sigfillset( arg0, ); } - late final _expPtr = - _lookup>('exp'); - late final _exp = _expPtr.asFunction(); + late final _sigfillsetPtr = + _lookup)>>( + 'sigfillset'); + late final _sigfillset = + _sigfillsetPtr.asFunction)>(); - double exp2f( - double arg0, + int sighold( + int arg0, ) { - return _exp2f( + return _sighold( arg0, ); } - late final _exp2fPtr = - _lookup>('exp2f'); - late final _exp2f = _exp2fPtr.asFunction(); + late final _sigholdPtr = + _lookup>('sighold'); + late final _sighold = _sigholdPtr.asFunction(); - double exp2( - double arg0, + int sigignore( + int arg0, ) { - return _exp2( + return _sigignore( arg0, ); } - late final _exp2Ptr = - _lookup>('exp2'); - late final _exp2 = _exp2Ptr.asFunction(); + late final _sigignorePtr = + _lookup>('sigignore'); + late final _sigignore = _sigignorePtr.asFunction(); - double expm1f( - double arg0, + int siginterrupt( + int arg0, + int arg1, ) { - return _expm1f( + return _siginterrupt( arg0, + arg1, ); } - late final _expm1fPtr = - _lookup>('expm1f'); - late final _expm1f = _expm1fPtr.asFunction(); - - double expm1( - double arg0, + late final _siginterruptPtr = + _lookup>( + 'siginterrupt'); + late final _siginterrupt = + _siginterruptPtr.asFunction(); + + int sigismember( + ffi.Pointer arg0, + int arg1, ) { - return _expm1( + return _sigismember( arg0, + arg1, ); } - late final _expm1Ptr = - _lookup>('expm1'); - late final _expm1 = _expm1Ptr.asFunction(); + late final _sigismemberPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigismember'); + late final _sigismember = + _sigismemberPtr.asFunction, int)>(); - double logf( - double arg0, + int sigpause( + int arg0, ) { - return _logf( + return _sigpause( arg0, ); } - late final _logfPtr = - _lookup>('logf'); - late final _logf = _logfPtr.asFunction(); + late final _sigpausePtr = + _lookup>('sigpause'); + late final _sigpause = _sigpausePtr.asFunction(); - double log( - double arg0, + int sigpending( + ffi.Pointer arg0, ) { - return _log( + return _sigpending( arg0, ); } - late final _logPtr = - _lookup>('log'); - late final _log = _logPtr.asFunction(); + late final _sigpendingPtr = + _lookup)>>( + 'sigpending'); + late final _sigpending = + _sigpendingPtr.asFunction)>(); - double log10f( - double arg0, + int sigprocmask( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _log10f( + return _sigprocmask( arg0, + arg1, + arg2, ); } - late final _log10fPtr = - _lookup>('log10f'); - late final _log10f = _log10fPtr.asFunction(); + late final _sigprocmaskPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('sigprocmask'); + late final _sigprocmask = _sigprocmaskPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - double log10( - double arg0, + int sigrelse( + int arg0, ) { - return _log10( + return _sigrelse( arg0, ); } - late final _log10Ptr = - _lookup>('log10'); - late final _log10 = _log10Ptr.asFunction(); + late final _sigrelsePtr = + _lookup>('sigrelse'); + late final _sigrelse = _sigrelsePtr.asFunction(); - double log2f( - double arg0, + ffi.Pointer> sigset( + int arg0, + ffi.Pointer> arg1, ) { - return _log2f( + return _sigset( arg0, + arg1, ); } - late final _log2fPtr = - _lookup>('log2f'); - late final _log2f = _log2fPtr.asFunction(); + late final _sigsetPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction>)>>('sigset'); + late final _sigset = _sigsetPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); - double log2( - double arg0, + int sigsuspend( + ffi.Pointer arg0, ) { - return _log2( + return _sigsuspend( arg0, ); } - late final _log2Ptr = - _lookup>('log2'); - late final _log2 = _log2Ptr.asFunction(); + late final _sigsuspendPtr = + _lookup)>>( + 'sigsuspend'); + late final _sigsuspend = + _sigsuspendPtr.asFunction)>(); - double log1pf( - double arg0, + int sigwait( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _log1pf( + return _sigwait( arg0, + arg1, ); } - late final _log1pfPtr = - _lookup>('log1pf'); - late final _log1pf = _log1pfPtr.asFunction(); + late final _sigwaitPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sigwait'); + late final _sigwait = _sigwaitPtr + .asFunction, ffi.Pointer)>(); - double log1p( - double arg0, + void psignal( + int arg0, + ffi.Pointer arg1, ) { - return _log1p( + return _psignal( arg0, + arg1, ); } - late final _log1pPtr = - _lookup>('log1p'); - late final _log1p = _log1pPtr.asFunction(); + late final _psignalPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.UnsignedInt, ffi.Pointer)>>('psignal'); + late final _psignal = + _psignalPtr.asFunction)>(); - double logbf( - double arg0, + int sigblock( + int arg0, ) { - return _logbf( + return _sigblock( arg0, ); } - late final _logbfPtr = - _lookup>('logbf'); - late final _logbf = _logbfPtr.asFunction(); + late final _sigblockPtr = + _lookup>('sigblock'); + late final _sigblock = _sigblockPtr.asFunction(); - double logb( - double arg0, + int sigsetmask( + int arg0, ) { - return _logb( + return _sigsetmask( arg0, ); } - late final _logbPtr = - _lookup>('logb'); - late final _logb = _logbPtr.asFunction(); + late final _sigsetmaskPtr = + _lookup>('sigsetmask'); + late final _sigsetmask = _sigsetmaskPtr.asFunction(); - double modff( - double arg0, - ffi.Pointer arg1, + int sigvec1( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _modff( + return _sigvec1( arg0, arg1, + arg2, ); } - late final _modffPtr = _lookup< + late final _sigvec1Ptr = _lookup< ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Pointer)>>('modff'); - late final _modff = - _modffPtr.asFunction)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Pointer)>>('sigvec'); + late final _sigvec1 = _sigvec1Ptr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - double modf( - double arg0, - ffi.Pointer arg1, + int renameat( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return _modf( + return _renameat( arg0, arg1, + arg2, + arg3, ); } - late final _modfPtr = _lookup< + late final _renameatPtr = _lookup< ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Pointer)>>('modf'); - late final _modf = - _modfPtr.asFunction)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer)>>('renameat'); + late final _renameat = _renameatPtr.asFunction< + int Function(int, ffi.Pointer, int, ffi.Pointer)>(); - double ldexpf( - double arg0, - int arg1, + int renamex_np( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _ldexpf( + return _renamex_np( arg0, arg1, + arg2, ); } - late final _ldexpfPtr = - _lookup>( - 'ldexpf'); - late final _ldexpf = _ldexpfPtr.asFunction(); + late final _renamex_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedInt)>>('renamex_np'); + late final _renamex_np = _renamex_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - double ldexp( - double arg0, - int arg1, + int renameatx_np( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + int arg4, ) { - return _ldexp( + return _renameatx_np( arg0, arg1, + arg2, + arg3, + arg4, ); } - late final _ldexpPtr = - _lookup>( - 'ldexp'); - late final _ldexp = _ldexpPtr.asFunction(); + late final _renameatx_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('renameatx_np'); + late final _renameatx_np = _renameatx_npPtr.asFunction< + int Function( + int, ffi.Pointer, int, ffi.Pointer, int)>(); - double frexpf( - double arg0, - ffi.Pointer arg1, + late final ffi.Pointer> ___stdinp = + _lookup>('__stdinp'); + + ffi.Pointer get __stdinp => ___stdinp.value; + + set __stdinp(ffi.Pointer value) => ___stdinp.value = value; + + late final ffi.Pointer> ___stdoutp = + _lookup>('__stdoutp'); + + ffi.Pointer get __stdoutp => ___stdoutp.value; + + set __stdoutp(ffi.Pointer value) => ___stdoutp.value = value; + + late final ffi.Pointer> ___stderrp = + _lookup>('__stderrp'); + + ffi.Pointer get __stderrp => ___stderrp.value; + + set __stderrp(ffi.Pointer value) => ___stderrp.value = value; + + void clearerr( + ffi.Pointer arg0, ) { - return _frexpf( + return _clearerr( arg0, - arg1, ); } - late final _frexpfPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Pointer)>>('frexpf'); - late final _frexpf = - _frexpfPtr.asFunction)>(); + late final _clearerrPtr = + _lookup)>>( + 'clearerr'); + late final _clearerr = + _clearerrPtr.asFunction)>(); - double frexp( - double arg0, - ffi.Pointer arg1, + int fclose( + ffi.Pointer arg0, ) { - return _frexp( + return _fclose( arg0, - arg1, ); } - late final _frexpPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Pointer)>>('frexp'); - late final _frexp = - _frexpPtr.asFunction)>(); + late final _fclosePtr = + _lookup)>>( + 'fclose'); + late final _fclose = _fclosePtr.asFunction)>(); - int ilogbf( - double arg0, + int feof( + ffi.Pointer arg0, ) { - return _ilogbf( + return _feof( arg0, ); } - late final _ilogbfPtr = - _lookup>('ilogbf'); - late final _ilogbf = _ilogbfPtr.asFunction(); + late final _feofPtr = + _lookup)>>('feof'); + late final _feof = _feofPtr.asFunction)>(); - int ilogb( - double arg0, + int ferror( + ffi.Pointer arg0, ) { - return _ilogb( + return _ferror( arg0, ); } - late final _ilogbPtr = - _lookup>('ilogb'); - late final _ilogb = _ilogbPtr.asFunction(); + late final _ferrorPtr = + _lookup)>>( + 'ferror'); + late final _ferror = _ferrorPtr.asFunction)>(); - double scalbnf( - double arg0, - int arg1, + int fflush( + ffi.Pointer arg0, ) { - return _scalbnf( + return _fflush( arg0, - arg1, ); } - late final _scalbnfPtr = - _lookup>( - 'scalbnf'); - late final _scalbnf = _scalbnfPtr.asFunction(); + late final _fflushPtr = + _lookup)>>( + 'fflush'); + late final _fflush = _fflushPtr.asFunction)>(); - double scalbn( - double arg0, - int arg1, + int fgetc( + ffi.Pointer arg0, ) { - return _scalbn( + return _fgetc( arg0, - arg1, ); } - late final _scalbnPtr = - _lookup>( - 'scalbn'); - late final _scalbn = _scalbnPtr.asFunction(); + late final _fgetcPtr = + _lookup)>>('fgetc'); + late final _fgetc = _fgetcPtr.asFunction)>(); - double scalblnf( - double arg0, - int arg1, + int fgetpos( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _scalblnf( + return _fgetpos( arg0, arg1, ); } - late final _scalblnfPtr = - _lookup>( - 'scalblnf'); - late final _scalblnf = - _scalblnfPtr.asFunction(); + late final _fgetposPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fgetpos'); + late final _fgetpos = _fgetposPtr + .asFunction, ffi.Pointer)>(); - double scalbln( - double arg0, + ffi.Pointer fgets( + ffi.Pointer arg0, int arg1, + ffi.Pointer arg2, ) { - return _scalbln( + return _fgets( arg0, arg1, + arg2, ); } - late final _scalblnPtr = - _lookup>( - 'scalbln'); - late final _scalbln = _scalblnPtr.asFunction(); + late final _fgetsPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Pointer)>>('fgets'); + late final _fgets = _fgetsPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - double fabsf( - double arg0, + ffi.Pointer fopen( + ffi.Pointer __filename, + ffi.Pointer __mode, ) { - return _fabsf( - arg0, + return _fopen( + __filename, + __mode, ); } - late final _fabsfPtr = - _lookup>('fabsf'); - late final _fabsf = _fabsfPtr.asFunction(); + late final _fopenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fopen'); + late final _fopen = _fopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double fabs( - double arg0, + int fprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _fabs( + return _fprintf( arg0, + arg1, ); } - late final _fabsPtr = - _lookup>('fabs'); - late final _fabs = _fabsPtr.asFunction(); + late final _fprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('fprintf'); + late final _fprintf = _fprintfPtr + .asFunction, ffi.Pointer)>(); - double cbrtf( - double arg0, + int fputc( + int arg0, + ffi.Pointer arg1, ) { - return _cbrtf( + return _fputc( arg0, + arg1, ); } - late final _cbrtfPtr = - _lookup>('cbrtf'); - late final _cbrtf = _cbrtfPtr.asFunction(); + late final _fputcPtr = + _lookup)>>( + 'fputc'); + late final _fputc = + _fputcPtr.asFunction)>(); - double cbrt( - double arg0, + int fputs( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _cbrt( + return _fputs( arg0, + arg1, ); } - late final _cbrtPtr = - _lookup>('cbrt'); - late final _cbrt = _cbrtPtr.asFunction(); + late final _fputsPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fputs'); + late final _fputs = _fputsPtr + .asFunction, ffi.Pointer)>(); - double hypotf( - double arg0, - double arg1, + int fread( + ffi.Pointer __ptr, + int __size, + int __nitems, + ffi.Pointer __stream, ) { - return _hypotf( - arg0, - arg1, + return _fread( + __ptr, + __size, + __nitems, + __stream, ); } - late final _hypotfPtr = - _lookup>( - 'hypotf'); - late final _hypotf = _hypotfPtr.asFunction(); + late final _freadPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer)>>('fread'); + late final _fread = _freadPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); - double hypot( - double arg0, - double arg1, + ffi.Pointer freopen( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _hypot( + return _freopen( arg0, arg1, + arg2, ); } - late final _hypotPtr = - _lookup>( - 'hypot'); - late final _hypot = _hypotPtr.asFunction(); + late final _freopenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('freopen'); + late final _freopen = _freopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - double powf( - double arg0, - double arg1, + int fscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _powf( + return _fscanf( arg0, arg1, ); } - late final _powfPtr = - _lookup>( - 'powf'); - late final _powf = _powfPtr.asFunction(); + late final _fscanfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('fscanf'); + late final _fscanf = _fscanfPtr + .asFunction, ffi.Pointer)>(); - double pow( - double arg0, - double arg1, + int fseek( + ffi.Pointer arg0, + int arg1, + int arg2, ) { - return _pow( + return _fseek( arg0, arg1, + arg2, ); } - late final _powPtr = - _lookup>( - 'pow'); - late final _pow = _powPtr.asFunction(); + late final _fseekPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Long, ffi.Int)>>('fseek'); + late final _fseek = + _fseekPtr.asFunction, int, int)>(); - double sqrtf( - double arg0, + int fsetpos( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _sqrtf( + return _fsetpos( arg0, + arg1, ); } - late final _sqrtfPtr = - _lookup>('sqrtf'); - late final _sqrtf = _sqrtfPtr.asFunction(); + late final _fsetposPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fsetpos'); + late final _fsetpos = _fsetposPtr + .asFunction, ffi.Pointer)>(); - double sqrt( - double arg0, + int ftell( + ffi.Pointer arg0, ) { - return _sqrt( + return _ftell( arg0, ); } - late final _sqrtPtr = - _lookup>('sqrt'); - late final _sqrt = _sqrtPtr.asFunction(); + late final _ftellPtr = + _lookup)>>( + 'ftell'); + late final _ftell = _ftellPtr.asFunction)>(); - double erff( - double arg0, + int fwrite( + ffi.Pointer __ptr, + int __size, + int __nitems, + ffi.Pointer __stream, ) { - return _erff( - arg0, + return _fwrite( + __ptr, + __size, + __nitems, + __stream, ); } - late final _erffPtr = - _lookup>('erff'); - late final _erff = _erffPtr.asFunction(); + late final _fwritePtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer)>>('fwrite'); + late final _fwrite = _fwritePtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); - double erf( - double arg0, + int getc( + ffi.Pointer arg0, ) { - return _erf( + return _getc( arg0, ); } - late final _erfPtr = - _lookup>('erf'); - late final _erf = _erfPtr.asFunction(); + late final _getcPtr = + _lookup)>>('getc'); + late final _getc = _getcPtr.asFunction)>(); - double erfcf( - double arg0, - ) { - return _erfcf( - arg0, - ); + int getchar() { + return _getchar(); } - late final _erfcfPtr = - _lookup>('erfcf'); - late final _erfcf = _erfcfPtr.asFunction(); + late final _getcharPtr = + _lookup>('getchar'); + late final _getchar = _getcharPtr.asFunction(); - double erfc( - double arg0, + ffi.Pointer gets( + ffi.Pointer arg0, ) { - return _erfc( + return _gets( arg0, ); } - late final _erfcPtr = - _lookup>('erfc'); - late final _erfc = _erfcPtr.asFunction(); + late final _getsPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('gets'); + late final _gets = _getsPtr + .asFunction Function(ffi.Pointer)>(); - double lgammaf( - double arg0, + void perror( + ffi.Pointer arg0, ) { - return _lgammaf( + return _perror( arg0, ); } - late final _lgammafPtr = - _lookup>('lgammaf'); - late final _lgammaf = _lgammafPtr.asFunction(); + late final _perrorPtr = + _lookup)>>( + 'perror'); + late final _perror = + _perrorPtr.asFunction)>(); - double lgamma( - double arg0, + int printf( + ffi.Pointer arg0, ) { - return _lgamma( + return _printf( arg0, ); } - late final _lgammaPtr = - _lookup>('lgamma'); - late final _lgamma = _lgammaPtr.asFunction(); + late final _printfPtr = + _lookup)>>( + 'printf'); + late final _printf = + _printfPtr.asFunction)>(); - double tgammaf( - double arg0, + int putc( + int arg0, + ffi.Pointer arg1, ) { - return _tgammaf( + return _putc( arg0, + arg1, ); } - late final _tgammafPtr = - _lookup>('tgammaf'); - late final _tgammaf = _tgammafPtr.asFunction(); + late final _putcPtr = + _lookup)>>( + 'putc'); + late final _putc = + _putcPtr.asFunction)>(); - double tgamma( - double arg0, + int putchar( + int arg0, ) { - return _tgamma( + return _putchar( arg0, ); } - late final _tgammaPtr = - _lookup>('tgamma'); - late final _tgamma = _tgammaPtr.asFunction(); + late final _putcharPtr = + _lookup>('putchar'); + late final _putchar = _putcharPtr.asFunction(); - double ceilf( - double arg0, + int puts( + ffi.Pointer arg0, ) { - return _ceilf( + return _puts( arg0, ); } - late final _ceilfPtr = - _lookup>('ceilf'); - late final _ceilf = _ceilfPtr.asFunction(); + late final _putsPtr = + _lookup)>>( + 'puts'); + late final _puts = _putsPtr.asFunction)>(); - double ceil( - double arg0, + int remove( + ffi.Pointer arg0, ) { - return _ceil( + return _remove( arg0, ); } - late final _ceilPtr = - _lookup>('ceil'); - late final _ceil = _ceilPtr.asFunction(); + late final _removePtr = + _lookup)>>( + 'remove'); + late final _remove = + _removePtr.asFunction)>(); - double floorf( - double arg0, + int rename( + ffi.Pointer __old, + ffi.Pointer __new, ) { - return _floorf( - arg0, + return _rename( + __old, + __new, ); } - late final _floorfPtr = - _lookup>('floorf'); - late final _floorf = _floorfPtr.asFunction(); + late final _renamePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('rename'); + late final _rename = _renamePtr + .asFunction, ffi.Pointer)>(); - double floor( - double arg0, + void rewind( + ffi.Pointer arg0, ) { - return _floor( + return _rewind( arg0, ); } - late final _floorPtr = - _lookup>('floor'); - late final _floor = _floorPtr.asFunction(); + late final _rewindPtr = + _lookup)>>( + 'rewind'); + late final _rewind = + _rewindPtr.asFunction)>(); - double nearbyintf( - double arg0, + int scanf( + ffi.Pointer arg0, ) { - return _nearbyintf( + return _scanf( arg0, ); } - late final _nearbyintfPtr = - _lookup>('nearbyintf'); - late final _nearbyintf = _nearbyintfPtr.asFunction(); + late final _scanfPtr = + _lookup)>>( + 'scanf'); + late final _scanf = + _scanfPtr.asFunction)>(); - double nearbyint( - double arg0, + void setbuf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _nearbyint( + return _setbuf( arg0, + arg1, ); } - late final _nearbyintPtr = - _lookup>('nearbyint'); - late final _nearbyint = _nearbyintPtr.asFunction(); + late final _setbufPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('setbuf'); + late final _setbuf = _setbufPtr + .asFunction, ffi.Pointer)>(); - double rintf( - double arg0, + int setvbuf( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + int arg3, ) { - return _rintf( + return _setvbuf( arg0, + arg1, + arg2, + arg3, ); } - late final _rintfPtr = - _lookup>('rintf'); - late final _rintf = _rintfPtr.asFunction(); + late final _setvbufPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int, + ffi.Size)>>('setvbuf'); + late final _setvbuf = _setvbufPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, int)>(); - double rint( - double arg0, + int sprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _rint( + return _sprintf( arg0, + arg1, ); } - late final _rintPtr = - _lookup>('rint'); - late final _rint = _rintPtr.asFunction(); + late final _sprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sprintf'); + late final _sprintf = _sprintfPtr + .asFunction, ffi.Pointer)>(); - int lrintf( - double arg0, + int sscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _lrintf( + return _sscanf( arg0, + arg1, ); } - late final _lrintfPtr = - _lookup>('lrintf'); - late final _lrintf = _lrintfPtr.asFunction(); + late final _sscanfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sscanf'); + late final _sscanf = _sscanfPtr + .asFunction, ffi.Pointer)>(); - int lrint( - double arg0, + ffi.Pointer tmpfile() { + return _tmpfile(); + } + + late final _tmpfilePtr = + _lookup Function()>>('tmpfile'); + late final _tmpfile = _tmpfilePtr.asFunction Function()>(); + + ffi.Pointer tmpnam( + ffi.Pointer arg0, ) { - return _lrint( + return _tmpnam( arg0, ); } - late final _lrintPtr = - _lookup>('lrint'); - late final _lrint = _lrintPtr.asFunction(); + late final _tmpnamPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('tmpnam'); + late final _tmpnam = _tmpnamPtr + .asFunction Function(ffi.Pointer)>(); - double roundf( - double arg0, + int ungetc( + int arg0, + ffi.Pointer arg1, ) { - return _roundf( + return _ungetc( arg0, + arg1, ); } - late final _roundfPtr = - _lookup>('roundf'); - late final _roundf = _roundfPtr.asFunction(); + late final _ungetcPtr = + _lookup)>>( + 'ungetc'); + late final _ungetc = + _ungetcPtr.asFunction)>(); - double round( - double arg0, + int vfprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _round( + return _vfprintf( arg0, + arg1, + arg2, ); } - late final _roundPtr = - _lookup>('round'); - late final _round = _roundPtr.asFunction(); + late final _vfprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, va_list)>>('vfprintf'); + late final _vfprintf = _vfprintfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - int lroundf( - double arg0, + int vprintf( + ffi.Pointer arg0, + va_list arg1, ) { - return _lroundf( + return _vprintf( arg0, + arg1, ); } - late final _lroundfPtr = - _lookup>('lroundf'); - late final _lroundf = _lroundfPtr.asFunction(); + late final _vprintfPtr = _lookup< + ffi.NativeFunction, va_list)>>( + 'vprintf'); + late final _vprintf = + _vprintfPtr.asFunction, va_list)>(); - int lround( - double arg0, + int vsprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _lround( + return _vsprintf( arg0, + arg1, + arg2, ); } - late final _lroundPtr = - _lookup>('lround'); - late final _lround = _lroundPtr.asFunction(); + late final _vsprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('vsprintf'); + late final _vsprintf = _vsprintfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - int llrintf( - double arg0, + ffi.Pointer ctermid( + ffi.Pointer arg0, ) { - return _llrintf( + return _ctermid( arg0, ); } - late final _llrintfPtr = - _lookup>('llrintf'); - late final _llrintf = _llrintfPtr.asFunction(); + late final _ctermidPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('ctermid'); + late final _ctermid = _ctermidPtr + .asFunction Function(ffi.Pointer)>(); - int llrint( - double arg0, + ffi.Pointer fdopen( + int arg0, + ffi.Pointer arg1, ) { - return _llrint( + return _fdopen( arg0, + arg1, ); } - late final _llrintPtr = - _lookup>('llrint'); - late final _llrint = _llrintPtr.asFunction(); + late final _fdopenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('fdopen'); + late final _fdopen = _fdopenPtr + .asFunction Function(int, ffi.Pointer)>(); - int llroundf( - double arg0, + int fileno( + ffi.Pointer arg0, ) { - return _llroundf( + return _fileno( arg0, ); } - late final _llroundfPtr = - _lookup>('llroundf'); - late final _llroundf = _llroundfPtr.asFunction(); + late final _filenoPtr = + _lookup)>>( + 'fileno'); + late final _fileno = _filenoPtr.asFunction)>(); - int llround( - double arg0, + int pclose( + ffi.Pointer arg0, ) { - return _llround( + return _pclose( arg0, ); } - late final _llroundPtr = - _lookup>('llround'); - late final _llround = _llroundPtr.asFunction(); + late final _pclosePtr = + _lookup)>>( + 'pclose'); + late final _pclose = _pclosePtr.asFunction)>(); - double truncf( - double arg0, + ffi.Pointer popen( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _truncf( + return _popen( arg0, + arg1, ); } - late final _truncfPtr = - _lookup>('truncf'); - late final _truncf = _truncfPtr.asFunction(); + late final _popenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('popen'); + late final _popen = _popenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double trunc( - double arg0, + int __srget( + ffi.Pointer arg0, ) { - return _trunc( + return ___srget( arg0, ); } - late final _truncPtr = - _lookup>('trunc'); - late final _trunc = _truncPtr.asFunction(); + late final ___srgetPtr = + _lookup)>>( + '__srget'); + late final ___srget = + ___srgetPtr.asFunction)>(); - double fmodf( - double arg0, - double arg1, + int __svfscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _fmodf( + return ___svfscanf( arg0, arg1, + arg2, ); } - late final _fmodfPtr = - _lookup>( - 'fmodf'); - late final _fmodf = _fmodfPtr.asFunction(); + late final ___svfscanfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('__svfscanf'); + late final ___svfscanf = ___svfscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - double fmod( - double arg0, - double arg1, + int __swbuf( + int arg0, + ffi.Pointer arg1, ) { - return _fmod( + return ___swbuf( arg0, arg1, ); } - late final _fmodPtr = - _lookup>( - 'fmod'); - late final _fmod = _fmodPtr.asFunction(); + late final ___swbufPtr = + _lookup)>>( + '__swbuf'); + late final ___swbuf = + ___swbufPtr.asFunction)>(); - double remainderf( - double arg0, - double arg1, + void flockfile( + ffi.Pointer arg0, ) { - return _remainderf( + return _flockfile( arg0, - arg1, ); } - late final _remainderfPtr = - _lookup>( - 'remainderf'); - late final _remainderf = - _remainderfPtr.asFunction(); + late final _flockfilePtr = + _lookup)>>( + 'flockfile'); + late final _flockfile = + _flockfilePtr.asFunction)>(); - double remainder( - double arg0, - double arg1, + int ftrylockfile( + ffi.Pointer arg0, ) { - return _remainder( + return _ftrylockfile( arg0, - arg1, ); } - late final _remainderPtr = - _lookup>( - 'remainder'); - late final _remainder = - _remainderPtr.asFunction(); + late final _ftrylockfilePtr = + _lookup)>>( + 'ftrylockfile'); + late final _ftrylockfile = + _ftrylockfilePtr.asFunction)>(); - double remquof( - double arg0, - double arg1, - ffi.Pointer arg2, + void funlockfile( + ffi.Pointer arg0, ) { - return _remquof( + return _funlockfile( arg0, - arg1, - arg2, ); } - late final _remquofPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function( - ffi.Float, ffi.Float, ffi.Pointer)>>('remquof'); - late final _remquof = _remquofPtr - .asFunction)>(); + late final _funlockfilePtr = + _lookup)>>( + 'funlockfile'); + late final _funlockfile = + _funlockfilePtr.asFunction)>(); - double remquo( - double arg0, - double arg1, - ffi.Pointer arg2, + int getc_unlocked( + ffi.Pointer arg0, ) { - return _remquo( + return _getc_unlocked( arg0, - arg1, - arg2, ); } - late final _remquoPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function( - ffi.Double, ffi.Double, ffi.Pointer)>>('remquo'); - late final _remquo = _remquoPtr - .asFunction)>(); + late final _getc_unlockedPtr = + _lookup)>>( + 'getc_unlocked'); + late final _getc_unlocked = + _getc_unlockedPtr.asFunction)>(); - double copysignf( - double arg0, - double arg1, - ) { - return _copysignf( - arg0, - arg1, - ); + int getchar_unlocked() { + return _getchar_unlocked(); } - late final _copysignfPtr = - _lookup>( - 'copysignf'); - late final _copysignf = - _copysignfPtr.asFunction(); + late final _getchar_unlockedPtr = + _lookup>('getchar_unlocked'); + late final _getchar_unlocked = + _getchar_unlockedPtr.asFunction(); - double copysign( - double arg0, - double arg1, + int putc_unlocked( + int arg0, + ffi.Pointer arg1, ) { - return _copysign( + return _putc_unlocked( arg0, arg1, ); } - late final _copysignPtr = - _lookup>( - 'copysign'); - late final _copysign = - _copysignPtr.asFunction(); + late final _putc_unlockedPtr = + _lookup)>>( + 'putc_unlocked'); + late final _putc_unlocked = + _putc_unlockedPtr.asFunction)>(); - double nanf( - ffi.Pointer arg0, + int putchar_unlocked( + int arg0, ) { - return _nanf( + return _putchar_unlocked( arg0, ); } - late final _nanfPtr = - _lookup)>>( - 'nanf'); - late final _nanf = - _nanfPtr.asFunction)>(); + late final _putchar_unlockedPtr = + _lookup>( + 'putchar_unlocked'); + late final _putchar_unlocked = + _putchar_unlockedPtr.asFunction(); - double nan( - ffi.Pointer arg0, + int getw( + ffi.Pointer arg0, ) { - return _nan( + return _getw( arg0, ); } - late final _nanPtr = - _lookup)>>( - 'nan'); - late final _nan = - _nanPtr.asFunction)>(); + late final _getwPtr = + _lookup)>>('getw'); + late final _getw = _getwPtr.asFunction)>(); - double nextafterf( - double arg0, - double arg1, + int putw( + int arg0, + ffi.Pointer arg1, ) { - return _nextafterf( + return _putw( arg0, arg1, ); } - late final _nextafterfPtr = - _lookup>( - 'nextafterf'); - late final _nextafterf = - _nextafterfPtr.asFunction(); + late final _putwPtr = + _lookup)>>( + 'putw'); + late final _putw = + _putwPtr.asFunction)>(); - double nextafter( - double arg0, - double arg1, + ffi.Pointer tempnam( + ffi.Pointer __dir, + ffi.Pointer __prefix, ) { - return _nextafter( - arg0, - arg1, + return _tempnam( + __dir, + __prefix, ); } - late final _nextafterPtr = - _lookup>( - 'nextafter'); - late final _nextafter = - _nextafterPtr.asFunction(); + late final _tempnamPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('tempnam'); + late final _tempnam = _tempnamPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double fdimf( - double arg0, - double arg1, + int fseeko( + ffi.Pointer __stream, + int __offset, + int __whence, ) { - return _fdimf( - arg0, - arg1, + return _fseeko( + __stream, + __offset, + __whence, ); } - late final _fdimfPtr = - _lookup>( - 'fdimf'); - late final _fdimf = _fdimfPtr.asFunction(); + late final _fseekoPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, off_t, ffi.Int)>>('fseeko'); + late final _fseeko = + _fseekoPtr.asFunction, int, int)>(); - double fdim( - double arg0, - double arg1, + int ftello( + ffi.Pointer __stream, ) { - return _fdim( - arg0, - arg1, + return _ftello( + __stream, ); } - late final _fdimPtr = - _lookup>( - 'fdim'); - late final _fdim = _fdimPtr.asFunction(); + late final _ftelloPtr = + _lookup)>>('ftello'); + late final _ftello = _ftelloPtr.asFunction)>(); - double fmaxf( - double arg0, - double arg1, + int snprintf( + ffi.Pointer __str, + int __size, + ffi.Pointer __format, ) { - return _fmaxf( - arg0, - arg1, + return _snprintf( + __str, + __size, + __format, ); } - late final _fmaxfPtr = - _lookup>( - 'fmaxf'); - late final _fmaxf = _fmaxfPtr.asFunction(); + late final _snprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer)>>('snprintf'); + late final _snprintf = _snprintfPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); - double fmax( - double arg0, - double arg1, + int vfscanf( + ffi.Pointer __stream, + ffi.Pointer __format, + va_list arg2, ) { - return _fmax( - arg0, - arg1, + return _vfscanf( + __stream, + __format, + arg2, ); } - late final _fmaxPtr = - _lookup>( - 'fmax'); - late final _fmax = _fmaxPtr.asFunction(); + late final _vfscanfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, va_list)>>('vfscanf'); + late final _vfscanf = _vfscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - double fminf( - double arg0, - double arg1, + int vscanf( + ffi.Pointer __format, + va_list arg1, ) { - return _fminf( - arg0, + return _vscanf( + __format, arg1, ); } - late final _fminfPtr = - _lookup>( - 'fminf'); - late final _fminf = _fminfPtr.asFunction(); + late final _vscanfPtr = _lookup< + ffi.NativeFunction, va_list)>>( + 'vscanf'); + late final _vscanf = + _vscanfPtr.asFunction, va_list)>(); - double fmin( - double arg0, - double arg1, + int vsnprintf( + ffi.Pointer __str, + int __size, + ffi.Pointer __format, + va_list arg3, ) { - return _fmin( - arg0, - arg1, + return _vsnprintf( + __str, + __size, + __format, + arg3, ); } - late final _fminPtr = - _lookup>( - 'fmin'); - late final _fmin = _fminPtr.asFunction(); + late final _vsnprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer, va_list)>>('vsnprintf'); + late final _vsnprintf = _vsnprintfPtr.asFunction< + int Function( + ffi.Pointer, int, ffi.Pointer, va_list)>(); - double fmaf( - double arg0, - double arg1, - double arg2, + int vsscanf( + ffi.Pointer __str, + ffi.Pointer __format, + va_list arg2, ) { - return _fmaf( - arg0, - arg1, + return _vsscanf( + __str, + __format, arg2, ); } - late final _fmafPtr = _lookup< + late final _vsscanfPtr = _lookup< ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Float, ffi.Float)>>('fmaf'); - late final _fmaf = - _fmafPtr.asFunction(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('vsscanf'); + late final _vsscanf = _vsscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - double fma( - double arg0, - double arg1, - double arg2, + int dprintf( + int arg0, + ffi.Pointer arg1, ) { - return _fma( + return _dprintf( arg0, arg1, - arg2, ); } - late final _fmaPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Double, ffi.Double)>>('fma'); - late final _fma = - _fmaPtr.asFunction(); + late final _dprintfPtr = _lookup< + ffi.NativeFunction)>>( + 'dprintf'); + late final _dprintf = + _dprintfPtr.asFunction)>(); - double __exp10f( - double arg0, + int vdprintf( + int arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return ___exp10f( + return _vdprintf( arg0, + arg1, + arg2, ); } - late final ___exp10fPtr = - _lookup>('__exp10f'); - late final ___exp10f = ___exp10fPtr.asFunction(); + late final _vdprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, va_list)>>('vdprintf'); + late final _vdprintf = _vdprintfPtr + .asFunction, va_list)>(); - double __exp10( - double arg0, + int getdelim( + ffi.Pointer> __linep, + ffi.Pointer __linecapp, + int __delimiter, + ffi.Pointer __stream, ) { - return ___exp10( - arg0, + return _getdelim( + __linep, + __linecapp, + __delimiter, + __stream, ); } - late final ___exp10Ptr = - _lookup>('__exp10'); - late final ___exp10 = ___exp10Ptr.asFunction(); + late final _getdelimPtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Pointer>, + ffi.Pointer, ffi.Int, ffi.Pointer)>>('getdelim'); + late final _getdelim = _getdelimPtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + int, ffi.Pointer)>(); - double __cospif( - double arg0, + int getline( + ffi.Pointer> __linep, + ffi.Pointer __linecapp, + ffi.Pointer __stream, ) { - return ___cospif( - arg0, + return _getline( + __linep, + __linecapp, + __stream, ); } - late final ___cospifPtr = - _lookup>('__cospif'); - late final ___cospif = ___cospifPtr.asFunction(); + late final _getlinePtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>('getline'); + late final _getline = _getlinePtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + ffi.Pointer)>(); - double __cospi( - double arg0, + ffi.Pointer fmemopen( + ffi.Pointer __buf, + int __size, + ffi.Pointer __mode, ) { - return ___cospi( - arg0, + return _fmemopen( + __buf, + __size, + __mode, ); } - late final ___cospiPtr = - _lookup>('__cospi'); - late final ___cospi = ___cospiPtr.asFunction(); + late final _fmemopenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Pointer)>>('fmemopen'); + late final _fmemopen = _fmemopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - double __sinpif( - double arg0, + ffi.Pointer open_memstream( + ffi.Pointer> __bufp, + ffi.Pointer __sizep, ) { - return ___sinpif( - arg0, + return _open_memstream( + __bufp, + __sizep, ); } - late final ___sinpifPtr = - _lookup>('__sinpif'); - late final ___sinpif = ___sinpifPtr.asFunction(); - - double __sinpi( - double arg0, - ) { - return ___sinpi( - arg0, - ); - } - - late final ___sinpiPtr = - _lookup>('__sinpi'); - late final ___sinpi = ___sinpiPtr.asFunction(); + late final _open_memstreamPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer>, + ffi.Pointer)>>('open_memstream'); + late final _open_memstream = _open_memstreamPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer>, ffi.Pointer)>(); - double __tanpif( - double arg0, - ) { - return ___tanpif( - arg0, - ); - } + late final ffi.Pointer _sys_nerr = _lookup('sys_nerr'); - late final ___tanpifPtr = - _lookup>('__tanpif'); - late final ___tanpif = ___tanpifPtr.asFunction(); + int get sys_nerr => _sys_nerr.value; - double __tanpi( - double arg0, - ) { - return ___tanpi( - arg0, - ); - } + set sys_nerr(int value) => _sys_nerr.value = value; - late final ___tanpiPtr = - _lookup>('__tanpi'); - late final ___tanpi = ___tanpiPtr.asFunction(); + late final ffi.Pointer>> _sys_errlist = + _lookup>>('sys_errlist'); - __float2 __sincosf_stret( - double arg0, - ) { - return ___sincosf_stret( - arg0, - ); - } + ffi.Pointer> get sys_errlist => _sys_errlist.value; - late final ___sincosf_stretPtr = - _lookup>( - '__sincosf_stret'); - late final ___sincosf_stret = - ___sincosf_stretPtr.asFunction<__float2 Function(double)>(); + set sys_errlist(ffi.Pointer> value) => + _sys_errlist.value = value; - __double2 __sincos_stret( - double arg0, + int asprintf( + ffi.Pointer> arg0, + ffi.Pointer arg1, ) { - return ___sincos_stret( + return _asprintf( arg0, + arg1, ); } - late final ___sincos_stretPtr = - _lookup>( - '__sincos_stret'); - late final ___sincos_stret = - ___sincos_stretPtr.asFunction<__double2 Function(double)>(); + late final _asprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, + ffi.Pointer)>>('asprintf'); + late final _asprintf = _asprintfPtr.asFunction< + int Function( + ffi.Pointer>, ffi.Pointer)>(); - __float2 __sincospif_stret( - double arg0, + ffi.Pointer ctermid_r( + ffi.Pointer arg0, ) { - return ___sincospif_stret( + return _ctermid_r( arg0, ); } - late final ___sincospif_stretPtr = - _lookup>( - '__sincospif_stret'); - late final ___sincospif_stret = - ___sincospif_stretPtr.asFunction<__float2 Function(double)>(); + late final _ctermid_rPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('ctermid_r'); + late final _ctermid_r = _ctermid_rPtr + .asFunction Function(ffi.Pointer)>(); - __double2 __sincospi_stret( - double arg0, + ffi.Pointer fgetln( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return ___sincospi_stret( + return _fgetln( arg0, + arg1, ); } - late final ___sincospi_stretPtr = - _lookup>( - '__sincospi_stret'); - late final ___sincospi_stret = - ___sincospi_stretPtr.asFunction<__double2 Function(double)>(); + late final _fgetlnPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fgetln'); + late final _fgetln = _fgetlnPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double j0( - double arg0, + ffi.Pointer fmtcheck( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _j0( + return _fmtcheck( arg0, + arg1, ); } - late final _j0Ptr = - _lookup>('j0'); - late final _j0 = _j0Ptr.asFunction(); + late final _fmtcheckPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fmtcheck'); + late final _fmtcheck = _fmtcheckPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double j1( - double arg0, + int fpurge( + ffi.Pointer arg0, ) { - return _j1( + return _fpurge( arg0, ); } - late final _j1Ptr = - _lookup>('j1'); - late final _j1 = _j1Ptr.asFunction(); + late final _fpurgePtr = + _lookup)>>( + 'fpurge'); + late final _fpurge = _fpurgePtr.asFunction)>(); - double jn( - int arg0, - double arg1, + void setbuffer( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _jn( + return _setbuffer( arg0, arg1, + arg2, ); } - late final _jnPtr = - _lookup>( - 'jn'); - late final _jn = _jnPtr.asFunction(); - - double y0( - double arg0, - ) { - return _y0( - arg0, - ); - } - - late final _y0Ptr = - _lookup>('y0'); - late final _y0 = _y0Ptr.asFunction(); + late final _setbufferPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>('setbuffer'); + late final _setbuffer = _setbufferPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double y1( - double arg0, + int setlinebuf( + ffi.Pointer arg0, ) { - return _y1( + return _setlinebuf( arg0, ); } - late final _y1Ptr = - _lookup>('y1'); - late final _y1 = _y1Ptr.asFunction(); + late final _setlinebufPtr = + _lookup)>>( + 'setlinebuf'); + late final _setlinebuf = + _setlinebufPtr.asFunction)>(); - double yn( - int arg0, - double arg1, + int vasprintf( + ffi.Pointer> arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _yn( + return _vasprintf( arg0, arg1, + arg2, ); } - late final _ynPtr = - _lookup>( - 'yn'); - late final _yn = _ynPtr.asFunction(); + late final _vasprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, + ffi.Pointer, va_list)>>('vasprintf'); + late final _vasprintf = _vasprintfPtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + va_list)>(); - double scalb( - double arg0, - double arg1, + ffi.Pointer funopen( + ffi.Pointer arg0, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> + arg1, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> + arg2, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> + arg3, + ffi.Pointer)>> + arg4, ) { - return _scalb( + return _funopen( arg0, arg1, + arg2, + arg3, + arg4, ); } - late final _scalbPtr = - _lookup>( - 'scalb'); - late final _scalb = _scalbPtr.asFunction(); - - late final ffi.Pointer _signgam = _lookup('signgam'); - - int get signgam => _signgam.value; - - set signgam(int value) => _signgam.value = value; + late final _funopenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer)>>)>>('funopen'); + late final _funopen = _funopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction)>>)>(); - int setjmp( - ffi.Pointer arg0, + int __sprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, ) { - return _setjmp1( + return ___sprintf_chk( arg0, + arg1, + arg2, + arg3, ); } - late final _setjmpPtr = - _lookup)>>( - 'setjmp'); - late final _setjmp1 = - _setjmpPtr.asFunction)>(); + late final ___sprintf_chkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, + ffi.Pointer)>>('__sprintf_chk'); + late final ___sprintf_chk = ___sprintf_chkPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); - void longjmp( - ffi.Pointer arg0, + int __snprintf_chk( + ffi.Pointer arg0, int arg1, + int arg2, + int arg3, + ffi.Pointer arg4, ) { - return _longjmp1( + return ___snprintf_chk( arg0, arg1, + arg2, + arg3, + arg4, ); } - late final _longjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'longjmp'); - late final _longjmp1 = - _longjmpPtr.asFunction, int)>(); + late final ___snprintf_chkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, + ffi.Pointer)>>('__snprintf_chk'); + late final ___snprintf_chk = ___snprintf_chkPtr.asFunction< + int Function( + ffi.Pointer, int, int, int, ffi.Pointer)>(); - int _setjmp( - ffi.Pointer arg0, + int __vsprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, + va_list arg4, ) { - return __setjmp( + return ___vsprintf_chk( arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final __setjmpPtr = - _lookup)>>( - '_setjmp'); - late final __setjmp = - __setjmpPtr.asFunction)>(); + late final ___vsprintf_chkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, + ffi.Pointer, va_list)>>('__vsprintf_chk'); + late final ___vsprintf_chk = ___vsprintf_chkPtr.asFunction< + int Function( + ffi.Pointer, int, int, ffi.Pointer, va_list)>(); - void _longjmp( - ffi.Pointer arg0, + int __vsnprintf_chk( + ffi.Pointer arg0, int arg1, + int arg2, + int arg3, + ffi.Pointer arg4, + va_list arg5, ) { - return __longjmp( + return ___vsnprintf_chk( arg0, arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final __longjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - '_longjmp'); - late final __longjmp = - __longjmpPtr.asFunction, int)>(); + late final ___vsnprintf_chkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, + ffi.Pointer, va_list)>>('__vsnprintf_chk'); + late final ___vsnprintf_chk = ___vsnprintf_chkPtr.asFunction< + int Function(ffi.Pointer, int, int, int, ffi.Pointer, + va_list)>(); - int sigsetjmp( - ffi.Pointer arg0, + int getpriority( + int arg0, int arg1, ) { - return _sigsetjmp( + return _getpriority( arg0, arg1, ); } - late final _sigsetjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigsetjmp'); - late final _sigsetjmp = - _sigsetjmpPtr.asFunction, int)>(); + late final _getpriorityPtr = + _lookup>( + 'getpriority'); + late final _getpriority = + _getpriorityPtr.asFunction(); - void siglongjmp( - ffi.Pointer arg0, + int getiopolicy_np( + int arg0, int arg1, ) { - return _siglongjmp( + return _getiopolicy_np( arg0, arg1, ); } - late final _siglongjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'siglongjmp'); - late final _siglongjmp = - _siglongjmpPtr.asFunction, int)>(); - - void longjmperror() { - return _longjmperror(); - } - - late final _longjmperrorPtr = - _lookup>('longjmperror'); - late final _longjmperror = _longjmperrorPtr.asFunction(); - - late final ffi.Pointer>> _sys_signame = - _lookup>>('sys_signame'); - - ffi.Pointer> get sys_signame => _sys_signame.value; - - set sys_signame(ffi.Pointer> value) => - _sys_signame.value = value; - - late final ffi.Pointer>> _sys_siglist = - _lookup>>('sys_siglist'); - - ffi.Pointer> get sys_siglist => _sys_siglist.value; - - set sys_siglist(ffi.Pointer> value) => - _sys_siglist.value = value; + late final _getiopolicy_npPtr = + _lookup>( + 'getiopolicy_np'); + late final _getiopolicy_np = + _getiopolicy_npPtr.asFunction(); - int raise( + int getrlimit( int arg0, + ffi.Pointer arg1, ) { - return _raise( + return _getrlimit( arg0, + arg1, ); } - late final _raisePtr = - _lookup>('raise'); - late final _raise = _raisePtr.asFunction(); + late final _getrlimitPtr = _lookup< + ffi.NativeFunction)>>( + 'getrlimit'); + late final _getrlimit = + _getrlimitPtr.asFunction)>(); - ffi.Pointer> bsd_signal( + int getrusage( int arg0, - ffi.Pointer> arg1, + ffi.Pointer arg1, ) { - return _bsd_signal( + return _getrusage( arg0, arg1, ); } - late final _bsd_signalPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Int)>>)>>('bsd_signal'); - late final _bsd_signal = _bsd_signalPtr.asFunction< - ffi.Pointer> Function( - int, ffi.Pointer>)>(); + late final _getrusagePtr = _lookup< + ffi.NativeFunction)>>( + 'getrusage'); + late final _getrusage = + _getrusagePtr.asFunction)>(); - int kill( + int setpriority( int arg0, int arg1, + int arg2, ) { - return _kill( + return _setpriority( arg0, arg1, + arg2, ); } - late final _killPtr = - _lookup>('kill'); - late final _kill = _killPtr.asFunction(); + late final _setpriorityPtr = + _lookup>( + 'setpriority'); + late final _setpriority = + _setpriorityPtr.asFunction(); - int killpg( + int setiopolicy_np( int arg0, int arg1, + int arg2, ) { - return _killpg( + return _setiopolicy_np( arg0, arg1, + arg2, ); } - late final _killpgPtr = - _lookup>('killpg'); - late final _killpg = _killpgPtr.asFunction(); + late final _setiopolicy_npPtr = + _lookup>( + 'setiopolicy_np'); + late final _setiopolicy_np = + _setiopolicy_npPtr.asFunction(); - int pthread_kill( - pthread_t arg0, - int arg1, + int setrlimit( + int arg0, + ffi.Pointer arg1, ) { - return _pthread_kill( + return _setrlimit( arg0, arg1, ); } - late final _pthread_killPtr = - _lookup>( - 'pthread_kill'); - late final _pthread_kill = - _pthread_killPtr.asFunction(); - - int pthread_sigmask( + late final _setrlimitPtr = _lookup< + ffi.NativeFunction)>>( + 'setrlimit'); + late final _setrlimit = + _setrlimitPtr.asFunction)>(); + + int wait1( + ffi.Pointer arg0, + ) { + return _wait1( + arg0, + ); + } + + late final _wait1Ptr = + _lookup)>>('wait'); + late final _wait1 = + _wait1Ptr.asFunction)>(); + + int waitpid( int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg1, + int arg2, ) { - return _pthread_sigmask( + return _waitpid( arg0, arg1, arg2, ); } - late final _pthread_sigmaskPtr = _lookup< + late final _waitpidPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('pthread_sigmask'); - late final _pthread_sigmask = _pthread_sigmaskPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + pid_t Function(pid_t, ffi.Pointer, ffi.Int)>>('waitpid'); + late final _waitpid = + _waitpidPtr.asFunction, int)>(); - int sigaction1( + int waitid( int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + int arg1, + ffi.Pointer arg2, + int arg3, ) { - return _sigaction1( + return _waitid( arg0, arg1, arg2, + arg3, ); } - late final _sigaction1Ptr = _lookup< + late final _waitidPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('sigaction'); - late final _sigaction1 = _sigaction1Ptr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Int32, id_t, ffi.Pointer, ffi.Int)>>('waitid'); + late final _waitid = _waitidPtr + .asFunction, int)>(); - int sigaddset( - ffi.Pointer arg0, + int wait3( + ffi.Pointer arg0, int arg1, + ffi.Pointer arg2, ) { - return _sigaddset( + return _wait3( arg0, arg1, + arg2, ); } - late final _sigaddsetPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigaddset'); - late final _sigaddset = - _sigaddsetPtr.asFunction, int)>(); + late final _wait3Ptr = _lookup< + ffi.NativeFunction< + pid_t Function( + ffi.Pointer, ffi.Int, ffi.Pointer)>>('wait3'); + late final _wait3 = _wait3Ptr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); - int sigaltstack( - ffi.Pointer arg0, - ffi.Pointer arg1, + int wait4( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return _sigaltstack( + return _wait4( arg0, arg1, + arg2, + arg3, ); } - late final _sigaltstackPtr = _lookup< + late final _wait4Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sigaltstack'); - late final _sigaltstack = _sigaltstackPtr - .asFunction, ffi.Pointer)>(); + pid_t Function(pid_t, ffi.Pointer, ffi.Int, + ffi.Pointer)>>('wait4'); + late final _wait4 = _wait4Ptr.asFunction< + int Function(int, ffi.Pointer, int, ffi.Pointer)>(); - int sigdelset( - ffi.Pointer arg0, - int arg1, + ffi.Pointer alloca( + int arg0, ) { - return _sigdelset( + return _alloca( arg0, - arg1, ); } - late final _sigdelsetPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigdelset'); - late final _sigdelset = - _sigdelsetPtr.asFunction, int)>(); + late final _allocaPtr = + _lookup Function(ffi.Size)>>( + 'alloca'); + late final _alloca = + _allocaPtr.asFunction Function(int)>(); - int sigemptyset( - ffi.Pointer arg0, + late final ffi.Pointer ___mb_cur_max = + _lookup('__mb_cur_max'); + + int get __mb_cur_max => ___mb_cur_max.value; + + set __mb_cur_max(int value) => ___mb_cur_max.value = value; + + ffi.Pointer malloc( + int __size, ) { - return _sigemptyset( - arg0, + return _malloc( + __size, ); } - late final _sigemptysetPtr = - _lookup)>>( - 'sigemptyset'); - late final _sigemptyset = - _sigemptysetPtr.asFunction)>(); + late final _mallocPtr = + _lookup Function(ffi.Size)>>( + 'malloc'); + late final _malloc = + _mallocPtr.asFunction Function(int)>(); - int sigfillset( - ffi.Pointer arg0, + ffi.Pointer calloc( + int __count, + int __size, ) { - return _sigfillset( - arg0, + return _calloc( + __count, + __size, ); } - late final _sigfillsetPtr = - _lookup)>>( - 'sigfillset'); - late final _sigfillset = - _sigfillsetPtr.asFunction)>(); + late final _callocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Size, ffi.Size)>>('calloc'); + late final _calloc = + _callocPtr.asFunction Function(int, int)>(); - int sighold( - int arg0, + void free( + ffi.Pointer arg0, ) { - return _sighold( + return _free( arg0, ); } - late final _sigholdPtr = - _lookup>('sighold'); - late final _sighold = _sigholdPtr.asFunction(); + late final _freePtr = + _lookup)>>( + 'free'); + late final _free = + _freePtr.asFunction)>(); - int sigignore( - int arg0, + ffi.Pointer realloc( + ffi.Pointer __ptr, + int __size, ) { - return _sigignore( - arg0, + return _realloc( + __ptr, + __size, ); } - late final _sigignorePtr = - _lookup>('sigignore'); - late final _sigignore = _sigignorePtr.asFunction(); + late final _reallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('realloc'); + late final _realloc = _reallocPtr + .asFunction Function(ffi.Pointer, int)>(); - int siginterrupt( + ffi.Pointer valloc( int arg0, - int arg1, ) { - return _siginterrupt( + return _valloc( arg0, - arg1, ); } - late final _siginterruptPtr = - _lookup>( - 'siginterrupt'); - late final _siginterrupt = - _siginterruptPtr.asFunction(); + late final _vallocPtr = + _lookup Function(ffi.Size)>>( + 'valloc'); + late final _valloc = + _vallocPtr.asFunction Function(int)>(); - int sigismember( - ffi.Pointer arg0, - int arg1, + ffi.Pointer aligned_alloc( + int __alignment, + int __size, ) { - return _sigismember( - arg0, - arg1, + return _aligned_alloc( + __alignment, + __size, ); } - late final _sigismemberPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigismember'); - late final _sigismember = - _sigismemberPtr.asFunction, int)>(); + late final _aligned_allocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Size, ffi.Size)>>('aligned_alloc'); + late final _aligned_alloc = + _aligned_allocPtr.asFunction Function(int, int)>(); - int sigpause( - int arg0, + int posix_memalign( + ffi.Pointer> __memptr, + int __alignment, + int __size, ) { - return _sigpause( - arg0, + return _posix_memalign( + __memptr, + __alignment, + __size, ); } - late final _sigpausePtr = - _lookup>('sigpause'); - late final _sigpause = _sigpausePtr.asFunction(); + late final _posix_memalignPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, ffi.Size, + ffi.Size)>>('posix_memalign'); + late final _posix_memalign = _posix_memalignPtr + .asFunction>, int, int)>(); - int sigpending( - ffi.Pointer arg0, + void abort() { + return _abort(); + } + + late final _abortPtr = + _lookup>('abort'); + late final _abort = _abortPtr.asFunction(); + + int abs( + int arg0, ) { - return _sigpending( + return _abs( arg0, ); } - late final _sigpendingPtr = - _lookup)>>( - 'sigpending'); - late final _sigpending = - _sigpendingPtr.asFunction)>(); + late final _absPtr = + _lookup>('abs'); + late final _abs = _absPtr.asFunction(); - int sigprocmask( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + int atexit( + ffi.Pointer> arg0, ) { - return _sigprocmask( + return _atexit( arg0, - arg1, - arg2, ); } - late final _sigprocmaskPtr = _lookup< + late final _atexitPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('sigprocmask'); - late final _sigprocmask = _sigprocmaskPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer>)>>('atexit'); + late final _atexit = _atexitPtr.asFunction< + int Function(ffi.Pointer>)>(); - int sigrelse( - int arg0, + double atof( + ffi.Pointer arg0, ) { - return _sigrelse( + return _atof( arg0, ); } - late final _sigrelsePtr = - _lookup>('sigrelse'); - late final _sigrelse = _sigrelsePtr.asFunction(); + late final _atofPtr = + _lookup)>>( + 'atof'); + late final _atof = + _atofPtr.asFunction)>(); - ffi.Pointer> sigset( - int arg0, - ffi.Pointer> arg1, + int atoi( + ffi.Pointer arg0, ) { - return _sigset( + return _atoi( arg0, - arg1, ); } - late final _sigsetPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Int, - ffi.Pointer< - ffi.NativeFunction>)>>('sigset'); - late final _sigset = _sigsetPtr.asFunction< - ffi.Pointer> Function( - int, ffi.Pointer>)>(); + late final _atoiPtr = + _lookup)>>( + 'atoi'); + late final _atoi = _atoiPtr.asFunction)>(); - int sigsuspend( - ffi.Pointer arg0, + int atol( + ffi.Pointer arg0, ) { - return _sigsuspend( + return _atol( arg0, ); } - late final _sigsuspendPtr = - _lookup)>>( - 'sigsuspend'); - late final _sigsuspend = - _sigsuspendPtr.asFunction)>(); + late final _atolPtr = + _lookup)>>( + 'atol'); + late final _atol = _atolPtr.asFunction)>(); - int sigwait( - ffi.Pointer arg0, - ffi.Pointer arg1, + int atoll( + ffi.Pointer arg0, ) { - return _sigwait( + return _atoll( arg0, - arg1, ); } - late final _sigwaitPtr = _lookup< + late final _atollPtr = + _lookup)>>( + 'atoll'); + late final _atoll = + _atollPtr.asFunction)>(); + + ffi.Pointer bsearch( + ffi.Pointer __key, + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, + ) { + return _bsearch( + __key, + __base, + __nel, + __width, + __compar, + ); + } + + late final _bsearchPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sigwait'); - late final _sigwait = _sigwaitPtr - .asFunction, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('bsearch'); + late final _bsearch = _bsearchPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - void psignal( + div_t div( int arg0, - ffi.Pointer arg1, + int arg1, ) { - return _psignal( + return _div( arg0, arg1, ); } - late final _psignalPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.UnsignedInt, ffi.Pointer)>>('psignal'); - late final _psignal = - _psignalPtr.asFunction)>(); + late final _divPtr = + _lookup>('div'); + late final _div = _divPtr.asFunction(); - int sigblock( + void exit( int arg0, ) { - return _sigblock( + return _exit1( arg0, ); } - late final _sigblockPtr = - _lookup>('sigblock'); - late final _sigblock = _sigblockPtr.asFunction(); + late final _exitPtr = + _lookup>('exit'); + late final _exit1 = _exitPtr.asFunction(); - int sigsetmask( - int arg0, + ffi.Pointer getenv( + ffi.Pointer arg0, ) { - return _sigsetmask( + return _getenv( arg0, ); } - late final _sigsetmaskPtr = - _lookup>('sigsetmask'); - late final _sigsetmask = _sigsetmaskPtr.asFunction(); + late final _getenvPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('getenv'); + late final _getenv = _getenvPtr + .asFunction Function(ffi.Pointer)>(); - int sigvec1( + int labs( int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, ) { - return _sigvec1( + return _labs( arg0, - arg1, - arg2, ); } - late final _sigvec1Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Pointer)>>('sigvec'); - late final _sigvec1 = _sigvec1Ptr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + late final _labsPtr = + _lookup>('labs'); + late final _labs = _labsPtr.asFunction(); - int renameat( + ldiv_t ldiv( int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + int arg1, ) { - return _renameat( + return _ldiv( arg0, arg1, - arg2, - arg3, ); } - late final _renameatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('renameat'); - late final _renameat = _renameatPtr.asFunction< - int Function(int, ffi.Pointer, int, ffi.Pointer)>(); + late final _ldivPtr = + _lookup>('ldiv'); + late final _ldiv = _ldivPtr.asFunction(); - int renamex_np( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int llabs( + int arg0, ) { - return _renamex_np( + return _llabs( arg0, - arg1, - arg2, ); } - late final _renamex_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('renamex_np'); - late final _renamex_np = _renamex_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _llabsPtr = + _lookup>('llabs'); + late final _llabs = _llabsPtr.asFunction(); - int renameatx_np( + lldiv_t lldiv( int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, - int arg4, + int arg1, ) { - return _renameatx_np( + return _lldiv( arg0, arg1, - arg2, - arg3, - arg4, ); } - late final _renameatx_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Pointer, ffi.UnsignedInt)>>('renameatx_np'); - late final _renameatx_np = _renameatx_npPtr.asFunction< - int Function( - int, ffi.Pointer, int, ffi.Pointer, int)>(); - - late final ffi.Pointer> ___stdinp = - _lookup>('__stdinp'); - - ffi.Pointer get __stdinp => ___stdinp.value; - - set __stdinp(ffi.Pointer value) => ___stdinp.value = value; - - late final ffi.Pointer> ___stdoutp = - _lookup>('__stdoutp'); - - ffi.Pointer get __stdoutp => ___stdoutp.value; - - set __stdoutp(ffi.Pointer value) => ___stdoutp.value = value; - - late final ffi.Pointer> ___stderrp = - _lookup>('__stderrp'); - - ffi.Pointer get __stderrp => ___stderrp.value; - - set __stderrp(ffi.Pointer value) => ___stderrp.value = value; + late final _lldivPtr = + _lookup>( + 'lldiv'); + late final _lldiv = _lldivPtr.asFunction(); - void clearerr( - ffi.Pointer arg0, + int mblen( + ffi.Pointer __s, + int __n, ) { - return _clearerr( - arg0, + return _mblen( + __s, + __n, ); } - late final _clearerrPtr = - _lookup)>>( - 'clearerr'); - late final _clearerr = - _clearerrPtr.asFunction)>(); + late final _mblenPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size)>>('mblen'); + late final _mblen = + _mblenPtr.asFunction, int)>(); - int fclose( - ffi.Pointer arg0, + int mbstowcs( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _fclose( + return _mbstowcs( arg0, + arg1, + arg2, ); } - late final _fclosePtr = - _lookup)>>( - 'fclose'); - late final _fclose = _fclosePtr.asFunction)>(); + late final _mbstowcsPtr = _lookup< + ffi.NativeFunction< + ffi.Size Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('mbstowcs'); + late final _mbstowcs = _mbstowcsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int feof( - ffi.Pointer arg0, + int mbtowc( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _feof( + return _mbtowc( arg0, + arg1, + arg2, ); } - late final _feofPtr = - _lookup)>>('feof'); - late final _feof = _feofPtr.asFunction)>(); + late final _mbtowcPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('mbtowc'); + late final _mbtowc = _mbtowcPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int ferror( - ffi.Pointer arg0, + void qsort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return _ferror( - arg0, + return _qsort( + __base, + __nel, + __width, + __compar, ); } - late final _ferrorPtr = - _lookup)>>( - 'ferror'); - late final _ferror = _ferrorPtr.asFunction)>(); + late final _qsortPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('qsort'); + late final _qsort = _qsortPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - int fflush( - ffi.Pointer arg0, - ) { - return _fflush( - arg0, - ); + int rand() { + return _rand(); } - late final _fflushPtr = - _lookup)>>( - 'fflush'); - late final _fflush = _fflushPtr.asFunction)>(); + late final _randPtr = _lookup>('rand'); + late final _rand = _randPtr.asFunction(); - int fgetc( - ffi.Pointer arg0, + void srand( + int arg0, ) { - return _fgetc( + return _srand( arg0, ); } - late final _fgetcPtr = - _lookup)>>('fgetc'); - late final _fgetc = _fgetcPtr.asFunction)>(); + late final _srandPtr = + _lookup>('srand'); + late final _srand = _srandPtr.asFunction(); - int fgetpos( - ffi.Pointer arg0, - ffi.Pointer arg1, + double strtod( + ffi.Pointer arg0, + ffi.Pointer> arg1, ) { - return _fgetpos( + return _strtod( arg0, arg1, ); } - late final _fgetposPtr = _lookup< + late final _strtodPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fgetpos'); - late final _fgetpos = _fgetposPtr - .asFunction, ffi.Pointer)>(); + ffi.Double Function(ffi.Pointer, + ffi.Pointer>)>>('strtod'); + late final _strtod = _strtodPtr.asFunction< + double Function( + ffi.Pointer, ffi.Pointer>)>(); - ffi.Pointer fgets( + double strtof( ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + ffi.Pointer> arg1, ) { - return _fgets( + return _strtof( arg0, arg1, - arg2, ); } - late final _fgetsPtr = _lookup< + late final _strtofPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int, ffi.Pointer)>>('fgets'); - late final _fgets = _fgetsPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + ffi.Float Function(ffi.Pointer, + ffi.Pointer>)>>('strtof'); + late final _strtof = _strtofPtr.asFunction< + double Function( + ffi.Pointer, ffi.Pointer>)>(); - ffi.Pointer fopen( - ffi.Pointer __filename, - ffi.Pointer __mode, + int strtol( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return _fopen( - __filename, - __mode, + return _strtol( + __str, + __endptr, + __base, ); } - late final _fopenPtr = _lookup< + late final _strtolPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('fopen'); - late final _fopen = _fopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Long Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtol'); + late final _strtol = _strtolPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - int fprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, + int strtoll( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return _fprintf( - arg0, - arg1, + return _strtoll( + __str, + __endptr, + __base, ); } - late final _fprintfPtr = _lookup< + late final _strtollPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('fprintf'); - late final _fprintf = _fprintfPtr - .asFunction, ffi.Pointer)>(); + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoll'); + late final _strtoll = _strtollPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - int fputc( - int arg0, - ffi.Pointer arg1, + int strtoul( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return _fputc( - arg0, - arg1, + return _strtoul( + __str, + __endptr, + __base, ); } - late final _fputcPtr = - _lookup)>>( - 'fputc'); - late final _fputc = - _fputcPtr.asFunction)>(); + late final _strtoulPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoul'); + late final _strtoul = _strtoulPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - int fputs( - ffi.Pointer arg0, - ffi.Pointer arg1, + int strtoull( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return _fputs( - arg0, - arg1, + return _strtoull( + __str, + __endptr, + __base, ); } - late final _fputsPtr = _lookup< + late final _strtoullPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fputs'); - late final _fputs = _fputsPtr - .asFunction, ffi.Pointer)>(); + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoull'); + late final _strtoull = _strtoullPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - int fread( - ffi.Pointer __ptr, - int __size, - int __nitems, - ffi.Pointer __stream, + int system( + ffi.Pointer arg0, ) { - return _fread( - __ptr, - __size, - __nitems, - __stream, + return _system( + arg0, ); } - late final _freadPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer)>>('fread'); - late final _fread = _freadPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + late final _systemPtr = + _lookup)>>( + 'system'); + late final _system = + _systemPtr.asFunction)>(); - ffi.Pointer freopen( + int wcstombs( ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg1, + int arg2, ) { - return _freopen( + return _wcstombs( arg0, arg1, arg2, ); } - late final _freopenPtr = _lookup< + late final _wcstombsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('freopen'); - late final _freopen = _freopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + ffi.Size Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('wcstombs'); + late final _wcstombs = _wcstombsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int fscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, + int wctomb( + ffi.Pointer arg0, + int arg1, ) { - return _fscanf( + return _wctomb( arg0, arg1, ); } - late final _fscanfPtr = _lookup< + late final _wctombPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('fscanf'); - late final _fscanf = _fscanfPtr - .asFunction, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.WChar)>>('wctomb'); + late final _wctomb = + _wctombPtr.asFunction, int)>(); - int fseek( - ffi.Pointer arg0, - int arg1, - int arg2, + void _Exit( + int arg0, ) { - return _fseek( + return __Exit( arg0, - arg1, - arg2, ); } - late final _fseekPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Long, ffi.Int)>>('fseek'); - late final _fseek = - _fseekPtr.asFunction, int, int)>(); + late final __ExitPtr = + _lookup>('_Exit'); + late final __Exit = __ExitPtr.asFunction(); - int fsetpos( - ffi.Pointer arg0, - ffi.Pointer arg1, + int a64l( + ffi.Pointer arg0, ) { - return _fsetpos( + return _a64l( arg0, - arg1, ); } - late final _fsetposPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fsetpos'); - late final _fsetpos = _fsetposPtr - .asFunction, ffi.Pointer)>(); + late final _a64lPtr = + _lookup)>>( + 'a64l'); + late final _a64l = _a64lPtr.asFunction)>(); - int ftell( - ffi.Pointer arg0, - ) { - return _ftell( - arg0, - ); + double drand48() { + return _drand48(); } - late final _ftellPtr = - _lookup)>>( - 'ftell'); - late final _ftell = _ftellPtr.asFunction)>(); + late final _drand48Ptr = + _lookup>('drand48'); + late final _drand48 = _drand48Ptr.asFunction(); - int fwrite( - ffi.Pointer __ptr, - int __size, - int __nitems, - ffi.Pointer __stream, + ffi.Pointer ecvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _fwrite( - __ptr, - __size, - __nitems, - __stream, + return _ecvt( + arg0, + arg1, + arg2, + arg3, ); } - late final _fwritePtr = _lookup< + late final _ecvtPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer)>>('fwrite'); - late final _fwrite = _fwritePtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Double, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('ecvt'); + late final _ecvt = _ecvtPtr.asFunction< + ffi.Pointer Function( + double, int, ffi.Pointer, ffi.Pointer)>(); - int getc( - ffi.Pointer arg0, + double erand48( + ffi.Pointer arg0, ) { - return _getc( + return _erand48( arg0, ); } - late final _getcPtr = - _lookup)>>('getc'); - late final _getc = _getcPtr.asFunction)>(); - - int getchar() { - return _getchar(); - } - - late final _getcharPtr = - _lookup>('getchar'); - late final _getchar = _getcharPtr.asFunction(); + late final _erand48Ptr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer)>>('erand48'); + late final _erand48 = + _erand48Ptr.asFunction)>(); - ffi.Pointer gets( - ffi.Pointer arg0, + ffi.Pointer fcvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _gets( + return _fcvt( arg0, + arg1, + arg2, + arg3, ); } - late final _getsPtr = _lookup< + late final _fcvtPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('gets'); - late final _gets = _getsPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Double, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('fcvt'); + late final _fcvt = _fcvtPtr.asFunction< + ffi.Pointer Function( + double, int, ffi.Pointer, ffi.Pointer)>(); - void perror( - ffi.Pointer arg0, + ffi.Pointer gcvt( + double arg0, + int arg1, + ffi.Pointer arg2, ) { - return _perror( + return _gcvt( arg0, + arg1, + arg2, ); } - late final _perrorPtr = - _lookup)>>( - 'perror'); - late final _perror = - _perrorPtr.asFunction)>(); + late final _gcvtPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Double, ffi.Int, ffi.Pointer)>>('gcvt'); + late final _gcvt = _gcvtPtr.asFunction< + ffi.Pointer Function(double, int, ffi.Pointer)>(); - int printf( - ffi.Pointer arg0, + int getsubopt( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer> arg2, ) { - return _printf( + return _getsubopt( arg0, + arg1, + arg2, ); } - late final _printfPtr = - _lookup)>>( - 'printf'); - late final _printf = - _printfPtr.asFunction)>(); + late final _getsuboptPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>)>>('getsubopt'); + late final _getsubopt = _getsuboptPtr.asFunction< + int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>)>(); - int putc( + int grantpt( int arg0, - ffi.Pointer arg1, ) { - return _putc( + return _grantpt( arg0, - arg1, ); } - late final _putcPtr = - _lookup)>>( - 'putc'); - late final _putc = - _putcPtr.asFunction)>(); + late final _grantptPtr = + _lookup>('grantpt'); + late final _grantpt = _grantptPtr.asFunction(); - int putchar( + ffi.Pointer initstate( int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _putchar( + return _initstate( arg0, + arg1, + arg2, ); } - late final _putcharPtr = - _lookup>('putchar'); - late final _putchar = _putcharPtr.asFunction(); + late final _initstatePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.UnsignedInt, ffi.Pointer, ffi.Size)>>('initstate'); + late final _initstate = _initstatePtr.asFunction< + ffi.Pointer Function(int, ffi.Pointer, int)>(); - int puts( - ffi.Pointer arg0, + int jrand48( + ffi.Pointer arg0, ) { - return _puts( + return _jrand48( arg0, ); } - late final _putsPtr = - _lookup)>>( - 'puts'); - late final _puts = _putsPtr.asFunction)>(); + late final _jrand48Ptr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer)>>('jrand48'); + late final _jrand48 = + _jrand48Ptr.asFunction)>(); - int remove( - ffi.Pointer arg0, + ffi.Pointer l64a( + int arg0, ) { - return _remove( + return _l64a( arg0, ); } - late final _removePtr = - _lookup)>>( - 'remove'); - late final _remove = - _removePtr.asFunction)>(); + late final _l64aPtr = + _lookup Function(ffi.Long)>>( + 'l64a'); + late final _l64a = _l64aPtr.asFunction Function(int)>(); - int rename( - ffi.Pointer __old, - ffi.Pointer __new, + void lcong48( + ffi.Pointer arg0, ) { - return _rename( - __old, - __new, + return _lcong48( + arg0, ); } - late final _renamePtr = _lookup< + late final _lcong48Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('rename'); - late final _rename = _renamePtr - .asFunction, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer)>>('lcong48'); + late final _lcong48 = + _lcong48Ptr.asFunction)>(); - void rewind( - ffi.Pointer arg0, + int lrand48() { + return _lrand48(); + } + + late final _lrand48Ptr = + _lookup>('lrand48'); + late final _lrand48 = _lrand48Ptr.asFunction(); + + ffi.Pointer mktemp( + ffi.Pointer arg0, ) { - return _rewind( + return _mktemp( arg0, ); } - late final _rewindPtr = - _lookup)>>( - 'rewind'); - late final _rewind = - _rewindPtr.asFunction)>(); + late final _mktempPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('mktemp'); + late final _mktemp = _mktempPtr + .asFunction Function(ffi.Pointer)>(); - int scanf( + int mkstemp( ffi.Pointer arg0, ) { - return _scanf( + return _mkstemp( arg0, ); } - late final _scanfPtr = + late final _mkstempPtr = _lookup)>>( - 'scanf'); - late final _scanf = - _scanfPtr.asFunction)>(); + 'mkstemp'); + late final _mkstemp = + _mkstempPtr.asFunction)>(); - void setbuf( - ffi.Pointer arg0, - ffi.Pointer arg1, + int mrand48() { + return _mrand48(); + } + + late final _mrand48Ptr = + _lookup>('mrand48'); + late final _mrand48 = _mrand48Ptr.asFunction(); + + int nrand48( + ffi.Pointer arg0, ) { - return _setbuf( + return _nrand48( arg0, - arg1, ); } - late final _setbufPtr = _lookup< + late final _nrand48Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('setbuf'); - late final _setbuf = _setbufPtr - .asFunction, ffi.Pointer)>(); + ffi.Long Function(ffi.Pointer)>>('nrand48'); + late final _nrand48 = + _nrand48Ptr.asFunction)>(); - int setvbuf( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - int arg3, + int posix_openpt( + int arg0, ) { - return _setvbuf( + return _posix_openpt( arg0, - arg1, - arg2, - arg3, ); } - late final _setvbufPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int, - ffi.Size)>>('setvbuf'); - late final _setvbuf = _setvbufPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int)>(); + late final _posix_openptPtr = + _lookup>('posix_openpt'); + late final _posix_openpt = _posix_openptPtr.asFunction(); - int sprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer ptsname( + int arg0, ) { - return _sprintf( + return _ptsname( arg0, - arg1, ); } - late final _sprintfPtr = _lookup< + late final _ptsnamePtr = + _lookup Function(ffi.Int)>>( + 'ptsname'); + late final _ptsname = + _ptsnamePtr.asFunction Function(int)>(); + + int ptsname_r( + int fildes, + ffi.Pointer buffer, + int buflen, + ) { + return _ptsname_r( + fildes, + buffer, + buflen, + ); + } + + late final _ptsname_rPtr = _lookup< ffi.NativeFunction< ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sprintf'); - late final _sprintf = _sprintfPtr - .asFunction, ffi.Pointer)>(); + ffi.Int, ffi.Pointer, ffi.Size)>>('ptsname_r'); + late final _ptsname_r = + _ptsname_rPtr.asFunction, int)>(); - int sscanf( + int putenv( ffi.Pointer arg0, - ffi.Pointer arg1, ) { - return _sscanf( + return _putenv( arg0, - arg1, ); } - late final _sscanfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sscanf'); - late final _sscanf = _sscanfPtr - .asFunction, ffi.Pointer)>(); + late final _putenvPtr = + _lookup)>>( + 'putenv'); + late final _putenv = + _putenvPtr.asFunction)>(); - ffi.Pointer tmpfile() { - return _tmpfile(); + int random() { + return _random(); } - late final _tmpfilePtr = - _lookup Function()>>('tmpfile'); - late final _tmpfile = _tmpfilePtr.asFunction Function()>(); + late final _randomPtr = + _lookup>('random'); + late final _random = _randomPtr.asFunction(); - ffi.Pointer tmpnam( - ffi.Pointer arg0, + int rand_r( + ffi.Pointer arg0, ) { - return _tmpnam( + return _rand_r( arg0, ); } - late final _tmpnamPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('tmpnam'); - late final _tmpnam = _tmpnamPtr - .asFunction Function(ffi.Pointer)>(); + late final _rand_rPtr = _lookup< + ffi.NativeFunction)>>( + 'rand_r'); + late final _rand_r = + _rand_rPtr.asFunction)>(); - int ungetc( - int arg0, - ffi.Pointer arg1, + ffi.Pointer realpath( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _ungetc( + return _realpath( arg0, arg1, ); } - late final _ungetcPtr = - _lookup)>>( - 'ungetc'); - late final _ungetc = - _ungetcPtr.asFunction)>(); + late final _realpathPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('realpath'); + late final _realpath = _realpathPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int vfprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + ffi.Pointer seed48( + ffi.Pointer arg0, ) { - return _vfprintf( + return _seed48( arg0, - arg1, - arg2, ); } - late final _vfprintfPtr = _lookup< + late final _seed48Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, va_list)>>('vfprintf'); - late final _vfprintf = _vfprintfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + ffi.Pointer Function( + ffi.Pointer)>>('seed48'); + late final _seed48 = _seed48Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer)>(); - int vprintf( - ffi.Pointer arg0, - va_list arg1, + int setenv( + ffi.Pointer __name, + ffi.Pointer __value, + int __overwrite, ) { - return _vprintf( - arg0, - arg1, + return _setenv( + __name, + __value, + __overwrite, ); } - late final _vprintfPtr = _lookup< - ffi.NativeFunction, va_list)>>( - 'vprintf'); - late final _vprintf = - _vprintfPtr.asFunction, va_list)>(); + late final _setenvPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('setenv'); + late final _setenv = _setenvPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int vsprintf( + void setkey( ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, ) { - return _vsprintf( + return _setkey( arg0, - arg1, - arg2, ); } - late final _vsprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - va_list)>>('vsprintf'); - late final _vsprintf = _vsprintfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + late final _setkeyPtr = + _lookup)>>( + 'setkey'); + late final _setkey = + _setkeyPtr.asFunction)>(); - ffi.Pointer ctermid( + ffi.Pointer setstate( ffi.Pointer arg0, ) { - return _ctermid( + return _setstate( arg0, ); } - late final _ctermidPtr = _lookup< + late final _setstatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctermid'); - late final _ctermid = _ctermidPtr + ffi.Pointer Function(ffi.Pointer)>>('setstate'); + late final _setstate = _setstatePtr .asFunction Function(ffi.Pointer)>(); - ffi.Pointer fdopen( + void srand48( int arg0, - ffi.Pointer arg1, ) { - return _fdopen( + return _srand48( arg0, - arg1, ); } - late final _fdopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer)>>('fdopen'); - late final _fdopen = _fdopenPtr - .asFunction Function(int, ffi.Pointer)>(); + late final _srand48Ptr = + _lookup>('srand48'); + late final _srand48 = _srand48Ptr.asFunction(); - int fileno( - ffi.Pointer arg0, + void srandom( + int arg0, ) { - return _fileno( + return _srandom( arg0, ); } - late final _filenoPtr = - _lookup)>>( - 'fileno'); - late final _fileno = _filenoPtr.asFunction)>(); + late final _srandomPtr = + _lookup>( + 'srandom'); + late final _srandom = _srandomPtr.asFunction(); - int pclose( - ffi.Pointer arg0, + int unlockpt( + int arg0, ) { - return _pclose( + return _unlockpt( arg0, ); } - late final _pclosePtr = - _lookup)>>( - 'pclose'); - late final _pclose = _pclosePtr.asFunction)>(); + late final _unlockptPtr = + _lookup>('unlockpt'); + late final _unlockpt = _unlockptPtr.asFunction(); - ffi.Pointer popen( + int unsetenv( ffi.Pointer arg0, - ffi.Pointer arg1, ) { - return _popen( + return _unsetenv( arg0, - arg1, ); } - late final _popenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('popen'); - late final _popen = _popenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _unsetenvPtr = + _lookup)>>( + 'unsetenv'); + late final _unsetenv = + _unsetenvPtr.asFunction)>(); - int __srget( - ffi.Pointer arg0, - ) { - return ___srget( - arg0, - ); + int arc4random() { + return _arc4random(); } - late final ___srgetPtr = - _lookup)>>( - '__srget'); - late final ___srget = - ___srgetPtr.asFunction)>(); + late final _arc4randomPtr = + _lookup>('arc4random'); + late final _arc4random = _arc4randomPtr.asFunction(); - int __svfscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + void arc4random_addrandom( + ffi.Pointer arg0, + int arg1, ) { - return ___svfscanf( + return _arc4random_addrandom( arg0, arg1, - arg2, ); } - late final ___svfscanfPtr = _lookup< + late final _arc4random_addrandomPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - va_list)>>('__svfscanf'); - late final ___svfscanf = ___svfscanfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + ffi.Void Function( + ffi.Pointer, ffi.Int)>>('arc4random_addrandom'); + late final _arc4random_addrandom = _arc4random_addrandomPtr + .asFunction, int)>(); - int __swbuf( - int arg0, - ffi.Pointer arg1, + void arc4random_buf( + ffi.Pointer __buf, + int __nbytes, ) { - return ___swbuf( - arg0, - arg1, + return _arc4random_buf( + __buf, + __nbytes, ); } - late final ___swbufPtr = - _lookup)>>( - '__swbuf'); - late final ___swbuf = - ___swbufPtr.asFunction)>(); + late final _arc4random_bufPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Size)>>('arc4random_buf'); + late final _arc4random_buf = _arc4random_bufPtr + .asFunction, int)>(); - void flockfile( - ffi.Pointer arg0, - ) { - return _flockfile( - arg0, - ); + void arc4random_stir() { + return _arc4random_stir(); } - late final _flockfilePtr = - _lookup)>>( - 'flockfile'); - late final _flockfile = - _flockfilePtr.asFunction)>(); + late final _arc4random_stirPtr = + _lookup>('arc4random_stir'); + late final _arc4random_stir = + _arc4random_stirPtr.asFunction(); - int ftrylockfile( - ffi.Pointer arg0, + int arc4random_uniform( + int __upper_bound, ) { - return _ftrylockfile( - arg0, + return _arc4random_uniform( + __upper_bound, ); } - late final _ftrylockfilePtr = - _lookup)>>( - 'ftrylockfile'); - late final _ftrylockfile = - _ftrylockfilePtr.asFunction)>(); + late final _arc4random_uniformPtr = + _lookup>( + 'arc4random_uniform'); + late final _arc4random_uniform = + _arc4random_uniformPtr.asFunction(); - void funlockfile( - ffi.Pointer arg0, + int atexit_b( + ffi.Pointer<_ObjCBlock> arg0, ) { - return _funlockfile( + return _atexit_b( arg0, ); } - late final _funlockfilePtr = - _lookup)>>( - 'funlockfile'); - late final _funlockfile = - _funlockfilePtr.asFunction)>(); - - int getc_unlocked( - ffi.Pointer arg0, + late final _atexit_bPtr = + _lookup)>>( + 'atexit_b'); + late final _atexit_b = + _atexit_bPtr.asFunction)>(); + + ffi.Pointer bsearch_b( + ffi.Pointer __key, + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return _getc_unlocked( - arg0, + return _bsearch_b( + __key, + __base, + __nel, + __width, + __compar, ); } - late final _getc_unlockedPtr = - _lookup)>>( - 'getc_unlocked'); - late final _getc_unlocked = - _getc_unlockedPtr.asFunction)>(); - - int getchar_unlocked() { - return _getchar_unlocked(); - } - - late final _getchar_unlockedPtr = - _lookup>('getchar_unlocked'); - late final _getchar_unlocked = - _getchar_unlockedPtr.asFunction(); + late final _bsearch_bPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('bsearch_b'); + late final _bsearch_b = _bsearch_bPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - int putc_unlocked( - int arg0, - ffi.Pointer arg1, + ffi.Pointer cgetcap( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _putc_unlocked( + return _cgetcap( arg0, arg1, + arg2, ); } - late final _putc_unlockedPtr = - _lookup)>>( - 'putc_unlocked'); - late final _putc_unlocked = - _putc_unlockedPtr.asFunction)>(); + late final _cgetcapPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>('cgetcap'); + late final _cgetcap = _cgetcapPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int putchar_unlocked( - int arg0, - ) { - return _putchar_unlocked( - arg0, - ); + int cgetclose() { + return _cgetclose(); } - late final _putchar_unlockedPtr = - _lookup>( - 'putchar_unlocked'); - late final _putchar_unlocked = - _putchar_unlockedPtr.asFunction(); + late final _cgetclosePtr = + _lookup>('cgetclose'); + late final _cgetclose = _cgetclosePtr.asFunction(); - int getw( - ffi.Pointer arg0, + int cgetent( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer arg2, ) { - return _getw( + return _cgetent( arg0, + arg1, + arg2, ); } - late final _getwPtr = - _lookup)>>('getw'); - late final _getw = _getwPtr.asFunction)>(); + late final _cgetentPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer)>>('cgetent'); + late final _cgetent = _cgetentPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>, ffi.Pointer)>(); - int putw( - int arg0, - ffi.Pointer arg1, + int cgetfirst( + ffi.Pointer> arg0, + ffi.Pointer> arg1, ) { - return _putw( + return _cgetfirst( arg0, arg1, ); } - late final _putwPtr = - _lookup)>>( - 'putw'); - late final _putw = - _putwPtr.asFunction)>(); - - ffi.Pointer tempnam( - ffi.Pointer __dir, - ffi.Pointer __prefix, - ) { - return _tempnam( - __dir, - __prefix, - ); - } - - late final _tempnamPtr = _lookup< + late final _cgetfirstPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('tempnam'); - late final _tempnam = _tempnamPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, + ffi.Pointer>)>>('cgetfirst'); + late final _cgetfirst = _cgetfirstPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>)>(); - int fseeko( - ffi.Pointer __stream, - int __offset, - int __whence, + int cgetmatch( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _fseeko( - __stream, - __offset, - __whence, + return _cgetmatch( + arg0, + arg1, ); } - late final _fseekoPtr = _lookup< + late final _cgetmatchPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, off_t, ffi.Int)>>('fseeko'); - late final _fseeko = - _fseekoPtr.asFunction, int, int)>(); - - int ftello( - ffi.Pointer __stream, - ) { - return _ftello( - __stream, - ); - } - - late final _ftelloPtr = - _lookup)>>('ftello'); - late final _ftello = _ftelloPtr.asFunction)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('cgetmatch'); + late final _cgetmatch = _cgetmatchPtr + .asFunction, ffi.Pointer)>(); - int snprintf( - ffi.Pointer __str, - int __size, - ffi.Pointer __format, + int cgetnext( + ffi.Pointer> arg0, + ffi.Pointer> arg1, ) { - return _snprintf( - __str, - __size, - __format, + return _cgetnext( + arg0, + arg1, ); } - late final _snprintfPtr = _lookup< + late final _cgetnextPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer)>>('snprintf'); - late final _snprintf = _snprintfPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, + ffi.Pointer>)>>('cgetnext'); + late final _cgetnext = _cgetnextPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>)>(); - int vfscanf( - ffi.Pointer __stream, - ffi.Pointer __format, - va_list arg2, + int cgetnum( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _vfscanf( - __stream, - __format, + return _cgetnum( + arg0, + arg1, arg2, ); } - late final _vfscanfPtr = _lookup< + late final _cgetnumPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, va_list)>>('vfscanf'); - late final _vfscanf = _vfscanfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('cgetnum'); + late final _cgetnum = _cgetnumPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int vscanf( - ffi.Pointer __format, - va_list arg1, + int cgetset( + ffi.Pointer arg0, ) { - return _vscanf( - __format, - arg1, + return _cgetset( + arg0, ); } - late final _vscanfPtr = _lookup< - ffi.NativeFunction, va_list)>>( - 'vscanf'); - late final _vscanf = - _vscanfPtr.asFunction, va_list)>(); + late final _cgetsetPtr = + _lookup)>>( + 'cgetset'); + late final _cgetset = + _cgetsetPtr.asFunction)>(); - int vsnprintf( - ffi.Pointer __str, - int __size, - ffi.Pointer __format, - va_list arg3, + int cgetstr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, ) { - return _vsnprintf( - __str, - __size, - __format, - arg3, + return _cgetstr( + arg0, + arg1, + arg2, ); } - late final _vsnprintfPtr = _lookup< + late final _cgetstrPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer, va_list)>>('vsnprintf'); - late final _vsnprintf = _vsnprintfPtr.asFunction< - int Function( - ffi.Pointer, int, ffi.Pointer, va_list)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('cgetstr'); + late final _cgetstr = _cgetstrPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - int vsscanf( - ffi.Pointer __str, - ffi.Pointer __format, - va_list arg2, + int cgetustr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, ) { - return _vsscanf( - __str, - __format, + return _cgetustr( + arg0, + arg1, arg2, ); } - late final _vsscanfPtr = _lookup< + late final _cgetustrPtr = _lookup< ffi.NativeFunction< ffi.Int Function(ffi.Pointer, ffi.Pointer, - va_list)>>('vsscanf'); - late final _vsscanf = _vsscanfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + ffi.Pointer>)>>('cgetustr'); + late final _cgetustr = _cgetustrPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - int dprintf( + int daemon( int arg0, - ffi.Pointer arg1, + int arg1, ) { - return _dprintf( + return _daemon( arg0, arg1, ); } - late final _dprintfPtr = _lookup< - ffi.NativeFunction)>>( - 'dprintf'); - late final _dprintf = - _dprintfPtr.asFunction)>(); + late final _daemonPtr = + _lookup>('daemon'); + late final _daemon = _daemonPtr.asFunction(); - int vdprintf( + ffi.Pointer devname( int arg0, - ffi.Pointer arg1, - va_list arg2, + int arg1, ) { - return _vdprintf( + return _devname( arg0, arg1, - arg2, - ); - } - - late final _vdprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, va_list)>>('vdprintf'); - late final _vdprintf = _vdprintfPtr - .asFunction, va_list)>(); - - int getdelim( - ffi.Pointer> __linep, - ffi.Pointer __linecapp, - int __delimiter, - ffi.Pointer __stream, - ) { - return _getdelim( - __linep, - __linecapp, - __delimiter, - __stream, ); } - late final _getdelimPtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Pointer>, - ffi.Pointer, ffi.Int, ffi.Pointer)>>('getdelim'); - late final _getdelim = _getdelimPtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - int, ffi.Pointer)>(); + late final _devnamePtr = _lookup< + ffi.NativeFunction Function(dev_t, mode_t)>>( + 'devname'); + late final _devname = + _devnamePtr.asFunction Function(int, int)>(); - int getline( - ffi.Pointer> __linep, - ffi.Pointer __linecapp, - ffi.Pointer __stream, + ffi.Pointer devname_r( + int arg0, + int arg1, + ffi.Pointer buf, + int len, ) { - return _getline( - __linep, - __linecapp, - __stream, + return _devname_r( + arg0, + arg1, + buf, + len, ); } - late final _getlinePtr = _lookup< + late final _devname_rPtr = _lookup< ffi.NativeFunction< - ssize_t Function(ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>>('getline'); - late final _getline = _getlinePtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + dev_t, mode_t, ffi.Pointer, ffi.Int)>>('devname_r'); + late final _devname_r = _devname_rPtr.asFunction< + ffi.Pointer Function(int, int, ffi.Pointer, int)>(); - ffi.Pointer fmemopen( - ffi.Pointer __buf, - int __size, - ffi.Pointer __mode, + ffi.Pointer getbsize( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _fmemopen( - __buf, - __size, - __mode, + return _getbsize( + arg0, + arg1, ); } - late final _fmemopenPtr = _lookup< + late final _getbsizePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Size, - ffi.Pointer)>>('fmemopen'); - late final _fmemopen = _fmemopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('getbsize'); + late final _getbsize = _getbsizePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer open_memstream( - ffi.Pointer> __bufp, - ffi.Pointer __sizep, + int getloadavg( + ffi.Pointer arg0, + int arg1, ) { - return _open_memstream( - __bufp, - __sizep, + return _getloadavg( + arg0, + arg1, ); } - late final _open_memstreamPtr = _lookup< + late final _getloadavgPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer>, - ffi.Pointer)>>('open_memstream'); - late final _open_memstream = _open_memstreamPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer>, ffi.Pointer)>(); - - late final ffi.Pointer _sys_nerr = _lookup('sys_nerr'); - - int get sys_nerr => _sys_nerr.value; - - set sys_nerr(int value) => _sys_nerr.value = value; - - late final ffi.Pointer>> _sys_errlist = - _lookup>>('sys_errlist'); - - ffi.Pointer> get sys_errlist => _sys_errlist.value; - - set sys_errlist(ffi.Pointer> value) => - _sys_errlist.value = value; + ffi.Int Function(ffi.Pointer, ffi.Int)>>('getloadavg'); + late final _getloadavg = + _getloadavgPtr.asFunction, int)>(); - int asprintf( - ffi.Pointer> arg0, - ffi.Pointer arg1, - ) { - return _asprintf( - arg0, - arg1, - ); + ffi.Pointer getprogname() { + return _getprogname(); } - late final _asprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer)>>('asprintf'); - late final _asprintf = _asprintfPtr.asFunction< - int Function( - ffi.Pointer>, ffi.Pointer)>(); + late final _getprognamePtr = + _lookup Function()>>( + 'getprogname'); + late final _getprogname = + _getprognamePtr.asFunction Function()>(); - ffi.Pointer ctermid_r( + void setprogname( ffi.Pointer arg0, ) { - return _ctermid_r( + return _setprogname( arg0, ); } - late final _ctermid_rPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctermid_r'); - late final _ctermid_r = _ctermid_rPtr - .asFunction Function(ffi.Pointer)>(); + late final _setprognamePtr = + _lookup)>>( + 'setprogname'); + late final _setprogname = + _setprognamePtr.asFunction)>(); - ffi.Pointer fgetln( - ffi.Pointer arg0, - ffi.Pointer arg1, + int heapsort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return _fgetln( - arg0, - arg1, + return _heapsort( + __base, + __nel, + __width, + __compar, ); } - late final _fgetlnPtr = _lookup< + late final _heapsortPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('fgetln'); - late final _fgetln = _fgetlnPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer fmtcheck( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Int Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('heapsort'); + late final _heapsort = _heapsortPtr.asFunction< + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); + + int heapsort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return _fmtcheck( - arg0, - arg1, + return _heapsort_b( + __base, + __nel, + __width, + __compar, ); } - late final _fmtcheckPtr = _lookup< + late final _heapsort_bPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('fmtcheck'); - late final _fmtcheck = _fmtcheckPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('heapsort_b'); + late final _heapsort_b = _heapsort_bPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - int fpurge( - ffi.Pointer arg0, + int mergesort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return _fpurge( - arg0, + return _mergesort( + __base, + __nel, + __width, + __compar, ); } - late final _fpurgePtr = - _lookup)>>( - 'fpurge'); - late final _fpurge = _fpurgePtr.asFunction)>(); + late final _mergesortPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('mergesort'); + late final _mergesort = _mergesortPtr.asFunction< + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - void setbuffer( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int mergesort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return _setbuffer( - arg0, - arg1, - arg2, + return _mergesort_b( + __base, + __nel, + __width, + __compar, ); } - late final _setbufferPtr = _lookup< + late final _mergesort_bPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>>('setbuffer'); - late final _setbuffer = _setbufferPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('mergesort_b'); + late final _mergesort_b = _mergesort_bPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - int setlinebuf( - ffi.Pointer arg0, + void psort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return _setlinebuf( - arg0, + return _psort( + __base, + __nel, + __width, + __compar, ); } - late final _setlinebufPtr = - _lookup)>>( - 'setlinebuf'); - late final _setlinebuf = - _setlinebufPtr.asFunction)>(); + late final _psortPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('psort'); + late final _psort = _psortPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - int vasprintf( - ffi.Pointer> arg0, - ffi.Pointer arg1, - va_list arg2, + void psort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return _vasprintf( - arg0, - arg1, - arg2, + return _psort_b( + __base, + __nel, + __width, + __compar, ); } - late final _vasprintfPtr = _lookup< + late final _psort_bPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer, va_list)>>('vasprintf'); - late final _vasprintf = _vasprintfPtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - va_list)>(); + ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('psort_b'); + late final _psort_b = _psort_bPtr.asFunction< + void Function( + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - ffi.Pointer funopen( - ffi.Pointer arg0, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> - arg1, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> - arg2, + void psort_r( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer arg3, ffi.Pointer< ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> - arg3, - ffi.Pointer)>> - arg4, + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> + __compar, ) { - return _funopen( - arg0, - arg1, - arg2, + return _psort_r( + __base, + __nel, + __width, arg3, - arg4, + __compar, ); } - late final _funopenPtr = _lookup< + late final _psort_rPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>)>>('funopen'); - late final _funopen = _funopenPtr.asFunction< - ffi.Pointer Function( + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>)>>('psort_r'); + late final _psort_r = _psort_rPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, ffi.Pointer, ffi.Pointer< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction)>>)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>)>(); - int __sprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, + void qsort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return ___sprintf_chk( - arg0, - arg1, - arg2, - arg3, + return _qsort_b( + __base, + __nel, + __width, + __compar, ); } - late final ___sprintf_chkPtr = _lookup< + late final _qsort_bPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, - ffi.Pointer)>>('__sprintf_chk'); - late final ___sprintf_chk = ___sprintf_chkPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('qsort_b'); + late final _qsort_b = _qsort_bPtr.asFunction< + void Function( + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - int __snprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, - ffi.Pointer arg4, + void qsort_r( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer arg3, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> + __compar, ) { - return ___snprintf_chk( - arg0, - arg1, - arg2, + return _qsort_r( + __base, + __nel, + __width, arg3, - arg4, + __compar, ); } - late final ___snprintf_chkPtr = _lookup< + late final _qsort_rPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, - ffi.Pointer)>>('__snprintf_chk'); - late final ___snprintf_chk = ___snprintf_chkPtr.asFunction< - int Function( - ffi.Pointer, int, int, int, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>)>>('qsort_r'); + late final _qsort_r = _qsort_rPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>)>(); - int __vsprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, - va_list arg4, + int radixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, ) { - return ___vsprintf_chk( - arg0, - arg1, - arg2, - arg3, - arg4, + return _radixsort( + __base, + __nel, + __table, + __endbyte, ); } - late final ___vsprintf_chkPtr = _lookup< + late final _radixsortPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, - ffi.Pointer, va_list)>>('__vsprintf_chk'); - late final ___vsprintf_chk = ___vsprintf_chkPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer, va_list)>(); + ffi.Int Function(ffi.Pointer>, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('radixsort'); + late final _radixsort = _radixsortPtr.asFunction< + int Function(ffi.Pointer>, int, + ffi.Pointer, int)>(); - int __vsnprintf_chk( + int rpmatch( ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, - ffi.Pointer arg4, - va_list arg5, ) { - return ___vsnprintf_chk( + return _rpmatch( arg0, - arg1, - arg2, - arg3, - arg4, - arg5, ); } - late final ___vsnprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, - ffi.Pointer, va_list)>>('__vsnprintf_chk'); - late final ___vsnprintf_chk = ___vsnprintf_chkPtr.asFunction< - int Function(ffi.Pointer, int, int, int, ffi.Pointer, - va_list)>(); + late final _rpmatchPtr = + _lookup)>>( + 'rpmatch'); + late final _rpmatch = + _rpmatchPtr.asFunction)>(); - ffi.Pointer memchr( - ffi.Pointer __s, - int __c, - int __n, + int sradixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, ) { - return _memchr( - __s, - __c, - __n, + return _sradixsort( + __base, + __nel, + __table, + __endbyte, ); } - late final _memchrPtr = _lookup< + late final _sradixsortPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int, ffi.Size)>>('memchr'); - late final _memchr = _memchrPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + ffi.Int Function(ffi.Pointer>, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('sradixsort'); + late final _sradixsort = _sradixsortPtr.asFunction< + int Function(ffi.Pointer>, int, + ffi.Pointer, int)>(); - int memcmp( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, - ) { - return _memcmp( - __s1, - __s2, - __n, - ); + void sranddev() { + return _sranddev(); } - late final _memcmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memcmp'); - late final _memcmp = _memcmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _sranddevPtr = + _lookup>('sranddev'); + late final _sranddev = _sranddevPtr.asFunction(); - ffi.Pointer memcpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + void srandomdev() { + return _srandomdev(); + } + + late final _srandomdevPtr = + _lookup>('srandomdev'); + late final _srandomdev = _srandomdevPtr.asFunction(); + + ffi.Pointer reallocf( + ffi.Pointer __ptr, + int __size, ) { - return _memcpy( - __dst, - __src, - __n, + return _reallocf( + __ptr, + __size, ); } - late final _memcpyPtr = _lookup< + late final _reallocfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('memcpy'); - late final _memcpy = _memcpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('reallocf'); + late final _reallocf = _reallocfPtr + .asFunction Function(ffi.Pointer, int)>(); - ffi.Pointer memmove( - ffi.Pointer __dst, - ffi.Pointer __src, - int __len, + int strtonum( + ffi.Pointer __numstr, + int __minval, + int __maxval, + ffi.Pointer> __errstrp, ) { - return _memmove( - __dst, - __src, - __len, + return _strtonum( + __numstr, + __minval, + __maxval, + __errstrp, ); } - late final _memmovePtr = _lookup< + late final _strtonumPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('memmove'); - late final _memmove = _memmovePtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.LongLong Function(ffi.Pointer, ffi.LongLong, + ffi.LongLong, ffi.Pointer>)>>('strtonum'); + late final _strtonum = _strtonumPtr.asFunction< + int Function(ffi.Pointer, int, int, + ffi.Pointer>)>(); + + int strtoq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoq( + __str, + __endptr, + __base, + ); + } + + late final _strtoqPtr = _lookup< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoq'); + late final _strtoq = _strtoqPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + int strtouq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtouq( + __str, + __endptr, + __base, + ); + } + + late final _strtouqPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtouq'); + late final _strtouq = _strtouqPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); + + late final ffi.Pointer> _suboptarg = + _lookup>('suboptarg'); + + ffi.Pointer get suboptarg => _suboptarg.value; + + set suboptarg(ffi.Pointer value) => _suboptarg.value = value; + + ffi.Pointer memchr( + ffi.Pointer __s, + int __c, + int __n, + ) { + return _memchr( + __s, + __c, + __n, + ); + } + + late final _memchrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Size)>>('memchr'); + late final _memchr = _memchrPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); + + int memcmp( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, + ) { + return _memcmp( + __s1, + __s2, + __n, + ); + } + + late final _memcmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memcmp'); + late final _memcmp = _memcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer memcpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, + ) { + return _memcpy( + __dst, + __src, + __n, + ); + } + + late final _memcpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('memcpy'); + late final _memcpy = _memcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer memmove( + ffi.Pointer __dst, + ffi.Pointer __src, + int __len, + ) { + return _memmove( + __dst, + __src, + __len, + ); + } + + late final _memmovePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('memmove'); + late final _memmove = _memmovePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); ffi.Pointer memset( ffi.Pointer __b, @@ -23035,258 +22811,6 @@ class NativeCupertinoHttp { late final _CFCharacterSetInvert = _CFCharacterSetInvertPtr.asFunction< void Function(CFMutableCharacterSetRef)>(); - int CFErrorGetTypeID() { - return _CFErrorGetTypeID(); - } - - late final _CFErrorGetTypeIDPtr = - _lookup>('CFErrorGetTypeID'); - late final _CFErrorGetTypeID = - _CFErrorGetTypeIDPtr.asFunction(); - - late final ffi.Pointer _kCFErrorDomainPOSIX = - _lookup('kCFErrorDomainPOSIX'); - - CFErrorDomain get kCFErrorDomainPOSIX => _kCFErrorDomainPOSIX.value; - - set kCFErrorDomainPOSIX(CFErrorDomain value) => - _kCFErrorDomainPOSIX.value = value; - - late final ffi.Pointer _kCFErrorDomainOSStatus = - _lookup('kCFErrorDomainOSStatus'); - - CFErrorDomain get kCFErrorDomainOSStatus => _kCFErrorDomainOSStatus.value; - - set kCFErrorDomainOSStatus(CFErrorDomain value) => - _kCFErrorDomainOSStatus.value = value; - - late final ffi.Pointer _kCFErrorDomainMach = - _lookup('kCFErrorDomainMach'); - - CFErrorDomain get kCFErrorDomainMach => _kCFErrorDomainMach.value; - - set kCFErrorDomainMach(CFErrorDomain value) => - _kCFErrorDomainMach.value = value; - - late final ffi.Pointer _kCFErrorDomainCocoa = - _lookup('kCFErrorDomainCocoa'); - - CFErrorDomain get kCFErrorDomainCocoa => _kCFErrorDomainCocoa.value; - - set kCFErrorDomainCocoa(CFErrorDomain value) => - _kCFErrorDomainCocoa.value = value; - - late final ffi.Pointer _kCFErrorLocalizedDescriptionKey = - _lookup('kCFErrorLocalizedDescriptionKey'); - - CFStringRef get kCFErrorLocalizedDescriptionKey => - _kCFErrorLocalizedDescriptionKey.value; - - set kCFErrorLocalizedDescriptionKey(CFStringRef value) => - _kCFErrorLocalizedDescriptionKey.value = value; - - late final ffi.Pointer _kCFErrorLocalizedFailureKey = - _lookup('kCFErrorLocalizedFailureKey'); - - CFStringRef get kCFErrorLocalizedFailureKey => - _kCFErrorLocalizedFailureKey.value; - - set kCFErrorLocalizedFailureKey(CFStringRef value) => - _kCFErrorLocalizedFailureKey.value = value; - - late final ffi.Pointer _kCFErrorLocalizedFailureReasonKey = - _lookup('kCFErrorLocalizedFailureReasonKey'); - - CFStringRef get kCFErrorLocalizedFailureReasonKey => - _kCFErrorLocalizedFailureReasonKey.value; - - set kCFErrorLocalizedFailureReasonKey(CFStringRef value) => - _kCFErrorLocalizedFailureReasonKey.value = value; - - late final ffi.Pointer _kCFErrorLocalizedRecoverySuggestionKey = - _lookup('kCFErrorLocalizedRecoverySuggestionKey'); - - CFStringRef get kCFErrorLocalizedRecoverySuggestionKey => - _kCFErrorLocalizedRecoverySuggestionKey.value; - - set kCFErrorLocalizedRecoverySuggestionKey(CFStringRef value) => - _kCFErrorLocalizedRecoverySuggestionKey.value = value; - - late final ffi.Pointer _kCFErrorDescriptionKey = - _lookup('kCFErrorDescriptionKey'); - - CFStringRef get kCFErrorDescriptionKey => _kCFErrorDescriptionKey.value; - - set kCFErrorDescriptionKey(CFStringRef value) => - _kCFErrorDescriptionKey.value = value; - - late final ffi.Pointer _kCFErrorUnderlyingErrorKey = - _lookup('kCFErrorUnderlyingErrorKey'); - - CFStringRef get kCFErrorUnderlyingErrorKey => - _kCFErrorUnderlyingErrorKey.value; - - set kCFErrorUnderlyingErrorKey(CFStringRef value) => - _kCFErrorUnderlyingErrorKey.value = value; - - late final ffi.Pointer _kCFErrorURLKey = - _lookup('kCFErrorURLKey'); - - CFStringRef get kCFErrorURLKey => _kCFErrorURLKey.value; - - set kCFErrorURLKey(CFStringRef value) => _kCFErrorURLKey.value = value; - - late final ffi.Pointer _kCFErrorFilePathKey = - _lookup('kCFErrorFilePathKey'); - - CFStringRef get kCFErrorFilePathKey => _kCFErrorFilePathKey.value; - - set kCFErrorFilePathKey(CFStringRef value) => - _kCFErrorFilePathKey.value = value; - - CFErrorRef CFErrorCreate( - CFAllocatorRef allocator, - CFErrorDomain domain, - int code, - CFDictionaryRef userInfo, - ) { - return _CFErrorCreate( - allocator, - domain, - code, - userInfo, - ); - } - - late final _CFErrorCreatePtr = _lookup< - ffi.NativeFunction< - CFErrorRef Function(CFAllocatorRef, CFErrorDomain, CFIndex, - CFDictionaryRef)>>('CFErrorCreate'); - late final _CFErrorCreate = _CFErrorCreatePtr.asFunction< - CFErrorRef Function( - CFAllocatorRef, CFErrorDomain, int, CFDictionaryRef)>(); - - CFErrorRef CFErrorCreateWithUserInfoKeysAndValues( - CFAllocatorRef allocator, - CFErrorDomain domain, - int code, - ffi.Pointer> userInfoKeys, - ffi.Pointer> userInfoValues, - int numUserInfoValues, - ) { - return _CFErrorCreateWithUserInfoKeysAndValues( - allocator, - domain, - code, - userInfoKeys, - userInfoValues, - numUserInfoValues, - ); - } - - late final _CFErrorCreateWithUserInfoKeysAndValuesPtr = _lookup< - ffi.NativeFunction< - CFErrorRef Function( - CFAllocatorRef, - CFErrorDomain, - CFIndex, - ffi.Pointer>, - ffi.Pointer>, - CFIndex)>>('CFErrorCreateWithUserInfoKeysAndValues'); - late final _CFErrorCreateWithUserInfoKeysAndValues = - _CFErrorCreateWithUserInfoKeysAndValuesPtr.asFunction< - CFErrorRef Function( - CFAllocatorRef, - CFErrorDomain, - int, - ffi.Pointer>, - ffi.Pointer>, - int)>(); - - CFErrorDomain CFErrorGetDomain( - CFErrorRef err, - ) { - return _CFErrorGetDomain( - err, - ); - } - - late final _CFErrorGetDomainPtr = - _lookup>( - 'CFErrorGetDomain'); - late final _CFErrorGetDomain = - _CFErrorGetDomainPtr.asFunction(); - - int CFErrorGetCode( - CFErrorRef err, - ) { - return _CFErrorGetCode( - err, - ); - } - - late final _CFErrorGetCodePtr = - _lookup>( - 'CFErrorGetCode'); - late final _CFErrorGetCode = - _CFErrorGetCodePtr.asFunction(); - - CFDictionaryRef CFErrorCopyUserInfo( - CFErrorRef err, - ) { - return _CFErrorCopyUserInfo( - err, - ); - } - - late final _CFErrorCopyUserInfoPtr = - _lookup>( - 'CFErrorCopyUserInfo'); - late final _CFErrorCopyUserInfo = _CFErrorCopyUserInfoPtr.asFunction< - CFDictionaryRef Function(CFErrorRef)>(); - - CFStringRef CFErrorCopyDescription( - CFErrorRef err, - ) { - return _CFErrorCopyDescription( - err, - ); - } - - late final _CFErrorCopyDescriptionPtr = - _lookup>( - 'CFErrorCopyDescription'); - late final _CFErrorCopyDescription = - _CFErrorCopyDescriptionPtr.asFunction(); - - CFStringRef CFErrorCopyFailureReason( - CFErrorRef err, - ) { - return _CFErrorCopyFailureReason( - err, - ); - } - - late final _CFErrorCopyFailureReasonPtr = - _lookup>( - 'CFErrorCopyFailureReason'); - late final _CFErrorCopyFailureReason = _CFErrorCopyFailureReasonPtr - .asFunction(); - - CFStringRef CFErrorCopyRecoverySuggestion( - CFErrorRef err, - ) { - return _CFErrorCopyRecoverySuggestion( - err, - ); - } - - late final _CFErrorCopyRecoverySuggestionPtr = - _lookup>( - 'CFErrorCopyRecoverySuggestion'); - late final _CFErrorCopyRecoverySuggestion = _CFErrorCopyRecoverySuggestionPtr - .asFunction(); - int CFStringGetTypeID() { return _CFStringGetTypeID(); } @@ -23566,60 +23090,6 @@ class NativeCupertinoHttp { CFStringRef Function( CFAllocatorRef, CFDictionaryRef, CFStringRef, va_list)>(); - CFStringRef CFStringCreateStringWithValidatedFormat( - CFAllocatorRef alloc, - CFDictionaryRef formatOptions, - CFStringRef validFormatSpecifiers, - CFStringRef format, - ffi.Pointer errorPtr, - ) { - return _CFStringCreateStringWithValidatedFormat( - alloc, - formatOptions, - validFormatSpecifiers, - format, - errorPtr, - ); - } - - late final _CFStringCreateStringWithValidatedFormatPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, - CFStringRef, ffi.Pointer)>>( - 'CFStringCreateStringWithValidatedFormat'); - late final _CFStringCreateStringWithValidatedFormat = - _CFStringCreateStringWithValidatedFormatPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, - CFStringRef, ffi.Pointer)>(); - - CFStringRef CFStringCreateStringWithValidatedFormatAndArguments( - CFAllocatorRef alloc, - CFDictionaryRef formatOptions, - CFStringRef validFormatSpecifiers, - CFStringRef format, - va_list arguments, - ffi.Pointer errorPtr, - ) { - return _CFStringCreateStringWithValidatedFormatAndArguments( - alloc, - formatOptions, - validFormatSpecifiers, - format, - arguments, - errorPtr, - ); - } - - late final _CFStringCreateStringWithValidatedFormatAndArgumentsPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, - CFStringRef, va_list, ffi.Pointer)>>( - 'CFStringCreateStringWithValidatedFormatAndArguments'); - late final _CFStringCreateStringWithValidatedFormatAndArguments = - _CFStringCreateStringWithValidatedFormatAndArgumentsPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, - CFStringRef, va_list, ffi.Pointer)>(); - CFMutableStringRef CFStringCreateMutable( CFAllocatorRef alloc, int maxLength, @@ -26351,6 +25821,258 @@ class NativeCupertinoHttp { set kCFDateFormatterDoesRelativeDateFormattingKey(CFDateFormatterKey value) => _kCFDateFormatterDoesRelativeDateFormattingKey.value = value; + int CFErrorGetTypeID() { + return _CFErrorGetTypeID(); + } + + late final _CFErrorGetTypeIDPtr = + _lookup>('CFErrorGetTypeID'); + late final _CFErrorGetTypeID = + _CFErrorGetTypeIDPtr.asFunction(); + + late final ffi.Pointer _kCFErrorDomainPOSIX = + _lookup('kCFErrorDomainPOSIX'); + + CFErrorDomain get kCFErrorDomainPOSIX => _kCFErrorDomainPOSIX.value; + + set kCFErrorDomainPOSIX(CFErrorDomain value) => + _kCFErrorDomainPOSIX.value = value; + + late final ffi.Pointer _kCFErrorDomainOSStatus = + _lookup('kCFErrorDomainOSStatus'); + + CFErrorDomain get kCFErrorDomainOSStatus => _kCFErrorDomainOSStatus.value; + + set kCFErrorDomainOSStatus(CFErrorDomain value) => + _kCFErrorDomainOSStatus.value = value; + + late final ffi.Pointer _kCFErrorDomainMach = + _lookup('kCFErrorDomainMach'); + + CFErrorDomain get kCFErrorDomainMach => _kCFErrorDomainMach.value; + + set kCFErrorDomainMach(CFErrorDomain value) => + _kCFErrorDomainMach.value = value; + + late final ffi.Pointer _kCFErrorDomainCocoa = + _lookup('kCFErrorDomainCocoa'); + + CFErrorDomain get kCFErrorDomainCocoa => _kCFErrorDomainCocoa.value; + + set kCFErrorDomainCocoa(CFErrorDomain value) => + _kCFErrorDomainCocoa.value = value; + + late final ffi.Pointer _kCFErrorLocalizedDescriptionKey = + _lookup('kCFErrorLocalizedDescriptionKey'); + + CFStringRef get kCFErrorLocalizedDescriptionKey => + _kCFErrorLocalizedDescriptionKey.value; + + set kCFErrorLocalizedDescriptionKey(CFStringRef value) => + _kCFErrorLocalizedDescriptionKey.value = value; + + late final ffi.Pointer _kCFErrorLocalizedFailureKey = + _lookup('kCFErrorLocalizedFailureKey'); + + CFStringRef get kCFErrorLocalizedFailureKey => + _kCFErrorLocalizedFailureKey.value; + + set kCFErrorLocalizedFailureKey(CFStringRef value) => + _kCFErrorLocalizedFailureKey.value = value; + + late final ffi.Pointer _kCFErrorLocalizedFailureReasonKey = + _lookup('kCFErrorLocalizedFailureReasonKey'); + + CFStringRef get kCFErrorLocalizedFailureReasonKey => + _kCFErrorLocalizedFailureReasonKey.value; + + set kCFErrorLocalizedFailureReasonKey(CFStringRef value) => + _kCFErrorLocalizedFailureReasonKey.value = value; + + late final ffi.Pointer _kCFErrorLocalizedRecoverySuggestionKey = + _lookup('kCFErrorLocalizedRecoverySuggestionKey'); + + CFStringRef get kCFErrorLocalizedRecoverySuggestionKey => + _kCFErrorLocalizedRecoverySuggestionKey.value; + + set kCFErrorLocalizedRecoverySuggestionKey(CFStringRef value) => + _kCFErrorLocalizedRecoverySuggestionKey.value = value; + + late final ffi.Pointer _kCFErrorDescriptionKey = + _lookup('kCFErrorDescriptionKey'); + + CFStringRef get kCFErrorDescriptionKey => _kCFErrorDescriptionKey.value; + + set kCFErrorDescriptionKey(CFStringRef value) => + _kCFErrorDescriptionKey.value = value; + + late final ffi.Pointer _kCFErrorUnderlyingErrorKey = + _lookup('kCFErrorUnderlyingErrorKey'); + + CFStringRef get kCFErrorUnderlyingErrorKey => + _kCFErrorUnderlyingErrorKey.value; + + set kCFErrorUnderlyingErrorKey(CFStringRef value) => + _kCFErrorUnderlyingErrorKey.value = value; + + late final ffi.Pointer _kCFErrorURLKey = + _lookup('kCFErrorURLKey'); + + CFStringRef get kCFErrorURLKey => _kCFErrorURLKey.value; + + set kCFErrorURLKey(CFStringRef value) => _kCFErrorURLKey.value = value; + + late final ffi.Pointer _kCFErrorFilePathKey = + _lookup('kCFErrorFilePathKey'); + + CFStringRef get kCFErrorFilePathKey => _kCFErrorFilePathKey.value; + + set kCFErrorFilePathKey(CFStringRef value) => + _kCFErrorFilePathKey.value = value; + + CFErrorRef CFErrorCreate( + CFAllocatorRef allocator, + CFErrorDomain domain, + int code, + CFDictionaryRef userInfo, + ) { + return _CFErrorCreate( + allocator, + domain, + code, + userInfo, + ); + } + + late final _CFErrorCreatePtr = _lookup< + ffi.NativeFunction< + CFErrorRef Function(CFAllocatorRef, CFErrorDomain, CFIndex, + CFDictionaryRef)>>('CFErrorCreate'); + late final _CFErrorCreate = _CFErrorCreatePtr.asFunction< + CFErrorRef Function( + CFAllocatorRef, CFErrorDomain, int, CFDictionaryRef)>(); + + CFErrorRef CFErrorCreateWithUserInfoKeysAndValues( + CFAllocatorRef allocator, + CFErrorDomain domain, + int code, + ffi.Pointer> userInfoKeys, + ffi.Pointer> userInfoValues, + int numUserInfoValues, + ) { + return _CFErrorCreateWithUserInfoKeysAndValues( + allocator, + domain, + code, + userInfoKeys, + userInfoValues, + numUserInfoValues, + ); + } + + late final _CFErrorCreateWithUserInfoKeysAndValuesPtr = _lookup< + ffi.NativeFunction< + CFErrorRef Function( + CFAllocatorRef, + CFErrorDomain, + CFIndex, + ffi.Pointer>, + ffi.Pointer>, + CFIndex)>>('CFErrorCreateWithUserInfoKeysAndValues'); + late final _CFErrorCreateWithUserInfoKeysAndValues = + _CFErrorCreateWithUserInfoKeysAndValuesPtr.asFunction< + CFErrorRef Function( + CFAllocatorRef, + CFErrorDomain, + int, + ffi.Pointer>, + ffi.Pointer>, + int)>(); + + CFErrorDomain CFErrorGetDomain( + CFErrorRef err, + ) { + return _CFErrorGetDomain( + err, + ); + } + + late final _CFErrorGetDomainPtr = + _lookup>( + 'CFErrorGetDomain'); + late final _CFErrorGetDomain = + _CFErrorGetDomainPtr.asFunction(); + + int CFErrorGetCode( + CFErrorRef err, + ) { + return _CFErrorGetCode( + err, + ); + } + + late final _CFErrorGetCodePtr = + _lookup>( + 'CFErrorGetCode'); + late final _CFErrorGetCode = + _CFErrorGetCodePtr.asFunction(); + + CFDictionaryRef CFErrorCopyUserInfo( + CFErrorRef err, + ) { + return _CFErrorCopyUserInfo( + err, + ); + } + + late final _CFErrorCopyUserInfoPtr = + _lookup>( + 'CFErrorCopyUserInfo'); + late final _CFErrorCopyUserInfo = _CFErrorCopyUserInfoPtr.asFunction< + CFDictionaryRef Function(CFErrorRef)>(); + + CFStringRef CFErrorCopyDescription( + CFErrorRef err, + ) { + return _CFErrorCopyDescription( + err, + ); + } + + late final _CFErrorCopyDescriptionPtr = + _lookup>( + 'CFErrorCopyDescription'); + late final _CFErrorCopyDescription = + _CFErrorCopyDescriptionPtr.asFunction(); + + CFStringRef CFErrorCopyFailureReason( + CFErrorRef err, + ) { + return _CFErrorCopyFailureReason( + err, + ); + } + + late final _CFErrorCopyFailureReasonPtr = + _lookup>( + 'CFErrorCopyFailureReason'); + late final _CFErrorCopyFailureReason = _CFErrorCopyFailureReasonPtr + .asFunction(); + + CFStringRef CFErrorCopyRecoverySuggestion( + CFErrorRef err, + ) { + return _CFErrorCopyRecoverySuggestion( + err, + ); + } + + late final _CFErrorCopyRecoverySuggestionPtr = + _lookup>( + 'CFErrorCopyRecoverySuggestion'); + late final _CFErrorCopyRecoverySuggestion = _CFErrorCopyRecoverySuggestionPtr + .asFunction(); + late final ffi.Pointer _kCFBooleanTrue = _lookup('kCFBooleanTrue'); @@ -31226,25 +30948,6 @@ class NativeCupertinoHttp { int Function(int, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int)>(); - int freadlink( - int arg0, - ffi.Pointer arg1, - int arg2, - ) { - return _freadlink( - arg0, - arg1, - arg2, - ); - } - - late final _freadlinkPtr = _lookup< - ffi.NativeFunction< - ssize_t Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('freadlink'); - late final _freadlink = - _freadlinkPtr.asFunction, int)>(); - int faccessat( int arg0, ffi.Pointer arg1, @@ -33939,50 +33642,6 @@ class NativeCupertinoHttp { late final _open_dprotected_np = _open_dprotected_npPtr .asFunction, int, int, int)>(); - int openat_dprotected_np( - int arg0, - ffi.Pointer arg1, - int arg2, - int arg3, - int arg4, - ) { - return _openat_dprotected_np( - arg0, - arg1, - arg2, - arg3, - arg4, - ); - } - - late final _openat_dprotected_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, ffi.Int, - ffi.Int)>>('openat_dprotected_np'); - late final _openat_dprotected_np = _openat_dprotected_npPtr - .asFunction, int, int, int)>(); - - int openat_authenticated_np( - int arg0, - ffi.Pointer arg1, - int arg2, - int arg3, - ) { - return _openat_authenticated_np( - arg0, - arg1, - arg2, - arg3, - ); - } - - late final _openat_authenticated_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Int)>>('openat_authenticated_np'); - late final _openat_authenticated_np = _openat_authenticated_npPtr - .asFunction, int, int)>(); - int flock1( int arg0, int arg1, @@ -34852,7 +34511,7 @@ class NativeCupertinoHttp { late final _dispatch_get_global_queuePtr = _lookup< ffi.NativeFunction< dispatch_queue_global_t Function( - ffi.IntPtr, ffi.UintPtr)>>('dispatch_get_global_queue'); + ffi.IntPtr, uintptr_t)>>('dispatch_get_global_queue'); late final _dispatch_get_global_queue = _dispatch_get_global_queuePtr .asFunction(); @@ -35584,8 +35243,8 @@ class NativeCupertinoHttp { late final _dispatch_source_createPtr = _lookup< ffi.NativeFunction< - dispatch_source_t Function(dispatch_source_type_t, ffi.UintPtr, - ffi.UintPtr, dispatch_queue_t)>>('dispatch_source_create'); + dispatch_source_t Function(dispatch_source_type_t, uintptr_t, + uintptr_t, dispatch_queue_t)>>('dispatch_source_create'); late final _dispatch_source_create = _dispatch_source_createPtr.asFunction< dispatch_source_t Function( dispatch_source_type_t, int, int, dispatch_queue_t)>(); @@ -35699,7 +35358,7 @@ class NativeCupertinoHttp { } late final _dispatch_source_get_handlePtr = - _lookup>( + _lookup>( 'dispatch_source_get_handle'); late final _dispatch_source_get_handle = _dispatch_source_get_handlePtr .asFunction(); @@ -35713,7 +35372,7 @@ class NativeCupertinoHttp { } late final _dispatch_source_get_maskPtr = - _lookup>( + _lookup>( 'dispatch_source_get_mask'); late final _dispatch_source_get_mask = _dispatch_source_get_maskPtr .asFunction(); @@ -35727,7 +35386,7 @@ class NativeCupertinoHttp { } late final _dispatch_source_get_dataPtr = - _lookup>( + _lookup>( 'dispatch_source_get_data'); late final _dispatch_source_get_data = _dispatch_source_get_dataPtr .asFunction(); @@ -35743,9 +35402,8 @@ class NativeCupertinoHttp { } late final _dispatch_source_merge_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_source_t, ffi.UintPtr)>>('dispatch_source_merge_data'); + ffi.NativeFunction>( + 'dispatch_source_merge_data'); late final _dispatch_source_merge_data = _dispatch_source_merge_dataPtr .asFunction(); @@ -47224,21 +46882,21 @@ class NativeCupertinoHttp { late final _class_NSURLSession1 = _getClass1("NSURLSession"); late final _sel_sharedSession1 = _registerName1("sharedSession"); - ffi.Pointer _objc_msgSend_387( + ffi.Pointer _objc_msgSend_380( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_387( + return __objc_msgSend_380( obj, sel, ); } - late final __objc_msgSend_387Ptr = _lookup< + late final __objc_msgSend_380Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< + late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -47246,21 +46904,21 @@ class NativeCupertinoHttp { _getClass1("NSURLSessionConfiguration"); late final _sel_defaultSessionConfiguration1 = _registerName1("defaultSessionConfiguration"); - ffi.Pointer _objc_msgSend_388( + ffi.Pointer _objc_msgSend_381( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_388( + return __objc_msgSend_381( obj, sel, ); } - late final __objc_msgSend_388Ptr = _lookup< + late final __objc_msgSend_381Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< + late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -47268,23 +46926,23 @@ class NativeCupertinoHttp { _registerName1("ephemeralSessionConfiguration"); late final _sel_backgroundSessionConfigurationWithIdentifier_1 = _registerName1("backgroundSessionConfigurationWithIdentifier:"); - ffi.Pointer _objc_msgSend_389( + ffi.Pointer _objc_msgSend_382( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer identifier, ) { - return __objc_msgSend_389( + return __objc_msgSend_382( obj, sel, identifier, ); } - late final __objc_msgSend_389Ptr = _lookup< + late final __objc_msgSend_382Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< + late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47320,42 +46978,42 @@ class NativeCupertinoHttp { _registerName1("setConnectionProxyDictionary:"); late final _sel_TLSMinimumSupportedProtocol1 = _registerName1("TLSMinimumSupportedProtocol"); - int _objc_msgSend_390( + int _objc_msgSend_383( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_390( + return __objc_msgSend_383( obj, sel, ); } - late final __objc_msgSend_390Ptr = _lookup< + late final __objc_msgSend_383Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< + late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setTLSMinimumSupportedProtocol_1 = _registerName1("setTLSMinimumSupportedProtocol:"); - void _objc_msgSend_391( + void _objc_msgSend_384( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_391( + return __objc_msgSend_384( obj, sel, value, ); } - late final __objc_msgSend_391Ptr = _lookup< + late final __objc_msgSend_384Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< + late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_TLSMaximumSupportedProtocol1 = @@ -47364,42 +47022,42 @@ class NativeCupertinoHttp { _registerName1("setTLSMaximumSupportedProtocol:"); late final _sel_TLSMinimumSupportedProtocolVersion1 = _registerName1("TLSMinimumSupportedProtocolVersion"); - int _objc_msgSend_392( + int _objc_msgSend_385( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_392( + return __objc_msgSend_385( obj, sel, ); } - late final __objc_msgSend_392Ptr = _lookup< + late final __objc_msgSend_385Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< + late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setTLSMinimumSupportedProtocolVersion_1 = _registerName1("setTLSMinimumSupportedProtocolVersion:"); - void _objc_msgSend_393( + void _objc_msgSend_386( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_393( + return __objc_msgSend_386( obj, sel, value, ); } - late final __objc_msgSend_393Ptr = _lookup< + late final __objc_msgSend_386Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< + late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_TLSMaximumSupportedProtocolVersion1 = @@ -47425,23 +47083,23 @@ class NativeCupertinoHttp { late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); late final _sel_setHTTPCookieStorage_1 = _registerName1("setHTTPCookieStorage:"); - void _objc_msgSend_394( + void _objc_msgSend_387( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_394( + return __objc_msgSend_387( obj, sel, value, ); } - late final __objc_msgSend_394Ptr = _lookup< + late final __objc_msgSend_387Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< + late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47449,84 +47107,84 @@ class NativeCupertinoHttp { _getClass1("NSURLCredentialStorage"); late final _sel_URLCredentialStorage1 = _registerName1("URLCredentialStorage"); - ffi.Pointer _objc_msgSend_395( + ffi.Pointer _objc_msgSend_388( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_395( + return __objc_msgSend_388( obj, sel, ); } - late final __objc_msgSend_395Ptr = _lookup< + late final __objc_msgSend_388Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< + late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setURLCredentialStorage_1 = _registerName1("setURLCredentialStorage:"); - void _objc_msgSend_396( + void _objc_msgSend_389( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_396( + return __objc_msgSend_389( obj, sel, value, ); } - late final __objc_msgSend_396Ptr = _lookup< + late final __objc_msgSend_389Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< + late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _class_NSURLCache1 = _getClass1("NSURLCache"); late final _sel_URLCache1 = _registerName1("URLCache"); - ffi.Pointer _objc_msgSend_397( + ffi.Pointer _objc_msgSend_390( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_397( + return __objc_msgSend_390( obj, sel, ); } - late final __objc_msgSend_397Ptr = _lookup< + late final __objc_msgSend_390Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< + late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setURLCache_1 = _registerName1("setURLCache:"); - void _objc_msgSend_398( + void _objc_msgSend_391( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_398( + return __objc_msgSend_391( obj, sel, value, ); } - late final __objc_msgSend_398Ptr = _lookup< + late final __objc_msgSend_391Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< + late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47536,100 +47194,100 @@ class NativeCupertinoHttp { _registerName1("setShouldUseExtendedBackgroundIdleMode:"); late final _sel_protocolClasses1 = _registerName1("protocolClasses"); late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); - void _objc_msgSend_399( + void _objc_msgSend_392( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_399( + return __objc_msgSend_392( obj, sel, value, ); } - late final __objc_msgSend_399Ptr = _lookup< + late final __objc_msgSend_392Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< + late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_multipathServiceType1 = _registerName1("multipathServiceType"); - int _objc_msgSend_400( + int _objc_msgSend_393( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_400( + return __objc_msgSend_393( obj, sel, ); } - late final __objc_msgSend_400Ptr = _lookup< + late final __objc_msgSend_393Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< + late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setMultipathServiceType_1 = _registerName1("setMultipathServiceType:"); - void _objc_msgSend_401( + void _objc_msgSend_394( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_401( + return __objc_msgSend_394( obj, sel, value, ); } - late final __objc_msgSend_401Ptr = _lookup< + late final __objc_msgSend_394Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< + late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_backgroundSessionConfiguration_1 = _registerName1("backgroundSessionConfiguration:"); late final _sel_sessionWithConfiguration_1 = _registerName1("sessionWithConfiguration:"); - ffi.Pointer _objc_msgSend_402( + ffi.Pointer _objc_msgSend_395( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer configuration, ) { - return __objc_msgSend_402( + return __objc_msgSend_395( obj, sel, configuration, ); } - late final __objc_msgSend_402Ptr = _lookup< + late final __objc_msgSend_395Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< + late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); - ffi.Pointer _objc_msgSend_403( + ffi.Pointer _objc_msgSend_396( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer configuration, ffi.Pointer delegate, ffi.Pointer queue, ) { - return __objc_msgSend_403( + return __objc_msgSend_396( obj, sel, configuration, @@ -47638,7 +47296,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_403Ptr = _lookup< + late final __objc_msgSend_396Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -47646,7 +47304,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< + late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -47655,6 +47313,7 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_delegateQueue1 = _registerName1("delegateQueue"); + late final _sel_delegate1 = _registerName1("delegate"); late final _sel_configuration1 = _registerName1("configuration"); late final _sel_sessionDescription1 = _registerName1("sessionDescription"); late final _sel_setSessionDescription_1 = @@ -47668,89 +47327,89 @@ class NativeCupertinoHttp { _registerName1("flushWithCompletionHandler:"); late final _sel_getTasksWithCompletionHandler_1 = _registerName1("getTasksWithCompletionHandler:"); - void _objc_msgSend_404( + void _objc_msgSend_397( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_404( + return __objc_msgSend_397( obj, sel, completionHandler, ); } - late final __objc_msgSend_404Ptr = _lookup< + late final __objc_msgSend_397Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< + late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_getAllTasksWithCompletionHandler_1 = _registerName1("getAllTasksWithCompletionHandler:"); - void _objc_msgSend_405( + void _objc_msgSend_398( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_405( + return __objc_msgSend_398( obj, sel, completionHandler, ); } - late final __objc_msgSend_405Ptr = _lookup< + late final __objc_msgSend_398Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< + late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); late final _sel_dataTaskWithRequest_1 = _registerName1("dataTaskWithRequest:"); - ffi.Pointer _objc_msgSend_406( + ffi.Pointer _objc_msgSend_399( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_406( + return __objc_msgSend_399( obj, sel, request, ); } - late final __objc_msgSend_406Ptr = _lookup< + late final __objc_msgSend_399Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< + late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); - ffi.Pointer _objc_msgSend_407( + ffi.Pointer _objc_msgSend_400( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_407( + return __objc_msgSend_400( obj, sel, url, ); } - late final __objc_msgSend_407Ptr = _lookup< + late final __objc_msgSend_400Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< + late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47758,13 +47417,13 @@ class NativeCupertinoHttp { _getClass1("NSURLSessionUploadTask"); late final _sel_uploadTaskWithRequest_fromFile_1 = _registerName1("uploadTaskWithRequest:fromFile:"); - ffi.Pointer _objc_msgSend_408( + ffi.Pointer _objc_msgSend_401( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer fileURL, ) { - return __objc_msgSend_408( + return __objc_msgSend_401( obj, sel, request, @@ -47772,14 +47431,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_408Ptr = _lookup< + late final __objc_msgSend_401Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< + late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -47788,13 +47447,13 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithRequest_fromData_1 = _registerName1("uploadTaskWithRequest:fromData:"); - ffi.Pointer _objc_msgSend_409( + ffi.Pointer _objc_msgSend_402( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer bodyData, ) { - return __objc_msgSend_409( + return __objc_msgSend_402( obj, sel, request, @@ -47802,14 +47461,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_409Ptr = _lookup< + late final __objc_msgSend_402Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< + late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -47818,23 +47477,23 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithStreamedRequest_1 = _registerName1("uploadTaskWithStreamedRequest:"); - ffi.Pointer _objc_msgSend_410( + ffi.Pointer _objc_msgSend_403( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_410( + return __objc_msgSend_403( obj, sel, request, ); } - late final __objc_msgSend_410Ptr = _lookup< + late final __objc_msgSend_403Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< + late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47842,89 +47501,89 @@ class NativeCupertinoHttp { _getClass1("NSURLSessionDownloadTask"); late final _sel_cancelByProducingResumeData_1 = _registerName1("cancelByProducingResumeData:"); - void _objc_msgSend_411( + void _objc_msgSend_404( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_411( + return __objc_msgSend_404( obj, sel, completionHandler, ); } - late final __objc_msgSend_411Ptr = _lookup< + late final __objc_msgSend_404Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< + late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_downloadTaskWithRequest_1 = _registerName1("downloadTaskWithRequest:"); - ffi.Pointer _objc_msgSend_412( + ffi.Pointer _objc_msgSend_405( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_412( + return __objc_msgSend_405( obj, sel, request, ); } - late final __objc_msgSend_412Ptr = _lookup< + late final __objc_msgSend_405Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< + late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_downloadTaskWithURL_1 = _registerName1("downloadTaskWithURL:"); - ffi.Pointer _objc_msgSend_413( + ffi.Pointer _objc_msgSend_406( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_413( + return __objc_msgSend_406( obj, sel, url, ); } - late final __objc_msgSend_413Ptr = _lookup< + late final __objc_msgSend_406Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< + late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_downloadTaskWithResumeData_1 = _registerName1("downloadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_414( + ffi.Pointer _objc_msgSend_407( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer resumeData, ) { - return __objc_msgSend_414( + return __objc_msgSend_407( obj, sel, resumeData, ); } - late final __objc_msgSend_414Ptr = _lookup< + late final __objc_msgSend_407Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< + late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47933,7 +47592,7 @@ class NativeCupertinoHttp { late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = _registerName1( "readDataOfMinLength:maxLength:timeout:completionHandler:"); - void _objc_msgSend_415( + void _objc_msgSend_408( ffi.Pointer obj, ffi.Pointer sel, int minBytes, @@ -47941,7 +47600,7 @@ class NativeCupertinoHttp { double timeout, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_415( + return __objc_msgSend_408( obj, sel, minBytes, @@ -47951,7 +47610,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_415Ptr = _lookup< + late final __objc_msgSend_408Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -47960,20 +47619,20 @@ class NativeCupertinoHttp { NSUInteger, NSTimeInterval, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< + late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, int, double, ffi.Pointer<_ObjCBlock>)>(); late final _sel_writeData_timeout_completionHandler_1 = _registerName1("writeData:timeout:completionHandler:"); - void _objc_msgSend_416( + void _objc_msgSend_409( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, double timeout, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_416( + return __objc_msgSend_409( obj, sel, data, @@ -47982,7 +47641,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_416Ptr = _lookup< + late final __objc_msgSend_409Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -47990,7 +47649,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSTimeInterval, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< + late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); @@ -48003,13 +47662,13 @@ class NativeCupertinoHttp { _registerName1("stopSecureConnection"); late final _sel_streamTaskWithHostName_port_1 = _registerName1("streamTaskWithHostName:port:"); - ffi.Pointer _objc_msgSend_417( + ffi.Pointer _objc_msgSend_410( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer hostname, int port, ) { - return __objc_msgSend_417( + return __objc_msgSend_410( obj, sel, hostname, @@ -48017,37 +47676,37 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_417Ptr = _lookup< + late final __objc_msgSend_410Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< + late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _class_NSNetService1 = _getClass1("NSNetService"); late final _sel_streamTaskWithNetService_1 = _registerName1("streamTaskWithNetService:"); - ffi.Pointer _objc_msgSend_418( + ffi.Pointer _objc_msgSend_411( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer service, ) { - return __objc_msgSend_418( + return __objc_msgSend_411( obj, sel, service, ); } - late final __objc_msgSend_418Ptr = _lookup< + late final __objc_msgSend_411Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< + late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -48056,32 +47715,32 @@ class NativeCupertinoHttp { late final _class_NSURLSessionWebSocketMessage1 = _getClass1("NSURLSessionWebSocketMessage"); late final _sel_type1 = _registerName1("type"); - int _objc_msgSend_419( + int _objc_msgSend_412( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_419( + return __objc_msgSend_412( obj, sel, ); } - late final __objc_msgSend_419Ptr = _lookup< + late final __objc_msgSend_412Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< + late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_sendMessage_completionHandler_1 = _registerName1("sendMessage:completionHandler:"); - void _objc_msgSend_420( + void _objc_msgSend_413( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer message, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_420( + return __objc_msgSend_413( obj, sel, message, @@ -48089,70 +47748,70 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_420Ptr = _lookup< + late final __objc_msgSend_413Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< + late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_receiveMessageWithCompletionHandler_1 = _registerName1("receiveMessageWithCompletionHandler:"); - void _objc_msgSend_421( + void _objc_msgSend_414( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_421( + return __objc_msgSend_414( obj, sel, completionHandler, ); } - late final __objc_msgSend_421Ptr = _lookup< + late final __objc_msgSend_414Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< + late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_sendPingWithPongReceiveHandler_1 = _registerName1("sendPingWithPongReceiveHandler:"); - void _objc_msgSend_422( + void _objc_msgSend_415( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> pongReceiveHandler, ) { - return __objc_msgSend_422( + return __objc_msgSend_415( obj, sel, pongReceiveHandler, ); } - late final __objc_msgSend_422Ptr = _lookup< + late final __objc_msgSend_415Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< + late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_cancelWithCloseCode_reason_1 = _registerName1("cancelWithCloseCode:reason:"); - void _objc_msgSend_423( + void _objc_msgSend_416( ffi.Pointer obj, ffi.Pointer sel, int closeCode, ffi.Pointer reason, ) { - return __objc_msgSend_423( + return __objc_msgSend_416( obj, sel, closeCode, @@ -48160,11 +47819,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_423Ptr = _lookup< + late final __objc_msgSend_416Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< + late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); @@ -48172,55 +47831,55 @@ class NativeCupertinoHttp { late final _sel_setMaximumMessageSize_1 = _registerName1("setMaximumMessageSize:"); late final _sel_closeCode1 = _registerName1("closeCode"); - int _objc_msgSend_424( + int _objc_msgSend_417( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_424( + return __objc_msgSend_417( obj, sel, ); } - late final __objc_msgSend_424Ptr = _lookup< + late final __objc_msgSend_417Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< + late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_closeReason1 = _registerName1("closeReason"); late final _sel_webSocketTaskWithURL_1 = _registerName1("webSocketTaskWithURL:"); - ffi.Pointer _objc_msgSend_425( + ffi.Pointer _objc_msgSend_418( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_425( + return __objc_msgSend_418( obj, sel, url, ); } - late final __objc_msgSend_425Ptr = _lookup< + late final __objc_msgSend_418Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< + late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_webSocketTaskWithURL_protocols_1 = _registerName1("webSocketTaskWithURL:protocols:"); - ffi.Pointer _objc_msgSend_426( + ffi.Pointer _objc_msgSend_419( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer protocols, ) { - return __objc_msgSend_426( + return __objc_msgSend_419( obj, sel, url, @@ -48228,14 +47887,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_426Ptr = _lookup< + late final __objc_msgSend_419Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< + late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48244,35 +47903,35 @@ class NativeCupertinoHttp { late final _sel_webSocketTaskWithRequest_1 = _registerName1("webSocketTaskWithRequest:"); - ffi.Pointer _objc_msgSend_427( + ffi.Pointer _objc_msgSend_420( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_427( + return __objc_msgSend_420( obj, sel, request, ); } - late final __objc_msgSend_427Ptr = _lookup< + late final __objc_msgSend_420Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< + late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dataTaskWithRequest_completionHandler_1 = _registerName1("dataTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_428( + ffi.Pointer _objc_msgSend_421( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_428( + return __objc_msgSend_421( obj, sel, request, @@ -48280,14 +47939,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_428Ptr = _lookup< + late final __objc_msgSend_421Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< + late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48296,13 +47955,13 @@ class NativeCupertinoHttp { late final _sel_dataTaskWithURL_completionHandler_1 = _registerName1("dataTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_429( + ffi.Pointer _objc_msgSend_422( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_429( + return __objc_msgSend_422( obj, sel, url, @@ -48310,14 +47969,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_429Ptr = _lookup< + late final __objc_msgSend_422Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< + late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48326,14 +47985,14 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); - ffi.Pointer _objc_msgSend_430( + ffi.Pointer _objc_msgSend_423( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer fileURL, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_430( + return __objc_msgSend_423( obj, sel, request, @@ -48342,7 +48001,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_430Ptr = _lookup< + late final __objc_msgSend_423Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -48350,7 +48009,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< + late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48360,14 +48019,14 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); - ffi.Pointer _objc_msgSend_431( + ffi.Pointer _objc_msgSend_424( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer bodyData, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_431( + return __objc_msgSend_424( obj, sel, request, @@ -48376,7 +48035,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_431Ptr = _lookup< + late final __objc_msgSend_424Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -48384,7 +48043,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< + late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48394,13 +48053,13 @@ class NativeCupertinoHttp { late final _sel_downloadTaskWithRequest_completionHandler_1 = _registerName1("downloadTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_432( + ffi.Pointer _objc_msgSend_425( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_432( + return __objc_msgSend_425( obj, sel, request, @@ -48408,14 +48067,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_432Ptr = _lookup< + late final __objc_msgSend_425Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< + late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48424,13 +48083,13 @@ class NativeCupertinoHttp { late final _sel_downloadTaskWithURL_completionHandler_1 = _registerName1("downloadTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_433( + ffi.Pointer _objc_msgSend_426( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_433( + return __objc_msgSend_426( obj, sel, url, @@ -48438,14 +48097,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_433Ptr = _lookup< + late final __objc_msgSend_426Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< + late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48454,13 +48113,13 @@ class NativeCupertinoHttp { late final _sel_downloadTaskWithResumeData_completionHandler_1 = _registerName1("downloadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_434( + ffi.Pointer _objc_msgSend_427( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer resumeData, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_434( + return __objc_msgSend_427( obj, sel, resumeData, @@ -48468,14 +48127,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_434Ptr = _lookup< + late final __objc_msgSend_427Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< + late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48540,21 +48199,21 @@ class NativeCupertinoHttp { late final _sel_isProxyConnection1 = _registerName1("isProxyConnection"); late final _sel_isReusedConnection1 = _registerName1("isReusedConnection"); late final _sel_resourceFetchType1 = _registerName1("resourceFetchType"); - int _objc_msgSend_435( + int _objc_msgSend_428( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_435( + return __objc_msgSend_428( obj, sel, ); } - late final __objc_msgSend_435Ptr = _lookup< + late final __objc_msgSend_428Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< + late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_countOfRequestHeaderBytesSent1 = @@ -48583,21 +48242,21 @@ class NativeCupertinoHttp { late final _sel_isMultipath1 = _registerName1("isMultipath"); late final _sel_domainResolutionProtocol1 = _registerName1("domainResolutionProtocol"); - int _objc_msgSend_436( + int _objc_msgSend_429( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_436( + return __objc_msgSend_429( obj, sel, ); } - late final __objc_msgSend_436Ptr = _lookup< + late final __objc_msgSend_429Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< + late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _class_NSURLSessionTaskMetrics1 = @@ -48605,21 +48264,21 @@ class NativeCupertinoHttp { late final _sel_transactionMetrics1 = _registerName1("transactionMetrics"); late final _class_NSDateInterval1 = _getClass1("NSDateInterval"); late final _sel_taskInterval1 = _registerName1("taskInterval"); - ffi.Pointer _objc_msgSend_437( + ffi.Pointer _objc_msgSend_430( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_437( + return __objc_msgSend_430( obj, sel, ); } - late final __objc_msgSend_437Ptr = _lookup< + late final __objc_msgSend_430Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< + late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -48628,14 +48287,14 @@ class NativeCupertinoHttp { late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = _registerName1( "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); - void _objc_msgSend_438( + void _objc_msgSend_431( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, int visibility, ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_438( + return __objc_msgSend_431( obj, sel, typeIdentifier, @@ -48644,7 +48303,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_438Ptr = _lookup< + late final __objc_msgSend_431Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48652,14 +48311,14 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< + late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = _registerName1( "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); - void _objc_msgSend_439( + void _objc_msgSend_432( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, @@ -48667,7 +48326,7 @@ class NativeCupertinoHttp { int visibility, ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_439( + return __objc_msgSend_432( obj, sel, typeIdentifier, @@ -48677,7 +48336,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_439Ptr = _lookup< + late final __objc_msgSend_432Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48686,7 +48345,7 @@ class NativeCupertinoHttp { ffi.Int32, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< + late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); @@ -48694,23 +48353,23 @@ class NativeCupertinoHttp { _registerName1("registeredTypeIdentifiers"); late final _sel_registeredTypeIdentifiersWithFileOptions_1 = _registerName1("registeredTypeIdentifiersWithFileOptions:"); - ffi.Pointer _objc_msgSend_440( + ffi.Pointer _objc_msgSend_433( ffi.Pointer obj, ffi.Pointer sel, int fileOptions, ) { - return __objc_msgSend_440( + return __objc_msgSend_433( obj, sel, fileOptions, ); } - late final __objc_msgSend_440Ptr = _lookup< + late final __objc_msgSend_433Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< + late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -48719,13 +48378,13 @@ class NativeCupertinoHttp { late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = _registerName1( "hasRepresentationConformingToTypeIdentifier:fileOptions:"); - bool _objc_msgSend_441( + bool _objc_msgSend_434( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, int fileOptions, ) { - return __objc_msgSend_441( + return __objc_msgSend_434( obj, sel, typeIdentifier, @@ -48733,24 +48392,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_441Ptr = _lookup< + late final __objc_msgSend_434Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< + late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = _registerName1( "loadDataRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_442( + ffi.Pointer _objc_msgSend_435( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_442( + return __objc_msgSend_435( obj, sel, typeIdentifier, @@ -48758,14 +48417,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_442Ptr = _lookup< + late final __objc_msgSend_435Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< + late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48775,13 +48434,13 @@ class NativeCupertinoHttp { late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = _registerName1( "loadFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_443( + ffi.Pointer _objc_msgSend_436( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_443( + return __objc_msgSend_436( obj, sel, typeIdentifier, @@ -48789,14 +48448,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_443Ptr = _lookup< + late final __objc_msgSend_436Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< + late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48806,13 +48465,13 @@ class NativeCupertinoHttp { late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = _registerName1( "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_444( + ffi.Pointer _objc_msgSend_437( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_444( + return __objc_msgSend_437( obj, sel, typeIdentifier, @@ -48820,14 +48479,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_444Ptr = _lookup< + late final __objc_msgSend_437Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< + late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48839,13 +48498,13 @@ class NativeCupertinoHttp { late final _sel_initWithObject_1 = _registerName1("initWithObject:"); late final _sel_registerObject_visibility_1 = _registerName1("registerObject:visibility:"); - void _objc_msgSend_445( + void _objc_msgSend_438( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer object, int visibility, ) { - return __objc_msgSend_445( + return __objc_msgSend_438( obj, sel, object, @@ -48853,24 +48512,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_445Ptr = _lookup< + late final __objc_msgSend_438Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< + late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_registerObjectOfClass_visibility_loadHandler_1 = _registerName1("registerObjectOfClass:visibility:loadHandler:"); - void _objc_msgSend_446( + void _objc_msgSend_439( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aClass, int visibility, ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_446( + return __objc_msgSend_439( obj, sel, aClass, @@ -48879,7 +48538,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_446Ptr = _lookup< + late final __objc_msgSend_439Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48887,7 +48546,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< + late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); @@ -48895,13 +48554,13 @@ class NativeCupertinoHttp { _registerName1("canLoadObjectOfClass:"); late final _sel_loadObjectOfClass_completionHandler_1 = _registerName1("loadObjectOfClass:completionHandler:"); - ffi.Pointer _objc_msgSend_447( + ffi.Pointer _objc_msgSend_440( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aClass, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_447( + return __objc_msgSend_440( obj, sel, aClass, @@ -48909,14 +48568,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_447Ptr = _lookup< + late final __objc_msgSend_440Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< + late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48925,13 +48584,13 @@ class NativeCupertinoHttp { late final _sel_initWithItem_typeIdentifier_1 = _registerName1("initWithItem:typeIdentifier:"); - instancetype _objc_msgSend_448( + instancetype _objc_msgSend_441( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer item, ffi.Pointer typeIdentifier, ) { - return __objc_msgSend_448( + return __objc_msgSend_441( obj, sel, item, @@ -48939,26 +48598,26 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_448Ptr = _lookup< + late final __objc_msgSend_441Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< + late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_registerItemForTypeIdentifier_loadHandler_1 = _registerName1("registerItemForTypeIdentifier:loadHandler:"); - void _objc_msgSend_449( + void _objc_msgSend_442( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, NSItemProviderLoadHandler loadHandler, ) { - return __objc_msgSend_449( + return __objc_msgSend_442( obj, sel, typeIdentifier, @@ -48966,27 +48625,27 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_449Ptr = _lookup< + late final __objc_msgSend_442Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< + late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>(); late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); - void _objc_msgSend_450( + void _objc_msgSend_443( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer options, NSItemProviderCompletionHandler completionHandler, ) { - return __objc_msgSend_450( + return __objc_msgSend_443( obj, sel, typeIdentifier, @@ -48995,7 +48654,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_450Ptr = _lookup< + late final __objc_msgSend_443Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -49003,7 +48662,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< + late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -49012,55 +48671,55 @@ class NativeCupertinoHttp { NSItemProviderCompletionHandler)>(); late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); - NSItemProviderLoadHandler _objc_msgSend_451( + NSItemProviderLoadHandler _objc_msgSend_444( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_451( + return __objc_msgSend_444( obj, sel, ); } - late final __objc_msgSend_451Ptr = _lookup< + late final __objc_msgSend_444Ptr = _lookup< ffi.NativeFunction< NSItemProviderLoadHandler Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< + late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< NSItemProviderLoadHandler Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setPreviewImageHandler_1 = _registerName1("setPreviewImageHandler:"); - void _objc_msgSend_452( + void _objc_msgSend_445( ffi.Pointer obj, ffi.Pointer sel, NSItemProviderLoadHandler value, ) { - return __objc_msgSend_452( + return __objc_msgSend_445( obj, sel, value, ); } - late final __objc_msgSend_452Ptr = _lookup< + late final __objc_msgSend_445Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< + late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>(); late final _sel_loadPreviewImageWithOptions_completionHandler_1 = _registerName1("loadPreviewImageWithOptions:completionHandler:"); - void _objc_msgSend_453( + void _objc_msgSend_446( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer options, NSItemProviderCompletionHandler completionHandler, ) { - return __objc_msgSend_453( + return __objc_msgSend_446( obj, sel, options, @@ -49068,14 +48727,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_453Ptr = _lookup< + late final __objc_msgSend_446Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< + late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderCompletionHandler)>(); @@ -49362,13 +49021,13 @@ class NativeCupertinoHttp { late final _class_NSMutableString1 = _getClass1("NSMutableString"); late final _sel_replaceCharactersInRange_withString_1 = _registerName1("replaceCharactersInRange:withString:"); - void _objc_msgSend_454( + void _objc_msgSend_447( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ffi.Pointer aString, ) { - return __objc_msgSend_454( + return __objc_msgSend_447( obj, sel, range, @@ -49376,23 +49035,23 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_454Ptr = _lookup< + late final __objc_msgSend_447Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< + late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>(); late final _sel_insertString_atIndex_1 = _registerName1("insertString:atIndex:"); - void _objc_msgSend_455( + void _objc_msgSend_448( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aString, int loc, ) { - return __objc_msgSend_455( + return __objc_msgSend_448( obj, sel, aString, @@ -49400,11 +49059,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_455Ptr = _lookup< + late final __objc_msgSend_448Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< + late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -49415,7 +49074,7 @@ class NativeCupertinoHttp { late final _sel_setString_1 = _registerName1("setString:"); late final _sel_replaceOccurrencesOfString_withString_options_range_1 = _registerName1("replaceOccurrencesOfString:withString:options:range:"); - int _objc_msgSend_456( + int _objc_msgSend_449( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer target, @@ -49423,7 +49082,7 @@ class NativeCupertinoHttp { int options, NSRange searchRange, ) { - return __objc_msgSend_456( + return __objc_msgSend_449( obj, sel, target, @@ -49433,7 +49092,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_456Ptr = _lookup< + late final __objc_msgSend_449Ptr = _lookup< ffi.NativeFunction< NSUInteger Function( ffi.Pointer, @@ -49442,13 +49101,13 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< + late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, NSRange)>(); late final _sel_applyTransform_reverse_range_updatedRange_1 = _registerName1("applyTransform:reverse:range:updatedRange:"); - bool _objc_msgSend_457( + bool _objc_msgSend_450( ffi.Pointer obj, ffi.Pointer sel, NSStringTransform transform, @@ -49456,7 +49115,7 @@ class NativeCupertinoHttp { NSRange range, NSRangePointer resultingRange, ) { - return __objc_msgSend_457( + return __objc_msgSend_450( obj, sel, transform, @@ -49466,7 +49125,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_457Ptr = _lookup< + late final __objc_msgSend_450Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -49475,27 +49134,27 @@ class NativeCupertinoHttp { ffi.Bool, NSRange, NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< + late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, NSStringTransform, bool, NSRange, NSRangePointer)>(); - ffi.Pointer _objc_msgSend_458( + ffi.Pointer _objc_msgSend_451( ffi.Pointer obj, ffi.Pointer sel, int capacity, ) { - return __objc_msgSend_458( + return __objc_msgSend_451( obj, sel, capacity, ); } - late final __objc_msgSend_458Ptr = _lookup< + late final __objc_msgSend_451Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< + late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -49531,86 +49190,86 @@ class NativeCupertinoHttp { _registerName1("removeCharactersInString:"); late final _sel_formUnionWithCharacterSet_1 = _registerName1("formUnionWithCharacterSet:"); - void _objc_msgSend_459( + void _objc_msgSend_452( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherSet, ) { - return __objc_msgSend_459( + return __objc_msgSend_452( obj, sel, otherSet, ); } - late final __objc_msgSend_459Ptr = _lookup< + late final __objc_msgSend_452Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< + late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_formIntersectionWithCharacterSet_1 = _registerName1("formIntersectionWithCharacterSet:"); late final _sel_invert1 = _registerName1("invert"); - ffi.Pointer _objc_msgSend_460( + ffi.Pointer _objc_msgSend_453( ffi.Pointer obj, ffi.Pointer sel, NSRange aRange, ) { - return __objc_msgSend_460( + return __objc_msgSend_453( obj, sel, aRange, ); } - late final __objc_msgSend_460Ptr = _lookup< + late final __objc_msgSend_453Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< + late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSRange)>(); - ffi.Pointer _objc_msgSend_461( + ffi.Pointer _objc_msgSend_454( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aString, ) { - return __objc_msgSend_461( + return __objc_msgSend_454( obj, sel, aString, ); } - late final __objc_msgSend_461Ptr = _lookup< + late final __objc_msgSend_454Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< + late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_462( + ffi.Pointer _objc_msgSend_455( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, ) { - return __objc_msgSend_462( + return __objc_msgSend_455( obj, sel, data, ); } - late final __objc_msgSend_462Ptr = _lookup< + late final __objc_msgSend_455Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< + late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -50381,7 +50040,7 @@ class NativeCupertinoHttp { set NSURLFileProtectionNone(NSURLFileProtectionType value) => _NSURLFileProtectionNone.value = value; - /// The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting. Transient data files with this protection type should be excluded from backups using NSURLIsExcludedFromBackupKey. + /// The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting. late final ffi.Pointer _NSURLFileProtectionComplete = _lookup('NSURLFileProtectionComplete'); @@ -50391,7 +50050,7 @@ class NativeCupertinoHttp { set NSURLFileProtectionComplete(NSURLFileProtectionType value) => _NSURLFileProtectionComplete.value = value; - /// The file is stored in an encrypted format on disk. Files can be created while the device is locked, but once closed, cannot be opened again until the device is unlocked. If the file is opened when unlocked, you may continue to access the file normally, even if the user locks the device. There is a small performance penalty when the file is created and opened, though not when being written to or read from. This can be mitigated by changing the file protection to NSURLFileProtectionComplete when the device is unlocked. Transient data files with this protection type should be excluded from backups using NSURLIsExcludedFromBackupKey. + /// The file is stored in an encrypted format on disk. Files can be created while the device is locked, but once closed, cannot be opened again until the device is unlocked. If the file is opened when unlocked, you may continue to access the file normally, even if the user locks the device. There is a small performance penalty when the file is created and opened, though not when being written to or read from. This can be mitigated by changing the file protection to NSURLFileProtectionComplete when the device is unlocked. late final ffi.Pointer _NSURLFileProtectionCompleteUnlessOpen = _lookup('NSURLFileProtectionCompleteUnlessOpen'); @@ -51159,13 +50818,13 @@ class NativeCupertinoHttp { late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); - instancetype _objc_msgSend_463( + instancetype _objc_msgSend_456( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer name, ffi.Pointer value, ) { - return __objc_msgSend_463( + return __objc_msgSend_456( obj, sel, name, @@ -51173,14 +50832,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_463Ptr = _lookup< + late final __objc_msgSend_456Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< + late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -51195,23 +50854,23 @@ class NativeCupertinoHttp { late final _sel_componentsWithString_1 = _registerName1("componentsWithString:"); late final _sel_URLRelativeToURL_1 = _registerName1("URLRelativeToURL:"); - ffi.Pointer _objc_msgSend_464( + ffi.Pointer _objc_msgSend_457( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer baseURL, ) { - return __objc_msgSend_464( + return __objc_msgSend_457( obj, sel, baseURL, ); } - late final __objc_msgSend_464Ptr = _lookup< + late final __objc_msgSend_457Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< + late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -51243,8 +50902,6 @@ class NativeCupertinoHttp { _registerName1("percentEncodedFragment"); late final _sel_setPercentEncodedFragment_1 = _registerName1("setPercentEncodedFragment:"); - late final _sel_encodedHost1 = _registerName1("encodedHost"); - late final _sel_setEncodedHost_1 = _registerName1("setEncodedHost:"); late final _sel_rangeOfScheme1 = _registerName1("rangeOfScheme"); late final _sel_rangeOfUser1 = _registerName1("rangeOfUser"); late final _sel_rangeOfPassword1 = _registerName1("rangeOfPassword"); @@ -51263,7 +50920,7 @@ class NativeCupertinoHttp { late final _class_NSHTTPURLResponse1 = _getClass1("NSHTTPURLResponse"); late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_1 = _registerName1("initWithURL:statusCode:HTTPVersion:headerFields:"); - instancetype _objc_msgSend_465( + instancetype _objc_msgSend_458( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, @@ -51271,7 +50928,7 @@ class NativeCupertinoHttp { ffi.Pointer HTTPVersion, ffi.Pointer headerFields, ) { - return __objc_msgSend_465( + return __objc_msgSend_458( obj, sel, url, @@ -51281,7 +50938,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_465Ptr = _lookup< + late final __objc_msgSend_458Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -51290,7 +50947,7 @@ class NativeCupertinoHttp { NSInteger, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< + late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -51303,23 +50960,23 @@ class NativeCupertinoHttp { late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); late final _sel_localizedStringForStatusCode_1 = _registerName1("localizedStringForStatusCode:"); - ffi.Pointer _objc_msgSend_466( + ffi.Pointer _objc_msgSend_459( ffi.Pointer obj, ffi.Pointer sel, int statusCode, ) { - return __objc_msgSend_466( + return __objc_msgSend_459( obj, sel, statusCode, ); } - late final __objc_msgSend_466Ptr = _lookup< + late final __objc_msgSend_459Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< + late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -51454,14 +51111,14 @@ class NativeCupertinoHttp { late final _class_NSException1 = _getClass1("NSException"); late final _sel_exceptionWithName_reason_userInfo_1 = _registerName1("exceptionWithName:reason:userInfo:"); - ffi.Pointer _objc_msgSend_467( + ffi.Pointer _objc_msgSend_460( ffi.Pointer obj, ffi.Pointer sel, NSExceptionName name, ffi.Pointer reason, ffi.Pointer userInfo, ) { - return __objc_msgSend_467( + return __objc_msgSend_460( obj, sel, name, @@ -51470,7 +51127,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_467Ptr = _lookup< + late final __objc_msgSend_460Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -51478,7 +51135,7 @@ class NativeCupertinoHttp { NSExceptionName, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< + late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -51488,14 +51145,14 @@ class NativeCupertinoHttp { late final _sel_initWithName_reason_userInfo_1 = _registerName1("initWithName:reason:userInfo:"); - instancetype _objc_msgSend_468( + instancetype _objc_msgSend_461( ffi.Pointer obj, ffi.Pointer sel, NSExceptionName aName, ffi.Pointer aReason, ffi.Pointer aUserInfo, ) { - return __objc_msgSend_468( + return __objc_msgSend_461( obj, sel, aName, @@ -51504,7 +51161,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_468Ptr = _lookup< + late final __objc_msgSend_461Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -51512,7 +51169,7 @@ class NativeCupertinoHttp { NSExceptionName, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< + late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, NSExceptionName, ffi.Pointer, ffi.Pointer)>(); @@ -51524,14 +51181,14 @@ class NativeCupertinoHttp { late final _sel_raise_format_1 = _registerName1("raise:format:"); late final _sel_raise_format_arguments_1 = _registerName1("raise:format:arguments:"); - void _objc_msgSend_469( + void _objc_msgSend_462( ffi.Pointer obj, ffi.Pointer sel, NSExceptionName name, ffi.Pointer format, va_list argList, ) { - return __objc_msgSend_469( + return __objc_msgSend_462( obj, sel, name, @@ -51540,7 +51197,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_469Ptr = _lookup< + late final __objc_msgSend_462Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -51548,7 +51205,7 @@ class NativeCupertinoHttp { NSExceptionName, ffi.Pointer, va_list)>>('objc_msgSend'); - late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< + late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSExceptionName, ffi.Pointer, va_list)>(); @@ -51589,28 +51246,28 @@ class NativeCupertinoHttp { late final _class_NSAssertionHandler1 = _getClass1("NSAssertionHandler"); late final _sel_currentHandler1 = _registerName1("currentHandler"); - ffi.Pointer _objc_msgSend_470( + ffi.Pointer _objc_msgSend_463( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_470( + return __objc_msgSend_463( obj, sel, ); } - late final __objc_msgSend_470Ptr = _lookup< + late final __objc_msgSend_463Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< + late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_handleFailureInMethod_object_file_lineNumber_description_1 = _registerName1( "handleFailureInMethod:object:file:lineNumber:description:"); - void _objc_msgSend_471( + void _objc_msgSend_464( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer selector, @@ -51619,7 +51276,7 @@ class NativeCupertinoHttp { int line, ffi.Pointer format, ) { - return __objc_msgSend_471( + return __objc_msgSend_464( obj, sel, selector, @@ -51630,7 +51287,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_471Ptr = _lookup< + late final __objc_msgSend_464Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -51640,7 +51297,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< + late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -51652,7 +51309,7 @@ class NativeCupertinoHttp { late final _sel_handleFailureInFunction_file_lineNumber_description_1 = _registerName1("handleFailureInFunction:file:lineNumber:description:"); - void _objc_msgSend_472( + void _objc_msgSend_465( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer functionName, @@ -51660,7 +51317,7 @@ class NativeCupertinoHttp { int line, ffi.Pointer format, ) { - return __objc_msgSend_472( + return __objc_msgSend_465( obj, sel, functionName, @@ -51670,7 +51327,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_472Ptr = _lookup< + late final __objc_msgSend_465Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -51679,7 +51336,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< + late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -51691,23 +51348,23 @@ class NativeCupertinoHttp { late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); late final _sel_blockOperationWithBlock_1 = _registerName1("blockOperationWithBlock:"); - instancetype _objc_msgSend_473( + instancetype _objc_msgSend_466( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_473( + return __objc_msgSend_466( obj, sel, block, ); } - late final __objc_msgSend_473Ptr = _lookup< + late final __objc_msgSend_466Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< + late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); @@ -51717,14 +51374,14 @@ class NativeCupertinoHttp { _getClass1("NSInvocationOperation"); late final _sel_initWithTarget_selector_object_1 = _registerName1("initWithTarget:selector:object:"); - instancetype _objc_msgSend_474( + instancetype _objc_msgSend_467( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer target, ffi.Pointer sel1, ffi.Pointer arg, ) { - return __objc_msgSend_474( + return __objc_msgSend_467( obj, sel, target, @@ -51733,7 +51390,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_474Ptr = _lookup< + late final __objc_msgSend_467Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -51741,7 +51398,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< + late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -51750,42 +51407,42 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); - instancetype _objc_msgSend_475( + instancetype _objc_msgSend_468( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer inv, ) { - return __objc_msgSend_475( + return __objc_msgSend_468( obj, sel, inv, ); } - late final __objc_msgSend_475Ptr = _lookup< + late final __objc_msgSend_468Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< + late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_invocation1 = _registerName1("invocation"); - ffi.Pointer _objc_msgSend_476( + ffi.Pointer _objc_msgSend_469( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_476( + return __objc_msgSend_469( obj, sel, ); } - late final __objc_msgSend_476Ptr = _lookup< + late final __objc_msgSend_469Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< + late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -58225,23 +57882,23 @@ class NativeCupertinoHttp { late final _class_CUPHTTPTaskConfiguration1 = _getClass1("CUPHTTPTaskConfiguration"); late final _sel_initWithPort_1 = _registerName1("initWithPort:"); - ffi.Pointer _objc_msgSend_477( + ffi.Pointer _objc_msgSend_470( ffi.Pointer obj, ffi.Pointer sel, int sendPort, ) { - return __objc_msgSend_477( + return __objc_msgSend_470( obj, sel, sendPort, ); } - late final __objc_msgSend_477Ptr = _lookup< + late final __objc_msgSend_470Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, Dart_Port)>>('objc_msgSend'); - late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< + late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -58250,13 +57907,13 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPClientDelegate"); late final _sel_registerTask_withConfiguration_1 = _registerName1("registerTask:withConfiguration:"); - void _objc_msgSend_478( + void _objc_msgSend_471( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer task, ffi.Pointer config, ) { - return __objc_msgSend_478( + return __objc_msgSend_471( obj, sel, task, @@ -58264,14 +57921,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_478Ptr = _lookup< + late final __objc_msgSend_471Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< + late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -58279,13 +57936,13 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedDelegate"); late final _sel_initWithSession_task_1 = _registerName1("initWithSession:task:"); - ffi.Pointer _objc_msgSend_479( + ffi.Pointer _objc_msgSend_472( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ) { - return __objc_msgSend_479( + return __objc_msgSend_472( obj, sel, session, @@ -58293,14 +57950,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_479Ptr = _lookup< + late final __objc_msgSend_472Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< + late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58310,41 +57967,41 @@ class NativeCupertinoHttp { late final _sel_finish1 = _registerName1("finish"); late final _sel_session1 = _registerName1("session"); late final _sel_task1 = _registerName1("task"); - ffi.Pointer _objc_msgSend_480( + ffi.Pointer _objc_msgSend_473( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_480( + return __objc_msgSend_473( obj, sel, ); } - late final __objc_msgSend_480Ptr = _lookup< + late final __objc_msgSend_473Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< + late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _class_NSLock1 = _getClass1("NSLock"); late final _sel_lock1 = _registerName1("lock"); - ffi.Pointer _objc_msgSend_481( + ffi.Pointer _objc_msgSend_474( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_481( + return __objc_msgSend_474( obj, sel, ); } - late final __objc_msgSend_481Ptr = _lookup< + late final __objc_msgSend_474Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< + late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -58352,7 +58009,7 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedRedirect"); late final _sel_initWithSession_task_response_request_1 = _registerName1("initWithSession:task:response:request:"); - ffi.Pointer _objc_msgSend_482( + ffi.Pointer _objc_msgSend_475( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, @@ -58360,7 +58017,7 @@ class NativeCupertinoHttp { ffi.Pointer response, ffi.Pointer request, ) { - return __objc_msgSend_482( + return __objc_msgSend_475( obj, sel, session, @@ -58370,7 +58027,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_482Ptr = _lookup< + late final __objc_msgSend_475Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58379,7 +58036,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< + late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58389,41 +58046,41 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); - void _objc_msgSend_483( + void _objc_msgSend_476( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_483( + return __objc_msgSend_476( obj, sel, request, ); } - late final __objc_msgSend_483Ptr = _lookup< + late final __objc_msgSend_476Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< + late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_484( + ffi.Pointer _objc_msgSend_477( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_484( + return __objc_msgSend_477( obj, sel, ); } - late final __objc_msgSend_484Ptr = _lookup< + late final __objc_msgSend_477Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< + late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -58432,14 +58089,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedResponse"); late final _sel_initWithSession_task_response_1 = _registerName1("initWithSession:task:response:"); - ffi.Pointer _objc_msgSend_485( + ffi.Pointer _objc_msgSend_478( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ffi.Pointer response, ) { - return __objc_msgSend_485( + return __objc_msgSend_478( obj, sel, session, @@ -58448,7 +58105,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_485Ptr = _lookup< + late final __objc_msgSend_478Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58456,7 +58113,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< + late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58466,54 +58123,54 @@ class NativeCupertinoHttp { late final _sel_finishWithDisposition_1 = _registerName1("finishWithDisposition:"); - void _objc_msgSend_486( + void _objc_msgSend_479( ffi.Pointer obj, ffi.Pointer sel, int disposition, ) { - return __objc_msgSend_486( + return __objc_msgSend_479( obj, sel, disposition, ); } - late final __objc_msgSend_486Ptr = _lookup< + late final __objc_msgSend_479Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< + late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_disposition1 = _registerName1("disposition"); - int _objc_msgSend_487( + int _objc_msgSend_480( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_487( + return __objc_msgSend_480( obj, sel, ); } - late final __objc_msgSend_487Ptr = _lookup< + late final __objc_msgSend_480Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< + late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); late final _sel_initWithSession_task_data_1 = _registerName1("initWithSession:task:data:"); - ffi.Pointer _objc_msgSend_488( + ffi.Pointer _objc_msgSend_481( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ffi.Pointer data, ) { - return __objc_msgSend_488( + return __objc_msgSend_481( obj, sel, session, @@ -58522,7 +58179,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_488Ptr = _lookup< + late final __objc_msgSend_481Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58530,7 +58187,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< + late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58542,14 +58199,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedComplete"); late final _sel_initWithSession_task_error_1 = _registerName1("initWithSession:task:error:"); - ffi.Pointer _objc_msgSend_489( + ffi.Pointer _objc_msgSend_482( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ffi.Pointer error, ) { - return __objc_msgSend_489( + return __objc_msgSend_482( obj, sel, session, @@ -58558,7 +58215,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_489Ptr = _lookup< + late final __objc_msgSend_482Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58566,7 +58223,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< + late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58578,14 +58235,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedFinishedDownloading"); late final _sel_initWithSession_downloadTask_url_1 = _registerName1("initWithSession:downloadTask:url:"); - ffi.Pointer _objc_msgSend_490( + ffi.Pointer _objc_msgSend_483( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer downloadTask, ffi.Pointer location, ) { - return __objc_msgSend_490( + return __objc_msgSend_483( obj, sel, session, @@ -58594,7 +58251,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_490Ptr = _lookup< + late final __objc_msgSend_483Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58602,7 +58259,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< + late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58611,55 +58268,6 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_location1 = _registerName1("location"); - Dart_CObject NSObjectToCObject( - ffi.Pointer n, - ) { - return _NSObjectToCObject( - n, - ); - } - - late final _NSObjectToCObjectPtr = _lookup< - ffi.NativeFunction)>>( - 'NSObjectToCObject'); - late final _NSObjectToCObject = _NSObjectToCObjectPtr.asFunction< - Dart_CObject Function(ffi.Pointer)>(); - - void CUPHTTPSendMessage( - ffi.Pointer task, - ffi.Pointer message, - int sendPort, - ) { - return _CUPHTTPSendMessage( - task, - message, - sendPort, - ); - } - - late final _CUPHTTPSendMessagePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - Dart_Port)>>('CUPHTTPSendMessage'); - late final _CUPHTTPSendMessage = _CUPHTTPSendMessagePtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - void CUPHTTPReceiveMessage( - ffi.Pointer task, - int sendPort, - ) { - return _CUPHTTPReceiveMessage( - task, - sendPort, - ); - } - - late final _CUPHTTPReceiveMessagePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, Dart_Port)>>('CUPHTTPReceiveMessage'); - late final _CUPHTTPReceiveMessage = _CUPHTTPReceiveMessagePtr.asFunction< - void Function(ffi.Pointer, int)>(); } class __mbstate_t extends ffi.Union { @@ -58754,3226 +58362,4083 @@ class _opaque_pthread_t extends ffi.Struct { external ffi.Array __opaque; } -abstract class idtype_t { - static const int P_ALL = 0; - static const int P_PID = 1; - static const int P_PGID = 2; +@ffi.Packed(1) +class _OSUnalignedU16 extends ffi.Struct { + @ffi.Uint16() + external int __val; } -class __darwin_arm_exception_state extends ffi.Struct { - @__uint32_t() - external int __exception; - - @__uint32_t() - external int __fsr; - - @__uint32_t() - external int __far; +@ffi.Packed(1) +class _OSUnalignedU32 extends ffi.Struct { + @ffi.Uint32() + external int __val; } -typedef __uint32_t = ffi.UnsignedInt; - -class __darwin_arm_exception_state64 extends ffi.Struct { - @__uint64_t() - external int __far; - - @__uint32_t() - external int __esr; +@ffi.Packed(1) +class _OSUnalignedU64 extends ffi.Struct { + @ffi.Uint64() + external int __val; +} - @__uint32_t() - external int __exception; +class fd_set extends ffi.Struct { + @ffi.Array.multi([32]) + external ffi.Array<__int32_t> fds_bits; } -typedef __uint64_t = ffi.UnsignedLongLong; +typedef __int32_t = ffi.Int; -class __darwin_arm_thread_state extends ffi.Struct { - @ffi.Array.multi([13]) - external ffi.Array<__uint32_t> __r; +class objc_class extends ffi.Opaque {} - @__uint32_t() - external int __sp; +class objc_object extends ffi.Struct { + external ffi.Pointer isa; +} - @__uint32_t() - external int __lr; +class ObjCObject extends ffi.Opaque {} - @__uint32_t() - external int __pc; +class objc_selector extends ffi.Opaque {} - @__uint32_t() - external int __cpsr; -} +class ObjCSel extends ffi.Opaque {} -class __darwin_arm_thread_state64 extends ffi.Struct { - @ffi.Array.multi([29]) - external ffi.Array<__uint64_t> __x; +typedef objc_objectptr_t = ffi.Pointer; - @__uint64_t() - external int __fp; +class _NSZone extends ffi.Opaque {} - @__uint64_t() - external int __lr; +class _ObjCWrapper implements ffi.Finalizable { + final ffi.Pointer _id; + final NativeCupertinoHttp _lib; + bool _pendingRelease; - @__uint64_t() - external int __sp; + _ObjCWrapper._(this._id, this._lib, + {bool retain = false, bool release = false}) + : _pendingRelease = release { + if (retain) { + _lib._objc_retain(_id.cast()); + } + if (release) { + _lib._objc_releaseFinalizer2.attach(this, _id.cast(), detach: this); + } + } - @__uint64_t() - external int __pc; + /// Releases the reference to the underlying ObjC object held by this wrapper. + /// Throws a StateError if this wrapper doesn't currently hold a reference. + void release() { + if (_pendingRelease) { + _pendingRelease = false; + _lib._objc_release(_id.cast()); + _lib._objc_releaseFinalizer2.detach(this); + } else { + throw StateError( + 'Released an ObjC object that was unowned or already released.'); + } + } - @__uint32_t() - external int __cpsr; + @override + bool operator ==(Object other) { + return other is _ObjCWrapper && _id == other._id; + } - @__uint32_t() - external int __pad; + @override + int get hashCode => _id.hashCode; } -class __darwin_arm_vfp_state extends ffi.Struct { - @ffi.Array.multi([64]) - external ffi.Array<__uint32_t> __r; +class NSObject extends _ObjCWrapper { + NSObject._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @__uint32_t() - external int __fpscr; -} + /// Returns a [NSObject] that points to the same underlying object as [other]. + static NSObject castFrom(T other) { + return NSObject._(other._id, other._lib, retain: true, release: true); + } -class __darwin_arm_neon_state64 extends ffi.Opaque {} + /// Returns a [NSObject] that wraps the given raw object pointer. + static NSObject castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSObject._(other, lib, retain: retain, release: release); + } -class __darwin_arm_neon_state extends ffi.Opaque {} + /// Returns whether [obj] is an instance of [NSObject]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); + } -class __arm_pagein_state extends ffi.Struct { - @ffi.Int() - external int __pagein_error; -} + static void load(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); + } -class __arm_legacy_debug_state extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bvr; + static void initialize(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bcr; + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wvr; + static NSObject new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); + return NSObject._(_ret, _lib, retain: false, release: true); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wcr; -} + static NSObject allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } -class __darwin_arm_debug_state32 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bvr; + static NSObject alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); + return NSObject._(_ret, _lib, retain: false, release: true); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bcr; + void dealloc() { + return _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wvr; + void finalize() { + return _lib._objc_msgSend_1(_id, _lib._sel_finalize1); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wcr; + NSObject copy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); + return NSObject._(_ret, _lib, retain: false, release: true); + } - @__uint64_t() - external int __mdscr_el1; -} + NSObject mutableCopy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); + return NSObject._(_ret, _lib, retain: false, release: true); + } -class __darwin_arm_debug_state64 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __bvr; + static NSObject copyWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __bcr; + static NSObject mutableCopyWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __wvr; + static bool instancesRespondToSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_4(_lib._class_NSObject1, + _lib._sel_instancesRespondToSelector_1, aSelector); + } - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __wcr; + static bool conformsToProtocol_( + NativeCupertinoHttp _lib, Protocol? protocol) { + return _lib._objc_msgSend_5(_lib._class_NSObject1, + _lib._sel_conformsToProtocol_1, protocol?._id ?? ffi.nullptr); + } - @__uint64_t() - external int __mdscr_el1; -} + IMP methodForSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); + } -class __darwin_arm_cpmu_state64 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __ctrs; -} + static IMP instanceMethodForSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_lib._class_NSObject1, + _lib._sel_instanceMethodForSelector_1, aSelector); + } -class __darwin_mcontext32 extends ffi.Struct { - external __darwin_arm_exception_state __es; + void doesNotRecognizeSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_7( + _id, _lib._sel_doesNotRecognizeSelector_1, aSelector); + } - external __darwin_arm_thread_state __ss; + NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_8( + _id, _lib._sel_forwardingTargetForSelector_1, aSelector); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external __darwin_arm_vfp_state __fs; -} + void forwardInvocation_(NSInvocation? anInvocation) { + return _lib._objc_msgSend_9( + _id, _lib._sel_forwardInvocation_1, anInvocation?._id ?? ffi.nullptr); + } -class __darwin_mcontext64 extends ffi.Opaque {} + NSMethodSignature methodSignatureForSelector_( + ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_10( + _id, _lib._sel_methodSignatureForSelector_1, aSelector); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); + } -class __darwin_sigaltstack extends ffi.Struct { - external ffi.Pointer ss_sp; + static NSMethodSignature instanceMethodSignatureForSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_10(_lib._class_NSObject1, + _lib._sel_instanceMethodSignatureForSelector_1, aSelector); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); + } - @__darwin_size_t() - external int ss_size; + bool allowsWeakReference() { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsWeakReference1); + } - @ffi.Int() - external int ss_flags; -} + bool retainWeakReference() { + return _lib._objc_msgSend_11(_id, _lib._sel_retainWeakReference1); + } -typedef __darwin_size_t = ffi.UnsignedLong; + static bool isSubclassOfClass_(NativeCupertinoHttp _lib, NSObject aClass) { + return _lib._objc_msgSend_0( + _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); + } -class __darwin_ucontext extends ffi.Struct { - @ffi.Int() - external int uc_onstack; + static bool resolveClassMethod_( + NativeCupertinoHttp _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); + } - @__darwin_sigset_t() - external int uc_sigmask; + static bool resolveInstanceMethod_( + NativeCupertinoHttp _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); + } - external __darwin_sigaltstack uc_stack; + static int hash(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); + } - external ffi.Pointer<__darwin_ucontext> uc_link; + static NSObject superclass(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @__darwin_size_t() - external int uc_mcsize; + static NSObject class1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer<__darwin_mcontext64> uc_mcontext; -} + static NSString description(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_32(_lib._class_NSObject1, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); + } -typedef __darwin_sigset_t = __uint32_t; + static NSString debugDescription(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_32( + _lib._class_NSObject1, _lib._sel_debugDescription1); + return NSString._(_ret, _lib, retain: true, release: true); + } -class sigval extends ffi.Union { - @ffi.Int() - external int sival_int; + static int version(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_81(_lib._class_NSObject1, _lib._sel_version1); + } - external ffi.Pointer sival_ptr; -} + static void setVersion_(NativeCupertinoHttp _lib, int aVersion) { + return _lib._objc_msgSend_275( + _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); + } -class sigevent extends ffi.Struct { - @ffi.Int() - external int sigev_notify; + NSObject get classForCoder { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Int() - external int sigev_signo; + NSObject replacementObjectForCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_replacementObjectForCoder_1, coder?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external sigval sigev_value; + NSObject awakeAfterUsingCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_awakeAfterUsingCoder_1, coder?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: false, release: true); + } - external ffi.Pointer> - sigev_notify_function; + static void poseAsClass_(NativeCupertinoHttp _lib, NSObject aClass) { + return _lib._objc_msgSend_200( + _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); + } - external ffi.Pointer sigev_notify_attributes; -} + NSObject get autoContentAccessingProxy { + final _ret = + _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); + return NSObject._(_ret, _lib, retain: true, release: true); + } -typedef pthread_attr_t = __darwin_pthread_attr_t; -typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; + void URL_resourceDataDidBecomeAvailable_(NSURL? sender, NSData? newBytes) { + return _lib._objc_msgSend_276( + _id, + _lib._sel_URL_resourceDataDidBecomeAvailable_1, + sender?._id ?? ffi.nullptr, + newBytes?._id ?? ffi.nullptr); + } -class __siginfo extends ffi.Struct { - @ffi.Int() - external int si_signo; + void URLResourceDidFinishLoading_(NSURL? sender) { + return _lib._objc_msgSend_277(_id, _lib._sel_URLResourceDidFinishLoading_1, + sender?._id ?? ffi.nullptr); + } - @ffi.Int() - external int si_errno; + void URLResourceDidCancelLoading_(NSURL? sender) { + return _lib._objc_msgSend_277(_id, _lib._sel_URLResourceDidCancelLoading_1, + sender?._id ?? ffi.nullptr); + } - @ffi.Int() - external int si_code; + void URL_resourceDidFailLoadingWithReason_(NSURL? sender, NSString? reason) { + return _lib._objc_msgSend_278( + _id, + _lib._sel_URL_resourceDidFailLoadingWithReason_1, + sender?._id ?? ffi.nullptr, + reason?._id ?? ffi.nullptr); + } - @pid_t() - external int si_pid; + /// Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: + /// + /// - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; + /// + /// The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. + void + attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( + NSError? error, + int recoveryOptionIndex, + NSObject delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo) { + return _lib._objc_msgSend_279( + _id, + _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, + error?._id ?? ffi.nullptr, + recoveryOptionIndex, + delegate._id, + didRecoverSelector, + contextInfo); + } - @uid_t() - external int si_uid; + /// Given that an error alert has been presented applicaton-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and return YES if error recovery was completely successful, NO otherwise. The recovery option index is an index into the error's array of localized recovery options. + bool attemptRecoveryFromError_optionIndex_( + NSError? error, int recoveryOptionIndex) { + return _lib._objc_msgSend_280( + _id, + _lib._sel_attemptRecoveryFromError_optionIndex_1, + error?._id ?? ffi.nullptr, + recoveryOptionIndex); + } +} - @ffi.Int() - external int si_status; +typedef instancetype = ffi.Pointer; - external ffi.Pointer si_addr; +class Protocol extends _ObjCWrapper { + Protocol._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external sigval si_value; + /// Returns a [Protocol] that points to the same underlying object as [other]. + static Protocol castFrom(T other) { + return Protocol._(other._id, other._lib, retain: true, release: true); + } - @ffi.Long() - external int si_band; + /// Returns a [Protocol] that wraps the given raw object pointer. + static Protocol castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return Protocol._(other, lib, retain: retain, release: release); + } - @ffi.Array.multi([7]) - external ffi.Array __pad; + /// Returns whether [obj] is an instance of [Protocol]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); + } } -typedef pid_t = __darwin_pid_t; -typedef __darwin_pid_t = __int32_t; -typedef __int32_t = ffi.Int; -typedef uid_t = __darwin_uid_t; -typedef __darwin_uid_t = __uint32_t; - -class __sigaction_u extends ffi.Union { - external ffi.Pointer> - __sa_handler; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer)>> - __sa_sigaction; -} +typedef IMP = ffi.Pointer>; -class __sigaction extends ffi.Struct { - external __sigaction_u __sigaction_u1; +class NSInvocation extends _ObjCWrapper { + NSInvocation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer, ffi.Pointer)>> sa_tramp; + /// Returns a [NSInvocation] that points to the same underlying object as [other]. + static NSInvocation castFrom(T other) { + return NSInvocation._(other._id, other._lib, retain: true, release: true); + } - @sigset_t() - external int sa_mask; + /// Returns a [NSInvocation] that wraps the given raw object pointer. + static NSInvocation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInvocation._(other, lib, retain: retain, release: release); + } - @ffi.Int() - external int sa_flags; + /// Returns whether [obj] is an instance of [NSInvocation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInvocation1); + } } -typedef siginfo_t = __siginfo; -typedef sigset_t = __darwin_sigset_t; +class NSMethodSignature extends _ObjCWrapper { + NSMethodSignature._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class sigaction extends ffi.Struct { - external __sigaction_u __sigaction_u1; + /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. + static NSMethodSignature castFrom(T other) { + return NSMethodSignature._(other._id, other._lib, + retain: true, release: true); + } - @sigset_t() - external int sa_mask; + /// Returns a [NSMethodSignature] that wraps the given raw object pointer. + static NSMethodSignature castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMethodSignature._(other, lib, retain: retain, release: release); + } - @ffi.Int() - external int sa_flags; + /// Returns whether [obj] is an instance of [NSMethodSignature]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMethodSignature1); + } } -class sigvec extends ffi.Struct { - external ffi.Pointer> - sv_handler; +typedef NSUInteger = ffi.UnsignedLong; - @ffi.Int() - external int sv_mask; +class NSString extends NSObject { + NSString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Int() - external int sv_flags; -} + /// Returns a [NSString] that points to the same underlying object as [other]. + static NSString castFrom(T other) { + return NSString._(other._id, other._lib, retain: true, release: true); + } -class sigstack extends ffi.Struct { - external ffi.Pointer ss_sp; + /// Returns a [NSString] that wraps the given raw object pointer. + static NSString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSString._(other, lib, retain: retain, release: release); + } - @ffi.Int() - external int ss_onstack; -} + /// Returns whether [obj] is an instance of [NSString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); + } -class timeval extends ffi.Struct { - @__darwin_time_t() - external int tv_sec; + factory NSString(NativeCupertinoHttp _lib, String str) { + final cstr = str.toNativeUtf16(); + final nsstr = stringWithCharacters_length_(_lib, cstr.cast(), str.length); + pkg_ffi.calloc.free(cstr); + return nsstr; + } - @__darwin_suseconds_t() - external int tv_usec; -} + @override + String toString() { + final data = + dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); + return data.bytes.cast().toDartString(length: length); + } -typedef __darwin_time_t = ffi.Long; -typedef __darwin_suseconds_t = __int32_t; + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); + } -class rusage extends ffi.Struct { - external timeval ru_utime; + int characterAtIndex_(int index) { + return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); + } - external timeval ru_stime; + @override + NSString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Long() - external int ru_maxrss; + NSString initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Long() - external int ru_ixrss; + NSString substringFromIndex_(int from) { + final _ret = + _lib._objc_msgSend_15(_id, _lib._sel_substringFromIndex_1, from); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Long() - external int ru_idrss; + NSString substringToIndex_(int to) { + final _ret = _lib._objc_msgSend_15(_id, _lib._sel_substringToIndex_1, to); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Long() - external int ru_isrss; + NSString substringWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_16(_id, _lib._sel_substringWithRange_1, range); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Long() - external int ru_minflt; + void getCharacters_range_(ffi.Pointer buffer, NSRange range) { + return _lib._objc_msgSend_17( + _id, _lib._sel_getCharacters_range_1, buffer, range); + } - @ffi.Long() - external int ru_majflt; + int compare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_compare_1, string?._id ?? ffi.nullptr); + } - @ffi.Long() - external int ru_nswap; + int compare_options_(NSString? string, int mask) { + return _lib._objc_msgSend_19( + _id, _lib._sel_compare_options_1, string?._id ?? ffi.nullptr, mask); + } - @ffi.Long() - external int ru_inblock; + int compare_options_range_( + NSString? string, int mask, NSRange rangeOfReceiverToCompare) { + return _lib._objc_msgSend_20(_id, _lib._sel_compare_options_range_1, + string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare); + } - @ffi.Long() - external int ru_oublock; + int compare_options_range_locale_(NSString? string, int mask, + NSRange rangeOfReceiverToCompare, NSObject locale) { + return _lib._objc_msgSend_21(_id, _lib._sel_compare_options_range_locale_1, + string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare, locale._id); + } - @ffi.Long() - external int ru_msgsnd; + int caseInsensitiveCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_caseInsensitiveCompare_1, string?._id ?? ffi.nullptr); + } - @ffi.Long() - external int ru_msgrcv; + int localizedCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_localizedCompare_1, string?._id ?? ffi.nullptr); + } - @ffi.Long() - external int ru_nsignals; + int localizedCaseInsensitiveCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, + _lib._sel_localizedCaseInsensitiveCompare_1, + string?._id ?? ffi.nullptr); + } - @ffi.Long() - external int ru_nvcsw; + int localizedStandardCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_localizedStandardCompare_1, string?._id ?? ffi.nullptr); + } - @ffi.Long() - external int ru_nivcsw; -} + bool isEqualToString_(NSString? aString) { + return _lib._objc_msgSend_22( + _id, _lib._sel_isEqualToString_1, aString?._id ?? ffi.nullptr); + } -class rusage_info_v0 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; + bool hasPrefix_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_hasPrefix_1, str?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_user_time; + bool hasSuffix_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_hasSuffix_1, str?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_system_time; + NSString commonPrefixWithString_options_(NSString? str, int mask) { + final _ret = _lib._objc_msgSend_23( + _id, + _lib._sel_commonPrefixWithString_options_1, + str?._id ?? ffi.nullptr, + mask); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + bool containsString_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_containsString_1, str?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_interrupt_wkups; + bool localizedCaseInsensitiveContainsString_(NSString? str) { + return _lib._objc_msgSend_22( + _id, + _lib._sel_localizedCaseInsensitiveContainsString_1, + str?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_pageins; + bool localizedStandardContainsString_(NSString? str) { + return _lib._objc_msgSend_22(_id, + _lib._sel_localizedStandardContainsString_1, str?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_wired_size; + NSRange localizedStandardRangeOfString_(NSString? str) { + return _lib._objc_msgSend_24(_id, + _lib._sel_localizedStandardRangeOfString_1, str?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_resident_size; + NSRange rangeOfString_(NSString? searchString) { + return _lib._objc_msgSend_24( + _id, _lib._sel_rangeOfString_1, searchString?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_phys_footprint; + NSRange rangeOfString_options_(NSString? searchString, int mask) { + return _lib._objc_msgSend_25(_id, _lib._sel_rangeOfString_options_1, + searchString?._id ?? ffi.nullptr, mask); + } - @ffi.Uint64() - external int ri_proc_start_abstime; + NSRange rangeOfString_options_range_( + NSString? searchString, int mask, NSRange rangeOfReceiverToSearch) { + return _lib._objc_msgSend_26(_id, _lib._sel_rangeOfString_options_range_1, + searchString?._id ?? ffi.nullptr, mask, rangeOfReceiverToSearch); + } - @ffi.Uint64() - external int ri_proc_exit_abstime; -} + NSRange rangeOfString_options_range_locale_(NSString? searchString, int mask, + NSRange rangeOfReceiverToSearch, NSLocale? locale) { + return _lib._objc_msgSend_27( + _id, + _lib._sel_rangeOfString_options_range_locale_1, + searchString?._id ?? ffi.nullptr, + mask, + rangeOfReceiverToSearch, + locale?._id ?? ffi.nullptr); + } -class rusage_info_v1 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; + NSRange rangeOfCharacterFromSet_(NSCharacterSet? searchSet) { + return _lib._objc_msgSend_228(_id, _lib._sel_rangeOfCharacterFromSet_1, + searchSet?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_user_time; + NSRange rangeOfCharacterFromSet_options_( + NSCharacterSet? searchSet, int mask) { + return _lib._objc_msgSend_229( + _id, + _lib._sel_rangeOfCharacterFromSet_options_1, + searchSet?._id ?? ffi.nullptr, + mask); + } - @ffi.Uint64() - external int ri_system_time; + NSRange rangeOfCharacterFromSet_options_range_( + NSCharacterSet? searchSet, int mask, NSRange rangeOfReceiverToSearch) { + return _lib._objc_msgSend_230( + _id, + _lib._sel_rangeOfCharacterFromSet_options_range_1, + searchSet?._id ?? ffi.nullptr, + mask, + rangeOfReceiverToSearch); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + NSRange rangeOfComposedCharacterSequenceAtIndex_(int index) { + return _lib._objc_msgSend_231( + _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); + } - @ffi.Uint64() - external int ri_interrupt_wkups; + NSRange rangeOfComposedCharacterSequencesForRange_(NSRange range) { + return _lib._objc_msgSend_232( + _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); + } - @ffi.Uint64() - external int ri_pageins; + NSString stringByAppendingString_(NSString? aString) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_stringByAppendingString_1, aString?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_wired_size; + NSString stringByAppendingFormat_(NSString? format) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_stringByAppendingFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_resident_size; + double get doubleValue { + return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); + } - @ffi.Uint64() - external int ri_phys_footprint; + double get floatValue { + return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); + } - @ffi.Uint64() - external int ri_proc_start_abstime; + int get intValue { + return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); + } - @ffi.Uint64() - external int ri_proc_exit_abstime; + int get integerValue { + return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); + } - @ffi.Uint64() - external int ri_child_user_time; + int get longLongValue { + return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); + } - @ffi.Uint64() - external int ri_child_system_time; + bool get boolValue { + return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); + } - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + NSString? get uppercaseString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_uppercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_interrupt_wkups; + NSString? get lowercaseString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lowercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_pageins; + NSString? get capitalizedString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_capitalizedString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_elapsed_abstime; -} + NSString? get localizedUppercaseString { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedUppercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -class rusage_info_v2 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; + NSString? get localizedLowercaseString { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedLowercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_user_time; + NSString? get localizedCapitalizedString { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedCapitalizedString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_system_time; - - @ffi.Uint64() - external int ri_pkg_idle_wkups; + NSString uppercaseStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_233( + _id, _lib._sel_uppercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_interrupt_wkups; + NSString lowercaseStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_233( + _id, _lib._sel_lowercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_pageins; + NSString capitalizedStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_233(_id, + _lib._sel_capitalizedStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_wired_size; + void getLineStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range) { + return _lib._objc_msgSend_234( + _id, + _lib._sel_getLineStart_end_contentsEnd_forRange_1, + startPtr, + lineEndPtr, + contentsEndPtr, + range); + } - @ffi.Uint64() - external int ri_resident_size; + NSRange lineRangeForRange_(NSRange range) { + return _lib._objc_msgSend_232(_id, _lib._sel_lineRangeForRange_1, range); + } - @ffi.Uint64() - external int ri_phys_footprint; + void getParagraphStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer parEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range) { + return _lib._objc_msgSend_234( + _id, + _lib._sel_getParagraphStart_end_contentsEnd_forRange_1, + startPtr, + parEndPtr, + contentsEndPtr, + range); + } - @ffi.Uint64() - external int ri_proc_start_abstime; + NSRange paragraphRangeForRange_(NSRange range) { + return _lib._objc_msgSend_232( + _id, _lib._sel_paragraphRangeForRange_1, range); + } - @ffi.Uint64() - external int ri_proc_exit_abstime; + void enumerateSubstringsInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock13 block) { + return _lib._objc_msgSend_235( + _id, + _lib._sel_enumerateSubstringsInRange_options_usingBlock_1, + range, + opts, + block._id); + } - @ffi.Uint64() - external int ri_child_user_time; + void enumerateLinesUsingBlock_(ObjCBlock14 block) { + return _lib._objc_msgSend_236( + _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); + } - @ffi.Uint64() - external int ri_child_system_time; + ffi.Pointer get UTF8String { + return _lib._objc_msgSend_53(_id, _lib._sel_UTF8String1); + } - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + int get fastestEncoding { + return _lib._objc_msgSend_12(_id, _lib._sel_fastestEncoding1); + } - @ffi.Uint64() - external int ri_child_interrupt_wkups; + int get smallestEncoding { + return _lib._objc_msgSend_12(_id, _lib._sel_smallestEncoding1); + } - @ffi.Uint64() - external int ri_child_pageins; + NSData dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { + final _ret = _lib._objc_msgSend_237(_id, + _lib._sel_dataUsingEncoding_allowLossyConversion_1, encoding, lossy); + return NSData._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_elapsed_abstime; + NSData dataUsingEncoding_(int encoding) { + final _ret = + _lib._objc_msgSend_238(_id, _lib._sel_dataUsingEncoding_1, encoding); + return NSData._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_diskio_bytesread; + bool canBeConvertedToEncoding_(int encoding) { + return _lib._objc_msgSend_117( + _id, _lib._sel_canBeConvertedToEncoding_1, encoding); + } - @ffi.Uint64() - external int ri_diskio_byteswritten; -} + ffi.Pointer cStringUsingEncoding_(int encoding) { + return _lib._objc_msgSend_239( + _id, _lib._sel_cStringUsingEncoding_1, encoding); + } -class rusage_info_v3 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; + bool getCString_maxLength_encoding_( + ffi.Pointer buffer, int maxBufferCount, int encoding) { + return _lib._objc_msgSend_240( + _id, + _lib._sel_getCString_maxLength_encoding_1, + buffer, + maxBufferCount, + encoding); + } - @ffi.Uint64() - external int ri_user_time; + bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, + NSRange range, + NSRangePointer leftover) { + return _lib._objc_msgSend_241( + _id, + _lib._sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, + range, + leftover); + } - @ffi.Uint64() - external int ri_system_time; + int maximumLengthOfBytesUsingEncoding_(int enc) { + return _lib._objc_msgSend_114( + _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + int lengthOfBytesUsingEncoding_(int enc) { + return _lib._objc_msgSend_114( + _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); + } - @ffi.Uint64() - external int ri_interrupt_wkups; + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSString1, _lib._sel_availableStringEncodings1); + } - @ffi.Uint64() - external int ri_pageins; + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_wired_size; + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); + } - @ffi.Uint64() - external int ri_resident_size; + NSString? get decomposedStringWithCanonicalMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_decomposedStringWithCanonicalMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_phys_footprint; + NSString? get precomposedStringWithCanonicalMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_precomposedStringWithCanonicalMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_proc_start_abstime; + NSString? get decomposedStringWithCompatibilityMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_decomposedStringWithCompatibilityMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_proc_exit_abstime; + NSString? get precomposedStringWithCompatibilityMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_precomposedStringWithCompatibilityMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_user_time; + NSArray componentsSeparatedByString_(NSString? separator) { + final _ret = _lib._objc_msgSend_159(_id, + _lib._sel_componentsSeparatedByString_1, separator?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_system_time; + NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet? separator) { + final _ret = _lib._objc_msgSend_243( + _id, + _lib._sel_componentsSeparatedByCharactersInSet_1, + separator?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + NSString stringByTrimmingCharactersInSet_(NSCharacterSet? set) { + final _ret = _lib._objc_msgSend_244(_id, + _lib._sel_stringByTrimmingCharactersInSet_1, set?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_interrupt_wkups; + NSString stringByPaddingToLength_withString_startingAtIndex_( + int newLength, NSString? padString, int padIndex) { + final _ret = _lib._objc_msgSend_245( + _id, + _lib._sel_stringByPaddingToLength_withString_startingAtIndex_1, + newLength, + padString?._id ?? ffi.nullptr, + padIndex); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_pageins; + NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { + final _ret = _lib._objc_msgSend_246( + _id, + _lib._sel_stringByFoldingWithOptions_locale_1, + options, + locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_elapsed_abstime; + NSString stringByReplacingOccurrencesOfString_withString_options_range_( + NSString? target, + NSString? replacement, + int options, + NSRange searchRange) { + final _ret = _lib._objc_msgSend_247( + _id, + _lib._sel_stringByReplacingOccurrencesOfString_withString_options_range_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr, + options, + searchRange); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_diskio_bytesread; + NSString stringByReplacingOccurrencesOfString_withString_( + NSString? target, NSString? replacement) { + final _ret = _lib._objc_msgSend_248( + _id, + _lib._sel_stringByReplacingOccurrencesOfString_withString_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_diskio_byteswritten; + NSString stringByReplacingCharactersInRange_withString_( + NSRange range, NSString? replacement) { + final _ret = _lib._objc_msgSend_249( + _id, + _lib._sel_stringByReplacingCharactersInRange_withString_1, + range, + replacement?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_default; + NSString stringByApplyingTransform_reverse_( + NSStringTransform transform, bool reverse) { + final _ret = _lib._objc_msgSend_250( + _id, _lib._sel_stringByApplyingTransform_reverse_1, transform, reverse); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; + bool writeToURL_atomically_encoding_error_(NSURL? url, bool useAuxiliaryFile, + int enc, ffi.Pointer> error) { + return _lib._objc_msgSend_251( + _id, + _lib._sel_writeToURL_atomically_encoding_error_1, + url?._id ?? ffi.nullptr, + useAuxiliaryFile, + enc, + error); + } - @ffi.Uint64() - external int ri_cpu_time_qos_background; + bool writeToFile_atomically_encoding_error_( + NSString? path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error) { + return _lib._objc_msgSend_252( + _id, + _lib._sel_writeToFile_atomically_encoding_error_1, + path?._id ?? ffi.nullptr, + useAuxiliaryFile, + enc, + error); + } - @ffi.Uint64() - external int ri_cpu_time_qos_utility; + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; + int get hash { + return _lib._objc_msgSend_12(_id, _lib._sel_hash1); + } - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; + NSString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, int length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_253( + _id, + _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, + characters, + length, + freeBuffer); + return NSString._(_ret, _lib, retain: false, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; + NSString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, int len, ObjCBlock15 deallocator) { + final _ret = _lib._objc_msgSend_254( + _id, + _lib._sel_initWithCharactersNoCopy_length_deallocator_1, + chars, + len, + deallocator._id); + return NSString._(_ret, _lib, retain: false, release: true); + } - @ffi.Uint64() - external int ri_billed_system_time; + NSString initWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255( + _id, _lib._sel_initWithCharacters_length_1, characters, length); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_serviced_system_time; -} + NSString initWithUTF8String_(ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256( + _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); + return NSString._(_ret, _lib, retain: true, release: true); + } -class rusage_info_v4 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; + NSString initWithString_(NSString? aString) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, aString?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_user_time; + NSString initWithFormat_(NSString? format) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_system_time; + NSString initWithFormat_arguments_(NSString? format, va_list argList) { + final _ret = _lib._objc_msgSend_257( + _id, + _lib._sel_initWithFormat_arguments_1, + format?._id ?? ffi.nullptr, + argList); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + NSString initWithFormat_locale_(NSString? format, NSObject locale) { + final _ret = _lib._objc_msgSend_258(_id, _lib._sel_initWithFormat_locale_1, + format?._id ?? ffi.nullptr, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_interrupt_wkups; + NSString initWithFormat_locale_arguments_( + NSString? format, NSObject locale, va_list argList) { + final _ret = _lib._objc_msgSend_259( + _id, + _lib._sel_initWithFormat_locale_arguments_1, + format?._id ?? ffi.nullptr, + locale._id, + argList); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_pageins; + NSString initWithData_encoding_(NSData? data, int encoding) { + final _ret = _lib._objc_msgSend_260(_id, _lib._sel_initWithData_encoding_1, + data?._id ?? ffi.nullptr, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_wired_size; + NSString initWithBytes_length_encoding_( + ffi.Pointer bytes, int len, int encoding) { + final _ret = _lib._objc_msgSend_261( + _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_resident_size; + NSString initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { + final _ret = _lib._objc_msgSend_262( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, + bytes, + len, + encoding, + freeBuffer); + return NSString._(_ret, _lib, retain: false, release: true); + } - @ffi.Uint64() - external int ri_phys_footprint; + NSString initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + int len, + int encoding, + ObjCBlock12 deallocator) { + final _ret = _lib._objc_msgSend_263( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, + bytes, + len, + encoding, + deallocator._id); + return NSString._(_ret, _lib, retain: false, release: true); + } - @ffi.Uint64() - external int ri_proc_start_abstime; + static NSString string(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_string1); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_proc_exit_abstime; + static NSString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_user_time; + static NSString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_system_time; + static NSString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_child_interrupt_wkups; + static NSString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_pageins; + static NSString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_elapsed_abstime; + NSString initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, int encoding) { + final _ret = _lib._objc_msgSend_264(_id, + _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_diskio_bytesread; + static NSString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_diskio_byteswritten; + NSString initWithContentsOfURL_encoding_error_( + NSURL? url, int enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_265( + _id, + _lib._sel_initWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_default; + NSString initWithContentsOfFile_encoding_error_( + NSString? path, int enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_266( + _id, + _lib._sel_initWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; + static NSString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_265( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_background; + static NSString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_266( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_utility; + NSString initWithContentsOfURL_usedEncoding_error_( + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_267( + _id, + _lib._sel_initWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; + NSString initWithContentsOfFile_usedEncoding_error_( + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_268( + _id, + _lib._sel_initWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; + static NSString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_267( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; + static NSString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_268( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_billed_system_time; + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_269( + _lib._class_NSString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } - @ffi.Uint64() - external int ri_serviced_system_time; + NSObject propertyList() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_logical_writes; + NSDictionary propertyListFromStringsFileFormat() { + final _ret = _lib._objc_msgSend_180( + _id, _lib._sel_propertyListFromStringsFileFormat1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_lifetime_max_phys_footprint; + ffi.Pointer cString() { + return _lib._objc_msgSend_53(_id, _lib._sel_cString1); + } - @ffi.Uint64() - external int ri_instructions; + ffi.Pointer lossyCString() { + return _lib._objc_msgSend_53(_id, _lib._sel_lossyCString1); + } - @ffi.Uint64() - external int ri_cycles; + int cStringLength() { + return _lib._objc_msgSend_12(_id, _lib._sel_cStringLength1); + } - @ffi.Uint64() - external int ri_billed_energy; + void getCString_(ffi.Pointer bytes) { + return _lib._objc_msgSend_270(_id, _lib._sel_getCString_1, bytes); + } - @ffi.Uint64() - external int ri_serviced_energy; + void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { + return _lib._objc_msgSend_271( + _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); + } - @ffi.Uint64() - external int ri_interval_max_phys_footprint; + void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, + int maxLength, NSRange aRange, NSRangePointer leftoverRange) { + return _lib._objc_msgSend_272( + _id, + _lib._sel_getCString_maxLength_range_remainingRange_1, + bytes, + maxLength, + aRange, + leftoverRange); + } - @ffi.Uint64() - external int ri_runnable_time; -} + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } -class rusage_info_v5 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } - @ffi.Uint64() - external int ri_user_time; + NSObject initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_system_time; + NSObject initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_interrupt_wkups; + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_pageins; + NSObject initWithCStringNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_273( + _id, + _lib._sel_initWithCStringNoCopy_length_freeWhenDone_1, + bytes, + length, + freeBuffer); + return NSObject._(_ret, _lib, retain: false, release: true); + } - @ffi.Uint64() - external int ri_wired_size; + NSObject initWithCString_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_264( + _id, _lib._sel_initWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_resident_size; + NSObject initWithCString_(ffi.Pointer bytes) { + final _ret = + _lib._objc_msgSend_256(_id, _lib._sel_initWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_phys_footprint; + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_proc_start_abstime; + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_proc_exit_abstime; + void getCharacters_(ffi.Pointer buffer) { + return _lib._objc_msgSend_274(_id, _lib._sel_getCharacters_1, buffer); + } - @ffi.Uint64() - external int ri_child_user_time; + /// Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode an URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. + NSString stringByAddingPercentEncodingWithAllowedCharacters_( + NSCharacterSet? allowedCharacters) { + final _ret = _lib._objc_msgSend_244( + _id, + _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, + allowedCharacters?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_system_time; + /// Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. + NSString? get stringByRemovingPercentEncoding { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_stringByRemovingPercentEncoding1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + NSString stringByAddingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_15( + _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_interrupt_wkups; + NSString stringByReplacingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_15( + _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_pageins; + static NSString new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); + return NSString._(_ret, _lib, retain: false, release: true); + } - @ffi.Uint64() - external int ri_child_elapsed_abstime; + static NSString alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); + return NSString._(_ret, _lib, retain: false, release: true); + } +} - @ffi.Uint64() - external int ri_diskio_bytesread; +extension StringToNSString on String { + NSString toNSString(NativeCupertinoHttp lib) => NSString(lib, this); +} - @ffi.Uint64() - external int ri_diskio_byteswritten; +typedef unichar = ffi.UnsignedShort; - @ffi.Uint64() - external int ri_cpu_time_qos_default; +class NSCoder extends _ObjCWrapper { + NSCoder._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; + /// Returns a [NSCoder] that points to the same underlying object as [other]. + static NSCoder castFrom(T other) { + return NSCoder._(other._id, other._lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_background; + /// Returns a [NSCoder] that wraps the given raw object pointer. + static NSCoder castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCoder._(other, lib, retain: retain, release: release); + } - @ffi.Uint64() - external int ri_cpu_time_qos_utility; + /// Returns whether [obj] is an instance of [NSCoder]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); + } +} - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; +typedef NSRange = _NSRange; - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; +class _NSRange extends ffi.Struct { + @NSUInteger() + external int location; - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; + @NSUInteger() + external int length; +} - @ffi.Uint64() - external int ri_billed_system_time; +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; +} - @ffi.Uint64() - external int ri_serviced_system_time; +abstract class NSStringCompareOptions { + static const int NSCaseInsensitiveSearch = 1; + static const int NSLiteralSearch = 2; + static const int NSBackwardsSearch = 4; + static const int NSAnchoredSearch = 8; + static const int NSNumericSearch = 64; + static const int NSDiacriticInsensitiveSearch = 128; + static const int NSWidthInsensitiveSearch = 256; + static const int NSForcedOrderingSearch = 512; + static const int NSRegularExpressionSearch = 1024; +} - @ffi.Uint64() - external int ri_logical_writes; +class NSLocale extends _ObjCWrapper { + NSLocale._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Uint64() - external int ri_lifetime_max_phys_footprint; + /// Returns a [NSLocale] that points to the same underlying object as [other]. + static NSLocale castFrom(T other) { + return NSLocale._(other._id, other._lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_instructions; + /// Returns a [NSLocale] that wraps the given raw object pointer. + static NSLocale castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSLocale._(other, lib, retain: retain, release: release); + } - @ffi.Uint64() - external int ri_cycles; + /// Returns whether [obj] is an instance of [NSLocale]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLocale1); + } +} - @ffi.Uint64() - external int ri_billed_energy; +class NSCharacterSet extends NSObject { + NSCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Uint64() - external int ri_serviced_energy; + /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. + static NSCharacterSet castFrom(T other) { + return NSCharacterSet._(other._id, other._lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_interval_max_phys_footprint; + /// Returns a [NSCharacterSet] that wraps the given raw object pointer. + static NSCharacterSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCharacterSet._(other, lib, retain: retain, release: release); + } - @ffi.Uint64() - external int ri_runnable_time; + /// Returns whether [obj] is an instance of [NSCharacterSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSCharacterSet1); + } - @ffi.Uint64() - external int ri_flags; -} + static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -class rusage_info_v6 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; + static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_user_time; + static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSCharacterSet1, + _lib._sel_whitespaceAndNewlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_system_time; + static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_interrupt_wkups; - - @ffi.Uint64() - external int ri_pageins; - - @ffi.Uint64() - external int ri_wired_size; - - @ffi.Uint64() - external int ri_resident_size; + static NSCharacterSet? getLowercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_phys_footprint; + static NSCharacterSet? getUppercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_proc_start_abstime; + static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_proc_exit_abstime; + static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_user_time; + static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_system_time; + static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_interrupt_wkups; + static NSCharacterSet? getCapitalizedLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_pageins; + static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_elapsed_abstime; + static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: false, release: true); + } - @ffi.Uint64() - external int ri_diskio_bytesread; + static NSCharacterSet characterSetWithRange_( + NativeCupertinoHttp _lib, NSRange aRange) { + final _ret = _lib._objc_msgSend_29( + _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_diskio_byteswritten; + static NSCharacterSet characterSetWithCharactersInString_( + NativeCupertinoHttp _lib, NSString? aString) { + final _ret = _lib._objc_msgSend_30( + _lib._class_NSCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, + aString?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_default; + static NSCharacterSet characterSetWithBitmapRepresentation_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_223( + _lib._class_NSCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, + data?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; + static NSCharacterSet characterSetWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? fName) { + final _ret = _lib._objc_msgSend_30(_lib._class_NSCharacterSet1, + _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_background; + NSCharacterSet initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_utility; + bool characterIsMember_(int aCharacter) { + return _lib._objc_msgSend_224( + _id, _lib._sel_characterIsMember_1, aCharacter); + } - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; + NSData? get bitmapRepresentation { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_bitmapRepresentation1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; + NSCharacterSet? get invertedSet { + final _ret = _lib._objc_msgSend_28(_id, _lib._sel_invertedSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; + bool longCharacterIsMember_(int theLongChar) { + return _lib._objc_msgSend_225( + _id, _lib._sel_longCharacterIsMember_1, theLongChar); + } - @ffi.Uint64() - external int ri_billed_system_time; + bool isSupersetOfSet_(NSCharacterSet? theOtherSet) { + return _lib._objc_msgSend_226( + _id, _lib._sel_isSupersetOfSet_1, theOtherSet?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_serviced_system_time; + bool hasMemberInPlane_(int thePlane) { + return _lib._objc_msgSend_227(_id, _lib._sel_hasMemberInPlane_1, thePlane); + } - @ffi.Uint64() - external int ri_logical_writes; + /// Returns a character set containing the characters allowed in an URL's user subcomponent. + static NSCharacterSet? getURLUserAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_lifetime_max_phys_footprint; + /// Returns a character set containing the characters allowed in an URL's password subcomponent. + static NSCharacterSet? getURLPasswordAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_instructions; + /// Returns a character set containing the characters allowed in an URL's host subcomponent. + static NSCharacterSet? getURLHostAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_cycles; + /// Returns a character set containing the characters allowed in an URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + static NSCharacterSet? getURLPathAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_billed_energy; + /// Returns a character set containing the characters allowed in an URL's query component. + static NSCharacterSet? getURLQueryAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_serviced_energy; + /// Returns a character set containing the characters allowed in an URL's fragment component. + static NSCharacterSet? getURLFragmentAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_interval_max_phys_footprint; + static NSCharacterSet new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } - @ffi.Uint64() - external int ri_runnable_time; + static NSCharacterSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } +} - @ffi.Uint64() - external int ri_flags; +class NSData extends NSObject { + NSData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Uint64() - external int ri_user_ptime; + /// Returns a [NSData] that points to the same underlying object as [other]. + static NSData castFrom(T other) { + return NSData._(other._id, other._lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_system_ptime; + /// Returns a [NSData] that wraps the given raw object pointer. + static NSData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSData._(other, lib, retain: retain, release: release); + } - @ffi.Uint64() - external int ri_pinstructions; + /// Returns whether [obj] is an instance of [NSData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); + } - @ffi.Uint64() - external int ri_pcycles; + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); + } - @ffi.Uint64() - external int ri_energy_nj; + /// The -bytes method returns a pointer to a contiguous region of memory managed by the receiver. + /// If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer + /// Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data. + ffi.Pointer get bytes { + return _lib._objc_msgSend_31(_id, _lib._sel_bytes1); + } - @ffi.Uint64() - external int ri_penergy_nj; + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Array.multi([14]) - external ffi.Array ri_reserved; -} + void getBytes_length_(ffi.Pointer buffer, int length) { + return _lib._objc_msgSend_33( + _id, _lib._sel_getBytes_length_1, buffer, length); + } -class rlimit extends ffi.Struct { - @rlim_t() - external int rlim_cur; + void getBytes_range_(ffi.Pointer buffer, NSRange range) { + return _lib._objc_msgSend_34( + _id, _lib._sel_getBytes_range_1, buffer, range); + } - @rlim_t() - external int rlim_max; -} + bool isEqualToData_(NSData? other) { + return _lib._objc_msgSend_35( + _id, _lib._sel_isEqualToData_1, other?._id ?? ffi.nullptr); + } -typedef rlim_t = __uint64_t; + NSData subdataWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_36(_id, _lib._sel_subdataWithRange_1, range); + return NSData._(_ret, _lib, retain: true, release: true); + } -class proc_rlimit_control_wakeupmon extends ffi.Struct { - @ffi.Uint32() - external int wm_flags; + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); + } - @ffi.Int32() - external int wm_rate; -} + /// the atomically flag is ignored if the url is not of a type the supports atomic writes + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } -typedef id_t = __darwin_id_t; -typedef __darwin_id_t = __uint32_t; + bool writeToFile_options_error_(NSString? path, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _lib._objc_msgSend_208(_id, _lib._sel_writeToFile_options_error_1, + path?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); + } -@ffi.Packed(1) -class _OSUnalignedU16 extends ffi.Struct { - @ffi.Uint16() - external int __val; -} + bool writeToURL_options_error_(NSURL? url, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _lib._objc_msgSend_209(_id, _lib._sel_writeToURL_options_error_1, + url?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); + } -@ffi.Packed(1) -class _OSUnalignedU32 extends ffi.Struct { - @ffi.Uint32() - external int __val; -} + NSRange rangeOfData_options_range_( + NSData? dataToFind, int mask, NSRange searchRange) { + return _lib._objc_msgSend_210(_id, _lib._sel_rangeOfData_options_range_1, + dataToFind?._id ?? ffi.nullptr, mask, searchRange); + } -@ffi.Packed(1) -class _OSUnalignedU64 extends ffi.Struct { - @ffi.Uint64() - external int __val; -} + /// 'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES. + void enumerateByteRangesUsingBlock_(ObjCBlock11 block) { + return _lib._objc_msgSend_211( + _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._id); + } -class wait extends ffi.Opaque {} + static NSData data(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); + return NSData._(_ret, _lib, retain: true, release: true); + } -class div_t extends ffi.Struct { - @ffi.Int() - external int quot; + static NSData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212( + _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); + return NSData._(_ret, _lib, retain: true, release: true); + } - @ffi.Int() - external int rem; -} + static NSData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSData._(_ret, _lib, retain: false, release: true); + } -class ldiv_t extends ffi.Struct { - @ffi.Long() - external int quot; + static NSData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_213(_lib._class_NSData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSData._(_ret, _lib, retain: false, release: true); + } - @ffi.Long() - external int rem; -} + static NSData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _lib._class_NSData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); + } -class lldiv_t extends ffi.Struct { - @ffi.LongLong() - external int quot; + static NSData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); + } - @ffi.LongLong() - external int rem; -} + static NSData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } -class _ObjCBlockBase implements ffi.Finalizable { - final ffi.Pointer<_ObjCBlock> _id; - final NativeCupertinoHttp _lib; - bool _pendingRelease; + static NSData dataWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } - _ObjCBlockBase._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._Block_copy(_id.cast()); - } - if (release) { - _lib._objc_releaseFinalizer2.attach(this, _id.cast(), detach: this); - } + NSData initWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212( + _id, _lib._sel_initWithBytes_length_1, bytes, length); + return NSData._(_ret, _lib, retain: true, release: true); } - /// Releases the reference to the underlying ObjC block held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._Block_release(_id.cast()); - _lib._objc_releaseFinalizer2.detach(this); - } else { - throw StateError( - 'Released an ObjC block that was unowned or already released.'); - } + NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212( + _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); + return NSData._(_ret, _lib, retain: false, release: true); } - @override - bool operator ==(Object other) { - return other is _ObjCBlockBase && _id == other._id; + NSData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _lib._objc_msgSend_213(_id, + _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSData._(_ret, _lib, retain: false, release: true); } - @override - int get hashCode => _id.hashCode; -} + NSData initWithBytesNoCopy_length_deallocator_( + ffi.Pointer bytes, int length, ObjCBlock12 deallocator) { + final _ret = _lib._objc_msgSend_216( + _id, + _lib._sel_initWithBytesNoCopy_length_deallocator_1, + bytes, + length, + deallocator._id); + return NSData._(_ret, _lib, retain: false, release: true); + } -void _ObjCBlock_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block) { - return block.ref.target - .cast>() - .asFunction()(); -} - -final _ObjCBlock_closureRegistry = {}; -int _ObjCBlock_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_registerClosure(Function fn) { - final id = ++_ObjCBlock_closureRegistryIndex; - _ObjCBlock_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_closureTrampoline(ffi.Pointer<_ObjCBlock> block) { - return _ObjCBlock_closureRegistry[block.ref.target.address]!(); -} - -class ObjCBlock extends _ObjCBlockBase { - ObjCBlock._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( - _ObjCBlock_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock.fromFunction(NativeCupertinoHttp lib, void Function() fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( - _ObjCBlock_closureTrampoline) - .cast(), - _ObjCBlock_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call() { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() - .asFunction block)>()(_id); + NSData initWithContentsOfFile_options_error_(NSString? path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _id, + _lib._sel_initWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} - -class _ObjCBlockDesc extends ffi.Struct { - @ffi.UnsignedLong() - external int reserved; - - @ffi.UnsignedLong() - external int size; - - external ffi.Pointer copy_helper; - - external ffi.Pointer dispose_helper; - - external ffi.Pointer signature; -} - -class _ObjCBlock extends ffi.Struct { - external ffi.Pointer isa; - - @ffi.Int() - external int flags; - - @ffi.Int() - external int reserved; - - external ffi.Pointer invoke; - - external ffi.Pointer<_ObjCBlockDesc> descriptor; - - external ffi.Pointer target; -} - -int _ObjCBlock1_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} - -final _ObjCBlock1_closureRegistry = {}; -int _ObjCBlock1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock1_registerClosure(Function fn) { - final id = ++_ObjCBlock1_closureRegistryIndex; - _ObjCBlock1_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -int _ObjCBlock1_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock1_closureRegistry[block.ref.target.address]!(arg0, arg1); -} - -class ObjCBlock1 extends _ObjCBlockBase { - ObjCBlock1._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock1.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock1_fnPtrTrampoline, 0) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + NSData initWithContentsOfURL_options_error_(NSURL? url, int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _id, + _lib._sel_initWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock1.fromFunction(NativeCupertinoHttp lib, - int Function(ffi.Pointer arg0, ffi.Pointer arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock1_closureTrampoline, 0) - .cast(), - _ObjCBlock1_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - int call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); + NSData initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + NSData initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } -typedef dev_t = __darwin_dev_t; -typedef __darwin_dev_t = __int32_t; -typedef mode_t = __darwin_mode_t; -typedef __darwin_mode_t = __uint16_t; -typedef __uint16_t = ffi.UnsignedShort; + NSData initWithData_(NSData? data) { + final _ret = _lib._objc_msgSend_217( + _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } -class fd_set extends ffi.Struct { - @ffi.Array.multi([32]) - external ffi.Array<__int32_t> fds_bits; -} + static NSData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } -class objc_class extends ffi.Opaque {} + /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. + NSData initWithBase64EncodedString_options_( + NSString? base64String, int options) { + final _ret = _lib._objc_msgSend_218( + _id, + _lib._sel_initWithBase64EncodedString_options_1, + base64String?._id ?? ffi.nullptr, + options); + return NSData._(_ret, _lib, retain: true, release: true); + } -class objc_object extends ffi.Struct { - external ffi.Pointer isa; -} + /// Create a Base-64 encoded NSString from the receiver's contents using the given options. + NSString base64EncodedStringWithOptions_(int options) { + final _ret = _lib._objc_msgSend_219( + _id, _lib._sel_base64EncodedStringWithOptions_1, options); + return NSString._(_ret, _lib, retain: true, release: true); + } -class ObjCObject extends ffi.Opaque {} + /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. + NSData initWithBase64EncodedData_options_(NSData? base64Data, int options) { + final _ret = _lib._objc_msgSend_220( + _id, + _lib._sel_initWithBase64EncodedData_options_1, + base64Data?._id ?? ffi.nullptr, + options); + return NSData._(_ret, _lib, retain: true, release: true); + } -class objc_selector extends ffi.Opaque {} + /// Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options. + NSData base64EncodedDataWithOptions_(int options) { + final _ret = _lib._objc_msgSend_221( + _id, _lib._sel_base64EncodedDataWithOptions_1, options); + return NSData._(_ret, _lib, retain: true, release: true); + } -class _malloc_zone_t extends ffi.Opaque {} + /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. + NSData decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_222(_id, + _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); + return NSData._(_ret, _lib, retain: true, release: true); + } -class ObjCSel extends ffi.Opaque {} + NSData compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_222( + _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); + return NSData._(_ret, _lib, retain: true, release: true); + } -typedef objc_objectptr_t = ffi.Pointer; + void getBytes_(ffi.Pointer buffer) { + return _lib._objc_msgSend_59(_id, _lib._sel_getBytes_1, buffer); + } -class _NSZone extends ffi.Opaque {} + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -class _ObjCWrapper implements ffi.Finalizable { - final ffi.Pointer _id; - final NativeCupertinoHttp _lib; - bool _pendingRelease; + NSObject initWithContentsOfMappedFile_(NSString? path) { + final _ret = _lib._objc_msgSend_42(_id, + _lib._sel_initWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - _ObjCWrapper._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._objc_retain(_id.cast()); - } - if (release) { - _lib._objc_releaseFinalizer11.attach(this, _id.cast(), detach: this); - } + /// These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0. + NSObject initWithBase64Encoding_(NSString? base64String) { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_initWithBase64Encoding_1, + base64String?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// Releases the reference to the underlying ObjC object held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._objc_release(_id.cast()); - _lib._objc_releaseFinalizer11.detach(this); - } else { - throw StateError( - 'Released an ObjC object that was unowned or already released.'); - } + NSString base64Encoding() { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_base64Encoding1); + return NSString._(_ret, _lib, retain: true, release: true); } - @override - bool operator ==(Object other) { - return other is _ObjCWrapper && _id == other._id; + static NSData new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); + return NSData._(_ret, _lib, retain: false, release: true); } - @override - int get hashCode => _id.hashCode; - ffi.Pointer get pointer => _id; + static NSData alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); + return NSData._(_ret, _lib, retain: false, release: true); + } } -class NSObject extends _ObjCWrapper { - NSObject._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSURL extends NSObject { + NSURL._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSObject] that points to the same underlying object as [other]. - static NSObject castFrom(T other) { - return NSObject._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSURL] that points to the same underlying object as [other]. + static NSURL castFrom(T other) { + return NSURL._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSObject] that wraps the given raw object pointer. - static NSObject castFromPointer( + /// Returns a [NSURL] that wraps the given raw object pointer. + static NSURL castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSObject._(other, lib, retain: retain, release: release); + return NSURL._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSObject]. + /// Returns whether [obj] is an instance of [NSURL]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); } - static void load(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); + /// this call percent-encodes both the host and path, so this cannot be used to set a username/password or port in the hostname part or with a IPv6 '[...]' type address. NSURLComponents handles IPv6 addresses correctly. + NSURL initWithScheme_host_path_( + NSString? scheme, NSString? host, NSString? path) { + final _ret = _lib._objc_msgSend_38( + _id, + _lib._sel_initWithScheme_host_path_1, + scheme?._id ?? ffi.nullptr, + host?._id ?? ffi.nullptr, + path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - static void initialize(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); + /// Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL. + NSURL initFileURLWithPath_isDirectory_relativeToURL_( + NSString? path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_39( + _id, + _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, + path?._id ?? ffi.nullptr, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. + NSURL initFileURLWithPath_relativeToURL_(NSString? path, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _id, + _lib._sel_initFileURLWithPath_relativeToURL_1, + path?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - static NSObject new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); - return NSObject._(_ret, _lib, retain: false, release: true); + NSURL initFileURLWithPath_isDirectory_(NSString? path, bool isDir) { + final _ret = _lib._objc_msgSend_41( + _id, + _lib._sel_initFileURLWithPath_isDirectory_1, + path?._id ?? ffi.nullptr, + isDir); + return NSURL._(_ret, _lib, retain: true, release: true); } - static NSObject allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); + /// Better to use initFileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. + NSURL initFileURLWithPath_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initFileURLWithPath_1, path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - static NSObject alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); + /// Initializes and returns a newly created file NSURL referencing the local file or directory at path, relative to a base URL. + static NSURL fileURLWithPath_isDirectory_relativeToURL_( + NativeCupertinoHttp _lib, NSString? path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_43( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, + path?._id ?? ffi.nullptr, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - void dealloc() { - return _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); + /// Better to use fileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. + static NSURL fileURLWithPath_relativeToURL_( + NativeCupertinoHttp _lib, NSString? path, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_44( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_relativeToURL_1, + path?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - void finalize() { - return _lib._objc_msgSend_1(_id, _lib._sel_finalize1); + static NSURL fileURLWithPath_isDirectory_( + NativeCupertinoHttp _lib, NSString? path, bool isDir) { + final _ret = _lib._objc_msgSend_45( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_1, + path?._id ?? ffi.nullptr, + isDir); + return NSURL._(_ret, _lib, retain: true, release: true); } - NSObject copy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); - return NSObject._(_ret, _lib, retain: false, release: true); + /// Better to use fileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. + static NSURL fileURLWithPath_(NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_46(_lib._class_NSURL1, + _lib._sel_fileURLWithPath_1, path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - NSObject mutableCopy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); - return NSObject._(_ret, _lib, retain: false, release: true); + /// Initializes a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. + NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + ffi.Pointer path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_47( + _id, + _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, + path, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - static NSObject copyWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); + /// Initializes and returns a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. + static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + NativeCupertinoHttp _lib, + ffi.Pointer path, + bool isDir, + NSURL? baseURL) { + final _ret = _lib._objc_msgSend_48( + _lib._class_NSURL1, + _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, + path, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - static NSObject mutableCopyWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); + /// These methods expect their string arguments to contain any percent escape codes that are necessary. It is an error for URLString to be nil. + NSURL initWithString_(NSString? URLString) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - static bool instancesRespondToSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4(_lib._class_NSObject1, - _lib._sel_instancesRespondToSelector_1, aSelector); + NSURL initWithString_relativeToURL_(NSString? URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _id, + _lib._sel_initWithString_relativeToURL_1, + URLString?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - static bool conformsToProtocol_( - NativeCupertinoHttp _lib, Protocol? protocol) { - return _lib._objc_msgSend_5(_lib._class_NSObject1, - _lib._sel_conformsToProtocol_1, protocol?._id ?? ffi.nullptr); + static NSURL URLWithString_(NativeCupertinoHttp _lib, NSString? URLString) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSURL1, + _lib._sel_URLWithString_1, URLString?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - IMP methodForSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); + static NSURL URLWithString_relativeToURL_( + NativeCupertinoHttp _lib, NSString? URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _lib._class_NSURL1, + _lib._sel_URLWithString_relativeToURL_1, + URLString?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - static IMP instanceMethodForSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_lib._class_NSObject1, - _lib._sel_instanceMethodForSelector_1, aSelector); + /// Initializes a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + NSURL initWithDataRepresentation_relativeToURL_( + NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_49( + _id, + _lib._sel_initWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - void doesNotRecognizeSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_7( - _id, _lib._sel_doesNotRecognizeSelector_1, aSelector); - } - - NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_8( - _id, _lib._sel_forwardingTargetForSelector_1, aSelector); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void forwardInvocation_(NSInvocation? anInvocation) { - return _lib._objc_msgSend_9( - _id, _lib._sel_forwardInvocation_1, anInvocation?._id ?? ffi.nullptr); + /// Initializes and returns a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + static NSURL URLWithDataRepresentation_relativeToURL_( + NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_50( + _lib._class_NSURL1, + _lib._sel_URLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - NSMethodSignature methodSignatureForSelector_( - ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_10( - _id, _lib._sel_methodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); + /// Initializes a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( + NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_49( + _id, + _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - static NSMethodSignature instanceMethodSignatureForSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_10(_lib._class_NSObject1, - _lib._sel_instanceMethodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); + /// Initializes and returns a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + static NSURL absoluteURLWithDataRepresentation_relativeToURL_( + NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_50( + _lib._class_NSURL1, + _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - bool allowsWeakReference() { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsWeakReference1); + /// Returns the data representation of the URL's relativeString. If the URL was initialized with -initWithData:relativeToURL:, the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with NSUTF8StringEncoding. + NSData? get dataRepresentation { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_dataRepresentation1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - bool retainWeakReference() { - return _lib._objc_msgSend_11(_id, _lib._sel_retainWeakReference1); + NSString? get absoluteString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_absoluteString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static bool isSubclassOfClass_(NativeCupertinoHttp _lib, NSObject aClass) { - return _lib._objc_msgSend_0( - _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); + /// The relative portion of a URL. If baseURL is nil, or if the receiver is itself absolute, this is the same as absoluteString + NSString? get relativeString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativeString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static bool resolveClassMethod_( - NativeCupertinoHttp _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); + /// may be nil. + NSURL? get baseURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_baseURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - static bool resolveInstanceMethod_( - NativeCupertinoHttp _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); + /// if the receiver is itself absolute, this will return self. + NSURL? get absoluteURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_absoluteURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - static int hash(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); + /// Any URL is composed of these two basic pieces. The full URL would be the concatenation of [myURL scheme], ':', [myURL resourceSpecifier] + NSString? get scheme { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSObject superclass(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSString? get resourceSpecifier { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_resourceSpecifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSObject class1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// If the URL conforms to rfc 1808 (the most common form of URL), the following accessors will return the various components; otherwise they return nil. The litmus test for conformance is as recommended in RFC 1808 - whether the first two characters of resourceSpecifier is @"//". In all cases, they return the component's value after resolving the receiver against its base URL. + NSString? get host { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSString description(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_32(_lib._class_NSObject1, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); + NSNumber? get port { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); } - static NSString debugDescription(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_32( - _lib._class_NSObject1, _lib._sel_debugDescription1); - return NSString._(_ret, _lib, retain: true, release: true); + NSString? get user { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static int version(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_81(_lib._class_NSObject1, _lib._sel_version1); + NSString? get password { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static void setVersion_(NativeCupertinoHttp _lib, int aVersion) { - return _lib._objc_msgSend_279( - _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); + NSString? get path { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSObject get classForCoder { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSString? get fragment { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSObject replacementObjectForCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_replacementObjectForCoder_1, coder?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + NSString? get parameterString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_parameterString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSObject awakeAfterUsingCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_awakeAfterUsingCoder_1, coder?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: false, release: true); + NSString? get query { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static void poseAsClass_(NativeCupertinoHttp _lib, NSObject aClass) { - return _lib._objc_msgSend_200( - _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); + /// The same as path if baseURL is nil + NSString? get relativePath { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativePath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSObject get autoContentAccessingProxy { - final _ret = - _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Determines if a given URL string's path represents a directory (i.e. the path component in the URL string ends with a '/' character). This does not check the resource the URL refers to. + bool get hasDirectoryPath { + return _lib._objc_msgSend_11(_id, _lib._sel_hasDirectoryPath1); } - void URL_resourceDataDidBecomeAvailable_(NSURL? sender, NSData? newBytes) { - return _lib._objc_msgSend_280( + /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. + bool getFileSystemRepresentation_maxLength_( + ffi.Pointer buffer, int maxBufferLength) { + return _lib._objc_msgSend_90( _id, - _lib._sel_URL_resourceDataDidBecomeAvailable_1, - sender?._id ?? ffi.nullptr, - newBytes?._id ?? ffi.nullptr); + _lib._sel_getFileSystemRepresentation_maxLength_1, + buffer, + maxBufferLength); } - void URLResourceDidFinishLoading_(NSURL? sender) { - return _lib._objc_msgSend_281(_id, _lib._sel_URLResourceDidFinishLoading_1, - sender?._id ?? ffi.nullptr); + /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. The returned C string will be automatically freed just as a returned object would be released; your code should copy the representation or use getFileSystemRepresentation:maxLength: if it needs to store the representation outside of the autorelease context in which the representation is created. + ffi.Pointer get fileSystemRepresentation { + return _lib._objc_msgSend_53(_id, _lib._sel_fileSystemRepresentation1); } - void URLResourceDidCancelLoading_(NSURL? sender) { - return _lib._objc_msgSend_281(_id, _lib._sel_URLResourceDidCancelLoading_1, - sender?._id ?? ffi.nullptr); + /// Whether the scheme is file:; if [myURL isFileURL] is YES, then [myURL path] is suitable for input into NSFileManager or NSPathUtilities. + bool get fileURL { + return _lib._objc_msgSend_11(_id, _lib._sel_isFileURL1); } - void URL_resourceDidFailLoadingWithReason_(NSURL? sender, NSString? reason) { - return _lib._objc_msgSend_282( - _id, - _lib._sel_URL_resourceDidFailLoadingWithReason_1, - sender?._id ?? ffi.nullptr, - reason?._id ?? ffi.nullptr); + NSURL? get standardizedURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_standardizedURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - /// Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: - /// - /// - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; - /// - /// The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. - void - attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( - NSError? error, - int recoveryOptionIndex, - NSObject delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo) { - return _lib._objc_msgSend_283( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, - error?._id ?? ffi.nullptr, - recoveryOptionIndex, - delegate._id, - didRecoverSelector, - contextInfo); + /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. + bool checkResourceIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_183( + _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); } - /// Given that an error alert has been presented applicaton-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and return YES if error recovery was completely successful, NO otherwise. The recovery option index is an index into the error's array of localized recovery options. - bool attemptRecoveryFromError_optionIndex_( - NSError? error, int recoveryOptionIndex) { - return _lib._objc_msgSend_284( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_1, - error?._id ?? ffi.nullptr, - recoveryOptionIndex); + /// Returns whether the URL is a file reference URL. Symbol is present in iOS 4, but performs no operation. + bool isFileReferenceURL() { + return _lib._objc_msgSend_11(_id, _lib._sel_isFileReferenceURL1); } -} -typedef instancetype = ffi.Pointer; - -class Protocol extends _ObjCWrapper { - Protocol._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [Protocol] that points to the same underlying object as [other]. - static Protocol castFrom(T other) { - return Protocol._(other._id, other._lib, retain: true, release: true); + /// Returns a file reference URL that refers to the same resource as a specified file URL. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:). Symbol is present in iOS 4, but performs no operation. + NSURL fileReferenceURL() { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileReferenceURL1); + return NSURL._(_ret, _lib, retain: true, release: true); } - /// Returns a [Protocol] that wraps the given raw object pointer. - static Protocol castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return Protocol._(other, lib, retain: retain, release: release); + /// Returns a file path URL that refers to the same resource as a specified URL. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. Symbol is present in iOS 4, but performs no operation. + NSURL? get filePathURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_filePathURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [Protocol]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); + /// Returns the resource value identified by a given resource key. This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this method returns YES and value is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool getResourceValue_forKey_error_( + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_184( + _id, _lib._sel_getResourceValue_forKey_error_1, value, key, error); } -} - -typedef IMP = ffi.Pointer>; - -class NSInvocation extends _ObjCWrapper { - NSInvocation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSInvocation] that points to the same underlying object as [other]. - static NSInvocation castFrom(T other) { - return NSInvocation._(other._id, other._lib, retain: true, release: true); + /// Returns the resource values identified by specified array of resource keys. This method first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this method returns NULL, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + NSDictionary resourceValuesForKeys_error_( + NSArray? keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_185( + _id, + _lib._sel_resourceValuesForKeys_error_1, + keys?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSInvocation] that wraps the given raw object pointer. - static NSInvocation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInvocation._(other, lib, retain: retain, release: release); + /// Sets the resource value identified by a given resource key. This method writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool setResourceValue_forKey_error_(NSObject value, NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_186( + _id, _lib._sel_setResourceValue_forKey_error_1, value._id, key, error); } - /// Returns whether [obj] is an instance of [NSInvocation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInvocation1); + /// Sets any number of resource values of a URL's resource. This method writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to this method or to -setResourceValue:forKey:error: to guarantee the order. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool setResourceValues_error_( + NSDictionary? keyedValues, ffi.Pointer> error) { + return _lib._objc_msgSend_187(_id, _lib._sel_setResourceValues_error_1, + keyedValues?._id ?? ffi.nullptr, error); } -} - -class NSMethodSignature extends _ObjCWrapper { - NSMethodSignature._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. - static NSMethodSignature castFrom(T other) { - return NSMethodSignature._(other._id, other._lib, - retain: true, release: true); + /// Removes the cached resource value identified by a given resource value key from the URL object. Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources. + void removeCachedResourceValueForKey_(NSURLResourceKey key) { + return _lib._objc_msgSend_188( + _id, _lib._sel_removeCachedResourceValueForKey_1, key); } - /// Returns a [NSMethodSignature] that wraps the given raw object pointer. - static NSMethodSignature castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMethodSignature._(other, lib, retain: retain, release: release); + /// Removes all cached resource values and all temporary resource values from the URL object. This method is currently applicable only to URLs for file system resources. + void removeAllCachedResourceValues() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); } - /// Returns whether [obj] is an instance of [NSMethodSignature]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMethodSignature1); + /// Sets a temporary resource value on the URL object. Temporary resource values are for client use. Temporary resource values exist only in memory and are never written to the resource's backing store. Once set, a temporary resource value can be copied from the URL object with -getResourceValue:forKey:error: or -resourceValuesForKeys:error:. To remove a temporary resource value from the URL object, use -removeCachedResourceValueForKey:. Care should be taken to ensure the key that identifies a temporary resource value is unique and does not conflict with system defined keys (using reverse domain name notation in your temporary resource value keys is recommended). This method is currently applicable only to URLs for file system resources. + void setTemporaryResourceValue_forKey_(NSObject value, NSURLResourceKey key) { + return _lib._objc_msgSend_189( + _id, _lib._sel_setTemporaryResourceValue_forKey_1, value._id, key); } -} - -typedef NSUInteger = ffi.UnsignedLong; -class NSString extends NSObject { - NSString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// Returns bookmark data for the URL, created with specified options and resource values. If this method returns nil, the optional error is populated. + NSData + bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( + int options, + NSArray? keys, + NSURL? relativeURL, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_190( + _id, + _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, + options, + keys?._id ?? ffi.nullptr, + relativeURL?._id ?? ffi.nullptr, + error); + return NSData._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSString] that points to the same underlying object as [other]. - static NSString castFrom(T other) { - return NSString._(other._id, other._lib, retain: true, release: true); + /// Initializes a newly created NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. + NSURL + initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NSData? bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_191( + _id, + _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, + bookmarkData?._id ?? ffi.nullptr, + options, + relativeURL?._id ?? ffi.nullptr, + isStale, + error); + return NSURL._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSString] that wraps the given raw object pointer. - static NSString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSString._(other, lib, retain: retain, release: release); + /// Creates and Initializes an NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. + static NSURL + URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NativeCupertinoHttp _lib, + NSData? bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_191( + _lib._class_NSURL1, + _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, + bookmarkData?._id ?? ffi.nullptr, + options, + relativeURL?._id ?? ffi.nullptr, + isStale, + error); + return NSURL._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); + /// Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available in the bookmark data. + static NSDictionary resourceValuesForKeys_fromBookmarkData_( + NativeCupertinoHttp _lib, NSArray? keys, NSData? bookmarkData) { + final _ret = _lib._objc_msgSend_192( + _lib._class_NSURL1, + _lib._sel_resourceValuesForKeys_fromBookmarkData_1, + keys?._id ?? ffi.nullptr, + bookmarkData?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - factory NSString(NativeCupertinoHttp _lib, String str) { - final cstr = str.toNativeUtf16(); - final nsstr = stringWithCharacters_length_(_lib, cstr.cast(), str.length); - pkg_ffi.calloc.free(cstr); - return nsstr; + /// Creates an alias file on disk at a specified location with specified bookmark data. bookmarkData must have been created with the NSURLBookmarkCreationSuitableForBookmarkFile option. bookmarkFileURL must either refer to an existing file (which will be overwritten), or to location in an existing directory. If this method returns NO, the optional error is populated. + static bool writeBookmarkData_toURL_options_error_( + NativeCupertinoHttp _lib, + NSData? bookmarkData, + NSURL? bookmarkFileURL, + int options, + ffi.Pointer> error) { + return _lib._objc_msgSend_193( + _lib._class_NSURL1, + _lib._sel_writeBookmarkData_toURL_options_error_1, + bookmarkData?._id ?? ffi.nullptr, + bookmarkFileURL?._id ?? ffi.nullptr, + options, + error); } - @override - String toString() { - final data = - dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); - return data.bytes.cast().toDartString(length: length); + /// Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. If bookmarkFileURL refers to an alias file created prior to OS X v10.6 that contains Alias Manager information but no bookmark data, this method synthesizes bookmark data for the file. If this method returns nil, the optional error is populated. + static NSData bookmarkDataWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? bookmarkFileURL, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_194( + _lib._class_NSURL1, + _lib._sel_bookmarkDataWithContentsOfURL_error_1, + bookmarkFileURL?._id ?? ffi.nullptr, + error); + return NSData._(_ret, _lib, retain: true, release: true); } - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); + /// Creates and initializes a NSURL that refers to the location specified by resolving the alias file at url. If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, the NSURL returned is the same as url argument. This method fails and returns nil if the url argument is unreachable, or if the original file or directory could not be located or is not reachable, or if the original file or directory is on a volume that could not be located or mounted. If this method fails, the optional error is populated. The NSURLBookmarkResolutionWithSecurityScope option is not supported by this method. + static NSURL URLByResolvingAliasFileAtURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int options, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_195( + _lib._class_NSURL1, + _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, + url?._id ?? ffi.nullptr, + options, + error); + return NSURL._(_ret, _lib, retain: true, release: true); } - int characterAtIndex_(int index) { - return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); + /// Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. When access to this resource is no longer needed the client must call stopAccessingSecurityScopedResource. Each call to startAccessingSecurityScopedResource must be balanced with a call to stopAccessingSecurityScopedResource (Note: this is not reference counted). + bool startAccessingSecurityScopedResource() { + return _lib._objc_msgSend_11( + _id, _lib._sel_startAccessingSecurityScopedResource1); } - @override - NSString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSString._(_ret, _lib, retain: true, release: true); + /// Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource. + void stopAccessingSecurityScopedResource() { + return _lib._objc_msgSend_1( + _id, _lib._sel_stopAccessingSecurityScopedResource1); } - NSString initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString substringFromIndex_(int from) { - final _ret = - _lib._objc_msgSend_15(_id, _lib._sel_substringFromIndex_1, from); - return NSString._(_ret, _lib, retain: true, release: true); + /// Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: + /// - NSMetadataQueryUbiquitousDataScope + /// - NSMetadataQueryUbiquitousDocumentsScope + /// - An NSFilePresenter presenting the contents of the directory located by -URLForUbiquitousContainerIdentifier: or a subdirectory thereof + /// + /// The following methods behave identically to their similarly named methods above (-getResourceValue:forKey:error:, etc.), except that they allow you to get resource values and check for presence regardless of whether the promised item's contents currently exist at the URL. You must use these APIs instead of the normal NSURL resource value APIs if and only if any of the following are true: + /// - You are using a URL that you know came directly from one of the above APIs + /// - You are inside the accessor block of a coordinated read or write that used NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingContentIndependentMetadataOnly + /// + /// Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. + bool getPromisedItemResourceValue_forKey_error_( + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_184( + _id, + _lib._sel_getPromisedItemResourceValue_forKey_error_1, + value, + key, + error); } - NSString substringToIndex_(int to) { - final _ret = _lib._objc_msgSend_15(_id, _lib._sel_substringToIndex_1, to); - return NSString._(_ret, _lib, retain: true, release: true); + NSDictionary promisedItemResourceValuesForKeys_error_( + NSArray? keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_185( + _id, + _lib._sel_promisedItemResourceValuesForKeys_error_1, + keys?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - NSString substringWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_16(_id, _lib._sel_substringWithRange_1, range); - return NSString._(_ret, _lib, retain: true, release: true); + bool checkPromisedItemIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_183( + _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); } - void getCharacters_range_(ffi.Pointer buffer, NSRange range) { - return _lib._objc_msgSend_17( - _id, _lib._sel_getCharacters_range_1, buffer, range); + /// The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. + static NSURL fileURLWithPathComponents_( + NativeCupertinoHttp _lib, NSArray? components) { + final _ret = _lib._objc_msgSend_196(_lib._class_NSURL1, + _lib._sel_fileURLWithPathComponents_1, components?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - int compare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_compare_1, string?._id ?? ffi.nullptr); + NSArray? get pathComponents { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_pathComponents1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - int compare_options_(NSString? string, int mask) { - return _lib._objc_msgSend_19( - _id, _lib._sel_compare_options_1, string?._id ?? ffi.nullptr, mask); + NSString? get lastPathComponent { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lastPathComponent1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - int compare_options_range_( - NSString? string, int mask, NSRange rangeOfReceiverToCompare) { - return _lib._objc_msgSend_20(_id, _lib._sel_compare_options_range_1, - string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare); + NSString? get pathExtension { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_pathExtension1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - int compare_options_range_locale_(NSString? string, int mask, - NSRange rangeOfReceiverToCompare, NSObject locale) { - return _lib._objc_msgSend_21(_id, _lib._sel_compare_options_range_locale_1, - string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare, locale._id); + NSURL URLByAppendingPathComponent_(NSString? pathComponent) { + final _ret = _lib._objc_msgSend_46( + _id, + _lib._sel_URLByAppendingPathComponent_1, + pathComponent?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - int caseInsensitiveCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_caseInsensitiveCompare_1, string?._id ?? ffi.nullptr); + NSURL URLByAppendingPathComponent_isDirectory_( + NSString? pathComponent, bool isDirectory) { + final _ret = _lib._objc_msgSend_45( + _id, + _lib._sel_URLByAppendingPathComponent_isDirectory_1, + pathComponent?._id ?? ffi.nullptr, + isDirectory); + return NSURL._(_ret, _lib, retain: true, release: true); } - int localizedCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_localizedCompare_1, string?._id ?? ffi.nullptr); + NSURL? get URLByDeletingLastPathComponent { + final _ret = + _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingLastPathComponent1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - int localizedCaseInsensitiveCompare_(NSString? string) { - return _lib._objc_msgSend_18( + NSURL URLByAppendingPathExtension_(NSString? pathExtension) { + final _ret = _lib._objc_msgSend_46( _id, - _lib._sel_localizedCaseInsensitiveCompare_1, - string?._id ?? ffi.nullptr); + _lib._sel_URLByAppendingPathExtension_1, + pathExtension?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - int localizedStandardCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_localizedStandardCompare_1, string?._id ?? ffi.nullptr); + NSURL? get URLByDeletingPathExtension { + final _ret = + _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingPathExtension1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - bool isEqualToString_(NSString? aString) { - return _lib._objc_msgSend_22( - _id, _lib._sel_isEqualToString_1, aString?._id ?? ffi.nullptr); + /// The following methods work only on `file:` scheme URLs; for non-`file:` scheme URLs, these methods return the URL unchanged. + NSURL? get URLByStandardizingPath { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URLByStandardizingPath1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - bool hasPrefix_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_hasPrefix_1, str?._id ?? ffi.nullptr); + NSURL? get URLByResolvingSymlinksInPath { + final _ret = + _lib._objc_msgSend_52(_id, _lib._sel_URLByResolvingSymlinksInPath1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - bool hasSuffix_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_hasSuffix_1, str?._id ?? ffi.nullptr); + /// Blocks to load the data if necessary. If shouldUseCache is YES, then if an equivalent URL has already been loaded and cached, its resource data will be returned immediately. If shouldUseCache is NO, a new load will be started + NSData resourceDataUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_197( + _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); + return NSData._(_ret, _lib, retain: true, release: true); } - NSString commonPrefixWithString_options_(NSString? str, int mask) { - final _ret = _lib._objc_msgSend_23( + /// Starts an asynchronous load of the data, registering delegate to receive notification. Only one such background load can proceed at a time. + void loadResourceDataNotifyingClient_usingCache_( + NSObject client, bool shouldUseCache) { + return _lib._objc_msgSend_198( _id, - _lib._sel_commonPrefixWithString_options_1, - str?._id ?? ffi.nullptr, - mask); - return NSString._(_ret, _lib, retain: true, release: true); + _lib._sel_loadResourceDataNotifyingClient_usingCache_1, + client._id, + shouldUseCache); } - bool containsString_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_containsString_1, str?._id ?? ffi.nullptr); + NSObject propertyForKey_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - bool localizedCaseInsensitiveContainsString_(NSString? str) { - return _lib._objc_msgSend_22( - _id, - _lib._sel_localizedCaseInsensitiveContainsString_1, - str?._id ?? ffi.nullptr); + /// These attempt to write the given arguments for the resource specified by the URL; they return success or failure + bool setResourceData_(NSData? data) { + return _lib._objc_msgSend_35( + _id, _lib._sel_setResourceData_1, data?._id ?? ffi.nullptr); } - bool localizedStandardContainsString_(NSString? str) { - return _lib._objc_msgSend_22(_id, - _lib._sel_localizedStandardContainsString_1, str?._id ?? ffi.nullptr); + bool setProperty_forKey_(NSObject property, NSString? propertyKey) { + return _lib._objc_msgSend_199(_id, _lib._sel_setProperty_forKey_1, + property._id, propertyKey?._id ?? ffi.nullptr); } - NSRange localizedStandardRangeOfString_(NSString? str) { - return _lib._objc_msgSend_24(_id, - _lib._sel_localizedStandardRangeOfString_1, str?._id ?? ffi.nullptr); + /// Sophisticated clients will want to ask for this, then message the handle directly. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded + NSURLHandle URLHandleUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_207( + _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); + return NSURLHandle._(_ret, _lib, retain: true, release: true); } - NSRange rangeOfString_(NSString? searchString) { - return _lib._objc_msgSend_24( - _id, _lib._sel_rangeOfString_1, searchString?._id ?? ffi.nullptr); + static NSURL new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); + return NSURL._(_ret, _lib, retain: false, release: true); } - NSRange rangeOfString_options_(NSString? searchString, int mask) { - return _lib._objc_msgSend_25(_id, _lib._sel_rangeOfString_options_1, - searchString?._id ?? ffi.nullptr, mask); + static NSURL alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); + return NSURL._(_ret, _lib, retain: false, release: true); } +} - NSRange rangeOfString_options_range_( - NSString? searchString, int mask, NSRange rangeOfReceiverToSearch) { - return _lib._objc_msgSend_26(_id, _lib._sel_rangeOfString_options_range_1, - searchString?._id ?? ffi.nullptr, mask, rangeOfReceiverToSearch); +class NSNumber extends NSValue { + NSNumber._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNumber] that points to the same underlying object as [other]. + static NSNumber castFrom(T other) { + return NSNumber._(other._id, other._lib, retain: true, release: true); } - NSRange rangeOfString_options_range_locale_(NSString? searchString, int mask, - NSRange rangeOfReceiverToSearch, NSLocale? locale) { - return _lib._objc_msgSend_27( - _id, - _lib._sel_rangeOfString_options_range_locale_1, - searchString?._id ?? ffi.nullptr, - mask, - rangeOfReceiverToSearch, - locale?._id ?? ffi.nullptr); + /// Returns a [NSNumber] that wraps the given raw object pointer. + static NSNumber castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNumber._(other, lib, retain: retain, release: release); } - NSRange rangeOfCharacterFromSet_(NSCharacterSet? searchSet) { - return _lib._objc_msgSend_228(_id, _lib._sel_rangeOfCharacterFromSet_1, - searchSet?._id ?? ffi.nullptr); + /// Returns whether [obj] is an instance of [NSNumber]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); } - NSRange rangeOfCharacterFromSet_options_( - NSCharacterSet? searchSet, int mask) { - return _lib._objc_msgSend_229( - _id, - _lib._sel_rangeOfCharacterFromSet_options_1, - searchSet?._id ?? ffi.nullptr, - mask); + @override + NSNumber initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSRange rangeOfCharacterFromSet_options_range_( - NSCharacterSet? searchSet, int mask, NSRange rangeOfReceiverToSearch) { - return _lib._objc_msgSend_230( - _id, - _lib._sel_rangeOfCharacterFromSet_options_range_1, - searchSet?._id ?? ffi.nullptr, - mask, - rangeOfReceiverToSearch); + NSNumber initWithChar_(int value) { + final _ret = _lib._objc_msgSend_62(_id, _lib._sel_initWithChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSRange rangeOfComposedCharacterSequenceAtIndex_(int index) { - return _lib._objc_msgSend_231( - _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); + NSNumber initWithUnsignedChar_(int value) { + final _ret = + _lib._objc_msgSend_63(_id, _lib._sel_initWithUnsignedChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSRange rangeOfComposedCharacterSequencesForRange_(NSRange range) { - return _lib._objc_msgSend_232( - _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); + NSNumber initWithShort_(int value) { + final _ret = _lib._objc_msgSend_64(_id, _lib._sel_initWithShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString stringByAppendingString_(NSString? aString) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_stringByAppendingString_1, aString?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + NSNumber initWithUnsignedShort_(int value) { + final _ret = + _lib._objc_msgSend_65(_id, _lib._sel_initWithUnsignedShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString stringByAppendingFormat_(NSString? format) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_stringByAppendingFormat_1, format?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + NSNumber initWithInt_(int value) { + final _ret = _lib._objc_msgSend_66(_id, _lib._sel_initWithInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - double get doubleValue { - return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); + NSNumber initWithUnsignedInt_(int value) { + final _ret = + _lib._objc_msgSend_67(_id, _lib._sel_initWithUnsignedInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - double get floatValue { - return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); + NSNumber initWithLong_(int value) { + final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - int get intValue { - return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); + NSNumber initWithUnsignedLong_(int value) { + final _ret = + _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - int get integerValue { - return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); + NSNumber initWithLongLong_(int value) { + final _ret = + _lib._objc_msgSend_70(_id, _lib._sel_initWithLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - int get longLongValue { - return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); + NSNumber initWithUnsignedLongLong_(int value) { + final _ret = + _lib._objc_msgSend_71(_id, _lib._sel_initWithUnsignedLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - bool get boolValue { - return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); + NSNumber initWithFloat_(double value) { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_initWithFloat_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString? get uppercaseString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_uppercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSNumber initWithDouble_(double value) { + final _ret = _lib._objc_msgSend_73(_id, _lib._sel_initWithDouble_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString? get lowercaseString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lowercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSNumber initWithBool_(bool value) { + final _ret = _lib._objc_msgSend_74(_id, _lib._sel_initWithBool_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString? get capitalizedString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_capitalizedString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSNumber initWithInteger_(int value) { + final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString? get localizedUppercaseString { + NSNumber initWithUnsignedInteger_(int value) { final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedUppercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString? get localizedLowercaseString { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedLowercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get charValue { + return _lib._objc_msgSend_75(_id, _lib._sel_charValue1); } - NSString? get localizedCapitalizedString { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedCapitalizedString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get unsignedCharValue { + return _lib._objc_msgSend_76(_id, _lib._sel_unsignedCharValue1); } - NSString uppercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_233( - _id, _lib._sel_uppercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + int get shortValue { + return _lib._objc_msgSend_77(_id, _lib._sel_shortValue1); } - NSString lowercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_233( - _id, _lib._sel_lowercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + int get unsignedShortValue { + return _lib._objc_msgSend_78(_id, _lib._sel_unsignedShortValue1); } - NSString capitalizedStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_233(_id, - _lib._sel_capitalizedStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + int get intValue { + return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); } - void getLineStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - NSRange range) { - return _lib._objc_msgSend_234( - _id, - _lib._sel_getLineStart_end_contentsEnd_forRange_1, - startPtr, - lineEndPtr, - contentsEndPtr, - range); + int get unsignedIntValue { + return _lib._objc_msgSend_80(_id, _lib._sel_unsignedIntValue1); } - NSRange lineRangeForRange_(NSRange range) { - return _lib._objc_msgSend_232(_id, _lib._sel_lineRangeForRange_1, range); + int get longValue { + return _lib._objc_msgSend_81(_id, _lib._sel_longValue1); } - void getParagraphStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer parEndPtr, - ffi.Pointer contentsEndPtr, - NSRange range) { - return _lib._objc_msgSend_234( - _id, - _lib._sel_getParagraphStart_end_contentsEnd_forRange_1, - startPtr, - parEndPtr, - contentsEndPtr, - range); + int get unsignedLongValue { + return _lib._objc_msgSend_12(_id, _lib._sel_unsignedLongValue1); } - NSRange paragraphRangeForRange_(NSRange range) { - return _lib._objc_msgSend_232( - _id, _lib._sel_paragraphRangeForRange_1, range); + int get longLongValue { + return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); } - void enumerateSubstringsInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock15 block) { - return _lib._objc_msgSend_235( - _id, - _lib._sel_enumerateSubstringsInRange_options_usingBlock_1, - range, - opts, - block._id); + int get unsignedLongLongValue { + return _lib._objc_msgSend_83(_id, _lib._sel_unsignedLongLongValue1); } - void enumerateLinesUsingBlock_(ObjCBlock16 block) { - return _lib._objc_msgSend_236( - _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); + double get floatValue { + return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); } - ffi.Pointer get UTF8String { - return _lib._objc_msgSend_53(_id, _lib._sel_UTF8String1); + double get doubleValue { + return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); } - int get fastestEncoding { - return _lib._objc_msgSend_12(_id, _lib._sel_fastestEncoding1); + bool get boolValue { + return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); } - int get smallestEncoding { - return _lib._objc_msgSend_12(_id, _lib._sel_smallestEncoding1); + int get integerValue { + return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); } - NSData dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { - final _ret = _lib._objc_msgSend_237(_id, - _lib._sel_dataUsingEncoding_allowLossyConversion_1, encoding, lossy); - return NSData._(_ret, _lib, retain: true, release: true); + int get unsignedIntegerValue { + return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); } - NSData dataUsingEncoding_(int encoding) { - final _ret = - _lib._objc_msgSend_238(_id, _lib._sel_dataUsingEncoding_1, encoding); - return NSData._(_ret, _lib, retain: true, release: true); + NSString? get stringValue { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_stringValue1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - bool canBeConvertedToEncoding_(int encoding) { - return _lib._objc_msgSend_117( - _id, _lib._sel_canBeConvertedToEncoding_1, encoding); + int compare_(NSNumber? otherNumber) { + return _lib._objc_msgSend_86( + _id, _lib._sel_compare_1, otherNumber?._id ?? ffi.nullptr); } - ffi.Pointer cStringUsingEncoding_(int encoding) { - return _lib._objc_msgSend_239( - _id, _lib._sel_cStringUsingEncoding_1, encoding); + bool isEqualToNumber_(NSNumber? number) { + return _lib._objc_msgSend_87( + _id, _lib._sel_isEqualToNumber_1, number?._id ?? ffi.nullptr); } - bool getCString_maxLength_encoding_( - ffi.Pointer buffer, int maxBufferCount, int encoding) { - return _lib._objc_msgSend_240( - _id, - _lib._sel_getCString_maxLength_encoding_1, - buffer, - maxBufferCount, - encoding); + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); } - bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, - NSRange range, - NSRangePointer leftover) { - return _lib._objc_msgSend_241( - _id, - _lib._sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover); + static NSNumber numberWithChar_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_62( + _lib._class_NSNumber1, _lib._sel_numberWithChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - int maximumLengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_114( - _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); + static NSNumber numberWithUnsignedChar_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_63( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - int lengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_114( - _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); + static NSNumber numberWithShort_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_64( + _lib._class_NSNumber1, _lib._sel_numberWithShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSString1, _lib._sel_availableStringEncodings1); + static NSNumber numberWithUnsignedShort_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_65( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithInt_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_66( + _lib._class_NSNumber1, _lib._sel_numberWithInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); + static NSNumber numberWithUnsignedInt_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_67( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString? get decomposedStringWithCanonicalMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_decomposedStringWithCanonicalMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithLong_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSNumber1, _lib._sel_numberWithLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString? get precomposedStringWithCanonicalMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_precomposedStringWithCanonicalMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithUnsignedLong_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_69( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString? get decomposedStringWithCompatibilityMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_decomposedStringWithCompatibilityMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithLongLong_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_70( + _lib._class_NSNumber1, _lib._sel_numberWithLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString? get precomposedStringWithCompatibilityMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_precomposedStringWithCompatibilityMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithUnsignedLongLong_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_71( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSArray componentsSeparatedByString_(NSString? separator) { - final _ret = _lib._objc_msgSend_159(_id, - _lib._sel_componentsSeparatedByString_1, separator?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithFloat_(NativeCupertinoHttp _lib, double value) { + final _ret = _lib._objc_msgSend_72( + _lib._class_NSNumber1, _lib._sel_numberWithFloat_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet? separator) { - final _ret = _lib._objc_msgSend_243( - _id, - _lib._sel_componentsSeparatedByCharactersInSet_1, - separator?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithDouble_(NativeCupertinoHttp _lib, double value) { + final _ret = _lib._objc_msgSend_73( + _lib._class_NSNumber1, _lib._sel_numberWithDouble_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString stringByTrimmingCharactersInSet_(NSCharacterSet? set) { - final _ret = _lib._objc_msgSend_244(_id, - _lib._sel_stringByTrimmingCharactersInSet_1, set?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithBool_(NativeCupertinoHttp _lib, bool value) { + final _ret = _lib._objc_msgSend_74( + _lib._class_NSNumber1, _lib._sel_numberWithBool_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString stringByPaddingToLength_withString_startingAtIndex_( - int newLength, NSString? padString, int padIndex) { - final _ret = _lib._objc_msgSend_245( - _id, - _lib._sel_stringByPaddingToLength_withString_startingAtIndex_1, - newLength, - padString?._id ?? ffi.nullptr, - padIndex); - return NSString._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithInteger_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSNumber1, _lib._sel_numberWithInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { - final _ret = _lib._objc_msgSend_246( - _id, - _lib._sel_stringByFoldingWithOptions_locale_1, - options, - locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithUnsignedInteger_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_69( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSString stringByReplacingOccurrencesOfString_withString_options_range_( - NSString? target, - NSString? replacement, - int options, - NSRange searchRange) { - final _ret = _lib._objc_msgSend_247( - _id, - _lib._sel_stringByReplacingOccurrencesOfString_withString_options_range_1, - target?._id ?? ffi.nullptr, - replacement?._id ?? ffi.nullptr, - options, - searchRange); - return NSString._(_ret, _lib, retain: true, release: true); + static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55(_lib._class_NSNumber1, + _lib._sel_valueWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - NSString stringByReplacingOccurrencesOfString_withString_( - NSString? target, NSString? replacement) { - final _ret = _lib._objc_msgSend_248( - _id, - _lib._sel_stringByReplacingOccurrencesOfString_withString_1, - target?._id ?? ffi.nullptr, - replacement?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + static NSValue value_withObjCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSNumber1, _lib._sel_value_withObjCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - NSString stringByReplacingCharactersInRange_withString_( - NSRange range, NSString? replacement) { - final _ret = _lib._objc_msgSend_249( - _id, - _lib._sel_stringByReplacingCharactersInRange_withString_1, - range, - replacement?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + static NSValue valueWithNonretainedObject_( + NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_56(_lib._class_NSNumber1, + _lib._sel_valueWithNonretainedObject_1, anObject._id); + return NSValue._(_ret, _lib, retain: true, release: true); } - NSString stringByApplyingTransform_reverse_( - NSStringTransform transform, bool reverse) { - final _ret = _lib._objc_msgSend_250( - _id, _lib._sel_stringByApplyingTransform_reverse_1, transform, reverse); - return NSString._(_ret, _lib, retain: true, release: true); + static NSValue valueWithPointer_( + NativeCupertinoHttp _lib, ffi.Pointer pointer) { + final _ret = _lib._objc_msgSend_57( + _lib._class_NSNumber1, _lib._sel_valueWithPointer_1, pointer); + return NSValue._(_ret, _lib, retain: true, release: true); } - bool writeToURL_atomically_encoding_error_(NSURL? url, bool useAuxiliaryFile, - int enc, ffi.Pointer> error) { - return _lib._objc_msgSend_251( - _id, - _lib._sel_writeToURL_atomically_encoding_error_1, - url?._id ?? ffi.nullptr, - useAuxiliaryFile, - enc, - error); + static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_60( + _lib._class_NSNumber1, _lib._sel_valueWithRange_1, range); + return NSValue._(_ret, _lib, retain: true, release: true); } - bool writeToFile_atomically_encoding_error_( - NSString? path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error) { - return _lib._objc_msgSend_252( - _id, - _lib._sel_writeToFile_atomically_encoding_error_1, - path?._id ?? ffi.nullptr, - useAuxiliaryFile, - enc, - error); + static NSNumber new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); + return NSNumber._(_ret, _lib, retain: false, release: true); } - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSNumber alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); + return NSNumber._(_ret, _lib, retain: false, release: true); } +} - int get hash { - return _lib._objc_msgSend_12(_id, _lib._sel_hash1); - } +class NSValue extends NSObject { + NSValue._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - NSString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_253( - _id, - _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, - characters, - length, - freeBuffer); - return NSString._(_ret, _lib, retain: false, release: true); + /// Returns a [NSValue] that points to the same underlying object as [other]. + static NSValue castFrom(T other) { + return NSValue._(other._id, other._lib, retain: true, release: true); } - NSString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, int len, ObjCBlock17 deallocator) { - final _ret = _lib._objc_msgSend_254( - _id, - _lib._sel_initWithCharactersNoCopy_length_deallocator_1, - chars, - len, - deallocator._id); - return NSString._(_ret, _lib, retain: false, release: true); + /// Returns a [NSValue] that wraps the given raw object pointer. + static NSValue castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSValue._(other, lib, retain: retain, release: release); } - NSString initWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255( - _id, _lib._sel_initWithCharacters_length_1, characters, length); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSValue]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); } - NSString initWithUTF8String_(ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256( - _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); - return NSString._(_ret, _lib, retain: true, release: true); + void getValue_size_(ffi.Pointer value, int size) { + return _lib._objc_msgSend_33(_id, _lib._sel_getValue_size_1, value, size); } - NSString initWithString_(NSString? aString) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, aString?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + ffi.Pointer get objCType { + return _lib._objc_msgSend_53(_id, _lib._sel_objCType1); } - NSString initWithFormat_(NSString? format) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithFormat_1, format?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + NSValue initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_54( + _id, _lib._sel_initWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - NSString initWithFormat_arguments_(NSString? format, va_list argList) { - final _ret = _lib._objc_msgSend_257( - _id, - _lib._sel_initWithFormat_arguments_1, - format?._id ?? ffi.nullptr, - argList); - return NSString._(_ret, _lib, retain: true, release: true); + NSValue initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSValue._(_ret, _lib, retain: true, release: true); } - NSString initWithFormat_locale_(NSString? format, NSObject locale) { - final _ret = _lib._objc_msgSend_258(_id, _lib._sel_initWithFormat_locale_1, - format?._id ?? ffi.nullptr, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); + static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSValue1, _lib._sel_valueWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - NSString initWithFormat_locale_arguments_( - NSString? format, NSObject locale, va_list argList) { - final _ret = _lib._objc_msgSend_259( - _id, - _lib._sel_initWithFormat_locale_arguments_1, - format?._id ?? ffi.nullptr, - locale._id, - argList); - return NSString._(_ret, _lib, retain: true, release: true); + static NSValue value_withObjCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSValue1, _lib._sel_value_withObjCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - NSString initWithValidatedFormat_validFormatSpecifiers_error_( - NSString? format, - NSString? validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - error); - return NSString._(_ret, _lib, retain: true, release: true); + static NSValue valueWithNonretainedObject_( + NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_56(_lib._class_NSValue1, + _lib._sel_valueWithNonretainedObject_1, anObject._id); + return NSValue._(_ret, _lib, retain: true, release: true); } - NSString initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString? format, - NSString? validFormatSpecifiers, - NSObject locale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_261( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - locale._id, - error); - return NSString._(_ret, _lib, retain: true, release: true); + NSObject get nonretainedObjectValue { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nonretainedObjectValue1); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSString initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString? format, - NSString? validFormatSpecifiers, - va_list argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_262( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - argList, - error); - return NSString._(_ret, _lib, retain: true, release: true); + static NSValue valueWithPointer_( + NativeCupertinoHttp _lib, ffi.Pointer pointer) { + final _ret = _lib._objc_msgSend_57( + _lib._class_NSValue1, _lib._sel_valueWithPointer_1, pointer); + return NSValue._(_ret, _lib, retain: true, release: true); } - NSString - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString? format, - NSString? validFormatSpecifiers, - NSObject locale, - va_list argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_263( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - locale._id, - argList, - error); - return NSString._(_ret, _lib, retain: true, release: true); + ffi.Pointer get pointerValue { + return _lib._objc_msgSend_31(_id, _lib._sel_pointerValue1); } - NSString initWithData_encoding_(NSData? data, int encoding) { - final _ret = _lib._objc_msgSend_264(_id, _lib._sel_initWithData_encoding_1, - data?._id ?? ffi.nullptr, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + bool isEqualToValue_(NSValue? value) { + return _lib._objc_msgSend_58( + _id, _lib._sel_isEqualToValue_1, value?._id ?? ffi.nullptr); } - NSString initWithBytes_length_encoding_( - ffi.Pointer bytes, int len, int encoding) { - final _ret = _lib._objc_msgSend_265( - _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + void getValue_(ffi.Pointer value) { + return _lib._objc_msgSend_59(_id, _lib._sel_getValue_1, value); } - NSString initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _lib._objc_msgSend_266( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, - bytes, - len, - encoding, - freeBuffer); - return NSString._(_ret, _lib, retain: false, release: true); + static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_60( + _lib._class_NSValue1, _lib._sel_valueWithRange_1, range); + return NSValue._(_ret, _lib, retain: true, release: true); } - NSString initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - int len, - int encoding, - ObjCBlock14 deallocator) { - final _ret = _lib._objc_msgSend_267( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, - bytes, - len, - encoding, - deallocator._id); - return NSString._(_ret, _lib, retain: false, release: true); + NSRange get rangeValue { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeValue1); } - static NSString string(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_string1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSValue new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); + return NSValue._(_ret, _lib, retain: false, release: true); } - static NSString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + static NSValue alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); + return NSValue._(_ret, _lib, retain: false, release: true); } +} - static NSString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSString._(_ret, _lib, retain: true, release: true); - } +typedef NSInteger = ffi.Long; - static NSString stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSString._(_ret, _lib, retain: true, release: true); - } +class NSError extends NSObject { + NSError._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - static NSString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns a [NSError] that points to the same underlying object as [other]. + static NSError castFrom(T other) { + return NSError._(other._id, other._lib, retain: true, release: true); } - static NSString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns a [NSError] that wraps the given raw object pointer. + static NSError castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSError._(other, lib, retain: retain, release: release); } - static NSString stringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( - _lib._class_NSString1, - _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSError]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); } - static NSString - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( - _lib._class_NSString1, - _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// Domain cannot be nil; dict may be nil if no userInfo desired. + NSError initWithDomain_code_userInfo_( + NSErrorDomain domain, int code, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_179( + _id, + _lib._sel_initWithDomain_code_userInfo_1, + domain, + code, + dict?._id ?? ffi.nullptr); + return NSError._(_ret, _lib, retain: true, release: true); } - NSString initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _lib._objc_msgSend_268(_id, - _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + static NSError errorWithDomain_code_userInfo_(NativeCupertinoHttp _lib, + NSErrorDomain domain, int code, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_179( + _lib._class_NSError1, + _lib._sel_errorWithDomain_code_userInfo_1, + domain, + code, + dict?._id ?? ffi.nullptr); + return NSError._(_ret, _lib, retain: true, release: true); } - static NSString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSString._(_ret, _lib, retain: true, release: true); + /// These define the error. Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts. Codes are domain-specific. + NSErrorDomain get domain { + return _lib._objc_msgSend_32(_id, _lib._sel_domain1); } - NSString initWithContentsOfURL_encoding_error_( - NSURL? url, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_269( - _id, - _lib._sel_initWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + int get code { + return _lib._objc_msgSend_81(_id, _lib._sel_code1); } - NSString initWithContentsOfFile_encoding_error_( - NSString? path, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_270( - _id, - _lib._sel_initWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// Additional info which may be used to describe the error further. Examples of keys that might be included in here are "Line Number", "Failed URL", etc. Embedding other errors in here can also be used as a way to communicate underlying reasons for failures; for instance "File System Error" embedded in the userInfo of an NSError returned from a higher level document object. If the embedded error information is itself NSError, the standard key NSUnderlyingErrorKey can be used. + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSString stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_269( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// The primary user-presentable message for the error, for instance for NSFileReadNoPermissionError: "The file "File Name" couldn't be opened because you don't have permission to view it.". This message should ideally indicate what failed and why it failed. This value either comes from NSLocalizedDescriptionKey, or NSLocalizedFailureErrorKey+NSLocalizedFailureReasonErrorKey, or NSLocalizedFailureErrorKey. The steps this takes to construct the description include: + /// 1. Look for NSLocalizedDescriptionKey in userInfo, use value as-is if present. + /// 2. Look for NSLocalizedFailureErrorKey in userInfo. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. + /// 3. Fetch NSLocalizedDescriptionKey from userInfoValueProvider, use value as-is if present. + /// 4. Fetch NSLocalizedFailureErrorKey from userInfoValueProvider. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. + /// 5. Look for NSLocalizedFailureReasonErrorKey in userInfo or from userInfoValueProvider; combine with generic "Operation failed" message. + /// 6. Last resort localized but barely-presentable string manufactured from domain and code. The result is never nil. + NSString? get localizedDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSString stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_270( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// Return a complete sentence which describes why the operation failed. For instance, for NSFileReadNoPermissionError: "You don't have permission.". In many cases this will be just the "because" part of the error message (but as a complete sentence, which makes localization easier). Default implementation of this picks up the value of NSLocalizedFailureReasonErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. + NSString? get localizedFailureReason { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedFailureReason1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithContentsOfURL_usedEncoding_error_( - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_271( - _id, - _lib._sel_initWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel. For instance, for NSFileReadNoPermissionError: "To view or change permissions, select the item in the Finder and choose File > Get Info.". Default implementation of this picks up the value of NSLocalizedRecoverySuggestionErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. + NSString? get localizedRecoverySuggestion { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedRecoverySuggestion1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithContentsOfFile_usedEncoding_error_( - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_272( - _id, - _lib._sel_initWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// Return titles of buttons that are appropriate for displaying in an alert. These should match the string provided as a part of localizedRecoverySuggestion. The first string would be the title of the right-most and default button, the second one next to it, and so on. If used in an alert the corresponding default return values are NSAlertFirstButtonReturn + n. Default implementation of this picks up the value of NSLocalizedRecoveryOptionsErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. nil return usually implies no special suggestion, which would imply a single "OK" button. + NSArray? get localizedRecoveryOptions { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_localizedRecoveryOptions1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - static NSString stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_271( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// Return an object that conforms to the NSErrorRecoveryAttempting informal protocol. The recovery attempter must be an object that can correctly interpret an index into the array returned by localizedRecoveryOptions. The default implementation of this picks up the value of NSRecoveryAttempterErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. + NSObject get recoveryAttempter { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_recoveryAttempter1); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSString stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_272( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + /// Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user. This is done automatically by +[NSAlert alertWithError:], which the presentError: variants in NSApplication go through. The default implementation of this picks up the value of the NSHelpAnchorErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. + NSString? get helpAnchor { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_helpAnchor1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData? data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_273( - _lib._class_NSString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); + /// Return a list of underlying errors, if any. It includes the values of both NSUnderlyingErrorKey and NSMultipleUnderlyingErrorsKey. If there are no underlying errors, returns an empty array. + NSArray? get underlyingErrors { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_underlyingErrors1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - NSObject propertyList() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Specify a block which will be called from the implementations of localizedDescription, localizedFailureReason, localizedRecoverySuggestion, localizedRecoveryOptions, recoveryAttempter, helpAnchor, and debugDescription when the underlying value for these is not present in the userInfo dictionary of NSError instances with the specified domain. The provider will be called with the userInfo key corresponding to the queried property: For instance, NSLocalizedDescriptionKey for localizedDescription. The provider should return nil for any keys it is not able to provide and, very importantly, any keys it does not recognize (since we may extend the list of keys in future releases). + /// + /// The specified block will be called synchronously at the time when the above properties are queried. The results are not cached. + /// + /// This provider is optional. It enables localization and formatting of error messages to be done lazily; rather than populating the userInfo at NSError creation time, these keys will be fetched on-demand when asked for. + /// + /// It is expected that only the “owner” of an NSError domain specifies the provider for the domain, and this is done once. This facility is not meant for consumers of errors to customize the userInfo entries. This facility should not be used to customize the behaviors of error domains provided by the system. + /// + /// If an appropriate result for the requested key cannot be provided, return nil rather than choosing to manufacture a generic fallback response such as "Operation could not be completed, error 42." NSError will take care of the fallback cases. + static void setUserInfoValueProviderForDomain_provider_( + NativeCupertinoHttp _lib, + NSErrorDomain errorDomain, + ObjCBlock10 provider) { + return _lib._objc_msgSend_181( + _lib._class_NSError1, + _lib._sel_setUserInfoValueProviderForDomain_provider_1, + errorDomain, + provider._id); } - NSDictionary propertyListFromStringsFileFormat() { - final _ret = _lib._objc_msgSend_180( - _id, _lib._sel_propertyListFromStringsFileFormat1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static ObjCBlock10 userInfoValueProviderForDomain_(NativeCupertinoHttp _lib, + NSError? err, NSErrorUserInfoKey userInfoKey, NSErrorDomain errorDomain) { + final _ret = _lib._objc_msgSend_182( + _lib._class_NSError1, + _lib._sel_userInfoValueProviderForDomain_1, + err?._id ?? ffi.nullptr, + userInfoKey, + errorDomain); + return ObjCBlock10._(_ret, _lib); } - ffi.Pointer cString() { - return _lib._objc_msgSend_53(_id, _lib._sel_cString1); + static NSError new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); + return NSError._(_ret, _lib, retain: false, release: true); } - ffi.Pointer lossyCString() { - return _lib._objc_msgSend_53(_id, _lib._sel_lossyCString1); + static NSError alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); + return NSError._(_ret, _lib, retain: false, release: true); } +} - int cStringLength() { - return _lib._objc_msgSend_12(_id, _lib._sel_cStringLength1); - } +typedef NSErrorDomain = ffi.Pointer; - void getCString_(ffi.Pointer bytes) { - return _lib._objc_msgSend_274(_id, _lib._sel_getCString_1, bytes); - } +/// Immutable Dictionary +class NSDictionary extends NSObject { + NSDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { - return _lib._objc_msgSend_275( - _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); + /// Returns a [NSDictionary] that points to the same underlying object as [other]. + static NSDictionary castFrom(T other) { + return NSDictionary._(other._id, other._lib, retain: true, release: true); } - void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, - int maxLength, NSRange aRange, NSRangePointer leftoverRange) { - return _lib._objc_msgSend_276( - _id, - _lib._sel_getCString_maxLength_range_remainingRange_1, - bytes, - maxLength, - aRange, - leftoverRange); + /// Returns a [NSDictionary] that wraps the given raw object pointer. + static NSDictionary castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDictionary._(other, lib, retain: retain, release: release); } - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); + /// Returns whether [obj] is an instance of [NSDictionary]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); } - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - NSObject initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + NSObject objectForKey_(NSObject aKey) { + final _ret = _lib._objc_msgSend_91(_id, _lib._sel_objectForKey_1, aKey._id); return NSObject._(_ret, _lib, retain: true, release: true); } - NSObject initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + NSEnumerator keyEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_keyEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + NSDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + NSDictionary initWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_93( + _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - NSObject initWithCStringNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_277( - _id, - _lib._sel_initWithCStringNoCopy_length_freeWhenDone_1, - bytes, - length, - freeBuffer); - return NSObject._(_ret, _lib, retain: false, release: true); + NSDictionary initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - NSObject initWithCString_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_268( - _id, _lib._sel_initWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); + NSArray? get allKeys { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allKeys1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - NSObject initWithCString_(ffi.Pointer bytes) { + NSArray allKeysForObject_(NSObject anObject) { final _ret = - _lib._objc_msgSend_256(_id, _lib._sel_initWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( - _lib._class_NSString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_96(_id, _lib._sel_allKeysForObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - void getCharacters_(ffi.Pointer buffer) { - return _lib._objc_msgSend_278(_id, _lib._sel_getCharacters_1, buffer); + NSArray? get allValues { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allValues1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - /// Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode a URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. - NSString stringByAddingPercentEncodingWithAllowedCharacters_( - NSCharacterSet? allowedCharacters) { - final _ret = _lib._objc_msgSend_244( - _id, - _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, - allowedCharacters?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - /// Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. - NSString? get stringByRemovingPercentEncoding { + NSString? get descriptionInStringsFileFormat { final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_stringByRemovingPercentEncoding1); + _lib._objc_msgSend_32(_id, _lib._sel_descriptionInStringsFileFormat1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } - NSString stringByAddingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_15( - _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); return NSString._(_ret, _lib, retain: true, release: true); } - NSString stringByReplacingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_15( - _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); + NSString descriptionWithLocale_indent_(NSObject locale, int level) { + final _ret = _lib._objc_msgSend_99( + _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); return NSString._(_ret, _lib, retain: true, release: true); } - static NSString new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); - return NSString._(_ret, _lib, retain: false, release: true); + bool isEqualToDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_163(_id, _lib._sel_isEqualToDictionary_1, + otherDictionary?._id ?? ffi.nullptr); } - static NSString alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); - return NSString._(_ret, _lib, retain: false, release: true); + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); } -} - -extension StringToNSString on String { - NSString toNSString(NativeCupertinoHttp lib) => NSString(lib, this); -} - -typedef unichar = ffi.UnsignedShort; - -class NSCoder extends _ObjCWrapper { - NSCoder._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSCoder] that points to the same underlying object as [other]. - static NSCoder castFrom(T other) { - return NSCoder._(other._id, other._lib, retain: true, release: true); + NSArray objectsForKeys_notFoundMarker_(NSArray? keys, NSObject marker) { + final _ret = _lib._objc_msgSend_164( + _id, + _lib._sel_objectsForKeys_notFoundMarker_1, + keys?._id ?? ffi.nullptr, + marker._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSCoder] that wraps the given raw object pointer. - static NSCoder castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCoder._(other, lib, retain: retain, release: release); + /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. + bool writeToURL_error_( + NSURL? url, ffi.Pointer> error) { + return _lib._objc_msgSend_109( + _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); } - /// Returns whether [obj] is an instance of [NSCoder]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); + NSArray keysSortedByValueUsingSelector_(ffi.Pointer comparator) { + final _ret = _lib._objc_msgSend_107( + _id, _lib._sel_keysSortedByValueUsingSelector_1, comparator); + return NSArray._(_ret, _lib, retain: true, release: true); } -} -typedef NSRange = _NSRange; + /// count refers to the number of elements in the dictionary + void getObjects_andKeys_count_(ffi.Pointer> objects, + ffi.Pointer> keys, int count) { + return _lib._objc_msgSend_165( + _id, _lib._sel_getObjects_andKeys_count_1, objects, keys, count); + } -class _NSRange extends ffi.Struct { - @NSUInteger() - external int location; + NSObject objectForKeyedSubscript_(NSObject key) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_objectForKeyedSubscript_1, key._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @NSUInteger() - external int length; -} + void enumerateKeysAndObjectsUsingBlock_(ObjCBlock8 block) { + return _lib._objc_msgSend_166( + _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); + } -abstract class NSComparisonResult { - static const int NSOrderedAscending = -1; - static const int NSOrderedSame = 0; - static const int NSOrderedDescending = 1; -} + void enumerateKeysAndObjectsWithOptions_usingBlock_( + int opts, ObjCBlock8 block) { + return _lib._objc_msgSend_167( + _id, + _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, + opts, + block._id); + } -abstract class NSStringCompareOptions { - static const int NSCaseInsensitiveSearch = 1; - static const int NSLiteralSearch = 2; - static const int NSBackwardsSearch = 4; - static const int NSAnchoredSearch = 8; - static const int NSNumericSearch = 64; - static const int NSDiacriticInsensitiveSearch = 128; - static const int NSWidthInsensitiveSearch = 256; - static const int NSForcedOrderingSearch = 512; - static const int NSRegularExpressionSearch = 1024; -} + NSArray keysSortedByValueUsingComparator_(NSComparator cmptr) { + final _ret = _lib._objc_msgSend_141( + _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } -class NSLocale extends _ObjCWrapper { - NSLocale._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + NSArray keysSortedByValueWithOptions_usingComparator_( + int opts, NSComparator cmptr) { + final _ret = _lib._objc_msgSend_142(_id, + _lib._sel_keysSortedByValueWithOptions_usingComparator_1, opts, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSLocale] that points to the same underlying object as [other]. - static NSLocale castFrom(T other) { - return NSLocale._(other._id, other._lib, retain: true, release: true); + NSObject keysOfEntriesPassingTest_(ObjCBlock9 predicate) { + final _ret = _lib._objc_msgSend_168( + _id, _lib._sel_keysOfEntriesPassingTest_1, predicate._id); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSLocale] that wraps the given raw object pointer. - static NSLocale castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSLocale._(other, lib, retain: retain, release: release); + NSObject keysOfEntriesWithOptions_passingTest_( + int opts, ObjCBlock9 predicate) { + final _ret = _lib._objc_msgSend_169(_id, + _lib._sel_keysOfEntriesWithOptions_passingTest_1, opts, predicate._id); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSLocale]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLocale1); + /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:andKeys:count: + void getObjects_andKeys_(ffi.Pointer> objects, + ffi.Pointer> keys) { + return _lib._objc_msgSend_170( + _id, _lib._sel_getObjects_andKeys_1, objects, keys); } -} -class NSCharacterSet extends NSObject { - NSCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. + static NSDictionary dictionaryWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_171(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. - static NSCharacterSet castFrom(T other) { - return NSCharacterSet._(other._id, other._lib, retain: true, release: true); + static NSDictionary dictionaryWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_172(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSCharacterSet] that wraps the given raw object pointer. - static NSCharacterSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCharacterSet._(other, lib, retain: retain, release: release); + NSDictionary initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_171( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSCharacterSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSCharacterSet1); + NSDictionary initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_172( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); } - static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// the atomically flag is ignored if url of a type that cannot be written atomically. + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); } - static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSCharacterSet1, - _lib._sel_whitespaceAndNewlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + static NSDictionary dictionary(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + static NSDictionary dictionaryWithObject_forKey_( + NativeCupertinoHttp _lib, NSObject object, NSObject key) { + final _ret = _lib._objc_msgSend_173(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + static NSDictionary dictionaryWithObjects_forKeys_count_( + NativeCupertinoHttp _lib, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_93(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getLowercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + static NSDictionary dictionaryWithObjectsAndKeys_( + NativeCupertinoHttp _lib, NSObject firstObject) { + final _ret = _lib._objc_msgSend_91(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getUppercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + static NSDictionary dictionaryWithDictionary_( + NativeCupertinoHttp _lib, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_174(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + static NSDictionary dictionaryWithObjects_forKeys_( + NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_175( + _lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + NSDictionary initWithDictionary_(NSDictionary? otherDictionary) { + final _ret = _lib._objc_msgSend_174(_id, _lib._sel_initWithDictionary_1, + otherDictionary?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + NSDictionary initWithDictionary_copyItems_( + NSDictionary? otherDictionary, bool flag) { + final _ret = _lib._objc_msgSend_176( + _id, + _lib._sel_initWithDictionary_copyItems_1, + otherDictionary?._id ?? ffi.nullptr, + flag); + return NSDictionary._(_ret, _lib, retain: false, release: true); } - static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + NSDictionary initWithObjects_forKeys_(NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_175( + _id, + _lib._sel_initWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getCapitalizedLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Reads dictionary stored in NSPropertyList format from the specified url. + NSDictionary initWithContentsOfURL_error_( + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_177( + _id, + _lib._sel_initWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Reads dictionary stored in NSPropertyList format from the specified url. + static NSDictionary dictionaryWithContentsOfURL_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_177( + _lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: false, release: true); + /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. + /// The keys are copied from the array and must be copyable. + /// If the array parameter is nil or not an NSArray, an exception is thrown. + /// If the array of keys is empty, an empty key set is returned. + /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). + /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. + /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. + static NSObject sharedKeySetForKeys_( + NativeCupertinoHttp _lib, NSArray? keys) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSDictionary1, + _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet characterSetWithRange_( - NativeCupertinoHttp _lib, NSRange aRange) { - final _ret = _lib._objc_msgSend_29( - _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + int countByEnumeratingWithState_objects_count_( + ffi.Pointer state, + ffi.Pointer> buffer, + int len) { + return _lib._objc_msgSend_178( + _id, + _lib._sel_countByEnumeratingWithState_objects_count_1, + state, + buffer, + len); } - static NSCharacterSet characterSetWithCharactersInString_( - NativeCupertinoHttp _lib, NSString? aString) { - final _ret = _lib._objc_msgSend_30( - _lib._class_NSCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, - aString?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + static NSDictionary new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); + return NSDictionary._(_ret, _lib, retain: false, release: true); } - static NSCharacterSet characterSetWithBitmapRepresentation_( - NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_223( - _lib._class_NSCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, - data?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + static NSDictionary alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); + return NSDictionary._(_ret, _lib, retain: false, release: true); } +} - static NSCharacterSet characterSetWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? fName) { - final _ret = _lib._objc_msgSend_30(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); +class NSEnumerator extends NSObject { + NSEnumerator._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSEnumerator] that points to the same underlying object as [other]. + static NSEnumerator castFrom(T other) { + return NSEnumerator._(other._id, other._lib, retain: true, release: true); } - NSCharacterSet initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Returns a [NSEnumerator] that wraps the given raw object pointer. + static NSEnumerator castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSEnumerator._(other, lib, retain: retain, release: release); } - bool characterIsMember_(int aCharacter) { - return _lib._objc_msgSend_224( - _id, _lib._sel_characterIsMember_1, aCharacter); + /// Returns whether [obj] is an instance of [NSEnumerator]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSEnumerator1); } - NSData? get bitmapRepresentation { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_bitmapRepresentation1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + NSObject nextObject() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nextObject1); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSCharacterSet? get invertedSet { - final _ret = _lib._objc_msgSend_28(_id, _lib._sel_invertedSet1); + NSObject? get allObjects { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); return _ret.address == 0 ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - bool longCharacterIsMember_(int theLongChar) { - return _lib._objc_msgSend_225( - _id, _lib._sel_longCharacterIsMember_1, theLongChar); + : NSObject._(_ret, _lib, retain: true, release: true); } - bool isSupersetOfSet_(NSCharacterSet? theOtherSet) { - return _lib._objc_msgSend_226( - _id, _lib._sel_isSupersetOfSet_1, theOtherSet?._id ?? ffi.nullptr); + static NSEnumerator new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); + return NSEnumerator._(_ret, _lib, retain: false, release: true); } - bool hasMemberInPlane_(int thePlane) { - return _lib._objc_msgSend_227(_id, _lib._sel_hasMemberInPlane_1, thePlane); + static NSEnumerator alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); + return NSEnumerator._(_ret, _lib, retain: false, release: true); } +} - /// Returns a character set containing the characters allowed in a URL's user subcomponent. - static NSCharacterSet? getURLUserAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +/// Immutable Array +class NSArray extends NSObject { + NSArray._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - /// Returns a character set containing the characters allowed in a URL's password subcomponent. - static NSCharacterSet? getURLPasswordAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Returns a [NSArray] that points to the same underlying object as [other]. + static NSArray castFrom(T other) { + return NSArray._(other._id, other._lib, retain: true, release: true); } - /// Returns a character set containing the characters allowed in a URL's host subcomponent. - static NSCharacterSet? getURLHostAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Returns a [NSArray] that wraps the given raw object pointer. + static NSArray castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSArray._(other, lib, retain: retain, release: release); } - /// Returns a character set containing the characters allowed in a URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - static NSCharacterSet? getURLPathAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSArray]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); } - /// Returns a character set containing the characters allowed in a URL's query component. - static NSCharacterSet? getURLQueryAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - /// Returns a character set containing the characters allowed in a URL's fragment component. - static NSCharacterSet? getURLFragmentAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + NSObject objectAtIndex_(int index) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndex_1, index); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); + @override + NSArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); + NSArray initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_95( + _id, _lib._sel_initWithObjects_count_1, objects, cnt); + return NSArray._(_ret, _lib, retain: true, release: true); } -} - -class NSData extends NSObject { - NSData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSData] that points to the same underlying object as [other]. - static NSData castFrom(T other) { - return NSData._(other._id, other._lib, retain: true, release: true); + NSArray initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSData] that wraps the given raw object pointer. - static NSData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSData._(other, lib, retain: retain, release: release); + NSArray arrayByAddingObject_(NSObject anObject) { + final _ret = _lib._objc_msgSend_96( + _id, _lib._sel_arrayByAddingObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); + NSArray arrayByAddingObjectsFromArray_(NSArray? otherArray) { + final _ret = _lib._objc_msgSend_97( + _id, + _lib._sel_arrayByAddingObjectsFromArray_1, + otherArray?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); + NSString componentsJoinedByString_(NSString? separator) { + final _ret = _lib._objc_msgSend_98(_id, + _lib._sel_componentsJoinedByString_1, separator?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - /// The -bytes method returns a pointer to a contiguous region of memory managed by the receiver. - /// If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer - /// Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data. - ffi.Pointer get bytes { - return _lib._objc_msgSend_31(_id, _lib._sel_bytes1); + bool containsObject_(NSObject anObject) { + return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); } NSString? get description { @@ -61983,4574 +62448,4557 @@ class NSData extends NSObject { : NSString._(_ret, _lib, retain: true, release: true); } - void getBytes_length_(ffi.Pointer buffer, int length) { - return _lib._objc_msgSend_33( - _id, _lib._sel_getBytes_length_1, buffer, length); + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); } - void getBytes_range_(ffi.Pointer buffer, NSRange range) { - return _lib._objc_msgSend_34( - _id, _lib._sel_getBytes_range_1, buffer, range); + NSString descriptionWithLocale_indent_(NSObject locale, int level) { + final _ret = _lib._objc_msgSend_99( + _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); + return NSString._(_ret, _lib, retain: true, release: true); } - bool isEqualToData_(NSData? other) { - return _lib._objc_msgSend_35( - _id, _lib._sel_isEqualToData_1, other?._id ?? ffi.nullptr); + NSObject firstObjectCommonWithArray_(NSArray? otherArray) { + final _ret = _lib._objc_msgSend_100(_id, + _lib._sel_firstObjectCommonWithArray_1, otherArray?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSData subdataWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_36(_id, _lib._sel_subdataWithRange_1, range); - return NSData._(_ret, _lib, retain: true, release: true); + void getObjects_range_( + ffi.Pointer> objects, NSRange range) { + return _lib._objc_msgSend_101( + _id, _lib._sel_getObjects_range_1, objects, range); } - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); + int indexOfObject_(NSObject anObject) { + return _lib._objc_msgSend_102(_id, _lib._sel_indexOfObject_1, anObject._id); } - /// the atomically flag is ignored if the url is not of a type the supports atomic writes - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); + int indexOfObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_103( + _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); } - bool writeToFile_options_error_(NSString? path, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_208(_id, _lib._sel_writeToFile_options_error_1, - path?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); + int indexOfObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_102( + _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); } - bool writeToURL_options_error_(NSURL? url, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_209(_id, _lib._sel_writeToURL_options_error_1, - url?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); + int indexOfObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_103( + _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); } - NSRange rangeOfData_options_range_( - NSData? dataToFind, int mask, NSRange searchRange) { - return _lib._objc_msgSend_210(_id, _lib._sel_rangeOfData_options_range_1, - dataToFind?._id ?? ffi.nullptr, mask, searchRange); + bool isEqualToArray_(NSArray? otherArray) { + return _lib._objc_msgSend_104( + _id, _lib._sel_isEqualToArray_1, otherArray?._id ?? ffi.nullptr); } - /// 'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES. - void enumerateByteRangesUsingBlock_(ObjCBlock13 block) { - return _lib._objc_msgSend_211( - _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._id); + NSObject get firstObject { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_firstObject1); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSData data(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); + NSObject get lastObject { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_lastObject1); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212( - _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); } - static NSData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); + NSEnumerator reverseObjectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_reverseObjectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); } - static NSData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - int length, - bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); + NSData? get sortedArrayHint { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_sortedArrayHint1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - static NSData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); + NSArray sortedArrayUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context) { + final _ret = _lib._objc_msgSend_105( + _id, _lib._sel_sortedArrayUsingFunction_context_1, comparator, context); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSData dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); + NSArray sortedArrayUsingFunction_context_hint_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + NSData? hint) { + final _ret = _lib._objc_msgSend_106( + _id, + _lib._sel_sortedArrayUsingFunction_context_hint_1, + comparator, + context, + hint?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { + final _ret = _lib._objc_msgSend_107( + _id, _lib._sel_sortedArrayUsingSelector_1, comparator); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSData dataWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + NSArray subarrayWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_108(_id, _lib._sel_subarrayWithRange_1, range); + return NSArray._(_ret, _lib, retain: true, release: true); } - NSData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212( - _id, _lib._sel_initWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); + /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. + bool writeToURL_error_( + NSURL? url, ffi.Pointer> error) { + return _lib._objc_msgSend_109( + _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); } - NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212( - _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); + void makeObjectsPerformSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_7( + _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); } - NSData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_213(_id, - _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); + void makeObjectsPerformSelector_withObject_( + ffi.Pointer aSelector, NSObject argument) { + return _lib._objc_msgSend_110( + _id, + _lib._sel_makeObjectsPerformSelector_withObject_1, + aSelector, + argument._id); } - NSData initWithBytesNoCopy_length_deallocator_( - ffi.Pointer bytes, int length, ObjCBlock14 deallocator) { - final _ret = _lib._objc_msgSend_216( - _id, - _lib._sel_initWithBytesNoCopy_length_deallocator_1, - bytes, - length, - deallocator._id); - return NSData._(_ret, _lib, retain: false, release: true); + NSArray objectsAtIndexes_(NSIndexSet? indexes) { + final _ret = _lib._objc_msgSend_131( + _id, _lib._sel_objectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - NSData initWithContentsOfFile_options_error_(NSString? path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( - _id, - _lib._sel_initWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); + NSObject objectAtIndexedSubscript_(int idx) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndexedSubscript_1, idx); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSData initWithContentsOfURL_options_error_(NSURL? url, int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( - _id, - _lib._sel_initWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); + void enumerateObjectsUsingBlock_(ObjCBlock3 block) { + return _lib._objc_msgSend_132( + _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); } - NSData initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + void enumerateObjectsWithOptions_usingBlock_(int opts, ObjCBlock3 block) { + return _lib._objc_msgSend_133(_id, + _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); } - NSData initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + void enumerateObjectsAtIndexes_options_usingBlock_( + NSIndexSet? s, int opts, ObjCBlock3 block) { + return _lib._objc_msgSend_134( + _id, + _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, + s?._id ?? ffi.nullptr, + opts, + block._id); } - NSData initWithData_(NSData? data) { - final _ret = _lib._objc_msgSend_217( - _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + int indexOfObjectPassingTest_(ObjCBlock4 predicate) { + return _lib._objc_msgSend_135( + _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); } - static NSData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + int indexOfObjectWithOptions_passingTest_(int opts, ObjCBlock4 predicate) { + return _lib._objc_msgSend_136(_id, + _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); } - /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. - NSData initWithBase64EncodedString_options_( - NSString? base64String, int options) { - final _ret = _lib._objc_msgSend_218( + int indexOfObjectAtIndexes_options_passingTest_( + NSIndexSet? s, int opts, ObjCBlock4 predicate) { + return _lib._objc_msgSend_137( _id, - _lib._sel_initWithBase64EncodedString_options_1, - base64String?._id ?? ffi.nullptr, - options); - return NSData._(_ret, _lib, retain: true, release: true); + _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, + s?._id ?? ffi.nullptr, + opts, + predicate._id); } - /// Create a Base-64 encoded NSString from the receiver's contents using the given options. - NSString base64EncodedStringWithOptions_(int options) { - final _ret = _lib._objc_msgSend_219( - _id, _lib._sel_base64EncodedStringWithOptions_1, options); - return NSString._(_ret, _lib, retain: true, release: true); + NSIndexSet indexesOfObjectsPassingTest_(ObjCBlock4 predicate) { + final _ret = _lib._objc_msgSend_138( + _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. - NSData initWithBase64EncodedData_options_(NSData? base64Data, int options) { - final _ret = _lib._objc_msgSend_220( + NSIndexSet indexesOfObjectsWithOptions_passingTest_( + int opts, ObjCBlock4 predicate) { + final _ret = _lib._objc_msgSend_139( _id, - _lib._sel_initWithBase64EncodedData_options_1, - base64Data?._id ?? ffi.nullptr, - options); - return NSData._(_ret, _lib, retain: true, release: true); - } - - /// Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options. - NSData base64EncodedDataWithOptions_(int options) { - final _ret = _lib._objc_msgSend_221( - _id, _lib._sel_base64EncodedDataWithOptions_1, options); - return NSData._(_ret, _lib, retain: true, release: true); + _lib._sel_indexesOfObjectsWithOptions_passingTest_1, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. - NSData decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_222(_id, - _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); - return NSData._(_ret, _lib, retain: true, release: true); + NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( + NSIndexSet? s, int opts, ObjCBlock4 predicate) { + final _ret = _lib._objc_msgSend_140( + _id, + _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, + s?._id ?? ffi.nullptr, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - NSData compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_222( - _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); - return NSData._(_ret, _lib, retain: true, release: true); + NSArray sortedArrayUsingComparator_(NSComparator cmptr) { + final _ret = _lib._objc_msgSend_141( + _id, _lib._sel_sortedArrayUsingComparator_1, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - void getBytes_(ffi.Pointer buffer) { - return _lib._objc_msgSend_59(_id, _lib._sel_getBytes_1, buffer); + NSArray sortedArrayWithOptions_usingComparator_( + int opts, NSComparator cmptr) { + final _ret = _lib._objc_msgSend_142( + _id, _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// binary search + int indexOfObject_inSortedRange_options_usingComparator_( + NSObject obj, NSRange r, int opts, NSComparator cmp) { + return _lib._objc_msgSend_143( + _id, + _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, + obj._id, + r, + opts, + cmp); } - NSObject initWithContentsOfMappedFile_(NSString? path) { - final _ret = _lib._objc_msgSend_42(_id, - _lib._sel_initWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSArray array(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0. - NSObject initWithBase64Encoding_(NSString? base64String) { - final _ret = _lib._objc_msgSend_42(_id, _lib._sel_initWithBase64Encoding_1, - base64String?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSArray arrayWithObject_(NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - NSString base64Encoding() { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_base64Encoding1); - return NSString._(_ret, _lib, retain: true, release: true); + static NSArray arrayWithObjects_count_(NativeCupertinoHttp _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_95( + _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSData new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); - return NSData._(_ret, _lib, retain: false, release: true); + static NSArray arrayWithObjects_( + NativeCupertinoHttp _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSData alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); - return NSData._(_ret, _lib, retain: false, release: true); + static NSArray arrayWithArray_(NativeCupertinoHttp _lib, NSArray? array) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSArray1, + _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } -} - -class NSURL extends NSObject { - NSURL._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSURL] that points to the same underlying object as [other]. - static NSURL castFrom(T other) { - return NSURL._(other._id, other._lib, retain: true, release: true); + NSArray initWithObjects_(NSObject firstObj) { + final _ret = + _lib._objc_msgSend_91(_id, _lib._sel_initWithObjects_1, firstObj._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSURL] that wraps the given raw object pointer. - static NSURL castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURL._(other, lib, retain: retain, release: release); + NSArray initWithArray_(NSArray? array) { + final _ret = _lib._objc_msgSend_100( + _id, _lib._sel_initWithArray_1, array?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURL]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); + NSArray initWithArray_copyItems_(NSArray? array, bool flag) { + final _ret = _lib._objc_msgSend_144(_id, + _lib._sel_initWithArray_copyItems_1, array?._id ?? ffi.nullptr, flag); + return NSArray._(_ret, _lib, retain: false, release: true); } - /// this call percent-encodes both the host and path, so this cannot be used to set a username/password or port in the hostname part or with a IPv6 '[...]' type address. NSURLComponents handles IPv6 addresses correctly. - NSURL initWithScheme_host_path_( - NSString? scheme, NSString? host, NSString? path) { - final _ret = _lib._objc_msgSend_38( + /// Reads array stored in NSPropertyList format from the specified url. + NSArray initWithContentsOfURL_error_( + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_145( _id, - _lib._sel_initWithScheme_host_path_1, - scheme?._id ?? ffi.nullptr, - host?._id ?? ffi.nullptr, - path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + _lib._sel_initWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL. - NSURL initFileURLWithPath_isDirectory_relativeToURL_( - NSString? path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_39( - _id, - _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, - path?._id ?? ffi.nullptr, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + /// Reads array stored in NSPropertyList format from the specified url. + static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_145( + _lib._class_NSArray1, + _lib._sel_arrayWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. - NSURL initFileURLWithPath_relativeToURL_(NSString? path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_40( + NSOrderedCollectionDifference + differenceFromArray_withOptions_usingEquivalenceTest_( + NSArray? other, int options, ObjCBlock7 block) { + final _ret = _lib._objc_msgSend_154( _id, - _lib._sel_initFileURLWithPath_relativeToURL_1, - path?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + _lib._sel_differenceFromArray_withOptions_usingEquivalenceTest_1, + other?._id ?? ffi.nullptr, + options, + block._id); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - NSURL initFileURLWithPath_isDirectory_(NSString? path, bool isDir) { - final _ret = _lib._objc_msgSend_41( + NSOrderedCollectionDifference differenceFromArray_withOptions_( + NSArray? other, int options) { + final _ret = _lib._objc_msgSend_155( _id, - _lib._sel_initFileURLWithPath_isDirectory_1, - path?._id ?? ffi.nullptr, - isDir); - return NSURL._(_ret, _lib, retain: true, release: true); + _lib._sel_differenceFromArray_withOptions_1, + other?._id ?? ffi.nullptr, + options); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - /// Better to use initFileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. - NSURL initFileURLWithPath_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initFileURLWithPath_1, path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + /// Uses isEqual: to determine the difference between the parameter and the receiver + NSOrderedCollectionDifference differenceFromArray_(NSArray? other) { + final _ret = _lib._objc_msgSend_156( + _id, _lib._sel_differenceFromArray_1, other?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - /// Initializes and returns a newly created file NSURL referencing the local file or directory at path, relative to a base URL. - static NSURL fileURLWithPath_isDirectory_relativeToURL_( - NativeCupertinoHttp _lib, NSString? path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_43( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, - path?._id ?? ffi.nullptr, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + NSArray arrayByApplyingDifference_( + NSOrderedCollectionDifference? difference) { + final _ret = _lib._objc_msgSend_157(_id, + _lib._sel_arrayByApplyingDifference_1, difference?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Better to use fileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. - static NSURL fileURLWithPath_relativeToURL_( - NativeCupertinoHttp _lib, NSString? path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_44( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_relativeToURL_1, - path?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead. + void getObjects_(ffi.Pointer> objects) { + return _lib._objc_msgSend_158(_id, _lib._sel_getObjects_1, objects); } - static NSURL fileURLWithPath_isDirectory_( - NativeCupertinoHttp _lib, NSString? path, bool isDir) { - final _ret = _lib._objc_msgSend_45( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_1, - path?._id ?? ffi.nullptr, - isDir); - return NSURL._(_ret, _lib, retain: true, release: true); + /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. + static NSArray arrayWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_159(_lib._class_NSArray1, + _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Better to use fileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. - static NSURL fileURLWithPath_(NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_46(_lib._class_NSURL1, - _lib._sel_fileURLWithPath_1, path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + static NSArray arrayWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_160(_lib._class_NSArray1, + _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Initializes a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. - NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_47( - _id, - _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + NSArray initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_159( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Initializes and returns a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. - static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - NativeCupertinoHttp _lib, - ffi.Pointer path, - bool isDir, - NSURL? baseURL) { - final _ret = _lib._objc_msgSend_48( - _lib._class_NSURL1, - _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + NSArray initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_160( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// These methods expect their string arguments to contain any percent escape codes that are necessary. It is an error for URLString to be nil. - NSURL initWithString_(NSString? URLString) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); } - NSURL initWithString_relativeToURL_(NSString? URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_40( - _id, - _lib._sel_initWithString_relativeToURL_1, - URLString?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); } - static NSURL URLWithString_(NativeCupertinoHttp _lib, NSString? URLString) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSURL1, - _lib._sel_URLWithString_1, URLString?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + static NSArray new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); + return NSArray._(_ret, _lib, retain: false, release: true); } - static NSURL URLWithString_relativeToURL_( - NativeCupertinoHttp _lib, NSString? URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_40( - _lib._class_NSURL1, - _lib._sel_URLWithString_relativeToURL_1, - URLString?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + static NSArray alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); + return NSArray._(_ret, _lib, retain: false, release: true); } +} - /// Initializes a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - NSURL initWithDataRepresentation_relativeToURL_( - NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_49( - _id, - _lib._sel_initWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes and returns a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - static NSURL URLWithDataRepresentation_relativeToURL_( - NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_50( - _lib._class_NSURL1, - _lib._sel_URLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( - NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_49( - _id, - _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes and returns a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - static NSURL absoluteURLWithDataRepresentation_relativeToURL_( - NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_50( - _lib._class_NSURL1, - _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +class NSIndexSet extends NSObject { + NSIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - /// Returns the data representation of the URL's relativeString. If the URL was initialized with -initWithData:relativeToURL:, the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with NSUTF8StringEncoding. - NSData? get dataRepresentation { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_dataRepresentation1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + /// Returns a [NSIndexSet] that points to the same underlying object as [other]. + static NSIndexSet castFrom(T other) { + return NSIndexSet._(other._id, other._lib, retain: true, release: true); } - NSString? get absoluteString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_absoluteString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Returns a [NSIndexSet] that wraps the given raw object pointer. + static NSIndexSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSIndexSet._(other, lib, retain: retain, release: release); } - /// The relative portion of a URL. If baseURL is nil, or if the receiver is itself absolute, this is the same as absoluteString - NSString? get relativeString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativeString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSIndexSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); } - /// may be nil. - NSURL? get baseURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_baseURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static NSIndexSet indexSet(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - /// if the receiver is itself absolute, this will return self. - NSURL? get absoluteURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_absoluteURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static NSIndexSet indexSetWithIndex_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - /// Any URL is composed of these two basic pieces. The full URL would be the concatenation of [myURL scheme], ':', [myURL resourceSpecifier] - NSString? get scheme { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + static NSIndexSet indexSetWithIndexesInRange_( + NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_111( + _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - NSString? get resourceSpecifier { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_resourceSpecifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSIndexSet initWithIndexesInRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_111(_id, _lib._sel_initWithIndexesInRange_1, range); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - /// If the URL conforms to rfc 1808 (the most common form of URL), the following accessors will return the various components; otherwise they return nil. The litmus test for conformance is as recommended in RFC 1808 - whether the first two characters of resourceSpecifier is @"//". In all cases, they return the component's value after resolving the receiver against its base URL. - NSString? get host { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSIndexSet initWithIndexSet_(NSIndexSet? indexSet) { + final _ret = _lib._objc_msgSend_112( + _id, _lib._sel_initWithIndexSet_1, indexSet?._id ?? ffi.nullptr); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - NSNumber? get port { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + NSIndexSet initWithIndex_(int value) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithIndex_1, value); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - NSString? get user { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + bool isEqualToIndexSet_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_113( + _id, _lib._sel_isEqualToIndexSet_1, indexSet?._id ?? ffi.nullptr); } - NSString? get password { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - NSString? get path { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get firstIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); } - NSString? get fragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int get lastIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); } - NSString? get parameterString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_parameterString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int indexGreaterThanIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexGreaterThanIndex_1, value); } - NSString? get query { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int indexLessThanIndex_(int value) { + return _lib._objc_msgSend_114(_id, _lib._sel_indexLessThanIndex_1, value); } - /// The same as path if baseURL is nil - NSString? get relativePath { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativePath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int indexGreaterThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); } - /// Determines if a given URL string's path represents a directory (i.e. the path component in the URL string ends with a '/' character). This does not check the resource the URL refers to. - bool get hasDirectoryPath { - return _lib._objc_msgSend_11(_id, _lib._sel_hasDirectoryPath1); + int indexLessThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); } - /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer buffer, int maxBufferLength) { - return _lib._objc_msgSend_90( + int getIndexes_maxCount_inIndexRange_(ffi.Pointer indexBuffer, + int bufferSize, NSRangePointer range) { + return _lib._objc_msgSend_115( _id, - _lib._sel_getFileSystemRepresentation_maxLength_1, - buffer, - maxBufferLength); - } - - /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. The returned C string will be automatically freed just as a returned object would be released; your code should copy the representation or use getFileSystemRepresentation:maxLength: if it needs to store the representation outside of the autorelease context in which the representation is created. - ffi.Pointer get fileSystemRepresentation { - return _lib._objc_msgSend_53(_id, _lib._sel_fileSystemRepresentation1); + _lib._sel_getIndexes_maxCount_inIndexRange_1, + indexBuffer, + bufferSize, + range); } - /// Whether the scheme is file:; if [myURL isFileURL] is YES, then [myURL path] is suitable for input into NSFileManager or NSPathUtilities. - bool get fileURL { - return _lib._objc_msgSend_11(_id, _lib._sel_isFileURL1); + int countOfIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_116( + _id, _lib._sel_countOfIndexesInRange_1, range); } - NSURL? get standardizedURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_standardizedURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + bool containsIndex_(int value) { + return _lib._objc_msgSend_117(_id, _lib._sel_containsIndex_1, value); } - /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. - bool checkResourceIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_183( - _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); + bool containsIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_118( + _id, _lib._sel_containsIndexesInRange_1, range); } - /// Returns whether the URL is a file reference URL. Symbol is present in iOS 4, but performs no operation. - bool isFileReferenceURL() { - return _lib._objc_msgSend_11(_id, _lib._sel_isFileReferenceURL1); + bool containsIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_113( + _id, _lib._sel_containsIndexes_1, indexSet?._id ?? ffi.nullptr); } - /// Returns a file reference URL that refers to the same resource as a specified file URL. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:). Symbol is present in iOS 4, but performs no operation. - NSURL fileReferenceURL() { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileReferenceURL1); - return NSURL._(_ret, _lib, retain: true, release: true); + bool intersectsIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_118( + _id, _lib._sel_intersectsIndexesInRange_1, range); } - /// Returns a file path URL that refers to the same resource as a specified URL. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. Symbol is present in iOS 4, but performs no operation. - NSURL? get filePathURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_filePathURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + void enumerateIndexesUsingBlock_(ObjCBlock block) { + return _lib._objc_msgSend_119( + _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); } - /// Returns the resource value identified by a given resource key. This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this method returns YES and value is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool getResourceValue_forKey_error_( - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_184( - _id, _lib._sel_getResourceValue_forKey_error_1, value, key, error); + void enumerateIndexesWithOptions_usingBlock_(int opts, ObjCBlock block) { + return _lib._objc_msgSend_120(_id, + _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); } - /// Returns the resource values identified by specified array of resource keys. This method first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this method returns NULL, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - NSDictionary resourceValuesForKeys_error_( - NSArray? keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_185( + void enumerateIndexesInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock block) { + return _lib._objc_msgSend_121( _id, - _lib._sel_resourceValuesForKeys_error_1, - keys?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); + _lib._sel_enumerateIndexesInRange_options_usingBlock_1, + range, + opts, + block._id); } - /// Sets the resource value identified by a given resource key. This method writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool setResourceValue_forKey_error_(NSObject value, NSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_186( - _id, _lib._sel_setResourceValue_forKey_error_1, value._id, key, error); + int indexPassingTest_(ObjCBlock1 predicate) { + return _lib._objc_msgSend_122( + _id, _lib._sel_indexPassingTest_1, predicate._id); } - /// Sets any number of resource values of a URL's resource. This method writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to this method or to -setResourceValue:forKey:error: to guarantee the order. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool setResourceValues_error_( - NSDictionary? keyedValues, ffi.Pointer> error) { - return _lib._objc_msgSend_187(_id, _lib._sel_setResourceValues_error_1, - keyedValues?._id ?? ffi.nullptr, error); + int indexWithOptions_passingTest_(int opts, ObjCBlock1 predicate) { + return _lib._objc_msgSend_123( + _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); } - /// Removes the cached resource value identified by a given resource value key from the URL object. Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources. - void removeCachedResourceValueForKey_(NSURLResourceKey key) { - return _lib._objc_msgSend_188( - _id, _lib._sel_removeCachedResourceValueForKey_1, key); + int indexInRange_options_passingTest_( + NSRange range, int opts, ObjCBlock1 predicate) { + return _lib._objc_msgSend_124( + _id, + _lib._sel_indexInRange_options_passingTest_1, + range, + opts, + predicate._id); } - /// Removes all cached resource values and all temporary resource values from the URL object. This method is currently applicable only to URLs for file system resources. - void removeAllCachedResourceValues() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); + NSIndexSet indexesPassingTest_(ObjCBlock1 predicate) { + final _ret = _lib._objc_msgSend_125( + _id, _lib._sel_indexesPassingTest_1, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - /// NS_SWIFT_SENDABLE - void setTemporaryResourceValue_forKey_(NSObject value, NSURLResourceKey key) { - return _lib._objc_msgSend_189( - _id, _lib._sel_setTemporaryResourceValue_forKey_1, value._id, key); + NSIndexSet indexesWithOptions_passingTest_(int opts, ObjCBlock1 predicate) { + final _ret = _lib._objc_msgSend_126( + _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - /// Returns bookmark data for the URL, created with specified options and resource values. If this method returns nil, the optional error is populated. - NSData - bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( - int options, - NSArray? keys, - NSURL? relativeURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_190( + NSIndexSet indexesInRange_options_passingTest_( + NSRange range, int opts, ObjCBlock1 predicate) { + final _ret = _lib._objc_msgSend_127( _id, - _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, - options, - keys?._id ?? ffi.nullptr, - relativeURL?._id ?? ffi.nullptr, - error); - return NSData._(_ret, _lib, retain: true, release: true); + _lib._sel_indexesInRange_options_passingTest_1, + range, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - /// Initializes a newly created NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. - NSURL - initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NSData? bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_191( - _id, - _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData?._id ?? ffi.nullptr, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return NSURL._(_ret, _lib, retain: true, release: true); + void enumerateRangesUsingBlock_(ObjCBlock2 block) { + return _lib._objc_msgSend_128( + _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); } - /// Creates and Initializes an NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. - static NSURL - URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NativeCupertinoHttp _lib, - NSData? bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_191( - _lib._class_NSURL1, - _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData?._id ?? ffi.nullptr, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return NSURL._(_ret, _lib, retain: true, release: true); + void enumerateRangesWithOptions_usingBlock_(int opts, ObjCBlock2 block) { + return _lib._objc_msgSend_129(_id, + _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); } - /// Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available in the bookmark data. - static NSDictionary resourceValuesForKeys_fromBookmarkData_( - NativeCupertinoHttp _lib, NSArray? keys, NSData? bookmarkData) { - final _ret = _lib._objc_msgSend_192( - _lib._class_NSURL1, - _lib._sel_resourceValuesForKeys_fromBookmarkData_1, - keys?._id ?? ffi.nullptr, - bookmarkData?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void enumerateRangesInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock2 block) { + return _lib._objc_msgSend_130( + _id, + _lib._sel_enumerateRangesInRange_options_usingBlock_1, + range, + opts, + block._id); } - /// Creates an alias file on disk at a specified location with specified bookmark data. bookmarkData must have been created with the NSURLBookmarkCreationSuitableForBookmarkFile option. bookmarkFileURL must either refer to an existing file (which will be overwritten), or to location in an existing directory. If this method returns NO, the optional error is populated. - static bool writeBookmarkData_toURL_options_error_( - NativeCupertinoHttp _lib, - NSData? bookmarkData, - NSURL? bookmarkFileURL, - int options, - ffi.Pointer> error) { - return _lib._objc_msgSend_193( - _lib._class_NSURL1, - _lib._sel_writeBookmarkData_toURL_options_error_1, - bookmarkData?._id ?? ffi.nullptr, - bookmarkFileURL?._id ?? ffi.nullptr, - options, - error); + static NSIndexSet new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); + return NSIndexSet._(_ret, _lib, retain: false, release: true); } - /// Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. If bookmarkFileURL refers to an alias file created prior to OS X v10.6 that contains Alias Manager information but no bookmark data, this method synthesizes bookmark data for the file. If this method returns nil, the optional error is populated. - static NSData bookmarkDataWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? bookmarkFileURL, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_194( - _lib._class_NSURL1, - _lib._sel_bookmarkDataWithContentsOfURL_error_1, - bookmarkFileURL?._id ?? ffi.nullptr, - error); - return NSData._(_ret, _lib, retain: true, release: true); + static NSIndexSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); + return NSIndexSet._(_ret, _lib, retain: false, release: true); } +} - /// Creates and initializes a NSURL that refers to the location specified by resolving the alias file at url. If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, the NSURL returned is the same as url argument. This method fails and returns nil if the url argument is unreachable, or if the original file or directory could not be located or is not reachable, or if the original file or directory is on a volume that could not be located or mounted. If this method fails, the optional error is populated. The NSURLBookmarkResolutionWithSecurityScope option is not supported by this method. - static NSURL URLByResolvingAliasFileAtURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int options, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_195( - _lib._class_NSURL1, - _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, - url?._id ?? ffi.nullptr, - options, - error); - return NSURL._(_ret, _lib, retain: true, release: true); - } +typedef NSRangePointer = ffi.Pointer; - /// Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. When access to this resource is no longer needed the client must call stopAccessingSecurityScopedResource. Each call to startAccessingSecurityScopedResource must be balanced with a call to stopAccessingSecurityScopedResource (Note: this is not reference counted). - bool startAccessingSecurityScopedResource() { - return _lib._objc_msgSend_11( - _id, _lib._sel_startAccessingSecurityScopedResource1); - } +class _ObjCBlockBase implements ffi.Finalizable { + final ffi.Pointer<_ObjCBlock> _id; + final NativeCupertinoHttp _lib; + bool _pendingRelease; - /// Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource. - void stopAccessingSecurityScopedResource() { - return _lib._objc_msgSend_1( - _id, _lib._sel_stopAccessingSecurityScopedResource1); + _ObjCBlockBase._(this._id, this._lib, + {bool retain = false, bool release = false}) + : _pendingRelease = release { + if (retain) { + _lib._Block_copy(_id.cast()); + } + if (release) { + _lib._objc_releaseFinalizer11.attach(this, _id.cast(), detach: this); + } } - /// Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: - /// - NSMetadataQueryUbiquitousDataScope - /// - NSMetadataQueryUbiquitousDocumentsScope - /// - An NSFilePresenter presenting the contents of the directory located by -URLForUbiquitousContainerIdentifier: or a subdirectory thereof - /// - /// The following methods behave identically to their similarly named methods above (-getResourceValue:forKey:error:, etc.), except that they allow you to get resource values and check for presence regardless of whether the promised item's contents currently exist at the URL. You must use these APIs instead of the normal NSURL resource value APIs if and only if any of the following are true: - /// - You are using a URL that you know came directly from one of the above APIs - /// - You are inside the accessor block of a coordinated read or write that used NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingContentIndependentMetadataOnly - /// - /// Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. - bool getPromisedItemResourceValue_forKey_error_( - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_184( - _id, - _lib._sel_getPromisedItemResourceValue_forKey_error_1, - value, - key, - error); + /// Releases the reference to the underlying ObjC block held by this wrapper. + /// Throws a StateError if this wrapper doesn't currently hold a reference. + void release() { + if (_pendingRelease) { + _pendingRelease = false; + _lib._Block_release(_id.cast()); + _lib._objc_releaseFinalizer11.detach(this); + } else { + throw StateError( + 'Released an ObjC block that was unowned or already released.'); + } } - NSDictionary promisedItemResourceValuesForKeys_error_( - NSArray? keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_185( - _id, - _lib._sel_promisedItemResourceValuesForKeys_error_1, - keys?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); + @override + bool operator ==(Object other) { + return other is _ObjCBlockBase && _id == other._id; } - bool checkPromisedItemIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_183( - _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); - } + @override + int get hashCode => _id.hashCode; +} - /// The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. - static NSURL fileURLWithPathComponents_( - NativeCupertinoHttp _lib, NSArray? components) { - final _ret = _lib._objc_msgSend_196(_lib._class_NSURL1, - _lib._sel_fileURLWithPathComponents_1, components?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); +} - NSArray? get pathComponents { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_pathComponents1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock_closureRegistry = {}; +int _ObjCBlock_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_registerClosure(Function fn) { + final id = ++_ObjCBlock_closureRegistryIndex; + _ObjCBlock_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSString? get lastPathComponent { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lastPathComponent1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return _ObjCBlock_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - NSString? get pathExtension { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_pathExtension1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock extends _ObjCBlockBase { + ObjCBlock._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - NSURL URLByAppendingPathComponent_(NSString? pathComponent) { - final _ret = _lib._objc_msgSend_46( - _id, - _lib._sel_URLByAppendingPathComponent_1, - pathComponent?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + NSUInteger arg0, ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - NSURL URLByAppendingPathComponent_isDirectory_( - NSString? pathComponent, bool isDirectory) { - final _ret = _lib._objc_msgSend_45( - _id, - _lib._sel_URLByAppendingPathComponent_isDirectory_1, - pathComponent?._id ?? ffi.nullptr, - isDirectory); - return NSURL._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock.fromFunction(NativeCupertinoHttp lib, + void Function(int arg0, ffi.Pointer arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock_closureTrampoline) + .cast(), + _ObjCBlock_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(int arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, int arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } - NSURL? get URLByDeletingLastPathComponent { - final _ret = - _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingLastPathComponent1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - NSURL URLByAppendingPathExtension_(NSString? pathExtension) { - final _ret = _lib._objc_msgSend_46( - _id, - _lib._sel_URLByAppendingPathExtension_1, - pathExtension?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +class _ObjCBlockDesc extends ffi.Struct { + @ffi.UnsignedLong() + external int reserved; - NSURL? get URLByDeletingPathExtension { - final _ret = - _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingPathExtension1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.UnsignedLong() + external int size; - /// The following methods work only on `file:` scheme URLs; for non-`file:` scheme URLs, these methods return the URL unchanged. - NSURL? get URLByStandardizingPath { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URLByStandardizingPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer copy_helper; - NSURL? get URLByResolvingSymlinksInPath { - final _ret = - _lib._objc_msgSend_52(_id, _lib._sel_URLByResolvingSymlinksInPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer dispose_helper; - /// Blocks to load the data if necessary. If shouldUseCache is YES, then if an equivalent URL has already been loaded and cached, its resource data will be returned immediately. If shouldUseCache is NO, a new load will be started - NSData resourceDataUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_197( - _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); - return NSData._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer signature; +} - /// Starts an asynchronous load of the data, registering delegate to receive notification. Only one such background load can proceed at a time. - void loadResourceDataNotifyingClient_usingCache_( - NSObject client, bool shouldUseCache) { - return _lib._objc_msgSend_198( - _id, - _lib._sel_loadResourceDataNotifyingClient_usingCache_1, - client._id, - shouldUseCache); - } +class _ObjCBlock extends ffi.Struct { + external ffi.Pointer isa; - NSObject propertyForKey_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int flags; - /// These attempt to write the given arguments for the resource specified by the URL; they return success or failure - bool setResourceData_(NSData? data) { - return _lib._objc_msgSend_35( - _id, _lib._sel_setResourceData_1, data?._id ?? ffi.nullptr); - } + @ffi.Int() + external int reserved; - bool setProperty_forKey_(NSObject property, NSString? propertyKey) { - return _lib._objc_msgSend_199(_id, _lib._sel_setProperty_forKey_1, - property._id, propertyKey?._id ?? ffi.nullptr); - } + external ffi.Pointer invoke; - /// Sophisticated clients will want to ask for this, then message the handle directly. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded - NSURLHandle URLHandleUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_207( - _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); - return NSURLHandle._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer<_ObjCBlockDesc> descriptor; - static NSURL new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); - return NSURL._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer target; +} - static NSURL alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); - return NSURL._(_ret, _lib, retain: false, release: true); - } +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; } -class NSNumber extends NSValue { - NSNumber._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +bool _ObjCBlock1_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + bool Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); +} - /// Returns a [NSNumber] that points to the same underlying object as [other]. - static NSNumber castFrom(T other) { - return NSNumber._(other._id, other._lib, retain: true, release: true); - } +final _ObjCBlock1_closureRegistry = {}; +int _ObjCBlock1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock1_registerClosure(Function fn) { + final id = ++_ObjCBlock1_closureRegistryIndex; + _ObjCBlock1_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns a [NSNumber] that wraps the given raw object pointer. - static NSNumber castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumber._(other, lib, retain: retain, release: release); - } +bool _ObjCBlock1_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return _ObjCBlock1_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - /// Returns whether [obj] is an instance of [NSNumber]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); - } +class ObjCBlock1 extends _ObjCBlockBase { + ObjCBlock1._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @override - NSNumber initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock1.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock1_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - NSNumber initWithChar_(int value) { - final _ret = _lib._objc_msgSend_62(_id, _lib._sel_initWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock1.fromFunction(NativeCupertinoHttp lib, + bool Function(int arg0, ffi.Pointer arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock1_closureTrampoline, false) + .cast(), + _ObjCBlock1_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call(int arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer<_ObjCBlock> block, int arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } - NSNumber initWithUnsignedChar_(int value) { - final _ret = - _lib._objc_msgSend_63(_id, _lib._sel_initWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - NSNumber initWithShort_(int value) { - final _ret = _lib._objc_msgSend_64(_id, _lib._sel_initWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock2_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function( + NSRange arg0, ffi.Pointer arg1)>()(arg0, arg1); +} - NSNumber initWithUnsignedShort_(int value) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_initWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock2_closureRegistry = {}; +int _ObjCBlock2_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock2_registerClosure(Function fn) { + final id = ++_ObjCBlock2_closureRegistryIndex; + _ObjCBlock2_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSNumber initWithInt_(int value) { - final _ret = _lib._objc_msgSend_66(_id, _lib._sel_initWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock2_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { + return _ObjCBlock2_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - NSNumber initWithUnsignedInt_(int value) { - final _ret = - _lib._objc_msgSend_67(_id, _lib._sel_initWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock2 extends _ObjCBlockBase { + ObjCBlock2._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - NSNumber initWithLong_(int value) { - final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock2.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSRange arg0, ffi.Pointer arg1)>( + _ObjCBlock2_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - NSNumber initWithUnsignedLong_(int value) { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock2.fromFunction(NativeCupertinoHttp lib, + void Function(NSRange arg0, ffi.Pointer arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSRange arg0, ffi.Pointer arg1)>( + _ObjCBlock2_closureTrampoline) + .cast(), + _ObjCBlock2_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(NSRange arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } - NSNumber initWithLongLong_(int value) { - final _ret = - _lib._objc_msgSend_70(_id, _lib._sel_initWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - NSNumber initWithUnsignedLongLong_(int value) { - final _ret = - _lib._objc_msgSend_71(_id, _lib._sel_initWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock3_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} - NSNumber initWithFloat_(double value) { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_initWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock3_closureRegistry = {}; +int _ObjCBlock3_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock3_registerClosure(Function fn) { + final id = ++_ObjCBlock3_closureRegistryIndex; + _ObjCBlock3_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSNumber initWithDouble_(double value) { - final _ret = _lib._objc_msgSend_73(_id, _lib._sel_initWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock3_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _ObjCBlock3_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - NSNumber initWithBool_(bool value) { - final _ret = _lib._objc_msgSend_74(_id, _lib._sel_initWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock3 extends _ObjCBlockBase { + ObjCBlock3._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - NSNumber initWithInteger_(int value) { - final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock3.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + NSUInteger arg1, ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock3_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - NSNumber initWithUnsignedInteger_(int value) { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock3.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock3_closureTrampoline) + .cast(), + _ObjCBlock3_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); } - int get charValue { - return _lib._objc_msgSend_75(_id, _lib._sel_charValue1); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - int get unsignedCharValue { - return _lib._objc_msgSend_76(_id, _lib._sel_unsignedCharValue1); - } +bool _ObjCBlock4_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} - int get shortValue { - return _lib._objc_msgSend_77(_id, _lib._sel_shortValue1); - } +final _ObjCBlock4_closureRegistry = {}; +int _ObjCBlock4_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock4_registerClosure(Function fn) { + final id = ++_ObjCBlock4_closureRegistryIndex; + _ObjCBlock4_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - int get unsignedShortValue { - return _lib._objc_msgSend_78(_id, _lib._sel_unsignedShortValue1); - } - - int get intValue { - return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); - } - - int get unsignedIntValue { - return _lib._objc_msgSend_80(_id, _lib._sel_unsignedIntValue1); - } - - int get longValue { - return _lib._objc_msgSend_81(_id, _lib._sel_longValue1); - } +bool _ObjCBlock4_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _ObjCBlock4_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - int get unsignedLongValue { - return _lib._objc_msgSend_12(_id, _lib._sel_unsignedLongValue1); - } +class ObjCBlock4 extends _ObjCBlockBase { + ObjCBlock4._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - int get longLongValue { - return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); - } + /// Creates a block from a C function pointer. + ObjCBlock4.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + NSUInteger arg1, ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock4_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - int get unsignedLongLongValue { - return _lib._objc_msgSend_83(_id, _lib._sel_unsignedLongLongValue1); + /// Creates a block from a Dart function. + ObjCBlock4.fromFunction( + NativeCupertinoHttp lib, + bool Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock4_closureTrampoline, false) + .cast(), + _ObjCBlock4_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call( + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); } - double get floatValue { - return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - double get doubleValue { - return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); - } +typedef NSComparator = ffi.Pointer<_ObjCBlock>; +int _ObjCBlock5_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} - bool get boolValue { - return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); - } +final _ObjCBlock5_closureRegistry = {}; +int _ObjCBlock5_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock5_registerClosure(Function fn) { + final id = ++_ObjCBlock5_closureRegistryIndex; + _ObjCBlock5_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - int get integerValue { - return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); - } +int _ObjCBlock5_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock5_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - int get unsignedIntegerValue { - return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); - } +class ObjCBlock5 extends _ObjCBlockBase { + ObjCBlock5._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - NSString? get stringValue { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_stringValue1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock5.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock5_fnPtrTrampoline, 0) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - int compare_(NSNumber? otherNumber) { - return _lib._objc_msgSend_86( - _id, _lib._sel_compare_1, otherNumber?._id ?? ffi.nullptr); + /// Creates a block from a Dart function. + ObjCBlock5.fromFunction( + NativeCupertinoHttp lib, + int Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock5_closureTrampoline, 0) + .cast(), + _ObjCBlock5_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + int call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } - bool isEqualToNumber_(NSNumber? number) { - return _lib._objc_msgSend_87( - _id, _lib._sel_isEqualToNumber_1, number?._id ?? ffi.nullptr); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; +} - static NSNumber numberWithChar_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_62( - _lib._class_NSNumber1, _lib._sel_numberWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; +} - static NSNumber numberWithUnsignedChar_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_63( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } +class NSOrderedCollectionDifference extends NSObject { + NSOrderedCollectionDifference._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - static NSNumber numberWithShort_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_64( - _lib._class_NSNumber1, _lib._sel_numberWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// Returns a [NSOrderedCollectionDifference] that points to the same underlying object as [other]. + static NSOrderedCollectionDifference castFrom( + T other) { + return NSOrderedCollectionDifference._(other._id, other._lib, + retain: true, release: true); } - static NSNumber numberWithUnsignedShort_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// Returns a [NSOrderedCollectionDifference] that wraps the given raw object pointer. + static NSOrderedCollectionDifference castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOrderedCollectionDifference._(other, lib, + retain: retain, release: release); } - static NSNumber numberWithInt_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_66( - _lib._class_NSNumber1, _lib._sel_numberWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSOrderedCollectionDifference]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOrderedCollectionDifference1); } - static NSNumber numberWithUnsignedInt_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_67( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + NSOrderedCollectionDifference initWithChanges_(NSObject? changes) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_initWithChanges_1, changes?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - static NSNumber numberWithLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_68( - _lib._class_NSNumber1, _lib._sel_numberWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + NSOrderedCollectionDifference + initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_( + NSIndexSet? inserts, + NSObject? insertedObjects, + NSIndexSet? removes, + NSObject? removedObjects, + NSObject? changes) { + final _ret = _lib._objc_msgSend_146( + _id, + _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1, + inserts?._id ?? ffi.nullptr, + insertedObjects?._id ?? ffi.nullptr, + removes?._id ?? ffi.nullptr, + removedObjects?._id ?? ffi.nullptr, + changes?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - static NSNumber numberWithUnsignedLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + NSOrderedCollectionDifference + initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_( + NSIndexSet? inserts, + NSObject? insertedObjects, + NSIndexSet? removes, + NSObject? removedObjects) { + final _ret = _lib._objc_msgSend_147( + _id, + _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1, + inserts?._id ?? ffi.nullptr, + insertedObjects?._id ?? ffi.nullptr, + removes?._id ?? ffi.nullptr, + removedObjects?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - static NSNumber numberWithLongLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_70( - _lib._class_NSNumber1, _lib._sel_numberWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + NSObject? get insertions { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_insertions1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSNumber numberWithUnsignedLongLong_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_71( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + NSObject? get removals { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_removals1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSNumber numberWithFloat_(NativeCupertinoHttp _lib, double value) { - final _ret = _lib._objc_msgSend_72( - _lib._class_NSNumber1, _lib._sel_numberWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + bool get hasChanges { + return _lib._objc_msgSend_11(_id, _lib._sel_hasChanges1); } - static NSNumber numberWithDouble_(NativeCupertinoHttp _lib, double value) { - final _ret = _lib._objc_msgSend_73( - _lib._class_NSNumber1, _lib._sel_numberWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + NSOrderedCollectionDifference differenceByTransformingChangesWithBlock_( + ObjCBlock6 block) { + final _ret = _lib._objc_msgSend_153( + _id, _lib._sel_differenceByTransformingChangesWithBlock_1, block._id); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - static NSNumber numberWithBool_(NativeCupertinoHttp _lib, bool value) { - final _ret = _lib._objc_msgSend_74( - _lib._class_NSNumber1, _lib._sel_numberWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + NSOrderedCollectionDifference inverseDifference() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_inverseDifference1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - static NSNumber numberWithInteger_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_68( - _lib._class_NSNumber1, _lib._sel_numberWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + static NSOrderedCollectionDifference new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionDifference1, _lib._sel_new1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: false, release: true); } - static NSNumber numberWithUnsignedInteger_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); + static NSOrderedCollectionDifference alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionDifference1, _lib._sel_alloc1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: false, release: true); } +} - static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55(_lib._class_NSNumber1, - _lib._sel_valueWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } +ffi.Pointer _ObjCBlock6_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>()(arg0); +} - static NSValue value_withObjCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSNumber1, _lib._sel_value_withObjCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock6_closureRegistry = {}; +int _ObjCBlock6_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock6_registerClosure(Function fn) { + final id = ++_ObjCBlock6_closureRegistryIndex; + _ObjCBlock6_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSValue valueWithNonretainedObject_( - NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_56(_lib._class_NSNumber1, - _lib._sel_valueWithNonretainedObject_1, anObject._id); - return NSValue._(_ret, _lib, retain: true, release: true); - } +ffi.Pointer _ObjCBlock6_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock6_closureRegistry[block.ref.target.address]!(arg0); +} - static NSValue valueWithPointer_( - NativeCupertinoHttp _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_57( - _lib._class_NSNumber1, _lib._sel_valueWithPointer_1, pointer); - return NSValue._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock6 extends _ObjCBlockBase { + ObjCBlock6._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_60( - _lib._class_NSNumber1, _lib._sel_valueWithRange_1, range); - return NSValue._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock6.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock6_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - static NSNumber new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); - return NSNumber._(_ret, _lib, retain: false, release: true); + /// Creates a block from a Dart function. + ObjCBlock6.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock6_closureTrampoline) + .cast(), + _ObjCBlock6_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); } - static NSNumber alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; } -class NSValue extends NSObject { - NSValue._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSOrderedCollectionChange extends NSObject { + NSOrderedCollectionChange._( + ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSValue] that points to the same underlying object as [other]. - static NSValue castFrom(T other) { - return NSValue._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSOrderedCollectionChange] that points to the same underlying object as [other]. + static NSOrderedCollectionChange castFrom(T other) { + return NSOrderedCollectionChange._(other._id, other._lib, + retain: true, release: true); } - /// Returns a [NSValue] that wraps the given raw object pointer. - static NSValue castFromPointer( + /// Returns a [NSOrderedCollectionChange] that wraps the given raw object pointer. + static NSOrderedCollectionChange castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSValue._(other, lib, retain: retain, release: release); + return NSOrderedCollectionChange._(other, lib, + retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSValue]. + /// Returns whether [obj] is an instance of [NSOrderedCollectionChange]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOrderedCollectionChange1); } - void getValue_size_(ffi.Pointer value, int size) { - return _lib._objc_msgSend_33(_id, _lib._sel_getValue_size_1, value, size); + static NSOrderedCollectionChange changeWithObject_type_index_( + NativeCupertinoHttp _lib, NSObject anObject, int type, int index) { + final _ret = _lib._objc_msgSend_148(_lib._class_NSOrderedCollectionChange1, + _lib._sel_changeWithObject_type_index_1, anObject._id, type, index); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); } - ffi.Pointer get objCType { - return _lib._objc_msgSend_53(_id, _lib._sel_objCType1); + static NSOrderedCollectionChange changeWithObject_type_index_associatedIndex_( + NativeCupertinoHttp _lib, + NSObject anObject, + int type, + int index, + int associatedIndex) { + final _ret = _lib._objc_msgSend_149( + _lib._class_NSOrderedCollectionChange1, + _lib._sel_changeWithObject_type_index_associatedIndex_1, + anObject._id, + type, + index, + associatedIndex); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); } - NSValue initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_54( - _id, _lib._sel_initWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); + NSObject get object { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSValue initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSValue._(_ret, _lib, retain: true, release: true); + int get changeType { + return _lib._objc_msgSend_150(_id, _lib._sel_changeType1); } - static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSValue1, _lib._sel_valueWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue value_withObjCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSValue1, _lib._sel_value_withObjCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); + int get index { + return _lib._objc_msgSend_12(_id, _lib._sel_index1); } - static NSValue valueWithNonretainedObject_( - NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_56(_lib._class_NSValue1, - _lib._sel_valueWithNonretainedObject_1, anObject._id); - return NSValue._(_ret, _lib, retain: true, release: true); + int get associatedIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_associatedIndex1); } - NSObject get nonretainedObjectValue { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nonretainedObjectValue1); + @override + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); return NSObject._(_ret, _lib, retain: true, release: true); } - static NSValue valueWithPointer_( - NativeCupertinoHttp _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_57( - _lib._class_NSValue1, _lib._sel_valueWithPointer_1, pointer); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - ffi.Pointer get pointerValue { - return _lib._objc_msgSend_31(_id, _lib._sel_pointerValue1); - } - - bool isEqualToValue_(NSValue? value) { - return _lib._objc_msgSend_58( - _id, _lib._sel_isEqualToValue_1, value?._id ?? ffi.nullptr); + NSOrderedCollectionChange initWithObject_type_index_( + NSObject anObject, int type, int index) { + final _ret = _lib._objc_msgSend_151( + _id, _lib._sel_initWithObject_type_index_1, anObject._id, type, index); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); } - void getValue_(ffi.Pointer value) { - return _lib._objc_msgSend_59(_id, _lib._sel_getValue_1, value); + NSOrderedCollectionChange initWithObject_type_index_associatedIndex_( + NSObject anObject, int type, int index, int associatedIndex) { + final _ret = _lib._objc_msgSend_152( + _id, + _lib._sel_initWithObject_type_index_associatedIndex_1, + anObject._id, + type, + index, + associatedIndex); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); } - static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_60( - _lib._class_NSValue1, _lib._sel_valueWithRange_1, range); - return NSValue._(_ret, _lib, retain: true, release: true); + static NSOrderedCollectionChange new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionChange1, _lib._sel_new1); + return NSOrderedCollectionChange._(_ret, _lib, + retain: false, release: true); } - NSRange get rangeValue { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeValue1); + static NSOrderedCollectionChange alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionChange1, _lib._sel_alloc1); + return NSOrderedCollectionChange._(_ret, _lib, + retain: false, release: true); } +} - static NSValue new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); - return NSValue._(_ret, _lib, retain: false, release: true); - } +abstract class NSCollectionChangeType { + static const int NSCollectionChangeInsert = 0; + static const int NSCollectionChangeRemove = 1; +} - static NSValue alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); - return NSValue._(_ret, _lib, retain: false, release: true); - } +abstract class NSOrderedCollectionDifferenceCalculationOptions { + static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = + 1; + static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = + 2; + static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; } -typedef NSInteger = ffi.Long; +bool _ObjCBlock7_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} -class NSError extends NSObject { - NSError._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final _ObjCBlock7_closureRegistry = {}; +int _ObjCBlock7_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock7_registerClosure(Function fn) { + final id = ++_ObjCBlock7_closureRegistryIndex; + _ObjCBlock7_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns a [NSError] that points to the same underlying object as [other]. - static NSError castFrom(T other) { - return NSError._(other._id, other._lib, retain: true, release: true); - } +bool _ObjCBlock7_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock7_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - /// Returns a [NSError] that wraps the given raw object pointer. - static NSError castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSError._(other, lib, retain: retain, release: release); - } +class ObjCBlock7 extends _ObjCBlockBase { + ObjCBlock7._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - /// Returns whether [obj] is an instance of [NSError]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); - } + /// Creates a block from a C function pointer. + ObjCBlock7.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock7_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - /// Domain cannot be nil; dict may be nil if no userInfo desired. - NSError initWithDomain_code_userInfo_( - NSErrorDomain domain, int code, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_179( - _id, - _lib._sel_initWithDomain_code_userInfo_1, - domain, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock7.fromFunction( + NativeCupertinoHttp lib, + bool Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock7_closureTrampoline, false) + .cast(), + _ObjCBlock7_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } - static NSError errorWithDomain_code_userInfo_(NativeCupertinoHttp _lib, - NSErrorDomain domain, int code, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_179( - _lib._class_NSError1, - _lib._sel_errorWithDomain_code_userInfo_1, - domain, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - /// These define the error. Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts. Codes are domain-specific. - NSErrorDomain get domain { - return _lib._objc_msgSend_32(_id, _lib._sel_domain1); - } +void _ObjCBlock8_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} - int get code { - return _lib._objc_msgSend_81(_id, _lib._sel_code1); - } +final _ObjCBlock8_closureRegistry = {}; +int _ObjCBlock8_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock8_registerClosure(Function fn) { + final id = ++_ObjCBlock8_closureRegistryIndex; + _ObjCBlock8_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Additional info which may be used to describe the error further. Examples of keys that might be included in here are "Line Number", "Failed URL", etc. Embedding other errors in here can also be used as a way to communicate underlying reasons for failures; for instance "File System Error" embedded in the userInfo of an NSError returned from a higher level document object. If the embedded error information is itself NSError, the standard key NSUnderlyingErrorKey can be used. - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock8_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock8_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - /// The primary user-presentable message for the error, for instance for NSFileReadNoPermissionError: "The file "File Name" couldn't be opened because you don't have permission to view it.". This message should ideally indicate what failed and why it failed. This value either comes from NSLocalizedDescriptionKey, or NSLocalizedFailureErrorKey+NSLocalizedFailureReasonErrorKey, or NSLocalizedFailureErrorKey. The steps this takes to construct the description include: - /// 1. Look for NSLocalizedDescriptionKey in userInfo, use value as-is if present. - /// 2. Look for NSLocalizedFailureErrorKey in userInfo. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. - /// 3. Fetch NSLocalizedDescriptionKey from userInfoValueProvider, use value as-is if present. - /// 4. Fetch NSLocalizedFailureErrorKey from userInfoValueProvider. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. - /// 5. Look for NSLocalizedFailureReasonErrorKey in userInfo or from userInfoValueProvider; combine with generic "Operation failed" message. - /// 6. Last resort localized but barely-presentable string manufactured from domain and code. The result is never nil. - NSString? get localizedDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock8 extends _ObjCBlockBase { + ObjCBlock8._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - /// Return a complete sentence which describes why the operation failed. For instance, for NSFileReadNoPermissionError: "You don't have permission.". In many cases this will be just the "because" part of the error message (but as a complete sentence, which makes localization easier). Default implementation of this picks up the value of NSLocalizedFailureReasonErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. - NSString? get localizedFailureReason { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedFailureReason1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock8.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock8_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - /// Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel. For instance, for NSFileReadNoPermissionError: "To view or change permissions, select the item in the Finder and choose File > Get Info.". Default implementation of this picks up the value of NSLocalizedRecoverySuggestionErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. - NSString? get localizedRecoverySuggestion { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedRecoverySuggestion1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock8.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock8_closureTrampoline) + .cast(), + _ObjCBlock8_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); } - /// Return titles of buttons that are appropriate for displaying in an alert. These should match the string provided as a part of localizedRecoverySuggestion. The first string would be the title of the right-most and default button, the second one next to it, and so on. If used in an alert the corresponding default return values are NSAlertFirstButtonReturn + n. Default implementation of this picks up the value of NSLocalizedRecoveryOptionsErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. nil return usually implies no special suggestion, which would imply a single "OK" button. - NSArray? get localizedRecoveryOptions { - final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_localizedRecoveryOptions1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - /// Return an object that conforms to the NSErrorRecoveryAttempting informal protocol. The recovery attempter must be an object that can correctly interpret an index into the array returned by localizedRecoveryOptions. The default implementation of this picks up the value of NSRecoveryAttempterErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. - NSObject get recoveryAttempter { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_recoveryAttempter1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +bool _ObjCBlock9_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1, ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} - /// Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user. This is done automatically by +[NSAlert alertWithError:], which the presentError: variants in NSApplication go through. The default implementation of this picks up the value of the NSHelpAnchorErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. - NSString? get helpAnchor { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_helpAnchor1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock9_closureRegistry = {}; +int _ObjCBlock9_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock9_registerClosure(Function fn) { + final id = ++_ObjCBlock9_closureRegistryIndex; + _ObjCBlock9_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Return a list of underlying errors, if any. It includes the values of both NSUnderlyingErrorKey and NSMultipleUnderlyingErrorsKey. If there are no underlying errors, returns an empty array. - NSArray? get underlyingErrors { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_underlyingErrors1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +bool _ObjCBlock9_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock9_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - /// Specify a block which will be called from the implementations of localizedDescription, localizedFailureReason, localizedRecoverySuggestion, localizedRecoveryOptions, recoveryAttempter, helpAnchor, and debugDescription when the underlying value for these is not present in the userInfo dictionary of NSError instances with the specified domain. The provider will be called with the userInfo key corresponding to the queried property: For instance, NSLocalizedDescriptionKey for localizedDescription. The provider should return nil for any keys it is not able to provide and, very importantly, any keys it does not recognize (since we may extend the list of keys in future releases). - /// - /// The specified block will be called synchronously at the time when the above properties are queried. The results are not cached. - /// - /// This provider is optional. It enables localization and formatting of error messages to be done lazily; rather than populating the userInfo at NSError creation time, these keys will be fetched on-demand when asked for. - /// - /// It is expected that only the “owner” of an NSError domain specifies the provider for the domain, and this is done once. This facility is not meant for consumers of errors to customize the userInfo entries. This facility should not be used to customize the behaviors of error domains provided by the system. - /// - /// If an appropriate result for the requested key cannot be provided, return nil rather than choosing to manufacture a generic fallback response such as "Operation could not be completed, error 42." NSError will take care of the fallback cases. - static void setUserInfoValueProviderForDomain_provider_( - NativeCupertinoHttp _lib, - NSErrorDomain errorDomain, - ObjCBlock12 provider) { - return _lib._objc_msgSend_181( - _lib._class_NSError1, - _lib._sel_setUserInfoValueProviderForDomain_provider_1, - errorDomain, - provider._id); - } +class ObjCBlock9 extends _ObjCBlockBase { + ObjCBlock9._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - static ObjCBlock12 userInfoValueProviderForDomain_(NativeCupertinoHttp _lib, - NSError? err, NSErrorUserInfoKey userInfoKey, NSErrorDomain errorDomain) { - final _ret = _lib._objc_msgSend_182( - _lib._class_NSError1, - _lib._sel_userInfoValueProviderForDomain_1, - err?._id ?? ffi.nullptr, - userInfoKey, - errorDomain); - return ObjCBlock12._(_ret, _lib); - } + /// Creates a block from a C function pointer. + ObjCBlock9.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock9_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - static NSError new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); - return NSError._(_ret, _lib, retain: false, release: true); + /// Creates a block from a Dart function. + ObjCBlock9.fromFunction( + NativeCupertinoHttp lib, + bool Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock9_closureTrampoline, false) + .cast(), + _ObjCBlock9_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); } - static NSError alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); - return NSError._(_ret, _lib, retain: false, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef NSErrorDomain = ffi.Pointer; +class NSFastEnumerationState extends ffi.Struct { + @ffi.UnsignedLong() + external int state; -/// Immutable Dictionary -class NSDictionary extends NSObject { - NSDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + external ffi.Pointer> itemsPtr; - /// Returns a [NSDictionary] that points to the same underlying object as [other]. - static NSDictionary castFrom(T other) { - return NSDictionary._(other._id, other._lib, retain: true, release: true); - } + external ffi.Pointer mutationsPtr; - /// Returns a [NSDictionary] that wraps the given raw object pointer. - static NSDictionary castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDictionary._(other, lib, retain: retain, release: release); - } + @ffi.Array.multi([5]) + external ffi.Array extra; +} - /// Returns whether [obj] is an instance of [NSDictionary]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); - } - - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } - - NSObject objectForKey_(NSObject aKey) { - final _ret = _lib._objc_msgSend_91(_id, _lib._sel_objectForKey_1, aKey._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator keyEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_keyEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } +ffi.Pointer _ObjCBlock10_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>()(arg0, arg1); +} - @override - NSDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock10_closureRegistry = {}; +int _ObjCBlock10_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock10_registerClosure(Function fn) { + final id = ++_ObjCBlock10_closureRegistryIndex; + _ObjCBlock10_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_93( - _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +ffi.Pointer _ObjCBlock10_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) { + return _ObjCBlock10_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - NSDictionary initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock10 extends _ObjCBlockBase { + ObjCBlock10._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - NSArray? get allKeys { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allKeys1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock10.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>( + _ObjCBlock10_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - NSArray allKeysForObject_(NSObject anObject) { - final _ret = - _lib._objc_msgSend_96(_id, _lib._sel_allKeysForObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock10.fromFunction( + NativeCupertinoHttp lib, + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>( + _ObjCBlock10_closureTrampoline) + .cast(), + _ObjCBlock10_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call( + ffi.Pointer arg0, NSErrorUserInfoKey arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>()(_id, arg0, arg1); } - NSArray? get allValues { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allValues1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +typedef NSErrorUserInfoKey = ffi.Pointer; +typedef NSURLResourceKey = ffi.Pointer; - NSString? get descriptionInStringsFileFormat { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_descriptionInStringsFileFormat1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +/// Working with Bookmarks and alias (bookmark) files +abstract class NSURLBookmarkCreationOptions { + /// This option does nothing and has no effect on bookmark resolution + static const int NSURLBookmarkCreationPreferFileIDResolution = 256; - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways + static const int NSURLBookmarkCreationMinimalBookmark = 512; - NSString descriptionWithLocale_indent_(NSObject locale, int level) { - final _ret = _lib._objc_msgSend_99( - _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// include the properties required by writeBookmarkData:toURL:options: in the bookmark data created + static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; - bool isEqualToDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_163(_id, _lib._sel_isEqualToDictionary_1, - otherDictionary?._id ?? ffi.nullptr); - } + /// include information in the bookmark data which allows the same sandboxed process to access the resource after being relaunched + static const int NSURLBookmarkCreationWithSecurityScope = 2048; - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } + /// if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted + static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; +} - NSArray objectsForKeys_notFoundMarker_(NSArray? keys, NSObject marker) { - final _ret = _lib._objc_msgSend_164( - _id, - _lib._sel_objectsForKeys_notFoundMarker_1, - keys?._id ?? ffi.nullptr, - marker._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } +abstract class NSURLBookmarkResolutionOptions { + /// don't perform any user interaction during bookmark resolution + static const int NSURLBookmarkResolutionWithoutUI = 256; - /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. - bool writeToURL_error_( - NSURL? url, ffi.Pointer> error) { - return _lib._objc_msgSend_109( - _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); - } + /// don't mount a volume during bookmark resolution + static const int NSURLBookmarkResolutionWithoutMounting = 512; - NSArray keysSortedByValueUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_107( - _id, _lib._sel_keysSortedByValueUsingSelector_1, comparator); - return NSArray._(_ret, _lib, retain: true, release: true); - } + /// use the secure information included at creation time to provide the ability to access the resource in a sandboxed process + static const int NSURLBookmarkResolutionWithSecurityScope = 1024; +} - /// count refers to the number of elements in the dictionary - void getObjects_andKeys_count_(ffi.Pointer> objects, - ffi.Pointer> keys, int count) { - return _lib._objc_msgSend_165( - _id, _lib._sel_getObjects_andKeys_count_1, objects, keys, count); - } +typedef NSURLBookmarkFileCreationOptions = NSUInteger; - NSObject objectForKeyedSubscript_(NSObject key) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_objectForKeyedSubscript_1, key._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } +class NSURLHandle extends NSObject { + NSURLHandle._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - void enumerateKeysAndObjectsUsingBlock_(ObjCBlock10 block) { - return _lib._objc_msgSend_166( - _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); + /// Returns a [NSURLHandle] that points to the same underlying object as [other]. + static NSURLHandle castFrom(T other) { + return NSURLHandle._(other._id, other._lib, retain: true, release: true); } - void enumerateKeysAndObjectsWithOptions_usingBlock_( - int opts, ObjCBlock10 block) { - return _lib._objc_msgSend_167( - _id, - _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, - opts, - block._id); + /// Returns a [NSURLHandle] that wraps the given raw object pointer. + static NSURLHandle castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLHandle._(other, lib, retain: retain, release: release); } - NSArray keysSortedByValueUsingComparator_(NSComparator cmptr) { - final _ret = _lib._objc_msgSend_141( - _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLHandle]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); } - NSArray keysSortedByValueWithOptions_usingComparator_( - int opts, NSComparator cmptr) { - final _ret = _lib._objc_msgSend_142(_id, - _lib._sel_keysSortedByValueWithOptions_usingComparator_1, opts, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); + static void registerURLHandleClass_( + NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { + return _lib._objc_msgSend_200(_lib._class_NSURLHandle1, + _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); } - NSObject keysOfEntriesPassingTest_(ObjCBlock11 predicate) { - final _ret = _lib._objc_msgSend_168( - _id, _lib._sel_keysOfEntriesPassingTest_1, predicate._id); + static NSObject URLHandleClassForURL_( + NativeCupertinoHttp _lib, NSURL? anURL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSURLHandle1, + _lib._sel_URLHandleClassForURL_1, anURL?._id ?? ffi.nullptr); return NSObject._(_ret, _lib, retain: true, release: true); } - NSObject keysOfEntriesWithOptions_passingTest_( - int opts, ObjCBlock11 predicate) { - final _ret = _lib._objc_msgSend_169(_id, - _lib._sel_keysOfEntriesWithOptions_passingTest_1, opts, predicate._id); - return NSObject._(_ret, _lib, retain: true, release: true); + int status() { + return _lib._objc_msgSend_202(_id, _lib._sel_status1); } - /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:andKeys:count: - void getObjects_andKeys_(ffi.Pointer> objects, - ffi.Pointer> keys) { - return _lib._objc_msgSend_170( - _id, _lib._sel_getObjects_andKeys_1, objects, keys); + NSString failureReason() { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_failureReason1); + return NSString._(_ret, _lib, retain: true, release: true); } - /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. - static NSDictionary dictionaryWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_171(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void addClient_(NSObject? client) { + return _lib._objc_msgSend_200( + _id, _lib._sel_addClient_1, client?._id ?? ffi.nullptr); } - static NSDictionary dictionaryWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_172(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void removeClient_(NSObject? client) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeClient_1, client?._id ?? ffi.nullptr); } - NSDictionary initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_171( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void loadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); } - NSDictionary initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_172( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void cancelLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); } - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); + NSData resourceData() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_resourceData1); + return NSData._(_ret, _lib, retain: true, release: true); } - /// the atomically flag is ignored if url of a type that cannot be written atomically. - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); + NSData availableResourceData() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_availableResourceData1); + return NSData._(_ret, _lib, retain: true, release: true); } - static NSDictionary dictionary(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + int expectedResourceDataSize() { + return _lib._objc_msgSend_82(_id, _lib._sel_expectedResourceDataSize1); } - static NSDictionary dictionaryWithObject_forKey_( - NativeCupertinoHttp _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_173(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void flushCachedData() { + return _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); } - static NSDictionary dictionaryWithObjects_forKeys_count_( - NativeCupertinoHttp _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_93(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void backgroundLoadDidFailWithReason_(NSString? reason) { + return _lib._objc_msgSend_188( + _id, + _lib._sel_backgroundLoadDidFailWithReason_1, + reason?._id ?? ffi.nullptr); } - static NSDictionary dictionaryWithObjectsAndKeys_( - NativeCupertinoHttp _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_91(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void didLoadBytes_loadComplete_(NSData? newBytes, bool yorn) { + return _lib._objc_msgSend_203(_id, _lib._sel_didLoadBytes_loadComplete_1, + newBytes?._id ?? ffi.nullptr, yorn); } - static NSDictionary dictionaryWithDictionary_( - NativeCupertinoHttp _lib, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_174(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL? anURL) { + return _lib._objc_msgSend_204(_lib._class_NSURLHandle1, + _lib._sel_canInitWithURL_1, anURL?._id ?? ffi.nullptr); } - static NSDictionary dictionaryWithObjects_forKeys_( - NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_175( - _lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSURLHandle cachedHandleForURL_( + NativeCupertinoHttp _lib, NSURL? anURL) { + final _ret = _lib._objc_msgSend_205(_lib._class_NSURLHandle1, + _lib._sel_cachedHandleForURL_1, anURL?._id ?? ffi.nullptr); + return NSURLHandle._(_ret, _lib, retain: true, release: true); } - NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSObject initWithURL_cached_(NSURL? anURL, bool willCache) { + final _ret = _lib._objc_msgSend_206(_id, _lib._sel_initWithURL_cached_1, + anURL?._id ?? ffi.nullptr, willCache); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSDictionary initWithDictionary_(NSDictionary? otherDictionary) { - final _ret = _lib._objc_msgSend_174(_id, _lib._sel_initWithDictionary_1, - otherDictionary?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSObject propertyForKey_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSDictionary initWithDictionary_copyItems_( - NSDictionary? otherDictionary, bool flag) { - final _ret = _lib._objc_msgSend_176( - _id, - _lib._sel_initWithDictionary_copyItems_1, - otherDictionary?._id ?? ffi.nullptr, - flag); - return NSDictionary._(_ret, _lib, retain: false, release: true); + NSObject propertyForKeyIfAvailable_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_42(_id, + _lib._sel_propertyForKeyIfAvailable_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSDictionary initWithObjects_forKeys_(NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_175( - _id, - _lib._sel_initWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + bool writeProperty_forKey_(NSObject propertyValue, NSString? propertyKey) { + return _lib._objc_msgSend_199(_id, _lib._sel_writeProperty_forKey_1, + propertyValue._id, propertyKey?._id ?? ffi.nullptr); } - /// Reads dictionary stored in NSPropertyList format from the specified url. - NSDictionary initWithContentsOfURL_error_( - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_177( - _id, - _lib._sel_initWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); + bool writeData_(NSData? data) { + return _lib._objc_msgSend_35( + _id, _lib._sel_writeData_1, data?._id ?? ffi.nullptr); } - /// Reads dictionary stored in NSPropertyList format from the specified url. - static NSDictionary dictionaryWithContentsOfURL_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_177( - _lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSData loadInForeground() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_loadInForeground1); + return NSData._(_ret, _lib, retain: true, release: true); } - /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. - /// The keys are copied from the array and must be copyable. - /// If the array parameter is nil or not an NSArray, an exception is thrown. - /// If the array of keys is empty, an empty key set is returned. - /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). - /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. - /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. - static NSObject sharedKeySetForKeys_( - NativeCupertinoHttp _lib, NSArray? keys) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSDictionary1, - _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + void beginLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); } - int countByEnumeratingWithState_objects_count_( - ffi.Pointer state, - ffi.Pointer> buffer, - int len) { - return _lib._objc_msgSend_178( - _id, - _lib._sel_countByEnumeratingWithState_objects_count_1, - state, - buffer, - len); + void endLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); } - static NSDictionary new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); - return NSDictionary._(_ret, _lib, retain: false, release: true); + static NSURLHandle new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); + return NSURLHandle._(_ret, _lib, retain: false, release: true); } - static NSDictionary alloc(NativeCupertinoHttp _lib) { + static NSURLHandle alloc(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); - return NSDictionary._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); + return NSURLHandle._(_ret, _lib, retain: false, release: true); } } -class NSEnumerator extends NSObject { - NSEnumerator._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +abstract class NSURLHandleStatus { + static const int NSURLHandleNotLoaded = 0; + static const int NSURLHandleLoadSucceeded = 1; + static const int NSURLHandleLoadInProgress = 2; + static const int NSURLHandleLoadFailed = 3; +} - /// Returns a [NSEnumerator] that points to the same underlying object as [other]. - static NSEnumerator castFrom(T other) { - return NSEnumerator._(other._id, other._lib, retain: true, release: true); - } +abstract class NSDataWritingOptions { + /// Hint to use auxiliary file when saving; equivalent to atomically:YES + static const int NSDataWritingAtomic = 1; - /// Returns a [NSEnumerator] that wraps the given raw object pointer. - static NSEnumerator castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSEnumerator._(other, lib, retain: retain, release: release); - } + /// Hint to prevent overwriting an existing file. Cannot be combined with NSDataWritingAtomic. + static const int NSDataWritingWithoutOverwriting = 2; + static const int NSDataWritingFileProtectionNone = 268435456; + static const int NSDataWritingFileProtectionComplete = 536870912; + static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; + static const int + NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = + 1073741824; + static const int NSDataWritingFileProtectionMask = 4026531840; - /// Returns whether [obj] is an instance of [NSEnumerator]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSEnumerator1); - } + /// Deprecated name for NSDataWritingAtomic + static const int NSAtomicWrite = 1; +} - NSObject nextObject() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nextObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +/// Data Search Options +abstract class NSDataSearchOptions { + static const int NSDataSearchBackwards = 1; + static const int NSDataSearchAnchored = 2; +} - NSObject? get allObjects { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock11_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} - static NSEnumerator new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } +final _ObjCBlock11_closureRegistry = {}; +int _ObjCBlock11_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock11_registerClosure(Function fn) { + final id = ++_ObjCBlock11_closureRegistryIndex; + _ObjCBlock11_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSEnumerator alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } +void _ObjCBlock11_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return _ObjCBlock11_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); } -/// Immutable Array -class NSArray extends NSObject { - NSArray._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +class ObjCBlock11 extends _ObjCBlockBase { + ObjCBlock11._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - /// Returns a [NSArray] that points to the same underlying object as [other]. - static NSArray castFrom(T other) { - return NSArray._(other._id, other._lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock11.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>( + _ObjCBlock11_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - /// Returns a [NSArray] that wraps the given raw object pointer. - static NSArray castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSArray._(other, lib, retain: retain, release: release); + /// Creates a block from a Dart function. + ObjCBlock11.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>( + _ObjCBlock11_closureTrampoline) + .cast(), + _ObjCBlock11_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); } - /// Returns whether [obj] is an instance of [NSArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } +/// Read/Write Options +abstract class NSDataReadingOptions { + /// Hint to map the file in if possible and safe + static const int NSDataReadingMappedIfSafe = 1; - NSObject objectAtIndex_(int index) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndex_1, index); - return NSObject._(_ret, _lib, retain: true, release: true); - } + /// Hint to get the file not to be cached in the kernel + static const int NSDataReadingUncached = 2; - @override - NSArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + /// Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given. + static const int NSDataReadingMappedAlways = 8; - NSArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_95( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); - } + /// Deprecated name for NSDataReadingMappedIfSafe + static const int NSDataReadingMapped = 1; - NSArray initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + /// Deprecated name for NSDataReadingMapped + static const int NSMappedRead = 1; - NSArray arrayByAddingObject_(NSObject anObject) { - final _ret = _lib._objc_msgSend_96( - _id, _lib._sel_arrayByAddingObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } + /// Deprecated name for NSDataReadingUncached + static const int NSUncachedRead = 2; +} - NSArray arrayByAddingObjectsFromArray_(NSArray? otherArray) { - final _ret = _lib._objc_msgSend_97( - _id, - _lib._sel_arrayByAddingObjectsFromArray_1, - otherArray?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock12_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); +} - NSString componentsJoinedByString_(NSString? separator) { - final _ret = _lib._objc_msgSend_98(_id, - _lib._sel_componentsJoinedByString_1, separator?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock12_closureRegistry = {}; +int _ObjCBlock12_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock12_registerClosure(Function fn) { + final id = ++_ObjCBlock12_closureRegistryIndex; + _ObjCBlock12_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - bool containsObject_(NSObject anObject) { - return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); - } +void _ObjCBlock12_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return _ObjCBlock12_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock12 extends _ObjCBlockBase { + ObjCBlock12._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock12.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock12_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - NSString descriptionWithLocale_indent_(NSObject locale, int level) { - final _ret = _lib._objc_msgSend_99( - _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); - return NSString._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock12.fromFunction(NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock12_closureTrampoline) + .cast(), + _ObjCBlock12_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); } - NSObject firstObjectCommonWithArray_(NSArray? otherArray) { - final _ret = _lib._objc_msgSend_100(_id, - _lib._sel_firstObjectCommonWithArray_1, otherArray?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - void getObjects_range_( - ffi.Pointer> objects, NSRange range) { - return _lib._objc_msgSend_101( - _id, _lib._sel_getObjects_range_1, objects, range); - } +abstract class NSDataBase64DecodingOptions { + /// Use the following option to modify the decoding algorithm so that it ignores unknown non-Base64 bytes, including line ending characters. + static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; +} - int indexOfObject_(NSObject anObject) { - return _lib._objc_msgSend_102(_id, _lib._sel_indexOfObject_1, anObject._id); - } +/// Base 64 Options +abstract class NSDataBase64EncodingOptions { + /// Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default. + static const int NSDataBase64Encoding64CharacterLineLength = 1; + static const int NSDataBase64Encoding76CharacterLineLength = 2; - int indexOfObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_103( - _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); - } + /// Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF. + static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; + static const int NSDataBase64EncodingEndLineWithLineFeed = 32; +} - int indexOfObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_102( - _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); - } +/// Various algorithms provided for compression APIs. See NSData and NSMutableData. +abstract class NSDataCompressionAlgorithm { + /// LZFSE is the recommended compression algorithm if you don't have a specific reason to use another algorithm. Note that LZFSE is intended for use with Apple devices only. This algorithm generally compresses better than Zlib, but not as well as LZMA. It is generally slower than LZ4. + static const int NSDataCompressionAlgorithmLZFSE = 0; - int indexOfObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_103( - _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); - } + /// LZ4 is appropriate if compression speed is critical. LZ4 generally sacrifices compression ratio in order to achieve its greater speed. + /// This implementation of LZ4 makes a small modification to the standard format, which is described in greater detail in . + static const int NSDataCompressionAlgorithmLZ4 = 1; - bool isEqualToArray_(NSArray? otherArray) { - return _lib._objc_msgSend_104( - _id, _lib._sel_isEqualToArray_1, otherArray?._id ?? ffi.nullptr); - } + /// LZMA is appropriate if compression ratio is critical and memory usage and compression speed are not a factor. LZMA is an order of magnitude slower for both compression and decompression than other algorithms. It can also use a very large amount of memory, so if you need to compress large amounts of data on embedded devices with limited memory you should probably avoid LZMA. + /// Encoding uses LZMA level 6 only, but decompression works with any compression level. + static const int NSDataCompressionAlgorithmLZMA = 2; - NSObject get firstObject { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_firstObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + /// Zlib is appropriate if you want a good balance between compression speed and compression ratio, but only if you need interoperability with non-Apple platforms. Otherwise, LZFSE is generally a better choice than Zlib. + /// Encoding uses Zlib level 5 only, but decompression works with any compression level. It uses the raw DEFLATE format as described in IETF RFC 1951. + static const int NSDataCompressionAlgorithmZlib = 3; +} - NSObject get lastObject { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_lastObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +typedef UTF32Char = UInt32; +typedef UInt32 = ffi.UnsignedInt; - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } +abstract class NSStringEnumerationOptions { + static const int NSStringEnumerationByLines = 0; + static const int NSStringEnumerationByParagraphs = 1; + static const int NSStringEnumerationByComposedCharacterSequences = 2; + static const int NSStringEnumerationByWords = 3; + static const int NSStringEnumerationBySentences = 4; + static const int NSStringEnumerationByCaretPositions = 5; + static const int NSStringEnumerationByDeletionClusters = 6; + static const int NSStringEnumerationReverse = 256; + static const int NSStringEnumerationSubstringNotRequired = 512; + static const int NSStringEnumerationLocalized = 1024; +} - NSEnumerator reverseObjectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_reverseObjectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock13_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + NSRange arg2, ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>()(arg0, arg1, arg2, arg3); +} - NSData? get sortedArrayHint { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_sortedArrayHint1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock13_closureRegistry = {}; +int _ObjCBlock13_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock13_registerClosure(Function fn) { + final id = ++_ObjCBlock13_closureRegistryIndex; + _ObjCBlock13_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSArray sortedArrayUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context) { - final _ret = _lib._objc_msgSend_105( - _id, _lib._sel_sortedArrayUsingFunction_context_1, comparator, context); - return NSArray._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock13_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) { + return _ObjCBlock13_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2, arg3); +} - NSArray sortedArrayUsingFunction_context_hint_( +class ObjCBlock13 extends _ObjCBlockBase { + ObjCBlock13._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock13.fromFunctionPointer( + NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - NSData? hint) { - final _ret = _lib._objc_msgSend_106( - _id, - _lib._sel_sortedArrayUsingFunction_context_hint_1, - comparator, - context, - hint?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + NSRange arg2, ffi.Pointer arg3)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>( + _ObjCBlock13_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_107( - _id, _lib._sel_sortedArrayUsingSelector_1, comparator); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock13.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>( + _ObjCBlock13_closureTrampoline) + .cast(), + _ObjCBlock13_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>()(_id, arg0, arg1, arg2, arg3); } - NSArray subarrayWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_108(_id, _lib._sel_subarrayWithRange_1, range); - return NSArray._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. - bool writeToURL_error_( - NSURL? url, ffi.Pointer> error) { - return _lib._objc_msgSend_109( - _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); - } +void _ObjCBlock14_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_7( - _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); - } +final _ObjCBlock14_closureRegistry = {}; +int _ObjCBlock14_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock14_registerClosure(Function fn) { + final id = ++_ObjCBlock14_closureRegistryIndex; + _ObjCBlock14_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject argument) { - return _lib._objc_msgSend_110( - _id, - _lib._sel_makeObjectsPerformSelector_withObject_1, - aSelector, - argument._id); - } +void _ObjCBlock14_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock14_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - NSArray objectsAtIndexes_(NSIndexSet? indexes) { - final _ret = _lib._objc_msgSend_131( - _id, _lib._sel_objectsAtIndexes_1, indexes?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock14 extends _ObjCBlockBase { + ObjCBlock14._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - NSObject objectAtIndexedSubscript_(int idx) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndexedSubscript_1, idx); - return NSObject._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock14.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock14_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - void enumerateObjectsUsingBlock_(ObjCBlock5 block) { - return _lib._objc_msgSend_132( - _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); + /// Creates a block from a Dart function. + ObjCBlock14.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock14_closureTrampoline) + .cast(), + _ObjCBlock14_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } - void enumerateObjectsWithOptions_usingBlock_(int opts, ObjCBlock5 block) { - return _lib._objc_msgSend_133(_id, - _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - void enumerateObjectsAtIndexes_options_usingBlock_( - NSIndexSet? s, int opts, ObjCBlock5 block) { - return _lib._objc_msgSend_134( - _id, - _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, - s?._id ?? ffi.nullptr, - opts, - block._id); - } +typedef NSStringEncoding = NSUInteger; - int indexOfObjectPassingTest_(ObjCBlock6 predicate) { - return _lib._objc_msgSend_135( - _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); - } +abstract class NSStringEncodingConversionOptions { + static const int NSStringEncodingConversionAllowLossy = 1; + static const int NSStringEncodingConversionExternalRepresentation = 2; +} - int indexOfObjectWithOptions_passingTest_(int opts, ObjCBlock6 predicate) { - return _lib._objc_msgSend_136(_id, - _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); - } +typedef NSStringTransform = ffi.Pointer; +void _ObjCBlock15_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); +} - int indexOfObjectAtIndexes_options_passingTest_( - NSIndexSet? s, int opts, ObjCBlock6 predicate) { - return _lib._objc_msgSend_137( - _id, - _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, - s?._id ?? ffi.nullptr, - opts, - predicate._id); - } +final _ObjCBlock15_closureRegistry = {}; +int _ObjCBlock15_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock15_registerClosure(Function fn) { + final id = ++_ObjCBlock15_closureRegistryIndex; + _ObjCBlock15_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSIndexSet indexesOfObjectsPassingTest_(ObjCBlock6 predicate) { - final _ret = _lib._objc_msgSend_138( - _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock15_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return _ObjCBlock15_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock6 predicate) { - final _ret = _lib._objc_msgSend_139( - _id, - _lib._sel_indexesOfObjectsWithOptions_passingTest_1, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock15 extends _ObjCBlockBase { + ObjCBlock15._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( - NSIndexSet? s, int opts, ObjCBlock6 predicate) { - final _ret = _lib._objc_msgSend_140( - _id, - _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, - s?._id ?? ffi.nullptr, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock15.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock15_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - NSArray sortedArrayUsingComparator_(NSComparator cmptr) { - final _ret = _lib._objc_msgSend_141( - _id, _lib._sel_sortedArrayUsingComparator_1, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock15.fromFunction(NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock15_closureTrampoline) + .cast(), + _ObjCBlock15_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); } - NSArray sortedArrayWithOptions_usingComparator_( - int opts, NSComparator cmptr) { - final _ret = _lib._objc_msgSend_142( - _id, _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - /// binary search - int indexOfObject_inSortedRange_options_usingComparator_( - NSObject obj, NSRange r, int opts, NSComparator cmp) { - return _lib._objc_msgSend_143( - _id, - _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, - obj._id, - r, - opts, - cmp); - } +typedef va_list = __builtin_va_list; +typedef __builtin_va_list = ffi.Pointer; - static NSArray array(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); - return NSArray._(_ret, _lib, retain: true, release: true); - } +abstract class NSQualityOfService { + static const int NSQualityOfServiceUserInteractive = 33; + static const int NSQualityOfServiceUserInitiated = 25; + static const int NSQualityOfServiceUtility = 17; + static const int NSQualityOfServiceBackground = 9; + static const int NSQualityOfServiceDefault = -1; +} - static NSArray arrayWithObject_(NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_91( - _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } +abstract class ptrauth_key { + static const int ptrauth_key_asia = 0; + static const int ptrauth_key_asib = 1; + static const int ptrauth_key_asda = 2; + static const int ptrauth_key_asdb = 3; + static const int ptrauth_key_process_independent_code = 0; + static const int ptrauth_key_process_dependent_code = 1; + static const int ptrauth_key_process_independent_data = 2; + static const int ptrauth_key_process_dependent_data = 3; + static const int ptrauth_key_function_pointer = 0; + static const int ptrauth_key_return_address = 1; + static const int ptrauth_key_frame_pointer = 3; + static const int ptrauth_key_block_function = 0; + static const int ptrauth_key_cxx_vtable_pointer = 2; + static const int ptrauth_key_method_list_pointer = 2; + static const int ptrauth_key_objc_isa_pointer = 2; + static const int ptrauth_key_objc_super_pointer = 2; + static const int ptrauth_key_block_descriptor_pointer = 2; + static const int ptrauth_key_objc_sel_pointer = 3; + static const int ptrauth_key_objc_class_ro_pointer = 2; +} - static NSArray arrayWithObjects_count_(NativeCupertinoHttp _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_95( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); - } +@ffi.Packed(2) +class wide extends ffi.Struct { + @UInt32() + external int lo; - static NSArray arrayWithObjects_( - NativeCupertinoHttp _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_91( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @SInt32() + external int hi; +} - static NSArray arrayWithArray_(NativeCupertinoHttp _lib, NSArray? array) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSArray1, - _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +typedef SInt32 = ffi.Int; - NSArray initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_91(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } +@ffi.Packed(2) +class UnsignedWide extends ffi.Struct { + @UInt32() + external int lo; - NSArray initWithArray_(NSArray? array) { - final _ret = _lib._objc_msgSend_100( - _id, _lib._sel_initWithArray_1, array?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @UInt32() + external int hi; +} - NSArray initWithArray_copyItems_(NSArray? array, bool flag) { - final _ret = _lib._objc_msgSend_144(_id, - _lib._sel_initWithArray_copyItems_1, array?._id ?? ffi.nullptr, flag); - return NSArray._(_ret, _lib, retain: false, release: true); - } +class Float80 extends ffi.Struct { + @SInt16() + external int exp; - /// Reads array stored in NSPropertyList format from the specified url. - NSArray initWithContentsOfURL_error_( - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_145( - _id, - _lib._sel_initWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([4]) + external ffi.Array man; +} - /// Reads array stored in NSPropertyList format from the specified url. - static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_145( - _lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); - } +typedef SInt16 = ffi.Short; +typedef UInt16 = ffi.UnsignedShort; - NSOrderedCollectionDifference - differenceFromArray_withOptions_usingEquivalenceTest_( - NSArray? other, int options, ObjCBlock9 block) { - final _ret = _lib._objc_msgSend_154( - _id, - _lib._sel_differenceFromArray_withOptions_usingEquivalenceTest_1, - other?._id ?? ffi.nullptr, - options, - block._id); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } +class Float96 extends ffi.Struct { + @ffi.Array.multi([2]) + external ffi.Array exp; - NSOrderedCollectionDifference differenceFromArray_withOptions_( - NSArray? other, int options) { - final _ret = _lib._objc_msgSend_155( - _id, - _lib._sel_differenceFromArray_withOptions_1, - other?._id ?? ffi.nullptr, - options); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } + @ffi.Array.multi([4]) + external ffi.Array man; +} - /// Uses isEqual: to determine the difference between the parameter and the receiver - NSOrderedCollectionDifference differenceFromArray_(NSArray? other) { - final _ret = _lib._objc_msgSend_156( - _id, _lib._sel_differenceFromArray_1, other?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } +@ffi.Packed(2) +class Float32Point extends ffi.Struct { + @Float32() + external double x; - NSArray arrayByApplyingDifference_( - NSOrderedCollectionDifference? difference) { - final _ret = _lib._objc_msgSend_157(_id, - _lib._sel_arrayByApplyingDifference_1, difference?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @Float32() + external double y; +} - /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead. - void getObjects_(ffi.Pointer> objects) { - return _lib._objc_msgSend_158(_id, _lib._sel_getObjects_1, objects); - } +typedef Float32 = ffi.Float; - /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. - static NSArray arrayWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_159(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +@ffi.Packed(2) +class ProcessSerialNumber extends ffi.Struct { + @UInt32() + external int highLongOfPSN; - static NSArray arrayWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_160(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @UInt32() + external int lowLongOfPSN; +} - NSArray initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_159( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +class Point extends ffi.Struct { + @ffi.Short() + external int v; - NSArray initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @ffi.Short() + external int h; +} - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); - } +class Rect extends ffi.Struct { + @ffi.Short() + external int top; - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); - } + @ffi.Short() + external int left; - static NSArray new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); - return NSArray._(_ret, _lib, retain: false, release: true); - } + @ffi.Short() + external int bottom; - static NSArray alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); - return NSArray._(_ret, _lib, retain: false, release: true); - } + @ffi.Short() + external int right; } -class NSIndexSet extends NSObject { - NSIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +@ffi.Packed(2) +class FixedPoint extends ffi.Struct { + @Fixed() + external int x; - /// Returns a [NSIndexSet] that points to the same underlying object as [other]. - static NSIndexSet castFrom(T other) { - return NSIndexSet._(other._id, other._lib, retain: true, release: true); - } + @Fixed() + external int y; +} - /// Returns a [NSIndexSet] that wraps the given raw object pointer. - static NSIndexSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexSet._(other, lib, retain: retain, release: release); - } +typedef Fixed = SInt32; - /// Returns whether [obj] is an instance of [NSIndexSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); - } +@ffi.Packed(2) +class FixedRect extends ffi.Struct { + @Fixed() + external int left; - static NSIndexSet indexSet(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + @Fixed() + external int top; - static NSIndexSet indexSetWithIndex_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + @Fixed() + external int right; - static NSIndexSet indexSetWithIndexesInRange_( - NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_111( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + @Fixed() + external int bottom; +} - NSIndexSet initWithIndexesInRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_111(_id, _lib._sel_initWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +class TimeBaseRecord extends ffi.Opaque {} - NSIndexSet initWithIndexSet_(NSIndexSet? indexSet) { - final _ret = _lib._objc_msgSend_112( - _id, _lib._sel_initWithIndexSet_1, indexSet?._id ?? ffi.nullptr); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } +@ffi.Packed(2) +class TimeRecord extends ffi.Struct { + external CompTimeValue value; - NSIndexSet initWithIndex_(int value) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } + @TimeScale() + external int scale; - bool isEqualToIndexSet_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_113( - _id, _lib._sel_isEqualToIndexSet_1, indexSet?._id ?? ffi.nullptr); - } + external TimeBase base; +} - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } +typedef CompTimeValue = wide; +typedef TimeScale = SInt32; +typedef TimeBase = ffi.Pointer; - int get firstIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); +class NumVersion extends ffi.Struct { + @UInt8() + external int nonRelRev; + + @UInt8() + external int stage; + + @UInt8() + external int minorAndBugRev; + + @UInt8() + external int majorRev; +} + +typedef UInt8 = ffi.UnsignedChar; + +class NumVersionVariant extends ffi.Union { + external NumVersion parts; + + @UInt32() + external int whole; +} + +class VersRec extends ffi.Struct { + external NumVersion numericVersion; + + @ffi.Short() + external int countryCode; + + @ffi.Array.multi([256]) + external ffi.Array shortVersion; + + @ffi.Array.multi([256]) + external ffi.Array reserved; +} + +typedef ConstStr255Param = ffi.Pointer; + +class __CFString extends ffi.Opaque {} + +abstract class CFComparisonResult { + static const int kCFCompareLessThan = -1; + static const int kCFCompareEqualTo = 0; + static const int kCFCompareGreaterThan = 1; +} + +typedef CFIndex = ffi.Long; + +class CFRange extends ffi.Struct { + @CFIndex() + external int location; + + @CFIndex() + external int length; +} + +class __CFNull extends ffi.Opaque {} + +typedef CFTypeID = ffi.UnsignedLong; +typedef CFNullRef = ffi.Pointer<__CFNull>; + +class __CFAllocator extends ffi.Opaque {} + +typedef CFAllocatorRef = ffi.Pointer<__CFAllocator>; + +class CFAllocatorContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external CFAllocatorRetainCallBack retain; + + external CFAllocatorReleaseCallBack release; + + external CFAllocatorCopyDescriptionCallBack copyDescription; + + external CFAllocatorAllocateCallBack allocate; + + external CFAllocatorReallocateCallBack reallocate; + + external CFAllocatorDeallocateCallBack deallocate; + + external CFAllocatorPreferredSizeCallBack preferredSize; +} + +typedef CFAllocatorRetainCallBack = ffi.Pointer< + ffi.NativeFunction Function(ffi.Pointer)>>; +typedef CFAllocatorReleaseCallBack + = ffi.Pointer)>>; +typedef CFAllocatorCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFStringRef = ffi.Pointer<__CFString>; +typedef CFAllocatorAllocateCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFIndex, CFOptionFlags, ffi.Pointer)>>; +typedef CFOptionFlags = ffi.UnsignedLong; +typedef CFAllocatorReallocateCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, CFIndex, + CFOptionFlags, ffi.Pointer)>>; +typedef CFAllocatorDeallocateCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFAllocatorPreferredSizeCallBack = ffi.Pointer< + ffi.NativeFunction< + CFIndex Function(CFIndex, CFOptionFlags, ffi.Pointer)>>; +typedef CFTypeRef = ffi.Pointer; +typedef Boolean = ffi.UnsignedChar; +typedef CFHashCode = ffi.UnsignedLong; +typedef NSZone = _NSZone; + +class NSMutableIndexSet extends NSIndexSet { + NSMutableIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableIndexSet] that points to the same underlying object as [other]. + static NSMutableIndexSet castFrom(T other) { + return NSMutableIndexSet._(other._id, other._lib, + retain: true, release: true); } - int get lastIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); + /// Returns a [NSMutableIndexSet] that wraps the given raw object pointer. + static NSMutableIndexSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableIndexSet._(other, lib, retain: retain, release: release); } - int indexGreaterThanIndex_(int value) { - return _lib._objc_msgSend_114( - _id, _lib._sel_indexGreaterThanIndex_1, value); + /// Returns whether [obj] is an instance of [NSMutableIndexSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableIndexSet1); } - int indexLessThanIndex_(int value) { - return _lib._objc_msgSend_114(_id, _lib._sel_indexLessThanIndex_1, value); + void addIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_281( + _id, _lib._sel_addIndexes_1, indexSet?._id ?? ffi.nullptr); } - int indexGreaterThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_114( - _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); + void removeIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_281( + _id, _lib._sel_removeIndexes_1, indexSet?._id ?? ffi.nullptr); } - int indexLessThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_114( - _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); + void removeAllIndexes() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllIndexes1); } - int getIndexes_maxCount_inIndexRange_(ffi.Pointer indexBuffer, - int bufferSize, NSRangePointer range) { - return _lib._objc_msgSend_115( - _id, - _lib._sel_getIndexes_maxCount_inIndexRange_1, - indexBuffer, - bufferSize, - range); + void addIndex_(int value) { + return _lib._objc_msgSend_282(_id, _lib._sel_addIndex_1, value); } - int countOfIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_116( - _id, _lib._sel_countOfIndexesInRange_1, range); + void removeIndex_(int value) { + return _lib._objc_msgSend_282(_id, _lib._sel_removeIndex_1, value); } - bool containsIndex_(int value) { - return _lib._objc_msgSend_117(_id, _lib._sel_containsIndex_1, value); + void addIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_283(_id, _lib._sel_addIndexesInRange_1, range); } - bool containsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_118( - _id, _lib._sel_containsIndexesInRange_1, range); + void removeIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_283(_id, _lib._sel_removeIndexesInRange_1, range); } - bool containsIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_113( - _id, _lib._sel_containsIndexes_1, indexSet?._id ?? ffi.nullptr); + void shiftIndexesStartingAtIndex_by_(int index, int delta) { + return _lib._objc_msgSend_284( + _id, _lib._sel_shiftIndexesStartingAtIndex_by_1, index, delta); } - bool intersectsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_118( - _id, _lib._sel_intersectsIndexesInRange_1, range); + static NSMutableIndexSet indexSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableIndexSet1, _lib._sel_indexSet1); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); } - void enumerateIndexesUsingBlock_(ObjCBlock2 block) { - return _lib._objc_msgSend_119( - _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); + static NSMutableIndexSet indexSetWithIndex_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableIndexSet1, _lib._sel_indexSetWithIndex_1, value); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); } - void enumerateIndexesWithOptions_usingBlock_(int opts, ObjCBlock2 block) { - return _lib._objc_msgSend_120(_id, - _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); + static NSMutableIndexSet indexSetWithIndexesInRange_( + NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_111(_lib._class_NSMutableIndexSet1, + _lib._sel_indexSetWithIndexesInRange_1, range); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); } - void enumerateIndexesInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock2 block) { - return _lib._objc_msgSend_121( - _id, - _lib._sel_enumerateIndexesInRange_options_usingBlock_1, - range, - opts, - block._id); + static NSMutableIndexSet new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_new1); + return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); } - int indexPassingTest_(ObjCBlock3 predicate) { - return _lib._objc_msgSend_122( - _id, _lib._sel_indexPassingTest_1, predicate._id); + static NSMutableIndexSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_alloc1); + return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); } +} - int indexWithOptions_passingTest_(int opts, ObjCBlock3 predicate) { - return _lib._objc_msgSend_123( - _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); +/// Mutable Array +class NSMutableArray extends NSArray { + NSMutableArray._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableArray] that points to the same underlying object as [other]. + static NSMutableArray castFrom(T other) { + return NSMutableArray._(other._id, other._lib, retain: true, release: true); } - int indexInRange_options_passingTest_( - NSRange range, int opts, ObjCBlock3 predicate) { - return _lib._objc_msgSend_124( - _id, - _lib._sel_indexInRange_options_passingTest_1, - range, - opts, - predicate._id); + /// Returns a [NSMutableArray] that wraps the given raw object pointer. + static NSMutableArray castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableArray._(other, lib, retain: retain, release: release); } - NSIndexSet indexesPassingTest_(ObjCBlock3 predicate) { - final _ret = _lib._objc_msgSend_125( - _id, _lib._sel_indexesPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSMutableArray]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableArray1); } - NSIndexSet indexesWithOptions_passingTest_(int opts, ObjCBlock3 predicate) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + void addObject_(NSObject anObject) { + return _lib._objc_msgSend_200(_id, _lib._sel_addObject_1, anObject._id); } - NSIndexSet indexesInRange_options_passingTest_( - NSRange range, int opts, ObjCBlock3 predicate) { - final _ret = _lib._objc_msgSend_127( - _id, - _lib._sel_indexesInRange_options_passingTest_1, - range, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + void insertObject_atIndex_(NSObject anObject, int index) { + return _lib._objc_msgSend_285( + _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); } - void enumerateRangesUsingBlock_(ObjCBlock4 block) { - return _lib._objc_msgSend_128( - _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); + void removeLastObject() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); } - void enumerateRangesWithOptions_usingBlock_(int opts, ObjCBlock4 block) { - return _lib._objc_msgSend_129(_id, - _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); + void removeObjectAtIndex_(int index) { + return _lib._objc_msgSend_282(_id, _lib._sel_removeObjectAtIndex_1, index); } - void enumerateRangesInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock4 block) { - return _lib._objc_msgSend_130( - _id, - _lib._sel_enumerateRangesInRange_options_usingBlock_1, - range, - opts, - block._id); + void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { + return _lib._objc_msgSend_286( + _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); } - static NSIndexSet new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); + @override + NSMutableArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); } - static NSIndexSet alloc(NativeCupertinoHttp _lib) { + NSMutableArray initWithCapacity_(int numItems) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); } -} -typedef NSRangePointer = ffi.Pointer; -void _ObjCBlock2_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); -} + @override + NSMutableArray initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -final _ObjCBlock2_closureRegistry = {}; -int _ObjCBlock2_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock2_registerClosure(Function fn) { - final id = ++_ObjCBlock2_closureRegistryIndex; - _ObjCBlock2_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + void addObjectsFromArray_(NSArray? otherArray) { + return _lib._objc_msgSend_287( + _id, _lib._sel_addObjectsFromArray_1, otherArray?._id ?? ffi.nullptr); + } -void _ObjCBlock2_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return _ObjCBlock2_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + return _lib._objc_msgSend_288( + _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); + } -class ObjCBlock2 extends _ObjCBlockBase { - ObjCBlock2._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + void removeAllObjects() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } - /// Creates a block from a C function pointer. - ObjCBlock2.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - NSUInteger arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock2_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + void removeObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_289( + _id, _lib._sel_removeObject_inRange_1, anObject._id, range); + } - /// Creates a block from a Dart function. - ObjCBlock2.fromFunction(NativeCupertinoHttp lib, - void Function(int arg0, ffi.Pointer arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock2_closureTrampoline) - .cast(), - _ObjCBlock2_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, int arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); + void removeObject_(NSObject anObject) { + return _lib._objc_msgSend_200(_id, _lib._sel_removeObject_1, anObject._id); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_289( + _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); + } -abstract class NSEnumerationOptions { - static const int NSEnumerationConcurrent = 1; - static const int NSEnumerationReverse = 2; -} + void removeObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); + } -bool _ObjCBlock3_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); -} + void removeObjectsFromIndices_numIndices_( + ffi.Pointer indices, int cnt) { + return _lib._objc_msgSend_290( + _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); + } -final _ObjCBlock3_closureRegistry = {}; -int _ObjCBlock3_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock3_registerClosure(Function fn) { - final id = ++_ObjCBlock3_closureRegistryIndex; - _ObjCBlock3_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + void removeObjectsInArray_(NSArray? otherArray) { + return _lib._objc_msgSend_287( + _id, _lib._sel_removeObjectsInArray_1, otherArray?._id ?? ffi.nullptr); + } -bool _ObjCBlock3_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return _ObjCBlock3_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + void removeObjectsInRange_(NSRange range) { + return _lib._objc_msgSend_283(_id, _lib._sel_removeObjectsInRange_1, range); + } -class ObjCBlock3 extends _ObjCBlockBase { - ObjCBlock3._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + void replaceObjectsInRange_withObjectsFromArray_range_( + NSRange range, NSArray? otherArray, NSRange otherRange) { + return _lib._objc_msgSend_291( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, + range, + otherArray?._id ?? ffi.nullptr, + otherRange); + } - /// Creates a block from a C function pointer. - ObjCBlock3.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock3_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + void replaceObjectsInRange_withObjectsFromArray_( + NSRange range, NSArray? otherArray) { + return _lib._objc_msgSend_292( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, + range, + otherArray?._id ?? ffi.nullptr); + } - /// Creates a block from a Dart function. - ObjCBlock3.fromFunction(NativeCupertinoHttp lib, - bool Function(int arg0, ffi.Pointer arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock3_closureTrampoline, false) - .cast(), - _ObjCBlock3_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call(int arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock> block, int arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); + void setArray_(NSArray? otherArray) { + return _lib._objc_msgSend_287( + _id, _lib._sel_setArray_1, otherArray?._id ?? ffi.nullptr); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + void sortUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context) { + return _lib._objc_msgSend_293( + _id, _lib._sel_sortUsingFunction_context_1, compare, context); + } -void _ObjCBlock4_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function( - NSRange arg0, ffi.Pointer arg1)>()(arg0, arg1); -} + void sortUsingSelector_(ffi.Pointer comparator) { + return _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); + } -final _ObjCBlock4_closureRegistry = {}; -int _ObjCBlock4_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock4_registerClosure(Function fn) { - final id = ++_ObjCBlock4_closureRegistryIndex; - _ObjCBlock4_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock4_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { - return _ObjCBlock4_closureRegistry[block.ref.target.address]!(arg0, arg1); -} - -class ObjCBlock4 extends _ObjCBlockBase { - ObjCBlock4._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock4.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSRange arg0, ffi.Pointer arg1)>( - _ObjCBlock4_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock4.fromFunction(NativeCupertinoHttp lib, - void Function(NSRange arg0, ffi.Pointer arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSRange arg0, ffi.Pointer arg1)>( - _ObjCBlock4_closureTrampoline) - .cast(), - _ObjCBlock4_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(NSRange arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); + void insertObjects_atIndexes_(NSArray? objects, NSIndexSet? indexes) { + return _lib._objc_msgSend_294(_id, _lib._sel_insertObjects_atIndexes_1, + objects?._id ?? ffi.nullptr, indexes?._id ?? ffi.nullptr); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} - -void _ObjCBlock5_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} - -final _ObjCBlock5_closureRegistry = {}; -int _ObjCBlock5_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock5_registerClosure(Function fn) { - final id = ++_ObjCBlock5_closureRegistryIndex; - _ObjCBlock5_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock5_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _ObjCBlock5_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} - -class ObjCBlock5 extends _ObjCBlockBase { - ObjCBlock5._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock5.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - NSUInteger arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock5_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + void removeObjectsAtIndexes_(NSIndexSet? indexes) { + return _lib._objc_msgSend_281( + _id, _lib._sel_removeObjectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + } - /// Creates a block from a Dart function. - ObjCBlock5.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock5_closureTrampoline) - .cast(), - _ObjCBlock5_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + void replaceObjectsAtIndexes_withObjects_( + NSIndexSet? indexes, NSArray? objects) { + return _lib._objc_msgSend_295( + _id, + _lib._sel_replaceObjectsAtIndexes_withObjects_1, + indexes?._id ?? ffi.nullptr, + objects?._id ?? ffi.nullptr); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + void setObject_atIndexedSubscript_(NSObject obj, int idx) { + return _lib._objc_msgSend_285( + _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); + } -bool _ObjCBlock6_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + void sortUsingComparator_(NSComparator cmptr) { + return _lib._objc_msgSend_296(_id, _lib._sel_sortUsingComparator_1, cmptr); + } -final _ObjCBlock6_closureRegistry = {}; -int _ObjCBlock6_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock6_registerClosure(Function fn) { - final id = ++_ObjCBlock6_closureRegistryIndex; - _ObjCBlock6_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + void sortWithOptions_usingComparator_(int opts, NSComparator cmptr) { + return _lib._objc_msgSend_297( + _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr); + } -bool _ObjCBlock6_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _ObjCBlock6_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + static NSMutableArray arrayWithCapacity_( + NativeCupertinoHttp _lib, int numItems) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock6 extends _ObjCBlockBase { - ObjCBlock6._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + static NSMutableArray arrayWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_298(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock6.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - NSUInteger arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock6_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static NSMutableArray arrayWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_299(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock6.fromFunction( - NativeCupertinoHttp lib, - bool Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock6_closureTrampoline, false) - .cast(), - _ObjCBlock6_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call( - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + NSMutableArray initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_298( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + NSMutableArray initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_299( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -typedef NSComparator = ffi.Pointer<_ObjCBlock>; -int _ObjCBlock7_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} + void applyDifference_(NSOrderedCollectionDifference? difference) { + return _lib._objc_msgSend_300( + _id, _lib._sel_applyDifference_1, difference?._id ?? ffi.nullptr); + } -final _ObjCBlock7_closureRegistry = {}; -int _ObjCBlock7_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock7_registerClosure(Function fn) { - final id = ++_ObjCBlock7_closureRegistryIndex; - _ObjCBlock7_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static NSMutableArray array(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -int _ObjCBlock7_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock7_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + static NSMutableArray arrayWithObject_( + NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock7 extends _ObjCBlockBase { - ObjCBlock7._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + static NSMutableArray arrayWithObjects_count_(NativeCupertinoHttp _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_95(_lib._class_NSMutableArray1, + _lib._sel_arrayWithObjects_count_1, objects, cnt); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock7.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock7_fnPtrTrampoline, 0) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static NSMutableArray arrayWithObjects_( + NativeCupertinoHttp _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableArray1, + _lib._sel_arrayWithObjects_1, firstObj._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock7.fromFunction( - NativeCupertinoHttp lib, - int Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock7_closureTrampoline, 0) - .cast(), - _ObjCBlock7_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - int call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); + static NSMutableArray arrayWithArray_( + NativeCupertinoHttp _lib, NSArray? array) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableArray1, + _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// Reads array stored in NSPropertyList format from the specified url. + static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_145( + _lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); + } -abstract class NSSortOptions { - static const int NSSortConcurrent = 1; - static const int NSSortStable = 16; -} + static NSMutableArray new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } -abstract class NSBinarySearchingOptions { - static const int NSBinarySearchingFirstEqual = 256; - static const int NSBinarySearchingLastEqual = 512; - static const int NSBinarySearchingInsertionIndex = 1024; + static NSMutableArray alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } } -class NSOrderedCollectionDifference extends NSObject { - NSOrderedCollectionDifference._( - ffi.Pointer id, NativeCupertinoHttp lib, +/// Mutable Data +class NSMutableData extends NSData { + NSMutableData._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSOrderedCollectionDifference] that points to the same underlying object as [other]. - static NSOrderedCollectionDifference castFrom( - T other) { - return NSOrderedCollectionDifference._(other._id, other._lib, - retain: true, release: true); + /// Returns a [NSMutableData] that points to the same underlying object as [other]. + static NSMutableData castFrom(T other) { + return NSMutableData._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSOrderedCollectionDifference] that wraps the given raw object pointer. - static NSOrderedCollectionDifference castFromPointer( + /// Returns a [NSMutableData] that wraps the given raw object pointer. + static NSMutableData castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSOrderedCollectionDifference._(other, lib, - retain: retain, release: release); + return NSMutableData._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSOrderedCollectionDifference]. + /// Returns whether [obj] is an instance of [NSMutableData]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOrderedCollectionDifference1); - } - - NSOrderedCollectionDifference initWithChanges_(NSObject? changes) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_initWithChanges_1, changes?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); } - NSOrderedCollectionDifference - initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_( - NSIndexSet? inserts, - NSObject? insertedObjects, - NSIndexSet? removes, - NSObject? removedObjects, - NSObject? changes) { - final _ret = _lib._objc_msgSend_146( - _id, - _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1, - inserts?._id ?? ffi.nullptr, - insertedObjects?._id ?? ffi.nullptr, - removes?._id ?? ffi.nullptr, - removedObjects?._id ?? ffi.nullptr, - changes?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + ffi.Pointer get mutableBytes { + return _lib._objc_msgSend_31(_id, _lib._sel_mutableBytes1); } - NSOrderedCollectionDifference - initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_( - NSIndexSet? inserts, - NSObject? insertedObjects, - NSIndexSet? removes, - NSObject? removedObjects) { - final _ret = _lib._objc_msgSend_147( - _id, - _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1, - inserts?._id ?? ffi.nullptr, - insertedObjects?._id ?? ffi.nullptr, - removes?._id ?? ffi.nullptr, - removedObjects?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + @override + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); } - NSObject? get insertions { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_insertions1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + set length(int value) { + _lib._objc_msgSend_301(_id, _lib._sel_setLength_1, value); } - NSObject? get removals { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_removals1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + void appendBytes_length_(ffi.Pointer bytes, int length) { + return _lib._objc_msgSend_33( + _id, _lib._sel_appendBytes_length_1, bytes, length); } - bool get hasChanges { - return _lib._objc_msgSend_11(_id, _lib._sel_hasChanges1); + void appendData_(NSData? other) { + return _lib._objc_msgSend_302( + _id, _lib._sel_appendData_1, other?._id ?? ffi.nullptr); } - NSOrderedCollectionDifference differenceByTransformingChangesWithBlock_( - ObjCBlock8 block) { - final _ret = _lib._objc_msgSend_153( - _id, _lib._sel_differenceByTransformingChangesWithBlock_1, block._id); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + void increaseLengthBy_(int extraLength) { + return _lib._objc_msgSend_282( + _id, _lib._sel_increaseLengthBy_1, extraLength); } - NSOrderedCollectionDifference inverseDifference() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_inverseDifference1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + void replaceBytesInRange_withBytes_( + NSRange range, ffi.Pointer bytes) { + return _lib._objc_msgSend_303( + _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); } - static NSOrderedCollectionDifference new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionDifference1, _lib._sel_new1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: false, release: true); + void resetBytesInRange_(NSRange range) { + return _lib._objc_msgSend_283(_id, _lib._sel_resetBytesInRange_1, range); } - static NSOrderedCollectionDifference alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionDifference1, _lib._sel_alloc1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: false, release: true); + void setData_(NSData? data) { + return _lib._objc_msgSend_302( + _id, _lib._sel_setData_1, data?._id ?? ffi.nullptr); } -} -ffi.Pointer _ObjCBlock8_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>()(arg0); -} + void replaceBytesInRange_withBytes_length_(NSRange range, + ffi.Pointer replacementBytes, int replacementLength) { + return _lib._objc_msgSend_304( + _id, + _lib._sel_replaceBytesInRange_withBytes_length_1, + range, + replacementBytes, + replacementLength); + } -final _ObjCBlock8_closureRegistry = {}; -int _ObjCBlock8_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock8_registerClosure(Function fn) { - final id = ++_ObjCBlock8_closureRegistryIndex; - _ObjCBlock8_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static NSMutableData dataWithCapacity_( + NativeCupertinoHttp _lib, int aNumItems) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -ffi.Pointer _ObjCBlock8_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock8_closureRegistry[block.ref.target.address]!(arg0); -} + static NSMutableData dataWithLength_(NativeCupertinoHttp _lib, int length) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock8 extends _ObjCBlockBase { - ObjCBlock8._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + NSMutableData initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, capacity); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock8.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock8_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + NSMutableData initWithLength_(int length) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithLength_1, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock8.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock8_closureTrampoline) - .cast(), - _ObjCBlock8_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); + /// These methods compress or decompress the receiver's contents in-place using the specified algorithm. If the operation is not successful, these methods leave the receiver unchanged.. + bool decompressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_305( + _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); } - ffi.Pointer<_ObjCBlock> get pointer => _id; + bool compressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_305( + _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); + } + + static NSMutableData data(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, + _lib._sel_dataWithBytes_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_213(_lib._class_NSMutableData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSMutableData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + static NSMutableData alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } } -class NSOrderedCollectionChange extends NSObject { - NSOrderedCollectionChange._( - ffi.Pointer id, NativeCupertinoHttp lib, +/// Purgeable Data +class NSPurgeableData extends NSMutableData { + NSPurgeableData._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSOrderedCollectionChange] that points to the same underlying object as [other]. - static NSOrderedCollectionChange castFrom(T other) { - return NSOrderedCollectionChange._(other._id, other._lib, + /// Returns a [NSPurgeableData] that points to the same underlying object as [other]. + static NSPurgeableData castFrom(T other) { + return NSPurgeableData._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSOrderedCollectionChange] that wraps the given raw object pointer. - static NSOrderedCollectionChange castFromPointer( + /// Returns a [NSPurgeableData] that wraps the given raw object pointer. + static NSPurgeableData castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSOrderedCollectionChange._(other, lib, - retain: retain, release: release); + return NSPurgeableData._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSOrderedCollectionChange]. + /// Returns whether [obj] is an instance of [NSPurgeableData]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOrderedCollectionChange1); + obj._lib._class_NSPurgeableData1); } - static NSOrderedCollectionChange changeWithObject_type_index_( - NativeCupertinoHttp _lib, NSObject anObject, int type, int index) { - final _ret = _lib._objc_msgSend_148(_lib._class_NSOrderedCollectionChange1, - _lib._sel_changeWithObject_type_index_1, anObject._id, type, index); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + static NSPurgeableData dataWithCapacity_( + NativeCupertinoHttp _lib, int aNumItems) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSPurgeableData1, _lib._sel_dataWithCapacity_1, aNumItems); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - static NSOrderedCollectionChange changeWithObject_type_index_associatedIndex_( - NativeCupertinoHttp _lib, - NSObject anObject, - int type, - int index, - int associatedIndex) { - final _ret = _lib._objc_msgSend_149( - _lib._class_NSOrderedCollectionChange1, - _lib._sel_changeWithObject_type_index_associatedIndex_1, - anObject._id, - type, - index, - associatedIndex); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + static NSPurgeableData dataWithLength_(NativeCupertinoHttp _lib, int length) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSPurgeableData1, _lib._sel_dataWithLength_1, length); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - NSObject get object { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSPurgeableData data(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_data1); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - int get changeType { - return _lib._objc_msgSend_150(_id, _lib._sel_changeType1); + static NSPurgeableData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytes_length_1, bytes, length); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - int get index { - return _lib._objc_msgSend_12(_id, _lib._sel_index1); + static NSPurgeableData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); } - int get associatedIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_associatedIndex1); + static NSPurgeableData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_213(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); } - @override - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSPurgeableData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - NSOrderedCollectionChange initWithObject_type_index_( - NSObject anObject, int type, int index) { - final _ret = _lib._objc_msgSend_151( - _id, _lib._sel_initWithObject_type_index_1, anObject._id, type, index); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + static NSPurgeableData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - NSOrderedCollectionChange initWithObject_type_index_associatedIndex_( - NSObject anObject, int type, int index, int associatedIndex) { - final _ret = _lib._objc_msgSend_152( - _id, - _lib._sel_initWithObject_type_index_associatedIndex_1, - anObject._id, - type, - index, - associatedIndex); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + static NSPurgeableData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - static NSOrderedCollectionChange new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionChange1, _lib._sel_new1); - return NSOrderedCollectionChange._(_ret, _lib, - retain: false, release: true); + static NSPurgeableData dataWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - static NSOrderedCollectionChange alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionChange1, _lib._sel_alloc1); - return NSOrderedCollectionChange._(_ret, _lib, - retain: false, release: true); + static NSPurgeableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSPurgeableData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); } -} - -abstract class NSCollectionChangeType { - static const int NSCollectionChangeInsert = 0; - static const int NSCollectionChangeRemove = 1; -} -abstract class NSOrderedCollectionDifferenceCalculationOptions { - static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = - 1; - static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = - 2; - static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; -} + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -bool _ObjCBlock9_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} + static NSPurgeableData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_new1); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } -final _ObjCBlock9_closureRegistry = {}; -int _ObjCBlock9_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock9_registerClosure(Function fn) { - final id = ++_ObjCBlock9_closureRegistryIndex; - _ObjCBlock9_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + static NSPurgeableData alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_alloc1); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } } -bool _ObjCBlock9_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock9_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +/// Mutable Dictionary +class NSMutableDictionary extends NSDictionary { + NSMutableDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class ObjCBlock9 extends _ObjCBlockBase { - ObjCBlock9._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. + static NSMutableDictionary castFrom(T other) { + return NSMutableDictionary._(other._id, other._lib, + retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock9.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock9_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. + static NSMutableDictionary castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableDictionary._(other, lib, retain: retain, release: release); + } - /// Creates a block from a Dart function. - ObjCBlock9.fromFunction( - NativeCupertinoHttp lib, - bool Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock9_closureTrampoline, false) - .cast(), - _ObjCBlock9_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); + /// Returns whether [obj] is an instance of [NSMutableDictionary]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableDictionary1); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + void removeObjectForKey_(NSObject aKey) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObjectForKey_1, aKey._id); + } -void _ObjCBlock10_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + void setObject_forKey_(NSObject anObject, NSObject aKey) { + return _lib._objc_msgSend_306( + _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); + } -final _ObjCBlock10_closureRegistry = {}; -int _ObjCBlock10_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock10_registerClosure(Function fn) { - final id = ++_ObjCBlock10_closureRegistryIndex; - _ObjCBlock10_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + @override + NSMutableDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock10_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock10_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + NSMutableDictionary initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock10 extends _ObjCBlockBase { - ObjCBlock10._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock10.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock10_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock10.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock10_closureTrampoline) - .cast(), - _ObjCBlock10_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + @override + NSMutableDictionary initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} - -bool _ObjCBlock11_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} - -final _ObjCBlock11_closureRegistry = {}; -int _ObjCBlock11_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock11_registerClosure(Function fn) { - final id = ++_ObjCBlock11_closureRegistryIndex; - _ObjCBlock11_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock11_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock11_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} - -class ObjCBlock11 extends _ObjCBlockBase { - ObjCBlock11._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock11.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock11_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock11.fromFunction( - NativeCupertinoHttp lib, - bool Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock11_closureTrampoline, false) - .cast(), - _ObjCBlock11_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + void addEntriesFromDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_307(_id, _lib._sel_addEntriesFromDictionary_1, + otherDictionary?._id ?? ffi.nullptr); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} - -class NSFastEnumerationState extends ffi.Struct { - @ffi.UnsignedLong() - external int state; - - external ffi.Pointer> itemsPtr; - - external ffi.Pointer mutationsPtr; + void removeAllObjects() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } - @ffi.Array.multi([5]) - external ffi.Array extra; -} + void removeObjectsForKeys_(NSArray? keyArray) { + return _lib._objc_msgSend_287( + _id, _lib._sel_removeObjectsForKeys_1, keyArray?._id ?? ffi.nullptr); + } -ffi.Pointer _ObjCBlock12_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>()(arg0, arg1); -} + void setDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_307( + _id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr); + } -final _ObjCBlock12_closureRegistry = {}; -int _ObjCBlock12_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock12_registerClosure(Function fn) { - final id = ++_ObjCBlock12_closureRegistryIndex; - _ObjCBlock12_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + void setObject_forKeyedSubscript_(NSObject obj, NSObject key) { + return _lib._objc_msgSend_306( + _id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id); + } -ffi.Pointer _ObjCBlock12_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) { - return _ObjCBlock12_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + static NSMutableDictionary dictionaryWithCapacity_( + NativeCupertinoHttp _lib, int numItems) { + final _ret = _lib._objc_msgSend_94(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock12 extends _ObjCBlockBase { - ObjCBlock12._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + static NSMutableDictionary dictionaryWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_308(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock12.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>( - _ObjCBlock12_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static NSMutableDictionary dictionaryWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_309(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock12.fromFunction( - NativeCupertinoHttp lib, - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>( - _ObjCBlock12_closureTrampoline) - .cast(), - _ObjCBlock12_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call( - ffi.Pointer arg0, NSErrorUserInfoKey arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>()(_id, arg0, arg1); + NSMutableDictionary initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_308( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + NSMutableDictionary initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_309( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -typedef NSErrorUserInfoKey = ffi.Pointer; -typedef NSURLResourceKey = ffi.Pointer; + /// Create a mutable dictionary which is optimized for dealing with a known set of keys. + /// Keys that are not in the key set can still be set into the dictionary, but that usage is not optimal. + /// As with any dictionary, the keys must be copyable. + /// If keyset is nil, an exception is thrown. + /// If keyset is not an object returned by +sharedKeySetForKeys:, an exception is thrown. + static NSMutableDictionary dictionaryWithSharedKeySet_( + NativeCupertinoHttp _lib, NSObject keyset) { + final _ret = _lib._objc_msgSend_310(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -/// Working with Bookmarks and alias (bookmark) files -abstract class NSURLBookmarkCreationOptions { - /// This option does nothing and has no effect on bookmark resolution - static const int NSURLBookmarkCreationPreferFileIDResolution = 256; + static NSMutableDictionary dictionary(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - /// creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways - static const int NSURLBookmarkCreationMinimalBookmark = 512; + static NSMutableDictionary dictionaryWithObject_forKey_( + NativeCupertinoHttp _lib, NSObject object, NSObject key) { + final _ret = _lib._objc_msgSend_173(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - /// include the properties required by writeBookmarkData:toURL:options: in the bookmark data created - static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; + static NSMutableDictionary dictionaryWithObjects_forKeys_count_( + NativeCupertinoHttp _lib, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_93(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - /// include information in the bookmark data which allows the same sandboxed process to access the resource after being relaunched - static const int NSURLBookmarkCreationWithSecurityScope = 2048; + static NSMutableDictionary dictionaryWithObjectsAndKeys_( + NativeCupertinoHttp _lib, NSObject firstObject) { + final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - /// if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted - static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; + static NSMutableDictionary dictionaryWithDictionary_( + NativeCupertinoHttp _lib, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_174(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - /// Disable automatic embedding of an implicit security scope. The resolving process will not be able gain access to the resource by security scope, either implicitly or explicitly, through the returned URL. Not applicable to security-scoped bookmarks. - static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = - 536870912; -} + static NSMutableDictionary dictionaryWithObjects_forKeys_( + NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_175( + _lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -abstract class NSURLBookmarkResolutionOptions { - /// don't perform any user interaction during bookmark resolution - static const int NSURLBookmarkResolutionWithoutUI = 256; + /// Reads dictionary stored in NSPropertyList format from the specified url. + static NSDictionary dictionaryWithContentsOfURL_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_177( + _lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - /// don't mount a volume during bookmark resolution - static const int NSURLBookmarkResolutionWithoutMounting = 512; + /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. + /// The keys are copied from the array and must be copyable. + /// If the array parameter is nil or not an NSArray, an exception is thrown. + /// If the array of keys is empty, an empty key set is returned. + /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). + /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. + /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. + static NSObject sharedKeySetForKeys_( + NativeCupertinoHttp _lib, NSArray? keys) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableDictionary1, + _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - /// use the secure information included at creation time to provide the ability to access the resource in a sandboxed process - static const int NSURLBookmarkResolutionWithSecurityScope = 1024; + static NSMutableDictionary new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } - /// Disable implicitly starting access of the ephemeral security-scoped resource during resolution. Instead, call `-[NSURL startAccessingSecurityScopedResource]` on the returned URL when ready to use the resource. Not applicable to security-scoped bookmarks. - static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; + static NSMutableDictionary alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_alloc1); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } } -typedef NSURLBookmarkFileCreationOptions = NSUInteger; - -class NSURLHandle extends NSObject { - NSURLHandle._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSNotification extends NSObject { + NSNotification._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSURLHandle] that points to the same underlying object as [other]. - static NSURLHandle castFrom(T other) { - return NSURLHandle._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSNotification] that points to the same underlying object as [other]. + static NSNotification castFrom(T other) { + return NSNotification._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSURLHandle] that wraps the given raw object pointer. - static NSURLHandle castFromPointer( + /// Returns a [NSNotification] that wraps the given raw object pointer. + static NSNotification castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSURLHandle._(other, lib, retain: retain, release: release); + return NSNotification._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSURLHandle]. + /// Returns whether [obj] is an instance of [NSNotification]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSNotification1); } - static void registerURLHandleClass_( - NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { - return _lib._objc_msgSend_200(_lib._class_NSURLHandle1, - _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); + NSNotificationName get name { + return _lib._objc_msgSend_32(_id, _lib._sel_name1); } - static NSObject URLHandleClassForURL_( - NativeCupertinoHttp _lib, NSURL? anURL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSURLHandle1, - _lib._sel_URLHandleClassForURL_1, anURL?._id ?? ffi.nullptr); + NSObject get object { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); return NSObject._(_ret, _lib, retain: true, release: true); } - int status() { - return _lib._objc_msgSend_202(_id, _lib._sel_status1); + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - NSString failureReason() { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_failureReason1); - return NSString._(_ret, _lib, retain: true, release: true); + NSNotification initWithName_object_userInfo_( + NSNotificationName name, NSObject object, NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_311( + _id, + _lib._sel_initWithName_object_userInfo_1, + name, + object._id, + userInfo?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); } - void addClient_(NSObject? client) { - return _lib._objc_msgSend_200( - _id, _lib._sel_addClient_1, client?._id ?? ffi.nullptr); + NSNotification initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); } - void removeClient_(NSObject? client) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeClient_1, client?._id ?? ffi.nullptr); + static NSNotification notificationWithName_object_( + NativeCupertinoHttp _lib, NSNotificationName aName, NSObject anObject) { + final _ret = _lib._objc_msgSend_258(_lib._class_NSNotification1, + _lib._sel_notificationWithName_object_1, aName, anObject._id); + return NSNotification._(_ret, _lib, retain: true, release: true); } - void loadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); + static NSNotification notificationWithName_object_userInfo_( + NativeCupertinoHttp _lib, + NSNotificationName aName, + NSObject anObject, + NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_311( + _lib._class_NSNotification1, + _lib._sel_notificationWithName_object_userInfo_1, + aName, + anObject._id, + aUserInfo?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); } - void cancelLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); + @override + NSNotification init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSNotification._(_ret, _lib, retain: true, release: true); } - NSData resourceData() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_resourceData1); - return NSData._(_ret, _lib, retain: true, release: true); + static NSNotification new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); + return NSNotification._(_ret, _lib, retain: false, release: true); } - NSData availableResourceData() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_availableResourceData1); - return NSData._(_ret, _lib, retain: true, release: true); + static NSNotification alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); + return NSNotification._(_ret, _lib, retain: false, release: true); } +} - int expectedResourceDataSize() { - return _lib._objc_msgSend_82(_id, _lib._sel_expectedResourceDataSize1); - } +typedef NSNotificationName = ffi.Pointer; - void flushCachedData() { - return _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); +class NSNotificationCenter extends NSObject { + NSNotificationCenter._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNotificationCenter] that points to the same underlying object as [other]. + static NSNotificationCenter castFrom(T other) { + return NSNotificationCenter._(other._id, other._lib, + retain: true, release: true); } - void backgroundLoadDidFailWithReason_(NSString? reason) { - return _lib._objc_msgSend_188( + /// Returns a [NSNotificationCenter] that wraps the given raw object pointer. + static NSNotificationCenter castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNotificationCenter._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNotificationCenter]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSNotificationCenter1); + } + + static NSNotificationCenter? getDefaultCenter(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_312( + _lib._class_NSNotificationCenter1, _lib._sel_defaultCenter1); + return _ret.address == 0 + ? null + : NSNotificationCenter._(_ret, _lib, retain: true, release: true); + } + + void addObserver_selector_name_object_( + NSObject observer, + ffi.Pointer aSelector, + NSNotificationName aName, + NSObject anObject) { + return _lib._objc_msgSend_313( _id, - _lib._sel_backgroundLoadDidFailWithReason_1, - reason?._id ?? ffi.nullptr); + _lib._sel_addObserver_selector_name_object_1, + observer._id, + aSelector, + aName, + anObject._id); } - void didLoadBytes_loadComplete_(NSData? newBytes, bool yorn) { - return _lib._objc_msgSend_203(_id, _lib._sel_didLoadBytes_loadComplete_1, - newBytes?._id ?? ffi.nullptr, yorn); + void postNotification_(NSNotification? notification) { + return _lib._objc_msgSend_314( + _id, _lib._sel_postNotification_1, notification?._id ?? ffi.nullptr); } - static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL? anURL) { - return _lib._objc_msgSend_204(_lib._class_NSURLHandle1, - _lib._sel_canInitWithURL_1, anURL?._id ?? ffi.nullptr); + void postNotificationName_object_( + NSNotificationName aName, NSObject anObject) { + return _lib._objc_msgSend_315( + _id, _lib._sel_postNotificationName_object_1, aName, anObject._id); } - static NSURLHandle cachedHandleForURL_( - NativeCupertinoHttp _lib, NSURL? anURL) { - final _ret = _lib._objc_msgSend_205(_lib._class_NSURLHandle1, - _lib._sel_cachedHandleForURL_1, anURL?._id ?? ffi.nullptr); - return NSURLHandle._(_ret, _lib, retain: true, release: true); + void postNotificationName_object_userInfo_( + NSNotificationName aName, NSObject anObject, NSDictionary? aUserInfo) { + return _lib._objc_msgSend_316( + _id, + _lib._sel_postNotificationName_object_userInfo_1, + aName, + anObject._id, + aUserInfo?._id ?? ffi.nullptr); } - NSObject initWithURL_cached_(NSURL? anURL, bool willCache) { - final _ret = _lib._objc_msgSend_206(_id, _lib._sel_initWithURL_cached_1, - anURL?._id ?? ffi.nullptr, willCache); - return NSObject._(_ret, _lib, retain: true, release: true); + void removeObserver_(NSObject observer) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObserver_1, observer._id); } - NSObject propertyForKey_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + void removeObserver_name_object_( + NSObject observer, NSNotificationName aName, NSObject anObject) { + return _lib._objc_msgSend_317(_id, _lib._sel_removeObserver_name_object_1, + observer._id, aName, anObject._id); } - NSObject propertyForKeyIfAvailable_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_42(_id, - _lib._sel_propertyForKeyIfAvailable_1, propertyKey?._id ?? ffi.nullptr); + NSObject addObserverForName_object_queue_usingBlock_(NSNotificationName name, + NSObject obj, NSOperationQueue? queue, ObjCBlock18 block) { + final _ret = _lib._objc_msgSend_346( + _id, + _lib._sel_addObserverForName_object_queue_usingBlock_1, + name, + obj._id, + queue?._id ?? ffi.nullptr, + block._id); return NSObject._(_ret, _lib, retain: true, release: true); } - bool writeProperty_forKey_(NSObject propertyValue, NSString? propertyKey) { - return _lib._objc_msgSend_199(_id, _lib._sel_writeProperty_forKey_1, - propertyValue._id, propertyKey?._id ?? ffi.nullptr); + static NSNotificationCenter new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotificationCenter1, _lib._sel_new1); + return NSNotificationCenter._(_ret, _lib, retain: false, release: true); } - bool writeData_(NSData? data) { - return _lib._objc_msgSend_35( - _id, _lib._sel_writeData_1, data?._id ?? ffi.nullptr); + static NSNotificationCenter alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSNotificationCenter1, _lib._sel_alloc1); + return NSNotificationCenter._(_ret, _lib, retain: false, release: true); } +} - NSData loadInForeground() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_loadInForeground1); - return NSData._(_ret, _lib, retain: true, release: true); +class NSOperationQueue extends NSObject { + NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. + static NSOperationQueue castFrom(T other) { + return NSOperationQueue._(other._id, other._lib, + retain: true, release: true); } - void beginLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); + /// Returns a [NSOperationQueue] that wraps the given raw object pointer. + static NSOperationQueue castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOperationQueue._(other, lib, retain: retain, release: release); } - void endLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); + /// Returns whether [obj] is an instance of [NSOperationQueue]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOperationQueue1); } - static NSURLHandle new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); + /// @property progress + /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue + /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the + /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the + /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super + /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress + /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% + /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 + /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be + /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by + /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving + /// progress scenario. + /// + /// @example + /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; + /// queue.progress.totalUnitCount = 10; + NSProgress? get progress { + final _ret = _lib._objc_msgSend_318(_id, _lib._sel_progress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); } - static NSURLHandle alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); + void addOperation_(NSOperation? op) { + return _lib._objc_msgSend_334( + _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); } -} -abstract class NSURLHandleStatus { - static const int NSURLHandleNotLoaded = 0; - static const int NSURLHandleLoadSucceeded = 1; - static const int NSURLHandleLoadInProgress = 2; - static const int NSURLHandleLoadFailed = 3; -} + void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { + return _lib._objc_msgSend_340( + _id, + _lib._sel_addOperations_waitUntilFinished_1, + ops?._id ?? ffi.nullptr, + wait); + } -abstract class NSDataWritingOptions { - /// Hint to use auxiliary file when saving; equivalent to atomically:YES - static const int NSDataWritingAtomic = 1; + void addOperationWithBlock_(ObjCBlock16 block) { + return _lib._objc_msgSend_341( + _id, _lib._sel_addOperationWithBlock_1, block._id); + } - /// Hint to prevent overwriting an existing file. Cannot be combined with NSDataWritingAtomic. - static const int NSDataWritingWithoutOverwriting = 2; - static const int NSDataWritingFileProtectionNone = 268435456; - static const int NSDataWritingFileProtectionComplete = 536870912; - static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; - static const int - NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = - 1073741824; - static const int NSDataWritingFileProtectionMask = 4026531840; + /// @method addBarrierBlock: + /// @param barrier A block to execute + /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and + /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the + /// `dispatch_barrier_async` function. + void addBarrierBlock_(ObjCBlock16 barrier) { + return _lib._objc_msgSend_341( + _id, _lib._sel_addBarrierBlock_1, barrier._id); + } - /// Deprecated name for NSDataWritingAtomic - static const int NSAtomicWrite = 1; -} + int get maxConcurrentOperationCount { + return _lib._objc_msgSend_81(_id, _lib._sel_maxConcurrentOperationCount1); + } -/// Data Search Options -abstract class NSDataSearchOptions { - static const int NSDataSearchBackwards = 1; - static const int NSDataSearchAnchored = 2; -} + set maxConcurrentOperationCount(int value) { + _lib._objc_msgSend_342( + _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + } -void _ObjCBlock13_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + bool get suspended { + return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); + } -final _ObjCBlock13_closureRegistry = {}; -int _ObjCBlock13_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock13_registerClosure(Function fn) { - final id = ++_ObjCBlock13_closureRegistryIndex; - _ObjCBlock13_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set suspended(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setSuspended_1, value); + } -void _ObjCBlock13_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return _ObjCBlock13_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock13 extends _ObjCBlockBase { - ObjCBlock13._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + set name(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } - /// Creates a block from a C function pointer. - ObjCBlock13.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>( - _ObjCBlock13_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + int get qualityOfService { + return _lib._objc_msgSend_338(_id, _lib._sel_qualityOfService1); + } - /// Creates a block from a Dart function. - ObjCBlock13.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>( - _ObjCBlock13_closureTrampoline) - .cast(), - _ObjCBlock13_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + set qualityOfService(int value) { + _lib._objc_msgSend_339(_id, _lib._sel_setQualityOfService_1, value); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// actually retain + dispatch_queue_t get underlyingQueue { + return _lib._objc_msgSend_343(_id, _lib._sel_underlyingQueue1); + } -/// Read/Write Options -abstract class NSDataReadingOptions { - /// Hint to map the file in if possible and safe - static const int NSDataReadingMappedIfSafe = 1; + /// actually retain + set underlyingQueue(dispatch_queue_t value) { + _lib._objc_msgSend_344(_id, _lib._sel_setUnderlyingQueue_1, value); + } - /// Hint to get the file not to be cached in the kernel - static const int NSDataReadingUncached = 2; + void cancelAllOperations() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + } - /// Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given. - static const int NSDataReadingMappedAlways = 8; + void waitUntilAllOperationsAreFinished() { + return _lib._objc_msgSend_1( + _id, _lib._sel_waitUntilAllOperationsAreFinished1); + } - /// Deprecated name for NSDataReadingMappedIfSafe - static const int NSDataReadingMapped = 1; + static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_345( + _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } - /// Deprecated name for NSDataReadingMapped - static const int NSMappedRead = 1; + static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_345( + _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } - /// Deprecated name for NSDataReadingUncached - static const int NSUncachedRead = 2; -} + /// These two functions are inherently a race condition and should be avoided if possible + NSArray? get operations { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_operations1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock14_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); -} + int get operationCount { + return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); + } -final _ObjCBlock14_closureRegistry = {}; -int _ObjCBlock14_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock14_registerClosure(Function fn) { - final id = ++_ObjCBlock14_closureRegistryIndex; - _ObjCBlock14_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static NSOperationQueue new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } -void _ObjCBlock14_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return _ObjCBlock14_closureRegistry[block.ref.target.address]!(arg0, arg1); + static NSOperationQueue alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } } -class ObjCBlock14 extends _ObjCBlockBase { - ObjCBlock14._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class NSProgress extends NSObject { + NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - /// Creates a block from a C function pointer. - ObjCBlock14.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, NSUInteger arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock14_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// Returns a [NSProgress] that points to the same underlying object as [other]. + static NSProgress castFrom(T other) { + return NSProgress._(other._id, other._lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock14.fromFunction(NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, int arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock14_closureTrampoline) - .cast(), - _ObjCBlock14_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); + /// Returns a [NSProgress] that wraps the given raw object pointer. + static NSProgress castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSProgress._(other, lib, retain: retain, release: release); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// Returns whether [obj] is an instance of [NSProgress]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); + } -abstract class NSDataBase64DecodingOptions { - /// Use the following option to modify the decoding algorithm so that it ignores unknown non-Base64 bytes, including line ending characters. - static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; -} + static NSProgress currentProgress(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_318( + _lib._class_NSProgress1, _lib._sel_currentProgress1); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -/// Base 64 Options -abstract class NSDataBase64EncodingOptions { - /// Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default. - static const int NSDataBase64Encoding64CharacterLineLength = 1; - static const int NSDataBase64Encoding76CharacterLineLength = 2; + static NSProgress progressWithTotalUnitCount_( + NativeCupertinoHttp _lib, int unitCount) { + final _ret = _lib._objc_msgSend_319(_lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } - /// Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF. - static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; - static const int NSDataBase64EncodingEndLineWithLineFeed = 32; -} + static NSProgress discreteProgressWithTotalUnitCount_( + NativeCupertinoHttp _lib, int unitCount) { + final _ret = _lib._objc_msgSend_319(_lib._class_NSProgress1, + _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -/// Various algorithms provided for compression APIs. See NSData and NSMutableData. -abstract class NSDataCompressionAlgorithm { - /// LZFSE is the recommended compression algorithm if you don't have a specific reason to use another algorithm. Note that LZFSE is intended for use with Apple devices only. This algorithm generally compresses better than Zlib, but not as well as LZMA. It is generally slower than LZ4. - static const int NSDataCompressionAlgorithmLZFSE = 0; + static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( + NativeCupertinoHttp _lib, + int unitCount, + NSProgress? parent, + int portionOfParentTotalUnitCount) { + final _ret = _lib._objc_msgSend_320( + _lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, + unitCount, + parent?._id ?? ffi.nullptr, + portionOfParentTotalUnitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } - /// LZ4 is appropriate if compression speed is critical. LZ4 generally sacrifices compression ratio in order to achieve its greater speed. - /// This implementation of LZ4 makes a small modification to the standard format, which is described in greater detail in . - static const int NSDataCompressionAlgorithmLZ4 = 1; + NSProgress initWithParent_userInfo_( + NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { + final _ret = _lib._objc_msgSend_321( + _id, + _lib._sel_initWithParent_userInfo_1, + parentProgressOrNil?._id ?? ffi.nullptr, + userInfoOrNil?._id ?? ffi.nullptr); + return NSProgress._(_ret, _lib, retain: true, release: true); + } - /// LZMA is appropriate if compression ratio is critical and memory usage and compression speed are not a factor. LZMA is an order of magnitude slower for both compression and decompression than other algorithms. It can also use a very large amount of memory, so if you need to compress large amounts of data on embedded devices with limited memory you should probably avoid LZMA. - /// Encoding uses LZMA level 6 only, but decompression works with any compression level. - static const int NSDataCompressionAlgorithmLZMA = 2; + void becomeCurrentWithPendingUnitCount_(int unitCount) { + return _lib._objc_msgSend_322( + _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + } - /// Zlib is appropriate if you want a good balance between compression speed and compression ratio, but only if you need interoperability with non-Apple platforms. Otherwise, LZFSE is generally a better choice than Zlib. - /// Encoding uses Zlib level 5 only, but decompression works with any compression level. It uses the raw DEFLATE format as described in IETF RFC 1951. - static const int NSDataCompressionAlgorithmZlib = 3; -} + void performAsCurrentWithPendingUnitCount_usingBlock_( + int unitCount, ObjCBlock16 work) { + return _lib._objc_msgSend_323( + _id, + _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, + unitCount, + work._id); + } -typedef UTF32Char = UInt32; -typedef UInt32 = ffi.UnsignedInt; + void resignCurrent() { + return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + } -abstract class NSStringEnumerationOptions { - static const int NSStringEnumerationByLines = 0; - static const int NSStringEnumerationByParagraphs = 1; - static const int NSStringEnumerationByComposedCharacterSequences = 2; - static const int NSStringEnumerationByWords = 3; - static const int NSStringEnumerationBySentences = 4; - static const int NSStringEnumerationByCaretPositions = 5; - static const int NSStringEnumerationByDeletionClusters = 6; - static const int NSStringEnumerationReverse = 256; - static const int NSStringEnumerationSubstringNotRequired = 512; - static const int NSStringEnumerationLocalized = 1024; -} + void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { + return _lib._objc_msgSend_324( + _id, + _lib._sel_addChild_withPendingUnitCount_1, + child?._id ?? ffi.nullptr, + inUnitCount); + } -void _ObjCBlock15_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - NSRange arg2, ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>()(arg0, arg1, arg2, arg3); -} + int get totalUnitCount { + return _lib._objc_msgSend_325(_id, _lib._sel_totalUnitCount1); + } -final _ObjCBlock15_closureRegistry = {}; -int _ObjCBlock15_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock15_registerClosure(Function fn) { - final id = ++_ObjCBlock15_closureRegistryIndex; - _ObjCBlock15_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set totalUnitCount(int value) { + _lib._objc_msgSend_326(_id, _lib._sel_setTotalUnitCount_1, value); + } -void _ObjCBlock15_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3) { - return _ObjCBlock15_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2, arg3); -} + int get completedUnitCount { + return _lib._objc_msgSend_325(_id, _lib._sel_completedUnitCount1); + } -class ObjCBlock15 extends _ObjCBlockBase { - ObjCBlock15._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + set completedUnitCount(int value) { + _lib._objc_msgSend_326(_id, _lib._sel_setCompletedUnitCount_1, value); + } - /// Creates a block from a C function pointer. - ObjCBlock15.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - NSRange arg2, ffi.Pointer arg3)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>( - _ObjCBlock15_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + NSString? get localizedDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock15.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, NSRange arg1, NSRange arg2, - ffi.Pointer arg3) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>( - _ObjCBlock15_closureTrampoline) - .cast(), - _ObjCBlock15_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, NSRange arg1, NSRange arg2, - ffi.Pointer arg3) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>()(_id, arg0, arg1, arg2, arg3); + set localizedDescription(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); } - ffi.Pointer<_ObjCBlock> get pointer => _id; + NSString? get localizedAdditionalDescription { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedAdditionalDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set localizedAdditionalDescription(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setLocalizedAdditionalDescription_1, + value?._id ?? ffi.nullptr); + } + + bool get cancellable { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); + } + + set cancellable(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setCancellable_1, value); + } + + bool get pausable { + return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); + } + + set pausable(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setPausable_1, value); + } + + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + } + + bool get paused { + return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); + } + + ObjCBlock16 get cancellationHandler { + final _ret = _lib._objc_msgSend_329(_id, _lib._sel_cancellationHandler1); + return ObjCBlock16._(_ret, _lib); + } + + set cancellationHandler(ObjCBlock16 value) { + _lib._objc_msgSend_330(_id, _lib._sel_setCancellationHandler_1, value._id); + } + + ObjCBlock16 get pausingHandler { + final _ret = _lib._objc_msgSend_329(_id, _lib._sel_pausingHandler1); + return ObjCBlock16._(_ret, _lib); + } + + set pausingHandler(ObjCBlock16 value) { + _lib._objc_msgSend_330(_id, _lib._sel_setPausingHandler_1, value._id); + } + + ObjCBlock16 get resumingHandler { + final _ret = _lib._objc_msgSend_329(_id, _lib._sel_resumingHandler1); + return ObjCBlock16._(_ret, _lib); + } + + set resumingHandler(ObjCBlock16 value) { + _lib._objc_msgSend_330(_id, _lib._sel_setResumingHandler_1, value._id); + } + + void setUserInfoObject_forKey_( + NSObject objectOrNil, NSProgressUserInfoKey key) { + return _lib._objc_msgSend_189( + _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); + } + + bool get indeterminate { + return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); + } + + double get fractionCompleted { + return _lib._objc_msgSend_85(_id, _lib._sel_fractionCompleted1); + } + + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + } + + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + void pause() { + return _lib._objc_msgSend_1(_id, _lib._sel_pause1); + } + + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } + + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSProgressKind get kind { + return _lib._objc_msgSend_32(_id, _lib._sel_kind1); + } + + set kind(NSProgressKind value) { + _lib._objc_msgSend_327(_id, _lib._sel_setKind_1, value); + } + + NSNumber? get estimatedTimeRemaining { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_estimatedTimeRemaining1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set estimatedTimeRemaining(NSNumber? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get throughput { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_throughput1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set throughput(NSNumber? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + } + + NSProgressFileOperationKind get fileOperationKind { + return _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); + } + + set fileOperationKind(NSProgressFileOperationKind value) { + _lib._objc_msgSend_327(_id, _lib._sel_setFileOperationKind_1, value); + } + + NSURL? get fileURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + set fileURL(NSURL? value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get fileTotalCount { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileTotalCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set fileTotalCount(NSNumber? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get fileCompletedCount { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileCompletedCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set fileCompletedCount(NSNumber? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); + } + + void publish() { + return _lib._objc_msgSend_1(_id, _lib._sel_publish1); + } + + void unpublish() { + return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + } + + static NSObject addSubscriberForFileURL_withPublishingHandler_( + NativeCupertinoHttp _lib, + NSURL? url, + NSProgressPublishingHandler publishingHandler) { + final _ret = _lib._objc_msgSend_333( + _lib._class_NSProgress1, + _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, + url?._id ?? ffi.nullptr, + publishingHandler); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { + return _lib._objc_msgSend_200( + _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + } + + bool get old { + return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); + } + + static NSProgress new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } + + static NSProgress alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } } -void _ObjCBlock16_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { +void _ObjCBlock16_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block) { return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); + .cast>() + .asFunction()(); } final _ObjCBlock16_closureRegistry = {}; @@ -66561,9 +67009,8 @@ ffi.Pointer _ObjCBlock16_registerClosure(Function fn) { return ffi.Pointer.fromAddress(id); } -void _ObjCBlock16_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock16_closureRegistry[block.ref.target.address]!(arg0, arg1); +void _ObjCBlock16_closureTrampoline(ffi.Pointer<_ObjCBlock> block) { + return _ObjCBlock16_closureRegistry[block.ref.target.address]!(); } class ObjCBlock16 extends _ObjCBlockBase { @@ -66571,20 +67018,12 @@ class ObjCBlock16 extends _ObjCBlockBase { : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock16.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) + ObjCBlock16.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( _ObjCBlock16_fnPtrTrampoline) .cast(), ptr.cast()), @@ -66592,56 +67031,41 @@ class ObjCBlock16 extends _ObjCBlockBase { static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock16.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) + ObjCBlock16.fromFunction(NativeCupertinoHttp lib, void Function() fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( _ObjCBlock16_closureTrampoline) .cast(), _ObjCBlock16_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { + void call() { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() + .asFunction block)>()(_id); } ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef NSStringEncoding = NSUInteger; - -abstract class NSStringEncodingConversionOptions { - static const int NSStringEncodingConversionAllowLossy = 1; - static const int NSStringEncodingConversionExternalRepresentation = 2; -} - -typedef NSStringTransform = ffi.Pointer; -void _ObjCBlock17_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { +typedef NSProgressUserInfoKey = ffi.Pointer; +typedef NSProgressKind = ffi.Pointer; +typedef NSProgressFileOperationKind = ffi.Pointer; +typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; +NSProgressUnpublishingHandler _ObjCBlock17_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { return block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>>() .asFunction< - void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>()(arg0); } final _ObjCBlock17_closureRegistry = {}; @@ -66652,9 +67076,9 @@ ffi.Pointer _ObjCBlock17_registerClosure(Function fn) { return ffi.Pointer.fromAddress(id); } -void _ObjCBlock17_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return _ObjCBlock17_closureRegistry[block.ref.target.address]!(arg0, arg1); +NSProgressUnpublishingHandler _ObjCBlock17_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock17_closureRegistry[block.ref.target.address]!(arg0); } class ObjCBlock17 extends _ObjCBlockBase { @@ -66666,16 +67090,16 @@ class ObjCBlock17 extends _ObjCBlockBase { NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, NSUInteger arg1)>> + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock17_fnPtrTrampoline) + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock17_fnPtrTrampoline) .cast(), ptr.cast()), lib); @@ -66683,4067 +67107,3318 @@ class ObjCBlock17 extends _ObjCBlockBase { /// Creates a block from a Dart function. ObjCBlock17.fromFunction(NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, int arg1) fn) + NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock17_closureTrampoline) + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock17_closureTrampoline) .cast(), _ObjCBlock17_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, int arg1) { + NSProgressUnpublishingHandler call(ffi.Pointer arg0) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSUInteger arg1)>>() + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); } ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef va_list = __builtin_va_list; -typedef __builtin_va_list = ffi.Pointer; - -abstract class NSQualityOfService { - static const int NSQualityOfServiceUserInteractive = 33; - static const int NSQualityOfServiceUserInitiated = 25; - static const int NSQualityOfServiceUtility = 17; - static const int NSQualityOfServiceBackground = 9; - static const int NSQualityOfServiceDefault = -1; -} +typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; -abstract class ptrauth_key { - static const int ptrauth_key_asia = 0; - static const int ptrauth_key_asib = 1; - static const int ptrauth_key_asda = 2; - static const int ptrauth_key_asdb = 3; - static const int ptrauth_key_process_independent_code = 0; - static const int ptrauth_key_process_dependent_code = 1; - static const int ptrauth_key_process_independent_data = 2; - static const int ptrauth_key_process_dependent_data = 3; - static const int ptrauth_key_function_pointer = 0; - static const int ptrauth_key_return_address = 1; - static const int ptrauth_key_frame_pointer = 3; - static const int ptrauth_key_block_function = 0; - static const int ptrauth_key_cxx_vtable_pointer = 2; - static const int ptrauth_key_method_list_pointer = 2; - static const int ptrauth_key_objc_isa_pointer = 2; - static const int ptrauth_key_objc_super_pointer = 2; - static const int ptrauth_key_block_descriptor_pointer = 2; - static const int ptrauth_key_objc_sel_pointer = 3; - static const int ptrauth_key_objc_class_ro_pointer = 2; -} +class NSOperation extends NSObject { + NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -@ffi.Packed(2) -class wide extends ffi.Struct { - @UInt32() - external int lo; + /// Returns a [NSOperation] that points to the same underlying object as [other]. + static NSOperation castFrom(T other) { + return NSOperation._(other._id, other._lib, retain: true, release: true); + } - @SInt32() - external int hi; -} + /// Returns a [NSOperation] that wraps the given raw object pointer. + static NSOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOperation._(other, lib, retain: retain, release: release); + } -typedef SInt32 = ffi.Int; + /// Returns whether [obj] is an instance of [NSOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); + } -@ffi.Packed(2) -class UnsignedWide extends ffi.Struct { - @UInt32() - external int lo; + void start() { + return _lib._objc_msgSend_1(_id, _lib._sel_start1); + } - @UInt32() - external int hi; -} + void main() { + return _lib._objc_msgSend_1(_id, _lib._sel_main1); + } -class Float80 extends ffi.Struct { - @SInt16() - external int exp; + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + } - @ffi.Array.multi([4]) - external ffi.Array man; -} + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } -typedef SInt16 = ffi.Short; -typedef UInt16 = ffi.UnsignedShort; + bool get executing { + return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); + } -class Float96 extends ffi.Struct { - @ffi.Array.multi([2]) - external ffi.Array exp; + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + } - @ffi.Array.multi([4]) - external ffi.Array man; -} - -@ffi.Packed(2) -class Float32Point extends ffi.Struct { - @Float32() - external double x; - - @Float32() - external double y; -} - -typedef Float32 = ffi.Float; - -@ffi.Packed(2) -class ProcessSerialNumber extends ffi.Struct { - @UInt32() - external int highLongOfPSN; - - @UInt32() - external int lowLongOfPSN; -} - -class Point extends ffi.Struct { - @ffi.Short() - external int v; - - @ffi.Short() - external int h; -} - -class Rect extends ffi.Struct { - @ffi.Short() - external int top; - - @ffi.Short() - external int left; + /// To be deprecated; use and override 'asynchronous' below + bool get concurrent { + return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); + } - @ffi.Short() - external int bottom; + bool get asynchronous { + return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); + } - @ffi.Short() - external int right; -} + bool get ready { + return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); + } -@ffi.Packed(2) -class FixedPoint extends ffi.Struct { - @Fixed() - external int x; + void addDependency_(NSOperation? op) { + return _lib._objc_msgSend_334( + _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); + } - @Fixed() - external int y; -} + void removeDependency_(NSOperation? op) { + return _lib._objc_msgSend_334( + _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); + } -typedef Fixed = SInt32; + NSArray? get dependencies { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_dependencies1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -@ffi.Packed(2) -class FixedRect extends ffi.Struct { - @Fixed() - external int left; + int get queuePriority { + return _lib._objc_msgSend_335(_id, _lib._sel_queuePriority1); + } - @Fixed() - external int top; + set queuePriority(int value) { + _lib._objc_msgSend_336(_id, _lib._sel_setQueuePriority_1, value); + } - @Fixed() - external int right; + ObjCBlock16 get completionBlock { + final _ret = _lib._objc_msgSend_329(_id, _lib._sel_completionBlock1); + return ObjCBlock16._(_ret, _lib); + } - @Fixed() - external int bottom; -} + set completionBlock(ObjCBlock16 value) { + _lib._objc_msgSend_330(_id, _lib._sel_setCompletionBlock_1, value._id); + } -class TimeBaseRecord extends ffi.Opaque {} + void waitUntilFinished() { + return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); + } -@ffi.Packed(2) -class TimeRecord extends ffi.Struct { - external CompTimeValue value; + double get threadPriority { + return _lib._objc_msgSend_85(_id, _lib._sel_threadPriority1); + } - @TimeScale() - external int scale; + set threadPriority(double value) { + _lib._objc_msgSend_337(_id, _lib._sel_setThreadPriority_1, value); + } - external TimeBase base; -} + int get qualityOfService { + return _lib._objc_msgSend_338(_id, _lib._sel_qualityOfService1); + } -typedef CompTimeValue = wide; -typedef TimeScale = SInt32; -typedef TimeBase = ffi.Pointer; + set qualityOfService(int value) { + _lib._objc_msgSend_339(_id, _lib._sel_setQualityOfService_1, value); + } -class NumVersion extends ffi.Struct { - @UInt8() - external int nonRelRev; + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @UInt8() - external int stage; + set name(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } - @UInt8() - external int minorAndBugRev; + static NSOperation new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); + return NSOperation._(_ret, _lib, retain: false, release: true); + } - @UInt8() - external int majorRev; + static NSOperation alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); + return NSOperation._(_ret, _lib, retain: false, release: true); + } } -typedef UInt8 = ffi.UnsignedChar; - -class NumVersionVariant extends ffi.Union { - external NumVersion parts; - - @UInt32() - external int whole; +abstract class NSOperationQueuePriority { + static const int NSOperationQueuePriorityVeryLow = -8; + static const int NSOperationQueuePriorityLow = -4; + static const int NSOperationQueuePriorityNormal = 0; + static const int NSOperationQueuePriorityHigh = 4; + static const int NSOperationQueuePriorityVeryHigh = 8; } -class VersRec extends ffi.Struct { - external NumVersion numericVersion; - - @ffi.Short() - external int countryCode; - - @ffi.Array.multi([256]) - external ffi.Array shortVersion; - - @ffi.Array.multi([256]) - external ffi.Array reserved; +typedef dispatch_queue_t = ffi.Pointer; +void _ObjCBlock18_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); } -typedef ConstStr255Param = ffi.Pointer; - -class __CFString extends ffi.Opaque {} - -abstract class CFComparisonResult { - static const int kCFCompareLessThan = -1; - static const int kCFCompareEqualTo = 0; - static const int kCFCompareGreaterThan = 1; +final _ObjCBlock18_closureRegistry = {}; +int _ObjCBlock18_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock18_registerClosure(Function fn) { + final id = ++_ObjCBlock18_closureRegistryIndex; + _ObjCBlock18_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -typedef CFIndex = ffi.Long; - -class CFRange extends ffi.Struct { - @CFIndex() - external int location; - - @CFIndex() - external int length; +void _ObjCBlock18_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock18_closureRegistry[block.ref.target.address]!(arg0); } -class __CFNull extends ffi.Opaque {} - -typedef CFTypeID = ffi.UnsignedLong; -typedef CFNullRef = ffi.Pointer<__CFNull>; - -class __CFAllocator extends ffi.Opaque {} - -typedef CFAllocatorRef = ffi.Pointer<__CFAllocator>; - -class CFAllocatorContext extends ffi.Struct { - @CFIndex() - external int version; - - external ffi.Pointer info; - - external CFAllocatorRetainCallBack retain; - - external CFAllocatorReleaseCallBack release; - - external CFAllocatorCopyDescriptionCallBack copyDescription; - - external CFAllocatorAllocateCallBack allocate; +class ObjCBlock18 extends _ObjCBlockBase { + ObjCBlock18._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external CFAllocatorReallocateCallBack reallocate; + /// Creates a block from a C function pointer. + ObjCBlock18.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock18_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external CFAllocatorDeallocateCallBack deallocate; + /// Creates a block from a Dart function. + ObjCBlock18.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock18_closureTrampoline) + .cast(), + _ObjCBlock18_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } - external CFAllocatorPreferredSizeCallBack preferredSize; + ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef CFAllocatorRetainCallBack = ffi.Pointer< - ffi.NativeFunction Function(ffi.Pointer)>>; -typedef CFAllocatorReleaseCallBack - = ffi.Pointer)>>; -typedef CFAllocatorCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFStringRef = ffi.Pointer<__CFString>; -typedef CFAllocatorAllocateCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFIndex, CFOptionFlags, ffi.Pointer)>>; -typedef CFOptionFlags = ffi.UnsignedLong; -typedef CFAllocatorReallocateCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, CFIndex, - CFOptionFlags, ffi.Pointer)>>; -typedef CFAllocatorDeallocateCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFAllocatorPreferredSizeCallBack = ffi.Pointer< - ffi.NativeFunction< - CFIndex Function(CFIndex, CFOptionFlags, ffi.Pointer)>>; -typedef CFTypeRef = ffi.Pointer; -typedef Boolean = ffi.UnsignedChar; -typedef CFHashCode = ffi.UnsignedLong; -typedef NSZone = _NSZone; - -class NSMutableIndexSet extends NSIndexSet { - NSMutableIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSDate extends NSObject { + NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSMutableIndexSet] that points to the same underlying object as [other]. - static NSMutableIndexSet castFrom(T other) { - return NSMutableIndexSet._(other._id, other._lib, - retain: true, release: true); + /// Returns a [NSDate] that points to the same underlying object as [other]. + static NSDate castFrom(T other) { + return NSDate._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSMutableIndexSet] that wraps the given raw object pointer. - static NSMutableIndexSet castFromPointer( + /// Returns a [NSDate] that wraps the given raw object pointer. + static NSDate castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSMutableIndexSet._(other, lib, retain: retain, release: release); + return NSDate._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSMutableIndexSet]. + /// Returns whether [obj] is an instance of [NSDate]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableIndexSet1); - } - - void addIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_285( - _id, _lib._sel_addIndexes_1, indexSet?._id ?? ffi.nullptr); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); } - void removeIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_285( - _id, _lib._sel_removeIndexes_1, indexSet?._id ?? ffi.nullptr); + double get timeIntervalSinceReferenceDate { + return _lib._objc_msgSend_85( + _id, _lib._sel_timeIntervalSinceReferenceDate1); } - void removeAllIndexes() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllIndexes1); + @override + NSDate init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDate._(_ret, _lib, retain: true, release: true); } - void addIndex_(int value) { - return _lib._objc_msgSend_286(_id, _lib._sel_addIndex_1, value); + NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _lib._objc_msgSend_347( + _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); } - void removeIndex_(int value) { - return _lib._objc_msgSend_286(_id, _lib._sel_removeIndex_1, value); + NSDate initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); } - void addIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_287(_id, _lib._sel_addIndexesInRange_1, range); + double timeIntervalSinceDate_(NSDate? anotherDate) { + return _lib._objc_msgSend_348(_id, _lib._sel_timeIntervalSinceDate_1, + anotherDate?._id ?? ffi.nullptr); } - void removeIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_287(_id, _lib._sel_removeIndexesInRange_1, range); + double get timeIntervalSinceNow { + return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSinceNow1); } - void shiftIndexesStartingAtIndex_by_(int index, int delta) { - return _lib._objc_msgSend_288( - _id, _lib._sel_shiftIndexesStartingAtIndex_by_1, index, delta); + double get timeIntervalSince1970 { + return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSince19701); } - static NSMutableIndexSet indexSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableIndexSet1, _lib._sel_indexSet1); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + NSObject addTimeInterval_(double seconds) { + final _ret = + _lib._objc_msgSend_347(_id, _lib._sel_addTimeInterval_1, seconds); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSMutableIndexSet indexSetWithIndex_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSMutableIndexSet1, _lib._sel_indexSetWithIndex_1, value); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + NSDate dateByAddingTimeInterval_(double ti) { + final _ret = + _lib._objc_msgSend_347(_id, _lib._sel_dateByAddingTimeInterval_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); } - static NSMutableIndexSet indexSetWithIndexesInRange_( - NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_111(_lib._class_NSMutableIndexSet1, - _lib._sel_indexSetWithIndexesInRange_1, range); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + NSDate earlierDate_(NSDate? anotherDate) { + final _ret = _lib._objc_msgSend_349( + _id, _lib._sel_earlierDate_1, anotherDate?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); } - static NSMutableIndexSet new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_new1); - return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + NSDate laterDate_(NSDate? anotherDate) { + final _ret = _lib._objc_msgSend_349( + _id, _lib._sel_laterDate_1, anotherDate?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); } - static NSMutableIndexSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_alloc1); - return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + int compare_(NSDate? other) { + return _lib._objc_msgSend_350( + _id, _lib._sel_compare_1, other?._id ?? ffi.nullptr); } -} - -/// Mutable Array -class NSMutableArray extends NSArray { - NSMutableArray._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSMutableArray] that points to the same underlying object as [other]. - static NSMutableArray castFrom(T other) { - return NSMutableArray._(other._id, other._lib, retain: true, release: true); + bool isEqualToDate_(NSDate? otherDate) { + return _lib._objc_msgSend_351( + _id, _lib._sel_isEqualToDate_1, otherDate?._id ?? ffi.nullptr); } - /// Returns a [NSMutableArray] that wraps the given raw object pointer. - static NSMutableArray castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableArray._(other, lib, retain: retain, release: release); + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSMutableArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableArray1); + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); } - void addObject_(NSObject anObject) { - return _lib._objc_msgSend_200(_id, _lib._sel_addObject_1, anObject._id); + static NSDate date(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); + return NSDate._(_ret, _lib, retain: true, release: true); } - void insertObject_atIndex_(NSObject anObject, int index) { - return _lib._objc_msgSend_289( - _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); + static NSDate dateWithTimeIntervalSinceNow_( + NativeCupertinoHttp _lib, double secs) { + final _ret = _lib._objc_msgSend_347( + _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); } - void removeLastObject() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); + static NSDate dateWithTimeIntervalSinceReferenceDate_( + NativeCupertinoHttp _lib, double ti) { + final _ret = _lib._objc_msgSend_347(_lib._class_NSDate1, + _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); } - void removeObjectAtIndex_(int index) { - return _lib._objc_msgSend_286(_id, _lib._sel_removeObjectAtIndex_1, index); + static NSDate dateWithTimeIntervalSince1970_( + NativeCupertinoHttp _lib, double secs) { + final _ret = _lib._objc_msgSend_347( + _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); } - void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { - return _lib._objc_msgSend_290( - _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); + static NSDate dateWithTimeInterval_sinceDate_( + NativeCupertinoHttp _lib, double secsToBeAdded, NSDate? date) { + final _ret = _lib._objc_msgSend_352( + _lib._class_NSDate1, + _lib._sel_dateWithTimeInterval_sinceDate_1, + secsToBeAdded, + date?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); } - @override - NSMutableArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + static NSDate? getDistantFuture(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_353(_lib._class_NSDate1, _lib._sel_distantFuture1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - NSMutableArray initWithCapacity_(int numItems) { + static NSDate? getDistantPast(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_353(_lib._class_NSDate1, _lib._sel_distantPast1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - @override - NSMutableArray initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + static NSDate? getNow(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_353(_lib._class_NSDate1, _lib._sel_now1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - void addObjectsFromArray_(NSArray? otherArray) { - return _lib._objc_msgSend_291( - _id, _lib._sel_addObjectsFromArray_1, otherArray?._id ?? ffi.nullptr); + NSDate initWithTimeIntervalSinceNow_(double secs) { + final _ret = _lib._objc_msgSend_347( + _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); } - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - return _lib._objc_msgSend_292( - _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); + NSDate initWithTimeIntervalSince1970_(double secs) { + final _ret = _lib._objc_msgSend_347( + _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); } - void removeAllObjects() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate? date) { + final _ret = _lib._objc_msgSend_352( + _id, + _lib._sel_initWithTimeInterval_sinceDate_1, + secsToBeAdded, + date?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); } - void removeObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_293( - _id, _lib._sel_removeObject_inRange_1, anObject._id, range); + static NSDate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); + return NSDate._(_ret, _lib, retain: false, release: true); } - void removeObject_(NSObject anObject) { - return _lib._objc_msgSend_200(_id, _lib._sel_removeObject_1, anObject._id); + static NSDate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); + return NSDate._(_ret, _lib, retain: false, release: true); } +} - void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_293( - _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); - } +typedef NSTimeInterval = ffi.Double; - void removeObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); - } +/// ! +/// @enum NSURLRequestCachePolicy +/// +/// @discussion The NSURLRequestCachePolicy enum defines constants that +/// can be used to specify the type of interactions that take place with +/// the caching system when the URL loading system processes a request. +/// Specifically, these constants cover interactions that have to do +/// with whether already-existing cache data is returned to satisfy a +/// URL load request. +/// +/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the +/// caching logic defined in the protocol implementation, if any, is +/// used for a particular URL load request. This is the default policy +/// for URL load requests. +/// +/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the +/// data for the URL load should be loaded from the origin source. No +/// existing local cache data, regardless of its freshness or validity, +/// should be used to satisfy a URL load request. +/// +/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that +/// not only should the local cache data be ignored, but that proxies and +/// other intermediates should be instructed to disregard their caches +/// so far as the protocol allows. +/// +/// @constant NSURLRequestReloadIgnoringCacheData Older name for +/// NSURLRequestReloadIgnoringLocalCacheData. +/// +/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, +/// the URL is loaded from the origin source. +/// +/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, no +/// attempt is made to load the URL from the origin source, and the +/// load is considered to have failed. This constant specifies a +/// behavior that is similar to an "offline" mode. +/// +/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that +/// the existing cache data may be used provided the origin source +/// confirms its validity, otherwise the URL is loaded from the +/// origin source. +abstract class NSURLRequestCachePolicy { + static const int NSURLRequestUseProtocolCachePolicy = 0; + static const int NSURLRequestReloadIgnoringLocalCacheData = 1; + static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; + static const int NSURLRequestReloadIgnoringCacheData = 1; + static const int NSURLRequestReturnCacheDataElseLoad = 2; + static const int NSURLRequestReturnCacheDataDontLoad = 3; + static const int NSURLRequestReloadRevalidatingCacheData = 5; +} - void removeObjectsFromIndices_numIndices_( - ffi.Pointer indices, int cnt) { - return _lib._objc_msgSend_294( - _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); - } +/// ! +/// @enum NSURLRequestNetworkServiceType +/// +/// @discussion The NSURLRequestNetworkServiceType enum defines constants that +/// can be used to specify the service type to associate with this request. The +/// service type is used to provide the networking layers a hint of the purpose +/// of the request. +/// +/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest +/// when created. This value should be left unchanged for the vast majority of requests. +/// +/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP +/// control traffic. +/// +/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video +/// traffic. +/// +/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background +/// traffic (such as a file download). +/// +/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. +/// +/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. +/// +/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. +abstract class NSURLRequestNetworkServiceType { + /// Standard internet traffic + static const int NSURLNetworkServiceTypeDefault = 0; - void removeObjectsInArray_(NSArray? otherArray) { - return _lib._objc_msgSend_291( - _id, _lib._sel_removeObjectsInArray_1, otherArray?._id ?? ffi.nullptr); - } + /// Voice over IP control traffic + static const int NSURLNetworkServiceTypeVoIP = 1; - void removeObjectsInRange_(NSRange range) { - return _lib._objc_msgSend_287(_id, _lib._sel_removeObjectsInRange_1, range); - } + /// Video traffic + static const int NSURLNetworkServiceTypeVideo = 2; - void replaceObjectsInRange_withObjectsFromArray_range_( - NSRange range, NSArray? otherArray, NSRange otherRange) { - return _lib._objc_msgSend_295( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, - range, - otherArray?._id ?? ffi.nullptr, - otherRange); + /// Background traffic + static const int NSURLNetworkServiceTypeBackground = 3; + + /// Voice data + static const int NSURLNetworkServiceTypeVoice = 4; + + /// Responsive data + static const int NSURLNetworkServiceTypeResponsiveData = 6; + + /// Multimedia Audio/Video Streaming + static const int NSURLNetworkServiceTypeAVStreaming = 8; + + /// Responsive Multimedia Audio/Video + static const int NSURLNetworkServiceTypeResponsiveAV = 9; + + /// Call Signaling + static const int NSURLNetworkServiceTypeCallSignaling = 11; +} + +/// ! +/// @class NSURLRequest +/// +/// @abstract An NSURLRequest object represents a URL load request in a +/// manner independent of protocol and URL scheme. +/// +/// @discussion NSURLRequest encapsulates two basic data elements about +/// a URL load request: +///

    +///
  • The URL to load. +///
  • The policy to use when consulting the URL content cache made +/// available by the implementation. +///
+/// In addition, NSURLRequest is designed to be extended to support +/// protocol-specific data by adding categories to access a property +/// object provided in an interface targeted at protocol implementors. +///
    +///
  • Protocol implementors should direct their attention to the +/// NSURLRequestExtensibility category on NSURLRequest for more +/// information on how to provide extensions on NSURLRequest to +/// support protocol-specific request information. +///
  • Clients of this API who wish to create NSURLRequest objects to +/// load URL content should consult the protocol-specific NSURLRequest +/// categories that are available. The NSHTTPURLRequest category on +/// NSURLRequest is an example. +///
+///

+/// Objects of this class are used to create NSURLConnection instances, +/// which can are used to perform the load of a URL, or as input to the +/// NSURLConnection class method which performs synchronous loads. +class NSURLRequest extends NSObject { + NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLRequest] that points to the same underlying object as [other]. + static NSURLRequest castFrom(T other) { + return NSURLRequest._(other._id, other._lib, retain: true, release: true); } - void replaceObjectsInRange_withObjectsFromArray_( - NSRange range, NSArray? otherArray) { - return _lib._objc_msgSend_296( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, - range, - otherArray?._id ?? ffi.nullptr); + /// Returns a [NSURLRequest] that wraps the given raw object pointer. + static NSURLRequest castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLRequest._(other, lib, retain: retain, release: release); } - void setArray_(NSArray? otherArray) { - return _lib._objc_msgSend_291( - _id, _lib._sel_setArray_1, otherArray?._id ?? ffi.nullptr); + /// Returns whether [obj] is an instance of [NSURLRequest]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); } - void sortUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context) { - return _lib._objc_msgSend_297( - _id, _lib._sel_sortUsingFunction_context_1, compare, context); + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL? URL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSURLRequest1, + _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + return NSURLRequest._(_ret, _lib, retain: true, release: true); } - void sortUsingSelector_(ffi.Pointer comparator) { - return _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_11( + _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); } - void insertObjects_atIndexes_(NSArray? objects, NSIndexSet? indexes) { - return _lib._objc_msgSend_298(_id, _lib._sel_insertObjects_atIndexes_1, - objects?._id ?? ffi.nullptr, indexes?._id ?? ffi.nullptr); + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + NativeCupertinoHttp _lib, + NSURL? URL, + int cachePolicy, + double timeoutInterval) { + final _ret = _lib._objc_msgSend_354( + _lib._class_NSURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); } - void removeObjectsAtIndexes_(NSIndexSet? indexes) { - return _lib._objc_msgSend_285( - _id, _lib._sel_removeObjectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_(NSURL? URL) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithURL_1, URL?._id ?? ffi.nullptr); + return NSURLRequest._(_ret, _lib, retain: true, release: true); } - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet? indexes, NSArray? objects) { - return _lib._objc_msgSend_299( + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL and + /// cache policy. + /// @discussion This is the designated initializer for the + /// NSURLRequest class. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_cachePolicy_timeoutInterval_( + NSURL? URL, int cachePolicy, double timeoutInterval) { + final _ret = _lib._objc_msgSend_354( _id, - _lib._sel_replaceObjectsAtIndexes_withObjects_1, - indexes?._id ?? ffi.nullptr, - objects?._id ?? ffi.nullptr); + _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); } - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - return _lib._objc_msgSend_289( - _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - void sortUsingComparator_(NSComparator cmptr) { - return _lib._objc_msgSend_300(_id, _lib._sel_sortUsingComparator_1, cmptr); + /// ! + /// @abstract Returns the cache policy of the receiver. + /// @result The cache policy of the receiver. + int get cachePolicy { + return _lib._objc_msgSend_355(_id, _lib._sel_cachePolicy1); } - void sortWithOptions_usingComparator_(int opts, NSComparator cmptr) { - return _lib._objc_msgSend_301( - _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr); + /// ! + /// @abstract Returns the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval alloted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + /// @result The timeout interval of the receiver. + double get timeoutInterval { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); } - static NSMutableArray arrayWithCapacity_( - NativeCupertinoHttp _lib, int numItems) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract The main document URL associated with this load. + /// @discussion This URL is used for the cookie "same domain as main + /// document" policy. There may also be other future uses. + /// See setMainDocumentURL: + /// NOTE: In the current implementation, this value is unused by the + /// framework. A fully functional version of this method will be available + /// in the future. + /// @result The main document URL. + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - static NSMutableArray arrayWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_302(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. + /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have + /// not explicitly set a networkServiceType (using the setNetworkServiceType method). + /// @result The NSURLRequestNetworkServiceType associated with this request. + int get networkServiceType { + return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); } - static NSMutableArray arrayWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_303(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @result YES if the receiver is allowed to use the built in cellular radios to + /// satify the request, NO otherwise. + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); } - NSMutableArray initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_302( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @result YES if the receiver is allowed to use an interface marked as expensive to + /// satify the request, NO otherwise. + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); } - NSMutableArray initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_303( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @result YES if the receiver is allowed to use an interface marked as constrained to + /// satify the request, NO otherwise. + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); } - void applyDifference_(NSOrderedCollectionDifference? difference) { - return _lib._objc_msgSend_304( - _id, _lib._sel_applyDifference_1, difference?._id ?? ffi.nullptr); + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); } - static NSMutableArray array(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns the HTTP request method of the receiver. + /// @result the HTTP request method of the receiver. + NSString? get HTTPMethod { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableArray arrayWithObject_( - NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_91( - _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns a dictionary containing all the HTTP header fields + /// of the receiver. + /// @result a dictionary containing all the HTTP header fields of the + /// receiver. + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSMutableArray arrayWithObjects_count_(NativeCupertinoHttp _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_95(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// ! + /// @method valueForHTTPHeaderField: + /// @abstract Returns the value which corresponds to the given header + /// field. Note that, in keeping with the HTTP RFC, HTTP header field + /// names are case-insensitive. + /// @param field the header field name to use for the lookup + /// (case-insensitive). + /// @result the value associated with the given header field, or nil if + /// there is no value associated with the given header field. + NSString valueForHTTPHeaderField_(NSString? field) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableArray arrayWithObjects_( - NativeCupertinoHttp _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_1, firstObj._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + /// @result The request body data of the receiver. + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - static NSMutableArray arrayWithArray_( - NativeCupertinoHttp _lib, NSArray? array) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableArray1, - _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns the request body stream of the receiver + /// if any has been set + /// @discussion The stream is returned for examination only; it is + /// not safe for the caller to manipulate the stream in any way. Also + /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only + /// one can be set on a given request. Also note that the body stream is + /// preserved across copies, but is LOST when the request is coded via the + /// NSCoding protocol + /// @result The request body stream of the receiver. + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); } - /// Reads array stored in NSPropertyList format from the specified url. - static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_145( - _lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Determine whether default cookie handling will happen for + /// this request. + /// @discussion NOTE: This value is not used prior to 10.3 + /// @result YES if cookies will be sent with and set for this request; + /// otherwise NO. + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); } - static NSMutableArray new1(NativeCupertinoHttp _lib) { + /// ! + /// @abstract Reports whether the receiver is not expected to wait for the + /// previous response before transmitting. + /// @result YES if the receiver should transmit before the previous response + /// is received. NO if the receiver should wait for the previous response + /// before transmitting. + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + } + + static NSURLRequest new1(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); } - static NSMutableArray alloc(NativeCupertinoHttp _lib) { + static NSURLRequest alloc(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); } } -/// Mutable Data -class NSMutableData extends NSData { - NSMutableData._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSInputStream extends _ObjCWrapper { + NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSMutableData] that points to the same underlying object as [other]. - static NSMutableData castFrom(T other) { - return NSMutableData._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSInputStream] that points to the same underlying object as [other]. + static NSInputStream castFrom(T other) { + return NSInputStream._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSMutableData] that wraps the given raw object pointer. - static NSMutableData castFromPointer( + /// Returns a [NSInputStream] that wraps the given raw object pointer. + static NSInputStream castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSMutableData._(other, lib, retain: retain, release: release); + return NSInputStream._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSMutableData]. + /// Returns whether [obj] is an instance of [NSInputStream]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); } +} - ffi.Pointer get mutableBytes { - return _lib._objc_msgSend_31(_id, _lib._sel_mutableBytes1); - } +/// ! +/// @class NSMutableURLRequest +/// +/// @abstract An NSMutableURLRequest object represents a mutable URL load +/// request in a manner independent of protocol and URL scheme. +/// +/// @discussion This specialization of NSURLRequest is provided to aid +/// developers who may find it more convenient to mutate a single request +/// object for a series of URL loads instead of creating an immutable +/// NSURLRequest for each load. This programming model is supported by +/// the following contract stipulation between NSMutableURLRequest and +/// NSURLConnection: NSURLConnection makes a deep copy of each +/// NSMutableURLRequest object passed to one of its initializers. +///

NSMutableURLRequest is designed to be extended to support +/// protocol-specific data by adding categories to access a property +/// object provided in an interface targeted at protocol implementors. +///

    +///
  • Protocol implementors should direct their attention to the +/// NSMutableURLRequestExtensibility category on +/// NSMutableURLRequest for more information on how to provide +/// extensions on NSMutableURLRequest to support protocol-specific +/// request information. +///
  • Clients of this API who wish to create NSMutableURLRequest +/// objects to load URL content should consult the protocol-specific +/// NSMutableURLRequest categories that are available. The +/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an +/// example. +///
+class NSMutableURLRequest extends NSURLRequest { + NSMutableURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @override - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); + /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. + static NSMutableURLRequest castFrom(T other) { + return NSMutableURLRequest._(other._id, other._lib, + retain: true, release: true); } - set length(int value) { - _lib._objc_msgSend_305(_id, _lib._sel_setLength_1, value); + /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. + static NSMutableURLRequest castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableURLRequest._(other, lib, retain: retain, release: release); } - void appendBytes_length_(ffi.Pointer bytes, int length) { - return _lib._objc_msgSend_33( - _id, _lib._sel_appendBytes_length_1, bytes, length); + /// Returns whether [obj] is an instance of [NSMutableURLRequest]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableURLRequest1); } - void appendData_(NSData? other) { - return _lib._objc_msgSend_306( - _id, _lib._sel_appendData_1, other?._id ?? ffi.nullptr); + /// ! + /// @abstract The URL of the receiver. + @override + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - void increaseLengthBy_(int extraLength) { - return _lib._objc_msgSend_286( - _id, _lib._sel_increaseLengthBy_1, extraLength); + /// ! + /// @abstract The URL of the receiver. + set URL(NSURL? value) { + _lib._objc_msgSend_332(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); } - void replaceBytesInRange_withBytes_( - NSRange range, ffi.Pointer bytes) { - return _lib._objc_msgSend_307( - _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); + /// ! + /// @abstract The cache policy of the receiver. + @override + int get cachePolicy { + return _lib._objc_msgSend_355(_id, _lib._sel_cachePolicy1); } - void resetBytesInRange_(NSRange range) { - return _lib._objc_msgSend_287(_id, _lib._sel_resetBytesInRange_1, range); + /// ! + /// @abstract The cache policy of the receiver. + set cachePolicy(int value) { + _lib._objc_msgSend_358(_id, _lib._sel_setCachePolicy_1, value); } - void setData_(NSData? data) { - return _lib._objc_msgSend_306( - _id, _lib._sel_setData_1, data?._id ?? ffi.nullptr); + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + @override + double get timeoutInterval { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); } - void replaceBytesInRange_withBytes_length_(NSRange range, - ffi.Pointer replacementBytes, int replacementLength) { - return _lib._objc_msgSend_308( - _id, - _lib._sel_replaceBytesInRange_withBytes_length_1, - range, - replacementBytes, - replacementLength); + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + set timeoutInterval(double value) { + _lib._objc_msgSend_337(_id, _lib._sel_setTimeoutInterval_1, value); } - static NSMutableData dataWithCapacity_( - NativeCupertinoHttp _lib, int aNumItems) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document will be used to implement the cookie + /// "only from same domain as main document" policy, and possibly + /// other things in the future. + /// NOTE: In the current implementation, the passed-in value is unused by the + /// framework. A fully functional version of this method will be available + /// in the future. + @override + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithLength_(NativeCupertinoHttp _lib, int length) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document will be used to implement the cookie + /// "only from same domain as main document" policy, and possibly + /// other things in the future. + /// NOTE: In the current implementation, the passed-in value is unused by the + /// framework. A fully functional version of this method will be available + /// in the future. + set mainDocumentURL(NSURL? value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); } - NSMutableData initWithCapacity_(int capacity) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + @override + int get networkServiceType { + return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); } - NSMutableData initWithLength_(int length) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithLength_1, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + set networkServiceType(int value) { + _lib._objc_msgSend_359(_id, _lib._sel_setNetworkServiceType_1, value); } - /// These methods compress or decompress the receiver's contents in-place using the specified algorithm. If the operation is not successful, these methods leave the receiver unchanged.. - bool decompressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_309( - _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + @override + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); } - bool compressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_309( - _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + set allowsCellularAccess(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setAllowsCellularAccess_1, value); } - static NSMutableData data(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satify the request, YES otherwise. + @override + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); } - static NSMutableData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, - _lib._sel_dataWithBytes_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satify the request, YES otherwise. + set allowsExpensiveNetworkAccess(bool value) { + _lib._objc_msgSend_328( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); } - static NSMutableData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: false, release: true); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satify the request, YES otherwise. + @override + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); } - static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - int length, - bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSMutableData._(_ret, _lib, retain: false, release: true); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satify the request, YES otherwise. + set allowsConstrainedNetworkAccess(bool value) { + _lib._objc_msgSend_328( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); } - static NSMutableData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + @override + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); } - static NSMutableData dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + set assumesHTTP3Capable(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setAssumesHTTP3Capable_1, value); } - static NSMutableData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Sets the HTTP request method of the receiver. + @override + NSString? get HTTPMethod { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Sets the HTTP request method of the receiver. + set HTTPMethod(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setHTTPMethod_1, value?._id ?? ffi.nullptr); } - static NSMutableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSMutableData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Sets the HTTP header fields of the receiver to the given + /// dictionary. + /// @discussion This method replaces all header fields that may have + /// existed before this method call. + ///

Since HTTP header fields must be string values, each object and + /// key in the dictionary passed to this method must answer YES when + /// sent an -isKindOfClass:[NSString class] message. If either + /// the key or value for a key-value pair answers NO when sent this + /// message, the key-value pair is skipped. + @override + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Sets the HTTP header fields of the receiver to the given + /// dictionary. + /// @discussion This method replaces all header fields that may have + /// existed before this method call. + ///

Since HTTP header fields must be string values, each object and + /// key in the dictionary passed to this method must answer YES when + /// sent an -isKindOfClass:[NSString class] message. If either + /// the key or value for a key-value pair answers NO when sent this + /// message, the key-value pair is skipped. + set allHTTPHeaderFields(NSDictionary? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); } - static NSMutableData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); - return NSMutableData._(_ret, _lib, retain: false, release: true); + /// ! + /// @method setValue:forHTTPHeaderField: + /// @abstract Sets the value of the given HTTP header field. + /// @discussion If a value was previously set for the given header + /// field, that value is replaced with the given value. Note that, in + /// keeping with the HTTP RFC, HTTP header field names are + /// case-insensitive. + /// @param value the header field value. + /// @param field the header field name (case-insensitive). + void setValue_forHTTPHeaderField_(NSString? value, NSString? field) { + return _lib._objc_msgSend_361(_id, _lib._sel_setValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); } - static NSMutableData alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); - return NSMutableData._(_ret, _lib, retain: false, release: true); + /// ! + /// @method addValue:forHTTPHeaderField: + /// @abstract Adds an HTTP header field in the current header + /// dictionary. + /// @discussion This method provides a way to add values to header + /// fields incrementally. If a value was previously set for the given + /// header field, the given value is appended to the previously-existing + /// value. The appropriate field delimiter, a comma in the case of HTTP, + /// is added by the implementation, and should not be added to the given + /// value by the caller. Note that, in keeping with the HTTP RFC, HTTP + /// header field names are case-insensitive. + /// @param value the header field value. + /// @param field the header field name (case-insensitive). + void addValue_forHTTPHeaderField_(NSString? value, NSString? field) { + return _lib._objc_msgSend_361(_id, _lib._sel_addValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); } -} - -/// Purgeable Data -class NSPurgeableData extends NSMutableData { - NSPurgeableData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSPurgeableData] that points to the same underlying object as [other]. - static NSPurgeableData castFrom(T other) { - return NSPurgeableData._(other._id, other._lib, - retain: true, release: true); + /// ! + /// @abstract Sets the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + @override + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSPurgeableData] that wraps the given raw object pointer. - static NSPurgeableData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPurgeableData._(other, lib, retain: retain, release: release); + /// ! + /// @abstract Sets the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + set HTTPBody(NSData? value) { + _lib._objc_msgSend_362( + _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); } - /// Returns whether [obj] is an instance of [NSPurgeableData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSPurgeableData1); + /// ! + /// @abstract Sets the request body to be the contents of the given stream. + /// @discussion The provided stream should be unopened; the request will take + /// over the stream's delegate. The entire stream's contents will be + /// transmitted as the HTTP body of the request. Note that the body stream + /// and the body data (set by setHTTPBody:, above) are mutually exclusive + /// - setting one will clear the other. + @override + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithCapacity_( - NativeCupertinoHttp _lib, int aNumItems) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSPurgeableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Sets the request body to be the contents of the given stream. + /// @discussion The provided stream should be unopened; the request will take + /// over the stream's delegate. The entire stream's contents will be + /// transmitted as the HTTP body of the request. Note that the body stream + /// and the body data (set by setHTTPBody:, above) are mutually exclusive + /// - setting one will clear the other. + set HTTPBodyStream(NSInputStream? value) { + _lib._objc_msgSend_363( + _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); } - static NSPurgeableData dataWithLength_(NativeCupertinoHttp _lib, int length) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSPurgeableData1, _lib._sel_dataWithLength_1, length); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Decide whether default cookie handling will happen for + /// this request (YES if cookies should be sent with and set for this request; + /// otherwise NO). + /// @discussion The default is YES - in other words, cookies are sent from and + /// stored to the cookie manager by default. + /// NOTE: In releases prior to 10.3, this value is ignored + @override + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); } - static NSPurgeableData data(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_data1); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Decide whether default cookie handling will happen for + /// this request (YES if cookies should be sent with and set for this request; + /// otherwise NO). + /// @discussion The default is YES - in other words, cookies are sent from and + /// stored to the cookie manager by default. + /// NOTE: In releases prior to 10.3, this value is ignored + set HTTPShouldHandleCookies(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); } - static NSPurgeableData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytes_length_1, bytes, length); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Sets whether the request should not wait for the previous response + /// before transmitting (YES if the receiver should transmit before the previous response is + /// received. NO to wait for the previous response before transmitting) + /// @discussion Calling this method with a YES value does not guarantee HTTP + /// pipelining behavior. This method may have no effect if an HTTP proxy is + /// configured, or if the HTTP request uses an unsafe request method (e.g., POST + /// requests will not pipeline). Pipelining behavior also may not begin until + /// the second request on a given TCP connection. There may be other situations + /// where pipelining does not occur even though YES was set. + /// HTTP 1.1 allows the client to send multiple requests to the server without + /// waiting for a response. Though HTTP 1.1 requires support for pipelining, + /// some servers report themselves as being HTTP 1.1 but do not support + /// pipelining (disconnecting, sending resources misordered, omitting part of + /// a resource, etc.). + @override + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); } - static NSPurgeableData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); + /// ! + /// @abstract Sets whether the request should not wait for the previous response + /// before transmitting (YES if the receiver should transmit before the previous response is + /// received. NO to wait for the previous response before transmitting) + /// @discussion Calling this method with a YES value does not guarantee HTTP + /// pipelining behavior. This method may have no effect if an HTTP proxy is + /// configured, or if the HTTP request uses an unsafe request method (e.g., POST + /// requests will not pipeline). Pipelining behavior also may not begin until + /// the second request on a given TCP connection. There may be other situations + /// where pipelining does not occur even though YES was set. + /// HTTP 1.1 allows the client to send multiple requests to the server without + /// waiting for a response. Though HTTP 1.1 requires support for pipelining, + /// some servers report themselves as being HTTP 1.1 but do not support + /// pipelining (disconnecting, sending resources misordered, omitting part of + /// a resource, etc.). + set HTTPShouldUsePipelining(bool value) { + _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); } - static NSPurgeableData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - int length, - bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_( + NativeCupertinoHttp _lib, NSURL? URL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableURLRequest1, + _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( - _lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_11( + _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); } - static NSPurgeableData dataWithContentsOfURL_options_error_( + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( - _lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - static NSPurgeableData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - static NSPurgeableData dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + NSURL? URL, + int cachePolicy, + double timeoutInterval) { + final _ret = _lib._objc_msgSend_354( + _lib._class_NSMutableURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSPurgeableData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + static NSMutableURLRequest new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); } - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSMutableURLRequest alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); } +} - static NSPurgeableData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_new1); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } +abstract class NSURLRequestAttribution { + static const int NSURLRequestAttributionDeveloper = 0; + static const int NSURLRequestAttributionUser = 1; +} - static NSPurgeableData alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_alloc1); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } +abstract class NSHTTPCookieAcceptPolicy { + static const int NSHTTPCookieAcceptPolicyAlways = 0; + static const int NSHTTPCookieAcceptPolicyNever = 1; + static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; } -/// Mutable Dictionary -class NSMutableDictionary extends NSDictionary { - NSMutableDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSHTTPCookieStorage extends NSObject { + NSHTTPCookieStorage._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. - static NSMutableDictionary castFrom(T other) { - return NSMutableDictionary._(other._id, other._lib, + /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + static NSHTTPCookieStorage castFrom(T other) { + return NSHTTPCookieStorage._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. - static NSMutableDictionary castFromPointer( + /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. + static NSHTTPCookieStorage castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSMutableDictionary._(other, lib, retain: retain, release: release); + return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSMutableDictionary]. + /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableDictionary1); - } - - void removeObjectForKey_(NSObject aKey) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObjectForKey_1, aKey._id); - } - - void setObject_forKey_(NSObject anObject, NSObject aKey) { - return _lib._objc_msgSend_310( - _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); + obj._lib._class_NSHTTPCookieStorage1); } - @override - NSMutableDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + static NSHTTPCookieStorage? getSharedHTTPCookieStorage( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_364( + _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); } - NSMutableDictionary initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_365( + _lib._class_NSHTTPCookieStorage1, + _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, + identifier?._id ?? ffi.nullptr); + return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); } - @override - NSMutableDictionary initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSArray? get cookies { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_cookies1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - void addEntriesFromDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_311(_id, _lib._sel_addEntriesFromDictionary_1, - otherDictionary?._id ?? ffi.nullptr); + void setCookie_(NSHTTPCookie? cookie) { + return _lib._objc_msgSend_366( + _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); } - void removeAllObjects() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + void deleteCookie_(NSHTTPCookie? cookie) { + return _lib._objc_msgSend_366( + _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); } - void removeObjectsForKeys_(NSArray? keyArray) { - return _lib._objc_msgSend_291( - _id, _lib._sel_removeObjectsForKeys_1, keyArray?._id ?? ffi.nullptr); + void removeCookiesSinceDate_(NSDate? date) { + return _lib._objc_msgSend_367( + _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); } - void setDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_311( - _id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr); + NSArray cookiesForURL_(NSURL? URL) { + final _ret = _lib._objc_msgSend_160( + _id, _lib._sel_cookiesForURL_1, URL?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - void setObject_forKeyedSubscript_(NSObject obj, NSObject key) { - return _lib._objc_msgSend_310( - _id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id); + void setCookies_forURL_mainDocumentURL_( + NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { + return _lib._objc_msgSend_368( + _id, + _lib._sel_setCookies_forURL_mainDocumentURL_1, + cookies?._id ?? ffi.nullptr, + URL?._id ?? ffi.nullptr, + mainDocumentURL?._id ?? ffi.nullptr); } - static NSMutableDictionary dictionaryWithCapacity_( - NativeCupertinoHttp _lib, int numItems) { - final _ret = _lib._objc_msgSend_94(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + int get cookieAcceptPolicy { + return _lib._objc_msgSend_369(_id, _lib._sel_cookieAcceptPolicy1); } - static NSMutableDictionary dictionaryWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_312(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + set cookieAcceptPolicy(int value) { + _lib._objc_msgSend_370(_id, _lib._sel_setCookieAcceptPolicy_1, value); } - static NSMutableDictionary dictionaryWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_313(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { + final _ret = _lib._objc_msgSend_97( + _id, + _lib._sel_sortedCookiesUsingDescriptors_1, + sortOrder?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - NSMutableDictionary initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_312( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + void storeCookies_forTask_(NSArray? cookies, NSURLSessionTask? task) { + return _lib._objc_msgSend_378(_id, _lib._sel_storeCookies_forTask_1, + cookies?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); } - NSMutableDictionary initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_313( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + void getCookiesForTask_completionHandler_( + NSURLSessionTask? task, ObjCBlock19 completionHandler) { + return _lib._objc_msgSend_379( + _id, + _lib._sel_getCookiesForTask_completionHandler_1, + task?._id ?? ffi.nullptr, + completionHandler._id); } - /// Create a mutable dictionary which is optimized for dealing with a known set of keys. - /// Keys that are not in the key set can still be set into the dictionary, but that usage is not optimal. - /// As with any dictionary, the keys must be copyable. - /// If keyset is nil, an exception is thrown. - /// If keyset is not an object returned by +sharedKeySetForKeys:, an exception is thrown. - static NSMutableDictionary dictionaryWithSharedKeySet_( - NativeCupertinoHttp _lib, NSObject keyset) { - final _ret = _lib._objc_msgSend_314(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + static NSHTTPCookieStorage new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); } - static NSMutableDictionary dictionary(NativeCupertinoHttp _lib) { + static NSHTTPCookieStorage alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObject_forKey_( - NativeCupertinoHttp _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_173(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjects_forKeys_count_( - NativeCupertinoHttp _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_93(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjectsAndKeys_( - NativeCupertinoHttp _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithDictionary_( - NativeCupertinoHttp _lib, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_174(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjects_forKeys_( - NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_175( - _lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); } +} - /// Reads dictionary stored in NSPropertyList format from the specified url. - static NSDictionary dictionaryWithContentsOfURL_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_177( - _lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } +class NSHTTPCookie extends _ObjCWrapper { + NSHTTPCookie._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. - /// The keys are copied from the array and must be copyable. - /// If the array parameter is nil or not an NSArray, an exception is thrown. - /// If the array of keys is empty, an empty key set is returned. - /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). - /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. - /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. - static NSObject sharedKeySetForKeys_( - NativeCupertinoHttp _lib, NSArray? keys) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableDictionary1, - _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. + static NSHTTPCookie castFrom(T other) { + return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); } - static NSMutableDictionary new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. + static NSHTTPCookie castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPCookie._(other, lib, retain: retain, release: release); } - static NSMutableDictionary alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_alloc1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSHTTPCookie]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); } } -class NSNotification extends NSObject { - NSNotification._(ffi.Pointer id, NativeCupertinoHttp lib, +/// NSURLSessionTask - a cancelable object that refers to the lifetime +/// of processing a given request. +class NSURLSessionTask extends NSObject { + NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSNotification] that points to the same underlying object as [other]. - static NSNotification castFrom(T other) { - return NSNotification._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. + static NSURLSessionTask castFrom(T other) { + return NSURLSessionTask._(other._id, other._lib, + retain: true, release: true); } - /// Returns a [NSNotification] that wraps the given raw object pointer. - static NSNotification castFromPointer( + /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. + static NSURLSessionTask castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSNotification._(other, lib, retain: retain, release: release); + return NSURLSessionTask._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSNotification]. + /// Returns whether [obj] is an instance of [NSURLSessionTask]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSNotification1); + obj._lib._class_NSURLSessionTask1); } - NSNotificationName get name { - return _lib._objc_msgSend_32(_id, _lib._sel_name1); + /// an identifier for this task, assigned by and unique to the owning session + int get taskIdentifier { + return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); } - NSObject get object { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// may be nil if this is a stream task + NSURLRequest? get originalRequest { + final _ret = _lib._objc_msgSend_371(_id, _lib._sel_originalRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + /// may differ from originalRequest due to http server redirection + NSURLRequest? get currentRequest { + final _ret = _lib._objc_msgSend_371(_id, _lib._sel_currentRequest1); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + : NSURLRequest._(_ret, _lib, retain: true, release: true); } - NSNotification initWithName_object_userInfo_( - NSNotificationName name, NSObject object, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_315( - _id, - _lib._sel_initWithName_object_userInfo_1, - name, - object._id, - userInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + /// may be nil if no response has been received + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_373(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); } - NSNotification initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + /// NSProgress object which represents the task progress. + /// It can be used for task progress tracking. + NSProgress? get progress { + final _ret = _lib._objc_msgSend_318(_id, _lib._sel_progress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); } - static NSNotification notificationWithName_object_( - NativeCupertinoHttp _lib, NSNotificationName aName, NSObject anObject) { - final _ret = _lib._objc_msgSend_258(_lib._class_NSNotification1, - _lib._sel_notificationWithName_object_1, aName, anObject._id); - return NSNotification._(_ret, _lib, retain: true, release: true); + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + NSDate? get earliestBeginDate { + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_earliestBeginDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - static NSNotification notificationWithName_object_userInfo_( - NativeCupertinoHttp _lib, - NSNotificationName aName, - NSObject anObject, - NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_315( - _lib._class_NSNotification1, - _lib._sel_notificationWithName_object_userInfo_1, - aName, - anObject._id, - aUserInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + set earliestBeginDate(NSDate? value) { + _lib._objc_msgSend_374( + _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); } - @override - NSNotification init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNotification._(_ret, _lib, retain: true, release: true); + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + int get countOfBytesClientExpectsToSend { + return _lib._objc_msgSend_325( + _id, _lib._sel_countOfBytesClientExpectsToSend1); } - static NSNotification new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); - return NSNotification._(_ret, _lib, retain: false, release: true); + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + set countOfBytesClientExpectsToSend(int value) { + _lib._objc_msgSend_326( + _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); } - static NSNotification alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); - return NSNotification._(_ret, _lib, retain: false, release: true); + int get countOfBytesClientExpectsToReceive { + return _lib._objc_msgSend_325( + _id, _lib._sel_countOfBytesClientExpectsToReceive1); } -} -typedef NSNotificationName = ffi.Pointer; + set countOfBytesClientExpectsToReceive(int value) { + _lib._objc_msgSend_326( + _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); + } -class NSNotificationCenter extends NSObject { - NSNotificationCenter._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// number of body bytes already received + int get countOfBytesReceived { + return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesReceived1); + } - /// Returns a [NSNotificationCenter] that points to the same underlying object as [other]. - static NSNotificationCenter castFrom(T other) { - return NSNotificationCenter._(other._id, other._lib, - retain: true, release: true); + /// number of body bytes already sent + int get countOfBytesSent { + return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesSent1); } - /// Returns a [NSNotificationCenter] that wraps the given raw object pointer. - static NSNotificationCenter castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNotificationCenter._(other, lib, retain: retain, release: release); + /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request + int get countOfBytesExpectedToSend { + return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesExpectedToSend1); } - /// Returns whether [obj] is an instance of [NSNotificationCenter]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSNotificationCenter1); + /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. + int get countOfBytesExpectedToReceive { + return _lib._objc_msgSend_325( + _id, _lib._sel_countOfBytesExpectedToReceive1); } - static NSNotificationCenter? getDefaultCenter(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_316( - _lib._class_NSNotificationCenter1, _lib._sel_defaultCenter1); + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + NSString? get taskDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_taskDescription1); return _ret.address == 0 ? null - : NSNotificationCenter._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - void addObserver_selector_name_object_( - NSObject observer, - ffi.Pointer aSelector, - NSNotificationName aName, - NSObject anObject) { - return _lib._objc_msgSend_317( - _id, - _lib._sel_addObserver_selector_name_object_1, - observer._id, - aSelector, - aName, - anObject._id); + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + set taskDescription(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); } - void postNotification_(NSNotification? notification) { - return _lib._objc_msgSend_318( - _id, _lib._sel_postNotification_1, notification?._id ?? ffi.nullptr); + /// -cancel returns immediately, but marks a task as being canceled. + /// The task will signal -URLSession:task:didCompleteWithError: with an + /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some + /// cases, the task may signal other work before it acknowledges the + /// cancelation. -cancel may be sent to a task that has been suspended. + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); } - void postNotificationName_object_( - NSNotificationName aName, NSObject anObject) { - return _lib._objc_msgSend_319( - _id, _lib._sel_postNotificationName_object_1, aName, anObject._id); + /// The current state of the task within the session. + int get state { + return _lib._objc_msgSend_375(_id, _lib._sel_state1); } - void postNotificationName_object_userInfo_( - NSNotificationName aName, NSObject anObject, NSDictionary? aUserInfo) { - return _lib._objc_msgSend_320( - _id, - _lib._sel_postNotificationName_object_userInfo_1, - aName, - anObject._id, - aUserInfo?._id ?? ffi.nullptr); + /// The error, if any, delivered via -URLSession:task:didCompleteWithError: + /// This property will be nil in the event that no error occured. + NSError? get error { + final _ret = _lib._objc_msgSend_376(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); } - void removeObserver_(NSObject observer) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObserver_1, observer._id); + /// Suspending a task will prevent the NSURLSession from continuing to + /// load data. There may still be delegate calls made on behalf of + /// this task (for instance, to report data received while suspending) + /// but no further transmissions will be made on behalf of the task + /// until -resume is sent. The timeout timer associated with the task + /// will be disabled while a task is suspended. -suspend and -resume are + /// nestable. + void suspend() { + return _lib._objc_msgSend_1(_id, _lib._sel_suspend1); } - void removeObserver_name_object_( - NSObject observer, NSNotificationName aName, NSObject anObject) { - return _lib._objc_msgSend_321(_id, _lib._sel_removeObserver_name_object_1, - observer._id, aName, anObject._id); + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); } - NSObject addObserverForName_object_queue_usingBlock_(NSNotificationName name, - NSObject obj, NSOperationQueue? queue, ObjCBlock19 block) { - final _ret = _lib._objc_msgSend_350( - _id, - _lib._sel_addObserverForName_object_queue_usingBlock_1, - name, - obj._id, - queue?._id ?? ffi.nullptr, - block._id); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. + /// + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + double get priority { + return _lib._objc_msgSend_84(_id, _lib._sel_priority1); } - static NSNotificationCenter new1(NativeCupertinoHttp _lib) { + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. + /// + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + set priority(double value) { + _lib._objc_msgSend_377(_id, _lib._sel_setPriority_1, value); + } + + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + bool get prefersIncrementalDelivery { + return _lib._objc_msgSend_11(_id, _lib._sel_prefersIncrementalDelivery1); + } + + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + set prefersIncrementalDelivery(bool value) { + _lib._objc_msgSend_328( + _id, _lib._sel_setPrefersIncrementalDelivery_1, value); + } + + @override + NSURLSessionTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionTask new1(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotificationCenter1, _lib._sel_new1); - return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); } - static NSNotificationCenter alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNotificationCenter1, _lib._sel_alloc1); - return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); } } -class NSOperationQueue extends NSObject { - NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSURLResponse extends NSObject { + NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. - static NSOperationQueue castFrom(T other) { - return NSOperationQueue._(other._id, other._lib, - retain: true, release: true); + /// Returns a [NSURLResponse] that points to the same underlying object as [other]. + static NSURLResponse castFrom(T other) { + return NSURLResponse._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSOperationQueue] that wraps the given raw object pointer. - static NSOperationQueue castFromPointer( + /// Returns a [NSURLResponse] that wraps the given raw object pointer. + static NSURLResponse castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSOperationQueue._(other, lib, retain: retain, release: release); + return NSURLResponse._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSOperationQueue]. + /// Returns whether [obj] is an instance of [NSURLResponse]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOperationQueue1); - } - - /// @property progress - /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue - /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the - /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the - /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super - /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress - /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% - /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 - /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be - /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by - /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving - /// progress scenario. - /// - /// @example - /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; - /// queue.progress.totalUnitCount = 10; - NSProgress? get progress { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_progress1); - return _ret.address == 0 - ? null - : NSProgress._(_ret, _lib, retain: true, release: true); - } - - void addOperation_(NSOperation? op) { - return _lib._objc_msgSend_338( - _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); } - void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { - return _lib._objc_msgSend_344( + /// ! + /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: + /// @abstract Initialize an NSURLResponse with the provided values. + /// @param URL the URL + /// @param MIMEType the MIME content type of the response + /// @param length the expected content length of the associated data + /// @param name the name of the text encoding for the associated data, if applicable, else nil + /// @result The initialized NSURLResponse. + /// @discussion This is the designated initializer for NSURLResponse. + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + NSURL? URL, NSString? MIMEType, int length, NSString? name) { + final _ret = _lib._objc_msgSend_372( _id, - _lib._sel_addOperations_waitUntilFinished_1, - ops?._id ?? ffi.nullptr, - wait); - } - - void addOperationWithBlock_(ObjCBlock block) { - return _lib._objc_msgSend_345( - _id, _lib._sel_addOperationWithBlock_1, block._id); - } - - /// @method addBarrierBlock: - /// @param barrier A block to execute - /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and - /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the - /// `dispatch_barrier_async` function. - void addBarrierBlock_(ObjCBlock barrier) { - return _lib._objc_msgSend_345( - _id, _lib._sel_addBarrierBlock_1, barrier._id); + _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, + URL?._id ?? ffi.nullptr, + MIMEType?._id ?? ffi.nullptr, + length, + name?._id ?? ffi.nullptr); + return NSURLResponse._(_ret, _lib, retain: true, release: true); } - int get maxConcurrentOperationCount { - return _lib._objc_msgSend_81(_id, _lib._sel_maxConcurrentOperationCount1); + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - set maxConcurrentOperationCount(int value) { - _lib._objc_msgSend_346( - _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + /// ! + /// @abstract Returns the MIME type of the receiver. + /// @discussion The MIME type is based on the information provided + /// from an origin source. However, that value may be changed or + /// corrected by a protocol implementation if it can be determined + /// that the origin server or source reported the information + /// incorrectly or imprecisely. An attempt to guess the MIME type may + /// be made if the origin source did not report any such information. + /// @result The MIME type of the receiver. + NSString? get MIMEType { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_MIMEType1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - bool get suspended { - return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); + /// ! + /// @abstract Returns the expected content length of the receiver. + /// @discussion Some protocol implementations report a content length + /// as part of delivering load metadata, but not all protocols + /// guarantee the amount of data that will be delivered in actuality. + /// Hence, this method returns an expected amount. Clients should use + /// this value as an advisory, and should be prepared to deal with + /// either more or less data. + /// @result The expected content length of the receiver, or -1 if + /// there is no expectation that can be arrived at regarding expected + /// content length. + int get expectedContentLength { + return _lib._objc_msgSend_82(_id, _lib._sel_expectedContentLength1); } - set suspended(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setSuspended_1, value); + /// ! + /// @abstract Returns the name of the text encoding of the receiver. + /// @discussion This name will be the actual string reported by the + /// origin source during the course of performing a protocol-specific + /// URL load. Clients can inspect this string and convert it to an + /// NSStringEncoding or CFStringEncoding using the methods and + /// functions made available in the appropriate framework. + /// @result The name of the text encoding of the receiver, or nil if no + /// text encoding was specified. + NSString? get textEncodingName { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_textEncodingName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + /// ! + /// @abstract Returns a suggested filename if the resource were saved to disk. + /// @discussion The method first checks if the server has specified a filename using the + /// content disposition header. If no valid filename is specified using that mechanism, + /// this method checks the last path component of the URL. If no valid filename can be + /// obtained using the last path component, this method uses the URL's host as the filename. + /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. + /// In mose cases, this method appends the proper file extension based on the MIME type. + /// This method always returns a valid filename. + /// @result A suggested filename to use if saving the resource to disk. + NSString? get suggestedFilename { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedFilename1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } - set name(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + static NSURLResponse new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); } - int get qualityOfService { - return _lib._objc_msgSend_342(_id, _lib._sel_qualityOfService1); + static NSURLResponse alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); } +} - set qualityOfService(int value) { - _lib._objc_msgSend_343(_id, _lib._sel_setQualityOfService_1, value); - } +abstract class NSURLSessionTaskState { + /// The task is currently being serviced by the session + static const int NSURLSessionTaskStateRunning = 0; + static const int NSURLSessionTaskStateSuspended = 1; - /// actually retain - dispatch_queue_t get underlyingQueue { - return _lib._objc_msgSend_347(_id, _lib._sel_underlyingQueue1); - } + /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. + static const int NSURLSessionTaskStateCanceling = 2; - /// actually retain - set underlyingQueue(dispatch_queue_t value) { - _lib._objc_msgSend_348(_id, _lib._sel_setUnderlyingQueue_1, value); - } + /// The task has completed and the session will receive no more delegate notifications + static const int NSURLSessionTaskStateCompleted = 3; +} - void cancelAllOperations() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); - } +void _ObjCBlock19_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} - void waitUntilAllOperationsAreFinished() { - return _lib._objc_msgSend_1( - _id, _lib._sel_waitUntilAllOperationsAreFinished1); - } +final _ObjCBlock19_closureRegistry = {}; +int _ObjCBlock19_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock19_registerClosure(Function fn) { + final id = ++_ObjCBlock19_closureRegistryIndex; + _ObjCBlock19_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_349( - _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock19_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock19_closureRegistry[block.ref.target.address]!(arg0); +} - static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_349( - _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock19 extends _ObjCBlockBase { + ObjCBlock19._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - /// These two functions are inherently a race condition and should be avoided if possible - NSArray? get operations { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_operations1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock19.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock19_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - int get operationCount { - return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); + /// Creates a block from a Dart function. + ObjCBlock19.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock19_closureTrampoline) + .cast(), + _ObjCBlock19_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); } - static NSOperationQueue new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); - } + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - static NSOperationQueue alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); - } +class CFArrayCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external CFArrayRetainCallBack retain; + + external CFArrayReleaseCallBack release; + + external CFArrayCopyDescriptionCallBack copyDescription; + + external CFArrayEqualCallBack equal; } -class NSProgress extends NSObject { - NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, +typedef CFArrayRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFArrayReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFArrayCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFArrayEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>>; + +class __CFArray extends ffi.Opaque {} + +typedef CFArrayRef = ffi.Pointer<__CFArray>; +typedef CFMutableArrayRef = ffi.Pointer<__CFArray>; +typedef CFArrayApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFComparatorFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>; + +class OS_object extends NSObject { + OS_object._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSProgress] that points to the same underlying object as [other]. - static NSProgress castFrom(T other) { - return NSProgress._(other._id, other._lib, retain: true, release: true); + /// Returns a [OS_object] that points to the same underlying object as [other]. + static OS_object castFrom(T other) { + return OS_object._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSProgress] that wraps the given raw object pointer. - static NSProgress castFromPointer( + /// Returns a [OS_object] that wraps the given raw object pointer. + static OS_object castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSProgress._(other, lib, retain: retain, release: release); + return OS_object._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSProgress]. + /// Returns whether [obj] is an instance of [OS_object]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_OS_object1); } - static NSProgress currentProgress(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_322( - _lib._class_NSProgress1, _lib._sel_currentProgress1); - return NSProgress._(_ret, _lib, retain: true, release: true); + @override + OS_object init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_object._(_ret, _lib, retain: true, release: true); } - static NSProgress progressWithTotalUnitCount_( - NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_323(_lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + static OS_object new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_new1); + return OS_object._(_ret, _lib, retain: false, release: true); } - static NSProgress discreteProgressWithTotalUnitCount_( - NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_323(_lib._class_NSProgress1, - _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + static OS_object alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_alloc1); + return OS_object._(_ret, _lib, retain: false, release: true); } +} - static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( - NativeCupertinoHttp _lib, - int unitCount, - NSProgress? parent, - int portionOfParentTotalUnitCount) { - final _ret = _lib._objc_msgSend_324( - _lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, - unitCount, - parent?._id ?? ffi.nullptr, - portionOfParentTotalUnitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +class __SecCertificate extends ffi.Opaque {} - NSProgress initWithParent_userInfo_( - NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { - final _ret = _lib._objc_msgSend_325( - _id, - _lib._sel_initWithParent_userInfo_1, - parentProgressOrNil?._id ?? ffi.nullptr, - userInfoOrNil?._id ?? ffi.nullptr); - return NSProgress._(_ret, _lib, retain: true, release: true); - } - - void becomeCurrentWithPendingUnitCount_(int unitCount) { - return _lib._objc_msgSend_326( - _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); - } +class __SecIdentity extends ffi.Opaque {} - void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock work) { - return _lib._objc_msgSend_327( - _id, - _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, - unitCount, - work._id); - } +class __SecKey extends ffi.Opaque {} - void resignCurrent() { - return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); - } +class __SecPolicy extends ffi.Opaque {} - void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { - return _lib._objc_msgSend_328( - _id, - _lib._sel_addChild_withPendingUnitCount_1, - child?._id ?? ffi.nullptr, - inUnitCount); - } +class __SecAccessControl extends ffi.Opaque {} - int get totalUnitCount { - return _lib._objc_msgSend_329(_id, _lib._sel_totalUnitCount1); - } +class __SecKeychain extends ffi.Opaque {} - set totalUnitCount(int value) { - _lib._objc_msgSend_330(_id, _lib._sel_setTotalUnitCount_1, value); - } +class __SecKeychainItem extends ffi.Opaque {} - int get completedUnitCount { - return _lib._objc_msgSend_329(_id, _lib._sel_completedUnitCount1); - } +class __SecKeychainSearch extends ffi.Opaque {} - set completedUnitCount(int value) { - _lib._objc_msgSend_330(_id, _lib._sel_setCompletedUnitCount_1, value); - } +class SecKeychainAttribute extends ffi.Struct { + @SecKeychainAttrType() + external int tag; - NSString? get localizedDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @UInt32() + external int length; - set localizedDescription(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); - } + external ffi.Pointer data; +} - NSString? get localizedAdditionalDescription { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedAdditionalDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +typedef SecKeychainAttrType = OSType; +typedef OSType = FourCharCode; +typedef FourCharCode = UInt32; - set localizedAdditionalDescription(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setLocalizedAdditionalDescription_1, - value?._id ?? ffi.nullptr); - } +class SecKeychainAttributeList extends ffi.Struct { + @UInt32() + external int count; - bool get cancellable { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); - } + external ffi.Pointer attr; +} - set cancellable(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setCancellable_1, value); - } +class __SecTrustedApplication extends ffi.Opaque {} - bool get pausable { - return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); - } +class __SecAccess extends ffi.Opaque {} - set pausable(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setPausable_1, value); - } +class __SecACL extends ffi.Opaque {} - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); - } +class __SecPassword extends ffi.Opaque {} - bool get paused { - return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); - } +class SecKeychainAttributeInfo extends ffi.Struct { + @UInt32() + external int count; - ObjCBlock get cancellationHandler { - final _ret = _lib._objc_msgSend_333(_id, _lib._sel_cancellationHandler1); - return ObjCBlock._(_ret, _lib); - } + external ffi.Pointer tag; - set cancellationHandler(ObjCBlock value) { - _lib._objc_msgSend_334(_id, _lib._sel_setCancellationHandler_1, value._id); - } + external ffi.Pointer format; +} - ObjCBlock get pausingHandler { - final _ret = _lib._objc_msgSend_333(_id, _lib._sel_pausingHandler1); - return ObjCBlock._(_ret, _lib); - } +typedef OSStatus = SInt32; - set pausingHandler(ObjCBlock value) { - _lib._objc_msgSend_334(_id, _lib._sel_setPausingHandler_1, value._id); - } +class _RuneEntry extends ffi.Struct { + @__darwin_rune_t() + external int __min; - ObjCBlock get resumingHandler { - final _ret = _lib._objc_msgSend_333(_id, _lib._sel_resumingHandler1); - return ObjCBlock._(_ret, _lib); - } + @__darwin_rune_t() + external int __max; - set resumingHandler(ObjCBlock value) { - _lib._objc_msgSend_334(_id, _lib._sel_setResumingHandler_1, value._id); - } + @__darwin_rune_t() + external int __map; - void setUserInfoObject_forKey_( - NSObject objectOrNil, NSProgressUserInfoKey key) { - return _lib._objc_msgSend_189( - _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); - } + external ffi.Pointer<__uint32_t> __types; +} - bool get indeterminate { - return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); - } +typedef __darwin_rune_t = __darwin_wchar_t; +typedef __darwin_wchar_t = ffi.Int; +typedef __uint32_t = ffi.UnsignedInt; - double get fractionCompleted { - return _lib._objc_msgSend_85(_id, _lib._sel_fractionCompleted1); - } +class _RuneRange extends ffi.Struct { + @ffi.Int() + external int __nranges; - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); - } + external ffi.Pointer<_RuneEntry> __ranges; +} - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } +class _RuneCharClass extends ffi.Struct { + @ffi.Array.multi([14]) + external ffi.Array __name; - void pause() { - return _lib._objc_msgSend_1(_id, _lib._sel_pause1); - } + @__uint32_t() + external int __mask; +} - void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); - } +class _RuneLocale extends ffi.Struct { + @ffi.Array.multi([8]) + external ffi.Array __magic; - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([32]) + external ffi.Array __encoding; - NSProgressKind get kind { - return _lib._objc_msgSend_32(_id, _lib._sel_kind1); - } + external ffi.Pointer< + ffi.NativeFunction< + __darwin_rune_t Function(ffi.Pointer, __darwin_size_t, + ffi.Pointer>)>> __sgetrune; - set kind(NSProgressKind value) { - _lib._objc_msgSend_331(_id, _lib._sel_setKind_1, value); - } + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(__darwin_rune_t, ffi.Pointer, + __darwin_size_t, ffi.Pointer>)>> __sputrune; - NSNumber? get estimatedTimeRemaining { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_estimatedTimeRemaining1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } + @__darwin_rune_t() + external int __invalid_rune; - set estimatedTimeRemaining(NSNumber? value) { - _lib._objc_msgSend_335( - _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); - } + @ffi.Array.multi([256]) + external ffi.Array<__uint32_t> __runetype; - NSNumber? get throughput { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_throughput1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([256]) + external ffi.Array<__darwin_rune_t> __maplower; - set throughput(NSNumber? value) { - _lib._objc_msgSend_335( - _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); - } + @ffi.Array.multi([256]) + external ffi.Array<__darwin_rune_t> __mapupper; - NSProgressFileOperationKind get fileOperationKind { - return _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); - } + external _RuneRange __runetype_ext; - set fileOperationKind(NSProgressFileOperationKind value) { - _lib._objc_msgSend_331(_id, _lib._sel_setFileOperationKind_1, value); - } + external _RuneRange __maplower_ext; - NSURL? get fileURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + external _RuneRange __mapupper_ext; - set fileURL(NSURL? value) { - _lib._objc_msgSend_336( - _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); - } + external ffi.Pointer __variable; - NSNumber? get fileTotalCount { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileTotalCount1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int __variable_len; - set fileTotalCount(NSNumber? value) { - _lib._objc_msgSend_335( - _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); - } + @ffi.Int() + external int __ncharclasses; - NSNumber? get fileCompletedCount { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileCompletedCount1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer<_RuneCharClass> __charclasses; +} - set fileCompletedCount(NSNumber? value) { - _lib._objc_msgSend_335( - _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); - } +typedef __darwin_size_t = ffi.UnsignedLong; +typedef __darwin_ct_rune_t = ffi.Int; - void publish() { - return _lib._objc_msgSend_1(_id, _lib._sel_publish1); - } +class lconv extends ffi.Struct { + external ffi.Pointer decimal_point; - void unpublish() { - return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); - } + external ffi.Pointer thousands_sep; - static NSObject addSubscriberForFileURL_withPublishingHandler_( - NativeCupertinoHttp _lib, - NSURL? url, - NSProgressPublishingHandler publishingHandler) { - final _ret = _lib._objc_msgSend_337( - _lib._class_NSProgress1, - _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, - url?._id ?? ffi.nullptr, - publishingHandler); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer grouping; - static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { - return _lib._objc_msgSend_200( - _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); - } + external ffi.Pointer int_curr_symbol; - bool get old { - return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); - } + external ffi.Pointer currency_symbol; - static NSProgress new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); - return NSProgress._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer mon_decimal_point; - static NSProgress alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); - return NSProgress._(_ret, _lib, retain: false, release: true); - } -} + external ffi.Pointer mon_thousands_sep; -typedef NSProgressUserInfoKey = ffi.Pointer; -typedef NSProgressKind = ffi.Pointer; -typedef NSProgressFileOperationKind = ffi.Pointer; -typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; -NSProgressUnpublishingHandler _ObjCBlock18_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>()(arg0); -} + external ffi.Pointer mon_grouping; -final _ObjCBlock18_closureRegistry = {}; -int _ObjCBlock18_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock18_registerClosure(Function fn) { - final id = ++_ObjCBlock18_closureRegistryIndex; - _ObjCBlock18_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + external ffi.Pointer positive_sign; -NSProgressUnpublishingHandler _ObjCBlock18_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock18_closureRegistry[block.ref.target.address]!(arg0); -} + external ffi.Pointer negative_sign; -class ObjCBlock18 extends _ObjCBlockBase { - ObjCBlock18._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + @ffi.Char() + external int int_frac_digits; - /// Creates a block from a C function pointer. - ObjCBlock18.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock18_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Char() + external int frac_digits; - /// Creates a block from a Dart function. - ObjCBlock18.fromFunction(NativeCupertinoHttp lib, - NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock18_closureTrampoline) - .cast(), - _ObjCBlock18_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - NSProgressUnpublishingHandler call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } + @ffi.Char() + external int p_cs_precedes; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Char() + external int p_sep_by_space; -typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; + @ffi.Char() + external int n_cs_precedes; -class NSOperation extends NSObject { - NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Char() + external int n_sep_by_space; - /// Returns a [NSOperation] that points to the same underlying object as [other]. - static NSOperation castFrom(T other) { - return NSOperation._(other._id, other._lib, retain: true, release: true); - } + @ffi.Char() + external int p_sign_posn; - /// Returns a [NSOperation] that wraps the given raw object pointer. - static NSOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperation._(other, lib, retain: retain, release: release); - } + @ffi.Char() + external int n_sign_posn; - /// Returns whether [obj] is an instance of [NSOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); - } + @ffi.Char() + external int int_p_cs_precedes; - void start() { - return _lib._objc_msgSend_1(_id, _lib._sel_start1); - } + @ffi.Char() + external int int_n_cs_precedes; - void main() { - return _lib._objc_msgSend_1(_id, _lib._sel_main1); - } + @ffi.Char() + external int int_p_sep_by_space; - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); - } + @ffi.Char() + external int int_n_sep_by_space; - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } + @ffi.Char() + external int int_p_sign_posn; - bool get executing { - return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); - } + @ffi.Char() + external int int_n_sign_posn; +} - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); - } +class __float2 extends ffi.Struct { + @ffi.Float() + external double __sinval; - /// To be deprecated; use and override 'asynchronous' below - bool get concurrent { - return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); - } + @ffi.Float() + external double __cosval; +} - bool get asynchronous { - return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); - } +class __double2 extends ffi.Struct { + @ffi.Double() + external double __sinval; - bool get ready { - return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); - } + @ffi.Double() + external double __cosval; +} - void addDependency_(NSOperation? op) { - return _lib._objc_msgSend_338( - _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); - } +class exception extends ffi.Struct { + @ffi.Int() + external int type; - void removeDependency_(NSOperation? op) { - return _lib._objc_msgSend_338( - _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); - } + external ffi.Pointer name; - NSArray? get dependencies { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_dependencies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + @ffi.Double() + external double arg1; - int get queuePriority { - return _lib._objc_msgSend_339(_id, _lib._sel_queuePriority1); - } + @ffi.Double() + external double arg2; - set queuePriority(int value) { - _lib._objc_msgSend_340(_id, _lib._sel_setQueuePriority_1, value); - } + @ffi.Double() + external double retval; +} - ObjCBlock get completionBlock { - final _ret = _lib._objc_msgSend_333(_id, _lib._sel_completionBlock1); - return ObjCBlock._(_ret, _lib); - } +class __darwin_arm_exception_state extends ffi.Struct { + @__uint32_t() + external int __exception; - set completionBlock(ObjCBlock value) { - _lib._objc_msgSend_334(_id, _lib._sel_setCompletionBlock_1, value._id); - } + @__uint32_t() + external int __fsr; - void waitUntilFinished() { - return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); - } + @__uint32_t() + external int __far; +} - double get threadPriority { - return _lib._objc_msgSend_85(_id, _lib._sel_threadPriority1); - } +class __darwin_arm_exception_state64 extends ffi.Struct { + @__uint64_t() + external int __far; - set threadPriority(double value) { - _lib._objc_msgSend_341(_id, _lib._sel_setThreadPriority_1, value); - } + @__uint32_t() + external int __esr; - int get qualityOfService { - return _lib._objc_msgSend_342(_id, _lib._sel_qualityOfService1); - } + @__uint32_t() + external int __exception; +} - set qualityOfService(int value) { - _lib._objc_msgSend_343(_id, _lib._sel_setQualityOfService_1, value); - } +typedef __uint64_t = ffi.UnsignedLongLong; - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +class __darwin_arm_thread_state extends ffi.Struct { + @ffi.Array.multi([13]) + external ffi.Array<__uint32_t> __r; - set name(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); - } + @__uint32_t() + external int __sp; - static NSOperation new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); - return NSOperation._(_ret, _lib, retain: false, release: true); - } + @__uint32_t() + external int __lr; - static NSOperation alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); - return NSOperation._(_ret, _lib, retain: false, release: true); - } -} + @__uint32_t() + external int __pc; -abstract class NSOperationQueuePriority { - static const int NSOperationQueuePriorityVeryLow = -8; - static const int NSOperationQueuePriorityLow = -4; - static const int NSOperationQueuePriorityNormal = 0; - static const int NSOperationQueuePriorityHigh = 4; - static const int NSOperationQueuePriorityVeryHigh = 8; + @__uint32_t() + external int __cpsr; } -typedef dispatch_queue_t = ffi.Pointer; -void _ObjCBlock19_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); +class __darwin_arm_thread_state64 extends ffi.Struct { + @ffi.Array.multi([29]) + external ffi.Array<__uint64_t> __x; + + @__uint64_t() + external int __fp; + + @__uint64_t() + external int __lr; + + @__uint64_t() + external int __sp; + + @__uint64_t() + external int __pc; + + @__uint32_t() + external int __cpsr; + + @__uint32_t() + external int __pad; } -final _ObjCBlock19_closureRegistry = {}; -int _ObjCBlock19_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock19_registerClosure(Function fn) { - final id = ++_ObjCBlock19_closureRegistryIndex; - _ObjCBlock19_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +class __darwin_arm_vfp_state extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array<__uint32_t> __r; + + @__uint32_t() + external int __fpscr; } -void _ObjCBlock19_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock19_closureRegistry[block.ref.target.address]!(arg0); +class __darwin_arm_neon_state64 extends ffi.Opaque {} + +class __darwin_arm_neon_state extends ffi.Opaque {} + +class __arm_pagein_state extends ffi.Struct { + @ffi.Int() + external int __pagein_error; } -class ObjCBlock19 extends _ObjCBlockBase { - ObjCBlock19._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class __arm_legacy_debug_state extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; - /// Creates a block from a C function pointer. - ObjCBlock19.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock19_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; - /// Creates a block from a Dart function. - ObjCBlock19.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock19_closureTrampoline) - .cast(), - _ObjCBlock19_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; } -class NSDate extends NSObject { - NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +class __darwin_arm_debug_state32 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; - /// Returns a [NSDate] that points to the same underlying object as [other]. - static NSDate castFrom(T other) { - return NSDate._(other._id, other._lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; - /// Returns a [NSDate] that wraps the given raw object pointer. - static NSDate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDate._(other, lib, retain: retain, release: release); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; - /// Returns whether [obj] is an instance of [NSDate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; - double get timeIntervalSinceReferenceDate { - return _lib._objc_msgSend_85( - _id, _lib._sel_timeIntervalSinceReferenceDate1); - } + @__uint64_t() + external int __mdscr_el1; +} - @override - NSDate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDate._(_ret, _lib, retain: true, release: true); - } +class __darwin_arm_debug_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bvr; - NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _lib._objc_msgSend_351( - _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bcr; - NSDate initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wvr; - double timeIntervalSinceDate_(NSDate? anotherDate) { - return _lib._objc_msgSend_352(_id, _lib._sel_timeIntervalSinceDate_1, - anotherDate?._id ?? ffi.nullptr); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wcr; - double get timeIntervalSinceNow { - return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSinceNow1); - } + @__uint64_t() + external int __mdscr_el1; +} - double get timeIntervalSince1970 { - return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSince19701); - } +class __darwin_arm_cpmu_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __ctrs; +} - NSObject addTimeInterval_(double seconds) { - final _ret = - _lib._objc_msgSend_351(_id, _lib._sel_addTimeInterval_1, seconds); - return NSObject._(_ret, _lib, retain: true, release: true); - } +class __darwin_mcontext32 extends ffi.Struct { + external __darwin_arm_exception_state __es; - NSDate dateByAddingTimeInterval_(double ti) { - final _ret = - _lib._objc_msgSend_351(_id, _lib._sel_dateByAddingTimeInterval_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } + external __darwin_arm_thread_state __ss; - NSDate earlierDate_(NSDate? anotherDate) { - final _ret = _lib._objc_msgSend_353( - _id, _lib._sel_earlierDate_1, anotherDate?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); - } + external __darwin_arm_vfp_state __fs; +} - NSDate laterDate_(NSDate? anotherDate) { - final _ret = _lib._objc_msgSend_353( - _id, _lib._sel_laterDate_1, anotherDate?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); - } +class __darwin_mcontext64 extends ffi.Opaque {} - int compare_(NSDate? other) { - return _lib._objc_msgSend_354( - _id, _lib._sel_compare_1, other?._id ?? ffi.nullptr); - } +class __darwin_sigaltstack extends ffi.Struct { + external ffi.Pointer ss_sp; - bool isEqualToDate_(NSDate? otherDate) { - return _lib._objc_msgSend_355( - _id, _lib._sel_isEqualToDate_1, otherDate?._id ?? ffi.nullptr); - } + @__darwin_size_t() + external int ss_size; - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int ss_flags; +} - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } +class __darwin_ucontext extends ffi.Struct { + @ffi.Int() + external int uc_onstack; - static NSDate date(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @__darwin_sigset_t() + external int uc_sigmask; - static NSDate dateWithTimeIntervalSinceNow_( - NativeCupertinoHttp _lib, double secs) { - final _ret = _lib._objc_msgSend_351( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } + external __darwin_sigaltstack uc_stack; - static NSDate dateWithTimeIntervalSinceReferenceDate_( - NativeCupertinoHttp _lib, double ti) { - final _ret = _lib._objc_msgSend_351(_lib._class_NSDate1, - _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer<__darwin_ucontext> uc_link; - static NSDate dateWithTimeIntervalSince1970_( - NativeCupertinoHttp _lib, double secs) { - final _ret = _lib._objc_msgSend_351( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @__darwin_size_t() + external int uc_mcsize; - static NSDate dateWithTimeInterval_sinceDate_( - NativeCupertinoHttp _lib, double secsToBeAdded, NSDate? date) { - final _ret = _lib._objc_msgSend_356( - _lib._class_NSDate1, - _lib._sel_dateWithTimeInterval_sinceDate_1, - secsToBeAdded, - date?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer<__darwin_mcontext64> uc_mcontext; +} - static NSDate? getDistantFuture(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_357(_lib._class_NSDate1, _lib._sel_distantFuture1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +typedef __darwin_sigset_t = __uint32_t; - static NSDate? getDistantPast(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_357(_lib._class_NSDate1, _lib._sel_distantPast1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +class sigval extends ffi.Union { + @ffi.Int() + external int sival_int; - static NSDate? getNow(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_357(_lib._class_NSDate1, _lib._sel_now1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer sival_ptr; +} - NSDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _lib._objc_msgSend_351( - _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } +class sigevent extends ffi.Struct { + @ffi.Int() + external int sigev_notify; - NSDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _lib._objc_msgSend_351( - _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int sigev_signo; - NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate? date) { - final _ret = _lib._objc_msgSend_356( - _id, - _lib._sel_initWithTimeInterval_sinceDate_1, - secsToBeAdded, - date?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); - } + external sigval sigev_value; - static NSDate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); - return NSDate._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer> + sigev_notify_function; - static NSDate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); - return NSDate._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer sigev_notify_attributes; } -typedef NSTimeInterval = ffi.Double; +typedef pthread_attr_t = __darwin_pthread_attr_t; +typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; -/// ! -/// @enum NSURLRequestCachePolicy -/// -/// @discussion The NSURLRequestCachePolicy enum defines constants that -/// can be used to specify the type of interactions that take place with -/// the caching system when the URL loading system processes a request. -/// Specifically, these constants cover interactions that have to do -/// with whether already-existing cache data is returned to satisfy a -/// URL load request. -/// -/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the -/// caching logic defined in the protocol implementation, if any, is -/// used for a particular URL load request. This is the default policy -/// for URL load requests. -/// -/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the -/// data for the URL load should be loaded from the origin source. No -/// existing local cache data, regardless of its freshness or validity, -/// should be used to satisfy a URL load request. -/// -/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that -/// not only should the local cache data be ignored, but that proxies and -/// other intermediates should be instructed to disregard their caches -/// so far as the protocol allows. -/// -/// @constant NSURLRequestReloadIgnoringCacheData Older name for -/// NSURLRequestReloadIgnoringLocalCacheData. -/// -/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the -/// existing cache data should be used to satisfy a URL load request, -/// regardless of its age or expiration date. However, if there is no -/// existing data in the cache corresponding to a URL load request, -/// the URL is loaded from the origin source. -/// -/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the -/// existing cache data should be used to satisfy a URL load request, -/// regardless of its age or expiration date. However, if there is no -/// existing data in the cache corresponding to a URL load request, no -/// attempt is made to load the URL from the origin source, and the -/// load is considered to have failed. This constant specifies a -/// behavior that is similar to an "offline" mode. -/// -/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that -/// the existing cache data may be used provided the origin source -/// confirms its validity, otherwise the URL is loaded from the -/// origin source. -abstract class NSURLRequestCachePolicy { - static const int NSURLRequestUseProtocolCachePolicy = 0; - static const int NSURLRequestReloadIgnoringLocalCacheData = 1; - static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; - static const int NSURLRequestReloadIgnoringCacheData = 1; - static const int NSURLRequestReturnCacheDataElseLoad = 2; - static const int NSURLRequestReturnCacheDataDontLoad = 3; - static const int NSURLRequestReloadRevalidatingCacheData = 5; -} +class __siginfo extends ffi.Struct { + @ffi.Int() + external int si_signo; -/// ! -/// @enum NSURLRequestNetworkServiceType -/// -/// @discussion The NSURLRequestNetworkServiceType enum defines constants that -/// can be used to specify the service type to associate with this request. The -/// service type is used to provide the networking layers a hint of the purpose -/// of the request. -/// -/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest -/// when created. This value should be left unchanged for the vast majority of requests. -/// -/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP -/// control traffic. -/// -/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video -/// traffic. -/// -/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background -/// traffic (such as a file download). -/// -/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. -/// -/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. -/// -/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. -/// -/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. -/// -/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. -abstract class NSURLRequestNetworkServiceType { - /// Standard internet traffic - static const int NSURLNetworkServiceTypeDefault = 0; + @ffi.Int() + external int si_errno; - /// Voice over IP control traffic - static const int NSURLNetworkServiceTypeVoIP = 1; + @ffi.Int() + external int si_code; - /// Video traffic - static const int NSURLNetworkServiceTypeVideo = 2; + @pid_t() + external int si_pid; - /// Background traffic - static const int NSURLNetworkServiceTypeBackground = 3; + @uid_t() + external int si_uid; - /// Voice data - static const int NSURLNetworkServiceTypeVoice = 4; + @ffi.Int() + external int si_status; - /// Responsive data - static const int NSURLNetworkServiceTypeResponsiveData = 6; + external ffi.Pointer si_addr; - /// Multimedia Audio/Video Streaming - static const int NSURLNetworkServiceTypeAVStreaming = 8; + external sigval si_value; - /// Responsive Multimedia Audio/Video - static const int NSURLNetworkServiceTypeResponsiveAV = 9; + @ffi.Long() + external int si_band; - /// Call Signaling - static const int NSURLNetworkServiceTypeCallSignaling = 11; + @ffi.Array.multi([7]) + external ffi.Array __pad; } -/// ! -/// @enum NSURLRequestAttribution -/// -/// @discussion The NSURLRequestAttribution enum is used to indicate whether the -/// user or developer specified the URL. -/// -/// @constant NSURLRequestAttributionDeveloper Indicates that the URL was specified -/// by the developer. This is the default value for an NSURLRequest when created. -/// -/// @constant NSURLRequestAttributionUser Indicates that the URL was specified by -/// the user. -abstract class NSURLRequestAttribution { - static const int NSURLRequestAttributionDeveloper = 0; - static const int NSURLRequestAttributionUser = 1; +typedef pid_t = __darwin_pid_t; +typedef __darwin_pid_t = __int32_t; +typedef uid_t = __darwin_uid_t; +typedef __darwin_uid_t = __uint32_t; + +class __sigaction_u extends ffi.Union { + external ffi.Pointer> + __sa_handler; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer)>> + __sa_sigaction; } -/// ! -/// @class NSURLRequest -/// -/// @abstract An NSURLRequest object represents a URL load request in a -/// manner independent of protocol and URL scheme. -/// -/// @discussion NSURLRequest encapsulates two basic data elements about -/// a URL load request: -///

    -///
  • The URL to load. -///
  • The policy to use when consulting the URL content cache made -/// available by the implementation. -///
-/// In addition, NSURLRequest is designed to be extended to support -/// protocol-specific data by adding categories to access a property -/// object provided in an interface targeted at protocol implementors. -///
    -///
  • Protocol implementors should direct their attention to the -/// NSURLRequestExtensibility category on NSURLRequest for more -/// information on how to provide extensions on NSURLRequest to -/// support protocol-specific request information. -///
  • Clients of this API who wish to create NSURLRequest objects to -/// load URL content should consult the protocol-specific NSURLRequest -/// categories that are available. The NSHTTPURLRequest category on -/// NSURLRequest is an example. -///
-///

-/// Objects of this class are used to create NSURLConnection instances, -/// which can are used to perform the load of a URL, or as input to the -/// NSURLConnection class method which performs synchronous loads. -class NSURLRequest extends NSObject { - NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +class __sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; - /// Returns a [NSURLRequest] that points to the same underlying object as [other]. - static NSURLRequest castFrom(T other) { - return NSURLRequest._(other._id, other._lib, retain: true, release: true); - } + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Pointer, ffi.Pointer)>> sa_tramp; - /// Returns a [NSURLRequest] that wraps the given raw object pointer. - static NSURLRequest castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLRequest._(other, lib, retain: retain, release: release); - } + @sigset_t() + external int sa_mask; - /// Returns whether [obj] is an instance of [NSURLRequest]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); - } + @ffi.Int() + external int sa_flags; +} - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL? URL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSURLRequest1, - _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } +typedef siginfo_t = __siginfo; +typedef sigset_t = __darwin_sigset_t; - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_11( - _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); - } +class sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NativeCupertinoHttp _lib, - NSURL? URL, - int cachePolicy, - double timeoutInterval) { - final _ret = _lib._objc_msgSend_358( - _lib._class_NSURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } + @sigset_t() + external int sa_mask; - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_(NSURL? URL) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithURL_1, URL?._id ?? ffi.nullptr); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int sa_flags; +} - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL and - /// cache policy. - /// @discussion This is the designated initializer for the - /// NSURLRequest class. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL? URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_358( - _id, - _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } +class sigvec extends ffi.Struct { + external ffi.Pointer> + sv_handler; - /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int sv_mask; - /// ! - /// @abstract Returns the cache policy of the receiver. - /// @result The cache policy of the receiver. - int get cachePolicy { - return _lib._objc_msgSend_359(_id, _lib._sel_cachePolicy1); - } + @ffi.Int() + external int sv_flags; +} - /// ! - /// @abstract Returns the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - /// @result The timeout interval of the receiver. - double get timeoutInterval { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); - } +class sigstack extends ffi.Struct { + external ffi.Pointer ss_sp; - /// ! - /// @abstract The main document URL associated with this load. - /// @discussion This URL is used for the cookie "same domain as main - /// document" policy, and attributing the request as a sub-resource - /// of a user-specified URL. There may also be other future uses. - /// See setMainDocumentURL: - /// @result The main document URL. - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int ss_onstack; +} - /// ! - /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. - /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have - /// not explicitly set a networkServiceType (using the setNetworkServiceType method). - /// @result The NSURLRequestNetworkServiceType associated with this request. - int get networkServiceType { - return _lib._objc_msgSend_360(_id, _lib._sel_networkServiceType1); - } +typedef pthread_t = __darwin_pthread_t; +typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; +typedef stack_t = __darwin_sigaltstack; - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @result YES if the receiver is allowed to use the built in cellular radios to - /// satisfy the request, NO otherwise. - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } +class __sbuf extends ffi.Struct { + external ffi.Pointer _base; - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @result YES if the receiver is allowed to use an interface marked as expensive to - /// satisfy the request, NO otherwise. - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } + @ffi.Int() + external int _size; +} - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @result YES if the receiver is allowed to use an interface marked as constrained to - /// satisfy the request, NO otherwise. - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } +class __sFILEX extends ffi.Opaque {} - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); - } +class __sFILE extends ffi.Struct { + external ffi.Pointer _p; - /// ! - /// @abstract Returns the NSURLRequestAttribution associated with this request. - /// @discussion This will return NSURLRequestAttributionDeveloper for requests that - /// have not explicitly set an attribution. - /// @result The NSURLRequestAttribution associated with this request. - int get attribution { - return _lib._objc_msgSend_361(_id, _lib._sel_attribution1); - } + @ffi.Int() + external int _r; - /// ! - /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. - /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, - /// No otherwise. Defaults to NO. - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); - } + @ffi.Int() + external int _w; - /// ! - /// @abstract Returns the HTTP request method of the receiver. - /// @result the HTTP request method of the receiver. - NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Short() + external int _flags; - /// ! - /// @abstract Returns a dictionary containing all the HTTP header fields - /// of the receiver. - /// @result a dictionary containing all the HTTP header fields of the - /// receiver. - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } + @ffi.Short() + external int _file; - /// ! - /// @method valueForHTTPHeaderField: - /// @abstract Returns the value which corresponds to the given header - /// field. Note that, in keeping with the HTTP RFC, HTTP header field - /// names are case-insensitive. - /// @param field the header field name to use for the lookup - /// (case-insensitive). - /// @result the value associated with the given header field, or nil if - /// there is no value associated with the given header field. - NSString valueForHTTPHeaderField_(NSString? field) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + external __sbuf _bf; - /// ! - /// @abstract Returns the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - /// @result The request body data of the receiver. - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int _lbfsize; - /// ! - /// @abstract Returns the request body stream of the receiver - /// if any has been set - /// @discussion The stream is returned for examination only; it is - /// not safe for the caller to manipulate the stream in any way. Also - /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only - /// one can be set on a given request. Also note that the body stream is - /// preserved across copies, but is LOST when the request is coded via the - /// NSCoding protocol - /// @result The request body stream of the receiver. - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_362(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer _cookie; - /// ! - /// @abstract Determine whether default cookie handling will happen for - /// this request. - /// @discussion NOTE: This value is not used prior to 10.3 - /// @result YES if cookies will be sent with and set for this request; - /// otherwise NO. - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); - } + external ffi + .Pointer)>> + _close; - /// ! - /// @abstract Reports whether the receiver is not expected to wait for the - /// previous response before transmitting. - /// @result YES if the receiver should transmit before the previous response - /// is received. NO if the receiver should wait for the previous response - /// before transmitting. - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); - } + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> _read; - static NSURLRequest new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> _seek; - static NSURLRequest alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> _write; + + external __sbuf _ub; + + external ffi.Pointer<__sFILEX> _extra; + + @ffi.Int() + external int _ur; + + @ffi.Array.multi([3]) + external ffi.Array _ubuf; + + @ffi.Array.multi([1]) + external ffi.Array _nbuf; + + external __sbuf _lb; + + @ffi.Int() + external int _blksize; + + @fpos_t() + external int _offset; } -class NSInputStream extends _ObjCWrapper { - NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef fpos_t = __darwin_off_t; +typedef __darwin_off_t = __int64_t; +typedef __int64_t = ffi.LongLong; +typedef FILE = __sFILE; +typedef off_t = __darwin_off_t; +typedef ssize_t = __darwin_ssize_t; +typedef __darwin_ssize_t = ffi.Long; - /// Returns a [NSInputStream] that points to the same underlying object as [other]. - static NSInputStream castFrom(T other) { - return NSInputStream._(other._id, other._lib, retain: true, release: true); - } +abstract class idtype_t { + static const int P_ALL = 0; + static const int P_PID = 1; + static const int P_PGID = 2; +} - /// Returns a [NSInputStream] that wraps the given raw object pointer. - static NSInputStream castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInputStream._(other, lib, retain: retain, release: release); - } +class timeval extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; - /// Returns whether [obj] is an instance of [NSInputStream]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); - } + @__darwin_suseconds_t() + external int tv_usec; } -/// ! -/// @class NSMutableURLRequest -/// -/// @abstract An NSMutableURLRequest object represents a mutable URL load -/// request in a manner independent of protocol and URL scheme. -/// -/// @discussion This specialization of NSURLRequest is provided to aid -/// developers who may find it more convenient to mutate a single request -/// object for a series of URL loads instead of creating an immutable -/// NSURLRequest for each load. This programming model is supported by -/// the following contract stipulation between NSMutableURLRequest and -/// NSURLConnection: NSURLConnection makes a deep copy of each -/// NSMutableURLRequest object passed to one of its initializers. -///

NSMutableURLRequest is designed to be extended to support -/// protocol-specific data by adding categories to access a property -/// object provided in an interface targeted at protocol implementors. -///

    -///
  • Protocol implementors should direct their attention to the -/// NSMutableURLRequestExtensibility category on -/// NSMutableURLRequest for more information on how to provide -/// extensions on NSMutableURLRequest to support protocol-specific -/// request information. -///
  • Clients of this API who wish to create NSMutableURLRequest -/// objects to load URL content should consult the protocol-specific -/// NSMutableURLRequest categories that are available. The -/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an -/// example. -///
-class NSMutableURLRequest extends NSURLRequest { - NSMutableURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef __darwin_time_t = ffi.Long; +typedef __darwin_suseconds_t = __int32_t; - /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. - static NSMutableURLRequest castFrom(T other) { - return NSMutableURLRequest._(other._id, other._lib, - retain: true, release: true); - } +class rusage extends ffi.Struct { + external timeval ru_utime; - /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. - static NSMutableURLRequest castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableURLRequest._(other, lib, retain: retain, release: release); - } + external timeval ru_stime; - /// Returns whether [obj] is an instance of [NSMutableURLRequest]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableURLRequest1); - } + @ffi.Long() + external int ru_maxrss; - /// ! - /// @abstract The URL of the receiver. - @override - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Long() + external int ru_ixrss; - /// ! - /// @abstract The URL of the receiver. - set URL(NSURL? value) { - _lib._objc_msgSend_336(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); - } + @ffi.Long() + external int ru_idrss; - /// ! - /// @abstract The cache policy of the receiver. - @override - int get cachePolicy { - return _lib._objc_msgSend_359(_id, _lib._sel_cachePolicy1); - } + @ffi.Long() + external int ru_isrss; - /// ! - /// @abstract The cache policy of the receiver. - set cachePolicy(int value) { - _lib._objc_msgSend_363(_id, _lib._sel_setCachePolicy_1, value); - } + @ffi.Long() + external int ru_minflt; - /// ! - /// @abstract Sets the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - @override - double get timeoutInterval { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); - } + @ffi.Long() + external int ru_majflt; - /// ! - /// @abstract Sets the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - set timeoutInterval(double value) { - _lib._objc_msgSend_341(_id, _lib._sel_setTimeoutInterval_1, value); - } + @ffi.Long() + external int ru_nswap; - /// ! - /// @abstract Sets the main document URL - /// @discussion The caller should pass the URL for an appropriate main - /// document, if known. For example, when loading a web page, the URL - /// of the main html document for the top-level frame should be - /// passed. This main document is used to implement the cookie "only - /// from same domain as main document" policy, attributing this request - /// as a sub-resource of a user-specified URL, and possibly other things - /// in the future. - @override - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Long() + external int ru_inblock; - /// ! - /// @abstract Sets the main document URL - /// @discussion The caller should pass the URL for an appropriate main - /// document, if known. For example, when loading a web page, the URL - /// of the main html document for the top-level frame should be - /// passed. This main document is used to implement the cookie "only - /// from same domain as main document" policy, attributing this request - /// as a sub-resource of a user-specified URL, and possibly other things - /// in the future. - set mainDocumentURL(NSURL? value) { - _lib._objc_msgSend_336( - _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); - } + @ffi.Long() + external int ru_oublock; - /// ! - /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request - /// @discussion This method is used to provide the network layers with a hint as to the purpose - /// of the request. Most clients should not need to use this method. - @override - int get networkServiceType { - return _lib._objc_msgSend_360(_id, _lib._sel_networkServiceType1); - } + @ffi.Long() + external int ru_msgsnd; - /// ! - /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request - /// @discussion This method is used to provide the network layers with a hint as to the purpose - /// of the request. Most clients should not need to use this method. - set networkServiceType(int value) { - _lib._objc_msgSend_364(_id, _lib._sel_setNetworkServiceType_1, value); - } + @ffi.Long() + external int ru_msgrcv; - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @discussion NO if the receiver should not be allowed to use the built in - /// cellular radios to satisfy the request, YES otherwise. The default is YES. - @override - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } + @ffi.Long() + external int ru_nsignals; - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @discussion NO if the receiver should not be allowed to use the built in - /// cellular radios to satisfy the request, YES otherwise. The default is YES. - set allowsCellularAccess(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setAllowsCellularAccess_1, value); - } + @ffi.Long() + external int ru_nvcsw; - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to - /// satisfy the request, YES otherwise. - @override - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } + @ffi.Long() + external int ru_nivcsw; +} - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to - /// satisfy the request, YES otherwise. - set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_332( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); - } +class rusage_info_v0 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to - /// satisfy the request, YES otherwise. - @override - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } + @ffi.Uint64() + external int ri_user_time; - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to - /// satisfy the request, YES otherwise. - set allowsConstrainedNetworkAccess(bool value) { - _lib._objc_msgSend_332( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); - } + @ffi.Uint64() + external int ri_system_time; - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - @override - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - set assumesHTTP3Capable(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setAssumesHTTP3Capable_1, value); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - /// ! - /// @abstract Sets the NSURLRequestAttribution to associate with this request. - /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the - /// user. Defaults to NSURLRequestAttributionDeveloper. - @override - int get attribution { - return _lib._objc_msgSend_361(_id, _lib._sel_attribution1); - } + @ffi.Uint64() + external int ri_pageins; - /// ! - /// @abstract Sets the NSURLRequestAttribution to associate with this request. - /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the - /// user. Defaults to NSURLRequestAttributionDeveloper. - set attribution(int value) { - _lib._objc_msgSend_365(_id, _lib._sel_setAttribution_1, value); - } + @ffi.Uint64() + external int ri_wired_size; - /// ! - /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. - /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, - /// No otherwise. Defaults to NO. - @override - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); - } + @ffi.Uint64() + external int ri_resident_size; - /// ! - /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. - /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, - /// No otherwise. Defaults to NO. - set requiresDNSSECValidation(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setRequiresDNSSECValidation_1, value); - } + @ffi.Uint64() + external int ri_phys_footprint; - /// ! - /// @abstract Sets the HTTP request method of the receiver. - @override - NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - /// ! - /// @abstract Sets the HTTP request method of the receiver. - set HTTPMethod(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setHTTPMethod_1, value?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; +} - /// ! - /// @abstract Sets the HTTP header fields of the receiver to the given - /// dictionary. - /// @discussion This method replaces all header fields that may have - /// existed before this method call. - ///

Since HTTP header fields must be string values, each object and - /// key in the dictionary passed to this method must answer YES when - /// sent an -isKindOfClass:[NSString class] message. If either - /// the key or value for a key-value pair answers NO when sent this - /// message, the key-value pair is skipped. - @override - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +class rusage_info_v1 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - /// ! - /// @abstract Sets the HTTP header fields of the receiver to the given - /// dictionary. - /// @discussion This method replaces all header fields that may have - /// existed before this method call. - ///

Since HTTP header fields must be string values, each object and - /// key in the dictionary passed to this method must answer YES when - /// sent an -isKindOfClass:[NSString class] message. If either - /// the key or value for a key-value pair answers NO when sent this - /// message, the key-value pair is skipped. - set allHTTPHeaderFields(NSDictionary? value) { - _lib._objc_msgSend_366( - _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_user_time; - /// ! - /// @method setValue:forHTTPHeaderField: - /// @abstract Sets the value of the given HTTP header field. - /// @discussion If a value was previously set for the given header - /// field, that value is replaced with the given value. Note that, in - /// keeping with the HTTP RFC, HTTP header field names are - /// case-insensitive. - /// @param value the header field value. - /// @param field the header field name (case-insensitive). - void setValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_367(_id, _lib._sel_setValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_system_time; - /// ! - /// @method addValue:forHTTPHeaderField: - /// @abstract Adds an HTTP header field in the current header - /// dictionary. - /// @discussion This method provides a way to add values to header - /// fields incrementally. If a value was previously set for the given - /// header field, the given value is appended to the previously-existing - /// value. The appropriate field delimiter, a comma in the case of HTTP, - /// is added by the implementation, and should not be added to the given - /// value by the caller. Note that, in keeping with the HTTP RFC, HTTP - /// header field names are case-insensitive. - /// @param value the header field value. - /// @param field the header field name (case-insensitive). - void addValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_367(_id, _lib._sel_addValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - /// ! - /// @abstract Sets the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - @override - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - /// ! - /// @abstract Sets the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - set HTTPBody(NSData? value) { - _lib._objc_msgSend_368( - _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_pageins; - /// ! - /// @abstract Sets the request body to be the contents of the given stream. - /// @discussion The provided stream should be unopened; the request will take - /// over the stream's delegate. The entire stream's contents will be - /// transmitted as the HTTP body of the request. Note that the body stream - /// and the body data (set by setHTTPBody:, above) are mutually exclusive - /// - setting one will clear the other. - @override - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_362(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_wired_size; - /// ! - /// @abstract Sets the request body to be the contents of the given stream. - /// @discussion The provided stream should be unopened; the request will take - /// over the stream's delegate. The entire stream's contents will be - /// transmitted as the HTTP body of the request. Note that the body stream - /// and the body data (set by setHTTPBody:, above) are mutually exclusive - /// - setting one will clear the other. - set HTTPBodyStream(NSInputStream? value) { - _lib._objc_msgSend_369( - _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_resident_size; - /// ! - /// @abstract Decide whether default cookie handling will happen for - /// this request (YES if cookies should be sent with and set for this request; - /// otherwise NO). - /// @discussion The default is YES - in other words, cookies are sent from and - /// stored to the cookie manager by default. - /// NOTE: In releases prior to 10.3, this value is ignored - @override - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); - } + @ffi.Uint64() + external int ri_phys_footprint; - /// ! - /// @abstract Decide whether default cookie handling will happen for - /// this request (YES if cookies should be sent with and set for this request; - /// otherwise NO). - /// @discussion The default is YES - in other words, cookies are sent from and - /// stored to the cookie manager by default. - /// NOTE: In releases prior to 10.3, this value is ignored - set HTTPShouldHandleCookies(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - /// ! - /// @abstract Sets whether the request should not wait for the previous response - /// before transmitting (YES if the receiver should transmit before the previous response is - /// received. NO to wait for the previous response before transmitting) - /// @discussion Calling this method with a YES value does not guarantee HTTP - /// pipelining behavior. This method may have no effect if an HTTP proxy is - /// configured, or if the HTTP request uses an unsafe request method (e.g., POST - /// requests will not pipeline). Pipelining behavior also may not begin until - /// the second request on a given TCP connection. There may be other situations - /// where pipelining does not occur even though YES was set. - /// HTTP 1.1 allows the client to send multiple requests to the server without - /// waiting for a response. Though HTTP 1.1 requires support for pipelining, - /// some servers report themselves as being HTTP 1.1 but do not support - /// pipelining (disconnecting, sending resources misordered, omitting part of - /// a resource, etc.). - @override - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - /// ! - /// @abstract Sets whether the request should not wait for the previous response - /// before transmitting (YES if the receiver should transmit before the previous response is - /// received. NO to wait for the previous response before transmitting) - /// @discussion Calling this method with a YES value does not guarantee HTTP - /// pipelining behavior. This method may have no effect if an HTTP proxy is - /// configured, or if the HTTP request uses an unsafe request method (e.g., POST - /// requests will not pipeline). Pipelining behavior also may not begin until - /// the second request on a given TCP connection. There may be other situations - /// where pipelining does not occur even though YES was set. - /// HTTP 1.1 allows the client to send multiple requests to the server without - /// waiting for a response. Though HTTP 1.1 requires support for pipelining, - /// some servers report themselves as being HTTP 1.1 but do not support - /// pipelining (disconnecting, sending resources misordered, omitting part of - /// a resource, etc.). - set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); - } + @ffi.Uint64() + external int ri_child_user_time; - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSMutableURLRequest requestWithURL_( - NativeCupertinoHttp _lib, NSURL? URL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableURLRequest1, - _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_system_time; - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_11( - _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NativeCupertinoHttp _lib, - NSURL? URL, - int cachePolicy, - double timeoutInterval) { - final _ret = _lib._objc_msgSend_358( - _lib._class_NSMutableURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - static NSMutableURLRequest new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_child_pageins; - static NSMutableURLRequest alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; } -abstract class NSHTTPCookieAcceptPolicy { - static const int NSHTTPCookieAcceptPolicyAlways = 0; - static const int NSHTTPCookieAcceptPolicyNever = 1; - static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; -} +class rusage_info_v2 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; -class NSHTTPCookieStorage extends NSObject { - NSHTTPCookieStorage._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Uint64() + external int ri_user_time; - /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. - static NSHTTPCookieStorage castFrom(T other) { - return NSHTTPCookieStorage._(other._id, other._lib, - retain: true, release: true); - } + @ffi.Uint64() + external int ri_system_time; - /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. - static NSHTTPCookieStorage castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSHTTPCookieStorage1); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - static NSHTTPCookieStorage? getSharedHTTPCookieStorage( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_370( - _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_pageins; - static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_371( - _lib._class_NSHTTPCookieStorage1, - _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, - identifier?._id ?? ffi.nullptr); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_wired_size; - NSArray? get cookies { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_cookies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_resident_size; - void setCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_372( - _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_phys_footprint; - void deleteCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_372( - _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - void removeCookiesSinceDate_(NSDate? date) { - return _lib._objc_msgSend_373( - _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - NSArray cookiesForURL_(NSURL? URL) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_cookiesForURL_1, URL?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_user_time; - void setCookies_forURL_mainDocumentURL_( - NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { - return _lib._objc_msgSend_374( - _id, - _lib._sel_setCookies_forURL_mainDocumentURL_1, - cookies?._id ?? ffi.nullptr, - URL?._id ?? ffi.nullptr, - mainDocumentURL?._id ?? ffi.nullptr); - } - - int get cookieAcceptPolicy { - return _lib._objc_msgSend_375(_id, _lib._sel_cookieAcceptPolicy1); - } + @ffi.Uint64() + external int ri_child_system_time; - set cookieAcceptPolicy(int value) { - _lib._objc_msgSend_376(_id, _lib._sel_setCookieAcceptPolicy_1, value); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { - final _ret = _lib._objc_msgSend_97( - _id, - _lib._sel_sortedCookiesUsingDescriptors_1, - sortOrder?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - void storeCookies_forTask_(NSArray? cookies, NSURLSessionTask? task) { - return _lib._objc_msgSend_385(_id, _lib._sel_storeCookies_forTask_1, - cookies?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_child_pageins; - void getCookiesForTask_completionHandler_( - NSURLSessionTask? task, ObjCBlock20 completionHandler) { - return _lib._objc_msgSend_386( - _id, - _lib._sel_getCookiesForTask_completionHandler_1, - task?._id ?? ffi.nullptr, - completionHandler._id); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - static NSHTTPCookieStorage new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - static NSHTTPCookieStorage alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; } -class NSHTTPCookie extends _ObjCWrapper { - NSHTTPCookie._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +class rusage_info_v3 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. - static NSHTTPCookie castFrom(T other) { - return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_user_time; - /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. - static NSHTTPCookie castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookie._(other, lib, retain: retain, release: release); - } + @ffi.Uint64() + external int ri_system_time; - /// Returns whether [obj] is an instance of [NSHTTPCookie]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); - } -} + @ffi.Uint64() + external int ri_pkg_idle_wkups; -/// NSURLSessionTask - a cancelable object that refers to the lifetime -/// of processing a given request. -class NSURLSessionTask extends NSObject { - NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Uint64() + external int ri_interrupt_wkups; - /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. - static NSURLSessionTask castFrom(T other) { - return NSURLSessionTask._(other._id, other._lib, - retain: true, release: true); - } + @ffi.Uint64() + external int ri_pageins; - /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. - static NSURLSessionTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTask._(other, lib, retain: retain, release: release); - } + @ffi.Uint64() + external int ri_wired_size; - /// Returns whether [obj] is an instance of [NSURLSessionTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTask1); - } + @ffi.Uint64() + external int ri_resident_size; - /// an identifier for this task, assigned by and unique to the owning session - int get taskIdentifier { - return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); - } + @ffi.Uint64() + external int ri_phys_footprint; - /// may be nil if this is a stream task - NSURLRequest? get originalRequest { - final _ret = _lib._objc_msgSend_377(_id, _lib._sel_originalRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - /// may differ from originalRequest due to http server redirection - NSURLRequest? get currentRequest { - final _ret = _lib._objc_msgSend_377(_id, _lib._sel_currentRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - /// may be nil if no response has been received - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_379(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_user_time; - /// Sets a task-specific delegate. Methods not implemented on this delegate will - /// still be forwarded to the session delegate. - /// - /// Cannot be modified after task resumes. Not supported on background session. - /// - /// Delegate is strongly referenced until the task completes, after which it is - /// reset to `nil`. - NSObject? get delegate { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_system_time; - /// Sets a task-specific delegate. Methods not implemented on this delegate will - /// still be forwarded to the session delegate. - /// - /// Cannot be modified after task resumes. Not supported on background session. - /// - /// Delegate is strongly referenced until the task completes, after which it is - /// reset to `nil`. - set delegate(NSObject? value) { - _lib._objc_msgSend_380( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - /// NSProgress object which represents the task progress. - /// It can be used for task progress tracking. - NSProgress? get progress { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_progress1); - return _ret.address == 0 - ? null - : NSProgress._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - NSDate? get earliestBeginDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_earliestBeginDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pageins; - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - set earliestBeginDate(NSDate? value) { - _lib._objc_msgSend_381( - _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - int get countOfBytesClientExpectsToSend { - return _lib._objc_msgSend_329( - _id, _lib._sel_countOfBytesClientExpectsToSend1); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - set countOfBytesClientExpectsToSend(int value) { - _lib._objc_msgSend_330( - _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - int get countOfBytesClientExpectsToReceive { - return _lib._objc_msgSend_329( - _id, _lib._sel_countOfBytesClientExpectsToReceive1); - } + @ffi.Uint64() + external int ri_cpu_time_qos_default; - set countOfBytesClientExpectsToReceive(int value) { - _lib._objc_msgSend_330( - _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); - } + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - /// number of body bytes already sent - int get countOfBytesSent { - return _lib._objc_msgSend_329(_id, _lib._sel_countOfBytesSent1); - } + @ffi.Uint64() + external int ri_cpu_time_qos_background; - /// number of body bytes already received - int get countOfBytesReceived { - return _lib._objc_msgSend_329(_id, _lib._sel_countOfBytesReceived1); - } + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request - int get countOfBytesExpectedToSend { - return _lib._objc_msgSend_329(_id, _lib._sel_countOfBytesExpectedToSend1); - } + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; - /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. - int get countOfBytesExpectedToReceive { - return _lib._objc_msgSend_329( - _id, _lib._sel_countOfBytesExpectedToReceive1); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - NSString? get taskDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_taskDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - set taskDescription(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_billed_system_time; - /// -cancel returns immediately, but marks a task as being canceled. - /// The task will signal -URLSession:task:didCompleteWithError: with an - /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some - /// cases, the task may signal other work before it acknowledges the - /// cancelation. -cancel may be sent to a task that has been suspended. - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } + @ffi.Uint64() + external int ri_serviced_system_time; +} - /// The current state of the task within the session. - int get state { - return _lib._objc_msgSend_382(_id, _lib._sel_state1); - } +class rusage_info_v4 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - /// The error, if any, delivered via -URLSession:task:didCompleteWithError: - /// This property will be nil in the event that no error occurred. - NSError? get error { - final _ret = _lib._objc_msgSend_383(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_user_time; - /// Suspending a task will prevent the NSURLSession from continuing to - /// load data. There may still be delegate calls made on behalf of - /// this task (for instance, to report data received while suspending) - /// but no further transmissions will be made on behalf of the task - /// until -resume is sent. The timeout timer associated with the task - /// will be disabled while a task is suspended. -suspend and -resume are - /// nestable. - void suspend() { - return _lib._objc_msgSend_1(_id, _lib._sel_suspend1); - } + @ffi.Uint64() + external int ri_system_time; - void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. - /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. - /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - double get priority { - return _lib._objc_msgSend_84(_id, _lib._sel_priority1); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. - /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. - /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - set priority(double value) { - _lib._objc_msgSend_384(_id, _lib._sel_setPriority_1, value); - } + @ffi.Uint64() + external int ri_pageins; - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. - /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - bool get prefersIncrementalDelivery { - return _lib._objc_msgSend_11(_id, _lib._sel_prefersIncrementalDelivery1); - } + @ffi.Uint64() + external int ri_wired_size; - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. - /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - set prefersIncrementalDelivery(bool value) { - _lib._objc_msgSend_332( - _id, _lib._sel_setPrefersIncrementalDelivery_1, value); - } + @ffi.Uint64() + external int ri_resident_size; - @override - NSURLSessionTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTask._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_phys_footprint; - static NSURLSessionTask new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); - } -} + @ffi.Uint64() + external int ri_proc_exit_abstime; -class NSURLResponse extends NSObject { - NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Uint64() + external int ri_child_user_time; - /// Returns a [NSURLResponse] that points to the same underlying object as [other]. - static NSURLResponse castFrom(T other) { - return NSURLResponse._(other._id, other._lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_system_time; - /// Returns a [NSURLResponse] that wraps the given raw object pointer. - static NSURLResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLResponse._(other, lib, retain: retain, release: release); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - /// Returns whether [obj] is an instance of [NSURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - /// ! - /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: - /// @abstract Initialize an NSURLResponse with the provided values. - /// @param URL the URL - /// @param MIMEType the MIME content type of the response - /// @param length the expected content length of the associated data - /// @param name the name of the text encoding for the associated data, if applicable, else nil - /// @result The initialized NSURLResponse. - /// @discussion This is the designated initializer for NSURLResponse. - NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - NSURL? URL, NSString? MIMEType, int length, NSString? name) { - final _ret = _lib._objc_msgSend_378( - _id, - _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, - URL?._id ?? ffi.nullptr, - MIMEType?._id ?? ffi.nullptr, - length, - name?._id ?? ffi.nullptr); - return NSURLResponse._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pageins; - /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - /// ! - /// @abstract Returns the MIME type of the receiver. - /// @discussion The MIME type is based on the information provided - /// from an origin source. However, that value may be changed or - /// corrected by a protocol implementation if it can be determined - /// that the origin server or source reported the information - /// incorrectly or imprecisely. An attempt to guess the MIME type may - /// be made if the origin source did not report any such information. - /// @result The MIME type of the receiver. - NSString? get MIMEType { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_MIMEType1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - /// ! - /// @abstract Returns the expected content length of the receiver. - /// @discussion Some protocol implementations report a content length - /// as part of delivering load metadata, but not all protocols - /// guarantee the amount of data that will be delivered in actuality. - /// Hence, this method returns an expected amount. Clients should use - /// this value as an advisory, and should be prepared to deal with - /// either more or less data. - /// @result The expected content length of the receiver, or -1 if - /// there is no expectation that can be arrived at regarding expected - /// content length. - int get expectedContentLength { - return _lib._objc_msgSend_82(_id, _lib._sel_expectedContentLength1); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - /// ! - /// @abstract Returns the name of the text encoding of the receiver. - /// @discussion This name will be the actual string reported by the - /// origin source during the course of performing a protocol-specific - /// URL load. Clients can inspect this string and convert it to an - /// NSStringEncoding or CFStringEncoding using the methods and - /// functions made available in the appropriate framework. - /// @result The name of the text encoding of the receiver, or nil if no - /// text encoding was specified. - NSString? get textEncodingName { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_textEncodingName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_default; - /// ! - /// @abstract Returns a suggested filename if the resource were saved to disk. - /// @discussion The method first checks if the server has specified a filename using the - /// content disposition header. If no valid filename is specified using that mechanism, - /// this method checks the last path component of the URL. If no valid filename can be - /// obtained using the last path component, this method uses the URL's host as the filename. - /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. - /// In most cases, this method appends the proper file extension based on the MIME type. - /// This method always returns a valid filename. - /// @result A suggested filename to use if saving the resource to disk. - NSString? get suggestedFilename { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedFilename1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - static NSURLResponse new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_background; - static NSURLResponse alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; + + @ffi.Uint64() + external int ri_logical_writes; + + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; + + @ffi.Uint64() + external int ri_instructions; + + @ffi.Uint64() + external int ri_cycles; + + @ffi.Uint64() + external int ri_billed_energy; + + @ffi.Uint64() + external int ri_serviced_energy; + + @ffi.Uint64() + external int ri_interval_max_phys_footprint; + + @ffi.Uint64() + external int ri_runnable_time; } -abstract class NSURLSessionTaskState { - /// The task is currently being serviced by the session - static const int NSURLSessionTaskStateRunning = 0; - static const int NSURLSessionTaskStateSuspended = 1; +class rusage_info_v5 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. - static const int NSURLSessionTaskStateCanceling = 2; + @ffi.Uint64() + external int ri_user_time; - /// The task has completed and the session will receive no more delegate notifications - static const int NSURLSessionTaskStateCompleted = 3; + @ffi.Uint64() + external int ri_system_time; + + @ffi.Uint64() + external int ri_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_interrupt_wkups; + + @ffi.Uint64() + external int ri_pageins; + + @ffi.Uint64() + external int ri_wired_size; + + @ffi.Uint64() + external int ri_resident_size; + + @ffi.Uint64() + external int ri_phys_footprint; + + @ffi.Uint64() + external int ri_proc_start_abstime; + + @ffi.Uint64() + external int ri_proc_exit_abstime; + + @ffi.Uint64() + external int ri_child_user_time; + + @ffi.Uint64() + external int ri_child_system_time; + + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; + + @ffi.Uint64() + external int ri_child_interrupt_wkups; + + @ffi.Uint64() + external int ri_child_pageins; + + @ffi.Uint64() + external int ri_child_elapsed_abstime; + + @ffi.Uint64() + external int ri_diskio_bytesread; + + @ffi.Uint64() + external int ri_diskio_byteswritten; + + @ffi.Uint64() + external int ri_cpu_time_qos_default; + + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; + + @ffi.Uint64() + external int ri_cpu_time_qos_background; + + @ffi.Uint64() + external int ri_cpu_time_qos_utility; + + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; + + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; + + @ffi.Uint64() + external int ri_billed_system_time; + + @ffi.Uint64() + external int ri_serviced_system_time; + + @ffi.Uint64() + external int ri_logical_writes; + + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; + + @ffi.Uint64() + external int ri_instructions; + + @ffi.Uint64() + external int ri_cycles; + + @ffi.Uint64() + external int ri_billed_energy; + + @ffi.Uint64() + external int ri_serviced_energy; + + @ffi.Uint64() + external int ri_interval_max_phys_footprint; + + @ffi.Uint64() + external int ri_runnable_time; + + @ffi.Uint64() + external int ri_flags; } -void _ObjCBlock20_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { +class rlimit extends ffi.Struct { + @rlim_t() + external int rlim_cur; + + @rlim_t() + external int rlim_max; +} + +typedef rlim_t = __uint64_t; + +class proc_rlimit_control_wakeupmon extends ffi.Struct { + @ffi.Uint32() + external int wm_flags; + + @ffi.Int32() + external int wm_rate; +} + +typedef id_t = __darwin_id_t; +typedef __darwin_id_t = __uint32_t; + +class wait extends ffi.Opaque {} + +class div_t extends ffi.Struct { + @ffi.Int() + external int quot; + + @ffi.Int() + external int rem; +} + +class ldiv_t extends ffi.Struct { + @ffi.Long() + external int quot; + + @ffi.Long() + external int rem; +} + +class lldiv_t extends ffi.Struct { + @ffi.LongLong() + external int quot; + + @ffi.LongLong() + external int rem; +} + +int _ObjCBlock20_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { return block.ref.target .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); } final _ObjCBlock20_closureRegistry = {}; @@ -70754,9 +70429,9 @@ ffi.Pointer _ObjCBlock20_registerClosure(Function fn) { return ffi.Pointer.fromAddress(id); } -void _ObjCBlock20_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock20_closureRegistry[block.ref.target.address]!(arg0); +int _ObjCBlock20_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock20_closureRegistry[block.ref.target.address]!(arg0, arg1); } class ObjCBlock20 extends _ObjCBlockBase { @@ -70768,599 +70443,221 @@ class ObjCBlock20 extends _ObjCBlockBase { NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi.Int Function( + ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock20_fnPtrTrampoline) + ffi.Int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock20_fnPtrTrampoline, 0) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock20.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + ObjCBlock20.fromFunction(NativeCupertinoHttp lib, + int Function(ffi.Pointer arg0, ffi.Pointer arg1) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock20_closureTrampoline) + ffi.Int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock20_closureTrampoline, 0) .cast(), _ObjCBlock20_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { + int call(ffi.Pointer arg0, ffi.Pointer arg1) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() + ffi.Int Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); + int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } ffi.Pointer<_ObjCBlock> get pointer => _id; } -class CFArrayCallBacks extends ffi.Struct { - @CFIndex() - external int version; - - external CFArrayRetainCallBack retain; - - external CFArrayReleaseCallBack release; +typedef dev_t = __darwin_dev_t; +typedef __darwin_dev_t = __int32_t; +typedef mode_t = __darwin_mode_t; +typedef __darwin_mode_t = __uint16_t; +typedef __uint16_t = ffi.UnsignedShort; +typedef errno_t = ffi.Int; +typedef rsize_t = __darwin_size_t; - external CFArrayCopyDescriptionCallBack copyDescription; +class timespec extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; - external CFArrayEqualCallBack equal; + @ffi.Long() + external int tv_nsec; } -typedef CFArrayRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFArrayReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFArrayCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFArrayEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>>; - -class __CFArray extends ffi.Opaque {} - -typedef CFArrayRef = ffi.Pointer<__CFArray>; -typedef CFMutableArrayRef = ffi.Pointer<__CFArray>; -typedef CFArrayApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFComparatorFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>; - -class OS_object extends NSObject { - OS_object._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [OS_object] that points to the same underlying object as [other]. - static OS_object castFrom(T other) { - return OS_object._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [OS_object] that wraps the given raw object pointer. - static OS_object castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return OS_object._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [OS_object]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_OS_object1); - } - - @override - OS_object init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_object._(_ret, _lib, retain: true, release: true); - } - - static OS_object new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_new1); - return OS_object._(_ret, _lib, retain: false, release: true); - } +class tm extends ffi.Struct { + @ffi.Int() + external int tm_sec; - static OS_object alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_alloc1); - return OS_object._(_ret, _lib, retain: false, release: true); - } -} + @ffi.Int() + external int tm_min; -class __SecCertificate extends ffi.Opaque {} + @ffi.Int() + external int tm_hour; -class __SecIdentity extends ffi.Opaque {} + @ffi.Int() + external int tm_mday; -class __SecKey extends ffi.Opaque {} + @ffi.Int() + external int tm_mon; -class __SecPolicy extends ffi.Opaque {} + @ffi.Int() + external int tm_year; -class __SecAccessControl extends ffi.Opaque {} + @ffi.Int() + external int tm_wday; -class __SecKeychain extends ffi.Opaque {} + @ffi.Int() + external int tm_yday; -class __SecKeychainItem extends ffi.Opaque {} + @ffi.Int() + external int tm_isdst; -class __SecKeychainSearch extends ffi.Opaque {} + @ffi.Long() + external int tm_gmtoff; -class SecKeychainAttribute extends ffi.Struct { - @SecKeychainAttrType() - external int tag; + external ffi.Pointer tm_zone; +} - @UInt32() - external int length; +typedef clock_t = __darwin_clock_t; +typedef __darwin_clock_t = ffi.UnsignedLong; +typedef time_t = __darwin_time_t; - external ffi.Pointer data; +abstract class clockid_t { + static const int _CLOCK_REALTIME = 0; + static const int _CLOCK_MONOTONIC = 6; + static const int _CLOCK_MONOTONIC_RAW = 4; + static const int _CLOCK_MONOTONIC_RAW_APPROX = 5; + static const int _CLOCK_UPTIME_RAW = 8; + static const int _CLOCK_UPTIME_RAW_APPROX = 9; + static const int _CLOCK_PROCESS_CPUTIME_ID = 12; + static const int _CLOCK_THREAD_CPUTIME_ID = 16; } -typedef SecKeychainAttrType = OSType; -typedef OSType = FourCharCode; -typedef FourCharCode = UInt32; +typedef intmax_t = ffi.Long; -class SecKeychainAttributeList extends ffi.Struct { - @UInt32() - external int count; +class imaxdiv_t extends ffi.Struct { + @intmax_t() + external int quot; - external ffi.Pointer attr; + @intmax_t() + external int rem; } -class __SecTrustedApplication extends ffi.Opaque {} +typedef uintmax_t = ffi.UnsignedLong; -class __SecAccess extends ffi.Opaque {} +class CFBagCallBacks extends ffi.Struct { + @CFIndex() + external int version; -class __SecACL extends ffi.Opaque {} + external CFBagRetainCallBack retain; -class __SecPassword extends ffi.Opaque {} + external CFBagReleaseCallBack release; -class SecKeychainAttributeInfo extends ffi.Struct { - @UInt32() - external int count; + external CFBagCopyDescriptionCallBack copyDescription; - external ffi.Pointer tag; + external CFBagEqualCallBack equal; - external ffi.Pointer format; + external CFBagHashCallBack hash; } -typedef OSStatus = SInt32; - -class _RuneEntry extends ffi.Struct { - @__darwin_rune_t() - external int __min; - - @__darwin_rune_t() - external int __max; +typedef CFBagRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFBagReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; +typedef CFBagCopyDescriptionCallBack = ffi + .Pointer)>>; +typedef CFBagEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(ffi.Pointer, ffi.Pointer)>>; +typedef CFBagHashCallBack = ffi + .Pointer)>>; - @__darwin_rune_t() - external int __map; +class __CFBag extends ffi.Opaque {} - external ffi.Pointer<__uint32_t> __types; -} +typedef CFBagRef = ffi.Pointer<__CFBag>; +typedef CFMutableBagRef = ffi.Pointer<__CFBag>; +typedef CFBagApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef __darwin_rune_t = __darwin_wchar_t; -typedef __darwin_wchar_t = ffi.Int; +class CFBinaryHeapCompareContext extends ffi.Struct { + @CFIndex() + external int version; -class _RuneRange extends ffi.Struct { - @ffi.Int() - external int __nranges; + external ffi.Pointer info; - external ffi.Pointer<_RuneEntry> __ranges; -} + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> retain; -class _RuneCharClass extends ffi.Struct { - @ffi.Array.multi([14]) - external ffi.Array __name; + external ffi + .Pointer)>> + release; - @__uint32_t() - external int __mask; + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; } -class _RuneLocale extends ffi.Struct { - @ffi.Array.multi([8]) - external ffi.Array __magic; - - @ffi.Array.multi([32]) - external ffi.Array __encoding; +class CFBinaryHeapCallBacks extends ffi.Struct { + @CFIndex() + external int version; external ffi.Pointer< ffi.NativeFunction< - __darwin_rune_t Function(ffi.Pointer, __darwin_size_t, - ffi.Pointer>)>> __sgetrune; + ffi.Pointer Function( + CFAllocatorRef, ffi.Pointer)>> retain; external ffi.Pointer< ffi.NativeFunction< - ffi.Int Function(__darwin_rune_t, ffi.Pointer, - __darwin_size_t, ffi.Pointer>)>> __sputrune; - - @__darwin_rune_t() - external int __invalid_rune; + ffi.Void Function(CFAllocatorRef, ffi.Pointer)>> release; - @ffi.Array.multi([256]) - external ffi.Array<__uint32_t> __runetype; + external ffi.Pointer< + ffi.NativeFunction)>> + copyDescription; - @ffi.Array.multi([256]) - external ffi.Array<__darwin_rune_t> __maplower; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> compare; +} - @ffi.Array.multi([256]) - external ffi.Array<__darwin_rune_t> __mapupper; +class __CFBinaryHeap extends ffi.Opaque {} - external _RuneRange __runetype_ext; +typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; +typedef CFBinaryHeapApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; - external _RuneRange __maplower_ext; +class __CFBitVector extends ffi.Opaque {} - external _RuneRange __mapupper_ext; - - external ffi.Pointer __variable; - - @ffi.Int() - external int __variable_len; - - @ffi.Int() - external int __ncharclasses; - - external ffi.Pointer<_RuneCharClass> __charclasses; -} - -typedef __darwin_ct_rune_t = ffi.Int; - -class lconv extends ffi.Struct { - external ffi.Pointer decimal_point; - - external ffi.Pointer thousands_sep; - - external ffi.Pointer grouping; - - external ffi.Pointer int_curr_symbol; - - external ffi.Pointer currency_symbol; - - external ffi.Pointer mon_decimal_point; - - external ffi.Pointer mon_thousands_sep; - - external ffi.Pointer mon_grouping; - - external ffi.Pointer positive_sign; - - external ffi.Pointer negative_sign; - - @ffi.Char() - external int int_frac_digits; - - @ffi.Char() - external int frac_digits; - - @ffi.Char() - external int p_cs_precedes; - - @ffi.Char() - external int p_sep_by_space; - - @ffi.Char() - external int n_cs_precedes; - - @ffi.Char() - external int n_sep_by_space; - - @ffi.Char() - external int p_sign_posn; - - @ffi.Char() - external int n_sign_posn; - - @ffi.Char() - external int int_p_cs_precedes; - - @ffi.Char() - external int int_n_cs_precedes; - - @ffi.Char() - external int int_p_sep_by_space; - - @ffi.Char() - external int int_n_sep_by_space; - - @ffi.Char() - external int int_p_sign_posn; - - @ffi.Char() - external int int_n_sign_posn; -} - -class __float2 extends ffi.Struct { - @ffi.Float() - external double __sinval; - - @ffi.Float() - external double __cosval; -} - -class __double2 extends ffi.Struct { - @ffi.Double() - external double __sinval; - - @ffi.Double() - external double __cosval; -} - -class exception extends ffi.Struct { - @ffi.Int() - external int type; - - external ffi.Pointer name; - - @ffi.Double() - external double arg1; - - @ffi.Double() - external double arg2; - - @ffi.Double() - external double retval; -} - -typedef pthread_t = __darwin_pthread_t; -typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; -typedef stack_t = __darwin_sigaltstack; - -class __sbuf extends ffi.Struct { - external ffi.Pointer _base; - - @ffi.Int() - external int _size; -} - -class __sFILEX extends ffi.Opaque {} - -class __sFILE extends ffi.Struct { - external ffi.Pointer _p; - - @ffi.Int() - external int _r; - - @ffi.Int() - external int _w; - - @ffi.Short() - external int _flags; - - @ffi.Short() - external int _file; - - external __sbuf _bf; - - @ffi.Int() - external int _lbfsize; - - external ffi.Pointer _cookie; - - external ffi - .Pointer)>> - _close; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> _read; - - external ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> _seek; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> _write; - - external __sbuf _ub; - - external ffi.Pointer<__sFILEX> _extra; - - @ffi.Int() - external int _ur; - - @ffi.Array.multi([3]) - external ffi.Array _ubuf; - - @ffi.Array.multi([1]) - external ffi.Array _nbuf; - - external __sbuf _lb; - - @ffi.Int() - external int _blksize; - - @fpos_t() - external int _offset; -} - -typedef fpos_t = __darwin_off_t; -typedef __darwin_off_t = __int64_t; -typedef __int64_t = ffi.LongLong; -typedef FILE = __sFILE; -typedef off_t = __darwin_off_t; -typedef ssize_t = __darwin_ssize_t; -typedef __darwin_ssize_t = ffi.Long; -typedef errno_t = ffi.Int; -typedef rsize_t = ffi.UnsignedLong; - -class timespec extends ffi.Struct { - @__darwin_time_t() - external int tv_sec; - - @ffi.Long() - external int tv_nsec; -} - -class tm extends ffi.Struct { - @ffi.Int() - external int tm_sec; - - @ffi.Int() - external int tm_min; - - @ffi.Int() - external int tm_hour; - - @ffi.Int() - external int tm_mday; - - @ffi.Int() - external int tm_mon; - - @ffi.Int() - external int tm_year; - - @ffi.Int() - external int tm_wday; - - @ffi.Int() - external int tm_yday; - - @ffi.Int() - external int tm_isdst; - - @ffi.Long() - external int tm_gmtoff; - - external ffi.Pointer tm_zone; -} - -typedef clock_t = __darwin_clock_t; -typedef __darwin_clock_t = ffi.UnsignedLong; -typedef time_t = __darwin_time_t; - -abstract class clockid_t { - static const int _CLOCK_REALTIME = 0; - static const int _CLOCK_MONOTONIC = 6; - static const int _CLOCK_MONOTONIC_RAW = 4; - static const int _CLOCK_MONOTONIC_RAW_APPROX = 5; - static const int _CLOCK_UPTIME_RAW = 8; - static const int _CLOCK_UPTIME_RAW_APPROX = 9; - static const int _CLOCK_PROCESS_CPUTIME_ID = 12; - static const int _CLOCK_THREAD_CPUTIME_ID = 16; -} - -typedef intmax_t = ffi.Long; - -class imaxdiv_t extends ffi.Struct { - @intmax_t() - external int quot; - - @intmax_t() - external int rem; -} - -typedef uintmax_t = ffi.UnsignedLong; - -class CFBagCallBacks extends ffi.Struct { - @CFIndex() - external int version; - - external CFBagRetainCallBack retain; - - external CFBagReleaseCallBack release; - - external CFBagCopyDescriptionCallBack copyDescription; - - external CFBagEqualCallBack equal; - - external CFBagHashCallBack hash; -} - -typedef CFBagRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFBagReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFBagCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFBagEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFBagHashCallBack = ffi - .Pointer)>>; - -class __CFBag extends ffi.Opaque {} - -typedef CFBagRef = ffi.Pointer<__CFBag>; -typedef CFMutableBagRef = ffi.Pointer<__CFBag>; -typedef CFBagApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; - -class CFBinaryHeapCompareContext extends ffi.Struct { - @CFIndex() - external int version; - - external ffi.Pointer info; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; - - external ffi - .Pointer)>> - release; - - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} - -class CFBinaryHeapCallBacks extends ffi.Struct { - @CFIndex() - external int version; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef, ffi.Pointer)>> retain; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>> release; - - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>> compare; -} - -class __CFBinaryHeap extends ffi.Opaque {} - -typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; -typedef CFBinaryHeapApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; - -class __CFBitVector extends ffi.Opaque {} - -typedef CFBitVectorRef = ffi.Pointer<__CFBitVector>; -typedef CFMutableBitVectorRef = ffi.Pointer<__CFBitVector>; -typedef CFBit = UInt32; +typedef CFBitVectorRef = ffi.Pointer<__CFBitVector>; +typedef CFMutableBitVectorRef = ffi.Pointer<__CFBitVector>; +typedef CFBit = UInt32; abstract class __CFByteOrder { static const int CFByteOrderUnknown = 0; @@ -71559,11 +70856,6 @@ typedef CFCharacterSetRef = ffi.Pointer<__CFCharacterSet>; typedef CFMutableCharacterSetRef = ffi.Pointer<__CFCharacterSet>; typedef UniChar = UInt16; -class __CFError extends ffi.Opaque {} - -typedef CFErrorDomain = CFStringRef; -typedef CFErrorRef = ffi.Pointer<__CFError>; - abstract class CFStringBuiltInEncodings { static const int kCFStringEncodingMacRoman = 0; static const int kCFStringEncodingWindowsLatin1 = 1280; @@ -71654,77 +70946,6 @@ abstract class CFCalendarUnit { static const int kCFCalendarUnitYearForWeekOfYear = 16384; } -class CGPoint extends ffi.Struct { - @CGFloat() - external double x; - - @CGFloat() - external double y; -} - -typedef CGFloat = ffi.Double; - -class CGSize extends ffi.Struct { - @CGFloat() - external double width; - - @CGFloat() - external double height; -} - -class CGVector extends ffi.Struct { - @CGFloat() - external double dx; - - @CGFloat() - external double dy; -} - -class CGRect extends ffi.Struct { - external CGPoint origin; - - external CGSize size; -} - -abstract class CGRectEdge { - static const int CGRectMinXEdge = 0; - static const int CGRectMinYEdge = 1; - static const int CGRectMaxXEdge = 2; - static const int CGRectMaxYEdge = 3; -} - -class CGAffineTransform extends ffi.Struct { - @CGFloat() - external double a; - - @CGFloat() - external double b; - - @CGFloat() - external double c; - - @CGFloat() - external double d; - - @CGFloat() - external double tx; - - @CGFloat() - external double ty; -} - -class CGAffineTransformComponents extends ffi.Struct { - external CGSize scale; - - @CGFloat() - external double horizontalShear; - - @CGFloat() - external double rotation; - - external CGVector translation; -} - class __CFDateFormatter extends ffi.Opaque {} abstract class CFDateFormatterStyle { @@ -71755,6 +70976,11 @@ abstract class CFISO8601DateFormatOptions { typedef CFDateFormatterRef = ffi.Pointer<__CFDateFormatter>; typedef CFDateFormatterKey = CFStringRef; +class __CFError extends ffi.Opaque {} + +typedef CFErrorDomain = CFStringRef; +typedef CFErrorRef = ffi.Pointer<__CFError>; + class __CFBoolean extends ffi.Opaque {} typedef CFBooleanRef = ffi.Pointer<__CFBoolean>; @@ -71952,32 +71178,13 @@ class mach_port_options extends ffi.Struct { external int flags; external mach_port_limits_t mpl; - - external UnnamedUnion1 unnamed; } typedef mach_port_limits_t = mach_port_limits; -class UnnamedUnion1 extends ffi.Union { - @ffi.Array.multi([2]) - external ffi.Array reserved; - - @mach_port_name_t() - external int work_interval_port; - - external mach_service_port_info_t service_port_info; - - @mach_port_name_t() - external int service_port_name; -} - -typedef mach_port_name_t = natural_t; -typedef mach_service_port_info_t = ffi.Pointer; - abstract class mach_port_guard_exception_codes { static const int kGUARD_EXC_DESTROY = 1; static const int kGUARD_EXC_MOD_REFS = 2; - static const int kGUARD_EXC_INVALID_OPTIONS = 3; static const int kGUARD_EXC_SET_CONTEXT = 4; static const int kGUARD_EXC_UNGUARDED = 8; static const int kGUARD_EXC_INCORRECT_GUARD = 16; @@ -71999,7 +71206,6 @@ abstract class mach_port_guard_exception_codes { static const int kGUARD_EXC_RCV_GUARDED_DESC = 1048576; static const int kGUARD_EXC_MOD_REFS_NON_FATAL = 2097152; static const int kGUARD_EXC_IMMOVABLE_NON_FATAL = 4194304; - static const int kGUARD_EXC_REQUIRE_REPLY_PORT_SEMANTICS = 8388608; } class __CFRunLoop extends ffi.Opaque {} @@ -72514,6 +71720,16 @@ class fspecread extends ffi.Struct { external int fsr_length; } +class fbootstraptransfer extends ffi.Struct { + @off_t() + external int fbt_offset; + + @ffi.Size() + external int fbt_length; + + external ffi.Pointer fbt_buffer; +} + @ffi.Packed(4) class log2phys extends ffi.Struct { @ffi.UnsignedInt() @@ -72818,6 +72034,7 @@ class ObjCBlock23 extends _ObjCBlockBase { class dispatch_queue_s extends ffi.Opaque {} typedef dispatch_queue_global_t = ffi.Pointer; +typedef uintptr_t = ffi.UnsignedLong; class dispatch_queue_attr_s extends ffi.Opaque {} @@ -72890,6 +72107,7 @@ class mach_msg_header_t extends ffi.Struct { } typedef mach_msg_bits_t = ffi.UnsignedInt; +typedef mach_port_name_t = natural_t; typedef mach_msg_id_t = integer_t; class mach_msg_base_t extends ffi.Struct { @@ -72978,7 +72196,7 @@ class mach_msg_context_trailer_t extends ffi.Struct { } typedef mach_port_context_t = vm_offset_t; -typedef vm_offset_t = ffi.UintPtr; +typedef vm_offset_t = uintptr_t; class msg_labels_t extends ffi.Struct { @mach_port_name_t() @@ -74539,13 +73757,13 @@ class cssm_list_element extends ffi.Struct { @CSSM_LIST_ELEMENT_TYPE() external int ElementType; - external UnnamedUnion2 Element; + external UnnamedUnion1 Element; } typedef CSSM_WORDID_TYPE = sint32; typedef CSSM_LIST_ELEMENT_TYPE = uint32; -class UnnamedUnion2 extends ffi.Union { +class UnnamedUnion1 extends ffi.Union { external CSSM_LIST Sublist; external SecAsn1Item Word; @@ -74678,7 +73896,7 @@ class cssm_certgroup extends ffi.Struct { @uint32() external int NumCerts; - external UnnamedUnion3 GroupList; + external UnnamedUnion2 GroupList; @CSSM_CERTGROUP_TYPE() external int CertGroupType; @@ -74686,7 +73904,7 @@ class cssm_certgroup extends ffi.Struct { external ffi.Pointer Reserved; } -class UnnamedUnion3 extends ffi.Union { +class UnnamedUnion2 extends ffi.Union { external CSSM_DATA_PTR CertList; external CSSM_ENCODED_CERT_PTR EncodedCertList; @@ -75200,13 +74418,13 @@ class cssm_crlgroup extends ffi.Struct { @uint32() external int NumberOfCrls; - external UnnamedUnion4 GroupCrlList; + external UnnamedUnion3 GroupCrlList; @CSSM_CRLGROUP_TYPE() external int CrlGroupType; } -class UnnamedUnion4 extends ffi.Union { +class UnnamedUnion3 extends ffi.Union { external CSSM_DATA_PTR CrlList; external CSSM_ENCODED_CRL_PTR EncodedCrlList; @@ -76020,10 +75238,10 @@ class __CE_DistributionPointName extends ffi.Struct { @ffi.Int32() external int nameType; - external UnnamedUnion5 dpn; + external UnnamedUnion4 dpn; } -class UnnamedUnion5 extends ffi.Union { +class UnnamedUnion4 extends ffi.Union { external ffi.Pointer fullName; external CSSM_X509_RDN_PTR rdn; @@ -77319,7 +76537,7 @@ abstract class SSLAuthenticate { /// server authentication or determining whether a resource to be loaded /// should be converted into a download. /// -/// NSURLSession instances are thread-safe. +/// NSURLSession instances are threadsafe. /// /// The default NSURLSession uses a system provided delegate and is /// appropriate to use in place of existing code that uses @@ -77394,7 +76612,7 @@ class NSURLSession extends NSObject { /// The shared session uses the currently set global NSURLCache, /// NSHTTPCookieStorage and NSURLCredentialStorage objects. static NSURLSession? getSharedSession(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_387( + final _ret = _lib._objc_msgSend_380( _lib._class_NSURLSession1, _lib._sel_sharedSession1); return _ret.address == 0 ? null @@ -77408,7 +76626,7 @@ class NSURLSession extends NSObject { /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. static NSURLSession sessionWithConfiguration_( NativeCupertinoHttp _lib, NSURLSessionConfiguration? configuration) { - final _ret = _lib._objc_msgSend_402( + final _ret = _lib._objc_msgSend_395( _lib._class_NSURLSession1, _lib._sel_sessionWithConfiguration_1, configuration?._id ?? ffi.nullptr); @@ -77420,7 +76638,7 @@ class NSURLSession extends NSObject { NSURLSessionConfiguration? configuration, NSObject? delegate, NSOperationQueue? queue) { - final _ret = _lib._objc_msgSend_403( + final _ret = _lib._objc_msgSend_396( _lib._class_NSURLSession1, _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, configuration?._id ?? ffi.nullptr, @@ -77430,7 +76648,7 @@ class NSURLSession extends NSObject { } NSOperationQueue? get delegateQueue { - final _ret = _lib._objc_msgSend_349(_id, _lib._sel_delegateQueue1); + final _ret = _lib._objc_msgSend_345(_id, _lib._sel_delegateQueue1); return _ret.address == 0 ? null : NSOperationQueue._(_ret, _lib, retain: true, release: true); @@ -77444,7 +76662,7 @@ class NSURLSession extends NSObject { } NSURLSessionConfiguration? get configuration { - final _ret = _lib._objc_msgSend_388(_id, _lib._sel_configuration1); + final _ret = _lib._objc_msgSend_381(_id, _lib._sel_configuration1); return _ret.address == 0 ? null : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); @@ -77462,7 +76680,7 @@ class NSURLSession extends NSObject { /// The sessionDescription property is available for the developer to /// provide a descriptive label for the session. set sessionDescription(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_327( _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); } @@ -77489,40 +76707,40 @@ class NSURLSession extends NSObject { return _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); } - /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue. - void resetWithCompletionHandler_(ObjCBlock completionHandler) { - return _lib._objc_msgSend_345( + /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue if not nil. + void resetWithCompletionHandler_(ObjCBlock16 completionHandler) { + return _lib._objc_msgSend_341( _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); } - /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue. - void flushWithCompletionHandler_(ObjCBlock completionHandler) { - return _lib._objc_msgSend_345( + /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue if not nil. + void flushWithCompletionHandler_(ObjCBlock16 completionHandler) { + return _lib._objc_msgSend_341( _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); } /// invokes completionHandler with outstanding data, upload and download tasks. void getTasksWithCompletionHandler_(ObjCBlock38 completionHandler) { - return _lib._objc_msgSend_404( + return _lib._objc_msgSend_397( _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); } /// invokes completionHandler with all outstanding tasks. - void getAllTasksWithCompletionHandler_(ObjCBlock20 completionHandler) { - return _lib._objc_msgSend_405(_id, + void getAllTasksWithCompletionHandler_(ObjCBlock19 completionHandler) { + return _lib._objc_msgSend_398(_id, _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._id); } /// Creates a data task with the given request. The request may have a body stream. NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_406( + final _ret = _lib._objc_msgSend_399( _id, _lib._sel_dataTaskWithRequest_1, request?._id ?? ffi.nullptr); return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } /// Creates a data task to retrieve the contents of the given URL. NSURLSessionDataTask dataTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_407( + final _ret = _lib._objc_msgSend_400( _id, _lib._sel_dataTaskWithURL_1, url?._id ?? ffi.nullptr); return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } @@ -77530,7 +76748,7 @@ class NSURLSession extends NSObject { /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( NSURLRequest? request, NSURL? fileURL) { - final _ret = _lib._objc_msgSend_408( + final _ret = _lib._objc_msgSend_401( _id, _lib._sel_uploadTaskWithRequest_fromFile_1, request?._id ?? ffi.nullptr, @@ -77541,7 +76759,7 @@ class NSURLSession extends NSObject { /// Creates an upload task with the given request. The body of the request is provided from the bodyData. NSURLSessionUploadTask uploadTaskWithRequest_fromData_( NSURLRequest? request, NSData? bodyData) { - final _ret = _lib._objc_msgSend_409( + final _ret = _lib._objc_msgSend_402( _id, _lib._sel_uploadTaskWithRequest_fromData_1, request?._id ?? ffi.nullptr, @@ -77551,28 +76769,28 @@ class NSURLSession extends NSObject { /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_410(_id, + final _ret = _lib._objc_msgSend_403(_id, _lib._sel_uploadTaskWithStreamedRequest_1, request?._id ?? ffi.nullptr); return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } /// Creates a download task with the given request. NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_412( + final _ret = _lib._objc_msgSend_405( _id, _lib._sel_downloadTaskWithRequest_1, request?._id ?? ffi.nullptr); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } /// Creates a download task to download the contents of the given URL. NSURLSessionDownloadTask downloadTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_413( + final _ret = _lib._objc_msgSend_406( _id, _lib._sel_downloadTaskWithURL_1, url?._id ?? ffi.nullptr); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData? resumeData) { - final _ret = _lib._objc_msgSend_414(_id, + final _ret = _lib._objc_msgSend_407(_id, _lib._sel_downloadTaskWithResumeData_1, resumeData?._id ?? ffi.nullptr); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } @@ -77580,7 +76798,7 @@ class NSURLSession extends NSObject { /// Creates a bidirectional stream task to a given host and port. NSURLSessionStreamTask streamTaskWithHostName_port_( NSString? hostname, int port) { - final _ret = _lib._objc_msgSend_417( + final _ret = _lib._objc_msgSend_410( _id, _lib._sel_streamTaskWithHostName_port_1, hostname?._id ?? ffi.nullptr, @@ -77591,24 +76809,24 @@ class NSURLSession extends NSObject { /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. /// The NSNetService will be resolved before any IO completes. NSURLSessionStreamTask streamTaskWithNetService_(NSNetService? service) { - final _ret = _lib._objc_msgSend_418( + final _ret = _lib._objc_msgSend_411( _id, _lib._sel_streamTaskWithNetService_1, service?._id ?? ffi.nullptr); return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); } /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_425( + final _ret = _lib._objc_msgSend_418( _id, _lib._sel_webSocketTaskWithURL_1, url?._id ?? ffi.nullptr); return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } /// Creates a WebSocket task given the url and an array of protocols. The protocols will be used in the WebSocket handshake to - /// negotiate a preferred protocol with the server + /// negotiate a prefered protocol with the server /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( NSURL? url, NSArray? protocols) { - final _ret = _lib._objc_msgSend_426( + final _ret = _lib._objc_msgSend_419( _id, _lib._sel_webSocketTaskWithURL_protocols_1, url?._id ?? ffi.nullptr, @@ -77620,7 +76838,7 @@ class NSURLSession extends NSObject { /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_427( + final _ret = _lib._objc_msgSend_420( _id, _lib._sel_webSocketTaskWithRequest_1, request?._id ?? ffi.nullptr); return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } @@ -77645,7 +76863,7 @@ class NSURLSession extends NSObject { /// called for authentication challenges. NSURLSessionDataTask dataTaskWithRequest_completionHandler_( NSURLRequest? request, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_428( + final _ret = _lib._objc_msgSend_421( _id, _lib._sel_dataTaskWithRequest_completionHandler_1, request?._id ?? ffi.nullptr, @@ -77655,7 +76873,7 @@ class NSURLSession extends NSObject { NSURLSessionDataTask dataTaskWithURL_completionHandler_( NSURL? url, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_429( + final _ret = _lib._objc_msgSend_422( _id, _lib._sel_dataTaskWithURL_completionHandler_1, url?._id ?? ffi.nullptr, @@ -77666,7 +76884,7 @@ class NSURLSession extends NSObject { /// upload convenience method. NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( NSURLRequest? request, NSURL? fileURL, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_430( + final _ret = _lib._objc_msgSend_423( _id, _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, request?._id ?? ffi.nullptr, @@ -77677,7 +76895,7 @@ class NSURLSession extends NSObject { NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( NSURLRequest? request, NSData? bodyData, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_431( + final _ret = _lib._objc_msgSend_424( _id, _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, request?._id ?? ffi.nullptr, @@ -77692,7 +76910,7 @@ class NSURLSession extends NSObject { /// will be removed automatically. NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( NSURLRequest? request, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_432( + final _ret = _lib._objc_msgSend_425( _id, _lib._sel_downloadTaskWithRequest_completionHandler_1, request?._id ?? ffi.nullptr, @@ -77702,7 +76920,7 @@ class NSURLSession extends NSObject { NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( NSURL? url, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_433( + final _ret = _lib._objc_msgSend_426( _id, _lib._sel_downloadTaskWithURL_completionHandler_1, url?._id ?? ffi.nullptr, @@ -77712,7 +76930,7 @@ class NSURLSession extends NSObject { NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( NSData? resumeData, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_434( + final _ret = _lib._objc_msgSend_427( _id, _lib._sel_downloadTaskWithResumeData_completionHandler_1, resumeData?._id ?? ffi.nullptr, @@ -77767,7 +76985,7 @@ class NSURLSessionConfiguration extends NSObject { static NSURLSessionConfiguration? getDefaultSessionConfiguration( NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_388(_lib._class_NSURLSessionConfiguration1, + final _ret = _lib._objc_msgSend_381(_lib._class_NSURLSessionConfiguration1, _lib._sel_defaultSessionConfiguration1); return _ret.address == 0 ? null @@ -77776,7 +76994,7 @@ class NSURLSessionConfiguration extends NSObject { static NSURLSessionConfiguration? getEphemeralSessionConfiguration( NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_388(_lib._class_NSURLSessionConfiguration1, + final _ret = _lib._objc_msgSend_381(_lib._class_NSURLSessionConfiguration1, _lib._sel_ephemeralSessionConfiguration1); return _ret.address == 0 ? null @@ -77786,7 +77004,7 @@ class NSURLSessionConfiguration extends NSObject { static NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier_( NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_389( + final _ret = _lib._objc_msgSend_382( _lib._class_NSURLSessionConfiguration1, _lib._sel_backgroundSessionConfigurationWithIdentifier_1, identifier?._id ?? ffi.nullptr); @@ -77803,12 +77021,12 @@ class NSURLSessionConfiguration extends NSObject { /// default cache policy for requests int get requestCachePolicy { - return _lib._objc_msgSend_359(_id, _lib._sel_requestCachePolicy1); + return _lib._objc_msgSend_355(_id, _lib._sel_requestCachePolicy1); } /// default cache policy for requests set requestCachePolicy(int value) { - _lib._objc_msgSend_363(_id, _lib._sel_setRequestCachePolicy_1, value); + _lib._objc_msgSend_358(_id, _lib._sel_setRequestCachePolicy_1, value); } /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. @@ -77818,7 +77036,7 @@ class NSURLSessionConfiguration extends NSObject { /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. set timeoutIntervalForRequest(double value) { - _lib._objc_msgSend_341( + _lib._objc_msgSend_337( _id, _lib._sel_setTimeoutIntervalForRequest_1, value); } @@ -77829,18 +77047,18 @@ class NSURLSessionConfiguration extends NSObject { /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. set timeoutIntervalForResource(double value) { - _lib._objc_msgSend_341( + _lib._objc_msgSend_337( _id, _lib._sel_setTimeoutIntervalForResource_1, value); } /// type of service for requests. int get networkServiceType { - return _lib._objc_msgSend_360(_id, _lib._sel_networkServiceType1); + return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); } /// type of service for requests. set networkServiceType(int value) { - _lib._objc_msgSend_364(_id, _lib._sel_setNetworkServiceType_1, value); + _lib._objc_msgSend_359(_id, _lib._sel_setNetworkServiceType_1, value); } /// allow request to route over cellular. @@ -77850,7 +77068,7 @@ class NSURLSessionConfiguration extends NSObject { /// allow request to route over cellular. set allowsCellularAccess(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setAllowsCellularAccess_1, value); + _lib._objc_msgSend_328(_id, _lib._sel_setAllowsCellularAccess_1, value); } /// allow request to route over expensive networks. Defaults to YES. @@ -77860,7 +77078,7 @@ class NSURLSessionConfiguration extends NSObject { /// allow request to route over expensive networks. Defaults to YES. set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_332( + _lib._objc_msgSend_328( _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); } @@ -77872,20 +77090,10 @@ class NSURLSessionConfiguration extends NSObject { /// allow request to route over networks in constrained mode. Defaults to YES. set allowsConstrainedNetworkAccess(bool value) { - _lib._objc_msgSend_332( + _lib._objc_msgSend_328( _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); } - /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); - } - - /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. - set requiresDNSSECValidation(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setRequiresDNSSECValidation_1, value); - } - /// Causes tasks to wait for network connectivity to become available, rather /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest @@ -77915,7 +77123,7 @@ class NSURLSessionConfiguration extends NSObject { /// Default value is NO. Ignored by background sessions, as background sessions /// always wait for connectivity. set waitsForConnectivity(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setWaitsForConnectivity_1, value); + _lib._objc_msgSend_328(_id, _lib._sel_setWaitsForConnectivity_1, value); } /// allows background tasks to be scheduled at the discretion of the system for optimal performance. @@ -77925,7 +77133,7 @@ class NSURLSessionConfiguration extends NSObject { /// allows background tasks to be scheduled at the discretion of the system for optimal performance. set discretionary(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setDiscretionary_1, value); + _lib._objc_msgSend_328(_id, _lib._sel_setDiscretionary_1, value); } /// The identifier of the shared data container into which files in background sessions should be downloaded. @@ -77943,7 +77151,7 @@ class NSURLSessionConfiguration extends NSObject { /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. set sharedContainerIdentifier(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setSharedContainerIdentifier_1, + _lib._objc_msgSend_327(_id, _lib._sel_setSharedContainerIdentifier_1, value?._id ?? ffi.nullptr); } @@ -77962,7 +77170,7 @@ class NSURLSessionConfiguration extends NSObject { /// /// NOTE: macOS apps based on AppKit do not support background launch. set sessionSendsLaunchEvents(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); + _lib._objc_msgSend_328(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); } /// The proxy dictionary, as described by @@ -77976,53 +77184,53 @@ class NSURLSessionConfiguration extends NSObject { /// The proxy dictionary, as described by set connectionProxyDictionary(NSDictionary? value) { - _lib._objc_msgSend_366(_id, _lib._sel_setConnectionProxyDictionary_1, + _lib._objc_msgSend_360(_id, _lib._sel_setConnectionProxyDictionary_1, value?._id ?? ffi.nullptr); } /// The minimum allowable versions of the TLS protocol, from int get TLSMinimumSupportedProtocol { - return _lib._objc_msgSend_390(_id, _lib._sel_TLSMinimumSupportedProtocol1); + return _lib._objc_msgSend_383(_id, _lib._sel_TLSMinimumSupportedProtocol1); } /// The minimum allowable versions of the TLS protocol, from set TLSMinimumSupportedProtocol(int value) { - _lib._objc_msgSend_391( + _lib._objc_msgSend_384( _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); } /// The maximum allowable versions of the TLS protocol, from int get TLSMaximumSupportedProtocol { - return _lib._objc_msgSend_390(_id, _lib._sel_TLSMaximumSupportedProtocol1); + return _lib._objc_msgSend_383(_id, _lib._sel_TLSMaximumSupportedProtocol1); } /// The maximum allowable versions of the TLS protocol, from set TLSMaximumSupportedProtocol(int value) { - _lib._objc_msgSend_391( + _lib._objc_msgSend_384( _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); } /// The minimum allowable versions of the TLS protocol, from int get TLSMinimumSupportedProtocolVersion { - return _lib._objc_msgSend_392( + return _lib._objc_msgSend_385( _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); } /// The minimum allowable versions of the TLS protocol, from set TLSMinimumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_393( + _lib._objc_msgSend_386( _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); } /// The maximum allowable versions of the TLS protocol, from int get TLSMaximumSupportedProtocolVersion { - return _lib._objc_msgSend_392( + return _lib._objc_msgSend_385( _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); } /// The maximum allowable versions of the TLS protocol, from set TLSMaximumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_393( + _lib._objc_msgSend_386( _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); } @@ -78033,7 +77241,7 @@ class NSURLSessionConfiguration extends NSObject { /// Allow the use of HTTP pipelining set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); } /// Allow the session to set cookies on requests @@ -78043,17 +77251,17 @@ class NSURLSessionConfiguration extends NSObject { /// Allow the session to set cookies on requests set HTTPShouldSetCookies(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldSetCookies_1, value); + _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldSetCookies_1, value); } /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. int get HTTPCookieAcceptPolicy { - return _lib._objc_msgSend_375(_id, _lib._sel_HTTPCookieAcceptPolicy1); + return _lib._objc_msgSend_369(_id, _lib._sel_HTTPCookieAcceptPolicy1); } /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. set HTTPCookieAcceptPolicy(int value) { - _lib._objc_msgSend_376(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); + _lib._objc_msgSend_370(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); } /// Specifies additional headers which will be set on outgoing requests. @@ -78068,24 +77276,24 @@ class NSURLSessionConfiguration extends NSObject { /// Specifies additional headers which will be set on outgoing requests. /// Note that these headers are added to the request only if not already present. set HTTPAdditionalHeaders(NSDictionary? value) { - _lib._objc_msgSend_366( + _lib._objc_msgSend_360( _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); } - /// The maximum number of simultaneous persistent connections per host + /// The maximum number of simultanous persistent connections per host int get HTTPMaximumConnectionsPerHost { return _lib._objc_msgSend_81(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); } - /// The maximum number of simultaneous persistent connections per host + /// The maximum number of simultanous persistent connections per host set HTTPMaximumConnectionsPerHost(int value) { - _lib._objc_msgSend_346( + _lib._objc_msgSend_342( _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); } /// The cookie storage object to use, or nil to indicate that no cookies should be handled NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _lib._objc_msgSend_370(_id, _lib._sel_HTTPCookieStorage1); + final _ret = _lib._objc_msgSend_364(_id, _lib._sel_HTTPCookieStorage1); return _ret.address == 0 ? null : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); @@ -78093,13 +77301,13 @@ class NSURLSessionConfiguration extends NSObject { /// The cookie storage object to use, or nil to indicate that no cookies should be handled set HTTPCookieStorage(NSHTTPCookieStorage? value) { - _lib._objc_msgSend_394( + _lib._objc_msgSend_387( _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); } /// The credential storage object, or nil to indicate that no credential storage is to be used NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _lib._objc_msgSend_395(_id, _lib._sel_URLCredentialStorage1); + final _ret = _lib._objc_msgSend_388(_id, _lib._sel_URLCredentialStorage1); return _ret.address == 0 ? null : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); @@ -78107,13 +77315,13 @@ class NSURLSessionConfiguration extends NSObject { /// The credential storage object, or nil to indicate that no credential storage is to be used set URLCredentialStorage(NSURLCredentialStorage? value) { - _lib._objc_msgSend_396( + _lib._objc_msgSend_389( _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); } /// The URL resource cache, or nil to indicate that no caching is to be performed NSURLCache? get URLCache { - final _ret = _lib._objc_msgSend_397(_id, _lib._sel_URLCache1); + final _ret = _lib._objc_msgSend_390(_id, _lib._sel_URLCache1); return _ret.address == 0 ? null : NSURLCache._(_ret, _lib, retain: true, release: true); @@ -78121,7 +77329,7 @@ class NSURLSessionConfiguration extends NSObject { /// The URL resource cache, or nil to indicate that no caching is to be performed set URLCache(NSURLCache? value) { - _lib._objc_msgSend_398( + _lib._objc_msgSend_391( _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); } @@ -78135,7 +77343,7 @@ class NSURLSessionConfiguration extends NSObject { /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) set shouldUseExtendedBackgroundIdleMode(bool value) { - _lib._objc_msgSend_332( + _lib._objc_msgSend_328( _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); } @@ -78163,18 +77371,18 @@ class NSURLSessionConfiguration extends NSObject { /// Custom NSURLProtocol subclasses are not available to background /// sessions. set protocolClasses(NSArray? value) { - _lib._objc_msgSend_399( + _lib._objc_msgSend_392( _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); } /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone int get multipathServiceType { - return _lib._objc_msgSend_400(_id, _lib._sel_multipathServiceType1); + return _lib._objc_msgSend_393(_id, _lib._sel_multipathServiceType1); } /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone set multipathServiceType(int value) { - _lib._objc_msgSend_401(_id, _lib._sel_setMultipathServiceType_1, value); + _lib._objc_msgSend_394(_id, _lib._sel_setMultipathServiceType_1, value); } @override @@ -78192,7 +77400,7 @@ class NSURLSessionConfiguration extends NSObject { static NSURLSessionConfiguration backgroundSessionConfiguration_( NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_389( + final _ret = _lib._objc_msgSend_382( _lib._class_NSURLSessionConfiguration1, _lib._sel_backgroundSessionConfiguration_1, identifier?._id ?? ffi.nullptr); @@ -78270,9 +77478,9 @@ class NSURLCache extends _ObjCWrapper { /// This is the default value. No entitlement is required to set this value. /// /// @constant NSURLSessionMultipathServiceTypeHandover Specifies that a secondary subflow should only be used -/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entitlement. +/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entilement. /// -/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secondary subflow should be used if the +/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secodary subflow should be used if the /// primary subflow is not performing adequately (packet loss, high round trip times, bandwidth issues). The secondary /// subflow will be created more aggressively than with NSURLSessionMultipathServiceTypeHandover. Requires the com.apple.developer.networking.multipath entitlement. /// @@ -78289,7 +77497,7 @@ abstract class NSURLSessionMultipathServiceType { /// Interactive - secondary flows created more aggressively. static const int NSURLSessionMultipathServiceTypeInteractive = 2; - /// Aggregate - multiple subflows used for greater bandwidth. + /// Aggregate - multiple subflows used for greater bandwitdh. static const int NSURLSessionMultipathServiceTypeAggregate = 3; } @@ -78526,7 +77734,7 @@ class NSURLSessionDownloadTask extends NSURLSessionTask { /// If resume data cannot be created, the completion handler will be /// called with nil resumeData. void cancelByProducingResumeData_(ObjCBlock39 completionHandler) { - return _lib._objc_msgSend_411( + return _lib._objc_msgSend_404( _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); } @@ -78626,18 +77834,18 @@ class ObjCBlock39 extends _ObjCBlockBase { /// -URLSession:dataTask:didReceiveResponse: delegate message. /// /// NSURLSessionStreamTask can be used to perform asynchronous reads -/// and writes. Reads and writes are enqueued and executed serially, +/// and writes. Reads and writes are enquened and executed serially, /// with the completion handler being invoked on the sessions delegate -/// queue. If an error occurs, or the task is canceled, all +/// queuee. If an error occurs, or the task is canceled, all /// outstanding read and write calls will have their completion /// handlers invoked with an appropriate error. /// /// It is also possible to create NSInputStream and NSOutputStream /// instances from an NSURLSessionTask by sending -/// -captureStreams to the task. All outstanding reads and writes are +/// -captureStreams to the task. All outstanding read and writess are /// completed before the streams are created. Once the streams are /// delivered to the session delegate, the task is considered complete -/// and will receive no more messages. These streams are +/// and will receive no more messsages. These streams are /// disassociated from the underlying session. class NSURLSessionStreamTask extends NSURLSessionTask { NSURLSessionStreamTask._(ffi.Pointer id, NativeCupertinoHttp lib, @@ -78670,7 +77878,7 @@ class NSURLSessionStreamTask extends NSURLSessionTask { /// read requests will error out immediately. void readDataOfMinLength_maxLength_timeout_completionHandler_(int minBytes, int maxBytes, double timeout, ObjCBlock40 completionHandler) { - return _lib._objc_msgSend_415( + return _lib._objc_msgSend_408( _id, _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, minBytes, @@ -78686,7 +77894,7 @@ class NSURLSessionStreamTask extends NSURLSessionTask { /// that they have been written to the kernel. void writeData_timeout_completionHandler_( NSData? data, double timeout, ObjCBlock41 completionHandler) { - return _lib._objc_msgSend_416( + return _lib._objc_msgSend_409( _id, _lib._sel_writeData_timeout_completionHandler_1, data?._id ?? ffi.nullptr, @@ -78720,7 +77928,7 @@ class NSURLSessionStreamTask extends NSURLSessionTask { return _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); } - /// Begin encrypted handshake. The handshake begins after all pending + /// Begin encrypted handshake. The hanshake begins after all pending /// IO has completed. TLS authentication callbacks are sent to the /// session's -URLSession:task:didReceiveChallenge:completionHandler: void startSecureConnection() { @@ -78944,7 +78152,7 @@ class NSNetService extends _ObjCWrapper { /// a list of protocols it wishes to advertise during the WebSocket handshake phase. /// Once the handshake is successfully completed the client will be notified through an optional delegate. /// All reads and writes enqueued before the completion of the handshake will be queued up and -/// executed once the handshake succeeds. Before the handshake completes, the client can be called to handle +/// executed once the hanshake succeeds. Before the handshake completes, the client can be called to handle /// redirection or authentication using the same delegates as NSURLSessionTask. WebSocket task will also provide /// support for cookies and will store cookies to the cookie storage on the session and will attach cookies to /// outgoing HTTP handshake requests. @@ -78980,7 +78188,7 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { /// that they have been written to the kernel. void sendMessage_completionHandler_( NSURLSessionWebSocketMessage? message, ObjCBlock41 completionHandler) { - return _lib._objc_msgSend_420( + return _lib._objc_msgSend_413( _id, _lib._sel_sendMessage_completionHandler_1, message?._id ?? ffi.nullptr, @@ -78991,7 +78199,7 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out /// and all outstanding work will also fail resulting in the end of the task. void receiveMessageWithCompletionHandler_(ObjCBlock42 completionHandler) { - return _lib._objc_msgSend_421(_id, + return _lib._objc_msgSend_414(_id, _lib._sel_receiveMessageWithCompletionHandler_1, completionHandler._id); } @@ -79000,30 +78208,30 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. void sendPingWithPongReceiveHandler_(ObjCBlock41 pongReceiveHandler) { - return _lib._objc_msgSend_422(_id, + return _lib._objc_msgSend_415(_id, _lib._sel_sendPingWithPongReceiveHandler_1, pongReceiveHandler._id); } /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { - return _lib._objc_msgSend_423(_id, _lib._sel_cancelWithCloseCode_reason_1, + return _lib._objc_msgSend_416(_id, _lib._sel_cancelWithCloseCode_reason_1, closeCode, reason?._id ?? ffi.nullptr); } - /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Recieve calls will error out if this value is reached int get maximumMessageSize { return _lib._objc_msgSend_81(_id, _lib._sel_maximumMessageSize1); } - /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Recieve calls will error out if this value is reached set maximumMessageSize(int value) { - _lib._objc_msgSend_346(_id, _lib._sel_setMaximumMessageSize_1, value); + _lib._objc_msgSend_342(_id, _lib._sel_setMaximumMessageSize_1, value); } /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid int get closeCode { - return _lib._objc_msgSend_424(_id, _lib._sel_closeCode1); + return _lib._objc_msgSend_417(_id, _lib._sel_closeCode1); } /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running @@ -79102,7 +78310,7 @@ class NSURLSessionWebSocketMessage extends NSObject { } int get type { - return _lib._objc_msgSend_419(_id, _lib._sel_type1); + return _lib._objc_msgSend_412(_id, _lib._sel_type1); } NSData? get data { @@ -79558,7 +78766,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// Represents the transaction request. NSURLRequest? get request { - final _ret = _lib._objc_msgSend_377(_id, _lib._sel_request1); + final _ret = _lib._objc_msgSend_371(_id, _lib._sel_request1); return _ret.address == 0 ? null : NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -79566,7 +78774,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// Represents the transaction response. Can be nil if error occurred and no response was generated. NSURLResponse? get response { - final _ret = _lib._objc_msgSend_379(_id, _lib._sel_response1); + final _ret = _lib._objc_msgSend_373(_id, _lib._sel_response1); return _ret.address == 0 ? null : NSURLResponse._(_ret, _lib, retain: true, release: true); @@ -79583,7 +78791,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// secureConnectionStartDate /// secureConnectionEndDate NSDate? get fetchStartDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_fetchStartDate1); + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_fetchStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -79591,7 +78799,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// domainLookupStartDate returns the time immediately before the user agent started the name lookup for the resource. NSDate? get domainLookupStartDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_domainLookupStartDate1); + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_domainLookupStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -79599,7 +78807,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// domainLookupEndDate returns the time after the name lookup was completed. NSDate? get domainLookupEndDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_domainLookupEndDate1); + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_domainLookupEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -79609,7 +78817,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// For example, this would correspond to the time immediately before the user agent started trying to establish the TCP connection. NSDate? get connectStartDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_connectStartDate1); + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_connectStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -79622,7 +78830,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// If an encrypted connection was not used, this attribute is set to nil. NSDate? get secureConnectionStartDate { final _ret = - _lib._objc_msgSend_357(_id, _lib._sel_secureConnectionStartDate1); + _lib._objc_msgSend_353(_id, _lib._sel_secureConnectionStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -79633,7 +78841,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// If an encrypted connection was not used, this attribute is set to nil. NSDate? get secureConnectionEndDate { final _ret = - _lib._objc_msgSend_357(_id, _lib._sel_secureConnectionEndDate1); + _lib._objc_msgSend_353(_id, _lib._sel_secureConnectionEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -79641,7 +78849,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// connectEndDate is the time immediately after the user agent finished establishing the connection to the server, including completion of security-related and other handshakes. NSDate? get connectEndDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_connectEndDate1); + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_connectEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -79651,7 +78859,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// For example, this would correspond to the time immediately before the user agent sent an HTTP GET request. NSDate? get requestStartDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_requestStartDate1); + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_requestStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -79661,7 +78869,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// For example, this would correspond to the time immediately after the user agent finished sending the last byte of the request. NSDate? get requestEndDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_requestEndDate1); + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_requestEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -79671,7 +78879,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// For example, this would correspond to the time immediately after the user agent received the first byte of an HTTP response. NSDate? get responseStartDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_responseStartDate1); + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_responseStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -79679,14 +78887,14 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// responseEndDate is the time immediately after the user agent received the last byte of the resource. NSDate? get responseEndDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_responseEndDate1); + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_responseEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); } /// The network protocol used to fetch the resource, as identified by the ALPN Protocol ID Identification Sequence [RFC7301]. - /// E.g., h3, h2, http/1.1. + /// E.g., h2, http/1.1, spdy/3.1. /// /// When a proxy is configured AND a tunnel connection is established, then this attribute returns the value for the tunneled protocol. /// @@ -79713,43 +78921,43 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// Indicates whether the resource was loaded, pushed or retrieved from the local cache. int get resourceFetchType { - return _lib._objc_msgSend_435(_id, _lib._sel_resourceFetchType1); + return _lib._objc_msgSend_428(_id, _lib._sel_resourceFetchType1); } /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. int get countOfRequestHeaderBytesSent { - return _lib._objc_msgSend_329( + return _lib._objc_msgSend_325( _id, _lib._sel_countOfRequestHeaderBytesSent1); } /// countOfRequestBodyBytesSent is the number of bytes transferred for request body. /// It includes protocol-specific framing, transfer encoding, and content encoding. int get countOfRequestBodyBytesSent { - return _lib._objc_msgSend_329(_id, _lib._sel_countOfRequestBodyBytesSent1); + return _lib._objc_msgSend_325(_id, _lib._sel_countOfRequestBodyBytesSent1); } /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. int get countOfRequestBodyBytesBeforeEncoding { - return _lib._objc_msgSend_329( + return _lib._objc_msgSend_325( _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); } /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. int get countOfResponseHeaderBytesReceived { - return _lib._objc_msgSend_329( + return _lib._objc_msgSend_325( _id, _lib._sel_countOfResponseHeaderBytesReceived1); } /// countOfResponseBodyBytesReceived is the number of bytes transferred for response header. /// It includes protocol-specific framing, transfer encoding, and content encoding. int get countOfResponseBodyBytesReceived { - return _lib._objc_msgSend_329( + return _lib._objc_msgSend_325( _id, _lib._sel_countOfResponseBodyBytesReceived1); } /// countOfResponseBodyBytesAfterDecoding is the size of data delivered to your delegate or completion handler. int get countOfResponseBodyBytesAfterDecoding { - return _lib._objc_msgSend_329( + return _lib._objc_msgSend_325( _id, _lib._sel_countOfResponseBodyBytesAfterDecoding1); } @@ -79851,7 +79059,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// DNS protocol used for domain resolution. int get domainResolutionProtocol { - return _lib._objc_msgSend_436(_id, _lib._sel_domainResolutionProtocol1); + return _lib._objc_msgSend_429(_id, _lib._sel_domainResolutionProtocol1); } @override @@ -79913,7 +79121,7 @@ class NSURLSessionTaskMetrics extends NSObject { /// Task creation time is the time when the task was instantiated. /// Task completion time is the time when the task is about to change its internal state to completed. NSDateInterval? get taskInterval { - final _ret = _lib._objc_msgSend_437(_id, _lib._sel_taskInterval1); + final _ret = _lib._objc_msgSend_430(_id, _lib._sel_taskInterval1); return _ret.address == 0 ? null : NSDateInterval._(_ret, _lib, retain: true, release: true); @@ -80009,7 +79217,7 @@ class NSItemProvider extends NSObject { void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( NSString? typeIdentifier, int visibility, ObjCBlock45 loadHandler) { - return _lib._objc_msgSend_438( + return _lib._objc_msgSend_431( _id, _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80023,7 +79231,7 @@ class NSItemProvider extends NSObject { int fileOptions, int visibility, ObjCBlock47 loadHandler) { - return _lib._objc_msgSend_439( + return _lib._objc_msgSend_432( _id, _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80041,7 +79249,7 @@ class NSItemProvider extends NSObject { } NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { - final _ret = _lib._objc_msgSend_440( + final _ret = _lib._objc_msgSend_433( _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); return NSArray._(_ret, _lib, retain: true, release: true); } @@ -80055,7 +79263,7 @@ class NSItemProvider extends NSObject { bool hasRepresentationConformingToTypeIdentifier_fileOptions_( NSString? typeIdentifier, int fileOptions) { - return _lib._objc_msgSend_441( + return _lib._objc_msgSend_434( _id, _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80064,7 +79272,7 @@ class NSItemProvider extends NSObject { NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( NSString? typeIdentifier, ObjCBlock46 completionHandler) { - final _ret = _lib._objc_msgSend_442( + final _ret = _lib._objc_msgSend_435( _id, _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80074,7 +79282,7 @@ class NSItemProvider extends NSObject { NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( NSString? typeIdentifier, ObjCBlock49 completionHandler) { - final _ret = _lib._objc_msgSend_443( + final _ret = _lib._objc_msgSend_436( _id, _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80084,7 +79292,7 @@ class NSItemProvider extends NSObject { NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( NSString? typeIdentifier, ObjCBlock48 completionHandler) { - final _ret = _lib._objc_msgSend_444( + final _ret = _lib._objc_msgSend_437( _id, _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80100,7 +79308,7 @@ class NSItemProvider extends NSObject { } set suggestedName(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_327( _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); } @@ -80111,13 +79319,13 @@ class NSItemProvider extends NSObject { } void registerObject_visibility_(NSObject? object, int visibility) { - return _lib._objc_msgSend_445(_id, _lib._sel_registerObject_visibility_1, + return _lib._objc_msgSend_438(_id, _lib._sel_registerObject_visibility_1, object?._id ?? ffi.nullptr, visibility); } void registerObjectOfClass_visibility_loadHandler_( NSObject? aClass, int visibility, ObjCBlock50 loadHandler) { - return _lib._objc_msgSend_446( + return _lib._objc_msgSend_439( _id, _lib._sel_registerObjectOfClass_visibility_loadHandler_1, aClass?._id ?? ffi.nullptr, @@ -80132,7 +79340,7 @@ class NSItemProvider extends NSObject { NSProgress loadObjectOfClass_completionHandler_( NSObject? aClass, ObjCBlock51 completionHandler) { - final _ret = _lib._objc_msgSend_447( + final _ret = _lib._objc_msgSend_440( _id, _lib._sel_loadObjectOfClass_completionHandler_1, aClass?._id ?? ffi.nullptr, @@ -80142,7 +79350,7 @@ class NSItemProvider extends NSObject { NSItemProvider initWithItem_typeIdentifier_( NSObject? item, NSString? typeIdentifier) { - final _ret = _lib._objc_msgSend_448( + final _ret = _lib._objc_msgSend_441( _id, _lib._sel_initWithItem_typeIdentifier_1, item?._id ?? ffi.nullptr, @@ -80158,7 +79366,7 @@ class NSItemProvider extends NSObject { void registerItemForTypeIdentifier_loadHandler_( NSString? typeIdentifier, NSItemProviderLoadHandler loadHandler) { - return _lib._objc_msgSend_449( + return _lib._objc_msgSend_442( _id, _lib._sel_registerItemForTypeIdentifier_loadHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80169,7 +79377,7 @@ class NSItemProvider extends NSObject { NSString? typeIdentifier, NSDictionary? options, NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_450( + return _lib._objc_msgSend_443( _id, _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80178,16 +79386,16 @@ class NSItemProvider extends NSObject { } NSItemProviderLoadHandler get previewImageHandler { - return _lib._objc_msgSend_451(_id, _lib._sel_previewImageHandler1); + return _lib._objc_msgSend_444(_id, _lib._sel_previewImageHandler1); } set previewImageHandler(NSItemProviderLoadHandler value) { - _lib._objc_msgSend_452(_id, _lib._sel_setPreviewImageHandler_1, value); + _lib._objc_msgSend_445(_id, _lib._sel_setPreviewImageHandler_1, value); } void loadPreviewImageWithOptions_completionHandler_(NSDictionary? options, NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_453( + return _lib._objc_msgSend_446( _id, _lib._sel_loadPreviewImageWithOptions_completionHandler_1, options?._id ?? ffi.nullptr, @@ -80847,8692 +80055,9844 @@ class ObjCBlock52 extends _ObjCBlockBase { lib); static ffi.Pointer? _cFuncTrampoline; - /// Creates a block from a Dart function. - ObjCBlock52.fromFunction( - NativeCupertinoHttp lib, - void Function(NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock52_closureTrampoline) - .cast(), - _ObjCBlock52_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + /// Creates a block from a Dart function. + ObjCBlock52.fromFunction( + NativeCupertinoHttp lib, + void Function(NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock52_closureTrampoline) + .cast(), + _ObjCBlock52_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } + + ffi.Pointer<_ObjCBlock> get pointer => _id; +} + +typedef NSItemProviderCompletionHandler = ffi.Pointer<_ObjCBlock>; + +abstract class NSItemProviderErrorCode { + static const int NSItemProviderUnknownError = -1; + static const int NSItemProviderItemUnavailableError = -1000; + static const int NSItemProviderUnexpectedValueClassError = -1100; + static const int NSItemProviderUnavailableCoercionError = -1200; +} + +typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; + +class NSMutableString extends NSString { + NSMutableString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableString] that points to the same underlying object as [other]. + static NSMutableString castFrom(T other) { + return NSMutableString._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableString] that wraps the given raw object pointer. + static NSMutableString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableString._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableString1); + } + + void replaceCharactersInRange_withString_(NSRange range, NSString? aString) { + return _lib._objc_msgSend_447( + _id, + _lib._sel_replaceCharactersInRange_withString_1, + range, + aString?._id ?? ffi.nullptr); + } + + void insertString_atIndex_(NSString? aString, int loc) { + return _lib._objc_msgSend_448(_id, _lib._sel_insertString_atIndex_1, + aString?._id ?? ffi.nullptr, loc); + } + + void deleteCharactersInRange_(NSRange range) { + return _lib._objc_msgSend_283( + _id, _lib._sel_deleteCharactersInRange_1, range); + } + + void appendString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_appendString_1, aString?._id ?? ffi.nullptr); + } + + void appendFormat_(NSString? format) { + return _lib._objc_msgSend_188( + _id, _lib._sel_appendFormat_1, format?._id ?? ffi.nullptr); + } + + void setString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_setString_1, aString?._id ?? ffi.nullptr); + } + + int replaceOccurrencesOfString_withString_options_range_(NSString? target, + NSString? replacement, int options, NSRange searchRange) { + return _lib._objc_msgSend_449( + _id, + _lib._sel_replaceOccurrencesOfString_withString_options_range_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr, + options, + searchRange); + } + + bool applyTransform_reverse_range_updatedRange_(NSStringTransform transform, + bool reverse, NSRange range, NSRangePointer resultingRange) { + return _lib._objc_msgSend_450( + _id, + _lib._sel_applyTransform_reverse_range_updatedRange_1, + transform, + reverse, + range, + resultingRange); + } + + NSMutableString initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_451(_id, _lib._sel_initWithCapacity_1, capacity); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithCapacity_( + NativeCupertinoHttp _lib, int capacity) { + final _ret = _lib._objc_msgSend_451( + _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); + } + + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSMutableString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); + } + + static NSMutableString string(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_string1); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSMutableString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSMutableString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSMutableString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_265( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_266( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_267( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_268( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_269( + _lib._class_NSMutableString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } + + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSMutableString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSMutableString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_new1); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } + + static NSMutableString alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_alloc1); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSExceptionName = ffi.Pointer; + +class NSSimpleCString extends NSString { + NSSimpleCString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSSimpleCString] that points to the same underlying object as [other]. + static NSSimpleCString castFrom(T other) { + return NSSimpleCString._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSSimpleCString] that wraps the given raw object pointer. + static NSSimpleCString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSSimpleCString._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSSimpleCString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSSimpleCString1); + } + + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSSimpleCString1, _lib._sel_availableStringEncodings1); + } + + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSSimpleCString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSSimpleCString1, _lib._sel_defaultCStringEncoding1); + } + + static NSSimpleCString string(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_string1); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSSimpleCString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSSimpleCString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSSimpleCString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_265( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_266( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_267( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_268( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_269( + _lib._class_NSSimpleCString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } + + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSSimpleCString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSSimpleCString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_new1); + return NSSimpleCString._(_ret, _lib, retain: false, release: true); + } + + static NSSimpleCString alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_alloc1); + return NSSimpleCString._(_ret, _lib, retain: false, release: true); + } +} + +class NSConstantString extends NSSimpleCString { + NSConstantString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSConstantString] that points to the same underlying object as [other]. + static NSConstantString castFrom(T other) { + return NSConstantString._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSConstantString] that wraps the given raw object pointer. + static NSConstantString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSConstantString._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSConstantString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSConstantString1); + } + + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSConstantString1, _lib._sel_availableStringEncodings1); + } + + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSConstantString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSConstantString1, _lib._sel_defaultCStringEncoding1); + } + + static NSConstantString string(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_string1); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSConstantString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSConstantString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSConstantString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_265( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_266( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_267( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_268( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_269( + _lib._class_NSConstantString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } + + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_264(_lib._class_NSConstantString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSConstantString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_new1); + return NSConstantString._(_ret, _lib, retain: false, release: true); + } + + static NSConstantString alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_alloc1); + return NSConstantString._(_ret, _lib, retain: false, release: true); + } +} + +class NSMutableCharacterSet extends NSCharacterSet { + NSMutableCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSMutableCharacterSet] that points to the same underlying object as [other]. + static NSMutableCharacterSet castFrom(T other) { + return NSMutableCharacterSet._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSMutableCharacterSet] that wraps the given raw object pointer. + static NSMutableCharacterSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableCharacterSet._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSMutableCharacterSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableCharacterSet1); + } + + void addCharactersInRange_(NSRange aRange) { + return _lib._objc_msgSend_283( + _id, _lib._sel_addCharactersInRange_1, aRange); + } + + void removeCharactersInRange_(NSRange aRange) { + return _lib._objc_msgSend_283( + _id, _lib._sel_removeCharactersInRange_1, aRange); + } + + void addCharactersInString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_addCharactersInString_1, aString?._id ?? ffi.nullptr); + } + + void removeCharactersInString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_removeCharactersInString_1, aString?._id ?? ffi.nullptr); + } + + void formUnionWithCharacterSet_(NSCharacterSet? otherSet) { + return _lib._objc_msgSend_452(_id, _lib._sel_formUnionWithCharacterSet_1, + otherSet?._id ?? ffi.nullptr); + } + + void formIntersectionWithCharacterSet_(NSCharacterSet? otherSet) { + return _lib._objc_msgSend_452( + _id, + _lib._sel_formIntersectionWithCharacterSet_1, + otherSet?._id ?? ffi.nullptr); + } + + void invert() { + return _lib._objc_msgSend_1(_id, _lib._sel_invert1); + } + + static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_controlCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_whitespaceCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_whitespaceAndNewlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_decimalDigitCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_letterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getLowercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_lowercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getUppercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_uppercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_nonBaseCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_alphanumericCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_decomposableCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_illegalCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_punctuationCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getCapitalizedLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_capitalizedLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_symbolCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_newlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: false, release: true); + } + + static NSMutableCharacterSet characterSetWithRange_( + NativeCupertinoHttp _lib, NSRange aRange) { + final _ret = _lib._objc_msgSend_453(_lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithRange_1, aRange); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableCharacterSet characterSetWithCharactersInString_( + NativeCupertinoHttp _lib, NSString? aString) { + final _ret = _lib._objc_msgSend_454( + _lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, + aString?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableCharacterSet characterSetWithBitmapRepresentation_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_455( + _lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, + data?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableCharacterSet characterSetWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? fName) { + final _ret = _lib._objc_msgSend_454(_lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's user subcomponent. + static NSCharacterSet? getURLUserAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLUserAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's password subcomponent. + static NSCharacterSet? getURLPasswordAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLPasswordAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's host subcomponent. + static NSCharacterSet? getURLHostAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLHostAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + static NSCharacterSet? getURLPathAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLPathAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's query component. + static NSCharacterSet? getURLQueryAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLQueryAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in an URL's fragment component. + static NSCharacterSet? getURLFragmentAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLFragmentAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + static NSMutableCharacterSet new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableCharacterSet1, _lib._sel_new1); + return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); + } + + static NSMutableCharacterSet alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableCharacterSet1, _lib._sel_alloc1); + return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSURLFileResourceType = ffi.Pointer; +typedef NSURLThumbnailDictionaryItem = ffi.Pointer; +typedef NSURLFileProtectionType = ffi.Pointer; +typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; +typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; +typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; + +/// NSURLQueryItem encapsulates a single query name-value pair. The name and value strings of a query name-value pair are not percent encoded. For use with the NSURLComponents queryItems property. +class NSURLQueryItem extends NSObject { + NSURLQueryItem._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLQueryItem] that points to the same underlying object as [other]. + static NSURLQueryItem castFrom(T other) { + return NSURLQueryItem._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSURLQueryItem] that wraps the given raw object pointer. + static NSURLQueryItem castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLQueryItem._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLQueryItem]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLQueryItem1); + } + + NSURLQueryItem initWithName_value_(NSString? name, NSString? value) { + final _ret = _lib._objc_msgSend_456(_id, _lib._sel_initWithName_value_1, + name?._id ?? ffi.nullptr, value?._id ?? ffi.nullptr); + return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + } + + static NSURLQueryItem queryItemWithName_value_( + NativeCupertinoHttp _lib, NSString? name, NSString? value) { + final _ret = _lib._objc_msgSend_456( + _lib._class_NSURLQueryItem1, + _lib._sel_queryItemWithName_value_1, + name?._id ?? ffi.nullptr, + value?._id ?? ffi.nullptr); + return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + } + + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString? get value { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_value1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static NSURLQueryItem new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_new1); + return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + } + + static NSURLQueryItem alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_alloc1); + return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + } +} + +class NSURLComponents extends NSObject { + NSURLComponents._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLComponents] that points to the same underlying object as [other]. + static NSURLComponents castFrom(T other) { + return NSURLComponents._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLComponents] that wraps the given raw object pointer. + static NSURLComponents castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLComponents._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLComponents]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLComponents1); + } + + /// Initialize a NSURLComponents with all components undefined. Designated initializer. + @override + NSURLComponents init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initialize a NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. + NSURLComponents initWithURL_resolvingAgainstBaseURL_( + NSURL? url, bool resolve) { + final _ret = _lib._objc_msgSend_206( + _id, + _lib._sel_initWithURL_resolvingAgainstBaseURL_1, + url?._id ?? ffi.nullptr, + resolve); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. + static NSURLComponents componentsWithURL_resolvingAgainstBaseURL_( + NativeCupertinoHttp _lib, NSURL? url, bool resolve) { + final _ret = _lib._objc_msgSend_206( + _lib._class_NSURLComponents1, + _lib._sel_componentsWithURL_resolvingAgainstBaseURL_1, + url?._id ?? ffi.nullptr, + resolve); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initialize a NSURLComponents with a URL string. If the URLString is malformed, nil is returned. + NSURLComponents initWithString_(NSString? URLString) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created NSURLComponents with a URL string. If the URLString is malformed, nil is returned. + static NSURLComponents componentsWithString_( + NativeCupertinoHttp _lib, NSString? URLString) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSURLComponents1, + _lib._sel_componentsWithString_1, URLString?._id ?? ffi.nullptr); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Returns a URL created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSURL URLRelativeToURL_(NSURL? baseURL) { + final _ret = _lib._objc_msgSend_457( + _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Returns a URL string created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSString? get string { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Attempting to set the scheme with an invalid scheme string will cause an exception. + NSString? get scheme { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Attempting to set the scheme with an invalid scheme string will cause an exception. + set scheme(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); + } + + NSString? get user { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set user(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); + } + + NSString? get password { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set password(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); + } + + NSString? get host { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set host(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); + } + + /// Attempting to set a negative port number will cause an exception. + NSNumber? get port { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + /// Attempting to set a negative port number will cause an exception. + set port(NSNumber? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); + } + + NSString? get path { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set path(NSString? value) { + _lib._objc_msgSend_327(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); + } + + NSString? get query { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set query(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); + } + + NSString? get fragment { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set fragment(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); + } + + /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + NSString? get percentEncodedUser { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedUser1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + set percentEncodedUser(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedPassword { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPassword1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedPassword(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedHost { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedHost1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedHost(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedPath { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedPath(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedQuery { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedQuery1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedQuery(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); + } + + NSString? get percentEncodedFragment { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedFragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set percentEncodedFragment(NSString? value) { + _lib._objc_msgSend_327( + _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); + } + + /// These properties return the character range of a component in the URL string returned by -[NSURLComponents string]. If the component does not exist in the NSURLComponents object, {NSNotFound, 0} is returned. Note: Zero length components are legal. For example, the URL string "scheme://:@/?#" has a zero length user, password, host, query and fragment; the URL strings "scheme:" and "" both have a zero length path. + NSRange get rangeOfScheme { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfScheme1); + } + + NSRange get rangeOfUser { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfUser1); + } + + NSRange get rangeOfPassword { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPassword1); + } + + NSRange get rangeOfHost { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfHost1); + } + + NSRange get rangeOfPort { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPort1); + } + + NSRange get rangeOfPath { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPath1); + } + + NSRange get rangeOfQuery { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfQuery1); + } + + NSRange get rangeOfFragment { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfFragment1); + } + + /// The query component as an array of NSURLQueryItems for this NSURLComponents. + /// + /// Each NSURLQueryItem represents a single key-value pair, + /// + /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. + /// + /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. + /// + /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. + /// + /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. + NSArray? get queryItems { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_queryItems1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// The query component as an array of NSURLQueryItems for this NSURLComponents. + /// + /// Each NSURLQueryItem represents a single key-value pair, + /// + /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. + /// + /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. + /// + /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. + /// + /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. + set queryItems(NSArray? value) { + _lib._objc_msgSend_392( + _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); + } + + /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. + /// + /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. + NSArray? get percentEncodedQueryItems { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_percentEncodedQueryItems1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. + /// + /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. + set percentEncodedQueryItems(NSArray? value) { + _lib._objc_msgSend_392(_id, _lib._sel_setPercentEncodedQueryItems_1, + value?._id ?? ffi.nullptr); + } + + static NSURLComponents new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_new1); + return NSURLComponents._(_ret, _lib, retain: false, release: true); + } + + static NSURLComponents alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_alloc1); + return NSURLComponents._(_ret, _lib, retain: false, release: true); + } +} + +/// NSFileSecurity encapsulates a file system object's security information. NSFileSecurity and CFFileSecurity are toll-free bridged. Use the CFFileSecurity API for access to the low-level file security properties encapsulated by NSFileSecurity. +class NSFileSecurity extends NSObject { + NSFileSecurity._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSFileSecurity] that points to the same underlying object as [other]. + static NSFileSecurity castFrom(T other) { + return NSFileSecurity._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSFileSecurity] that wraps the given raw object pointer. + static NSFileSecurity castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSFileSecurity._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSFileSecurity]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSFileSecurity1); + } + + NSFileSecurity initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSFileSecurity._(_ret, _lib, retain: true, release: true); + } + + static NSFileSecurity new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_new1); + return NSFileSecurity._(_ret, _lib, retain: false, release: true); + } + + static NSFileSecurity alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_alloc1); + return NSFileSecurity._(_ret, _lib, retain: false, release: true); + } +} + +/// ! +/// @class NSHTTPURLResponse +/// +/// @abstract An NSHTTPURLResponse object represents a response to an +/// HTTP URL load. It is a specialization of NSURLResponse which +/// provides conveniences for accessing information specific to HTTP +/// protocol responses. +class NSHTTPURLResponse extends NSURLResponse { + NSHTTPURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSHTTPURLResponse] that points to the same underlying object as [other]. + static NSHTTPURLResponse castFrom(T other) { + return NSHTTPURLResponse._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSHTTPURLResponse] that wraps the given raw object pointer. + static NSHTTPURLResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPURLResponse._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSHTTPURLResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSHTTPURLResponse1); + } + + /// ! + /// @method initWithURL:statusCode:HTTPVersion:headerFields: + /// @abstract initializer for NSHTTPURLResponse objects. + /// @param url the URL from which the response was generated. + /// @param statusCode an HTTP status code. + /// @param HTTPVersion The version of the HTTP response as represented by the server. This is typically represented as "HTTP/1.1". + /// @param headerFields A dictionary representing the header keys and values of the server response. + /// @result the instance of the object, or NULL if an error occurred during initialization. + /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. + NSHTTPURLResponse initWithURL_statusCode_HTTPVersion_headerFields_(NSURL? url, + int statusCode, NSString? HTTPVersion, NSDictionary? headerFields) { + final _ret = _lib._objc_msgSend_458( + _id, + _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, + url?._id ?? ffi.nullptr, + statusCode, + HTTPVersion?._id ?? ffi.nullptr, + headerFields?._id ?? ffi.nullptr); + return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @abstract Returns the HTTP status code of the receiver. + /// @result The HTTP status code of the receiver. + int get statusCode { + return _lib._objc_msgSend_81(_id, _lib._sel_statusCode1); + } + + /// ! + /// @abstract Returns a dictionary containing all the HTTP header fields + /// of the receiver. + /// @discussion By examining this header dictionary, clients can see + /// the "raw" header information which was reported to the protocol + /// implementation by the HTTP server. This may be of use to + /// sophisticated or special-purpose HTTP clients. + /// @result A dictionary containing all the HTTP header fields of the + /// receiver. + NSDictionary? get allHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method valueForHTTPHeaderField: + /// @abstract Returns the value which corresponds to the given header + /// field. Note that, in keeping with the HTTP RFC, HTTP header field + /// names are case-insensitive. + /// @param field the header field name to use for the lookup + /// (case-insensitive). + /// @result the value associated with the given header field, or nil if + /// there is no value associated with the given header field. + NSString valueForHTTPHeaderField_(NSString? field) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method localizedStringForStatusCode: + /// @abstract Convenience method which returns a localized string + /// corresponding to the status code for this response. + /// @param statusCode the status code to use to produce a localized string. + /// @result A localized string corresponding to the given status code. + static NSString localizedStringForStatusCode_( + NativeCupertinoHttp _lib, int statusCode) { + final _ret = _lib._objc_msgSend_459(_lib._class_NSHTTPURLResponse1, + _lib._sel_localizedStringForStatusCode_1, statusCode); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSHTTPURLResponse new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_new1); + return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + } + + static NSHTTPURLResponse alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_alloc1); + return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + } +} + +class NSException extends NSObject { + NSException._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSException] that points to the same underlying object as [other]. + static NSException castFrom(T other) { + return NSException._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSException] that wraps the given raw object pointer. + static NSException castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSException._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSException]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSException1); + } + + static NSException exceptionWithName_reason_userInfo_( + NativeCupertinoHttp _lib, + NSExceptionName name, + NSString? reason, + NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_460( + _lib._class_NSException1, + _lib._sel_exceptionWithName_reason_userInfo_1, + name, + reason?._id ?? ffi.nullptr, + userInfo?._id ?? ffi.nullptr); + return NSException._(_ret, _lib, retain: true, release: true); + } + + NSException initWithName_reason_userInfo_( + NSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_461( + _id, + _lib._sel_initWithName_reason_userInfo_1, + aName, + aReason?._id ?? ffi.nullptr, + aUserInfo?._id ?? ffi.nullptr); + return NSException._(_ret, _lib, retain: true, release: true); + } + + NSExceptionName get name { + return _lib._objc_msgSend_32(_id, _lib._sel_name1); + } + + NSString? get reason { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_reason1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSArray? get callStackReturnAddresses { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_callStackReturnAddresses1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + NSArray? get callStackSymbols { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_callStackSymbols1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + void raise() { + return _lib._objc_msgSend_1(_id, _lib._sel_raise1); + } + + static void raise_format_( + NativeCupertinoHttp _lib, NSExceptionName name, NSString? format) { + return _lib._objc_msgSend_361(_lib._class_NSException1, + _lib._sel_raise_format_1, name, format?._id ?? ffi.nullptr); + } + + static void raise_format_arguments_(NativeCupertinoHttp _lib, + NSExceptionName name, NSString? format, va_list argList) { + return _lib._objc_msgSend_462( + _lib._class_NSException1, + _lib._sel_raise_format_arguments_1, + name, + format?._id ?? ffi.nullptr, + argList); + } + + static NSException new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_new1); + return NSException._(_ret, _lib, retain: false, release: true); + } + + static NSException alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); + return NSException._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSUncaughtExceptionHandler + = ffi.NativeFunction)>; + +class NSAssertionHandler extends NSObject { + NSAssertionHandler._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSAssertionHandler] that points to the same underlying object as [other]. + static NSAssertionHandler castFrom(T other) { + return NSAssertionHandler._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSAssertionHandler] that wraps the given raw object pointer. + static NSAssertionHandler castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSAssertionHandler._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSAssertionHandler]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSAssertionHandler1); + } + + static NSAssertionHandler? getCurrentHandler(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_463( + _lib._class_NSAssertionHandler1, _lib._sel_currentHandler1); + return _ret.address == 0 + ? null + : NSAssertionHandler._(_ret, _lib, retain: true, release: true); + } + + void handleFailureInMethod_object_file_lineNumber_description_( + ffi.Pointer selector, + NSObject object, + NSString? fileName, + int line, + NSString? format) { + return _lib._objc_msgSend_464( + _id, + _lib._sel_handleFailureInMethod_object_file_lineNumber_description_1, + selector, + object._id, + fileName?._id ?? ffi.nullptr, + line, + format?._id ?? ffi.nullptr); + } + + void handleFailureInFunction_file_lineNumber_description_( + NSString? functionName, NSString? fileName, int line, NSString? format) { + return _lib._objc_msgSend_465( + _id, + _lib._sel_handleFailureInFunction_file_lineNumber_description_1, + functionName?._id ?? ffi.nullptr, + fileName?._id ?? ffi.nullptr, + line, + format?._id ?? ffi.nullptr); + } + + static NSAssertionHandler new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_new1); + return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + } + + static NSAssertionHandler alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_alloc1); + return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + } +} + +class NSBlockOperation extends NSOperation { + NSBlockOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSBlockOperation] that points to the same underlying object as [other]. + static NSBlockOperation castFrom(T other) { + return NSBlockOperation._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSBlockOperation] that wraps the given raw object pointer. + static NSBlockOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSBlockOperation._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSBlockOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSBlockOperation1); + } + + static NSBlockOperation blockOperationWithBlock_( + NativeCupertinoHttp _lib, ObjCBlock16 block) { + final _ret = _lib._objc_msgSend_466(_lib._class_NSBlockOperation1, + _lib._sel_blockOperationWithBlock_1, block._id); + return NSBlockOperation._(_ret, _lib, retain: true, release: true); + } + + void addExecutionBlock_(ObjCBlock16 block) { + return _lib._objc_msgSend_341( + _id, _lib._sel_addExecutionBlock_1, block._id); + } + + NSArray? get executionBlocks { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_executionBlocks1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } + + static NSBlockOperation new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_new1); + return NSBlockOperation._(_ret, _lib, retain: false, release: true); + } + + static NSBlockOperation alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_alloc1); + return NSBlockOperation._(_ret, _lib, retain: false, release: true); + } +} + +class NSInvocationOperation extends NSOperation { + NSInvocationOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSInvocationOperation] that points to the same underlying object as [other]. + static NSInvocationOperation castFrom(T other) { + return NSInvocationOperation._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSInvocationOperation] that wraps the given raw object pointer. + static NSInvocationOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInvocationOperation._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSInvocationOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSInvocationOperation1); + } + + NSInvocationOperation initWithTarget_selector_object_( + NSObject target, ffi.Pointer sel, NSObject arg) { + final _ret = _lib._objc_msgSend_467(_id, + _lib._sel_initWithTarget_selector_object_1, target._id, sel, arg._id); + return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + } + + NSInvocationOperation initWithInvocation_(NSInvocation? inv) { + final _ret = _lib._objc_msgSend_468( + _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); + return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + } + + NSInvocation? get invocation { + final _ret = _lib._objc_msgSend_469(_id, _lib._sel_invocation1); + return _ret.address == 0 + ? null + : NSInvocation._(_ret, _lib, retain: true, release: true); + } + + NSObject get result { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_result1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static NSInvocationOperation new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInvocationOperation1, _lib._sel_new1); + return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + } + + static NSInvocationOperation alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInvocationOperation1, _lib._sel_alloc1); + return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + } +} + +class _Dart_Isolate extends ffi.Opaque {} + +class _Dart_IsolateGroup extends ffi.Opaque {} + +class _Dart_Handle extends ffi.Opaque {} + +class _Dart_WeakPersistentHandle extends ffi.Opaque {} + +class _Dart_FinalizableHandle extends ffi.Opaque {} + +typedef Dart_WeakPersistentHandle = ffi.Pointer<_Dart_WeakPersistentHandle>; + +/// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the +/// version when changing this struct. +typedef Dart_HandleFinalizer = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +typedef Dart_FinalizableHandle = ffi.Pointer<_Dart_FinalizableHandle>; + +class Dart_IsolateFlags extends ffi.Struct { + @ffi.Int32() + external int version; + + @ffi.Bool() + external bool enable_asserts; + + @ffi.Bool() + external bool use_field_guards; + + @ffi.Bool() + external bool use_osr; + + @ffi.Bool() + external bool obfuscate; + + @ffi.Bool() + external bool load_vmservice_library; + + @ffi.Bool() + external bool copy_parent_code; + + @ffi.Bool() + external bool null_safety; + + @ffi.Bool() + external bool is_system_isolate; +} + +/// Forward declaration +class Dart_CodeObserver extends ffi.Struct { + external ffi.Pointer data; + + external Dart_OnNewCodeCallback on_new_code; +} + +/// Callback provided by the embedder that is used by the VM to notify on code +/// object creation, *before* it is invoked the first time. +/// This is useful for embedders wanting to e.g. keep track of PCs beyond +/// the lifetime of the garbage collected code objects. +/// Note that an address range may be used by more than one code object over the +/// lifecycle of a process. Clients of this function should record timestamps for +/// these compilation events and when collecting PCs to disambiguate reused +/// address ranges. +typedef Dart_OnNewCodeCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + uintptr_t, uintptr_t)>>; + +/// Describes how to initialize the VM. Used with Dart_Initialize. +/// +/// \param version Identifies the version of the struct used by the client. +/// should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. +/// \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate +/// or NULL if no snapshot is provided. If provided, the buffer must remain +/// valid until Dart_Cleanup returns. +/// \param instructions_snapshot A buffer containing a snapshot of precompiled +/// instructions, or NULL if no snapshot is provided. If provided, the buffer +/// must remain valid until Dart_Cleanup returns. +/// \param initialize_isolate A function to be called during isolate +/// initialization inside an existing isolate group. +/// See Dart_InitializeIsolateCallback. +/// \param create_group A function to be called during isolate group creation. +/// See Dart_IsolateGroupCreateCallback. +/// \param shutdown A function to be called right before an isolate is shutdown. +/// See Dart_IsolateShutdownCallback. +/// \param cleanup A function to be called after an isolate was shutdown. +/// See Dart_IsolateCleanupCallback. +/// \param cleanup_group A function to be called after an isolate group is shutdown. +/// See Dart_IsolateGroupCleanupCallback. +/// \param get_service_assets A function to be called by the service isolate when +/// it requires the vmservice assets archive. +/// See Dart_GetVMServiceAssetsArchive. +/// \param code_observer An external code observer callback function. +/// The observer can be invoked as early as during the Dart_Initialize() call. +class Dart_InitializeParams extends ffi.Struct { + @ffi.Int32() + external int version; + + external ffi.Pointer vm_snapshot_data; + + external ffi.Pointer vm_snapshot_instructions; + + external Dart_IsolateGroupCreateCallback create_group; + + external Dart_InitializeIsolateCallback initialize_isolate; + + external Dart_IsolateShutdownCallback shutdown_isolate; + + external Dart_IsolateCleanupCallback cleanup_isolate; + + external Dart_IsolateGroupCleanupCallback cleanup_group; + + external Dart_ThreadExitCallback thread_exit; + + external Dart_FileOpenCallback file_open; + + external Dart_FileReadCallback file_read; + + external Dart_FileWriteCallback file_write; + + external Dart_FileCloseCallback file_close; + + external Dart_EntropySource entropy_source; + + external Dart_GetVMServiceAssetsArchive get_service_assets; + + @ffi.Bool() + external bool start_kernel_isolate; + + external ffi.Pointer code_observer; +} + +/// An isolate creation and initialization callback function. +/// +/// This callback, provided by the embedder, is called when the VM +/// needs to create an isolate. The callback should create an isolate +/// by calling Dart_CreateIsolateGroup and load any scripts required for +/// execution. +/// +/// This callback may be called on a different thread than the one +/// running the parent isolate. +/// +/// When the function returns NULL, it is the responsibility of this +/// function to ensure that Dart_ShutdownIsolate has been called if +/// required (for example, if the isolate was created successfully by +/// Dart_CreateIsolateGroup() but the root library fails to load +/// successfully, then the function should call Dart_ShutdownIsolate +/// before returning). +/// +/// When the function returns NULL, the function should set *error to +/// a malloc-allocated buffer containing a useful error message. The +/// caller of this function (the VM) will make sure that the buffer is +/// freed. +/// +/// \param script_uri The uri of the main source file or snapshot to load. +/// Either the URI of the parent isolate set in Dart_CreateIsolateGroup for +/// Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the +/// library tag handler of the parent isolate. +/// The callback is responsible for loading the program by a call to +/// Dart_LoadScriptFromKernel. +/// \param main The name of the main entry point this isolate will +/// eventually run. This is provided for advisory purposes only to +/// improve debugging messages. The main function is not invoked by +/// this function. +/// \param package_root Ignored. +/// \param package_config Uri of the package configuration file (either in format +/// of .packages or .dart_tool/package_config.json) for this isolate +/// to resolve package imports against. If this parameter is not passed the +/// package resolution of the parent isolate should be used. +/// \param flags Default flags for this isolate being spawned. Either inherited +/// from the spawning isolate or passed as parameters when spawning the +/// isolate from Dart code. +/// \param isolate_data The isolate data which was passed to the +/// parent isolate when it was created by calling Dart_CreateIsolateGroup(). +/// \param error A structure into which the embedder can place a +/// C string containing an error message in the case of failures. +/// +/// \return The embedder returns NULL if the creation and +/// initialization was not successful and the isolate if successful. +typedef Dart_IsolateGroupCreateCallback = ffi.Pointer< + ffi.NativeFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>; + +/// An isolate is the unit of concurrency in Dart. Each isolate has +/// its own memory and thread of control. No state is shared between +/// isolates. Instead, isolates communicate by message passing. +/// +/// Each thread keeps track of its current isolate, which is the +/// isolate which is ready to execute on the current thread. The +/// current isolate may be NULL, in which case no isolate is ready to +/// execute. Most of the Dart apis require there to be a current +/// isolate in order to function without error. The current isolate is +/// set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. +typedef Dart_Isolate = ffi.Pointer<_Dart_Isolate>; + +/// An isolate initialization callback function. +/// +/// This callback, provided by the embedder, is called when the VM has created an +/// isolate within an existing isolate group (i.e. from the same source as an +/// existing isolate). +/// +/// The callback should setup native resolvers and might want to set a custom +/// message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as +/// runnable. +/// +/// This callback may be called on a different thread than the one +/// running the parent isolate. +/// +/// When the function returns `false`, it is the responsibility of this +/// function to ensure that `Dart_ShutdownIsolate` has been called. +/// +/// When the function returns `false`, the function should set *error to +/// a malloc-allocated buffer containing a useful error message. The +/// caller of this function (the VM) will make sure that the buffer is +/// freed. +/// +/// \param child_isolate_data The callback data to associate with the new +/// child isolate. +/// \param error A structure into which the embedder can place a +/// C string containing an error message in the case the initialization fails. +/// +/// \return The embedder returns true if the initialization was successful and +/// false otherwise (in which case the VM will terminate the isolate). +typedef Dart_InitializeIsolateCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer>, + ffi.Pointer>)>>; + +/// An isolate shutdown callback function. +/// +/// This callback, provided by the embedder, is called before the vm +/// shuts down an isolate. The isolate being shutdown will be the current +/// isolate. It is safe to run Dart code. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +/// \param isolate_data The same callback data which was passed to the isolate +/// when it was created. +typedef Dart_IsolateShutdownCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + +/// An isolate cleanup callback function. +/// +/// This callback, provided by the embedder, is called after the vm +/// shuts down an isolate. There will be no current isolate and it is *not* +/// safe to run Dart code. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +/// \param isolate_data The same callback data which was passed to the isolate +/// when it was created. +typedef Dart_IsolateCleanupCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + +/// An isolate group cleanup callback function. +/// +/// This callback, provided by the embedder, is called after the vm +/// shuts down an isolate group. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +typedef Dart_IsolateGroupCleanupCallback + = ffi.Pointer)>>; + +/// A thread death callback function. +/// This callback, provided by the embedder, is called before a thread in the +/// vm thread pool exits. +/// This function could be used to dispose of native resources that +/// are associated and attached to the thread, in order to avoid leaks. +typedef Dart_ThreadExitCallback + = ffi.Pointer>; + +/// Callbacks provided by the embedder for file operations. If the +/// embedder does not allow file operations these callbacks can be +/// NULL. +/// +/// Dart_FileOpenCallback - opens a file for reading or writing. +/// \param name The name of the file to open. +/// \param write A boolean variable which indicates if the file is to +/// opened for writing. If there is an existing file it needs to truncated. +/// +/// Dart_FileReadCallback - Read contents of file. +/// \param data Buffer allocated in the callback into which the contents +/// of the file are read into. It is the responsibility of the caller to +/// free this buffer. +/// \param file_length A variable into which the length of the file is returned. +/// In the case of an error this value would be -1. +/// \param stream Handle to the opened file. +/// +/// Dart_FileWriteCallback - Write data into file. +/// \param data Buffer which needs to be written into the file. +/// \param length Length of the buffer. +/// \param stream Handle to the opened file. +/// +/// Dart_FileCloseCallback - Closes the opened file. +/// \param stream Handle to the opened file. +typedef Dart_FileOpenCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Bool)>>; +typedef Dart_FileReadCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>; +typedef Dart_FileWriteCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.IntPtr, ffi.Pointer)>>; +typedef Dart_FileCloseCallback + = ffi.Pointer)>>; +typedef Dart_EntropySource = ffi.Pointer< + ffi.NativeFunction, ffi.IntPtr)>>; + +/// Callback provided by the embedder that is used by the vmservice isolate +/// to request the asset archive. The asset archive must be an uncompressed tar +/// archive that is stored in a Uint8List. +/// +/// If the embedder has no vmservice isolate assets, the callback can be NULL. +/// +/// \return The embedder must return a handle to a Uint8List containing an +/// uncompressed tar archive or null. +typedef Dart_GetVMServiceAssetsArchive + = ffi.Pointer>; +typedef Dart_IsolateGroup = ffi.Pointer<_Dart_IsolateGroup>; + +/// A message notification callback. +/// +/// This callback allows the embedder to provide an alternate wakeup +/// mechanism for the delivery of inter-isolate messages. It is the +/// responsibility of the embedder to call Dart_HandleMessage to +/// process the message. +typedef Dart_MessageNotifyCallback + = ffi.Pointer>; + +/// A port is used to send or receive inter-isolate messages +typedef Dart_Port = ffi.Int64; + +abstract class Dart_CoreType_Id { + static const int Dart_CoreType_Dynamic = 0; + static const int Dart_CoreType_Int = 1; + static const int Dart_CoreType_String = 2; +} + +/// ========== +/// Typed Data +/// ========== +abstract class Dart_TypedData_Type { + static const int Dart_TypedData_kByteData = 0; + static const int Dart_TypedData_kInt8 = 1; + static const int Dart_TypedData_kUint8 = 2; + static const int Dart_TypedData_kUint8Clamped = 3; + static const int Dart_TypedData_kInt16 = 4; + static const int Dart_TypedData_kUint16 = 5; + static const int Dart_TypedData_kInt32 = 6; + static const int Dart_TypedData_kUint32 = 7; + static const int Dart_TypedData_kInt64 = 8; + static const int Dart_TypedData_kUint64 = 9; + static const int Dart_TypedData_kFloat32 = 10; + static const int Dart_TypedData_kFloat64 = 11; + static const int Dart_TypedData_kInt32x4 = 12; + static const int Dart_TypedData_kFloat32x4 = 13; + static const int Dart_TypedData_kFloat64x2 = 14; + static const int Dart_TypedData_kInvalid = 15; +} + +class _Dart_NativeArguments extends ffi.Opaque {} + +/// The arguments to a native function. +/// +/// This object is passed to a native function to represent its +/// arguments and return value. It allows access to the arguments to a +/// native function by index. It also allows the return value of a +/// native function to be set. +typedef Dart_NativeArguments = ffi.Pointer<_Dart_NativeArguments>; + +abstract class Dart_NativeArgument_Type { + static const int Dart_NativeArgument_kBool = 0; + static const int Dart_NativeArgument_kInt32 = 1; + static const int Dart_NativeArgument_kUint32 = 2; + static const int Dart_NativeArgument_kInt64 = 3; + static const int Dart_NativeArgument_kUint64 = 4; + static const int Dart_NativeArgument_kDouble = 5; + static const int Dart_NativeArgument_kString = 6; + static const int Dart_NativeArgument_kInstance = 7; + static const int Dart_NativeArgument_kNativeFields = 8; +} + +class _Dart_NativeArgument_Descriptor extends ffi.Struct { + @ffi.Uint8() + external int type; + + @ffi.Uint8() + external int index; +} + +class _Dart_NativeArgument_Value extends ffi.Opaque {} + +typedef Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor; +typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; + +/// An environment lookup callback function. +/// +/// \param name The name of the value to lookup in the environment. +/// +/// \return A valid handle to a string if the name exists in the +/// current environment or Dart_Null() if not. +typedef Dart_EnvironmentCallback + = ffi.Pointer>; + +/// Native entry resolution callback. +/// +/// For libraries and scripts which have native functions, the embedder +/// can provide a native entry resolver. This callback is used to map a +/// name/arity to a Dart_NativeFunction. If no function is found, the +/// callback should return NULL. +/// +/// The parameters to the native resolver function are: +/// \param name a Dart string which is the name of the native function. +/// \param num_of_arguments is the number of arguments expected by the +/// native function. +/// \param auto_setup_scope is a boolean flag that can be set by the resolver +/// to indicate if this function needs a Dart API scope (see Dart_EnterScope/ +/// Dart_ExitScope) to be setup automatically by the VM before calling into +/// the native function. By default most native functions would require this +/// to be true but some light weight native functions which do not call back +/// into the VM through the Dart API may not require a Dart scope to be +/// setup automatically. +/// +/// \return A valid Dart_NativeFunction which resolves to a native entry point +/// for the native function. +/// +/// See Dart_SetNativeResolver. +typedef Dart_NativeEntryResolver = ffi.Pointer< + ffi.NativeFunction< + Dart_NativeFunction Function( + ffi.Handle, ffi.Int, ffi.Pointer)>>; + +/// A native function. +typedef Dart_NativeFunction + = ffi.Pointer>; + +/// Native entry symbol lookup callback. +/// +/// For libraries and scripts which have native functions, the embedder +/// can provide a callback for mapping a native entry to a symbol. This callback +/// maps a native function entry PC to the native function name. If no native +/// entry symbol can be found, the callback should return NULL. +/// +/// The parameters to the native reverse resolver function are: +/// \param nf A Dart_NativeFunction. +/// +/// \return A const UTF-8 string containing the symbol name or NULL. +/// +/// See Dart_SetNativeResolver. +typedef Dart_NativeEntrySymbol = ffi.Pointer< + ffi.NativeFunction Function(Dart_NativeFunction)>>; + +/// FFI Native C function pointer resolver callback. +/// +/// See Dart_SetFfiNativeResolver. +typedef Dart_FfiNativeResolver = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, uintptr_t)>>; + +/// ===================== +/// Scripts and Libraries +/// ===================== +abstract class Dart_LibraryTag { + static const int Dart_kCanonicalizeUrl = 0; + static const int Dart_kImportTag = 1; + static const int Dart_kKernelTag = 2; +} + +/// The library tag handler is a multi-purpose callback provided by the +/// embedder to the Dart VM. The embedder implements the tag handler to +/// provide the ability to load Dart scripts and imports. +/// +/// -- TAGS -- +/// +/// Dart_kCanonicalizeUrl +/// +/// This tag indicates that the embedder should canonicalize 'url' with +/// respect to 'library'. For most embedders, the +/// Dart_DefaultCanonicalizeUrl function is a sufficient implementation +/// of this tag. The return value should be a string holding the +/// canonicalized url. +/// +/// Dart_kImportTag +/// +/// This tag is used to load a library from IsolateMirror.loadUri. The embedder +/// should call Dart_LoadLibraryFromKernel to provide the library to the VM. The +/// return value should be an error or library (the result from +/// Dart_LoadLibraryFromKernel). +/// +/// Dart_kKernelTag +/// +/// This tag is used to load the intermediate file (kernel) generated by +/// the Dart front end. This tag is typically used when a 'hot-reload' +/// of an application is needed and the VM is 'use dart front end' mode. +/// The dart front end typically compiles all the scripts, imports and part +/// files into one intermediate file hence we don't use the source/import or +/// script tags. The return value should be an error or a TypedData containing +/// the kernel bytes. +typedef Dart_LibraryTagHandler = ffi.Pointer< + ffi.NativeFunction>; + +/// Handles deferred loading requests. When this handler is invoked, it should +/// eventually load the deferred loading unit with the given id and call +/// Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is +/// recommended that the loading occur asynchronously, but it is permitted to +/// call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the +/// handler returns. +/// +/// If an error is returned, it will be propogated through +/// `prefix.loadLibrary()`. This is useful for synchronous +/// implementations, which must propogate any unwind errors from +/// Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler +/// should return a non-error such as `Dart_Null()`. +typedef Dart_DeferredLoadHandler + = ffi.Pointer>; + +/// TODO(33433): Remove kernel service from the embedding API. +abstract class Dart_KernelCompilationStatus { + static const int Dart_KernelCompilationStatus_Unknown = -1; + static const int Dart_KernelCompilationStatus_Ok = 0; + static const int Dart_KernelCompilationStatus_Error = 1; + static const int Dart_KernelCompilationStatus_Crash = 2; + static const int Dart_KernelCompilationStatus_MsgFailed = 3; +} + +class Dart_KernelCompilationResult extends ffi.Struct { + @ffi.Int32() + external int status; + + @ffi.Bool() + external bool null_safety; + + external ffi.Pointer error; + + external ffi.Pointer kernel; + + @ffi.IntPtr() + external int kernel_size; +} + +abstract class Dart_KernelCompilationVerbosityLevel { + static const int Dart_KernelCompilationVerbosityLevel_Error = 0; + static const int Dart_KernelCompilationVerbosityLevel_Warning = 1; + static const int Dart_KernelCompilationVerbosityLevel_Info = 2; + static const int Dart_KernelCompilationVerbosityLevel_All = 3; +} + +class Dart_SourceFile extends ffi.Struct { + external ffi.Pointer uri; + + external ffi.Pointer source; +} + +typedef Dart_StreamingWriteCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.IntPtr)>>; +typedef Dart_CreateLoadingUnitCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer>, + ffi.Pointer>)>>; +typedef Dart_StreamingCloseCallback + = ffi.Pointer)>>; + +/// A Dart_CObject is used for representing Dart objects as native C +/// data outside the Dart heap. These objects are totally detached from +/// the Dart heap. Only a subset of the Dart objects have a +/// representation as a Dart_CObject. +/// +/// The string encoding in the 'value.as_string' is UTF-8. +/// +/// All the different types from dart:typed_data are exposed as type +/// kTypedData. The specific type from dart:typed_data is in the type +/// field of the as_typed_data structure. The length in the +/// as_typed_data structure is always in bytes. +/// +/// The data for kTypedData is copied on message send and ownership remains with +/// the caller. The ownership of data for kExternalTyped is passed to the VM on +/// message send and returned when the VM invokes the +/// Dart_HandleFinalizer callback; a non-NULL callback must be provided. +abstract class Dart_CObject_Type { + static const int Dart_CObject_kNull = 0; + static const int Dart_CObject_kBool = 1; + static const int Dart_CObject_kInt32 = 2; + static const int Dart_CObject_kInt64 = 3; + static const int Dart_CObject_kDouble = 4; + static const int Dart_CObject_kString = 5; + static const int Dart_CObject_kArray = 6; + static const int Dart_CObject_kTypedData = 7; + static const int Dart_CObject_kExternalTypedData = 8; + static const int Dart_CObject_kSendPort = 9; + static const int Dart_CObject_kCapability = 10; + static const int Dart_CObject_kNativePointer = 11; + static const int Dart_CObject_kUnsupported = 12; + static const int Dart_CObject_kNumberOfTypes = 13; +} + +class _Dart_CObject extends ffi.Struct { + @ffi.Int32() + external int type; + + external UnnamedUnion5 value; +} + +class UnnamedUnion5 extends ffi.Union { + @ffi.Bool() + external bool as_bool; + + @ffi.Int32() + external int as_int32; + + @ffi.Int64() + external int as_int64; + + @ffi.Double() + external double as_double; + + external ffi.Pointer as_string; + + external UnnamedStruct5 as_send_port; + + external UnnamedStruct6 as_capability; + + external UnnamedStruct7 as_array; + + external UnnamedStruct8 as_typed_data; + + external UnnamedStruct9 as_external_typed_data; + + external UnnamedStruct10 as_native_pointer; +} + +class UnnamedStruct5 extends ffi.Struct { + @Dart_Port() + external int id; + + @Dart_Port() + external int origin_id; +} + +class UnnamedStruct6 extends ffi.Struct { + @ffi.Int64() + external int id; +} + +class UnnamedStruct7 extends ffi.Struct { + @ffi.IntPtr() + external int length; + + external ffi.Pointer> values; +} + +class UnnamedStruct8 extends ffi.Struct { + @ffi.Int32() + external int type; + + /// in elements, not bytes + @ffi.IntPtr() + external int length; + + external ffi.Pointer values; +} + +class UnnamedStruct9 extends ffi.Struct { + @ffi.Int32() + external int type; + + /// in elements, not bytes + @ffi.IntPtr() + external int length; + + external ffi.Pointer data; + + external ffi.Pointer peer; + + external Dart_HandleFinalizer callback; +} + +class UnnamedStruct10 extends ffi.Struct { + @ffi.IntPtr() + external int ptr; + + @ffi.IntPtr() + external int size; + + external Dart_HandleFinalizer callback; +} + +typedef Dart_CObject = _Dart_CObject; + +/// A native message handler. +/// +/// This handler is associated with a native port by calling +/// Dart_NewNativePort. +/// +/// The message received is decoded into the message structure. The +/// lifetime of the message data is controlled by the caller. All the +/// data references from the message are allocated by the caller and +/// will be reclaimed when returning to it. +typedef Dart_NativeMessageHandler = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_Port, ffi.Pointer)>>; +typedef Dart_PostCObject_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(Dart_Port_DL, ffi.Pointer)>>; + +/// ============================================================================ +/// IMPORTANT! Never update these signatures without properly updating +/// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. +/// +/// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types +/// to trigger compile-time errors if the sybols in those files are updated +/// without updating these. +/// +/// Function return and argument types, and typedefs are carbon copied. Structs +/// are typechecked nominally in C/C++, so they are not copied, instead a +/// comment is added to their definition. +typedef Dart_Port_DL = ffi.Int64; +typedef Dart_PostInteger_Type = ffi + .Pointer>; +typedef Dart_NewNativePort_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_Port_DL Function( + ffi.Pointer, Dart_NativeMessageHandler_DL, ffi.Bool)>>; +typedef Dart_NativeMessageHandler_DL = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_Port_DL, ffi.Pointer)>>; +typedef Dart_CloseNativePort_Type + = ffi.Pointer>; +typedef Dart_IsError_Type + = ffi.Pointer>; +typedef Dart_IsApiError_Type + = ffi.Pointer>; +typedef Dart_IsUnhandledExceptionError_Type + = ffi.Pointer>; +typedef Dart_IsCompilationError_Type + = ffi.Pointer>; +typedef Dart_IsFatalError_Type + = ffi.Pointer>; +typedef Dart_GetError_Type = ffi + .Pointer Function(ffi.Handle)>>; +typedef Dart_ErrorHasException_Type + = ffi.Pointer>; +typedef Dart_ErrorGetException_Type + = ffi.Pointer>; +typedef Dart_ErrorGetStackTrace_Type + = ffi.Pointer>; +typedef Dart_NewApiError_Type = ffi + .Pointer)>>; +typedef Dart_NewCompilationError_Type = ffi + .Pointer)>>; +typedef Dart_NewUnhandledExceptionError_Type + = ffi.Pointer>; +typedef Dart_PropagateError_Type + = ffi.Pointer>; +typedef Dart_HandleFromPersistent_Type + = ffi.Pointer>; +typedef Dart_HandleFromWeakPersistent_Type = ffi.Pointer< + ffi.NativeFunction>; +typedef Dart_NewPersistentHandle_Type + = ffi.Pointer>; +typedef Dart_SetPersistentHandle_Type = ffi + .Pointer>; +typedef Dart_DeletePersistentHandle_Type + = ffi.Pointer>; +typedef Dart_NewWeakPersistentHandle_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_WeakPersistentHandle Function(ffi.Handle, ffi.Pointer, + ffi.IntPtr, Dart_HandleFinalizer)>>; +typedef Dart_DeleteWeakPersistentHandle_Type = ffi + .Pointer>; +typedef Dart_UpdateExternalSize_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_WeakPersistentHandle, ffi.IntPtr)>>; +typedef Dart_NewFinalizableHandle_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, + ffi.IntPtr, Dart_HandleFinalizer)>>; +typedef Dart_DeleteFinalizableHandle_Type = ffi.Pointer< + ffi.NativeFunction>; +typedef Dart_UpdateFinalizableExternalSize_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, ffi.IntPtr)>>; +typedef Dart_Post_Type = ffi + .Pointer>; +typedef Dart_NewSendPort_Type + = ffi.Pointer>; +typedef Dart_SendPortGetId_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer)>>; +typedef Dart_EnterScope_Type + = ffi.Pointer>; +typedef Dart_ExitScope_Type + = ffi.Pointer>; + +/// The type of message being sent to a Dart port. See CUPHTTPClientDelegate. +abstract class MessageType { + static const int ResponseMessage = 0; + static const int DataMessage = 1; + static const int CompletedMessage = 2; + static const int RedirectMessage = 3; + static const int FinishedDownloading = 4; +} + +/// The configuration associated with a NSURLSessionTask. +/// See CUPHTTPClientDelegate. +class CUPHTTPTaskConfiguration extends NSObject { + CUPHTTPTaskConfiguration._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPTaskConfiguration] that points to the same underlying object as [other]. + static CUPHTTPTaskConfiguration castFrom(T other) { + return CUPHTTPTaskConfiguration._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPTaskConfiguration] that wraps the given raw object pointer. + static CUPHTTPTaskConfiguration castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPTaskConfiguration._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPTaskConfiguration]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPTaskConfiguration1); + } + + NSObject initWithPort_(int sendPort) { + final _ret = + _lib._objc_msgSend_470(_id, _lib._sel_initWithPort_1, sendPort); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + int get sendPort { + return _lib._objc_msgSend_325(_id, _lib._sel_sendPort1); + } + + static CUPHTTPTaskConfiguration new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_new1); + return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPTaskConfiguration alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_alloc1); + return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + } +} + +/// A delegate for NSURLSession that forwards events for registered +/// NSURLSessionTasks and forwards them to a port for consumption in Dart. +/// +/// The messages sent to the port are contained in a List with one of 3 +/// possible formats: +/// +/// 1. When the delegate receives a HTTP redirect response: +/// [MessageType::RedirectMessage, ] +/// +/// 2. When the delegate receives a HTTP response: +/// [MessageType::ResponseMessage, ] +/// +/// 3. When the delegate receives some HTTP data: +/// [MessageType::DataMessage, ] +/// +/// 4. When the delegate is informed that the response is complete: +/// [MessageType::CompletedMessage, ] +class CUPHTTPClientDelegate extends NSObject { + CUPHTTPClientDelegate._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPClientDelegate] that points to the same underlying object as [other]. + static CUPHTTPClientDelegate castFrom(T other) { + return CUPHTTPClientDelegate._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPClientDelegate] that wraps the given raw object pointer. + static CUPHTTPClientDelegate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPClientDelegate._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPClientDelegate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPClientDelegate1); + } + + /// Instruct the delegate to forward events for the given task to the port + /// specified in the configuration. + void registerTask_withConfiguration_( + NSURLSessionTask? task, CUPHTTPTaskConfiguration? config) { + return _lib._objc_msgSend_471( + _id, + _lib._sel_registerTask_withConfiguration_1, + task?._id ?? ffi.nullptr, + config?._id ?? ffi.nullptr); + } + + static CUPHTTPClientDelegate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPClientDelegate1, _lib._sel_new1); + return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPClientDelegate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPClientDelegate1, _lib._sel_alloc1); + return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + } +} + +/// An object used to communicate redirect information to Dart code. +/// +/// The flow is: +/// 1. CUPHTTPClientDelegate receives a message from the URL Loading System. +/// 2. CUPHTTPClientDelegate creates a new CUPHTTPForwardedDelegate subclass. +/// 3. CUPHTTPClientDelegate sends the CUPHTTPForwardedDelegate to the +/// configured Dart_Port. +/// 4. CUPHTTPClientDelegate waits on CUPHTTPForwardedDelegate.lock +/// 5. When the Dart code is done process the message received on the port, +/// it calls [CUPHTTPForwardedDelegate finish*], which releases the lock. +/// 6. CUPHTTPClientDelegate continues running. +class CUPHTTPForwardedDelegate extends NSObject { + CUPHTTPForwardedDelegate._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedDelegate] that points to the same underlying object as [other]. + static CUPHTTPForwardedDelegate castFrom(T other) { + return CUPHTTPForwardedDelegate._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedDelegate] that wraps the given raw object pointer. + static CUPHTTPForwardedDelegate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedDelegate._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedDelegate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedDelegate1); + } + + NSObject initWithSession_task_( + NSURLSession? session, NSURLSessionTask? task) { + final _ret = _lib._objc_msgSend_472(_id, _lib._sel_initWithSession_task_1, + session?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// Indicates that the task should continue executing using the given request. + void finish() { + return _lib._objc_msgSend_1(_id, _lib._sel_finish1); + } + + NSURLSession? get session { + final _ret = _lib._objc_msgSend_380(_id, _lib._sel_session1); + return _ret.address == 0 + ? null + : NSURLSession._(_ret, _lib, retain: true, release: true); + } + + NSURLSessionTask? get task { + final _ret = _lib._objc_msgSend_473(_id, _lib._sel_task1); + return _ret.address == 0 + ? null + : NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } + + /// This property is meant to be used only by CUPHTTPClientDelegate. + NSLock? get lock { + final _ret = _lib._objc_msgSend_474(_id, _lib._sel_lock1); + return _ret.address == 0 + ? null + : NSLock._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedDelegate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_new1); + return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedDelegate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_alloc1); + return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + } +} + +class NSLock extends _ObjCWrapper { + NSLock._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSLock] that points to the same underlying object as [other]. + static NSLock castFrom(T other) { + return NSLock._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSLock] that wraps the given raw object pointer. + static NSLock castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSLock._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSLock]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLock1); + } +} + +class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedRedirect._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedRedirect] that points to the same underlying object as [other]. + static CUPHTTPForwardedRedirect castFrom(T other) { + return CUPHTTPForwardedRedirect._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedRedirect] that wraps the given raw object pointer. + static CUPHTTPForwardedRedirect castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedRedirect._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedRedirect]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedRedirect1); + } + + NSObject initWithSession_task_response_request_( + NSURLSession? session, + NSURLSessionTask? task, + NSHTTPURLResponse? response, + NSURLRequest? request) { + final _ret = _lib._objc_msgSend_475( + _id, + _lib._sel_initWithSession_task_response_request_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + response?._id ?? ffi.nullptr, + request?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + /// Indicates that the task should continue executing using the given request. + /// If the request is NIL then the redirect is not followed and the task is + /// complete. + void finishWithRequest_(NSURLRequest? request) { + return _lib._objc_msgSend_476( + _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); + } + + NSHTTPURLResponse? get response { + final _ret = _lib._objc_msgSend_477(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + } + + NSURLRequest? get request { + final _ret = _lib._objc_msgSend_371(_id, _lib._sel_request1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// This property is meant to be used only by CUPHTTPClientDelegate. + NSURLRequest? get redirectRequest { + final _ret = _lib._objc_msgSend_371(_id, _lib._sel_redirectRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedRedirect new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_new1); + return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedRedirect alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_alloc1); + return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + } +} + +class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedResponse._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedResponse] that points to the same underlying object as [other]. + static CUPHTTPForwardedResponse castFrom(T other) { + return CUPHTTPForwardedResponse._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedResponse] that wraps the given raw object pointer. + static CUPHTTPForwardedResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedResponse._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedResponse1); + } + + NSObject initWithSession_task_response_( + NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { + final _ret = _lib._objc_msgSend_478( + _id, + _lib._sel_initWithSession_task_response_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + response?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + void finishWithDisposition_(int disposition) { + return _lib._objc_msgSend_479( + _id, _lib._sel_finishWithDisposition_1, disposition); + } + + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_373(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// This property is meant to be used only by CUPHTTPClientDelegate. + int get disposition { + return _lib._objc_msgSend_480(_id, _lib._sel_disposition1); + } + + static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedResponse1, _lib._sel_new1); + return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedResponse alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedResponse1, _lib._sel_alloc1); + return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + } +} + +class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedData] that points to the same underlying object as [other]. + static CUPHTTPForwardedData castFrom(T other) { + return CUPHTTPForwardedData._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedData] that wraps the given raw object pointer. + static CUPHTTPForwardedData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedData._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedData1); + } + + NSObject initWithSession_task_data_( + NSURLSession? session, NSURLSessionTask? task, NSData? data) { + final _ret = _lib._objc_msgSend_481( + _id, + _lib._sel_initWithSession_task_data_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + data?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSData? get data { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_CUPHTTPForwardedData1, _lib._sel_new1); + return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedData alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedData1, _lib._sel_alloc1); + return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + } +} + +class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedComplete._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedComplete] that points to the same underlying object as [other]. + static CUPHTTPForwardedComplete castFrom(T other) { + return CUPHTTPForwardedComplete._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedComplete] that wraps the given raw object pointer. + static CUPHTTPForwardedComplete castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedComplete._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedComplete]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedComplete1); + } + + NSObject initWithSession_task_error_( + NSURLSession? session, NSURLSessionTask? task, NSError? error) { + final _ret = _lib._objc_msgSend_482( + _id, + _lib._sel_initWithSession_task_error_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + error?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSError? get error { + final _ret = _lib._objc_msgSend_376(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedComplete new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedComplete1, _lib._sel_new1); + return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + } + + static CUPHTTPForwardedComplete alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedComplete1, _lib._sel_alloc1); + return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + } +} + +class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedFinishedDownloading._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedFinishedDownloading] that points to the same underlying object as [other]. + static CUPHTTPForwardedFinishedDownloading castFrom( + T other) { + return CUPHTTPForwardedFinishedDownloading._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedFinishedDownloading] that wraps the given raw object pointer. + static CUPHTTPForwardedFinishedDownloading castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedFinishedDownloading._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedFinishedDownloading]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedFinishedDownloading1); + } + + NSObject initWithSession_downloadTask_url_(NSURLSession? session, + NSURLSessionDownloadTask? downloadTask, NSURL? location) { + final _ret = _lib._objc_msgSend_483( + _id, + _lib._sel_initWithSession_downloadTask_url_1, + session?._id ?? ffi.nullptr, + downloadTask?._id ?? ffi.nullptr, + location?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSURL? get location { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_location1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedFinishedDownloading new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_new1); + return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, + retain: false, release: true); + } + + static CUPHTTPForwardedFinishedDownloading alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_alloc1); + return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, + retain: false, release: true); + } +} + +const int noErr = 0; + +const int kNilOptions = 0; + +const int kVariableLengthArray = 1; + +const int kUnknownType = 1061109567; + +const int normal = 0; + +const int bold = 1; + +const int italic = 2; + +const int underline = 4; + +const int outline = 8; + +const int shadow = 16; + +const int condense = 32; + +const int extend = 64; + +const int developStage = 32; + +const int alphaStage = 64; + +const int betaStage = 96; + +const int finalStage = 128; + +const int NSScannedOption = 1; + +const int NSCollectorDisabledOption = 2; + +const int errSecSuccess = 0; + +const int errSecUnimplemented = -4; + +const int errSecDiskFull = -34; + +const int errSecDskFull = -34; + +const int errSecIO = -36; + +const int errSecOpWr = -49; + +const int errSecParam = -50; + +const int errSecWrPerm = -61; + +const int errSecAllocate = -108; + +const int errSecUserCanceled = -128; + +const int errSecBadReq = -909; + +const int errSecInternalComponent = -2070; + +const int errSecCoreFoundationUnknown = -4960; + +const int errSecMissingEntitlement = -34018; + +const int errSecRestrictedAPI = -34020; + +const int errSecNotAvailable = -25291; + +const int errSecReadOnly = -25292; + +const int errSecAuthFailed = -25293; + +const int errSecNoSuchKeychain = -25294; + +const int errSecInvalidKeychain = -25295; + +const int errSecDuplicateKeychain = -25296; + +const int errSecDuplicateCallback = -25297; + +const int errSecInvalidCallback = -25298; + +const int errSecDuplicateItem = -25299; + +const int errSecItemNotFound = -25300; + +const int errSecBufferTooSmall = -25301; + +const int errSecDataTooLarge = -25302; + +const int errSecNoSuchAttr = -25303; + +const int errSecInvalidItemRef = -25304; + +const int errSecInvalidSearchRef = -25305; + +const int errSecNoSuchClass = -25306; + +const int errSecNoDefaultKeychain = -25307; + +const int errSecInteractionNotAllowed = -25308; + +const int errSecReadOnlyAttr = -25309; + +const int errSecWrongSecVersion = -25310; + +const int errSecKeySizeNotAllowed = -25311; + +const int errSecNoStorageModule = -25312; + +const int errSecNoCertificateModule = -25313; + +const int errSecNoPolicyModule = -25314; + +const int errSecInteractionRequired = -25315; + +const int errSecDataNotAvailable = -25316; + +const int errSecDataNotModifiable = -25317; + +const int errSecCreateChainFailed = -25318; + +const int errSecInvalidPrefsDomain = -25319; + +const int errSecInDarkWake = -25320; + +const int errSecACLNotSimple = -25240; + +const int errSecPolicyNotFound = -25241; + +const int errSecInvalidTrustSetting = -25242; + +const int errSecNoAccessForItem = -25243; + +const int errSecInvalidOwnerEdit = -25244; + +const int errSecTrustNotAvailable = -25245; + +const int errSecUnsupportedFormat = -25256; + +const int errSecUnknownFormat = -25257; + +const int errSecKeyIsSensitive = -25258; + +const int errSecMultiplePrivKeys = -25259; + +const int errSecPassphraseRequired = -25260; + +const int errSecInvalidPasswordRef = -25261; + +const int errSecInvalidTrustSettings = -25262; + +const int errSecNoTrustSettings = -25263; + +const int errSecPkcs12VerifyFailure = -25264; + +const int errSecNotSigner = -26267; + +const int errSecDecode = -26275; + +const int errSecServiceNotAvailable = -67585; + +const int errSecInsufficientClientID = -67586; + +const int errSecDeviceReset = -67587; + +const int errSecDeviceFailed = -67588; + +const int errSecAppleAddAppACLSubject = -67589; + +const int errSecApplePublicKeyIncomplete = -67590; + +const int errSecAppleSignatureMismatch = -67591; + +const int errSecAppleInvalidKeyStartDate = -67592; + +const int errSecAppleInvalidKeyEndDate = -67593; + +const int errSecConversionError = -67594; + +const int errSecAppleSSLv2Rollback = -67595; + +const int errSecQuotaExceeded = -67596; + +const int errSecFileTooBig = -67597; + +const int errSecInvalidDatabaseBlob = -67598; + +const int errSecInvalidKeyBlob = -67599; + +const int errSecIncompatibleDatabaseBlob = -67600; + +const int errSecIncompatibleKeyBlob = -67601; + +const int errSecHostNameMismatch = -67602; + +const int errSecUnknownCriticalExtensionFlag = -67603; + +const int errSecNoBasicConstraints = -67604; + +const int errSecNoBasicConstraintsCA = -67605; + +const int errSecInvalidAuthorityKeyID = -67606; + +const int errSecInvalidSubjectKeyID = -67607; + +const int errSecInvalidKeyUsageForPolicy = -67608; + +const int errSecInvalidExtendedKeyUsage = -67609; + +const int errSecInvalidIDLinkage = -67610; + +const int errSecPathLengthConstraintExceeded = -67611; + +const int errSecInvalidRoot = -67612; + +const int errSecCRLExpired = -67613; + +const int errSecCRLNotValidYet = -67614; + +const int errSecCRLNotFound = -67615; + +const int errSecCRLServerDown = -67616; + +const int errSecCRLBadURI = -67617; + +const int errSecUnknownCertExtension = -67618; + +const int errSecUnknownCRLExtension = -67619; + +const int errSecCRLNotTrusted = -67620; + +const int errSecCRLPolicyFailed = -67621; + +const int errSecIDPFailure = -67622; + +const int errSecSMIMEEmailAddressesNotFound = -67623; + +const int errSecSMIMEBadExtendedKeyUsage = -67624; + +const int errSecSMIMEBadKeyUsage = -67625; + +const int errSecSMIMEKeyUsageNotCritical = -67626; + +const int errSecSMIMENoEmailAddress = -67627; + +const int errSecSMIMESubjAltNameNotCritical = -67628; + +const int errSecSSLBadExtendedKeyUsage = -67629; + +const int errSecOCSPBadResponse = -67630; + +const int errSecOCSPBadRequest = -67631; + +const int errSecOCSPUnavailable = -67632; + +const int errSecOCSPStatusUnrecognized = -67633; + +const int errSecEndOfData = -67634; + +const int errSecIncompleteCertRevocationCheck = -67635; + +const int errSecNetworkFailure = -67636; + +const int errSecOCSPNotTrustedToAnchor = -67637; + +const int errSecRecordModified = -67638; + +const int errSecOCSPSignatureError = -67639; + +const int errSecOCSPNoSigner = -67640; + +const int errSecOCSPResponderMalformedReq = -67641; + +const int errSecOCSPResponderInternalError = -67642; + +const int errSecOCSPResponderTryLater = -67643; + +const int errSecOCSPResponderSignatureRequired = -67644; + +const int errSecOCSPResponderUnauthorized = -67645; + +const int errSecOCSPResponseNonceMismatch = -67646; + +const int errSecCodeSigningBadCertChainLength = -67647; + +const int errSecCodeSigningNoBasicConstraints = -67648; + +const int errSecCodeSigningBadPathLengthConstraint = -67649; + +const int errSecCodeSigningNoExtendedKeyUsage = -67650; + +const int errSecCodeSigningDevelopment = -67651; + +const int errSecResourceSignBadCertChainLength = -67652; + +const int errSecResourceSignBadExtKeyUsage = -67653; + +const int errSecTrustSettingDeny = -67654; + +const int errSecInvalidSubjectName = -67655; + +const int errSecUnknownQualifiedCertStatement = -67656; + +const int errSecMobileMeRequestQueued = -67657; + +const int errSecMobileMeRequestRedirected = -67658; + +const int errSecMobileMeServerError = -67659; + +const int errSecMobileMeServerNotAvailable = -67660; + +const int errSecMobileMeServerAlreadyExists = -67661; + +const int errSecMobileMeServerServiceErr = -67662; + +const int errSecMobileMeRequestAlreadyPending = -67663; + +const int errSecMobileMeNoRequestPending = -67664; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} +const int errSecMobileMeCSRVerifyFailure = -67665; -typedef NSItemProviderCompletionHandler = ffi.Pointer<_ObjCBlock>; +const int errSecMobileMeFailedConsistencyCheck = -67666; -abstract class NSItemProviderErrorCode { - static const int NSItemProviderUnknownError = -1; - static const int NSItemProviderItemUnavailableError = -1000; - static const int NSItemProviderUnexpectedValueClassError = -1100; - static const int NSItemProviderUnavailableCoercionError = -1200; -} +const int errSecNotInitialized = -67667; -typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; +const int errSecInvalidHandleUsage = -67668; -class NSMutableString extends NSString { - NSMutableString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int errSecPVCReferentNotFound = -67669; - /// Returns a [NSMutableString] that points to the same underlying object as [other]. - static NSMutableString castFrom(T other) { - return NSMutableString._(other._id, other._lib, - retain: true, release: true); - } +const int errSecFunctionIntegrityFail = -67670; - /// Returns a [NSMutableString] that wraps the given raw object pointer. - static NSMutableString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableString._(other, lib, retain: retain, release: release); - } +const int errSecInternalError = -67671; - /// Returns whether [obj] is an instance of [NSMutableString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableString1); - } +const int errSecMemoryError = -67672; - void replaceCharactersInRange_withString_(NSRange range, NSString? aString) { - return _lib._objc_msgSend_454( - _id, - _lib._sel_replaceCharactersInRange_withString_1, - range, - aString?._id ?? ffi.nullptr); - } +const int errSecInvalidData = -67673; - void insertString_atIndex_(NSString? aString, int loc) { - return _lib._objc_msgSend_455(_id, _lib._sel_insertString_atIndex_1, - aString?._id ?? ffi.nullptr, loc); - } +const int errSecMDSError = -67674; - void deleteCharactersInRange_(NSRange range) { - return _lib._objc_msgSend_287( - _id, _lib._sel_deleteCharactersInRange_1, range); - } +const int errSecInvalidPointer = -67675; - void appendString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_appendString_1, aString?._id ?? ffi.nullptr); - } +const int errSecSelfCheckFailed = -67676; - void appendFormat_(NSString? format) { - return _lib._objc_msgSend_188( - _id, _lib._sel_appendFormat_1, format?._id ?? ffi.nullptr); - } +const int errSecFunctionFailed = -67677; - void setString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_setString_1, aString?._id ?? ffi.nullptr); - } +const int errSecModuleManifestVerifyFailed = -67678; - int replaceOccurrencesOfString_withString_options_range_(NSString? target, - NSString? replacement, int options, NSRange searchRange) { - return _lib._objc_msgSend_456( - _id, - _lib._sel_replaceOccurrencesOfString_withString_options_range_1, - target?._id ?? ffi.nullptr, - replacement?._id ?? ffi.nullptr, - options, - searchRange); - } +const int errSecInvalidGUID = -67679; - bool applyTransform_reverse_range_updatedRange_(NSStringTransform transform, - bool reverse, NSRange range, NSRangePointer resultingRange) { - return _lib._objc_msgSend_457( - _id, - _lib._sel_applyTransform_reverse_range_updatedRange_1, - transform, - reverse, - range, - resultingRange); - } +const int errSecInvalidHandle = -67680; - NSMutableString initWithCapacity_(int capacity) { - final _ret = - _lib._objc_msgSend_458(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidDBList = -67681; - static NSMutableString stringWithCapacity_( - NativeCupertinoHttp _lib, int capacity) { - final _ret = _lib._objc_msgSend_458( - _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidPassthroughID = -67682; - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); - } +const int errSecInvalidNetworkAddress = -67683; - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSMutableString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecCRLAlreadySigned = -67684; - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); - } +const int errSecInvalidNumberOfFields = -67685; - static NSMutableString string(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_string1); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecVerificationFailure = -67686; - static NSMutableString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecUnknownTag = -67687; - static NSMutableString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSMutableString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidSignature = -67688; - static NSMutableString stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSMutableString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidName = -67689; - static NSMutableString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidCertificateRef = -67690; - static NSMutableString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidCertificateGroup = -67691; - static NSMutableString stringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( - _lib._class_NSMutableString1, - _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecTagNotFound = -67692; - static NSMutableString - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( - _lib._class_NSMutableString1, - _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidQuery = -67693; - static NSMutableString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSMutableString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidValue = -67694; - static NSMutableString stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_269( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecCallbackFailed = -67695; - static NSMutableString stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_270( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecACLDeleteFailed = -67696; - static NSMutableString stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_271( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecACLReplaceFailed = -67697; - static NSMutableString stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_272( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +const int errSecACLAddFailed = -67698; - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData? data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_273( - _lib._class_NSMutableString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } +const int errSecACLChangeFailed = -67699; - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAccessCredentials = -67700; - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidRecord = -67701; - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSMutableString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidACL = -67702; - static NSObject stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( - _lib._class_NSMutableString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidSampleValue = -67703; - static NSMutableString new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_new1); - return NSMutableString._(_ret, _lib, retain: false, release: true); - } +const int errSecIncompatibleVersion = -67704; - static NSMutableString alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_alloc1); - return NSMutableString._(_ret, _lib, retain: false, release: true); - } -} +const int errSecPrivilegeNotGranted = -67705; -typedef NSExceptionName = ffi.Pointer; +const int errSecInvalidScope = -67706; -class NSSimpleCString extends NSString { - NSSimpleCString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int errSecPVCAlreadyConfigured = -67707; - /// Returns a [NSSimpleCString] that points to the same underlying object as [other]. - static NSSimpleCString castFrom(T other) { - return NSSimpleCString._(other._id, other._lib, - retain: true, release: true); - } +const int errSecInvalidPVC = -67708; - /// Returns a [NSSimpleCString] that wraps the given raw object pointer. - static NSSimpleCString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSSimpleCString._(other, lib, retain: retain, release: release); - } +const int errSecEMMLoadFailed = -67709; - /// Returns whether [obj] is an instance of [NSSimpleCString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSSimpleCString1); - } +const int errSecEMMUnloadFailed = -67710; - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSSimpleCString1, _lib._sel_availableStringEncodings1); - } +const int errSecAddinLoadFailed = -67711; - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSSimpleCString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidKeyRef = -67712; - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSSimpleCString1, _lib._sel_defaultCStringEncoding1); - } +const int errSecInvalidKeyHierarchy = -67713; - static NSSimpleCString string(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_string1); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecAddinUnloadFailed = -67714; - static NSSimpleCString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecLibraryReferenceNotFound = -67715; - static NSSimpleCString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSSimpleCString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAddinFunctionTable = -67716; - static NSSimpleCString stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSSimpleCString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidServiceMask = -67717; - static NSSimpleCString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecModuleNotLoaded = -67718; - static NSSimpleCString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidSubServiceID = -67719; - static NSSimpleCString stringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecAttributeNotInContext = -67720; - static NSSimpleCString - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( - _lib._class_NSSimpleCString1, - _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecModuleManagerInitializeFailed = -67721; - static NSSimpleCString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSSimpleCString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecModuleManagerNotFound = -67722; - static NSSimpleCString stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_269( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecEventNotificationCallbackNotFound = -67723; - static NSSimpleCString stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_270( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecInputLengthError = -67724; - static NSSimpleCString stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_271( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecOutputLengthError = -67725; - static NSSimpleCString stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_272( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +const int errSecPrivilegeNotSupported = -67726; - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData? data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_273( - _lib._class_NSSimpleCString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } +const int errSecDeviceError = -67727; + +const int errSecAttachHandleBusy = -67728; + +const int errSecNotLoggedIn = -67729; + +const int errSecAlgorithmMismatch = -67730; + +const int errSecKeyUsageIncorrect = -67731; + +const int errSecKeyBlobTypeIncorrect = -67732; + +const int errSecKeyHeaderInconsistent = -67733; - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSecUnsupportedKeyFormat = -67734; - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSecUnsupportedKeySize = -67735; - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSSimpleCString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidKeyUsageMask = -67736; - static NSObject stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( - _lib._class_NSSimpleCString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSecUnsupportedKeyUsageMask = -67737; - static NSSimpleCString new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_new1); - return NSSimpleCString._(_ret, _lib, retain: false, release: true); - } +const int errSecInvalidKeyAttributeMask = -67738; - static NSSimpleCString alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_alloc1); - return NSSimpleCString._(_ret, _lib, retain: false, release: true); - } -} +const int errSecUnsupportedKeyAttributeMask = -67739; -class NSConstantString extends NSSimpleCString { - NSConstantString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int errSecInvalidKeyLabel = -67740; - /// Returns a [NSConstantString] that points to the same underlying object as [other]. - static NSConstantString castFrom(T other) { - return NSConstantString._(other._id, other._lib, - retain: true, release: true); - } +const int errSecUnsupportedKeyLabel = -67741; - /// Returns a [NSConstantString] that wraps the given raw object pointer. - static NSConstantString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSConstantString._(other, lib, retain: retain, release: release); - } +const int errSecInvalidKeyFormat = -67742; - /// Returns whether [obj] is an instance of [NSConstantString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSConstantString1); - } +const int errSecUnsupportedVectorOfBuffers = -67743; - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSConstantString1, _lib._sel_availableStringEncodings1); - } +const int errSecInvalidInputVector = -67744; - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSConstantString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidOutputVector = -67745; - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSConstantString1, _lib._sel_defaultCStringEncoding1); - } +const int errSecInvalidContext = -67746; - static NSConstantString string(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_string1); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAlgorithm = -67747; - static NSConstantString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeKey = -67748; - static NSConstantString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSConstantString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeKey = -67749; - static NSConstantString stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSConstantString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeInitVector = -67750; - static NSConstantString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeInitVector = -67751; - static NSConstantString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeSalt = -67752; - static NSConstantString - stringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( - _lib._class_NSConstantString1, - _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeSalt = -67753; - static NSConstantString - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( - _lib._class_NSConstantString1, - _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributePadding = -67754; - static NSConstantString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSConstantString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributePadding = -67755; - static NSConstantString stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_269( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeRandom = -67756; - static NSConstantString stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_270( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeRandom = -67757; - static NSConstantString stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_271( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeSeed = -67758; - static NSConstantString stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_272( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeSeed = -67759; - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData? data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_273( - _lib._class_NSConstantString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } +const int errSecInvalidAttributePassphrase = -67760; - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributePassphrase = -67761; - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeKeyLength = -67762; - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSConstantString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeKeyLength = -67763; - static NSObject stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( - _lib._class_NSConstantString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeBlockSize = -67764; - static NSConstantString new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_new1); - return NSConstantString._(_ret, _lib, retain: false, release: true); - } +const int errSecMissingAttributeBlockSize = -67765; - static NSConstantString alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_alloc1); - return NSConstantString._(_ret, _lib, retain: false, release: true); - } -} +const int errSecInvalidAttributeOutputSize = -67766; -class NSMutableCharacterSet extends NSCharacterSet { - NSMutableCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int errSecMissingAttributeOutputSize = -67767; - /// Returns a [NSMutableCharacterSet] that points to the same underlying object as [other]. - static NSMutableCharacterSet castFrom(T other) { - return NSMutableCharacterSet._(other._id, other._lib, - retain: true, release: true); - } +const int errSecInvalidAttributeRounds = -67768; - /// Returns a [NSMutableCharacterSet] that wraps the given raw object pointer. - static NSMutableCharacterSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableCharacterSet._(other, lib, - retain: retain, release: release); - } +const int errSecMissingAttributeRounds = -67769; - /// Returns whether [obj] is an instance of [NSMutableCharacterSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableCharacterSet1); - } +const int errSecInvalidAlgorithmParms = -67770; - void addCharactersInRange_(NSRange aRange) { - return _lib._objc_msgSend_287( - _id, _lib._sel_addCharactersInRange_1, aRange); - } +const int errSecMissingAlgorithmParms = -67771; - void removeCharactersInRange_(NSRange aRange) { - return _lib._objc_msgSend_287( - _id, _lib._sel_removeCharactersInRange_1, aRange); - } +const int errSecInvalidAttributeLabel = -67772; - void addCharactersInString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_addCharactersInString_1, aString?._id ?? ffi.nullptr); - } +const int errSecMissingAttributeLabel = -67773; - void removeCharactersInString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_removeCharactersInString_1, aString?._id ?? ffi.nullptr); - } +const int errSecInvalidAttributeKeyType = -67774; - void formUnionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_459(_id, _lib._sel_formUnionWithCharacterSet_1, - otherSet?._id ?? ffi.nullptr); - } +const int errSecMissingAttributeKeyType = -67775; - void formIntersectionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_459( - _id, - _lib._sel_formIntersectionWithCharacterSet_1, - otherSet?._id ?? ffi.nullptr); - } +const int errSecInvalidAttributeMode = -67776; - void invert() { - return _lib._objc_msgSend_1(_id, _lib._sel_invert1); - } +const int errSecMissingAttributeMode = -67777; - static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_controlCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeEffectiveBits = -67778; - static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeEffectiveBits = -67779; - static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_whitespaceAndNewlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeStartDate = -67780; - static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_decimalDigitCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeStartDate = -67781; - static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_letterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeEndDate = -67782; - static NSCharacterSet? getLowercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_lowercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeEndDate = -67783; - static NSCharacterSet? getUppercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_uppercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeVersion = -67784; - static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeVersion = -67785; - static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_alphanumericCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributePrime = -67786; - static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_decomposableCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributePrime = -67787; - static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_illegalCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeBase = -67788; - static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_punctuationCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeBase = -67789; - static NSCharacterSet? getCapitalizedLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_capitalizedLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeSubprime = -67790; - static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_symbolCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeSubprime = -67791; - static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_newlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: false, release: true); - } +const int errSecInvalidAttributeIterationCount = -67792; - static NSMutableCharacterSet characterSetWithRange_( - NativeCupertinoHttp _lib, NSRange aRange) { - final _ret = _lib._objc_msgSend_460(_lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithRange_1, aRange); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeIterationCount = -67793; - static NSMutableCharacterSet characterSetWithCharactersInString_( - NativeCupertinoHttp _lib, NSString? aString) { - final _ret = _lib._objc_msgSend_461( - _lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, - aString?._id ?? ffi.nullptr); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeDLDBHandle = -67794; - static NSMutableCharacterSet characterSetWithBitmapRepresentation_( - NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_462( - _lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, - data?._id ?? ffi.nullptr); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeDLDBHandle = -67795; - static NSMutableCharacterSet characterSetWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? fName) { - final _ret = _lib._objc_msgSend_461(_lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributeAccessCredentials = -67796; - /// Returns a character set containing the characters allowed in a URL's user subcomponent. - static NSCharacterSet? getURLUserAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLUserAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeAccessCredentials = -67797; - /// Returns a character set containing the characters allowed in a URL's password subcomponent. - static NSCharacterSet? getURLPasswordAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLPasswordAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributePublicKeyFormat = -67798; - /// Returns a character set containing the characters allowed in a URL's host subcomponent. - static NSCharacterSet? getURLHostAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLHostAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributePublicKeyFormat = -67799; - /// Returns a character set containing the characters allowed in a URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - static NSCharacterSet? getURLPathAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLPathAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAttributePrivateKeyFormat = -67800; - /// Returns a character set containing the characters allowed in a URL's query component. - static NSCharacterSet? getURLQueryAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLQueryAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributePrivateKeyFormat = -67801; + +const int errSecInvalidAttributeSymmetricKeyFormat = -67802; - /// Returns a character set containing the characters allowed in a URL's fragment component. - static NSCharacterSet? getURLFragmentAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLFragmentAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +const int errSecMissingAttributeSymmetricKeyFormat = -67803; - static NSMutableCharacterSet new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableCharacterSet1, _lib._sel_new1); - return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); - } +const int errSecInvalidAttributeWrappedKeyFormat = -67804; - static NSMutableCharacterSet alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableCharacterSet1, _lib._sel_alloc1); - return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); - } -} +const int errSecMissingAttributeWrappedKeyFormat = -67805; -typedef NSURLFileResourceType = ffi.Pointer; -typedef NSURLThumbnailDictionaryItem = ffi.Pointer; -typedef NSURLFileProtectionType = ffi.Pointer; -typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; -typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; -typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; +const int errSecStagedOperationInProgress = -67806; -/// NSURLQueryItem encapsulates a single query name-value pair. The name and value strings of a query name-value pair are not percent encoded. For use with the NSURLComponents queryItems property. -class NSURLQueryItem extends NSObject { - NSURLQueryItem._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int errSecStagedOperationNotStarted = -67807; - /// Returns a [NSURLQueryItem] that points to the same underlying object as [other]. - static NSURLQueryItem castFrom(T other) { - return NSURLQueryItem._(other._id, other._lib, retain: true, release: true); - } +const int errSecVerifyFailed = -67808; - /// Returns a [NSURLQueryItem] that wraps the given raw object pointer. - static NSURLQueryItem castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLQueryItem._(other, lib, retain: retain, release: release); - } +const int errSecQuerySizeUnknown = -67809; - /// Returns whether [obj] is an instance of [NSURLQueryItem]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLQueryItem1); - } +const int errSecBlockSizeMismatch = -67810; - NSURLQueryItem initWithName_value_(NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_463(_id, _lib._sel_initWithName_value_1, - name?._id ?? ffi.nullptr, value?._id ?? ffi.nullptr); - return NSURLQueryItem._(_ret, _lib, retain: true, release: true); - } +const int errSecPublicKeyInconsistent = -67811; - static NSURLQueryItem queryItemWithName_value_( - NativeCupertinoHttp _lib, NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_463( - _lib._class_NSURLQueryItem1, - _lib._sel_queryItemWithName_value_1, - name?._id ?? ffi.nullptr, - value?._id ?? ffi.nullptr); - return NSURLQueryItem._(_ret, _lib, retain: true, release: true); - } +const int errSecDeviceVerifyFailed = -67812; - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidLoginName = -67813; - NSString? get value { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_value1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecAlreadyLoggedIn = -67814; - static NSURLQueryItem new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_new1); - return NSURLQueryItem._(_ret, _lib, retain: false, release: true); - } +const int errSecInvalidDigestAlgorithm = -67815; - static NSURLQueryItem alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_alloc1); - return NSURLQueryItem._(_ret, _lib, retain: false, release: true); - } -} +const int errSecInvalidCRLGroup = -67816; -class NSURLComponents extends NSObject { - NSURLComponents._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int errSecCertificateCannotOperate = -67817; - /// Returns a [NSURLComponents] that points to the same underlying object as [other]. - static NSURLComponents castFrom(T other) { - return NSURLComponents._(other._id, other._lib, - retain: true, release: true); - } +const int errSecCertificateExpired = -67818; - /// Returns a [NSURLComponents] that wraps the given raw object pointer. - static NSURLComponents castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLComponents._(other, lib, retain: retain, release: release); - } +const int errSecCertificateNotValidYet = -67819; - /// Returns whether [obj] is an instance of [NSURLComponents]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLComponents1); - } +const int errSecCertificateRevoked = -67820; - /// Initialize a NSURLComponents with all components undefined. Designated initializer. - @override - NSURLComponents init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } +const int errSecCertificateSuspended = -67821; - /// Initialize a NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. - NSURLComponents initWithURL_resolvingAgainstBaseURL_( - NSURL? url, bool resolve) { - final _ret = _lib._objc_msgSend_206( - _id, - _lib._sel_initWithURL_resolvingAgainstBaseURL_1, - url?._id ?? ffi.nullptr, - resolve); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } +const int errSecInsufficientCredentials = -67822; - /// Initializes and returns a newly created NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. - static NSURLComponents componentsWithURL_resolvingAgainstBaseURL_( - NativeCupertinoHttp _lib, NSURL? url, bool resolve) { - final _ret = _lib._objc_msgSend_206( - _lib._class_NSURLComponents1, - _lib._sel_componentsWithURL_resolvingAgainstBaseURL_1, - url?._id ?? ffi.nullptr, - resolve); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAction = -67823; - /// Initialize a NSURLComponents with a URL string. If the URLString is malformed, nil is returned. - NSURLComponents initWithString_(NSString? URLString) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidAuthority = -67824; - /// Initializes and returns a newly created NSURLComponents with a URL string. If the URLString is malformed, nil is returned. - static NSURLComponents componentsWithString_( - NativeCupertinoHttp _lib, NSString? URLString) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSURLComponents1, - _lib._sel_componentsWithString_1, URLString?._id ?? ffi.nullptr); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } +const int errSecVerifyActionFailed = -67825; - /// Returns a URL created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidCertAuthority = -67826; - /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSURL URLRelativeToURL_(NSURL? baseURL) { - final _ret = _lib._objc_msgSend_464( - _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidCRLAuthority = -67827; - /// Returns a URL string created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSString? get string { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvaldCRLAuthority = -67827; - /// Attempting to set the scheme with an invalid scheme string will cause an exception. - NSString? get scheme { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidCRLEncoding = -67828; - /// Attempting to set the scheme with an invalid scheme string will cause an exception. - set scheme(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); - } +const int errSecInvalidCRLType = -67829; - NSString? get user { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidCRL = -67830; - set user(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); - } +const int errSecInvalidFormType = -67831; - NSString? get password { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidID = -67832; - set password(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); - } +const int errSecInvalidIdentifier = -67833; - NSString? get host { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidIndex = -67834; - set host(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); - } +const int errSecInvalidPolicyIdentifiers = -67835; - /// Attempting to set a negative port number will cause an exception. - NSNumber? get port { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidTimeString = -67836; - /// Attempting to set a negative port number will cause an exception. - set port(NSNumber? value) { - _lib._objc_msgSend_335(_id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); - } +const int errSecInvalidReason = -67837; - NSString? get path { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidRequestInputs = -67838; - set path(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); - } +const int errSecInvalidResponseVector = -67839; - NSString? get query { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidStopOnPolicy = -67840; - set query(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); - } +const int errSecInvalidTuple = -67841; - NSString? get fragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecMultipleValuesUnsupported = -67842; - set fragment(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); - } +const int errSecNotTrusted = -67843; - /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - NSString? get percentEncodedUser { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedUser1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecNoDefaultAuthority = -67844; - /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - set percentEncodedUser(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); - } +const int errSecRejectedForm = -67845; - NSString? get percentEncodedPassword { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPassword1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecRequestLost = -67846; - set percentEncodedPassword(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); - } +const int errSecRequestRejected = -67847; - NSString? get percentEncodedHost { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedHost1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecUnsupportedAddressType = -67848; - set percentEncodedHost(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); - } +const int errSecUnsupportedService = -67849; - NSString? get percentEncodedPath { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidTupleGroup = -67850; - set percentEncodedPath(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); - } +const int errSecInvalidBaseACLs = -67851; - NSString? get percentEncodedQuery { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedQuery1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidTupleCredentials = -67852; - set percentEncodedQuery(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); - } +const int errSecInvalidTupleCredendtials = -67852; - NSString? get percentEncodedFragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedFragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidEncoding = -67853; - set percentEncodedFragment(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); - } +const int errSecInvalidValidityPeriod = -67854; - NSString? get encodedHost { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_encodedHost1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidRequestor = -67855; - set encodedHost(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setEncodedHost_1, value?._id ?? ffi.nullptr); - } +const int errSecRequestDescriptor = -67856; - /// These properties return the character range of a component in the URL string returned by -[NSURLComponents string]. If the component does not exist in the NSURLComponents object, {NSNotFound, 0} is returned. Note: Zero length components are legal. For example, the URL string "scheme://:@/?#" has a zero length user, password, host, query and fragment; the URL strings "scheme:" and "" both have a zero length path. - NSRange get rangeOfScheme { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfScheme1); - } +const int errSecInvalidBundleInfo = -67857; - NSRange get rangeOfUser { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfUser1); - } +const int errSecInvalidCRLIndex = -67858; - NSRange get rangeOfPassword { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPassword1); - } +const int errSecNoFieldValues = -67859; - NSRange get rangeOfHost { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfHost1); - } +const int errSecUnsupportedFieldFormat = -67860; - NSRange get rangeOfPort { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPort1); - } +const int errSecUnsupportedIndexInfo = -67861; - NSRange get rangeOfPath { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPath1); - } +const int errSecUnsupportedLocality = -67862; - NSRange get rangeOfQuery { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfQuery1); - } +const int errSecUnsupportedNumAttributes = -67863; - NSRange get rangeOfFragment { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfFragment1); - } +const int errSecUnsupportedNumIndexes = -67864; - /// The query component as an array of NSURLQueryItems for this NSURLComponents. - /// - /// Each NSURLQueryItem represents a single key-value pair, - /// - /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. - /// - /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. - /// - /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. - /// - /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. - NSArray? get queryItems { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_queryItems1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int errSecUnsupportedNumRecordTypes = -67865; - /// The query component as an array of NSURLQueryItems for this NSURLComponents. - /// - /// Each NSURLQueryItem represents a single key-value pair, - /// - /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. - /// - /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. - /// - /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. - /// - /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. - set queryItems(NSArray? value) { - _lib._objc_msgSend_399( - _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); - } +const int errSecFieldSpecifiedMultiple = -67866; - /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. - /// - /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. - NSArray? get percentEncodedQueryItems { - final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_percentEncodedQueryItems1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int errSecIncompatibleFieldFormat = -67867; - /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. - /// - /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. - set percentEncodedQueryItems(NSArray? value) { - _lib._objc_msgSend_399(_id, _lib._sel_setPercentEncodedQueryItems_1, - value?._id ?? ffi.nullptr); - } +const int errSecInvalidParsingModule = -67868; - static NSURLComponents new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_new1); - return NSURLComponents._(_ret, _lib, retain: false, release: true); - } +const int errSecDatabaseLocked = -67869; - static NSURLComponents alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_alloc1); - return NSURLComponents._(_ret, _lib, retain: false, release: true); - } -} +const int errSecDatastoreIsOpen = -67870; -/// NSFileSecurity encapsulates a file system object's security information. NSFileSecurity and CFFileSecurity are toll-free bridged. Use the CFFileSecurity API for access to the low-level file security properties encapsulated by NSFileSecurity. -class NSFileSecurity extends NSObject { - NSFileSecurity._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int errSecMissingValue = -67871; - /// Returns a [NSFileSecurity] that points to the same underlying object as [other]. - static NSFileSecurity castFrom(T other) { - return NSFileSecurity._(other._id, other._lib, retain: true, release: true); - } +const int errSecUnsupportedQueryLimits = -67872; - /// Returns a [NSFileSecurity] that wraps the given raw object pointer. - static NSFileSecurity castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileSecurity._(other, lib, retain: retain, release: release); - } +const int errSecUnsupportedNumSelectionPreds = -67873; - /// Returns whether [obj] is an instance of [NSFileSecurity]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSFileSecurity1); - } +const int errSecUnsupportedOperator = -67874; - NSFileSecurity initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSFileSecurity._(_ret, _lib, retain: true, release: true); - } +const int errSecInvalidDBLocation = -67875; - static NSFileSecurity new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_new1); - return NSFileSecurity._(_ret, _lib, retain: false, release: true); - } +const int errSecInvalidAccessRequest = -67876; - static NSFileSecurity alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_alloc1); - return NSFileSecurity._(_ret, _lib, retain: false, release: true); - } -} +const int errSecInvalidIndexInfo = -67877; -/// ! -/// @class NSHTTPURLResponse -/// -/// @abstract An NSHTTPURLResponse object represents a response to an -/// HTTP URL load. It is a specialization of NSURLResponse which -/// provides conveniences for accessing information specific to HTTP -/// protocol responses. -class NSHTTPURLResponse extends NSURLResponse { - NSHTTPURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int errSecInvalidNewOwner = -67878; + +const int errSecInvalidModifyMode = -67879; - /// Returns a [NSHTTPURLResponse] that points to the same underlying object as [other]. - static NSHTTPURLResponse castFrom(T other) { - return NSHTTPURLResponse._(other._id, other._lib, - retain: true, release: true); - } +const int errSecMissingRequiredExtension = -67880; - /// Returns a [NSHTTPURLResponse] that wraps the given raw object pointer. - static NSHTTPURLResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPURLResponse._(other, lib, retain: retain, release: release); - } +const int errSecExtendedKeyUsageNotCritical = -67881; - /// Returns whether [obj] is an instance of [NSHTTPURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSHTTPURLResponse1); - } +const int errSecTimestampMissing = -67882; - /// ! - /// @method initWithURL:statusCode:HTTPVersion:headerFields: - /// @abstract initializer for NSHTTPURLResponse objects. - /// @param url the URL from which the response was generated. - /// @param statusCode an HTTP status code. - /// @param HTTPVersion The version of the HTTP response as represented by the server. This is typically represented as "HTTP/1.1". - /// @param headerFields A dictionary representing the header keys and values of the server response. - /// @result the instance of the object, or NULL if an error occurred during initialization. - /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. - NSHTTPURLResponse initWithURL_statusCode_HTTPVersion_headerFields_(NSURL? url, - int statusCode, NSString? HTTPVersion, NSDictionary? headerFields) { - final _ret = _lib._objc_msgSend_465( - _id, - _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, - url?._id ?? ffi.nullptr, - statusCode, - HTTPVersion?._id ?? ffi.nullptr, - headerFields?._id ?? ffi.nullptr); - return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); - } +const int errSecTimestampInvalid = -67883; - /// ! - /// @abstract Returns the HTTP status code of the receiver. - /// @result The HTTP status code of the receiver. - int get statusCode { - return _lib._objc_msgSend_81(_id, _lib._sel_statusCode1); - } +const int errSecTimestampNotTrusted = -67884; - /// ! - /// @abstract Returns a dictionary containing all the HTTP header fields - /// of the receiver. - /// @discussion By examining this header dictionary, clients can see - /// the "raw" header information which was reported to the protocol - /// implementation by the HTTP server. This may be of use to - /// sophisticated or special-purpose HTTP clients. - /// @result A dictionary containing all the HTTP header fields of the - /// receiver. - NSDictionary? get allHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int errSecTimestampServiceNotAvailable = -67885; - /// ! - /// @method valueForHTTPHeaderField: - /// @abstract Returns the value which corresponds to the given header - /// field. Note that, in keeping with the HTTP RFC, HTTP header field - /// names are case-insensitive. - /// @param field the header field name to use for the lookup - /// (case-insensitive). - /// @result the value associated with the given header field, or nil if - /// there is no value associated with the given header field. - NSString valueForHTTPHeaderField_(NSString? field) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecTimestampBadAlg = -67886; - /// ! - /// @method localizedStringForStatusCode: - /// @abstract Convenience method which returns a localized string - /// corresponding to the status code for this response. - /// @param statusCode the status code to use to produce a localized string. - /// @result A localized string corresponding to the given status code. - static NSString localizedStringForStatusCode_( - NativeCupertinoHttp _lib, int statusCode) { - final _ret = _lib._objc_msgSend_466(_lib._class_NSHTTPURLResponse1, - _lib._sel_localizedStringForStatusCode_1, statusCode); - return NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecTimestampBadRequest = -67887; - static NSHTTPURLResponse new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_new1); - return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); - } +const int errSecTimestampBadDataFormat = -67888; - static NSHTTPURLResponse alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_alloc1); - return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); - } -} +const int errSecTimestampTimeNotAvailable = -67889; -class NSException extends NSObject { - NSException._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int errSecTimestampUnacceptedPolicy = -67890; - /// Returns a [NSException] that points to the same underlying object as [other]. - static NSException castFrom(T other) { - return NSException._(other._id, other._lib, retain: true, release: true); - } +const int errSecTimestampUnacceptedExtension = -67891; - /// Returns a [NSException] that wraps the given raw object pointer. - static NSException castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSException._(other, lib, retain: retain, release: release); - } +const int errSecTimestampAddInfoNotAvailable = -67892; - /// Returns whether [obj] is an instance of [NSException]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSException1); - } +const int errSecTimestampSystemFailure = -67893; - static NSException exceptionWithName_reason_userInfo_( - NativeCupertinoHttp _lib, - NSExceptionName name, - NSString? reason, - NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_467( - _lib._class_NSException1, - _lib._sel_exceptionWithName_reason_userInfo_1, - name, - reason?._id ?? ffi.nullptr, - userInfo?._id ?? ffi.nullptr); - return NSException._(_ret, _lib, retain: true, release: true); - } +const int errSecSigningTimeMissing = -67894; - NSException initWithName_reason_userInfo_( - NSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_468( - _id, - _lib._sel_initWithName_reason_userInfo_1, - aName, - aReason?._id ?? ffi.nullptr, - aUserInfo?._id ?? ffi.nullptr); - return NSException._(_ret, _lib, retain: true, release: true); - } +const int errSecTimestampRejection = -67895; - NSExceptionName get name { - return _lib._objc_msgSend_32(_id, _lib._sel_name1); - } +const int errSecTimestampWaiting = -67896; - NSString? get reason { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_reason1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +const int errSecTimestampRevocationWarning = -67897; - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +const int errSecTimestampRevocationNotification = -67898; - NSArray? get callStackReturnAddresses { - final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_callStackReturnAddresses1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int errSecCertificatePolicyNotAllowed = -67899; - NSArray? get callStackSymbols { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_callStackSymbols1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int errSecCertificateNameNotAllowed = -67900; - void raise() { - return _lib._objc_msgSend_1(_id, _lib._sel_raise1); - } +const int errSecCertificateValidityPeriodTooLong = -67901; - static void raise_format_( - NativeCupertinoHttp _lib, NSExceptionName name, NSString? format) { - return _lib._objc_msgSend_367(_lib._class_NSException1, - _lib._sel_raise_format_1, name, format?._id ?? ffi.nullptr); - } +const int errSecCertificateIsCA = -67902; - static void raise_format_arguments_(NativeCupertinoHttp _lib, - NSExceptionName name, NSString? format, va_list argList) { - return _lib._objc_msgSend_469( - _lib._class_NSException1, - _lib._sel_raise_format_arguments_1, - name, - format?._id ?? ffi.nullptr, - argList); - } +const int errSecCertificateDuplicateExtension = -67903; - static NSException new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_new1); - return NSException._(_ret, _lib, retain: false, release: true); - } +const int errSSLProtocol = -9800; - static NSException alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); - return NSException._(_ret, _lib, retain: false, release: true); - } -} +const int errSSLNegotiation = -9801; -typedef NSUncaughtExceptionHandler - = ffi.NativeFunction)>; +const int errSSLFatalAlert = -9802; -class NSAssertionHandler extends NSObject { - NSAssertionHandler._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int errSSLWouldBlock = -9803; - /// Returns a [NSAssertionHandler] that points to the same underlying object as [other]. - static NSAssertionHandler castFrom(T other) { - return NSAssertionHandler._(other._id, other._lib, - retain: true, release: true); - } +const int errSSLSessionNotFound = -9804; - /// Returns a [NSAssertionHandler] that wraps the given raw object pointer. - static NSAssertionHandler castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSAssertionHandler._(other, lib, retain: retain, release: release); - } +const int errSSLClosedGraceful = -9805; - /// Returns whether [obj] is an instance of [NSAssertionHandler]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSAssertionHandler1); - } +const int errSSLClosedAbort = -9806; - static NSAssertionHandler? getCurrentHandler(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_470( - _lib._class_NSAssertionHandler1, _lib._sel_currentHandler1); - return _ret.address == 0 - ? null - : NSAssertionHandler._(_ret, _lib, retain: true, release: true); - } +const int errSSLXCertChainInvalid = -9807; - void handleFailureInMethod_object_file_lineNumber_description_( - ffi.Pointer selector, - NSObject object, - NSString? fileName, - int line, - NSString? format) { - return _lib._objc_msgSend_471( - _id, - _lib._sel_handleFailureInMethod_object_file_lineNumber_description_1, - selector, - object._id, - fileName?._id ?? ffi.nullptr, - line, - format?._id ?? ffi.nullptr); - } +const int errSSLBadCert = -9808; - void handleFailureInFunction_file_lineNumber_description_( - NSString? functionName, NSString? fileName, int line, NSString? format) { - return _lib._objc_msgSend_472( - _id, - _lib._sel_handleFailureInFunction_file_lineNumber_description_1, - functionName?._id ?? ffi.nullptr, - fileName?._id ?? ffi.nullptr, - line, - format?._id ?? ffi.nullptr); - } +const int errSSLCrypto = -9809; - static NSAssertionHandler new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_new1); - return NSAssertionHandler._(_ret, _lib, retain: false, release: true); - } +const int errSSLInternal = -9810; - static NSAssertionHandler alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_alloc1); - return NSAssertionHandler._(_ret, _lib, retain: false, release: true); - } -} +const int errSSLModuleAttach = -9811; -class NSBlockOperation extends NSOperation { - NSBlockOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int errSSLUnknownRootCert = -9812; - /// Returns a [NSBlockOperation] that points to the same underlying object as [other]. - static NSBlockOperation castFrom(T other) { - return NSBlockOperation._(other._id, other._lib, - retain: true, release: true); - } +const int errSSLNoRootCert = -9813; - /// Returns a [NSBlockOperation] that wraps the given raw object pointer. - static NSBlockOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSBlockOperation._(other, lib, retain: retain, release: release); - } +const int errSSLCertExpired = -9814; - /// Returns whether [obj] is an instance of [NSBlockOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSBlockOperation1); - } +const int errSSLCertNotYetValid = -9815; - static NSBlockOperation blockOperationWithBlock_( - NativeCupertinoHttp _lib, ObjCBlock block) { - final _ret = _lib._objc_msgSend_473(_lib._class_NSBlockOperation1, - _lib._sel_blockOperationWithBlock_1, block._id); - return NSBlockOperation._(_ret, _lib, retain: true, release: true); - } +const int errSSLClosedNoNotify = -9816; - void addExecutionBlock_(ObjCBlock block) { - return _lib._objc_msgSend_345( - _id, _lib._sel_addExecutionBlock_1, block._id); - } +const int errSSLBufferOverflow = -9817; - NSArray? get executionBlocks { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_executionBlocks1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +const int errSSLBadCipherSuite = -9818; - static NSBlockOperation new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_new1); - return NSBlockOperation._(_ret, _lib, retain: false, release: true); - } +const int errSSLPeerUnexpectedMsg = -9819; - static NSBlockOperation alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_alloc1); - return NSBlockOperation._(_ret, _lib, retain: false, release: true); - } -} +const int errSSLPeerBadRecordMac = -9820; -class NSInvocationOperation extends NSOperation { - NSInvocationOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int errSSLPeerDecryptionFail = -9821; - /// Returns a [NSInvocationOperation] that points to the same underlying object as [other]. - static NSInvocationOperation castFrom(T other) { - return NSInvocationOperation._(other._id, other._lib, - retain: true, release: true); - } +const int errSSLPeerRecordOverflow = -9822; - /// Returns a [NSInvocationOperation] that wraps the given raw object pointer. - static NSInvocationOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInvocationOperation._(other, lib, - retain: retain, release: release); - } +const int errSSLPeerDecompressFail = -9823; - /// Returns whether [obj] is an instance of [NSInvocationOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSInvocationOperation1); - } +const int errSSLPeerHandshakeFail = -9824; - NSInvocationOperation initWithTarget_selector_object_( - NSObject target, ffi.Pointer sel, NSObject arg) { - final _ret = _lib._objc_msgSend_474(_id, - _lib._sel_initWithTarget_selector_object_1, target._id, sel, arg._id); - return NSInvocationOperation._(_ret, _lib, retain: true, release: true); - } +const int errSSLPeerBadCert = -9825; - NSInvocationOperation initWithInvocation_(NSInvocation? inv) { - final _ret = _lib._objc_msgSend_475( - _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); - return NSInvocationOperation._(_ret, _lib, retain: true, release: true); - } +const int errSSLPeerUnsupportedCert = -9826; - NSInvocation? get invocation { - final _ret = _lib._objc_msgSend_476(_id, _lib._sel_invocation1); - return _ret.address == 0 - ? null - : NSInvocation._(_ret, _lib, retain: true, release: true); - } +const int errSSLPeerCertRevoked = -9827; - NSObject get result { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_result1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int errSSLPeerCertExpired = -9828; - static NSInvocationOperation new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocationOperation1, _lib._sel_new1); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); - } +const int errSSLPeerCertUnknown = -9829; - static NSInvocationOperation alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocationOperation1, _lib._sel_alloc1); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); - } -} +const int errSSLIllegalParam = -9830; -class _Dart_Isolate extends ffi.Opaque {} +const int errSSLPeerUnknownCA = -9831; -class _Dart_IsolateGroup extends ffi.Opaque {} +const int errSSLPeerAccessDenied = -9832; -class _Dart_Handle extends ffi.Opaque {} +const int errSSLPeerDecodeError = -9833; -class _Dart_WeakPersistentHandle extends ffi.Opaque {} +const int errSSLPeerDecryptError = -9834; -class _Dart_FinalizableHandle extends ffi.Opaque {} +const int errSSLPeerExportRestriction = -9835; -typedef Dart_WeakPersistentHandle = ffi.Pointer<_Dart_WeakPersistentHandle>; +const int errSSLPeerProtocolVersion = -9836; -/// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the -/// version when changing this struct. -typedef Dart_HandleFinalizer = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef Dart_FinalizableHandle = ffi.Pointer<_Dart_FinalizableHandle>; +const int errSSLPeerInsufficientSecurity = -9837; -class Dart_IsolateFlags extends ffi.Struct { - @ffi.Int32() - external int version; +const int errSSLPeerInternalError = -9838; - @ffi.Bool() - external bool enable_asserts; +const int errSSLPeerUserCancelled = -9839; - @ffi.Bool() - external bool use_field_guards; +const int errSSLPeerNoRenegotiation = -9840; - @ffi.Bool() - external bool use_osr; +const int errSSLPeerAuthCompleted = -9841; - @ffi.Bool() - external bool obfuscate; +const int errSSLClientCertRequested = -9842; - @ffi.Bool() - external bool load_vmservice_library; +const int errSSLHostNameMismatch = -9843; - @ffi.Bool() - external bool copy_parent_code; +const int errSSLConnectionRefused = -9844; - @ffi.Bool() - external bool null_safety; +const int errSSLDecryptionFail = -9845; - @ffi.Bool() - external bool is_system_isolate; -} +const int errSSLBadRecordMac = -9846; -/// Forward declaration -class Dart_CodeObserver extends ffi.Struct { - external ffi.Pointer data; +const int errSSLRecordOverflow = -9847; - external Dart_OnNewCodeCallback on_new_code; -} +const int errSSLBadConfiguration = -9848; -/// Callback provided by the embedder that is used by the VM to notify on code -/// object creation, *before* it is invoked the first time. -/// This is useful for embedders wanting to e.g. keep track of PCs beyond -/// the lifetime of the garbage collected code objects. -/// Note that an address range may be used by more than one code object over the -/// lifecycle of a process. Clients of this function should record timestamps for -/// these compilation events and when collecting PCs to disambiguate reused -/// address ranges. -typedef Dart_OnNewCodeCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UintPtr, ffi.UintPtr)>>; +const int errSSLUnexpectedRecord = -9849; -/// Describes how to initialize the VM. Used with Dart_Initialize. -/// -/// \param version Identifies the version of the struct used by the client. -/// should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. -/// \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate -/// or NULL if no snapshot is provided. If provided, the buffer must remain -/// valid until Dart_Cleanup returns. -/// \param instructions_snapshot A buffer containing a snapshot of precompiled -/// instructions, or NULL if no snapshot is provided. If provided, the buffer -/// must remain valid until Dart_Cleanup returns. -/// \param initialize_isolate A function to be called during isolate -/// initialization inside an existing isolate group. -/// See Dart_InitializeIsolateCallback. -/// \param create_group A function to be called during isolate group creation. -/// See Dart_IsolateGroupCreateCallback. -/// \param shutdown A function to be called right before an isolate is shutdown. -/// See Dart_IsolateShutdownCallback. -/// \param cleanup A function to be called after an isolate was shutdown. -/// See Dart_IsolateCleanupCallback. -/// \param cleanup_group A function to be called after an isolate group is shutdown. -/// See Dart_IsolateGroupCleanupCallback. -/// \param get_service_assets A function to be called by the service isolate when -/// it requires the vmservice assets archive. -/// See Dart_GetVMServiceAssetsArchive. -/// \param code_observer An external code observer callback function. -/// The observer can be invoked as early as during the Dart_Initialize() call. -class Dart_InitializeParams extends ffi.Struct { - @ffi.Int32() - external int version; +const int errSSLWeakPeerEphemeralDHKey = -9850; - external ffi.Pointer vm_snapshot_data; +const int errSSLClientHelloReceived = -9851; - external ffi.Pointer vm_snapshot_instructions; +const int errSSLTransportReset = -9852; - external Dart_IsolateGroupCreateCallback create_group; +const int errSSLNetworkTimeout = -9853; - external Dart_InitializeIsolateCallback initialize_isolate; +const int errSSLConfigurationFailed = -9854; - external Dart_IsolateShutdownCallback shutdown_isolate; +const int errSSLUnsupportedExtension = -9855; + +const int errSSLUnexpectedMessage = -9856; + +const int errSSLDecompressFail = -9857; + +const int errSSLHandshakeFail = -9858; - external Dart_IsolateCleanupCallback cleanup_isolate; +const int errSSLDecodeError = -9859; - external Dart_IsolateGroupCleanupCallback cleanup_group; +const int errSSLInappropriateFallback = -9860; - external Dart_ThreadExitCallback thread_exit; +const int errSSLMissingExtension = -9861; - external Dart_FileOpenCallback file_open; +const int errSSLBadCertificateStatusResponse = -9862; - external Dart_FileReadCallback file_read; +const int errSSLCertificateRequired = -9863; - external Dart_FileWriteCallback file_write; +const int errSSLUnknownPSKIdentity = -9864; - external Dart_FileCloseCallback file_close; +const int errSSLUnrecognizedName = -9865; - external Dart_EntropySource entropy_source; +const int errSSLATSViolation = -9880; - external Dart_GetVMServiceAssetsArchive get_service_assets; +const int errSSLATSMinimumVersionViolation = -9881; - @ffi.Bool() - external bool start_kernel_isolate; +const int errSSLATSCiphersuiteViolation = -9882; - external ffi.Pointer code_observer; -} +const int errSSLATSMinimumKeySizeViolation = -9883; -/// An isolate creation and initialization callback function. -/// -/// This callback, provided by the embedder, is called when the VM -/// needs to create an isolate. The callback should create an isolate -/// by calling Dart_CreateIsolateGroup and load any scripts required for -/// execution. -/// -/// This callback may be called on a different thread than the one -/// running the parent isolate. -/// -/// When the function returns NULL, it is the responsibility of this -/// function to ensure that Dart_ShutdownIsolate has been called if -/// required (for example, if the isolate was created successfully by -/// Dart_CreateIsolateGroup() but the root library fails to load -/// successfully, then the function should call Dart_ShutdownIsolate -/// before returning). -/// -/// When the function returns NULL, the function should set *error to -/// a malloc-allocated buffer containing a useful error message. The -/// caller of this function (the VM) will make sure that the buffer is -/// freed. -/// -/// \param script_uri The uri of the main source file or snapshot to load. -/// Either the URI of the parent isolate set in Dart_CreateIsolateGroup for -/// Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the -/// library tag handler of the parent isolate. -/// The callback is responsible for loading the program by a call to -/// Dart_LoadScriptFromKernel. -/// \param main The name of the main entry point this isolate will -/// eventually run. This is provided for advisory purposes only to -/// improve debugging messages. The main function is not invoked by -/// this function. -/// \param package_root Ignored. -/// \param package_config Uri of the package configuration file (either in format -/// of .packages or .dart_tool/package_config.json) for this isolate -/// to resolve package imports against. If this parameter is not passed the -/// package resolution of the parent isolate should be used. -/// \param flags Default flags for this isolate being spawned. Either inherited -/// from the spawning isolate or passed as parameters when spawning the -/// isolate from Dart code. -/// \param isolate_data The isolate data which was passed to the -/// parent isolate when it was created by calling Dart_CreateIsolateGroup(). -/// \param error A structure into which the embedder can place a -/// C string containing an error message in the case of failures. -/// -/// \return The embedder returns NULL if the creation and -/// initialization was not successful and the isolate if successful. -typedef Dart_IsolateGroupCreateCallback = ffi.Pointer< - ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>; +const int errSSLATSLeafCertificateHashAlgorithmViolation = -9884; -/// An isolate is the unit of concurrency in Dart. Each isolate has -/// its own memory and thread of control. No state is shared between -/// isolates. Instead, isolates communicate by message passing. -/// -/// Each thread keeps track of its current isolate, which is the -/// isolate which is ready to execute on the current thread. The -/// current isolate may be NULL, in which case no isolate is ready to -/// execute. Most of the Dart apis require there to be a current -/// isolate in order to function without error. The current isolate is -/// set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. -typedef Dart_Isolate = ffi.Pointer<_Dart_Isolate>; +const int errSSLATSCertificateHashAlgorithmViolation = -9885; -/// An isolate initialization callback function. -/// -/// This callback, provided by the embedder, is called when the VM has created an -/// isolate within an existing isolate group (i.e. from the same source as an -/// existing isolate). -/// -/// The callback should setup native resolvers and might want to set a custom -/// message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as -/// runnable. -/// -/// This callback may be called on a different thread than the one -/// running the parent isolate. -/// -/// When the function returns `false`, it is the responsibility of this -/// function to ensure that `Dart_ShutdownIsolate` has been called. -/// -/// When the function returns `false`, the function should set *error to -/// a malloc-allocated buffer containing a useful error message. The -/// caller of this function (the VM) will make sure that the buffer is -/// freed. -/// -/// \param child_isolate_data The callback data to associate with the new -/// child isolate. -/// \param error A structure into which the embedder can place a -/// C string containing an error message in the case the initialization fails. -/// -/// \return The embedder returns true if the initialization was successful and -/// false otherwise (in which case the VM will terminate the isolate). -typedef Dart_InitializeIsolateCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer>, - ffi.Pointer>)>>; +const int errSSLATSCertificateTrustViolation = -9886; -/// An isolate shutdown callback function. -/// -/// This callback, provided by the embedder, is called before the vm -/// shuts down an isolate. The isolate being shutdown will be the current -/// isolate. It is safe to run Dart code. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -/// \param isolate_data The same callback data which was passed to the isolate -/// when it was created. -typedef Dart_IsolateShutdownCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +const int errSSLEarlyDataRejected = -9890; -/// An isolate cleanup callback function. -/// -/// This callback, provided by the embedder, is called after the vm -/// shuts down an isolate. There will be no current isolate and it is *not* -/// safe to run Dart code. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -/// \param isolate_data The same callback data which was passed to the isolate -/// when it was created. -typedef Dart_IsolateCleanupCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +const int OSUnknownByteOrder = 0; -/// An isolate group cleanup callback function. -/// -/// This callback, provided by the embedder, is called after the vm -/// shuts down an isolate group. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -typedef Dart_IsolateGroupCleanupCallback - = ffi.Pointer)>>; +const int OSLittleEndian = 1; -/// A thread death callback function. -/// This callback, provided by the embedder, is called before a thread in the -/// vm thread pool exits. -/// This function could be used to dispose of native resources that -/// are associated and attached to the thread, in order to avoid leaks. -typedef Dart_ThreadExitCallback - = ffi.Pointer>; +const int OSBigEndian = 2; -/// Callbacks provided by the embedder for file operations. If the -/// embedder does not allow file operations these callbacks can be -/// NULL. -/// -/// Dart_FileOpenCallback - opens a file for reading or writing. -/// \param name The name of the file to open. -/// \param write A boolean variable which indicates if the file is to -/// opened for writing. If there is an existing file it needs to truncated. -/// -/// Dart_FileReadCallback - Read contents of file. -/// \param data Buffer allocated in the callback into which the contents -/// of the file are read into. It is the responsibility of the caller to -/// free this buffer. -/// \param file_length A variable into which the length of the file is returned. -/// In the case of an error this value would be -1. -/// \param stream Handle to the opened file. -/// -/// Dart_FileWriteCallback - Write data into file. -/// \param data Buffer which needs to be written into the file. -/// \param length Length of the buffer. -/// \param stream Handle to the opened file. -/// -/// Dart_FileCloseCallback - Closes the opened file. -/// \param stream Handle to the opened file. -typedef Dart_FileOpenCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Bool)>>; -typedef Dart_FileReadCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>>; -typedef Dart_FileWriteCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.IntPtr, ffi.Pointer)>>; -typedef Dart_FileCloseCallback - = ffi.Pointer)>>; -typedef Dart_EntropySource = ffi.Pointer< - ffi.NativeFunction, ffi.IntPtr)>>; +const int kCFNotificationDeliverImmediately = 1; -/// Callback provided by the embedder that is used by the vmservice isolate -/// to request the asset archive. The asset archive must be an uncompressed tar -/// archive that is stored in a Uint8List. -/// -/// If the embedder has no vmservice isolate assets, the callback can be NULL. -/// -/// \return The embedder must return a handle to a Uint8List containing an -/// uncompressed tar archive or null. -typedef Dart_GetVMServiceAssetsArchive - = ffi.Pointer>; -typedef Dart_IsolateGroup = ffi.Pointer<_Dart_IsolateGroup>; +const int kCFNotificationPostToAllSessions = 2; -/// A message notification callback. -/// -/// This callback allows the embedder to provide an alternate wakeup -/// mechanism for the delivery of inter-isolate messages. It is the -/// responsibility of the embedder to call Dart_HandleMessage to -/// process the message. -typedef Dart_MessageNotifyCallback - = ffi.Pointer>; +const int kCFCalendarComponentsWrap = 1; -/// A port is used to send or receive inter-isolate messages -typedef Dart_Port = ffi.Int64; +const int kCFSocketAutomaticallyReenableReadCallBack = 1; -abstract class Dart_CoreType_Id { - static const int Dart_CoreType_Dynamic = 0; - static const int Dart_CoreType_Int = 1; - static const int Dart_CoreType_String = 2; -} +const int kCFSocketAutomaticallyReenableAcceptCallBack = 2; -/// ========== -/// Typed Data -/// ========== -abstract class Dart_TypedData_Type { - static const int Dart_TypedData_kByteData = 0; - static const int Dart_TypedData_kInt8 = 1; - static const int Dart_TypedData_kUint8 = 2; - static const int Dart_TypedData_kUint8Clamped = 3; - static const int Dart_TypedData_kInt16 = 4; - static const int Dart_TypedData_kUint16 = 5; - static const int Dart_TypedData_kInt32 = 6; - static const int Dart_TypedData_kUint32 = 7; - static const int Dart_TypedData_kInt64 = 8; - static const int Dart_TypedData_kUint64 = 9; - static const int Dart_TypedData_kFloat32 = 10; - static const int Dart_TypedData_kFloat64 = 11; - static const int Dart_TypedData_kInt32x4 = 12; - static const int Dart_TypedData_kFloat32x4 = 13; - static const int Dart_TypedData_kFloat64x2 = 14; - static const int Dart_TypedData_kInvalid = 15; -} +const int kCFSocketAutomaticallyReenableDataCallBack = 3; -class _Dart_NativeArguments extends ffi.Opaque {} +const int kCFSocketAutomaticallyReenableWriteCallBack = 8; -/// The arguments to a native function. -/// -/// This object is passed to a native function to represent its -/// arguments and return value. It allows access to the arguments to a -/// native function by index. It also allows the return value of a -/// native function to be set. -typedef Dart_NativeArguments = ffi.Pointer<_Dart_NativeArguments>; +const int kCFSocketLeaveErrors = 64; -abstract class Dart_NativeArgument_Type { - static const int Dart_NativeArgument_kBool = 0; - static const int Dart_NativeArgument_kInt32 = 1; - static const int Dart_NativeArgument_kUint32 = 2; - static const int Dart_NativeArgument_kInt64 = 3; - static const int Dart_NativeArgument_kUint64 = 4; - static const int Dart_NativeArgument_kDouble = 5; - static const int Dart_NativeArgument_kString = 6; - static const int Dart_NativeArgument_kInstance = 7; - static const int Dart_NativeArgument_kNativeFields = 8; -} +const int kCFSocketCloseOnInvalidate = 128; -class _Dart_NativeArgument_Descriptor extends ffi.Struct { - @ffi.Uint8() - external int type; +const int DISPATCH_WALLTIME_NOW = -2; - @ffi.Uint8() - external int index; -} +const int kCFPropertyListReadCorruptError = 3840; -class _Dart_NativeArgument_Value extends ffi.Opaque {} +const int kCFPropertyListReadUnknownVersionError = 3841; -typedef Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor; -typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; +const int kCFPropertyListReadStreamError = 3842; -/// An environment lookup callback function. -/// -/// \param name The name of the value to lookup in the environment. -/// -/// \return A valid handle to a string if the name exists in the -/// current environment or Dart_Null() if not. -typedef Dart_EnvironmentCallback - = ffi.Pointer>; +const int kCFPropertyListWriteStreamError = 3851; -/// Native entry resolution callback. -/// -/// For libraries and scripts which have native functions, the embedder -/// can provide a native entry resolver. This callback is used to map a -/// name/arity to a Dart_NativeFunction. If no function is found, the -/// callback should return NULL. -/// -/// The parameters to the native resolver function are: -/// \param name a Dart string which is the name of the native function. -/// \param num_of_arguments is the number of arguments expected by the -/// native function. -/// \param auto_setup_scope is a boolean flag that can be set by the resolver -/// to indicate if this function needs a Dart API scope (see Dart_EnterScope/ -/// Dart_ExitScope) to be setup automatically by the VM before calling into -/// the native function. By default most native functions would require this -/// to be true but some light weight native functions which do not call back -/// into the VM through the Dart API may not require a Dart scope to be -/// setup automatically. -/// -/// \return A valid Dart_NativeFunction which resolves to a native entry point -/// for the native function. -/// -/// See Dart_SetNativeResolver. -typedef Dart_NativeEntryResolver = ffi.Pointer< - ffi.NativeFunction< - Dart_NativeFunction Function( - ffi.Handle, ffi.Int, ffi.Pointer)>>; +const int kCFBundleExecutableArchitectureI386 = 7; -/// A native function. -typedef Dart_NativeFunction - = ffi.Pointer>; +const int kCFBundleExecutableArchitecturePPC = 18; -/// Native entry symbol lookup callback. -/// -/// For libraries and scripts which have native functions, the embedder -/// can provide a callback for mapping a native entry to a symbol. This callback -/// maps a native function entry PC to the native function name. If no native -/// entry symbol can be found, the callback should return NULL. -/// -/// The parameters to the native reverse resolver function are: -/// \param nf A Dart_NativeFunction. -/// -/// \return A const UTF-8 string containing the symbol name or NULL. -/// -/// See Dart_SetNativeResolver. -typedef Dart_NativeEntrySymbol = ffi.Pointer< - ffi.NativeFunction Function(Dart_NativeFunction)>>; +const int kCFBundleExecutableArchitectureX86_64 = 16777223; -/// FFI Native C function pointer resolver callback. -/// -/// See Dart_SetFfiNativeResolver. -typedef Dart_FfiNativeResolver = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.UintPtr)>>; +const int kCFBundleExecutableArchitecturePPC64 = 16777234; -/// ===================== -/// Scripts and Libraries -/// ===================== -abstract class Dart_LibraryTag { - static const int Dart_kCanonicalizeUrl = 0; - static const int Dart_kImportTag = 1; - static const int Dart_kKernelTag = 2; -} +const int kCFBundleExecutableArchitectureARM64 = 16777228; -/// The library tag handler is a multi-purpose callback provided by the -/// embedder to the Dart VM. The embedder implements the tag handler to -/// provide the ability to load Dart scripts and imports. -/// -/// -- TAGS -- -/// -/// Dart_kCanonicalizeUrl -/// -/// This tag indicates that the embedder should canonicalize 'url' with -/// respect to 'library'. For most embedders, the -/// Dart_DefaultCanonicalizeUrl function is a sufficient implementation -/// of this tag. The return value should be a string holding the -/// canonicalized url. -/// -/// Dart_kImportTag -/// -/// This tag is used to load a library from IsolateMirror.loadUri. The embedder -/// should call Dart_LoadLibraryFromKernel to provide the library to the VM. The -/// return value should be an error or library (the result from -/// Dart_LoadLibraryFromKernel). -/// -/// Dart_kKernelTag -/// -/// This tag is used to load the intermediate file (kernel) generated by -/// the Dart front end. This tag is typically used when a 'hot-reload' -/// of an application is needed and the VM is 'use dart front end' mode. -/// The dart front end typically compiles all the scripts, imports and part -/// files into one intermediate file hence we don't use the source/import or -/// script tags. The return value should be an error or a TypedData containing -/// the kernel bytes. -typedef Dart_LibraryTagHandler = ffi.Pointer< - ffi.NativeFunction>; +const int kCFMessagePortSuccess = 0; -/// Handles deferred loading requests. When this handler is invoked, it should -/// eventually load the deferred loading unit with the given id and call -/// Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is -/// recommended that the loading occur asynchronously, but it is permitted to -/// call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the -/// handler returns. -/// -/// If an error is returned, it will be propogated through -/// `prefix.loadLibrary()`. This is useful for synchronous -/// implementations, which must propogate any unwind errors from -/// Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler -/// should return a non-error such as `Dart_Null()`. -typedef Dart_DeferredLoadHandler - = ffi.Pointer>; +const int kCFMessagePortSendTimeout = -1; -/// TODO(33433): Remove kernel service from the embedding API. -abstract class Dart_KernelCompilationStatus { - static const int Dart_KernelCompilationStatus_Unknown = -1; - static const int Dart_KernelCompilationStatus_Ok = 0; - static const int Dart_KernelCompilationStatus_Error = 1; - static const int Dart_KernelCompilationStatus_Crash = 2; - static const int Dart_KernelCompilationStatus_MsgFailed = 3; -} +const int kCFMessagePortReceiveTimeout = -2; -class Dart_KernelCompilationResult extends ffi.Struct { - @ffi.Int32() - external int status; +const int kCFMessagePortIsInvalid = -3; - @ffi.Bool() - external bool null_safety; +const int kCFMessagePortTransportError = -4; - external ffi.Pointer error; +const int kCFMessagePortBecameInvalidError = -5; - external ffi.Pointer kernel; +const int kCFStringTokenizerUnitWord = 0; - @ffi.IntPtr() - external int kernel_size; -} +const int kCFStringTokenizerUnitSentence = 1; -abstract class Dart_KernelCompilationVerbosityLevel { - static const int Dart_KernelCompilationVerbosityLevel_Error = 0; - static const int Dart_KernelCompilationVerbosityLevel_Warning = 1; - static const int Dart_KernelCompilationVerbosityLevel_Info = 2; - static const int Dart_KernelCompilationVerbosityLevel_All = 3; -} +const int kCFStringTokenizerUnitParagraph = 2; -class Dart_SourceFile extends ffi.Struct { - external ffi.Pointer uri; +const int kCFStringTokenizerUnitLineBreak = 3; - external ffi.Pointer source; -} +const int kCFStringTokenizerUnitWordBoundary = 4; -typedef Dart_StreamingWriteCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.IntPtr)>>; -typedef Dart_CreateLoadingUnitCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer>, - ffi.Pointer>)>>; -typedef Dart_StreamingCloseCallback - = ffi.Pointer)>>; +const int kCFStringTokenizerAttributeLatinTranscription = 65536; -/// A Dart_CObject is used for representing Dart objects as native C -/// data outside the Dart heap. These objects are totally detached from -/// the Dart heap. Only a subset of the Dart objects have a -/// representation as a Dart_CObject. -/// -/// The string encoding in the 'value.as_string' is UTF-8. -/// -/// All the different types from dart:typed_data are exposed as type -/// kTypedData. The specific type from dart:typed_data is in the type -/// field of the as_typed_data structure. The length in the -/// as_typed_data structure is always in bytes. -/// -/// The data for kTypedData is copied on message send and ownership remains with -/// the caller. The ownership of data for kExternalTyped is passed to the VM on -/// message send and returned when the VM invokes the -/// Dart_HandleFinalizer callback; a non-NULL callback must be provided. -abstract class Dart_CObject_Type { - static const int Dart_CObject_kNull = 0; - static const int Dart_CObject_kBool = 1; - static const int Dart_CObject_kInt32 = 2; - static const int Dart_CObject_kInt64 = 3; - static const int Dart_CObject_kDouble = 4; - static const int Dart_CObject_kString = 5; - static const int Dart_CObject_kArray = 6; - static const int Dart_CObject_kTypedData = 7; - static const int Dart_CObject_kExternalTypedData = 8; - static const int Dart_CObject_kSendPort = 9; - static const int Dart_CObject_kCapability = 10; - static const int Dart_CObject_kNativePointer = 11; - static const int Dart_CObject_kUnsupported = 12; - static const int Dart_CObject_kNumberOfTypes = 13; -} +const int kCFStringTokenizerAttributeLanguage = 131072; -class _Dart_CObject extends ffi.Struct { - @ffi.Int32() - external int type; +const int kCFFileDescriptorReadCallBack = 1; - external UnnamedUnion6 value; -} +const int kCFFileDescriptorWriteCallBack = 2; -class UnnamedUnion6 extends ffi.Union { - @ffi.Bool() - external bool as_bool; +const int kCFUserNotificationStopAlertLevel = 0; - @ffi.Int32() - external int as_int32; +const int kCFUserNotificationNoteAlertLevel = 1; - @ffi.Int64() - external int as_int64; +const int kCFUserNotificationCautionAlertLevel = 2; - @ffi.Double() - external double as_double; +const int kCFUserNotificationPlainAlertLevel = 3; - external ffi.Pointer as_string; +const int kCFUserNotificationDefaultResponse = 0; - external UnnamedStruct5 as_send_port; +const int kCFUserNotificationAlternateResponse = 1; - external UnnamedStruct6 as_capability; +const int kCFUserNotificationOtherResponse = 2; - external UnnamedStruct7 as_array; +const int kCFUserNotificationCancelResponse = 3; - external UnnamedStruct8 as_typed_data; +const int kCFUserNotificationNoDefaultButtonFlag = 32; - external UnnamedStruct9 as_external_typed_data; +const int kCFUserNotificationUseRadioButtonsFlag = 64; - external UnnamedStruct10 as_native_pointer; -} +const int kCFXMLNodeCurrentVersion = 1; -class UnnamedStruct5 extends ffi.Struct { - @Dart_Port() - external int id; +const int CSSM_INVALID_HANDLE = 0; - @Dart_Port() - external int origin_id; -} +const int CSSM_FALSE = 0; -class UnnamedStruct6 extends ffi.Struct { - @ffi.Int64() - external int id; -} +const int CSSM_TRUE = 1; -class UnnamedStruct7 extends ffi.Struct { - @ffi.IntPtr() - external int length; +const int CSSM_OK = 0; - external ffi.Pointer> values; -} +const int CSSM_MODULE_STRING_SIZE = 64; -class UnnamedStruct8 extends ffi.Struct { - @ffi.Int32() - external int type; +const int CSSM_KEY_HIERARCHY_NONE = 0; - /// in elements, not bytes - @ffi.IntPtr() - external int length; +const int CSSM_KEY_HIERARCHY_INTEG = 1; - external ffi.Pointer values; -} +const int CSSM_KEY_HIERARCHY_EXPORT = 2; -class UnnamedStruct9 extends ffi.Struct { - @ffi.Int32() - external int type; +const int CSSM_PVC_NONE = 0; - /// in elements, not bytes - @ffi.IntPtr() - external int length; +const int CSSM_PVC_APP = 1; - external ffi.Pointer data; +const int CSSM_PVC_SP = 2; - external ffi.Pointer peer; +const int CSSM_PRIVILEGE_SCOPE_NONE = 0; - external Dart_HandleFinalizer callback; -} +const int CSSM_PRIVILEGE_SCOPE_PROCESS = 1; -class UnnamedStruct10 extends ffi.Struct { - @ffi.IntPtr() - external int ptr; +const int CSSM_PRIVILEGE_SCOPE_THREAD = 2; - @ffi.IntPtr() - external int size; +const int CSSM_SERVICE_CSSM = 1; - external Dart_HandleFinalizer callback; -} +const int CSSM_SERVICE_CSP = 2; -typedef Dart_CObject = _Dart_CObject; +const int CSSM_SERVICE_DL = 4; -/// A native message handler. -/// -/// This handler is associated with a native port by calling -/// Dart_NewNativePort. -/// -/// The message received is decoded into the message structure. The -/// lifetime of the message data is controlled by the caller. All the -/// data references from the message are allocated by the caller and -/// will be reclaimed when returning to it. -typedef Dart_NativeMessageHandler = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_Port, ffi.Pointer)>>; -typedef Dart_PostCObject_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(Dart_Port_DL, ffi.Pointer)>>; +const int CSSM_SERVICE_CL = 8; -/// ============================================================================ -/// IMPORTANT! Never update these signatures without properly updating -/// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. -/// -/// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types -/// to trigger compile-time errors if the sybols in those files are updated -/// without updating these. -/// -/// Function return and argument types, and typedefs are carbon copied. Structs -/// are typechecked nominally in C/C++, so they are not copied, instead a -/// comment is added to their definition. -typedef Dart_Port_DL = ffi.Int64; -typedef Dart_PostInteger_Type = ffi - .Pointer>; -typedef Dart_NewNativePort_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_Port_DL Function( - ffi.Pointer, Dart_NativeMessageHandler_DL, ffi.Bool)>>; -typedef Dart_NativeMessageHandler_DL = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_Port_DL, ffi.Pointer)>>; -typedef Dart_CloseNativePort_Type - = ffi.Pointer>; -typedef Dart_IsError_Type - = ffi.Pointer>; -typedef Dart_IsApiError_Type - = ffi.Pointer>; -typedef Dart_IsUnhandledExceptionError_Type - = ffi.Pointer>; -typedef Dart_IsCompilationError_Type - = ffi.Pointer>; -typedef Dart_IsFatalError_Type - = ffi.Pointer>; -typedef Dart_GetError_Type = ffi - .Pointer Function(ffi.Handle)>>; -typedef Dart_ErrorHasException_Type - = ffi.Pointer>; -typedef Dart_ErrorGetException_Type - = ffi.Pointer>; -typedef Dart_ErrorGetStackTrace_Type - = ffi.Pointer>; -typedef Dart_NewApiError_Type = ffi - .Pointer)>>; -typedef Dart_NewCompilationError_Type = ffi - .Pointer)>>; -typedef Dart_NewUnhandledExceptionError_Type - = ffi.Pointer>; -typedef Dart_PropagateError_Type - = ffi.Pointer>; -typedef Dart_HandleFromPersistent_Type - = ffi.Pointer>; -typedef Dart_HandleFromWeakPersistent_Type = ffi.Pointer< - ffi.NativeFunction>; -typedef Dart_NewPersistentHandle_Type - = ffi.Pointer>; -typedef Dart_SetPersistentHandle_Type = ffi - .Pointer>; -typedef Dart_DeletePersistentHandle_Type - = ffi.Pointer>; -typedef Dart_NewWeakPersistentHandle_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_WeakPersistentHandle Function(ffi.Handle, ffi.Pointer, - ffi.IntPtr, Dart_HandleFinalizer)>>; -typedef Dart_DeleteWeakPersistentHandle_Type = ffi - .Pointer>; -typedef Dart_UpdateExternalSize_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_WeakPersistentHandle, ffi.IntPtr)>>; -typedef Dart_NewFinalizableHandle_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, - ffi.IntPtr, Dart_HandleFinalizer)>>; -typedef Dart_DeleteFinalizableHandle_Type = ffi.Pointer< - ffi.NativeFunction>; -typedef Dart_UpdateFinalizableExternalSize_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, ffi.IntPtr)>>; -typedef Dart_Post_Type = ffi - .Pointer>; -typedef Dart_NewSendPort_Type - = ffi.Pointer>; -typedef Dart_SendPortGetId_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer)>>; -typedef Dart_EnterScope_Type - = ffi.Pointer>; -typedef Dart_ExitScope_Type - = ffi.Pointer>; +const int CSSM_SERVICE_TP = 16; -/// The type of message being sent to a Dart port. See CUPHTTPClientDelegate. -abstract class MessageType { - static const int ResponseMessage = 0; - static const int DataMessage = 1; - static const int CompletedMessage = 2; - static const int RedirectMessage = 3; - static const int FinishedDownloading = 4; -} +const int CSSM_SERVICE_AC = 32; -/// The configuration associated with a NSURLSessionTask. -/// See CUPHTTPClientDelegate. -class CUPHTTPTaskConfiguration extends NSObject { - CUPHTTPTaskConfiguration._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int CSSM_SERVICE_KR = 64; - /// Returns a [CUPHTTPTaskConfiguration] that points to the same underlying object as [other]. - static CUPHTTPTaskConfiguration castFrom(T other) { - return CUPHTTPTaskConfiguration._(other._id, other._lib, - retain: true, release: true); - } +const int CSSM_NOTIFY_INSERT = 1; - /// Returns a [CUPHTTPTaskConfiguration] that wraps the given raw object pointer. - static CUPHTTPTaskConfiguration castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPTaskConfiguration._(other, lib, - retain: retain, release: release); - } +const int CSSM_NOTIFY_REMOVE = 2; - /// Returns whether [obj] is an instance of [CUPHTTPTaskConfiguration]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPTaskConfiguration1); - } +const int CSSM_NOTIFY_FAULT = 3; - NSObject initWithPort_(int sendPort) { - final _ret = - _lib._objc_msgSend_477(_id, _lib._sel_initWithPort_1, sendPort); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int CSSM_ATTACH_READ_ONLY = 1; - int get sendPort { - return _lib._objc_msgSend_329(_id, _lib._sel_sendPort1); - } +const int CSSM_USEE_LAST = 255; - static CUPHTTPTaskConfiguration new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_new1); - return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); - } +const int CSSM_USEE_NONE = 0; - static CUPHTTPTaskConfiguration alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_alloc1); - return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); - } -} +const int CSSM_USEE_DOMESTIC = 1; -/// A delegate for NSURLSession that forwards events for registered -/// NSURLSessionTasks and forwards them to a port for consumption in Dart. -/// -/// The messages sent to the port are contained in a List with one of 3 -/// possible formats: -/// -/// 1. When the delegate receives a HTTP redirect response: -/// [MessageType::RedirectMessage, ] -/// -/// 2. When the delegate receives a HTTP response: -/// [MessageType::ResponseMessage, ] -/// -/// 3. When the delegate receives some HTTP data: -/// [MessageType::DataMessage, ] -/// -/// 4. When the delegate is informed that the response is complete: -/// [MessageType::CompletedMessage, ] -class CUPHTTPClientDelegate extends NSObject { - CUPHTTPClientDelegate._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int CSSM_USEE_FINANCIAL = 2; - /// Returns a [CUPHTTPClientDelegate] that points to the same underlying object as [other]. - static CUPHTTPClientDelegate castFrom(T other) { - return CUPHTTPClientDelegate._(other._id, other._lib, - retain: true, release: true); - } +const int CSSM_USEE_KRLE = 3; - /// Returns a [CUPHTTPClientDelegate] that wraps the given raw object pointer. - static CUPHTTPClientDelegate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPClientDelegate._(other, lib, - retain: retain, release: release); - } +const int CSSM_USEE_KRENT = 4; - /// Returns whether [obj] is an instance of [CUPHTTPClientDelegate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPClientDelegate1); - } +const int CSSM_USEE_SSL = 5; - /// Instruct the delegate to forward events for the given task to the port - /// specified in the configuration. - void registerTask_withConfiguration_( - NSURLSessionTask? task, CUPHTTPTaskConfiguration? config) { - return _lib._objc_msgSend_478( - _id, - _lib._sel_registerTask_withConfiguration_1, - task?._id ?? ffi.nullptr, - config?._id ?? ffi.nullptr); - } +const int CSSM_USEE_AUTHENTICATION = 6; - static CUPHTTPClientDelegate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPClientDelegate1, _lib._sel_new1); - return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); - } +const int CSSM_USEE_KEYEXCH = 7; - static CUPHTTPClientDelegate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPClientDelegate1, _lib._sel_alloc1); - return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); - } -} +const int CSSM_USEE_MEDICAL = 8; -/// An object used to communicate redirect information to Dart code. -/// -/// The flow is: -/// 1. CUPHTTPClientDelegate receives a message from the URL Loading System. -/// 2. CUPHTTPClientDelegate creates a new CUPHTTPForwardedDelegate subclass. -/// 3. CUPHTTPClientDelegate sends the CUPHTTPForwardedDelegate to the -/// configured Dart_Port. -/// 4. CUPHTTPClientDelegate waits on CUPHTTPForwardedDelegate.lock -/// 5. When the Dart code is done process the message received on the port, -/// it calls [CUPHTTPForwardedDelegate finish*], which releases the lock. -/// 6. CUPHTTPClientDelegate continues running. -class CUPHTTPForwardedDelegate extends NSObject { - CUPHTTPForwardedDelegate._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int CSSM_USEE_INSURANCE = 9; - /// Returns a [CUPHTTPForwardedDelegate] that points to the same underlying object as [other]. - static CUPHTTPForwardedDelegate castFrom(T other) { - return CUPHTTPForwardedDelegate._(other._id, other._lib, - retain: true, release: true); - } +const int CSSM_USEE_WEAK = 10; - /// Returns a [CUPHTTPForwardedDelegate] that wraps the given raw object pointer. - static CUPHTTPForwardedDelegate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedDelegate._(other, lib, - retain: retain, release: release); - } +const int CSSM_ADDR_NONE = 0; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedDelegate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedDelegate1); - } +const int CSSM_ADDR_CUSTOM = 1; - NSObject initWithSession_task_( - NSURLSession? session, NSURLSessionTask? task) { - final _ret = _lib._objc_msgSend_479(_id, _lib._sel_initWithSession_task_1, - session?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int CSSM_ADDR_URL = 2; - /// Indicates that the task should continue executing using the given request. - void finish() { - return _lib._objc_msgSend_1(_id, _lib._sel_finish1); - } +const int CSSM_ADDR_SOCKADDR = 3; - NSURLSession? get session { - final _ret = _lib._objc_msgSend_387(_id, _lib._sel_session1); - return _ret.address == 0 - ? null - : NSURLSession._(_ret, _lib, retain: true, release: true); - } +const int CSSM_ADDR_NAME = 4; - NSURLSessionTask? get task { - final _ret = _lib._objc_msgSend_480(_id, _lib._sel_task1); - return _ret.address == 0 - ? null - : NSURLSessionTask._(_ret, _lib, retain: true, release: true); - } +const int CSSM_NET_PROTO_NONE = 0; - /// This property is meant to be used only by CUPHTTPClientDelegate. - NSLock? get lock { - final _ret = _lib._objc_msgSend_481(_id, _lib._sel_lock1); - return _ret.address == 0 - ? null - : NSLock._(_ret, _lib, retain: true, release: true); - } +const int CSSM_NET_PROTO_CUSTOM = 1; - static CUPHTTPForwardedDelegate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_new1); - return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); - } +const int CSSM_NET_PROTO_UNSPECIFIED = 2; - static CUPHTTPForwardedDelegate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_alloc1); - return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); - } -} +const int CSSM_NET_PROTO_LDAP = 3; -class NSLock extends _ObjCWrapper { - NSLock._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int CSSM_NET_PROTO_LDAPS = 4; - /// Returns a [NSLock] that points to the same underlying object as [other]. - static NSLock castFrom(T other) { - return NSLock._(other._id, other._lib, retain: true, release: true); - } +const int CSSM_NET_PROTO_LDAPNS = 5; - /// Returns a [NSLock] that wraps the given raw object pointer. - static NSLock castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSLock._(other, lib, retain: retain, release: release); - } +const int CSSM_NET_PROTO_X500DAP = 6; - /// Returns whether [obj] is an instance of [NSLock]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLock1); - } -} +const int CSSM_NET_PROTO_FTP = 7; -class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedRedirect._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int CSSM_NET_PROTO_FTPS = 8; - /// Returns a [CUPHTTPForwardedRedirect] that points to the same underlying object as [other]. - static CUPHTTPForwardedRedirect castFrom(T other) { - return CUPHTTPForwardedRedirect._(other._id, other._lib, - retain: true, release: true); - } +const int CSSM_NET_PROTO_OCSP = 9; - /// Returns a [CUPHTTPForwardedRedirect] that wraps the given raw object pointer. - static CUPHTTPForwardedRedirect castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedRedirect._(other, lib, - retain: retain, release: release); - } +const int CSSM_NET_PROTO_CMP = 10; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedRedirect]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedRedirect1); - } +const int CSSM_NET_PROTO_CMPS = 11; - NSObject initWithSession_task_response_request_( - NSURLSession? session, - NSURLSessionTask? task, - NSHTTPURLResponse? response, - NSURLRequest? request) { - final _ret = _lib._objc_msgSend_482( - _id, - _lib._sel_initWithSession_task_response_request_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - response?._id ?? ffi.nullptr, - request?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int CSSM_WORDID__UNK_ = -1; - /// Indicates that the task should continue executing using the given request. - /// If the request is NIL then the redirect is not followed and the task is - /// complete. - void finishWithRequest_(NSURLRequest? request) { - return _lib._objc_msgSend_483( - _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); - } +const int CSSM_WORDID__NLU_ = 0; - NSHTTPURLResponse? get response { - final _ret = _lib._objc_msgSend_484(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); - } +const int CSSM_WORDID__STAR_ = 1; - NSURLRequest? get request { - final _ret = _lib._objc_msgSend_377(_id, _lib._sel_request1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } +const int CSSM_WORDID_A = 2; - /// This property is meant to be used only by CUPHTTPClientDelegate. - NSURLRequest? get redirectRequest { - final _ret = _lib._objc_msgSend_377(_id, _lib._sel_redirectRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } +const int CSSM_WORDID_ACL = 3; - static CUPHTTPForwardedRedirect new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_new1); - return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); - } +const int CSSM_WORDID_ALPHA = 4; + +const int CSSM_WORDID_B = 5; + +const int CSSM_WORDID_BER = 6; + +const int CSSM_WORDID_BINARY = 7; + +const int CSSM_WORDID_BIOMETRIC = 8; + +const int CSSM_WORDID_C = 9; + +const int CSSM_WORDID_CANCELED = 10; + +const int CSSM_WORDID_CERT = 11; + +const int CSSM_WORDID_COMMENT = 12; - static CUPHTTPForwardedRedirect alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_alloc1); - return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); - } -} +const int CSSM_WORDID_CRL = 13; -class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedResponse._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int CSSM_WORDID_CUSTOM = 14; - /// Returns a [CUPHTTPForwardedResponse] that points to the same underlying object as [other]. - static CUPHTTPForwardedResponse castFrom(T other) { - return CUPHTTPForwardedResponse._(other._id, other._lib, - retain: true, release: true); - } +const int CSSM_WORDID_D = 15; - /// Returns a [CUPHTTPForwardedResponse] that wraps the given raw object pointer. - static CUPHTTPForwardedResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedResponse._(other, lib, - retain: retain, release: release); - } +const int CSSM_WORDID_DATE = 16; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedResponse1); - } +const int CSSM_WORDID_DB_DELETE = 17; - NSObject initWithSession_task_response_( - NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { - final _ret = _lib._objc_msgSend_485( - _id, - _lib._sel_initWithSession_task_response_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - response?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int CSSM_WORDID_DB_EXEC_STORED_QUERY = 18; - void finishWithDisposition_(int disposition) { - return _lib._objc_msgSend_486( - _id, _lib._sel_finishWithDisposition_1, disposition); - } +const int CSSM_WORDID_DB_INSERT = 19; - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_379(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); - } +const int CSSM_WORDID_DB_MODIFY = 20; - /// This property is meant to be used only by CUPHTTPClientDelegate. - int get disposition { - return _lib._objc_msgSend_487(_id, _lib._sel_disposition1); - } +const int CSSM_WORDID_DB_READ = 21; - static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedResponse1, _lib._sel_new1); - return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); - } +const int CSSM_WORDID_DBS_CREATE = 22; - static CUPHTTPForwardedResponse alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedResponse1, _lib._sel_alloc1); - return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); - } -} +const int CSSM_WORDID_DBS_DELETE = 23; -class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int CSSM_WORDID_DECRYPT = 24; - /// Returns a [CUPHTTPForwardedData] that points to the same underlying object as [other]. - static CUPHTTPForwardedData castFrom(T other) { - return CUPHTTPForwardedData._(other._id, other._lib, - retain: true, release: true); - } +const int CSSM_WORDID_DELETE = 25; - /// Returns a [CUPHTTPForwardedData] that wraps the given raw object pointer. - static CUPHTTPForwardedData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedData._(other, lib, retain: retain, release: release); - } +const int CSSM_WORDID_DELTA_CRL = 26; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedData1); - } +const int CSSM_WORDID_DER = 27; - NSObject initWithSession_task_data_( - NSURLSession? session, NSURLSessionTask? task, NSData? data) { - final _ret = _lib._objc_msgSend_488( - _id, - _lib._sel_initWithSession_task_data_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - data?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int CSSM_WORDID_DERIVE = 28; - NSData? get data { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } +const int CSSM_WORDID_DISPLAY = 29; - static CUPHTTPForwardedData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_CUPHTTPForwardedData1, _lib._sel_new1); - return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); - } +const int CSSM_WORDID_DO = 30; - static CUPHTTPForwardedData alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedData1, _lib._sel_alloc1); - return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); - } -} +const int CSSM_WORDID_DSA = 31; -class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedComplete._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int CSSM_WORDID_DSA_SHA1 = 32; - /// Returns a [CUPHTTPForwardedComplete] that points to the same underlying object as [other]. - static CUPHTTPForwardedComplete castFrom(T other) { - return CUPHTTPForwardedComplete._(other._id, other._lib, - retain: true, release: true); - } +const int CSSM_WORDID_E = 33; - /// Returns a [CUPHTTPForwardedComplete] that wraps the given raw object pointer. - static CUPHTTPForwardedComplete castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedComplete._(other, lib, - retain: retain, release: release); - } +const int CSSM_WORDID_ELGAMAL = 34; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedComplete]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedComplete1); - } +const int CSSM_WORDID_ENCRYPT = 35; - NSObject initWithSession_task_error_( - NSURLSession? session, NSURLSessionTask? task, NSError? error) { - final _ret = _lib._objc_msgSend_489( - _id, - _lib._sel_initWithSession_task_error_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - error?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int CSSM_WORDID_ENTRY = 36; - NSError? get error { - final _ret = _lib._objc_msgSend_383(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); - } +const int CSSM_WORDID_EXPORT_CLEAR = 37; - static CUPHTTPForwardedComplete new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedComplete1, _lib._sel_new1); - return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); - } +const int CSSM_WORDID_EXPORT_WRAPPED = 38; - static CUPHTTPForwardedComplete alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedComplete1, _lib._sel_alloc1); - return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); - } -} +const int CSSM_WORDID_G = 39; -class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedFinishedDownloading._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +const int CSSM_WORDID_GE = 40; - /// Returns a [CUPHTTPForwardedFinishedDownloading] that points to the same underlying object as [other]. - static CUPHTTPForwardedFinishedDownloading castFrom( - T other) { - return CUPHTTPForwardedFinishedDownloading._(other._id, other._lib, - retain: true, release: true); - } +const int CSSM_WORDID_GENKEY = 41; - /// Returns a [CUPHTTPForwardedFinishedDownloading] that wraps the given raw object pointer. - static CUPHTTPForwardedFinishedDownloading castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedFinishedDownloading._(other, lib, - retain: retain, release: release); - } +const int CSSM_WORDID_HASH = 42; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedFinishedDownloading]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedFinishedDownloading1); - } +const int CSSM_WORDID_HASHED_PASSWORD = 43; - NSObject initWithSession_downloadTask_url_(NSURLSession? session, - NSURLSessionDownloadTask? downloadTask, NSURL? location) { - final _ret = _lib._objc_msgSend_490( - _id, - _lib._sel_initWithSession_downloadTask_url_1, - session?._id ?? ffi.nullptr, - downloadTask?._id ?? ffi.nullptr, - location?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +const int CSSM_WORDID_HASHED_SUBJECT = 44; - NSURL? get location { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_location1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +const int CSSM_WORDID_HAVAL = 45; - static CUPHTTPForwardedFinishedDownloading new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_new1); - return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, - retain: false, release: true); - } +const int CSSM_WORDID_IBCHASH = 46; - static CUPHTTPForwardedFinishedDownloading alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_alloc1); - return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, - retain: false, release: true); - } -} +const int CSSM_WORDID_IMPORT_CLEAR = 47; -const int noErr = 0; +const int CSSM_WORDID_IMPORT_WRAPPED = 48; -const int kNilOptions = 0; +const int CSSM_WORDID_INTEL = 49; -const int kVariableLengthArray = 1; +const int CSSM_WORDID_ISSUER = 50; -const int kUnknownType = 1061109567; +const int CSSM_WORDID_ISSUER_INFO = 51; -const int normal = 0; +const int CSSM_WORDID_K_OF_N = 52; -const int bold = 1; +const int CSSM_WORDID_KEA = 53; -const int italic = 2; +const int CSSM_WORDID_KEYHOLDER = 54; -const int underline = 4; +const int CSSM_WORDID_L = 55; -const int outline = 8; +const int CSSM_WORDID_LE = 56; -const int shadow = 16; +const int CSSM_WORDID_LOGIN = 57; -const int condense = 32; +const int CSSM_WORDID_LOGIN_NAME = 58; -const int extend = 64; +const int CSSM_WORDID_MAC = 59; -const int developStage = 32; +const int CSSM_WORDID_MD2 = 60; -const int alphaStage = 64; +const int CSSM_WORDID_MD2WITHRSA = 61; -const int betaStage = 96; +const int CSSM_WORDID_MD4 = 62; -const int finalStage = 128; +const int CSSM_WORDID_MD5 = 63; -const int NSScannedOption = 1; +const int CSSM_WORDID_MD5WITHRSA = 64; -const int NSCollectorDisabledOption = 2; +const int CSSM_WORDID_N = 65; -const int errSecSuccess = 0; +const int CSSM_WORDID_NAME = 66; -const int errSecUnimplemented = -4; +const int CSSM_WORDID_NDR = 67; -const int errSecDiskFull = -34; +const int CSSM_WORDID_NHASH = 68; -const int errSecDskFull = -34; +const int CSSM_WORDID_NOT_AFTER = 69; -const int errSecIO = -36; +const int CSSM_WORDID_NOT_BEFORE = 70; -const int errSecOpWr = -49; +const int CSSM_WORDID_NULL = 71; -const int errSecParam = -50; +const int CSSM_WORDID_NUMERIC = 72; -const int errSecWrPerm = -61; +const int CSSM_WORDID_OBJECT_HASH = 73; -const int errSecAllocate = -108; +const int CSSM_WORDID_ONE_TIME = 74; -const int errSecUserCanceled = -128; +const int CSSM_WORDID_ONLINE = 75; -const int errSecBadReq = -909; +const int CSSM_WORDID_OWNER = 76; -const int errSecInternalComponent = -2070; +const int CSSM_WORDID_P = 77; -const int errSecCoreFoundationUnknown = -4960; +const int CSSM_WORDID_PAM_NAME = 78; -const int errSecMissingEntitlement = -34018; +const int CSSM_WORDID_PASSWORD = 79; -const int errSecRestrictedAPI = -34020; +const int CSSM_WORDID_PGP = 80; -const int errSecNotAvailable = -25291; +const int CSSM_WORDID_PREFIX = 81; -const int errSecReadOnly = -25292; +const int CSSM_WORDID_PRIVATE_KEY = 82; -const int errSecAuthFailed = -25293; +const int CSSM_WORDID_PROMPTED_BIOMETRIC = 83; -const int errSecNoSuchKeychain = -25294; +const int CSSM_WORDID_PROMPTED_PASSWORD = 84; -const int errSecInvalidKeychain = -25295; +const int CSSM_WORDID_PROPAGATE = 85; -const int errSecDuplicateKeychain = -25296; +const int CSSM_WORDID_PROTECTED_BIOMETRIC = 86; -const int errSecDuplicateCallback = -25297; +const int CSSM_WORDID_PROTECTED_PASSWORD = 87; -const int errSecInvalidCallback = -25298; +const int CSSM_WORDID_PROTECTED_PIN = 88; -const int errSecDuplicateItem = -25299; +const int CSSM_WORDID_PUBLIC_KEY = 89; -const int errSecItemNotFound = -25300; +const int CSSM_WORDID_PUBLIC_KEY_FROM_CERT = 90; -const int errSecBufferTooSmall = -25301; +const int CSSM_WORDID_Q = 91; -const int errSecDataTooLarge = -25302; +const int CSSM_WORDID_RANGE = 92; -const int errSecNoSuchAttr = -25303; +const int CSSM_WORDID_REVAL = 93; -const int errSecInvalidItemRef = -25304; +const int CSSM_WORDID_RIPEMAC = 94; -const int errSecInvalidSearchRef = -25305; +const int CSSM_WORDID_RIPEMD = 95; -const int errSecNoSuchClass = -25306; +const int CSSM_WORDID_RIPEMD160 = 96; -const int errSecNoDefaultKeychain = -25307; +const int CSSM_WORDID_RSA = 97; -const int errSecInteractionNotAllowed = -25308; +const int CSSM_WORDID_RSA_ISO9796 = 98; -const int errSecReadOnlyAttr = -25309; +const int CSSM_WORDID_RSA_PKCS = 99; -const int errSecWrongSecVersion = -25310; +const int CSSM_WORDID_RSA_PKCS_MD5 = 100; -const int errSecKeySizeNotAllowed = -25311; +const int CSSM_WORDID_RSA_PKCS_SHA1 = 101; -const int errSecNoStorageModule = -25312; +const int CSSM_WORDID_RSA_PKCS1 = 102; -const int errSecNoCertificateModule = -25313; +const int CSSM_WORDID_RSA_PKCS1_MD5 = 103; -const int errSecNoPolicyModule = -25314; +const int CSSM_WORDID_RSA_PKCS1_SHA1 = 104; -const int errSecInteractionRequired = -25315; +const int CSSM_WORDID_RSA_PKCS1_SIG = 105; -const int errSecDataNotAvailable = -25316; +const int CSSM_WORDID_RSA_RAW = 106; -const int errSecDataNotModifiable = -25317; +const int CSSM_WORDID_SDSIV1 = 107; -const int errSecCreateChainFailed = -25318; +const int CSSM_WORDID_SEQUENCE = 108; -const int errSecInvalidPrefsDomain = -25319; +const int CSSM_WORDID_SET = 109; -const int errSecInDarkWake = -25320; +const int CSSM_WORDID_SEXPR = 110; -const int errSecACLNotSimple = -25240; +const int CSSM_WORDID_SHA1 = 111; -const int errSecPolicyNotFound = -25241; +const int CSSM_WORDID_SHA1WITHDSA = 112; -const int errSecInvalidTrustSetting = -25242; +const int CSSM_WORDID_SHA1WITHECDSA = 113; -const int errSecNoAccessForItem = -25243; +const int CSSM_WORDID_SHA1WITHRSA = 114; -const int errSecInvalidOwnerEdit = -25244; +const int CSSM_WORDID_SIGN = 115; -const int errSecTrustNotAvailable = -25245; +const int CSSM_WORDID_SIGNATURE = 116; -const int errSecUnsupportedFormat = -25256; +const int CSSM_WORDID_SIGNED_NONCE = 117; -const int errSecUnknownFormat = -25257; +const int CSSM_WORDID_SIGNED_SECRET = 118; -const int errSecKeyIsSensitive = -25258; +const int CSSM_WORDID_SPKI = 119; -const int errSecMultiplePrivKeys = -25259; +const int CSSM_WORDID_SUBJECT = 120; -const int errSecPassphraseRequired = -25260; +const int CSSM_WORDID_SUBJECT_INFO = 121; -const int errSecInvalidPasswordRef = -25261; +const int CSSM_WORDID_TAG = 122; -const int errSecInvalidTrustSettings = -25262; +const int CSSM_WORDID_THRESHOLD = 123; -const int errSecNoTrustSettings = -25263; +const int CSSM_WORDID_TIME = 124; -const int errSecPkcs12VerifyFailure = -25264; +const int CSSM_WORDID_URI = 125; -const int errSecNotSigner = -26267; +const int CSSM_WORDID_VERSION = 126; -const int errSecDecode = -26275; +const int CSSM_WORDID_X509_ATTRIBUTE = 127; -const int errSecServiceNotAvailable = -67585; +const int CSSM_WORDID_X509V1 = 128; -const int errSecInsufficientClientID = -67586; +const int CSSM_WORDID_X509V2 = 129; -const int errSecDeviceReset = -67587; +const int CSSM_WORDID_X509V3 = 130; -const int errSecDeviceFailed = -67588; +const int CSSM_WORDID_X9_ATTRIBUTE = 131; -const int errSecAppleAddAppACLSubject = -67589; +const int CSSM_WORDID_VENDOR_START = 65536; -const int errSecApplePublicKeyIncomplete = -67590; +const int CSSM_WORDID_VENDOR_END = 2147418112; -const int errSecAppleSignatureMismatch = -67591; +const int CSSM_LIST_ELEMENT_DATUM = 0; -const int errSecAppleInvalidKeyStartDate = -67592; +const int CSSM_LIST_ELEMENT_SUBLIST = 1; -const int errSecAppleInvalidKeyEndDate = -67593; +const int CSSM_LIST_ELEMENT_WORDID = 2; -const int errSecConversionError = -67594; +const int CSSM_LIST_TYPE_UNKNOWN = 0; -const int errSecAppleSSLv2Rollback = -67595; +const int CSSM_LIST_TYPE_CUSTOM = 1; -const int errSecQuotaExceeded = -67596; +const int CSSM_LIST_TYPE_SEXPR = 2; -const int errSecFileTooBig = -67597; +const int CSSM_SAMPLE_TYPE_PASSWORD = 79; -const int errSecInvalidDatabaseBlob = -67598; +const int CSSM_SAMPLE_TYPE_HASHED_PASSWORD = 43; -const int errSecInvalidKeyBlob = -67599; +const int CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD = 87; -const int errSecIncompatibleDatabaseBlob = -67600; +const int CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD = 84; -const int errSecIncompatibleKeyBlob = -67601; +const int CSSM_SAMPLE_TYPE_SIGNED_NONCE = 117; -const int errSecHostNameMismatch = -67602; +const int CSSM_SAMPLE_TYPE_SIGNED_SECRET = 118; -const int errSecUnknownCriticalExtensionFlag = -67603; +const int CSSM_SAMPLE_TYPE_BIOMETRIC = 8; -const int errSecNoBasicConstraints = -67604; +const int CSSM_SAMPLE_TYPE_PROTECTED_BIOMETRIC = 86; -const int errSecNoBasicConstraintsCA = -67605; +const int CSSM_SAMPLE_TYPE_PROMPTED_BIOMETRIC = 83; -const int errSecInvalidAuthorityKeyID = -67606; +const int CSSM_SAMPLE_TYPE_THRESHOLD = 123; -const int errSecInvalidSubjectKeyID = -67607; +const int CSSM_CERT_UNKNOWN = 0; -const int errSecInvalidKeyUsageForPolicy = -67608; +const int CSSM_CERT_X_509v1 = 1; -const int errSecInvalidExtendedKeyUsage = -67609; +const int CSSM_CERT_X_509v2 = 2; -const int errSecInvalidIDLinkage = -67610; +const int CSSM_CERT_X_509v3 = 3; -const int errSecPathLengthConstraintExceeded = -67611; +const int CSSM_CERT_PGP = 4; -const int errSecInvalidRoot = -67612; +const int CSSM_CERT_SPKI = 5; -const int errSecCRLExpired = -67613; +const int CSSM_CERT_SDSIv1 = 6; -const int errSecCRLNotValidYet = -67614; +const int CSSM_CERT_Intel = 8; -const int errSecCRLNotFound = -67615; +const int CSSM_CERT_X_509_ATTRIBUTE = 9; -const int errSecCRLServerDown = -67616; +const int CSSM_CERT_X9_ATTRIBUTE = 10; -const int errSecCRLBadURI = -67617; +const int CSSM_CERT_TUPLE = 11; -const int errSecUnknownCertExtension = -67618; +const int CSSM_CERT_ACL_ENTRY = 12; -const int errSecUnknownCRLExtension = -67619; +const int CSSM_CERT_MULTIPLE = 32766; -const int errSecCRLNotTrusted = -67620; +const int CSSM_CERT_LAST = 32767; -const int errSecCRLPolicyFailed = -67621; +const int CSSM_CL_CUSTOM_CERT_TYPE = 32768; -const int errSecIDPFailure = -67622; +const int CSSM_CERT_ENCODING_UNKNOWN = 0; -const int errSecSMIMEEmailAddressesNotFound = -67623; +const int CSSM_CERT_ENCODING_CUSTOM = 1; -const int errSecSMIMEBadExtendedKeyUsage = -67624; +const int CSSM_CERT_ENCODING_BER = 2; -const int errSecSMIMEBadKeyUsage = -67625; +const int CSSM_CERT_ENCODING_DER = 3; -const int errSecSMIMEKeyUsageNotCritical = -67626; +const int CSSM_CERT_ENCODING_NDR = 4; -const int errSecSMIMENoEmailAddress = -67627; +const int CSSM_CERT_ENCODING_SEXPR = 5; -const int errSecSMIMESubjAltNameNotCritical = -67628; +const int CSSM_CERT_ENCODING_PGP = 6; -const int errSecSSLBadExtendedKeyUsage = -67629; +const int CSSM_CERT_ENCODING_MULTIPLE = 32766; -const int errSecOCSPBadResponse = -67630; +const int CSSM_CERT_ENCODING_LAST = 32767; -const int errSecOCSPBadRequest = -67631; +const int CSSM_CL_CUSTOM_CERT_ENCODING = 32768; -const int errSecOCSPUnavailable = -67632; +const int CSSM_CERT_PARSE_FORMAT_NONE = 0; -const int errSecOCSPStatusUnrecognized = -67633; +const int CSSM_CERT_PARSE_FORMAT_CUSTOM = 1; -const int errSecEndOfData = -67634; +const int CSSM_CERT_PARSE_FORMAT_SEXPR = 2; -const int errSecIncompleteCertRevocationCheck = -67635; +const int CSSM_CERT_PARSE_FORMAT_COMPLEX = 3; -const int errSecNetworkFailure = -67636; +const int CSSM_CERT_PARSE_FORMAT_OID_NAMED = 4; -const int errSecOCSPNotTrustedToAnchor = -67637; +const int CSSM_CERT_PARSE_FORMAT_TUPLE = 5; -const int errSecRecordModified = -67638; +const int CSSM_CERT_PARSE_FORMAT_MULTIPLE = 32766; -const int errSecOCSPSignatureError = -67639; +const int CSSM_CERT_PARSE_FORMAT_LAST = 32767; -const int errSecOCSPNoSigner = -67640; +const int CSSM_CL_CUSTOM_CERT_PARSE_FORMAT = 32768; -const int errSecOCSPResponderMalformedReq = -67641; +const int CSSM_CERTGROUP_DATA = 0; -const int errSecOCSPResponderInternalError = -67642; +const int CSSM_CERTGROUP_ENCODED_CERT = 1; -const int errSecOCSPResponderTryLater = -67643; +const int CSSM_CERTGROUP_PARSED_CERT = 2; -const int errSecOCSPResponderSignatureRequired = -67644; +const int CSSM_CERTGROUP_CERT_PAIR = 3; -const int errSecOCSPResponderUnauthorized = -67645; +const int CSSM_ACL_SUBJECT_TYPE_ANY = 1; -const int errSecOCSPResponseNonceMismatch = -67646; +const int CSSM_ACL_SUBJECT_TYPE_THRESHOLD = 123; -const int errSecCodeSigningBadCertChainLength = -67647; +const int CSSM_ACL_SUBJECT_TYPE_PASSWORD = 79; -const int errSecCodeSigningNoBasicConstraints = -67648; +const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD = 87; -const int errSecCodeSigningBadPathLengthConstraint = -67649; +const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD = 84; -const int errSecCodeSigningNoExtendedKeyUsage = -67650; +const int CSSM_ACL_SUBJECT_TYPE_PUBLIC_KEY = 89; -const int errSecCodeSigningDevelopment = -67651; +const int CSSM_ACL_SUBJECT_TYPE_HASHED_SUBJECT = 44; -const int errSecResourceSignBadCertChainLength = -67652; +const int CSSM_ACL_SUBJECT_TYPE_BIOMETRIC = 8; -const int errSecResourceSignBadExtKeyUsage = -67653; +const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_BIOMETRIC = 86; -const int errSecTrustSettingDeny = -67654; +const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_BIOMETRIC = 83; -const int errSecInvalidSubjectName = -67655; +const int CSSM_ACL_SUBJECT_TYPE_LOGIN_NAME = 58; -const int errSecUnknownQualifiedCertStatement = -67656; +const int CSSM_ACL_SUBJECT_TYPE_EXT_PAM_NAME = 78; -const int errSecMobileMeRequestQueued = -67657; +const int CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START = 65536; -const int errSecMobileMeRequestRedirected = -67658; +const int CSSM_ACL_AUTHORIZATION_ANY = 1; -const int errSecMobileMeServerError = -67659; +const int CSSM_ACL_AUTHORIZATION_LOGIN = 57; -const int errSecMobileMeServerNotAvailable = -67660; +const int CSSM_ACL_AUTHORIZATION_GENKEY = 41; -const int errSecMobileMeServerAlreadyExists = -67661; +const int CSSM_ACL_AUTHORIZATION_DELETE = 25; -const int errSecMobileMeServerServiceErr = -67662; +const int CSSM_ACL_AUTHORIZATION_EXPORT_WRAPPED = 38; -const int errSecMobileMeRequestAlreadyPending = -67663; +const int CSSM_ACL_AUTHORIZATION_EXPORT_CLEAR = 37; -const int errSecMobileMeNoRequestPending = -67664; +const int CSSM_ACL_AUTHORIZATION_IMPORT_WRAPPED = 48; -const int errSecMobileMeCSRVerifyFailure = -67665; +const int CSSM_ACL_AUTHORIZATION_IMPORT_CLEAR = 47; -const int errSecMobileMeFailedConsistencyCheck = -67666; +const int CSSM_ACL_AUTHORIZATION_SIGN = 115; -const int errSecNotInitialized = -67667; +const int CSSM_ACL_AUTHORIZATION_ENCRYPT = 35; -const int errSecInvalidHandleUsage = -67668; +const int CSSM_ACL_AUTHORIZATION_DECRYPT = 24; -const int errSecPVCReferentNotFound = -67669; +const int CSSM_ACL_AUTHORIZATION_MAC = 59; -const int errSecFunctionIntegrityFail = -67670; +const int CSSM_ACL_AUTHORIZATION_DERIVE = 28; -const int errSecInternalError = -67671; +const int CSSM_ACL_AUTHORIZATION_DBS_CREATE = 22; -const int errSecMemoryError = -67672; +const int CSSM_ACL_AUTHORIZATION_DBS_DELETE = 23; -const int errSecInvalidData = -67673; +const int CSSM_ACL_AUTHORIZATION_DB_READ = 21; -const int errSecMDSError = -67674; +const int CSSM_ACL_AUTHORIZATION_DB_INSERT = 19; -const int errSecInvalidPointer = -67675; +const int CSSM_ACL_AUTHORIZATION_DB_MODIFY = 20; -const int errSecSelfCheckFailed = -67676; +const int CSSM_ACL_AUTHORIZATION_DB_DELETE = 17; -const int errSecFunctionFailed = -67677; +const int CSSM_ACL_EDIT_MODE_ADD = 1; -const int errSecModuleManifestVerifyFailed = -67678; +const int CSSM_ACL_EDIT_MODE_DELETE = 2; -const int errSecInvalidGUID = -67679; +const int CSSM_ACL_EDIT_MODE_REPLACE = 3; -const int errSecInvalidHandle = -67680; +const int CSSM_KEYHEADER_VERSION = 2; -const int errSecInvalidDBList = -67681; +const int CSSM_KEYBLOB_RAW = 0; -const int errSecInvalidPassthroughID = -67682; +const int CSSM_KEYBLOB_REFERENCE = 2; -const int errSecInvalidNetworkAddress = -67683; +const int CSSM_KEYBLOB_WRAPPED = 3; -const int errSecCRLAlreadySigned = -67684; +const int CSSM_KEYBLOB_OTHER = -1; -const int errSecInvalidNumberOfFields = -67685; +const int CSSM_KEYBLOB_RAW_FORMAT_NONE = 0; -const int errSecVerificationFailure = -67686; +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS1 = 1; -const int errSecUnknownTag = -67687; +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS3 = 2; -const int errSecInvalidSignature = -67688; +const int CSSM_KEYBLOB_RAW_FORMAT_MSCAPI = 3; -const int errSecInvalidName = -67689; +const int CSSM_KEYBLOB_RAW_FORMAT_PGP = 4; -const int errSecInvalidCertificateRef = -67690; +const int CSSM_KEYBLOB_RAW_FORMAT_FIPS186 = 5; -const int errSecInvalidCertificateGroup = -67691; +const int CSSM_KEYBLOB_RAW_FORMAT_BSAFE = 6; -const int errSecTagNotFound = -67692; +const int CSSM_KEYBLOB_RAW_FORMAT_CCA = 9; -const int errSecInvalidQuery = -67693; +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS8 = 10; -const int errSecInvalidValue = -67694; +const int CSSM_KEYBLOB_RAW_FORMAT_SPKI = 11; -const int errSecCallbackFailed = -67695; +const int CSSM_KEYBLOB_RAW_FORMAT_OCTET_STRING = 12; -const int errSecACLDeleteFailed = -67696; +const int CSSM_KEYBLOB_RAW_FORMAT_OTHER = -1; -const int errSecACLReplaceFailed = -67697; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_NONE = 0; -const int errSecACLAddFailed = -67698; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS8 = 1; -const int errSecACLChangeFailed = -67699; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS7 = 2; -const int errSecInvalidAccessCredentials = -67700; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_MSCAPI = 3; -const int errSecInvalidRecord = -67701; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OTHER = -1; -const int errSecInvalidACL = -67702; +const int CSSM_KEYBLOB_REF_FORMAT_INTEGER = 0; -const int errSecInvalidSampleValue = -67703; +const int CSSM_KEYBLOB_REF_FORMAT_STRING = 1; -const int errSecIncompatibleVersion = -67704; +const int CSSM_KEYBLOB_REF_FORMAT_SPKI = 2; -const int errSecPrivilegeNotGranted = -67705; +const int CSSM_KEYBLOB_REF_FORMAT_OTHER = -1; -const int errSecInvalidScope = -67706; +const int CSSM_KEYCLASS_PUBLIC_KEY = 0; -const int errSecPVCAlreadyConfigured = -67707; +const int CSSM_KEYCLASS_PRIVATE_KEY = 1; -const int errSecInvalidPVC = -67708; +const int CSSM_KEYCLASS_SESSION_KEY = 2; -const int errSecEMMLoadFailed = -67709; +const int CSSM_KEYCLASS_SECRET_PART = 3; -const int errSecEMMUnloadFailed = -67710; +const int CSSM_KEYCLASS_OTHER = -1; -const int errSecAddinLoadFailed = -67711; +const int CSSM_KEYATTR_RETURN_DEFAULT = 0; -const int errSecInvalidKeyRef = -67712; +const int CSSM_KEYATTR_RETURN_DATA = 268435456; -const int errSecInvalidKeyHierarchy = -67713; +const int CSSM_KEYATTR_RETURN_REF = 536870912; -const int errSecAddinUnloadFailed = -67714; +const int CSSM_KEYATTR_RETURN_NONE = 1073741824; -const int errSecLibraryReferenceNotFound = -67715; +const int CSSM_KEYATTR_PERMANENT = 1; -const int errSecInvalidAddinFunctionTable = -67716; +const int CSSM_KEYATTR_PRIVATE = 2; -const int errSecInvalidServiceMask = -67717; +const int CSSM_KEYATTR_MODIFIABLE = 4; -const int errSecModuleNotLoaded = -67718; +const int CSSM_KEYATTR_SENSITIVE = 8; -const int errSecInvalidSubServiceID = -67719; +const int CSSM_KEYATTR_EXTRACTABLE = 32; -const int errSecAttributeNotInContext = -67720; +const int CSSM_KEYATTR_ALWAYS_SENSITIVE = 16; -const int errSecModuleManagerInitializeFailed = -67721; +const int CSSM_KEYATTR_NEVER_EXTRACTABLE = 64; -const int errSecModuleManagerNotFound = -67722; +const int CSSM_KEYUSE_ANY = -2147483648; -const int errSecEventNotificationCallbackNotFound = -67723; +const int CSSM_KEYUSE_ENCRYPT = 1; -const int errSecInputLengthError = -67724; +const int CSSM_KEYUSE_DECRYPT = 2; -const int errSecOutputLengthError = -67725; +const int CSSM_KEYUSE_SIGN = 4; -const int errSecPrivilegeNotSupported = -67726; +const int CSSM_KEYUSE_VERIFY = 8; -const int errSecDeviceError = -67727; +const int CSSM_KEYUSE_SIGN_RECOVER = 16; -const int errSecAttachHandleBusy = -67728; +const int CSSM_KEYUSE_VERIFY_RECOVER = 32; -const int errSecNotLoggedIn = -67729; +const int CSSM_KEYUSE_WRAP = 64; -const int errSecAlgorithmMismatch = -67730; +const int CSSM_KEYUSE_UNWRAP = 128; -const int errSecKeyUsageIncorrect = -67731; +const int CSSM_KEYUSE_DERIVE = 256; -const int errSecKeyBlobTypeIncorrect = -67732; +const int CSSM_ALGID_NONE = 0; -const int errSecKeyHeaderInconsistent = -67733; +const int CSSM_ALGID_CUSTOM = 1; -const int errSecUnsupportedKeyFormat = -67734; +const int CSSM_ALGID_DH = 2; -const int errSecUnsupportedKeySize = -67735; +const int CSSM_ALGID_PH = 3; -const int errSecInvalidKeyUsageMask = -67736; +const int CSSM_ALGID_KEA = 4; -const int errSecUnsupportedKeyUsageMask = -67737; +const int CSSM_ALGID_MD2 = 5; -const int errSecInvalidKeyAttributeMask = -67738; +const int CSSM_ALGID_MD4 = 6; -const int errSecUnsupportedKeyAttributeMask = -67739; +const int CSSM_ALGID_MD5 = 7; -const int errSecInvalidKeyLabel = -67740; +const int CSSM_ALGID_SHA1 = 8; -const int errSecUnsupportedKeyLabel = -67741; +const int CSSM_ALGID_NHASH = 9; -const int errSecInvalidKeyFormat = -67742; +const int CSSM_ALGID_HAVAL = 10; -const int errSecUnsupportedVectorOfBuffers = -67743; +const int CSSM_ALGID_RIPEMD = 11; -const int errSecInvalidInputVector = -67744; +const int CSSM_ALGID_IBCHASH = 12; -const int errSecInvalidOutputVector = -67745; +const int CSSM_ALGID_RIPEMAC = 13; -const int errSecInvalidContext = -67746; +const int CSSM_ALGID_DES = 14; -const int errSecInvalidAlgorithm = -67747; +const int CSSM_ALGID_DESX = 15; -const int errSecInvalidAttributeKey = -67748; +const int CSSM_ALGID_RDES = 16; -const int errSecMissingAttributeKey = -67749; +const int CSSM_ALGID_3DES_3KEY_EDE = 17; -const int errSecInvalidAttributeInitVector = -67750; +const int CSSM_ALGID_3DES_2KEY_EDE = 18; -const int errSecMissingAttributeInitVector = -67751; +const int CSSM_ALGID_3DES_1KEY_EEE = 19; -const int errSecInvalidAttributeSalt = -67752; +const int CSSM_ALGID_3DES_3KEY = 17; -const int errSecMissingAttributeSalt = -67753; +const int CSSM_ALGID_3DES_3KEY_EEE = 20; -const int errSecInvalidAttributePadding = -67754; +const int CSSM_ALGID_3DES_2KEY = 18; -const int errSecMissingAttributePadding = -67755; +const int CSSM_ALGID_3DES_2KEY_EEE = 21; -const int errSecInvalidAttributeRandom = -67756; +const int CSSM_ALGID_3DES_1KEY = 20; -const int errSecMissingAttributeRandom = -67757; +const int CSSM_ALGID_IDEA = 22; -const int errSecInvalidAttributeSeed = -67758; +const int CSSM_ALGID_RC2 = 23; -const int errSecMissingAttributeSeed = -67759; +const int CSSM_ALGID_RC5 = 24; -const int errSecInvalidAttributePassphrase = -67760; +const int CSSM_ALGID_RC4 = 25; -const int errSecMissingAttributePassphrase = -67761; +const int CSSM_ALGID_SEAL = 26; -const int errSecInvalidAttributeKeyLength = -67762; +const int CSSM_ALGID_CAST = 27; -const int errSecMissingAttributeKeyLength = -67763; +const int CSSM_ALGID_BLOWFISH = 28; -const int errSecInvalidAttributeBlockSize = -67764; +const int CSSM_ALGID_SKIPJACK = 29; -const int errSecMissingAttributeBlockSize = -67765; +const int CSSM_ALGID_LUCIFER = 30; -const int errSecInvalidAttributeOutputSize = -67766; +const int CSSM_ALGID_MADRYGA = 31; -const int errSecMissingAttributeOutputSize = -67767; +const int CSSM_ALGID_FEAL = 32; -const int errSecInvalidAttributeRounds = -67768; +const int CSSM_ALGID_REDOC = 33; -const int errSecMissingAttributeRounds = -67769; +const int CSSM_ALGID_REDOC3 = 34; -const int errSecInvalidAlgorithmParms = -67770; +const int CSSM_ALGID_LOKI = 35; -const int errSecMissingAlgorithmParms = -67771; +const int CSSM_ALGID_KHUFU = 36; -const int errSecInvalidAttributeLabel = -67772; +const int CSSM_ALGID_KHAFRE = 37; -const int errSecMissingAttributeLabel = -67773; +const int CSSM_ALGID_MMB = 38; -const int errSecInvalidAttributeKeyType = -67774; +const int CSSM_ALGID_GOST = 39; -const int errSecMissingAttributeKeyType = -67775; +const int CSSM_ALGID_SAFER = 40; -const int errSecInvalidAttributeMode = -67776; +const int CSSM_ALGID_CRAB = 41; -const int errSecMissingAttributeMode = -67777; +const int CSSM_ALGID_RSA = 42; -const int errSecInvalidAttributeEffectiveBits = -67778; +const int CSSM_ALGID_DSA = 43; -const int errSecMissingAttributeEffectiveBits = -67779; +const int CSSM_ALGID_MD5WithRSA = 44; -const int errSecInvalidAttributeStartDate = -67780; +const int CSSM_ALGID_MD2WithRSA = 45; -const int errSecMissingAttributeStartDate = -67781; +const int CSSM_ALGID_ElGamal = 46; -const int errSecInvalidAttributeEndDate = -67782; +const int CSSM_ALGID_MD2Random = 47; -const int errSecMissingAttributeEndDate = -67783; +const int CSSM_ALGID_MD5Random = 48; -const int errSecInvalidAttributeVersion = -67784; +const int CSSM_ALGID_SHARandom = 49; -const int errSecMissingAttributeVersion = -67785; +const int CSSM_ALGID_DESRandom = 50; -const int errSecInvalidAttributePrime = -67786; +const int CSSM_ALGID_SHA1WithRSA = 51; -const int errSecMissingAttributePrime = -67787; +const int CSSM_ALGID_CDMF = 52; -const int errSecInvalidAttributeBase = -67788; +const int CSSM_ALGID_CAST3 = 53; -const int errSecMissingAttributeBase = -67789; +const int CSSM_ALGID_CAST5 = 54; -const int errSecInvalidAttributeSubprime = -67790; +const int CSSM_ALGID_GenericSecret = 55; -const int errSecMissingAttributeSubprime = -67791; +const int CSSM_ALGID_ConcatBaseAndKey = 56; -const int errSecInvalidAttributeIterationCount = -67792; +const int CSSM_ALGID_ConcatKeyAndBase = 57; -const int errSecMissingAttributeIterationCount = -67793; +const int CSSM_ALGID_ConcatBaseAndData = 58; -const int errSecInvalidAttributeDLDBHandle = -67794; +const int CSSM_ALGID_ConcatDataAndBase = 59; -const int errSecMissingAttributeDLDBHandle = -67795; +const int CSSM_ALGID_XORBaseAndData = 60; -const int errSecInvalidAttributeAccessCredentials = -67796; +const int CSSM_ALGID_ExtractFromKey = 61; -const int errSecMissingAttributeAccessCredentials = -67797; +const int CSSM_ALGID_SSL3PrePrimaryGen = 62; -const int errSecInvalidAttributePublicKeyFormat = -67798; +const int CSSM_ALGID_SSL3PreMasterGen = 62; -const int errSecMissingAttributePublicKeyFormat = -67799; +const int CSSM_ALGID_SSL3PrimaryDerive = 63; -const int errSecInvalidAttributePrivateKeyFormat = -67800; +const int CSSM_ALGID_SSL3MasterDerive = 63; -const int errSecMissingAttributePrivateKeyFormat = -67801; +const int CSSM_ALGID_SSL3KeyAndMacDerive = 64; -const int errSecInvalidAttributeSymmetricKeyFormat = -67802; +const int CSSM_ALGID_SSL3MD5_MAC = 65; -const int errSecMissingAttributeSymmetricKeyFormat = -67803; +const int CSSM_ALGID_SSL3SHA1_MAC = 66; -const int errSecInvalidAttributeWrappedKeyFormat = -67804; +const int CSSM_ALGID_PKCS5_PBKDF1_MD5 = 67; -const int errSecMissingAttributeWrappedKeyFormat = -67805; +const int CSSM_ALGID_PKCS5_PBKDF1_MD2 = 68; -const int errSecStagedOperationInProgress = -67806; +const int CSSM_ALGID_PKCS5_PBKDF1_SHA1 = 69; -const int errSecStagedOperationNotStarted = -67807; +const int CSSM_ALGID_WrapLynks = 70; -const int errSecVerifyFailed = -67808; +const int CSSM_ALGID_WrapSET_OAEP = 71; -const int errSecQuerySizeUnknown = -67809; +const int CSSM_ALGID_BATON = 72; -const int errSecBlockSizeMismatch = -67810; +const int CSSM_ALGID_ECDSA = 73; -const int errSecPublicKeyInconsistent = -67811; +const int CSSM_ALGID_MAYFLY = 74; -const int errSecDeviceVerifyFailed = -67812; +const int CSSM_ALGID_JUNIPER = 75; -const int errSecInvalidLoginName = -67813; +const int CSSM_ALGID_FASTHASH = 76; -const int errSecAlreadyLoggedIn = -67814; +const int CSSM_ALGID_3DES = 77; -const int errSecInvalidDigestAlgorithm = -67815; +const int CSSM_ALGID_SSL3MD5 = 78; -const int errSecInvalidCRLGroup = -67816; +const int CSSM_ALGID_SSL3SHA1 = 79; -const int errSecCertificateCannotOperate = -67817; +const int CSSM_ALGID_FortezzaTimestamp = 80; -const int errSecCertificateExpired = -67818; +const int CSSM_ALGID_SHA1WithDSA = 81; -const int errSecCertificateNotValidYet = -67819; +const int CSSM_ALGID_SHA1WithECDSA = 82; -const int errSecCertificateRevoked = -67820; +const int CSSM_ALGID_DSA_BSAFE = 83; -const int errSecCertificateSuspended = -67821; +const int CSSM_ALGID_ECDH = 84; -const int errSecInsufficientCredentials = -67822; +const int CSSM_ALGID_ECMQV = 85; -const int errSecInvalidAction = -67823; +const int CSSM_ALGID_PKCS12_SHA1_PBE = 86; -const int errSecInvalidAuthority = -67824; +const int CSSM_ALGID_ECNRA = 87; -const int errSecVerifyActionFailed = -67825; +const int CSSM_ALGID_SHA1WithECNRA = 88; -const int errSecInvalidCertAuthority = -67826; +const int CSSM_ALGID_ECES = 89; -const int errSecInvalidCRLAuthority = -67827; +const int CSSM_ALGID_ECAES = 90; -const int errSecInvaldCRLAuthority = -67827; +const int CSSM_ALGID_SHA1HMAC = 91; -const int errSecInvalidCRLEncoding = -67828; +const int CSSM_ALGID_FIPS186Random = 92; -const int errSecInvalidCRLType = -67829; +const int CSSM_ALGID_ECC = 93; -const int errSecInvalidCRL = -67830; +const int CSSM_ALGID_MQV = 94; -const int errSecInvalidFormType = -67831; +const int CSSM_ALGID_NRA = 95; -const int errSecInvalidID = -67832; +const int CSSM_ALGID_IntelPlatformRandom = 96; -const int errSecInvalidIdentifier = -67833; +const int CSSM_ALGID_UTC = 97; -const int errSecInvalidIndex = -67834; +const int CSSM_ALGID_HAVAL3 = 98; -const int errSecInvalidPolicyIdentifiers = -67835; +const int CSSM_ALGID_HAVAL4 = 99; -const int errSecInvalidTimeString = -67836; +const int CSSM_ALGID_HAVAL5 = 100; -const int errSecInvalidReason = -67837; +const int CSSM_ALGID_TIGER = 101; -const int errSecInvalidRequestInputs = -67838; +const int CSSM_ALGID_MD5HMAC = 102; -const int errSecInvalidResponseVector = -67839; +const int CSSM_ALGID_PKCS5_PBKDF2 = 103; -const int errSecInvalidStopOnPolicy = -67840; +const int CSSM_ALGID_RUNNING_COUNTER = 104; -const int errSecInvalidTuple = -67841; +const int CSSM_ALGID_LAST = 2147483647; -const int errSecMultipleValuesUnsupported = -67842; +const int CSSM_ALGID_VENDOR_DEFINED = -2147483648; -const int errSecNotTrusted = -67843; +const int CSSM_ALGMODE_NONE = 0; -const int errSecNoDefaultAuthority = -67844; +const int CSSM_ALGMODE_CUSTOM = 1; -const int errSecRejectedForm = -67845; +const int CSSM_ALGMODE_ECB = 2; -const int errSecRequestLost = -67846; +const int CSSM_ALGMODE_ECBPad = 3; -const int errSecRequestRejected = -67847; +const int CSSM_ALGMODE_CBC = 4; -const int errSecUnsupportedAddressType = -67848; +const int CSSM_ALGMODE_CBC_IV8 = 5; -const int errSecUnsupportedService = -67849; +const int CSSM_ALGMODE_CBCPadIV8 = 6; -const int errSecInvalidTupleGroup = -67850; +const int CSSM_ALGMODE_CFB = 7; -const int errSecInvalidBaseACLs = -67851; +const int CSSM_ALGMODE_CFB_IV8 = 8; -const int errSecInvalidTupleCredentials = -67852; +const int CSSM_ALGMODE_CFBPadIV8 = 9; -const int errSecInvalidTupleCredendtials = -67852; +const int CSSM_ALGMODE_OFB = 10; -const int errSecInvalidEncoding = -67853; +const int CSSM_ALGMODE_OFB_IV8 = 11; -const int errSecInvalidValidityPeriod = -67854; +const int CSSM_ALGMODE_OFBPadIV8 = 12; -const int errSecInvalidRequestor = -67855; +const int CSSM_ALGMODE_COUNTER = 13; -const int errSecRequestDescriptor = -67856; +const int CSSM_ALGMODE_BC = 14; -const int errSecInvalidBundleInfo = -67857; +const int CSSM_ALGMODE_PCBC = 15; -const int errSecInvalidCRLIndex = -67858; +const int CSSM_ALGMODE_CBCC = 16; -const int errSecNoFieldValues = -67859; +const int CSSM_ALGMODE_OFBNLF = 17; -const int errSecUnsupportedFieldFormat = -67860; +const int CSSM_ALGMODE_PBC = 18; -const int errSecUnsupportedIndexInfo = -67861; +const int CSSM_ALGMODE_PFB = 19; -const int errSecUnsupportedLocality = -67862; +const int CSSM_ALGMODE_CBCPD = 20; -const int errSecUnsupportedNumAttributes = -67863; +const int CSSM_ALGMODE_PUBLIC_KEY = 21; -const int errSecUnsupportedNumIndexes = -67864; +const int CSSM_ALGMODE_PRIVATE_KEY = 22; -const int errSecUnsupportedNumRecordTypes = -67865; +const int CSSM_ALGMODE_SHUFFLE = 23; -const int errSecFieldSpecifiedMultiple = -67866; +const int CSSM_ALGMODE_ECB64 = 24; -const int errSecIncompatibleFieldFormat = -67867; +const int CSSM_ALGMODE_CBC64 = 25; -const int errSecInvalidParsingModule = -67868; +const int CSSM_ALGMODE_OFB64 = 26; -const int errSecDatabaseLocked = -67869; +const int CSSM_ALGMODE_CFB32 = 28; -const int errSecDatastoreIsOpen = -67870; +const int CSSM_ALGMODE_CFB16 = 29; -const int errSecMissingValue = -67871; +const int CSSM_ALGMODE_CFB8 = 30; -const int errSecUnsupportedQueryLimits = -67872; +const int CSSM_ALGMODE_WRAP = 31; -const int errSecUnsupportedNumSelectionPreds = -67873; +const int CSSM_ALGMODE_PRIVATE_WRAP = 32; -const int errSecUnsupportedOperator = -67874; +const int CSSM_ALGMODE_RELAYX = 33; -const int errSecInvalidDBLocation = -67875; +const int CSSM_ALGMODE_ECB128 = 34; -const int errSecInvalidAccessRequest = -67876; +const int CSSM_ALGMODE_ECB96 = 35; -const int errSecInvalidIndexInfo = -67877; +const int CSSM_ALGMODE_CBC128 = 36; -const int errSecInvalidNewOwner = -67878; +const int CSSM_ALGMODE_OAEP_HASH = 37; -const int errSecInvalidModifyMode = -67879; +const int CSSM_ALGMODE_PKCS1_EME_V15 = 38; -const int errSecMissingRequiredExtension = -67880; +const int CSSM_ALGMODE_PKCS1_EME_OAEP = 39; -const int errSecExtendedKeyUsageNotCritical = -67881; +const int CSSM_ALGMODE_PKCS1_EMSA_V15 = 40; -const int errSecTimestampMissing = -67882; +const int CSSM_ALGMODE_ISO_9796 = 41; -const int errSecTimestampInvalid = -67883; +const int CSSM_ALGMODE_X9_31 = 42; -const int errSecTimestampNotTrusted = -67884; +const int CSSM_ALGMODE_LAST = 2147483647; -const int errSecTimestampServiceNotAvailable = -67885; +const int CSSM_ALGMODE_VENDOR_DEFINED = -2147483648; -const int errSecTimestampBadAlg = -67886; +const int CSSM_CSP_SOFTWARE = 1; -const int errSecTimestampBadRequest = -67887; +const int CSSM_CSP_HARDWARE = 2; -const int errSecTimestampBadDataFormat = -67888; +const int CSSM_CSP_HYBRID = 3; -const int errSecTimestampTimeNotAvailable = -67889; +const int CSSM_ALGCLASS_NONE = 0; -const int errSecTimestampUnacceptedPolicy = -67890; +const int CSSM_ALGCLASS_CUSTOM = 1; -const int errSecTimestampUnacceptedExtension = -67891; +const int CSSM_ALGCLASS_SIGNATURE = 2; -const int errSecTimestampAddInfoNotAvailable = -67892; +const int CSSM_ALGCLASS_SYMMETRIC = 3; -const int errSecTimestampSystemFailure = -67893; +const int CSSM_ALGCLASS_DIGEST = 4; -const int errSecSigningTimeMissing = -67894; +const int CSSM_ALGCLASS_RANDOMGEN = 5; -const int errSecTimestampRejection = -67895; +const int CSSM_ALGCLASS_UNIQUEGEN = 6; -const int errSecTimestampWaiting = -67896; +const int CSSM_ALGCLASS_MAC = 7; -const int errSecTimestampRevocationWarning = -67897; +const int CSSM_ALGCLASS_ASYMMETRIC = 8; -const int errSecTimestampRevocationNotification = -67898; +const int CSSM_ALGCLASS_KEYGEN = 9; -const int errSecCertificatePolicyNotAllowed = -67899; +const int CSSM_ALGCLASS_DERIVEKEY = 10; -const int errSecCertificateNameNotAllowed = -67900; +const int CSSM_ATTRIBUTE_DATA_NONE = 0; -const int errSecCertificateValidityPeriodTooLong = -67901; +const int CSSM_ATTRIBUTE_DATA_UINT32 = 268435456; -const int errSecCertificateIsCA = -67902; +const int CSSM_ATTRIBUTE_DATA_CSSM_DATA = 536870912; -const int errSecCertificateDuplicateExtension = -67903; +const int CSSM_ATTRIBUTE_DATA_CRYPTO_DATA = 805306368; -const int errSSLProtocol = -9800; +const int CSSM_ATTRIBUTE_DATA_KEY = 1073741824; -const int errSSLNegotiation = -9801; +const int CSSM_ATTRIBUTE_DATA_STRING = 1342177280; -const int errSSLFatalAlert = -9802; +const int CSSM_ATTRIBUTE_DATA_DATE = 1610612736; -const int errSSLWouldBlock = -9803; +const int CSSM_ATTRIBUTE_DATA_RANGE = 1879048192; -const int errSSLSessionNotFound = -9804; +const int CSSM_ATTRIBUTE_DATA_ACCESS_CREDENTIALS = -2147483648; -const int errSSLClosedGraceful = -9805; +const int CSSM_ATTRIBUTE_DATA_VERSION = 16777216; -const int errSSLClosedAbort = -9806; +const int CSSM_ATTRIBUTE_DATA_DL_DB_HANDLE = 33554432; -const int errSSLXCertChainInvalid = -9807; +const int CSSM_ATTRIBUTE_DATA_KR_PROFILE = 50331648; -const int errSSLBadCert = -9808; +const int CSSM_ATTRIBUTE_TYPE_MASK = -16777216; -const int errSSLCrypto = -9809; +const int CSSM_ATTRIBUTE_NONE = 0; -const int errSSLInternal = -9810; +const int CSSM_ATTRIBUTE_CUSTOM = 536870913; -const int errSSLModuleAttach = -9811; +const int CSSM_ATTRIBUTE_DESCRIPTION = 1342177282; -const int errSSLUnknownRootCert = -9812; +const int CSSM_ATTRIBUTE_KEY = 1073741827; -const int errSSLNoRootCert = -9813; +const int CSSM_ATTRIBUTE_INIT_VECTOR = 536870916; -const int errSSLCertExpired = -9814; +const int CSSM_ATTRIBUTE_SALT = 536870917; -const int errSSLCertNotYetValid = -9815; +const int CSSM_ATTRIBUTE_PADDING = 268435462; -const int errSSLClosedNoNotify = -9816; +const int CSSM_ATTRIBUTE_RANDOM = 536870919; -const int errSSLBufferOverflow = -9817; +const int CSSM_ATTRIBUTE_SEED = 805306376; -const int errSSLBadCipherSuite = -9818; +const int CSSM_ATTRIBUTE_PASSPHRASE = 805306377; -const int errSSLPeerUnexpectedMsg = -9819; +const int CSSM_ATTRIBUTE_KEY_LENGTH = 268435466; -const int errSSLPeerBadRecordMac = -9820; +const int CSSM_ATTRIBUTE_KEY_LENGTH_RANGE = 1879048203; -const int errSSLPeerDecryptionFail = -9821; +const int CSSM_ATTRIBUTE_BLOCK_SIZE = 268435468; -const int errSSLPeerRecordOverflow = -9822; +const int CSSM_ATTRIBUTE_OUTPUT_SIZE = 268435469; -const int errSSLPeerDecompressFail = -9823; +const int CSSM_ATTRIBUTE_ROUNDS = 268435470; -const int errSSLPeerHandshakeFail = -9824; +const int CSSM_ATTRIBUTE_IV_SIZE = 268435471; -const int errSSLPeerBadCert = -9825; +const int CSSM_ATTRIBUTE_ALG_PARAMS = 536870928; -const int errSSLPeerUnsupportedCert = -9826; +const int CSSM_ATTRIBUTE_LABEL = 536870929; -const int errSSLPeerCertRevoked = -9827; +const int CSSM_ATTRIBUTE_KEY_TYPE = 268435474; -const int errSSLPeerCertExpired = -9828; +const int CSSM_ATTRIBUTE_MODE = 268435475; -const int errSSLPeerCertUnknown = -9829; +const int CSSM_ATTRIBUTE_EFFECTIVE_BITS = 268435476; -const int errSSLIllegalParam = -9830; +const int CSSM_ATTRIBUTE_START_DATE = 1610612757; -const int errSSLPeerUnknownCA = -9831; +const int CSSM_ATTRIBUTE_END_DATE = 1610612758; -const int errSSLPeerAccessDenied = -9832; +const int CSSM_ATTRIBUTE_KEYUSAGE = 268435479; -const int errSSLPeerDecodeError = -9833; +const int CSSM_ATTRIBUTE_KEYATTR = 268435480; -const int errSSLPeerDecryptError = -9834; +const int CSSM_ATTRIBUTE_VERSION = 16777241; -const int errSSLPeerExportRestriction = -9835; +const int CSSM_ATTRIBUTE_PRIME = 536870938; -const int errSSLPeerProtocolVersion = -9836; +const int CSSM_ATTRIBUTE_BASE = 536870939; -const int errSSLPeerInsufficientSecurity = -9837; +const int CSSM_ATTRIBUTE_SUBPRIME = 536870940; -const int errSSLPeerInternalError = -9838; +const int CSSM_ATTRIBUTE_ALG_ID = 268435485; -const int errSSLPeerUserCancelled = -9839; +const int CSSM_ATTRIBUTE_ITERATION_COUNT = 268435486; -const int errSSLPeerNoRenegotiation = -9840; +const int CSSM_ATTRIBUTE_ROUNDS_RANGE = 1879048223; -const int errSSLPeerAuthCompleted = -9841; +const int CSSM_ATTRIBUTE_KRPROFILE_LOCAL = 50331680; -const int errSSLClientCertRequested = -9842; +const int CSSM_ATTRIBUTE_KRPROFILE_REMOTE = 50331681; -const int errSSLHostNameMismatch = -9843; +const int CSSM_ATTRIBUTE_CSP_HANDLE = 268435490; -const int errSSLConnectionRefused = -9844; +const int CSSM_ATTRIBUTE_DL_DB_HANDLE = 33554467; -const int errSSLDecryptionFail = -9845; +const int CSSM_ATTRIBUTE_ACCESS_CREDENTIALS = -2147483612; -const int errSSLBadRecordMac = -9846; +const int CSSM_ATTRIBUTE_PUBLIC_KEY_FORMAT = 268435493; -const int errSSLRecordOverflow = -9847; +const int CSSM_ATTRIBUTE_PRIVATE_KEY_FORMAT = 268435494; -const int errSSLBadConfiguration = -9848; +const int CSSM_ATTRIBUTE_SYMMETRIC_KEY_FORMAT = 268435495; -const int errSSLUnexpectedRecord = -9849; +const int CSSM_ATTRIBUTE_WRAPPED_KEY_FORMAT = 268435496; -const int errSSLWeakPeerEphemeralDHKey = -9850; +const int CSSM_PADDING_NONE = 0; -const int errSSLClientHelloReceived = -9851; +const int CSSM_PADDING_CUSTOM = 1; -const int errSSLTransportReset = -9852; +const int CSSM_PADDING_ZERO = 2; -const int errSSLNetworkTimeout = -9853; +const int CSSM_PADDING_ONE = 3; -const int errSSLConfigurationFailed = -9854; +const int CSSM_PADDING_ALTERNATE = 4; -const int errSSLUnsupportedExtension = -9855; +const int CSSM_PADDING_FF = 5; -const int errSSLUnexpectedMessage = -9856; +const int CSSM_PADDING_PKCS5 = 6; -const int errSSLDecompressFail = -9857; +const int CSSM_PADDING_PKCS7 = 7; -const int errSSLHandshakeFail = -9858; +const int CSSM_PADDING_CIPHERSTEALING = 8; -const int errSSLDecodeError = -9859; +const int CSSM_PADDING_RANDOM = 9; -const int errSSLInappropriateFallback = -9860; +const int CSSM_PADDING_PKCS1 = 10; -const int errSSLMissingExtension = -9861; +const int CSSM_PADDING_SIGRAW = 11; -const int errSSLBadCertificateStatusResponse = -9862; +const int CSSM_PADDING_VENDOR_DEFINED = -2147483648; -const int errSSLCertificateRequired = -9863; +const int CSSM_CSP_TOK_RNG = 1; -const int errSSLUnknownPSKIdentity = -9864; +const int CSSM_CSP_TOK_CLOCK_EXISTS = 64; -const int errSSLUnrecognizedName = -9865; +const int CSSM_CSP_RDR_TOKENPRESENT = 1; -const int errSSLATSViolation = -9880; +const int CSSM_CSP_RDR_EXISTS = 2; -const int errSSLATSMinimumVersionViolation = -9881; +const int CSSM_CSP_RDR_HW = 4; -const int errSSLATSCiphersuiteViolation = -9882; +const int CSSM_CSP_TOK_WRITE_PROTECTED = 2; -const int errSSLATSMinimumKeySizeViolation = -9883; +const int CSSM_CSP_TOK_LOGIN_REQUIRED = 4; -const int errSSLATSLeafCertificateHashAlgorithmViolation = -9884; +const int CSSM_CSP_TOK_USER_PIN_INITIALIZED = 8; -const int errSSLATSCertificateHashAlgorithmViolation = -9885; +const int CSSM_CSP_TOK_PROT_AUTHENTICATION = 256; -const int errSSLATSCertificateTrustViolation = -9886; +const int CSSM_CSP_TOK_USER_PIN_EXPIRED = 1048576; -const int errSSLEarlyDataRejected = -9890; +const int CSSM_CSP_TOK_SESSION_KEY_PASSWORD = 2097152; -const int OSUnknownByteOrder = 0; +const int CSSM_CSP_TOK_PRIVATE_KEY_PASSWORD = 4194304; -const int OSLittleEndian = 1; +const int CSSM_CSP_STORES_PRIVATE_KEYS = 16777216; -const int OSBigEndian = 2; +const int CSSM_CSP_STORES_PUBLIC_KEYS = 33554432; -const int kCFNotificationDeliverImmediately = 1; +const int CSSM_CSP_STORES_SESSION_KEYS = 67108864; -const int kCFNotificationPostToAllSessions = 2; +const int CSSM_CSP_STORES_CERTIFICATES = 134217728; -const int kCFCalendarComponentsWrap = 1; +const int CSSM_CSP_STORES_GENERIC = 268435456; -const int kCFSocketAutomaticallyReenableReadCallBack = 1; +const int CSSM_PKCS_OAEP_MGF_NONE = 0; -const int kCFSocketAutomaticallyReenableAcceptCallBack = 2; +const int CSSM_PKCS_OAEP_MGF1_SHA1 = 1; -const int kCFSocketAutomaticallyReenableDataCallBack = 3; +const int CSSM_PKCS_OAEP_MGF1_MD5 = 2; -const int kCFSocketAutomaticallyReenableWriteCallBack = 8; +const int CSSM_PKCS_OAEP_PSOURCE_NONE = 0; -const int kCFSocketLeaveErrors = 64; +const int CSSM_PKCS_OAEP_PSOURCE_Pspecified = 1; -const int kCFSocketCloseOnInvalidate = 128; +const int CSSM_VALUE_NOT_AVAILABLE = -1; -const int DISPATCH_WALLTIME_NOW = -2; +const int CSSM_PKCS5_PBKDF2_PRF_HMAC_SHA1 = 0; -const int kCFPropertyListReadCorruptError = 3840; +const int CSSM_TP_AUTHORITY_REQUEST_CERTISSUE = 1; -const int kCFPropertyListReadUnknownVersionError = 3841; +const int CSSM_TP_AUTHORITY_REQUEST_CERTREVOKE = 2; -const int kCFPropertyListReadStreamError = 3842; +const int CSSM_TP_AUTHORITY_REQUEST_CERTSUSPEND = 3; -const int kCFPropertyListWriteStreamError = 3851; +const int CSSM_TP_AUTHORITY_REQUEST_CERTRESUME = 4; -const int kCFBundleExecutableArchitectureI386 = 7; +const int CSSM_TP_AUTHORITY_REQUEST_CERTVERIFY = 5; -const int kCFBundleExecutableArchitecturePPC = 18; +const int CSSM_TP_AUTHORITY_REQUEST_CERTNOTARIZE = 6; -const int kCFBundleExecutableArchitectureX86_64 = 16777223; +const int CSSM_TP_AUTHORITY_REQUEST_CERTUSERECOVER = 7; -const int kCFBundleExecutableArchitecturePPC64 = 16777234; +const int CSSM_TP_AUTHORITY_REQUEST_CRLISSUE = 256; -const int kCFBundleExecutableArchitectureARM64 = 16777228; +const int CSSM_TP_KEY_ARCHIVE = 1; -const int kCFMessagePortSuccess = 0; +const int CSSM_TP_CERT_PUBLISH = 2; -const int kCFMessagePortSendTimeout = -1; +const int CSSM_TP_CERT_NOTIFY_RENEW = 4; -const int kCFMessagePortReceiveTimeout = -2; +const int CSSM_TP_CERT_DIR_UPDATE = 8; -const int kCFMessagePortIsInvalid = -3; +const int CSSM_TP_CRL_DISTRIBUTE = 16; -const int kCFMessagePortTransportError = -4; +const int CSSM_TP_ACTION_DEFAULT = 0; -const int kCFMessagePortBecameInvalidError = -5; +const int CSSM_TP_STOP_ON_POLICY = 0; -const int kCFStringTokenizerUnitWord = 0; +const int CSSM_TP_STOP_ON_NONE = 1; -const int kCFStringTokenizerUnitSentence = 1; +const int CSSM_TP_STOP_ON_FIRST_PASS = 2; -const int kCFStringTokenizerUnitParagraph = 2; +const int CSSM_TP_STOP_ON_FIRST_FAIL = 3; -const int kCFStringTokenizerUnitLineBreak = 3; +const int CSSM_CRL_PARSE_FORMAT_NONE = 0; -const int kCFStringTokenizerUnitWordBoundary = 4; +const int CSSM_CRL_PARSE_FORMAT_CUSTOM = 1; -const int kCFStringTokenizerAttributeLatinTranscription = 65536; +const int CSSM_CRL_PARSE_FORMAT_SEXPR = 2; -const int kCFStringTokenizerAttributeLanguage = 131072; +const int CSSM_CRL_PARSE_FORMAT_COMPLEX = 3; -const int kCFFileDescriptorReadCallBack = 1; +const int CSSM_CRL_PARSE_FORMAT_OID_NAMED = 4; -const int kCFFileDescriptorWriteCallBack = 2; +const int CSSM_CRL_PARSE_FORMAT_TUPLE = 5; -const int kCFUserNotificationStopAlertLevel = 0; +const int CSSM_CRL_PARSE_FORMAT_MULTIPLE = 32766; -const int kCFUserNotificationNoteAlertLevel = 1; +const int CSSM_CRL_PARSE_FORMAT_LAST = 32767; -const int kCFUserNotificationCautionAlertLevel = 2; +const int CSSM_CL_CUSTOM_CRL_PARSE_FORMAT = 32768; -const int kCFUserNotificationPlainAlertLevel = 3; +const int CSSM_CRL_TYPE_UNKNOWN = 0; -const int kCFUserNotificationDefaultResponse = 0; +const int CSSM_CRL_TYPE_X_509v1 = 1; -const int kCFUserNotificationAlternateResponse = 1; +const int CSSM_CRL_TYPE_X_509v2 = 2; -const int kCFUserNotificationOtherResponse = 2; +const int CSSM_CRL_TYPE_SPKI = 3; -const int kCFUserNotificationCancelResponse = 3; +const int CSSM_CRL_TYPE_MULTIPLE = 32766; -const int kCFUserNotificationNoDefaultButtonFlag = 32; +const int CSSM_CRL_ENCODING_UNKNOWN = 0; -const int kCFUserNotificationUseRadioButtonsFlag = 64; +const int CSSM_CRL_ENCODING_CUSTOM = 1; -const int kCFXMLNodeCurrentVersion = 1; +const int CSSM_CRL_ENCODING_BER = 2; -const int CSSM_INVALID_HANDLE = 0; +const int CSSM_CRL_ENCODING_DER = 3; -const int CSSM_FALSE = 0; +const int CSSM_CRL_ENCODING_BLOOM = 4; -const int CSSM_TRUE = 1; +const int CSSM_CRL_ENCODING_SEXPR = 5; -const int CSSM_OK = 0; +const int CSSM_CRL_ENCODING_MULTIPLE = 32766; -const int CSSM_MODULE_STRING_SIZE = 64; +const int CSSM_CRLGROUP_DATA = 0; -const int CSSM_KEY_HIERARCHY_NONE = 0; +const int CSSM_CRLGROUP_ENCODED_CRL = 1; -const int CSSM_KEY_HIERARCHY_INTEG = 1; +const int CSSM_CRLGROUP_PARSED_CRL = 2; -const int CSSM_KEY_HIERARCHY_EXPORT = 2; +const int CSSM_CRLGROUP_CRL_PAIR = 3; -const int CSSM_PVC_NONE = 0; +const int CSSM_EVIDENCE_FORM_UNSPECIFIC = 0; -const int CSSM_PVC_APP = 1; +const int CSSM_EVIDENCE_FORM_CERT = 1; -const int CSSM_PVC_SP = 2; +const int CSSM_EVIDENCE_FORM_CRL = 2; -const int CSSM_PRIVILEGE_SCOPE_NONE = 0; +const int CSSM_EVIDENCE_FORM_CERT_ID = 3; -const int CSSM_PRIVILEGE_SCOPE_PROCESS = 1; +const int CSSM_EVIDENCE_FORM_CRL_ID = 4; -const int CSSM_PRIVILEGE_SCOPE_THREAD = 2; +const int CSSM_EVIDENCE_FORM_VERIFIER_TIME = 5; -const int CSSM_SERVICE_CSSM = 1; +const int CSSM_EVIDENCE_FORM_CRL_THISTIME = 6; -const int CSSM_SERVICE_CSP = 2; +const int CSSM_EVIDENCE_FORM_CRL_NEXTTIME = 7; -const int CSSM_SERVICE_DL = 4; +const int CSSM_EVIDENCE_FORM_POLICYINFO = 8; -const int CSSM_SERVICE_CL = 8; +const int CSSM_EVIDENCE_FORM_TUPLEGROUP = 9; -const int CSSM_SERVICE_TP = 16; +const int CSSM_TP_CONFIRM_STATUS_UNKNOWN = 0; -const int CSSM_SERVICE_AC = 32; +const int CSSM_TP_CONFIRM_ACCEPT = 1; -const int CSSM_SERVICE_KR = 64; +const int CSSM_TP_CONFIRM_REJECT = 2; -const int CSSM_NOTIFY_INSERT = 1; +const int CSSM_ESTIMATED_TIME_UNKNOWN = -1; -const int CSSM_NOTIFY_REMOVE = 2; +const int CSSM_ELAPSED_TIME_UNKNOWN = -1; -const int CSSM_NOTIFY_FAULT = 3; +const int CSSM_ELAPSED_TIME_COMPLETE = -2; -const int CSSM_ATTACH_READ_ONLY = 1; +const int CSSM_TP_CERTISSUE_STATUS_UNKNOWN = 0; -const int CSSM_USEE_LAST = 255; +const int CSSM_TP_CERTISSUE_OK = 1; -const int CSSM_USEE_NONE = 0; +const int CSSM_TP_CERTISSUE_OKWITHCERTMODS = 2; -const int CSSM_USEE_DOMESTIC = 1; +const int CSSM_TP_CERTISSUE_OKWITHSERVICEMODS = 3; -const int CSSM_USEE_FINANCIAL = 2; +const int CSSM_TP_CERTISSUE_REJECTED = 4; -const int CSSM_USEE_KRLE = 3; +const int CSSM_TP_CERTISSUE_NOT_AUTHORIZED = 5; -const int CSSM_USEE_KRENT = 4; +const int CSSM_TP_CERTISSUE_WILL_BE_REVOKED = 6; -const int CSSM_USEE_SSL = 5; +const int CSSM_TP_CERTCHANGE_NONE = 0; -const int CSSM_USEE_AUTHENTICATION = 6; +const int CSSM_TP_CERTCHANGE_REVOKE = 1; -const int CSSM_USEE_KEYEXCH = 7; +const int CSSM_TP_CERTCHANGE_HOLD = 2; -const int CSSM_USEE_MEDICAL = 8; +const int CSSM_TP_CERTCHANGE_RELEASE = 3; -const int CSSM_USEE_INSURANCE = 9; +const int CSSM_TP_CERTCHANGE_REASON_UNKNOWN = 0; -const int CSSM_USEE_WEAK = 10; +const int CSSM_TP_CERTCHANGE_REASON_KEYCOMPROMISE = 1; -const int CSSM_ADDR_NONE = 0; +const int CSSM_TP_CERTCHANGE_REASON_CACOMPROMISE = 2; -const int CSSM_ADDR_CUSTOM = 1; +const int CSSM_TP_CERTCHANGE_REASON_CEASEOPERATION = 3; -const int CSSM_ADDR_URL = 2; +const int CSSM_TP_CERTCHANGE_REASON_AFFILIATIONCHANGE = 4; -const int CSSM_ADDR_SOCKADDR = 3; +const int CSSM_TP_CERTCHANGE_REASON_SUPERCEDED = 5; -const int CSSM_ADDR_NAME = 4; +const int CSSM_TP_CERTCHANGE_REASON_SUSPECTEDCOMPROMISE = 6; -const int CSSM_NET_PROTO_NONE = 0; +const int CSSM_TP_CERTCHANGE_REASON_HOLDRELEASE = 7; -const int CSSM_NET_PROTO_CUSTOM = 1; +const int CSSM_TP_CERTCHANGE_STATUS_UNKNOWN = 0; -const int CSSM_NET_PROTO_UNSPECIFIED = 2; +const int CSSM_TP_CERTCHANGE_OK = 1; -const int CSSM_NET_PROTO_LDAP = 3; +const int CSSM_TP_CERTCHANGE_OKWITHNEWTIME = 2; -const int CSSM_NET_PROTO_LDAPS = 4; +const int CSSM_TP_CERTCHANGE_WRONGCA = 3; -const int CSSM_NET_PROTO_LDAPNS = 5; +const int CSSM_TP_CERTCHANGE_REJECTED = 4; -const int CSSM_NET_PROTO_X500DAP = 6; +const int CSSM_TP_CERTCHANGE_NOT_AUTHORIZED = 5; -const int CSSM_NET_PROTO_FTP = 7; +const int CSSM_TP_CERTVERIFY_UNKNOWN = 0; -const int CSSM_NET_PROTO_FTPS = 8; +const int CSSM_TP_CERTVERIFY_VALID = 1; -const int CSSM_NET_PROTO_OCSP = 9; +const int CSSM_TP_CERTVERIFY_INVALID = 2; -const int CSSM_NET_PROTO_CMP = 10; +const int CSSM_TP_CERTVERIFY_REVOKED = 3; -const int CSSM_NET_PROTO_CMPS = 11; +const int CSSM_TP_CERTVERIFY_SUSPENDED = 4; -const int CSSM_WORDID__UNK_ = -1; +const int CSSM_TP_CERTVERIFY_EXPIRED = 5; -const int CSSM_WORDID__NLU_ = 0; +const int CSSM_TP_CERTVERIFY_NOT_VALID_YET = 6; -const int CSSM_WORDID__STAR_ = 1; +const int CSSM_TP_CERTVERIFY_INVALID_AUTHORITY = 7; -const int CSSM_WORDID_A = 2; +const int CSSM_TP_CERTVERIFY_INVALID_SIGNATURE = 8; -const int CSSM_WORDID_ACL = 3; +const int CSSM_TP_CERTVERIFY_INVALID_CERT_VALUE = 9; -const int CSSM_WORDID_ALPHA = 4; +const int CSSM_TP_CERTVERIFY_INVALID_CERTGROUP = 10; -const int CSSM_WORDID_B = 5; +const int CSSM_TP_CERTVERIFY_INVALID_POLICY = 11; -const int CSSM_WORDID_BER = 6; +const int CSSM_TP_CERTVERIFY_INVALID_POLICY_IDS = 12; -const int CSSM_WORDID_BINARY = 7; +const int CSSM_TP_CERTVERIFY_INVALID_BASIC_CONSTRAINTS = 13; -const int CSSM_WORDID_BIOMETRIC = 8; +const int CSSM_TP_CERTVERIFY_INVALID_CRL_DIST_PT = 14; -const int CSSM_WORDID_C = 9; +const int CSSM_TP_CERTVERIFY_INVALID_NAME_TREE = 15; -const int CSSM_WORDID_CANCELED = 10; +const int CSSM_TP_CERTVERIFY_UNKNOWN_CRITICAL_EXT = 16; -const int CSSM_WORDID_CERT = 11; +const int CSSM_TP_CERTNOTARIZE_STATUS_UNKNOWN = 0; -const int CSSM_WORDID_COMMENT = 12; +const int CSSM_TP_CERTNOTARIZE_OK = 1; -const int CSSM_WORDID_CRL = 13; +const int CSSM_TP_CERTNOTARIZE_OKWITHOUTFIELDS = 2; -const int CSSM_WORDID_CUSTOM = 14; +const int CSSM_TP_CERTNOTARIZE_OKWITHSERVICEMODS = 3; -const int CSSM_WORDID_D = 15; +const int CSSM_TP_CERTNOTARIZE_REJECTED = 4; -const int CSSM_WORDID_DATE = 16; +const int CSSM_TP_CERTNOTARIZE_NOT_AUTHORIZED = 5; -const int CSSM_WORDID_DB_DELETE = 17; +const int CSSM_TP_CERTRECLAIM_STATUS_UNKNOWN = 0; -const int CSSM_WORDID_DB_EXEC_STORED_QUERY = 18; +const int CSSM_TP_CERTRECLAIM_OK = 1; -const int CSSM_WORDID_DB_INSERT = 19; +const int CSSM_TP_CERTRECLAIM_NOMATCH = 2; -const int CSSM_WORDID_DB_MODIFY = 20; +const int CSSM_TP_CERTRECLAIM_REJECTED = 3; -const int CSSM_WORDID_DB_READ = 21; +const int CSSM_TP_CERTRECLAIM_NOT_AUTHORIZED = 4; -const int CSSM_WORDID_DBS_CREATE = 22; +const int CSSM_TP_CRLISSUE_STATUS_UNKNOWN = 0; -const int CSSM_WORDID_DBS_DELETE = 23; +const int CSSM_TP_CRLISSUE_OK = 1; -const int CSSM_WORDID_DECRYPT = 24; +const int CSSM_TP_CRLISSUE_NOT_CURRENT = 2; -const int CSSM_WORDID_DELETE = 25; +const int CSSM_TP_CRLISSUE_INVALID_DOMAIN = 3; -const int CSSM_WORDID_DELTA_CRL = 26; +const int CSSM_TP_CRLISSUE_UNKNOWN_IDENTIFIER = 4; -const int CSSM_WORDID_DER = 27; +const int CSSM_TP_CRLISSUE_REJECTED = 5; -const int CSSM_WORDID_DERIVE = 28; +const int CSSM_TP_CRLISSUE_NOT_AUTHORIZED = 6; -const int CSSM_WORDID_DISPLAY = 29; +const int CSSM_TP_FORM_TYPE_GENERIC = 0; -const int CSSM_WORDID_DO = 30; +const int CSSM_TP_FORM_TYPE_REGISTRATION = 1; -const int CSSM_WORDID_DSA = 31; +const int CSSM_CL_TEMPLATE_INTERMEDIATE_CERT = 1; -const int CSSM_WORDID_DSA_SHA1 = 32; +const int CSSM_CL_TEMPLATE_PKIX_CERTTEMPLATE = 2; -const int CSSM_WORDID_E = 33; +const int CSSM_CERT_BUNDLE_UNKNOWN = 0; -const int CSSM_WORDID_ELGAMAL = 34; +const int CSSM_CERT_BUNDLE_CUSTOM = 1; -const int CSSM_WORDID_ENCRYPT = 35; +const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_DATA = 2; -const int CSSM_WORDID_ENTRY = 36; +const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_ENVELOPED_DATA = 3; -const int CSSM_WORDID_EXPORT_CLEAR = 37; +const int CSSM_CERT_BUNDLE_PKCS12 = 4; -const int CSSM_WORDID_EXPORT_WRAPPED = 38; +const int CSSM_CERT_BUNDLE_PFX = 5; -const int CSSM_WORDID_G = 39; +const int CSSM_CERT_BUNDLE_SPKI_SEQUENCE = 6; -const int CSSM_WORDID_GE = 40; +const int CSSM_CERT_BUNDLE_PGP_KEYRING = 7; -const int CSSM_WORDID_GENKEY = 41; +const int CSSM_CERT_BUNDLE_LAST = 32767; -const int CSSM_WORDID_HASH = 42; +const int CSSM_CL_CUSTOM_CERT_BUNDLE_TYPE = 32768; -const int CSSM_WORDID_HASHED_PASSWORD = 43; +const int CSSM_CERT_BUNDLE_ENCODING_UNKNOWN = 0; -const int CSSM_WORDID_HASHED_SUBJECT = 44; +const int CSSM_CERT_BUNDLE_ENCODING_CUSTOM = 1; -const int CSSM_WORDID_HAVAL = 45; +const int CSSM_CERT_BUNDLE_ENCODING_BER = 2; -const int CSSM_WORDID_IBCHASH = 46; +const int CSSM_CERT_BUNDLE_ENCODING_DER = 3; -const int CSSM_WORDID_IMPORT_CLEAR = 47; +const int CSSM_CERT_BUNDLE_ENCODING_SEXPR = 4; -const int CSSM_WORDID_IMPORT_WRAPPED = 48; +const int CSSM_CERT_BUNDLE_ENCODING_PGP = 5; -const int CSSM_WORDID_INTEL = 49; +const int CSSM_FIELDVALUE_COMPLEX_DATA_TYPE = -1; -const int CSSM_WORDID_ISSUER = 50; +const int CSSM_DB_ATTRIBUTE_NAME_AS_STRING = 0; -const int CSSM_WORDID_ISSUER_INFO = 51; +const int CSSM_DB_ATTRIBUTE_NAME_AS_OID = 1; -const int CSSM_WORDID_K_OF_N = 52; +const int CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER = 2; -const int CSSM_WORDID_KEA = 53; +const int CSSM_DB_ATTRIBUTE_FORMAT_STRING = 0; -const int CSSM_WORDID_KEYHOLDER = 54; +const int CSSM_DB_ATTRIBUTE_FORMAT_SINT32 = 1; -const int CSSM_WORDID_L = 55; +const int CSSM_DB_ATTRIBUTE_FORMAT_UINT32 = 2; -const int CSSM_WORDID_LE = 56; +const int CSSM_DB_ATTRIBUTE_FORMAT_BIG_NUM = 3; -const int CSSM_WORDID_LOGIN = 57; +const int CSSM_DB_ATTRIBUTE_FORMAT_REAL = 4; -const int CSSM_WORDID_LOGIN_NAME = 58; +const int CSSM_DB_ATTRIBUTE_FORMAT_TIME_DATE = 5; -const int CSSM_WORDID_MAC = 59; +const int CSSM_DB_ATTRIBUTE_FORMAT_BLOB = 6; -const int CSSM_WORDID_MD2 = 60; +const int CSSM_DB_ATTRIBUTE_FORMAT_MULTI_UINT32 = 7; -const int CSSM_WORDID_MD2WITHRSA = 61; +const int CSSM_DB_ATTRIBUTE_FORMAT_COMPLEX = 8; -const int CSSM_WORDID_MD4 = 62; +const int CSSM_DB_RECORDTYPE_SCHEMA_START = 0; -const int CSSM_WORDID_MD5 = 63; +const int CSSM_DB_RECORDTYPE_SCHEMA_END = 4; -const int CSSM_WORDID_MD5WITHRSA = 64; +const int CSSM_DB_RECORDTYPE_OPEN_GROUP_START = 10; -const int CSSM_WORDID_N = 65; +const int CSSM_DB_RECORDTYPE_OPEN_GROUP_END = 18; -const int CSSM_WORDID_NAME = 66; +const int CSSM_DB_RECORDTYPE_APP_DEFINED_START = -2147483648; -const int CSSM_WORDID_NDR = 67; +const int CSSM_DB_RECORDTYPE_APP_DEFINED_END = -1; -const int CSSM_WORDID_NHASH = 68; +const int CSSM_DL_DB_SCHEMA_INFO = 0; -const int CSSM_WORDID_NOT_AFTER = 69; +const int CSSM_DL_DB_SCHEMA_INDEXES = 1; -const int CSSM_WORDID_NOT_BEFORE = 70; +const int CSSM_DL_DB_SCHEMA_ATTRIBUTES = 2; -const int CSSM_WORDID_NULL = 71; +const int CSSM_DL_DB_SCHEMA_PARSING_MODULE = 3; -const int CSSM_WORDID_NUMERIC = 72; +const int CSSM_DL_DB_RECORD_ANY = 10; -const int CSSM_WORDID_OBJECT_HASH = 73; +const int CSSM_DL_DB_RECORD_CERT = 11; -const int CSSM_WORDID_ONE_TIME = 74; +const int CSSM_DL_DB_RECORD_CRL = 12; -const int CSSM_WORDID_ONLINE = 75; +const int CSSM_DL_DB_RECORD_POLICY = 13; -const int CSSM_WORDID_OWNER = 76; +const int CSSM_DL_DB_RECORD_GENERIC = 14; -const int CSSM_WORDID_P = 77; +const int CSSM_DL_DB_RECORD_PUBLIC_KEY = 15; -const int CSSM_WORDID_PAM_NAME = 78; +const int CSSM_DL_DB_RECORD_PRIVATE_KEY = 16; -const int CSSM_WORDID_PASSWORD = 79; +const int CSSM_DL_DB_RECORD_SYMMETRIC_KEY = 17; -const int CSSM_WORDID_PGP = 80; +const int CSSM_DL_DB_RECORD_ALL_KEYS = 18; -const int CSSM_WORDID_PREFIX = 81; +const int CSSM_DB_CERT_USE_TRUSTED = 1; -const int CSSM_WORDID_PRIVATE_KEY = 82; +const int CSSM_DB_CERT_USE_SYSTEM = 2; -const int CSSM_WORDID_PROMPTED_BIOMETRIC = 83; +const int CSSM_DB_CERT_USE_OWNER = 4; -const int CSSM_WORDID_PROMPTED_PASSWORD = 84; +const int CSSM_DB_CERT_USE_REVOKED = 8; -const int CSSM_WORDID_PROPAGATE = 85; +const int CSSM_DB_CERT_USE_SIGNING = 16; -const int CSSM_WORDID_PROTECTED_BIOMETRIC = 86; +const int CSSM_DB_CERT_USE_PRIVACY = 32; -const int CSSM_WORDID_PROTECTED_PASSWORD = 87; +const int CSSM_DB_INDEX_UNIQUE = 0; -const int CSSM_WORDID_PROTECTED_PIN = 88; +const int CSSM_DB_INDEX_NONUNIQUE = 1; -const int CSSM_WORDID_PUBLIC_KEY = 89; +const int CSSM_DB_INDEX_ON_UNKNOWN = 0; -const int CSSM_WORDID_PUBLIC_KEY_FROM_CERT = 90; +const int CSSM_DB_INDEX_ON_ATTRIBUTE = 1; -const int CSSM_WORDID_Q = 91; +const int CSSM_DB_INDEX_ON_RECORD = 2; -const int CSSM_WORDID_RANGE = 92; +const int CSSM_DB_ACCESS_READ = 1; -const int CSSM_WORDID_REVAL = 93; +const int CSSM_DB_ACCESS_WRITE = 2; -const int CSSM_WORDID_RIPEMAC = 94; +const int CSSM_DB_ACCESS_PRIVILEGED = 4; -const int CSSM_WORDID_RIPEMD = 95; +const int CSSM_DB_MODIFY_ATTRIBUTE_NONE = 0; -const int CSSM_WORDID_RIPEMD160 = 96; +const int CSSM_DB_MODIFY_ATTRIBUTE_ADD = 1; -const int CSSM_WORDID_RSA = 97; +const int CSSM_DB_MODIFY_ATTRIBUTE_DELETE = 2; -const int CSSM_WORDID_RSA_ISO9796 = 98; +const int CSSM_DB_MODIFY_ATTRIBUTE_REPLACE = 3; -const int CSSM_WORDID_RSA_PKCS = 99; +const int CSSM_DB_EQUAL = 0; -const int CSSM_WORDID_RSA_PKCS_MD5 = 100; +const int CSSM_DB_NOT_EQUAL = 1; -const int CSSM_WORDID_RSA_PKCS_SHA1 = 101; +const int CSSM_DB_LESS_THAN = 2; -const int CSSM_WORDID_RSA_PKCS1 = 102; +const int CSSM_DB_GREATER_THAN = 3; -const int CSSM_WORDID_RSA_PKCS1_MD5 = 103; +const int CSSM_DB_CONTAINS = 4; -const int CSSM_WORDID_RSA_PKCS1_SHA1 = 104; +const int CSSM_DB_CONTAINS_INITIAL_SUBSTRING = 5; -const int CSSM_WORDID_RSA_PKCS1_SIG = 105; +const int CSSM_DB_CONTAINS_FINAL_SUBSTRING = 6; -const int CSSM_WORDID_RSA_RAW = 106; +const int CSSM_DB_NONE = 0; -const int CSSM_WORDID_SDSIV1 = 107; +const int CSSM_DB_AND = 1; -const int CSSM_WORDID_SEQUENCE = 108; +const int CSSM_DB_OR = 2; -const int CSSM_WORDID_SET = 109; +const int CSSM_QUERY_TIMELIMIT_NONE = 0; -const int CSSM_WORDID_SEXPR = 110; +const int CSSM_QUERY_SIZELIMIT_NONE = 0; -const int CSSM_WORDID_SHA1 = 111; +const int CSSM_QUERY_RETURN_DATA = 1; -const int CSSM_WORDID_SHA1WITHDSA = 112; +const int CSSM_DL_UNKNOWN = 0; -const int CSSM_WORDID_SHA1WITHECDSA = 113; +const int CSSM_DL_CUSTOM = 1; -const int CSSM_WORDID_SHA1WITHRSA = 114; +const int CSSM_DL_LDAP = 2; -const int CSSM_WORDID_SIGN = 115; +const int CSSM_DL_ODBC = 3; -const int CSSM_WORDID_SIGNATURE = 116; +const int CSSM_DL_PKCS11 = 4; -const int CSSM_WORDID_SIGNED_NONCE = 117; +const int CSSM_DL_FFS = 5; -const int CSSM_WORDID_SIGNED_SECRET = 118; +const int CSSM_DL_MEMORY = 6; -const int CSSM_WORDID_SPKI = 119; +const int CSSM_DL_REMOTEDIR = 7; -const int CSSM_WORDID_SUBJECT = 120; +const int CSSM_DB_DATASTORES_UNKNOWN = -1; -const int CSSM_WORDID_SUBJECT_INFO = 121; +const int CSSM_DB_TRANSACTIONAL_MODE = 0; -const int CSSM_WORDID_TAG = 122; +const int CSSM_DB_FILESYSTEMSCAN_MODE = 1; -const int CSSM_WORDID_THRESHOLD = 123; +const int CSSM_BASE_ERROR = -2147418112; -const int CSSM_WORDID_TIME = 124; +const int CSSM_ERRORCODE_MODULE_EXTENT = 2048; -const int CSSM_WORDID_URI = 125; +const int CSSM_ERRORCODE_CUSTOM_OFFSET = 1024; -const int CSSM_WORDID_VERSION = 126; +const int CSSM_ERRORCODE_COMMON_EXTENT = 256; -const int CSSM_WORDID_X509_ATTRIBUTE = 127; +const int CSSM_CSSM_BASE_ERROR = -2147418112; -const int CSSM_WORDID_X509V1 = 128; +const int CSSM_CSSM_PRIVATE_ERROR = -2147417088; -const int CSSM_WORDID_X509V2 = 129; +const int CSSM_CSP_BASE_ERROR = -2147416064; -const int CSSM_WORDID_X509V3 = 130; +const int CSSM_CSP_PRIVATE_ERROR = -2147415040; -const int CSSM_WORDID_X9_ATTRIBUTE = 131; +const int CSSM_DL_BASE_ERROR = -2147414016; -const int CSSM_WORDID_VENDOR_START = 65536; +const int CSSM_DL_PRIVATE_ERROR = -2147412992; -const int CSSM_WORDID_VENDOR_END = 2147418112; +const int CSSM_CL_BASE_ERROR = -2147411968; -const int CSSM_LIST_ELEMENT_DATUM = 0; +const int CSSM_CL_PRIVATE_ERROR = -2147410944; -const int CSSM_LIST_ELEMENT_SUBLIST = 1; +const int CSSM_TP_BASE_ERROR = -2147409920; -const int CSSM_LIST_ELEMENT_WORDID = 2; +const int CSSM_TP_PRIVATE_ERROR = -2147408896; -const int CSSM_LIST_TYPE_UNKNOWN = 0; +const int CSSM_KR_BASE_ERROR = -2147407872; -const int CSSM_LIST_TYPE_CUSTOM = 1; +const int CSSM_KR_PRIVATE_ERROR = -2147406848; -const int CSSM_LIST_TYPE_SEXPR = 2; +const int CSSM_AC_BASE_ERROR = -2147405824; -const int CSSM_SAMPLE_TYPE_PASSWORD = 79; +const int CSSM_AC_PRIVATE_ERROR = -2147404800; -const int CSSM_SAMPLE_TYPE_HASHED_PASSWORD = 43; +const int CSSM_MDS_BASE_ERROR = -2147414016; -const int CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD = 87; +const int CSSM_MDS_PRIVATE_ERROR = -2147412992; -const int CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD = 84; +const int CSSMERR_CSSM_INVALID_ADDIN_HANDLE = -2147417855; -const int CSSM_SAMPLE_TYPE_SIGNED_NONCE = 117; +const int CSSMERR_CSSM_NOT_INITIALIZED = -2147417854; -const int CSSM_SAMPLE_TYPE_SIGNED_SECRET = 118; +const int CSSMERR_CSSM_INVALID_HANDLE_USAGE = -2147417853; -const int CSSM_SAMPLE_TYPE_BIOMETRIC = 8; +const int CSSMERR_CSSM_PVC_REFERENT_NOT_FOUND = -2147417852; -const int CSSM_SAMPLE_TYPE_PROTECTED_BIOMETRIC = 86; +const int CSSMERR_CSSM_FUNCTION_INTEGRITY_FAIL = -2147417851; -const int CSSM_SAMPLE_TYPE_PROMPTED_BIOMETRIC = 83; +const int CSSM_ERRCODE_INTERNAL_ERROR = 1; -const int CSSM_SAMPLE_TYPE_THRESHOLD = 123; +const int CSSM_ERRCODE_MEMORY_ERROR = 2; -const int CSSM_CERT_UNKNOWN = 0; +const int CSSM_ERRCODE_MDS_ERROR = 3; -const int CSSM_CERT_X_509v1 = 1; +const int CSSM_ERRCODE_INVALID_POINTER = 4; -const int CSSM_CERT_X_509v2 = 2; +const int CSSM_ERRCODE_INVALID_INPUT_POINTER = 5; -const int CSSM_CERT_X_509v3 = 3; +const int CSSM_ERRCODE_INVALID_OUTPUT_POINTER = 6; -const int CSSM_CERT_PGP = 4; +const int CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED = 7; -const int CSSM_CERT_SPKI = 5; +const int CSSM_ERRCODE_SELF_CHECK_FAILED = 8; -const int CSSM_CERT_SDSIv1 = 6; +const int CSSM_ERRCODE_OS_ACCESS_DENIED = 9; -const int CSSM_CERT_Intel = 8; +const int CSSM_ERRCODE_FUNCTION_FAILED = 10; -const int CSSM_CERT_X_509_ATTRIBUTE = 9; +const int CSSM_ERRCODE_MODULE_MANIFEST_VERIFY_FAILED = 11; -const int CSSM_CERT_X9_ATTRIBUTE = 10; +const int CSSM_ERRCODE_INVALID_GUID = 12; -const int CSSM_CERT_TUPLE = 11; +const int CSSM_ERRCODE_OPERATION_AUTH_DENIED = 32; -const int CSSM_CERT_ACL_ENTRY = 12; +const int CSSM_ERRCODE_OBJECT_USE_AUTH_DENIED = 33; -const int CSSM_CERT_MULTIPLE = 32766; +const int CSSM_ERRCODE_OBJECT_MANIP_AUTH_DENIED = 34; -const int CSSM_CERT_LAST = 32767; +const int CSSM_ERRCODE_OBJECT_ACL_NOT_SUPPORTED = 35; -const int CSSM_CL_CUSTOM_CERT_TYPE = 32768; +const int CSSM_ERRCODE_OBJECT_ACL_REQUIRED = 36; -const int CSSM_CERT_ENCODING_UNKNOWN = 0; +const int CSSM_ERRCODE_INVALID_ACCESS_CREDENTIALS = 37; -const int CSSM_CERT_ENCODING_CUSTOM = 1; +const int CSSM_ERRCODE_INVALID_ACL_BASE_CERTS = 38; -const int CSSM_CERT_ENCODING_BER = 2; +const int CSSM_ERRCODE_ACL_BASE_CERTS_NOT_SUPPORTED = 39; -const int CSSM_CERT_ENCODING_DER = 3; +const int CSSM_ERRCODE_INVALID_SAMPLE_VALUE = 40; -const int CSSM_CERT_ENCODING_NDR = 4; +const int CSSM_ERRCODE_SAMPLE_VALUE_NOT_SUPPORTED = 41; -const int CSSM_CERT_ENCODING_SEXPR = 5; +const int CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE = 42; -const int CSSM_CERT_ENCODING_PGP = 6; +const int CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED = 43; -const int CSSM_CERT_ENCODING_MULTIPLE = 32766; +const int CSSM_ERRCODE_INVALID_ACL_CHALLENGE_CALLBACK = 44; -const int CSSM_CERT_ENCODING_LAST = 32767; +const int CSSM_ERRCODE_ACL_CHALLENGE_CALLBACK_FAILED = 45; -const int CSSM_CL_CUSTOM_CERT_ENCODING = 32768; +const int CSSM_ERRCODE_INVALID_ACL_ENTRY_TAG = 46; -const int CSSM_CERT_PARSE_FORMAT_NONE = 0; +const int CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND = 47; -const int CSSM_CERT_PARSE_FORMAT_CUSTOM = 1; +const int CSSM_ERRCODE_INVALID_ACL_EDIT_MODE = 48; -const int CSSM_CERT_PARSE_FORMAT_SEXPR = 2; +const int CSSM_ERRCODE_ACL_CHANGE_FAILED = 49; -const int CSSM_CERT_PARSE_FORMAT_COMPLEX = 3; +const int CSSM_ERRCODE_INVALID_NEW_ACL_ENTRY = 50; -const int CSSM_CERT_PARSE_FORMAT_OID_NAMED = 4; +const int CSSM_ERRCODE_INVALID_NEW_ACL_OWNER = 51; -const int CSSM_CERT_PARSE_FORMAT_TUPLE = 5; +const int CSSM_ERRCODE_ACL_DELETE_FAILED = 52; -const int CSSM_CERT_PARSE_FORMAT_MULTIPLE = 32766; +const int CSSM_ERRCODE_ACL_REPLACE_FAILED = 53; -const int CSSM_CERT_PARSE_FORMAT_LAST = 32767; +const int CSSM_ERRCODE_ACL_ADD_FAILED = 54; -const int CSSM_CL_CUSTOM_CERT_PARSE_FORMAT = 32768; +const int CSSM_ERRCODE_INVALID_CONTEXT_HANDLE = 64; -const int CSSM_CERTGROUP_DATA = 0; +const int CSSM_ERRCODE_INCOMPATIBLE_VERSION = 65; -const int CSSM_CERTGROUP_ENCODED_CERT = 1; +const int CSSM_ERRCODE_INVALID_CERTGROUP_POINTER = 66; -const int CSSM_CERTGROUP_PARSED_CERT = 2; +const int CSSM_ERRCODE_INVALID_CERT_POINTER = 67; -const int CSSM_CERTGROUP_CERT_PAIR = 3; +const int CSSM_ERRCODE_INVALID_CRL_POINTER = 68; -const int CSSM_ACL_SUBJECT_TYPE_ANY = 1; +const int CSSM_ERRCODE_INVALID_FIELD_POINTER = 69; -const int CSSM_ACL_SUBJECT_TYPE_THRESHOLD = 123; +const int CSSM_ERRCODE_INVALID_DATA = 70; -const int CSSM_ACL_SUBJECT_TYPE_PASSWORD = 79; +const int CSSM_ERRCODE_CRL_ALREADY_SIGNED = 71; -const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD = 87; +const int CSSM_ERRCODE_INVALID_NUMBER_OF_FIELDS = 72; -const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD = 84; +const int CSSM_ERRCODE_VERIFICATION_FAILURE = 73; -const int CSSM_ACL_SUBJECT_TYPE_PUBLIC_KEY = 89; +const int CSSM_ERRCODE_INVALID_DB_HANDLE = 74; -const int CSSM_ACL_SUBJECT_TYPE_HASHED_SUBJECT = 44; +const int CSSM_ERRCODE_PRIVILEGE_NOT_GRANTED = 75; -const int CSSM_ACL_SUBJECT_TYPE_BIOMETRIC = 8; +const int CSSM_ERRCODE_INVALID_DB_LIST = 76; -const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_BIOMETRIC = 86; +const int CSSM_ERRCODE_INVALID_DB_LIST_POINTER = 77; -const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_BIOMETRIC = 83; +const int CSSM_ERRCODE_UNKNOWN_FORMAT = 78; -const int CSSM_ACL_SUBJECT_TYPE_LOGIN_NAME = 58; +const int CSSM_ERRCODE_UNKNOWN_TAG = 79; -const int CSSM_ACL_SUBJECT_TYPE_EXT_PAM_NAME = 78; +const int CSSM_ERRCODE_INVALID_CSP_HANDLE = 80; -const int CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START = 65536; +const int CSSM_ERRCODE_INVALID_DL_HANDLE = 81; -const int CSSM_ACL_AUTHORIZATION_ANY = 1; +const int CSSM_ERRCODE_INVALID_CL_HANDLE = 82; -const int CSSM_ACL_AUTHORIZATION_LOGIN = 57; +const int CSSM_ERRCODE_INVALID_TP_HANDLE = 83; -const int CSSM_ACL_AUTHORIZATION_GENKEY = 41; +const int CSSM_ERRCODE_INVALID_KR_HANDLE = 84; -const int CSSM_ACL_AUTHORIZATION_DELETE = 25; +const int CSSM_ERRCODE_INVALID_AC_HANDLE = 85; -const int CSSM_ACL_AUTHORIZATION_EXPORT_WRAPPED = 38; +const int CSSM_ERRCODE_INVALID_PASSTHROUGH_ID = 86; -const int CSSM_ACL_AUTHORIZATION_EXPORT_CLEAR = 37; +const int CSSM_ERRCODE_INVALID_NETWORK_ADDR = 87; -const int CSSM_ACL_AUTHORIZATION_IMPORT_WRAPPED = 48; +const int CSSM_ERRCODE_INVALID_CRYPTO_DATA = 88; -const int CSSM_ACL_AUTHORIZATION_IMPORT_CLEAR = 47; +const int CSSMERR_CSSM_INTERNAL_ERROR = -2147418111; -const int CSSM_ACL_AUTHORIZATION_SIGN = 115; +const int CSSMERR_CSSM_MEMORY_ERROR = -2147418110; -const int CSSM_ACL_AUTHORIZATION_ENCRYPT = 35; +const int CSSMERR_CSSM_MDS_ERROR = -2147418109; -const int CSSM_ACL_AUTHORIZATION_DECRYPT = 24; +const int CSSMERR_CSSM_INVALID_POINTER = -2147418108; -const int CSSM_ACL_AUTHORIZATION_MAC = 59; +const int CSSMERR_CSSM_INVALID_INPUT_POINTER = -2147418107; -const int CSSM_ACL_AUTHORIZATION_DERIVE = 28; +const int CSSMERR_CSSM_INVALID_OUTPUT_POINTER = -2147418106; -const int CSSM_ACL_AUTHORIZATION_DBS_CREATE = 22; +const int CSSMERR_CSSM_FUNCTION_NOT_IMPLEMENTED = -2147418105; -const int CSSM_ACL_AUTHORIZATION_DBS_DELETE = 23; +const int CSSMERR_CSSM_SELF_CHECK_FAILED = -2147418104; -const int CSSM_ACL_AUTHORIZATION_DB_READ = 21; +const int CSSMERR_CSSM_OS_ACCESS_DENIED = -2147418103; -const int CSSM_ACL_AUTHORIZATION_DB_INSERT = 19; +const int CSSMERR_CSSM_FUNCTION_FAILED = -2147418102; -const int CSSM_ACL_AUTHORIZATION_DB_MODIFY = 20; +const int CSSMERR_CSSM_MODULE_MANIFEST_VERIFY_FAILED = -2147418101; -const int CSSM_ACL_AUTHORIZATION_DB_DELETE = 17; +const int CSSMERR_CSSM_INVALID_GUID = -2147418100; -const int CSSM_ACL_EDIT_MODE_ADD = 1; +const int CSSMERR_CSSM_INVALID_CONTEXT_HANDLE = -2147418048; -const int CSSM_ACL_EDIT_MODE_DELETE = 2; +const int CSSMERR_CSSM_INCOMPATIBLE_VERSION = -2147418047; -const int CSSM_ACL_EDIT_MODE_REPLACE = 3; +const int CSSMERR_CSSM_PRIVILEGE_NOT_GRANTED = -2147418037; -const int CSSM_KEYHEADER_VERSION = 2; +const int CSSM_CSSM_BASE_CSSM_ERROR = -2147417840; -const int CSSM_KEYBLOB_RAW = 0; +const int CSSMERR_CSSM_SCOPE_NOT_SUPPORTED = -2147417839; -const int CSSM_KEYBLOB_REFERENCE = 2; +const int CSSMERR_CSSM_PVC_ALREADY_CONFIGURED = -2147417838; -const int CSSM_KEYBLOB_WRAPPED = 3; +const int CSSMERR_CSSM_INVALID_PVC = -2147417837; -const int CSSM_KEYBLOB_OTHER = -1; +const int CSSMERR_CSSM_EMM_LOAD_FAILED = -2147417836; -const int CSSM_KEYBLOB_RAW_FORMAT_NONE = 0; +const int CSSMERR_CSSM_EMM_UNLOAD_FAILED = -2147417835; -const int CSSM_KEYBLOB_RAW_FORMAT_PKCS1 = 1; +const int CSSMERR_CSSM_ADDIN_LOAD_FAILED = -2147417834; -const int CSSM_KEYBLOB_RAW_FORMAT_PKCS3 = 2; +const int CSSMERR_CSSM_INVALID_KEY_HIERARCHY = -2147417833; -const int CSSM_KEYBLOB_RAW_FORMAT_MSCAPI = 3; +const int CSSMERR_CSSM_ADDIN_UNLOAD_FAILED = -2147417832; -const int CSSM_KEYBLOB_RAW_FORMAT_PGP = 4; +const int CSSMERR_CSSM_LIB_REF_NOT_FOUND = -2147417831; -const int CSSM_KEYBLOB_RAW_FORMAT_FIPS186 = 5; +const int CSSMERR_CSSM_INVALID_ADDIN_FUNCTION_TABLE = -2147417830; -const int CSSM_KEYBLOB_RAW_FORMAT_BSAFE = 6; +const int CSSMERR_CSSM_EMM_AUTHENTICATE_FAILED = -2147417829; -const int CSSM_KEYBLOB_RAW_FORMAT_CCA = 9; +const int CSSMERR_CSSM_ADDIN_AUTHENTICATE_FAILED = -2147417828; -const int CSSM_KEYBLOB_RAW_FORMAT_PKCS8 = 10; +const int CSSMERR_CSSM_INVALID_SERVICE_MASK = -2147417827; -const int CSSM_KEYBLOB_RAW_FORMAT_SPKI = 11; +const int CSSMERR_CSSM_MODULE_NOT_LOADED = -2147417826; -const int CSSM_KEYBLOB_RAW_FORMAT_OCTET_STRING = 12; +const int CSSMERR_CSSM_INVALID_SUBSERVICEID = -2147417825; -const int CSSM_KEYBLOB_RAW_FORMAT_OTHER = -1; +const int CSSMERR_CSSM_BUFFER_TOO_SMALL = -2147417824; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_NONE = 0; +const int CSSMERR_CSSM_INVALID_ATTRIBUTE = -2147417823; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS8 = 1; +const int CSSMERR_CSSM_ATTRIBUTE_NOT_IN_CONTEXT = -2147417822; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS7 = 2; +const int CSSMERR_CSSM_MODULE_MANAGER_INITIALIZE_FAIL = -2147417821; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_MSCAPI = 3; +const int CSSMERR_CSSM_MODULE_MANAGER_NOT_FOUND = -2147417820; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_OTHER = -1; +const int CSSMERR_CSSM_EVENT_NOTIFICATION_CALLBACK_NOT_FOUND = -2147417819; -const int CSSM_KEYBLOB_REF_FORMAT_INTEGER = 0; +const int CSSMERR_CSP_INTERNAL_ERROR = -2147416063; -const int CSSM_KEYBLOB_REF_FORMAT_STRING = 1; +const int CSSMERR_CSP_MEMORY_ERROR = -2147416062; -const int CSSM_KEYBLOB_REF_FORMAT_SPKI = 2; +const int CSSMERR_CSP_MDS_ERROR = -2147416061; -const int CSSM_KEYBLOB_REF_FORMAT_OTHER = -1; +const int CSSMERR_CSP_INVALID_POINTER = -2147416060; -const int CSSM_KEYCLASS_PUBLIC_KEY = 0; +const int CSSMERR_CSP_INVALID_INPUT_POINTER = -2147416059; -const int CSSM_KEYCLASS_PRIVATE_KEY = 1; +const int CSSMERR_CSP_INVALID_OUTPUT_POINTER = -2147416058; -const int CSSM_KEYCLASS_SESSION_KEY = 2; +const int CSSMERR_CSP_FUNCTION_NOT_IMPLEMENTED = -2147416057; -const int CSSM_KEYCLASS_SECRET_PART = 3; +const int CSSMERR_CSP_SELF_CHECK_FAILED = -2147416056; -const int CSSM_KEYCLASS_OTHER = -1; +const int CSSMERR_CSP_OS_ACCESS_DENIED = -2147416055; -const int CSSM_KEYATTR_RETURN_DEFAULT = 0; +const int CSSMERR_CSP_FUNCTION_FAILED = -2147416054; -const int CSSM_KEYATTR_RETURN_DATA = 268435456; +const int CSSMERR_CSP_OPERATION_AUTH_DENIED = -2147416032; -const int CSSM_KEYATTR_RETURN_REF = 536870912; +const int CSSMERR_CSP_OBJECT_USE_AUTH_DENIED = -2147416031; -const int CSSM_KEYATTR_RETURN_NONE = 1073741824; +const int CSSMERR_CSP_OBJECT_MANIP_AUTH_DENIED = -2147416030; -const int CSSM_KEYATTR_PERMANENT = 1; +const int CSSMERR_CSP_OBJECT_ACL_NOT_SUPPORTED = -2147416029; -const int CSSM_KEYATTR_PRIVATE = 2; +const int CSSMERR_CSP_OBJECT_ACL_REQUIRED = -2147416028; -const int CSSM_KEYATTR_MODIFIABLE = 4; +const int CSSMERR_CSP_INVALID_ACCESS_CREDENTIALS = -2147416027; -const int CSSM_KEYATTR_SENSITIVE = 8; +const int CSSMERR_CSP_INVALID_ACL_BASE_CERTS = -2147416026; -const int CSSM_KEYATTR_EXTRACTABLE = 32; +const int CSSMERR_CSP_ACL_BASE_CERTS_NOT_SUPPORTED = -2147416025; -const int CSSM_KEYATTR_ALWAYS_SENSITIVE = 16; +const int CSSMERR_CSP_INVALID_SAMPLE_VALUE = -2147416024; -const int CSSM_KEYATTR_NEVER_EXTRACTABLE = 64; +const int CSSMERR_CSP_SAMPLE_VALUE_NOT_SUPPORTED = -2147416023; -const int CSSM_KEYUSE_ANY = -2147483648; +const int CSSMERR_CSP_INVALID_ACL_SUBJECT_VALUE = -2147416022; -const int CSSM_KEYUSE_ENCRYPT = 1; +const int CSSMERR_CSP_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147416021; -const int CSSM_KEYUSE_DECRYPT = 2; +const int CSSMERR_CSP_INVALID_ACL_CHALLENGE_CALLBACK = -2147416020; -const int CSSM_KEYUSE_SIGN = 4; +const int CSSMERR_CSP_ACL_CHALLENGE_CALLBACK_FAILED = -2147416019; -const int CSSM_KEYUSE_VERIFY = 8; +const int CSSMERR_CSP_INVALID_ACL_ENTRY_TAG = -2147416018; -const int CSSM_KEYUSE_SIGN_RECOVER = 16; +const int CSSMERR_CSP_ACL_ENTRY_TAG_NOT_FOUND = -2147416017; -const int CSSM_KEYUSE_VERIFY_RECOVER = 32; +const int CSSMERR_CSP_INVALID_ACL_EDIT_MODE = -2147416016; -const int CSSM_KEYUSE_WRAP = 64; +const int CSSMERR_CSP_ACL_CHANGE_FAILED = -2147416015; -const int CSSM_KEYUSE_UNWRAP = 128; +const int CSSMERR_CSP_INVALID_NEW_ACL_ENTRY = -2147416014; -const int CSSM_KEYUSE_DERIVE = 256; +const int CSSMERR_CSP_INVALID_NEW_ACL_OWNER = -2147416013; -const int CSSM_ALGID_NONE = 0; +const int CSSMERR_CSP_ACL_DELETE_FAILED = -2147416012; -const int CSSM_ALGID_CUSTOM = 1; +const int CSSMERR_CSP_ACL_REPLACE_FAILED = -2147416011; -const int CSSM_ALGID_DH = 2; +const int CSSMERR_CSP_ACL_ADD_FAILED = -2147416010; -const int CSSM_ALGID_PH = 3; +const int CSSMERR_CSP_INVALID_CONTEXT_HANDLE = -2147416000; -const int CSSM_ALGID_KEA = 4; +const int CSSMERR_CSP_PRIVILEGE_NOT_GRANTED = -2147415989; -const int CSSM_ALGID_MD2 = 5; +const int CSSMERR_CSP_INVALID_DATA = -2147415994; -const int CSSM_ALGID_MD4 = 6; +const int CSSMERR_CSP_INVALID_PASSTHROUGH_ID = -2147415978; -const int CSSM_ALGID_MD5 = 7; +const int CSSMERR_CSP_INVALID_CRYPTO_DATA = -2147415976; -const int CSSM_ALGID_SHA1 = 8; +const int CSSM_CSP_BASE_CSP_ERROR = -2147415808; -const int CSSM_ALGID_NHASH = 9; +const int CSSMERR_CSP_INPUT_LENGTH_ERROR = -2147415807; -const int CSSM_ALGID_HAVAL = 10; +const int CSSMERR_CSP_OUTPUT_LENGTH_ERROR = -2147415806; -const int CSSM_ALGID_RIPEMD = 11; +const int CSSMERR_CSP_PRIVILEGE_NOT_SUPPORTED = -2147415805; -const int CSSM_ALGID_IBCHASH = 12; +const int CSSMERR_CSP_DEVICE_ERROR = -2147415804; -const int CSSM_ALGID_RIPEMAC = 13; +const int CSSMERR_CSP_DEVICE_MEMORY_ERROR = -2147415803; -const int CSSM_ALGID_DES = 14; +const int CSSMERR_CSP_ATTACH_HANDLE_BUSY = -2147415802; -const int CSSM_ALGID_DESX = 15; +const int CSSMERR_CSP_NOT_LOGGED_IN = -2147415801; -const int CSSM_ALGID_RDES = 16; +const int CSSMERR_CSP_INVALID_KEY = -2147415792; -const int CSSM_ALGID_3DES_3KEY_EDE = 17; +const int CSSMERR_CSP_INVALID_KEY_REFERENCE = -2147415791; -const int CSSM_ALGID_3DES_2KEY_EDE = 18; +const int CSSMERR_CSP_INVALID_KEY_CLASS = -2147415790; -const int CSSM_ALGID_3DES_1KEY_EEE = 19; +const int CSSMERR_CSP_ALGID_MISMATCH = -2147415789; -const int CSSM_ALGID_3DES_3KEY = 17; +const int CSSMERR_CSP_KEY_USAGE_INCORRECT = -2147415788; -const int CSSM_ALGID_3DES_3KEY_EEE = 20; +const int CSSMERR_CSP_KEY_BLOB_TYPE_INCORRECT = -2147415787; -const int CSSM_ALGID_3DES_2KEY = 18; +const int CSSMERR_CSP_KEY_HEADER_INCONSISTENT = -2147415786; -const int CSSM_ALGID_3DES_2KEY_EEE = 21; +const int CSSMERR_CSP_UNSUPPORTED_KEY_FORMAT = -2147415785; -const int CSSM_ALGID_3DES_1KEY = 20; +const int CSSMERR_CSP_UNSUPPORTED_KEY_SIZE = -2147415784; -const int CSSM_ALGID_IDEA = 22; +const int CSSMERR_CSP_INVALID_KEY_POINTER = -2147415783; -const int CSSM_ALGID_RC2 = 23; +const int CSSMERR_CSP_INVALID_KEYUSAGE_MASK = -2147415782; -const int CSSM_ALGID_RC5 = 24; +const int CSSMERR_CSP_UNSUPPORTED_KEYUSAGE_MASK = -2147415781; -const int CSSM_ALGID_RC4 = 25; +const int CSSMERR_CSP_INVALID_KEYATTR_MASK = -2147415780; -const int CSSM_ALGID_SEAL = 26; +const int CSSMERR_CSP_UNSUPPORTED_KEYATTR_MASK = -2147415779; -const int CSSM_ALGID_CAST = 27; +const int CSSMERR_CSP_INVALID_KEY_LABEL = -2147415778; -const int CSSM_ALGID_BLOWFISH = 28; +const int CSSMERR_CSP_UNSUPPORTED_KEY_LABEL = -2147415777; -const int CSSM_ALGID_SKIPJACK = 29; +const int CSSMERR_CSP_INVALID_KEY_FORMAT = -2147415776; -const int CSSM_ALGID_LUCIFER = 30; +const int CSSMERR_CSP_INVALID_DATA_COUNT = -2147415768; -const int CSSM_ALGID_MADRYGA = 31; +const int CSSMERR_CSP_VECTOR_OF_BUFS_UNSUPPORTED = -2147415767; -const int CSSM_ALGID_FEAL = 32; +const int CSSMERR_CSP_INVALID_INPUT_VECTOR = -2147415766; -const int CSSM_ALGID_REDOC = 33; +const int CSSMERR_CSP_INVALID_OUTPUT_VECTOR = -2147415765; -const int CSSM_ALGID_REDOC3 = 34; +const int CSSMERR_CSP_INVALID_CONTEXT = -2147415760; -const int CSSM_ALGID_LOKI = 35; +const int CSSMERR_CSP_INVALID_ALGORITHM = -2147415759; -const int CSSM_ALGID_KHUFU = 36; +const int CSSMERR_CSP_INVALID_ATTR_KEY = -2147415754; -const int CSSM_ALGID_KHAFRE = 37; +const int CSSMERR_CSP_MISSING_ATTR_KEY = -2147415753; -const int CSSM_ALGID_MMB = 38; +const int CSSMERR_CSP_INVALID_ATTR_INIT_VECTOR = -2147415752; -const int CSSM_ALGID_GOST = 39; +const int CSSMERR_CSP_MISSING_ATTR_INIT_VECTOR = -2147415751; -const int CSSM_ALGID_SAFER = 40; +const int CSSMERR_CSP_INVALID_ATTR_SALT = -2147415750; -const int CSSM_ALGID_CRAB = 41; +const int CSSMERR_CSP_MISSING_ATTR_SALT = -2147415749; -const int CSSM_ALGID_RSA = 42; +const int CSSMERR_CSP_INVALID_ATTR_PADDING = -2147415748; -const int CSSM_ALGID_DSA = 43; +const int CSSMERR_CSP_MISSING_ATTR_PADDING = -2147415747; -const int CSSM_ALGID_MD5WithRSA = 44; +const int CSSMERR_CSP_INVALID_ATTR_RANDOM = -2147415746; -const int CSSM_ALGID_MD2WithRSA = 45; +const int CSSMERR_CSP_MISSING_ATTR_RANDOM = -2147415745; -const int CSSM_ALGID_ElGamal = 46; +const int CSSMERR_CSP_INVALID_ATTR_SEED = -2147415744; -const int CSSM_ALGID_MD2Random = 47; +const int CSSMERR_CSP_MISSING_ATTR_SEED = -2147415743; -const int CSSM_ALGID_MD5Random = 48; +const int CSSMERR_CSP_INVALID_ATTR_PASSPHRASE = -2147415742; -const int CSSM_ALGID_SHARandom = 49; +const int CSSMERR_CSP_MISSING_ATTR_PASSPHRASE = -2147415741; -const int CSSM_ALGID_DESRandom = 50; +const int CSSMERR_CSP_INVALID_ATTR_KEY_LENGTH = -2147415740; -const int CSSM_ALGID_SHA1WithRSA = 51; +const int CSSMERR_CSP_MISSING_ATTR_KEY_LENGTH = -2147415739; -const int CSSM_ALGID_CDMF = 52; +const int CSSMERR_CSP_INVALID_ATTR_BLOCK_SIZE = -2147415738; -const int CSSM_ALGID_CAST3 = 53; +const int CSSMERR_CSP_MISSING_ATTR_BLOCK_SIZE = -2147415737; -const int CSSM_ALGID_CAST5 = 54; +const int CSSMERR_CSP_INVALID_ATTR_OUTPUT_SIZE = -2147415708; -const int CSSM_ALGID_GenericSecret = 55; +const int CSSMERR_CSP_MISSING_ATTR_OUTPUT_SIZE = -2147415707; -const int CSSM_ALGID_ConcatBaseAndKey = 56; +const int CSSMERR_CSP_INVALID_ATTR_ROUNDS = -2147415706; -const int CSSM_ALGID_ConcatKeyAndBase = 57; +const int CSSMERR_CSP_MISSING_ATTR_ROUNDS = -2147415705; -const int CSSM_ALGID_ConcatBaseAndData = 58; +const int CSSMERR_CSP_INVALID_ATTR_ALG_PARAMS = -2147415704; -const int CSSM_ALGID_ConcatDataAndBase = 59; +const int CSSMERR_CSP_MISSING_ATTR_ALG_PARAMS = -2147415703; -const int CSSM_ALGID_XORBaseAndData = 60; +const int CSSMERR_CSP_INVALID_ATTR_LABEL = -2147415702; -const int CSSM_ALGID_ExtractFromKey = 61; +const int CSSMERR_CSP_MISSING_ATTR_LABEL = -2147415701; -const int CSSM_ALGID_SSL3PrePrimaryGen = 62; +const int CSSMERR_CSP_INVALID_ATTR_KEY_TYPE = -2147415700; -const int CSSM_ALGID_SSL3PreMasterGen = 62; +const int CSSMERR_CSP_MISSING_ATTR_KEY_TYPE = -2147415699; -const int CSSM_ALGID_SSL3PrimaryDerive = 63; +const int CSSMERR_CSP_INVALID_ATTR_MODE = -2147415698; -const int CSSM_ALGID_SSL3MasterDerive = 63; +const int CSSMERR_CSP_MISSING_ATTR_MODE = -2147415697; -const int CSSM_ALGID_SSL3KeyAndMacDerive = 64; +const int CSSMERR_CSP_INVALID_ATTR_EFFECTIVE_BITS = -2147415696; -const int CSSM_ALGID_SSL3MD5_MAC = 65; +const int CSSMERR_CSP_MISSING_ATTR_EFFECTIVE_BITS = -2147415695; -const int CSSM_ALGID_SSL3SHA1_MAC = 66; +const int CSSMERR_CSP_INVALID_ATTR_START_DATE = -2147415694; -const int CSSM_ALGID_PKCS5_PBKDF1_MD5 = 67; +const int CSSMERR_CSP_MISSING_ATTR_START_DATE = -2147415693; -const int CSSM_ALGID_PKCS5_PBKDF1_MD2 = 68; +const int CSSMERR_CSP_INVALID_ATTR_END_DATE = -2147415692; -const int CSSM_ALGID_PKCS5_PBKDF1_SHA1 = 69; +const int CSSMERR_CSP_MISSING_ATTR_END_DATE = -2147415691; -const int CSSM_ALGID_WrapLynks = 70; +const int CSSMERR_CSP_INVALID_ATTR_VERSION = -2147415690; -const int CSSM_ALGID_WrapSET_OAEP = 71; +const int CSSMERR_CSP_MISSING_ATTR_VERSION = -2147415689; -const int CSSM_ALGID_BATON = 72; +const int CSSMERR_CSP_INVALID_ATTR_PRIME = -2147415688; -const int CSSM_ALGID_ECDSA = 73; +const int CSSMERR_CSP_MISSING_ATTR_PRIME = -2147415687; -const int CSSM_ALGID_MAYFLY = 74; +const int CSSMERR_CSP_INVALID_ATTR_BASE = -2147415686; -const int CSSM_ALGID_JUNIPER = 75; +const int CSSMERR_CSP_MISSING_ATTR_BASE = -2147415685; -const int CSSM_ALGID_FASTHASH = 76; +const int CSSMERR_CSP_INVALID_ATTR_SUBPRIME = -2147415684; -const int CSSM_ALGID_3DES = 77; +const int CSSMERR_CSP_MISSING_ATTR_SUBPRIME = -2147415683; -const int CSSM_ALGID_SSL3MD5 = 78; +const int CSSMERR_CSP_INVALID_ATTR_ITERATION_COUNT = -2147415682; -const int CSSM_ALGID_SSL3SHA1 = 79; +const int CSSMERR_CSP_MISSING_ATTR_ITERATION_COUNT = -2147415681; -const int CSSM_ALGID_FortezzaTimestamp = 80; +const int CSSMERR_CSP_INVALID_ATTR_DL_DB_HANDLE = -2147415680; -const int CSSM_ALGID_SHA1WithDSA = 81; +const int CSSMERR_CSP_MISSING_ATTR_DL_DB_HANDLE = -2147415679; -const int CSSM_ALGID_SHA1WithECDSA = 82; +const int CSSMERR_CSP_INVALID_ATTR_ACCESS_CREDENTIALS = -2147415678; -const int CSSM_ALGID_DSA_BSAFE = 83; +const int CSSMERR_CSP_MISSING_ATTR_ACCESS_CREDENTIALS = -2147415677; -const int CSSM_ALGID_ECDH = 84; +const int CSSMERR_CSP_INVALID_ATTR_PUBLIC_KEY_FORMAT = -2147415676; -const int CSSM_ALGID_ECMQV = 85; +const int CSSMERR_CSP_MISSING_ATTR_PUBLIC_KEY_FORMAT = -2147415675; -const int CSSM_ALGID_PKCS12_SHA1_PBE = 86; +const int CSSMERR_CSP_INVALID_ATTR_PRIVATE_KEY_FORMAT = -2147415674; -const int CSSM_ALGID_ECNRA = 87; +const int CSSMERR_CSP_MISSING_ATTR_PRIVATE_KEY_FORMAT = -2147415673; -const int CSSM_ALGID_SHA1WithECNRA = 88; +const int CSSMERR_CSP_INVALID_ATTR_SYMMETRIC_KEY_FORMAT = -2147415672; -const int CSSM_ALGID_ECES = 89; +const int CSSMERR_CSP_MISSING_ATTR_SYMMETRIC_KEY_FORMAT = -2147415671; -const int CSSM_ALGID_ECAES = 90; +const int CSSMERR_CSP_INVALID_ATTR_WRAPPED_KEY_FORMAT = -2147415670; -const int CSSM_ALGID_SHA1HMAC = 91; +const int CSSMERR_CSP_MISSING_ATTR_WRAPPED_KEY_FORMAT = -2147415669; -const int CSSM_ALGID_FIPS186Random = 92; +const int CSSMERR_CSP_STAGED_OPERATION_IN_PROGRESS = -2147415736; -const int CSSM_ALGID_ECC = 93; +const int CSSMERR_CSP_STAGED_OPERATION_NOT_STARTED = -2147415735; -const int CSSM_ALGID_MQV = 94; +const int CSSMERR_CSP_VERIFY_FAILED = -2147415734; -const int CSSM_ALGID_NRA = 95; +const int CSSMERR_CSP_INVALID_SIGNATURE = -2147415733; -const int CSSM_ALGID_IntelPlatformRandom = 96; +const int CSSMERR_CSP_QUERY_SIZE_UNKNOWN = -2147415732; -const int CSSM_ALGID_UTC = 97; +const int CSSMERR_CSP_BLOCK_SIZE_MISMATCH = -2147415731; -const int CSSM_ALGID_HAVAL3 = 98; +const int CSSMERR_CSP_PRIVATE_KEY_NOT_FOUND = -2147415730; -const int CSSM_ALGID_HAVAL4 = 99; +const int CSSMERR_CSP_PUBLIC_KEY_INCONSISTENT = -2147415729; -const int CSSM_ALGID_HAVAL5 = 100; +const int CSSMERR_CSP_DEVICE_VERIFY_FAILED = -2147415728; -const int CSSM_ALGID_TIGER = 101; +const int CSSMERR_CSP_INVALID_LOGIN_NAME = -2147415727; -const int CSSM_ALGID_MD5HMAC = 102; +const int CSSMERR_CSP_ALREADY_LOGGED_IN = -2147415726; -const int CSSM_ALGID_PKCS5_PBKDF2 = 103; +const int CSSMERR_CSP_PRIVATE_KEY_ALREADY_EXISTS = -2147415725; -const int CSSM_ALGID_RUNNING_COUNTER = 104; +const int CSSMERR_CSP_KEY_LABEL_ALREADY_EXISTS = -2147415724; -const int CSSM_ALGID_LAST = 2147483647; +const int CSSMERR_CSP_INVALID_DIGEST_ALGORITHM = -2147415723; -const int CSSM_ALGID_VENDOR_DEFINED = -2147483648; +const int CSSMERR_CSP_CRYPTO_DATA_CALLBACK_FAILED = -2147415722; -const int CSSM_ALGMODE_NONE = 0; +const int CSSMERR_TP_INTERNAL_ERROR = -2147409919; -const int CSSM_ALGMODE_CUSTOM = 1; +const int CSSMERR_TP_MEMORY_ERROR = -2147409918; -const int CSSM_ALGMODE_ECB = 2; +const int CSSMERR_TP_MDS_ERROR = -2147409917; -const int CSSM_ALGMODE_ECBPad = 3; +const int CSSMERR_TP_INVALID_POINTER = -2147409916; -const int CSSM_ALGMODE_CBC = 4; +const int CSSMERR_TP_INVALID_INPUT_POINTER = -2147409915; -const int CSSM_ALGMODE_CBC_IV8 = 5; +const int CSSMERR_TP_INVALID_OUTPUT_POINTER = -2147409914; -const int CSSM_ALGMODE_CBCPadIV8 = 6; +const int CSSMERR_TP_FUNCTION_NOT_IMPLEMENTED = -2147409913; -const int CSSM_ALGMODE_CFB = 7; +const int CSSMERR_TP_SELF_CHECK_FAILED = -2147409912; -const int CSSM_ALGMODE_CFB_IV8 = 8; +const int CSSMERR_TP_OS_ACCESS_DENIED = -2147409911; -const int CSSM_ALGMODE_CFBPadIV8 = 9; +const int CSSMERR_TP_FUNCTION_FAILED = -2147409910; -const int CSSM_ALGMODE_OFB = 10; +const int CSSMERR_TP_INVALID_CONTEXT_HANDLE = -2147409856; -const int CSSM_ALGMODE_OFB_IV8 = 11; +const int CSSMERR_TP_INVALID_DATA = -2147409850; -const int CSSM_ALGMODE_OFBPadIV8 = 12; +const int CSSMERR_TP_INVALID_DB_LIST = -2147409844; -const int CSSM_ALGMODE_COUNTER = 13; +const int CSSMERR_TP_INVALID_CERTGROUP_POINTER = -2147409854; -const int CSSM_ALGMODE_BC = 14; +const int CSSMERR_TP_INVALID_CERT_POINTER = -2147409853; -const int CSSM_ALGMODE_PCBC = 15; +const int CSSMERR_TP_INVALID_CRL_POINTER = -2147409852; -const int CSSM_ALGMODE_CBCC = 16; +const int CSSMERR_TP_INVALID_FIELD_POINTER = -2147409851; -const int CSSM_ALGMODE_OFBNLF = 17; +const int CSSMERR_TP_INVALID_NETWORK_ADDR = -2147409833; -const int CSSM_ALGMODE_PBC = 18; +const int CSSMERR_TP_CRL_ALREADY_SIGNED = -2147409849; -const int CSSM_ALGMODE_PFB = 19; +const int CSSMERR_TP_INVALID_NUMBER_OF_FIELDS = -2147409848; -const int CSSM_ALGMODE_CBCPD = 20; +const int CSSMERR_TP_VERIFICATION_FAILURE = -2147409847; -const int CSSM_ALGMODE_PUBLIC_KEY = 21; +const int CSSMERR_TP_INVALID_DB_HANDLE = -2147409846; -const int CSSM_ALGMODE_PRIVATE_KEY = 22; +const int CSSMERR_TP_UNKNOWN_FORMAT = -2147409842; -const int CSSM_ALGMODE_SHUFFLE = 23; +const int CSSMERR_TP_UNKNOWN_TAG = -2147409841; -const int CSSM_ALGMODE_ECB64 = 24; +const int CSSMERR_TP_INVALID_PASSTHROUGH_ID = -2147409834; -const int CSSM_ALGMODE_CBC64 = 25; +const int CSSMERR_TP_INVALID_CSP_HANDLE = -2147409840; -const int CSSM_ALGMODE_OFB64 = 26; +const int CSSMERR_TP_INVALID_DL_HANDLE = -2147409839; -const int CSSM_ALGMODE_CFB32 = 28; +const int CSSMERR_TP_INVALID_CL_HANDLE = -2147409838; -const int CSSM_ALGMODE_CFB16 = 29; +const int CSSMERR_TP_INVALID_DB_LIST_POINTER = -2147409843; -const int CSSM_ALGMODE_CFB8 = 30; +const int CSSM_TP_BASE_TP_ERROR = -2147409664; -const int CSSM_ALGMODE_WRAP = 31; +const int CSSMERR_TP_INVALID_CALLERAUTH_CONTEXT_POINTER = -2147409663; -const int CSSM_ALGMODE_PRIVATE_WRAP = 32; +const int CSSMERR_TP_INVALID_IDENTIFIER_POINTER = -2147409662; -const int CSSM_ALGMODE_RELAYX = 33; +const int CSSMERR_TP_INVALID_KEYCACHE_HANDLE = -2147409661; -const int CSSM_ALGMODE_ECB128 = 34; +const int CSSMERR_TP_INVALID_CERTGROUP = -2147409660; -const int CSSM_ALGMODE_ECB96 = 35; +const int CSSMERR_TP_INVALID_CRLGROUP = -2147409659; -const int CSSM_ALGMODE_CBC128 = 36; +const int CSSMERR_TP_INVALID_CRLGROUP_POINTER = -2147409658; -const int CSSM_ALGMODE_OAEP_HASH = 37; +const int CSSMERR_TP_AUTHENTICATION_FAILED = -2147409657; -const int CSSM_ALGMODE_PKCS1_EME_V15 = 38; +const int CSSMERR_TP_CERTGROUP_INCOMPLETE = -2147409656; -const int CSSM_ALGMODE_PKCS1_EME_OAEP = 39; +const int CSSMERR_TP_CERTIFICATE_CANT_OPERATE = -2147409655; -const int CSSM_ALGMODE_PKCS1_EMSA_V15 = 40; +const int CSSMERR_TP_CERT_EXPIRED = -2147409654; -const int CSSM_ALGMODE_ISO_9796 = 41; +const int CSSMERR_TP_CERT_NOT_VALID_YET = -2147409653; -const int CSSM_ALGMODE_X9_31 = 42; +const int CSSMERR_TP_CERT_REVOKED = -2147409652; -const int CSSM_ALGMODE_LAST = 2147483647; +const int CSSMERR_TP_CERT_SUSPENDED = -2147409651; -const int CSSM_ALGMODE_VENDOR_DEFINED = -2147483648; +const int CSSMERR_TP_INSUFFICIENT_CREDENTIALS = -2147409650; -const int CSSM_CSP_SOFTWARE = 1; +const int CSSMERR_TP_INVALID_ACTION = -2147409649; -const int CSSM_CSP_HARDWARE = 2; +const int CSSMERR_TP_INVALID_ACTION_DATA = -2147409648; -const int CSSM_CSP_HYBRID = 3; +const int CSSMERR_TP_INVALID_ANCHOR_CERT = -2147409646; -const int CSSM_ALGCLASS_NONE = 0; +const int CSSMERR_TP_INVALID_AUTHORITY = -2147409645; -const int CSSM_ALGCLASS_CUSTOM = 1; +const int CSSMERR_TP_VERIFY_ACTION_FAILED = -2147409644; -const int CSSM_ALGCLASS_SIGNATURE = 2; +const int CSSMERR_TP_INVALID_CERTIFICATE = -2147409643; -const int CSSM_ALGCLASS_SYMMETRIC = 3; +const int CSSMERR_TP_INVALID_CERT_AUTHORITY = -2147409642; -const int CSSM_ALGCLASS_DIGEST = 4; +const int CSSMERR_TP_INVALID_CRL_AUTHORITY = -2147409641; -const int CSSM_ALGCLASS_RANDOMGEN = 5; +const int CSSMERR_TP_INVALID_CRL_ENCODING = -2147409640; -const int CSSM_ALGCLASS_UNIQUEGEN = 6; +const int CSSMERR_TP_INVALID_CRL_TYPE = -2147409639; -const int CSSM_ALGCLASS_MAC = 7; +const int CSSMERR_TP_INVALID_CRL = -2147409638; -const int CSSM_ALGCLASS_ASYMMETRIC = 8; +const int CSSMERR_TP_INVALID_FORM_TYPE = -2147409637; -const int CSSM_ALGCLASS_KEYGEN = 9; +const int CSSMERR_TP_INVALID_ID = -2147409636; -const int CSSM_ALGCLASS_DERIVEKEY = 10; +const int CSSMERR_TP_INVALID_IDENTIFIER = -2147409635; -const int CSSM_ATTRIBUTE_DATA_NONE = 0; +const int CSSMERR_TP_INVALID_INDEX = -2147409634; -const int CSSM_ATTRIBUTE_DATA_UINT32 = 268435456; +const int CSSMERR_TP_INVALID_NAME = -2147409633; -const int CSSM_ATTRIBUTE_DATA_CSSM_DATA = 536870912; +const int CSSMERR_TP_INVALID_POLICY_IDENTIFIERS = -2147409632; -const int CSSM_ATTRIBUTE_DATA_CRYPTO_DATA = 805306368; +const int CSSMERR_TP_INVALID_TIMESTRING = -2147409631; -const int CSSM_ATTRIBUTE_DATA_KEY = 1073741824; +const int CSSMERR_TP_INVALID_REASON = -2147409630; -const int CSSM_ATTRIBUTE_DATA_STRING = 1342177280; +const int CSSMERR_TP_INVALID_REQUEST_INPUTS = -2147409629; -const int CSSM_ATTRIBUTE_DATA_DATE = 1610612736; +const int CSSMERR_TP_INVALID_RESPONSE_VECTOR = -2147409628; -const int CSSM_ATTRIBUTE_DATA_RANGE = 1879048192; +const int CSSMERR_TP_INVALID_SIGNATURE = -2147409627; -const int CSSM_ATTRIBUTE_DATA_ACCESS_CREDENTIALS = -2147483648; +const int CSSMERR_TP_INVALID_STOP_ON_POLICY = -2147409626; -const int CSSM_ATTRIBUTE_DATA_VERSION = 16777216; +const int CSSMERR_TP_INVALID_CALLBACK = -2147409625; -const int CSSM_ATTRIBUTE_DATA_DL_DB_HANDLE = 33554432; +const int CSSMERR_TP_INVALID_TUPLE = -2147409624; -const int CSSM_ATTRIBUTE_DATA_KR_PROFILE = 50331648; +const int CSSMERR_TP_NOT_SIGNER = -2147409623; -const int CSSM_ATTRIBUTE_TYPE_MASK = -16777216; +const int CSSMERR_TP_NOT_TRUSTED = -2147409622; -const int CSSM_ATTRIBUTE_NONE = 0; +const int CSSMERR_TP_NO_DEFAULT_AUTHORITY = -2147409621; -const int CSSM_ATTRIBUTE_CUSTOM = 536870913; +const int CSSMERR_TP_REJECTED_FORM = -2147409620; -const int CSSM_ATTRIBUTE_DESCRIPTION = 1342177282; +const int CSSMERR_TP_REQUEST_LOST = -2147409619; -const int CSSM_ATTRIBUTE_KEY = 1073741827; +const int CSSMERR_TP_REQUEST_REJECTED = -2147409618; -const int CSSM_ATTRIBUTE_INIT_VECTOR = 536870916; +const int CSSMERR_TP_UNSUPPORTED_ADDR_TYPE = -2147409617; -const int CSSM_ATTRIBUTE_SALT = 536870917; +const int CSSMERR_TP_UNSUPPORTED_SERVICE = -2147409616; -const int CSSM_ATTRIBUTE_PADDING = 268435462; +const int CSSMERR_TP_INVALID_TUPLEGROUP_POINTER = -2147409615; -const int CSSM_ATTRIBUTE_RANDOM = 536870919; +const int CSSMERR_TP_INVALID_TUPLEGROUP = -2147409614; -const int CSSM_ATTRIBUTE_SEED = 805306376; +const int CSSMERR_AC_INTERNAL_ERROR = -2147405823; -const int CSSM_ATTRIBUTE_PASSPHRASE = 805306377; +const int CSSMERR_AC_MEMORY_ERROR = -2147405822; -const int CSSM_ATTRIBUTE_KEY_LENGTH = 268435466; +const int CSSMERR_AC_MDS_ERROR = -2147405821; -const int CSSM_ATTRIBUTE_KEY_LENGTH_RANGE = 1879048203; +const int CSSMERR_AC_INVALID_POINTER = -2147405820; -const int CSSM_ATTRIBUTE_BLOCK_SIZE = 268435468; +const int CSSMERR_AC_INVALID_INPUT_POINTER = -2147405819; -const int CSSM_ATTRIBUTE_OUTPUT_SIZE = 268435469; +const int CSSMERR_AC_INVALID_OUTPUT_POINTER = -2147405818; -const int CSSM_ATTRIBUTE_ROUNDS = 268435470; +const int CSSMERR_AC_FUNCTION_NOT_IMPLEMENTED = -2147405817; -const int CSSM_ATTRIBUTE_IV_SIZE = 268435471; +const int CSSMERR_AC_SELF_CHECK_FAILED = -2147405816; -const int CSSM_ATTRIBUTE_ALG_PARAMS = 536870928; +const int CSSMERR_AC_OS_ACCESS_DENIED = -2147405815; -const int CSSM_ATTRIBUTE_LABEL = 536870929; +const int CSSMERR_AC_FUNCTION_FAILED = -2147405814; -const int CSSM_ATTRIBUTE_KEY_TYPE = 268435474; +const int CSSMERR_AC_INVALID_CONTEXT_HANDLE = -2147405760; -const int CSSM_ATTRIBUTE_MODE = 268435475; +const int CSSMERR_AC_INVALID_DATA = -2147405754; -const int CSSM_ATTRIBUTE_EFFECTIVE_BITS = 268435476; +const int CSSMERR_AC_INVALID_DB_LIST = -2147405748; -const int CSSM_ATTRIBUTE_START_DATE = 1610612757; +const int CSSMERR_AC_INVALID_PASSTHROUGH_ID = -2147405738; -const int CSSM_ATTRIBUTE_END_DATE = 1610612758; +const int CSSMERR_AC_INVALID_DL_HANDLE = -2147405743; -const int CSSM_ATTRIBUTE_KEYUSAGE = 268435479; +const int CSSMERR_AC_INVALID_CL_HANDLE = -2147405742; -const int CSSM_ATTRIBUTE_KEYATTR = 268435480; +const int CSSMERR_AC_INVALID_TP_HANDLE = -2147405741; -const int CSSM_ATTRIBUTE_VERSION = 16777241; +const int CSSMERR_AC_INVALID_DB_HANDLE = -2147405750; -const int CSSM_ATTRIBUTE_PRIME = 536870938; +const int CSSMERR_AC_INVALID_DB_LIST_POINTER = -2147405747; -const int CSSM_ATTRIBUTE_BASE = 536870939; +const int CSSM_AC_BASE_AC_ERROR = -2147405568; -const int CSSM_ATTRIBUTE_SUBPRIME = 536870940; +const int CSSMERR_AC_INVALID_BASE_ACLS = -2147405567; -const int CSSM_ATTRIBUTE_ALG_ID = 268435485; +const int CSSMERR_AC_INVALID_TUPLE_CREDENTIALS = -2147405566; -const int CSSM_ATTRIBUTE_ITERATION_COUNT = 268435486; +const int CSSMERR_AC_INVALID_ENCODING = -2147405565; -const int CSSM_ATTRIBUTE_ROUNDS_RANGE = 1879048223; +const int CSSMERR_AC_INVALID_VALIDITY_PERIOD = -2147405564; -const int CSSM_ATTRIBUTE_KRPROFILE_LOCAL = 50331680; +const int CSSMERR_AC_INVALID_REQUESTOR = -2147405563; -const int CSSM_ATTRIBUTE_KRPROFILE_REMOTE = 50331681; +const int CSSMERR_AC_INVALID_REQUEST_DESCRIPTOR = -2147405562; -const int CSSM_ATTRIBUTE_CSP_HANDLE = 268435490; +const int CSSMERR_CL_INTERNAL_ERROR = -2147411967; -const int CSSM_ATTRIBUTE_DL_DB_HANDLE = 33554467; +const int CSSMERR_CL_MEMORY_ERROR = -2147411966; -const int CSSM_ATTRIBUTE_ACCESS_CREDENTIALS = -2147483612; +const int CSSMERR_CL_MDS_ERROR = -2147411965; -const int CSSM_ATTRIBUTE_PUBLIC_KEY_FORMAT = 268435493; +const int CSSMERR_CL_INVALID_POINTER = -2147411964; -const int CSSM_ATTRIBUTE_PRIVATE_KEY_FORMAT = 268435494; +const int CSSMERR_CL_INVALID_INPUT_POINTER = -2147411963; -const int CSSM_ATTRIBUTE_SYMMETRIC_KEY_FORMAT = 268435495; +const int CSSMERR_CL_INVALID_OUTPUT_POINTER = -2147411962; -const int CSSM_ATTRIBUTE_WRAPPED_KEY_FORMAT = 268435496; +const int CSSMERR_CL_FUNCTION_NOT_IMPLEMENTED = -2147411961; -const int CSSM_PADDING_NONE = 0; +const int CSSMERR_CL_SELF_CHECK_FAILED = -2147411960; -const int CSSM_PADDING_CUSTOM = 1; +const int CSSMERR_CL_OS_ACCESS_DENIED = -2147411959; -const int CSSM_PADDING_ZERO = 2; +const int CSSMERR_CL_FUNCTION_FAILED = -2147411958; -const int CSSM_PADDING_ONE = 3; +const int CSSMERR_CL_INVALID_CONTEXT_HANDLE = -2147411904; -const int CSSM_PADDING_ALTERNATE = 4; +const int CSSMERR_CL_INVALID_CERTGROUP_POINTER = -2147411902; -const int CSSM_PADDING_FF = 5; +const int CSSMERR_CL_INVALID_CERT_POINTER = -2147411901; -const int CSSM_PADDING_PKCS5 = 6; +const int CSSMERR_CL_INVALID_CRL_POINTER = -2147411900; -const int CSSM_PADDING_PKCS7 = 7; +const int CSSMERR_CL_INVALID_FIELD_POINTER = -2147411899; -const int CSSM_PADDING_CIPHERSTEALING = 8; +const int CSSMERR_CL_INVALID_DATA = -2147411898; -const int CSSM_PADDING_RANDOM = 9; +const int CSSMERR_CL_CRL_ALREADY_SIGNED = -2147411897; -const int CSSM_PADDING_PKCS1 = 10; +const int CSSMERR_CL_INVALID_NUMBER_OF_FIELDS = -2147411896; -const int CSSM_PADDING_SIGRAW = 11; +const int CSSMERR_CL_VERIFICATION_FAILURE = -2147411895; -const int CSSM_PADDING_VENDOR_DEFINED = -2147483648; +const int CSSMERR_CL_UNKNOWN_FORMAT = -2147411890; -const int CSSM_CSP_TOK_RNG = 1; +const int CSSMERR_CL_UNKNOWN_TAG = -2147411889; -const int CSSM_CSP_TOK_CLOCK_EXISTS = 64; +const int CSSMERR_CL_INVALID_PASSTHROUGH_ID = -2147411882; -const int CSSM_CSP_RDR_TOKENPRESENT = 1; +const int CSSM_CL_BASE_CL_ERROR = -2147411712; -const int CSSM_CSP_RDR_EXISTS = 2; +const int CSSMERR_CL_INVALID_BUNDLE_POINTER = -2147411711; -const int CSSM_CSP_RDR_HW = 4; +const int CSSMERR_CL_INVALID_CACHE_HANDLE = -2147411710; -const int CSSM_CSP_TOK_WRITE_PROTECTED = 2; +const int CSSMERR_CL_INVALID_RESULTS_HANDLE = -2147411709; -const int CSSM_CSP_TOK_LOGIN_REQUIRED = 4; +const int CSSMERR_CL_INVALID_BUNDLE_INFO = -2147411708; -const int CSSM_CSP_TOK_USER_PIN_INITIALIZED = 8; +const int CSSMERR_CL_INVALID_CRL_INDEX = -2147411707; -const int CSSM_CSP_TOK_PROT_AUTHENTICATION = 256; +const int CSSMERR_CL_INVALID_SCOPE = -2147411706; -const int CSSM_CSP_TOK_USER_PIN_EXPIRED = 1048576; +const int CSSMERR_CL_NO_FIELD_VALUES = -2147411705; -const int CSSM_CSP_TOK_SESSION_KEY_PASSWORD = 2097152; +const int CSSMERR_CL_SCOPE_NOT_SUPPORTED = -2147411704; -const int CSSM_CSP_TOK_PRIVATE_KEY_PASSWORD = 4194304; +const int CSSMERR_DL_INTERNAL_ERROR = -2147414015; -const int CSSM_CSP_STORES_PRIVATE_KEYS = 16777216; +const int CSSMERR_DL_MEMORY_ERROR = -2147414014; -const int CSSM_CSP_STORES_PUBLIC_KEYS = 33554432; +const int CSSMERR_DL_MDS_ERROR = -2147414013; -const int CSSM_CSP_STORES_SESSION_KEYS = 67108864; +const int CSSMERR_DL_INVALID_POINTER = -2147414012; -const int CSSM_CSP_STORES_CERTIFICATES = 134217728; +const int CSSMERR_DL_INVALID_INPUT_POINTER = -2147414011; -const int CSSM_CSP_STORES_GENERIC = 268435456; +const int CSSMERR_DL_INVALID_OUTPUT_POINTER = -2147414010; -const int CSSM_PKCS_OAEP_MGF_NONE = 0; +const int CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED = -2147414009; -const int CSSM_PKCS_OAEP_MGF1_SHA1 = 1; +const int CSSMERR_DL_SELF_CHECK_FAILED = -2147414008; -const int CSSM_PKCS_OAEP_MGF1_MD5 = 2; +const int CSSMERR_DL_OS_ACCESS_DENIED = -2147414007; -const int CSSM_PKCS_OAEP_PSOURCE_NONE = 0; +const int CSSMERR_DL_FUNCTION_FAILED = -2147414006; -const int CSSM_PKCS_OAEP_PSOURCE_Pspecified = 1; +const int CSSMERR_DL_INVALID_CSP_HANDLE = -2147413936; -const int CSSM_VALUE_NOT_AVAILABLE = -1; +const int CSSMERR_DL_INVALID_DL_HANDLE = -2147413935; -const int CSSM_PKCS5_PBKDF2_PRF_HMAC_SHA1 = 0; +const int CSSMERR_DL_INVALID_CL_HANDLE = -2147413934; -const int CSSM_TP_AUTHORITY_REQUEST_CERTISSUE = 1; +const int CSSMERR_DL_INVALID_DB_LIST_POINTER = -2147413939; -const int CSSM_TP_AUTHORITY_REQUEST_CERTREVOKE = 2; +const int CSSMERR_DL_OPERATION_AUTH_DENIED = -2147413984; -const int CSSM_TP_AUTHORITY_REQUEST_CERTSUSPEND = 3; +const int CSSMERR_DL_OBJECT_USE_AUTH_DENIED = -2147413983; -const int CSSM_TP_AUTHORITY_REQUEST_CERTRESUME = 4; +const int CSSMERR_DL_OBJECT_MANIP_AUTH_DENIED = -2147413982; -const int CSSM_TP_AUTHORITY_REQUEST_CERTVERIFY = 5; +const int CSSMERR_DL_OBJECT_ACL_NOT_SUPPORTED = -2147413981; -const int CSSM_TP_AUTHORITY_REQUEST_CERTNOTARIZE = 6; +const int CSSMERR_DL_OBJECT_ACL_REQUIRED = -2147413980; -const int CSSM_TP_AUTHORITY_REQUEST_CERTUSERECOVER = 7; +const int CSSMERR_DL_INVALID_ACCESS_CREDENTIALS = -2147413979; -const int CSSM_TP_AUTHORITY_REQUEST_CRLISSUE = 256; +const int CSSMERR_DL_INVALID_ACL_BASE_CERTS = -2147413978; -const int CSSM_TP_KEY_ARCHIVE = 1; +const int CSSMERR_DL_ACL_BASE_CERTS_NOT_SUPPORTED = -2147413977; -const int CSSM_TP_CERT_PUBLISH = 2; +const int CSSMERR_DL_INVALID_SAMPLE_VALUE = -2147413976; -const int CSSM_TP_CERT_NOTIFY_RENEW = 4; +const int CSSMERR_DL_SAMPLE_VALUE_NOT_SUPPORTED = -2147413975; -const int CSSM_TP_CERT_DIR_UPDATE = 8; +const int CSSMERR_DL_INVALID_ACL_SUBJECT_VALUE = -2147413974; -const int CSSM_TP_CRL_DISTRIBUTE = 16; +const int CSSMERR_DL_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147413973; -const int CSSM_TP_ACTION_DEFAULT = 0; +const int CSSMERR_DL_INVALID_ACL_CHALLENGE_CALLBACK = -2147413972; -const int CSSM_TP_STOP_ON_POLICY = 0; +const int CSSMERR_DL_ACL_CHALLENGE_CALLBACK_FAILED = -2147413971; -const int CSSM_TP_STOP_ON_NONE = 1; +const int CSSMERR_DL_INVALID_ACL_ENTRY_TAG = -2147413970; -const int CSSM_TP_STOP_ON_FIRST_PASS = 2; +const int CSSMERR_DL_ACL_ENTRY_TAG_NOT_FOUND = -2147413969; -const int CSSM_TP_STOP_ON_FIRST_FAIL = 3; +const int CSSMERR_DL_INVALID_ACL_EDIT_MODE = -2147413968; -const int CSSM_CRL_PARSE_FORMAT_NONE = 0; +const int CSSMERR_DL_ACL_CHANGE_FAILED = -2147413967; -const int CSSM_CRL_PARSE_FORMAT_CUSTOM = 1; +const int CSSMERR_DL_INVALID_NEW_ACL_ENTRY = -2147413966; -const int CSSM_CRL_PARSE_FORMAT_SEXPR = 2; +const int CSSMERR_DL_INVALID_NEW_ACL_OWNER = -2147413965; -const int CSSM_CRL_PARSE_FORMAT_COMPLEX = 3; +const int CSSMERR_DL_ACL_DELETE_FAILED = -2147413964; -const int CSSM_CRL_PARSE_FORMAT_OID_NAMED = 4; +const int CSSMERR_DL_ACL_REPLACE_FAILED = -2147413963; -const int CSSM_CRL_PARSE_FORMAT_TUPLE = 5; +const int CSSMERR_DL_ACL_ADD_FAILED = -2147413962; -const int CSSM_CRL_PARSE_FORMAT_MULTIPLE = 32766; +const int CSSMERR_DL_INVALID_DB_HANDLE = -2147413942; -const int CSSM_CRL_PARSE_FORMAT_LAST = 32767; +const int CSSMERR_DL_INVALID_PASSTHROUGH_ID = -2147413930; -const int CSSM_CL_CUSTOM_CRL_PARSE_FORMAT = 32768; +const int CSSMERR_DL_INVALID_NETWORK_ADDR = -2147413929; -const int CSSM_CRL_TYPE_UNKNOWN = 0; +const int CSSM_DL_BASE_DL_ERROR = -2147413760; -const int CSSM_CRL_TYPE_X_509v1 = 1; +const int CSSMERR_DL_DATABASE_CORRUPT = -2147413759; -const int CSSM_CRL_TYPE_X_509v2 = 2; +const int CSSMERR_DL_INVALID_RECORD_INDEX = -2147413752; -const int CSSM_CRL_TYPE_SPKI = 3; +const int CSSMERR_DL_INVALID_RECORDTYPE = -2147413751; -const int CSSM_CRL_TYPE_MULTIPLE = 32766; +const int CSSMERR_DL_INVALID_FIELD_NAME = -2147413750; -const int CSSM_CRL_ENCODING_UNKNOWN = 0; +const int CSSMERR_DL_UNSUPPORTED_FIELD_FORMAT = -2147413749; -const int CSSM_CRL_ENCODING_CUSTOM = 1; +const int CSSMERR_DL_UNSUPPORTED_INDEX_INFO = -2147413748; -const int CSSM_CRL_ENCODING_BER = 2; +const int CSSMERR_DL_UNSUPPORTED_LOCALITY = -2147413747; -const int CSSM_CRL_ENCODING_DER = 3; +const int CSSMERR_DL_UNSUPPORTED_NUM_ATTRIBUTES = -2147413746; -const int CSSM_CRL_ENCODING_BLOOM = 4; +const int CSSMERR_DL_UNSUPPORTED_NUM_INDEXES = -2147413745; -const int CSSM_CRL_ENCODING_SEXPR = 5; +const int CSSMERR_DL_UNSUPPORTED_NUM_RECORDTYPES = -2147413744; -const int CSSM_CRL_ENCODING_MULTIPLE = 32766; +const int CSSMERR_DL_UNSUPPORTED_RECORDTYPE = -2147413743; -const int CSSM_CRLGROUP_DATA = 0; +const int CSSMERR_DL_FIELD_SPECIFIED_MULTIPLE = -2147413742; -const int CSSM_CRLGROUP_ENCODED_CRL = 1; +const int CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT = -2147413741; -const int CSSM_CRLGROUP_PARSED_CRL = 2; +const int CSSMERR_DL_INVALID_PARSING_MODULE = -2147413740; -const int CSSM_CRLGROUP_CRL_PAIR = 3; +const int CSSMERR_DL_INVALID_DB_NAME = -2147413738; -const int CSSM_EVIDENCE_FORM_UNSPECIFIC = 0; +const int CSSMERR_DL_DATASTORE_DOESNOT_EXIST = -2147413737; -const int CSSM_EVIDENCE_FORM_CERT = 1; +const int CSSMERR_DL_DATASTORE_ALREADY_EXISTS = -2147413736; -const int CSSM_EVIDENCE_FORM_CRL = 2; +const int CSSMERR_DL_DB_LOCKED = -2147413735; -const int CSSM_EVIDENCE_FORM_CERT_ID = 3; +const int CSSMERR_DL_DATASTORE_IS_OPEN = -2147413734; -const int CSSM_EVIDENCE_FORM_CRL_ID = 4; +const int CSSMERR_DL_RECORD_NOT_FOUND = -2147413733; -const int CSSM_EVIDENCE_FORM_VERIFIER_TIME = 5; +const int CSSMERR_DL_MISSING_VALUE = -2147413732; -const int CSSM_EVIDENCE_FORM_CRL_THISTIME = 6; +const int CSSMERR_DL_UNSUPPORTED_QUERY = -2147413731; -const int CSSM_EVIDENCE_FORM_CRL_NEXTTIME = 7; +const int CSSMERR_DL_UNSUPPORTED_QUERY_LIMITS = -2147413730; -const int CSSM_EVIDENCE_FORM_POLICYINFO = 8; +const int CSSMERR_DL_UNSUPPORTED_NUM_SELECTION_PREDS = -2147413729; -const int CSSM_EVIDENCE_FORM_TUPLEGROUP = 9; +const int CSSMERR_DL_UNSUPPORTED_OPERATOR = -2147413727; -const int CSSM_TP_CONFIRM_STATUS_UNKNOWN = 0; +const int CSSMERR_DL_INVALID_RESULTS_HANDLE = -2147413726; -const int CSSM_TP_CONFIRM_ACCEPT = 1; +const int CSSMERR_DL_INVALID_DB_LOCATION = -2147413725; -const int CSSM_TP_CONFIRM_REJECT = 2; +const int CSSMERR_DL_INVALID_ACCESS_REQUEST = -2147413724; -const int CSSM_ESTIMATED_TIME_UNKNOWN = -1; +const int CSSMERR_DL_INVALID_INDEX_INFO = -2147413723; -const int CSSM_ELAPSED_TIME_UNKNOWN = -1; +const int CSSMERR_DL_INVALID_SELECTION_TAG = -2147413722; -const int CSSM_ELAPSED_TIME_COMPLETE = -2; +const int CSSMERR_DL_INVALID_NEW_OWNER = -2147413721; -const int CSSM_TP_CERTISSUE_STATUS_UNKNOWN = 0; +const int CSSMERR_DL_INVALID_RECORD_UID = -2147413720; -const int CSSM_TP_CERTISSUE_OK = 1; +const int CSSMERR_DL_INVALID_UNIQUE_INDEX_DATA = -2147413719; -const int CSSM_TP_CERTISSUE_OKWITHCERTMODS = 2; +const int CSSMERR_DL_INVALID_MODIFY_MODE = -2147413718; -const int CSSM_TP_CERTISSUE_OKWITHSERVICEMODS = 3; +const int CSSMERR_DL_INVALID_OPEN_PARAMETERS = -2147413717; -const int CSSM_TP_CERTISSUE_REJECTED = 4; +const int CSSMERR_DL_RECORD_MODIFIED = -2147413716; -const int CSSM_TP_CERTISSUE_NOT_AUTHORIZED = 5; +const int CSSMERR_DL_ENDOFDATA = -2147413715; -const int CSSM_TP_CERTISSUE_WILL_BE_REVOKED = 6; +const int CSSMERR_DL_INVALID_QUERY = -2147413714; -const int CSSM_TP_CERTCHANGE_NONE = 0; +const int CSSMERR_DL_INVALID_VALUE = -2147413713; -const int CSSM_TP_CERTCHANGE_REVOKE = 1; +const int CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTED = -2147413712; -const int CSSM_TP_CERTCHANGE_HOLD = 2; +const int CSSMERR_DL_STALE_UNIQUE_RECORD = -2147413711; -const int CSSM_TP_CERTCHANGE_RELEASE = 3; +const int CSSM_WORDID_KEYCHAIN_PROMPT = 65536; -const int CSSM_TP_CERTCHANGE_REASON_UNKNOWN = 0; +const int CSSM_WORDID_KEYCHAIN_LOCK = 65537; -const int CSSM_TP_CERTCHANGE_REASON_KEYCOMPROMISE = 1; +const int CSSM_WORDID_KEYCHAIN_CHANGE_LOCK = 65538; -const int CSSM_TP_CERTCHANGE_REASON_CACOMPROMISE = 2; +const int CSSM_WORDID_PROCESS = 65539; -const int CSSM_TP_CERTCHANGE_REASON_CEASEOPERATION = 3; +const int CSSM_WORDID__RESERVED_1 = 65540; -const int CSSM_TP_CERTCHANGE_REASON_AFFILIATIONCHANGE = 4; +const int CSSM_WORDID_SYMMETRIC_KEY = 65541; -const int CSSM_TP_CERTCHANGE_REASON_SUPERCEDED = 5; +const int CSSM_WORDID_SYSTEM = 65542; -const int CSSM_TP_CERTCHANGE_REASON_SUSPECTEDCOMPROMISE = 6; +const int CSSM_WORDID_KEY = 65543; -const int CSSM_TP_CERTCHANGE_REASON_HOLDRELEASE = 7; +const int CSSM_WORDID_PIN = 65544; -const int CSSM_TP_CERTCHANGE_STATUS_UNKNOWN = 0; +const int CSSM_WORDID_PREAUTH = 65545; -const int CSSM_TP_CERTCHANGE_OK = 1; +const int CSSM_WORDID_PREAUTH_SOURCE = 65546; -const int CSSM_TP_CERTCHANGE_OKWITHNEWTIME = 2; +const int CSSM_WORDID_ASYMMETRIC_KEY = 65547; -const int CSSM_TP_CERTCHANGE_WRONGCA = 3; +const int CSSM_WORDID_PARTITION = 65548; -const int CSSM_TP_CERTCHANGE_REJECTED = 4; +const int CSSM_WORDID_KEYBAG_KEY = 65549; -const int CSSM_TP_CERTCHANGE_NOT_AUTHORIZED = 5; +const int CSSM_WORDID__FIRST_UNUSED = 65550; -const int CSSM_TP_CERTVERIFY_UNKNOWN = 0; +const int CSSM_ACL_SUBJECT_TYPE_KEYCHAIN_PROMPT = 65536; -const int CSSM_TP_CERTVERIFY_VALID = 1; +const int CSSM_ACL_SUBJECT_TYPE_PROCESS = 65539; -const int CSSM_TP_CERTVERIFY_INVALID = 2; +const int CSSM_ACL_SUBJECT_TYPE_CODE_SIGNATURE = 116; -const int CSSM_TP_CERTVERIFY_REVOKED = 3; +const int CSSM_ACL_SUBJECT_TYPE_COMMENT = 12; -const int CSSM_TP_CERTVERIFY_SUSPENDED = 4; +const int CSSM_ACL_SUBJECT_TYPE_SYMMETRIC_KEY = 65541; -const int CSSM_TP_CERTVERIFY_EXPIRED = 5; +const int CSSM_ACL_SUBJECT_TYPE_PREAUTH = 65545; -const int CSSM_TP_CERTVERIFY_NOT_VALID_YET = 6; +const int CSSM_ACL_SUBJECT_TYPE_PREAUTH_SOURCE = 65546; -const int CSSM_TP_CERTVERIFY_INVALID_AUTHORITY = 7; +const int CSSM_ACL_SUBJECT_TYPE_ASYMMETRIC_KEY = 65547; -const int CSSM_TP_CERTVERIFY_INVALID_SIGNATURE = 8; +const int CSSM_ACL_SUBJECT_TYPE_PARTITION = 65548; -const int CSSM_TP_CERTVERIFY_INVALID_CERT_VALUE = 9; +const int CSSM_SAMPLE_TYPE_KEYCHAIN_PROMPT = 65536; -const int CSSM_TP_CERTVERIFY_INVALID_CERTGROUP = 10; +const int CSSM_SAMPLE_TYPE_KEYCHAIN_LOCK = 65537; -const int CSSM_TP_CERTVERIFY_INVALID_POLICY = 11; +const int CSSM_SAMPLE_TYPE_KEYCHAIN_CHANGE_LOCK = 65538; -const int CSSM_TP_CERTVERIFY_INVALID_POLICY_IDS = 12; +const int CSSM_SAMPLE_TYPE_PROCESS = 65539; -const int CSSM_TP_CERTVERIFY_INVALID_BASIC_CONSTRAINTS = 13; +const int CSSM_SAMPLE_TYPE_COMMENT = 12; -const int CSSM_TP_CERTVERIFY_INVALID_CRL_DIST_PT = 14; +const int CSSM_SAMPLE_TYPE_RETRY_ID = 85; -const int CSSM_TP_CERTVERIFY_INVALID_NAME_TREE = 15; +const int CSSM_SAMPLE_TYPE_SYMMETRIC_KEY = 65541; -const int CSSM_TP_CERTVERIFY_UNKNOWN_CRITICAL_EXT = 16; +const int CSSM_SAMPLE_TYPE_PREAUTH = 65545; -const int CSSM_TP_CERTNOTARIZE_STATUS_UNKNOWN = 0; +const int CSSM_SAMPLE_TYPE_ASYMMETRIC_KEY = 65547; -const int CSSM_TP_CERTNOTARIZE_OK = 1; +const int CSSM_SAMPLE_TYPE_KEYBAG_KEY = 65549; -const int CSSM_TP_CERTNOTARIZE_OKWITHOUTFIELDS = 2; +const int CSSM_ACL_AUTHORIZATION_CHANGE_ACL = 65536; -const int CSSM_TP_CERTNOTARIZE_OKWITHSERVICEMODS = 3; +const int CSSM_ACL_AUTHORIZATION_CHANGE_OWNER = 65537; -const int CSSM_TP_CERTNOTARIZE_REJECTED = 4; +const int CSSM_ACL_AUTHORIZATION_PARTITION_ID = 65538; -const int CSSM_TP_CERTNOTARIZE_NOT_AUTHORIZED = 5; +const int CSSM_ACL_AUTHORIZATION_INTEGRITY = 65539; -const int CSSM_TP_CERTRECLAIM_STATUS_UNKNOWN = 0; +const int CSSM_ACL_AUTHORIZATION_PREAUTH_BASE = 16842752; -const int CSSM_TP_CERTRECLAIM_OK = 1; +const int CSSM_ACL_AUTHORIZATION_PREAUTH_END = 16908288; -const int CSSM_TP_CERTRECLAIM_NOMATCH = 2; +const int CSSM_ACL_CODE_SIGNATURE_INVALID = 0; -const int CSSM_TP_CERTRECLAIM_REJECTED = 3; +const int CSSM_ACL_CODE_SIGNATURE_OSX = 1; -const int CSSM_TP_CERTRECLAIM_NOT_AUTHORIZED = 4; +const int CSSM_ACL_MATCH_UID = 1; -const int CSSM_TP_CRLISSUE_STATUS_UNKNOWN = 0; +const int CSSM_ACL_MATCH_GID = 2; -const int CSSM_TP_CRLISSUE_OK = 1; +const int CSSM_ACL_MATCH_HONOR_ROOT = 256; -const int CSSM_TP_CRLISSUE_NOT_CURRENT = 2; +const int CSSM_ACL_MATCH_BITS = 3; -const int CSSM_TP_CRLISSUE_INVALID_DOMAIN = 3; +const int CSSM_ACL_PROCESS_SELECTOR_CURRENT_VERSION = 257; -const int CSSM_TP_CRLISSUE_UNKNOWN_IDENTIFIER = 4; +const int CSSM_ACL_KEYCHAIN_PROMPT_CURRENT_VERSION = 257; -const int CSSM_TP_CRLISSUE_REJECTED = 5; +const int CSSM_ACL_KEYCHAIN_PROMPT_REQUIRE_PASSPHRASE = 1; -const int CSSM_TP_CRLISSUE_NOT_AUTHORIZED = 6; +const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED = 16; -const int CSSM_TP_FORM_TYPE_GENERIC = 0; +const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED_ACT = 32; -const int CSSM_TP_FORM_TYPE_REGISTRATION = 1; +const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID = 64; -const int CSSM_CL_TEMPLATE_INTERMEDIATE_CERT = 1; +const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID_ACT = 128; -const int CSSM_CL_TEMPLATE_PKIX_CERTTEMPLATE = 2; +const int CSSM_ACL_PREAUTH_TRACKING_COUNT_MASK = 255; -const int CSSM_CERT_BUNDLE_UNKNOWN = 0; +const int CSSM_ACL_PREAUTH_TRACKING_BLOCKED = 0; -const int CSSM_CERT_BUNDLE_CUSTOM = 1; +const int CSSM_ACL_PREAUTH_TRACKING_UNKNOWN = 1073741824; -const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_DATA = 2; +const int CSSM_ACL_PREAUTH_TRACKING_AUTHORIZED = -2147483648; -const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_ENVELOPED_DATA = 3; +const int CSSM_DB_ACCESS_RESET = 65536; -const int CSSM_CERT_BUNDLE_PKCS12 = 4; +const int CSSM_ALGID_APPLE_YARROW = -2147483648; -const int CSSM_CERT_BUNDLE_PFX = 5; +const int CSSM_ALGID_AES = -2147483647; -const int CSSM_CERT_BUNDLE_SPKI_SEQUENCE = 6; +const int CSSM_ALGID_FEE = -2147483646; -const int CSSM_CERT_BUNDLE_PGP_KEYRING = 7; +const int CSSM_ALGID_FEE_MD5 = -2147483645; -const int CSSM_CERT_BUNDLE_LAST = 32767; +const int CSSM_ALGID_FEE_SHA1 = -2147483644; -const int CSSM_CL_CUSTOM_CERT_BUNDLE_TYPE = 32768; +const int CSSM_ALGID_FEED = -2147483643; -const int CSSM_CERT_BUNDLE_ENCODING_UNKNOWN = 0; +const int CSSM_ALGID_FEEDEXP = -2147483642; -const int CSSM_CERT_BUNDLE_ENCODING_CUSTOM = 1; +const int CSSM_ALGID_ASC = -2147483641; -const int CSSM_CERT_BUNDLE_ENCODING_BER = 2; +const int CSSM_ALGID_SHA1HMAC_LEGACY = -2147483640; -const int CSSM_CERT_BUNDLE_ENCODING_DER = 3; +const int CSSM_ALGID_KEYCHAIN_KEY = -2147483639; -const int CSSM_CERT_BUNDLE_ENCODING_SEXPR = 4; +const int CSSM_ALGID_PKCS12_PBE_ENCR = -2147483638; -const int CSSM_CERT_BUNDLE_ENCODING_PGP = 5; +const int CSSM_ALGID_PKCS12_PBE_MAC = -2147483637; -const int CSSM_FIELDVALUE_COMPLEX_DATA_TYPE = -1; +const int CSSM_ALGID_SECURE_PASSPHRASE = -2147483636; -const int CSSM_DB_ATTRIBUTE_NAME_AS_STRING = 0; +const int CSSM_ALGID_PBE_OPENSSL_MD5 = -2147483635; -const int CSSM_DB_ATTRIBUTE_NAME_AS_OID = 1; +const int CSSM_ALGID_SHA256 = -2147483634; -const int CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER = 2; +const int CSSM_ALGID_SHA384 = -2147483633; -const int CSSM_DB_ATTRIBUTE_FORMAT_STRING = 0; +const int CSSM_ALGID_SHA512 = -2147483632; -const int CSSM_DB_ATTRIBUTE_FORMAT_SINT32 = 1; +const int CSSM_ALGID_ENTROPY_DEFAULT = -2147483631; -const int CSSM_DB_ATTRIBUTE_FORMAT_UINT32 = 2; +const int CSSM_ALGID_SHA224 = -2147483630; -const int CSSM_DB_ATTRIBUTE_FORMAT_BIG_NUM = 3; +const int CSSM_ALGID_SHA224WithRSA = -2147483629; -const int CSSM_DB_ATTRIBUTE_FORMAT_REAL = 4; +const int CSSM_ALGID_SHA256WithRSA = -2147483628; -const int CSSM_DB_ATTRIBUTE_FORMAT_TIME_DATE = 5; +const int CSSM_ALGID_SHA384WithRSA = -2147483627; -const int CSSM_DB_ATTRIBUTE_FORMAT_BLOB = 6; +const int CSSM_ALGID_SHA512WithRSA = -2147483626; -const int CSSM_DB_ATTRIBUTE_FORMAT_MULTI_UINT32 = 7; +const int CSSM_ALGID_OPENSSH1 = -2147483625; -const int CSSM_DB_ATTRIBUTE_FORMAT_COMPLEX = 8; +const int CSSM_ALGID_SHA224WithECDSA = -2147483624; -const int CSSM_DB_RECORDTYPE_SCHEMA_START = 0; +const int CSSM_ALGID_SHA256WithECDSA = -2147483623; -const int CSSM_DB_RECORDTYPE_SCHEMA_END = 4; +const int CSSM_ALGID_SHA384WithECDSA = -2147483622; -const int CSSM_DB_RECORDTYPE_OPEN_GROUP_START = 10; +const int CSSM_ALGID_SHA512WithECDSA = -2147483621; -const int CSSM_DB_RECORDTYPE_OPEN_GROUP_END = 18; +const int CSSM_ALGID_ECDSA_SPECIFIED = -2147483620; -const int CSSM_DB_RECORDTYPE_APP_DEFINED_START = -2147483648; +const int CSSM_ALGID_ECDH_X963_KDF = -2147483619; -const int CSSM_DB_RECORDTYPE_APP_DEFINED_END = -1; +const int CSSM_ALGID__FIRST_UNUSED = -2147483618; -const int CSSM_DL_DB_SCHEMA_INFO = 0; +const int CSSM_PADDING_APPLE_SSLv2 = -2147483648; -const int CSSM_DL_DB_SCHEMA_INDEXES = 1; +const int CSSM_KEYBLOB_RAW_FORMAT_VENDOR_DEFINED = -2147483648; -const int CSSM_DL_DB_SCHEMA_ATTRIBUTES = 2; +const int CSSM_KEYBLOB_RAW_FORMAT_X509 = -2147483648; -const int CSSM_DL_DB_SCHEMA_PARSING_MODULE = 3; +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH = -2147483647; -const int CSSM_DL_DB_RECORD_ANY = 10; +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSL = -2147483646; -const int CSSM_DL_DB_RECORD_CERT = 11; +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH2 = -2147483645; -const int CSSM_DL_DB_RECORD_CRL = 12; +const int CSSM_CUSTOM_COMMON_ERROR_EXTENT = 224; -const int CSSM_DL_DB_RECORD_POLICY = 13; +const int CSSM_ERRCODE_NO_USER_INTERACTION = 224; -const int CSSM_DL_DB_RECORD_GENERIC = 14; +const int CSSM_ERRCODE_USER_CANCELED = 225; -const int CSSM_DL_DB_RECORD_PUBLIC_KEY = 15; +const int CSSM_ERRCODE_SERVICE_NOT_AVAILABLE = 226; -const int CSSM_DL_DB_RECORD_PRIVATE_KEY = 16; +const int CSSM_ERRCODE_INSUFFICIENT_CLIENT_IDENTIFICATION = 227; -const int CSSM_DL_DB_RECORD_SYMMETRIC_KEY = 17; +const int CSSM_ERRCODE_DEVICE_RESET = 228; -const int CSSM_DL_DB_RECORD_ALL_KEYS = 18; +const int CSSM_ERRCODE_DEVICE_FAILED = 229; -const int CSSM_DB_CERT_USE_TRUSTED = 1; +const int CSSM_ERRCODE_IN_DARK_WAKE = 230; -const int CSSM_DB_CERT_USE_SYSTEM = 2; +const int CSSMERR_CSSM_NO_USER_INTERACTION = -2147417888; -const int CSSM_DB_CERT_USE_OWNER = 4; +const int CSSMERR_AC_NO_USER_INTERACTION = -2147405600; -const int CSSM_DB_CERT_USE_REVOKED = 8; +const int CSSMERR_CSP_NO_USER_INTERACTION = -2147415840; -const int CSSM_DB_CERT_USE_SIGNING = 16; +const int CSSMERR_CL_NO_USER_INTERACTION = -2147411744; -const int CSSM_DB_CERT_USE_PRIVACY = 32; +const int CSSMERR_DL_NO_USER_INTERACTION = -2147413792; -const int CSSM_DB_INDEX_UNIQUE = 0; +const int CSSMERR_TP_NO_USER_INTERACTION = -2147409696; -const int CSSM_DB_INDEX_NONUNIQUE = 1; +const int CSSMERR_CSSM_USER_CANCELED = -2147417887; -const int CSSM_DB_INDEX_ON_UNKNOWN = 0; +const int CSSMERR_AC_USER_CANCELED = -2147405599; -const int CSSM_DB_INDEX_ON_ATTRIBUTE = 1; +const int CSSMERR_CSP_USER_CANCELED = -2147415839; -const int CSSM_DB_INDEX_ON_RECORD = 2; +const int CSSMERR_CL_USER_CANCELED = -2147411743; -const int CSSM_DB_ACCESS_READ = 1; +const int CSSMERR_DL_USER_CANCELED = -2147413791; -const int CSSM_DB_ACCESS_WRITE = 2; +const int CSSMERR_TP_USER_CANCELED = -2147409695; -const int CSSM_DB_ACCESS_PRIVILEGED = 4; +const int CSSMERR_CSSM_SERVICE_NOT_AVAILABLE = -2147417886; -const int CSSM_DB_MODIFY_ATTRIBUTE_NONE = 0; +const int CSSMERR_AC_SERVICE_NOT_AVAILABLE = -2147405598; -const int CSSM_DB_MODIFY_ATTRIBUTE_ADD = 1; +const int CSSMERR_CSP_SERVICE_NOT_AVAILABLE = -2147415838; -const int CSSM_DB_MODIFY_ATTRIBUTE_DELETE = 2; +const int CSSMERR_CL_SERVICE_NOT_AVAILABLE = -2147411742; -const int CSSM_DB_MODIFY_ATTRIBUTE_REPLACE = 3; +const int CSSMERR_DL_SERVICE_NOT_AVAILABLE = -2147413790; -const int CSSM_DB_EQUAL = 0; +const int CSSMERR_TP_SERVICE_NOT_AVAILABLE = -2147409694; -const int CSSM_DB_NOT_EQUAL = 1; +const int CSSMERR_CSSM_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147417885; -const int CSSM_DB_LESS_THAN = 2; +const int CSSMERR_AC_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147405597; -const int CSSM_DB_GREATER_THAN = 3; +const int CSSMERR_CSP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147415837; -const int CSSM_DB_CONTAINS = 4; +const int CSSMERR_CL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147411741; -const int CSSM_DB_CONTAINS_INITIAL_SUBSTRING = 5; +const int CSSMERR_DL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147413789; -const int CSSM_DB_CONTAINS_FINAL_SUBSTRING = 6; +const int CSSMERR_TP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147409693; -const int CSSM_DB_NONE = 0; +const int CSSMERR_CSSM_DEVICE_RESET = -2147417884; -const int CSSM_DB_AND = 1; +const int CSSMERR_AC_DEVICE_RESET = -2147405596; -const int CSSM_DB_OR = 2; +const int CSSMERR_CSP_DEVICE_RESET = -2147415836; -const int CSSM_QUERY_TIMELIMIT_NONE = 0; +const int CSSMERR_CL_DEVICE_RESET = -2147411740; -const int CSSM_QUERY_SIZELIMIT_NONE = 0; +const int CSSMERR_DL_DEVICE_RESET = -2147413788; -const int CSSM_QUERY_RETURN_DATA = 1; +const int CSSMERR_TP_DEVICE_RESET = -2147409692; -const int CSSM_DL_UNKNOWN = 0; +const int CSSMERR_CSSM_DEVICE_FAILED = -2147417883; -const int CSSM_DL_CUSTOM = 1; +const int CSSMERR_AC_DEVICE_FAILED = -2147405595; -const int CSSM_DL_LDAP = 2; +const int CSSMERR_CSP_DEVICE_FAILED = -2147415835; -const int CSSM_DL_ODBC = 3; +const int CSSMERR_CL_DEVICE_FAILED = -2147411739; -const int CSSM_DL_PKCS11 = 4; +const int CSSMERR_DL_DEVICE_FAILED = -2147413787; -const int CSSM_DL_FFS = 5; +const int CSSMERR_TP_DEVICE_FAILED = -2147409691; -const int CSSM_DL_MEMORY = 6; +const int CSSMERR_CSSM_IN_DARK_WAKE = -2147417882; -const int CSSM_DL_REMOTEDIR = 7; +const int CSSMERR_AC_IN_DARK_WAKE = -2147405594; -const int CSSM_DB_DATASTORES_UNKNOWN = -1; +const int CSSMERR_CSP_IN_DARK_WAKE = -2147415834; -const int CSSM_DB_TRANSACTIONAL_MODE = 0; +const int CSSMERR_CL_IN_DARK_WAKE = -2147411738; -const int CSSM_DB_FILESYSTEMSCAN_MODE = 1; +const int CSSMERR_DL_IN_DARK_WAKE = -2147413786; -const int CSSM_BASE_ERROR = -2147418112; +const int CSSMERR_TP_IN_DARK_WAKE = -2147409690; -const int CSSM_ERRORCODE_MODULE_EXTENT = 2048; +const int CSSMERR_CSP_APPLE_ADD_APPLICATION_ACL_SUBJECT = -2147415040; -const int CSSM_ERRORCODE_CUSTOM_OFFSET = 1024; +const int CSSMERR_CSP_APPLE_PUBLIC_KEY_INCOMPLETE = -2147415039; -const int CSSM_ERRORCODE_COMMON_EXTENT = 256; +const int CSSMERR_CSP_APPLE_SIGNATURE_MISMATCH = -2147415038; -const int CSSM_CSSM_BASE_ERROR = -2147418112; +const int CSSMERR_CSP_APPLE_INVALID_KEY_START_DATE = -2147415037; -const int CSSM_CSSM_PRIVATE_ERROR = -2147417088; +const int CSSMERR_CSP_APPLE_INVALID_KEY_END_DATE = -2147415036; -const int CSSM_CSP_BASE_ERROR = -2147416064; +const int CSSMERR_CSPDL_APPLE_DL_CONVERSION_ERROR = -2147415035; -const int CSSM_CSP_PRIVATE_ERROR = -2147415040; +const int CSSMERR_CSP_APPLE_SSLv2_ROLLBACK = -2147415034; -const int CSSM_DL_BASE_ERROR = -2147414016; +const int CSSM_DL_DB_RECORD_GENERIC_PASSWORD = -2147483648; -const int CSSM_DL_PRIVATE_ERROR = -2147412992; +const int CSSM_DL_DB_RECORD_INTERNET_PASSWORD = -2147483647; -const int CSSM_CL_BASE_ERROR = -2147411968; +const int CSSM_DL_DB_RECORD_APPLESHARE_PASSWORD = -2147483646; -const int CSSM_CL_PRIVATE_ERROR = -2147410944; +const int CSSM_DL_DB_RECORD_X509_CERTIFICATE = -2147479552; -const int CSSM_TP_BASE_ERROR = -2147409920; +const int CSSM_DL_DB_RECORD_USER_TRUST = -2147479551; -const int CSSM_TP_PRIVATE_ERROR = -2147408896; +const int CSSM_DL_DB_RECORD_X509_CRL = -2147479550; -const int CSSM_KR_BASE_ERROR = -2147407872; +const int CSSM_DL_DB_RECORD_UNLOCK_REFERRAL = -2147479549; -const int CSSM_KR_PRIVATE_ERROR = -2147406848; +const int CSSM_DL_DB_RECORD_EXTENDED_ATTRIBUTE = -2147479548; -const int CSSM_AC_BASE_ERROR = -2147405824; +const int CSSM_DL_DB_RECORD_METADATA = -2147450880; -const int CSSM_AC_PRIVATE_ERROR = -2147404800; +const int CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT = 0; -const int CSSM_MDS_BASE_ERROR = -2147414016; +const int CSSM_APPLEFILEDL_COMMIT = 1; -const int CSSM_MDS_PRIVATE_ERROR = -2147412992; +const int CSSM_APPLEFILEDL_ROLLBACK = 2; -const int CSSMERR_CSSM_INVALID_ADDIN_HANDLE = -2147417855; +const int CSSM_APPLEFILEDL_TAKE_FILE_LOCK = 3; -const int CSSMERR_CSSM_NOT_INITIALIZED = -2147417854; +const int CSSM_APPLEFILEDL_MAKE_BACKUP = 4; -const int CSSMERR_CSSM_INVALID_HANDLE_USAGE = -2147417853; +const int CSSM_APPLEFILEDL_MAKE_COPY = 5; -const int CSSMERR_CSSM_PVC_REFERENT_NOT_FOUND = -2147417852; +const int CSSM_APPLEFILEDL_DELETE_FILE = 6; -const int CSSMERR_CSSM_FUNCTION_INTEGRITY_FAIL = -2147417851; +const int CSSM_APPLE_UNLOCK_TYPE_KEY_DIRECT = 1; -const int CSSM_ERRCODE_INTERNAL_ERROR = 1; +const int CSSM_APPLE_UNLOCK_TYPE_WRAPPED_PRIVATE = 2; -const int CSSM_ERRCODE_MEMORY_ERROR = 2; +const int CSSM_APPLE_UNLOCK_TYPE_KEYBAG = 3; -const int CSSM_ERRCODE_MDS_ERROR = 3; +const int CSSMERR_APPLEDL_INVALID_OPEN_PARAMETERS = -2147412992; -const int CSSM_ERRCODE_INVALID_POINTER = 4; +const int CSSMERR_APPLEDL_DISK_FULL = -2147412991; -const int CSSM_ERRCODE_INVALID_INPUT_POINTER = 5; +const int CSSMERR_APPLEDL_QUOTA_EXCEEDED = -2147412990; -const int CSSM_ERRCODE_INVALID_OUTPUT_POINTER = 6; +const int CSSMERR_APPLEDL_FILE_TOO_BIG = -2147412989; -const int CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED = 7; +const int CSSMERR_APPLEDL_INVALID_DATABASE_BLOB = -2147412988; -const int CSSM_ERRCODE_SELF_CHECK_FAILED = 8; +const int CSSMERR_APPLEDL_INVALID_KEY_BLOB = -2147412987; -const int CSSM_ERRCODE_OS_ACCESS_DENIED = 9; +const int CSSMERR_APPLEDL_INCOMPATIBLE_DATABASE_BLOB = -2147412986; -const int CSSM_ERRCODE_FUNCTION_FAILED = 10; +const int CSSMERR_APPLEDL_INCOMPATIBLE_KEY_BLOB = -2147412985; -const int CSSM_ERRCODE_MODULE_MANIFEST_VERIFY_FAILED = 11; +const int CSSMERR_APPLETP_HOSTNAME_MISMATCH = -2147408896; -const int CSSM_ERRCODE_INVALID_GUID = 12; +const int CSSMERR_APPLETP_UNKNOWN_CRITICAL_EXTEN = -2147408895; -const int CSSM_ERRCODE_OPERATION_AUTH_DENIED = 32; +const int CSSMERR_APPLETP_NO_BASIC_CONSTRAINTS = -2147408894; -const int CSSM_ERRCODE_OBJECT_USE_AUTH_DENIED = 33; +const int CSSMERR_APPLETP_INVALID_CA = -2147408893; -const int CSSM_ERRCODE_OBJECT_MANIP_AUTH_DENIED = 34; +const int CSSMERR_APPLETP_INVALID_AUTHORITY_ID = -2147408892; -const int CSSM_ERRCODE_OBJECT_ACL_NOT_SUPPORTED = 35; +const int CSSMERR_APPLETP_INVALID_SUBJECT_ID = -2147408891; -const int CSSM_ERRCODE_OBJECT_ACL_REQUIRED = 36; +const int CSSMERR_APPLETP_INVALID_KEY_USAGE = -2147408890; -const int CSSM_ERRCODE_INVALID_ACCESS_CREDENTIALS = 37; +const int CSSMERR_APPLETP_INVALID_EXTENDED_KEY_USAGE = -2147408889; -const int CSSM_ERRCODE_INVALID_ACL_BASE_CERTS = 38; +const int CSSMERR_APPLETP_INVALID_ID_LINKAGE = -2147408888; -const int CSSM_ERRCODE_ACL_BASE_CERTS_NOT_SUPPORTED = 39; +const int CSSMERR_APPLETP_PATH_LEN_CONSTRAINT = -2147408887; -const int CSSM_ERRCODE_INVALID_SAMPLE_VALUE = 40; +const int CSSMERR_APPLETP_INVALID_ROOT = -2147408886; -const int CSSM_ERRCODE_SAMPLE_VALUE_NOT_SUPPORTED = 41; +const int CSSMERR_APPLETP_CRL_EXPIRED = -2147408885; -const int CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE = 42; +const int CSSMERR_APPLETP_CRL_NOT_VALID_YET = -2147408884; -const int CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED = 43; +const int CSSMERR_APPLETP_CRL_NOT_FOUND = -2147408883; -const int CSSM_ERRCODE_INVALID_ACL_CHALLENGE_CALLBACK = 44; +const int CSSMERR_APPLETP_CRL_SERVER_DOWN = -2147408882; -const int CSSM_ERRCODE_ACL_CHALLENGE_CALLBACK_FAILED = 45; +const int CSSMERR_APPLETP_CRL_BAD_URI = -2147408881; -const int CSSM_ERRCODE_INVALID_ACL_ENTRY_TAG = 46; +const int CSSMERR_APPLETP_UNKNOWN_CERT_EXTEN = -2147408880; -const int CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND = 47; +const int CSSMERR_APPLETP_UNKNOWN_CRL_EXTEN = -2147408879; -const int CSSM_ERRCODE_INVALID_ACL_EDIT_MODE = 48; +const int CSSMERR_APPLETP_CRL_NOT_TRUSTED = -2147408878; -const int CSSM_ERRCODE_ACL_CHANGE_FAILED = 49; +const int CSSMERR_APPLETP_CRL_INVALID_ANCHOR_CERT = -2147408877; -const int CSSM_ERRCODE_INVALID_NEW_ACL_ENTRY = 50; +const int CSSMERR_APPLETP_CRL_POLICY_FAIL = -2147408876; -const int CSSM_ERRCODE_INVALID_NEW_ACL_OWNER = 51; +const int CSSMERR_APPLETP_IDP_FAIL = -2147408875; -const int CSSM_ERRCODE_ACL_DELETE_FAILED = 52; +const int CSSMERR_APPLETP_CERT_NOT_FOUND_FROM_ISSUER = -2147408874; -const int CSSM_ERRCODE_ACL_REPLACE_FAILED = 53; +const int CSSMERR_APPLETP_BAD_CERT_FROM_ISSUER = -2147408873; -const int CSSM_ERRCODE_ACL_ADD_FAILED = 54; +const int CSSMERR_APPLETP_SMIME_EMAIL_ADDRS_NOT_FOUND = -2147408872; -const int CSSM_ERRCODE_INVALID_CONTEXT_HANDLE = 64; +const int CSSMERR_APPLETP_SMIME_BAD_EXT_KEY_USE = -2147408871; -const int CSSM_ERRCODE_INCOMPATIBLE_VERSION = 65; +const int CSSMERR_APPLETP_SMIME_BAD_KEY_USE = -2147408870; -const int CSSM_ERRCODE_INVALID_CERTGROUP_POINTER = 66; +const int CSSMERR_APPLETP_SMIME_KEYUSAGE_NOT_CRITICAL = -2147408869; -const int CSSM_ERRCODE_INVALID_CERT_POINTER = 67; +const int CSSMERR_APPLETP_SMIME_NO_EMAIL_ADDRS = -2147408868; -const int CSSM_ERRCODE_INVALID_CRL_POINTER = 68; +const int CSSMERR_APPLETP_SMIME_SUBJ_ALT_NAME_NOT_CRIT = -2147408867; -const int CSSM_ERRCODE_INVALID_FIELD_POINTER = 69; +const int CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE = -2147408866; -const int CSSM_ERRCODE_INVALID_DATA = 70; +const int CSSMERR_APPLETP_OCSP_BAD_RESPONSE = -2147408865; -const int CSSM_ERRCODE_CRL_ALREADY_SIGNED = 71; +const int CSSMERR_APPLETP_OCSP_BAD_REQUEST = -2147408864; -const int CSSM_ERRCODE_INVALID_NUMBER_OF_FIELDS = 72; +const int CSSMERR_APPLETP_OCSP_UNAVAILABLE = -2147408863; -const int CSSM_ERRCODE_VERIFICATION_FAILURE = 73; +const int CSSMERR_APPLETP_OCSP_STATUS_UNRECOGNIZED = -2147408862; -const int CSSM_ERRCODE_INVALID_DB_HANDLE = 74; +const int CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK = -2147408861; -const int CSSM_ERRCODE_PRIVILEGE_NOT_GRANTED = 75; +const int CSSMERR_APPLETP_NETWORK_FAILURE = -2147408860; -const int CSSM_ERRCODE_INVALID_DB_LIST = 76; +const int CSSMERR_APPLETP_OCSP_NOT_TRUSTED = -2147408859; -const int CSSM_ERRCODE_INVALID_DB_LIST_POINTER = 77; +const int CSSMERR_APPLETP_OCSP_INVALID_ANCHOR_CERT = -2147408858; -const int CSSM_ERRCODE_UNKNOWN_FORMAT = 78; +const int CSSMERR_APPLETP_OCSP_SIG_ERROR = -2147408857; -const int CSSM_ERRCODE_UNKNOWN_TAG = 79; +const int CSSMERR_APPLETP_OCSP_NO_SIGNER = -2147408856; -const int CSSM_ERRCODE_INVALID_CSP_HANDLE = 80; +const int CSSMERR_APPLETP_OCSP_RESP_MALFORMED_REQ = -2147408855; -const int CSSM_ERRCODE_INVALID_DL_HANDLE = 81; +const int CSSMERR_APPLETP_OCSP_RESP_INTERNAL_ERR = -2147408854; -const int CSSM_ERRCODE_INVALID_CL_HANDLE = 82; +const int CSSMERR_APPLETP_OCSP_RESP_TRY_LATER = -2147408853; -const int CSSM_ERRCODE_INVALID_TP_HANDLE = 83; +const int CSSMERR_APPLETP_OCSP_RESP_SIG_REQUIRED = -2147408852; -const int CSSM_ERRCODE_INVALID_KR_HANDLE = 84; +const int CSSMERR_APPLETP_OCSP_RESP_UNAUTHORIZED = -2147408851; -const int CSSM_ERRCODE_INVALID_AC_HANDLE = 85; +const int CSSMERR_APPLETP_OCSP_NONCE_MISMATCH = -2147408850; -const int CSSM_ERRCODE_INVALID_PASSTHROUGH_ID = 86; +const int CSSMERR_APPLETP_CS_BAD_CERT_CHAIN_LENGTH = -2147408849; -const int CSSM_ERRCODE_INVALID_NETWORK_ADDR = 87; +const int CSSMERR_APPLETP_CS_NO_BASIC_CONSTRAINTS = -2147408848; -const int CSSM_ERRCODE_INVALID_CRYPTO_DATA = 88; +const int CSSMERR_APPLETP_CS_BAD_PATH_LENGTH = -2147408847; -const int CSSMERR_CSSM_INTERNAL_ERROR = -2147418111; +const int CSSMERR_APPLETP_CS_NO_EXTENDED_KEY_USAGE = -2147408846; -const int CSSMERR_CSSM_MEMORY_ERROR = -2147418110; +const int CSSMERR_APPLETP_CODE_SIGN_DEVELOPMENT = -2147408845; -const int CSSMERR_CSSM_MDS_ERROR = -2147418109; +const int CSSMERR_APPLETP_RS_BAD_CERT_CHAIN_LENGTH = -2147408844; -const int CSSMERR_CSSM_INVALID_POINTER = -2147418108; +const int CSSMERR_APPLETP_RS_BAD_EXTENDED_KEY_USAGE = -2147408843; -const int CSSMERR_CSSM_INVALID_INPUT_POINTER = -2147418107; +const int CSSMERR_APPLETP_TRUST_SETTING_DENY = -2147408842; -const int CSSMERR_CSSM_INVALID_OUTPUT_POINTER = -2147418106; +const int CSSMERR_APPLETP_INVALID_EMPTY_SUBJECT = -2147408841; -const int CSSMERR_CSSM_FUNCTION_NOT_IMPLEMENTED = -2147418105; +const int CSSMERR_APPLETP_UNKNOWN_QUAL_CERT_STATEMENT = -2147408840; -const int CSSMERR_CSSM_SELF_CHECK_FAILED = -2147418104; +const int CSSMERR_APPLETP_MISSING_REQUIRED_EXTENSION = -2147408839; -const int CSSMERR_CSSM_OS_ACCESS_DENIED = -2147418103; +const int CSSMERR_APPLETP_EXT_KEYUSAGE_NOT_CRITICAL = -2147408838; -const int CSSMERR_CSSM_FUNCTION_FAILED = -2147418102; +const int CSSMERR_APPLETP_IDENTIFIER_MISSING = -2147408837; -const int CSSMERR_CSSM_MODULE_MANIFEST_VERIFY_FAILED = -2147418101; +const int CSSMERR_APPLETP_CA_PIN_MISMATCH = -2147408836; -const int CSSMERR_CSSM_INVALID_GUID = -2147418100; +const int CSSMERR_APPLETP_LEAF_PIN_MISMATCH = -2147408835; -const int CSSMERR_CSSM_INVALID_CONTEXT_HANDLE = -2147418048; +const int CSSMERR_APPLE_DOTMAC_REQ_QUEUED = -2147408796; -const int CSSMERR_CSSM_INCOMPATIBLE_VERSION = -2147418047; +const int CSSMERR_APPLE_DOTMAC_REQ_REDIRECT = -2147408795; -const int CSSMERR_CSSM_PRIVILEGE_NOT_GRANTED = -2147418037; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ERR = -2147408794; -const int CSSM_CSSM_BASE_CSSM_ERROR = -2147417840; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_PARAM = -2147408793; -const int CSSMERR_CSSM_SCOPE_NOT_SUPPORTED = -2147417839; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_AUTH = -2147408792; -const int CSSMERR_CSSM_PVC_ALREADY_CONFIGURED = -2147417838; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_UNIMPL = -2147408791; -const int CSSMERR_CSSM_INVALID_PVC = -2147417837; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_NOT_AVAIL = -2147408790; -const int CSSMERR_CSSM_EMM_LOAD_FAILED = -2147417836; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ALREADY_EXIST = -2147408789; -const int CSSMERR_CSSM_EMM_UNLOAD_FAILED = -2147417835; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_SERVICE_ERROR = -2147408788; -const int CSSMERR_CSSM_ADDIN_LOAD_FAILED = -2147417834; +const int CSSMERR_APPLE_DOTMAC_REQ_IS_PENDING = -2147408787; -const int CSSMERR_CSSM_INVALID_KEY_HIERARCHY = -2147417833; +const int CSSMERR_APPLE_DOTMAC_NO_REQ_PENDING = -2147408786; -const int CSSMERR_CSSM_ADDIN_UNLOAD_FAILED = -2147417832; +const int CSSMERR_APPLE_DOTMAC_CSR_VERIFY_FAIL = -2147408785; -const int CSSMERR_CSSM_LIB_REF_NOT_FOUND = -2147417831; +const int CSSMERR_APPLE_DOTMAC_FAILED_CONSISTENCY_CHECK = -2147408784; -const int CSSMERR_CSSM_INVALID_ADDIN_FUNCTION_TABLE = -2147417830; +const int CSSM_APPLEDL_OPEN_PARAMETERS_VERSION = 1; -const int CSSMERR_CSSM_EMM_AUTHENTICATE_FAILED = -2147417829; +const int CSSM_APPLECSPDL_DB_LOCK = 0; -const int CSSMERR_CSSM_ADDIN_AUTHENTICATE_FAILED = -2147417828; +const int CSSM_APPLECSPDL_DB_UNLOCK = 1; -const int CSSMERR_CSSM_INVALID_SERVICE_MASK = -2147417827; +const int CSSM_APPLECSPDL_DB_GET_SETTINGS = 2; -const int CSSMERR_CSSM_MODULE_NOT_LOADED = -2147417826; +const int CSSM_APPLECSPDL_DB_SET_SETTINGS = 3; -const int CSSMERR_CSSM_INVALID_SUBSERVICEID = -2147417825; +const int CSSM_APPLECSPDL_DB_IS_LOCKED = 4; -const int CSSMERR_CSSM_BUFFER_TOO_SMALL = -2147417824; +const int CSSM_APPLECSPDL_DB_CHANGE_PASSWORD = 5; -const int CSSMERR_CSSM_INVALID_ATTRIBUTE = -2147417823; +const int CSSM_APPLECSPDL_DB_GET_HANDLE = 6; -const int CSSMERR_CSSM_ATTRIBUTE_NOT_IN_CONTEXT = -2147417822; +const int CSSM_APPLESCPDL_CSP_GET_KEYHANDLE = 7; -const int CSSMERR_CSSM_MODULE_MANAGER_INITIALIZE_FAIL = -2147417821; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_8 = 8; -const int CSSMERR_CSSM_MODULE_MANAGER_NOT_FOUND = -2147417820; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_9 = 9; -const int CSSMERR_CSSM_EVENT_NOTIFICATION_CALLBACK_NOT_FOUND = -2147417819; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_10 = 10; -const int CSSMERR_CSP_INTERNAL_ERROR = -2147416063; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_11 = 11; -const int CSSMERR_CSP_MEMORY_ERROR = -2147416062; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_12 = 12; -const int CSSMERR_CSP_MDS_ERROR = -2147416061; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_13 = 13; -const int CSSMERR_CSP_INVALID_POINTER = -2147416060; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_14 = 14; -const int CSSMERR_CSP_INVALID_INPUT_POINTER = -2147416059; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_15 = 15; -const int CSSMERR_CSP_INVALID_OUTPUT_POINTER = -2147416058; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_16 = 16; -const int CSSMERR_CSP_FUNCTION_NOT_IMPLEMENTED = -2147416057; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_17 = 17; -const int CSSMERR_CSP_SELF_CHECK_FAILED = -2147416056; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_18 = 18; -const int CSSMERR_CSP_OS_ACCESS_DENIED = -2147416055; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_19 = 19; -const int CSSMERR_CSP_FUNCTION_FAILED = -2147416054; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_20 = 20; -const int CSSMERR_CSP_OPERATION_AUTH_DENIED = -2147416032; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_21 = 21; -const int CSSMERR_CSP_OBJECT_USE_AUTH_DENIED = -2147416031; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_22 = 22; -const int CSSMERR_CSP_OBJECT_MANIP_AUTH_DENIED = -2147416030; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_23 = 23; -const int CSSMERR_CSP_OBJECT_ACL_NOT_SUPPORTED = -2147416029; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_24 = 24; -const int CSSMERR_CSP_OBJECT_ACL_REQUIRED = -2147416028; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_25 = 25; -const int CSSMERR_CSP_INVALID_ACCESS_CREDENTIALS = -2147416027; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_26 = 26; -const int CSSMERR_CSP_INVALID_ACL_BASE_CERTS = -2147416026; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_27 = 27; -const int CSSMERR_CSP_ACL_BASE_CERTS_NOT_SUPPORTED = -2147416025; +const int CSSM_APPLECSP_KEYDIGEST = 256; -const int CSSMERR_CSP_INVALID_SAMPLE_VALUE = -2147416024; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_APPLE_CUSTOM = 100; -const int CSSMERR_CSP_SAMPLE_VALUE_NOT_SUPPORTED = -2147416023; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSL = 101; -const int CSSMERR_CSP_INVALID_ACL_SUBJECT_VALUE = -2147416022; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSH1 = 102; -const int CSSMERR_CSP_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147416021; +const int CSSM_ATTRIBUTE_VENDOR_DEFINED = 8388608; -const int CSSMERR_CSP_INVALID_ACL_CHALLENGE_CALLBACK = -2147416020; +const int CSSM_ATTRIBUTE_PUBLIC_KEY = 1082130432; -const int CSSMERR_CSP_ACL_CHALLENGE_CALLBACK_FAILED = -2147416019; +const int CSSM_ATTRIBUTE_FEE_PRIME_TYPE = 276824065; -const int CSSMERR_CSP_INVALID_ACL_ENTRY_TAG = -2147416018; +const int CSSM_ATTRIBUTE_FEE_CURVE_TYPE = 276824066; -const int CSSMERR_CSP_ACL_ENTRY_TAG_NOT_FOUND = -2147416017; +const int CSSM_ATTRIBUTE_ASC_OPTIMIZATION = 276824067; -const int CSSMERR_CSP_INVALID_ACL_EDIT_MODE = -2147416016; +const int CSSM_ATTRIBUTE_RSA_BLINDING = 276824068; -const int CSSMERR_CSP_ACL_CHANGE_FAILED = -2147416015; +const int CSSM_ATTRIBUTE_PARAM_KEY = 1082130437; -const int CSSMERR_CSP_INVALID_NEW_ACL_ENTRY = -2147416014; +const int CSSM_ATTRIBUTE_PROMPT = 545259526; -const int CSSMERR_CSP_INVALID_NEW_ACL_OWNER = -2147416013; +const int CSSM_ATTRIBUTE_ALERT_TITLE = 545259527; -const int CSSMERR_CSP_ACL_DELETE_FAILED = -2147416012; +const int CSSM_ATTRIBUTE_VERIFY_PASSPHRASE = 276824072; -const int CSSMERR_CSP_ACL_REPLACE_FAILED = -2147416011; +const int CSSM_FEE_PRIME_TYPE_DEFAULT = 0; -const int CSSMERR_CSP_ACL_ADD_FAILED = -2147416010; +const int CSSM_FEE_PRIME_TYPE_MERSENNE = 1; -const int CSSMERR_CSP_INVALID_CONTEXT_HANDLE = -2147416000; +const int CSSM_FEE_PRIME_TYPE_FEE = 2; -const int CSSMERR_CSP_PRIVILEGE_NOT_GRANTED = -2147415989; +const int CSSM_FEE_PRIME_TYPE_GENERAL = 3; -const int CSSMERR_CSP_INVALID_DATA = -2147415994; +const int CSSM_FEE_CURVE_TYPE_DEFAULT = 0; -const int CSSMERR_CSP_INVALID_PASSTHROUGH_ID = -2147415978; +const int CSSM_FEE_CURVE_TYPE_MONTGOMERY = 1; -const int CSSMERR_CSP_INVALID_CRYPTO_DATA = -2147415976; +const int CSSM_FEE_CURVE_TYPE_WEIERSTRASS = 2; -const int CSSM_CSP_BASE_CSP_ERROR = -2147415808; +const int CSSM_FEE_CURVE_TYPE_ANSI_X9_62 = 3; -const int CSSMERR_CSP_INPUT_LENGTH_ERROR = -2147415807; +const int CSSM_ASC_OPTIMIZE_DEFAULT = 0; -const int CSSMERR_CSP_OUTPUT_LENGTH_ERROR = -2147415806; +const int CSSM_ASC_OPTIMIZE_SIZE = 1; -const int CSSMERR_CSP_PRIVILEGE_NOT_SUPPORTED = -2147415805; +const int CSSM_ASC_OPTIMIZE_SECURITY = 2; -const int CSSMERR_CSP_DEVICE_ERROR = -2147415804; +const int CSSM_ASC_OPTIMIZE_TIME = 3; -const int CSSMERR_CSP_DEVICE_MEMORY_ERROR = -2147415803; +const int CSSM_ASC_OPTIMIZE_TIME_SIZE = 4; -const int CSSMERR_CSP_ATTACH_HANDLE_BUSY = -2147415802; +const int CSSM_ASC_OPTIMIZE_ASCII = 5; -const int CSSMERR_CSP_NOT_LOGGED_IN = -2147415801; +const int CSSM_KEYATTR_PARTIAL = 65536; -const int CSSMERR_CSP_INVALID_KEY = -2147415792; +const int CSSM_KEYATTR_PUBLIC_KEY_ENCRYPT = 131072; -const int CSSMERR_CSP_INVALID_KEY_REFERENCE = -2147415791; +const int CSSM_TP_ACTION_REQUIRE_CRL_PER_CERT = 1; -const int CSSMERR_CSP_INVALID_KEY_CLASS = -2147415790; +const int CSSM_TP_ACTION_FETCH_CRL_FROM_NET = 2; -const int CSSMERR_CSP_ALGID_MISMATCH = -2147415789; +const int CSSM_TP_ACTION_CRL_SUFFICIENT = 4; -const int CSSMERR_CSP_KEY_USAGE_INCORRECT = -2147415788; +const int CSSM_TP_ACTION_REQUIRE_CRL_IF_PRESENT = 8; -const int CSSMERR_CSP_KEY_BLOB_TYPE_INCORRECT = -2147415787; +const int CSSM_TP_ACTION_ALLOW_EXPIRED = 1; -const int CSSMERR_CSP_KEY_HEADER_INCONSISTENT = -2147415786; +const int CSSM_TP_ACTION_LEAF_IS_CA = 2; -const int CSSMERR_CSP_UNSUPPORTED_KEY_FORMAT = -2147415785; +const int CSSM_TP_ACTION_FETCH_CERT_FROM_NET = 4; -const int CSSMERR_CSP_UNSUPPORTED_KEY_SIZE = -2147415784; +const int CSSM_TP_ACTION_ALLOW_EXPIRED_ROOT = 8; -const int CSSMERR_CSP_INVALID_KEY_POINTER = -2147415783; +const int CSSM_TP_ACTION_REQUIRE_REV_PER_CERT = 16; -const int CSSMERR_CSP_INVALID_KEYUSAGE_MASK = -2147415782; +const int CSSM_TP_ACTION_TRUST_SETTINGS = 32; -const int CSSMERR_CSP_UNSUPPORTED_KEYUSAGE_MASK = -2147415781; +const int CSSM_TP_ACTION_IMPLICIT_ANCHORS = 64; -const int CSSMERR_CSP_INVALID_KEYATTR_MASK = -2147415780; +const int CSSM_CERT_STATUS_EXPIRED = 1; -const int CSSMERR_CSP_UNSUPPORTED_KEYATTR_MASK = -2147415779; +const int CSSM_CERT_STATUS_NOT_VALID_YET = 2; -const int CSSMERR_CSP_INVALID_KEY_LABEL = -2147415778; +const int CSSM_CERT_STATUS_IS_IN_INPUT_CERTS = 4; -const int CSSMERR_CSP_UNSUPPORTED_KEY_LABEL = -2147415777; +const int CSSM_CERT_STATUS_IS_IN_ANCHORS = 8; -const int CSSMERR_CSP_INVALID_KEY_FORMAT = -2147415776; +const int CSSM_CERT_STATUS_IS_ROOT = 16; -const int CSSMERR_CSP_INVALID_DATA_COUNT = -2147415768; +const int CSSM_CERT_STATUS_IS_FROM_NET = 32; -const int CSSMERR_CSP_VECTOR_OF_BUFS_UNSUPPORTED = -2147415767; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_USER = 64; -const int CSSMERR_CSP_INVALID_INPUT_VECTOR = -2147415766; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_ADMIN = 128; -const int CSSMERR_CSP_INVALID_OUTPUT_VECTOR = -2147415765; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_SYSTEM = 256; -const int CSSMERR_CSP_INVALID_CONTEXT = -2147415760; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_TRUST = 512; -const int CSSMERR_CSP_INVALID_ALGORITHM = -2147415759; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_DENY = 1024; -const int CSSMERR_CSP_INVALID_ATTR_KEY = -2147415754; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_IGNORED_ERROR = 2048; -const int CSSMERR_CSP_MISSING_ATTR_KEY = -2147415753; +const int CSSM_EVIDENCE_FORM_APPLE_HEADER = -2147483648; -const int CSSMERR_CSP_INVALID_ATTR_INIT_VECTOR = -2147415752; +const int CSSM_EVIDENCE_FORM_APPLE_CERTGROUP = -2147483647; -const int CSSMERR_CSP_MISSING_ATTR_INIT_VECTOR = -2147415751; +const int CSSM_EVIDENCE_FORM_APPLE_CERT_INFO = -2147483646; -const int CSSMERR_CSP_INVALID_ATTR_SALT = -2147415750; +const int CSSM_APPLEX509CL_OBTAIN_CSR = 0; -const int CSSMERR_CSP_MISSING_ATTR_SALT = -2147415749; +const int CSSM_APPLEX509CL_VERIFY_CSR = 1; -const int CSSMERR_CSP_INVALID_ATTR_PADDING = -2147415748; +const int kSecSubjectItemAttr = 1937072746; -const int CSSMERR_CSP_MISSING_ATTR_PADDING = -2147415747; +const int kSecIssuerItemAttr = 1769173877; -const int CSSMERR_CSP_INVALID_ATTR_RANDOM = -2147415746; +const int kSecSerialNumberItemAttr = 1936614002; -const int CSSMERR_CSP_MISSING_ATTR_RANDOM = -2147415745; +const int kSecPublicKeyHashItemAttr = 1752198009; -const int CSSMERR_CSP_INVALID_ATTR_SEED = -2147415744; +const int kSecSubjectKeyIdentifierItemAttr = 1936419172; -const int CSSMERR_CSP_MISSING_ATTR_SEED = -2147415743; +const int kSecCertTypeItemAttr = 1668577648; -const int CSSMERR_CSP_INVALID_ATTR_PASSPHRASE = -2147415742; +const int kSecCertEncodingItemAttr = 1667591779; -const int CSSMERR_CSP_MISSING_ATTR_PASSPHRASE = -2147415741; +const int SSL_NULL_WITH_NULL_NULL = 0; -const int CSSMERR_CSP_INVALID_ATTR_KEY_LENGTH = -2147415740; +const int SSL_RSA_WITH_NULL_MD5 = 1; -const int CSSMERR_CSP_MISSING_ATTR_KEY_LENGTH = -2147415739; +const int SSL_RSA_WITH_NULL_SHA = 2; -const int CSSMERR_CSP_INVALID_ATTR_BLOCK_SIZE = -2147415738; +const int SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3; -const int CSSMERR_CSP_MISSING_ATTR_BLOCK_SIZE = -2147415737; +const int SSL_RSA_WITH_RC4_128_MD5 = 4; -const int CSSMERR_CSP_INVALID_ATTR_OUTPUT_SIZE = -2147415708; +const int SSL_RSA_WITH_RC4_128_SHA = 5; -const int CSSMERR_CSP_MISSING_ATTR_OUTPUT_SIZE = -2147415707; +const int SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6; -const int CSSMERR_CSP_INVALID_ATTR_ROUNDS = -2147415706; +const int SSL_RSA_WITH_IDEA_CBC_SHA = 7; -const int CSSMERR_CSP_MISSING_ATTR_ROUNDS = -2147415705; +const int SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8; -const int CSSMERR_CSP_INVALID_ATTR_ALG_PARAMS = -2147415704; +const int SSL_RSA_WITH_DES_CBC_SHA = 9; -const int CSSMERR_CSP_MISSING_ATTR_ALG_PARAMS = -2147415703; +const int SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10; -const int CSSMERR_CSP_INVALID_ATTR_LABEL = -2147415702; +const int SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11; -const int CSSMERR_CSP_MISSING_ATTR_LABEL = -2147415701; +const int SSL_DH_DSS_WITH_DES_CBC_SHA = 12; -const int CSSMERR_CSP_INVALID_ATTR_KEY_TYPE = -2147415700; +const int SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; -const int CSSMERR_CSP_MISSING_ATTR_KEY_TYPE = -2147415699; +const int SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14; -const int CSSMERR_CSP_INVALID_ATTR_MODE = -2147415698; +const int SSL_DH_RSA_WITH_DES_CBC_SHA = 15; -const int CSSMERR_CSP_MISSING_ATTR_MODE = -2147415697; +const int SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; -const int CSSMERR_CSP_INVALID_ATTR_EFFECTIVE_BITS = -2147415696; +const int SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17; -const int CSSMERR_CSP_MISSING_ATTR_EFFECTIVE_BITS = -2147415695; +const int SSL_DHE_DSS_WITH_DES_CBC_SHA = 18; -const int CSSMERR_CSP_INVALID_ATTR_START_DATE = -2147415694; +const int SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; -const int CSSMERR_CSP_MISSING_ATTR_START_DATE = -2147415693; +const int SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20; -const int CSSMERR_CSP_INVALID_ATTR_END_DATE = -2147415692; +const int SSL_DHE_RSA_WITH_DES_CBC_SHA = 21; -const int CSSMERR_CSP_MISSING_ATTR_END_DATE = -2147415691; +const int SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; -const int CSSMERR_CSP_INVALID_ATTR_VERSION = -2147415690; +const int SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23; -const int CSSMERR_CSP_MISSING_ATTR_VERSION = -2147415689; +const int SSL_DH_anon_WITH_RC4_128_MD5 = 24; -const int CSSMERR_CSP_INVALID_ATTR_PRIME = -2147415688; +const int SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25; -const int CSSMERR_CSP_MISSING_ATTR_PRIME = -2147415687; +const int SSL_DH_anon_WITH_DES_CBC_SHA = 26; -const int CSSMERR_CSP_INVALID_ATTR_BASE = -2147415686; +const int SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; -const int CSSMERR_CSP_MISSING_ATTR_BASE = -2147415685; +const int SSL_FORTEZZA_DMS_WITH_NULL_SHA = 28; -const int CSSMERR_CSP_INVALID_ATTR_SUBPRIME = -2147415684; +const int SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = 29; -const int CSSMERR_CSP_MISSING_ATTR_SUBPRIME = -2147415683; +const int TLS_RSA_WITH_AES_128_CBC_SHA = 47; -const int CSSMERR_CSP_INVALID_ATTR_ITERATION_COUNT = -2147415682; +const int TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48; -const int CSSMERR_CSP_MISSING_ATTR_ITERATION_COUNT = -2147415681; +const int TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49; -const int CSSMERR_CSP_INVALID_ATTR_DL_DB_HANDLE = -2147415680; +const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50; -const int CSSMERR_CSP_MISSING_ATTR_DL_DB_HANDLE = -2147415679; +const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51; -const int CSSMERR_CSP_INVALID_ATTR_ACCESS_CREDENTIALS = -2147415678; +const int TLS_DH_anon_WITH_AES_128_CBC_SHA = 52; -const int CSSMERR_CSP_MISSING_ATTR_ACCESS_CREDENTIALS = -2147415677; +const int TLS_RSA_WITH_AES_256_CBC_SHA = 53; -const int CSSMERR_CSP_INVALID_ATTR_PUBLIC_KEY_FORMAT = -2147415676; +const int TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54; -const int CSSMERR_CSP_MISSING_ATTR_PUBLIC_KEY_FORMAT = -2147415675; +const int TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55; -const int CSSMERR_CSP_INVALID_ATTR_PRIVATE_KEY_FORMAT = -2147415674; +const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56; -const int CSSMERR_CSP_MISSING_ATTR_PRIVATE_KEY_FORMAT = -2147415673; +const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57; -const int CSSMERR_CSP_INVALID_ATTR_SYMMETRIC_KEY_FORMAT = -2147415672; +const int TLS_DH_anon_WITH_AES_256_CBC_SHA = 58; -const int CSSMERR_CSP_MISSING_ATTR_SYMMETRIC_KEY_FORMAT = -2147415671; +const int TLS_ECDH_ECDSA_WITH_NULL_SHA = -16383; -const int CSSMERR_CSP_INVALID_ATTR_WRAPPED_KEY_FORMAT = -2147415670; +const int TLS_ECDH_ECDSA_WITH_RC4_128_SHA = -16382; -const int CSSMERR_CSP_MISSING_ATTR_WRAPPED_KEY_FORMAT = -2147415669; +const int TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = -16381; -const int CSSMERR_CSP_STAGED_OPERATION_IN_PROGRESS = -2147415736; +const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = -16380; -const int CSSMERR_CSP_STAGED_OPERATION_NOT_STARTED = -2147415735; +const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = -16379; -const int CSSMERR_CSP_VERIFY_FAILED = -2147415734; +const int TLS_ECDHE_ECDSA_WITH_NULL_SHA = -16378; -const int CSSMERR_CSP_INVALID_SIGNATURE = -2147415733; +const int TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = -16377; -const int CSSMERR_CSP_QUERY_SIZE_UNKNOWN = -2147415732; +const int TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; -const int CSSMERR_CSP_BLOCK_SIZE_MISMATCH = -2147415731; +const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; -const int CSSMERR_CSP_PRIVATE_KEY_NOT_FOUND = -2147415730; +const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; -const int CSSMERR_CSP_PUBLIC_KEY_INCONSISTENT = -2147415729; +const int TLS_ECDH_RSA_WITH_NULL_SHA = -16373; -const int CSSMERR_CSP_DEVICE_VERIFY_FAILED = -2147415728; +const int TLS_ECDH_RSA_WITH_RC4_128_SHA = -16372; -const int CSSMERR_CSP_INVALID_LOGIN_NAME = -2147415727; +const int TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = -16371; -const int CSSMERR_CSP_ALREADY_LOGGED_IN = -2147415726; +const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = -16370; -const int CSSMERR_CSP_PRIVATE_KEY_ALREADY_EXISTS = -2147415725; +const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = -16369; -const int CSSMERR_CSP_KEY_LABEL_ALREADY_EXISTS = -2147415724; +const int TLS_ECDHE_RSA_WITH_NULL_SHA = -16368; -const int CSSMERR_CSP_INVALID_DIGEST_ALGORITHM = -2147415723; +const int TLS_ECDHE_RSA_WITH_RC4_128_SHA = -16367; -const int CSSMERR_CSP_CRYPTO_DATA_CALLBACK_FAILED = -2147415722; +const int TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; -const int CSSMERR_TP_INTERNAL_ERROR = -2147409919; +const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; -const int CSSMERR_TP_MEMORY_ERROR = -2147409918; +const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; -const int CSSMERR_TP_MDS_ERROR = -2147409917; +const int TLS_ECDH_anon_WITH_NULL_SHA = -16363; -const int CSSMERR_TP_INVALID_POINTER = -2147409916; +const int TLS_ECDH_anon_WITH_RC4_128_SHA = -16362; -const int CSSMERR_TP_INVALID_INPUT_POINTER = -2147409915; +const int TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = -16361; -const int CSSMERR_TP_INVALID_OUTPUT_POINTER = -2147409914; +const int TLS_ECDH_anon_WITH_AES_128_CBC_SHA = -16360; -const int CSSMERR_TP_FUNCTION_NOT_IMPLEMENTED = -2147409913; +const int TLS_ECDH_anon_WITH_AES_256_CBC_SHA = -16359; -const int CSSMERR_TP_SELF_CHECK_FAILED = -2147409912; +const int TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = -16331; -const int CSSMERR_TP_OS_ACCESS_DENIED = -2147409911; +const int TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = -16330; -const int CSSMERR_TP_FUNCTION_FAILED = -2147409910; +const int TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = -13141; -const int CSSMERR_TP_INVALID_CONTEXT_HANDLE = -2147409856; +const int TLS_NULL_WITH_NULL_NULL = 0; -const int CSSMERR_TP_INVALID_DATA = -2147409850; +const int TLS_RSA_WITH_NULL_MD5 = 1; -const int CSSMERR_TP_INVALID_DB_LIST = -2147409844; +const int TLS_RSA_WITH_NULL_SHA = 2; -const int CSSMERR_TP_INVALID_CERTGROUP_POINTER = -2147409854; +const int TLS_RSA_WITH_RC4_128_MD5 = 4; -const int CSSMERR_TP_INVALID_CERT_POINTER = -2147409853; +const int TLS_RSA_WITH_RC4_128_SHA = 5; -const int CSSMERR_TP_INVALID_CRL_POINTER = -2147409852; +const int TLS_RSA_WITH_3DES_EDE_CBC_SHA = 10; -const int CSSMERR_TP_INVALID_FIELD_POINTER = -2147409851; +const int TLS_RSA_WITH_NULL_SHA256 = 59; -const int CSSMERR_TP_INVALID_NETWORK_ADDR = -2147409833; +const int TLS_RSA_WITH_AES_128_CBC_SHA256 = 60; -const int CSSMERR_TP_CRL_ALREADY_SIGNED = -2147409849; +const int TLS_RSA_WITH_AES_256_CBC_SHA256 = 61; -const int CSSMERR_TP_INVALID_NUMBER_OF_FIELDS = -2147409848; +const int TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; -const int CSSMERR_TP_VERIFICATION_FAILURE = -2147409847; +const int TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; -const int CSSMERR_TP_INVALID_DB_HANDLE = -2147409846; +const int TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; -const int CSSMERR_TP_UNKNOWN_FORMAT = -2147409842; +const int TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; -const int CSSMERR_TP_UNKNOWN_TAG = -2147409841; +const int TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 62; -const int CSSMERR_TP_INVALID_PASSTHROUGH_ID = -2147409834; +const int TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 63; -const int CSSMERR_TP_INVALID_CSP_HANDLE = -2147409840; +const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 64; -const int CSSMERR_TP_INVALID_DL_HANDLE = -2147409839; +const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 103; -const int CSSMERR_TP_INVALID_CL_HANDLE = -2147409838; +const int TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 104; -const int CSSMERR_TP_INVALID_DB_LIST_POINTER = -2147409843; +const int TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 105; -const int CSSM_TP_BASE_TP_ERROR = -2147409664; +const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 106; -const int CSSMERR_TP_INVALID_CALLERAUTH_CONTEXT_POINTER = -2147409663; +const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 107; -const int CSSMERR_TP_INVALID_IDENTIFIER_POINTER = -2147409662; +const int TLS_DH_anon_WITH_RC4_128_MD5 = 24; -const int CSSMERR_TP_INVALID_KEYCACHE_HANDLE = -2147409661; +const int TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; -const int CSSMERR_TP_INVALID_CERTGROUP = -2147409660; +const int TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 108; -const int CSSMERR_TP_INVALID_CRLGROUP = -2147409659; +const int TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 109; -const int CSSMERR_TP_INVALID_CRLGROUP_POINTER = -2147409658; +const int TLS_PSK_WITH_RC4_128_SHA = 138; -const int CSSMERR_TP_AUTHENTICATION_FAILED = -2147409657; +const int TLS_PSK_WITH_3DES_EDE_CBC_SHA = 139; -const int CSSMERR_TP_CERTGROUP_INCOMPLETE = -2147409656; +const int TLS_PSK_WITH_AES_128_CBC_SHA = 140; -const int CSSMERR_TP_CERTIFICATE_CANT_OPERATE = -2147409655; +const int TLS_PSK_WITH_AES_256_CBC_SHA = 141; -const int CSSMERR_TP_CERT_EXPIRED = -2147409654; +const int TLS_DHE_PSK_WITH_RC4_128_SHA = 142; -const int CSSMERR_TP_CERT_NOT_VALID_YET = -2147409653; +const int TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = 143; -const int CSSMERR_TP_CERT_REVOKED = -2147409652; +const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA = 144; -const int CSSMERR_TP_CERT_SUSPENDED = -2147409651; +const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA = 145; -const int CSSMERR_TP_INSUFFICIENT_CREDENTIALS = -2147409650; +const int TLS_RSA_PSK_WITH_RC4_128_SHA = 146; -const int CSSMERR_TP_INVALID_ACTION = -2147409649; +const int TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = 147; -const int CSSMERR_TP_INVALID_ACTION_DATA = -2147409648; +const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA = 148; -const int CSSMERR_TP_INVALID_ANCHOR_CERT = -2147409646; +const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA = 149; -const int CSSMERR_TP_INVALID_AUTHORITY = -2147409645; +const int TLS_PSK_WITH_NULL_SHA = 44; -const int CSSMERR_TP_VERIFY_ACTION_FAILED = -2147409644; +const int TLS_DHE_PSK_WITH_NULL_SHA = 45; -const int CSSMERR_TP_INVALID_CERTIFICATE = -2147409643; +const int TLS_RSA_PSK_WITH_NULL_SHA = 46; -const int CSSMERR_TP_INVALID_CERT_AUTHORITY = -2147409642; +const int TLS_RSA_WITH_AES_128_GCM_SHA256 = 156; -const int CSSMERR_TP_INVALID_CRL_AUTHORITY = -2147409641; +const int TLS_RSA_WITH_AES_256_GCM_SHA384 = 157; -const int CSSMERR_TP_INVALID_CRL_ENCODING = -2147409640; +const int TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 158; -const int CSSMERR_TP_INVALID_CRL_TYPE = -2147409639; +const int TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 159; -const int CSSMERR_TP_INVALID_CRL = -2147409638; +const int TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = 160; -const int CSSMERR_TP_INVALID_FORM_TYPE = -2147409637; +const int TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = 161; -const int CSSMERR_TP_INVALID_ID = -2147409636; +const int TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = 162; -const int CSSMERR_TP_INVALID_IDENTIFIER = -2147409635; +const int TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = 163; -const int CSSMERR_TP_INVALID_INDEX = -2147409634; +const int TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = 164; -const int CSSMERR_TP_INVALID_NAME = -2147409633; +const int TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = 165; -const int CSSMERR_TP_INVALID_POLICY_IDENTIFIERS = -2147409632; +const int TLS_DH_anon_WITH_AES_128_GCM_SHA256 = 166; -const int CSSMERR_TP_INVALID_TIMESTRING = -2147409631; +const int TLS_DH_anon_WITH_AES_256_GCM_SHA384 = 167; -const int CSSMERR_TP_INVALID_REASON = -2147409630; +const int TLS_PSK_WITH_AES_128_GCM_SHA256 = 168; -const int CSSMERR_TP_INVALID_REQUEST_INPUTS = -2147409629; +const int TLS_PSK_WITH_AES_256_GCM_SHA384 = 169; -const int CSSMERR_TP_INVALID_RESPONSE_VECTOR = -2147409628; +const int TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 170; -const int CSSMERR_TP_INVALID_SIGNATURE = -2147409627; +const int TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 171; -const int CSSMERR_TP_INVALID_STOP_ON_POLICY = -2147409626; +const int TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = 172; -const int CSSMERR_TP_INVALID_CALLBACK = -2147409625; +const int TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = 173; -const int CSSMERR_TP_INVALID_TUPLE = -2147409624; +const int TLS_PSK_WITH_AES_128_CBC_SHA256 = 174; -const int CSSMERR_TP_NOT_SIGNER = -2147409623; +const int TLS_PSK_WITH_AES_256_CBC_SHA384 = 175; -const int CSSMERR_TP_NOT_TRUSTED = -2147409622; +const int TLS_PSK_WITH_NULL_SHA256 = 176; -const int CSSMERR_TP_NO_DEFAULT_AUTHORITY = -2147409621; +const int TLS_PSK_WITH_NULL_SHA384 = 177; -const int CSSMERR_TP_REJECTED_FORM = -2147409620; +const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = 178; -const int CSSMERR_TP_REQUEST_LOST = -2147409619; +const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = 179; -const int CSSMERR_TP_REQUEST_REJECTED = -2147409618; +const int TLS_DHE_PSK_WITH_NULL_SHA256 = 180; -const int CSSMERR_TP_UNSUPPORTED_ADDR_TYPE = -2147409617; +const int TLS_DHE_PSK_WITH_NULL_SHA384 = 181; -const int CSSMERR_TP_UNSUPPORTED_SERVICE = -2147409616; +const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = 182; -const int CSSMERR_TP_INVALID_TUPLEGROUP_POINTER = -2147409615; +const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = 183; -const int CSSMERR_TP_INVALID_TUPLEGROUP = -2147409614; +const int TLS_RSA_PSK_WITH_NULL_SHA256 = 184; -const int CSSMERR_AC_INTERNAL_ERROR = -2147405823; +const int TLS_RSA_PSK_WITH_NULL_SHA384 = 185; -const int CSSMERR_AC_MEMORY_ERROR = -2147405822; +const int TLS_AES_128_GCM_SHA256 = 4865; -const int CSSMERR_AC_MDS_ERROR = -2147405821; +const int TLS_AES_256_GCM_SHA384 = 4866; -const int CSSMERR_AC_INVALID_POINTER = -2147405820; +const int TLS_CHACHA20_POLY1305_SHA256 = 4867; -const int CSSMERR_AC_INVALID_INPUT_POINTER = -2147405819; +const int TLS_AES_128_CCM_SHA256 = 4868; -const int CSSMERR_AC_INVALID_OUTPUT_POINTER = -2147405818; +const int TLS_AES_128_CCM_8_SHA256 = 4869; -const int CSSMERR_AC_FUNCTION_NOT_IMPLEMENTED = -2147405817; +const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; -const int CSSMERR_AC_SELF_CHECK_FAILED = -2147405816; +const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; -const int CSSMERR_AC_OS_ACCESS_DENIED = -2147405815; +const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = -16347; -const int CSSMERR_AC_FUNCTION_FAILED = -2147405814; +const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = -16346; -const int CSSMERR_AC_INVALID_CONTEXT_HANDLE = -2147405760; +const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; -const int CSSMERR_AC_INVALID_DATA = -2147405754; +const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; -const int CSSMERR_AC_INVALID_DB_LIST = -2147405748; +const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = -16343; -const int CSSMERR_AC_INVALID_PASSTHROUGH_ID = -2147405738; +const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = -16342; -const int CSSMERR_AC_INVALID_DL_HANDLE = -2147405743; +const int TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; -const int CSSMERR_AC_INVALID_CL_HANDLE = -2147405742; +const int TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; -const int CSSMERR_AC_INVALID_TP_HANDLE = -2147405741; +const int TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = -16339; -const int CSSMERR_AC_INVALID_DB_HANDLE = -2147405750; +const int TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = -16338; -const int CSSMERR_AC_INVALID_DB_LIST_POINTER = -2147405747; +const int TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; -const int CSSM_AC_BASE_AC_ERROR = -2147405568; +const int TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; -const int CSSMERR_AC_INVALID_BASE_ACLS = -2147405567; +const int TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = -16335; -const int CSSMERR_AC_INVALID_TUPLE_CREDENTIALS = -2147405566; +const int TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = -16334; -const int CSSMERR_AC_INVALID_ENCODING = -2147405565; +const int TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = -13144; -const int CSSMERR_AC_INVALID_VALIDITY_PERIOD = -2147405564; +const int TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = -13143; -const int CSSMERR_AC_INVALID_REQUESTOR = -2147405563; +const int TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 255; -const int CSSMERR_AC_INVALID_REQUEST_DESCRIPTOR = -2147405562; +const int SSL_RSA_WITH_RC2_CBC_MD5 = -128; -const int CSSMERR_CL_INTERNAL_ERROR = -2147411967; +const int SSL_RSA_WITH_IDEA_CBC_MD5 = -127; -const int CSSMERR_CL_MEMORY_ERROR = -2147411966; +const int SSL_RSA_WITH_DES_CBC_MD5 = -126; -const int CSSMERR_CL_MDS_ERROR = -2147411965; +const int SSL_RSA_WITH_3DES_EDE_CBC_MD5 = -125; -const int CSSMERR_CL_INVALID_POINTER = -2147411964; +const int SSL_NO_SUCH_CIPHERSUITE = -1; -const int CSSMERR_CL_INVALID_INPUT_POINTER = -2147411963; +const int NSASCIIStringEncoding = 1; -const int CSSMERR_CL_INVALID_OUTPUT_POINTER = -2147411962; +const int NSNEXTSTEPStringEncoding = 2; -const int CSSMERR_CL_FUNCTION_NOT_IMPLEMENTED = -2147411961; +const int NSJapaneseEUCStringEncoding = 3; -const int CSSMERR_CL_SELF_CHECK_FAILED = -2147411960; +const int NSUTF8StringEncoding = 4; -const int CSSMERR_CL_OS_ACCESS_DENIED = -2147411959; +const int NSISOLatin1StringEncoding = 5; -const int CSSMERR_CL_FUNCTION_FAILED = -2147411958; +const int NSSymbolStringEncoding = 6; -const int CSSMERR_CL_INVALID_CONTEXT_HANDLE = -2147411904; +const int NSNonLossyASCIIStringEncoding = 7; -const int CSSMERR_CL_INVALID_CERTGROUP_POINTER = -2147411902; +const int NSShiftJISStringEncoding = 8; -const int CSSMERR_CL_INVALID_CERT_POINTER = -2147411901; +const int NSISOLatin2StringEncoding = 9; -const int CSSMERR_CL_INVALID_CRL_POINTER = -2147411900; +const int NSUnicodeStringEncoding = 10; -const int CSSMERR_CL_INVALID_FIELD_POINTER = -2147411899; +const int NSWindowsCP1251StringEncoding = 11; -const int CSSMERR_CL_INVALID_DATA = -2147411898; +const int NSWindowsCP1252StringEncoding = 12; -const int CSSMERR_CL_CRL_ALREADY_SIGNED = -2147411897; +const int NSWindowsCP1253StringEncoding = 13; -const int CSSMERR_CL_INVALID_NUMBER_OF_FIELDS = -2147411896; +const int NSWindowsCP1254StringEncoding = 14; -const int CSSMERR_CL_VERIFICATION_FAILURE = -2147411895; +const int NSWindowsCP1250StringEncoding = 15; -const int CSSMERR_CL_UNKNOWN_FORMAT = -2147411890; +const int NSISO2022JPStringEncoding = 21; -const int CSSMERR_CL_UNKNOWN_TAG = -2147411889; +const int NSMacOSRomanStringEncoding = 30; -const int CSSMERR_CL_INVALID_PASSTHROUGH_ID = -2147411882; +const int NSUTF16StringEncoding = 10; -const int CSSM_CL_BASE_CL_ERROR = -2147411712; +const int NSUTF16BigEndianStringEncoding = 2415919360; -const int CSSMERR_CL_INVALID_BUNDLE_POINTER = -2147411711; +const int NSUTF16LittleEndianStringEncoding = 2483028224; -const int CSSMERR_CL_INVALID_CACHE_HANDLE = -2147411710; +const int NSUTF32StringEncoding = 2348810496; -const int CSSMERR_CL_INVALID_RESULTS_HANDLE = -2147411709; +const int NSUTF32BigEndianStringEncoding = 2550137088; -const int CSSMERR_CL_INVALID_BUNDLE_INFO = -2147411708; +const int NSUTF32LittleEndianStringEncoding = 2617245952; -const int CSSMERR_CL_INVALID_CRL_INDEX = -2147411707; +const int NSProprietaryStringEncoding = 65536; -const int CSSMERR_CL_INVALID_SCOPE = -2147411706; +const int NSOpenStepUnicodeReservedBase = 62464; -const int CSSMERR_CL_NO_FIELD_VALUES = -2147411705; +const int kNativeArgNumberPos = 0; -const int CSSMERR_CL_SCOPE_NOT_SUPPORTED = -2147411704; +const int kNativeArgNumberSize = 8; -const int CSSMERR_DL_INTERNAL_ERROR = -2147414015; +const int kNativeArgTypePos = 8; -const int CSSMERR_DL_MEMORY_ERROR = -2147414014; +const int kNativeArgTypeSize = 8; -const int CSSMERR_DL_MDS_ERROR = -2147414013; +const int DYNAMIC_TARGETS_ENABLED = 0; -const int CSSMERR_DL_INVALID_POINTER = -2147414012; +const int TARGET_OS_MAC = 1; -const int CSSMERR_DL_INVALID_INPUT_POINTER = -2147414011; +const int TARGET_OS_WIN32 = 0; -const int CSSMERR_DL_INVALID_OUTPUT_POINTER = -2147414010; +const int TARGET_OS_WINDOWS = 0; -const int CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED = -2147414009; +const int TARGET_OS_UNIX = 0; -const int CSSMERR_DL_SELF_CHECK_FAILED = -2147414008; +const int TARGET_OS_LINUX = 0; -const int CSSMERR_DL_OS_ACCESS_DENIED = -2147414007; +const int TARGET_OS_OSX = 1; -const int CSSMERR_DL_FUNCTION_FAILED = -2147414006; +const int TARGET_OS_IPHONE = 0; -const int CSSMERR_DL_INVALID_CSP_HANDLE = -2147413936; +const int TARGET_OS_IOS = 0; -const int CSSMERR_DL_INVALID_DL_HANDLE = -2147413935; +const int TARGET_OS_WATCH = 0; -const int CSSMERR_DL_INVALID_CL_HANDLE = -2147413934; +const int TARGET_OS_TV = 0; -const int CSSMERR_DL_INVALID_DB_LIST_POINTER = -2147413939; +const int TARGET_OS_MACCATALYST = 0; -const int CSSMERR_DL_OPERATION_AUTH_DENIED = -2147413984; +const int TARGET_OS_UIKITFORMAC = 0; -const int CSSMERR_DL_OBJECT_USE_AUTH_DENIED = -2147413983; +const int TARGET_OS_SIMULATOR = 0; -const int CSSMERR_DL_OBJECT_MANIP_AUTH_DENIED = -2147413982; +const int TARGET_OS_EMBEDDED = 0; -const int CSSMERR_DL_OBJECT_ACL_NOT_SUPPORTED = -2147413981; +const int TARGET_OS_RTKIT = 0; -const int CSSMERR_DL_OBJECT_ACL_REQUIRED = -2147413980; +const int TARGET_OS_DRIVERKIT = 0; -const int CSSMERR_DL_INVALID_ACCESS_CREDENTIALS = -2147413979; +const int TARGET_IPHONE_SIMULATOR = 0; -const int CSSMERR_DL_INVALID_ACL_BASE_CERTS = -2147413978; +const int TARGET_OS_NANO = 0; -const int CSSMERR_DL_ACL_BASE_CERTS_NOT_SUPPORTED = -2147413977; +const int TARGET_ABI_USES_IOS_VALUES = 1; -const int CSSMERR_DL_INVALID_SAMPLE_VALUE = -2147413976; +const int TARGET_CPU_PPC = 0; -const int CSSMERR_DL_SAMPLE_VALUE_NOT_SUPPORTED = -2147413975; +const int TARGET_CPU_PPC64 = 0; -const int CSSMERR_DL_INVALID_ACL_SUBJECT_VALUE = -2147413974; +const int TARGET_CPU_68K = 0; -const int CSSMERR_DL_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147413973; +const int TARGET_CPU_X86 = 0; -const int CSSMERR_DL_INVALID_ACL_CHALLENGE_CALLBACK = -2147413972; +const int TARGET_CPU_X86_64 = 0; -const int CSSMERR_DL_ACL_CHALLENGE_CALLBACK_FAILED = -2147413971; +const int TARGET_CPU_ARM = 0; -const int CSSMERR_DL_INVALID_ACL_ENTRY_TAG = -2147413970; +const int TARGET_CPU_ARM64 = 1; -const int CSSMERR_DL_ACL_ENTRY_TAG_NOT_FOUND = -2147413969; +const int TARGET_CPU_MIPS = 0; -const int CSSMERR_DL_INVALID_ACL_EDIT_MODE = -2147413968; +const int TARGET_CPU_SPARC = 0; -const int CSSMERR_DL_ACL_CHANGE_FAILED = -2147413967; +const int TARGET_CPU_ALPHA = 0; -const int CSSMERR_DL_INVALID_NEW_ACL_ENTRY = -2147413966; +const int TARGET_RT_MAC_CFM = 0; -const int CSSMERR_DL_INVALID_NEW_ACL_OWNER = -2147413965; +const int TARGET_RT_MAC_MACHO = 1; -const int CSSMERR_DL_ACL_DELETE_FAILED = -2147413964; +const int TARGET_RT_LITTLE_ENDIAN = 1; -const int CSSMERR_DL_ACL_REPLACE_FAILED = -2147413963; +const int TARGET_RT_BIG_ENDIAN = 0; -const int CSSMERR_DL_ACL_ADD_FAILED = -2147413962; +const int TARGET_RT_64_BIT = 1; -const int CSSMERR_DL_INVALID_DB_HANDLE = -2147413942; +const int __DARWIN_ONLY_64_BIT_INO_T = 1; -const int CSSMERR_DL_INVALID_PASSTHROUGH_ID = -2147413930; +const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; -const int CSSMERR_DL_INVALID_NETWORK_ADDR = -2147413929; +const int __DARWIN_ONLY_VERS_1050 = 1; -const int CSSM_DL_BASE_DL_ERROR = -2147413760; +const int __DARWIN_UNIX03 = 1; -const int CSSMERR_DL_DATABASE_CORRUPT = -2147413759; +const int __DARWIN_64_BIT_INO_T = 1; -const int CSSMERR_DL_INVALID_RECORD_INDEX = -2147413752; +const int __DARWIN_VERS_1050 = 1; -const int CSSMERR_DL_INVALID_RECORDTYPE = -2147413751; +const int __DARWIN_NON_CANCELABLE = 0; -const int CSSMERR_DL_INVALID_FIELD_NAME = -2147413750; +const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN'; -const int CSSMERR_DL_UNSUPPORTED_FIELD_FORMAT = -2147413749; +const int __DARWIN_C_ANSI = 4096; -const int CSSMERR_DL_UNSUPPORTED_INDEX_INFO = -2147413748; +const int __DARWIN_C_FULL = 900000; -const int CSSMERR_DL_UNSUPPORTED_LOCALITY = -2147413747; +const int __DARWIN_C_LEVEL = 900000; -const int CSSMERR_DL_UNSUPPORTED_NUM_ATTRIBUTES = -2147413746; +const int __STDC_WANT_LIB_EXT1__ = 1; -const int CSSMERR_DL_UNSUPPORTED_NUM_INDEXES = -2147413745; +const int __DARWIN_NO_LONG_LONG = 0; -const int CSSMERR_DL_UNSUPPORTED_NUM_RECORDTYPES = -2147413744; +const int _DARWIN_FEATURE_64_BIT_INODE = 1; -const int CSSMERR_DL_UNSUPPORTED_RECORDTYPE = -2147413743; +const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1; -const int CSSMERR_DL_FIELD_SPECIFIED_MULTIPLE = -2147413742; +const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1; -const int CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT = -2147413741; +const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1; -const int CSSMERR_DL_INVALID_PARSING_MODULE = -2147413740; +const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3; -const int CSSMERR_DL_INVALID_DB_NAME = -2147413738; +const int __has_ptrcheck = 0; -const int CSSMERR_DL_DATASTORE_DOESNOT_EXIST = -2147413737; +const int __DARWIN_NULL = 0; -const int CSSMERR_DL_DATASTORE_ALREADY_EXISTS = -2147413736; +const int __PTHREAD_SIZE__ = 8176; -const int CSSMERR_DL_DB_LOCKED = -2147413735; +const int __PTHREAD_ATTR_SIZE__ = 56; -const int CSSMERR_DL_DATASTORE_IS_OPEN = -2147413734; +const int __PTHREAD_MUTEXATTR_SIZE__ = 8; -const int CSSMERR_DL_RECORD_NOT_FOUND = -2147413733; +const int __PTHREAD_MUTEX_SIZE__ = 56; -const int CSSMERR_DL_MISSING_VALUE = -2147413732; +const int __PTHREAD_CONDATTR_SIZE__ = 8; -const int CSSMERR_DL_UNSUPPORTED_QUERY = -2147413731; +const int __PTHREAD_COND_SIZE__ = 40; -const int CSSMERR_DL_UNSUPPORTED_QUERY_LIMITS = -2147413730; +const int __PTHREAD_ONCE_SIZE__ = 8; -const int CSSMERR_DL_UNSUPPORTED_NUM_SELECTION_PREDS = -2147413729; +const int __PTHREAD_RWLOCK_SIZE__ = 192; -const int CSSMERR_DL_UNSUPPORTED_OPERATOR = -2147413727; +const int __PTHREAD_RWLOCKATTR_SIZE__ = 16; -const int CSSMERR_DL_INVALID_RESULTS_HANDLE = -2147413726; +const int _QUAD_HIGHWORD = 1; -const int CSSMERR_DL_INVALID_DB_LOCATION = -2147413725; +const int _QUAD_LOWWORD = 0; -const int CSSMERR_DL_INVALID_ACCESS_REQUEST = -2147413724; +const int __DARWIN_LITTLE_ENDIAN = 1234; -const int CSSMERR_DL_INVALID_INDEX_INFO = -2147413723; +const int __DARWIN_BIG_ENDIAN = 4321; -const int CSSMERR_DL_INVALID_SELECTION_TAG = -2147413722; +const int __DARWIN_PDP_ENDIAN = 3412; -const int CSSMERR_DL_INVALID_NEW_OWNER = -2147413721; +const int __DARWIN_BYTE_ORDER = 1234; -const int CSSMERR_DL_INVALID_RECORD_UID = -2147413720; +const int LITTLE_ENDIAN = 1234; -const int CSSMERR_DL_INVALID_UNIQUE_INDEX_DATA = -2147413719; +const int BIG_ENDIAN = 4321; -const int CSSMERR_DL_INVALID_MODIFY_MODE = -2147413718; +const int PDP_ENDIAN = 3412; -const int CSSMERR_DL_INVALID_OPEN_PARAMETERS = -2147413717; +const int BYTE_ORDER = 1234; -const int CSSMERR_DL_RECORD_MODIFIED = -2147413716; +const int __WORDSIZE = 64; -const int CSSMERR_DL_ENDOFDATA = -2147413715; +const int INT8_MAX = 127; -const int CSSMERR_DL_INVALID_QUERY = -2147413714; +const int INT16_MAX = 32767; -const int CSSMERR_DL_INVALID_VALUE = -2147413713; +const int INT32_MAX = 2147483647; -const int CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTED = -2147413712; +const int INT64_MAX = 9223372036854775807; -const int CSSMERR_DL_STALE_UNIQUE_RECORD = -2147413711; +const int INT8_MIN = -128; -const int CSSM_WORDID_KEYCHAIN_PROMPT = 65536; +const int INT16_MIN = -32768; -const int CSSM_WORDID_KEYCHAIN_LOCK = 65537; +const int INT32_MIN = -2147483648; -const int CSSM_WORDID_KEYCHAIN_CHANGE_LOCK = 65538; +const int INT64_MIN = -9223372036854775808; -const int CSSM_WORDID_PROCESS = 65539; +const int UINT8_MAX = 255; -const int CSSM_WORDID__RESERVED_1 = 65540; +const int UINT16_MAX = 65535; -const int CSSM_WORDID_SYMMETRIC_KEY = 65541; +const int UINT32_MAX = 4294967295; -const int CSSM_WORDID_SYSTEM = 65542; +const int UINT64_MAX = -1; -const int CSSM_WORDID_KEY = 65543; +const int INT_LEAST8_MIN = -128; -const int CSSM_WORDID_PIN = 65544; +const int INT_LEAST16_MIN = -32768; -const int CSSM_WORDID_PREAUTH = 65545; +const int INT_LEAST32_MIN = -2147483648; -const int CSSM_WORDID_PREAUTH_SOURCE = 65546; +const int INT_LEAST64_MIN = -9223372036854775808; -const int CSSM_WORDID_ASYMMETRIC_KEY = 65547; +const int INT_LEAST8_MAX = 127; -const int CSSM_WORDID_PARTITION = 65548; +const int INT_LEAST16_MAX = 32767; -const int CSSM_WORDID_KEYBAG_KEY = 65549; +const int INT_LEAST32_MAX = 2147483647; -const int CSSM_WORDID__FIRST_UNUSED = 65550; +const int INT_LEAST64_MAX = 9223372036854775807; -const int CSSM_ACL_SUBJECT_TYPE_KEYCHAIN_PROMPT = 65536; +const int UINT_LEAST8_MAX = 255; -const int CSSM_ACL_SUBJECT_TYPE_PROCESS = 65539; +const int UINT_LEAST16_MAX = 65535; -const int CSSM_ACL_SUBJECT_TYPE_CODE_SIGNATURE = 116; +const int UINT_LEAST32_MAX = 4294967295; -const int CSSM_ACL_SUBJECT_TYPE_COMMENT = 12; +const int UINT_LEAST64_MAX = -1; -const int CSSM_ACL_SUBJECT_TYPE_SYMMETRIC_KEY = 65541; +const int INT_FAST8_MIN = -128; -const int CSSM_ACL_SUBJECT_TYPE_PREAUTH = 65545; +const int INT_FAST16_MIN = -32768; -const int CSSM_ACL_SUBJECT_TYPE_PREAUTH_SOURCE = 65546; +const int INT_FAST32_MIN = -2147483648; -const int CSSM_ACL_SUBJECT_TYPE_ASYMMETRIC_KEY = 65547; +const int INT_FAST64_MIN = -9223372036854775808; -const int CSSM_ACL_SUBJECT_TYPE_PARTITION = 65548; +const int INT_FAST8_MAX = 127; -const int CSSM_SAMPLE_TYPE_KEYCHAIN_PROMPT = 65536; +const int INT_FAST16_MAX = 32767; -const int CSSM_SAMPLE_TYPE_KEYCHAIN_LOCK = 65537; +const int INT_FAST32_MAX = 2147483647; -const int CSSM_SAMPLE_TYPE_KEYCHAIN_CHANGE_LOCK = 65538; +const int INT_FAST64_MAX = 9223372036854775807; -const int CSSM_SAMPLE_TYPE_PROCESS = 65539; +const int UINT_FAST8_MAX = 255; -const int CSSM_SAMPLE_TYPE_COMMENT = 12; +const int UINT_FAST16_MAX = 65535; -const int CSSM_SAMPLE_TYPE_RETRY_ID = 85; +const int UINT_FAST32_MAX = 4294967295; -const int CSSM_SAMPLE_TYPE_SYMMETRIC_KEY = 65541; +const int UINT_FAST64_MAX = -1; -const int CSSM_SAMPLE_TYPE_PREAUTH = 65545; +const int INTPTR_MAX = 9223372036854775807; -const int CSSM_SAMPLE_TYPE_ASYMMETRIC_KEY = 65547; +const int INTPTR_MIN = -9223372036854775808; -const int CSSM_SAMPLE_TYPE_KEYBAG_KEY = 65549; +const int UINTPTR_MAX = -1; -const int CSSM_ACL_AUTHORIZATION_CHANGE_ACL = 65536; +const int INTMAX_MAX = 9223372036854775807; -const int CSSM_ACL_AUTHORIZATION_CHANGE_OWNER = 65537; +const int UINTMAX_MAX = -1; -const int CSSM_ACL_AUTHORIZATION_PARTITION_ID = 65538; +const int INTMAX_MIN = -9223372036854775808; -const int CSSM_ACL_AUTHORIZATION_INTEGRITY = 65539; +const int PTRDIFF_MIN = -9223372036854775808; -const int CSSM_ACL_AUTHORIZATION_PREAUTH_BASE = 16842752; +const int PTRDIFF_MAX = 9223372036854775807; -const int CSSM_ACL_AUTHORIZATION_PREAUTH_END = 16908288; +const int SIZE_MAX = -1; -const int CSSM_ACL_CODE_SIGNATURE_INVALID = 0; +const int RSIZE_MAX = 9223372036854775807; -const int CSSM_ACL_CODE_SIGNATURE_OSX = 1; +const int WCHAR_MAX = 2147483647; -const int CSSM_ACL_MATCH_UID = 1; +const int WCHAR_MIN = -2147483648; -const int CSSM_ACL_MATCH_GID = 2; +const int WINT_MIN = -2147483648; -const int CSSM_ACL_MATCH_HONOR_ROOT = 256; +const int WINT_MAX = 2147483647; -const int CSSM_ACL_MATCH_BITS = 3; +const int SIG_ATOMIC_MIN = -2147483648; -const int CSSM_ACL_PROCESS_SELECTOR_CURRENT_VERSION = 257; +const int SIG_ATOMIC_MAX = 2147483647; -const int CSSM_ACL_KEYCHAIN_PROMPT_CURRENT_VERSION = 257; +const int __API_TO_BE_DEPRECATED = 100000; -const int CSSM_ACL_KEYCHAIN_PROMPT_REQUIRE_PASSPHRASE = 1; +const int __MAC_10_0 = 1000; -const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED = 16; +const int __MAC_10_1 = 1010; -const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED_ACT = 32; +const int __MAC_10_2 = 1020; -const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID = 64; +const int __MAC_10_3 = 1030; -const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID_ACT = 128; +const int __MAC_10_4 = 1040; -const int CSSM_ACL_PREAUTH_TRACKING_COUNT_MASK = 255; +const int __MAC_10_5 = 1050; -const int CSSM_ACL_PREAUTH_TRACKING_BLOCKED = 0; +const int __MAC_10_6 = 1060; -const int CSSM_ACL_PREAUTH_TRACKING_UNKNOWN = 1073741824; +const int __MAC_10_7 = 1070; -const int CSSM_ACL_PREAUTH_TRACKING_AUTHORIZED = -2147483648; +const int __MAC_10_8 = 1080; -const int CSSM_DB_ACCESS_RESET = 65536; +const int __MAC_10_9 = 1090; -const int CSSM_ALGID_APPLE_YARROW = -2147483648; +const int __MAC_10_10 = 101000; -const int CSSM_ALGID_AES = -2147483647; +const int __MAC_10_10_2 = 101002; -const int CSSM_ALGID_FEE = -2147483646; +const int __MAC_10_10_3 = 101003; -const int CSSM_ALGID_FEE_MD5 = -2147483645; +const int __MAC_10_11 = 101100; -const int CSSM_ALGID_FEE_SHA1 = -2147483644; +const int __MAC_10_11_2 = 101102; -const int CSSM_ALGID_FEED = -2147483643; +const int __MAC_10_11_3 = 101103; -const int CSSM_ALGID_FEEDEXP = -2147483642; +const int __MAC_10_11_4 = 101104; -const int CSSM_ALGID_ASC = -2147483641; +const int __MAC_10_12 = 101200; -const int CSSM_ALGID_SHA1HMAC_LEGACY = -2147483640; +const int __MAC_10_12_1 = 101201; -const int CSSM_ALGID_KEYCHAIN_KEY = -2147483639; +const int __MAC_10_12_2 = 101202; -const int CSSM_ALGID_PKCS12_PBE_ENCR = -2147483638; +const int __MAC_10_12_4 = 101204; -const int CSSM_ALGID_PKCS12_PBE_MAC = -2147483637; +const int __MAC_10_13 = 101300; -const int CSSM_ALGID_SECURE_PASSPHRASE = -2147483636; +const int __MAC_10_13_1 = 101301; -const int CSSM_ALGID_PBE_OPENSSL_MD5 = -2147483635; +const int __MAC_10_13_2 = 101302; -const int CSSM_ALGID_SHA256 = -2147483634; +const int __MAC_10_13_4 = 101304; -const int CSSM_ALGID_SHA384 = -2147483633; +const int __MAC_10_14 = 101400; -const int CSSM_ALGID_SHA512 = -2147483632; +const int __MAC_10_14_1 = 101401; -const int CSSM_ALGID_ENTROPY_DEFAULT = -2147483631; +const int __MAC_10_14_4 = 101404; -const int CSSM_ALGID_SHA224 = -2147483630; +const int __MAC_10_14_6 = 101406; -const int CSSM_ALGID_SHA224WithRSA = -2147483629; +const int __MAC_10_15 = 101500; -const int CSSM_ALGID_SHA256WithRSA = -2147483628; +const int __MAC_10_15_1 = 101501; -const int CSSM_ALGID_SHA384WithRSA = -2147483627; +const int __MAC_10_15_4 = 101504; -const int CSSM_ALGID_SHA512WithRSA = -2147483626; +const int __MAC_10_16 = 101600; -const int CSSM_ALGID_OPENSSH1 = -2147483625; +const int __MAC_11_0 = 110000; -const int CSSM_ALGID_SHA224WithECDSA = -2147483624; +const int __MAC_11_1 = 110100; -const int CSSM_ALGID_SHA256WithECDSA = -2147483623; +const int __MAC_11_3 = 110300; -const int CSSM_ALGID_SHA384WithECDSA = -2147483622; +const int __MAC_11_4 = 110400; -const int CSSM_ALGID_SHA512WithECDSA = -2147483621; +const int __MAC_11_5 = 110500; -const int CSSM_ALGID_ECDSA_SPECIFIED = -2147483620; +const int __MAC_11_6 = 110600; -const int CSSM_ALGID_ECDH_X963_KDF = -2147483619; +const int __MAC_12_0 = 120000; -const int CSSM_ALGID__FIRST_UNUSED = -2147483618; +const int __MAC_12_1 = 120100; -const int CSSM_PADDING_APPLE_SSLv2 = -2147483648; +const int __MAC_12_2 = 120200; -const int CSSM_KEYBLOB_RAW_FORMAT_VENDOR_DEFINED = -2147483648; +const int __MAC_12_3 = 120300; -const int CSSM_KEYBLOB_RAW_FORMAT_X509 = -2147483648; +const int __IPHONE_2_0 = 20000; -const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH = -2147483647; +const int __IPHONE_2_1 = 20100; -const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSL = -2147483646; +const int __IPHONE_2_2 = 20200; -const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH2 = -2147483645; +const int __IPHONE_3_0 = 30000; -const int CSSM_CUSTOM_COMMON_ERROR_EXTENT = 224; +const int __IPHONE_3_1 = 30100; -const int CSSM_ERRCODE_NO_USER_INTERACTION = 224; +const int __IPHONE_3_2 = 30200; -const int CSSM_ERRCODE_USER_CANCELED = 225; +const int __IPHONE_4_0 = 40000; -const int CSSM_ERRCODE_SERVICE_NOT_AVAILABLE = 226; +const int __IPHONE_4_1 = 40100; -const int CSSM_ERRCODE_INSUFFICIENT_CLIENT_IDENTIFICATION = 227; +const int __IPHONE_4_2 = 40200; -const int CSSM_ERRCODE_DEVICE_RESET = 228; +const int __IPHONE_4_3 = 40300; -const int CSSM_ERRCODE_DEVICE_FAILED = 229; +const int __IPHONE_5_0 = 50000; -const int CSSM_ERRCODE_IN_DARK_WAKE = 230; +const int __IPHONE_5_1 = 50100; -const int CSSMERR_CSSM_NO_USER_INTERACTION = -2147417888; +const int __IPHONE_6_0 = 60000; -const int CSSMERR_AC_NO_USER_INTERACTION = -2147405600; +const int __IPHONE_6_1 = 60100; -const int CSSMERR_CSP_NO_USER_INTERACTION = -2147415840; +const int __IPHONE_7_0 = 70000; -const int CSSMERR_CL_NO_USER_INTERACTION = -2147411744; +const int __IPHONE_7_1 = 70100; -const int CSSMERR_DL_NO_USER_INTERACTION = -2147413792; +const int __IPHONE_8_0 = 80000; -const int CSSMERR_TP_NO_USER_INTERACTION = -2147409696; +const int __IPHONE_8_1 = 80100; -const int CSSMERR_CSSM_USER_CANCELED = -2147417887; +const int __IPHONE_8_2 = 80200; -const int CSSMERR_AC_USER_CANCELED = -2147405599; +const int __IPHONE_8_3 = 80300; -const int CSSMERR_CSP_USER_CANCELED = -2147415839; +const int __IPHONE_8_4 = 80400; -const int CSSMERR_CL_USER_CANCELED = -2147411743; +const int __IPHONE_9_0 = 90000; -const int CSSMERR_DL_USER_CANCELED = -2147413791; +const int __IPHONE_9_1 = 90100; -const int CSSMERR_TP_USER_CANCELED = -2147409695; +const int __IPHONE_9_2 = 90200; -const int CSSMERR_CSSM_SERVICE_NOT_AVAILABLE = -2147417886; +const int __IPHONE_9_3 = 90300; -const int CSSMERR_AC_SERVICE_NOT_AVAILABLE = -2147405598; +const int __IPHONE_10_0 = 100000; -const int CSSMERR_CSP_SERVICE_NOT_AVAILABLE = -2147415838; +const int __IPHONE_10_1 = 100100; -const int CSSMERR_CL_SERVICE_NOT_AVAILABLE = -2147411742; +const int __IPHONE_10_2 = 100200; -const int CSSMERR_DL_SERVICE_NOT_AVAILABLE = -2147413790; +const int __IPHONE_10_3 = 100300; -const int CSSMERR_TP_SERVICE_NOT_AVAILABLE = -2147409694; +const int __IPHONE_11_0 = 110000; -const int CSSMERR_CSSM_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147417885; +const int __IPHONE_11_1 = 110100; -const int CSSMERR_AC_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147405597; +const int __IPHONE_11_2 = 110200; -const int CSSMERR_CSP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147415837; +const int __IPHONE_11_3 = 110300; -const int CSSMERR_CL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147411741; +const int __IPHONE_11_4 = 110400; -const int CSSMERR_DL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147413789; +const int __IPHONE_12_0 = 120000; -const int CSSMERR_TP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147409693; +const int __IPHONE_12_1 = 120100; -const int CSSMERR_CSSM_DEVICE_RESET = -2147417884; +const int __IPHONE_12_2 = 120200; -const int CSSMERR_AC_DEVICE_RESET = -2147405596; +const int __IPHONE_12_3 = 120300; -const int CSSMERR_CSP_DEVICE_RESET = -2147415836; +const int __IPHONE_12_4 = 120400; -const int CSSMERR_CL_DEVICE_RESET = -2147411740; +const int __IPHONE_13_0 = 130000; -const int CSSMERR_DL_DEVICE_RESET = -2147413788; +const int __IPHONE_13_1 = 130100; -const int CSSMERR_TP_DEVICE_RESET = -2147409692; +const int __IPHONE_13_2 = 130200; -const int CSSMERR_CSSM_DEVICE_FAILED = -2147417883; +const int __IPHONE_13_3 = 130300; -const int CSSMERR_AC_DEVICE_FAILED = -2147405595; +const int __IPHONE_13_4 = 130400; -const int CSSMERR_CSP_DEVICE_FAILED = -2147415835; +const int __IPHONE_13_5 = 130500; -const int CSSMERR_CL_DEVICE_FAILED = -2147411739; +const int __IPHONE_13_6 = 130600; -const int CSSMERR_DL_DEVICE_FAILED = -2147413787; +const int __IPHONE_13_7 = 130700; -const int CSSMERR_TP_DEVICE_FAILED = -2147409691; +const int __IPHONE_14_0 = 140000; -const int CSSMERR_CSSM_IN_DARK_WAKE = -2147417882; +const int __IPHONE_14_1 = 140100; -const int CSSMERR_AC_IN_DARK_WAKE = -2147405594; +const int __IPHONE_14_2 = 140200; -const int CSSMERR_CSP_IN_DARK_WAKE = -2147415834; +const int __IPHONE_14_3 = 140300; -const int CSSMERR_CL_IN_DARK_WAKE = -2147411738; +const int __IPHONE_14_5 = 140500; -const int CSSMERR_DL_IN_DARK_WAKE = -2147413786; +const int __IPHONE_14_6 = 140600; -const int CSSMERR_TP_IN_DARK_WAKE = -2147409690; +const int __IPHONE_14_7 = 140700; -const int CSSMERR_CSP_APPLE_ADD_APPLICATION_ACL_SUBJECT = -2147415040; +const int __IPHONE_14_8 = 140800; -const int CSSMERR_CSP_APPLE_PUBLIC_KEY_INCOMPLETE = -2147415039; +const int __IPHONE_15_0 = 150000; -const int CSSMERR_CSP_APPLE_SIGNATURE_MISMATCH = -2147415038; +const int __IPHONE_15_1 = 150100; -const int CSSMERR_CSP_APPLE_INVALID_KEY_START_DATE = -2147415037; +const int __IPHONE_15_2 = 150200; -const int CSSMERR_CSP_APPLE_INVALID_KEY_END_DATE = -2147415036; +const int __IPHONE_15_3 = 150300; -const int CSSMERR_CSPDL_APPLE_DL_CONVERSION_ERROR = -2147415035; +const int __IPHONE_15_4 = 150400; -const int CSSMERR_CSP_APPLE_SSLv2_ROLLBACK = -2147415034; +const int __TVOS_9_0 = 90000; -const int CSSM_DL_DB_RECORD_GENERIC_PASSWORD = -2147483648; +const int __TVOS_9_1 = 90100; -const int CSSM_DL_DB_RECORD_INTERNET_PASSWORD = -2147483647; +const int __TVOS_9_2 = 90200; -const int CSSM_DL_DB_RECORD_APPLESHARE_PASSWORD = -2147483646; +const int __TVOS_10_0 = 100000; -const int CSSM_DL_DB_RECORD_X509_CERTIFICATE = -2147479552; +const int __TVOS_10_0_1 = 100001; -const int CSSM_DL_DB_RECORD_USER_TRUST = -2147479551; +const int __TVOS_10_1 = 100100; -const int CSSM_DL_DB_RECORD_X509_CRL = -2147479550; +const int __TVOS_10_2 = 100200; -const int CSSM_DL_DB_RECORD_UNLOCK_REFERRAL = -2147479549; +const int __TVOS_11_0 = 110000; -const int CSSM_DL_DB_RECORD_EXTENDED_ATTRIBUTE = -2147479548; +const int __TVOS_11_1 = 110100; -const int CSSM_DL_DB_RECORD_METADATA = -2147450880; +const int __TVOS_11_2 = 110200; -const int CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT = 0; +const int __TVOS_11_3 = 110300; -const int CSSM_APPLEFILEDL_COMMIT = 1; +const int __TVOS_11_4 = 110400; -const int CSSM_APPLEFILEDL_ROLLBACK = 2; +const int __TVOS_12_0 = 120000; -const int CSSM_APPLEFILEDL_TAKE_FILE_LOCK = 3; +const int __TVOS_12_1 = 120100; -const int CSSM_APPLEFILEDL_MAKE_BACKUP = 4; +const int __TVOS_12_2 = 120200; -const int CSSM_APPLEFILEDL_MAKE_COPY = 5; +const int __TVOS_12_3 = 120300; -const int CSSM_APPLEFILEDL_DELETE_FILE = 6; +const int __TVOS_12_4 = 120400; -const int CSSM_APPLE_UNLOCK_TYPE_KEY_DIRECT = 1; +const int __TVOS_13_0 = 130000; -const int CSSM_APPLE_UNLOCK_TYPE_WRAPPED_PRIVATE = 2; +const int __TVOS_13_2 = 130200; -const int CSSM_APPLE_UNLOCK_TYPE_KEYBAG = 3; +const int __TVOS_13_3 = 130300; -const int CSSMERR_APPLEDL_INVALID_OPEN_PARAMETERS = -2147412992; +const int __TVOS_13_4 = 130400; -const int CSSMERR_APPLEDL_DISK_FULL = -2147412991; +const int __TVOS_14_0 = 140000; -const int CSSMERR_APPLEDL_QUOTA_EXCEEDED = -2147412990; +const int __TVOS_14_1 = 140100; -const int CSSMERR_APPLEDL_FILE_TOO_BIG = -2147412989; +const int __TVOS_14_2 = 140200; -const int CSSMERR_APPLEDL_INVALID_DATABASE_BLOB = -2147412988; +const int __TVOS_14_3 = 140300; -const int CSSMERR_APPLEDL_INVALID_KEY_BLOB = -2147412987; +const int __TVOS_14_5 = 140500; -const int CSSMERR_APPLEDL_INCOMPATIBLE_DATABASE_BLOB = -2147412986; +const int __TVOS_14_6 = 140600; -const int CSSMERR_APPLEDL_INCOMPATIBLE_KEY_BLOB = -2147412985; +const int __TVOS_14_7 = 140700; -const int CSSMERR_APPLETP_HOSTNAME_MISMATCH = -2147408896; +const int __TVOS_15_0 = 150000; -const int CSSMERR_APPLETP_UNKNOWN_CRITICAL_EXTEN = -2147408895; +const int __TVOS_15_1 = 150100; -const int CSSMERR_APPLETP_NO_BASIC_CONSTRAINTS = -2147408894; +const int __TVOS_15_2 = 150200; -const int CSSMERR_APPLETP_INVALID_CA = -2147408893; +const int __TVOS_15_3 = 150300; -const int CSSMERR_APPLETP_INVALID_AUTHORITY_ID = -2147408892; +const int __TVOS_15_4 = 150400; -const int CSSMERR_APPLETP_INVALID_SUBJECT_ID = -2147408891; +const int __WATCHOS_1_0 = 10000; -const int CSSMERR_APPLETP_INVALID_KEY_USAGE = -2147408890; +const int __WATCHOS_2_0 = 20000; -const int CSSMERR_APPLETP_INVALID_EXTENDED_KEY_USAGE = -2147408889; +const int __WATCHOS_2_1 = 20100; -const int CSSMERR_APPLETP_INVALID_ID_LINKAGE = -2147408888; +const int __WATCHOS_2_2 = 20200; -const int CSSMERR_APPLETP_PATH_LEN_CONSTRAINT = -2147408887; +const int __WATCHOS_3_0 = 30000; -const int CSSMERR_APPLETP_INVALID_ROOT = -2147408886; +const int __WATCHOS_3_1 = 30100; -const int CSSMERR_APPLETP_CRL_EXPIRED = -2147408885; +const int __WATCHOS_3_1_1 = 30101; -const int CSSMERR_APPLETP_CRL_NOT_VALID_YET = -2147408884; +const int __WATCHOS_3_2 = 30200; -const int CSSMERR_APPLETP_CRL_NOT_FOUND = -2147408883; +const int __WATCHOS_4_0 = 40000; -const int CSSMERR_APPLETP_CRL_SERVER_DOWN = -2147408882; +const int __WATCHOS_4_1 = 40100; -const int CSSMERR_APPLETP_CRL_BAD_URI = -2147408881; +const int __WATCHOS_4_2 = 40200; -const int CSSMERR_APPLETP_UNKNOWN_CERT_EXTEN = -2147408880; +const int __WATCHOS_4_3 = 40300; -const int CSSMERR_APPLETP_UNKNOWN_CRL_EXTEN = -2147408879; +const int __WATCHOS_5_0 = 50000; -const int CSSMERR_APPLETP_CRL_NOT_TRUSTED = -2147408878; +const int __WATCHOS_5_1 = 50100; -const int CSSMERR_APPLETP_CRL_INVALID_ANCHOR_CERT = -2147408877; +const int __WATCHOS_5_2 = 50200; -const int CSSMERR_APPLETP_CRL_POLICY_FAIL = -2147408876; +const int __WATCHOS_5_3 = 50300; -const int CSSMERR_APPLETP_IDP_FAIL = -2147408875; +const int __WATCHOS_6_0 = 60000; -const int CSSMERR_APPLETP_CERT_NOT_FOUND_FROM_ISSUER = -2147408874; +const int __WATCHOS_6_1 = 60100; -const int CSSMERR_APPLETP_BAD_CERT_FROM_ISSUER = -2147408873; +const int __WATCHOS_6_2 = 60200; -const int CSSMERR_APPLETP_SMIME_EMAIL_ADDRS_NOT_FOUND = -2147408872; +const int __WATCHOS_7_0 = 70000; -const int CSSMERR_APPLETP_SMIME_BAD_EXT_KEY_USE = -2147408871; +const int __WATCHOS_7_1 = 70100; -const int CSSMERR_APPLETP_SMIME_BAD_KEY_USE = -2147408870; +const int __WATCHOS_7_2 = 70200; -const int CSSMERR_APPLETP_SMIME_KEYUSAGE_NOT_CRITICAL = -2147408869; +const int __WATCHOS_7_3 = 70300; -const int CSSMERR_APPLETP_SMIME_NO_EMAIL_ADDRS = -2147408868; +const int __WATCHOS_7_4 = 70400; -const int CSSMERR_APPLETP_SMIME_SUBJ_ALT_NAME_NOT_CRIT = -2147408867; +const int __WATCHOS_7_5 = 70500; -const int CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE = -2147408866; +const int __WATCHOS_7_6 = 70600; -const int CSSMERR_APPLETP_OCSP_BAD_RESPONSE = -2147408865; +const int __WATCHOS_8_0 = 80000; -const int CSSMERR_APPLETP_OCSP_BAD_REQUEST = -2147408864; +const int __WATCHOS_8_1 = 80100; -const int CSSMERR_APPLETP_OCSP_UNAVAILABLE = -2147408863; +const int __WATCHOS_8_3 = 80300; -const int CSSMERR_APPLETP_OCSP_STATUS_UNRECOGNIZED = -2147408862; +const int __WATCHOS_8_4 = 80400; -const int CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK = -2147408861; +const int __WATCHOS_8_5 = 80500; -const int CSSMERR_APPLETP_NETWORK_FAILURE = -2147408860; +const int MAC_OS_X_VERSION_10_0 = 1000; -const int CSSMERR_APPLETP_OCSP_NOT_TRUSTED = -2147408859; +const int MAC_OS_X_VERSION_10_1 = 1010; -const int CSSMERR_APPLETP_OCSP_INVALID_ANCHOR_CERT = -2147408858; +const int MAC_OS_X_VERSION_10_2 = 1020; -const int CSSMERR_APPLETP_OCSP_SIG_ERROR = -2147408857; +const int MAC_OS_X_VERSION_10_3 = 1030; -const int CSSMERR_APPLETP_OCSP_NO_SIGNER = -2147408856; +const int MAC_OS_X_VERSION_10_4 = 1040; -const int CSSMERR_APPLETP_OCSP_RESP_MALFORMED_REQ = -2147408855; +const int MAC_OS_X_VERSION_10_5 = 1050; -const int CSSMERR_APPLETP_OCSP_RESP_INTERNAL_ERR = -2147408854; +const int MAC_OS_X_VERSION_10_6 = 1060; -const int CSSMERR_APPLETP_OCSP_RESP_TRY_LATER = -2147408853; +const int MAC_OS_X_VERSION_10_7 = 1070; -const int CSSMERR_APPLETP_OCSP_RESP_SIG_REQUIRED = -2147408852; +const int MAC_OS_X_VERSION_10_8 = 1080; -const int CSSMERR_APPLETP_OCSP_RESP_UNAUTHORIZED = -2147408851; +const int MAC_OS_X_VERSION_10_9 = 1090; -const int CSSMERR_APPLETP_OCSP_NONCE_MISMATCH = -2147408850; +const int MAC_OS_X_VERSION_10_10 = 101000; -const int CSSMERR_APPLETP_CS_BAD_CERT_CHAIN_LENGTH = -2147408849; +const int MAC_OS_X_VERSION_10_10_2 = 101002; -const int CSSMERR_APPLETP_CS_NO_BASIC_CONSTRAINTS = -2147408848; +const int MAC_OS_X_VERSION_10_10_3 = 101003; -const int CSSMERR_APPLETP_CS_BAD_PATH_LENGTH = -2147408847; +const int MAC_OS_X_VERSION_10_11 = 101100; -const int CSSMERR_APPLETP_CS_NO_EXTENDED_KEY_USAGE = -2147408846; +const int MAC_OS_X_VERSION_10_11_2 = 101102; -const int CSSMERR_APPLETP_CODE_SIGN_DEVELOPMENT = -2147408845; +const int MAC_OS_X_VERSION_10_11_3 = 101103; -const int CSSMERR_APPLETP_RS_BAD_CERT_CHAIN_LENGTH = -2147408844; +const int MAC_OS_X_VERSION_10_11_4 = 101104; -const int CSSMERR_APPLETP_RS_BAD_EXTENDED_KEY_USAGE = -2147408843; +const int MAC_OS_X_VERSION_10_12 = 101200; -const int CSSMERR_APPLETP_TRUST_SETTING_DENY = -2147408842; +const int MAC_OS_X_VERSION_10_12_1 = 101201; -const int CSSMERR_APPLETP_INVALID_EMPTY_SUBJECT = -2147408841; +const int MAC_OS_X_VERSION_10_12_2 = 101202; -const int CSSMERR_APPLETP_UNKNOWN_QUAL_CERT_STATEMENT = -2147408840; +const int MAC_OS_X_VERSION_10_12_4 = 101204; -const int CSSMERR_APPLETP_MISSING_REQUIRED_EXTENSION = -2147408839; +const int MAC_OS_X_VERSION_10_13 = 101300; -const int CSSMERR_APPLETP_EXT_KEYUSAGE_NOT_CRITICAL = -2147408838; +const int MAC_OS_X_VERSION_10_13_1 = 101301; -const int CSSMERR_APPLETP_IDENTIFIER_MISSING = -2147408837; +const int MAC_OS_X_VERSION_10_13_2 = 101302; -const int CSSMERR_APPLETP_CA_PIN_MISMATCH = -2147408836; +const int MAC_OS_X_VERSION_10_13_4 = 101304; -const int CSSMERR_APPLETP_LEAF_PIN_MISMATCH = -2147408835; +const int MAC_OS_X_VERSION_10_14 = 101400; -const int CSSMERR_APPLE_DOTMAC_REQ_QUEUED = -2147408796; +const int MAC_OS_X_VERSION_10_14_1 = 101401; -const int CSSMERR_APPLE_DOTMAC_REQ_REDIRECT = -2147408795; +const int MAC_OS_X_VERSION_10_14_4 = 101404; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ERR = -2147408794; +const int MAC_OS_X_VERSION_10_14_6 = 101406; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_PARAM = -2147408793; +const int MAC_OS_X_VERSION_10_15 = 101500; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_AUTH = -2147408792; +const int MAC_OS_X_VERSION_10_15_1 = 101501; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_UNIMPL = -2147408791; +const int MAC_OS_X_VERSION_10_16 = 101600; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_NOT_AVAIL = -2147408790; +const int MAC_OS_VERSION_11_0 = 110000; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ALREADY_EXIST = -2147408789; +const int MAC_OS_VERSION_12_0 = 120000; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_SERVICE_ERROR = -2147408788; +const int __DRIVERKIT_19_0 = 190000; -const int CSSMERR_APPLE_DOTMAC_REQ_IS_PENDING = -2147408787; +const int __DRIVERKIT_20_0 = 200000; -const int CSSMERR_APPLE_DOTMAC_NO_REQ_PENDING = -2147408786; +const int __DRIVERKIT_21_0 = 210000; -const int CSSMERR_APPLE_DOTMAC_CSR_VERIFY_FAIL = -2147408785; +const int __MAC_OS_X_VERSION_MIN_REQUIRED = 120000; -const int CSSMERR_APPLE_DOTMAC_FAILED_CONSISTENCY_CHECK = -2147408784; +const int __MAC_OS_X_VERSION_MAX_ALLOWED = 120300; -const int CSSM_APPLEDL_OPEN_PARAMETERS_VERSION = 1; +const int __ENABLE_LEGACY_MAC_AVAILABILITY = 1; -const int CSSM_APPLECSPDL_DB_LOCK = 0; +const int __DARWIN_FD_SETSIZE = 1024; -const int CSSM_APPLECSPDL_DB_UNLOCK = 1; +const int __DARWIN_NBBY = 8; -const int CSSM_APPLECSPDL_DB_GET_SETTINGS = 2; +const int NBBY = 8; -const int CSSM_APPLECSPDL_DB_SET_SETTINGS = 3; +const int FD_SETSIZE = 1024; -const int CSSM_APPLECSPDL_DB_IS_LOCKED = 4; +const int MAC_OS_VERSION_11_1 = 110100; -const int CSSM_APPLECSPDL_DB_CHANGE_PASSWORD = 5; +const int MAC_OS_VERSION_11_3 = 110300; -const int CSSM_APPLECSPDL_DB_GET_HANDLE = 6; +const int MAC_OS_X_VERSION_MIN_REQUIRED = 120000; -const int CSSM_APPLESCPDL_CSP_GET_KEYHANDLE = 7; +const int MAC_OS_X_VERSION_MAX_ALLOWED = 120000; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_8 = 8; +const int __AVAILABILITY_MACROS_USES_AVAILABILITY = 1; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_9 = 9; +const int OBJC_API_VERSION = 2; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_10 = 10; +const int OBJC_NO_GC = 1; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_11 = 11; +const int NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER = 1; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_12 = 12; +const int OBJC_OLD_DISPATCH_PROTOTYPES = 0; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_13 = 13; +const int true1 = 1; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_14 = 14; +const int false1 = 0; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_15 = 15; +const int __bool_true_false_are_defined = 1; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_16 = 16; +const int OBJC_BOOL_IS_BOOL = 1; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_17 = 17; +const int YES = 1; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_18 = 18; +const int NO = 0; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_19 = 19; +const int NSIntegerMax = 9223372036854775807; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_20 = 20; +const int NSIntegerMin = -9223372036854775808; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_21 = 21; +const int NSUIntegerMax = -1; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_22 = 22; +const int NSINTEGER_DEFINED = 1; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_23 = 23; +const int __GNUC_VA_LIST = 1; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_24 = 24; +const int __DARWIN_CLK_TCK = 100; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_25 = 25; +const int CHAR_BIT = 8; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_26 = 26; +const int MB_LEN_MAX = 6; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_27 = 27; +const int CLK_TCK = 100; -const int CSSM_APPLECSP_KEYDIGEST = 256; +const int SCHAR_MAX = 127; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_APPLE_CUSTOM = 100; +const int SCHAR_MIN = -128; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSL = 101; +const int UCHAR_MAX = 255; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSH1 = 102; +const int CHAR_MAX = 127; -const int CSSM_ATTRIBUTE_VENDOR_DEFINED = 8388608; +const int CHAR_MIN = -128; -const int CSSM_ATTRIBUTE_PUBLIC_KEY = 1082130432; +const int USHRT_MAX = 65535; -const int CSSM_ATTRIBUTE_FEE_PRIME_TYPE = 276824065; +const int SHRT_MAX = 32767; -const int CSSM_ATTRIBUTE_FEE_CURVE_TYPE = 276824066; +const int SHRT_MIN = -32768; -const int CSSM_ATTRIBUTE_ASC_OPTIMIZATION = 276824067; +const int UINT_MAX = 4294967295; -const int CSSM_ATTRIBUTE_RSA_BLINDING = 276824068; +const int INT_MAX = 2147483647; -const int CSSM_ATTRIBUTE_PARAM_KEY = 1082130437; +const int INT_MIN = -2147483648; -const int CSSM_ATTRIBUTE_PROMPT = 545259526; +const int ULONG_MAX = -1; -const int CSSM_ATTRIBUTE_ALERT_TITLE = 545259527; +const int LONG_MAX = 9223372036854775807; -const int CSSM_ATTRIBUTE_VERIFY_PASSPHRASE = 276824072; +const int LONG_MIN = -9223372036854775808; -const int CSSM_FEE_PRIME_TYPE_DEFAULT = 0; +const int ULLONG_MAX = -1; -const int CSSM_FEE_PRIME_TYPE_MERSENNE = 1; +const int LLONG_MAX = 9223372036854775807; -const int CSSM_FEE_PRIME_TYPE_FEE = 2; +const int LLONG_MIN = -9223372036854775808; -const int CSSM_FEE_PRIME_TYPE_GENERAL = 3; +const int LONG_BIT = 64; -const int CSSM_FEE_CURVE_TYPE_DEFAULT = 0; +const int SSIZE_MAX = 9223372036854775807; -const int CSSM_FEE_CURVE_TYPE_MONTGOMERY = 1; +const int WORD_BIT = 32; -const int CSSM_FEE_CURVE_TYPE_WEIERSTRASS = 2; +const int SIZE_T_MAX = -1; -const int CSSM_FEE_CURVE_TYPE_ANSI_X9_62 = 3; +const int UQUAD_MAX = -1; -const int CSSM_ASC_OPTIMIZE_DEFAULT = 0; +const int QUAD_MAX = 9223372036854775807; -const int CSSM_ASC_OPTIMIZE_SIZE = 1; +const int QUAD_MIN = -9223372036854775808; -const int CSSM_ASC_OPTIMIZE_SECURITY = 2; +const int ARG_MAX = 1048576; -const int CSSM_ASC_OPTIMIZE_TIME = 3; +const int CHILD_MAX = 266; -const int CSSM_ASC_OPTIMIZE_TIME_SIZE = 4; +const int GID_MAX = 2147483647; -const int CSSM_ASC_OPTIMIZE_ASCII = 5; +const int LINK_MAX = 32767; -const int CSSM_KEYATTR_PARTIAL = 65536; +const int MAX_CANON = 1024; -const int CSSM_KEYATTR_PUBLIC_KEY_ENCRYPT = 131072; +const int MAX_INPUT = 1024; -const int CSSM_TP_ACTION_REQUIRE_CRL_PER_CERT = 1; +const int NAME_MAX = 255; -const int CSSM_TP_ACTION_FETCH_CRL_FROM_NET = 2; +const int NGROUPS_MAX = 16; -const int CSSM_TP_ACTION_CRL_SUFFICIENT = 4; +const int UID_MAX = 2147483647; -const int CSSM_TP_ACTION_REQUIRE_CRL_IF_PRESENT = 8; +const int OPEN_MAX = 10240; -const int CSSM_TP_ACTION_ALLOW_EXPIRED = 1; +const int PATH_MAX = 1024; -const int CSSM_TP_ACTION_LEAF_IS_CA = 2; +const int PIPE_BUF = 512; -const int CSSM_TP_ACTION_FETCH_CERT_FROM_NET = 4; +const int BC_BASE_MAX = 99; -const int CSSM_TP_ACTION_ALLOW_EXPIRED_ROOT = 8; +const int BC_DIM_MAX = 2048; -const int CSSM_TP_ACTION_REQUIRE_REV_PER_CERT = 16; +const int BC_SCALE_MAX = 99; -const int CSSM_TP_ACTION_TRUST_SETTINGS = 32; +const int BC_STRING_MAX = 1000; -const int CSSM_TP_ACTION_IMPLICIT_ANCHORS = 64; +const int CHARCLASS_NAME_MAX = 14; -const int CSSM_CERT_STATUS_EXPIRED = 1; +const int COLL_WEIGHTS_MAX = 2; -const int CSSM_CERT_STATUS_NOT_VALID_YET = 2; +const int EQUIV_CLASS_MAX = 2; -const int CSSM_CERT_STATUS_IS_IN_INPUT_CERTS = 4; +const int EXPR_NEST_MAX = 32; -const int CSSM_CERT_STATUS_IS_IN_ANCHORS = 8; +const int LINE_MAX = 2048; -const int CSSM_CERT_STATUS_IS_ROOT = 16; +const int RE_DUP_MAX = 255; -const int CSSM_CERT_STATUS_IS_FROM_NET = 32; +const int NZERO = 20; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_USER = 64; +const int _POSIX_ARG_MAX = 4096; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_ADMIN = 128; +const int _POSIX_CHILD_MAX = 25; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_SYSTEM = 256; +const int _POSIX_LINK_MAX = 8; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_TRUST = 512; +const int _POSIX_MAX_CANON = 255; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_DENY = 1024; +const int _POSIX_MAX_INPUT = 255; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_IGNORED_ERROR = 2048; +const int _POSIX_NAME_MAX = 14; -const int CSSM_EVIDENCE_FORM_APPLE_HEADER = -2147483648; +const int _POSIX_NGROUPS_MAX = 8; -const int CSSM_EVIDENCE_FORM_APPLE_CERTGROUP = -2147483647; +const int _POSIX_OPEN_MAX = 20; -const int CSSM_EVIDENCE_FORM_APPLE_CERT_INFO = -2147483646; +const int _POSIX_PATH_MAX = 256; -const int CSSM_APPLEX509CL_OBTAIN_CSR = 0; +const int _POSIX_PIPE_BUF = 512; -const int CSSM_APPLEX509CL_VERIFY_CSR = 1; +const int _POSIX_SSIZE_MAX = 32767; -const int kSecSubjectItemAttr = 1937072746; +const int _POSIX_STREAM_MAX = 8; -const int kSecIssuerItemAttr = 1769173877; +const int _POSIX_TZNAME_MAX = 6; -const int kSecSerialNumberItemAttr = 1936614002; +const int _POSIX2_BC_BASE_MAX = 99; -const int kSecPublicKeyHashItemAttr = 1752198009; +const int _POSIX2_BC_DIM_MAX = 2048; -const int kSecSubjectKeyIdentifierItemAttr = 1936419172; +const int _POSIX2_BC_SCALE_MAX = 99; -const int kSecCertTypeItemAttr = 1668577648; +const int _POSIX2_BC_STRING_MAX = 1000; -const int kSecCertEncodingItemAttr = 1667591779; +const int _POSIX2_EQUIV_CLASS_MAX = 2; -const int SSL_NULL_WITH_NULL_NULL = 0; +const int _POSIX2_EXPR_NEST_MAX = 32; -const int SSL_RSA_WITH_NULL_MD5 = 1; +const int _POSIX2_LINE_MAX = 2048; -const int SSL_RSA_WITH_NULL_SHA = 2; +const int _POSIX2_RE_DUP_MAX = 255; -const int SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3; +const int _POSIX_AIO_LISTIO_MAX = 2; -const int SSL_RSA_WITH_RC4_128_MD5 = 4; +const int _POSIX_AIO_MAX = 1; -const int SSL_RSA_WITH_RC4_128_SHA = 5; +const int _POSIX_DELAYTIMER_MAX = 32; -const int SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6; +const int _POSIX_MQ_OPEN_MAX = 8; -const int SSL_RSA_WITH_IDEA_CBC_SHA = 7; +const int _POSIX_MQ_PRIO_MAX = 32; -const int SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8; +const int _POSIX_RTSIG_MAX = 8; -const int SSL_RSA_WITH_DES_CBC_SHA = 9; +const int _POSIX_SEM_NSEMS_MAX = 256; -const int SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10; +const int _POSIX_SEM_VALUE_MAX = 32767; -const int SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11; +const int _POSIX_SIGQUEUE_MAX = 32; -const int SSL_DH_DSS_WITH_DES_CBC_SHA = 12; +const int _POSIX_TIMER_MAX = 32; -const int SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; +const int _POSIX_CLOCKRES_MIN = 20000000; -const int SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14; +const int _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4; -const int SSL_DH_RSA_WITH_DES_CBC_SHA = 15; +const int _POSIX_THREAD_KEYS_MAX = 128; -const int SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; +const int _POSIX_THREAD_THREADS_MAX = 64; -const int SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17; +const int PTHREAD_DESTRUCTOR_ITERATIONS = 4; -const int SSL_DHE_DSS_WITH_DES_CBC_SHA = 18; +const int PTHREAD_KEYS_MAX = 512; -const int SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; +const int PTHREAD_STACK_MIN = 16384; -const int SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20; +const int _POSIX_HOST_NAME_MAX = 255; -const int SSL_DHE_RSA_WITH_DES_CBC_SHA = 21; +const int _POSIX_LOGIN_NAME_MAX = 9; -const int SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; +const int _POSIX_SS_REPL_MAX = 4; -const int SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23; +const int _POSIX_SYMLINK_MAX = 255; -const int SSL_DH_anon_WITH_RC4_128_MD5 = 24; +const int _POSIX_SYMLOOP_MAX = 8; -const int SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25; +const int _POSIX_TRACE_EVENT_NAME_MAX = 30; -const int SSL_DH_anon_WITH_DES_CBC_SHA = 26; +const int _POSIX_TRACE_NAME_MAX = 8; -const int SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; +const int _POSIX_TRACE_SYS_MAX = 8; -const int SSL_FORTEZZA_DMS_WITH_NULL_SHA = 28; +const int _POSIX_TRACE_USER_EVENT_MAX = 32; -const int SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = 29; +const int _POSIX_TTY_NAME_MAX = 9; -const int TLS_RSA_WITH_AES_128_CBC_SHA = 47; +const int _POSIX2_CHARCLASS_NAME_MAX = 14; -const int TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48; +const int _POSIX2_COLL_WEIGHTS_MAX = 2; -const int TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49; +const int _POSIX_RE_DUP_MAX = 255; -const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50; +const int OFF_MIN = -9223372036854775808; -const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51; +const int OFF_MAX = 9223372036854775807; -const int TLS_DH_anon_WITH_AES_128_CBC_SHA = 52; +const int PASS_MAX = 128; -const int TLS_RSA_WITH_AES_256_CBC_SHA = 53; +const int NL_ARGMAX = 9; -const int TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54; +const int NL_LANGMAX = 14; -const int TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55; +const int NL_MSGMAX = 32767; -const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56; +const int NL_NMAX = 1; -const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57; +const int NL_SETMAX = 255; -const int TLS_DH_anon_WITH_AES_256_CBC_SHA = 58; +const int NL_TEXTMAX = 2048; -const int TLS_ECDH_ECDSA_WITH_NULL_SHA = -16383; +const int _XOPEN_IOV_MAX = 16; -const int TLS_ECDH_ECDSA_WITH_RC4_128_SHA = -16382; +const int IOV_MAX = 1024; -const int TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = -16381; +const int _XOPEN_NAME_MAX = 255; -const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = -16380; +const int _XOPEN_PATH_MAX = 1024; -const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = -16379; +const int NS_BLOCKS_AVAILABLE = 1; -const int TLS_ECDHE_ECDSA_WITH_NULL_SHA = -16378; +const int __COREFOUNDATION_CFAVAILABILITY__ = 1; -const int TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = -16377; +const int API_TO_BE_DEPRECATED = 100000; -const int TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; +const int __CF_ENUM_FIXED_IS_AVAILABLE = 1; -const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; +const double NSFoundationVersionNumber10_0 = 397.4; -const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; +const double NSFoundationVersionNumber10_1 = 425.0; -const int TLS_ECDH_RSA_WITH_NULL_SHA = -16373; +const double NSFoundationVersionNumber10_1_1 = 425.0; -const int TLS_ECDH_RSA_WITH_RC4_128_SHA = -16372; +const double NSFoundationVersionNumber10_1_2 = 425.0; -const int TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = -16371; +const double NSFoundationVersionNumber10_1_3 = 425.0; -const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = -16370; +const double NSFoundationVersionNumber10_1_4 = 425.0; -const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = -16369; +const double NSFoundationVersionNumber10_2 = 462.0; -const int TLS_ECDHE_RSA_WITH_NULL_SHA = -16368; +const double NSFoundationVersionNumber10_2_1 = 462.0; -const int TLS_ECDHE_RSA_WITH_RC4_128_SHA = -16367; +const double NSFoundationVersionNumber10_2_2 = 462.0; -const int TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; +const double NSFoundationVersionNumber10_2_3 = 462.0; -const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; +const double NSFoundationVersionNumber10_2_4 = 462.0; -const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; +const double NSFoundationVersionNumber10_2_5 = 462.0; -const int TLS_ECDH_anon_WITH_NULL_SHA = -16363; +const double NSFoundationVersionNumber10_2_6 = 462.0; -const int TLS_ECDH_anon_WITH_RC4_128_SHA = -16362; +const double NSFoundationVersionNumber10_2_7 = 462.7; -const int TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = -16361; +const double NSFoundationVersionNumber10_2_8 = 462.7; -const int TLS_ECDH_anon_WITH_AES_128_CBC_SHA = -16360; +const double NSFoundationVersionNumber10_3 = 500.0; -const int TLS_ECDH_anon_WITH_AES_256_CBC_SHA = -16359; +const double NSFoundationVersionNumber10_3_1 = 500.0; -const int TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = -16331; +const double NSFoundationVersionNumber10_3_2 = 500.3; -const int TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = -16330; +const double NSFoundationVersionNumber10_3_3 = 500.54; -const int TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = -13141; +const double NSFoundationVersionNumber10_3_4 = 500.56; -const int TLS_NULL_WITH_NULL_NULL = 0; +const double NSFoundationVersionNumber10_3_5 = 500.56; -const int TLS_RSA_WITH_NULL_MD5 = 1; +const double NSFoundationVersionNumber10_3_6 = 500.56; -const int TLS_RSA_WITH_NULL_SHA = 2; +const double NSFoundationVersionNumber10_3_7 = 500.56; -const int TLS_RSA_WITH_RC4_128_MD5 = 4; +const double NSFoundationVersionNumber10_3_8 = 500.56; -const int TLS_RSA_WITH_RC4_128_SHA = 5; +const double NSFoundationVersionNumber10_3_9 = 500.58; -const int TLS_RSA_WITH_3DES_EDE_CBC_SHA = 10; +const double NSFoundationVersionNumber10_4 = 567.0; -const int TLS_RSA_WITH_NULL_SHA256 = 59; +const double NSFoundationVersionNumber10_4_1 = 567.0; -const int TLS_RSA_WITH_AES_128_CBC_SHA256 = 60; +const double NSFoundationVersionNumber10_4_2 = 567.12; -const int TLS_RSA_WITH_AES_256_CBC_SHA256 = 61; +const double NSFoundationVersionNumber10_4_3 = 567.21; -const int TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; +const double NSFoundationVersionNumber10_4_4_Intel = 567.23; -const int TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; +const double NSFoundationVersionNumber10_4_4_PowerPC = 567.21; -const int TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; +const double NSFoundationVersionNumber10_4_5 = 567.25; -const int TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; +const double NSFoundationVersionNumber10_4_6 = 567.26; -const int TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 62; +const double NSFoundationVersionNumber10_4_7 = 567.27; -const int TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 63; +const double NSFoundationVersionNumber10_4_8 = 567.28; -const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 64; +const double NSFoundationVersionNumber10_4_9 = 567.29; -const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 103; +const double NSFoundationVersionNumber10_4_10 = 567.29; -const int TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 104; +const double NSFoundationVersionNumber10_4_11 = 567.36; -const int TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 105; +const double NSFoundationVersionNumber10_5 = 677.0; -const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 106; +const double NSFoundationVersionNumber10_5_1 = 677.1; -const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 107; +const double NSFoundationVersionNumber10_5_2 = 677.15; -const int TLS_DH_anon_WITH_RC4_128_MD5 = 24; +const double NSFoundationVersionNumber10_5_3 = 677.19; -const int TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; +const double NSFoundationVersionNumber10_5_4 = 677.19; -const int TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 108; +const double NSFoundationVersionNumber10_5_5 = 677.21; -const int TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 109; +const double NSFoundationVersionNumber10_5_6 = 677.22; -const int TLS_PSK_WITH_RC4_128_SHA = 138; +const double NSFoundationVersionNumber10_5_7 = 677.24; -const int TLS_PSK_WITH_3DES_EDE_CBC_SHA = 139; +const double NSFoundationVersionNumber10_5_8 = 677.26; -const int TLS_PSK_WITH_AES_128_CBC_SHA = 140; +const double NSFoundationVersionNumber10_6 = 751.0; -const int TLS_PSK_WITH_AES_256_CBC_SHA = 141; +const double NSFoundationVersionNumber10_6_1 = 751.0; -const int TLS_DHE_PSK_WITH_RC4_128_SHA = 142; +const double NSFoundationVersionNumber10_6_2 = 751.14; -const int TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = 143; +const double NSFoundationVersionNumber10_6_3 = 751.21; -const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA = 144; +const double NSFoundationVersionNumber10_6_4 = 751.29; -const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA = 145; +const double NSFoundationVersionNumber10_6_5 = 751.42; -const int TLS_RSA_PSK_WITH_RC4_128_SHA = 146; +const double NSFoundationVersionNumber10_6_6 = 751.53; -const int TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = 147; +const double NSFoundationVersionNumber10_6_7 = 751.53; -const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA = 148; +const double NSFoundationVersionNumber10_6_8 = 751.62; -const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA = 149; +const double NSFoundationVersionNumber10_7 = 833.1; -const int TLS_PSK_WITH_NULL_SHA = 44; +const double NSFoundationVersionNumber10_7_1 = 833.1; -const int TLS_DHE_PSK_WITH_NULL_SHA = 45; +const double NSFoundationVersionNumber10_7_2 = 833.2; -const int TLS_RSA_PSK_WITH_NULL_SHA = 46; +const double NSFoundationVersionNumber10_7_3 = 833.24; -const int TLS_RSA_WITH_AES_128_GCM_SHA256 = 156; +const double NSFoundationVersionNumber10_7_4 = 833.25; -const int TLS_RSA_WITH_AES_256_GCM_SHA384 = 157; +const double NSFoundationVersionNumber10_8 = 945.0; -const int TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 158; +const double NSFoundationVersionNumber10_8_1 = 945.0; -const int TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 159; +const double NSFoundationVersionNumber10_8_2 = 945.11; -const int TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = 160; +const double NSFoundationVersionNumber10_8_3 = 945.16; -const int TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = 161; +const double NSFoundationVersionNumber10_8_4 = 945.18; -const int TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = 162; +const int NSFoundationVersionNumber10_9 = 1056; -const int TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = 163; +const int NSFoundationVersionNumber10_9_1 = 1056; -const int TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = 164; +const double NSFoundationVersionNumber10_9_2 = 1056.13; -const int TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = 165; +const double NSFoundationVersionNumber10_10 = 1151.16; -const int TLS_DH_anon_WITH_AES_128_GCM_SHA256 = 166; +const double NSFoundationVersionNumber10_10_1 = 1151.16; -const int TLS_DH_anon_WITH_AES_256_GCM_SHA384 = 167; +const double NSFoundationVersionNumber10_10_2 = 1152.14; -const int TLS_PSK_WITH_AES_128_GCM_SHA256 = 168; +const double NSFoundationVersionNumber10_10_3 = 1153.2; -const int TLS_PSK_WITH_AES_256_GCM_SHA384 = 169; +const double NSFoundationVersionNumber10_10_4 = 1153.2; -const int TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 170; +const int NSFoundationVersionNumber10_10_5 = 1154; -const int TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 171; +const int NSFoundationVersionNumber10_10_Max = 1199; -const int TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = 172; +const int NSFoundationVersionNumber10_11 = 1252; -const int TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = 173; +const double NSFoundationVersionNumber10_11_1 = 1255.1; -const int TLS_PSK_WITH_AES_128_CBC_SHA256 = 174; +const double NSFoundationVersionNumber10_11_2 = 1256.1; -const int TLS_PSK_WITH_AES_256_CBC_SHA384 = 175; +const double NSFoundationVersionNumber10_11_3 = 1256.1; -const int TLS_PSK_WITH_NULL_SHA256 = 176; +const int NSFoundationVersionNumber10_11_4 = 1258; -const int TLS_PSK_WITH_NULL_SHA384 = 177; +const int NSFoundationVersionNumber10_11_Max = 1299; -const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = 178; +const int __COREFOUNDATION_CFBASE__ = 1; -const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = 179; +const int UNIVERSAL_INTERFACES_VERSION = 1024; -const int TLS_DHE_PSK_WITH_NULL_SHA256 = 180; +const int PRAGMA_IMPORT = 0; -const int TLS_DHE_PSK_WITH_NULL_SHA384 = 181; +const int PRAGMA_ONCE = 0; -const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = 182; +const int PRAGMA_STRUCT_PACK = 1; -const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = 183; +const int PRAGMA_STRUCT_PACKPUSH = 1; -const int TLS_RSA_PSK_WITH_NULL_SHA256 = 184; +const int PRAGMA_STRUCT_ALIGN = 0; -const int TLS_RSA_PSK_WITH_NULL_SHA384 = 185; +const int PRAGMA_ENUM_PACK = 0; -const int TLS_AES_128_GCM_SHA256 = 4865; +const int PRAGMA_ENUM_ALWAYSINT = 0; -const int TLS_AES_256_GCM_SHA384 = 4866; +const int PRAGMA_ENUM_OPTIONS = 0; -const int TLS_CHACHA20_POLY1305_SHA256 = 4867; +const int TYPE_EXTENDED = 0; -const int TLS_AES_128_CCM_SHA256 = 4868; +const int TYPE_LONGDOUBLE_IS_DOUBLE = 0; -const int TLS_AES_128_CCM_8_SHA256 = 4869; +const int TYPE_LONGLONG = 1; -const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; +const int FUNCTION_PASCAL = 0; -const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; +const int FUNCTION_DECLSPEC = 0; -const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = -16347; +const int FUNCTION_WIN32CC = 0; -const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = -16346; +const int TARGET_API_MAC_OS8 = 0; -const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; +const int TARGET_API_MAC_CARBON = 1; -const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; +const int TARGET_API_MAC_OSX = 1; -const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = -16343; +const int TARGET_CARBON = 1; -const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = -16342; +const int OLDROUTINENAMES = 0; -const int TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; +const int OPAQUE_TOOLBOX_STRUCTS = 1; -const int TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; +const int OPAQUE_UPP_TYPES = 1; -const int TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = -16339; +const int ACCESSOR_CALLS_ARE_FUNCTIONS = 1; -const int TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = -16338; +const int CALL_NOT_IN_CARBON = 0; -const int TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; +const int MIXEDMODE_CALLS_ARE_FUNCTIONS = 1; -const int TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; +const int ALLOW_OBSOLETE_CARBON_MACMEMORY = 0; -const int TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = -16335; +const int ALLOW_OBSOLETE_CARBON_OSUTILS = 0; -const int TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = -16334; +const int NULL = 0; -const int TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = -13144; +const int kInvalidID = 0; -const int TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = -13143; +const int TRUE = 1; -const int TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 255; +const int FALSE = 0; -const int SSL_RSA_WITH_RC2_CBC_MD5 = -128; +const double kCFCoreFoundationVersionNumber10_0 = 196.4; -const int SSL_RSA_WITH_IDEA_CBC_MD5 = -127; +const double kCFCoreFoundationVersionNumber10_0_3 = 196.5; -const int SSL_RSA_WITH_DES_CBC_MD5 = -126; +const double kCFCoreFoundationVersionNumber10_1 = 226.0; -const int SSL_RSA_WITH_3DES_EDE_CBC_MD5 = -125; +const double kCFCoreFoundationVersionNumber10_1_1 = 226.0; -const int SSL_NO_SUCH_CIPHERSUITE = -1; +const double kCFCoreFoundationVersionNumber10_1_2 = 227.2; -const int NSASCIIStringEncoding = 1; +const double kCFCoreFoundationVersionNumber10_1_3 = 227.2; -const int NSNEXTSTEPStringEncoding = 2; +const double kCFCoreFoundationVersionNumber10_1_4 = 227.3; -const int NSJapaneseEUCStringEncoding = 3; +const double kCFCoreFoundationVersionNumber10_2 = 263.0; -const int NSUTF8StringEncoding = 4; +const double kCFCoreFoundationVersionNumber10_2_1 = 263.1; -const int NSISOLatin1StringEncoding = 5; +const double kCFCoreFoundationVersionNumber10_2_2 = 263.1; -const int NSSymbolStringEncoding = 6; +const double kCFCoreFoundationVersionNumber10_2_3 = 263.3; -const int NSNonLossyASCIIStringEncoding = 7; +const double kCFCoreFoundationVersionNumber10_2_4 = 263.3; -const int NSShiftJISStringEncoding = 8; +const double kCFCoreFoundationVersionNumber10_2_5 = 263.5; -const int NSISOLatin2StringEncoding = 9; +const double kCFCoreFoundationVersionNumber10_2_6 = 263.5; -const int NSUnicodeStringEncoding = 10; +const double kCFCoreFoundationVersionNumber10_2_7 = 263.5; -const int NSWindowsCP1251StringEncoding = 11; +const double kCFCoreFoundationVersionNumber10_2_8 = 263.5; -const int NSWindowsCP1252StringEncoding = 12; +const double kCFCoreFoundationVersionNumber10_3 = 299.0; -const int NSWindowsCP1253StringEncoding = 13; +const double kCFCoreFoundationVersionNumber10_3_1 = 299.0; -const int NSWindowsCP1254StringEncoding = 14; +const double kCFCoreFoundationVersionNumber10_3_2 = 299.0; -const int NSWindowsCP1250StringEncoding = 15; +const double kCFCoreFoundationVersionNumber10_3_3 = 299.3; -const int NSISO2022JPStringEncoding = 21; +const double kCFCoreFoundationVersionNumber10_3_4 = 299.31; -const int NSMacOSRomanStringEncoding = 30; +const double kCFCoreFoundationVersionNumber10_3_5 = 299.31; -const int NSUTF16StringEncoding = 10; +const double kCFCoreFoundationVersionNumber10_3_6 = 299.32; -const int NSUTF16BigEndianStringEncoding = 2415919360; +const double kCFCoreFoundationVersionNumber10_3_7 = 299.33; -const int NSUTF16LittleEndianStringEncoding = 2483028224; +const double kCFCoreFoundationVersionNumber10_3_8 = 299.33; -const int NSUTF32StringEncoding = 2348810496; +const double kCFCoreFoundationVersionNumber10_3_9 = 299.35; -const int NSUTF32BigEndianStringEncoding = 2550137088; +const double kCFCoreFoundationVersionNumber10_4 = 368.0; -const int NSUTF32LittleEndianStringEncoding = 2617245952; +const double kCFCoreFoundationVersionNumber10_4_1 = 368.1; -const int NSProprietaryStringEncoding = 65536; +const double kCFCoreFoundationVersionNumber10_4_2 = 368.11; -const int NSOpenStepUnicodeReservedBase = 62464; +const double kCFCoreFoundationVersionNumber10_4_3 = 368.18; -const int kNativeArgNumberPos = 0; +const double kCFCoreFoundationVersionNumber10_4_4_Intel = 368.26; -const int kNativeArgNumberSize = 8; +const double kCFCoreFoundationVersionNumber10_4_4_PowerPC = 368.25; -const int kNativeArgTypePos = 8; +const double kCFCoreFoundationVersionNumber10_4_5_Intel = 368.26; -const int kNativeArgTypeSize = 8; +const double kCFCoreFoundationVersionNumber10_4_5_PowerPC = 368.25; -const int DYNAMIC_TARGETS_ENABLED = 0; +const double kCFCoreFoundationVersionNumber10_4_6_Intel = 368.26; -const int TARGET_OS_MAC = 1; +const double kCFCoreFoundationVersionNumber10_4_6_PowerPC = 368.25; -const int TARGET_OS_WIN32 = 0; +const double kCFCoreFoundationVersionNumber10_4_7 = 368.27; -const int TARGET_OS_WINDOWS = 0; +const double kCFCoreFoundationVersionNumber10_4_8 = 368.27; -const int TARGET_OS_UNIX = 0; +const double kCFCoreFoundationVersionNumber10_4_9 = 368.28; -const int TARGET_OS_LINUX = 0; +const double kCFCoreFoundationVersionNumber10_4_10 = 368.28; -const int TARGET_OS_OSX = 1; +const double kCFCoreFoundationVersionNumber10_4_11 = 368.31; -const int TARGET_OS_IPHONE = 0; +const double kCFCoreFoundationVersionNumber10_5 = 476.0; -const int TARGET_OS_IOS = 0; +const double kCFCoreFoundationVersionNumber10_5_1 = 476.0; -const int TARGET_OS_WATCH = 0; +const double kCFCoreFoundationVersionNumber10_5_2 = 476.1; -const int TARGET_OS_TV = 0; +const double kCFCoreFoundationVersionNumber10_5_3 = 476.13; -const int TARGET_OS_MACCATALYST = 0; +const double kCFCoreFoundationVersionNumber10_5_4 = 476.14; -const int TARGET_OS_UIKITFORMAC = 0; +const double kCFCoreFoundationVersionNumber10_5_5 = 476.15; -const int TARGET_OS_SIMULATOR = 0; +const double kCFCoreFoundationVersionNumber10_5_6 = 476.17; -const int TARGET_OS_EMBEDDED = 0; +const double kCFCoreFoundationVersionNumber10_5_7 = 476.18; -const int TARGET_OS_RTKIT = 0; +const double kCFCoreFoundationVersionNumber10_5_8 = 476.19; -const int TARGET_OS_DRIVERKIT = 0; +const double kCFCoreFoundationVersionNumber10_6 = 550.0; -const int TARGET_IPHONE_SIMULATOR = 0; +const double kCFCoreFoundationVersionNumber10_6_1 = 550.0; -const int TARGET_OS_NANO = 0; +const double kCFCoreFoundationVersionNumber10_6_2 = 550.13; -const int TARGET_ABI_USES_IOS_VALUES = 1; +const double kCFCoreFoundationVersionNumber10_6_3 = 550.19; -const int TARGET_CPU_PPC = 0; +const double kCFCoreFoundationVersionNumber10_6_4 = 550.29; -const int TARGET_CPU_PPC64 = 0; +const double kCFCoreFoundationVersionNumber10_6_5 = 550.42; -const int TARGET_CPU_68K = 0; +const double kCFCoreFoundationVersionNumber10_6_6 = 550.42; -const int TARGET_CPU_X86 = 0; +const double kCFCoreFoundationVersionNumber10_6_7 = 550.42; -const int TARGET_CPU_X86_64 = 0; +const double kCFCoreFoundationVersionNumber10_6_8 = 550.43; -const int TARGET_CPU_ARM = 0; +const double kCFCoreFoundationVersionNumber10_7 = 635.0; -const int TARGET_CPU_ARM64 = 1; +const double kCFCoreFoundationVersionNumber10_7_1 = 635.0; -const int TARGET_CPU_MIPS = 0; +const double kCFCoreFoundationVersionNumber10_7_2 = 635.15; -const int TARGET_CPU_SPARC = 0; +const double kCFCoreFoundationVersionNumber10_7_3 = 635.19; -const int TARGET_CPU_ALPHA = 0; +const double kCFCoreFoundationVersionNumber10_7_4 = 635.21; -const int TARGET_RT_MAC_CFM = 0; +const double kCFCoreFoundationVersionNumber10_7_5 = 635.21; -const int TARGET_RT_MAC_MACHO = 1; +const double kCFCoreFoundationVersionNumber10_8 = 744.0; -const int TARGET_RT_LITTLE_ENDIAN = 1; +const double kCFCoreFoundationVersionNumber10_8_1 = 744.0; -const int TARGET_RT_BIG_ENDIAN = 0; +const double kCFCoreFoundationVersionNumber10_8_2 = 744.12; -const int TARGET_RT_64_BIT = 1; +const double kCFCoreFoundationVersionNumber10_8_3 = 744.18; -const int __API_TO_BE_DEPRECATED = 100000; +const double kCFCoreFoundationVersionNumber10_8_4 = 744.19; -const int __API_TO_BE_DEPRECATED_MACOS = 100000; +const double kCFCoreFoundationVersionNumber10_9 = 855.11; -const int __API_TO_BE_DEPRECATED_IOS = 100000; +const double kCFCoreFoundationVersionNumber10_9_1 = 855.11; -const int __API_TO_BE_DEPRECATED_TVOS = 100000; +const double kCFCoreFoundationVersionNumber10_9_2 = 855.14; -const int __API_TO_BE_DEPRECATED_WATCHOS = 100000; +const double kCFCoreFoundationVersionNumber10_10 = 1151.16; -const int __API_TO_BE_DEPRECATED_MACCATALYST = 100000; +const double kCFCoreFoundationVersionNumber10_10_1 = 1151.16; -const int __API_TO_BE_DEPRECATED_DRIVERKIT = 100000; +const int kCFCoreFoundationVersionNumber10_10_2 = 1152; -const int __MAC_10_0 = 1000; +const double kCFCoreFoundationVersionNumber10_10_3 = 1153.18; -const int __MAC_10_1 = 1010; +const double kCFCoreFoundationVersionNumber10_10_4 = 1153.18; -const int __MAC_10_2 = 1020; +const double kCFCoreFoundationVersionNumber10_10_5 = 1153.18; -const int __MAC_10_3 = 1030; +const int kCFCoreFoundationVersionNumber10_10_Max = 1199; -const int __MAC_10_4 = 1040; +const int kCFCoreFoundationVersionNumber10_11 = 1253; -const int __MAC_10_5 = 1050; +const double kCFCoreFoundationVersionNumber10_11_1 = 1255.1; -const int __MAC_10_6 = 1060; +const double kCFCoreFoundationVersionNumber10_11_2 = 1256.14; -const int __MAC_10_7 = 1070; +const double kCFCoreFoundationVersionNumber10_11_3 = 1256.14; -const int __MAC_10_8 = 1080; +const double kCFCoreFoundationVersionNumber10_11_4 = 1258.1; -const int __MAC_10_9 = 1090; +const int kCFCoreFoundationVersionNumber10_11_Max = 1299; -const int __MAC_10_10 = 101000; +const int ISA_PTRAUTH_DISCRIMINATOR = 27361; -const int __MAC_10_10_2 = 101002; +const double NSTimeIntervalSince1970 = 978307200.0; -const int __MAC_10_10_3 = 101003; +const int __COREFOUNDATION_CFARRAY__ = 1; -const int __MAC_10_11 = 101100; +const int OS_OBJECT_HAVE_OBJC_SUPPORT = 0; -const int __MAC_10_11_2 = 101102; +const int OS_OBJECT_USE_OBJC = 0; -const int __MAC_10_11_3 = 101103; +const int OS_OBJECT_SWIFT3 = 0; -const int __MAC_10_11_4 = 101104; +const int OS_OBJECT_USE_OBJC_RETAIN_RELEASE = 0; -const int __MAC_10_12 = 101200; +const int SEC_OS_IPHONE = 0; -const int __MAC_10_12_1 = 101201; +const int SEC_OS_OSX = 1; -const int __MAC_10_12_2 = 101202; +const int SEC_OS_OSX_INCLUDES = 1; -const int __MAC_10_12_4 = 101204; +const int SECURITY_TYPE_UNIFICATION = 1; -const int __MAC_10_13 = 101300; +const int __COREFOUNDATION_COREFOUNDATION__ = 1; -const int __MAC_10_13_1 = 101301; +const int __COREFOUNDATION__ = 1; -const int __MAC_10_13_2 = 101302; +const String __ASSERT_FILE_NAME = 'temp_for_macros.hpp'; -const int __MAC_10_13_4 = 101304; +const int __DARWIN_WCHAR_MAX = 2147483647; -const int __MAC_10_14 = 101400; +const int __DARWIN_WCHAR_MIN = -2147483648; -const int __MAC_10_14_1 = 101401; +const int _FORTIFY_SOURCE = 2; -const int __MAC_10_14_4 = 101404; +const int _CACHED_RUNES = 256; -const int __MAC_10_14_6 = 101406; +const int _CRMASK = -256; -const int __MAC_10_15 = 101500; +const String _RUNE_MAGIC_A = 'RuneMagA'; -const int __MAC_10_15_1 = 101501; +const int _CTYPE_A = 256; -const int __MAC_10_15_4 = 101504; +const int _CTYPE_C = 512; -const int __MAC_10_16 = 101600; +const int _CTYPE_D = 1024; -const int __MAC_11_0 = 110000; +const int _CTYPE_G = 2048; -const int __MAC_11_1 = 110100; +const int _CTYPE_L = 4096; -const int __MAC_11_3 = 110300; +const int _CTYPE_P = 8192; -const int __MAC_11_4 = 110400; +const int _CTYPE_S = 16384; -const int __MAC_11_5 = 110500; +const int _CTYPE_U = 32768; -const int __MAC_11_6 = 110600; +const int _CTYPE_X = 65536; -const int __MAC_12_0 = 120000; +const int _CTYPE_B = 131072; -const int __MAC_12_1 = 120100; +const int _CTYPE_R = 262144; -const int __MAC_12_2 = 120200; +const int _CTYPE_I = 524288; -const int __MAC_12_3 = 120300; +const int _CTYPE_T = 1048576; -const int __MAC_13_0 = 130000; +const int _CTYPE_Q = 2097152; -const int __IPHONE_2_0 = 20000; +const int _CTYPE_SW0 = 536870912; -const int __IPHONE_2_1 = 20100; +const int _CTYPE_SW1 = 1073741824; -const int __IPHONE_2_2 = 20200; +const int _CTYPE_SW2 = 2147483648; -const int __IPHONE_3_0 = 30000; +const int _CTYPE_SW3 = 3221225472; -const int __IPHONE_3_1 = 30100; +const int _CTYPE_SWM = 3758096384; -const int __IPHONE_3_2 = 30200; +const int _CTYPE_SWS = 30; -const int __IPHONE_4_0 = 40000; +const int EPERM = 1; -const int __IPHONE_4_1 = 40100; +const int ENOENT = 2; -const int __IPHONE_4_2 = 40200; +const int ESRCH = 3; -const int __IPHONE_4_3 = 40300; +const int EINTR = 4; -const int __IPHONE_5_0 = 50000; +const int EIO = 5; -const int __IPHONE_5_1 = 50100; +const int ENXIO = 6; -const int __IPHONE_6_0 = 60000; +const int E2BIG = 7; -const int __IPHONE_6_1 = 60100; +const int ENOEXEC = 8; -const int __IPHONE_7_0 = 70000; +const int EBADF = 9; -const int __IPHONE_7_1 = 70100; +const int ECHILD = 10; -const int __IPHONE_8_0 = 80000; +const int EDEADLK = 11; -const int __IPHONE_8_1 = 80100; +const int ENOMEM = 12; -const int __IPHONE_8_2 = 80200; +const int EACCES = 13; -const int __IPHONE_8_3 = 80300; +const int EFAULT = 14; -const int __IPHONE_8_4 = 80400; +const int ENOTBLK = 15; -const int __IPHONE_9_0 = 90000; +const int EBUSY = 16; -const int __IPHONE_9_1 = 90100; +const int EEXIST = 17; -const int __IPHONE_9_2 = 90200; +const int EXDEV = 18; -const int __IPHONE_9_3 = 90300; +const int ENODEV = 19; -const int __IPHONE_10_0 = 100000; +const int ENOTDIR = 20; -const int __IPHONE_10_1 = 100100; +const int EISDIR = 21; -const int __IPHONE_10_2 = 100200; +const int EINVAL = 22; -const int __IPHONE_10_3 = 100300; +const int ENFILE = 23; -const int __IPHONE_11_0 = 110000; +const int EMFILE = 24; -const int __IPHONE_11_1 = 110100; +const int ENOTTY = 25; -const int __IPHONE_11_2 = 110200; +const int ETXTBSY = 26; -const int __IPHONE_11_3 = 110300; +const int EFBIG = 27; -const int __IPHONE_11_4 = 110400; +const int ENOSPC = 28; -const int __IPHONE_12_0 = 120000; +const int ESPIPE = 29; -const int __IPHONE_12_1 = 120100; +const int EROFS = 30; -const int __IPHONE_12_2 = 120200; +const int EMLINK = 31; -const int __IPHONE_12_3 = 120300; +const int EPIPE = 32; -const int __IPHONE_12_4 = 120400; +const int EDOM = 33; -const int __IPHONE_13_0 = 130000; +const int ERANGE = 34; -const int __IPHONE_13_1 = 130100; +const int EAGAIN = 35; -const int __IPHONE_13_2 = 130200; +const int EWOULDBLOCK = 35; -const int __IPHONE_13_3 = 130300; +const int EINPROGRESS = 36; -const int __IPHONE_13_4 = 130400; +const int EALREADY = 37; -const int __IPHONE_13_5 = 130500; +const int ENOTSOCK = 38; -const int __IPHONE_13_6 = 130600; +const int EDESTADDRREQ = 39; -const int __IPHONE_13_7 = 130700; +const int EMSGSIZE = 40; -const int __IPHONE_14_0 = 140000; +const int EPROTOTYPE = 41; -const int __IPHONE_14_1 = 140100; +const int ENOPROTOOPT = 42; -const int __IPHONE_14_2 = 140200; +const int EPROTONOSUPPORT = 43; -const int __IPHONE_14_3 = 140300; +const int ESOCKTNOSUPPORT = 44; -const int __IPHONE_14_5 = 140500; +const int ENOTSUP = 45; -const int __IPHONE_14_6 = 140600; +const int EPFNOSUPPORT = 46; -const int __IPHONE_14_7 = 140700; +const int EAFNOSUPPORT = 47; -const int __IPHONE_14_8 = 140800; +const int EADDRINUSE = 48; -const int __IPHONE_15_0 = 150000; +const int EADDRNOTAVAIL = 49; -const int __IPHONE_15_1 = 150100; +const int ENETDOWN = 50; -const int __IPHONE_15_2 = 150200; +const int ENETUNREACH = 51; -const int __IPHONE_15_3 = 150300; +const int ENETRESET = 52; -const int __IPHONE_15_4 = 150400; +const int ECONNABORTED = 53; -const int __IPHONE_16_0 = 160000; +const int ECONNRESET = 54; -const int __IPHONE_16_1 = 160100; +const int ENOBUFS = 55; -const int __TVOS_9_0 = 90000; +const int EISCONN = 56; -const int __TVOS_9_1 = 90100; +const int ENOTCONN = 57; -const int __TVOS_9_2 = 90200; +const int ESHUTDOWN = 58; -const int __TVOS_10_0 = 100000; +const int ETOOMANYREFS = 59; -const int __TVOS_10_0_1 = 100001; +const int ETIMEDOUT = 60; -const int __TVOS_10_1 = 100100; +const int ECONNREFUSED = 61; -const int __TVOS_10_2 = 100200; +const int ELOOP = 62; -const int __TVOS_11_0 = 110000; +const int ENAMETOOLONG = 63; -const int __TVOS_11_1 = 110100; +const int EHOSTDOWN = 64; -const int __TVOS_11_2 = 110200; +const int EHOSTUNREACH = 65; -const int __TVOS_11_3 = 110300; +const int ENOTEMPTY = 66; -const int __TVOS_11_4 = 110400; +const int EPROCLIM = 67; -const int __TVOS_12_0 = 120000; +const int EUSERS = 68; -const int __TVOS_12_1 = 120100; +const int EDQUOT = 69; -const int __TVOS_12_2 = 120200; +const int ESTALE = 70; -const int __TVOS_12_3 = 120300; +const int EREMOTE = 71; -const int __TVOS_12_4 = 120400; +const int EBADRPC = 72; -const int __TVOS_13_0 = 130000; +const int ERPCMISMATCH = 73; -const int __TVOS_13_2 = 130200; +const int EPROGUNAVAIL = 74; -const int __TVOS_13_3 = 130300; +const int EPROGMISMATCH = 75; -const int __TVOS_13_4 = 130400; +const int EPROCUNAVAIL = 76; -const int __TVOS_14_0 = 140000; +const int ENOLCK = 77; -const int __TVOS_14_1 = 140100; +const int ENOSYS = 78; -const int __TVOS_14_2 = 140200; +const int EFTYPE = 79; -const int __TVOS_14_3 = 140300; +const int EAUTH = 80; -const int __TVOS_14_5 = 140500; +const int ENEEDAUTH = 81; -const int __TVOS_14_6 = 140600; +const int EPWROFF = 82; -const int __TVOS_14_7 = 140700; +const int EDEVERR = 83; -const int __TVOS_15_0 = 150000; +const int EOVERFLOW = 84; -const int __TVOS_15_1 = 150100; +const int EBADEXEC = 85; -const int __TVOS_15_2 = 150200; +const int EBADARCH = 86; -const int __TVOS_15_3 = 150300; +const int ESHLIBVERS = 87; -const int __TVOS_15_4 = 150400; +const int EBADMACHO = 88; -const int __TVOS_16_0 = 160000; +const int ECANCELED = 89; -const int __TVOS_16_1 = 160100; +const int EIDRM = 90; -const int __WATCHOS_1_0 = 10000; +const int ENOMSG = 91; -const int __WATCHOS_2_0 = 20000; +const int EILSEQ = 92; -const int __WATCHOS_2_1 = 20100; +const int ENOATTR = 93; -const int __WATCHOS_2_2 = 20200; +const int EBADMSG = 94; -const int __WATCHOS_3_0 = 30000; +const int EMULTIHOP = 95; -const int __WATCHOS_3_1 = 30100; +const int ENODATA = 96; -const int __WATCHOS_3_1_1 = 30101; +const int ENOLINK = 97; -const int __WATCHOS_3_2 = 30200; +const int ENOSR = 98; -const int __WATCHOS_4_0 = 40000; +const int ENOSTR = 99; -const int __WATCHOS_4_1 = 40100; +const int EPROTO = 100; -const int __WATCHOS_4_2 = 40200; +const int ETIME = 101; -const int __WATCHOS_4_3 = 40300; +const int EOPNOTSUPP = 102; -const int __WATCHOS_5_0 = 50000; +const int ENOPOLICY = 103; -const int __WATCHOS_5_1 = 50100; +const int ENOTRECOVERABLE = 104; -const int __WATCHOS_5_2 = 50200; +const int EOWNERDEAD = 105; -const int __WATCHOS_5_3 = 50300; +const int EQFULL = 106; -const int __WATCHOS_6_0 = 60000; +const int ELAST = 106; -const int __WATCHOS_6_1 = 60100; +const int FLT_EVAL_METHOD = 0; -const int __WATCHOS_6_2 = 60200; +const int FLT_RADIX = 2; -const int __WATCHOS_7_0 = 70000; +const int FLT_MANT_DIG = 24; -const int __WATCHOS_7_1 = 70100; +const int DBL_MANT_DIG = 53; -const int __WATCHOS_7_2 = 70200; +const int LDBL_MANT_DIG = 53; -const int __WATCHOS_7_3 = 70300; +const int FLT_DIG = 6; -const int __WATCHOS_7_4 = 70400; +const int DBL_DIG = 15; -const int __WATCHOS_7_5 = 70500; +const int LDBL_DIG = 15; -const int __WATCHOS_7_6 = 70600; +const int FLT_MIN_EXP = -125; -const int __WATCHOS_8_0 = 80000; +const int DBL_MIN_EXP = -1021; -const int __WATCHOS_8_1 = 80100; +const int LDBL_MIN_EXP = -1021; -const int __WATCHOS_8_3 = 80300; +const int FLT_MIN_10_EXP = -37; -const int __WATCHOS_8_4 = 80400; +const int DBL_MIN_10_EXP = -307; -const int __WATCHOS_8_5 = 80500; +const int LDBL_MIN_10_EXP = -307; -const int __WATCHOS_9_0 = 90000; +const int FLT_MAX_EXP = 128; -const int __WATCHOS_9_1 = 90100; +const int DBL_MAX_EXP = 1024; -const int MAC_OS_X_VERSION_10_0 = 1000; +const int LDBL_MAX_EXP = 1024; -const int MAC_OS_X_VERSION_10_1 = 1010; +const int FLT_MAX_10_EXP = 38; -const int MAC_OS_X_VERSION_10_2 = 1020; +const int DBL_MAX_10_EXP = 308; -const int MAC_OS_X_VERSION_10_3 = 1030; +const int LDBL_MAX_10_EXP = 308; -const int MAC_OS_X_VERSION_10_4 = 1040; +const double FLT_MAX = 3.4028234663852886e+38; -const int MAC_OS_X_VERSION_10_5 = 1050; +const double DBL_MAX = 1.7976931348623157e+308; -const int MAC_OS_X_VERSION_10_6 = 1060; +const double LDBL_MAX = 1.7976931348623157e+308; -const int MAC_OS_X_VERSION_10_7 = 1070; +const double FLT_EPSILON = 1.1920928955078125e-7; -const int MAC_OS_X_VERSION_10_8 = 1080; +const double DBL_EPSILON = 2.220446049250313e-16; -const int MAC_OS_X_VERSION_10_9 = 1090; +const double LDBL_EPSILON = 2.220446049250313e-16; -const int MAC_OS_X_VERSION_10_10 = 101000; +const double FLT_MIN = 1.1754943508222875e-38; -const int MAC_OS_X_VERSION_10_10_2 = 101002; +const double DBL_MIN = 2.2250738585072014e-308; -const int MAC_OS_X_VERSION_10_10_3 = 101003; +const double LDBL_MIN = 2.2250738585072014e-308; -const int MAC_OS_X_VERSION_10_11 = 101100; +const int DECIMAL_DIG = 17; -const int MAC_OS_X_VERSION_10_11_2 = 101102; +const int FLT_HAS_SUBNORM = 1; -const int MAC_OS_X_VERSION_10_11_3 = 101103; +const int DBL_HAS_SUBNORM = 1; -const int MAC_OS_X_VERSION_10_11_4 = 101104; +const int LDBL_HAS_SUBNORM = 1; -const int MAC_OS_X_VERSION_10_12 = 101200; +const double FLT_TRUE_MIN = 1.401298464324817e-45; -const int MAC_OS_X_VERSION_10_12_1 = 101201; +const double DBL_TRUE_MIN = 5e-324; -const int MAC_OS_X_VERSION_10_12_2 = 101202; +const double LDBL_TRUE_MIN = 5e-324; -const int MAC_OS_X_VERSION_10_12_4 = 101204; +const int FLT_DECIMAL_DIG = 9; -const int MAC_OS_X_VERSION_10_13 = 101300; +const int DBL_DECIMAL_DIG = 17; -const int MAC_OS_X_VERSION_10_13_1 = 101301; +const int LDBL_DECIMAL_DIG = 17; -const int MAC_OS_X_VERSION_10_13_2 = 101302; +const int LC_ALL = 0; -const int MAC_OS_X_VERSION_10_13_4 = 101304; +const int LC_COLLATE = 1; -const int MAC_OS_X_VERSION_10_14 = 101400; +const int LC_CTYPE = 2; -const int MAC_OS_X_VERSION_10_14_1 = 101401; +const int LC_MONETARY = 3; -const int MAC_OS_X_VERSION_10_14_4 = 101404; +const int LC_NUMERIC = 4; -const int MAC_OS_X_VERSION_10_14_6 = 101406; +const int LC_TIME = 5; -const int MAC_OS_X_VERSION_10_15 = 101500; +const int LC_MESSAGES = 6; -const int MAC_OS_X_VERSION_10_15_1 = 101501; +const int _LC_LAST = 7; -const int MAC_OS_X_VERSION_10_16 = 101600; +const double HUGE_VAL = double.infinity; -const int MAC_OS_VERSION_11_0 = 110000; +const double HUGE_VALF = double.infinity; -const int MAC_OS_VERSION_12_0 = 120000; +const double HUGE_VALL = double.infinity; -const int MAC_OS_VERSION_13_0 = 130000; +const double NAN = double.nan; -const int __DRIVERKIT_19_0 = 190000; +const double INFINITY = double.infinity; -const int __DRIVERKIT_20_0 = 200000; +const int FP_NAN = 1; -const int __DRIVERKIT_21_0 = 210000; +const int FP_INFINITE = 2; -const int __MAC_OS_X_VERSION_MIN_REQUIRED = 130000; +const int FP_ZERO = 3; -const int __MAC_OS_X_VERSION_MAX_ALLOWED = 130000; +const int FP_NORMAL = 4; -const int __ENABLE_LEGACY_MAC_AVAILABILITY = 1; +const int FP_SUBNORMAL = 5; -const int __DARWIN_ONLY_64_BIT_INO_T = 1; +const int FP_SUPERNORMAL = 6; -const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; +const int FP_FAST_FMA = 1; -const int __DARWIN_ONLY_VERS_1050 = 1; +const int FP_FAST_FMAF = 1; -const int __DARWIN_UNIX03 = 1; +const int FP_FAST_FMAL = 1; -const int __DARWIN_64_BIT_INO_T = 1; +const int FP_ILOGB0 = -2147483648; -const int __DARWIN_VERS_1050 = 1; +const int FP_ILOGBNAN = -2147483648; -const int __DARWIN_NON_CANCELABLE = 0; +const int MATH_ERRNO = 1; -const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN'; +const int MATH_ERREXCEPT = 2; -const int __DARWIN_C_ANSI = 4096; +const double M_E = 2.718281828459045; -const int __DARWIN_C_FULL = 900000; +const double M_LOG2E = 1.4426950408889634; -const int __DARWIN_C_LEVEL = 900000; +const double M_LOG10E = 0.4342944819032518; -const int __STDC_WANT_LIB_EXT1__ = 1; +const double M_LN2 = 0.6931471805599453; -const int __DARWIN_NO_LONG_LONG = 0; +const double M_LN10 = 2.302585092994046; -const int _DARWIN_FEATURE_64_BIT_INODE = 1; +const double M_PI = 3.141592653589793; -const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1; +const double M_PI_2 = 1.5707963267948966; -const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1; +const double M_PI_4 = 0.7853981633974483; -const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1; +const double M_1_PI = 0.3183098861837907; -const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3; +const double M_2_PI = 0.6366197723675814; -const int __has_ptrcheck = 0; +const double M_2_SQRTPI = 1.1283791670955126; -const int __DARWIN_NULL = 0; +const double M_SQRT2 = 1.4142135623730951; -const int __PTHREAD_SIZE__ = 8176; +const double M_SQRT1_2 = 0.7071067811865476; -const int __PTHREAD_ATTR_SIZE__ = 56; +const double MAXFLOAT = 3.4028234663852886e+38; -const int __PTHREAD_MUTEXATTR_SIZE__ = 8; +const int FP_SNAN = 1; -const int __PTHREAD_MUTEX_SIZE__ = 56; +const int FP_QNAN = 1; -const int __PTHREAD_CONDATTR_SIZE__ = 8; +const double HUGE = 3.4028234663852886e+38; -const int __PTHREAD_COND_SIZE__ = 40; +const double X_TLOSS = 14148475504056880.0; -const int __PTHREAD_ONCE_SIZE__ = 8; +const int DOMAIN = 1; -const int __PTHREAD_RWLOCK_SIZE__ = 192; +const int SING = 2; -const int __PTHREAD_RWLOCKATTR_SIZE__ = 16; +const int OVERFLOW = 3; -const int __DARWIN_WCHAR_MAX = 2147483647; +const int UNDERFLOW = 4; -const int __DARWIN_WCHAR_MIN = -2147483648; +const int TLOSS = 5; -const int __DARWIN_WEOF = -1; +const int PLOSS = 6; -const int _FORTIFY_SOURCE = 2; +const int _JBLEN = 48; const int __DARWIN_NSIG = 32; @@ -89604,8 +89964,6 @@ const int SIGUSR1 = 30; const int SIGUSR2 = 31; -const int USER_ADDR_NULL = 0; - const int __DARWIN_OPAQUE_ARM_THREAD_STATE64 = 0; const int SIGEV_NONE = 0; @@ -89750,111 +90108,75 @@ const int SV_NOCLDSTOP = 8; const int SV_SIGINFO = 64; -const int __WORDSIZE = 64; - -const int INT8_MAX = 127; - -const int INT16_MAX = 32767; - -const int INT32_MAX = 2147483647; - -const int INT64_MAX = 9223372036854775807; - -const int INT8_MIN = -128; - -const int INT16_MIN = -32768; - -const int INT32_MIN = -2147483648; - -const int INT64_MIN = -9223372036854775808; - -const int UINT8_MAX = 255; - -const int UINT16_MAX = 65535; - -const int UINT32_MAX = 4294967295; - -const int UINT64_MAX = -1; - -const int INT_LEAST8_MIN = -128; - -const int INT_LEAST16_MIN = -32768; - -const int INT_LEAST32_MIN = -2147483648; - -const int INT_LEAST64_MIN = -9223372036854775808; - -const int INT_LEAST8_MAX = 127; - -const int INT_LEAST16_MAX = 32767; +const int RENAME_SECLUDE = 1; -const int INT_LEAST32_MAX = 2147483647; +const int RENAME_SWAP = 2; -const int INT_LEAST64_MAX = 9223372036854775807; +const int RENAME_EXCL = 4; -const int UINT_LEAST8_MAX = 255; +const int RENAME_RESERVED1 = 8; -const int UINT_LEAST16_MAX = 65535; +const int RENAME_NOFOLLOW_ANY = 16; -const int UINT_LEAST32_MAX = 4294967295; +const int __SLBF = 1; -const int UINT_LEAST64_MAX = -1; +const int __SNBF = 2; -const int INT_FAST8_MIN = -128; +const int __SRD = 4; -const int INT_FAST16_MIN = -32768; +const int __SWR = 8; -const int INT_FAST32_MIN = -2147483648; +const int __SRW = 16; -const int INT_FAST64_MIN = -9223372036854775808; +const int __SEOF = 32; -const int INT_FAST8_MAX = 127; +const int __SERR = 64; -const int INT_FAST16_MAX = 32767; +const int __SMBF = 128; -const int INT_FAST32_MAX = 2147483647; +const int __SAPP = 256; -const int INT_FAST64_MAX = 9223372036854775807; +const int __SSTR = 512; -const int UINT_FAST8_MAX = 255; +const int __SOPT = 1024; -const int UINT_FAST16_MAX = 65535; +const int __SNPT = 2048; -const int UINT_FAST32_MAX = 4294967295; +const int __SOFF = 4096; -const int UINT_FAST64_MAX = -1; +const int __SMOD = 8192; -const int INTPTR_MAX = 9223372036854775807; +const int __SALC = 16384; -const int INTPTR_MIN = -9223372036854775808; +const int __SIGN = 32768; -const int UINTPTR_MAX = -1; +const int _IOFBF = 0; -const int INTMAX_MAX = 9223372036854775807; +const int _IOLBF = 1; -const int UINTMAX_MAX = -1; +const int _IONBF = 2; -const int INTMAX_MIN = -9223372036854775808; +const int BUFSIZ = 1024; -const int PTRDIFF_MIN = -9223372036854775808; +const int EOF = -1; -const int PTRDIFF_MAX = 9223372036854775807; +const int FOPEN_MAX = 20; -const int SIZE_MAX = -1; +const int FILENAME_MAX = 1024; -const int RSIZE_MAX = 9223372036854775807; +const String P_tmpdir = '/var/tmp/'; -const int WCHAR_MAX = 2147483647; +const int L_tmpnam = 1024; -const int WCHAR_MIN = -2147483648; +const int TMP_MAX = 308915776; -const int WINT_MIN = -2147483648; +const int SEEK_SET = 0; -const int WINT_MAX = 2147483647; +const int SEEK_CUR = 1; -const int SIG_ATOMIC_MIN = -2147483648; +const int SEEK_END = 2; -const int SIG_ATOMIC_MAX = 2147483647; +const int L_ctermid = 1024; const int PRIO_PROCESS = 0; @@ -89890,18 +90212,10 @@ const int RUSAGE_INFO_V4 = 4; const int RUSAGE_INFO_V5 = 5; -const int RUSAGE_INFO_V6 = 6; - -const int RUSAGE_INFO_CURRENT = 6; +const int RUSAGE_INFO_CURRENT = 5; const int RU_PROC_RUNS_RESLIDE = 1; -const int RLIM_INFINITY = 9223372036854775807; - -const int RLIM_SAVED_MAX = 9223372036854775807; - -const int RLIM_SAVED_CUR = 9223372036854775807; - const int RLIMIT_CPU = 0; const int RLIMIT_FSIZE = 1; @@ -89966,8 +90280,6 @@ const int IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE = 8; const int IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES = 9; -const int IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY = 10; - const int IOPOL_SCOPE_PROCESS = 0; const int IOPOL_SCOPE_THREAD = 1; @@ -90024,10 +90336,6 @@ const int IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF = 0; const int IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON = 1; -const int IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT = 0; - -const int IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON = 1; - const int WNOHANG = 1; const int WUNTRACED = 2; @@ -90048,87 +90356,13 @@ const int WAIT_ANY = -1; const int WAIT_MYPGRP = 0; -const int _QUAD_HIGHWORD = 1; - -const int _QUAD_LOWWORD = 0; - -const int __DARWIN_LITTLE_ENDIAN = 1234; - -const int __DARWIN_BIG_ENDIAN = 4321; - -const int __DARWIN_PDP_ENDIAN = 3412; - -const int __DARWIN_BYTE_ORDER = 1234; - -const int LITTLE_ENDIAN = 1234; - -const int BIG_ENDIAN = 4321; - -const int PDP_ENDIAN = 3412; - -const int BYTE_ORDER = 1234; - -const int NULL = 0; - const int EXIT_FAILURE = 1; const int EXIT_SUCCESS = 0; const int RAND_MAX = 2147483647; -const int __DARWIN_FD_SETSIZE = 1024; - -const int __DARWIN_NBBY = 8; - -const int __DARWIN_NFDBITS = 32; - -const int NBBY = 8; - -const int NFDBITS = 32; - -const int FD_SETSIZE = 1024; - -const int true1 = 1; - -const int false1 = 0; - -const int __bool_true_false_are_defined = 1; - -const int __GNUC_VA_LIST = 1; - -const int _POSIX_THREAD_KEYS_MAX = 128; - -const int API_TO_BE_DEPRECATED = 100000; - -const int API_TO_BE_DEPRECATED_MACOS = 100000; - -const int API_TO_BE_DEPRECATED_IOS = 100000; - -const int API_TO_BE_DEPRECATED_TVOS = 100000; - -const int API_TO_BE_DEPRECATED_WATCHOS = 100000; - -const int API_TO_BE_DEPRECATED_DRIVERKIT = 100000; - -const int TRUE = 1; - -const int FALSE = 0; - -const int OS_OBJECT_HAVE_OBJC_SUPPORT = 0; - -const int OS_OBJECT_USE_OBJC = 0; - -const int OS_OBJECT_SWIFT3 = 0; - -const int OS_OBJECT_USE_OBJC_RETAIN_RELEASE = 0; - -const String __ASSERT_FILE_NAME = 'temp_for_macros.hpp'; - -const int SEEK_SET = 0; - -const int SEEK_CUR = 1; - -const int SEEK_END = 2; +const int TIME_UTC = 1; const String __PRI_8_LENGTH_MODIFIER__ = 'hh'; @@ -90448,47 +90682,57 @@ const String SCNuMAX = 'ju'; const String SCNxMAX = 'jx'; -const int MACH_PORT_NULL = 0; +const int __COREFOUNDATION_CFBAG__ = 1; + +const int __COREFOUNDATION_CFBINARYHEAP__ = 1; + +const int __COREFOUNDATION_CFBITVECTOR__ = 1; + +const int __COREFOUNDATION_CFBYTEORDER__ = 1; -const int MACH_PORT_DEAD = 4294967295; +const int CF_USE_OSBYTEORDER_H = 1; -const int MACH_PORT_RIGHT_SEND = 0; +const int __COREFOUNDATION_CFCALENDAR__ = 1; -const int MACH_PORT_RIGHT_RECEIVE = 1; +const int __COREFOUNDATION_CFLOCALE__ = 1; -const int MACH_PORT_RIGHT_SEND_ONCE = 2; +const int __COREFOUNDATION_CFDICTIONARY__ = 1; -const int MACH_PORT_RIGHT_PORT_SET = 3; +const int __COREFOUNDATION_CFNOTIFICATIONCENTER__ = 1; -const int MACH_PORT_RIGHT_DEAD_NAME = 4; +const int __COREFOUNDATION_CFDATE__ = 1; -const int MACH_PORT_RIGHT_LABELH = 5; +const int __COREFOUNDATION_CFTIMEZONE__ = 1; -const int MACH_PORT_RIGHT_NUMBER = 6; +const int __COREFOUNDATION_CFDATA__ = 1; -const int MACH_PORT_TYPE_NONE = 0; +const int __COREFOUNDATION_CFSTRING__ = 1; -const int MACH_PORT_TYPE_SEND = 65536; +const int __COREFOUNDATION_CFCHARACTERSET__ = 1; -const int MACH_PORT_TYPE_RECEIVE = 131072; +const int kCFStringEncodingInvalidId = 4294967295; -const int MACH_PORT_TYPE_SEND_ONCE = 262144; +const int __kCFStringInlineBufferLength = 64; -const int MACH_PORT_TYPE_PORT_SET = 524288; +const int __COREFOUNDATION_CFDATEFORMATTER__ = 1; -const int MACH_PORT_TYPE_DEAD_NAME = 1048576; +const int __COREFOUNDATION_CFERROR__ = 1; -const int MACH_PORT_TYPE_LABELH = 2097152; +const int __COREFOUNDATION_CFNUMBER__ = 1; -const int MACH_PORT_TYPE_SEND_RECEIVE = 196608; +const int __COREFOUNDATION_CFNUMBERFORMATTER__ = 1; -const int MACH_PORT_TYPE_SEND_RIGHTS = 327680; +const int __COREFOUNDATION_CFPREFERENCES__ = 1; -const int MACH_PORT_TYPE_PORT_RIGHTS = 458752; +const int __COREFOUNDATION_CFPROPERTYLIST__ = 1; -const int MACH_PORT_TYPE_PORT_OR_DEAD = 1507328; +const int __COREFOUNDATION_CFSTREAM__ = 1; -const int MACH_PORT_TYPE_ALL_RIGHTS = 2031616; +const int __COREFOUNDATION_CFURL__ = 1; + +const int __COREFOUNDATION_CFRUNLOOP__ = 1; + +const int MACH_PORT_NULL = 0; const int MACH_PORT_TYPE_DNREQUEST = 2147483648; @@ -90548,20 +90792,10 @@ const int MACH_PORT_INFO_EXT = 7; const int MACH_PORT_GUARD_INFO = 8; -const int MACH_PORT_LIMITS_INFO_COUNT = 1; - -const int MACH_PORT_RECEIVE_STATUS_COUNT = 10; - const int MACH_PORT_DNREQUESTS_SIZE_COUNT = 1; -const int MACH_PORT_INFO_EXT_COUNT = 17; - -const int MACH_PORT_GUARD_INFO_COUNT = 2; - const int MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN = 255; -const int MACH_SERVICE_PORT_INFO_COUNT = 0; - const int MPO_CONTEXT_AS_GUARD = 1; const int MPO_QLIMIT = 2; @@ -90586,12 +90820,6 @@ const int MPO_SERVICE_PORT = 1024; const int MPO_CONNECTION_PORT = 2048; -const int MPO_REPLY_PORT = 4096; - -const int MPO_ENFORCE_REPLY_PORT_SEMANTICS = 8192; - -const int MPO_PROVISIONAL_REPLY_PORT = 16384; - const int GUARD_TYPE_MACH_PORT = 1; const int MAX_FATAL_kGUARD_EXC_CODE = 128; @@ -90624,6 +90852,8 @@ const int MPG_STRICT = 1; const int MPG_IMMOVABLE_RECEIVE = 2; +const int __COREFOUNDATION_CFSOCKET__ = 1; + const int _POSIX_VERSION = 200112; const int _POSIX2_VERSION = 200112; @@ -91306,10 +91536,6 @@ const int O_CLOEXEC = 16777216; const int O_NOFOLLOW_ANY = 536870912; -const int O_EXEC = 1073741824; - -const int O_SEARCH = 1074790400; - const int AT_FDCWD = -2; const int AT_EACCESS = 16; @@ -91330,10 +91556,6 @@ const int O_DP_GETRAWENCRYPTED = 1; const int O_DP_GETRAWUNENCRYPTED = 2; -const int O_DP_AUTHENTICATE = 4; - -const int AUTH_OPEN_NOAUTHFD = -1; - const int FAPPEND = 8; const int FASYNC = 64; @@ -91458,11 +91680,7 @@ const int F_ADDFILESUPPL = 104; const int F_GETSIGSINFO = 105; -const int F_SETLEASE = 106; - -const int F_GETLEASE = 107; - -const int F_TRANSFEREXTENTS = 110; +const int F_FSRESERVED = 106; const int FCNTL_FS_SPECIFIC_BASE = 65536; @@ -91536,8 +91754,6 @@ const int F_ALLOCATECONTIG = 2; const int F_ALLOCATEALL = 4; -const int F_ALLOCATEPERSIST = 8; - const int F_PEOFPOSMODE = 3; const int F_VOLPOSMODE = 4; @@ -91558,8 +91774,6 @@ const int O_POPUP = 2147483648; const int O_ALERT = 536870912; -const int FILESEC_GUID = 3; - const int DISPATCH_API_VERSION = 20181008; const int __OS_WORKGROUP_ATTR_SIZE__ = 60; @@ -91744,8 +91958,6 @@ const int KERN_NOT_FOUND = 56; const int KERN_RETURN_MAX = 256; -const int MACH_MSG_TIMEOUT_NONE = 0; - const int MACH_MSGH_BITS_ZERO = 0; const int MACH_MSGH_BITS_REMOTE_MASK = 31; @@ -91772,8 +91984,6 @@ const int MACH_MSGH_BITS_CIRCULAR = 268435456; const int MACH_MSGH_BITS_USED = 2954829599; -const int MACH_MSG_PRIORITY_UNSPECIFIED = 0; - const int MACH_MSG_TYPE_MOVE_RECEIVE = 16; const int MACH_MSG_TYPE_MOVE_SEND = 17; @@ -91820,22 +92030,8 @@ const int MACH_MSG_OOL_VOLATILE_DESCRIPTOR = 3; const int MACH_MSG_GUARDED_PORT_DESCRIPTOR = 4; -const int MACH_MSG_DESCRIPTOR_MAX = 4; - const int MACH_MSG_TRAILER_FORMAT_0 = 0; -const int MACH_MSG_FILTER_POLICY_ALLOW = 0; - -const int MACH_MSG_TRAILER_MINIMUM_SIZE = 8; - -const int MAX_TRAILER_SIZE = 68; - -const int MACH_MSG_TRAILER_FORMAT_0_SIZE = 20; - -const int MACH_MSG_SIZE_MAX = 4294967295; - -const int MACH_MSG_SIZE_RELIABLE = 262144; - const int MACH_MSGH_KIND_NORMAL = 0; const int MACH_MSGH_KIND_NOTIFICATION = 1; @@ -91852,8 +92048,6 @@ const int MACH_MSG_TYPE_PORT_SEND_ONCE = 18; const int MACH_MSG_TYPE_LAST = 22; -const int MACH_MSG_TYPE_POLYMORPHIC = 4294967295; - const int MACH_MSG_OPTION_NONE = 0; const int MACH_SEND_MSG = 1; @@ -91974,18 +92168,12 @@ const int MACH_SEND_INVALID_TRAILER = 268435473; const int MACH_SEND_INVALID_CONTEXT = 268435474; -const int MACH_SEND_INVALID_OPTIONS = 268435475; - const int MACH_SEND_INVALID_RT_OOL_SIZE = 268435477; const int MACH_SEND_NO_GRANT_DEST = 268435478; const int MACH_SEND_MSG_FILTERED = 268435479; -const int MACH_SEND_AUX_TOO_SMALL = 268435480; - -const int MACH_SEND_AUX_TOO_LARGE = 268435481; - const int MACH_RCV_IN_PROGRESS = 268451841; const int MACH_RCV_INVALID_NAME = 268451842; @@ -92020,8 +92208,6 @@ const int MACH_RCV_IN_PROGRESS_TIMED = 268451857; const int MACH_RCV_INVALID_REPLY = 268451858; -const int MACH_RCV_INVALID_ARGUMENTS = 268451859; - const int DISPATCH_MACH_SEND_DEAD = 1; const int DISPATCH_MEMORYPRESSURE_NORMAL = 1; @@ -92068,14 +92254,666 @@ const int DISPATCH_IO_STOP = 1; const int DISPATCH_IO_STRICT_INTERVAL = 1; +const int __COREFOUNDATION_CFSET__ = 1; + +const int __COREFOUNDATION_CFSTRINGENCODINGEXT__ = 1; + +const int __COREFOUNDATION_CFTREE__ = 1; + +const int __COREFOUNDATION_CFURLACCESS__ = 1; + +const int __COREFOUNDATION_CFUUID__ = 1; + +const int __COREFOUNDATION_CFUTILITIES__ = 1; + +const int __COREFOUNDATION_CFBUNDLE__ = 1; + +const int CPU_STATE_MAX = 4; + +const int CPU_STATE_USER = 0; + +const int CPU_STATE_SYSTEM = 1; + +const int CPU_STATE_IDLE = 2; + +const int CPU_STATE_NICE = 3; + +const int CPU_ARCH_MASK = 4278190080; + +const int CPU_ARCH_ABI64 = 16777216; + +const int CPU_ARCH_ABI64_32 = 33554432; + +const int CPU_SUBTYPE_MASK = 4278190080; + +const int CPU_SUBTYPE_LIB64 = 2147483648; + +const int CPU_SUBTYPE_PTRAUTH_ABI = 2147483648; + +const int CPU_SUBTYPE_INTEL_FAMILY_MAX = 15; + +const int CPU_SUBTYPE_INTEL_MODEL_ALL = 0; + +const int CPU_SUBTYPE_ARM64_PTR_AUTH_MASK = 251658240; + +const int CPUFAMILY_UNKNOWN = 0; + +const int CPUFAMILY_POWERPC_G3 = 3471054153; + +const int CPUFAMILY_POWERPC_G4 = 2009171118; + +const int CPUFAMILY_POWERPC_G5 = 3983988906; + +const int CPUFAMILY_INTEL_6_13 = 2855483691; + +const int CPUFAMILY_INTEL_PENRYN = 2028621756; + +const int CPUFAMILY_INTEL_NEHALEM = 1801080018; + +const int CPUFAMILY_INTEL_WESTMERE = 1463508716; + +const int CPUFAMILY_INTEL_SANDYBRIDGE = 1418770316; + +const int CPUFAMILY_INTEL_IVYBRIDGE = 526772277; + +const int CPUFAMILY_INTEL_HASWELL = 280134364; + +const int CPUFAMILY_INTEL_BROADWELL = 1479463068; + +const int CPUFAMILY_INTEL_SKYLAKE = 939270559; + +const int CPUFAMILY_INTEL_KABYLAKE = 260141638; + +const int CPUFAMILY_INTEL_ICELAKE = 943936839; + +const int CPUFAMILY_INTEL_COMETLAKE = 486055998; + +const int CPUFAMILY_ARM_9 = 3878847406; + +const int CPUFAMILY_ARM_11 = 2415272152; + +const int CPUFAMILY_ARM_XSCALE = 1404044789; + +const int CPUFAMILY_ARM_12 = 3172666089; + +const int CPUFAMILY_ARM_13 = 214503012; + +const int CPUFAMILY_ARM_14 = 2517073649; + +const int CPUFAMILY_ARM_15 = 2823887818; + +const int CPUFAMILY_ARM_SWIFT = 506291073; + +const int CPUFAMILY_ARM_CYCLONE = 933271106; + +const int CPUFAMILY_ARM_TYPHOON = 747742334; + +const int CPUFAMILY_ARM_TWISTER = 2465937352; + +const int CPUFAMILY_ARM_HURRICANE = 1741614739; + +const int CPUFAMILY_ARM_MONSOON_MISTRAL = 3894312694; + +const int CPUFAMILY_ARM_VORTEX_TEMPEST = 131287967; + +const int CPUFAMILY_ARM_LIGHTNING_THUNDER = 1176831186; + +const int CPUFAMILY_ARM_FIRESTORM_ICESTORM = 458787763; + +const int CPUFAMILY_ARM_BLIZZARD_AVALANCHE = 3660830781; + +const int CPUSUBFAMILY_UNKNOWN = 0; + +const int CPUSUBFAMILY_ARM_HP = 1; + +const int CPUSUBFAMILY_ARM_HG = 2; + +const int CPUSUBFAMILY_ARM_M = 3; + +const int CPUSUBFAMILY_ARM_HS = 4; + +const int CPUSUBFAMILY_ARM_HC_HD = 5; + +const int CPUFAMILY_INTEL_6_23 = 2028621756; + +const int CPUFAMILY_INTEL_6_26 = 1801080018; + +const int __COREFOUNDATION_CFMESSAGEPORT__ = 1; + +const int __COREFOUNDATION_CFPLUGIN__ = 1; + +const int COREFOUNDATION_CFPLUGINCOM_SEPARATE = 1; + +const int __COREFOUNDATION_CFMACHPORT__ = 1; + +const int __COREFOUNDATION_CFATTRIBUTEDSTRING__ = 1; + +const int __COREFOUNDATION_CFURLENUMERATOR__ = 1; + +const int __COREFOUNDATION_CFFILESECURITY__ = 1; + +const int KAUTH_GUID_SIZE = 16; + +const int KAUTH_NTSID_MAX_AUTHORITIES = 16; + +const int KAUTH_NTSID_HDRSIZE = 8; + +const int KAUTH_EXTLOOKUP_SUCCESS = 0; + +const int KAUTH_EXTLOOKUP_BADRQ = 1; + +const int KAUTH_EXTLOOKUP_FAILURE = 2; + +const int KAUTH_EXTLOOKUP_FATAL = 3; + +const int KAUTH_EXTLOOKUP_INPROG = 100; + +const int KAUTH_EXTLOOKUP_VALID_UID = 1; + +const int KAUTH_EXTLOOKUP_VALID_UGUID = 2; + +const int KAUTH_EXTLOOKUP_VALID_USID = 4; + +const int KAUTH_EXTLOOKUP_VALID_GID = 8; + +const int KAUTH_EXTLOOKUP_VALID_GGUID = 16; + +const int KAUTH_EXTLOOKUP_VALID_GSID = 32; + +const int KAUTH_EXTLOOKUP_WANT_UID = 64; + +const int KAUTH_EXTLOOKUP_WANT_UGUID = 128; + +const int KAUTH_EXTLOOKUP_WANT_USID = 256; + +const int KAUTH_EXTLOOKUP_WANT_GID = 512; + +const int KAUTH_EXTLOOKUP_WANT_GGUID = 1024; + +const int KAUTH_EXTLOOKUP_WANT_GSID = 2048; + +const int KAUTH_EXTLOOKUP_WANT_MEMBERSHIP = 4096; + +const int KAUTH_EXTLOOKUP_VALID_MEMBERSHIP = 8192; + +const int KAUTH_EXTLOOKUP_ISMEMBER = 16384; + +const int KAUTH_EXTLOOKUP_VALID_PWNAM = 32768; + +const int KAUTH_EXTLOOKUP_WANT_PWNAM = 65536; + +const int KAUTH_EXTLOOKUP_VALID_GRNAM = 131072; + +const int KAUTH_EXTLOOKUP_WANT_GRNAM = 262144; + +const int KAUTH_EXTLOOKUP_VALID_SUPGRPS = 524288; + +const int KAUTH_EXTLOOKUP_WANT_SUPGRPS = 1048576; + +const int KAUTH_EXTLOOKUP_REGISTER = 0; + +const int KAUTH_EXTLOOKUP_RESULT = 1; + +const int KAUTH_EXTLOOKUP_WORKER = 2; + +const int KAUTH_EXTLOOKUP_DEREGISTER = 4; + +const int KAUTH_GET_CACHE_SIZES = 8; + +const int KAUTH_SET_CACHE_SIZES = 16; + +const int KAUTH_CLEAR_CACHES = 32; + +const String IDENTITYSVC_ENTITLEMENT = 'com.apple.private.identitysvc'; + +const int KAUTH_ACE_KINDMASK = 15; + +const int KAUTH_ACE_PERMIT = 1; + +const int KAUTH_ACE_DENY = 2; + +const int KAUTH_ACE_AUDIT = 3; + +const int KAUTH_ACE_ALARM = 4; + +const int KAUTH_ACE_INHERITED = 16; + +const int KAUTH_ACE_FILE_INHERIT = 32; + +const int KAUTH_ACE_DIRECTORY_INHERIT = 64; + +const int KAUTH_ACE_LIMIT_INHERIT = 128; + +const int KAUTH_ACE_ONLY_INHERIT = 256; + +const int KAUTH_ACE_SUCCESS = 512; + +const int KAUTH_ACE_FAILURE = 1024; + +const int KAUTH_ACE_INHERIT_CONTROL_FLAGS = 480; + +const int KAUTH_ACE_GENERIC_ALL = 2097152; + +const int KAUTH_ACE_GENERIC_EXECUTE = 4194304; + +const int KAUTH_ACE_GENERIC_WRITE = 8388608; + +const int KAUTH_ACE_GENERIC_READ = 16777216; + +const int KAUTH_ACL_MAX_ENTRIES = 128; + +const int KAUTH_ACL_FLAGS_PRIVATE = 65535; + +const int KAUTH_ACL_DEFER_INHERIT = 65536; + +const int KAUTH_ACL_NO_INHERIT = 131072; + +const int KAUTH_FILESEC_MAGIC = 19710317; + +const int KAUTH_FILESEC_FLAGS_PRIVATE = 65535; + +const int KAUTH_FILESEC_DEFER_INHERIT = 65536; + +const int KAUTH_FILESEC_NO_INHERIT = 131072; + +const String KAUTH_FILESEC_XATTR = 'com.apple.system.Security'; + +const int KAUTH_ENDIAN_HOST = 1; + +const int KAUTH_ENDIAN_DISK = 2; + +const int KAUTH_VNODE_READ_DATA = 2; + +const int KAUTH_VNODE_LIST_DIRECTORY = 2; + +const int KAUTH_VNODE_WRITE_DATA = 4; + +const int KAUTH_VNODE_ADD_FILE = 4; + +const int KAUTH_VNODE_EXECUTE = 8; + +const int KAUTH_VNODE_SEARCH = 8; + +const int KAUTH_VNODE_DELETE = 16; + +const int KAUTH_VNODE_APPEND_DATA = 32; + +const int KAUTH_VNODE_ADD_SUBDIRECTORY = 32; + +const int KAUTH_VNODE_DELETE_CHILD = 64; + +const int KAUTH_VNODE_READ_ATTRIBUTES = 128; + +const int KAUTH_VNODE_WRITE_ATTRIBUTES = 256; + +const int KAUTH_VNODE_READ_EXTATTRIBUTES = 512; + +const int KAUTH_VNODE_WRITE_EXTATTRIBUTES = 1024; + +const int KAUTH_VNODE_READ_SECURITY = 2048; + +const int KAUTH_VNODE_WRITE_SECURITY = 4096; + +const int KAUTH_VNODE_TAKE_OWNERSHIP = 8192; + +const int KAUTH_VNODE_CHANGE_OWNER = 8192; + +const int KAUTH_VNODE_SYNCHRONIZE = 1048576; + +const int KAUTH_VNODE_LINKTARGET = 33554432; + +const int KAUTH_VNODE_CHECKIMMUTABLE = 67108864; + +const int KAUTH_VNODE_ACCESS = 2147483648; + +const int KAUTH_VNODE_NOIMMUTABLE = 1073741824; + +const int KAUTH_VNODE_SEARCHBYANYONE = 536870912; + +const int KAUTH_VNODE_GENERIC_READ_BITS = 2690; + +const int KAUTH_VNODE_GENERIC_WRITE_BITS = 5492; + +const int KAUTH_VNODE_GENERIC_EXECUTE_BITS = 8; + +const int KAUTH_VNODE_GENERIC_ALL_BITS = 8190; + +const int KAUTH_VNODE_WRITE_RIGHTS = 100676980; + +const int __DARWIN_ACL_READ_DATA = 2; + +const int __DARWIN_ACL_LIST_DIRECTORY = 2; + +const int __DARWIN_ACL_WRITE_DATA = 4; + +const int __DARWIN_ACL_ADD_FILE = 4; + +const int __DARWIN_ACL_EXECUTE = 8; + +const int __DARWIN_ACL_SEARCH = 8; + +const int __DARWIN_ACL_DELETE = 16; + +const int __DARWIN_ACL_APPEND_DATA = 32; + +const int __DARWIN_ACL_ADD_SUBDIRECTORY = 32; + +const int __DARWIN_ACL_DELETE_CHILD = 64; + +const int __DARWIN_ACL_READ_ATTRIBUTES = 128; + +const int __DARWIN_ACL_WRITE_ATTRIBUTES = 256; + +const int __DARWIN_ACL_READ_EXTATTRIBUTES = 512; + +const int __DARWIN_ACL_WRITE_EXTATTRIBUTES = 1024; + +const int __DARWIN_ACL_READ_SECURITY = 2048; + +const int __DARWIN_ACL_WRITE_SECURITY = 4096; + +const int __DARWIN_ACL_CHANGE_OWNER = 8192; + +const int __DARWIN_ACL_SYNCHRONIZE = 1048576; + +const int __DARWIN_ACL_EXTENDED_ALLOW = 1; + +const int __DARWIN_ACL_EXTENDED_DENY = 2; + +const int __DARWIN_ACL_ENTRY_INHERITED = 16; + +const int __DARWIN_ACL_ENTRY_FILE_INHERIT = 32; + +const int __DARWIN_ACL_ENTRY_DIRECTORY_INHERIT = 64; + +const int __DARWIN_ACL_ENTRY_LIMIT_INHERIT = 128; + +const int __DARWIN_ACL_ENTRY_ONLY_INHERIT = 256; + +const int __DARWIN_ACL_FLAG_NO_INHERIT = 131072; + +const int ACL_MAX_ENTRIES = 128; + +const int ACL_UNDEFINED_ID = 0; + +const int __COREFOUNDATION_CFSTRINGTOKENIZER__ = 1; + +const int __COREFOUNDATION_CFFILEDESCRIPTOR__ = 1; + +const int __COREFOUNDATION_CFUSERNOTIFICATION__ = 1; + +const int __COREFOUNDATION_CFXMLNODE__ = 1; + +const int __COREFOUNDATION_CFXMLPARSER__ = 1; + +const int _CSSMTYPE_H_ = 1; + +const int _CSSMCONFIG_H_ = 1; + +const int SEC_ASN1_TAG_MASK = 255; + +const int SEC_ASN1_TAGNUM_MASK = 31; + +const int SEC_ASN1_BOOLEAN = 1; + +const int SEC_ASN1_INTEGER = 2; + +const int SEC_ASN1_BIT_STRING = 3; + +const int SEC_ASN1_OCTET_STRING = 4; + +const int SEC_ASN1_NULL = 5; + +const int SEC_ASN1_OBJECT_ID = 6; + +const int SEC_ASN1_OBJECT_DESCRIPTOR = 7; + +const int SEC_ASN1_REAL = 9; + +const int SEC_ASN1_ENUMERATED = 10; + +const int SEC_ASN1_EMBEDDED_PDV = 11; + +const int SEC_ASN1_UTF8_STRING = 12; + +const int SEC_ASN1_SEQUENCE = 16; + +const int SEC_ASN1_SET = 17; + +const int SEC_ASN1_NUMERIC_STRING = 18; + +const int SEC_ASN1_PRINTABLE_STRING = 19; + +const int SEC_ASN1_T61_STRING = 20; + +const int SEC_ASN1_VIDEOTEX_STRING = 21; + +const int SEC_ASN1_IA5_STRING = 22; + +const int SEC_ASN1_UTC_TIME = 23; + +const int SEC_ASN1_GENERALIZED_TIME = 24; + +const int SEC_ASN1_GRAPHIC_STRING = 25; + +const int SEC_ASN1_VISIBLE_STRING = 26; + +const int SEC_ASN1_GENERAL_STRING = 27; + +const int SEC_ASN1_UNIVERSAL_STRING = 28; + +const int SEC_ASN1_BMP_STRING = 30; + +const int SEC_ASN1_HIGH_TAG_NUMBER = 31; + +const int SEC_ASN1_TELETEX_STRING = 20; + +const int SEC_ASN1_METHOD_MASK = 32; + +const int SEC_ASN1_PRIMITIVE = 0; + +const int SEC_ASN1_CONSTRUCTED = 32; + +const int SEC_ASN1_CLASS_MASK = 192; + +const int SEC_ASN1_UNIVERSAL = 0; + +const int SEC_ASN1_APPLICATION = 64; + +const int SEC_ASN1_CONTEXT_SPECIFIC = 128; + +const int SEC_ASN1_PRIVATE = 192; + +const int SEC_ASN1_OPTIONAL = 256; + +const int SEC_ASN1_EXPLICIT = 512; + +const int SEC_ASN1_ANY = 1024; + +const int SEC_ASN1_INLINE = 2048; + +const int SEC_ASN1_POINTER = 4096; + +const int SEC_ASN1_GROUP = 8192; + +const int SEC_ASN1_DYNAMIC = 16384; + +const int SEC_ASN1_SKIP = 32768; + +const int SEC_ASN1_INNER = 65536; + +const int SEC_ASN1_SAVE = 131072; + +const int SEC_ASN1_SKIP_REST = 524288; + +const int SEC_ASN1_CHOICE = 1048576; + +const int SEC_ASN1_SIGNED_INT = 8388608; + +const int SEC_ASN1_SEQUENCE_OF = 8208; + +const int SEC_ASN1_SET_OF = 8209; + +const int SEC_ASN1_ANY_CONTENTS = 66560; + +const int _CSSMAPPLE_H_ = 1; + +const int _CSSMERR_H_ = 1; + +const int _X509DEFS_H_ = 1; + +const int BER_TAG_UNKNOWN = 0; + +const int BER_TAG_BOOLEAN = 1; + +const int BER_TAG_INTEGER = 2; + +const int BER_TAG_BIT_STRING = 3; + +const int BER_TAG_OCTET_STRING = 4; + +const int BER_TAG_NULL = 5; + +const int BER_TAG_OID = 6; + +const int BER_TAG_OBJECT_DESCRIPTOR = 7; + +const int BER_TAG_EXTERNAL = 8; + +const int BER_TAG_REAL = 9; + +const int BER_TAG_ENUMERATED = 10; + +const int BER_TAG_PKIX_UTF8_STRING = 12; + +const int BER_TAG_SEQUENCE = 16; + +const int BER_TAG_SET = 17; + +const int BER_TAG_NUMERIC_STRING = 18; + +const int BER_TAG_PRINTABLE_STRING = 19; + +const int BER_TAG_T61_STRING = 20; + +const int BER_TAG_TELETEX_STRING = 20; + +const int BER_TAG_VIDEOTEX_STRING = 21; + +const int BER_TAG_IA5_STRING = 22; + +const int BER_TAG_UTC_TIME = 23; + +const int BER_TAG_GENERALIZED_TIME = 24; + +const int BER_TAG_GRAPHIC_STRING = 25; + +const int BER_TAG_ISO646_STRING = 26; + +const int BER_TAG_GENERAL_STRING = 27; + +const int BER_TAG_VISIBLE_STRING = 26; + +const int BER_TAG_PKIX_UNIVERSAL_STRING = 28; + +const int BER_TAG_PKIX_BMP_STRING = 30; + +const int CE_KU_DigitalSignature = 32768; + +const int CE_KU_NonRepudiation = 16384; + +const int CE_KU_KeyEncipherment = 8192; + +const int CE_KU_DataEncipherment = 4096; + +const int CE_KU_KeyAgreement = 2048; + +const int CE_KU_KeyCertSign = 1024; + +const int CE_KU_CRLSign = 512; + +const int CE_KU_EncipherOnly = 256; + +const int CE_KU_DecipherOnly = 128; + +const int CE_CR_Unspecified = 0; + +const int CE_CR_KeyCompromise = 1; + +const int CE_CR_CACompromise = 2; + +const int CE_CR_AffiliationChanged = 3; + +const int CE_CR_Superseded = 4; + +const int CE_CR_CessationOfOperation = 5; + +const int CE_CR_CertificateHold = 6; + +const int CE_CR_RemoveFromCRL = 8; + +const int CE_CD_Unspecified = 128; + +const int CE_CD_KeyCompromise = 64; + +const int CE_CD_CACompromise = 32; + +const int CE_CD_AffiliationChanged = 16; + +const int CE_CD_Superseded = 8; + +const int CE_CD_CessationOfOperation = 4; + +const int CE_CD_CertificateHold = 2; + +const int CSSM_APPLE_TP_SSL_OPTS_VERSION = 1; + +const int CSSM_APPLE_TP_SSL_CLIENT = 1; + +const int CSSM_APPLE_TP_CRL_OPTS_VERSION = 0; + +const int CSSM_APPLE_TP_SMIME_OPTS_VERSION = 0; + +const int CSSM_APPLE_TP_ACTION_VERSION = 0; + +const int CSSM_TP_APPLE_EVIDENCE_VERSION = 0; + +const int CSSM_EVIDENCE_FORM_APPLE_CUSTOM = 2147483648; + +const String CSSM_APPLE_CRL_END_OF_TIME = '99991231235959'; + +const String kKeychainSuffix = '.keychain'; + +const String kKeychainDbSuffix = '.keychain-db'; + +const String kSystemKeychainName = 'System.keychain'; + +const String kSystemKeychainDir = '/Library/Keychains/'; + +const String kSystemUnlockFile = '/var/db/SystemKey'; + +const String kSystemKeychainPath = '/Library/Keychains/System.keychain'; + +const String CSSM_APPLE_ACL_TAG_PARTITION_ID = '___PARTITION___'; + +const String CSSM_APPLE_ACL_TAG_INTEGRITY = '___INTEGRITY___'; + +const int errSecErrnoBase = 100000; + +const int errSecErrnoLimit = 100255; + +const int SEC_PROTOCOL_CERT_COMPRESSION_DEFAULT = 1; + +const int NSMaximumStringLength = 2147483646; + +const int NS_UNICHAR_IS_EIGHT_BIT = 0; + const int NSURLResponseUnknownLength = -1; const int DART_FLAGS_CURRENT_VERSION = 12; const int DART_INITIALIZE_PARAMS_CURRENT_VERSION = 4; -const int ILLEGAL_PORT = 0; - const String DART_KERNEL_ISOLATE_NAME = 'kernel-service'; const String DART_VM_SERVICE_ISOLATE_NAME = 'vm-service'; diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m deleted file mode 100644 index b05d1fc717..0000000000 --- a/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPCompletionHelper.m" diff --git a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m index e04d3f3a8c..a1eff15f9a 100644 --- a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m +++ b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m @@ -7,9 +7,15 @@ #import #include -#import "CUPHTTPCompletionHelper.h" #import "CUPHTTPForwardedDelegate.h" +static Dart_CObject NSObjectToCObject(NSObject* n) { + Dart_CObject cobj; + cobj.type = Dart_CObject_kInt64; + cobj.value.as_int64 = (int64_t) n; + return cobj; +} + static Dart_CObject MessageTypeToCObject(MessageType messageType) { Dart_CObject cobj; cobj.type = Dart_CObject_kInt64; diff --git a/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h b/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h deleted file mode 100644 index 501b80b1fc..0000000000 --- a/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Normally, we'd "import " -// but that would mean that ffigen would process every file in the Foundation -// framework, which is huge. So just import the headers that we need. -#import -#import - -#include "dart-sdk/include/dart_api_dl.h" - -/** - * Creates a `Dart_CObject` containing the given `NSObject` pointer as an int. - */ -Dart_CObject NSObjectToCObject(NSObject* n); - -/** - * Executes [NSURLSessionWebSocketTask sendMessage:completionHandler:] and - * sends the results of the completion handler to the given `Dart_Port`. - */ -extern void CUPHTTPSendMessage(NSURLSessionWebSocketTask *task, - NSURLSessionWebSocketMessage *message, - Dart_Port sendPort); - -/** - * Executes [NSURLSessionWebSocketTask receiveMessageWithCompletionHandler:] - * and sends the results of the completion handler to the given `Dart_Port`. - */ -extern void CUPHTTPReceiveMessage(NSURLSessionWebSocketTask *task, - Dart_Port sendPort); diff --git a/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m deleted file mode 100644 index 9f8137d395..0000000000 --- a/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -#import "CUPHTTPCompletionHelper.h" - -#import -#include - -Dart_CObject NSObjectToCObject(NSObject* n) { - Dart_CObject cobj; - cobj.type = Dart_CObject_kInt64; - cobj.value.as_int64 = (int64_t) n; - return cobj; -} - -void CUPHTTPSendMessage(NSURLSessionWebSocketTask *task, NSURLSessionWebSocketMessage *message, Dart_Port sendPort) { - [task sendMessage: message - completionHandler: ^(NSError *error) { - [error retain]; - Dart_CObject message_cobj = NSObjectToCObject(error); - const bool success = Dart_PostCObject_DL(sendPort, &message_cobj); - NSCAssert(success, @"Dart_PostCObject_DL failed."); - }]; -} - -void CUPHTTPReceiveMessage(NSURLSessionWebSocketTask *task, Dart_Port sendPort) { - [task - receiveMessageWithCompletionHandler: ^(NSURLSessionWebSocketMessage *message, NSError *error) { - [message retain]; - [error retain]; - - Dart_CObject cmessage = NSObjectToCObject(message); - Dart_CObject cerror = NSObjectToCObject(error); - Dart_CObject* message_carray[] = { &cmessage, &cerror }; - - Dart_CObject message_cobj; - message_cobj.type = Dart_CObject_kArray; - message_cobj.value.as_array.length = 2; - message_cobj.value.as_array.values = message_carray; - - const bool success = Dart_PostCObject_DL(sendPort, &message_cobj); - NSCAssert(success, @"Dart_PostCObject_DL failed."); - }]; -} From 8916d31f349afdb310f42ad53eeb72fb8f91020a Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Wed, 17 May 2023 10:40:10 -0700 Subject: [PATCH 221/448] blast_repo fixes (#933) dependabot --- .github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..90dffc5097 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# Dependabot configuration file. +# See https://docs.github.com/en/code-security/dependabot/dependabot-version-updates + +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + labels: + - autosubmit From 90db1d1046e0dcd3edb6d0e0b1417afc3fe66495 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 22 May 2023 10:28:35 -0700 Subject: [PATCH 222/448] Disable package:cupertino_http tests because they are failing at head (#940) --- .github/workflows/cupertino.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 3dca4aa9e9..b9f0d81b12 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -45,7 +45,7 @@ jobs: test: # Test package:cupertino_http use flutter integration tests. needs: analyze - name: "Build and test" + name: "Build and test (disabled!)" runs-on: macos-latest defaults: run: @@ -61,4 +61,6 @@ jobs: # pins version 1.21.1 or later of 'package:test' channel: 'master' - name: Run tests - run: flutter test integration_test/ + # TODO: Renable tests when https://github.com/dart-lang/http/issues/938 + # is fixed. + run: echo flutter test integration_test/ From db38fe32de79344162bb2a7e0da12f43117fba65 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 22 May 2023 11:16:14 -0700 Subject: [PATCH 223/448] Increment package:http version to 1.0.0 (#928) --- pkgs/cronet_http/pubspec.yaml | 2 +- pkgs/cupertino_http/pubspec.yaml | 2 +- pkgs/http/pubspec.yaml | 2 +- pkgs/http_client_conformance_tests/pubspec.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 9745e61a9e..92632011cf 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - http: ^0.13.4 + http: '>=0.13.4 <2.0.0' dev_dependencies: dart_flutter_team_lints: ^1.0.0 diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index cd107fe350..2b7d0e8374 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: ffi: ^2.0.1 flutter: sdk: flutter - http: ^0.13.4 + http: '>=0.13.4 <2.0.0' meta: ^1.7.0 dev_dependencies: diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index ef6adfddee..08f7dd87c7 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 0.13.6 +version: 1.0.0 description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index 6265c08313..42640597ce 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -11,7 +11,7 @@ environment: dependencies: async: ^2.8.2 dart_style: ^2.2.3 - http: ^0.13.4 + http: '>=0.13.4 <2.0.0' stream_channel: ^2.1.1 test: ^1.21.2 From 85e3db2516a8d5e49e44f6a63be979721fb8e9e9 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 22 May 2023 14:12:17 -0700 Subject: [PATCH 224/448] Update CHANGELOG for 0.2.1 release (#941) --- pkgs/cronet_http/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 3be15bc399..9d99e4f4f1 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,6 +1,7 @@ -## 0.2.1-dev +## 0.2.1 * Require Dart 2.19 +* Support `package:http` 1.0.0 ## 0.2.0 From 4f087b91c319e849624eb4e8aae15c9d01429219 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 22 May 2023 14:41:42 -0700 Subject: [PATCH 225/448] Update pubspec for 0.2.1 release (#942) --- pkgs/cronet_http/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 92632011cf..d9b38bcb7b 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.2.1-dev +version: 0.2.1 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: From 31cdb497bd2c2da90f34db43e005c0ef796ed741 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 22 May 2023 16:06:34 -0700 Subject: [PATCH 226/448] Require Dart 3.0 (#943) --- pkgs/cronet_http/CHANGELOG.md | 4 ++++ pkgs/cronet_http/pubspec.yaml | 2 +- pkgs/cupertino_http/CHANGELOG.md | 4 ++++ pkgs/cupertino_http/example/pubspec.yaml | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 9d99e4f4f1..8126700d45 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.2 + +* Require Dart 3.0 + ## 0.2.1 * Require Dart 2.19 diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index d9b38bcb7b..e90c9b0c90 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.2.1 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: - sdk: ">=2.19.0 <3.0.0" + sdk: ^3.0.0 flutter: ">=3.0.0" dependencies: diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index cc290c28d7..75c0c61f59 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.3 + +* Require Dart 3.0 + ## 0.1.2 * Require Dart 2.19 diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index fd8938989b..3f920ea03b 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: 'none' version: 1.0.0+1 environment: - sdk: ">=2.19.0 <3.0.0" + sdk: ^3.0.0 dependencies: cached_network_image: ^3.2.3 From 36df5c59125ea3d52b93f1366182b84aedf044c7 Mon Sep 17 00:00:00 2001 From: Martin Kamleithner Date: Wed, 24 May 2023 18:04:15 +0200 Subject: [PATCH 227/448] fix typo in cupertino_http documentation (#879) --- pkgs/cupertino_http/lib/src/cupertino_api.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 4092f4d4de..a5b9347c43 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -181,7 +181,8 @@ class URLSessionConfiguration ncb.NSURLSessionConfiguration.getDefaultSessionConfiguration( linkedLibs)!)); - /// A configuration that uses caching and saves cookies and credentials. + /// A session configuration that uses no persistent storage for caches, + /// cookies, or credentials. /// /// See [NSURLSessionConfiguration ephemeralSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1410529-ephemeralsessionconfiguration) factory URLSessionConfiguration.ephemeralSessionConfiguration() => From 4a0e68b69ad70c5c49df456606773f589bfcc9a6 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Thu, 25 May 2023 00:50:27 +0800 Subject: [PATCH 228/448] Update prepare_for_embedded.dart (#944) Co-authored-by: Brian Quinlan --- pkgs/cronet_http/tool/prepare_for_embedded.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/cronet_http/tool/prepare_for_embedded.dart b/pkgs/cronet_http/tool/prepare_for_embedded.dart index 8791a2f500..e0f99d7a23 100644 --- a/pkgs/cronet_http/tool/prepare_for_embedded.dart +++ b/pkgs/cronet_http/tool/prepare_for_embedded.dart @@ -83,7 +83,7 @@ void updateCronetDependency(String latestVersion) { print('Patching $newImplementation'); final newGradleContent = gradleContent.replaceAll( implementationRegExp, - ' implementation $newImplementation', + ' implementation "$newImplementation"', ); fBuildGradle.writeAsStringSync(newGradleContent); } From 255ec4abc117c77035cfdf0b31cd0dd148e003ef Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Thu, 25 May 2023 14:07:12 -0700 Subject: [PATCH 229/448] regenerate with the latest mono_repo (#947) --- .github/workflows/dart.yml | 4 ++-- tool/ci.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index ca1ae26f1e..59fa5fb6d7 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.5.5 +# Created with package:mono_repo v6.5.7 name: Dart CI on: push: @@ -36,7 +36,7 @@ jobs: name: Checkout repository uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - name: mono_repo self validate - run: dart pub global activate mono_repo 6.5.5 + run: dart pub global activate mono_repo 6.5.7 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: diff --git a/tool/ci.sh b/tool/ci.sh index 75cc963f5f..91d1c5f752 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.5.5 +# Created with package:mono_repo v6.5.7 # Support built in commands on windows out of the box. # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") From f1387f46551fbbd7d855f931e3ebe82aa6e081fe Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 25 May 2023 14:34:30 -0700 Subject: [PATCH 230/448] Add a better toString to _ClientSocketException (#948) --- pkgs/http/CHANGELOG.md | 4 ++++ pkgs/http/lib/src/client.dart | 4 ++++ pkgs/http/lib/src/exception.dart | 8 +++++++- pkgs/http/lib/src/io_client.dart | 31 +++++++++++++++++++++++++++--- pkgs/http/pubspec.yaml | 2 +- pkgs/http/test/io/client_test.dart | 10 +++++++++- 6 files changed, 53 insertions(+), 6 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index ab36177f38..29d7761fc6 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.1 + +* Add better error messages for `SocketException`s when using `IOClient`. + ## 1.0.0 * Requires Dart 3.0 or later. diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index 6159d0067c..9bceb887f4 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -25,6 +25,10 @@ import 'streamed_response.dart'; /// [http.head], [http.get], [http.post], [http.put], [http.patch], or /// [http.delete] instead. /// +/// All methods will emit a [ClientException] if there is a transport-level +/// failure when communication with the server. For example, if the server could +/// not be reached. +/// /// When creating an HTTP client class with additional functionality, you must /// extend [BaseClient] rather than [Client]. In most cases, you can wrap /// another instance of [Client] and add functionality on top of that. This diff --git a/pkgs/http/lib/src/exception.dart b/pkgs/http/lib/src/exception.dart index 5ac1a6441d..5d47155f30 100644 --- a/pkgs/http/lib/src/exception.dart +++ b/pkgs/http/lib/src/exception.dart @@ -12,5 +12,11 @@ class ClientException implements Exception { ClientException(this.message, [this.uri]); @override - String toString() => message; + String toString() { + if (uri != null) { + return 'ClientException: $message, uri=$uri'; + } else { + return 'ClientException: $message'; + } + } } diff --git a/pkgs/http/lib/src/io_client.dart b/pkgs/http/lib/src/io_client.dart index 4ebb434f9c..88d44113e8 100644 --- a/pkgs/http/lib/src/io_client.dart +++ b/pkgs/http/lib/src/io_client.dart @@ -6,6 +6,7 @@ import 'dart:io'; import 'base_client.dart'; import 'base_request.dart'; +import 'client.dart'; import 'exception.dart'; import 'io_streamed_response.dart'; @@ -28,9 +29,9 @@ BaseClient createClient() { class _ClientSocketException extends ClientException implements SocketException { final SocketException cause; - _ClientSocketException(SocketException e, Uri url) + _ClientSocketException(SocketException e, Uri uri) : cause = e, - super(e.message, url); + super(e.message, uri); @override InternetAddress? get address => cause.address; @@ -40,9 +41,33 @@ class _ClientSocketException extends ClientException @override int? get port => cause.port; + + @override + String toString() => 'ClientException with $cause, uri=$uri'; } -/// A `dart:io`-based HTTP client. +/// A `dart:io`-based HTTP [Client]. +/// +/// If there is a socket-level failure when communicating with the server +/// (for example, if the server could not be reached), [IOClient] will emit a +/// [ClientException] that also implements [SocketException]. This allows +/// callers to get more detailed exception information for socket-level +/// failures, if desired. +/// +/// For example: +/// ```dart +/// final client = http.Client(); +/// late String data; +/// try { +/// data = await client.read(Uri.https('example.com', '')); +/// } on SocketException catch (e) { +/// // Exception is transport-related, check `e.osError` for more details. +/// } on http.ClientException catch (e) { +/// // Exception is HTTP-related (e.g. the server returned a 404 status code). +/// // If the handler for `SocketException` were removed then all exceptions +/// // would be caught by this handler. +/// } +/// ``` class IOClient extends BaseClient { /// The underlying `dart:io` HTTP client. HttpClient? _inner; diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 08f7dd87c7..30d8878ee0 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.0.0 +version: 1.0.1-wip description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http diff --git a/pkgs/http/test/io/client_test.dart b/pkgs/http/test/io/client_test.dart index e493931802..9476f054ad 100644 --- a/pkgs/http/test/io/client_test.dart +++ b/pkgs/http/test/io/client_test.dart @@ -118,7 +118,15 @@ void main() { request.headers[HttpHeaders.contentTypeHeader] = 'application/json; charset=utf-8'; - expect(client.send(request), throwsA(isA())); + expect( + client.send(request), + throwsA(allOf( + isA().having((e) => e.uri, 'uri', url), + isA().having( + (e) => e.toString(), + 'SocketException.toString', + matches('ClientException with SocketException.*,' + ' uri=http://http.invalid'))))); request.sink.add('{"hello": "world"}'.codeUnits); request.sink.close(); From 2683703eed23ff79068e6140ada0b3d9dad21230 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 30 May 2023 09:44:24 -0700 Subject: [PATCH 231/448] Fix the failing cupertino_http tests (#949) --- .github/workflows/cupertino.yml | 28 ++++++++----- .../example/integration_test/main.dart | 42 +++++++++++++++++++ 2 files changed, 60 insertions(+), 10 deletions(-) create mode 100644 pkgs/cupertino_http/example/integration_test/main.dart diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index b9f0d81b12..3be3d4d43e 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -8,10 +8,12 @@ on: paths: - 'pkgs/cupertino_http/**' - 'pkgs/http_client_conformance_tests/**' + - '.github/workflows/cupertino.yml' pull_request: paths: - 'pkgs/cupertino_http/**' - 'pkgs/http_client_conformance_tests/**' + - '.github/workflows/cupertino.yml' schedule: - cron: "0 0 * * 0" @@ -29,9 +31,7 @@ jobs: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: - # TODO: Change to 'stable' when a release version of flutter - # pins version 1.21.1 or later of 'package:test' - channel: 'master' + channel: 'stable' - id: install name: Install dependencies run: flutter pub get @@ -45,7 +45,7 @@ jobs: test: # Test package:cupertino_http use flutter integration tests. needs: analyze - name: "Build and test (disabled!)" + name: "Build and test" runs-on: macos-latest defaults: run: @@ -57,10 +57,18 @@ jobs: model: 'iPhone 8' - uses: subosito/flutter-action@v2 with: - # TODO: Change to 'stable' when a release version of flutter - # pins version 1.21.1 or later of 'package:test' - channel: 'master' + channel: 'stable' - name: Run tests - # TODO: Renable tests when https://github.com/dart-lang/http/issues/938 - # is fixed. - run: echo flutter test integration_test/ + # TODO: Remove the retries when + # https://github.com/flutter/flutter/issues/121231 is fixed. + # See https://github.com/dart-lang/http/issues/938 for context. + run: | + for i in {1..6} + do + flutter test integration_test/main.dart && break + if [ $i -eq 6 ] + then + exit 1 + fi + echo "Retry $i" + done diff --git a/pkgs/cupertino_http/example/integration_test/main.dart b/pkgs/cupertino_http/example/integration_test/main.dart new file mode 100644 index 0000000000..fe9ea47b0f --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/main.dart @@ -0,0 +1,42 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. 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:integration_test/integration_test.dart'; + +import 'client_conformance_test.dart' as client_conformance_test; +import 'data_test.dart' as data_test; +import 'error_test.dart' as error_test; +import 'http_url_response_test.dart' as http_url_response_test; +import 'mutable_data_test.dart' as mutable_data_test; +import 'mutable_url_request_test.dart' as mutable_url_request_test; +import 'url_request_test.dart' as url_request_test; +import 'url_response_test.dart' as url_response_test; +import 'url_session_configuration_test.dart' as url_session_configuration_test; +import 'url_session_delegate_test.dart' as url_session_delegate_test; +import 'url_session_task_test.dart' as url_session_task_test; +import 'url_session_test.dart' as url_session_test; +import 'utils_test.dart' as utils_test; + +/// Execute all the tests in this directory. +/// +/// This is faster than running each test individually using +/// `flutter test integration_test/` because only one compilation step and +/// application launch is required. +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + client_conformance_test.main(); + data_test.main(); + error_test.main(); + http_url_response_test.main(); + mutable_data_test.main(); + mutable_url_request_test.main(); + url_request_test.main(); + url_response_test.main(); + url_session_configuration_test.main(); + url_session_delegate_test.main(); + url_session_task_test.main(); + url_session_test.main(); + utils_test.main(); +} From 4ef2fc2b2b6f568372fe91b389e873238f97eee2 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 30 May 2023 17:14:32 -0700 Subject: [PATCH 232/448] Prepare to publish cupertino_http 1.0.0 (#951) --- .github/workflows/cupertino.yml | 6 + pkgs/cupertino_http/CHANGELOG.md | 3 +- pkgs/cupertino_http/example/pubspec.yaml | 1 + pkgs/cupertino_http/ffigen.yaml | 24 +- .../lib/src/native_cupertino_bindings.dart | 131894 +++++++-------- pkgs/cupertino_http/pubspec.yaml | 8 +- 6 files changed, 65568 insertions(+), 66368 deletions(-) diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 3be3d4d43e..c1cf3f3eed 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -46,6 +46,11 @@ jobs: # Test package:cupertino_http use flutter integration tests. needs: analyze name: "Build and test" + strategy: + matrix: + # Test on the minimum supported flutter version and the latest + # version. + flutter-version: ["3.10.0", "any"] runs-on: macos-latest defaults: run: @@ -57,6 +62,7 @@ jobs: model: 'iPhone 8' - uses: subosito/flutter-action@v2 with: + flutter-version: ${{ matrix.flutter-version }} channel: 'stable' - name: Run tests # TODO: Remove the retries when diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 75c0c61f59..67bd149863 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,6 +1,7 @@ -## 0.1.3 +## 1.0.0 * Require Dart 3.0 +* Require Flutter 3.10.0 ## 0.1.2 diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index 3f920ea03b..ff57651272 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -7,6 +7,7 @@ version: 1.0.0+1 environment: sdk: ^3.0.0 + flutter: ^3.10.0 dependencies: cached_network_image: ^3.2.3 diff --git a/pkgs/cupertino_http/ffigen.yaml b/pkgs/cupertino_http/ffigen.yaml index b4cd26c595..a63ab1134f 100644 --- a/pkgs/cupertino_http/ffigen.yaml +++ b/pkgs/cupertino_http/ffigen.yaml @@ -8,18 +8,18 @@ language: 'objc' output: 'lib/src/native_cupertino_bindings.dart' headers: entry-points: - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSData.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLRequest.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSProgress.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLResponse.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSHTTPCookieStorage.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSOperation.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSError.h' - - '/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSData.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLRequest.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSProgress.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLResponse.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSHTTPCookieStorage.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSOperation.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSError.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' - 'src/CUPHTTPClientDelegate.h' - 'src/CUPHTTPForwardedDelegate.h' preamble: | diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index 82724c8cc3..1c4a15f8f6 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -5,6 +5,7 @@ // AUTO GENERATED FILE, DO NOT EDIT. // // Generated by `package:ffigen`. +// ignore_for_file: type=lint import 'dart:ffi' as ffi; import 'package:ffi/ffi.dart' as pkg_ffi; @@ -27,33607 +28,32725 @@ class NativeCupertinoHttp { lookup) : _lookup = lookup; - int __darwin_check_fd_set_overflow( + ffi.Pointer> signal( int arg0, - ffi.Pointer arg1, - int arg2, + ffi.Pointer> arg1, ) { - return ___darwin_check_fd_set_overflow( + return _signal( arg0, arg1, - arg2, ); } - late final ___darwin_check_fd_set_overflowPtr = _lookup< + late final _signalPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Int)>>('__darwin_check_fd_set_overflow'); - late final ___darwin_check_fd_set_overflow = - ___darwin_check_fd_set_overflowPtr - .asFunction, int)>(); + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction>)>>('signal'); + late final _signal = _signalPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); - ffi.Pointer sel_getName( - ffi.Pointer sel, + int getpriority( + int arg0, + int arg1, ) { - return _sel_getName( - sel, + return _getpriority( + arg0, + arg1, ); } - late final _sel_getNamePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('sel_getName'); - late final _sel_getName = _sel_getNamePtr - .asFunction Function(ffi.Pointer)>(); + late final _getpriorityPtr = + _lookup>( + 'getpriority'); + late final _getpriority = + _getpriorityPtr.asFunction(); - ffi.Pointer sel_registerName( - ffi.Pointer str, + int getiopolicy_np( + int arg0, + int arg1, ) { - return _sel_registerName1( - str, + return _getiopolicy_np( + arg0, + arg1, ); } - late final _sel_registerNamePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('sel_registerName'); - late final _sel_registerName1 = _sel_registerNamePtr - .asFunction Function(ffi.Pointer)>(); + late final _getiopolicy_npPtr = + _lookup>( + 'getiopolicy_np'); + late final _getiopolicy_np = + _getiopolicy_npPtr.asFunction(); - ffi.Pointer object_getClassName( - ffi.Pointer obj, + int getrlimit( + int arg0, + ffi.Pointer arg1, ) { - return _object_getClassName( - obj, + return _getrlimit( + arg0, + arg1, ); } - late final _object_getClassNamePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('object_getClassName'); - late final _object_getClassName = _object_getClassNamePtr - .asFunction Function(ffi.Pointer)>(); + late final _getrlimitPtr = _lookup< + ffi.NativeFunction)>>( + 'getrlimit'); + late final _getrlimit = + _getrlimitPtr.asFunction)>(); - ffi.Pointer object_getIndexedIvars( - ffi.Pointer obj, + int getrusage( + int arg0, + ffi.Pointer arg1, ) { - return _object_getIndexedIvars( - obj, + return _getrusage( + arg0, + arg1, ); } - late final _object_getIndexedIvarsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('object_getIndexedIvars'); - late final _object_getIndexedIvars = _object_getIndexedIvarsPtr - .asFunction Function(ffi.Pointer)>(); + late final _getrusagePtr = _lookup< + ffi.NativeFunction)>>( + 'getrusage'); + late final _getrusage = + _getrusagePtr.asFunction)>(); - bool sel_isMapped( - ffi.Pointer sel, + int setpriority( + int arg0, + int arg1, + int arg2, ) { - return _sel_isMapped( - sel, + return _setpriority( + arg0, + arg1, + arg2, ); } - late final _sel_isMappedPtr = - _lookup)>>( - 'sel_isMapped'); - late final _sel_isMapped = - _sel_isMappedPtr.asFunction)>(); + late final _setpriorityPtr = + _lookup>( + 'setpriority'); + late final _setpriority = + _setpriorityPtr.asFunction(); - ffi.Pointer sel_getUid( - ffi.Pointer str, + int setiopolicy_np( + int arg0, + int arg1, + int arg2, ) { - return _sel_getUid( - str, + return _setiopolicy_np( + arg0, + arg1, + arg2, ); } - late final _sel_getUidPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('sel_getUid'); - late final _sel_getUid = _sel_getUidPtr - .asFunction Function(ffi.Pointer)>(); + late final _setiopolicy_npPtr = + _lookup>( + 'setiopolicy_np'); + late final _setiopolicy_np = + _setiopolicy_npPtr.asFunction(); - ffi.Pointer objc_retainedObject( - objc_objectptr_t obj, + int setrlimit( + int arg0, + ffi.Pointer arg1, ) { - return _objc_retainedObject( - obj, + return _setrlimit( + arg0, + arg1, ); } - late final _objc_retainedObjectPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - objc_objectptr_t)>>('objc_retainedObject'); - late final _objc_retainedObject = _objc_retainedObjectPtr - .asFunction Function(objc_objectptr_t)>(); + late final _setrlimitPtr = _lookup< + ffi.NativeFunction)>>( + 'setrlimit'); + late final _setrlimit = + _setrlimitPtr.asFunction)>(); - ffi.Pointer objc_unretainedObject( - objc_objectptr_t obj, + int wait1( + ffi.Pointer arg0, ) { - return _objc_unretainedObject( - obj, + return _wait1( + arg0, ); } - late final _objc_unretainedObjectPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - objc_objectptr_t)>>('objc_unretainedObject'); - late final _objc_unretainedObject = _objc_unretainedObjectPtr - .asFunction Function(objc_objectptr_t)>(); + late final _wait1Ptr = + _lookup)>>('wait'); + late final _wait1 = + _wait1Ptr.asFunction)>(); - objc_objectptr_t objc_unretainedPointer( - ffi.Pointer obj, + int waitpid( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _objc_unretainedPointer( - obj, + return _waitpid( + arg0, + arg1, + arg2, ); } - late final _objc_unretainedPointerPtr = _lookup< + late final _waitpidPtr = _lookup< ffi.NativeFunction< - objc_objectptr_t Function( - ffi.Pointer)>>('objc_unretainedPointer'); - late final _objc_unretainedPointer = _objc_unretainedPointerPtr - .asFunction)>(); - - ffi.Pointer _registerName1(String name) { - final cstr = name.toNativeUtf8(); - final sel = _sel_registerName(cstr.cast()); - pkg_ffi.calloc.free(cstr); - return sel; - } + pid_t Function(pid_t, ffi.Pointer, ffi.Int)>>('waitpid'); + late final _waitpid = + _waitpidPtr.asFunction, int)>(); - ffi.Pointer _sel_registerName( - ffi.Pointer str, + int waitid( + int arg0, + int arg1, + ffi.Pointer arg2, + int arg3, ) { - return __sel_registerName( - str, + return _waitid( + arg0, + arg1, + arg2, + arg3, ); } - late final __sel_registerNamePtr = _lookup< + late final _waitidPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('sel_registerName'); - late final __sel_registerName = __sel_registerNamePtr - .asFunction Function(ffi.Pointer)>(); - - ffi.Pointer _getClass1(String name) { - final cstr = name.toNativeUtf8(); - final clazz = _objc_getClass(cstr.cast()); - pkg_ffi.calloc.free(cstr); - if (clazz == ffi.nullptr) { - throw Exception('Failed to load Objective-C class: $name'); - } - return clazz; - } + ffi.Int Function( + ffi.Int32, id_t, ffi.Pointer, ffi.Int)>>('waitid'); + late final _waitid = _waitidPtr + .asFunction, int)>(); - ffi.Pointer _objc_getClass( - ffi.Pointer str, + int wait3( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, ) { - return __objc_getClass( - str, + return _wait3( + arg0, + arg1, + arg2, ); } - late final __objc_getClassPtr = _lookup< + late final _wait3Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('objc_getClass'); - late final __objc_getClass = __objc_getClassPtr - .asFunction Function(ffi.Pointer)>(); + pid_t Function( + ffi.Pointer, ffi.Int, ffi.Pointer)>>('wait3'); + late final _wait3 = _wait3Ptr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); - ffi.Pointer _objc_retain( - ffi.Pointer value, + int wait4( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return __objc_retain( - value, + return _wait4( + arg0, + arg1, + arg2, + arg3, ); } - late final __objc_retainPtr = _lookup< + late final _wait4Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('objc_retain'); - late final __objc_retain = __objc_retainPtr - .asFunction Function(ffi.Pointer)>(); + pid_t Function(pid_t, ffi.Pointer, ffi.Int, + ffi.Pointer)>>('wait4'); + late final _wait4 = _wait4Ptr.asFunction< + int Function(int, ffi.Pointer, int, ffi.Pointer)>(); - void _objc_release( - ffi.Pointer value, + ffi.Pointer alloca( + int arg0, ) { - return __objc_release( - value, + return _alloca( + arg0, ); } - late final __objc_releasePtr = - _lookup)>>( - 'objc_release'); - late final __objc_release = - __objc_releasePtr.asFunction)>(); + late final _allocaPtr = + _lookup Function(ffi.Size)>>( + 'alloca'); + late final _alloca = + _allocaPtr.asFunction Function(int)>(); - late final _objc_releaseFinalizer2 = - ffi.NativeFinalizer(__objc_releasePtr.cast()); - late final _class_NSObject1 = _getClass1("NSObject"); - late final _sel_load1 = _registerName1("load"); - void _objc_msgSend_1( - ffi.Pointer obj, - ffi.Pointer sel, + late final ffi.Pointer ___mb_cur_max = + _lookup('__mb_cur_max'); + + int get __mb_cur_max => ___mb_cur_max.value; + + set __mb_cur_max(int value) => ___mb_cur_max.value = value; + + ffi.Pointer malloc( + int __size, ) { - return __objc_msgSend_1( - obj, - sel, + return _malloc( + __size, ); } - late final __objc_msgSend_1Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + late final _mallocPtr = + _lookup Function(ffi.Size)>>( + 'malloc'); + late final _malloc = + _mallocPtr.asFunction Function(int)>(); - late final _sel_initialize1 = _registerName1("initialize"); - late final _sel_init1 = _registerName1("init"); - instancetype _objc_msgSend_2( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer calloc( + int __count, + int __size, ) { - return __objc_msgSend_2( - obj, - sel, + return _calloc( + __count, + __size, ); } - late final __objc_msgSend_2Ptr = _lookup< + late final _callocPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Size, ffi.Size)>>('calloc'); + late final _calloc = + _callocPtr.asFunction Function(int, int)>(); - late final _sel_new1 = _registerName1("new"); - late final _sel_allocWithZone_1 = _registerName1("allocWithZone:"); - instancetype _objc_msgSend_3( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_NSZone> zone, + void free( + ffi.Pointer arg0, ) { - return __objc_msgSend_3( - obj, - sel, - zone, + return _free( + arg0, ); } - late final __objc_msgSend_3Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>>('objc_msgSend'); - late final __objc_msgSend_3 = __objc_msgSend_3Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>(); + late final _freePtr = + _lookup)>>( + 'free'); + late final _free = + _freePtr.asFunction)>(); - late final _sel_alloc1 = _registerName1("alloc"); - late final _sel_dealloc1 = _registerName1("dealloc"); - late final _sel_finalize1 = _registerName1("finalize"); - late final _sel_copy1 = _registerName1("copy"); - late final _sel_mutableCopy1 = _registerName1("mutableCopy"); - late final _sel_copyWithZone_1 = _registerName1("copyWithZone:"); - late final _sel_mutableCopyWithZone_1 = - _registerName1("mutableCopyWithZone:"); - late final _sel_instancesRespondToSelector_1 = - _registerName1("instancesRespondToSelector:"); - bool _objc_msgSend_4( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, + ffi.Pointer realloc( + ffi.Pointer __ptr, + int __size, ) { - return __objc_msgSend_4( - obj, - sel, - aSelector, + return _realloc( + __ptr, + __size, ); } - late final __objc_msgSend_4Ptr = _lookup< + late final _reallocPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('realloc'); + late final _realloc = _reallocPtr + .asFunction Function(ffi.Pointer, int)>(); - bool _objc_msgSend_0( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer clazz, + ffi.Pointer valloc( + int arg0, ) { - return __objc_msgSend_0( - obj, - sel, - clazz, + return _valloc( + arg0, ); } - late final __objc_msgSend_0Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _vallocPtr = + _lookup Function(ffi.Size)>>( + 'valloc'); + late final _valloc = + _vallocPtr.asFunction Function(int)>(); - late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); - late final _class_Protocol1 = _getClass1("Protocol"); - late final _sel_conformsToProtocol_1 = _registerName1("conformsToProtocol:"); - bool _objc_msgSend_5( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer protocol, + ffi.Pointer aligned_alloc( + int __alignment, + int __size, ) { - return __objc_msgSend_5( - obj, - sel, - protocol, + return _aligned_alloc( + __alignment, + __size, ); } - late final __objc_msgSend_5Ptr = _lookup< + late final _aligned_allocPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_5 = __objc_msgSend_5Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Size, ffi.Size)>>('aligned_alloc'); + late final _aligned_alloc = + _aligned_allocPtr.asFunction Function(int, int)>(); - late final _sel_methodForSelector_1 = _registerName1("methodForSelector:"); - IMP _objc_msgSend_6( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, + int posix_memalign( + ffi.Pointer> __memptr, + int __alignment, + int __size, ) { - return __objc_msgSend_6( - obj, - sel, - aSelector, + return _posix_memalign( + __memptr, + __alignment, + __size, ); } - late final __objc_msgSend_6Ptr = _lookup< + late final _posix_memalignPtr = _lookup< ffi.NativeFunction< - IMP Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction< - IMP Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, ffi.Size, + ffi.Size)>>('posix_memalign'); + late final _posix_memalign = _posix_memalignPtr + .asFunction>, int, int)>(); - late final _sel_instanceMethodForSelector_1 = - _registerName1("instanceMethodForSelector:"); - late final _sel_doesNotRecognizeSelector_1 = - _registerName1("doesNotRecognizeSelector:"); - void _objc_msgSend_7( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_7( - obj, - sel, - aSelector, - ); + void abort() { + return _abort(); } - late final __objc_msgSend_7Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _abortPtr = + _lookup>('abort'); + late final _abort = _abortPtr.asFunction(); - late final _sel_forwardingTargetForSelector_1 = - _registerName1("forwardingTargetForSelector:"); - ffi.Pointer _objc_msgSend_8( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, + int abs( + int arg0, ) { - return __objc_msgSend_8( - obj, - sel, - aSelector, + return _abs( + arg0, ); } - late final __objc_msgSend_8Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _absPtr = + _lookup>('abs'); + late final _abs = _absPtr.asFunction(); - late final _class_NSInvocation1 = _getClass1("NSInvocation"); - late final _sel_forwardInvocation_1 = _registerName1("forwardInvocation:"); - void _objc_msgSend_9( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anInvocation, + int atexit( + ffi.Pointer> arg0, ) { - return __objc_msgSend_9( - obj, - sel, - anInvocation, + return _atexit( + arg0, ); } - late final __objc_msgSend_9Ptr = _lookup< + late final _atexitPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_9 = __objc_msgSend_9Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer>)>>('atexit'); + late final _atexit = _atexitPtr.asFunction< + int Function(ffi.Pointer>)>(); - late final _class_NSMethodSignature1 = _getClass1("NSMethodSignature"); - late final _sel_methodSignatureForSelector_1 = - _registerName1("methodSignatureForSelector:"); - ffi.Pointer _objc_msgSend_10( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, + double atof( + ffi.Pointer arg0, ) { - return __objc_msgSend_10( - obj, - sel, - aSelector, + return _atof( + arg0, ); } - late final __objc_msgSend_10Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _atofPtr = + _lookup)>>( + 'atof'); + late final _atof = + _atofPtr.asFunction)>(); - late final _sel_instanceMethodSignatureForSelector_1 = - _registerName1("instanceMethodSignatureForSelector:"); - late final _sel_allowsWeakReference1 = _registerName1("allowsWeakReference"); - bool _objc_msgSend_11( - ffi.Pointer obj, - ffi.Pointer sel, + int atoi( + ffi.Pointer arg0, ) { - return __objc_msgSend_11( - obj, - sel, + return _atoi( + arg0, ); } - late final __objc_msgSend_11Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); + late final _atoiPtr = + _lookup)>>( + 'atoi'); + late final _atoi = _atoiPtr.asFunction)>(); - late final _sel_retainWeakReference1 = _registerName1("retainWeakReference"); - late final _sel_isSubclassOfClass_1 = _registerName1("isSubclassOfClass:"); - late final _sel_resolveClassMethod_1 = _registerName1("resolveClassMethod:"); - late final _sel_resolveInstanceMethod_1 = - _registerName1("resolveInstanceMethod:"); - late final _sel_hash1 = _registerName1("hash"); - int _objc_msgSend_12( - ffi.Pointer obj, - ffi.Pointer sel, + int atol( + ffi.Pointer arg0, ) { - return __objc_msgSend_12( - obj, - sel, + return _atol( + arg0, ); } - late final __objc_msgSend_12Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_12 = __objc_msgSend_12Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _atolPtr = + _lookup)>>( + 'atol'); + late final _atol = _atolPtr.asFunction)>(); - late final _sel_superclass1 = _registerName1("superclass"); - late final _sel_class1 = _registerName1("class"); - late final _class_NSString1 = _getClass1("NSString"); - late final _sel_length1 = _registerName1("length"); - late final _sel_characterAtIndex_1 = _registerName1("characterAtIndex:"); - int _objc_msgSend_13( - ffi.Pointer obj, - ffi.Pointer sel, - int index, + int atoll( + ffi.Pointer arg0, ) { - return __objc_msgSend_13( - obj, - sel, - index, + return _atoll( + arg0, ); } - late final __objc_msgSend_13Ptr = _lookup< - ffi.NativeFunction< - unichar Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _atollPtr = + _lookup)>>( + 'atoll'); + late final _atoll = + _atollPtr.asFunction)>(); - late final _class_NSCoder1 = _getClass1("NSCoder"); - late final _sel_initWithCoder_1 = _registerName1("initWithCoder:"); - instancetype _objc_msgSend_14( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer coder, + ffi.Pointer bsearch( + ffi.Pointer __key, + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_14( - obj, - sel, - coder, + return _bsearch( + __key, + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_14Ptr = _lookup< + late final _bsearchPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('bsearch'); + late final _bsearch = _bsearchPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); - ffi.Pointer _objc_msgSend_15( - ffi.Pointer obj, - ffi.Pointer sel, - int from, + div_t div( + int arg0, + int arg1, ) { - return __objc_msgSend_15( - obj, - sel, - from, + return _div( + arg0, + arg1, ); } - late final __objc_msgSend_15Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _divPtr = + _lookup>('div'); + late final _div = _divPtr.asFunction(); - late final _sel_substringToIndex_1 = _registerName1("substringToIndex:"); - late final _sel_substringWithRange_1 = _registerName1("substringWithRange:"); - ffi.Pointer _objc_msgSend_16( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + void exit( + int arg0, ) { - return __objc_msgSend_16( - obj, - sel, - range, + return _exit1( + arg0, ); } - late final __objc_msgSend_16Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + late final _exitPtr = + _lookup>('exit'); + late final _exit1 = _exitPtr.asFunction(); - late final _sel_getCharacters_range_1 = - _registerName1("getCharacters:range:"); - void _objc_msgSend_17( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - NSRange range, + ffi.Pointer getenv( + ffi.Pointer arg0, ) { - return __objc_msgSend_17( - obj, - sel, - buffer, - range, + return _getenv( + arg0, ); } - late final __objc_msgSend_17Ptr = _lookup< + late final _getenvPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + ffi.Pointer Function(ffi.Pointer)>>('getenv'); + late final _getenv = _getenvPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_compare_1 = _registerName1("compare:"); - int _objc_msgSend_18( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, + int labs( + int arg0, ) { - return __objc_msgSend_18( - obj, - sel, - string, + return _labs( + arg0, ); } - late final __objc_msgSend_18Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _labsPtr = + _lookup>('labs'); + late final _labs = _labsPtr.asFunction(); - late final _sel_compare_options_1 = _registerName1("compare:options:"); - int _objc_msgSend_19( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, + ldiv_t ldiv( + int arg0, + int arg1, ) { - return __objc_msgSend_19( - obj, - sel, - string, - mask, + return _ldiv( + arg0, + arg1, ); } - late final __objc_msgSend_19Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _ldivPtr = + _lookup>('ldiv'); + late final _ldiv = _ldivPtr.asFunction(); - late final _sel_compare_options_range_1 = - _registerName1("compare:options:range:"); - int _objc_msgSend_20( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - NSRange rangeOfReceiverToCompare, + int llabs( + int arg0, ) { - return __objc_msgSend_20( - obj, - sel, - string, - mask, - rangeOfReceiverToCompare, + return _llabs( + arg0, ); } - late final __objc_msgSend_20Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + late final _llabsPtr = + _lookup>('llabs'); + late final _llabs = _llabsPtr.asFunction(); - late final _sel_compare_options_range_locale_1 = - _registerName1("compare:options:range:locale:"); - int _objc_msgSend_21( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - NSRange rangeOfReceiverToCompare, - ffi.Pointer locale, + lldiv_t lldiv( + int arg0, + int arg1, ) { - return __objc_msgSend_21( - obj, - sel, - string, - mask, - rangeOfReceiverToCompare, - locale, + return _lldiv( + arg0, + arg1, ); } - late final __objc_msgSend_21Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange, ffi.Pointer)>(); + late final _lldivPtr = + _lookup>( + 'lldiv'); + late final _lldiv = _lldivPtr.asFunction(); - late final _sel_caseInsensitiveCompare_1 = - _registerName1("caseInsensitiveCompare:"); - late final _sel_localizedCompare_1 = _registerName1("localizedCompare:"); - late final _sel_localizedCaseInsensitiveCompare_1 = - _registerName1("localizedCaseInsensitiveCompare:"); - late final _sel_localizedStandardCompare_1 = - _registerName1("localizedStandardCompare:"); - late final _sel_isEqualToString_1 = _registerName1("isEqualToString:"); - bool _objc_msgSend_22( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, + int mblen( + ffi.Pointer __s, + int __n, ) { - return __objc_msgSend_22( - obj, - sel, - aString, + return _mblen( + __s, + __n, ); } - late final __objc_msgSend_22Ptr = _lookup< + late final _mblenPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Size)>>('mblen'); + late final _mblen = + _mblenPtr.asFunction, int)>(); - late final _sel_hasPrefix_1 = _registerName1("hasPrefix:"); - late final _sel_hasSuffix_1 = _registerName1("hasSuffix:"); - late final _sel_commonPrefixWithString_options_1 = - _registerName1("commonPrefixWithString:options:"); - ffi.Pointer _objc_msgSend_23( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - int mask, + int mbstowcs( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_23( - obj, - sel, - str, - mask, + return _mbstowcs( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_23Ptr = _lookup< + late final _mbstowcsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Size Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('mbstowcs'); + late final _mbstowcs = _mbstowcsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_containsString_1 = _registerName1("containsString:"); - late final _sel_localizedCaseInsensitiveContainsString_1 = - _registerName1("localizedCaseInsensitiveContainsString:"); - late final _sel_localizedStandardContainsString_1 = - _registerName1("localizedStandardContainsString:"); - late final _sel_localizedStandardRangeOfString_1 = - _registerName1("localizedStandardRangeOfString:"); - NSRange _objc_msgSend_24( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, + int mbtowc( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_24( - obj, - sel, - str, + return _mbtowc( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_24Ptr = _lookup< + late final _mbtowcPtr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('mbtowc'); + late final _mbtowc = _mbtowcPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); - late final _sel_rangeOfString_options_1 = - _registerName1("rangeOfString:options:"); - NSRange _objc_msgSend_25( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, + void qsort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_25( - obj, - sel, - searchString, - mask, + return _qsort( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_25Ptr = _lookup< + late final _qsortPtr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('qsort'); + late final _qsort = _qsortPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - late final _sel_rangeOfString_options_range_1 = - _registerName1("rangeOfString:options:range:"); - NSRange _objc_msgSend_26( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - NSRange rangeOfReceiverToSearch, + int rand() { + return _rand(); + } + + late final _randPtr = _lookup>('rand'); + late final _rand = _randPtr.asFunction(); + + void srand( + int arg0, ) { - return __objc_msgSend_26( - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, + return _srand( + arg0, ); } - late final __objc_msgSend_26Ptr = _lookup< - ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + late final _srandPtr = + _lookup>('srand'); + late final _srand = _srandPtr.asFunction(); - late final _class_NSLocale1 = _getClass1("NSLocale"); - late final _sel_rangeOfString_options_range_locale_1 = - _registerName1("rangeOfString:options:range:locale:"); - NSRange _objc_msgSend_27( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - NSRange rangeOfReceiverToSearch, - ffi.Pointer locale, + double strtod( + ffi.Pointer arg0, + ffi.Pointer> arg1, ) { - return __objc_msgSend_27( - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - locale, + return _strtod( + arg0, + arg1, ); } - late final __objc_msgSend_27Ptr = _lookup< + late final _strtodPtr = _lookup< ffi.NativeFunction< - NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange, ffi.Pointer)>(); + ffi.Double Function(ffi.Pointer, + ffi.Pointer>)>>('strtod'); + late final _strtod = _strtodPtr.asFunction< + double Function( + ffi.Pointer, ffi.Pointer>)>(); - late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); - late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); - ffi.Pointer _objc_msgSend_28( - ffi.Pointer obj, - ffi.Pointer sel, + double strtof( + ffi.Pointer arg0, + ffi.Pointer> arg1, ) { - return __objc_msgSend_28( - obj, - sel, + return _strtof( + arg0, + arg1, ); } - late final __objc_msgSend_28Ptr = _lookup< + late final _strtofPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Float Function(ffi.Pointer, + ffi.Pointer>)>>('strtof'); + late final _strtof = _strtofPtr.asFunction< + double Function( + ffi.Pointer, ffi.Pointer>)>(); - late final _sel_whitespaceCharacterSet1 = - _registerName1("whitespaceCharacterSet"); - late final _sel_whitespaceAndNewlineCharacterSet1 = - _registerName1("whitespaceAndNewlineCharacterSet"); - late final _sel_decimalDigitCharacterSet1 = - _registerName1("decimalDigitCharacterSet"); - late final _sel_letterCharacterSet1 = _registerName1("letterCharacterSet"); - late final _sel_lowercaseLetterCharacterSet1 = - _registerName1("lowercaseLetterCharacterSet"); - late final _sel_uppercaseLetterCharacterSet1 = - _registerName1("uppercaseLetterCharacterSet"); - late final _sel_nonBaseCharacterSet1 = _registerName1("nonBaseCharacterSet"); - late final _sel_alphanumericCharacterSet1 = - _registerName1("alphanumericCharacterSet"); - late final _sel_decomposableCharacterSet1 = - _registerName1("decomposableCharacterSet"); - late final _sel_illegalCharacterSet1 = _registerName1("illegalCharacterSet"); - late final _sel_punctuationCharacterSet1 = - _registerName1("punctuationCharacterSet"); - late final _sel_capitalizedLetterCharacterSet1 = - _registerName1("capitalizedLetterCharacterSet"); - late final _sel_symbolCharacterSet1 = _registerName1("symbolCharacterSet"); - late final _sel_newlineCharacterSet1 = _registerName1("newlineCharacterSet"); - late final _sel_characterSetWithRange_1 = - _registerName1("characterSetWithRange:"); - ffi.Pointer _objc_msgSend_29( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange aRange, + int strtol( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_29( - obj, - sel, - aRange, + return _strtol( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_29Ptr = _lookup< + late final _strtolPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Long Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtol'); + late final _strtol = _strtolPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final _sel_characterSetWithCharactersInString_1 = - _registerName1("characterSetWithCharactersInString:"); - ffi.Pointer _objc_msgSend_30( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, + int strtoll( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_30( - obj, - sel, - aString, + return _strtoll( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_30Ptr = _lookup< + late final _strtollPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoll'); + late final _strtoll = _strtollPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final _class_NSData1 = _getClass1("NSData"); - late final _sel_bytes1 = _registerName1("bytes"); - ffi.Pointer _objc_msgSend_31( - ffi.Pointer obj, - ffi.Pointer sel, + int strtoul( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_31( - obj, - sel, + return _strtoul( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_31Ptr = _lookup< + late final _strtoulPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoul'); + late final _strtoul = _strtoulPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final _sel_description1 = _registerName1("description"); - ffi.Pointer _objc_msgSend_32( - ffi.Pointer obj, - ffi.Pointer sel, + int strtoull( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_32( - obj, - sel, + return _strtoull( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_32Ptr = _lookup< + late final _strtoullPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoull'); + late final _strtoull = _strtoullPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final _sel_getBytes_length_1 = _registerName1("getBytes:length:"); - void _objc_msgSend_33( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int length, + int system( + ffi.Pointer arg0, ) { - return __objc_msgSend_33( - obj, - sel, - buffer, - length, + return _system( + arg0, ); } - late final __objc_msgSend_33Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _systemPtr = + _lookup)>>( + 'system'); + late final _system = + _systemPtr.asFunction)>(); - late final _sel_getBytes_range_1 = _registerName1("getBytes:range:"); - void _objc_msgSend_34( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - NSRange range, + int wcstombs( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_34( - obj, - sel, - buffer, - range, + return _wcstombs( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_34Ptr = _lookup< + late final _wcstombsPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + ffi.Size Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('wcstombs'); + late final _wcstombs = _wcstombsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); - bool _objc_msgSend_35( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, + int wctomb( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_35( - obj, - sel, - other, + return _wctomb( + arg0, + arg1, ); } - late final __objc_msgSend_35Ptr = _lookup< + late final _wctombPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.WChar)>>('wctomb'); + late final _wctomb = + _wctombPtr.asFunction, int)>(); - late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); - ffi.Pointer _objc_msgSend_36( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + void _Exit( + int arg0, ) { - return __objc_msgSend_36( - obj, - sel, - range, + return __Exit( + arg0, ); } - late final __objc_msgSend_36Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + late final __ExitPtr = + _lookup>('_Exit'); + late final __Exit = __ExitPtr.asFunction(); - late final _sel_writeToFile_atomically_1 = - _registerName1("writeToFile:atomically:"); - bool _objc_msgSend_37( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool useAuxiliaryFile, + int a64l( + ffi.Pointer arg0, ) { - return __objc_msgSend_37( - obj, - sel, - path, - useAuxiliaryFile, + return _a64l( + arg0, ); } - late final __objc_msgSend_37Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + late final _a64lPtr = + _lookup)>>( + 'a64l'); + late final _a64l = _a64lPtr.asFunction)>(); - late final _class_NSURL1 = _getClass1("NSURL"); - late final _sel_initWithScheme_host_path_1 = - _registerName1("initWithScheme:host:path:"); - instancetype _objc_msgSend_38( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer scheme, - ffi.Pointer host, - ffi.Pointer path, + double drand48() { + return _drand48(); + } + + late final _drand48Ptr = + _lookup>('drand48'); + late final _drand48 = _drand48Ptr.asFunction(); + + ffi.Pointer ecvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return __objc_msgSend_38( - obj, - sel, - scheme, - host, - path, + return _ecvt( + arg0, + arg1, + arg2, + arg3, ); } - late final __objc_msgSend_38Ptr = _lookup< + late final _ecvtPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_38 = __objc_msgSend_38Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Double, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('ecvt'); + late final _ecvt = _ecvtPtr.asFunction< + ffi.Pointer Function( + double, int, ffi.Pointer, ffi.Pointer)>(); - late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = - _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_39( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, + double erand48( + ffi.Pointer arg0, ) { - return __objc_msgSend_39( - obj, - sel, - path, - isDir, - baseURL, + return _erand48( + arg0, ); } - late final __objc_msgSend_39Ptr = _lookup< + late final _erand48Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, ffi.Pointer)>(); - - late final _sel_initFileURLWithPath_relativeToURL_1 = - _registerName1("initFileURLWithPath:relativeToURL:"); - instancetype _objc_msgSend_40( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer baseURL, + ffi.Double Function(ffi.Pointer)>>('erand48'); + late final _erand48 = + _erand48Ptr.asFunction)>(); + + ffi.Pointer fcvt( + double arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return __objc_msgSend_40( - obj, - sel, - path, - baseURL, + return _fcvt( + arg0, + arg1, + arg2, + arg3, ); } - late final __objc_msgSend_40Ptr = _lookup< + late final _fcvtPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Double, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('fcvt'); + late final _fcvt = _fcvtPtr.asFunction< + ffi.Pointer Function( + double, int, ffi.Pointer, ffi.Pointer)>(); - late final _sel_initFileURLWithPath_isDirectory_1 = - _registerName1("initFileURLWithPath:isDirectory:"); - instancetype _objc_msgSend_41( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, + ffi.Pointer gcvt( + double arg0, + int arg1, + ffi.Pointer arg2, ) { - return __objc_msgSend_41( - obj, - sel, - path, - isDir, + return _gcvt( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_41Ptr = _lookup< + late final _gcvtPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer Function( + ffi.Double, ffi.Int, ffi.Pointer)>>('gcvt'); + late final _gcvt = _gcvtPtr.asFunction< + ffi.Pointer Function(double, int, ffi.Pointer)>(); - late final _sel_initFileURLWithPath_1 = - _registerName1("initFileURLWithPath:"); - instancetype _objc_msgSend_42( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + int getsubopt( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer> arg2, ) { - return __objc_msgSend_42( - obj, - sel, - path, + return _getsubopt( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_42Ptr = _lookup< + late final _getsuboptPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>)>>('getsubopt'); + late final _getsubopt = _getsuboptPtr.asFunction< + int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_fileURLWithPath_isDirectory_relativeToURL_1 = - _registerName1("fileURLWithPath:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_43( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, + int grantpt( + int arg0, ) { - return __objc_msgSend_43( - obj, - sel, - path, - isDir, - baseURL, + return _grantpt( + arg0, ); } - late final __objc_msgSend_43Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); + late final _grantptPtr = + _lookup>('grantpt'); + late final _grantpt = _grantptPtr.asFunction(); - late final _sel_fileURLWithPath_relativeToURL_1 = - _registerName1("fileURLWithPath:relativeToURL:"); - ffi.Pointer _objc_msgSend_44( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer baseURL, + ffi.Pointer initstate( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_44( - obj, - sel, - path, - baseURL, + return _initstate( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_44Ptr = _lookup< + late final _initstatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.UnsignedInt, ffi.Pointer, ffi.Size)>>('initstate'); + late final _initstate = _initstatePtr.asFunction< + ffi.Pointer Function(int, ffi.Pointer, int)>(); - late final _sel_fileURLWithPath_isDirectory_1 = - _registerName1("fileURLWithPath:isDirectory:"); - ffi.Pointer _objc_msgSend_45( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, + int jrand48( + ffi.Pointer arg0, ) { - return __objc_msgSend_45( - obj, - sel, - path, - isDir, + return _jrand48( + arg0, ); } - late final __objc_msgSend_45Ptr = _lookup< + late final _jrand48Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Long Function(ffi.Pointer)>>('jrand48'); + late final _jrand48 = + _jrand48Ptr.asFunction)>(); - late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); - ffi.Pointer _objc_msgSend_46( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer l64a( + int arg0, ) { - return __objc_msgSend_46( - obj, - sel, - path, + return _l64a( + arg0, ); } - late final __objc_msgSend_46Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _l64aPtr = + _lookup Function(ffi.Long)>>( + 'l64a'); + late final _l64a = _l64aPtr.asFunction Function(int)>(); - late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = - _registerName1( - "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_47( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, + void lcong48( + ffi.Pointer arg0, ) { - return __objc_msgSend_47( - obj, - sel, - path, - isDir, - baseURL, + return _lcong48( + arg0, ); } - late final __objc_msgSend_47Ptr = _lookup< + late final _lcong48Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer)>>('lcong48'); + late final _lcong48 = + _lcong48Ptr.asFunction)>(); - late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = - _registerName1( - "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_48( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_48( - obj, - sel, - path, - isDir, - baseURL, - ); + int lrand48() { + return _lrand48(); } - late final __objc_msgSend_48Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); + late final _lrand48Ptr = + _lookup>('lrand48'); + late final _lrand48 = _lrand48Ptr.asFunction(); - late final _sel_initWithString_1 = _registerName1("initWithString:"); - late final _sel_initWithString_relativeToURL_1 = - _registerName1("initWithString:relativeToURL:"); - late final _sel_URLWithString_1 = _registerName1("URLWithString:"); - late final _sel_URLWithString_relativeToURL_1 = - _registerName1("URLWithString:relativeToURL:"); - late final _sel_initWithDataRepresentation_relativeToURL_1 = - _registerName1("initWithDataRepresentation:relativeToURL:"); - instancetype _objc_msgSend_49( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer baseURL, + ffi.Pointer mktemp( + ffi.Pointer arg0, ) { - return __objc_msgSend_49( - obj, - sel, - data, - baseURL, + return _mktemp( + arg0, ); } - late final __objc_msgSend_49Ptr = _lookup< + late final _mktempPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer)>>('mktemp'); + late final _mktemp = _mktempPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_URLWithDataRepresentation_relativeToURL_1 = - _registerName1("URLWithDataRepresentation:relativeToURL:"); - ffi.Pointer _objc_msgSend_50( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer baseURL, + int mkstemp( + ffi.Pointer arg0, ) { - return __objc_msgSend_50( - obj, - sel, - data, - baseURL, + return _mkstemp( + arg0, ); } - late final __objc_msgSend_50Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _mkstempPtr = + _lookup)>>( + 'mkstemp'); + late final _mkstemp = + _mkstempPtr.asFunction)>(); - late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1 = - _registerName1("initAbsoluteURLWithDataRepresentation:relativeToURL:"); - late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = - _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); - late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); - ffi.Pointer _objc_msgSend_51( - ffi.Pointer obj, - ffi.Pointer sel, + int mrand48() { + return _mrand48(); + } + + late final _mrand48Ptr = + _lookup>('mrand48'); + late final _mrand48 = _mrand48Ptr.asFunction(); + + int nrand48( + ffi.Pointer arg0, ) { - return __objc_msgSend_51( - obj, - sel, + return _nrand48( + arg0, ); } - late final __objc_msgSend_51Ptr = _lookup< + late final _nrand48Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Long Function(ffi.Pointer)>>('nrand48'); + late final _nrand48 = + _nrand48Ptr.asFunction)>(); - late final _sel_absoluteString1 = _registerName1("absoluteString"); - late final _sel_relativeString1 = _registerName1("relativeString"); - late final _sel_baseURL1 = _registerName1("baseURL"); - ffi.Pointer _objc_msgSend_52( - ffi.Pointer obj, - ffi.Pointer sel, + int posix_openpt( + int arg0, ) { - return __objc_msgSend_52( - obj, - sel, + return _posix_openpt( + arg0, ); } - late final __objc_msgSend_52Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _posix_openptPtr = + _lookup>('posix_openpt'); + late final _posix_openpt = _posix_openptPtr.asFunction(); - late final _sel_absoluteURL1 = _registerName1("absoluteURL"); - late final _sel_scheme1 = _registerName1("scheme"); - late final _sel_resourceSpecifier1 = _registerName1("resourceSpecifier"); - late final _sel_host1 = _registerName1("host"); - late final _class_NSNumber1 = _getClass1("NSNumber"); - late final _class_NSValue1 = _getClass1("NSValue"); - late final _sel_getValue_size_1 = _registerName1("getValue:size:"); - late final _sel_objCType1 = _registerName1("objCType"); - ffi.Pointer _objc_msgSend_53( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer ptsname( + int arg0, ) { - return __objc_msgSend_53( - obj, - sel, + return _ptsname( + arg0, ); } - late final __objc_msgSend_53Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _ptsnamePtr = + _lookup Function(ffi.Int)>>( + 'ptsname'); + late final _ptsname = + _ptsnamePtr.asFunction Function(int)>(); - late final _sel_initWithBytes_objCType_1 = - _registerName1("initWithBytes:objCType:"); - instancetype _objc_msgSend_54( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer type, + int ptsname_r( + int fildes, + ffi.Pointer buffer, + int buflen, ) { - return __objc_msgSend_54( - obj, - sel, - value, - type, + return _ptsname_r( + fildes, + buffer, + buflen, ); } - late final __objc_msgSend_54Ptr = _lookup< + late final _ptsname_rPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('ptsname_r'); + late final _ptsname_r = + _ptsname_rPtr.asFunction, int)>(); - late final _sel_valueWithBytes_objCType_1 = - _registerName1("valueWithBytes:objCType:"); - ffi.Pointer _objc_msgSend_55( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer type, + int putenv( + ffi.Pointer arg0, ) { - return __objc_msgSend_55( - obj, - sel, - value, - type, + return _putenv( + arg0, ); } - late final __objc_msgSend_55Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _putenvPtr = + _lookup)>>( + 'putenv'); + late final _putenv = + _putenvPtr.asFunction)>(); - late final _sel_value_withObjCType_1 = _registerName1("value:withObjCType:"); - late final _sel_valueWithNonretainedObject_1 = - _registerName1("valueWithNonretainedObject:"); - ffi.Pointer _objc_msgSend_56( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_56( - obj, - sel, - anObject, - ); + int random() { + return _random(); } - late final __objc_msgSend_56Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _randomPtr = + _lookup>('random'); + late final _random = _randomPtr.asFunction(); - late final _sel_nonretainedObjectValue1 = - _registerName1("nonretainedObjectValue"); - late final _sel_valueWithPointer_1 = _registerName1("valueWithPointer:"); - ffi.Pointer _objc_msgSend_57( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pointer, + int rand_r( + ffi.Pointer arg0, ) { - return __objc_msgSend_57( - obj, - sel, - pointer, + return _rand_r( + arg0, ); } - late final __objc_msgSend_57Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _rand_rPtr = _lookup< + ffi.NativeFunction)>>( + 'rand_r'); + late final _rand_r = + _rand_rPtr.asFunction)>(); - late final _sel_pointerValue1 = _registerName1("pointerValue"); - late final _sel_isEqualToValue_1 = _registerName1("isEqualToValue:"); - bool _objc_msgSend_58( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer realpath( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_58( - obj, - sel, - value, + return _realpath( + arg0, + arg1, ); } - late final __objc_msgSend_58Ptr = _lookup< + late final _realpathPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('realpath'); + late final _realpath = _realpathPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_getValue_1 = _registerName1("getValue:"); - void _objc_msgSend_59( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer seed48( + ffi.Pointer arg0, ) { - return __objc_msgSend_59( - obj, - sel, - value, + return _seed48( + arg0, ); } - late final __objc_msgSend_59Ptr = _lookup< + late final _seed48Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('seed48'); + late final _seed48 = _seed48Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer)>(); - late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); - ffi.Pointer _objc_msgSend_60( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + int setenv( + ffi.Pointer __name, + ffi.Pointer __value, + int __overwrite, ) { - return __objc_msgSend_60( - obj, - sel, - range, + return _setenv( + __name, + __value, + __overwrite, ); } - late final __objc_msgSend_60Ptr = _lookup< + late final _setenvPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('setenv'); + late final _setenv = _setenvPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_rangeValue1 = _registerName1("rangeValue"); - NSRange _objc_msgSend_61( - ffi.Pointer obj, - ffi.Pointer sel, + void setkey( + ffi.Pointer arg0, ) { - return __objc_msgSend_61( - obj, - sel, + return _setkey( + arg0, ); } - late final __objc_msgSend_61Ptr = _lookup< - ffi.NativeFunction< - NSRange Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer)>(); + late final _setkeyPtr = + _lookup)>>( + 'setkey'); + late final _setkey = + _setkeyPtr.asFunction)>(); - late final _sel_initWithChar_1 = _registerName1("initWithChar:"); - ffi.Pointer _objc_msgSend_62( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + ffi.Pointer setstate( + ffi.Pointer arg0, ) { - return __objc_msgSend_62( - obj, - sel, - value, + return _setstate( + arg0, ); } - late final __objc_msgSend_62Ptr = _lookup< + late final _setstatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Char)>>('objc_msgSend'); - late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer)>>('setstate'); + late final _setstate = _setstatePtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_initWithUnsignedChar_1 = - _registerName1("initWithUnsignedChar:"); - ffi.Pointer _objc_msgSend_63( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void srand48( + int arg0, ) { - return __objc_msgSend_63( - obj, - sel, - value, + return _srand48( + arg0, ); } - late final __objc_msgSend_63Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); - late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _srand48Ptr = + _lookup>('srand48'); + late final _srand48 = _srand48Ptr.asFunction(); - late final _sel_initWithShort_1 = _registerName1("initWithShort:"); - ffi.Pointer _objc_msgSend_64( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void srandom( + int arg0, ) { - return __objc_msgSend_64( - obj, - sel, - value, + return _srandom( + arg0, ); } - late final __objc_msgSend_64Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Short)>>('objc_msgSend'); - late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _srandomPtr = + _lookup>( + 'srandom'); + late final _srandom = _srandomPtr.asFunction(); - late final _sel_initWithUnsignedShort_1 = - _registerName1("initWithUnsignedShort:"); - ffi.Pointer _objc_msgSend_65( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int unlockpt( + int arg0, ) { - return __objc_msgSend_65( - obj, - sel, - value, + return _unlockpt( + arg0, ); } - late final __objc_msgSend_65Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); - late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _unlockptPtr = + _lookup>('unlockpt'); + late final _unlockpt = _unlockptPtr.asFunction(); - late final _sel_initWithInt_1 = _registerName1("initWithInt:"); - ffi.Pointer _objc_msgSend_66( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int unsetenv( + ffi.Pointer arg0, ) { - return __objc_msgSend_66( - obj, - sel, - value, + return _unsetenv( + arg0, ); } - late final __objc_msgSend_66Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _unsetenvPtr = + _lookup)>>( + 'unsetenv'); + late final _unsetenv = + _unsetenvPtr.asFunction)>(); - late final _sel_initWithUnsignedInt_1 = - _registerName1("initWithUnsignedInt:"); - ffi.Pointer _objc_msgSend_67( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_67( - obj, - sel, - value, - ); + int arc4random() { + return _arc4random(); } - late final __objc_msgSend_67Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _arc4randomPtr = + _lookup>('arc4random'); + late final _arc4random = _arc4randomPtr.asFunction(); - late final _sel_initWithLong_1 = _registerName1("initWithLong:"); - ffi.Pointer _objc_msgSend_68( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void arc4random_addrandom( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_68( - obj, - sel, - value, + return _arc4random_addrandom( + arg0, + arg1, ); } - late final __objc_msgSend_68Ptr = _lookup< + late final _arc4random_addrandomPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, ffi.Int)>>('arc4random_addrandom'); + late final _arc4random_addrandom = _arc4random_addrandomPtr + .asFunction, int)>(); - late final _sel_initWithUnsignedLong_1 = - _registerName1("initWithUnsignedLong:"); - ffi.Pointer _objc_msgSend_69( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void arc4random_buf( + ffi.Pointer __buf, + int __nbytes, ) { - return __objc_msgSend_69( - obj, - sel, - value, + return _arc4random_buf( + __buf, + __nbytes, ); } - late final __objc_msgSend_69Ptr = _lookup< + late final _arc4random_bufPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, ffi.Size)>>('arc4random_buf'); + late final _arc4random_buf = _arc4random_bufPtr + .asFunction, int)>(); - late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); - ffi.Pointer _objc_msgSend_70( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_70( - obj, - sel, - value, - ); + void arc4random_stir() { + return _arc4random_stir(); } - late final __objc_msgSend_70Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); - late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _arc4random_stirPtr = + _lookup>('arc4random_stir'); + late final _arc4random_stir = + _arc4random_stirPtr.asFunction(); - late final _sel_initWithUnsignedLongLong_1 = - _registerName1("initWithUnsignedLongLong:"); - ffi.Pointer _objc_msgSend_71( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int arc4random_uniform( + int __upper_bound, ) { - return __objc_msgSend_71( - obj, - sel, - value, + return _arc4random_uniform( + __upper_bound, ); } - late final __objc_msgSend_71Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); - late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _arc4random_uniformPtr = + _lookup>( + 'arc4random_uniform'); + late final _arc4random_uniform = + _arc4random_uniformPtr.asFunction(); - late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); - ffi.Pointer _objc_msgSend_72( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + int atexit_b( + ffi.Pointer<_ObjCBlock> arg0, ) { - return __objc_msgSend_72( - obj, - sel, - value, + return _atexit_b( + arg0, ); } - late final __objc_msgSend_72Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); + late final _atexit_bPtr = + _lookup)>>( + 'atexit_b'); + late final _atexit_b = + _atexit_bPtr.asFunction)>(); - late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); - ffi.Pointer _objc_msgSend_73( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { + final d = + pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); + d.ref.reserved = 0; + d.ref.size = ffi.sizeOf<_ObjCBlock>(); + d.ref.copy_helper = ffi.nullptr; + d.ref.dispose_helper = ffi.nullptr; + d.ref.signature = ffi.nullptr; + return d; + } + + late final _objc_block_desc1 = _newBlockDesc1(); + late final _objc_concrete_global_block1 = + _lookup('_NSConcreteGlobalBlock'); + ffi.Pointer<_ObjCBlock> _newBlock1( + ffi.Pointer invoke, ffi.Pointer target) { + final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); + b.ref.isa = _objc_concrete_global_block1; + b.ref.flags = 0; + b.ref.reserved = 0; + b.ref.invoke = invoke; + b.ref.target = target; + b.ref.descriptor = _objc_block_desc1; + final copy = _Block_copy(b.cast()).cast<_ObjCBlock>(); + pkg_ffi.calloc.free(b); + return copy; + } + + ffi.Pointer _Block_copy( + ffi.Pointer value, ) { - return __objc_msgSend_73( - obj, - sel, + return __Block_copy( value, ); } - late final __objc_msgSend_73Ptr = _lookup< + late final __Block_copyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); + ffi.Pointer Function( + ffi.Pointer)>>('_Block_copy'); + late final __Block_copy = __Block_copyPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_initWithBool_1 = _registerName1("initWithBool:"); - ffi.Pointer _objc_msgSend_74( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, + void _Block_release( + ffi.Pointer value, ) { - return __objc_msgSend_74( - obj, - sel, + return __Block_release( value, ); } - late final __objc_msgSend_74Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + late final __Block_releasePtr = + _lookup)>>( + '_Block_release'); + late final __Block_release = + __Block_releasePtr.asFunction)>(); - late final _sel_initWithInteger_1 = _registerName1("initWithInteger:"); - late final _sel_initWithUnsignedInteger_1 = - _registerName1("initWithUnsignedInteger:"); - late final _sel_charValue1 = _registerName1("charValue"); - int _objc_msgSend_75( - ffi.Pointer obj, - ffi.Pointer sel, + late final _objc_releaseFinalizer2 = + ffi.NativeFinalizer(__Block_releasePtr.cast()); + ffi.Pointer bsearch_b( + ffi.Pointer __key, + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_75( - obj, - sel, + return _bsearch_b( + __key, + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_75Ptr = _lookup< + late final _bsearch_bPtr = _lookup< ffi.NativeFunction< - ffi.Char Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('bsearch_b'); + late final _bsearch_b = _bsearch_bPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); - int _objc_msgSend_76( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer cgetcap( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_76( - obj, - sel, + return _cgetcap( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_76Ptr = _lookup< + late final _cgetcapPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedChar Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>('cgetcap'); + late final _cgetcap = _cgetcapPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_shortValue1 = _registerName1("shortValue"); - int _objc_msgSend_77( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_77( - obj, - sel, - ); + int cgetclose() { + return _cgetclose(); } - late final __objc_msgSend_77Ptr = _lookup< - ffi.NativeFunction< - ffi.Short Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _cgetclosePtr = + _lookup>('cgetclose'); + late final _cgetclose = _cgetclosePtr.asFunction(); - late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); - int _objc_msgSend_78( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetent( + ffi.Pointer> arg0, + ffi.Pointer> arg1, + ffi.Pointer arg2, ) { - return __objc_msgSend_78( - obj, - sel, + return _cgetent( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_78Ptr = _lookup< + late final _cgetentPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedShort Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer>, + ffi.Pointer)>>('cgetent'); + late final _cgetent = _cgetentPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>, ffi.Pointer)>(); - late final _sel_intValue1 = _registerName1("intValue"); - int _objc_msgSend_79( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetfirst( + ffi.Pointer> arg0, + ffi.Pointer> arg1, ) { - return __objc_msgSend_79( - obj, - sel, + return _cgetfirst( + arg0, + arg1, ); } - late final __objc_msgSend_79Ptr = _lookup< + late final _cgetfirstPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, + ffi.Pointer>)>>('cgetfirst'); + late final _cgetfirst = _cgetfirstPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); - int _objc_msgSend_80( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetmatch( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_80( - obj, - sel, + return _cgetmatch( + arg0, + arg1, ); } - late final __objc_msgSend_80Ptr = _lookup< + late final _cgetmatchPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedInt Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('cgetmatch'); + late final _cgetmatch = _cgetmatchPtr + .asFunction, ffi.Pointer)>(); - late final _sel_longValue1 = _registerName1("longValue"); - int _objc_msgSend_81( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetnext( + ffi.Pointer> arg0, + ffi.Pointer> arg1, ) { - return __objc_msgSend_81( - obj, - sel, + return _cgetnext( + arg0, + arg1, ); } - late final __objc_msgSend_81Ptr = _lookup< + late final _cgetnextPtr = _lookup< ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, + ffi.Pointer>)>>('cgetnext'); + late final _cgetnext = _cgetnextPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); - late final _sel_longLongValue1 = _registerName1("longLongValue"); - int _objc_msgSend_82( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetnum( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return __objc_msgSend_82( - obj, - sel, + return _cgetnum( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_82Ptr = _lookup< + late final _cgetnumPtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('cgetnum'); + late final _cgetnum = _cgetnumPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_unsignedLongLongValue1 = - _registerName1("unsignedLongLongValue"); - int _objc_msgSend_83( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetset( + ffi.Pointer arg0, ) { - return __objc_msgSend_83( - obj, - sel, + return _cgetset( + arg0, ); } - late final __objc_msgSend_83Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLongLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _cgetsetPtr = + _lookup)>>( + 'cgetset'); + late final _cgetset = + _cgetsetPtr.asFunction)>(); - late final _sel_floatValue1 = _registerName1("floatValue"); - double _objc_msgSend_84( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetstr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, ) { - return __objc_msgSend_84( - obj, - sel, + return _cgetstr( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_84Ptr = _lookup< + late final _cgetstrPtr = _lookup< ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('cgetstr'); + late final _cgetstr = _cgetstrPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_doubleValue1 = _registerName1("doubleValue"); - double _objc_msgSend_85( - ffi.Pointer obj, - ffi.Pointer sel, + int cgetustr( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, ) { - return __objc_msgSend_85( - obj, - sel, + return _cgetustr( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_85Ptr = _lookup< + late final _cgetustrPtr = _lookup< ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('cgetustr'); + late final _cgetustr = _cgetustrPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_boolValue1 = _registerName1("boolValue"); - late final _sel_integerValue1 = _registerName1("integerValue"); - late final _sel_unsignedIntegerValue1 = - _registerName1("unsignedIntegerValue"); - late final _sel_stringValue1 = _registerName1("stringValue"); - int _objc_msgSend_86( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherNumber, + int daemon( + int arg0, + int arg1, ) { - return __objc_msgSend_86( - obj, - sel, - otherNumber, + return _daemon( + arg0, + arg1, ); } - late final __objc_msgSend_86Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _daemonPtr = + _lookup>('daemon'); + late final _daemon = _daemonPtr.asFunction(); - late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); - bool _objc_msgSend_87( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer number, + ffi.Pointer devname( + int arg0, + int arg1, ) { - return __objc_msgSend_87( - obj, - sel, - number, + return _devname( + arg0, + arg1, ); } - late final __objc_msgSend_87Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _devnamePtr = _lookup< + ffi.NativeFunction Function(dev_t, mode_t)>>( + 'devname'); + late final _devname = + _devnamePtr.asFunction Function(int, int)>(); - late final _sel_descriptionWithLocale_1 = - _registerName1("descriptionWithLocale:"); - ffi.Pointer _objc_msgSend_88( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, + ffi.Pointer devname_r( + int arg0, + int arg1, + ffi.Pointer buf, + int len, ) { - return __objc_msgSend_88( - obj, - sel, - locale, + return _devname_r( + arg0, + arg1, + buf, + len, ); } - late final __objc_msgSend_88Ptr = _lookup< + late final _devname_rPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + dev_t, mode_t, ffi.Pointer, ffi.Int)>>('devname_r'); + late final _devname_r = _devname_rPtr.asFunction< + ffi.Pointer Function(int, int, ffi.Pointer, int)>(); - late final _sel_numberWithChar_1 = _registerName1("numberWithChar:"); - late final _sel_numberWithUnsignedChar_1 = - _registerName1("numberWithUnsignedChar:"); - late final _sel_numberWithShort_1 = _registerName1("numberWithShort:"); - late final _sel_numberWithUnsignedShort_1 = - _registerName1("numberWithUnsignedShort:"); - late final _sel_numberWithInt_1 = _registerName1("numberWithInt:"); - late final _sel_numberWithUnsignedInt_1 = - _registerName1("numberWithUnsignedInt:"); - late final _sel_numberWithLong_1 = _registerName1("numberWithLong:"); - late final _sel_numberWithUnsignedLong_1 = - _registerName1("numberWithUnsignedLong:"); - late final _sel_numberWithLongLong_1 = _registerName1("numberWithLongLong:"); - late final _sel_numberWithUnsignedLongLong_1 = - _registerName1("numberWithUnsignedLongLong:"); - late final _sel_numberWithFloat_1 = _registerName1("numberWithFloat:"); - late final _sel_numberWithDouble_1 = _registerName1("numberWithDouble:"); - late final _sel_numberWithBool_1 = _registerName1("numberWithBool:"); - late final _sel_numberWithInteger_1 = _registerName1("numberWithInteger:"); - late final _sel_numberWithUnsignedInteger_1 = - _registerName1("numberWithUnsignedInteger:"); - late final _sel_port1 = _registerName1("port"); - ffi.Pointer _objc_msgSend_89( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer getbsize( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_89( - obj, - sel, + return _getbsize( + arg0, + arg1, ); } - late final __objc_msgSend_89Ptr = _lookup< + late final _getbsizePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('getbsize'); + late final _getbsize = _getbsizePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_user1 = _registerName1("user"); - late final _sel_password1 = _registerName1("password"); - late final _sel_path1 = _registerName1("path"); - late final _sel_fragment1 = _registerName1("fragment"); - late final _sel_parameterString1 = _registerName1("parameterString"); - late final _sel_query1 = _registerName1("query"); - late final _sel_relativePath1 = _registerName1("relativePath"); - late final _sel_hasDirectoryPath1 = _registerName1("hasDirectoryPath"); - late final _sel_getFileSystemRepresentation_maxLength_1 = - _registerName1("getFileSystemRepresentation:maxLength:"); - bool _objc_msgSend_90( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferLength, + int getloadavg( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_90( - obj, - sel, - buffer, - maxBufferLength, + return _getloadavg( + arg0, + arg1, ); } - late final __objc_msgSend_90Ptr = _lookup< + late final _getloadavgPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Int)>>('getloadavg'); + late final _getloadavg = + _getloadavgPtr.asFunction, int)>(); - late final _sel_fileSystemRepresentation1 = - _registerName1("fileSystemRepresentation"); - late final _sel_isFileURL1 = _registerName1("isFileURL"); - late final _sel_standardizedURL1 = _registerName1("standardizedURL"); - late final _class_NSError1 = _getClass1("NSError"); - late final _class_NSDictionary1 = _getClass1("NSDictionary"); - late final _sel_count1 = _registerName1("count"); - late final _sel_objectForKey_1 = _registerName1("objectForKey:"); - ffi.Pointer _objc_msgSend_91( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aKey, - ) { - return __objc_msgSend_91( - obj, - sel, - aKey, - ); + ffi.Pointer getprogname() { + return _getprogname(); } - late final __objc_msgSend_91Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _getprognamePtr = + _lookup Function()>>( + 'getprogname'); + late final _getprogname = + _getprognamePtr.asFunction Function()>(); - late final _class_NSEnumerator1 = _getClass1("NSEnumerator"); - late final _sel_nextObject1 = _registerName1("nextObject"); - late final _sel_allObjects1 = _registerName1("allObjects"); - late final _sel_keyEnumerator1 = _registerName1("keyEnumerator"); - ffi.Pointer _objc_msgSend_92( - ffi.Pointer obj, - ffi.Pointer sel, + void setprogname( + ffi.Pointer arg0, ) { - return __objc_msgSend_92( - obj, - sel, + return _setprogname( + arg0, ); } - late final __objc_msgSend_92Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _setprognamePtr = + _lookup)>>( + 'setprogname'); + late final _setprogname = + _setprognamePtr.asFunction)>(); - late final _sel_initWithObjects_forKeys_count_1 = - _registerName1("initWithObjects:forKeys:count:"); - instancetype _objc_msgSend_93( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt, + int heapsort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_93( - obj, - sel, - objects, - keys, - cnt, + return _heapsort( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_93Ptr = _lookup< + late final _heapsortPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); + ffi.Int Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('heapsort'); + late final _heapsort = _heapsortPtr.asFunction< + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - late final _class_NSArray1 = _getClass1("NSArray"); - late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); - ffi.Pointer _objc_msgSend_94( - ffi.Pointer obj, - ffi.Pointer sel, - int index, + int heapsort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_94( - obj, - sel, - index, + return _heapsort_b( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_94Ptr = _lookup< + late final _heapsort_bPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('heapsort_b'); + late final _heapsort_b = _heapsort_bPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithObjects_count_1 = - _registerName1("initWithObjects:count:"); - instancetype _objc_msgSend_95( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - int cnt, + int mergesort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_95( - obj, - sel, - objects, - cnt, + return _mergesort( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_95Ptr = _lookup< + late final _mergesortPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, int)>(); + ffi.Int Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('mergesort'); + late final _mergesort = _mergesortPtr.asFunction< + int Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - late final _sel_arrayByAddingObject_1 = - _registerName1("arrayByAddingObject:"); - ffi.Pointer _objc_msgSend_96( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, + int mergesort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_96( - obj, - sel, - anObject, + return _mergesort_b( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_96Ptr = _lookup< + late final _mergesort_bPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('mergesort_b'); + late final _mergesort_b = _mergesort_bPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_arrayByAddingObjectsFromArray_1 = - _registerName1("arrayByAddingObjectsFromArray:"); - ffi.Pointer _objc_msgSend_97( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + void psort( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_97( - obj, - sel, - otherArray, + return _psort( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_97Ptr = _lookup< + late final _psortPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>)>>('psort'); + late final _psort = _psortPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>)>(); - late final _sel_componentsJoinedByString_1 = - _registerName1("componentsJoinedByString:"); - ffi.Pointer _objc_msgSend_98( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer separator, + void psort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_98( - obj, - sel, - separator, + return _psort_b( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_98Ptr = _lookup< + late final _psort_bPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('psort_b'); + late final _psort_b = _psort_bPtr.asFunction< + void Function( + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_containsObject_1 = _registerName1("containsObject:"); - late final _sel_descriptionWithLocale_indent_1 = - _registerName1("descriptionWithLocale:indent:"); - ffi.Pointer _objc_msgSend_99( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, - int level, + void psort_r( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer arg3, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_99( - obj, - sel, - locale, - level, + return _psort_r( + __base, + __nel, + __width, + arg3, + __compar, ); } - late final __objc_msgSend_99Ptr = _lookup< + late final _psort_rPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>)>>('psort_r'); + late final _psort_r = _psort_rPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>)>(); - late final _sel_firstObjectCommonWithArray_1 = - _registerName1("firstObjectCommonWithArray:"); - ffi.Pointer _objc_msgSend_100( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + void qsort_b( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer<_ObjCBlock> __compar, ) { - return __objc_msgSend_100( - obj, - sel, - otherArray, + return _qsort_b( + __base, + __nel, + __width, + __compar, ); } - late final __objc_msgSend_100Ptr = _lookup< + late final _qsort_bPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer<_ObjCBlock>)>>('qsort_b'); + late final _qsort_b = _qsort_bPtr.asFunction< + void Function( + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); - void _objc_msgSend_101( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - NSRange range, + void qsort_r( + ffi.Pointer __base, + int __nel, + int __width, + ffi.Pointer arg3, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>> + __compar, ) { - return __objc_msgSend_101( - obj, - sel, - objects, - range, + return _qsort_r( + __base, + __nel, + __width, + arg3, + __compar, ); } - late final __objc_msgSend_101Ptr = _lookup< + late final _qsort_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, NSRange)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Size, + ffi.Size, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>)>>('qsort_r'); + late final _qsort_r = _qsort_rPtr.asFunction< + void Function( + ffi.Pointer, + int, + int, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>)>(); - late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); - int _objc_msgSend_102( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, + int radixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, ) { - return __objc_msgSend_102( - obj, - sel, - anObject, + return _radixsort( + __base, + __nel, + __table, + __endbyte, ); } - late final __objc_msgSend_102Ptr = _lookup< + late final _radixsortPtr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('radixsort'); + late final _radixsort = _radixsortPtr.asFunction< + int Function(ffi.Pointer>, int, + ffi.Pointer, int)>(); - late final _sel_indexOfObject_inRange_1 = - _registerName1("indexOfObject:inRange:"); - int _objc_msgSend_103( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - NSRange range, + int rpmatch( + ffi.Pointer arg0, ) { - return __objc_msgSend_103( - obj, - sel, - anObject, - range, + return _rpmatch( + arg0, ); } - late final __objc_msgSend_103Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + late final _rpmatchPtr = + _lookup)>>( + 'rpmatch'); + late final _rpmatch = + _rpmatchPtr.asFunction)>(); - late final _sel_indexOfObjectIdenticalTo_1 = - _registerName1("indexOfObjectIdenticalTo:"); - late final _sel_indexOfObjectIdenticalTo_inRange_1 = - _registerName1("indexOfObjectIdenticalTo:inRange:"); - late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); - bool _objc_msgSend_104( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + int sradixsort( + ffi.Pointer> __base, + int __nel, + ffi.Pointer __table, + int __endbyte, ) { - return __objc_msgSend_104( - obj, - sel, - otherArray, + return _sradixsort( + __base, + __nel, + __table, + __endbyte, ); } - late final __objc_msgSend_104Ptr = _lookup< + late final _sradixsortPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('sradixsort'); + late final _sradixsort = _sradixsortPtr.asFunction< + int Function(ffi.Pointer>, int, + ffi.Pointer, int)>(); - late final _sel_firstObject1 = _registerName1("firstObject"); - late final _sel_lastObject1 = _registerName1("lastObject"); - late final _sel_objectEnumerator1 = _registerName1("objectEnumerator"); - late final _sel_reverseObjectEnumerator1 = - _registerName1("reverseObjectEnumerator"); - late final _sel_sortedArrayHint1 = _registerName1("sortedArrayHint"); - late final _sel_sortedArrayUsingFunction_context_1 = - _registerName1("sortedArrayUsingFunction:context:"); - ffi.Pointer _objc_msgSend_105( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - ) { - return __objc_msgSend_105( - obj, - sel, - comparator, - context, + void sranddev() { + return _sranddev(); + } + + late final _sranddevPtr = + _lookup>('sranddev'); + late final _sranddev = _sranddevPtr.asFunction(); + + void srandomdev() { + return _srandomdev(); + } + + late final _srandomdevPtr = + _lookup>('srandomdev'); + late final _srandomdev = _srandomdevPtr.asFunction(); + + ffi.Pointer reallocf( + ffi.Pointer __ptr, + int __size, + ) { + return _reallocf( + __ptr, + __size, ); } - late final __objc_msgSend_105Ptr = _lookup< + late final _reallocfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('reallocf'); + late final _reallocf = _reallocfPtr + .asFunction Function(ffi.Pointer, int)>(); - late final _sel_sortedArrayUsingFunction_context_hint_1 = - _registerName1("sortedArrayUsingFunction:context:hint:"); - ffi.Pointer _objc_msgSend_106( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - ffi.Pointer hint, + int strtonum( + ffi.Pointer __numstr, + int __minval, + int __maxval, + ffi.Pointer> __errstrp, ) { - return __objc_msgSend_106( - obj, - sel, - comparator, - context, - hint, + return _strtonum( + __numstr, + __minval, + __maxval, + __errstrp, ); } - late final __objc_msgSend_106Ptr = _lookup< + late final _strtonumPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>(); + ffi.LongLong Function(ffi.Pointer, ffi.LongLong, + ffi.LongLong, ffi.Pointer>)>>('strtonum'); + late final _strtonum = _strtonumPtr.asFunction< + int Function(ffi.Pointer, int, int, + ffi.Pointer>)>(); - late final _sel_sortedArrayUsingSelector_1 = - _registerName1("sortedArrayUsingSelector:"); - ffi.Pointer _objc_msgSend_107( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer comparator, + int strtoq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_107( - obj, - sel, - comparator, + return _strtoq( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_107Ptr = _lookup< + late final _strtoqPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoq'); + late final _strtoq = _strtoqPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); - ffi.Pointer _objc_msgSend_108( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + int strtouq( + ffi.Pointer __str, + ffi.Pointer> __endptr, + int __base, ) { - return __objc_msgSend_108( - obj, - sel, - range, + return _strtouq( + __str, + __endptr, + __base, ); } - late final __objc_msgSend_108Ptr = _lookup< + late final _strtouqPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtouq'); + late final _strtouq = _strtouqPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); - bool _objc_msgSend_109( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, + late final ffi.Pointer> _suboptarg = + _lookup>('suboptarg'); + + ffi.Pointer get suboptarg => _suboptarg.value; + + set suboptarg(ffi.Pointer value) => _suboptarg.value = value; + + int __darwin_check_fd_set_overflow( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_109( - obj, - sel, - url, - error, + return ___darwin_check_fd_set_overflow( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_109Ptr = _lookup< + late final ___darwin_check_fd_set_overflowPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Int)>>('__darwin_check_fd_set_overflow'); + late final ___darwin_check_fd_set_overflow = + ___darwin_check_fd_set_overflowPtr + .asFunction, int)>(); - late final _sel_makeObjectsPerformSelector_1 = - _registerName1("makeObjectsPerformSelector:"); - late final _sel_makeObjectsPerformSelector_withObject_1 = - _registerName1("makeObjectsPerformSelector:withObject:"); - void _objc_msgSend_110( - ffi.Pointer obj, + ffi.Pointer sel_getName( ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer argument, ) { - return __objc_msgSend_110( - obj, + return _sel_getName( sel, - aSelector, - argument, ); } - late final __objc_msgSend_110Ptr = _lookup< + late final _sel_getNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer)>>('sel_getName'); + late final _sel_getName = _sel_getNamePtr + .asFunction Function(ffi.Pointer)>(); - late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); - late final _sel_indexSet1 = _registerName1("indexSet"); - late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); - late final _sel_indexSetWithIndexesInRange_1 = - _registerName1("indexSetWithIndexesInRange:"); - instancetype _objc_msgSend_111( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + ffi.Pointer sel_registerName( + ffi.Pointer str, ) { - return __objc_msgSend_111( - obj, - sel, - range, + return _sel_registerName1( + str, ); } - late final __objc_msgSend_111Ptr = _lookup< + late final _sel_registerNamePtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer Function( + ffi.Pointer)>>('sel_registerName'); + late final _sel_registerName1 = _sel_registerNamePtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_initWithIndexesInRange_1 = - _registerName1("initWithIndexesInRange:"); - late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); - instancetype _objc_msgSend_112( + ffi.Pointer object_getClassName( ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, ) { - return __objc_msgSend_112( + return _object_getClassName( obj, - sel, - indexSet, ); } - late final __objc_msgSend_112Ptr = _lookup< + late final _object_getClassNamePtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('object_getClassName'); + late final _object_getClassName = _object_getClassNamePtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); - late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); - bool _objc_msgSend_113( + ffi.Pointer object_getIndexedIvars( ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, ) { - return __objc_msgSend_113( + return _object_getIndexedIvars( obj, - sel, - indexSet, ); } - late final __objc_msgSend_113Ptr = _lookup< + late final _object_getIndexedIvarsPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('object_getIndexedIvars'); + late final _object_getIndexedIvars = _object_getIndexedIvarsPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_firstIndex1 = _registerName1("firstIndex"); - late final _sel_lastIndex1 = _registerName1("lastIndex"); - late final _sel_indexGreaterThanIndex_1 = - _registerName1("indexGreaterThanIndex:"); - int _objc_msgSend_114( - ffi.Pointer obj, + bool sel_isMapped( ffi.Pointer sel, - int value, ) { - return __objc_msgSend_114( - obj, + return _sel_isMapped( sel, - value, ); } - late final __objc_msgSend_114Ptr = _lookup< + late final _sel_isMappedPtr = + _lookup)>>( + 'sel_isMapped'); + late final _sel_isMapped = + _sel_isMappedPtr.asFunction)>(); + + ffi.Pointer sel_getUid( + ffi.Pointer str, + ) { + return _sel_getUid( + str, + ); + } + + late final _sel_getUidPtr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer)>>('sel_getUid'); + late final _sel_getUid = _sel_getUidPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); - late final _sel_indexGreaterThanOrEqualToIndex_1 = - _registerName1("indexGreaterThanOrEqualToIndex:"); - late final _sel_indexLessThanOrEqualToIndex_1 = - _registerName1("indexLessThanOrEqualToIndex:"); - late final _sel_getIndexes_maxCount_inIndexRange_1 = - _registerName1("getIndexes:maxCount:inIndexRange:"); - int _objc_msgSend_115( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexBuffer, - int bufferSize, - NSRangePointer range, + ffi.Pointer objc_retainedObject( + objc_objectptr_t obj, ) { - return __objc_msgSend_115( + return _objc_retainedObject( obj, - sel, - indexBuffer, - bufferSize, - range, ); } - late final __objc_msgSend_115Ptr = _lookup< + late final _objc_retainedObjectPtr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRangePointer)>(); + ffi.Pointer Function( + objc_objectptr_t)>>('objc_retainedObject'); + late final _objc_retainedObject = _objc_retainedObjectPtr + .asFunction Function(objc_objectptr_t)>(); - late final _sel_countOfIndexesInRange_1 = - _registerName1("countOfIndexesInRange:"); - int _objc_msgSend_116( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + ffi.Pointer objc_unretainedObject( + objc_objectptr_t obj, ) { - return __objc_msgSend_116( + return _objc_unretainedObject( obj, - sel, - range, ); } - late final __objc_msgSend_116Ptr = _lookup< + late final _objc_unretainedObjectPtr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer Function( + objc_objectptr_t)>>('objc_unretainedObject'); + late final _objc_unretainedObject = _objc_unretainedObjectPtr + .asFunction Function(objc_objectptr_t)>(); - late final _sel_containsIndex_1 = _registerName1("containsIndex:"); - bool _objc_msgSend_117( + objc_objectptr_t objc_unretainedPointer( ffi.Pointer obj, - ffi.Pointer sel, - int value, ) { - return __objc_msgSend_117( + return _objc_unretainedPointer( obj, - sel, - value, ); } - late final __objc_msgSend_117Ptr = _lookup< + late final _objc_unretainedPointerPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + objc_objectptr_t Function( + ffi.Pointer)>>('objc_unretainedPointer'); + late final _objc_unretainedPointer = _objc_unretainedPointerPtr + .asFunction)>(); - late final _sel_containsIndexesInRange_1 = - _registerName1("containsIndexesInRange:"); - bool _objc_msgSend_118( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + ffi.Pointer _registerName1(String name) { + final cstr = name.toNativeUtf8(); + final sel = _sel_registerName(cstr.cast()); + pkg_ffi.calloc.free(cstr); + return sel; + } + + ffi.Pointer _sel_registerName( + ffi.Pointer str, ) { - return __objc_msgSend_118( - obj, - sel, - range, + return __sel_registerName( + str, ); } - late final __objc_msgSend_118Ptr = _lookup< + late final __sel_registerNamePtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer Function( + ffi.Pointer)>>('sel_registerName'); + late final __sel_registerName = __sel_registerNamePtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); - late final _sel_intersectsIndexesInRange_1 = - _registerName1("intersectsIndexesInRange:"); - ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { - final d = - pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); - d.ref.reserved = 0; - d.ref.size = ffi.sizeOf<_ObjCBlock>(); - d.ref.copy_helper = ffi.nullptr; - d.ref.dispose_helper = ffi.nullptr; - d.ref.signature = ffi.nullptr; - return d; + ffi.Pointer _getClass1(String name) { + final cstr = name.toNativeUtf8(); + final clazz = _objc_getClass(cstr.cast()); + pkg_ffi.calloc.free(cstr); + if (clazz == ffi.nullptr) { + throw Exception('Failed to load Objective-C class: $name'); + } + return clazz; } - late final _objc_block_desc1 = _newBlockDesc1(); - late final _objc_concrete_global_block1 = - _lookup('_NSConcreteGlobalBlock'); - ffi.Pointer<_ObjCBlock> _newBlock1( - ffi.Pointer invoke, ffi.Pointer target) { - final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); - b.ref.isa = _objc_concrete_global_block1; - b.ref.flags = 0; - b.ref.reserved = 0; - b.ref.invoke = invoke; - b.ref.target = target; - b.ref.descriptor = _objc_block_desc1; - final copy = _Block_copy(b.cast()).cast<_ObjCBlock>(); - pkg_ffi.calloc.free(b); - return copy; + ffi.Pointer _objc_getClass( + ffi.Pointer str, + ) { + return __objc_getClass( + str, + ); } - ffi.Pointer _Block_copy( - ffi.Pointer value, + late final __objc_getClassPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('objc_getClass'); + late final __objc_getClass = __objc_getClassPtr + .asFunction Function(ffi.Pointer)>(); + + ffi.Pointer _objc_retain( + ffi.Pointer value, ) { - return __Block_copy( + return __objc_retain( value, ); } - late final __Block_copyPtr = _lookup< + late final __objc_retainPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('_Block_copy'); - late final __Block_copy = __Block_copyPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('objc_retain'); + late final __objc_retain = __objc_retainPtr + .asFunction Function(ffi.Pointer)>(); - void _Block_release( - ffi.Pointer value, + void _objc_release( + ffi.Pointer value, ) { - return __Block_release( + return __objc_release( value, ); } - late final __Block_releasePtr = - _lookup)>>( - '_Block_release'); - late final __Block_release = - __Block_releasePtr.asFunction)>(); + late final __objc_releasePtr = + _lookup)>>( + 'objc_release'); + late final __objc_release = + __objc_releasePtr.asFunction)>(); late final _objc_releaseFinalizer11 = - ffi.NativeFinalizer(__Block_releasePtr.cast()); - late final _sel_enumerateIndexesUsingBlock_1 = - _registerName1("enumerateIndexesUsingBlock:"); - void _objc_msgSend_119( + ffi.NativeFinalizer(__objc_releasePtr.cast()); + late final _class_NSObject1 = _getClass1("NSObject"); + late final _sel_load1 = _registerName1("load"); + void _objc_msgSend_1( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_119( + return __objc_msgSend_1( obj, sel, - block, ); } - late final __objc_msgSend_119Ptr = _lookup< + late final __objc_msgSend_1Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateIndexesWithOptions_usingBlock_1 = - _registerName1("enumerateIndexesWithOptions:usingBlock:"); - void _objc_msgSend_120( + late final _sel_initialize1 = _registerName1("initialize"); + late final _sel_init1 = _registerName1("init"); + instancetype _objc_msgSend_2( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_120( + return __objc_msgSend_2( obj, sel, - opts, - block, ); } - late final __objc_msgSend_120Ptr = _lookup< + late final __objc_msgSend_2Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateIndexesInRange_options_usingBlock_1 = - _registerName1("enumerateIndexesInRange:options:usingBlock:"); - void _objc_msgSend_121( + late final _sel_new1 = _registerName1("new"); + late final _sel_allocWithZone_1 = _registerName1("allocWithZone:"); + instancetype _objc_msgSend_3( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_NSZone> zone, ) { - return __objc_msgSend_121( + return __objc_msgSend_3( obj, sel, - range, - opts, - block, + zone, ); } - late final __objc_msgSend_121Ptr = _lookup< + late final __objc_msgSend_3Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_NSZone>)>>('objc_msgSend'); + late final __objc_msgSend_3 = __objc_msgSend_3Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_NSZone>)>(); - late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); - int _objc_msgSend_122( + late final _sel_alloc1 = _registerName1("alloc"); + late final _sel_dealloc1 = _registerName1("dealloc"); + late final _sel_finalize1 = _registerName1("finalize"); + late final _sel_copy1 = _registerName1("copy"); + late final _sel_mutableCopy1 = _registerName1("mutableCopy"); + late final _sel_copyWithZone_1 = _registerName1("copyWithZone:"); + late final _sel_mutableCopyWithZone_1 = + _registerName1("mutableCopyWithZone:"); + late final _sel_instancesRespondToSelector_1 = + _registerName1("instancesRespondToSelector:"); + bool _objc_msgSend_4( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer aSelector, ) { - return __objc_msgSend_122( + return __objc_msgSend_4( obj, sel, - predicate, + aSelector, ); } - late final __objc_msgSend_122Ptr = _lookup< + late final __objc_msgSend_4Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexWithOptions_passingTest_1 = - _registerName1("indexWithOptions:passingTest:"); - int _objc_msgSend_123( + bool _objc_msgSend_0( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer clazz, ) { - return __objc_msgSend_123( + return __objc_msgSend_0( obj, sel, - opts, - predicate, + clazz, ); } - late final __objc_msgSend_123Ptr = _lookup< + late final __objc_msgSend_0Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexInRange_options_passingTest_1 = - _registerName1("indexInRange:options:passingTest:"); - int _objc_msgSend_124( + late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); + late final _class_Protocol1 = _getClass1("Protocol"); + late final _sel_conformsToProtocol_1 = _registerName1("conformsToProtocol:"); + bool _objc_msgSend_5( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer protocol, ) { - return __objc_msgSend_124( + return __objc_msgSend_5( obj, sel, - range, - opts, - predicate, + protocol, ); } - late final __objc_msgSend_124Ptr = _lookup< + late final __objc_msgSend_5Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_5 = __objc_msgSend_5Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); - ffi.Pointer _objc_msgSend_125( + late final _sel_methodForSelector_1 = _registerName1("methodForSelector:"); + IMP _objc_msgSend_6( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer aSelector, ) { - return __objc_msgSend_125( + return __objc_msgSend_6( obj, sel, - predicate, + aSelector, ); } - late final __objc_msgSend_125Ptr = _lookup< + late final __objc_msgSend_6Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + IMP Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction< + IMP Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexesWithOptions_passingTest_1 = - _registerName1("indexesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_126( + late final _sel_instanceMethodForSelector_1 = + _registerName1("instanceMethodForSelector:"); + late final _sel_doesNotRecognizeSelector_1 = + _registerName1("doesNotRecognizeSelector:"); + void _objc_msgSend_7( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer aSelector, ) { - return __objc_msgSend_126( + return __objc_msgSend_7( obj, sel, - opts, - predicate, + aSelector, ); } - late final __objc_msgSend_126Ptr = _lookup< + late final __objc_msgSend_7Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_indexesInRange_options_passingTest_1 = - _registerName1("indexesInRange:options:passingTest:"); - ffi.Pointer _objc_msgSend_127( + late final _sel_forwardingTargetForSelector_1 = + _registerName1("forwardingTargetForSelector:"); + ffi.Pointer _objc_msgSend_8( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer aSelector, ) { - return __objc_msgSend_127( + return __objc_msgSend_8( obj, sel, - range, - opts, - predicate, + aSelector, ); } - late final __objc_msgSend_127Ptr = _lookup< + late final __objc_msgSend_8Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateRangesUsingBlock_1 = - _registerName1("enumerateRangesUsingBlock:"); - void _objc_msgSend_128( + late final _class_NSInvocation1 = _getClass1("NSInvocation"); + late final _sel_forwardInvocation_1 = _registerName1("forwardInvocation:"); + void _objc_msgSend_9( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer anInvocation, ) { - return __objc_msgSend_128( + return __objc_msgSend_9( obj, sel, - block, + anInvocation, ); } - late final __objc_msgSend_128Ptr = _lookup< + late final __objc_msgSend_9Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_9 = __objc_msgSend_9Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer)>(); - late final _sel_enumerateRangesWithOptions_usingBlock_1 = - _registerName1("enumerateRangesWithOptions:usingBlock:"); - void _objc_msgSend_129( + late final _class_NSMethodSignature1 = _getClass1("NSMethodSignature"); + late final _sel_methodSignatureForSelector_1 = + _registerName1("methodSignatureForSelector:"); + ffi.Pointer _objc_msgSend_10( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer aSelector, ) { - return __objc_msgSend_129( + return __objc_msgSend_10( obj, sel, - opts, - block, + aSelector, ); } - late final __objc_msgSend_129Ptr = _lookup< + late final __objc_msgSend_10Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateRangesInRange_options_usingBlock_1 = - _registerName1("enumerateRangesInRange:options:usingBlock:"); - void _objc_msgSend_130( + late final _sel_instanceMethodSignatureForSelector_1 = + _registerName1("instanceMethodSignatureForSelector:"); + late final _sel_allowsWeakReference1 = _registerName1("allowsWeakReference"); + bool _objc_msgSend_11( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_130( + return __objc_msgSend_11( obj, sel, - range, - opts, - block, ); } - late final __objc_msgSend_130Ptr = _lookup< + late final __objc_msgSend_11Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); - ffi.Pointer _objc_msgSend_131( + late final _sel_retainWeakReference1 = _registerName1("retainWeakReference"); + late final _sel_isSubclassOfClass_1 = _registerName1("isSubclassOfClass:"); + late final _sel_resolveClassMethod_1 = _registerName1("resolveClassMethod:"); + late final _sel_resolveInstanceMethod_1 = + _registerName1("resolveInstanceMethod:"); + late final _sel_hash1 = _registerName1("hash"); + int _objc_msgSend_12( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexes, ) { - return __objc_msgSend_131( + return __objc_msgSend_12( obj, sel, - indexes, ); } - late final __objc_msgSend_131Ptr = _lookup< + late final __objc_msgSend_12Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSUInteger Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_12 = __objc_msgSend_12Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_objectAtIndexedSubscript_1 = - _registerName1("objectAtIndexedSubscript:"); - late final _sel_enumerateObjectsUsingBlock_1 = - _registerName1("enumerateObjectsUsingBlock:"); - void _objc_msgSend_132( + late final _sel_superclass1 = _registerName1("superclass"); + late final _sel_class1 = _registerName1("class"); + late final _class_NSString1 = _getClass1("NSString"); + late final _sel_length1 = _registerName1("length"); + late final _sel_characterAtIndex_1 = _registerName1("characterAtIndex:"); + int _objc_msgSend_13( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + int index, ) { - return __objc_msgSend_132( + return __objc_msgSend_13( obj, sel, - block, + index, ); } - late final __objc_msgSend_132Ptr = _lookup< + late final __objc_msgSend_13Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + unichar Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_enumerateObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateObjectsWithOptions:usingBlock:"); - void _objc_msgSend_133( + late final _class_NSCoder1 = _getClass1("NSCoder"); + late final _sel_initWithCoder_1 = _registerName1("initWithCoder:"); + instancetype _objc_msgSend_14( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer coder, ) { - return __objc_msgSend_133( + return __objc_msgSend_14( obj, sel, - opts, - block, + coder, ); } - late final __objc_msgSend_133Ptr = _lookup< + late final __objc_msgSend_14Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_enumerateObjectsAtIndexes_options_usingBlock_1 = - _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); - void _objc_msgSend_134( + late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); + ffi.Pointer _objc_msgSend_15( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> block, + int from, ) { - return __objc_msgSend_134( + return __objc_msgSend_15( obj, sel, - s, - opts, - block, + from, ); } - late final __objc_msgSend_134Ptr = _lookup< + late final __objc_msgSend_15Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_indexOfObjectPassingTest_1 = - _registerName1("indexOfObjectPassingTest:"); - int _objc_msgSend_135( + late final _sel_substringToIndex_1 = _registerName1("substringToIndex:"); + late final _sel_substringWithRange_1 = _registerName1("substringWithRange:"); + ffi.Pointer _objc_msgSend_16( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + NSRange range, ) { - return __objc_msgSend_135( + return __objc_msgSend_16( obj, sel, - predicate, + range, ); } - late final __objc_msgSend_135Ptr = _lookup< + late final __objc_msgSend_16Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_indexOfObjectWithOptions_passingTest_1 = - _registerName1("indexOfObjectWithOptions:passingTest:"); - int _objc_msgSend_136( + late final _sel_getCharacters_range_1 = + _registerName1("getCharacters:range:"); + void _objc_msgSend_17( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer buffer, + NSRange range, ) { - return __objc_msgSend_136( + return __objc_msgSend_17( obj, sel, - opts, - predicate, + buffer, + range, ); } - late final __objc_msgSend_136Ptr = _lookup< + late final __objc_msgSend_17Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - late final _sel_indexOfObjectAtIndexes_options_passingTest_1 = - _registerName1("indexOfObjectAtIndexes:options:passingTest:"); - int _objc_msgSend_137( + late final _sel_compare_1 = _registerName1("compare:"); + int _objc_msgSend_18( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer string, ) { - return __objc_msgSend_137( + return __objc_msgSend_18( obj, sel, - s, - opts, - predicate, + string, ); } - late final __objc_msgSend_137Ptr = _lookup< + late final __objc_msgSend_18Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer)>(); - late final _sel_indexesOfObjectsPassingTest_1 = - _registerName1("indexesOfObjectsPassingTest:"); - ffi.Pointer _objc_msgSend_138( + late final _sel_compare_options_1 = _registerName1("compare:options:"); + int _objc_msgSend_19( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer string, + int mask, ) { - return __objc_msgSend_138( + return __objc_msgSend_19( obj, sel, - predicate, + string, + mask, ); } - late final __objc_msgSend_138Ptr = _lookup< + late final __objc_msgSend_19Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_indexesOfObjectsWithOptions_passingTest_1 = - _registerName1("indexesOfObjectsWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_139( + late final _sel_compare_options_range_1 = + _registerName1("compare:options:range:"); + int _objc_msgSend_20( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer string, + int mask, + NSRange rangeOfReceiverToCompare, ) { - return __objc_msgSend_139( + return __objc_msgSend_20( obj, sel, - opts, - predicate, + string, + mask, + rangeOfReceiverToCompare, ); } - late final __objc_msgSend_139Ptr = _lookup< + late final __objc_msgSend_20Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - late final _sel_indexesOfObjectsAtIndexes_options_passingTest_1 = - _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); - ffi.Pointer _objc_msgSend_140( + late final _sel_compare_options_range_locale_1 = + _registerName1("compare:options:range:locale:"); + int _objc_msgSend_21( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer string, + int mask, + NSRange rangeOfReceiverToCompare, + ffi.Pointer locale, ) { - return __objc_msgSend_140( + return __objc_msgSend_21( obj, sel, - s, - opts, - predicate, + string, + mask, + rangeOfReceiverToCompare, + locale, ); } - late final __objc_msgSend_140Ptr = _lookup< + late final __objc_msgSend_21Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Int32 Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); + NSRange, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange, ffi.Pointer)>(); - late final _sel_sortedArrayUsingComparator_1 = - _registerName1("sortedArrayUsingComparator:"); - ffi.Pointer _objc_msgSend_141( + late final _sel_caseInsensitiveCompare_1 = + _registerName1("caseInsensitiveCompare:"); + late final _sel_localizedCompare_1 = _registerName1("localizedCompare:"); + late final _sel_localizedCaseInsensitiveCompare_1 = + _registerName1("localizedCaseInsensitiveCompare:"); + late final _sel_localizedStandardCompare_1 = + _registerName1("localizedStandardCompare:"); + late final _sel_isEqualToString_1 = _registerName1("isEqualToString:"); + bool _objc_msgSend_22( ffi.Pointer obj, ffi.Pointer sel, - NSComparator cmptr, + ffi.Pointer aString, ) { - return __objc_msgSend_141( + return __objc_msgSend_22( obj, sel, - cmptr, + aString, ); } - late final __objc_msgSend_141Ptr = _lookup< + late final __objc_msgSend_22Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSComparator)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_sortedArrayWithOptions_usingComparator_1 = - _registerName1("sortedArrayWithOptions:usingComparator:"); - ffi.Pointer _objc_msgSend_142( + late final _sel_hasPrefix_1 = _registerName1("hasPrefix:"); + late final _sel_hasSuffix_1 = _registerName1("hasSuffix:"); + late final _sel_commonPrefixWithString_options_1 = + _registerName1("commonPrefixWithString:options:"); + ffi.Pointer _objc_msgSend_23( ffi.Pointer obj, ffi.Pointer sel, - int opts, - NSComparator cmptr, + ffi.Pointer str, + int mask, ) { - return __objc_msgSend_142( + return __objc_msgSend_23( obj, sel, - opts, - cmptr, + str, + mask, ); } - late final __objc_msgSend_142Ptr = _lookup< + late final __objc_msgSend_23Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, NSComparator)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_indexOfObject_inSortedRange_options_usingComparator_1 = - _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); - int _objc_msgSend_143( + late final _sel_containsString_1 = _registerName1("containsString:"); + late final _sel_localizedCaseInsensitiveContainsString_1 = + _registerName1("localizedCaseInsensitiveContainsString:"); + late final _sel_localizedStandardContainsString_1 = + _registerName1("localizedStandardContainsString:"); + late final _sel_localizedStandardRangeOfString_1 = + _registerName1("localizedStandardRangeOfString:"); + NSRange _objc_msgSend_24( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer obj1, - NSRange r, - int opts, - NSComparator cmp, + ffi.Pointer str, ) { - return __objc_msgSend_143( + return __objc_msgSend_24( obj, sel, - obj1, - r, - opts, - cmp, + str, ); } - late final __objc_msgSend_143Ptr = _lookup< + late final __objc_msgSend_24Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Int32, - NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange, int, NSComparator)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_array1 = _registerName1("array"); - late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); - late final _sel_arrayWithObjects_count_1 = - _registerName1("arrayWithObjects:count:"); - late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); - late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); - late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); - late final _sel_initWithArray_1 = _registerName1("initWithArray:"); - late final _sel_initWithArray_copyItems_1 = - _registerName1("initWithArray:copyItems:"); - instancetype _objc_msgSend_144( + late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); + late final _sel_rangeOfString_options_1 = + _registerName1("rangeOfString:options:"); + NSRange _objc_msgSend_25( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer array, - bool flag, + ffi.Pointer searchString, + int mask, ) { - return __objc_msgSend_144( + return __objc_msgSend_25( obj, sel, - array, - flag, + searchString, + mask, ); } - late final __objc_msgSend_144Ptr = _lookup< + late final __objc_msgSend_25Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_initWithContentsOfURL_error_1 = - _registerName1("initWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_145( + late final _sel_rangeOfString_options_range_1 = + _registerName1("rangeOfString:options:range:"); + NSRange _objc_msgSend_26( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, + ffi.Pointer searchString, + int mask, + NSRange rangeOfReceiverToSearch, ) { - return __objc_msgSend_145( + return __objc_msgSend_26( obj, sel, - url, - error, + searchString, + mask, + rangeOfReceiverToSearch, ); } - late final __objc_msgSend_145Ptr = _lookup< + late final __objc_msgSend_26Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - late final _sel_arrayWithContentsOfURL_error_1 = - _registerName1("arrayWithContentsOfURL:error:"); - late final _class_NSOrderedCollectionDifference1 = - _getClass1("NSOrderedCollectionDifference"); - late final _sel_initWithChanges_1 = _registerName1("initWithChanges:"); - late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1 = - _registerName1( - "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:"); - instancetype _objc_msgSend_146( + late final _class_NSLocale1 = _getClass1("NSLocale"); + late final _sel_rangeOfString_options_range_locale_1 = + _registerName1("rangeOfString:options:range:locale:"); + NSRange _objc_msgSend_27( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer inserts, - ffi.Pointer insertedObjects, - ffi.Pointer removes, - ffi.Pointer removedObjects, - ffi.Pointer changes, + ffi.Pointer searchString, + int mask, + NSRange rangeOfReceiverToSearch, + ffi.Pointer locale, ) { - return __objc_msgSend_146( + return __objc_msgSend_27( obj, sel, - inserts, - insertedObjects, - removes, - removedObjects, - changes, + searchString, + mask, + rangeOfReceiverToSearch, + locale, ); } - late final __objc_msgSend_146Ptr = _lookup< + late final __objc_msgSend_27Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + NSRange Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + ffi.Int32, + NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange, ffi.Pointer)>(); - late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1 = - _registerName1( - "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:"); - instancetype _objc_msgSend_147( + late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); + late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); + ffi.Pointer _objc_msgSend_28( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer inserts, - ffi.Pointer insertedObjects, - ffi.Pointer removes, - ffi.Pointer removedObjects, ) { - return __objc_msgSend_147( + return __objc_msgSend_28( obj, sel, - inserts, - insertedObjects, - removes, - removedObjects, ); } - late final __objc_msgSend_147Ptr = _lookup< + late final __objc_msgSend_28Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_insertions1 = _registerName1("insertions"); - late final _sel_removals1 = _registerName1("removals"); - late final _sel_hasChanges1 = _registerName1("hasChanges"); - late final _class_NSOrderedCollectionChange1 = - _getClass1("NSOrderedCollectionChange"); - late final _sel_changeWithObject_type_index_1 = - _registerName1("changeWithObject:type:index:"); - ffi.Pointer _objc_msgSend_148( + late final _sel_whitespaceCharacterSet1 = + _registerName1("whitespaceCharacterSet"); + late final _sel_whitespaceAndNewlineCharacterSet1 = + _registerName1("whitespaceAndNewlineCharacterSet"); + late final _sel_decimalDigitCharacterSet1 = + _registerName1("decimalDigitCharacterSet"); + late final _sel_letterCharacterSet1 = _registerName1("letterCharacterSet"); + late final _sel_lowercaseLetterCharacterSet1 = + _registerName1("lowercaseLetterCharacterSet"); + late final _sel_uppercaseLetterCharacterSet1 = + _registerName1("uppercaseLetterCharacterSet"); + late final _sel_nonBaseCharacterSet1 = _registerName1("nonBaseCharacterSet"); + late final _sel_alphanumericCharacterSet1 = + _registerName1("alphanumericCharacterSet"); + late final _sel_decomposableCharacterSet1 = + _registerName1("decomposableCharacterSet"); + late final _sel_illegalCharacterSet1 = _registerName1("illegalCharacterSet"); + late final _sel_punctuationCharacterSet1 = + _registerName1("punctuationCharacterSet"); + late final _sel_capitalizedLetterCharacterSet1 = + _registerName1("capitalizedLetterCharacterSet"); + late final _sel_symbolCharacterSet1 = _registerName1("symbolCharacterSet"); + late final _sel_newlineCharacterSet1 = _registerName1("newlineCharacterSet"); + late final _sel_characterSetWithRange_1 = + _registerName1("characterSetWithRange:"); + ffi.Pointer _objc_msgSend_29( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, + NSRange aRange, ) { - return __objc_msgSend_148( + return __objc_msgSend_29( obj, sel, - anObject, - type, - index, + aRange, ); } - late final __objc_msgSend_148Ptr = _lookup< + late final __objc_msgSend_29Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_changeWithObject_type_index_associatedIndex_1 = - _registerName1("changeWithObject:type:index:associatedIndex:"); - ffi.Pointer _objc_msgSend_149( + late final _sel_characterSetWithCharactersInString_1 = + _registerName1("characterSetWithCharactersInString:"); + ffi.Pointer _objc_msgSend_30( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, - int associatedIndex, + ffi.Pointer aString, ) { - return __objc_msgSend_149( + return __objc_msgSend_30( obj, sel, - anObject, - type, - index, - associatedIndex, + aString, ); } - late final __objc_msgSend_149Ptr = _lookup< + late final __objc_msgSend_30Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSUInteger, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int, int)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_object1 = _registerName1("object"); - late final _sel_changeType1 = _registerName1("changeType"); - int _objc_msgSend_150( + late final _class_NSData1 = _getClass1("NSData"); + late final _sel_bytes1 = _registerName1("bytes"); + ffi.Pointer _objc_msgSend_31( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_150( + return __objc_msgSend_31( obj, sel, ); } - late final __objc_msgSend_150Ptr = _lookup< + late final __objc_msgSend_31Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_index1 = _registerName1("index"); - late final _sel_associatedIndex1 = _registerName1("associatedIndex"); - late final _sel_initWithObject_type_index_1 = - _registerName1("initWithObject:type:index:"); - instancetype _objc_msgSend_151( + late final _sel_description1 = _registerName1("description"); + ffi.Pointer _objc_msgSend_32( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, ) { - return __objc_msgSend_151( + return __objc_msgSend_32( obj, sel, - anObject, - type, - index, ); } - late final __objc_msgSend_151Ptr = _lookup< + late final __objc_msgSend_32Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithObject_type_index_associatedIndex_1 = - _registerName1("initWithObject:type:index:associatedIndex:"); - instancetype _objc_msgSend_152( + late final _sel_getBytes_length_1 = _registerName1("getBytes:length:"); + void _objc_msgSend_33( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, - int associatedIndex, - ) { - return __objc_msgSend_152( - obj, - sel, - anObject, - type, - index, - associatedIndex, - ); - } - - late final __objc_msgSend_152Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSUInteger, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, int)>(); - - late final _sel_differenceByTransformingChangesWithBlock_1 = - _registerName1("differenceByTransformingChangesWithBlock:"); - ffi.Pointer _objc_msgSend_153( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer buffer, + int length, ) { - return __objc_msgSend_153( + return __objc_msgSend_33( obj, sel, - block, + buffer, + length, ); } - late final __objc_msgSend_153Ptr = _lookup< + late final __objc_msgSend_33Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_inverseDifference1 = _registerName1("inverseDifference"); - late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = - _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); - ffi.Pointer _objc_msgSend_154( + late final _sel_getBytes_range_1 = _registerName1("getBytes:range:"); + void _objc_msgSend_34( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, - int options, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer buffer, + NSRange range, ) { - return __objc_msgSend_154( + return __objc_msgSend_34( obj, sel, - other, - options, - block, + buffer, + range, ); } - late final __objc_msgSend_154Ptr = _lookup< + late final __objc_msgSend_34Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - late final _sel_differenceFromArray_withOptions_1 = - _registerName1("differenceFromArray:withOptions:"); - ffi.Pointer _objc_msgSend_155( + late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); + bool _objc_msgSend_35( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer other, - int options, ) { - return __objc_msgSend_155( + return __objc_msgSend_35( obj, sel, other, - options, ); } - late final __objc_msgSend_155Ptr = _lookup< + late final __objc_msgSend_35Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_differenceFromArray_1 = - _registerName1("differenceFromArray:"); - ffi.Pointer _objc_msgSend_156( + late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); + ffi.Pointer _objc_msgSend_36( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, + NSRange range, ) { - return __objc_msgSend_156( + return __objc_msgSend_36( obj, sel, - other, + range, ); } - late final __objc_msgSend_156Ptr = _lookup< + late final __objc_msgSend_36Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_arrayByApplyingDifference_1 = - _registerName1("arrayByApplyingDifference:"); - ffi.Pointer _objc_msgSend_157( + late final _sel_writeToFile_atomically_1 = + _registerName1("writeToFile:atomically:"); + bool _objc_msgSend_37( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer difference, + ffi.Pointer path, + bool useAuxiliaryFile, ) { - return __objc_msgSend_157( + return __objc_msgSend_37( obj, sel, - difference, + path, + useAuxiliaryFile, ); } - late final __objc_msgSend_157Ptr = _lookup< + late final __objc_msgSend_37Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_getObjects_1 = _registerName1("getObjects:"); - void _objc_msgSend_158( + late final _class_NSURL1 = _getClass1("NSURL"); + late final _sel_initWithScheme_host_path_1 = + _registerName1("initWithScheme:host:path:"); + instancetype _objc_msgSend_38( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, + ffi.Pointer scheme, + ffi.Pointer host, + ffi.Pointer path, ) { - return __objc_msgSend_158( + return __objc_msgSend_38( obj, sel, - objects, + scheme, + host, + path, ); } - late final __objc_msgSend_158Ptr = _lookup< + late final __objc_msgSend_38Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_38 = __objc_msgSend_38Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_arrayWithContentsOfFile_1 = - _registerName1("arrayWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_159( + late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = + _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); + instancetype _objc_msgSend_39( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return __objc_msgSend_159( + return __objc_msgSend_39( obj, sel, path, + isDir, + baseURL, ); } - late final __objc_msgSend_159Ptr = _lookup< + late final __objc_msgSend_39Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool, ffi.Pointer)>(); - late final _sel_arrayWithContentsOfURL_1 = - _registerName1("arrayWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_160( + late final _sel_initFileURLWithPath_relativeToURL_1 = + _registerName1("initFileURLWithPath:relativeToURL:"); + instancetype _objc_msgSend_40( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer path, + ffi.Pointer baseURL, ) { - return __objc_msgSend_160( + return __objc_msgSend_40( obj, sel, - url, + path, + baseURL, ); } - late final __objc_msgSend_160Ptr = _lookup< + late final __objc_msgSend_40Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithContentsOfFile_1 = - _registerName1("initWithContentsOfFile:"); - late final _sel_initWithContentsOfURL_1 = - _registerName1("initWithContentsOfURL:"); - late final _sel_writeToURL_atomically_1 = - _registerName1("writeToURL:atomically:"); - bool _objc_msgSend_161( + late final _sel_initFileURLWithPath_isDirectory_1 = + _registerName1("initFileURLWithPath:isDirectory:"); + instancetype _objc_msgSend_41( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - bool atomically, + ffi.Pointer path, + bool isDir, ) { - return __objc_msgSend_161( + return __objc_msgSend_41( obj, sel, - url, - atomically, + path, + isDir, ); } - late final __objc_msgSend_161Ptr = _lookup< + late final __objc_msgSend_41Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); - late final _sel_allKeys1 = _registerName1("allKeys"); - ffi.Pointer _objc_msgSend_162( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_162( - obj, - sel, - ); - } - - late final __objc_msgSend_162Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_allKeysForObject_1 = _registerName1("allKeysForObject:"); - late final _sel_allValues1 = _registerName1("allValues"); - late final _sel_descriptionInStringsFileFormat1 = - _registerName1("descriptionInStringsFileFormat"); - late final _sel_isEqualToDictionary_1 = - _registerName1("isEqualToDictionary:"); - bool _objc_msgSend_163( + late final _sel_initFileURLWithPath_1 = + _registerName1("initFileURLWithPath:"); + instancetype _objc_msgSend_42( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherDictionary, + ffi.Pointer path, ) { - return __objc_msgSend_163( + return __objc_msgSend_42( obj, sel, - otherDictionary, + path, ); } - late final __objc_msgSend_163Ptr = _lookup< + late final __objc_msgSend_42Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_objectsForKeys_notFoundMarker_1 = - _registerName1("objectsForKeys:notFoundMarker:"); - ffi.Pointer _objc_msgSend_164( + late final _sel_fileURLWithPath_isDirectory_relativeToURL_1 = + _registerName1("fileURLWithPath:isDirectory:relativeToURL:"); + ffi.Pointer _objc_msgSend_43( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer marker, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return __objc_msgSend_164( + return __objc_msgSend_43( obj, sel, - keys, - marker, + path, + isDir, + baseURL, ); } - late final __objc_msgSend_164Ptr = _lookup< + late final __objc_msgSend_43Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Bool, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< + late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + bool, ffi.Pointer)>(); - late final _sel_keysSortedByValueUsingSelector_1 = - _registerName1("keysSortedByValueUsingSelector:"); - late final _sel_getObjects_andKeys_count_1 = - _registerName1("getObjects:andKeys:count:"); - void _objc_msgSend_165( + late final _sel_fileURLWithPath_relativeToURL_1 = + _registerName1("fileURLWithPath:relativeToURL:"); + ffi.Pointer _objc_msgSend_44( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - int count, + ffi.Pointer path, + ffi.Pointer baseURL, ) { - return __objc_msgSend_165( + return __objc_msgSend_44( obj, sel, - objects, - keys, - count, + path, + baseURL, ); } - late final __objc_msgSend_165Ptr = _lookup< + late final __objc_msgSend_44Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< - void Function( + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_objectForKeyedSubscript_1 = - _registerName1("objectForKeyedSubscript:"); - late final _sel_enumerateKeysAndObjectsUsingBlock_1 = - _registerName1("enumerateKeysAndObjectsUsingBlock:"); - void _objc_msgSend_166( + late final _sel_fileURLWithPath_isDirectory_1 = + _registerName1("fileURLWithPath:isDirectory:"); + ffi.Pointer _objc_msgSend_45( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer path, + bool isDir, ) { - return __objc_msgSend_166( + return __objc_msgSend_45( obj, sel, - block, + path, + isDir, ); } - late final __objc_msgSend_166Ptr = _lookup< + late final __objc_msgSend_45Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); - late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); - void _objc_msgSend_167( + late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); + ffi.Pointer _objc_msgSend_46( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer path, ) { - return __objc_msgSend_167( + return __objc_msgSend_46( obj, sel, - opts, - block, + path, ); } - late final __objc_msgSend_167Ptr = _lookup< + late final __objc_msgSend_46Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_keysSortedByValueUsingComparator_1 = - _registerName1("keysSortedByValueUsingComparator:"); - late final _sel_keysSortedByValueWithOptions_usingComparator_1 = - _registerName1("keysSortedByValueWithOptions:usingComparator:"); - late final _sel_keysOfEntriesPassingTest_1 = - _registerName1("keysOfEntriesPassingTest:"); - ffi.Pointer _objc_msgSend_168( + late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = + _registerName1( + "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); + instancetype _objc_msgSend_47( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return __objc_msgSend_168( + return __objc_msgSend_47( obj, sel, - predicate, + path, + isDir, + baseURL, ); } - late final __objc_msgSend_168Ptr = _lookup< + late final __objc_msgSend_47Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool, ffi.Pointer)>(); - late final _sel_keysOfEntriesWithOptions_passingTest_1 = - _registerName1("keysOfEntriesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_169( + late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = + _registerName1( + "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); + ffi.Pointer _objc_msgSend_48( ffi.Pointer obj, ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer path, + bool isDir, + ffi.Pointer baseURL, ) { - return __objc_msgSend_169( + return __objc_msgSend_48( obj, sel, - opts, - predicate, + path, + isDir, + baseURL, ); } - late final __objc_msgSend_169Ptr = _lookup< + late final __objc_msgSend_48Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); - void _objc_msgSend_170( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - ) { - return __objc_msgSend_170( - obj, - sel, - objects, - keys, - ); - } - - late final __objc_msgSend_170Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< - void Function( + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); + ffi.Pointer, + bool, + ffi.Pointer)>(); - late final _sel_dictionaryWithContentsOfFile_1 = - _registerName1("dictionaryWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_171( + late final _sel_initWithString_1 = _registerName1("initWithString:"); + late final _sel_initWithString_relativeToURL_1 = + _registerName1("initWithString:relativeToURL:"); + late final _sel_URLWithString_1 = _registerName1("URLWithString:"); + late final _sel_URLWithString_relativeToURL_1 = + _registerName1("URLWithString:relativeToURL:"); + late final _sel_initWithDataRepresentation_relativeToURL_1 = + _registerName1("initWithDataRepresentation:relativeToURL:"); + instancetype _objc_msgSend_49( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer data, + ffi.Pointer baseURL, ) { - return __objc_msgSend_171( + return __objc_msgSend_49( obj, sel, - path, + data, + baseURL, ); } - late final __objc_msgSend_171Ptr = _lookup< + late final __objc_msgSend_49Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dictionaryWithContentsOfURL_1 = - _registerName1("dictionaryWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_172( + late final _sel_URLWithDataRepresentation_relativeToURL_1 = + _registerName1("URLWithDataRepresentation:relativeToURL:"); + ffi.Pointer _objc_msgSend_50( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer data, + ffi.Pointer baseURL, ) { - return __objc_msgSend_172( + return __objc_msgSend_50( obj, sel, - url, + data, + baseURL, ); } - late final __objc_msgSend_172Ptr = _lookup< + late final __objc_msgSend_50Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_dictionary1 = _registerName1("dictionary"); - late final _sel_dictionaryWithObject_forKey_1 = - _registerName1("dictionaryWithObject:forKey:"); - instancetype _objc_msgSend_173( + late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1 = + _registerName1("initAbsoluteURLWithDataRepresentation:relativeToURL:"); + late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = + _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); + late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); + ffi.Pointer _objc_msgSend_51( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer object, - ffi.Pointer key, ) { - return __objc_msgSend_173( + return __objc_msgSend_51( obj, sel, - object, - key, ); } - late final __objc_msgSend_173Ptr = _lookup< + late final __objc_msgSend_51Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dictionaryWithObjects_forKeys_count_1 = - _registerName1("dictionaryWithObjects:forKeys:count:"); - late final _sel_dictionaryWithObjectsAndKeys_1 = - _registerName1("dictionaryWithObjectsAndKeys:"); - late final _sel_dictionaryWithDictionary_1 = - _registerName1("dictionaryWithDictionary:"); - instancetype _objc_msgSend_174( + late final _sel_absoluteString1 = _registerName1("absoluteString"); + late final _sel_relativeString1 = _registerName1("relativeString"); + late final _sel_baseURL1 = _registerName1("baseURL"); + ffi.Pointer _objc_msgSend_52( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer dict, ) { - return __objc_msgSend_174( + return __objc_msgSend_52( obj, sel, - dict, ); } - late final __objc_msgSend_174Ptr = _lookup< + late final __objc_msgSend_52Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dictionaryWithObjects_forKeys_1 = - _registerName1("dictionaryWithObjects:forKeys:"); - instancetype _objc_msgSend_175( + late final _sel_absoluteURL1 = _registerName1("absoluteURL"); + late final _sel_scheme1 = _registerName1("scheme"); + late final _sel_resourceSpecifier1 = _registerName1("resourceSpecifier"); + late final _sel_host1 = _registerName1("host"); + late final _class_NSNumber1 = _getClass1("NSNumber"); + late final _class_NSValue1 = _getClass1("NSValue"); + late final _sel_getValue_size_1 = _registerName1("getValue:size:"); + late final _sel_objCType1 = _registerName1("objCType"); + ffi.Pointer _objc_msgSend_53( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer keys, ) { - return __objc_msgSend_175( + return __objc_msgSend_53( obj, sel, - objects, - keys, ); } - late final __objc_msgSend_175Ptr = _lookup< + late final __objc_msgSend_53Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithObjectsAndKeys_1 = - _registerName1("initWithObjectsAndKeys:"); - late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); - late final _sel_initWithDictionary_copyItems_1 = - _registerName1("initWithDictionary:copyItems:"); - instancetype _objc_msgSend_176( + late final _sel_initWithBytes_objCType_1 = + _registerName1("initWithBytes:objCType:"); + instancetype _objc_msgSend_54( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherDictionary, - bool flag, + ffi.Pointer value, + ffi.Pointer type, ) { - return __objc_msgSend_176( + return __objc_msgSend_54( obj, sel, - otherDictionary, - flag, + value, + type, ); } - late final __objc_msgSend_176Ptr = _lookup< + late final __objc_msgSend_54Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithObjects_forKeys_1 = - _registerName1("initWithObjects:forKeys:"); - ffi.Pointer _objc_msgSend_177( + late final _sel_valueWithBytes_objCType_1 = + _registerName1("valueWithBytes:objCType:"); + ffi.Pointer _objc_msgSend_55( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, + ffi.Pointer value, + ffi.Pointer type, ) { - return __objc_msgSend_177( + return __objc_msgSend_55( obj, sel, - url, - error, + value, + type, ); } - late final __objc_msgSend_177Ptr = _lookup< + late final __objc_msgSend_55Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_dictionaryWithContentsOfURL_error_1 = - _registerName1("dictionaryWithContentsOfURL:error:"); - late final _sel_sharedKeySetForKeys_1 = - _registerName1("sharedKeySetForKeys:"); - late final _sel_countByEnumeratingWithState_objects_count_1 = - _registerName1("countByEnumeratingWithState:objects:count:"); - int _objc_msgSend_178( + late final _sel_value_withObjCType_1 = _registerName1("value:withObjCType:"); + late final _sel_valueWithNonretainedObject_1 = + _registerName1("valueWithNonretainedObject:"); + ffi.Pointer _objc_msgSend_56( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer state, - ffi.Pointer> buffer, - int len, + ffi.Pointer anObject, ) { - return __objc_msgSend_178( + return __objc_msgSend_56( obj, sel, - state, - buffer, - len, + anObject, ); } - late final __objc_msgSend_178Ptr = _lookup< + late final __objc_msgSend_56Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithDomain_code_userInfo_1 = - _registerName1("initWithDomain:code:userInfo:"); - instancetype _objc_msgSend_179( + late final _sel_nonretainedObjectValue1 = + _registerName1("nonretainedObjectValue"); + late final _sel_valueWithPointer_1 = _registerName1("valueWithPointer:"); + ffi.Pointer _objc_msgSend_57( ffi.Pointer obj, ffi.Pointer sel, - NSErrorDomain domain, - int code, - ffi.Pointer dict, + ffi.Pointer pointer, ) { - return __objc_msgSend_179( + return __objc_msgSend_57( obj, sel, - domain, - code, - dict, + pointer, ); } - late final __objc_msgSend_179Ptr = _lookup< + late final __objc_msgSend_57Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSErrorDomain, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, int, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_errorWithDomain_code_userInfo_1 = - _registerName1("errorWithDomain:code:userInfo:"); - late final _sel_domain1 = _registerName1("domain"); - late final _sel_code1 = _registerName1("code"); - late final _sel_userInfo1 = _registerName1("userInfo"); - ffi.Pointer _objc_msgSend_180( + late final _sel_pointerValue1 = _registerName1("pointerValue"); + late final _sel_isEqualToValue_1 = _registerName1("isEqualToValue:"); + bool _objc_msgSend_58( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer value, ) { - return __objc_msgSend_180( + return __objc_msgSend_58( obj, sel, + value, ); } - late final __objc_msgSend_180Ptr = _lookup< + late final __objc_msgSend_58Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_localizedDescription1 = - _registerName1("localizedDescription"); - late final _sel_localizedFailureReason1 = - _registerName1("localizedFailureReason"); - late final _sel_localizedRecoverySuggestion1 = - _registerName1("localizedRecoverySuggestion"); - late final _sel_localizedRecoveryOptions1 = - _registerName1("localizedRecoveryOptions"); - late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); - late final _sel_helpAnchor1 = _registerName1("helpAnchor"); - late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); - late final _sel_setUserInfoValueProviderForDomain_provider_1 = - _registerName1("setUserInfoValueProviderForDomain:provider:"); - void _objc_msgSend_181( + late final _sel_getValue_1 = _registerName1("getValue:"); + void _objc_msgSend_59( ffi.Pointer obj, ffi.Pointer sel, - NSErrorDomain errorDomain, - ffi.Pointer<_ObjCBlock> provider, + ffi.Pointer value, ) { - return __objc_msgSend_181( + return __objc_msgSend_59( obj, sel, - errorDomain, - provider, + value, ); } - late final __objc_msgSend_181Ptr = _lookup< + late final __objc_msgSend_59Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer)>(); - late final _sel_userInfoValueProviderForDomain_1 = - _registerName1("userInfoValueProviderForDomain:"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_182( + late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); + ffi.Pointer _objc_msgSend_60( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer err, - NSErrorUserInfoKey userInfoKey, - NSErrorDomain errorDomain, + NSRange range, ) { - return __objc_msgSend_182( + return __objc_msgSend_60( obj, sel, - err, - userInfoKey, - errorDomain, + range, ); } - late final __objc_msgSend_182Ptr = _lookup< + late final __objc_msgSend_60Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSErrorUserInfoKey, - NSErrorDomain)>>('objc_msgSend'); - late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSErrorUserInfoKey, - NSErrorDomain)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_checkResourceIsReachableAndReturnError_1 = - _registerName1("checkResourceIsReachableAndReturnError:"); - bool _objc_msgSend_183( + late final _sel_rangeValue1 = _registerName1("rangeValue"); + NSRange _objc_msgSend_61( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> error, ) { - return __objc_msgSend_183( + return __objc_msgSend_61( obj, sel, - error, ); } - late final __objc_msgSend_183Ptr = _lookup< + late final __objc_msgSend_61Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + NSRange Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); - late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); - late final _sel_filePathURL1 = _registerName1("filePathURL"); - late final _sel_getResourceValue_forKey_error_1 = - _registerName1("getResourceValue:forKey:error:"); - bool _objc_msgSend_184( + late final _sel_initWithChar_1 = _registerName1("initWithChar:"); + ffi.Pointer _objc_msgSend_62( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_184( + return __objc_msgSend_62( obj, sel, value, - key, - error, ); } - late final __objc_msgSend_184Ptr = _lookup< + late final __objc_msgSend_62Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSURLResourceKey, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSURLResourceKey, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Char)>>('objc_msgSend'); + late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_resourceValuesForKeys_error_1 = - _registerName1("resourceValuesForKeys:error:"); - ffi.Pointer _objc_msgSend_185( + late final _sel_initWithUnsignedChar_1 = + _registerName1("initWithUnsignedChar:"); + ffi.Pointer _objc_msgSend_63( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_185( + return __objc_msgSend_63( obj, sel, - keys, - error, + value, ); } - late final __objc_msgSend_185Ptr = _lookup< + late final __objc_msgSend_63Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); + late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_setResourceValue_forKey_error_1 = - _registerName1("setResourceValue:forKey:error:"); - bool _objc_msgSend_186( + late final _sel_initWithShort_1 = _registerName1("initWithShort:"); + ffi.Pointer _objc_msgSend_64( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, - NSURLResourceKey key, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_186( + return __objc_msgSend_64( obj, sel, value, - key, - error, ); } - late final __objc_msgSend_186Ptr = _lookup< + late final __objc_msgSend_64Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLResourceKey, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLResourceKey, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Short)>>('objc_msgSend'); + late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_setResourceValues_error_1 = - _registerName1("setResourceValues:error:"); - bool _objc_msgSend_187( + late final _sel_initWithUnsignedShort_1 = + _registerName1("initWithUnsignedShort:"); + ffi.Pointer _objc_msgSend_65( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keyedValues, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_187( + return __objc_msgSend_65( obj, sel, - keyedValues, - error, + value, ); } - late final __objc_msgSend_187Ptr = _lookup< + late final __objc_msgSend_65Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); + late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeCachedResourceValueForKey_1 = - _registerName1("removeCachedResourceValueForKey:"); - void _objc_msgSend_188( + late final _sel_initWithInt_1 = _registerName1("initWithInt:"); + ffi.Pointer _objc_msgSend_66( ffi.Pointer obj, ffi.Pointer sel, - NSURLResourceKey key, + int value, ) { - return __objc_msgSend_188( + return __objc_msgSend_66( obj, sel, - key, + value, ); } - late final __objc_msgSend_188Ptr = _lookup< + late final __objc_msgSend_66Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSURLResourceKey)>>('objc_msgSend'); - late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, NSURLResourceKey)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>('objc_msgSend'); + late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeAllCachedResourceValues1 = - _registerName1("removeAllCachedResourceValues"); - late final _sel_setTemporaryResourceValue_forKey_1 = - _registerName1("setTemporaryResourceValue:forKey:"); - void _objc_msgSend_189( + late final _sel_initWithUnsignedInt_1 = + _registerName1("initWithUnsignedInt:"); + ffi.Pointer _objc_msgSend_67( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, - NSURLResourceKey key, + int value, ) { - return __objc_msgSend_189( + return __objc_msgSend_67( obj, sel, value, - key, ); } - late final __objc_msgSend_189Ptr = _lookup< + late final __objc_msgSend_67Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSURLResourceKey)>>('objc_msgSend'); - late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSURLResourceKey)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); + late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = - _registerName1( - "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); - ffi.Pointer _objc_msgSend_190( + late final _sel_initWithLong_1 = _registerName1("initWithLong:"); + ffi.Pointer _objc_msgSend_68( ffi.Pointer obj, ffi.Pointer sel, - int options, - ffi.Pointer keys, - ffi.Pointer relativeURL, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_190( + return __objc_msgSend_68( obj, sel, - options, - keys, - relativeURL, - error, + value, ); } - late final __objc_msgSend_190Ptr = _lookup< + late final __objc_msgSend_68Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>('objc_msgSend'); + late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - instancetype _objc_msgSend_191( + late final _sel_initWithUnsignedLong_1 = + _registerName1("initWithUnsignedLong:"); + ffi.Pointer _objc_msgSend_69( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bookmarkData, - int options, - ffi.Pointer relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_191( + return __objc_msgSend_69( obj, sel, - bookmarkData, - options, - relativeURL, - isStale, - error, + value, ); } - late final __objc_msgSend_191Ptr = _lookup< + late final __objc_msgSend_69Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); + late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - late final _sel_resourceValuesForKeys_fromBookmarkData_1 = - _registerName1("resourceValuesForKeys:fromBookmarkData:"); - ffi.Pointer _objc_msgSend_192( + late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); + ffi.Pointer _objc_msgSend_70( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer bookmarkData, + int value, ) { - return __objc_msgSend_192( + return __objc_msgSend_70( obj, sel, - keys, - bookmarkData, + value, ); } - late final __objc_msgSend_192Ptr = _lookup< + late final __objc_msgSend_70Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); + late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_writeBookmarkData_toURL_options_error_1 = - _registerName1("writeBookmarkData:toURL:options:error:"); - bool _objc_msgSend_193( + late final _sel_initWithUnsignedLongLong_1 = + _registerName1("initWithUnsignedLongLong:"); + ffi.Pointer _objc_msgSend_71( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bookmarkData, - ffi.Pointer bookmarkFileURL, - int options, - ffi.Pointer> error, + int value, ) { - return __objc_msgSend_193( + return __objc_msgSend_71( obj, sel, - bookmarkData, - bookmarkFileURL, - options, - error, + value, ); } - late final __objc_msgSend_193Ptr = _lookup< + late final __objc_msgSend_71Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLBookmarkFileCreationOptions, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); + late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_bookmarkDataWithContentsOfURL_error_1 = - _registerName1("bookmarkDataWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_194( + late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); + ffi.Pointer _objc_msgSend_72( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bookmarkFileURL, - ffi.Pointer> error, + double value, ) { - return __objc_msgSend_194( + return __objc_msgSend_72( obj, sel, - bookmarkFileURL, - error, + value, ); } - late final __objc_msgSend_194Ptr = _lookup< + late final __objc_msgSend_72Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>('objc_msgSend'); + late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, ffi.Pointer, double)>(); - late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = - _registerName1("URLByResolvingAliasFileAtURL:options:error:"); - instancetype _objc_msgSend_195( + late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); + ffi.Pointer _objc_msgSend_73( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer> error, + double value, ) { - return __objc_msgSend_195( + return __objc_msgSend_73( obj, sel, - url, - options, - error, + value, ); } - late final __objc_msgSend_195Ptr = _lookup< + late final __objc_msgSend_73Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, double)>(); - late final _sel_startAccessingSecurityScopedResource1 = - _registerName1("startAccessingSecurityScopedResource"); - late final _sel_stopAccessingSecurityScopedResource1 = - _registerName1("stopAccessingSecurityScopedResource"); - late final _sel_getPromisedItemResourceValue_forKey_error_1 = - _registerName1("getPromisedItemResourceValue:forKey:error:"); - late final _sel_promisedItemResourceValuesForKeys_error_1 = - _registerName1("promisedItemResourceValuesForKeys:error:"); - late final _sel_checkPromisedItemIsReachableAndReturnError_1 = - _registerName1("checkPromisedItemIsReachableAndReturnError:"); - late final _sel_fileURLWithPathComponents_1 = - _registerName1("fileURLWithPathComponents:"); - ffi.Pointer _objc_msgSend_196( + late final _sel_initWithBool_1 = _registerName1("initWithBool:"); + ffi.Pointer _objc_msgSend_74( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer components, + bool value, ) { - return __objc_msgSend_196( + return __objc_msgSend_74( obj, sel, - components, + value, ); } - late final __objc_msgSend_196Ptr = _lookup< + late final __objc_msgSend_74Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); - late final _sel_pathComponents1 = _registerName1("pathComponents"); - late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); - late final _sel_pathExtension1 = _registerName1("pathExtension"); - late final _sel_URLByAppendingPathComponent_1 = - _registerName1("URLByAppendingPathComponent:"); - late final _sel_URLByAppendingPathComponent_isDirectory_1 = - _registerName1("URLByAppendingPathComponent:isDirectory:"); - late final _sel_URLByDeletingLastPathComponent1 = - _registerName1("URLByDeletingLastPathComponent"); - late final _sel_URLByAppendingPathExtension_1 = - _registerName1("URLByAppendingPathExtension:"); - late final _sel_URLByDeletingPathExtension1 = - _registerName1("URLByDeletingPathExtension"); - late final _sel_URLByStandardizingPath1 = - _registerName1("URLByStandardizingPath"); - late final _sel_URLByResolvingSymlinksInPath1 = - _registerName1("URLByResolvingSymlinksInPath"); - late final _sel_resourceDataUsingCache_1 = - _registerName1("resourceDataUsingCache:"); - ffi.Pointer _objc_msgSend_197( + late final _sel_initWithInteger_1 = _registerName1("initWithInteger:"); + late final _sel_initWithUnsignedInteger_1 = + _registerName1("initWithUnsignedInteger:"); + late final _sel_charValue1 = _registerName1("charValue"); + int _objc_msgSend_75( ffi.Pointer obj, ffi.Pointer sel, - bool shouldUseCache, ) { - return __objc_msgSend_197( + return __objc_msgSend_75( obj, sel, - shouldUseCache, ); } - late final __objc_msgSend_197Ptr = _lookup< + late final __objc_msgSend_75Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Char Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_loadResourceDataNotifyingClient_usingCache_1 = - _registerName1("loadResourceDataNotifyingClient:usingCache:"); - void _objc_msgSend_198( + late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); + int _objc_msgSend_76( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer client, - bool shouldUseCache, ) { - return __objc_msgSend_198( + return __objc_msgSend_76( obj, sel, - client, - shouldUseCache, ); } - late final __objc_msgSend_198Ptr = _lookup< + late final __objc_msgSend_76Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.UnsignedChar Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); - late final _sel_setResourceData_1 = _registerName1("setResourceData:"); - late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); - bool _objc_msgSend_199( + late final _sel_shortValue1 = _registerName1("shortValue"); + int _objc_msgSend_77( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer property, - ffi.Pointer propertyKey, ) { - return __objc_msgSend_199( + return __objc_msgSend_77( obj, sel, - property, - propertyKey, ); } - late final __objc_msgSend_199Ptr = _lookup< + late final __objc_msgSend_77Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Short Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); - late final _sel_registerURLHandleClass_1 = - _registerName1("registerURLHandleClass:"); - void _objc_msgSend_200( + late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); + int _objc_msgSend_78( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURLHandleSubclass, ) { - return __objc_msgSend_200( + return __objc_msgSend_78( obj, sel, - anURLHandleSubclass, ); } - late final __objc_msgSend_200Ptr = _lookup< + late final __objc_msgSend_78Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.UnsignedShort Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_URLHandleClassForURL_1 = - _registerName1("URLHandleClassForURL:"); - ffi.Pointer _objc_msgSend_201( + late final _sel_intValue1 = _registerName1("intValue"); + int _objc_msgSend_79( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURL, ) { - return __objc_msgSend_201( + return __objc_msgSend_79( obj, sel, - anURL, ); } - late final __objc_msgSend_201Ptr = _lookup< + late final __objc_msgSend_79Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_status1 = _registerName1("status"); - int _objc_msgSend_202( + late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); + int _objc_msgSend_80( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_202( + return __objc_msgSend_80( obj, sel, ); } - late final __objc_msgSend_202Ptr = _lookup< + late final __objc_msgSend_80Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( + ffi.UnsignedInt Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< + late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_failureReason1 = _registerName1("failureReason"); - late final _sel_addClient_1 = _registerName1("addClient:"); - late final _sel_removeClient_1 = _registerName1("removeClient:"); - late final _sel_loadInBackground1 = _registerName1("loadInBackground"); - late final _sel_cancelLoadInBackground1 = - _registerName1("cancelLoadInBackground"); - late final _sel_resourceData1 = _registerName1("resourceData"); - late final _sel_availableResourceData1 = - _registerName1("availableResourceData"); - late final _sel_expectedResourceDataSize1 = - _registerName1("expectedResourceDataSize"); - late final _sel_flushCachedData1 = _registerName1("flushCachedData"); - late final _sel_backgroundLoadDidFailWithReason_1 = - _registerName1("backgroundLoadDidFailWithReason:"); - late final _sel_didLoadBytes_loadComplete_1 = - _registerName1("didLoadBytes:loadComplete:"); - void _objc_msgSend_203( + late final _sel_longValue1 = _registerName1("longValue"); + int _objc_msgSend_81( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer newBytes, - bool yorn, ) { - return __objc_msgSend_203( + return __objc_msgSend_81( obj, sel, - newBytes, - yorn, ); } - late final __objc_msgSend_203Ptr = _lookup< + late final __objc_msgSend_81Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Long Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); - bool _objc_msgSend_204( + late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); + late final _sel_longLongValue1 = _registerName1("longLongValue"); + int _objc_msgSend_82( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURL, ) { - return __objc_msgSend_204( + return __objc_msgSend_82( obj, sel, - anURL, ); } - late final __objc_msgSend_204Ptr = _lookup< + late final __objc_msgSend_82Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.LongLong Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); - ffi.Pointer _objc_msgSend_205( + late final _sel_unsignedLongLongValue1 = + _registerName1("unsignedLongLongValue"); + int _objc_msgSend_83( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURL, ) { - return __objc_msgSend_205( + return __objc_msgSend_83( obj, sel, - anURL, ); } - late final __objc_msgSend_205Ptr = _lookup< + late final __objc_msgSend_83Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.UnsignedLongLong Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); - ffi.Pointer _objc_msgSend_206( + late final _sel_floatValue1 = _registerName1("floatValue"); + double _objc_msgSend_84( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anURL, - bool willCache, ) { - return __objc_msgSend_206( + return __objc_msgSend_84( obj, sel, - anURL, - willCache, ); } - late final __objc_msgSend_206Ptr = _lookup< + late final __objc_msgSend_84Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Float Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_propertyForKeyIfAvailable_1 = - _registerName1("propertyForKeyIfAvailable:"); - late final _sel_writeProperty_forKey_1 = - _registerName1("writeProperty:forKey:"); - late final _sel_writeData_1 = _registerName1("writeData:"); - late final _sel_loadInForeground1 = _registerName1("loadInForeground"); - late final _sel_beginLoadInBackground1 = - _registerName1("beginLoadInBackground"); - late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); - late final _sel_URLHandleUsingCache_1 = - _registerName1("URLHandleUsingCache:"); - ffi.Pointer _objc_msgSend_207( + late final _sel_doubleValue1 = _registerName1("doubleValue"); + double _objc_msgSend_85( ffi.Pointer obj, ffi.Pointer sel, - bool shouldUseCache, ) { - return __objc_msgSend_207( + return __objc_msgSend_85( obj, sel, - shouldUseCache, ); } - late final __objc_msgSend_207Ptr = _lookup< + late final __objc_msgSend_85Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Double Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_writeToFile_options_error_1 = - _registerName1("writeToFile:options:error:"); - bool _objc_msgSend_208( + late final _sel_boolValue1 = _registerName1("boolValue"); + late final _sel_integerValue1 = _registerName1("integerValue"); + late final _sel_unsignedIntegerValue1 = + _registerName1("unsignedIntegerValue"); + late final _sel_stringValue1 = _registerName1("stringValue"); + int _objc_msgSend_86( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - int writeOptionsMask, - ffi.Pointer> errorPtr, + ffi.Pointer otherNumber, ) { - return __objc_msgSend_208( + return __objc_msgSend_86( obj, sel, - path, - writeOptionsMask, - errorPtr, + otherNumber, ); } - late final __objc_msgSend_208Ptr = _lookup< + late final __objc_msgSend_86Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_writeToURL_options_error_1 = - _registerName1("writeToURL:options:error:"); - bool _objc_msgSend_209( + late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); + bool _objc_msgSend_87( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - int writeOptionsMask, - ffi.Pointer> errorPtr, + ffi.Pointer number, ) { - return __objc_msgSend_209( + return __objc_msgSend_87( obj, sel, - url, - writeOptionsMask, - errorPtr, + number, ); } - late final __objc_msgSend_209Ptr = _lookup< + late final __objc_msgSend_87Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_rangeOfData_options_range_1 = - _registerName1("rangeOfData:options:range:"); - NSRange _objc_msgSend_210( + late final _sel_descriptionWithLocale_1 = + _registerName1("descriptionWithLocale:"); + ffi.Pointer _objc_msgSend_88( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer dataToFind, - int mask, - NSRange searchRange, + ffi.Pointer locale, ) { - return __objc_msgSend_210( + return __objc_msgSend_88( obj, sel, - dataToFind, - mask, - searchRange, + locale, ); } - late final __objc_msgSend_210Ptr = _lookup< + late final __objc_msgSend_88Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_enumerateByteRangesUsingBlock_1 = - _registerName1("enumerateByteRangesUsingBlock:"); - void _objc_msgSend_211( + late final _sel_numberWithChar_1 = _registerName1("numberWithChar:"); + late final _sel_numberWithUnsignedChar_1 = + _registerName1("numberWithUnsignedChar:"); + late final _sel_numberWithShort_1 = _registerName1("numberWithShort:"); + late final _sel_numberWithUnsignedShort_1 = + _registerName1("numberWithUnsignedShort:"); + late final _sel_numberWithInt_1 = _registerName1("numberWithInt:"); + late final _sel_numberWithUnsignedInt_1 = + _registerName1("numberWithUnsignedInt:"); + late final _sel_numberWithLong_1 = _registerName1("numberWithLong:"); + late final _sel_numberWithUnsignedLong_1 = + _registerName1("numberWithUnsignedLong:"); + late final _sel_numberWithLongLong_1 = _registerName1("numberWithLongLong:"); + late final _sel_numberWithUnsignedLongLong_1 = + _registerName1("numberWithUnsignedLongLong:"); + late final _sel_numberWithFloat_1 = _registerName1("numberWithFloat:"); + late final _sel_numberWithDouble_1 = _registerName1("numberWithDouble:"); + late final _sel_numberWithBool_1 = _registerName1("numberWithBool:"); + late final _sel_numberWithInteger_1 = _registerName1("numberWithInteger:"); + late final _sel_numberWithUnsignedInteger_1 = + _registerName1("numberWithUnsignedInteger:"); + late final _sel_port1 = _registerName1("port"); + ffi.Pointer _objc_msgSend_89( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_211( + return __objc_msgSend_89( obj, sel, - block, ); } - late final __objc_msgSend_211Ptr = _lookup< + late final __objc_msgSend_89Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_data1 = _registerName1("data"); - late final _sel_dataWithBytes_length_1 = - _registerName1("dataWithBytes:length:"); - instancetype _objc_msgSend_212( + late final _sel_user1 = _registerName1("user"); + late final _sel_password1 = _registerName1("password"); + late final _sel_path1 = _registerName1("path"); + late final _sel_fragment1 = _registerName1("fragment"); + late final _sel_parameterString1 = _registerName1("parameterString"); + late final _sel_query1 = _registerName1("query"); + late final _sel_relativePath1 = _registerName1("relativePath"); + late final _sel_hasDirectoryPath1 = _registerName1("hasDirectoryPath"); + late final _sel_getFileSystemRepresentation_maxLength_1 = + _registerName1("getFileSystemRepresentation:maxLength:"); + bool _objc_msgSend_90( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, + ffi.Pointer buffer, + int maxBufferLength, ) { - return __objc_msgSend_212( + return __objc_msgSend_90( obj, sel, - bytes, - length, + buffer, + maxBufferLength, ); } - late final __objc_msgSend_212Ptr = _lookup< + late final __objc_msgSend_90Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_dataWithBytesNoCopy_length_1 = - _registerName1("dataWithBytesNoCopy:length:"); - late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = - _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_213( + late final _sel_fileSystemRepresentation1 = + _registerName1("fileSystemRepresentation"); + late final _sel_isFileURL1 = _registerName1("isFileURL"); + late final _sel_standardizedURL1 = _registerName1("standardizedURL"); + late final _class_NSError1 = _getClass1("NSError"); + late final _class_NSDictionary1 = _getClass1("NSDictionary"); + late final _sel_count1 = _registerName1("count"); + late final _sel_objectForKey_1 = _registerName1("objectForKey:"); + ffi.Pointer _objc_msgSend_91( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool b, + ffi.Pointer aKey, ) { - return __objc_msgSend_213( + return __objc_msgSend_91( obj, sel, - bytes, - length, - b, + aKey, ); } - late final __objc_msgSend_213Ptr = _lookup< + late final __objc_msgSend_91Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dataWithContentsOfFile_options_error_1 = - _registerName1("dataWithContentsOfFile:options:error:"); - instancetype _objc_msgSend_214( + late final _class_NSEnumerator1 = _getClass1("NSEnumerator"); + late final _sel_nextObject1 = _registerName1("nextObject"); + late final _sel_allObjects1 = _registerName1("allObjects"); + late final _sel_keyEnumerator1 = _registerName1("keyEnumerator"); + ffi.Pointer _objc_msgSend_92( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - int readOptionsMask, - ffi.Pointer> errorPtr, ) { - return __objc_msgSend_214( + return __objc_msgSend_92( obj, sel, - path, - readOptionsMask, - errorPtr, ); } - late final __objc_msgSend_214Ptr = _lookup< + late final __objc_msgSend_92Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_dataWithContentsOfURL_options_error_1 = - _registerName1("dataWithContentsOfURL:options:error:"); - instancetype _objc_msgSend_215( + late final _sel_initWithObjects_forKeys_count_1 = + _registerName1("initWithObjects:forKeys:count:"); + instancetype _objc_msgSend_93( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - int readOptionsMask, - ffi.Pointer> errorPtr, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt, ) { - return __objc_msgSend_215( + return __objc_msgSend_93( obj, sel, - url, - readOptionsMask, - errorPtr, + objects, + keys, + cnt, ); } - late final __objc_msgSend_215Ptr = _lookup< + late final __objc_msgSend_93Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< + ffi.Pointer>, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Pointer>, + ffi.Pointer>, + int)>(); - late final _sel_dataWithContentsOfFile_1 = - _registerName1("dataWithContentsOfFile:"); - late final _sel_dataWithContentsOfURL_1 = - _registerName1("dataWithContentsOfURL:"); - late final _sel_initWithBytes_length_1 = - _registerName1("initWithBytes:length:"); - late final _sel_initWithBytesNoCopy_length_1 = - _registerName1("initWithBytesNoCopy:length:"); - late final _sel_initWithBytesNoCopy_length_freeWhenDone_1 = - _registerName1("initWithBytesNoCopy:length:freeWhenDone:"); - late final _sel_initWithBytesNoCopy_length_deallocator_1 = - _registerName1("initWithBytesNoCopy:length:deallocator:"); - instancetype _objc_msgSend_216( + late final _class_NSArray1 = _getClass1("NSArray"); + late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); + ffi.Pointer _objc_msgSend_94( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, - ffi.Pointer<_ObjCBlock> deallocator, + int index, ) { - return __objc_msgSend_216( + return __objc_msgSend_94( obj, sel, - bytes, - length, - deallocator, + index, ); } - late final __objc_msgSend_216Ptr = _lookup< + late final __objc_msgSend_94Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_initWithContentsOfFile_options_error_1 = - _registerName1("initWithContentsOfFile:options:error:"); - late final _sel_initWithContentsOfURL_options_error_1 = - _registerName1("initWithContentsOfURL:options:error:"); - late final _sel_initWithData_1 = _registerName1("initWithData:"); - instancetype _objc_msgSend_217( + late final _sel_initWithObjects_count_1 = + _registerName1("initWithObjects:count:"); + instancetype _objc_msgSend_95( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, + ffi.Pointer> objects, + int cnt, ) { - return __objc_msgSend_217( + return __objc_msgSend_95( obj, sel, - data, + objects, + cnt, ); } - late final __objc_msgSend_217Ptr = _lookup< + late final __objc_msgSend_95Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer>, int)>(); - late final _sel_dataWithData_1 = _registerName1("dataWithData:"); - late final _sel_initWithBase64EncodedString_options_1 = - _registerName1("initWithBase64EncodedString:options:"); - instancetype _objc_msgSend_218( + late final _sel_arrayByAddingObject_1 = + _registerName1("arrayByAddingObject:"); + ffi.Pointer _objc_msgSend_96( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer base64String, - int options, + ffi.Pointer anObject, ) { - return __objc_msgSend_218( + return __objc_msgSend_96( obj, sel, - base64String, - options, + anObject, ); } - late final __objc_msgSend_218Ptr = _lookup< + late final __objc_msgSend_96Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_base64EncodedStringWithOptions_1 = - _registerName1("base64EncodedStringWithOptions:"); - ffi.Pointer _objc_msgSend_219( + late final _sel_arrayByAddingObjectsFromArray_1 = + _registerName1("arrayByAddingObjectsFromArray:"); + ffi.Pointer _objc_msgSend_97( ffi.Pointer obj, ffi.Pointer sel, - int options, + ffi.Pointer otherArray, ) { - return __objc_msgSend_219( + return __objc_msgSend_97( obj, sel, - options, + otherArray, ); } - late final __objc_msgSend_219Ptr = _lookup< + late final __objc_msgSend_97Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithBase64EncodedData_options_1 = - _registerName1("initWithBase64EncodedData:options:"); - instancetype _objc_msgSend_220( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer base64Data, - int options, - ) { - return __objc_msgSend_220( - obj, - sel, - base64Data, - options, - ); - } - - late final __objc_msgSend_220Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_base64EncodedDataWithOptions_1 = - _registerName1("base64EncodedDataWithOptions:"); - ffi.Pointer _objc_msgSend_221( + late final _sel_componentsJoinedByString_1 = + _registerName1("componentsJoinedByString:"); + ffi.Pointer _objc_msgSend_98( ffi.Pointer obj, ffi.Pointer sel, - int options, + ffi.Pointer separator, ) { - return __objc_msgSend_221( + return __objc_msgSend_98( obj, sel, - options, + separator, ); } - late final __objc_msgSend_221Ptr = _lookup< + late final __objc_msgSend_98Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_decompressedDataUsingAlgorithm_error_1 = - _registerName1("decompressedDataUsingAlgorithm:error:"); - instancetype _objc_msgSend_222( + late final _sel_containsObject_1 = _registerName1("containsObject:"); + late final _sel_descriptionWithLocale_indent_1 = + _registerName1("descriptionWithLocale:indent:"); + ffi.Pointer _objc_msgSend_99( ffi.Pointer obj, ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, + ffi.Pointer locale, + int level, ) { - return __objc_msgSend_222( + return __objc_msgSend_99( obj, sel, - algorithm, - error, + locale, + level, ); } - late final __objc_msgSend_222Ptr = _lookup< + late final __objc_msgSend_99Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); + ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_compressedDataUsingAlgorithm_error_1 = - _registerName1("compressedDataUsingAlgorithm:error:"); - late final _sel_getBytes_1 = _registerName1("getBytes:"); - late final _sel_dataWithContentsOfMappedFile_1 = - _registerName1("dataWithContentsOfMappedFile:"); - late final _sel_initWithContentsOfMappedFile_1 = - _registerName1("initWithContentsOfMappedFile:"); - late final _sel_initWithBase64Encoding_1 = - _registerName1("initWithBase64Encoding:"); - late final _sel_base64Encoding1 = _registerName1("base64Encoding"); - late final _sel_characterSetWithBitmapRepresentation_1 = - _registerName1("characterSetWithBitmapRepresentation:"); - ffi.Pointer _objc_msgSend_223( + late final _sel_firstObjectCommonWithArray_1 = + _registerName1("firstObjectCommonWithArray:"); + ffi.Pointer _objc_msgSend_100( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, + ffi.Pointer otherArray, ) { - return __objc_msgSend_223( + return __objc_msgSend_100( obj, sel, - data, + otherArray, ); } - late final __objc_msgSend_223Ptr = _lookup< + late final __objc_msgSend_100Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< + late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_characterSetWithContentsOfFile_1 = - _registerName1("characterSetWithContentsOfFile:"); - late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); - bool _objc_msgSend_224( + late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); + void _objc_msgSend_101( ffi.Pointer obj, ffi.Pointer sel, - int aCharacter, + ffi.Pointer> objects, + NSRange range, ) { - return __objc_msgSend_224( + return __objc_msgSend_101( obj, sel, - aCharacter, + objects, + range, ); } - late final __objc_msgSend_224Ptr = _lookup< + late final __objc_msgSend_101Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - unichar)>>('objc_msgSend'); - late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, NSRange)>(); - late final _sel_bitmapRepresentation1 = - _registerName1("bitmapRepresentation"); - late final _sel_invertedSet1 = _registerName1("invertedSet"); - late final _sel_longCharacterIsMember_1 = - _registerName1("longCharacterIsMember:"); - bool _objc_msgSend_225( + late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); + int _objc_msgSend_102( ffi.Pointer obj, ffi.Pointer sel, - int theLongChar, + ffi.Pointer anObject, ) { - return __objc_msgSend_225( + return __objc_msgSend_102( obj, sel, - theLongChar, + anObject, ); } - late final __objc_msgSend_225Ptr = _lookup< + late final __objc_msgSend_102Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - UTF32Char)>>('objc_msgSend'); - late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); - bool _objc_msgSend_226( + late final _sel_indexOfObject_inRange_1 = + _registerName1("indexOfObject:inRange:"); + int _objc_msgSend_103( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer theOtherSet, + ffi.Pointer anObject, + NSRange range, ) { - return __objc_msgSend_226( + return __objc_msgSend_103( obj, sel, - theOtherSet, + anObject, + range, ); } - late final __objc_msgSend_226Ptr = _lookup< + late final __objc_msgSend_103Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); - bool _objc_msgSend_227( + late final _sel_indexOfObjectIdenticalTo_1 = + _registerName1("indexOfObjectIdenticalTo:"); + late final _sel_indexOfObjectIdenticalTo_inRange_1 = + _registerName1("indexOfObjectIdenticalTo:inRange:"); + late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); + bool _objc_msgSend_104( ffi.Pointer obj, ffi.Pointer sel, - int thePlane, + ffi.Pointer otherArray, ) { - return __objc_msgSend_227( + return __objc_msgSend_104( obj, sel, - thePlane, + otherArray, ); } - late final __objc_msgSend_227Ptr = _lookup< + late final __objc_msgSend_104Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Uint8)>>('objc_msgSend'); - late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_URLUserAllowedCharacterSet1 = - _registerName1("URLUserAllowedCharacterSet"); - late final _sel_URLPasswordAllowedCharacterSet1 = - _registerName1("URLPasswordAllowedCharacterSet"); - late final _sel_URLHostAllowedCharacterSet1 = - _registerName1("URLHostAllowedCharacterSet"); - late final _sel_URLPathAllowedCharacterSet1 = - _registerName1("URLPathAllowedCharacterSet"); - late final _sel_URLQueryAllowedCharacterSet1 = - _registerName1("URLQueryAllowedCharacterSet"); - late final _sel_URLFragmentAllowedCharacterSet1 = - _registerName1("URLFragmentAllowedCharacterSet"); - late final _sel_rangeOfCharacterFromSet_1 = - _registerName1("rangeOfCharacterFromSet:"); - NSRange _objc_msgSend_228( + late final _sel_firstObject1 = _registerName1("firstObject"); + late final _sel_lastObject1 = _registerName1("lastObject"); + late final _sel_objectEnumerator1 = _registerName1("objectEnumerator"); + late final _sel_reverseObjectEnumerator1 = + _registerName1("reverseObjectEnumerator"); + late final _sel_sortedArrayHint1 = _registerName1("sortedArrayHint"); + late final _sel_sortedArrayUsingFunction_context_1 = + _registerName1("sortedArrayUsingFunction:context:"); + ffi.Pointer _objc_msgSend_105( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchSet, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, ) { - return __objc_msgSend_228( + return __objc_msgSend_105( obj, sel, - searchSet, + comparator, + context, ); } - late final __objc_msgSend_228Ptr = _lookup< + late final __objc_msgSend_105Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); - late final _sel_rangeOfCharacterFromSet_options_1 = - _registerName1("rangeOfCharacterFromSet:options:"); - NSRange _objc_msgSend_229( + late final _sel_sortedArrayUsingFunction_context_hint_1 = + _registerName1("sortedArrayUsingFunction:context:hint:"); + ffi.Pointer _objc_msgSend_106( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + ffi.Pointer hint, ) { - return __objc_msgSend_229( + return __objc_msgSend_106( obj, sel, - searchSet, - mask, + comparator, + context, + hint, ); } - late final __objc_msgSend_229Ptr = _lookup< + late final __objc_msgSend_106Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_rangeOfCharacterFromSet_options_range_1 = - _registerName1("rangeOfCharacterFromSet:options:range:"); - NSRange _objc_msgSend_230( + late final _sel_sortedArrayUsingSelector_1 = + _registerName1("sortedArrayUsingSelector:"); + ffi.Pointer _objc_msgSend_107( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - NSRange rangeOfReceiverToSearch, + ffi.Pointer comparator, ) { - return __objc_msgSend_230( + return __objc_msgSend_107( obj, sel, - searchSet, - mask, - rangeOfReceiverToSearch, + comparator, ); } - late final __objc_msgSend_230Ptr = _lookup< + late final __objc_msgSend_107Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = - _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); - NSRange _objc_msgSend_231( + late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); + ffi.Pointer _objc_msgSend_108( ffi.Pointer obj, ffi.Pointer sel, - int index, + NSRange range, ) { - return __objc_msgSend_231( + return __objc_msgSend_108( obj, sel, - index, + range, ); } - late final __objc_msgSend_231Ptr = _lookup< + late final __objc_msgSend_108Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_rangeOfComposedCharacterSequencesForRange_1 = - _registerName1("rangeOfComposedCharacterSequencesForRange:"); - NSRange _objc_msgSend_232( + late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); + bool _objc_msgSend_109( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + ffi.Pointer url, + ffi.Pointer> error, ) { - return __objc_msgSend_232( + return __objc_msgSend_109( obj, sel, - range, + url, + error, ); } - late final __objc_msgSend_232Ptr = _lookup< + late final __objc_msgSend_109Ptr = _lookup< ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< - NSRange Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - late final _sel_stringByAppendingString_1 = - _registerName1("stringByAppendingString:"); - late final _sel_stringByAppendingFormat_1 = - _registerName1("stringByAppendingFormat:"); - late final _sel_uppercaseString1 = _registerName1("uppercaseString"); - late final _sel_lowercaseString1 = _registerName1("lowercaseString"); - late final _sel_capitalizedString1 = _registerName1("capitalizedString"); - late final _sel_localizedUppercaseString1 = - _registerName1("localizedUppercaseString"); - late final _sel_localizedLowercaseString1 = - _registerName1("localizedLowercaseString"); - late final _sel_localizedCapitalizedString1 = - _registerName1("localizedCapitalizedString"); - late final _sel_uppercaseStringWithLocale_1 = - _registerName1("uppercaseStringWithLocale:"); - ffi.Pointer _objc_msgSend_233( + late final _sel_makeObjectsPerformSelector_1 = + _registerName1("makeObjectsPerformSelector:"); + late final _sel_makeObjectsPerformSelector_withObject_1 = + _registerName1("makeObjectsPerformSelector:withObject:"); + void _objc_msgSend_110( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer locale, + ffi.Pointer aSelector, + ffi.Pointer argument, ) { - return __objc_msgSend_233( + return __objc_msgSend_110( obj, sel, - locale, + aSelector, + argument, ); } - late final __objc_msgSend_233Ptr = _lookup< + late final __objc_msgSend_110Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, + late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_lowercaseStringWithLocale_1 = - _registerName1("lowercaseStringWithLocale:"); - late final _sel_capitalizedStringWithLocale_1 = - _registerName1("capitalizedStringWithLocale:"); - late final _sel_getLineStart_end_contentsEnd_forRange_1 = - _registerName1("getLineStart:end:contentsEnd:forRange:"); - void _objc_msgSend_234( + late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); + late final _sel_indexSet1 = _registerName1("indexSet"); + late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); + late final _sel_indexSetWithIndexesInRange_1 = + _registerName1("indexSetWithIndexesInRange:"); + instancetype _objc_msgSend_111( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, NSRange range, ) { - return __objc_msgSend_234( + return __objc_msgSend_111( obj, sel, - startPtr, - lineEndPtr, - contentsEndPtr, range, ); } - late final __objc_msgSend_234Ptr = _lookup< + late final __objc_msgSend_111Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange)>(); + late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_lineRangeForRange_1 = _registerName1("lineRangeForRange:"); - late final _sel_getParagraphStart_end_contentsEnd_forRange_1 = - _registerName1("getParagraphStart:end:contentsEnd:forRange:"); - late final _sel_paragraphRangeForRange_1 = - _registerName1("paragraphRangeForRange:"); - late final _sel_enumerateSubstringsInRange_options_usingBlock_1 = - _registerName1("enumerateSubstringsInRange:options:usingBlock:"); - void _objc_msgSend_235( + late final _sel_initWithIndexesInRange_1 = + _registerName1("initWithIndexesInRange:"); + late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); + instancetype _objc_msgSend_112( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer indexSet, ) { - return __objc_msgSend_235( + return __objc_msgSend_112( obj, sel, - range, - opts, - block, + indexSet, ); } - late final __objc_msgSend_235Ptr = _lookup< + late final __objc_msgSend_112Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_enumerateLinesUsingBlock_1 = - _registerName1("enumerateLinesUsingBlock:"); - void _objc_msgSend_236( + late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); + late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); + bool _objc_msgSend_113( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer indexSet, ) { - return __objc_msgSend_236( + return __objc_msgSend_113( obj, sel, - block, + indexSet, ); } - late final __objc_msgSend_236Ptr = _lookup< + late final __objc_msgSend_113Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_UTF8String1 = _registerName1("UTF8String"); - late final _sel_fastestEncoding1 = _registerName1("fastestEncoding"); - late final _sel_smallestEncoding1 = _registerName1("smallestEncoding"); - late final _sel_dataUsingEncoding_allowLossyConversion_1 = - _registerName1("dataUsingEncoding:allowLossyConversion:"); - ffi.Pointer _objc_msgSend_237( + late final _sel_firstIndex1 = _registerName1("firstIndex"); + late final _sel_lastIndex1 = _registerName1("lastIndex"); + late final _sel_indexGreaterThanIndex_1 = + _registerName1("indexGreaterThanIndex:"); + int _objc_msgSend_114( ffi.Pointer obj, ffi.Pointer sel, - int encoding, - bool lossy, + int value, ) { - return __objc_msgSend_237( + return __objc_msgSend_114( obj, sel, - encoding, - lossy, + value, ); } - late final __objc_msgSend_237Ptr = _lookup< + late final __objc_msgSend_114Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSStringEncoding, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, bool)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); - ffi.Pointer _objc_msgSend_238( + late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); + late final _sel_indexGreaterThanOrEqualToIndex_1 = + _registerName1("indexGreaterThanOrEqualToIndex:"); + late final _sel_indexLessThanOrEqualToIndex_1 = + _registerName1("indexLessThanOrEqualToIndex:"); + late final _sel_getIndexes_maxCount_inIndexRange_1 = + _registerName1("getIndexes:maxCount:inIndexRange:"); + int _objc_msgSend_115( ffi.Pointer obj, ffi.Pointer sel, - int encoding, + ffi.Pointer indexBuffer, + int bufferSize, + NSRangePointer range, ) { - return __objc_msgSend_238( + return __objc_msgSend_115( obj, sel, - encoding, + indexBuffer, + bufferSize, + range, ); } - late final __objc_msgSend_238Ptr = _lookup< + late final __objc_msgSend_115Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRangePointer)>(); - late final _sel_canBeConvertedToEncoding_1 = - _registerName1("canBeConvertedToEncoding:"); - late final _sel_cStringUsingEncoding_1 = - _registerName1("cStringUsingEncoding:"); - ffi.Pointer _objc_msgSend_239( + late final _sel_countOfIndexesInRange_1 = + _registerName1("countOfIndexesInRange:"); + int _objc_msgSend_116( ffi.Pointer obj, ffi.Pointer sel, - int encoding, + NSRange range, ) { - return __objc_msgSend_239( + return __objc_msgSend_116( obj, sel, - encoding, + range, ); } - late final __objc_msgSend_239Ptr = _lookup< + late final __objc_msgSend_116Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_getCString_maxLength_encoding_1 = - _registerName1("getCString:maxLength:encoding:"); - bool _objc_msgSend_240( + late final _sel_containsIndex_1 = _registerName1("containsIndex:"); + bool _objc_msgSend_117( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - int encoding, + int value, ) { - return __objc_msgSend_240( + return __objc_msgSend_117( obj, sel, - buffer, - maxBufferCount, - encoding, + value, ); } - late final __objc_msgSend_240Ptr = _lookup< + late final __objc_msgSend_117Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1 = - _registerName1( - "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); - bool _objc_msgSend_241( + late final _sel_containsIndexesInRange_1 = + _registerName1("containsIndexesInRange:"); + bool _objc_msgSend_118( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, NSRange range, - NSRangePointer leftover, ) { - return __objc_msgSend_241( + return __objc_msgSend_118( obj, sel, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, range, - leftover, ); } - late final __objc_msgSend_241Ptr = _lookup< + late final __objc_msgSend_118Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - NSStringEncoding, - ffi.Int32, - NSRange, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - int, - NSRange, - NSRangePointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_maximumLengthOfBytesUsingEncoding_1 = - _registerName1("maximumLengthOfBytesUsingEncoding:"); - late final _sel_lengthOfBytesUsingEncoding_1 = - _registerName1("lengthOfBytesUsingEncoding:"); - late final _sel_availableStringEncodings1 = - _registerName1("availableStringEncodings"); - ffi.Pointer _objc_msgSend_242( + late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); + late final _sel_intersectsIndexesInRange_1 = + _registerName1("intersectsIndexesInRange:"); + late final _sel_enumerateIndexesUsingBlock_1 = + _registerName1("enumerateIndexesUsingBlock:"); + void _objc_msgSend_119( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_242( + return __objc_msgSend_119( obj, sel, + block, ); } - late final __objc_msgSend_242Ptr = _lookup< + late final __objc_msgSend_119Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_localizedNameOfStringEncoding_1 = - _registerName1("localizedNameOfStringEncoding:"); - late final _sel_defaultCStringEncoding1 = - _registerName1("defaultCStringEncoding"); - late final _sel_decomposedStringWithCanonicalMapping1 = - _registerName1("decomposedStringWithCanonicalMapping"); - late final _sel_precomposedStringWithCanonicalMapping1 = - _registerName1("precomposedStringWithCanonicalMapping"); - late final _sel_decomposedStringWithCompatibilityMapping1 = - _registerName1("decomposedStringWithCompatibilityMapping"); - late final _sel_precomposedStringWithCompatibilityMapping1 = - _registerName1("precomposedStringWithCompatibilityMapping"); - late final _sel_componentsSeparatedByString_1 = - _registerName1("componentsSeparatedByString:"); - late final _sel_componentsSeparatedByCharactersInSet_1 = - _registerName1("componentsSeparatedByCharactersInSet:"); - ffi.Pointer _objc_msgSend_243( + late final _sel_enumerateIndexesWithOptions_usingBlock_1 = + _registerName1("enumerateIndexesWithOptions:usingBlock:"); + void _objc_msgSend_120( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer separator, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_243( + return __objc_msgSend_120( obj, sel, - separator, + opts, + block, ); } - late final __objc_msgSend_243Ptr = _lookup< + late final __objc_msgSend_120Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByTrimmingCharactersInSet_1 = - _registerName1("stringByTrimmingCharactersInSet:"); - ffi.Pointer _objc_msgSend_244( + late final _sel_enumerateIndexesInRange_options_usingBlock_1 = + _registerName1("enumerateIndexesInRange:options:usingBlock:"); + void _objc_msgSend_121( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer set1, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_244( + return __objc_msgSend_121( obj, sel, - set1, + range, + opts, + block, ); } - late final __objc_msgSend_244Ptr = _lookup< + late final __objc_msgSend_121Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByPaddingToLength_withString_startingAtIndex_1 = - _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); - ffi.Pointer _objc_msgSend_245( + late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); + int _objc_msgSend_122( ffi.Pointer obj, ffi.Pointer sel, - int newLength, - ffi.Pointer padString, - int padIndex, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_245( + return __objc_msgSend_122( obj, sel, - newLength, - padString, - padIndex, + predicate, ); } - late final __objc_msgSend_245Ptr = _lookup< + late final __objc_msgSend_122Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByFoldingWithOptions_locale_1 = - _registerName1("stringByFoldingWithOptions:locale:"); - ffi.Pointer _objc_msgSend_246( + late final _sel_indexWithOptions_passingTest_1 = + _registerName1("indexWithOptions:passingTest:"); + int _objc_msgSend_123( ffi.Pointer obj, ffi.Pointer sel, - int options, - ffi.Pointer locale, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_246( + return __objc_msgSend_123( obj, sel, - options, - locale, + opts, + predicate, ); } - late final __objc_msgSend_246Ptr = _lookup< + late final __objc_msgSend_123Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_1 = - _registerName1( - "stringByReplacingOccurrencesOfString:withString:options:range:"); - ffi.Pointer _objc_msgSend_247( + late final _sel_indexInRange_options_passingTest_1 = + _registerName1("indexInRange:options:passingTest:"); + int _objc_msgSend_124( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - NSRange searchRange, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_247( + return __objc_msgSend_124( obj, sel, - target, - replacement, - options, - searchRange, + range, + opts, + predicate, ); } - late final __objc_msgSend_247Ptr = _lookup< + late final __objc_msgSend_124Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - NSRange)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByReplacingOccurrencesOfString_withString_1 = - _registerName1("stringByReplacingOccurrencesOfString:withString:"); - ffi.Pointer _objc_msgSend_248( + late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); + ffi.Pointer _objc_msgSend_125( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_248( + return __objc_msgSend_125( obj, sel, - target, - replacement, + predicate, ); } - late final __objc_msgSend_248Ptr = _lookup< + late final __objc_msgSend_125Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final _sel_indexesWithOptions_passingTest_1 = + _registerName1("indexesWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_126( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> predicate, + ) { + return __objc_msgSend_126( + obj, + sel, + opts, + predicate, + ); + } + + late final __objc_msgSend_126Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByReplacingCharactersInRange_withString_1 = - _registerName1("stringByReplacingCharactersInRange:withString:"); - ffi.Pointer _objc_msgSend_249( + late final _sel_indexesInRange_options_passingTest_1 = + _registerName1("indexesInRange:options:passingTest:"); + ffi.Pointer _objc_msgSend_127( ffi.Pointer obj, ffi.Pointer sel, NSRange range, - ffi.Pointer replacement, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_249( + return __objc_msgSend_127( obj, sel, range, - replacement, + opts, + predicate, ); } - late final __objc_msgSend_249Ptr = _lookup< + late final __objc_msgSend_127Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange, ffi.Pointer)>(); + ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_stringByApplyingTransform_reverse_1 = - _registerName1("stringByApplyingTransform:reverse:"); - ffi.Pointer _objc_msgSend_250( + late final _sel_enumerateRangesUsingBlock_1 = + _registerName1("enumerateRangesUsingBlock:"); + void _objc_msgSend_128( ffi.Pointer obj, ffi.Pointer sel, - NSStringTransform transform, - bool reverse, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_250( + return __objc_msgSend_128( obj, sel, - transform, - reverse, + block, ); } - late final __objc_msgSend_250Ptr = _lookup< + late final __objc_msgSend_128Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSStringTransform, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringTransform, bool)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_writeToURL_atomically_encoding_error_1 = - _registerName1("writeToURL:atomically:encoding:error:"); - bool _objc_msgSend_251( + late final _sel_enumerateRangesWithOptions_usingBlock_1 = + _registerName1("enumerateRangesWithOptions:usingBlock:"); + void _objc_msgSend_129( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_251( + return __objc_msgSend_129( obj, sel, - url, - useAuxiliaryFile, - enc, - error, + opts, + block, ); } - late final __objc_msgSend_251Ptr = _lookup< + late final __objc_msgSend_129Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_writeToFile_atomically_encoding_error_1 = - _registerName1("writeToFile:atomically:encoding:error:"); - bool _objc_msgSend_252( + late final _sel_enumerateRangesInRange_options_usingBlock_1 = + _registerName1("enumerateRangesInRange:options:usingBlock:"); + void _objc_msgSend_130( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_252( + return __objc_msgSend_130( obj, sel, - path, - useAuxiliaryFile, - enc, - error, + range, + opts, + block, ); } - late final __objc_msgSend_252Ptr = _lookup< + late final __objc_msgSend_130Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithCharactersNoCopy_length_freeWhenDone_1 = - _registerName1("initWithCharactersNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_253( + late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); + ffi.Pointer _objc_msgSend_131( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer characters, - int length, - bool freeBuffer, + ffi.Pointer indexes, ) { - return __objc_msgSend_253( + return __objc_msgSend_131( obj, sel, - characters, - length, - freeBuffer, + indexes, ); } - late final __objc_msgSend_253Ptr = _lookup< + late final __objc_msgSend_131Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithCharactersNoCopy_length_deallocator_1 = - _registerName1("initWithCharactersNoCopy:length:deallocator:"); - instancetype _objc_msgSend_254( + late final _sel_objectAtIndexedSubscript_1 = + _registerName1("objectAtIndexedSubscript:"); + late final _sel_enumerateObjectsUsingBlock_1 = + _registerName1("enumerateObjectsUsingBlock:"); + void _objc_msgSend_132( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer chars, - int len, - ffi.Pointer<_ObjCBlock> deallocator, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_254( + return __objc_msgSend_132( obj, sel, - chars, - len, - deallocator, + block, ); } - late final __objc_msgSend_254Ptr = _lookup< + late final __objc_msgSend_132Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithCharacters_length_1 = - _registerName1("initWithCharacters:length:"); - instancetype _objc_msgSend_255( + late final _sel_enumerateObjectsWithOptions_usingBlock_1 = + _registerName1("enumerateObjectsWithOptions:usingBlock:"); + void _objc_msgSend_133( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer characters, - int length, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_255( + return __objc_msgSend_133( obj, sel, - characters, - length, + opts, + block, ); } - late final __objc_msgSend_255Ptr = _lookup< + late final __objc_msgSend_133Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); - instancetype _objc_msgSend_256( + late final _sel_enumerateObjectsAtIndexes_options_usingBlock_1 = + _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); + void _objc_msgSend_134( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer nullTerminatedCString, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_256( + return __objc_msgSend_134( obj, sel, - nullTerminatedCString, + s, + opts, + block, ); } - late final __objc_msgSend_256Ptr = _lookup< + late final __objc_msgSend_134Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithFormat_1 = _registerName1("initWithFormat:"); - late final _sel_initWithFormat_arguments_1 = - _registerName1("initWithFormat:arguments:"); - instancetype _objc_msgSend_257( + late final _sel_indexOfObjectPassingTest_1 = + _registerName1("indexOfObjectPassingTest:"); + int _objc_msgSend_135( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - va_list argList, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_257( + return __objc_msgSend_135( obj, sel, - format, - argList, + predicate, ); } - late final __objc_msgSend_257Ptr = _lookup< + late final __objc_msgSend_135Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, va_list)>>('objc_msgSend'); - late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, va_list)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithFormat_locale_1 = - _registerName1("initWithFormat:locale:"); - instancetype _objc_msgSend_258( + late final _sel_indexOfObjectWithOptions_passingTest_1 = + _registerName1("indexOfObjectWithOptions:passingTest:"); + int _objc_msgSend_136( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_258( + return __objc_msgSend_136( obj, sel, - format, - locale, + opts, + predicate, ); } - late final __objc_msgSend_258Ptr = _lookup< + late final __objc_msgSend_136Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithFormat_locale_arguments_1 = - _registerName1("initWithFormat:locale:arguments:"); - instancetype _objc_msgSend_259( + late final _sel_indexOfObjectAtIndexes_options_passingTest_1 = + _registerName1("indexOfObjectAtIndexes:options:passingTest:"); + int _objc_msgSend_137( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, - va_list argList, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_259( + return __objc_msgSend_137( obj, sel, - format, - locale, - argList, + s, + opts, + predicate, ); } - late final __objc_msgSend_259Ptr = _lookup< + late final __objc_msgSend_137Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + NSUInteger Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - va_list)>>('objc_msgSend'); - late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, va_list)>(); + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithData_encoding_1 = - _registerName1("initWithData:encoding:"); - instancetype _objc_msgSend_260( + late final _sel_indexesOfObjectsPassingTest_1 = + _registerName1("indexesOfObjectsPassingTest:"); + ffi.Pointer _objc_msgSend_138( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, - int encoding, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_260( + return __objc_msgSend_138( obj, sel, - data, - encoding, + predicate, ); } - late final __objc_msgSend_260Ptr = _lookup< + late final __objc_msgSend_138Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithBytes_length_encoding_1 = - _registerName1("initWithBytes:length:encoding:"); - instancetype _objc_msgSend_261( + late final _sel_indexesOfObjectsWithOptions_passingTest_1 = + _registerName1("indexesOfObjectsWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_139( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_261( + return __objc_msgSend_139( obj, sel, - bytes, - len, - encoding, + opts, + predicate, ); } - late final __objc_msgSend_261Ptr = _lookup< + late final __objc_msgSend_139Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = - _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); - instancetype _objc_msgSend_262( + late final _sel_indexesOfObjectsAtIndexes_options_passingTest_1 = + _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); + ffi.Pointer _objc_msgSend_140( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - bool freeBuffer, + ffi.Pointer s, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_262( + return __objc_msgSend_140( obj, sel, - bytes, - len, - encoding, - freeBuffer, + s, + opts, + predicate, ); } - late final __objc_msgSend_262Ptr = _lookup< + late final __objc_msgSend_140Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, bool)>(); + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithBytesNoCopy_length_encoding_deallocator_1 = - _registerName1("initWithBytesNoCopy:length:encoding:deallocator:"); - instancetype _objc_msgSend_263( + late final _sel_sortedArrayUsingComparator_1 = + _registerName1("sortedArrayUsingComparator:"); + ffi.Pointer _objc_msgSend_141( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - ffi.Pointer<_ObjCBlock> deallocator, + NSComparator cmptr, ) { - return __objc_msgSend_263( + return __objc_msgSend_141( obj, sel, - bytes, - len, - encoding, - deallocator, + cmptr, ); } - late final __objc_msgSend_263Ptr = _lookup< + late final __objc_msgSend_141Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSComparator)>(); - late final _sel_string1 = _registerName1("string"); - late final _sel_stringWithString_1 = _registerName1("stringWithString:"); - late final _sel_stringWithCharacters_length_1 = - _registerName1("stringWithCharacters:length:"); - late final _sel_stringWithUTF8String_1 = - _registerName1("stringWithUTF8String:"); - late final _sel_stringWithFormat_1 = _registerName1("stringWithFormat:"); - late final _sel_localizedStringWithFormat_1 = - _registerName1("localizedStringWithFormat:"); - late final _sel_initWithCString_encoding_1 = - _registerName1("initWithCString:encoding:"); - instancetype _objc_msgSend_264( + late final _sel_sortedArrayWithOptions_usingComparator_1 = + _registerName1("sortedArrayWithOptions:usingComparator:"); + ffi.Pointer _objc_msgSend_142( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer nullTerminatedCString, - int encoding, + int opts, + NSComparator cmptr, ) { - return __objc_msgSend_264( + return __objc_msgSend_142( obj, sel, - nullTerminatedCString, - encoding, + opts, + cmptr, ); } - late final __objc_msgSend_264Ptr = _lookup< + late final __objc_msgSend_142Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, NSComparator)>(); - late final _sel_stringWithCString_encoding_1 = - _registerName1("stringWithCString:encoding:"); - late final _sel_initWithContentsOfURL_encoding_error_1 = - _registerName1("initWithContentsOfURL:encoding:error:"); - instancetype _objc_msgSend_265( + late final _sel_indexOfObject_inSortedRange_options_usingComparator_1 = + _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); + int _objc_msgSend_143( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - int enc, - ffi.Pointer> error, + ffi.Pointer obj1, + NSRange r, + int opts, + NSComparator cmp, ) { - return __objc_msgSend_265( + return __objc_msgSend_143( obj, sel, - url, - enc, - error, + obj1, + r, + opts, + cmp, ); } - late final __objc_msgSend_265Ptr = _lookup< + late final __objc_msgSend_143Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + NSUInteger Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + NSRange, + ffi.Int32, + NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange, int, NSComparator)>(); - late final _sel_initWithContentsOfFile_encoding_error_1 = - _registerName1("initWithContentsOfFile:encoding:error:"); - instancetype _objc_msgSend_266( + late final _sel_array1 = _registerName1("array"); + late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); + late final _sel_arrayWithObjects_count_1 = + _registerName1("arrayWithObjects:count:"); + late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); + late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); + late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); + late final _sel_initWithArray_1 = _registerName1("initWithArray:"); + late final _sel_initWithArray_copyItems_1 = + _registerName1("initWithArray:copyItems:"); + instancetype _objc_msgSend_144( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - int enc, - ffi.Pointer> error, + ffi.Pointer array, + bool flag, ) { - return __objc_msgSend_266( + return __objc_msgSend_144( obj, sel, - path, - enc, - error, + array, + flag, ); } - late final __objc_msgSend_266Ptr = _lookup< + late final __objc_msgSend_144Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_stringWithContentsOfURL_encoding_error_1 = - _registerName1("stringWithContentsOfURL:encoding:error:"); - late final _sel_stringWithContentsOfFile_encoding_error_1 = - _registerName1("stringWithContentsOfFile:encoding:error:"); - late final _sel_initWithContentsOfURL_usedEncoding_error_1 = - _registerName1("initWithContentsOfURL:usedEncoding:error:"); - instancetype _objc_msgSend_267( + late final _sel_initWithContentsOfURL_error_1 = + _registerName1("initWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_145( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, - ffi.Pointer enc, ffi.Pointer> error, ) { - return __objc_msgSend_267( + return __objc_msgSend_145( obj, sel, url, - enc, error, ); } - late final __objc_msgSend_267Ptr = _lookup< + late final __objc_msgSend_145Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< - instancetype Function( + late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - late final _sel_initWithContentsOfFile_usedEncoding_error_1 = - _registerName1("initWithContentsOfFile:usedEncoding:error:"); - instancetype _objc_msgSend_268( + late final _sel_arrayWithContentsOfURL_error_1 = + _registerName1("arrayWithContentsOfURL:error:"); + late final _class_NSOrderedCollectionDifference1 = + _getClass1("NSOrderedCollectionDifference"); + late final _sel_initWithChanges_1 = _registerName1("initWithChanges:"); + late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1 = + _registerName1( + "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:"); + instancetype _objc_msgSend_146( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer enc, - ffi.Pointer> error, + ffi.Pointer inserts, + ffi.Pointer insertedObjects, + ffi.Pointer removes, + ffi.Pointer removedObjects, + ffi.Pointer changes, ) { - return __objc_msgSend_268( + return __objc_msgSend_146( obj, sel, - path, - enc, - error, + inserts, + insertedObjects, + removes, + removedObjects, + changes, ); } - late final __objc_msgSend_268Ptr = _lookup< + late final __objc_msgSend_146Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_stringWithContentsOfURL_usedEncoding_error_1 = - _registerName1("stringWithContentsOfURL:usedEncoding:error:"); - late final _sel_stringWithContentsOfFile_usedEncoding_error_1 = - _registerName1("stringWithContentsOfFile:usedEncoding:error:"); - late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1 = + late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1 = _registerName1( - "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); - int _objc_msgSend_269( + "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:"); + instancetype _objc_msgSend_147( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion, + ffi.Pointer inserts, + ffi.Pointer insertedObjects, + ffi.Pointer removes, + ffi.Pointer removedObjects, ) { - return __objc_msgSend_269( + return __objc_msgSend_147( obj, sel, - data, - opts, - string, - usedLossyConversion, + inserts, + insertedObjects, + removes, + removedObjects, ); } - late final __objc_msgSend_269Ptr = _lookup< + late final __objc_msgSend_147Ptr = _lookup< ffi.NativeFunction< - NSStringEncoding Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< - int Function( + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - late final _sel_propertyList1 = _registerName1("propertyList"); - late final _sel_propertyListFromStringsFileFormat1 = - _registerName1("propertyListFromStringsFileFormat"); - late final _sel_cString1 = _registerName1("cString"); - late final _sel_lossyCString1 = _registerName1("lossyCString"); - late final _sel_cStringLength1 = _registerName1("cStringLength"); - late final _sel_getCString_1 = _registerName1("getCString:"); - void _objc_msgSend_270( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - ) { - return __objc_msgSend_270( - obj, - sel, - bytes, - ); - } - - late final __objc_msgSend_270Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_getCString_maxLength_1 = - _registerName1("getCString:maxLength:"); - void _objc_msgSend_271( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int maxLength, - ) { - return __objc_msgSend_271( - obj, - sel, - bytes, - maxLength, - ); - } - - late final __objc_msgSend_271Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_getCString_maxLength_range_remainingRange_1 = - _registerName1("getCString:maxLength:range:remainingRange:"); - void _objc_msgSend_272( + late final _sel_insertions1 = _registerName1("insertions"); + late final _sel_removals1 = _registerName1("removals"); + late final _sel_hasChanges1 = _registerName1("hasChanges"); + late final _class_NSOrderedCollectionChange1 = + _getClass1("NSOrderedCollectionChange"); + late final _sel_changeWithObject_type_index_1 = + _registerName1("changeWithObject:type:index:"); + ffi.Pointer _objc_msgSend_148( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int maxLength, - NSRange aRange, - NSRangePointer leftoverRange, + ffi.Pointer anObject, + int type, + int index, ) { - return __objc_msgSend_272( + return __objc_msgSend_148( obj, sel, - bytes, - maxLength, - aRange, - leftoverRange, + anObject, + type, + index, ); } - late final __objc_msgSend_272Ptr = _lookup< + late final __objc_msgSend_148Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSRange, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange, NSRangePointer)>(); + ffi.Pointer, + ffi.Int32, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); - late final _sel_stringWithContentsOfFile_1 = - _registerName1("stringWithContentsOfFile:"); - late final _sel_stringWithContentsOfURL_1 = - _registerName1("stringWithContentsOfURL:"); - late final _sel_initWithCStringNoCopy_length_freeWhenDone_1 = - _registerName1("initWithCStringNoCopy:length:freeWhenDone:"); - ffi.Pointer _objc_msgSend_273( + late final _sel_changeWithObject_type_index_associatedIndex_1 = + _registerName1("changeWithObject:type:index:associatedIndex:"); + ffi.Pointer _objc_msgSend_149( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool freeBuffer, + ffi.Pointer anObject, + int type, + int index, + int associatedIndex, ) { - return __objc_msgSend_273( + return __objc_msgSend_149( obj, sel, - bytes, - length, - freeBuffer, + anObject, + type, + index, + associatedIndex, ); } - late final __objc_msgSend_273Ptr = _lookup< + late final __objc_msgSend_149Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, + ffi.Int32, NSUInteger, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, bool)>(); + ffi.Pointer, ffi.Pointer, int, int, int)>(); - late final _sel_initWithCString_length_1 = - _registerName1("initWithCString:length:"); - late final _sel_initWithCString_1 = _registerName1("initWithCString:"); - late final _sel_stringWithCString_length_1 = - _registerName1("stringWithCString:length:"); - late final _sel_stringWithCString_1 = _registerName1("stringWithCString:"); - late final _sel_getCharacters_1 = _registerName1("getCharacters:"); - void _objc_msgSend_274( + late final _sel_object1 = _registerName1("object"); + late final _sel_changeType1 = _registerName1("changeType"); + int _objc_msgSend_150( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, ) { - return __objc_msgSend_274( + return __objc_msgSend_150( obj, sel, - buffer, ); } - late final __objc_msgSend_274Ptr = _lookup< + late final __objc_msgSend_150Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = - _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); - late final _sel_stringByRemovingPercentEncoding1 = - _registerName1("stringByRemovingPercentEncoding"); - late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = - _registerName1("stringByAddingPercentEscapesUsingEncoding:"); - late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = - _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); - late final _sel_debugDescription1 = _registerName1("debugDescription"); - late final _sel_version1 = _registerName1("version"); - late final _sel_setVersion_1 = _registerName1("setVersion:"); - void _objc_msgSend_275( + late final _sel_index1 = _registerName1("index"); + late final _sel_associatedIndex1 = _registerName1("associatedIndex"); + late final _sel_initWithObject_type_index_1 = + _registerName1("initWithObject:type:index:"); + instancetype _objc_msgSend_151( ffi.Pointer obj, ffi.Pointer sel, - int aVersion, + ffi.Pointer anObject, + int type, + int index, ) { - return __objc_msgSend_275( + return __objc_msgSend_151( obj, sel, - aVersion, + anObject, + type, + index, ); } - late final __objc_msgSend_275Ptr = _lookup< + late final __objc_msgSend_151Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - late final _sel_classForCoder1 = _registerName1("classForCoder"); - late final _sel_replacementObjectForCoder_1 = - _registerName1("replacementObjectForCoder:"); - late final _sel_awakeAfterUsingCoder_1 = - _registerName1("awakeAfterUsingCoder:"); - late final _sel_poseAsClass_1 = _registerName1("poseAsClass:"); - late final _sel_autoContentAccessingProxy1 = - _registerName1("autoContentAccessingProxy"); - late final _sel_URL_resourceDataDidBecomeAvailable_1 = - _registerName1("URL:resourceDataDidBecomeAvailable:"); - void _objc_msgSend_276( + late final _sel_initWithObject_type_index_associatedIndex_1 = + _registerName1("initWithObject:type:index:associatedIndex:"); + instancetype _objc_msgSend_152( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer newBytes, + ffi.Pointer anObject, + int type, + int index, + int associatedIndex, ) { - return __objc_msgSend_276( + return __objc_msgSend_152( obj, sel, - sender, - newBytes, + anObject, + type, + index, + associatedIndex, ); } - late final __objc_msgSend_276Ptr = _lookup< + late final __objc_msgSend_152Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int32, + NSUInteger, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, int)>(); - late final _sel_URLResourceDidFinishLoading_1 = - _registerName1("URLResourceDidFinishLoading:"); - void _objc_msgSend_277( + late final _sel_differenceByTransformingChangesWithBlock_1 = + _registerName1("differenceByTransformingChangesWithBlock:"); + ffi.Pointer _objc_msgSend_153( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_277( + return __objc_msgSend_153( obj, sel, - sender, + block, ); } - late final __objc_msgSend_277Ptr = _lookup< + late final __objc_msgSend_153Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_URLResourceDidCancelLoading_1 = - _registerName1("URLResourceDidCancelLoading:"); - late final _sel_URL_resourceDidFailLoadingWithReason_1 = - _registerName1("URL:resourceDidFailLoadingWithReason:"); - void _objc_msgSend_278( + late final _sel_inverseDifference1 = _registerName1("inverseDifference"); + late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = + _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); + ffi.Pointer _objc_msgSend_154( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer reason, + ffi.Pointer other, + int options, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_278( + return __objc_msgSend_154( obj, sel, - sender, - reason, + other, + options, + block, ); } - late final __objc_msgSend_278Ptr = _lookup< + late final __objc_msgSend_154Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = - _registerName1( - "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); - void _objc_msgSend_279( + late final _sel_differenceFromArray_withOptions_1 = + _registerName1("differenceFromArray:withOptions:"); + ffi.Pointer _objc_msgSend_155( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, - ffi.Pointer delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo, + ffi.Pointer other, + int options, ) { - return __objc_msgSend_279( + return __objc_msgSend_155( obj, sel, - error, - recoveryOptionIndex, - delegate, - didRecoverSelector, - contextInfo, + other, + options, ); } - late final __objc_msgSend_279Ptr = _lookup< + late final __objc_msgSend_155Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSUInteger, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_attemptRecoveryFromError_optionIndex_1 = - _registerName1("attemptRecoveryFromError:optionIndex:"); - bool _objc_msgSend_280( + late final _sel_differenceFromArray_1 = + _registerName1("differenceFromArray:"); + ffi.Pointer _objc_msgSend_156( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, + ffi.Pointer other, ) { - return __objc_msgSend_280( + return __objc_msgSend_156( obj, sel, - error, - recoveryOptionIndex, + other, ); } - late final __objc_msgSend_280Ptr = _lookup< + late final __objc_msgSend_156Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final ffi.Pointer _NSFoundationVersionNumber = - _lookup('NSFoundationVersionNumber'); - - double get NSFoundationVersionNumber => _NSFoundationVersionNumber.value; - - set NSFoundationVersionNumber(double value) => - _NSFoundationVersionNumber.value = value; + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSStringFromSelector( - ffi.Pointer aSelector, - ) { - return _NSStringFromSelector( - aSelector, + late final _sel_arrayByApplyingDifference_1 = + _registerName1("arrayByApplyingDifference:"); + ffi.Pointer _objc_msgSend_157( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer difference, + ) { + return __objc_msgSend_157( + obj, + sel, + difference, ); } - late final _NSStringFromSelectorPtr = _lookup< + late final __objc_msgSend_157Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromSelector'); - late final _NSStringFromSelector = _NSStringFromSelectorPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSSelectorFromString( - ffi.Pointer aSelectorName, + late final _sel_getObjects_1 = _registerName1("getObjects:"); + void _objc_msgSend_158( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, ) { - return _NSSelectorFromString( - aSelectorName, + return __objc_msgSend_158( + obj, + sel, + objects, ); } - late final _NSSelectorFromStringPtr = _lookup< + late final __objc_msgSend_158Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSSelectorFromString'); - late final _NSSelectorFromString = _NSSelectorFromStringPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - ffi.Pointer NSStringFromClass( - ffi.Pointer aClass, + late final _sel_arrayWithContentsOfFile_1 = + _registerName1("arrayWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_159( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, ) { - return _NSStringFromClass( - aClass, + return __objc_msgSend_159( + obj, + sel, + path, ); } - late final _NSStringFromClassPtr = _lookup< + late final __objc_msgSend_159Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromClass'); - late final _NSStringFromClass = _NSStringFromClassPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSClassFromString( - ffi.Pointer aClassName, + late final _sel_arrayWithContentsOfURL_1 = + _registerName1("arrayWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_160( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, ) { - return _NSClassFromString( - aClassName, + return __objc_msgSend_160( + obj, + sel, + url, ); } - late final _NSClassFromStringPtr = _lookup< + late final __objc_msgSend_160Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSClassFromString'); - late final _NSClassFromString = _NSClassFromStringPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSStringFromProtocol( - ffi.Pointer proto, + late final _sel_initWithContentsOfFile_1 = + _registerName1("initWithContentsOfFile:"); + late final _sel_initWithContentsOfURL_1 = + _registerName1("initWithContentsOfURL:"); + late final _sel_writeToURL_atomically_1 = + _registerName1("writeToURL:atomically:"); + bool _objc_msgSend_161( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + bool atomically, ) { - return _NSStringFromProtocol( - proto, + return __objc_msgSend_161( + obj, + sel, + url, + atomically, ); } - late final _NSStringFromProtocolPtr = _lookup< + late final __objc_msgSend_161Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromProtocol'); - late final _NSStringFromProtocol = _NSStringFromProtocolPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - ffi.Pointer NSProtocolFromString( - ffi.Pointer namestr, + late final _sel_allKeys1 = _registerName1("allKeys"); + ffi.Pointer _objc_msgSend_162( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSProtocolFromString( - namestr, + return __objc_msgSend_162( + obj, + sel, ); } - late final _NSProtocolFromStringPtr = _lookup< + late final __objc_msgSend_162Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer)>>('NSProtocolFromString'); - late final _NSProtocolFromString = _NSProtocolFromStringPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSGetSizeAndAlignment( - ffi.Pointer typePtr, - ffi.Pointer sizep, - ffi.Pointer alignp, + late final _sel_allKeysForObject_1 = _registerName1("allKeysForObject:"); + late final _sel_allValues1 = _registerName1("allValues"); + late final _sel_descriptionInStringsFileFormat1 = + _registerName1("descriptionInStringsFileFormat"); + late final _sel_isEqualToDictionary_1 = + _registerName1("isEqualToDictionary:"); + bool _objc_msgSend_163( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDictionary, ) { - return _NSGetSizeAndAlignment( - typePtr, - sizep, - alignp, + return __objc_msgSend_163( + obj, + sel, + otherDictionary, ); } - late final _NSGetSizeAndAlignmentPtr = _lookup< + late final __objc_msgSend_163Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('NSGetSizeAndAlignment'); - late final _NSGetSizeAndAlignment = _NSGetSizeAndAlignmentPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - void NSLog( - ffi.Pointer format, + late final _sel_objectsForKeys_notFoundMarker_1 = + _registerName1("objectsForKeys:notFoundMarker:"); + ffi.Pointer _objc_msgSend_164( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer marker, ) { - return _NSLog( - format, + return __objc_msgSend_164( + obj, + sel, + keys, + marker, ); } - late final _NSLogPtr = - _lookup)>>( - 'NSLog'); - late final _NSLog = - _NSLogPtr.asFunction)>(); + late final __objc_msgSend_164Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void NSLogv( - ffi.Pointer format, - va_list args, + late final _sel_keysSortedByValueUsingSelector_1 = + _registerName1("keysSortedByValueUsingSelector:"); + late final _sel_getObjects_andKeys_count_1 = + _registerName1("getObjects:andKeys:count:"); + void _objc_msgSend_165( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ffi.Pointer> keys, + int count, ) { - return _NSLogv( - format, - args, + return __objc_msgSend_165( + obj, + sel, + objects, + keys, + count, ); } - late final _NSLogvPtr = _lookup< + late final __objc_msgSend_165Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, va_list)>>('NSLogv'); - late final _NSLogv = - _NSLogvPtr.asFunction, va_list)>(); - - late final ffi.Pointer _NSNotFound = - _lookup('NSNotFound'); - - int get NSNotFound => _NSNotFound.value; - - set NSNotFound(int value) => _NSNotFound.value = value; + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); - ffi.Pointer _Block_copy1( - ffi.Pointer aBlock, + late final _sel_objectForKeyedSubscript_1 = + _registerName1("objectForKeyedSubscript:"); + late final _sel_enumerateKeysAndObjectsUsingBlock_1 = + _registerName1("enumerateKeysAndObjectsUsingBlock:"); + void _objc_msgSend_166( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return __Block_copy1( - aBlock, + return __objc_msgSend_166( + obj, + sel, + block, ); } - late final __Block_copy1Ptr = _lookup< + late final __objc_msgSend_166Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('_Block_copy'); - late final __Block_copy1 = __Block_copy1Ptr - .asFunction Function(ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - void _Block_release1( - ffi.Pointer aBlock, + late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = + _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); + void _objc_msgSend_167( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __Block_release1( - aBlock, + return __objc_msgSend_167( + obj, + sel, + opts, + block, ); } - late final __Block_release1Ptr = - _lookup)>>( - '_Block_release'); - late final __Block_release1 = - __Block_release1Ptr.asFunction)>(); + late final __objc_msgSend_167Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - void _Block_object_assign( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + late final _sel_keysSortedByValueUsingComparator_1 = + _registerName1("keysSortedByValueUsingComparator:"); + late final _sel_keysSortedByValueWithOptions_usingComparator_1 = + _registerName1("keysSortedByValueWithOptions:usingComparator:"); + late final _sel_keysOfEntriesPassingTest_1 = + _registerName1("keysOfEntriesPassingTest:"); + ffi.Pointer _objc_msgSend_168( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __Block_object_assign( - arg0, - arg1, - arg2, + return __objc_msgSend_168( + obj, + sel, + predicate, ); } - late final __Block_object_assignPtr = _lookup< + late final __objc_msgSend_168Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('_Block_object_assign'); - late final __Block_object_assign = __Block_object_assignPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - void _Block_object_dispose( - ffi.Pointer arg0, - int arg1, + late final _sel_keysOfEntriesWithOptions_passingTest_1 = + _registerName1("keysOfEntriesWithOptions:passingTest:"); + ffi.Pointer _objc_msgSend_169( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + ffi.Pointer<_ObjCBlock> predicate, ) { - return __Block_object_dispose( - arg0, - arg1, + return __objc_msgSend_169( + obj, + sel, + opts, + predicate, ); } - late final __Block_object_disposePtr = _lookup< + late final __objc_msgSend_169Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Int)>>('_Block_object_dispose'); - late final __Block_object_dispose = __Block_object_disposePtr - .asFunction, int)>(); - - late final ffi.Pointer>> - __NSConcreteGlobalBlock = - _lookup>>('_NSConcreteGlobalBlock'); - - ffi.Pointer> get _NSConcreteGlobalBlock => - __NSConcreteGlobalBlock.value; - - set _NSConcreteGlobalBlock(ffi.Pointer> value) => - __NSConcreteGlobalBlock.value = value; - - late final ffi.Pointer>> - __NSConcreteStackBlock = - _lookup>>('_NSConcreteStackBlock'); - - ffi.Pointer> get _NSConcreteStackBlock => - __NSConcreteStackBlock.value; - - set _NSConcreteStackBlock(ffi.Pointer> value) => - __NSConcreteStackBlock.value = value; - - void Debugger() { - return _Debugger(); - } - - late final _DebuggerPtr = - _lookup>('Debugger'); - late final _Debugger = _DebuggerPtr.asFunction(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - void DebugStr( - ConstStr255Param debuggerMsg, + late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); + void _objc_msgSend_170( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> objects, + ffi.Pointer> keys, ) { - return _DebugStr( - debuggerMsg, + return __objc_msgSend_170( + obj, + sel, + objects, + keys, ); } - late final _DebugStrPtr = - _lookup>( - 'DebugStr'); - late final _DebugStr = - _DebugStrPtr.asFunction(); - - void SysBreak() { - return _SysBreak(); - } - - late final _SysBreakPtr = - _lookup>('SysBreak'); - late final _SysBreak = _SysBreakPtr.asFunction(); + late final __objc_msgSend_170Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); - void SysBreakStr( - ConstStr255Param debuggerMsg, + late final _sel_dictionaryWithContentsOfFile_1 = + _registerName1("dictionaryWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_171( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, ) { - return _SysBreakStr( - debuggerMsg, + return __objc_msgSend_171( + obj, + sel, + path, ); } - late final _SysBreakStrPtr = - _lookup>( - 'SysBreakStr'); - late final _SysBreakStr = - _SysBreakStrPtr.asFunction(); + late final __objc_msgSend_171Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void SysBreakFunc( - ConstStr255Param debuggerMsg, + late final _sel_dictionaryWithContentsOfURL_1 = + _registerName1("dictionaryWithContentsOfURL:"); + ffi.Pointer _objc_msgSend_172( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, ) { - return _SysBreakFunc( - debuggerMsg, + return __objc_msgSend_172( + obj, + sel, + url, ); } - late final _SysBreakFuncPtr = - _lookup>( - 'SysBreakFunc'); - late final _SysBreakFunc = - _SysBreakFuncPtr.asFunction(); - - late final ffi.Pointer _kCFCoreFoundationVersionNumber = - _lookup('kCFCoreFoundationVersionNumber'); - - double get kCFCoreFoundationVersionNumber => - _kCFCoreFoundationVersionNumber.value; + late final __objc_msgSend_172Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set kCFCoreFoundationVersionNumber(double value) => - _kCFCoreFoundationVersionNumber.value = value; - - late final ffi.Pointer _kCFNotFound = - _lookup('kCFNotFound'); - - int get kCFNotFound => _kCFNotFound.value; - - set kCFNotFound(int value) => _kCFNotFound.value = value; - - CFRange __CFRangeMake( - int loc, - int len, + late final _sel_dictionary1 = _registerName1("dictionary"); + late final _sel_dictionaryWithObject_forKey_1 = + _registerName1("dictionaryWithObject:forKey:"); + instancetype _objc_msgSend_173( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + ffi.Pointer key, ) { - return ___CFRangeMake( - loc, - len, + return __objc_msgSend_173( + obj, + sel, + object, + key, ); } - late final ___CFRangeMakePtr = - _lookup>( - '__CFRangeMake'); - late final ___CFRangeMake = - ___CFRangeMakePtr.asFunction(); - - int CFNullGetTypeID() { - return _CFNullGetTypeID(); - } - - late final _CFNullGetTypeIDPtr = - _lookup>('CFNullGetTypeID'); - late final _CFNullGetTypeID = - _CFNullGetTypeIDPtr.asFunction(); - - late final ffi.Pointer _kCFNull = _lookup('kCFNull'); - - CFNullRef get kCFNull => _kCFNull.value; - - set kCFNull(CFNullRef value) => _kCFNull.value = value; - - late final ffi.Pointer _kCFAllocatorDefault = - _lookup('kCFAllocatorDefault'); - - CFAllocatorRef get kCFAllocatorDefault => _kCFAllocatorDefault.value; - - set kCFAllocatorDefault(CFAllocatorRef value) => - _kCFAllocatorDefault.value = value; - - late final ffi.Pointer _kCFAllocatorSystemDefault = - _lookup('kCFAllocatorSystemDefault'); - - CFAllocatorRef get kCFAllocatorSystemDefault => - _kCFAllocatorSystemDefault.value; - - set kCFAllocatorSystemDefault(CFAllocatorRef value) => - _kCFAllocatorSystemDefault.value = value; - - late final ffi.Pointer _kCFAllocatorMalloc = - _lookup('kCFAllocatorMalloc'); - - CFAllocatorRef get kCFAllocatorMalloc => _kCFAllocatorMalloc.value; - - set kCFAllocatorMalloc(CFAllocatorRef value) => - _kCFAllocatorMalloc.value = value; - - late final ffi.Pointer _kCFAllocatorMallocZone = - _lookup('kCFAllocatorMallocZone'); - - CFAllocatorRef get kCFAllocatorMallocZone => _kCFAllocatorMallocZone.value; - - set kCFAllocatorMallocZone(CFAllocatorRef value) => - _kCFAllocatorMallocZone.value = value; - - late final ffi.Pointer _kCFAllocatorNull = - _lookup('kCFAllocatorNull'); - - CFAllocatorRef get kCFAllocatorNull => _kCFAllocatorNull.value; - - set kCFAllocatorNull(CFAllocatorRef value) => _kCFAllocatorNull.value = value; - - late final ffi.Pointer _kCFAllocatorUseContext = - _lookup('kCFAllocatorUseContext'); - - CFAllocatorRef get kCFAllocatorUseContext => _kCFAllocatorUseContext.value; - - set kCFAllocatorUseContext(CFAllocatorRef value) => - _kCFAllocatorUseContext.value = value; - - int CFAllocatorGetTypeID() { - return _CFAllocatorGetTypeID(); - } - - late final _CFAllocatorGetTypeIDPtr = - _lookup>('CFAllocatorGetTypeID'); - late final _CFAllocatorGetTypeID = - _CFAllocatorGetTypeIDPtr.asFunction(); + late final __objc_msgSend_173Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void CFAllocatorSetDefault( - CFAllocatorRef allocator, + late final _sel_dictionaryWithObjects_forKeys_count_1 = + _registerName1("dictionaryWithObjects:forKeys:count:"); + late final _sel_dictionaryWithObjectsAndKeys_1 = + _registerName1("dictionaryWithObjectsAndKeys:"); + late final _sel_dictionaryWithDictionary_1 = + _registerName1("dictionaryWithDictionary:"); + instancetype _objc_msgSend_174( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dict, ) { - return _CFAllocatorSetDefault( - allocator, + return __objc_msgSend_174( + obj, + sel, + dict, ); } - late final _CFAllocatorSetDefaultPtr = - _lookup>( - 'CFAllocatorSetDefault'); - late final _CFAllocatorSetDefault = - _CFAllocatorSetDefaultPtr.asFunction(); - - CFAllocatorRef CFAllocatorGetDefault() { - return _CFAllocatorGetDefault(); - } - - late final _CFAllocatorGetDefaultPtr = - _lookup>( - 'CFAllocatorGetDefault'); - late final _CFAllocatorGetDefault = - _CFAllocatorGetDefaultPtr.asFunction(); + late final __objc_msgSend_174Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - CFAllocatorRef CFAllocatorCreate( - CFAllocatorRef allocator, - ffi.Pointer context, + late final _sel_dictionaryWithObjects_forKeys_1 = + _registerName1("dictionaryWithObjects:forKeys:"); + instancetype _objc_msgSend_175( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer objects, + ffi.Pointer keys, ) { - return _CFAllocatorCreate( - allocator, - context, + return __objc_msgSend_175( + obj, + sel, + objects, + keys, ); } - late final _CFAllocatorCreatePtr = _lookup< + late final __objc_msgSend_175Ptr = _lookup< ffi.NativeFunction< - CFAllocatorRef Function(CFAllocatorRef, - ffi.Pointer)>>('CFAllocatorCreate'); - late final _CFAllocatorCreate = _CFAllocatorCreatePtr.asFunction< - CFAllocatorRef Function( - CFAllocatorRef, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer CFAllocatorAllocate( - CFAllocatorRef allocator, - int size, - int hint, + late final _sel_initWithObjectsAndKeys_1 = + _registerName1("initWithObjectsAndKeys:"); + late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); + late final _sel_initWithDictionary_copyItems_1 = + _registerName1("initWithDictionary:copyItems:"); + instancetype _objc_msgSend_176( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDictionary, + bool flag, ) { - return _CFAllocatorAllocate( - allocator, - size, - hint, + return __objc_msgSend_176( + obj, + sel, + otherDictionary, + flag, ); } - late final _CFAllocatorAllocatePtr = _lookup< + late final __objc_msgSend_176Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef, CFIndex, CFOptionFlags)>>('CFAllocatorAllocate'); - late final _CFAllocatorAllocate = _CFAllocatorAllocatePtr.asFunction< - ffi.Pointer Function(CFAllocatorRef, int, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - ffi.Pointer CFAllocatorReallocate( - CFAllocatorRef allocator, - ffi.Pointer ptr, - int newsize, - int hint, + late final _sel_initWithObjects_forKeys_1 = + _registerName1("initWithObjects:forKeys:"); + ffi.Pointer _objc_msgSend_177( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer> error, ) { - return _CFAllocatorReallocate( - allocator, - ptr, - newsize, - hint, + return __objc_msgSend_177( + obj, + sel, + url, + error, ); } - late final _CFAllocatorReallocatePtr = _lookup< + late final __objc_msgSend_177Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer, - CFIndex, CFOptionFlags)>>('CFAllocatorReallocate'); - late final _CFAllocatorReallocate = _CFAllocatorReallocatePtr.asFunction< - ffi.Pointer Function( - CFAllocatorRef, ffi.Pointer, int, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - void CFAllocatorDeallocate( - CFAllocatorRef allocator, - ffi.Pointer ptr, + late final _sel_dictionaryWithContentsOfURL_error_1 = + _registerName1("dictionaryWithContentsOfURL:error:"); + late final _sel_sharedKeySetForKeys_1 = + _registerName1("sharedKeySetForKeys:"); + late final _sel_countByEnumeratingWithState_objects_count_1 = + _registerName1("countByEnumeratingWithState:objects:count:"); + int _objc_msgSend_178( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer state, + ffi.Pointer> buffer, + int len, ) { - return _CFAllocatorDeallocate( - allocator, - ptr, + return __objc_msgSend_178( + obj, + sel, + state, + buffer, + len, ); } - late final _CFAllocatorDeallocatePtr = _lookup< + late final __objc_msgSend_178Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, ffi.Pointer)>>('CFAllocatorDeallocate'); - late final _CFAllocatorDeallocate = _CFAllocatorDeallocatePtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer)>(); + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); - int CFAllocatorGetPreferredSizeForSize( - CFAllocatorRef allocator, - int size, - int hint, + late final _sel_initWithDomain_code_userInfo_1 = + _registerName1("initWithDomain:code:userInfo:"); + instancetype _objc_msgSend_179( + ffi.Pointer obj, + ffi.Pointer sel, + NSErrorDomain domain, + int code, + ffi.Pointer dict, ) { - return _CFAllocatorGetPreferredSizeForSize( - allocator, - size, - hint, + return __objc_msgSend_179( + obj, + sel, + domain, + code, + dict, ); } - late final _CFAllocatorGetPreferredSizeForSizePtr = _lookup< + late final __objc_msgSend_179Ptr = _lookup< ffi.NativeFunction< - CFIndex Function(CFAllocatorRef, CFIndex, - CFOptionFlags)>>('CFAllocatorGetPreferredSizeForSize'); - late final _CFAllocatorGetPreferredSizeForSize = - _CFAllocatorGetPreferredSizeForSizePtr.asFunction< - int Function(CFAllocatorRef, int, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSErrorDomain, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, int, ffi.Pointer)>(); - void CFAllocatorGetContext( - CFAllocatorRef allocator, - ffi.Pointer context, + late final _sel_errorWithDomain_code_userInfo_1 = + _registerName1("errorWithDomain:code:userInfo:"); + late final _sel_domain1 = _registerName1("domain"); + late final _sel_code1 = _registerName1("code"); + late final _sel_userInfo1 = _registerName1("userInfo"); + ffi.Pointer _objc_msgSend_180( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _CFAllocatorGetContext( - allocator, - context, + return __objc_msgSend_180( + obj, + sel, ); } - late final _CFAllocatorGetContextPtr = _lookup< + late final __objc_msgSend_180Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, - ffi.Pointer)>>('CFAllocatorGetContext'); - late final _CFAllocatorGetContext = _CFAllocatorGetContextPtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int CFGetTypeID( - CFTypeRef cf, + late final _sel_localizedDescription1 = + _registerName1("localizedDescription"); + late final _sel_localizedFailureReason1 = + _registerName1("localizedFailureReason"); + late final _sel_localizedRecoverySuggestion1 = + _registerName1("localizedRecoverySuggestion"); + late final _sel_localizedRecoveryOptions1 = + _registerName1("localizedRecoveryOptions"); + late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); + late final _sel_helpAnchor1 = _registerName1("helpAnchor"); + late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); + late final _sel_setUserInfoValueProviderForDomain_provider_1 = + _registerName1("setUserInfoValueProviderForDomain:provider:"); + void _objc_msgSend_181( + ffi.Pointer obj, + ffi.Pointer sel, + NSErrorDomain errorDomain, + ffi.Pointer<_ObjCBlock> provider, ) { - return _CFGetTypeID( - cf, + return __objc_msgSend_181( + obj, + sel, + errorDomain, + provider, ); } - late final _CFGetTypeIDPtr = - _lookup>('CFGetTypeID'); - late final _CFGetTypeID = - _CFGetTypeIDPtr.asFunction(); + late final __objc_msgSend_181Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSErrorDomain, ffi.Pointer<_ObjCBlock>)>(); - CFStringRef CFCopyTypeIDDescription( - int type_id, + late final _sel_userInfoValueProviderForDomain_1 = + _registerName1("userInfoValueProviderForDomain:"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_182( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer err, + NSErrorUserInfoKey userInfoKey, + NSErrorDomain errorDomain, ) { - return _CFCopyTypeIDDescription( - type_id, + return __objc_msgSend_182( + obj, + sel, + err, + userInfoKey, + errorDomain, ); } - late final _CFCopyTypeIDDescriptionPtr = - _lookup>( - 'CFCopyTypeIDDescription'); - late final _CFCopyTypeIDDescription = - _CFCopyTypeIDDescriptionPtr.asFunction(); + late final __objc_msgSend_182Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSErrorUserInfoKey, + NSErrorDomain)>>('objc_msgSend'); + late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSErrorUserInfoKey, + NSErrorDomain)>(); - CFTypeRef CFRetain( - CFTypeRef cf, + late final _sel_checkResourceIsReachableAndReturnError_1 = + _registerName1("checkResourceIsReachableAndReturnError:"); + bool _objc_msgSend_183( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> error, ) { - return _CFRetain( - cf, + return __objc_msgSend_183( + obj, + sel, + error, ); } - late final _CFRetainPtr = - _lookup>('CFRetain'); - late final _CFRetain = - _CFRetainPtr.asFunction(); + late final __objc_msgSend_183Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - void CFRelease( - CFTypeRef cf, + late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); + late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); + late final _sel_filePathURL1 = _registerName1("filePathURL"); + late final _sel_getResourceValue_forKey_error_1 = + _registerName1("getResourceValue:forKey:error:"); + bool _objc_msgSend_184( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error, ) { - return _CFRelease( - cf, + return __objc_msgSend_184( + obj, + sel, + value, + key, + error, ); } - late final _CFReleasePtr = - _lookup>('CFRelease'); - late final _CFRelease = _CFReleasePtr.asFunction(); + late final __objc_msgSend_184Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSURLResourceKey, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSURLResourceKey, + ffi.Pointer>)>(); - CFTypeRef CFAutorelease( - CFTypeRef arg, + late final _sel_resourceValuesForKeys_error_1 = + _registerName1("resourceValuesForKeys:error:"); + ffi.Pointer _objc_msgSend_185( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer> error, ) { - return _CFAutorelease( - arg, + return __objc_msgSend_185( + obj, + sel, + keys, + error, ); } - late final _CFAutoreleasePtr = - _lookup>( - 'CFAutorelease'); - late final _CFAutorelease = - _CFAutoreleasePtr.asFunction(); + late final __objc_msgSend_185Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - int CFGetRetainCount( - CFTypeRef cf, + late final _sel_setResourceValue_forKey_error_1 = + _registerName1("setResourceValue:forKey:error:"); + bool _objc_msgSend_186( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + NSURLResourceKey key, + ffi.Pointer> error, ) { - return _CFGetRetainCount( - cf, + return __objc_msgSend_186( + obj, + sel, + value, + key, + error, ); } - late final _CFGetRetainCountPtr = - _lookup>( - 'CFGetRetainCount'); - late final _CFGetRetainCount = - _CFGetRetainCountPtr.asFunction(); + late final __objc_msgSend_186Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLResourceKey, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLResourceKey, + ffi.Pointer>)>(); - int CFEqual( - CFTypeRef cf1, - CFTypeRef cf2, + late final _sel_setResourceValues_error_1 = + _registerName1("setResourceValues:error:"); + bool _objc_msgSend_187( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyedValues, + ffi.Pointer> error, ) { - return _CFEqual( - cf1, - cf2, + return __objc_msgSend_187( + obj, + sel, + keyedValues, + error, ); } - late final _CFEqualPtr = - _lookup>( - 'CFEqual'); - late final _CFEqual = - _CFEqualPtr.asFunction(); + late final __objc_msgSend_187Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - int CFHash( - CFTypeRef cf, + late final _sel_removeCachedResourceValueForKey_1 = + _registerName1("removeCachedResourceValueForKey:"); + void _objc_msgSend_188( + ffi.Pointer obj, + ffi.Pointer sel, + NSURLResourceKey key, ) { - return _CFHash( - cf, + return __objc_msgSend_188( + obj, + sel, + key, ); } - late final _CFHashPtr = - _lookup>('CFHash'); - late final _CFHash = _CFHashPtr.asFunction(); + late final __objc_msgSend_188Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSURLResourceKey)>>('objc_msgSend'); + late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, NSURLResourceKey)>(); - CFStringRef CFCopyDescription( - CFTypeRef cf, + late final _sel_removeAllCachedResourceValues1 = + _registerName1("removeAllCachedResourceValues"); + late final _sel_setTemporaryResourceValue_forKey_1 = + _registerName1("setTemporaryResourceValue:forKey:"); + void _objc_msgSend_189( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + NSURLResourceKey key, ) { - return _CFCopyDescription( - cf, + return __objc_msgSend_189( + obj, + sel, + value, + key, ); } - late final _CFCopyDescriptionPtr = - _lookup>( - 'CFCopyDescription'); - late final _CFCopyDescription = - _CFCopyDescriptionPtr.asFunction(); + late final __objc_msgSend_189Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSURLResourceKey)>>('objc_msgSend'); + late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSURLResourceKey)>(); - CFAllocatorRef CFGetAllocator( - CFTypeRef cf, + late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = + _registerName1( + "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); + ffi.Pointer _objc_msgSend_190( + ffi.Pointer obj, + ffi.Pointer sel, + int options, + ffi.Pointer keys, + ffi.Pointer relativeURL, + ffi.Pointer> error, ) { - return _CFGetAllocator( - cf, + return __objc_msgSend_190( + obj, + sel, + options, + keys, + relativeURL, + error, ); } - late final _CFGetAllocatorPtr = - _lookup>( - 'CFGetAllocator'); - late final _CFGetAllocator = - _CFGetAllocatorPtr.asFunction(); + late final __objc_msgSend_190Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - CFTypeRef CFMakeCollectable( - CFTypeRef cf, + late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = + _registerName1( + "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); + instancetype _objc_msgSend_191( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bookmarkData, + int options, + ffi.Pointer relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error, ) { - return _CFMakeCollectable( - cf, + return __objc_msgSend_191( + obj, + sel, + bookmarkData, + options, + relativeURL, + isStale, + error, ); } - late final _CFMakeCollectablePtr = - _lookup>( - 'CFMakeCollectable'); - late final _CFMakeCollectable = - _CFMakeCollectablePtr.asFunction(); - - ffi.Pointer NSDefaultMallocZone() { - return _NSDefaultMallocZone(); - } - - late final _NSDefaultMallocZonePtr = - _lookup Function()>>( - 'NSDefaultMallocZone'); - late final _NSDefaultMallocZone = - _NSDefaultMallocZonePtr.asFunction Function()>(); + late final __objc_msgSend_191Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - ffi.Pointer NSCreateZone( - int startSize, - int granularity, - bool canFree, + late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = + _registerName1( + "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); + late final _sel_resourceValuesForKeys_fromBookmarkData_1 = + _registerName1("resourceValuesForKeys:fromBookmarkData:"); + ffi.Pointer _objc_msgSend_192( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keys, + ffi.Pointer bookmarkData, ) { - return _NSCreateZone( - startSize, - granularity, - canFree, + return __objc_msgSend_192( + obj, + sel, + keys, + bookmarkData, ); } - late final _NSCreateZonePtr = _lookup< + late final __objc_msgSend_192Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - NSUInteger, NSUInteger, ffi.Bool)>>('NSCreateZone'); - late final _NSCreateZone = _NSCreateZonePtr.asFunction< - ffi.Pointer Function(int, int, bool)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void NSRecycleZone( - ffi.Pointer zone, + late final _sel_writeBookmarkData_toURL_options_error_1 = + _registerName1("writeBookmarkData:toURL:options:error:"); + bool _objc_msgSend_193( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bookmarkData, + ffi.Pointer bookmarkFileURL, + int options, + ffi.Pointer> error, ) { - return _NSRecycleZone( - zone, + return __objc_msgSend_193( + obj, + sel, + bookmarkData, + bookmarkFileURL, + options, + error, ); } - late final _NSRecycleZonePtr = - _lookup)>>( - 'NSRecycleZone'); - late final _NSRecycleZone = - _NSRecycleZonePtr.asFunction)>(); + late final __objc_msgSend_193Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSURLBookmarkFileCreationOptions, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - void NSSetZoneName( - ffi.Pointer zone, - ffi.Pointer name, + late final _sel_bookmarkDataWithContentsOfURL_error_1 = + _registerName1("bookmarkDataWithContentsOfURL:error:"); + ffi.Pointer _objc_msgSend_194( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bookmarkFileURL, + ffi.Pointer> error, ) { - return _NSSetZoneName( - zone, - name, + return __objc_msgSend_194( + obj, + sel, + bookmarkFileURL, + error, ); } - late final _NSSetZoneNamePtr = _lookup< + late final __objc_msgSend_194Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('NSSetZoneName'); - late final _NSSetZoneName = _NSSetZoneNamePtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - ffi.Pointer NSZoneName( - ffi.Pointer zone, + late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = + _registerName1("URLByResolvingAliasFileAtURL:options:error:"); + instancetype _objc_msgSend_195( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int options, + ffi.Pointer> error, ) { - return _NSZoneName( - zone, + return __objc_msgSend_195( + obj, + sel, + url, + options, + error, ); } - late final _NSZoneNamePtr = _lookup< + late final __objc_msgSend_195Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('NSZoneName'); - late final _NSZoneName = _NSZoneNamePtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - ffi.Pointer NSZoneFromPointer( - ffi.Pointer ptr, + late final _sel_startAccessingSecurityScopedResource1 = + _registerName1("startAccessingSecurityScopedResource"); + late final _sel_stopAccessingSecurityScopedResource1 = + _registerName1("stopAccessingSecurityScopedResource"); + late final _sel_getPromisedItemResourceValue_forKey_error_1 = + _registerName1("getPromisedItemResourceValue:forKey:error:"); + late final _sel_promisedItemResourceValuesForKeys_error_1 = + _registerName1("promisedItemResourceValuesForKeys:error:"); + late final _sel_checkPromisedItemIsReachableAndReturnError_1 = + _registerName1("checkPromisedItemIsReachableAndReturnError:"); + late final _sel_fileURLWithPathComponents_1 = + _registerName1("fileURLWithPathComponents:"); + ffi.Pointer _objc_msgSend_196( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer components, ) { - return _NSZoneFromPointer( - ptr, + return __objc_msgSend_196( + obj, + sel, + components, ); } - late final _NSZoneFromPointerPtr = _lookup< + late final __objc_msgSend_196Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSZoneFromPointer'); - late final _NSZoneFromPointer = _NSZoneFromPointerPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSZoneMalloc( - ffi.Pointer zone, - int size, + late final _sel_pathComponents1 = _registerName1("pathComponents"); + late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); + late final _sel_pathExtension1 = _registerName1("pathExtension"); + late final _sel_URLByAppendingPathComponent_1 = + _registerName1("URLByAppendingPathComponent:"); + late final _sel_URLByAppendingPathComponent_isDirectory_1 = + _registerName1("URLByAppendingPathComponent:isDirectory:"); + late final _sel_URLByDeletingLastPathComponent1 = + _registerName1("URLByDeletingLastPathComponent"); + late final _sel_URLByAppendingPathExtension_1 = + _registerName1("URLByAppendingPathExtension:"); + late final _sel_URLByDeletingPathExtension1 = + _registerName1("URLByDeletingPathExtension"); + late final _sel_URLByStandardizingPath1 = + _registerName1("URLByStandardizingPath"); + late final _sel_URLByResolvingSymlinksInPath1 = + _registerName1("URLByResolvingSymlinksInPath"); + late final _sel_resourceDataUsingCache_1 = + _registerName1("resourceDataUsingCache:"); + ffi.Pointer _objc_msgSend_197( + ffi.Pointer obj, + ffi.Pointer sel, + bool shouldUseCache, ) { - return _NSZoneMalloc( - zone, - size, + return __objc_msgSend_197( + obj, + sel, + shouldUseCache, ); } - late final _NSZoneMallocPtr = _lookup< + late final __objc_msgSend_197Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, NSUInteger)>>('NSZoneMalloc'); - late final _NSZoneMalloc = _NSZoneMallocPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); - ffi.Pointer NSZoneCalloc( - ffi.Pointer zone, - int numElems, - int byteSize, + late final _sel_loadResourceDataNotifyingClient_usingCache_1 = + _registerName1("loadResourceDataNotifyingClient:usingCache:"); + void _objc_msgSend_198( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer client, + bool shouldUseCache, ) { - return _NSZoneCalloc( - zone, - numElems, - byteSize, + return __objc_msgSend_198( + obj, + sel, + client, + shouldUseCache, ); } - late final _NSZoneCallocPtr = _lookup< + late final __objc_msgSend_198Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, NSUInteger, NSUInteger)>>('NSZoneCalloc'); - late final _NSZoneCalloc = _NSZoneCallocPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - ffi.Pointer NSZoneRealloc( - ffi.Pointer zone, - ffi.Pointer ptr, - int size, + late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); + late final _sel_setResourceData_1 = _registerName1("setResourceData:"); + late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); + bool _objc_msgSend_199( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer property, + ffi.Pointer propertyKey, ) { - return _NSZoneRealloc( - zone, - ptr, - size, + return __objc_msgSend_199( + obj, + sel, + property, + propertyKey, ); } - late final _NSZoneReallocPtr = _lookup< + late final __objc_msgSend_199Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('NSZoneRealloc'); - late final _NSZoneRealloc = _NSZoneReallocPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void NSZoneFree( - ffi.Pointer zone, - ffi.Pointer ptr, + late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); + late final _sel_registerURLHandleClass_1 = + _registerName1("registerURLHandleClass:"); + void _objc_msgSend_200( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURLHandleSubclass, ) { - return _NSZoneFree( - zone, - ptr, + return __objc_msgSend_200( + obj, + sel, + anURLHandleSubclass, ); } - late final _NSZoneFreePtr = _lookup< + late final __objc_msgSend_200Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('NSZoneFree'); - late final _NSZoneFree = _NSZoneFreePtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer NSAllocateCollectable( - int size, - int options, + late final _sel_URLHandleClassForURL_1 = + _registerName1("URLHandleClassForURL:"); + ffi.Pointer _objc_msgSend_201( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, ) { - return _NSAllocateCollectable( - size, - options, + return __objc_msgSend_201( + obj, + sel, + anURL, ); } - late final _NSAllocateCollectablePtr = _lookup< + late final __objc_msgSend_201Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - NSUInteger, NSUInteger)>>('NSAllocateCollectable'); - late final _NSAllocateCollectable = _NSAllocateCollectablePtr.asFunction< - ffi.Pointer Function(int, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSReallocateCollectable( - ffi.Pointer ptr, - int size, - int options, + late final _sel_status1 = _registerName1("status"); + int _objc_msgSend_202( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _NSReallocateCollectable( - ptr, - size, - options, + return __objc_msgSend_202( + obj, + sel, ); } - late final _NSReallocateCollectablePtr = _lookup< + late final __objc_msgSend_202Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, NSUInteger, - NSUInteger)>>('NSReallocateCollectable'); - late final _NSReallocateCollectable = _NSReallocateCollectablePtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); - - int NSPageSize() { - return _NSPageSize(); - } - - late final _NSPageSizePtr = - _lookup>('NSPageSize'); - late final _NSPageSize = _NSPageSizePtr.asFunction(); - - int NSLogPageSize() { - return _NSLogPageSize(); - } - - late final _NSLogPageSizePtr = - _lookup>('NSLogPageSize'); - late final _NSLogPageSize = _NSLogPageSizePtr.asFunction(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int NSRoundUpToMultipleOfPageSize( - int bytes, + late final _sel_failureReason1 = _registerName1("failureReason"); + late final _sel_addClient_1 = _registerName1("addClient:"); + late final _sel_removeClient_1 = _registerName1("removeClient:"); + late final _sel_loadInBackground1 = _registerName1("loadInBackground"); + late final _sel_cancelLoadInBackground1 = + _registerName1("cancelLoadInBackground"); + late final _sel_resourceData1 = _registerName1("resourceData"); + late final _sel_availableResourceData1 = + _registerName1("availableResourceData"); + late final _sel_expectedResourceDataSize1 = + _registerName1("expectedResourceDataSize"); + late final _sel_flushCachedData1 = _registerName1("flushCachedData"); + late final _sel_backgroundLoadDidFailWithReason_1 = + _registerName1("backgroundLoadDidFailWithReason:"); + late final _sel_didLoadBytes_loadComplete_1 = + _registerName1("didLoadBytes:loadComplete:"); + void _objc_msgSend_203( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer newBytes, + bool yorn, ) { - return _NSRoundUpToMultipleOfPageSize( - bytes, + return __objc_msgSend_203( + obj, + sel, + newBytes, + yorn, ); } - late final _NSRoundUpToMultipleOfPageSizePtr = - _lookup>( - 'NSRoundUpToMultipleOfPageSize'); - late final _NSRoundUpToMultipleOfPageSize = - _NSRoundUpToMultipleOfPageSizePtr.asFunction(); + late final __objc_msgSend_203Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - int NSRoundDownToMultipleOfPageSize( - int bytes, + late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); + bool _objc_msgSend_204( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, ) { - return _NSRoundDownToMultipleOfPageSize( - bytes, + return __objc_msgSend_204( + obj, + sel, + anURL, ); } - late final _NSRoundDownToMultipleOfPageSizePtr = - _lookup>( - 'NSRoundDownToMultipleOfPageSize'); - late final _NSRoundDownToMultipleOfPageSize = - _NSRoundDownToMultipleOfPageSizePtr.asFunction(); + late final __objc_msgSend_204Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer NSAllocateMemoryPages( - int bytes, + late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); + ffi.Pointer _objc_msgSend_205( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, ) { - return _NSAllocateMemoryPages( - bytes, + return __objc_msgSend_205( + obj, + sel, + anURL, ); } - late final _NSAllocateMemoryPagesPtr = - _lookup Function(NSUInteger)>>( - 'NSAllocateMemoryPages'); - late final _NSAllocateMemoryPages = _NSAllocateMemoryPagesPtr.asFunction< - ffi.Pointer Function(int)>(); + late final __objc_msgSend_205Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - void NSDeallocateMemoryPages( - ffi.Pointer ptr, - int bytes, + late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); + ffi.Pointer _objc_msgSend_206( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anURL, + bool willCache, ) { - return _NSDeallocateMemoryPages( - ptr, - bytes, + return __objc_msgSend_206( + obj, + sel, + anURL, + willCache, ); } - late final _NSDeallocateMemoryPagesPtr = _lookup< + late final __objc_msgSend_206Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, NSUInteger)>>('NSDeallocateMemoryPages'); - late final _NSDeallocateMemoryPages = _NSDeallocateMemoryPagesPtr.asFunction< - void Function(ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); - void NSCopyMemoryPages( - ffi.Pointer source, - ffi.Pointer dest, - int bytes, + late final _sel_propertyForKeyIfAvailable_1 = + _registerName1("propertyForKeyIfAvailable:"); + late final _sel_writeProperty_forKey_1 = + _registerName1("writeProperty:forKey:"); + late final _sel_writeData_1 = _registerName1("writeData:"); + late final _sel_loadInForeground1 = _registerName1("loadInForeground"); + late final _sel_beginLoadInBackground1 = + _registerName1("beginLoadInBackground"); + late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); + late final _sel_URLHandleUsingCache_1 = + _registerName1("URLHandleUsingCache:"); + ffi.Pointer _objc_msgSend_207( + ffi.Pointer obj, + ffi.Pointer sel, + bool shouldUseCache, ) { - return _NSCopyMemoryPages( - source, - dest, - bytes, + return __objc_msgSend_207( + obj, + sel, + shouldUseCache, ); } - late final _NSCopyMemoryPagesPtr = _lookup< + late final __objc_msgSend_207Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('NSCopyMemoryPages'); - late final _NSCopyMemoryPages = _NSCopyMemoryPagesPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - int NSRealMemoryAvailable() { - return _NSRealMemoryAvailable(); - } - - late final _NSRealMemoryAvailablePtr = - _lookup>( - 'NSRealMemoryAvailable'); - late final _NSRealMemoryAvailable = - _NSRealMemoryAvailablePtr.asFunction(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, bool)>(); - ffi.Pointer NSAllocateObject( - ffi.Pointer aClass, - int extraBytes, - ffi.Pointer zone, + late final _sel_writeToFile_options_error_1 = + _registerName1("writeToFile:options:error:"); + bool _objc_msgSend_208( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + int writeOptionsMask, + ffi.Pointer> errorPtr, ) { - return _NSAllocateObject( - aClass, - extraBytes, - zone, + return __objc_msgSend_208( + obj, + sel, + path, + writeOptionsMask, + errorPtr, ); } - late final _NSAllocateObjectPtr = _lookup< + late final __objc_msgSend_208Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, NSUInteger, - ffi.Pointer)>>('NSAllocateObject'); - late final _NSAllocateObject = _NSAllocateObjectPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - void NSDeallocateObject( - ffi.Pointer object, + late final _sel_writeToURL_options_error_1 = + _registerName1("writeToURL:options:error:"); + bool _objc_msgSend_209( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int writeOptionsMask, + ffi.Pointer> errorPtr, ) { - return _NSDeallocateObject( - object, + return __objc_msgSend_209( + obj, + sel, + url, + writeOptionsMask, + errorPtr, ); } - late final _NSDeallocateObjectPtr = - _lookup)>>( - 'NSDeallocateObject'); - late final _NSDeallocateObject = _NSDeallocateObjectPtr.asFunction< - void Function(ffi.Pointer)>(); + late final __objc_msgSend_209Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - ffi.Pointer NSCopyObject( - ffi.Pointer object, - int extraBytes, - ffi.Pointer zone, + late final _sel_rangeOfData_options_range_1 = + _registerName1("rangeOfData:options:range:"); + NSRange _objc_msgSend_210( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer dataToFind, + int mask, + NSRange searchRange, ) { - return _NSCopyObject( - object, - extraBytes, - zone, + return __objc_msgSend_210( + obj, + sel, + dataToFind, + mask, + searchRange, ); } - late final _NSCopyObjectPtr = _lookup< + late final __objc_msgSend_210Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, NSUInteger, - ffi.Pointer)>>('NSCopyObject'); - late final _NSCopyObject = _NSCopyObjectPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - bool NSShouldRetainWithZone( - ffi.Pointer anObject, - ffi.Pointer requestedZone, + late final _sel_enumerateByteRangesUsingBlock_1 = + _registerName1("enumerateByteRangesUsingBlock:"); + void _objc_msgSend_211( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return _NSShouldRetainWithZone( - anObject, - requestedZone, + return __objc_msgSend_211( + obj, + sel, + block, ); } - late final _NSShouldRetainWithZonePtr = _lookup< + late final __objc_msgSend_211Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer)>>('NSShouldRetainWithZone'); - late final _NSShouldRetainWithZone = _NSShouldRetainWithZonePtr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - void NSIncrementExtraRefCount( - ffi.Pointer object, + late final _sel_data1 = _registerName1("data"); + late final _sel_dataWithBytes_length_1 = + _registerName1("dataWithBytes:length:"); + instancetype _objc_msgSend_212( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, ) { - return _NSIncrementExtraRefCount( - object, + return __objc_msgSend_212( + obj, + sel, + bytes, + length, ); } - late final _NSIncrementExtraRefCountPtr = - _lookup)>>( - 'NSIncrementExtraRefCount'); - late final _NSIncrementExtraRefCount = _NSIncrementExtraRefCountPtr - .asFunction)>(); + late final __objc_msgSend_212Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - bool NSDecrementExtraRefCountWasZero( - ffi.Pointer object, + late final _sel_dataWithBytesNoCopy_length_1 = + _registerName1("dataWithBytesNoCopy:length:"); + late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = + _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); + instancetype _objc_msgSend_213( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, + bool b, ) { - return _NSDecrementExtraRefCountWasZero( - object, + return __objc_msgSend_213( + obj, + sel, + bytes, + length, + b, ); } - late final _NSDecrementExtraRefCountWasZeroPtr = - _lookup)>>( - 'NSDecrementExtraRefCountWasZero'); - late final _NSDecrementExtraRefCountWasZero = - _NSDecrementExtraRefCountWasZeroPtr.asFunction< - bool Function(ffi.Pointer)>(); - - int NSExtraRefCount( - ffi.Pointer object, - ) { - return _NSExtraRefCount( - object, - ); - } - - late final _NSExtraRefCountPtr = - _lookup)>>( - 'NSExtraRefCount'); - late final _NSExtraRefCount = - _NSExtraRefCountPtr.asFunction)>(); - - NSRange NSUnionRange( - NSRange range1, - NSRange range2, - ) { - return _NSUnionRange( - range1, - range2, - ); - } - - late final _NSUnionRangePtr = - _lookup>( - 'NSUnionRange'); - late final _NSUnionRange = - _NSUnionRangePtr.asFunction(); + late final __objc_msgSend_213Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, bool)>(); - NSRange NSIntersectionRange( - NSRange range1, - NSRange range2, + late final _sel_dataWithContentsOfFile_options_error_1 = + _registerName1("dataWithContentsOfFile:options:error:"); + instancetype _objc_msgSend_214( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, + int readOptionsMask, + ffi.Pointer> errorPtr, ) { - return _NSIntersectionRange( - range1, - range2, + return __objc_msgSend_214( + obj, + sel, + path, + readOptionsMask, + errorPtr, ); } - late final _NSIntersectionRangePtr = - _lookup>( - 'NSIntersectionRange'); - late final _NSIntersectionRange = - _NSIntersectionRangePtr.asFunction(); + late final __objc_msgSend_214Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - ffi.Pointer NSStringFromRange( - NSRange range, + late final _sel_dataWithContentsOfURL_options_error_1 = + _registerName1("dataWithContentsOfURL:options:error:"); + instancetype _objc_msgSend_215( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int readOptionsMask, + ffi.Pointer> errorPtr, ) { - return _NSStringFromRange( - range, + return __objc_msgSend_215( + obj, + sel, + url, + readOptionsMask, + errorPtr, ); } - late final _NSStringFromRangePtr = - _lookup Function(NSRange)>>( - 'NSStringFromRange'); - late final _NSStringFromRange = _NSStringFromRangePtr.asFunction< - ffi.Pointer Function(NSRange)>(); + late final __objc_msgSend_215Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - NSRange NSRangeFromString( - ffi.Pointer aString, + late final _sel_dataWithContentsOfFile_1 = + _registerName1("dataWithContentsOfFile:"); + late final _sel_dataWithContentsOfURL_1 = + _registerName1("dataWithContentsOfURL:"); + late final _sel_initWithBytes_length_1 = + _registerName1("initWithBytes:length:"); + late final _sel_initWithBytesNoCopy_length_1 = + _registerName1("initWithBytesNoCopy:length:"); + late final _sel_initWithBytesNoCopy_length_freeWhenDone_1 = + _registerName1("initWithBytesNoCopy:length:freeWhenDone:"); + late final _sel_initWithBytesNoCopy_length_deallocator_1 = + _registerName1("initWithBytesNoCopy:length:deallocator:"); + instancetype _objc_msgSend_216( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer bytes, + int length, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return _NSRangeFromString( - aString, + return __objc_msgSend_216( + obj, + sel, + bytes, + length, + deallocator, ); } - late final _NSRangeFromStringPtr = - _lookup)>>( - 'NSRangeFromString'); - late final _NSRangeFromString = _NSRangeFromStringPtr.asFunction< - NSRange Function(ffi.Pointer)>(); + late final __objc_msgSend_216Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _class_NSMutableIndexSet1 = _getClass1("NSMutableIndexSet"); - late final _sel_addIndexes_1 = _registerName1("addIndexes:"); - void _objc_msgSend_281( + late final _sel_initWithContentsOfFile_options_error_1 = + _registerName1("initWithContentsOfFile:options:error:"); + late final _sel_initWithContentsOfURL_options_error_1 = + _registerName1("initWithContentsOfURL:options:error:"); + late final _sel_initWithData_1 = _registerName1("initWithData:"); + instancetype _objc_msgSend_217( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexSet, + ffi.Pointer data, ) { - return __objc_msgSend_281( + return __objc_msgSend_217( obj, sel, - indexSet, + data, ); } - late final __objc_msgSend_281Ptr = _lookup< + late final __objc_msgSend_217Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, + late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_removeIndexes_1 = _registerName1("removeIndexes:"); - late final _sel_removeAllIndexes1 = _registerName1("removeAllIndexes"); - late final _sel_addIndex_1 = _registerName1("addIndex:"); - void _objc_msgSend_282( + late final _sel_dataWithData_1 = _registerName1("dataWithData:"); + late final _sel_initWithBase64EncodedString_options_1 = + _registerName1("initWithBase64EncodedString:options:"); + instancetype _objc_msgSend_218( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer base64String, + int options, ) { - return __objc_msgSend_282( + return __objc_msgSend_218( obj, sel, - value, + base64String, + options, ); } - late final __objc_msgSend_282Ptr = _lookup< + late final __objc_msgSend_218Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_removeIndex_1 = _registerName1("removeIndex:"); - late final _sel_addIndexesInRange_1 = _registerName1("addIndexesInRange:"); - void _objc_msgSend_283( + late final _sel_base64EncodedStringWithOptions_1 = + _registerName1("base64EncodedStringWithOptions:"); + ffi.Pointer _objc_msgSend_219( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, + int options, ) { - return __objc_msgSend_283( + return __objc_msgSend_219( obj, sel, - range, + options, ); } - late final __objc_msgSend_283Ptr = _lookup< + late final __objc_msgSend_219Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeIndexesInRange_1 = - _registerName1("removeIndexesInRange:"); - late final _sel_shiftIndexesStartingAtIndex_by_1 = - _registerName1("shiftIndexesStartingAtIndex:by:"); - void _objc_msgSend_284( + late final _sel_initWithBase64EncodedData_options_1 = + _registerName1("initWithBase64EncodedData:options:"); + instancetype _objc_msgSend_220( ffi.Pointer obj, ffi.Pointer sel, - int index, - int delta, + ffi.Pointer base64Data, + int options, ) { - return __objc_msgSend_284( + return __objc_msgSend_220( obj, sel, - index, - delta, + base64Data, + options, ); } - late final __objc_msgSend_284Ptr = _lookup< + late final __objc_msgSend_220Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _class_NSMutableArray1 = _getClass1("NSMutableArray"); - late final _sel_addObject_1 = _registerName1("addObject:"); - late final _sel_insertObject_atIndex_1 = - _registerName1("insertObject:atIndex:"); - void _objc_msgSend_285( + late final _sel_base64EncodedDataWithOptions_1 = + _registerName1("base64EncodedDataWithOptions:"); + ffi.Pointer _objc_msgSend_221( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - int index, + int options, ) { - return __objc_msgSend_285( + return __objc_msgSend_221( obj, sel, - anObject, - index, + options, ); } - late final __objc_msgSend_285Ptr = _lookup< + late final __objc_msgSend_221Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeLastObject1 = _registerName1("removeLastObject"); - late final _sel_removeObjectAtIndex_1 = - _registerName1("removeObjectAtIndex:"); - late final _sel_replaceObjectAtIndex_withObject_1 = - _registerName1("replaceObjectAtIndex:withObject:"); - void _objc_msgSend_286( + late final _sel_decompressedDataUsingAlgorithm_error_1 = + _registerName1("decompressedDataUsingAlgorithm:error:"); + instancetype _objc_msgSend_222( ffi.Pointer obj, ffi.Pointer sel, - int index, - ffi.Pointer anObject, + int algorithm, + ffi.Pointer> error, ) { - return __objc_msgSend_286( + return __objc_msgSend_222( obj, sel, - index, - anObject, + algorithm, + error, ); } - late final __objc_msgSend_286Ptr = _lookup< + late final __objc_msgSend_222Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer>)>(); - late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); - late final _sel_addObjectsFromArray_1 = - _registerName1("addObjectsFromArray:"); - void _objc_msgSend_287( + late final _sel_compressedDataUsingAlgorithm_error_1 = + _registerName1("compressedDataUsingAlgorithm:error:"); + late final _sel_getBytes_1 = _registerName1("getBytes:"); + late final _sel_dataWithContentsOfMappedFile_1 = + _registerName1("dataWithContentsOfMappedFile:"); + late final _sel_initWithContentsOfMappedFile_1 = + _registerName1("initWithContentsOfMappedFile:"); + late final _sel_initWithBase64Encoding_1 = + _registerName1("initWithBase64Encoding:"); + late final _sel_base64Encoding1 = _registerName1("base64Encoding"); + late final _sel_characterSetWithBitmapRepresentation_1 = + _registerName1("characterSetWithBitmapRepresentation:"); + ffi.Pointer _objc_msgSend_223( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherArray, + ffi.Pointer data, ) { - return __objc_msgSend_287( + return __objc_msgSend_223( obj, sel, - otherArray, + data, ); } - late final __objc_msgSend_287Ptr = _lookup< + late final __objc_msgSend_223Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = - _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); - void _objc_msgSend_288( + late final _sel_characterSetWithContentsOfFile_1 = + _registerName1("characterSetWithContentsOfFile:"); + late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); + bool _objc_msgSend_224( ffi.Pointer obj, ffi.Pointer sel, - int idx1, - int idx2, + int aCharacter, ) { - return __objc_msgSend_288( + return __objc_msgSend_224( obj, sel, - idx1, - idx2, + aCharacter, ); } - late final __objc_msgSend_288Ptr = _lookup< + late final __objc_msgSend_224Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + unichar)>>('objc_msgSend'); + late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); - late final _sel_removeObject_inRange_1 = - _registerName1("removeObject:inRange:"); - void _objc_msgSend_289( + late final _sel_bitmapRepresentation1 = + _registerName1("bitmapRepresentation"); + late final _sel_invertedSet1 = _registerName1("invertedSet"); + late final _sel_longCharacterIsMember_1 = + _registerName1("longCharacterIsMember:"); + bool _objc_msgSend_225( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - NSRange range, + int theLongChar, ) { - return __objc_msgSend_289( + return __objc_msgSend_225( obj, sel, - anObject, - range, + theLongChar, ); } - late final __objc_msgSend_289Ptr = _lookup< + late final __objc_msgSend_225Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + UTF32Char)>>('objc_msgSend'); + late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeObject_1 = _registerName1("removeObject:"); - late final _sel_removeObjectIdenticalTo_inRange_1 = - _registerName1("removeObjectIdenticalTo:inRange:"); - late final _sel_removeObjectIdenticalTo_1 = - _registerName1("removeObjectIdenticalTo:"); - late final _sel_removeObjectsFromIndices_numIndices_1 = - _registerName1("removeObjectsFromIndices:numIndices:"); - void _objc_msgSend_290( + late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); + bool _objc_msgSend_226( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indices, - int cnt, + ffi.Pointer theOtherSet, ) { - return __objc_msgSend_290( + return __objc_msgSend_226( obj, sel, - indices, - cnt, + theOtherSet, ); } - late final __objc_msgSend_290Ptr = _lookup< + late final __objc_msgSend_226Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_removeObjectsInArray_1 = - _registerName1("removeObjectsInArray:"); - late final _sel_removeObjectsInRange_1 = - _registerName1("removeObjectsInRange:"); - late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); - void _objc_msgSend_291( + late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); + bool _objc_msgSend_227( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer otherArray, - NSRange otherRange, + int thePlane, ) { - return __objc_msgSend_291( + return __objc_msgSend_227( obj, sel, - range, - otherArray, - otherRange, + thePlane, ); } - late final __objc_msgSend_291Ptr = _lookup< + late final __objc_msgSend_227Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer, NSRange)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Uint8)>>('objc_msgSend'); + late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:"); - void _objc_msgSend_292( + late final _sel_URLUserAllowedCharacterSet1 = + _registerName1("URLUserAllowedCharacterSet"); + late final _sel_URLPasswordAllowedCharacterSet1 = + _registerName1("URLPasswordAllowedCharacterSet"); + late final _sel_URLHostAllowedCharacterSet1 = + _registerName1("URLHostAllowedCharacterSet"); + late final _sel_URLPathAllowedCharacterSet1 = + _registerName1("URLPathAllowedCharacterSet"); + late final _sel_URLQueryAllowedCharacterSet1 = + _registerName1("URLQueryAllowedCharacterSet"); + late final _sel_URLFragmentAllowedCharacterSet1 = + _registerName1("URLFragmentAllowedCharacterSet"); + late final _sel_rangeOfCharacterFromSet_1 = + _registerName1("rangeOfCharacterFromSet:"); + NSRange _objc_msgSend_228( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer otherArray, + ffi.Pointer searchSet, ) { - return __objc_msgSend_292( + return __objc_msgSend_228( obj, sel, - range, - otherArray, + searchSet, ); } - late final __objc_msgSend_292Ptr = _lookup< + late final __objc_msgSend_228Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_setArray_1 = _registerName1("setArray:"); - late final _sel_sortUsingFunction_context_1 = - _registerName1("sortUsingFunction:context:"); - void _objc_msgSend_293( + late final _sel_rangeOfCharacterFromSet_options_1 = + _registerName1("rangeOfCharacterFromSet:options:"); + NSRange _objc_msgSend_229( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context, - ) { - return __objc_msgSend_293( - obj, - sel, - compare, - context, - ); - } - - late final __objc_msgSend_293Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); - - late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); - late final _sel_insertObjects_atIndexes_1 = - _registerName1("insertObjects:atIndexes:"); - void _objc_msgSend_294( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer indexes, + ffi.Pointer searchSet, + int mask, ) { - return __objc_msgSend_294( + return __objc_msgSend_229( obj, sel, - objects, - indexes, + searchSet, + mask, ); } - late final __objc_msgSend_294Ptr = _lookup< + late final __objc_msgSend_229Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_removeObjectsAtIndexes_1 = - _registerName1("removeObjectsAtIndexes:"); - late final _sel_replaceObjectsAtIndexes_withObjects_1 = - _registerName1("replaceObjectsAtIndexes:withObjects:"); - void _objc_msgSend_295( + late final _sel_rangeOfCharacterFromSet_options_range_1 = + _registerName1("rangeOfCharacterFromSet:options:range:"); + NSRange _objc_msgSend_230( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer indexes, - ffi.Pointer objects, + ffi.Pointer searchSet, + int mask, + NSRange rangeOfReceiverToSearch, ) { - return __objc_msgSend_295( + return __objc_msgSend_230( obj, sel, - indexes, - objects, + searchSet, + mask, + rangeOfReceiverToSearch, ); } - late final __objc_msgSend_295Ptr = _lookup< + late final __objc_msgSend_230Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange)>(); - late final _sel_setObject_atIndexedSubscript_1 = - _registerName1("setObject:atIndexedSubscript:"); - late final _sel_sortUsingComparator_1 = - _registerName1("sortUsingComparator:"); - void _objc_msgSend_296( + late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = + _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); + NSRange _objc_msgSend_231( ffi.Pointer obj, ffi.Pointer sel, - NSComparator cmptr, + int index, ) { - return __objc_msgSend_296( + return __objc_msgSend_231( obj, sel, - cmptr, + index, ); } - late final __objc_msgSend_296Ptr = _lookup< + late final __objc_msgSend_231Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, NSComparator)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< + NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_sortWithOptions_usingComparator_1 = - _registerName1("sortWithOptions:usingComparator:"); - void _objc_msgSend_297( + late final _sel_rangeOfComposedCharacterSequencesForRange_1 = + _registerName1("rangeOfComposedCharacterSequencesForRange:"); + NSRange _objc_msgSend_232( ffi.Pointer obj, ffi.Pointer sel, - int opts, - NSComparator cmptr, + NSRange range, ) { - return __objc_msgSend_297( + return __objc_msgSend_232( obj, sel, - opts, - cmptr, + range, ); } - late final __objc_msgSend_297Ptr = _lookup< + late final __objc_msgSend_232Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, int, NSComparator)>(); + NSRange Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< + NSRange Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); - ffi.Pointer _objc_msgSend_298( + late final _sel_stringByAppendingString_1 = + _registerName1("stringByAppendingString:"); + late final _sel_stringByAppendingFormat_1 = + _registerName1("stringByAppendingFormat:"); + late final _sel_uppercaseString1 = _registerName1("uppercaseString"); + late final _sel_lowercaseString1 = _registerName1("lowercaseString"); + late final _sel_capitalizedString1 = _registerName1("capitalizedString"); + late final _sel_localizedUppercaseString1 = + _registerName1("localizedUppercaseString"); + late final _sel_localizedLowercaseString1 = + _registerName1("localizedLowercaseString"); + late final _sel_localizedCapitalizedString1 = + _registerName1("localizedCapitalizedString"); + late final _sel_uppercaseStringWithLocale_1 = + _registerName1("uppercaseStringWithLocale:"); + ffi.Pointer _objc_msgSend_233( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer locale, ) { - return __objc_msgSend_298( + return __objc_msgSend_233( obj, sel, - path, + locale, ); } - late final __objc_msgSend_298Ptr = _lookup< + late final __objc_msgSend_233Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< + late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_299( + late final _sel_lowercaseStringWithLocale_1 = + _registerName1("lowercaseStringWithLocale:"); + late final _sel_capitalizedStringWithLocale_1 = + _registerName1("capitalizedStringWithLocale:"); + late final _sel_getLineStart_end_contentsEnd_forRange_1 = + _registerName1("getLineStart:end:contentsEnd:forRange:"); + void _objc_msgSend_234( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range, ) { - return __objc_msgSend_299( + return __objc_msgSend_234( obj, sel, - url, + startPtr, + lineEndPtr, + contentsEndPtr, + range, ); } - late final __objc_msgSend_299Ptr = _lookup< + late final __objc_msgSend_234Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSRange)>(); - late final _sel_applyDifference_1 = _registerName1("applyDifference:"); - void _objc_msgSend_300( + late final _sel_lineRangeForRange_1 = _registerName1("lineRangeForRange:"); + late final _sel_getParagraphStart_end_contentsEnd_forRange_1 = + _registerName1("getParagraphStart:end:contentsEnd:forRange:"); + late final _sel_paragraphRangeForRange_1 = + _registerName1("paragraphRangeForRange:"); + late final _sel_enumerateSubstringsInRange_options_usingBlock_1 = + _registerName1("enumerateSubstringsInRange:options:usingBlock:"); + void _objc_msgSend_235( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer difference, + NSRange range, + int opts, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_300( + return __objc_msgSend_235( obj, sel, - difference, + range, + opts, + block, ); } - late final __objc_msgSend_300Ptr = _lookup< + late final __objc_msgSend_235Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _class_NSMutableData1 = _getClass1("NSMutableData"); - late final _sel_mutableBytes1 = _registerName1("mutableBytes"); - late final _sel_setLength_1 = _registerName1("setLength:"); - void _objc_msgSend_301( + late final _sel_enumerateLinesUsingBlock_1 = + _registerName1("enumerateLinesUsingBlock:"); + void _objc_msgSend_236( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_301( + return __objc_msgSend_236( obj, sel, - value, + block, ); } - late final __objc_msgSend_301Ptr = _lookup< + late final __objc_msgSend_236Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); - late final _sel_appendData_1 = _registerName1("appendData:"); - void _objc_msgSend_302( + late final _sel_UTF8String1 = _registerName1("UTF8String"); + late final _sel_fastestEncoding1 = _registerName1("fastestEncoding"); + late final _sel_smallestEncoding1 = _registerName1("smallestEncoding"); + late final _sel_dataUsingEncoding_allowLossyConversion_1 = + _registerName1("dataUsingEncoding:allowLossyConversion:"); + ffi.Pointer _objc_msgSend_237( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, + int encoding, + bool lossy, ) { - return __objc_msgSend_302( + return __objc_msgSend_237( obj, sel, - other, + encoding, + lossy, ); } - late final __objc_msgSend_302Ptr = _lookup< + late final __objc_msgSend_237Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSStringEncoding, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, bool)>(); - late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); - late final _sel_replaceBytesInRange_withBytes_1 = - _registerName1("replaceBytesInRange:withBytes:"); - void _objc_msgSend_303( + late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); + ffi.Pointer _objc_msgSend_238( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer bytes, + int encoding, ) { - return __objc_msgSend_303( + return __objc_msgSend_238( obj, sel, - range, - bytes, + encoding, ); } - late final __objc_msgSend_303Ptr = _lookup< + late final __objc_msgSend_238Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); - late final _sel_setData_1 = _registerName1("setData:"); - late final _sel_replaceBytesInRange_withBytes_length_1 = - _registerName1("replaceBytesInRange:withBytes:length:"); - void _objc_msgSend_304( + late final _sel_canBeConvertedToEncoding_1 = + _registerName1("canBeConvertedToEncoding:"); + late final _sel_cStringUsingEncoding_1 = + _registerName1("cStringUsingEncoding:"); + ffi.Pointer _objc_msgSend_239( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer replacementBytes, - int replacementLength, + int encoding, ) { - return __objc_msgSend_304( + return __objc_msgSend_239( obj, sel, - range, - replacementBytes, - replacementLength, + encoding, ); } - late final __objc_msgSend_304Ptr = _lookup< + late final __objc_msgSend_239Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); - late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); - late final _sel_initWithLength_1 = _registerName1("initWithLength:"); - late final _sel_decompressUsingAlgorithm_error_1 = - _registerName1("decompressUsingAlgorithm:error:"); - bool _objc_msgSend_305( + late final _sel_getCString_maxLength_encoding_1 = + _registerName1("getCString:maxLength:encoding:"); + bool _objc_msgSend_240( ffi.Pointer obj, ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, + ffi.Pointer buffer, + int maxBufferCount, + int encoding, ) { - return __objc_msgSend_305( + return __objc_msgSend_240( obj, sel, - algorithm, - error, + buffer, + maxBufferCount, + encoding, ); } - late final __objc_msgSend_305Ptr = _lookup< + late final __objc_msgSend_240Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); + ffi.Pointer, + NSUInteger, + NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - late final _sel_compressUsingAlgorithm_error_1 = - _registerName1("compressUsingAlgorithm:error:"); - late final _class_NSPurgeableData1 = _getClass1("NSPurgeableData"); - late final _class_NSMutableDictionary1 = _getClass1("NSMutableDictionary"); - late final _sel_removeObjectForKey_1 = _registerName1("removeObjectForKey:"); - late final _sel_setObject_forKey_1 = _registerName1("setObject:forKey:"); - void _objc_msgSend_306( + late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1 = + _registerName1( + "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); + bool _objc_msgSend_241( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anObject, - ffi.Pointer aKey, + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, + NSRange range, + NSRangePointer leftover, ) { - return __objc_msgSend_306( + return __objc_msgSend_241( obj, sel, - anObject, - aKey, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, + range, + leftover, ); } - late final __objc_msgSend_306Ptr = _lookup< + late final __objc_msgSend_241Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, + NSUInteger, + ffi.Pointer, + NSStringEncoding, + ffi.Int32, + NSRange, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + int, + int, + NSRange, + NSRangePointer)>(); - late final _sel_addEntriesFromDictionary_1 = - _registerName1("addEntriesFromDictionary:"); - void _objc_msgSend_307( + late final _sel_maximumLengthOfBytesUsingEncoding_1 = + _registerName1("maximumLengthOfBytesUsingEncoding:"); + late final _sel_lengthOfBytesUsingEncoding_1 = + _registerName1("lengthOfBytesUsingEncoding:"); + late final _sel_availableStringEncodings1 = + _registerName1("availableStringEncodings"); + ffi.Pointer _objc_msgSend_242( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherDictionary, ) { - return __objc_msgSend_307( + return __objc_msgSend_242( obj, sel, - otherDictionary, ); } - late final __objc_msgSend_307Ptr = _lookup< + late final __objc_msgSend_242Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_removeObjectsForKeys_1 = - _registerName1("removeObjectsForKeys:"); - late final _sel_setDictionary_1 = _registerName1("setDictionary:"); - late final _sel_setObject_forKeyedSubscript_1 = - _registerName1("setObject:forKeyedSubscript:"); - late final _sel_dictionaryWithCapacity_1 = - _registerName1("dictionaryWithCapacity:"); - ffi.Pointer _objc_msgSend_308( + late final _sel_localizedNameOfStringEncoding_1 = + _registerName1("localizedNameOfStringEncoding:"); + late final _sel_defaultCStringEncoding1 = + _registerName1("defaultCStringEncoding"); + late final _sel_decomposedStringWithCanonicalMapping1 = + _registerName1("decomposedStringWithCanonicalMapping"); + late final _sel_precomposedStringWithCanonicalMapping1 = + _registerName1("precomposedStringWithCanonicalMapping"); + late final _sel_decomposedStringWithCompatibilityMapping1 = + _registerName1("decomposedStringWithCompatibilityMapping"); + late final _sel_precomposedStringWithCompatibilityMapping1 = + _registerName1("precomposedStringWithCompatibilityMapping"); + late final _sel_componentsSeparatedByString_1 = + _registerName1("componentsSeparatedByString:"); + late final _sel_componentsSeparatedByCharactersInSet_1 = + _registerName1("componentsSeparatedByCharactersInSet:"); + ffi.Pointer _objc_msgSend_243( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer path, + ffi.Pointer separator, ) { - return __objc_msgSend_308( + return __objc_msgSend_243( obj, sel, - path, + separator, ); } - late final __objc_msgSend_308Ptr = _lookup< + late final __objc_msgSend_243Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< + late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_309( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + late final _sel_stringByTrimmingCharactersInSet_1 = + _registerName1("stringByTrimmingCharactersInSet:"); + ffi.Pointer _objc_msgSend_244( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer set1, ) { - return __objc_msgSend_309( + return __objc_msgSend_244( obj, sel, - url, + set1, ); } - late final __objc_msgSend_309Ptr = _lookup< + late final __objc_msgSend_244Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< + late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_dictionaryWithSharedKeySet_1 = - _registerName1("dictionaryWithSharedKeySet:"); - ffi.Pointer _objc_msgSend_310( + late final _sel_stringByPaddingToLength_withString_startingAtIndex_1 = + _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); + ffi.Pointer _objc_msgSend_245( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer keyset, + int newLength, + ffi.Pointer padString, + int padIndex, ) { - return __objc_msgSend_310( + return __objc_msgSend_245( obj, sel, - keyset, + newLength, + padString, + padIndex, ); } - late final __objc_msgSend_310Ptr = _lookup< + late final __objc_msgSend_245Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, int, ffi.Pointer, int)>(); - late final _class_NSNotification1 = _getClass1("NSNotification"); - late final _sel_name1 = _registerName1("name"); - late final _sel_initWithName_object_userInfo_1 = - _registerName1("initWithName:object:userInfo:"); - instancetype _objc_msgSend_311( + late final _sel_stringByFoldingWithOptions_locale_1 = + _registerName1("stringByFoldingWithOptions:locale:"); + ffi.Pointer _objc_msgSend_246( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName name, - ffi.Pointer object, - ffi.Pointer userInfo, + int options, + ffi.Pointer locale, ) { - return __objc_msgSend_311( + return __objc_msgSend_246( obj, sel, - name, - object, - userInfo, + options, + locale, ); } - late final __objc_msgSend_311Ptr = _lookup< + late final __objc_msgSend_246Ptr = _lookup< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - NSNotificationName, - ffi.Pointer, + ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); - late final _sel_notificationWithName_object_1 = - _registerName1("notificationWithName:object:"); - late final _sel_notificationWithName_object_userInfo_1 = - _registerName1("notificationWithName:object:userInfo:"); - late final _class_NSNotificationCenter1 = _getClass1("NSNotificationCenter"); - late final _sel_defaultCenter1 = _registerName1("defaultCenter"); - ffi.Pointer _objc_msgSend_312( + late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_1 = + _registerName1( + "stringByReplacingOccurrencesOfString:withString:options:range:"); + ffi.Pointer _objc_msgSend_247( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer replacement, + int options, + NSRange searchRange, ) { - return __objc_msgSend_312( + return __objc_msgSend_247( obj, sel, + target, + replacement, + options, + searchRange, ); } - late final __objc_msgSend_312Ptr = _lookup< + late final __objc_msgSend_247Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + NSRange)>(); - late final _sel_addObserver_selector_name_object_1 = - _registerName1("addObserver:selector:name:object:"); - void _objc_msgSend_313( + late final _sel_stringByReplacingOccurrencesOfString_withString_1 = + _registerName1("stringByReplacingOccurrencesOfString:withString:"); + ffi.Pointer _objc_msgSend_248( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer aSelector, - NSNotificationName aName, - ffi.Pointer anObject, + ffi.Pointer target, + ffi.Pointer replacement, ) { - return __objc_msgSend_313( + return __objc_msgSend_248( obj, sel, - observer, - aSelector, - aName, - anObject, + target, + replacement, ); } - late final __objc_msgSend_313Ptr = _lookup< + late final __objc_msgSend_248Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSNotificationName, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< - void Function( + late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSNotificationName, ffi.Pointer)>(); - late final _sel_postNotification_1 = _registerName1("postNotification:"); - void _objc_msgSend_314( + late final _sel_stringByReplacingCharactersInRange_withString_1 = + _registerName1("stringByReplacingCharactersInRange:withString:"); + ffi.Pointer _objc_msgSend_249( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer notification, + NSRange range, + ffi.Pointer replacement, ) { - return __objc_msgSend_314( + return __objc_msgSend_249( obj, sel, - notification, + range, + replacement, ); } - late final __objc_msgSend_314Ptr = _lookup< + late final __objc_msgSend_249Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange, ffi.Pointer)>(); - late final _sel_postNotificationName_object_1 = - _registerName1("postNotificationName:object:"); - void _objc_msgSend_315( + late final _sel_stringByApplyingTransform_reverse_1 = + _registerName1("stringByApplyingTransform:reverse:"); + ffi.Pointer _objc_msgSend_250( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName aName, - ffi.Pointer anObject, + NSStringTransform transform, + bool reverse, ) { - return __objc_msgSend_315( + return __objc_msgSend_250( obj, sel, - aName, - anObject, + transform, + reverse, ); } - late final __objc_msgSend_315Ptr = _lookup< + late final __objc_msgSend_250Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSStringTransform, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringTransform, bool)>(); - late final _sel_postNotificationName_object_userInfo_1 = - _registerName1("postNotificationName:object:userInfo:"); - void _objc_msgSend_316( + late final _sel_writeToURL_atomically_encoding_error_1 = + _registerName1("writeToURL:atomically:encoding:error:"); + bool _objc_msgSend_251( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName aName, - ffi.Pointer anObject, - ffi.Pointer aUserInfo, + ffi.Pointer url, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_316( + return __objc_msgSend_251( obj, sel, - aName, - anObject, - aUserInfo, + url, + useAuxiliaryFile, + enc, + error, ); } - late final __objc_msgSend_316Ptr = _lookup< + late final __objc_msgSend_251Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< - void Function( + ffi.Bool, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< + bool Function( ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer, - ffi.Pointer)>(); + bool, + int, + ffi.Pointer>)>(); - late final _sel_removeObserver_1 = _registerName1("removeObserver:"); - late final _sel_removeObserver_name_object_1 = - _registerName1("removeObserver:name:object:"); - void _objc_msgSend_317( + late final _sel_writeToFile_atomically_encoding_error_1 = + _registerName1("writeToFile:atomically:encoding:error:"); + bool _objc_msgSend_252( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer observer, - NSNotificationName aName, - ffi.Pointer anObject, + ffi.Pointer path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_317( + return __objc_msgSend_252( obj, sel, - observer, - aName, - anObject, + path, + useAuxiliaryFile, + enc, + error, ); } - late final __objc_msgSend_317Ptr = _lookup< + late final __objc_msgSend_252Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSNotificationName, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< - void Function( + ffi.Bool, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSNotificationName, - ffi.Pointer)>(); + bool, + int, + ffi.Pointer>)>(); - late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); - late final _class_NSProgress1 = _getClass1("NSProgress"); - late final _sel_currentProgress1 = _registerName1("currentProgress"); - ffi.Pointer _objc_msgSend_318( + late final _sel_initWithCharactersNoCopy_length_freeWhenDone_1 = + _registerName1("initWithCharactersNoCopy:length:freeWhenDone:"); + instancetype _objc_msgSend_253( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer characters, + int length, + bool freeBuffer, ) { - return __objc_msgSend_318( + return __objc_msgSend_253( obj, sel, + characters, + length, + freeBuffer, ); } - late final __objc_msgSend_318Ptr = _lookup< + late final __objc_msgSend_253Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, bool)>(); - late final _sel_progressWithTotalUnitCount_1 = - _registerName1("progressWithTotalUnitCount:"); - ffi.Pointer _objc_msgSend_319( + late final _sel_initWithCharactersNoCopy_length_deallocator_1 = + _registerName1("initWithCharactersNoCopy:length:deallocator:"); + instancetype _objc_msgSend_254( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, + ffi.Pointer chars, + int len, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_319( + return __objc_msgSend_254( obj, sel, - unitCount, + chars, + len, + deallocator, ); } - late final __objc_msgSend_319Ptr = _lookup< + late final __objc_msgSend_254Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_discreteProgressWithTotalUnitCount_1 = - _registerName1("discreteProgressWithTotalUnitCount:"); - late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = - _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); - ffi.Pointer _objc_msgSend_320( + late final _sel_initWithCharacters_length_1 = + _registerName1("initWithCharacters:length:"); + instancetype _objc_msgSend_255( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, - ffi.Pointer parent, - int portionOfParentTotalUnitCount, + ffi.Pointer characters, + int length, ) { - return __objc_msgSend_320( + return __objc_msgSend_255( obj, sel, - unitCount, - parent, - portionOfParentTotalUnitCount, + characters, + length, ); } - late final __objc_msgSend_320Ptr = _lookup< + late final __objc_msgSend_255Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_initWithParent_userInfo_1 = - _registerName1("initWithParent:userInfo:"); - instancetype _objc_msgSend_321( + late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); + instancetype _objc_msgSend_256( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer parentProgressOrNil, - ffi.Pointer userInfoOrNil, + ffi.Pointer nullTerminatedCString, ) { - return __objc_msgSend_321( + return __objc_msgSend_256( obj, sel, - parentProgressOrNil, - userInfoOrNil, + nullTerminatedCString, ); } - late final __objc_msgSend_321Ptr = _lookup< + late final __objc_msgSend_256Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer)>(); - late final _sel_becomeCurrentWithPendingUnitCount_1 = - _registerName1("becomeCurrentWithPendingUnitCount:"); - void _objc_msgSend_322( + late final _sel_initWithFormat_1 = _registerName1("initWithFormat:"); + late final _sel_initWithFormat_arguments_1 = + _registerName1("initWithFormat:arguments:"); + instancetype _objc_msgSend_257( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, + ffi.Pointer format, + va_list argList, ) { - return __objc_msgSend_322( + return __objc_msgSend_257( obj, sel, - unitCount, + format, + argList, ); } - late final __objc_msgSend_322Ptr = _lookup< + late final __objc_msgSend_257Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, va_list)>>('objc_msgSend'); + late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, va_list)>(); - late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = - _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); - void _objc_msgSend_323( + late final _sel_initWithFormat_locale_1 = + _registerName1("initWithFormat:locale:"); + instancetype _objc_msgSend_258( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, - ffi.Pointer<_ObjCBlock> work, + ffi.Pointer format, + ffi.Pointer locale, ) { - return __objc_msgSend_323( + return __objc_msgSend_258( obj, sel, - unitCount, - work, + format, + locale, ); } - late final __objc_msgSend_323Ptr = _lookup< + late final __objc_msgSend_258Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_resignCurrent1 = _registerName1("resignCurrent"); - late final _sel_addChild_withPendingUnitCount_1 = - _registerName1("addChild:withPendingUnitCount:"); - void _objc_msgSend_324( + late final _sel_initWithFormat_locale_arguments_1 = + _registerName1("initWithFormat:locale:arguments:"); + instancetype _objc_msgSend_259( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer child, - int inUnitCount, + ffi.Pointer format, + ffi.Pointer locale, + va_list argList, ) { - return __objc_msgSend_324( + return __objc_msgSend_259( obj, sel, - child, - inUnitCount, + format, + locale, + argList, ); } - late final __objc_msgSend_324Ptr = _lookup< + late final __objc_msgSend_259Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + va_list)>>('objc_msgSend'); + late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, va_list)>(); - late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); - int _objc_msgSend_325( + late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_1 = + _registerName1("initWithValidatedFormat:validFormatSpecifiers:error:"); + instancetype _objc_msgSend_260( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer> error, ) { - return __objc_msgSend_325( + return __objc_msgSend_260( obj, sel, + format, + validFormatSpecifiers, + error, ); } - late final __objc_msgSend_325Ptr = _lookup< + late final __objc_msgSend_260Ptr = _lookup< ffi.NativeFunction< - ffi.Int64 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); - void _objc_msgSend_326( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_326( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_326Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); - late final _sel_setCompletedUnitCount_1 = - _registerName1("setCompletedUnitCount:"); - late final _sel_setLocalizedDescription_1 = - _registerName1("setLocalizedDescription:"); - void _objc_msgSend_327( + late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1 = + _registerName1( + "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); + instancetype _objc_msgSend_261( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer locale, + ffi.Pointer> error, ) { - return __objc_msgSend_327( + return __objc_msgSend_261( obj, sel, - value, + format, + validFormatSpecifiers, + locale, + error, ); } - late final __objc_msgSend_327Ptr = _lookup< + late final __objc_msgSend_261Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_localizedAdditionalDescription1 = - _registerName1("localizedAdditionalDescription"); - late final _sel_setLocalizedAdditionalDescription_1 = - _registerName1("setLocalizedAdditionalDescription:"); - late final _sel_isCancellable1 = _registerName1("isCancellable"); - late final _sel_setCancellable_1 = _registerName1("setCancellable:"); - void _objc_msgSend_328( + late final _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1 = + _registerName1( + "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); + instancetype _objc_msgSend_262( ffi.Pointer obj, ffi.Pointer sel, - bool value, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + va_list argList, + ffi.Pointer> error, ) { - return __objc_msgSend_328( + return __objc_msgSend_262( obj, sel, - value, + format, + validFormatSpecifiers, + argList, + error, ); } - late final __objc_msgSend_328Ptr = _lookup< + late final __objc_msgSend_262Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, bool)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + va_list, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + va_list, + ffi.Pointer>)>(); - late final _sel_isPausable1 = _registerName1("isPausable"); - late final _sel_setPausable_1 = _registerName1("setPausable:"); - late final _sel_isCancelled1 = _registerName1("isCancelled"); - late final _sel_isPaused1 = _registerName1("isPaused"); - late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_329( + late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1 = + _registerName1( + "initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:"); + instancetype _objc_msgSend_263( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer format, + ffi.Pointer validFormatSpecifiers, + ffi.Pointer locale, + va_list argList, + ffi.Pointer> error, ) { - return __objc_msgSend_329( + return __objc_msgSend_263( obj, sel, + format, + validFormatSpecifiers, + locale, + argList, + error, ); } - late final __objc_msgSend_329Ptr = _lookup< + late final __objc_msgSend_263Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + va_list, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + va_list, + ffi.Pointer>)>(); - late final _sel_setCancellationHandler_1 = - _registerName1("setCancellationHandler:"); - void _objc_msgSend_330( + late final _sel_initWithData_encoding_1 = + _registerName1("initWithData:encoding:"); + instancetype _objc_msgSend_264( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, + ffi.Pointer data, + int encoding, ) { - return __objc_msgSend_330( + return __objc_msgSend_264( obj, sel, - value, + data, + encoding, ); } - late final __objc_msgSend_330Ptr = _lookup< + late final __objc_msgSend_264Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_pausingHandler1 = _registerName1("pausingHandler"); - late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); - late final _sel_resumingHandler1 = _registerName1("resumingHandler"); - late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); - late final _sel_setUserInfoObject_forKey_1 = - _registerName1("setUserInfoObject:forKey:"); - late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); - late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); - late final _sel_isFinished1 = _registerName1("isFinished"); - late final _sel_cancel1 = _registerName1("cancel"); - late final _sel_pause1 = _registerName1("pause"); - late final _sel_resume1 = _registerName1("resume"); - late final _sel_kind1 = _registerName1("kind"); - late final _sel_setKind_1 = _registerName1("setKind:"); - late final _sel_estimatedTimeRemaining1 = - _registerName1("estimatedTimeRemaining"); - late final _sel_setEstimatedTimeRemaining_1 = - _registerName1("setEstimatedTimeRemaining:"); - void _objc_msgSend_331( + late final _sel_initWithBytes_length_encoding_1 = + _registerName1("initWithBytes:length:encoding:"); + instancetype _objc_msgSend_265( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer bytes, + int len, + int encoding, ) { - return __objc_msgSend_331( + return __objc_msgSend_265( obj, sel, - value, + bytes, + len, + encoding, ); } - late final __objc_msgSend_331Ptr = _lookup< + late final __objc_msgSend_265Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - late final _sel_throughput1 = _registerName1("throughput"); - late final _sel_setThroughput_1 = _registerName1("setThroughput:"); - late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); - late final _sel_setFileOperationKind_1 = - _registerName1("setFileOperationKind:"); - late final _sel_fileURL1 = _registerName1("fileURL"); - late final _sel_setFileURL_1 = _registerName1("setFileURL:"); - void _objc_msgSend_332( + late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = + _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); + instancetype _objc_msgSend_266( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer bytes, + int len, + int encoding, + bool freeBuffer, ) { - return __objc_msgSend_332( + return __objc_msgSend_266( obj, sel, - value, + bytes, + len, + encoding, + freeBuffer, ); } - late final __objc_msgSend_332Ptr = _lookup< + late final __objc_msgSend_266Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSStringEncoding, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, bool)>(); - late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); - late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); - late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); - late final _sel_setFileCompletedCount_1 = - _registerName1("setFileCompletedCount:"); - late final _sel_publish1 = _registerName1("publish"); - late final _sel_unpublish1 = _registerName1("unpublish"); - late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = - _registerName1("addSubscriberForFileURL:withPublishingHandler:"); - ffi.Pointer _objc_msgSend_333( + late final _sel_initWithBytesNoCopy_length_encoding_deallocator_1 = + _registerName1("initWithBytesNoCopy:length:encoding:deallocator:"); + instancetype _objc_msgSend_267( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - NSProgressPublishingHandler publishingHandler, + ffi.Pointer bytes, + int len, + int encoding, + ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_333( + return __objc_msgSend_267( obj, sel, - url, - publishingHandler, + bytes, + len, + encoding, + deallocator, ); } - late final __objc_msgSend_333Ptr = _lookup< + late final __objc_msgSend_267Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>>('objc_msgSend'); - late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>(); + ffi.Pointer, + NSUInteger, + NSStringEncoding, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); - late final _sel_isOld1 = _registerName1("isOld"); - late final _sel_progress1 = _registerName1("progress"); - late final _class_NSOperation1 = _getClass1("NSOperation"); - late final _sel_start1 = _registerName1("start"); - late final _sel_main1 = _registerName1("main"); - late final _sel_isExecuting1 = _registerName1("isExecuting"); - late final _sel_isConcurrent1 = _registerName1("isConcurrent"); - late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); - late final _sel_isReady1 = _registerName1("isReady"); - late final _sel_addDependency_1 = _registerName1("addDependency:"); - void _objc_msgSend_334( + late final _sel_string1 = _registerName1("string"); + late final _sel_stringWithString_1 = _registerName1("stringWithString:"); + late final _sel_stringWithCharacters_length_1 = + _registerName1("stringWithCharacters:length:"); + late final _sel_stringWithUTF8String_1 = + _registerName1("stringWithUTF8String:"); + late final _sel_stringWithFormat_1 = _registerName1("stringWithFormat:"); + late final _sel_localizedStringWithFormat_1 = + _registerName1("localizedStringWithFormat:"); + late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_1 = + _registerName1("stringWithValidatedFormat:validFormatSpecifiers:error:"); + late final _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1 = + _registerName1( + "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); + late final _sel_initWithCString_encoding_1 = + _registerName1("initWithCString:encoding:"); + instancetype _objc_msgSend_268( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer op, + ffi.Pointer nullTerminatedCString, + int encoding, ) { - return __objc_msgSend_334( + return __objc_msgSend_268( obj, sel, - op, + nullTerminatedCString, + encoding, ); } - late final __objc_msgSend_334Ptr = _lookup< + late final __objc_msgSend_268Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_removeDependency_1 = _registerName1("removeDependency:"); - late final _sel_dependencies1 = _registerName1("dependencies"); - late final _sel_queuePriority1 = _registerName1("queuePriority"); - int _objc_msgSend_335( + late final _sel_stringWithCString_encoding_1 = + _registerName1("stringWithCString:encoding:"); + late final _sel_initWithContentsOfURL_encoding_error_1 = + _registerName1("initWithContentsOfURL:encoding:error:"); + instancetype _objc_msgSend_269( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer url, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_335( + return __objc_msgSend_269( obj, sel, + url, + enc, + error, ); } - late final __objc_msgSend_335Ptr = _lookup< + late final __objc_msgSend_269Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); - void _objc_msgSend_336( + late final _sel_initWithContentsOfFile_encoding_error_1 = + _registerName1("initWithContentsOfFile:encoding:error:"); + instancetype _objc_msgSend_270( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer path, + int enc, + ffi.Pointer> error, ) { - return __objc_msgSend_336( + return __objc_msgSend_270( obj, sel, - value, + path, + enc, + error, ); } - late final __objc_msgSend_336Ptr = _lookup< + late final __objc_msgSend_270Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSStringEncoding, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - late final _sel_completionBlock1 = _registerName1("completionBlock"); - late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); - late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); - late final _sel_threadPriority1 = _registerName1("threadPriority"); - late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); - void _objc_msgSend_337( + late final _sel_stringWithContentsOfURL_encoding_error_1 = + _registerName1("stringWithContentsOfURL:encoding:error:"); + late final _sel_stringWithContentsOfFile_encoding_error_1 = + _registerName1("stringWithContentsOfFile:encoding:error:"); + late final _sel_initWithContentsOfURL_usedEncoding_error_1 = + _registerName1("initWithContentsOfURL:usedEncoding:error:"); + instancetype _objc_msgSend_271( ffi.Pointer obj, ffi.Pointer sel, - double value, + ffi.Pointer url, + ffi.Pointer enc, + ffi.Pointer> error, ) { - return __objc_msgSend_337( + return __objc_msgSend_271( obj, sel, - value, + url, + enc, + error, ); } - late final __objc_msgSend_337Ptr = _lookup< + late final __objc_msgSend_271Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_qualityOfService1 = _registerName1("qualityOfService"); - int _objc_msgSend_338( + late final _sel_initWithContentsOfFile_usedEncoding_error_1 = + _registerName1("initWithContentsOfFile:usedEncoding:error:"); + instancetype _objc_msgSend_272( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer path, + ffi.Pointer enc, + ffi.Pointer> error, ) { - return __objc_msgSend_338( + return __objc_msgSend_272( obj, sel, + path, + enc, + error, ); } - late final __objc_msgSend_338Ptr = _lookup< + late final __objc_msgSend_272Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - late final _sel_setQualityOfService_1 = - _registerName1("setQualityOfService:"); - void _objc_msgSend_339( + late final _sel_stringWithContentsOfURL_usedEncoding_error_1 = + _registerName1("stringWithContentsOfURL:usedEncoding:error:"); + late final _sel_stringWithContentsOfFile_usedEncoding_error_1 = + _registerName1("stringWithContentsOfFile:usedEncoding:error:"); + late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1 = + _registerName1( + "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); + int _objc_msgSend_273( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer data, + ffi.Pointer opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion, ) { - return __objc_msgSend_339( + return __objc_msgSend_273( obj, sel, - value, + data, + opts, + string, + usedLossyConversion, ); } - late final __objc_msgSend_339Ptr = _lookup< + late final __objc_msgSend_273Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setName_1 = _registerName1("setName:"); - late final _sel_addOperation_1 = _registerName1("addOperation:"); - late final _sel_addOperations_waitUntilFinished_1 = - _registerName1("addOperations:waitUntilFinished:"); - void _objc_msgSend_340( + NSStringEncoding Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); + + late final _sel_propertyList1 = _registerName1("propertyList"); + late final _sel_propertyListFromStringsFileFormat1 = + _registerName1("propertyListFromStringsFileFormat"); + late final _sel_cString1 = _registerName1("cString"); + late final _sel_lossyCString1 = _registerName1("lossyCString"); + late final _sel_cStringLength1 = _registerName1("cStringLength"); + late final _sel_getCString_1 = _registerName1("getCString:"); + void _objc_msgSend_274( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer ops, - bool wait, + ffi.Pointer bytes, ) { - return __objc_msgSend_340( + return __objc_msgSend_274( obj, sel, - ops, - wait, + bytes, ); } - late final __objc_msgSend_340Ptr = _lookup< + late final __objc_msgSend_274Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer)>(); - late final _sel_addOperationWithBlock_1 = - _registerName1("addOperationWithBlock:"); - void _objc_msgSend_341( + late final _sel_getCString_maxLength_1 = + _registerName1("getCString:maxLength:"); + void _objc_msgSend_275( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer bytes, + int maxLength, ) { - return __objc_msgSend_341( + return __objc_msgSend_275( obj, sel, - block, + bytes, + maxLength, ); } - late final __objc_msgSend_341Ptr = _lookup< + late final __objc_msgSend_275Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, int)>(); - late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); - late final _sel_maxConcurrentOperationCount1 = - _registerName1("maxConcurrentOperationCount"); - late final _sel_setMaxConcurrentOperationCount_1 = - _registerName1("setMaxConcurrentOperationCount:"); - void _objc_msgSend_342( + late final _sel_getCString_maxLength_range_remainingRange_1 = + _registerName1("getCString:maxLength:range:remainingRange:"); + void _objc_msgSend_276( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer bytes, + int maxLength, + NSRange aRange, + NSRangePointer leftoverRange, ) { - return __objc_msgSend_342( + return __objc_msgSend_276( obj, sel, - value, + bytes, + maxLength, + aRange, + leftoverRange, ); } - late final __objc_msgSend_342Ptr = _lookup< + late final __objc_msgSend_276Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSRange, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, NSRange, NSRangePointer)>(); - late final _sel_isSuspended1 = _registerName1("isSuspended"); - late final _sel_setSuspended_1 = _registerName1("setSuspended:"); - late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); - dispatch_queue_t _objc_msgSend_343( + late final _sel_stringWithContentsOfFile_1 = + _registerName1("stringWithContentsOfFile:"); + late final _sel_stringWithContentsOfURL_1 = + _registerName1("stringWithContentsOfURL:"); + late final _sel_initWithCStringNoCopy_length_freeWhenDone_1 = + _registerName1("initWithCStringNoCopy:length:freeWhenDone:"); + ffi.Pointer _objc_msgSend_277( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer bytes, + int length, + bool freeBuffer, ) { - return __objc_msgSend_343( + return __objc_msgSend_277( obj, sel, + bytes, + length, + freeBuffer, ); } - late final __objc_msgSend_343Ptr = _lookup< + late final __objc_msgSend_277Ptr = _lookup< ffi.NativeFunction< - dispatch_queue_t Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< - dispatch_queue_t Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, bool)>(); - late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); - void _objc_msgSend_344( + late final _sel_initWithCString_length_1 = + _registerName1("initWithCString:length:"); + late final _sel_initWithCString_1 = _registerName1("initWithCString:"); + late final _sel_stringWithCString_length_1 = + _registerName1("stringWithCString:length:"); + late final _sel_stringWithCString_1 = _registerName1("stringWithCString:"); + late final _sel_getCharacters_1 = _registerName1("getCharacters:"); + void _objc_msgSend_278( ffi.Pointer obj, ffi.Pointer sel, - dispatch_queue_t value, + ffi.Pointer buffer, ) { - return __objc_msgSend_344( + return __objc_msgSend_278( obj, sel, - value, + buffer, ); } - late final __objc_msgSend_344Ptr = _lookup< + late final __objc_msgSend_278Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - dispatch_queue_t)>>('objc_msgSend'); - late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); - late final _sel_waitUntilAllOperationsAreFinished1 = - _registerName1("waitUntilAllOperationsAreFinished"); - late final _sel_currentQueue1 = _registerName1("currentQueue"); - ffi.Pointer _objc_msgSend_345( + late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = + _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); + late final _sel_stringByRemovingPercentEncoding1 = + _registerName1("stringByRemovingPercentEncoding"); + late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = + _registerName1("stringByAddingPercentEscapesUsingEncoding:"); + late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = + _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); + late final _sel_debugDescription1 = _registerName1("debugDescription"); + late final _sel_version1 = _registerName1("version"); + late final _sel_setVersion_1 = _registerName1("setVersion:"); + void _objc_msgSend_279( ffi.Pointer obj, ffi.Pointer sel, + int aVersion, ) { - return __objc_msgSend_345( + return __objc_msgSend_279( obj, sel, + aVersion, ); } - late final __objc_msgSend_345Ptr = _lookup< + late final __objc_msgSend_279Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_mainQueue1 = _registerName1("mainQueue"); - late final _sel_operations1 = _registerName1("operations"); - late final _sel_operationCount1 = _registerName1("operationCount"); - late final _sel_addObserverForName_object_queue_usingBlock_1 = - _registerName1("addObserverForName:object:queue:usingBlock:"); - ffi.Pointer _objc_msgSend_346( + late final _sel_classForCoder1 = _registerName1("classForCoder"); + late final _sel_replacementObjectForCoder_1 = + _registerName1("replacementObjectForCoder:"); + late final _sel_awakeAfterUsingCoder_1 = + _registerName1("awakeAfterUsingCoder:"); + late final _sel_poseAsClass_1 = _registerName1("poseAsClass:"); + late final _sel_autoContentAccessingProxy1 = + _registerName1("autoContentAccessingProxy"); + late final _sel_URL_resourceDataDidBecomeAvailable_1 = + _registerName1("URL:resourceDataDidBecomeAvailable:"); + void _objc_msgSend_280( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName name, - ffi.Pointer obj1, - ffi.Pointer queue, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer sender, + ffi.Pointer newBytes, ) { - return __objc_msgSend_346( + return __objc_msgSend_280( obj, sel, - name, - obj1, - queue, - block, + sender, + newBytes, ); } - late final __objc_msgSend_346Ptr = _lookup< + late final __objc_msgSend_280Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSNotificationName, - ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final ffi.Pointer - _NSSystemClockDidChangeNotification = - _lookup('NSSystemClockDidChangeNotification'); - - NSNotificationName get NSSystemClockDidChangeNotification => - _NSSystemClockDidChangeNotification.value; - - set NSSystemClockDidChangeNotification(NSNotificationName value) => - _NSSystemClockDidChangeNotification.value = value; + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _class_NSDate1 = _getClass1("NSDate"); - late final _sel_timeIntervalSinceReferenceDate1 = - _registerName1("timeIntervalSinceReferenceDate"); - late final _sel_initWithTimeIntervalSinceReferenceDate_1 = - _registerName1("initWithTimeIntervalSinceReferenceDate:"); - instancetype _objc_msgSend_347( + late final _sel_URLResourceDidFinishLoading_1 = + _registerName1("URLResourceDidFinishLoading:"); + void _objc_msgSend_281( ffi.Pointer obj, ffi.Pointer sel, - double ti, + ffi.Pointer sender, ) { - return __objc_msgSend_347( + return __objc_msgSend_281( obj, sel, - ti, + sender, ); } - late final __objc_msgSend_347Ptr = _lookup< + late final __objc_msgSend_281Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, double)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_timeIntervalSinceDate_1 = - _registerName1("timeIntervalSinceDate:"); - double _objc_msgSend_348( + late final _sel_URLResourceDidCancelLoading_1 = + _registerName1("URLResourceDidCancelLoading:"); + late final _sel_URL_resourceDidFailLoadingWithReason_1 = + _registerName1("URL:resourceDidFailLoadingWithReason:"); + void _objc_msgSend_282( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anotherDate, + ffi.Pointer sender, + ffi.Pointer reason, ) { - return __objc_msgSend_348( + return __objc_msgSend_282( obj, sel, - anotherDate, + sender, + reason, ); } - late final __objc_msgSend_348Ptr = _lookup< + late final __objc_msgSend_282Ptr = _lookup< ffi.NativeFunction< - NSTimeInterval Function(ffi.Pointer, ffi.Pointer, + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_timeIntervalSinceNow1 = - _registerName1("timeIntervalSinceNow"); - late final _sel_timeIntervalSince19701 = - _registerName1("timeIntervalSince1970"); - late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); - late final _sel_dateByAddingTimeInterval_1 = - _registerName1("dateByAddingTimeInterval:"); - late final _sel_earlierDate_1 = _registerName1("earlierDate:"); - ffi.Pointer _objc_msgSend_349( + late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = + _registerName1( + "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); + void _objc_msgSend_283( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anotherDate, + ffi.Pointer error, + int recoveryOptionIndex, + ffi.Pointer delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo, ) { - return __objc_msgSend_349( + return __objc_msgSend_283( obj, sel, - anotherDate, + error, + recoveryOptionIndex, + delegate, + didRecoverSelector, + contextInfo, ); } - late final __objc_msgSend_349Ptr = _lookup< + late final __objc_msgSend_283Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_laterDate_1 = _registerName1("laterDate:"); - int _objc_msgSend_350( + late final _sel_attemptRecoveryFromError_optionIndex_1 = + _registerName1("attemptRecoveryFromError:optionIndex:"); + bool _objc_msgSend_284( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, + ffi.Pointer error, + int recoveryOptionIndex, ) { - return __objc_msgSend_350( + return __objc_msgSend_284( obj, sel, - other, + error, + recoveryOptionIndex, ); } - late final __objc_msgSend_350Ptr = _lookup< + late final __objc_msgSend_284Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); - bool _objc_msgSend_351( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDate, + late final ffi.Pointer _NSFoundationVersionNumber = + _lookup('NSFoundationVersionNumber'); + + double get NSFoundationVersionNumber => _NSFoundationVersionNumber.value; + + set NSFoundationVersionNumber(double value) => + _NSFoundationVersionNumber.value = value; + + ffi.Pointer NSStringFromSelector( + ffi.Pointer aSelector, ) { - return __objc_msgSend_351( - obj, - sel, - otherDate, + return _NSStringFromSelector( + aSelector, ); } - late final __objc_msgSend_351Ptr = _lookup< + late final _NSStringFromSelectorPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSStringFromSelector'); + late final _NSStringFromSelector = _NSStringFromSelectorPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_date1 = _registerName1("date"); - late final _sel_dateWithTimeIntervalSinceNow_1 = - _registerName1("dateWithTimeIntervalSinceNow:"); - late final _sel_dateWithTimeIntervalSinceReferenceDate_1 = - _registerName1("dateWithTimeIntervalSinceReferenceDate:"); - late final _sel_dateWithTimeIntervalSince1970_1 = - _registerName1("dateWithTimeIntervalSince1970:"); - late final _sel_dateWithTimeInterval_sinceDate_1 = - _registerName1("dateWithTimeInterval:sinceDate:"); - instancetype _objc_msgSend_352( - ffi.Pointer obj, - ffi.Pointer sel, - double secsToBeAdded, - ffi.Pointer date, + ffi.Pointer NSSelectorFromString( + ffi.Pointer aSelectorName, ) { - return __objc_msgSend_352( - obj, - sel, - secsToBeAdded, - date, + return _NSSelectorFromString( + aSelectorName, ); } - late final __objc_msgSend_352Ptr = _lookup< + late final _NSSelectorFromStringPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSTimeInterval, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - double, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSSelectorFromString'); + late final _NSSelectorFromString = _NSSelectorFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_distantFuture1 = _registerName1("distantFuture"); - ffi.Pointer _objc_msgSend_353( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSStringFromClass( + ffi.Pointer aClass, ) { - return __objc_msgSend_353( - obj, - sel, + return _NSStringFromClass( + aClass, ); } - late final __objc_msgSend_353Ptr = _lookup< + late final _NSStringFromClassPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer)>>('NSStringFromClass'); + late final _NSStringFromClass = _NSStringFromClassPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_distantPast1 = _registerName1("distantPast"); - late final _sel_now1 = _registerName1("now"); - late final _sel_initWithTimeIntervalSinceNow_1 = - _registerName1("initWithTimeIntervalSinceNow:"); - late final _sel_initWithTimeIntervalSince1970_1 = - _registerName1("initWithTimeIntervalSince1970:"); - late final _sel_initWithTimeInterval_sinceDate_1 = - _registerName1("initWithTimeInterval:sinceDate:"); - late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); - late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); - late final _sel_supportsSecureCoding1 = - _registerName1("supportsSecureCoding"); - late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = - _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); - instancetype _objc_msgSend_354( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - int cachePolicy, - double timeoutInterval, + ffi.Pointer NSClassFromString( + ffi.Pointer aClassName, ) { - return __objc_msgSend_354( - obj, - sel, - URL, - cachePolicy, - timeoutInterval, + return _NSClassFromString( + aClassName, ); } - late final __objc_msgSend_354Ptr = _lookup< + late final _NSClassFromStringPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, double)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSClassFromString'); + late final _NSClassFromString = _NSClassFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_initWithURL_1 = _registerName1("initWithURL:"); - late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = - _registerName1("initWithURL:cachePolicy:timeoutInterval:"); - late final _sel_URL1 = _registerName1("URL"); - late final _sel_cachePolicy1 = _registerName1("cachePolicy"); - int _objc_msgSend_355( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSStringFromProtocol( + ffi.Pointer proto, ) { - return __objc_msgSend_355( - obj, - sel, + return _NSStringFromProtocol( + proto, ); } - late final __objc_msgSend_355Ptr = _lookup< + late final _NSStringFromProtocolPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSStringFromProtocol'); + late final _NSStringFromProtocol = _NSStringFromProtocolPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); - late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); - late final _sel_networkServiceType1 = _registerName1("networkServiceType"); - int _objc_msgSend_356( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSProtocolFromString( + ffi.Pointer namestr, ) { - return __objc_msgSend_356( - obj, - sel, + return _NSProtocolFromString( + namestr, ); } - late final __objc_msgSend_356Ptr = _lookup< + late final _NSProtocolFromStringPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSProtocolFromString'); + late final _NSProtocolFromString = _NSProtocolFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_allowsCellularAccess1 = - _registerName1("allowsCellularAccess"); - late final _sel_allowsExpensiveNetworkAccess1 = - _registerName1("allowsExpensiveNetworkAccess"); - late final _sel_allowsConstrainedNetworkAccess1 = - _registerName1("allowsConstrainedNetworkAccess"); - late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); - late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); - late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); - late final _sel_valueForHTTPHeaderField_1 = - _registerName1("valueForHTTPHeaderField:"); - late final _sel_HTTPBody1 = _registerName1("HTTPBody"); - late final _class_NSInputStream1 = _getClass1("NSInputStream"); - late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); - ffi.Pointer _objc_msgSend_357( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSGetSizeAndAlignment( + ffi.Pointer typePtr, + ffi.Pointer sizep, + ffi.Pointer alignp, ) { - return __objc_msgSend_357( - obj, - sel, + return _NSGetSizeAndAlignment( + typePtr, + sizep, + alignp, ); } - late final __objc_msgSend_357Ptr = _lookup< + late final _NSGetSizeAndAlignmentPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('NSGetSizeAndAlignment'); + late final _NSGetSizeAndAlignment = _NSGetSizeAndAlignmentPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_HTTPShouldHandleCookies1 = - _registerName1("HTTPShouldHandleCookies"); - late final _sel_HTTPShouldUsePipelining1 = - _registerName1("HTTPShouldUsePipelining"); - late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); - late final _sel_setURL_1 = _registerName1("setURL:"); - late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); - void _objc_msgSend_358( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void NSLog( + ffi.Pointer format, ) { - return __objc_msgSend_358( - obj, - sel, - value, + return _NSLog( + format, ); } - late final __objc_msgSend_358Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _NSLogPtr = + _lookup)>>( + 'NSLog'); + late final _NSLog = + _NSLogPtr.asFunction)>(); - late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); - late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); - late final _sel_setNetworkServiceType_1 = - _registerName1("setNetworkServiceType:"); - void _objc_msgSend_359( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void NSLogv( + ffi.Pointer format, + va_list args, ) { - return __objc_msgSend_359( - obj, - sel, - value, + return _NSLogv( + format, + args, ); } - late final __objc_msgSend_359Ptr = _lookup< + late final _NSLogvPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, va_list)>>('NSLogv'); + late final _NSLogv = + _NSLogvPtr.asFunction, va_list)>(); - late final _sel_setAllowsCellularAccess_1 = - _registerName1("setAllowsCellularAccess:"); - late final _sel_setAllowsExpensiveNetworkAccess_1 = - _registerName1("setAllowsExpensiveNetworkAccess:"); - late final _sel_setAllowsConstrainedNetworkAccess_1 = - _registerName1("setAllowsConstrainedNetworkAccess:"); - late final _sel_setAssumesHTTP3Capable_1 = - _registerName1("setAssumesHTTP3Capable:"); - late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); - late final _sel_setAllHTTPHeaderFields_1 = - _registerName1("setAllHTTPHeaderFields:"); - void _objc_msgSend_360( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_360( - obj, - sel, - value, - ); - } + late final ffi.Pointer _NSNotFound = + _lookup('NSNotFound'); - late final __objc_msgSend_360Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + int get NSNotFound => _NSNotFound.value; - late final _sel_setValue_forHTTPHeaderField_1 = - _registerName1("setValue:forHTTPHeaderField:"); - void _objc_msgSend_361( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer field, + set NSNotFound(int value) => _NSNotFound.value = value; + + ffi.Pointer _Block_copy1( + ffi.Pointer aBlock, ) { - return __objc_msgSend_361( - obj, - sel, - value, - field, + return __Block_copy1( + aBlock, ); } - late final __objc_msgSend_361Ptr = _lookup< + late final __Block_copy1Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('_Block_copy'); + late final __Block_copy1 = __Block_copy1Ptr + .asFunction Function(ffi.Pointer)>(); - late final _sel_addValue_forHTTPHeaderField_1 = - _registerName1("addValue:forHTTPHeaderField:"); - late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); - void _objc_msgSend_362( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + void _Block_release1( + ffi.Pointer aBlock, ) { - return __objc_msgSend_362( - obj, - sel, - value, + return __Block_release1( + aBlock, ); } - late final __objc_msgSend_362Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final __Block_release1Ptr = + _lookup)>>( + '_Block_release'); + late final __Block_release1 = + __Block_release1Ptr.asFunction)>(); - late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); - void _objc_msgSend_363( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + void _Block_object_assign( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_363( - obj, - sel, - value, + return __Block_object_assign( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_363Ptr = _lookup< + late final __Block_object_assignPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('_Block_object_assign'); + late final __Block_object_assign = __Block_object_assignPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_setHTTPShouldHandleCookies_1 = - _registerName1("setHTTPShouldHandleCookies:"); - late final _sel_setHTTPShouldUsePipelining_1 = - _registerName1("setHTTPShouldUsePipelining:"); - late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); - late final _sel_sharedHTTPCookieStorage1 = - _registerName1("sharedHTTPCookieStorage"); - ffi.Pointer _objc_msgSend_364( - ffi.Pointer obj, - ffi.Pointer sel, + void _Block_object_dispose( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_364( - obj, - sel, + return __Block_object_dispose( + arg0, + arg1, ); } - late final __objc_msgSend_364Ptr = _lookup< + late final __Block_object_disposePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Int)>>('_Block_object_dispose'); + late final __Block_object_dispose = __Block_object_disposePtr + .asFunction, int)>(); - late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = - _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); - ffi.Pointer _objc_msgSend_365( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, - ) { - return __objc_msgSend_365( - obj, - sel, - identifier, - ); + late final ffi.Pointer>> + __NSConcreteGlobalBlock = + _lookup>>('_NSConcreteGlobalBlock'); + + ffi.Pointer> get _NSConcreteGlobalBlock => + __NSConcreteGlobalBlock.value; + + set _NSConcreteGlobalBlock(ffi.Pointer> value) => + __NSConcreteGlobalBlock.value = value; + + late final ffi.Pointer>> + __NSConcreteStackBlock = + _lookup>>('_NSConcreteStackBlock'); + + ffi.Pointer> get _NSConcreteStackBlock => + __NSConcreteStackBlock.value; + + set _NSConcreteStackBlock(ffi.Pointer> value) => + __NSConcreteStackBlock.value = value; + + void Debugger() { + return _Debugger(); } - late final __objc_msgSend_365Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _DebuggerPtr = + _lookup>('Debugger'); + late final _Debugger = _DebuggerPtr.asFunction(); - late final _sel_cookies1 = _registerName1("cookies"); - late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); - late final _sel_setCookie_1 = _registerName1("setCookie:"); - void _objc_msgSend_366( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookie, + void DebugStr( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_366( - obj, - sel, - cookie, + return _DebugStr( + debuggerMsg, ); } - late final __objc_msgSend_366Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _DebugStrPtr = + _lookup>( + 'DebugStr'); + late final _DebugStr = + _DebugStrPtr.asFunction(); - late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); - late final _sel_removeCookiesSinceDate_1 = - _registerName1("removeCookiesSinceDate:"); - void _objc_msgSend_367( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, - ) { - return __objc_msgSend_367( - obj, - sel, - date, - ); + void SysBreak() { + return _SysBreak(); } - late final __objc_msgSend_367Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _SysBreakPtr = + _lookup>('SysBreak'); + late final _SysBreak = _SysBreakPtr.asFunction(); - late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); - late final _sel_setCookies_forURL_mainDocumentURL_1 = - _registerName1("setCookies:forURL:mainDocumentURL:"); - void _objc_msgSend_368( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer URL, - ffi.Pointer mainDocumentURL, + void SysBreakStr( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_368( - obj, - sel, - cookies, - URL, - mainDocumentURL, + return _SysBreakStr( + debuggerMsg, ); } - late final __objc_msgSend_368Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _SysBreakStrPtr = + _lookup>( + 'SysBreakStr'); + late final _SysBreakStr = + _SysBreakStrPtr.asFunction(); - late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); - int _objc_msgSend_369( - ffi.Pointer obj, - ffi.Pointer sel, + void SysBreakFunc( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_369( - obj, - sel, + return _SysBreakFunc( + debuggerMsg, ); } - late final __objc_msgSend_369Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _SysBreakFuncPtr = + _lookup>( + 'SysBreakFunc'); + late final _SysBreakFunc = + _SysBreakFuncPtr.asFunction(); - late final _sel_setCookieAcceptPolicy_1 = - _registerName1("setCookieAcceptPolicy:"); - void _objc_msgSend_370( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + late final ffi.Pointer _kCFCoreFoundationVersionNumber = + _lookup('kCFCoreFoundationVersionNumber'); + + double get kCFCoreFoundationVersionNumber => + _kCFCoreFoundationVersionNumber.value; + + set kCFCoreFoundationVersionNumber(double value) => + _kCFCoreFoundationVersionNumber.value = value; + + late final ffi.Pointer _kCFNotFound = + _lookup('kCFNotFound'); + + int get kCFNotFound => _kCFNotFound.value; + + set kCFNotFound(int value) => _kCFNotFound.value = value; + + CFRange __CFRangeMake( + int loc, + int len, ) { - return __objc_msgSend_370( - obj, - sel, - value, + return ___CFRangeMake( + loc, + len, ); } - late final __objc_msgSend_370Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final ___CFRangeMakePtr = + _lookup>( + '__CFRangeMake'); + late final ___CFRangeMake = + ___CFRangeMakePtr.asFunction(); - late final _sel_sortedCookiesUsingDescriptors_1 = - _registerName1("sortedCookiesUsingDescriptors:"); - late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); - late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); - late final _sel_originalRequest1 = _registerName1("originalRequest"); - ffi.Pointer _objc_msgSend_371( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_371( - obj, - sel, - ); + int CFNullGetTypeID() { + return _CFNullGetTypeID(); } - late final __objc_msgSend_371Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _CFNullGetTypeIDPtr = + _lookup>('CFNullGetTypeID'); + late final _CFNullGetTypeID = + _CFNullGetTypeIDPtr.asFunction(); - late final _sel_currentRequest1 = _registerName1("currentRequest"); - late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); - late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = - _registerName1( - "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); - instancetype _objc_msgSend_372( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - ffi.Pointer MIMEType, - int length, - ffi.Pointer name, + late final ffi.Pointer _kCFNull = _lookup('kCFNull'); + + CFNullRef get kCFNull => _kCFNull.value; + + set kCFNull(CFNullRef value) => _kCFNull.value = value; + + late final ffi.Pointer _kCFAllocatorDefault = + _lookup('kCFAllocatorDefault'); + + CFAllocatorRef get kCFAllocatorDefault => _kCFAllocatorDefault.value; + + set kCFAllocatorDefault(CFAllocatorRef value) => + _kCFAllocatorDefault.value = value; + + late final ffi.Pointer _kCFAllocatorSystemDefault = + _lookup('kCFAllocatorSystemDefault'); + + CFAllocatorRef get kCFAllocatorSystemDefault => + _kCFAllocatorSystemDefault.value; + + set kCFAllocatorSystemDefault(CFAllocatorRef value) => + _kCFAllocatorSystemDefault.value = value; + + late final ffi.Pointer _kCFAllocatorMalloc = + _lookup('kCFAllocatorMalloc'); + + CFAllocatorRef get kCFAllocatorMalloc => _kCFAllocatorMalloc.value; + + set kCFAllocatorMalloc(CFAllocatorRef value) => + _kCFAllocatorMalloc.value = value; + + late final ffi.Pointer _kCFAllocatorMallocZone = + _lookup('kCFAllocatorMallocZone'); + + CFAllocatorRef get kCFAllocatorMallocZone => _kCFAllocatorMallocZone.value; + + set kCFAllocatorMallocZone(CFAllocatorRef value) => + _kCFAllocatorMallocZone.value = value; + + late final ffi.Pointer _kCFAllocatorNull = + _lookup('kCFAllocatorNull'); + + CFAllocatorRef get kCFAllocatorNull => _kCFAllocatorNull.value; + + set kCFAllocatorNull(CFAllocatorRef value) => _kCFAllocatorNull.value = value; + + late final ffi.Pointer _kCFAllocatorUseContext = + _lookup('kCFAllocatorUseContext'); + + CFAllocatorRef get kCFAllocatorUseContext => _kCFAllocatorUseContext.value; + + set kCFAllocatorUseContext(CFAllocatorRef value) => + _kCFAllocatorUseContext.value = value; + + int CFAllocatorGetTypeID() { + return _CFAllocatorGetTypeID(); + } + + late final _CFAllocatorGetTypeIDPtr = + _lookup>('CFAllocatorGetTypeID'); + late final _CFAllocatorGetTypeID = + _CFAllocatorGetTypeIDPtr.asFunction(); + + void CFAllocatorSetDefault( + CFAllocatorRef allocator, ) { - return __objc_msgSend_372( - obj, - sel, - URL, - MIMEType, - length, - name, + return _CFAllocatorSetDefault( + allocator, ); } - late final __objc_msgSend_372Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + late final _CFAllocatorSetDefaultPtr = + _lookup>( + 'CFAllocatorSetDefault'); + late final _CFAllocatorSetDefault = + _CFAllocatorSetDefaultPtr.asFunction(); - late final _sel_MIMEType1 = _registerName1("MIMEType"); - late final _sel_expectedContentLength1 = - _registerName1("expectedContentLength"); - late final _sel_textEncodingName1 = _registerName1("textEncodingName"); - late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); - late final _sel_response1 = _registerName1("response"); - ffi.Pointer _objc_msgSend_373( - ffi.Pointer obj, - ffi.Pointer sel, + CFAllocatorRef CFAllocatorGetDefault() { + return _CFAllocatorGetDefault(); + } + + late final _CFAllocatorGetDefaultPtr = + _lookup>( + 'CFAllocatorGetDefault'); + late final _CFAllocatorGetDefault = + _CFAllocatorGetDefaultPtr.asFunction(); + + CFAllocatorRef CFAllocatorCreate( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return __objc_msgSend_373( - obj, - sel, + return _CFAllocatorCreate( + allocator, + context, ); } - late final __objc_msgSend_373Ptr = _lookup< + late final _CFAllocatorCreatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + CFAllocatorRef Function(CFAllocatorRef, + ffi.Pointer)>>('CFAllocatorCreate'); + late final _CFAllocatorCreate = _CFAllocatorCreatePtr.asFunction< + CFAllocatorRef Function( + CFAllocatorRef, ffi.Pointer)>(); - late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); - late final _sel_setEarliestBeginDate_1 = - _registerName1("setEarliestBeginDate:"); - void _objc_msgSend_374( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer CFAllocatorAllocate( + CFAllocatorRef allocator, + int size, + int hint, ) { - return __objc_msgSend_374( - obj, - sel, - value, + return _CFAllocatorAllocate( + allocator, + size, + hint, ); } - late final __objc_msgSend_374Ptr = _lookup< + late final _CFAllocatorAllocatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + CFAllocatorRef, CFIndex, CFOptionFlags)>>('CFAllocatorAllocate'); + late final _CFAllocatorAllocate = _CFAllocatorAllocatePtr.asFunction< + ffi.Pointer Function(CFAllocatorRef, int, int)>(); - late final _sel_countOfBytesClientExpectsToSend1 = - _registerName1("countOfBytesClientExpectsToSend"); - late final _sel_setCountOfBytesClientExpectsToSend_1 = - _registerName1("setCountOfBytesClientExpectsToSend:"); - late final _sel_countOfBytesClientExpectsToReceive1 = - _registerName1("countOfBytesClientExpectsToReceive"); - late final _sel_setCountOfBytesClientExpectsToReceive_1 = - _registerName1("setCountOfBytesClientExpectsToReceive:"); - late final _sel_countOfBytesReceived1 = - _registerName1("countOfBytesReceived"); - late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); - late final _sel_countOfBytesExpectedToSend1 = - _registerName1("countOfBytesExpectedToSend"); - late final _sel_countOfBytesExpectedToReceive1 = - _registerName1("countOfBytesExpectedToReceive"); - late final _sel_taskDescription1 = _registerName1("taskDescription"); - late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); - late final _sel_state1 = _registerName1("state"); - int _objc_msgSend_375( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer CFAllocatorReallocate( + CFAllocatorRef allocator, + ffi.Pointer ptr, + int newsize, + int hint, ) { - return __objc_msgSend_375( - obj, - sel, + return _CFAllocatorReallocate( + allocator, + ptr, + newsize, + hint, ); } - late final __objc_msgSend_375Ptr = _lookup< + late final _CFAllocatorReallocatePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer, + CFIndex, CFOptionFlags)>>('CFAllocatorReallocate'); + late final _CFAllocatorReallocate = _CFAllocatorReallocatePtr.asFunction< + ffi.Pointer Function( + CFAllocatorRef, ffi.Pointer, int, int)>(); - late final _sel_error1 = _registerName1("error"); - ffi.Pointer _objc_msgSend_376( - ffi.Pointer obj, - ffi.Pointer sel, + void CFAllocatorDeallocate( + CFAllocatorRef allocator, + ffi.Pointer ptr, ) { - return __objc_msgSend_376( - obj, - sel, + return _CFAllocatorDeallocate( + allocator, + ptr, ); } - late final __objc_msgSend_376Ptr = _lookup< + late final _CFAllocatorDeallocatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + CFAllocatorRef, ffi.Pointer)>>('CFAllocatorDeallocate'); + late final _CFAllocatorDeallocate = _CFAllocatorDeallocatePtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer)>(); - late final _sel_suspend1 = _registerName1("suspend"); - late final _sel_priority1 = _registerName1("priority"); - late final _sel_setPriority_1 = _registerName1("setPriority:"); - void _objc_msgSend_377( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + int CFAllocatorGetPreferredSizeForSize( + CFAllocatorRef allocator, + int size, + int hint, ) { - return __objc_msgSend_377( - obj, - sel, - value, + return _CFAllocatorGetPreferredSizeForSize( + allocator, + size, + hint, ); } - late final __objc_msgSend_377Ptr = _lookup< + late final _CFAllocatorGetPreferredSizeForSizePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); + CFIndex Function(CFAllocatorRef, CFIndex, + CFOptionFlags)>>('CFAllocatorGetPreferredSizeForSize'); + late final _CFAllocatorGetPreferredSizeForSize = + _CFAllocatorGetPreferredSizeForSizePtr.asFunction< + int Function(CFAllocatorRef, int, int)>(); - late final _sel_prefersIncrementalDelivery1 = - _registerName1("prefersIncrementalDelivery"); - late final _sel_setPrefersIncrementalDelivery_1 = - _registerName1("setPrefersIncrementalDelivery:"); - late final _sel_storeCookies_forTask_1 = - _registerName1("storeCookies:forTask:"); - void _objc_msgSend_378( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer task, + void CFAllocatorGetContext( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return __objc_msgSend_378( - obj, - sel, - cookies, - task, + return _CFAllocatorGetContext( + allocator, + context, ); } - late final __objc_msgSend_378Ptr = _lookup< + late final _CFAllocatorGetContextPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(CFAllocatorRef, + ffi.Pointer)>>('CFAllocatorGetContext'); + late final _CFAllocatorGetContext = _CFAllocatorGetContextPtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer)>(); - late final _sel_getCookiesForTask_completionHandler_1 = - _registerName1("getCookiesForTask:completionHandler:"); - void _objc_msgSend_379( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer<_ObjCBlock> completionHandler, + int CFGetTypeID( + CFTypeRef cf, ) { - return __objc_msgSend_379( - obj, - sel, - task, - completionHandler, + return _CFGetTypeID( + cf, ); } - late final __objc_msgSend_379Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + late final _CFGetTypeIDPtr = + _lookup>('CFGetTypeID'); + late final _CFGetTypeID = + _CFGetTypeIDPtr.asFunction(); - late final ffi.Pointer - _NSHTTPCookieManagerAcceptPolicyChangedNotification = - _lookup( - 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); + CFStringRef CFCopyTypeIDDescription( + int type_id, + ) { + return _CFCopyTypeIDDescription( + type_id, + ); + } - NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; + late final _CFCopyTypeIDDescriptionPtr = + _lookup>( + 'CFCopyTypeIDDescription'); + late final _CFCopyTypeIDDescription = + _CFCopyTypeIDDescriptionPtr.asFunction(); - set NSHTTPCookieManagerAcceptPolicyChangedNotification( - NSNotificationName value) => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; + CFTypeRef CFRetain( + CFTypeRef cf, + ) { + return _CFRetain( + cf, + ); + } - late final ffi.Pointer - _NSHTTPCookieManagerCookiesChangedNotification = - _lookup( - 'NSHTTPCookieManagerCookiesChangedNotification'); + late final _CFRetainPtr = + _lookup>('CFRetain'); + late final _CFRetain = + _CFRetainPtr.asFunction(); - NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => - _NSHTTPCookieManagerCookiesChangedNotification.value; + void CFRelease( + CFTypeRef cf, + ) { + return _CFRelease( + cf, + ); + } - set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => - _NSHTTPCookieManagerCookiesChangedNotification.value = value; + late final _CFReleasePtr = + _lookup>('CFRelease'); + late final _CFRelease = _CFReleasePtr.asFunction(); - late final ffi.Pointer - _NSProgressEstimatedTimeRemainingKey = - _lookup('NSProgressEstimatedTimeRemainingKey'); + CFTypeRef CFAutorelease( + CFTypeRef arg, + ) { + return _CFAutorelease( + arg, + ); + } - NSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => - _NSProgressEstimatedTimeRemainingKey.value; + late final _CFAutoreleasePtr = + _lookup>( + 'CFAutorelease'); + late final _CFAutorelease = + _CFAutoreleasePtr.asFunction(); - set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey value) => - _NSProgressEstimatedTimeRemainingKey.value = value; + int CFGetRetainCount( + CFTypeRef cf, + ) { + return _CFGetRetainCount( + cf, + ); + } - late final ffi.Pointer _NSProgressThroughputKey = - _lookup('NSProgressThroughputKey'); + late final _CFGetRetainCountPtr = + _lookup>( + 'CFGetRetainCount'); + late final _CFGetRetainCount = + _CFGetRetainCountPtr.asFunction(); - NSProgressUserInfoKey get NSProgressThroughputKey => - _NSProgressThroughputKey.value; + int CFEqual( + CFTypeRef cf1, + CFTypeRef cf2, + ) { + return _CFEqual( + cf1, + cf2, + ); + } - set NSProgressThroughputKey(NSProgressUserInfoKey value) => - _NSProgressThroughputKey.value = value; + late final _CFEqualPtr = + _lookup>( + 'CFEqual'); + late final _CFEqual = + _CFEqualPtr.asFunction(); - late final ffi.Pointer _NSProgressKindFile = - _lookup('NSProgressKindFile'); + int CFHash( + CFTypeRef cf, + ) { + return _CFHash( + cf, + ); + } - NSProgressKind get NSProgressKindFile => _NSProgressKindFile.value; + late final _CFHashPtr = + _lookup>('CFHash'); + late final _CFHash = _CFHashPtr.asFunction(); - set NSProgressKindFile(NSProgressKind value) => - _NSProgressKindFile.value = value; + CFStringRef CFCopyDescription( + CFTypeRef cf, + ) { + return _CFCopyDescription( + cf, + ); + } - late final ffi.Pointer - _NSProgressFileOperationKindKey = - _lookup('NSProgressFileOperationKindKey'); + late final _CFCopyDescriptionPtr = + _lookup>( + 'CFCopyDescription'); + late final _CFCopyDescription = + _CFCopyDescriptionPtr.asFunction(); - NSProgressUserInfoKey get NSProgressFileOperationKindKey => - _NSProgressFileOperationKindKey.value; + CFAllocatorRef CFGetAllocator( + CFTypeRef cf, + ) { + return _CFGetAllocator( + cf, + ); + } - set NSProgressFileOperationKindKey(NSProgressUserInfoKey value) => - _NSProgressFileOperationKindKey.value = value; + late final _CFGetAllocatorPtr = + _lookup>( + 'CFGetAllocator'); + late final _CFGetAllocator = + _CFGetAllocatorPtr.asFunction(); - late final ffi.Pointer - _NSProgressFileOperationKindDownloading = - _lookup( - 'NSProgressFileOperationKindDownloading'); + CFTypeRef CFMakeCollectable( + CFTypeRef cf, + ) { + return _CFMakeCollectable( + cf, + ); + } - NSProgressFileOperationKind get NSProgressFileOperationKindDownloading => - _NSProgressFileOperationKindDownloading.value; + late final _CFMakeCollectablePtr = + _lookup>( + 'CFMakeCollectable'); + late final _CFMakeCollectable = + _CFMakeCollectablePtr.asFunction(); - set NSProgressFileOperationKindDownloading( - NSProgressFileOperationKind value) => - _NSProgressFileOperationKindDownloading.value = value; + ffi.Pointer NSDefaultMallocZone() { + return _NSDefaultMallocZone(); + } - late final ffi.Pointer - _NSProgressFileOperationKindDecompressingAfterDownloading = - _lookup( - 'NSProgressFileOperationKindDecompressingAfterDownloading'); + late final _NSDefaultMallocZonePtr = + _lookup Function()>>( + 'NSDefaultMallocZone'); + late final _NSDefaultMallocZone = + _NSDefaultMallocZonePtr.asFunction Function()>(); - NSProgressFileOperationKind - get NSProgressFileOperationKindDecompressingAfterDownloading => - _NSProgressFileOperationKindDecompressingAfterDownloading.value; - - set NSProgressFileOperationKindDecompressingAfterDownloading( - NSProgressFileOperationKind value) => - _NSProgressFileOperationKindDecompressingAfterDownloading.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindReceiving = - _lookup( - 'NSProgressFileOperationKindReceiving'); - - NSProgressFileOperationKind get NSProgressFileOperationKindReceiving => - _NSProgressFileOperationKindReceiving.value; - - set NSProgressFileOperationKindReceiving(NSProgressFileOperationKind value) => - _NSProgressFileOperationKindReceiving.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindCopying = - _lookup( - 'NSProgressFileOperationKindCopying'); - - NSProgressFileOperationKind get NSProgressFileOperationKindCopying => - _NSProgressFileOperationKindCopying.value; - - set NSProgressFileOperationKindCopying(NSProgressFileOperationKind value) => - _NSProgressFileOperationKindCopying.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindUploading = - _lookup( - 'NSProgressFileOperationKindUploading'); - - NSProgressFileOperationKind get NSProgressFileOperationKindUploading => - _NSProgressFileOperationKindUploading.value; - - set NSProgressFileOperationKindUploading(NSProgressFileOperationKind value) => - _NSProgressFileOperationKindUploading.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindDuplicating = - _lookup( - 'NSProgressFileOperationKindDuplicating'); - - NSProgressFileOperationKind get NSProgressFileOperationKindDuplicating => - _NSProgressFileOperationKindDuplicating.value; - - set NSProgressFileOperationKindDuplicating( - NSProgressFileOperationKind value) => - _NSProgressFileOperationKindDuplicating.value = value; - - late final ffi.Pointer _NSProgressFileURLKey = - _lookup('NSProgressFileURLKey'); - - NSProgressUserInfoKey get NSProgressFileURLKey => _NSProgressFileURLKey.value; - - set NSProgressFileURLKey(NSProgressUserInfoKey value) => - _NSProgressFileURLKey.value = value; - - late final ffi.Pointer _NSProgressFileTotalCountKey = - _lookup('NSProgressFileTotalCountKey'); - - NSProgressUserInfoKey get NSProgressFileTotalCountKey => - _NSProgressFileTotalCountKey.value; - - set NSProgressFileTotalCountKey(NSProgressUserInfoKey value) => - _NSProgressFileTotalCountKey.value = value; - - late final ffi.Pointer - _NSProgressFileCompletedCountKey = - _lookup('NSProgressFileCompletedCountKey'); - - NSProgressUserInfoKey get NSProgressFileCompletedCountKey => - _NSProgressFileCompletedCountKey.value; - - set NSProgressFileCompletedCountKey(NSProgressUserInfoKey value) => - _NSProgressFileCompletedCountKey.value = value; - - late final ffi.Pointer - _NSProgressFileAnimationImageKey = - _lookup('NSProgressFileAnimationImageKey'); - - NSProgressUserInfoKey get NSProgressFileAnimationImageKey => - _NSProgressFileAnimationImageKey.value; - - set NSProgressFileAnimationImageKey(NSProgressUserInfoKey value) => - _NSProgressFileAnimationImageKey.value = value; - - late final ffi.Pointer - _NSProgressFileAnimationImageOriginalRectKey = - _lookup( - 'NSProgressFileAnimationImageOriginalRectKey'); - - NSProgressUserInfoKey get NSProgressFileAnimationImageOriginalRectKey => - _NSProgressFileAnimationImageOriginalRectKey.value; - - set NSProgressFileAnimationImageOriginalRectKey( - NSProgressUserInfoKey value) => - _NSProgressFileAnimationImageOriginalRectKey.value = value; - - late final ffi.Pointer _NSProgressFileIconKey = - _lookup('NSProgressFileIconKey'); - - NSProgressUserInfoKey get NSProgressFileIconKey => - _NSProgressFileIconKey.value; - - set NSProgressFileIconKey(NSProgressUserInfoKey value) => - _NSProgressFileIconKey.value = value; - - late final ffi.Pointer _kCFTypeArrayCallBacks = - _lookup('kCFTypeArrayCallBacks'); + ffi.Pointer NSCreateZone( + int startSize, + int granularity, + bool canFree, + ) { + return _NSCreateZone( + startSize, + granularity, + canFree, + ); + } - CFArrayCallBacks get kCFTypeArrayCallBacks => _kCFTypeArrayCallBacks.ref; + late final _NSCreateZonePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + NSUInteger, NSUInteger, ffi.Bool)>>('NSCreateZone'); + late final _NSCreateZone = _NSCreateZonePtr.asFunction< + ffi.Pointer Function(int, int, bool)>(); - int CFArrayGetTypeID() { - return _CFArrayGetTypeID(); + void NSRecycleZone( + ffi.Pointer zone, + ) { + return _NSRecycleZone( + zone, + ); } - late final _CFArrayGetTypeIDPtr = - _lookup>('CFArrayGetTypeID'); - late final _CFArrayGetTypeID = - _CFArrayGetTypeIDPtr.asFunction(); + late final _NSRecycleZonePtr = + _lookup)>>( + 'NSRecycleZone'); + late final _NSRecycleZone = + _NSRecycleZonePtr.asFunction)>(); - CFArrayRef CFArrayCreate( - CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + void NSSetZoneName( + ffi.Pointer zone, + ffi.Pointer name, ) { - return _CFArrayCreate( - allocator, - values, - numValues, - callBacks, + return _NSSetZoneName( + zone, + name, ); } - late final _CFArrayCreatePtr = _lookup< + late final _NSSetZoneNamePtr = _lookup< ffi.NativeFunction< - CFArrayRef Function( - CFAllocatorRef, - ffi.Pointer>, - CFIndex, - ffi.Pointer)>>('CFArrayCreate'); - late final _CFArrayCreate = _CFArrayCreatePtr.asFunction< - CFArrayRef Function(CFAllocatorRef, ffi.Pointer>, - int, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('NSSetZoneName'); + late final _NSSetZoneName = _NSSetZoneNamePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - CFArrayRef CFArrayCreateCopy( - CFAllocatorRef allocator, - CFArrayRef theArray, + ffi.Pointer NSZoneName( + ffi.Pointer zone, ) { - return _CFArrayCreateCopy( - allocator, - theArray, + return _NSZoneName( + zone, ); } - late final _CFArrayCreateCopyPtr = _lookup< - ffi.NativeFunction>( - 'CFArrayCreateCopy'); - late final _CFArrayCreateCopy = _CFArrayCreateCopyPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFArrayRef)>(); + late final _NSZoneNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('NSZoneName'); + late final _NSZoneName = _NSZoneNamePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - CFMutableArrayRef CFArrayCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + ffi.Pointer NSZoneFromPointer( + ffi.Pointer ptr, ) { - return _CFArrayCreateMutable( - allocator, - capacity, - callBacks, + return _NSZoneFromPointer( + ptr, ); } - late final _CFArrayCreateMutablePtr = _lookup< + late final _NSZoneFromPointerPtr = _lookup< ffi.NativeFunction< - CFMutableArrayRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFArrayCreateMutable'); - late final _CFArrayCreateMutable = _CFArrayCreateMutablePtr.asFunction< - CFMutableArrayRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSZoneFromPointer'); + late final _NSZoneFromPointer = _NSZoneFromPointerPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - CFMutableArrayRef CFArrayCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFArrayRef theArray, + ffi.Pointer NSZoneMalloc( + ffi.Pointer zone, + int size, ) { - return _CFArrayCreateMutableCopy( - allocator, - capacity, - theArray, + return _NSZoneMalloc( + zone, + size, ); } - late final _CFArrayCreateMutableCopyPtr = _lookup< + late final _NSZoneMallocPtr = _lookup< ffi.NativeFunction< - CFMutableArrayRef Function(CFAllocatorRef, CFIndex, - CFArrayRef)>>('CFArrayCreateMutableCopy'); - late final _CFArrayCreateMutableCopy = - _CFArrayCreateMutableCopyPtr.asFunction< - CFMutableArrayRef Function(CFAllocatorRef, int, CFArrayRef)>(); + ffi.Pointer Function( + ffi.Pointer, NSUInteger)>>('NSZoneMalloc'); + late final _NSZoneMalloc = _NSZoneMallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int)>(); - int CFArrayGetCount( - CFArrayRef theArray, + ffi.Pointer NSZoneCalloc( + ffi.Pointer zone, + int numElems, + int byteSize, ) { - return _CFArrayGetCount( - theArray, + return _NSZoneCalloc( + zone, + numElems, + byteSize, ); } - late final _CFArrayGetCountPtr = - _lookup>( - 'CFArrayGetCount'); - late final _CFArrayGetCount = - _CFArrayGetCountPtr.asFunction(); + late final _NSZoneCallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, NSUInteger, NSUInteger)>>('NSZoneCalloc'); + late final _NSZoneCalloc = _NSZoneCallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - int CFArrayGetCountOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + ffi.Pointer NSZoneRealloc( + ffi.Pointer zone, + ffi.Pointer ptr, + int size, ) { - return _CFArrayGetCountOfValue( - theArray, - range, - value, + return _NSZoneRealloc( + zone, + ptr, + size, ); } - late final _CFArrayGetCountOfValuePtr = _lookup< + late final _NSZoneReallocPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetCountOfValue'); - late final _CFArrayGetCountOfValue = _CFArrayGetCountOfValuePtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('NSZoneRealloc'); + late final _NSZoneRealloc = _NSZoneReallocPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int CFArrayContainsValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + void NSZoneFree( + ffi.Pointer zone, + ffi.Pointer ptr, ) { - return _CFArrayContainsValue( - theArray, - range, - value, + return _NSZoneFree( + zone, + ptr, ); } - late final _CFArrayContainsValuePtr = _lookup< + late final _NSZoneFreePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayContainsValue'); - late final _CFArrayContainsValue = _CFArrayContainsValuePtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('NSZoneFree'); + late final _NSZoneFree = _NSZoneFreePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer CFArrayGetValueAtIndex( - CFArrayRef theArray, - int idx, + ffi.Pointer NSAllocateCollectable( + int size, + int options, ) { - return _CFArrayGetValueAtIndex( - theArray, - idx, + return _NSAllocateCollectable( + size, + options, ); } - late final _CFArrayGetValueAtIndexPtr = _lookup< + late final _NSAllocateCollectablePtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - CFArrayRef, CFIndex)>>('CFArrayGetValueAtIndex'); - late final _CFArrayGetValueAtIndex = _CFArrayGetValueAtIndexPtr.asFunction< - ffi.Pointer Function(CFArrayRef, int)>(); + NSUInteger, NSUInteger)>>('NSAllocateCollectable'); + late final _NSAllocateCollectable = _NSAllocateCollectablePtr.asFunction< + ffi.Pointer Function(int, int)>(); - void CFArrayGetValues( - CFArrayRef theArray, - CFRange range, - ffi.Pointer> values, + ffi.Pointer NSReallocateCollectable( + ffi.Pointer ptr, + int size, + int options, ) { - return _CFArrayGetValues( - theArray, - range, - values, + return _NSReallocateCollectable( + ptr, + size, + options, ); } - late final _CFArrayGetValuesPtr = _lookup< + late final _NSReallocateCollectablePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFArrayRef, CFRange, - ffi.Pointer>)>>('CFArrayGetValues'); - late final _CFArrayGetValues = _CFArrayGetValuesPtr.asFunction< - void Function(CFArrayRef, CFRange, ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, NSUInteger, + NSUInteger)>>('NSReallocateCollectable'); + late final _NSReallocateCollectable = _NSReallocateCollectablePtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - void CFArrayApplyFunction( - CFArrayRef theArray, - CFRange range, - CFArrayApplierFunction applier, - ffi.Pointer context, - ) { - return _CFArrayApplyFunction( - theArray, - range, - applier, - context, - ); + int NSPageSize() { + return _NSPageSize(); } - late final _CFArrayApplyFunctionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFArrayRef, CFRange, CFArrayApplierFunction, - ffi.Pointer)>>('CFArrayApplyFunction'); - late final _CFArrayApplyFunction = _CFArrayApplyFunctionPtr.asFunction< - void Function(CFArrayRef, CFRange, CFArrayApplierFunction, - ffi.Pointer)>(); + late final _NSPageSizePtr = + _lookup>('NSPageSize'); + late final _NSPageSize = _NSPageSizePtr.asFunction(); - int CFArrayGetFirstIndexOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + int NSLogPageSize() { + return _NSLogPageSize(); + } + + late final _NSLogPageSizePtr = + _lookup>('NSLogPageSize'); + late final _NSLogPageSize = _NSLogPageSizePtr.asFunction(); + + int NSRoundUpToMultipleOfPageSize( + int bytes, ) { - return _CFArrayGetFirstIndexOfValue( - theArray, - range, - value, + return _NSRoundUpToMultipleOfPageSize( + bytes, ); } - late final _CFArrayGetFirstIndexOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetFirstIndexOfValue'); - late final _CFArrayGetFirstIndexOfValue = _CFArrayGetFirstIndexOfValuePtr - .asFunction)>(); + late final _NSRoundUpToMultipleOfPageSizePtr = + _lookup>( + 'NSRoundUpToMultipleOfPageSize'); + late final _NSRoundUpToMultipleOfPageSize = + _NSRoundUpToMultipleOfPageSizePtr.asFunction(); - int CFArrayGetLastIndexOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + int NSRoundDownToMultipleOfPageSize( + int bytes, ) { - return _CFArrayGetLastIndexOfValue( - theArray, - range, - value, + return _NSRoundDownToMultipleOfPageSize( + bytes, ); } - late final _CFArrayGetLastIndexOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetLastIndexOfValue'); - late final _CFArrayGetLastIndexOfValue = _CFArrayGetLastIndexOfValuePtr - .asFunction)>(); + late final _NSRoundDownToMultipleOfPageSizePtr = + _lookup>( + 'NSRoundDownToMultipleOfPageSize'); + late final _NSRoundDownToMultipleOfPageSize = + _NSRoundDownToMultipleOfPageSizePtr.asFunction(); - int CFArrayBSearchValues( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, - CFComparatorFunction comparator, - ffi.Pointer context, + ffi.Pointer NSAllocateMemoryPages( + int bytes, ) { - return _CFArrayBSearchValues( - theArray, - range, - value, - comparator, - context, + return _NSAllocateMemoryPages( + bytes, ); } - late final _CFArrayBSearchValuesPtr = _lookup< - ffi.NativeFunction< - CFIndex Function( - CFArrayRef, - CFRange, - ffi.Pointer, - CFComparatorFunction, - ffi.Pointer)>>('CFArrayBSearchValues'); - late final _CFArrayBSearchValues = _CFArrayBSearchValuesPtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer, - CFComparatorFunction, ffi.Pointer)>(); + late final _NSAllocateMemoryPagesPtr = + _lookup Function(NSUInteger)>>( + 'NSAllocateMemoryPages'); + late final _NSAllocateMemoryPages = _NSAllocateMemoryPagesPtr.asFunction< + ffi.Pointer Function(int)>(); - void CFArrayAppendValue( - CFMutableArrayRef theArray, - ffi.Pointer value, + void NSDeallocateMemoryPages( + ffi.Pointer ptr, + int bytes, ) { - return _CFArrayAppendValue( - theArray, - value, + return _NSDeallocateMemoryPages( + ptr, + bytes, ); } - late final _CFArrayAppendValuePtr = _lookup< + late final _NSDeallocateMemoryPagesPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - CFMutableArrayRef, ffi.Pointer)>>('CFArrayAppendValue'); - late final _CFArrayAppendValue = _CFArrayAppendValuePtr.asFunction< - void Function(CFMutableArrayRef, ffi.Pointer)>(); + ffi.Pointer, NSUInteger)>>('NSDeallocateMemoryPages'); + late final _NSDeallocateMemoryPages = _NSDeallocateMemoryPagesPtr.asFunction< + void Function(ffi.Pointer, int)>(); - void CFArrayInsertValueAtIndex( - CFMutableArrayRef theArray, - int idx, - ffi.Pointer value, + void NSCopyMemoryPages( + ffi.Pointer source, + ffi.Pointer dest, + int bytes, ) { - return _CFArrayInsertValueAtIndex( - theArray, - idx, - value, + return _NSCopyMemoryPages( + source, + dest, + bytes, ); } - late final _CFArrayInsertValueAtIndexPtr = _lookup< + late final _NSCopyMemoryPagesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - ffi.Pointer)>>('CFArrayInsertValueAtIndex'); - late final _CFArrayInsertValueAtIndex = - _CFArrayInsertValueAtIndexPtr.asFunction< - void Function(CFMutableArrayRef, int, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('NSCopyMemoryPages'); + late final _NSCopyMemoryPages = _NSCopyMemoryPagesPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - void CFArraySetValueAtIndex( - CFMutableArrayRef theArray, - int idx, - ffi.Pointer value, - ) { - return _CFArraySetValueAtIndex( - theArray, - idx, - value, - ); + int NSRealMemoryAvailable() { + return _NSRealMemoryAvailable(); } - late final _CFArraySetValueAtIndexPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - ffi.Pointer)>>('CFArraySetValueAtIndex'); - late final _CFArraySetValueAtIndex = _CFArraySetValueAtIndexPtr.asFunction< - void Function(CFMutableArrayRef, int, ffi.Pointer)>(); + late final _NSRealMemoryAvailablePtr = + _lookup>( + 'NSRealMemoryAvailable'); + late final _NSRealMemoryAvailable = + _NSRealMemoryAvailablePtr.asFunction(); - void CFArrayRemoveValueAtIndex( - CFMutableArrayRef theArray, - int idx, + ffi.Pointer NSAllocateObject( + ffi.Pointer aClass, + int extraBytes, + ffi.Pointer zone, ) { - return _CFArrayRemoveValueAtIndex( - theArray, - idx, + return _NSAllocateObject( + aClass, + extraBytes, + zone, ); } - late final _CFArrayRemoveValueAtIndexPtr = _lookup< - ffi.NativeFunction>( - 'CFArrayRemoveValueAtIndex'); - late final _CFArrayRemoveValueAtIndex = _CFArrayRemoveValueAtIndexPtr - .asFunction(); + late final _NSAllocateObjectPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, NSUInteger, + ffi.Pointer)>>('NSAllocateObject'); + late final _NSAllocateObject = _NSAllocateObjectPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - void CFArrayRemoveAllValues( - CFMutableArrayRef theArray, + void NSDeallocateObject( + ffi.Pointer object, ) { - return _CFArrayRemoveAllValues( - theArray, + return _NSDeallocateObject( + object, ); } - late final _CFArrayRemoveAllValuesPtr = - _lookup>( - 'CFArrayRemoveAllValues'); - late final _CFArrayRemoveAllValues = - _CFArrayRemoveAllValuesPtr.asFunction(); + late final _NSDeallocateObjectPtr = + _lookup)>>( + 'NSDeallocateObject'); + late final _NSDeallocateObject = _NSDeallocateObjectPtr.asFunction< + void Function(ffi.Pointer)>(); - void CFArrayReplaceValues( - CFMutableArrayRef theArray, - CFRange range, - ffi.Pointer> newValues, - int newCount, + ffi.Pointer NSCopyObject( + ffi.Pointer object, + int extraBytes, + ffi.Pointer zone, ) { - return _CFArrayReplaceValues( - theArray, - range, - newValues, - newCount, + return _NSCopyObject( + object, + extraBytes, + zone, ); } - late final _CFArrayReplaceValuesPtr = _lookup< + late final _NSCopyObjectPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableArrayRef, - CFRange, - ffi.Pointer>, - CFIndex)>>('CFArrayReplaceValues'); - late final _CFArrayReplaceValues = _CFArrayReplaceValuesPtr.asFunction< - void Function(CFMutableArrayRef, CFRange, - ffi.Pointer>, int)>(); + ffi.Pointer Function(ffi.Pointer, NSUInteger, + ffi.Pointer)>>('NSCopyObject'); + late final _NSCopyObject = _NSCopyObjectPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - void CFArrayExchangeValuesAtIndices( - CFMutableArrayRef theArray, - int idx1, - int idx2, + bool NSShouldRetainWithZone( + ffi.Pointer anObject, + ffi.Pointer requestedZone, ) { - return _CFArrayExchangeValuesAtIndices( - theArray, - idx1, - idx2, + return _NSShouldRetainWithZone( + anObject, + requestedZone, ); } - late final _CFArrayExchangeValuesAtIndicesPtr = _lookup< + late final _NSShouldRetainWithZonePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - CFIndex)>>('CFArrayExchangeValuesAtIndices'); - late final _CFArrayExchangeValuesAtIndices = - _CFArrayExchangeValuesAtIndicesPtr.asFunction< - void Function(CFMutableArrayRef, int, int)>(); + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>('NSShouldRetainWithZone'); + late final _NSShouldRetainWithZone = _NSShouldRetainWithZonePtr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - void CFArraySortValues( - CFMutableArrayRef theArray, - CFRange range, - CFComparatorFunction comparator, - ffi.Pointer context, + void NSIncrementExtraRefCount( + ffi.Pointer object, ) { - return _CFArraySortValues( - theArray, - range, - comparator, - context, + return _NSIncrementExtraRefCount( + object, ); } - late final _CFArraySortValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, - ffi.Pointer)>>('CFArraySortValues'); - late final _CFArraySortValues = _CFArraySortValuesPtr.asFunction< - void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, - ffi.Pointer)>(); + late final _NSIncrementExtraRefCountPtr = + _lookup)>>( + 'NSIncrementExtraRefCount'); + late final _NSIncrementExtraRefCount = _NSIncrementExtraRefCountPtr + .asFunction)>(); - void CFArrayAppendArray( - CFMutableArrayRef theArray, - CFArrayRef otherArray, - CFRange otherRange, + bool NSDecrementExtraRefCountWasZero( + ffi.Pointer object, ) { - return _CFArrayAppendArray( - theArray, - otherArray, - otherRange, + return _NSDecrementExtraRefCountWasZero( + object, ); } - late final _CFArrayAppendArrayPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableArrayRef, CFArrayRef, CFRange)>>('CFArrayAppendArray'); - late final _CFArrayAppendArray = _CFArrayAppendArrayPtr.asFunction< - void Function(CFMutableArrayRef, CFArrayRef, CFRange)>(); + late final _NSDecrementExtraRefCountWasZeroPtr = + _lookup)>>( + 'NSDecrementExtraRefCountWasZero'); + late final _NSDecrementExtraRefCountWasZero = + _NSDecrementExtraRefCountWasZeroPtr.asFunction< + bool Function(ffi.Pointer)>(); - late final _class_OS_object1 = _getClass1("OS_object"); - ffi.Pointer os_retain( - ffi.Pointer object, + int NSExtraRefCount( + ffi.Pointer object, ) { - return _os_retain( + return _NSExtraRefCount( object, ); } - late final _os_retainPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('os_retain'); - late final _os_retain = _os_retainPtr - .asFunction Function(ffi.Pointer)>(); + late final _NSExtraRefCountPtr = + _lookup)>>( + 'NSExtraRefCount'); + late final _NSExtraRefCount = + _NSExtraRefCountPtr.asFunction)>(); - void os_release( - ffi.Pointer object, + NSRange NSUnionRange( + NSRange range1, + NSRange range2, ) { - return _os_release( - object, + return _NSUnionRange( + range1, + range2, ); } - late final _os_releasePtr = - _lookup)>>( - 'os_release'); - late final _os_release = - _os_releasePtr.asFunction)>(); + late final _NSUnionRangePtr = + _lookup>( + 'NSUnionRange'); + late final _NSUnionRange = + _NSUnionRangePtr.asFunction(); - ffi.Pointer sec_retain( - ffi.Pointer obj, + NSRange NSIntersectionRange( + NSRange range1, + NSRange range2, ) { - return _sec_retain( - obj, + return _NSIntersectionRange( + range1, + range2, ); } - late final _sec_retainPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('sec_retain'); - late final _sec_retain = _sec_retainPtr - .asFunction Function(ffi.Pointer)>(); + late final _NSIntersectionRangePtr = + _lookup>( + 'NSIntersectionRange'); + late final _NSIntersectionRange = + _NSIntersectionRangePtr.asFunction(); - void sec_release( - ffi.Pointer obj, + ffi.Pointer NSStringFromRange( + NSRange range, ) { - return _sec_release( - obj, + return _NSStringFromRange( + range, ); } - late final _sec_releasePtr = - _lookup)>>( - 'sec_release'); - late final _sec_release = - _sec_releasePtr.asFunction)>(); + late final _NSStringFromRangePtr = + _lookup Function(NSRange)>>( + 'NSStringFromRange'); + late final _NSStringFromRange = _NSStringFromRangePtr.asFunction< + ffi.Pointer Function(NSRange)>(); - CFStringRef SecCopyErrorMessageString( - int status, - ffi.Pointer reserved, + NSRange NSRangeFromString( + ffi.Pointer aString, ) { - return _SecCopyErrorMessageString( - status, - reserved, + return _NSRangeFromString( + aString, ); } - late final _SecCopyErrorMessageStringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - OSStatus, ffi.Pointer)>>('SecCopyErrorMessageString'); - late final _SecCopyErrorMessageString = _SecCopyErrorMessageStringPtr - .asFunction)>(); + late final _NSRangeFromStringPtr = + _lookup)>>( + 'NSRangeFromString'); + late final _NSRangeFromString = _NSRangeFromStringPtr.asFunction< + NSRange Function(ffi.Pointer)>(); - void __assert_rtn( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + late final _class_NSMutableIndexSet1 = _getClass1("NSMutableIndexSet"); + late final _sel_addIndexes_1 = _registerName1("addIndexes:"); + void _objc_msgSend_285( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexSet, ) { - return ___assert_rtn( - arg0, - arg1, - arg2, - arg3, + return __objc_msgSend_285( + obj, + sel, + indexSet, ); } - late final ___assert_rtnPtr = _lookup< + late final __objc_msgSend_285Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int, ffi.Pointer)>>('__assert_rtn'); - late final ___assert_rtn = ___assert_rtnPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final ffi.Pointer<_RuneLocale> __DefaultRuneLocale = - _lookup<_RuneLocale>('_DefaultRuneLocale'); - - _RuneLocale get _DefaultRuneLocale => __DefaultRuneLocale.ref; - - late final ffi.Pointer> __CurrentRuneLocale = - _lookup>('_CurrentRuneLocale'); - - ffi.Pointer<_RuneLocale> get _CurrentRuneLocale => __CurrentRuneLocale.value; - - set _CurrentRuneLocale(ffi.Pointer<_RuneLocale> value) => - __CurrentRuneLocale.value = value; + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int ___runetype( - int arg0, + late final _sel_removeIndexes_1 = _registerName1("removeIndexes:"); + late final _sel_removeAllIndexes1 = _registerName1("removeAllIndexes"); + late final _sel_addIndex_1 = _registerName1("addIndex:"); + void _objc_msgSend_286( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return ____runetype( - arg0, + return __objc_msgSend_286( + obj, + sel, + value, ); } - late final ____runetypePtr = _lookup< - ffi.NativeFunction>( - '___runetype'); - late final ____runetype = ____runetypePtr.asFunction(); + late final __objc_msgSend_286Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int ___tolower( - int arg0, + late final _sel_removeIndex_1 = _registerName1("removeIndex:"); + late final _sel_addIndexesInRange_1 = _registerName1("addIndexesInRange:"); + void _objc_msgSend_287( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, ) { - return ____tolower( - arg0, + return __objc_msgSend_287( + obj, + sel, + range, ); } - late final ____tolowerPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '___tolower'); - late final ____tolower = ____tolowerPtr.asFunction(); + late final __objc_msgSend_287Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange)>(); - int ___toupper( - int arg0, + late final _sel_removeIndexesInRange_1 = + _registerName1("removeIndexesInRange:"); + late final _sel_shiftIndexesStartingAtIndex_by_1 = + _registerName1("shiftIndexesStartingAtIndex:by:"); + void _objc_msgSend_288( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + int delta, ) { - return ____toupper( - arg0, + return __objc_msgSend_288( + obj, + sel, + index, + delta, ); } - late final ____toupperPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '___toupper'); - late final ____toupper = ____toupperPtr.asFunction(); + late final __objc_msgSend_288Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - int __maskrune( - int arg0, - int arg1, + late final _class_NSMutableArray1 = _getClass1("NSMutableArray"); + late final _sel_addObject_1 = _registerName1("addObject:"); + late final _sel_insertObject_atIndex_1 = + _registerName1("insertObject:atIndex:"); + void _objc_msgSend_289( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + int index, ) { - return ___maskrune( - arg0, - arg1, + return __objc_msgSend_289( + obj, + sel, + anObject, + index, ); } - late final ___maskrunePtr = _lookup< + late final __objc_msgSend_289Ptr = _lookup< ffi.NativeFunction< - ffi.Int Function( - __darwin_ct_rune_t, ffi.UnsignedLong)>>('__maskrune'); - late final ___maskrune = ___maskrunePtr.asFunction(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - int __toupper( - int arg0, + late final _sel_removeLastObject1 = _registerName1("removeLastObject"); + late final _sel_removeObjectAtIndex_1 = + _registerName1("removeObjectAtIndex:"); + late final _sel_replaceObjectAtIndex_withObject_1 = + _registerName1("replaceObjectAtIndex:withObject:"); + void _objc_msgSend_290( + ffi.Pointer obj, + ffi.Pointer sel, + int index, + ffi.Pointer anObject, ) { - return ___toupper1( - arg0, + return __objc_msgSend_290( + obj, + sel, + index, + anObject, ); } - late final ___toupperPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '__toupper'); - late final ___toupper1 = ___toupperPtr.asFunction(); + late final __objc_msgSend_290Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); - int __tolower( - int arg0, + late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); + late final _sel_addObjectsFromArray_1 = + _registerName1("addObjectsFromArray:"); + void _objc_msgSend_291( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherArray, ) { - return ___tolower1( - arg0, + return __objc_msgSend_291( + obj, + sel, + otherArray, ); } - late final ___tolowerPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '__tolower'); - late final ___tolower1 = ___tolowerPtr.asFunction(); + late final __objc_msgSend_291Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer __error() { - return ___error(); + late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = + _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); + void _objc_msgSend_292( + ffi.Pointer obj, + ffi.Pointer sel, + int idx1, + int idx2, + ) { + return __objc_msgSend_292( + obj, + sel, + idx1, + idx2, + ); } - late final ___errorPtr = - _lookup Function()>>('__error'); - late final ___error = - ___errorPtr.asFunction Function()>(); - - ffi.Pointer localeconv() { - return _localeconv(); - } - - late final _localeconvPtr = - _lookup Function()>>('localeconv'); - late final _localeconv = - _localeconvPtr.asFunction Function()>(); + late final __objc_msgSend_292Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); - ffi.Pointer setlocale( - int arg0, - ffi.Pointer arg1, + late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); + late final _sel_removeObject_inRange_1 = + _registerName1("removeObject:inRange:"); + void _objc_msgSend_293( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + NSRange range, ) { - return _setlocale( - arg0, - arg1, + return __objc_msgSend_293( + obj, + sel, + anObject, + range, ); } - late final _setlocalePtr = _lookup< + late final __objc_msgSend_293Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer)>>('setlocale'); - late final _setlocale = _setlocalePtr - .asFunction Function(int, ffi.Pointer)>(); - - int __math_errhandling() { - return ___math_errhandling(); - } - - late final ___math_errhandlingPtr = - _lookup>('__math_errhandling'); - late final ___math_errhandling = - ___math_errhandlingPtr.asFunction(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRange)>(); - int __fpclassifyf( - double arg0, + late final _sel_removeObject_1 = _registerName1("removeObject:"); + late final _sel_removeObjectIdenticalTo_inRange_1 = + _registerName1("removeObjectIdenticalTo:inRange:"); + late final _sel_removeObjectIdenticalTo_1 = + _registerName1("removeObjectIdenticalTo:"); + late final _sel_removeObjectsFromIndices_numIndices_1 = + _registerName1("removeObjectsFromIndices:numIndices:"); + void _objc_msgSend_294( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indices, + int cnt, ) { - return ___fpclassifyf( - arg0, + return __objc_msgSend_294( + obj, + sel, + indices, + cnt, ); } - late final ___fpclassifyfPtr = - _lookup>('__fpclassifyf'); - late final ___fpclassifyf = - ___fpclassifyfPtr.asFunction(); + late final __objc_msgSend_294Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - int __fpclassifyd( - double arg0, + late final _sel_removeObjectsInArray_1 = + _registerName1("removeObjectsInArray:"); + late final _sel_removeObjectsInRange_1 = + _registerName1("removeObjectsInRange:"); + late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = + _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); + void _objc_msgSend_295( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer otherArray, + NSRange otherRange, ) { - return ___fpclassifyd( - arg0, + return __objc_msgSend_295( + obj, + sel, + range, + otherArray, + otherRange, ); } - late final ___fpclassifydPtr = - _lookup>( - '__fpclassifyd'); - late final ___fpclassifyd = - ___fpclassifydPtr.asFunction(); + late final __objc_msgSend_295Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer, NSRange)>(); - double acosf( - double arg0, + late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = + _registerName1("replaceObjectsInRange:withObjectsFromArray:"); + void _objc_msgSend_296( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer otherArray, ) { - return _acosf( - arg0, + return __objc_msgSend_296( + obj, + sel, + range, + otherArray, ); } - late final _acosfPtr = - _lookup>('acosf'); - late final _acosf = _acosfPtr.asFunction(); + late final __objc_msgSend_296Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); - double acos( - double arg0, + late final _sel_setArray_1 = _registerName1("setArray:"); + late final _sel_sortUsingFunction_context_1 = + _registerName1("sortUsingFunction:context:"); + void _objc_msgSend_297( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context, ) { - return _acos( - arg0, + return __objc_msgSend_297( + obj, + sel, + compare, + context, ); } - late final _acosPtr = - _lookup>('acos'); - late final _acos = _acosPtr.asFunction(); + late final __objc_msgSend_297Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); - double asinf( - double arg0, + late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); + late final _sel_insertObjects_atIndexes_1 = + _registerName1("insertObjects:atIndexes:"); + void _objc_msgSend_298( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer objects, + ffi.Pointer indexes, ) { - return _asinf( - arg0, + return __objc_msgSend_298( + obj, + sel, + objects, + indexes, ); } - late final _asinfPtr = - _lookup>('asinf'); - late final _asinf = _asinfPtr.asFunction(); + late final __objc_msgSend_298Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double asin( - double arg0, + late final _sel_removeObjectsAtIndexes_1 = + _registerName1("removeObjectsAtIndexes:"); + late final _sel_replaceObjectsAtIndexes_withObjects_1 = + _registerName1("replaceObjectsAtIndexes:withObjects:"); + void _objc_msgSend_299( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer indexes, + ffi.Pointer objects, ) { - return _asin( - arg0, + return __objc_msgSend_299( + obj, + sel, + indexes, + objects, ); } - late final _asinPtr = - _lookup>('asin'); - late final _asin = _asinPtr.asFunction(); + late final __objc_msgSend_299Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double atanf( - double arg0, + late final _sel_setObject_atIndexedSubscript_1 = + _registerName1("setObject:atIndexedSubscript:"); + late final _sel_sortUsingComparator_1 = + _registerName1("sortUsingComparator:"); + void _objc_msgSend_300( + ffi.Pointer obj, + ffi.Pointer sel, + NSComparator cmptr, ) { - return _atanf( - arg0, + return __objc_msgSend_300( + obj, + sel, + cmptr, ); } - late final _atanfPtr = - _lookup>('atanf'); - late final _atanf = _atanfPtr.asFunction(); + late final __objc_msgSend_300Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, NSComparator)>(); - double atan( - double arg0, + late final _sel_sortWithOptions_usingComparator_1 = + _registerName1("sortWithOptions:usingComparator:"); + void _objc_msgSend_301( + ffi.Pointer obj, + ffi.Pointer sel, + int opts, + NSComparator cmptr, ) { - return _atan( - arg0, + return __objc_msgSend_301( + obj, + sel, + opts, + cmptr, ); } - late final _atanPtr = - _lookup>('atan'); - late final _atan = _atanPtr.asFunction(); + late final __objc_msgSend_301Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, NSComparator)>>('objc_msgSend'); + late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, int, NSComparator)>(); - double atan2f( - double arg0, - double arg1, + late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); + ffi.Pointer _objc_msgSend_302( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, ) { - return _atan2f( - arg0, - arg1, + return __objc_msgSend_302( + obj, + sel, + path, ); } - late final _atan2fPtr = - _lookup>( - 'atan2f'); - late final _atan2f = _atan2fPtr.asFunction(); + late final __objc_msgSend_302Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double atan2( - double arg0, - double arg1, + ffi.Pointer _objc_msgSend_303( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, ) { - return _atan2( - arg0, - arg1, + return __objc_msgSend_303( + obj, + sel, + url, ); } - late final _atan2Ptr = - _lookup>( - 'atan2'); - late final _atan2 = _atan2Ptr.asFunction(); + late final __objc_msgSend_303Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double cosf( - double arg0, + late final _sel_applyDifference_1 = _registerName1("applyDifference:"); + void _objc_msgSend_304( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer difference, ) { - return _cosf( - arg0, + return __objc_msgSend_304( + obj, + sel, + difference, ); } - late final _cosfPtr = - _lookup>('cosf'); - late final _cosf = _cosfPtr.asFunction(); + late final __objc_msgSend_304Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double cos( - double arg0, + late final _class_NSMutableData1 = _getClass1("NSMutableData"); + late final _sel_mutableBytes1 = _registerName1("mutableBytes"); + late final _sel_setLength_1 = _registerName1("setLength:"); + void _objc_msgSend_305( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _cos( - arg0, + return __objc_msgSend_305( + obj, + sel, + value, ); } - late final _cosPtr = - _lookup>('cos'); - late final _cos = _cosPtr.asFunction(); + late final __objc_msgSend_305Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double sinf( - double arg0, + late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); + late final _sel_appendData_1 = _registerName1("appendData:"); + void _objc_msgSend_306( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, ) { - return _sinf( - arg0, + return __objc_msgSend_306( + obj, + sel, + other, ); } - late final _sinfPtr = - _lookup>('sinf'); - late final _sinf = _sinfPtr.asFunction(); + late final __objc_msgSend_306Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double sin( - double arg0, + late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); + late final _sel_replaceBytesInRange_withBytes_1 = + _registerName1("replaceBytesInRange:withBytes:"); + void _objc_msgSend_307( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer bytes, ) { - return _sin( - arg0, + return __objc_msgSend_307( + obj, + sel, + range, + bytes, ); } - late final _sinPtr = - _lookup>('sin'); - late final _sin = _sinPtr.asFunction(); + late final __objc_msgSend_307Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); - double tanf( - double arg0, + late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); + late final _sel_setData_1 = _registerName1("setData:"); + late final _sel_replaceBytesInRange_withBytes_length_1 = + _registerName1("replaceBytesInRange:withBytes:length:"); + void _objc_msgSend_308( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer replacementBytes, + int replacementLength, ) { - return _tanf( - arg0, + return __objc_msgSend_308( + obj, + sel, + range, + replacementBytes, + replacementLength, ); } - late final _tanfPtr = - _lookup>('tanf'); - late final _tanf = _tanfPtr.asFunction(); + late final __objc_msgSend_308Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer, int)>(); - double tan( - double arg0, + late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); + late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); + late final _sel_initWithLength_1 = _registerName1("initWithLength:"); + late final _sel_decompressUsingAlgorithm_error_1 = + _registerName1("decompressUsingAlgorithm:error:"); + bool _objc_msgSend_309( + ffi.Pointer obj, + ffi.Pointer sel, + int algorithm, + ffi.Pointer> error, ) { - return _tan( - arg0, + return __objc_msgSend_309( + obj, + sel, + algorithm, + error, ); } - late final _tanPtr = - _lookup>('tan'); - late final _tan = _tanPtr.asFunction(); - - double acoshf( - double arg0, - ) { - return _acoshf( - arg0, - ); - } + late final __objc_msgSend_309Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer>)>(); - late final _acoshfPtr = - _lookup>('acoshf'); - late final _acoshf = _acoshfPtr.asFunction(); - - double acosh( - double arg0, + late final _sel_compressUsingAlgorithm_error_1 = + _registerName1("compressUsingAlgorithm:error:"); + late final _class_NSPurgeableData1 = _getClass1("NSPurgeableData"); + late final _class_NSMutableDictionary1 = _getClass1("NSMutableDictionary"); + late final _sel_removeObjectForKey_1 = _registerName1("removeObjectForKey:"); + late final _sel_setObject_forKey_1 = _registerName1("setObject:forKey:"); + void _objc_msgSend_310( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ffi.Pointer aKey, ) { - return _acosh( - arg0, + return __objc_msgSend_310( + obj, + sel, + anObject, + aKey, ); } - late final _acoshPtr = - _lookup>('acosh'); - late final _acosh = _acoshPtr.asFunction(); + late final __objc_msgSend_310Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double asinhf( - double arg0, + late final _sel_addEntriesFromDictionary_1 = + _registerName1("addEntriesFromDictionary:"); + void _objc_msgSend_311( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDictionary, ) { - return _asinhf( - arg0, + return __objc_msgSend_311( + obj, + sel, + otherDictionary, ); } - late final _asinhfPtr = - _lookup>('asinhf'); - late final _asinhf = _asinhfPtr.asFunction(); + late final __objc_msgSend_311Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double asinh( - double arg0, + late final _sel_removeObjectsForKeys_1 = + _registerName1("removeObjectsForKeys:"); + late final _sel_setDictionary_1 = _registerName1("setDictionary:"); + late final _sel_setObject_forKeyedSubscript_1 = + _registerName1("setObject:forKeyedSubscript:"); + late final _sel_dictionaryWithCapacity_1 = + _registerName1("dictionaryWithCapacity:"); + ffi.Pointer _objc_msgSend_312( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer path, ) { - return _asinh( - arg0, + return __objc_msgSend_312( + obj, + sel, + path, ); } - late final _asinhPtr = - _lookup>('asinh'); - late final _asinh = _asinhPtr.asFunction(); + late final __objc_msgSend_312Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double atanhf( - double arg0, + ffi.Pointer _objc_msgSend_313( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, ) { - return _atanhf( - arg0, + return __objc_msgSend_313( + obj, + sel, + url, ); } - late final _atanhfPtr = - _lookup>('atanhf'); - late final _atanhf = _atanhfPtr.asFunction(); + late final __objc_msgSend_313Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double atanh( - double arg0, + late final _sel_dictionaryWithSharedKeySet_1 = + _registerName1("dictionaryWithSharedKeySet:"); + ffi.Pointer _objc_msgSend_314( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer keyset, ) { - return _atanh( - arg0, + return __objc_msgSend_314( + obj, + sel, + keyset, ); } - late final _atanhPtr = - _lookup>('atanh'); - late final _atanh = _atanhPtr.asFunction(); + late final __objc_msgSend_314Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double coshf( - double arg0, + late final _class_NSNotification1 = _getClass1("NSNotification"); + late final _sel_name1 = _registerName1("name"); + late final _sel_initWithName_object_userInfo_1 = + _registerName1("initWithName:object:userInfo:"); + instancetype _objc_msgSend_315( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName name, + ffi.Pointer object, + ffi.Pointer userInfo, ) { - return _coshf( - arg0, + return __objc_msgSend_315( + obj, + sel, + name, + object, + userInfo, ); } - late final _coshfPtr = - _lookup>('coshf'); - late final _coshf = _coshfPtr.asFunction(); + late final __objc_msgSend_315Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>(); - double cosh( - double arg0, + late final _sel_notificationWithName_object_1 = + _registerName1("notificationWithName:object:"); + late final _sel_notificationWithName_object_userInfo_1 = + _registerName1("notificationWithName:object:userInfo:"); + late final _class_NSNotificationCenter1 = _getClass1("NSNotificationCenter"); + late final _sel_defaultCenter1 = _registerName1("defaultCenter"); + ffi.Pointer _objc_msgSend_316( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _cosh( - arg0, + return __objc_msgSend_316( + obj, + sel, ); } - late final _coshPtr = - _lookup>('cosh'); - late final _cosh = _coshPtr.asFunction(); + late final __objc_msgSend_316Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double sinhf( - double arg0, + late final _sel_addObserver_selector_name_object_1 = + _registerName1("addObserver:selector:name:object:"); + void _objc_msgSend_317( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + ffi.Pointer aSelector, + NSNotificationName aName, + ffi.Pointer anObject, ) { - return _sinhf( - arg0, + return __objc_msgSend_317( + obj, + sel, + observer, + aSelector, + aName, + anObject, ); } - late final _sinhfPtr = - _lookup>('sinhf'); - late final _sinhf = _sinhfPtr.asFunction(); + late final __objc_msgSend_317Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>(); - double sinh( - double arg0, + late final _sel_postNotification_1 = _registerName1("postNotification:"); + void _objc_msgSend_318( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer notification, ) { - return _sinh( - arg0, + return __objc_msgSend_318( + obj, + sel, + notification, ); } - late final _sinhPtr = - _lookup>('sinh'); - late final _sinh = _sinhPtr.asFunction(); + late final __objc_msgSend_318Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double tanhf( - double arg0, + late final _sel_postNotificationName_object_1 = + _registerName1("postNotificationName:object:"); + void _objc_msgSend_319( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName aName, + ffi.Pointer anObject, ) { - return _tanhf( - arg0, + return __objc_msgSend_319( + obj, + sel, + aName, + anObject, ); } - late final _tanhfPtr = - _lookup>('tanhf'); - late final _tanhf = _tanhfPtr.asFunction(); + late final __objc_msgSend_319Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSNotificationName, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSNotificationName, ffi.Pointer)>(); - double tanh( - double arg0, + late final _sel_postNotificationName_object_userInfo_1 = + _registerName1("postNotificationName:object:userInfo:"); + void _objc_msgSend_320( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName aName, + ffi.Pointer anObject, + ffi.Pointer aUserInfo, ) { - return _tanh( - arg0, + return __objc_msgSend_320( + obj, + sel, + aName, + anObject, + aUserInfo, ); } - late final _tanhPtr = - _lookup>('tanh'); - late final _tanh = _tanhPtr.asFunction(); + late final __objc_msgSend_320Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>(); - double expf( - double arg0, + late final _sel_removeObserver_1 = _registerName1("removeObserver:"); + late final _sel_removeObserver_name_object_1 = + _registerName1("removeObserver:name:object:"); + void _objc_msgSend_321( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer observer, + NSNotificationName aName, + ffi.Pointer anObject, ) { - return _expf( - arg0, + return __objc_msgSend_321( + obj, + sel, + observer, + aName, + anObject, ); } - late final _expfPtr = - _lookup>('expf'); - late final _expf = _expfPtr.asFunction(); + late final __objc_msgSend_321Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>(); - double exp( - double arg0, + late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); + late final _class_NSProgress1 = _getClass1("NSProgress"); + late final _sel_currentProgress1 = _registerName1("currentProgress"); + ffi.Pointer _objc_msgSend_322( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _exp( - arg0, + return __objc_msgSend_322( + obj, + sel, ); } - late final _expPtr = - _lookup>('exp'); - late final _exp = _expPtr.asFunction(); + late final __objc_msgSend_322Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double exp2f( - double arg0, + late final _sel_progressWithTotalUnitCount_1 = + _registerName1("progressWithTotalUnitCount:"); + ffi.Pointer _objc_msgSend_323( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, ) { - return _exp2f( - arg0, + return __objc_msgSend_323( + obj, + sel, + unitCount, ); } - late final _exp2fPtr = - _lookup>('exp2f'); - late final _exp2f = _exp2fPtr.asFunction(); + late final __objc_msgSend_323Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - double exp2( - double arg0, + late final _sel_discreteProgressWithTotalUnitCount_1 = + _registerName1("discreteProgressWithTotalUnitCount:"); + late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = + _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); + ffi.Pointer _objc_msgSend_324( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ffi.Pointer parent, + int portionOfParentTotalUnitCount, ) { - return _exp2( - arg0, + return __objc_msgSend_324( + obj, + sel, + unitCount, + parent, + portionOfParentTotalUnitCount, ); } - late final _exp2Ptr = - _lookup>('exp2'); - late final _exp2 = _exp2Ptr.asFunction(); + late final __objc_msgSend_324Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer, int)>(); - double expm1f( - double arg0, + late final _sel_initWithParent_userInfo_1 = + _registerName1("initWithParent:userInfo:"); + instancetype _objc_msgSend_325( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer parentProgressOrNil, + ffi.Pointer userInfoOrNil, ) { - return _expm1f( - arg0, + return __objc_msgSend_325( + obj, + sel, + parentProgressOrNil, + userInfoOrNil, ); } - late final _expm1fPtr = - _lookup>('expm1f'); - late final _expm1f = _expm1fPtr.asFunction(); + late final __objc_msgSend_325Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double expm1( - double arg0, + late final _sel_becomeCurrentWithPendingUnitCount_1 = + _registerName1("becomeCurrentWithPendingUnitCount:"); + void _objc_msgSend_326( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, ) { - return _expm1( - arg0, + return __objc_msgSend_326( + obj, + sel, + unitCount, ); } - late final _expm1Ptr = - _lookup>('expm1'); - late final _expm1 = _expm1Ptr.asFunction(); + late final __objc_msgSend_326Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double logf( - double arg0, + late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = + _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); + void _objc_msgSend_327( + ffi.Pointer obj, + ffi.Pointer sel, + int unitCount, + ffi.Pointer<_ObjCBlock> work, ) { - return _logf( - arg0, + return __objc_msgSend_327( + obj, + sel, + unitCount, + work, ); } - late final _logfPtr = - _lookup>('logf'); - late final _logf = _logfPtr.asFunction(); + late final __objc_msgSend_327Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - double log( - double arg0, - ) { - return _log( - arg0, - ); + late final _sel_resignCurrent1 = _registerName1("resignCurrent"); + late final _sel_addChild_withPendingUnitCount_1 = + _registerName1("addChild:withPendingUnitCount:"); + void _objc_msgSend_328( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer child, + int inUnitCount, + ) { + return __objc_msgSend_328( + obj, + sel, + child, + inUnitCount, + ); } - late final _logPtr = - _lookup>('log'); - late final _log = _logPtr.asFunction(); + late final __objc_msgSend_328Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - double log10f( - double arg0, + late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); + int _objc_msgSend_329( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _log10f( - arg0, + return __objc_msgSend_329( + obj, + sel, ); } - late final _log10fPtr = - _lookup>('log10f'); - late final _log10f = _log10fPtr.asFunction(); + late final __objc_msgSend_329Ptr = _lookup< + ffi.NativeFunction< + ffi.Int64 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double log10( - double arg0, + late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); + void _objc_msgSend_330( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _log10( - arg0, + return __objc_msgSend_330( + obj, + sel, + value, ); } - late final _log10Ptr = - _lookup>('log10'); - late final _log10 = _log10Ptr.asFunction(); + late final __objc_msgSend_330Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); + late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double log2f( - double arg0, + late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); + late final _sel_setCompletedUnitCount_1 = + _registerName1("setCompletedUnitCount:"); + late final _sel_setLocalizedDescription_1 = + _registerName1("setLocalizedDescription:"); + void _objc_msgSend_331( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _log2f( - arg0, + return __objc_msgSend_331( + obj, + sel, + value, ); } - late final _log2fPtr = - _lookup>('log2f'); - late final _log2f = _log2fPtr.asFunction(); + late final __objc_msgSend_331Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double log2( - double arg0, + late final _sel_localizedAdditionalDescription1 = + _registerName1("localizedAdditionalDescription"); + late final _sel_setLocalizedAdditionalDescription_1 = + _registerName1("setLocalizedAdditionalDescription:"); + late final _sel_isCancellable1 = _registerName1("isCancellable"); + late final _sel_setCancellable_1 = _registerName1("setCancellable:"); + void _objc_msgSend_332( + ffi.Pointer obj, + ffi.Pointer sel, + bool value, ) { - return _log2( - arg0, + return __objc_msgSend_332( + obj, + sel, + value, ); } - late final _log2Ptr = - _lookup>('log2'); - late final _log2 = _log2Ptr.asFunction(); + late final __objc_msgSend_332Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, bool)>(); - double log1pf( - double arg0, + late final _sel_isPausable1 = _registerName1("isPausable"); + late final _sel_setPausable_1 = _registerName1("setPausable:"); + late final _sel_isCancelled1 = _registerName1("isCancelled"); + late final _sel_isPaused1 = _registerName1("isPaused"); + late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_333( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _log1pf( - arg0, + return __objc_msgSend_333( + obj, + sel, ); } - late final _log1pfPtr = - _lookup>('log1pf'); - late final _log1pf = _log1pfPtr.asFunction(); + late final __objc_msgSend_333Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>(); - double log1p( - double arg0, + late final _sel_setCancellationHandler_1 = + _registerName1("setCancellationHandler:"); + void _objc_msgSend_334( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> value, ) { - return _log1p( - arg0, + return __objc_msgSend_334( + obj, + sel, + value, ); } - late final _log1pPtr = - _lookup>('log1p'); - late final _log1p = _log1pPtr.asFunction(); + late final __objc_msgSend_334Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - double logbf( - double arg0, + late final _sel_pausingHandler1 = _registerName1("pausingHandler"); + late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); + late final _sel_resumingHandler1 = _registerName1("resumingHandler"); + late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); + late final _sel_setUserInfoObject_forKey_1 = + _registerName1("setUserInfoObject:forKey:"); + late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); + late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); + late final _sel_isFinished1 = _registerName1("isFinished"); + late final _sel_cancel1 = _registerName1("cancel"); + late final _sel_pause1 = _registerName1("pause"); + late final _sel_resume1 = _registerName1("resume"); + late final _sel_kind1 = _registerName1("kind"); + late final _sel_setKind_1 = _registerName1("setKind:"); + late final _sel_estimatedTimeRemaining1 = + _registerName1("estimatedTimeRemaining"); + late final _sel_setEstimatedTimeRemaining_1 = + _registerName1("setEstimatedTimeRemaining:"); + void _objc_msgSend_335( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _logbf( - arg0, + return __objc_msgSend_335( + obj, + sel, + value, ); } - late final _logbfPtr = - _lookup>('logbf'); - late final _logbf = _logbfPtr.asFunction(); + late final __objc_msgSend_335Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double logb( - double arg0, + late final _sel_throughput1 = _registerName1("throughput"); + late final _sel_setThroughput_1 = _registerName1("setThroughput:"); + late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); + late final _sel_setFileOperationKind_1 = + _registerName1("setFileOperationKind:"); + late final _sel_fileURL1 = _registerName1("fileURL"); + late final _sel_setFileURL_1 = _registerName1("setFileURL:"); + void _objc_msgSend_336( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _logb( - arg0, + return __objc_msgSend_336( + obj, + sel, + value, ); } - late final _logbPtr = - _lookup>('logb'); - late final _logb = _logbPtr.asFunction(); + late final __objc_msgSend_336Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double modff( - double arg0, - ffi.Pointer arg1, + late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); + late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); + late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); + late final _sel_setFileCompletedCount_1 = + _registerName1("setFileCompletedCount:"); + late final _sel_publish1 = _registerName1("publish"); + late final _sel_unpublish1 = _registerName1("unpublish"); + late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = + _registerName1("addSubscriberForFileURL:withPublishingHandler:"); + ffi.Pointer _objc_msgSend_337( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + NSProgressPublishingHandler publishingHandler, ) { - return _modff( - arg0, - arg1, + return __objc_msgSend_337( + obj, + sel, + url, + publishingHandler, ); } - late final _modffPtr = _lookup< + late final __objc_msgSend_337Ptr = _lookup< ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Pointer)>>('modff'); - late final _modff = - _modffPtr.asFunction)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>>('objc_msgSend'); + late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>(); - double modf( - double arg0, - ffi.Pointer arg1, + late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); + late final _sel_isOld1 = _registerName1("isOld"); + late final _sel_progress1 = _registerName1("progress"); + late final _class_NSOperation1 = _getClass1("NSOperation"); + late final _sel_start1 = _registerName1("start"); + late final _sel_main1 = _registerName1("main"); + late final _sel_isExecuting1 = _registerName1("isExecuting"); + late final _sel_isConcurrent1 = _registerName1("isConcurrent"); + late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); + late final _sel_isReady1 = _registerName1("isReady"); + late final _sel_addDependency_1 = _registerName1("addDependency:"); + void _objc_msgSend_338( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer op, ) { - return _modf( - arg0, - arg1, + return __objc_msgSend_338( + obj, + sel, + op, ); } - late final _modfPtr = _lookup< + late final __objc_msgSend_338Ptr = _lookup< ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Pointer)>>('modf'); - late final _modf = - _modfPtr.asFunction)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double ldexpf( - double arg0, - int arg1, + late final _sel_removeDependency_1 = _registerName1("removeDependency:"); + late final _sel_dependencies1 = _registerName1("dependencies"); + late final _sel_queuePriority1 = _registerName1("queuePriority"); + int _objc_msgSend_339( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _ldexpf( - arg0, - arg1, + return __objc_msgSend_339( + obj, + sel, ); } - late final _ldexpfPtr = - _lookup>( - 'ldexpf'); - late final _ldexpf = _ldexpfPtr.asFunction(); + late final __objc_msgSend_339Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double ldexp( - double arg0, - int arg1, + late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); + void _objc_msgSend_340( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _ldexp( - arg0, - arg1, + return __objc_msgSend_340( + obj, + sel, + value, ); } - late final _ldexpPtr = - _lookup>( - 'ldexp'); - late final _ldexp = _ldexpPtr.asFunction(); + late final __objc_msgSend_340Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double frexpf( - double arg0, - ffi.Pointer arg1, + late final _sel_completionBlock1 = _registerName1("completionBlock"); + late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); + late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); + late final _sel_threadPriority1 = _registerName1("threadPriority"); + late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); + void _objc_msgSend_341( + ffi.Pointer obj, + ffi.Pointer sel, + double value, ) { - return _frexpf( - arg0, - arg1, + return __objc_msgSend_341( + obj, + sel, + value, ); } - late final _frexpfPtr = _lookup< + late final __objc_msgSend_341Ptr = _lookup< ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Pointer)>>('frexpf'); - late final _frexpf = - _frexpfPtr.asFunction)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Double)>>('objc_msgSend'); + late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); - double frexp( - double arg0, - ffi.Pointer arg1, + late final _sel_qualityOfService1 = _registerName1("qualityOfService"); + int _objc_msgSend_342( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _frexp( - arg0, - arg1, + return __objc_msgSend_342( + obj, + sel, ); } - late final _frexpPtr = _lookup< + late final __objc_msgSend_342Ptr = _lookup< ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Pointer)>>('frexp'); - late final _frexp = - _frexpPtr.asFunction)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int ilogbf( - double arg0, + late final _sel_setQualityOfService_1 = + _registerName1("setQualityOfService:"); + void _objc_msgSend_343( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _ilogbf( - arg0, + return __objc_msgSend_343( + obj, + sel, + value, ); } - late final _ilogbfPtr = - _lookup>('ilogbf'); - late final _ilogbf = _ilogbfPtr.asFunction(); + late final __objc_msgSend_343Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int ilogb( - double arg0, + late final _sel_setName_1 = _registerName1("setName:"); + late final _sel_addOperation_1 = _registerName1("addOperation:"); + late final _sel_addOperations_waitUntilFinished_1 = + _registerName1("addOperations:waitUntilFinished:"); + void _objc_msgSend_344( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer ops, + bool wait, ) { - return _ilogb( - arg0, + return __objc_msgSend_344( + obj, + sel, + ops, + wait, ); } - late final _ilogbPtr = - _lookup>('ilogb'); - late final _ilogb = _ilogbPtr.asFunction(); + late final __objc_msgSend_344Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - double scalbnf( - double arg0, - int arg1, + late final _sel_addOperationWithBlock_1 = + _registerName1("addOperationWithBlock:"); + void _objc_msgSend_345( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { - return _scalbnf( - arg0, - arg1, + return __objc_msgSend_345( + obj, + sel, + block, ); } - late final _scalbnfPtr = - _lookup>( - 'scalbnf'); - late final _scalbnf = _scalbnfPtr.asFunction(); + late final __objc_msgSend_345Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - double scalbn( - double arg0, - int arg1, + late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); + late final _sel_maxConcurrentOperationCount1 = + _registerName1("maxConcurrentOperationCount"); + late final _sel_setMaxConcurrentOperationCount_1 = + _registerName1("setMaxConcurrentOperationCount:"); + void _objc_msgSend_346( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _scalbn( - arg0, - arg1, + return __objc_msgSend_346( + obj, + sel, + value, ); } - late final _scalbnPtr = - _lookup>( - 'scalbn'); - late final _scalbn = _scalbnPtr.asFunction(); + late final __objc_msgSend_346Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double scalblnf( - double arg0, - int arg1, + late final _sel_isSuspended1 = _registerName1("isSuspended"); + late final _sel_setSuspended_1 = _registerName1("setSuspended:"); + late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); + dispatch_queue_t _objc_msgSend_347( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _scalblnf( - arg0, - arg1, + return __objc_msgSend_347( + obj, + sel, ); } - late final _scalblnfPtr = - _lookup>( - 'scalblnf'); - late final _scalblnf = - _scalblnfPtr.asFunction(); + late final __objc_msgSend_347Ptr = _lookup< + ffi.NativeFunction< + dispatch_queue_t Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< + dispatch_queue_t Function( + ffi.Pointer, ffi.Pointer)>(); - double scalbln( - double arg0, - int arg1, + late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); + void _objc_msgSend_348( + ffi.Pointer obj, + ffi.Pointer sel, + dispatch_queue_t value, ) { - return _scalbln( - arg0, - arg1, + return __objc_msgSend_348( + obj, + sel, + value, ); } - late final _scalblnPtr = - _lookup>( - 'scalbln'); - late final _scalbln = _scalblnPtr.asFunction(); + late final __objc_msgSend_348Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + dispatch_queue_t)>>('objc_msgSend'); + late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< + void Function( + ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); - double fabsf( - double arg0, + late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); + late final _sel_waitUntilAllOperationsAreFinished1 = + _registerName1("waitUntilAllOperationsAreFinished"); + late final _sel_currentQueue1 = _registerName1("currentQueue"); + ffi.Pointer _objc_msgSend_349( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _fabsf( - arg0, + return __objc_msgSend_349( + obj, + sel, ); } - late final _fabsfPtr = - _lookup>('fabsf'); - late final _fabsf = _fabsfPtr.asFunction(); + late final __objc_msgSend_349Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double fabs( - double arg0, + late final _sel_mainQueue1 = _registerName1("mainQueue"); + late final _sel_operations1 = _registerName1("operations"); + late final _sel_operationCount1 = _registerName1("operationCount"); + late final _sel_addObserverForName_object_queue_usingBlock_1 = + _registerName1("addObserverForName:object:queue:usingBlock:"); + ffi.Pointer _objc_msgSend_350( + ffi.Pointer obj, + ffi.Pointer sel, + NSNotificationName name, + ffi.Pointer obj1, + ffi.Pointer queue, + ffi.Pointer<_ObjCBlock> block, ) { - return _fabs( - arg0, + return __objc_msgSend_350( + obj, + sel, + name, + obj1, + queue, + block, ); } - late final _fabsPtr = - _lookup>('fabs'); - late final _fabs = _fabsPtr.asFunction(); + late final __objc_msgSend_350Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - double cbrtf( - double arg0, - ) { - return _cbrtf( - arg0, - ); - } + late final ffi.Pointer + _NSSystemClockDidChangeNotification = + _lookup('NSSystemClockDidChangeNotification'); - late final _cbrtfPtr = - _lookup>('cbrtf'); - late final _cbrtf = _cbrtfPtr.asFunction(); + NSNotificationName get NSSystemClockDidChangeNotification => + _NSSystemClockDidChangeNotification.value; - double cbrt( - double arg0, + set NSSystemClockDidChangeNotification(NSNotificationName value) => + _NSSystemClockDidChangeNotification.value = value; + + late final _class_NSDate1 = _getClass1("NSDate"); + late final _sel_timeIntervalSinceReferenceDate1 = + _registerName1("timeIntervalSinceReferenceDate"); + late final _sel_initWithTimeIntervalSinceReferenceDate_1 = + _registerName1("initWithTimeIntervalSinceReferenceDate:"); + instancetype _objc_msgSend_351( + ffi.Pointer obj, + ffi.Pointer sel, + double ti, ) { - return _cbrt( - arg0, + return __objc_msgSend_351( + obj, + sel, + ti, ); } - late final _cbrtPtr = - _lookup>('cbrt'); - late final _cbrt = _cbrtPtr.asFunction(); + late final __objc_msgSend_351Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, double)>(); - double hypotf( - double arg0, - double arg1, + late final _sel_timeIntervalSinceDate_1 = + _registerName1("timeIntervalSinceDate:"); + double _objc_msgSend_352( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, ) { - return _hypotf( - arg0, - arg1, + return __objc_msgSend_352( + obj, + sel, + anotherDate, ); } - late final _hypotfPtr = - _lookup>( - 'hypotf'); - late final _hypotf = _hypotfPtr.asFunction(); + late final __objc_msgSend_352Ptr = _lookup< + ffi.NativeFunction< + NSTimeInterval Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double hypot( - double arg0, - double arg1, + late final _sel_timeIntervalSinceNow1 = + _registerName1("timeIntervalSinceNow"); + late final _sel_timeIntervalSince19701 = + _registerName1("timeIntervalSince1970"); + late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); + late final _sel_dateByAddingTimeInterval_1 = + _registerName1("dateByAddingTimeInterval:"); + late final _sel_earlierDate_1 = _registerName1("earlierDate:"); + ffi.Pointer _objc_msgSend_353( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anotherDate, ) { - return _hypot( - arg0, - arg1, + return __objc_msgSend_353( + obj, + sel, + anotherDate, ); } - late final _hypotPtr = - _lookup>( - 'hypot'); - late final _hypot = _hypotPtr.asFunction(); + late final __objc_msgSend_353Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double powf( - double arg0, - double arg1, + late final _sel_laterDate_1 = _registerName1("laterDate:"); + int _objc_msgSend_354( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer other, ) { - return _powf( - arg0, - arg1, + return __objc_msgSend_354( + obj, + sel, + other, ); } - late final _powfPtr = - _lookup>( - 'powf'); - late final _powf = _powfPtr.asFunction(); + late final __objc_msgSend_354Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double pow( - double arg0, - double arg1, + late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); + bool _objc_msgSend_355( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherDate, ) { - return _pow( - arg0, - arg1, + return __objc_msgSend_355( + obj, + sel, + otherDate, ); } - late final _powPtr = - _lookup>( - 'pow'); - late final _pow = _powPtr.asFunction(); + late final __objc_msgSend_355Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double sqrtf( - double arg0, + late final _sel_date1 = _registerName1("date"); + late final _sel_dateWithTimeIntervalSinceNow_1 = + _registerName1("dateWithTimeIntervalSinceNow:"); + late final _sel_dateWithTimeIntervalSinceReferenceDate_1 = + _registerName1("dateWithTimeIntervalSinceReferenceDate:"); + late final _sel_dateWithTimeIntervalSince1970_1 = + _registerName1("dateWithTimeIntervalSince1970:"); + late final _sel_dateWithTimeInterval_sinceDate_1 = + _registerName1("dateWithTimeInterval:sinceDate:"); + instancetype _objc_msgSend_356( + ffi.Pointer obj, + ffi.Pointer sel, + double secsToBeAdded, + ffi.Pointer date, ) { - return _sqrtf( - arg0, + return __objc_msgSend_356( + obj, + sel, + secsToBeAdded, + date, ); } - late final _sqrtfPtr = - _lookup>('sqrtf'); - late final _sqrtf = _sqrtfPtr.asFunction(); + late final __objc_msgSend_356Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + double, ffi.Pointer)>(); - double sqrt( - double arg0, + late final _sel_distantFuture1 = _registerName1("distantFuture"); + ffi.Pointer _objc_msgSend_357( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _sqrt( - arg0, + return __objc_msgSend_357( + obj, + sel, ); } - late final _sqrtPtr = - _lookup>('sqrt'); - late final _sqrt = _sqrtPtr.asFunction(); + late final __objc_msgSend_357Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double erff( - double arg0, + late final _sel_distantPast1 = _registerName1("distantPast"); + late final _sel_now1 = _registerName1("now"); + late final _sel_initWithTimeIntervalSinceNow_1 = + _registerName1("initWithTimeIntervalSinceNow:"); + late final _sel_initWithTimeIntervalSince1970_1 = + _registerName1("initWithTimeIntervalSince1970:"); + late final _sel_initWithTimeInterval_sinceDate_1 = + _registerName1("initWithTimeInterval:sinceDate:"); + late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); + late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); + late final _sel_supportsSecureCoding1 = + _registerName1("supportsSecureCoding"); + late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); + instancetype _objc_msgSend_358( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URL, + int cachePolicy, + double timeoutInterval, ) { - return _erff( - arg0, + return __objc_msgSend_358( + obj, + sel, + URL, + cachePolicy, + timeoutInterval, ); } - late final _erffPtr = - _lookup>('erff'); - late final _erff = _erffPtr.asFunction(); + late final __objc_msgSend_358Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSTimeInterval)>>('objc_msgSend'); + late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, double)>(); - double erf( - double arg0, + late final _sel_initWithURL_1 = _registerName1("initWithURL:"); + late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("initWithURL:cachePolicy:timeoutInterval:"); + late final _sel_URL1 = _registerName1("URL"); + late final _sel_cachePolicy1 = _registerName1("cachePolicy"); + int _objc_msgSend_359( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _erf( - arg0, + return __objc_msgSend_359( + obj, + sel, ); } - late final _erfPtr = - _lookup>('erf'); - late final _erf = _erfPtr.asFunction(); + late final __objc_msgSend_359Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double erfcf( - double arg0, + late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); + late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); + late final _sel_networkServiceType1 = _registerName1("networkServiceType"); + int _objc_msgSend_360( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _erfcf( - arg0, + return __objc_msgSend_360( + obj, + sel, ); } - late final _erfcfPtr = - _lookup>('erfcf'); - late final _erfcf = _erfcfPtr.asFunction(); + late final __objc_msgSend_360Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double erfc( - double arg0, + late final _sel_allowsCellularAccess1 = + _registerName1("allowsCellularAccess"); + late final _sel_allowsExpensiveNetworkAccess1 = + _registerName1("allowsExpensiveNetworkAccess"); + late final _sel_allowsConstrainedNetworkAccess1 = + _registerName1("allowsConstrainedNetworkAccess"); + late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); + late final _sel_attribution1 = _registerName1("attribution"); + int _objc_msgSend_361( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _erfc( - arg0, + return __objc_msgSend_361( + obj, + sel, ); } - late final _erfcPtr = - _lookup>('erfc'); - late final _erfc = _erfcPtr.asFunction(); + late final __objc_msgSend_361Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double lgammaf( - double arg0, + late final _sel_requiresDNSSECValidation1 = + _registerName1("requiresDNSSECValidation"); + late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); + late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); + late final _sel_valueForHTTPHeaderField_1 = + _registerName1("valueForHTTPHeaderField:"); + late final _sel_HTTPBody1 = _registerName1("HTTPBody"); + late final _class_NSInputStream1 = _getClass1("NSInputStream"); + late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); + ffi.Pointer _objc_msgSend_362( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _lgammaf( - arg0, + return __objc_msgSend_362( + obj, + sel, ); } - late final _lgammafPtr = - _lookup>('lgammaf'); - late final _lgammaf = _lgammafPtr.asFunction(); + late final __objc_msgSend_362Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double lgamma( - double arg0, + late final _sel_HTTPShouldHandleCookies1 = + _registerName1("HTTPShouldHandleCookies"); + late final _sel_HTTPShouldUsePipelining1 = + _registerName1("HTTPShouldUsePipelining"); + late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); + late final _sel_setURL_1 = _registerName1("setURL:"); + late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); + void _objc_msgSend_363( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _lgamma( - arg0, + return __objc_msgSend_363( + obj, + sel, + value, ); } - late final _lgammaPtr = - _lookup>('lgamma'); - late final _lgamma = _lgammaPtr.asFunction(); + late final __objc_msgSend_363Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double tgammaf( - double arg0, + late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); + late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); + late final _sel_setNetworkServiceType_1 = + _registerName1("setNetworkServiceType:"); + void _objc_msgSend_364( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _tgammaf( - arg0, + return __objc_msgSend_364( + obj, + sel, + value, ); } - late final _tgammafPtr = - _lookup>('tgammaf'); - late final _tgammaf = _tgammafPtr.asFunction(); - - double tgamma( - double arg0, - ) { - return _tgamma( - arg0, - ); - } - - late final _tgammaPtr = - _lookup>('tgamma'); - late final _tgamma = _tgammaPtr.asFunction(); + late final __objc_msgSend_364Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double ceilf( - double arg0, + late final _sel_setAllowsCellularAccess_1 = + _registerName1("setAllowsCellularAccess:"); + late final _sel_setAllowsExpensiveNetworkAccess_1 = + _registerName1("setAllowsExpensiveNetworkAccess:"); + late final _sel_setAllowsConstrainedNetworkAccess_1 = + _registerName1("setAllowsConstrainedNetworkAccess:"); + late final _sel_setAssumesHTTP3Capable_1 = + _registerName1("setAssumesHTTP3Capable:"); + late final _sel_setAttribution_1 = _registerName1("setAttribution:"); + void _objc_msgSend_365( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _ceilf( - arg0, + return __objc_msgSend_365( + obj, + sel, + value, ); } - late final _ceilfPtr = - _lookup>('ceilf'); - late final _ceilf = _ceilfPtr.asFunction(); + late final __objc_msgSend_365Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - double ceil( - double arg0, + late final _sel_setRequiresDNSSECValidation_1 = + _registerName1("setRequiresDNSSECValidation:"); + late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); + late final _sel_setAllHTTPHeaderFields_1 = + _registerName1("setAllHTTPHeaderFields:"); + void _objc_msgSend_366( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _ceil( - arg0, + return __objc_msgSend_366( + obj, + sel, + value, ); } - late final _ceilPtr = - _lookup>('ceil'); - late final _ceil = _ceilPtr.asFunction(); + late final __objc_msgSend_366Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double floorf( - double arg0, + late final _sel_setValue_forHTTPHeaderField_1 = + _registerName1("setValue:forHTTPHeaderField:"); + void _objc_msgSend_367( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer field, ) { - return _floorf( - arg0, + return __objc_msgSend_367( + obj, + sel, + value, + field, ); } - late final _floorfPtr = - _lookup>('floorf'); - late final _floorf = _floorfPtr.asFunction(); + late final __objc_msgSend_367Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double floor( - double arg0, + late final _sel_addValue_forHTTPHeaderField_1 = + _registerName1("addValue:forHTTPHeaderField:"); + late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); + void _objc_msgSend_368( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _floor( - arg0, + return __objc_msgSend_368( + obj, + sel, + value, ); } - late final _floorPtr = - _lookup>('floor'); - late final _floor = _floorPtr.asFunction(); + late final __objc_msgSend_368Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double nearbyintf( - double arg0, + late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); + void _objc_msgSend_369( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _nearbyintf( - arg0, + return __objc_msgSend_369( + obj, + sel, + value, ); } - late final _nearbyintfPtr = - _lookup>('nearbyintf'); - late final _nearbyintf = _nearbyintfPtr.asFunction(); + late final __objc_msgSend_369Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - double nearbyint( - double arg0, + late final _sel_setHTTPShouldHandleCookies_1 = + _registerName1("setHTTPShouldHandleCookies:"); + late final _sel_setHTTPShouldUsePipelining_1 = + _registerName1("setHTTPShouldUsePipelining:"); + late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); + late final _sel_sharedHTTPCookieStorage1 = + _registerName1("sharedHTTPCookieStorage"); + ffi.Pointer _objc_msgSend_370( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _nearbyint( - arg0, + return __objc_msgSend_370( + obj, + sel, ); } - late final _nearbyintPtr = - _lookup>('nearbyint'); - late final _nearbyint = _nearbyintPtr.asFunction(); + late final __objc_msgSend_370Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double rintf( - double arg0, + late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = + _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); + ffi.Pointer _objc_msgSend_371( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer identifier, ) { - return _rintf( - arg0, + return __objc_msgSend_371( + obj, + sel, + identifier, ); } - late final _rintfPtr = - _lookup>('rintf'); - late final _rintf = _rintfPtr.asFunction(); + late final __objc_msgSend_371Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double rint( - double arg0, + late final _sel_cookies1 = _registerName1("cookies"); + late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); + late final _sel_setCookie_1 = _registerName1("setCookie:"); + void _objc_msgSend_372( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookie, ) { - return _rint( - arg0, + return __objc_msgSend_372( + obj, + sel, + cookie, ); } - late final _rintPtr = - _lookup>('rint'); - late final _rint = _rintPtr.asFunction(); + late final __objc_msgSend_372Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int lrintf( - double arg0, + late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); + late final _sel_removeCookiesSinceDate_1 = + _registerName1("removeCookiesSinceDate:"); + void _objc_msgSend_373( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer date, ) { - return _lrintf( - arg0, + return __objc_msgSend_373( + obj, + sel, + date, ); } - late final _lrintfPtr = - _lookup>('lrintf'); - late final _lrintf = _lrintfPtr.asFunction(); + late final __objc_msgSend_373Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int lrint( - double arg0, + late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); + late final _sel_setCookies_forURL_mainDocumentURL_1 = + _registerName1("setCookies:forURL:mainDocumentURL:"); + void _objc_msgSend_374( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer URL, + ffi.Pointer mainDocumentURL, ) { - return _lrint( - arg0, + return __objc_msgSend_374( + obj, + sel, + cookies, + URL, + mainDocumentURL, ); } - late final _lrintPtr = - _lookup>('lrint'); - late final _lrint = _lrintPtr.asFunction(); + late final __objc_msgSend_374Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - double roundf( - double arg0, + late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); + int _objc_msgSend_375( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _roundf( - arg0, + return __objc_msgSend_375( + obj, + sel, ); } - late final _roundfPtr = - _lookup>('roundf'); - late final _roundf = _roundfPtr.asFunction(); + late final __objc_msgSend_375Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double round( - double arg0, + late final _sel_setCookieAcceptPolicy_1 = + _registerName1("setCookieAcceptPolicy:"); + void _objc_msgSend_376( + ffi.Pointer obj, + ffi.Pointer sel, + int value, ) { - return _round( - arg0, + return __objc_msgSend_376( + obj, + sel, + value, ); } - late final _roundPtr = - _lookup>('round'); - late final _round = _roundPtr.asFunction(); + late final __objc_msgSend_376Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int lroundf( - double arg0, + late final _sel_sortedCookiesUsingDescriptors_1 = + _registerName1("sortedCookiesUsingDescriptors:"); + late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); + late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); + late final _sel_originalRequest1 = _registerName1("originalRequest"); + ffi.Pointer _objc_msgSend_377( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _lroundf( - arg0, + return __objc_msgSend_377( + obj, + sel, ); } - late final _lroundfPtr = - _lookup>('lroundf'); - late final _lroundf = _lroundfPtr.asFunction(); + late final __objc_msgSend_377Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int lround( - double arg0, + late final _sel_currentRequest1 = _registerName1("currentRequest"); + late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); + late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = + _registerName1( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); + instancetype _objc_msgSend_378( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URL, + ffi.Pointer MIMEType, + int length, + ffi.Pointer name, ) { - return _lround( - arg0, + return __objc_msgSend_378( + obj, + sel, + URL, + MIMEType, + length, + name, ); } - late final _lroundPtr = - _lookup>('lround'); - late final _lround = _lroundPtr.asFunction(); + late final __objc_msgSend_378Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - int llrintf( - double arg0, + late final _sel_MIMEType1 = _registerName1("MIMEType"); + late final _sel_expectedContentLength1 = + _registerName1("expectedContentLength"); + late final _sel_textEncodingName1 = _registerName1("textEncodingName"); + late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); + late final _sel_response1 = _registerName1("response"); + ffi.Pointer _objc_msgSend_379( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _llrintf( - arg0, + return __objc_msgSend_379( + obj, + sel, ); } - late final _llrintfPtr = - _lookup>('llrintf'); - late final _llrintf = _llrintfPtr.asFunction(); + late final __objc_msgSend_379Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int llrint( - double arg0, + late final _sel_delegate1 = _registerName1("delegate"); + late final _sel_setDelegate_1 = _registerName1("setDelegate:"); + void _objc_msgSend_380( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _llrint( - arg0, + return __objc_msgSend_380( + obj, + sel, + value, ); } - late final _llrintPtr = - _lookup>('llrint'); - late final _llrint = _llrintPtr.asFunction(); + late final __objc_msgSend_380Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int llroundf( - double arg0, + late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); + late final _sel_setEarliestBeginDate_1 = + _registerName1("setEarliestBeginDate:"); + void _objc_msgSend_381( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, ) { - return _llroundf( - arg0, + return __objc_msgSend_381( + obj, + sel, + value, ); } - late final _llroundfPtr = - _lookup>('llroundf'); - late final _llroundf = _llroundfPtr.asFunction(); + late final __objc_msgSend_381Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - int llround( - double arg0, + late final _sel_countOfBytesClientExpectsToSend1 = + _registerName1("countOfBytesClientExpectsToSend"); + late final _sel_setCountOfBytesClientExpectsToSend_1 = + _registerName1("setCountOfBytesClientExpectsToSend:"); + late final _sel_countOfBytesClientExpectsToReceive1 = + _registerName1("countOfBytesClientExpectsToReceive"); + late final _sel_setCountOfBytesClientExpectsToReceive_1 = + _registerName1("setCountOfBytesClientExpectsToReceive:"); + late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); + late final _sel_countOfBytesReceived1 = + _registerName1("countOfBytesReceived"); + late final _sel_countOfBytesExpectedToSend1 = + _registerName1("countOfBytesExpectedToSend"); + late final _sel_countOfBytesExpectedToReceive1 = + _registerName1("countOfBytesExpectedToReceive"); + late final _sel_taskDescription1 = _registerName1("taskDescription"); + late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); + late final _sel_state1 = _registerName1("state"); + int _objc_msgSend_382( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _llround( - arg0, + return __objc_msgSend_382( + obj, + sel, ); } - late final _llroundPtr = - _lookup>('llround'); - late final _llround = _llroundPtr.asFunction(); + late final __objc_msgSend_382Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - double truncf( - double arg0, + late final _sel_error1 = _registerName1("error"); + ffi.Pointer _objc_msgSend_383( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _truncf( - arg0, + return __objc_msgSend_383( + obj, + sel, ); } - late final _truncfPtr = - _lookup>('truncf'); - late final _truncf = _truncfPtr.asFunction(); + late final __objc_msgSend_383Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - double trunc( - double arg0, + late final _sel_suspend1 = _registerName1("suspend"); + late final _sel_priority1 = _registerName1("priority"); + late final _sel_setPriority_1 = _registerName1("setPriority:"); + void _objc_msgSend_384( + ffi.Pointer obj, + ffi.Pointer sel, + double value, ) { - return _trunc( - arg0, + return __objc_msgSend_384( + obj, + sel, + value, ); } - late final _truncPtr = - _lookup>('trunc'); - late final _trunc = _truncPtr.asFunction(); + late final __objc_msgSend_384Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Float)>>('objc_msgSend'); + late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); - double fmodf( - double arg0, - double arg1, + late final _sel_prefersIncrementalDelivery1 = + _registerName1("prefersIncrementalDelivery"); + late final _sel_setPrefersIncrementalDelivery_1 = + _registerName1("setPrefersIncrementalDelivery:"); + late final _sel_storeCookies_forTask_1 = + _registerName1("storeCookies:forTask:"); + void _objc_msgSend_385( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer task, ) { - return _fmodf( - arg0, - arg1, + return __objc_msgSend_385( + obj, + sel, + cookies, + task, ); } - late final _fmodfPtr = - _lookup>( - 'fmodf'); - late final _fmodf = _fmodfPtr.asFunction(); + late final __objc_msgSend_385Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - double fmod( - double arg0, - double arg1, + late final _sel_getCookiesForTask_completionHandler_1 = + _registerName1("getCookiesForTask:completionHandler:"); + void _objc_msgSend_386( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer<_ObjCBlock> completionHandler, ) { - return _fmod( - arg0, - arg1, + return __objc_msgSend_386( + obj, + sel, + task, + completionHandler, ); } - late final _fmodPtr = - _lookup>( - 'fmod'); - late final _fmod = _fmodPtr.asFunction(); + late final __objc_msgSend_386Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - double remainderf( - double arg0, - double arg1, - ) { - return _remainderf( - arg0, - arg1, - ); - } + late final ffi.Pointer + _NSHTTPCookieManagerAcceptPolicyChangedNotification = + _lookup( + 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); - late final _remainderfPtr = - _lookup>( - 'remainderf'); - late final _remainderf = - _remainderfPtr.asFunction(); + NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; - double remainder( - double arg0, - double arg1, - ) { - return _remainder( - arg0, - arg1, - ); - } + set NSHTTPCookieManagerAcceptPolicyChangedNotification( + NSNotificationName value) => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; - late final _remainderPtr = - _lookup>( - 'remainder'); - late final _remainder = - _remainderPtr.asFunction(); + late final ffi.Pointer + _NSHTTPCookieManagerCookiesChangedNotification = + _lookup( + 'NSHTTPCookieManagerCookiesChangedNotification'); - double remquof( - double arg0, - double arg1, - ffi.Pointer arg2, - ) { - return _remquof( - arg0, - arg1, - arg2, - ); - } + NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => + _NSHTTPCookieManagerCookiesChangedNotification.value; - late final _remquofPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function( - ffi.Float, ffi.Float, ffi.Pointer)>>('remquof'); - late final _remquof = _remquofPtr - .asFunction)>(); + set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => + _NSHTTPCookieManagerCookiesChangedNotification.value = value; - double remquo( - double arg0, - double arg1, - ffi.Pointer arg2, - ) { - return _remquo( - arg0, - arg1, - arg2, - ); - } + late final ffi.Pointer + _NSProgressEstimatedTimeRemainingKey = + _lookup('NSProgressEstimatedTimeRemainingKey'); - late final _remquoPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function( - ffi.Double, ffi.Double, ffi.Pointer)>>('remquo'); - late final _remquo = _remquoPtr - .asFunction)>(); + NSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => + _NSProgressEstimatedTimeRemainingKey.value; - double copysignf( - double arg0, - double arg1, - ) { - return _copysignf( - arg0, - arg1, - ); - } + set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey value) => + _NSProgressEstimatedTimeRemainingKey.value = value; - late final _copysignfPtr = - _lookup>( - 'copysignf'); - late final _copysignf = - _copysignfPtr.asFunction(); + late final ffi.Pointer _NSProgressThroughputKey = + _lookup('NSProgressThroughputKey'); - double copysign( - double arg0, - double arg1, - ) { - return _copysign( - arg0, - arg1, - ); - } + NSProgressUserInfoKey get NSProgressThroughputKey => + _NSProgressThroughputKey.value; - late final _copysignPtr = - _lookup>( - 'copysign'); - late final _copysign = - _copysignPtr.asFunction(); + set NSProgressThroughputKey(NSProgressUserInfoKey value) => + _NSProgressThroughputKey.value = value; - double nanf( - ffi.Pointer arg0, - ) { - return _nanf( - arg0, - ); - } + late final ffi.Pointer _NSProgressKindFile = + _lookup('NSProgressKindFile'); - late final _nanfPtr = - _lookup)>>( - 'nanf'); - late final _nanf = - _nanfPtr.asFunction)>(); + NSProgressKind get NSProgressKindFile => _NSProgressKindFile.value; - double nan( - ffi.Pointer arg0, - ) { - return _nan( - arg0, - ); - } + set NSProgressKindFile(NSProgressKind value) => + _NSProgressKindFile.value = value; - late final _nanPtr = - _lookup)>>( - 'nan'); - late final _nan = - _nanPtr.asFunction)>(); + late final ffi.Pointer + _NSProgressFileOperationKindKey = + _lookup('NSProgressFileOperationKindKey'); - double nextafterf( - double arg0, - double arg1, - ) { - return _nextafterf( - arg0, - arg1, - ); - } + NSProgressUserInfoKey get NSProgressFileOperationKindKey => + _NSProgressFileOperationKindKey.value; - late final _nextafterfPtr = - _lookup>( - 'nextafterf'); - late final _nextafterf = - _nextafterfPtr.asFunction(); + set NSProgressFileOperationKindKey(NSProgressUserInfoKey value) => + _NSProgressFileOperationKindKey.value = value; - double nextafter( - double arg0, - double arg1, - ) { - return _nextafter( - arg0, - arg1, - ); - } + late final ffi.Pointer + _NSProgressFileOperationKindDownloading = + _lookup( + 'NSProgressFileOperationKindDownloading'); - late final _nextafterPtr = - _lookup>( - 'nextafter'); - late final _nextafter = - _nextafterPtr.asFunction(); + NSProgressFileOperationKind get NSProgressFileOperationKindDownloading => + _NSProgressFileOperationKindDownloading.value; - double fdimf( - double arg0, - double arg1, - ) { - return _fdimf( - arg0, - arg1, - ); - } + set NSProgressFileOperationKindDownloading( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDownloading.value = value; - late final _fdimfPtr = - _lookup>( - 'fdimf'); - late final _fdimf = _fdimfPtr.asFunction(); + late final ffi.Pointer + _NSProgressFileOperationKindDecompressingAfterDownloading = + _lookup( + 'NSProgressFileOperationKindDecompressingAfterDownloading'); - double fdim( - double arg0, - double arg1, - ) { - return _fdim( - arg0, - arg1, - ); - } + NSProgressFileOperationKind + get NSProgressFileOperationKindDecompressingAfterDownloading => + _NSProgressFileOperationKindDecompressingAfterDownloading.value; - late final _fdimPtr = - _lookup>( - 'fdim'); - late final _fdim = _fdimPtr.asFunction(); + set NSProgressFileOperationKindDecompressingAfterDownloading( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDecompressingAfterDownloading.value = value; - double fmaxf( - double arg0, - double arg1, - ) { - return _fmaxf( - arg0, - arg1, - ); - } + late final ffi.Pointer + _NSProgressFileOperationKindReceiving = + _lookup( + 'NSProgressFileOperationKindReceiving'); - late final _fmaxfPtr = - _lookup>( - 'fmaxf'); - late final _fmaxf = _fmaxfPtr.asFunction(); + NSProgressFileOperationKind get NSProgressFileOperationKindReceiving => + _NSProgressFileOperationKindReceiving.value; - double fmax( - double arg0, - double arg1, - ) { - return _fmax( - arg0, - arg1, - ); - } + set NSProgressFileOperationKindReceiving(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindReceiving.value = value; - late final _fmaxPtr = - _lookup>( - 'fmax'); - late final _fmax = _fmaxPtr.asFunction(); + late final ffi.Pointer + _NSProgressFileOperationKindCopying = + _lookup( + 'NSProgressFileOperationKindCopying'); - double fminf( - double arg0, - double arg1, - ) { - return _fminf( - arg0, - arg1, - ); - } + NSProgressFileOperationKind get NSProgressFileOperationKindCopying => + _NSProgressFileOperationKindCopying.value; - late final _fminfPtr = - _lookup>( - 'fminf'); - late final _fminf = _fminfPtr.asFunction(); + set NSProgressFileOperationKindCopying(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindCopying.value = value; - double fmin( - double arg0, - double arg1, - ) { - return _fmin( - arg0, - arg1, - ); - } + late final ffi.Pointer + _NSProgressFileOperationKindUploading = + _lookup( + 'NSProgressFileOperationKindUploading'); - late final _fminPtr = - _lookup>( - 'fmin'); - late final _fmin = _fminPtr.asFunction(); + NSProgressFileOperationKind get NSProgressFileOperationKindUploading => + _NSProgressFileOperationKindUploading.value; - double fmaf( - double arg0, - double arg1, - double arg2, - ) { - return _fmaf( - arg0, - arg1, - arg2, - ); - } + set NSProgressFileOperationKindUploading(NSProgressFileOperationKind value) => + _NSProgressFileOperationKindUploading.value = value; - late final _fmafPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Float, ffi.Float)>>('fmaf'); - late final _fmaf = - _fmafPtr.asFunction(); + late final ffi.Pointer + _NSProgressFileOperationKindDuplicating = + _lookup( + 'NSProgressFileOperationKindDuplicating'); - double fma( - double arg0, - double arg1, - double arg2, - ) { - return _fma( - arg0, - arg1, - arg2, - ); - } + NSProgressFileOperationKind get NSProgressFileOperationKindDuplicating => + _NSProgressFileOperationKindDuplicating.value; - late final _fmaPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Double, ffi.Double)>>('fma'); - late final _fma = - _fmaPtr.asFunction(); + set NSProgressFileOperationKindDuplicating( + NSProgressFileOperationKind value) => + _NSProgressFileOperationKindDuplicating.value = value; - double __exp10f( - double arg0, - ) { - return ___exp10f( - arg0, - ); - } + late final ffi.Pointer _NSProgressFileURLKey = + _lookup('NSProgressFileURLKey'); - late final ___exp10fPtr = - _lookup>('__exp10f'); - late final ___exp10f = ___exp10fPtr.asFunction(); + NSProgressUserInfoKey get NSProgressFileURLKey => _NSProgressFileURLKey.value; - double __exp10( - double arg0, - ) { - return ___exp10( - arg0, - ); - } + set NSProgressFileURLKey(NSProgressUserInfoKey value) => + _NSProgressFileURLKey.value = value; - late final ___exp10Ptr = - _lookup>('__exp10'); - late final ___exp10 = ___exp10Ptr.asFunction(); + late final ffi.Pointer _NSProgressFileTotalCountKey = + _lookup('NSProgressFileTotalCountKey'); - double __cospif( - double arg0, - ) { - return ___cospif( - arg0, - ); - } + NSProgressUserInfoKey get NSProgressFileTotalCountKey => + _NSProgressFileTotalCountKey.value; - late final ___cospifPtr = - _lookup>('__cospif'); - late final ___cospif = ___cospifPtr.asFunction(); + set NSProgressFileTotalCountKey(NSProgressUserInfoKey value) => + _NSProgressFileTotalCountKey.value = value; - double __cospi( - double arg0, - ) { - return ___cospi( - arg0, - ); - } + late final ffi.Pointer + _NSProgressFileCompletedCountKey = + _lookup('NSProgressFileCompletedCountKey'); - late final ___cospiPtr = - _lookup>('__cospi'); - late final ___cospi = ___cospiPtr.asFunction(); + NSProgressUserInfoKey get NSProgressFileCompletedCountKey => + _NSProgressFileCompletedCountKey.value; - double __sinpif( - double arg0, - ) { - return ___sinpif( - arg0, - ); - } + set NSProgressFileCompletedCountKey(NSProgressUserInfoKey value) => + _NSProgressFileCompletedCountKey.value = value; - late final ___sinpifPtr = - _lookup>('__sinpif'); - late final ___sinpif = ___sinpifPtr.asFunction(); + late final ffi.Pointer + _NSProgressFileAnimationImageKey = + _lookup('NSProgressFileAnimationImageKey'); - double __sinpi( - double arg0, - ) { - return ___sinpi( - arg0, - ); - } + NSProgressUserInfoKey get NSProgressFileAnimationImageKey => + _NSProgressFileAnimationImageKey.value; - late final ___sinpiPtr = - _lookup>('__sinpi'); - late final ___sinpi = ___sinpiPtr.asFunction(); + set NSProgressFileAnimationImageKey(NSProgressUserInfoKey value) => + _NSProgressFileAnimationImageKey.value = value; - double __tanpif( - double arg0, - ) { - return ___tanpif( - arg0, - ); - } + late final ffi.Pointer + _NSProgressFileAnimationImageOriginalRectKey = + _lookup( + 'NSProgressFileAnimationImageOriginalRectKey'); - late final ___tanpifPtr = - _lookup>('__tanpif'); - late final ___tanpif = ___tanpifPtr.asFunction(); + NSProgressUserInfoKey get NSProgressFileAnimationImageOriginalRectKey => + _NSProgressFileAnimationImageOriginalRectKey.value; - double __tanpi( - double arg0, - ) { - return ___tanpi( - arg0, - ); + set NSProgressFileAnimationImageOriginalRectKey( + NSProgressUserInfoKey value) => + _NSProgressFileAnimationImageOriginalRectKey.value = value; + + late final ffi.Pointer _NSProgressFileIconKey = + _lookup('NSProgressFileIconKey'); + + NSProgressUserInfoKey get NSProgressFileIconKey => + _NSProgressFileIconKey.value; + + set NSProgressFileIconKey(NSProgressUserInfoKey value) => + _NSProgressFileIconKey.value = value; + + late final ffi.Pointer _kCFTypeArrayCallBacks = + _lookup('kCFTypeArrayCallBacks'); + + CFArrayCallBacks get kCFTypeArrayCallBacks => _kCFTypeArrayCallBacks.ref; + + int CFArrayGetTypeID() { + return _CFArrayGetTypeID(); } - late final ___tanpiPtr = - _lookup>('__tanpi'); - late final ___tanpi = ___tanpiPtr.asFunction(); + late final _CFArrayGetTypeIDPtr = + _lookup>('CFArrayGetTypeID'); + late final _CFArrayGetTypeID = + _CFArrayGetTypeIDPtr.asFunction(); - __float2 __sincosf_stret( - double arg0, + CFArrayRef CFArrayCreate( + CFAllocatorRef allocator, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, ) { - return ___sincosf_stret( - arg0, + return _CFArrayCreate( + allocator, + values, + numValues, + callBacks, ); } - late final ___sincosf_stretPtr = - _lookup>( - '__sincosf_stret'); - late final ___sincosf_stret = - ___sincosf_stretPtr.asFunction<__float2 Function(double)>(); + late final _CFArrayCreatePtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function( + CFAllocatorRef, + ffi.Pointer>, + CFIndex, + ffi.Pointer)>>('CFArrayCreate'); + late final _CFArrayCreate = _CFArrayCreatePtr.asFunction< + CFArrayRef Function(CFAllocatorRef, ffi.Pointer>, + int, ffi.Pointer)>(); - __double2 __sincos_stret( - double arg0, + CFArrayRef CFArrayCreateCopy( + CFAllocatorRef allocator, + CFArrayRef theArray, ) { - return ___sincos_stret( - arg0, + return _CFArrayCreateCopy( + allocator, + theArray, ); } - late final ___sincos_stretPtr = - _lookup>( - '__sincos_stret'); - late final ___sincos_stret = - ___sincos_stretPtr.asFunction<__double2 Function(double)>(); + late final _CFArrayCreateCopyPtr = _lookup< + ffi.NativeFunction>( + 'CFArrayCreateCopy'); + late final _CFArrayCreateCopy = _CFArrayCreateCopyPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFArrayRef)>(); - __float2 __sincospif_stret( - double arg0, + CFMutableArrayRef CFArrayCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, ) { - return ___sincospif_stret( - arg0, + return _CFArrayCreateMutable( + allocator, + capacity, + callBacks, ); } - late final ___sincospif_stretPtr = - _lookup>( - '__sincospif_stret'); - late final ___sincospif_stret = - ___sincospif_stretPtr.asFunction<__float2 Function(double)>(); + late final _CFArrayCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableArrayRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFArrayCreateMutable'); + late final _CFArrayCreateMutable = _CFArrayCreateMutablePtr.asFunction< + CFMutableArrayRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - __double2 __sincospi_stret( - double arg0, + CFMutableArrayRef CFArrayCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFArrayRef theArray, ) { - return ___sincospi_stret( - arg0, + return _CFArrayCreateMutableCopy( + allocator, + capacity, + theArray, ); } - late final ___sincospi_stretPtr = - _lookup>( - '__sincospi_stret'); - late final ___sincospi_stret = - ___sincospi_stretPtr.asFunction<__double2 Function(double)>(); + late final _CFArrayCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableArrayRef Function(CFAllocatorRef, CFIndex, + CFArrayRef)>>('CFArrayCreateMutableCopy'); + late final _CFArrayCreateMutableCopy = + _CFArrayCreateMutableCopyPtr.asFunction< + CFMutableArrayRef Function(CFAllocatorRef, int, CFArrayRef)>(); - double j0( - double arg0, + int CFArrayGetCount( + CFArrayRef theArray, ) { - return _j0( - arg0, + return _CFArrayGetCount( + theArray, ); } - late final _j0Ptr = - _lookup>('j0'); - late final _j0 = _j0Ptr.asFunction(); + late final _CFArrayGetCountPtr = + _lookup>( + 'CFArrayGetCount'); + late final _CFArrayGetCount = + _CFArrayGetCountPtr.asFunction(); - double j1( - double arg0, + int CFArrayGetCountOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _j1( - arg0, + return _CFArrayGetCountOfValue( + theArray, + range, + value, ); } - late final _j1Ptr = - _lookup>('j1'); - late final _j1 = _j1Ptr.asFunction(); + late final _CFArrayGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetCountOfValue'); + late final _CFArrayGetCountOfValue = _CFArrayGetCountOfValuePtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer)>(); - double jn( - int arg0, - double arg1, + int CFArrayContainsValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _jn( - arg0, - arg1, + return _CFArrayContainsValue( + theArray, + range, + value, ); } - late final _jnPtr = - _lookup>( - 'jn'); - late final _jn = _jnPtr.asFunction(); + late final _CFArrayContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayContainsValue'); + late final _CFArrayContainsValue = _CFArrayContainsValuePtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer)>(); - double y0( - double arg0, + ffi.Pointer CFArrayGetValueAtIndex( + CFArrayRef theArray, + int idx, ) { - return _y0( - arg0, + return _CFArrayGetValueAtIndex( + theArray, + idx, ); } - late final _y0Ptr = - _lookup>('y0'); - late final _y0 = _y0Ptr.asFunction(); + late final _CFArrayGetValueAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFArrayRef, CFIndex)>>('CFArrayGetValueAtIndex'); + late final _CFArrayGetValueAtIndex = _CFArrayGetValueAtIndexPtr.asFunction< + ffi.Pointer Function(CFArrayRef, int)>(); - double y1( - double arg0, + void CFArrayGetValues( + CFArrayRef theArray, + CFRange range, + ffi.Pointer> values, ) { - return _y1( - arg0, + return _CFArrayGetValues( + theArray, + range, + values, ); } - late final _y1Ptr = - _lookup>('y1'); - late final _y1 = _y1Ptr.asFunction(); + late final _CFArrayGetValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFArrayRef, CFRange, + ffi.Pointer>)>>('CFArrayGetValues'); + late final _CFArrayGetValues = _CFArrayGetValuesPtr.asFunction< + void Function(CFArrayRef, CFRange, ffi.Pointer>)>(); - double yn( - int arg0, - double arg1, + void CFArrayApplyFunction( + CFArrayRef theArray, + CFRange range, + CFArrayApplierFunction applier, + ffi.Pointer context, ) { - return _yn( - arg0, - arg1, + return _CFArrayApplyFunction( + theArray, + range, + applier, + context, ); } - late final _ynPtr = - _lookup>( - 'yn'); - late final _yn = _ynPtr.asFunction(); + late final _CFArrayApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFArrayRef, CFRange, CFArrayApplierFunction, + ffi.Pointer)>>('CFArrayApplyFunction'); + late final _CFArrayApplyFunction = _CFArrayApplyFunctionPtr.asFunction< + void Function(CFArrayRef, CFRange, CFArrayApplierFunction, + ffi.Pointer)>(); - double scalb( - double arg0, - double arg1, + int CFArrayGetFirstIndexOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _scalb( - arg0, - arg1, + return _CFArrayGetFirstIndexOfValue( + theArray, + range, + value, ); } - late final _scalbPtr = - _lookup>( - 'scalb'); - late final _scalb = _scalbPtr.asFunction(); - - late final ffi.Pointer _signgam = _lookup('signgam'); - - int get signgam => _signgam.value; - - set signgam(int value) => _signgam.value = value; + late final _CFArrayGetFirstIndexOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetFirstIndexOfValue'); + late final _CFArrayGetFirstIndexOfValue = _CFArrayGetFirstIndexOfValuePtr + .asFunction)>(); - int setjmp( - ffi.Pointer arg0, + int CFArrayGetLastIndexOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return _setjmp1( - arg0, + return _CFArrayGetLastIndexOfValue( + theArray, + range, + value, ); } - late final _setjmpPtr = - _lookup)>>( - 'setjmp'); - late final _setjmp1 = - _setjmpPtr.asFunction)>(); + late final _CFArrayGetLastIndexOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetLastIndexOfValue'); + late final _CFArrayGetLastIndexOfValue = _CFArrayGetLastIndexOfValuePtr + .asFunction)>(); - void longjmp( - ffi.Pointer arg0, - int arg1, + int CFArrayBSearchValues( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, + CFComparatorFunction comparator, + ffi.Pointer context, ) { - return _longjmp1( - arg0, - arg1, + return _CFArrayBSearchValues( + theArray, + range, + value, + comparator, + context, ); } - late final _longjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'longjmp'); - late final _longjmp1 = - _longjmpPtr.asFunction, int)>(); + late final _CFArrayBSearchValuesPtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFArrayRef, + CFRange, + ffi.Pointer, + CFComparatorFunction, + ffi.Pointer)>>('CFArrayBSearchValues'); + late final _CFArrayBSearchValues = _CFArrayBSearchValuesPtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer, + CFComparatorFunction, ffi.Pointer)>(); - int _setjmp( - ffi.Pointer arg0, + void CFArrayAppendValue( + CFMutableArrayRef theArray, + ffi.Pointer value, ) { - return __setjmp( - arg0, + return _CFArrayAppendValue( + theArray, + value, ); } - late final __setjmpPtr = - _lookup)>>( - '_setjmp'); - late final __setjmp = - __setjmpPtr.asFunction)>(); + late final _CFArrayAppendValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableArrayRef, ffi.Pointer)>>('CFArrayAppendValue'); + late final _CFArrayAppendValue = _CFArrayAppendValuePtr.asFunction< + void Function(CFMutableArrayRef, ffi.Pointer)>(); - void _longjmp( - ffi.Pointer arg0, - int arg1, + void CFArrayInsertValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ffi.Pointer value, ) { - return __longjmp( - arg0, - arg1, + return _CFArrayInsertValueAtIndex( + theArray, + idx, + value, ); } - late final __longjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - '_longjmp'); - late final __longjmp = - __longjmpPtr.asFunction, int)>(); + late final _CFArrayInsertValueAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFIndex, + ffi.Pointer)>>('CFArrayInsertValueAtIndex'); + late final _CFArrayInsertValueAtIndex = + _CFArrayInsertValueAtIndexPtr.asFunction< + void Function(CFMutableArrayRef, int, ffi.Pointer)>(); - int sigsetjmp( - ffi.Pointer arg0, - int arg1, + void CFArraySetValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ffi.Pointer value, ) { - return _sigsetjmp( - arg0, - arg1, + return _CFArraySetValueAtIndex( + theArray, + idx, + value, ); } - late final _sigsetjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigsetjmp'); - late final _sigsetjmp = - _sigsetjmpPtr.asFunction, int)>(); + late final _CFArraySetValueAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFIndex, + ffi.Pointer)>>('CFArraySetValueAtIndex'); + late final _CFArraySetValueAtIndex = _CFArraySetValueAtIndexPtr.asFunction< + void Function(CFMutableArrayRef, int, ffi.Pointer)>(); - void siglongjmp( - ffi.Pointer arg0, - int arg1, + void CFArrayRemoveValueAtIndex( + CFMutableArrayRef theArray, + int idx, ) { - return _siglongjmp( - arg0, - arg1, + return _CFArrayRemoveValueAtIndex( + theArray, + idx, ); } - late final _siglongjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'siglongjmp'); - late final _siglongjmp = - _siglongjmpPtr.asFunction, int)>(); + late final _CFArrayRemoveValueAtIndexPtr = _lookup< + ffi.NativeFunction>( + 'CFArrayRemoveValueAtIndex'); + late final _CFArrayRemoveValueAtIndex = _CFArrayRemoveValueAtIndexPtr + .asFunction(); - void longjmperror() { - return _longjmperror(); + void CFArrayRemoveAllValues( + CFMutableArrayRef theArray, + ) { + return _CFArrayRemoveAllValues( + theArray, + ); } - late final _longjmperrorPtr = - _lookup>('longjmperror'); - late final _longjmperror = _longjmperrorPtr.asFunction(); + late final _CFArrayRemoveAllValuesPtr = + _lookup>( + 'CFArrayRemoveAllValues'); + late final _CFArrayRemoveAllValues = + _CFArrayRemoveAllValuesPtr.asFunction(); - ffi.Pointer> signal( - int arg0, - ffi.Pointer> arg1, + void CFArrayReplaceValues( + CFMutableArrayRef theArray, + CFRange range, + ffi.Pointer> newValues, + int newCount, ) { - return _signal( - arg0, - arg1, + return _CFArrayReplaceValues( + theArray, + range, + newValues, + newCount, ); } - late final _signalPtr = _lookup< + late final _CFArrayReplaceValuesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Int, - ffi.Pointer< - ffi.NativeFunction>)>>('signal'); - late final _signal = _signalPtr.asFunction< - ffi.Pointer> Function( - int, ffi.Pointer>)>(); - - late final ffi.Pointer>> _sys_signame = - _lookup>>('sys_signame'); - - ffi.Pointer> get sys_signame => _sys_signame.value; - - set sys_signame(ffi.Pointer> value) => - _sys_signame.value = value; - - late final ffi.Pointer>> _sys_siglist = - _lookup>>('sys_siglist'); - - ffi.Pointer> get sys_siglist => _sys_siglist.value; - - set sys_siglist(ffi.Pointer> value) => - _sys_siglist.value = value; + ffi.Void Function( + CFMutableArrayRef, + CFRange, + ffi.Pointer>, + CFIndex)>>('CFArrayReplaceValues'); + late final _CFArrayReplaceValues = _CFArrayReplaceValuesPtr.asFunction< + void Function(CFMutableArrayRef, CFRange, + ffi.Pointer>, int)>(); - int raise( - int arg0, + void CFArrayExchangeValuesAtIndices( + CFMutableArrayRef theArray, + int idx1, + int idx2, ) { - return _raise( - arg0, + return _CFArrayExchangeValuesAtIndices( + theArray, + idx1, + idx2, ); } - late final _raisePtr = - _lookup>('raise'); - late final _raise = _raisePtr.asFunction(); + late final _CFArrayExchangeValuesAtIndicesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableArrayRef, CFIndex, + CFIndex)>>('CFArrayExchangeValuesAtIndices'); + late final _CFArrayExchangeValuesAtIndices = + _CFArrayExchangeValuesAtIndicesPtr.asFunction< + void Function(CFMutableArrayRef, int, int)>(); - ffi.Pointer> bsd_signal( - int arg0, - ffi.Pointer> arg1, + void CFArraySortValues( + CFMutableArrayRef theArray, + CFRange range, + CFComparatorFunction comparator, + ffi.Pointer context, ) { - return _bsd_signal( - arg0, - arg1, + return _CFArraySortValues( + theArray, + range, + comparator, + context, ); } - late final _bsd_signalPtr = _lookup< + late final _CFArraySortValuesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Int)>>)>>('bsd_signal'); - late final _bsd_signal = _bsd_signalPtr.asFunction< - ffi.Pointer> Function( - int, ffi.Pointer>)>(); + ffi.Void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, + ffi.Pointer)>>('CFArraySortValues'); + late final _CFArraySortValues = _CFArraySortValuesPtr.asFunction< + void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, + ffi.Pointer)>(); - int kill( - int arg0, - int arg1, + void CFArrayAppendArray( + CFMutableArrayRef theArray, + CFArrayRef otherArray, + CFRange otherRange, ) { - return _kill( - arg0, - arg1, + return _CFArrayAppendArray( + theArray, + otherArray, + otherRange, ); } - late final _killPtr = - _lookup>('kill'); - late final _kill = _killPtr.asFunction(); + late final _CFArrayAppendArrayPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableArrayRef, CFArrayRef, CFRange)>>('CFArrayAppendArray'); + late final _CFArrayAppendArray = _CFArrayAppendArrayPtr.asFunction< + void Function(CFMutableArrayRef, CFArrayRef, CFRange)>(); - int killpg( - int arg0, - int arg1, + late final _class_OS_object1 = _getClass1("OS_object"); + ffi.Pointer os_retain( + ffi.Pointer object, ) { - return _killpg( - arg0, - arg1, + return _os_retain( + object, ); } - late final _killpgPtr = - _lookup>('killpg'); - late final _killpg = _killpgPtr.asFunction(); + late final _os_retainPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('os_retain'); + late final _os_retain = _os_retainPtr + .asFunction Function(ffi.Pointer)>(); - int pthread_kill( - pthread_t arg0, - int arg1, + void os_release( + ffi.Pointer object, ) { - return _pthread_kill( - arg0, - arg1, + return _os_release( + object, ); } - late final _pthread_killPtr = - _lookup>( - 'pthread_kill'); - late final _pthread_kill = - _pthread_killPtr.asFunction(); + late final _os_releasePtr = + _lookup)>>( + 'os_release'); + late final _os_release = + _os_releasePtr.asFunction)>(); - int pthread_sigmask( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer sec_retain( + ffi.Pointer obj, ) { - return _pthread_sigmask( - arg0, - arg1, - arg2, + return _sec_retain( + obj, ); } - late final _pthread_sigmaskPtr = _lookup< + late final _sec_retainPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('pthread_sigmask'); - late final _pthread_sigmask = _pthread_sigmaskPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer)>>('sec_retain'); + late final _sec_retain = _sec_retainPtr + .asFunction Function(ffi.Pointer)>(); - int sigaction1( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + void sec_release( + ffi.Pointer obj, ) { - return _sigaction1( - arg0, - arg1, - arg2, + return _sec_release( + obj, ); } - late final _sigaction1Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('sigaction'); - late final _sigaction1 = _sigaction1Ptr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + late final _sec_releasePtr = + _lookup)>>( + 'sec_release'); + late final _sec_release = + _sec_releasePtr.asFunction)>(); - int sigaddset( - ffi.Pointer arg0, - int arg1, + CFStringRef SecCopyErrorMessageString( + int status, + ffi.Pointer reserved, ) { - return _sigaddset( - arg0, - arg1, + return _SecCopyErrorMessageString( + status, + reserved, ); } - late final _sigaddsetPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigaddset'); - late final _sigaddset = - _sigaddsetPtr.asFunction, int)>(); + late final _SecCopyErrorMessageStringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + OSStatus, ffi.Pointer)>>('SecCopyErrorMessageString'); + late final _SecCopyErrorMessageString = _SecCopyErrorMessageStringPtr + .asFunction)>(); - int sigaltstack( - ffi.Pointer arg0, - ffi.Pointer arg1, + void __assert_rtn( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return _sigaltstack( + return ___assert_rtn( arg0, arg1, + arg2, + arg3, ); } - late final _sigaltstackPtr = _lookup< + late final ___assert_rtnPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sigaltstack'); - late final _sigaltstack = _sigaltstackPtr - .asFunction, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int, ffi.Pointer)>>('__assert_rtn'); + late final ___assert_rtn = ___assert_rtnPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); - int sigdelset( - ffi.Pointer arg0, - int arg1, - ) { - return _sigdelset( - arg0, - arg1, - ); - } + late final ffi.Pointer<_RuneLocale> __DefaultRuneLocale = + _lookup<_RuneLocale>('_DefaultRuneLocale'); - late final _sigdelsetPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigdelset'); - late final _sigdelset = - _sigdelsetPtr.asFunction, int)>(); + _RuneLocale get _DefaultRuneLocale => __DefaultRuneLocale.ref; - int sigemptyset( - ffi.Pointer arg0, - ) { - return _sigemptyset( - arg0, - ); - } + late final ffi.Pointer> __CurrentRuneLocale = + _lookup>('_CurrentRuneLocale'); - late final _sigemptysetPtr = - _lookup)>>( - 'sigemptyset'); - late final _sigemptyset = - _sigemptysetPtr.asFunction)>(); + ffi.Pointer<_RuneLocale> get _CurrentRuneLocale => __CurrentRuneLocale.value; - int sigfillset( - ffi.Pointer arg0, + set _CurrentRuneLocale(ffi.Pointer<_RuneLocale> value) => + __CurrentRuneLocale.value = value; + + int ___runetype( + int arg0, ) { - return _sigfillset( + return ____runetype( arg0, ); } - late final _sigfillsetPtr = - _lookup)>>( - 'sigfillset'); - late final _sigfillset = - _sigfillsetPtr.asFunction)>(); + late final ____runetypePtr = _lookup< + ffi.NativeFunction>( + '___runetype'); + late final ____runetype = ____runetypePtr.asFunction(); - int sighold( + int ___tolower( int arg0, ) { - return _sighold( + return ____tolower( arg0, ); } - late final _sigholdPtr = - _lookup>('sighold'); - late final _sighold = _sigholdPtr.asFunction(); + late final ____tolowerPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '___tolower'); + late final ____tolower = ____tolowerPtr.asFunction(); - int sigignore( + int ___toupper( int arg0, ) { - return _sigignore( + return ____toupper( arg0, ); } - late final _sigignorePtr = - _lookup>('sigignore'); - late final _sigignore = _sigignorePtr.asFunction(); + late final ____toupperPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '___toupper'); + late final ____toupper = ____toupperPtr.asFunction(); - int siginterrupt( + int __maskrune( int arg0, int arg1, ) { - return _siginterrupt( + return ___maskrune( arg0, arg1, ); } - late final _siginterruptPtr = - _lookup>( - 'siginterrupt'); - late final _siginterrupt = - _siginterruptPtr.asFunction(); + late final ___maskrunePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + __darwin_ct_rune_t, ffi.UnsignedLong)>>('__maskrune'); + late final ___maskrune = ___maskrunePtr.asFunction(); - int sigismember( - ffi.Pointer arg0, - int arg1, + int __toupper( + int arg0, ) { - return _sigismember( + return ___toupper1( arg0, - arg1, ); } - late final _sigismemberPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigismember'); - late final _sigismember = - _sigismemberPtr.asFunction, int)>(); + late final ___toupperPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '__toupper'); + late final ___toupper1 = ___toupperPtr.asFunction(); - int sigpause( + int __tolower( int arg0, ) { - return _sigpause( + return ___tolower1( arg0, ); } - late final _sigpausePtr = - _lookup>('sigpause'); - late final _sigpause = _sigpausePtr.asFunction(); + late final ___tolowerPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '__tolower'); + late final ___tolower1 = ___tolowerPtr.asFunction(); - int sigpending( - ffi.Pointer arg0, - ) { - return _sigpending( - arg0, - ); + ffi.Pointer __error() { + return ___error(); } - late final _sigpendingPtr = - _lookup)>>( - 'sigpending'); - late final _sigpending = - _sigpendingPtr.asFunction)>(); + late final ___errorPtr = + _lookup Function()>>('__error'); + late final ___error = + ___errorPtr.asFunction Function()>(); - int sigprocmask( + ffi.Pointer localeconv() { + return _localeconv(); + } + + late final _localeconvPtr = + _lookup Function()>>('localeconv'); + late final _localeconv = + _localeconvPtr.asFunction Function()>(); + + ffi.Pointer setlocale( int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg1, ) { - return _sigprocmask( + return _setlocale( arg0, arg1, - arg2, ); } - late final _sigprocmaskPtr = _lookup< + late final _setlocalePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('sigprocmask'); - late final _sigprocmask = _sigprocmaskPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('setlocale'); + late final _setlocale = _setlocalePtr + .asFunction Function(int, ffi.Pointer)>(); - int sigrelse( - int arg0, + int __math_errhandling() { + return ___math_errhandling(); + } + + late final ___math_errhandlingPtr = + _lookup>('__math_errhandling'); + late final ___math_errhandling = + ___math_errhandlingPtr.asFunction(); + + int __fpclassifyf( + double arg0, ) { - return _sigrelse( + return ___fpclassifyf( arg0, ); } - late final _sigrelsePtr = - _lookup>('sigrelse'); - late final _sigrelse = _sigrelsePtr.asFunction(); + late final ___fpclassifyfPtr = + _lookup>('__fpclassifyf'); + late final ___fpclassifyf = + ___fpclassifyfPtr.asFunction(); - ffi.Pointer> sigset( - int arg0, - ffi.Pointer> arg1, + int __fpclassifyd( + double arg0, ) { - return _sigset( + return ___fpclassifyd( arg0, - arg1, ); } - late final _sigsetPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Int, - ffi.Pointer< - ffi.NativeFunction>)>>('sigset'); - late final _sigset = _sigsetPtr.asFunction< - ffi.Pointer> Function( - int, ffi.Pointer>)>(); + late final ___fpclassifydPtr = + _lookup>( + '__fpclassifyd'); + late final ___fpclassifyd = + ___fpclassifydPtr.asFunction(); - int sigsuspend( - ffi.Pointer arg0, + double acosf( + double arg0, ) { - return _sigsuspend( + return _acosf( arg0, ); } - late final _sigsuspendPtr = - _lookup)>>( - 'sigsuspend'); - late final _sigsuspend = - _sigsuspendPtr.asFunction)>(); + late final _acosfPtr = + _lookup>('acosf'); + late final _acosf = _acosfPtr.asFunction(); - int sigwait( - ffi.Pointer arg0, - ffi.Pointer arg1, + double acos( + double arg0, ) { - return _sigwait( + return _acos( arg0, - arg1, ); } - late final _sigwaitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sigwait'); - late final _sigwait = _sigwaitPtr - .asFunction, ffi.Pointer)>(); + late final _acosPtr = + _lookup>('acos'); + late final _acos = _acosPtr.asFunction(); - void psignal( - int arg0, - ffi.Pointer arg1, + double asinf( + double arg0, ) { - return _psignal( + return _asinf( arg0, - arg1, ); } - late final _psignalPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.UnsignedInt, ffi.Pointer)>>('psignal'); - late final _psignal = - _psignalPtr.asFunction)>(); + late final _asinfPtr = + _lookup>('asinf'); + late final _asinf = _asinfPtr.asFunction(); - int sigblock( - int arg0, + double asin( + double arg0, ) { - return _sigblock( + return _asin( arg0, ); } - late final _sigblockPtr = - _lookup>('sigblock'); - late final _sigblock = _sigblockPtr.asFunction(); + late final _asinPtr = + _lookup>('asin'); + late final _asin = _asinPtr.asFunction(); - int sigsetmask( - int arg0, + double atanf( + double arg0, ) { - return _sigsetmask( + return _atanf( arg0, ); } - late final _sigsetmaskPtr = - _lookup>('sigsetmask'); - late final _sigsetmask = _sigsetmaskPtr.asFunction(); + late final _atanfPtr = + _lookup>('atanf'); + late final _atanf = _atanfPtr.asFunction(); - int sigvec1( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + double atan( + double arg0, ) { - return _sigvec1( + return _atan( arg0, - arg1, - arg2, ); } - late final _sigvec1Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Pointer)>>('sigvec'); - late final _sigvec1 = _sigvec1Ptr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + late final _atanPtr = + _lookup>('atan'); + late final _atan = _atanPtr.asFunction(); - int renameat( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + double atan2f( + double arg0, + double arg1, ) { - return _renameat( + return _atan2f( arg0, arg1, - arg2, - arg3, ); } - late final _renameatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('renameat'); - late final _renameat = _renameatPtr.asFunction< - int Function(int, ffi.Pointer, int, ffi.Pointer)>(); + late final _atan2fPtr = + _lookup>( + 'atan2f'); + late final _atan2f = _atan2fPtr.asFunction(); - int renamex_np( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + double atan2( + double arg0, + double arg1, ) { - return _renamex_np( + return _atan2( arg0, arg1, - arg2, ); } - late final _renamex_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('renamex_np'); - late final _renamex_np = _renamex_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _atan2Ptr = + _lookup>( + 'atan2'); + late final _atan2 = _atan2Ptr.asFunction(); - int renameatx_np( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, - int arg4, + double cosf( + double arg0, ) { - return _renameatx_np( + return _cosf( arg0, - arg1, - arg2, - arg3, - arg4, ); } - late final _renameatx_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Pointer, ffi.UnsignedInt)>>('renameatx_np'); - late final _renameatx_np = _renameatx_npPtr.asFunction< - int Function( - int, ffi.Pointer, int, ffi.Pointer, int)>(); - - late final ffi.Pointer> ___stdinp = - _lookup>('__stdinp'); - - ffi.Pointer get __stdinp => ___stdinp.value; - - set __stdinp(ffi.Pointer value) => ___stdinp.value = value; - - late final ffi.Pointer> ___stdoutp = - _lookup>('__stdoutp'); - - ffi.Pointer get __stdoutp => ___stdoutp.value; - - set __stdoutp(ffi.Pointer value) => ___stdoutp.value = value; - - late final ffi.Pointer> ___stderrp = - _lookup>('__stderrp'); - - ffi.Pointer get __stderrp => ___stderrp.value; - - set __stderrp(ffi.Pointer value) => ___stderrp.value = value; + late final _cosfPtr = + _lookup>('cosf'); + late final _cosf = _cosfPtr.asFunction(); - void clearerr( - ffi.Pointer arg0, + double cos( + double arg0, ) { - return _clearerr( + return _cos( arg0, ); } - late final _clearerrPtr = - _lookup)>>( - 'clearerr'); - late final _clearerr = - _clearerrPtr.asFunction)>(); + late final _cosPtr = + _lookup>('cos'); + late final _cos = _cosPtr.asFunction(); - int fclose( - ffi.Pointer arg0, + double sinf( + double arg0, ) { - return _fclose( + return _sinf( arg0, ); } - late final _fclosePtr = - _lookup)>>( - 'fclose'); - late final _fclose = _fclosePtr.asFunction)>(); + late final _sinfPtr = + _lookup>('sinf'); + late final _sinf = _sinfPtr.asFunction(); - int feof( - ffi.Pointer arg0, + double sin( + double arg0, ) { - return _feof( + return _sin( arg0, ); } - late final _feofPtr = - _lookup)>>('feof'); - late final _feof = _feofPtr.asFunction)>(); + late final _sinPtr = + _lookup>('sin'); + late final _sin = _sinPtr.asFunction(); - int ferror( - ffi.Pointer arg0, + double tanf( + double arg0, ) { - return _ferror( + return _tanf( arg0, ); } - late final _ferrorPtr = - _lookup)>>( - 'ferror'); - late final _ferror = _ferrorPtr.asFunction)>(); + late final _tanfPtr = + _lookup>('tanf'); + late final _tanf = _tanfPtr.asFunction(); - int fflush( - ffi.Pointer arg0, + double tan( + double arg0, ) { - return _fflush( + return _tan( arg0, ); } - late final _fflushPtr = - _lookup)>>( - 'fflush'); - late final _fflush = _fflushPtr.asFunction)>(); + late final _tanPtr = + _lookup>('tan'); + late final _tan = _tanPtr.asFunction(); - int fgetc( - ffi.Pointer arg0, + double acoshf( + double arg0, ) { - return _fgetc( + return _acoshf( arg0, ); } - late final _fgetcPtr = - _lookup)>>('fgetc'); - late final _fgetc = _fgetcPtr.asFunction)>(); + late final _acoshfPtr = + _lookup>('acoshf'); + late final _acoshf = _acoshfPtr.asFunction(); - int fgetpos( - ffi.Pointer arg0, - ffi.Pointer arg1, + double acosh( + double arg0, ) { - return _fgetpos( + return _acosh( arg0, - arg1, ); } - late final _fgetposPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fgetpos'); - late final _fgetpos = _fgetposPtr - .asFunction, ffi.Pointer)>(); + late final _acoshPtr = + _lookup>('acosh'); + late final _acosh = _acoshPtr.asFunction(); - ffi.Pointer fgets( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + double asinhf( + double arg0, ) { - return _fgets( + return _asinhf( arg0, - arg1, - arg2, ); } - late final _fgetsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int, ffi.Pointer)>>('fgets'); - late final _fgets = _fgetsPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + late final _asinhfPtr = + _lookup>('asinhf'); + late final _asinhf = _asinhfPtr.asFunction(); - ffi.Pointer fopen( - ffi.Pointer __filename, - ffi.Pointer __mode, + double asinh( + double arg0, ) { - return _fopen( - __filename, - __mode, + return _asinh( + arg0, ); } - late final _fopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('fopen'); - late final _fopen = _fopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _asinhPtr = + _lookup>('asinh'); + late final _asinh = _asinhPtr.asFunction(); - int fprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double atanhf( + double arg0, ) { - return _fprintf( + return _atanhf( arg0, - arg1, ); } - late final _fprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('fprintf'); - late final _fprintf = _fprintfPtr - .asFunction, ffi.Pointer)>(); + late final _atanhfPtr = + _lookup>('atanhf'); + late final _atanhf = _atanhfPtr.asFunction(); - int fputc( - int arg0, - ffi.Pointer arg1, + double atanh( + double arg0, ) { - return _fputc( + return _atanh( arg0, - arg1, ); } - late final _fputcPtr = - _lookup)>>( - 'fputc'); - late final _fputc = - _fputcPtr.asFunction)>(); + late final _atanhPtr = + _lookup>('atanh'); + late final _atanh = _atanhPtr.asFunction(); - int fputs( - ffi.Pointer arg0, - ffi.Pointer arg1, + double coshf( + double arg0, ) { - return _fputs( + return _coshf( arg0, - arg1, ); } - late final _fputsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fputs'); - late final _fputs = _fputsPtr - .asFunction, ffi.Pointer)>(); + late final _coshfPtr = + _lookup>('coshf'); + late final _coshf = _coshfPtr.asFunction(); - int fread( - ffi.Pointer __ptr, - int __size, - int __nitems, - ffi.Pointer __stream, + double cosh( + double arg0, ) { - return _fread( - __ptr, - __size, - __nitems, - __stream, + return _cosh( + arg0, ); } - late final _freadPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer)>>('fread'); - late final _fread = _freadPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + late final _coshPtr = + _lookup>('cosh'); + late final _cosh = _coshPtr.asFunction(); - ffi.Pointer freopen( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + double sinhf( + double arg0, ) { - return _freopen( + return _sinhf( arg0, - arg1, - arg2, ); } - late final _freopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('freopen'); - late final _freopen = _freopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + late final _sinhfPtr = + _lookup>('sinhf'); + late final _sinhf = _sinhfPtr.asFunction(); - int fscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double sinh( + double arg0, ) { - return _fscanf( + return _sinh( arg0, - arg1, ); } - late final _fscanfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('fscanf'); - late final _fscanf = _fscanfPtr - .asFunction, ffi.Pointer)>(); + late final _sinhPtr = + _lookup>('sinh'); + late final _sinh = _sinhPtr.asFunction(); - int fseek( - ffi.Pointer arg0, - int arg1, - int arg2, + double tanhf( + double arg0, ) { - return _fseek( + return _tanhf( arg0, - arg1, - arg2, ); } - late final _fseekPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Long, ffi.Int)>>('fseek'); - late final _fseek = - _fseekPtr.asFunction, int, int)>(); + late final _tanhfPtr = + _lookup>('tanhf'); + late final _tanhf = _tanhfPtr.asFunction(); - int fsetpos( - ffi.Pointer arg0, - ffi.Pointer arg1, + double tanh( + double arg0, ) { - return _fsetpos( + return _tanh( arg0, - arg1, ); } - late final _fsetposPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fsetpos'); - late final _fsetpos = _fsetposPtr - .asFunction, ffi.Pointer)>(); + late final _tanhPtr = + _lookup>('tanh'); + late final _tanh = _tanhPtr.asFunction(); - int ftell( - ffi.Pointer arg0, + double expf( + double arg0, ) { - return _ftell( + return _expf( arg0, ); } - late final _ftellPtr = - _lookup)>>( - 'ftell'); - late final _ftell = _ftellPtr.asFunction)>(); + late final _expfPtr = + _lookup>('expf'); + late final _expf = _expfPtr.asFunction(); - int fwrite( - ffi.Pointer __ptr, - int __size, - int __nitems, - ffi.Pointer __stream, + double exp( + double arg0, ) { - return _fwrite( - __ptr, - __size, - __nitems, - __stream, + return _exp( + arg0, ); } - late final _fwritePtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer)>>('fwrite'); - late final _fwrite = _fwritePtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + late final _expPtr = + _lookup>('exp'); + late final _exp = _expPtr.asFunction(); - int getc( - ffi.Pointer arg0, + double exp2f( + double arg0, ) { - return _getc( + return _exp2f( arg0, ); } - late final _getcPtr = - _lookup)>>('getc'); - late final _getc = _getcPtr.asFunction)>(); - - int getchar() { - return _getchar(); - } - - late final _getcharPtr = - _lookup>('getchar'); - late final _getchar = _getcharPtr.asFunction(); + late final _exp2fPtr = + _lookup>('exp2f'); + late final _exp2f = _exp2fPtr.asFunction(); - ffi.Pointer gets( - ffi.Pointer arg0, + double exp2( + double arg0, ) { - return _gets( + return _exp2( arg0, ); } - late final _getsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('gets'); - late final _gets = _getsPtr - .asFunction Function(ffi.Pointer)>(); + late final _exp2Ptr = + _lookup>('exp2'); + late final _exp2 = _exp2Ptr.asFunction(); - void perror( - ffi.Pointer arg0, + double expm1f( + double arg0, ) { - return _perror( + return _expm1f( arg0, ); } - late final _perrorPtr = - _lookup)>>( - 'perror'); - late final _perror = - _perrorPtr.asFunction)>(); + late final _expm1fPtr = + _lookup>('expm1f'); + late final _expm1f = _expm1fPtr.asFunction(); - int printf( - ffi.Pointer arg0, + double expm1( + double arg0, ) { - return _printf( + return _expm1( arg0, ); } - late final _printfPtr = - _lookup)>>( - 'printf'); - late final _printf = - _printfPtr.asFunction)>(); + late final _expm1Ptr = + _lookup>('expm1'); + late final _expm1 = _expm1Ptr.asFunction(); - int putc( - int arg0, - ffi.Pointer arg1, + double logf( + double arg0, ) { - return _putc( + return _logf( arg0, - arg1, ); } - late final _putcPtr = - _lookup)>>( - 'putc'); - late final _putc = - _putcPtr.asFunction)>(); + late final _logfPtr = + _lookup>('logf'); + late final _logf = _logfPtr.asFunction(); - int putchar( - int arg0, + double log( + double arg0, ) { - return _putchar( + return _log( arg0, ); } - late final _putcharPtr = - _lookup>('putchar'); - late final _putchar = _putcharPtr.asFunction(); + late final _logPtr = + _lookup>('log'); + late final _log = _logPtr.asFunction(); - int puts( - ffi.Pointer arg0, + double log10f( + double arg0, ) { - return _puts( + return _log10f( arg0, ); } - late final _putsPtr = - _lookup)>>( - 'puts'); - late final _puts = _putsPtr.asFunction)>(); + late final _log10fPtr = + _lookup>('log10f'); + late final _log10f = _log10fPtr.asFunction(); - int remove( - ffi.Pointer arg0, + double log10( + double arg0, ) { - return _remove( + return _log10( arg0, ); } - late final _removePtr = - _lookup)>>( - 'remove'); - late final _remove = - _removePtr.asFunction)>(); + late final _log10Ptr = + _lookup>('log10'); + late final _log10 = _log10Ptr.asFunction(); - int rename( - ffi.Pointer __old, - ffi.Pointer __new, + double log2f( + double arg0, ) { - return _rename( - __old, - __new, + return _log2f( + arg0, ); } - late final _renamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('rename'); - late final _rename = _renamePtr - .asFunction, ffi.Pointer)>(); + late final _log2fPtr = + _lookup>('log2f'); + late final _log2f = _log2fPtr.asFunction(); - void rewind( - ffi.Pointer arg0, + double log2( + double arg0, ) { - return _rewind( + return _log2( arg0, ); } - late final _rewindPtr = - _lookup)>>( - 'rewind'); - late final _rewind = - _rewindPtr.asFunction)>(); + late final _log2Ptr = + _lookup>('log2'); + late final _log2 = _log2Ptr.asFunction(); - int scanf( - ffi.Pointer arg0, + double log1pf( + double arg0, ) { - return _scanf( + return _log1pf( arg0, ); } - late final _scanfPtr = - _lookup)>>( - 'scanf'); - late final _scanf = - _scanfPtr.asFunction)>(); + late final _log1pfPtr = + _lookup>('log1pf'); + late final _log1pf = _log1pfPtr.asFunction(); - void setbuf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double log1p( + double arg0, ) { - return _setbuf( + return _log1p( arg0, - arg1, ); } - late final _setbufPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('setbuf'); - late final _setbuf = _setbufPtr - .asFunction, ffi.Pointer)>(); + late final _log1pPtr = + _lookup>('log1p'); + late final _log1p = _log1pPtr.asFunction(); - int setvbuf( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - int arg3, + double logbf( + double arg0, ) { - return _setvbuf( + return _logbf( arg0, - arg1, - arg2, - arg3, ); } - late final _setvbufPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int, - ffi.Size)>>('setvbuf'); - late final _setvbuf = _setvbufPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int)>(); + late final _logbfPtr = + _lookup>('logbf'); + late final _logbf = _logbfPtr.asFunction(); - int sprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double logb( + double arg0, ) { - return _sprintf( + return _logb( arg0, - arg1, ); } - late final _sprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sprintf'); - late final _sprintf = _sprintfPtr - .asFunction, ffi.Pointer)>(); + late final _logbPtr = + _lookup>('logb'); + late final _logb = _logbPtr.asFunction(); - int sscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, + double modff( + double arg0, + ffi.Pointer arg1, ) { - return _sscanf( + return _modff( arg0, arg1, ); } - late final _sscanfPtr = _lookup< + late final _modffPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sscanf'); - late final _sscanf = _sscanfPtr - .asFunction, ffi.Pointer)>(); - - ffi.Pointer tmpfile() { - return _tmpfile(); - } - - late final _tmpfilePtr = - _lookup Function()>>('tmpfile'); - late final _tmpfile = _tmpfilePtr.asFunction Function()>(); + ffi.Float Function(ffi.Float, ffi.Pointer)>>('modff'); + late final _modff = + _modffPtr.asFunction)>(); - ffi.Pointer tmpnam( - ffi.Pointer arg0, + double modf( + double arg0, + ffi.Pointer arg1, ) { - return _tmpnam( + return _modf( arg0, + arg1, ); } - late final _tmpnamPtr = _lookup< + late final _modfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('tmpnam'); - late final _tmpnam = _tmpnamPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Double Function(ffi.Double, ffi.Pointer)>>('modf'); + late final _modf = + _modfPtr.asFunction)>(); - int ungetc( - int arg0, - ffi.Pointer arg1, + double ldexpf( + double arg0, + int arg1, ) { - return _ungetc( + return _ldexpf( arg0, arg1, ); } - late final _ungetcPtr = - _lookup)>>( - 'ungetc'); - late final _ungetc = - _ungetcPtr.asFunction)>(); + late final _ldexpfPtr = + _lookup>( + 'ldexpf'); + late final _ldexpf = _ldexpfPtr.asFunction(); - int vfprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + double ldexp( + double arg0, + int arg1, ) { - return _vfprintf( + return _ldexp( arg0, arg1, - arg2, ); } - late final _vfprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, va_list)>>('vfprintf'); - late final _vfprintf = _vfprintfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + late final _ldexpPtr = + _lookup>( + 'ldexp'); + late final _ldexp = _ldexpPtr.asFunction(); - int vprintf( - ffi.Pointer arg0, - va_list arg1, + double frexpf( + double arg0, + ffi.Pointer arg1, ) { - return _vprintf( + return _frexpf( arg0, arg1, ); } - late final _vprintfPtr = _lookup< - ffi.NativeFunction, va_list)>>( - 'vprintf'); - late final _vprintf = - _vprintfPtr.asFunction, va_list)>(); + late final _frexpfPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Float, ffi.Pointer)>>('frexpf'); + late final _frexpf = + _frexpfPtr.asFunction)>(); - int vsprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + double frexp( + double arg0, + ffi.Pointer arg1, ) { - return _vsprintf( + return _frexp( arg0, arg1, - arg2, ); } - late final _vsprintfPtr = _lookup< + late final _frexpPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - va_list)>>('vsprintf'); - late final _vsprintf = _vsprintfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + ffi.Double Function(ffi.Double, ffi.Pointer)>>('frexp'); + late final _frexp = + _frexpPtr.asFunction)>(); - ffi.Pointer ctermid( - ffi.Pointer arg0, + int ilogbf( + double arg0, ) { - return _ctermid( + return _ilogbf( arg0, ); } - late final _ctermidPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctermid'); - late final _ctermid = _ctermidPtr - .asFunction Function(ffi.Pointer)>(); + late final _ilogbfPtr = + _lookup>('ilogbf'); + late final _ilogbf = _ilogbfPtr.asFunction(); - ffi.Pointer fdopen( - int arg0, - ffi.Pointer arg1, + int ilogb( + double arg0, ) { - return _fdopen( + return _ilogb( arg0, - arg1, ); } - late final _fdopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer)>>('fdopen'); - late final _fdopen = _fdopenPtr - .asFunction Function(int, ffi.Pointer)>(); + late final _ilogbPtr = + _lookup>('ilogb'); + late final _ilogb = _ilogbPtr.asFunction(); - int fileno( - ffi.Pointer arg0, + double scalbnf( + double arg0, + int arg1, ) { - return _fileno( + return _scalbnf( arg0, + arg1, ); } - late final _filenoPtr = - _lookup)>>( - 'fileno'); - late final _fileno = _filenoPtr.asFunction)>(); + late final _scalbnfPtr = + _lookup>( + 'scalbnf'); + late final _scalbnf = _scalbnfPtr.asFunction(); - int pclose( - ffi.Pointer arg0, + double scalbn( + double arg0, + int arg1, ) { - return _pclose( + return _scalbn( arg0, + arg1, ); } - late final _pclosePtr = - _lookup)>>( - 'pclose'); - late final _pclose = _pclosePtr.asFunction)>(); + late final _scalbnPtr = + _lookup>( + 'scalbn'); + late final _scalbn = _scalbnPtr.asFunction(); - ffi.Pointer popen( - ffi.Pointer arg0, - ffi.Pointer arg1, + double scalblnf( + double arg0, + int arg1, ) { - return _popen( + return _scalblnf( arg0, arg1, ); } - late final _popenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('popen'); - late final _popen = _popenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _scalblnfPtr = + _lookup>( + 'scalblnf'); + late final _scalblnf = + _scalblnfPtr.asFunction(); - int __srget( - ffi.Pointer arg0, + double scalbln( + double arg0, + int arg1, ) { - return ___srget( + return _scalbln( arg0, + arg1, ); } - late final ___srgetPtr = - _lookup)>>( - '__srget'); - late final ___srget = - ___srgetPtr.asFunction)>(); + late final _scalblnPtr = + _lookup>( + 'scalbln'); + late final _scalbln = _scalblnPtr.asFunction(); - int __svfscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + double fabsf( + double arg0, ) { - return ___svfscanf( + return _fabsf( arg0, - arg1, - arg2, ); } - late final ___svfscanfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - va_list)>>('__svfscanf'); - late final ___svfscanf = ___svfscanfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + late final _fabsfPtr = + _lookup>('fabsf'); + late final _fabsf = _fabsfPtr.asFunction(); - int __swbuf( - int arg0, - ffi.Pointer arg1, + double fabs( + double arg0, ) { - return ___swbuf( + return _fabs( arg0, - arg1, ); } - late final ___swbufPtr = - _lookup)>>( - '__swbuf'); - late final ___swbuf = - ___swbufPtr.asFunction)>(); + late final _fabsPtr = + _lookup>('fabs'); + late final _fabs = _fabsPtr.asFunction(); - void flockfile( - ffi.Pointer arg0, + double cbrtf( + double arg0, ) { - return _flockfile( + return _cbrtf( arg0, ); } - late final _flockfilePtr = - _lookup)>>( - 'flockfile'); - late final _flockfile = - _flockfilePtr.asFunction)>(); + late final _cbrtfPtr = + _lookup>('cbrtf'); + late final _cbrtf = _cbrtfPtr.asFunction(); - int ftrylockfile( - ffi.Pointer arg0, + double cbrt( + double arg0, ) { - return _ftrylockfile( + return _cbrt( arg0, ); } - late final _ftrylockfilePtr = - _lookup)>>( - 'ftrylockfile'); - late final _ftrylockfile = - _ftrylockfilePtr.asFunction)>(); + late final _cbrtPtr = + _lookup>('cbrt'); + late final _cbrt = _cbrtPtr.asFunction(); - void funlockfile( - ffi.Pointer arg0, + double hypotf( + double arg0, + double arg1, ) { - return _funlockfile( + return _hypotf( arg0, + arg1, ); } - late final _funlockfilePtr = - _lookup)>>( - 'funlockfile'); - late final _funlockfile = - _funlockfilePtr.asFunction)>(); + late final _hypotfPtr = + _lookup>( + 'hypotf'); + late final _hypotf = _hypotfPtr.asFunction(); - int getc_unlocked( - ffi.Pointer arg0, + double hypot( + double arg0, + double arg1, ) { - return _getc_unlocked( + return _hypot( arg0, + arg1, ); } - late final _getc_unlockedPtr = - _lookup)>>( - 'getc_unlocked'); - late final _getc_unlocked = - _getc_unlockedPtr.asFunction)>(); + late final _hypotPtr = + _lookup>( + 'hypot'); + late final _hypot = _hypotPtr.asFunction(); - int getchar_unlocked() { - return _getchar_unlocked(); + double powf( + double arg0, + double arg1, + ) { + return _powf( + arg0, + arg1, + ); } - late final _getchar_unlockedPtr = - _lookup>('getchar_unlocked'); - late final _getchar_unlocked = - _getchar_unlockedPtr.asFunction(); + late final _powfPtr = + _lookup>( + 'powf'); + late final _powf = _powfPtr.asFunction(); - int putc_unlocked( - int arg0, - ffi.Pointer arg1, + double pow( + double arg0, + double arg1, ) { - return _putc_unlocked( + return _pow( arg0, arg1, ); } - late final _putc_unlockedPtr = - _lookup)>>( - 'putc_unlocked'); - late final _putc_unlocked = - _putc_unlockedPtr.asFunction)>(); + late final _powPtr = + _lookup>( + 'pow'); + late final _pow = _powPtr.asFunction(); - int putchar_unlocked( - int arg0, + double sqrtf( + double arg0, ) { - return _putchar_unlocked( + return _sqrtf( arg0, ); } - late final _putchar_unlockedPtr = - _lookup>( - 'putchar_unlocked'); - late final _putchar_unlocked = - _putchar_unlockedPtr.asFunction(); + late final _sqrtfPtr = + _lookup>('sqrtf'); + late final _sqrtf = _sqrtfPtr.asFunction(); - int getw( - ffi.Pointer arg0, + double sqrt( + double arg0, ) { - return _getw( + return _sqrt( arg0, ); } - late final _getwPtr = - _lookup)>>('getw'); - late final _getw = _getwPtr.asFunction)>(); + late final _sqrtPtr = + _lookup>('sqrt'); + late final _sqrt = _sqrtPtr.asFunction(); - int putw( - int arg0, - ffi.Pointer arg1, + double erff( + double arg0, ) { - return _putw( + return _erff( arg0, - arg1, ); } - late final _putwPtr = - _lookup)>>( - 'putw'); - late final _putw = - _putwPtr.asFunction)>(); + late final _erffPtr = + _lookup>('erff'); + late final _erff = _erffPtr.asFunction(); - ffi.Pointer tempnam( - ffi.Pointer __dir, - ffi.Pointer __prefix, + double erf( + double arg0, ) { - return _tempnam( - __dir, - __prefix, + return _erf( + arg0, ); } - late final _tempnamPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('tempnam'); - late final _tempnam = _tempnamPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _erfPtr = + _lookup>('erf'); + late final _erf = _erfPtr.asFunction(); - int fseeko( - ffi.Pointer __stream, - int __offset, - int __whence, + double erfcf( + double arg0, ) { - return _fseeko( - __stream, - __offset, - __whence, + return _erfcf( + arg0, ); } - late final _fseekoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, off_t, ffi.Int)>>('fseeko'); - late final _fseeko = - _fseekoPtr.asFunction, int, int)>(); + late final _erfcfPtr = + _lookup>('erfcf'); + late final _erfcf = _erfcfPtr.asFunction(); - int ftello( - ffi.Pointer __stream, + double erfc( + double arg0, ) { - return _ftello( - __stream, + return _erfc( + arg0, ); } - late final _ftelloPtr = - _lookup)>>('ftello'); - late final _ftello = _ftelloPtr.asFunction)>(); + late final _erfcPtr = + _lookup>('erfc'); + late final _erfc = _erfcPtr.asFunction(); - int snprintf( - ffi.Pointer __str, - int __size, - ffi.Pointer __format, + double lgammaf( + double arg0, ) { - return _snprintf( - __str, - __size, - __format, + return _lgammaf( + arg0, ); } - late final _snprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer)>>('snprintf'); - late final _snprintf = _snprintfPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); + late final _lgammafPtr = + _lookup>('lgammaf'); + late final _lgammaf = _lgammafPtr.asFunction(); - int vfscanf( - ffi.Pointer __stream, - ffi.Pointer __format, - va_list arg2, + double lgamma( + double arg0, ) { - return _vfscanf( - __stream, - __format, - arg2, + return _lgamma( + arg0, ); } - late final _vfscanfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, va_list)>>('vfscanf'); - late final _vfscanf = _vfscanfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + late final _lgammaPtr = + _lookup>('lgamma'); + late final _lgamma = _lgammaPtr.asFunction(); - int vscanf( - ffi.Pointer __format, - va_list arg1, + double tgammaf( + double arg0, ) { - return _vscanf( - __format, - arg1, + return _tgammaf( + arg0, ); } - late final _vscanfPtr = _lookup< - ffi.NativeFunction, va_list)>>( - 'vscanf'); - late final _vscanf = - _vscanfPtr.asFunction, va_list)>(); + late final _tgammafPtr = + _lookup>('tgammaf'); + late final _tgammaf = _tgammafPtr.asFunction(); - int vsnprintf( - ffi.Pointer __str, - int __size, - ffi.Pointer __format, - va_list arg3, + double tgamma( + double arg0, ) { - return _vsnprintf( - __str, - __size, - __format, - arg3, + return _tgamma( + arg0, ); } - late final _vsnprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer, va_list)>>('vsnprintf'); - late final _vsnprintf = _vsnprintfPtr.asFunction< - int Function( - ffi.Pointer, int, ffi.Pointer, va_list)>(); + late final _tgammaPtr = + _lookup>('tgamma'); + late final _tgamma = _tgammaPtr.asFunction(); - int vsscanf( - ffi.Pointer __str, - ffi.Pointer __format, - va_list arg2, + double ceilf( + double arg0, ) { - return _vsscanf( - __str, - __format, - arg2, + return _ceilf( + arg0, ); } - late final _vsscanfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - va_list)>>('vsscanf'); - late final _vsscanf = _vsscanfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + late final _ceilfPtr = + _lookup>('ceilf'); + late final _ceilf = _ceilfPtr.asFunction(); - int dprintf( - int arg0, - ffi.Pointer arg1, + double ceil( + double arg0, ) { - return _dprintf( + return _ceil( arg0, - arg1, ); } - late final _dprintfPtr = _lookup< - ffi.NativeFunction)>>( - 'dprintf'); - late final _dprintf = - _dprintfPtr.asFunction)>(); + late final _ceilPtr = + _lookup>('ceil'); + late final _ceil = _ceilPtr.asFunction(); - int vdprintf( - int arg0, - ffi.Pointer arg1, - va_list arg2, + double floorf( + double arg0, ) { - return _vdprintf( + return _floorf( arg0, - arg1, - arg2, ); } - late final _vdprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, va_list)>>('vdprintf'); - late final _vdprintf = _vdprintfPtr - .asFunction, va_list)>(); + late final _floorfPtr = + _lookup>('floorf'); + late final _floorf = _floorfPtr.asFunction(); - int getdelim( - ffi.Pointer> __linep, - ffi.Pointer __linecapp, - int __delimiter, - ffi.Pointer __stream, + double floor( + double arg0, ) { - return _getdelim( - __linep, - __linecapp, - __delimiter, - __stream, + return _floor( + arg0, ); } - late final _getdelimPtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Pointer>, - ffi.Pointer, ffi.Int, ffi.Pointer)>>('getdelim'); - late final _getdelim = _getdelimPtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - int, ffi.Pointer)>(); + late final _floorPtr = + _lookup>('floor'); + late final _floor = _floorPtr.asFunction(); - int getline( - ffi.Pointer> __linep, - ffi.Pointer __linecapp, - ffi.Pointer __stream, + double nearbyintf( + double arg0, ) { - return _getline( - __linep, - __linecapp, - __stream, + return _nearbyintf( + arg0, ); } - late final _getlinePtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>>('getline'); - late final _getline = _getlinePtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - ffi.Pointer)>(); + late final _nearbyintfPtr = + _lookup>('nearbyintf'); + late final _nearbyintf = _nearbyintfPtr.asFunction(); - ffi.Pointer fmemopen( - ffi.Pointer __buf, - int __size, - ffi.Pointer __mode, + double nearbyint( + double arg0, ) { - return _fmemopen( - __buf, - __size, - __mode, + return _nearbyint( + arg0, ); } - late final _fmemopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Size, - ffi.Pointer)>>('fmemopen'); - late final _fmemopen = _fmemopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + late final _nearbyintPtr = + _lookup>('nearbyint'); + late final _nearbyint = _nearbyintPtr.asFunction(); - ffi.Pointer open_memstream( - ffi.Pointer> __bufp, - ffi.Pointer __sizep, + double rintf( + double arg0, ) { - return _open_memstream( - __bufp, - __sizep, + return _rintf( + arg0, ); } - late final _open_memstreamPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer>, - ffi.Pointer)>>('open_memstream'); - late final _open_memstream = _open_memstreamPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer>, ffi.Pointer)>(); - - late final ffi.Pointer _sys_nerr = _lookup('sys_nerr'); - - int get sys_nerr => _sys_nerr.value; + late final _rintfPtr = + _lookup>('rintf'); + late final _rintf = _rintfPtr.asFunction(); - set sys_nerr(int value) => _sys_nerr.value = value; + double rint( + double arg0, + ) { + return _rint( + arg0, + ); + } - late final ffi.Pointer>> _sys_errlist = - _lookup>>('sys_errlist'); + late final _rintPtr = + _lookup>('rint'); + late final _rint = _rintPtr.asFunction(); - ffi.Pointer> get sys_errlist => _sys_errlist.value; + int lrintf( + double arg0, + ) { + return _lrintf( + arg0, + ); + } - set sys_errlist(ffi.Pointer> value) => - _sys_errlist.value = value; + late final _lrintfPtr = + _lookup>('lrintf'); + late final _lrintf = _lrintfPtr.asFunction(); - int asprintf( - ffi.Pointer> arg0, - ffi.Pointer arg1, + int lrint( + double arg0, ) { - return _asprintf( + return _lrint( arg0, - arg1, ); } - late final _asprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer)>>('asprintf'); - late final _asprintf = _asprintfPtr.asFunction< - int Function( - ffi.Pointer>, ffi.Pointer)>(); + late final _lrintPtr = + _lookup>('lrint'); + late final _lrint = _lrintPtr.asFunction(); - ffi.Pointer ctermid_r( - ffi.Pointer arg0, + double roundf( + double arg0, ) { - return _ctermid_r( + return _roundf( arg0, ); } - late final _ctermid_rPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctermid_r'); - late final _ctermid_r = _ctermid_rPtr - .asFunction Function(ffi.Pointer)>(); + late final _roundfPtr = + _lookup>('roundf'); + late final _roundf = _roundfPtr.asFunction(); - ffi.Pointer fgetln( - ffi.Pointer arg0, - ffi.Pointer arg1, + double round( + double arg0, ) { - return _fgetln( + return _round( arg0, - arg1, ); } - late final _fgetlnPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('fgetln'); - late final _fgetln = _fgetlnPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _roundPtr = + _lookup>('round'); + late final _round = _roundPtr.asFunction(); - ffi.Pointer fmtcheck( - ffi.Pointer arg0, - ffi.Pointer arg1, + int lroundf( + double arg0, ) { - return _fmtcheck( + return _lroundf( arg0, - arg1, ); } - late final _fmtcheckPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('fmtcheck'); - late final _fmtcheck = _fmtcheckPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _lroundfPtr = + _lookup>('lroundf'); + late final _lroundf = _lroundfPtr.asFunction(); - int fpurge( - ffi.Pointer arg0, + int lround( + double arg0, ) { - return _fpurge( + return _lround( arg0, ); } - late final _fpurgePtr = - _lookup)>>( - 'fpurge'); - late final _fpurge = _fpurgePtr.asFunction)>(); + late final _lroundPtr = + _lookup>('lround'); + late final _lround = _lroundPtr.asFunction(); - void setbuffer( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int llrintf( + double arg0, ) { - return _setbuffer( + return _llrintf( arg0, - arg1, - arg2, ); } - late final _setbufferPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>>('setbuffer'); - late final _setbuffer = _setbufferPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _llrintfPtr = + _lookup>('llrintf'); + late final _llrintf = _llrintfPtr.asFunction(); - int setlinebuf( - ffi.Pointer arg0, + int llrint( + double arg0, ) { - return _setlinebuf( + return _llrint( arg0, ); } - late final _setlinebufPtr = - _lookup)>>( - 'setlinebuf'); - late final _setlinebuf = - _setlinebufPtr.asFunction)>(); + late final _llrintPtr = + _lookup>('llrint'); + late final _llrint = _llrintPtr.asFunction(); - int vasprintf( - ffi.Pointer> arg0, - ffi.Pointer arg1, - va_list arg2, + int llroundf( + double arg0, ) { - return _vasprintf( + return _llroundf( arg0, - arg1, - arg2, ); } - late final _vasprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer, va_list)>>('vasprintf'); - late final _vasprintf = _vasprintfPtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - va_list)>(); + late final _llroundfPtr = + _lookup>('llroundf'); + late final _llroundf = _llroundfPtr.asFunction(); - ffi.Pointer funopen( - ffi.Pointer arg0, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> - arg1, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> - arg2, - ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> - arg3, - ffi.Pointer)>> - arg4, + int llround( + double arg0, ) { - return _funopen( + return _llround( arg0, - arg1, - arg2, - arg3, - arg4, ); } - late final _funopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>)>>('funopen'); - late final _funopen = _funopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction)>>)>(); + late final _llroundPtr = + _lookup>('llround'); + late final _llround = _llroundPtr.asFunction(); - int __sprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, + double truncf( + double arg0, ) { - return ___sprintf_chk( + return _truncf( arg0, - arg1, - arg2, - arg3, ); } - late final ___sprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, - ffi.Pointer)>>('__sprintf_chk'); - late final ___sprintf_chk = ___sprintf_chkPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + late final _truncfPtr = + _lookup>('truncf'); + late final _truncf = _truncfPtr.asFunction(); - int __snprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, - ffi.Pointer arg4, + double trunc( + double arg0, ) { - return ___snprintf_chk( + return _trunc( arg0, - arg1, - arg2, - arg3, - arg4, ); } - late final ___snprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, - ffi.Pointer)>>('__snprintf_chk'); - late final ___snprintf_chk = ___snprintf_chkPtr.asFunction< - int Function( - ffi.Pointer, int, int, int, ffi.Pointer)>(); + late final _truncPtr = + _lookup>('trunc'); + late final _trunc = _truncPtr.asFunction(); - int __vsprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, - va_list arg4, + double fmodf( + double arg0, + double arg1, ) { - return ___vsprintf_chk( + return _fmodf( arg0, arg1, - arg2, - arg3, - arg4, ); } - late final ___vsprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, - ffi.Pointer, va_list)>>('__vsprintf_chk'); - late final ___vsprintf_chk = ___vsprintf_chkPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer, va_list)>(); + late final _fmodfPtr = + _lookup>( + 'fmodf'); + late final _fmodf = _fmodfPtr.asFunction(); - int __vsnprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, - ffi.Pointer arg4, - va_list arg5, + double fmod( + double arg0, + double arg1, ) { - return ___vsnprintf_chk( + return _fmod( arg0, arg1, - arg2, - arg3, - arg4, - arg5, ); } - late final ___vsnprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, - ffi.Pointer, va_list)>>('__vsnprintf_chk'); - late final ___vsnprintf_chk = ___vsnprintf_chkPtr.asFunction< - int Function(ffi.Pointer, int, int, int, ffi.Pointer, - va_list)>(); + late final _fmodPtr = + _lookup>( + 'fmod'); + late final _fmod = _fmodPtr.asFunction(); - int getpriority( - int arg0, - int arg1, + double remainderf( + double arg0, + double arg1, ) { - return _getpriority( + return _remainderf( arg0, arg1, ); } - late final _getpriorityPtr = - _lookup>( - 'getpriority'); - late final _getpriority = - _getpriorityPtr.asFunction(); + late final _remainderfPtr = + _lookup>( + 'remainderf'); + late final _remainderf = + _remainderfPtr.asFunction(); - int getiopolicy_np( - int arg0, - int arg1, + double remainder( + double arg0, + double arg1, ) { - return _getiopolicy_np( + return _remainder( arg0, arg1, ); } - late final _getiopolicy_npPtr = - _lookup>( - 'getiopolicy_np'); - late final _getiopolicy_np = - _getiopolicy_npPtr.asFunction(); + late final _remainderPtr = + _lookup>( + 'remainder'); + late final _remainder = + _remainderPtr.asFunction(); - int getrlimit( - int arg0, - ffi.Pointer arg1, + double remquof( + double arg0, + double arg1, + ffi.Pointer arg2, ) { - return _getrlimit( + return _remquof( arg0, arg1, + arg2, ); } - late final _getrlimitPtr = _lookup< - ffi.NativeFunction)>>( - 'getrlimit'); - late final _getrlimit = - _getrlimitPtr.asFunction)>(); + late final _remquofPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function( + ffi.Float, ffi.Float, ffi.Pointer)>>('remquof'); + late final _remquof = _remquofPtr + .asFunction)>(); - int getrusage( - int arg0, - ffi.Pointer arg1, + double remquo( + double arg0, + double arg1, + ffi.Pointer arg2, ) { - return _getrusage( + return _remquo( arg0, arg1, + arg2, ); } - late final _getrusagePtr = _lookup< - ffi.NativeFunction)>>( - 'getrusage'); - late final _getrusage = - _getrusagePtr.asFunction)>(); + late final _remquoPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function( + ffi.Double, ffi.Double, ffi.Pointer)>>('remquo'); + late final _remquo = _remquoPtr + .asFunction)>(); - int setpriority( - int arg0, - int arg1, - int arg2, + double copysignf( + double arg0, + double arg1, ) { - return _setpriority( + return _copysignf( arg0, arg1, - arg2, ); } - late final _setpriorityPtr = - _lookup>( - 'setpriority'); - late final _setpriority = - _setpriorityPtr.asFunction(); + late final _copysignfPtr = + _lookup>( + 'copysignf'); + late final _copysignf = + _copysignfPtr.asFunction(); - int setiopolicy_np( - int arg0, - int arg1, - int arg2, + double copysign( + double arg0, + double arg1, ) { - return _setiopolicy_np( + return _copysign( arg0, arg1, - arg2, ); } - late final _setiopolicy_npPtr = - _lookup>( - 'setiopolicy_np'); - late final _setiopolicy_np = - _setiopolicy_npPtr.asFunction(); + late final _copysignPtr = + _lookup>( + 'copysign'); + late final _copysign = + _copysignPtr.asFunction(); - int setrlimit( - int arg0, - ffi.Pointer arg1, + double nanf( + ffi.Pointer arg0, ) { - return _setrlimit( + return _nanf( arg0, - arg1, ); } - late final _setrlimitPtr = _lookup< - ffi.NativeFunction)>>( - 'setrlimit'); - late final _setrlimit = - _setrlimitPtr.asFunction)>(); + late final _nanfPtr = + _lookup)>>( + 'nanf'); + late final _nanf = + _nanfPtr.asFunction)>(); - int wait1( - ffi.Pointer arg0, + double nan( + ffi.Pointer arg0, ) { - return _wait1( + return _nan( arg0, ); } - late final _wait1Ptr = - _lookup)>>('wait'); - late final _wait1 = - _wait1Ptr.asFunction)>(); + late final _nanPtr = + _lookup)>>( + 'nan'); + late final _nan = + _nanPtr.asFunction)>(); - int waitpid( - int arg0, - ffi.Pointer arg1, - int arg2, + double nextafterf( + double arg0, + double arg1, ) { - return _waitpid( + return _nextafterf( arg0, arg1, - arg2, ); } - late final _waitpidPtr = _lookup< - ffi.NativeFunction< - pid_t Function(pid_t, ffi.Pointer, ffi.Int)>>('waitpid'); - late final _waitpid = - _waitpidPtr.asFunction, int)>(); + late final _nextafterfPtr = + _lookup>( + 'nextafterf'); + late final _nextafterf = + _nextafterfPtr.asFunction(); - int waitid( - int arg0, - int arg1, - ffi.Pointer arg2, - int arg3, + double nextafter( + double arg0, + double arg1, ) { - return _waitid( + return _nextafter( arg0, arg1, - arg2, - arg3, ); } - late final _waitidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, id_t, ffi.Pointer, ffi.Int)>>('waitid'); - late final _waitid = _waitidPtr - .asFunction, int)>(); + late final _nextafterPtr = + _lookup>( + 'nextafter'); + late final _nextafter = + _nextafterPtr.asFunction(); - int wait3( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + double fdimf( + double arg0, + double arg1, ) { - return _wait3( + return _fdimf( arg0, arg1, - arg2, ); } - late final _wait3Ptr = _lookup< - ffi.NativeFunction< - pid_t Function( - ffi.Pointer, ffi.Int, ffi.Pointer)>>('wait3'); - late final _wait3 = _wait3Ptr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); + late final _fdimfPtr = + _lookup>( + 'fdimf'); + late final _fdimf = _fdimfPtr.asFunction(); - int wait4( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + double fdim( + double arg0, + double arg1, ) { - return _wait4( + return _fdim( arg0, arg1, - arg2, - arg3, ); } - late final _wait4Ptr = _lookup< - ffi.NativeFunction< - pid_t Function(pid_t, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('wait4'); - late final _wait4 = _wait4Ptr.asFunction< - int Function(int, ffi.Pointer, int, ffi.Pointer)>(); + late final _fdimPtr = + _lookup>( + 'fdim'); + late final _fdim = _fdimPtr.asFunction(); - ffi.Pointer alloca( - int arg0, + double fmaxf( + double arg0, + double arg1, ) { - return _alloca( + return _fmaxf( arg0, + arg1, ); } - late final _allocaPtr = - _lookup Function(ffi.Size)>>( - 'alloca'); - late final _alloca = - _allocaPtr.asFunction Function(int)>(); - - late final ffi.Pointer ___mb_cur_max = - _lookup('__mb_cur_max'); - - int get __mb_cur_max => ___mb_cur_max.value; - - set __mb_cur_max(int value) => ___mb_cur_max.value = value; + late final _fmaxfPtr = + _lookup>( + 'fmaxf'); + late final _fmaxf = _fmaxfPtr.asFunction(); - ffi.Pointer malloc( - int __size, + double fmax( + double arg0, + double arg1, ) { - return _malloc( - __size, + return _fmax( + arg0, + arg1, ); } - late final _mallocPtr = - _lookup Function(ffi.Size)>>( - 'malloc'); - late final _malloc = - _mallocPtr.asFunction Function(int)>(); + late final _fmaxPtr = + _lookup>( + 'fmax'); + late final _fmax = _fmaxPtr.asFunction(); - ffi.Pointer calloc( - int __count, - int __size, + double fminf( + double arg0, + double arg1, ) { - return _calloc( - __count, - __size, + return _fminf( + arg0, + arg1, ); } - late final _callocPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Size, ffi.Size)>>('calloc'); - late final _calloc = - _callocPtr.asFunction Function(int, int)>(); + late final _fminfPtr = + _lookup>( + 'fminf'); + late final _fminf = _fminfPtr.asFunction(); - void free( - ffi.Pointer arg0, + double fmin( + double arg0, + double arg1, ) { - return _free( + return _fmin( arg0, + arg1, ); } - late final _freePtr = - _lookup)>>( - 'free'); - late final _free = - _freePtr.asFunction)>(); + late final _fminPtr = + _lookup>( + 'fmin'); + late final _fmin = _fminPtr.asFunction(); - ffi.Pointer realloc( - ffi.Pointer __ptr, - int __size, + double fmaf( + double arg0, + double arg1, + double arg2, ) { - return _realloc( - __ptr, - __size, + return _fmaf( + arg0, + arg1, + arg2, ); } - late final _reallocPtr = _lookup< + late final _fmafPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('realloc'); - late final _realloc = _reallocPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Float Function(ffi.Float, ffi.Float, ffi.Float)>>('fmaf'); + late final _fmaf = + _fmafPtr.asFunction(); - ffi.Pointer valloc( - int arg0, + double fma( + double arg0, + double arg1, + double arg2, ) { - return _valloc( + return _fma( arg0, + arg1, + arg2, ); } - late final _vallocPtr = - _lookup Function(ffi.Size)>>( - 'valloc'); - late final _valloc = - _vallocPtr.asFunction Function(int)>(); + late final _fmaPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Double, ffi.Double, ffi.Double)>>('fma'); + late final _fma = + _fmaPtr.asFunction(); - ffi.Pointer aligned_alloc( - int __alignment, - int __size, + double __exp10f( + double arg0, ) { - return _aligned_alloc( - __alignment, - __size, + return ___exp10f( + arg0, ); } - late final _aligned_allocPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Size, ffi.Size)>>('aligned_alloc'); - late final _aligned_alloc = - _aligned_allocPtr.asFunction Function(int, int)>(); + late final ___exp10fPtr = + _lookup>('__exp10f'); + late final ___exp10f = ___exp10fPtr.asFunction(); - int posix_memalign( - ffi.Pointer> __memptr, - int __alignment, - int __size, + double __exp10( + double arg0, ) { - return _posix_memalign( - __memptr, - __alignment, - __size, + return ___exp10( + arg0, ); } - late final _posix_memalignPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, ffi.Size, - ffi.Size)>>('posix_memalign'); - late final _posix_memalign = _posix_memalignPtr - .asFunction>, int, int)>(); + late final ___exp10Ptr = + _lookup>('__exp10'); + late final ___exp10 = ___exp10Ptr.asFunction(); - void abort() { - return _abort(); + double __cospif( + double arg0, + ) { + return ___cospif( + arg0, + ); } - late final _abortPtr = - _lookup>('abort'); - late final _abort = _abortPtr.asFunction(); + late final ___cospifPtr = + _lookup>('__cospif'); + late final ___cospif = ___cospifPtr.asFunction(); - int abs( - int arg0, + double __cospi( + double arg0, ) { - return _abs( + return ___cospi( arg0, ); } - late final _absPtr = - _lookup>('abs'); - late final _abs = _absPtr.asFunction(); + late final ___cospiPtr = + _lookup>('__cospi'); + late final ___cospi = ___cospiPtr.asFunction(); - int atexit( - ffi.Pointer> arg0, + double __sinpif( + double arg0, ) { - return _atexit( + return ___sinpif( arg0, ); } - late final _atexitPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>)>>('atexit'); - late final _atexit = _atexitPtr.asFunction< - int Function(ffi.Pointer>)>(); + late final ___sinpifPtr = + _lookup>('__sinpif'); + late final ___sinpif = ___sinpifPtr.asFunction(); - double atof( - ffi.Pointer arg0, + double __sinpi( + double arg0, ) { - return _atof( + return ___sinpi( arg0, ); } - late final _atofPtr = - _lookup)>>( - 'atof'); - late final _atof = - _atofPtr.asFunction)>(); + late final ___sinpiPtr = + _lookup>('__sinpi'); + late final ___sinpi = ___sinpiPtr.asFunction(); - int atoi( - ffi.Pointer arg0, + double __tanpif( + double arg0, ) { - return _atoi( + return ___tanpif( arg0, ); } - late final _atoiPtr = - _lookup)>>( - 'atoi'); - late final _atoi = _atoiPtr.asFunction)>(); + late final ___tanpifPtr = + _lookup>('__tanpif'); + late final ___tanpif = ___tanpifPtr.asFunction(); - int atol( - ffi.Pointer arg0, + double __tanpi( + double arg0, ) { - return _atol( + return ___tanpi( arg0, ); } - late final _atolPtr = - _lookup)>>( - 'atol'); - late final _atol = _atolPtr.asFunction)>(); + late final ___tanpiPtr = + _lookup>('__tanpi'); + late final ___tanpi = ___tanpiPtr.asFunction(); - int atoll( - ffi.Pointer arg0, + __float2 __sincosf_stret( + double arg0, ) { - return _atoll( + return ___sincosf_stret( arg0, ); } - late final _atollPtr = - _lookup)>>( - 'atoll'); - late final _atoll = - _atollPtr.asFunction)>(); + late final ___sincosf_stretPtr = + _lookup>( + '__sincosf_stret'); + late final ___sincosf_stret = + ___sincosf_stretPtr.asFunction<__float2 Function(double)>(); - ffi.Pointer bsearch( - ffi.Pointer __key, - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + __double2 __sincos_stret( + double arg0, ) { - return _bsearch( - __key, - __base, - __nel, - __width, - __compar, + return ___sincos_stret( + arg0, ); } - late final _bsearchPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('bsearch'); - late final _bsearch = _bsearchPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + late final ___sincos_stretPtr = + _lookup>( + '__sincos_stret'); + late final ___sincos_stret = + ___sincos_stretPtr.asFunction<__double2 Function(double)>(); - div_t div( - int arg0, - int arg1, + __float2 __sincospif_stret( + double arg0, ) { - return _div( + return ___sincospif_stret( arg0, - arg1, ); } - late final _divPtr = - _lookup>('div'); - late final _div = _divPtr.asFunction(); + late final ___sincospif_stretPtr = + _lookup>( + '__sincospif_stret'); + late final ___sincospif_stret = + ___sincospif_stretPtr.asFunction<__float2 Function(double)>(); - void exit( - int arg0, + __double2 __sincospi_stret( + double arg0, ) { - return _exit1( + return ___sincospi_stret( arg0, ); } - late final _exitPtr = - _lookup>('exit'); - late final _exit1 = _exitPtr.asFunction(); + late final ___sincospi_stretPtr = + _lookup>( + '__sincospi_stret'); + late final ___sincospi_stret = + ___sincospi_stretPtr.asFunction<__double2 Function(double)>(); - ffi.Pointer getenv( - ffi.Pointer arg0, + double j0( + double arg0, ) { - return _getenv( + return _j0( arg0, ); } - late final _getenvPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('getenv'); - late final _getenv = _getenvPtr - .asFunction Function(ffi.Pointer)>(); + late final _j0Ptr = + _lookup>('j0'); + late final _j0 = _j0Ptr.asFunction(); - int labs( - int arg0, + double j1( + double arg0, ) { - return _labs( + return _j1( arg0, ); } - late final _labsPtr = - _lookup>('labs'); - late final _labs = _labsPtr.asFunction(); + late final _j1Ptr = + _lookup>('j1'); + late final _j1 = _j1Ptr.asFunction(); - ldiv_t ldiv( + double jn( int arg0, - int arg1, + double arg1, ) { - return _ldiv( + return _jn( arg0, arg1, ); } - late final _ldivPtr = - _lookup>('ldiv'); - late final _ldiv = _ldivPtr.asFunction(); + late final _jnPtr = + _lookup>( + 'jn'); + late final _jn = _jnPtr.asFunction(); - int llabs( - int arg0, + double y0( + double arg0, ) { - return _llabs( + return _y0( arg0, ); } - late final _llabsPtr = - _lookup>('llabs'); - late final _llabs = _llabsPtr.asFunction(); + late final _y0Ptr = + _lookup>('y0'); + late final _y0 = _y0Ptr.asFunction(); - lldiv_t lldiv( - int arg0, - int arg1, + double y1( + double arg0, ) { - return _lldiv( + return _y1( arg0, - arg1, ); } - late final _lldivPtr = - _lookup>( - 'lldiv'); - late final _lldiv = _lldivPtr.asFunction(); + late final _y1Ptr = + _lookup>('y1'); + late final _y1 = _y1Ptr.asFunction(); - int mblen( - ffi.Pointer __s, - int __n, + double yn( + int arg0, + double arg1, ) { - return _mblen( - __s, - __n, + return _yn( + arg0, + arg1, ); } - late final _mblenPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('mblen'); - late final _mblen = - _mblenPtr.asFunction, int)>(); + late final _ynPtr = + _lookup>( + 'yn'); + late final _yn = _ynPtr.asFunction(); - int mbstowcs( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + double scalb( + double arg0, + double arg1, ) { - return _mbstowcs( + return _scalb( arg0, arg1, - arg2, ); } - late final _mbstowcsPtr = _lookup< - ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('mbstowcs'); - late final _mbstowcs = _mbstowcsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _scalbPtr = + _lookup>( + 'scalb'); + late final _scalb = _scalbPtr.asFunction(); - int mbtowc( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + late final ffi.Pointer _signgam = _lookup('signgam'); + + int get signgam => _signgam.value; + + set signgam(int value) => _signgam.value = value; + + int setjmp( + ffi.Pointer arg0, ) { - return _mbtowc( + return _setjmp1( arg0, - arg1, - arg2, ); } - late final _mbtowcPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('mbtowc'); - late final _mbtowc = _mbtowcPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _setjmpPtr = + _lookup)>>( + 'setjmp'); + late final _setjmp1 = + _setjmpPtr.asFunction)>(); - void qsort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + void longjmp( + ffi.Pointer arg0, + int arg1, ) { - return _qsort( - __base, - __nel, - __width, - __compar, + return _longjmp1( + arg0, + arg1, ); } - late final _qsortPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('qsort'); - late final _qsort = _qsortPtr.asFunction< - void Function( - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + late final _longjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'longjmp'); + late final _longjmp1 = + _longjmpPtr.asFunction, int)>(); - int rand() { - return _rand(); + int _setjmp( + ffi.Pointer arg0, + ) { + return __setjmp( + arg0, + ); } - late final _randPtr = _lookup>('rand'); - late final _rand = _randPtr.asFunction(); + late final __setjmpPtr = + _lookup)>>( + '_setjmp'); + late final __setjmp = + __setjmpPtr.asFunction)>(); - void srand( - int arg0, + void _longjmp( + ffi.Pointer arg0, + int arg1, ) { - return _srand( + return __longjmp( arg0, + arg1, ); } - late final _srandPtr = - _lookup>('srand'); - late final _srand = _srandPtr.asFunction(); + late final __longjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + '_longjmp'); + late final __longjmp = + __longjmpPtr.asFunction, int)>(); - double strtod( - ffi.Pointer arg0, - ffi.Pointer> arg1, + int sigsetjmp( + ffi.Pointer arg0, + int arg1, ) { - return _strtod( + return _sigsetjmp( arg0, arg1, ); } - late final _strtodPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, - ffi.Pointer>)>>('strtod'); - late final _strtod = _strtodPtr.asFunction< - double Function( - ffi.Pointer, ffi.Pointer>)>(); + late final _sigsetjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigsetjmp'); + late final _sigsetjmp = + _sigsetjmpPtr.asFunction, int)>(); - double strtof( - ffi.Pointer arg0, - ffi.Pointer> arg1, + void siglongjmp( + ffi.Pointer arg0, + int arg1, ) { - return _strtof( + return _siglongjmp( arg0, arg1, ); } - late final _strtofPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer>)>>('strtof'); - late final _strtof = _strtofPtr.asFunction< - double Function( - ffi.Pointer, ffi.Pointer>)>(); + late final _siglongjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'siglongjmp'); + late final _siglongjmp = + _siglongjmpPtr.asFunction, int)>(); - int strtol( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, - ) { - return _strtol( - __str, - __endptr, - __base, - ); + void longjmperror() { + return _longjmperror(); } - late final _strtolPtr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtol'); - late final _strtol = _strtolPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + late final _longjmperrorPtr = + _lookup>('longjmperror'); + late final _longjmperror = _longjmperrorPtr.asFunction(); - int strtoll( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + late final ffi.Pointer>> _sys_signame = + _lookup>>('sys_signame'); + + ffi.Pointer> get sys_signame => _sys_signame.value; + + set sys_signame(ffi.Pointer> value) => + _sys_signame.value = value; + + late final ffi.Pointer>> _sys_siglist = + _lookup>>('sys_siglist'); + + ffi.Pointer> get sys_siglist => _sys_siglist.value; + + set sys_siglist(ffi.Pointer> value) => + _sys_siglist.value = value; + + int raise( + int arg0, ) { - return _strtoll( - __str, - __endptr, - __base, + return _raise( + arg0, ); } - late final _strtollPtr = _lookup< - ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoll'); - late final _strtoll = _strtollPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + late final _raisePtr = + _lookup>('raise'); + late final _raise = _raisePtr.asFunction(); - int strtoul( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + ffi.Pointer> bsd_signal( + int arg0, + ffi.Pointer> arg1, ) { - return _strtoul( - __str, - __endptr, - __base, + return _bsd_signal( + arg0, + arg1, ); } - late final _strtoulPtr = _lookup< + late final _bsd_signalPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoul'); - late final _strtoul = _strtoulPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Int)>>)>>('bsd_signal'); + late final _bsd_signal = _bsd_signalPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); - int strtoull( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + int kill( + int arg0, + int arg1, ) { - return _strtoull( - __str, - __endptr, - __base, + return _kill( + arg0, + arg1, ); } - late final _strtoullPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLongLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoull'); - late final _strtoull = _strtoullPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + late final _killPtr = + _lookup>('kill'); + late final _kill = _killPtr.asFunction(); - int system( - ffi.Pointer arg0, + int killpg( + int arg0, + int arg1, ) { - return _system( + return _killpg( arg0, + arg1, ); } - late final _systemPtr = - _lookup)>>( - 'system'); - late final _system = - _systemPtr.asFunction)>(); + late final _killpgPtr = + _lookup>('killpg'); + late final _killpg = _killpgPtr.asFunction(); - int wcstombs( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int pthread_kill( + pthread_t arg0, + int arg1, ) { - return _wcstombs( + return _pthread_kill( arg0, arg1, - arg2, ); } - late final _wcstombsPtr = _lookup< - ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('wcstombs'); - late final _wcstombs = _wcstombsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _pthread_killPtr = + _lookup>( + 'pthread_kill'); + late final _pthread_kill = + _pthread_killPtr.asFunction(); - int wctomb( - ffi.Pointer arg0, - int arg1, + int pthread_sigmask( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _wctomb( + return _pthread_sigmask( arg0, arg1, + arg2, ); } - late final _wctombPtr = _lookup< + late final _pthread_sigmaskPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.WChar)>>('wctomb'); - late final _wctomb = - _wctombPtr.asFunction, int)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('pthread_sigmask'); + late final _pthread_sigmask = _pthread_sigmaskPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - void _Exit( + int sigaction1( int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return __Exit( + return _sigaction1( arg0, + arg1, + arg2, ); } - late final __ExitPtr = - _lookup>('_Exit'); - late final __Exit = __ExitPtr.asFunction(); + late final _sigaction1Ptr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('sigaction'); + late final _sigaction1 = _sigaction1Ptr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - int a64l( - ffi.Pointer arg0, + int sigaddset( + ffi.Pointer arg0, + int arg1, ) { - return _a64l( + return _sigaddset( arg0, + arg1, ); } - late final _a64lPtr = - _lookup)>>( - 'a64l'); - late final _a64l = _a64lPtr.asFunction)>(); - - double drand48() { - return _drand48(); - } - - late final _drand48Ptr = - _lookup>('drand48'); - late final _drand48 = _drand48Ptr.asFunction(); + late final _sigaddsetPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigaddset'); + late final _sigaddset = + _sigaddsetPtr.asFunction, int)>(); - ffi.Pointer ecvt( - double arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + int sigaltstack( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _ecvt( + return _sigaltstack( arg0, arg1, - arg2, - arg3, ); } - late final _ecvtPtr = _lookup< + late final _sigaltstackPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Double, ffi.Int, - ffi.Pointer, ffi.Pointer)>>('ecvt'); - late final _ecvt = _ecvtPtr.asFunction< - ffi.Pointer Function( - double, int, ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sigaltstack'); + late final _sigaltstack = _sigaltstackPtr + .asFunction, ffi.Pointer)>(); - double erand48( - ffi.Pointer arg0, + int sigdelset( + ffi.Pointer arg0, + int arg1, ) { - return _erand48( + return _sigdelset( arg0, + arg1, ); } - late final _erand48Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer)>>('erand48'); - late final _erand48 = - _erand48Ptr.asFunction)>(); + late final _sigdelsetPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigdelset'); + late final _sigdelset = + _sigdelsetPtr.asFunction, int)>(); - ffi.Pointer fcvt( - double arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + int sigemptyset( + ffi.Pointer arg0, ) { - return _fcvt( + return _sigemptyset( arg0, - arg1, - arg2, - arg3, ); } - late final _fcvtPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Double, ffi.Int, - ffi.Pointer, ffi.Pointer)>>('fcvt'); - late final _fcvt = _fcvtPtr.asFunction< - ffi.Pointer Function( - double, int, ffi.Pointer, ffi.Pointer)>(); + late final _sigemptysetPtr = + _lookup)>>( + 'sigemptyset'); + late final _sigemptyset = + _sigemptysetPtr.asFunction)>(); - ffi.Pointer gcvt( - double arg0, - int arg1, - ffi.Pointer arg2, + int sigfillset( + ffi.Pointer arg0, ) { - return _gcvt( + return _sigfillset( arg0, - arg1, - arg2, ); } - late final _gcvtPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Double, ffi.Int, ffi.Pointer)>>('gcvt'); - late final _gcvt = _gcvtPtr.asFunction< - ffi.Pointer Function(double, int, ffi.Pointer)>(); + late final _sigfillsetPtr = + _lookup)>>( + 'sigfillset'); + late final _sigfillset = + _sigfillsetPtr.asFunction)>(); - int getsubopt( - ffi.Pointer> arg0, - ffi.Pointer> arg1, - ffi.Pointer> arg2, + int sighold( + int arg0, ) { - return _getsubopt( + return _sighold( arg0, - arg1, - arg2, ); } - late final _getsuboptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>)>>('getsubopt'); - late final _getsubopt = _getsuboptPtr.asFunction< - int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer>)>(); + late final _sigholdPtr = + _lookup>('sighold'); + late final _sighold = _sigholdPtr.asFunction(); - int grantpt( + int sigignore( int arg0, ) { - return _grantpt( + return _sigignore( arg0, ); } - late final _grantptPtr = - _lookup>('grantpt'); - late final _grantpt = _grantptPtr.asFunction(); + late final _sigignorePtr = + _lookup>('sigignore'); + late final _sigignore = _sigignorePtr.asFunction(); - ffi.Pointer initstate( + int siginterrupt( int arg0, - ffi.Pointer arg1, - int arg2, + int arg1, ) { - return _initstate( + return _siginterrupt( arg0, arg1, - arg2, ); } - late final _initstatePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.UnsignedInt, ffi.Pointer, ffi.Size)>>('initstate'); - late final _initstate = _initstatePtr.asFunction< - ffi.Pointer Function(int, ffi.Pointer, int)>(); + late final _siginterruptPtr = + _lookup>( + 'siginterrupt'); + late final _siginterrupt = + _siginterruptPtr.asFunction(); - int jrand48( - ffi.Pointer arg0, + int sigismember( + ffi.Pointer arg0, + int arg1, ) { - return _jrand48( + return _sigismember( arg0, + arg1, ); } - late final _jrand48Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer)>>('jrand48'); - late final _jrand48 = - _jrand48Ptr.asFunction)>(); + late final _sigismemberPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigismember'); + late final _sigismember = + _sigismemberPtr.asFunction, int)>(); - ffi.Pointer l64a( + int sigpause( int arg0, ) { - return _l64a( + return _sigpause( arg0, ); } - late final _l64aPtr = - _lookup Function(ffi.Long)>>( - 'l64a'); - late final _l64a = _l64aPtr.asFunction Function(int)>(); + late final _sigpausePtr = + _lookup>('sigpause'); + late final _sigpause = _sigpausePtr.asFunction(); - void lcong48( - ffi.Pointer arg0, + int sigpending( + ffi.Pointer arg0, ) { - return _lcong48( + return _sigpending( arg0, ); } - late final _lcong48Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>>('lcong48'); - late final _lcong48 = - _lcong48Ptr.asFunction)>(); - - int lrand48() { - return _lrand48(); - } - - late final _lrand48Ptr = - _lookup>('lrand48'); - late final _lrand48 = _lrand48Ptr.asFunction(); + late final _sigpendingPtr = + _lookup)>>( + 'sigpending'); + late final _sigpending = + _sigpendingPtr.asFunction)>(); - ffi.Pointer mktemp( - ffi.Pointer arg0, + int sigprocmask( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _mktemp( + return _sigprocmask( arg0, + arg1, + arg2, ); } - late final _mktempPtr = _lookup< + late final _sigprocmaskPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('mktemp'); - late final _mktemp = _mktempPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('sigprocmask'); + late final _sigprocmask = _sigprocmaskPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - int mkstemp( - ffi.Pointer arg0, + int sigrelse( + int arg0, ) { - return _mkstemp( + return _sigrelse( arg0, ); } - late final _mkstempPtr = - _lookup)>>( - 'mkstemp'); - late final _mkstemp = - _mkstempPtr.asFunction)>(); - - int mrand48() { - return _mrand48(); - } - - late final _mrand48Ptr = - _lookup>('mrand48'); - late final _mrand48 = _mrand48Ptr.asFunction(); + late final _sigrelsePtr = + _lookup>('sigrelse'); + late final _sigrelse = _sigrelsePtr.asFunction(); - int nrand48( - ffi.Pointer arg0, + ffi.Pointer> sigset( + int arg0, + ffi.Pointer> arg1, ) { - return _nrand48( + return _sigset( arg0, + arg1, ); } - late final _nrand48Ptr = _lookup< + late final _sigsetPtr = _lookup< ffi.NativeFunction< - ffi.Long Function(ffi.Pointer)>>('nrand48'); - late final _nrand48 = - _nrand48Ptr.asFunction)>(); + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction>)>>('sigset'); + late final _sigset = _sigsetPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); - int posix_openpt( - int arg0, + int sigsuspend( + ffi.Pointer arg0, ) { - return _posix_openpt( + return _sigsuspend( arg0, ); } - late final _posix_openptPtr = - _lookup>('posix_openpt'); - late final _posix_openpt = _posix_openptPtr.asFunction(); + late final _sigsuspendPtr = + _lookup)>>( + 'sigsuspend'); + late final _sigsuspend = + _sigsuspendPtr.asFunction)>(); - ffi.Pointer ptsname( - int arg0, + int sigwait( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _ptsname( + return _sigwait( arg0, + arg1, ); } - late final _ptsnamePtr = - _lookup Function(ffi.Int)>>( - 'ptsname'); - late final _ptsname = - _ptsnamePtr.asFunction Function(int)>(); + late final _sigwaitPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sigwait'); + late final _sigwait = _sigwaitPtr + .asFunction, ffi.Pointer)>(); - int ptsname_r( - int fildes, - ffi.Pointer buffer, - int buflen, + void psignal( + int arg0, + ffi.Pointer arg1, ) { - return _ptsname_r( - fildes, - buffer, - buflen, + return _psignal( + arg0, + arg1, ); } - late final _ptsname_rPtr = _lookup< + late final _psignalPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('ptsname_r'); - late final _ptsname_r = - _ptsname_rPtr.asFunction, int)>(); + ffi.Void Function( + ffi.UnsignedInt, ffi.Pointer)>>('psignal'); + late final _psignal = + _psignalPtr.asFunction)>(); - int putenv( - ffi.Pointer arg0, + int sigblock( + int arg0, ) { - return _putenv( + return _sigblock( arg0, ); } - late final _putenvPtr = - _lookup)>>( - 'putenv'); - late final _putenv = - _putenvPtr.asFunction)>(); - - int random() { - return _random(); - } - - late final _randomPtr = - _lookup>('random'); - late final _random = _randomPtr.asFunction(); + late final _sigblockPtr = + _lookup>('sigblock'); + late final _sigblock = _sigblockPtr.asFunction(); - int rand_r( - ffi.Pointer arg0, + int sigsetmask( + int arg0, ) { - return _rand_r( + return _sigsetmask( arg0, ); } - late final _rand_rPtr = _lookup< - ffi.NativeFunction)>>( - 'rand_r'); - late final _rand_r = - _rand_rPtr.asFunction)>(); + late final _sigsetmaskPtr = + _lookup>('sigsetmask'); + late final _sigsetmask = _sigsetmaskPtr.asFunction(); - ffi.Pointer realpath( - ffi.Pointer arg0, - ffi.Pointer arg1, + int sigvec1( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _realpath( + return _sigvec1( arg0, arg1, + arg2, ); } - late final _realpathPtr = _lookup< + late final _sigvec1Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('realpath'); - late final _realpath = _realpathPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Pointer)>>('sigvec'); + late final _sigvec1 = _sigvec1Ptr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer seed48( - ffi.Pointer arg0, + int renameat( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return _seed48( + return _renameat( arg0, + arg1, + arg2, + arg3, ); } - late final _seed48Ptr = _lookup< + late final _renameatPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('seed48'); - late final _seed48 = _seed48Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer)>>('renameat'); + late final _renameat = _renameatPtr.asFunction< + int Function(int, ffi.Pointer, int, ffi.Pointer)>(); - int setenv( - ffi.Pointer __name, - ffi.Pointer __value, - int __overwrite, + int renamex_np( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _setenv( - __name, - __value, - __overwrite, + return _renamex_np( + arg0, + arg1, + arg2, ); } - late final _setenvPtr = _lookup< + late final _renamex_npPtr = _lookup< ffi.NativeFunction< ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('setenv'); - late final _setenv = _setenvPtr.asFunction< + ffi.UnsignedInt)>>('renamex_np'); + late final _renamex_np = _renamex_npPtr.asFunction< int Function(ffi.Pointer, ffi.Pointer, int)>(); - void setkey( - ffi.Pointer arg0, + int renameatx_np( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + int arg4, ) { - return _setkey( - arg0, - ); - } - - late final _setkeyPtr = - _lookup)>>( - 'setkey'); - late final _setkey = - _setkeyPtr.asFunction)>(); - - ffi.Pointer setstate( - ffi.Pointer arg0, - ) { - return _setstate( + return _renameatx_np( arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _setstatePtr = _lookup< + late final _renameatx_npPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('setstate'); - late final _setstate = _setstatePtr - .asFunction Function(ffi.Pointer)>(); - - void srand48( - int arg0, - ) { - return _srand48( - arg0, - ); - } + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('renameatx_np'); + late final _renameatx_np = _renameatx_npPtr.asFunction< + int Function( + int, ffi.Pointer, int, ffi.Pointer, int)>(); - late final _srand48Ptr = - _lookup>('srand48'); - late final _srand48 = _srand48Ptr.asFunction(); + late final ffi.Pointer> ___stdinp = + _lookup>('__stdinp'); - void srandom( - int arg0, - ) { - return _srandom( - arg0, - ); - } + ffi.Pointer get __stdinp => ___stdinp.value; - late final _srandomPtr = - _lookup>( - 'srandom'); - late final _srandom = _srandomPtr.asFunction(); + set __stdinp(ffi.Pointer value) => ___stdinp.value = value; - int unlockpt( - int arg0, - ) { - return _unlockpt( - arg0, - ); - } + late final ffi.Pointer> ___stdoutp = + _lookup>('__stdoutp'); - late final _unlockptPtr = - _lookup>('unlockpt'); - late final _unlockpt = _unlockptPtr.asFunction(); + ffi.Pointer get __stdoutp => ___stdoutp.value; - int unsetenv( - ffi.Pointer arg0, - ) { - return _unsetenv( - arg0, - ); - } + set __stdoutp(ffi.Pointer value) => ___stdoutp.value = value; - late final _unsetenvPtr = - _lookup)>>( - 'unsetenv'); - late final _unsetenv = - _unsetenvPtr.asFunction)>(); + late final ffi.Pointer> ___stderrp = + _lookup>('__stderrp'); - int arc4random() { - return _arc4random(); - } + ffi.Pointer get __stderrp => ___stderrp.value; - late final _arc4randomPtr = - _lookup>('arc4random'); - late final _arc4random = _arc4randomPtr.asFunction(); + set __stderrp(ffi.Pointer value) => ___stderrp.value = value; - void arc4random_addrandom( - ffi.Pointer arg0, - int arg1, + void clearerr( + ffi.Pointer arg0, ) { - return _arc4random_addrandom( + return _clearerr( arg0, - arg1, ); } - late final _arc4random_addrandomPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Int)>>('arc4random_addrandom'); - late final _arc4random_addrandom = _arc4random_addrandomPtr - .asFunction, int)>(); + late final _clearerrPtr = + _lookup)>>( + 'clearerr'); + late final _clearerr = + _clearerrPtr.asFunction)>(); - void arc4random_buf( - ffi.Pointer __buf, - int __nbytes, + int fclose( + ffi.Pointer arg0, ) { - return _arc4random_buf( - __buf, - __nbytes, + return _fclose( + arg0, ); } - late final _arc4random_bufPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Size)>>('arc4random_buf'); - late final _arc4random_buf = _arc4random_bufPtr - .asFunction, int)>(); + late final _fclosePtr = + _lookup)>>( + 'fclose'); + late final _fclose = _fclosePtr.asFunction)>(); - void arc4random_stir() { - return _arc4random_stir(); + int feof( + ffi.Pointer arg0, + ) { + return _feof( + arg0, + ); } - late final _arc4random_stirPtr = - _lookup>('arc4random_stir'); - late final _arc4random_stir = - _arc4random_stirPtr.asFunction(); + late final _feofPtr = + _lookup)>>('feof'); + late final _feof = _feofPtr.asFunction)>(); - int arc4random_uniform( - int __upper_bound, + int ferror( + ffi.Pointer arg0, ) { - return _arc4random_uniform( - __upper_bound, + return _ferror( + arg0, ); } - late final _arc4random_uniformPtr = - _lookup>( - 'arc4random_uniform'); - late final _arc4random_uniform = - _arc4random_uniformPtr.asFunction(); + late final _ferrorPtr = + _lookup)>>( + 'ferror'); + late final _ferror = _ferrorPtr.asFunction)>(); - int atexit_b( - ffi.Pointer<_ObjCBlock> arg0, + int fflush( + ffi.Pointer arg0, ) { - return _atexit_b( + return _fflush( arg0, ); } - late final _atexit_bPtr = - _lookup)>>( - 'atexit_b'); - late final _atexit_b = - _atexit_bPtr.asFunction)>(); + late final _fflushPtr = + _lookup)>>( + 'fflush'); + late final _fflush = _fflushPtr.asFunction)>(); - ffi.Pointer bsearch_b( - ffi.Pointer __key, - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + int fgetc( + ffi.Pointer arg0, ) { - return _bsearch_b( - __key, - __base, - __nel, - __width, - __compar, + return _fgetc( + arg0, ); } - late final _bsearch_bPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('bsearch_b'); - late final _bsearch_b = _bsearch_bPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + late final _fgetcPtr = + _lookup)>>('fgetc'); + late final _fgetc = _fgetcPtr.asFunction)>(); - ffi.Pointer cgetcap( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int fgetpos( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _cgetcap( + return _fgetpos( arg0, arg1, - arg2, ); } - late final _cgetcapPtr = _lookup< + late final _fgetposPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>('cgetcap'); - late final _cgetcap = _cgetcapPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - int cgetclose() { - return _cgetclose(); - } - - late final _cgetclosePtr = - _lookup>('cgetclose'); - late final _cgetclose = _cgetclosePtr.asFunction(); + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fgetpos'); + late final _fgetpos = _fgetposPtr + .asFunction, ffi.Pointer)>(); - int cgetent( - ffi.Pointer> arg0, - ffi.Pointer> arg1, - ffi.Pointer arg2, + ffi.Pointer fgets( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, ) { - return _cgetent( + return _fgets( arg0, arg1, arg2, ); } - late final _cgetentPtr = _lookup< + late final _fgetsPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer>, - ffi.Pointer)>>('cgetent'); - late final _cgetent = _cgetentPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer>, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Pointer)>>('fgets'); + late final _fgets = _fgetsPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - int cgetfirst( - ffi.Pointer> arg0, - ffi.Pointer> arg1, + ffi.Pointer fopen( + ffi.Pointer __filename, + ffi.Pointer __mode, ) { - return _cgetfirst( - arg0, - arg1, + return _fopen( + __filename, + __mode, ); } - late final _cgetfirstPtr = _lookup< + late final _fopenPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer>)>>('cgetfirst'); - late final _cgetfirst = _cgetfirstPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fopen'); + late final _fopen = _fopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int cgetmatch( - ffi.Pointer arg0, + int fprintf( + ffi.Pointer arg0, ffi.Pointer arg1, ) { - return _cgetmatch( + return _fprintf( arg0, arg1, ); } - late final _cgetmatchPtr = _lookup< + late final _fprintfPtr = _lookup< ffi.NativeFunction< ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('cgetmatch'); - late final _cgetmatch = _cgetmatchPtr - .asFunction, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>>('fprintf'); + late final _fprintf = _fprintfPtr + .asFunction, ffi.Pointer)>(); - int cgetnext( - ffi.Pointer> arg0, - ffi.Pointer> arg1, + int fputc( + int arg0, + ffi.Pointer arg1, ) { - return _cgetnext( + return _fputc( arg0, arg1, ); } - late final _cgetnextPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer>)>>('cgetnext'); - late final _cgetnext = _cgetnextPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer>)>(); + late final _fputcPtr = + _lookup)>>( + 'fputc'); + late final _fputc = + _fputcPtr.asFunction)>(); - int cgetnum( + int fputs( ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer arg1, ) { - return _cgetnum( + return _fputs( arg0, arg1, - arg2, ); } - late final _cgetnumPtr = _lookup< + late final _fputsPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('cgetnum'); - late final _cgetnum = _cgetnumPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fputs'); + late final _fputs = _fputsPtr + .asFunction, ffi.Pointer)>(); - int cgetset( - ffi.Pointer arg0, + int fread( + ffi.Pointer __ptr, + int __size, + int __nitems, + ffi.Pointer __stream, ) { - return _cgetset( - arg0, + return _fread( + __ptr, + __size, + __nitems, + __stream, ); } - late final _cgetsetPtr = - _lookup)>>( - 'cgetset'); - late final _cgetset = - _cgetsetPtr.asFunction)>(); + late final _freadPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer)>>('fread'); + late final _fread = _freadPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); - int cgetstr( + ffi.Pointer freopen( ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer> arg2, + ffi.Pointer arg2, ) { - return _cgetstr( + return _freopen( arg0, arg1, arg2, ); } - late final _cgetstrPtr = _lookup< + late final _freopenPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('cgetstr'); - late final _cgetstr = _cgetstrPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('freopen'); + late final _freopen = _freopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - int cgetustr( - ffi.Pointer arg0, + int fscanf( + ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer> arg2, ) { - return _cgetustr( + return _fscanf( arg0, arg1, - arg2, ); } - late final _cgetustrPtr = _lookup< + late final _fscanfPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('cgetustr'); - late final _cgetustr = _cgetustrPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('fscanf'); + late final _fscanf = _fscanfPtr + .asFunction, ffi.Pointer)>(); - int daemon( - int arg0, + int fseek( + ffi.Pointer arg0, int arg1, + int arg2, ) { - return _daemon( + return _fseek( arg0, arg1, + arg2, ); } - late final _daemonPtr = - _lookup>('daemon'); - late final _daemon = _daemonPtr.asFunction(); + late final _fseekPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Long, ffi.Int)>>('fseek'); + late final _fseek = + _fseekPtr.asFunction, int, int)>(); - ffi.Pointer devname( - int arg0, - int arg1, + int fsetpos( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _devname( + return _fsetpos( arg0, arg1, ); } - late final _devnamePtr = _lookup< - ffi.NativeFunction Function(dev_t, mode_t)>>( - 'devname'); - late final _devname = - _devnamePtr.asFunction Function(int, int)>(); + late final _fsetposPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fsetpos'); + late final _fsetpos = _fsetposPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer devname_r( - int arg0, - int arg1, - ffi.Pointer buf, - int len, + int ftell( + ffi.Pointer arg0, ) { - return _devname_r( + return _ftell( arg0, - arg1, - buf, - len, ); } - late final _devname_rPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - dev_t, mode_t, ffi.Pointer, ffi.Int)>>('devname_r'); - late final _devname_r = _devname_rPtr.asFunction< - ffi.Pointer Function(int, int, ffi.Pointer, int)>(); + late final _ftellPtr = + _lookup)>>( + 'ftell'); + late final _ftell = _ftellPtr.asFunction)>(); - ffi.Pointer getbsize( - ffi.Pointer arg0, - ffi.Pointer arg1, + int fwrite( + ffi.Pointer __ptr, + int __size, + int __nitems, + ffi.Pointer __stream, ) { - return _getbsize( - arg0, - arg1, + return _fwrite( + __ptr, + __size, + __nitems, + __stream, ); } - late final _getbsizePtr = _lookup< + late final _fwritePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('getbsize'); - late final _getbsize = _getbsizePtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer)>>('fwrite'); + late final _fwrite = _fwritePtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); - int getloadavg( - ffi.Pointer arg0, - int arg1, + int getc( + ffi.Pointer arg0, ) { - return _getloadavg( + return _getc( arg0, - arg1, ); } - late final _getloadavgPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int)>>('getloadavg'); - late final _getloadavg = - _getloadavgPtr.asFunction, int)>(); + late final _getcPtr = + _lookup)>>('getc'); + late final _getc = _getcPtr.asFunction)>(); - ffi.Pointer getprogname() { - return _getprogname(); + int getchar() { + return _getchar(); } - late final _getprognamePtr = - _lookup Function()>>( - 'getprogname'); - late final _getprogname = - _getprognamePtr.asFunction Function()>(); + late final _getcharPtr = + _lookup>('getchar'); + late final _getchar = _getcharPtr.asFunction(); - void setprogname( + ffi.Pointer gets( ffi.Pointer arg0, ) { - return _setprogname( + return _gets( arg0, ); } - late final _setprognamePtr = - _lookup)>>( - 'setprogname'); - late final _setprogname = - _setprognamePtr.asFunction)>(); + late final _getsPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('gets'); + late final _gets = _getsPtr + .asFunction Function(ffi.Pointer)>(); - int heapsort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + void perror( + ffi.Pointer arg0, ) { - return _heapsort( - __base, - __nel, - __width, - __compar, + return _perror( + arg0, ); } - late final _heapsortPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('heapsort'); - late final _heapsort = _heapsortPtr.asFunction< - int Function( - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + late final _perrorPtr = + _lookup)>>( + 'perror'); + late final _perror = + _perrorPtr.asFunction)>(); - int heapsort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + int printf( + ffi.Pointer arg0, ) { - return _heapsort_b( - __base, - __nel, - __width, - __compar, + return _printf( + arg0, ); } - late final _heapsort_bPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('heapsort_b'); - late final _heapsort_b = _heapsort_bPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + late final _printfPtr = + _lookup)>>( + 'printf'); + late final _printf = + _printfPtr.asFunction)>(); - int mergesort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + int putc( + int arg0, + ffi.Pointer arg1, ) { - return _mergesort( - __base, - __nel, - __width, - __compar, + return _putc( + arg0, + arg1, ); } - late final _mergesortPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('mergesort'); - late final _mergesort = _mergesortPtr.asFunction< - int Function( - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + late final _putcPtr = + _lookup)>>( + 'putc'); + late final _putc = + _putcPtr.asFunction)>(); - int mergesort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + int putchar( + int arg0, ) { - return _mergesort_b( - __base, - __nel, - __width, - __compar, + return _putchar( + arg0, ); } - late final _mergesort_bPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('mergesort_b'); - late final _mergesort_b = _mergesort_bPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + late final _putcharPtr = + _lookup>('putchar'); + late final _putchar = _putcharPtr.asFunction(); - void psort( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>> - __compar, + int puts( + ffi.Pointer arg0, ) { - return _psort( - __base, - __nel, - __width, - __compar, + return _puts( + arg0, ); } - late final _psortPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>)>>('psort'); - late final _psort = _psortPtr.asFunction< - void Function( - ffi.Pointer, - int, - int, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>)>(); + late final _putsPtr = + _lookup)>>( + 'puts'); + late final _puts = _putsPtr.asFunction)>(); - void psort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + int remove( + ffi.Pointer arg0, ) { - return _psort_b( - __base, - __nel, - __width, - __compar, + return _remove( + arg0, ); } - late final _psort_bPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('psort_b'); - late final _psort_b = _psort_bPtr.asFunction< - void Function( - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + late final _removePtr = + _lookup)>>( + 'remove'); + late final _remove = + _removePtr.asFunction)>(); - void psort_r( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer arg3, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>> - __compar, + int rename( + ffi.Pointer __old, + ffi.Pointer __new, ) { - return _psort_r( - __base, - __nel, - __width, - arg3, - __compar, + return _rename( + __old, + __new, ); } - late final _psort_rPtr = _lookup< + late final _renamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>)>>('psort_r'); - late final _psort_r = _psort_rPtr.asFunction< - void Function( - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('rename'); + late final _rename = _renamePtr + .asFunction, ffi.Pointer)>(); - void qsort_b( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer<_ObjCBlock> __compar, + void rewind( + ffi.Pointer arg0, ) { - return _qsort_b( - __base, - __nel, - __width, - __compar, + return _rewind( + arg0, ); } - late final _qsort_bPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('qsort_b'); - late final _qsort_b = _qsort_bPtr.asFunction< - void Function( - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + late final _rewindPtr = + _lookup)>>( + 'rewind'); + late final _rewind = + _rewindPtr.asFunction)>(); - void qsort_r( - ffi.Pointer __base, - int __nel, - int __width, - ffi.Pointer arg3, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>> - __compar, + int scanf( + ffi.Pointer arg0, ) { - return _qsort_r( - __base, - __nel, - __width, - arg3, - __compar, + return _scanf( + arg0, ); } - late final _qsort_rPtr = _lookup< + late final _scanfPtr = + _lookup)>>( + 'scanf'); + late final _scanf = + _scanfPtr.asFunction)>(); + + void setbuf( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _setbuf( + arg0, + arg1, + ); + } + + late final _setbufPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer, - ffi.Size, - ffi.Size, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>)>>('qsort_r'); - late final _qsort_r = _qsort_rPtr.asFunction< - void Function( - ffi.Pointer, - int, - int, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>)>(); + ffi.Pointer, ffi.Pointer)>>('setbuf'); + late final _setbuf = _setbufPtr + .asFunction, ffi.Pointer)>(); - int radixsort( - ffi.Pointer> __base, - int __nel, - ffi.Pointer __table, - int __endbyte, + int setvbuf( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + int arg3, ) { - return _radixsort( - __base, - __nel, - __table, - __endbyte, + return _setvbuf( + arg0, + arg1, + arg2, + arg3, ); } - late final _radixsortPtr = _lookup< + late final _setvbufPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, ffi.Int, - ffi.Pointer, ffi.UnsignedInt)>>('radixsort'); - late final _radixsort = _radixsortPtr.asFunction< - int Function(ffi.Pointer>, int, - ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int, + ffi.Size)>>('setvbuf'); + late final _setvbuf = _setvbufPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, int)>(); - int rpmatch( + int sprintf( ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _rpmatch( + return _sprintf( arg0, + arg1, ); } - late final _rpmatchPtr = - _lookup)>>( - 'rpmatch'); - late final _rpmatch = - _rpmatchPtr.asFunction)>(); + late final _sprintfPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sprintf'); + late final _sprintf = _sprintfPtr + .asFunction, ffi.Pointer)>(); - int sradixsort( - ffi.Pointer> __base, - int __nel, - ffi.Pointer __table, - int __endbyte, + int sscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _sradixsort( - __base, - __nel, - __table, - __endbyte, + return _sscanf( + arg0, + arg1, ); } - late final _sradixsortPtr = _lookup< + late final _sscanfPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, ffi.Int, - ffi.Pointer, ffi.UnsignedInt)>>('sradixsort'); - late final _sradixsort = _sradixsortPtr.asFunction< - int Function(ffi.Pointer>, int, - ffi.Pointer, int)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sscanf'); + late final _sscanf = _sscanfPtr + .asFunction, ffi.Pointer)>(); - void sranddev() { - return _sranddev(); + ffi.Pointer tmpfile() { + return _tmpfile(); } - late final _sranddevPtr = - _lookup>('sranddev'); - late final _sranddev = _sranddevPtr.asFunction(); + late final _tmpfilePtr = + _lookup Function()>>('tmpfile'); + late final _tmpfile = _tmpfilePtr.asFunction Function()>(); - void srandomdev() { - return _srandomdev(); + ffi.Pointer tmpnam( + ffi.Pointer arg0, + ) { + return _tmpnam( + arg0, + ); } - late final _srandomdevPtr = - _lookup>('srandomdev'); - late final _srandomdev = _srandomdevPtr.asFunction(); + late final _tmpnamPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('tmpnam'); + late final _tmpnam = _tmpnamPtr + .asFunction Function(ffi.Pointer)>(); - ffi.Pointer reallocf( - ffi.Pointer __ptr, - int __size, + int ungetc( + int arg0, + ffi.Pointer arg1, ) { - return _reallocf( - __ptr, - __size, + return _ungetc( + arg0, + arg1, ); } - late final _reallocfPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('reallocf'); - late final _reallocf = _reallocfPtr - .asFunction Function(ffi.Pointer, int)>(); + late final _ungetcPtr = + _lookup)>>( + 'ungetc'); + late final _ungetc = + _ungetcPtr.asFunction)>(); - int strtonum( - ffi.Pointer __numstr, - int __minval, - int __maxval, - ffi.Pointer> __errstrp, + int vfprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _strtonum( - __numstr, - __minval, - __maxval, - __errstrp, + return _vfprintf( + arg0, + arg1, + arg2, ); } - late final _strtonumPtr = _lookup< + late final _vfprintfPtr = _lookup< ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, ffi.LongLong, - ffi.LongLong, ffi.Pointer>)>>('strtonum'); - late final _strtonum = _strtonumPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer>)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer, va_list)>>('vfprintf'); + late final _vfprintf = _vfprintfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - int strtoq( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + int vprintf( + ffi.Pointer arg0, + va_list arg1, ) { - return _strtoq( - __str, - __endptr, - __base, + return _vprintf( + arg0, + arg1, ); } - late final _strtoqPtr = _lookup< - ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoq'); - late final _strtoq = _strtoqPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + late final _vprintfPtr = _lookup< + ffi.NativeFunction, va_list)>>( + 'vprintf'); + late final _vprintf = + _vprintfPtr.asFunction, va_list)>(); - int strtouq( - ffi.Pointer __str, - ffi.Pointer> __endptr, - int __base, + int vsprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _strtouq( - __str, - __endptr, - __base, + return _vsprintf( + arg0, + arg1, + arg2, ); } - late final _strtouqPtr = _lookup< + late final _vsprintfPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLongLong Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtouq'); - late final _strtouq = _strtouqPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); - - late final ffi.Pointer> _suboptarg = - _lookup>('suboptarg'); - - ffi.Pointer get suboptarg => _suboptarg.value; - - set suboptarg(ffi.Pointer value) => _suboptarg.value = value; + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('vsprintf'); + late final _vsprintf = _vsprintfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - ffi.Pointer memchr( - ffi.Pointer __s, - int __c, - int __n, + ffi.Pointer ctermid( + ffi.Pointer arg0, ) { - return _memchr( - __s, - __c, - __n, + return _ctermid( + arg0, ); } - late final _memchrPtr = _lookup< + late final _ctermidPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int, ffi.Size)>>('memchr'); - late final _memchr = _memchrPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + ffi.Pointer Function(ffi.Pointer)>>('ctermid'); + late final _ctermid = _ctermidPtr + .asFunction Function(ffi.Pointer)>(); - int memcmp( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + ffi.Pointer fdopen( + int arg0, + ffi.Pointer arg1, ) { - return _memcmp( - __s1, - __s2, - __n, + return _fdopen( + arg0, + arg1, ); } - late final _memcmpPtr = _lookup< + late final _fdopenPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memcmp'); - late final _memcmp = _memcmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('fdopen'); + late final _fdopen = _fdopenPtr + .asFunction Function(int, ffi.Pointer)>(); - ffi.Pointer memcpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + int fileno( + ffi.Pointer arg0, ) { - return _memcpy( - __dst, - __src, - __n, + return _fileno( + arg0, ); } - late final _memcpyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('memcpy'); - late final _memcpy = _memcpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _filenoPtr = + _lookup)>>( + 'fileno'); + late final _fileno = _filenoPtr.asFunction)>(); - ffi.Pointer memmove( - ffi.Pointer __dst, - ffi.Pointer __src, - int __len, + int pclose( + ffi.Pointer arg0, ) { - return _memmove( - __dst, - __src, - __len, + return _pclose( + arg0, ); } - late final _memmovePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('memmove'); - late final _memmove = _memmovePtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _pclosePtr = + _lookup)>>( + 'pclose'); + late final _pclose = _pclosePtr.asFunction)>(); - ffi.Pointer memset( - ffi.Pointer __b, - int __c, - int __len, + ffi.Pointer popen( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _memset( - __b, - __c, - __len, + return _popen( + arg0, + arg1, ); } - late final _memsetPtr = _lookup< + late final _popenPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int, ffi.Size)>>('memset'); - late final _memset = _memsetPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('popen'); + late final _popen = _popenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer strcat( - ffi.Pointer __s1, - ffi.Pointer __s2, + int __srget( + ffi.Pointer arg0, ) { - return _strcat( - __s1, - __s2, + return ___srget( + arg0, ); } - late final _strcatPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strcat'); - late final _strcat = _strcatPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final ___srgetPtr = + _lookup)>>( + '__srget'); + late final ___srget = + ___srgetPtr.asFunction)>(); - ffi.Pointer strchr( - ffi.Pointer __s, - int __c, + int __svfscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _strchr( - __s, - __c, + return ___svfscanf( + arg0, + arg1, + arg2, ); } - late final _strchrPtr = _lookup< + late final ___svfscanfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('strchr'); - late final _strchr = _strchrPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('__svfscanf'); + late final ___svfscanf = ___svfscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - int strcmp( - ffi.Pointer __s1, - ffi.Pointer __s2, + int __swbuf( + int arg0, + ffi.Pointer arg1, ) { - return _strcmp( - __s1, - __s2, + return ___swbuf( + arg0, + arg1, ); } - late final _strcmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('strcmp'); - late final _strcmp = _strcmpPtr - .asFunction, ffi.Pointer)>(); + late final ___swbufPtr = + _lookup)>>( + '__swbuf'); + late final ___swbuf = + ___swbufPtr.asFunction)>(); - int strcoll( - ffi.Pointer __s1, - ffi.Pointer __s2, + void flockfile( + ffi.Pointer arg0, ) { - return _strcoll( - __s1, - __s2, + return _flockfile( + arg0, ); } - late final _strcollPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('strcoll'); - late final _strcoll = _strcollPtr - .asFunction, ffi.Pointer)>(); + late final _flockfilePtr = + _lookup)>>( + 'flockfile'); + late final _flockfile = + _flockfilePtr.asFunction)>(); - ffi.Pointer strcpy( - ffi.Pointer __dst, - ffi.Pointer __src, + int ftrylockfile( + ffi.Pointer arg0, ) { - return _strcpy( - __dst, - __src, + return _ftrylockfile( + arg0, ); } - late final _strcpyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strcpy'); - late final _strcpy = _strcpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _ftrylockfilePtr = + _lookup)>>( + 'ftrylockfile'); + late final _ftrylockfile = + _ftrylockfilePtr.asFunction)>(); - int strcspn( - ffi.Pointer __s, - ffi.Pointer __charset, + void funlockfile( + ffi.Pointer arg0, ) { - return _strcspn( - __s, - __charset, + return _funlockfile( + arg0, ); } - late final _strcspnPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>>('strcspn'); - late final _strcspn = _strcspnPtr - .asFunction, ffi.Pointer)>(); + late final _funlockfilePtr = + _lookup)>>( + 'funlockfile'); + late final _funlockfile = + _funlockfilePtr.asFunction)>(); - ffi.Pointer strerror( - int __errnum, + int getc_unlocked( + ffi.Pointer arg0, ) { - return _strerror( - __errnum, + return _getc_unlocked( + arg0, ); } - late final _strerrorPtr = - _lookup Function(ffi.Int)>>( - 'strerror'); - late final _strerror = - _strerrorPtr.asFunction Function(int)>(); + late final _getc_unlockedPtr = + _lookup)>>( + 'getc_unlocked'); + late final _getc_unlocked = + _getc_unlockedPtr.asFunction)>(); - int strlen( - ffi.Pointer __s, + int getchar_unlocked() { + return _getchar_unlocked(); + } + + late final _getchar_unlockedPtr = + _lookup>('getchar_unlocked'); + late final _getchar_unlocked = + _getchar_unlockedPtr.asFunction(); + + int putc_unlocked( + int arg0, + ffi.Pointer arg1, ) { - return _strlen( - __s, + return _putc_unlocked( + arg0, + arg1, ); } - late final _strlenPtr = _lookup< - ffi.NativeFunction)>>( - 'strlen'); - late final _strlen = - _strlenPtr.asFunction)>(); + late final _putc_unlockedPtr = + _lookup)>>( + 'putc_unlocked'); + late final _putc_unlocked = + _putc_unlockedPtr.asFunction)>(); - ffi.Pointer strncat( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + int putchar_unlocked( + int arg0, ) { - return _strncat( - __s1, - __s2, - __n, + return _putchar_unlocked( + arg0, ); } - late final _strncatPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strncat'); - late final _strncat = _strncatPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _putchar_unlockedPtr = + _lookup>( + 'putchar_unlocked'); + late final _putchar_unlocked = + _putchar_unlockedPtr.asFunction(); - int strncmp( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + int getw( + ffi.Pointer arg0, ) { - return _strncmp( - __s1, - __s2, - __n, + return _getw( + arg0, ); } - late final _strncmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('strncmp'); - late final _strncmp = _strncmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _getwPtr = + _lookup)>>('getw'); + late final _getw = _getwPtr.asFunction)>(); - ffi.Pointer strncpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + int putw( + int arg0, + ffi.Pointer arg1, ) { - return _strncpy( - __dst, - __src, - __n, + return _putw( + arg0, + arg1, ); } - late final _strncpyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strncpy'); - late final _strncpy = _strncpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _putwPtr = + _lookup)>>( + 'putw'); + late final _putw = + _putwPtr.asFunction)>(); - ffi.Pointer strpbrk( - ffi.Pointer __s, - ffi.Pointer __charset, + ffi.Pointer tempnam( + ffi.Pointer __dir, + ffi.Pointer __prefix, ) { - return _strpbrk( - __s, - __charset, + return _tempnam( + __dir, + __prefix, ); } - late final _strpbrkPtr = _lookup< + late final _tempnamPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strpbrk'); - late final _strpbrk = _strpbrkPtr.asFunction< + ffi.Pointer, ffi.Pointer)>>('tempnam'); + late final _tempnam = _tempnamPtr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer strrchr( - ffi.Pointer __s, - int __c, + int fseeko( + ffi.Pointer __stream, + int __offset, + int __whence, ) { - return _strrchr( - __s, - __c, + return _fseeko( + __stream, + __offset, + __whence, ); } - late final _strrchrPtr = _lookup< + late final _fseekoPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('strrchr'); - late final _strrchr = _strrchrPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, off_t, ffi.Int)>>('fseeko'); + late final _fseeko = + _fseekoPtr.asFunction, int, int)>(); - int strspn( - ffi.Pointer __s, - ffi.Pointer __charset, + int ftello( + ffi.Pointer __stream, ) { - return _strspn( - __s, - __charset, + return _ftello( + __stream, ); } - late final _strspnPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>>('strspn'); - late final _strspn = _strspnPtr - .asFunction, ffi.Pointer)>(); + late final _ftelloPtr = + _lookup)>>('ftello'); + late final _ftello = _ftelloPtr.asFunction)>(); - ffi.Pointer strstr( - ffi.Pointer __big, - ffi.Pointer __little, + int snprintf( + ffi.Pointer __str, + int __size, + ffi.Pointer __format, ) { - return _strstr( - __big, - __little, + return _snprintf( + __str, + __size, + __format, ); } - late final _strstrPtr = _lookup< + late final _snprintfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strstr'); - late final _strstr = _strstrPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer)>>('snprintf'); + late final _snprintf = _snprintfPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); - ffi.Pointer strtok( - ffi.Pointer __str, - ffi.Pointer __sep, + int vfscanf( + ffi.Pointer __stream, + ffi.Pointer __format, + va_list arg2, ) { - return _strtok( - __str, - __sep, + return _vfscanf( + __stream, + __format, + arg2, ); } - late final _strtokPtr = _lookup< + late final _vfscanfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strtok'); - late final _strtok = _strtokPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer, va_list)>>('vfscanf'); + late final _vfscanf = _vfscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - int strxfrm( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + int vscanf( + ffi.Pointer __format, + va_list arg1, ) { - return _strxfrm( - __s1, - __s2, - __n, + return _vscanf( + __format, + arg1, ); } - late final _strxfrmPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strxfrm'); - late final _strxfrm = _strxfrmPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _vscanfPtr = _lookup< + ffi.NativeFunction, va_list)>>( + 'vscanf'); + late final _vscanf = + _vscanfPtr.asFunction, va_list)>(); - ffi.Pointer strtok_r( + int vsnprintf( ffi.Pointer __str, - ffi.Pointer __sep, - ffi.Pointer> __lasts, + int __size, + ffi.Pointer __format, + va_list arg3, ) { - return _strtok_r( + return _vsnprintf( __str, - __sep, - __lasts, + __size, + __format, + arg3, ); } - late final _strtok_rPtr = _lookup< + late final _vsnprintfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('strtok_r'); - late final _strtok_r = _strtok_rPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer, va_list)>>('vsnprintf'); + late final _vsnprintf = _vsnprintfPtr.asFunction< + int Function( + ffi.Pointer, int, ffi.Pointer, va_list)>(); - int strerror_r( - int __errnum, - ffi.Pointer __strerrbuf, - int __buflen, + int vsscanf( + ffi.Pointer __str, + ffi.Pointer __format, + va_list arg2, ) { - return _strerror_r( - __errnum, - __strerrbuf, - __buflen, + return _vsscanf( + __str, + __format, + arg2, ); } - late final _strerror_rPtr = _lookup< + late final _vsscanfPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('strerror_r'); - late final _strerror_r = _strerror_rPtr - .asFunction, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('vsscanf'); + late final _vsscanf = _vsscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - ffi.Pointer strdup( - ffi.Pointer __s1, + int dprintf( + int arg0, + ffi.Pointer arg1, ) { - return _strdup( - __s1, + return _dprintf( + arg0, + arg1, ); } - late final _strdupPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('strdup'); - late final _strdup = _strdupPtr - .asFunction Function(ffi.Pointer)>(); + late final _dprintfPtr = _lookup< + ffi.NativeFunction)>>( + 'dprintf'); + late final _dprintf = + _dprintfPtr.asFunction)>(); - ffi.Pointer memccpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __c, - int __n, + int vdprintf( + int arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _memccpy( - __dst, - __src, - __c, - __n, + return _vdprintf( + arg0, + arg1, + arg2, ); } - late final _memccpyPtr = _lookup< + late final _vdprintfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int, ffi.Size)>>('memccpy'); - late final _memccpy = _memccpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, int)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, va_list)>>('vdprintf'); + late final _vdprintf = _vdprintfPtr + .asFunction, va_list)>(); - ffi.Pointer stpcpy( - ffi.Pointer __dst, - ffi.Pointer __src, + int getdelim( + ffi.Pointer> __linep, + ffi.Pointer __linecapp, + int __delimiter, + ffi.Pointer __stream, ) { - return _stpcpy( - __dst, - __src, + return _getdelim( + __linep, + __linecapp, + __delimiter, + __stream, ); } - late final _stpcpyPtr = _lookup< + late final _getdelimPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('stpcpy'); - late final _stpcpy = _stpcpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ssize_t Function(ffi.Pointer>, + ffi.Pointer, ffi.Int, ffi.Pointer)>>('getdelim'); + late final _getdelim = _getdelimPtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + int, ffi.Pointer)>(); - ffi.Pointer stpncpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + int getline( + ffi.Pointer> __linep, + ffi.Pointer __linecapp, + ffi.Pointer __stream, ) { - return _stpncpy( - __dst, - __src, - __n, + return _getline( + __linep, + __linecapp, + __stream, ); } - late final _stpncpyPtr = _lookup< + late final _getlinePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('stpncpy'); - late final _stpncpy = _stpncpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ssize_t Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>('getline'); + late final _getline = _getlinePtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer strndup( - ffi.Pointer __s1, - int __n, + ffi.Pointer fmemopen( + ffi.Pointer __buf, + int __size, + ffi.Pointer __mode, ) { - return _strndup( - __s1, - __n, + return _fmemopen( + __buf, + __size, + __mode, ); } - late final _strndupPtr = _lookup< + late final _fmemopenPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('strndup'); - late final _strndup = _strndupPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Pointer)>>('fmemopen'); + late final _fmemopen = _fmemopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - int strnlen( - ffi.Pointer __s1, - int __n, + ffi.Pointer open_memstream( + ffi.Pointer> __bufp, + ffi.Pointer __sizep, ) { - return _strnlen( - __s1, - __n, + return _open_memstream( + __bufp, + __sizep, ); } - late final _strnlenPtr = _lookup< + late final _open_memstreamPtr = _lookup< ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Size)>>('strnlen'); - late final _strnlen = - _strnlenPtr.asFunction, int)>(); + ffi.Pointer Function(ffi.Pointer>, + ffi.Pointer)>>('open_memstream'); + late final _open_memstream = _open_memstreamPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer>, ffi.Pointer)>(); - ffi.Pointer strsignal( - int __sig, - ) { - return _strsignal( - __sig, - ); - } + late final ffi.Pointer _sys_nerr = _lookup('sys_nerr'); - late final _strsignalPtr = - _lookup Function(ffi.Int)>>( - 'strsignal'); - late final _strsignal = - _strsignalPtr.asFunction Function(int)>(); + int get sys_nerr => _sys_nerr.value; - int memset_s( - ffi.Pointer __s, - int __smax, - int __c, - int __n, - ) { - return _memset_s( - __s, - __smax, - __c, - __n, - ); - } + set sys_nerr(int value) => _sys_nerr.value = value; - late final _memset_sPtr = _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.Pointer, rsize_t, ffi.Int, rsize_t)>>('memset_s'); - late final _memset_s = _memset_sPtr - .asFunction, int, int, int)>(); + late final ffi.Pointer>> _sys_errlist = + _lookup>>('sys_errlist'); - ffi.Pointer memmem( - ffi.Pointer __big, - int __big_len, - ffi.Pointer __little, - int __little_len, - ) { - return _memmem( - __big, - __big_len, - __little, - __little_len, - ); - } + ffi.Pointer> get sys_errlist => _sys_errlist.value; - late final _memmemPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Size, - ffi.Pointer, ffi.Size)>>('memmem'); - late final _memmem = _memmemPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer, int)>(); + set sys_errlist(ffi.Pointer> value) => + _sys_errlist.value = value; - void memset_pattern4( - ffi.Pointer __b, - ffi.Pointer __pattern4, - int __len, + int asprintf( + ffi.Pointer> arg0, + ffi.Pointer arg1, ) { - return _memset_pattern4( - __b, - __pattern4, - __len, + return _asprintf( + arg0, + arg1, ); } - late final _memset_pattern4Ptr = _lookup< + late final _asprintfPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memset_pattern4'); - late final _memset_pattern4 = _memset_pattern4Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer>, + ffi.Pointer)>>('asprintf'); + late final _asprintf = _asprintfPtr.asFunction< + int Function( + ffi.Pointer>, ffi.Pointer)>(); - void memset_pattern8( - ffi.Pointer __b, - ffi.Pointer __pattern8, - int __len, + ffi.Pointer ctermid_r( + ffi.Pointer arg0, ) { - return _memset_pattern8( - __b, - __pattern8, - __len, + return _ctermid_r( + arg0, ); } - late final _memset_pattern8Ptr = _lookup< + late final _ctermid_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memset_pattern8'); - late final _memset_pattern8 = _memset_pattern8Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer)>>('ctermid_r'); + late final _ctermid_r = _ctermid_rPtr + .asFunction Function(ffi.Pointer)>(); - void memset_pattern16( - ffi.Pointer __b, - ffi.Pointer __pattern16, - int __len, + ffi.Pointer fgetln( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _memset_pattern16( - __b, - __pattern16, - __len, + return _fgetln( + arg0, + arg1, ); } - late final _memset_pattern16Ptr = _lookup< + late final _fgetlnPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memset_pattern16'); - late final _memset_pattern16 = _memset_pattern16Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fgetln'); + late final _fgetln = _fgetlnPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer strcasestr( - ffi.Pointer __big, - ffi.Pointer __little, + ffi.Pointer fmtcheck( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _strcasestr( - __big, - __little, + return _fmtcheck( + arg0, + arg1, ); } - late final _strcasestrPtr = _lookup< + late final _fmtcheckPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strcasestr'); - late final _strcasestr = _strcasestrPtr.asFunction< + ffi.Pointer, ffi.Pointer)>>('fmtcheck'); + late final _fmtcheck = _fmtcheckPtr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer strnstr( - ffi.Pointer __big, - ffi.Pointer __little, - int __len, + int fpurge( + ffi.Pointer arg0, ) { - return _strnstr( - __big, - __little, - __len, + return _fpurge( + arg0, ); } - late final _strnstrPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strnstr'); - late final _strnstr = _strnstrPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _fpurgePtr = + _lookup)>>( + 'fpurge'); + late final _fpurge = _fpurgePtr.asFunction)>(); - int strlcat( - ffi.Pointer __dst, - ffi.Pointer __source, - int __size, + void setbuffer( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _strlcat( - __dst, - __source, - __size, + return _setbuffer( + arg0, + arg1, + arg2, ); } - late final _strlcatPtr = _lookup< + late final _setbufferPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strlcat'); - late final _strlcat = _strlcatPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>('setbuffer'); + late final _setbuffer = _setbufferPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int strlcpy( - ffi.Pointer __dst, - ffi.Pointer __source, - int __size, + int setlinebuf( + ffi.Pointer arg0, ) { - return _strlcpy( - __dst, - __source, - __size, + return _setlinebuf( + arg0, ); } - late final _strlcpyPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strlcpy'); - late final _strlcpy = _strlcpyPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _setlinebufPtr = + _lookup)>>( + 'setlinebuf'); + late final _setlinebuf = + _setlinebufPtr.asFunction)>(); - void strmode( - int __mode, - ffi.Pointer __bp, + int vasprintf( + ffi.Pointer> arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return _strmode( - __mode, - __bp, + return _vasprintf( + arg0, + arg1, + arg2, ); } - late final _strmodePtr = _lookup< + late final _vasprintfPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int, ffi.Pointer)>>('strmode'); - late final _strmode = - _strmodePtr.asFunction)>(); + ffi.Int Function(ffi.Pointer>, + ffi.Pointer, va_list)>>('vasprintf'); + late final _vasprintf = _vasprintfPtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + va_list)>(); - ffi.Pointer strsep( - ffi.Pointer> __stringp, - ffi.Pointer __delim, + ffi.Pointer funopen( + ffi.Pointer arg0, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> + arg1, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> + arg2, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> + arg3, + ffi.Pointer)>> + arg4, ) { - return _strsep( - __stringp, - __delim, + return _funopen( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _strsepPtr = _lookup< + late final _funopenPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer>, - ffi.Pointer)>>('strsep'); - late final _strsep = _strsepPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer>, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer)>>)>>('funopen'); + late final _funopen = _funopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction)>>)>(); - void swab( - ffi.Pointer arg0, - ffi.Pointer arg1, + int __sprintf_chk( + ffi.Pointer arg0, + int arg1, int arg2, + ffi.Pointer arg3, ) { - return _swab( + return ___sprintf_chk( arg0, arg1, arg2, + arg3, ); } - late final _swabPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ssize_t)>>('swab'); - late final _swab = _swabPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - int timingsafe_bcmp( - ffi.Pointer __b1, - ffi.Pointer __b2, - int __len, - ) { - return _timingsafe_bcmp( - __b1, - __b2, - __len, - ); - } - - late final _timingsafe_bcmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('timingsafe_bcmp'); - late final _timingsafe_bcmp = _timingsafe_bcmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - int strsignal_r( - int __sig, - ffi.Pointer __strsignalbuf, - int __buflen, - ) { - return _strsignal_r( - __sig, - __strsignalbuf, - __buflen, - ); - } - - late final _strsignal_rPtr = _lookup< + late final ___sprintf_chkPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('strsignal_r'); - late final _strsignal_r = _strsignal_rPtr - .asFunction, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, + ffi.Pointer)>>('__sprintf_chk'); + late final ___sprintf_chk = ___sprintf_chkPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); - int bcmp( - ffi.Pointer arg0, - ffi.Pointer arg1, + int __snprintf_chk( + ffi.Pointer arg0, + int arg1, int arg2, + int arg3, + ffi.Pointer arg4, ) { - return _bcmp( + return ___snprintf_chk( arg0, arg1, arg2, + arg3, + arg4, ); } - late final _bcmpPtr = _lookup< + late final ___snprintf_chkPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Size)>>('bcmp'); - late final _bcmp = _bcmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, + ffi.Pointer)>>('__snprintf_chk'); + late final ___snprintf_chk = ___snprintf_chkPtr.asFunction< + int Function( + ffi.Pointer, int, int, int, ffi.Pointer)>(); - void bcopy( - ffi.Pointer arg0, - ffi.Pointer arg1, + int __vsprintf_chk( + ffi.Pointer arg0, + int arg1, int arg2, + ffi.Pointer arg3, + va_list arg4, ) { - return _bcopy( + return ___vsprintf_chk( arg0, arg1, arg2, + arg3, + arg4, ); } - late final _bcopyPtr = _lookup< + late final ___vsprintf_chkPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('bcopy'); - late final _bcopy = _bcopyPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, + ffi.Pointer, va_list)>>('__vsprintf_chk'); + late final ___vsprintf_chk = ___vsprintf_chkPtr.asFunction< + int Function( + ffi.Pointer, int, int, ffi.Pointer, va_list)>(); - void bzero( - ffi.Pointer arg0, + int __vsnprintf_chk( + ffi.Pointer arg0, int arg1, + int arg2, + int arg3, + ffi.Pointer arg4, + va_list arg5, ) { - return _bzero( + return ___vsnprintf_chk( arg0, arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _bzeroPtr = _lookup< + late final ___vsnprintf_chkPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size)>>('bzero'); - late final _bzero = - _bzeroPtr.asFunction, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, + ffi.Pointer, va_list)>>('__vsnprintf_chk'); + late final ___vsnprintf_chk = ___vsnprintf_chkPtr.asFunction< + int Function(ffi.Pointer, int, int, int, ffi.Pointer, + va_list)>(); - ffi.Pointer index( - ffi.Pointer arg0, - int arg1, + ffi.Pointer memchr( + ffi.Pointer __s, + int __c, + int __n, ) { - return _index( - arg0, - arg1, + return _memchr( + __s, + __c, + __n, ); } - late final _indexPtr = _lookup< + late final _memchrPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('index'); - late final _index = _indexPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Size)>>('memchr'); + late final _memchr = _memchrPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - ffi.Pointer rindex( - ffi.Pointer arg0, - int arg1, + int memcmp( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return _rindex( - arg0, - arg1, + return _memcmp( + __s1, + __s2, + __n, ); } - late final _rindexPtr = _lookup< + late final _memcmpPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('rindex'); - late final _rindex = _rindexPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memcmp'); + late final _memcmp = _memcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int ffs( - int arg0, + ffi.Pointer memcpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, ) { - return _ffs( - arg0, + return _memcpy( + __dst, + __src, + __n, ); } - late final _ffsPtr = - _lookup>('ffs'); - late final _ffs = _ffsPtr.asFunction(); + late final _memcpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('memcpy'); + late final _memcpy = _memcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int strcasecmp( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer memmove( + ffi.Pointer __dst, + ffi.Pointer __src, + int __len, ) { - return _strcasecmp( - arg0, - arg1, + return _memmove( + __dst, + __src, + __len, ); } - late final _strcasecmpPtr = _lookup< + late final _memmovePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('strcasecmp'); - late final _strcasecmp = _strcasecmpPtr - .asFunction, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('memmove'); + late final _memmove = _memmovePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int strncasecmp( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + ffi.Pointer memset( + ffi.Pointer __b, + int __c, + int __len, ) { - return _strncasecmp( - arg0, - arg1, - arg2, + return _memset( + __b, + __c, + __len, ); } - late final _strncasecmpPtr = _lookup< + late final _memsetPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('strncasecmp'); - late final _strncasecmp = _strncasecmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Size)>>('memset'); + late final _memset = _memsetPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - int ffsl( - int arg0, + ffi.Pointer strcat( + ffi.Pointer __s1, + ffi.Pointer __s2, ) { - return _ffsl( - arg0, + return _strcat( + __s1, + __s2, ); } - late final _ffslPtr = - _lookup>('ffsl'); - late final _ffsl = _ffslPtr.asFunction(); + late final _strcatPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strcat'); + late final _strcat = _strcatPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int ffsll( - int arg0, + ffi.Pointer strchr( + ffi.Pointer __s, + int __c, ) { - return _ffsll( - arg0, + return _strchr( + __s, + __c, ); } - late final _ffsllPtr = - _lookup>('ffsll'); - late final _ffsll = _ffsllPtr.asFunction(); + late final _strchrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('strchr'); + late final _strchr = _strchrPtr + .asFunction Function(ffi.Pointer, int)>(); - int fls( - int arg0, + int strcmp( + ffi.Pointer __s1, + ffi.Pointer __s2, ) { - return _fls( - arg0, + return _strcmp( + __s1, + __s2, ); } - late final _flsPtr = - _lookup>('fls'); - late final _fls = _flsPtr.asFunction(); + late final _strcmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcmp'); + late final _strcmp = _strcmpPtr + .asFunction, ffi.Pointer)>(); - int flsl( - int arg0, + int strcoll( + ffi.Pointer __s1, + ffi.Pointer __s2, ) { - return _flsl( - arg0, + return _strcoll( + __s1, + __s2, ); } - late final _flslPtr = - _lookup>('flsl'); - late final _flsl = _flslPtr.asFunction(); + late final _strcollPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcoll'); + late final _strcoll = _strcollPtr + .asFunction, ffi.Pointer)>(); - int flsll( - int arg0, + ffi.Pointer strcpy( + ffi.Pointer __dst, + ffi.Pointer __src, ) { - return _flsll( - arg0, + return _strcpy( + __dst, + __src, ); } - late final _flsllPtr = - _lookup>('flsll'); - late final _flsll = _flsllPtr.asFunction(); - - late final ffi.Pointer>> _tzname = - _lookup>>('tzname'); - - ffi.Pointer> get tzname => _tzname.value; - - set tzname(ffi.Pointer> value) => _tzname.value = value; - - late final ffi.Pointer _getdate_err = - _lookup('getdate_err'); - - int get getdate_err => _getdate_err.value; - - set getdate_err(int value) => _getdate_err.value = value; - - late final ffi.Pointer _timezone = _lookup('timezone'); - - int get timezone => _timezone.value; - - set timezone(int value) => _timezone.value = value; - - late final ffi.Pointer _daylight = _lookup('daylight'); - - int get daylight => _daylight.value; - - set daylight(int value) => _daylight.value = value; + late final _strcpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strcpy'); + late final _strcpy = _strcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer asctime( - ffi.Pointer arg0, + int strcspn( + ffi.Pointer __s, + ffi.Pointer __charset, ) { - return _asctime( - arg0, + return _strcspn( + __s, + __charset, ); } - late final _asctimePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'asctime'); - late final _asctime = - _asctimePtr.asFunction Function(ffi.Pointer)>(); - - int clock() { - return _clock(); - } - - late final _clockPtr = - _lookup>('clock'); - late final _clock = _clockPtr.asFunction(); + late final _strcspnPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>>('strcspn'); + late final _strcspn = _strcspnPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer ctime( - ffi.Pointer arg0, + ffi.Pointer strerror( + int __errnum, ) { - return _ctime( - arg0, + return _strerror( + __errnum, ); } - late final _ctimePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctime'); - late final _ctime = _ctimePtr - .asFunction Function(ffi.Pointer)>(); + late final _strerrorPtr = + _lookup Function(ffi.Int)>>( + 'strerror'); + late final _strerror = + _strerrorPtr.asFunction Function(int)>(); - double difftime( - int arg0, - int arg1, + int strlen( + ffi.Pointer __s, ) { - return _difftime( - arg0, - arg1, + return _strlen( + __s, ); } - late final _difftimePtr = - _lookup>( - 'difftime'); - late final _difftime = _difftimePtr.asFunction(); + late final _strlenPtr = _lookup< + ffi.NativeFunction)>>( + 'strlen'); + late final _strlen = + _strlenPtr.asFunction)>(); - ffi.Pointer getdate( - ffi.Pointer arg0, + ffi.Pointer strncat( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return _getdate( - arg0, + return _strncat( + __s1, + __s2, + __n, ); } - late final _getdatePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'getdate'); - late final _getdate = - _getdatePtr.asFunction Function(ffi.Pointer)>(); + late final _strncatPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strncat'); + late final _strncat = _strncatPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer gmtime( - ffi.Pointer arg0, + int strncmp( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return _gmtime( - arg0, + return _strncmp( + __s1, + __s2, + __n, ); } - late final _gmtimePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'gmtime'); - late final _gmtime = - _gmtimePtr.asFunction Function(ffi.Pointer)>(); - - ffi.Pointer localtime( - ffi.Pointer arg0, - ) { - return _localtime( - arg0, - ); - } - - late final _localtimePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'localtime'); - late final _localtime = - _localtimePtr.asFunction Function(ffi.Pointer)>(); + late final _strncmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('strncmp'); + late final _strncmp = _strncmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int mktime( - ffi.Pointer arg0, + ffi.Pointer strncpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, ) { - return _mktime( - arg0, + return _strncpy( + __dst, + __src, + __n, ); } - late final _mktimePtr = - _lookup)>>('mktime'); - late final _mktime = _mktimePtr.asFunction)>(); + late final _strncpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strncpy'); + late final _strncpy = _strncpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int strftime( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + ffi.Pointer strpbrk( + ffi.Pointer __s, + ffi.Pointer __charset, ) { - return _strftime( - arg0, - arg1, - arg2, - arg3, + return _strpbrk( + __s, + __charset, ); } - late final _strftimePtr = _lookup< + late final _strpbrkPtr = _lookup< ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Size, - ffi.Pointer, ffi.Pointer)>>('strftime'); - late final _strftime = _strftimePtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strpbrk'); + late final _strpbrk = _strpbrkPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer strptime( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + ffi.Pointer strrchr( + ffi.Pointer __s, + int __c, ) { - return _strptime( - arg0, - arg1, - arg2, + return _strrchr( + __s, + __c, ); } - late final _strptimePtr = _lookup< + late final _strrchrPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('strptime'); - late final _strptime = _strptimePtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('strrchr'); + late final _strrchr = _strrchrPtr + .asFunction Function(ffi.Pointer, int)>(); - int time( - ffi.Pointer arg0, + int strspn( + ffi.Pointer __s, + ffi.Pointer __charset, ) { - return _time( - arg0, + return _strspn( + __s, + __charset, ); } - late final _timePtr = - _lookup)>>('time'); - late final _time = _timePtr.asFunction)>(); - - void tzset() { - return _tzset(); - } - - late final _tzsetPtr = - _lookup>('tzset'); - late final _tzset = _tzsetPtr.asFunction(); + late final _strspnPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>>('strspn'); + late final _strspn = _strspnPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer asctime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer strstr( + ffi.Pointer __big, + ffi.Pointer __little, ) { - return _asctime_r( - arg0, - arg1, + return _strstr( + __big, + __little, ); } - late final _asctime_rPtr = _lookup< + late final _strstrPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('asctime_r'); - late final _asctime_r = _asctime_rPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>>('strstr'); + late final _strstr = _strstrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer ctime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer strtok( + ffi.Pointer __str, + ffi.Pointer __sep, ) { - return _ctime_r( - arg0, - arg1, + return _strtok( + __str, + __sep, ); } - late final _ctime_rPtr = _lookup< + late final _strtokPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('ctime_r'); - late final _ctime_r = _ctime_rPtr.asFunction< + ffi.Pointer, ffi.Pointer)>>('strtok'); + late final _strtok = _strtokPtr.asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer gmtime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, + int strxfrm( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return _gmtime_r( - arg0, - arg1, + return _strxfrm( + __s1, + __s2, + __n, ); } - late final _gmtime_rPtr = _lookup< + late final _strxfrmPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('gmtime_r'); - late final _gmtime_r = _gmtime_rPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strxfrm'); + late final _strxfrm = _strxfrmPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer localtime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer strtok_r( + ffi.Pointer __str, + ffi.Pointer __sep, + ffi.Pointer> __lasts, ) { - return _localtime_r( - arg0, - arg1, + return _strtok_r( + __str, + __sep, + __lasts, ); } - late final _localtime_rPtr = _lookup< + late final _strtok_rPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('localtime_r'); - late final _localtime_r = _localtime_rPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('strtok_r'); + late final _strtok_r = _strtok_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - int posix2time( - int arg0, + int strerror_r( + int __errnum, + ffi.Pointer __strerrbuf, + int __buflen, ) { - return _posix2time( - arg0, + return _strerror_r( + __errnum, + __strerrbuf, + __buflen, ); } - late final _posix2timePtr = - _lookup>('posix2time'); - late final _posix2time = _posix2timePtr.asFunction(); - - void tzsetwall() { - return _tzsetwall(); - } - - late final _tzsetwallPtr = - _lookup>('tzsetwall'); - late final _tzsetwall = _tzsetwallPtr.asFunction(); + late final _strerror_rPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('strerror_r'); + late final _strerror_r = _strerror_rPtr + .asFunction, int)>(); - int time2posix( - int arg0, + ffi.Pointer strdup( + ffi.Pointer __s1, ) { - return _time2posix( - arg0, + return _strdup( + __s1, ); } - late final _time2posixPtr = - _lookup>('time2posix'); - late final _time2posix = _time2posixPtr.asFunction(); + late final _strdupPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('strdup'); + late final _strdup = _strdupPtr + .asFunction Function(ffi.Pointer)>(); - int timelocal( - ffi.Pointer arg0, + ffi.Pointer memccpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __c, + int __n, ) { - return _timelocal( - arg0, + return _memccpy( + __dst, + __src, + __c, + __n, ); } - late final _timelocalPtr = - _lookup)>>( - 'timelocal'); - late final _timelocal = - _timelocalPtr.asFunction)>(); + late final _memccpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int, ffi.Size)>>('memccpy'); + late final _memccpy = _memccpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, int)>(); - int timegm( - ffi.Pointer arg0, + ffi.Pointer stpcpy( + ffi.Pointer __dst, + ffi.Pointer __src, ) { - return _timegm( - arg0, + return _stpcpy( + __dst, + __src, ); } - late final _timegmPtr = - _lookup)>>('timegm'); - late final _timegm = _timegmPtr.asFunction)>(); + late final _stpcpyPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('stpcpy'); + late final _stpcpy = _stpcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int nanosleep( - ffi.Pointer __rqtp, - ffi.Pointer __rmtp, + ffi.Pointer stpncpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, ) { - return _nanosleep( - __rqtp, - __rmtp, + return _stpncpy( + __dst, + __src, + __n, ); } - late final _nanosleepPtr = _lookup< + late final _stpncpyPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('nanosleep'); - late final _nanosleep = _nanosleepPtr - .asFunction, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('stpncpy'); + late final _stpncpy = _stpncpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int clock_getres( - int __clock_id, - ffi.Pointer __res, + ffi.Pointer strndup( + ffi.Pointer __s1, + int __n, ) { - return _clock_getres( - __clock_id, - __res, + return _strndup( + __s1, + __n, ); } - late final _clock_getresPtr = _lookup< + late final _strndupPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_getres'); - late final _clock_getres = - _clock_getresPtr.asFunction)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('strndup'); + late final _strndup = _strndupPtr + .asFunction Function(ffi.Pointer, int)>(); - int clock_gettime( - int __clock_id, - ffi.Pointer __tp, + int strnlen( + ffi.Pointer __s1, + int __n, ) { - return _clock_gettime( - __clock_id, - __tp, + return _strnlen( + __s1, + __n, ); } - late final _clock_gettimePtr = _lookup< + late final _strnlenPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_gettime'); - late final _clock_gettime = - _clock_gettimePtr.asFunction)>(); + ffi.Size Function(ffi.Pointer, ffi.Size)>>('strnlen'); + late final _strnlen = + _strnlenPtr.asFunction, int)>(); - int clock_gettime_nsec_np( - int __clock_id, + ffi.Pointer strsignal( + int __sig, ) { - return _clock_gettime_nsec_np( - __clock_id, + return _strsignal( + __sig, ); } - late final _clock_gettime_nsec_npPtr = - _lookup>( - 'clock_gettime_nsec_np'); - late final _clock_gettime_nsec_np = - _clock_gettime_nsec_npPtr.asFunction(); + late final _strsignalPtr = + _lookup Function(ffi.Int)>>( + 'strsignal'); + late final _strsignal = + _strsignalPtr.asFunction Function(int)>(); - int clock_settime( - int __clock_id, - ffi.Pointer __tp, + int memset_s( + ffi.Pointer __s, + int __smax, + int __c, + int __n, ) { - return _clock_settime( - __clock_id, - __tp, + return _memset_s( + __s, + __smax, + __c, + __n, ); } - late final _clock_settimePtr = _lookup< + late final _memset_sPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_settime'); - late final _clock_settime = - _clock_settimePtr.asFunction)>(); + errno_t Function( + ffi.Pointer, rsize_t, ffi.Int, rsize_t)>>('memset_s'); + late final _memset_s = _memset_sPtr + .asFunction, int, int, int)>(); - int timespec_get( - ffi.Pointer ts, - int base, + ffi.Pointer memmem( + ffi.Pointer __big, + int __big_len, + ffi.Pointer __little, + int __little_len, ) { - return _timespec_get( - ts, - base, + return _memmem( + __big, + __big_len, + __little, + __little_len, ); } - late final _timespec_getPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'timespec_get'); - late final _timespec_get = - _timespec_getPtr.asFunction, int)>(); + late final _memmemPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Pointer, ffi.Size)>>('memmem'); + late final _memmem = _memmemPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer, int)>(); - int imaxabs( - int j, + void memset_pattern4( + ffi.Pointer __b, + ffi.Pointer __pattern4, + int __len, ) { - return _imaxabs( - j, + return _memset_pattern4( + __b, + __pattern4, + __len, ); } - late final _imaxabsPtr = - _lookup>('imaxabs'); - late final _imaxabs = _imaxabsPtr.asFunction(); + late final _memset_pattern4Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memset_pattern4'); + late final _memset_pattern4 = _memset_pattern4Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - imaxdiv_t imaxdiv( - int __numer, - int __denom, + void memset_pattern8( + ffi.Pointer __b, + ffi.Pointer __pattern8, + int __len, ) { - return _imaxdiv( - __numer, - __denom, + return _memset_pattern8( + __b, + __pattern8, + __len, ); } - late final _imaxdivPtr = - _lookup>( - 'imaxdiv'); - late final _imaxdiv = _imaxdivPtr.asFunction(); + late final _memset_pattern8Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memset_pattern8'); + late final _memset_pattern8 = _memset_pattern8Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int strtoimax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + void memset_pattern16( + ffi.Pointer __b, + ffi.Pointer __pattern16, + int __len, ) { - return _strtoimax( - __nptr, - __endptr, - __base, + return _memset_pattern16( + __b, + __pattern16, + __len, ); } - late final _strtoimaxPtr = _lookup< + late final _memset_pattern16Ptr = _lookup< ffi.NativeFunction< - intmax_t Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoimax'); - late final _strtoimax = _strtoimaxPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memset_pattern16'); + late final _memset_pattern16 = _memset_pattern16Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int strtoumax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + ffi.Pointer strcasestr( + ffi.Pointer __big, + ffi.Pointer __little, ) { - return _strtoumax( - __nptr, - __endptr, - __base, + return _strcasestr( + __big, + __little, ); } - late final _strtoumaxPtr = _lookup< + late final _strcasestrPtr = _lookup< ffi.NativeFunction< - uintmax_t Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoumax'); - late final _strtoumax = _strtoumaxPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strcasestr'); + late final _strcasestr = _strcasestrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int wcstoimax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + ffi.Pointer strnstr( + ffi.Pointer __big, + ffi.Pointer __little, + int __len, ) { - return _wcstoimax( - __nptr, - __endptr, - __base, + return _strnstr( + __big, + __little, + __len, ); } - late final _wcstoimaxPtr = _lookup< + late final _strnstrPtr = _lookup< ffi.NativeFunction< - intmax_t Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('wcstoimax'); - late final _wcstoimax = _wcstoimaxPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strnstr'); + late final _strnstr = _strnstrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - int wcstoumax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + int strlcat( + ffi.Pointer __dst, + ffi.Pointer __source, + int __size, ) { - return _wcstoumax( - __nptr, - __endptr, - __base, + return _strlcat( + __dst, + __source, + __size, ); } - late final _wcstoumaxPtr = _lookup< + late final _strlcatPtr = _lookup< ffi.NativeFunction< - uintmax_t Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('wcstoumax'); - late final _wcstoumax = _wcstoumaxPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); - - late final ffi.Pointer _kCFTypeBagCallBacks = - _lookup('kCFTypeBagCallBacks'); - - CFBagCallBacks get kCFTypeBagCallBacks => _kCFTypeBagCallBacks.ref; - - late final ffi.Pointer _kCFCopyStringBagCallBacks = - _lookup('kCFCopyStringBagCallBacks'); - - CFBagCallBacks get kCFCopyStringBagCallBacks => - _kCFCopyStringBagCallBacks.ref; - - int CFBagGetTypeID() { - return _CFBagGetTypeID(); - } - - late final _CFBagGetTypeIDPtr = - _lookup>('CFBagGetTypeID'); - late final _CFBagGetTypeID = _CFBagGetTypeIDPtr.asFunction(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strlcat'); + late final _strlcat = _strlcatPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - CFBagRef CFBagCreate( - CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + int strlcpy( + ffi.Pointer __dst, + ffi.Pointer __source, + int __size, ) { - return _CFBagCreate( - allocator, - values, - numValues, - callBacks, + return _strlcpy( + __dst, + __source, + __size, ); } - late final _CFBagCreatePtr = _lookup< + late final _strlcpyPtr = _lookup< ffi.NativeFunction< - CFBagRef Function(CFAllocatorRef, ffi.Pointer>, - CFIndex, ffi.Pointer)>>('CFBagCreate'); - late final _CFBagCreate = _CFBagCreatePtr.asFunction< - CFBagRef Function(CFAllocatorRef, ffi.Pointer>, int, - ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strlcpy'); + late final _strlcpy = _strlcpyPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - CFBagRef CFBagCreateCopy( - CFAllocatorRef allocator, - CFBagRef theBag, + void strmode( + int __mode, + ffi.Pointer __bp, ) { - return _CFBagCreateCopy( - allocator, - theBag, + return _strmode( + __mode, + __bp, ); } - late final _CFBagCreateCopyPtr = - _lookup>( - 'CFBagCreateCopy'); - late final _CFBagCreateCopy = _CFBagCreateCopyPtr.asFunction< - CFBagRef Function(CFAllocatorRef, CFBagRef)>(); + late final _strmodePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int, ffi.Pointer)>>('strmode'); + late final _strmode = + _strmodePtr.asFunction)>(); - CFMutableBagRef CFBagCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + ffi.Pointer strsep( + ffi.Pointer> __stringp, + ffi.Pointer __delim, ) { - return _CFBagCreateMutable( - allocator, - capacity, - callBacks, + return _strsep( + __stringp, + __delim, ); } - late final _CFBagCreateMutablePtr = _lookup< + late final _strsepPtr = _lookup< ffi.NativeFunction< - CFMutableBagRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFBagCreateMutable'); - late final _CFBagCreateMutable = _CFBagCreateMutablePtr.asFunction< - CFMutableBagRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer>, + ffi.Pointer)>>('strsep'); + late final _strsep = _strsepPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer>, ffi.Pointer)>(); - CFMutableBagRef CFBagCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFBagRef theBag, + void swab( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFBagCreateMutableCopy( - allocator, - capacity, - theBag, + return _swab( + arg0, + arg1, + arg2, ); } - late final _CFBagCreateMutableCopyPtr = _lookup< + late final _swabPtr = _lookup< ffi.NativeFunction< - CFMutableBagRef Function( - CFAllocatorRef, CFIndex, CFBagRef)>>('CFBagCreateMutableCopy'); - late final _CFBagCreateMutableCopy = _CFBagCreateMutableCopyPtr.asFunction< - CFMutableBagRef Function(CFAllocatorRef, int, CFBagRef)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ssize_t)>>('swab'); + late final _swab = _swabPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int CFBagGetCount( - CFBagRef theBag, + int timingsafe_bcmp( + ffi.Pointer __b1, + ffi.Pointer __b2, + int __len, ) { - return _CFBagGetCount( - theBag, + return _timingsafe_bcmp( + __b1, + __b2, + __len, ); } - late final _CFBagGetCountPtr = - _lookup>('CFBagGetCount'); - late final _CFBagGetCount = - _CFBagGetCountPtr.asFunction(); + late final _timingsafe_bcmpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('timingsafe_bcmp'); + late final _timingsafe_bcmp = _timingsafe_bcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int CFBagGetCountOfValue( - CFBagRef theBag, - ffi.Pointer value, + int strsignal_r( + int __sig, + ffi.Pointer __strsignalbuf, + int __buflen, ) { - return _CFBagGetCountOfValue( - theBag, - value, + return _strsignal_r( + __sig, + __strsignalbuf, + __buflen, ); } - late final _CFBagGetCountOfValuePtr = _lookup< + late final _strsignal_rPtr = _lookup< ffi.NativeFunction< - CFIndex Function( - CFBagRef, ffi.Pointer)>>('CFBagGetCountOfValue'); - late final _CFBagGetCountOfValue = _CFBagGetCountOfValuePtr.asFunction< - int Function(CFBagRef, ffi.Pointer)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('strsignal_r'); + late final _strsignal_r = _strsignal_rPtr + .asFunction, int)>(); - int CFBagContainsValue( - CFBagRef theBag, - ffi.Pointer value, + int bcmp( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFBagContainsValue( - theBag, - value, + return _bcmp( + arg0, + arg1, + arg2, ); } - late final _CFBagContainsValuePtr = _lookup< + late final _bcmpPtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFBagRef, ffi.Pointer)>>('CFBagContainsValue'); - late final _CFBagContainsValue = _CFBagContainsValuePtr.asFunction< - int Function(CFBagRef, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Size)>>('bcmp'); + late final _bcmp = _bcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer CFBagGetValue( - CFBagRef theBag, - ffi.Pointer value, + void bcopy( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFBagGetValue( - theBag, - value, + return _bcopy( + arg0, + arg1, + arg2, ); } - late final _CFBagGetValuePtr = _lookup< + late final _bcopyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFBagRef, ffi.Pointer)>>('CFBagGetValue'); - late final _CFBagGetValue = _CFBagGetValuePtr.asFunction< - ffi.Pointer Function(CFBagRef, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('bcopy'); + late final _bcopy = _bcopyPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int CFBagGetValueIfPresent( - CFBagRef theBag, - ffi.Pointer candidate, - ffi.Pointer> value, + void bzero( + ffi.Pointer arg0, + int arg1, ) { - return _CFBagGetValueIfPresent( - theBag, - candidate, - value, + return _bzero( + arg0, + arg1, ); } - late final _CFBagGetValueIfPresentPtr = _lookup< + late final _bzeroPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFBagRef, ffi.Pointer, - ffi.Pointer>)>>('CFBagGetValueIfPresent'); - late final _CFBagGetValueIfPresent = _CFBagGetValueIfPresentPtr.asFunction< - int Function(CFBagRef, ffi.Pointer, - ffi.Pointer>)>(); + ffi.Void Function(ffi.Pointer, ffi.Size)>>('bzero'); + late final _bzero = + _bzeroPtr.asFunction, int)>(); - void CFBagGetValues( - CFBagRef theBag, - ffi.Pointer> values, + ffi.Pointer index( + ffi.Pointer arg0, + int arg1, ) { - return _CFBagGetValues( - theBag, - values, + return _index( + arg0, + arg1, ); } - late final _CFBagGetValuesPtr = _lookup< + late final _indexPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFBagRef, ffi.Pointer>)>>('CFBagGetValues'); - late final _CFBagGetValues = _CFBagGetValuesPtr.asFunction< - void Function(CFBagRef, ffi.Pointer>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('index'); + late final _index = _indexPtr + .asFunction Function(ffi.Pointer, int)>(); - void CFBagApplyFunction( - CFBagRef theBag, - CFBagApplierFunction applier, - ffi.Pointer context, + ffi.Pointer rindex( + ffi.Pointer arg0, + int arg1, ) { - return _CFBagApplyFunction( - theBag, - applier, - context, + return _rindex( + arg0, + arg1, ); } - late final _CFBagApplyFunctionPtr = _lookup< + late final _rindexPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFBagRef, CFBagApplierFunction, - ffi.Pointer)>>('CFBagApplyFunction'); - late final _CFBagApplyFunction = _CFBagApplyFunctionPtr.asFunction< - void Function(CFBagRef, CFBagApplierFunction, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('rindex'); + late final _rindex = _rindexPtr + .asFunction Function(ffi.Pointer, int)>(); - void CFBagAddValue( - CFMutableBagRef theBag, - ffi.Pointer value, + int ffs( + int arg0, ) { - return _CFBagAddValue( - theBag, - value, + return _ffs( + arg0, ); } - late final _CFBagAddValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagAddValue'); - late final _CFBagAddValue = _CFBagAddValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + late final _ffsPtr = + _lookup>('ffs'); + late final _ffs = _ffsPtr.asFunction(); - void CFBagReplaceValue( - CFMutableBagRef theBag, - ffi.Pointer value, + int strcasecmp( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBagReplaceValue( - theBag, - value, + return _strcasecmp( + arg0, + arg1, ); } - late final _CFBagReplaceValuePtr = _lookup< + late final _strcasecmpPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagReplaceValue'); - late final _CFBagReplaceValue = _CFBagReplaceValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcasecmp'); + late final _strcasecmp = _strcasecmpPtr + .asFunction, ffi.Pointer)>(); - void CFBagSetValue( - CFMutableBagRef theBag, - ffi.Pointer value, + int strncasecmp( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFBagSetValue( - theBag, - value, + return _strncasecmp( + arg0, + arg1, + arg2, ); } - late final _CFBagSetValuePtr = _lookup< + late final _strncasecmpPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagSetValue'); - late final _CFBagSetValue = _CFBagSetValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('strncasecmp'); + late final _strncasecmp = _strncasecmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - void CFBagRemoveValue( - CFMutableBagRef theBag, - ffi.Pointer value, + int ffsl( + int arg0, ) { - return _CFBagRemoveValue( - theBag, - value, + return _ffsl( + arg0, ); } - late final _CFBagRemoveValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagRemoveValue'); - late final _CFBagRemoveValue = _CFBagRemoveValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + late final _ffslPtr = + _lookup>('ffsl'); + late final _ffsl = _ffslPtr.asFunction(); - void CFBagRemoveAllValues( - CFMutableBagRef theBag, + int ffsll( + int arg0, ) { - return _CFBagRemoveAllValues( - theBag, + return _ffsll( + arg0, ); } - late final _CFBagRemoveAllValuesPtr = - _lookup>( - 'CFBagRemoveAllValues'); - late final _CFBagRemoveAllValues = - _CFBagRemoveAllValuesPtr.asFunction(); - - late final ffi.Pointer _kCFStringBinaryHeapCallBacks = - _lookup('kCFStringBinaryHeapCallBacks'); - - CFBinaryHeapCallBacks get kCFStringBinaryHeapCallBacks => - _kCFStringBinaryHeapCallBacks.ref; + late final _ffsllPtr = + _lookup>('ffsll'); + late final _ffsll = _ffsllPtr.asFunction(); - int CFBinaryHeapGetTypeID() { - return _CFBinaryHeapGetTypeID(); + int fls( + int arg0, + ) { + return _fls( + arg0, + ); } - late final _CFBinaryHeapGetTypeIDPtr = - _lookup>('CFBinaryHeapGetTypeID'); - late final _CFBinaryHeapGetTypeID = - _CFBinaryHeapGetTypeIDPtr.asFunction(); + late final _flsPtr = + _lookup>('fls'); + late final _fls = _flsPtr.asFunction(); - CFBinaryHeapRef CFBinaryHeapCreate( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, - ffi.Pointer compareContext, + int flsl( + int arg0, ) { - return _CFBinaryHeapCreate( - allocator, - capacity, - callBacks, - compareContext, + return _flsl( + arg0, ); } - late final _CFBinaryHeapCreatePtr = _lookup< - ffi.NativeFunction< - CFBinaryHeapRef Function( - CFAllocatorRef, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>('CFBinaryHeapCreate'); - late final _CFBinaryHeapCreate = _CFBinaryHeapCreatePtr.asFunction< - CFBinaryHeapRef Function( - CFAllocatorRef, - int, - ffi.Pointer, - ffi.Pointer)>(); + late final _flslPtr = + _lookup>('flsl'); + late final _flsl = _flslPtr.asFunction(); - CFBinaryHeapRef CFBinaryHeapCreateCopy( - CFAllocatorRef allocator, - int capacity, - CFBinaryHeapRef heap, + int flsll( + int arg0, ) { - return _CFBinaryHeapCreateCopy( - allocator, - capacity, - heap, + return _flsll( + arg0, ); } - late final _CFBinaryHeapCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFBinaryHeapRef Function(CFAllocatorRef, CFIndex, - CFBinaryHeapRef)>>('CFBinaryHeapCreateCopy'); - late final _CFBinaryHeapCreateCopy = _CFBinaryHeapCreateCopyPtr.asFunction< - CFBinaryHeapRef Function(CFAllocatorRef, int, CFBinaryHeapRef)>(); + late final _flsllPtr = + _lookup>('flsll'); + late final _flsll = _flsllPtr.asFunction(); - int CFBinaryHeapGetCount( - CFBinaryHeapRef heap, + late final ffi.Pointer>> _tzname = + _lookup>>('tzname'); + + ffi.Pointer> get tzname => _tzname.value; + + set tzname(ffi.Pointer> value) => _tzname.value = value; + + late final ffi.Pointer _getdate_err = + _lookup('getdate_err'); + + int get getdate_err => _getdate_err.value; + + set getdate_err(int value) => _getdate_err.value = value; + + late final ffi.Pointer _timezone = _lookup('timezone'); + + int get timezone => _timezone.value; + + set timezone(int value) => _timezone.value = value; + + late final ffi.Pointer _daylight = _lookup('daylight'); + + int get daylight => _daylight.value; + + set daylight(int value) => _daylight.value = value; + + ffi.Pointer asctime( + ffi.Pointer arg0, ) { - return _CFBinaryHeapGetCount( - heap, + return _asctime( + arg0, ); } - late final _CFBinaryHeapGetCountPtr = - _lookup>( - 'CFBinaryHeapGetCount'); - late final _CFBinaryHeapGetCount = - _CFBinaryHeapGetCountPtr.asFunction(); + late final _asctimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'asctime'); + late final _asctime = + _asctimePtr.asFunction Function(ffi.Pointer)>(); - int CFBinaryHeapGetCountOfValue( - CFBinaryHeapRef heap, - ffi.Pointer value, + int clock() { + return _clock(); + } + + late final _clockPtr = + _lookup>('clock'); + late final _clock = _clockPtr.asFunction(); + + ffi.Pointer ctime( + ffi.Pointer arg0, ) { - return _CFBinaryHeapGetCountOfValue( - heap, - value, + return _ctime( + arg0, ); } - late final _CFBinaryHeapGetCountOfValuePtr = _lookup< + late final _ctimePtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFBinaryHeapRef, - ffi.Pointer)>>('CFBinaryHeapGetCountOfValue'); - late final _CFBinaryHeapGetCountOfValue = _CFBinaryHeapGetCountOfValuePtr - .asFunction)>(); + ffi.Pointer Function(ffi.Pointer)>>('ctime'); + late final _ctime = _ctimePtr + .asFunction Function(ffi.Pointer)>(); - int CFBinaryHeapContainsValue( - CFBinaryHeapRef heap, - ffi.Pointer value, + double difftime( + int arg0, + int arg1, ) { - return _CFBinaryHeapContainsValue( - heap, - value, + return _difftime( + arg0, + arg1, ); } - late final _CFBinaryHeapContainsValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFBinaryHeapRef, - ffi.Pointer)>>('CFBinaryHeapContainsValue'); - late final _CFBinaryHeapContainsValue = _CFBinaryHeapContainsValuePtr - .asFunction)>(); + late final _difftimePtr = + _lookup>( + 'difftime'); + late final _difftime = _difftimePtr.asFunction(); - ffi.Pointer CFBinaryHeapGetMinimum( - CFBinaryHeapRef heap, + ffi.Pointer getdate( + ffi.Pointer arg0, ) { - return _CFBinaryHeapGetMinimum( - heap, + return _getdate( + arg0, ); } - late final _CFBinaryHeapGetMinimumPtr = _lookup< - ffi.NativeFunction Function(CFBinaryHeapRef)>>( - 'CFBinaryHeapGetMinimum'); - late final _CFBinaryHeapGetMinimum = _CFBinaryHeapGetMinimumPtr.asFunction< - ffi.Pointer Function(CFBinaryHeapRef)>(); + late final _getdatePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'getdate'); + late final _getdate = + _getdatePtr.asFunction Function(ffi.Pointer)>(); - int CFBinaryHeapGetMinimumIfPresent( - CFBinaryHeapRef heap, - ffi.Pointer> value, + ffi.Pointer gmtime( + ffi.Pointer arg0, ) { - return _CFBinaryHeapGetMinimumIfPresent( - heap, - value, + return _gmtime( + arg0, ); } - late final _CFBinaryHeapGetMinimumIfPresentPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFBinaryHeapRef, ffi.Pointer>)>>( - 'CFBinaryHeapGetMinimumIfPresent'); - late final _CFBinaryHeapGetMinimumIfPresent = - _CFBinaryHeapGetMinimumIfPresentPtr.asFunction< - int Function(CFBinaryHeapRef, ffi.Pointer>)>(); + late final _gmtimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'gmtime'); + late final _gmtime = + _gmtimePtr.asFunction Function(ffi.Pointer)>(); - void CFBinaryHeapGetValues( - CFBinaryHeapRef heap, - ffi.Pointer> values, + ffi.Pointer localtime( + ffi.Pointer arg0, ) { - return _CFBinaryHeapGetValues( - heap, - values, + return _localtime( + arg0, ); } - late final _CFBinaryHeapGetValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBinaryHeapRef, - ffi.Pointer>)>>('CFBinaryHeapGetValues'); - late final _CFBinaryHeapGetValues = _CFBinaryHeapGetValuesPtr.asFunction< - void Function(CFBinaryHeapRef, ffi.Pointer>)>(); + late final _localtimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'localtime'); + late final _localtime = + _localtimePtr.asFunction Function(ffi.Pointer)>(); - void CFBinaryHeapApplyFunction( - CFBinaryHeapRef heap, - CFBinaryHeapApplierFunction applier, - ffi.Pointer context, + int mktime( + ffi.Pointer arg0, ) { - return _CFBinaryHeapApplyFunction( - heap, - applier, - context, + return _mktime( + arg0, ); } - late final _CFBinaryHeapApplyFunctionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, - ffi.Pointer)>>('CFBinaryHeapApplyFunction'); - late final _CFBinaryHeapApplyFunction = - _CFBinaryHeapApplyFunctionPtr.asFunction< - void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, - ffi.Pointer)>(); + late final _mktimePtr = + _lookup)>>('mktime'); + late final _mktime = _mktimePtr.asFunction)>(); - void CFBinaryHeapAddValue( - CFBinaryHeapRef heap, - ffi.Pointer value, + int strftime( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _CFBinaryHeapAddValue( - heap, - value, + return _strftime( + arg0, + arg1, + arg2, + arg3, ); } - late final _CFBinaryHeapAddValuePtr = _lookup< + late final _strftimePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFBinaryHeapRef, ffi.Pointer)>>('CFBinaryHeapAddValue'); - late final _CFBinaryHeapAddValue = _CFBinaryHeapAddValuePtr.asFunction< - void Function(CFBinaryHeapRef, ffi.Pointer)>(); + ffi.Size Function(ffi.Pointer, ffi.Size, + ffi.Pointer, ffi.Pointer)>>('strftime'); + late final _strftime = _strftimePtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); - void CFBinaryHeapRemoveMinimumValue( - CFBinaryHeapRef heap, + ffi.Pointer strptime( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _CFBinaryHeapRemoveMinimumValue( - heap, + return _strptime( + arg0, + arg1, + arg2, ); } - late final _CFBinaryHeapRemoveMinimumValuePtr = - _lookup>( - 'CFBinaryHeapRemoveMinimumValue'); - late final _CFBinaryHeapRemoveMinimumValue = - _CFBinaryHeapRemoveMinimumValuePtr.asFunction< - void Function(CFBinaryHeapRef)>(); + late final _strptimePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('strptime'); + late final _strptime = _strptimePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - void CFBinaryHeapRemoveAllValues( - CFBinaryHeapRef heap, + int time( + ffi.Pointer arg0, ) { - return _CFBinaryHeapRemoveAllValues( - heap, + return _time( + arg0, ); } - late final _CFBinaryHeapRemoveAllValuesPtr = - _lookup>( - 'CFBinaryHeapRemoveAllValues'); - late final _CFBinaryHeapRemoveAllValues = _CFBinaryHeapRemoveAllValuesPtr - .asFunction(); + late final _timePtr = + _lookup)>>('time'); + late final _time = _timePtr.asFunction)>(); - int CFBitVectorGetTypeID() { - return _CFBitVectorGetTypeID(); + void tzset() { + return _tzset(); } - late final _CFBitVectorGetTypeIDPtr = - _lookup>('CFBitVectorGetTypeID'); - late final _CFBitVectorGetTypeID = - _CFBitVectorGetTypeIDPtr.asFunction(); + late final _tzsetPtr = + _lookup>('tzset'); + late final _tzset = _tzsetPtr.asFunction(); - CFBitVectorRef CFBitVectorCreate( - CFAllocatorRef allocator, - ffi.Pointer bytes, - int numBits, + ffi.Pointer asctime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBitVectorCreate( - allocator, - bytes, - numBits, + return _asctime_r( + arg0, + arg1, ); } - late final _CFBitVectorCreatePtr = _lookup< + late final _asctime_rPtr = _lookup< ffi.NativeFunction< - CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex)>>('CFBitVectorCreate'); - late final _CFBitVectorCreate = _CFBitVectorCreatePtr.asFunction< - CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('asctime_r'); + late final _asctime_r = _asctime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); - CFBitVectorRef CFBitVectorCreateCopy( - CFAllocatorRef allocator, - CFBitVectorRef bv, + ffi.Pointer ctime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBitVectorCreateCopy( - allocator, - bv, + return _ctime_r( + arg0, + arg1, ); } - late final _CFBitVectorCreateCopyPtr = _lookup< + late final _ctime_rPtr = _lookup< ffi.NativeFunction< - CFBitVectorRef Function( - CFAllocatorRef, CFBitVectorRef)>>('CFBitVectorCreateCopy'); - late final _CFBitVectorCreateCopy = _CFBitVectorCreateCopyPtr.asFunction< - CFBitVectorRef Function(CFAllocatorRef, CFBitVectorRef)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('ctime_r'); + late final _ctime_r = _ctime_rPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - CFMutableBitVectorRef CFBitVectorCreateMutable( - CFAllocatorRef allocator, - int capacity, + ffi.Pointer gmtime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBitVectorCreateMutable( - allocator, - capacity, + return _gmtime_r( + arg0, + arg1, ); } - late final _CFBitVectorCreateMutablePtr = _lookup< + late final _gmtime_rPtr = _lookup< ffi.NativeFunction< - CFMutableBitVectorRef Function( - CFAllocatorRef, CFIndex)>>('CFBitVectorCreateMutable'); - late final _CFBitVectorCreateMutable = _CFBitVectorCreateMutablePtr - .asFunction(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('gmtime_r'); + late final _gmtime_r = _gmtime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); - CFMutableBitVectorRef CFBitVectorCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFBitVectorRef bv, + ffi.Pointer localtime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFBitVectorCreateMutableCopy( - allocator, - capacity, - bv, + return _localtime_r( + arg0, + arg1, ); } - late final _CFBitVectorCreateMutableCopyPtr = _lookup< + late final _localtime_rPtr = _lookup< ffi.NativeFunction< - CFMutableBitVectorRef Function(CFAllocatorRef, CFIndex, - CFBitVectorRef)>>('CFBitVectorCreateMutableCopy'); - late final _CFBitVectorCreateMutableCopy = - _CFBitVectorCreateMutableCopyPtr.asFunction< - CFMutableBitVectorRef Function( - CFAllocatorRef, int, CFBitVectorRef)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('localtime_r'); + late final _localtime_r = _localtime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); - int CFBitVectorGetCount( - CFBitVectorRef bv, + int posix2time( + int arg0, ) { - return _CFBitVectorGetCount( - bv, + return _posix2time( + arg0, ); } - late final _CFBitVectorGetCountPtr = - _lookup>( - 'CFBitVectorGetCount'); - late final _CFBitVectorGetCount = - _CFBitVectorGetCountPtr.asFunction(); + late final _posix2timePtr = + _lookup>('posix2time'); + late final _posix2time = _posix2timePtr.asFunction(); - int CFBitVectorGetCountOfBit( - CFBitVectorRef bv, - CFRange range, - int value, + void tzsetwall() { + return _tzsetwall(); + } + + late final _tzsetwallPtr = + _lookup>('tzsetwall'); + late final _tzsetwall = _tzsetwallPtr.asFunction(); + + int time2posix( + int arg0, ) { - return _CFBitVectorGetCountOfBit( - bv, - range, - value, + return _time2posix( + arg0, ); } - late final _CFBitVectorGetCountOfBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorGetCountOfBit'); - late final _CFBitVectorGetCountOfBit = _CFBitVectorGetCountOfBitPtr - .asFunction(); + late final _time2posixPtr = + _lookup>('time2posix'); + late final _time2posix = _time2posixPtr.asFunction(); - int CFBitVectorContainsBit( - CFBitVectorRef bv, - CFRange range, - int value, + int timelocal( + ffi.Pointer arg0, ) { - return _CFBitVectorContainsBit( - bv, - range, - value, + return _timelocal( + arg0, ); } - late final _CFBitVectorContainsBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorContainsBit'); - late final _CFBitVectorContainsBit = _CFBitVectorContainsBitPtr.asFunction< - int Function(CFBitVectorRef, CFRange, int)>(); + late final _timelocalPtr = + _lookup)>>( + 'timelocal'); + late final _timelocal = + _timelocalPtr.asFunction)>(); - int CFBitVectorGetBitAtIndex( - CFBitVectorRef bv, - int idx, + int timegm( + ffi.Pointer arg0, ) { - return _CFBitVectorGetBitAtIndex( - bv, - idx, + return _timegm( + arg0, ); } - late final _CFBitVectorGetBitAtIndexPtr = - _lookup>( - 'CFBitVectorGetBitAtIndex'); - late final _CFBitVectorGetBitAtIndex = _CFBitVectorGetBitAtIndexPtr - .asFunction(); + late final _timegmPtr = + _lookup)>>('timegm'); + late final _timegm = _timegmPtr.asFunction)>(); - void CFBitVectorGetBits( - CFBitVectorRef bv, - CFRange range, - ffi.Pointer bytes, + int nanosleep( + ffi.Pointer __rqtp, + ffi.Pointer __rmtp, ) { - return _CFBitVectorGetBits( - bv, - range, - bytes, + return _nanosleep( + __rqtp, + __rmtp, ); } - late final _CFBitVectorGetBitsPtr = _lookup< + late final _nanosleepPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFBitVectorRef, CFRange, - ffi.Pointer)>>('CFBitVectorGetBits'); - late final _CFBitVectorGetBits = _CFBitVectorGetBitsPtr.asFunction< - void Function(CFBitVectorRef, CFRange, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('nanosleep'); + late final _nanosleep = _nanosleepPtr + .asFunction, ffi.Pointer)>(); - int CFBitVectorGetFirstIndexOfBit( - CFBitVectorRef bv, - CFRange range, - int value, + int clock_getres( + int __clock_id, + ffi.Pointer __res, ) { - return _CFBitVectorGetFirstIndexOfBit( - bv, - range, - value, + return _clock_getres( + __clock_id, + __res, ); } - late final _CFBitVectorGetFirstIndexOfBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorGetFirstIndexOfBit'); - late final _CFBitVectorGetFirstIndexOfBit = _CFBitVectorGetFirstIndexOfBitPtr - .asFunction(); + late final _clock_getresPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_getres'); + late final _clock_getres = + _clock_getresPtr.asFunction)>(); - int CFBitVectorGetLastIndexOfBit( - CFBitVectorRef bv, - CFRange range, - int value, + int clock_gettime( + int __clock_id, + ffi.Pointer __tp, ) { - return _CFBitVectorGetLastIndexOfBit( - bv, - range, - value, + return _clock_gettime( + __clock_id, + __tp, ); } - late final _CFBitVectorGetLastIndexOfBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorGetLastIndexOfBit'); - late final _CFBitVectorGetLastIndexOfBit = _CFBitVectorGetLastIndexOfBitPtr - .asFunction(); + late final _clock_gettimePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_gettime'); + late final _clock_gettime = + _clock_gettimePtr.asFunction)>(); - void CFBitVectorSetCount( - CFMutableBitVectorRef bv, - int count, + int clock_gettime_nsec_np( + int __clock_id, ) { - return _CFBitVectorSetCount( - bv, - count, + return _clock_gettime_nsec_np( + __clock_id, ); } - late final _CFBitVectorSetCountPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFIndex)>>('CFBitVectorSetCount'); - late final _CFBitVectorSetCount = _CFBitVectorSetCountPtr.asFunction< - void Function(CFMutableBitVectorRef, int)>(); + late final _clock_gettime_nsec_npPtr = + _lookup>( + 'clock_gettime_nsec_np'); + late final _clock_gettime_nsec_np = + _clock_gettime_nsec_npPtr.asFunction(); - void CFBitVectorFlipBitAtIndex( - CFMutableBitVectorRef bv, - int idx, + int clock_settime( + int __clock_id, + ffi.Pointer __tp, ) { - return _CFBitVectorFlipBitAtIndex( - bv, - idx, + return _clock_settime( + __clock_id, + __tp, ); } - late final _CFBitVectorFlipBitAtIndexPtr = _lookup< + late final _clock_settimePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFIndex)>>('CFBitVectorFlipBitAtIndex'); - late final _CFBitVectorFlipBitAtIndex = _CFBitVectorFlipBitAtIndexPtr - .asFunction(); + ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_settime'); + late final _clock_settime = + _clock_settimePtr.asFunction)>(); - void CFBitVectorFlipBits( - CFMutableBitVectorRef bv, - CFRange range, + int timespec_get( + ffi.Pointer ts, + int base, ) { - return _CFBitVectorFlipBits( - bv, - range, + return _timespec_get( + ts, + base, ); } - late final _CFBitVectorFlipBitsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFRange)>>('CFBitVectorFlipBits'); - late final _CFBitVectorFlipBits = _CFBitVectorFlipBitsPtr.asFunction< - void Function(CFMutableBitVectorRef, CFRange)>(); + late final _timespec_getPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'timespec_get'); + late final _timespec_get = + _timespec_getPtr.asFunction, int)>(); - void CFBitVectorSetBitAtIndex( - CFMutableBitVectorRef bv, - int idx, - int value, + int imaxabs( + int j, ) { - return _CFBitVectorSetBitAtIndex( - bv, - idx, - value, + return _imaxabs( + j, ); } - late final _CFBitVectorSetBitAtIndexPtr = _lookup< + late final _imaxabsPtr = + _lookup>('imaxabs'); + late final _imaxabs = _imaxabsPtr.asFunction(); + + imaxdiv_t imaxdiv( + int __numer, + int __denom, + ) { + return _imaxdiv( + __numer, + __denom, + ); + } + + late final _imaxdivPtr = + _lookup>( + 'imaxdiv'); + late final _imaxdiv = _imaxdivPtr.asFunction(); + + int strtoimax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, + ) { + return _strtoimax( + __nptr, + __endptr, + __base, + ); + } + + late final _strtoimaxPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableBitVectorRef, CFIndex, - CFBit)>>('CFBitVectorSetBitAtIndex'); - late final _CFBitVectorSetBitAtIndex = _CFBitVectorSetBitAtIndexPtr - .asFunction(); + intmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoimax'); + late final _strtoimax = _strtoimaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - void CFBitVectorSetBits( - CFMutableBitVectorRef bv, - CFRange range, - int value, + int strtoumax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, ) { - return _CFBitVectorSetBits( - bv, - range, - value, + return _strtoumax( + __nptr, + __endptr, + __base, ); } - late final _CFBitVectorSetBitsPtr = _lookup< + late final _strtoumaxPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFRange, CFBit)>>('CFBitVectorSetBits'); - late final _CFBitVectorSetBits = _CFBitVectorSetBitsPtr.asFunction< - void Function(CFMutableBitVectorRef, CFRange, int)>(); + uintmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoumax'); + late final _strtoumax = _strtoumaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - void CFBitVectorSetAllBits( - CFMutableBitVectorRef bv, - int value, + int wcstoimax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, ) { - return _CFBitVectorSetAllBits( - bv, - value, + return _wcstoimax( + __nptr, + __endptr, + __base, ); } - late final _CFBitVectorSetAllBitsPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorSetAllBits'); - late final _CFBitVectorSetAllBits = _CFBitVectorSetAllBitsPtr.asFunction< - void Function(CFMutableBitVectorRef, int)>(); + late final _wcstoimaxPtr = _lookup< + ffi.NativeFunction< + intmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('wcstoimax'); + late final _wcstoimax = _wcstoimaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final ffi.Pointer - _kCFTypeDictionaryKeyCallBacks = - _lookup('kCFTypeDictionaryKeyCallBacks'); + int wcstoumax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, + ) { + return _wcstoumax( + __nptr, + __endptr, + __base, + ); + } - CFDictionaryKeyCallBacks get kCFTypeDictionaryKeyCallBacks => - _kCFTypeDictionaryKeyCallBacks.ref; + late final _wcstoumaxPtr = _lookup< + ffi.NativeFunction< + uintmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('wcstoumax'); + late final _wcstoumax = _wcstoumaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - late final ffi.Pointer - _kCFCopyStringDictionaryKeyCallBacks = - _lookup('kCFCopyStringDictionaryKeyCallBacks'); + late final ffi.Pointer _kCFTypeBagCallBacks = + _lookup('kCFTypeBagCallBacks'); - CFDictionaryKeyCallBacks get kCFCopyStringDictionaryKeyCallBacks => - _kCFCopyStringDictionaryKeyCallBacks.ref; + CFBagCallBacks get kCFTypeBagCallBacks => _kCFTypeBagCallBacks.ref; - late final ffi.Pointer - _kCFTypeDictionaryValueCallBacks = - _lookup('kCFTypeDictionaryValueCallBacks'); + late final ffi.Pointer _kCFCopyStringBagCallBacks = + _lookup('kCFCopyStringBagCallBacks'); - CFDictionaryValueCallBacks get kCFTypeDictionaryValueCallBacks => - _kCFTypeDictionaryValueCallBacks.ref; + CFBagCallBacks get kCFCopyStringBagCallBacks => + _kCFCopyStringBagCallBacks.ref; - int CFDictionaryGetTypeID() { - return _CFDictionaryGetTypeID(); + int CFBagGetTypeID() { + return _CFBagGetTypeID(); } - late final _CFDictionaryGetTypeIDPtr = - _lookup>('CFDictionaryGetTypeID'); - late final _CFDictionaryGetTypeID = - _CFDictionaryGetTypeIDPtr.asFunction(); + late final _CFBagGetTypeIDPtr = + _lookup>('CFBagGetTypeID'); + late final _CFBagGetTypeID = _CFBagGetTypeIDPtr.asFunction(); - CFDictionaryRef CFDictionaryCreate( + CFBagRef CFBagCreate( CFAllocatorRef allocator, - ffi.Pointer> keys, ffi.Pointer> values, int numValues, - ffi.Pointer keyCallBacks, - ffi.Pointer valueCallBacks, + ffi.Pointer callBacks, ) { - return _CFDictionaryCreate( + return _CFBagCreate( allocator, - keys, values, numValues, - keyCallBacks, - valueCallBacks, + callBacks, ); } - late final _CFDictionaryCreatePtr = _lookup< + late final _CFBagCreatePtr = _lookup< ffi.NativeFunction< - CFDictionaryRef Function( - CFAllocatorRef, - ffi.Pointer>, - ffi.Pointer>, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>('CFDictionaryCreate'); - late final _CFDictionaryCreate = _CFDictionaryCreatePtr.asFunction< - CFDictionaryRef Function( - CFAllocatorRef, - ffi.Pointer>, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer)>(); + CFBagRef Function(CFAllocatorRef, ffi.Pointer>, + CFIndex, ffi.Pointer)>>('CFBagCreate'); + late final _CFBagCreate = _CFBagCreatePtr.asFunction< + CFBagRef Function(CFAllocatorRef, ffi.Pointer>, int, + ffi.Pointer)>(); - CFDictionaryRef CFDictionaryCreateCopy( + CFBagRef CFBagCreateCopy( CFAllocatorRef allocator, - CFDictionaryRef theDict, + CFBagRef theBag, ) { - return _CFDictionaryCreateCopy( + return _CFBagCreateCopy( allocator, - theDict, + theBag, ); } - late final _CFDictionaryCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function( - CFAllocatorRef, CFDictionaryRef)>>('CFDictionaryCreateCopy'); - late final _CFDictionaryCreateCopy = _CFDictionaryCreateCopyPtr.asFunction< - CFDictionaryRef Function(CFAllocatorRef, CFDictionaryRef)>(); + late final _CFBagCreateCopyPtr = + _lookup>( + 'CFBagCreateCopy'); + late final _CFBagCreateCopy = _CFBagCreateCopyPtr.asFunction< + CFBagRef Function(CFAllocatorRef, CFBagRef)>(); - CFMutableDictionaryRef CFDictionaryCreateMutable( + CFMutableBagRef CFBagCreateMutable( CFAllocatorRef allocator, int capacity, - ffi.Pointer keyCallBacks, - ffi.Pointer valueCallBacks, + ffi.Pointer callBacks, ) { - return _CFDictionaryCreateMutable( + return _CFBagCreateMutable( allocator, capacity, - keyCallBacks, - valueCallBacks, + callBacks, ); } - late final _CFDictionaryCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableDictionaryRef Function( - CFAllocatorRef, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>( - 'CFDictionaryCreateMutable'); - late final _CFDictionaryCreateMutable = - _CFDictionaryCreateMutablePtr.asFunction< - CFMutableDictionaryRef Function( - CFAllocatorRef, - int, - ffi.Pointer, - ffi.Pointer)>(); + late final _CFBagCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableBagRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFBagCreateMutable'); + late final _CFBagCreateMutable = _CFBagCreateMutablePtr.asFunction< + CFMutableBagRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - CFMutableDictionaryRef CFDictionaryCreateMutableCopy( + CFMutableBagRef CFBagCreateMutableCopy( CFAllocatorRef allocator, int capacity, - CFDictionaryRef theDict, + CFBagRef theBag, ) { - return _CFDictionaryCreateMutableCopy( + return _CFBagCreateMutableCopy( allocator, capacity, - theDict, + theBag, ); } - late final _CFDictionaryCreateMutableCopyPtr = _lookup< + late final _CFBagCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - CFMutableDictionaryRef Function(CFAllocatorRef, CFIndex, - CFDictionaryRef)>>('CFDictionaryCreateMutableCopy'); - late final _CFDictionaryCreateMutableCopy = - _CFDictionaryCreateMutableCopyPtr.asFunction< - CFMutableDictionaryRef Function( - CFAllocatorRef, int, CFDictionaryRef)>(); + CFMutableBagRef Function( + CFAllocatorRef, CFIndex, CFBagRef)>>('CFBagCreateMutableCopy'); + late final _CFBagCreateMutableCopy = _CFBagCreateMutableCopyPtr.asFunction< + CFMutableBagRef Function(CFAllocatorRef, int, CFBagRef)>(); - int CFDictionaryGetCount( - CFDictionaryRef theDict, + int CFBagGetCount( + CFBagRef theBag, ) { - return _CFDictionaryGetCount( - theDict, + return _CFBagGetCount( + theBag, ); } - late final _CFDictionaryGetCountPtr = - _lookup>( - 'CFDictionaryGetCount'); - late final _CFDictionaryGetCount = - _CFDictionaryGetCountPtr.asFunction(); + late final _CFBagGetCountPtr = + _lookup>('CFBagGetCount'); + late final _CFBagGetCount = + _CFBagGetCountPtr.asFunction(); - int CFDictionaryGetCountOfKey( - CFDictionaryRef theDict, - ffi.Pointer key, + int CFBagGetCountOfValue( + CFBagRef theBag, + ffi.Pointer value, ) { - return _CFDictionaryGetCountOfKey( - theDict, - key, + return _CFBagGetCountOfValue( + theBag, + value, ); } - late final _CFDictionaryGetCountOfKeyPtr = _lookup< + late final _CFBagGetCountOfValuePtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryGetCountOfKey'); - late final _CFDictionaryGetCountOfKey = _CFDictionaryGetCountOfKeyPtr - .asFunction)>(); + CFIndex Function( + CFBagRef, ffi.Pointer)>>('CFBagGetCountOfValue'); + late final _CFBagGetCountOfValue = _CFBagGetCountOfValuePtr.asFunction< + int Function(CFBagRef, ffi.Pointer)>(); - int CFDictionaryGetCountOfValue( - CFDictionaryRef theDict, + int CFBagContainsValue( + CFBagRef theBag, ffi.Pointer value, ) { - return _CFDictionaryGetCountOfValue( - theDict, + return _CFBagContainsValue( + theBag, value, ); } - late final _CFDictionaryGetCountOfValuePtr = _lookup< + late final _CFBagContainsValuePtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryGetCountOfValue'); - late final _CFDictionaryGetCountOfValue = _CFDictionaryGetCountOfValuePtr - .asFunction)>(); + Boolean Function( + CFBagRef, ffi.Pointer)>>('CFBagContainsValue'); + late final _CFBagContainsValue = _CFBagContainsValuePtr.asFunction< + int Function(CFBagRef, ffi.Pointer)>(); - int CFDictionaryContainsKey( - CFDictionaryRef theDict, - ffi.Pointer key, + ffi.Pointer CFBagGetValue( + CFBagRef theBag, + ffi.Pointer value, ) { - return _CFDictionaryContainsKey( - theDict, - key, + return _CFBagGetValue( + theBag, + value, ); } - late final _CFDictionaryContainsKeyPtr = _lookup< + late final _CFBagGetValuePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryContainsKey'); - late final _CFDictionaryContainsKey = _CFDictionaryContainsKeyPtr.asFunction< - int Function(CFDictionaryRef, ffi.Pointer)>(); + ffi.Pointer Function( + CFBagRef, ffi.Pointer)>>('CFBagGetValue'); + late final _CFBagGetValue = _CFBagGetValuePtr.asFunction< + ffi.Pointer Function(CFBagRef, ffi.Pointer)>(); - int CFDictionaryContainsValue( - CFDictionaryRef theDict, - ffi.Pointer value, + int CFBagGetValueIfPresent( + CFBagRef theBag, + ffi.Pointer candidate, + ffi.Pointer> value, ) { - return _CFDictionaryContainsValue( - theDict, + return _CFBagGetValueIfPresent( + theBag, + candidate, value, ); } - late final _CFDictionaryContainsValuePtr = _lookup< + late final _CFBagGetValueIfPresentPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryContainsValue'); - late final _CFDictionaryContainsValue = _CFDictionaryContainsValuePtr - .asFunction)>(); + Boolean Function(CFBagRef, ffi.Pointer, + ffi.Pointer>)>>('CFBagGetValueIfPresent'); + late final _CFBagGetValueIfPresent = _CFBagGetValueIfPresentPtr.asFunction< + int Function(CFBagRef, ffi.Pointer, + ffi.Pointer>)>(); - ffi.Pointer CFDictionaryGetValue( - CFDictionaryRef theDict, - ffi.Pointer key, + void CFBagGetValues( + CFBagRef theBag, + ffi.Pointer> values, ) { - return _CFDictionaryGetValue( - theDict, - key, + return _CFBagGetValues( + theBag, + values, ); } - late final _CFDictionaryGetValuePtr = _lookup< + late final _CFBagGetValuesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFDictionaryRef, ffi.Pointer)>>('CFDictionaryGetValue'); - late final _CFDictionaryGetValue = _CFDictionaryGetValuePtr.asFunction< - ffi.Pointer Function(CFDictionaryRef, ffi.Pointer)>(); + ffi.Void Function( + CFBagRef, ffi.Pointer>)>>('CFBagGetValues'); + late final _CFBagGetValues = _CFBagGetValuesPtr.asFunction< + void Function(CFBagRef, ffi.Pointer>)>(); - int CFDictionaryGetValueIfPresent( - CFDictionaryRef theDict, - ffi.Pointer key, - ffi.Pointer> value, + void CFBagApplyFunction( + CFBagRef theBag, + CFBagApplierFunction applier, + ffi.Pointer context, ) { - return _CFDictionaryGetValueIfPresent( - theDict, - key, - value, + return _CFBagApplyFunction( + theBag, + applier, + context, ); } - late final _CFDictionaryGetValueIfPresentPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFDictionaryRef, ffi.Pointer, - ffi.Pointer>)>>( - 'CFDictionaryGetValueIfPresent'); - late final _CFDictionaryGetValueIfPresent = - _CFDictionaryGetValueIfPresentPtr.asFunction< - int Function(CFDictionaryRef, ffi.Pointer, - ffi.Pointer>)>(); - - void CFDictionaryGetKeysAndValues( - CFDictionaryRef theDict, - ffi.Pointer> keys, - ffi.Pointer> values, + late final _CFBagApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBagRef, CFBagApplierFunction, + ffi.Pointer)>>('CFBagApplyFunction'); + late final _CFBagApplyFunction = _CFBagApplyFunctionPtr.asFunction< + void Function(CFBagRef, CFBagApplierFunction, ffi.Pointer)>(); + + void CFBagAddValue( + CFMutableBagRef theBag, + ffi.Pointer value, ) { - return _CFDictionaryGetKeysAndValues( - theDict, - keys, - values, + return _CFBagAddValue( + theBag, + value, ); } - late final _CFDictionaryGetKeysAndValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFDictionaryRef, - ffi.Pointer>, - ffi.Pointer>)>>( - 'CFDictionaryGetKeysAndValues'); - late final _CFDictionaryGetKeysAndValues = - _CFDictionaryGetKeysAndValuesPtr.asFunction< - void Function(CFDictionaryRef, ffi.Pointer>, - ffi.Pointer>)>(); + late final _CFBagAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagAddValue'); + late final _CFBagAddValue = _CFBagAddValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - void CFDictionaryApplyFunction( - CFDictionaryRef theDict, - CFDictionaryApplierFunction applier, - ffi.Pointer context, + void CFBagReplaceValue( + CFMutableBagRef theBag, + ffi.Pointer value, ) { - return _CFDictionaryApplyFunction( - theDict, - applier, - context, + return _CFBagReplaceValue( + theBag, + value, ); } - late final _CFDictionaryApplyFunctionPtr = _lookup< + late final _CFBagReplaceValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFDictionaryRef, CFDictionaryApplierFunction, - ffi.Pointer)>>('CFDictionaryApplyFunction'); - late final _CFDictionaryApplyFunction = - _CFDictionaryApplyFunctionPtr.asFunction< - void Function(CFDictionaryRef, CFDictionaryApplierFunction, - ffi.Pointer)>(); + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagReplaceValue'); + late final _CFBagReplaceValue = _CFBagReplaceValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - void CFDictionaryAddValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, + void CFBagSetValue( + CFMutableBagRef theBag, ffi.Pointer value, ) { - return _CFDictionaryAddValue( - theDict, - key, + return _CFBagSetValue( + theBag, value, ); } - late final _CFDictionaryAddValuePtr = _lookup< + late final _CFBagSetValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>>('CFDictionaryAddValue'); - late final _CFDictionaryAddValue = _CFDictionaryAddValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagSetValue'); + late final _CFBagSetValue = _CFBagSetValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - void CFDictionarySetValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, + void CFBagRemoveValue( + CFMutableBagRef theBag, ffi.Pointer value, ) { - return _CFDictionarySetValue( - theDict, - key, + return _CFBagRemoveValue( + theBag, value, ); } - late final _CFDictionarySetValuePtr = _lookup< + late final _CFBagRemoveValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>>('CFDictionarySetValue'); - late final _CFDictionarySetValue = _CFDictionarySetValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagRemoveValue'); + late final _CFBagRemoveValue = _CFBagRemoveValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - void CFDictionaryReplaceValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, - ffi.Pointer value, + void CFBagRemoveAllValues( + CFMutableBagRef theBag, ) { - return _CFDictionaryReplaceValue( - theDict, - key, - value, + return _CFBagRemoveAllValues( + theBag, ); } - late final _CFDictionaryReplaceValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>>('CFDictionaryReplaceValue'); - late final _CFDictionaryReplaceValue = - _CFDictionaryReplaceValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>(); + late final _CFBagRemoveAllValuesPtr = + _lookup>( + 'CFBagRemoveAllValues'); + late final _CFBagRemoveAllValues = + _CFBagRemoveAllValuesPtr.asFunction(); - void CFDictionaryRemoveValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, + late final ffi.Pointer _kCFStringBinaryHeapCallBacks = + _lookup('kCFStringBinaryHeapCallBacks'); + + CFBinaryHeapCallBacks get kCFStringBinaryHeapCallBacks => + _kCFStringBinaryHeapCallBacks.ref; + + int CFBinaryHeapGetTypeID() { + return _CFBinaryHeapGetTypeID(); + } + + late final _CFBinaryHeapGetTypeIDPtr = + _lookup>('CFBinaryHeapGetTypeID'); + late final _CFBinaryHeapGetTypeID = + _CFBinaryHeapGetTypeIDPtr.asFunction(); + + CFBinaryHeapRef CFBinaryHeapCreate( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, + ffi.Pointer compareContext, ) { - return _CFDictionaryRemoveValue( - theDict, - key, + return _CFBinaryHeapCreate( + allocator, + capacity, + callBacks, + compareContext, ); } - late final _CFDictionaryRemoveValuePtr = _lookup< + late final _CFBinaryHeapCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, - ffi.Pointer)>>('CFDictionaryRemoveValue'); - late final _CFDictionaryRemoveValue = _CFDictionaryRemoveValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer)>(); + CFBinaryHeapRef Function( + CFAllocatorRef, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFBinaryHeapCreate'); + late final _CFBinaryHeapCreate = _CFBinaryHeapCreatePtr.asFunction< + CFBinaryHeapRef Function( + CFAllocatorRef, + int, + ffi.Pointer, + ffi.Pointer)>(); - void CFDictionaryRemoveAllValues( - CFMutableDictionaryRef theDict, + CFBinaryHeapRef CFBinaryHeapCreateCopy( + CFAllocatorRef allocator, + int capacity, + CFBinaryHeapRef heap, ) { - return _CFDictionaryRemoveAllValues( - theDict, + return _CFBinaryHeapCreateCopy( + allocator, + capacity, + heap, ); } - late final _CFDictionaryRemoveAllValuesPtr = - _lookup>( - 'CFDictionaryRemoveAllValues'); - late final _CFDictionaryRemoveAllValues = _CFDictionaryRemoveAllValuesPtr - .asFunction(); + late final _CFBinaryHeapCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFBinaryHeapRef Function(CFAllocatorRef, CFIndex, + CFBinaryHeapRef)>>('CFBinaryHeapCreateCopy'); + late final _CFBinaryHeapCreateCopy = _CFBinaryHeapCreateCopyPtr.asFunction< + CFBinaryHeapRef Function(CFAllocatorRef, int, CFBinaryHeapRef)>(); - int CFNotificationCenterGetTypeID() { - return _CFNotificationCenterGetTypeID(); + int CFBinaryHeapGetCount( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapGetCount( + heap, + ); } - late final _CFNotificationCenterGetTypeIDPtr = - _lookup>( - 'CFNotificationCenterGetTypeID'); - late final _CFNotificationCenterGetTypeID = - _CFNotificationCenterGetTypeIDPtr.asFunction(); + late final _CFBinaryHeapGetCountPtr = + _lookup>( + 'CFBinaryHeapGetCount'); + late final _CFBinaryHeapGetCount = + _CFBinaryHeapGetCountPtr.asFunction(); - CFNotificationCenterRef CFNotificationCenterGetLocalCenter() { - return _CFNotificationCenterGetLocalCenter(); + int CFBinaryHeapGetCountOfValue( + CFBinaryHeapRef heap, + ffi.Pointer value, + ) { + return _CFBinaryHeapGetCountOfValue( + heap, + value, + ); } - late final _CFNotificationCenterGetLocalCenterPtr = - _lookup>( - 'CFNotificationCenterGetLocalCenter'); - late final _CFNotificationCenterGetLocalCenter = - _CFNotificationCenterGetLocalCenterPtr.asFunction< - CFNotificationCenterRef Function()>(); + late final _CFBinaryHeapGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFBinaryHeapRef, + ffi.Pointer)>>('CFBinaryHeapGetCountOfValue'); + late final _CFBinaryHeapGetCountOfValue = _CFBinaryHeapGetCountOfValuePtr + .asFunction)>(); - CFNotificationCenterRef CFNotificationCenterGetDistributedCenter() { - return _CFNotificationCenterGetDistributedCenter(); + int CFBinaryHeapContainsValue( + CFBinaryHeapRef heap, + ffi.Pointer value, + ) { + return _CFBinaryHeapContainsValue( + heap, + value, + ); } - late final _CFNotificationCenterGetDistributedCenterPtr = - _lookup>( - 'CFNotificationCenterGetDistributedCenter'); - late final _CFNotificationCenterGetDistributedCenter = - _CFNotificationCenterGetDistributedCenterPtr.asFunction< - CFNotificationCenterRef Function()>(); + late final _CFBinaryHeapContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBinaryHeapRef, + ffi.Pointer)>>('CFBinaryHeapContainsValue'); + late final _CFBinaryHeapContainsValue = _CFBinaryHeapContainsValuePtr + .asFunction)>(); - CFNotificationCenterRef CFNotificationCenterGetDarwinNotifyCenter() { - return _CFNotificationCenterGetDarwinNotifyCenter(); + ffi.Pointer CFBinaryHeapGetMinimum( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapGetMinimum( + heap, + ); } - late final _CFNotificationCenterGetDarwinNotifyCenterPtr = - _lookup>( - 'CFNotificationCenterGetDarwinNotifyCenter'); - late final _CFNotificationCenterGetDarwinNotifyCenter = - _CFNotificationCenterGetDarwinNotifyCenterPtr.asFunction< - CFNotificationCenterRef Function()>(); + late final _CFBinaryHeapGetMinimumPtr = _lookup< + ffi.NativeFunction Function(CFBinaryHeapRef)>>( + 'CFBinaryHeapGetMinimum'); + late final _CFBinaryHeapGetMinimum = _CFBinaryHeapGetMinimumPtr.asFunction< + ffi.Pointer Function(CFBinaryHeapRef)>(); - void CFNotificationCenterAddObserver( - CFNotificationCenterRef center, - ffi.Pointer observer, - CFNotificationCallback callBack, - CFStringRef name, - ffi.Pointer object, - int suspensionBehavior, + int CFBinaryHeapGetMinimumIfPresent( + CFBinaryHeapRef heap, + ffi.Pointer> value, ) { - return _CFNotificationCenterAddObserver( - center, - observer, - callBack, - name, - object, - suspensionBehavior, + return _CFBinaryHeapGetMinimumIfPresent( + heap, + value, ); } - late final _CFNotificationCenterAddObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFNotificationCenterRef, - ffi.Pointer, - CFNotificationCallback, - CFStringRef, - ffi.Pointer, - ffi.Int32)>>('CFNotificationCenterAddObserver'); - late final _CFNotificationCenterAddObserver = - _CFNotificationCenterAddObserverPtr.asFunction< - void Function( - CFNotificationCenterRef, - ffi.Pointer, - CFNotificationCallback, - CFStringRef, - ffi.Pointer, - int)>(); + late final _CFBinaryHeapGetMinimumIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFBinaryHeapRef, ffi.Pointer>)>>( + 'CFBinaryHeapGetMinimumIfPresent'); + late final _CFBinaryHeapGetMinimumIfPresent = + _CFBinaryHeapGetMinimumIfPresentPtr.asFunction< + int Function(CFBinaryHeapRef, ffi.Pointer>)>(); - void CFNotificationCenterRemoveObserver( - CFNotificationCenterRef center, - ffi.Pointer observer, - CFNotificationName name, - ffi.Pointer object, + void CFBinaryHeapGetValues( + CFBinaryHeapRef heap, + ffi.Pointer> values, ) { - return _CFNotificationCenterRemoveObserver( - center, - observer, - name, - object, + return _CFBinaryHeapGetValues( + heap, + values, ); } - late final _CFNotificationCenterRemoveObserverPtr = _lookup< + late final _CFBinaryHeapGetValuesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFNotificationCenterRef, - ffi.Pointer, - CFNotificationName, - ffi.Pointer)>>('CFNotificationCenterRemoveObserver'); - late final _CFNotificationCenterRemoveObserver = - _CFNotificationCenterRemoveObserverPtr.asFunction< - void Function(CFNotificationCenterRef, ffi.Pointer, - CFNotificationName, ffi.Pointer)>(); + ffi.Void Function(CFBinaryHeapRef, + ffi.Pointer>)>>('CFBinaryHeapGetValues'); + late final _CFBinaryHeapGetValues = _CFBinaryHeapGetValuesPtr.asFunction< + void Function(CFBinaryHeapRef, ffi.Pointer>)>(); - void CFNotificationCenterRemoveEveryObserver( - CFNotificationCenterRef center, - ffi.Pointer observer, + void CFBinaryHeapApplyFunction( + CFBinaryHeapRef heap, + CFBinaryHeapApplierFunction applier, + ffi.Pointer context, ) { - return _CFNotificationCenterRemoveEveryObserver( - center, - observer, + return _CFBinaryHeapApplyFunction( + heap, + applier, + context, ); } - late final _CFNotificationCenterRemoveEveryObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFNotificationCenterRef, ffi.Pointer)>>( - 'CFNotificationCenterRemoveEveryObserver'); - late final _CFNotificationCenterRemoveEveryObserver = - _CFNotificationCenterRemoveEveryObserverPtr.asFunction< - void Function(CFNotificationCenterRef, ffi.Pointer)>(); + late final _CFBinaryHeapApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, + ffi.Pointer)>>('CFBinaryHeapApplyFunction'); + late final _CFBinaryHeapApplyFunction = + _CFBinaryHeapApplyFunctionPtr.asFunction< + void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, + ffi.Pointer)>(); - void CFNotificationCenterPostNotification( - CFNotificationCenterRef center, - CFNotificationName name, - ffi.Pointer object, - CFDictionaryRef userInfo, - int deliverImmediately, + void CFBinaryHeapAddValue( + CFBinaryHeapRef heap, + ffi.Pointer value, ) { - return _CFNotificationCenterPostNotification( - center, - name, - object, - userInfo, - deliverImmediately, + return _CFBinaryHeapAddValue( + heap, + value, ); } - late final _CFNotificationCenterPostNotificationPtr = _lookup< + late final _CFBinaryHeapAddValuePtr = _lookup< ffi.NativeFunction< ffi.Void Function( - CFNotificationCenterRef, - CFNotificationName, - ffi.Pointer, - CFDictionaryRef, - Boolean)>>('CFNotificationCenterPostNotification'); - late final _CFNotificationCenterPostNotification = - _CFNotificationCenterPostNotificationPtr.asFunction< - void Function(CFNotificationCenterRef, CFNotificationName, - ffi.Pointer, CFDictionaryRef, int)>(); + CFBinaryHeapRef, ffi.Pointer)>>('CFBinaryHeapAddValue'); + late final _CFBinaryHeapAddValue = _CFBinaryHeapAddValuePtr.asFunction< + void Function(CFBinaryHeapRef, ffi.Pointer)>(); - void CFNotificationCenterPostNotificationWithOptions( - CFNotificationCenterRef center, - CFNotificationName name, - ffi.Pointer object, - CFDictionaryRef userInfo, - int options, + void CFBinaryHeapRemoveMinimumValue( + CFBinaryHeapRef heap, ) { - return _CFNotificationCenterPostNotificationWithOptions( - center, - name, - object, - userInfo, - options, + return _CFBinaryHeapRemoveMinimumValue( + heap, ); } - late final _CFNotificationCenterPostNotificationWithOptionsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFNotificationCenterRef, CFNotificationName, - ffi.Pointer, CFDictionaryRef, CFOptionFlags)>>( - 'CFNotificationCenterPostNotificationWithOptions'); - late final _CFNotificationCenterPostNotificationWithOptions = - _CFNotificationCenterPostNotificationWithOptionsPtr.asFunction< - void Function(CFNotificationCenterRef, CFNotificationName, - ffi.Pointer, CFDictionaryRef, int)>(); + late final _CFBinaryHeapRemoveMinimumValuePtr = + _lookup>( + 'CFBinaryHeapRemoveMinimumValue'); + late final _CFBinaryHeapRemoveMinimumValue = + _CFBinaryHeapRemoveMinimumValuePtr.asFunction< + void Function(CFBinaryHeapRef)>(); - int CFLocaleGetTypeID() { - return _CFLocaleGetTypeID(); + void CFBinaryHeapRemoveAllValues( + CFBinaryHeapRef heap, + ) { + return _CFBinaryHeapRemoveAllValues( + heap, + ); } - late final _CFLocaleGetTypeIDPtr = - _lookup>('CFLocaleGetTypeID'); - late final _CFLocaleGetTypeID = - _CFLocaleGetTypeIDPtr.asFunction(); + late final _CFBinaryHeapRemoveAllValuesPtr = + _lookup>( + 'CFBinaryHeapRemoveAllValues'); + late final _CFBinaryHeapRemoveAllValues = _CFBinaryHeapRemoveAllValuesPtr + .asFunction(); - CFLocaleRef CFLocaleGetSystem() { - return _CFLocaleGetSystem(); + int CFBitVectorGetTypeID() { + return _CFBitVectorGetTypeID(); } - late final _CFLocaleGetSystemPtr = - _lookup>('CFLocaleGetSystem'); - late final _CFLocaleGetSystem = - _CFLocaleGetSystemPtr.asFunction(); + late final _CFBitVectorGetTypeIDPtr = + _lookup>('CFBitVectorGetTypeID'); + late final _CFBitVectorGetTypeID = + _CFBitVectorGetTypeIDPtr.asFunction(); - CFLocaleRef CFLocaleCopyCurrent() { - return _CFLocaleCopyCurrent(); + CFBitVectorRef CFBitVectorCreate( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int numBits, + ) { + return _CFBitVectorCreate( + allocator, + bytes, + numBits, + ); } - late final _CFLocaleCopyCurrentPtr = - _lookup>( - 'CFLocaleCopyCurrent'); - late final _CFLocaleCopyCurrent = - _CFLocaleCopyCurrentPtr.asFunction(); + late final _CFBitVectorCreatePtr = _lookup< + ffi.NativeFunction< + CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFBitVectorCreate'); + late final _CFBitVectorCreate = _CFBitVectorCreatePtr.asFunction< + CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - CFArrayRef CFLocaleCopyAvailableLocaleIdentifiers() { - return _CFLocaleCopyAvailableLocaleIdentifiers(); + CFBitVectorRef CFBitVectorCreateCopy( + CFAllocatorRef allocator, + CFBitVectorRef bv, + ) { + return _CFBitVectorCreateCopy( + allocator, + bv, + ); } - late final _CFLocaleCopyAvailableLocaleIdentifiersPtr = - _lookup>( - 'CFLocaleCopyAvailableLocaleIdentifiers'); - late final _CFLocaleCopyAvailableLocaleIdentifiers = - _CFLocaleCopyAvailableLocaleIdentifiersPtr.asFunction< - CFArrayRef Function()>(); - - CFArrayRef CFLocaleCopyISOLanguageCodes() { - return _CFLocaleCopyISOLanguageCodes(); - } - - late final _CFLocaleCopyISOLanguageCodesPtr = - _lookup>( - 'CFLocaleCopyISOLanguageCodes'); - late final _CFLocaleCopyISOLanguageCodes = - _CFLocaleCopyISOLanguageCodesPtr.asFunction(); - - CFArrayRef CFLocaleCopyISOCountryCodes() { - return _CFLocaleCopyISOCountryCodes(); - } - - late final _CFLocaleCopyISOCountryCodesPtr = - _lookup>( - 'CFLocaleCopyISOCountryCodes'); - late final _CFLocaleCopyISOCountryCodes = - _CFLocaleCopyISOCountryCodesPtr.asFunction(); - - CFArrayRef CFLocaleCopyISOCurrencyCodes() { - return _CFLocaleCopyISOCurrencyCodes(); - } - - late final _CFLocaleCopyISOCurrencyCodesPtr = - _lookup>( - 'CFLocaleCopyISOCurrencyCodes'); - late final _CFLocaleCopyISOCurrencyCodes = - _CFLocaleCopyISOCurrencyCodesPtr.asFunction(); - - CFArrayRef CFLocaleCopyCommonISOCurrencyCodes() { - return _CFLocaleCopyCommonISOCurrencyCodes(); - } - - late final _CFLocaleCopyCommonISOCurrencyCodesPtr = - _lookup>( - 'CFLocaleCopyCommonISOCurrencyCodes'); - late final _CFLocaleCopyCommonISOCurrencyCodes = - _CFLocaleCopyCommonISOCurrencyCodesPtr.asFunction< - CFArrayRef Function()>(); - - CFArrayRef CFLocaleCopyPreferredLanguages() { - return _CFLocaleCopyPreferredLanguages(); - } - - late final _CFLocaleCopyPreferredLanguagesPtr = - _lookup>( - 'CFLocaleCopyPreferredLanguages'); - late final _CFLocaleCopyPreferredLanguages = - _CFLocaleCopyPreferredLanguagesPtr.asFunction(); + late final _CFBitVectorCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFBitVectorRef Function( + CFAllocatorRef, CFBitVectorRef)>>('CFBitVectorCreateCopy'); + late final _CFBitVectorCreateCopy = _CFBitVectorCreateCopyPtr.asFunction< + CFBitVectorRef Function(CFAllocatorRef, CFBitVectorRef)>(); - CFLocaleIdentifier CFLocaleCreateCanonicalLanguageIdentifierFromString( + CFMutableBitVectorRef CFBitVectorCreateMutable( CFAllocatorRef allocator, - CFStringRef localeIdentifier, + int capacity, ) { - return _CFLocaleCreateCanonicalLanguageIdentifierFromString( + return _CFBitVectorCreateMutable( allocator, - localeIdentifier, + capacity, ); } - late final _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( - 'CFLocaleCreateCanonicalLanguageIdentifierFromString'); - late final _CFLocaleCreateCanonicalLanguageIdentifierFromString = - _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); + late final _CFBitVectorCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableBitVectorRef Function( + CFAllocatorRef, CFIndex)>>('CFBitVectorCreateMutable'); + late final _CFBitVectorCreateMutable = _CFBitVectorCreateMutablePtr + .asFunction(); - CFLocaleIdentifier CFLocaleCreateCanonicalLocaleIdentifierFromString( + CFMutableBitVectorRef CFBitVectorCreateMutableCopy( CFAllocatorRef allocator, - CFStringRef localeIdentifier, + int capacity, + CFBitVectorRef bv, ) { - return _CFLocaleCreateCanonicalLocaleIdentifierFromString( + return _CFBitVectorCreateMutableCopy( allocator, - localeIdentifier, + capacity, + bv, ); } - late final _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( - 'CFLocaleCreateCanonicalLocaleIdentifierFromString'); - late final _CFLocaleCreateCanonicalLocaleIdentifierFromString = - _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); + late final _CFBitVectorCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableBitVectorRef Function(CFAllocatorRef, CFIndex, + CFBitVectorRef)>>('CFBitVectorCreateMutableCopy'); + late final _CFBitVectorCreateMutableCopy = + _CFBitVectorCreateMutableCopyPtr.asFunction< + CFMutableBitVectorRef Function( + CFAllocatorRef, int, CFBitVectorRef)>(); - CFLocaleIdentifier - CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( - CFAllocatorRef allocator, - int lcode, - int rcode, + int CFBitVectorGetCount( + CFBitVectorRef bv, ) { - return _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( - allocator, - lcode, - rcode, + return _CFBitVectorGetCount( + bv, ); } - late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr = - _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function( - CFAllocatorRef, LangCode, RegionCode)>>( - 'CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes'); - late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes = - _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr - .asFunction(); + late final _CFBitVectorGetCountPtr = + _lookup>( + 'CFBitVectorGetCount'); + late final _CFBitVectorGetCount = + _CFBitVectorGetCountPtr.asFunction(); - CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( - CFAllocatorRef allocator, - int lcid, + int CFBitVectorGetCountOfBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( - allocator, - lcid, + return _CFBitVectorGetCountOfBit( + bv, + range, + value, ); } - late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, ffi.Uint32)>>( - 'CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode'); - late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode = - _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, int)>(); + late final _CFBitVectorGetCountOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetCountOfBit'); + late final _CFBitVectorGetCountOfBit = _CFBitVectorGetCountOfBitPtr + .asFunction(); - int CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( - CFLocaleIdentifier localeIdentifier, + int CFBitVectorContainsBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( - localeIdentifier, + return _CFBitVectorContainsBit( + bv, + range, + value, ); } - late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr = - _lookup>( - 'CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier'); - late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier = - _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr.asFunction< - int Function(CFLocaleIdentifier)>(); + late final _CFBitVectorContainsBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorContainsBit'); + late final _CFBitVectorContainsBit = _CFBitVectorContainsBitPtr.asFunction< + int Function(CFBitVectorRef, CFRange, int)>(); - int CFLocaleGetLanguageCharacterDirection( - CFStringRef isoLangCode, + int CFBitVectorGetBitAtIndex( + CFBitVectorRef bv, + int idx, ) { - return _CFLocaleGetLanguageCharacterDirection( - isoLangCode, + return _CFBitVectorGetBitAtIndex( + bv, + idx, ); } - late final _CFLocaleGetLanguageCharacterDirectionPtr = - _lookup>( - 'CFLocaleGetLanguageCharacterDirection'); - late final _CFLocaleGetLanguageCharacterDirection = - _CFLocaleGetLanguageCharacterDirectionPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFBitVectorGetBitAtIndexPtr = + _lookup>( + 'CFBitVectorGetBitAtIndex'); + late final _CFBitVectorGetBitAtIndex = _CFBitVectorGetBitAtIndexPtr + .asFunction(); - int CFLocaleGetLanguageLineDirection( - CFStringRef isoLangCode, + void CFBitVectorGetBits( + CFBitVectorRef bv, + CFRange range, + ffi.Pointer bytes, ) { - return _CFLocaleGetLanguageLineDirection( - isoLangCode, + return _CFBitVectorGetBits( + bv, + range, + bytes, ); } - late final _CFLocaleGetLanguageLineDirectionPtr = - _lookup>( - 'CFLocaleGetLanguageLineDirection'); - late final _CFLocaleGetLanguageLineDirection = - _CFLocaleGetLanguageLineDirectionPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFBitVectorGetBitsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBitVectorRef, CFRange, + ffi.Pointer)>>('CFBitVectorGetBits'); + late final _CFBitVectorGetBits = _CFBitVectorGetBitsPtr.asFunction< + void Function(CFBitVectorRef, CFRange, ffi.Pointer)>(); - CFDictionaryRef CFLocaleCreateComponentsFromLocaleIdentifier( - CFAllocatorRef allocator, - CFLocaleIdentifier localeID, + int CFBitVectorGetFirstIndexOfBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleCreateComponentsFromLocaleIdentifier( - allocator, - localeID, + return _CFBitVectorGetFirstIndexOfBit( + bv, + range, + value, ); } - late final _CFLocaleCreateComponentsFromLocaleIdentifierPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>>( - 'CFLocaleCreateComponentsFromLocaleIdentifier'); - late final _CFLocaleCreateComponentsFromLocaleIdentifier = - _CFLocaleCreateComponentsFromLocaleIdentifierPtr.asFunction< - CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); + late final _CFBitVectorGetFirstIndexOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetFirstIndexOfBit'); + late final _CFBitVectorGetFirstIndexOfBit = _CFBitVectorGetFirstIndexOfBitPtr + .asFunction(); - CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromComponents( - CFAllocatorRef allocator, - CFDictionaryRef dictionary, + int CFBitVectorGetLastIndexOfBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleCreateLocaleIdentifierFromComponents( - allocator, - dictionary, + return _CFBitVectorGetLastIndexOfBit( + bv, + range, + value, ); } - late final _CFLocaleCreateLocaleIdentifierFromComponentsPtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>>( - 'CFLocaleCreateLocaleIdentifierFromComponents'); - late final _CFLocaleCreateLocaleIdentifierFromComponents = - _CFLocaleCreateLocaleIdentifierFromComponentsPtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>(); + late final _CFBitVectorGetLastIndexOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetLastIndexOfBit'); + late final _CFBitVectorGetLastIndexOfBit = _CFBitVectorGetLastIndexOfBitPtr + .asFunction(); - CFLocaleRef CFLocaleCreate( - CFAllocatorRef allocator, - CFLocaleIdentifier localeIdentifier, + void CFBitVectorSetCount( + CFMutableBitVectorRef bv, + int count, ) { - return _CFLocaleCreate( - allocator, - localeIdentifier, + return _CFBitVectorSetCount( + bv, + count, ); } - late final _CFLocaleCreatePtr = _lookup< + late final _CFBitVectorSetCountPtr = _lookup< ffi.NativeFunction< - CFLocaleRef Function( - CFAllocatorRef, CFLocaleIdentifier)>>('CFLocaleCreate'); - late final _CFLocaleCreate = _CFLocaleCreatePtr.asFunction< - CFLocaleRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); + ffi.Void Function( + CFMutableBitVectorRef, CFIndex)>>('CFBitVectorSetCount'); + late final _CFBitVectorSetCount = _CFBitVectorSetCountPtr.asFunction< + void Function(CFMutableBitVectorRef, int)>(); - CFLocaleRef CFLocaleCreateCopy( - CFAllocatorRef allocator, - CFLocaleRef locale, + void CFBitVectorFlipBitAtIndex( + CFMutableBitVectorRef bv, + int idx, ) { - return _CFLocaleCreateCopy( - allocator, - locale, + return _CFBitVectorFlipBitAtIndex( + bv, + idx, ); } - late final _CFLocaleCreateCopyPtr = _lookup< + late final _CFBitVectorFlipBitAtIndexPtr = _lookup< ffi.NativeFunction< - CFLocaleRef Function( - CFAllocatorRef, CFLocaleRef)>>('CFLocaleCreateCopy'); - late final _CFLocaleCreateCopy = _CFLocaleCreateCopyPtr.asFunction< - CFLocaleRef Function(CFAllocatorRef, CFLocaleRef)>(); + ffi.Void Function( + CFMutableBitVectorRef, CFIndex)>>('CFBitVectorFlipBitAtIndex'); + late final _CFBitVectorFlipBitAtIndex = _CFBitVectorFlipBitAtIndexPtr + .asFunction(); - CFLocaleIdentifier CFLocaleGetIdentifier( - CFLocaleRef locale, + void CFBitVectorFlipBits( + CFMutableBitVectorRef bv, + CFRange range, ) { - return _CFLocaleGetIdentifier( - locale, + return _CFBitVectorFlipBits( + bv, + range, ); } - late final _CFLocaleGetIdentifierPtr = - _lookup>( - 'CFLocaleGetIdentifier'); - late final _CFLocaleGetIdentifier = _CFLocaleGetIdentifierPtr.asFunction< - CFLocaleIdentifier Function(CFLocaleRef)>(); + late final _CFBitVectorFlipBitsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBitVectorRef, CFRange)>>('CFBitVectorFlipBits'); + late final _CFBitVectorFlipBits = _CFBitVectorFlipBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, CFRange)>(); - CFTypeRef CFLocaleGetValue( - CFLocaleRef locale, - CFLocaleKey key, + void CFBitVectorSetBitAtIndex( + CFMutableBitVectorRef bv, + int idx, + int value, ) { - return _CFLocaleGetValue( - locale, - key, + return _CFBitVectorSetBitAtIndex( + bv, + idx, + value, ); } - late final _CFLocaleGetValuePtr = - _lookup>( - 'CFLocaleGetValue'); - late final _CFLocaleGetValue = _CFLocaleGetValuePtr.asFunction< - CFTypeRef Function(CFLocaleRef, CFLocaleKey)>(); + late final _CFBitVectorSetBitAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableBitVectorRef, CFIndex, + CFBit)>>('CFBitVectorSetBitAtIndex'); + late final _CFBitVectorSetBitAtIndex = _CFBitVectorSetBitAtIndexPtr + .asFunction(); - CFStringRef CFLocaleCopyDisplayNameForPropertyValue( - CFLocaleRef displayLocale, - CFLocaleKey key, - CFStringRef value, + void CFBitVectorSetBits( + CFMutableBitVectorRef bv, + CFRange range, + int value, ) { - return _CFLocaleCopyDisplayNameForPropertyValue( - displayLocale, - key, + return _CFBitVectorSetBits( + bv, + range, value, ); } - late final _CFLocaleCopyDisplayNameForPropertyValuePtr = _lookup< + late final _CFBitVectorSetBitsPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFLocaleRef, CFLocaleKey, - CFStringRef)>>('CFLocaleCopyDisplayNameForPropertyValue'); - late final _CFLocaleCopyDisplayNameForPropertyValue = - _CFLocaleCopyDisplayNameForPropertyValuePtr.asFunction< - CFStringRef Function(CFLocaleRef, CFLocaleKey, CFStringRef)>(); - - late final ffi.Pointer - _kCFLocaleCurrentLocaleDidChangeNotification = - _lookup( - 'kCFLocaleCurrentLocaleDidChangeNotification'); + ffi.Void Function( + CFMutableBitVectorRef, CFRange, CFBit)>>('CFBitVectorSetBits'); + late final _CFBitVectorSetBits = _CFBitVectorSetBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, CFRange, int)>(); - CFNotificationName get kCFLocaleCurrentLocaleDidChangeNotification => - _kCFLocaleCurrentLocaleDidChangeNotification.value; + void CFBitVectorSetAllBits( + CFMutableBitVectorRef bv, + int value, + ) { + return _CFBitVectorSetAllBits( + bv, + value, + ); + } - set kCFLocaleCurrentLocaleDidChangeNotification(CFNotificationName value) => - _kCFLocaleCurrentLocaleDidChangeNotification.value = value; + late final _CFBitVectorSetAllBitsPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorSetAllBits'); + late final _CFBitVectorSetAllBits = _CFBitVectorSetAllBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, int)>(); - late final ffi.Pointer _kCFLocaleIdentifier = - _lookup('kCFLocaleIdentifier'); + late final ffi.Pointer + _kCFTypeDictionaryKeyCallBacks = + _lookup('kCFTypeDictionaryKeyCallBacks'); - CFLocaleKey get kCFLocaleIdentifier => _kCFLocaleIdentifier.value; + CFDictionaryKeyCallBacks get kCFTypeDictionaryKeyCallBacks => + _kCFTypeDictionaryKeyCallBacks.ref; - set kCFLocaleIdentifier(CFLocaleKey value) => - _kCFLocaleIdentifier.value = value; + late final ffi.Pointer + _kCFCopyStringDictionaryKeyCallBacks = + _lookup('kCFCopyStringDictionaryKeyCallBacks'); - late final ffi.Pointer _kCFLocaleLanguageCode = - _lookup('kCFLocaleLanguageCode'); + CFDictionaryKeyCallBacks get kCFCopyStringDictionaryKeyCallBacks => + _kCFCopyStringDictionaryKeyCallBacks.ref; - CFLocaleKey get kCFLocaleLanguageCode => _kCFLocaleLanguageCode.value; + late final ffi.Pointer + _kCFTypeDictionaryValueCallBacks = + _lookup('kCFTypeDictionaryValueCallBacks'); - set kCFLocaleLanguageCode(CFLocaleKey value) => - _kCFLocaleLanguageCode.value = value; + CFDictionaryValueCallBacks get kCFTypeDictionaryValueCallBacks => + _kCFTypeDictionaryValueCallBacks.ref; - late final ffi.Pointer _kCFLocaleCountryCode = - _lookup('kCFLocaleCountryCode'); + int CFDictionaryGetTypeID() { + return _CFDictionaryGetTypeID(); + } - CFLocaleKey get kCFLocaleCountryCode => _kCFLocaleCountryCode.value; + late final _CFDictionaryGetTypeIDPtr = + _lookup>('CFDictionaryGetTypeID'); + late final _CFDictionaryGetTypeID = + _CFDictionaryGetTypeIDPtr.asFunction(); - set kCFLocaleCountryCode(CFLocaleKey value) => - _kCFLocaleCountryCode.value = value; + CFDictionaryRef CFDictionaryCreate( + CFAllocatorRef allocator, + ffi.Pointer> keys, + ffi.Pointer> values, + int numValues, + ffi.Pointer keyCallBacks, + ffi.Pointer valueCallBacks, + ) { + return _CFDictionaryCreate( + allocator, + keys, + values, + numValues, + keyCallBacks, + valueCallBacks, + ); + } - late final ffi.Pointer _kCFLocaleScriptCode = - _lookup('kCFLocaleScriptCode'); + late final _CFDictionaryCreatePtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function( + CFAllocatorRef, + ffi.Pointer>, + ffi.Pointer>, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFDictionaryCreate'); + late final _CFDictionaryCreate = _CFDictionaryCreatePtr.asFunction< + CFDictionaryRef Function( + CFAllocatorRef, + ffi.Pointer>, + ffi.Pointer>, + int, + ffi.Pointer, + ffi.Pointer)>(); - CFLocaleKey get kCFLocaleScriptCode => _kCFLocaleScriptCode.value; + CFDictionaryRef CFDictionaryCreateCopy( + CFAllocatorRef allocator, + CFDictionaryRef theDict, + ) { + return _CFDictionaryCreateCopy( + allocator, + theDict, + ); + } - set kCFLocaleScriptCode(CFLocaleKey value) => - _kCFLocaleScriptCode.value = value; + late final _CFDictionaryCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function( + CFAllocatorRef, CFDictionaryRef)>>('CFDictionaryCreateCopy'); + late final _CFDictionaryCreateCopy = _CFDictionaryCreateCopyPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFDictionaryRef)>(); - late final ffi.Pointer _kCFLocaleVariantCode = - _lookup('kCFLocaleVariantCode'); - - CFLocaleKey get kCFLocaleVariantCode => _kCFLocaleVariantCode.value; - - set kCFLocaleVariantCode(CFLocaleKey value) => - _kCFLocaleVariantCode.value = value; - - late final ffi.Pointer _kCFLocaleExemplarCharacterSet = - _lookup('kCFLocaleExemplarCharacterSet'); - - CFLocaleKey get kCFLocaleExemplarCharacterSet => - _kCFLocaleExemplarCharacterSet.value; - - set kCFLocaleExemplarCharacterSet(CFLocaleKey value) => - _kCFLocaleExemplarCharacterSet.value = value; - - late final ffi.Pointer _kCFLocaleCalendarIdentifier = - _lookup('kCFLocaleCalendarIdentifier'); - - CFLocaleKey get kCFLocaleCalendarIdentifier => - _kCFLocaleCalendarIdentifier.value; - - set kCFLocaleCalendarIdentifier(CFLocaleKey value) => - _kCFLocaleCalendarIdentifier.value = value; - - late final ffi.Pointer _kCFLocaleCalendar = - _lookup('kCFLocaleCalendar'); - - CFLocaleKey get kCFLocaleCalendar => _kCFLocaleCalendar.value; - - set kCFLocaleCalendar(CFLocaleKey value) => _kCFLocaleCalendar.value = value; - - late final ffi.Pointer _kCFLocaleCollationIdentifier = - _lookup('kCFLocaleCollationIdentifier'); - - CFLocaleKey get kCFLocaleCollationIdentifier => - _kCFLocaleCollationIdentifier.value; - - set kCFLocaleCollationIdentifier(CFLocaleKey value) => - _kCFLocaleCollationIdentifier.value = value; - - late final ffi.Pointer _kCFLocaleUsesMetricSystem = - _lookup('kCFLocaleUsesMetricSystem'); - - CFLocaleKey get kCFLocaleUsesMetricSystem => _kCFLocaleUsesMetricSystem.value; - - set kCFLocaleUsesMetricSystem(CFLocaleKey value) => - _kCFLocaleUsesMetricSystem.value = value; - - late final ffi.Pointer _kCFLocaleMeasurementSystem = - _lookup('kCFLocaleMeasurementSystem'); - - CFLocaleKey get kCFLocaleMeasurementSystem => - _kCFLocaleMeasurementSystem.value; - - set kCFLocaleMeasurementSystem(CFLocaleKey value) => - _kCFLocaleMeasurementSystem.value = value; - - late final ffi.Pointer _kCFLocaleDecimalSeparator = - _lookup('kCFLocaleDecimalSeparator'); - - CFLocaleKey get kCFLocaleDecimalSeparator => _kCFLocaleDecimalSeparator.value; - - set kCFLocaleDecimalSeparator(CFLocaleKey value) => - _kCFLocaleDecimalSeparator.value = value; - - late final ffi.Pointer _kCFLocaleGroupingSeparator = - _lookup('kCFLocaleGroupingSeparator'); - - CFLocaleKey get kCFLocaleGroupingSeparator => - _kCFLocaleGroupingSeparator.value; - - set kCFLocaleGroupingSeparator(CFLocaleKey value) => - _kCFLocaleGroupingSeparator.value = value; - - late final ffi.Pointer _kCFLocaleCurrencySymbol = - _lookup('kCFLocaleCurrencySymbol'); - - CFLocaleKey get kCFLocaleCurrencySymbol => _kCFLocaleCurrencySymbol.value; - - set kCFLocaleCurrencySymbol(CFLocaleKey value) => - _kCFLocaleCurrencySymbol.value = value; - - late final ffi.Pointer _kCFLocaleCurrencyCode = - _lookup('kCFLocaleCurrencyCode'); - - CFLocaleKey get kCFLocaleCurrencyCode => _kCFLocaleCurrencyCode.value; - - set kCFLocaleCurrencyCode(CFLocaleKey value) => - _kCFLocaleCurrencyCode.value = value; - - late final ffi.Pointer _kCFLocaleCollatorIdentifier = - _lookup('kCFLocaleCollatorIdentifier'); - - CFLocaleKey get kCFLocaleCollatorIdentifier => - _kCFLocaleCollatorIdentifier.value; - - set kCFLocaleCollatorIdentifier(CFLocaleKey value) => - _kCFLocaleCollatorIdentifier.value = value; - - late final ffi.Pointer _kCFLocaleQuotationBeginDelimiterKey = - _lookup('kCFLocaleQuotationBeginDelimiterKey'); - - CFLocaleKey get kCFLocaleQuotationBeginDelimiterKey => - _kCFLocaleQuotationBeginDelimiterKey.value; - - set kCFLocaleQuotationBeginDelimiterKey(CFLocaleKey value) => - _kCFLocaleQuotationBeginDelimiterKey.value = value; - - late final ffi.Pointer _kCFLocaleQuotationEndDelimiterKey = - _lookup('kCFLocaleQuotationEndDelimiterKey'); - - CFLocaleKey get kCFLocaleQuotationEndDelimiterKey => - _kCFLocaleQuotationEndDelimiterKey.value; - - set kCFLocaleQuotationEndDelimiterKey(CFLocaleKey value) => - _kCFLocaleQuotationEndDelimiterKey.value = value; - - late final ffi.Pointer - _kCFLocaleAlternateQuotationBeginDelimiterKey = - _lookup('kCFLocaleAlternateQuotationBeginDelimiterKey'); - - CFLocaleKey get kCFLocaleAlternateQuotationBeginDelimiterKey => - _kCFLocaleAlternateQuotationBeginDelimiterKey.value; - - set kCFLocaleAlternateQuotationBeginDelimiterKey(CFLocaleKey value) => - _kCFLocaleAlternateQuotationBeginDelimiterKey.value = value; - - late final ffi.Pointer - _kCFLocaleAlternateQuotationEndDelimiterKey = - _lookup('kCFLocaleAlternateQuotationEndDelimiterKey'); - - CFLocaleKey get kCFLocaleAlternateQuotationEndDelimiterKey => - _kCFLocaleAlternateQuotationEndDelimiterKey.value; - - set kCFLocaleAlternateQuotationEndDelimiterKey(CFLocaleKey value) => - _kCFLocaleAlternateQuotationEndDelimiterKey.value = value; - - late final ffi.Pointer _kCFGregorianCalendar = - _lookup('kCFGregorianCalendar'); - - CFCalendarIdentifier get kCFGregorianCalendar => _kCFGregorianCalendar.value; - - set kCFGregorianCalendar(CFCalendarIdentifier value) => - _kCFGregorianCalendar.value = value; - - late final ffi.Pointer _kCFBuddhistCalendar = - _lookup('kCFBuddhistCalendar'); - - CFCalendarIdentifier get kCFBuddhistCalendar => _kCFBuddhistCalendar.value; - - set kCFBuddhistCalendar(CFCalendarIdentifier value) => - _kCFBuddhistCalendar.value = value; - - late final ffi.Pointer _kCFChineseCalendar = - _lookup('kCFChineseCalendar'); - - CFCalendarIdentifier get kCFChineseCalendar => _kCFChineseCalendar.value; - - set kCFChineseCalendar(CFCalendarIdentifier value) => - _kCFChineseCalendar.value = value; - - late final ffi.Pointer _kCFHebrewCalendar = - _lookup('kCFHebrewCalendar'); - - CFCalendarIdentifier get kCFHebrewCalendar => _kCFHebrewCalendar.value; - - set kCFHebrewCalendar(CFCalendarIdentifier value) => - _kCFHebrewCalendar.value = value; - - late final ffi.Pointer _kCFIslamicCalendar = - _lookup('kCFIslamicCalendar'); - - CFCalendarIdentifier get kCFIslamicCalendar => _kCFIslamicCalendar.value; - - set kCFIslamicCalendar(CFCalendarIdentifier value) => - _kCFIslamicCalendar.value = value; - - late final ffi.Pointer _kCFIslamicCivilCalendar = - _lookup('kCFIslamicCivilCalendar'); - - CFCalendarIdentifier get kCFIslamicCivilCalendar => - _kCFIslamicCivilCalendar.value; - - set kCFIslamicCivilCalendar(CFCalendarIdentifier value) => - _kCFIslamicCivilCalendar.value = value; - - late final ffi.Pointer _kCFJapaneseCalendar = - _lookup('kCFJapaneseCalendar'); - - CFCalendarIdentifier get kCFJapaneseCalendar => _kCFJapaneseCalendar.value; - - set kCFJapaneseCalendar(CFCalendarIdentifier value) => - _kCFJapaneseCalendar.value = value; - - late final ffi.Pointer _kCFRepublicOfChinaCalendar = - _lookup('kCFRepublicOfChinaCalendar'); - - CFCalendarIdentifier get kCFRepublicOfChinaCalendar => - _kCFRepublicOfChinaCalendar.value; - - set kCFRepublicOfChinaCalendar(CFCalendarIdentifier value) => - _kCFRepublicOfChinaCalendar.value = value; - - late final ffi.Pointer _kCFPersianCalendar = - _lookup('kCFPersianCalendar'); - - CFCalendarIdentifier get kCFPersianCalendar => _kCFPersianCalendar.value; - - set kCFPersianCalendar(CFCalendarIdentifier value) => - _kCFPersianCalendar.value = value; - - late final ffi.Pointer _kCFIndianCalendar = - _lookup('kCFIndianCalendar'); - - CFCalendarIdentifier get kCFIndianCalendar => _kCFIndianCalendar.value; - - set kCFIndianCalendar(CFCalendarIdentifier value) => - _kCFIndianCalendar.value = value; - - late final ffi.Pointer _kCFISO8601Calendar = - _lookup('kCFISO8601Calendar'); - - CFCalendarIdentifier get kCFISO8601Calendar => _kCFISO8601Calendar.value; - - set kCFISO8601Calendar(CFCalendarIdentifier value) => - _kCFISO8601Calendar.value = value; - - late final ffi.Pointer _kCFIslamicTabularCalendar = - _lookup('kCFIslamicTabularCalendar'); - - CFCalendarIdentifier get kCFIslamicTabularCalendar => - _kCFIslamicTabularCalendar.value; - - set kCFIslamicTabularCalendar(CFCalendarIdentifier value) => - _kCFIslamicTabularCalendar.value = value; - - late final ffi.Pointer _kCFIslamicUmmAlQuraCalendar = - _lookup('kCFIslamicUmmAlQuraCalendar'); - - CFCalendarIdentifier get kCFIslamicUmmAlQuraCalendar => - _kCFIslamicUmmAlQuraCalendar.value; - - set kCFIslamicUmmAlQuraCalendar(CFCalendarIdentifier value) => - _kCFIslamicUmmAlQuraCalendar.value = value; - - double CFAbsoluteTimeGetCurrent() { - return _CFAbsoluteTimeGetCurrent(); - } - - late final _CFAbsoluteTimeGetCurrentPtr = - _lookup>( - 'CFAbsoluteTimeGetCurrent'); - late final _CFAbsoluteTimeGetCurrent = - _CFAbsoluteTimeGetCurrentPtr.asFunction(); - - late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1970 = - _lookup('kCFAbsoluteTimeIntervalSince1970'); - - double get kCFAbsoluteTimeIntervalSince1970 => - _kCFAbsoluteTimeIntervalSince1970.value; - - set kCFAbsoluteTimeIntervalSince1970(double value) => - _kCFAbsoluteTimeIntervalSince1970.value = value; - - late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1904 = - _lookup('kCFAbsoluteTimeIntervalSince1904'); - - double get kCFAbsoluteTimeIntervalSince1904 => - _kCFAbsoluteTimeIntervalSince1904.value; - - set kCFAbsoluteTimeIntervalSince1904(double value) => - _kCFAbsoluteTimeIntervalSince1904.value = value; - - int CFDateGetTypeID() { - return _CFDateGetTypeID(); + CFMutableDictionaryRef CFDictionaryCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer keyCallBacks, + ffi.Pointer valueCallBacks, + ) { + return _CFDictionaryCreateMutable( + allocator, + capacity, + keyCallBacks, + valueCallBacks, + ); } - late final _CFDateGetTypeIDPtr = - _lookup>('CFDateGetTypeID'); - late final _CFDateGetTypeID = - _CFDateGetTypeIDPtr.asFunction(); + late final _CFDictionaryCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>( + 'CFDictionaryCreateMutable'); + late final _CFDictionaryCreateMutable = + _CFDictionaryCreateMutablePtr.asFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, + int, + ffi.Pointer, + ffi.Pointer)>(); - CFDateRef CFDateCreate( + CFMutableDictionaryRef CFDictionaryCreateMutableCopy( CFAllocatorRef allocator, - double at, + int capacity, + CFDictionaryRef theDict, ) { - return _CFDateCreate( + return _CFDictionaryCreateMutableCopy( allocator, - at, + capacity, + theDict, ); } - late final _CFDateCreatePtr = _lookup< + late final _CFDictionaryCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - CFDateRef Function(CFAllocatorRef, CFAbsoluteTime)>>('CFDateCreate'); - late final _CFDateCreate = - _CFDateCreatePtr.asFunction(); + CFMutableDictionaryRef Function(CFAllocatorRef, CFIndex, + CFDictionaryRef)>>('CFDictionaryCreateMutableCopy'); + late final _CFDictionaryCreateMutableCopy = + _CFDictionaryCreateMutableCopyPtr.asFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, int, CFDictionaryRef)>(); - double CFDateGetAbsoluteTime( - CFDateRef theDate, + int CFDictionaryGetCount( + CFDictionaryRef theDict, ) { - return _CFDateGetAbsoluteTime( - theDate, + return _CFDictionaryGetCount( + theDict, ); } - late final _CFDateGetAbsoluteTimePtr = - _lookup>( - 'CFDateGetAbsoluteTime'); - late final _CFDateGetAbsoluteTime = - _CFDateGetAbsoluteTimePtr.asFunction(); + late final _CFDictionaryGetCountPtr = + _lookup>( + 'CFDictionaryGetCount'); + late final _CFDictionaryGetCount = + _CFDictionaryGetCountPtr.asFunction(); - double CFDateGetTimeIntervalSinceDate( - CFDateRef theDate, - CFDateRef otherDate, + int CFDictionaryGetCountOfKey( + CFDictionaryRef theDict, + ffi.Pointer key, ) { - return _CFDateGetTimeIntervalSinceDate( - theDate, - otherDate, + return _CFDictionaryGetCountOfKey( + theDict, + key, ); } - late final _CFDateGetTimeIntervalSinceDatePtr = _lookup< - ffi.NativeFunction>( - 'CFDateGetTimeIntervalSinceDate'); - late final _CFDateGetTimeIntervalSinceDate = - _CFDateGetTimeIntervalSinceDatePtr.asFunction< - double Function(CFDateRef, CFDateRef)>(); + late final _CFDictionaryGetCountOfKeyPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryGetCountOfKey'); + late final _CFDictionaryGetCountOfKey = _CFDictionaryGetCountOfKeyPtr + .asFunction)>(); - int CFDateCompare( - CFDateRef theDate, - CFDateRef otherDate, - ffi.Pointer context, + int CFDictionaryGetCountOfValue( + CFDictionaryRef theDict, + ffi.Pointer value, ) { - return _CFDateCompare( - theDate, - otherDate, - context, + return _CFDictionaryGetCountOfValue( + theDict, + value, ); } - late final _CFDateComparePtr = _lookup< + late final _CFDictionaryGetCountOfValuePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - CFDateRef, CFDateRef, ffi.Pointer)>>('CFDateCompare'); - late final _CFDateCompare = _CFDateComparePtr.asFunction< - int Function(CFDateRef, CFDateRef, ffi.Pointer)>(); + CFIndex Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryGetCountOfValue'); + late final _CFDictionaryGetCountOfValue = _CFDictionaryGetCountOfValuePtr + .asFunction)>(); - int CFGregorianDateIsValid( - CFGregorianDate gdate, - int unitFlags, + int CFDictionaryContainsKey( + CFDictionaryRef theDict, + ffi.Pointer key, ) { - return _CFGregorianDateIsValid( - gdate, - unitFlags, + return _CFDictionaryContainsKey( + theDict, + key, ); } - late final _CFGregorianDateIsValidPtr = _lookup< - ffi.NativeFunction>( - 'CFGregorianDateIsValid'); - late final _CFGregorianDateIsValid = _CFGregorianDateIsValidPtr.asFunction< - int Function(CFGregorianDate, int)>(); + late final _CFDictionaryContainsKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryContainsKey'); + late final _CFDictionaryContainsKey = _CFDictionaryContainsKeyPtr.asFunction< + int Function(CFDictionaryRef, ffi.Pointer)>(); - double CFGregorianDateGetAbsoluteTime( - CFGregorianDate gdate, - CFTimeZoneRef tz, + int CFDictionaryContainsValue( + CFDictionaryRef theDict, + ffi.Pointer value, ) { - return _CFGregorianDateGetAbsoluteTime( - gdate, - tz, + return _CFDictionaryContainsValue( + theDict, + value, ); } - late final _CFGregorianDateGetAbsoluteTimePtr = _lookup< + late final _CFDictionaryContainsValuePtr = _lookup< ffi.NativeFunction< - CFAbsoluteTime Function(CFGregorianDate, - CFTimeZoneRef)>>('CFGregorianDateGetAbsoluteTime'); - late final _CFGregorianDateGetAbsoluteTime = - _CFGregorianDateGetAbsoluteTimePtr.asFunction< - double Function(CFGregorianDate, CFTimeZoneRef)>(); + Boolean Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryContainsValue'); + late final _CFDictionaryContainsValue = _CFDictionaryContainsValuePtr + .asFunction)>(); - CFGregorianDate CFAbsoluteTimeGetGregorianDate( - double at, - CFTimeZoneRef tz, + ffi.Pointer CFDictionaryGetValue( + CFDictionaryRef theDict, + ffi.Pointer key, ) { - return _CFAbsoluteTimeGetGregorianDate( - at, - tz, + return _CFDictionaryGetValue( + theDict, + key, ); } - late final _CFAbsoluteTimeGetGregorianDatePtr = _lookup< + late final _CFDictionaryGetValuePtr = _lookup< ffi.NativeFunction< - CFGregorianDate Function(CFAbsoluteTime, - CFTimeZoneRef)>>('CFAbsoluteTimeGetGregorianDate'); - late final _CFAbsoluteTimeGetGregorianDate = - _CFAbsoluteTimeGetGregorianDatePtr.asFunction< - CFGregorianDate Function(double, CFTimeZoneRef)>(); + ffi.Pointer Function( + CFDictionaryRef, ffi.Pointer)>>('CFDictionaryGetValue'); + late final _CFDictionaryGetValue = _CFDictionaryGetValuePtr.asFunction< + ffi.Pointer Function(CFDictionaryRef, ffi.Pointer)>(); - double CFAbsoluteTimeAddGregorianUnits( - double at, - CFTimeZoneRef tz, - CFGregorianUnits units, + int CFDictionaryGetValueIfPresent( + CFDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer> value, ) { - return _CFAbsoluteTimeAddGregorianUnits( - at, - tz, - units, + return _CFDictionaryGetValueIfPresent( + theDict, + key, + value, ); } - late final _CFAbsoluteTimeAddGregorianUnitsPtr = _lookup< - ffi.NativeFunction< - CFAbsoluteTime Function(CFAbsoluteTime, CFTimeZoneRef, - CFGregorianUnits)>>('CFAbsoluteTimeAddGregorianUnits'); - late final _CFAbsoluteTimeAddGregorianUnits = - _CFAbsoluteTimeAddGregorianUnitsPtr.asFunction< - double Function(double, CFTimeZoneRef, CFGregorianUnits)>(); + late final _CFDictionaryGetValueIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDictionaryRef, ffi.Pointer, + ffi.Pointer>)>>( + 'CFDictionaryGetValueIfPresent'); + late final _CFDictionaryGetValueIfPresent = + _CFDictionaryGetValueIfPresentPtr.asFunction< + int Function(CFDictionaryRef, ffi.Pointer, + ffi.Pointer>)>(); - CFGregorianUnits CFAbsoluteTimeGetDifferenceAsGregorianUnits( - double at1, - double at2, - CFTimeZoneRef tz, - int unitFlags, + void CFDictionaryGetKeysAndValues( + CFDictionaryRef theDict, + ffi.Pointer> keys, + ffi.Pointer> values, ) { - return _CFAbsoluteTimeGetDifferenceAsGregorianUnits( - at1, - at2, - tz, - unitFlags, + return _CFDictionaryGetKeysAndValues( + theDict, + keys, + values, ); } - late final _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr = _lookup< - ffi.NativeFunction< - CFGregorianUnits Function( - CFAbsoluteTime, - CFAbsoluteTime, - CFTimeZoneRef, - CFOptionFlags)>>('CFAbsoluteTimeGetDifferenceAsGregorianUnits'); - late final _CFAbsoluteTimeGetDifferenceAsGregorianUnits = - _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr.asFunction< - CFGregorianUnits Function(double, double, CFTimeZoneRef, int)>(); + late final _CFDictionaryGetKeysAndValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFDictionaryRef, + ffi.Pointer>, + ffi.Pointer>)>>( + 'CFDictionaryGetKeysAndValues'); + late final _CFDictionaryGetKeysAndValues = + _CFDictionaryGetKeysAndValuesPtr.asFunction< + void Function(CFDictionaryRef, ffi.Pointer>, + ffi.Pointer>)>(); - int CFAbsoluteTimeGetDayOfWeek( - double at, - CFTimeZoneRef tz, + void CFDictionaryApplyFunction( + CFDictionaryRef theDict, + CFDictionaryApplierFunction applier, + ffi.Pointer context, ) { - return _CFAbsoluteTimeGetDayOfWeek( - at, - tz, + return _CFDictionaryApplyFunction( + theDict, + applier, + context, ); } - late final _CFAbsoluteTimeGetDayOfWeekPtr = _lookup< - ffi.NativeFunction>( - 'CFAbsoluteTimeGetDayOfWeek'); - late final _CFAbsoluteTimeGetDayOfWeek = _CFAbsoluteTimeGetDayOfWeekPtr - .asFunction(); + late final _CFDictionaryApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFDictionaryRef, CFDictionaryApplierFunction, + ffi.Pointer)>>('CFDictionaryApplyFunction'); + late final _CFDictionaryApplyFunction = + _CFDictionaryApplyFunctionPtr.asFunction< + void Function(CFDictionaryRef, CFDictionaryApplierFunction, + ffi.Pointer)>(); - int CFAbsoluteTimeGetDayOfYear( - double at, - CFTimeZoneRef tz, + void CFDictionaryAddValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, ) { - return _CFAbsoluteTimeGetDayOfYear( - at, - tz, + return _CFDictionaryAddValue( + theDict, + key, + value, ); } - late final _CFAbsoluteTimeGetDayOfYearPtr = _lookup< - ffi.NativeFunction>( - 'CFAbsoluteTimeGetDayOfYear'); - late final _CFAbsoluteTimeGetDayOfYear = _CFAbsoluteTimeGetDayOfYearPtr - .asFunction(); + late final _CFDictionaryAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionaryAddValue'); + late final _CFDictionaryAddValue = _CFDictionaryAddValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); - int CFAbsoluteTimeGetWeekOfYear( - double at, - CFTimeZoneRef tz, + void CFDictionarySetValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, ) { - return _CFAbsoluteTimeGetWeekOfYear( - at, - tz, + return _CFDictionarySetValue( + theDict, + key, + value, ); } - late final _CFAbsoluteTimeGetWeekOfYearPtr = _lookup< - ffi.NativeFunction>( - 'CFAbsoluteTimeGetWeekOfYear'); - late final _CFAbsoluteTimeGetWeekOfYear = _CFAbsoluteTimeGetWeekOfYearPtr - .asFunction(); - - int CFDataGetTypeID() { - return _CFDataGetTypeID(); - } - - late final _CFDataGetTypeIDPtr = - _lookup>('CFDataGetTypeID'); - late final _CFDataGetTypeID = - _CFDataGetTypeIDPtr.asFunction(); + late final _CFDictionarySetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionarySetValue'); + late final _CFDictionarySetValue = _CFDictionarySetValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); - CFDataRef CFDataCreate( - CFAllocatorRef allocator, - ffi.Pointer bytes, - int length, + void CFDictionaryReplaceValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, ) { - return _CFDataCreate( - allocator, - bytes, - length, + return _CFDictionaryReplaceValue( + theDict, + key, + value, ); } - late final _CFDataCreatePtr = _lookup< + late final _CFDictionaryReplaceValuePtr = _lookup< ffi.NativeFunction< - CFDataRef Function( - CFAllocatorRef, ffi.Pointer, CFIndex)>>('CFDataCreate'); - late final _CFDataCreate = _CFDataCreatePtr.asFunction< - CFDataRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionaryReplaceValue'); + late final _CFDictionaryReplaceValue = + _CFDictionaryReplaceValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); - CFDataRef CFDataCreateWithBytesNoCopy( - CFAllocatorRef allocator, - ffi.Pointer bytes, - int length, - CFAllocatorRef bytesDeallocator, + void CFDictionaryRemoveValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, ) { - return _CFDataCreateWithBytesNoCopy( - allocator, - bytes, - length, - bytesDeallocator, + return _CFDictionaryRemoveValue( + theDict, + key, ); } - late final _CFDataCreateWithBytesNoCopyPtr = _lookup< + late final _CFDictionaryRemoveValuePtr = _lookup< ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFAllocatorRef)>>('CFDataCreateWithBytesNoCopy'); - late final _CFDataCreateWithBytesNoCopy = - _CFDataCreateWithBytesNoCopyPtr.asFunction< - CFDataRef Function( - CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + ffi.Void Function(CFMutableDictionaryRef, + ffi.Pointer)>>('CFDictionaryRemoveValue'); + late final _CFDictionaryRemoveValue = _CFDictionaryRemoveValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer)>(); - CFDataRef CFDataCreateCopy( - CFAllocatorRef allocator, - CFDataRef theData, + void CFDictionaryRemoveAllValues( + CFMutableDictionaryRef theDict, ) { - return _CFDataCreateCopy( - allocator, - theData, + return _CFDictionaryRemoveAllValues( + theDict, ); } - late final _CFDataCreateCopyPtr = _lookup< - ffi.NativeFunction>( - 'CFDataCreateCopy'); - late final _CFDataCreateCopy = _CFDataCreateCopyPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFDataRef)>(); + late final _CFDictionaryRemoveAllValuesPtr = + _lookup>( + 'CFDictionaryRemoveAllValues'); + late final _CFDictionaryRemoveAllValues = _CFDictionaryRemoveAllValuesPtr + .asFunction(); - CFMutableDataRef CFDataCreateMutable( - CFAllocatorRef allocator, - int capacity, - ) { - return _CFDataCreateMutable( - allocator, - capacity, - ); + int CFNotificationCenterGetTypeID() { + return _CFNotificationCenterGetTypeID(); } - late final _CFDataCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableDataRef Function( - CFAllocatorRef, CFIndex)>>('CFDataCreateMutable'); - late final _CFDataCreateMutable = _CFDataCreateMutablePtr.asFunction< - CFMutableDataRef Function(CFAllocatorRef, int)>(); + late final _CFNotificationCenterGetTypeIDPtr = + _lookup>( + 'CFNotificationCenterGetTypeID'); + late final _CFNotificationCenterGetTypeID = + _CFNotificationCenterGetTypeIDPtr.asFunction(); - CFMutableDataRef CFDataCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFDataRef theData, - ) { - return _CFDataCreateMutableCopy( - allocator, - capacity, - theData, - ); + CFNotificationCenterRef CFNotificationCenterGetLocalCenter() { + return _CFNotificationCenterGetLocalCenter(); } - late final _CFDataCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableDataRef Function( - CFAllocatorRef, CFIndex, CFDataRef)>>('CFDataCreateMutableCopy'); - late final _CFDataCreateMutableCopy = _CFDataCreateMutableCopyPtr.asFunction< - CFMutableDataRef Function(CFAllocatorRef, int, CFDataRef)>(); + late final _CFNotificationCenterGetLocalCenterPtr = + _lookup>( + 'CFNotificationCenterGetLocalCenter'); + late final _CFNotificationCenterGetLocalCenter = + _CFNotificationCenterGetLocalCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); - int CFDataGetLength( - CFDataRef theData, - ) { - return _CFDataGetLength( - theData, - ); + CFNotificationCenterRef CFNotificationCenterGetDistributedCenter() { + return _CFNotificationCenterGetDistributedCenter(); } - late final _CFDataGetLengthPtr = - _lookup>( - 'CFDataGetLength'); - late final _CFDataGetLength = - _CFDataGetLengthPtr.asFunction(); + late final _CFNotificationCenterGetDistributedCenterPtr = + _lookup>( + 'CFNotificationCenterGetDistributedCenter'); + late final _CFNotificationCenterGetDistributedCenter = + _CFNotificationCenterGetDistributedCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); - ffi.Pointer CFDataGetBytePtr( - CFDataRef theData, - ) { - return _CFDataGetBytePtr( - theData, - ); + CFNotificationCenterRef CFNotificationCenterGetDarwinNotifyCenter() { + return _CFNotificationCenterGetDarwinNotifyCenter(); } - late final _CFDataGetBytePtrPtr = - _lookup Function(CFDataRef)>>( - 'CFDataGetBytePtr'); - late final _CFDataGetBytePtr = - _CFDataGetBytePtrPtr.asFunction Function(CFDataRef)>(); + late final _CFNotificationCenterGetDarwinNotifyCenterPtr = + _lookup>( + 'CFNotificationCenterGetDarwinNotifyCenter'); + late final _CFNotificationCenterGetDarwinNotifyCenter = + _CFNotificationCenterGetDarwinNotifyCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); - ffi.Pointer CFDataGetMutableBytePtr( - CFMutableDataRef theData, + void CFNotificationCenterAddObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationCallback callBack, + CFStringRef name, + ffi.Pointer object, + int suspensionBehavior, ) { - return _CFDataGetMutableBytePtr( - theData, + return _CFNotificationCenterAddObserver( + center, + observer, + callBack, + name, + object, + suspensionBehavior, ); } - late final _CFDataGetMutableBytePtrPtr = _lookup< - ffi.NativeFunction Function(CFMutableDataRef)>>( - 'CFDataGetMutableBytePtr'); - late final _CFDataGetMutableBytePtr = _CFDataGetMutableBytePtrPtr.asFunction< - ffi.Pointer Function(CFMutableDataRef)>(); + late final _CFNotificationCenterAddObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationCallback, + CFStringRef, + ffi.Pointer, + ffi.Int32)>>('CFNotificationCenterAddObserver'); + late final _CFNotificationCenterAddObserver = + _CFNotificationCenterAddObserverPtr.asFunction< + void Function( + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationCallback, + CFStringRef, + ffi.Pointer, + int)>(); - void CFDataGetBytes( - CFDataRef theData, - CFRange range, - ffi.Pointer buffer, + void CFNotificationCenterRemoveObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationName name, + ffi.Pointer object, ) { - return _CFDataGetBytes( - theData, - range, - buffer, + return _CFNotificationCenterRemoveObserver( + center, + observer, + name, + object, ); } - late final _CFDataGetBytesPtr = _lookup< + late final _CFNotificationCenterRemoveObserverPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - CFDataRef, CFRange, ffi.Pointer)>>('CFDataGetBytes'); - late final _CFDataGetBytes = _CFDataGetBytesPtr.asFunction< - void Function(CFDataRef, CFRange, ffi.Pointer)>(); + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationName, + ffi.Pointer)>>('CFNotificationCenterRemoveObserver'); + late final _CFNotificationCenterRemoveObserver = + _CFNotificationCenterRemoveObserverPtr.asFunction< + void Function(CFNotificationCenterRef, ffi.Pointer, + CFNotificationName, ffi.Pointer)>(); - void CFDataSetLength( - CFMutableDataRef theData, - int length, + void CFNotificationCenterRemoveEveryObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, ) { - return _CFDataSetLength( - theData, - length, + return _CFNotificationCenterRemoveEveryObserver( + center, + observer, ); } - late final _CFDataSetLengthPtr = - _lookup>( - 'CFDataSetLength'); - late final _CFDataSetLength = - _CFDataSetLengthPtr.asFunction(); + late final _CFNotificationCenterRemoveEveryObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, ffi.Pointer)>>( + 'CFNotificationCenterRemoveEveryObserver'); + late final _CFNotificationCenterRemoveEveryObserver = + _CFNotificationCenterRemoveEveryObserverPtr.asFunction< + void Function(CFNotificationCenterRef, ffi.Pointer)>(); - void CFDataIncreaseLength( - CFMutableDataRef theData, - int extraLength, + void CFNotificationCenterPostNotification( + CFNotificationCenterRef center, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo, + int deliverImmediately, ) { - return _CFDataIncreaseLength( - theData, - extraLength, + return _CFNotificationCenterPostNotification( + center, + name, + object, + userInfo, + deliverImmediately, ); } - late final _CFDataIncreaseLengthPtr = - _lookup>( - 'CFDataIncreaseLength'); - late final _CFDataIncreaseLength = _CFDataIncreaseLengthPtr.asFunction< - void Function(CFMutableDataRef, int)>(); + late final _CFNotificationCenterPostNotificationPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, + CFNotificationName, + ffi.Pointer, + CFDictionaryRef, + Boolean)>>('CFNotificationCenterPostNotification'); + late final _CFNotificationCenterPostNotification = + _CFNotificationCenterPostNotificationPtr.asFunction< + void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, int)>(); - void CFDataAppendBytes( - CFMutableDataRef theData, - ffi.Pointer bytes, - int length, + void CFNotificationCenterPostNotificationWithOptions( + CFNotificationCenterRef center, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo, + int options, ) { - return _CFDataAppendBytes( - theData, - bytes, - length, + return _CFNotificationCenterPostNotificationWithOptions( + center, + name, + object, + userInfo, + options, ); } - late final _CFDataAppendBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableDataRef, ffi.Pointer, - CFIndex)>>('CFDataAppendBytes'); - late final _CFDataAppendBytes = _CFDataAppendBytesPtr.asFunction< - void Function(CFMutableDataRef, ffi.Pointer, int)>(); + late final _CFNotificationCenterPostNotificationWithOptionsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, CFOptionFlags)>>( + 'CFNotificationCenterPostNotificationWithOptions'); + late final _CFNotificationCenterPostNotificationWithOptions = + _CFNotificationCenterPostNotificationWithOptionsPtr.asFunction< + void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, int)>(); - void CFDataReplaceBytes( - CFMutableDataRef theData, - CFRange range, - ffi.Pointer newBytes, - int newLength, - ) { - return _CFDataReplaceBytes( - theData, - range, - newBytes, - newLength, - ); + int CFLocaleGetTypeID() { + return _CFLocaleGetTypeID(); } - late final _CFDataReplaceBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableDataRef, CFRange, ffi.Pointer, - CFIndex)>>('CFDataReplaceBytes'); - late final _CFDataReplaceBytes = _CFDataReplaceBytesPtr.asFunction< - void Function(CFMutableDataRef, CFRange, ffi.Pointer, int)>(); + late final _CFLocaleGetTypeIDPtr = + _lookup>('CFLocaleGetTypeID'); + late final _CFLocaleGetTypeID = + _CFLocaleGetTypeIDPtr.asFunction(); - void CFDataDeleteBytes( - CFMutableDataRef theData, - CFRange range, - ) { - return _CFDataDeleteBytes( - theData, - range, - ); + CFLocaleRef CFLocaleGetSystem() { + return _CFLocaleGetSystem(); } - late final _CFDataDeleteBytesPtr = - _lookup>( - 'CFDataDeleteBytes'); - late final _CFDataDeleteBytes = _CFDataDeleteBytesPtr.asFunction< - void Function(CFMutableDataRef, CFRange)>(); + late final _CFLocaleGetSystemPtr = + _lookup>('CFLocaleGetSystem'); + late final _CFLocaleGetSystem = + _CFLocaleGetSystemPtr.asFunction(); - CFRange CFDataFind( - CFDataRef theData, - CFDataRef dataToFind, - CFRange searchRange, - int compareOptions, - ) { - return _CFDataFind( - theData, - dataToFind, - searchRange, - compareOptions, - ); + CFLocaleRef CFLocaleCopyCurrent() { + return _CFLocaleCopyCurrent(); } - late final _CFDataFindPtr = _lookup< - ffi.NativeFunction< - CFRange Function( - CFDataRef, CFDataRef, CFRange, ffi.Int32)>>('CFDataFind'); - late final _CFDataFind = _CFDataFindPtr.asFunction< - CFRange Function(CFDataRef, CFDataRef, CFRange, int)>(); + late final _CFLocaleCopyCurrentPtr = + _lookup>( + 'CFLocaleCopyCurrent'); + late final _CFLocaleCopyCurrent = + _CFLocaleCopyCurrentPtr.asFunction(); - int CFCharacterSetGetTypeID() { - return _CFCharacterSetGetTypeID(); + CFArrayRef CFLocaleCopyAvailableLocaleIdentifiers() { + return _CFLocaleCopyAvailableLocaleIdentifiers(); } - late final _CFCharacterSetGetTypeIDPtr = - _lookup>( - 'CFCharacterSetGetTypeID'); - late final _CFCharacterSetGetTypeID = - _CFCharacterSetGetTypeIDPtr.asFunction(); + late final _CFLocaleCopyAvailableLocaleIdentifiersPtr = + _lookup>( + 'CFLocaleCopyAvailableLocaleIdentifiers'); + late final _CFLocaleCopyAvailableLocaleIdentifiers = + _CFLocaleCopyAvailableLocaleIdentifiersPtr.asFunction< + CFArrayRef Function()>(); - CFCharacterSetRef CFCharacterSetGetPredefined( - int theSetIdentifier, - ) { - return _CFCharacterSetGetPredefined( - theSetIdentifier, - ); + CFArrayRef CFLocaleCopyISOLanguageCodes() { + return _CFLocaleCopyISOLanguageCodes(); } - late final _CFCharacterSetGetPredefinedPtr = - _lookup>( - 'CFCharacterSetGetPredefined'); - late final _CFCharacterSetGetPredefined = _CFCharacterSetGetPredefinedPtr - .asFunction(); + late final _CFLocaleCopyISOLanguageCodesPtr = + _lookup>( + 'CFLocaleCopyISOLanguageCodes'); + late final _CFLocaleCopyISOLanguageCodes = + _CFLocaleCopyISOLanguageCodesPtr.asFunction(); - CFCharacterSetRef CFCharacterSetCreateWithCharactersInRange( - CFAllocatorRef alloc, - CFRange theRange, - ) { - return _CFCharacterSetCreateWithCharactersInRange( - alloc, - theRange, - ); + CFArrayRef CFLocaleCopyISOCountryCodes() { + return _CFLocaleCopyISOCountryCodes(); } - late final _CFCharacterSetCreateWithCharactersInRangePtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFRange)>>('CFCharacterSetCreateWithCharactersInRange'); - late final _CFCharacterSetCreateWithCharactersInRange = - _CFCharacterSetCreateWithCharactersInRangePtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFRange)>(); + late final _CFLocaleCopyISOCountryCodesPtr = + _lookup>( + 'CFLocaleCopyISOCountryCodes'); + late final _CFLocaleCopyISOCountryCodes = + _CFLocaleCopyISOCountryCodesPtr.asFunction(); - CFCharacterSetRef CFCharacterSetCreateWithCharactersInString( - CFAllocatorRef alloc, - CFStringRef theString, - ) { - return _CFCharacterSetCreateWithCharactersInString( - alloc, - theString, - ); + CFArrayRef CFLocaleCopyISOCurrencyCodes() { + return _CFLocaleCopyISOCurrencyCodes(); } - late final _CFCharacterSetCreateWithCharactersInStringPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFStringRef)>>('CFCharacterSetCreateWithCharactersInString'); - late final _CFCharacterSetCreateWithCharactersInString = - _CFCharacterSetCreateWithCharactersInStringPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFStringRef)>(); + late final _CFLocaleCopyISOCurrencyCodesPtr = + _lookup>( + 'CFLocaleCopyISOCurrencyCodes'); + late final _CFLocaleCopyISOCurrencyCodes = + _CFLocaleCopyISOCurrencyCodesPtr.asFunction(); - CFCharacterSetRef CFCharacterSetCreateWithBitmapRepresentation( - CFAllocatorRef alloc, - CFDataRef theData, - ) { - return _CFCharacterSetCreateWithBitmapRepresentation( - alloc, - theData, - ); + CFArrayRef CFLocaleCopyCommonISOCurrencyCodes() { + return _CFLocaleCopyCommonISOCurrencyCodes(); } - late final _CFCharacterSetCreateWithBitmapRepresentationPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFDataRef)>>('CFCharacterSetCreateWithBitmapRepresentation'); - late final _CFCharacterSetCreateWithBitmapRepresentation = - _CFCharacterSetCreateWithBitmapRepresentationPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFDataRef)>(); + late final _CFLocaleCopyCommonISOCurrencyCodesPtr = + _lookup>( + 'CFLocaleCopyCommonISOCurrencyCodes'); + late final _CFLocaleCopyCommonISOCurrencyCodes = + _CFLocaleCopyCommonISOCurrencyCodesPtr.asFunction< + CFArrayRef Function()>(); - CFCharacterSetRef CFCharacterSetCreateInvertedSet( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, - ) { - return _CFCharacterSetCreateInvertedSet( - alloc, - theSet, - ); + CFArrayRef CFLocaleCopyPreferredLanguages() { + return _CFLocaleCopyPreferredLanguages(); } - late final _CFCharacterSetCreateInvertedSetPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFCharacterSetRef)>>('CFCharacterSetCreateInvertedSet'); - late final _CFCharacterSetCreateInvertedSet = - _CFCharacterSetCreateInvertedSetPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + late final _CFLocaleCopyPreferredLanguagesPtr = + _lookup>( + 'CFLocaleCopyPreferredLanguages'); + late final _CFLocaleCopyPreferredLanguages = + _CFLocaleCopyPreferredLanguagesPtr.asFunction(); - int CFCharacterSetIsSupersetOfSet( - CFCharacterSetRef theSet, - CFCharacterSetRef theOtherset, + CFLocaleIdentifier CFLocaleCreateCanonicalLanguageIdentifierFromString( + CFAllocatorRef allocator, + CFStringRef localeIdentifier, ) { - return _CFCharacterSetIsSupersetOfSet( - theSet, - theOtherset, + return _CFLocaleCreateCanonicalLanguageIdentifierFromString( + allocator, + localeIdentifier, ); } - late final _CFCharacterSetIsSupersetOfSetPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFCharacterSetRef, - CFCharacterSetRef)>>('CFCharacterSetIsSupersetOfSet'); - late final _CFCharacterSetIsSupersetOfSet = _CFCharacterSetIsSupersetOfSetPtr - .asFunction(); + late final _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( + 'CFLocaleCreateCanonicalLanguageIdentifierFromString'); + late final _CFLocaleCreateCanonicalLanguageIdentifierFromString = + _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); - int CFCharacterSetHasMemberInPlane( - CFCharacterSetRef theSet, - int thePlane, + CFLocaleIdentifier CFLocaleCreateCanonicalLocaleIdentifierFromString( + CFAllocatorRef allocator, + CFStringRef localeIdentifier, ) { - return _CFCharacterSetHasMemberInPlane( - theSet, - thePlane, + return _CFLocaleCreateCanonicalLocaleIdentifierFromString( + allocator, + localeIdentifier, ); } - late final _CFCharacterSetHasMemberInPlanePtr = - _lookup>( - 'CFCharacterSetHasMemberInPlane'); - late final _CFCharacterSetHasMemberInPlane = - _CFCharacterSetHasMemberInPlanePtr.asFunction< - int Function(CFCharacterSetRef, int)>(); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( + 'CFLocaleCreateCanonicalLocaleIdentifierFromString'); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromString = + _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); - CFMutableCharacterSetRef CFCharacterSetCreateMutable( - CFAllocatorRef alloc, + CFLocaleIdentifier + CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + CFAllocatorRef allocator, + int lcode, + int rcode, ) { - return _CFCharacterSetCreateMutable( - alloc, + return _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + allocator, + lcode, + rcode, ); } - late final _CFCharacterSetCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableCharacterSetRef Function( - CFAllocatorRef)>>('CFCharacterSetCreateMutable'); - late final _CFCharacterSetCreateMutable = _CFCharacterSetCreateMutablePtr - .asFunction(); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr = + _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function( + CFAllocatorRef, LangCode, RegionCode)>>( + 'CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes'); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes = + _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr + .asFunction(); - CFCharacterSetRef CFCharacterSetCreateCopy( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, + CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + CFAllocatorRef allocator, + int lcid, ) { - return _CFCharacterSetCreateCopy( - alloc, - theSet, + return _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + allocator, + lcid, ); } - late final _CFCharacterSetCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function( - CFAllocatorRef, CFCharacterSetRef)>>('CFCharacterSetCreateCopy'); - late final _CFCharacterSetCreateCopy = - _CFCharacterSetCreateCopyPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, ffi.Uint32)>>( + 'CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode'); + late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode = + _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, int)>(); - CFMutableCharacterSetRef CFCharacterSetCreateMutableCopy( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, + int CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( + CFLocaleIdentifier localeIdentifier, ) { - return _CFCharacterSetCreateMutableCopy( - alloc, - theSet, + return _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( + localeIdentifier, ); } - late final _CFCharacterSetCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableCharacterSetRef Function(CFAllocatorRef, - CFCharacterSetRef)>>('CFCharacterSetCreateMutableCopy'); - late final _CFCharacterSetCreateMutableCopy = - _CFCharacterSetCreateMutableCopyPtr.asFunction< - CFMutableCharacterSetRef Function( - CFAllocatorRef, CFCharacterSetRef)>(); + late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr = + _lookup>( + 'CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier'); + late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier = + _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr.asFunction< + int Function(CFLocaleIdentifier)>(); - int CFCharacterSetIsCharacterMember( - CFCharacterSetRef theSet, - int theChar, + int CFLocaleGetLanguageCharacterDirection( + CFStringRef isoLangCode, ) { - return _CFCharacterSetIsCharacterMember( - theSet, - theChar, + return _CFLocaleGetLanguageCharacterDirection( + isoLangCode, ); } - late final _CFCharacterSetIsCharacterMemberPtr = - _lookup>( - 'CFCharacterSetIsCharacterMember'); - late final _CFCharacterSetIsCharacterMember = - _CFCharacterSetIsCharacterMemberPtr.asFunction< - int Function(CFCharacterSetRef, int)>(); + late final _CFLocaleGetLanguageCharacterDirectionPtr = + _lookup>( + 'CFLocaleGetLanguageCharacterDirection'); + late final _CFLocaleGetLanguageCharacterDirection = + _CFLocaleGetLanguageCharacterDirectionPtr.asFunction< + int Function(CFStringRef)>(); - int CFCharacterSetIsLongCharacterMember( - CFCharacterSetRef theSet, - int theChar, + int CFLocaleGetLanguageLineDirection( + CFStringRef isoLangCode, ) { - return _CFCharacterSetIsLongCharacterMember( - theSet, - theChar, + return _CFLocaleGetLanguageLineDirection( + isoLangCode, ); } - late final _CFCharacterSetIsLongCharacterMemberPtr = _lookup< - ffi.NativeFunction>( - 'CFCharacterSetIsLongCharacterMember'); - late final _CFCharacterSetIsLongCharacterMember = - _CFCharacterSetIsLongCharacterMemberPtr.asFunction< - int Function(CFCharacterSetRef, int)>(); + late final _CFLocaleGetLanguageLineDirectionPtr = + _lookup>( + 'CFLocaleGetLanguageLineDirection'); + late final _CFLocaleGetLanguageLineDirection = + _CFLocaleGetLanguageLineDirectionPtr.asFunction< + int Function(CFStringRef)>(); - CFDataRef CFCharacterSetCreateBitmapRepresentation( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, + CFDictionaryRef CFLocaleCreateComponentsFromLocaleIdentifier( + CFAllocatorRef allocator, + CFLocaleIdentifier localeID, ) { - return _CFCharacterSetCreateBitmapRepresentation( - alloc, - theSet, + return _CFLocaleCreateComponentsFromLocaleIdentifier( + allocator, + localeID, ); } - late final _CFCharacterSetCreateBitmapRepresentationPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, - CFCharacterSetRef)>>('CFCharacterSetCreateBitmapRepresentation'); - late final _CFCharacterSetCreateBitmapRepresentation = - _CFCharacterSetCreateBitmapRepresentationPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + late final _CFLocaleCreateComponentsFromLocaleIdentifierPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>>( + 'CFLocaleCreateComponentsFromLocaleIdentifier'); + late final _CFLocaleCreateComponentsFromLocaleIdentifier = + _CFLocaleCreateComponentsFromLocaleIdentifierPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); - void CFCharacterSetAddCharactersInRange( - CFMutableCharacterSetRef theSet, - CFRange theRange, + CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromComponents( + CFAllocatorRef allocator, + CFDictionaryRef dictionary, ) { - return _CFCharacterSetAddCharactersInRange( - theSet, - theRange, + return _CFLocaleCreateLocaleIdentifierFromComponents( + allocator, + dictionary, ); } - late final _CFCharacterSetAddCharactersInRangePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFRange)>>('CFCharacterSetAddCharactersInRange'); - late final _CFCharacterSetAddCharactersInRange = - _CFCharacterSetAddCharactersInRangePtr.asFunction< - void Function(CFMutableCharacterSetRef, CFRange)>(); + late final _CFLocaleCreateLocaleIdentifierFromComponentsPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>>( + 'CFLocaleCreateLocaleIdentifierFromComponents'); + late final _CFLocaleCreateLocaleIdentifierFromComponents = + _CFLocaleCreateLocaleIdentifierFromComponentsPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>(); - void CFCharacterSetRemoveCharactersInRange( - CFMutableCharacterSetRef theSet, - CFRange theRange, + CFLocaleRef CFLocaleCreate( + CFAllocatorRef allocator, + CFLocaleIdentifier localeIdentifier, ) { - return _CFCharacterSetRemoveCharactersInRange( - theSet, - theRange, + return _CFLocaleCreate( + allocator, + localeIdentifier, ); } - late final _CFCharacterSetRemoveCharactersInRangePtr = _lookup< + late final _CFLocaleCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFRange)>>('CFCharacterSetRemoveCharactersInRange'); - late final _CFCharacterSetRemoveCharactersInRange = - _CFCharacterSetRemoveCharactersInRangePtr.asFunction< - void Function(CFMutableCharacterSetRef, CFRange)>(); + CFLocaleRef Function( + CFAllocatorRef, CFLocaleIdentifier)>>('CFLocaleCreate'); + late final _CFLocaleCreate = _CFLocaleCreatePtr.asFunction< + CFLocaleRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); - void CFCharacterSetAddCharactersInString( - CFMutableCharacterSetRef theSet, - CFStringRef theString, + CFLocaleRef CFLocaleCreateCopy( + CFAllocatorRef allocator, + CFLocaleRef locale, ) { - return _CFCharacterSetAddCharactersInString( - theSet, - theString, + return _CFLocaleCreateCopy( + allocator, + locale, ); } - late final _CFCharacterSetAddCharactersInStringPtr = _lookup< + late final _CFLocaleCreateCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFStringRef)>>('CFCharacterSetAddCharactersInString'); - late final _CFCharacterSetAddCharactersInString = - _CFCharacterSetAddCharactersInStringPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFStringRef)>(); + CFLocaleRef Function( + CFAllocatorRef, CFLocaleRef)>>('CFLocaleCreateCopy'); + late final _CFLocaleCreateCopy = _CFLocaleCreateCopyPtr.asFunction< + CFLocaleRef Function(CFAllocatorRef, CFLocaleRef)>(); - void CFCharacterSetRemoveCharactersInString( - CFMutableCharacterSetRef theSet, - CFStringRef theString, + CFLocaleIdentifier CFLocaleGetIdentifier( + CFLocaleRef locale, ) { - return _CFCharacterSetRemoveCharactersInString( - theSet, - theString, + return _CFLocaleGetIdentifier( + locale, ); } - late final _CFCharacterSetRemoveCharactersInStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFStringRef)>>('CFCharacterSetRemoveCharactersInString'); - late final _CFCharacterSetRemoveCharactersInString = - _CFCharacterSetRemoveCharactersInStringPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFStringRef)>(); + late final _CFLocaleGetIdentifierPtr = + _lookup>( + 'CFLocaleGetIdentifier'); + late final _CFLocaleGetIdentifier = _CFLocaleGetIdentifierPtr.asFunction< + CFLocaleIdentifier Function(CFLocaleRef)>(); - void CFCharacterSetUnion( - CFMutableCharacterSetRef theSet, - CFCharacterSetRef theOtherSet, + CFTypeRef CFLocaleGetValue( + CFLocaleRef locale, + CFLocaleKey key, ) { - return _CFCharacterSetUnion( - theSet, - theOtherSet, + return _CFLocaleGetValue( + locale, + key, ); } - late final _CFCharacterSetUnionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFCharacterSetRef)>>('CFCharacterSetUnion'); - late final _CFCharacterSetUnion = _CFCharacterSetUnionPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); + late final _CFLocaleGetValuePtr = + _lookup>( + 'CFLocaleGetValue'); + late final _CFLocaleGetValue = _CFLocaleGetValuePtr.asFunction< + CFTypeRef Function(CFLocaleRef, CFLocaleKey)>(); - void CFCharacterSetIntersect( - CFMutableCharacterSetRef theSet, - CFCharacterSetRef theOtherSet, + CFStringRef CFLocaleCopyDisplayNameForPropertyValue( + CFLocaleRef displayLocale, + CFLocaleKey key, + CFStringRef value, ) { - return _CFCharacterSetIntersect( - theSet, - theOtherSet, + return _CFLocaleCopyDisplayNameForPropertyValue( + displayLocale, + key, + value, ); } - late final _CFCharacterSetIntersectPtr = _lookup< + late final _CFLocaleCopyDisplayNameForPropertyValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFCharacterSetRef)>>('CFCharacterSetIntersect'); - late final _CFCharacterSetIntersect = _CFCharacterSetIntersectPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); + CFStringRef Function(CFLocaleRef, CFLocaleKey, + CFStringRef)>>('CFLocaleCopyDisplayNameForPropertyValue'); + late final _CFLocaleCopyDisplayNameForPropertyValue = + _CFLocaleCopyDisplayNameForPropertyValuePtr.asFunction< + CFStringRef Function(CFLocaleRef, CFLocaleKey, CFStringRef)>(); - void CFCharacterSetInvert( - CFMutableCharacterSetRef theSet, - ) { - return _CFCharacterSetInvert( - theSet, - ); - } + late final ffi.Pointer + _kCFLocaleCurrentLocaleDidChangeNotification = + _lookup( + 'kCFLocaleCurrentLocaleDidChangeNotification'); - late final _CFCharacterSetInvertPtr = - _lookup>( - 'CFCharacterSetInvert'); - late final _CFCharacterSetInvert = _CFCharacterSetInvertPtr.asFunction< - void Function(CFMutableCharacterSetRef)>(); + CFNotificationName get kCFLocaleCurrentLocaleDidChangeNotification => + _kCFLocaleCurrentLocaleDidChangeNotification.value; - int CFStringGetTypeID() { - return _CFStringGetTypeID(); - } + set kCFLocaleCurrentLocaleDidChangeNotification(CFNotificationName value) => + _kCFLocaleCurrentLocaleDidChangeNotification.value = value; - late final _CFStringGetTypeIDPtr = - _lookup>('CFStringGetTypeID'); - late final _CFStringGetTypeID = - _CFStringGetTypeIDPtr.asFunction(); + late final ffi.Pointer _kCFLocaleIdentifier = + _lookup('kCFLocaleIdentifier'); - CFStringRef CFStringCreateWithPascalString( - CFAllocatorRef alloc, - ConstStr255Param pStr, - int encoding, - ) { - return _CFStringCreateWithPascalString( - alloc, - pStr, - encoding, - ); - } + CFLocaleKey get kCFLocaleIdentifier => _kCFLocaleIdentifier.value; - late final _CFStringCreateWithPascalStringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ConstStr255Param, - CFStringEncoding)>>('CFStringCreateWithPascalString'); - late final _CFStringCreateWithPascalString = - _CFStringCreateWithPascalStringPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ConstStr255Param, int)>(); + set kCFLocaleIdentifier(CFLocaleKey value) => + _kCFLocaleIdentifier.value = value; - CFStringRef CFStringCreateWithCString( - CFAllocatorRef alloc, - ffi.Pointer cStr, - int encoding, - ) { - return _CFStringCreateWithCString( - alloc, - cStr, - encoding, - ); - } + late final ffi.Pointer _kCFLocaleLanguageCode = + _lookup('kCFLocaleLanguageCode'); - late final _CFStringCreateWithCStringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, - CFStringEncoding)>>('CFStringCreateWithCString'); - late final _CFStringCreateWithCString = - _CFStringCreateWithCStringPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + CFLocaleKey get kCFLocaleLanguageCode => _kCFLocaleLanguageCode.value; - CFStringRef CFStringCreateWithBytes( - CFAllocatorRef alloc, - ffi.Pointer bytes, - int numBytes, - int encoding, - int isExternalRepresentation, - ) { - return _CFStringCreateWithBytes( - alloc, - bytes, - numBytes, - encoding, - isExternalRepresentation, - ); - } + set kCFLocaleLanguageCode(CFLocaleKey value) => + _kCFLocaleLanguageCode.value = value; - late final _CFStringCreateWithBytesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFStringEncoding, Boolean)>>('CFStringCreateWithBytes'); - late final _CFStringCreateWithBytes = _CFStringCreateWithBytesPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, ffi.Pointer, int, int, int)>(); + late final ffi.Pointer _kCFLocaleCountryCode = + _lookup('kCFLocaleCountryCode'); - CFStringRef CFStringCreateWithCharacters( - CFAllocatorRef alloc, - ffi.Pointer chars, - int numChars, - ) { - return _CFStringCreateWithCharacters( - alloc, - chars, - numChars, - ); - } + CFLocaleKey get kCFLocaleCountryCode => _kCFLocaleCountryCode.value; - late final _CFStringCreateWithCharactersPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex)>>('CFStringCreateWithCharacters'); - late final _CFStringCreateWithCharacters = - _CFStringCreateWithCharactersPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + set kCFLocaleCountryCode(CFLocaleKey value) => + _kCFLocaleCountryCode.value = value; - CFStringRef CFStringCreateWithPascalStringNoCopy( - CFAllocatorRef alloc, - ConstStr255Param pStr, - int encoding, - CFAllocatorRef contentsDeallocator, - ) { - return _CFStringCreateWithPascalStringNoCopy( - alloc, - pStr, - encoding, - contentsDeallocator, - ); - } + late final ffi.Pointer _kCFLocaleScriptCode = + _lookup('kCFLocaleScriptCode'); - late final _CFStringCreateWithPascalStringNoCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, - ConstStr255Param, - CFStringEncoding, - CFAllocatorRef)>>('CFStringCreateWithPascalStringNoCopy'); - late final _CFStringCreateWithPascalStringNoCopy = - _CFStringCreateWithPascalStringNoCopyPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, ConstStr255Param, int, CFAllocatorRef)>(); + CFLocaleKey get kCFLocaleScriptCode => _kCFLocaleScriptCode.value; - CFStringRef CFStringCreateWithCStringNoCopy( - CFAllocatorRef alloc, - ffi.Pointer cStr, - int encoding, - CFAllocatorRef contentsDeallocator, - ) { - return _CFStringCreateWithCStringNoCopy( - alloc, - cStr, - encoding, - contentsDeallocator, - ); - } + set kCFLocaleScriptCode(CFLocaleKey value) => + _kCFLocaleScriptCode.value = value; - late final _CFStringCreateWithCStringNoCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, - ffi.Pointer, - CFStringEncoding, - CFAllocatorRef)>>('CFStringCreateWithCStringNoCopy'); - late final _CFStringCreateWithCStringNoCopy = - _CFStringCreateWithCStringNoCopyPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + late final ffi.Pointer _kCFLocaleVariantCode = + _lookup('kCFLocaleVariantCode'); - CFStringRef CFStringCreateWithBytesNoCopy( - CFAllocatorRef alloc, - ffi.Pointer bytes, - int numBytes, - int encoding, - int isExternalRepresentation, - CFAllocatorRef contentsDeallocator, - ) { - return _CFStringCreateWithBytesNoCopy( - alloc, - bytes, - numBytes, - encoding, - isExternalRepresentation, - contentsDeallocator, - ); - } + CFLocaleKey get kCFLocaleVariantCode => _kCFLocaleVariantCode.value; - late final _CFStringCreateWithBytesNoCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, - ffi.Pointer, - CFIndex, - CFStringEncoding, - Boolean, - CFAllocatorRef)>>('CFStringCreateWithBytesNoCopy'); - late final _CFStringCreateWithBytesNoCopy = - _CFStringCreateWithBytesNoCopyPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, int, int, - int, CFAllocatorRef)>(); + set kCFLocaleVariantCode(CFLocaleKey value) => + _kCFLocaleVariantCode.value = value; - CFStringRef CFStringCreateWithCharactersNoCopy( - CFAllocatorRef alloc, - ffi.Pointer chars, - int numChars, - CFAllocatorRef contentsDeallocator, - ) { - return _CFStringCreateWithCharactersNoCopy( - alloc, - chars, - numChars, - contentsDeallocator, - ); - } + late final ffi.Pointer _kCFLocaleExemplarCharacterSet = + _lookup('kCFLocaleExemplarCharacterSet'); - late final _CFStringCreateWithCharactersNoCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFAllocatorRef)>>('CFStringCreateWithCharactersNoCopy'); - late final _CFStringCreateWithCharactersNoCopy = - _CFStringCreateWithCharactersNoCopyPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + CFLocaleKey get kCFLocaleExemplarCharacterSet => + _kCFLocaleExemplarCharacterSet.value; - CFStringRef CFStringCreateWithSubstring( - CFAllocatorRef alloc, - CFStringRef str, - CFRange range, - ) { - return _CFStringCreateWithSubstring( - alloc, - str, - range, - ); - } + set kCFLocaleExemplarCharacterSet(CFLocaleKey value) => + _kCFLocaleExemplarCharacterSet.value = value; - late final _CFStringCreateWithSubstringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFRange)>>('CFStringCreateWithSubstring'); - late final _CFStringCreateWithSubstring = _CFStringCreateWithSubstringPtr - .asFunction(); + late final ffi.Pointer _kCFLocaleCalendarIdentifier = + _lookup('kCFLocaleCalendarIdentifier'); - CFStringRef CFStringCreateCopy( - CFAllocatorRef alloc, - CFStringRef theString, - ) { - return _CFStringCreateCopy( - alloc, - theString, - ); - } + CFLocaleKey get kCFLocaleCalendarIdentifier => + _kCFLocaleCalendarIdentifier.value; - late final _CFStringCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef)>>('CFStringCreateCopy'); - late final _CFStringCreateCopy = _CFStringCreateCopyPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef)>(); + set kCFLocaleCalendarIdentifier(CFLocaleKey value) => + _kCFLocaleCalendarIdentifier.value = value; - CFStringRef CFStringCreateWithFormat( - CFAllocatorRef alloc, - CFDictionaryRef formatOptions, - CFStringRef format, - ) { - return _CFStringCreateWithFormat( - alloc, - formatOptions, - format, - ); - } + late final ffi.Pointer _kCFLocaleCalendar = + _lookup('kCFLocaleCalendar'); - late final _CFStringCreateWithFormatPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, - CFStringRef)>>('CFStringCreateWithFormat'); - late final _CFStringCreateWithFormat = - _CFStringCreateWithFormatPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef)>(); + CFLocaleKey get kCFLocaleCalendar => _kCFLocaleCalendar.value; - CFStringRef CFStringCreateWithFormatAndArguments( - CFAllocatorRef alloc, - CFDictionaryRef formatOptions, - CFStringRef format, - va_list arguments, - ) { - return _CFStringCreateWithFormatAndArguments( - alloc, - formatOptions, - format, - arguments, - ); - } + set kCFLocaleCalendar(CFLocaleKey value) => _kCFLocaleCalendar.value = value; - late final _CFStringCreateWithFormatAndArgumentsPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, - va_list)>>('CFStringCreateWithFormatAndArguments'); - late final _CFStringCreateWithFormatAndArguments = - _CFStringCreateWithFormatAndArgumentsPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFDictionaryRef, CFStringRef, va_list)>(); + late final ffi.Pointer _kCFLocaleCollationIdentifier = + _lookup('kCFLocaleCollationIdentifier'); - CFMutableStringRef CFStringCreateMutable( - CFAllocatorRef alloc, - int maxLength, - ) { - return _CFStringCreateMutable( - alloc, - maxLength, - ); - } + CFLocaleKey get kCFLocaleCollationIdentifier => + _kCFLocaleCollationIdentifier.value; - late final _CFStringCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableStringRef Function( - CFAllocatorRef, CFIndex)>>('CFStringCreateMutable'); - late final _CFStringCreateMutable = _CFStringCreateMutablePtr.asFunction< - CFMutableStringRef Function(CFAllocatorRef, int)>(); + set kCFLocaleCollationIdentifier(CFLocaleKey value) => + _kCFLocaleCollationIdentifier.value = value; - CFMutableStringRef CFStringCreateMutableCopy( - CFAllocatorRef alloc, - int maxLength, - CFStringRef theString, - ) { - return _CFStringCreateMutableCopy( - alloc, - maxLength, - theString, - ); - } + late final ffi.Pointer _kCFLocaleUsesMetricSystem = + _lookup('kCFLocaleUsesMetricSystem'); - late final _CFStringCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableStringRef Function(CFAllocatorRef, CFIndex, - CFStringRef)>>('CFStringCreateMutableCopy'); - late final _CFStringCreateMutableCopy = - _CFStringCreateMutableCopyPtr.asFunction< - CFMutableStringRef Function(CFAllocatorRef, int, CFStringRef)>(); + CFLocaleKey get kCFLocaleUsesMetricSystem => _kCFLocaleUsesMetricSystem.value; - CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy( - CFAllocatorRef alloc, - ffi.Pointer chars, - int numChars, - int capacity, - CFAllocatorRef externalCharactersAllocator, - ) { - return _CFStringCreateMutableWithExternalCharactersNoCopy( - alloc, - chars, - numChars, - capacity, - externalCharactersAllocator, - ); - } + set kCFLocaleUsesMetricSystem(CFLocaleKey value) => + _kCFLocaleUsesMetricSystem.value = value; - late final _CFStringCreateMutableWithExternalCharactersNoCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex, CFIndex, CFAllocatorRef)>>( - 'CFStringCreateMutableWithExternalCharactersNoCopy'); - late final _CFStringCreateMutableWithExternalCharactersNoCopy = - _CFStringCreateMutableWithExternalCharactersNoCopyPtr.asFunction< - CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, int, - int, CFAllocatorRef)>(); + late final ffi.Pointer _kCFLocaleMeasurementSystem = + _lookup('kCFLocaleMeasurementSystem'); - int CFStringGetLength( - CFStringRef theString, - ) { - return _CFStringGetLength( - theString, - ); - } + CFLocaleKey get kCFLocaleMeasurementSystem => + _kCFLocaleMeasurementSystem.value; - late final _CFStringGetLengthPtr = - _lookup>( - 'CFStringGetLength'); - late final _CFStringGetLength = - _CFStringGetLengthPtr.asFunction(); + set kCFLocaleMeasurementSystem(CFLocaleKey value) => + _kCFLocaleMeasurementSystem.value = value; - int CFStringGetCharacterAtIndex( - CFStringRef theString, - int idx, - ) { - return _CFStringGetCharacterAtIndex( - theString, - idx, - ); - } + late final ffi.Pointer _kCFLocaleDecimalSeparator = + _lookup('kCFLocaleDecimalSeparator'); - late final _CFStringGetCharacterAtIndexPtr = - _lookup>( - 'CFStringGetCharacterAtIndex'); - late final _CFStringGetCharacterAtIndex = _CFStringGetCharacterAtIndexPtr - .asFunction(); + CFLocaleKey get kCFLocaleDecimalSeparator => _kCFLocaleDecimalSeparator.value; - void CFStringGetCharacters( - CFStringRef theString, - CFRange range, - ffi.Pointer buffer, - ) { - return _CFStringGetCharacters( - theString, - range, - buffer, - ); - } + set kCFLocaleDecimalSeparator(CFLocaleKey value) => + _kCFLocaleDecimalSeparator.value = value; - late final _CFStringGetCharactersPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFStringRef, CFRange, - ffi.Pointer)>>('CFStringGetCharacters'); - late final _CFStringGetCharacters = _CFStringGetCharactersPtr.asFunction< - void Function(CFStringRef, CFRange, ffi.Pointer)>(); + late final ffi.Pointer _kCFLocaleGroupingSeparator = + _lookup('kCFLocaleGroupingSeparator'); - int CFStringGetPascalString( - CFStringRef theString, - StringPtr buffer, - int bufferSize, - int encoding, - ) { - return _CFStringGetPascalString( - theString, - buffer, - bufferSize, - encoding, - ); - } + CFLocaleKey get kCFLocaleGroupingSeparator => + _kCFLocaleGroupingSeparator.value; - late final _CFStringGetPascalStringPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, StringPtr, CFIndex, - CFStringEncoding)>>('CFStringGetPascalString'); - late final _CFStringGetPascalString = _CFStringGetPascalStringPtr.asFunction< - int Function(CFStringRef, StringPtr, int, int)>(); + set kCFLocaleGroupingSeparator(CFLocaleKey value) => + _kCFLocaleGroupingSeparator.value = value; - int CFStringGetCString( - CFStringRef theString, - ffi.Pointer buffer, - int bufferSize, - int encoding, - ) { - return _CFStringGetCString( - theString, - buffer, - bufferSize, - encoding, - ); - } + late final ffi.Pointer _kCFLocaleCurrencySymbol = + _lookup('kCFLocaleCurrencySymbol'); - late final _CFStringGetCStringPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, ffi.Pointer, CFIndex, - CFStringEncoding)>>('CFStringGetCString'); - late final _CFStringGetCString = _CFStringGetCStringPtr.asFunction< - int Function(CFStringRef, ffi.Pointer, int, int)>(); + CFLocaleKey get kCFLocaleCurrencySymbol => _kCFLocaleCurrencySymbol.value; - ConstStringPtr CFStringGetPascalStringPtr( - CFStringRef theString, - int encoding, - ) { - return _CFStringGetPascalStringPtr1( - theString, - encoding, - ); - } + set kCFLocaleCurrencySymbol(CFLocaleKey value) => + _kCFLocaleCurrencySymbol.value = value; - late final _CFStringGetPascalStringPtrPtr = _lookup< - ffi.NativeFunction< - ConstStringPtr Function( - CFStringRef, CFStringEncoding)>>('CFStringGetPascalStringPtr'); - late final _CFStringGetPascalStringPtr1 = _CFStringGetPascalStringPtrPtr - .asFunction(); + late final ffi.Pointer _kCFLocaleCurrencyCode = + _lookup('kCFLocaleCurrencyCode'); - ffi.Pointer CFStringGetCStringPtr( - CFStringRef theString, - int encoding, - ) { - return _CFStringGetCStringPtr1( - theString, - encoding, - ); - } + CFLocaleKey get kCFLocaleCurrencyCode => _kCFLocaleCurrencyCode.value; - late final _CFStringGetCStringPtrPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFStringRef, CFStringEncoding)>>('CFStringGetCStringPtr'); - late final _CFStringGetCStringPtr1 = _CFStringGetCStringPtrPtr.asFunction< - ffi.Pointer Function(CFStringRef, int)>(); + set kCFLocaleCurrencyCode(CFLocaleKey value) => + _kCFLocaleCurrencyCode.value = value; - ffi.Pointer CFStringGetCharactersPtr( - CFStringRef theString, - ) { - return _CFStringGetCharactersPtr1( - theString, - ); - } + late final ffi.Pointer _kCFLocaleCollatorIdentifier = + _lookup('kCFLocaleCollatorIdentifier'); - late final _CFStringGetCharactersPtrPtr = - _lookup Function(CFStringRef)>>( - 'CFStringGetCharactersPtr'); - late final _CFStringGetCharactersPtr1 = _CFStringGetCharactersPtrPtr - .asFunction Function(CFStringRef)>(); + CFLocaleKey get kCFLocaleCollatorIdentifier => + _kCFLocaleCollatorIdentifier.value; - int CFStringGetBytes( - CFStringRef theString, - CFRange range, - int encoding, - int lossByte, - int isExternalRepresentation, - ffi.Pointer buffer, - int maxBufLen, - ffi.Pointer usedBufLen, - ) { - return _CFStringGetBytes( - theString, - range, - encoding, - lossByte, - isExternalRepresentation, - buffer, - maxBufLen, - usedBufLen, - ); - } + set kCFLocaleCollatorIdentifier(CFLocaleKey value) => + _kCFLocaleCollatorIdentifier.value = value; - late final _CFStringGetBytesPtr = _lookup< - ffi.NativeFunction< - CFIndex Function( - CFStringRef, - CFRange, - CFStringEncoding, - UInt8, - Boolean, - ffi.Pointer, - CFIndex, - ffi.Pointer)>>('CFStringGetBytes'); - late final _CFStringGetBytes = _CFStringGetBytesPtr.asFunction< - int Function(CFStringRef, CFRange, int, int, int, ffi.Pointer, int, - ffi.Pointer)>(); + late final ffi.Pointer _kCFLocaleQuotationBeginDelimiterKey = + _lookup('kCFLocaleQuotationBeginDelimiterKey'); - CFStringRef CFStringCreateFromExternalRepresentation( - CFAllocatorRef alloc, - CFDataRef data, - int encoding, - ) { - return _CFStringCreateFromExternalRepresentation( - alloc, - data, - encoding, - ); - } + CFLocaleKey get kCFLocaleQuotationBeginDelimiterKey => + _kCFLocaleQuotationBeginDelimiterKey.value; - late final _CFStringCreateFromExternalRepresentationPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDataRef, - CFStringEncoding)>>('CFStringCreateFromExternalRepresentation'); - late final _CFStringCreateFromExternalRepresentation = - _CFStringCreateFromExternalRepresentationPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDataRef, int)>(); + set kCFLocaleQuotationBeginDelimiterKey(CFLocaleKey value) => + _kCFLocaleQuotationBeginDelimiterKey.value = value; - CFDataRef CFStringCreateExternalRepresentation( - CFAllocatorRef alloc, - CFStringRef theString, - int encoding, - int lossByte, - ) { - return _CFStringCreateExternalRepresentation( - alloc, - theString, - encoding, - lossByte, - ); - } + late final ffi.Pointer _kCFLocaleQuotationEndDelimiterKey = + _lookup('kCFLocaleQuotationEndDelimiterKey'); - late final _CFStringCreateExternalRepresentationPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFStringRef, CFStringEncoding, - UInt8)>>('CFStringCreateExternalRepresentation'); - late final _CFStringCreateExternalRepresentation = - _CFStringCreateExternalRepresentationPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFStringRef, int, int)>(); + CFLocaleKey get kCFLocaleQuotationEndDelimiterKey => + _kCFLocaleQuotationEndDelimiterKey.value; - int CFStringGetSmallestEncoding( - CFStringRef theString, - ) { - return _CFStringGetSmallestEncoding( - theString, - ); - } + set kCFLocaleQuotationEndDelimiterKey(CFLocaleKey value) => + _kCFLocaleQuotationEndDelimiterKey.value = value; - late final _CFStringGetSmallestEncodingPtr = - _lookup>( - 'CFStringGetSmallestEncoding'); - late final _CFStringGetSmallestEncoding = - _CFStringGetSmallestEncodingPtr.asFunction(); + late final ffi.Pointer + _kCFLocaleAlternateQuotationBeginDelimiterKey = + _lookup('kCFLocaleAlternateQuotationBeginDelimiterKey'); - int CFStringGetFastestEncoding( - CFStringRef theString, - ) { - return _CFStringGetFastestEncoding( - theString, - ); - } + CFLocaleKey get kCFLocaleAlternateQuotationBeginDelimiterKey => + _kCFLocaleAlternateQuotationBeginDelimiterKey.value; - late final _CFStringGetFastestEncodingPtr = - _lookup>( - 'CFStringGetFastestEncoding'); - late final _CFStringGetFastestEncoding = - _CFStringGetFastestEncodingPtr.asFunction(); + set kCFLocaleAlternateQuotationBeginDelimiterKey(CFLocaleKey value) => + _kCFLocaleAlternateQuotationBeginDelimiterKey.value = value; - int CFStringGetSystemEncoding() { - return _CFStringGetSystemEncoding(); + late final ffi.Pointer + _kCFLocaleAlternateQuotationEndDelimiterKey = + _lookup('kCFLocaleAlternateQuotationEndDelimiterKey'); + + CFLocaleKey get kCFLocaleAlternateQuotationEndDelimiterKey => + _kCFLocaleAlternateQuotationEndDelimiterKey.value; + + set kCFLocaleAlternateQuotationEndDelimiterKey(CFLocaleKey value) => + _kCFLocaleAlternateQuotationEndDelimiterKey.value = value; + + late final ffi.Pointer _kCFGregorianCalendar = + _lookup('kCFGregorianCalendar'); + + CFCalendarIdentifier get kCFGregorianCalendar => _kCFGregorianCalendar.value; + + set kCFGregorianCalendar(CFCalendarIdentifier value) => + _kCFGregorianCalendar.value = value; + + late final ffi.Pointer _kCFBuddhistCalendar = + _lookup('kCFBuddhistCalendar'); + + CFCalendarIdentifier get kCFBuddhistCalendar => _kCFBuddhistCalendar.value; + + set kCFBuddhistCalendar(CFCalendarIdentifier value) => + _kCFBuddhistCalendar.value = value; + + late final ffi.Pointer _kCFChineseCalendar = + _lookup('kCFChineseCalendar'); + + CFCalendarIdentifier get kCFChineseCalendar => _kCFChineseCalendar.value; + + set kCFChineseCalendar(CFCalendarIdentifier value) => + _kCFChineseCalendar.value = value; + + late final ffi.Pointer _kCFHebrewCalendar = + _lookup('kCFHebrewCalendar'); + + CFCalendarIdentifier get kCFHebrewCalendar => _kCFHebrewCalendar.value; + + set kCFHebrewCalendar(CFCalendarIdentifier value) => + _kCFHebrewCalendar.value = value; + + late final ffi.Pointer _kCFIslamicCalendar = + _lookup('kCFIslamicCalendar'); + + CFCalendarIdentifier get kCFIslamicCalendar => _kCFIslamicCalendar.value; + + set kCFIslamicCalendar(CFCalendarIdentifier value) => + _kCFIslamicCalendar.value = value; + + late final ffi.Pointer _kCFIslamicCivilCalendar = + _lookup('kCFIslamicCivilCalendar'); + + CFCalendarIdentifier get kCFIslamicCivilCalendar => + _kCFIslamicCivilCalendar.value; + + set kCFIslamicCivilCalendar(CFCalendarIdentifier value) => + _kCFIslamicCivilCalendar.value = value; + + late final ffi.Pointer _kCFJapaneseCalendar = + _lookup('kCFJapaneseCalendar'); + + CFCalendarIdentifier get kCFJapaneseCalendar => _kCFJapaneseCalendar.value; + + set kCFJapaneseCalendar(CFCalendarIdentifier value) => + _kCFJapaneseCalendar.value = value; + + late final ffi.Pointer _kCFRepublicOfChinaCalendar = + _lookup('kCFRepublicOfChinaCalendar'); + + CFCalendarIdentifier get kCFRepublicOfChinaCalendar => + _kCFRepublicOfChinaCalendar.value; + + set kCFRepublicOfChinaCalendar(CFCalendarIdentifier value) => + _kCFRepublicOfChinaCalendar.value = value; + + late final ffi.Pointer _kCFPersianCalendar = + _lookup('kCFPersianCalendar'); + + CFCalendarIdentifier get kCFPersianCalendar => _kCFPersianCalendar.value; + + set kCFPersianCalendar(CFCalendarIdentifier value) => + _kCFPersianCalendar.value = value; + + late final ffi.Pointer _kCFIndianCalendar = + _lookup('kCFIndianCalendar'); + + CFCalendarIdentifier get kCFIndianCalendar => _kCFIndianCalendar.value; + + set kCFIndianCalendar(CFCalendarIdentifier value) => + _kCFIndianCalendar.value = value; + + late final ffi.Pointer _kCFISO8601Calendar = + _lookup('kCFISO8601Calendar'); + + CFCalendarIdentifier get kCFISO8601Calendar => _kCFISO8601Calendar.value; + + set kCFISO8601Calendar(CFCalendarIdentifier value) => + _kCFISO8601Calendar.value = value; + + late final ffi.Pointer _kCFIslamicTabularCalendar = + _lookup('kCFIslamicTabularCalendar'); + + CFCalendarIdentifier get kCFIslamicTabularCalendar => + _kCFIslamicTabularCalendar.value; + + set kCFIslamicTabularCalendar(CFCalendarIdentifier value) => + _kCFIslamicTabularCalendar.value = value; + + late final ffi.Pointer _kCFIslamicUmmAlQuraCalendar = + _lookup('kCFIslamicUmmAlQuraCalendar'); + + CFCalendarIdentifier get kCFIslamicUmmAlQuraCalendar => + _kCFIslamicUmmAlQuraCalendar.value; + + set kCFIslamicUmmAlQuraCalendar(CFCalendarIdentifier value) => + _kCFIslamicUmmAlQuraCalendar.value = value; + + double CFAbsoluteTimeGetCurrent() { + return _CFAbsoluteTimeGetCurrent(); } - late final _CFStringGetSystemEncodingPtr = - _lookup>( - 'CFStringGetSystemEncoding'); - late final _CFStringGetSystemEncoding = - _CFStringGetSystemEncodingPtr.asFunction(); + late final _CFAbsoluteTimeGetCurrentPtr = + _lookup>( + 'CFAbsoluteTimeGetCurrent'); + late final _CFAbsoluteTimeGetCurrent = + _CFAbsoluteTimeGetCurrentPtr.asFunction(); - int CFStringGetMaximumSizeForEncoding( - int length, - int encoding, - ) { - return _CFStringGetMaximumSizeForEncoding( - length, - encoding, - ); + late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1970 = + _lookup('kCFAbsoluteTimeIntervalSince1970'); + + double get kCFAbsoluteTimeIntervalSince1970 => + _kCFAbsoluteTimeIntervalSince1970.value; + + set kCFAbsoluteTimeIntervalSince1970(double value) => + _kCFAbsoluteTimeIntervalSince1970.value = value; + + late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1904 = + _lookup('kCFAbsoluteTimeIntervalSince1904'); + + double get kCFAbsoluteTimeIntervalSince1904 => + _kCFAbsoluteTimeIntervalSince1904.value; + + set kCFAbsoluteTimeIntervalSince1904(double value) => + _kCFAbsoluteTimeIntervalSince1904.value = value; + + int CFDateGetTypeID() { + return _CFDateGetTypeID(); } - late final _CFStringGetMaximumSizeForEncodingPtr = - _lookup>( - 'CFStringGetMaximumSizeForEncoding'); - late final _CFStringGetMaximumSizeForEncoding = - _CFStringGetMaximumSizeForEncodingPtr.asFunction< - int Function(int, int)>(); + late final _CFDateGetTypeIDPtr = + _lookup>('CFDateGetTypeID'); + late final _CFDateGetTypeID = + _CFDateGetTypeIDPtr.asFunction(); - int CFStringGetFileSystemRepresentation( - CFStringRef string, - ffi.Pointer buffer, - int maxBufLen, + CFDateRef CFDateCreate( + CFAllocatorRef allocator, + double at, ) { - return _CFStringGetFileSystemRepresentation( - string, - buffer, - maxBufLen, + return _CFDateCreate( + allocator, + at, ); } - late final _CFStringGetFileSystemRepresentationPtr = _lookup< + late final _CFDateCreatePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFStringRef, ffi.Pointer, - CFIndex)>>('CFStringGetFileSystemRepresentation'); - late final _CFStringGetFileSystemRepresentation = - _CFStringGetFileSystemRepresentationPtr.asFunction< - int Function(CFStringRef, ffi.Pointer, int)>(); + CFDateRef Function(CFAllocatorRef, CFAbsoluteTime)>>('CFDateCreate'); + late final _CFDateCreate = + _CFDateCreatePtr.asFunction(); - int CFStringGetMaximumSizeOfFileSystemRepresentation( - CFStringRef string, + double CFDateGetAbsoluteTime( + CFDateRef theDate, ) { - return _CFStringGetMaximumSizeOfFileSystemRepresentation( - string, + return _CFDateGetAbsoluteTime( + theDate, ); } - late final _CFStringGetMaximumSizeOfFileSystemRepresentationPtr = - _lookup>( - 'CFStringGetMaximumSizeOfFileSystemRepresentation'); - late final _CFStringGetMaximumSizeOfFileSystemRepresentation = - _CFStringGetMaximumSizeOfFileSystemRepresentationPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFDateGetAbsoluteTimePtr = + _lookup>( + 'CFDateGetAbsoluteTime'); + late final _CFDateGetAbsoluteTime = + _CFDateGetAbsoluteTimePtr.asFunction(); - CFStringRef CFStringCreateWithFileSystemRepresentation( - CFAllocatorRef alloc, - ffi.Pointer buffer, + double CFDateGetTimeIntervalSinceDate( + CFDateRef theDate, + CFDateRef otherDate, ) { - return _CFStringCreateWithFileSystemRepresentation( - alloc, - buffer, + return _CFDateGetTimeIntervalSinceDate( + theDate, + otherDate, ); } - late final _CFStringCreateWithFileSystemRepresentationPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer)>>( - 'CFStringCreateWithFileSystemRepresentation'); - late final _CFStringCreateWithFileSystemRepresentation = - _CFStringCreateWithFileSystemRepresentationPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer)>(); + late final _CFDateGetTimeIntervalSinceDatePtr = _lookup< + ffi.NativeFunction>( + 'CFDateGetTimeIntervalSinceDate'); + late final _CFDateGetTimeIntervalSinceDate = + _CFDateGetTimeIntervalSinceDatePtr.asFunction< + double Function(CFDateRef, CFDateRef)>(); - int CFStringCompareWithOptionsAndLocale( - CFStringRef theString1, - CFStringRef theString2, - CFRange rangeToCompare, - int compareOptions, - CFLocaleRef locale, + int CFDateCompare( + CFDateRef theDate, + CFDateRef otherDate, + ffi.Pointer context, ) { - return _CFStringCompareWithOptionsAndLocale( - theString1, - theString2, - rangeToCompare, - compareOptions, - locale, + return _CFDateCompare( + theDate, + otherDate, + context, ); } - late final _CFStringCompareWithOptionsAndLocalePtr = _lookup< + late final _CFDateComparePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, - CFLocaleRef)>>('CFStringCompareWithOptionsAndLocale'); - late final _CFStringCompareWithOptionsAndLocale = - _CFStringCompareWithOptionsAndLocalePtr.asFunction< - int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef)>(); + ffi.Int32 Function( + CFDateRef, CFDateRef, ffi.Pointer)>>('CFDateCompare'); + late final _CFDateCompare = _CFDateComparePtr.asFunction< + int Function(CFDateRef, CFDateRef, ffi.Pointer)>(); - int CFStringCompareWithOptions( - CFStringRef theString1, - CFStringRef theString2, - CFRange rangeToCompare, - int compareOptions, + int CFGregorianDateIsValid( + CFGregorianDate gdate, + int unitFlags, ) { - return _CFStringCompareWithOptions( - theString1, - theString2, - rangeToCompare, - compareOptions, + return _CFGregorianDateIsValid( + gdate, + unitFlags, ); } - late final _CFStringCompareWithOptionsPtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, - ffi.Int32)>>('CFStringCompareWithOptions'); - late final _CFStringCompareWithOptions = _CFStringCompareWithOptionsPtr - .asFunction(); + late final _CFGregorianDateIsValidPtr = _lookup< + ffi.NativeFunction>( + 'CFGregorianDateIsValid'); + late final _CFGregorianDateIsValid = _CFGregorianDateIsValidPtr.asFunction< + int Function(CFGregorianDate, int)>(); - int CFStringCompare( - CFStringRef theString1, - CFStringRef theString2, - int compareOptions, + double CFGregorianDateGetAbsoluteTime( + CFGregorianDate gdate, + CFTimeZoneRef tz, ) { - return _CFStringCompare( - theString1, - theString2, - compareOptions, + return _CFGregorianDateGetAbsoluteTime( + gdate, + tz, ); } - late final _CFStringComparePtr = _lookup< + late final _CFGregorianDateGetAbsoluteTimePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - CFStringRef, CFStringRef, ffi.Int32)>>('CFStringCompare'); - late final _CFStringCompare = _CFStringComparePtr.asFunction< - int Function(CFStringRef, CFStringRef, int)>(); + CFAbsoluteTime Function(CFGregorianDate, + CFTimeZoneRef)>>('CFGregorianDateGetAbsoluteTime'); + late final _CFGregorianDateGetAbsoluteTime = + _CFGregorianDateGetAbsoluteTimePtr.asFunction< + double Function(CFGregorianDate, CFTimeZoneRef)>(); - int CFStringFindWithOptionsAndLocale( - CFStringRef theString, - CFStringRef stringToFind, - CFRange rangeToSearch, - int searchOptions, - CFLocaleRef locale, - ffi.Pointer result, + CFGregorianDate CFAbsoluteTimeGetGregorianDate( + double at, + CFTimeZoneRef tz, ) { - return _CFStringFindWithOptionsAndLocale( - theString, - stringToFind, - rangeToSearch, - searchOptions, - locale, - result, + return _CFAbsoluteTimeGetGregorianDate( + at, + tz, ); } - late final _CFStringFindWithOptionsAndLocalePtr = _lookup< + late final _CFAbsoluteTimeGetGregorianDatePtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFStringRef, - CFStringRef, - CFRange, - ffi.Int32, - CFLocaleRef, - ffi.Pointer)>>('CFStringFindWithOptionsAndLocale'); - late final _CFStringFindWithOptionsAndLocale = - _CFStringFindWithOptionsAndLocalePtr.asFunction< - int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef, - ffi.Pointer)>(); + CFGregorianDate Function(CFAbsoluteTime, + CFTimeZoneRef)>>('CFAbsoluteTimeGetGregorianDate'); + late final _CFAbsoluteTimeGetGregorianDate = + _CFAbsoluteTimeGetGregorianDatePtr.asFunction< + CFGregorianDate Function(double, CFTimeZoneRef)>(); - int CFStringFindWithOptions( - CFStringRef theString, - CFStringRef stringToFind, - CFRange rangeToSearch, - int searchOptions, - ffi.Pointer result, + double CFAbsoluteTimeAddGregorianUnits( + double at, + CFTimeZoneRef tz, + CFGregorianUnits units, ) { - return _CFStringFindWithOptions( - theString, - stringToFind, - rangeToSearch, - searchOptions, - result, + return _CFAbsoluteTimeAddGregorianUnits( + at, + tz, + units, ); } - late final _CFStringFindWithOptionsPtr = _lookup< + late final _CFAbsoluteTimeAddGregorianUnitsPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, - ffi.Pointer)>>('CFStringFindWithOptions'); - late final _CFStringFindWithOptions = _CFStringFindWithOptionsPtr.asFunction< - int Function( - CFStringRef, CFStringRef, CFRange, int, ffi.Pointer)>(); + CFAbsoluteTime Function(CFAbsoluteTime, CFTimeZoneRef, + CFGregorianUnits)>>('CFAbsoluteTimeAddGregorianUnits'); + late final _CFAbsoluteTimeAddGregorianUnits = + _CFAbsoluteTimeAddGregorianUnitsPtr.asFunction< + double Function(double, CFTimeZoneRef, CFGregorianUnits)>(); - CFArrayRef CFStringCreateArrayWithFindResults( - CFAllocatorRef alloc, - CFStringRef theString, - CFStringRef stringToFind, - CFRange rangeToSearch, - int compareOptions, + CFGregorianUnits CFAbsoluteTimeGetDifferenceAsGregorianUnits( + double at1, + double at2, + CFTimeZoneRef tz, + int unitFlags, ) { - return _CFStringCreateArrayWithFindResults( - alloc, - theString, - stringToFind, - rangeToSearch, - compareOptions, + return _CFAbsoluteTimeGetDifferenceAsGregorianUnits( + at1, + at2, + tz, + unitFlags, ); } - late final _CFStringCreateArrayWithFindResultsPtr = _lookup< + late final _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef, CFRange, - ffi.Int32)>>('CFStringCreateArrayWithFindResults'); - late final _CFStringCreateArrayWithFindResults = - _CFStringCreateArrayWithFindResultsPtr.asFunction< - CFArrayRef Function( - CFAllocatorRef, CFStringRef, CFStringRef, CFRange, int)>(); + CFGregorianUnits Function( + CFAbsoluteTime, + CFAbsoluteTime, + CFTimeZoneRef, + CFOptionFlags)>>('CFAbsoluteTimeGetDifferenceAsGregorianUnits'); + late final _CFAbsoluteTimeGetDifferenceAsGregorianUnits = + _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr.asFunction< + CFGregorianUnits Function(double, double, CFTimeZoneRef, int)>(); - CFRange CFStringFind( - CFStringRef theString, - CFStringRef stringToFind, - int compareOptions, - ) { - return _CFStringFind( - theString, - stringToFind, - compareOptions, - ); - } - - late final _CFStringFindPtr = _lookup< - ffi.NativeFunction< - CFRange Function( - CFStringRef, CFStringRef, ffi.Int32)>>('CFStringFind'); - late final _CFStringFind = _CFStringFindPtr.asFunction< - CFRange Function(CFStringRef, CFStringRef, int)>(); - - int CFStringHasPrefix( - CFStringRef theString, - CFStringRef prefix, + int CFAbsoluteTimeGetDayOfWeek( + double at, + CFTimeZoneRef tz, ) { - return _CFStringHasPrefix( - theString, - prefix, + return _CFAbsoluteTimeGetDayOfWeek( + at, + tz, ); } - late final _CFStringHasPrefixPtr = - _lookup>( - 'CFStringHasPrefix'); - late final _CFStringHasPrefix = _CFStringHasPrefixPtr.asFunction< - int Function(CFStringRef, CFStringRef)>(); + late final _CFAbsoluteTimeGetDayOfWeekPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetDayOfWeek'); + late final _CFAbsoluteTimeGetDayOfWeek = _CFAbsoluteTimeGetDayOfWeekPtr + .asFunction(); - int CFStringHasSuffix( - CFStringRef theString, - CFStringRef suffix, + int CFAbsoluteTimeGetDayOfYear( + double at, + CFTimeZoneRef tz, ) { - return _CFStringHasSuffix( - theString, - suffix, + return _CFAbsoluteTimeGetDayOfYear( + at, + tz, ); } - late final _CFStringHasSuffixPtr = - _lookup>( - 'CFStringHasSuffix'); - late final _CFStringHasSuffix = _CFStringHasSuffixPtr.asFunction< - int Function(CFStringRef, CFStringRef)>(); + late final _CFAbsoluteTimeGetDayOfYearPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetDayOfYear'); + late final _CFAbsoluteTimeGetDayOfYear = _CFAbsoluteTimeGetDayOfYearPtr + .asFunction(); - CFRange CFStringGetRangeOfComposedCharactersAtIndex( - CFStringRef theString, - int theIndex, + int CFAbsoluteTimeGetWeekOfYear( + double at, + CFTimeZoneRef tz, ) { - return _CFStringGetRangeOfComposedCharactersAtIndex( - theString, - theIndex, + return _CFAbsoluteTimeGetWeekOfYear( + at, + tz, ); } - late final _CFStringGetRangeOfComposedCharactersAtIndexPtr = - _lookup>( - 'CFStringGetRangeOfComposedCharactersAtIndex'); - late final _CFStringGetRangeOfComposedCharactersAtIndex = - _CFStringGetRangeOfComposedCharactersAtIndexPtr.asFunction< - CFRange Function(CFStringRef, int)>(); + late final _CFAbsoluteTimeGetWeekOfYearPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetWeekOfYear'); + late final _CFAbsoluteTimeGetWeekOfYear = _CFAbsoluteTimeGetWeekOfYearPtr + .asFunction(); - int CFStringFindCharacterFromSet( - CFStringRef theString, - CFCharacterSetRef theSet, - CFRange rangeToSearch, - int searchOptions, - ffi.Pointer result, - ) { - return _CFStringFindCharacterFromSet( - theString, - theSet, - rangeToSearch, - searchOptions, - result, - ); + int CFDataGetTypeID() { + return _CFDataGetTypeID(); } - late final _CFStringFindCharacterFromSetPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, CFCharacterSetRef, CFRange, ffi.Int32, - ffi.Pointer)>>('CFStringFindCharacterFromSet'); - late final _CFStringFindCharacterFromSet = - _CFStringFindCharacterFromSetPtr.asFunction< - int Function(CFStringRef, CFCharacterSetRef, CFRange, int, - ffi.Pointer)>(); + late final _CFDataGetTypeIDPtr = + _lookup>('CFDataGetTypeID'); + late final _CFDataGetTypeID = + _CFDataGetTypeIDPtr.asFunction(); - void CFStringGetLineBounds( - CFStringRef theString, - CFRange range, - ffi.Pointer lineBeginIndex, - ffi.Pointer lineEndIndex, - ffi.Pointer contentsEndIndex, + CFDataRef CFDataCreate( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int length, ) { - return _CFStringGetLineBounds( - theString, - range, - lineBeginIndex, - lineEndIndex, - contentsEndIndex, + return _CFDataCreate( + allocator, + bytes, + length, ); } - late final _CFStringGetLineBoundsPtr = _lookup< + late final _CFDataCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFStringRef, - CFRange, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('CFStringGetLineBounds'); - late final _CFStringGetLineBounds = _CFStringGetLineBoundsPtr.asFunction< - void Function(CFStringRef, CFRange, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CFDataRef Function( + CFAllocatorRef, ffi.Pointer, CFIndex)>>('CFDataCreate'); + late final _CFDataCreate = _CFDataCreatePtr.asFunction< + CFDataRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - void CFStringGetParagraphBounds( - CFStringRef string, - CFRange range, - ffi.Pointer parBeginIndex, - ffi.Pointer parEndIndex, - ffi.Pointer contentsEndIndex, + CFDataRef CFDataCreateWithBytesNoCopy( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int length, + CFAllocatorRef bytesDeallocator, ) { - return _CFStringGetParagraphBounds( - string, - range, - parBeginIndex, - parEndIndex, - contentsEndIndex, + return _CFDataCreateWithBytesNoCopy( + allocator, + bytes, + length, + bytesDeallocator, ); } - late final _CFStringGetParagraphBoundsPtr = _lookup< + late final _CFDataCreateWithBytesNoCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFStringRef, - CFRange, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('CFStringGetParagraphBounds'); - late final _CFStringGetParagraphBounds = - _CFStringGetParagraphBoundsPtr.asFunction< - void Function(CFStringRef, CFRange, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CFDataRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFDataCreateWithBytesNoCopy'); + late final _CFDataCreateWithBytesNoCopy = + _CFDataCreateWithBytesNoCopyPtr.asFunction< + CFDataRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - int CFStringGetHyphenationLocationBeforeIndex( - CFStringRef string, - int location, - CFRange limitRange, - int options, - CFLocaleRef locale, - ffi.Pointer character, + CFDataRef CFDataCreateCopy( + CFAllocatorRef allocator, + CFDataRef theData, ) { - return _CFStringGetHyphenationLocationBeforeIndex( - string, - location, - limitRange, - options, - locale, - character, + return _CFDataCreateCopy( + allocator, + theData, ); } - late final _CFStringGetHyphenationLocationBeforeIndexPtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFStringRef, CFIndex, CFRange, CFOptionFlags, - CFLocaleRef, ffi.Pointer)>>( - 'CFStringGetHyphenationLocationBeforeIndex'); - late final _CFStringGetHyphenationLocationBeforeIndex = - _CFStringGetHyphenationLocationBeforeIndexPtr.asFunction< - int Function(CFStringRef, int, CFRange, int, CFLocaleRef, - ffi.Pointer)>(); + late final _CFDataCreateCopyPtr = _lookup< + ffi.NativeFunction>( + 'CFDataCreateCopy'); + late final _CFDataCreateCopy = _CFDataCreateCopyPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFDataRef)>(); - int CFStringIsHyphenationAvailableForLocale( - CFLocaleRef locale, + CFMutableDataRef CFDataCreateMutable( + CFAllocatorRef allocator, + int capacity, ) { - return _CFStringIsHyphenationAvailableForLocale( - locale, + return _CFDataCreateMutable( + allocator, + capacity, ); } - late final _CFStringIsHyphenationAvailableForLocalePtr = - _lookup>( - 'CFStringIsHyphenationAvailableForLocale'); - late final _CFStringIsHyphenationAvailableForLocale = - _CFStringIsHyphenationAvailableForLocalePtr.asFunction< - int Function(CFLocaleRef)>(); + late final _CFDataCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableDataRef Function( + CFAllocatorRef, CFIndex)>>('CFDataCreateMutable'); + late final _CFDataCreateMutable = _CFDataCreateMutablePtr.asFunction< + CFMutableDataRef Function(CFAllocatorRef, int)>(); - CFStringRef CFStringCreateByCombiningStrings( - CFAllocatorRef alloc, - CFArrayRef theArray, - CFStringRef separatorString, + CFMutableDataRef CFDataCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFDataRef theData, ) { - return _CFStringCreateByCombiningStrings( - alloc, - theArray, - separatorString, + return _CFDataCreateMutableCopy( + allocator, + capacity, + theData, ); } - late final _CFStringCreateByCombiningStringsPtr = _lookup< + late final _CFDataCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFArrayRef, - CFStringRef)>>('CFStringCreateByCombiningStrings'); - late final _CFStringCreateByCombiningStrings = - _CFStringCreateByCombiningStringsPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFArrayRef, CFStringRef)>(); + CFMutableDataRef Function( + CFAllocatorRef, CFIndex, CFDataRef)>>('CFDataCreateMutableCopy'); + late final _CFDataCreateMutableCopy = _CFDataCreateMutableCopyPtr.asFunction< + CFMutableDataRef Function(CFAllocatorRef, int, CFDataRef)>(); - CFArrayRef CFStringCreateArrayBySeparatingStrings( - CFAllocatorRef alloc, - CFStringRef theString, - CFStringRef separatorString, + int CFDataGetLength( + CFDataRef theData, ) { - return _CFStringCreateArrayBySeparatingStrings( - alloc, - theString, - separatorString, + return _CFDataGetLength( + theData, ); } - late final _CFStringCreateArrayBySeparatingStringsPtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFAllocatorRef, CFStringRef, - CFStringRef)>>('CFStringCreateArrayBySeparatingStrings'); - late final _CFStringCreateArrayBySeparatingStrings = - _CFStringCreateArrayBySeparatingStringsPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); + late final _CFDataGetLengthPtr = + _lookup>( + 'CFDataGetLength'); + late final _CFDataGetLength = + _CFDataGetLengthPtr.asFunction(); - int CFStringGetIntValue( - CFStringRef str, + ffi.Pointer CFDataGetBytePtr( + CFDataRef theData, ) { - return _CFStringGetIntValue( - str, + return _CFDataGetBytePtr( + theData, ); } - late final _CFStringGetIntValuePtr = - _lookup>( - 'CFStringGetIntValue'); - late final _CFStringGetIntValue = - _CFStringGetIntValuePtr.asFunction(); + late final _CFDataGetBytePtrPtr = + _lookup Function(CFDataRef)>>( + 'CFDataGetBytePtr'); + late final _CFDataGetBytePtr = + _CFDataGetBytePtrPtr.asFunction Function(CFDataRef)>(); - double CFStringGetDoubleValue( - CFStringRef str, + ffi.Pointer CFDataGetMutableBytePtr( + CFMutableDataRef theData, ) { - return _CFStringGetDoubleValue( - str, + return _CFDataGetMutableBytePtr( + theData, ); } - late final _CFStringGetDoubleValuePtr = - _lookup>( - 'CFStringGetDoubleValue'); - late final _CFStringGetDoubleValue = - _CFStringGetDoubleValuePtr.asFunction(); + late final _CFDataGetMutableBytePtrPtr = _lookup< + ffi.NativeFunction Function(CFMutableDataRef)>>( + 'CFDataGetMutableBytePtr'); + late final _CFDataGetMutableBytePtr = _CFDataGetMutableBytePtrPtr.asFunction< + ffi.Pointer Function(CFMutableDataRef)>(); - void CFStringAppend( - CFMutableStringRef theString, - CFStringRef appendedString, + void CFDataGetBytes( + CFDataRef theData, + CFRange range, + ffi.Pointer buffer, ) { - return _CFStringAppend( - theString, - appendedString, + return _CFDataGetBytes( + theData, + range, + buffer, ); } - late final _CFStringAppendPtr = _lookup< + late final _CFDataGetBytesPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - CFMutableStringRef, CFStringRef)>>('CFStringAppend'); - late final _CFStringAppend = _CFStringAppendPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef)>(); + CFDataRef, CFRange, ffi.Pointer)>>('CFDataGetBytes'); + late final _CFDataGetBytes = _CFDataGetBytesPtr.asFunction< + void Function(CFDataRef, CFRange, ffi.Pointer)>(); - void CFStringAppendCharacters( - CFMutableStringRef theString, - ffi.Pointer chars, - int numChars, + void CFDataSetLength( + CFMutableDataRef theData, + int length, ) { - return _CFStringAppendCharacters( - theString, - chars, - numChars, + return _CFDataSetLength( + theData, + length, ); } - late final _CFStringAppendCharactersPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ffi.Pointer, - CFIndex)>>('CFStringAppendCharacters'); - late final _CFStringAppendCharacters = - _CFStringAppendCharactersPtr.asFunction< - void Function(CFMutableStringRef, ffi.Pointer, int)>(); + late final _CFDataSetLengthPtr = + _lookup>( + 'CFDataSetLength'); + late final _CFDataSetLength = + _CFDataSetLengthPtr.asFunction(); - void CFStringAppendPascalString( - CFMutableStringRef theString, - ConstStr255Param pStr, - int encoding, + void CFDataIncreaseLength( + CFMutableDataRef theData, + int extraLength, ) { - return _CFStringAppendPascalString( - theString, - pStr, - encoding, + return _CFDataIncreaseLength( + theData, + extraLength, ); } - late final _CFStringAppendPascalStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ConstStr255Param, - CFStringEncoding)>>('CFStringAppendPascalString'); - late final _CFStringAppendPascalString = _CFStringAppendPascalStringPtr - .asFunction(); + late final _CFDataIncreaseLengthPtr = + _lookup>( + 'CFDataIncreaseLength'); + late final _CFDataIncreaseLength = _CFDataIncreaseLengthPtr.asFunction< + void Function(CFMutableDataRef, int)>(); - void CFStringAppendCString( - CFMutableStringRef theString, - ffi.Pointer cStr, - int encoding, + void CFDataAppendBytes( + CFMutableDataRef theData, + ffi.Pointer bytes, + int length, ) { - return _CFStringAppendCString( - theString, - cStr, - encoding, + return _CFDataAppendBytes( + theData, + bytes, + length, ); } - late final _CFStringAppendCStringPtr = _lookup< + late final _CFDataAppendBytesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ffi.Pointer, - CFStringEncoding)>>('CFStringAppendCString'); - late final _CFStringAppendCString = _CFStringAppendCStringPtr.asFunction< - void Function(CFMutableStringRef, ffi.Pointer, int)>(); + ffi.Void Function(CFMutableDataRef, ffi.Pointer, + CFIndex)>>('CFDataAppendBytes'); + late final _CFDataAppendBytes = _CFDataAppendBytesPtr.asFunction< + void Function(CFMutableDataRef, ffi.Pointer, int)>(); - void CFStringAppendFormat( - CFMutableStringRef theString, - CFDictionaryRef formatOptions, - CFStringRef format, + void CFDataReplaceBytes( + CFMutableDataRef theData, + CFRange range, + ffi.Pointer newBytes, + int newLength, ) { - return _CFStringAppendFormat( - theString, - formatOptions, - format, + return _CFDataReplaceBytes( + theData, + range, + newBytes, + newLength, ); } - late final _CFStringAppendFormatPtr = _lookup< + late final _CFDataReplaceBytesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFDictionaryRef, - CFStringRef)>>('CFStringAppendFormat'); - late final _CFStringAppendFormat = _CFStringAppendFormatPtr.asFunction< - void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef)>(); + ffi.Void Function(CFMutableDataRef, CFRange, ffi.Pointer, + CFIndex)>>('CFDataReplaceBytes'); + late final _CFDataReplaceBytes = _CFDataReplaceBytesPtr.asFunction< + void Function(CFMutableDataRef, CFRange, ffi.Pointer, int)>(); - void CFStringAppendFormatAndArguments( - CFMutableStringRef theString, - CFDictionaryRef formatOptions, - CFStringRef format, - va_list arguments, + void CFDataDeleteBytes( + CFMutableDataRef theData, + CFRange range, ) { - return _CFStringAppendFormatAndArguments( - theString, - formatOptions, - format, - arguments, + return _CFDataDeleteBytes( + theData, + range, ); } - late final _CFStringAppendFormatAndArgumentsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef, - va_list)>>('CFStringAppendFormatAndArguments'); - late final _CFStringAppendFormatAndArguments = - _CFStringAppendFormatAndArgumentsPtr.asFunction< - void Function( - CFMutableStringRef, CFDictionaryRef, CFStringRef, va_list)>(); + late final _CFDataDeleteBytesPtr = + _lookup>( + 'CFDataDeleteBytes'); + late final _CFDataDeleteBytes = _CFDataDeleteBytesPtr.asFunction< + void Function(CFMutableDataRef, CFRange)>(); - void CFStringInsert( - CFMutableStringRef str, - int idx, - CFStringRef insertedStr, + CFRange CFDataFind( + CFDataRef theData, + CFDataRef dataToFind, + CFRange searchRange, + int compareOptions, ) { - return _CFStringInsert( - str, - idx, - insertedStr, + return _CFDataFind( + theData, + dataToFind, + searchRange, + compareOptions, ); } - late final _CFStringInsertPtr = _lookup< + late final _CFDataFindPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFIndex, CFStringRef)>>('CFStringInsert'); - late final _CFStringInsert = _CFStringInsertPtr.asFunction< - void Function(CFMutableStringRef, int, CFStringRef)>(); + CFRange Function( + CFDataRef, CFDataRef, CFRange, ffi.Int32)>>('CFDataFind'); + late final _CFDataFind = _CFDataFindPtr.asFunction< + CFRange Function(CFDataRef, CFDataRef, CFRange, int)>(); - void CFStringDelete( - CFMutableStringRef theString, - CFRange range, + int CFCharacterSetGetTypeID() { + return _CFCharacterSetGetTypeID(); + } + + late final _CFCharacterSetGetTypeIDPtr = + _lookup>( + 'CFCharacterSetGetTypeID'); + late final _CFCharacterSetGetTypeID = + _CFCharacterSetGetTypeIDPtr.asFunction(); + + CFCharacterSetRef CFCharacterSetGetPredefined( + int theSetIdentifier, ) { - return _CFStringDelete( - theString, - range, + return _CFCharacterSetGetPredefined( + theSetIdentifier, ); } - late final _CFStringDeletePtr = _lookup< - ffi.NativeFunction>( - 'CFStringDelete'); - late final _CFStringDelete = _CFStringDeletePtr.asFunction< - void Function(CFMutableStringRef, CFRange)>(); + late final _CFCharacterSetGetPredefinedPtr = + _lookup>( + 'CFCharacterSetGetPredefined'); + late final _CFCharacterSetGetPredefined = _CFCharacterSetGetPredefinedPtr + .asFunction(); - void CFStringReplace( - CFMutableStringRef theString, - CFRange range, - CFStringRef replacement, + CFCharacterSetRef CFCharacterSetCreateWithCharactersInRange( + CFAllocatorRef alloc, + CFRange theRange, ) { - return _CFStringReplace( - theString, - range, - replacement, + return _CFCharacterSetCreateWithCharactersInRange( + alloc, + theRange, ); } - late final _CFStringReplacePtr = _lookup< + late final _CFCharacterSetCreateWithCharactersInRangePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFRange, CFStringRef)>>('CFStringReplace'); - late final _CFStringReplace = _CFStringReplacePtr.asFunction< - void Function(CFMutableStringRef, CFRange, CFStringRef)>(); + CFCharacterSetRef Function(CFAllocatorRef, + CFRange)>>('CFCharacterSetCreateWithCharactersInRange'); + late final _CFCharacterSetCreateWithCharactersInRange = + _CFCharacterSetCreateWithCharactersInRangePtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFRange)>(); - void CFStringReplaceAll( - CFMutableStringRef theString, - CFStringRef replacement, + CFCharacterSetRef CFCharacterSetCreateWithCharactersInString( + CFAllocatorRef alloc, + CFStringRef theString, ) { - return _CFStringReplaceAll( + return _CFCharacterSetCreateWithCharactersInString( + alloc, theString, - replacement, ); } - late final _CFStringReplaceAllPtr = _lookup< + late final _CFCharacterSetCreateWithCharactersInStringPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFStringRef)>>('CFStringReplaceAll'); - late final _CFStringReplaceAll = _CFStringReplaceAllPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef)>(); + CFCharacterSetRef Function(CFAllocatorRef, + CFStringRef)>>('CFCharacterSetCreateWithCharactersInString'); + late final _CFCharacterSetCreateWithCharactersInString = + _CFCharacterSetCreateWithCharactersInStringPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFStringRef)>(); - int CFStringFindAndReplace( - CFMutableStringRef theString, - CFStringRef stringToFind, - CFStringRef replacementString, - CFRange rangeToSearch, - int compareOptions, + CFCharacterSetRef CFCharacterSetCreateWithBitmapRepresentation( + CFAllocatorRef alloc, + CFDataRef theData, ) { - return _CFStringFindAndReplace( - theString, - stringToFind, - replacementString, - rangeToSearch, - compareOptions, + return _CFCharacterSetCreateWithBitmapRepresentation( + alloc, + theData, ); } - late final _CFStringFindAndReplacePtr = _lookup< + late final _CFCharacterSetCreateWithBitmapRepresentationPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFMutableStringRef, CFStringRef, CFStringRef, - CFRange, ffi.Int32)>>('CFStringFindAndReplace'); - late final _CFStringFindAndReplace = _CFStringFindAndReplacePtr.asFunction< - int Function( - CFMutableStringRef, CFStringRef, CFStringRef, CFRange, int)>(); + CFCharacterSetRef Function(CFAllocatorRef, + CFDataRef)>>('CFCharacterSetCreateWithBitmapRepresentation'); + late final _CFCharacterSetCreateWithBitmapRepresentation = + _CFCharacterSetCreateWithBitmapRepresentationPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFDataRef)>(); - void CFStringSetExternalCharactersNoCopy( - CFMutableStringRef theString, - ffi.Pointer chars, - int length, - int capacity, + CFCharacterSetRef CFCharacterSetCreateInvertedSet( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return _CFStringSetExternalCharactersNoCopy( - theString, - chars, - length, - capacity, + return _CFCharacterSetCreateInvertedSet( + alloc, + theSet, ); } - late final _CFStringSetExternalCharactersNoCopyPtr = _lookup< + late final _CFCharacterSetCreateInvertedSetPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ffi.Pointer, CFIndex, - CFIndex)>>('CFStringSetExternalCharactersNoCopy'); - late final _CFStringSetExternalCharactersNoCopy = - _CFStringSetExternalCharactersNoCopyPtr.asFunction< - void Function(CFMutableStringRef, ffi.Pointer, int, int)>(); + CFCharacterSetRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateInvertedSet'); + late final _CFCharacterSetCreateInvertedSet = + _CFCharacterSetCreateInvertedSetPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); - void CFStringPad( - CFMutableStringRef theString, - CFStringRef padString, - int length, - int indexIntoPad, + int CFCharacterSetIsSupersetOfSet( + CFCharacterSetRef theSet, + CFCharacterSetRef theOtherset, ) { - return _CFStringPad( - theString, - padString, - length, - indexIntoPad, + return _CFCharacterSetIsSupersetOfSet( + theSet, + theOtherset, ); } - late final _CFStringPadPtr = _lookup< + late final _CFCharacterSetIsSupersetOfSetPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFStringRef, CFIndex, - CFIndex)>>('CFStringPad'); - late final _CFStringPad = _CFStringPadPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef, int, int)>(); + Boolean Function(CFCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetIsSupersetOfSet'); + late final _CFCharacterSetIsSupersetOfSet = _CFCharacterSetIsSupersetOfSetPtr + .asFunction(); - void CFStringTrim( - CFMutableStringRef theString, - CFStringRef trimString, + int CFCharacterSetHasMemberInPlane( + CFCharacterSetRef theSet, + int thePlane, ) { - return _CFStringTrim( - theString, - trimString, + return _CFCharacterSetHasMemberInPlane( + theSet, + thePlane, ); } - late final _CFStringTrimPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFStringRef)>>('CFStringTrim'); - late final _CFStringTrim = _CFStringTrimPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef)>(); + late final _CFCharacterSetHasMemberInPlanePtr = + _lookup>( + 'CFCharacterSetHasMemberInPlane'); + late final _CFCharacterSetHasMemberInPlane = + _CFCharacterSetHasMemberInPlanePtr.asFunction< + int Function(CFCharacterSetRef, int)>(); - void CFStringTrimWhitespace( - CFMutableStringRef theString, + CFMutableCharacterSetRef CFCharacterSetCreateMutable( + CFAllocatorRef alloc, ) { - return _CFStringTrimWhitespace( - theString, + return _CFCharacterSetCreateMutable( + alloc, ); } - late final _CFStringTrimWhitespacePtr = - _lookup>( - 'CFStringTrimWhitespace'); - late final _CFStringTrimWhitespace = _CFStringTrimWhitespacePtr.asFunction< - void Function(CFMutableStringRef)>(); + late final _CFCharacterSetCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableCharacterSetRef Function( + CFAllocatorRef)>>('CFCharacterSetCreateMutable'); + late final _CFCharacterSetCreateMutable = _CFCharacterSetCreateMutablePtr + .asFunction(); - void CFStringLowercase( - CFMutableStringRef theString, - CFLocaleRef locale, + CFCharacterSetRef CFCharacterSetCreateCopy( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return _CFStringLowercase( - theString, - locale, + return _CFCharacterSetCreateCopy( + alloc, + theSet, ); } - late final _CFStringLowercasePtr = _lookup< + late final _CFCharacterSetCreateCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFLocaleRef)>>('CFStringLowercase'); - late final _CFStringLowercase = _CFStringLowercasePtr.asFunction< - void Function(CFMutableStringRef, CFLocaleRef)>(); + CFCharacterSetRef Function( + CFAllocatorRef, CFCharacterSetRef)>>('CFCharacterSetCreateCopy'); + late final _CFCharacterSetCreateCopy = + _CFCharacterSetCreateCopyPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); - void CFStringUppercase( - CFMutableStringRef theString, - CFLocaleRef locale, + CFMutableCharacterSetRef CFCharacterSetCreateMutableCopy( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return _CFStringUppercase( - theString, - locale, + return _CFCharacterSetCreateMutableCopy( + alloc, + theSet, ); } - late final _CFStringUppercasePtr = _lookup< + late final _CFCharacterSetCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFLocaleRef)>>('CFStringUppercase'); - late final _CFStringUppercase = _CFStringUppercasePtr.asFunction< - void Function(CFMutableStringRef, CFLocaleRef)>(); + CFMutableCharacterSetRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateMutableCopy'); + late final _CFCharacterSetCreateMutableCopy = + _CFCharacterSetCreateMutableCopyPtr.asFunction< + CFMutableCharacterSetRef Function( + CFAllocatorRef, CFCharacterSetRef)>(); - void CFStringCapitalize( - CFMutableStringRef theString, - CFLocaleRef locale, + int CFCharacterSetIsCharacterMember( + CFCharacterSetRef theSet, + int theChar, ) { - return _CFStringCapitalize( - theString, - locale, + return _CFCharacterSetIsCharacterMember( + theSet, + theChar, ); } - late final _CFStringCapitalizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFLocaleRef)>>('CFStringCapitalize'); - late final _CFStringCapitalize = _CFStringCapitalizePtr.asFunction< - void Function(CFMutableStringRef, CFLocaleRef)>(); + late final _CFCharacterSetIsCharacterMemberPtr = + _lookup>( + 'CFCharacterSetIsCharacterMember'); + late final _CFCharacterSetIsCharacterMember = + _CFCharacterSetIsCharacterMemberPtr.asFunction< + int Function(CFCharacterSetRef, int)>(); - void CFStringNormalize( - CFMutableStringRef theString, - int theForm, + int CFCharacterSetIsLongCharacterMember( + CFCharacterSetRef theSet, + int theChar, ) { - return _CFStringNormalize( - theString, - theForm, + return _CFCharacterSetIsLongCharacterMember( + theSet, + theChar, ); } - late final _CFStringNormalizePtr = _lookup< - ffi.NativeFunction>( - 'CFStringNormalize'); - late final _CFStringNormalize = _CFStringNormalizePtr.asFunction< - void Function(CFMutableStringRef, int)>(); + late final _CFCharacterSetIsLongCharacterMemberPtr = _lookup< + ffi.NativeFunction>( + 'CFCharacterSetIsLongCharacterMember'); + late final _CFCharacterSetIsLongCharacterMember = + _CFCharacterSetIsLongCharacterMemberPtr.asFunction< + int Function(CFCharacterSetRef, int)>(); - void CFStringFold( - CFMutableStringRef theString, - int theFlags, - CFLocaleRef theLocale, + CFDataRef CFCharacterSetCreateBitmapRepresentation( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return _CFStringFold( - theString, - theFlags, - theLocale, + return _CFCharacterSetCreateBitmapRepresentation( + alloc, + theSet, ); } - late final _CFStringFoldPtr = _lookup< + late final _CFCharacterSetCreateBitmapRepresentationPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, ffi.Int32, CFLocaleRef)>>('CFStringFold'); - late final _CFStringFold = _CFStringFoldPtr.asFunction< - void Function(CFMutableStringRef, int, CFLocaleRef)>(); + CFDataRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateBitmapRepresentation'); + late final _CFCharacterSetCreateBitmapRepresentation = + _CFCharacterSetCreateBitmapRepresentationPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFCharacterSetRef)>(); - int CFStringTransform( - CFMutableStringRef string, - ffi.Pointer range, - CFStringRef transform, - int reverse, + void CFCharacterSetAddCharactersInRange( + CFMutableCharacterSetRef theSet, + CFRange theRange, ) { - return _CFStringTransform( - string, - range, - transform, - reverse, + return _CFCharacterSetAddCharactersInRange( + theSet, + theRange, ); } - late final _CFStringTransformPtr = _lookup< + late final _CFCharacterSetAddCharactersInRangePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFMutableStringRef, ffi.Pointer, - CFStringRef, Boolean)>>('CFStringTransform'); - late final _CFStringTransform = _CFStringTransformPtr.asFunction< - int Function( - CFMutableStringRef, ffi.Pointer, CFStringRef, int)>(); + ffi.Void Function(CFMutableCharacterSetRef, + CFRange)>>('CFCharacterSetAddCharactersInRange'); + late final _CFCharacterSetAddCharactersInRange = + _CFCharacterSetAddCharactersInRangePtr.asFunction< + void Function(CFMutableCharacterSetRef, CFRange)>(); - late final ffi.Pointer _kCFStringTransformStripCombiningMarks = - _lookup('kCFStringTransformStripCombiningMarks'); + void CFCharacterSetRemoveCharactersInRange( + CFMutableCharacterSetRef theSet, + CFRange theRange, + ) { + return _CFCharacterSetRemoveCharactersInRange( + theSet, + theRange, + ); + } - CFStringRef get kCFStringTransformStripCombiningMarks => - _kCFStringTransformStripCombiningMarks.value; + late final _CFCharacterSetRemoveCharactersInRangePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFRange)>>('CFCharacterSetRemoveCharactersInRange'); + late final _CFCharacterSetRemoveCharactersInRange = + _CFCharacterSetRemoveCharactersInRangePtr.asFunction< + void Function(CFMutableCharacterSetRef, CFRange)>(); - set kCFStringTransformStripCombiningMarks(CFStringRef value) => - _kCFStringTransformStripCombiningMarks.value = value; + void CFCharacterSetAddCharactersInString( + CFMutableCharacterSetRef theSet, + CFStringRef theString, + ) { + return _CFCharacterSetAddCharactersInString( + theSet, + theString, + ); + } - late final ffi.Pointer _kCFStringTransformToLatin = - _lookup('kCFStringTransformToLatin'); + late final _CFCharacterSetAddCharactersInStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFStringRef)>>('CFCharacterSetAddCharactersInString'); + late final _CFCharacterSetAddCharactersInString = + _CFCharacterSetAddCharactersInStringPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFStringRef)>(); - CFStringRef get kCFStringTransformToLatin => _kCFStringTransformToLatin.value; + void CFCharacterSetRemoveCharactersInString( + CFMutableCharacterSetRef theSet, + CFStringRef theString, + ) { + return _CFCharacterSetRemoveCharactersInString( + theSet, + theString, + ); + } - set kCFStringTransformToLatin(CFStringRef value) => - _kCFStringTransformToLatin.value = value; + late final _CFCharacterSetRemoveCharactersInStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFStringRef)>>('CFCharacterSetRemoveCharactersInString'); + late final _CFCharacterSetRemoveCharactersInString = + _CFCharacterSetRemoveCharactersInStringPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFStringRef)>(); - late final ffi.Pointer _kCFStringTransformFullwidthHalfwidth = - _lookup('kCFStringTransformFullwidthHalfwidth'); + void CFCharacterSetUnion( + CFMutableCharacterSetRef theSet, + CFCharacterSetRef theOtherSet, + ) { + return _CFCharacterSetUnion( + theSet, + theOtherSet, + ); + } - CFStringRef get kCFStringTransformFullwidthHalfwidth => - _kCFStringTransformFullwidthHalfwidth.value; + late final _CFCharacterSetUnionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetUnion'); + late final _CFCharacterSetUnion = _CFCharacterSetUnionPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); - set kCFStringTransformFullwidthHalfwidth(CFStringRef value) => - _kCFStringTransformFullwidthHalfwidth.value = value; + void CFCharacterSetIntersect( + CFMutableCharacterSetRef theSet, + CFCharacterSetRef theOtherSet, + ) { + return _CFCharacterSetIntersect( + theSet, + theOtherSet, + ); + } - late final ffi.Pointer _kCFStringTransformLatinKatakana = - _lookup('kCFStringTransformLatinKatakana'); + late final _CFCharacterSetIntersectPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetIntersect'); + late final _CFCharacterSetIntersect = _CFCharacterSetIntersectPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); - CFStringRef get kCFStringTransformLatinKatakana => - _kCFStringTransformLatinKatakana.value; + void CFCharacterSetInvert( + CFMutableCharacterSetRef theSet, + ) { + return _CFCharacterSetInvert( + theSet, + ); + } - set kCFStringTransformLatinKatakana(CFStringRef value) => - _kCFStringTransformLatinKatakana.value = value; + late final _CFCharacterSetInvertPtr = + _lookup>( + 'CFCharacterSetInvert'); + late final _CFCharacterSetInvert = _CFCharacterSetInvertPtr.asFunction< + void Function(CFMutableCharacterSetRef)>(); - late final ffi.Pointer _kCFStringTransformLatinHiragana = - _lookup('kCFStringTransformLatinHiragana'); + int CFErrorGetTypeID() { + return _CFErrorGetTypeID(); + } - CFStringRef get kCFStringTransformLatinHiragana => - _kCFStringTransformLatinHiragana.value; + late final _CFErrorGetTypeIDPtr = + _lookup>('CFErrorGetTypeID'); + late final _CFErrorGetTypeID = + _CFErrorGetTypeIDPtr.asFunction(); - set kCFStringTransformLatinHiragana(CFStringRef value) => - _kCFStringTransformLatinHiragana.value = value; + late final ffi.Pointer _kCFErrorDomainPOSIX = + _lookup('kCFErrorDomainPOSIX'); - late final ffi.Pointer _kCFStringTransformHiraganaKatakana = - _lookup('kCFStringTransformHiraganaKatakana'); + CFErrorDomain get kCFErrorDomainPOSIX => _kCFErrorDomainPOSIX.value; - CFStringRef get kCFStringTransformHiraganaKatakana => - _kCFStringTransformHiraganaKatakana.value; + set kCFErrorDomainPOSIX(CFErrorDomain value) => + _kCFErrorDomainPOSIX.value = value; - set kCFStringTransformHiraganaKatakana(CFStringRef value) => - _kCFStringTransformHiraganaKatakana.value = value; + late final ffi.Pointer _kCFErrorDomainOSStatus = + _lookup('kCFErrorDomainOSStatus'); - late final ffi.Pointer _kCFStringTransformMandarinLatin = - _lookup('kCFStringTransformMandarinLatin'); + CFErrorDomain get kCFErrorDomainOSStatus => _kCFErrorDomainOSStatus.value; - CFStringRef get kCFStringTransformMandarinLatin => - _kCFStringTransformMandarinLatin.value; + set kCFErrorDomainOSStatus(CFErrorDomain value) => + _kCFErrorDomainOSStatus.value = value; - set kCFStringTransformMandarinLatin(CFStringRef value) => - _kCFStringTransformMandarinLatin.value = value; + late final ffi.Pointer _kCFErrorDomainMach = + _lookup('kCFErrorDomainMach'); - late final ffi.Pointer _kCFStringTransformLatinHangul = - _lookup('kCFStringTransformLatinHangul'); + CFErrorDomain get kCFErrorDomainMach => _kCFErrorDomainMach.value; - CFStringRef get kCFStringTransformLatinHangul => - _kCFStringTransformLatinHangul.value; + set kCFErrorDomainMach(CFErrorDomain value) => + _kCFErrorDomainMach.value = value; - set kCFStringTransformLatinHangul(CFStringRef value) => - _kCFStringTransformLatinHangul.value = value; + late final ffi.Pointer _kCFErrorDomainCocoa = + _lookup('kCFErrorDomainCocoa'); - late final ffi.Pointer _kCFStringTransformLatinArabic = - _lookup('kCFStringTransformLatinArabic'); + CFErrorDomain get kCFErrorDomainCocoa => _kCFErrorDomainCocoa.value; - CFStringRef get kCFStringTransformLatinArabic => - _kCFStringTransformLatinArabic.value; + set kCFErrorDomainCocoa(CFErrorDomain value) => + _kCFErrorDomainCocoa.value = value; - set kCFStringTransformLatinArabic(CFStringRef value) => - _kCFStringTransformLatinArabic.value = value; + late final ffi.Pointer _kCFErrorLocalizedDescriptionKey = + _lookup('kCFErrorLocalizedDescriptionKey'); - late final ffi.Pointer _kCFStringTransformLatinHebrew = - _lookup('kCFStringTransformLatinHebrew'); + CFStringRef get kCFErrorLocalizedDescriptionKey => + _kCFErrorLocalizedDescriptionKey.value; - CFStringRef get kCFStringTransformLatinHebrew => - _kCFStringTransformLatinHebrew.value; + set kCFErrorLocalizedDescriptionKey(CFStringRef value) => + _kCFErrorLocalizedDescriptionKey.value = value; - set kCFStringTransformLatinHebrew(CFStringRef value) => - _kCFStringTransformLatinHebrew.value = value; + late final ffi.Pointer _kCFErrorLocalizedFailureKey = + _lookup('kCFErrorLocalizedFailureKey'); - late final ffi.Pointer _kCFStringTransformLatinThai = - _lookup('kCFStringTransformLatinThai'); + CFStringRef get kCFErrorLocalizedFailureKey => + _kCFErrorLocalizedFailureKey.value; - CFStringRef get kCFStringTransformLatinThai => - _kCFStringTransformLatinThai.value; + set kCFErrorLocalizedFailureKey(CFStringRef value) => + _kCFErrorLocalizedFailureKey.value = value; - set kCFStringTransformLatinThai(CFStringRef value) => - _kCFStringTransformLatinThai.value = value; + late final ffi.Pointer _kCFErrorLocalizedFailureReasonKey = + _lookup('kCFErrorLocalizedFailureReasonKey'); - late final ffi.Pointer _kCFStringTransformLatinCyrillic = - _lookup('kCFStringTransformLatinCyrillic'); + CFStringRef get kCFErrorLocalizedFailureReasonKey => + _kCFErrorLocalizedFailureReasonKey.value; - CFStringRef get kCFStringTransformLatinCyrillic => - _kCFStringTransformLatinCyrillic.value; + set kCFErrorLocalizedFailureReasonKey(CFStringRef value) => + _kCFErrorLocalizedFailureReasonKey.value = value; - set kCFStringTransformLatinCyrillic(CFStringRef value) => - _kCFStringTransformLatinCyrillic.value = value; + late final ffi.Pointer _kCFErrorLocalizedRecoverySuggestionKey = + _lookup('kCFErrorLocalizedRecoverySuggestionKey'); - late final ffi.Pointer _kCFStringTransformLatinGreek = - _lookup('kCFStringTransformLatinGreek'); + CFStringRef get kCFErrorLocalizedRecoverySuggestionKey => + _kCFErrorLocalizedRecoverySuggestionKey.value; - CFStringRef get kCFStringTransformLatinGreek => - _kCFStringTransformLatinGreek.value; + set kCFErrorLocalizedRecoverySuggestionKey(CFStringRef value) => + _kCFErrorLocalizedRecoverySuggestionKey.value = value; - set kCFStringTransformLatinGreek(CFStringRef value) => - _kCFStringTransformLatinGreek.value = value; + late final ffi.Pointer _kCFErrorDescriptionKey = + _lookup('kCFErrorDescriptionKey'); - late final ffi.Pointer _kCFStringTransformToXMLHex = - _lookup('kCFStringTransformToXMLHex'); + CFStringRef get kCFErrorDescriptionKey => _kCFErrorDescriptionKey.value; - CFStringRef get kCFStringTransformToXMLHex => - _kCFStringTransformToXMLHex.value; + set kCFErrorDescriptionKey(CFStringRef value) => + _kCFErrorDescriptionKey.value = value; - set kCFStringTransformToXMLHex(CFStringRef value) => - _kCFStringTransformToXMLHex.value = value; + late final ffi.Pointer _kCFErrorUnderlyingErrorKey = + _lookup('kCFErrorUnderlyingErrorKey'); - late final ffi.Pointer _kCFStringTransformToUnicodeName = - _lookup('kCFStringTransformToUnicodeName'); + CFStringRef get kCFErrorUnderlyingErrorKey => + _kCFErrorUnderlyingErrorKey.value; - CFStringRef get kCFStringTransformToUnicodeName => - _kCFStringTransformToUnicodeName.value; + set kCFErrorUnderlyingErrorKey(CFStringRef value) => + _kCFErrorUnderlyingErrorKey.value = value; - set kCFStringTransformToUnicodeName(CFStringRef value) => - _kCFStringTransformToUnicodeName.value = value; + late final ffi.Pointer _kCFErrorURLKey = + _lookup('kCFErrorURLKey'); - late final ffi.Pointer _kCFStringTransformStripDiacritics = - _lookup('kCFStringTransformStripDiacritics'); + CFStringRef get kCFErrorURLKey => _kCFErrorURLKey.value; - CFStringRef get kCFStringTransformStripDiacritics => - _kCFStringTransformStripDiacritics.value; + set kCFErrorURLKey(CFStringRef value) => _kCFErrorURLKey.value = value; - set kCFStringTransformStripDiacritics(CFStringRef value) => - _kCFStringTransformStripDiacritics.value = value; + late final ffi.Pointer _kCFErrorFilePathKey = + _lookup('kCFErrorFilePathKey'); - int CFStringIsEncodingAvailable( - int encoding, + CFStringRef get kCFErrorFilePathKey => _kCFErrorFilePathKey.value; + + set kCFErrorFilePathKey(CFStringRef value) => + _kCFErrorFilePathKey.value = value; + + CFErrorRef CFErrorCreate( + CFAllocatorRef allocator, + CFErrorDomain domain, + int code, + CFDictionaryRef userInfo, ) { - return _CFStringIsEncodingAvailable( - encoding, + return _CFErrorCreate( + allocator, + domain, + code, + userInfo, ); } - late final _CFStringIsEncodingAvailablePtr = - _lookup>( - 'CFStringIsEncodingAvailable'); - late final _CFStringIsEncodingAvailable = - _CFStringIsEncodingAvailablePtr.asFunction(); + late final _CFErrorCreatePtr = _lookup< + ffi.NativeFunction< + CFErrorRef Function(CFAllocatorRef, CFErrorDomain, CFIndex, + CFDictionaryRef)>>('CFErrorCreate'); + late final _CFErrorCreate = _CFErrorCreatePtr.asFunction< + CFErrorRef Function( + CFAllocatorRef, CFErrorDomain, int, CFDictionaryRef)>(); - ffi.Pointer CFStringGetListOfAvailableEncodings() { - return _CFStringGetListOfAvailableEncodings(); + CFErrorRef CFErrorCreateWithUserInfoKeysAndValues( + CFAllocatorRef allocator, + CFErrorDomain domain, + int code, + ffi.Pointer> userInfoKeys, + ffi.Pointer> userInfoValues, + int numUserInfoValues, + ) { + return _CFErrorCreateWithUserInfoKeysAndValues( + allocator, + domain, + code, + userInfoKeys, + userInfoValues, + numUserInfoValues, + ); } - late final _CFStringGetListOfAvailableEncodingsPtr = - _lookup Function()>>( - 'CFStringGetListOfAvailableEncodings'); - late final _CFStringGetListOfAvailableEncodings = - _CFStringGetListOfAvailableEncodingsPtr.asFunction< - ffi.Pointer Function()>(); + late final _CFErrorCreateWithUserInfoKeysAndValuesPtr = _lookup< + ffi.NativeFunction< + CFErrorRef Function( + CFAllocatorRef, + CFErrorDomain, + CFIndex, + ffi.Pointer>, + ffi.Pointer>, + CFIndex)>>('CFErrorCreateWithUserInfoKeysAndValues'); + late final _CFErrorCreateWithUserInfoKeysAndValues = + _CFErrorCreateWithUserInfoKeysAndValuesPtr.asFunction< + CFErrorRef Function( + CFAllocatorRef, + CFErrorDomain, + int, + ffi.Pointer>, + ffi.Pointer>, + int)>(); - CFStringRef CFStringGetNameOfEncoding( - int encoding, + CFErrorDomain CFErrorGetDomain( + CFErrorRef err, ) { - return _CFStringGetNameOfEncoding( - encoding, + return _CFErrorGetDomain( + err, ); } - late final _CFStringGetNameOfEncodingPtr = - _lookup>( - 'CFStringGetNameOfEncoding'); - late final _CFStringGetNameOfEncoding = - _CFStringGetNameOfEncodingPtr.asFunction(); + late final _CFErrorGetDomainPtr = + _lookup>( + 'CFErrorGetDomain'); + late final _CFErrorGetDomain = + _CFErrorGetDomainPtr.asFunction(); - int CFStringConvertEncodingToNSStringEncoding( - int encoding, + int CFErrorGetCode( + CFErrorRef err, ) { - return _CFStringConvertEncodingToNSStringEncoding( - encoding, + return _CFErrorGetCode( + err, ); } - late final _CFStringConvertEncodingToNSStringEncodingPtr = - _lookup>( - 'CFStringConvertEncodingToNSStringEncoding'); - late final _CFStringConvertEncodingToNSStringEncoding = - _CFStringConvertEncodingToNSStringEncodingPtr.asFunction< - int Function(int)>(); + late final _CFErrorGetCodePtr = + _lookup>( + 'CFErrorGetCode'); + late final _CFErrorGetCode = + _CFErrorGetCodePtr.asFunction(); - int CFStringConvertNSStringEncodingToEncoding( - int encoding, + CFDictionaryRef CFErrorCopyUserInfo( + CFErrorRef err, ) { - return _CFStringConvertNSStringEncodingToEncoding( - encoding, + return _CFErrorCopyUserInfo( + err, ); } - late final _CFStringConvertNSStringEncodingToEncodingPtr = - _lookup>( - 'CFStringConvertNSStringEncodingToEncoding'); - late final _CFStringConvertNSStringEncodingToEncoding = - _CFStringConvertNSStringEncodingToEncodingPtr.asFunction< - int Function(int)>(); + late final _CFErrorCopyUserInfoPtr = + _lookup>( + 'CFErrorCopyUserInfo'); + late final _CFErrorCopyUserInfo = _CFErrorCopyUserInfoPtr.asFunction< + CFDictionaryRef Function(CFErrorRef)>(); - int CFStringConvertEncodingToWindowsCodepage( - int encoding, + CFStringRef CFErrorCopyDescription( + CFErrorRef err, ) { - return _CFStringConvertEncodingToWindowsCodepage( - encoding, + return _CFErrorCopyDescription( + err, ); } - late final _CFStringConvertEncodingToWindowsCodepagePtr = - _lookup>( - 'CFStringConvertEncodingToWindowsCodepage'); - late final _CFStringConvertEncodingToWindowsCodepage = - _CFStringConvertEncodingToWindowsCodepagePtr.asFunction< - int Function(int)>(); + late final _CFErrorCopyDescriptionPtr = + _lookup>( + 'CFErrorCopyDescription'); + late final _CFErrorCopyDescription = + _CFErrorCopyDescriptionPtr.asFunction(); - int CFStringConvertWindowsCodepageToEncoding( - int codepage, + CFStringRef CFErrorCopyFailureReason( + CFErrorRef err, ) { - return _CFStringConvertWindowsCodepageToEncoding( - codepage, + return _CFErrorCopyFailureReason( + err, ); } - late final _CFStringConvertWindowsCodepageToEncodingPtr = - _lookup>( - 'CFStringConvertWindowsCodepageToEncoding'); - late final _CFStringConvertWindowsCodepageToEncoding = - _CFStringConvertWindowsCodepageToEncodingPtr.asFunction< - int Function(int)>(); + late final _CFErrorCopyFailureReasonPtr = + _lookup>( + 'CFErrorCopyFailureReason'); + late final _CFErrorCopyFailureReason = _CFErrorCopyFailureReasonPtr + .asFunction(); - int CFStringConvertIANACharSetNameToEncoding( - CFStringRef theString, + CFStringRef CFErrorCopyRecoverySuggestion( + CFErrorRef err, ) { - return _CFStringConvertIANACharSetNameToEncoding( - theString, + return _CFErrorCopyRecoverySuggestion( + err, ); } - late final _CFStringConvertIANACharSetNameToEncodingPtr = - _lookup>( - 'CFStringConvertIANACharSetNameToEncoding'); - late final _CFStringConvertIANACharSetNameToEncoding = - _CFStringConvertIANACharSetNameToEncodingPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFErrorCopyRecoverySuggestionPtr = + _lookup>( + 'CFErrorCopyRecoverySuggestion'); + late final _CFErrorCopyRecoverySuggestion = _CFErrorCopyRecoverySuggestionPtr + .asFunction(); - CFStringRef CFStringConvertEncodingToIANACharSetName( + int CFStringGetTypeID() { + return _CFStringGetTypeID(); + } + + late final _CFStringGetTypeIDPtr = + _lookup>('CFStringGetTypeID'); + late final _CFStringGetTypeID = + _CFStringGetTypeIDPtr.asFunction(); + + CFStringRef CFStringCreateWithPascalString( + CFAllocatorRef alloc, + ConstStr255Param pStr, int encoding, ) { - return _CFStringConvertEncodingToIANACharSetName( + return _CFStringCreateWithPascalString( + alloc, + pStr, encoding, ); } - late final _CFStringConvertEncodingToIANACharSetNamePtr = - _lookup>( - 'CFStringConvertEncodingToIANACharSetName'); - late final _CFStringConvertEncodingToIANACharSetName = - _CFStringConvertEncodingToIANACharSetNamePtr.asFunction< - CFStringRef Function(int)>(); + late final _CFStringCreateWithPascalStringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ConstStr255Param, + CFStringEncoding)>>('CFStringCreateWithPascalString'); + late final _CFStringCreateWithPascalString = + _CFStringCreateWithPascalStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ConstStr255Param, int)>(); - int CFStringGetMostCompatibleMacStringEncoding( + CFStringRef CFStringCreateWithCString( + CFAllocatorRef alloc, + ffi.Pointer cStr, int encoding, ) { - return _CFStringGetMostCompatibleMacStringEncoding( + return _CFStringCreateWithCString( + alloc, + cStr, encoding, ); } - late final _CFStringGetMostCompatibleMacStringEncodingPtr = - _lookup>( - 'CFStringGetMostCompatibleMacStringEncoding'); - late final _CFStringGetMostCompatibleMacStringEncoding = - _CFStringGetMostCompatibleMacStringEncodingPtr.asFunction< - int Function(int)>(); + late final _CFStringCreateWithCStringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, + CFStringEncoding)>>('CFStringCreateWithCString'); + late final _CFStringCreateWithCString = + _CFStringCreateWithCStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - void CFShow( - CFTypeRef obj, + CFStringRef CFStringCreateWithBytes( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int numBytes, + int encoding, + int isExternalRepresentation, ) { - return _CFShow( - obj, + return _CFStringCreateWithBytes( + alloc, + bytes, + numBytes, + encoding, + isExternalRepresentation, ); } - late final _CFShowPtr = - _lookup>('CFShow'); - late final _CFShow = _CFShowPtr.asFunction(); + late final _CFStringCreateWithBytesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFStringEncoding, Boolean)>>('CFStringCreateWithBytes'); + late final _CFStringCreateWithBytes = _CFStringCreateWithBytesPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, int, int)>(); - void CFShowStr( - CFStringRef str, + CFStringRef CFStringCreateWithCharacters( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, ) { - return _CFShowStr( - str, + return _CFStringCreateWithCharacters( + alloc, + chars, + numChars, ); } - late final _CFShowStrPtr = - _lookup>('CFShowStr'); - late final _CFShowStr = - _CFShowStrPtr.asFunction(); + late final _CFStringCreateWithCharactersPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFStringCreateWithCharacters'); + late final _CFStringCreateWithCharacters = + _CFStringCreateWithCharactersPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - CFStringRef __CFStringMakeConstantString( - ffi.Pointer cStr, + CFStringRef CFStringCreateWithPascalStringNoCopy( + CFAllocatorRef alloc, + ConstStr255Param pStr, + int encoding, + CFAllocatorRef contentsDeallocator, ) { - return ___CFStringMakeConstantString( - cStr, + return _CFStringCreateWithPascalStringNoCopy( + alloc, + pStr, + encoding, + contentsDeallocator, ); } - late final ___CFStringMakeConstantStringPtr = - _lookup)>>( - '__CFStringMakeConstantString'); - late final ___CFStringMakeConstantString = ___CFStringMakeConstantStringPtr - .asFunction)>(); - - int CFTimeZoneGetTypeID() { - return _CFTimeZoneGetTypeID(); - } - - late final _CFTimeZoneGetTypeIDPtr = - _lookup>('CFTimeZoneGetTypeID'); - late final _CFTimeZoneGetTypeID = - _CFTimeZoneGetTypeIDPtr.asFunction(); - - CFTimeZoneRef CFTimeZoneCopySystem() { - return _CFTimeZoneCopySystem(); - } - - late final _CFTimeZoneCopySystemPtr = - _lookup>( - 'CFTimeZoneCopySystem'); - late final _CFTimeZoneCopySystem = - _CFTimeZoneCopySystemPtr.asFunction(); + late final _CFStringCreateWithPascalStringNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + ConstStr255Param, + CFStringEncoding, + CFAllocatorRef)>>('CFStringCreateWithPascalStringNoCopy'); + late final _CFStringCreateWithPascalStringNoCopy = + _CFStringCreateWithPascalStringNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ConstStr255Param, int, CFAllocatorRef)>(); - void CFTimeZoneResetSystem() { - return _CFTimeZoneResetSystem(); + CFStringRef CFStringCreateWithCStringNoCopy( + CFAllocatorRef alloc, + ffi.Pointer cStr, + int encoding, + CFAllocatorRef contentsDeallocator, + ) { + return _CFStringCreateWithCStringNoCopy( + alloc, + cStr, + encoding, + contentsDeallocator, + ); } - late final _CFTimeZoneResetSystemPtr = - _lookup>('CFTimeZoneResetSystem'); - late final _CFTimeZoneResetSystem = - _CFTimeZoneResetSystemPtr.asFunction(); + late final _CFStringCreateWithCStringNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + ffi.Pointer, + CFStringEncoding, + CFAllocatorRef)>>('CFStringCreateWithCStringNoCopy'); + late final _CFStringCreateWithCStringNoCopy = + _CFStringCreateWithCStringNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - CFTimeZoneRef CFTimeZoneCopyDefault() { - return _CFTimeZoneCopyDefault(); + CFStringRef CFStringCreateWithBytesNoCopy( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int numBytes, + int encoding, + int isExternalRepresentation, + CFAllocatorRef contentsDeallocator, + ) { + return _CFStringCreateWithBytesNoCopy( + alloc, + bytes, + numBytes, + encoding, + isExternalRepresentation, + contentsDeallocator, + ); } - late final _CFTimeZoneCopyDefaultPtr = - _lookup>( - 'CFTimeZoneCopyDefault'); - late final _CFTimeZoneCopyDefault = - _CFTimeZoneCopyDefaultPtr.asFunction(); + late final _CFStringCreateWithBytesNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + ffi.Pointer, + CFIndex, + CFStringEncoding, + Boolean, + CFAllocatorRef)>>('CFStringCreateWithBytesNoCopy'); + late final _CFStringCreateWithBytesNoCopy = + _CFStringCreateWithBytesNoCopyPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int, int, + int, CFAllocatorRef)>(); - void CFTimeZoneSetDefault( - CFTimeZoneRef tz, + CFStringRef CFStringCreateWithCharactersNoCopy( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, + CFAllocatorRef contentsDeallocator, ) { - return _CFTimeZoneSetDefault( - tz, + return _CFStringCreateWithCharactersNoCopy( + alloc, + chars, + numChars, + contentsDeallocator, ); } - late final _CFTimeZoneSetDefaultPtr = - _lookup>( - 'CFTimeZoneSetDefault'); - late final _CFTimeZoneSetDefault = - _CFTimeZoneSetDefaultPtr.asFunction(); - - CFArrayRef CFTimeZoneCopyKnownNames() { - return _CFTimeZoneCopyKnownNames(); - } - - late final _CFTimeZoneCopyKnownNamesPtr = - _lookup>( - 'CFTimeZoneCopyKnownNames'); - late final _CFTimeZoneCopyKnownNames = - _CFTimeZoneCopyKnownNamesPtr.asFunction(); - - CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary() { - return _CFTimeZoneCopyAbbreviationDictionary(); - } - - late final _CFTimeZoneCopyAbbreviationDictionaryPtr = - _lookup>( - 'CFTimeZoneCopyAbbreviationDictionary'); - late final _CFTimeZoneCopyAbbreviationDictionary = - _CFTimeZoneCopyAbbreviationDictionaryPtr.asFunction< - CFDictionaryRef Function()>(); + late final _CFStringCreateWithCharactersNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFStringCreateWithCharactersNoCopy'); + late final _CFStringCreateWithCharactersNoCopy = + _CFStringCreateWithCharactersNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - void CFTimeZoneSetAbbreviationDictionary( - CFDictionaryRef dict, + CFStringRef CFStringCreateWithSubstring( + CFAllocatorRef alloc, + CFStringRef str, + CFRange range, ) { - return _CFTimeZoneSetAbbreviationDictionary( - dict, + return _CFStringCreateWithSubstring( + alloc, + str, + range, ); } - late final _CFTimeZoneSetAbbreviationDictionaryPtr = - _lookup>( - 'CFTimeZoneSetAbbreviationDictionary'); - late final _CFTimeZoneSetAbbreviationDictionary = - _CFTimeZoneSetAbbreviationDictionaryPtr.asFunction< - void Function(CFDictionaryRef)>(); + late final _CFStringCreateWithSubstringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFRange)>>('CFStringCreateWithSubstring'); + late final _CFStringCreateWithSubstring = _CFStringCreateWithSubstringPtr + .asFunction(); - CFTimeZoneRef CFTimeZoneCreate( - CFAllocatorRef allocator, - CFStringRef name, - CFDataRef data, + CFStringRef CFStringCreateCopy( + CFAllocatorRef alloc, + CFStringRef theString, ) { - return _CFTimeZoneCreate( - allocator, - name, - data, + return _CFStringCreateCopy( + alloc, + theString, ); } - late final _CFTimeZoneCreatePtr = _lookup< + late final _CFStringCreateCopyPtr = _lookup< ffi.NativeFunction< - CFTimeZoneRef Function( - CFAllocatorRef, CFStringRef, CFDataRef)>>('CFTimeZoneCreate'); - late final _CFTimeZoneCreate = _CFTimeZoneCreatePtr.asFunction< - CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); + CFStringRef Function( + CFAllocatorRef, CFStringRef)>>('CFStringCreateCopy'); + late final _CFStringCreateCopy = _CFStringCreateCopyPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef)>(); - CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT( - CFAllocatorRef allocator, - double ti, + CFStringRef CFStringCreateWithFormat( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef format, ) { - return _CFTimeZoneCreateWithTimeIntervalFromGMT( - allocator, - ti, + return _CFStringCreateWithFormat( + alloc, + formatOptions, + format, ); } - late final _CFTimeZoneCreateWithTimeIntervalFromGMTPtr = _lookup< + late final _CFStringCreateWithFormatPtr = _lookup< ffi.NativeFunction< - CFTimeZoneRef Function(CFAllocatorRef, - CFTimeInterval)>>('CFTimeZoneCreateWithTimeIntervalFromGMT'); - late final _CFTimeZoneCreateWithTimeIntervalFromGMT = - _CFTimeZoneCreateWithTimeIntervalFromGMTPtr.asFunction< - CFTimeZoneRef Function(CFAllocatorRef, double)>(); + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, + CFStringRef)>>('CFStringCreateWithFormat'); + late final _CFStringCreateWithFormat = + _CFStringCreateWithFormatPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef)>(); - CFTimeZoneRef CFTimeZoneCreateWithName( - CFAllocatorRef allocator, - CFStringRef name, - int tryAbbrev, + CFStringRef CFStringCreateWithFormatAndArguments( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef format, + va_list arguments, ) { - return _CFTimeZoneCreateWithName( - allocator, - name, - tryAbbrev, + return _CFStringCreateWithFormatAndArguments( + alloc, + formatOptions, + format, + arguments, ); } - late final _CFTimeZoneCreateWithNamePtr = _lookup< + late final _CFStringCreateWithFormatAndArgumentsPtr = _lookup< ffi.NativeFunction< - CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, - Boolean)>>('CFTimeZoneCreateWithName'); - late final _CFTimeZoneCreateWithName = _CFTimeZoneCreateWithNamePtr - .asFunction(); + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + va_list)>>('CFStringCreateWithFormatAndArguments'); + late final _CFStringCreateWithFormatAndArguments = + _CFStringCreateWithFormatAndArgumentsPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFDictionaryRef, CFStringRef, va_list)>(); - CFStringRef CFTimeZoneGetName( - CFTimeZoneRef tz, + CFStringRef CFStringCreateStringWithValidatedFormat( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef validFormatSpecifiers, + CFStringRef format, + ffi.Pointer errorPtr, ) { - return _CFTimeZoneGetName( - tz, + return _CFStringCreateStringWithValidatedFormat( + alloc, + formatOptions, + validFormatSpecifiers, + format, + errorPtr, ); } - late final _CFTimeZoneGetNamePtr = - _lookup>( - 'CFTimeZoneGetName'); - late final _CFTimeZoneGetName = - _CFTimeZoneGetNamePtr.asFunction(); + late final _CFStringCreateStringWithValidatedFormatPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + CFStringRef, ffi.Pointer)>>( + 'CFStringCreateStringWithValidatedFormat'); + late final _CFStringCreateStringWithValidatedFormat = + _CFStringCreateStringWithValidatedFormatPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + CFStringRef, ffi.Pointer)>(); - CFDataRef CFTimeZoneGetData( - CFTimeZoneRef tz, + CFStringRef CFStringCreateStringWithValidatedFormatAndArguments( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef validFormatSpecifiers, + CFStringRef format, + va_list arguments, + ffi.Pointer errorPtr, ) { - return _CFTimeZoneGetData( - tz, + return _CFStringCreateStringWithValidatedFormatAndArguments( + alloc, + formatOptions, + validFormatSpecifiers, + format, + arguments, + errorPtr, ); } - late final _CFTimeZoneGetDataPtr = - _lookup>( - 'CFTimeZoneGetData'); - late final _CFTimeZoneGetData = - _CFTimeZoneGetDataPtr.asFunction(); + late final _CFStringCreateStringWithValidatedFormatAndArgumentsPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + CFStringRef, va_list, ffi.Pointer)>>( + 'CFStringCreateStringWithValidatedFormatAndArguments'); + late final _CFStringCreateStringWithValidatedFormatAndArguments = + _CFStringCreateStringWithValidatedFormatAndArgumentsPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + CFStringRef, va_list, ffi.Pointer)>(); - double CFTimeZoneGetSecondsFromGMT( - CFTimeZoneRef tz, - double at, + CFMutableStringRef CFStringCreateMutable( + CFAllocatorRef alloc, + int maxLength, ) { - return _CFTimeZoneGetSecondsFromGMT( - tz, - at, + return _CFStringCreateMutable( + alloc, + maxLength, ); } - late final _CFTimeZoneGetSecondsFromGMTPtr = _lookup< + late final _CFStringCreateMutablePtr = _lookup< ffi.NativeFunction< - CFTimeInterval Function( - CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneGetSecondsFromGMT'); - late final _CFTimeZoneGetSecondsFromGMT = _CFTimeZoneGetSecondsFromGMTPtr - .asFunction(); + CFMutableStringRef Function( + CFAllocatorRef, CFIndex)>>('CFStringCreateMutable'); + late final _CFStringCreateMutable = _CFStringCreateMutablePtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, int)>(); - CFStringRef CFTimeZoneCopyAbbreviation( - CFTimeZoneRef tz, - double at, + CFMutableStringRef CFStringCreateMutableCopy( + CFAllocatorRef alloc, + int maxLength, + CFStringRef theString, ) { - return _CFTimeZoneCopyAbbreviation( - tz, - at, + return _CFStringCreateMutableCopy( + alloc, + maxLength, + theString, ); } - late final _CFTimeZoneCopyAbbreviationPtr = _lookup< + late final _CFStringCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - CFStringRef Function( - CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneCopyAbbreviation'); - late final _CFTimeZoneCopyAbbreviation = _CFTimeZoneCopyAbbreviationPtr - .asFunction(); + CFMutableStringRef Function(CFAllocatorRef, CFIndex, + CFStringRef)>>('CFStringCreateMutableCopy'); + late final _CFStringCreateMutableCopy = + _CFStringCreateMutableCopyPtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, int, CFStringRef)>(); - int CFTimeZoneIsDaylightSavingTime( - CFTimeZoneRef tz, - double at, + CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, + int capacity, + CFAllocatorRef externalCharactersAllocator, ) { - return _CFTimeZoneIsDaylightSavingTime( - tz, - at, + return _CFStringCreateMutableWithExternalCharactersNoCopy( + alloc, + chars, + numChars, + capacity, + externalCharactersAllocator, ); } - late final _CFTimeZoneIsDaylightSavingTimePtr = _lookup< - ffi.NativeFunction>( - 'CFTimeZoneIsDaylightSavingTime'); - late final _CFTimeZoneIsDaylightSavingTime = - _CFTimeZoneIsDaylightSavingTimePtr.asFunction< - int Function(CFTimeZoneRef, double)>(); + late final _CFStringCreateMutableWithExternalCharactersNoCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex, CFIndex, CFAllocatorRef)>>( + 'CFStringCreateMutableWithExternalCharactersNoCopy'); + late final _CFStringCreateMutableWithExternalCharactersNoCopy = + _CFStringCreateMutableWithExternalCharactersNoCopyPtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, int, + int, CFAllocatorRef)>(); - double CFTimeZoneGetDaylightSavingTimeOffset( - CFTimeZoneRef tz, - double at, + int CFStringGetLength( + CFStringRef theString, ) { - return _CFTimeZoneGetDaylightSavingTimeOffset( - tz, - at, + return _CFStringGetLength( + theString, ); } - late final _CFTimeZoneGetDaylightSavingTimeOffsetPtr = _lookup< - ffi.NativeFunction< - CFTimeInterval Function(CFTimeZoneRef, - CFAbsoluteTime)>>('CFTimeZoneGetDaylightSavingTimeOffset'); - late final _CFTimeZoneGetDaylightSavingTimeOffset = - _CFTimeZoneGetDaylightSavingTimeOffsetPtr.asFunction< - double Function(CFTimeZoneRef, double)>(); + late final _CFStringGetLengthPtr = + _lookup>( + 'CFStringGetLength'); + late final _CFStringGetLength = + _CFStringGetLengthPtr.asFunction(); - double CFTimeZoneGetNextDaylightSavingTimeTransition( - CFTimeZoneRef tz, - double at, + int CFStringGetCharacterAtIndex( + CFStringRef theString, + int idx, ) { - return _CFTimeZoneGetNextDaylightSavingTimeTransition( - tz, - at, + return _CFStringGetCharacterAtIndex( + theString, + idx, ); } - late final _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr = _lookup< - ffi.NativeFunction< - CFAbsoluteTime Function(CFTimeZoneRef, CFAbsoluteTime)>>( - 'CFTimeZoneGetNextDaylightSavingTimeTransition'); - late final _CFTimeZoneGetNextDaylightSavingTimeTransition = - _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr.asFunction< - double Function(CFTimeZoneRef, double)>(); + late final _CFStringGetCharacterAtIndexPtr = + _lookup>( + 'CFStringGetCharacterAtIndex'); + late final _CFStringGetCharacterAtIndex = _CFStringGetCharacterAtIndexPtr + .asFunction(); - CFStringRef CFTimeZoneCopyLocalizedName( - CFTimeZoneRef tz, - int style, - CFLocaleRef locale, + void CFStringGetCharacters( + CFStringRef theString, + CFRange range, + ffi.Pointer buffer, ) { - return _CFTimeZoneCopyLocalizedName( - tz, - style, - locale, + return _CFStringGetCharacters( + theString, + range, + buffer, ); } - late final _CFTimeZoneCopyLocalizedNamePtr = _lookup< + late final _CFStringGetCharactersPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFTimeZoneRef, ffi.Int32, - CFLocaleRef)>>('CFTimeZoneCopyLocalizedName'); - late final _CFTimeZoneCopyLocalizedName = _CFTimeZoneCopyLocalizedNamePtr - .asFunction(); - - late final ffi.Pointer - _kCFTimeZoneSystemTimeZoneDidChangeNotification = - _lookup( - 'kCFTimeZoneSystemTimeZoneDidChangeNotification'); - - CFNotificationName get kCFTimeZoneSystemTimeZoneDidChangeNotification => - _kCFTimeZoneSystemTimeZoneDidChangeNotification.value; - - set kCFTimeZoneSystemTimeZoneDidChangeNotification( - CFNotificationName value) => - _kCFTimeZoneSystemTimeZoneDidChangeNotification.value = value; - - int CFCalendarGetTypeID() { - return _CFCalendarGetTypeID(); - } - - late final _CFCalendarGetTypeIDPtr = - _lookup>('CFCalendarGetTypeID'); - late final _CFCalendarGetTypeID = - _CFCalendarGetTypeIDPtr.asFunction(); - - CFCalendarRef CFCalendarCopyCurrent() { - return _CFCalendarCopyCurrent(); - } - - late final _CFCalendarCopyCurrentPtr = - _lookup>( - 'CFCalendarCopyCurrent'); - late final _CFCalendarCopyCurrent = - _CFCalendarCopyCurrentPtr.asFunction(); + ffi.Void Function(CFStringRef, CFRange, + ffi.Pointer)>>('CFStringGetCharacters'); + late final _CFStringGetCharacters = _CFStringGetCharactersPtr.asFunction< + void Function(CFStringRef, CFRange, ffi.Pointer)>(); - CFCalendarRef CFCalendarCreateWithIdentifier( - CFAllocatorRef allocator, - CFCalendarIdentifier identifier, + int CFStringGetPascalString( + CFStringRef theString, + StringPtr buffer, + int bufferSize, + int encoding, ) { - return _CFCalendarCreateWithIdentifier( - allocator, - identifier, + return _CFStringGetPascalString( + theString, + buffer, + bufferSize, + encoding, ); } - late final _CFCalendarCreateWithIdentifierPtr = _lookup< + late final _CFStringGetPascalStringPtr = _lookup< ffi.NativeFunction< - CFCalendarRef Function(CFAllocatorRef, - CFCalendarIdentifier)>>('CFCalendarCreateWithIdentifier'); - late final _CFCalendarCreateWithIdentifier = - _CFCalendarCreateWithIdentifierPtr.asFunction< - CFCalendarRef Function(CFAllocatorRef, CFCalendarIdentifier)>(); + Boolean Function(CFStringRef, StringPtr, CFIndex, + CFStringEncoding)>>('CFStringGetPascalString'); + late final _CFStringGetPascalString = _CFStringGetPascalStringPtr.asFunction< + int Function(CFStringRef, StringPtr, int, int)>(); - CFCalendarIdentifier CFCalendarGetIdentifier( - CFCalendarRef calendar, + int CFStringGetCString( + CFStringRef theString, + ffi.Pointer buffer, + int bufferSize, + int encoding, ) { - return _CFCalendarGetIdentifier( - calendar, + return _CFStringGetCString( + theString, + buffer, + bufferSize, + encoding, ); } - late final _CFCalendarGetIdentifierPtr = - _lookup>( - 'CFCalendarGetIdentifier'); - late final _CFCalendarGetIdentifier = _CFCalendarGetIdentifierPtr.asFunction< - CFCalendarIdentifier Function(CFCalendarRef)>(); + late final _CFStringGetCStringPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, ffi.Pointer, CFIndex, + CFStringEncoding)>>('CFStringGetCString'); + late final _CFStringGetCString = _CFStringGetCStringPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, int, int)>(); - CFLocaleRef CFCalendarCopyLocale( - CFCalendarRef calendar, + ConstStringPtr CFStringGetPascalStringPtr( + CFStringRef theString, + int encoding, ) { - return _CFCalendarCopyLocale( - calendar, + return _CFStringGetPascalStringPtr1( + theString, + encoding, ); } - late final _CFCalendarCopyLocalePtr = - _lookup>( - 'CFCalendarCopyLocale'); - late final _CFCalendarCopyLocale = _CFCalendarCopyLocalePtr.asFunction< - CFLocaleRef Function(CFCalendarRef)>(); + late final _CFStringGetPascalStringPtrPtr = _lookup< + ffi.NativeFunction< + ConstStringPtr Function( + CFStringRef, CFStringEncoding)>>('CFStringGetPascalStringPtr'); + late final _CFStringGetPascalStringPtr1 = _CFStringGetPascalStringPtrPtr + .asFunction(); - void CFCalendarSetLocale( - CFCalendarRef calendar, - CFLocaleRef locale, + ffi.Pointer CFStringGetCStringPtr( + CFStringRef theString, + int encoding, ) { - return _CFCalendarSetLocale( - calendar, - locale, + return _CFStringGetCStringPtr1( + theString, + encoding, ); } - late final _CFCalendarSetLocalePtr = _lookup< - ffi.NativeFunction>( - 'CFCalendarSetLocale'); - late final _CFCalendarSetLocale = _CFCalendarSetLocalePtr.asFunction< - void Function(CFCalendarRef, CFLocaleRef)>(); + late final _CFStringGetCStringPtrPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFStringRef, CFStringEncoding)>>('CFStringGetCStringPtr'); + late final _CFStringGetCStringPtr1 = _CFStringGetCStringPtrPtr.asFunction< + ffi.Pointer Function(CFStringRef, int)>(); - CFTimeZoneRef CFCalendarCopyTimeZone( - CFCalendarRef calendar, + ffi.Pointer CFStringGetCharactersPtr( + CFStringRef theString, ) { - return _CFCalendarCopyTimeZone( - calendar, + return _CFStringGetCharactersPtr1( + theString, ); } - late final _CFCalendarCopyTimeZonePtr = - _lookup>( - 'CFCalendarCopyTimeZone'); - late final _CFCalendarCopyTimeZone = _CFCalendarCopyTimeZonePtr.asFunction< - CFTimeZoneRef Function(CFCalendarRef)>(); + late final _CFStringGetCharactersPtrPtr = + _lookup Function(CFStringRef)>>( + 'CFStringGetCharactersPtr'); + late final _CFStringGetCharactersPtr1 = _CFStringGetCharactersPtrPtr + .asFunction Function(CFStringRef)>(); - void CFCalendarSetTimeZone( - CFCalendarRef calendar, - CFTimeZoneRef tz, + int CFStringGetBytes( + CFStringRef theString, + CFRange range, + int encoding, + int lossByte, + int isExternalRepresentation, + ffi.Pointer buffer, + int maxBufLen, + ffi.Pointer usedBufLen, ) { - return _CFCalendarSetTimeZone( - calendar, - tz, + return _CFStringGetBytes( + theString, + range, + encoding, + lossByte, + isExternalRepresentation, + buffer, + maxBufLen, + usedBufLen, ); } - late final _CFCalendarSetTimeZonePtr = _lookup< - ffi.NativeFunction>( - 'CFCalendarSetTimeZone'); - late final _CFCalendarSetTimeZone = _CFCalendarSetTimeZonePtr.asFunction< - void Function(CFCalendarRef, CFTimeZoneRef)>(); + late final _CFStringGetBytesPtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFStringRef, + CFRange, + CFStringEncoding, + UInt8, + Boolean, + ffi.Pointer, + CFIndex, + ffi.Pointer)>>('CFStringGetBytes'); + late final _CFStringGetBytes = _CFStringGetBytesPtr.asFunction< + int Function(CFStringRef, CFRange, int, int, int, ffi.Pointer, int, + ffi.Pointer)>(); - int CFCalendarGetFirstWeekday( - CFCalendarRef calendar, + CFStringRef CFStringCreateFromExternalRepresentation( + CFAllocatorRef alloc, + CFDataRef data, + int encoding, ) { - return _CFCalendarGetFirstWeekday( - calendar, + return _CFStringCreateFromExternalRepresentation( + alloc, + data, + encoding, ); } - late final _CFCalendarGetFirstWeekdayPtr = - _lookup>( - 'CFCalendarGetFirstWeekday'); - late final _CFCalendarGetFirstWeekday = - _CFCalendarGetFirstWeekdayPtr.asFunction(); + late final _CFStringCreateFromExternalRepresentationPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDataRef, + CFStringEncoding)>>('CFStringCreateFromExternalRepresentation'); + late final _CFStringCreateFromExternalRepresentation = + _CFStringCreateFromExternalRepresentationPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDataRef, int)>(); - void CFCalendarSetFirstWeekday( - CFCalendarRef calendar, - int wkdy, + CFDataRef CFStringCreateExternalRepresentation( + CFAllocatorRef alloc, + CFStringRef theString, + int encoding, + int lossByte, ) { - return _CFCalendarSetFirstWeekday( - calendar, - wkdy, + return _CFStringCreateExternalRepresentation( + alloc, + theString, + encoding, + lossByte, ); } - late final _CFCalendarSetFirstWeekdayPtr = - _lookup>( - 'CFCalendarSetFirstWeekday'); - late final _CFCalendarSetFirstWeekday = _CFCalendarSetFirstWeekdayPtr - .asFunction(); + late final _CFStringCreateExternalRepresentationPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, CFStringRef, CFStringEncoding, + UInt8)>>('CFStringCreateExternalRepresentation'); + late final _CFStringCreateExternalRepresentation = + _CFStringCreateExternalRepresentationPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFStringRef, int, int)>(); - int CFCalendarGetMinimumDaysInFirstWeek( - CFCalendarRef calendar, + int CFStringGetSmallestEncoding( + CFStringRef theString, ) { - return _CFCalendarGetMinimumDaysInFirstWeek( - calendar, + return _CFStringGetSmallestEncoding( + theString, ); } - late final _CFCalendarGetMinimumDaysInFirstWeekPtr = - _lookup>( - 'CFCalendarGetMinimumDaysInFirstWeek'); - late final _CFCalendarGetMinimumDaysInFirstWeek = - _CFCalendarGetMinimumDaysInFirstWeekPtr.asFunction< - int Function(CFCalendarRef)>(); + late final _CFStringGetSmallestEncodingPtr = + _lookup>( + 'CFStringGetSmallestEncoding'); + late final _CFStringGetSmallestEncoding = + _CFStringGetSmallestEncodingPtr.asFunction(); - void CFCalendarSetMinimumDaysInFirstWeek( - CFCalendarRef calendar, - int mwd, + int CFStringGetFastestEncoding( + CFStringRef theString, ) { - return _CFCalendarSetMinimumDaysInFirstWeek( - calendar, - mwd, + return _CFStringGetFastestEncoding( + theString, ); } - late final _CFCalendarSetMinimumDaysInFirstWeekPtr = - _lookup>( - 'CFCalendarSetMinimumDaysInFirstWeek'); - late final _CFCalendarSetMinimumDaysInFirstWeek = - _CFCalendarSetMinimumDaysInFirstWeekPtr.asFunction< - void Function(CFCalendarRef, int)>(); + late final _CFStringGetFastestEncodingPtr = + _lookup>( + 'CFStringGetFastestEncoding'); + late final _CFStringGetFastestEncoding = + _CFStringGetFastestEncodingPtr.asFunction(); - CFRange CFCalendarGetMinimumRangeOfUnit( - CFCalendarRef calendar, - int unit, - ) { - return _CFCalendarGetMinimumRangeOfUnit( - calendar, - unit, - ); + int CFStringGetSystemEncoding() { + return _CFStringGetSystemEncoding(); } - late final _CFCalendarGetMinimumRangeOfUnitPtr = - _lookup>( - 'CFCalendarGetMinimumRangeOfUnit'); - late final _CFCalendarGetMinimumRangeOfUnit = - _CFCalendarGetMinimumRangeOfUnitPtr.asFunction< - CFRange Function(CFCalendarRef, int)>(); + late final _CFStringGetSystemEncodingPtr = + _lookup>( + 'CFStringGetSystemEncoding'); + late final _CFStringGetSystemEncoding = + _CFStringGetSystemEncodingPtr.asFunction(); - CFRange CFCalendarGetMaximumRangeOfUnit( - CFCalendarRef calendar, - int unit, + int CFStringGetMaximumSizeForEncoding( + int length, + int encoding, ) { - return _CFCalendarGetMaximumRangeOfUnit( - calendar, - unit, + return _CFStringGetMaximumSizeForEncoding( + length, + encoding, ); } - late final _CFCalendarGetMaximumRangeOfUnitPtr = - _lookup>( - 'CFCalendarGetMaximumRangeOfUnit'); - late final _CFCalendarGetMaximumRangeOfUnit = - _CFCalendarGetMaximumRangeOfUnitPtr.asFunction< - CFRange Function(CFCalendarRef, int)>(); + late final _CFStringGetMaximumSizeForEncodingPtr = + _lookup>( + 'CFStringGetMaximumSizeForEncoding'); + late final _CFStringGetMaximumSizeForEncoding = + _CFStringGetMaximumSizeForEncodingPtr.asFunction< + int Function(int, int)>(); - CFRange CFCalendarGetRangeOfUnit( - CFCalendarRef calendar, - int smallerUnit, - int biggerUnit, - double at, + int CFStringGetFileSystemRepresentation( + CFStringRef string, + ffi.Pointer buffer, + int maxBufLen, ) { - return _CFCalendarGetRangeOfUnit( - calendar, - smallerUnit, - biggerUnit, - at, + return _CFStringGetFileSystemRepresentation( + string, + buffer, + maxBufLen, ); } - late final _CFCalendarGetRangeOfUnitPtr = _lookup< + late final _CFStringGetFileSystemRepresentationPtr = _lookup< ffi.NativeFunction< - CFRange Function(CFCalendarRef, ffi.Int32, ffi.Int32, - CFAbsoluteTime)>>('CFCalendarGetRangeOfUnit'); - late final _CFCalendarGetRangeOfUnit = _CFCalendarGetRangeOfUnitPtr - .asFunction(); + Boolean Function(CFStringRef, ffi.Pointer, + CFIndex)>>('CFStringGetFileSystemRepresentation'); + late final _CFStringGetFileSystemRepresentation = + _CFStringGetFileSystemRepresentationPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, int)>(); - int CFCalendarGetOrdinalityOfUnit( - CFCalendarRef calendar, - int smallerUnit, - int biggerUnit, - double at, + int CFStringGetMaximumSizeOfFileSystemRepresentation( + CFStringRef string, ) { - return _CFCalendarGetOrdinalityOfUnit( - calendar, - smallerUnit, - biggerUnit, - at, + return _CFStringGetMaximumSizeOfFileSystemRepresentation( + string, ); } - late final _CFCalendarGetOrdinalityOfUnitPtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFCalendarRef, ffi.Int32, ffi.Int32, - CFAbsoluteTime)>>('CFCalendarGetOrdinalityOfUnit'); - late final _CFCalendarGetOrdinalityOfUnit = _CFCalendarGetOrdinalityOfUnitPtr - .asFunction(); + late final _CFStringGetMaximumSizeOfFileSystemRepresentationPtr = + _lookup>( + 'CFStringGetMaximumSizeOfFileSystemRepresentation'); + late final _CFStringGetMaximumSizeOfFileSystemRepresentation = + _CFStringGetMaximumSizeOfFileSystemRepresentationPtr.asFunction< + int Function(CFStringRef)>(); - int CFCalendarGetTimeRangeOfUnit( - CFCalendarRef calendar, - int unit, - double at, - ffi.Pointer startp, - ffi.Pointer tip, + CFStringRef CFStringCreateWithFileSystemRepresentation( + CFAllocatorRef alloc, + ffi.Pointer buffer, ) { - return _CFCalendarGetTimeRangeOfUnit( - calendar, - unit, - at, - startp, - tip, + return _CFStringCreateWithFileSystemRepresentation( + alloc, + buffer, ); } - late final _CFCalendarGetTimeRangeOfUnitPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFCalendarRef, - ffi.Int32, - CFAbsoluteTime, - ffi.Pointer, - ffi.Pointer)>>('CFCalendarGetTimeRangeOfUnit'); - late final _CFCalendarGetTimeRangeOfUnit = - _CFCalendarGetTimeRangeOfUnitPtr.asFunction< - int Function(CFCalendarRef, int, double, ffi.Pointer, - ffi.Pointer)>(); + late final _CFStringCreateWithFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer)>>( + 'CFStringCreateWithFileSystemRepresentation'); + late final _CFStringCreateWithFileSystemRepresentation = + _CFStringCreateWithFileSystemRepresentationPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer)>(); - int CFCalendarComposeAbsoluteTime( - CFCalendarRef calendar, - ffi.Pointer at, - ffi.Pointer componentDesc, + int CFStringCompareWithOptionsAndLocale( + CFStringRef theString1, + CFStringRef theString2, + CFRange rangeToCompare, + int compareOptions, + CFLocaleRef locale, ) { - return _CFCalendarComposeAbsoluteTime( - calendar, - at, - componentDesc, + return _CFStringCompareWithOptionsAndLocale( + theString1, + theString2, + rangeToCompare, + compareOptions, + locale, ); } - late final _CFCalendarComposeAbsoluteTimePtr = _lookup< + late final _CFStringCompareWithOptionsAndLocalePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFCalendarRef, ffi.Pointer, - ffi.Pointer)>>('CFCalendarComposeAbsoluteTime'); - late final _CFCalendarComposeAbsoluteTime = - _CFCalendarComposeAbsoluteTimePtr.asFunction< - int Function(CFCalendarRef, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, + CFLocaleRef)>>('CFStringCompareWithOptionsAndLocale'); + late final _CFStringCompareWithOptionsAndLocale = + _CFStringCompareWithOptionsAndLocalePtr.asFunction< + int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef)>(); - int CFCalendarDecomposeAbsoluteTime( - CFCalendarRef calendar, - double at, - ffi.Pointer componentDesc, + int CFStringCompareWithOptions( + CFStringRef theString1, + CFStringRef theString2, + CFRange rangeToCompare, + int compareOptions, ) { - return _CFCalendarDecomposeAbsoluteTime( - calendar, - at, - componentDesc, + return _CFStringCompareWithOptions( + theString1, + theString2, + rangeToCompare, + compareOptions, ); } - late final _CFCalendarDecomposeAbsoluteTimePtr = _lookup< + late final _CFStringCompareWithOptionsPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFCalendarRef, CFAbsoluteTime, - ffi.Pointer)>>('CFCalendarDecomposeAbsoluteTime'); - late final _CFCalendarDecomposeAbsoluteTime = - _CFCalendarDecomposeAbsoluteTimePtr.asFunction< - int Function(CFCalendarRef, double, ffi.Pointer)>(); + ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, + ffi.Int32)>>('CFStringCompareWithOptions'); + late final _CFStringCompareWithOptions = _CFStringCompareWithOptionsPtr + .asFunction(); - int CFCalendarAddComponents( - CFCalendarRef calendar, - ffi.Pointer at, - int options, - ffi.Pointer componentDesc, + int CFStringCompare( + CFStringRef theString1, + CFStringRef theString2, + int compareOptions, ) { - return _CFCalendarAddComponents( - calendar, - at, - options, - componentDesc, + return _CFStringCompare( + theString1, + theString2, + compareOptions, ); } - late final _CFCalendarAddComponentsPtr = _lookup< + late final _CFStringComparePtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFCalendarRef, - ffi.Pointer, - CFOptionFlags, - ffi.Pointer)>>('CFCalendarAddComponents'); - late final _CFCalendarAddComponents = _CFCalendarAddComponentsPtr.asFunction< - int Function(CFCalendarRef, ffi.Pointer, int, - ffi.Pointer)>(); + ffi.Int32 Function( + CFStringRef, CFStringRef, ffi.Int32)>>('CFStringCompare'); + late final _CFStringCompare = _CFStringComparePtr.asFunction< + int Function(CFStringRef, CFStringRef, int)>(); - int CFCalendarGetComponentDifference( - CFCalendarRef calendar, - double startingAT, - double resultAT, - int options, - ffi.Pointer componentDesc, + int CFStringFindWithOptionsAndLocale( + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + int searchOptions, + CFLocaleRef locale, + ffi.Pointer result, ) { - return _CFCalendarGetComponentDifference( - calendar, - startingAT, - resultAT, - options, - componentDesc, + return _CFStringFindWithOptionsAndLocale( + theString, + stringToFind, + rangeToSearch, + searchOptions, + locale, + result, ); } - late final _CFCalendarGetComponentDifferencePtr = _lookup< + late final _CFStringFindWithOptionsAndLocalePtr = _lookup< ffi.NativeFunction< Boolean Function( - CFCalendarRef, - CFAbsoluteTime, - CFAbsoluteTime, - CFOptionFlags, - ffi.Pointer)>>('CFCalendarGetComponentDifference'); - late final _CFCalendarGetComponentDifference = - _CFCalendarGetComponentDifferencePtr.asFunction< - int Function( - CFCalendarRef, double, double, int, ffi.Pointer)>(); + CFStringRef, + CFStringRef, + CFRange, + ffi.Int32, + CFLocaleRef, + ffi.Pointer)>>('CFStringFindWithOptionsAndLocale'); + late final _CFStringFindWithOptionsAndLocale = + _CFStringFindWithOptionsAndLocalePtr.asFunction< + int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef, + ffi.Pointer)>(); - CFStringRef CFDateFormatterCreateDateFormatFromTemplate( - CFAllocatorRef allocator, - CFStringRef tmplate, - int options, - CFLocaleRef locale, + int CFStringFindWithOptions( + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + int searchOptions, + ffi.Pointer result, ) { - return _CFDateFormatterCreateDateFormatFromTemplate( - allocator, - tmplate, - options, - locale, + return _CFStringFindWithOptions( + theString, + stringToFind, + rangeToSearch, + searchOptions, + result, ); } - late final _CFDateFormatterCreateDateFormatFromTemplatePtr = _lookup< + late final _CFStringFindWithOptionsPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFOptionFlags, - CFLocaleRef)>>('CFDateFormatterCreateDateFormatFromTemplate'); - late final _CFDateFormatterCreateDateFormatFromTemplate = - _CFDateFormatterCreateDateFormatFromTemplatePtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef, int, CFLocaleRef)>(); - - int CFDateFormatterGetTypeID() { - return _CFDateFormatterGetTypeID(); - } - - late final _CFDateFormatterGetTypeIDPtr = - _lookup>( - 'CFDateFormatterGetTypeID'); - late final _CFDateFormatterGetTypeID = - _CFDateFormatterGetTypeIDPtr.asFunction(); + Boolean Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, + ffi.Pointer)>>('CFStringFindWithOptions'); + late final _CFStringFindWithOptions = _CFStringFindWithOptionsPtr.asFunction< + int Function( + CFStringRef, CFStringRef, CFRange, int, ffi.Pointer)>(); - CFDateFormatterRef CFDateFormatterCreateISO8601Formatter( - CFAllocatorRef allocator, - int formatOptions, + CFArrayRef CFStringCreateArrayWithFindResults( + CFAllocatorRef alloc, + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + int compareOptions, ) { - return _CFDateFormatterCreateISO8601Formatter( - allocator, - formatOptions, + return _CFStringCreateArrayWithFindResults( + alloc, + theString, + stringToFind, + rangeToSearch, + compareOptions, ); } - late final _CFDateFormatterCreateISO8601FormatterPtr = _lookup< + late final _CFStringCreateArrayWithFindResultsPtr = _lookup< ffi.NativeFunction< - CFDateFormatterRef Function(CFAllocatorRef, - ffi.Int32)>>('CFDateFormatterCreateISO8601Formatter'); - late final _CFDateFormatterCreateISO8601Formatter = - _CFDateFormatterCreateISO8601FormatterPtr.asFunction< - CFDateFormatterRef Function(CFAllocatorRef, int)>(); + CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef, CFRange, + ffi.Int32)>>('CFStringCreateArrayWithFindResults'); + late final _CFStringCreateArrayWithFindResults = + _CFStringCreateArrayWithFindResultsPtr.asFunction< + CFArrayRef Function( + CFAllocatorRef, CFStringRef, CFStringRef, CFRange, int)>(); - CFDateFormatterRef CFDateFormatterCreate( - CFAllocatorRef allocator, - CFLocaleRef locale, - int dateStyle, - int timeStyle, + CFRange CFStringFind( + CFStringRef theString, + CFStringRef stringToFind, + int compareOptions, ) { - return _CFDateFormatterCreate( - allocator, - locale, - dateStyle, - timeStyle, + return _CFStringFind( + theString, + stringToFind, + compareOptions, ); } - late final _CFDateFormatterCreatePtr = _lookup< + late final _CFStringFindPtr = _lookup< ffi.NativeFunction< - CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, ffi.Int32, - ffi.Int32)>>('CFDateFormatterCreate'); - late final _CFDateFormatterCreate = _CFDateFormatterCreatePtr.asFunction< - CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, int, int)>(); + CFRange Function( + CFStringRef, CFStringRef, ffi.Int32)>>('CFStringFind'); + late final _CFStringFind = _CFStringFindPtr.asFunction< + CFRange Function(CFStringRef, CFStringRef, int)>(); - CFLocaleRef CFDateFormatterGetLocale( - CFDateFormatterRef formatter, + int CFStringHasPrefix( + CFStringRef theString, + CFStringRef prefix, ) { - return _CFDateFormatterGetLocale( - formatter, + return _CFStringHasPrefix( + theString, + prefix, ); } - late final _CFDateFormatterGetLocalePtr = - _lookup>( - 'CFDateFormatterGetLocale'); - late final _CFDateFormatterGetLocale = _CFDateFormatterGetLocalePtr - .asFunction(); + late final _CFStringHasPrefixPtr = + _lookup>( + 'CFStringHasPrefix'); + late final _CFStringHasPrefix = _CFStringHasPrefixPtr.asFunction< + int Function(CFStringRef, CFStringRef)>(); - int CFDateFormatterGetDateStyle( - CFDateFormatterRef formatter, + int CFStringHasSuffix( + CFStringRef theString, + CFStringRef suffix, ) { - return _CFDateFormatterGetDateStyle( - formatter, + return _CFStringHasSuffix( + theString, + suffix, ); } - late final _CFDateFormatterGetDateStylePtr = - _lookup>( - 'CFDateFormatterGetDateStyle'); - late final _CFDateFormatterGetDateStyle = _CFDateFormatterGetDateStylePtr - .asFunction(); - - int CFDateFormatterGetTimeStyle( - CFDateFormatterRef formatter, - ) { - return _CFDateFormatterGetTimeStyle( - formatter, - ); - } - - late final _CFDateFormatterGetTimeStylePtr = - _lookup>( - 'CFDateFormatterGetTimeStyle'); - late final _CFDateFormatterGetTimeStyle = _CFDateFormatterGetTimeStylePtr - .asFunction(); + late final _CFStringHasSuffixPtr = + _lookup>( + 'CFStringHasSuffix'); + late final _CFStringHasSuffix = _CFStringHasSuffixPtr.asFunction< + int Function(CFStringRef, CFStringRef)>(); - CFStringRef CFDateFormatterGetFormat( - CFDateFormatterRef formatter, + CFRange CFStringGetRangeOfComposedCharactersAtIndex( + CFStringRef theString, + int theIndex, ) { - return _CFDateFormatterGetFormat( - formatter, + return _CFStringGetRangeOfComposedCharactersAtIndex( + theString, + theIndex, ); } - late final _CFDateFormatterGetFormatPtr = - _lookup>( - 'CFDateFormatterGetFormat'); - late final _CFDateFormatterGetFormat = _CFDateFormatterGetFormatPtr - .asFunction(); + late final _CFStringGetRangeOfComposedCharactersAtIndexPtr = + _lookup>( + 'CFStringGetRangeOfComposedCharactersAtIndex'); + late final _CFStringGetRangeOfComposedCharactersAtIndex = + _CFStringGetRangeOfComposedCharactersAtIndexPtr.asFunction< + CFRange Function(CFStringRef, int)>(); - void CFDateFormatterSetFormat( - CFDateFormatterRef formatter, - CFStringRef formatString, + int CFStringFindCharacterFromSet( + CFStringRef theString, + CFCharacterSetRef theSet, + CFRange rangeToSearch, + int searchOptions, + ffi.Pointer result, ) { - return _CFDateFormatterSetFormat( - formatter, - formatString, + return _CFStringFindCharacterFromSet( + theString, + theSet, + rangeToSearch, + searchOptions, + result, ); } - late final _CFDateFormatterSetFormatPtr = _lookup< + late final _CFStringFindCharacterFromSetPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFDateFormatterRef, CFStringRef)>>('CFDateFormatterSetFormat'); - late final _CFDateFormatterSetFormat = _CFDateFormatterSetFormatPtr - .asFunction(); + Boolean Function(CFStringRef, CFCharacterSetRef, CFRange, ffi.Int32, + ffi.Pointer)>>('CFStringFindCharacterFromSet'); + late final _CFStringFindCharacterFromSet = + _CFStringFindCharacterFromSetPtr.asFunction< + int Function(CFStringRef, CFCharacterSetRef, CFRange, int, + ffi.Pointer)>(); - CFStringRef CFDateFormatterCreateStringWithDate( - CFAllocatorRef allocator, - CFDateFormatterRef formatter, - CFDateRef date, + void CFStringGetLineBounds( + CFStringRef theString, + CFRange range, + ffi.Pointer lineBeginIndex, + ffi.Pointer lineEndIndex, + ffi.Pointer contentsEndIndex, ) { - return _CFDateFormatterCreateStringWithDate( - allocator, - formatter, - date, + return _CFStringGetLineBounds( + theString, + range, + lineBeginIndex, + lineEndIndex, + contentsEndIndex, ); } - late final _CFDateFormatterCreateStringWithDatePtr = _lookup< + late final _CFStringGetLineBoundsPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, - CFDateRef)>>('CFDateFormatterCreateStringWithDate'); - late final _CFDateFormatterCreateStringWithDate = - _CFDateFormatterCreateStringWithDatePtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFDateFormatterRef, CFDateRef)>(); + ffi.Void Function( + CFStringRef, + CFRange, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('CFStringGetLineBounds'); + late final _CFStringGetLineBounds = _CFStringGetLineBoundsPtr.asFunction< + void Function(CFStringRef, CFRange, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - CFStringRef CFDateFormatterCreateStringWithAbsoluteTime( - CFAllocatorRef allocator, - CFDateFormatterRef formatter, - double at, + void CFStringGetParagraphBounds( + CFStringRef string, + CFRange range, + ffi.Pointer parBeginIndex, + ffi.Pointer parEndIndex, + ffi.Pointer contentsEndIndex, ) { - return _CFDateFormatterCreateStringWithAbsoluteTime( - allocator, - formatter, - at, + return _CFStringGetParagraphBounds( + string, + range, + parBeginIndex, + parEndIndex, + contentsEndIndex, ); } - late final _CFDateFormatterCreateStringWithAbsoluteTimePtr = _lookup< + late final _CFStringGetParagraphBoundsPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, - CFAbsoluteTime)>>('CFDateFormatterCreateStringWithAbsoluteTime'); - late final _CFDateFormatterCreateStringWithAbsoluteTime = - _CFDateFormatterCreateStringWithAbsoluteTimePtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, double)>(); + ffi.Void Function( + CFStringRef, + CFRange, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('CFStringGetParagraphBounds'); + late final _CFStringGetParagraphBounds = + _CFStringGetParagraphBoundsPtr.asFunction< + void Function(CFStringRef, CFRange, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - CFDateRef CFDateFormatterCreateDateFromString( - CFAllocatorRef allocator, - CFDateFormatterRef formatter, + int CFStringGetHyphenationLocationBeforeIndex( CFStringRef string, - ffi.Pointer rangep, + int location, + CFRange limitRange, + int options, + CFLocaleRef locale, + ffi.Pointer character, ) { - return _CFDateFormatterCreateDateFromString( - allocator, - formatter, + return _CFStringGetHyphenationLocationBeforeIndex( string, - rangep, + location, + limitRange, + options, + locale, + character, ); } - late final _CFDateFormatterCreateDateFromStringPtr = _lookup< - ffi.NativeFunction< - CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, - ffi.Pointer)>>('CFDateFormatterCreateDateFromString'); - late final _CFDateFormatterCreateDateFromString = - _CFDateFormatterCreateDateFromStringPtr.asFunction< - CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, - ffi.Pointer)>(); + late final _CFStringGetHyphenationLocationBeforeIndexPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFStringRef, CFIndex, CFRange, CFOptionFlags, + CFLocaleRef, ffi.Pointer)>>( + 'CFStringGetHyphenationLocationBeforeIndex'); + late final _CFStringGetHyphenationLocationBeforeIndex = + _CFStringGetHyphenationLocationBeforeIndexPtr.asFunction< + int Function(CFStringRef, int, CFRange, int, CFLocaleRef, + ffi.Pointer)>(); - int CFDateFormatterGetAbsoluteTimeFromString( - CFDateFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, - ffi.Pointer atp, + int CFStringIsHyphenationAvailableForLocale( + CFLocaleRef locale, ) { - return _CFDateFormatterGetAbsoluteTimeFromString( - formatter, - string, - rangep, - atp, + return _CFStringIsHyphenationAvailableForLocale( + locale, ); } - late final _CFDateFormatterGetAbsoluteTimeFromStringPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFDateFormatterRef, CFStringRef, - ffi.Pointer, ffi.Pointer)>>( - 'CFDateFormatterGetAbsoluteTimeFromString'); - late final _CFDateFormatterGetAbsoluteTimeFromString = - _CFDateFormatterGetAbsoluteTimeFromStringPtr.asFunction< - int Function(CFDateFormatterRef, CFStringRef, ffi.Pointer, - ffi.Pointer)>(); + late final _CFStringIsHyphenationAvailableForLocalePtr = + _lookup>( + 'CFStringIsHyphenationAvailableForLocale'); + late final _CFStringIsHyphenationAvailableForLocale = + _CFStringIsHyphenationAvailableForLocalePtr.asFunction< + int Function(CFLocaleRef)>(); - void CFDateFormatterSetProperty( - CFDateFormatterRef formatter, - CFStringRef key, - CFTypeRef value, + CFStringRef CFStringCreateByCombiningStrings( + CFAllocatorRef alloc, + CFArrayRef theArray, + CFStringRef separatorString, ) { - return _CFDateFormatterSetProperty( - formatter, - key, - value, + return _CFStringCreateByCombiningStrings( + alloc, + theArray, + separatorString, ); } - late final _CFDateFormatterSetPropertyPtr = _lookup< + late final _CFStringCreateByCombiningStringsPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFDateFormatterRef, CFStringRef, - CFTypeRef)>>('CFDateFormatterSetProperty'); - late final _CFDateFormatterSetProperty = _CFDateFormatterSetPropertyPtr - .asFunction(); + CFStringRef Function(CFAllocatorRef, CFArrayRef, + CFStringRef)>>('CFStringCreateByCombiningStrings'); + late final _CFStringCreateByCombiningStrings = + _CFStringCreateByCombiningStringsPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFArrayRef, CFStringRef)>(); - CFTypeRef CFDateFormatterCopyProperty( - CFDateFormatterRef formatter, - CFDateFormatterKey key, + CFArrayRef CFStringCreateArrayBySeparatingStrings( + CFAllocatorRef alloc, + CFStringRef theString, + CFStringRef separatorString, ) { - return _CFDateFormatterCopyProperty( - formatter, - key, + return _CFStringCreateArrayBySeparatingStrings( + alloc, + theString, + separatorString, ); } - late final _CFDateFormatterCopyPropertyPtr = _lookup< + late final _CFStringCreateArrayBySeparatingStringsPtr = _lookup< ffi.NativeFunction< - CFTypeRef Function(CFDateFormatterRef, - CFDateFormatterKey)>>('CFDateFormatterCopyProperty'); - late final _CFDateFormatterCopyProperty = _CFDateFormatterCopyPropertyPtr - .asFunction(); - - late final ffi.Pointer _kCFDateFormatterIsLenient = - _lookup('kCFDateFormatterIsLenient'); - - CFDateFormatterKey get kCFDateFormatterIsLenient => - _kCFDateFormatterIsLenient.value; - - set kCFDateFormatterIsLenient(CFDateFormatterKey value) => - _kCFDateFormatterIsLenient.value = value; + CFArrayRef Function(CFAllocatorRef, CFStringRef, + CFStringRef)>>('CFStringCreateArrayBySeparatingStrings'); + late final _CFStringCreateArrayBySeparatingStrings = + _CFStringCreateArrayBySeparatingStringsPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFDateFormatterTimeZone = - _lookup('kCFDateFormatterTimeZone'); + int CFStringGetIntValue( + CFStringRef str, + ) { + return _CFStringGetIntValue( + str, + ); + } - CFDateFormatterKey get kCFDateFormatterTimeZone => - _kCFDateFormatterTimeZone.value; + late final _CFStringGetIntValuePtr = + _lookup>( + 'CFStringGetIntValue'); + late final _CFStringGetIntValue = + _CFStringGetIntValuePtr.asFunction(); - set kCFDateFormatterTimeZone(CFDateFormatterKey value) => - _kCFDateFormatterTimeZone.value = value; + double CFStringGetDoubleValue( + CFStringRef str, + ) { + return _CFStringGetDoubleValue( + str, + ); + } - late final ffi.Pointer _kCFDateFormatterCalendarName = - _lookup('kCFDateFormatterCalendarName'); + late final _CFStringGetDoubleValuePtr = + _lookup>( + 'CFStringGetDoubleValue'); + late final _CFStringGetDoubleValue = + _CFStringGetDoubleValuePtr.asFunction(); - CFDateFormatterKey get kCFDateFormatterCalendarName => - _kCFDateFormatterCalendarName.value; + void CFStringAppend( + CFMutableStringRef theString, + CFStringRef appendedString, + ) { + return _CFStringAppend( + theString, + appendedString, + ); + } - set kCFDateFormatterCalendarName(CFDateFormatterKey value) => - _kCFDateFormatterCalendarName.value = value; + late final _CFStringAppendPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFStringRef)>>('CFStringAppend'); + late final _CFStringAppend = _CFStringAppendPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFDateFormatterDefaultFormat = - _lookup('kCFDateFormatterDefaultFormat'); + void CFStringAppendCharacters( + CFMutableStringRef theString, + ffi.Pointer chars, + int numChars, + ) { + return _CFStringAppendCharacters( + theString, + chars, + numChars, + ); + } - CFDateFormatterKey get kCFDateFormatterDefaultFormat => - _kCFDateFormatterDefaultFormat.value; + late final _CFStringAppendCharactersPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ffi.Pointer, + CFIndex)>>('CFStringAppendCharacters'); + late final _CFStringAppendCharacters = + _CFStringAppendCharactersPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int)>(); - set kCFDateFormatterDefaultFormat(CFDateFormatterKey value) => - _kCFDateFormatterDefaultFormat.value = value; + void CFStringAppendPascalString( + CFMutableStringRef theString, + ConstStr255Param pStr, + int encoding, + ) { + return _CFStringAppendPascalString( + theString, + pStr, + encoding, + ); + } - late final ffi.Pointer - _kCFDateFormatterTwoDigitStartDate = - _lookup('kCFDateFormatterTwoDigitStartDate'); + late final _CFStringAppendPascalStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ConstStr255Param, + CFStringEncoding)>>('CFStringAppendPascalString'); + late final _CFStringAppendPascalString = _CFStringAppendPascalStringPtr + .asFunction(); - CFDateFormatterKey get kCFDateFormatterTwoDigitStartDate => - _kCFDateFormatterTwoDigitStartDate.value; + void CFStringAppendCString( + CFMutableStringRef theString, + ffi.Pointer cStr, + int encoding, + ) { + return _CFStringAppendCString( + theString, + cStr, + encoding, + ); + } - set kCFDateFormatterTwoDigitStartDate(CFDateFormatterKey value) => - _kCFDateFormatterTwoDigitStartDate.value = value; + late final _CFStringAppendCStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ffi.Pointer, + CFStringEncoding)>>('CFStringAppendCString'); + late final _CFStringAppendCString = _CFStringAppendCStringPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int)>(); - late final ffi.Pointer _kCFDateFormatterDefaultDate = - _lookup('kCFDateFormatterDefaultDate'); + void CFStringAppendFormat( + CFMutableStringRef theString, + CFDictionaryRef formatOptions, + CFStringRef format, + ) { + return _CFStringAppendFormat( + theString, + formatOptions, + format, + ); + } - CFDateFormatterKey get kCFDateFormatterDefaultDate => - _kCFDateFormatterDefaultDate.value; + late final _CFStringAppendFormatPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFDictionaryRef, + CFStringRef)>>('CFStringAppendFormat'); + late final _CFStringAppendFormat = _CFStringAppendFormatPtr.asFunction< + void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef)>(); - set kCFDateFormatterDefaultDate(CFDateFormatterKey value) => - _kCFDateFormatterDefaultDate.value = value; + void CFStringAppendFormatAndArguments( + CFMutableStringRef theString, + CFDictionaryRef formatOptions, + CFStringRef format, + va_list arguments, + ) { + return _CFStringAppendFormatAndArguments( + theString, + formatOptions, + format, + arguments, + ); + } - late final ffi.Pointer _kCFDateFormatterCalendar = - _lookup('kCFDateFormatterCalendar'); + late final _CFStringAppendFormatAndArgumentsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef, + va_list)>>('CFStringAppendFormatAndArguments'); + late final _CFStringAppendFormatAndArguments = + _CFStringAppendFormatAndArgumentsPtr.asFunction< + void Function( + CFMutableStringRef, CFDictionaryRef, CFStringRef, va_list)>(); - CFDateFormatterKey get kCFDateFormatterCalendar => - _kCFDateFormatterCalendar.value; + void CFStringInsert( + CFMutableStringRef str, + int idx, + CFStringRef insertedStr, + ) { + return _CFStringInsert( + str, + idx, + insertedStr, + ); + } - set kCFDateFormatterCalendar(CFDateFormatterKey value) => - _kCFDateFormatterCalendar.value = value; + late final _CFStringInsertPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFIndex, CFStringRef)>>('CFStringInsert'); + late final _CFStringInsert = _CFStringInsertPtr.asFunction< + void Function(CFMutableStringRef, int, CFStringRef)>(); - late final ffi.Pointer _kCFDateFormatterEraSymbols = - _lookup('kCFDateFormatterEraSymbols'); + void CFStringDelete( + CFMutableStringRef theString, + CFRange range, + ) { + return _CFStringDelete( + theString, + range, + ); + } - CFDateFormatterKey get kCFDateFormatterEraSymbols => - _kCFDateFormatterEraSymbols.value; + late final _CFStringDeletePtr = _lookup< + ffi.NativeFunction>( + 'CFStringDelete'); + late final _CFStringDelete = _CFStringDeletePtr.asFunction< + void Function(CFMutableStringRef, CFRange)>(); - set kCFDateFormatterEraSymbols(CFDateFormatterKey value) => - _kCFDateFormatterEraSymbols.value = value; + void CFStringReplace( + CFMutableStringRef theString, + CFRange range, + CFStringRef replacement, + ) { + return _CFStringReplace( + theString, + range, + replacement, + ); + } - late final ffi.Pointer _kCFDateFormatterMonthSymbols = - _lookup('kCFDateFormatterMonthSymbols'); + late final _CFStringReplacePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFRange, CFStringRef)>>('CFStringReplace'); + late final _CFStringReplace = _CFStringReplacePtr.asFunction< + void Function(CFMutableStringRef, CFRange, CFStringRef)>(); - CFDateFormatterKey get kCFDateFormatterMonthSymbols => - _kCFDateFormatterMonthSymbols.value; + void CFStringReplaceAll( + CFMutableStringRef theString, + CFStringRef replacement, + ) { + return _CFStringReplaceAll( + theString, + replacement, + ); + } - set kCFDateFormatterMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterMonthSymbols.value = value; + late final _CFStringReplaceAllPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFStringRef)>>('CFStringReplaceAll'); + late final _CFStringReplaceAll = _CFStringReplaceAllPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); - late final ffi.Pointer - _kCFDateFormatterShortMonthSymbols = - _lookup('kCFDateFormatterShortMonthSymbols'); - - CFDateFormatterKey get kCFDateFormatterShortMonthSymbols => - _kCFDateFormatterShortMonthSymbols.value; + int CFStringFindAndReplace( + CFMutableStringRef theString, + CFStringRef stringToFind, + CFStringRef replacementString, + CFRange rangeToSearch, + int compareOptions, + ) { + return _CFStringFindAndReplace( + theString, + stringToFind, + replacementString, + rangeToSearch, + compareOptions, + ); + } - set kCFDateFormatterShortMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortMonthSymbols.value = value; + late final _CFStringFindAndReplacePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFMutableStringRef, CFStringRef, CFStringRef, + CFRange, ffi.Int32)>>('CFStringFindAndReplace'); + late final _CFStringFindAndReplace = _CFStringFindAndReplacePtr.asFunction< + int Function( + CFMutableStringRef, CFStringRef, CFStringRef, CFRange, int)>(); - late final ffi.Pointer _kCFDateFormatterWeekdaySymbols = - _lookup('kCFDateFormatterWeekdaySymbols'); + void CFStringSetExternalCharactersNoCopy( + CFMutableStringRef theString, + ffi.Pointer chars, + int length, + int capacity, + ) { + return _CFStringSetExternalCharactersNoCopy( + theString, + chars, + length, + capacity, + ); + } - CFDateFormatterKey get kCFDateFormatterWeekdaySymbols => - _kCFDateFormatterWeekdaySymbols.value; + late final _CFStringSetExternalCharactersNoCopyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ffi.Pointer, CFIndex, + CFIndex)>>('CFStringSetExternalCharactersNoCopy'); + late final _CFStringSetExternalCharactersNoCopy = + _CFStringSetExternalCharactersNoCopyPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int, int)>(); - set kCFDateFormatterWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterWeekdaySymbols.value = value; + void CFStringPad( + CFMutableStringRef theString, + CFStringRef padString, + int length, + int indexIntoPad, + ) { + return _CFStringPad( + theString, + padString, + length, + indexIntoPad, + ); + } - late final ffi.Pointer - _kCFDateFormatterShortWeekdaySymbols = - _lookup('kCFDateFormatterShortWeekdaySymbols'); + late final _CFStringPadPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFStringRef, CFIndex, + CFIndex)>>('CFStringPad'); + late final _CFStringPad = _CFStringPadPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef, int, int)>(); - CFDateFormatterKey get kCFDateFormatterShortWeekdaySymbols => - _kCFDateFormatterShortWeekdaySymbols.value; + void CFStringTrim( + CFMutableStringRef theString, + CFStringRef trimString, + ) { + return _CFStringTrim( + theString, + trimString, + ); + } - set kCFDateFormatterShortWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortWeekdaySymbols.value = value; + late final _CFStringTrimPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFStringRef)>>('CFStringTrim'); + late final _CFStringTrim = _CFStringTrimPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFDateFormatterAMSymbol = - _lookup('kCFDateFormatterAMSymbol'); + void CFStringTrimWhitespace( + CFMutableStringRef theString, + ) { + return _CFStringTrimWhitespace( + theString, + ); + } - CFDateFormatterKey get kCFDateFormatterAMSymbol => - _kCFDateFormatterAMSymbol.value; + late final _CFStringTrimWhitespacePtr = + _lookup>( + 'CFStringTrimWhitespace'); + late final _CFStringTrimWhitespace = _CFStringTrimWhitespacePtr.asFunction< + void Function(CFMutableStringRef)>(); - set kCFDateFormatterAMSymbol(CFDateFormatterKey value) => - _kCFDateFormatterAMSymbol.value = value; + void CFStringLowercase( + CFMutableStringRef theString, + CFLocaleRef locale, + ) { + return _CFStringLowercase( + theString, + locale, + ); + } - late final ffi.Pointer _kCFDateFormatterPMSymbol = - _lookup('kCFDateFormatterPMSymbol'); + late final _CFStringLowercasePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFLocaleRef)>>('CFStringLowercase'); + late final _CFStringLowercase = _CFStringLowercasePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); - CFDateFormatterKey get kCFDateFormatterPMSymbol => - _kCFDateFormatterPMSymbol.value; + void CFStringUppercase( + CFMutableStringRef theString, + CFLocaleRef locale, + ) { + return _CFStringUppercase( + theString, + locale, + ); + } - set kCFDateFormatterPMSymbol(CFDateFormatterKey value) => - _kCFDateFormatterPMSymbol.value = value; + late final _CFStringUppercasePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFLocaleRef)>>('CFStringUppercase'); + late final _CFStringUppercase = _CFStringUppercasePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); - late final ffi.Pointer _kCFDateFormatterLongEraSymbols = - _lookup('kCFDateFormatterLongEraSymbols'); + void CFStringCapitalize( + CFMutableStringRef theString, + CFLocaleRef locale, + ) { + return _CFStringCapitalize( + theString, + locale, + ); + } - CFDateFormatterKey get kCFDateFormatterLongEraSymbols => - _kCFDateFormatterLongEraSymbols.value; + late final _CFStringCapitalizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFLocaleRef)>>('CFStringCapitalize'); + late final _CFStringCapitalize = _CFStringCapitalizePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); - set kCFDateFormatterLongEraSymbols(CFDateFormatterKey value) => - _kCFDateFormatterLongEraSymbols.value = value; + void CFStringNormalize( + CFMutableStringRef theString, + int theForm, + ) { + return _CFStringNormalize( + theString, + theForm, + ); + } - late final ffi.Pointer - _kCFDateFormatterVeryShortMonthSymbols = - _lookup('kCFDateFormatterVeryShortMonthSymbols'); + late final _CFStringNormalizePtr = _lookup< + ffi.NativeFunction>( + 'CFStringNormalize'); + late final _CFStringNormalize = _CFStringNormalizePtr.asFunction< + void Function(CFMutableStringRef, int)>(); - CFDateFormatterKey get kCFDateFormatterVeryShortMonthSymbols => - _kCFDateFormatterVeryShortMonthSymbols.value; + void CFStringFold( + CFMutableStringRef theString, + int theFlags, + CFLocaleRef theLocale, + ) { + return _CFStringFold( + theString, + theFlags, + theLocale, + ); + } - set kCFDateFormatterVeryShortMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterVeryShortMonthSymbols.value = value; + late final _CFStringFoldPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, ffi.Int32, CFLocaleRef)>>('CFStringFold'); + late final _CFStringFold = _CFStringFoldPtr.asFunction< + void Function(CFMutableStringRef, int, CFLocaleRef)>(); - late final ffi.Pointer - _kCFDateFormatterStandaloneMonthSymbols = - _lookup('kCFDateFormatterStandaloneMonthSymbols'); + int CFStringTransform( + CFMutableStringRef string, + ffi.Pointer range, + CFStringRef transform, + int reverse, + ) { + return _CFStringTransform( + string, + range, + transform, + reverse, + ); + } - CFDateFormatterKey get kCFDateFormatterStandaloneMonthSymbols => - _kCFDateFormatterStandaloneMonthSymbols.value; + late final _CFStringTransformPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFMutableStringRef, ffi.Pointer, + CFStringRef, Boolean)>>('CFStringTransform'); + late final _CFStringTransform = _CFStringTransformPtr.asFunction< + int Function( + CFMutableStringRef, ffi.Pointer, CFStringRef, int)>(); - set kCFDateFormatterStandaloneMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterStandaloneMonthSymbols.value = value; + late final ffi.Pointer _kCFStringTransformStripCombiningMarks = + _lookup('kCFStringTransformStripCombiningMarks'); - late final ffi.Pointer - _kCFDateFormatterShortStandaloneMonthSymbols = - _lookup( - 'kCFDateFormatterShortStandaloneMonthSymbols'); + CFStringRef get kCFStringTransformStripCombiningMarks => + _kCFStringTransformStripCombiningMarks.value; - CFDateFormatterKey get kCFDateFormatterShortStandaloneMonthSymbols => - _kCFDateFormatterShortStandaloneMonthSymbols.value; + set kCFStringTransformStripCombiningMarks(CFStringRef value) => + _kCFStringTransformStripCombiningMarks.value = value; - set kCFDateFormatterShortStandaloneMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortStandaloneMonthSymbols.value = value; + late final ffi.Pointer _kCFStringTransformToLatin = + _lookup('kCFStringTransformToLatin'); - late final ffi.Pointer - _kCFDateFormatterVeryShortStandaloneMonthSymbols = - _lookup( - 'kCFDateFormatterVeryShortStandaloneMonthSymbols'); + CFStringRef get kCFStringTransformToLatin => _kCFStringTransformToLatin.value; - CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneMonthSymbols => - _kCFDateFormatterVeryShortStandaloneMonthSymbols.value; + set kCFStringTransformToLatin(CFStringRef value) => + _kCFStringTransformToLatin.value = value; - set kCFDateFormatterVeryShortStandaloneMonthSymbols( - CFDateFormatterKey value) => - _kCFDateFormatterVeryShortStandaloneMonthSymbols.value = value; + late final ffi.Pointer _kCFStringTransformFullwidthHalfwidth = + _lookup('kCFStringTransformFullwidthHalfwidth'); - late final ffi.Pointer - _kCFDateFormatterVeryShortWeekdaySymbols = - _lookup('kCFDateFormatterVeryShortWeekdaySymbols'); + CFStringRef get kCFStringTransformFullwidthHalfwidth => + _kCFStringTransformFullwidthHalfwidth.value; - CFDateFormatterKey get kCFDateFormatterVeryShortWeekdaySymbols => - _kCFDateFormatterVeryShortWeekdaySymbols.value; + set kCFStringTransformFullwidthHalfwidth(CFStringRef value) => + _kCFStringTransformFullwidthHalfwidth.value = value; - set kCFDateFormatterVeryShortWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterVeryShortWeekdaySymbols.value = value; + late final ffi.Pointer _kCFStringTransformLatinKatakana = + _lookup('kCFStringTransformLatinKatakana'); - late final ffi.Pointer - _kCFDateFormatterStandaloneWeekdaySymbols = - _lookup('kCFDateFormatterStandaloneWeekdaySymbols'); + CFStringRef get kCFStringTransformLatinKatakana => + _kCFStringTransformLatinKatakana.value; - CFDateFormatterKey get kCFDateFormatterStandaloneWeekdaySymbols => - _kCFDateFormatterStandaloneWeekdaySymbols.value; + set kCFStringTransformLatinKatakana(CFStringRef value) => + _kCFStringTransformLatinKatakana.value = value; - set kCFDateFormatterStandaloneWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterStandaloneWeekdaySymbols.value = value; + late final ffi.Pointer _kCFStringTransformLatinHiragana = + _lookup('kCFStringTransformLatinHiragana'); - late final ffi.Pointer - _kCFDateFormatterShortStandaloneWeekdaySymbols = - _lookup( - 'kCFDateFormatterShortStandaloneWeekdaySymbols'); + CFStringRef get kCFStringTransformLatinHiragana => + _kCFStringTransformLatinHiragana.value; - CFDateFormatterKey get kCFDateFormatterShortStandaloneWeekdaySymbols => - _kCFDateFormatterShortStandaloneWeekdaySymbols.value; + set kCFStringTransformLatinHiragana(CFStringRef value) => + _kCFStringTransformLatinHiragana.value = value; - set kCFDateFormatterShortStandaloneWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortStandaloneWeekdaySymbols.value = value; + late final ffi.Pointer _kCFStringTransformHiraganaKatakana = + _lookup('kCFStringTransformHiraganaKatakana'); - late final ffi.Pointer - _kCFDateFormatterVeryShortStandaloneWeekdaySymbols = - _lookup( - 'kCFDateFormatterVeryShortStandaloneWeekdaySymbols'); + CFStringRef get kCFStringTransformHiraganaKatakana => + _kCFStringTransformHiraganaKatakana.value; - CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneWeekdaySymbols => - _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value; + set kCFStringTransformHiraganaKatakana(CFStringRef value) => + _kCFStringTransformHiraganaKatakana.value = value; - set kCFDateFormatterVeryShortStandaloneWeekdaySymbols( - CFDateFormatterKey value) => - _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value = value; + late final ffi.Pointer _kCFStringTransformMandarinLatin = + _lookup('kCFStringTransformMandarinLatin'); - late final ffi.Pointer _kCFDateFormatterQuarterSymbols = - _lookup('kCFDateFormatterQuarterSymbols'); + CFStringRef get kCFStringTransformMandarinLatin => + _kCFStringTransformMandarinLatin.value; - CFDateFormatterKey get kCFDateFormatterQuarterSymbols => - _kCFDateFormatterQuarterSymbols.value; + set kCFStringTransformMandarinLatin(CFStringRef value) => + _kCFStringTransformMandarinLatin.value = value; - set kCFDateFormatterQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterQuarterSymbols.value = value; + late final ffi.Pointer _kCFStringTransformLatinHangul = + _lookup('kCFStringTransformLatinHangul'); - late final ffi.Pointer - _kCFDateFormatterShortQuarterSymbols = - _lookup('kCFDateFormatterShortQuarterSymbols'); + CFStringRef get kCFStringTransformLatinHangul => + _kCFStringTransformLatinHangul.value; - CFDateFormatterKey get kCFDateFormatterShortQuarterSymbols => - _kCFDateFormatterShortQuarterSymbols.value; + set kCFStringTransformLatinHangul(CFStringRef value) => + _kCFStringTransformLatinHangul.value = value; - set kCFDateFormatterShortQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortQuarterSymbols.value = value; + late final ffi.Pointer _kCFStringTransformLatinArabic = + _lookup('kCFStringTransformLatinArabic'); - late final ffi.Pointer - _kCFDateFormatterStandaloneQuarterSymbols = - _lookup('kCFDateFormatterStandaloneQuarterSymbols'); + CFStringRef get kCFStringTransformLatinArabic => + _kCFStringTransformLatinArabic.value; - CFDateFormatterKey get kCFDateFormatterStandaloneQuarterSymbols => - _kCFDateFormatterStandaloneQuarterSymbols.value; + set kCFStringTransformLatinArabic(CFStringRef value) => + _kCFStringTransformLatinArabic.value = value; - set kCFDateFormatterStandaloneQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterStandaloneQuarterSymbols.value = value; + late final ffi.Pointer _kCFStringTransformLatinHebrew = + _lookup('kCFStringTransformLatinHebrew'); - late final ffi.Pointer - _kCFDateFormatterShortStandaloneQuarterSymbols = - _lookup( - 'kCFDateFormatterShortStandaloneQuarterSymbols'); + CFStringRef get kCFStringTransformLatinHebrew => + _kCFStringTransformLatinHebrew.value; - CFDateFormatterKey get kCFDateFormatterShortStandaloneQuarterSymbols => - _kCFDateFormatterShortStandaloneQuarterSymbols.value; + set kCFStringTransformLatinHebrew(CFStringRef value) => + _kCFStringTransformLatinHebrew.value = value; - set kCFDateFormatterShortStandaloneQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortStandaloneQuarterSymbols.value = value; + late final ffi.Pointer _kCFStringTransformLatinThai = + _lookup('kCFStringTransformLatinThai'); - late final ffi.Pointer - _kCFDateFormatterGregorianStartDate = - _lookup('kCFDateFormatterGregorianStartDate'); + CFStringRef get kCFStringTransformLatinThai => + _kCFStringTransformLatinThai.value; - CFDateFormatterKey get kCFDateFormatterGregorianStartDate => - _kCFDateFormatterGregorianStartDate.value; + set kCFStringTransformLatinThai(CFStringRef value) => + _kCFStringTransformLatinThai.value = value; - set kCFDateFormatterGregorianStartDate(CFDateFormatterKey value) => - _kCFDateFormatterGregorianStartDate.value = value; + late final ffi.Pointer _kCFStringTransformLatinCyrillic = + _lookup('kCFStringTransformLatinCyrillic'); - late final ffi.Pointer - _kCFDateFormatterDoesRelativeDateFormattingKey = - _lookup( - 'kCFDateFormatterDoesRelativeDateFormattingKey'); + CFStringRef get kCFStringTransformLatinCyrillic => + _kCFStringTransformLatinCyrillic.value; - CFDateFormatterKey get kCFDateFormatterDoesRelativeDateFormattingKey => - _kCFDateFormatterDoesRelativeDateFormattingKey.value; + set kCFStringTransformLatinCyrillic(CFStringRef value) => + _kCFStringTransformLatinCyrillic.value = value; - set kCFDateFormatterDoesRelativeDateFormattingKey(CFDateFormatterKey value) => - _kCFDateFormatterDoesRelativeDateFormattingKey.value = value; + late final ffi.Pointer _kCFStringTransformLatinGreek = + _lookup('kCFStringTransformLatinGreek'); - int CFErrorGetTypeID() { - return _CFErrorGetTypeID(); - } + CFStringRef get kCFStringTransformLatinGreek => + _kCFStringTransformLatinGreek.value; - late final _CFErrorGetTypeIDPtr = - _lookup>('CFErrorGetTypeID'); - late final _CFErrorGetTypeID = - _CFErrorGetTypeIDPtr.asFunction(); + set kCFStringTransformLatinGreek(CFStringRef value) => + _kCFStringTransformLatinGreek.value = value; - late final ffi.Pointer _kCFErrorDomainPOSIX = - _lookup('kCFErrorDomainPOSIX'); + late final ffi.Pointer _kCFStringTransformToXMLHex = + _lookup('kCFStringTransformToXMLHex'); - CFErrorDomain get kCFErrorDomainPOSIX => _kCFErrorDomainPOSIX.value; + CFStringRef get kCFStringTransformToXMLHex => + _kCFStringTransformToXMLHex.value; - set kCFErrorDomainPOSIX(CFErrorDomain value) => - _kCFErrorDomainPOSIX.value = value; + set kCFStringTransformToXMLHex(CFStringRef value) => + _kCFStringTransformToXMLHex.value = value; - late final ffi.Pointer _kCFErrorDomainOSStatus = - _lookup('kCFErrorDomainOSStatus'); + late final ffi.Pointer _kCFStringTransformToUnicodeName = + _lookup('kCFStringTransformToUnicodeName'); - CFErrorDomain get kCFErrorDomainOSStatus => _kCFErrorDomainOSStatus.value; + CFStringRef get kCFStringTransformToUnicodeName => + _kCFStringTransformToUnicodeName.value; - set kCFErrorDomainOSStatus(CFErrorDomain value) => - _kCFErrorDomainOSStatus.value = value; + set kCFStringTransformToUnicodeName(CFStringRef value) => + _kCFStringTransformToUnicodeName.value = value; - late final ffi.Pointer _kCFErrorDomainMach = - _lookup('kCFErrorDomainMach'); + late final ffi.Pointer _kCFStringTransformStripDiacritics = + _lookup('kCFStringTransformStripDiacritics'); - CFErrorDomain get kCFErrorDomainMach => _kCFErrorDomainMach.value; + CFStringRef get kCFStringTransformStripDiacritics => + _kCFStringTransformStripDiacritics.value; - set kCFErrorDomainMach(CFErrorDomain value) => - _kCFErrorDomainMach.value = value; + set kCFStringTransformStripDiacritics(CFStringRef value) => + _kCFStringTransformStripDiacritics.value = value; - late final ffi.Pointer _kCFErrorDomainCocoa = - _lookup('kCFErrorDomainCocoa'); + int CFStringIsEncodingAvailable( + int encoding, + ) { + return _CFStringIsEncodingAvailable( + encoding, + ); + } - CFErrorDomain get kCFErrorDomainCocoa => _kCFErrorDomainCocoa.value; + late final _CFStringIsEncodingAvailablePtr = + _lookup>( + 'CFStringIsEncodingAvailable'); + late final _CFStringIsEncodingAvailable = + _CFStringIsEncodingAvailablePtr.asFunction(); - set kCFErrorDomainCocoa(CFErrorDomain value) => - _kCFErrorDomainCocoa.value = value; + ffi.Pointer CFStringGetListOfAvailableEncodings() { + return _CFStringGetListOfAvailableEncodings(); + } - late final ffi.Pointer _kCFErrorLocalizedDescriptionKey = - _lookup('kCFErrorLocalizedDescriptionKey'); + late final _CFStringGetListOfAvailableEncodingsPtr = + _lookup Function()>>( + 'CFStringGetListOfAvailableEncodings'); + late final _CFStringGetListOfAvailableEncodings = + _CFStringGetListOfAvailableEncodingsPtr.asFunction< + ffi.Pointer Function()>(); - CFStringRef get kCFErrorLocalizedDescriptionKey => - _kCFErrorLocalizedDescriptionKey.value; + CFStringRef CFStringGetNameOfEncoding( + int encoding, + ) { + return _CFStringGetNameOfEncoding( + encoding, + ); + } - set kCFErrorLocalizedDescriptionKey(CFStringRef value) => - _kCFErrorLocalizedDescriptionKey.value = value; + late final _CFStringGetNameOfEncodingPtr = + _lookup>( + 'CFStringGetNameOfEncoding'); + late final _CFStringGetNameOfEncoding = + _CFStringGetNameOfEncodingPtr.asFunction(); - late final ffi.Pointer _kCFErrorLocalizedFailureKey = - _lookup('kCFErrorLocalizedFailureKey'); + int CFStringConvertEncodingToNSStringEncoding( + int encoding, + ) { + return _CFStringConvertEncodingToNSStringEncoding( + encoding, + ); + } - CFStringRef get kCFErrorLocalizedFailureKey => - _kCFErrorLocalizedFailureKey.value; + late final _CFStringConvertEncodingToNSStringEncodingPtr = + _lookup>( + 'CFStringConvertEncodingToNSStringEncoding'); + late final _CFStringConvertEncodingToNSStringEncoding = + _CFStringConvertEncodingToNSStringEncodingPtr.asFunction< + int Function(int)>(); - set kCFErrorLocalizedFailureKey(CFStringRef value) => - _kCFErrorLocalizedFailureKey.value = value; + int CFStringConvertNSStringEncodingToEncoding( + int encoding, + ) { + return _CFStringConvertNSStringEncodingToEncoding( + encoding, + ); + } - late final ffi.Pointer _kCFErrorLocalizedFailureReasonKey = - _lookup('kCFErrorLocalizedFailureReasonKey'); - - CFStringRef get kCFErrorLocalizedFailureReasonKey => - _kCFErrorLocalizedFailureReasonKey.value; - - set kCFErrorLocalizedFailureReasonKey(CFStringRef value) => - _kCFErrorLocalizedFailureReasonKey.value = value; - - late final ffi.Pointer _kCFErrorLocalizedRecoverySuggestionKey = - _lookup('kCFErrorLocalizedRecoverySuggestionKey'); - - CFStringRef get kCFErrorLocalizedRecoverySuggestionKey => - _kCFErrorLocalizedRecoverySuggestionKey.value; - - set kCFErrorLocalizedRecoverySuggestionKey(CFStringRef value) => - _kCFErrorLocalizedRecoverySuggestionKey.value = value; - - late final ffi.Pointer _kCFErrorDescriptionKey = - _lookup('kCFErrorDescriptionKey'); - - CFStringRef get kCFErrorDescriptionKey => _kCFErrorDescriptionKey.value; - - set kCFErrorDescriptionKey(CFStringRef value) => - _kCFErrorDescriptionKey.value = value; - - late final ffi.Pointer _kCFErrorUnderlyingErrorKey = - _lookup('kCFErrorUnderlyingErrorKey'); - - CFStringRef get kCFErrorUnderlyingErrorKey => - _kCFErrorUnderlyingErrorKey.value; - - set kCFErrorUnderlyingErrorKey(CFStringRef value) => - _kCFErrorUnderlyingErrorKey.value = value; - - late final ffi.Pointer _kCFErrorURLKey = - _lookup('kCFErrorURLKey'); - - CFStringRef get kCFErrorURLKey => _kCFErrorURLKey.value; - - set kCFErrorURLKey(CFStringRef value) => _kCFErrorURLKey.value = value; - - late final ffi.Pointer _kCFErrorFilePathKey = - _lookup('kCFErrorFilePathKey'); - - CFStringRef get kCFErrorFilePathKey => _kCFErrorFilePathKey.value; - - set kCFErrorFilePathKey(CFStringRef value) => - _kCFErrorFilePathKey.value = value; + late final _CFStringConvertNSStringEncodingToEncodingPtr = + _lookup>( + 'CFStringConvertNSStringEncodingToEncoding'); + late final _CFStringConvertNSStringEncodingToEncoding = + _CFStringConvertNSStringEncodingToEncodingPtr.asFunction< + int Function(int)>(); - CFErrorRef CFErrorCreate( - CFAllocatorRef allocator, - CFErrorDomain domain, - int code, - CFDictionaryRef userInfo, + int CFStringConvertEncodingToWindowsCodepage( + int encoding, ) { - return _CFErrorCreate( - allocator, - domain, - code, - userInfo, + return _CFStringConvertEncodingToWindowsCodepage( + encoding, ); } - late final _CFErrorCreatePtr = _lookup< - ffi.NativeFunction< - CFErrorRef Function(CFAllocatorRef, CFErrorDomain, CFIndex, - CFDictionaryRef)>>('CFErrorCreate'); - late final _CFErrorCreate = _CFErrorCreatePtr.asFunction< - CFErrorRef Function( - CFAllocatorRef, CFErrorDomain, int, CFDictionaryRef)>(); + late final _CFStringConvertEncodingToWindowsCodepagePtr = + _lookup>( + 'CFStringConvertEncodingToWindowsCodepage'); + late final _CFStringConvertEncodingToWindowsCodepage = + _CFStringConvertEncodingToWindowsCodepagePtr.asFunction< + int Function(int)>(); - CFErrorRef CFErrorCreateWithUserInfoKeysAndValues( - CFAllocatorRef allocator, - CFErrorDomain domain, - int code, - ffi.Pointer> userInfoKeys, - ffi.Pointer> userInfoValues, - int numUserInfoValues, + int CFStringConvertWindowsCodepageToEncoding( + int codepage, ) { - return _CFErrorCreateWithUserInfoKeysAndValues( - allocator, - domain, - code, - userInfoKeys, - userInfoValues, - numUserInfoValues, + return _CFStringConvertWindowsCodepageToEncoding( + codepage, ); } - late final _CFErrorCreateWithUserInfoKeysAndValuesPtr = _lookup< - ffi.NativeFunction< - CFErrorRef Function( - CFAllocatorRef, - CFErrorDomain, - CFIndex, - ffi.Pointer>, - ffi.Pointer>, - CFIndex)>>('CFErrorCreateWithUserInfoKeysAndValues'); - late final _CFErrorCreateWithUserInfoKeysAndValues = - _CFErrorCreateWithUserInfoKeysAndValuesPtr.asFunction< - CFErrorRef Function( - CFAllocatorRef, - CFErrorDomain, - int, - ffi.Pointer>, - ffi.Pointer>, - int)>(); + late final _CFStringConvertWindowsCodepageToEncodingPtr = + _lookup>( + 'CFStringConvertWindowsCodepageToEncoding'); + late final _CFStringConvertWindowsCodepageToEncoding = + _CFStringConvertWindowsCodepageToEncodingPtr.asFunction< + int Function(int)>(); - CFErrorDomain CFErrorGetDomain( - CFErrorRef err, + int CFStringConvertIANACharSetNameToEncoding( + CFStringRef theString, ) { - return _CFErrorGetDomain( - err, + return _CFStringConvertIANACharSetNameToEncoding( + theString, ); } - late final _CFErrorGetDomainPtr = - _lookup>( - 'CFErrorGetDomain'); - late final _CFErrorGetDomain = - _CFErrorGetDomainPtr.asFunction(); + late final _CFStringConvertIANACharSetNameToEncodingPtr = + _lookup>( + 'CFStringConvertIANACharSetNameToEncoding'); + late final _CFStringConvertIANACharSetNameToEncoding = + _CFStringConvertIANACharSetNameToEncodingPtr.asFunction< + int Function(CFStringRef)>(); - int CFErrorGetCode( - CFErrorRef err, + CFStringRef CFStringConvertEncodingToIANACharSetName( + int encoding, ) { - return _CFErrorGetCode( - err, + return _CFStringConvertEncodingToIANACharSetName( + encoding, ); } - late final _CFErrorGetCodePtr = - _lookup>( - 'CFErrorGetCode'); - late final _CFErrorGetCode = - _CFErrorGetCodePtr.asFunction(); + late final _CFStringConvertEncodingToIANACharSetNamePtr = + _lookup>( + 'CFStringConvertEncodingToIANACharSetName'); + late final _CFStringConvertEncodingToIANACharSetName = + _CFStringConvertEncodingToIANACharSetNamePtr.asFunction< + CFStringRef Function(int)>(); - CFDictionaryRef CFErrorCopyUserInfo( - CFErrorRef err, + int CFStringGetMostCompatibleMacStringEncoding( + int encoding, ) { - return _CFErrorCopyUserInfo( - err, + return _CFStringGetMostCompatibleMacStringEncoding( + encoding, ); } - late final _CFErrorCopyUserInfoPtr = - _lookup>( - 'CFErrorCopyUserInfo'); - late final _CFErrorCopyUserInfo = _CFErrorCopyUserInfoPtr.asFunction< - CFDictionaryRef Function(CFErrorRef)>(); + late final _CFStringGetMostCompatibleMacStringEncodingPtr = + _lookup>( + 'CFStringGetMostCompatibleMacStringEncoding'); + late final _CFStringGetMostCompatibleMacStringEncoding = + _CFStringGetMostCompatibleMacStringEncodingPtr.asFunction< + int Function(int)>(); - CFStringRef CFErrorCopyDescription( - CFErrorRef err, + void CFShow( + CFTypeRef obj, ) { - return _CFErrorCopyDescription( - err, + return _CFShow( + obj, ); } - late final _CFErrorCopyDescriptionPtr = - _lookup>( - 'CFErrorCopyDescription'); - late final _CFErrorCopyDescription = - _CFErrorCopyDescriptionPtr.asFunction(); + late final _CFShowPtr = + _lookup>('CFShow'); + late final _CFShow = _CFShowPtr.asFunction(); - CFStringRef CFErrorCopyFailureReason( - CFErrorRef err, + void CFShowStr( + CFStringRef str, ) { - return _CFErrorCopyFailureReason( - err, + return _CFShowStr( + str, ); } - late final _CFErrorCopyFailureReasonPtr = - _lookup>( - 'CFErrorCopyFailureReason'); - late final _CFErrorCopyFailureReason = _CFErrorCopyFailureReasonPtr - .asFunction(); + late final _CFShowStrPtr = + _lookup>('CFShowStr'); + late final _CFShowStr = + _CFShowStrPtr.asFunction(); - CFStringRef CFErrorCopyRecoverySuggestion( - CFErrorRef err, + CFStringRef __CFStringMakeConstantString( + ffi.Pointer cStr, ) { - return _CFErrorCopyRecoverySuggestion( - err, + return ___CFStringMakeConstantString( + cStr, ); } - late final _CFErrorCopyRecoverySuggestionPtr = - _lookup>( - 'CFErrorCopyRecoverySuggestion'); - late final _CFErrorCopyRecoverySuggestion = _CFErrorCopyRecoverySuggestionPtr - .asFunction(); + late final ___CFStringMakeConstantStringPtr = + _lookup)>>( + '__CFStringMakeConstantString'); + late final ___CFStringMakeConstantString = ___CFStringMakeConstantStringPtr + .asFunction)>(); - late final ffi.Pointer _kCFBooleanTrue = - _lookup('kCFBooleanTrue'); + int CFTimeZoneGetTypeID() { + return _CFTimeZoneGetTypeID(); + } - CFBooleanRef get kCFBooleanTrue => _kCFBooleanTrue.value; + late final _CFTimeZoneGetTypeIDPtr = + _lookup>('CFTimeZoneGetTypeID'); + late final _CFTimeZoneGetTypeID = + _CFTimeZoneGetTypeIDPtr.asFunction(); - set kCFBooleanTrue(CFBooleanRef value) => _kCFBooleanTrue.value = value; + CFTimeZoneRef CFTimeZoneCopySystem() { + return _CFTimeZoneCopySystem(); + } - late final ffi.Pointer _kCFBooleanFalse = - _lookup('kCFBooleanFalse'); + late final _CFTimeZoneCopySystemPtr = + _lookup>( + 'CFTimeZoneCopySystem'); + late final _CFTimeZoneCopySystem = + _CFTimeZoneCopySystemPtr.asFunction(); - CFBooleanRef get kCFBooleanFalse => _kCFBooleanFalse.value; + void CFTimeZoneResetSystem() { + return _CFTimeZoneResetSystem(); + } - set kCFBooleanFalse(CFBooleanRef value) => _kCFBooleanFalse.value = value; + late final _CFTimeZoneResetSystemPtr = + _lookup>('CFTimeZoneResetSystem'); + late final _CFTimeZoneResetSystem = + _CFTimeZoneResetSystemPtr.asFunction(); - int CFBooleanGetTypeID() { - return _CFBooleanGetTypeID(); + CFTimeZoneRef CFTimeZoneCopyDefault() { + return _CFTimeZoneCopyDefault(); } - late final _CFBooleanGetTypeIDPtr = - _lookup>('CFBooleanGetTypeID'); - late final _CFBooleanGetTypeID = - _CFBooleanGetTypeIDPtr.asFunction(); + late final _CFTimeZoneCopyDefaultPtr = + _lookup>( + 'CFTimeZoneCopyDefault'); + late final _CFTimeZoneCopyDefault = + _CFTimeZoneCopyDefaultPtr.asFunction(); - int CFBooleanGetValue( - CFBooleanRef boolean, + void CFTimeZoneSetDefault( + CFTimeZoneRef tz, ) { - return _CFBooleanGetValue( - boolean, + return _CFTimeZoneSetDefault( + tz, ); } - late final _CFBooleanGetValuePtr = - _lookup>( - 'CFBooleanGetValue'); - late final _CFBooleanGetValue = - _CFBooleanGetValuePtr.asFunction(); - - late final ffi.Pointer _kCFNumberPositiveInfinity = - _lookup('kCFNumberPositiveInfinity'); - - CFNumberRef get kCFNumberPositiveInfinity => _kCFNumberPositiveInfinity.value; - - set kCFNumberPositiveInfinity(CFNumberRef value) => - _kCFNumberPositiveInfinity.value = value; - - late final ffi.Pointer _kCFNumberNegativeInfinity = - _lookup('kCFNumberNegativeInfinity'); - - CFNumberRef get kCFNumberNegativeInfinity => _kCFNumberNegativeInfinity.value; + late final _CFTimeZoneSetDefaultPtr = + _lookup>( + 'CFTimeZoneSetDefault'); + late final _CFTimeZoneSetDefault = + _CFTimeZoneSetDefaultPtr.asFunction(); - set kCFNumberNegativeInfinity(CFNumberRef value) => - _kCFNumberNegativeInfinity.value = value; + CFArrayRef CFTimeZoneCopyKnownNames() { + return _CFTimeZoneCopyKnownNames(); + } - late final ffi.Pointer _kCFNumberNaN = - _lookup('kCFNumberNaN'); + late final _CFTimeZoneCopyKnownNamesPtr = + _lookup>( + 'CFTimeZoneCopyKnownNames'); + late final _CFTimeZoneCopyKnownNames = + _CFTimeZoneCopyKnownNamesPtr.asFunction(); - CFNumberRef get kCFNumberNaN => _kCFNumberNaN.value; + CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary() { + return _CFTimeZoneCopyAbbreviationDictionary(); + } - set kCFNumberNaN(CFNumberRef value) => _kCFNumberNaN.value = value; + late final _CFTimeZoneCopyAbbreviationDictionaryPtr = + _lookup>( + 'CFTimeZoneCopyAbbreviationDictionary'); + late final _CFTimeZoneCopyAbbreviationDictionary = + _CFTimeZoneCopyAbbreviationDictionaryPtr.asFunction< + CFDictionaryRef Function()>(); - int CFNumberGetTypeID() { - return _CFNumberGetTypeID(); + void CFTimeZoneSetAbbreviationDictionary( + CFDictionaryRef dict, + ) { + return _CFTimeZoneSetAbbreviationDictionary( + dict, + ); } - late final _CFNumberGetTypeIDPtr = - _lookup>('CFNumberGetTypeID'); - late final _CFNumberGetTypeID = - _CFNumberGetTypeIDPtr.asFunction(); + late final _CFTimeZoneSetAbbreviationDictionaryPtr = + _lookup>( + 'CFTimeZoneSetAbbreviationDictionary'); + late final _CFTimeZoneSetAbbreviationDictionary = + _CFTimeZoneSetAbbreviationDictionaryPtr.asFunction< + void Function(CFDictionaryRef)>(); - CFNumberRef CFNumberCreate( + CFTimeZoneRef CFTimeZoneCreate( CFAllocatorRef allocator, - int theType, - ffi.Pointer valuePtr, + CFStringRef name, + CFDataRef data, ) { - return _CFNumberCreate( + return _CFTimeZoneCreate( allocator, - theType, - valuePtr, + name, + data, ); } - late final _CFNumberCreatePtr = _lookup< + late final _CFTimeZoneCreatePtr = _lookup< ffi.NativeFunction< - CFNumberRef Function(CFAllocatorRef, ffi.Int32, - ffi.Pointer)>>('CFNumberCreate'); - late final _CFNumberCreate = _CFNumberCreatePtr.asFunction< - CFNumberRef Function(CFAllocatorRef, int, ffi.Pointer)>(); + CFTimeZoneRef Function( + CFAllocatorRef, CFStringRef, CFDataRef)>>('CFTimeZoneCreate'); + late final _CFTimeZoneCreate = _CFTimeZoneCreatePtr.asFunction< + CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); - int CFNumberGetType( - CFNumberRef number, + CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT( + CFAllocatorRef allocator, + double ti, ) { - return _CFNumberGetType( - number, + return _CFTimeZoneCreateWithTimeIntervalFromGMT( + allocator, + ti, ); } - late final _CFNumberGetTypePtr = - _lookup>( - 'CFNumberGetType'); - late final _CFNumberGetType = - _CFNumberGetTypePtr.asFunction(); + late final _CFTimeZoneCreateWithTimeIntervalFromGMTPtr = _lookup< + ffi.NativeFunction< + CFTimeZoneRef Function(CFAllocatorRef, + CFTimeInterval)>>('CFTimeZoneCreateWithTimeIntervalFromGMT'); + late final _CFTimeZoneCreateWithTimeIntervalFromGMT = + _CFTimeZoneCreateWithTimeIntervalFromGMTPtr.asFunction< + CFTimeZoneRef Function(CFAllocatorRef, double)>(); - int CFNumberGetByteSize( - CFNumberRef number, + CFTimeZoneRef CFTimeZoneCreateWithName( + CFAllocatorRef allocator, + CFStringRef name, + int tryAbbrev, ) { - return _CFNumberGetByteSize( - number, + return _CFTimeZoneCreateWithName( + allocator, + name, + tryAbbrev, ); } - late final _CFNumberGetByteSizePtr = - _lookup>( - 'CFNumberGetByteSize'); - late final _CFNumberGetByteSize = - _CFNumberGetByteSizePtr.asFunction(); + late final _CFTimeZoneCreateWithNamePtr = _lookup< + ffi.NativeFunction< + CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, + Boolean)>>('CFTimeZoneCreateWithName'); + late final _CFTimeZoneCreateWithName = _CFTimeZoneCreateWithNamePtr + .asFunction(); - int CFNumberIsFloatType( - CFNumberRef number, + CFStringRef CFTimeZoneGetName( + CFTimeZoneRef tz, ) { - return _CFNumberIsFloatType( - number, + return _CFTimeZoneGetName( + tz, ); } - late final _CFNumberIsFloatTypePtr = - _lookup>( - 'CFNumberIsFloatType'); - late final _CFNumberIsFloatType = - _CFNumberIsFloatTypePtr.asFunction(); + late final _CFTimeZoneGetNamePtr = + _lookup>( + 'CFTimeZoneGetName'); + late final _CFTimeZoneGetName = + _CFTimeZoneGetNamePtr.asFunction(); - int CFNumberGetValue( - CFNumberRef number, - int theType, - ffi.Pointer valuePtr, + CFDataRef CFTimeZoneGetData( + CFTimeZoneRef tz, ) { - return _CFNumberGetValue( - number, - theType, - valuePtr, + return _CFTimeZoneGetData( + tz, ); } - late final _CFNumberGetValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFNumberRef, ffi.Int32, - ffi.Pointer)>>('CFNumberGetValue'); - late final _CFNumberGetValue = _CFNumberGetValuePtr.asFunction< - int Function(CFNumberRef, int, ffi.Pointer)>(); + late final _CFTimeZoneGetDataPtr = + _lookup>( + 'CFTimeZoneGetData'); + late final _CFTimeZoneGetData = + _CFTimeZoneGetDataPtr.asFunction(); - int CFNumberCompare( - CFNumberRef number, - CFNumberRef otherNumber, - ffi.Pointer context, + double CFTimeZoneGetSecondsFromGMT( + CFTimeZoneRef tz, + double at, ) { - return _CFNumberCompare( - number, - otherNumber, - context, + return _CFTimeZoneGetSecondsFromGMT( + tz, + at, ); } - late final _CFNumberComparePtr = _lookup< + late final _CFTimeZoneGetSecondsFromGMTPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFNumberRef, CFNumberRef, - ffi.Pointer)>>('CFNumberCompare'); - late final _CFNumberCompare = _CFNumberComparePtr.asFunction< - int Function(CFNumberRef, CFNumberRef, ffi.Pointer)>(); - - int CFNumberFormatterGetTypeID() { - return _CFNumberFormatterGetTypeID(); - } - - late final _CFNumberFormatterGetTypeIDPtr = - _lookup>( - 'CFNumberFormatterGetTypeID'); - late final _CFNumberFormatterGetTypeID = - _CFNumberFormatterGetTypeIDPtr.asFunction(); + CFTimeInterval Function( + CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneGetSecondsFromGMT'); + late final _CFTimeZoneGetSecondsFromGMT = _CFTimeZoneGetSecondsFromGMTPtr + .asFunction(); - CFNumberFormatterRef CFNumberFormatterCreate( - CFAllocatorRef allocator, - CFLocaleRef locale, - int style, + CFStringRef CFTimeZoneCopyAbbreviation( + CFTimeZoneRef tz, + double at, ) { - return _CFNumberFormatterCreate( - allocator, - locale, - style, + return _CFTimeZoneCopyAbbreviation( + tz, + at, ); } - late final _CFNumberFormatterCreatePtr = _lookup< + late final _CFTimeZoneCopyAbbreviationPtr = _lookup< ffi.NativeFunction< - CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, - ffi.Int32)>>('CFNumberFormatterCreate'); - late final _CFNumberFormatterCreate = _CFNumberFormatterCreatePtr.asFunction< - CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, int)>(); + CFStringRef Function( + CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneCopyAbbreviation'); + late final _CFTimeZoneCopyAbbreviation = _CFTimeZoneCopyAbbreviationPtr + .asFunction(); - CFLocaleRef CFNumberFormatterGetLocale( - CFNumberFormatterRef formatter, + int CFTimeZoneIsDaylightSavingTime( + CFTimeZoneRef tz, + double at, ) { - return _CFNumberFormatterGetLocale( - formatter, + return _CFTimeZoneIsDaylightSavingTime( + tz, + at, ); } - late final _CFNumberFormatterGetLocalePtr = - _lookup>( - 'CFNumberFormatterGetLocale'); - late final _CFNumberFormatterGetLocale = _CFNumberFormatterGetLocalePtr - .asFunction(); + late final _CFTimeZoneIsDaylightSavingTimePtr = _lookup< + ffi.NativeFunction>( + 'CFTimeZoneIsDaylightSavingTime'); + late final _CFTimeZoneIsDaylightSavingTime = + _CFTimeZoneIsDaylightSavingTimePtr.asFunction< + int Function(CFTimeZoneRef, double)>(); - int CFNumberFormatterGetStyle( - CFNumberFormatterRef formatter, + double CFTimeZoneGetDaylightSavingTimeOffset( + CFTimeZoneRef tz, + double at, ) { - return _CFNumberFormatterGetStyle( - formatter, + return _CFTimeZoneGetDaylightSavingTimeOffset( + tz, + at, ); } - late final _CFNumberFormatterGetStylePtr = - _lookup>( - 'CFNumberFormatterGetStyle'); - late final _CFNumberFormatterGetStyle = _CFNumberFormatterGetStylePtr - .asFunction(); + late final _CFTimeZoneGetDaylightSavingTimeOffsetPtr = _lookup< + ffi.NativeFunction< + CFTimeInterval Function(CFTimeZoneRef, + CFAbsoluteTime)>>('CFTimeZoneGetDaylightSavingTimeOffset'); + late final _CFTimeZoneGetDaylightSavingTimeOffset = + _CFTimeZoneGetDaylightSavingTimeOffsetPtr.asFunction< + double Function(CFTimeZoneRef, double)>(); - CFStringRef CFNumberFormatterGetFormat( - CFNumberFormatterRef formatter, + double CFTimeZoneGetNextDaylightSavingTimeTransition( + CFTimeZoneRef tz, + double at, ) { - return _CFNumberFormatterGetFormat( - formatter, + return _CFTimeZoneGetNextDaylightSavingTimeTransition( + tz, + at, ); } - late final _CFNumberFormatterGetFormatPtr = - _lookup>( - 'CFNumberFormatterGetFormat'); - late final _CFNumberFormatterGetFormat = _CFNumberFormatterGetFormatPtr - .asFunction(); + late final _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr = _lookup< + ffi.NativeFunction< + CFAbsoluteTime Function(CFTimeZoneRef, CFAbsoluteTime)>>( + 'CFTimeZoneGetNextDaylightSavingTimeTransition'); + late final _CFTimeZoneGetNextDaylightSavingTimeTransition = + _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr.asFunction< + double Function(CFTimeZoneRef, double)>(); - void CFNumberFormatterSetFormat( - CFNumberFormatterRef formatter, - CFStringRef formatString, + CFStringRef CFTimeZoneCopyLocalizedName( + CFTimeZoneRef tz, + int style, + CFLocaleRef locale, ) { - return _CFNumberFormatterSetFormat( - formatter, - formatString, + return _CFTimeZoneCopyLocalizedName( + tz, + style, + locale, ); } - late final _CFNumberFormatterSetFormatPtr = _lookup< + late final _CFTimeZoneCopyLocalizedNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFNumberFormatterRef, - CFStringRef)>>('CFNumberFormatterSetFormat'); - late final _CFNumberFormatterSetFormat = _CFNumberFormatterSetFormatPtr - .asFunction(); + CFStringRef Function(CFTimeZoneRef, ffi.Int32, + CFLocaleRef)>>('CFTimeZoneCopyLocalizedName'); + late final _CFTimeZoneCopyLocalizedName = _CFTimeZoneCopyLocalizedNamePtr + .asFunction(); - CFStringRef CFNumberFormatterCreateStringWithNumber( + late final ffi.Pointer + _kCFTimeZoneSystemTimeZoneDidChangeNotification = + _lookup( + 'kCFTimeZoneSystemTimeZoneDidChangeNotification'); + + CFNotificationName get kCFTimeZoneSystemTimeZoneDidChangeNotification => + _kCFTimeZoneSystemTimeZoneDidChangeNotification.value; + + set kCFTimeZoneSystemTimeZoneDidChangeNotification( + CFNotificationName value) => + _kCFTimeZoneSystemTimeZoneDidChangeNotification.value = value; + + int CFCalendarGetTypeID() { + return _CFCalendarGetTypeID(); + } + + late final _CFCalendarGetTypeIDPtr = + _lookup>('CFCalendarGetTypeID'); + late final _CFCalendarGetTypeID = + _CFCalendarGetTypeIDPtr.asFunction(); + + CFCalendarRef CFCalendarCopyCurrent() { + return _CFCalendarCopyCurrent(); + } + + late final _CFCalendarCopyCurrentPtr = + _lookup>( + 'CFCalendarCopyCurrent'); + late final _CFCalendarCopyCurrent = + _CFCalendarCopyCurrentPtr.asFunction(); + + CFCalendarRef CFCalendarCreateWithIdentifier( CFAllocatorRef allocator, - CFNumberFormatterRef formatter, - CFNumberRef number, + CFCalendarIdentifier identifier, ) { - return _CFNumberFormatterCreateStringWithNumber( + return _CFCalendarCreateWithIdentifier( allocator, - formatter, - number, + identifier, ); } - late final _CFNumberFormatterCreateStringWithNumberPtr = _lookup< + late final _CFCalendarCreateWithIdentifierPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, - CFNumberRef)>>('CFNumberFormatterCreateStringWithNumber'); - late final _CFNumberFormatterCreateStringWithNumber = - _CFNumberFormatterCreateStringWithNumberPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFNumberFormatterRef, CFNumberRef)>(); + CFCalendarRef Function(CFAllocatorRef, + CFCalendarIdentifier)>>('CFCalendarCreateWithIdentifier'); + late final _CFCalendarCreateWithIdentifier = + _CFCalendarCreateWithIdentifierPtr.asFunction< + CFCalendarRef Function(CFAllocatorRef, CFCalendarIdentifier)>(); - CFStringRef CFNumberFormatterCreateStringWithValue( - CFAllocatorRef allocator, - CFNumberFormatterRef formatter, - int numberType, - ffi.Pointer valuePtr, + CFCalendarIdentifier CFCalendarGetIdentifier( + CFCalendarRef calendar, ) { - return _CFNumberFormatterCreateStringWithValue( - allocator, - formatter, - numberType, - valuePtr, + return _CFCalendarGetIdentifier( + calendar, ); } - late final _CFNumberFormatterCreateStringWithValuePtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, - ffi.Int32, ffi.Pointer)>>( - 'CFNumberFormatterCreateStringWithValue'); - late final _CFNumberFormatterCreateStringWithValue = - _CFNumberFormatterCreateStringWithValuePtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, int, - ffi.Pointer)>(); + late final _CFCalendarGetIdentifierPtr = + _lookup>( + 'CFCalendarGetIdentifier'); + late final _CFCalendarGetIdentifier = _CFCalendarGetIdentifierPtr.asFunction< + CFCalendarIdentifier Function(CFCalendarRef)>(); - CFNumberRef CFNumberFormatterCreateNumberFromString( - CFAllocatorRef allocator, - CFNumberFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, - int options, + CFLocaleRef CFCalendarCopyLocale( + CFCalendarRef calendar, ) { - return _CFNumberFormatterCreateNumberFromString( - allocator, - formatter, - string, - rangep, - options, + return _CFCalendarCopyLocale( + calendar, ); } - late final _CFNumberFormatterCreateNumberFromStringPtr = _lookup< - ffi.NativeFunction< - CFNumberRef Function( - CFAllocatorRef, - CFNumberFormatterRef, - CFStringRef, - ffi.Pointer, - CFOptionFlags)>>('CFNumberFormatterCreateNumberFromString'); - late final _CFNumberFormatterCreateNumberFromString = - _CFNumberFormatterCreateNumberFromStringPtr.asFunction< - CFNumberRef Function(CFAllocatorRef, CFNumberFormatterRef, - CFStringRef, ffi.Pointer, int)>(); + late final _CFCalendarCopyLocalePtr = + _lookup>( + 'CFCalendarCopyLocale'); + late final _CFCalendarCopyLocale = _CFCalendarCopyLocalePtr.asFunction< + CFLocaleRef Function(CFCalendarRef)>(); - int CFNumberFormatterGetValueFromString( - CFNumberFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, - int numberType, - ffi.Pointer valuePtr, + void CFCalendarSetLocale( + CFCalendarRef calendar, + CFLocaleRef locale, ) { - return _CFNumberFormatterGetValueFromString( - formatter, - string, - rangep, - numberType, - valuePtr, + return _CFCalendarSetLocale( + calendar, + locale, ); } - late final _CFNumberFormatterGetValueFromStringPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFNumberFormatterRef, - CFStringRef, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('CFNumberFormatterGetValueFromString'); - late final _CFNumberFormatterGetValueFromString = - _CFNumberFormatterGetValueFromStringPtr.asFunction< - int Function(CFNumberFormatterRef, CFStringRef, ffi.Pointer, - int, ffi.Pointer)>(); + late final _CFCalendarSetLocalePtr = _lookup< + ffi.NativeFunction>( + 'CFCalendarSetLocale'); + late final _CFCalendarSetLocale = _CFCalendarSetLocalePtr.asFunction< + void Function(CFCalendarRef, CFLocaleRef)>(); - void CFNumberFormatterSetProperty( - CFNumberFormatterRef formatter, - CFNumberFormatterKey key, - CFTypeRef value, + CFTimeZoneRef CFCalendarCopyTimeZone( + CFCalendarRef calendar, ) { - return _CFNumberFormatterSetProperty( - formatter, - key, - value, + return _CFCalendarCopyTimeZone( + calendar, ); } - late final _CFNumberFormatterSetPropertyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFNumberFormatterRef, CFNumberFormatterKey, - CFTypeRef)>>('CFNumberFormatterSetProperty'); - late final _CFNumberFormatterSetProperty = - _CFNumberFormatterSetPropertyPtr.asFunction< - void Function( - CFNumberFormatterRef, CFNumberFormatterKey, CFTypeRef)>(); + late final _CFCalendarCopyTimeZonePtr = + _lookup>( + 'CFCalendarCopyTimeZone'); + late final _CFCalendarCopyTimeZone = _CFCalendarCopyTimeZonePtr.asFunction< + CFTimeZoneRef Function(CFCalendarRef)>(); - CFTypeRef CFNumberFormatterCopyProperty( - CFNumberFormatterRef formatter, - CFNumberFormatterKey key, + void CFCalendarSetTimeZone( + CFCalendarRef calendar, + CFTimeZoneRef tz, ) { - return _CFNumberFormatterCopyProperty( - formatter, - key, + return _CFCalendarSetTimeZone( + calendar, + tz, ); } - late final _CFNumberFormatterCopyPropertyPtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFNumberFormatterRef, - CFNumberFormatterKey)>>('CFNumberFormatterCopyProperty'); - late final _CFNumberFormatterCopyProperty = - _CFNumberFormatterCopyPropertyPtr.asFunction< - CFTypeRef Function(CFNumberFormatterRef, CFNumberFormatterKey)>(); - - late final ffi.Pointer _kCFNumberFormatterCurrencyCode = - _lookup('kCFNumberFormatterCurrencyCode'); - - CFNumberFormatterKey get kCFNumberFormatterCurrencyCode => - _kCFNumberFormatterCurrencyCode.value; + late final _CFCalendarSetTimeZonePtr = _lookup< + ffi.NativeFunction>( + 'CFCalendarSetTimeZone'); + late final _CFCalendarSetTimeZone = _CFCalendarSetTimeZonePtr.asFunction< + void Function(CFCalendarRef, CFTimeZoneRef)>(); - set kCFNumberFormatterCurrencyCode(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencyCode.value = value; + int CFCalendarGetFirstWeekday( + CFCalendarRef calendar, + ) { + return _CFCalendarGetFirstWeekday( + calendar, + ); + } - late final ffi.Pointer - _kCFNumberFormatterDecimalSeparator = - _lookup('kCFNumberFormatterDecimalSeparator'); + late final _CFCalendarGetFirstWeekdayPtr = + _lookup>( + 'CFCalendarGetFirstWeekday'); + late final _CFCalendarGetFirstWeekday = + _CFCalendarGetFirstWeekdayPtr.asFunction(); - CFNumberFormatterKey get kCFNumberFormatterDecimalSeparator => - _kCFNumberFormatterDecimalSeparator.value; + void CFCalendarSetFirstWeekday( + CFCalendarRef calendar, + int wkdy, + ) { + return _CFCalendarSetFirstWeekday( + calendar, + wkdy, + ); + } - set kCFNumberFormatterDecimalSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterDecimalSeparator.value = value; + late final _CFCalendarSetFirstWeekdayPtr = + _lookup>( + 'CFCalendarSetFirstWeekday'); + late final _CFCalendarSetFirstWeekday = _CFCalendarSetFirstWeekdayPtr + .asFunction(); - late final ffi.Pointer - _kCFNumberFormatterCurrencyDecimalSeparator = - _lookup( - 'kCFNumberFormatterCurrencyDecimalSeparator'); + int CFCalendarGetMinimumDaysInFirstWeek( + CFCalendarRef calendar, + ) { + return _CFCalendarGetMinimumDaysInFirstWeek( + calendar, + ); + } - CFNumberFormatterKey get kCFNumberFormatterCurrencyDecimalSeparator => - _kCFNumberFormatterCurrencyDecimalSeparator.value; + late final _CFCalendarGetMinimumDaysInFirstWeekPtr = + _lookup>( + 'CFCalendarGetMinimumDaysInFirstWeek'); + late final _CFCalendarGetMinimumDaysInFirstWeek = + _CFCalendarGetMinimumDaysInFirstWeekPtr.asFunction< + int Function(CFCalendarRef)>(); - set kCFNumberFormatterCurrencyDecimalSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencyDecimalSeparator.value = value; + void CFCalendarSetMinimumDaysInFirstWeek( + CFCalendarRef calendar, + int mwd, + ) { + return _CFCalendarSetMinimumDaysInFirstWeek( + calendar, + mwd, + ); + } - late final ffi.Pointer - _kCFNumberFormatterAlwaysShowDecimalSeparator = - _lookup( - 'kCFNumberFormatterAlwaysShowDecimalSeparator'); + late final _CFCalendarSetMinimumDaysInFirstWeekPtr = + _lookup>( + 'CFCalendarSetMinimumDaysInFirstWeek'); + late final _CFCalendarSetMinimumDaysInFirstWeek = + _CFCalendarSetMinimumDaysInFirstWeekPtr.asFunction< + void Function(CFCalendarRef, int)>(); - CFNumberFormatterKey get kCFNumberFormatterAlwaysShowDecimalSeparator => - _kCFNumberFormatterAlwaysShowDecimalSeparator.value; + CFRange CFCalendarGetMinimumRangeOfUnit( + CFCalendarRef calendar, + int unit, + ) { + return _CFCalendarGetMinimumRangeOfUnit( + calendar, + unit, + ); + } - set kCFNumberFormatterAlwaysShowDecimalSeparator( - CFNumberFormatterKey value) => - _kCFNumberFormatterAlwaysShowDecimalSeparator.value = value; + late final _CFCalendarGetMinimumRangeOfUnitPtr = + _lookup>( + 'CFCalendarGetMinimumRangeOfUnit'); + late final _CFCalendarGetMinimumRangeOfUnit = + _CFCalendarGetMinimumRangeOfUnitPtr.asFunction< + CFRange Function(CFCalendarRef, int)>(); - late final ffi.Pointer - _kCFNumberFormatterGroupingSeparator = - _lookup('kCFNumberFormatterGroupingSeparator'); + CFRange CFCalendarGetMaximumRangeOfUnit( + CFCalendarRef calendar, + int unit, + ) { + return _CFCalendarGetMaximumRangeOfUnit( + calendar, + unit, + ); + } - CFNumberFormatterKey get kCFNumberFormatterGroupingSeparator => - _kCFNumberFormatterGroupingSeparator.value; + late final _CFCalendarGetMaximumRangeOfUnitPtr = + _lookup>( + 'CFCalendarGetMaximumRangeOfUnit'); + late final _CFCalendarGetMaximumRangeOfUnit = + _CFCalendarGetMaximumRangeOfUnitPtr.asFunction< + CFRange Function(CFCalendarRef, int)>(); - set kCFNumberFormatterGroupingSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterGroupingSeparator.value = value; + CFRange CFCalendarGetRangeOfUnit( + CFCalendarRef calendar, + int smallerUnit, + int biggerUnit, + double at, + ) { + return _CFCalendarGetRangeOfUnit( + calendar, + smallerUnit, + biggerUnit, + at, + ); + } - late final ffi.Pointer - _kCFNumberFormatterUseGroupingSeparator = - _lookup('kCFNumberFormatterUseGroupingSeparator'); + late final _CFCalendarGetRangeOfUnitPtr = _lookup< + ffi.NativeFunction< + CFRange Function(CFCalendarRef, ffi.Int32, ffi.Int32, + CFAbsoluteTime)>>('CFCalendarGetRangeOfUnit'); + late final _CFCalendarGetRangeOfUnit = _CFCalendarGetRangeOfUnitPtr + .asFunction(); - CFNumberFormatterKey get kCFNumberFormatterUseGroupingSeparator => - _kCFNumberFormatterUseGroupingSeparator.value; + int CFCalendarGetOrdinalityOfUnit( + CFCalendarRef calendar, + int smallerUnit, + int biggerUnit, + double at, + ) { + return _CFCalendarGetOrdinalityOfUnit( + calendar, + smallerUnit, + biggerUnit, + at, + ); + } - set kCFNumberFormatterUseGroupingSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterUseGroupingSeparator.value = value; + late final _CFCalendarGetOrdinalityOfUnitPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFCalendarRef, ffi.Int32, ffi.Int32, + CFAbsoluteTime)>>('CFCalendarGetOrdinalityOfUnit'); + late final _CFCalendarGetOrdinalityOfUnit = _CFCalendarGetOrdinalityOfUnitPtr + .asFunction(); - late final ffi.Pointer - _kCFNumberFormatterPercentSymbol = - _lookup('kCFNumberFormatterPercentSymbol'); + int CFCalendarGetTimeRangeOfUnit( + CFCalendarRef calendar, + int unit, + double at, + ffi.Pointer startp, + ffi.Pointer tip, + ) { + return _CFCalendarGetTimeRangeOfUnit( + calendar, + unit, + at, + startp, + tip, + ); + } - CFNumberFormatterKey get kCFNumberFormatterPercentSymbol => - _kCFNumberFormatterPercentSymbol.value; + late final _CFCalendarGetTimeRangeOfUnitPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFCalendarRef, + ffi.Int32, + CFAbsoluteTime, + ffi.Pointer, + ffi.Pointer)>>('CFCalendarGetTimeRangeOfUnit'); + late final _CFCalendarGetTimeRangeOfUnit = + _CFCalendarGetTimeRangeOfUnitPtr.asFunction< + int Function(CFCalendarRef, int, double, ffi.Pointer, + ffi.Pointer)>(); - set kCFNumberFormatterPercentSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterPercentSymbol.value = value; + int CFCalendarComposeAbsoluteTime( + CFCalendarRef calendar, + ffi.Pointer at, + ffi.Pointer componentDesc, + ) { + return _CFCalendarComposeAbsoluteTime( + calendar, + at, + componentDesc, + ); + } - late final ffi.Pointer _kCFNumberFormatterZeroSymbol = - _lookup('kCFNumberFormatterZeroSymbol'); + late final _CFCalendarComposeAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFCalendarRef, ffi.Pointer, + ffi.Pointer)>>('CFCalendarComposeAbsoluteTime'); + late final _CFCalendarComposeAbsoluteTime = + _CFCalendarComposeAbsoluteTimePtr.asFunction< + int Function(CFCalendarRef, ffi.Pointer, + ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterZeroSymbol => - _kCFNumberFormatterZeroSymbol.value; + int CFCalendarDecomposeAbsoluteTime( + CFCalendarRef calendar, + double at, + ffi.Pointer componentDesc, + ) { + return _CFCalendarDecomposeAbsoluteTime( + calendar, + at, + componentDesc, + ); + } - set kCFNumberFormatterZeroSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterZeroSymbol.value = value; + late final _CFCalendarDecomposeAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFCalendarRef, CFAbsoluteTime, + ffi.Pointer)>>('CFCalendarDecomposeAbsoluteTime'); + late final _CFCalendarDecomposeAbsoluteTime = + _CFCalendarDecomposeAbsoluteTimePtr.asFunction< + int Function(CFCalendarRef, double, ffi.Pointer)>(); - late final ffi.Pointer _kCFNumberFormatterNaNSymbol = - _lookup('kCFNumberFormatterNaNSymbol'); + int CFCalendarAddComponents( + CFCalendarRef calendar, + ffi.Pointer at, + int options, + ffi.Pointer componentDesc, + ) { + return _CFCalendarAddComponents( + calendar, + at, + options, + componentDesc, + ); + } - CFNumberFormatterKey get kCFNumberFormatterNaNSymbol => - _kCFNumberFormatterNaNSymbol.value; + late final _CFCalendarAddComponentsPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFCalendarRef, + ffi.Pointer, + CFOptionFlags, + ffi.Pointer)>>('CFCalendarAddComponents'); + late final _CFCalendarAddComponents = _CFCalendarAddComponentsPtr.asFunction< + int Function(CFCalendarRef, ffi.Pointer, int, + ffi.Pointer)>(); - set kCFNumberFormatterNaNSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterNaNSymbol.value = value; + int CFCalendarGetComponentDifference( + CFCalendarRef calendar, + double startingAT, + double resultAT, + int options, + ffi.Pointer componentDesc, + ) { + return _CFCalendarGetComponentDifference( + calendar, + startingAT, + resultAT, + options, + componentDesc, + ); + } - late final ffi.Pointer - _kCFNumberFormatterInfinitySymbol = - _lookup('kCFNumberFormatterInfinitySymbol'); + late final _CFCalendarGetComponentDifferencePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFCalendarRef, + CFAbsoluteTime, + CFAbsoluteTime, + CFOptionFlags, + ffi.Pointer)>>('CFCalendarGetComponentDifference'); + late final _CFCalendarGetComponentDifference = + _CFCalendarGetComponentDifferencePtr.asFunction< + int Function( + CFCalendarRef, double, double, int, ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterInfinitySymbol => - _kCFNumberFormatterInfinitySymbol.value; + CFStringRef CFDateFormatterCreateDateFormatFromTemplate( + CFAllocatorRef allocator, + CFStringRef tmplate, + int options, + CFLocaleRef locale, + ) { + return _CFDateFormatterCreateDateFormatFromTemplate( + allocator, + tmplate, + options, + locale, + ); + } - set kCFNumberFormatterInfinitySymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterInfinitySymbol.value = value; + late final _CFDateFormatterCreateDateFormatFromTemplatePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFOptionFlags, + CFLocaleRef)>>('CFDateFormatterCreateDateFormatFromTemplate'); + late final _CFDateFormatterCreateDateFormatFromTemplate = + _CFDateFormatterCreateDateFormatFromTemplatePtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef, int, CFLocaleRef)>(); - late final ffi.Pointer _kCFNumberFormatterMinusSign = - _lookup('kCFNumberFormatterMinusSign'); + int CFDateFormatterGetTypeID() { + return _CFDateFormatterGetTypeID(); + } - CFNumberFormatterKey get kCFNumberFormatterMinusSign => - _kCFNumberFormatterMinusSign.value; + late final _CFDateFormatterGetTypeIDPtr = + _lookup>( + 'CFDateFormatterGetTypeID'); + late final _CFDateFormatterGetTypeID = + _CFDateFormatterGetTypeIDPtr.asFunction(); - set kCFNumberFormatterMinusSign(CFNumberFormatterKey value) => - _kCFNumberFormatterMinusSign.value = value; + CFDateFormatterRef CFDateFormatterCreateISO8601Formatter( + CFAllocatorRef allocator, + int formatOptions, + ) { + return _CFDateFormatterCreateISO8601Formatter( + allocator, + formatOptions, + ); + } - late final ffi.Pointer _kCFNumberFormatterPlusSign = - _lookup('kCFNumberFormatterPlusSign'); + late final _CFDateFormatterCreateISO8601FormatterPtr = _lookup< + ffi.NativeFunction< + CFDateFormatterRef Function(CFAllocatorRef, + ffi.Int32)>>('CFDateFormatterCreateISO8601Formatter'); + late final _CFDateFormatterCreateISO8601Formatter = + _CFDateFormatterCreateISO8601FormatterPtr.asFunction< + CFDateFormatterRef Function(CFAllocatorRef, int)>(); - CFNumberFormatterKey get kCFNumberFormatterPlusSign => - _kCFNumberFormatterPlusSign.value; + CFDateFormatterRef CFDateFormatterCreate( + CFAllocatorRef allocator, + CFLocaleRef locale, + int dateStyle, + int timeStyle, + ) { + return _CFDateFormatterCreate( + allocator, + locale, + dateStyle, + timeStyle, + ); + } - set kCFNumberFormatterPlusSign(CFNumberFormatterKey value) => - _kCFNumberFormatterPlusSign.value = value; + late final _CFDateFormatterCreatePtr = _lookup< + ffi.NativeFunction< + CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, ffi.Int32, + ffi.Int32)>>('CFDateFormatterCreate'); + late final _CFDateFormatterCreate = _CFDateFormatterCreatePtr.asFunction< + CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, int, int)>(); - late final ffi.Pointer - _kCFNumberFormatterCurrencySymbol = - _lookup('kCFNumberFormatterCurrencySymbol'); + CFLocaleRef CFDateFormatterGetLocale( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetLocale( + formatter, + ); + } - CFNumberFormatterKey get kCFNumberFormatterCurrencySymbol => - _kCFNumberFormatterCurrencySymbol.value; + late final _CFDateFormatterGetLocalePtr = + _lookup>( + 'CFDateFormatterGetLocale'); + late final _CFDateFormatterGetLocale = _CFDateFormatterGetLocalePtr + .asFunction(); - set kCFNumberFormatterCurrencySymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencySymbol.value = value; + int CFDateFormatterGetDateStyle( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetDateStyle( + formatter, + ); + } - late final ffi.Pointer - _kCFNumberFormatterExponentSymbol = - _lookup('kCFNumberFormatterExponentSymbol'); + late final _CFDateFormatterGetDateStylePtr = + _lookup>( + 'CFDateFormatterGetDateStyle'); + late final _CFDateFormatterGetDateStyle = _CFDateFormatterGetDateStylePtr + .asFunction(); - CFNumberFormatterKey get kCFNumberFormatterExponentSymbol => - _kCFNumberFormatterExponentSymbol.value; + int CFDateFormatterGetTimeStyle( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetTimeStyle( + formatter, + ); + } - set kCFNumberFormatterExponentSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterExponentSymbol.value = value; + late final _CFDateFormatterGetTimeStylePtr = + _lookup>( + 'CFDateFormatterGetTimeStyle'); + late final _CFDateFormatterGetTimeStyle = _CFDateFormatterGetTimeStylePtr + .asFunction(); - late final ffi.Pointer - _kCFNumberFormatterMinIntegerDigits = - _lookup('kCFNumberFormatterMinIntegerDigits'); + CFStringRef CFDateFormatterGetFormat( + CFDateFormatterRef formatter, + ) { + return _CFDateFormatterGetFormat( + formatter, + ); + } - CFNumberFormatterKey get kCFNumberFormatterMinIntegerDigits => - _kCFNumberFormatterMinIntegerDigits.value; + late final _CFDateFormatterGetFormatPtr = + _lookup>( + 'CFDateFormatterGetFormat'); + late final _CFDateFormatterGetFormat = _CFDateFormatterGetFormatPtr + .asFunction(); - set kCFNumberFormatterMinIntegerDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMinIntegerDigits.value = value; + void CFDateFormatterSetFormat( + CFDateFormatterRef formatter, + CFStringRef formatString, + ) { + return _CFDateFormatterSetFormat( + formatter, + formatString, + ); + } - late final ffi.Pointer - _kCFNumberFormatterMaxIntegerDigits = - _lookup('kCFNumberFormatterMaxIntegerDigits'); + late final _CFDateFormatterSetFormatPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFDateFormatterRef, CFStringRef)>>('CFDateFormatterSetFormat'); + late final _CFDateFormatterSetFormat = _CFDateFormatterSetFormatPtr + .asFunction(); - CFNumberFormatterKey get kCFNumberFormatterMaxIntegerDigits => - _kCFNumberFormatterMaxIntegerDigits.value; + CFStringRef CFDateFormatterCreateStringWithDate( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + CFDateRef date, + ) { + return _CFDateFormatterCreateStringWithDate( + allocator, + formatter, + date, + ); + } - set kCFNumberFormatterMaxIntegerDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMaxIntegerDigits.value = value; + late final _CFDateFormatterCreateStringWithDatePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, + CFDateRef)>>('CFDateFormatterCreateStringWithDate'); + late final _CFDateFormatterCreateStringWithDate = + _CFDateFormatterCreateStringWithDatePtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFDateFormatterRef, CFDateRef)>(); - late final ffi.Pointer - _kCFNumberFormatterMinFractionDigits = - _lookup('kCFNumberFormatterMinFractionDigits'); + CFStringRef CFDateFormatterCreateStringWithAbsoluteTime( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + double at, + ) { + return _CFDateFormatterCreateStringWithAbsoluteTime( + allocator, + formatter, + at, + ); + } - CFNumberFormatterKey get kCFNumberFormatterMinFractionDigits => - _kCFNumberFormatterMinFractionDigits.value; + late final _CFDateFormatterCreateStringWithAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, + CFAbsoluteTime)>>('CFDateFormatterCreateStringWithAbsoluteTime'); + late final _CFDateFormatterCreateStringWithAbsoluteTime = + _CFDateFormatterCreateStringWithAbsoluteTimePtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, double)>(); - set kCFNumberFormatterMinFractionDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMinFractionDigits.value = value; + CFDateRef CFDateFormatterCreateDateFromString( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + ) { + return _CFDateFormatterCreateDateFromString( + allocator, + formatter, + string, + rangep, + ); + } - late final ffi.Pointer - _kCFNumberFormatterMaxFractionDigits = - _lookup('kCFNumberFormatterMaxFractionDigits'); + late final _CFDateFormatterCreateDateFromStringPtr = _lookup< + ffi.NativeFunction< + CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, + ffi.Pointer)>>('CFDateFormatterCreateDateFromString'); + late final _CFDateFormatterCreateDateFromString = + _CFDateFormatterCreateDateFromStringPtr.asFunction< + CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, + ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterMaxFractionDigits => - _kCFNumberFormatterMaxFractionDigits.value; + int CFDateFormatterGetAbsoluteTimeFromString( + CFDateFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + ffi.Pointer atp, + ) { + return _CFDateFormatterGetAbsoluteTimeFromString( + formatter, + string, + rangep, + atp, + ); + } - set kCFNumberFormatterMaxFractionDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMaxFractionDigits.value = value; + late final _CFDateFormatterGetAbsoluteTimeFromStringPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDateFormatterRef, CFStringRef, + ffi.Pointer, ffi.Pointer)>>( + 'CFDateFormatterGetAbsoluteTimeFromString'); + late final _CFDateFormatterGetAbsoluteTimeFromString = + _CFDateFormatterGetAbsoluteTimeFromStringPtr.asFunction< + int Function(CFDateFormatterRef, CFStringRef, ffi.Pointer, + ffi.Pointer)>(); - late final ffi.Pointer _kCFNumberFormatterGroupingSize = - _lookup('kCFNumberFormatterGroupingSize'); + void CFDateFormatterSetProperty( + CFDateFormatterRef formatter, + CFStringRef key, + CFTypeRef value, + ) { + return _CFDateFormatterSetProperty( + formatter, + key, + value, + ); + } - CFNumberFormatterKey get kCFNumberFormatterGroupingSize => - _kCFNumberFormatterGroupingSize.value; + late final _CFDateFormatterSetPropertyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFDateFormatterRef, CFStringRef, + CFTypeRef)>>('CFDateFormatterSetProperty'); + late final _CFDateFormatterSetProperty = _CFDateFormatterSetPropertyPtr + .asFunction(); - set kCFNumberFormatterGroupingSize(CFNumberFormatterKey value) => - _kCFNumberFormatterGroupingSize.value = value; + CFTypeRef CFDateFormatterCopyProperty( + CFDateFormatterRef formatter, + CFDateFormatterKey key, + ) { + return _CFDateFormatterCopyProperty( + formatter, + key, + ); + } - late final ffi.Pointer - _kCFNumberFormatterSecondaryGroupingSize = - _lookup('kCFNumberFormatterSecondaryGroupingSize'); + late final _CFDateFormatterCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFDateFormatterRef, + CFDateFormatterKey)>>('CFDateFormatterCopyProperty'); + late final _CFDateFormatterCopyProperty = _CFDateFormatterCopyPropertyPtr + .asFunction(); - CFNumberFormatterKey get kCFNumberFormatterSecondaryGroupingSize => - _kCFNumberFormatterSecondaryGroupingSize.value; + late final ffi.Pointer _kCFDateFormatterIsLenient = + _lookup('kCFDateFormatterIsLenient'); - set kCFNumberFormatterSecondaryGroupingSize(CFNumberFormatterKey value) => - _kCFNumberFormatterSecondaryGroupingSize.value = value; + CFDateFormatterKey get kCFDateFormatterIsLenient => + _kCFDateFormatterIsLenient.value; - late final ffi.Pointer _kCFNumberFormatterRoundingMode = - _lookup('kCFNumberFormatterRoundingMode'); + set kCFDateFormatterIsLenient(CFDateFormatterKey value) => + _kCFDateFormatterIsLenient.value = value; - CFNumberFormatterKey get kCFNumberFormatterRoundingMode => - _kCFNumberFormatterRoundingMode.value; + late final ffi.Pointer _kCFDateFormatterTimeZone = + _lookup('kCFDateFormatterTimeZone'); - set kCFNumberFormatterRoundingMode(CFNumberFormatterKey value) => - _kCFNumberFormatterRoundingMode.value = value; + CFDateFormatterKey get kCFDateFormatterTimeZone => + _kCFDateFormatterTimeZone.value; - late final ffi.Pointer - _kCFNumberFormatterRoundingIncrement = - _lookup('kCFNumberFormatterRoundingIncrement'); + set kCFDateFormatterTimeZone(CFDateFormatterKey value) => + _kCFDateFormatterTimeZone.value = value; - CFNumberFormatterKey get kCFNumberFormatterRoundingIncrement => - _kCFNumberFormatterRoundingIncrement.value; + late final ffi.Pointer _kCFDateFormatterCalendarName = + _lookup('kCFDateFormatterCalendarName'); - set kCFNumberFormatterRoundingIncrement(CFNumberFormatterKey value) => - _kCFNumberFormatterRoundingIncrement.value = value; + CFDateFormatterKey get kCFDateFormatterCalendarName => + _kCFDateFormatterCalendarName.value; - late final ffi.Pointer _kCFNumberFormatterFormatWidth = - _lookup('kCFNumberFormatterFormatWidth'); + set kCFDateFormatterCalendarName(CFDateFormatterKey value) => + _kCFDateFormatterCalendarName.value = value; - CFNumberFormatterKey get kCFNumberFormatterFormatWidth => - _kCFNumberFormatterFormatWidth.value; + late final ffi.Pointer _kCFDateFormatterDefaultFormat = + _lookup('kCFDateFormatterDefaultFormat'); - set kCFNumberFormatterFormatWidth(CFNumberFormatterKey value) => - _kCFNumberFormatterFormatWidth.value = value; + CFDateFormatterKey get kCFDateFormatterDefaultFormat => + _kCFDateFormatterDefaultFormat.value; - late final ffi.Pointer - _kCFNumberFormatterPaddingPosition = - _lookup('kCFNumberFormatterPaddingPosition'); + set kCFDateFormatterDefaultFormat(CFDateFormatterKey value) => + _kCFDateFormatterDefaultFormat.value = value; - CFNumberFormatterKey get kCFNumberFormatterPaddingPosition => - _kCFNumberFormatterPaddingPosition.value; + late final ffi.Pointer + _kCFDateFormatterTwoDigitStartDate = + _lookup('kCFDateFormatterTwoDigitStartDate'); - set kCFNumberFormatterPaddingPosition(CFNumberFormatterKey value) => - _kCFNumberFormatterPaddingPosition.value = value; + CFDateFormatterKey get kCFDateFormatterTwoDigitStartDate => + _kCFDateFormatterTwoDigitStartDate.value; - late final ffi.Pointer - _kCFNumberFormatterPaddingCharacter = - _lookup('kCFNumberFormatterPaddingCharacter'); + set kCFDateFormatterTwoDigitStartDate(CFDateFormatterKey value) => + _kCFDateFormatterTwoDigitStartDate.value = value; - CFNumberFormatterKey get kCFNumberFormatterPaddingCharacter => - _kCFNumberFormatterPaddingCharacter.value; + late final ffi.Pointer _kCFDateFormatterDefaultDate = + _lookup('kCFDateFormatterDefaultDate'); - set kCFNumberFormatterPaddingCharacter(CFNumberFormatterKey value) => - _kCFNumberFormatterPaddingCharacter.value = value; + CFDateFormatterKey get kCFDateFormatterDefaultDate => + _kCFDateFormatterDefaultDate.value; - late final ffi.Pointer - _kCFNumberFormatterDefaultFormat = - _lookup('kCFNumberFormatterDefaultFormat'); + set kCFDateFormatterDefaultDate(CFDateFormatterKey value) => + _kCFDateFormatterDefaultDate.value = value; - CFNumberFormatterKey get kCFNumberFormatterDefaultFormat => - _kCFNumberFormatterDefaultFormat.value; + late final ffi.Pointer _kCFDateFormatterCalendar = + _lookup('kCFDateFormatterCalendar'); - set kCFNumberFormatterDefaultFormat(CFNumberFormatterKey value) => - _kCFNumberFormatterDefaultFormat.value = value; + CFDateFormatterKey get kCFDateFormatterCalendar => + _kCFDateFormatterCalendar.value; - late final ffi.Pointer _kCFNumberFormatterMultiplier = - _lookup('kCFNumberFormatterMultiplier'); + set kCFDateFormatterCalendar(CFDateFormatterKey value) => + _kCFDateFormatterCalendar.value = value; - CFNumberFormatterKey get kCFNumberFormatterMultiplier => - _kCFNumberFormatterMultiplier.value; + late final ffi.Pointer _kCFDateFormatterEraSymbols = + _lookup('kCFDateFormatterEraSymbols'); - set kCFNumberFormatterMultiplier(CFNumberFormatterKey value) => - _kCFNumberFormatterMultiplier.value = value; + CFDateFormatterKey get kCFDateFormatterEraSymbols => + _kCFDateFormatterEraSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterPositivePrefix = - _lookup('kCFNumberFormatterPositivePrefix'); + set kCFDateFormatterEraSymbols(CFDateFormatterKey value) => + _kCFDateFormatterEraSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterPositivePrefix => - _kCFNumberFormatterPositivePrefix.value; + late final ffi.Pointer _kCFDateFormatterMonthSymbols = + _lookup('kCFDateFormatterMonthSymbols'); - set kCFNumberFormatterPositivePrefix(CFNumberFormatterKey value) => - _kCFNumberFormatterPositivePrefix.value = value; + CFDateFormatterKey get kCFDateFormatterMonthSymbols => + _kCFDateFormatterMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterPositiveSuffix = - _lookup('kCFNumberFormatterPositiveSuffix'); + set kCFDateFormatterMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterPositiveSuffix => - _kCFNumberFormatterPositiveSuffix.value; + late final ffi.Pointer + _kCFDateFormatterShortMonthSymbols = + _lookup('kCFDateFormatterShortMonthSymbols'); - set kCFNumberFormatterPositiveSuffix(CFNumberFormatterKey value) => - _kCFNumberFormatterPositiveSuffix.value = value; + CFDateFormatterKey get kCFDateFormatterShortMonthSymbols => + _kCFDateFormatterShortMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterNegativePrefix = - _lookup('kCFNumberFormatterNegativePrefix'); + set kCFDateFormatterShortMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterNegativePrefix => - _kCFNumberFormatterNegativePrefix.value; + late final ffi.Pointer _kCFDateFormatterWeekdaySymbols = + _lookup('kCFDateFormatterWeekdaySymbols'); - set kCFNumberFormatterNegativePrefix(CFNumberFormatterKey value) => - _kCFNumberFormatterNegativePrefix.value = value; + CFDateFormatterKey get kCFDateFormatterWeekdaySymbols => + _kCFDateFormatterWeekdaySymbols.value; - late final ffi.Pointer - _kCFNumberFormatterNegativeSuffix = - _lookup('kCFNumberFormatterNegativeSuffix'); + set kCFDateFormatterWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterWeekdaySymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterNegativeSuffix => - _kCFNumberFormatterNegativeSuffix.value; + late final ffi.Pointer + _kCFDateFormatterShortWeekdaySymbols = + _lookup('kCFDateFormatterShortWeekdaySymbols'); - set kCFNumberFormatterNegativeSuffix(CFNumberFormatterKey value) => - _kCFNumberFormatterNegativeSuffix.value = value; + CFDateFormatterKey get kCFDateFormatterShortWeekdaySymbols => + _kCFDateFormatterShortWeekdaySymbols.value; - late final ffi.Pointer - _kCFNumberFormatterPerMillSymbol = - _lookup('kCFNumberFormatterPerMillSymbol'); + set kCFDateFormatterShortWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortWeekdaySymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterPerMillSymbol => - _kCFNumberFormatterPerMillSymbol.value; + late final ffi.Pointer _kCFDateFormatterAMSymbol = + _lookup('kCFDateFormatterAMSymbol'); - set kCFNumberFormatterPerMillSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterPerMillSymbol.value = value; + CFDateFormatterKey get kCFDateFormatterAMSymbol => + _kCFDateFormatterAMSymbol.value; - late final ffi.Pointer - _kCFNumberFormatterInternationalCurrencySymbol = - _lookup( - 'kCFNumberFormatterInternationalCurrencySymbol'); + set kCFDateFormatterAMSymbol(CFDateFormatterKey value) => + _kCFDateFormatterAMSymbol.value = value; - CFNumberFormatterKey get kCFNumberFormatterInternationalCurrencySymbol => - _kCFNumberFormatterInternationalCurrencySymbol.value; + late final ffi.Pointer _kCFDateFormatterPMSymbol = + _lookup('kCFDateFormatterPMSymbol'); - set kCFNumberFormatterInternationalCurrencySymbol( - CFNumberFormatterKey value) => - _kCFNumberFormatterInternationalCurrencySymbol.value = value; + CFDateFormatterKey get kCFDateFormatterPMSymbol => + _kCFDateFormatterPMSymbol.value; - late final ffi.Pointer - _kCFNumberFormatterCurrencyGroupingSeparator = - _lookup( - 'kCFNumberFormatterCurrencyGroupingSeparator'); + set kCFDateFormatterPMSymbol(CFDateFormatterKey value) => + _kCFDateFormatterPMSymbol.value = value; - CFNumberFormatterKey get kCFNumberFormatterCurrencyGroupingSeparator => - _kCFNumberFormatterCurrencyGroupingSeparator.value; + late final ffi.Pointer _kCFDateFormatterLongEraSymbols = + _lookup('kCFDateFormatterLongEraSymbols'); - set kCFNumberFormatterCurrencyGroupingSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencyGroupingSeparator.value = value; + CFDateFormatterKey get kCFDateFormatterLongEraSymbols => + _kCFDateFormatterLongEraSymbols.value; - late final ffi.Pointer _kCFNumberFormatterIsLenient = - _lookup('kCFNumberFormatterIsLenient'); + set kCFDateFormatterLongEraSymbols(CFDateFormatterKey value) => + _kCFDateFormatterLongEraSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterIsLenient => - _kCFNumberFormatterIsLenient.value; + late final ffi.Pointer + _kCFDateFormatterVeryShortMonthSymbols = + _lookup('kCFDateFormatterVeryShortMonthSymbols'); - set kCFNumberFormatterIsLenient(CFNumberFormatterKey value) => - _kCFNumberFormatterIsLenient.value = value; + CFDateFormatterKey get kCFDateFormatterVeryShortMonthSymbols => + _kCFDateFormatterVeryShortMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterUseSignificantDigits = - _lookup('kCFNumberFormatterUseSignificantDigits'); + set kCFDateFormatterVeryShortMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterVeryShortMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterUseSignificantDigits => - _kCFNumberFormatterUseSignificantDigits.value; + late final ffi.Pointer + _kCFDateFormatterStandaloneMonthSymbols = + _lookup('kCFDateFormatterStandaloneMonthSymbols'); - set kCFNumberFormatterUseSignificantDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterUseSignificantDigits.value = value; + CFDateFormatterKey get kCFDateFormatterStandaloneMonthSymbols => + _kCFDateFormatterStandaloneMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterMinSignificantDigits = - _lookup('kCFNumberFormatterMinSignificantDigits'); + set kCFDateFormatterStandaloneMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterStandaloneMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterMinSignificantDigits => - _kCFNumberFormatterMinSignificantDigits.value; + late final ffi.Pointer + _kCFDateFormatterShortStandaloneMonthSymbols = + _lookup( + 'kCFDateFormatterShortStandaloneMonthSymbols'); - set kCFNumberFormatterMinSignificantDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMinSignificantDigits.value = value; + CFDateFormatterKey get kCFDateFormatterShortStandaloneMonthSymbols => + _kCFDateFormatterShortStandaloneMonthSymbols.value; - late final ffi.Pointer - _kCFNumberFormatterMaxSignificantDigits = - _lookup('kCFNumberFormatterMaxSignificantDigits'); + set kCFDateFormatterShortStandaloneMonthSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortStandaloneMonthSymbols.value = value; - CFNumberFormatterKey get kCFNumberFormatterMaxSignificantDigits => - _kCFNumberFormatterMaxSignificantDigits.value; + late final ffi.Pointer + _kCFDateFormatterVeryShortStandaloneMonthSymbols = + _lookup( + 'kCFDateFormatterVeryShortStandaloneMonthSymbols'); - set kCFNumberFormatterMaxSignificantDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMaxSignificantDigits.value = value; + CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneMonthSymbols => + _kCFDateFormatterVeryShortStandaloneMonthSymbols.value; - int CFNumberFormatterGetDecimalInfoForCurrencyCode( - CFStringRef currencyCode, - ffi.Pointer defaultFractionDigits, - ffi.Pointer roundingIncrement, - ) { - return _CFNumberFormatterGetDecimalInfoForCurrencyCode( - currencyCode, - defaultFractionDigits, - roundingIncrement, - ); - } + set kCFDateFormatterVeryShortStandaloneMonthSymbols( + CFDateFormatterKey value) => + _kCFDateFormatterVeryShortStandaloneMonthSymbols.value = value; - late final _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, ffi.Pointer, - ffi.Pointer)>>( - 'CFNumberFormatterGetDecimalInfoForCurrencyCode'); - late final _CFNumberFormatterGetDecimalInfoForCurrencyCode = - _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr.asFunction< - int Function( - CFStringRef, ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _kCFDateFormatterVeryShortWeekdaySymbols = + _lookup('kCFDateFormatterVeryShortWeekdaySymbols'); - late final ffi.Pointer _kCFPreferencesAnyApplication = - _lookup('kCFPreferencesAnyApplication'); + CFDateFormatterKey get kCFDateFormatterVeryShortWeekdaySymbols => + _kCFDateFormatterVeryShortWeekdaySymbols.value; - CFStringRef get kCFPreferencesAnyApplication => - _kCFPreferencesAnyApplication.value; + set kCFDateFormatterVeryShortWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterVeryShortWeekdaySymbols.value = value; - set kCFPreferencesAnyApplication(CFStringRef value) => - _kCFPreferencesAnyApplication.value = value; + late final ffi.Pointer + _kCFDateFormatterStandaloneWeekdaySymbols = + _lookup('kCFDateFormatterStandaloneWeekdaySymbols'); - late final ffi.Pointer _kCFPreferencesCurrentApplication = - _lookup('kCFPreferencesCurrentApplication'); + CFDateFormatterKey get kCFDateFormatterStandaloneWeekdaySymbols => + _kCFDateFormatterStandaloneWeekdaySymbols.value; - CFStringRef get kCFPreferencesCurrentApplication => - _kCFPreferencesCurrentApplication.value; + set kCFDateFormatterStandaloneWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterStandaloneWeekdaySymbols.value = value; - set kCFPreferencesCurrentApplication(CFStringRef value) => - _kCFPreferencesCurrentApplication.value = value; + late final ffi.Pointer + _kCFDateFormatterShortStandaloneWeekdaySymbols = + _lookup( + 'kCFDateFormatterShortStandaloneWeekdaySymbols'); - late final ffi.Pointer _kCFPreferencesAnyHost = - _lookup('kCFPreferencesAnyHost'); + CFDateFormatterKey get kCFDateFormatterShortStandaloneWeekdaySymbols => + _kCFDateFormatterShortStandaloneWeekdaySymbols.value; - CFStringRef get kCFPreferencesAnyHost => _kCFPreferencesAnyHost.value; + set kCFDateFormatterShortStandaloneWeekdaySymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortStandaloneWeekdaySymbols.value = value; - set kCFPreferencesAnyHost(CFStringRef value) => - _kCFPreferencesAnyHost.value = value; + late final ffi.Pointer + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols = + _lookup( + 'kCFDateFormatterVeryShortStandaloneWeekdaySymbols'); - late final ffi.Pointer _kCFPreferencesCurrentHost = - _lookup('kCFPreferencesCurrentHost'); + CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneWeekdaySymbols => + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value; - CFStringRef get kCFPreferencesCurrentHost => _kCFPreferencesCurrentHost.value; + set kCFDateFormatterVeryShortStandaloneWeekdaySymbols( + CFDateFormatterKey value) => + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value = value; - set kCFPreferencesCurrentHost(CFStringRef value) => - _kCFPreferencesCurrentHost.value = value; + late final ffi.Pointer _kCFDateFormatterQuarterSymbols = + _lookup('kCFDateFormatterQuarterSymbols'); - late final ffi.Pointer _kCFPreferencesAnyUser = - _lookup('kCFPreferencesAnyUser'); + CFDateFormatterKey get kCFDateFormatterQuarterSymbols => + _kCFDateFormatterQuarterSymbols.value; - CFStringRef get kCFPreferencesAnyUser => _kCFPreferencesAnyUser.value; + set kCFDateFormatterQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterQuarterSymbols.value = value; - set kCFPreferencesAnyUser(CFStringRef value) => - _kCFPreferencesAnyUser.value = value; + late final ffi.Pointer + _kCFDateFormatterShortQuarterSymbols = + _lookup('kCFDateFormatterShortQuarterSymbols'); - late final ffi.Pointer _kCFPreferencesCurrentUser = - _lookup('kCFPreferencesCurrentUser'); + CFDateFormatterKey get kCFDateFormatterShortQuarterSymbols => + _kCFDateFormatterShortQuarterSymbols.value; - CFStringRef get kCFPreferencesCurrentUser => _kCFPreferencesCurrentUser.value; + set kCFDateFormatterShortQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortQuarterSymbols.value = value; - set kCFPreferencesCurrentUser(CFStringRef value) => - _kCFPreferencesCurrentUser.value = value; + late final ffi.Pointer + _kCFDateFormatterStandaloneQuarterSymbols = + _lookup('kCFDateFormatterStandaloneQuarterSymbols'); - CFPropertyListRef CFPreferencesCopyAppValue( - CFStringRef key, - CFStringRef applicationID, - ) { - return _CFPreferencesCopyAppValue( - key, - applicationID, - ); + CFDateFormatterKey get kCFDateFormatterStandaloneQuarterSymbols => + _kCFDateFormatterStandaloneQuarterSymbols.value; + + set kCFDateFormatterStandaloneQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterStandaloneQuarterSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterShortStandaloneQuarterSymbols = + _lookup( + 'kCFDateFormatterShortStandaloneQuarterSymbols'); + + CFDateFormatterKey get kCFDateFormatterShortStandaloneQuarterSymbols => + _kCFDateFormatterShortStandaloneQuarterSymbols.value; + + set kCFDateFormatterShortStandaloneQuarterSymbols(CFDateFormatterKey value) => + _kCFDateFormatterShortStandaloneQuarterSymbols.value = value; + + late final ffi.Pointer + _kCFDateFormatterGregorianStartDate = + _lookup('kCFDateFormatterGregorianStartDate'); + + CFDateFormatterKey get kCFDateFormatterGregorianStartDate => + _kCFDateFormatterGregorianStartDate.value; + + set kCFDateFormatterGregorianStartDate(CFDateFormatterKey value) => + _kCFDateFormatterGregorianStartDate.value = value; + + late final ffi.Pointer + _kCFDateFormatterDoesRelativeDateFormattingKey = + _lookup( + 'kCFDateFormatterDoesRelativeDateFormattingKey'); + + CFDateFormatterKey get kCFDateFormatterDoesRelativeDateFormattingKey => + _kCFDateFormatterDoesRelativeDateFormattingKey.value; + + set kCFDateFormatterDoesRelativeDateFormattingKey(CFDateFormatterKey value) => + _kCFDateFormatterDoesRelativeDateFormattingKey.value = value; + + late final ffi.Pointer _kCFBooleanTrue = + _lookup('kCFBooleanTrue'); + + CFBooleanRef get kCFBooleanTrue => _kCFBooleanTrue.value; + + set kCFBooleanTrue(CFBooleanRef value) => _kCFBooleanTrue.value = value; + + late final ffi.Pointer _kCFBooleanFalse = + _lookup('kCFBooleanFalse'); + + CFBooleanRef get kCFBooleanFalse => _kCFBooleanFalse.value; + + set kCFBooleanFalse(CFBooleanRef value) => _kCFBooleanFalse.value = value; + + int CFBooleanGetTypeID() { + return _CFBooleanGetTypeID(); } - late final _CFPreferencesCopyAppValuePtr = _lookup< - ffi.NativeFunction< - CFPropertyListRef Function( - CFStringRef, CFStringRef)>>('CFPreferencesCopyAppValue'); - late final _CFPreferencesCopyAppValue = _CFPreferencesCopyAppValuePtr - .asFunction(); + late final _CFBooleanGetTypeIDPtr = + _lookup>('CFBooleanGetTypeID'); + late final _CFBooleanGetTypeID = + _CFBooleanGetTypeIDPtr.asFunction(); - int CFPreferencesGetAppBooleanValue( - CFStringRef key, - CFStringRef applicationID, - ffi.Pointer keyExistsAndHasValidFormat, + int CFBooleanGetValue( + CFBooleanRef boolean, ) { - return _CFPreferencesGetAppBooleanValue( - key, - applicationID, - keyExistsAndHasValidFormat, + return _CFBooleanGetValue( + boolean, ); } - late final _CFPreferencesGetAppBooleanValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, CFStringRef, - ffi.Pointer)>>('CFPreferencesGetAppBooleanValue'); - late final _CFPreferencesGetAppBooleanValue = - _CFPreferencesGetAppBooleanValuePtr.asFunction< - int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); + late final _CFBooleanGetValuePtr = + _lookup>( + 'CFBooleanGetValue'); + late final _CFBooleanGetValue = + _CFBooleanGetValuePtr.asFunction(); - int CFPreferencesGetAppIntegerValue( - CFStringRef key, - CFStringRef applicationID, - ffi.Pointer keyExistsAndHasValidFormat, - ) { - return _CFPreferencesGetAppIntegerValue( - key, - applicationID, - keyExistsAndHasValidFormat, - ); + late final ffi.Pointer _kCFNumberPositiveInfinity = + _lookup('kCFNumberPositiveInfinity'); + + CFNumberRef get kCFNumberPositiveInfinity => _kCFNumberPositiveInfinity.value; + + set kCFNumberPositiveInfinity(CFNumberRef value) => + _kCFNumberPositiveInfinity.value = value; + + late final ffi.Pointer _kCFNumberNegativeInfinity = + _lookup('kCFNumberNegativeInfinity'); + + CFNumberRef get kCFNumberNegativeInfinity => _kCFNumberNegativeInfinity.value; + + set kCFNumberNegativeInfinity(CFNumberRef value) => + _kCFNumberNegativeInfinity.value = value; + + late final ffi.Pointer _kCFNumberNaN = + _lookup('kCFNumberNaN'); + + CFNumberRef get kCFNumberNaN => _kCFNumberNaN.value; + + set kCFNumberNaN(CFNumberRef value) => _kCFNumberNaN.value = value; + + int CFNumberGetTypeID() { + return _CFNumberGetTypeID(); } - late final _CFPreferencesGetAppIntegerValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFStringRef, CFStringRef, - ffi.Pointer)>>('CFPreferencesGetAppIntegerValue'); - late final _CFPreferencesGetAppIntegerValue = - _CFPreferencesGetAppIntegerValuePtr.asFunction< - int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); + late final _CFNumberGetTypeIDPtr = + _lookup>('CFNumberGetTypeID'); + late final _CFNumberGetTypeID = + _CFNumberGetTypeIDPtr.asFunction(); - void CFPreferencesSetAppValue( - CFStringRef key, - CFPropertyListRef value, - CFStringRef applicationID, + CFNumberRef CFNumberCreate( + CFAllocatorRef allocator, + int theType, + ffi.Pointer valuePtr, ) { - return _CFPreferencesSetAppValue( - key, - value, - applicationID, + return _CFNumberCreate( + allocator, + theType, + valuePtr, ); } - late final _CFPreferencesSetAppValuePtr = _lookup< + late final _CFNumberCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFStringRef, CFPropertyListRef, - CFStringRef)>>('CFPreferencesSetAppValue'); - late final _CFPreferencesSetAppValue = _CFPreferencesSetAppValuePtr - .asFunction(); + CFNumberRef Function(CFAllocatorRef, ffi.Int32, + ffi.Pointer)>>('CFNumberCreate'); + late final _CFNumberCreate = _CFNumberCreatePtr.asFunction< + CFNumberRef Function(CFAllocatorRef, int, ffi.Pointer)>(); - void CFPreferencesAddSuitePreferencesToApp( - CFStringRef applicationID, - CFStringRef suiteID, + int CFNumberGetType( + CFNumberRef number, ) { - return _CFPreferencesAddSuitePreferencesToApp( - applicationID, - suiteID, + return _CFNumberGetType( + number, ); } - late final _CFPreferencesAddSuitePreferencesToAppPtr = - _lookup>( - 'CFPreferencesAddSuitePreferencesToApp'); - late final _CFPreferencesAddSuitePreferencesToApp = - _CFPreferencesAddSuitePreferencesToAppPtr.asFunction< - void Function(CFStringRef, CFStringRef)>(); + late final _CFNumberGetTypePtr = + _lookup>( + 'CFNumberGetType'); + late final _CFNumberGetType = + _CFNumberGetTypePtr.asFunction(); - void CFPreferencesRemoveSuitePreferencesFromApp( - CFStringRef applicationID, - CFStringRef suiteID, + int CFNumberGetByteSize( + CFNumberRef number, ) { - return _CFPreferencesRemoveSuitePreferencesFromApp( - applicationID, - suiteID, + return _CFNumberGetByteSize( + number, ); } - late final _CFPreferencesRemoveSuitePreferencesFromAppPtr = - _lookup>( - 'CFPreferencesRemoveSuitePreferencesFromApp'); - late final _CFPreferencesRemoveSuitePreferencesFromApp = - _CFPreferencesRemoveSuitePreferencesFromAppPtr.asFunction< - void Function(CFStringRef, CFStringRef)>(); + late final _CFNumberGetByteSizePtr = + _lookup>( + 'CFNumberGetByteSize'); + late final _CFNumberGetByteSize = + _CFNumberGetByteSizePtr.asFunction(); - int CFPreferencesAppSynchronize( - CFStringRef applicationID, + int CFNumberIsFloatType( + CFNumberRef number, ) { - return _CFPreferencesAppSynchronize( - applicationID, + return _CFNumberIsFloatType( + number, ); } - late final _CFPreferencesAppSynchronizePtr = - _lookup>( - 'CFPreferencesAppSynchronize'); - late final _CFPreferencesAppSynchronize = - _CFPreferencesAppSynchronizePtr.asFunction(); + late final _CFNumberIsFloatTypePtr = + _lookup>( + 'CFNumberIsFloatType'); + late final _CFNumberIsFloatType = + _CFNumberIsFloatTypePtr.asFunction(); - CFPropertyListRef CFPreferencesCopyValue( - CFStringRef key, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + int CFNumberGetValue( + CFNumberRef number, + int theType, + ffi.Pointer valuePtr, ) { - return _CFPreferencesCopyValue( - key, - applicationID, - userName, - hostName, + return _CFNumberGetValue( + number, + theType, + valuePtr, ); } - late final _CFPreferencesCopyValuePtr = _lookup< + late final _CFNumberGetValuePtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function(CFStringRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFPreferencesCopyValue'); - late final _CFPreferencesCopyValue = _CFPreferencesCopyValuePtr.asFunction< - CFPropertyListRef Function( - CFStringRef, CFStringRef, CFStringRef, CFStringRef)>(); + Boolean Function(CFNumberRef, ffi.Int32, + ffi.Pointer)>>('CFNumberGetValue'); + late final _CFNumberGetValue = _CFNumberGetValuePtr.asFunction< + int Function(CFNumberRef, int, ffi.Pointer)>(); - CFDictionaryRef CFPreferencesCopyMultiple( - CFArrayRef keysToFetch, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + int CFNumberCompare( + CFNumberRef number, + CFNumberRef otherNumber, + ffi.Pointer context, ) { - return _CFPreferencesCopyMultiple( - keysToFetch, - applicationID, - userName, - hostName, + return _CFNumberCompare( + number, + otherNumber, + context, ); } - late final _CFPreferencesCopyMultiplePtr = _lookup< + late final _CFNumberComparePtr = _lookup< ffi.NativeFunction< - CFDictionaryRef Function(CFArrayRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFPreferencesCopyMultiple'); - late final _CFPreferencesCopyMultiple = - _CFPreferencesCopyMultiplePtr.asFunction< - CFDictionaryRef Function( - CFArrayRef, CFStringRef, CFStringRef, CFStringRef)>(); - - void CFPreferencesSetValue( - CFStringRef key, - CFPropertyListRef value, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, - ) { - return _CFPreferencesSetValue( - key, - value, - applicationID, - userName, - hostName, - ); + ffi.Int32 Function(CFNumberRef, CFNumberRef, + ffi.Pointer)>>('CFNumberCompare'); + late final _CFNumberCompare = _CFNumberComparePtr.asFunction< + int Function(CFNumberRef, CFNumberRef, ffi.Pointer)>(); + + int CFNumberFormatterGetTypeID() { + return _CFNumberFormatterGetTypeID(); } - late final _CFPreferencesSetValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFStringRef, CFPropertyListRef, CFStringRef, - CFStringRef, CFStringRef)>>('CFPreferencesSetValue'); - late final _CFPreferencesSetValue = _CFPreferencesSetValuePtr.asFunction< - void Function(CFStringRef, CFPropertyListRef, CFStringRef, CFStringRef, - CFStringRef)>(); + late final _CFNumberFormatterGetTypeIDPtr = + _lookup>( + 'CFNumberFormatterGetTypeID'); + late final _CFNumberFormatterGetTypeID = + _CFNumberFormatterGetTypeIDPtr.asFunction(); - void CFPreferencesSetMultiple( - CFDictionaryRef keysToSet, - CFArrayRef keysToRemove, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + CFNumberFormatterRef CFNumberFormatterCreate( + CFAllocatorRef allocator, + CFLocaleRef locale, + int style, ) { - return _CFPreferencesSetMultiple( - keysToSet, - keysToRemove, - applicationID, - userName, - hostName, + return _CFNumberFormatterCreate( + allocator, + locale, + style, ); } - late final _CFPreferencesSetMultiplePtr = _lookup< + late final _CFNumberFormatterCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFDictionaryRef, CFArrayRef, CFStringRef, - CFStringRef, CFStringRef)>>('CFPreferencesSetMultiple'); - late final _CFPreferencesSetMultiple = - _CFPreferencesSetMultiplePtr.asFunction< - void Function(CFDictionaryRef, CFArrayRef, CFStringRef, CFStringRef, - CFStringRef)>(); + CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, + ffi.Int32)>>('CFNumberFormatterCreate'); + late final _CFNumberFormatterCreate = _CFNumberFormatterCreatePtr.asFunction< + CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, int)>(); - int CFPreferencesSynchronize( - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + CFLocaleRef CFNumberFormatterGetLocale( + CFNumberFormatterRef formatter, ) { - return _CFPreferencesSynchronize( - applicationID, - userName, - hostName, + return _CFNumberFormatterGetLocale( + formatter, ); } - late final _CFPreferencesSynchronizePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, CFStringRef, - CFStringRef)>>('CFPreferencesSynchronize'); - late final _CFPreferencesSynchronize = _CFPreferencesSynchronizePtr - .asFunction(); + late final _CFNumberFormatterGetLocalePtr = + _lookup>( + 'CFNumberFormatterGetLocale'); + late final _CFNumberFormatterGetLocale = _CFNumberFormatterGetLocalePtr + .asFunction(); - CFArrayRef CFPreferencesCopyApplicationList( - CFStringRef userName, - CFStringRef hostName, + int CFNumberFormatterGetStyle( + CFNumberFormatterRef formatter, ) { - return _CFPreferencesCopyApplicationList( - userName, - hostName, + return _CFNumberFormatterGetStyle( + formatter, ); } - late final _CFPreferencesCopyApplicationListPtr = _lookup< - ffi.NativeFunction>( - 'CFPreferencesCopyApplicationList'); - late final _CFPreferencesCopyApplicationList = - _CFPreferencesCopyApplicationListPtr.asFunction< - CFArrayRef Function(CFStringRef, CFStringRef)>(); + late final _CFNumberFormatterGetStylePtr = + _lookup>( + 'CFNumberFormatterGetStyle'); + late final _CFNumberFormatterGetStyle = _CFNumberFormatterGetStylePtr + .asFunction(); - CFArrayRef CFPreferencesCopyKeyList( - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + CFStringRef CFNumberFormatterGetFormat( + CFNumberFormatterRef formatter, ) { - return _CFPreferencesCopyKeyList( - applicationID, - userName, - hostName, + return _CFNumberFormatterGetFormat( + formatter, ); } - late final _CFPreferencesCopyKeyListPtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFStringRef, CFStringRef, - CFStringRef)>>('CFPreferencesCopyKeyList'); - late final _CFPreferencesCopyKeyList = _CFPreferencesCopyKeyListPtr - .asFunction(); + late final _CFNumberFormatterGetFormatPtr = + _lookup>( + 'CFNumberFormatterGetFormat'); + late final _CFNumberFormatterGetFormat = _CFNumberFormatterGetFormatPtr + .asFunction(); - int CFPreferencesAppValueIsForced( - CFStringRef key, - CFStringRef applicationID, + void CFNumberFormatterSetFormat( + CFNumberFormatterRef formatter, + CFStringRef formatString, ) { - return _CFPreferencesAppValueIsForced( - key, - applicationID, + return _CFNumberFormatterSetFormat( + formatter, + formatString, ); } - late final _CFPreferencesAppValueIsForcedPtr = - _lookup>( - 'CFPreferencesAppValueIsForced'); - late final _CFPreferencesAppValueIsForced = _CFPreferencesAppValueIsForcedPtr - .asFunction(); - - int CFURLGetTypeID() { - return _CFURLGetTypeID(); - } - - late final _CFURLGetTypeIDPtr = - _lookup>('CFURLGetTypeID'); - late final _CFURLGetTypeID = _CFURLGetTypeIDPtr.asFunction(); + late final _CFNumberFormatterSetFormatPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFNumberFormatterRef, + CFStringRef)>>('CFNumberFormatterSetFormat'); + late final _CFNumberFormatterSetFormat = _CFNumberFormatterSetFormatPtr + .asFunction(); - CFURLRef CFURLCreateWithBytes( + CFStringRef CFNumberFormatterCreateStringWithNumber( CFAllocatorRef allocator, - ffi.Pointer URLBytes, - int length, - int encoding, - CFURLRef baseURL, + CFNumberFormatterRef formatter, + CFNumberRef number, ) { - return _CFURLCreateWithBytes( + return _CFNumberFormatterCreateStringWithNumber( allocator, - URLBytes, - length, - encoding, - baseURL, + formatter, + number, ); } - late final _CFURLCreateWithBytesPtr = _lookup< + late final _CFNumberFormatterCreateStringWithNumberPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFStringEncoding, CFURLRef)>>('CFURLCreateWithBytes'); - late final _CFURLCreateWithBytes = _CFURLCreateWithBytesPtr.asFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); + CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, + CFNumberRef)>>('CFNumberFormatterCreateStringWithNumber'); + late final _CFNumberFormatterCreateStringWithNumber = + _CFNumberFormatterCreateStringWithNumberPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFNumberFormatterRef, CFNumberRef)>(); - CFDataRef CFURLCreateData( + CFStringRef CFNumberFormatterCreateStringWithValue( CFAllocatorRef allocator, - CFURLRef url, - int encoding, - int escapeWhitespace, + CFNumberFormatterRef formatter, + int numberType, + ffi.Pointer valuePtr, ) { - return _CFURLCreateData( + return _CFNumberFormatterCreateStringWithValue( allocator, - url, - encoding, - escapeWhitespace, + formatter, + numberType, + valuePtr, ); } - late final _CFURLCreateDataPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, CFStringEncoding, - Boolean)>>('CFURLCreateData'); - late final _CFURLCreateData = _CFURLCreateDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, int, int)>(); + late final _CFNumberFormatterCreateStringWithValuePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, + ffi.Int32, ffi.Pointer)>>( + 'CFNumberFormatterCreateStringWithValue'); + late final _CFNumberFormatterCreateStringWithValue = + _CFNumberFormatterCreateStringWithValuePtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, int, + ffi.Pointer)>(); - CFURLRef CFURLCreateWithString( + CFNumberRef CFNumberFormatterCreateNumberFromString( CFAllocatorRef allocator, - CFStringRef URLString, - CFURLRef baseURL, + CFNumberFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + int options, ) { - return _CFURLCreateWithString( + return _CFNumberFormatterCreateNumberFromString( allocator, - URLString, - baseURL, + formatter, + string, + rangep, + options, ); } - late final _CFURLCreateWithStringPtr = _lookup< + late final _CFNumberFormatterCreateNumberFromStringPtr = _lookup< ffi.NativeFunction< - CFURLRef Function( - CFAllocatorRef, CFStringRef, CFURLRef)>>('CFURLCreateWithString'); - late final _CFURLCreateWithString = _CFURLCreateWithStringPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, CFURLRef)>(); + CFNumberRef Function( + CFAllocatorRef, + CFNumberFormatterRef, + CFStringRef, + ffi.Pointer, + CFOptionFlags)>>('CFNumberFormatterCreateNumberFromString'); + late final _CFNumberFormatterCreateNumberFromString = + _CFNumberFormatterCreateNumberFromStringPtr.asFunction< + CFNumberRef Function(CFAllocatorRef, CFNumberFormatterRef, + CFStringRef, ffi.Pointer, int)>(); - CFURLRef CFURLCreateAbsoluteURLWithBytes( - CFAllocatorRef alloc, - ffi.Pointer relativeURLBytes, - int length, - int encoding, - CFURLRef baseURL, - int useCompatibilityMode, + int CFNumberFormatterGetValueFromString( + CFNumberFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + int numberType, + ffi.Pointer valuePtr, ) { - return _CFURLCreateAbsoluteURLWithBytes( - alloc, - relativeURLBytes, - length, - encoding, - baseURL, - useCompatibilityMode, + return _CFNumberFormatterGetValueFromString( + formatter, + string, + rangep, + numberType, + valuePtr, ); } - late final _CFURLCreateAbsoluteURLWithBytesPtr = _lookup< + late final _CFNumberFormatterGetValueFromStringPtr = _lookup< ffi.NativeFunction< - CFURLRef Function( - CFAllocatorRef, - ffi.Pointer, - CFIndex, - CFStringEncoding, - CFURLRef, - Boolean)>>('CFURLCreateAbsoluteURLWithBytes'); - late final _CFURLCreateAbsoluteURLWithBytes = - _CFURLCreateAbsoluteURLWithBytesPtr.asFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer, int, int, CFURLRef, int)>(); + Boolean Function( + CFNumberFormatterRef, + CFStringRef, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('CFNumberFormatterGetValueFromString'); + late final _CFNumberFormatterGetValueFromString = + _CFNumberFormatterGetValueFromStringPtr.asFunction< + int Function(CFNumberFormatterRef, CFStringRef, ffi.Pointer, + int, ffi.Pointer)>(); - CFURLRef CFURLCreateWithFileSystemPath( - CFAllocatorRef allocator, - CFStringRef filePath, - int pathStyle, - int isDirectory, + void CFNumberFormatterSetProperty( + CFNumberFormatterRef formatter, + CFNumberFormatterKey key, + CFTypeRef value, ) { - return _CFURLCreateWithFileSystemPath( - allocator, - filePath, - pathStyle, - isDirectory, + return _CFNumberFormatterSetProperty( + formatter, + key, + value, ); } - late final _CFURLCreateWithFileSystemPathPtr = _lookup< + late final _CFNumberFormatterSetPropertyPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, - Boolean)>>('CFURLCreateWithFileSystemPath'); - late final _CFURLCreateWithFileSystemPath = _CFURLCreateWithFileSystemPathPtr - .asFunction(); + ffi.Void Function(CFNumberFormatterRef, CFNumberFormatterKey, + CFTypeRef)>>('CFNumberFormatterSetProperty'); + late final _CFNumberFormatterSetProperty = + _CFNumberFormatterSetPropertyPtr.asFunction< + void Function( + CFNumberFormatterRef, CFNumberFormatterKey, CFTypeRef)>(); - CFURLRef CFURLCreateFromFileSystemRepresentation( - CFAllocatorRef allocator, - ffi.Pointer buffer, - int bufLen, - int isDirectory, + CFTypeRef CFNumberFormatterCopyProperty( + CFNumberFormatterRef formatter, + CFNumberFormatterKey key, ) { - return _CFURLCreateFromFileSystemRepresentation( - allocator, - buffer, - bufLen, - isDirectory, + return _CFNumberFormatterCopyProperty( + formatter, + key, ); } - late final _CFURLCreateFromFileSystemRepresentationPtr = _lookup< + late final _CFNumberFormatterCopyPropertyPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - Boolean)>>('CFURLCreateFromFileSystemRepresentation'); - late final _CFURLCreateFromFileSystemRepresentation = - _CFURLCreateFromFileSystemRepresentationPtr.asFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, int, int)>(); + CFTypeRef Function(CFNumberFormatterRef, + CFNumberFormatterKey)>>('CFNumberFormatterCopyProperty'); + late final _CFNumberFormatterCopyProperty = + _CFNumberFormatterCopyPropertyPtr.asFunction< + CFTypeRef Function(CFNumberFormatterRef, CFNumberFormatterKey)>(); - CFURLRef CFURLCreateWithFileSystemPathRelativeToBase( - CFAllocatorRef allocator, - CFStringRef filePath, - int pathStyle, - int isDirectory, - CFURLRef baseURL, - ) { - return _CFURLCreateWithFileSystemPathRelativeToBase( - allocator, - filePath, - pathStyle, - isDirectory, - baseURL, - ); - } + late final ffi.Pointer _kCFNumberFormatterCurrencyCode = + _lookup('kCFNumberFormatterCurrencyCode'); - late final _CFURLCreateWithFileSystemPathRelativeToBasePtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, Boolean, - CFURLRef)>>('CFURLCreateWithFileSystemPathRelativeToBase'); - late final _CFURLCreateWithFileSystemPathRelativeToBase = - _CFURLCreateWithFileSystemPathRelativeToBasePtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, int, int, CFURLRef)>(); + CFNumberFormatterKey get kCFNumberFormatterCurrencyCode => + _kCFNumberFormatterCurrencyCode.value; - CFURLRef CFURLCreateFromFileSystemRepresentationRelativeToBase( - CFAllocatorRef allocator, - ffi.Pointer buffer, - int bufLen, - int isDirectory, - CFURLRef baseURL, - ) { - return _CFURLCreateFromFileSystemRepresentationRelativeToBase( - allocator, - buffer, - bufLen, - isDirectory, - baseURL, - ); - } + set kCFNumberFormatterCurrencyCode(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencyCode.value = value; - late final _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr = - _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - Boolean, CFURLRef)>>( - 'CFURLCreateFromFileSystemRepresentationRelativeToBase'); - late final _CFURLCreateFromFileSystemRepresentationRelativeToBase = - _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr.asFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); + late final ffi.Pointer + _kCFNumberFormatterDecimalSeparator = + _lookup('kCFNumberFormatterDecimalSeparator'); - int CFURLGetFileSystemRepresentation( - CFURLRef url, - int resolveAgainstBase, - ffi.Pointer buffer, - int maxBufLen, - ) { - return _CFURLGetFileSystemRepresentation( - url, - resolveAgainstBase, - buffer, - maxBufLen, - ); - } + CFNumberFormatterKey get kCFNumberFormatterDecimalSeparator => + _kCFNumberFormatterDecimalSeparator.value; - late final _CFURLGetFileSystemRepresentationPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, Boolean, ffi.Pointer, - CFIndex)>>('CFURLGetFileSystemRepresentation'); - late final _CFURLGetFileSystemRepresentation = - _CFURLGetFileSystemRepresentationPtr.asFunction< - int Function(CFURLRef, int, ffi.Pointer, int)>(); + set kCFNumberFormatterDecimalSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterDecimalSeparator.value = value; - CFURLRef CFURLCopyAbsoluteURL( - CFURLRef relativeURL, - ) { - return _CFURLCopyAbsoluteURL( - relativeURL, - ); - } + late final ffi.Pointer + _kCFNumberFormatterCurrencyDecimalSeparator = + _lookup( + 'kCFNumberFormatterCurrencyDecimalSeparator'); - late final _CFURLCopyAbsoluteURLPtr = - _lookup>( - 'CFURLCopyAbsoluteURL'); - late final _CFURLCopyAbsoluteURL = - _CFURLCopyAbsoluteURLPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterCurrencyDecimalSeparator => + _kCFNumberFormatterCurrencyDecimalSeparator.value; - CFStringRef CFURLGetString( - CFURLRef anURL, - ) { - return _CFURLGetString( - anURL, - ); - } + set kCFNumberFormatterCurrencyDecimalSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencyDecimalSeparator.value = value; - late final _CFURLGetStringPtr = - _lookup>( - 'CFURLGetString'); - late final _CFURLGetString = - _CFURLGetStringPtr.asFunction(); + late final ffi.Pointer + _kCFNumberFormatterAlwaysShowDecimalSeparator = + _lookup( + 'kCFNumberFormatterAlwaysShowDecimalSeparator'); - CFURLRef CFURLGetBaseURL( - CFURLRef anURL, - ) { - return _CFURLGetBaseURL( - anURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterAlwaysShowDecimalSeparator => + _kCFNumberFormatterAlwaysShowDecimalSeparator.value; - late final _CFURLGetBaseURLPtr = - _lookup>( - 'CFURLGetBaseURL'); - late final _CFURLGetBaseURL = - _CFURLGetBaseURLPtr.asFunction(); + set kCFNumberFormatterAlwaysShowDecimalSeparator( + CFNumberFormatterKey value) => + _kCFNumberFormatterAlwaysShowDecimalSeparator.value = value; - int CFURLCanBeDecomposed( - CFURLRef anURL, - ) { - return _CFURLCanBeDecomposed( - anURL, - ); - } + late final ffi.Pointer + _kCFNumberFormatterGroupingSeparator = + _lookup('kCFNumberFormatterGroupingSeparator'); - late final _CFURLCanBeDecomposedPtr = - _lookup>( - 'CFURLCanBeDecomposed'); - late final _CFURLCanBeDecomposed = - _CFURLCanBeDecomposedPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterGroupingSeparator => + _kCFNumberFormatterGroupingSeparator.value; - CFStringRef CFURLCopyScheme( - CFURLRef anURL, - ) { - return _CFURLCopyScheme( - anURL, - ); - } + set kCFNumberFormatterGroupingSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterGroupingSeparator.value = value; - late final _CFURLCopySchemePtr = - _lookup>( - 'CFURLCopyScheme'); - late final _CFURLCopyScheme = - _CFURLCopySchemePtr.asFunction(); + late final ffi.Pointer + _kCFNumberFormatterUseGroupingSeparator = + _lookup('kCFNumberFormatterUseGroupingSeparator'); - CFStringRef CFURLCopyNetLocation( - CFURLRef anURL, - ) { - return _CFURLCopyNetLocation( - anURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterUseGroupingSeparator => + _kCFNumberFormatterUseGroupingSeparator.value; - late final _CFURLCopyNetLocationPtr = - _lookup>( - 'CFURLCopyNetLocation'); - late final _CFURLCopyNetLocation = - _CFURLCopyNetLocationPtr.asFunction(); + set kCFNumberFormatterUseGroupingSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterUseGroupingSeparator.value = value; - CFStringRef CFURLCopyPath( - CFURLRef anURL, - ) { - return _CFURLCopyPath( - anURL, - ); - } + late final ffi.Pointer + _kCFNumberFormatterPercentSymbol = + _lookup('kCFNumberFormatterPercentSymbol'); - late final _CFURLCopyPathPtr = - _lookup>( - 'CFURLCopyPath'); - late final _CFURLCopyPath = - _CFURLCopyPathPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterPercentSymbol => + _kCFNumberFormatterPercentSymbol.value; - CFStringRef CFURLCopyStrictPath( - CFURLRef anURL, - ffi.Pointer isAbsolute, - ) { - return _CFURLCopyStrictPath( - anURL, - isAbsolute, - ); - } + set kCFNumberFormatterPercentSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterPercentSymbol.value = value; - late final _CFURLCopyStrictPathPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFURLRef, ffi.Pointer)>>('CFURLCopyStrictPath'); - late final _CFURLCopyStrictPath = _CFURLCopyStrictPathPtr.asFunction< - CFStringRef Function(CFURLRef, ffi.Pointer)>(); + late final ffi.Pointer _kCFNumberFormatterZeroSymbol = + _lookup('kCFNumberFormatterZeroSymbol'); - CFStringRef CFURLCopyFileSystemPath( - CFURLRef anURL, - int pathStyle, - ) { - return _CFURLCopyFileSystemPath( - anURL, - pathStyle, - ); - } + CFNumberFormatterKey get kCFNumberFormatterZeroSymbol => + _kCFNumberFormatterZeroSymbol.value; - late final _CFURLCopyFileSystemPathPtr = - _lookup>( - 'CFURLCopyFileSystemPath'); - late final _CFURLCopyFileSystemPath = _CFURLCopyFileSystemPathPtr.asFunction< - CFStringRef Function(CFURLRef, int)>(); + set kCFNumberFormatterZeroSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterZeroSymbol.value = value; - int CFURLHasDirectoryPath( - CFURLRef anURL, - ) { - return _CFURLHasDirectoryPath( - anURL, - ); - } + late final ffi.Pointer _kCFNumberFormatterNaNSymbol = + _lookup('kCFNumberFormatterNaNSymbol'); - late final _CFURLHasDirectoryPathPtr = - _lookup>( - 'CFURLHasDirectoryPath'); - late final _CFURLHasDirectoryPath = - _CFURLHasDirectoryPathPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterNaNSymbol => + _kCFNumberFormatterNaNSymbol.value; - CFStringRef CFURLCopyResourceSpecifier( - CFURLRef anURL, - ) { - return _CFURLCopyResourceSpecifier( - anURL, - ); - } + set kCFNumberFormatterNaNSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterNaNSymbol.value = value; - late final _CFURLCopyResourceSpecifierPtr = - _lookup>( - 'CFURLCopyResourceSpecifier'); - late final _CFURLCopyResourceSpecifier = _CFURLCopyResourceSpecifierPtr - .asFunction(); + late final ffi.Pointer + _kCFNumberFormatterInfinitySymbol = + _lookup('kCFNumberFormatterInfinitySymbol'); - CFStringRef CFURLCopyHostName( - CFURLRef anURL, - ) { - return _CFURLCopyHostName( - anURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterInfinitySymbol => + _kCFNumberFormatterInfinitySymbol.value; - late final _CFURLCopyHostNamePtr = - _lookup>( - 'CFURLCopyHostName'); - late final _CFURLCopyHostName = - _CFURLCopyHostNamePtr.asFunction(); + set kCFNumberFormatterInfinitySymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterInfinitySymbol.value = value; - int CFURLGetPortNumber( - CFURLRef anURL, - ) { - return _CFURLGetPortNumber( - anURL, - ); - } + late final ffi.Pointer _kCFNumberFormatterMinusSign = + _lookup('kCFNumberFormatterMinusSign'); - late final _CFURLGetPortNumberPtr = - _lookup>( - 'CFURLGetPortNumber'); - late final _CFURLGetPortNumber = - _CFURLGetPortNumberPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterMinusSign => + _kCFNumberFormatterMinusSign.value; - CFStringRef CFURLCopyUserName( - CFURLRef anURL, - ) { - return _CFURLCopyUserName( - anURL, - ); - } + set kCFNumberFormatterMinusSign(CFNumberFormatterKey value) => + _kCFNumberFormatterMinusSign.value = value; - late final _CFURLCopyUserNamePtr = - _lookup>( - 'CFURLCopyUserName'); - late final _CFURLCopyUserName = - _CFURLCopyUserNamePtr.asFunction(); + late final ffi.Pointer _kCFNumberFormatterPlusSign = + _lookup('kCFNumberFormatterPlusSign'); - CFStringRef CFURLCopyPassword( - CFURLRef anURL, - ) { - return _CFURLCopyPassword( - anURL, - ); - } + CFNumberFormatterKey get kCFNumberFormatterPlusSign => + _kCFNumberFormatterPlusSign.value; - late final _CFURLCopyPasswordPtr = - _lookup>( - 'CFURLCopyPassword'); - late final _CFURLCopyPassword = - _CFURLCopyPasswordPtr.asFunction(); + set kCFNumberFormatterPlusSign(CFNumberFormatterKey value) => + _kCFNumberFormatterPlusSign.value = value; - CFStringRef CFURLCopyParameterString( - CFURLRef anURL, - CFStringRef charactersToLeaveEscaped, - ) { - return _CFURLCopyParameterString( - anURL, - charactersToLeaveEscaped, - ); - } + late final ffi.Pointer + _kCFNumberFormatterCurrencySymbol = + _lookup('kCFNumberFormatterCurrencySymbol'); - late final _CFURLCopyParameterStringPtr = - _lookup>( - 'CFURLCopyParameterString'); - late final _CFURLCopyParameterString = _CFURLCopyParameterStringPtr - .asFunction(); + CFNumberFormatterKey get kCFNumberFormatterCurrencySymbol => + _kCFNumberFormatterCurrencySymbol.value; - CFStringRef CFURLCopyQueryString( - CFURLRef anURL, - CFStringRef charactersToLeaveEscaped, - ) { - return _CFURLCopyQueryString( - anURL, - charactersToLeaveEscaped, - ); - } + set kCFNumberFormatterCurrencySymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencySymbol.value = value; - late final _CFURLCopyQueryStringPtr = - _lookup>( - 'CFURLCopyQueryString'); - late final _CFURLCopyQueryString = _CFURLCopyQueryStringPtr.asFunction< - CFStringRef Function(CFURLRef, CFStringRef)>(); + late final ffi.Pointer + _kCFNumberFormatterExponentSymbol = + _lookup('kCFNumberFormatterExponentSymbol'); - CFStringRef CFURLCopyFragment( - CFURLRef anURL, - CFStringRef charactersToLeaveEscaped, - ) { - return _CFURLCopyFragment( - anURL, - charactersToLeaveEscaped, - ); - } + CFNumberFormatterKey get kCFNumberFormatterExponentSymbol => + _kCFNumberFormatterExponentSymbol.value; - late final _CFURLCopyFragmentPtr = - _lookup>( - 'CFURLCopyFragment'); - late final _CFURLCopyFragment = _CFURLCopyFragmentPtr.asFunction< - CFStringRef Function(CFURLRef, CFStringRef)>(); + set kCFNumberFormatterExponentSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterExponentSymbol.value = value; - CFStringRef CFURLCopyLastPathComponent( - CFURLRef url, - ) { - return _CFURLCopyLastPathComponent( - url, - ); - } + late final ffi.Pointer + _kCFNumberFormatterMinIntegerDigits = + _lookup('kCFNumberFormatterMinIntegerDigits'); - late final _CFURLCopyLastPathComponentPtr = - _lookup>( - 'CFURLCopyLastPathComponent'); - late final _CFURLCopyLastPathComponent = _CFURLCopyLastPathComponentPtr - .asFunction(); + CFNumberFormatterKey get kCFNumberFormatterMinIntegerDigits => + _kCFNumberFormatterMinIntegerDigits.value; - CFStringRef CFURLCopyPathExtension( - CFURLRef url, - ) { - return _CFURLCopyPathExtension( - url, - ); - } + set kCFNumberFormatterMinIntegerDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMinIntegerDigits.value = value; - late final _CFURLCopyPathExtensionPtr = - _lookup>( - 'CFURLCopyPathExtension'); - late final _CFURLCopyPathExtension = - _CFURLCopyPathExtensionPtr.asFunction(); + late final ffi.Pointer + _kCFNumberFormatterMaxIntegerDigits = + _lookup('kCFNumberFormatterMaxIntegerDigits'); - CFURLRef CFURLCreateCopyAppendingPathComponent( - CFAllocatorRef allocator, - CFURLRef url, - CFStringRef pathComponent, - int isDirectory, - ) { - return _CFURLCreateCopyAppendingPathComponent( - allocator, - url, - pathComponent, - isDirectory, - ); - } + CFNumberFormatterKey get kCFNumberFormatterMaxIntegerDigits => + _kCFNumberFormatterMaxIntegerDigits.value; - late final _CFURLCreateCopyAppendingPathComponentPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, - Boolean)>>('CFURLCreateCopyAppendingPathComponent'); - late final _CFURLCreateCopyAppendingPathComponent = - _CFURLCreateCopyAppendingPathComponentPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, int)>(); + set kCFNumberFormatterMaxIntegerDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMaxIntegerDigits.value = value; - CFURLRef CFURLCreateCopyDeletingLastPathComponent( - CFAllocatorRef allocator, - CFURLRef url, - ) { - return _CFURLCreateCopyDeletingLastPathComponent( - allocator, - url, - ); - } + late final ffi.Pointer + _kCFNumberFormatterMinFractionDigits = + _lookup('kCFNumberFormatterMinFractionDigits'); - late final _CFURLCreateCopyDeletingLastPathComponentPtr = - _lookup>( - 'CFURLCreateCopyDeletingLastPathComponent'); - late final _CFURLCreateCopyDeletingLastPathComponent = - _CFURLCreateCopyDeletingLastPathComponentPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef)>(); + CFNumberFormatterKey get kCFNumberFormatterMinFractionDigits => + _kCFNumberFormatterMinFractionDigits.value; - CFURLRef CFURLCreateCopyAppendingPathExtension( - CFAllocatorRef allocator, - CFURLRef url, - CFStringRef extension1, - ) { - return _CFURLCreateCopyAppendingPathExtension( - allocator, - url, - extension1, - ); - } + set kCFNumberFormatterMinFractionDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMinFractionDigits.value = value; - late final _CFURLCreateCopyAppendingPathExtensionPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, - CFStringRef)>>('CFURLCreateCopyAppendingPathExtension'); - late final _CFURLCreateCopyAppendingPathExtension = - _CFURLCreateCopyAppendingPathExtensionPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); + late final ffi.Pointer + _kCFNumberFormatterMaxFractionDigits = + _lookup('kCFNumberFormatterMaxFractionDigits'); - CFURLRef CFURLCreateCopyDeletingPathExtension( - CFAllocatorRef allocator, - CFURLRef url, - ) { - return _CFURLCreateCopyDeletingPathExtension( - allocator, - url, - ); - } + CFNumberFormatterKey get kCFNumberFormatterMaxFractionDigits => + _kCFNumberFormatterMaxFractionDigits.value; - late final _CFURLCreateCopyDeletingPathExtensionPtr = - _lookup>( - 'CFURLCreateCopyDeletingPathExtension'); - late final _CFURLCreateCopyDeletingPathExtension = - _CFURLCreateCopyDeletingPathExtensionPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef)>(); + set kCFNumberFormatterMaxFractionDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMaxFractionDigits.value = value; - int CFURLGetBytes( - CFURLRef url, - ffi.Pointer buffer, - int bufferLength, - ) { - return _CFURLGetBytes( - url, - buffer, - bufferLength, - ); - } + late final ffi.Pointer _kCFNumberFormatterGroupingSize = + _lookup('kCFNumberFormatterGroupingSize'); - late final _CFURLGetBytesPtr = _lookup< - ffi.NativeFunction< - CFIndex Function( - CFURLRef, ffi.Pointer, CFIndex)>>('CFURLGetBytes'); - late final _CFURLGetBytes = _CFURLGetBytesPtr.asFunction< - int Function(CFURLRef, ffi.Pointer, int)>(); + CFNumberFormatterKey get kCFNumberFormatterGroupingSize => + _kCFNumberFormatterGroupingSize.value; - CFRange CFURLGetByteRangeForComponent( - CFURLRef url, - int component, - ffi.Pointer rangeIncludingSeparators, - ) { - return _CFURLGetByteRangeForComponent( - url, - component, - rangeIncludingSeparators, - ); - } + set kCFNumberFormatterGroupingSize(CFNumberFormatterKey value) => + _kCFNumberFormatterGroupingSize.value = value; - late final _CFURLGetByteRangeForComponentPtr = _lookup< - ffi.NativeFunction< - CFRange Function(CFURLRef, ffi.Int32, - ffi.Pointer)>>('CFURLGetByteRangeForComponent'); - late final _CFURLGetByteRangeForComponent = _CFURLGetByteRangeForComponentPtr - .asFunction)>(); + late final ffi.Pointer + _kCFNumberFormatterSecondaryGroupingSize = + _lookup('kCFNumberFormatterSecondaryGroupingSize'); - CFStringRef CFURLCreateStringByReplacingPercentEscapes( - CFAllocatorRef allocator, - CFStringRef originalString, - CFStringRef charactersToLeaveEscaped, - ) { - return _CFURLCreateStringByReplacingPercentEscapes( - allocator, - originalString, - charactersToLeaveEscaped, - ); - } + CFNumberFormatterKey get kCFNumberFormatterSecondaryGroupingSize => + _kCFNumberFormatterSecondaryGroupingSize.value; - late final _CFURLCreateStringByReplacingPercentEscapesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFStringRef)>>('CFURLCreateStringByReplacingPercentEscapes'); - late final _CFURLCreateStringByReplacingPercentEscapes = - _CFURLCreateStringByReplacingPercentEscapesPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); + set kCFNumberFormatterSecondaryGroupingSize(CFNumberFormatterKey value) => + _kCFNumberFormatterSecondaryGroupingSize.value = value; - CFStringRef CFURLCreateStringByReplacingPercentEscapesUsingEncoding( - CFAllocatorRef allocator, - CFStringRef origString, - CFStringRef charsToLeaveEscaped, - int encoding, - ) { - return _CFURLCreateStringByReplacingPercentEscapesUsingEncoding( - allocator, - origString, - charsToLeaveEscaped, - encoding, - ); - } + late final ffi.Pointer _kCFNumberFormatterRoundingMode = + _lookup('kCFNumberFormatterRoundingMode'); - late final _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr = - _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef, - CFStringEncoding)>>( - 'CFURLCreateStringByReplacingPercentEscapesUsingEncoding'); - late final _CFURLCreateStringByReplacingPercentEscapesUsingEncoding = - _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef, CFStringRef, int)>(); + CFNumberFormatterKey get kCFNumberFormatterRoundingMode => + _kCFNumberFormatterRoundingMode.value; - CFStringRef CFURLCreateStringByAddingPercentEscapes( - CFAllocatorRef allocator, - CFStringRef originalString, - CFStringRef charactersToLeaveUnescaped, - CFStringRef legalURLCharactersToBeEscaped, - int encoding, - ) { - return _CFURLCreateStringByAddingPercentEscapes( - allocator, - originalString, - charactersToLeaveUnescaped, - legalURLCharactersToBeEscaped, - encoding, - ); - } + set kCFNumberFormatterRoundingMode(CFNumberFormatterKey value) => + _kCFNumberFormatterRoundingMode.value = value; - late final _CFURLCreateStringByAddingPercentEscapesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringEncoding)>>('CFURLCreateStringByAddingPercentEscapes'); - late final _CFURLCreateStringByAddingPercentEscapes = - _CFURLCreateStringByAddingPercentEscapesPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef, CFStringRef, CFStringRef, int)>(); + late final ffi.Pointer + _kCFNumberFormatterRoundingIncrement = + _lookup('kCFNumberFormatterRoundingIncrement'); - int CFURLIsFileReferenceURL( - CFURLRef url, - ) { - return _CFURLIsFileReferenceURL( - url, - ); - } + CFNumberFormatterKey get kCFNumberFormatterRoundingIncrement => + _kCFNumberFormatterRoundingIncrement.value; - late final _CFURLIsFileReferenceURLPtr = - _lookup>( - 'CFURLIsFileReferenceURL'); - late final _CFURLIsFileReferenceURL = - _CFURLIsFileReferenceURLPtr.asFunction(); + set kCFNumberFormatterRoundingIncrement(CFNumberFormatterKey value) => + _kCFNumberFormatterRoundingIncrement.value = value; - CFURLRef CFURLCreateFileReferenceURL( - CFAllocatorRef allocator, - CFURLRef url, - ffi.Pointer error, - ) { - return _CFURLCreateFileReferenceURL( - allocator, - url, - error, - ); - } + late final ffi.Pointer _kCFNumberFormatterFormatWidth = + _lookup('kCFNumberFormatterFormatWidth'); - late final _CFURLCreateFileReferenceURLPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, - ffi.Pointer)>>('CFURLCreateFileReferenceURL'); - late final _CFURLCreateFileReferenceURL = - _CFURLCreateFileReferenceURLPtr.asFunction< - CFURLRef Function( - CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterFormatWidth => + _kCFNumberFormatterFormatWidth.value; - CFURLRef CFURLCreateFilePathURL( - CFAllocatorRef allocator, - CFURLRef url, - ffi.Pointer error, - ) { - return _CFURLCreateFilePathURL( - allocator, - url, - error, - ); - } + set kCFNumberFormatterFormatWidth(CFNumberFormatterKey value) => + _kCFNumberFormatterFormatWidth.value = value; - late final _CFURLCreateFilePathURLPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, - ffi.Pointer)>>('CFURLCreateFilePathURL'); - late final _CFURLCreateFilePathURL = _CFURLCreateFilePathURLPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + late final ffi.Pointer + _kCFNumberFormatterPaddingPosition = + _lookup('kCFNumberFormatterPaddingPosition'); - CFURLRef CFURLCreateFromFSRef( - CFAllocatorRef allocator, - ffi.Pointer fsRef, - ) { - return _CFURLCreateFromFSRef( - allocator, - fsRef, - ); - } + CFNumberFormatterKey get kCFNumberFormatterPaddingPosition => + _kCFNumberFormatterPaddingPosition.value; - late final _CFURLCreateFromFSRefPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer)>>('CFURLCreateFromFSRef'); - late final _CFURLCreateFromFSRef = _CFURLCreateFromFSRefPtr.asFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer)>(); + set kCFNumberFormatterPaddingPosition(CFNumberFormatterKey value) => + _kCFNumberFormatterPaddingPosition.value = value; - int CFURLGetFSRef( - CFURLRef url, - ffi.Pointer fsRef, - ) { - return _CFURLGetFSRef( - url, - fsRef, - ); - } + late final ffi.Pointer + _kCFNumberFormatterPaddingCharacter = + _lookup('kCFNumberFormatterPaddingCharacter'); - late final _CFURLGetFSRefPtr = _lookup< - ffi.NativeFunction)>>( - 'CFURLGetFSRef'); - late final _CFURLGetFSRef = _CFURLGetFSRefPtr.asFunction< - int Function(CFURLRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterPaddingCharacter => + _kCFNumberFormatterPaddingCharacter.value; - int CFURLCopyResourcePropertyForKey( - CFURLRef url, - CFStringRef key, - ffi.Pointer propertyValueTypeRefPtr, - ffi.Pointer error, - ) { - return _CFURLCopyResourcePropertyForKey( - url, - key, - propertyValueTypeRefPtr, - error, - ); - } + set kCFNumberFormatterPaddingCharacter(CFNumberFormatterKey value) => + _kCFNumberFormatterPaddingCharacter.value = value; - late final _CFURLCopyResourcePropertyForKeyPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, CFStringRef, ffi.Pointer, - ffi.Pointer)>>('CFURLCopyResourcePropertyForKey'); - late final _CFURLCopyResourcePropertyForKey = - _CFURLCopyResourcePropertyForKeyPtr.asFunction< - int Function(CFURLRef, CFStringRef, ffi.Pointer, - ffi.Pointer)>(); + late final ffi.Pointer + _kCFNumberFormatterDefaultFormat = + _lookup('kCFNumberFormatterDefaultFormat'); - CFDictionaryRef CFURLCopyResourcePropertiesForKeys( - CFURLRef url, - CFArrayRef keys, - ffi.Pointer error, - ) { - return _CFURLCopyResourcePropertiesForKeys( - url, - keys, - error, - ); - } + CFNumberFormatterKey get kCFNumberFormatterDefaultFormat => + _kCFNumberFormatterDefaultFormat.value; - late final _CFURLCopyResourcePropertiesForKeysPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFURLRef, CFArrayRef, - ffi.Pointer)>>('CFURLCopyResourcePropertiesForKeys'); - late final _CFURLCopyResourcePropertiesForKeys = - _CFURLCopyResourcePropertiesForKeysPtr.asFunction< - CFDictionaryRef Function( - CFURLRef, CFArrayRef, ffi.Pointer)>(); + set kCFNumberFormatterDefaultFormat(CFNumberFormatterKey value) => + _kCFNumberFormatterDefaultFormat.value = value; - int CFURLSetResourcePropertyForKey( - CFURLRef url, - CFStringRef key, - CFTypeRef propertyValue, - ffi.Pointer error, - ) { - return _CFURLSetResourcePropertyForKey( - url, - key, - propertyValue, - error, - ); - } + late final ffi.Pointer _kCFNumberFormatterMultiplier = + _lookup('kCFNumberFormatterMultiplier'); - late final _CFURLSetResourcePropertyForKeyPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, CFStringRef, CFTypeRef, - ffi.Pointer)>>('CFURLSetResourcePropertyForKey'); - late final _CFURLSetResourcePropertyForKey = - _CFURLSetResourcePropertyForKeyPtr.asFunction< - int Function( - CFURLRef, CFStringRef, CFTypeRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterMultiplier => + _kCFNumberFormatterMultiplier.value; - int CFURLSetResourcePropertiesForKeys( - CFURLRef url, - CFDictionaryRef keyedPropertyValues, - ffi.Pointer error, - ) { - return _CFURLSetResourcePropertiesForKeys( - url, - keyedPropertyValues, - error, - ); - } + set kCFNumberFormatterMultiplier(CFNumberFormatterKey value) => + _kCFNumberFormatterMultiplier.value = value; - late final _CFURLSetResourcePropertiesForKeysPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, CFDictionaryRef, - ffi.Pointer)>>('CFURLSetResourcePropertiesForKeys'); - late final _CFURLSetResourcePropertiesForKeys = - _CFURLSetResourcePropertiesForKeysPtr.asFunction< - int Function(CFURLRef, CFDictionaryRef, ffi.Pointer)>(); + late final ffi.Pointer + _kCFNumberFormatterPositivePrefix = + _lookup('kCFNumberFormatterPositivePrefix'); - late final ffi.Pointer _kCFURLKeysOfUnsetValuesKey = - _lookup('kCFURLKeysOfUnsetValuesKey'); + CFNumberFormatterKey get kCFNumberFormatterPositivePrefix => + _kCFNumberFormatterPositivePrefix.value; - CFStringRef get kCFURLKeysOfUnsetValuesKey => - _kCFURLKeysOfUnsetValuesKey.value; + set kCFNumberFormatterPositivePrefix(CFNumberFormatterKey value) => + _kCFNumberFormatterPositivePrefix.value = value; - set kCFURLKeysOfUnsetValuesKey(CFStringRef value) => - _kCFURLKeysOfUnsetValuesKey.value = value; + late final ffi.Pointer + _kCFNumberFormatterPositiveSuffix = + _lookup('kCFNumberFormatterPositiveSuffix'); - void CFURLClearResourcePropertyCacheForKey( - CFURLRef url, - CFStringRef key, - ) { - return _CFURLClearResourcePropertyCacheForKey( - url, - key, - ); - } + CFNumberFormatterKey get kCFNumberFormatterPositiveSuffix => + _kCFNumberFormatterPositiveSuffix.value; - late final _CFURLClearResourcePropertyCacheForKeyPtr = - _lookup>( - 'CFURLClearResourcePropertyCacheForKey'); - late final _CFURLClearResourcePropertyCacheForKey = - _CFURLClearResourcePropertyCacheForKeyPtr.asFunction< - void Function(CFURLRef, CFStringRef)>(); + set kCFNumberFormatterPositiveSuffix(CFNumberFormatterKey value) => + _kCFNumberFormatterPositiveSuffix.value = value; - void CFURLClearResourcePropertyCache( - CFURLRef url, - ) { - return _CFURLClearResourcePropertyCache( - url, - ); - } + late final ffi.Pointer + _kCFNumberFormatterNegativePrefix = + _lookup('kCFNumberFormatterNegativePrefix'); - late final _CFURLClearResourcePropertyCachePtr = - _lookup>( - 'CFURLClearResourcePropertyCache'); - late final _CFURLClearResourcePropertyCache = - _CFURLClearResourcePropertyCachePtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterNegativePrefix => + _kCFNumberFormatterNegativePrefix.value; - void CFURLSetTemporaryResourcePropertyForKey( - CFURLRef url, - CFStringRef key, - CFTypeRef propertyValue, - ) { - return _CFURLSetTemporaryResourcePropertyForKey( - url, - key, - propertyValue, - ); - } + set kCFNumberFormatterNegativePrefix(CFNumberFormatterKey value) => + _kCFNumberFormatterNegativePrefix.value = value; - late final _CFURLSetTemporaryResourcePropertyForKeyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFURLRef, CFStringRef, - CFTypeRef)>>('CFURLSetTemporaryResourcePropertyForKey'); - late final _CFURLSetTemporaryResourcePropertyForKey = - _CFURLSetTemporaryResourcePropertyForKeyPtr.asFunction< - void Function(CFURLRef, CFStringRef, CFTypeRef)>(); + late final ffi.Pointer + _kCFNumberFormatterNegativeSuffix = + _lookup('kCFNumberFormatterNegativeSuffix'); - int CFURLResourceIsReachable( - CFURLRef url, - ffi.Pointer error, - ) { - return _CFURLResourceIsReachable( - url, - error, - ); - } + CFNumberFormatterKey get kCFNumberFormatterNegativeSuffix => + _kCFNumberFormatterNegativeSuffix.value; - late final _CFURLResourceIsReachablePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFURLRef, ffi.Pointer)>>('CFURLResourceIsReachable'); - late final _CFURLResourceIsReachable = _CFURLResourceIsReachablePtr - .asFunction)>(); + set kCFNumberFormatterNegativeSuffix(CFNumberFormatterKey value) => + _kCFNumberFormatterNegativeSuffix.value = value; - late final ffi.Pointer _kCFURLNameKey = - _lookup('kCFURLNameKey'); + late final ffi.Pointer + _kCFNumberFormatterPerMillSymbol = + _lookup('kCFNumberFormatterPerMillSymbol'); - CFStringRef get kCFURLNameKey => _kCFURLNameKey.value; + CFNumberFormatterKey get kCFNumberFormatterPerMillSymbol => + _kCFNumberFormatterPerMillSymbol.value; - set kCFURLNameKey(CFStringRef value) => _kCFURLNameKey.value = value; + set kCFNumberFormatterPerMillSymbol(CFNumberFormatterKey value) => + _kCFNumberFormatterPerMillSymbol.value = value; - late final ffi.Pointer _kCFURLLocalizedNameKey = - _lookup('kCFURLLocalizedNameKey'); + late final ffi.Pointer + _kCFNumberFormatterInternationalCurrencySymbol = + _lookup( + 'kCFNumberFormatterInternationalCurrencySymbol'); - CFStringRef get kCFURLLocalizedNameKey => _kCFURLLocalizedNameKey.value; + CFNumberFormatterKey get kCFNumberFormatterInternationalCurrencySymbol => + _kCFNumberFormatterInternationalCurrencySymbol.value; - set kCFURLLocalizedNameKey(CFStringRef value) => - _kCFURLLocalizedNameKey.value = value; + set kCFNumberFormatterInternationalCurrencySymbol( + CFNumberFormatterKey value) => + _kCFNumberFormatterInternationalCurrencySymbol.value = value; - late final ffi.Pointer _kCFURLIsRegularFileKey = - _lookup('kCFURLIsRegularFileKey'); + late final ffi.Pointer + _kCFNumberFormatterCurrencyGroupingSeparator = + _lookup( + 'kCFNumberFormatterCurrencyGroupingSeparator'); - CFStringRef get kCFURLIsRegularFileKey => _kCFURLIsRegularFileKey.value; + CFNumberFormatterKey get kCFNumberFormatterCurrencyGroupingSeparator => + _kCFNumberFormatterCurrencyGroupingSeparator.value; - set kCFURLIsRegularFileKey(CFStringRef value) => - _kCFURLIsRegularFileKey.value = value; + set kCFNumberFormatterCurrencyGroupingSeparator(CFNumberFormatterKey value) => + _kCFNumberFormatterCurrencyGroupingSeparator.value = value; - late final ffi.Pointer _kCFURLIsDirectoryKey = - _lookup('kCFURLIsDirectoryKey'); + late final ffi.Pointer _kCFNumberFormatterIsLenient = + _lookup('kCFNumberFormatterIsLenient'); - CFStringRef get kCFURLIsDirectoryKey => _kCFURLIsDirectoryKey.value; + CFNumberFormatterKey get kCFNumberFormatterIsLenient => + _kCFNumberFormatterIsLenient.value; - set kCFURLIsDirectoryKey(CFStringRef value) => - _kCFURLIsDirectoryKey.value = value; + set kCFNumberFormatterIsLenient(CFNumberFormatterKey value) => + _kCFNumberFormatterIsLenient.value = value; - late final ffi.Pointer _kCFURLIsSymbolicLinkKey = - _lookup('kCFURLIsSymbolicLinkKey'); + late final ffi.Pointer + _kCFNumberFormatterUseSignificantDigits = + _lookup('kCFNumberFormatterUseSignificantDigits'); - CFStringRef get kCFURLIsSymbolicLinkKey => _kCFURLIsSymbolicLinkKey.value; + CFNumberFormatterKey get kCFNumberFormatterUseSignificantDigits => + _kCFNumberFormatterUseSignificantDigits.value; - set kCFURLIsSymbolicLinkKey(CFStringRef value) => - _kCFURLIsSymbolicLinkKey.value = value; + set kCFNumberFormatterUseSignificantDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterUseSignificantDigits.value = value; - late final ffi.Pointer _kCFURLIsVolumeKey = - _lookup('kCFURLIsVolumeKey'); + late final ffi.Pointer + _kCFNumberFormatterMinSignificantDigits = + _lookup('kCFNumberFormatterMinSignificantDigits'); - CFStringRef get kCFURLIsVolumeKey => _kCFURLIsVolumeKey.value; + CFNumberFormatterKey get kCFNumberFormatterMinSignificantDigits => + _kCFNumberFormatterMinSignificantDigits.value; - set kCFURLIsVolumeKey(CFStringRef value) => _kCFURLIsVolumeKey.value = value; + set kCFNumberFormatterMinSignificantDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMinSignificantDigits.value = value; - late final ffi.Pointer _kCFURLIsPackageKey = - _lookup('kCFURLIsPackageKey'); + late final ffi.Pointer + _kCFNumberFormatterMaxSignificantDigits = + _lookup('kCFNumberFormatterMaxSignificantDigits'); - CFStringRef get kCFURLIsPackageKey => _kCFURLIsPackageKey.value; + CFNumberFormatterKey get kCFNumberFormatterMaxSignificantDigits => + _kCFNumberFormatterMaxSignificantDigits.value; - set kCFURLIsPackageKey(CFStringRef value) => - _kCFURLIsPackageKey.value = value; + set kCFNumberFormatterMaxSignificantDigits(CFNumberFormatterKey value) => + _kCFNumberFormatterMaxSignificantDigits.value = value; - late final ffi.Pointer _kCFURLIsApplicationKey = - _lookup('kCFURLIsApplicationKey'); + int CFNumberFormatterGetDecimalInfoForCurrencyCode( + CFStringRef currencyCode, + ffi.Pointer defaultFractionDigits, + ffi.Pointer roundingIncrement, + ) { + return _CFNumberFormatterGetDecimalInfoForCurrencyCode( + currencyCode, + defaultFractionDigits, + roundingIncrement, + ); + } - CFStringRef get kCFURLIsApplicationKey => _kCFURLIsApplicationKey.value; + late final _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>>( + 'CFNumberFormatterGetDecimalInfoForCurrencyCode'); + late final _CFNumberFormatterGetDecimalInfoForCurrencyCode = + _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr.asFunction< + int Function( + CFStringRef, ffi.Pointer, ffi.Pointer)>(); - set kCFURLIsApplicationKey(CFStringRef value) => - _kCFURLIsApplicationKey.value = value; + late final ffi.Pointer _kCFPreferencesAnyApplication = + _lookup('kCFPreferencesAnyApplication'); - late final ffi.Pointer _kCFURLApplicationIsScriptableKey = - _lookup('kCFURLApplicationIsScriptableKey'); + CFStringRef get kCFPreferencesAnyApplication => + _kCFPreferencesAnyApplication.value; - CFStringRef get kCFURLApplicationIsScriptableKey => - _kCFURLApplicationIsScriptableKey.value; + set kCFPreferencesAnyApplication(CFStringRef value) => + _kCFPreferencesAnyApplication.value = value; - set kCFURLApplicationIsScriptableKey(CFStringRef value) => - _kCFURLApplicationIsScriptableKey.value = value; + late final ffi.Pointer _kCFPreferencesCurrentApplication = + _lookup('kCFPreferencesCurrentApplication'); - late final ffi.Pointer _kCFURLIsSystemImmutableKey = - _lookup('kCFURLIsSystemImmutableKey'); + CFStringRef get kCFPreferencesCurrentApplication => + _kCFPreferencesCurrentApplication.value; - CFStringRef get kCFURLIsSystemImmutableKey => - _kCFURLIsSystemImmutableKey.value; + set kCFPreferencesCurrentApplication(CFStringRef value) => + _kCFPreferencesCurrentApplication.value = value; - set kCFURLIsSystemImmutableKey(CFStringRef value) => - _kCFURLIsSystemImmutableKey.value = value; + late final ffi.Pointer _kCFPreferencesAnyHost = + _lookup('kCFPreferencesAnyHost'); - late final ffi.Pointer _kCFURLIsUserImmutableKey = - _lookup('kCFURLIsUserImmutableKey'); + CFStringRef get kCFPreferencesAnyHost => _kCFPreferencesAnyHost.value; - CFStringRef get kCFURLIsUserImmutableKey => _kCFURLIsUserImmutableKey.value; + set kCFPreferencesAnyHost(CFStringRef value) => + _kCFPreferencesAnyHost.value = value; - set kCFURLIsUserImmutableKey(CFStringRef value) => - _kCFURLIsUserImmutableKey.value = value; + late final ffi.Pointer _kCFPreferencesCurrentHost = + _lookup('kCFPreferencesCurrentHost'); - late final ffi.Pointer _kCFURLIsHiddenKey = - _lookup('kCFURLIsHiddenKey'); + CFStringRef get kCFPreferencesCurrentHost => _kCFPreferencesCurrentHost.value; - CFStringRef get kCFURLIsHiddenKey => _kCFURLIsHiddenKey.value; + set kCFPreferencesCurrentHost(CFStringRef value) => + _kCFPreferencesCurrentHost.value = value; - set kCFURLIsHiddenKey(CFStringRef value) => _kCFURLIsHiddenKey.value = value; + late final ffi.Pointer _kCFPreferencesAnyUser = + _lookup('kCFPreferencesAnyUser'); - late final ffi.Pointer _kCFURLHasHiddenExtensionKey = - _lookup('kCFURLHasHiddenExtensionKey'); + CFStringRef get kCFPreferencesAnyUser => _kCFPreferencesAnyUser.value; - CFStringRef get kCFURLHasHiddenExtensionKey => - _kCFURLHasHiddenExtensionKey.value; + set kCFPreferencesAnyUser(CFStringRef value) => + _kCFPreferencesAnyUser.value = value; - set kCFURLHasHiddenExtensionKey(CFStringRef value) => - _kCFURLHasHiddenExtensionKey.value = value; + late final ffi.Pointer _kCFPreferencesCurrentUser = + _lookup('kCFPreferencesCurrentUser'); - late final ffi.Pointer _kCFURLCreationDateKey = - _lookup('kCFURLCreationDateKey'); + CFStringRef get kCFPreferencesCurrentUser => _kCFPreferencesCurrentUser.value; - CFStringRef get kCFURLCreationDateKey => _kCFURLCreationDateKey.value; + set kCFPreferencesCurrentUser(CFStringRef value) => + _kCFPreferencesCurrentUser.value = value; - set kCFURLCreationDateKey(CFStringRef value) => - _kCFURLCreationDateKey.value = value; + CFPropertyListRef CFPreferencesCopyAppValue( + CFStringRef key, + CFStringRef applicationID, + ) { + return _CFPreferencesCopyAppValue( + key, + applicationID, + ); + } - late final ffi.Pointer _kCFURLContentAccessDateKey = - _lookup('kCFURLContentAccessDateKey'); + late final _CFPreferencesCopyAppValuePtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFStringRef, CFStringRef)>>('CFPreferencesCopyAppValue'); + late final _CFPreferencesCopyAppValue = _CFPreferencesCopyAppValuePtr + .asFunction(); - CFStringRef get kCFURLContentAccessDateKey => - _kCFURLContentAccessDateKey.value; + int CFPreferencesGetAppBooleanValue( + CFStringRef key, + CFStringRef applicationID, + ffi.Pointer keyExistsAndHasValidFormat, + ) { + return _CFPreferencesGetAppBooleanValue( + key, + applicationID, + keyExistsAndHasValidFormat, + ); + } - set kCFURLContentAccessDateKey(CFStringRef value) => - _kCFURLContentAccessDateKey.value = value; + late final _CFPreferencesGetAppBooleanValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, CFStringRef, + ffi.Pointer)>>('CFPreferencesGetAppBooleanValue'); + late final _CFPreferencesGetAppBooleanValue = + _CFPreferencesGetAppBooleanValuePtr.asFunction< + int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLContentModificationDateKey = - _lookup('kCFURLContentModificationDateKey'); + int CFPreferencesGetAppIntegerValue( + CFStringRef key, + CFStringRef applicationID, + ffi.Pointer keyExistsAndHasValidFormat, + ) { + return _CFPreferencesGetAppIntegerValue( + key, + applicationID, + keyExistsAndHasValidFormat, + ); + } - CFStringRef get kCFURLContentModificationDateKey => - _kCFURLContentModificationDateKey.value; + late final _CFPreferencesGetAppIntegerValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFStringRef, CFStringRef, + ffi.Pointer)>>('CFPreferencesGetAppIntegerValue'); + late final _CFPreferencesGetAppIntegerValue = + _CFPreferencesGetAppIntegerValuePtr.asFunction< + int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); - set kCFURLContentModificationDateKey(CFStringRef value) => - _kCFURLContentModificationDateKey.value = value; + void CFPreferencesSetAppValue( + CFStringRef key, + CFPropertyListRef value, + CFStringRef applicationID, + ) { + return _CFPreferencesSetAppValue( + key, + value, + applicationID, + ); + } - late final ffi.Pointer _kCFURLAttributeModificationDateKey = - _lookup('kCFURLAttributeModificationDateKey'); + late final _CFPreferencesSetAppValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringRef, CFPropertyListRef, + CFStringRef)>>('CFPreferencesSetAppValue'); + late final _CFPreferencesSetAppValue = _CFPreferencesSetAppValuePtr + .asFunction(); - CFStringRef get kCFURLAttributeModificationDateKey => - _kCFURLAttributeModificationDateKey.value; + void CFPreferencesAddSuitePreferencesToApp( + CFStringRef applicationID, + CFStringRef suiteID, + ) { + return _CFPreferencesAddSuitePreferencesToApp( + applicationID, + suiteID, + ); + } - set kCFURLAttributeModificationDateKey(CFStringRef value) => - _kCFURLAttributeModificationDateKey.value = value; + late final _CFPreferencesAddSuitePreferencesToAppPtr = + _lookup>( + 'CFPreferencesAddSuitePreferencesToApp'); + late final _CFPreferencesAddSuitePreferencesToApp = + _CFPreferencesAddSuitePreferencesToAppPtr.asFunction< + void Function(CFStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFURLFileContentIdentifierKey = - _lookup('kCFURLFileContentIdentifierKey'); + void CFPreferencesRemoveSuitePreferencesFromApp( + CFStringRef applicationID, + CFStringRef suiteID, + ) { + return _CFPreferencesRemoveSuitePreferencesFromApp( + applicationID, + suiteID, + ); + } - CFStringRef get kCFURLFileContentIdentifierKey => - _kCFURLFileContentIdentifierKey.value; + late final _CFPreferencesRemoveSuitePreferencesFromAppPtr = + _lookup>( + 'CFPreferencesRemoveSuitePreferencesFromApp'); + late final _CFPreferencesRemoveSuitePreferencesFromApp = + _CFPreferencesRemoveSuitePreferencesFromAppPtr.asFunction< + void Function(CFStringRef, CFStringRef)>(); - set kCFURLFileContentIdentifierKey(CFStringRef value) => - _kCFURLFileContentIdentifierKey.value = value; + int CFPreferencesAppSynchronize( + CFStringRef applicationID, + ) { + return _CFPreferencesAppSynchronize( + applicationID, + ); + } - late final ffi.Pointer _kCFURLMayShareFileContentKey = - _lookup('kCFURLMayShareFileContentKey'); + late final _CFPreferencesAppSynchronizePtr = + _lookup>( + 'CFPreferencesAppSynchronize'); + late final _CFPreferencesAppSynchronize = + _CFPreferencesAppSynchronizePtr.asFunction(); - CFStringRef get kCFURLMayShareFileContentKey => - _kCFURLMayShareFileContentKey.value; + CFPropertyListRef CFPreferencesCopyValue( + CFStringRef key, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyValue( + key, + applicationID, + userName, + hostName, + ); + } - set kCFURLMayShareFileContentKey(CFStringRef value) => - _kCFURLMayShareFileContentKey.value = value; + late final _CFPreferencesCopyValuePtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function(CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyValue'); + late final _CFPreferencesCopyValue = _CFPreferencesCopyValuePtr.asFunction< + CFPropertyListRef Function( + CFStringRef, CFStringRef, CFStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFURLMayHaveExtendedAttributesKey = - _lookup('kCFURLMayHaveExtendedAttributesKey'); + CFDictionaryRef CFPreferencesCopyMultiple( + CFArrayRef keysToFetch, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyMultiple( + keysToFetch, + applicationID, + userName, + hostName, + ); + } - CFStringRef get kCFURLMayHaveExtendedAttributesKey => - _kCFURLMayHaveExtendedAttributesKey.value; + late final _CFPreferencesCopyMultiplePtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFArrayRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyMultiple'); + late final _CFPreferencesCopyMultiple = + _CFPreferencesCopyMultiplePtr.asFunction< + CFDictionaryRef Function( + CFArrayRef, CFStringRef, CFStringRef, CFStringRef)>(); - set kCFURLMayHaveExtendedAttributesKey(CFStringRef value) => - _kCFURLMayHaveExtendedAttributesKey.value = value; + void CFPreferencesSetValue( + CFStringRef key, + CFPropertyListRef value, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesSetValue( + key, + value, + applicationID, + userName, + hostName, + ); + } - late final ffi.Pointer _kCFURLIsPurgeableKey = - _lookup('kCFURLIsPurgeableKey'); + late final _CFPreferencesSetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringRef, CFPropertyListRef, CFStringRef, + CFStringRef, CFStringRef)>>('CFPreferencesSetValue'); + late final _CFPreferencesSetValue = _CFPreferencesSetValuePtr.asFunction< + void Function(CFStringRef, CFPropertyListRef, CFStringRef, CFStringRef, + CFStringRef)>(); - CFStringRef get kCFURLIsPurgeableKey => _kCFURLIsPurgeableKey.value; + void CFPreferencesSetMultiple( + CFDictionaryRef keysToSet, + CFArrayRef keysToRemove, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesSetMultiple( + keysToSet, + keysToRemove, + applicationID, + userName, + hostName, + ); + } - set kCFURLIsPurgeableKey(CFStringRef value) => - _kCFURLIsPurgeableKey.value = value; + late final _CFPreferencesSetMultiplePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFDictionaryRef, CFArrayRef, CFStringRef, + CFStringRef, CFStringRef)>>('CFPreferencesSetMultiple'); + late final _CFPreferencesSetMultiple = + _CFPreferencesSetMultiplePtr.asFunction< + void Function(CFDictionaryRef, CFArrayRef, CFStringRef, CFStringRef, + CFStringRef)>(); - late final ffi.Pointer _kCFURLIsSparseKey = - _lookup('kCFURLIsSparseKey'); + int CFPreferencesSynchronize( + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesSynchronize( + applicationID, + userName, + hostName, + ); + } - CFStringRef get kCFURLIsSparseKey => _kCFURLIsSparseKey.value; + late final _CFPreferencesSynchronizePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesSynchronize'); + late final _CFPreferencesSynchronize = _CFPreferencesSynchronizePtr + .asFunction(); - set kCFURLIsSparseKey(CFStringRef value) => _kCFURLIsSparseKey.value = value; + CFArrayRef CFPreferencesCopyApplicationList( + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyApplicationList( + userName, + hostName, + ); + } - late final ffi.Pointer _kCFURLLinkCountKey = - _lookup('kCFURLLinkCountKey'); + late final _CFPreferencesCopyApplicationListPtr = _lookup< + ffi.NativeFunction>( + 'CFPreferencesCopyApplicationList'); + late final _CFPreferencesCopyApplicationList = + _CFPreferencesCopyApplicationListPtr.asFunction< + CFArrayRef Function(CFStringRef, CFStringRef)>(); - CFStringRef get kCFURLLinkCountKey => _kCFURLLinkCountKey.value; + CFArrayRef CFPreferencesCopyKeyList( + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, + ) { + return _CFPreferencesCopyKeyList( + applicationID, + userName, + hostName, + ); + } - set kCFURLLinkCountKey(CFStringRef value) => - _kCFURLLinkCountKey.value = value; + late final _CFPreferencesCopyKeyListPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyKeyList'); + late final _CFPreferencesCopyKeyList = _CFPreferencesCopyKeyListPtr + .asFunction(); - late final ffi.Pointer _kCFURLParentDirectoryURLKey = - _lookup('kCFURLParentDirectoryURLKey'); + int CFPreferencesAppValueIsForced( + CFStringRef key, + CFStringRef applicationID, + ) { + return _CFPreferencesAppValueIsForced( + key, + applicationID, + ); + } - CFStringRef get kCFURLParentDirectoryURLKey => - _kCFURLParentDirectoryURLKey.value; + late final _CFPreferencesAppValueIsForcedPtr = + _lookup>( + 'CFPreferencesAppValueIsForced'); + late final _CFPreferencesAppValueIsForced = _CFPreferencesAppValueIsForcedPtr + .asFunction(); - set kCFURLParentDirectoryURLKey(CFStringRef value) => - _kCFURLParentDirectoryURLKey.value = value; + int CFURLGetTypeID() { + return _CFURLGetTypeID(); + } - late final ffi.Pointer _kCFURLVolumeURLKey = - _lookup('kCFURLVolumeURLKey'); + late final _CFURLGetTypeIDPtr = + _lookup>('CFURLGetTypeID'); + late final _CFURLGetTypeID = _CFURLGetTypeIDPtr.asFunction(); - CFStringRef get kCFURLVolumeURLKey => _kCFURLVolumeURLKey.value; + CFURLRef CFURLCreateWithBytes( + CFAllocatorRef allocator, + ffi.Pointer URLBytes, + int length, + int encoding, + CFURLRef baseURL, + ) { + return _CFURLCreateWithBytes( + allocator, + URLBytes, + length, + encoding, + baseURL, + ); + } - set kCFURLVolumeURLKey(CFStringRef value) => - _kCFURLVolumeURLKey.value = value; + late final _CFURLCreateWithBytesPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFStringEncoding, CFURLRef)>>('CFURLCreateWithBytes'); + late final _CFURLCreateWithBytes = _CFURLCreateWithBytesPtr.asFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); - late final ffi.Pointer _kCFURLTypeIdentifierKey = - _lookup('kCFURLTypeIdentifierKey'); + CFDataRef CFURLCreateData( + CFAllocatorRef allocator, + CFURLRef url, + int encoding, + int escapeWhitespace, + ) { + return _CFURLCreateData( + allocator, + url, + encoding, + escapeWhitespace, + ); + } - CFStringRef get kCFURLTypeIdentifierKey => _kCFURLTypeIdentifierKey.value; + late final _CFURLCreateDataPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, CFStringEncoding, + Boolean)>>('CFURLCreateData'); + late final _CFURLCreateData = _CFURLCreateDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, int, int)>(); - set kCFURLTypeIdentifierKey(CFStringRef value) => - _kCFURLTypeIdentifierKey.value = value; + CFURLRef CFURLCreateWithString( + CFAllocatorRef allocator, + CFStringRef URLString, + CFURLRef baseURL, + ) { + return _CFURLCreateWithString( + allocator, + URLString, + baseURL, + ); + } - late final ffi.Pointer _kCFURLLocalizedTypeDescriptionKey = - _lookup('kCFURLLocalizedTypeDescriptionKey'); + late final _CFURLCreateWithStringPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( + CFAllocatorRef, CFStringRef, CFURLRef)>>('CFURLCreateWithString'); + late final _CFURLCreateWithString = _CFURLCreateWithStringPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, CFURLRef)>(); - CFStringRef get kCFURLLocalizedTypeDescriptionKey => - _kCFURLLocalizedTypeDescriptionKey.value; + CFURLRef CFURLCreateAbsoluteURLWithBytes( + CFAllocatorRef alloc, + ffi.Pointer relativeURLBytes, + int length, + int encoding, + CFURLRef baseURL, + int useCompatibilityMode, + ) { + return _CFURLCreateAbsoluteURLWithBytes( + alloc, + relativeURLBytes, + length, + encoding, + baseURL, + useCompatibilityMode, + ); + } - set kCFURLLocalizedTypeDescriptionKey(CFStringRef value) => - _kCFURLLocalizedTypeDescriptionKey.value = value; + late final _CFURLCreateAbsoluteURLWithBytesPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( + CFAllocatorRef, + ffi.Pointer, + CFIndex, + CFStringEncoding, + CFURLRef, + Boolean)>>('CFURLCreateAbsoluteURLWithBytes'); + late final _CFURLCreateAbsoluteURLWithBytes = + _CFURLCreateAbsoluteURLWithBytesPtr.asFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer, int, int, CFURLRef, int)>(); - late final ffi.Pointer _kCFURLLabelNumberKey = - _lookup('kCFURLLabelNumberKey'); + CFURLRef CFURLCreateWithFileSystemPath( + CFAllocatorRef allocator, + CFStringRef filePath, + int pathStyle, + int isDirectory, + ) { + return _CFURLCreateWithFileSystemPath( + allocator, + filePath, + pathStyle, + isDirectory, + ); + } - CFStringRef get kCFURLLabelNumberKey => _kCFURLLabelNumberKey.value; + late final _CFURLCreateWithFileSystemPathPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, + Boolean)>>('CFURLCreateWithFileSystemPath'); + late final _CFURLCreateWithFileSystemPath = _CFURLCreateWithFileSystemPathPtr + .asFunction(); - set kCFURLLabelNumberKey(CFStringRef value) => - _kCFURLLabelNumberKey.value = value; + CFURLRef CFURLCreateFromFileSystemRepresentation( + CFAllocatorRef allocator, + ffi.Pointer buffer, + int bufLen, + int isDirectory, + ) { + return _CFURLCreateFromFileSystemRepresentation( + allocator, + buffer, + bufLen, + isDirectory, + ); + } - late final ffi.Pointer _kCFURLLabelColorKey = - _lookup('kCFURLLabelColorKey'); + late final _CFURLCreateFromFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + Boolean)>>('CFURLCreateFromFileSystemRepresentation'); + late final _CFURLCreateFromFileSystemRepresentation = + _CFURLCreateFromFileSystemRepresentationPtr.asFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, int, int)>(); - CFStringRef get kCFURLLabelColorKey => _kCFURLLabelColorKey.value; + CFURLRef CFURLCreateWithFileSystemPathRelativeToBase( + CFAllocatorRef allocator, + CFStringRef filePath, + int pathStyle, + int isDirectory, + CFURLRef baseURL, + ) { + return _CFURLCreateWithFileSystemPathRelativeToBase( + allocator, + filePath, + pathStyle, + isDirectory, + baseURL, + ); + } - set kCFURLLabelColorKey(CFStringRef value) => - _kCFURLLabelColorKey.value = value; + late final _CFURLCreateWithFileSystemPathRelativeToBasePtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, Boolean, + CFURLRef)>>('CFURLCreateWithFileSystemPathRelativeToBase'); + late final _CFURLCreateWithFileSystemPathRelativeToBase = + _CFURLCreateWithFileSystemPathRelativeToBasePtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, int, int, CFURLRef)>(); - late final ffi.Pointer _kCFURLLocalizedLabelKey = - _lookup('kCFURLLocalizedLabelKey'); + CFURLRef CFURLCreateFromFileSystemRepresentationRelativeToBase( + CFAllocatorRef allocator, + ffi.Pointer buffer, + int bufLen, + int isDirectory, + CFURLRef baseURL, + ) { + return _CFURLCreateFromFileSystemRepresentationRelativeToBase( + allocator, + buffer, + bufLen, + isDirectory, + baseURL, + ); + } - CFStringRef get kCFURLLocalizedLabelKey => _kCFURLLocalizedLabelKey.value; + late final _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr = + _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + Boolean, CFURLRef)>>( + 'CFURLCreateFromFileSystemRepresentationRelativeToBase'); + late final _CFURLCreateFromFileSystemRepresentationRelativeToBase = + _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr.asFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); - set kCFURLLocalizedLabelKey(CFStringRef value) => - _kCFURLLocalizedLabelKey.value = value; + int CFURLGetFileSystemRepresentation( + CFURLRef url, + int resolveAgainstBase, + ffi.Pointer buffer, + int maxBufLen, + ) { + return _CFURLGetFileSystemRepresentation( + url, + resolveAgainstBase, + buffer, + maxBufLen, + ); + } - late final ffi.Pointer _kCFURLEffectiveIconKey = - _lookup('kCFURLEffectiveIconKey'); + late final _CFURLGetFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, Boolean, ffi.Pointer, + CFIndex)>>('CFURLGetFileSystemRepresentation'); + late final _CFURLGetFileSystemRepresentation = + _CFURLGetFileSystemRepresentationPtr.asFunction< + int Function(CFURLRef, int, ffi.Pointer, int)>(); - CFStringRef get kCFURLEffectiveIconKey => _kCFURLEffectiveIconKey.value; + CFURLRef CFURLCopyAbsoluteURL( + CFURLRef relativeURL, + ) { + return _CFURLCopyAbsoluteURL( + relativeURL, + ); + } - set kCFURLEffectiveIconKey(CFStringRef value) => - _kCFURLEffectiveIconKey.value = value; + late final _CFURLCopyAbsoluteURLPtr = + _lookup>( + 'CFURLCopyAbsoluteURL'); + late final _CFURLCopyAbsoluteURL = + _CFURLCopyAbsoluteURLPtr.asFunction(); - late final ffi.Pointer _kCFURLCustomIconKey = - _lookup('kCFURLCustomIconKey'); + CFStringRef CFURLGetString( + CFURLRef anURL, + ) { + return _CFURLGetString( + anURL, + ); + } - CFStringRef get kCFURLCustomIconKey => _kCFURLCustomIconKey.value; + late final _CFURLGetStringPtr = + _lookup>( + 'CFURLGetString'); + late final _CFURLGetString = + _CFURLGetStringPtr.asFunction(); - set kCFURLCustomIconKey(CFStringRef value) => - _kCFURLCustomIconKey.value = value; + CFURLRef CFURLGetBaseURL( + CFURLRef anURL, + ) { + return _CFURLGetBaseURL( + anURL, + ); + } - late final ffi.Pointer _kCFURLFileResourceIdentifierKey = - _lookup('kCFURLFileResourceIdentifierKey'); + late final _CFURLGetBaseURLPtr = + _lookup>( + 'CFURLGetBaseURL'); + late final _CFURLGetBaseURL = + _CFURLGetBaseURLPtr.asFunction(); - CFStringRef get kCFURLFileResourceIdentifierKey => - _kCFURLFileResourceIdentifierKey.value; - - set kCFURLFileResourceIdentifierKey(CFStringRef value) => - _kCFURLFileResourceIdentifierKey.value = value; - - late final ffi.Pointer _kCFURLVolumeIdentifierKey = - _lookup('kCFURLVolumeIdentifierKey'); + int CFURLCanBeDecomposed( + CFURLRef anURL, + ) { + return _CFURLCanBeDecomposed( + anURL, + ); + } - CFStringRef get kCFURLVolumeIdentifierKey => _kCFURLVolumeIdentifierKey.value; + late final _CFURLCanBeDecomposedPtr = + _lookup>( + 'CFURLCanBeDecomposed'); + late final _CFURLCanBeDecomposed = + _CFURLCanBeDecomposedPtr.asFunction(); - set kCFURLVolumeIdentifierKey(CFStringRef value) => - _kCFURLVolumeIdentifierKey.value = value; + CFStringRef CFURLCopyScheme( + CFURLRef anURL, + ) { + return _CFURLCopyScheme( + anURL, + ); + } - late final ffi.Pointer _kCFURLPreferredIOBlockSizeKey = - _lookup('kCFURLPreferredIOBlockSizeKey'); + late final _CFURLCopySchemePtr = + _lookup>( + 'CFURLCopyScheme'); + late final _CFURLCopyScheme = + _CFURLCopySchemePtr.asFunction(); - CFStringRef get kCFURLPreferredIOBlockSizeKey => - _kCFURLPreferredIOBlockSizeKey.value; + CFStringRef CFURLCopyNetLocation( + CFURLRef anURL, + ) { + return _CFURLCopyNetLocation( + anURL, + ); + } - set kCFURLPreferredIOBlockSizeKey(CFStringRef value) => - _kCFURLPreferredIOBlockSizeKey.value = value; + late final _CFURLCopyNetLocationPtr = + _lookup>( + 'CFURLCopyNetLocation'); + late final _CFURLCopyNetLocation = + _CFURLCopyNetLocationPtr.asFunction(); - late final ffi.Pointer _kCFURLIsReadableKey = - _lookup('kCFURLIsReadableKey'); + CFStringRef CFURLCopyPath( + CFURLRef anURL, + ) { + return _CFURLCopyPath( + anURL, + ); + } - CFStringRef get kCFURLIsReadableKey => _kCFURLIsReadableKey.value; + late final _CFURLCopyPathPtr = + _lookup>( + 'CFURLCopyPath'); + late final _CFURLCopyPath = + _CFURLCopyPathPtr.asFunction(); - set kCFURLIsReadableKey(CFStringRef value) => - _kCFURLIsReadableKey.value = value; + CFStringRef CFURLCopyStrictPath( + CFURLRef anURL, + ffi.Pointer isAbsolute, + ) { + return _CFURLCopyStrictPath( + anURL, + isAbsolute, + ); + } - late final ffi.Pointer _kCFURLIsWritableKey = - _lookup('kCFURLIsWritableKey'); + late final _CFURLCopyStrictPathPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFURLRef, ffi.Pointer)>>('CFURLCopyStrictPath'); + late final _CFURLCopyStrictPath = _CFURLCopyStrictPathPtr.asFunction< + CFStringRef Function(CFURLRef, ffi.Pointer)>(); - CFStringRef get kCFURLIsWritableKey => _kCFURLIsWritableKey.value; + CFStringRef CFURLCopyFileSystemPath( + CFURLRef anURL, + int pathStyle, + ) { + return _CFURLCopyFileSystemPath( + anURL, + pathStyle, + ); + } - set kCFURLIsWritableKey(CFStringRef value) => - _kCFURLIsWritableKey.value = value; + late final _CFURLCopyFileSystemPathPtr = + _lookup>( + 'CFURLCopyFileSystemPath'); + late final _CFURLCopyFileSystemPath = _CFURLCopyFileSystemPathPtr.asFunction< + CFStringRef Function(CFURLRef, int)>(); - late final ffi.Pointer _kCFURLIsExecutableKey = - _lookup('kCFURLIsExecutableKey'); + int CFURLHasDirectoryPath( + CFURLRef anURL, + ) { + return _CFURLHasDirectoryPath( + anURL, + ); + } - CFStringRef get kCFURLIsExecutableKey => _kCFURLIsExecutableKey.value; + late final _CFURLHasDirectoryPathPtr = + _lookup>( + 'CFURLHasDirectoryPath'); + late final _CFURLHasDirectoryPath = + _CFURLHasDirectoryPathPtr.asFunction(); - set kCFURLIsExecutableKey(CFStringRef value) => - _kCFURLIsExecutableKey.value = value; + CFStringRef CFURLCopyResourceSpecifier( + CFURLRef anURL, + ) { + return _CFURLCopyResourceSpecifier( + anURL, + ); + } - late final ffi.Pointer _kCFURLFileSecurityKey = - _lookup('kCFURLFileSecurityKey'); + late final _CFURLCopyResourceSpecifierPtr = + _lookup>( + 'CFURLCopyResourceSpecifier'); + late final _CFURLCopyResourceSpecifier = _CFURLCopyResourceSpecifierPtr + .asFunction(); - CFStringRef get kCFURLFileSecurityKey => _kCFURLFileSecurityKey.value; + CFStringRef CFURLCopyHostName( + CFURLRef anURL, + ) { + return _CFURLCopyHostName( + anURL, + ); + } - set kCFURLFileSecurityKey(CFStringRef value) => - _kCFURLFileSecurityKey.value = value; + late final _CFURLCopyHostNamePtr = + _lookup>( + 'CFURLCopyHostName'); + late final _CFURLCopyHostName = + _CFURLCopyHostNamePtr.asFunction(); - late final ffi.Pointer _kCFURLIsExcludedFromBackupKey = - _lookup('kCFURLIsExcludedFromBackupKey'); + int CFURLGetPortNumber( + CFURLRef anURL, + ) { + return _CFURLGetPortNumber( + anURL, + ); + } - CFStringRef get kCFURLIsExcludedFromBackupKey => - _kCFURLIsExcludedFromBackupKey.value; + late final _CFURLGetPortNumberPtr = + _lookup>( + 'CFURLGetPortNumber'); + late final _CFURLGetPortNumber = + _CFURLGetPortNumberPtr.asFunction(); - set kCFURLIsExcludedFromBackupKey(CFStringRef value) => - _kCFURLIsExcludedFromBackupKey.value = value; + CFStringRef CFURLCopyUserName( + CFURLRef anURL, + ) { + return _CFURLCopyUserName( + anURL, + ); + } - late final ffi.Pointer _kCFURLTagNamesKey = - _lookup('kCFURLTagNamesKey'); + late final _CFURLCopyUserNamePtr = + _lookup>( + 'CFURLCopyUserName'); + late final _CFURLCopyUserName = + _CFURLCopyUserNamePtr.asFunction(); - CFStringRef get kCFURLTagNamesKey => _kCFURLTagNamesKey.value; + CFStringRef CFURLCopyPassword( + CFURLRef anURL, + ) { + return _CFURLCopyPassword( + anURL, + ); + } - set kCFURLTagNamesKey(CFStringRef value) => _kCFURLTagNamesKey.value = value; + late final _CFURLCopyPasswordPtr = + _lookup>( + 'CFURLCopyPassword'); + late final _CFURLCopyPassword = + _CFURLCopyPasswordPtr.asFunction(); - late final ffi.Pointer _kCFURLPathKey = - _lookup('kCFURLPathKey'); + CFStringRef CFURLCopyParameterString( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCopyParameterString( + anURL, + charactersToLeaveEscaped, + ); + } - CFStringRef get kCFURLPathKey => _kCFURLPathKey.value; + late final _CFURLCopyParameterStringPtr = + _lookup>( + 'CFURLCopyParameterString'); + late final _CFURLCopyParameterString = _CFURLCopyParameterStringPtr + .asFunction(); - set kCFURLPathKey(CFStringRef value) => _kCFURLPathKey.value = value; + CFStringRef CFURLCopyQueryString( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCopyQueryString( + anURL, + charactersToLeaveEscaped, + ); + } - late final ffi.Pointer _kCFURLCanonicalPathKey = - _lookup('kCFURLCanonicalPathKey'); + late final _CFURLCopyQueryStringPtr = + _lookup>( + 'CFURLCopyQueryString'); + late final _CFURLCopyQueryString = _CFURLCopyQueryStringPtr.asFunction< + CFStringRef Function(CFURLRef, CFStringRef)>(); - CFStringRef get kCFURLCanonicalPathKey => _kCFURLCanonicalPathKey.value; + CFStringRef CFURLCopyFragment( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCopyFragment( + anURL, + charactersToLeaveEscaped, + ); + } - set kCFURLCanonicalPathKey(CFStringRef value) => - _kCFURLCanonicalPathKey.value = value; + late final _CFURLCopyFragmentPtr = + _lookup>( + 'CFURLCopyFragment'); + late final _CFURLCopyFragment = _CFURLCopyFragmentPtr.asFunction< + CFStringRef Function(CFURLRef, CFStringRef)>(); - late final ffi.Pointer _kCFURLIsMountTriggerKey = - _lookup('kCFURLIsMountTriggerKey'); + CFStringRef CFURLCopyLastPathComponent( + CFURLRef url, + ) { + return _CFURLCopyLastPathComponent( + url, + ); + } - CFStringRef get kCFURLIsMountTriggerKey => _kCFURLIsMountTriggerKey.value; + late final _CFURLCopyLastPathComponentPtr = + _lookup>( + 'CFURLCopyLastPathComponent'); + late final _CFURLCopyLastPathComponent = _CFURLCopyLastPathComponentPtr + .asFunction(); - set kCFURLIsMountTriggerKey(CFStringRef value) => - _kCFURLIsMountTriggerKey.value = value; + CFStringRef CFURLCopyPathExtension( + CFURLRef url, + ) { + return _CFURLCopyPathExtension( + url, + ); + } - late final ffi.Pointer _kCFURLGenerationIdentifierKey = - _lookup('kCFURLGenerationIdentifierKey'); + late final _CFURLCopyPathExtensionPtr = + _lookup>( + 'CFURLCopyPathExtension'); + late final _CFURLCopyPathExtension = + _CFURLCopyPathExtensionPtr.asFunction(); - CFStringRef get kCFURLGenerationIdentifierKey => - _kCFURLGenerationIdentifierKey.value; + CFURLRef CFURLCreateCopyAppendingPathComponent( + CFAllocatorRef allocator, + CFURLRef url, + CFStringRef pathComponent, + int isDirectory, + ) { + return _CFURLCreateCopyAppendingPathComponent( + allocator, + url, + pathComponent, + isDirectory, + ); + } - set kCFURLGenerationIdentifierKey(CFStringRef value) => - _kCFURLGenerationIdentifierKey.value = value; + late final _CFURLCreateCopyAppendingPathComponentPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, + Boolean)>>('CFURLCreateCopyAppendingPathComponent'); + late final _CFURLCreateCopyAppendingPathComponent = + _CFURLCreateCopyAppendingPathComponentPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, int)>(); - late final ffi.Pointer _kCFURLDocumentIdentifierKey = - _lookup('kCFURLDocumentIdentifierKey'); + CFURLRef CFURLCreateCopyDeletingLastPathComponent( + CFAllocatorRef allocator, + CFURLRef url, + ) { + return _CFURLCreateCopyDeletingLastPathComponent( + allocator, + url, + ); + } - CFStringRef get kCFURLDocumentIdentifierKey => - _kCFURLDocumentIdentifierKey.value; + late final _CFURLCreateCopyDeletingLastPathComponentPtr = + _lookup>( + 'CFURLCreateCopyDeletingLastPathComponent'); + late final _CFURLCreateCopyDeletingLastPathComponent = + _CFURLCreateCopyDeletingLastPathComponentPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef)>(); - set kCFURLDocumentIdentifierKey(CFStringRef value) => - _kCFURLDocumentIdentifierKey.value = value; + CFURLRef CFURLCreateCopyAppendingPathExtension( + CFAllocatorRef allocator, + CFURLRef url, + CFStringRef extension1, + ) { + return _CFURLCreateCopyAppendingPathExtension( + allocator, + url, + extension1, + ); + } - late final ffi.Pointer _kCFURLAddedToDirectoryDateKey = - _lookup('kCFURLAddedToDirectoryDateKey'); + late final _CFURLCreateCopyAppendingPathExtensionPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + CFStringRef)>>('CFURLCreateCopyAppendingPathExtension'); + late final _CFURLCreateCopyAppendingPathExtension = + _CFURLCreateCopyAppendingPathExtensionPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); - CFStringRef get kCFURLAddedToDirectoryDateKey => - _kCFURLAddedToDirectoryDateKey.value; + CFURLRef CFURLCreateCopyDeletingPathExtension( + CFAllocatorRef allocator, + CFURLRef url, + ) { + return _CFURLCreateCopyDeletingPathExtension( + allocator, + url, + ); + } - set kCFURLAddedToDirectoryDateKey(CFStringRef value) => - _kCFURLAddedToDirectoryDateKey.value = value; + late final _CFURLCreateCopyDeletingPathExtensionPtr = + _lookup>( + 'CFURLCreateCopyDeletingPathExtension'); + late final _CFURLCreateCopyDeletingPathExtension = + _CFURLCreateCopyDeletingPathExtensionPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef)>(); - late final ffi.Pointer _kCFURLQuarantinePropertiesKey = - _lookup('kCFURLQuarantinePropertiesKey'); + int CFURLGetBytes( + CFURLRef url, + ffi.Pointer buffer, + int bufferLength, + ) { + return _CFURLGetBytes( + url, + buffer, + bufferLength, + ); + } - CFStringRef get kCFURLQuarantinePropertiesKey => - _kCFURLQuarantinePropertiesKey.value; + late final _CFURLGetBytesPtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFURLRef, ffi.Pointer, CFIndex)>>('CFURLGetBytes'); + late final _CFURLGetBytes = _CFURLGetBytesPtr.asFunction< + int Function(CFURLRef, ffi.Pointer, int)>(); - set kCFURLQuarantinePropertiesKey(CFStringRef value) => - _kCFURLQuarantinePropertiesKey.value = value; + CFRange CFURLGetByteRangeForComponent( + CFURLRef url, + int component, + ffi.Pointer rangeIncludingSeparators, + ) { + return _CFURLGetByteRangeForComponent( + url, + component, + rangeIncludingSeparators, + ); + } - late final ffi.Pointer _kCFURLFileResourceTypeKey = - _lookup('kCFURLFileResourceTypeKey'); + late final _CFURLGetByteRangeForComponentPtr = _lookup< + ffi.NativeFunction< + CFRange Function(CFURLRef, ffi.Int32, + ffi.Pointer)>>('CFURLGetByteRangeForComponent'); + late final _CFURLGetByteRangeForComponent = _CFURLGetByteRangeForComponentPtr + .asFunction)>(); - CFStringRef get kCFURLFileResourceTypeKey => _kCFURLFileResourceTypeKey.value; + CFStringRef CFURLCreateStringByReplacingPercentEscapes( + CFAllocatorRef allocator, + CFStringRef originalString, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCreateStringByReplacingPercentEscapes( + allocator, + originalString, + charactersToLeaveEscaped, + ); + } - set kCFURLFileResourceTypeKey(CFStringRef value) => - _kCFURLFileResourceTypeKey.value = value; + late final _CFURLCreateStringByReplacingPercentEscapesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFStringRef)>>('CFURLCreateStringByReplacingPercentEscapes'); + late final _CFURLCreateStringByReplacingPercentEscapes = + _CFURLCreateStringByReplacingPercentEscapesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); - late final ffi.Pointer _kCFURLFileResourceTypeNamedPipe = - _lookup('kCFURLFileResourceTypeNamedPipe'); + CFStringRef CFURLCreateStringByReplacingPercentEscapesUsingEncoding( + CFAllocatorRef allocator, + CFStringRef origString, + CFStringRef charsToLeaveEscaped, + int encoding, + ) { + return _CFURLCreateStringByReplacingPercentEscapesUsingEncoding( + allocator, + origString, + charsToLeaveEscaped, + encoding, + ); + } - CFStringRef get kCFURLFileResourceTypeNamedPipe => - _kCFURLFileResourceTypeNamedPipe.value; + late final _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr = + _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef, + CFStringEncoding)>>( + 'CFURLCreateStringByReplacingPercentEscapesUsingEncoding'); + late final _CFURLCreateStringByReplacingPercentEscapesUsingEncoding = + _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef, CFStringRef, int)>(); - set kCFURLFileResourceTypeNamedPipe(CFStringRef value) => - _kCFURLFileResourceTypeNamedPipe.value = value; + CFStringRef CFURLCreateStringByAddingPercentEscapes( + CFAllocatorRef allocator, + CFStringRef originalString, + CFStringRef charactersToLeaveUnescaped, + CFStringRef legalURLCharactersToBeEscaped, + int encoding, + ) { + return _CFURLCreateStringByAddingPercentEscapes( + allocator, + originalString, + charactersToLeaveUnescaped, + legalURLCharactersToBeEscaped, + encoding, + ); + } - late final ffi.Pointer _kCFURLFileResourceTypeCharacterSpecial = - _lookup('kCFURLFileResourceTypeCharacterSpecial'); + late final _CFURLCreateStringByAddingPercentEscapesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringEncoding)>>('CFURLCreateStringByAddingPercentEscapes'); + late final _CFURLCreateStringByAddingPercentEscapes = + _CFURLCreateStringByAddingPercentEscapesPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef, CFStringRef, CFStringRef, int)>(); - CFStringRef get kCFURLFileResourceTypeCharacterSpecial => - _kCFURLFileResourceTypeCharacterSpecial.value; + int CFURLIsFileReferenceURL( + CFURLRef url, + ) { + return _CFURLIsFileReferenceURL( + url, + ); + } - set kCFURLFileResourceTypeCharacterSpecial(CFStringRef value) => - _kCFURLFileResourceTypeCharacterSpecial.value = value; + late final _CFURLIsFileReferenceURLPtr = + _lookup>( + 'CFURLIsFileReferenceURL'); + late final _CFURLIsFileReferenceURL = + _CFURLIsFileReferenceURLPtr.asFunction(); - late final ffi.Pointer _kCFURLFileResourceTypeDirectory = - _lookup('kCFURLFileResourceTypeDirectory'); + CFURLRef CFURLCreateFileReferenceURL( + CFAllocatorRef allocator, + CFURLRef url, + ffi.Pointer error, + ) { + return _CFURLCreateFileReferenceURL( + allocator, + url, + error, + ); + } - CFStringRef get kCFURLFileResourceTypeDirectory => - _kCFURLFileResourceTypeDirectory.value; - - set kCFURLFileResourceTypeDirectory(CFStringRef value) => - _kCFURLFileResourceTypeDirectory.value = value; + late final _CFURLCreateFileReferenceURLPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + ffi.Pointer)>>('CFURLCreateFileReferenceURL'); + late final _CFURLCreateFileReferenceURL = + _CFURLCreateFileReferenceURLPtr.asFunction< + CFURLRef Function( + CFAllocatorRef, CFURLRef, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLFileResourceTypeBlockSpecial = - _lookup('kCFURLFileResourceTypeBlockSpecial'); + CFURLRef CFURLCreateFilePathURL( + CFAllocatorRef allocator, + CFURLRef url, + ffi.Pointer error, + ) { + return _CFURLCreateFilePathURL( + allocator, + url, + error, + ); + } - CFStringRef get kCFURLFileResourceTypeBlockSpecial => - _kCFURLFileResourceTypeBlockSpecial.value; + late final _CFURLCreateFilePathURLPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + ffi.Pointer)>>('CFURLCreateFilePathURL'); + late final _CFURLCreateFilePathURL = _CFURLCreateFilePathURLPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, ffi.Pointer)>(); - set kCFURLFileResourceTypeBlockSpecial(CFStringRef value) => - _kCFURLFileResourceTypeBlockSpecial.value = value; + CFURLRef CFURLCreateFromFSRef( + CFAllocatorRef allocator, + ffi.Pointer fsRef, + ) { + return _CFURLCreateFromFSRef( + allocator, + fsRef, + ); + } - late final ffi.Pointer _kCFURLFileResourceTypeRegular = - _lookup('kCFURLFileResourceTypeRegular'); + late final _CFURLCreateFromFSRefPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer)>>('CFURLCreateFromFSRef'); + late final _CFURLCreateFromFSRef = _CFURLCreateFromFSRefPtr.asFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer)>(); - CFStringRef get kCFURLFileResourceTypeRegular => - _kCFURLFileResourceTypeRegular.value; + int CFURLGetFSRef( + CFURLRef url, + ffi.Pointer fsRef, + ) { + return _CFURLGetFSRef( + url, + fsRef, + ); + } - set kCFURLFileResourceTypeRegular(CFStringRef value) => - _kCFURLFileResourceTypeRegular.value = value; + late final _CFURLGetFSRefPtr = _lookup< + ffi.NativeFunction)>>( + 'CFURLGetFSRef'); + late final _CFURLGetFSRef = _CFURLGetFSRefPtr.asFunction< + int Function(CFURLRef, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLFileResourceTypeSymbolicLink = - _lookup('kCFURLFileResourceTypeSymbolicLink'); + int CFURLCopyResourcePropertyForKey( + CFURLRef url, + CFStringRef key, + ffi.Pointer propertyValueTypeRefPtr, + ffi.Pointer error, + ) { + return _CFURLCopyResourcePropertyForKey( + url, + key, + propertyValueTypeRefPtr, + error, + ); + } - CFStringRef get kCFURLFileResourceTypeSymbolicLink => - _kCFURLFileResourceTypeSymbolicLink.value; + late final _CFURLCopyResourcePropertyForKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFStringRef, ffi.Pointer, + ffi.Pointer)>>('CFURLCopyResourcePropertyForKey'); + late final _CFURLCopyResourcePropertyForKey = + _CFURLCopyResourcePropertyForKeyPtr.asFunction< + int Function(CFURLRef, CFStringRef, ffi.Pointer, + ffi.Pointer)>(); - set kCFURLFileResourceTypeSymbolicLink(CFStringRef value) => - _kCFURLFileResourceTypeSymbolicLink.value = value; + CFDictionaryRef CFURLCopyResourcePropertiesForKeys( + CFURLRef url, + CFArrayRef keys, + ffi.Pointer error, + ) { + return _CFURLCopyResourcePropertiesForKeys( + url, + keys, + error, + ); + } - late final ffi.Pointer _kCFURLFileResourceTypeSocket = - _lookup('kCFURLFileResourceTypeSocket'); + late final _CFURLCopyResourcePropertiesForKeysPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFURLRef, CFArrayRef, + ffi.Pointer)>>('CFURLCopyResourcePropertiesForKeys'); + late final _CFURLCopyResourcePropertiesForKeys = + _CFURLCopyResourcePropertiesForKeysPtr.asFunction< + CFDictionaryRef Function( + CFURLRef, CFArrayRef, ffi.Pointer)>(); - CFStringRef get kCFURLFileResourceTypeSocket => - _kCFURLFileResourceTypeSocket.value; + int CFURLSetResourcePropertyForKey( + CFURLRef url, + CFStringRef key, + CFTypeRef propertyValue, + ffi.Pointer error, + ) { + return _CFURLSetResourcePropertyForKey( + url, + key, + propertyValue, + error, + ); + } - set kCFURLFileResourceTypeSocket(CFStringRef value) => - _kCFURLFileResourceTypeSocket.value = value; + late final _CFURLSetResourcePropertyForKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFStringRef, CFTypeRef, + ffi.Pointer)>>('CFURLSetResourcePropertyForKey'); + late final _CFURLSetResourcePropertyForKey = + _CFURLSetResourcePropertyForKeyPtr.asFunction< + int Function( + CFURLRef, CFStringRef, CFTypeRef, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLFileResourceTypeUnknown = - _lookup('kCFURLFileResourceTypeUnknown'); + int CFURLSetResourcePropertiesForKeys( + CFURLRef url, + CFDictionaryRef keyedPropertyValues, + ffi.Pointer error, + ) { + return _CFURLSetResourcePropertiesForKeys( + url, + keyedPropertyValues, + error, + ); + } - CFStringRef get kCFURLFileResourceTypeUnknown => - _kCFURLFileResourceTypeUnknown.value; + late final _CFURLSetResourcePropertiesForKeysPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFDictionaryRef, + ffi.Pointer)>>('CFURLSetResourcePropertiesForKeys'); + late final _CFURLSetResourcePropertiesForKeys = + _CFURLSetResourcePropertiesForKeysPtr.asFunction< + int Function(CFURLRef, CFDictionaryRef, ffi.Pointer)>(); - set kCFURLFileResourceTypeUnknown(CFStringRef value) => - _kCFURLFileResourceTypeUnknown.value = value; + late final ffi.Pointer _kCFURLKeysOfUnsetValuesKey = + _lookup('kCFURLKeysOfUnsetValuesKey'); - late final ffi.Pointer _kCFURLFileSizeKey = - _lookup('kCFURLFileSizeKey'); + CFStringRef get kCFURLKeysOfUnsetValuesKey => + _kCFURLKeysOfUnsetValuesKey.value; - CFStringRef get kCFURLFileSizeKey => _kCFURLFileSizeKey.value; + set kCFURLKeysOfUnsetValuesKey(CFStringRef value) => + _kCFURLKeysOfUnsetValuesKey.value = value; - set kCFURLFileSizeKey(CFStringRef value) => _kCFURLFileSizeKey.value = value; + void CFURLClearResourcePropertyCacheForKey( + CFURLRef url, + CFStringRef key, + ) { + return _CFURLClearResourcePropertyCacheForKey( + url, + key, + ); + } - late final ffi.Pointer _kCFURLFileAllocatedSizeKey = - _lookup('kCFURLFileAllocatedSizeKey'); + late final _CFURLClearResourcePropertyCacheForKeyPtr = + _lookup>( + 'CFURLClearResourcePropertyCacheForKey'); + late final _CFURLClearResourcePropertyCacheForKey = + _CFURLClearResourcePropertyCacheForKeyPtr.asFunction< + void Function(CFURLRef, CFStringRef)>(); - CFStringRef get kCFURLFileAllocatedSizeKey => - _kCFURLFileAllocatedSizeKey.value; + void CFURLClearResourcePropertyCache( + CFURLRef url, + ) { + return _CFURLClearResourcePropertyCache( + url, + ); + } - set kCFURLFileAllocatedSizeKey(CFStringRef value) => - _kCFURLFileAllocatedSizeKey.value = value; + late final _CFURLClearResourcePropertyCachePtr = + _lookup>( + 'CFURLClearResourcePropertyCache'); + late final _CFURLClearResourcePropertyCache = + _CFURLClearResourcePropertyCachePtr.asFunction(); - late final ffi.Pointer _kCFURLTotalFileSizeKey = - _lookup('kCFURLTotalFileSizeKey'); + void CFURLSetTemporaryResourcePropertyForKey( + CFURLRef url, + CFStringRef key, + CFTypeRef propertyValue, + ) { + return _CFURLSetTemporaryResourcePropertyForKey( + url, + key, + propertyValue, + ); + } - CFStringRef get kCFURLTotalFileSizeKey => _kCFURLTotalFileSizeKey.value; + late final _CFURLSetTemporaryResourcePropertyForKeyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFURLRef, CFStringRef, + CFTypeRef)>>('CFURLSetTemporaryResourcePropertyForKey'); + late final _CFURLSetTemporaryResourcePropertyForKey = + _CFURLSetTemporaryResourcePropertyForKeyPtr.asFunction< + void Function(CFURLRef, CFStringRef, CFTypeRef)>(); - set kCFURLTotalFileSizeKey(CFStringRef value) => - _kCFURLTotalFileSizeKey.value = value; + int CFURLResourceIsReachable( + CFURLRef url, + ffi.Pointer error, + ) { + return _CFURLResourceIsReachable( + url, + error, + ); + } - late final ffi.Pointer _kCFURLTotalFileAllocatedSizeKey = - _lookup('kCFURLTotalFileAllocatedSizeKey'); + late final _CFURLResourceIsReachablePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFURLRef, ffi.Pointer)>>('CFURLResourceIsReachable'); + late final _CFURLResourceIsReachable = _CFURLResourceIsReachablePtr + .asFunction)>(); - CFStringRef get kCFURLTotalFileAllocatedSizeKey => - _kCFURLTotalFileAllocatedSizeKey.value; + late final ffi.Pointer _kCFURLNameKey = + _lookup('kCFURLNameKey'); - set kCFURLTotalFileAllocatedSizeKey(CFStringRef value) => - _kCFURLTotalFileAllocatedSizeKey.value = value; + CFStringRef get kCFURLNameKey => _kCFURLNameKey.value; - late final ffi.Pointer _kCFURLIsAliasFileKey = - _lookup('kCFURLIsAliasFileKey'); + set kCFURLNameKey(CFStringRef value) => _kCFURLNameKey.value = value; - CFStringRef get kCFURLIsAliasFileKey => _kCFURLIsAliasFileKey.value; + late final ffi.Pointer _kCFURLLocalizedNameKey = + _lookup('kCFURLLocalizedNameKey'); - set kCFURLIsAliasFileKey(CFStringRef value) => - _kCFURLIsAliasFileKey.value = value; + CFStringRef get kCFURLLocalizedNameKey => _kCFURLLocalizedNameKey.value; - late final ffi.Pointer _kCFURLFileProtectionKey = - _lookup('kCFURLFileProtectionKey'); + set kCFURLLocalizedNameKey(CFStringRef value) => + _kCFURLLocalizedNameKey.value = value; - CFStringRef get kCFURLFileProtectionKey => _kCFURLFileProtectionKey.value; + late final ffi.Pointer _kCFURLIsRegularFileKey = + _lookup('kCFURLIsRegularFileKey'); - set kCFURLFileProtectionKey(CFStringRef value) => - _kCFURLFileProtectionKey.value = value; + CFStringRef get kCFURLIsRegularFileKey => _kCFURLIsRegularFileKey.value; - late final ffi.Pointer _kCFURLFileProtectionNone = - _lookup('kCFURLFileProtectionNone'); + set kCFURLIsRegularFileKey(CFStringRef value) => + _kCFURLIsRegularFileKey.value = value; - CFStringRef get kCFURLFileProtectionNone => _kCFURLFileProtectionNone.value; + late final ffi.Pointer _kCFURLIsDirectoryKey = + _lookup('kCFURLIsDirectoryKey'); - set kCFURLFileProtectionNone(CFStringRef value) => - _kCFURLFileProtectionNone.value = value; + CFStringRef get kCFURLIsDirectoryKey => _kCFURLIsDirectoryKey.value; - late final ffi.Pointer _kCFURLFileProtectionComplete = - _lookup('kCFURLFileProtectionComplete'); + set kCFURLIsDirectoryKey(CFStringRef value) => + _kCFURLIsDirectoryKey.value = value; - CFStringRef get kCFURLFileProtectionComplete => - _kCFURLFileProtectionComplete.value; + late final ffi.Pointer _kCFURLIsSymbolicLinkKey = + _lookup('kCFURLIsSymbolicLinkKey'); - set kCFURLFileProtectionComplete(CFStringRef value) => - _kCFURLFileProtectionComplete.value = value; + CFStringRef get kCFURLIsSymbolicLinkKey => _kCFURLIsSymbolicLinkKey.value; - late final ffi.Pointer _kCFURLFileProtectionCompleteUnlessOpen = - _lookup('kCFURLFileProtectionCompleteUnlessOpen'); + set kCFURLIsSymbolicLinkKey(CFStringRef value) => + _kCFURLIsSymbolicLinkKey.value = value; - CFStringRef get kCFURLFileProtectionCompleteUnlessOpen => - _kCFURLFileProtectionCompleteUnlessOpen.value; + late final ffi.Pointer _kCFURLIsVolumeKey = + _lookup('kCFURLIsVolumeKey'); - set kCFURLFileProtectionCompleteUnlessOpen(CFStringRef value) => - _kCFURLFileProtectionCompleteUnlessOpen.value = value; + CFStringRef get kCFURLIsVolumeKey => _kCFURLIsVolumeKey.value; - late final ffi.Pointer - _kCFURLFileProtectionCompleteUntilFirstUserAuthentication = - _lookup( - 'kCFURLFileProtectionCompleteUntilFirstUserAuthentication'); + set kCFURLIsVolumeKey(CFStringRef value) => _kCFURLIsVolumeKey.value = value; - CFStringRef get kCFURLFileProtectionCompleteUntilFirstUserAuthentication => - _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value; + late final ffi.Pointer _kCFURLIsPackageKey = + _lookup('kCFURLIsPackageKey'); - set kCFURLFileProtectionCompleteUntilFirstUserAuthentication( - CFStringRef value) => - _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; + CFStringRef get kCFURLIsPackageKey => _kCFURLIsPackageKey.value; - late final ffi.Pointer - _kCFURLVolumeLocalizedFormatDescriptionKey = - _lookup('kCFURLVolumeLocalizedFormatDescriptionKey'); + set kCFURLIsPackageKey(CFStringRef value) => + _kCFURLIsPackageKey.value = value; - CFStringRef get kCFURLVolumeLocalizedFormatDescriptionKey => - _kCFURLVolumeLocalizedFormatDescriptionKey.value; + late final ffi.Pointer _kCFURLIsApplicationKey = + _lookup('kCFURLIsApplicationKey'); - set kCFURLVolumeLocalizedFormatDescriptionKey(CFStringRef value) => - _kCFURLVolumeLocalizedFormatDescriptionKey.value = value; + CFStringRef get kCFURLIsApplicationKey => _kCFURLIsApplicationKey.value; - late final ffi.Pointer _kCFURLVolumeTotalCapacityKey = - _lookup('kCFURLVolumeTotalCapacityKey'); + set kCFURLIsApplicationKey(CFStringRef value) => + _kCFURLIsApplicationKey.value = value; - CFStringRef get kCFURLVolumeTotalCapacityKey => - _kCFURLVolumeTotalCapacityKey.value; + late final ffi.Pointer _kCFURLApplicationIsScriptableKey = + _lookup('kCFURLApplicationIsScriptableKey'); - set kCFURLVolumeTotalCapacityKey(CFStringRef value) => - _kCFURLVolumeTotalCapacityKey.value = value; + CFStringRef get kCFURLApplicationIsScriptableKey => + _kCFURLApplicationIsScriptableKey.value; - late final ffi.Pointer _kCFURLVolumeAvailableCapacityKey = - _lookup('kCFURLVolumeAvailableCapacityKey'); + set kCFURLApplicationIsScriptableKey(CFStringRef value) => + _kCFURLApplicationIsScriptableKey.value = value; - CFStringRef get kCFURLVolumeAvailableCapacityKey => - _kCFURLVolumeAvailableCapacityKey.value; + late final ffi.Pointer _kCFURLIsSystemImmutableKey = + _lookup('kCFURLIsSystemImmutableKey'); - set kCFURLVolumeAvailableCapacityKey(CFStringRef value) => - _kCFURLVolumeAvailableCapacityKey.value = value; + CFStringRef get kCFURLIsSystemImmutableKey => + _kCFURLIsSystemImmutableKey.value; - late final ffi.Pointer - _kCFURLVolumeAvailableCapacityForImportantUsageKey = - _lookup('kCFURLVolumeAvailableCapacityForImportantUsageKey'); + set kCFURLIsSystemImmutableKey(CFStringRef value) => + _kCFURLIsSystemImmutableKey.value = value; - CFStringRef get kCFURLVolumeAvailableCapacityForImportantUsageKey => - _kCFURLVolumeAvailableCapacityForImportantUsageKey.value; + late final ffi.Pointer _kCFURLIsUserImmutableKey = + _lookup('kCFURLIsUserImmutableKey'); - set kCFURLVolumeAvailableCapacityForImportantUsageKey(CFStringRef value) => - _kCFURLVolumeAvailableCapacityForImportantUsageKey.value = value; + CFStringRef get kCFURLIsUserImmutableKey => _kCFURLIsUserImmutableKey.value; - late final ffi.Pointer - _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey = - _lookup( - 'kCFURLVolumeAvailableCapacityForOpportunisticUsageKey'); + set kCFURLIsUserImmutableKey(CFStringRef value) => + _kCFURLIsUserImmutableKey.value = value; - CFStringRef get kCFURLVolumeAvailableCapacityForOpportunisticUsageKey => - _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value; + late final ffi.Pointer _kCFURLIsHiddenKey = + _lookup('kCFURLIsHiddenKey'); - set kCFURLVolumeAvailableCapacityForOpportunisticUsageKey( - CFStringRef value) => - _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; + CFStringRef get kCFURLIsHiddenKey => _kCFURLIsHiddenKey.value; - late final ffi.Pointer _kCFURLVolumeResourceCountKey = - _lookup('kCFURLVolumeResourceCountKey'); + set kCFURLIsHiddenKey(CFStringRef value) => _kCFURLIsHiddenKey.value = value; - CFStringRef get kCFURLVolumeResourceCountKey => - _kCFURLVolumeResourceCountKey.value; + late final ffi.Pointer _kCFURLHasHiddenExtensionKey = + _lookup('kCFURLHasHiddenExtensionKey'); - set kCFURLVolumeResourceCountKey(CFStringRef value) => - _kCFURLVolumeResourceCountKey.value = value; + CFStringRef get kCFURLHasHiddenExtensionKey => + _kCFURLHasHiddenExtensionKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsPersistentIDsKey = - _lookup('kCFURLVolumeSupportsPersistentIDsKey'); + set kCFURLHasHiddenExtensionKey(CFStringRef value) => + _kCFURLHasHiddenExtensionKey.value = value; - CFStringRef get kCFURLVolumeSupportsPersistentIDsKey => - _kCFURLVolumeSupportsPersistentIDsKey.value; + late final ffi.Pointer _kCFURLCreationDateKey = + _lookup('kCFURLCreationDateKey'); - set kCFURLVolumeSupportsPersistentIDsKey(CFStringRef value) => - _kCFURLVolumeSupportsPersistentIDsKey.value = value; + CFStringRef get kCFURLCreationDateKey => _kCFURLCreationDateKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsSymbolicLinksKey = - _lookup('kCFURLVolumeSupportsSymbolicLinksKey'); + set kCFURLCreationDateKey(CFStringRef value) => + _kCFURLCreationDateKey.value = value; - CFStringRef get kCFURLVolumeSupportsSymbolicLinksKey => - _kCFURLVolumeSupportsSymbolicLinksKey.value; + late final ffi.Pointer _kCFURLContentAccessDateKey = + _lookup('kCFURLContentAccessDateKey'); - set kCFURLVolumeSupportsSymbolicLinksKey(CFStringRef value) => - _kCFURLVolumeSupportsSymbolicLinksKey.value = value; + CFStringRef get kCFURLContentAccessDateKey => + _kCFURLContentAccessDateKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsHardLinksKey = - _lookup('kCFURLVolumeSupportsHardLinksKey'); + set kCFURLContentAccessDateKey(CFStringRef value) => + _kCFURLContentAccessDateKey.value = value; - CFStringRef get kCFURLVolumeSupportsHardLinksKey => - _kCFURLVolumeSupportsHardLinksKey.value; + late final ffi.Pointer _kCFURLContentModificationDateKey = + _lookup('kCFURLContentModificationDateKey'); - set kCFURLVolumeSupportsHardLinksKey(CFStringRef value) => - _kCFURLVolumeSupportsHardLinksKey.value = value; + CFStringRef get kCFURLContentModificationDateKey => + _kCFURLContentModificationDateKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsJournalingKey = - _lookup('kCFURLVolumeSupportsJournalingKey'); + set kCFURLContentModificationDateKey(CFStringRef value) => + _kCFURLContentModificationDateKey.value = value; - CFStringRef get kCFURLVolumeSupportsJournalingKey => - _kCFURLVolumeSupportsJournalingKey.value; + late final ffi.Pointer _kCFURLAttributeModificationDateKey = + _lookup('kCFURLAttributeModificationDateKey'); - set kCFURLVolumeSupportsJournalingKey(CFStringRef value) => - _kCFURLVolumeSupportsJournalingKey.value = value; + CFStringRef get kCFURLAttributeModificationDateKey => + _kCFURLAttributeModificationDateKey.value; - late final ffi.Pointer _kCFURLVolumeIsJournalingKey = - _lookup('kCFURLVolumeIsJournalingKey'); + set kCFURLAttributeModificationDateKey(CFStringRef value) => + _kCFURLAttributeModificationDateKey.value = value; - CFStringRef get kCFURLVolumeIsJournalingKey => - _kCFURLVolumeIsJournalingKey.value; + late final ffi.Pointer _kCFURLFileIdentifierKey = + _lookup('kCFURLFileIdentifierKey'); - set kCFURLVolumeIsJournalingKey(CFStringRef value) => - _kCFURLVolumeIsJournalingKey.value = value; + CFStringRef get kCFURLFileIdentifierKey => _kCFURLFileIdentifierKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsSparseFilesKey = - _lookup('kCFURLVolumeSupportsSparseFilesKey'); + set kCFURLFileIdentifierKey(CFStringRef value) => + _kCFURLFileIdentifierKey.value = value; - CFStringRef get kCFURLVolumeSupportsSparseFilesKey => - _kCFURLVolumeSupportsSparseFilesKey.value; + late final ffi.Pointer _kCFURLFileContentIdentifierKey = + _lookup('kCFURLFileContentIdentifierKey'); - set kCFURLVolumeSupportsSparseFilesKey(CFStringRef value) => - _kCFURLVolumeSupportsSparseFilesKey.value = value; + CFStringRef get kCFURLFileContentIdentifierKey => + _kCFURLFileContentIdentifierKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsZeroRunsKey = - _lookup('kCFURLVolumeSupportsZeroRunsKey'); + set kCFURLFileContentIdentifierKey(CFStringRef value) => + _kCFURLFileContentIdentifierKey.value = value; - CFStringRef get kCFURLVolumeSupportsZeroRunsKey => - _kCFURLVolumeSupportsZeroRunsKey.value; + late final ffi.Pointer _kCFURLMayShareFileContentKey = + _lookup('kCFURLMayShareFileContentKey'); - set kCFURLVolumeSupportsZeroRunsKey(CFStringRef value) => - _kCFURLVolumeSupportsZeroRunsKey.value = value; + CFStringRef get kCFURLMayShareFileContentKey => + _kCFURLMayShareFileContentKey.value; - late final ffi.Pointer - _kCFURLVolumeSupportsCaseSensitiveNamesKey = - _lookup('kCFURLVolumeSupportsCaseSensitiveNamesKey'); + set kCFURLMayShareFileContentKey(CFStringRef value) => + _kCFURLMayShareFileContentKey.value = value; - CFStringRef get kCFURLVolumeSupportsCaseSensitiveNamesKey => - _kCFURLVolumeSupportsCaseSensitiveNamesKey.value; + late final ffi.Pointer _kCFURLMayHaveExtendedAttributesKey = + _lookup('kCFURLMayHaveExtendedAttributesKey'); - set kCFURLVolumeSupportsCaseSensitiveNamesKey(CFStringRef value) => - _kCFURLVolumeSupportsCaseSensitiveNamesKey.value = value; + CFStringRef get kCFURLMayHaveExtendedAttributesKey => + _kCFURLMayHaveExtendedAttributesKey.value; - late final ffi.Pointer - _kCFURLVolumeSupportsCasePreservedNamesKey = - _lookup('kCFURLVolumeSupportsCasePreservedNamesKey'); + set kCFURLMayHaveExtendedAttributesKey(CFStringRef value) => + _kCFURLMayHaveExtendedAttributesKey.value = value; - CFStringRef get kCFURLVolumeSupportsCasePreservedNamesKey => - _kCFURLVolumeSupportsCasePreservedNamesKey.value; + late final ffi.Pointer _kCFURLIsPurgeableKey = + _lookup('kCFURLIsPurgeableKey'); - set kCFURLVolumeSupportsCasePreservedNamesKey(CFStringRef value) => - _kCFURLVolumeSupportsCasePreservedNamesKey.value = value; + CFStringRef get kCFURLIsPurgeableKey => _kCFURLIsPurgeableKey.value; - late final ffi.Pointer - _kCFURLVolumeSupportsRootDirectoryDatesKey = - _lookup('kCFURLVolumeSupportsRootDirectoryDatesKey'); + set kCFURLIsPurgeableKey(CFStringRef value) => + _kCFURLIsPurgeableKey.value = value; - CFStringRef get kCFURLVolumeSupportsRootDirectoryDatesKey => - _kCFURLVolumeSupportsRootDirectoryDatesKey.value; + late final ffi.Pointer _kCFURLIsSparseKey = + _lookup('kCFURLIsSparseKey'); - set kCFURLVolumeSupportsRootDirectoryDatesKey(CFStringRef value) => - _kCFURLVolumeSupportsRootDirectoryDatesKey.value = value; + CFStringRef get kCFURLIsSparseKey => _kCFURLIsSparseKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsVolumeSizesKey = - _lookup('kCFURLVolumeSupportsVolumeSizesKey'); + set kCFURLIsSparseKey(CFStringRef value) => _kCFURLIsSparseKey.value = value; - CFStringRef get kCFURLVolumeSupportsVolumeSizesKey => - _kCFURLVolumeSupportsVolumeSizesKey.value; + late final ffi.Pointer _kCFURLLinkCountKey = + _lookup('kCFURLLinkCountKey'); - set kCFURLVolumeSupportsVolumeSizesKey(CFStringRef value) => - _kCFURLVolumeSupportsVolumeSizesKey.value = value; + CFStringRef get kCFURLLinkCountKey => _kCFURLLinkCountKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsRenamingKey = - _lookup('kCFURLVolumeSupportsRenamingKey'); + set kCFURLLinkCountKey(CFStringRef value) => + _kCFURLLinkCountKey.value = value; - CFStringRef get kCFURLVolumeSupportsRenamingKey => - _kCFURLVolumeSupportsRenamingKey.value; + late final ffi.Pointer _kCFURLParentDirectoryURLKey = + _lookup('kCFURLParentDirectoryURLKey'); - set kCFURLVolumeSupportsRenamingKey(CFStringRef value) => - _kCFURLVolumeSupportsRenamingKey.value = value; + CFStringRef get kCFURLParentDirectoryURLKey => + _kCFURLParentDirectoryURLKey.value; - late final ffi.Pointer - _kCFURLVolumeSupportsAdvisoryFileLockingKey = - _lookup('kCFURLVolumeSupportsAdvisoryFileLockingKey'); + set kCFURLParentDirectoryURLKey(CFStringRef value) => + _kCFURLParentDirectoryURLKey.value = value; - CFStringRef get kCFURLVolumeSupportsAdvisoryFileLockingKey => - _kCFURLVolumeSupportsAdvisoryFileLockingKey.value; + late final ffi.Pointer _kCFURLVolumeURLKey = + _lookup('kCFURLVolumeURLKey'); - set kCFURLVolumeSupportsAdvisoryFileLockingKey(CFStringRef value) => - _kCFURLVolumeSupportsAdvisoryFileLockingKey.value = value; + CFStringRef get kCFURLVolumeURLKey => _kCFURLVolumeURLKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsExtendedSecurityKey = - _lookup('kCFURLVolumeSupportsExtendedSecurityKey'); + set kCFURLVolumeURLKey(CFStringRef value) => + _kCFURLVolumeURLKey.value = value; - CFStringRef get kCFURLVolumeSupportsExtendedSecurityKey => - _kCFURLVolumeSupportsExtendedSecurityKey.value; + late final ffi.Pointer _kCFURLTypeIdentifierKey = + _lookup('kCFURLTypeIdentifierKey'); - set kCFURLVolumeSupportsExtendedSecurityKey(CFStringRef value) => - _kCFURLVolumeSupportsExtendedSecurityKey.value = value; + CFStringRef get kCFURLTypeIdentifierKey => _kCFURLTypeIdentifierKey.value; - late final ffi.Pointer _kCFURLVolumeIsBrowsableKey = - _lookup('kCFURLVolumeIsBrowsableKey'); + set kCFURLTypeIdentifierKey(CFStringRef value) => + _kCFURLTypeIdentifierKey.value = value; - CFStringRef get kCFURLVolumeIsBrowsableKey => - _kCFURLVolumeIsBrowsableKey.value; + late final ffi.Pointer _kCFURLLocalizedTypeDescriptionKey = + _lookup('kCFURLLocalizedTypeDescriptionKey'); - set kCFURLVolumeIsBrowsableKey(CFStringRef value) => - _kCFURLVolumeIsBrowsableKey.value = value; + CFStringRef get kCFURLLocalizedTypeDescriptionKey => + _kCFURLLocalizedTypeDescriptionKey.value; - late final ffi.Pointer _kCFURLVolumeMaximumFileSizeKey = - _lookup('kCFURLVolumeMaximumFileSizeKey'); + set kCFURLLocalizedTypeDescriptionKey(CFStringRef value) => + _kCFURLLocalizedTypeDescriptionKey.value = value; - CFStringRef get kCFURLVolumeMaximumFileSizeKey => - _kCFURLVolumeMaximumFileSizeKey.value; + late final ffi.Pointer _kCFURLLabelNumberKey = + _lookup('kCFURLLabelNumberKey'); - set kCFURLVolumeMaximumFileSizeKey(CFStringRef value) => - _kCFURLVolumeMaximumFileSizeKey.value = value; + CFStringRef get kCFURLLabelNumberKey => _kCFURLLabelNumberKey.value; - late final ffi.Pointer _kCFURLVolumeIsEjectableKey = - _lookup('kCFURLVolumeIsEjectableKey'); + set kCFURLLabelNumberKey(CFStringRef value) => + _kCFURLLabelNumberKey.value = value; - CFStringRef get kCFURLVolumeIsEjectableKey => - _kCFURLVolumeIsEjectableKey.value; + late final ffi.Pointer _kCFURLLabelColorKey = + _lookup('kCFURLLabelColorKey'); - set kCFURLVolumeIsEjectableKey(CFStringRef value) => - _kCFURLVolumeIsEjectableKey.value = value; + CFStringRef get kCFURLLabelColorKey => _kCFURLLabelColorKey.value; - late final ffi.Pointer _kCFURLVolumeIsRemovableKey = - _lookup('kCFURLVolumeIsRemovableKey'); + set kCFURLLabelColorKey(CFStringRef value) => + _kCFURLLabelColorKey.value = value; - CFStringRef get kCFURLVolumeIsRemovableKey => - _kCFURLVolumeIsRemovableKey.value; + late final ffi.Pointer _kCFURLLocalizedLabelKey = + _lookup('kCFURLLocalizedLabelKey'); - set kCFURLVolumeIsRemovableKey(CFStringRef value) => - _kCFURLVolumeIsRemovableKey.value = value; + CFStringRef get kCFURLLocalizedLabelKey => _kCFURLLocalizedLabelKey.value; - late final ffi.Pointer _kCFURLVolumeIsInternalKey = - _lookup('kCFURLVolumeIsInternalKey'); + set kCFURLLocalizedLabelKey(CFStringRef value) => + _kCFURLLocalizedLabelKey.value = value; - CFStringRef get kCFURLVolumeIsInternalKey => _kCFURLVolumeIsInternalKey.value; + late final ffi.Pointer _kCFURLEffectiveIconKey = + _lookup('kCFURLEffectiveIconKey'); - set kCFURLVolumeIsInternalKey(CFStringRef value) => - _kCFURLVolumeIsInternalKey.value = value; + CFStringRef get kCFURLEffectiveIconKey => _kCFURLEffectiveIconKey.value; - late final ffi.Pointer _kCFURLVolumeIsAutomountedKey = - _lookup('kCFURLVolumeIsAutomountedKey'); + set kCFURLEffectiveIconKey(CFStringRef value) => + _kCFURLEffectiveIconKey.value = value; - CFStringRef get kCFURLVolumeIsAutomountedKey => - _kCFURLVolumeIsAutomountedKey.value; + late final ffi.Pointer _kCFURLCustomIconKey = + _lookup('kCFURLCustomIconKey'); - set kCFURLVolumeIsAutomountedKey(CFStringRef value) => - _kCFURLVolumeIsAutomountedKey.value = value; + CFStringRef get kCFURLCustomIconKey => _kCFURLCustomIconKey.value; - late final ffi.Pointer _kCFURLVolumeIsLocalKey = - _lookup('kCFURLVolumeIsLocalKey'); + set kCFURLCustomIconKey(CFStringRef value) => + _kCFURLCustomIconKey.value = value; - CFStringRef get kCFURLVolumeIsLocalKey => _kCFURLVolumeIsLocalKey.value; + late final ffi.Pointer _kCFURLFileResourceIdentifierKey = + _lookup('kCFURLFileResourceIdentifierKey'); - set kCFURLVolumeIsLocalKey(CFStringRef value) => - _kCFURLVolumeIsLocalKey.value = value; + CFStringRef get kCFURLFileResourceIdentifierKey => + _kCFURLFileResourceIdentifierKey.value; - late final ffi.Pointer _kCFURLVolumeIsReadOnlyKey = - _lookup('kCFURLVolumeIsReadOnlyKey'); + set kCFURLFileResourceIdentifierKey(CFStringRef value) => + _kCFURLFileResourceIdentifierKey.value = value; - CFStringRef get kCFURLVolumeIsReadOnlyKey => _kCFURLVolumeIsReadOnlyKey.value; + late final ffi.Pointer _kCFURLVolumeIdentifierKey = + _lookup('kCFURLVolumeIdentifierKey'); - set kCFURLVolumeIsReadOnlyKey(CFStringRef value) => - _kCFURLVolumeIsReadOnlyKey.value = value; + CFStringRef get kCFURLVolumeIdentifierKey => _kCFURLVolumeIdentifierKey.value; - late final ffi.Pointer _kCFURLVolumeCreationDateKey = - _lookup('kCFURLVolumeCreationDateKey'); + set kCFURLVolumeIdentifierKey(CFStringRef value) => + _kCFURLVolumeIdentifierKey.value = value; - CFStringRef get kCFURLVolumeCreationDateKey => - _kCFURLVolumeCreationDateKey.value; + late final ffi.Pointer _kCFURLPreferredIOBlockSizeKey = + _lookup('kCFURLPreferredIOBlockSizeKey'); - set kCFURLVolumeCreationDateKey(CFStringRef value) => - _kCFURLVolumeCreationDateKey.value = value; + CFStringRef get kCFURLPreferredIOBlockSizeKey => + _kCFURLPreferredIOBlockSizeKey.value; - late final ffi.Pointer _kCFURLVolumeURLForRemountingKey = - _lookup('kCFURLVolumeURLForRemountingKey'); + set kCFURLPreferredIOBlockSizeKey(CFStringRef value) => + _kCFURLPreferredIOBlockSizeKey.value = value; - CFStringRef get kCFURLVolumeURLForRemountingKey => - _kCFURLVolumeURLForRemountingKey.value; + late final ffi.Pointer _kCFURLIsReadableKey = + _lookup('kCFURLIsReadableKey'); - set kCFURLVolumeURLForRemountingKey(CFStringRef value) => - _kCFURLVolumeURLForRemountingKey.value = value; + CFStringRef get kCFURLIsReadableKey => _kCFURLIsReadableKey.value; - late final ffi.Pointer _kCFURLVolumeUUIDStringKey = - _lookup('kCFURLVolumeUUIDStringKey'); + set kCFURLIsReadableKey(CFStringRef value) => + _kCFURLIsReadableKey.value = value; - CFStringRef get kCFURLVolumeUUIDStringKey => _kCFURLVolumeUUIDStringKey.value; + late final ffi.Pointer _kCFURLIsWritableKey = + _lookup('kCFURLIsWritableKey'); - set kCFURLVolumeUUIDStringKey(CFStringRef value) => - _kCFURLVolumeUUIDStringKey.value = value; + CFStringRef get kCFURLIsWritableKey => _kCFURLIsWritableKey.value; - late final ffi.Pointer _kCFURLVolumeNameKey = - _lookup('kCFURLVolumeNameKey'); + set kCFURLIsWritableKey(CFStringRef value) => + _kCFURLIsWritableKey.value = value; - CFStringRef get kCFURLVolumeNameKey => _kCFURLVolumeNameKey.value; + late final ffi.Pointer _kCFURLIsExecutableKey = + _lookup('kCFURLIsExecutableKey'); - set kCFURLVolumeNameKey(CFStringRef value) => - _kCFURLVolumeNameKey.value = value; + CFStringRef get kCFURLIsExecutableKey => _kCFURLIsExecutableKey.value; - late final ffi.Pointer _kCFURLVolumeLocalizedNameKey = - _lookup('kCFURLVolumeLocalizedNameKey'); + set kCFURLIsExecutableKey(CFStringRef value) => + _kCFURLIsExecutableKey.value = value; - CFStringRef get kCFURLVolumeLocalizedNameKey => - _kCFURLVolumeLocalizedNameKey.value; + late final ffi.Pointer _kCFURLFileSecurityKey = + _lookup('kCFURLFileSecurityKey'); - set kCFURLVolumeLocalizedNameKey(CFStringRef value) => - _kCFURLVolumeLocalizedNameKey.value = value; + CFStringRef get kCFURLFileSecurityKey => _kCFURLFileSecurityKey.value; - late final ffi.Pointer _kCFURLVolumeIsEncryptedKey = - _lookup('kCFURLVolumeIsEncryptedKey'); + set kCFURLFileSecurityKey(CFStringRef value) => + _kCFURLFileSecurityKey.value = value; - CFStringRef get kCFURLVolumeIsEncryptedKey => - _kCFURLVolumeIsEncryptedKey.value; + late final ffi.Pointer _kCFURLIsExcludedFromBackupKey = + _lookup('kCFURLIsExcludedFromBackupKey'); - set kCFURLVolumeIsEncryptedKey(CFStringRef value) => - _kCFURLVolumeIsEncryptedKey.value = value; + CFStringRef get kCFURLIsExcludedFromBackupKey => + _kCFURLIsExcludedFromBackupKey.value; - late final ffi.Pointer _kCFURLVolumeIsRootFileSystemKey = - _lookup('kCFURLVolumeIsRootFileSystemKey'); + set kCFURLIsExcludedFromBackupKey(CFStringRef value) => + _kCFURLIsExcludedFromBackupKey.value = value; - CFStringRef get kCFURLVolumeIsRootFileSystemKey => - _kCFURLVolumeIsRootFileSystemKey.value; + late final ffi.Pointer _kCFURLTagNamesKey = + _lookup('kCFURLTagNamesKey'); - set kCFURLVolumeIsRootFileSystemKey(CFStringRef value) => - _kCFURLVolumeIsRootFileSystemKey.value = value; + CFStringRef get kCFURLTagNamesKey => _kCFURLTagNamesKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsCompressionKey = - _lookup('kCFURLVolumeSupportsCompressionKey'); + set kCFURLTagNamesKey(CFStringRef value) => _kCFURLTagNamesKey.value = value; - CFStringRef get kCFURLVolumeSupportsCompressionKey => - _kCFURLVolumeSupportsCompressionKey.value; + late final ffi.Pointer _kCFURLPathKey = + _lookup('kCFURLPathKey'); - set kCFURLVolumeSupportsCompressionKey(CFStringRef value) => - _kCFURLVolumeSupportsCompressionKey.value = value; + CFStringRef get kCFURLPathKey => _kCFURLPathKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsFileCloningKey = - _lookup('kCFURLVolumeSupportsFileCloningKey'); + set kCFURLPathKey(CFStringRef value) => _kCFURLPathKey.value = value; - CFStringRef get kCFURLVolumeSupportsFileCloningKey => - _kCFURLVolumeSupportsFileCloningKey.value; + late final ffi.Pointer _kCFURLCanonicalPathKey = + _lookup('kCFURLCanonicalPathKey'); - set kCFURLVolumeSupportsFileCloningKey(CFStringRef value) => - _kCFURLVolumeSupportsFileCloningKey.value = value; + CFStringRef get kCFURLCanonicalPathKey => _kCFURLCanonicalPathKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsSwapRenamingKey = - _lookup('kCFURLVolumeSupportsSwapRenamingKey'); + set kCFURLCanonicalPathKey(CFStringRef value) => + _kCFURLCanonicalPathKey.value = value; - CFStringRef get kCFURLVolumeSupportsSwapRenamingKey => - _kCFURLVolumeSupportsSwapRenamingKey.value; + late final ffi.Pointer _kCFURLIsMountTriggerKey = + _lookup('kCFURLIsMountTriggerKey'); - set kCFURLVolumeSupportsSwapRenamingKey(CFStringRef value) => - _kCFURLVolumeSupportsSwapRenamingKey.value = value; + CFStringRef get kCFURLIsMountTriggerKey => _kCFURLIsMountTriggerKey.value; - late final ffi.Pointer - _kCFURLVolumeSupportsExclusiveRenamingKey = - _lookup('kCFURLVolumeSupportsExclusiveRenamingKey'); + set kCFURLIsMountTriggerKey(CFStringRef value) => + _kCFURLIsMountTriggerKey.value = value; - CFStringRef get kCFURLVolumeSupportsExclusiveRenamingKey => - _kCFURLVolumeSupportsExclusiveRenamingKey.value; + late final ffi.Pointer _kCFURLGenerationIdentifierKey = + _lookup('kCFURLGenerationIdentifierKey'); - set kCFURLVolumeSupportsExclusiveRenamingKey(CFStringRef value) => - _kCFURLVolumeSupportsExclusiveRenamingKey.value = value; + CFStringRef get kCFURLGenerationIdentifierKey => + _kCFURLGenerationIdentifierKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsImmutableFilesKey = - _lookup('kCFURLVolumeSupportsImmutableFilesKey'); + set kCFURLGenerationIdentifierKey(CFStringRef value) => + _kCFURLGenerationIdentifierKey.value = value; - CFStringRef get kCFURLVolumeSupportsImmutableFilesKey => - _kCFURLVolumeSupportsImmutableFilesKey.value; + late final ffi.Pointer _kCFURLDocumentIdentifierKey = + _lookup('kCFURLDocumentIdentifierKey'); - set kCFURLVolumeSupportsImmutableFilesKey(CFStringRef value) => - _kCFURLVolumeSupportsImmutableFilesKey.value = value; + CFStringRef get kCFURLDocumentIdentifierKey => + _kCFURLDocumentIdentifierKey.value; - late final ffi.Pointer - _kCFURLVolumeSupportsAccessPermissionsKey = - _lookup('kCFURLVolumeSupportsAccessPermissionsKey'); + set kCFURLDocumentIdentifierKey(CFStringRef value) => + _kCFURLDocumentIdentifierKey.value = value; - CFStringRef get kCFURLVolumeSupportsAccessPermissionsKey => - _kCFURLVolumeSupportsAccessPermissionsKey.value; + late final ffi.Pointer _kCFURLAddedToDirectoryDateKey = + _lookup('kCFURLAddedToDirectoryDateKey'); - set kCFURLVolumeSupportsAccessPermissionsKey(CFStringRef value) => - _kCFURLVolumeSupportsAccessPermissionsKey.value = value; + CFStringRef get kCFURLAddedToDirectoryDateKey => + _kCFURLAddedToDirectoryDateKey.value; - late final ffi.Pointer _kCFURLVolumeSupportsFileProtectionKey = - _lookup('kCFURLVolumeSupportsFileProtectionKey'); + set kCFURLAddedToDirectoryDateKey(CFStringRef value) => + _kCFURLAddedToDirectoryDateKey.value = value; - CFStringRef get kCFURLVolumeSupportsFileProtectionKey => - _kCFURLVolumeSupportsFileProtectionKey.value; + late final ffi.Pointer _kCFURLQuarantinePropertiesKey = + _lookup('kCFURLQuarantinePropertiesKey'); - set kCFURLVolumeSupportsFileProtectionKey(CFStringRef value) => - _kCFURLVolumeSupportsFileProtectionKey.value = value; + CFStringRef get kCFURLQuarantinePropertiesKey => + _kCFURLQuarantinePropertiesKey.value; - late final ffi.Pointer _kCFURLIsUbiquitousItemKey = - _lookup('kCFURLIsUbiquitousItemKey'); + set kCFURLQuarantinePropertiesKey(CFStringRef value) => + _kCFURLQuarantinePropertiesKey.value = value; - CFStringRef get kCFURLIsUbiquitousItemKey => _kCFURLIsUbiquitousItemKey.value; + late final ffi.Pointer _kCFURLFileResourceTypeKey = + _lookup('kCFURLFileResourceTypeKey'); - set kCFURLIsUbiquitousItemKey(CFStringRef value) => - _kCFURLIsUbiquitousItemKey.value = value; + CFStringRef get kCFURLFileResourceTypeKey => _kCFURLFileResourceTypeKey.value; - late final ffi.Pointer - _kCFURLUbiquitousItemHasUnresolvedConflictsKey = - _lookup('kCFURLUbiquitousItemHasUnresolvedConflictsKey'); + set kCFURLFileResourceTypeKey(CFStringRef value) => + _kCFURLFileResourceTypeKey.value = value; - CFStringRef get kCFURLUbiquitousItemHasUnresolvedConflictsKey => - _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value; + late final ffi.Pointer _kCFURLFileResourceTypeNamedPipe = + _lookup('kCFURLFileResourceTypeNamedPipe'); - set kCFURLUbiquitousItemHasUnresolvedConflictsKey(CFStringRef value) => - _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value = value; + CFStringRef get kCFURLFileResourceTypeNamedPipe => + _kCFURLFileResourceTypeNamedPipe.value; - late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadedKey = - _lookup('kCFURLUbiquitousItemIsDownloadedKey'); + set kCFURLFileResourceTypeNamedPipe(CFStringRef value) => + _kCFURLFileResourceTypeNamedPipe.value = value; - CFStringRef get kCFURLUbiquitousItemIsDownloadedKey => - _kCFURLUbiquitousItemIsDownloadedKey.value; + late final ffi.Pointer _kCFURLFileResourceTypeCharacterSpecial = + _lookup('kCFURLFileResourceTypeCharacterSpecial'); - set kCFURLUbiquitousItemIsDownloadedKey(CFStringRef value) => - _kCFURLUbiquitousItemIsDownloadedKey.value = value; + CFStringRef get kCFURLFileResourceTypeCharacterSpecial => + _kCFURLFileResourceTypeCharacterSpecial.value; - late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadingKey = - _lookup('kCFURLUbiquitousItemIsDownloadingKey'); + set kCFURLFileResourceTypeCharacterSpecial(CFStringRef value) => + _kCFURLFileResourceTypeCharacterSpecial.value = value; - CFStringRef get kCFURLUbiquitousItemIsDownloadingKey => - _kCFURLUbiquitousItemIsDownloadingKey.value; + late final ffi.Pointer _kCFURLFileResourceTypeDirectory = + _lookup('kCFURLFileResourceTypeDirectory'); - set kCFURLUbiquitousItemIsDownloadingKey(CFStringRef value) => - _kCFURLUbiquitousItemIsDownloadingKey.value = value; + CFStringRef get kCFURLFileResourceTypeDirectory => + _kCFURLFileResourceTypeDirectory.value; - late final ffi.Pointer _kCFURLUbiquitousItemIsUploadedKey = - _lookup('kCFURLUbiquitousItemIsUploadedKey'); + set kCFURLFileResourceTypeDirectory(CFStringRef value) => + _kCFURLFileResourceTypeDirectory.value = value; - CFStringRef get kCFURLUbiquitousItemIsUploadedKey => - _kCFURLUbiquitousItemIsUploadedKey.value; + late final ffi.Pointer _kCFURLFileResourceTypeBlockSpecial = + _lookup('kCFURLFileResourceTypeBlockSpecial'); - set kCFURLUbiquitousItemIsUploadedKey(CFStringRef value) => - _kCFURLUbiquitousItemIsUploadedKey.value = value; + CFStringRef get kCFURLFileResourceTypeBlockSpecial => + _kCFURLFileResourceTypeBlockSpecial.value; - late final ffi.Pointer _kCFURLUbiquitousItemIsUploadingKey = - _lookup('kCFURLUbiquitousItemIsUploadingKey'); + set kCFURLFileResourceTypeBlockSpecial(CFStringRef value) => + _kCFURLFileResourceTypeBlockSpecial.value = value; - CFStringRef get kCFURLUbiquitousItemIsUploadingKey => - _kCFURLUbiquitousItemIsUploadingKey.value; + late final ffi.Pointer _kCFURLFileResourceTypeRegular = + _lookup('kCFURLFileResourceTypeRegular'); - set kCFURLUbiquitousItemIsUploadingKey(CFStringRef value) => - _kCFURLUbiquitousItemIsUploadingKey.value = value; + CFStringRef get kCFURLFileResourceTypeRegular => + _kCFURLFileResourceTypeRegular.value; - late final ffi.Pointer - _kCFURLUbiquitousItemPercentDownloadedKey = - _lookup('kCFURLUbiquitousItemPercentDownloadedKey'); + set kCFURLFileResourceTypeRegular(CFStringRef value) => + _kCFURLFileResourceTypeRegular.value = value; - CFStringRef get kCFURLUbiquitousItemPercentDownloadedKey => - _kCFURLUbiquitousItemPercentDownloadedKey.value; + late final ffi.Pointer _kCFURLFileResourceTypeSymbolicLink = + _lookup('kCFURLFileResourceTypeSymbolicLink'); - set kCFURLUbiquitousItemPercentDownloadedKey(CFStringRef value) => - _kCFURLUbiquitousItemPercentDownloadedKey.value = value; + CFStringRef get kCFURLFileResourceTypeSymbolicLink => + _kCFURLFileResourceTypeSymbolicLink.value; - late final ffi.Pointer _kCFURLUbiquitousItemPercentUploadedKey = - _lookup('kCFURLUbiquitousItemPercentUploadedKey'); + set kCFURLFileResourceTypeSymbolicLink(CFStringRef value) => + _kCFURLFileResourceTypeSymbolicLink.value = value; - CFStringRef get kCFURLUbiquitousItemPercentUploadedKey => - _kCFURLUbiquitousItemPercentUploadedKey.value; + late final ffi.Pointer _kCFURLFileResourceTypeSocket = + _lookup('kCFURLFileResourceTypeSocket'); - set kCFURLUbiquitousItemPercentUploadedKey(CFStringRef value) => - _kCFURLUbiquitousItemPercentUploadedKey.value = value; + CFStringRef get kCFURLFileResourceTypeSocket => + _kCFURLFileResourceTypeSocket.value; - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusKey = - _lookup('kCFURLUbiquitousItemDownloadingStatusKey'); + set kCFURLFileResourceTypeSocket(CFStringRef value) => + _kCFURLFileResourceTypeSocket.value = value; - CFStringRef get kCFURLUbiquitousItemDownloadingStatusKey => - _kCFURLUbiquitousItemDownloadingStatusKey.value; + late final ffi.Pointer _kCFURLFileResourceTypeUnknown = + _lookup('kCFURLFileResourceTypeUnknown'); - set kCFURLUbiquitousItemDownloadingStatusKey(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusKey.value = value; + CFStringRef get kCFURLFileResourceTypeUnknown => + _kCFURLFileResourceTypeUnknown.value; - late final ffi.Pointer _kCFURLUbiquitousItemDownloadingErrorKey = - _lookup('kCFURLUbiquitousItemDownloadingErrorKey'); + set kCFURLFileResourceTypeUnknown(CFStringRef value) => + _kCFURLFileResourceTypeUnknown.value = value; - CFStringRef get kCFURLUbiquitousItemDownloadingErrorKey => - _kCFURLUbiquitousItemDownloadingErrorKey.value; + late final ffi.Pointer _kCFURLFileSizeKey = + _lookup('kCFURLFileSizeKey'); - set kCFURLUbiquitousItemDownloadingErrorKey(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingErrorKey.value = value; + CFStringRef get kCFURLFileSizeKey => _kCFURLFileSizeKey.value; - late final ffi.Pointer _kCFURLUbiquitousItemUploadingErrorKey = - _lookup('kCFURLUbiquitousItemUploadingErrorKey'); + set kCFURLFileSizeKey(CFStringRef value) => _kCFURLFileSizeKey.value = value; - CFStringRef get kCFURLUbiquitousItemUploadingErrorKey => - _kCFURLUbiquitousItemUploadingErrorKey.value; + late final ffi.Pointer _kCFURLFileAllocatedSizeKey = + _lookup('kCFURLFileAllocatedSizeKey'); - set kCFURLUbiquitousItemUploadingErrorKey(CFStringRef value) => - _kCFURLUbiquitousItemUploadingErrorKey.value = value; + CFStringRef get kCFURLFileAllocatedSizeKey => + _kCFURLFileAllocatedSizeKey.value; - late final ffi.Pointer - _kCFURLUbiquitousItemIsExcludedFromSyncKey = - _lookup('kCFURLUbiquitousItemIsExcludedFromSyncKey'); + set kCFURLFileAllocatedSizeKey(CFStringRef value) => + _kCFURLFileAllocatedSizeKey.value = value; - CFStringRef get kCFURLUbiquitousItemIsExcludedFromSyncKey => - _kCFURLUbiquitousItemIsExcludedFromSyncKey.value; + late final ffi.Pointer _kCFURLTotalFileSizeKey = + _lookup('kCFURLTotalFileSizeKey'); - set kCFURLUbiquitousItemIsExcludedFromSyncKey(CFStringRef value) => - _kCFURLUbiquitousItemIsExcludedFromSyncKey.value = value; + CFStringRef get kCFURLTotalFileSizeKey => _kCFURLTotalFileSizeKey.value; - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusNotDownloaded = - _lookup( - 'kCFURLUbiquitousItemDownloadingStatusNotDownloaded'); + set kCFURLTotalFileSizeKey(CFStringRef value) => + _kCFURLTotalFileSizeKey.value = value; - CFStringRef get kCFURLUbiquitousItemDownloadingStatusNotDownloaded => - _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value; + late final ffi.Pointer _kCFURLTotalFileAllocatedSizeKey = + _lookup('kCFURLTotalFileAllocatedSizeKey'); - set kCFURLUbiquitousItemDownloadingStatusNotDownloaded(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; + CFStringRef get kCFURLTotalFileAllocatedSizeKey => + _kCFURLTotalFileAllocatedSizeKey.value; - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusDownloaded = - _lookup('kCFURLUbiquitousItemDownloadingStatusDownloaded'); + set kCFURLTotalFileAllocatedSizeKey(CFStringRef value) => + _kCFURLTotalFileAllocatedSizeKey.value = value; - CFStringRef get kCFURLUbiquitousItemDownloadingStatusDownloaded => - _kCFURLUbiquitousItemDownloadingStatusDownloaded.value; + late final ffi.Pointer _kCFURLIsAliasFileKey = + _lookup('kCFURLIsAliasFileKey'); - set kCFURLUbiquitousItemDownloadingStatusDownloaded(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusDownloaded.value = value; + CFStringRef get kCFURLIsAliasFileKey => _kCFURLIsAliasFileKey.value; - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusCurrent = - _lookup('kCFURLUbiquitousItemDownloadingStatusCurrent'); + set kCFURLIsAliasFileKey(CFStringRef value) => + _kCFURLIsAliasFileKey.value = value; - CFStringRef get kCFURLUbiquitousItemDownloadingStatusCurrent => - _kCFURLUbiquitousItemDownloadingStatusCurrent.value; + late final ffi.Pointer _kCFURLFileProtectionKey = + _lookup('kCFURLFileProtectionKey'); - set kCFURLUbiquitousItemDownloadingStatusCurrent(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusCurrent.value = value; + CFStringRef get kCFURLFileProtectionKey => _kCFURLFileProtectionKey.value; - CFDataRef CFURLCreateBookmarkData( - CFAllocatorRef allocator, - CFURLRef url, - int options, - CFArrayRef resourcePropertiesToInclude, - CFURLRef relativeToURL, - ffi.Pointer error, - ) { - return _CFURLCreateBookmarkData( - allocator, - url, - options, - resourcePropertiesToInclude, - relativeToURL, - error, - ); - } + set kCFURLFileProtectionKey(CFStringRef value) => + _kCFURLFileProtectionKey.value = value; - late final _CFURLCreateBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, CFArrayRef, - CFURLRef, ffi.Pointer)>>('CFURLCreateBookmarkData'); - late final _CFURLCreateBookmarkData = _CFURLCreateBookmarkDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, int, CFArrayRef, CFURLRef, - ffi.Pointer)>(); + late final ffi.Pointer _kCFURLFileProtectionNone = + _lookup('kCFURLFileProtectionNone'); - CFURLRef CFURLCreateByResolvingBookmarkData( - CFAllocatorRef allocator, - CFDataRef bookmark, - int options, - CFURLRef relativeToURL, - CFArrayRef resourcePropertiesToInclude, - ffi.Pointer isStale, - ffi.Pointer error, - ) { - return _CFURLCreateByResolvingBookmarkData( - allocator, - bookmark, - options, - relativeToURL, - resourcePropertiesToInclude, - isStale, - error, - ); - } + CFStringRef get kCFURLFileProtectionNone => _kCFURLFileProtectionNone.value; - late final _CFURLCreateByResolvingBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function( - CFAllocatorRef, - CFDataRef, - ffi.Int32, - CFURLRef, - CFArrayRef, - ffi.Pointer, - ffi.Pointer)>>('CFURLCreateByResolvingBookmarkData'); - late final _CFURLCreateByResolvingBookmarkData = - _CFURLCreateByResolvingBookmarkDataPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFDataRef, int, CFURLRef, - CFArrayRef, ffi.Pointer, ffi.Pointer)>(); + set kCFURLFileProtectionNone(CFStringRef value) => + _kCFURLFileProtectionNone.value = value; - CFDictionaryRef CFURLCreateResourcePropertiesForKeysFromBookmarkData( - CFAllocatorRef allocator, - CFArrayRef resourcePropertiesToReturn, - CFDataRef bookmark, - ) { - return _CFURLCreateResourcePropertiesForKeysFromBookmarkData( - allocator, - resourcePropertiesToReturn, - bookmark, - ); - } + late final ffi.Pointer _kCFURLFileProtectionComplete = + _lookup('kCFURLFileProtectionComplete'); - late final _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>>( - 'CFURLCreateResourcePropertiesForKeysFromBookmarkData'); - late final _CFURLCreateResourcePropertiesForKeysFromBookmarkData = - _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr.asFunction< - CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>(); + CFStringRef get kCFURLFileProtectionComplete => + _kCFURLFileProtectionComplete.value; - CFTypeRef CFURLCreateResourcePropertyForKeyFromBookmarkData( - CFAllocatorRef allocator, - CFStringRef resourcePropertyKey, - CFDataRef bookmark, - ) { - return _CFURLCreateResourcePropertyForKeyFromBookmarkData( - allocator, - resourcePropertyKey, - bookmark, - ); - } + set kCFURLFileProtectionComplete(CFStringRef value) => + _kCFURLFileProtectionComplete.value = value; - late final _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFAllocatorRef, CFStringRef, - CFDataRef)>>('CFURLCreateResourcePropertyForKeyFromBookmarkData'); - late final _CFURLCreateResourcePropertyForKeyFromBookmarkData = - _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr.asFunction< - CFTypeRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); + late final ffi.Pointer _kCFURLFileProtectionCompleteUnlessOpen = + _lookup('kCFURLFileProtectionCompleteUnlessOpen'); - CFDataRef CFURLCreateBookmarkDataFromFile( - CFAllocatorRef allocator, - CFURLRef fileURL, - ffi.Pointer errorRef, - ) { - return _CFURLCreateBookmarkDataFromFile( - allocator, - fileURL, - errorRef, - ); - } + CFStringRef get kCFURLFileProtectionCompleteUnlessOpen => + _kCFURLFileProtectionCompleteUnlessOpen.value; - late final _CFURLCreateBookmarkDataFromFilePtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, - ffi.Pointer)>>('CFURLCreateBookmarkDataFromFile'); - late final _CFURLCreateBookmarkDataFromFile = - _CFURLCreateBookmarkDataFromFilePtr.asFunction< - CFDataRef Function( - CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + set kCFURLFileProtectionCompleteUnlessOpen(CFStringRef value) => + _kCFURLFileProtectionCompleteUnlessOpen.value = value; - int CFURLWriteBookmarkDataToFile( - CFDataRef bookmarkRef, - CFURLRef fileURL, - int options, - ffi.Pointer errorRef, - ) { - return _CFURLWriteBookmarkDataToFile( - bookmarkRef, - fileURL, - options, - errorRef, - ); - } + late final ffi.Pointer + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication = + _lookup( + 'kCFURLFileProtectionCompleteUntilFirstUserAuthentication'); - late final _CFURLWriteBookmarkDataToFilePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFDataRef, - CFURLRef, - CFURLBookmarkFileCreationOptions, - ffi.Pointer)>>('CFURLWriteBookmarkDataToFile'); - late final _CFURLWriteBookmarkDataToFile = - _CFURLWriteBookmarkDataToFilePtr.asFunction< - int Function(CFDataRef, CFURLRef, int, ffi.Pointer)>(); + CFStringRef get kCFURLFileProtectionCompleteUntilFirstUserAuthentication => + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value; - CFDataRef CFURLCreateBookmarkDataFromAliasRecord( - CFAllocatorRef allocatorRef, - CFDataRef aliasRecordDataRef, - ) { - return _CFURLCreateBookmarkDataFromAliasRecord( - allocatorRef, - aliasRecordDataRef, - ); - } + set kCFURLFileProtectionCompleteUntilFirstUserAuthentication( + CFStringRef value) => + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; - late final _CFURLCreateBookmarkDataFromAliasRecordPtr = _lookup< - ffi.NativeFunction>( - 'CFURLCreateBookmarkDataFromAliasRecord'); - late final _CFURLCreateBookmarkDataFromAliasRecord = - _CFURLCreateBookmarkDataFromAliasRecordPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFDataRef)>(); + late final ffi.Pointer + _kCFURLVolumeLocalizedFormatDescriptionKey = + _lookup('kCFURLVolumeLocalizedFormatDescriptionKey'); - int CFURLStartAccessingSecurityScopedResource( - CFURLRef url, - ) { - return _CFURLStartAccessingSecurityScopedResource( - url, - ); - } + CFStringRef get kCFURLVolumeLocalizedFormatDescriptionKey => + _kCFURLVolumeLocalizedFormatDescriptionKey.value; - late final _CFURLStartAccessingSecurityScopedResourcePtr = - _lookup>( - 'CFURLStartAccessingSecurityScopedResource'); - late final _CFURLStartAccessingSecurityScopedResource = - _CFURLStartAccessingSecurityScopedResourcePtr.asFunction< - int Function(CFURLRef)>(); + set kCFURLVolumeLocalizedFormatDescriptionKey(CFStringRef value) => + _kCFURLVolumeLocalizedFormatDescriptionKey.value = value; - void CFURLStopAccessingSecurityScopedResource( - CFURLRef url, - ) { - return _CFURLStopAccessingSecurityScopedResource( - url, - ); - } + late final ffi.Pointer _kCFURLVolumeTotalCapacityKey = + _lookup('kCFURLVolumeTotalCapacityKey'); - late final _CFURLStopAccessingSecurityScopedResourcePtr = - _lookup>( - 'CFURLStopAccessingSecurityScopedResource'); - late final _CFURLStopAccessingSecurityScopedResource = - _CFURLStopAccessingSecurityScopedResourcePtr.asFunction< - void Function(CFURLRef)>(); + CFStringRef get kCFURLVolumeTotalCapacityKey => + _kCFURLVolumeTotalCapacityKey.value; - late final ffi.Pointer _kCFRunLoopDefaultMode = - _lookup('kCFRunLoopDefaultMode'); + set kCFURLVolumeTotalCapacityKey(CFStringRef value) => + _kCFURLVolumeTotalCapacityKey.value = value; - CFRunLoopMode get kCFRunLoopDefaultMode => _kCFRunLoopDefaultMode.value; + late final ffi.Pointer _kCFURLVolumeAvailableCapacityKey = + _lookup('kCFURLVolumeAvailableCapacityKey'); - set kCFRunLoopDefaultMode(CFRunLoopMode value) => - _kCFRunLoopDefaultMode.value = value; + CFStringRef get kCFURLVolumeAvailableCapacityKey => + _kCFURLVolumeAvailableCapacityKey.value; - late final ffi.Pointer _kCFRunLoopCommonModes = - _lookup('kCFRunLoopCommonModes'); + set kCFURLVolumeAvailableCapacityKey(CFStringRef value) => + _kCFURLVolumeAvailableCapacityKey.value = value; - CFRunLoopMode get kCFRunLoopCommonModes => _kCFRunLoopCommonModes.value; + late final ffi.Pointer + _kCFURLVolumeAvailableCapacityForImportantUsageKey = + _lookup('kCFURLVolumeAvailableCapacityForImportantUsageKey'); - set kCFRunLoopCommonModes(CFRunLoopMode value) => - _kCFRunLoopCommonModes.value = value; + CFStringRef get kCFURLVolumeAvailableCapacityForImportantUsageKey => + _kCFURLVolumeAvailableCapacityForImportantUsageKey.value; - int CFRunLoopGetTypeID() { - return _CFRunLoopGetTypeID(); - } + set kCFURLVolumeAvailableCapacityForImportantUsageKey(CFStringRef value) => + _kCFURLVolumeAvailableCapacityForImportantUsageKey.value = value; - late final _CFRunLoopGetTypeIDPtr = - _lookup>('CFRunLoopGetTypeID'); - late final _CFRunLoopGetTypeID = - _CFRunLoopGetTypeIDPtr.asFunction(); + late final ffi.Pointer + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey = + _lookup( + 'kCFURLVolumeAvailableCapacityForOpportunisticUsageKey'); - CFRunLoopRef CFRunLoopGetCurrent() { - return _CFRunLoopGetCurrent(); - } + CFStringRef get kCFURLVolumeAvailableCapacityForOpportunisticUsageKey => + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value; - late final _CFRunLoopGetCurrentPtr = - _lookup>( - 'CFRunLoopGetCurrent'); - late final _CFRunLoopGetCurrent = - _CFRunLoopGetCurrentPtr.asFunction(); + set kCFURLVolumeAvailableCapacityForOpportunisticUsageKey( + CFStringRef value) => + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; - CFRunLoopRef CFRunLoopGetMain() { - return _CFRunLoopGetMain(); - } + late final ffi.Pointer _kCFURLVolumeResourceCountKey = + _lookup('kCFURLVolumeResourceCountKey'); - late final _CFRunLoopGetMainPtr = - _lookup>('CFRunLoopGetMain'); - late final _CFRunLoopGetMain = - _CFRunLoopGetMainPtr.asFunction(); + CFStringRef get kCFURLVolumeResourceCountKey => + _kCFURLVolumeResourceCountKey.value; - CFRunLoopMode CFRunLoopCopyCurrentMode( - CFRunLoopRef rl, - ) { - return _CFRunLoopCopyCurrentMode( - rl, - ); - } + set kCFURLVolumeResourceCountKey(CFStringRef value) => + _kCFURLVolumeResourceCountKey.value = value; - late final _CFRunLoopCopyCurrentModePtr = - _lookup>( - 'CFRunLoopCopyCurrentMode'); - late final _CFRunLoopCopyCurrentMode = _CFRunLoopCopyCurrentModePtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsPersistentIDsKey = + _lookup('kCFURLVolumeSupportsPersistentIDsKey'); - CFArrayRef CFRunLoopCopyAllModes( - CFRunLoopRef rl, - ) { - return _CFRunLoopCopyAllModes( - rl, - ); - } + CFStringRef get kCFURLVolumeSupportsPersistentIDsKey => + _kCFURLVolumeSupportsPersistentIDsKey.value; - late final _CFRunLoopCopyAllModesPtr = - _lookup>( - 'CFRunLoopCopyAllModes'); - late final _CFRunLoopCopyAllModes = - _CFRunLoopCopyAllModesPtr.asFunction(); + set kCFURLVolumeSupportsPersistentIDsKey(CFStringRef value) => + _kCFURLVolumeSupportsPersistentIDsKey.value = value; - void CFRunLoopAddCommonMode( - CFRunLoopRef rl, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddCommonMode( - rl, - mode, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsSymbolicLinksKey = + _lookup('kCFURLVolumeSupportsSymbolicLinksKey'); - late final _CFRunLoopAddCommonModePtr = _lookup< - ffi.NativeFunction>( - 'CFRunLoopAddCommonMode'); - late final _CFRunLoopAddCommonMode = _CFRunLoopAddCommonModePtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopMode)>(); + CFStringRef get kCFURLVolumeSupportsSymbolicLinksKey => + _kCFURLVolumeSupportsSymbolicLinksKey.value; - double CFRunLoopGetNextTimerFireDate( - CFRunLoopRef rl, - CFRunLoopMode mode, - ) { - return _CFRunLoopGetNextTimerFireDate( - rl, - mode, - ); - } + set kCFURLVolumeSupportsSymbolicLinksKey(CFStringRef value) => + _kCFURLVolumeSupportsSymbolicLinksKey.value = value; - late final _CFRunLoopGetNextTimerFireDatePtr = _lookup< - ffi.NativeFunction< - CFAbsoluteTime Function( - CFRunLoopRef, CFRunLoopMode)>>('CFRunLoopGetNextTimerFireDate'); - late final _CFRunLoopGetNextTimerFireDate = _CFRunLoopGetNextTimerFireDatePtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsHardLinksKey = + _lookup('kCFURLVolumeSupportsHardLinksKey'); - void CFRunLoopRun() { - return _CFRunLoopRun(); - } + CFStringRef get kCFURLVolumeSupportsHardLinksKey => + _kCFURLVolumeSupportsHardLinksKey.value; - late final _CFRunLoopRunPtr = - _lookup>('CFRunLoopRun'); - late final _CFRunLoopRun = _CFRunLoopRunPtr.asFunction(); + set kCFURLVolumeSupportsHardLinksKey(CFStringRef value) => + _kCFURLVolumeSupportsHardLinksKey.value = value; - int CFRunLoopRunInMode( - CFRunLoopMode mode, - double seconds, - int returnAfterSourceHandled, - ) { - return _CFRunLoopRunInMode( - mode, - seconds, - returnAfterSourceHandled, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsJournalingKey = + _lookup('kCFURLVolumeSupportsJournalingKey'); - late final _CFRunLoopRunInModePtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - CFRunLoopMode, CFTimeInterval, Boolean)>>('CFRunLoopRunInMode'); - late final _CFRunLoopRunInMode = _CFRunLoopRunInModePtr.asFunction< - int Function(CFRunLoopMode, double, int)>(); + CFStringRef get kCFURLVolumeSupportsJournalingKey => + _kCFURLVolumeSupportsJournalingKey.value; - int CFRunLoopIsWaiting( - CFRunLoopRef rl, - ) { - return _CFRunLoopIsWaiting( - rl, - ); - } + set kCFURLVolumeSupportsJournalingKey(CFStringRef value) => + _kCFURLVolumeSupportsJournalingKey.value = value; - late final _CFRunLoopIsWaitingPtr = - _lookup>( - 'CFRunLoopIsWaiting'); - late final _CFRunLoopIsWaiting = - _CFRunLoopIsWaitingPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeIsJournalingKey = + _lookup('kCFURLVolumeIsJournalingKey'); - void CFRunLoopWakeUp( - CFRunLoopRef rl, - ) { - return _CFRunLoopWakeUp( - rl, - ); - } + CFStringRef get kCFURLVolumeIsJournalingKey => + _kCFURLVolumeIsJournalingKey.value; - late final _CFRunLoopWakeUpPtr = - _lookup>( - 'CFRunLoopWakeUp'); - late final _CFRunLoopWakeUp = - _CFRunLoopWakeUpPtr.asFunction(); + set kCFURLVolumeIsJournalingKey(CFStringRef value) => + _kCFURLVolumeIsJournalingKey.value = value; - void CFRunLoopStop( - CFRunLoopRef rl, - ) { - return _CFRunLoopStop( - rl, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsSparseFilesKey = + _lookup('kCFURLVolumeSupportsSparseFilesKey'); - late final _CFRunLoopStopPtr = - _lookup>( - 'CFRunLoopStop'); - late final _CFRunLoopStop = - _CFRunLoopStopPtr.asFunction(); + CFStringRef get kCFURLVolumeSupportsSparseFilesKey => + _kCFURLVolumeSupportsSparseFilesKey.value; - void CFRunLoopPerformBlock( - CFRunLoopRef rl, - CFTypeRef mode, - ffi.Pointer<_ObjCBlock> block, - ) { - return _CFRunLoopPerformBlock( - rl, - mode, - block, - ); - } + set kCFURLVolumeSupportsSparseFilesKey(CFStringRef value) => + _kCFURLVolumeSupportsSparseFilesKey.value = value; - late final _CFRunLoopPerformBlockPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFTypeRef, - ffi.Pointer<_ObjCBlock>)>>('CFRunLoopPerformBlock'); - late final _CFRunLoopPerformBlock = _CFRunLoopPerformBlockPtr.asFunction< - void Function(CFRunLoopRef, CFTypeRef, ffi.Pointer<_ObjCBlock>)>(); + late final ffi.Pointer _kCFURLVolumeSupportsZeroRunsKey = + _lookup('kCFURLVolumeSupportsZeroRunsKey'); - int CFRunLoopContainsSource( - CFRunLoopRef rl, - CFRunLoopSourceRef source, - CFRunLoopMode mode, - ) { - return _CFRunLoopContainsSource( - rl, - source, - mode, - ); - } + CFStringRef get kCFURLVolumeSupportsZeroRunsKey => + _kCFURLVolumeSupportsZeroRunsKey.value; - late final _CFRunLoopContainsSourcePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFRunLoopRef, CFRunLoopSourceRef, - CFRunLoopMode)>>('CFRunLoopContainsSource'); - late final _CFRunLoopContainsSource = _CFRunLoopContainsSourcePtr.asFunction< - int Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + set kCFURLVolumeSupportsZeroRunsKey(CFStringRef value) => + _kCFURLVolumeSupportsZeroRunsKey.value = value; - void CFRunLoopAddSource( - CFRunLoopRef rl, - CFRunLoopSourceRef source, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddSource( - rl, - source, - mode, - ); - } + late final ffi.Pointer + _kCFURLVolumeSupportsCaseSensitiveNamesKey = + _lookup('kCFURLVolumeSupportsCaseSensitiveNamesKey'); - late final _CFRunLoopAddSourcePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, - CFRunLoopMode)>>('CFRunLoopAddSource'); - late final _CFRunLoopAddSource = _CFRunLoopAddSourcePtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + CFStringRef get kCFURLVolumeSupportsCaseSensitiveNamesKey => + _kCFURLVolumeSupportsCaseSensitiveNamesKey.value; - void CFRunLoopRemoveSource( - CFRunLoopRef rl, - CFRunLoopSourceRef source, - CFRunLoopMode mode, - ) { - return _CFRunLoopRemoveSource( - rl, - source, - mode, - ); - } + set kCFURLVolumeSupportsCaseSensitiveNamesKey(CFStringRef value) => + _kCFURLVolumeSupportsCaseSensitiveNamesKey.value = value; - late final _CFRunLoopRemoveSourcePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, - CFRunLoopMode)>>('CFRunLoopRemoveSource'); - late final _CFRunLoopRemoveSource = _CFRunLoopRemoveSourcePtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + late final ffi.Pointer + _kCFURLVolumeSupportsCasePreservedNamesKey = + _lookup('kCFURLVolumeSupportsCasePreservedNamesKey'); - int CFRunLoopContainsObserver( - CFRunLoopRef rl, - CFRunLoopObserverRef observer, - CFRunLoopMode mode, - ) { - return _CFRunLoopContainsObserver( - rl, - observer, - mode, - ); - } + CFStringRef get kCFURLVolumeSupportsCasePreservedNamesKey => + _kCFURLVolumeSupportsCasePreservedNamesKey.value; - late final _CFRunLoopContainsObserverPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFRunLoopRef, CFRunLoopObserverRef, - CFRunLoopMode)>>('CFRunLoopContainsObserver'); - late final _CFRunLoopContainsObserver = - _CFRunLoopContainsObserverPtr.asFunction< - int Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + set kCFURLVolumeSupportsCasePreservedNamesKey(CFStringRef value) => + _kCFURLVolumeSupportsCasePreservedNamesKey.value = value; - void CFRunLoopAddObserver( - CFRunLoopRef rl, - CFRunLoopObserverRef observer, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddObserver( - rl, - observer, - mode, - ); - } + late final ffi.Pointer + _kCFURLVolumeSupportsRootDirectoryDatesKey = + _lookup('kCFURLVolumeSupportsRootDirectoryDatesKey'); - late final _CFRunLoopAddObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, - CFRunLoopMode)>>('CFRunLoopAddObserver'); - late final _CFRunLoopAddObserver = _CFRunLoopAddObserverPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + CFStringRef get kCFURLVolumeSupportsRootDirectoryDatesKey => + _kCFURLVolumeSupportsRootDirectoryDatesKey.value; - void CFRunLoopRemoveObserver( - CFRunLoopRef rl, - CFRunLoopObserverRef observer, - CFRunLoopMode mode, - ) { - return _CFRunLoopRemoveObserver( - rl, - observer, - mode, - ); - } + set kCFURLVolumeSupportsRootDirectoryDatesKey(CFStringRef value) => + _kCFURLVolumeSupportsRootDirectoryDatesKey.value = value; - late final _CFRunLoopRemoveObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, - CFRunLoopMode)>>('CFRunLoopRemoveObserver'); - late final _CFRunLoopRemoveObserver = _CFRunLoopRemoveObserverPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + late final ffi.Pointer _kCFURLVolumeSupportsVolumeSizesKey = + _lookup('kCFURLVolumeSupportsVolumeSizesKey'); - int CFRunLoopContainsTimer( - CFRunLoopRef rl, - CFRunLoopTimerRef timer, - CFRunLoopMode mode, - ) { - return _CFRunLoopContainsTimer( - rl, - timer, - mode, - ); - } + CFStringRef get kCFURLVolumeSupportsVolumeSizesKey => + _kCFURLVolumeSupportsVolumeSizesKey.value; - late final _CFRunLoopContainsTimerPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFRunLoopRef, CFRunLoopTimerRef, - CFRunLoopMode)>>('CFRunLoopContainsTimer'); - late final _CFRunLoopContainsTimer = _CFRunLoopContainsTimerPtr.asFunction< - int Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + set kCFURLVolumeSupportsVolumeSizesKey(CFStringRef value) => + _kCFURLVolumeSupportsVolumeSizesKey.value = value; - void CFRunLoopAddTimer( - CFRunLoopRef rl, - CFRunLoopTimerRef timer, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddTimer( - rl, - timer, - mode, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsRenamingKey = + _lookup('kCFURLVolumeSupportsRenamingKey'); - late final _CFRunLoopAddTimerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, - CFRunLoopMode)>>('CFRunLoopAddTimer'); - late final _CFRunLoopAddTimer = _CFRunLoopAddTimerPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + CFStringRef get kCFURLVolumeSupportsRenamingKey => + _kCFURLVolumeSupportsRenamingKey.value; - void CFRunLoopRemoveTimer( - CFRunLoopRef rl, - CFRunLoopTimerRef timer, - CFRunLoopMode mode, - ) { - return _CFRunLoopRemoveTimer( - rl, - timer, - mode, - ); - } + set kCFURLVolumeSupportsRenamingKey(CFStringRef value) => + _kCFURLVolumeSupportsRenamingKey.value = value; - late final _CFRunLoopRemoveTimerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, - CFRunLoopMode)>>('CFRunLoopRemoveTimer'); - late final _CFRunLoopRemoveTimer = _CFRunLoopRemoveTimerPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + late final ffi.Pointer + _kCFURLVolumeSupportsAdvisoryFileLockingKey = + _lookup('kCFURLVolumeSupportsAdvisoryFileLockingKey'); - int CFRunLoopSourceGetTypeID() { - return _CFRunLoopSourceGetTypeID(); - } + CFStringRef get kCFURLVolumeSupportsAdvisoryFileLockingKey => + _kCFURLVolumeSupportsAdvisoryFileLockingKey.value; - late final _CFRunLoopSourceGetTypeIDPtr = - _lookup>( - 'CFRunLoopSourceGetTypeID'); - late final _CFRunLoopSourceGetTypeID = - _CFRunLoopSourceGetTypeIDPtr.asFunction(); + set kCFURLVolumeSupportsAdvisoryFileLockingKey(CFStringRef value) => + _kCFURLVolumeSupportsAdvisoryFileLockingKey.value = value; - CFRunLoopSourceRef CFRunLoopSourceCreate( - CFAllocatorRef allocator, - int order, - ffi.Pointer context, - ) { - return _CFRunLoopSourceCreate( - allocator, - order, - context, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsExtendedSecurityKey = + _lookup('kCFURLVolumeSupportsExtendedSecurityKey'); - late final _CFRunLoopSourceCreatePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFRunLoopSourceCreate'); - late final _CFRunLoopSourceCreate = _CFRunLoopSourceCreatePtr.asFunction< - CFRunLoopSourceRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + CFStringRef get kCFURLVolumeSupportsExtendedSecurityKey => + _kCFURLVolumeSupportsExtendedSecurityKey.value; - int CFRunLoopSourceGetOrder( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceGetOrder( - source, - ); - } + set kCFURLVolumeSupportsExtendedSecurityKey(CFStringRef value) => + _kCFURLVolumeSupportsExtendedSecurityKey.value = value; - late final _CFRunLoopSourceGetOrderPtr = - _lookup>( - 'CFRunLoopSourceGetOrder'); - late final _CFRunLoopSourceGetOrder = _CFRunLoopSourceGetOrderPtr.asFunction< - int Function(CFRunLoopSourceRef)>(); + late final ffi.Pointer _kCFURLVolumeIsBrowsableKey = + _lookup('kCFURLVolumeIsBrowsableKey'); - void CFRunLoopSourceInvalidate( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceInvalidate( - source, - ); - } + CFStringRef get kCFURLVolumeIsBrowsableKey => + _kCFURLVolumeIsBrowsableKey.value; - late final _CFRunLoopSourceInvalidatePtr = - _lookup>( - 'CFRunLoopSourceInvalidate'); - late final _CFRunLoopSourceInvalidate = _CFRunLoopSourceInvalidatePtr - .asFunction(); + set kCFURLVolumeIsBrowsableKey(CFStringRef value) => + _kCFURLVolumeIsBrowsableKey.value = value; - int CFRunLoopSourceIsValid( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceIsValid( - source, - ); - } + late final ffi.Pointer _kCFURLVolumeMaximumFileSizeKey = + _lookup('kCFURLVolumeMaximumFileSizeKey'); - late final _CFRunLoopSourceIsValidPtr = - _lookup>( - 'CFRunLoopSourceIsValid'); - late final _CFRunLoopSourceIsValid = - _CFRunLoopSourceIsValidPtr.asFunction(); + CFStringRef get kCFURLVolumeMaximumFileSizeKey => + _kCFURLVolumeMaximumFileSizeKey.value; - void CFRunLoopSourceGetContext( - CFRunLoopSourceRef source, - ffi.Pointer context, - ) { - return _CFRunLoopSourceGetContext( - source, - context, - ); - } + set kCFURLVolumeMaximumFileSizeKey(CFStringRef value) => + _kCFURLVolumeMaximumFileSizeKey.value = value; - late final _CFRunLoopSourceGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFRunLoopSourceRef, ffi.Pointer)>>( - 'CFRunLoopSourceGetContext'); - late final _CFRunLoopSourceGetContext = - _CFRunLoopSourceGetContextPtr.asFunction< - void Function( - CFRunLoopSourceRef, ffi.Pointer)>(); + late final ffi.Pointer _kCFURLVolumeIsEjectableKey = + _lookup('kCFURLVolumeIsEjectableKey'); - void CFRunLoopSourceSignal( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceSignal( - source, - ); - } + CFStringRef get kCFURLVolumeIsEjectableKey => + _kCFURLVolumeIsEjectableKey.value; - late final _CFRunLoopSourceSignalPtr = - _lookup>( - 'CFRunLoopSourceSignal'); - late final _CFRunLoopSourceSignal = - _CFRunLoopSourceSignalPtr.asFunction(); + set kCFURLVolumeIsEjectableKey(CFStringRef value) => + _kCFURLVolumeIsEjectableKey.value = value; - int CFRunLoopObserverGetTypeID() { - return _CFRunLoopObserverGetTypeID(); - } + late final ffi.Pointer _kCFURLVolumeIsRemovableKey = + _lookup('kCFURLVolumeIsRemovableKey'); - late final _CFRunLoopObserverGetTypeIDPtr = - _lookup>( - 'CFRunLoopObserverGetTypeID'); - late final _CFRunLoopObserverGetTypeID = - _CFRunLoopObserverGetTypeIDPtr.asFunction(); + CFStringRef get kCFURLVolumeIsRemovableKey => + _kCFURLVolumeIsRemovableKey.value; - CFRunLoopObserverRef CFRunLoopObserverCreate( - CFAllocatorRef allocator, - int activities, - int repeats, - int order, - CFRunLoopObserverCallBack callout, - ffi.Pointer context, - ) { - return _CFRunLoopObserverCreate( - allocator, - activities, - repeats, - order, - callout, - context, - ); - } + set kCFURLVolumeIsRemovableKey(CFStringRef value) => + _kCFURLVolumeIsRemovableKey.value = value; - late final _CFRunLoopObserverCreatePtr = _lookup< - ffi.NativeFunction< - CFRunLoopObserverRef Function( - CFAllocatorRef, - CFOptionFlags, - Boolean, - CFIndex, - CFRunLoopObserverCallBack, - ffi.Pointer)>>( - 'CFRunLoopObserverCreate'); - late final _CFRunLoopObserverCreate = _CFRunLoopObserverCreatePtr.asFunction< - CFRunLoopObserverRef Function(CFAllocatorRef, int, int, int, - CFRunLoopObserverCallBack, ffi.Pointer)>(); + late final ffi.Pointer _kCFURLVolumeIsInternalKey = + _lookup('kCFURLVolumeIsInternalKey'); - CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler( - CFAllocatorRef allocator, - int activities, - int repeats, - int order, - ffi.Pointer<_ObjCBlock> block, - ) { - return _CFRunLoopObserverCreateWithHandler( - allocator, - activities, - repeats, - order, - block, - ); - } + CFStringRef get kCFURLVolumeIsInternalKey => _kCFURLVolumeIsInternalKey.value; - late final _CFRunLoopObserverCreateWithHandlerPtr = _lookup< - ffi.NativeFunction< - CFRunLoopObserverRef Function( - CFAllocatorRef, - CFOptionFlags, - Boolean, - CFIndex, - ffi.Pointer<_ObjCBlock>)>>('CFRunLoopObserverCreateWithHandler'); - late final _CFRunLoopObserverCreateWithHandler = - _CFRunLoopObserverCreateWithHandlerPtr.asFunction< - CFRunLoopObserverRef Function( - CFAllocatorRef, int, int, int, ffi.Pointer<_ObjCBlock>)>(); + set kCFURLVolumeIsInternalKey(CFStringRef value) => + _kCFURLVolumeIsInternalKey.value = value; - int CFRunLoopObserverGetActivities( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverGetActivities( - observer, - ); - } + late final ffi.Pointer _kCFURLVolumeIsAutomountedKey = + _lookup('kCFURLVolumeIsAutomountedKey'); - late final _CFRunLoopObserverGetActivitiesPtr = - _lookup>( - 'CFRunLoopObserverGetActivities'); - late final _CFRunLoopObserverGetActivities = - _CFRunLoopObserverGetActivitiesPtr.asFunction< - int Function(CFRunLoopObserverRef)>(); + CFStringRef get kCFURLVolumeIsAutomountedKey => + _kCFURLVolumeIsAutomountedKey.value; - int CFRunLoopObserverDoesRepeat( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverDoesRepeat( - observer, - ); - } + set kCFURLVolumeIsAutomountedKey(CFStringRef value) => + _kCFURLVolumeIsAutomountedKey.value = value; - late final _CFRunLoopObserverDoesRepeatPtr = - _lookup>( - 'CFRunLoopObserverDoesRepeat'); - late final _CFRunLoopObserverDoesRepeat = _CFRunLoopObserverDoesRepeatPtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeIsLocalKey = + _lookup('kCFURLVolumeIsLocalKey'); - int CFRunLoopObserverGetOrder( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverGetOrder( - observer, - ); - } + CFStringRef get kCFURLVolumeIsLocalKey => _kCFURLVolumeIsLocalKey.value; - late final _CFRunLoopObserverGetOrderPtr = - _lookup>( - 'CFRunLoopObserverGetOrder'); - late final _CFRunLoopObserverGetOrder = _CFRunLoopObserverGetOrderPtr - .asFunction(); + set kCFURLVolumeIsLocalKey(CFStringRef value) => + _kCFURLVolumeIsLocalKey.value = value; - void CFRunLoopObserverInvalidate( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverInvalidate( - observer, - ); - } + late final ffi.Pointer _kCFURLVolumeIsReadOnlyKey = + _lookup('kCFURLVolumeIsReadOnlyKey'); - late final _CFRunLoopObserverInvalidatePtr = - _lookup>( - 'CFRunLoopObserverInvalidate'); - late final _CFRunLoopObserverInvalidate = _CFRunLoopObserverInvalidatePtr - .asFunction(); + CFStringRef get kCFURLVolumeIsReadOnlyKey => _kCFURLVolumeIsReadOnlyKey.value; - int CFRunLoopObserverIsValid( - CFRunLoopObserverRef observer, - ) { - return _CFRunLoopObserverIsValid( - observer, - ); - } + set kCFURLVolumeIsReadOnlyKey(CFStringRef value) => + _kCFURLVolumeIsReadOnlyKey.value = value; - late final _CFRunLoopObserverIsValidPtr = - _lookup>( - 'CFRunLoopObserverIsValid'); - late final _CFRunLoopObserverIsValid = _CFRunLoopObserverIsValidPtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeCreationDateKey = + _lookup('kCFURLVolumeCreationDateKey'); - void CFRunLoopObserverGetContext( - CFRunLoopObserverRef observer, - ffi.Pointer context, - ) { - return _CFRunLoopObserverGetContext( - observer, - context, - ); - } + CFStringRef get kCFURLVolumeCreationDateKey => + _kCFURLVolumeCreationDateKey.value; - late final _CFRunLoopObserverGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopObserverRef, - ffi.Pointer)>>( - 'CFRunLoopObserverGetContext'); - late final _CFRunLoopObserverGetContext = - _CFRunLoopObserverGetContextPtr.asFunction< - void Function( - CFRunLoopObserverRef, ffi.Pointer)>(); + set kCFURLVolumeCreationDateKey(CFStringRef value) => + _kCFURLVolumeCreationDateKey.value = value; - int CFRunLoopTimerGetTypeID() { - return _CFRunLoopTimerGetTypeID(); - } + late final ffi.Pointer _kCFURLVolumeURLForRemountingKey = + _lookup('kCFURLVolumeURLForRemountingKey'); - late final _CFRunLoopTimerGetTypeIDPtr = - _lookup>( - 'CFRunLoopTimerGetTypeID'); - late final _CFRunLoopTimerGetTypeID = - _CFRunLoopTimerGetTypeIDPtr.asFunction(); + CFStringRef get kCFURLVolumeURLForRemountingKey => + _kCFURLVolumeURLForRemountingKey.value; - CFRunLoopTimerRef CFRunLoopTimerCreate( - CFAllocatorRef allocator, - double fireDate, - double interval, - int flags, - int order, - CFRunLoopTimerCallBack callout, - ffi.Pointer context, - ) { - return _CFRunLoopTimerCreate( - allocator, - fireDate, - interval, - flags, - order, - callout, - context, - ); - } + set kCFURLVolumeURLForRemountingKey(CFStringRef value) => + _kCFURLVolumeURLForRemountingKey.value = value; - late final _CFRunLoopTimerCreatePtr = _lookup< - ffi.NativeFunction< - CFRunLoopTimerRef Function( - CFAllocatorRef, - CFAbsoluteTime, - CFTimeInterval, - CFOptionFlags, - CFIndex, - CFRunLoopTimerCallBack, - ffi.Pointer)>>('CFRunLoopTimerCreate'); - late final _CFRunLoopTimerCreate = _CFRunLoopTimerCreatePtr.asFunction< - CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, - CFRunLoopTimerCallBack, ffi.Pointer)>(); + late final ffi.Pointer _kCFURLVolumeUUIDStringKey = + _lookup('kCFURLVolumeUUIDStringKey'); - CFRunLoopTimerRef CFRunLoopTimerCreateWithHandler( - CFAllocatorRef allocator, - double fireDate, - double interval, - int flags, - int order, - ffi.Pointer<_ObjCBlock> block, - ) { - return _CFRunLoopTimerCreateWithHandler( - allocator, - fireDate, - interval, - flags, - order, - block, - ); - } + CFStringRef get kCFURLVolumeUUIDStringKey => _kCFURLVolumeUUIDStringKey.value; - late final _CFRunLoopTimerCreateWithHandlerPtr = _lookup< - ffi.NativeFunction< - CFRunLoopTimerRef Function( - CFAllocatorRef, - CFAbsoluteTime, - CFTimeInterval, - CFOptionFlags, - CFIndex, - ffi.Pointer<_ObjCBlock>)>>('CFRunLoopTimerCreateWithHandler'); - late final _CFRunLoopTimerCreateWithHandler = - _CFRunLoopTimerCreateWithHandlerPtr.asFunction< - CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, - ffi.Pointer<_ObjCBlock>)>(); + set kCFURLVolumeUUIDStringKey(CFStringRef value) => + _kCFURLVolumeUUIDStringKey.value = value; - double CFRunLoopTimerGetNextFireDate( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerGetNextFireDate( - timer, - ); - } + late final ffi.Pointer _kCFURLVolumeNameKey = + _lookup('kCFURLVolumeNameKey'); - late final _CFRunLoopTimerGetNextFireDatePtr = - _lookup>( - 'CFRunLoopTimerGetNextFireDate'); - late final _CFRunLoopTimerGetNextFireDate = _CFRunLoopTimerGetNextFireDatePtr - .asFunction(); + CFStringRef get kCFURLVolumeNameKey => _kCFURLVolumeNameKey.value; - void CFRunLoopTimerSetNextFireDate( - CFRunLoopTimerRef timer, - double fireDate, - ) { - return _CFRunLoopTimerSetNextFireDate( - timer, - fireDate, - ); - } + set kCFURLVolumeNameKey(CFStringRef value) => + _kCFURLVolumeNameKey.value = value; - late final _CFRunLoopTimerSetNextFireDatePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, - CFAbsoluteTime)>>('CFRunLoopTimerSetNextFireDate'); - late final _CFRunLoopTimerSetNextFireDate = _CFRunLoopTimerSetNextFireDatePtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeLocalizedNameKey = + _lookup('kCFURLVolumeLocalizedNameKey'); - double CFRunLoopTimerGetInterval( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerGetInterval( - timer, - ); - } + CFStringRef get kCFURLVolumeLocalizedNameKey => + _kCFURLVolumeLocalizedNameKey.value; - late final _CFRunLoopTimerGetIntervalPtr = - _lookup>( - 'CFRunLoopTimerGetInterval'); - late final _CFRunLoopTimerGetInterval = _CFRunLoopTimerGetIntervalPtr - .asFunction(); + set kCFURLVolumeLocalizedNameKey(CFStringRef value) => + _kCFURLVolumeLocalizedNameKey.value = value; - int CFRunLoopTimerDoesRepeat( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerDoesRepeat( - timer, - ); - } + late final ffi.Pointer _kCFURLVolumeIsEncryptedKey = + _lookup('kCFURLVolumeIsEncryptedKey'); - late final _CFRunLoopTimerDoesRepeatPtr = - _lookup>( - 'CFRunLoopTimerDoesRepeat'); - late final _CFRunLoopTimerDoesRepeat = _CFRunLoopTimerDoesRepeatPtr - .asFunction(); + CFStringRef get kCFURLVolumeIsEncryptedKey => + _kCFURLVolumeIsEncryptedKey.value; - int CFRunLoopTimerGetOrder( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerGetOrder( - timer, - ); - } + set kCFURLVolumeIsEncryptedKey(CFStringRef value) => + _kCFURLVolumeIsEncryptedKey.value = value; - late final _CFRunLoopTimerGetOrderPtr = - _lookup>( - 'CFRunLoopTimerGetOrder'); - late final _CFRunLoopTimerGetOrder = - _CFRunLoopTimerGetOrderPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeIsRootFileSystemKey = + _lookup('kCFURLVolumeIsRootFileSystemKey'); - void CFRunLoopTimerInvalidate( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerInvalidate( - timer, - ); - } + CFStringRef get kCFURLVolumeIsRootFileSystemKey => + _kCFURLVolumeIsRootFileSystemKey.value; - late final _CFRunLoopTimerInvalidatePtr = - _lookup>( - 'CFRunLoopTimerInvalidate'); - late final _CFRunLoopTimerInvalidate = _CFRunLoopTimerInvalidatePtr - .asFunction(); + set kCFURLVolumeIsRootFileSystemKey(CFStringRef value) => + _kCFURLVolumeIsRootFileSystemKey.value = value; - int CFRunLoopTimerIsValid( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerIsValid( - timer, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsCompressionKey = + _lookup('kCFURLVolumeSupportsCompressionKey'); - late final _CFRunLoopTimerIsValidPtr = - _lookup>( - 'CFRunLoopTimerIsValid'); - late final _CFRunLoopTimerIsValid = - _CFRunLoopTimerIsValidPtr.asFunction(); + CFStringRef get kCFURLVolumeSupportsCompressionKey => + _kCFURLVolumeSupportsCompressionKey.value; - void CFRunLoopTimerGetContext( - CFRunLoopTimerRef timer, - ffi.Pointer context, - ) { - return _CFRunLoopTimerGetContext( - timer, - context, - ); - } + set kCFURLVolumeSupportsCompressionKey(CFStringRef value) => + _kCFURLVolumeSupportsCompressionKey.value = value; - late final _CFRunLoopTimerGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, - ffi.Pointer)>>('CFRunLoopTimerGetContext'); - late final _CFRunLoopTimerGetContext = - _CFRunLoopTimerGetContextPtr.asFunction< - void Function( - CFRunLoopTimerRef, ffi.Pointer)>(); + late final ffi.Pointer _kCFURLVolumeSupportsFileCloningKey = + _lookup('kCFURLVolumeSupportsFileCloningKey'); - double CFRunLoopTimerGetTolerance( - CFRunLoopTimerRef timer, - ) { - return _CFRunLoopTimerGetTolerance( - timer, - ); - } + CFStringRef get kCFURLVolumeSupportsFileCloningKey => + _kCFURLVolumeSupportsFileCloningKey.value; - late final _CFRunLoopTimerGetTolerancePtr = - _lookup>( - 'CFRunLoopTimerGetTolerance'); - late final _CFRunLoopTimerGetTolerance = _CFRunLoopTimerGetTolerancePtr - .asFunction(); + set kCFURLVolumeSupportsFileCloningKey(CFStringRef value) => + _kCFURLVolumeSupportsFileCloningKey.value = value; - void CFRunLoopTimerSetTolerance( - CFRunLoopTimerRef timer, - double tolerance, - ) { - return _CFRunLoopTimerSetTolerance( - timer, - tolerance, - ); - } + late final ffi.Pointer _kCFURLVolumeSupportsSwapRenamingKey = + _lookup('kCFURLVolumeSupportsSwapRenamingKey'); - late final _CFRunLoopTimerSetTolerancePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, - CFTimeInterval)>>('CFRunLoopTimerSetTolerance'); - late final _CFRunLoopTimerSetTolerance = _CFRunLoopTimerSetTolerancePtr - .asFunction(); + CFStringRef get kCFURLVolumeSupportsSwapRenamingKey => + _kCFURLVolumeSupportsSwapRenamingKey.value; - int CFSocketGetTypeID() { - return _CFSocketGetTypeID(); - } + set kCFURLVolumeSupportsSwapRenamingKey(CFStringRef value) => + _kCFURLVolumeSupportsSwapRenamingKey.value = value; - late final _CFSocketGetTypeIDPtr = - _lookup>('CFSocketGetTypeID'); - late final _CFSocketGetTypeID = - _CFSocketGetTypeIDPtr.asFunction(); + late final ffi.Pointer + _kCFURLVolumeSupportsExclusiveRenamingKey = + _lookup('kCFURLVolumeSupportsExclusiveRenamingKey'); - CFSocketRef CFSocketCreate( + CFStringRef get kCFURLVolumeSupportsExclusiveRenamingKey => + _kCFURLVolumeSupportsExclusiveRenamingKey.value; + + set kCFURLVolumeSupportsExclusiveRenamingKey(CFStringRef value) => + _kCFURLVolumeSupportsExclusiveRenamingKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsImmutableFilesKey = + _lookup('kCFURLVolumeSupportsImmutableFilesKey'); + + CFStringRef get kCFURLVolumeSupportsImmutableFilesKey => + _kCFURLVolumeSupportsImmutableFilesKey.value; + + set kCFURLVolumeSupportsImmutableFilesKey(CFStringRef value) => + _kCFURLVolumeSupportsImmutableFilesKey.value = value; + + late final ffi.Pointer + _kCFURLVolumeSupportsAccessPermissionsKey = + _lookup('kCFURLVolumeSupportsAccessPermissionsKey'); + + CFStringRef get kCFURLVolumeSupportsAccessPermissionsKey => + _kCFURLVolumeSupportsAccessPermissionsKey.value; + + set kCFURLVolumeSupportsAccessPermissionsKey(CFStringRef value) => + _kCFURLVolumeSupportsAccessPermissionsKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSupportsFileProtectionKey = + _lookup('kCFURLVolumeSupportsFileProtectionKey'); + + CFStringRef get kCFURLVolumeSupportsFileProtectionKey => + _kCFURLVolumeSupportsFileProtectionKey.value; + + set kCFURLVolumeSupportsFileProtectionKey(CFStringRef value) => + _kCFURLVolumeSupportsFileProtectionKey.value = value; + + late final ffi.Pointer _kCFURLVolumeTypeNameKey = + _lookup('kCFURLVolumeTypeNameKey'); + + CFStringRef get kCFURLVolumeTypeNameKey => _kCFURLVolumeTypeNameKey.value; + + set kCFURLVolumeTypeNameKey(CFStringRef value) => + _kCFURLVolumeTypeNameKey.value = value; + + late final ffi.Pointer _kCFURLVolumeSubtypeKey = + _lookup('kCFURLVolumeSubtypeKey'); + + CFStringRef get kCFURLVolumeSubtypeKey => _kCFURLVolumeSubtypeKey.value; + + set kCFURLVolumeSubtypeKey(CFStringRef value) => + _kCFURLVolumeSubtypeKey.value = value; + + late final ffi.Pointer _kCFURLVolumeMountFromLocationKey = + _lookup('kCFURLVolumeMountFromLocationKey'); + + CFStringRef get kCFURLVolumeMountFromLocationKey => + _kCFURLVolumeMountFromLocationKey.value; + + set kCFURLVolumeMountFromLocationKey(CFStringRef value) => + _kCFURLVolumeMountFromLocationKey.value = value; + + late final ffi.Pointer _kCFURLIsUbiquitousItemKey = + _lookup('kCFURLIsUbiquitousItemKey'); + + CFStringRef get kCFURLIsUbiquitousItemKey => _kCFURLIsUbiquitousItemKey.value; + + set kCFURLIsUbiquitousItemKey(CFStringRef value) => + _kCFURLIsUbiquitousItemKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemHasUnresolvedConflictsKey = + _lookup('kCFURLUbiquitousItemHasUnresolvedConflictsKey'); + + CFStringRef get kCFURLUbiquitousItemHasUnresolvedConflictsKey => + _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value; + + set kCFURLUbiquitousItemHasUnresolvedConflictsKey(CFStringRef value) => + _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadedKey = + _lookup('kCFURLUbiquitousItemIsDownloadedKey'); + + CFStringRef get kCFURLUbiquitousItemIsDownloadedKey => + _kCFURLUbiquitousItemIsDownloadedKey.value; + + set kCFURLUbiquitousItemIsDownloadedKey(CFStringRef value) => + _kCFURLUbiquitousItemIsDownloadedKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadingKey = + _lookup('kCFURLUbiquitousItemIsDownloadingKey'); + + CFStringRef get kCFURLUbiquitousItemIsDownloadingKey => + _kCFURLUbiquitousItemIsDownloadingKey.value; + + set kCFURLUbiquitousItemIsDownloadingKey(CFStringRef value) => + _kCFURLUbiquitousItemIsDownloadingKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsUploadedKey = + _lookup('kCFURLUbiquitousItemIsUploadedKey'); + + CFStringRef get kCFURLUbiquitousItemIsUploadedKey => + _kCFURLUbiquitousItemIsUploadedKey.value; + + set kCFURLUbiquitousItemIsUploadedKey(CFStringRef value) => + _kCFURLUbiquitousItemIsUploadedKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsUploadingKey = + _lookup('kCFURLUbiquitousItemIsUploadingKey'); + + CFStringRef get kCFURLUbiquitousItemIsUploadingKey => + _kCFURLUbiquitousItemIsUploadingKey.value; + + set kCFURLUbiquitousItemIsUploadingKey(CFStringRef value) => + _kCFURLUbiquitousItemIsUploadingKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemPercentDownloadedKey = + _lookup('kCFURLUbiquitousItemPercentDownloadedKey'); + + CFStringRef get kCFURLUbiquitousItemPercentDownloadedKey => + _kCFURLUbiquitousItemPercentDownloadedKey.value; + + set kCFURLUbiquitousItemPercentDownloadedKey(CFStringRef value) => + _kCFURLUbiquitousItemPercentDownloadedKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemPercentUploadedKey = + _lookup('kCFURLUbiquitousItemPercentUploadedKey'); + + CFStringRef get kCFURLUbiquitousItemPercentUploadedKey => + _kCFURLUbiquitousItemPercentUploadedKey.value; + + set kCFURLUbiquitousItemPercentUploadedKey(CFStringRef value) => + _kCFURLUbiquitousItemPercentUploadedKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusKey = + _lookup('kCFURLUbiquitousItemDownloadingStatusKey'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusKey => + _kCFURLUbiquitousItemDownloadingStatusKey.value; + + set kCFURLUbiquitousItemDownloadingStatusKey(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingStatusKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemDownloadingErrorKey = + _lookup('kCFURLUbiquitousItemDownloadingErrorKey'); + + CFStringRef get kCFURLUbiquitousItemDownloadingErrorKey => + _kCFURLUbiquitousItemDownloadingErrorKey.value; + + set kCFURLUbiquitousItemDownloadingErrorKey(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingErrorKey.value = value; + + late final ffi.Pointer _kCFURLUbiquitousItemUploadingErrorKey = + _lookup('kCFURLUbiquitousItemUploadingErrorKey'); + + CFStringRef get kCFURLUbiquitousItemUploadingErrorKey => + _kCFURLUbiquitousItemUploadingErrorKey.value; + + set kCFURLUbiquitousItemUploadingErrorKey(CFStringRef value) => + _kCFURLUbiquitousItemUploadingErrorKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemIsExcludedFromSyncKey = + _lookup('kCFURLUbiquitousItemIsExcludedFromSyncKey'); + + CFStringRef get kCFURLUbiquitousItemIsExcludedFromSyncKey => + _kCFURLUbiquitousItemIsExcludedFromSyncKey.value; + + set kCFURLUbiquitousItemIsExcludedFromSyncKey(CFStringRef value) => + _kCFURLUbiquitousItemIsExcludedFromSyncKey.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusNotDownloaded = + _lookup( + 'kCFURLUbiquitousItemDownloadingStatusNotDownloaded'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusNotDownloaded => + _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value; + + set kCFURLUbiquitousItemDownloadingStatusNotDownloaded(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusDownloaded = + _lookup('kCFURLUbiquitousItemDownloadingStatusDownloaded'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusDownloaded => + _kCFURLUbiquitousItemDownloadingStatusDownloaded.value; + + set kCFURLUbiquitousItemDownloadingStatusDownloaded(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingStatusDownloaded.value = value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusCurrent = + _lookup('kCFURLUbiquitousItemDownloadingStatusCurrent'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusCurrent => + _kCFURLUbiquitousItemDownloadingStatusCurrent.value; + + set kCFURLUbiquitousItemDownloadingStatusCurrent(CFStringRef value) => + _kCFURLUbiquitousItemDownloadingStatusCurrent.value = value; + + CFDataRef CFURLCreateBookmarkData( CFAllocatorRef allocator, - int protocolFamily, - int socketType, - int protocol, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, + CFURLRef url, + int options, + CFArrayRef resourcePropertiesToInclude, + CFURLRef relativeToURL, + ffi.Pointer error, ) { - return _CFSocketCreate( + return _CFURLCreateBookmarkData( allocator, - protocolFamily, - socketType, - protocol, - callBackTypes, - callout, - context, + url, + options, + resourcePropertiesToInclude, + relativeToURL, + error, ); } - late final _CFSocketCreatePtr = _lookup< + late final _CFURLCreateBookmarkDataPtr = _lookup< ffi.NativeFunction< - CFSocketRef Function( - CFAllocatorRef, - SInt32, - SInt32, - SInt32, - CFOptionFlags, - CFSocketCallBack, - ffi.Pointer)>>('CFSocketCreate'); - late final _CFSocketCreate = _CFSocketCreatePtr.asFunction< - CFSocketRef Function(CFAllocatorRef, int, int, int, int, CFSocketCallBack, - ffi.Pointer)>(); + CFDataRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, CFArrayRef, + CFURLRef, ffi.Pointer)>>('CFURLCreateBookmarkData'); + late final _CFURLCreateBookmarkData = _CFURLCreateBookmarkDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, int, CFArrayRef, CFURLRef, + ffi.Pointer)>(); - CFSocketRef CFSocketCreateWithNative( + CFURLRef CFURLCreateByResolvingBookmarkData( CFAllocatorRef allocator, - int sock, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, + CFDataRef bookmark, + int options, + CFURLRef relativeToURL, + CFArrayRef resourcePropertiesToInclude, + ffi.Pointer isStale, + ffi.Pointer error, ) { - return _CFSocketCreateWithNative( + return _CFURLCreateByResolvingBookmarkData( allocator, - sock, - callBackTypes, - callout, - context, + bookmark, + options, + relativeToURL, + resourcePropertiesToInclude, + isStale, + error, ); } - late final _CFSocketCreateWithNativePtr = _lookup< + late final _CFURLCreateByResolvingBookmarkDataPtr = _lookup< ffi.NativeFunction< - CFSocketRef Function( + CFURLRef Function( CFAllocatorRef, - CFSocketNativeHandle, - CFOptionFlags, - CFSocketCallBack, - ffi.Pointer)>>('CFSocketCreateWithNative'); - late final _CFSocketCreateWithNative = - _CFSocketCreateWithNativePtr.asFunction< - CFSocketRef Function(CFAllocatorRef, int, int, CFSocketCallBack, - ffi.Pointer)>(); + CFDataRef, + ffi.Int32, + CFURLRef, + CFArrayRef, + ffi.Pointer, + ffi.Pointer)>>('CFURLCreateByResolvingBookmarkData'); + late final _CFURLCreateByResolvingBookmarkData = + _CFURLCreateByResolvingBookmarkDataPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFDataRef, int, CFURLRef, + CFArrayRef, ffi.Pointer, ffi.Pointer)>(); - CFSocketRef CFSocketCreateWithSocketSignature( + CFDictionaryRef CFURLCreateResourcePropertiesForKeysFromBookmarkData( CFAllocatorRef allocator, - ffi.Pointer signature, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, + CFArrayRef resourcePropertiesToReturn, + CFDataRef bookmark, ) { - return _CFSocketCreateWithSocketSignature( + return _CFURLCreateResourcePropertiesForKeysFromBookmarkData( allocator, - signature, - callBackTypes, - callout, - context, + resourcePropertiesToReturn, + bookmark, ); } - late final _CFSocketCreateWithSocketSignaturePtr = _lookup< + late final _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr = _lookup< ffi.NativeFunction< - CFSocketRef Function( - CFAllocatorRef, - ffi.Pointer, - CFOptionFlags, - CFSocketCallBack, - ffi.Pointer)>>( - 'CFSocketCreateWithSocketSignature'); - late final _CFSocketCreateWithSocketSignature = - _CFSocketCreateWithSocketSignaturePtr.asFunction< - CFSocketRef Function(CFAllocatorRef, ffi.Pointer, - int, CFSocketCallBack, ffi.Pointer)>(); + CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>>( + 'CFURLCreateResourcePropertiesForKeysFromBookmarkData'); + late final _CFURLCreateResourcePropertiesForKeysFromBookmarkData = + _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>(); - CFSocketRef CFSocketCreateConnectedToSocketSignature( + CFTypeRef CFURLCreateResourcePropertyForKeyFromBookmarkData( CFAllocatorRef allocator, - ffi.Pointer signature, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, - double timeout, + CFStringRef resourcePropertyKey, + CFDataRef bookmark, ) { - return _CFSocketCreateConnectedToSocketSignature( + return _CFURLCreateResourcePropertyForKeyFromBookmarkData( allocator, - signature, - callBackTypes, - callout, - context, - timeout, + resourcePropertyKey, + bookmark, ); } - late final _CFSocketCreateConnectedToSocketSignaturePtr = _lookup< + late final _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr = _lookup< ffi.NativeFunction< - CFSocketRef Function( - CFAllocatorRef, - ffi.Pointer, - CFOptionFlags, - CFSocketCallBack, - ffi.Pointer, - CFTimeInterval)>>('CFSocketCreateConnectedToSocketSignature'); - late final _CFSocketCreateConnectedToSocketSignature = - _CFSocketCreateConnectedToSocketSignaturePtr.asFunction< - CFSocketRef Function(CFAllocatorRef, ffi.Pointer, - int, CFSocketCallBack, ffi.Pointer, double)>(); + CFTypeRef Function(CFAllocatorRef, CFStringRef, + CFDataRef)>>('CFURLCreateResourcePropertyForKeyFromBookmarkData'); + late final _CFURLCreateResourcePropertyForKeyFromBookmarkData = + _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr.asFunction< + CFTypeRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); - int CFSocketSetAddress( - CFSocketRef s, - CFDataRef address, + CFDataRef CFURLCreateBookmarkDataFromFile( + CFAllocatorRef allocator, + CFURLRef fileURL, + ffi.Pointer errorRef, ) { - return _CFSocketSetAddress( - s, - address, + return _CFURLCreateBookmarkDataFromFile( + allocator, + fileURL, + errorRef, ); } - late final _CFSocketSetAddressPtr = - _lookup>( - 'CFSocketSetAddress'); - late final _CFSocketSetAddress = - _CFSocketSetAddressPtr.asFunction(); + late final _CFURLCreateBookmarkDataFromFilePtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, + ffi.Pointer)>>('CFURLCreateBookmarkDataFromFile'); + late final _CFURLCreateBookmarkDataFromFile = + _CFURLCreateBookmarkDataFromFilePtr.asFunction< + CFDataRef Function( + CFAllocatorRef, CFURLRef, ffi.Pointer)>(); - int CFSocketConnectToAddress( - CFSocketRef s, - CFDataRef address, - double timeout, + int CFURLWriteBookmarkDataToFile( + CFDataRef bookmarkRef, + CFURLRef fileURL, + int options, + ffi.Pointer errorRef, ) { - return _CFSocketConnectToAddress( - s, - address, - timeout, + return _CFURLWriteBookmarkDataToFile( + bookmarkRef, + fileURL, + options, + errorRef, ); } - late final _CFSocketConnectToAddressPtr = _lookup< + late final _CFURLWriteBookmarkDataToFilePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFSocketRef, CFDataRef, - CFTimeInterval)>>('CFSocketConnectToAddress'); - late final _CFSocketConnectToAddress = _CFSocketConnectToAddressPtr - .asFunction(); + Boolean Function( + CFDataRef, + CFURLRef, + CFURLBookmarkFileCreationOptions, + ffi.Pointer)>>('CFURLWriteBookmarkDataToFile'); + late final _CFURLWriteBookmarkDataToFile = + _CFURLWriteBookmarkDataToFilePtr.asFunction< + int Function(CFDataRef, CFURLRef, int, ffi.Pointer)>(); - void CFSocketInvalidate( - CFSocketRef s, + CFDataRef CFURLCreateBookmarkDataFromAliasRecord( + CFAllocatorRef allocatorRef, + CFDataRef aliasRecordDataRef, ) { - return _CFSocketInvalidate( - s, + return _CFURLCreateBookmarkDataFromAliasRecord( + allocatorRef, + aliasRecordDataRef, ); } - late final _CFSocketInvalidatePtr = - _lookup>( - 'CFSocketInvalidate'); - late final _CFSocketInvalidate = - _CFSocketInvalidatePtr.asFunction(); + late final _CFURLCreateBookmarkDataFromAliasRecordPtr = _lookup< + ffi.NativeFunction>( + 'CFURLCreateBookmarkDataFromAliasRecord'); + late final _CFURLCreateBookmarkDataFromAliasRecord = + _CFURLCreateBookmarkDataFromAliasRecordPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFDataRef)>(); - int CFSocketIsValid( - CFSocketRef s, + int CFURLStartAccessingSecurityScopedResource( + CFURLRef url, ) { - return _CFSocketIsValid( - s, + return _CFURLStartAccessingSecurityScopedResource( + url, ); } - late final _CFSocketIsValidPtr = - _lookup>( - 'CFSocketIsValid'); - late final _CFSocketIsValid = - _CFSocketIsValidPtr.asFunction(); + late final _CFURLStartAccessingSecurityScopedResourcePtr = + _lookup>( + 'CFURLStartAccessingSecurityScopedResource'); + late final _CFURLStartAccessingSecurityScopedResource = + _CFURLStartAccessingSecurityScopedResourcePtr.asFunction< + int Function(CFURLRef)>(); - CFDataRef CFSocketCopyAddress( - CFSocketRef s, + void CFURLStopAccessingSecurityScopedResource( + CFURLRef url, ) { - return _CFSocketCopyAddress( - s, + return _CFURLStopAccessingSecurityScopedResource( + url, ); } - late final _CFSocketCopyAddressPtr = - _lookup>( - 'CFSocketCopyAddress'); - late final _CFSocketCopyAddress = - _CFSocketCopyAddressPtr.asFunction(); + late final _CFURLStopAccessingSecurityScopedResourcePtr = + _lookup>( + 'CFURLStopAccessingSecurityScopedResource'); + late final _CFURLStopAccessingSecurityScopedResource = + _CFURLStopAccessingSecurityScopedResourcePtr.asFunction< + void Function(CFURLRef)>(); - CFDataRef CFSocketCopyPeerAddress( - CFSocketRef s, + late final ffi.Pointer _kCFRunLoopDefaultMode = + _lookup('kCFRunLoopDefaultMode'); + + CFRunLoopMode get kCFRunLoopDefaultMode => _kCFRunLoopDefaultMode.value; + + set kCFRunLoopDefaultMode(CFRunLoopMode value) => + _kCFRunLoopDefaultMode.value = value; + + late final ffi.Pointer _kCFRunLoopCommonModes = + _lookup('kCFRunLoopCommonModes'); + + CFRunLoopMode get kCFRunLoopCommonModes => _kCFRunLoopCommonModes.value; + + set kCFRunLoopCommonModes(CFRunLoopMode value) => + _kCFRunLoopCommonModes.value = value; + + int CFRunLoopGetTypeID() { + return _CFRunLoopGetTypeID(); + } + + late final _CFRunLoopGetTypeIDPtr = + _lookup>('CFRunLoopGetTypeID'); + late final _CFRunLoopGetTypeID = + _CFRunLoopGetTypeIDPtr.asFunction(); + + CFRunLoopRef CFRunLoopGetCurrent() { + return _CFRunLoopGetCurrent(); + } + + late final _CFRunLoopGetCurrentPtr = + _lookup>( + 'CFRunLoopGetCurrent'); + late final _CFRunLoopGetCurrent = + _CFRunLoopGetCurrentPtr.asFunction(); + + CFRunLoopRef CFRunLoopGetMain() { + return _CFRunLoopGetMain(); + } + + late final _CFRunLoopGetMainPtr = + _lookup>('CFRunLoopGetMain'); + late final _CFRunLoopGetMain = + _CFRunLoopGetMainPtr.asFunction(); + + CFRunLoopMode CFRunLoopCopyCurrentMode( + CFRunLoopRef rl, ) { - return _CFSocketCopyPeerAddress( - s, + return _CFRunLoopCopyCurrentMode( + rl, ); } - late final _CFSocketCopyPeerAddressPtr = - _lookup>( - 'CFSocketCopyPeerAddress'); - late final _CFSocketCopyPeerAddress = - _CFSocketCopyPeerAddressPtr.asFunction(); + late final _CFRunLoopCopyCurrentModePtr = + _lookup>( + 'CFRunLoopCopyCurrentMode'); + late final _CFRunLoopCopyCurrentMode = _CFRunLoopCopyCurrentModePtr + .asFunction(); - void CFSocketGetContext( - CFSocketRef s, - ffi.Pointer context, + CFArrayRef CFRunLoopCopyAllModes( + CFRunLoopRef rl, ) { - return _CFSocketGetContext( - s, - context, + return _CFRunLoopCopyAllModes( + rl, ); } - late final _CFSocketGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFSocketRef, - ffi.Pointer)>>('CFSocketGetContext'); - late final _CFSocketGetContext = _CFSocketGetContextPtr.asFunction< - void Function(CFSocketRef, ffi.Pointer)>(); + late final _CFRunLoopCopyAllModesPtr = + _lookup>( + 'CFRunLoopCopyAllModes'); + late final _CFRunLoopCopyAllModes = + _CFRunLoopCopyAllModesPtr.asFunction(); - int CFSocketGetNative( - CFSocketRef s, + void CFRunLoopAddCommonMode( + CFRunLoopRef rl, + CFRunLoopMode mode, ) { - return _CFSocketGetNative( - s, + return _CFRunLoopAddCommonMode( + rl, + mode, ); } - late final _CFSocketGetNativePtr = - _lookup>( - 'CFSocketGetNative'); - late final _CFSocketGetNative = - _CFSocketGetNativePtr.asFunction(); + late final _CFRunLoopAddCommonModePtr = _lookup< + ffi.NativeFunction>( + 'CFRunLoopAddCommonMode'); + late final _CFRunLoopAddCommonMode = _CFRunLoopAddCommonModePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopMode)>(); - CFRunLoopSourceRef CFSocketCreateRunLoopSource( - CFAllocatorRef allocator, - CFSocketRef s, - int order, + double CFRunLoopGetNextTimerFireDate( + CFRunLoopRef rl, + CFRunLoopMode mode, ) { - return _CFSocketCreateRunLoopSource( - allocator, - s, - order, + return _CFRunLoopGetNextTimerFireDate( + rl, + mode, ); } - late final _CFSocketCreateRunLoopSourcePtr = _lookup< + late final _CFRunLoopGetNextTimerFireDatePtr = _lookup< ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, - CFIndex)>>('CFSocketCreateRunLoopSource'); - late final _CFSocketCreateRunLoopSource = - _CFSocketCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, int)>(); + CFAbsoluteTime Function( + CFRunLoopRef, CFRunLoopMode)>>('CFRunLoopGetNextTimerFireDate'); + late final _CFRunLoopGetNextTimerFireDate = _CFRunLoopGetNextTimerFireDatePtr + .asFunction(); - int CFSocketGetSocketFlags( - CFSocketRef s, + void CFRunLoopRun() { + return _CFRunLoopRun(); + } + + late final _CFRunLoopRunPtr = + _lookup>('CFRunLoopRun'); + late final _CFRunLoopRun = _CFRunLoopRunPtr.asFunction(); + + int CFRunLoopRunInMode( + CFRunLoopMode mode, + double seconds, + int returnAfterSourceHandled, ) { - return _CFSocketGetSocketFlags( - s, + return _CFRunLoopRunInMode( + mode, + seconds, + returnAfterSourceHandled, ); } - late final _CFSocketGetSocketFlagsPtr = - _lookup>( - 'CFSocketGetSocketFlags'); - late final _CFSocketGetSocketFlags = - _CFSocketGetSocketFlagsPtr.asFunction(); + late final _CFRunLoopRunInModePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + CFRunLoopMode, CFTimeInterval, Boolean)>>('CFRunLoopRunInMode'); + late final _CFRunLoopRunInMode = _CFRunLoopRunInModePtr.asFunction< + int Function(CFRunLoopMode, double, int)>(); - void CFSocketSetSocketFlags( - CFSocketRef s, - int flags, + int CFRunLoopIsWaiting( + CFRunLoopRef rl, ) { - return _CFSocketSetSocketFlags( - s, - flags, + return _CFRunLoopIsWaiting( + rl, ); } - late final _CFSocketSetSocketFlagsPtr = _lookup< - ffi.NativeFunction>( - 'CFSocketSetSocketFlags'); - late final _CFSocketSetSocketFlags = - _CFSocketSetSocketFlagsPtr.asFunction(); + late final _CFRunLoopIsWaitingPtr = + _lookup>( + 'CFRunLoopIsWaiting'); + late final _CFRunLoopIsWaiting = + _CFRunLoopIsWaitingPtr.asFunction(); - void CFSocketDisableCallBacks( - CFSocketRef s, - int callBackTypes, + void CFRunLoopWakeUp( + CFRunLoopRef rl, ) { - return _CFSocketDisableCallBacks( - s, - callBackTypes, + return _CFRunLoopWakeUp( + rl, ); } - late final _CFSocketDisableCallBacksPtr = _lookup< - ffi.NativeFunction>( - 'CFSocketDisableCallBacks'); - late final _CFSocketDisableCallBacks = _CFSocketDisableCallBacksPtr - .asFunction(); + late final _CFRunLoopWakeUpPtr = + _lookup>( + 'CFRunLoopWakeUp'); + late final _CFRunLoopWakeUp = + _CFRunLoopWakeUpPtr.asFunction(); - void CFSocketEnableCallBacks( - CFSocketRef s, - int callBackTypes, + void CFRunLoopStop( + CFRunLoopRef rl, ) { - return _CFSocketEnableCallBacks( - s, - callBackTypes, + return _CFRunLoopStop( + rl, ); } - late final _CFSocketEnableCallBacksPtr = _lookup< - ffi.NativeFunction>( - 'CFSocketEnableCallBacks'); - late final _CFSocketEnableCallBacks = - _CFSocketEnableCallBacksPtr.asFunction(); + late final _CFRunLoopStopPtr = + _lookup>( + 'CFRunLoopStop'); + late final _CFRunLoopStop = + _CFRunLoopStopPtr.asFunction(); - int CFSocketSendData( - CFSocketRef s, - CFDataRef address, - CFDataRef data, - double timeout, + void CFRunLoopPerformBlock( + CFRunLoopRef rl, + CFTypeRef mode, + ffi.Pointer<_ObjCBlock> block, ) { - return _CFSocketSendData( - s, - address, - data, - timeout, + return _CFRunLoopPerformBlock( + rl, + mode, + block, ); } - late final _CFSocketSendDataPtr = _lookup< + late final _CFRunLoopPerformBlockPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFSocketRef, CFDataRef, CFDataRef, - CFTimeInterval)>>('CFSocketSendData'); - late final _CFSocketSendData = _CFSocketSendDataPtr.asFunction< - int Function(CFSocketRef, CFDataRef, CFDataRef, double)>(); + ffi.Void Function(CFRunLoopRef, CFTypeRef, + ffi.Pointer<_ObjCBlock>)>>('CFRunLoopPerformBlock'); + late final _CFRunLoopPerformBlock = _CFRunLoopPerformBlockPtr.asFunction< + void Function(CFRunLoopRef, CFTypeRef, ffi.Pointer<_ObjCBlock>)>(); - int CFSocketRegisterValue( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - CFPropertyListRef value, + int CFRunLoopContainsSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, ) { - return _CFSocketRegisterValue( - nameServerSignature, - timeout, - name, - value, + return _CFRunLoopContainsSource( + rl, + source, + mode, ); } - late final _CFSocketRegisterValuePtr = _lookup< + late final _CFRunLoopContainsSourcePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, CFTimeInterval, - CFStringRef, CFPropertyListRef)>>('CFSocketRegisterValue'); - late final _CFSocketRegisterValue = _CFSocketRegisterValuePtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef, - CFPropertyListRef)>(); + Boolean Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopContainsSource'); + late final _CFRunLoopContainsSource = _CFRunLoopContainsSourcePtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); - int CFSocketCopyRegisteredValue( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - ffi.Pointer value, - ffi.Pointer nameServerAddress, + void CFRunLoopAddSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, ) { - return _CFSocketCopyRegisteredValue( - nameServerSignature, - timeout, - name, - value, - nameServerAddress, + return _CFRunLoopAddSource( + rl, + source, + mode, ); } - late final _CFSocketCopyRegisteredValuePtr = _lookup< + late final _CFRunLoopAddSourcePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - CFTimeInterval, - CFStringRef, - ffi.Pointer, - ffi.Pointer)>>('CFSocketCopyRegisteredValue'); - late final _CFSocketCopyRegisteredValue = - _CFSocketCopyRegisteredValuePtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopAddSource'); + late final _CFRunLoopAddSource = _CFRunLoopAddSourcePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); - int CFSocketRegisterSocketSignature( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - ffi.Pointer signature, + void CFRunLoopRemoveSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, ) { - return _CFSocketRegisterSocketSignature( - nameServerSignature, - timeout, - name, - signature, + return _CFRunLoopRemoveSource( + rl, + source, + mode, ); } - late final _CFSocketRegisterSocketSignaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, CFTimeInterval, - CFStringRef, ffi.Pointer)>>( - 'CFSocketRegisterSocketSignature'); - late final _CFSocketRegisterSocketSignature = - _CFSocketRegisterSocketSignaturePtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef, - ffi.Pointer)>(); + late final _CFRunLoopRemoveSourcePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopRemoveSource'); + late final _CFRunLoopRemoveSource = _CFRunLoopRemoveSourcePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); - int CFSocketCopyRegisteredSocketSignature( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - ffi.Pointer signature, - ffi.Pointer nameServerAddress, + int CFRunLoopContainsObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, ) { - return _CFSocketCopyRegisteredSocketSignature( - nameServerSignature, - timeout, - name, - signature, - nameServerAddress, + return _CFRunLoopContainsObserver( + rl, + observer, + mode, ); } - late final _CFSocketCopyRegisteredSocketSignaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - CFTimeInterval, - CFStringRef, - ffi.Pointer, - ffi.Pointer)>>( - 'CFSocketCopyRegisteredSocketSignature'); - late final _CFSocketCopyRegisteredSocketSignature = - _CFSocketCopyRegisteredSocketSignaturePtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef, - ffi.Pointer, ffi.Pointer)>(); + late final _CFRunLoopContainsObserverPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopContainsObserver'); + late final _CFRunLoopContainsObserver = + _CFRunLoopContainsObserverPtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); - int CFSocketUnregister( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, + void CFRunLoopAddObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, ) { - return _CFSocketUnregister( - nameServerSignature, - timeout, - name, + return _CFRunLoopAddObserver( + rl, + observer, + mode, ); } - late final _CFSocketUnregisterPtr = _lookup< + late final _CFRunLoopAddObserverPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, CFTimeInterval, - CFStringRef)>>('CFSocketUnregister'); - late final _CFSocketUnregister = _CFSocketUnregisterPtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef)>(); + ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopAddObserver'); + late final _CFRunLoopAddObserver = _CFRunLoopAddObserverPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); - void CFSocketSetDefaultNameRegistryPortNumber( - int port, + void CFRunLoopRemoveObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, ) { - return _CFSocketSetDefaultNameRegistryPortNumber( - port, + return _CFRunLoopRemoveObserver( + rl, + observer, + mode, ); } - late final _CFSocketSetDefaultNameRegistryPortNumberPtr = - _lookup>( - 'CFSocketSetDefaultNameRegistryPortNumber'); - late final _CFSocketSetDefaultNameRegistryPortNumber = - _CFSocketSetDefaultNameRegistryPortNumberPtr.asFunction< - void Function(int)>(); - - int CFSocketGetDefaultNameRegistryPortNumber() { - return _CFSocketGetDefaultNameRegistryPortNumber(); - } - - late final _CFSocketGetDefaultNameRegistryPortNumberPtr = - _lookup>( - 'CFSocketGetDefaultNameRegistryPortNumber'); - late final _CFSocketGetDefaultNameRegistryPortNumber = - _CFSocketGetDefaultNameRegistryPortNumberPtr.asFunction(); - - late final ffi.Pointer _kCFSocketCommandKey = - _lookup('kCFSocketCommandKey'); - - CFStringRef get kCFSocketCommandKey => _kCFSocketCommandKey.value; - - set kCFSocketCommandKey(CFStringRef value) => - _kCFSocketCommandKey.value = value; - - late final ffi.Pointer _kCFSocketNameKey = - _lookup('kCFSocketNameKey'); - - CFStringRef get kCFSocketNameKey => _kCFSocketNameKey.value; - - set kCFSocketNameKey(CFStringRef value) => _kCFSocketNameKey.value = value; - - late final ffi.Pointer _kCFSocketValueKey = - _lookup('kCFSocketValueKey'); - - CFStringRef get kCFSocketValueKey => _kCFSocketValueKey.value; - - set kCFSocketValueKey(CFStringRef value) => _kCFSocketValueKey.value = value; - - late final ffi.Pointer _kCFSocketResultKey = - _lookup('kCFSocketResultKey'); - - CFStringRef get kCFSocketResultKey => _kCFSocketResultKey.value; - - set kCFSocketResultKey(CFStringRef value) => - _kCFSocketResultKey.value = value; - - late final ffi.Pointer _kCFSocketErrorKey = - _lookup('kCFSocketErrorKey'); - - CFStringRef get kCFSocketErrorKey => _kCFSocketErrorKey.value; - - set kCFSocketErrorKey(CFStringRef value) => _kCFSocketErrorKey.value = value; - - late final ffi.Pointer _kCFSocketRegisterCommand = - _lookup('kCFSocketRegisterCommand'); - - CFStringRef get kCFSocketRegisterCommand => _kCFSocketRegisterCommand.value; - - set kCFSocketRegisterCommand(CFStringRef value) => - _kCFSocketRegisterCommand.value = value; - - late final ffi.Pointer _kCFSocketRetrieveCommand = - _lookup('kCFSocketRetrieveCommand'); - - CFStringRef get kCFSocketRetrieveCommand => _kCFSocketRetrieveCommand.value; - - set kCFSocketRetrieveCommand(CFStringRef value) => - _kCFSocketRetrieveCommand.value = value; + late final _CFRunLoopRemoveObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopRemoveObserver'); + late final _CFRunLoopRemoveObserver = _CFRunLoopRemoveObserverPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); - int getattrlistbulk( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + int CFRunLoopContainsTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, ) { - return _getattrlistbulk( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFRunLoopContainsTimer( + rl, + timer, + mode, ); } - late final _getattrlistbulkPtr = _lookup< + late final _CFRunLoopContainsTimerPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer, ffi.Size, ffi.Uint64)>>('getattrlistbulk'); - late final _getattrlistbulk = _getattrlistbulkPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer, int, int)>(); + Boolean Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopContainsTimer'); + late final _CFRunLoopContainsTimer = _CFRunLoopContainsTimerPtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); - int getattrlistat( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - int arg4, - int arg5, + void CFRunLoopAddTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, ) { - return _getattrlistat( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _CFRunLoopAddTimer( + rl, + timer, + mode, ); } - late final _getattrlistatPtr = _lookup< + late final _CFRunLoopAddTimerPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedLong)>>('getattrlistat'); - late final _getattrlistat = _getattrlistatPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopAddTimer'); + late final _CFRunLoopAddTimer = _CFRunLoopAddTimerPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); - int setattrlistat( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - int arg4, - int arg5, + void CFRunLoopRemoveTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, ) { - return _setattrlistat( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _CFRunLoopRemoveTimer( + rl, + timer, + mode, ); } - late final _setattrlistatPtr = _lookup< + late final _CFRunLoopRemoveTimerPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Uint32)>>('setattrlistat'); - late final _setattrlistat = _setattrlistatPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopRemoveTimer'); + late final _CFRunLoopRemoveTimer = _CFRunLoopRemoveTimerPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); - int faccessat( - int arg0, - ffi.Pointer arg1, - int arg2, - int arg3, - ) { - return _faccessat( - arg0, - arg1, - arg2, - arg3, - ); + int CFRunLoopSourceGetTypeID() { + return _CFRunLoopSourceGetTypeID(); } - late final _faccessatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int, ffi.Int)>>('faccessat'); - late final _faccessat = _faccessatPtr - .asFunction, int, int)>(); + late final _CFRunLoopSourceGetTypeIDPtr = + _lookup>( + 'CFRunLoopSourceGetTypeID'); + late final _CFRunLoopSourceGetTypeID = + _CFRunLoopSourceGetTypeIDPtr.asFunction(); - int fchownat( - int arg0, - ffi.Pointer arg1, - int arg2, - int arg3, - int arg4, + CFRunLoopSourceRef CFRunLoopSourceCreate( + CFAllocatorRef allocator, + int order, + ffi.Pointer context, ) { - return _fchownat( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFRunLoopSourceCreate( + allocator, + order, + context, ); } - late final _fchownatPtr = _lookup< + late final _CFRunLoopSourceCreatePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, uid_t, gid_t, - ffi.Int)>>('fchownat'); - late final _fchownat = _fchownatPtr - .asFunction, int, int, int)>(); + CFRunLoopSourceRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFRunLoopSourceCreate'); + late final _CFRunLoopSourceCreate = _CFRunLoopSourceCreatePtr.asFunction< + CFRunLoopSourceRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - int linkat( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, - int arg4, + int CFRunLoopSourceGetOrder( + CFRunLoopSourceRef source, ) { - return _linkat( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFRunLoopSourceGetOrder( + source, ); } - late final _linkatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Pointer, ffi.Int)>>('linkat'); - late final _linkat = _linkatPtr.asFunction< - int Function( - int, ffi.Pointer, int, ffi.Pointer, int)>(); + late final _CFRunLoopSourceGetOrderPtr = + _lookup>( + 'CFRunLoopSourceGetOrder'); + late final _CFRunLoopSourceGetOrder = _CFRunLoopSourceGetOrderPtr.asFunction< + int Function(CFRunLoopSourceRef)>(); - int readlinkat( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, + void CFRunLoopSourceInvalidate( + CFRunLoopSourceRef source, ) { - return _readlinkat( - arg0, - arg1, - arg2, - arg3, + return _CFRunLoopSourceInvalidate( + source, ); } - late final _readlinkatPtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Int, ffi.Pointer, - ffi.Pointer, ffi.Size)>>('readlinkat'); - late final _readlinkat = _readlinkatPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, int)>(); + late final _CFRunLoopSourceInvalidatePtr = + _lookup>( + 'CFRunLoopSourceInvalidate'); + late final _CFRunLoopSourceInvalidate = _CFRunLoopSourceInvalidatePtr + .asFunction(); - int symlinkat( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + int CFRunLoopSourceIsValid( + CFRunLoopSourceRef source, ) { - return _symlinkat( - arg0, - arg1, - arg2, + return _CFRunLoopSourceIsValid( + source, ); } - late final _symlinkatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer)>>('symlinkat'); - late final _symlinkat = _symlinkatPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); + late final _CFRunLoopSourceIsValidPtr = + _lookup>( + 'CFRunLoopSourceIsValid'); + late final _CFRunLoopSourceIsValid = + _CFRunLoopSourceIsValidPtr.asFunction(); - int unlinkat( - int arg0, - ffi.Pointer arg1, - int arg2, + void CFRunLoopSourceGetContext( + CFRunLoopSourceRef source, + ffi.Pointer context, ) { - return _unlinkat( - arg0, - arg1, - arg2, + return _CFRunLoopSourceGetContext( + source, + context, ); } - late final _unlinkatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int)>>('unlinkat'); - late final _unlinkat = - _unlinkatPtr.asFunction, int)>(); + late final _CFRunLoopSourceGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFRunLoopSourceRef, ffi.Pointer)>>( + 'CFRunLoopSourceGetContext'); + late final _CFRunLoopSourceGetContext = + _CFRunLoopSourceGetContextPtr.asFunction< + void Function( + CFRunLoopSourceRef, ffi.Pointer)>(); - void _exit( - int arg0, + void CFRunLoopSourceSignal( + CFRunLoopSourceRef source, ) { - return __exit( - arg0, + return _CFRunLoopSourceSignal( + source, ); } - late final __exitPtr = - _lookup>('_exit'); - late final __exit = __exitPtr.asFunction(); + late final _CFRunLoopSourceSignalPtr = + _lookup>( + 'CFRunLoopSourceSignal'); + late final _CFRunLoopSourceSignal = + _CFRunLoopSourceSignalPtr.asFunction(); - int access( - ffi.Pointer arg0, - int arg1, - ) { - return _access( - arg0, - arg1, - ); + int CFRunLoopObserverGetTypeID() { + return _CFRunLoopObserverGetTypeID(); } - late final _accessPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'access'); - late final _access = - _accessPtr.asFunction, int)>(); + late final _CFRunLoopObserverGetTypeIDPtr = + _lookup>( + 'CFRunLoopObserverGetTypeID'); + late final _CFRunLoopObserverGetTypeID = + _CFRunLoopObserverGetTypeIDPtr.asFunction(); - int alarm( - int arg0, + CFRunLoopObserverRef CFRunLoopObserverCreate( + CFAllocatorRef allocator, + int activities, + int repeats, + int order, + CFRunLoopObserverCallBack callout, + ffi.Pointer context, ) { - return _alarm( - arg0, + return _CFRunLoopObserverCreate( + allocator, + activities, + repeats, + order, + callout, + context, ); } - late final _alarmPtr = - _lookup>( - 'alarm'); - late final _alarm = _alarmPtr.asFunction(); + late final _CFRunLoopObserverCreatePtr = _lookup< + ffi.NativeFunction< + CFRunLoopObserverRef Function( + CFAllocatorRef, + CFOptionFlags, + Boolean, + CFIndex, + CFRunLoopObserverCallBack, + ffi.Pointer)>>( + 'CFRunLoopObserverCreate'); + late final _CFRunLoopObserverCreate = _CFRunLoopObserverCreatePtr.asFunction< + CFRunLoopObserverRef Function(CFAllocatorRef, int, int, int, + CFRunLoopObserverCallBack, ffi.Pointer)>(); - int chdir( - ffi.Pointer arg0, + CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler( + CFAllocatorRef allocator, + int activities, + int repeats, + int order, + ffi.Pointer<_ObjCBlock> block, ) { - return _chdir( - arg0, + return _CFRunLoopObserverCreateWithHandler( + allocator, + activities, + repeats, + order, + block, ); } - late final _chdirPtr = - _lookup)>>( - 'chdir'); - late final _chdir = - _chdirPtr.asFunction)>(); + late final _CFRunLoopObserverCreateWithHandlerPtr = _lookup< + ffi.NativeFunction< + CFRunLoopObserverRef Function( + CFAllocatorRef, + CFOptionFlags, + Boolean, + CFIndex, + ffi.Pointer<_ObjCBlock>)>>('CFRunLoopObserverCreateWithHandler'); + late final _CFRunLoopObserverCreateWithHandler = + _CFRunLoopObserverCreateWithHandlerPtr.asFunction< + CFRunLoopObserverRef Function( + CFAllocatorRef, int, int, int, ffi.Pointer<_ObjCBlock>)>(); - int chown( - ffi.Pointer arg0, - int arg1, - int arg2, + int CFRunLoopObserverGetActivities( + CFRunLoopObserverRef observer, ) { - return _chown( - arg0, - arg1, - arg2, + return _CFRunLoopObserverGetActivities( + observer, ); } - late final _chownPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('chown'); - late final _chown = - _chownPtr.asFunction, int, int)>(); + late final _CFRunLoopObserverGetActivitiesPtr = + _lookup>( + 'CFRunLoopObserverGetActivities'); + late final _CFRunLoopObserverGetActivities = + _CFRunLoopObserverGetActivitiesPtr.asFunction< + int Function(CFRunLoopObserverRef)>(); - int close( - int arg0, + int CFRunLoopObserverDoesRepeat( + CFRunLoopObserverRef observer, ) { - return _close( - arg0, + return _CFRunLoopObserverDoesRepeat( + observer, ); } - late final _closePtr = - _lookup>('close'); - late final _close = _closePtr.asFunction(); + late final _CFRunLoopObserverDoesRepeatPtr = + _lookup>( + 'CFRunLoopObserverDoesRepeat'); + late final _CFRunLoopObserverDoesRepeat = _CFRunLoopObserverDoesRepeatPtr + .asFunction(); - int dup( - int arg0, + int CFRunLoopObserverGetOrder( + CFRunLoopObserverRef observer, ) { - return _dup( - arg0, + return _CFRunLoopObserverGetOrder( + observer, ); } - late final _dupPtr = - _lookup>('dup'); - late final _dup = _dupPtr.asFunction(); + late final _CFRunLoopObserverGetOrderPtr = + _lookup>( + 'CFRunLoopObserverGetOrder'); + late final _CFRunLoopObserverGetOrder = _CFRunLoopObserverGetOrderPtr + .asFunction(); - int dup2( - int arg0, - int arg1, + void CFRunLoopObserverInvalidate( + CFRunLoopObserverRef observer, ) { - return _dup2( - arg0, - arg1, + return _CFRunLoopObserverInvalidate( + observer, ); } - late final _dup2Ptr = - _lookup>('dup2'); - late final _dup2 = _dup2Ptr.asFunction(); + late final _CFRunLoopObserverInvalidatePtr = + _lookup>( + 'CFRunLoopObserverInvalidate'); + late final _CFRunLoopObserverInvalidate = _CFRunLoopObserverInvalidatePtr + .asFunction(); - int execl( - ffi.Pointer __path, - ffi.Pointer __arg0, + int CFRunLoopObserverIsValid( + CFRunLoopObserverRef observer, ) { - return _execl( - __path, - __arg0, + return _CFRunLoopObserverIsValid( + observer, ); } - late final _execlPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('execl'); - late final _execl = _execlPtr - .asFunction, ffi.Pointer)>(); + late final _CFRunLoopObserverIsValidPtr = + _lookup>( + 'CFRunLoopObserverIsValid'); + late final _CFRunLoopObserverIsValid = _CFRunLoopObserverIsValidPtr + .asFunction(); - int execle( - ffi.Pointer __path, - ffi.Pointer __arg0, + void CFRunLoopObserverGetContext( + CFRunLoopObserverRef observer, + ffi.Pointer context, ) { - return _execle( - __path, - __arg0, + return _CFRunLoopObserverGetContext( + observer, + context, ); } - late final _execlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('execle'); - late final _execle = _execlePtr - .asFunction, ffi.Pointer)>(); + late final _CFRunLoopObserverGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef, + ffi.Pointer)>>( + 'CFRunLoopObserverGetContext'); + late final _CFRunLoopObserverGetContext = + _CFRunLoopObserverGetContextPtr.asFunction< + void Function( + CFRunLoopObserverRef, ffi.Pointer)>(); - int execlp( - ffi.Pointer __file, - ffi.Pointer __arg0, - ) { - return _execlp( - __file, - __arg0, - ); + int CFRunLoopTimerGetTypeID() { + return _CFRunLoopTimerGetTypeID(); } - late final _execlpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('execlp'); - late final _execlp = _execlpPtr - .asFunction, ffi.Pointer)>(); + late final _CFRunLoopTimerGetTypeIDPtr = + _lookup>( + 'CFRunLoopTimerGetTypeID'); + late final _CFRunLoopTimerGetTypeID = + _CFRunLoopTimerGetTypeIDPtr.asFunction(); - int execv( - ffi.Pointer __path, - ffi.Pointer> __argv, + CFRunLoopTimerRef CFRunLoopTimerCreate( + CFAllocatorRef allocator, + double fireDate, + double interval, + int flags, + int order, + CFRunLoopTimerCallBack callout, + ffi.Pointer context, ) { - return _execv( - __path, - __argv, + return _CFRunLoopTimerCreate( + allocator, + fireDate, + interval, + flags, + order, + callout, + context, ); } - late final _execvPtr = _lookup< + late final _CFRunLoopTimerCreatePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('execv'); - late final _execv = _execvPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); + CFRunLoopTimerRef Function( + CFAllocatorRef, + CFAbsoluteTime, + CFTimeInterval, + CFOptionFlags, + CFIndex, + CFRunLoopTimerCallBack, + ffi.Pointer)>>('CFRunLoopTimerCreate'); + late final _CFRunLoopTimerCreate = _CFRunLoopTimerCreatePtr.asFunction< + CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, + CFRunLoopTimerCallBack, ffi.Pointer)>(); - int execve( - ffi.Pointer __file, - ffi.Pointer> __argv, - ffi.Pointer> __envp, + CFRunLoopTimerRef CFRunLoopTimerCreateWithHandler( + CFAllocatorRef allocator, + double fireDate, + double interval, + int flags, + int order, + ffi.Pointer<_ObjCBlock> block, ) { - return _execve( - __file, - __argv, - __envp, + return _CFRunLoopTimerCreateWithHandler( + allocator, + fireDate, + interval, + flags, + order, + block, ); } - late final _execvePtr = _lookup< + late final _CFRunLoopTimerCreateWithHandlerPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('execve'); - late final _execve = _execvePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer>, - ffi.Pointer>)>(); + CFRunLoopTimerRef Function( + CFAllocatorRef, + CFAbsoluteTime, + CFTimeInterval, + CFOptionFlags, + CFIndex, + ffi.Pointer<_ObjCBlock>)>>('CFRunLoopTimerCreateWithHandler'); + late final _CFRunLoopTimerCreateWithHandler = + _CFRunLoopTimerCreateWithHandlerPtr.asFunction< + CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, + ffi.Pointer<_ObjCBlock>)>(); - int execvp( - ffi.Pointer __file, - ffi.Pointer> __argv, + double CFRunLoopTimerGetNextFireDate( + CFRunLoopTimerRef timer, ) { - return _execvp( - __file, - __argv, + return _CFRunLoopTimerGetNextFireDate( + timer, ); } - late final _execvpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('execvp'); - late final _execvp = _execvpPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); - - int fork() { - return _fork(); - } - - late final _forkPtr = _lookup>('fork'); - late final _fork = _forkPtr.asFunction(); + late final _CFRunLoopTimerGetNextFireDatePtr = + _lookup>( + 'CFRunLoopTimerGetNextFireDate'); + late final _CFRunLoopTimerGetNextFireDate = _CFRunLoopTimerGetNextFireDatePtr + .asFunction(); - int fpathconf( - int arg0, - int arg1, + void CFRunLoopTimerSetNextFireDate( + CFRunLoopTimerRef timer, + double fireDate, ) { - return _fpathconf( - arg0, - arg1, + return _CFRunLoopTimerSetNextFireDate( + timer, + fireDate, ); } - late final _fpathconfPtr = - _lookup>( - 'fpathconf'); - late final _fpathconf = _fpathconfPtr.asFunction(); + late final _CFRunLoopTimerSetNextFireDatePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopTimerRef, + CFAbsoluteTime)>>('CFRunLoopTimerSetNextFireDate'); + late final _CFRunLoopTimerSetNextFireDate = _CFRunLoopTimerSetNextFireDatePtr + .asFunction(); - ffi.Pointer getcwd( - ffi.Pointer arg0, - int arg1, + double CFRunLoopTimerGetInterval( + CFRunLoopTimerRef timer, ) { - return _getcwd( - arg0, - arg1, + return _CFRunLoopTimerGetInterval( + timer, ); } - late final _getcwdPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('getcwd'); - late final _getcwd = _getcwdPtr - .asFunction Function(ffi.Pointer, int)>(); - - int getegid() { - return _getegid(); - } - - late final _getegidPtr = - _lookup>('getegid'); - late final _getegid = _getegidPtr.asFunction(); - - int geteuid() { - return _geteuid(); - } - - late final _geteuidPtr = - _lookup>('geteuid'); - late final _geteuid = _geteuidPtr.asFunction(); - - int getgid() { - return _getgid(); - } - - late final _getgidPtr = - _lookup>('getgid'); - late final _getgid = _getgidPtr.asFunction(); + late final _CFRunLoopTimerGetIntervalPtr = + _lookup>( + 'CFRunLoopTimerGetInterval'); + late final _CFRunLoopTimerGetInterval = _CFRunLoopTimerGetIntervalPtr + .asFunction(); - int getgroups( - int arg0, - ffi.Pointer arg1, + int CFRunLoopTimerDoesRepeat( + CFRunLoopTimerRef timer, ) { - return _getgroups( - arg0, - arg1, + return _CFRunLoopTimerDoesRepeat( + timer, ); } - late final _getgroupsPtr = _lookup< - ffi.NativeFunction)>>( - 'getgroups'); - late final _getgroups = - _getgroupsPtr.asFunction)>(); - - ffi.Pointer getlogin() { - return _getlogin(); - } - - late final _getloginPtr = - _lookup Function()>>('getlogin'); - late final _getlogin = - _getloginPtr.asFunction Function()>(); - - int getpgrp() { - return _getpgrp(); - } - - late final _getpgrpPtr = - _lookup>('getpgrp'); - late final _getpgrp = _getpgrpPtr.asFunction(); - - int getpid() { - return _getpid(); - } - - late final _getpidPtr = - _lookup>('getpid'); - late final _getpid = _getpidPtr.asFunction(); + late final _CFRunLoopTimerDoesRepeatPtr = + _lookup>( + 'CFRunLoopTimerDoesRepeat'); + late final _CFRunLoopTimerDoesRepeat = _CFRunLoopTimerDoesRepeatPtr + .asFunction(); - int getppid() { - return _getppid(); + int CFRunLoopTimerGetOrder( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerGetOrder( + timer, + ); } - late final _getppidPtr = - _lookup>('getppid'); - late final _getppid = _getppidPtr.asFunction(); + late final _CFRunLoopTimerGetOrderPtr = + _lookup>( + 'CFRunLoopTimerGetOrder'); + late final _CFRunLoopTimerGetOrder = + _CFRunLoopTimerGetOrderPtr.asFunction(); - int getuid() { - return _getuid(); + void CFRunLoopTimerInvalidate( + CFRunLoopTimerRef timer, + ) { + return _CFRunLoopTimerInvalidate( + timer, + ); } - late final _getuidPtr = - _lookup>('getuid'); - late final _getuid = _getuidPtr.asFunction(); + late final _CFRunLoopTimerInvalidatePtr = + _lookup>( + 'CFRunLoopTimerInvalidate'); + late final _CFRunLoopTimerInvalidate = _CFRunLoopTimerInvalidatePtr + .asFunction(); - int isatty( - int arg0, + int CFRunLoopTimerIsValid( + CFRunLoopTimerRef timer, ) { - return _isatty( - arg0, + return _CFRunLoopTimerIsValid( + timer, ); } - late final _isattyPtr = - _lookup>('isatty'); - late final _isatty = _isattyPtr.asFunction(); + late final _CFRunLoopTimerIsValidPtr = + _lookup>( + 'CFRunLoopTimerIsValid'); + late final _CFRunLoopTimerIsValid = + _CFRunLoopTimerIsValidPtr.asFunction(); - int link( - ffi.Pointer arg0, - ffi.Pointer arg1, + void CFRunLoopTimerGetContext( + CFRunLoopTimerRef timer, + ffi.Pointer context, ) { - return _link( - arg0, - arg1, + return _CFRunLoopTimerGetContext( + timer, + context, ); } - late final _linkPtr = _lookup< + late final _CFRunLoopTimerGetContextPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('link'); - late final _link = _linkPtr - .asFunction, ffi.Pointer)>(); + ffi.Void Function(CFRunLoopTimerRef, + ffi.Pointer)>>('CFRunLoopTimerGetContext'); + late final _CFRunLoopTimerGetContext = + _CFRunLoopTimerGetContextPtr.asFunction< + void Function( + CFRunLoopTimerRef, ffi.Pointer)>(); - int lseek( - int arg0, - int arg1, - int arg2, + double CFRunLoopTimerGetTolerance( + CFRunLoopTimerRef timer, ) { - return _lseek( - arg0, - arg1, - arg2, + return _CFRunLoopTimerGetTolerance( + timer, ); } - late final _lseekPtr = - _lookup>( - 'lseek'); - late final _lseek = _lseekPtr.asFunction(); + late final _CFRunLoopTimerGetTolerancePtr = + _lookup>( + 'CFRunLoopTimerGetTolerance'); + late final _CFRunLoopTimerGetTolerance = _CFRunLoopTimerGetTolerancePtr + .asFunction(); - int pathconf( - ffi.Pointer arg0, - int arg1, + void CFRunLoopTimerSetTolerance( + CFRunLoopTimerRef timer, + double tolerance, ) { - return _pathconf( - arg0, - arg1, + return _CFRunLoopTimerSetTolerance( + timer, + tolerance, ); } - late final _pathconfPtr = _lookup< + late final _CFRunLoopTimerSetTolerancePtr = _lookup< ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Int)>>('pathconf'); - late final _pathconf = - _pathconfPtr.asFunction, int)>(); + ffi.Void Function(CFRunLoopTimerRef, + CFTimeInterval)>>('CFRunLoopTimerSetTolerance'); + late final _CFRunLoopTimerSetTolerance = _CFRunLoopTimerSetTolerancePtr + .asFunction(); - int pause() { - return _pause(); + int CFSocketGetTypeID() { + return _CFSocketGetTypeID(); } - late final _pausePtr = - _lookup>('pause'); - late final _pause = _pausePtr.asFunction(); + late final _CFSocketGetTypeIDPtr = + _lookup>('CFSocketGetTypeID'); + late final _CFSocketGetTypeID = + _CFSocketGetTypeIDPtr.asFunction(); - int pipe( - ffi.Pointer arg0, + CFSocketRef CFSocketCreate( + CFAllocatorRef allocator, + int protocolFamily, + int socketType, + int protocol, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, ) { - return _pipe( - arg0, + return _CFSocketCreate( + allocator, + protocolFamily, + socketType, + protocol, + callBackTypes, + callout, + context, ); } - late final _pipePtr = - _lookup)>>( - 'pipe'); - late final _pipe = _pipePtr.asFunction)>(); + late final _CFSocketCreatePtr = _lookup< + ffi.NativeFunction< + CFSocketRef Function( + CFAllocatorRef, + SInt32, + SInt32, + SInt32, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer)>>('CFSocketCreate'); + late final _CFSocketCreate = _CFSocketCreatePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, int, int, int, int, CFSocketCallBack, + ffi.Pointer)>(); - int read( - int arg0, - ffi.Pointer arg1, - int arg2, + CFSocketRef CFSocketCreateWithNative( + CFAllocatorRef allocator, + int sock, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, ) { - return _read( - arg0, - arg1, - arg2, + return _CFSocketCreateWithNative( + allocator, + sock, + callBackTypes, + callout, + context, ); } - late final _readPtr = _lookup< + late final _CFSocketCreateWithNativePtr = _lookup< ffi.NativeFunction< - ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('read'); - late final _read = - _readPtr.asFunction, int)>(); + CFSocketRef Function( + CFAllocatorRef, + CFSocketNativeHandle, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer)>>('CFSocketCreateWithNative'); + late final _CFSocketCreateWithNative = + _CFSocketCreateWithNativePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, int, int, CFSocketCallBack, + ffi.Pointer)>(); - int rmdir( - ffi.Pointer arg0, + CFSocketRef CFSocketCreateWithSocketSignature( + CFAllocatorRef allocator, + ffi.Pointer signature, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, ) { - return _rmdir( - arg0, + return _CFSocketCreateWithSocketSignature( + allocator, + signature, + callBackTypes, + callout, + context, ); } - late final _rmdirPtr = - _lookup)>>( - 'rmdir'); - late final _rmdir = - _rmdirPtr.asFunction)>(); - - int setgid( - int arg0, - ) { - return _setgid( - arg0, - ); - } - - late final _setgidPtr = - _lookup>('setgid'); - late final _setgid = _setgidPtr.asFunction(); + late final _CFSocketCreateWithSocketSignaturePtr = _lookup< + ffi.NativeFunction< + CFSocketRef Function( + CFAllocatorRef, + ffi.Pointer, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer)>>( + 'CFSocketCreateWithSocketSignature'); + late final _CFSocketCreateWithSocketSignature = + _CFSocketCreateWithSocketSignaturePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, ffi.Pointer, + int, CFSocketCallBack, ffi.Pointer)>(); - int setpgid( - int arg0, - int arg1, + CFSocketRef CFSocketCreateConnectedToSocketSignature( + CFAllocatorRef allocator, + ffi.Pointer signature, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, + double timeout, ) { - return _setpgid( - arg0, - arg1, + return _CFSocketCreateConnectedToSocketSignature( + allocator, + signature, + callBackTypes, + callout, + context, + timeout, ); } - late final _setpgidPtr = - _lookup>('setpgid'); - late final _setpgid = _setpgidPtr.asFunction(); - - int setsid() { - return _setsid(); - } - - late final _setsidPtr = - _lookup>('setsid'); - late final _setsid = _setsidPtr.asFunction(); + late final _CFSocketCreateConnectedToSocketSignaturePtr = _lookup< + ffi.NativeFunction< + CFSocketRef Function( + CFAllocatorRef, + ffi.Pointer, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer, + CFTimeInterval)>>('CFSocketCreateConnectedToSocketSignature'); + late final _CFSocketCreateConnectedToSocketSignature = + _CFSocketCreateConnectedToSocketSignaturePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, ffi.Pointer, + int, CFSocketCallBack, ffi.Pointer, double)>(); - int setuid( - int arg0, + int CFSocketSetAddress( + CFSocketRef s, + CFDataRef address, ) { - return _setuid( - arg0, + return _CFSocketSetAddress( + s, + address, ); } - late final _setuidPtr = - _lookup>('setuid'); - late final _setuid = _setuidPtr.asFunction(); + late final _CFSocketSetAddressPtr = + _lookup>( + 'CFSocketSetAddress'); + late final _CFSocketSetAddress = + _CFSocketSetAddressPtr.asFunction(); - int sleep( - int arg0, + int CFSocketConnectToAddress( + CFSocketRef s, + CFDataRef address, + double timeout, ) { - return _sleep( - arg0, + return _CFSocketConnectToAddress( + s, + address, + timeout, ); } - late final _sleepPtr = - _lookup>( - 'sleep'); - late final _sleep = _sleepPtr.asFunction(); + late final _CFSocketConnectToAddressPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFSocketRef, CFDataRef, + CFTimeInterval)>>('CFSocketConnectToAddress'); + late final _CFSocketConnectToAddress = _CFSocketConnectToAddressPtr + .asFunction(); - int sysconf( - int arg0, + void CFSocketInvalidate( + CFSocketRef s, ) { - return _sysconf( - arg0, + return _CFSocketInvalidate( + s, ); } - late final _sysconfPtr = - _lookup>('sysconf'); - late final _sysconf = _sysconfPtr.asFunction(); + late final _CFSocketInvalidatePtr = + _lookup>( + 'CFSocketInvalidate'); + late final _CFSocketInvalidate = + _CFSocketInvalidatePtr.asFunction(); - int tcgetpgrp( - int arg0, + int CFSocketIsValid( + CFSocketRef s, ) { - return _tcgetpgrp( - arg0, + return _CFSocketIsValid( + s, ); } - late final _tcgetpgrpPtr = - _lookup>('tcgetpgrp'); - late final _tcgetpgrp = _tcgetpgrpPtr.asFunction(); + late final _CFSocketIsValidPtr = + _lookup>( + 'CFSocketIsValid'); + late final _CFSocketIsValid = + _CFSocketIsValidPtr.asFunction(); - int tcsetpgrp( - int arg0, - int arg1, + CFDataRef CFSocketCopyAddress( + CFSocketRef s, ) { - return _tcsetpgrp( - arg0, - arg1, + return _CFSocketCopyAddress( + s, ); } - late final _tcsetpgrpPtr = - _lookup>( - 'tcsetpgrp'); - late final _tcsetpgrp = _tcsetpgrpPtr.asFunction(); + late final _CFSocketCopyAddressPtr = + _lookup>( + 'CFSocketCopyAddress'); + late final _CFSocketCopyAddress = + _CFSocketCopyAddressPtr.asFunction(); - ffi.Pointer ttyname( - int arg0, + CFDataRef CFSocketCopyPeerAddress( + CFSocketRef s, ) { - return _ttyname( - arg0, + return _CFSocketCopyPeerAddress( + s, ); } - late final _ttynamePtr = - _lookup Function(ffi.Int)>>( - 'ttyname'); - late final _ttyname = - _ttynamePtr.asFunction Function(int)>(); + late final _CFSocketCopyPeerAddressPtr = + _lookup>( + 'CFSocketCopyPeerAddress'); + late final _CFSocketCopyPeerAddress = + _CFSocketCopyPeerAddressPtr.asFunction(); - int ttyname_r( - int arg0, - ffi.Pointer arg1, - int arg2, + void CFSocketGetContext( + CFSocketRef s, + ffi.Pointer context, ) { - return _ttyname_r( - arg0, - arg1, - arg2, + return _CFSocketGetContext( + s, + context, ); } - late final _ttyname_rPtr = _lookup< + late final _CFSocketGetContextPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('ttyname_r'); - late final _ttyname_r = - _ttyname_rPtr.asFunction, int)>(); + ffi.Void Function(CFSocketRef, + ffi.Pointer)>>('CFSocketGetContext'); + late final _CFSocketGetContext = _CFSocketGetContextPtr.asFunction< + void Function(CFSocketRef, ffi.Pointer)>(); - int unlink( - ffi.Pointer arg0, + int CFSocketGetNative( + CFSocketRef s, ) { - return _unlink( - arg0, + return _CFSocketGetNative( + s, ); } - late final _unlinkPtr = - _lookup)>>( - 'unlink'); - late final _unlink = - _unlinkPtr.asFunction)>(); + late final _CFSocketGetNativePtr = + _lookup>( + 'CFSocketGetNative'); + late final _CFSocketGetNative = + _CFSocketGetNativePtr.asFunction(); - int write( - int __fd, - ffi.Pointer __buf, - int __nbyte, + CFRunLoopSourceRef CFSocketCreateRunLoopSource( + CFAllocatorRef allocator, + CFSocketRef s, + int order, ) { - return _write( - __fd, - __buf, - __nbyte, + return _CFSocketCreateRunLoopSource( + allocator, + s, + order, ); } - late final _writePtr = _lookup< + late final _CFSocketCreateRunLoopSourcePtr = _lookup< ffi.NativeFunction< - ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('write'); - late final _write = - _writePtr.asFunction, int)>(); + CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, + CFIndex)>>('CFSocketCreateRunLoopSource'); + late final _CFSocketCreateRunLoopSource = + _CFSocketCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, int)>(); - int confstr( - int arg0, - ffi.Pointer arg1, - int arg2, + int CFSocketGetSocketFlags( + CFSocketRef s, ) { - return _confstr( - arg0, - arg1, - arg2, + return _CFSocketGetSocketFlags( + s, ); } - late final _confstrPtr = _lookup< - ffi.NativeFunction< - ffi.Size Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('confstr'); - late final _confstr = - _confstrPtr.asFunction, int)>(); + late final _CFSocketGetSocketFlagsPtr = + _lookup>( + 'CFSocketGetSocketFlags'); + late final _CFSocketGetSocketFlags = + _CFSocketGetSocketFlagsPtr.asFunction(); - int getopt( - int arg0, - ffi.Pointer> arg1, - ffi.Pointer arg2, + void CFSocketSetSocketFlags( + CFSocketRef s, + int flags, ) { - return _getopt( - arg0, - arg1, - arg2, + return _CFSocketSetSocketFlags( + s, + flags, ); } - late final _getoptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>, - ffi.Pointer)>>('getopt'); - late final _getopt = _getoptPtr.asFunction< - int Function( - int, ffi.Pointer>, ffi.Pointer)>(); - - late final ffi.Pointer> _optarg = - _lookup>('optarg'); - - ffi.Pointer get optarg => _optarg.value; - - set optarg(ffi.Pointer value) => _optarg.value = value; - - late final ffi.Pointer _optind = _lookup('optind'); - - int get optind => _optind.value; - - set optind(int value) => _optind.value = value; - - late final ffi.Pointer _opterr = _lookup('opterr'); - - int get opterr => _opterr.value; - - set opterr(int value) => _opterr.value = value; - - late final ffi.Pointer _optopt = _lookup('optopt'); - - int get optopt => _optopt.value; - - set optopt(int value) => _optopt.value = value; + late final _CFSocketSetSocketFlagsPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketSetSocketFlags'); + late final _CFSocketSetSocketFlags = + _CFSocketSetSocketFlagsPtr.asFunction(); - ffi.Pointer brk( - ffi.Pointer arg0, + void CFSocketDisableCallBacks( + CFSocketRef s, + int callBackTypes, ) { - return _brk( - arg0, + return _CFSocketDisableCallBacks( + s, + callBackTypes, ); } - late final _brkPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('brk'); - late final _brk = _brkPtr - .asFunction Function(ffi.Pointer)>(); + late final _CFSocketDisableCallBacksPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketDisableCallBacks'); + late final _CFSocketDisableCallBacks = _CFSocketDisableCallBacksPtr + .asFunction(); - int chroot( - ffi.Pointer arg0, + void CFSocketEnableCallBacks( + CFSocketRef s, + int callBackTypes, ) { - return _chroot( - arg0, + return _CFSocketEnableCallBacks( + s, + callBackTypes, ); } - late final _chrootPtr = - _lookup)>>( - 'chroot'); - late final _chroot = - _chrootPtr.asFunction)>(); + late final _CFSocketEnableCallBacksPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketEnableCallBacks'); + late final _CFSocketEnableCallBacks = + _CFSocketEnableCallBacksPtr.asFunction(); - ffi.Pointer crypt( - ffi.Pointer arg0, - ffi.Pointer arg1, + int CFSocketSendData( + CFSocketRef s, + CFDataRef address, + CFDataRef data, + double timeout, ) { - return _crypt( - arg0, - arg1, + return _CFSocketSendData( + s, + address, + data, + timeout, ); } - late final _cryptPtr = _lookup< + late final _CFSocketSendDataPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('crypt'); - late final _crypt = _cryptPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int32 Function(CFSocketRef, CFDataRef, CFDataRef, + CFTimeInterval)>>('CFSocketSendData'); + late final _CFSocketSendData = _CFSocketSendDataPtr.asFunction< + int Function(CFSocketRef, CFDataRef, CFDataRef, double)>(); - void encrypt( - ffi.Pointer arg0, - int arg1, + int CFSocketRegisterValue( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + CFPropertyListRef value, ) { - return _encrypt( - arg0, - arg1, + return _CFSocketRegisterValue( + nameServerSignature, + timeout, + name, + value, ); } - late final _encryptPtr = _lookup< + late final _CFSocketRegisterValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int)>>('encrypt'); - late final _encrypt = - _encryptPtr.asFunction, int)>(); + ffi.Int32 Function(ffi.Pointer, CFTimeInterval, + CFStringRef, CFPropertyListRef)>>('CFSocketRegisterValue'); + late final _CFSocketRegisterValue = _CFSocketRegisterValuePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + CFPropertyListRef)>(); - int fchdir( - int arg0, + int CFSocketCopyRegisteredValue( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ffi.Pointer value, + ffi.Pointer nameServerAddress, ) { - return _fchdir( - arg0, + return _CFSocketCopyRegisteredValue( + nameServerSignature, + timeout, + name, + value, + nameServerAddress, ); } - late final _fchdirPtr = - _lookup>('fchdir'); - late final _fchdir = _fchdirPtr.asFunction(); + late final _CFSocketCopyRegisteredValuePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + CFTimeInterval, + CFStringRef, + ffi.Pointer, + ffi.Pointer)>>('CFSocketCopyRegisteredValue'); + late final _CFSocketCopyRegisteredValue = + _CFSocketCopyRegisteredValuePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + ffi.Pointer, ffi.Pointer)>(); - int gethostid() { - return _gethostid(); + int CFSocketRegisterSocketSignature( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ffi.Pointer signature, + ) { + return _CFSocketRegisterSocketSignature( + nameServerSignature, + timeout, + name, + signature, + ); } - late final _gethostidPtr = - _lookup>('gethostid'); - late final _gethostid = _gethostidPtr.asFunction(); + late final _CFSocketRegisterSocketSignaturePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, CFTimeInterval, + CFStringRef, ffi.Pointer)>>( + 'CFSocketRegisterSocketSignature'); + late final _CFSocketRegisterSocketSignature = + _CFSocketRegisterSocketSignaturePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + ffi.Pointer)>(); - int getpgid( - int arg0, + int CFSocketCopyRegisteredSocketSignature( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, + ffi.Pointer signature, + ffi.Pointer nameServerAddress, ) { - return _getpgid( - arg0, + return _CFSocketCopyRegisteredSocketSignature( + nameServerSignature, + timeout, + name, + signature, + nameServerAddress, ); } - late final _getpgidPtr = - _lookup>('getpgid'); - late final _getpgid = _getpgidPtr.asFunction(); + late final _CFSocketCopyRegisteredSocketSignaturePtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + CFTimeInterval, + CFStringRef, + ffi.Pointer, + ffi.Pointer)>>( + 'CFSocketCopyRegisteredSocketSignature'); + late final _CFSocketCopyRegisteredSocketSignature = + _CFSocketCopyRegisteredSocketSignaturePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + ffi.Pointer, ffi.Pointer)>(); - int getsid( - int arg0, + int CFSocketUnregister( + ffi.Pointer nameServerSignature, + double timeout, + CFStringRef name, ) { - return _getsid( - arg0, + return _CFSocketUnregister( + nameServerSignature, + timeout, + name, ); } - late final _getsidPtr = - _lookup>('getsid'); - late final _getsid = _getsidPtr.asFunction(); + late final _CFSocketUnregisterPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, CFTimeInterval, + CFStringRef)>>('CFSocketUnregister'); + late final _CFSocketUnregister = _CFSocketUnregisterPtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef)>(); - int getdtablesize() { - return _getdtablesize(); + void CFSocketSetDefaultNameRegistryPortNumber( + int port, + ) { + return _CFSocketSetDefaultNameRegistryPortNumber( + port, + ); } - late final _getdtablesizePtr = - _lookup>('getdtablesize'); - late final _getdtablesize = _getdtablesizePtr.asFunction(); + late final _CFSocketSetDefaultNameRegistryPortNumberPtr = + _lookup>( + 'CFSocketSetDefaultNameRegistryPortNumber'); + late final _CFSocketSetDefaultNameRegistryPortNumber = + _CFSocketSetDefaultNameRegistryPortNumberPtr.asFunction< + void Function(int)>(); - int getpagesize() { - return _getpagesize(); + int CFSocketGetDefaultNameRegistryPortNumber() { + return _CFSocketGetDefaultNameRegistryPortNumber(); } - late final _getpagesizePtr = - _lookup>('getpagesize'); - late final _getpagesize = _getpagesizePtr.asFunction(); + late final _CFSocketGetDefaultNameRegistryPortNumberPtr = + _lookup>( + 'CFSocketGetDefaultNameRegistryPortNumber'); + late final _CFSocketGetDefaultNameRegistryPortNumber = + _CFSocketGetDefaultNameRegistryPortNumberPtr.asFunction(); - ffi.Pointer getpass( - ffi.Pointer arg0, - ) { - return _getpass( - arg0, - ); - } + late final ffi.Pointer _kCFSocketCommandKey = + _lookup('kCFSocketCommandKey'); - late final _getpassPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('getpass'); - late final _getpass = _getpassPtr - .asFunction Function(ffi.Pointer)>(); + CFStringRef get kCFSocketCommandKey => _kCFSocketCommandKey.value; - ffi.Pointer getwd( - ffi.Pointer arg0, - ) { - return _getwd( - arg0, - ); - } + set kCFSocketCommandKey(CFStringRef value) => + _kCFSocketCommandKey.value = value; - late final _getwdPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('getwd'); - late final _getwd = _getwdPtr - .asFunction Function(ffi.Pointer)>(); + late final ffi.Pointer _kCFSocketNameKey = + _lookup('kCFSocketNameKey'); - int lchown( - ffi.Pointer arg0, - int arg1, - int arg2, + CFStringRef get kCFSocketNameKey => _kCFSocketNameKey.value; + + set kCFSocketNameKey(CFStringRef value) => _kCFSocketNameKey.value = value; + + late final ffi.Pointer _kCFSocketValueKey = + _lookup('kCFSocketValueKey'); + + CFStringRef get kCFSocketValueKey => _kCFSocketValueKey.value; + + set kCFSocketValueKey(CFStringRef value) => _kCFSocketValueKey.value = value; + + late final ffi.Pointer _kCFSocketResultKey = + _lookup('kCFSocketResultKey'); + + CFStringRef get kCFSocketResultKey => _kCFSocketResultKey.value; + + set kCFSocketResultKey(CFStringRef value) => + _kCFSocketResultKey.value = value; + + late final ffi.Pointer _kCFSocketErrorKey = + _lookup('kCFSocketErrorKey'); + + CFStringRef get kCFSocketErrorKey => _kCFSocketErrorKey.value; + + set kCFSocketErrorKey(CFStringRef value) => _kCFSocketErrorKey.value = value; + + late final ffi.Pointer _kCFSocketRegisterCommand = + _lookup('kCFSocketRegisterCommand'); + + CFStringRef get kCFSocketRegisterCommand => _kCFSocketRegisterCommand.value; + + set kCFSocketRegisterCommand(CFStringRef value) => + _kCFSocketRegisterCommand.value = value; + + late final ffi.Pointer _kCFSocketRetrieveCommand = + _lookup('kCFSocketRetrieveCommand'); + + CFStringRef get kCFSocketRetrieveCommand => _kCFSocketRetrieveCommand.value; + + set kCFSocketRetrieveCommand(CFStringRef value) => + _kCFSocketRetrieveCommand.value = value; + + int getattrlistbulk( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _lchown( + return _getattrlistbulk( arg0, arg1, arg2, + arg3, + arg4, ); } - late final _lchownPtr = _lookup< + late final _getattrlistbulkPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('lchown'); - late final _lchown = - _lchownPtr.asFunction, int, int)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer, ffi.Size, ffi.Uint64)>>('getattrlistbulk'); + late final _getattrlistbulk = _getattrlistbulkPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); - int lockf( + int getattrlistat( int arg0, - int arg1, - int arg2, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + int arg4, + int arg5, ) { - return _lockf( + return _getattrlistat( arg0, arg1, arg2, + arg3, + arg4, + arg5, ); } - late final _lockfPtr = - _lookup>( - 'lockf'); - late final _lockf = _lockfPtr.asFunction(); + late final _getattrlistatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedLong)>>('getattrlistat'); + late final _getattrlistat = _getattrlistatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - int nice( + int setattrlistat( int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + int arg4, + int arg5, ) { - return _nice( + return _setattrlistat( arg0, + arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _nicePtr = - _lookup>('nice'); - late final _nice = _nicePtr.asFunction(); + late final _setattrlistatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Uint32)>>('setattrlistat'); + late final _setattrlistat = _setattrlistatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - int pread( - int __fd, - ffi.Pointer __buf, - int __nbyte, - int __offset, + int freadlink( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _pread( - __fd, - __buf, - __nbyte, - __offset, + return _freadlink( + arg0, + arg1, + arg2, ); } - late final _preadPtr = _lookup< + late final _freadlinkPtr = _lookup< ffi.NativeFunction< ssize_t Function( - ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pread'); - late final _pread = _preadPtr - .asFunction, int, int)>(); + ffi.Int, ffi.Pointer, ffi.Size)>>('freadlink'); + late final _freadlink = + _freadlinkPtr.asFunction, int)>(); - int pwrite( - int __fd, - ffi.Pointer __buf, - int __nbyte, - int __offset, + int faccessat( + int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, ) { - return _pwrite( - __fd, - __buf, - __nbyte, - __offset, + return _faccessat( + arg0, + arg1, + arg2, + arg3, ); } - late final _pwritePtr = _lookup< + late final _faccessatPtr = _lookup< ffi.NativeFunction< - ssize_t Function( - ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pwrite'); - late final _pwrite = _pwritePtr - .asFunction, int, int)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int, ffi.Int)>>('faccessat'); + late final _faccessat = _faccessatPtr + .asFunction, int, int)>(); - ffi.Pointer sbrk( + int fchownat( int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, + int arg4, ) { - return _sbrk( + return _fchownat( arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _sbrkPtr = - _lookup Function(ffi.Int)>>( - 'sbrk'); - late final _sbrk = _sbrkPtr.asFunction Function(int)>(); - - int setpgrp() { - return _setpgrp(); - } - - late final _setpgrpPtr = - _lookup>('setpgrp'); - late final _setpgrp = _setpgrpPtr.asFunction(); + late final _fchownatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, uid_t, gid_t, + ffi.Int)>>('fchownat'); + late final _fchownat = _fchownatPtr + .asFunction, int, int, int)>(); - int setregid( + int linkat( int arg0, - int arg1, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + int arg4, ) { - return _setregid( + return _linkat( arg0, arg1, + arg2, + arg3, + arg4, ); } - late final _setregidPtr = - _lookup>('setregid'); - late final _setregid = _setregidPtr.asFunction(); + late final _linkatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.Int)>>('linkat'); + late final _linkat = _linkatPtr.asFunction< + int Function( + int, ffi.Pointer, int, ffi.Pointer, int)>(); - int setreuid( + int readlinkat( int arg0, - int arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, ) { - return _setreuid( + return _readlinkat( arg0, arg1, + arg2, + arg3, ); } - late final _setreuidPtr = - _lookup>('setreuid'); - late final _setreuid = _setreuidPtr.asFunction(); - - void sync1() { - return _sync1(); - } - - late final _sync1Ptr = - _lookup>('sync'); - late final _sync1 = _sync1Ptr.asFunction(); + late final _readlinkatPtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Int, ffi.Pointer, + ffi.Pointer, ffi.Size)>>('readlinkat'); + late final _readlinkat = _readlinkatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, int)>(); - int truncate( + int symlinkat( ffi.Pointer arg0, int arg1, + ffi.Pointer arg2, ) { - return _truncate( + return _symlinkat( arg0, arg1, + arg2, ); } - late final _truncatePtr = _lookup< - ffi.NativeFunction, off_t)>>( - 'truncate'); - late final _truncate = - _truncatePtr.asFunction, int)>(); + late final _symlinkatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, + ffi.Pointer)>>('symlinkat'); + late final _symlinkat = _symlinkatPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); - int ualarm( + int unlinkat( int arg0, - int arg1, + ffi.Pointer arg1, + int arg2, ) { - return _ualarm( + return _unlinkat( arg0, arg1, + arg2, ); } - late final _ualarmPtr = - _lookup>( - 'ualarm'); - late final _ualarm = _ualarmPtr.asFunction(); + late final _unlinkatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int)>>('unlinkat'); + late final _unlinkat = + _unlinkatPtr.asFunction, int)>(); - int usleep( + void _exit( int arg0, ) { - return _usleep( + return __exit( arg0, ); } - late final _usleepPtr = - _lookup>('usleep'); - late final _usleep = _usleepPtr.asFunction(); - - int vfork() { - return _vfork(); - } - - late final _vforkPtr = - _lookup>('vfork'); - late final _vfork = _vforkPtr.asFunction(); + late final __exitPtr = + _lookup>('_exit'); + late final __exit = __exitPtr.asFunction(); - int fsync( - int arg0, + int access( + ffi.Pointer arg0, + int arg1, ) { - return _fsync( + return _access( arg0, + arg1, ); } - late final _fsyncPtr = - _lookup>('fsync'); - late final _fsync = _fsyncPtr.asFunction(); + late final _accessPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'access'); + late final _access = + _accessPtr.asFunction, int)>(); - int ftruncate( + int alarm( int arg0, - int arg1, ) { - return _ftruncate( + return _alarm( arg0, - arg1, ); } - late final _ftruncatePtr = - _lookup>( - 'ftruncate'); - late final _ftruncate = _ftruncatePtr.asFunction(); + late final _alarmPtr = + _lookup>( + 'alarm'); + late final _alarm = _alarmPtr.asFunction(); - int getlogin_r( + int chdir( ffi.Pointer arg0, - int arg1, ) { - return _getlogin_r( + return _chdir( arg0, - arg1, ); } - late final _getlogin_rPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('getlogin_r'); - late final _getlogin_r = - _getlogin_rPtr.asFunction, int)>(); + late final _chdirPtr = + _lookup)>>( + 'chdir'); + late final _chdir = + _chdirPtr.asFunction)>(); - int fchown( - int arg0, + int chown( + ffi.Pointer arg0, int arg1, int arg2, ) { - return _fchown( + return _chown( arg0, arg1, arg2, ); } - late final _fchownPtr = - _lookup>( - 'fchown'); - late final _fchown = _fchownPtr.asFunction(); - - int gethostname( - ffi.Pointer arg0, - int arg1, - ) { - return _gethostname( - arg0, - arg1, - ); - } - - late final _gethostnamePtr = _lookup< + late final _chownPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('gethostname'); - late final _gethostname = - _gethostnamePtr.asFunction, int)>(); + ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('chown'); + late final _chown = + _chownPtr.asFunction, int, int)>(); - int readlink( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int close( + int arg0, ) { - return _readlink( + return _close( arg0, - arg1, - arg2, ); } - late final _readlinkPtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('readlink'); - late final _readlink = _readlinkPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _closePtr = + _lookup>('close'); + late final _close = _closePtr.asFunction(); - int setegid( + int dup( int arg0, ) { - return _setegid( + return _dup( arg0, ); } - late final _setegidPtr = - _lookup>('setegid'); - late final _setegid = _setegidPtr.asFunction(); + late final _dupPtr = + _lookup>('dup'); + late final _dup = _dupPtr.asFunction(); - int seteuid( + int dup2( int arg0, + int arg1, ) { - return _seteuid( + return _dup2( arg0, + arg1, ); } - late final _seteuidPtr = - _lookup>('seteuid'); - late final _seteuid = _seteuidPtr.asFunction(); + late final _dup2Ptr = + _lookup>('dup2'); + late final _dup2 = _dup2Ptr.asFunction(); - int symlink( - ffi.Pointer arg0, - ffi.Pointer arg1, + int execl( + ffi.Pointer __path, + ffi.Pointer __arg0, ) { - return _symlink( - arg0, - arg1, + return _execl( + __path, + __arg0, ); } - late final _symlinkPtr = _lookup< + late final _execlPtr = _lookup< ffi.NativeFunction< ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('symlink'); - late final _symlink = _symlinkPtr + ffi.Pointer, ffi.Pointer)>>('execl'); + late final _execl = _execlPtr .asFunction, ffi.Pointer)>(); - int pselect( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, + int execle( + ffi.Pointer __path, + ffi.Pointer __arg0, ) { - return _pselect( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _execle( + __path, + __arg0, ); } - late final _pselectPtr = _lookup< + late final _execlePtr = _lookup< ffi.NativeFunction< ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('pselect'); - late final _pselect = _pselectPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>>('execle'); + late final _execle = _execlePtr + .asFunction, ffi.Pointer)>(); - int select( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, + int execlp( + ffi.Pointer __file, + ffi.Pointer __arg0, ) { - return _select( - arg0, - arg1, - arg2, - arg3, - arg4, + return _execlp( + __file, + __arg0, ); } - late final _selectPtr = _lookup< + late final _execlpPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('select'); - late final _select = _selectPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('execlp'); + late final _execlp = _execlpPtr + .asFunction, ffi.Pointer)>(); - int accessx_np( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - int arg3, + int execv( + ffi.Pointer __path, + ffi.Pointer> __argv, ) { - return _accessx_np( - arg0, - arg1, - arg2, - arg3, + return _execv( + __path, + __argv, ); } - late final _accessx_npPtr = _lookup< + late final _execvPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer, uid_t)>>('accessx_np'); - late final _accessx_np = _accessx_npPtr.asFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer>)>>('execv'); + late final _execv = _execvPtr.asFunction< int Function( - ffi.Pointer, int, ffi.Pointer, int)>(); - - int acct( - ffi.Pointer arg0, - ) { - return _acct( - arg0, - ); - } - - late final _acctPtr = - _lookup)>>( - 'acct'); - late final _acct = _acctPtr.asFunction)>(); + ffi.Pointer, ffi.Pointer>)>(); - int add_profil( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, + int execve( + ffi.Pointer __file, + ffi.Pointer> __argv, + ffi.Pointer> __envp, ) { - return _add_profil( - arg0, - arg1, - arg2, - arg3, + return _execve( + __file, + __argv, + __envp, ); } - late final _add_profilPtr = _lookup< + late final _execvePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, - ffi.UnsignedInt)>>('add_profil'); - late final _add_profil = _add_profilPtr - .asFunction, int, int, int)>(); - - void endusershell() { - return _endusershell(); - } - - late final _endusershellPtr = - _lookup>('endusershell'); - late final _endusershell = _endusershellPtr.asFunction(); + ffi.Int Function( + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('execve'); + late final _execve = _execvePtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer>, + ffi.Pointer>)>(); - int execvP( + int execvp( ffi.Pointer __file, - ffi.Pointer __searchpath, ffi.Pointer> __argv, ) { - return _execvP( + return _execvp( __file, - __searchpath, __argv, ); } - late final _execvPPtr = _lookup< + late final _execvpPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('execvP'); - late final _execvP = _execvPPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + ffi.Int Function(ffi.Pointer, + ffi.Pointer>)>>('execvp'); + late final _execvp = _execvpPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>)>(); - ffi.Pointer fflagstostr( - int arg0, - ) { - return _fflagstostr( - arg0, - ); + int fork() { + return _fork(); } - late final _fflagstostrPtr = _lookup< - ffi.NativeFunction Function(ffi.UnsignedLong)>>( - 'fflagstostr'); - late final _fflagstostr = - _fflagstostrPtr.asFunction Function(int)>(); + late final _forkPtr = _lookup>('fork'); + late final _fork = _forkPtr.asFunction(); - int getdomainname( - ffi.Pointer arg0, + int fpathconf( + int arg0, int arg1, ) { - return _getdomainname( + return _fpathconf( arg0, arg1, ); } - late final _getdomainnamePtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'getdomainname'); - late final _getdomainname = - _getdomainnamePtr.asFunction, int)>(); + late final _fpathconfPtr = + _lookup>( + 'fpathconf'); + late final _fpathconf = _fpathconfPtr.asFunction(); - int getgrouplist( + ffi.Pointer getcwd( ffi.Pointer arg0, int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, ) { - return _getgrouplist( + return _getcwd( arg0, arg1, - arg2, - arg3, ); } - late final _getgrouplistPtr = _lookup< + late final _getcwdPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer, - ffi.Pointer)>>('getgrouplist'); - late final _getgrouplist = _getgrouplistPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('getcwd'); + late final _getcwd = _getcwdPtr + .asFunction Function(ffi.Pointer, int)>(); - int gethostuuid( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return _gethostuuid( - arg0, - arg1, - ); + int getegid() { + return _getegid(); } - late final _gethostuuidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('gethostuuid'); - late final _gethostuuid = _gethostuuidPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _getegidPtr = + _lookup>('getegid'); + late final _getegid = _getegidPtr.asFunction(); - int getmode( - ffi.Pointer arg0, - int arg1, + int geteuid() { + return _geteuid(); + } + + late final _geteuidPtr = + _lookup>('geteuid'); + late final _geteuid = _geteuidPtr.asFunction(); + + int getgid() { + return _getgid(); + } + + late final _getgidPtr = + _lookup>('getgid'); + late final _getgid = _getgidPtr.asFunction(); + + int getgroups( + int arg0, + ffi.Pointer arg1, ) { - return _getmode( + return _getgroups( arg0, arg1, ); } - late final _getmodePtr = _lookup< - ffi.NativeFunction, mode_t)>>( - 'getmode'); - late final _getmode = - _getmodePtr.asFunction, int)>(); + late final _getgroupsPtr = _lookup< + ffi.NativeFunction)>>( + 'getgroups'); + late final _getgroups = + _getgroupsPtr.asFunction)>(); - int getpeereid( + ffi.Pointer getlogin() { + return _getlogin(); + } + + late final _getloginPtr = + _lookup Function()>>('getlogin'); + late final _getlogin = + _getloginPtr.asFunction Function()>(); + + int getpgrp() { + return _getpgrp(); + } + + late final _getpgrpPtr = + _lookup>('getpgrp'); + late final _getpgrp = _getpgrpPtr.asFunction(); + + int getpid() { + return _getpid(); + } + + late final _getpidPtr = + _lookup>('getpid'); + late final _getpid = _getpidPtr.asFunction(); + + int getppid() { + return _getppid(); + } + + late final _getppidPtr = + _lookup>('getppid'); + late final _getppid = _getppidPtr.asFunction(); + + int getuid() { + return _getuid(); + } + + late final _getuidPtr = + _lookup>('getuid'); + late final _getuid = _getuidPtr.asFunction(); + + int isatty( int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, ) { - return _getpeereid( + return _isatty( arg0, - arg1, - arg2, ); } - late final _getpeereidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Pointer)>>('getpeereid'); - late final _getpeereid = _getpeereidPtr - .asFunction, ffi.Pointer)>(); + late final _isattyPtr = + _lookup>('isatty'); + late final _isatty = _isattyPtr.asFunction(); - int getsgroups_np( - ffi.Pointer arg0, - ffi.Pointer arg1, + int link( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _getsgroups_np( + return _link( arg0, arg1, ); } - late final _getsgroups_npPtr = _lookup< + late final _linkPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('getsgroups_np'); - late final _getsgroups_np = _getsgroups_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer getusershell() { - return _getusershell(); - } - - late final _getusershellPtr = - _lookup Function()>>( - 'getusershell'); - late final _getusershell = - _getusershellPtr.asFunction Function()>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('link'); + late final _link = _linkPtr + .asFunction, ffi.Pointer)>(); - int getwgroups_np( - ffi.Pointer arg0, - ffi.Pointer arg1, + int lseek( + int arg0, + int arg1, + int arg2, ) { - return _getwgroups_np( + return _lseek( arg0, arg1, + arg2, ); } - late final _getwgroups_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('getwgroups_np'); - late final _getwgroups_np = _getwgroups_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _lseekPtr = + _lookup>( + 'lseek'); + late final _lseek = _lseekPtr.asFunction(); - int initgroups( + int pathconf( ffi.Pointer arg0, int arg1, ) { - return _initgroups( + return _pathconf( arg0, arg1, ); } - late final _initgroupsPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'initgroups'); - late final _initgroups = - _initgroupsPtr.asFunction, int)>(); + late final _pathconfPtr = _lookup< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, ffi.Int)>>('pathconf'); + late final _pathconf = + _pathconfPtr.asFunction, int)>(); - int issetugid() { - return _issetugid(); + int pause() { + return _pause(); } - late final _issetugidPtr = - _lookup>('issetugid'); - late final _issetugid = _issetugidPtr.asFunction(); + late final _pausePtr = + _lookup>('pause'); + late final _pause = _pausePtr.asFunction(); - ffi.Pointer mkdtemp( - ffi.Pointer arg0, + int pipe( + ffi.Pointer arg0, ) { - return _mkdtemp( + return _pipe( arg0, ); } - late final _mkdtempPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('mkdtemp'); - late final _mkdtemp = _mkdtempPtr - .asFunction Function(ffi.Pointer)>(); + late final _pipePtr = + _lookup)>>( + 'pipe'); + late final _pipe = _pipePtr.asFunction)>(); - int mknod( - ffi.Pointer arg0, - int arg1, + int read( + int arg0, + ffi.Pointer arg1, int arg2, ) { - return _mknod( + return _read( arg0, arg1, arg2, ); } - late final _mknodPtr = _lookup< + late final _readPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, mode_t, dev_t)>>('mknod'); - late final _mknod = - _mknodPtr.asFunction, int, int)>(); + ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('read'); + late final _read = + _readPtr.asFunction, int)>(); - int mkpath_np( - ffi.Pointer path, - int omode, + int rmdir( + ffi.Pointer arg0, ) { - return _mkpath_np( - path, - omode, + return _rmdir( + arg0, ); } - late final _mkpath_npPtr = _lookup< - ffi.NativeFunction, mode_t)>>( - 'mkpath_np'); - late final _mkpath_np = - _mkpath_npPtr.asFunction, int)>(); + late final _rmdirPtr = + _lookup)>>( + 'rmdir'); + late final _rmdir = + _rmdirPtr.asFunction)>(); - int mkpathat_np( - int dfd, - ffi.Pointer path, - int omode, + int setgid( + int arg0, ) { - return _mkpathat_np( - dfd, - path, - omode, + return _setgid( + arg0, ); } - late final _mkpathat_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, mode_t)>>('mkpathat_np'); - late final _mkpathat_np = _mkpathat_npPtr - .asFunction, int)>(); + late final _setgidPtr = + _lookup>('setgid'); + late final _setgid = _setgidPtr.asFunction(); - int mkstemps( - ffi.Pointer arg0, + int setpgid( + int arg0, int arg1, ) { - return _mkstemps( + return _setpgid( arg0, arg1, ); } - late final _mkstempsPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'mkstemps'); - late final _mkstemps = - _mkstempsPtr.asFunction, int)>(); + late final _setpgidPtr = + _lookup>('setpgid'); + late final _setpgid = _setpgidPtr.asFunction(); - int mkostemp( - ffi.Pointer path, - int oflags, - ) { - return _mkostemp( - path, - oflags, - ); + int setsid() { + return _setsid(); } - late final _mkostempPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'mkostemp'); - late final _mkostemp = - _mkostempPtr.asFunction, int)>(); + late final _setsidPtr = + _lookup>('setsid'); + late final _setsid = _setsidPtr.asFunction(); - int mkostemps( - ffi.Pointer path, - int slen, - int oflags, + int setuid( + int arg0, ) { - return _mkostemps( - path, - slen, - oflags, + return _setuid( + arg0, ); } - late final _mkostempsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int, ffi.Int)>>('mkostemps'); - late final _mkostemps = - _mkostempsPtr.asFunction, int, int)>(); - - int mkstemp_dprotected_np( - ffi.Pointer path, - int dpclass, - int dpflags, - ) { - return _mkstemp_dprotected_np( - path, - dpclass, - dpflags, - ); - } - - late final _mkstemp_dprotected_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Int)>>('mkstemp_dprotected_np'); - late final _mkstemp_dprotected_np = _mkstemp_dprotected_npPtr - .asFunction, int, int)>(); - - ffi.Pointer mkdtempat_np( - int dfd, - ffi.Pointer path, - ) { - return _mkdtempat_np( - dfd, - path, - ); - } - - late final _mkdtempat_npPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer)>>('mkdtempat_np'); - late final _mkdtempat_np = _mkdtempat_npPtr - .asFunction Function(int, ffi.Pointer)>(); + late final _setuidPtr = + _lookup>('setuid'); + late final _setuid = _setuidPtr.asFunction(); - int mkstempsat_np( - int dfd, - ffi.Pointer path, - int slen, + int sleep( + int arg0, ) { - return _mkstempsat_np( - dfd, - path, - slen, + return _sleep( + arg0, ); } - late final _mkstempsat_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int)>>('mkstempsat_np'); - late final _mkstempsat_np = _mkstempsat_npPtr - .asFunction, int)>(); + late final _sleepPtr = + _lookup>( + 'sleep'); + late final _sleep = _sleepPtr.asFunction(); - int mkostempsat_np( - int dfd, - ffi.Pointer path, - int slen, - int oflags, + int sysconf( + int arg0, ) { - return _mkostempsat_np( - dfd, - path, - slen, - oflags, + return _sysconf( + arg0, ); } - late final _mkostempsat_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Int)>>('mkostempsat_np'); - late final _mkostempsat_np = _mkostempsat_npPtr - .asFunction, int, int)>(); + late final _sysconfPtr = + _lookup>('sysconf'); + late final _sysconf = _sysconfPtr.asFunction(); - int nfssvc( + int tcgetpgrp( int arg0, - ffi.Pointer arg1, ) { - return _nfssvc( + return _tcgetpgrp( arg0, - arg1, ); } - late final _nfssvcPtr = _lookup< - ffi.NativeFunction)>>( - 'nfssvc'); - late final _nfssvc = - _nfssvcPtr.asFunction)>(); + late final _tcgetpgrpPtr = + _lookup>('tcgetpgrp'); + late final _tcgetpgrp = _tcgetpgrpPtr.asFunction(); - int profil( - ffi.Pointer arg0, + int tcsetpgrp( + int arg0, int arg1, - int arg2, - int arg3, ) { - return _profil( + return _tcsetpgrp( arg0, arg1, - arg2, - arg3, ); } - late final _profilPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, - ffi.UnsignedInt)>>('profil'); - late final _profil = _profilPtr - .asFunction, int, int, int)>(); + late final _tcsetpgrpPtr = + _lookup>( + 'tcsetpgrp'); + late final _tcsetpgrp = _tcsetpgrpPtr.asFunction(); - int pthread_setugid_np( + ffi.Pointer ttyname( int arg0, - int arg1, ) { - return _pthread_setugid_np( + return _ttyname( arg0, - arg1, ); } - late final _pthread_setugid_npPtr = - _lookup>( - 'pthread_setugid_np'); - late final _pthread_setugid_np = - _pthread_setugid_npPtr.asFunction(); + late final _ttynamePtr = + _lookup Function(ffi.Int)>>( + 'ttyname'); + late final _ttyname = + _ttynamePtr.asFunction Function(int)>(); - int pthread_getugid_np( - ffi.Pointer arg0, - ffi.Pointer arg1, + int ttyname_r( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _pthread_getugid_np( + return _ttyname_r( arg0, arg1, + arg2, ); } - late final _pthread_getugid_npPtr = _lookup< + late final _ttyname_rPtr = _lookup< ffi.NativeFunction< ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('pthread_getugid_np'); - late final _pthread_getugid_np = _pthread_getugid_npPtr - .asFunction, ffi.Pointer)>(); + ffi.Int, ffi.Pointer, ffi.Size)>>('ttyname_r'); + late final _ttyname_r = + _ttyname_rPtr.asFunction, int)>(); - int reboot( - int arg0, + int unlink( + ffi.Pointer arg0, ) { - return _reboot( + return _unlink( arg0, ); } - late final _rebootPtr = - _lookup>('reboot'); - late final _reboot = _rebootPtr.asFunction(); + late final _unlinkPtr = + _lookup)>>( + 'unlink'); + late final _unlink = + _unlinkPtr.asFunction)>(); - int revoke( - ffi.Pointer arg0, + int write( + int __fd, + ffi.Pointer __buf, + int __nbyte, ) { - return _revoke( - arg0, + return _write( + __fd, + __buf, + __nbyte, ); } - late final _revokePtr = - _lookup)>>( - 'revoke'); - late final _revoke = - _revokePtr.asFunction)>(); + late final _writePtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('write'); + late final _write = + _writePtr.asFunction, int)>(); - int rcmd( - ffi.Pointer> arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, + int confstr( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _rcmd( + return _confstr( arg0, arg1, arg2, - arg3, - arg4, - arg5, ); } - late final _rcmdPtr = _lookup< + late final _confstrPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('rcmd'); - late final _rcmd = _rcmdPtr.asFunction< - int Function( - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Size Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('confstr'); + late final _confstr = + _confstrPtr.asFunction, int)>(); - int rcmd_af( - ffi.Pointer> arg0, - int arg1, + int getopt( + int arg0, + ffi.Pointer> arg1, ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, - int arg6, ) { - return _rcmd_af( + return _getopt( arg0, arg1, arg2, - arg3, - arg4, - arg5, - arg6, ); } - late final _rcmd_afPtr = _lookup< + late final _getoptPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('rcmd_af'); - late final _rcmd_af = _rcmd_afPtr.asFunction< + ffi.Int Function(ffi.Int, ffi.Pointer>, + ffi.Pointer)>>('getopt'); + late final _getopt = _getoptPtr.asFunction< int Function( - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + int, ffi.Pointer>, ffi.Pointer)>(); - int rresvport( - ffi.Pointer arg0, - ) { - return _rresvport( - arg0, - ); - } + late final ffi.Pointer> _optarg = + _lookup>('optarg'); - late final _rresvportPtr = - _lookup)>>( - 'rresvport'); - late final _rresvport = - _rresvportPtr.asFunction)>(); + ffi.Pointer get optarg => _optarg.value; - int rresvport_af( - ffi.Pointer arg0, - int arg1, + set optarg(ffi.Pointer value) => _optarg.value = value; + + late final ffi.Pointer _optind = _lookup('optind'); + + int get optind => _optind.value; + + set optind(int value) => _optind.value = value; + + late final ffi.Pointer _opterr = _lookup('opterr'); + + int get opterr => _opterr.value; + + set opterr(int value) => _opterr.value = value; + + late final ffi.Pointer _optopt = _lookup('optopt'); + + int get optopt => _optopt.value; + + set optopt(int value) => _optopt.value = value; + + ffi.Pointer brk( + ffi.Pointer arg0, ) { - return _rresvport_af( + return _brk( arg0, - arg1, ); } - late final _rresvport_afPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'rresvport_af'); - late final _rresvport_af = - _rresvport_afPtr.asFunction, int)>(); + late final _brkPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('brk'); + late final _brk = _brkPtr + .asFunction Function(ffi.Pointer)>(); - int iruserok( - int arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + int chroot( + ffi.Pointer arg0, ) { - return _iruserok( + return _chroot( arg0, - arg1, - arg2, - arg3, ); } - late final _iruserokPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.UnsignedLong, ffi.Int, ffi.Pointer, - ffi.Pointer)>>('iruserok'); - late final _iruserok = _iruserokPtr.asFunction< - int Function(int, int, ffi.Pointer, ffi.Pointer)>(); + late final _chrootPtr = + _lookup)>>( + 'chroot'); + late final _chroot = + _chrootPtr.asFunction)>(); - int iruserok_sa( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, + ffi.Pointer crypt( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _iruserok_sa( + return _crypt( arg0, arg1, - arg2, - arg3, - arg4, ); } - late final _iruserok_saPtr = _lookup< + late final _cryptPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer, ffi.Pointer)>>('iruserok_sa'); - late final _iruserok_sa = _iruserok_saPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('crypt'); + late final _crypt = _cryptPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - int ruserok( + void encrypt( ffi.Pointer arg0, int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, ) { - return _ruserok( + return _encrypt( arg0, arg1, - arg2, - arg3, ); } - late final _ruserokPtr = _lookup< + late final _encryptPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer, ffi.Pointer)>>('ruserok'); - late final _ruserok = _ruserokPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Int)>>('encrypt'); + late final _encrypt = + _encryptPtr.asFunction, int)>(); - int setdomainname( - ffi.Pointer arg0, - int arg1, + int fchdir( + int arg0, ) { - return _setdomainname( + return _fchdir( arg0, - arg1, ); } - late final _setdomainnamePtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'setdomainname'); - late final _setdomainname = - _setdomainnamePtr.asFunction, int)>(); + late final _fchdirPtr = + _lookup>('fchdir'); + late final _fchdir = _fchdirPtr.asFunction(); - int setgroups( + int gethostid() { + return _gethostid(); + } + + late final _gethostidPtr = + _lookup>('gethostid'); + late final _gethostid = _gethostidPtr.asFunction(); + + int getpgid( int arg0, - ffi.Pointer arg1, ) { - return _setgroups( + return _getpgid( arg0, - arg1, ); } - late final _setgroupsPtr = _lookup< - ffi.NativeFunction)>>( - 'setgroups'); - late final _setgroups = - _setgroupsPtr.asFunction)>(); + late final _getpgidPtr = + _lookup>('getpgid'); + late final _getpgid = _getpgidPtr.asFunction(); - void sethostid( + int getsid( int arg0, ) { - return _sethostid( + return _getsid( arg0, ); } - late final _sethostidPtr = - _lookup>('sethostid'); - late final _sethostid = _sethostidPtr.asFunction(); + late final _getsidPtr = + _lookup>('getsid'); + late final _getsid = _getsidPtr.asFunction(); - int sethostname( + int getdtablesize() { + return _getdtablesize(); + } + + late final _getdtablesizePtr = + _lookup>('getdtablesize'); + late final _getdtablesize = _getdtablesizePtr.asFunction(); + + int getpagesize() { + return _getpagesize(); + } + + late final _getpagesizePtr = + _lookup>('getpagesize'); + late final _getpagesize = _getpagesizePtr.asFunction(); + + ffi.Pointer getpass( ffi.Pointer arg0, - int arg1, ) { - return _sethostname( + return _getpass( arg0, - arg1, ); } - late final _sethostnamePtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sethostname'); - late final _sethostname = - _sethostnamePtr.asFunction, int)>(); + late final _getpassPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('getpass'); + late final _getpass = _getpassPtr + .asFunction Function(ffi.Pointer)>(); - int setlogin( + ffi.Pointer getwd( ffi.Pointer arg0, ) { - return _setlogin( + return _getwd( arg0, ); } - late final _setloginPtr = - _lookup)>>( - 'setlogin'); - late final _setlogin = - _setloginPtr.asFunction)>(); + late final _getwdPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('getwd'); + late final _getwd = _getwdPtr + .asFunction Function(ffi.Pointer)>(); - ffi.Pointer setmode( + int lchown( ffi.Pointer arg0, + int arg1, + int arg2, ) { - return _setmode( + return _lchown( arg0, + arg1, + arg2, ); } - late final _setmodePtr = _lookup< + late final _lchownPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('setmode'); - late final _setmode = _setmodePtr - .asFunction Function(ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('lchown'); + late final _lchown = + _lchownPtr.asFunction, int, int)>(); - int setrgid( + int lockf( int arg0, + int arg1, + int arg2, ) { - return _setrgid( + return _lockf( arg0, + arg1, + arg2, ); } - late final _setrgidPtr = - _lookup>('setrgid'); - late final _setrgid = _setrgidPtr.asFunction(); + late final _lockfPtr = + _lookup>( + 'lockf'); + late final _lockf = _lockfPtr.asFunction(); - int setruid( + int nice( int arg0, ) { - return _setruid( + return _nice( arg0, ); } - late final _setruidPtr = - _lookup>('setruid'); - late final _setruid = _setruidPtr.asFunction(); + late final _nicePtr = + _lookup>('nice'); + late final _nice = _nicePtr.asFunction(); - int setsgroups_np( - int arg0, - ffi.Pointer arg1, + int pread( + int __fd, + ffi.Pointer __buf, + int __nbyte, + int __offset, ) { - return _setsgroups_np( - arg0, - arg1, + return _pread( + __fd, + __buf, + __nbyte, + __offset, ); } - late final _setsgroups_npPtr = _lookup< + late final _preadPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer)>>('setsgroups_np'); - late final _setsgroups_np = _setsgroups_npPtr - .asFunction)>(); + ssize_t Function( + ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pread'); + late final _pread = _preadPtr + .asFunction, int, int)>(); - void setusershell() { - return _setusershell(); + int pwrite( + int __fd, + ffi.Pointer __buf, + int __nbyte, + int __offset, + ) { + return _pwrite( + __fd, + __buf, + __nbyte, + __offset, + ); } - late final _setusershellPtr = - _lookup>('setusershell'); - late final _setusershell = _setusershellPtr.asFunction(); + late final _pwritePtr = _lookup< + ffi.NativeFunction< + ssize_t Function( + ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pwrite'); + late final _pwrite = _pwritePtr + .asFunction, int, int)>(); - int setwgroups_np( + ffi.Pointer sbrk( int arg0, - ffi.Pointer arg1, ) { - return _setwgroups_np( + return _sbrk( arg0, - arg1, ); } - late final _setwgroups_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer)>>('setwgroups_np'); - late final _setwgroups_np = _setwgroups_npPtr - .asFunction)>(); + late final _sbrkPtr = + _lookup Function(ffi.Int)>>( + 'sbrk'); + late final _sbrk = _sbrkPtr.asFunction Function(int)>(); - int strtofflags( - ffi.Pointer> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + int setpgrp() { + return _setpgrp(); + } + + late final _setpgrpPtr = + _lookup>('setpgrp'); + late final _setpgrp = _setpgrpPtr.asFunction(); + + int setregid( + int arg0, + int arg1, ) { - return _strtofflags( + return _setregid( arg0, arg1, - arg2, ); } - late final _strtofflagsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('strtofflags'); - late final _strtofflags = _strtofflagsPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>(); + late final _setregidPtr = + _lookup>('setregid'); + late final _setregid = _setregidPtr.asFunction(); - int swapon( - ffi.Pointer arg0, + int setreuid( + int arg0, + int arg1, ) { - return _swapon( + return _setreuid( arg0, + arg1, ); } - late final _swaponPtr = - _lookup)>>( - 'swapon'); - late final _swapon = - _swaponPtr.asFunction)>(); + late final _setreuidPtr = + _lookup>('setreuid'); + late final _setreuid = _setreuidPtr.asFunction(); - int ttyslot() { - return _ttyslot(); + void sync1() { + return _sync1(); } - late final _ttyslotPtr = - _lookup>('ttyslot'); - late final _ttyslot = _ttyslotPtr.asFunction(); + late final _sync1Ptr = + _lookup>('sync'); + late final _sync1 = _sync1Ptr.asFunction(); - int undelete( + int truncate( ffi.Pointer arg0, + int arg1, ) { - return _undelete( + return _truncate( arg0, + arg1, ); } - late final _undeletePtr = - _lookup)>>( - 'undelete'); - late final _undelete = - _undeletePtr.asFunction)>(); + late final _truncatePtr = _lookup< + ffi.NativeFunction, off_t)>>( + 'truncate'); + late final _truncate = + _truncatePtr.asFunction, int)>(); - int unwhiteout( - ffi.Pointer arg0, + int ualarm( + int arg0, + int arg1, ) { - return _unwhiteout( + return _ualarm( arg0, + arg1, ); } - late final _unwhiteoutPtr = - _lookup)>>( - 'unwhiteout'); - late final _unwhiteout = - _unwhiteoutPtr.asFunction)>(); + late final _ualarmPtr = + _lookup>( + 'ualarm'); + late final _ualarm = _ualarmPtr.asFunction(); - int syscall( + int usleep( int arg0, ) { - return _syscall( + return _usleep( arg0, ); } - late final _syscallPtr = - _lookup>('syscall'); - late final _syscall = _syscallPtr.asFunction(); + late final _usleepPtr = + _lookup>('usleep'); + late final _usleep = _usleepPtr.asFunction(); - int fgetattrlist( + int vfork() { + return _vfork(); + } + + late final _vforkPtr = + _lookup>('vfork'); + late final _vfork = _vforkPtr.asFunction(); + + int fsync( int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, ) { - return _fgetattrlist( + return _fsync( arg0, - arg1, - arg2, - arg3, - arg4, ); } - late final _fgetattrlistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedInt)>>('fgetattrlist'); - late final _fgetattrlist = _fgetattrlistPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer, int, int)>(); + late final _fsyncPtr = + _lookup>('fsync'); + late final _fsync = _fsyncPtr.asFunction(); - int fsetattrlist( + int ftruncate( int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + int arg1, ) { - return _fsetattrlist( + return _ftruncate( arg0, arg1, - arg2, - arg3, - arg4, ); } - late final _fsetattrlistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedInt)>>('fsetattrlist'); - late final _fsetattrlist = _fsetattrlistPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer, int, int)>(); + late final _ftruncatePtr = + _lookup>( + 'ftruncate'); + late final _ftruncate = _ftruncatePtr.asFunction(); - int getattrlist( + int getlogin_r( ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + int arg1, ) { - return _getattrlist( + return _getlogin_r( arg0, arg1, - arg2, - arg3, - arg4, ); } - late final _getattrlistPtr = _lookup< + late final _getlogin_rPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedInt)>>('getattrlist'); - late final _getattrlist = _getattrlistPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Size)>>('getlogin_r'); + late final _getlogin_r = + _getlogin_rPtr.asFunction, int)>(); - int setattrlist( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + int fchown( + int arg0, + int arg1, + int arg2, ) { - return _setattrlist( + return _fchown( arg0, arg1, arg2, - arg3, - arg4, ); } - late final _setattrlistPtr = _lookup< + late final _fchownPtr = + _lookup>( + 'fchown'); + late final _fchown = _fchownPtr.asFunction(); + + int gethostname( + ffi.Pointer arg0, + int arg1, + ) { + return _gethostname( + arg0, + arg1, + ); + } + + late final _gethostnamePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedInt)>>('setattrlist'); - late final _setattrlist = _setattrlistPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Size)>>('gethostname'); + late final _gethostname = + _gethostnamePtr.asFunction, int)>(); - int exchangedata( + int readlink( ffi.Pointer arg0, ffi.Pointer arg1, int arg2, ) { - return _exchangedata( + return _readlink( arg0, arg1, arg2, ); } - late final _exchangedataPtr = _lookup< + late final _readlinkPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('exchangedata'); - late final _exchangedata = _exchangedataPtr.asFunction< + ssize_t Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('readlink'); + late final _readlink = _readlinkPtr.asFunction< int Function(ffi.Pointer, ffi.Pointer, int)>(); - int getdirentriesattr( + int setegid( int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, - ffi.Pointer arg6, - int arg7, ) { - return _getdirentriesattr( + return _setegid( arg0, - arg1, - arg2, - arg3, - arg4, - arg5, - arg6, - arg7, ); } - late final _getdirentriesattrPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt)>>('getdirentriesattr'); - late final _getdirentriesattr = _getdirentriesattrPtr.asFunction< - int Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + late final _setegidPtr = + _lookup>('setegid'); + late final _setegid = _setegidPtr.asFunction(); - int searchfs( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, - ffi.Pointer arg5, + int seteuid( + int arg0, ) { - return _searchfs( + return _seteuid( arg0, - arg1, - arg2, - arg3, - arg4, - arg5, ); } - late final _searchfsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer)>>('searchfs'); - late final _searchfs = _searchfsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer)>(); + late final _seteuidPtr = + _lookup>('seteuid'); + late final _seteuid = _seteuidPtr.asFunction(); - int fsctl( + int symlink( ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - int arg3, + ffi.Pointer arg1, ) { - return _fsctl( + return _symlink( arg0, arg1, - arg2, - arg3, ); } - late final _fsctlPtr = _lookup< + late final _symlinkPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.UnsignedLong, - ffi.Pointer, ffi.UnsignedInt)>>('fsctl'); - late final _fsctl = _fsctlPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, int)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('symlink'); + late final _symlink = _symlinkPtr + .asFunction, ffi.Pointer)>(); - int ffsctl( + int pselect( int arg0, - int arg1, - ffi.Pointer arg2, - int arg3, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, ) { - return _ffsctl( + return _pselect( arg0, arg1, arg2, arg3, + arg4, + arg5, ); } - late final _ffsctlPtr = _lookup< + late final _pselectPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.UnsignedLong, ffi.Pointer, - ffi.UnsignedInt)>>('ffsctl'); - late final _ffsctl = _ffsctlPtr - .asFunction, int)>(); + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('pselect'); + late final _pselect = _pselectPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - int fsync_volume_np( + int select( int arg0, - int arg1, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) { - return _fsync_volume_np( + return _select( arg0, arg1, + arg2, + arg3, + arg4, ); } - late final _fsync_volume_npPtr = - _lookup>( - 'fsync_volume_np'); - late final _fsync_volume_np = - _fsync_volume_npPtr.asFunction(); + late final _selectPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('select'); + late final _select = _selectPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int sync_volume_np( - ffi.Pointer arg0, + int accessx_np( + ffi.Pointer arg0, int arg1, + ffi.Pointer arg2, + int arg3, ) { - return _sync_volume_np( + return _accessx_np( arg0, arg1, + arg2, + arg3, ); } - late final _sync_volume_npPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sync_volume_np'); - late final _sync_volume_np = - _sync_volume_npPtr.asFunction, int)>(); - - late final ffi.Pointer _optreset = _lookup('optreset'); - - int get optreset => _optreset.value; - - set optreset(int value) => _optreset.value = value; + late final _accessx_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer, uid_t)>>('accessx_np'); + late final _accessx_np = _accessx_npPtr.asFunction< + int Function( + ffi.Pointer, int, ffi.Pointer, int)>(); - int open( + int acct( ffi.Pointer arg0, - int arg1, ) { - return _open( + return _acct( arg0, - arg1, ); } - late final _openPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'open'); - late final _open = - _openPtr.asFunction, int)>(); + late final _acctPtr = + _lookup)>>( + 'acct'); + late final _acct = _acctPtr.asFunction)>(); - int openat( - int arg0, - ffi.Pointer arg1, + int add_profil( + ffi.Pointer arg0, + int arg1, int arg2, + int arg3, ) { - return _openat( + return _add_profil( arg0, arg1, arg2, + arg3, ); } - late final _openatPtr = _lookup< + late final _add_profilPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int)>>('openat'); - late final _openat = - _openatPtr.asFunction, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, + ffi.UnsignedInt)>>('add_profil'); + late final _add_profil = _add_profilPtr + .asFunction, int, int, int)>(); - int creat( - ffi.Pointer arg0, - int arg1, + void endusershell() { + return _endusershell(); + } + + late final _endusershellPtr = + _lookup>('endusershell'); + late final _endusershell = _endusershellPtr.asFunction(); + + int execvP( + ffi.Pointer __file, + ffi.Pointer __searchpath, + ffi.Pointer> __argv, ) { - return _creat( - arg0, - arg1, + return _execvP( + __file, + __searchpath, + __argv, ); } - late final _creatPtr = _lookup< - ffi.NativeFunction, mode_t)>>( - 'creat'); - late final _creat = - _creatPtr.asFunction, int)>(); + late final _execvPPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('execvP'); + late final _execvP = _execvPPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - int fcntl( + ffi.Pointer fflagstostr( int arg0, - int arg1, ) { - return _fcntl( + return _fflagstostr( arg0, - arg1, ); } - late final _fcntlPtr = - _lookup>('fcntl'); - late final _fcntl = _fcntlPtr.asFunction(); + late final _fflagstostrPtr = _lookup< + ffi.NativeFunction Function(ffi.UnsignedLong)>>( + 'fflagstostr'); + late final _fflagstostr = + _fflagstostrPtr.asFunction Function(int)>(); - int openx_np( + int getdomainname( ffi.Pointer arg0, int arg1, - filesec_t arg2, ) { - return _openx_np( + return _getdomainname( arg0, arg1, - arg2, ); } - late final _openx_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int, filesec_t)>>('openx_np'); - late final _openx_np = _openx_npPtr - .asFunction, int, filesec_t)>(); + late final _getdomainnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'getdomainname'); + late final _getdomainname = + _getdomainnamePtr.asFunction, int)>(); - int open_dprotected_np( + int getgrouplist( ffi.Pointer arg0, int arg1, - int arg2, - int arg3, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _open_dprotected_np( + return _getgrouplist( arg0, arg1, arg2, @@ -33635,32613 +32754,31232 @@ class NativeCupertinoHttp { ); } - late final _open_dprotected_npPtr = _lookup< + late final _getgrouplistPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Int)>>('open_dprotected_np'); - late final _open_dprotected_np = _open_dprotected_npPtr - .asFunction, int, int, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer, + ffi.Pointer)>>('getgrouplist'); + late final _getgrouplist = _getgrouplistPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); - int flock1( - int arg0, - int arg1, + int gethostuuid( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _flock1( + return _gethostuuid( arg0, arg1, ); } - late final _flock1Ptr = - _lookup>('flock'); - late final _flock1 = _flock1Ptr.asFunction(); - - filesec_t filesec_init() { - return _filesec_init(); - } - - late final _filesec_initPtr = - _lookup>('filesec_init'); - late final _filesec_init = - _filesec_initPtr.asFunction(); - - filesec_t filesec_dup( - filesec_t arg0, - ) { - return _filesec_dup( - arg0, - ); - } - - late final _filesec_dupPtr = - _lookup>('filesec_dup'); - late final _filesec_dup = - _filesec_dupPtr.asFunction(); + late final _gethostuuidPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('gethostuuid'); + late final _gethostuuid = _gethostuuidPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - void filesec_free( - filesec_t arg0, + int getmode( + ffi.Pointer arg0, + int arg1, ) { - return _filesec_free( + return _getmode( arg0, + arg1, ); } - late final _filesec_freePtr = - _lookup>('filesec_free'); - late final _filesec_free = - _filesec_freePtr.asFunction(); + late final _getmodePtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'getmode'); + late final _getmode = + _getmodePtr.asFunction, int)>(); - int filesec_get_property( - filesec_t arg0, - int arg1, - ffi.Pointer arg2, + int getpeereid( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _filesec_get_property( + return _getpeereid( arg0, arg1, arg2, ); } - late final _filesec_get_propertyPtr = _lookup< + late final _getpeereidPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(filesec_t, ffi.Int32, - ffi.Pointer)>>('filesec_get_property'); - late final _filesec_get_property = _filesec_get_propertyPtr - .asFunction)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Pointer)>>('getpeereid'); + late final _getpeereid = _getpeereidPtr + .asFunction, ffi.Pointer)>(); - int filesec_query_property( - filesec_t arg0, - int arg1, - ffi.Pointer arg2, + int getsgroups_np( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _filesec_query_property( + return _getsgroups_np( arg0, arg1, - arg2, ); } - late final _filesec_query_propertyPtr = _lookup< + late final _getsgroups_npPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(filesec_t, ffi.Int32, - ffi.Pointer)>>('filesec_query_property'); - late final _filesec_query_property = _filesec_query_propertyPtr - .asFunction)>(); + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('getsgroups_np'); + late final _getsgroups_np = _getsgroups_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int filesec_set_property( - filesec_t arg0, - int arg1, - ffi.Pointer arg2, + ffi.Pointer getusershell() { + return _getusershell(); + } + + late final _getusershellPtr = + _lookup Function()>>( + 'getusershell'); + late final _getusershell = + _getusershellPtr.asFunction Function()>(); + + int getwgroups_np( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _filesec_set_property( + return _getwgroups_np( arg0, arg1, - arg2, ); } - late final _filesec_set_propertyPtr = _lookup< + late final _getwgroups_npPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(filesec_t, ffi.Int32, - ffi.Pointer)>>('filesec_set_property'); - late final _filesec_set_property = _filesec_set_propertyPtr - .asFunction)>(); + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('getwgroups_np'); + late final _getwgroups_np = _getwgroups_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int filesec_unset_property( - filesec_t arg0, + int initgroups( + ffi.Pointer arg0, int arg1, ) { - return _filesec_unset_property( + return _initgroups( arg0, arg1, ); } - late final _filesec_unset_propertyPtr = - _lookup>( - 'filesec_unset_property'); - late final _filesec_unset_property = - _filesec_unset_propertyPtr.asFunction(); + late final _initgroupsPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'initgroups'); + late final _initgroups = + _initgroupsPtr.asFunction, int)>(); - late final _class_OS_os_workgroup1 = _getClass1("OS_os_workgroup"); - int os_workgroup_copy_port( - os_workgroup_t wg, - ffi.Pointer mach_port_out, + int issetugid() { + return _issetugid(); + } + + late final _issetugidPtr = + _lookup>('issetugid'); + late final _issetugid = _issetugidPtr.asFunction(); + + ffi.Pointer mkdtemp( + ffi.Pointer arg0, ) { - return _os_workgroup_copy_port( - wg, - mach_port_out, + return _mkdtemp( + arg0, ); } - late final _os_workgroup_copy_portPtr = _lookup< + late final _mkdtempPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(os_workgroup_t, - ffi.Pointer)>>('os_workgroup_copy_port'); - late final _os_workgroup_copy_port = _os_workgroup_copy_portPtr - .asFunction)>(); + ffi.Pointer Function(ffi.Pointer)>>('mkdtemp'); + late final _mkdtemp = _mkdtempPtr + .asFunction Function(ffi.Pointer)>(); - os_workgroup_t os_workgroup_create_with_port( - ffi.Pointer name, - int mach_port, + int mknod( + ffi.Pointer arg0, + int arg1, + int arg2, ) { - return _os_workgroup_create_with_port( - name, - mach_port, + return _mknod( + arg0, + arg1, + arg2, ); } - late final _os_workgroup_create_with_portPtr = _lookup< + late final _mknodPtr = _lookup< ffi.NativeFunction< - os_workgroup_t Function(ffi.Pointer, - mach_port_t)>>('os_workgroup_create_with_port'); - late final _os_workgroup_create_with_port = _os_workgroup_create_with_portPtr - .asFunction, int)>(); + ffi.Int Function(ffi.Pointer, mode_t, dev_t)>>('mknod'); + late final _mknod = + _mknodPtr.asFunction, int, int)>(); - os_workgroup_t os_workgroup_create_with_workgroup( - ffi.Pointer name, - os_workgroup_t wg, + int mkpath_np( + ffi.Pointer path, + int omode, ) { - return _os_workgroup_create_with_workgroup( - name, - wg, + return _mkpath_np( + path, + omode, ); } - late final _os_workgroup_create_with_workgroupPtr = _lookup< - ffi.NativeFunction< - os_workgroup_t Function(ffi.Pointer, - os_workgroup_t)>>('os_workgroup_create_with_workgroup'); - late final _os_workgroup_create_with_workgroup = - _os_workgroup_create_with_workgroupPtr.asFunction< - os_workgroup_t Function(ffi.Pointer, os_workgroup_t)>(); + late final _mkpath_npPtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'mkpath_np'); + late final _mkpath_np = + _mkpath_npPtr.asFunction, int)>(); - int os_workgroup_join( - os_workgroup_t wg, - os_workgroup_join_token_t token_out, + int mkpathat_np( + int dfd, + ffi.Pointer path, + int omode, ) { - return _os_workgroup_join( - wg, - token_out, + return _mkpathat_np( + dfd, + path, + omode, ); } - late final _os_workgroup_joinPtr = _lookup< + late final _mkpathat_npPtr = _lookup< ffi.NativeFunction< ffi.Int Function( - os_workgroup_t, os_workgroup_join_token_t)>>('os_workgroup_join'); - late final _os_workgroup_join = _os_workgroup_joinPtr - .asFunction(); + ffi.Int, ffi.Pointer, mode_t)>>('mkpathat_np'); + late final _mkpathat_np = _mkpathat_npPtr + .asFunction, int)>(); - void os_workgroup_leave( - os_workgroup_t wg, - os_workgroup_join_token_t token, + int mkstemps( + ffi.Pointer arg0, + int arg1, ) { - return _os_workgroup_leave( - wg, - token, + return _mkstemps( + arg0, + arg1, ); } - late final _os_workgroup_leavePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(os_workgroup_t, - os_workgroup_join_token_t)>>('os_workgroup_leave'); - late final _os_workgroup_leave = _os_workgroup_leavePtr - .asFunction(); + late final _mkstempsPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'mkstemps'); + late final _mkstemps = + _mkstempsPtr.asFunction, int)>(); - int os_workgroup_set_working_arena( - os_workgroup_t wg, - ffi.Pointer arena, - int max_workers, - os_workgroup_working_arena_destructor_t destructor, + int mkostemp( + ffi.Pointer path, + int oflags, ) { - return _os_workgroup_set_working_arena( - wg, - arena, - max_workers, - destructor, + return _mkostemp( + path, + oflags, ); } - late final _os_workgroup_set_working_arenaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(os_workgroup_t, ffi.Pointer, - ffi.Uint32, os_workgroup_working_arena_destructor_t)>>( - 'os_workgroup_set_working_arena'); - late final _os_workgroup_set_working_arena = - _os_workgroup_set_working_arenaPtr.asFunction< - int Function(os_workgroup_t, ffi.Pointer, int, - os_workgroup_working_arena_destructor_t)>(); + late final _mkostempPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'mkostemp'); + late final _mkostemp = + _mkostempPtr.asFunction, int)>(); - ffi.Pointer os_workgroup_get_working_arena( - os_workgroup_t wg, - ffi.Pointer index_out, + int mkostemps( + ffi.Pointer path, + int slen, + int oflags, ) { - return _os_workgroup_get_working_arena( - wg, - index_out, + return _mkostemps( + path, + slen, + oflags, ); } - late final _os_workgroup_get_working_arenaPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - os_workgroup_t, ffi.Pointer)>>( - 'os_workgroup_get_working_arena'); - late final _os_workgroup_get_working_arena = - _os_workgroup_get_working_arenaPtr.asFunction< - ffi.Pointer Function( - os_workgroup_t, ffi.Pointer)>(); + late final _mkostempsPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int, ffi.Int)>>('mkostemps'); + late final _mkostemps = + _mkostempsPtr.asFunction, int, int)>(); - void os_workgroup_cancel( - os_workgroup_t wg, + int mkstemp_dprotected_np( + ffi.Pointer path, + int dpclass, + int dpflags, ) { - return _os_workgroup_cancel( - wg, + return _mkstemp_dprotected_np( + path, + dpclass, + dpflags, ); } - late final _os_workgroup_cancelPtr = - _lookup>( - 'os_workgroup_cancel'); - late final _os_workgroup_cancel = - _os_workgroup_cancelPtr.asFunction(); + late final _mkstemp_dprotected_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, + ffi.Int)>>('mkstemp_dprotected_np'); + late final _mkstemp_dprotected_np = _mkstemp_dprotected_npPtr + .asFunction, int, int)>(); - bool os_workgroup_testcancel( - os_workgroup_t wg, + ffi.Pointer mkdtempat_np( + int dfd, + ffi.Pointer path, ) { - return _os_workgroup_testcancel( - wg, + return _mkdtempat_np( + dfd, + path, ); } - late final _os_workgroup_testcancelPtr = - _lookup>( - 'os_workgroup_testcancel'); - late final _os_workgroup_testcancel = - _os_workgroup_testcancelPtr.asFunction(); + late final _mkdtempat_npPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('mkdtempat_np'); + late final _mkdtempat_np = _mkdtempat_npPtr + .asFunction Function(int, ffi.Pointer)>(); - int os_workgroup_max_parallel_threads( - os_workgroup_t wg, - os_workgroup_mpt_attr_t attr, + int mkstempsat_np( + int dfd, + ffi.Pointer path, + int slen, ) { - return _os_workgroup_max_parallel_threads( - wg, - attr, + return _mkstempsat_np( + dfd, + path, + slen, ); } - late final _os_workgroup_max_parallel_threadsPtr = _lookup< + late final _mkstempsat_npPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(os_workgroup_t, - os_workgroup_mpt_attr_t)>>('os_workgroup_max_parallel_threads'); - late final _os_workgroup_max_parallel_threads = - _os_workgroup_max_parallel_threadsPtr - .asFunction(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int)>>('mkstempsat_np'); + late final _mkstempsat_np = _mkstempsat_npPtr + .asFunction, int)>(); - late final _class_OS_os_workgroup_interval1 = - _getClass1("OS_os_workgroup_interval"); - int os_workgroup_interval_start( - os_workgroup_interval_t wg, - int start, - int deadline, - os_workgroup_interval_data_t data, + int mkostempsat_np( + int dfd, + ffi.Pointer path, + int slen, + int oflags, ) { - return _os_workgroup_interval_start( - wg, - start, - deadline, - data, + return _mkostempsat_np( + dfd, + path, + slen, + oflags, ); } - late final _os_workgroup_interval_startPtr = _lookup< + late final _mkostempsat_npPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, ffi.Uint64, - os_workgroup_interval_data_t)>>('os_workgroup_interval_start'); - late final _os_workgroup_interval_start = - _os_workgroup_interval_startPtr.asFunction< - int Function(os_workgroup_interval_t, int, int, - os_workgroup_interval_data_t)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Int)>>('mkostempsat_np'); + late final _mkostempsat_np = _mkostempsat_npPtr + .asFunction, int, int)>(); - int os_workgroup_interval_update( - os_workgroup_interval_t wg, - int deadline, - os_workgroup_interval_data_t data, + int nfssvc( + int arg0, + ffi.Pointer arg1, ) { - return _os_workgroup_interval_update( - wg, - deadline, - data, + return _nfssvc( + arg0, + arg1, ); } - late final _os_workgroup_interval_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, - os_workgroup_interval_data_t)>>('os_workgroup_interval_update'); - late final _os_workgroup_interval_update = - _os_workgroup_interval_updatePtr.asFunction< - int Function( - os_workgroup_interval_t, int, os_workgroup_interval_data_t)>(); + late final _nfssvcPtr = _lookup< + ffi.NativeFunction)>>( + 'nfssvc'); + late final _nfssvc = + _nfssvcPtr.asFunction)>(); - int os_workgroup_interval_finish( - os_workgroup_interval_t wg, - os_workgroup_interval_data_t data, + int profil( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, ) { - return _os_workgroup_interval_finish( - wg, - data, + return _profil( + arg0, + arg1, + arg2, + arg3, ); } - late final _os_workgroup_interval_finishPtr = _lookup< + late final _profilPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(os_workgroup_interval_t, - os_workgroup_interval_data_t)>>('os_workgroup_interval_finish'); - late final _os_workgroup_interval_finish = - _os_workgroup_interval_finishPtr.asFunction< - int Function( - os_workgroup_interval_t, os_workgroup_interval_data_t)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, + ffi.UnsignedInt)>>('profil'); + late final _profil = _profilPtr + .asFunction, int, int, int)>(); - late final _class_OS_os_workgroup_parallel1 = - _getClass1("OS_os_workgroup_parallel"); - os_workgroup_parallel_t os_workgroup_parallel_create( - ffi.Pointer name, - os_workgroup_attr_t attr, + int pthread_setugid_np( + int arg0, + int arg1, ) { - return _os_workgroup_parallel_create( - name, - attr, + return _pthread_setugid_np( + arg0, + arg1, ); } - late final _os_workgroup_parallel_createPtr = _lookup< - ffi.NativeFunction< - os_workgroup_parallel_t Function(ffi.Pointer, - os_workgroup_attr_t)>>('os_workgroup_parallel_create'); - late final _os_workgroup_parallel_create = - _os_workgroup_parallel_createPtr.asFunction< - os_workgroup_parallel_t Function( - ffi.Pointer, os_workgroup_attr_t)>(); + late final _pthread_setugid_npPtr = + _lookup>( + 'pthread_setugid_np'); + late final _pthread_setugid_np = + _pthread_setugid_npPtr.asFunction(); - int dispatch_time( - int when, - int delta, + int pthread_getugid_np( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _dispatch_time( - when, - delta, + return _pthread_getugid_np( + arg0, + arg1, ); } - late final _dispatch_timePtr = _lookup< + late final _pthread_getugid_npPtr = _lookup< ffi.NativeFunction< - dispatch_time_t Function( - dispatch_time_t, ffi.Int64)>>('dispatch_time'); - late final _dispatch_time = - _dispatch_timePtr.asFunction(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('pthread_getugid_np'); + late final _pthread_getugid_np = _pthread_getugid_npPtr + .asFunction, ffi.Pointer)>(); - int dispatch_walltime( - ffi.Pointer when, - int delta, + int reboot( + int arg0, ) { - return _dispatch_walltime( - when, - delta, + return _reboot( + arg0, ); } - late final _dispatch_walltimePtr = _lookup< - ffi.NativeFunction< - dispatch_time_t Function( - ffi.Pointer, ffi.Int64)>>('dispatch_walltime'); - late final _dispatch_walltime = _dispatch_walltimePtr - .asFunction, int)>(); + late final _rebootPtr = + _lookup>('reboot'); + late final _reboot = _rebootPtr.asFunction(); - int qos_class_self() { - return _qos_class_self(); + int revoke( + ffi.Pointer arg0, + ) { + return _revoke( + arg0, + ); } - late final _qos_class_selfPtr = - _lookup>('qos_class_self'); - late final _qos_class_self = _qos_class_selfPtr.asFunction(); + late final _revokePtr = + _lookup)>>( + 'revoke'); + late final _revoke = + _revokePtr.asFunction)>(); - int qos_class_main() { - return _qos_class_main(); + int rcmd( + ffi.Pointer> arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + ) { + return _rcmd( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); } - late final _qos_class_mainPtr = - _lookup>('qos_class_main'); - late final _qos_class_main = _qos_class_mainPtr.asFunction(); + late final _rcmdPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('rcmd'); + late final _rcmd = _rcmdPtr.asFunction< + int Function( + ffi.Pointer>, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void dispatch_retain( - dispatch_object_t object, + int rcmd_af( + ffi.Pointer> arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + int arg6, ) { - return _dispatch_retain( - object, + return _rcmd_af( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, ); } - late final _dispatch_retainPtr = - _lookup>( - 'dispatch_retain'); - late final _dispatch_retain = - _dispatch_retainPtr.asFunction(); + late final _rcmd_afPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>>('rcmd_af'); + late final _rcmd_af = _rcmd_afPtr.asFunction< + int Function( + ffi.Pointer>, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - void dispatch_release( - dispatch_object_t object, + int rresvport( + ffi.Pointer arg0, ) { - return _dispatch_release( - object, + return _rresvport( + arg0, ); } - late final _dispatch_releasePtr = - _lookup>( - 'dispatch_release'); - late final _dispatch_release = - _dispatch_releasePtr.asFunction(); + late final _rresvportPtr = + _lookup)>>( + 'rresvport'); + late final _rresvport = + _rresvportPtr.asFunction)>(); - ffi.Pointer dispatch_get_context( - dispatch_object_t object, + int rresvport_af( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_get_context( - object, + return _rresvport_af( + arg0, + arg1, ); } - late final _dispatch_get_contextPtr = _lookup< + late final _rresvport_afPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'rresvport_af'); + late final _rresvport_af = + _rresvport_afPtr.asFunction, int)>(); + + int iruserok( + int arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + return _iruserok( + arg0, + arg1, + arg2, + arg3, + ); + } + + late final _iruserokPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - dispatch_object_t)>>('dispatch_get_context'); - late final _dispatch_get_context = _dispatch_get_contextPtr - .asFunction Function(dispatch_object_t)>(); + ffi.Int Function(ffi.UnsignedLong, ffi.Int, ffi.Pointer, + ffi.Pointer)>>('iruserok'); + late final _iruserok = _iruserokPtr.asFunction< + int Function(int, int, ffi.Pointer, ffi.Pointer)>(); - void dispatch_set_context( - dispatch_object_t object, - ffi.Pointer context, + int iruserok_sa( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) { - return _dispatch_set_context( - object, - context, + return _iruserok_sa( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_set_contextPtr = _lookup< + late final _iruserok_saPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, - ffi.Pointer)>>('dispatch_set_context'); - late final _dispatch_set_context = _dispatch_set_contextPtr - .asFunction)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('iruserok_sa'); + late final _iruserok_sa = _iruserok_saPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer, + ffi.Pointer)>(); - void dispatch_set_finalizer_f( - dispatch_object_t object, - dispatch_function_t finalizer, + int ruserok( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _dispatch_set_finalizer_f( - object, - finalizer, + return _ruserok( + arg0, + arg1, + arg2, + arg3, ); } - late final _dispatch_set_finalizer_fPtr = _lookup< + late final _ruserokPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, - dispatch_function_t)>>('dispatch_set_finalizer_f'); - late final _dispatch_set_finalizer_f = _dispatch_set_finalizer_fPtr - .asFunction(); + ffi.Int Function(ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('ruserok'); + late final _ruserok = _ruserokPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); - void dispatch_activate( - dispatch_object_t object, + int setdomainname( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_activate( - object, + return _setdomainname( + arg0, + arg1, ); } - late final _dispatch_activatePtr = - _lookup>( - 'dispatch_activate'); - late final _dispatch_activate = - _dispatch_activatePtr.asFunction(); + late final _setdomainnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'setdomainname'); + late final _setdomainname = + _setdomainnamePtr.asFunction, int)>(); - void dispatch_suspend( - dispatch_object_t object, + int setgroups( + int arg0, + ffi.Pointer arg1, ) { - return _dispatch_suspend( - object, + return _setgroups( + arg0, + arg1, ); } - late final _dispatch_suspendPtr = - _lookup>( - 'dispatch_suspend'); - late final _dispatch_suspend = - _dispatch_suspendPtr.asFunction(); + late final _setgroupsPtr = _lookup< + ffi.NativeFunction)>>( + 'setgroups'); + late final _setgroups = + _setgroupsPtr.asFunction)>(); - void dispatch_resume( - dispatch_object_t object, + void sethostid( + int arg0, ) { - return _dispatch_resume( - object, + return _sethostid( + arg0, ); } - late final _dispatch_resumePtr = - _lookup>( - 'dispatch_resume'); - late final _dispatch_resume = - _dispatch_resumePtr.asFunction(); + late final _sethostidPtr = + _lookup>('sethostid'); + late final _sethostid = _sethostidPtr.asFunction(); - void dispatch_set_qos_class_floor( - dispatch_object_t object, - int qos_class, - int relative_priority, + int sethostname( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_set_qos_class_floor( - object, - qos_class, - relative_priority, + return _sethostname( + arg0, + arg1, ); } - late final _dispatch_set_qos_class_floorPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, ffi.Int32, - ffi.Int)>>('dispatch_set_qos_class_floor'); - late final _dispatch_set_qos_class_floor = _dispatch_set_qos_class_floorPtr - .asFunction(); + late final _sethostnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sethostname'); + late final _sethostname = + _sethostnamePtr.asFunction, int)>(); - int dispatch_wait( - ffi.Pointer object, - int timeout, + int setlogin( + ffi.Pointer arg0, ) { - return _dispatch_wait( - object, - timeout, + return _setlogin( + arg0, ); } - late final _dispatch_waitPtr = _lookup< - ffi.NativeFunction< - ffi.IntPtr Function( - ffi.Pointer, dispatch_time_t)>>('dispatch_wait'); - late final _dispatch_wait = - _dispatch_waitPtr.asFunction, int)>(); + late final _setloginPtr = + _lookup)>>( + 'setlogin'); + late final _setlogin = + _setloginPtr.asFunction)>(); - void dispatch_notify( - ffi.Pointer object, - dispatch_object_t queue, - dispatch_block_t notification_block, + ffi.Pointer setmode( + ffi.Pointer arg0, ) { - return _dispatch_notify( - object, - queue, - notification_block, + return _setmode( + arg0, ); } - late final _dispatch_notifyPtr = _lookup< + late final _setmodePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, dispatch_object_t, - dispatch_block_t)>>('dispatch_notify'); - late final _dispatch_notify = _dispatch_notifyPtr.asFunction< - void Function( - ffi.Pointer, dispatch_object_t, dispatch_block_t)>(); + ffi.Pointer Function(ffi.Pointer)>>('setmode'); + late final _setmode = _setmodePtr + .asFunction Function(ffi.Pointer)>(); - void dispatch_cancel( - ffi.Pointer object, + int setrgid( + int arg0, ) { - return _dispatch_cancel( - object, + return _setrgid( + arg0, ); } - late final _dispatch_cancelPtr = - _lookup)>>( - 'dispatch_cancel'); - late final _dispatch_cancel = - _dispatch_cancelPtr.asFunction)>(); + late final _setrgidPtr = + _lookup>('setrgid'); + late final _setrgid = _setrgidPtr.asFunction(); - int dispatch_testcancel( - ffi.Pointer object, + int setruid( + int arg0, ) { - return _dispatch_testcancel( - object, + return _setruid( + arg0, ); } - late final _dispatch_testcancelPtr = - _lookup)>>( - 'dispatch_testcancel'); - late final _dispatch_testcancel = - _dispatch_testcancelPtr.asFunction)>(); + late final _setruidPtr = + _lookup>('setruid'); + late final _setruid = _setruidPtr.asFunction(); - void dispatch_debug( - dispatch_object_t object, - ffi.Pointer message, + int setsgroups_np( + int arg0, + ffi.Pointer arg1, ) { - return _dispatch_debug( - object, - message, + return _setsgroups_np( + arg0, + arg1, ); } - late final _dispatch_debugPtr = _lookup< + late final _setsgroups_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_object_t, ffi.Pointer)>>('dispatch_debug'); - late final _dispatch_debug = _dispatch_debugPtr - .asFunction)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer)>>('setsgroups_np'); + late final _setsgroups_np = _setsgroups_npPtr + .asFunction)>(); - void dispatch_debugv( - dispatch_object_t object, - ffi.Pointer message, - va_list ap, - ) { - return _dispatch_debugv( - object, - message, - ap, - ); + void setusershell() { + return _setusershell(); } - late final _dispatch_debugvPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, ffi.Pointer, - va_list)>>('dispatch_debugv'); - late final _dispatch_debugv = _dispatch_debugvPtr.asFunction< - void Function(dispatch_object_t, ffi.Pointer, va_list)>(); + late final _setusershellPtr = + _lookup>('setusershell'); + late final _setusershell = _setusershellPtr.asFunction(); - void dispatch_async( - dispatch_queue_t queue, - dispatch_block_t block, + int setwgroups_np( + int arg0, + ffi.Pointer arg1, ) { - return _dispatch_async( - queue, - block, + return _setwgroups_np( + arg0, + arg1, ); } - late final _dispatch_asyncPtr = _lookup< + late final _setwgroups_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_async'); - late final _dispatch_async = _dispatch_asyncPtr - .asFunction(); + ffi.Int Function( + ffi.Int, ffi.Pointer)>>('setwgroups_np'); + late final _setwgroups_np = _setwgroups_npPtr + .asFunction)>(); - void dispatch_async_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int strtofflags( + ffi.Pointer> arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _dispatch_async_f( - queue, - context, - work, + return _strtofflags( + arg0, + arg1, + arg2, ); } - late final _dispatch_async_fPtr = _lookup< + late final _strtofflagsPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_async_f'); - late final _dispatch_async_f = _dispatch_async_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>('strtofflags'); + late final _strtofflags = _strtofflagsPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>(); - void dispatch_sync( - dispatch_queue_t queue, - dispatch_block_t block, + int swapon( + ffi.Pointer arg0, ) { - return _dispatch_sync( - queue, - block, + return _swapon( + arg0, ); } - late final _dispatch_syncPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_sync'); - late final _dispatch_sync = _dispatch_syncPtr - .asFunction(); + late final _swaponPtr = + _lookup)>>( + 'swapon'); + late final _swapon = + _swaponPtr.asFunction)>(); - void dispatch_sync_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, - ) { - return _dispatch_sync_f( - queue, - context, - work, - ); + int ttyslot() { + return _ttyslot(); } - late final _dispatch_sync_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_sync_f'); - late final _dispatch_sync_f = _dispatch_sync_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + late final _ttyslotPtr = + _lookup>('ttyslot'); + late final _ttyslot = _ttyslotPtr.asFunction(); - void dispatch_async_and_wait( - dispatch_queue_t queue, - dispatch_block_t block, + int undelete( + ffi.Pointer arg0, ) { - return _dispatch_async_and_wait( - queue, - block, + return _undelete( + arg0, ); } - late final _dispatch_async_and_waitPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_async_and_wait'); - late final _dispatch_async_and_wait = _dispatch_async_and_waitPtr - .asFunction(); + late final _undeletePtr = + _lookup)>>( + 'undelete'); + late final _undelete = + _undeletePtr.asFunction)>(); - void dispatch_async_and_wait_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int unwhiteout( + ffi.Pointer arg0, ) { - return _dispatch_async_and_wait_f( - queue, - context, - work, + return _unwhiteout( + arg0, ); } - late final _dispatch_async_and_wait_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_async_and_wait_f'); - late final _dispatch_async_and_wait_f = - _dispatch_async_and_wait_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + late final _unwhiteoutPtr = + _lookup)>>( + 'unwhiteout'); + late final _unwhiteout = + _unwhiteoutPtr.asFunction)>(); - void dispatch_apply( - int iterations, - dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> block, + int syscall( + int arg0, ) { - return _dispatch_apply( - iterations, - queue, - block, + return _syscall( + arg0, ); } - late final _dispatch_applyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Size, dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_apply'); - late final _dispatch_apply = _dispatch_applyPtr.asFunction< - void Function(int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + late final _syscallPtr = + _lookup>('syscall'); + late final _syscall = _syscallPtr.asFunction(); - void dispatch_apply_f( - int iterations, - dispatch_queue_t queue, - ffi.Pointer context, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size)>> - work, + int fgetattrlist( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _dispatch_apply_f( - iterations, - queue, - context, - work, + return _fgetattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_apply_fPtr = _lookup< + late final _fgetattrlistPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Size, - dispatch_queue_t, + ffi.Int Function( + ffi.Int, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Size)>>)>>('dispatch_apply_f'); - late final _dispatch_apply_f = _dispatch_apply_fPtr.asFunction< - void Function( - int, - dispatch_queue_t, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size)>>)>(); + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('fgetattrlist'); + late final _fgetattrlist = _fgetattrlistPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); - dispatch_queue_t dispatch_get_current_queue() { - return _dispatch_get_current_queue(); + int fsetattrlist( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + ) { + return _fsetattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, + ); } - late final _dispatch_get_current_queuePtr = - _lookup>( - 'dispatch_get_current_queue'); - late final _dispatch_get_current_queue = - _dispatch_get_current_queuePtr.asFunction(); - - late final ffi.Pointer __dispatch_main_q = - _lookup('_dispatch_main_q'); - - ffi.Pointer get _dispatch_main_q => __dispatch_main_q; + late final _fsetattrlistPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('fsetattrlist'); + late final _fsetattrlist = _fsetattrlistPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); - dispatch_queue_global_t dispatch_get_global_queue( - int identifier, - int flags, + int getattrlist( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _dispatch_get_global_queue( - identifier, - flags, + return _getattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_get_global_queuePtr = _lookup< + late final _getattrlistPtr = _lookup< ffi.NativeFunction< - dispatch_queue_global_t Function( - ffi.IntPtr, uintptr_t)>>('dispatch_get_global_queue'); - late final _dispatch_get_global_queue = _dispatch_get_global_queuePtr - .asFunction(); - - late final ffi.Pointer - __dispatch_queue_attr_concurrent = - _lookup('_dispatch_queue_attr_concurrent'); - - ffi.Pointer get _dispatch_queue_attr_concurrent => - __dispatch_queue_attr_concurrent; + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('getattrlist'); + late final _getattrlist = _getattrlistPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - dispatch_queue_attr_t dispatch_queue_attr_make_initially_inactive( - dispatch_queue_attr_t attr, + int setattrlist( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _dispatch_queue_attr_make_initially_inactive( - attr, + return _setattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_queue_attr_make_initially_inactivePtr = _lookup< - ffi.NativeFunction< - dispatch_queue_attr_t Function(dispatch_queue_attr_t)>>( - 'dispatch_queue_attr_make_initially_inactive'); - late final _dispatch_queue_attr_make_initially_inactive = - _dispatch_queue_attr_make_initially_inactivePtr - .asFunction(); + late final _setattrlistPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('setattrlist'); + late final _setattrlist = _setattrlistPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - dispatch_queue_attr_t dispatch_queue_attr_make_with_autorelease_frequency( - dispatch_queue_attr_t attr, - int frequency, + int exchangedata( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _dispatch_queue_attr_make_with_autorelease_frequency( - attr, - frequency, + return _exchangedata( + arg0, + arg1, + arg2, ); } - late final _dispatch_queue_attr_make_with_autorelease_frequencyPtr = _lookup< - ffi.NativeFunction< - dispatch_queue_attr_t Function( - dispatch_queue_attr_t, ffi.Int32)>>( - 'dispatch_queue_attr_make_with_autorelease_frequency'); - late final _dispatch_queue_attr_make_with_autorelease_frequency = - _dispatch_queue_attr_make_with_autorelease_frequencyPtr.asFunction< - dispatch_queue_attr_t Function(dispatch_queue_attr_t, int)>(); + late final _exchangedataPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedInt)>>('exchangedata'); + late final _exchangedata = _exchangedataPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - dispatch_queue_attr_t dispatch_queue_attr_make_with_qos_class( - dispatch_queue_attr_t attr, - int qos_class, - int relative_priority, + int getdirentriesattr( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + ffi.Pointer arg6, + int arg7, ) { - return _dispatch_queue_attr_make_with_qos_class( - attr, - qos_class, - relative_priority, + return _getdirentriesattr( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, ); } - late final _dispatch_queue_attr_make_with_qos_classPtr = _lookup< + late final _getdirentriesattrPtr = _lookup< ffi.NativeFunction< - dispatch_queue_attr_t Function(dispatch_queue_attr_t, ffi.Int32, - ffi.Int)>>('dispatch_queue_attr_make_with_qos_class'); - late final _dispatch_queue_attr_make_with_qos_class = - _dispatch_queue_attr_make_with_qos_classPtr.asFunction< - dispatch_queue_attr_t Function(dispatch_queue_attr_t, int, int)>(); + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt)>>('getdirentriesattr'); + late final _getdirentriesattr = _getdirentriesattrPtr.asFunction< + int Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - dispatch_queue_t dispatch_queue_create_with_target( - ffi.Pointer label, - dispatch_queue_attr_t attr, - dispatch_queue_t target, + int searchfs( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + ffi.Pointer arg5, ) { - return _dispatch_queue_create_with_target( - label, - attr, - target, + return _searchfs( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _dispatch_queue_create_with_targetPtr = _lookup< + late final _searchfsPtr = _lookup< ffi.NativeFunction< - dispatch_queue_t Function( + ffi.Int Function( ffi.Pointer, - dispatch_queue_attr_t, - dispatch_queue_t)>>('dispatch_queue_create_with_target'); - late final _dispatch_queue_create_with_target = - _dispatch_queue_create_with_targetPtr.asFunction< - dispatch_queue_t Function(ffi.Pointer, - dispatch_queue_attr_t, dispatch_queue_t)>(); + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer)>>('searchfs'); + late final _searchfs = _searchfsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer)>(); - dispatch_queue_t dispatch_queue_create( - ffi.Pointer label, - dispatch_queue_attr_t attr, + int fsctl( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + int arg3, ) { - return _dispatch_queue_create( - label, - attr, + return _fsctl( + arg0, + arg1, + arg2, + arg3, ); } - late final _dispatch_queue_createPtr = _lookup< + late final _fsctlPtr = _lookup< ffi.NativeFunction< - dispatch_queue_t Function(ffi.Pointer, - dispatch_queue_attr_t)>>('dispatch_queue_create'); - late final _dispatch_queue_create = _dispatch_queue_createPtr.asFunction< - dispatch_queue_t Function( - ffi.Pointer, dispatch_queue_attr_t)>(); + ffi.Int Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer, ffi.UnsignedInt)>>('fsctl'); + late final _fsctl = _fsctlPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, int)>(); - ffi.Pointer dispatch_queue_get_label( - dispatch_queue_t queue, + int ffsctl( + int arg0, + int arg1, + ffi.Pointer arg2, + int arg3, ) { - return _dispatch_queue_get_label( - queue, + return _ffsctl( + arg0, + arg1, + arg2, + arg3, ); } - late final _dispatch_queue_get_labelPtr = _lookup< - ffi.NativeFunction Function(dispatch_queue_t)>>( - 'dispatch_queue_get_label'); - late final _dispatch_queue_get_label = _dispatch_queue_get_labelPtr - .asFunction Function(dispatch_queue_t)>(); - - int dispatch_queue_get_qos_class( - dispatch_queue_t queue, - ffi.Pointer relative_priority_ptr, + late final _ffsctlPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.UnsignedLong, ffi.Pointer, + ffi.UnsignedInt)>>('ffsctl'); + late final _ffsctl = _ffsctlPtr + .asFunction, int)>(); + + int fsync_volume_np( + int arg0, + int arg1, ) { - return _dispatch_queue_get_qos_class( - queue, - relative_priority_ptr, + return _fsync_volume_np( + arg0, + arg1, ); } - late final _dispatch_queue_get_qos_classPtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(dispatch_queue_t, - ffi.Pointer)>>('dispatch_queue_get_qos_class'); - late final _dispatch_queue_get_qos_class = _dispatch_queue_get_qos_classPtr - .asFunction)>(); + late final _fsync_volume_npPtr = + _lookup>( + 'fsync_volume_np'); + late final _fsync_volume_np = + _fsync_volume_npPtr.asFunction(); - void dispatch_set_target_queue( - dispatch_object_t object, - dispatch_queue_t queue, + int sync_volume_np( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_set_target_queue( - object, - queue, + return _sync_volume_np( + arg0, + arg1, ); } - late final _dispatch_set_target_queuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, - dispatch_queue_t)>>('dispatch_set_target_queue'); - late final _dispatch_set_target_queue = _dispatch_set_target_queuePtr - .asFunction(); + late final _sync_volume_npPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sync_volume_np'); + late final _sync_volume_np = + _sync_volume_npPtr.asFunction, int)>(); - void dispatch_main() { - return _dispatch_main(); - } + late final ffi.Pointer _optreset = _lookup('optreset'); - late final _dispatch_mainPtr = - _lookup>('dispatch_main'); - late final _dispatch_main = _dispatch_mainPtr.asFunction(); + int get optreset => _optreset.value; - void dispatch_after( - int when, - dispatch_queue_t queue, - dispatch_block_t block, + set optreset(int value) => _optreset.value = value; + + int open( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_after( - when, - queue, - block, + return _open( + arg0, + arg1, ); } - late final _dispatch_afterPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_time_t, dispatch_queue_t, - dispatch_block_t)>>('dispatch_after'); - late final _dispatch_after = _dispatch_afterPtr - .asFunction(); + late final _openPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'open'); + late final _open = + _openPtr.asFunction, int)>(); - void dispatch_after_f( - int when, - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int openat( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _dispatch_after_f( - when, - queue, - context, - work, + return _openat( + arg0, + arg1, + arg2, ); } - late final _dispatch_after_fPtr = _lookup< + late final _openatPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_time_t, dispatch_queue_t, - ffi.Pointer, dispatch_function_t)>>('dispatch_after_f'); - late final _dispatch_after_f = _dispatch_after_fPtr.asFunction< - void Function( - int, dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int)>>('openat'); + late final _openat = + _openatPtr.asFunction, int)>(); - void dispatch_barrier_async( - dispatch_queue_t queue, - dispatch_block_t block, + int creat( + ffi.Pointer arg0, + int arg1, ) { - return _dispatch_barrier_async( - queue, - block, + return _creat( + arg0, + arg1, ); } - late final _dispatch_barrier_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_async'); - late final _dispatch_barrier_async = _dispatch_barrier_asyncPtr - .asFunction(); + late final _creatPtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'creat'); + late final _creat = + _creatPtr.asFunction, int)>(); - void dispatch_barrier_async_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int fcntl( + int arg0, + int arg1, ) { - return _dispatch_barrier_async_f( - queue, - context, - work, + return _fcntl( + arg0, + arg1, ); } - late final _dispatch_barrier_async_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_barrier_async_f'); - late final _dispatch_barrier_async_f = - _dispatch_barrier_async_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + late final _fcntlPtr = + _lookup>('fcntl'); + late final _fcntl = _fcntlPtr.asFunction(); - void dispatch_barrier_sync( - dispatch_queue_t queue, - dispatch_block_t block, + int openx_np( + ffi.Pointer arg0, + int arg1, + filesec_t arg2, ) { - return _dispatch_barrier_sync( - queue, - block, + return _openx_np( + arg0, + arg1, + arg2, ); } - late final _dispatch_barrier_syncPtr = _lookup< + late final _openx_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_sync'); - late final _dispatch_barrier_sync = _dispatch_barrier_syncPtr - .asFunction(); + ffi.Int Function( + ffi.Pointer, ffi.Int, filesec_t)>>('openx_np'); + late final _openx_np = _openx_npPtr + .asFunction, int, filesec_t)>(); - void dispatch_barrier_sync_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int open_dprotected_np( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, ) { - return _dispatch_barrier_sync_f( - queue, - context, - work, + return _open_dprotected_np( + arg0, + arg1, + arg2, + arg3, ); } - late final _dispatch_barrier_sync_fPtr = _lookup< + late final _open_dprotected_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_barrier_sync_f'); - late final _dispatch_barrier_sync_f = _dispatch_barrier_sync_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Int)>>('open_dprotected_np'); + late final _open_dprotected_np = _open_dprotected_npPtr + .asFunction, int, int, int)>(); - void dispatch_barrier_async_and_wait( - dispatch_queue_t queue, - dispatch_block_t block, + int openat_dprotected_np( + int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, + int arg4, ) { - return _dispatch_barrier_async_and_wait( - queue, - block, + return _openat_dprotected_np( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _dispatch_barrier_async_and_waitPtr = _lookup< + late final _openat_dprotected_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, - dispatch_block_t)>>('dispatch_barrier_async_and_wait'); - late final _dispatch_barrier_async_and_wait = - _dispatch_barrier_async_and_waitPtr - .asFunction(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, ffi.Int, + ffi.Int)>>('openat_dprotected_np'); + late final _openat_dprotected_np = _openat_dprotected_npPtr + .asFunction, int, int, int)>(); - void dispatch_barrier_async_and_wait_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int openat_authenticated_np( + int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, ) { - return _dispatch_barrier_async_and_wait_f( - queue, - context, - work, + return _openat_authenticated_np( + arg0, + arg1, + arg2, + arg3, ); } - late final _dispatch_barrier_async_and_wait_fPtr = _lookup< + late final _openat_authenticated_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_barrier_async_and_wait_f'); - late final _dispatch_barrier_async_and_wait_f = - _dispatch_barrier_async_and_wait_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Int)>>('openat_authenticated_np'); + late final _openat_authenticated_np = _openat_authenticated_npPtr + .asFunction, int, int)>(); - void dispatch_queue_set_specific( - dispatch_queue_t queue, - ffi.Pointer key, - ffi.Pointer context, - dispatch_function_t destructor, + int flock1( + int arg0, + int arg1, ) { - return _dispatch_queue_set_specific( - queue, - key, - context, - destructor, + return _flock1( + arg0, + arg1, ); } - late final _dispatch_queue_set_specificPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, - ffi.Pointer, - ffi.Pointer, - dispatch_function_t)>>('dispatch_queue_set_specific'); - late final _dispatch_queue_set_specific = - _dispatch_queue_set_specificPtr.asFunction< - void Function(dispatch_queue_t, ffi.Pointer, - ffi.Pointer, dispatch_function_t)>(); + late final _flock1Ptr = + _lookup>('flock'); + late final _flock1 = _flock1Ptr.asFunction(); - ffi.Pointer dispatch_queue_get_specific( - dispatch_queue_t queue, - ffi.Pointer key, - ) { - return _dispatch_queue_get_specific( - queue, - key, - ); + filesec_t filesec_init() { + return _filesec_init(); } - late final _dispatch_queue_get_specificPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(dispatch_queue_t, - ffi.Pointer)>>('dispatch_queue_get_specific'); - late final _dispatch_queue_get_specific = - _dispatch_queue_get_specificPtr.asFunction< - ffi.Pointer Function( - dispatch_queue_t, ffi.Pointer)>(); + late final _filesec_initPtr = + _lookup>('filesec_init'); + late final _filesec_init = + _filesec_initPtr.asFunction(); - ffi.Pointer dispatch_get_specific( - ffi.Pointer key, + filesec_t filesec_dup( + filesec_t arg0, ) { - return _dispatch_get_specific( - key, + return _filesec_dup( + arg0, ); } - late final _dispatch_get_specificPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('dispatch_get_specific'); - late final _dispatch_get_specific = _dispatch_get_specificPtr - .asFunction Function(ffi.Pointer)>(); + late final _filesec_dupPtr = + _lookup>('filesec_dup'); + late final _filesec_dup = + _filesec_dupPtr.asFunction(); - void dispatch_assert_queue( - dispatch_queue_t queue, + void filesec_free( + filesec_t arg0, ) { - return _dispatch_assert_queue( - queue, + return _filesec_free( + arg0, ); } - late final _dispatch_assert_queuePtr = - _lookup>( - 'dispatch_assert_queue'); - late final _dispatch_assert_queue = - _dispatch_assert_queuePtr.asFunction(); + late final _filesec_freePtr = + _lookup>('filesec_free'); + late final _filesec_free = + _filesec_freePtr.asFunction(); - void dispatch_assert_queue_barrier( - dispatch_queue_t queue, + int filesec_get_property( + filesec_t arg0, + int arg1, + ffi.Pointer arg2, ) { - return _dispatch_assert_queue_barrier( - queue, + return _filesec_get_property( + arg0, + arg1, + arg2, ); } - late final _dispatch_assert_queue_barrierPtr = - _lookup>( - 'dispatch_assert_queue_barrier'); - late final _dispatch_assert_queue_barrier = _dispatch_assert_queue_barrierPtr - .asFunction(); + late final _filesec_get_propertyPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(filesec_t, ffi.Int32, + ffi.Pointer)>>('filesec_get_property'); + late final _filesec_get_property = _filesec_get_propertyPtr + .asFunction)>(); - void dispatch_assert_queue_not( - dispatch_queue_t queue, + int filesec_query_property( + filesec_t arg0, + int arg1, + ffi.Pointer arg2, ) { - return _dispatch_assert_queue_not( - queue, + return _filesec_query_property( + arg0, + arg1, + arg2, ); } - late final _dispatch_assert_queue_notPtr = - _lookup>( - 'dispatch_assert_queue_not'); - late final _dispatch_assert_queue_not = _dispatch_assert_queue_notPtr - .asFunction(); + late final _filesec_query_propertyPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(filesec_t, ffi.Int32, + ffi.Pointer)>>('filesec_query_property'); + late final _filesec_query_property = _filesec_query_propertyPtr + .asFunction)>(); - dispatch_block_t dispatch_block_create( - int flags, - dispatch_block_t block, + int filesec_set_property( + filesec_t arg0, + int arg1, + ffi.Pointer arg2, ) { - return _dispatch_block_create( - flags, - block, + return _filesec_set_property( + arg0, + arg1, + arg2, ); } - late final _dispatch_block_createPtr = _lookup< + late final _filesec_set_propertyPtr = _lookup< ffi.NativeFunction< - dispatch_block_t Function( - ffi.Int32, dispatch_block_t)>>('dispatch_block_create'); - late final _dispatch_block_create = _dispatch_block_createPtr - .asFunction(); + ffi.Int Function(filesec_t, ffi.Int32, + ffi.Pointer)>>('filesec_set_property'); + late final _filesec_set_property = _filesec_set_propertyPtr + .asFunction)>(); - dispatch_block_t dispatch_block_create_with_qos_class( - int flags, - int qos_class, - int relative_priority, - dispatch_block_t block, + int filesec_unset_property( + filesec_t arg0, + int arg1, ) { - return _dispatch_block_create_with_qos_class( - flags, - qos_class, - relative_priority, - block, + return _filesec_unset_property( + arg0, + arg1, ); } - late final _dispatch_block_create_with_qos_classPtr = _lookup< - ffi.NativeFunction< - dispatch_block_t Function(ffi.Int32, ffi.Int32, ffi.Int, - dispatch_block_t)>>('dispatch_block_create_with_qos_class'); - late final _dispatch_block_create_with_qos_class = - _dispatch_block_create_with_qos_classPtr.asFunction< - dispatch_block_t Function(int, int, int, dispatch_block_t)>(); + late final _filesec_unset_propertyPtr = + _lookup>( + 'filesec_unset_property'); + late final _filesec_unset_property = + _filesec_unset_propertyPtr.asFunction(); - void dispatch_block_perform( - int flags, - dispatch_block_t block, + late final _class_OS_os_workgroup1 = _getClass1("OS_os_workgroup"); + int os_workgroup_copy_port( + os_workgroup_t wg, + ffi.Pointer mach_port_out, ) { - return _dispatch_block_perform( - flags, - block, + return _os_workgroup_copy_port( + wg, + mach_port_out, ); } - late final _dispatch_block_performPtr = _lookup< - ffi.NativeFunction>( - 'dispatch_block_perform'); - late final _dispatch_block_perform = _dispatch_block_performPtr - .asFunction(); + late final _os_workgroup_copy_portPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_t, + ffi.Pointer)>>('os_workgroup_copy_port'); + late final _os_workgroup_copy_port = _os_workgroup_copy_portPtr + .asFunction)>(); - int dispatch_block_wait( - dispatch_block_t block, - int timeout, + os_workgroup_t os_workgroup_create_with_port( + ffi.Pointer name, + int mach_port, ) { - return _dispatch_block_wait( - block, - timeout, + return _os_workgroup_create_with_port( + name, + mach_port, ); } - late final _dispatch_block_waitPtr = _lookup< + late final _os_workgroup_create_with_portPtr = _lookup< ffi.NativeFunction< - ffi.IntPtr Function( - dispatch_block_t, dispatch_time_t)>>('dispatch_block_wait'); - late final _dispatch_block_wait = - _dispatch_block_waitPtr.asFunction(); + os_workgroup_t Function(ffi.Pointer, + mach_port_t)>>('os_workgroup_create_with_port'); + late final _os_workgroup_create_with_port = _os_workgroup_create_with_portPtr + .asFunction, int)>(); - void dispatch_block_notify( - dispatch_block_t block, - dispatch_queue_t queue, - dispatch_block_t notification_block, + os_workgroup_t os_workgroup_create_with_workgroup( + ffi.Pointer name, + os_workgroup_t wg, ) { - return _dispatch_block_notify( - block, - queue, - notification_block, + return _os_workgroup_create_with_workgroup( + name, + wg, ); } - late final _dispatch_block_notifyPtr = _lookup< + late final _os_workgroup_create_with_workgroupPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_block_t, dispatch_queue_t, - dispatch_block_t)>>('dispatch_block_notify'); - late final _dispatch_block_notify = _dispatch_block_notifyPtr.asFunction< - void Function(dispatch_block_t, dispatch_queue_t, dispatch_block_t)>(); + os_workgroup_t Function(ffi.Pointer, + os_workgroup_t)>>('os_workgroup_create_with_workgroup'); + late final _os_workgroup_create_with_workgroup = + _os_workgroup_create_with_workgroupPtr.asFunction< + os_workgroup_t Function(ffi.Pointer, os_workgroup_t)>(); - void dispatch_block_cancel( - dispatch_block_t block, + int os_workgroup_join( + os_workgroup_t wg, + os_workgroup_join_token_t token_out, ) { - return _dispatch_block_cancel( - block, + return _os_workgroup_join( + wg, + token_out, ); } - late final _dispatch_block_cancelPtr = - _lookup>( - 'dispatch_block_cancel'); - late final _dispatch_block_cancel = - _dispatch_block_cancelPtr.asFunction(); + late final _os_workgroup_joinPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + os_workgroup_t, os_workgroup_join_token_t)>>('os_workgroup_join'); + late final _os_workgroup_join = _os_workgroup_joinPtr + .asFunction(); - int dispatch_block_testcancel( - dispatch_block_t block, + void os_workgroup_leave( + os_workgroup_t wg, + os_workgroup_join_token_t token, ) { - return _dispatch_block_testcancel( - block, + return _os_workgroup_leave( + wg, + token, ); } - late final _dispatch_block_testcancelPtr = - _lookup>( - 'dispatch_block_testcancel'); - late final _dispatch_block_testcancel = _dispatch_block_testcancelPtr - .asFunction(); - - late final ffi.Pointer _KERNEL_SECURITY_TOKEN = - _lookup('KERNEL_SECURITY_TOKEN'); - - security_token_t get KERNEL_SECURITY_TOKEN => _KERNEL_SECURITY_TOKEN.ref; - - late final ffi.Pointer _KERNEL_AUDIT_TOKEN = - _lookup('KERNEL_AUDIT_TOKEN'); - - audit_token_t get KERNEL_AUDIT_TOKEN => _KERNEL_AUDIT_TOKEN.ref; + late final _os_workgroup_leavePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(os_workgroup_t, + os_workgroup_join_token_t)>>('os_workgroup_leave'); + late final _os_workgroup_leave = _os_workgroup_leavePtr + .asFunction(); - int mach_msg_overwrite( - ffi.Pointer msg, - int option, - int send_size, - int rcv_size, - int rcv_name, - int timeout, - int notify, - ffi.Pointer rcv_msg, - int rcv_limit, + int os_workgroup_set_working_arena( + os_workgroup_t wg, + ffi.Pointer arena, + int max_workers, + os_workgroup_working_arena_destructor_t destructor, ) { - return _mach_msg_overwrite( - msg, - option, - send_size, - rcv_size, - rcv_name, - timeout, - notify, - rcv_msg, - rcv_limit, + return _os_workgroup_set_working_arena( + wg, + arena, + max_workers, + destructor, ); } - late final _mach_msg_overwritePtr = _lookup< - ffi.NativeFunction< - mach_msg_return_t Function( - ffi.Pointer, - mach_msg_option_t, - mach_msg_size_t, - mach_msg_size_t, - mach_port_name_t, - mach_msg_timeout_t, - mach_port_name_t, - ffi.Pointer, - mach_msg_size_t)>>('mach_msg_overwrite'); - late final _mach_msg_overwrite = _mach_msg_overwritePtr.asFunction< - int Function(ffi.Pointer, int, int, int, int, int, int, - ffi.Pointer, int)>(); + late final _os_workgroup_set_working_arenaPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_t, ffi.Pointer, + ffi.Uint32, os_workgroup_working_arena_destructor_t)>>( + 'os_workgroup_set_working_arena'); + late final _os_workgroup_set_working_arena = + _os_workgroup_set_working_arenaPtr.asFunction< + int Function(os_workgroup_t, ffi.Pointer, int, + os_workgroup_working_arena_destructor_t)>(); - int mach_msg( - ffi.Pointer msg, - int option, - int send_size, - int rcv_size, - int rcv_name, - int timeout, - int notify, + ffi.Pointer os_workgroup_get_working_arena( + os_workgroup_t wg, + ffi.Pointer index_out, ) { - return _mach_msg( - msg, - option, - send_size, - rcv_size, - rcv_name, - timeout, - notify, + return _os_workgroup_get_working_arena( + wg, + index_out, ); } - late final _mach_msgPtr = _lookup< - ffi.NativeFunction< - mach_msg_return_t Function( - ffi.Pointer, - mach_msg_option_t, - mach_msg_size_t, - mach_msg_size_t, - mach_port_name_t, - mach_msg_timeout_t, - mach_port_name_t)>>('mach_msg'); - late final _mach_msg = _mach_msgPtr.asFunction< - int Function( - ffi.Pointer, int, int, int, int, int, int)>(); + late final _os_workgroup_get_working_arenaPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + os_workgroup_t, ffi.Pointer)>>( + 'os_workgroup_get_working_arena'); + late final _os_workgroup_get_working_arena = + _os_workgroup_get_working_arenaPtr.asFunction< + ffi.Pointer Function( + os_workgroup_t, ffi.Pointer)>(); - int mach_voucher_deallocate( - int voucher, + void os_workgroup_cancel( + os_workgroup_t wg, ) { - return _mach_voucher_deallocate( - voucher, + return _os_workgroup_cancel( + wg, ); } - late final _mach_voucher_deallocatePtr = - _lookup>( - 'mach_voucher_deallocate'); - late final _mach_voucher_deallocate = - _mach_voucher_deallocatePtr.asFunction(); - - late final ffi.Pointer - __dispatch_source_type_data_add = - _lookup('_dispatch_source_type_data_add'); - - ffi.Pointer get _dispatch_source_type_data_add => - __dispatch_source_type_data_add; - - late final ffi.Pointer - __dispatch_source_type_data_or = - _lookup('_dispatch_source_type_data_or'); - - ffi.Pointer get _dispatch_source_type_data_or => - __dispatch_source_type_data_or; - - late final ffi.Pointer - __dispatch_source_type_data_replace = - _lookup('_dispatch_source_type_data_replace'); - - ffi.Pointer get _dispatch_source_type_data_replace => - __dispatch_source_type_data_replace; - - late final ffi.Pointer - __dispatch_source_type_mach_send = - _lookup('_dispatch_source_type_mach_send'); - - ffi.Pointer get _dispatch_source_type_mach_send => - __dispatch_source_type_mach_send; - - late final ffi.Pointer - __dispatch_source_type_mach_recv = - _lookup('_dispatch_source_type_mach_recv'); - - ffi.Pointer get _dispatch_source_type_mach_recv => - __dispatch_source_type_mach_recv; - - late final ffi.Pointer - __dispatch_source_type_memorypressure = - _lookup('_dispatch_source_type_memorypressure'); - - ffi.Pointer - get _dispatch_source_type_memorypressure => - __dispatch_source_type_memorypressure; - - late final ffi.Pointer __dispatch_source_type_proc = - _lookup('_dispatch_source_type_proc'); - - ffi.Pointer get _dispatch_source_type_proc => - __dispatch_source_type_proc; - - late final ffi.Pointer __dispatch_source_type_read = - _lookup('_dispatch_source_type_read'); - - ffi.Pointer get _dispatch_source_type_read => - __dispatch_source_type_read; - - late final ffi.Pointer __dispatch_source_type_signal = - _lookup('_dispatch_source_type_signal'); - - ffi.Pointer get _dispatch_source_type_signal => - __dispatch_source_type_signal; - - late final ffi.Pointer __dispatch_source_type_timer = - _lookup('_dispatch_source_type_timer'); - - ffi.Pointer get _dispatch_source_type_timer => - __dispatch_source_type_timer; - - late final ffi.Pointer __dispatch_source_type_vnode = - _lookup('_dispatch_source_type_vnode'); - - ffi.Pointer get _dispatch_source_type_vnode => - __dispatch_source_type_vnode; + late final _os_workgroup_cancelPtr = + _lookup>( + 'os_workgroup_cancel'); + late final _os_workgroup_cancel = + _os_workgroup_cancelPtr.asFunction(); - late final ffi.Pointer __dispatch_source_type_write = - _lookup('_dispatch_source_type_write'); + bool os_workgroup_testcancel( + os_workgroup_t wg, + ) { + return _os_workgroup_testcancel( + wg, + ); + } - ffi.Pointer get _dispatch_source_type_write => - __dispatch_source_type_write; + late final _os_workgroup_testcancelPtr = + _lookup>( + 'os_workgroup_testcancel'); + late final _os_workgroup_testcancel = + _os_workgroup_testcancelPtr.asFunction(); - dispatch_source_t dispatch_source_create( - dispatch_source_type_t type, - int handle, - int mask, - dispatch_queue_t queue, + int os_workgroup_max_parallel_threads( + os_workgroup_t wg, + os_workgroup_mpt_attr_t attr, ) { - return _dispatch_source_create( - type, - handle, - mask, - queue, + return _os_workgroup_max_parallel_threads( + wg, + attr, ); } - late final _dispatch_source_createPtr = _lookup< + late final _os_workgroup_max_parallel_threadsPtr = _lookup< ffi.NativeFunction< - dispatch_source_t Function(dispatch_source_type_t, uintptr_t, - uintptr_t, dispatch_queue_t)>>('dispatch_source_create'); - late final _dispatch_source_create = _dispatch_source_createPtr.asFunction< - dispatch_source_t Function( - dispatch_source_type_t, int, int, dispatch_queue_t)>(); + ffi.Int Function(os_workgroup_t, + os_workgroup_mpt_attr_t)>>('os_workgroup_max_parallel_threads'); + late final _os_workgroup_max_parallel_threads = + _os_workgroup_max_parallel_threadsPtr + .asFunction(); - void dispatch_source_set_event_handler( - dispatch_source_t source, - dispatch_block_t handler, + late final _class_OS_os_workgroup_interval1 = + _getClass1("OS_os_workgroup_interval"); + int os_workgroup_interval_start( + os_workgroup_interval_t wg, + int start, + int deadline, + os_workgroup_interval_data_t data, ) { - return _dispatch_source_set_event_handler( - source, - handler, + return _os_workgroup_interval_start( + wg, + start, + deadline, + data, ); } - late final _dispatch_source_set_event_handlerPtr = _lookup< + late final _os_workgroup_interval_startPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_block_t)>>('dispatch_source_set_event_handler'); - late final _dispatch_source_set_event_handler = - _dispatch_source_set_event_handlerPtr - .asFunction(); + ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, ffi.Uint64, + os_workgroup_interval_data_t)>>('os_workgroup_interval_start'); + late final _os_workgroup_interval_start = + _os_workgroup_interval_startPtr.asFunction< + int Function(os_workgroup_interval_t, int, int, + os_workgroup_interval_data_t)>(); - void dispatch_source_set_event_handler_f( - dispatch_source_t source, - dispatch_function_t handler, + int os_workgroup_interval_update( + os_workgroup_interval_t wg, + int deadline, + os_workgroup_interval_data_t data, ) { - return _dispatch_source_set_event_handler_f( - source, - handler, + return _os_workgroup_interval_update( + wg, + deadline, + data, ); } - late final _dispatch_source_set_event_handler_fPtr = _lookup< + late final _os_workgroup_interval_updatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_function_t)>>('dispatch_source_set_event_handler_f'); - late final _dispatch_source_set_event_handler_f = - _dispatch_source_set_event_handler_fPtr - .asFunction(); + ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, + os_workgroup_interval_data_t)>>('os_workgroup_interval_update'); + late final _os_workgroup_interval_update = + _os_workgroup_interval_updatePtr.asFunction< + int Function( + os_workgroup_interval_t, int, os_workgroup_interval_data_t)>(); - void dispatch_source_set_cancel_handler( - dispatch_source_t source, - dispatch_block_t handler, + int os_workgroup_interval_finish( + os_workgroup_interval_t wg, + os_workgroup_interval_data_t data, ) { - return _dispatch_source_set_cancel_handler( - source, - handler, + return _os_workgroup_interval_finish( + wg, + data, ); } - late final _dispatch_source_set_cancel_handlerPtr = _lookup< + late final _os_workgroup_interval_finishPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_block_t)>>('dispatch_source_set_cancel_handler'); - late final _dispatch_source_set_cancel_handler = - _dispatch_source_set_cancel_handlerPtr - .asFunction(); + ffi.Int Function(os_workgroup_interval_t, + os_workgroup_interval_data_t)>>('os_workgroup_interval_finish'); + late final _os_workgroup_interval_finish = + _os_workgroup_interval_finishPtr.asFunction< + int Function( + os_workgroup_interval_t, os_workgroup_interval_data_t)>(); - void dispatch_source_set_cancel_handler_f( - dispatch_source_t source, - dispatch_function_t handler, + late final _class_OS_os_workgroup_parallel1 = + _getClass1("OS_os_workgroup_parallel"); + os_workgroup_parallel_t os_workgroup_parallel_create( + ffi.Pointer name, + os_workgroup_attr_t attr, ) { - return _dispatch_source_set_cancel_handler_f( - source, - handler, + return _os_workgroup_parallel_create( + name, + attr, ); } - late final _dispatch_source_set_cancel_handler_fPtr = _lookup< + late final _os_workgroup_parallel_createPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_function_t)>>('dispatch_source_set_cancel_handler_f'); - late final _dispatch_source_set_cancel_handler_f = - _dispatch_source_set_cancel_handler_fPtr - .asFunction(); + os_workgroup_parallel_t Function(ffi.Pointer, + os_workgroup_attr_t)>>('os_workgroup_parallel_create'); + late final _os_workgroup_parallel_create = + _os_workgroup_parallel_createPtr.asFunction< + os_workgroup_parallel_t Function( + ffi.Pointer, os_workgroup_attr_t)>(); - void dispatch_source_cancel( - dispatch_source_t source, + int dispatch_time( + int when, + int delta, ) { - return _dispatch_source_cancel( - source, + return _dispatch_time( + when, + delta, ); } - late final _dispatch_source_cancelPtr = - _lookup>( - 'dispatch_source_cancel'); - late final _dispatch_source_cancel = - _dispatch_source_cancelPtr.asFunction(); + late final _dispatch_timePtr = _lookup< + ffi.NativeFunction< + dispatch_time_t Function( + dispatch_time_t, ffi.Int64)>>('dispatch_time'); + late final _dispatch_time = + _dispatch_timePtr.asFunction(); - int dispatch_source_testcancel( - dispatch_source_t source, + int dispatch_walltime( + ffi.Pointer when, + int delta, ) { - return _dispatch_source_testcancel( - source, + return _dispatch_walltime( + when, + delta, ); } - late final _dispatch_source_testcancelPtr = - _lookup>( - 'dispatch_source_testcancel'); - late final _dispatch_source_testcancel = _dispatch_source_testcancelPtr - .asFunction(); + late final _dispatch_walltimePtr = _lookup< + ffi.NativeFunction< + dispatch_time_t Function( + ffi.Pointer, ffi.Int64)>>('dispatch_walltime'); + late final _dispatch_walltime = _dispatch_walltimePtr + .asFunction, int)>(); - int dispatch_source_get_handle( - dispatch_source_t source, - ) { - return _dispatch_source_get_handle( - source, - ); + int qos_class_self() { + return _qos_class_self(); } - late final _dispatch_source_get_handlePtr = - _lookup>( - 'dispatch_source_get_handle'); - late final _dispatch_source_get_handle = _dispatch_source_get_handlePtr - .asFunction(); + late final _qos_class_selfPtr = + _lookup>('qos_class_self'); + late final _qos_class_self = _qos_class_selfPtr.asFunction(); - int dispatch_source_get_mask( - dispatch_source_t source, + int qos_class_main() { + return _qos_class_main(); + } + + late final _qos_class_mainPtr = + _lookup>('qos_class_main'); + late final _qos_class_main = _qos_class_mainPtr.asFunction(); + + void dispatch_retain( + dispatch_object_t object, ) { - return _dispatch_source_get_mask( - source, + return _dispatch_retain( + object, ); } - late final _dispatch_source_get_maskPtr = - _lookup>( - 'dispatch_source_get_mask'); - late final _dispatch_source_get_mask = _dispatch_source_get_maskPtr - .asFunction(); + late final _dispatch_retainPtr = + _lookup>( + 'dispatch_retain'); + late final _dispatch_retain = + _dispatch_retainPtr.asFunction(); - int dispatch_source_get_data( - dispatch_source_t source, + void dispatch_release( + dispatch_object_t object, ) { - return _dispatch_source_get_data( - source, + return _dispatch_release( + object, ); } - late final _dispatch_source_get_dataPtr = - _lookup>( - 'dispatch_source_get_data'); - late final _dispatch_source_get_data = _dispatch_source_get_dataPtr - .asFunction(); + late final _dispatch_releasePtr = + _lookup>( + 'dispatch_release'); + late final _dispatch_release = + _dispatch_releasePtr.asFunction(); - void dispatch_source_merge_data( - dispatch_source_t source, - int value, + ffi.Pointer dispatch_get_context( + dispatch_object_t object, ) { - return _dispatch_source_merge_data( - source, - value, + return _dispatch_get_context( + object, ); } - late final _dispatch_source_merge_dataPtr = _lookup< - ffi.NativeFunction>( - 'dispatch_source_merge_data'); - late final _dispatch_source_merge_data = _dispatch_source_merge_dataPtr - .asFunction(); + late final _dispatch_get_contextPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + dispatch_object_t)>>('dispatch_get_context'); + late final _dispatch_get_context = _dispatch_get_contextPtr + .asFunction Function(dispatch_object_t)>(); - void dispatch_source_set_timer( - dispatch_source_t source, - int start, - int interval, - int leeway, + void dispatch_set_context( + dispatch_object_t object, + ffi.Pointer context, ) { - return _dispatch_source_set_timer( - source, - start, - interval, - leeway, + return _dispatch_set_context( + object, + context, ); } - late final _dispatch_source_set_timerPtr = _lookup< + late final _dispatch_set_contextPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, dispatch_time_t, ffi.Uint64, - ffi.Uint64)>>('dispatch_source_set_timer'); - late final _dispatch_source_set_timer = _dispatch_source_set_timerPtr - .asFunction(); + ffi.Void Function(dispatch_object_t, + ffi.Pointer)>>('dispatch_set_context'); + late final _dispatch_set_context = _dispatch_set_contextPtr + .asFunction)>(); - void dispatch_source_set_registration_handler( - dispatch_source_t source, - dispatch_block_t handler, + void dispatch_set_finalizer_f( + dispatch_object_t object, + dispatch_function_t finalizer, ) { - return _dispatch_source_set_registration_handler( - source, - handler, + return _dispatch_set_finalizer_f( + object, + finalizer, ); } - late final _dispatch_source_set_registration_handlerPtr = _lookup< + late final _dispatch_set_finalizer_fPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_block_t)>>('dispatch_source_set_registration_handler'); - late final _dispatch_source_set_registration_handler = - _dispatch_source_set_registration_handlerPtr - .asFunction(); + ffi.Void Function(dispatch_object_t, + dispatch_function_t)>>('dispatch_set_finalizer_f'); + late final _dispatch_set_finalizer_f = _dispatch_set_finalizer_fPtr + .asFunction(); - void dispatch_source_set_registration_handler_f( - dispatch_source_t source, - dispatch_function_t handler, + void dispatch_activate( + dispatch_object_t object, ) { - return _dispatch_source_set_registration_handler_f( - source, - handler, + return _dispatch_activate( + object, ); } - late final _dispatch_source_set_registration_handler_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, dispatch_function_t)>>( - 'dispatch_source_set_registration_handler_f'); - late final _dispatch_source_set_registration_handler_f = - _dispatch_source_set_registration_handler_fPtr - .asFunction(); + late final _dispatch_activatePtr = + _lookup>( + 'dispatch_activate'); + late final _dispatch_activate = + _dispatch_activatePtr.asFunction(); - dispatch_group_t dispatch_group_create() { - return _dispatch_group_create(); + void dispatch_suspend( + dispatch_object_t object, + ) { + return _dispatch_suspend( + object, + ); } - late final _dispatch_group_createPtr = - _lookup>( - 'dispatch_group_create'); - late final _dispatch_group_create = - _dispatch_group_createPtr.asFunction(); + late final _dispatch_suspendPtr = + _lookup>( + 'dispatch_suspend'); + late final _dispatch_suspend = + _dispatch_suspendPtr.asFunction(); - void dispatch_group_async( - dispatch_group_t group, - dispatch_queue_t queue, - dispatch_block_t block, + void dispatch_resume( + dispatch_object_t object, ) { - return _dispatch_group_async( - group, - queue, - block, + return _dispatch_resume( + object, ); } - late final _dispatch_group_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_group_t, dispatch_queue_t, - dispatch_block_t)>>('dispatch_group_async'); - late final _dispatch_group_async = _dispatch_group_asyncPtr.asFunction< - void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); + late final _dispatch_resumePtr = + _lookup>( + 'dispatch_resume'); + late final _dispatch_resume = + _dispatch_resumePtr.asFunction(); - void dispatch_group_async_f( - dispatch_group_t group, - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + void dispatch_set_qos_class_floor( + dispatch_object_t object, + int qos_class, + int relative_priority, ) { - return _dispatch_group_async_f( - group, - queue, - context, - work, + return _dispatch_set_qos_class_floor( + object, + qos_class, + relative_priority, ); } - late final _dispatch_group_async_fPtr = _lookup< + late final _dispatch_set_qos_class_floorPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_group_t, - dispatch_queue_t, - ffi.Pointer, - dispatch_function_t)>>('dispatch_group_async_f'); - late final _dispatch_group_async_f = _dispatch_group_async_fPtr.asFunction< - void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>(); + ffi.Void Function(dispatch_object_t, ffi.Int32, + ffi.Int)>>('dispatch_set_qos_class_floor'); + late final _dispatch_set_qos_class_floor = _dispatch_set_qos_class_floorPtr + .asFunction(); - int dispatch_group_wait( - dispatch_group_t group, + int dispatch_wait( + ffi.Pointer object, int timeout, ) { - return _dispatch_group_wait( - group, + return _dispatch_wait( + object, timeout, ); } - late final _dispatch_group_waitPtr = _lookup< + late final _dispatch_waitPtr = _lookup< ffi.NativeFunction< ffi.IntPtr Function( - dispatch_group_t, dispatch_time_t)>>('dispatch_group_wait'); - late final _dispatch_group_wait = - _dispatch_group_waitPtr.asFunction(); + ffi.Pointer, dispatch_time_t)>>('dispatch_wait'); + late final _dispatch_wait = + _dispatch_waitPtr.asFunction, int)>(); - void dispatch_group_notify( - dispatch_group_t group, - dispatch_queue_t queue, - dispatch_block_t block, + void dispatch_notify( + ffi.Pointer object, + dispatch_object_t queue, + dispatch_block_t notification_block, ) { - return _dispatch_group_notify( - group, + return _dispatch_notify( + object, queue, - block, + notification_block, ); } - late final _dispatch_group_notifyPtr = _lookup< + late final _dispatch_notifyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_group_t, dispatch_queue_t, - dispatch_block_t)>>('dispatch_group_notify'); - late final _dispatch_group_notify = _dispatch_group_notifyPtr.asFunction< - void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); + ffi.Void Function(ffi.Pointer, dispatch_object_t, + dispatch_block_t)>>('dispatch_notify'); + late final _dispatch_notify = _dispatch_notifyPtr.asFunction< + void Function( + ffi.Pointer, dispatch_object_t, dispatch_block_t)>(); - void dispatch_group_notify_f( - dispatch_group_t group, - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + void dispatch_cancel( + ffi.Pointer object, ) { - return _dispatch_group_notify_f( - group, - queue, - context, - work, + return _dispatch_cancel( + object, ); } - late final _dispatch_group_notify_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_group_t, - dispatch_queue_t, - ffi.Pointer, - dispatch_function_t)>>('dispatch_group_notify_f'); - late final _dispatch_group_notify_f = _dispatch_group_notify_fPtr.asFunction< - void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>(); + late final _dispatch_cancelPtr = + _lookup)>>( + 'dispatch_cancel'); + late final _dispatch_cancel = + _dispatch_cancelPtr.asFunction)>(); - void dispatch_group_enter( - dispatch_group_t group, + int dispatch_testcancel( + ffi.Pointer object, ) { - return _dispatch_group_enter( - group, + return _dispatch_testcancel( + object, ); } - late final _dispatch_group_enterPtr = - _lookup>( - 'dispatch_group_enter'); - late final _dispatch_group_enter = - _dispatch_group_enterPtr.asFunction(); + late final _dispatch_testcancelPtr = + _lookup)>>( + 'dispatch_testcancel'); + late final _dispatch_testcancel = + _dispatch_testcancelPtr.asFunction)>(); - void dispatch_group_leave( - dispatch_group_t group, + void dispatch_debug( + dispatch_object_t object, + ffi.Pointer message, ) { - return _dispatch_group_leave( - group, + return _dispatch_debug( + object, + message, ); } - late final _dispatch_group_leavePtr = - _lookup>( - 'dispatch_group_leave'); - late final _dispatch_group_leave = - _dispatch_group_leavePtr.asFunction(); + late final _dispatch_debugPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_object_t, ffi.Pointer)>>('dispatch_debug'); + late final _dispatch_debug = _dispatch_debugPtr + .asFunction)>(); - dispatch_semaphore_t dispatch_semaphore_create( - int value, + void dispatch_debugv( + dispatch_object_t object, + ffi.Pointer message, + va_list ap, ) { - return _dispatch_semaphore_create( - value, + return _dispatch_debugv( + object, + message, + ap, ); } - late final _dispatch_semaphore_createPtr = - _lookup>( - 'dispatch_semaphore_create'); - late final _dispatch_semaphore_create = _dispatch_semaphore_createPtr - .asFunction(); + late final _dispatch_debugvPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, ffi.Pointer, + va_list)>>('dispatch_debugv'); + late final _dispatch_debugv = _dispatch_debugvPtr.asFunction< + void Function(dispatch_object_t, ffi.Pointer, va_list)>(); - int dispatch_semaphore_wait( - dispatch_semaphore_t dsema, - int timeout, + void dispatch_async( + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _dispatch_semaphore_wait( - dsema, - timeout, + return _dispatch_async( + queue, + block, ); } - late final _dispatch_semaphore_waitPtr = _lookup< + late final _dispatch_asyncPtr = _lookup< ffi.NativeFunction< - ffi.IntPtr Function(dispatch_semaphore_t, - dispatch_time_t)>>('dispatch_semaphore_wait'); - late final _dispatch_semaphore_wait = _dispatch_semaphore_waitPtr - .asFunction(); + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_async'); + late final _dispatch_async = _dispatch_asyncPtr + .asFunction(); - int dispatch_semaphore_signal( - dispatch_semaphore_t dsema, + void dispatch_async_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_semaphore_signal( - dsema, + return _dispatch_async_f( + queue, + context, + work, ); } - late final _dispatch_semaphore_signalPtr = - _lookup>( - 'dispatch_semaphore_signal'); - late final _dispatch_semaphore_signal = _dispatch_semaphore_signalPtr - .asFunction(); + late final _dispatch_async_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_async_f'); + late final _dispatch_async_f = _dispatch_async_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - void dispatch_once( - ffi.Pointer predicate, + void dispatch_sync( + dispatch_queue_t queue, dispatch_block_t block, ) { - return _dispatch_once( - predicate, + return _dispatch_sync( + queue, block, ); } - late final _dispatch_oncePtr = _lookup< + late final _dispatch_syncPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - dispatch_block_t)>>('dispatch_once'); - late final _dispatch_once = _dispatch_oncePtr.asFunction< - void Function(ffi.Pointer, dispatch_block_t)>(); + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_sync'); + late final _dispatch_sync = _dispatch_syncPtr + .asFunction(); - void dispatch_once_f( - ffi.Pointer predicate, + void dispatch_sync_f( + dispatch_queue_t queue, ffi.Pointer context, - dispatch_function_t function, + dispatch_function_t work, ) { - return _dispatch_once_f( - predicate, + return _dispatch_sync_f( + queue, context, - function, + work, ); } - late final _dispatch_once_fPtr = _lookup< + late final _dispatch_sync_fPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - dispatch_function_t)>>('dispatch_once_f'); - late final _dispatch_once_f = _dispatch_once_fPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - dispatch_function_t)>(); - - late final ffi.Pointer __dispatch_data_empty = - _lookup('_dispatch_data_empty'); - - ffi.Pointer get _dispatch_data_empty => - __dispatch_data_empty; - - late final ffi.Pointer __dispatch_data_destructor_free = - _lookup('_dispatch_data_destructor_free'); - - dispatch_block_t get _dispatch_data_destructor_free => - __dispatch_data_destructor_free.value; - - set _dispatch_data_destructor_free(dispatch_block_t value) => - __dispatch_data_destructor_free.value = value; - - late final ffi.Pointer __dispatch_data_destructor_munmap = - _lookup('_dispatch_data_destructor_munmap'); - - dispatch_block_t get _dispatch_data_destructor_munmap => - __dispatch_data_destructor_munmap.value; - - set _dispatch_data_destructor_munmap(dispatch_block_t value) => - __dispatch_data_destructor_munmap.value = value; + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_sync_f'); + late final _dispatch_sync_f = _dispatch_sync_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - dispatch_data_t dispatch_data_create( - ffi.Pointer buffer, - int size, + void dispatch_async_and_wait( dispatch_queue_t queue, - dispatch_block_t destructor, + dispatch_block_t block, ) { - return _dispatch_data_create( - buffer, - size, + return _dispatch_async_and_wait( queue, - destructor, + block, ); } - late final _dispatch_data_createPtr = _lookup< + late final _dispatch_async_and_waitPtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function(ffi.Pointer, ffi.Size, - dispatch_queue_t, dispatch_block_t)>>('dispatch_data_create'); - late final _dispatch_data_create = _dispatch_data_createPtr.asFunction< - dispatch_data_t Function( - ffi.Pointer, int, dispatch_queue_t, dispatch_block_t)>(); - - int dispatch_data_get_size( - dispatch_data_t data, - ) { - return _dispatch_data_get_size( - data, - ); - } - - late final _dispatch_data_get_sizePtr = - _lookup>( - 'dispatch_data_get_size'); - late final _dispatch_data_get_size = - _dispatch_data_get_sizePtr.asFunction(); + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_async_and_wait'); + late final _dispatch_async_and_wait = _dispatch_async_and_waitPtr + .asFunction(); - dispatch_data_t dispatch_data_create_map( - dispatch_data_t data, - ffi.Pointer> buffer_ptr, - ffi.Pointer size_ptr, + void dispatch_async_and_wait_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_data_create_map( - data, - buffer_ptr, - size_ptr, + return _dispatch_async_and_wait_f( + queue, + context, + work, ); } - late final _dispatch_data_create_mapPtr = _lookup< + late final _dispatch_async_and_wait_fPtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function( - dispatch_data_t, - ffi.Pointer>, - ffi.Pointer)>>('dispatch_data_create_map'); - late final _dispatch_data_create_map = - _dispatch_data_create_mapPtr.asFunction< - dispatch_data_t Function(dispatch_data_t, - ffi.Pointer>, ffi.Pointer)>(); + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_async_and_wait_f'); + late final _dispatch_async_and_wait_f = + _dispatch_async_and_wait_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - dispatch_data_t dispatch_data_create_concat( - dispatch_data_t data1, - dispatch_data_t data2, + void dispatch_apply( + int iterations, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> block, ) { - return _dispatch_data_create_concat( - data1, - data2, + return _dispatch_apply( + iterations, + queue, + block, ); } - late final _dispatch_data_create_concatPtr = _lookup< + late final _dispatch_applyPtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function(dispatch_data_t, - dispatch_data_t)>>('dispatch_data_create_concat'); - late final _dispatch_data_create_concat = _dispatch_data_create_concatPtr - .asFunction(); + ffi.Void Function(ffi.Size, dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_apply'); + late final _dispatch_apply = _dispatch_applyPtr.asFunction< + void Function(int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); - dispatch_data_t dispatch_data_create_subrange( - dispatch_data_t data, - int offset, - int length, + void dispatch_apply_f( + int iterations, + dispatch_queue_t queue, + ffi.Pointer context, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer context, ffi.Size iteration)>> + work, ) { - return _dispatch_data_create_subrange( - data, - offset, - length, + return _dispatch_apply_f( + iterations, + queue, + context, + work, ); } - late final _dispatch_data_create_subrangePtr = _lookup< + late final _dispatch_apply_fPtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function(dispatch_data_t, ffi.Size, - ffi.Size)>>('dispatch_data_create_subrange'); - late final _dispatch_data_create_subrange = _dispatch_data_create_subrangePtr - .asFunction(); + ffi.Void Function( + ffi.Size, + dispatch_queue_t, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer context, + ffi.Size iteration)>>)>>('dispatch_apply_f'); + late final _dispatch_apply_f = _dispatch_apply_fPtr.asFunction< + void Function( + int, + dispatch_queue_t, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer context, ffi.Size iteration)>>)>(); - bool dispatch_data_apply( - dispatch_data_t data, - dispatch_data_applier_t applier, + dispatch_queue_t dispatch_get_current_queue() { + return _dispatch_get_current_queue(); + } + + late final _dispatch_get_current_queuePtr = + _lookup>( + 'dispatch_get_current_queue'); + late final _dispatch_get_current_queue = + _dispatch_get_current_queuePtr.asFunction(); + + late final ffi.Pointer __dispatch_main_q = + _lookup('_dispatch_main_q'); + + ffi.Pointer get _dispatch_main_q => __dispatch_main_q; + + dispatch_queue_global_t dispatch_get_global_queue( + int identifier, + int flags, ) { - return _dispatch_data_apply( - data, - applier, + return _dispatch_get_global_queue( + identifier, + flags, ); } - late final _dispatch_data_applyPtr = _lookup< + late final _dispatch_get_global_queuePtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(dispatch_data_t, - dispatch_data_applier_t)>>('dispatch_data_apply'); - late final _dispatch_data_apply = _dispatch_data_applyPtr - .asFunction(); + dispatch_queue_global_t Function( + ffi.IntPtr, ffi.UintPtr)>>('dispatch_get_global_queue'); + late final _dispatch_get_global_queue = _dispatch_get_global_queuePtr + .asFunction(); - dispatch_data_t dispatch_data_copy_region( - dispatch_data_t data, - int location, - ffi.Pointer offset_ptr, + late final ffi.Pointer + __dispatch_queue_attr_concurrent = + _lookup('_dispatch_queue_attr_concurrent'); + + ffi.Pointer get _dispatch_queue_attr_concurrent => + __dispatch_queue_attr_concurrent; + + dispatch_queue_attr_t dispatch_queue_attr_make_initially_inactive( + dispatch_queue_attr_t attr, ) { - return _dispatch_data_copy_region( - data, - location, - offset_ptr, + return _dispatch_queue_attr_make_initially_inactive( + attr, ); } - late final _dispatch_data_copy_regionPtr = _lookup< - ffi.NativeFunction< - dispatch_data_t Function(dispatch_data_t, ffi.Size, - ffi.Pointer)>>('dispatch_data_copy_region'); - late final _dispatch_data_copy_region = - _dispatch_data_copy_regionPtr.asFunction< - dispatch_data_t Function( - dispatch_data_t, int, ffi.Pointer)>(); + late final _dispatch_queue_attr_make_initially_inactivePtr = _lookup< + ffi.NativeFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t)>>( + 'dispatch_queue_attr_make_initially_inactive'); + late final _dispatch_queue_attr_make_initially_inactive = + _dispatch_queue_attr_make_initially_inactivePtr + .asFunction(); - void dispatch_read( - int fd, - int length, - dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> handler, + dispatch_queue_attr_t dispatch_queue_attr_make_with_autorelease_frequency( + dispatch_queue_attr_t attr, + int frequency, ) { - return _dispatch_read( - fd, - length, - queue, - handler, + return _dispatch_queue_attr_make_with_autorelease_frequency( + attr, + frequency, ); } - late final _dispatch_readPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_fd_t, ffi.Size, dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_read'); - late final _dispatch_read = _dispatch_readPtr.asFunction< - void Function(int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + late final _dispatch_queue_attr_make_with_autorelease_frequencyPtr = _lookup< + ffi.NativeFunction< + dispatch_queue_attr_t Function( + dispatch_queue_attr_t, ffi.Int32)>>( + 'dispatch_queue_attr_make_with_autorelease_frequency'); + late final _dispatch_queue_attr_make_with_autorelease_frequency = + _dispatch_queue_attr_make_with_autorelease_frequencyPtr.asFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t, int)>(); - void dispatch_write( - int fd, - dispatch_data_t data, - dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> handler, + dispatch_queue_attr_t dispatch_queue_attr_make_with_qos_class( + dispatch_queue_attr_t attr, + int qos_class, + int relative_priority, ) { - return _dispatch_write( - fd, - data, - queue, - handler, + return _dispatch_queue_attr_make_with_qos_class( + attr, + qos_class, + relative_priority, ); } - late final _dispatch_writePtr = _lookup< + late final _dispatch_queue_attr_make_with_qos_classPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_fd_t, dispatch_data_t, dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_write'); - late final _dispatch_write = _dispatch_writePtr.asFunction< - void Function( - int, dispatch_data_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + dispatch_queue_attr_t Function(dispatch_queue_attr_t, ffi.Int32, + ffi.Int)>>('dispatch_queue_attr_make_with_qos_class'); + late final _dispatch_queue_attr_make_with_qos_class = + _dispatch_queue_attr_make_with_qos_classPtr.asFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t, int, int)>(); - dispatch_io_t dispatch_io_create( - int type, - int fd, - dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> cleanup_handler, + dispatch_queue_t dispatch_queue_create_with_target( + ffi.Pointer label, + dispatch_queue_attr_t attr, + dispatch_queue_t target, ) { - return _dispatch_io_create( - type, - fd, - queue, - cleanup_handler, + return _dispatch_queue_create_with_target( + label, + attr, + target, ); } - late final _dispatch_io_createPtr = _lookup< + late final _dispatch_queue_create_with_targetPtr = _lookup< ffi.NativeFunction< - dispatch_io_t Function( - dispatch_io_type_t, - dispatch_fd_t, - dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create'); - late final _dispatch_io_create = _dispatch_io_createPtr.asFunction< - dispatch_io_t Function( - int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + dispatch_queue_t Function( + ffi.Pointer, + dispatch_queue_attr_t, + dispatch_queue_t)>>('dispatch_queue_create_with_target'); + late final _dispatch_queue_create_with_target = + _dispatch_queue_create_with_targetPtr.asFunction< + dispatch_queue_t Function(ffi.Pointer, + dispatch_queue_attr_t, dispatch_queue_t)>(); - dispatch_io_t dispatch_io_create_with_path( - int type, - ffi.Pointer path, - int oflag, - int mode, - dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> cleanup_handler, + dispatch_queue_t dispatch_queue_create( + ffi.Pointer label, + dispatch_queue_attr_t attr, ) { - return _dispatch_io_create_with_path( - type, - path, - oflag, - mode, - queue, - cleanup_handler, + return _dispatch_queue_create( + label, + attr, ); } - late final _dispatch_io_create_with_pathPtr = _lookup< + late final _dispatch_queue_createPtr = _lookup< ffi.NativeFunction< - dispatch_io_t Function( - dispatch_io_type_t, - ffi.Pointer, - ffi.Int, - mode_t, - dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create_with_path'); - late final _dispatch_io_create_with_path = - _dispatch_io_create_with_pathPtr.asFunction< - dispatch_io_t Function(int, ffi.Pointer, int, int, - dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + dispatch_queue_t Function(ffi.Pointer, + dispatch_queue_attr_t)>>('dispatch_queue_create'); + late final _dispatch_queue_create = _dispatch_queue_createPtr.asFunction< + dispatch_queue_t Function( + ffi.Pointer, dispatch_queue_attr_t)>(); - dispatch_io_t dispatch_io_create_with_io( - int type, - dispatch_io_t io, + ffi.Pointer dispatch_queue_get_label( dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> cleanup_handler, ) { - return _dispatch_io_create_with_io( - type, - io, + return _dispatch_queue_get_label( queue, - cleanup_handler, ); } - late final _dispatch_io_create_with_ioPtr = _lookup< - ffi.NativeFunction< - dispatch_io_t Function( - dispatch_io_type_t, - dispatch_io_t, - dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create_with_io'); - late final _dispatch_io_create_with_io = - _dispatch_io_create_with_ioPtr.asFunction< - dispatch_io_t Function( - int, dispatch_io_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + late final _dispatch_queue_get_labelPtr = _lookup< + ffi.NativeFunction Function(dispatch_queue_t)>>( + 'dispatch_queue_get_label'); + late final _dispatch_queue_get_label = _dispatch_queue_get_labelPtr + .asFunction Function(dispatch_queue_t)>(); - void dispatch_io_read( - dispatch_io_t channel, - int offset, - int length, + int dispatch_queue_get_qos_class( dispatch_queue_t queue, - dispatch_io_handler_t io_handler, + ffi.Pointer relative_priority_ptr, ) { - return _dispatch_io_read( - channel, - offset, - length, + return _dispatch_queue_get_qos_class( queue, - io_handler, + relative_priority_ptr, ); } - late final _dispatch_io_readPtr = _lookup< + late final _dispatch_queue_get_qos_classPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_io_t, off_t, ffi.Size, dispatch_queue_t, - dispatch_io_handler_t)>>('dispatch_io_read'); - late final _dispatch_io_read = _dispatch_io_readPtr.asFunction< - void Function( - dispatch_io_t, int, int, dispatch_queue_t, dispatch_io_handler_t)>(); + ffi.Int32 Function(dispatch_queue_t, + ffi.Pointer)>>('dispatch_queue_get_qos_class'); + late final _dispatch_queue_get_qos_class = _dispatch_queue_get_qos_classPtr + .asFunction)>(); - void dispatch_io_write( - dispatch_io_t channel, - int offset, - dispatch_data_t data, + void dispatch_set_target_queue( + dispatch_object_t object, dispatch_queue_t queue, - dispatch_io_handler_t io_handler, ) { - return _dispatch_io_write( - channel, - offset, - data, + return _dispatch_set_target_queue( + object, queue, - io_handler, ); } - late final _dispatch_io_writePtr = _lookup< + late final _dispatch_set_target_queuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_io_t, off_t, dispatch_data_t, - dispatch_queue_t, dispatch_io_handler_t)>>('dispatch_io_write'); - late final _dispatch_io_write = _dispatch_io_writePtr.asFunction< - void Function(dispatch_io_t, int, dispatch_data_t, dispatch_queue_t, - dispatch_io_handler_t)>(); + ffi.Void Function(dispatch_object_t, + dispatch_queue_t)>>('dispatch_set_target_queue'); + late final _dispatch_set_target_queue = _dispatch_set_target_queuePtr + .asFunction(); - void dispatch_io_close( - dispatch_io_t channel, - int flags, - ) { - return _dispatch_io_close( - channel, - flags, - ); + void dispatch_main() { + return _dispatch_main(); } - late final _dispatch_io_closePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_io_t, dispatch_io_close_flags_t)>>('dispatch_io_close'); - late final _dispatch_io_close = - _dispatch_io_closePtr.asFunction(); + late final _dispatch_mainPtr = + _lookup>('dispatch_main'); + late final _dispatch_main = _dispatch_mainPtr.asFunction(); - void dispatch_io_barrier( - dispatch_io_t channel, - dispatch_block_t barrier, + void dispatch_after( + int when, + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _dispatch_io_barrier( - channel, - barrier, + return _dispatch_after( + when, + queue, + block, ); } - late final _dispatch_io_barrierPtr = _lookup< + late final _dispatch_afterPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_io_t, dispatch_block_t)>>('dispatch_io_barrier'); - late final _dispatch_io_barrier = _dispatch_io_barrierPtr - .asFunction(); + ffi.Void Function(dispatch_time_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_after'); + late final _dispatch_after = _dispatch_afterPtr + .asFunction(); - int dispatch_io_get_descriptor( - dispatch_io_t channel, + void dispatch_after_f( + int when, + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_io_get_descriptor( - channel, + return _dispatch_after_f( + when, + queue, + context, + work, ); } - late final _dispatch_io_get_descriptorPtr = - _lookup>( - 'dispatch_io_get_descriptor'); - late final _dispatch_io_get_descriptor = - _dispatch_io_get_descriptorPtr.asFunction(); + late final _dispatch_after_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_time_t, dispatch_queue_t, + ffi.Pointer, dispatch_function_t)>>('dispatch_after_f'); + late final _dispatch_after_f = _dispatch_after_fPtr.asFunction< + void Function( + int, dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - void dispatch_io_set_high_water( - dispatch_io_t channel, - int high_water, + void dispatch_barrier_async( + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _dispatch_io_set_high_water( - channel, - high_water, + return _dispatch_barrier_async( + queue, + block, ); } - late final _dispatch_io_set_high_waterPtr = - _lookup>( - 'dispatch_io_set_high_water'); - late final _dispatch_io_set_high_water = _dispatch_io_set_high_waterPtr - .asFunction(); + late final _dispatch_barrier_asyncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_async'); + late final _dispatch_barrier_async = _dispatch_barrier_asyncPtr + .asFunction(); - void dispatch_io_set_low_water( - dispatch_io_t channel, - int low_water, + void dispatch_barrier_async_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_io_set_low_water( - channel, - low_water, + return _dispatch_barrier_async_f( + queue, + context, + work, ); } - late final _dispatch_io_set_low_waterPtr = - _lookup>( - 'dispatch_io_set_low_water'); - late final _dispatch_io_set_low_water = _dispatch_io_set_low_waterPtr - .asFunction(); + late final _dispatch_barrier_async_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_barrier_async_f'); + late final _dispatch_barrier_async_f = + _dispatch_barrier_async_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - void dispatch_io_set_interval( - dispatch_io_t channel, - int interval, - int flags, + void dispatch_barrier_sync( + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _dispatch_io_set_interval( - channel, - interval, - flags, + return _dispatch_barrier_sync( + queue, + block, ); } - late final _dispatch_io_set_intervalPtr = _lookup< + late final _dispatch_barrier_syncPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_io_t, ffi.Uint64, - dispatch_io_interval_flags_t)>>('dispatch_io_set_interval'); - late final _dispatch_io_set_interval = _dispatch_io_set_intervalPtr - .asFunction(); + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_sync'); + late final _dispatch_barrier_sync = _dispatch_barrier_syncPtr + .asFunction(); - dispatch_workloop_t dispatch_workloop_create( - ffi.Pointer label, + void dispatch_barrier_sync_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_workloop_create( - label, + return _dispatch_barrier_sync_f( + queue, + context, + work, ); } - late final _dispatch_workloop_createPtr = _lookup< + late final _dispatch_barrier_sync_fPtr = _lookup< ffi.NativeFunction< - dispatch_workloop_t Function( - ffi.Pointer)>>('dispatch_workloop_create'); - late final _dispatch_workloop_create = _dispatch_workloop_createPtr - .asFunction)>(); + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_barrier_sync_f'); + late final _dispatch_barrier_sync_f = _dispatch_barrier_sync_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - dispatch_workloop_t dispatch_workloop_create_inactive( - ffi.Pointer label, + void dispatch_barrier_async_and_wait( + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _dispatch_workloop_create_inactive( - label, + return _dispatch_barrier_async_and_wait( + queue, + block, ); } - late final _dispatch_workloop_create_inactivePtr = _lookup< + late final _dispatch_barrier_async_and_waitPtr = _lookup< ffi.NativeFunction< - dispatch_workloop_t Function( - ffi.Pointer)>>('dispatch_workloop_create_inactive'); - late final _dispatch_workloop_create_inactive = - _dispatch_workloop_create_inactivePtr - .asFunction)>(); + ffi.Void Function(dispatch_queue_t, + dispatch_block_t)>>('dispatch_barrier_async_and_wait'); + late final _dispatch_barrier_async_and_wait = + _dispatch_barrier_async_and_waitPtr + .asFunction(); - void dispatch_workloop_set_autorelease_frequency( - dispatch_workloop_t workloop, - int frequency, + void dispatch_barrier_async_and_wait_f( + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _dispatch_workloop_set_autorelease_frequency( - workloop, - frequency, + return _dispatch_barrier_async_and_wait_f( + queue, + context, + work, ); } - late final _dispatch_workloop_set_autorelease_frequencyPtr = _lookup< + late final _dispatch_barrier_async_and_wait_fPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_workloop_t, - ffi.Int32)>>('dispatch_workloop_set_autorelease_frequency'); - late final _dispatch_workloop_set_autorelease_frequency = - _dispatch_workloop_set_autorelease_frequencyPtr - .asFunction(); + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_barrier_async_and_wait_f'); + late final _dispatch_barrier_async_and_wait_f = + _dispatch_barrier_async_and_wait_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - void dispatch_workloop_set_os_workgroup( - dispatch_workloop_t workloop, - os_workgroup_t workgroup, + void dispatch_queue_set_specific( + dispatch_queue_t queue, + ffi.Pointer key, + ffi.Pointer context, + dispatch_function_t destructor, ) { - return _dispatch_workloop_set_os_workgroup( - workloop, - workgroup, + return _dispatch_queue_set_specific( + queue, + key, + context, + destructor, ); } - late final _dispatch_workloop_set_os_workgroupPtr = _lookup< + late final _dispatch_queue_set_specificPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_workloop_t, - os_workgroup_t)>>('dispatch_workloop_set_os_workgroup'); - late final _dispatch_workloop_set_os_workgroup = - _dispatch_workloop_set_os_workgroupPtr - .asFunction(); + ffi.Void Function( + dispatch_queue_t, + ffi.Pointer, + ffi.Pointer, + dispatch_function_t)>>('dispatch_queue_set_specific'); + late final _dispatch_queue_set_specific = + _dispatch_queue_set_specificPtr.asFunction< + void Function(dispatch_queue_t, ffi.Pointer, + ffi.Pointer, dispatch_function_t)>(); - int CFReadStreamGetTypeID() { - return _CFReadStreamGetTypeID(); + ffi.Pointer dispatch_queue_get_specific( + dispatch_queue_t queue, + ffi.Pointer key, + ) { + return _dispatch_queue_get_specific( + queue, + key, + ); } - late final _CFReadStreamGetTypeIDPtr = - _lookup>('CFReadStreamGetTypeID'); - late final _CFReadStreamGetTypeID = - _CFReadStreamGetTypeIDPtr.asFunction(); + late final _dispatch_queue_get_specificPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(dispatch_queue_t, + ffi.Pointer)>>('dispatch_queue_get_specific'); + late final _dispatch_queue_get_specific = + _dispatch_queue_get_specificPtr.asFunction< + ffi.Pointer Function( + dispatch_queue_t, ffi.Pointer)>(); - int CFWriteStreamGetTypeID() { - return _CFWriteStreamGetTypeID(); + ffi.Pointer dispatch_get_specific( + ffi.Pointer key, + ) { + return _dispatch_get_specific( + key, + ); } - late final _CFWriteStreamGetTypeIDPtr = - _lookup>( - 'CFWriteStreamGetTypeID'); - late final _CFWriteStreamGetTypeID = - _CFWriteStreamGetTypeIDPtr.asFunction(); + late final _dispatch_get_specificPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('dispatch_get_specific'); + late final _dispatch_get_specific = _dispatch_get_specificPtr + .asFunction Function(ffi.Pointer)>(); - late final ffi.Pointer _kCFStreamPropertyDataWritten = - _lookup('kCFStreamPropertyDataWritten'); + void dispatch_assert_queue( + dispatch_queue_t queue, + ) { + return _dispatch_assert_queue( + queue, + ); + } - CFStreamPropertyKey get kCFStreamPropertyDataWritten => - _kCFStreamPropertyDataWritten.value; + late final _dispatch_assert_queuePtr = + _lookup>( + 'dispatch_assert_queue'); + late final _dispatch_assert_queue = + _dispatch_assert_queuePtr.asFunction(); - set kCFStreamPropertyDataWritten(CFStreamPropertyKey value) => - _kCFStreamPropertyDataWritten.value = value; + void dispatch_assert_queue_barrier( + dispatch_queue_t queue, + ) { + return _dispatch_assert_queue_barrier( + queue, + ); + } - CFReadStreamRef CFReadStreamCreateWithBytesNoCopy( - CFAllocatorRef alloc, - ffi.Pointer bytes, - int length, - CFAllocatorRef bytesDeallocator, + late final _dispatch_assert_queue_barrierPtr = + _lookup>( + 'dispatch_assert_queue_barrier'); + late final _dispatch_assert_queue_barrier = _dispatch_assert_queue_barrierPtr + .asFunction(); + + void dispatch_assert_queue_not( + dispatch_queue_t queue, ) { - return _CFReadStreamCreateWithBytesNoCopy( - alloc, - bytes, - length, - bytesDeallocator, + return _dispatch_assert_queue_not( + queue, ); } - late final _CFReadStreamCreateWithBytesNoCopyPtr = _lookup< - ffi.NativeFunction< - CFReadStreamRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFAllocatorRef)>>('CFReadStreamCreateWithBytesNoCopy'); - late final _CFReadStreamCreateWithBytesNoCopy = - _CFReadStreamCreateWithBytesNoCopyPtr.asFunction< - CFReadStreamRef Function( - CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + late final _dispatch_assert_queue_notPtr = + _lookup>( + 'dispatch_assert_queue_not'); + late final _dispatch_assert_queue_not = _dispatch_assert_queue_notPtr + .asFunction(); - CFWriteStreamRef CFWriteStreamCreateWithBuffer( - CFAllocatorRef alloc, - ffi.Pointer buffer, - int bufferCapacity, + dispatch_block_t dispatch_block_create( + int flags, + dispatch_block_t block, ) { - return _CFWriteStreamCreateWithBuffer( - alloc, - buffer, - bufferCapacity, + return _dispatch_block_create( + flags, + block, ); } - late final _CFWriteStreamCreateWithBufferPtr = _lookup< + late final _dispatch_block_createPtr = _lookup< ffi.NativeFunction< - CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex)>>('CFWriteStreamCreateWithBuffer'); - late final _CFWriteStreamCreateWithBuffer = - _CFWriteStreamCreateWithBufferPtr.asFunction< - CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + dispatch_block_t Function( + ffi.Int32, dispatch_block_t)>>('dispatch_block_create'); + late final _dispatch_block_create = _dispatch_block_createPtr + .asFunction(); - CFWriteStreamRef CFWriteStreamCreateWithAllocatedBuffers( - CFAllocatorRef alloc, - CFAllocatorRef bufferAllocator, + dispatch_block_t dispatch_block_create_with_qos_class( + int flags, + int qos_class, + int relative_priority, + dispatch_block_t block, ) { - return _CFWriteStreamCreateWithAllocatedBuffers( - alloc, - bufferAllocator, + return _dispatch_block_create_with_qos_class( + flags, + qos_class, + relative_priority, + block, ); } - late final _CFWriteStreamCreateWithAllocatedBuffersPtr = _lookup< + late final _dispatch_block_create_with_qos_classPtr = _lookup< ffi.NativeFunction< - CFWriteStreamRef Function(CFAllocatorRef, - CFAllocatorRef)>>('CFWriteStreamCreateWithAllocatedBuffers'); - late final _CFWriteStreamCreateWithAllocatedBuffers = - _CFWriteStreamCreateWithAllocatedBuffersPtr.asFunction< - CFWriteStreamRef Function(CFAllocatorRef, CFAllocatorRef)>(); + dispatch_block_t Function(ffi.Int32, ffi.Int32, ffi.Int, + dispatch_block_t)>>('dispatch_block_create_with_qos_class'); + late final _dispatch_block_create_with_qos_class = + _dispatch_block_create_with_qos_classPtr.asFunction< + dispatch_block_t Function(int, int, int, dispatch_block_t)>(); - CFReadStreamRef CFReadStreamCreateWithFile( - CFAllocatorRef alloc, - CFURLRef fileURL, + void dispatch_block_perform( + int flags, + dispatch_block_t block, ) { - return _CFReadStreamCreateWithFile( - alloc, - fileURL, + return _dispatch_block_perform( + flags, + block, ); } - late final _CFReadStreamCreateWithFilePtr = _lookup< - ffi.NativeFunction< - CFReadStreamRef Function( - CFAllocatorRef, CFURLRef)>>('CFReadStreamCreateWithFile'); - late final _CFReadStreamCreateWithFile = _CFReadStreamCreateWithFilePtr - .asFunction(); + late final _dispatch_block_performPtr = _lookup< + ffi.NativeFunction>( + 'dispatch_block_perform'); + late final _dispatch_block_perform = _dispatch_block_performPtr + .asFunction(); - CFWriteStreamRef CFWriteStreamCreateWithFile( - CFAllocatorRef alloc, - CFURLRef fileURL, + int dispatch_block_wait( + dispatch_block_t block, + int timeout, ) { - return _CFWriteStreamCreateWithFile( - alloc, - fileURL, + return _dispatch_block_wait( + block, + timeout, ); } - late final _CFWriteStreamCreateWithFilePtr = _lookup< + late final _dispatch_block_waitPtr = _lookup< ffi.NativeFunction< - CFWriteStreamRef Function( - CFAllocatorRef, CFURLRef)>>('CFWriteStreamCreateWithFile'); - late final _CFWriteStreamCreateWithFile = _CFWriteStreamCreateWithFilePtr - .asFunction(); + ffi.IntPtr Function( + dispatch_block_t, dispatch_time_t)>>('dispatch_block_wait'); + late final _dispatch_block_wait = + _dispatch_block_waitPtr.asFunction(); - void CFStreamCreateBoundPair( - CFAllocatorRef alloc, - ffi.Pointer readStream, - ffi.Pointer writeStream, - int transferBufferSize, + void dispatch_block_notify( + dispatch_block_t block, + dispatch_queue_t queue, + dispatch_block_t notification_block, ) { - return _CFStreamCreateBoundPair( - alloc, - readStream, - writeStream, - transferBufferSize, + return _dispatch_block_notify( + block, + queue, + notification_block, ); } - late final _CFStreamCreateBoundPairPtr = _lookup< + late final _dispatch_block_notifyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, - ffi.Pointer, - ffi.Pointer, - CFIndex)>>('CFStreamCreateBoundPair'); - late final _CFStreamCreateBoundPair = _CFStreamCreateBoundPairPtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer, - ffi.Pointer, int)>(); - - late final ffi.Pointer _kCFStreamPropertyAppendToFile = - _lookup('kCFStreamPropertyAppendToFile'); + ffi.Void Function(dispatch_block_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_block_notify'); + late final _dispatch_block_notify = _dispatch_block_notifyPtr.asFunction< + void Function(dispatch_block_t, dispatch_queue_t, dispatch_block_t)>(); - CFStreamPropertyKey get kCFStreamPropertyAppendToFile => - _kCFStreamPropertyAppendToFile.value; + void dispatch_block_cancel( + dispatch_block_t block, + ) { + return _dispatch_block_cancel( + block, + ); + } - set kCFStreamPropertyAppendToFile(CFStreamPropertyKey value) => - _kCFStreamPropertyAppendToFile.value = value; + late final _dispatch_block_cancelPtr = + _lookup>( + 'dispatch_block_cancel'); + late final _dispatch_block_cancel = + _dispatch_block_cancelPtr.asFunction(); - late final ffi.Pointer - _kCFStreamPropertyFileCurrentOffset = - _lookup('kCFStreamPropertyFileCurrentOffset'); + int dispatch_block_testcancel( + dispatch_block_t block, + ) { + return _dispatch_block_testcancel( + block, + ); + } - CFStreamPropertyKey get kCFStreamPropertyFileCurrentOffset => - _kCFStreamPropertyFileCurrentOffset.value; + late final _dispatch_block_testcancelPtr = + _lookup>( + 'dispatch_block_testcancel'); + late final _dispatch_block_testcancel = _dispatch_block_testcancelPtr + .asFunction(); - set kCFStreamPropertyFileCurrentOffset(CFStreamPropertyKey value) => - _kCFStreamPropertyFileCurrentOffset.value = value; + late final ffi.Pointer _KERNEL_SECURITY_TOKEN = + _lookup('KERNEL_SECURITY_TOKEN'); - late final ffi.Pointer - _kCFStreamPropertySocketNativeHandle = - _lookup('kCFStreamPropertySocketNativeHandle'); + security_token_t get KERNEL_SECURITY_TOKEN => _KERNEL_SECURITY_TOKEN.ref; - CFStreamPropertyKey get kCFStreamPropertySocketNativeHandle => - _kCFStreamPropertySocketNativeHandle.value; + late final ffi.Pointer _KERNEL_AUDIT_TOKEN = + _lookup('KERNEL_AUDIT_TOKEN'); - set kCFStreamPropertySocketNativeHandle(CFStreamPropertyKey value) => - _kCFStreamPropertySocketNativeHandle.value = value; + audit_token_t get KERNEL_AUDIT_TOKEN => _KERNEL_AUDIT_TOKEN.ref; - late final ffi.Pointer - _kCFStreamPropertySocketRemoteHostName = - _lookup('kCFStreamPropertySocketRemoteHostName'); + int mach_msg_overwrite( + ffi.Pointer msg, + int option, + int send_size, + int rcv_size, + int rcv_name, + int timeout, + int notify, + ffi.Pointer rcv_msg, + int rcv_limit, + ) { + return _mach_msg_overwrite( + msg, + option, + send_size, + rcv_size, + rcv_name, + timeout, + notify, + rcv_msg, + rcv_limit, + ); + } - CFStreamPropertyKey get kCFStreamPropertySocketRemoteHostName => - _kCFStreamPropertySocketRemoteHostName.value; + late final _mach_msg_overwritePtr = _lookup< + ffi.NativeFunction< + mach_msg_return_t Function( + ffi.Pointer, + mach_msg_option_t, + mach_msg_size_t, + mach_msg_size_t, + mach_port_name_t, + mach_msg_timeout_t, + mach_port_name_t, + ffi.Pointer, + mach_msg_size_t)>>('mach_msg_overwrite'); + late final _mach_msg_overwrite = _mach_msg_overwritePtr.asFunction< + int Function(ffi.Pointer, int, int, int, int, int, int, + ffi.Pointer, int)>(); - set kCFStreamPropertySocketRemoteHostName(CFStreamPropertyKey value) => - _kCFStreamPropertySocketRemoteHostName.value = value; + int mach_msg( + ffi.Pointer msg, + int option, + int send_size, + int rcv_size, + int rcv_name, + int timeout, + int notify, + ) { + return _mach_msg( + msg, + option, + send_size, + rcv_size, + rcv_name, + timeout, + notify, + ); + } - late final ffi.Pointer - _kCFStreamPropertySocketRemotePortNumber = - _lookup('kCFStreamPropertySocketRemotePortNumber'); + late final _mach_msgPtr = _lookup< + ffi.NativeFunction< + mach_msg_return_t Function( + ffi.Pointer, + mach_msg_option_t, + mach_msg_size_t, + mach_msg_size_t, + mach_port_name_t, + mach_msg_timeout_t, + mach_port_name_t)>>('mach_msg'); + late final _mach_msg = _mach_msgPtr.asFunction< + int Function( + ffi.Pointer, int, int, int, int, int, int)>(); - CFStreamPropertyKey get kCFStreamPropertySocketRemotePortNumber => - _kCFStreamPropertySocketRemotePortNumber.value; + int mach_voucher_deallocate( + int voucher, + ) { + return _mach_voucher_deallocate( + voucher, + ); + } - set kCFStreamPropertySocketRemotePortNumber(CFStreamPropertyKey value) => - _kCFStreamPropertySocketRemotePortNumber.value = value; + late final _mach_voucher_deallocatePtr = + _lookup>( + 'mach_voucher_deallocate'); + late final _mach_voucher_deallocate = + _mach_voucher_deallocatePtr.asFunction(); - late final ffi.Pointer _kCFStreamErrorDomainSOCKS = - _lookup('kCFStreamErrorDomainSOCKS'); + late final ffi.Pointer + __dispatch_source_type_data_add = + _lookup('_dispatch_source_type_data_add'); - int get kCFStreamErrorDomainSOCKS => _kCFStreamErrorDomainSOCKS.value; + ffi.Pointer get _dispatch_source_type_data_add => + __dispatch_source_type_data_add; - set kCFStreamErrorDomainSOCKS(int value) => - _kCFStreamErrorDomainSOCKS.value = value; + late final ffi.Pointer + __dispatch_source_type_data_or = + _lookup('_dispatch_source_type_data_or'); - late final ffi.Pointer _kCFStreamPropertySOCKSProxy = - _lookup('kCFStreamPropertySOCKSProxy'); + ffi.Pointer get _dispatch_source_type_data_or => + __dispatch_source_type_data_or; - CFStringRef get kCFStreamPropertySOCKSProxy => - _kCFStreamPropertySOCKSProxy.value; + late final ffi.Pointer + __dispatch_source_type_data_replace = + _lookup('_dispatch_source_type_data_replace'); - set kCFStreamPropertySOCKSProxy(CFStringRef value) => - _kCFStreamPropertySOCKSProxy.value = value; + ffi.Pointer get _dispatch_source_type_data_replace => + __dispatch_source_type_data_replace; - late final ffi.Pointer _kCFStreamPropertySOCKSProxyHost = - _lookup('kCFStreamPropertySOCKSProxyHost'); + late final ffi.Pointer + __dispatch_source_type_mach_send = + _lookup('_dispatch_source_type_mach_send'); - CFStringRef get kCFStreamPropertySOCKSProxyHost => - _kCFStreamPropertySOCKSProxyHost.value; + ffi.Pointer get _dispatch_source_type_mach_send => + __dispatch_source_type_mach_send; - set kCFStreamPropertySOCKSProxyHost(CFStringRef value) => - _kCFStreamPropertySOCKSProxyHost.value = value; + late final ffi.Pointer + __dispatch_source_type_mach_recv = + _lookup('_dispatch_source_type_mach_recv'); - late final ffi.Pointer _kCFStreamPropertySOCKSProxyPort = - _lookup('kCFStreamPropertySOCKSProxyPort'); + ffi.Pointer get _dispatch_source_type_mach_recv => + __dispatch_source_type_mach_recv; - CFStringRef get kCFStreamPropertySOCKSProxyPort => - _kCFStreamPropertySOCKSProxyPort.value; + late final ffi.Pointer + __dispatch_source_type_memorypressure = + _lookup('_dispatch_source_type_memorypressure'); - set kCFStreamPropertySOCKSProxyPort(CFStringRef value) => - _kCFStreamPropertySOCKSProxyPort.value = value; + ffi.Pointer + get _dispatch_source_type_memorypressure => + __dispatch_source_type_memorypressure; - late final ffi.Pointer _kCFStreamPropertySOCKSVersion = - _lookup('kCFStreamPropertySOCKSVersion'); + late final ffi.Pointer __dispatch_source_type_proc = + _lookup('_dispatch_source_type_proc'); - CFStringRef get kCFStreamPropertySOCKSVersion => - _kCFStreamPropertySOCKSVersion.value; + ffi.Pointer get _dispatch_source_type_proc => + __dispatch_source_type_proc; - set kCFStreamPropertySOCKSVersion(CFStringRef value) => - _kCFStreamPropertySOCKSVersion.value = value; + late final ffi.Pointer __dispatch_source_type_read = + _lookup('_dispatch_source_type_read'); - late final ffi.Pointer _kCFStreamSocketSOCKSVersion4 = - _lookup('kCFStreamSocketSOCKSVersion4'); + ffi.Pointer get _dispatch_source_type_read => + __dispatch_source_type_read; - CFStringRef get kCFStreamSocketSOCKSVersion4 => - _kCFStreamSocketSOCKSVersion4.value; + late final ffi.Pointer __dispatch_source_type_signal = + _lookup('_dispatch_source_type_signal'); - set kCFStreamSocketSOCKSVersion4(CFStringRef value) => - _kCFStreamSocketSOCKSVersion4.value = value; + ffi.Pointer get _dispatch_source_type_signal => + __dispatch_source_type_signal; - late final ffi.Pointer _kCFStreamSocketSOCKSVersion5 = - _lookup('kCFStreamSocketSOCKSVersion5'); + late final ffi.Pointer __dispatch_source_type_timer = + _lookup('_dispatch_source_type_timer'); - CFStringRef get kCFStreamSocketSOCKSVersion5 => - _kCFStreamSocketSOCKSVersion5.value; + ffi.Pointer get _dispatch_source_type_timer => + __dispatch_source_type_timer; - set kCFStreamSocketSOCKSVersion5(CFStringRef value) => - _kCFStreamSocketSOCKSVersion5.value = value; + late final ffi.Pointer __dispatch_source_type_vnode = + _lookup('_dispatch_source_type_vnode'); - late final ffi.Pointer _kCFStreamPropertySOCKSUser = - _lookup('kCFStreamPropertySOCKSUser'); + ffi.Pointer get _dispatch_source_type_vnode => + __dispatch_source_type_vnode; - CFStringRef get kCFStreamPropertySOCKSUser => - _kCFStreamPropertySOCKSUser.value; + late final ffi.Pointer __dispatch_source_type_write = + _lookup('_dispatch_source_type_write'); - set kCFStreamPropertySOCKSUser(CFStringRef value) => - _kCFStreamPropertySOCKSUser.value = value; + ffi.Pointer get _dispatch_source_type_write => + __dispatch_source_type_write; - late final ffi.Pointer _kCFStreamPropertySOCKSPassword = - _lookup('kCFStreamPropertySOCKSPassword'); - - CFStringRef get kCFStreamPropertySOCKSPassword => - _kCFStreamPropertySOCKSPassword.value; - - set kCFStreamPropertySOCKSPassword(CFStringRef value) => - _kCFStreamPropertySOCKSPassword.value = value; - - late final ffi.Pointer _kCFStreamErrorDomainSSL = - _lookup('kCFStreamErrorDomainSSL'); - - int get kCFStreamErrorDomainSSL => _kCFStreamErrorDomainSSL.value; - - set kCFStreamErrorDomainSSL(int value) => - _kCFStreamErrorDomainSSL.value = value; - - late final ffi.Pointer _kCFStreamPropertySocketSecurityLevel = - _lookup('kCFStreamPropertySocketSecurityLevel'); - - CFStringRef get kCFStreamPropertySocketSecurityLevel => - _kCFStreamPropertySocketSecurityLevel.value; - - set kCFStreamPropertySocketSecurityLevel(CFStringRef value) => - _kCFStreamPropertySocketSecurityLevel.value = value; - - late final ffi.Pointer _kCFStreamSocketSecurityLevelNone = - _lookup('kCFStreamSocketSecurityLevelNone'); - - CFStringRef get kCFStreamSocketSecurityLevelNone => - _kCFStreamSocketSecurityLevelNone.value; - - set kCFStreamSocketSecurityLevelNone(CFStringRef value) => - _kCFStreamSocketSecurityLevelNone.value = value; - - late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv2 = - _lookup('kCFStreamSocketSecurityLevelSSLv2'); - - CFStringRef get kCFStreamSocketSecurityLevelSSLv2 => - _kCFStreamSocketSecurityLevelSSLv2.value; - - set kCFStreamSocketSecurityLevelSSLv2(CFStringRef value) => - _kCFStreamSocketSecurityLevelSSLv2.value = value; - - late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv3 = - _lookup('kCFStreamSocketSecurityLevelSSLv3'); - - CFStringRef get kCFStreamSocketSecurityLevelSSLv3 => - _kCFStreamSocketSecurityLevelSSLv3.value; - - set kCFStreamSocketSecurityLevelSSLv3(CFStringRef value) => - _kCFStreamSocketSecurityLevelSSLv3.value = value; - - late final ffi.Pointer _kCFStreamSocketSecurityLevelTLSv1 = - _lookup('kCFStreamSocketSecurityLevelTLSv1'); - - CFStringRef get kCFStreamSocketSecurityLevelTLSv1 => - _kCFStreamSocketSecurityLevelTLSv1.value; - - set kCFStreamSocketSecurityLevelTLSv1(CFStringRef value) => - _kCFStreamSocketSecurityLevelTLSv1.value = value; - - late final ffi.Pointer - _kCFStreamSocketSecurityLevelNegotiatedSSL = - _lookup('kCFStreamSocketSecurityLevelNegotiatedSSL'); - - CFStringRef get kCFStreamSocketSecurityLevelNegotiatedSSL => - _kCFStreamSocketSecurityLevelNegotiatedSSL.value; - - set kCFStreamSocketSecurityLevelNegotiatedSSL(CFStringRef value) => - _kCFStreamSocketSecurityLevelNegotiatedSSL.value = value; - - late final ffi.Pointer - _kCFStreamPropertyShouldCloseNativeSocket = - _lookup('kCFStreamPropertyShouldCloseNativeSocket'); - - CFStringRef get kCFStreamPropertyShouldCloseNativeSocket => - _kCFStreamPropertyShouldCloseNativeSocket.value; - - set kCFStreamPropertyShouldCloseNativeSocket(CFStringRef value) => - _kCFStreamPropertyShouldCloseNativeSocket.value = value; - - void CFStreamCreatePairWithSocket( - CFAllocatorRef alloc, - int sock, - ffi.Pointer readStream, - ffi.Pointer writeStream, + dispatch_source_t dispatch_source_create( + dispatch_source_type_t type, + int handle, + int mask, + dispatch_queue_t queue, ) { - return _CFStreamCreatePairWithSocket( - alloc, - sock, - readStream, - writeStream, + return _dispatch_source_create( + type, + handle, + mask, + queue, ); } - late final _CFStreamCreatePairWithSocketPtr = _lookup< + late final _dispatch_source_createPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, - CFSocketNativeHandle, - ffi.Pointer, - ffi.Pointer)>>('CFStreamCreatePairWithSocket'); - late final _CFStreamCreatePairWithSocket = - _CFStreamCreatePairWithSocketPtr.asFunction< - void Function(CFAllocatorRef, int, ffi.Pointer, - ffi.Pointer)>(); + dispatch_source_t Function(dispatch_source_type_t, ffi.UintPtr, + ffi.UintPtr, dispatch_queue_t)>>('dispatch_source_create'); + late final _dispatch_source_create = _dispatch_source_createPtr.asFunction< + dispatch_source_t Function( + dispatch_source_type_t, int, int, dispatch_queue_t)>(); - void CFStreamCreatePairWithSocketToHost( - CFAllocatorRef alloc, - CFStringRef host, - int port, - ffi.Pointer readStream, - ffi.Pointer writeStream, + void dispatch_source_set_event_handler( + dispatch_source_t source, + dispatch_block_t handler, ) { - return _CFStreamCreatePairWithSocketToHost( - alloc, - host, - port, - readStream, - writeStream, + return _dispatch_source_set_event_handler( + source, + handler, ); } - late final _CFStreamCreatePairWithSocketToHostPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, - CFStringRef, - UInt32, - ffi.Pointer, - ffi.Pointer)>>( - 'CFStreamCreatePairWithSocketToHost'); - late final _CFStreamCreatePairWithSocketToHost = - _CFStreamCreatePairWithSocketToHostPtr.asFunction< - void Function(CFAllocatorRef, CFStringRef, int, - ffi.Pointer, ffi.Pointer)>(); + late final _dispatch_source_set_event_handlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_block_t)>>('dispatch_source_set_event_handler'); + late final _dispatch_source_set_event_handler = + _dispatch_source_set_event_handlerPtr + .asFunction(); - void CFStreamCreatePairWithPeerSocketSignature( - CFAllocatorRef alloc, - ffi.Pointer signature, - ffi.Pointer readStream, - ffi.Pointer writeStream, + void dispatch_source_set_event_handler_f( + dispatch_source_t source, + dispatch_function_t handler, ) { - return _CFStreamCreatePairWithPeerSocketSignature( - alloc, - signature, - readStream, - writeStream, + return _dispatch_source_set_event_handler_f( + source, + handler, ); } - late final _CFStreamCreatePairWithPeerSocketSignaturePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'CFStreamCreatePairWithPeerSocketSignature'); - late final _CFStreamCreatePairWithPeerSocketSignature = - _CFStreamCreatePairWithPeerSocketSignaturePtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _dispatch_source_set_event_handler_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_function_t)>>('dispatch_source_set_event_handler_f'); + late final _dispatch_source_set_event_handler_f = + _dispatch_source_set_event_handler_fPtr + .asFunction(); - int CFReadStreamGetStatus( - CFReadStreamRef stream, + void dispatch_source_set_cancel_handler( + dispatch_source_t source, + dispatch_block_t handler, ) { - return _CFReadStreamGetStatus( - stream, + return _dispatch_source_set_cancel_handler( + source, + handler, ); } - late final _CFReadStreamGetStatusPtr = - _lookup>( - 'CFReadStreamGetStatus'); - late final _CFReadStreamGetStatus = - _CFReadStreamGetStatusPtr.asFunction(); + late final _dispatch_source_set_cancel_handlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_block_t)>>('dispatch_source_set_cancel_handler'); + late final _dispatch_source_set_cancel_handler = + _dispatch_source_set_cancel_handlerPtr + .asFunction(); - int CFWriteStreamGetStatus( - CFWriteStreamRef stream, + void dispatch_source_set_cancel_handler_f( + dispatch_source_t source, + dispatch_function_t handler, ) { - return _CFWriteStreamGetStatus( - stream, + return _dispatch_source_set_cancel_handler_f( + source, + handler, ); } - late final _CFWriteStreamGetStatusPtr = - _lookup>( - 'CFWriteStreamGetStatus'); - late final _CFWriteStreamGetStatus = - _CFWriteStreamGetStatusPtr.asFunction(); + late final _dispatch_source_set_cancel_handler_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_function_t)>>('dispatch_source_set_cancel_handler_f'); + late final _dispatch_source_set_cancel_handler_f = + _dispatch_source_set_cancel_handler_fPtr + .asFunction(); - CFErrorRef CFReadStreamCopyError( - CFReadStreamRef stream, + void dispatch_source_cancel( + dispatch_source_t source, ) { - return _CFReadStreamCopyError( - stream, + return _dispatch_source_cancel( + source, ); } - late final _CFReadStreamCopyErrorPtr = - _lookup>( - 'CFReadStreamCopyError'); - late final _CFReadStreamCopyError = _CFReadStreamCopyErrorPtr.asFunction< - CFErrorRef Function(CFReadStreamRef)>(); + late final _dispatch_source_cancelPtr = + _lookup>( + 'dispatch_source_cancel'); + late final _dispatch_source_cancel = + _dispatch_source_cancelPtr.asFunction(); - CFErrorRef CFWriteStreamCopyError( - CFWriteStreamRef stream, + int dispatch_source_testcancel( + dispatch_source_t source, ) { - return _CFWriteStreamCopyError( - stream, + return _dispatch_source_testcancel( + source, ); } - late final _CFWriteStreamCopyErrorPtr = - _lookup>( - 'CFWriteStreamCopyError'); - late final _CFWriteStreamCopyError = _CFWriteStreamCopyErrorPtr.asFunction< - CFErrorRef Function(CFWriteStreamRef)>(); + late final _dispatch_source_testcancelPtr = + _lookup>( + 'dispatch_source_testcancel'); + late final _dispatch_source_testcancel = _dispatch_source_testcancelPtr + .asFunction(); - int CFReadStreamOpen( - CFReadStreamRef stream, + int dispatch_source_get_handle( + dispatch_source_t source, ) { - return _CFReadStreamOpen( - stream, + return _dispatch_source_get_handle( + source, ); } - late final _CFReadStreamOpenPtr = - _lookup>( - 'CFReadStreamOpen'); - late final _CFReadStreamOpen = - _CFReadStreamOpenPtr.asFunction(); + late final _dispatch_source_get_handlePtr = + _lookup>( + 'dispatch_source_get_handle'); + late final _dispatch_source_get_handle = _dispatch_source_get_handlePtr + .asFunction(); - int CFWriteStreamOpen( - CFWriteStreamRef stream, + int dispatch_source_get_mask( + dispatch_source_t source, ) { - return _CFWriteStreamOpen( - stream, + return _dispatch_source_get_mask( + source, ); } - late final _CFWriteStreamOpenPtr = - _lookup>( - 'CFWriteStreamOpen'); - late final _CFWriteStreamOpen = - _CFWriteStreamOpenPtr.asFunction(); + late final _dispatch_source_get_maskPtr = + _lookup>( + 'dispatch_source_get_mask'); + late final _dispatch_source_get_mask = _dispatch_source_get_maskPtr + .asFunction(); - void CFReadStreamClose( - CFReadStreamRef stream, + int dispatch_source_get_data( + dispatch_source_t source, ) { - return _CFReadStreamClose( - stream, + return _dispatch_source_get_data( + source, ); } - late final _CFReadStreamClosePtr = - _lookup>( - 'CFReadStreamClose'); - late final _CFReadStreamClose = - _CFReadStreamClosePtr.asFunction(); + late final _dispatch_source_get_dataPtr = + _lookup>( + 'dispatch_source_get_data'); + late final _dispatch_source_get_data = _dispatch_source_get_dataPtr + .asFunction(); - void CFWriteStreamClose( - CFWriteStreamRef stream, + void dispatch_source_merge_data( + dispatch_source_t source, + int value, ) { - return _CFWriteStreamClose( - stream, + return _dispatch_source_merge_data( + source, + value, ); } - late final _CFWriteStreamClosePtr = - _lookup>( - 'CFWriteStreamClose'); - late final _CFWriteStreamClose = - _CFWriteStreamClosePtr.asFunction(); + late final _dispatch_source_merge_dataPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_source_t, ffi.UintPtr)>>('dispatch_source_merge_data'); + late final _dispatch_source_merge_data = _dispatch_source_merge_dataPtr + .asFunction(); - int CFReadStreamHasBytesAvailable( - CFReadStreamRef stream, + void dispatch_source_set_timer( + dispatch_source_t source, + int start, + int interval, + int leeway, ) { - return _CFReadStreamHasBytesAvailable( - stream, + return _dispatch_source_set_timer( + source, + start, + interval, + leeway, ); } - late final _CFReadStreamHasBytesAvailablePtr = - _lookup>( - 'CFReadStreamHasBytesAvailable'); - late final _CFReadStreamHasBytesAvailable = _CFReadStreamHasBytesAvailablePtr - .asFunction(); + late final _dispatch_source_set_timerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, dispatch_time_t, ffi.Uint64, + ffi.Uint64)>>('dispatch_source_set_timer'); + late final _dispatch_source_set_timer = _dispatch_source_set_timerPtr + .asFunction(); - int CFReadStreamRead( - CFReadStreamRef stream, - ffi.Pointer buffer, - int bufferLength, + void dispatch_source_set_registration_handler( + dispatch_source_t source, + dispatch_block_t handler, ) { - return _CFReadStreamRead( - stream, - buffer, - bufferLength, + return _dispatch_source_set_registration_handler( + source, + handler, ); } - late final _CFReadStreamReadPtr = _lookup< + late final _dispatch_source_set_registration_handlerPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFReadStreamRef, ffi.Pointer, - CFIndex)>>('CFReadStreamRead'); - late final _CFReadStreamRead = _CFReadStreamReadPtr.asFunction< - int Function(CFReadStreamRef, ffi.Pointer, int)>(); + ffi.Void Function(dispatch_source_t, + dispatch_block_t)>>('dispatch_source_set_registration_handler'); + late final _dispatch_source_set_registration_handler = + _dispatch_source_set_registration_handlerPtr + .asFunction(); - ffi.Pointer CFReadStreamGetBuffer( - CFReadStreamRef stream, - int maxBytesToRead, - ffi.Pointer numBytesRead, + void dispatch_source_set_registration_handler_f( + dispatch_source_t source, + dispatch_function_t handler, ) { - return _CFReadStreamGetBuffer( - stream, - maxBytesToRead, - numBytesRead, + return _dispatch_source_set_registration_handler_f( + source, + handler, ); } - late final _CFReadStreamGetBufferPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(CFReadStreamRef, CFIndex, - ffi.Pointer)>>('CFReadStreamGetBuffer'); - late final _CFReadStreamGetBuffer = _CFReadStreamGetBufferPtr.asFunction< - ffi.Pointer Function( - CFReadStreamRef, int, ffi.Pointer)>(); + late final _dispatch_source_set_registration_handler_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, dispatch_function_t)>>( + 'dispatch_source_set_registration_handler_f'); + late final _dispatch_source_set_registration_handler_f = + _dispatch_source_set_registration_handler_fPtr + .asFunction(); - int CFWriteStreamCanAcceptBytes( - CFWriteStreamRef stream, - ) { - return _CFWriteStreamCanAcceptBytes( - stream, - ); + dispatch_group_t dispatch_group_create() { + return _dispatch_group_create(); } - late final _CFWriteStreamCanAcceptBytesPtr = - _lookup>( - 'CFWriteStreamCanAcceptBytes'); - late final _CFWriteStreamCanAcceptBytes = _CFWriteStreamCanAcceptBytesPtr - .asFunction(); + late final _dispatch_group_createPtr = + _lookup>( + 'dispatch_group_create'); + late final _dispatch_group_create = + _dispatch_group_createPtr.asFunction(); - int CFWriteStreamWrite( - CFWriteStreamRef stream, - ffi.Pointer buffer, - int bufferLength, + void dispatch_group_async( + dispatch_group_t group, + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _CFWriteStreamWrite( - stream, - buffer, - bufferLength, + return _dispatch_group_async( + group, + queue, + block, ); } - late final _CFWriteStreamWritePtr = _lookup< + late final _dispatch_group_asyncPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFWriteStreamRef, ffi.Pointer, - CFIndex)>>('CFWriteStreamWrite'); - late final _CFWriteStreamWrite = _CFWriteStreamWritePtr.asFunction< - int Function(CFWriteStreamRef, ffi.Pointer, int)>(); + ffi.Void Function(dispatch_group_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_group_async'); + late final _dispatch_group_async = _dispatch_group_asyncPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); - CFTypeRef CFReadStreamCopyProperty( - CFReadStreamRef stream, - CFStreamPropertyKey propertyName, + void dispatch_group_async_f( + dispatch_group_t group, + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _CFReadStreamCopyProperty( - stream, - propertyName, + return _dispatch_group_async_f( + group, + queue, + context, + work, ); } - late final _CFReadStreamCopyPropertyPtr = _lookup< + late final _dispatch_group_async_fPtr = _lookup< ffi.NativeFunction< - CFTypeRef Function(CFReadStreamRef, - CFStreamPropertyKey)>>('CFReadStreamCopyProperty'); - late final _CFReadStreamCopyProperty = _CFReadStreamCopyPropertyPtr - .asFunction(); + ffi.Void Function( + dispatch_group_t, + dispatch_queue_t, + ffi.Pointer, + dispatch_function_t)>>('dispatch_group_async_f'); + late final _dispatch_group_async_f = _dispatch_group_async_fPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>(); - CFTypeRef CFWriteStreamCopyProperty( - CFWriteStreamRef stream, - CFStreamPropertyKey propertyName, + int dispatch_group_wait( + dispatch_group_t group, + int timeout, ) { - return _CFWriteStreamCopyProperty( - stream, - propertyName, + return _dispatch_group_wait( + group, + timeout, ); } - late final _CFWriteStreamCopyPropertyPtr = _lookup< + late final _dispatch_group_waitPtr = _lookup< ffi.NativeFunction< - CFTypeRef Function(CFWriteStreamRef, - CFStreamPropertyKey)>>('CFWriteStreamCopyProperty'); - late final _CFWriteStreamCopyProperty = _CFWriteStreamCopyPropertyPtr - .asFunction(); + ffi.IntPtr Function( + dispatch_group_t, dispatch_time_t)>>('dispatch_group_wait'); + late final _dispatch_group_wait = + _dispatch_group_waitPtr.asFunction(); - int CFReadStreamSetProperty( - CFReadStreamRef stream, - CFStreamPropertyKey propertyName, - CFTypeRef propertyValue, + void dispatch_group_notify( + dispatch_group_t group, + dispatch_queue_t queue, + dispatch_block_t block, ) { - return _CFReadStreamSetProperty( - stream, - propertyName, - propertyValue, + return _dispatch_group_notify( + group, + queue, + block, ); } - late final _CFReadStreamSetPropertyPtr = _lookup< + late final _dispatch_group_notifyPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFReadStreamRef, CFStreamPropertyKey, - CFTypeRef)>>('CFReadStreamSetProperty'); - late final _CFReadStreamSetProperty = _CFReadStreamSetPropertyPtr.asFunction< - int Function(CFReadStreamRef, CFStreamPropertyKey, CFTypeRef)>(); + ffi.Void Function(dispatch_group_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_group_notify'); + late final _dispatch_group_notify = _dispatch_group_notifyPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); - int CFWriteStreamSetProperty( - CFWriteStreamRef stream, - CFStreamPropertyKey propertyName, - CFTypeRef propertyValue, + void dispatch_group_notify_f( + dispatch_group_t group, + dispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, ) { - return _CFWriteStreamSetProperty( - stream, - propertyName, - propertyValue, + return _dispatch_group_notify_f( + group, + queue, + context, + work, ); } - late final _CFWriteStreamSetPropertyPtr = _lookup< + late final _dispatch_group_notify_fPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFWriteStreamRef, CFStreamPropertyKey, - CFTypeRef)>>('CFWriteStreamSetProperty'); - late final _CFWriteStreamSetProperty = - _CFWriteStreamSetPropertyPtr.asFunction< - int Function(CFWriteStreamRef, CFStreamPropertyKey, CFTypeRef)>(); + ffi.Void Function( + dispatch_group_t, + dispatch_queue_t, + ffi.Pointer, + dispatch_function_t)>>('dispatch_group_notify_f'); + late final _dispatch_group_notify_f = _dispatch_group_notify_fPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>(); - int CFReadStreamSetClient( - CFReadStreamRef stream, - int streamEvents, - CFReadStreamClientCallBack clientCB, - ffi.Pointer clientContext, + void dispatch_group_enter( + dispatch_group_t group, ) { - return _CFReadStreamSetClient( - stream, - streamEvents, - clientCB, - clientContext, + return _dispatch_group_enter( + group, ); } - late final _CFReadStreamSetClientPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFReadStreamRef, - CFOptionFlags, - CFReadStreamClientCallBack, - ffi.Pointer)>>('CFReadStreamSetClient'); - late final _CFReadStreamSetClient = _CFReadStreamSetClientPtr.asFunction< - int Function(CFReadStreamRef, int, CFReadStreamClientCallBack, - ffi.Pointer)>(); + late final _dispatch_group_enterPtr = + _lookup>( + 'dispatch_group_enter'); + late final _dispatch_group_enter = + _dispatch_group_enterPtr.asFunction(); - int CFWriteStreamSetClient( - CFWriteStreamRef stream, - int streamEvents, - CFWriteStreamClientCallBack clientCB, - ffi.Pointer clientContext, + void dispatch_group_leave( + dispatch_group_t group, ) { - return _CFWriteStreamSetClient( - stream, - streamEvents, - clientCB, - clientContext, + return _dispatch_group_leave( + group, ); } - late final _CFWriteStreamSetClientPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFWriteStreamRef, - CFOptionFlags, - CFWriteStreamClientCallBack, - ffi.Pointer)>>('CFWriteStreamSetClient'); - late final _CFWriteStreamSetClient = _CFWriteStreamSetClientPtr.asFunction< - int Function(CFWriteStreamRef, int, CFWriteStreamClientCallBack, - ffi.Pointer)>(); + late final _dispatch_group_leavePtr = + _lookup>( + 'dispatch_group_leave'); + late final _dispatch_group_leave = + _dispatch_group_leavePtr.asFunction(); - void CFReadStreamScheduleWithRunLoop( - CFReadStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + dispatch_semaphore_t dispatch_semaphore_create( + int value, ) { - return _CFReadStreamScheduleWithRunLoop( - stream, - runLoop, - runLoopMode, + return _dispatch_semaphore_create( + value, ); } - late final _CFReadStreamScheduleWithRunLoopPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFReadStreamScheduleWithRunLoop'); - late final _CFReadStreamScheduleWithRunLoop = - _CFReadStreamScheduleWithRunLoopPtr.asFunction< - void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + late final _dispatch_semaphore_createPtr = + _lookup>( + 'dispatch_semaphore_create'); + late final _dispatch_semaphore_create = _dispatch_semaphore_createPtr + .asFunction(); - void CFWriteStreamScheduleWithRunLoop( - CFWriteStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + int dispatch_semaphore_wait( + dispatch_semaphore_t dsema, + int timeout, ) { - return _CFWriteStreamScheduleWithRunLoop( - stream, - runLoop, - runLoopMode, + return _dispatch_semaphore_wait( + dsema, + timeout, ); } - late final _CFWriteStreamScheduleWithRunLoopPtr = _lookup< + late final _dispatch_semaphore_waitPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFWriteStreamScheduleWithRunLoop'); - late final _CFWriteStreamScheduleWithRunLoop = - _CFWriteStreamScheduleWithRunLoopPtr.asFunction< - void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + ffi.IntPtr Function(dispatch_semaphore_t, + dispatch_time_t)>>('dispatch_semaphore_wait'); + late final _dispatch_semaphore_wait = _dispatch_semaphore_waitPtr + .asFunction(); - void CFReadStreamUnscheduleFromRunLoop( - CFReadStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + int dispatch_semaphore_signal( + dispatch_semaphore_t dsema, ) { - return _CFReadStreamUnscheduleFromRunLoop( - stream, - runLoop, - runLoopMode, + return _dispatch_semaphore_signal( + dsema, ); } - late final _CFReadStreamUnscheduleFromRunLoopPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFReadStreamUnscheduleFromRunLoop'); - late final _CFReadStreamUnscheduleFromRunLoop = - _CFReadStreamUnscheduleFromRunLoopPtr.asFunction< - void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + late final _dispatch_semaphore_signalPtr = + _lookup>( + 'dispatch_semaphore_signal'); + late final _dispatch_semaphore_signal = _dispatch_semaphore_signalPtr + .asFunction(); - void CFWriteStreamUnscheduleFromRunLoop( - CFWriteStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + void dispatch_once( + ffi.Pointer predicate, + dispatch_block_t block, ) { - return _CFWriteStreamUnscheduleFromRunLoop( - stream, - runLoop, - runLoopMode, + return _dispatch_once( + predicate, + block, ); } - late final _CFWriteStreamUnscheduleFromRunLoopPtr = _lookup< + late final _dispatch_oncePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFWriteStreamUnscheduleFromRunLoop'); - late final _CFWriteStreamUnscheduleFromRunLoop = - _CFWriteStreamUnscheduleFromRunLoopPtr.asFunction< - void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + ffi.Void Function(ffi.Pointer, + dispatch_block_t)>>('dispatch_once'); + late final _dispatch_once = _dispatch_oncePtr.asFunction< + void Function(ffi.Pointer, dispatch_block_t)>(); - void CFReadStreamSetDispatchQueue( - CFReadStreamRef stream, - dispatch_queue_t q, + void dispatch_once_f( + ffi.Pointer predicate, + ffi.Pointer context, + dispatch_function_t function, ) { - return _CFReadStreamSetDispatchQueue( - stream, - q, + return _dispatch_once_f( + predicate, + context, + function, ); } - late final _CFReadStreamSetDispatchQueuePtr = _lookup< + late final _dispatch_once_fPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, - dispatch_queue_t)>>('CFReadStreamSetDispatchQueue'); - late final _CFReadStreamSetDispatchQueue = _CFReadStreamSetDispatchQueuePtr - .asFunction(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + dispatch_function_t)>>('dispatch_once_f'); + late final _dispatch_once_f = _dispatch_once_fPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + dispatch_function_t)>(); - void CFWriteStreamSetDispatchQueue( - CFWriteStreamRef stream, - dispatch_queue_t q, + late final ffi.Pointer __dispatch_data_empty = + _lookup('_dispatch_data_empty'); + + ffi.Pointer get _dispatch_data_empty => + __dispatch_data_empty; + + late final ffi.Pointer __dispatch_data_destructor_free = + _lookup('_dispatch_data_destructor_free'); + + dispatch_block_t get _dispatch_data_destructor_free => + __dispatch_data_destructor_free.value; + + set _dispatch_data_destructor_free(dispatch_block_t value) => + __dispatch_data_destructor_free.value = value; + + late final ffi.Pointer __dispatch_data_destructor_munmap = + _lookup('_dispatch_data_destructor_munmap'); + + dispatch_block_t get _dispatch_data_destructor_munmap => + __dispatch_data_destructor_munmap.value; + + set _dispatch_data_destructor_munmap(dispatch_block_t value) => + __dispatch_data_destructor_munmap.value = value; + + dispatch_data_t dispatch_data_create( + ffi.Pointer buffer, + int size, + dispatch_queue_t queue, + dispatch_block_t destructor, ) { - return _CFWriteStreamSetDispatchQueue( - stream, - q, + return _dispatch_data_create( + buffer, + size, + queue, + destructor, ); } - late final _CFWriteStreamSetDispatchQueuePtr = _lookup< + late final _dispatch_data_createPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, - dispatch_queue_t)>>('CFWriteStreamSetDispatchQueue'); - late final _CFWriteStreamSetDispatchQueue = _CFWriteStreamSetDispatchQueuePtr - .asFunction(); + dispatch_data_t Function(ffi.Pointer, ffi.Size, + dispatch_queue_t, dispatch_block_t)>>('dispatch_data_create'); + late final _dispatch_data_create = _dispatch_data_createPtr.asFunction< + dispatch_data_t Function( + ffi.Pointer, int, dispatch_queue_t, dispatch_block_t)>(); - dispatch_queue_t CFReadStreamCopyDispatchQueue( - CFReadStreamRef stream, + int dispatch_data_get_size( + dispatch_data_t data, ) { - return _CFReadStreamCopyDispatchQueue( - stream, + return _dispatch_data_get_size( + data, ); } - late final _CFReadStreamCopyDispatchQueuePtr = - _lookup>( - 'CFReadStreamCopyDispatchQueue'); - late final _CFReadStreamCopyDispatchQueue = _CFReadStreamCopyDispatchQueuePtr - .asFunction(); + late final _dispatch_data_get_sizePtr = + _lookup>( + 'dispatch_data_get_size'); + late final _dispatch_data_get_size = + _dispatch_data_get_sizePtr.asFunction(); - dispatch_queue_t CFWriteStreamCopyDispatchQueue( - CFWriteStreamRef stream, + dispatch_data_t dispatch_data_create_map( + dispatch_data_t data, + ffi.Pointer> buffer_ptr, + ffi.Pointer size_ptr, ) { - return _CFWriteStreamCopyDispatchQueue( - stream, + return _dispatch_data_create_map( + data, + buffer_ptr, + size_ptr, ); } - late final _CFWriteStreamCopyDispatchQueuePtr = - _lookup>( - 'CFWriteStreamCopyDispatchQueue'); - late final _CFWriteStreamCopyDispatchQueue = - _CFWriteStreamCopyDispatchQueuePtr.asFunction< - dispatch_queue_t Function(CFWriteStreamRef)>(); + late final _dispatch_data_create_mapPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function( + dispatch_data_t, + ffi.Pointer>, + ffi.Pointer)>>('dispatch_data_create_map'); + late final _dispatch_data_create_map = + _dispatch_data_create_mapPtr.asFunction< + dispatch_data_t Function(dispatch_data_t, + ffi.Pointer>, ffi.Pointer)>(); - CFStreamError CFReadStreamGetError( - CFReadStreamRef stream, + dispatch_data_t dispatch_data_create_concat( + dispatch_data_t data1, + dispatch_data_t data2, ) { - return _CFReadStreamGetError( - stream, + return _dispatch_data_create_concat( + data1, + data2, ); } - late final _CFReadStreamGetErrorPtr = - _lookup>( - 'CFReadStreamGetError'); - late final _CFReadStreamGetError = _CFReadStreamGetErrorPtr.asFunction< - CFStreamError Function(CFReadStreamRef)>(); + late final _dispatch_data_create_concatPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(dispatch_data_t, + dispatch_data_t)>>('dispatch_data_create_concat'); + late final _dispatch_data_create_concat = _dispatch_data_create_concatPtr + .asFunction(); - CFStreamError CFWriteStreamGetError( - CFWriteStreamRef stream, + dispatch_data_t dispatch_data_create_subrange( + dispatch_data_t data, + int offset, + int length, ) { - return _CFWriteStreamGetError( - stream, + return _dispatch_data_create_subrange( + data, + offset, + length, ); } - late final _CFWriteStreamGetErrorPtr = - _lookup>( - 'CFWriteStreamGetError'); - late final _CFWriteStreamGetError = _CFWriteStreamGetErrorPtr.asFunction< - CFStreamError Function(CFWriteStreamRef)>(); + late final _dispatch_data_create_subrangePtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(dispatch_data_t, ffi.Size, + ffi.Size)>>('dispatch_data_create_subrange'); + late final _dispatch_data_create_subrange = _dispatch_data_create_subrangePtr + .asFunction(); - CFPropertyListRef CFPropertyListCreateFromXMLData( - CFAllocatorRef allocator, - CFDataRef xmlData, - int mutabilityOption, - ffi.Pointer errorString, + bool dispatch_data_apply( + dispatch_data_t data, + dispatch_data_applier_t applier, ) { - return _CFPropertyListCreateFromXMLData( - allocator, - xmlData, - mutabilityOption, - errorString, + return _dispatch_data_apply( + data, + applier, ); } - late final _CFPropertyListCreateFromXMLDataPtr = _lookup< + late final _dispatch_data_applyPtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function(CFAllocatorRef, CFDataRef, CFOptionFlags, - ffi.Pointer)>>('CFPropertyListCreateFromXMLData'); - late final _CFPropertyListCreateFromXMLData = - _CFPropertyListCreateFromXMLDataPtr.asFunction< - CFPropertyListRef Function( - CFAllocatorRef, CFDataRef, int, ffi.Pointer)>(); + ffi.Bool Function(dispatch_data_t, + dispatch_data_applier_t)>>('dispatch_data_apply'); + late final _dispatch_data_apply = _dispatch_data_applyPtr + .asFunction(); - CFDataRef CFPropertyListCreateXMLData( - CFAllocatorRef allocator, - CFPropertyListRef propertyList, + dispatch_data_t dispatch_data_copy_region( + dispatch_data_t data, + int location, + ffi.Pointer offset_ptr, ) { - return _CFPropertyListCreateXMLData( - allocator, - propertyList, + return _dispatch_data_copy_region( + data, + location, + offset_ptr, ); } - late final _CFPropertyListCreateXMLDataPtr = _lookup< + late final _dispatch_data_copy_regionPtr = _lookup< ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, - CFPropertyListRef)>>('CFPropertyListCreateXMLData'); - late final _CFPropertyListCreateXMLData = _CFPropertyListCreateXMLDataPtr - .asFunction(); + dispatch_data_t Function(dispatch_data_t, ffi.Size, + ffi.Pointer)>>('dispatch_data_copy_region'); + late final _dispatch_data_copy_region = + _dispatch_data_copy_regionPtr.asFunction< + dispatch_data_t Function( + dispatch_data_t, int, ffi.Pointer)>(); - CFPropertyListRef CFPropertyListCreateDeepCopy( - CFAllocatorRef allocator, - CFPropertyListRef propertyList, - int mutabilityOption, + void dispatch_read( + int fd, + int length, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> handler, ) { - return _CFPropertyListCreateDeepCopy( - allocator, - propertyList, - mutabilityOption, + return _dispatch_read( + fd, + length, + queue, + handler, ); } - late final _CFPropertyListCreateDeepCopyPtr = _lookup< + late final _dispatch_readPtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, - CFOptionFlags)>>('CFPropertyListCreateDeepCopy'); - late final _CFPropertyListCreateDeepCopy = - _CFPropertyListCreateDeepCopyPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, int)>(); + ffi.Void Function(dispatch_fd_t, ffi.Size, dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_read'); + late final _dispatch_read = _dispatch_readPtr.asFunction< + void Function(int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); - int CFPropertyListIsValid( - CFPropertyListRef plist, - int format, + void dispatch_write( + int fd, + dispatch_data_t data, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> handler, ) { - return _CFPropertyListIsValid( - plist, - format, + return _dispatch_write( + fd, + data, + queue, + handler, ); } - late final _CFPropertyListIsValidPtr = _lookup< - ffi.NativeFunction>( - 'CFPropertyListIsValid'); - late final _CFPropertyListIsValid = _CFPropertyListIsValidPtr.asFunction< - int Function(CFPropertyListRef, int)>(); + late final _dispatch_writePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_fd_t, dispatch_data_t, dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_write'); + late final _dispatch_write = _dispatch_writePtr.asFunction< + void Function( + int, dispatch_data_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); - int CFPropertyListWriteToStream( - CFPropertyListRef propertyList, - CFWriteStreamRef stream, - int format, - ffi.Pointer errorString, + dispatch_io_t dispatch_io_create( + int type, + int fd, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> cleanup_handler, ) { - return _CFPropertyListWriteToStream( - propertyList, - stream, - format, - errorString, + return _dispatch_io_create( + type, + fd, + queue, + cleanup_handler, ); } - late final _CFPropertyListWriteToStreamPtr = _lookup< + late final _dispatch_io_createPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFPropertyListRef, CFWriteStreamRef, ffi.Int32, - ffi.Pointer)>>('CFPropertyListWriteToStream'); - late final _CFPropertyListWriteToStream = - _CFPropertyListWriteToStreamPtr.asFunction< - int Function(CFPropertyListRef, CFWriteStreamRef, int, - ffi.Pointer)>(); + dispatch_io_t Function( + dispatch_io_type_t, + dispatch_fd_t, + dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create'); + late final _dispatch_io_create = _dispatch_io_createPtr.asFunction< + dispatch_io_t Function( + int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); - CFPropertyListRef CFPropertyListCreateFromStream( - CFAllocatorRef allocator, - CFReadStreamRef stream, - int streamLength, - int mutabilityOption, - ffi.Pointer format, - ffi.Pointer errorString, + dispatch_io_t dispatch_io_create_with_path( + int type, + ffi.Pointer path, + int oflag, + int mode, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> cleanup_handler, ) { - return _CFPropertyListCreateFromStream( - allocator, - stream, - streamLength, - mutabilityOption, - format, - errorString, + return _dispatch_io_create_with_path( + type, + path, + oflag, + mode, + queue, + cleanup_handler, ); } - late final _CFPropertyListCreateFromStreamPtr = _lookup< + late final _dispatch_io_create_with_pathPtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function( - CFAllocatorRef, - CFReadStreamRef, - CFIndex, - CFOptionFlags, - ffi.Pointer, - ffi.Pointer)>>('CFPropertyListCreateFromStream'); - late final _CFPropertyListCreateFromStream = - _CFPropertyListCreateFromStreamPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, - ffi.Pointer, ffi.Pointer)>(); + dispatch_io_t Function( + dispatch_io_type_t, + ffi.Pointer, + ffi.Int, + mode_t, + dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create_with_path'); + late final _dispatch_io_create_with_path = + _dispatch_io_create_with_pathPtr.asFunction< + dispatch_io_t Function(int, ffi.Pointer, int, int, + dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); - CFPropertyListRef CFPropertyListCreateWithData( - CFAllocatorRef allocator, - CFDataRef data, - int options, - ffi.Pointer format, - ffi.Pointer error, + dispatch_io_t dispatch_io_create_with_io( + int type, + dispatch_io_t io, + dispatch_queue_t queue, + ffi.Pointer<_ObjCBlock> cleanup_handler, ) { - return _CFPropertyListCreateWithData( - allocator, - data, - options, - format, - error, + return _dispatch_io_create_with_io( + type, + io, + queue, + cleanup_handler, ); } - late final _CFPropertyListCreateWithDataPtr = _lookup< + late final _dispatch_io_create_with_ioPtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function( - CFAllocatorRef, - CFDataRef, - CFOptionFlags, - ffi.Pointer, - ffi.Pointer)>>('CFPropertyListCreateWithData'); - late final _CFPropertyListCreateWithData = - _CFPropertyListCreateWithDataPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFDataRef, int, - ffi.Pointer, ffi.Pointer)>(); + dispatch_io_t Function( + dispatch_io_type_t, + dispatch_io_t, + dispatch_queue_t, + ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create_with_io'); + late final _dispatch_io_create_with_io = + _dispatch_io_create_with_ioPtr.asFunction< + dispatch_io_t Function( + int, dispatch_io_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); - CFPropertyListRef CFPropertyListCreateWithStream( - CFAllocatorRef allocator, - CFReadStreamRef stream, - int streamLength, - int options, - ffi.Pointer format, - ffi.Pointer error, + void dispatch_io_read( + dispatch_io_t channel, + int offset, + int length, + dispatch_queue_t queue, + dispatch_io_handler_t io_handler, ) { - return _CFPropertyListCreateWithStream( - allocator, - stream, - streamLength, - options, - format, - error, + return _dispatch_io_read( + channel, + offset, + length, + queue, + io_handler, ); } - late final _CFPropertyListCreateWithStreamPtr = _lookup< + late final _dispatch_io_readPtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function( - CFAllocatorRef, - CFReadStreamRef, - CFIndex, - CFOptionFlags, - ffi.Pointer, - ffi.Pointer)>>('CFPropertyListCreateWithStream'); - late final _CFPropertyListCreateWithStream = - _CFPropertyListCreateWithStreamPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(dispatch_io_t, off_t, ffi.Size, dispatch_queue_t, + dispatch_io_handler_t)>>('dispatch_io_read'); + late final _dispatch_io_read = _dispatch_io_readPtr.asFunction< + void Function( + dispatch_io_t, int, int, dispatch_queue_t, dispatch_io_handler_t)>(); - int CFPropertyListWrite( - CFPropertyListRef propertyList, - CFWriteStreamRef stream, - int format, - int options, - ffi.Pointer error, + void dispatch_io_write( + dispatch_io_t channel, + int offset, + dispatch_data_t data, + dispatch_queue_t queue, + dispatch_io_handler_t io_handler, ) { - return _CFPropertyListWrite( - propertyList, - stream, - format, - options, - error, + return _dispatch_io_write( + channel, + offset, + data, + queue, + io_handler, ); } - late final _CFPropertyListWritePtr = _lookup< + late final _dispatch_io_writePtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFPropertyListRef, CFWriteStreamRef, ffi.Int32, - CFOptionFlags, ffi.Pointer)>>('CFPropertyListWrite'); - late final _CFPropertyListWrite = _CFPropertyListWritePtr.asFunction< - int Function(CFPropertyListRef, CFWriteStreamRef, int, int, - ffi.Pointer)>(); + ffi.Void Function(dispatch_io_t, off_t, dispatch_data_t, + dispatch_queue_t, dispatch_io_handler_t)>>('dispatch_io_write'); + late final _dispatch_io_write = _dispatch_io_writePtr.asFunction< + void Function(dispatch_io_t, int, dispatch_data_t, dispatch_queue_t, + dispatch_io_handler_t)>(); - CFDataRef CFPropertyListCreateData( - CFAllocatorRef allocator, - CFPropertyListRef propertyList, - int format, - int options, - ffi.Pointer error, + void dispatch_io_close( + dispatch_io_t channel, + int flags, ) { - return _CFPropertyListCreateData( - allocator, - propertyList, - format, - options, - error, + return _dispatch_io_close( + channel, + flags, ); } - late final _CFPropertyListCreateDataPtr = _lookup< + late final _dispatch_io_closePtr = _lookup< ffi.NativeFunction< - CFDataRef Function( - CFAllocatorRef, - CFPropertyListRef, - ffi.Int32, - CFOptionFlags, - ffi.Pointer)>>('CFPropertyListCreateData'); - late final _CFPropertyListCreateData = - _CFPropertyListCreateDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFPropertyListRef, int, int, - ffi.Pointer)>(); - - late final ffi.Pointer _kCFTypeSetCallBacks = - _lookup('kCFTypeSetCallBacks'); - - CFSetCallBacks get kCFTypeSetCallBacks => _kCFTypeSetCallBacks.ref; - - late final ffi.Pointer _kCFCopyStringSetCallBacks = - _lookup('kCFCopyStringSetCallBacks'); - - CFSetCallBacks get kCFCopyStringSetCallBacks => - _kCFCopyStringSetCallBacks.ref; - - int CFSetGetTypeID() { - return _CFSetGetTypeID(); - } - - late final _CFSetGetTypeIDPtr = - _lookup>('CFSetGetTypeID'); - late final _CFSetGetTypeID = _CFSetGetTypeIDPtr.asFunction(); + ffi.Void Function( + dispatch_io_t, dispatch_io_close_flags_t)>>('dispatch_io_close'); + late final _dispatch_io_close = + _dispatch_io_closePtr.asFunction(); - CFSetRef CFSetCreate( - CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + void dispatch_io_barrier( + dispatch_io_t channel, + dispatch_block_t barrier, ) { - return _CFSetCreate( - allocator, - values, - numValues, - callBacks, + return _dispatch_io_barrier( + channel, + barrier, ); } - late final _CFSetCreatePtr = _lookup< + late final _dispatch_io_barrierPtr = _lookup< ffi.NativeFunction< - CFSetRef Function(CFAllocatorRef, ffi.Pointer>, - CFIndex, ffi.Pointer)>>('CFSetCreate'); - late final _CFSetCreate = _CFSetCreatePtr.asFunction< - CFSetRef Function(CFAllocatorRef, ffi.Pointer>, int, - ffi.Pointer)>(); - - CFSetRef CFSetCreateCopy( - CFAllocatorRef allocator, - CFSetRef theSet, - ) { - return _CFSetCreateCopy( - allocator, - theSet, - ); - } - - late final _CFSetCreateCopyPtr = - _lookup>( - 'CFSetCreateCopy'); - late final _CFSetCreateCopy = _CFSetCreateCopyPtr.asFunction< - CFSetRef Function(CFAllocatorRef, CFSetRef)>(); + ffi.Void Function( + dispatch_io_t, dispatch_block_t)>>('dispatch_io_barrier'); + late final _dispatch_io_barrier = _dispatch_io_barrierPtr + .asFunction(); - CFMutableSetRef CFSetCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + int dispatch_io_get_descriptor( + dispatch_io_t channel, ) { - return _CFSetCreateMutable( - allocator, - capacity, - callBacks, + return _dispatch_io_get_descriptor( + channel, ); } - late final _CFSetCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableSetRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFSetCreateMutable'); - late final _CFSetCreateMutable = _CFSetCreateMutablePtr.asFunction< - CFMutableSetRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + late final _dispatch_io_get_descriptorPtr = + _lookup>( + 'dispatch_io_get_descriptor'); + late final _dispatch_io_get_descriptor = + _dispatch_io_get_descriptorPtr.asFunction(); - CFMutableSetRef CFSetCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFSetRef theSet, + void dispatch_io_set_high_water( + dispatch_io_t channel, + int high_water, ) { - return _CFSetCreateMutableCopy( - allocator, - capacity, - theSet, + return _dispatch_io_set_high_water( + channel, + high_water, ); } - late final _CFSetCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableSetRef Function( - CFAllocatorRef, CFIndex, CFSetRef)>>('CFSetCreateMutableCopy'); - late final _CFSetCreateMutableCopy = _CFSetCreateMutableCopyPtr.asFunction< - CFMutableSetRef Function(CFAllocatorRef, int, CFSetRef)>(); + late final _dispatch_io_set_high_waterPtr = + _lookup>( + 'dispatch_io_set_high_water'); + late final _dispatch_io_set_high_water = _dispatch_io_set_high_waterPtr + .asFunction(); - int CFSetGetCount( - CFSetRef theSet, + void dispatch_io_set_low_water( + dispatch_io_t channel, + int low_water, ) { - return _CFSetGetCount( - theSet, + return _dispatch_io_set_low_water( + channel, + low_water, ); } - late final _CFSetGetCountPtr = - _lookup>('CFSetGetCount'); - late final _CFSetGetCount = - _CFSetGetCountPtr.asFunction(); + late final _dispatch_io_set_low_waterPtr = + _lookup>( + 'dispatch_io_set_low_water'); + late final _dispatch_io_set_low_water = _dispatch_io_set_low_waterPtr + .asFunction(); - int CFSetGetCountOfValue( - CFSetRef theSet, - ffi.Pointer value, + void dispatch_io_set_interval( + dispatch_io_t channel, + int interval, + int flags, ) { - return _CFSetGetCountOfValue( - theSet, - value, + return _dispatch_io_set_interval( + channel, + interval, + flags, ); } - late final _CFSetGetCountOfValuePtr = _lookup< + late final _dispatch_io_set_intervalPtr = _lookup< ffi.NativeFunction< - CFIndex Function( - CFSetRef, ffi.Pointer)>>('CFSetGetCountOfValue'); - late final _CFSetGetCountOfValue = _CFSetGetCountOfValuePtr.asFunction< - int Function(CFSetRef, ffi.Pointer)>(); + ffi.Void Function(dispatch_io_t, ffi.Uint64, + dispatch_io_interval_flags_t)>>('dispatch_io_set_interval'); + late final _dispatch_io_set_interval = _dispatch_io_set_intervalPtr + .asFunction(); - int CFSetContainsValue( - CFSetRef theSet, - ffi.Pointer value, + dispatch_workloop_t dispatch_workloop_create( + ffi.Pointer label, ) { - return _CFSetContainsValue( - theSet, - value, + return _dispatch_workloop_create( + label, ); } - late final _CFSetContainsValuePtr = _lookup< + late final _dispatch_workloop_createPtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFSetRef, ffi.Pointer)>>('CFSetContainsValue'); - late final _CFSetContainsValue = _CFSetContainsValuePtr.asFunction< - int Function(CFSetRef, ffi.Pointer)>(); + dispatch_workloop_t Function( + ffi.Pointer)>>('dispatch_workloop_create'); + late final _dispatch_workloop_create = _dispatch_workloop_createPtr + .asFunction)>(); - ffi.Pointer CFSetGetValue( - CFSetRef theSet, - ffi.Pointer value, + dispatch_workloop_t dispatch_workloop_create_inactive( + ffi.Pointer label, ) { - return _CFSetGetValue( - theSet, - value, + return _dispatch_workloop_create_inactive( + label, ); } - late final _CFSetGetValuePtr = _lookup< + late final _dispatch_workloop_create_inactivePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFSetRef, ffi.Pointer)>>('CFSetGetValue'); - late final _CFSetGetValue = _CFSetGetValuePtr.asFunction< - ffi.Pointer Function(CFSetRef, ffi.Pointer)>(); + dispatch_workloop_t Function( + ffi.Pointer)>>('dispatch_workloop_create_inactive'); + late final _dispatch_workloop_create_inactive = + _dispatch_workloop_create_inactivePtr + .asFunction)>(); - int CFSetGetValueIfPresent( - CFSetRef theSet, - ffi.Pointer candidate, - ffi.Pointer> value, + void dispatch_workloop_set_autorelease_frequency( + dispatch_workloop_t workloop, + int frequency, ) { - return _CFSetGetValueIfPresent( - theSet, - candidate, - value, + return _dispatch_workloop_set_autorelease_frequency( + workloop, + frequency, ); } - late final _CFSetGetValueIfPresentPtr = _lookup< + late final _dispatch_workloop_set_autorelease_frequencyPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFSetRef, ffi.Pointer, - ffi.Pointer>)>>('CFSetGetValueIfPresent'); - late final _CFSetGetValueIfPresent = _CFSetGetValueIfPresentPtr.asFunction< - int Function(CFSetRef, ffi.Pointer, - ffi.Pointer>)>(); + ffi.Void Function(dispatch_workloop_t, + ffi.Int32)>>('dispatch_workloop_set_autorelease_frequency'); + late final _dispatch_workloop_set_autorelease_frequency = + _dispatch_workloop_set_autorelease_frequencyPtr + .asFunction(); - void CFSetGetValues( - CFSetRef theSet, - ffi.Pointer> values, + void dispatch_workloop_set_os_workgroup( + dispatch_workloop_t workloop, + os_workgroup_t workgroup, ) { - return _CFSetGetValues( - theSet, - values, + return _dispatch_workloop_set_os_workgroup( + workloop, + workgroup, ); } - late final _CFSetGetValuesPtr = _lookup< + late final _dispatch_workloop_set_os_workgroupPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFSetRef, ffi.Pointer>)>>('CFSetGetValues'); - late final _CFSetGetValues = _CFSetGetValuesPtr.asFunction< - void Function(CFSetRef, ffi.Pointer>)>(); + ffi.Void Function(dispatch_workloop_t, + os_workgroup_t)>>('dispatch_workloop_set_os_workgroup'); + late final _dispatch_workloop_set_os_workgroup = + _dispatch_workloop_set_os_workgroupPtr + .asFunction(); - void CFSetApplyFunction( - CFSetRef theSet, - CFSetApplierFunction applier, - ffi.Pointer context, - ) { - return _CFSetApplyFunction( - theSet, - applier, - context, - ); + int CFReadStreamGetTypeID() { + return _CFReadStreamGetTypeID(); } - late final _CFSetApplyFunctionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFSetRef, CFSetApplierFunction, - ffi.Pointer)>>('CFSetApplyFunction'); - late final _CFSetApplyFunction = _CFSetApplyFunctionPtr.asFunction< - void Function(CFSetRef, CFSetApplierFunction, ffi.Pointer)>(); + late final _CFReadStreamGetTypeIDPtr = + _lookup>('CFReadStreamGetTypeID'); + late final _CFReadStreamGetTypeID = + _CFReadStreamGetTypeIDPtr.asFunction(); - void CFSetAddValue( - CFMutableSetRef theSet, - ffi.Pointer value, - ) { - return _CFSetAddValue( - theSet, - value, - ); + int CFWriteStreamGetTypeID() { + return _CFWriteStreamGetTypeID(); } - late final _CFSetAddValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetAddValue'); - late final _CFSetAddValue = _CFSetAddValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + late final _CFWriteStreamGetTypeIDPtr = + _lookup>( + 'CFWriteStreamGetTypeID'); + late final _CFWriteStreamGetTypeID = + _CFWriteStreamGetTypeIDPtr.asFunction(); - void CFSetReplaceValue( - CFMutableSetRef theSet, - ffi.Pointer value, - ) { - return _CFSetReplaceValue( - theSet, - value, - ); - } + late final ffi.Pointer _kCFStreamPropertyDataWritten = + _lookup('kCFStreamPropertyDataWritten'); - late final _CFSetReplaceValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetReplaceValue'); - late final _CFSetReplaceValue = _CFSetReplaceValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + CFStreamPropertyKey get kCFStreamPropertyDataWritten => + _kCFStreamPropertyDataWritten.value; - void CFSetSetValue( - CFMutableSetRef theSet, - ffi.Pointer value, + set kCFStreamPropertyDataWritten(CFStreamPropertyKey value) => + _kCFStreamPropertyDataWritten.value = value; + + CFReadStreamRef CFReadStreamCreateWithBytesNoCopy( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int length, + CFAllocatorRef bytesDeallocator, ) { - return _CFSetSetValue( - theSet, - value, + return _CFReadStreamCreateWithBytesNoCopy( + alloc, + bytes, + length, + bytesDeallocator, ); } - late final _CFSetSetValuePtr = _lookup< + late final _CFReadStreamCreateWithBytesNoCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetSetValue'); - late final _CFSetSetValue = _CFSetSetValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + CFReadStreamRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFReadStreamCreateWithBytesNoCopy'); + late final _CFReadStreamCreateWithBytesNoCopy = + _CFReadStreamCreateWithBytesNoCopyPtr.asFunction< + CFReadStreamRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - void CFSetRemoveValue( - CFMutableSetRef theSet, - ffi.Pointer value, + CFWriteStreamRef CFWriteStreamCreateWithBuffer( + CFAllocatorRef alloc, + ffi.Pointer buffer, + int bufferCapacity, ) { - return _CFSetRemoveValue( - theSet, - value, + return _CFWriteStreamCreateWithBuffer( + alloc, + buffer, + bufferCapacity, ); } - late final _CFSetRemoveValuePtr = _lookup< + late final _CFWriteStreamCreateWithBufferPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetRemoveValue'); - late final _CFSetRemoveValue = _CFSetRemoveValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFWriteStreamCreateWithBuffer'); + late final _CFWriteStreamCreateWithBuffer = + _CFWriteStreamCreateWithBufferPtr.asFunction< + CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - void CFSetRemoveAllValues( - CFMutableSetRef theSet, + CFWriteStreamRef CFWriteStreamCreateWithAllocatedBuffers( + CFAllocatorRef alloc, + CFAllocatorRef bufferAllocator, ) { - return _CFSetRemoveAllValues( - theSet, + return _CFWriteStreamCreateWithAllocatedBuffers( + alloc, + bufferAllocator, ); } - late final _CFSetRemoveAllValuesPtr = - _lookup>( - 'CFSetRemoveAllValues'); - late final _CFSetRemoveAllValues = - _CFSetRemoveAllValuesPtr.asFunction(); - - int CFTreeGetTypeID() { - return _CFTreeGetTypeID(); - } - - late final _CFTreeGetTypeIDPtr = - _lookup>('CFTreeGetTypeID'); - late final _CFTreeGetTypeID = - _CFTreeGetTypeIDPtr.asFunction(); + late final _CFWriteStreamCreateWithAllocatedBuffersPtr = _lookup< + ffi.NativeFunction< + CFWriteStreamRef Function(CFAllocatorRef, + CFAllocatorRef)>>('CFWriteStreamCreateWithAllocatedBuffers'); + late final _CFWriteStreamCreateWithAllocatedBuffers = + _CFWriteStreamCreateWithAllocatedBuffersPtr.asFunction< + CFWriteStreamRef Function(CFAllocatorRef, CFAllocatorRef)>(); - CFTreeRef CFTreeCreate( - CFAllocatorRef allocator, - ffi.Pointer context, + CFReadStreamRef CFReadStreamCreateWithFile( + CFAllocatorRef alloc, + CFURLRef fileURL, ) { - return _CFTreeCreate( - allocator, - context, + return _CFReadStreamCreateWithFile( + alloc, + fileURL, ); } - late final _CFTreeCreatePtr = _lookup< + late final _CFReadStreamCreateWithFilePtr = _lookup< ffi.NativeFunction< - CFTreeRef Function( - CFAllocatorRef, ffi.Pointer)>>('CFTreeCreate'); - late final _CFTreeCreate = _CFTreeCreatePtr.asFunction< - CFTreeRef Function(CFAllocatorRef, ffi.Pointer)>(); + CFReadStreamRef Function( + CFAllocatorRef, CFURLRef)>>('CFReadStreamCreateWithFile'); + late final _CFReadStreamCreateWithFile = _CFReadStreamCreateWithFilePtr + .asFunction(); - CFTreeRef CFTreeGetParent( - CFTreeRef tree, + CFWriteStreamRef CFWriteStreamCreateWithFile( + CFAllocatorRef alloc, + CFURLRef fileURL, ) { - return _CFTreeGetParent( - tree, + return _CFWriteStreamCreateWithFile( + alloc, + fileURL, ); } - late final _CFTreeGetParentPtr = - _lookup>( - 'CFTreeGetParent'); - late final _CFTreeGetParent = - _CFTreeGetParentPtr.asFunction(); + late final _CFWriteStreamCreateWithFilePtr = _lookup< + ffi.NativeFunction< + CFWriteStreamRef Function( + CFAllocatorRef, CFURLRef)>>('CFWriteStreamCreateWithFile'); + late final _CFWriteStreamCreateWithFile = _CFWriteStreamCreateWithFilePtr + .asFunction(); - CFTreeRef CFTreeGetNextSibling( - CFTreeRef tree, + void CFStreamCreateBoundPair( + CFAllocatorRef alloc, + ffi.Pointer readStream, + ffi.Pointer writeStream, + int transferBufferSize, ) { - return _CFTreeGetNextSibling( - tree, + return _CFStreamCreateBoundPair( + alloc, + readStream, + writeStream, + transferBufferSize, ); } - late final _CFTreeGetNextSiblingPtr = - _lookup>( - 'CFTreeGetNextSibling'); - late final _CFTreeGetNextSibling = - _CFTreeGetNextSiblingPtr.asFunction(); + late final _CFStreamCreateBoundPairPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef, + ffi.Pointer, + ffi.Pointer, + CFIndex)>>('CFStreamCreateBoundPair'); + late final _CFStreamCreateBoundPair = _CFStreamCreateBoundPairPtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer, + ffi.Pointer, int)>(); - CFTreeRef CFTreeGetFirstChild( - CFTreeRef tree, - ) { - return _CFTreeGetFirstChild( - tree, - ); - } + late final ffi.Pointer _kCFStreamPropertyAppendToFile = + _lookup('kCFStreamPropertyAppendToFile'); - late final _CFTreeGetFirstChildPtr = - _lookup>( - 'CFTreeGetFirstChild'); - late final _CFTreeGetFirstChild = - _CFTreeGetFirstChildPtr.asFunction(); + CFStreamPropertyKey get kCFStreamPropertyAppendToFile => + _kCFStreamPropertyAppendToFile.value; - void CFTreeGetContext( - CFTreeRef tree, - ffi.Pointer context, - ) { - return _CFTreeGetContext( - tree, - context, - ); - } + set kCFStreamPropertyAppendToFile(CFStreamPropertyKey value) => + _kCFStreamPropertyAppendToFile.value = value; - late final _CFTreeGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFTreeRef, ffi.Pointer)>>('CFTreeGetContext'); - late final _CFTreeGetContext = _CFTreeGetContextPtr.asFunction< - void Function(CFTreeRef, ffi.Pointer)>(); + late final ffi.Pointer + _kCFStreamPropertyFileCurrentOffset = + _lookup('kCFStreamPropertyFileCurrentOffset'); - int CFTreeGetChildCount( - CFTreeRef tree, - ) { - return _CFTreeGetChildCount( - tree, - ); - } + CFStreamPropertyKey get kCFStreamPropertyFileCurrentOffset => + _kCFStreamPropertyFileCurrentOffset.value; - late final _CFTreeGetChildCountPtr = - _lookup>( - 'CFTreeGetChildCount'); - late final _CFTreeGetChildCount = - _CFTreeGetChildCountPtr.asFunction(); + set kCFStreamPropertyFileCurrentOffset(CFStreamPropertyKey value) => + _kCFStreamPropertyFileCurrentOffset.value = value; - CFTreeRef CFTreeGetChildAtIndex( - CFTreeRef tree, - int idx, - ) { - return _CFTreeGetChildAtIndex( - tree, - idx, - ); - } + late final ffi.Pointer + _kCFStreamPropertySocketNativeHandle = + _lookup('kCFStreamPropertySocketNativeHandle'); - late final _CFTreeGetChildAtIndexPtr = - _lookup>( - 'CFTreeGetChildAtIndex'); - late final _CFTreeGetChildAtIndex = _CFTreeGetChildAtIndexPtr.asFunction< - CFTreeRef Function(CFTreeRef, int)>(); + CFStreamPropertyKey get kCFStreamPropertySocketNativeHandle => + _kCFStreamPropertySocketNativeHandle.value; - void CFTreeGetChildren( - CFTreeRef tree, - ffi.Pointer children, - ) { - return _CFTreeGetChildren( - tree, - children, - ); - } + set kCFStreamPropertySocketNativeHandle(CFStreamPropertyKey value) => + _kCFStreamPropertySocketNativeHandle.value = value; - late final _CFTreeGetChildrenPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFTreeRef, ffi.Pointer)>>('CFTreeGetChildren'); - late final _CFTreeGetChildren = _CFTreeGetChildrenPtr.asFunction< - void Function(CFTreeRef, ffi.Pointer)>(); + late final ffi.Pointer + _kCFStreamPropertySocketRemoteHostName = + _lookup('kCFStreamPropertySocketRemoteHostName'); - void CFTreeApplyFunctionToChildren( - CFTreeRef tree, - CFTreeApplierFunction applier, - ffi.Pointer context, - ) { - return _CFTreeApplyFunctionToChildren( - tree, - applier, - context, - ); - } + CFStreamPropertyKey get kCFStreamPropertySocketRemoteHostName => + _kCFStreamPropertySocketRemoteHostName.value; - late final _CFTreeApplyFunctionToChildrenPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFTreeRef, CFTreeApplierFunction, - ffi.Pointer)>>('CFTreeApplyFunctionToChildren'); - late final _CFTreeApplyFunctionToChildren = - _CFTreeApplyFunctionToChildrenPtr.asFunction< - void Function( - CFTreeRef, CFTreeApplierFunction, ffi.Pointer)>(); + set kCFStreamPropertySocketRemoteHostName(CFStreamPropertyKey value) => + _kCFStreamPropertySocketRemoteHostName.value = value; - CFTreeRef CFTreeFindRoot( - CFTreeRef tree, - ) { - return _CFTreeFindRoot( - tree, - ); - } + late final ffi.Pointer + _kCFStreamPropertySocketRemotePortNumber = + _lookup('kCFStreamPropertySocketRemotePortNumber'); - late final _CFTreeFindRootPtr = - _lookup>( - 'CFTreeFindRoot'); - late final _CFTreeFindRoot = - _CFTreeFindRootPtr.asFunction(); + CFStreamPropertyKey get kCFStreamPropertySocketRemotePortNumber => + _kCFStreamPropertySocketRemotePortNumber.value; - void CFTreeSetContext( - CFTreeRef tree, - ffi.Pointer context, - ) { - return _CFTreeSetContext( - tree, - context, - ); - } + set kCFStreamPropertySocketRemotePortNumber(CFStreamPropertyKey value) => + _kCFStreamPropertySocketRemotePortNumber.value = value; - late final _CFTreeSetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFTreeRef, ffi.Pointer)>>('CFTreeSetContext'); - late final _CFTreeSetContext = _CFTreeSetContextPtr.asFunction< - void Function(CFTreeRef, ffi.Pointer)>(); + late final ffi.Pointer _kCFStreamErrorDomainSOCKS = + _lookup('kCFStreamErrorDomainSOCKS'); - void CFTreePrependChild( - CFTreeRef tree, - CFTreeRef newChild, - ) { - return _CFTreePrependChild( - tree, - newChild, - ); - } + int get kCFStreamErrorDomainSOCKS => _kCFStreamErrorDomainSOCKS.value; - late final _CFTreePrependChildPtr = - _lookup>( - 'CFTreePrependChild'); - late final _CFTreePrependChild = - _CFTreePrependChildPtr.asFunction(); + set kCFStreamErrorDomainSOCKS(int value) => + _kCFStreamErrorDomainSOCKS.value = value; - void CFTreeAppendChild( - CFTreeRef tree, - CFTreeRef newChild, - ) { - return _CFTreeAppendChild( - tree, - newChild, - ); - } + late final ffi.Pointer _kCFStreamPropertySOCKSProxy = + _lookup('kCFStreamPropertySOCKSProxy'); - late final _CFTreeAppendChildPtr = - _lookup>( - 'CFTreeAppendChild'); - late final _CFTreeAppendChild = - _CFTreeAppendChildPtr.asFunction(); + CFStringRef get kCFStreamPropertySOCKSProxy => + _kCFStreamPropertySOCKSProxy.value; - void CFTreeInsertSibling( - CFTreeRef tree, - CFTreeRef newSibling, - ) { - return _CFTreeInsertSibling( - tree, - newSibling, - ); - } + set kCFStreamPropertySOCKSProxy(CFStringRef value) => + _kCFStreamPropertySOCKSProxy.value = value; - late final _CFTreeInsertSiblingPtr = - _lookup>( - 'CFTreeInsertSibling'); - late final _CFTreeInsertSibling = - _CFTreeInsertSiblingPtr.asFunction(); + late final ffi.Pointer _kCFStreamPropertySOCKSProxyHost = + _lookup('kCFStreamPropertySOCKSProxyHost'); - void CFTreeRemove( - CFTreeRef tree, - ) { - return _CFTreeRemove( - tree, - ); - } + CFStringRef get kCFStreamPropertySOCKSProxyHost => + _kCFStreamPropertySOCKSProxyHost.value; - late final _CFTreeRemovePtr = - _lookup>('CFTreeRemove'); - late final _CFTreeRemove = - _CFTreeRemovePtr.asFunction(); + set kCFStreamPropertySOCKSProxyHost(CFStringRef value) => + _kCFStreamPropertySOCKSProxyHost.value = value; - void CFTreeRemoveAllChildren( - CFTreeRef tree, - ) { - return _CFTreeRemoveAllChildren( - tree, - ); - } + late final ffi.Pointer _kCFStreamPropertySOCKSProxyPort = + _lookup('kCFStreamPropertySOCKSProxyPort'); - late final _CFTreeRemoveAllChildrenPtr = - _lookup>( - 'CFTreeRemoveAllChildren'); - late final _CFTreeRemoveAllChildren = - _CFTreeRemoveAllChildrenPtr.asFunction(); + CFStringRef get kCFStreamPropertySOCKSProxyPort => + _kCFStreamPropertySOCKSProxyPort.value; - void CFTreeSortChildren( - CFTreeRef tree, - CFComparatorFunction comparator, - ffi.Pointer context, - ) { - return _CFTreeSortChildren( - tree, - comparator, - context, - ); - } + set kCFStreamPropertySOCKSProxyPort(CFStringRef value) => + _kCFStreamPropertySOCKSProxyPort.value = value; - late final _CFTreeSortChildrenPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFTreeRef, CFComparatorFunction, - ffi.Pointer)>>('CFTreeSortChildren'); - late final _CFTreeSortChildren = _CFTreeSortChildrenPtr.asFunction< - void Function(CFTreeRef, CFComparatorFunction, ffi.Pointer)>(); + late final ffi.Pointer _kCFStreamPropertySOCKSVersion = + _lookup('kCFStreamPropertySOCKSVersion'); - int CFURLCreateDataAndPropertiesFromResource( - CFAllocatorRef alloc, - CFURLRef url, - ffi.Pointer resourceData, - ffi.Pointer properties, - CFArrayRef desiredProperties, - ffi.Pointer errorCode, - ) { - return _CFURLCreateDataAndPropertiesFromResource( - alloc, - url, - resourceData, - properties, - desiredProperties, - errorCode, - ); - } + CFStringRef get kCFStreamPropertySOCKSVersion => + _kCFStreamPropertySOCKSVersion.value; - late final _CFURLCreateDataAndPropertiesFromResourcePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFAllocatorRef, - CFURLRef, - ffi.Pointer, - ffi.Pointer, - CFArrayRef, - ffi.Pointer)>>( - 'CFURLCreateDataAndPropertiesFromResource'); - late final _CFURLCreateDataAndPropertiesFromResource = - _CFURLCreateDataAndPropertiesFromResourcePtr.asFunction< - int Function(CFAllocatorRef, CFURLRef, ffi.Pointer, - ffi.Pointer, CFArrayRef, ffi.Pointer)>(); + set kCFStreamPropertySOCKSVersion(CFStringRef value) => + _kCFStreamPropertySOCKSVersion.value = value; - int CFURLWriteDataAndPropertiesToResource( - CFURLRef url, - CFDataRef dataToWrite, - CFDictionaryRef propertiesToWrite, - ffi.Pointer errorCode, - ) { - return _CFURLWriteDataAndPropertiesToResource( - url, - dataToWrite, - propertiesToWrite, - errorCode, - ); - } + late final ffi.Pointer _kCFStreamSocketSOCKSVersion4 = + _lookup('kCFStreamSocketSOCKSVersion4'); - late final _CFURLWriteDataAndPropertiesToResourcePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, CFDataRef, CFDictionaryRef, - ffi.Pointer)>>('CFURLWriteDataAndPropertiesToResource'); - late final _CFURLWriteDataAndPropertiesToResource = - _CFURLWriteDataAndPropertiesToResourcePtr.asFunction< - int Function( - CFURLRef, CFDataRef, CFDictionaryRef, ffi.Pointer)>(); + CFStringRef get kCFStreamSocketSOCKSVersion4 => + _kCFStreamSocketSOCKSVersion4.value; - int CFURLDestroyResource( - CFURLRef url, - ffi.Pointer errorCode, - ) { - return _CFURLDestroyResource( - url, - errorCode, - ); - } + set kCFStreamSocketSOCKSVersion4(CFStringRef value) => + _kCFStreamSocketSOCKSVersion4.value = value; - late final _CFURLDestroyResourcePtr = _lookup< - ffi.NativeFunction)>>( - 'CFURLDestroyResource'); - late final _CFURLDestroyResource = _CFURLDestroyResourcePtr.asFunction< - int Function(CFURLRef, ffi.Pointer)>(); + late final ffi.Pointer _kCFStreamSocketSOCKSVersion5 = + _lookup('kCFStreamSocketSOCKSVersion5'); - CFTypeRef CFURLCreatePropertyFromResource( - CFAllocatorRef alloc, - CFURLRef url, - CFStringRef property, - ffi.Pointer errorCode, - ) { - return _CFURLCreatePropertyFromResource( - alloc, - url, - property, - errorCode, - ); - } + CFStringRef get kCFStreamSocketSOCKSVersion5 => + _kCFStreamSocketSOCKSVersion5.value; - late final _CFURLCreatePropertyFromResourcePtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFAllocatorRef, CFURLRef, CFStringRef, - ffi.Pointer)>>('CFURLCreatePropertyFromResource'); - late final _CFURLCreatePropertyFromResource = - _CFURLCreatePropertyFromResourcePtr.asFunction< - CFTypeRef Function( - CFAllocatorRef, CFURLRef, CFStringRef, ffi.Pointer)>(); + set kCFStreamSocketSOCKSVersion5(CFStringRef value) => + _kCFStreamSocketSOCKSVersion5.value = value; - late final ffi.Pointer _kCFURLFileExists = - _lookup('kCFURLFileExists'); + late final ffi.Pointer _kCFStreamPropertySOCKSUser = + _lookup('kCFStreamPropertySOCKSUser'); - CFStringRef get kCFURLFileExists => _kCFURLFileExists.value; + CFStringRef get kCFStreamPropertySOCKSUser => + _kCFStreamPropertySOCKSUser.value; - set kCFURLFileExists(CFStringRef value) => _kCFURLFileExists.value = value; + set kCFStreamPropertySOCKSUser(CFStringRef value) => + _kCFStreamPropertySOCKSUser.value = value; - late final ffi.Pointer _kCFURLFileDirectoryContents = - _lookup('kCFURLFileDirectoryContents'); + late final ffi.Pointer _kCFStreamPropertySOCKSPassword = + _lookup('kCFStreamPropertySOCKSPassword'); - CFStringRef get kCFURLFileDirectoryContents => - _kCFURLFileDirectoryContents.value; + CFStringRef get kCFStreamPropertySOCKSPassword => + _kCFStreamPropertySOCKSPassword.value; - set kCFURLFileDirectoryContents(CFStringRef value) => - _kCFURLFileDirectoryContents.value = value; + set kCFStreamPropertySOCKSPassword(CFStringRef value) => + _kCFStreamPropertySOCKSPassword.value = value; - late final ffi.Pointer _kCFURLFileLength = - _lookup('kCFURLFileLength'); + late final ffi.Pointer _kCFStreamErrorDomainSSL = + _lookup('kCFStreamErrorDomainSSL'); - CFStringRef get kCFURLFileLength => _kCFURLFileLength.value; + int get kCFStreamErrorDomainSSL => _kCFStreamErrorDomainSSL.value; - set kCFURLFileLength(CFStringRef value) => _kCFURLFileLength.value = value; + set kCFStreamErrorDomainSSL(int value) => + _kCFStreamErrorDomainSSL.value = value; - late final ffi.Pointer _kCFURLFileLastModificationTime = - _lookup('kCFURLFileLastModificationTime'); + late final ffi.Pointer _kCFStreamPropertySocketSecurityLevel = + _lookup('kCFStreamPropertySocketSecurityLevel'); - CFStringRef get kCFURLFileLastModificationTime => - _kCFURLFileLastModificationTime.value; + CFStringRef get kCFStreamPropertySocketSecurityLevel => + _kCFStreamPropertySocketSecurityLevel.value; - set kCFURLFileLastModificationTime(CFStringRef value) => - _kCFURLFileLastModificationTime.value = value; + set kCFStreamPropertySocketSecurityLevel(CFStringRef value) => + _kCFStreamPropertySocketSecurityLevel.value = value; - late final ffi.Pointer _kCFURLFilePOSIXMode = - _lookup('kCFURLFilePOSIXMode'); + late final ffi.Pointer _kCFStreamSocketSecurityLevelNone = + _lookup('kCFStreamSocketSecurityLevelNone'); - CFStringRef get kCFURLFilePOSIXMode => _kCFURLFilePOSIXMode.value; + CFStringRef get kCFStreamSocketSecurityLevelNone => + _kCFStreamSocketSecurityLevelNone.value; - set kCFURLFilePOSIXMode(CFStringRef value) => - _kCFURLFilePOSIXMode.value = value; + set kCFStreamSocketSecurityLevelNone(CFStringRef value) => + _kCFStreamSocketSecurityLevelNone.value = value; - late final ffi.Pointer _kCFURLFileOwnerID = - _lookup('kCFURLFileOwnerID'); + late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv2 = + _lookup('kCFStreamSocketSecurityLevelSSLv2'); - CFStringRef get kCFURLFileOwnerID => _kCFURLFileOwnerID.value; + CFStringRef get kCFStreamSocketSecurityLevelSSLv2 => + _kCFStreamSocketSecurityLevelSSLv2.value; - set kCFURLFileOwnerID(CFStringRef value) => _kCFURLFileOwnerID.value = value; + set kCFStreamSocketSecurityLevelSSLv2(CFStringRef value) => + _kCFStreamSocketSecurityLevelSSLv2.value = value; - late final ffi.Pointer _kCFURLHTTPStatusCode = - _lookup('kCFURLHTTPStatusCode'); + late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv3 = + _lookup('kCFStreamSocketSecurityLevelSSLv3'); - CFStringRef get kCFURLHTTPStatusCode => _kCFURLHTTPStatusCode.value; + CFStringRef get kCFStreamSocketSecurityLevelSSLv3 => + _kCFStreamSocketSecurityLevelSSLv3.value; - set kCFURLHTTPStatusCode(CFStringRef value) => - _kCFURLHTTPStatusCode.value = value; + set kCFStreamSocketSecurityLevelSSLv3(CFStringRef value) => + _kCFStreamSocketSecurityLevelSSLv3.value = value; - late final ffi.Pointer _kCFURLHTTPStatusLine = - _lookup('kCFURLHTTPStatusLine'); + late final ffi.Pointer _kCFStreamSocketSecurityLevelTLSv1 = + _lookup('kCFStreamSocketSecurityLevelTLSv1'); - CFStringRef get kCFURLHTTPStatusLine => _kCFURLHTTPStatusLine.value; + CFStringRef get kCFStreamSocketSecurityLevelTLSv1 => + _kCFStreamSocketSecurityLevelTLSv1.value; - set kCFURLHTTPStatusLine(CFStringRef value) => - _kCFURLHTTPStatusLine.value = value; + set kCFStreamSocketSecurityLevelTLSv1(CFStringRef value) => + _kCFStreamSocketSecurityLevelTLSv1.value = value; - int CFUUIDGetTypeID() { - return _CFUUIDGetTypeID(); - } + late final ffi.Pointer + _kCFStreamSocketSecurityLevelNegotiatedSSL = + _lookup('kCFStreamSocketSecurityLevelNegotiatedSSL'); - late final _CFUUIDGetTypeIDPtr = - _lookup>('CFUUIDGetTypeID'); - late final _CFUUIDGetTypeID = - _CFUUIDGetTypeIDPtr.asFunction(); + CFStringRef get kCFStreamSocketSecurityLevelNegotiatedSSL => + _kCFStreamSocketSecurityLevelNegotiatedSSL.value; - CFUUIDRef CFUUIDCreate( - CFAllocatorRef alloc, - ) { - return _CFUUIDCreate( - alloc, - ); - } + set kCFStreamSocketSecurityLevelNegotiatedSSL(CFStringRef value) => + _kCFStreamSocketSecurityLevelNegotiatedSSL.value = value; - late final _CFUUIDCreatePtr = - _lookup>( - 'CFUUIDCreate'); - late final _CFUUIDCreate = - _CFUUIDCreatePtr.asFunction(); + late final ffi.Pointer + _kCFStreamPropertyShouldCloseNativeSocket = + _lookup('kCFStreamPropertyShouldCloseNativeSocket'); - CFUUIDRef CFUUIDCreateWithBytes( + CFStringRef get kCFStreamPropertyShouldCloseNativeSocket => + _kCFStreamPropertyShouldCloseNativeSocket.value; + + set kCFStreamPropertyShouldCloseNativeSocket(CFStringRef value) => + _kCFStreamPropertyShouldCloseNativeSocket.value = value; + + void CFStreamCreatePairWithSocket( CFAllocatorRef alloc, - int byte0, - int byte1, - int byte2, - int byte3, - int byte4, - int byte5, - int byte6, - int byte7, - int byte8, - int byte9, - int byte10, - int byte11, - int byte12, - int byte13, - int byte14, - int byte15, + int sock, + ffi.Pointer readStream, + ffi.Pointer writeStream, ) { - return _CFUUIDCreateWithBytes( + return _CFStreamCreatePairWithSocket( alloc, - byte0, - byte1, - byte2, - byte3, - byte4, - byte5, - byte6, - byte7, - byte8, - byte9, - byte10, - byte11, - byte12, - byte13, - byte14, - byte15, + sock, + readStream, + writeStream, ); } - late final _CFUUIDCreateWithBytesPtr = _lookup< + late final _CFStreamCreatePairWithSocketPtr = _lookup< ffi.NativeFunction< - CFUUIDRef Function( + ffi.Void Function( CFAllocatorRef, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8)>>('CFUUIDCreateWithBytes'); - late final _CFUUIDCreateWithBytes = _CFUUIDCreateWithBytesPtr.asFunction< - CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int)>(); + CFSocketNativeHandle, + ffi.Pointer, + ffi.Pointer)>>('CFStreamCreatePairWithSocket'); + late final _CFStreamCreatePairWithSocket = + _CFStreamCreatePairWithSocketPtr.asFunction< + void Function(CFAllocatorRef, int, ffi.Pointer, + ffi.Pointer)>(); - CFUUIDRef CFUUIDCreateFromString( + void CFStreamCreatePairWithSocketToHost( CFAllocatorRef alloc, - CFStringRef uuidStr, + CFStringRef host, + int port, + ffi.Pointer readStream, + ffi.Pointer writeStream, ) { - return _CFUUIDCreateFromString( + return _CFStreamCreatePairWithSocketToHost( alloc, - uuidStr, + host, + port, + readStream, + writeStream, ); } - late final _CFUUIDCreateFromStringPtr = _lookup< - ffi.NativeFunction>( - 'CFUUIDCreateFromString'); - late final _CFUUIDCreateFromString = _CFUUIDCreateFromStringPtr.asFunction< - CFUUIDRef Function(CFAllocatorRef, CFStringRef)>(); + late final _CFStreamCreatePairWithSocketToHostPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef, + CFStringRef, + UInt32, + ffi.Pointer, + ffi.Pointer)>>( + 'CFStreamCreatePairWithSocketToHost'); + late final _CFStreamCreatePairWithSocketToHost = + _CFStreamCreatePairWithSocketToHostPtr.asFunction< + void Function(CFAllocatorRef, CFStringRef, int, + ffi.Pointer, ffi.Pointer)>(); - CFStringRef CFUUIDCreateString( + void CFStreamCreatePairWithPeerSocketSignature( CFAllocatorRef alloc, - CFUUIDRef uuid, + ffi.Pointer signature, + ffi.Pointer readStream, + ffi.Pointer writeStream, ) { - return _CFUUIDCreateString( + return _CFStreamCreatePairWithPeerSocketSignature( alloc, - uuid, + signature, + readStream, + writeStream, ); } - late final _CFUUIDCreateStringPtr = _lookup< - ffi.NativeFunction>( - 'CFUUIDCreateString'); - late final _CFUUIDCreateString = _CFUUIDCreateStringPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFUUIDRef)>(); + late final _CFStreamCreatePairWithPeerSocketSignaturePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'CFStreamCreatePairWithPeerSocketSignature'); + late final _CFStreamCreatePairWithPeerSocketSignature = + _CFStreamCreatePairWithPeerSocketSignaturePtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - CFUUIDRef CFUUIDGetConstantUUIDWithBytes( - CFAllocatorRef alloc, - int byte0, - int byte1, - int byte2, - int byte3, - int byte4, - int byte5, - int byte6, - int byte7, - int byte8, - int byte9, - int byte10, - int byte11, - int byte12, - int byte13, - int byte14, - int byte15, + int CFReadStreamGetStatus( + CFReadStreamRef stream, ) { - return _CFUUIDGetConstantUUIDWithBytes( - alloc, - byte0, - byte1, - byte2, - byte3, - byte4, - byte5, - byte6, - byte7, - byte8, - byte9, - byte10, - byte11, - byte12, - byte13, - byte14, - byte15, + return _CFReadStreamGetStatus( + stream, ); } - late final _CFUUIDGetConstantUUIDWithBytesPtr = _lookup< - ffi.NativeFunction< - CFUUIDRef Function( - CFAllocatorRef, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8)>>('CFUUIDGetConstantUUIDWithBytes'); - late final _CFUUIDGetConstantUUIDWithBytes = - _CFUUIDGetConstantUUIDWithBytesPtr.asFunction< - CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int)>(); + late final _CFReadStreamGetStatusPtr = + _lookup>( + 'CFReadStreamGetStatus'); + late final _CFReadStreamGetStatus = + _CFReadStreamGetStatusPtr.asFunction(); - CFUUIDBytes CFUUIDGetUUIDBytes( - CFUUIDRef uuid, + int CFWriteStreamGetStatus( + CFWriteStreamRef stream, ) { - return _CFUUIDGetUUIDBytes( - uuid, + return _CFWriteStreamGetStatus( + stream, ); } - late final _CFUUIDGetUUIDBytesPtr = - _lookup>( - 'CFUUIDGetUUIDBytes'); - late final _CFUUIDGetUUIDBytes = - _CFUUIDGetUUIDBytesPtr.asFunction(); + late final _CFWriteStreamGetStatusPtr = + _lookup>( + 'CFWriteStreamGetStatus'); + late final _CFWriteStreamGetStatus = + _CFWriteStreamGetStatusPtr.asFunction(); - CFUUIDRef CFUUIDCreateFromUUIDBytes( - CFAllocatorRef alloc, - CFUUIDBytes bytes, + CFErrorRef CFReadStreamCopyError( + CFReadStreamRef stream, ) { - return _CFUUIDCreateFromUUIDBytes( - alloc, - bytes, + return _CFReadStreamCopyError( + stream, ); } - late final _CFUUIDCreateFromUUIDBytesPtr = _lookup< - ffi.NativeFunction>( - 'CFUUIDCreateFromUUIDBytes'); - late final _CFUUIDCreateFromUUIDBytes = _CFUUIDCreateFromUUIDBytesPtr - .asFunction(); + late final _CFReadStreamCopyErrorPtr = + _lookup>( + 'CFReadStreamCopyError'); + late final _CFReadStreamCopyError = _CFReadStreamCopyErrorPtr.asFunction< + CFErrorRef Function(CFReadStreamRef)>(); - CFURLRef CFCopyHomeDirectoryURL() { - return _CFCopyHomeDirectoryURL(); + CFErrorRef CFWriteStreamCopyError( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamCopyError( + stream, + ); } - late final _CFCopyHomeDirectoryURLPtr = - _lookup>( - 'CFCopyHomeDirectoryURL'); - late final _CFCopyHomeDirectoryURL = - _CFCopyHomeDirectoryURLPtr.asFunction(); - - late final ffi.Pointer _kCFBundleInfoDictionaryVersionKey = - _lookup('kCFBundleInfoDictionaryVersionKey'); - - CFStringRef get kCFBundleInfoDictionaryVersionKey => - _kCFBundleInfoDictionaryVersionKey.value; - - set kCFBundleInfoDictionaryVersionKey(CFStringRef value) => - _kCFBundleInfoDictionaryVersionKey.value = value; + late final _CFWriteStreamCopyErrorPtr = + _lookup>( + 'CFWriteStreamCopyError'); + late final _CFWriteStreamCopyError = _CFWriteStreamCopyErrorPtr.asFunction< + CFErrorRef Function(CFWriteStreamRef)>(); - late final ffi.Pointer _kCFBundleExecutableKey = - _lookup('kCFBundleExecutableKey'); + int CFReadStreamOpen( + CFReadStreamRef stream, + ) { + return _CFReadStreamOpen( + stream, + ); + } - CFStringRef get kCFBundleExecutableKey => _kCFBundleExecutableKey.value; + late final _CFReadStreamOpenPtr = + _lookup>( + 'CFReadStreamOpen'); + late final _CFReadStreamOpen = + _CFReadStreamOpenPtr.asFunction(); - set kCFBundleExecutableKey(CFStringRef value) => - _kCFBundleExecutableKey.value = value; + int CFWriteStreamOpen( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamOpen( + stream, + ); + } - late final ffi.Pointer _kCFBundleIdentifierKey = - _lookup('kCFBundleIdentifierKey'); + late final _CFWriteStreamOpenPtr = + _lookup>( + 'CFWriteStreamOpen'); + late final _CFWriteStreamOpen = + _CFWriteStreamOpenPtr.asFunction(); - CFStringRef get kCFBundleIdentifierKey => _kCFBundleIdentifierKey.value; + void CFReadStreamClose( + CFReadStreamRef stream, + ) { + return _CFReadStreamClose( + stream, + ); + } - set kCFBundleIdentifierKey(CFStringRef value) => - _kCFBundleIdentifierKey.value = value; + late final _CFReadStreamClosePtr = + _lookup>( + 'CFReadStreamClose'); + late final _CFReadStreamClose = + _CFReadStreamClosePtr.asFunction(); - late final ffi.Pointer _kCFBundleVersionKey = - _lookup('kCFBundleVersionKey'); + void CFWriteStreamClose( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamClose( + stream, + ); + } - CFStringRef get kCFBundleVersionKey => _kCFBundleVersionKey.value; + late final _CFWriteStreamClosePtr = + _lookup>( + 'CFWriteStreamClose'); + late final _CFWriteStreamClose = + _CFWriteStreamClosePtr.asFunction(); - set kCFBundleVersionKey(CFStringRef value) => - _kCFBundleVersionKey.value = value; + int CFReadStreamHasBytesAvailable( + CFReadStreamRef stream, + ) { + return _CFReadStreamHasBytesAvailable( + stream, + ); + } - late final ffi.Pointer _kCFBundleDevelopmentRegionKey = - _lookup('kCFBundleDevelopmentRegionKey'); + late final _CFReadStreamHasBytesAvailablePtr = + _lookup>( + 'CFReadStreamHasBytesAvailable'); + late final _CFReadStreamHasBytesAvailable = _CFReadStreamHasBytesAvailablePtr + .asFunction(); - CFStringRef get kCFBundleDevelopmentRegionKey => - _kCFBundleDevelopmentRegionKey.value; + int CFReadStreamRead( + CFReadStreamRef stream, + ffi.Pointer buffer, + int bufferLength, + ) { + return _CFReadStreamRead( + stream, + buffer, + bufferLength, + ); + } - set kCFBundleDevelopmentRegionKey(CFStringRef value) => - _kCFBundleDevelopmentRegionKey.value = value; + late final _CFReadStreamReadPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFReadStreamRef, ffi.Pointer, + CFIndex)>>('CFReadStreamRead'); + late final _CFReadStreamRead = _CFReadStreamReadPtr.asFunction< + int Function(CFReadStreamRef, ffi.Pointer, int)>(); - late final ffi.Pointer _kCFBundleNameKey = - _lookup('kCFBundleNameKey'); - - CFStringRef get kCFBundleNameKey => _kCFBundleNameKey.value; - - set kCFBundleNameKey(CFStringRef value) => _kCFBundleNameKey.value = value; - - late final ffi.Pointer _kCFBundleLocalizationsKey = - _lookup('kCFBundleLocalizationsKey'); - - CFStringRef get kCFBundleLocalizationsKey => _kCFBundleLocalizationsKey.value; - - set kCFBundleLocalizationsKey(CFStringRef value) => - _kCFBundleLocalizationsKey.value = value; - - CFBundleRef CFBundleGetMainBundle() { - return _CFBundleGetMainBundle(); - } - - late final _CFBundleGetMainBundlePtr = - _lookup>( - 'CFBundleGetMainBundle'); - late final _CFBundleGetMainBundle = - _CFBundleGetMainBundlePtr.asFunction(); - - CFBundleRef CFBundleGetBundleWithIdentifier( - CFStringRef bundleID, + ffi.Pointer CFReadStreamGetBuffer( + CFReadStreamRef stream, + int maxBytesToRead, + ffi.Pointer numBytesRead, ) { - return _CFBundleGetBundleWithIdentifier( - bundleID, + return _CFReadStreamGetBuffer( + stream, + maxBytesToRead, + numBytesRead, ); } - late final _CFBundleGetBundleWithIdentifierPtr = - _lookup>( - 'CFBundleGetBundleWithIdentifier'); - late final _CFBundleGetBundleWithIdentifier = - _CFBundleGetBundleWithIdentifierPtr.asFunction< - CFBundleRef Function(CFStringRef)>(); + late final _CFReadStreamGetBufferPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(CFReadStreamRef, CFIndex, + ffi.Pointer)>>('CFReadStreamGetBuffer'); + late final _CFReadStreamGetBuffer = _CFReadStreamGetBufferPtr.asFunction< + ffi.Pointer Function( + CFReadStreamRef, int, ffi.Pointer)>(); - CFArrayRef CFBundleGetAllBundles() { - return _CFBundleGetAllBundles(); + int CFWriteStreamCanAcceptBytes( + CFWriteStreamRef stream, + ) { + return _CFWriteStreamCanAcceptBytes( + stream, + ); } - late final _CFBundleGetAllBundlesPtr = - _lookup>( - 'CFBundleGetAllBundles'); - late final _CFBundleGetAllBundles = - _CFBundleGetAllBundlesPtr.asFunction(); + late final _CFWriteStreamCanAcceptBytesPtr = + _lookup>( + 'CFWriteStreamCanAcceptBytes'); + late final _CFWriteStreamCanAcceptBytes = _CFWriteStreamCanAcceptBytesPtr + .asFunction(); - int CFBundleGetTypeID() { - return _CFBundleGetTypeID(); + int CFWriteStreamWrite( + CFWriteStreamRef stream, + ffi.Pointer buffer, + int bufferLength, + ) { + return _CFWriteStreamWrite( + stream, + buffer, + bufferLength, + ); } - late final _CFBundleGetTypeIDPtr = - _lookup>('CFBundleGetTypeID'); - late final _CFBundleGetTypeID = - _CFBundleGetTypeIDPtr.asFunction(); + late final _CFWriteStreamWritePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFWriteStreamRef, ffi.Pointer, + CFIndex)>>('CFWriteStreamWrite'); + late final _CFWriteStreamWrite = _CFWriteStreamWritePtr.asFunction< + int Function(CFWriteStreamRef, ffi.Pointer, int)>(); - CFBundleRef CFBundleCreate( - CFAllocatorRef allocator, - CFURLRef bundleURL, + CFTypeRef CFReadStreamCopyProperty( + CFReadStreamRef stream, + CFStreamPropertyKey propertyName, ) { - return _CFBundleCreate( - allocator, - bundleURL, + return _CFReadStreamCopyProperty( + stream, + propertyName, ); } - late final _CFBundleCreatePtr = _lookup< - ffi.NativeFunction>( - 'CFBundleCreate'); - late final _CFBundleCreate = _CFBundleCreatePtr.asFunction< - CFBundleRef Function(CFAllocatorRef, CFURLRef)>(); + late final _CFReadStreamCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFReadStreamRef, + CFStreamPropertyKey)>>('CFReadStreamCopyProperty'); + late final _CFReadStreamCopyProperty = _CFReadStreamCopyPropertyPtr + .asFunction(); - CFArrayRef CFBundleCreateBundlesFromDirectory( - CFAllocatorRef allocator, - CFURLRef directoryURL, - CFStringRef bundleType, + CFTypeRef CFWriteStreamCopyProperty( + CFWriteStreamRef stream, + CFStreamPropertyKey propertyName, ) { - return _CFBundleCreateBundlesFromDirectory( - allocator, - directoryURL, - bundleType, + return _CFWriteStreamCopyProperty( + stream, + propertyName, ); } - late final _CFBundleCreateBundlesFromDirectoryPtr = _lookup< + late final _CFWriteStreamCopyPropertyPtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFAllocatorRef, CFURLRef, - CFStringRef)>>('CFBundleCreateBundlesFromDirectory'); - late final _CFBundleCreateBundlesFromDirectory = - _CFBundleCreateBundlesFromDirectoryPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); + CFTypeRef Function(CFWriteStreamRef, + CFStreamPropertyKey)>>('CFWriteStreamCopyProperty'); + late final _CFWriteStreamCopyProperty = _CFWriteStreamCopyPropertyPtr + .asFunction(); - CFURLRef CFBundleCopyBundleURL( - CFBundleRef bundle, + int CFReadStreamSetProperty( + CFReadStreamRef stream, + CFStreamPropertyKey propertyName, + CFTypeRef propertyValue, ) { - return _CFBundleCopyBundleURL( - bundle, + return _CFReadStreamSetProperty( + stream, + propertyName, + propertyValue, ); } - late final _CFBundleCopyBundleURLPtr = - _lookup>( - 'CFBundleCopyBundleURL'); - late final _CFBundleCopyBundleURL = - _CFBundleCopyBundleURLPtr.asFunction(); + late final _CFReadStreamSetPropertyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFReadStreamRef, CFStreamPropertyKey, + CFTypeRef)>>('CFReadStreamSetProperty'); + late final _CFReadStreamSetProperty = _CFReadStreamSetPropertyPtr.asFunction< + int Function(CFReadStreamRef, CFStreamPropertyKey, CFTypeRef)>(); - CFTypeRef CFBundleGetValueForInfoDictionaryKey( - CFBundleRef bundle, - CFStringRef key, + int CFWriteStreamSetProperty( + CFWriteStreamRef stream, + CFStreamPropertyKey propertyName, + CFTypeRef propertyValue, ) { - return _CFBundleGetValueForInfoDictionaryKey( - bundle, - key, + return _CFWriteStreamSetProperty( + stream, + propertyName, + propertyValue, ); } - late final _CFBundleGetValueForInfoDictionaryKeyPtr = - _lookup>( - 'CFBundleGetValueForInfoDictionaryKey'); - late final _CFBundleGetValueForInfoDictionaryKey = - _CFBundleGetValueForInfoDictionaryKeyPtr.asFunction< - CFTypeRef Function(CFBundleRef, CFStringRef)>(); + late final _CFWriteStreamSetPropertyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFWriteStreamRef, CFStreamPropertyKey, + CFTypeRef)>>('CFWriteStreamSetProperty'); + late final _CFWriteStreamSetProperty = + _CFWriteStreamSetPropertyPtr.asFunction< + int Function(CFWriteStreamRef, CFStreamPropertyKey, CFTypeRef)>(); - CFDictionaryRef CFBundleGetInfoDictionary( - CFBundleRef bundle, + int CFReadStreamSetClient( + CFReadStreamRef stream, + int streamEvents, + CFReadStreamClientCallBack clientCB, + ffi.Pointer clientContext, ) { - return _CFBundleGetInfoDictionary( - bundle, + return _CFReadStreamSetClient( + stream, + streamEvents, + clientCB, + clientContext, ); } - late final _CFBundleGetInfoDictionaryPtr = - _lookup>( - 'CFBundleGetInfoDictionary'); - late final _CFBundleGetInfoDictionary = _CFBundleGetInfoDictionaryPtr - .asFunction(); + late final _CFReadStreamSetClientPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFReadStreamRef, + CFOptionFlags, + CFReadStreamClientCallBack, + ffi.Pointer)>>('CFReadStreamSetClient'); + late final _CFReadStreamSetClient = _CFReadStreamSetClientPtr.asFunction< + int Function(CFReadStreamRef, int, CFReadStreamClientCallBack, + ffi.Pointer)>(); - CFDictionaryRef CFBundleGetLocalInfoDictionary( - CFBundleRef bundle, + int CFWriteStreamSetClient( + CFWriteStreamRef stream, + int streamEvents, + CFWriteStreamClientCallBack clientCB, + ffi.Pointer clientContext, ) { - return _CFBundleGetLocalInfoDictionary( - bundle, + return _CFWriteStreamSetClient( + stream, + streamEvents, + clientCB, + clientContext, ); } - late final _CFBundleGetLocalInfoDictionaryPtr = - _lookup>( - 'CFBundleGetLocalInfoDictionary'); - late final _CFBundleGetLocalInfoDictionary = - _CFBundleGetLocalInfoDictionaryPtr.asFunction< - CFDictionaryRef Function(CFBundleRef)>(); + late final _CFWriteStreamSetClientPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFWriteStreamRef, + CFOptionFlags, + CFWriteStreamClientCallBack, + ffi.Pointer)>>('CFWriteStreamSetClient'); + late final _CFWriteStreamSetClient = _CFWriteStreamSetClientPtr.asFunction< + int Function(CFWriteStreamRef, int, CFWriteStreamClientCallBack, + ffi.Pointer)>(); - void CFBundleGetPackageInfo( - CFBundleRef bundle, - ffi.Pointer packageType, - ffi.Pointer packageCreator, + void CFReadStreamScheduleWithRunLoop( + CFReadStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, ) { - return _CFBundleGetPackageInfo( - bundle, - packageType, - packageCreator, + return _CFReadStreamScheduleWithRunLoop( + stream, + runLoop, + runLoopMode, ); } - late final _CFBundleGetPackageInfoPtr = _lookup< + late final _CFReadStreamScheduleWithRunLoopPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFBundleRef, ffi.Pointer, - ffi.Pointer)>>('CFBundleGetPackageInfo'); - late final _CFBundleGetPackageInfo = _CFBundleGetPackageInfoPtr.asFunction< - void Function(CFBundleRef, ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(CFReadStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFReadStreamScheduleWithRunLoop'); + late final _CFReadStreamScheduleWithRunLoop = + _CFReadStreamScheduleWithRunLoopPtr.asFunction< + void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - CFStringRef CFBundleGetIdentifier( - CFBundleRef bundle, + void CFWriteStreamScheduleWithRunLoop( + CFWriteStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, ) { - return _CFBundleGetIdentifier( - bundle, + return _CFWriteStreamScheduleWithRunLoop( + stream, + runLoop, + runLoopMode, ); } - late final _CFBundleGetIdentifierPtr = - _lookup>( - 'CFBundleGetIdentifier'); - late final _CFBundleGetIdentifier = - _CFBundleGetIdentifierPtr.asFunction(); + late final _CFWriteStreamScheduleWithRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFWriteStreamScheduleWithRunLoop'); + late final _CFWriteStreamScheduleWithRunLoop = + _CFWriteStreamScheduleWithRunLoopPtr.asFunction< + void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - int CFBundleGetVersionNumber( - CFBundleRef bundle, + void CFReadStreamUnscheduleFromRunLoop( + CFReadStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, ) { - return _CFBundleGetVersionNumber( - bundle, + return _CFReadStreamUnscheduleFromRunLoop( + stream, + runLoop, + runLoopMode, ); } - late final _CFBundleGetVersionNumberPtr = - _lookup>( - 'CFBundleGetVersionNumber'); - late final _CFBundleGetVersionNumber = - _CFBundleGetVersionNumberPtr.asFunction(); + late final _CFReadStreamUnscheduleFromRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFReadStreamUnscheduleFromRunLoop'); + late final _CFReadStreamUnscheduleFromRunLoop = + _CFReadStreamUnscheduleFromRunLoopPtr.asFunction< + void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - CFStringRef CFBundleGetDevelopmentRegion( - CFBundleRef bundle, + void CFWriteStreamUnscheduleFromRunLoop( + CFWriteStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, ) { - return _CFBundleGetDevelopmentRegion( - bundle, + return _CFWriteStreamUnscheduleFromRunLoop( + stream, + runLoop, + runLoopMode, ); } - late final _CFBundleGetDevelopmentRegionPtr = - _lookup>( - 'CFBundleGetDevelopmentRegion'); - late final _CFBundleGetDevelopmentRegion = _CFBundleGetDevelopmentRegionPtr - .asFunction(); + late final _CFWriteStreamUnscheduleFromRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFWriteStreamUnscheduleFromRunLoop'); + late final _CFWriteStreamUnscheduleFromRunLoop = + _CFWriteStreamUnscheduleFromRunLoopPtr.asFunction< + void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - CFURLRef CFBundleCopySupportFilesDirectoryURL( - CFBundleRef bundle, + void CFReadStreamSetDispatchQueue( + CFReadStreamRef stream, + dispatch_queue_t q, ) { - return _CFBundleCopySupportFilesDirectoryURL( - bundle, + return _CFReadStreamSetDispatchQueue( + stream, + q, ); } - late final _CFBundleCopySupportFilesDirectoryURLPtr = - _lookup>( - 'CFBundleCopySupportFilesDirectoryURL'); - late final _CFBundleCopySupportFilesDirectoryURL = - _CFBundleCopySupportFilesDirectoryURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _CFReadStreamSetDispatchQueuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, + dispatch_queue_t)>>('CFReadStreamSetDispatchQueue'); + late final _CFReadStreamSetDispatchQueue = _CFReadStreamSetDispatchQueuePtr + .asFunction(); - CFURLRef CFBundleCopyResourcesDirectoryURL( - CFBundleRef bundle, + void CFWriteStreamSetDispatchQueue( + CFWriteStreamRef stream, + dispatch_queue_t q, ) { - return _CFBundleCopyResourcesDirectoryURL( - bundle, + return _CFWriteStreamSetDispatchQueue( + stream, + q, ); } - late final _CFBundleCopyResourcesDirectoryURLPtr = - _lookup>( - 'CFBundleCopyResourcesDirectoryURL'); - late final _CFBundleCopyResourcesDirectoryURL = - _CFBundleCopyResourcesDirectoryURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _CFWriteStreamSetDispatchQueuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFWriteStreamRef, + dispatch_queue_t)>>('CFWriteStreamSetDispatchQueue'); + late final _CFWriteStreamSetDispatchQueue = _CFWriteStreamSetDispatchQueuePtr + .asFunction(); - CFURLRef CFBundleCopyPrivateFrameworksURL( - CFBundleRef bundle, + dispatch_queue_t CFReadStreamCopyDispatchQueue( + CFReadStreamRef stream, ) { - return _CFBundleCopyPrivateFrameworksURL( - bundle, + return _CFReadStreamCopyDispatchQueue( + stream, ); } - late final _CFBundleCopyPrivateFrameworksURLPtr = - _lookup>( - 'CFBundleCopyPrivateFrameworksURL'); - late final _CFBundleCopyPrivateFrameworksURL = - _CFBundleCopyPrivateFrameworksURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _CFReadStreamCopyDispatchQueuePtr = + _lookup>( + 'CFReadStreamCopyDispatchQueue'); + late final _CFReadStreamCopyDispatchQueue = _CFReadStreamCopyDispatchQueuePtr + .asFunction(); - CFURLRef CFBundleCopySharedFrameworksURL( - CFBundleRef bundle, + dispatch_queue_t CFWriteStreamCopyDispatchQueue( + CFWriteStreamRef stream, ) { - return _CFBundleCopySharedFrameworksURL( - bundle, + return _CFWriteStreamCopyDispatchQueue( + stream, ); } - late final _CFBundleCopySharedFrameworksURLPtr = - _lookup>( - 'CFBundleCopySharedFrameworksURL'); - late final _CFBundleCopySharedFrameworksURL = - _CFBundleCopySharedFrameworksURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _CFWriteStreamCopyDispatchQueuePtr = + _lookup>( + 'CFWriteStreamCopyDispatchQueue'); + late final _CFWriteStreamCopyDispatchQueue = + _CFWriteStreamCopyDispatchQueuePtr.asFunction< + dispatch_queue_t Function(CFWriteStreamRef)>(); - CFURLRef CFBundleCopySharedSupportURL( - CFBundleRef bundle, + CFStreamError CFReadStreamGetError( + CFReadStreamRef stream, ) { - return _CFBundleCopySharedSupportURL( - bundle, + return _CFReadStreamGetError( + stream, ); } - late final _CFBundleCopySharedSupportURLPtr = - _lookup>( - 'CFBundleCopySharedSupportURL'); - late final _CFBundleCopySharedSupportURL = _CFBundleCopySharedSupportURLPtr - .asFunction(); + late final _CFReadStreamGetErrorPtr = + _lookup>( + 'CFReadStreamGetError'); + late final _CFReadStreamGetError = _CFReadStreamGetErrorPtr.asFunction< + CFStreamError Function(CFReadStreamRef)>(); - CFURLRef CFBundleCopyBuiltInPlugInsURL( - CFBundleRef bundle, + CFStreamError CFWriteStreamGetError( + CFWriteStreamRef stream, ) { - return _CFBundleCopyBuiltInPlugInsURL( - bundle, + return _CFWriteStreamGetError( + stream, ); } - late final _CFBundleCopyBuiltInPlugInsURLPtr = - _lookup>( - 'CFBundleCopyBuiltInPlugInsURL'); - late final _CFBundleCopyBuiltInPlugInsURL = _CFBundleCopyBuiltInPlugInsURLPtr - .asFunction(); + late final _CFWriteStreamGetErrorPtr = + _lookup>( + 'CFWriteStreamGetError'); + late final _CFWriteStreamGetError = _CFWriteStreamGetErrorPtr.asFunction< + CFStreamError Function(CFWriteStreamRef)>(); - CFDictionaryRef CFBundleCopyInfoDictionaryInDirectory( - CFURLRef bundleURL, + CFPropertyListRef CFPropertyListCreateFromXMLData( + CFAllocatorRef allocator, + CFDataRef xmlData, + int mutabilityOption, + ffi.Pointer errorString, ) { - return _CFBundleCopyInfoDictionaryInDirectory( - bundleURL, + return _CFPropertyListCreateFromXMLData( + allocator, + xmlData, + mutabilityOption, + errorString, ); } - late final _CFBundleCopyInfoDictionaryInDirectoryPtr = - _lookup>( - 'CFBundleCopyInfoDictionaryInDirectory'); - late final _CFBundleCopyInfoDictionaryInDirectory = - _CFBundleCopyInfoDictionaryInDirectoryPtr.asFunction< - CFDictionaryRef Function(CFURLRef)>(); + late final _CFPropertyListCreateFromXMLDataPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function(CFAllocatorRef, CFDataRef, CFOptionFlags, + ffi.Pointer)>>('CFPropertyListCreateFromXMLData'); + late final _CFPropertyListCreateFromXMLData = + _CFPropertyListCreateFromXMLDataPtr.asFunction< + CFPropertyListRef Function( + CFAllocatorRef, CFDataRef, int, ffi.Pointer)>(); - int CFBundleGetPackageInfoInDirectory( - CFURLRef url, - ffi.Pointer packageType, - ffi.Pointer packageCreator, + CFDataRef CFPropertyListCreateXMLData( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, ) { - return _CFBundleGetPackageInfoInDirectory( - url, - packageType, - packageCreator, + return _CFPropertyListCreateXMLData( + allocator, + propertyList, ); } - late final _CFBundleGetPackageInfoInDirectoryPtr = _lookup< + late final _CFPropertyListCreateXMLDataPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFURLRef, ffi.Pointer, - ffi.Pointer)>>('CFBundleGetPackageInfoInDirectory'); - late final _CFBundleGetPackageInfoInDirectory = - _CFBundleGetPackageInfoInDirectoryPtr.asFunction< - int Function(CFURLRef, ffi.Pointer, ffi.Pointer)>(); + CFDataRef Function(CFAllocatorRef, + CFPropertyListRef)>>('CFPropertyListCreateXMLData'); + late final _CFPropertyListCreateXMLData = _CFPropertyListCreateXMLDataPtr + .asFunction(); - CFURLRef CFBundleCopyResourceURL( - CFBundleRef bundle, - CFStringRef resourceName, - CFStringRef resourceType, - CFStringRef subDirName, + CFPropertyListRef CFPropertyListCreateDeepCopy( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, + int mutabilityOption, ) { - return _CFBundleCopyResourceURL( - bundle, - resourceName, - resourceType, - subDirName, + return _CFPropertyListCreateDeepCopy( + allocator, + propertyList, + mutabilityOption, ); } - late final _CFBundleCopyResourceURLPtr = _lookup< + late final _CFPropertyListCreateDeepCopyPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURL'); - late final _CFBundleCopyResourceURL = _CFBundleCopyResourceURLPtr.asFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, + CFOptionFlags)>>('CFPropertyListCreateDeepCopy'); + late final _CFPropertyListCreateDeepCopy = + _CFPropertyListCreateDeepCopyPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, int)>(); - CFArrayRef CFBundleCopyResourceURLsOfType( - CFBundleRef bundle, - CFStringRef resourceType, - CFStringRef subDirName, + int CFPropertyListIsValid( + CFPropertyListRef plist, + int format, ) { - return _CFBundleCopyResourceURLsOfType( - bundle, - resourceType, - subDirName, + return _CFPropertyListIsValid( + plist, + format, ); } - late final _CFBundleCopyResourceURLsOfTypePtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFBundleRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLsOfType'); - late final _CFBundleCopyResourceURLsOfType = - _CFBundleCopyResourceURLsOfTypePtr.asFunction< - CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef)>(); + late final _CFPropertyListIsValidPtr = _lookup< + ffi.NativeFunction>( + 'CFPropertyListIsValid'); + late final _CFPropertyListIsValid = _CFPropertyListIsValidPtr.asFunction< + int Function(CFPropertyListRef, int)>(); - CFStringRef CFBundleCopyLocalizedString( - CFBundleRef bundle, - CFStringRef key, - CFStringRef value, - CFStringRef tableName, + int CFPropertyListWriteToStream( + CFPropertyListRef propertyList, + CFWriteStreamRef stream, + int format, + ffi.Pointer errorString, ) { - return _CFBundleCopyLocalizedString( - bundle, - key, - value, - tableName, + return _CFPropertyListWriteToStream( + propertyList, + stream, + format, + errorString, ); } - late final _CFBundleCopyLocalizedStringPtr = _lookup< + late final _CFPropertyListWriteToStreamPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFBundleRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyLocalizedString'); - late final _CFBundleCopyLocalizedString = - _CFBundleCopyLocalizedStringPtr.asFunction< - CFStringRef Function( - CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + CFIndex Function(CFPropertyListRef, CFWriteStreamRef, ffi.Int32, + ffi.Pointer)>>('CFPropertyListWriteToStream'); + late final _CFPropertyListWriteToStream = + _CFPropertyListWriteToStreamPtr.asFunction< + int Function(CFPropertyListRef, CFWriteStreamRef, int, + ffi.Pointer)>(); - CFURLRef CFBundleCopyResourceURLInDirectory( - CFURLRef bundleURL, - CFStringRef resourceName, - CFStringRef resourceType, - CFStringRef subDirName, + CFPropertyListRef CFPropertyListCreateFromStream( + CFAllocatorRef allocator, + CFReadStreamRef stream, + int streamLength, + int mutabilityOption, + ffi.Pointer format, + ffi.Pointer errorString, ) { - return _CFBundleCopyResourceURLInDirectory( - bundleURL, - resourceName, - resourceType, - subDirName, + return _CFPropertyListCreateFromStream( + allocator, + stream, + streamLength, + mutabilityOption, + format, + errorString, ); } - late final _CFBundleCopyResourceURLInDirectoryPtr = _lookup< + late final _CFPropertyListCreateFromStreamPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLInDirectory'); - late final _CFBundleCopyResourceURLInDirectory = - _CFBundleCopyResourceURLInDirectoryPtr.asFunction< - CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, CFStringRef)>(); + CFPropertyListRef Function( + CFAllocatorRef, + CFReadStreamRef, + CFIndex, + CFOptionFlags, + ffi.Pointer, + ffi.Pointer)>>('CFPropertyListCreateFromStream'); + late final _CFPropertyListCreateFromStream = + _CFPropertyListCreateFromStreamPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, + ffi.Pointer, ffi.Pointer)>(); - CFArrayRef CFBundleCopyResourceURLsOfTypeInDirectory( - CFURLRef bundleURL, - CFStringRef resourceType, - CFStringRef subDirName, + CFPropertyListRef CFPropertyListCreateWithData( + CFAllocatorRef allocator, + CFDataRef data, + int options, + ffi.Pointer format, + ffi.Pointer error, ) { - return _CFBundleCopyResourceURLsOfTypeInDirectory( - bundleURL, - resourceType, - subDirName, + return _CFPropertyListCreateWithData( + allocator, + data, + options, + format, + error, ); } - late final _CFBundleCopyResourceURLsOfTypeInDirectoryPtr = _lookup< + late final _CFPropertyListCreateWithDataPtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFURLRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLsOfTypeInDirectory'); - late final _CFBundleCopyResourceURLsOfTypeInDirectory = - _CFBundleCopyResourceURLsOfTypeInDirectoryPtr.asFunction< - CFArrayRef Function(CFURLRef, CFStringRef, CFStringRef)>(); + CFPropertyListRef Function( + CFAllocatorRef, + CFDataRef, + CFOptionFlags, + ffi.Pointer, + ffi.Pointer)>>('CFPropertyListCreateWithData'); + late final _CFPropertyListCreateWithData = + _CFPropertyListCreateWithDataPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFDataRef, int, + ffi.Pointer, ffi.Pointer)>(); - CFArrayRef CFBundleCopyBundleLocalizations( - CFBundleRef bundle, + CFPropertyListRef CFPropertyListCreateWithStream( + CFAllocatorRef allocator, + CFReadStreamRef stream, + int streamLength, + int options, + ffi.Pointer format, + ffi.Pointer error, ) { - return _CFBundleCopyBundleLocalizations( - bundle, + return _CFPropertyListCreateWithStream( + allocator, + stream, + streamLength, + options, + format, + error, ); } - late final _CFBundleCopyBundleLocalizationsPtr = - _lookup>( - 'CFBundleCopyBundleLocalizations'); - late final _CFBundleCopyBundleLocalizations = - _CFBundleCopyBundleLocalizationsPtr.asFunction< - CFArrayRef Function(CFBundleRef)>(); + late final _CFPropertyListCreateWithStreamPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFAllocatorRef, + CFReadStreamRef, + CFIndex, + CFOptionFlags, + ffi.Pointer, + ffi.Pointer)>>('CFPropertyListCreateWithStream'); + late final _CFPropertyListCreateWithStream = + _CFPropertyListCreateWithStreamPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, + ffi.Pointer, ffi.Pointer)>(); - CFArrayRef CFBundleCopyPreferredLocalizationsFromArray( - CFArrayRef locArray, + int CFPropertyListWrite( + CFPropertyListRef propertyList, + CFWriteStreamRef stream, + int format, + int options, + ffi.Pointer error, ) { - return _CFBundleCopyPreferredLocalizationsFromArray( - locArray, + return _CFPropertyListWrite( + propertyList, + stream, + format, + options, + error, ); } - late final _CFBundleCopyPreferredLocalizationsFromArrayPtr = - _lookup>( - 'CFBundleCopyPreferredLocalizationsFromArray'); - late final _CFBundleCopyPreferredLocalizationsFromArray = - _CFBundleCopyPreferredLocalizationsFromArrayPtr.asFunction< - CFArrayRef Function(CFArrayRef)>(); + late final _CFPropertyListWritePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFPropertyListRef, CFWriteStreamRef, ffi.Int32, + CFOptionFlags, ffi.Pointer)>>('CFPropertyListWrite'); + late final _CFPropertyListWrite = _CFPropertyListWritePtr.asFunction< + int Function(CFPropertyListRef, CFWriteStreamRef, int, int, + ffi.Pointer)>(); - CFArrayRef CFBundleCopyLocalizationsForPreferences( - CFArrayRef locArray, - CFArrayRef prefArray, + CFDataRef CFPropertyListCreateData( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, + int format, + int options, + ffi.Pointer error, ) { - return _CFBundleCopyLocalizationsForPreferences( - locArray, - prefArray, + return _CFPropertyListCreateData( + allocator, + propertyList, + format, + options, + error, ); } - late final _CFBundleCopyLocalizationsForPreferencesPtr = - _lookup>( - 'CFBundleCopyLocalizationsForPreferences'); - late final _CFBundleCopyLocalizationsForPreferences = - _CFBundleCopyLocalizationsForPreferencesPtr.asFunction< - CFArrayRef Function(CFArrayRef, CFArrayRef)>(); + late final _CFPropertyListCreateDataPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function( + CFAllocatorRef, + CFPropertyListRef, + ffi.Int32, + CFOptionFlags, + ffi.Pointer)>>('CFPropertyListCreateData'); + late final _CFPropertyListCreateData = + _CFPropertyListCreateDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFPropertyListRef, int, int, + ffi.Pointer)>(); - CFURLRef CFBundleCopyResourceURLForLocalization( - CFBundleRef bundle, - CFStringRef resourceName, - CFStringRef resourceType, - CFStringRef subDirName, - CFStringRef localizationName, - ) { - return _CFBundleCopyResourceURLForLocalization( - bundle, - resourceName, - resourceType, - subDirName, - localizationName, - ); + late final ffi.Pointer _kCFTypeSetCallBacks = + _lookup('kCFTypeSetCallBacks'); + + CFSetCallBacks get kCFTypeSetCallBacks => _kCFTypeSetCallBacks.ref; + + late final ffi.Pointer _kCFCopyStringSetCallBacks = + _lookup('kCFCopyStringSetCallBacks'); + + CFSetCallBacks get kCFCopyStringSetCallBacks => + _kCFCopyStringSetCallBacks.ref; + + int CFSetGetTypeID() { + return _CFSetGetTypeID(); } - late final _CFBundleCopyResourceURLForLocalizationPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLForLocalization'); - late final _CFBundleCopyResourceURLForLocalization = - _CFBundleCopyResourceURLForLocalizationPtr.asFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, - CFStringRef)>(); + late final _CFSetGetTypeIDPtr = + _lookup>('CFSetGetTypeID'); + late final _CFSetGetTypeID = _CFSetGetTypeIDPtr.asFunction(); - CFArrayRef CFBundleCopyResourceURLsOfTypeForLocalization( - CFBundleRef bundle, - CFStringRef resourceType, - CFStringRef subDirName, - CFStringRef localizationName, + CFSetRef CFSetCreate( + CFAllocatorRef allocator, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, ) { - return _CFBundleCopyResourceURLsOfTypeForLocalization( - bundle, - resourceType, - subDirName, - localizationName, + return _CFSetCreate( + allocator, + values, + numValues, + callBacks, ); } - late final _CFBundleCopyResourceURLsOfTypeForLocalizationPtr = _lookup< + late final _CFSetCreatePtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLsOfTypeForLocalization'); - late final _CFBundleCopyResourceURLsOfTypeForLocalization = - _CFBundleCopyResourceURLsOfTypeForLocalizationPtr.asFunction< - CFArrayRef Function( - CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + CFSetRef Function(CFAllocatorRef, ffi.Pointer>, + CFIndex, ffi.Pointer)>>('CFSetCreate'); + late final _CFSetCreate = _CFSetCreatePtr.asFunction< + CFSetRef Function(CFAllocatorRef, ffi.Pointer>, int, + ffi.Pointer)>(); - CFDictionaryRef CFBundleCopyInfoDictionaryForURL( - CFURLRef url, + CFSetRef CFSetCreateCopy( + CFAllocatorRef allocator, + CFSetRef theSet, ) { - return _CFBundleCopyInfoDictionaryForURL( - url, + return _CFSetCreateCopy( + allocator, + theSet, ); } - late final _CFBundleCopyInfoDictionaryForURLPtr = - _lookup>( - 'CFBundleCopyInfoDictionaryForURL'); - late final _CFBundleCopyInfoDictionaryForURL = - _CFBundleCopyInfoDictionaryForURLPtr.asFunction< - CFDictionaryRef Function(CFURLRef)>(); + late final _CFSetCreateCopyPtr = + _lookup>( + 'CFSetCreateCopy'); + late final _CFSetCreateCopy = _CFSetCreateCopyPtr.asFunction< + CFSetRef Function(CFAllocatorRef, CFSetRef)>(); - CFArrayRef CFBundleCopyLocalizationsForURL( - CFURLRef url, + CFMutableSetRef CFSetCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, ) { - return _CFBundleCopyLocalizationsForURL( - url, + return _CFSetCreateMutable( + allocator, + capacity, + callBacks, ); } - late final _CFBundleCopyLocalizationsForURLPtr = - _lookup>( - 'CFBundleCopyLocalizationsForURL'); - late final _CFBundleCopyLocalizationsForURL = - _CFBundleCopyLocalizationsForURLPtr.asFunction< - CFArrayRef Function(CFURLRef)>(); + late final _CFSetCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableSetRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFSetCreateMutable'); + late final _CFSetCreateMutable = _CFSetCreateMutablePtr.asFunction< + CFMutableSetRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - CFArrayRef CFBundleCopyExecutableArchitecturesForURL( - CFURLRef url, + CFMutableSetRef CFSetCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFSetRef theSet, ) { - return _CFBundleCopyExecutableArchitecturesForURL( - url, + return _CFSetCreateMutableCopy( + allocator, + capacity, + theSet, ); } - late final _CFBundleCopyExecutableArchitecturesForURLPtr = - _lookup>( - 'CFBundleCopyExecutableArchitecturesForURL'); - late final _CFBundleCopyExecutableArchitecturesForURL = - _CFBundleCopyExecutableArchitecturesForURLPtr.asFunction< - CFArrayRef Function(CFURLRef)>(); + late final _CFSetCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableSetRef Function( + CFAllocatorRef, CFIndex, CFSetRef)>>('CFSetCreateMutableCopy'); + late final _CFSetCreateMutableCopy = _CFSetCreateMutableCopyPtr.asFunction< + CFMutableSetRef Function(CFAllocatorRef, int, CFSetRef)>(); - CFURLRef CFBundleCopyExecutableURL( - CFBundleRef bundle, + int CFSetGetCount( + CFSetRef theSet, ) { - return _CFBundleCopyExecutableURL( - bundle, + return _CFSetGetCount( + theSet, ); } - late final _CFBundleCopyExecutableURLPtr = - _lookup>( - 'CFBundleCopyExecutableURL'); - late final _CFBundleCopyExecutableURL = _CFBundleCopyExecutableURLPtr - .asFunction(); + late final _CFSetGetCountPtr = + _lookup>('CFSetGetCount'); + late final _CFSetGetCount = + _CFSetGetCountPtr.asFunction(); - CFArrayRef CFBundleCopyExecutableArchitectures( - CFBundleRef bundle, + int CFSetGetCountOfValue( + CFSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleCopyExecutableArchitectures( - bundle, + return _CFSetGetCountOfValue( + theSet, + value, ); } - late final _CFBundleCopyExecutableArchitecturesPtr = - _lookup>( - 'CFBundleCopyExecutableArchitectures'); - late final _CFBundleCopyExecutableArchitectures = - _CFBundleCopyExecutableArchitecturesPtr.asFunction< - CFArrayRef Function(CFBundleRef)>(); + late final _CFSetGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFSetRef, ffi.Pointer)>>('CFSetGetCountOfValue'); + late final _CFSetGetCountOfValue = _CFSetGetCountOfValuePtr.asFunction< + int Function(CFSetRef, ffi.Pointer)>(); - int CFBundlePreflightExecutable( - CFBundleRef bundle, - ffi.Pointer error, + int CFSetContainsValue( + CFSetRef theSet, + ffi.Pointer value, ) { - return _CFBundlePreflightExecutable( - bundle, - error, + return _CFSetContainsValue( + theSet, + value, ); } - late final _CFBundlePreflightExecutablePtr = _lookup< + late final _CFSetContainsValuePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFBundleRef, - ffi.Pointer)>>('CFBundlePreflightExecutable'); - late final _CFBundlePreflightExecutable = _CFBundlePreflightExecutablePtr - .asFunction)>(); + Boolean Function( + CFSetRef, ffi.Pointer)>>('CFSetContainsValue'); + late final _CFSetContainsValue = _CFSetContainsValuePtr.asFunction< + int Function(CFSetRef, ffi.Pointer)>(); - int CFBundleLoadExecutableAndReturnError( - CFBundleRef bundle, - ffi.Pointer error, + ffi.Pointer CFSetGetValue( + CFSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleLoadExecutableAndReturnError( - bundle, - error, + return _CFSetGetValue( + theSet, + value, ); } - late final _CFBundleLoadExecutableAndReturnErrorPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFBundleRef, ffi.Pointer)>>( - 'CFBundleLoadExecutableAndReturnError'); - late final _CFBundleLoadExecutableAndReturnError = - _CFBundleLoadExecutableAndReturnErrorPtr.asFunction< - int Function(CFBundleRef, ffi.Pointer)>(); + late final _CFSetGetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFSetRef, ffi.Pointer)>>('CFSetGetValue'); + late final _CFSetGetValue = _CFSetGetValuePtr.asFunction< + ffi.Pointer Function(CFSetRef, ffi.Pointer)>(); - int CFBundleLoadExecutable( - CFBundleRef bundle, + int CFSetGetValueIfPresent( + CFSetRef theSet, + ffi.Pointer candidate, + ffi.Pointer> value, ) { - return _CFBundleLoadExecutable( - bundle, - ); - } - - late final _CFBundleLoadExecutablePtr = - _lookup>( - 'CFBundleLoadExecutable'); - late final _CFBundleLoadExecutable = - _CFBundleLoadExecutablePtr.asFunction(); - - int CFBundleIsExecutableLoaded( - CFBundleRef bundle, - ) { - return _CFBundleIsExecutableLoaded( - bundle, + return _CFSetGetValueIfPresent( + theSet, + candidate, + value, ); } - late final _CFBundleIsExecutableLoadedPtr = - _lookup>( - 'CFBundleIsExecutableLoaded'); - late final _CFBundleIsExecutableLoaded = - _CFBundleIsExecutableLoadedPtr.asFunction(); + late final _CFSetGetValueIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFSetRef, ffi.Pointer, + ffi.Pointer>)>>('CFSetGetValueIfPresent'); + late final _CFSetGetValueIfPresent = _CFSetGetValueIfPresentPtr.asFunction< + int Function(CFSetRef, ffi.Pointer, + ffi.Pointer>)>(); - void CFBundleUnloadExecutable( - CFBundleRef bundle, + void CFSetGetValues( + CFSetRef theSet, + ffi.Pointer> values, ) { - return _CFBundleUnloadExecutable( - bundle, + return _CFSetGetValues( + theSet, + values, ); } - late final _CFBundleUnloadExecutablePtr = - _lookup>( - 'CFBundleUnloadExecutable'); - late final _CFBundleUnloadExecutable = - _CFBundleUnloadExecutablePtr.asFunction(); + late final _CFSetGetValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFSetRef, ffi.Pointer>)>>('CFSetGetValues'); + late final _CFSetGetValues = _CFSetGetValuesPtr.asFunction< + void Function(CFSetRef, ffi.Pointer>)>(); - ffi.Pointer CFBundleGetFunctionPointerForName( - CFBundleRef bundle, - CFStringRef functionName, + void CFSetApplyFunction( + CFSetRef theSet, + CFSetApplierFunction applier, + ffi.Pointer context, ) { - return _CFBundleGetFunctionPointerForName( - bundle, - functionName, + return _CFSetApplyFunction( + theSet, + applier, + context, ); } - late final _CFBundleGetFunctionPointerForNamePtr = _lookup< + late final _CFSetApplyFunctionPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFBundleRef, CFStringRef)>>('CFBundleGetFunctionPointerForName'); - late final _CFBundleGetFunctionPointerForName = - _CFBundleGetFunctionPointerForNamePtr.asFunction< - ffi.Pointer Function(CFBundleRef, CFStringRef)>(); + ffi.Void Function(CFSetRef, CFSetApplierFunction, + ffi.Pointer)>>('CFSetApplyFunction'); + late final _CFSetApplyFunction = _CFSetApplyFunctionPtr.asFunction< + void Function(CFSetRef, CFSetApplierFunction, ffi.Pointer)>(); - void CFBundleGetFunctionPointersForNames( - CFBundleRef bundle, - CFArrayRef functionNames, - ffi.Pointer> ftbl, + void CFSetAddValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleGetFunctionPointersForNames( - bundle, - functionNames, - ftbl, + return _CFSetAddValue( + theSet, + value, ); } - late final _CFBundleGetFunctionPointersForNamesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBundleRef, CFArrayRef, - ffi.Pointer>)>>( - 'CFBundleGetFunctionPointersForNames'); - late final _CFBundleGetFunctionPointersForNames = - _CFBundleGetFunctionPointersForNamesPtr.asFunction< - void Function( - CFBundleRef, CFArrayRef, ffi.Pointer>)>(); + late final _CFSetAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetAddValue'); + late final _CFSetAddValue = _CFSetAddValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - ffi.Pointer CFBundleGetDataPointerForName( - CFBundleRef bundle, - CFStringRef symbolName, + void CFSetReplaceValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleGetDataPointerForName( - bundle, - symbolName, + return _CFSetReplaceValue( + theSet, + value, ); } - late final _CFBundleGetDataPointerForNamePtr = _lookup< + late final _CFSetReplaceValuePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFBundleRef, CFStringRef)>>('CFBundleGetDataPointerForName'); - late final _CFBundleGetDataPointerForName = _CFBundleGetDataPointerForNamePtr - .asFunction Function(CFBundleRef, CFStringRef)>(); + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetReplaceValue'); + late final _CFSetReplaceValue = _CFSetReplaceValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - void CFBundleGetDataPointersForNames( - CFBundleRef bundle, - CFArrayRef symbolNames, - ffi.Pointer> stbl, + void CFSetSetValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleGetDataPointersForNames( - bundle, - symbolNames, - stbl, + return _CFSetSetValue( + theSet, + value, ); } - late final _CFBundleGetDataPointersForNamesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBundleRef, CFArrayRef, - ffi.Pointer>)>>( - 'CFBundleGetDataPointersForNames'); - late final _CFBundleGetDataPointersForNames = - _CFBundleGetDataPointersForNamesPtr.asFunction< - void Function( - CFBundleRef, CFArrayRef, ffi.Pointer>)>(); + late final _CFSetSetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetSetValue'); + late final _CFSetSetValue = _CFSetSetValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - CFURLRef CFBundleCopyAuxiliaryExecutableURL( - CFBundleRef bundle, - CFStringRef executableName, + void CFSetRemoveValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _CFBundleCopyAuxiliaryExecutableURL( - bundle, - executableName, + return _CFSetRemoveValue( + theSet, + value, ); } - late final _CFBundleCopyAuxiliaryExecutableURLPtr = - _lookup>( - 'CFBundleCopyAuxiliaryExecutableURL'); - late final _CFBundleCopyAuxiliaryExecutableURL = - _CFBundleCopyAuxiliaryExecutableURLPtr.asFunction< - CFURLRef Function(CFBundleRef, CFStringRef)>(); + late final _CFSetRemoveValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetRemoveValue'); + late final _CFSetRemoveValue = _CFSetRemoveValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - int CFBundleIsExecutableLoadable( - CFBundleRef bundle, + void CFSetRemoveAllValues( + CFMutableSetRef theSet, ) { - return _CFBundleIsExecutableLoadable( - bundle, + return _CFSetRemoveAllValues( + theSet, ); } - late final _CFBundleIsExecutableLoadablePtr = - _lookup>( - 'CFBundleIsExecutableLoadable'); - late final _CFBundleIsExecutableLoadable = - _CFBundleIsExecutableLoadablePtr.asFunction(); + late final _CFSetRemoveAllValuesPtr = + _lookup>( + 'CFSetRemoveAllValues'); + late final _CFSetRemoveAllValues = + _CFSetRemoveAllValuesPtr.asFunction(); - int CFBundleIsExecutableLoadableForURL( - CFURLRef url, + int CFTreeGetTypeID() { + return _CFTreeGetTypeID(); + } + + late final _CFTreeGetTypeIDPtr = + _lookup>('CFTreeGetTypeID'); + late final _CFTreeGetTypeID = + _CFTreeGetTypeIDPtr.asFunction(); + + CFTreeRef CFTreeCreate( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return _CFBundleIsExecutableLoadableForURL( - url, + return _CFTreeCreate( + allocator, + context, ); } - late final _CFBundleIsExecutableLoadableForURLPtr = - _lookup>( - 'CFBundleIsExecutableLoadableForURL'); - late final _CFBundleIsExecutableLoadableForURL = - _CFBundleIsExecutableLoadableForURLPtr.asFunction< - int Function(CFURLRef)>(); + late final _CFTreeCreatePtr = _lookup< + ffi.NativeFunction< + CFTreeRef Function( + CFAllocatorRef, ffi.Pointer)>>('CFTreeCreate'); + late final _CFTreeCreate = _CFTreeCreatePtr.asFunction< + CFTreeRef Function(CFAllocatorRef, ffi.Pointer)>(); - int CFBundleIsArchitectureLoadable( - int arch, + CFTreeRef CFTreeGetParent( + CFTreeRef tree, ) { - return _CFBundleIsArchitectureLoadable( - arch, + return _CFTreeGetParent( + tree, ); } - late final _CFBundleIsArchitectureLoadablePtr = - _lookup>( - 'CFBundleIsArchitectureLoadable'); - late final _CFBundleIsArchitectureLoadable = - _CFBundleIsArchitectureLoadablePtr.asFunction(); + late final _CFTreeGetParentPtr = + _lookup>( + 'CFTreeGetParent'); + late final _CFTreeGetParent = + _CFTreeGetParentPtr.asFunction(); - CFPlugInRef CFBundleGetPlugIn( - CFBundleRef bundle, + CFTreeRef CFTreeGetNextSibling( + CFTreeRef tree, ) { - return _CFBundleGetPlugIn( - bundle, + return _CFTreeGetNextSibling( + tree, ); } - late final _CFBundleGetPlugInPtr = - _lookup>( - 'CFBundleGetPlugIn'); - late final _CFBundleGetPlugIn = - _CFBundleGetPlugInPtr.asFunction(); + late final _CFTreeGetNextSiblingPtr = + _lookup>( + 'CFTreeGetNextSibling'); + late final _CFTreeGetNextSibling = + _CFTreeGetNextSiblingPtr.asFunction(); - int CFBundleOpenBundleResourceMap( - CFBundleRef bundle, + CFTreeRef CFTreeGetFirstChild( + CFTreeRef tree, ) { - return _CFBundleOpenBundleResourceMap( - bundle, + return _CFTreeGetFirstChild( + tree, ); } - late final _CFBundleOpenBundleResourceMapPtr = - _lookup>( - 'CFBundleOpenBundleResourceMap'); - late final _CFBundleOpenBundleResourceMap = - _CFBundleOpenBundleResourceMapPtr.asFunction(); + late final _CFTreeGetFirstChildPtr = + _lookup>( + 'CFTreeGetFirstChild'); + late final _CFTreeGetFirstChild = + _CFTreeGetFirstChildPtr.asFunction(); - int CFBundleOpenBundleResourceFiles( - CFBundleRef bundle, - ffi.Pointer refNum, - ffi.Pointer localizedRefNum, + void CFTreeGetContext( + CFTreeRef tree, + ffi.Pointer context, ) { - return _CFBundleOpenBundleResourceFiles( - bundle, - refNum, - localizedRefNum, + return _CFTreeGetContext( + tree, + context, ); } - late final _CFBundleOpenBundleResourceFilesPtr = _lookup< + late final _CFTreeGetContextPtr = _lookup< ffi.NativeFunction< - SInt32 Function(CFBundleRef, ffi.Pointer, - ffi.Pointer)>>('CFBundleOpenBundleResourceFiles'); - late final _CFBundleOpenBundleResourceFiles = - _CFBundleOpenBundleResourceFilesPtr.asFunction< - int Function(CFBundleRef, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeGetContext'); + late final _CFTreeGetContext = _CFTreeGetContextPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); - void CFBundleCloseBundleResourceMap( - CFBundleRef bundle, - int refNum, + int CFTreeGetChildCount( + CFTreeRef tree, ) { - return _CFBundleCloseBundleResourceMap( - bundle, - refNum, + return _CFTreeGetChildCount( + tree, ); } - late final _CFBundleCloseBundleResourceMapPtr = _lookup< - ffi.NativeFunction>( - 'CFBundleCloseBundleResourceMap'); - late final _CFBundleCloseBundleResourceMap = - _CFBundleCloseBundleResourceMapPtr.asFunction< - void Function(CFBundleRef, int)>(); + late final _CFTreeGetChildCountPtr = + _lookup>( + 'CFTreeGetChildCount'); + late final _CFTreeGetChildCount = + _CFTreeGetChildCountPtr.asFunction(); - int CFMessagePortGetTypeID() { - return _CFMessagePortGetTypeID(); + CFTreeRef CFTreeGetChildAtIndex( + CFTreeRef tree, + int idx, + ) { + return _CFTreeGetChildAtIndex( + tree, + idx, + ); } - late final _CFMessagePortGetTypeIDPtr = - _lookup>( - 'CFMessagePortGetTypeID'); - late final _CFMessagePortGetTypeID = - _CFMessagePortGetTypeIDPtr.asFunction(); + late final _CFTreeGetChildAtIndexPtr = + _lookup>( + 'CFTreeGetChildAtIndex'); + late final _CFTreeGetChildAtIndex = _CFTreeGetChildAtIndexPtr.asFunction< + CFTreeRef Function(CFTreeRef, int)>(); - CFMessagePortRef CFMessagePortCreateLocal( - CFAllocatorRef allocator, - CFStringRef name, - CFMessagePortCallBack callout, - ffi.Pointer context, - ffi.Pointer shouldFreeInfo, + void CFTreeGetChildren( + CFTreeRef tree, + ffi.Pointer children, ) { - return _CFMessagePortCreateLocal( - allocator, - name, - callout, - context, - shouldFreeInfo, + return _CFTreeGetChildren( + tree, + children, ); } - late final _CFMessagePortCreateLocalPtr = _lookup< + late final _CFTreeGetChildrenPtr = _lookup< ffi.NativeFunction< - CFMessagePortRef Function( - CFAllocatorRef, - CFStringRef, - CFMessagePortCallBack, - ffi.Pointer, - ffi.Pointer)>>('CFMessagePortCreateLocal'); - late final _CFMessagePortCreateLocal = - _CFMessagePortCreateLocalPtr.asFunction< - CFMessagePortRef Function( - CFAllocatorRef, - CFStringRef, - CFMessagePortCallBack, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeGetChildren'); + late final _CFTreeGetChildren = _CFTreeGetChildrenPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); - CFMessagePortRef CFMessagePortCreateRemote( - CFAllocatorRef allocator, - CFStringRef name, + void CFTreeApplyFunctionToChildren( + CFTreeRef tree, + CFTreeApplierFunction applier, + ffi.Pointer context, ) { - return _CFMessagePortCreateRemote( - allocator, - name, + return _CFTreeApplyFunctionToChildren( + tree, + applier, + context, ); } - late final _CFMessagePortCreateRemotePtr = _lookup< + late final _CFTreeApplyFunctionToChildrenPtr = _lookup< ffi.NativeFunction< - CFMessagePortRef Function( - CFAllocatorRef, CFStringRef)>>('CFMessagePortCreateRemote'); - late final _CFMessagePortCreateRemote = _CFMessagePortCreateRemotePtr - .asFunction(); + ffi.Void Function(CFTreeRef, CFTreeApplierFunction, + ffi.Pointer)>>('CFTreeApplyFunctionToChildren'); + late final _CFTreeApplyFunctionToChildren = + _CFTreeApplyFunctionToChildrenPtr.asFunction< + void Function( + CFTreeRef, CFTreeApplierFunction, ffi.Pointer)>(); - int CFMessagePortIsRemote( - CFMessagePortRef ms, + CFTreeRef CFTreeFindRoot( + CFTreeRef tree, ) { - return _CFMessagePortIsRemote( - ms, + return _CFTreeFindRoot( + tree, ); } - late final _CFMessagePortIsRemotePtr = - _lookup>( - 'CFMessagePortIsRemote'); - late final _CFMessagePortIsRemote = - _CFMessagePortIsRemotePtr.asFunction(); + late final _CFTreeFindRootPtr = + _lookup>( + 'CFTreeFindRoot'); + late final _CFTreeFindRoot = + _CFTreeFindRootPtr.asFunction(); - CFStringRef CFMessagePortGetName( - CFMessagePortRef ms, + void CFTreeSetContext( + CFTreeRef tree, + ffi.Pointer context, ) { - return _CFMessagePortGetName( - ms, + return _CFTreeSetContext( + tree, + context, ); } - late final _CFMessagePortGetNamePtr = - _lookup>( - 'CFMessagePortGetName'); - late final _CFMessagePortGetName = _CFMessagePortGetNamePtr.asFunction< - CFStringRef Function(CFMessagePortRef)>(); + late final _CFTreeSetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeSetContext'); + late final _CFTreeSetContext = _CFTreeSetContextPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); - int CFMessagePortSetName( - CFMessagePortRef ms, - CFStringRef newName, + void CFTreePrependChild( + CFTreeRef tree, + CFTreeRef newChild, ) { - return _CFMessagePortSetName( - ms, - newName, + return _CFTreePrependChild( + tree, + newChild, ); } - late final _CFMessagePortSetNamePtr = _lookup< - ffi.NativeFunction>( - 'CFMessagePortSetName'); - late final _CFMessagePortSetName = _CFMessagePortSetNamePtr.asFunction< - int Function(CFMessagePortRef, CFStringRef)>(); + late final _CFTreePrependChildPtr = + _lookup>( + 'CFTreePrependChild'); + late final _CFTreePrependChild = + _CFTreePrependChildPtr.asFunction(); - void CFMessagePortGetContext( - CFMessagePortRef ms, - ffi.Pointer context, + void CFTreeAppendChild( + CFTreeRef tree, + CFTreeRef newChild, ) { - return _CFMessagePortGetContext( - ms, - context, + return _CFTreeAppendChild( + tree, + newChild, ); } - late final _CFMessagePortGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMessagePortRef, - ffi.Pointer)>>('CFMessagePortGetContext'); - late final _CFMessagePortGetContext = _CFMessagePortGetContextPtr.asFunction< - void Function(CFMessagePortRef, ffi.Pointer)>(); + late final _CFTreeAppendChildPtr = + _lookup>( + 'CFTreeAppendChild'); + late final _CFTreeAppendChild = + _CFTreeAppendChildPtr.asFunction(); - void CFMessagePortInvalidate( - CFMessagePortRef ms, + void CFTreeInsertSibling( + CFTreeRef tree, + CFTreeRef newSibling, ) { - return _CFMessagePortInvalidate( - ms, + return _CFTreeInsertSibling( + tree, + newSibling, ); } - late final _CFMessagePortInvalidatePtr = - _lookup>( - 'CFMessagePortInvalidate'); - late final _CFMessagePortInvalidate = - _CFMessagePortInvalidatePtr.asFunction(); - - int CFMessagePortIsValid( - CFMessagePortRef ms, + late final _CFTreeInsertSiblingPtr = + _lookup>( + 'CFTreeInsertSibling'); + late final _CFTreeInsertSibling = + _CFTreeInsertSiblingPtr.asFunction(); + + void CFTreeRemove( + CFTreeRef tree, ) { - return _CFMessagePortIsValid( - ms, + return _CFTreeRemove( + tree, ); } - late final _CFMessagePortIsValidPtr = - _lookup>( - 'CFMessagePortIsValid'); - late final _CFMessagePortIsValid = - _CFMessagePortIsValidPtr.asFunction(); + late final _CFTreeRemovePtr = + _lookup>('CFTreeRemove'); + late final _CFTreeRemove = + _CFTreeRemovePtr.asFunction(); - CFMessagePortInvalidationCallBack CFMessagePortGetInvalidationCallBack( - CFMessagePortRef ms, + void CFTreeRemoveAllChildren( + CFTreeRef tree, ) { - return _CFMessagePortGetInvalidationCallBack( - ms, + return _CFTreeRemoveAllChildren( + tree, ); } - late final _CFMessagePortGetInvalidationCallBackPtr = _lookup< + late final _CFTreeRemoveAllChildrenPtr = + _lookup>( + 'CFTreeRemoveAllChildren'); + late final _CFTreeRemoveAllChildren = + _CFTreeRemoveAllChildrenPtr.asFunction(); + + void CFTreeSortChildren( + CFTreeRef tree, + CFComparatorFunction comparator, + ffi.Pointer context, + ) { + return _CFTreeSortChildren( + tree, + comparator, + context, + ); + } + + late final _CFTreeSortChildrenPtr = _lookup< ffi.NativeFunction< - CFMessagePortInvalidationCallBack Function( - CFMessagePortRef)>>('CFMessagePortGetInvalidationCallBack'); - late final _CFMessagePortGetInvalidationCallBack = - _CFMessagePortGetInvalidationCallBackPtr.asFunction< - CFMessagePortInvalidationCallBack Function(CFMessagePortRef)>(); + ffi.Void Function(CFTreeRef, CFComparatorFunction, + ffi.Pointer)>>('CFTreeSortChildren'); + late final _CFTreeSortChildren = _CFTreeSortChildrenPtr.asFunction< + void Function(CFTreeRef, CFComparatorFunction, ffi.Pointer)>(); - void CFMessagePortSetInvalidationCallBack( - CFMessagePortRef ms, - CFMessagePortInvalidationCallBack callout, + int CFURLCreateDataAndPropertiesFromResource( + CFAllocatorRef alloc, + CFURLRef url, + ffi.Pointer resourceData, + ffi.Pointer properties, + CFArrayRef desiredProperties, + ffi.Pointer errorCode, ) { - return _CFMessagePortSetInvalidationCallBack( - ms, - callout, + return _CFURLCreateDataAndPropertiesFromResource( + alloc, + url, + resourceData, + properties, + desiredProperties, + errorCode, ); } - late final _CFMessagePortSetInvalidationCallBackPtr = _lookup< + late final _CFURLCreateDataAndPropertiesFromResourcePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMessagePortRef, CFMessagePortInvalidationCallBack)>>( - 'CFMessagePortSetInvalidationCallBack'); - late final _CFMessagePortSetInvalidationCallBack = - _CFMessagePortSetInvalidationCallBackPtr.asFunction< - void Function(CFMessagePortRef, CFMessagePortInvalidationCallBack)>(); + Boolean Function( + CFAllocatorRef, + CFURLRef, + ffi.Pointer, + ffi.Pointer, + CFArrayRef, + ffi.Pointer)>>( + 'CFURLCreateDataAndPropertiesFromResource'); + late final _CFURLCreateDataAndPropertiesFromResource = + _CFURLCreateDataAndPropertiesFromResourcePtr.asFunction< + int Function(CFAllocatorRef, CFURLRef, ffi.Pointer, + ffi.Pointer, CFArrayRef, ffi.Pointer)>(); - int CFMessagePortSendRequest( - CFMessagePortRef remote, - int msgid, - CFDataRef data, - double sendTimeout, - double rcvTimeout, - CFStringRef replyMode, - ffi.Pointer returnData, + int CFURLWriteDataAndPropertiesToResource( + CFURLRef url, + CFDataRef dataToWrite, + CFDictionaryRef propertiesToWrite, + ffi.Pointer errorCode, ) { - return _CFMessagePortSendRequest( - remote, - msgid, - data, - sendTimeout, - rcvTimeout, - replyMode, - returnData, + return _CFURLWriteDataAndPropertiesToResource( + url, + dataToWrite, + propertiesToWrite, + errorCode, ); } - late final _CFMessagePortSendRequestPtr = _lookup< + late final _CFURLWriteDataAndPropertiesToResourcePtr = _lookup< ffi.NativeFunction< - SInt32 Function( - CFMessagePortRef, - SInt32, - CFDataRef, - CFTimeInterval, - CFTimeInterval, - CFStringRef, - ffi.Pointer)>>('CFMessagePortSendRequest'); - late final _CFMessagePortSendRequest = - _CFMessagePortSendRequestPtr.asFunction< - int Function(CFMessagePortRef, int, CFDataRef, double, double, - CFStringRef, ffi.Pointer)>(); + Boolean Function(CFURLRef, CFDataRef, CFDictionaryRef, + ffi.Pointer)>>('CFURLWriteDataAndPropertiesToResource'); + late final _CFURLWriteDataAndPropertiesToResource = + _CFURLWriteDataAndPropertiesToResourcePtr.asFunction< + int Function( + CFURLRef, CFDataRef, CFDictionaryRef, ffi.Pointer)>(); - CFRunLoopSourceRef CFMessagePortCreateRunLoopSource( - CFAllocatorRef allocator, - CFMessagePortRef local, - int order, + int CFURLDestroyResource( + CFURLRef url, + ffi.Pointer errorCode, ) { - return _CFMessagePortCreateRunLoopSource( - allocator, - local, - order, + return _CFURLDestroyResource( + url, + errorCode, ); } - late final _CFMessagePortCreateRunLoopSourcePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, - CFIndex)>>('CFMessagePortCreateRunLoopSource'); - late final _CFMessagePortCreateRunLoopSource = - _CFMessagePortCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, int)>(); + late final _CFURLDestroyResourcePtr = _lookup< + ffi.NativeFunction)>>( + 'CFURLDestroyResource'); + late final _CFURLDestroyResource = _CFURLDestroyResourcePtr.asFunction< + int Function(CFURLRef, ffi.Pointer)>(); - void CFMessagePortSetDispatchQueue( - CFMessagePortRef ms, - dispatch_queue_t queue, + CFTypeRef CFURLCreatePropertyFromResource( + CFAllocatorRef alloc, + CFURLRef url, + CFStringRef property, + ffi.Pointer errorCode, ) { - return _CFMessagePortSetDispatchQueue( - ms, - queue, + return _CFURLCreatePropertyFromResource( + alloc, + url, + property, + errorCode, ); } - late final _CFMessagePortSetDispatchQueuePtr = _lookup< + late final _CFURLCreatePropertyFromResourcePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMessagePortRef, - dispatch_queue_t)>>('CFMessagePortSetDispatchQueue'); - late final _CFMessagePortSetDispatchQueue = _CFMessagePortSetDispatchQueuePtr - .asFunction(); - - late final ffi.Pointer _kCFPlugInDynamicRegistrationKey = - _lookup('kCFPlugInDynamicRegistrationKey'); + CFTypeRef Function(CFAllocatorRef, CFURLRef, CFStringRef, + ffi.Pointer)>>('CFURLCreatePropertyFromResource'); + late final _CFURLCreatePropertyFromResource = + _CFURLCreatePropertyFromResourcePtr.asFunction< + CFTypeRef Function( + CFAllocatorRef, CFURLRef, CFStringRef, ffi.Pointer)>(); - CFStringRef get kCFPlugInDynamicRegistrationKey => - _kCFPlugInDynamicRegistrationKey.value; + late final ffi.Pointer _kCFURLFileExists = + _lookup('kCFURLFileExists'); - set kCFPlugInDynamicRegistrationKey(CFStringRef value) => - _kCFPlugInDynamicRegistrationKey.value = value; + CFStringRef get kCFURLFileExists => _kCFURLFileExists.value; - late final ffi.Pointer _kCFPlugInDynamicRegisterFunctionKey = - _lookup('kCFPlugInDynamicRegisterFunctionKey'); + set kCFURLFileExists(CFStringRef value) => _kCFURLFileExists.value = value; - CFStringRef get kCFPlugInDynamicRegisterFunctionKey => - _kCFPlugInDynamicRegisterFunctionKey.value; + late final ffi.Pointer _kCFURLFileDirectoryContents = + _lookup('kCFURLFileDirectoryContents'); - set kCFPlugInDynamicRegisterFunctionKey(CFStringRef value) => - _kCFPlugInDynamicRegisterFunctionKey.value = value; + CFStringRef get kCFURLFileDirectoryContents => + _kCFURLFileDirectoryContents.value; - late final ffi.Pointer _kCFPlugInUnloadFunctionKey = - _lookup('kCFPlugInUnloadFunctionKey'); + set kCFURLFileDirectoryContents(CFStringRef value) => + _kCFURLFileDirectoryContents.value = value; - CFStringRef get kCFPlugInUnloadFunctionKey => - _kCFPlugInUnloadFunctionKey.value; + late final ffi.Pointer _kCFURLFileLength = + _lookup('kCFURLFileLength'); - set kCFPlugInUnloadFunctionKey(CFStringRef value) => - _kCFPlugInUnloadFunctionKey.value = value; + CFStringRef get kCFURLFileLength => _kCFURLFileLength.value; - late final ffi.Pointer _kCFPlugInFactoriesKey = - _lookup('kCFPlugInFactoriesKey'); + set kCFURLFileLength(CFStringRef value) => _kCFURLFileLength.value = value; - CFStringRef get kCFPlugInFactoriesKey => _kCFPlugInFactoriesKey.value; + late final ffi.Pointer _kCFURLFileLastModificationTime = + _lookup('kCFURLFileLastModificationTime'); - set kCFPlugInFactoriesKey(CFStringRef value) => - _kCFPlugInFactoriesKey.value = value; + CFStringRef get kCFURLFileLastModificationTime => + _kCFURLFileLastModificationTime.value; - late final ffi.Pointer _kCFPlugInTypesKey = - _lookup('kCFPlugInTypesKey'); + set kCFURLFileLastModificationTime(CFStringRef value) => + _kCFURLFileLastModificationTime.value = value; - CFStringRef get kCFPlugInTypesKey => _kCFPlugInTypesKey.value; + late final ffi.Pointer _kCFURLFilePOSIXMode = + _lookup('kCFURLFilePOSIXMode'); - set kCFPlugInTypesKey(CFStringRef value) => _kCFPlugInTypesKey.value = value; + CFStringRef get kCFURLFilePOSIXMode => _kCFURLFilePOSIXMode.value; - int CFPlugInGetTypeID() { - return _CFPlugInGetTypeID(); - } + set kCFURLFilePOSIXMode(CFStringRef value) => + _kCFURLFilePOSIXMode.value = value; - late final _CFPlugInGetTypeIDPtr = - _lookup>('CFPlugInGetTypeID'); - late final _CFPlugInGetTypeID = - _CFPlugInGetTypeIDPtr.asFunction(); + late final ffi.Pointer _kCFURLFileOwnerID = + _lookup('kCFURLFileOwnerID'); - CFPlugInRef CFPlugInCreate( - CFAllocatorRef allocator, - CFURLRef plugInURL, - ) { - return _CFPlugInCreate( - allocator, - plugInURL, - ); - } + CFStringRef get kCFURLFileOwnerID => _kCFURLFileOwnerID.value; - late final _CFPlugInCreatePtr = _lookup< - ffi.NativeFunction>( - 'CFPlugInCreate'); - late final _CFPlugInCreate = _CFPlugInCreatePtr.asFunction< - CFPlugInRef Function(CFAllocatorRef, CFURLRef)>(); + set kCFURLFileOwnerID(CFStringRef value) => _kCFURLFileOwnerID.value = value; - CFBundleRef CFPlugInGetBundle( - CFPlugInRef plugIn, - ) { - return _CFPlugInGetBundle( - plugIn, - ); - } + late final ffi.Pointer _kCFURLHTTPStatusCode = + _lookup('kCFURLHTTPStatusCode'); - late final _CFPlugInGetBundlePtr = - _lookup>( - 'CFPlugInGetBundle'); - late final _CFPlugInGetBundle = - _CFPlugInGetBundlePtr.asFunction(); + CFStringRef get kCFURLHTTPStatusCode => _kCFURLHTTPStatusCode.value; - void CFPlugInSetLoadOnDemand( - CFPlugInRef plugIn, - int flag, - ) { - return _CFPlugInSetLoadOnDemand( - plugIn, - flag, - ); - } + set kCFURLHTTPStatusCode(CFStringRef value) => + _kCFURLHTTPStatusCode.value = value; - late final _CFPlugInSetLoadOnDemandPtr = - _lookup>( - 'CFPlugInSetLoadOnDemand'); - late final _CFPlugInSetLoadOnDemand = - _CFPlugInSetLoadOnDemandPtr.asFunction(); + late final ffi.Pointer _kCFURLHTTPStatusLine = + _lookup('kCFURLHTTPStatusLine'); - int CFPlugInIsLoadOnDemand( - CFPlugInRef plugIn, - ) { - return _CFPlugInIsLoadOnDemand( - plugIn, - ); - } + CFStringRef get kCFURLHTTPStatusLine => _kCFURLHTTPStatusLine.value; - late final _CFPlugInIsLoadOnDemandPtr = - _lookup>( - 'CFPlugInIsLoadOnDemand'); - late final _CFPlugInIsLoadOnDemand = - _CFPlugInIsLoadOnDemandPtr.asFunction(); + set kCFURLHTTPStatusLine(CFStringRef value) => + _kCFURLHTTPStatusLine.value = value; - CFArrayRef CFPlugInFindFactoriesForPlugInType( - CFUUIDRef typeUUID, - ) { - return _CFPlugInFindFactoriesForPlugInType( - typeUUID, - ); + int CFUUIDGetTypeID() { + return _CFUUIDGetTypeID(); } - late final _CFPlugInFindFactoriesForPlugInTypePtr = - _lookup>( - 'CFPlugInFindFactoriesForPlugInType'); - late final _CFPlugInFindFactoriesForPlugInType = - _CFPlugInFindFactoriesForPlugInTypePtr.asFunction< - CFArrayRef Function(CFUUIDRef)>(); + late final _CFUUIDGetTypeIDPtr = + _lookup>('CFUUIDGetTypeID'); + late final _CFUUIDGetTypeID = + _CFUUIDGetTypeIDPtr.asFunction(); - CFArrayRef CFPlugInFindFactoriesForPlugInTypeInPlugIn( - CFUUIDRef typeUUID, - CFPlugInRef plugIn, + CFUUIDRef CFUUIDCreate( + CFAllocatorRef alloc, ) { - return _CFPlugInFindFactoriesForPlugInTypeInPlugIn( - typeUUID, - plugIn, + return _CFUUIDCreate( + alloc, ); } - late final _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr = - _lookup>( - 'CFPlugInFindFactoriesForPlugInTypeInPlugIn'); - late final _CFPlugInFindFactoriesForPlugInTypeInPlugIn = - _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr.asFunction< - CFArrayRef Function(CFUUIDRef, CFPlugInRef)>(); + late final _CFUUIDCreatePtr = + _lookup>( + 'CFUUIDCreate'); + late final _CFUUIDCreate = + _CFUUIDCreatePtr.asFunction(); - ffi.Pointer CFPlugInInstanceCreate( - CFAllocatorRef allocator, - CFUUIDRef factoryUUID, - CFUUIDRef typeUUID, + CFUUIDRef CFUUIDCreateWithBytes( + CFAllocatorRef alloc, + int byte0, + int byte1, + int byte2, + int byte3, + int byte4, + int byte5, + int byte6, + int byte7, + int byte8, + int byte9, + int byte10, + int byte11, + int byte12, + int byte13, + int byte14, + int byte15, ) { - return _CFPlugInInstanceCreate( - allocator, - factoryUUID, - typeUUID, + return _CFUUIDCreateWithBytes( + alloc, + byte0, + byte1, + byte2, + byte3, + byte4, + byte5, + byte6, + byte7, + byte8, + byte9, + byte10, + byte11, + byte12, + byte13, + byte14, + byte15, ); } - late final _CFPlugInInstanceCreatePtr = _lookup< + late final _CFUUIDCreateWithBytesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef, CFUUIDRef, CFUUIDRef)>>('CFPlugInInstanceCreate'); - late final _CFPlugInInstanceCreate = _CFPlugInInstanceCreatePtr.asFunction< - ffi.Pointer Function(CFAllocatorRef, CFUUIDRef, CFUUIDRef)>(); + CFUUIDRef Function( + CFAllocatorRef, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8)>>('CFUUIDCreateWithBytes'); + late final _CFUUIDCreateWithBytes = _CFUUIDCreateWithBytesPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int)>(); - int CFPlugInRegisterFactoryFunction( - CFUUIDRef factoryUUID, - CFPlugInFactoryFunction func, + CFUUIDRef CFUUIDCreateFromString( + CFAllocatorRef alloc, + CFStringRef uuidStr, ) { - return _CFPlugInRegisterFactoryFunction( - factoryUUID, - func, + return _CFUUIDCreateFromString( + alloc, + uuidStr, ); } - late final _CFPlugInRegisterFactoryFunctionPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFUUIDRef, - CFPlugInFactoryFunction)>>('CFPlugInRegisterFactoryFunction'); - late final _CFPlugInRegisterFactoryFunction = - _CFPlugInRegisterFactoryFunctionPtr.asFunction< - int Function(CFUUIDRef, CFPlugInFactoryFunction)>(); + late final _CFUUIDCreateFromStringPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateFromString'); + late final _CFUUIDCreateFromString = _CFUUIDCreateFromStringPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, CFStringRef)>(); - int CFPlugInRegisterFactoryFunctionByName( - CFUUIDRef factoryUUID, - CFPlugInRef plugIn, - CFStringRef functionName, + CFStringRef CFUUIDCreateString( + CFAllocatorRef alloc, + CFUUIDRef uuid, ) { - return _CFPlugInRegisterFactoryFunctionByName( - factoryUUID, - plugIn, - functionName, + return _CFUUIDCreateString( + alloc, + uuid, ); } - late final _CFPlugInRegisterFactoryFunctionByNamePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFUUIDRef, CFPlugInRef, - CFStringRef)>>('CFPlugInRegisterFactoryFunctionByName'); - late final _CFPlugInRegisterFactoryFunctionByName = - _CFPlugInRegisterFactoryFunctionByNamePtr.asFunction< - int Function(CFUUIDRef, CFPlugInRef, CFStringRef)>(); + late final _CFUUIDCreateStringPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateString'); + late final _CFUUIDCreateString = _CFUUIDCreateStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFUUIDRef)>(); - int CFPlugInUnregisterFactory( - CFUUIDRef factoryUUID, + CFUUIDRef CFUUIDGetConstantUUIDWithBytes( + CFAllocatorRef alloc, + int byte0, + int byte1, + int byte2, + int byte3, + int byte4, + int byte5, + int byte6, + int byte7, + int byte8, + int byte9, + int byte10, + int byte11, + int byte12, + int byte13, + int byte14, + int byte15, ) { - return _CFPlugInUnregisterFactory( - factoryUUID, - ); - } - - late final _CFPlugInUnregisterFactoryPtr = - _lookup>( - 'CFPlugInUnregisterFactory'); - late final _CFPlugInUnregisterFactory = - _CFPlugInUnregisterFactoryPtr.asFunction(); - - int CFPlugInRegisterPlugInType( - CFUUIDRef factoryUUID, - CFUUIDRef typeUUID, - ) { - return _CFPlugInRegisterPlugInType( - factoryUUID, - typeUUID, + return _CFUUIDGetConstantUUIDWithBytes( + alloc, + byte0, + byte1, + byte2, + byte3, + byte4, + byte5, + byte6, + byte7, + byte8, + byte9, + byte10, + byte11, + byte12, + byte13, + byte14, + byte15, ); } - late final _CFPlugInRegisterPlugInTypePtr = - _lookup>( - 'CFPlugInRegisterPlugInType'); - late final _CFPlugInRegisterPlugInType = _CFPlugInRegisterPlugInTypePtr - .asFunction(); + late final _CFUUIDGetConstantUUIDWithBytesPtr = _lookup< + ffi.NativeFunction< + CFUUIDRef Function( + CFAllocatorRef, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8)>>('CFUUIDGetConstantUUIDWithBytes'); + late final _CFUUIDGetConstantUUIDWithBytes = + _CFUUIDGetConstantUUIDWithBytesPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int)>(); - int CFPlugInUnregisterPlugInType( - CFUUIDRef factoryUUID, - CFUUIDRef typeUUID, + CFUUIDBytes CFUUIDGetUUIDBytes( + CFUUIDRef uuid, ) { - return _CFPlugInUnregisterPlugInType( - factoryUUID, - typeUUID, + return _CFUUIDGetUUIDBytes( + uuid, ); } - late final _CFPlugInUnregisterPlugInTypePtr = - _lookup>( - 'CFPlugInUnregisterPlugInType'); - late final _CFPlugInUnregisterPlugInType = _CFPlugInUnregisterPlugInTypePtr - .asFunction(); + late final _CFUUIDGetUUIDBytesPtr = + _lookup>( + 'CFUUIDGetUUIDBytes'); + late final _CFUUIDGetUUIDBytes = + _CFUUIDGetUUIDBytesPtr.asFunction(); - void CFPlugInAddInstanceForFactory( - CFUUIDRef factoryID, + CFUUIDRef CFUUIDCreateFromUUIDBytes( + CFAllocatorRef alloc, + CFUUIDBytes bytes, ) { - return _CFPlugInAddInstanceForFactory( - factoryID, + return _CFUUIDCreateFromUUIDBytes( + alloc, + bytes, ); } - late final _CFPlugInAddInstanceForFactoryPtr = - _lookup>( - 'CFPlugInAddInstanceForFactory'); - late final _CFPlugInAddInstanceForFactory = - _CFPlugInAddInstanceForFactoryPtr.asFunction(); + late final _CFUUIDCreateFromUUIDBytesPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateFromUUIDBytes'); + late final _CFUUIDCreateFromUUIDBytes = _CFUUIDCreateFromUUIDBytesPtr + .asFunction(); - void CFPlugInRemoveInstanceForFactory( - CFUUIDRef factoryID, - ) { - return _CFPlugInRemoveInstanceForFactory( - factoryID, - ); + CFURLRef CFCopyHomeDirectoryURL() { + return _CFCopyHomeDirectoryURL(); } - late final _CFPlugInRemoveInstanceForFactoryPtr = - _lookup>( - 'CFPlugInRemoveInstanceForFactory'); - late final _CFPlugInRemoveInstanceForFactory = - _CFPlugInRemoveInstanceForFactoryPtr.asFunction< - void Function(CFUUIDRef)>(); + late final _CFCopyHomeDirectoryURLPtr = + _lookup>( + 'CFCopyHomeDirectoryURL'); + late final _CFCopyHomeDirectoryURL = + _CFCopyHomeDirectoryURLPtr.asFunction(); - int CFPlugInInstanceGetInterfaceFunctionTable( - CFPlugInInstanceRef instance, - CFStringRef interfaceName, - ffi.Pointer> ftbl, - ) { - return _CFPlugInInstanceGetInterfaceFunctionTable( - instance, - interfaceName, - ftbl, - ); - } + late final ffi.Pointer _kCFBundleInfoDictionaryVersionKey = + _lookup('kCFBundleInfoDictionaryVersionKey'); - late final _CFPlugInInstanceGetInterfaceFunctionTablePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFPlugInInstanceRef, CFStringRef, - ffi.Pointer>)>>( - 'CFPlugInInstanceGetInterfaceFunctionTable'); - late final _CFPlugInInstanceGetInterfaceFunctionTable = - _CFPlugInInstanceGetInterfaceFunctionTablePtr.asFunction< - int Function(CFPlugInInstanceRef, CFStringRef, - ffi.Pointer>)>(); + CFStringRef get kCFBundleInfoDictionaryVersionKey => + _kCFBundleInfoDictionaryVersionKey.value; - CFStringRef CFPlugInInstanceGetFactoryName( - CFPlugInInstanceRef instance, - ) { - return _CFPlugInInstanceGetFactoryName( - instance, - ); - } + set kCFBundleInfoDictionaryVersionKey(CFStringRef value) => + _kCFBundleInfoDictionaryVersionKey.value = value; - late final _CFPlugInInstanceGetFactoryNamePtr = - _lookup>( - 'CFPlugInInstanceGetFactoryName'); - late final _CFPlugInInstanceGetFactoryName = - _CFPlugInInstanceGetFactoryNamePtr.asFunction< - CFStringRef Function(CFPlugInInstanceRef)>(); + late final ffi.Pointer _kCFBundleExecutableKey = + _lookup('kCFBundleExecutableKey'); - ffi.Pointer CFPlugInInstanceGetInstanceData( - CFPlugInInstanceRef instance, - ) { - return _CFPlugInInstanceGetInstanceData( - instance, - ); - } + CFStringRef get kCFBundleExecutableKey => _kCFBundleExecutableKey.value; - late final _CFPlugInInstanceGetInstanceDataPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFPlugInInstanceRef)>>('CFPlugInInstanceGetInstanceData'); - late final _CFPlugInInstanceGetInstanceData = - _CFPlugInInstanceGetInstanceDataPtr.asFunction< - ffi.Pointer Function(CFPlugInInstanceRef)>(); + set kCFBundleExecutableKey(CFStringRef value) => + _kCFBundleExecutableKey.value = value; - int CFPlugInInstanceGetTypeID() { - return _CFPlugInInstanceGetTypeID(); + late final ffi.Pointer _kCFBundleIdentifierKey = + _lookup('kCFBundleIdentifierKey'); + + CFStringRef get kCFBundleIdentifierKey => _kCFBundleIdentifierKey.value; + + set kCFBundleIdentifierKey(CFStringRef value) => + _kCFBundleIdentifierKey.value = value; + + late final ffi.Pointer _kCFBundleVersionKey = + _lookup('kCFBundleVersionKey'); + + CFStringRef get kCFBundleVersionKey => _kCFBundleVersionKey.value; + + set kCFBundleVersionKey(CFStringRef value) => + _kCFBundleVersionKey.value = value; + + late final ffi.Pointer _kCFBundleDevelopmentRegionKey = + _lookup('kCFBundleDevelopmentRegionKey'); + + CFStringRef get kCFBundleDevelopmentRegionKey => + _kCFBundleDevelopmentRegionKey.value; + + set kCFBundleDevelopmentRegionKey(CFStringRef value) => + _kCFBundleDevelopmentRegionKey.value = value; + + late final ffi.Pointer _kCFBundleNameKey = + _lookup('kCFBundleNameKey'); + + CFStringRef get kCFBundleNameKey => _kCFBundleNameKey.value; + + set kCFBundleNameKey(CFStringRef value) => _kCFBundleNameKey.value = value; + + late final ffi.Pointer _kCFBundleLocalizationsKey = + _lookup('kCFBundleLocalizationsKey'); + + CFStringRef get kCFBundleLocalizationsKey => _kCFBundleLocalizationsKey.value; + + set kCFBundleLocalizationsKey(CFStringRef value) => + _kCFBundleLocalizationsKey.value = value; + + CFBundleRef CFBundleGetMainBundle() { + return _CFBundleGetMainBundle(); } - late final _CFPlugInInstanceGetTypeIDPtr = - _lookup>( - 'CFPlugInInstanceGetTypeID'); - late final _CFPlugInInstanceGetTypeID = - _CFPlugInInstanceGetTypeIDPtr.asFunction(); + late final _CFBundleGetMainBundlePtr = + _lookup>( + 'CFBundleGetMainBundle'); + late final _CFBundleGetMainBundle = + _CFBundleGetMainBundlePtr.asFunction(); - CFPlugInInstanceRef CFPlugInInstanceCreateWithInstanceDataSize( - CFAllocatorRef allocator, - int instanceDataSize, - CFPlugInInstanceDeallocateInstanceDataFunction deallocateInstanceFunction, - CFStringRef factoryName, - CFPlugInInstanceGetInterfaceFunction getInterfaceFunction, + CFBundleRef CFBundleGetBundleWithIdentifier( + CFStringRef bundleID, ) { - return _CFPlugInInstanceCreateWithInstanceDataSize( - allocator, - instanceDataSize, - deallocateInstanceFunction, - factoryName, - getInterfaceFunction, + return _CFBundleGetBundleWithIdentifier( + bundleID, ); } - late final _CFPlugInInstanceCreateWithInstanceDataSizePtr = _lookup< - ffi.NativeFunction< - CFPlugInInstanceRef Function( - CFAllocatorRef, - CFIndex, - CFPlugInInstanceDeallocateInstanceDataFunction, - CFStringRef, - CFPlugInInstanceGetInterfaceFunction)>>( - 'CFPlugInInstanceCreateWithInstanceDataSize'); - late final _CFPlugInInstanceCreateWithInstanceDataSize = - _CFPlugInInstanceCreateWithInstanceDataSizePtr.asFunction< - CFPlugInInstanceRef Function( - CFAllocatorRef, - int, - CFPlugInInstanceDeallocateInstanceDataFunction, - CFStringRef, - CFPlugInInstanceGetInterfaceFunction)>(); + late final _CFBundleGetBundleWithIdentifierPtr = + _lookup>( + 'CFBundleGetBundleWithIdentifier'); + late final _CFBundleGetBundleWithIdentifier = + _CFBundleGetBundleWithIdentifierPtr.asFunction< + CFBundleRef Function(CFStringRef)>(); - int CFMachPortGetTypeID() { - return _CFMachPortGetTypeID(); + CFArrayRef CFBundleGetAllBundles() { + return _CFBundleGetAllBundles(); } - late final _CFMachPortGetTypeIDPtr = - _lookup>('CFMachPortGetTypeID'); - late final _CFMachPortGetTypeID = - _CFMachPortGetTypeIDPtr.asFunction(); + late final _CFBundleGetAllBundlesPtr = + _lookup>( + 'CFBundleGetAllBundles'); + late final _CFBundleGetAllBundles = + _CFBundleGetAllBundlesPtr.asFunction(); - CFMachPortRef CFMachPortCreate( + int CFBundleGetTypeID() { + return _CFBundleGetTypeID(); + } + + late final _CFBundleGetTypeIDPtr = + _lookup>('CFBundleGetTypeID'); + late final _CFBundleGetTypeID = + _CFBundleGetTypeIDPtr.asFunction(); + + CFBundleRef CFBundleCreate( CFAllocatorRef allocator, - CFMachPortCallBack callout, - ffi.Pointer context, - ffi.Pointer shouldFreeInfo, + CFURLRef bundleURL, ) { - return _CFMachPortCreate( + return _CFBundleCreate( allocator, - callout, - context, - shouldFreeInfo, + bundleURL, ); } - late final _CFMachPortCreatePtr = _lookup< - ffi.NativeFunction< - CFMachPortRef Function( - CFAllocatorRef, - CFMachPortCallBack, - ffi.Pointer, - ffi.Pointer)>>('CFMachPortCreate'); - late final _CFMachPortCreate = _CFMachPortCreatePtr.asFunction< - CFMachPortRef Function(CFAllocatorRef, CFMachPortCallBack, - ffi.Pointer, ffi.Pointer)>(); + late final _CFBundleCreatePtr = _lookup< + ffi.NativeFunction>( + 'CFBundleCreate'); + late final _CFBundleCreate = _CFBundleCreatePtr.asFunction< + CFBundleRef Function(CFAllocatorRef, CFURLRef)>(); - CFMachPortRef CFMachPortCreateWithPort( + CFArrayRef CFBundleCreateBundlesFromDirectory( CFAllocatorRef allocator, - int portNum, - CFMachPortCallBack callout, - ffi.Pointer context, - ffi.Pointer shouldFreeInfo, + CFURLRef directoryURL, + CFStringRef bundleType, ) { - return _CFMachPortCreateWithPort( + return _CFBundleCreateBundlesFromDirectory( allocator, - portNum, - callout, - context, - shouldFreeInfo, + directoryURL, + bundleType, ); } - late final _CFMachPortCreateWithPortPtr = _lookup< + late final _CFBundleCreateBundlesFromDirectoryPtr = _lookup< ffi.NativeFunction< - CFMachPortRef Function( - CFAllocatorRef, - mach_port_t, - CFMachPortCallBack, - ffi.Pointer, - ffi.Pointer)>>('CFMachPortCreateWithPort'); - late final _CFMachPortCreateWithPort = - _CFMachPortCreateWithPortPtr.asFunction< - CFMachPortRef Function(CFAllocatorRef, int, CFMachPortCallBack, - ffi.Pointer, ffi.Pointer)>(); + CFArrayRef Function(CFAllocatorRef, CFURLRef, + CFStringRef)>>('CFBundleCreateBundlesFromDirectory'); + late final _CFBundleCreateBundlesFromDirectory = + _CFBundleCreateBundlesFromDirectoryPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); - int CFMachPortGetPort( - CFMachPortRef port, + CFURLRef CFBundleCopyBundleURL( + CFBundleRef bundle, ) { - return _CFMachPortGetPort( - port, + return _CFBundleCopyBundleURL( + bundle, ); } - late final _CFMachPortGetPortPtr = - _lookup>( - 'CFMachPortGetPort'); - late final _CFMachPortGetPort = - _CFMachPortGetPortPtr.asFunction(); + late final _CFBundleCopyBundleURLPtr = + _lookup>( + 'CFBundleCopyBundleURL'); + late final _CFBundleCopyBundleURL = + _CFBundleCopyBundleURLPtr.asFunction(); - void CFMachPortGetContext( - CFMachPortRef port, - ffi.Pointer context, + CFTypeRef CFBundleGetValueForInfoDictionaryKey( + CFBundleRef bundle, + CFStringRef key, ) { - return _CFMachPortGetContext( - port, - context, + return _CFBundleGetValueForInfoDictionaryKey( + bundle, + key, ); } - late final _CFMachPortGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMachPortRef, - ffi.Pointer)>>('CFMachPortGetContext'); - late final _CFMachPortGetContext = _CFMachPortGetContextPtr.asFunction< - void Function(CFMachPortRef, ffi.Pointer)>(); + late final _CFBundleGetValueForInfoDictionaryKeyPtr = + _lookup>( + 'CFBundleGetValueForInfoDictionaryKey'); + late final _CFBundleGetValueForInfoDictionaryKey = + _CFBundleGetValueForInfoDictionaryKeyPtr.asFunction< + CFTypeRef Function(CFBundleRef, CFStringRef)>(); - void CFMachPortInvalidate( - CFMachPortRef port, + CFDictionaryRef CFBundleGetInfoDictionary( + CFBundleRef bundle, ) { - return _CFMachPortInvalidate( - port, + return _CFBundleGetInfoDictionary( + bundle, ); } - late final _CFMachPortInvalidatePtr = - _lookup>( - 'CFMachPortInvalidate'); - late final _CFMachPortInvalidate = - _CFMachPortInvalidatePtr.asFunction(); + late final _CFBundleGetInfoDictionaryPtr = + _lookup>( + 'CFBundleGetInfoDictionary'); + late final _CFBundleGetInfoDictionary = _CFBundleGetInfoDictionaryPtr + .asFunction(); - int CFMachPortIsValid( - CFMachPortRef port, + CFDictionaryRef CFBundleGetLocalInfoDictionary( + CFBundleRef bundle, ) { - return _CFMachPortIsValid( - port, + return _CFBundleGetLocalInfoDictionary( + bundle, ); } - late final _CFMachPortIsValidPtr = - _lookup>( - 'CFMachPortIsValid'); - late final _CFMachPortIsValid = - _CFMachPortIsValidPtr.asFunction(); + late final _CFBundleGetLocalInfoDictionaryPtr = + _lookup>( + 'CFBundleGetLocalInfoDictionary'); + late final _CFBundleGetLocalInfoDictionary = + _CFBundleGetLocalInfoDictionaryPtr.asFunction< + CFDictionaryRef Function(CFBundleRef)>(); - CFMachPortInvalidationCallBack CFMachPortGetInvalidationCallBack( - CFMachPortRef port, + void CFBundleGetPackageInfo( + CFBundleRef bundle, + ffi.Pointer packageType, + ffi.Pointer packageCreator, ) { - return _CFMachPortGetInvalidationCallBack( - port, + return _CFBundleGetPackageInfo( + bundle, + packageType, + packageCreator, ); } - late final _CFMachPortGetInvalidationCallBackPtr = _lookup< + late final _CFBundleGetPackageInfoPtr = _lookup< ffi.NativeFunction< - CFMachPortInvalidationCallBack Function( - CFMachPortRef)>>('CFMachPortGetInvalidationCallBack'); - late final _CFMachPortGetInvalidationCallBack = - _CFMachPortGetInvalidationCallBackPtr.asFunction< - CFMachPortInvalidationCallBack Function(CFMachPortRef)>(); + ffi.Void Function(CFBundleRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleGetPackageInfo'); + late final _CFBundleGetPackageInfo = _CFBundleGetPackageInfoPtr.asFunction< + void Function(CFBundleRef, ffi.Pointer, ffi.Pointer)>(); - void CFMachPortSetInvalidationCallBack( - CFMachPortRef port, - CFMachPortInvalidationCallBack callout, + CFStringRef CFBundleGetIdentifier( + CFBundleRef bundle, ) { - return _CFMachPortSetInvalidationCallBack( - port, - callout, + return _CFBundleGetIdentifier( + bundle, ); } - late final _CFMachPortSetInvalidationCallBackPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMachPortRef, CFMachPortInvalidationCallBack)>>( - 'CFMachPortSetInvalidationCallBack'); - late final _CFMachPortSetInvalidationCallBack = - _CFMachPortSetInvalidationCallBackPtr.asFunction< - void Function(CFMachPortRef, CFMachPortInvalidationCallBack)>(); + late final _CFBundleGetIdentifierPtr = + _lookup>( + 'CFBundleGetIdentifier'); + late final _CFBundleGetIdentifier = + _CFBundleGetIdentifierPtr.asFunction(); - CFRunLoopSourceRef CFMachPortCreateRunLoopSource( - CFAllocatorRef allocator, - CFMachPortRef port, - int order, + int CFBundleGetVersionNumber( + CFBundleRef bundle, ) { - return _CFMachPortCreateRunLoopSource( - allocator, - port, - order, + return _CFBundleGetVersionNumber( + bundle, ); } - late final _CFMachPortCreateRunLoopSourcePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, - CFIndex)>>('CFMachPortCreateRunLoopSource'); - late final _CFMachPortCreateRunLoopSource = - _CFMachPortCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, int)>(); + late final _CFBundleGetVersionNumberPtr = + _lookup>( + 'CFBundleGetVersionNumber'); + late final _CFBundleGetVersionNumber = + _CFBundleGetVersionNumberPtr.asFunction(); - int CFAttributedStringGetTypeID() { - return _CFAttributedStringGetTypeID(); + CFStringRef CFBundleGetDevelopmentRegion( + CFBundleRef bundle, + ) { + return _CFBundleGetDevelopmentRegion( + bundle, + ); } - late final _CFAttributedStringGetTypeIDPtr = - _lookup>( - 'CFAttributedStringGetTypeID'); - late final _CFAttributedStringGetTypeID = - _CFAttributedStringGetTypeIDPtr.asFunction(); + late final _CFBundleGetDevelopmentRegionPtr = + _lookup>( + 'CFBundleGetDevelopmentRegion'); + late final _CFBundleGetDevelopmentRegion = _CFBundleGetDevelopmentRegionPtr + .asFunction(); - CFAttributedStringRef CFAttributedStringCreate( - CFAllocatorRef alloc, - CFStringRef str, - CFDictionaryRef attributes, + CFURLRef CFBundleCopySupportFilesDirectoryURL( + CFBundleRef bundle, ) { - return _CFAttributedStringCreate( - alloc, - str, - attributes, + return _CFBundleCopySupportFilesDirectoryURL( + bundle, ); } - late final _CFAttributedStringCreatePtr = _lookup< - ffi.NativeFunction< - CFAttributedStringRef Function(CFAllocatorRef, CFStringRef, - CFDictionaryRef)>>('CFAttributedStringCreate'); - late final _CFAttributedStringCreate = - _CFAttributedStringCreatePtr.asFunction< - CFAttributedStringRef Function( - CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); + late final _CFBundleCopySupportFilesDirectoryURLPtr = + _lookup>( + 'CFBundleCopySupportFilesDirectoryURL'); + late final _CFBundleCopySupportFilesDirectoryURL = + _CFBundleCopySupportFilesDirectoryURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - CFAttributedStringRef CFAttributedStringCreateWithSubstring( - CFAllocatorRef alloc, - CFAttributedStringRef aStr, - CFRange range, + CFURLRef CFBundleCopyResourcesDirectoryURL( + CFBundleRef bundle, ) { - return _CFAttributedStringCreateWithSubstring( - alloc, - aStr, - range, + return _CFBundleCopyResourcesDirectoryURL( + bundle, ); } - late final _CFAttributedStringCreateWithSubstringPtr = _lookup< - ffi.NativeFunction< - CFAttributedStringRef Function(CFAllocatorRef, CFAttributedStringRef, - CFRange)>>('CFAttributedStringCreateWithSubstring'); - late final _CFAttributedStringCreateWithSubstring = - _CFAttributedStringCreateWithSubstringPtr.asFunction< - CFAttributedStringRef Function( - CFAllocatorRef, CFAttributedStringRef, CFRange)>(); + late final _CFBundleCopyResourcesDirectoryURLPtr = + _lookup>( + 'CFBundleCopyResourcesDirectoryURL'); + late final _CFBundleCopyResourcesDirectoryURL = + _CFBundleCopyResourcesDirectoryURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - CFAttributedStringRef CFAttributedStringCreateCopy( - CFAllocatorRef alloc, - CFAttributedStringRef aStr, + CFURLRef CFBundleCopyPrivateFrameworksURL( + CFBundleRef bundle, ) { - return _CFAttributedStringCreateCopy( - alloc, - aStr, + return _CFBundleCopyPrivateFrameworksURL( + bundle, ); } - late final _CFAttributedStringCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFAttributedStringRef Function(CFAllocatorRef, - CFAttributedStringRef)>>('CFAttributedStringCreateCopy'); - late final _CFAttributedStringCreateCopy = - _CFAttributedStringCreateCopyPtr.asFunction< - CFAttributedStringRef Function( - CFAllocatorRef, CFAttributedStringRef)>(); + late final _CFBundleCopyPrivateFrameworksURLPtr = + _lookup>( + 'CFBundleCopyPrivateFrameworksURL'); + late final _CFBundleCopyPrivateFrameworksURL = + _CFBundleCopyPrivateFrameworksURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - CFStringRef CFAttributedStringGetString( - CFAttributedStringRef aStr, + CFURLRef CFBundleCopySharedFrameworksURL( + CFBundleRef bundle, ) { - return _CFAttributedStringGetString( - aStr, + return _CFBundleCopySharedFrameworksURL( + bundle, ); } - late final _CFAttributedStringGetStringPtr = - _lookup>( - 'CFAttributedStringGetString'); - late final _CFAttributedStringGetString = _CFAttributedStringGetStringPtr - .asFunction(); + late final _CFBundleCopySharedFrameworksURLPtr = + _lookup>( + 'CFBundleCopySharedFrameworksURL'); + late final _CFBundleCopySharedFrameworksURL = + _CFBundleCopySharedFrameworksURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - int CFAttributedStringGetLength( - CFAttributedStringRef aStr, + CFURLRef CFBundleCopySharedSupportURL( + CFBundleRef bundle, ) { - return _CFAttributedStringGetLength( - aStr, + return _CFBundleCopySharedSupportURL( + bundle, ); } - late final _CFAttributedStringGetLengthPtr = - _lookup>( - 'CFAttributedStringGetLength'); - late final _CFAttributedStringGetLength = _CFAttributedStringGetLengthPtr - .asFunction(); + late final _CFBundleCopySharedSupportURLPtr = + _lookup>( + 'CFBundleCopySharedSupportURL'); + late final _CFBundleCopySharedSupportURL = _CFBundleCopySharedSupportURLPtr + .asFunction(); - CFDictionaryRef CFAttributedStringGetAttributes( - CFAttributedStringRef aStr, - int loc, - ffi.Pointer effectiveRange, + CFURLRef CFBundleCopyBuiltInPlugInsURL( + CFBundleRef bundle, ) { - return _CFAttributedStringGetAttributes( - aStr, - loc, - effectiveRange, + return _CFBundleCopyBuiltInPlugInsURL( + bundle, ); } - late final _CFAttributedStringGetAttributesPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFAttributedStringRef, CFIndex, - ffi.Pointer)>>('CFAttributedStringGetAttributes'); - late final _CFAttributedStringGetAttributes = - _CFAttributedStringGetAttributesPtr.asFunction< - CFDictionaryRef Function( - CFAttributedStringRef, int, ffi.Pointer)>(); + late final _CFBundleCopyBuiltInPlugInsURLPtr = + _lookup>( + 'CFBundleCopyBuiltInPlugInsURL'); + late final _CFBundleCopyBuiltInPlugInsURL = _CFBundleCopyBuiltInPlugInsURLPtr + .asFunction(); - CFTypeRef CFAttributedStringGetAttribute( - CFAttributedStringRef aStr, - int loc, - CFStringRef attrName, - ffi.Pointer effectiveRange, + CFDictionaryRef CFBundleCopyInfoDictionaryInDirectory( + CFURLRef bundleURL, ) { - return _CFAttributedStringGetAttribute( - aStr, - loc, - attrName, - effectiveRange, + return _CFBundleCopyInfoDictionaryInDirectory( + bundleURL, ); } - late final _CFAttributedStringGetAttributePtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFAttributedStringRef, CFIndex, CFStringRef, - ffi.Pointer)>>('CFAttributedStringGetAttribute'); - late final _CFAttributedStringGetAttribute = - _CFAttributedStringGetAttributePtr.asFunction< - CFTypeRef Function( - CFAttributedStringRef, int, CFStringRef, ffi.Pointer)>(); + late final _CFBundleCopyInfoDictionaryInDirectoryPtr = + _lookup>( + 'CFBundleCopyInfoDictionaryInDirectory'); + late final _CFBundleCopyInfoDictionaryInDirectory = + _CFBundleCopyInfoDictionaryInDirectoryPtr.asFunction< + CFDictionaryRef Function(CFURLRef)>(); - CFDictionaryRef CFAttributedStringGetAttributesAndLongestEffectiveRange( - CFAttributedStringRef aStr, - int loc, - CFRange inRange, - ffi.Pointer longestEffectiveRange, + int CFBundleGetPackageInfoInDirectory( + CFURLRef url, + ffi.Pointer packageType, + ffi.Pointer packageCreator, ) { - return _CFAttributedStringGetAttributesAndLongestEffectiveRange( - aStr, - loc, - inRange, - longestEffectiveRange, + return _CFBundleGetPackageInfoInDirectory( + url, + packageType, + packageCreator, ); } - late final _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr = - _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFAttributedStringRef, CFIndex, - CFRange, ffi.Pointer)>>( - 'CFAttributedStringGetAttributesAndLongestEffectiveRange'); - late final _CFAttributedStringGetAttributesAndLongestEffectiveRange = - _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr.asFunction< - CFDictionaryRef Function( - CFAttributedStringRef, int, CFRange, ffi.Pointer)>(); + late final _CFBundleGetPackageInfoInDirectoryPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleGetPackageInfoInDirectory'); + late final _CFBundleGetPackageInfoInDirectory = + _CFBundleGetPackageInfoInDirectoryPtr.asFunction< + int Function(CFURLRef, ffi.Pointer, ffi.Pointer)>(); - CFTypeRef CFAttributedStringGetAttributeAndLongestEffectiveRange( - CFAttributedStringRef aStr, - int loc, - CFStringRef attrName, - CFRange inRange, - ffi.Pointer longestEffectiveRange, + CFURLRef CFBundleCopyResourceURL( + CFBundleRef bundle, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _CFAttributedStringGetAttributeAndLongestEffectiveRange( - aStr, - loc, - attrName, - inRange, - longestEffectiveRange, + return _CFBundleCopyResourceURL( + bundle, + resourceName, + resourceType, + subDirName, ); } - late final _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr = - _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFAttributedStringRef, CFIndex, - CFStringRef, CFRange, ffi.Pointer)>>( - 'CFAttributedStringGetAttributeAndLongestEffectiveRange'); - late final _CFAttributedStringGetAttributeAndLongestEffectiveRange = - _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr.asFunction< - CFTypeRef Function(CFAttributedStringRef, int, CFStringRef, CFRange, - ffi.Pointer)>(); + late final _CFBundleCopyResourceURLPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURL'); + late final _CFBundleCopyResourceURL = _CFBundleCopyResourceURLPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); - CFMutableAttributedStringRef CFAttributedStringCreateMutableCopy( - CFAllocatorRef alloc, - int maxLength, - CFAttributedStringRef aStr, + CFArrayRef CFBundleCopyResourceURLsOfType( + CFBundleRef bundle, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _CFAttributedStringCreateMutableCopy( - alloc, - maxLength, - aStr, + return _CFBundleCopyResourceURLsOfType( + bundle, + resourceType, + subDirName, ); } - late final _CFAttributedStringCreateMutableCopyPtr = _lookup< + late final _CFBundleCopyResourceURLsOfTypePtr = _lookup< ffi.NativeFunction< - CFMutableAttributedStringRef Function(CFAllocatorRef, CFIndex, - CFAttributedStringRef)>>('CFAttributedStringCreateMutableCopy'); - late final _CFAttributedStringCreateMutableCopy = - _CFAttributedStringCreateMutableCopyPtr.asFunction< - CFMutableAttributedStringRef Function( - CFAllocatorRef, int, CFAttributedStringRef)>(); + CFArrayRef Function(CFBundleRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfType'); + late final _CFBundleCopyResourceURLsOfType = + _CFBundleCopyResourceURLsOfTypePtr.asFunction< + CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef)>(); - CFMutableAttributedStringRef CFAttributedStringCreateMutable( - CFAllocatorRef alloc, - int maxLength, + CFStringRef CFBundleCopyLocalizedString( + CFBundleRef bundle, + CFStringRef key, + CFStringRef value, + CFStringRef tableName, ) { - return _CFAttributedStringCreateMutable( - alloc, - maxLength, + return _CFBundleCopyLocalizedString( + bundle, + key, + value, + tableName, ); } - late final _CFAttributedStringCreateMutablePtr = _lookup< + late final _CFBundleCopyLocalizedStringPtr = _lookup< ffi.NativeFunction< - CFMutableAttributedStringRef Function( - CFAllocatorRef, CFIndex)>>('CFAttributedStringCreateMutable'); - late final _CFAttributedStringCreateMutable = - _CFAttributedStringCreateMutablePtr.asFunction< - CFMutableAttributedStringRef Function(CFAllocatorRef, int)>(); + CFStringRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyLocalizedString'); + late final _CFBundleCopyLocalizedString = + _CFBundleCopyLocalizedStringPtr.asFunction< + CFStringRef Function( + CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); - void CFAttributedStringReplaceString( - CFMutableAttributedStringRef aStr, - CFRange range, - CFStringRef replacement, + CFURLRef CFBundleCopyResourceURLInDirectory( + CFURLRef bundleURL, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _CFAttributedStringReplaceString( - aStr, - range, - replacement, + return _CFBundleCopyResourceURLInDirectory( + bundleURL, + resourceName, + resourceType, + subDirName, ); } - late final _CFAttributedStringReplaceStringPtr = _lookup< + late final _CFBundleCopyResourceURLInDirectoryPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFStringRef)>>('CFAttributedStringReplaceString'); - late final _CFAttributedStringReplaceString = - _CFAttributedStringReplaceStringPtr.asFunction< - void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); + CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLInDirectory'); + late final _CFBundleCopyResourceURLInDirectory = + _CFBundleCopyResourceURLInDirectoryPtr.asFunction< + CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, CFStringRef)>(); - CFMutableStringRef CFAttributedStringGetMutableString( - CFMutableAttributedStringRef aStr, + CFArrayRef CFBundleCopyResourceURLsOfTypeInDirectory( + CFURLRef bundleURL, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _CFAttributedStringGetMutableString( - aStr, + return _CFBundleCopyResourceURLsOfTypeInDirectory( + bundleURL, + resourceType, + subDirName, ); } - late final _CFAttributedStringGetMutableStringPtr = _lookup< - ffi.NativeFunction< - CFMutableStringRef Function(CFMutableAttributedStringRef)>>( - 'CFAttributedStringGetMutableString'); - late final _CFAttributedStringGetMutableString = - _CFAttributedStringGetMutableStringPtr.asFunction< - CFMutableStringRef Function(CFMutableAttributedStringRef)>(); + late final _CFBundleCopyResourceURLsOfTypeInDirectoryPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFURLRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfTypeInDirectory'); + late final _CFBundleCopyResourceURLsOfTypeInDirectory = + _CFBundleCopyResourceURLsOfTypeInDirectoryPtr.asFunction< + CFArrayRef Function(CFURLRef, CFStringRef, CFStringRef)>(); - void CFAttributedStringSetAttributes( - CFMutableAttributedStringRef aStr, - CFRange range, - CFDictionaryRef replacement, - int clearOtherAttributes, + CFArrayRef CFBundleCopyBundleLocalizations( + CFBundleRef bundle, ) { - return _CFAttributedStringSetAttributes( - aStr, - range, - replacement, - clearOtherAttributes, + return _CFBundleCopyBundleLocalizations( + bundle, ); } - late final _CFAttributedStringSetAttributesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFDictionaryRef, Boolean)>>('CFAttributedStringSetAttributes'); - late final _CFAttributedStringSetAttributes = - _CFAttributedStringSetAttributesPtr.asFunction< - void Function( - CFMutableAttributedStringRef, CFRange, CFDictionaryRef, int)>(); + late final _CFBundleCopyBundleLocalizationsPtr = + _lookup>( + 'CFBundleCopyBundleLocalizations'); + late final _CFBundleCopyBundleLocalizations = + _CFBundleCopyBundleLocalizationsPtr.asFunction< + CFArrayRef Function(CFBundleRef)>(); - void CFAttributedStringSetAttribute( - CFMutableAttributedStringRef aStr, - CFRange range, - CFStringRef attrName, - CFTypeRef value, + CFArrayRef CFBundleCopyPreferredLocalizationsFromArray( + CFArrayRef locArray, ) { - return _CFAttributedStringSetAttribute( - aStr, - range, - attrName, - value, + return _CFBundleCopyPreferredLocalizationsFromArray( + locArray, ); } - late final _CFAttributedStringSetAttributePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, CFStringRef, - CFTypeRef)>>('CFAttributedStringSetAttribute'); - late final _CFAttributedStringSetAttribute = - _CFAttributedStringSetAttributePtr.asFunction< - void Function( - CFMutableAttributedStringRef, CFRange, CFStringRef, CFTypeRef)>(); + late final _CFBundleCopyPreferredLocalizationsFromArrayPtr = + _lookup>( + 'CFBundleCopyPreferredLocalizationsFromArray'); + late final _CFBundleCopyPreferredLocalizationsFromArray = + _CFBundleCopyPreferredLocalizationsFromArrayPtr.asFunction< + CFArrayRef Function(CFArrayRef)>(); - void CFAttributedStringRemoveAttribute( - CFMutableAttributedStringRef aStr, - CFRange range, - CFStringRef attrName, + CFArrayRef CFBundleCopyLocalizationsForPreferences( + CFArrayRef locArray, + CFArrayRef prefArray, ) { - return _CFAttributedStringRemoveAttribute( - aStr, - range, - attrName, + return _CFBundleCopyLocalizationsForPreferences( + locArray, + prefArray, ); } - late final _CFAttributedStringRemoveAttributePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFStringRef)>>('CFAttributedStringRemoveAttribute'); - late final _CFAttributedStringRemoveAttribute = - _CFAttributedStringRemoveAttributePtr.asFunction< - void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); + late final _CFBundleCopyLocalizationsForPreferencesPtr = + _lookup>( + 'CFBundleCopyLocalizationsForPreferences'); + late final _CFBundleCopyLocalizationsForPreferences = + _CFBundleCopyLocalizationsForPreferencesPtr.asFunction< + CFArrayRef Function(CFArrayRef, CFArrayRef)>(); - void CFAttributedStringReplaceAttributedString( - CFMutableAttributedStringRef aStr, - CFRange range, - CFAttributedStringRef replacement, + CFURLRef CFBundleCopyResourceURLForLocalization( + CFBundleRef bundle, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, + CFStringRef localizationName, ) { - return _CFAttributedStringReplaceAttributedString( - aStr, - range, - replacement, + return _CFBundleCopyResourceURLForLocalization( + bundle, + resourceName, + resourceType, + subDirName, + localizationName, ); } - late final _CFAttributedStringReplaceAttributedStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFAttributedStringRef)>>( - 'CFAttributedStringReplaceAttributedString'); - late final _CFAttributedStringReplaceAttributedString = - _CFAttributedStringReplaceAttributedStringPtr.asFunction< - void Function( - CFMutableAttributedStringRef, CFRange, CFAttributedStringRef)>(); + late final _CFBundleCopyResourceURLForLocalizationPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLForLocalization'); + late final _CFBundleCopyResourceURLForLocalization = + _CFBundleCopyResourceURLForLocalizationPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>(); - void CFAttributedStringBeginEditing( - CFMutableAttributedStringRef aStr, + CFArrayRef CFBundleCopyResourceURLsOfTypeForLocalization( + CFBundleRef bundle, + CFStringRef resourceType, + CFStringRef subDirName, + CFStringRef localizationName, ) { - return _CFAttributedStringBeginEditing( - aStr, + return _CFBundleCopyResourceURLsOfTypeForLocalization( + bundle, + resourceType, + subDirName, + localizationName, ); } - late final _CFAttributedStringBeginEditingPtr = _lookup< - ffi.NativeFunction>( - 'CFAttributedStringBeginEditing'); - late final _CFAttributedStringBeginEditing = - _CFAttributedStringBeginEditingPtr.asFunction< - void Function(CFMutableAttributedStringRef)>(); + late final _CFBundleCopyResourceURLsOfTypeForLocalizationPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfTypeForLocalization'); + late final _CFBundleCopyResourceURLsOfTypeForLocalization = + _CFBundleCopyResourceURLsOfTypeForLocalizationPtr.asFunction< + CFArrayRef Function( + CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); - void CFAttributedStringEndEditing( - CFMutableAttributedStringRef aStr, + CFDictionaryRef CFBundleCopyInfoDictionaryForURL( + CFURLRef url, ) { - return _CFAttributedStringEndEditing( - aStr, + return _CFBundleCopyInfoDictionaryForURL( + url, ); } - late final _CFAttributedStringEndEditingPtr = _lookup< - ffi.NativeFunction>( - 'CFAttributedStringEndEditing'); - late final _CFAttributedStringEndEditing = _CFAttributedStringEndEditingPtr - .asFunction(); + late final _CFBundleCopyInfoDictionaryForURLPtr = + _lookup>( + 'CFBundleCopyInfoDictionaryForURL'); + late final _CFBundleCopyInfoDictionaryForURL = + _CFBundleCopyInfoDictionaryForURLPtr.asFunction< + CFDictionaryRef Function(CFURLRef)>(); - int CFURLEnumeratorGetTypeID() { - return _CFURLEnumeratorGetTypeID(); + CFArrayRef CFBundleCopyLocalizationsForURL( + CFURLRef url, + ) { + return _CFBundleCopyLocalizationsForURL( + url, + ); } - late final _CFURLEnumeratorGetTypeIDPtr = - _lookup>( - 'CFURLEnumeratorGetTypeID'); - late final _CFURLEnumeratorGetTypeID = - _CFURLEnumeratorGetTypeIDPtr.asFunction(); + late final _CFBundleCopyLocalizationsForURLPtr = + _lookup>( + 'CFBundleCopyLocalizationsForURL'); + late final _CFBundleCopyLocalizationsForURL = + _CFBundleCopyLocalizationsForURLPtr.asFunction< + CFArrayRef Function(CFURLRef)>(); - CFURLEnumeratorRef CFURLEnumeratorCreateForDirectoryURL( - CFAllocatorRef alloc, - CFURLRef directoryURL, - int option, - CFArrayRef propertyKeys, + CFArrayRef CFBundleCopyExecutableArchitecturesForURL( + CFURLRef url, ) { - return _CFURLEnumeratorCreateForDirectoryURL( - alloc, - directoryURL, - option, - propertyKeys, + return _CFBundleCopyExecutableArchitecturesForURL( + url, ); } - late final _CFURLEnumeratorCreateForDirectoryURLPtr = _lookup< - ffi.NativeFunction< - CFURLEnumeratorRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, - CFArrayRef)>>('CFURLEnumeratorCreateForDirectoryURL'); - late final _CFURLEnumeratorCreateForDirectoryURL = - _CFURLEnumeratorCreateForDirectoryURLPtr.asFunction< - CFURLEnumeratorRef Function( - CFAllocatorRef, CFURLRef, int, CFArrayRef)>(); + late final _CFBundleCopyExecutableArchitecturesForURLPtr = + _lookup>( + 'CFBundleCopyExecutableArchitecturesForURL'); + late final _CFBundleCopyExecutableArchitecturesForURL = + _CFBundleCopyExecutableArchitecturesForURLPtr.asFunction< + CFArrayRef Function(CFURLRef)>(); - CFURLEnumeratorRef CFURLEnumeratorCreateForMountedVolumes( - CFAllocatorRef alloc, - int option, - CFArrayRef propertyKeys, + CFURLRef CFBundleCopyExecutableURL( + CFBundleRef bundle, ) { - return _CFURLEnumeratorCreateForMountedVolumes( - alloc, - option, - propertyKeys, + return _CFBundleCopyExecutableURL( + bundle, ); } - late final _CFURLEnumeratorCreateForMountedVolumesPtr = _lookup< - ffi.NativeFunction< - CFURLEnumeratorRef Function(CFAllocatorRef, ffi.Int32, - CFArrayRef)>>('CFURLEnumeratorCreateForMountedVolumes'); - late final _CFURLEnumeratorCreateForMountedVolumes = - _CFURLEnumeratorCreateForMountedVolumesPtr.asFunction< - CFURLEnumeratorRef Function(CFAllocatorRef, int, CFArrayRef)>(); + late final _CFBundleCopyExecutableURLPtr = + _lookup>( + 'CFBundleCopyExecutableURL'); + late final _CFBundleCopyExecutableURL = _CFBundleCopyExecutableURLPtr + .asFunction(); - int CFURLEnumeratorGetNextURL( - CFURLEnumeratorRef enumerator, - ffi.Pointer url, + CFArrayRef CFBundleCopyExecutableArchitectures( + CFBundleRef bundle, + ) { + return _CFBundleCopyExecutableArchitectures( + bundle, + ); + } + + late final _CFBundleCopyExecutableArchitecturesPtr = + _lookup>( + 'CFBundleCopyExecutableArchitectures'); + late final _CFBundleCopyExecutableArchitectures = + _CFBundleCopyExecutableArchitecturesPtr.asFunction< + CFArrayRef Function(CFBundleRef)>(); + + int CFBundlePreflightExecutable( + CFBundleRef bundle, ffi.Pointer error, ) { - return _CFURLEnumeratorGetNextURL( - enumerator, - url, + return _CFBundlePreflightExecutable( + bundle, error, ); } - late final _CFURLEnumeratorGetNextURLPtr = _lookup< + late final _CFBundlePreflightExecutablePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFURLEnumeratorRef, ffi.Pointer, - ffi.Pointer)>>('CFURLEnumeratorGetNextURL'); - late final _CFURLEnumeratorGetNextURL = - _CFURLEnumeratorGetNextURLPtr.asFunction< - int Function(CFURLEnumeratorRef, ffi.Pointer, - ffi.Pointer)>(); + Boolean Function(CFBundleRef, + ffi.Pointer)>>('CFBundlePreflightExecutable'); + late final _CFBundlePreflightExecutable = _CFBundlePreflightExecutablePtr + .asFunction)>(); - void CFURLEnumeratorSkipDescendents( - CFURLEnumeratorRef enumerator, + int CFBundleLoadExecutableAndReturnError( + CFBundleRef bundle, + ffi.Pointer error, ) { - return _CFURLEnumeratorSkipDescendents( - enumerator, + return _CFBundleLoadExecutableAndReturnError( + bundle, + error, ); } - late final _CFURLEnumeratorSkipDescendentsPtr = - _lookup>( - 'CFURLEnumeratorSkipDescendents'); - late final _CFURLEnumeratorSkipDescendents = - _CFURLEnumeratorSkipDescendentsPtr.asFunction< - void Function(CFURLEnumeratorRef)>(); + late final _CFBundleLoadExecutableAndReturnErrorPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBundleRef, ffi.Pointer)>>( + 'CFBundleLoadExecutableAndReturnError'); + late final _CFBundleLoadExecutableAndReturnError = + _CFBundleLoadExecutableAndReturnErrorPtr.asFunction< + int Function(CFBundleRef, ffi.Pointer)>(); - int CFURLEnumeratorGetDescendentLevel( - CFURLEnumeratorRef enumerator, + int CFBundleLoadExecutable( + CFBundleRef bundle, ) { - return _CFURLEnumeratorGetDescendentLevel( - enumerator, + return _CFBundleLoadExecutable( + bundle, ); } - late final _CFURLEnumeratorGetDescendentLevelPtr = - _lookup>( - 'CFURLEnumeratorGetDescendentLevel'); - late final _CFURLEnumeratorGetDescendentLevel = - _CFURLEnumeratorGetDescendentLevelPtr.asFunction< - int Function(CFURLEnumeratorRef)>(); + late final _CFBundleLoadExecutablePtr = + _lookup>( + 'CFBundleLoadExecutable'); + late final _CFBundleLoadExecutable = + _CFBundleLoadExecutablePtr.asFunction(); - int CFURLEnumeratorGetSourceDidChange( - CFURLEnumeratorRef enumerator, + int CFBundleIsExecutableLoaded( + CFBundleRef bundle, ) { - return _CFURLEnumeratorGetSourceDidChange( - enumerator, + return _CFBundleIsExecutableLoaded( + bundle, ); } - late final _CFURLEnumeratorGetSourceDidChangePtr = - _lookup>( - 'CFURLEnumeratorGetSourceDidChange'); - late final _CFURLEnumeratorGetSourceDidChange = - _CFURLEnumeratorGetSourceDidChangePtr.asFunction< - int Function(CFURLEnumeratorRef)>(); + late final _CFBundleIsExecutableLoadedPtr = + _lookup>( + 'CFBundleIsExecutableLoaded'); + late final _CFBundleIsExecutableLoaded = + _CFBundleIsExecutableLoadedPtr.asFunction(); - acl_t acl_dup( - acl_t acl, + void CFBundleUnloadExecutable( + CFBundleRef bundle, ) { - return _acl_dup( - acl, + return _CFBundleUnloadExecutable( + bundle, ); } - late final _acl_dupPtr = - _lookup>('acl_dup'); - late final _acl_dup = _acl_dupPtr.asFunction(); + late final _CFBundleUnloadExecutablePtr = + _lookup>( + 'CFBundleUnloadExecutable'); + late final _CFBundleUnloadExecutable = + _CFBundleUnloadExecutablePtr.asFunction(); - int acl_free( - ffi.Pointer obj_p, + ffi.Pointer CFBundleGetFunctionPointerForName( + CFBundleRef bundle, + CFStringRef functionName, ) { - return _acl_free( - obj_p, + return _CFBundleGetFunctionPointerForName( + bundle, + functionName, ); } - late final _acl_freePtr = - _lookup)>>( - 'acl_free'); - late final _acl_free = - _acl_freePtr.asFunction)>(); + late final _CFBundleGetFunctionPointerForNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFBundleRef, CFStringRef)>>('CFBundleGetFunctionPointerForName'); + late final _CFBundleGetFunctionPointerForName = + _CFBundleGetFunctionPointerForNamePtr.asFunction< + ffi.Pointer Function(CFBundleRef, CFStringRef)>(); - acl_t acl_init( - int count, + void CFBundleGetFunctionPointersForNames( + CFBundleRef bundle, + CFArrayRef functionNames, + ffi.Pointer> ftbl, ) { - return _acl_init( - count, + return _CFBundleGetFunctionPointersForNames( + bundle, + functionNames, + ftbl, ); } - late final _acl_initPtr = - _lookup>('acl_init'); - late final _acl_init = _acl_initPtr.asFunction(); + late final _CFBundleGetFunctionPointersForNamesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBundleRef, CFArrayRef, + ffi.Pointer>)>>( + 'CFBundleGetFunctionPointersForNames'); + late final _CFBundleGetFunctionPointersForNames = + _CFBundleGetFunctionPointersForNamesPtr.asFunction< + void Function( + CFBundleRef, CFArrayRef, ffi.Pointer>)>(); - int acl_copy_entry( - acl_entry_t dest_d, - acl_entry_t src_d, + ffi.Pointer CFBundleGetDataPointerForName( + CFBundleRef bundle, + CFStringRef symbolName, ) { - return _acl_copy_entry( - dest_d, - src_d, + return _CFBundleGetDataPointerForName( + bundle, + symbolName, ); } - late final _acl_copy_entryPtr = - _lookup>( - 'acl_copy_entry'); - late final _acl_copy_entry = - _acl_copy_entryPtr.asFunction(); + late final _CFBundleGetDataPointerForNamePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFBundleRef, CFStringRef)>>('CFBundleGetDataPointerForName'); + late final _CFBundleGetDataPointerForName = _CFBundleGetDataPointerForNamePtr + .asFunction Function(CFBundleRef, CFStringRef)>(); - int acl_create_entry( - ffi.Pointer acl_p, - ffi.Pointer entry_p, + void CFBundleGetDataPointersForNames( + CFBundleRef bundle, + CFArrayRef symbolNames, + ffi.Pointer> stbl, ) { - return _acl_create_entry( - acl_p, - entry_p, + return _CFBundleGetDataPointersForNames( + bundle, + symbolNames, + stbl, ); } - late final _acl_create_entryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('acl_create_entry'); - late final _acl_create_entry = _acl_create_entryPtr - .asFunction, ffi.Pointer)>(); + late final _CFBundleGetDataPointersForNamesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBundleRef, CFArrayRef, + ffi.Pointer>)>>( + 'CFBundleGetDataPointersForNames'); + late final _CFBundleGetDataPointersForNames = + _CFBundleGetDataPointersForNamesPtr.asFunction< + void Function( + CFBundleRef, CFArrayRef, ffi.Pointer>)>(); - int acl_create_entry_np( - ffi.Pointer acl_p, - ffi.Pointer entry_p, - int entry_index, + CFURLRef CFBundleCopyAuxiliaryExecutableURL( + CFBundleRef bundle, + CFStringRef executableName, ) { - return _acl_create_entry_np( - acl_p, - entry_p, - entry_index, + return _CFBundleCopyAuxiliaryExecutableURL( + bundle, + executableName, ); } - late final _acl_create_entry_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('acl_create_entry_np'); - late final _acl_create_entry_np = _acl_create_entry_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _CFBundleCopyAuxiliaryExecutableURLPtr = + _lookup>( + 'CFBundleCopyAuxiliaryExecutableURL'); + late final _CFBundleCopyAuxiliaryExecutableURL = + _CFBundleCopyAuxiliaryExecutableURLPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef)>(); - int acl_delete_entry( - acl_t acl, - acl_entry_t entry_d, + int CFBundleIsExecutableLoadable( + CFBundleRef bundle, ) { - return _acl_delete_entry( - acl, - entry_d, + return _CFBundleIsExecutableLoadable( + bundle, ); } - late final _acl_delete_entryPtr = - _lookup>( - 'acl_delete_entry'); - late final _acl_delete_entry = - _acl_delete_entryPtr.asFunction(); + late final _CFBundleIsExecutableLoadablePtr = + _lookup>( + 'CFBundleIsExecutableLoadable'); + late final _CFBundleIsExecutableLoadable = + _CFBundleIsExecutableLoadablePtr.asFunction(); - int acl_get_entry( - acl_t acl, - int entry_id, - ffi.Pointer entry_p, + int CFBundleIsExecutableLoadableForURL( + CFURLRef url, ) { - return _acl_get_entry( - acl, - entry_id, - entry_p, + return _CFBundleIsExecutableLoadableForURL( + url, ); } - late final _acl_get_entryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - acl_t, ffi.Int, ffi.Pointer)>>('acl_get_entry'); - late final _acl_get_entry = _acl_get_entryPtr - .asFunction)>(); + late final _CFBundleIsExecutableLoadableForURLPtr = + _lookup>( + 'CFBundleIsExecutableLoadableForURL'); + late final _CFBundleIsExecutableLoadableForURL = + _CFBundleIsExecutableLoadableForURLPtr.asFunction< + int Function(CFURLRef)>(); - int acl_valid( - acl_t acl, + int CFBundleIsArchitectureLoadable( + int arch, ) { - return _acl_valid( - acl, + return _CFBundleIsArchitectureLoadable( + arch, ); } - late final _acl_validPtr = - _lookup>('acl_valid'); - late final _acl_valid = _acl_validPtr.asFunction(); + late final _CFBundleIsArchitectureLoadablePtr = + _lookup>( + 'CFBundleIsArchitectureLoadable'); + late final _CFBundleIsArchitectureLoadable = + _CFBundleIsArchitectureLoadablePtr.asFunction(); - int acl_valid_fd_np( - int fd, - int type, - acl_t acl, + CFPlugInRef CFBundleGetPlugIn( + CFBundleRef bundle, ) { - return _acl_valid_fd_np( - fd, - type, - acl, + return _CFBundleGetPlugIn( + bundle, ); } - late final _acl_valid_fd_npPtr = - _lookup>( - 'acl_valid_fd_np'); - late final _acl_valid_fd_np = - _acl_valid_fd_npPtr.asFunction(); + late final _CFBundleGetPlugInPtr = + _lookup>( + 'CFBundleGetPlugIn'); + late final _CFBundleGetPlugIn = + _CFBundleGetPlugInPtr.asFunction(); - int acl_valid_file_np( - ffi.Pointer path, - int type, - acl_t acl, + int CFBundleOpenBundleResourceMap( + CFBundleRef bundle, ) { - return _acl_valid_file_np( - path, - type, - acl, + return _CFBundleOpenBundleResourceMap( + bundle, ); } - late final _acl_valid_file_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int32, acl_t)>>('acl_valid_file_np'); - late final _acl_valid_file_np = _acl_valid_file_npPtr - .asFunction, int, acl_t)>(); + late final _CFBundleOpenBundleResourceMapPtr = + _lookup>( + 'CFBundleOpenBundleResourceMap'); + late final _CFBundleOpenBundleResourceMap = + _CFBundleOpenBundleResourceMapPtr.asFunction(); - int acl_valid_link_np( - ffi.Pointer path, - int type, - acl_t acl, + int CFBundleOpenBundleResourceFiles( + CFBundleRef bundle, + ffi.Pointer refNum, + ffi.Pointer localizedRefNum, ) { - return _acl_valid_link_np( - path, - type, - acl, + return _CFBundleOpenBundleResourceFiles( + bundle, + refNum, + localizedRefNum, ); } - late final _acl_valid_link_npPtr = _lookup< + late final _CFBundleOpenBundleResourceFilesPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int32, acl_t)>>('acl_valid_link_np'); - late final _acl_valid_link_np = _acl_valid_link_npPtr - .asFunction, int, acl_t)>(); + SInt32 Function(CFBundleRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleOpenBundleResourceFiles'); + late final _CFBundleOpenBundleResourceFiles = + _CFBundleOpenBundleResourceFilesPtr.asFunction< + int Function(CFBundleRef, ffi.Pointer, + ffi.Pointer)>(); - int acl_add_perm( - acl_permset_t permset_d, - int perm, + void CFBundleCloseBundleResourceMap( + CFBundleRef bundle, + int refNum, ) { - return _acl_add_perm( - permset_d, - perm, + return _CFBundleCloseBundleResourceMap( + bundle, + refNum, ); } - late final _acl_add_permPtr = - _lookup>( - 'acl_add_perm'); - late final _acl_add_perm = - _acl_add_permPtr.asFunction(); + late final _CFBundleCloseBundleResourceMapPtr = _lookup< + ffi.NativeFunction>( + 'CFBundleCloseBundleResourceMap'); + late final _CFBundleCloseBundleResourceMap = + _CFBundleCloseBundleResourceMapPtr.asFunction< + void Function(CFBundleRef, int)>(); - int acl_calc_mask( - ffi.Pointer acl_p, - ) { - return _acl_calc_mask( - acl_p, - ); + int CFMessagePortGetTypeID() { + return _CFMessagePortGetTypeID(); } - late final _acl_calc_maskPtr = - _lookup)>>( - 'acl_calc_mask'); - late final _acl_calc_mask = - _acl_calc_maskPtr.asFunction)>(); + late final _CFMessagePortGetTypeIDPtr = + _lookup>( + 'CFMessagePortGetTypeID'); + late final _CFMessagePortGetTypeID = + _CFMessagePortGetTypeIDPtr.asFunction(); - int acl_clear_perms( - acl_permset_t permset_d, + CFMessagePortRef CFMessagePortCreateLocal( + CFAllocatorRef allocator, + CFStringRef name, + CFMessagePortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, ) { - return _acl_clear_perms( - permset_d, + return _CFMessagePortCreateLocal( + allocator, + name, + callout, + context, + shouldFreeInfo, ); } - late final _acl_clear_permsPtr = - _lookup>( - 'acl_clear_perms'); - late final _acl_clear_perms = - _acl_clear_permsPtr.asFunction(); + late final _CFMessagePortCreateLocalPtr = _lookup< + ffi.NativeFunction< + CFMessagePortRef Function( + CFAllocatorRef, + CFStringRef, + CFMessagePortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMessagePortCreateLocal'); + late final _CFMessagePortCreateLocal = + _CFMessagePortCreateLocalPtr.asFunction< + CFMessagePortRef Function( + CFAllocatorRef, + CFStringRef, + CFMessagePortCallBack, + ffi.Pointer, + ffi.Pointer)>(); - int acl_delete_perm( - acl_permset_t permset_d, - int perm, + CFMessagePortRef CFMessagePortCreateRemote( + CFAllocatorRef allocator, + CFStringRef name, ) { - return _acl_delete_perm( - permset_d, - perm, + return _CFMessagePortCreateRemote( + allocator, + name, ); } - late final _acl_delete_permPtr = - _lookup>( - 'acl_delete_perm'); - late final _acl_delete_perm = - _acl_delete_permPtr.asFunction(); + late final _CFMessagePortCreateRemotePtr = _lookup< + ffi.NativeFunction< + CFMessagePortRef Function( + CFAllocatorRef, CFStringRef)>>('CFMessagePortCreateRemote'); + late final _CFMessagePortCreateRemote = _CFMessagePortCreateRemotePtr + .asFunction(); - int acl_get_perm_np( - acl_permset_t permset_d, - int perm, + int CFMessagePortIsRemote( + CFMessagePortRef ms, ) { - return _acl_get_perm_np( - permset_d, - perm, + return _CFMessagePortIsRemote( + ms, ); } - late final _acl_get_perm_npPtr = - _lookup>( - 'acl_get_perm_np'); - late final _acl_get_perm_np = - _acl_get_perm_npPtr.asFunction(); + late final _CFMessagePortIsRemotePtr = + _lookup>( + 'CFMessagePortIsRemote'); + late final _CFMessagePortIsRemote = + _CFMessagePortIsRemotePtr.asFunction(); - int acl_get_permset( - acl_entry_t entry_d, - ffi.Pointer permset_p, + CFStringRef CFMessagePortGetName( + CFMessagePortRef ms, ) { - return _acl_get_permset( - entry_d, - permset_p, + return _CFMessagePortGetName( + ms, ); } - late final _acl_get_permsetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - acl_entry_t, ffi.Pointer)>>('acl_get_permset'); - late final _acl_get_permset = _acl_get_permsetPtr - .asFunction)>(); + late final _CFMessagePortGetNamePtr = + _lookup>( + 'CFMessagePortGetName'); + late final _CFMessagePortGetName = _CFMessagePortGetNamePtr.asFunction< + CFStringRef Function(CFMessagePortRef)>(); - int acl_set_permset( - acl_entry_t entry_d, - acl_permset_t permset_d, + int CFMessagePortSetName( + CFMessagePortRef ms, + CFStringRef newName, ) { - return _acl_set_permset( - entry_d, - permset_d, + return _CFMessagePortSetName( + ms, + newName, ); } - late final _acl_set_permsetPtr = - _lookup>( - 'acl_set_permset'); - late final _acl_set_permset = _acl_set_permsetPtr - .asFunction(); + late final _CFMessagePortSetNamePtr = _lookup< + ffi.NativeFunction>( + 'CFMessagePortSetName'); + late final _CFMessagePortSetName = _CFMessagePortSetNamePtr.asFunction< + int Function(CFMessagePortRef, CFStringRef)>(); - int acl_maximal_permset_mask_np( - ffi.Pointer mask_p, + void CFMessagePortGetContext( + CFMessagePortRef ms, + ffi.Pointer context, ) { - return _acl_maximal_permset_mask_np( - mask_p, + return _CFMessagePortGetContext( + ms, + context, ); } - late final _acl_maximal_permset_mask_npPtr = _lookup< + late final _CFMessagePortGetContextPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer)>>('acl_maximal_permset_mask_np'); - late final _acl_maximal_permset_mask_np = _acl_maximal_permset_mask_npPtr - .asFunction)>(); + ffi.Void Function(CFMessagePortRef, + ffi.Pointer)>>('CFMessagePortGetContext'); + late final _CFMessagePortGetContext = _CFMessagePortGetContextPtr.asFunction< + void Function(CFMessagePortRef, ffi.Pointer)>(); - int acl_get_permset_mask_np( - acl_entry_t entry_d, - ffi.Pointer mask_p, + void CFMessagePortInvalidate( + CFMessagePortRef ms, ) { - return _acl_get_permset_mask_np( - entry_d, - mask_p, + return _CFMessagePortInvalidate( + ms, ); } - late final _acl_get_permset_mask_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(acl_entry_t, - ffi.Pointer)>>('acl_get_permset_mask_np'); - late final _acl_get_permset_mask_np = _acl_get_permset_mask_npPtr - .asFunction)>(); + late final _CFMessagePortInvalidatePtr = + _lookup>( + 'CFMessagePortInvalidate'); + late final _CFMessagePortInvalidate = + _CFMessagePortInvalidatePtr.asFunction(); - int acl_set_permset_mask_np( - acl_entry_t entry_d, - int mask, + int CFMessagePortIsValid( + CFMessagePortRef ms, ) { - return _acl_set_permset_mask_np( - entry_d, - mask, + return _CFMessagePortIsValid( + ms, ); } - late final _acl_set_permset_mask_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - acl_entry_t, acl_permset_mask_t)>>('acl_set_permset_mask_np'); - late final _acl_set_permset_mask_np = - _acl_set_permset_mask_npPtr.asFunction(); + late final _CFMessagePortIsValidPtr = + _lookup>( + 'CFMessagePortIsValid'); + late final _CFMessagePortIsValid = + _CFMessagePortIsValidPtr.asFunction(); - int acl_add_flag_np( - acl_flagset_t flagset_d, - int flag, + CFMessagePortInvalidationCallBack CFMessagePortGetInvalidationCallBack( + CFMessagePortRef ms, ) { - return _acl_add_flag_np( - flagset_d, - flag, + return _CFMessagePortGetInvalidationCallBack( + ms, ); } - late final _acl_add_flag_npPtr = - _lookup>( - 'acl_add_flag_np'); - late final _acl_add_flag_np = - _acl_add_flag_npPtr.asFunction(); + late final _CFMessagePortGetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + CFMessagePortInvalidationCallBack Function( + CFMessagePortRef)>>('CFMessagePortGetInvalidationCallBack'); + late final _CFMessagePortGetInvalidationCallBack = + _CFMessagePortGetInvalidationCallBackPtr.asFunction< + CFMessagePortInvalidationCallBack Function(CFMessagePortRef)>(); - int acl_clear_flags_np( - acl_flagset_t flagset_d, + void CFMessagePortSetInvalidationCallBack( + CFMessagePortRef ms, + CFMessagePortInvalidationCallBack callout, ) { - return _acl_clear_flags_np( - flagset_d, + return _CFMessagePortSetInvalidationCallBack( + ms, + callout, ); } - late final _acl_clear_flags_npPtr = - _lookup>( - 'acl_clear_flags_np'); - late final _acl_clear_flags_np = - _acl_clear_flags_npPtr.asFunction(); + late final _CFMessagePortSetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMessagePortRef, CFMessagePortInvalidationCallBack)>>( + 'CFMessagePortSetInvalidationCallBack'); + late final _CFMessagePortSetInvalidationCallBack = + _CFMessagePortSetInvalidationCallBackPtr.asFunction< + void Function(CFMessagePortRef, CFMessagePortInvalidationCallBack)>(); - int acl_delete_flag_np( - acl_flagset_t flagset_d, - int flag, + int CFMessagePortSendRequest( + CFMessagePortRef remote, + int msgid, + CFDataRef data, + double sendTimeout, + double rcvTimeout, + CFStringRef replyMode, + ffi.Pointer returnData, ) { - return _acl_delete_flag_np( - flagset_d, - flag, + return _CFMessagePortSendRequest( + remote, + msgid, + data, + sendTimeout, + rcvTimeout, + replyMode, + returnData, ); } - late final _acl_delete_flag_npPtr = - _lookup>( - 'acl_delete_flag_np'); - late final _acl_delete_flag_np = - _acl_delete_flag_npPtr.asFunction(); + late final _CFMessagePortSendRequestPtr = _lookup< + ffi.NativeFunction< + SInt32 Function( + CFMessagePortRef, + SInt32, + CFDataRef, + CFTimeInterval, + CFTimeInterval, + CFStringRef, + ffi.Pointer)>>('CFMessagePortSendRequest'); + late final _CFMessagePortSendRequest = + _CFMessagePortSendRequestPtr.asFunction< + int Function(CFMessagePortRef, int, CFDataRef, double, double, + CFStringRef, ffi.Pointer)>(); - int acl_get_flag_np( - acl_flagset_t flagset_d, - int flag, + CFRunLoopSourceRef CFMessagePortCreateRunLoopSource( + CFAllocatorRef allocator, + CFMessagePortRef local, + int order, ) { - return _acl_get_flag_np( - flagset_d, - flag, + return _CFMessagePortCreateRunLoopSource( + allocator, + local, + order, ); } - late final _acl_get_flag_npPtr = - _lookup>( - 'acl_get_flag_np'); - late final _acl_get_flag_np = - _acl_get_flag_npPtr.asFunction(); + late final _CFMessagePortCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, + CFIndex)>>('CFMessagePortCreateRunLoopSource'); + late final _CFMessagePortCreateRunLoopSource = + _CFMessagePortCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, int)>(); - int acl_get_flagset_np( - ffi.Pointer obj_p, - ffi.Pointer flagset_p, + void CFMessagePortSetDispatchQueue( + CFMessagePortRef ms, + dispatch_queue_t queue, ) { - return _acl_get_flagset_np( - obj_p, - flagset_p, + return _CFMessagePortSetDispatchQueue( + ms, + queue, ); } - late final _acl_get_flagset_npPtr = _lookup< + late final _CFMessagePortSetDispatchQueuePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('acl_get_flagset_np'); - late final _acl_get_flagset_np = _acl_get_flagset_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(CFMessagePortRef, + dispatch_queue_t)>>('CFMessagePortSetDispatchQueue'); + late final _CFMessagePortSetDispatchQueue = _CFMessagePortSetDispatchQueuePtr + .asFunction(); - int acl_set_flagset_np( - ffi.Pointer obj_p, - acl_flagset_t flagset_d, - ) { - return _acl_set_flagset_np( - obj_p, - flagset_d, - ); - } + late final ffi.Pointer _kCFPlugInDynamicRegistrationKey = + _lookup('kCFPlugInDynamicRegistrationKey'); - late final _acl_set_flagset_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, acl_flagset_t)>>('acl_set_flagset_np'); - late final _acl_set_flagset_np = _acl_set_flagset_npPtr - .asFunction, acl_flagset_t)>(); + CFStringRef get kCFPlugInDynamicRegistrationKey => + _kCFPlugInDynamicRegistrationKey.value; - ffi.Pointer acl_get_qualifier( - acl_entry_t entry_d, - ) { - return _acl_get_qualifier( - entry_d, - ); - } + set kCFPlugInDynamicRegistrationKey(CFStringRef value) => + _kCFPlugInDynamicRegistrationKey.value = value; - late final _acl_get_qualifierPtr = - _lookup Function(acl_entry_t)>>( - 'acl_get_qualifier'); - late final _acl_get_qualifier = _acl_get_qualifierPtr - .asFunction Function(acl_entry_t)>(); + late final ffi.Pointer _kCFPlugInDynamicRegisterFunctionKey = + _lookup('kCFPlugInDynamicRegisterFunctionKey'); - int acl_get_tag_type( - acl_entry_t entry_d, - ffi.Pointer tag_type_p, - ) { - return _acl_get_tag_type( - entry_d, - tag_type_p, - ); - } + CFStringRef get kCFPlugInDynamicRegisterFunctionKey => + _kCFPlugInDynamicRegisterFunctionKey.value; - late final _acl_get_tag_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - acl_entry_t, ffi.Pointer)>>('acl_get_tag_type'); - late final _acl_get_tag_type = _acl_get_tag_typePtr - .asFunction)>(); + set kCFPlugInDynamicRegisterFunctionKey(CFStringRef value) => + _kCFPlugInDynamicRegisterFunctionKey.value = value; - int acl_set_qualifier( - acl_entry_t entry_d, - ffi.Pointer tag_qualifier_p, - ) { - return _acl_set_qualifier( - entry_d, - tag_qualifier_p, - ); + late final ffi.Pointer _kCFPlugInUnloadFunctionKey = + _lookup('kCFPlugInUnloadFunctionKey'); + + CFStringRef get kCFPlugInUnloadFunctionKey => + _kCFPlugInUnloadFunctionKey.value; + + set kCFPlugInUnloadFunctionKey(CFStringRef value) => + _kCFPlugInUnloadFunctionKey.value = value; + + late final ffi.Pointer _kCFPlugInFactoriesKey = + _lookup('kCFPlugInFactoriesKey'); + + CFStringRef get kCFPlugInFactoriesKey => _kCFPlugInFactoriesKey.value; + + set kCFPlugInFactoriesKey(CFStringRef value) => + _kCFPlugInFactoriesKey.value = value; + + late final ffi.Pointer _kCFPlugInTypesKey = + _lookup('kCFPlugInTypesKey'); + + CFStringRef get kCFPlugInTypesKey => _kCFPlugInTypesKey.value; + + set kCFPlugInTypesKey(CFStringRef value) => _kCFPlugInTypesKey.value = value; + + int CFPlugInGetTypeID() { + return _CFPlugInGetTypeID(); } - late final _acl_set_qualifierPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - acl_entry_t, ffi.Pointer)>>('acl_set_qualifier'); - late final _acl_set_qualifier = _acl_set_qualifierPtr - .asFunction)>(); + late final _CFPlugInGetTypeIDPtr = + _lookup>('CFPlugInGetTypeID'); + late final _CFPlugInGetTypeID = + _CFPlugInGetTypeIDPtr.asFunction(); - int acl_set_tag_type( - acl_entry_t entry_d, - int tag_type, + CFPlugInRef CFPlugInCreate( + CFAllocatorRef allocator, + CFURLRef plugInURL, ) { - return _acl_set_tag_type( - entry_d, - tag_type, + return _CFPlugInCreate( + allocator, + plugInURL, ); } - late final _acl_set_tag_typePtr = - _lookup>( - 'acl_set_tag_type'); - late final _acl_set_tag_type = - _acl_set_tag_typePtr.asFunction(); + late final _CFPlugInCreatePtr = _lookup< + ffi.NativeFunction>( + 'CFPlugInCreate'); + late final _CFPlugInCreate = _CFPlugInCreatePtr.asFunction< + CFPlugInRef Function(CFAllocatorRef, CFURLRef)>(); - int acl_delete_def_file( - ffi.Pointer path_p, + CFBundleRef CFPlugInGetBundle( + CFPlugInRef plugIn, ) { - return _acl_delete_def_file( - path_p, + return _CFPlugInGetBundle( + plugIn, ); } - late final _acl_delete_def_filePtr = - _lookup)>>( - 'acl_delete_def_file'); - late final _acl_delete_def_file = - _acl_delete_def_filePtr.asFunction)>(); + late final _CFPlugInGetBundlePtr = + _lookup>( + 'CFPlugInGetBundle'); + late final _CFPlugInGetBundle = + _CFPlugInGetBundlePtr.asFunction(); - acl_t acl_get_fd( - int fd, + void CFPlugInSetLoadOnDemand( + CFPlugInRef plugIn, + int flag, ) { - return _acl_get_fd( - fd, + return _CFPlugInSetLoadOnDemand( + plugIn, + flag, ); } - late final _acl_get_fdPtr = - _lookup>('acl_get_fd'); - late final _acl_get_fd = _acl_get_fdPtr.asFunction(); + late final _CFPlugInSetLoadOnDemandPtr = + _lookup>( + 'CFPlugInSetLoadOnDemand'); + late final _CFPlugInSetLoadOnDemand = + _CFPlugInSetLoadOnDemandPtr.asFunction(); - acl_t acl_get_fd_np( - int fd, - int type, + int CFPlugInIsLoadOnDemand( + CFPlugInRef plugIn, ) { - return _acl_get_fd_np( - fd, - type, + return _CFPlugInIsLoadOnDemand( + plugIn, ); } - late final _acl_get_fd_npPtr = - _lookup>( - 'acl_get_fd_np'); - late final _acl_get_fd_np = - _acl_get_fd_npPtr.asFunction(); + late final _CFPlugInIsLoadOnDemandPtr = + _lookup>( + 'CFPlugInIsLoadOnDemand'); + late final _CFPlugInIsLoadOnDemand = + _CFPlugInIsLoadOnDemandPtr.asFunction(); - acl_t acl_get_file( - ffi.Pointer path_p, - int type, + CFArrayRef CFPlugInFindFactoriesForPlugInType( + CFUUIDRef typeUUID, ) { - return _acl_get_file( - path_p, - type, + return _CFPlugInFindFactoriesForPlugInType( + typeUUID, ); } - late final _acl_get_filePtr = _lookup< - ffi.NativeFunction, ffi.Int32)>>( - 'acl_get_file'); - late final _acl_get_file = - _acl_get_filePtr.asFunction, int)>(); + late final _CFPlugInFindFactoriesForPlugInTypePtr = + _lookup>( + 'CFPlugInFindFactoriesForPlugInType'); + late final _CFPlugInFindFactoriesForPlugInType = + _CFPlugInFindFactoriesForPlugInTypePtr.asFunction< + CFArrayRef Function(CFUUIDRef)>(); - acl_t acl_get_link_np( - ffi.Pointer path_p, - int type, + CFArrayRef CFPlugInFindFactoriesForPlugInTypeInPlugIn( + CFUUIDRef typeUUID, + CFPlugInRef plugIn, ) { - return _acl_get_link_np( - path_p, - type, + return _CFPlugInFindFactoriesForPlugInTypeInPlugIn( + typeUUID, + plugIn, ); } - late final _acl_get_link_npPtr = _lookup< - ffi.NativeFunction, ffi.Int32)>>( - 'acl_get_link_np'); - late final _acl_get_link_np = _acl_get_link_npPtr - .asFunction, int)>(); + late final _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr = + _lookup>( + 'CFPlugInFindFactoriesForPlugInTypeInPlugIn'); + late final _CFPlugInFindFactoriesForPlugInTypeInPlugIn = + _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr.asFunction< + CFArrayRef Function(CFUUIDRef, CFPlugInRef)>(); - int acl_set_fd( - int fd, - acl_t acl, + ffi.Pointer CFPlugInInstanceCreate( + CFAllocatorRef allocator, + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, ) { - return _acl_set_fd( - fd, - acl, + return _CFPlugInInstanceCreate( + allocator, + factoryUUID, + typeUUID, ); } - late final _acl_set_fdPtr = - _lookup>( - 'acl_set_fd'); - late final _acl_set_fd = - _acl_set_fdPtr.asFunction(); + late final _CFPlugInInstanceCreatePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFAllocatorRef, CFUUIDRef, CFUUIDRef)>>('CFPlugInInstanceCreate'); + late final _CFPlugInInstanceCreate = _CFPlugInInstanceCreatePtr.asFunction< + ffi.Pointer Function(CFAllocatorRef, CFUUIDRef, CFUUIDRef)>(); - int acl_set_fd_np( - int fd, - acl_t acl, - int acl_type, + int CFPlugInRegisterFactoryFunction( + CFUUIDRef factoryUUID, + CFPlugInFactoryFunction func, ) { - return _acl_set_fd_np( - fd, - acl, - acl_type, + return _CFPlugInRegisterFactoryFunction( + factoryUUID, + func, ); } - late final _acl_set_fd_npPtr = - _lookup>( - 'acl_set_fd_np'); - late final _acl_set_fd_np = - _acl_set_fd_npPtr.asFunction(); + late final _CFPlugInRegisterFactoryFunctionPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFUUIDRef, + CFPlugInFactoryFunction)>>('CFPlugInRegisterFactoryFunction'); + late final _CFPlugInRegisterFactoryFunction = + _CFPlugInRegisterFactoryFunctionPtr.asFunction< + int Function(CFUUIDRef, CFPlugInFactoryFunction)>(); - int acl_set_file( - ffi.Pointer path_p, - int type, - acl_t acl, + int CFPlugInRegisterFactoryFunctionByName( + CFUUIDRef factoryUUID, + CFPlugInRef plugIn, + CFStringRef functionName, ) { - return _acl_set_file( - path_p, - type, - acl, + return _CFPlugInRegisterFactoryFunctionByName( + factoryUUID, + plugIn, + functionName, ); } - late final _acl_set_filePtr = _lookup< + late final _CFPlugInRegisterFactoryFunctionByNamePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int32, acl_t)>>('acl_set_file'); - late final _acl_set_file = _acl_set_filePtr - .asFunction, int, acl_t)>(); + Boolean Function(CFUUIDRef, CFPlugInRef, + CFStringRef)>>('CFPlugInRegisterFactoryFunctionByName'); + late final _CFPlugInRegisterFactoryFunctionByName = + _CFPlugInRegisterFactoryFunctionByNamePtr.asFunction< + int Function(CFUUIDRef, CFPlugInRef, CFStringRef)>(); - int acl_set_link_np( - ffi.Pointer path_p, - int type, - acl_t acl, + int CFPlugInUnregisterFactory( + CFUUIDRef factoryUUID, ) { - return _acl_set_link_np( - path_p, - type, - acl, + return _CFPlugInUnregisterFactory( + factoryUUID, ); } - late final _acl_set_link_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int32, acl_t)>>('acl_set_link_np'); - late final _acl_set_link_np = _acl_set_link_npPtr - .asFunction, int, acl_t)>(); + late final _CFPlugInUnregisterFactoryPtr = + _lookup>( + 'CFPlugInUnregisterFactory'); + late final _CFPlugInUnregisterFactory = + _CFPlugInUnregisterFactoryPtr.asFunction(); - int acl_copy_ext( - ffi.Pointer buf_p, - acl_t acl, - int size, + int CFPlugInRegisterPlugInType( + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, ) { - return _acl_copy_ext( - buf_p, - acl, - size, + return _CFPlugInRegisterPlugInType( + factoryUUID, + typeUUID, ); } - late final _acl_copy_extPtr = _lookup< - ffi.NativeFunction< - ssize_t Function( - ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext'); - late final _acl_copy_ext = _acl_copy_extPtr - .asFunction, acl_t, int)>(); + late final _CFPlugInRegisterPlugInTypePtr = + _lookup>( + 'CFPlugInRegisterPlugInType'); + late final _CFPlugInRegisterPlugInType = _CFPlugInRegisterPlugInTypePtr + .asFunction(); - int acl_copy_ext_native( - ffi.Pointer buf_p, - acl_t acl, - int size, + int CFPlugInUnregisterPlugInType( + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, ) { - return _acl_copy_ext_native( - buf_p, - acl, - size, + return _CFPlugInUnregisterPlugInType( + factoryUUID, + typeUUID, ); } - late final _acl_copy_ext_nativePtr = _lookup< - ffi.NativeFunction< - ssize_t Function( - ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext_native'); - late final _acl_copy_ext_native = _acl_copy_ext_nativePtr - .asFunction, acl_t, int)>(); + late final _CFPlugInUnregisterPlugInTypePtr = + _lookup>( + 'CFPlugInUnregisterPlugInType'); + late final _CFPlugInUnregisterPlugInType = _CFPlugInUnregisterPlugInTypePtr + .asFunction(); - acl_t acl_copy_int( - ffi.Pointer buf_p, + void CFPlugInAddInstanceForFactory( + CFUUIDRef factoryID, ) { - return _acl_copy_int( - buf_p, + return _CFPlugInAddInstanceForFactory( + factoryID, ); } - late final _acl_copy_intPtr = - _lookup)>>( - 'acl_copy_int'); - late final _acl_copy_int = - _acl_copy_intPtr.asFunction)>(); + late final _CFPlugInAddInstanceForFactoryPtr = + _lookup>( + 'CFPlugInAddInstanceForFactory'); + late final _CFPlugInAddInstanceForFactory = + _CFPlugInAddInstanceForFactoryPtr.asFunction(); - acl_t acl_copy_int_native( - ffi.Pointer buf_p, + void CFPlugInRemoveInstanceForFactory( + CFUUIDRef factoryID, ) { - return _acl_copy_int_native( - buf_p, + return _CFPlugInRemoveInstanceForFactory( + factoryID, ); } - late final _acl_copy_int_nativePtr = - _lookup)>>( - 'acl_copy_int_native'); - late final _acl_copy_int_native = _acl_copy_int_nativePtr - .asFunction)>(); + late final _CFPlugInRemoveInstanceForFactoryPtr = + _lookup>( + 'CFPlugInRemoveInstanceForFactory'); + late final _CFPlugInRemoveInstanceForFactory = + _CFPlugInRemoveInstanceForFactoryPtr.asFunction< + void Function(CFUUIDRef)>(); - acl_t acl_from_text( - ffi.Pointer buf_p, + int CFPlugInInstanceGetInterfaceFunctionTable( + CFPlugInInstanceRef instance, + CFStringRef interfaceName, + ffi.Pointer> ftbl, ) { - return _acl_from_text( - buf_p, + return _CFPlugInInstanceGetInterfaceFunctionTable( + instance, + interfaceName, + ftbl, ); } - late final _acl_from_textPtr = - _lookup)>>( - 'acl_from_text'); - late final _acl_from_text = - _acl_from_textPtr.asFunction)>(); + late final _CFPlugInInstanceGetInterfaceFunctionTablePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFPlugInInstanceRef, CFStringRef, + ffi.Pointer>)>>( + 'CFPlugInInstanceGetInterfaceFunctionTable'); + late final _CFPlugInInstanceGetInterfaceFunctionTable = + _CFPlugInInstanceGetInterfaceFunctionTablePtr.asFunction< + int Function(CFPlugInInstanceRef, CFStringRef, + ffi.Pointer>)>(); - int acl_size( - acl_t acl, + CFStringRef CFPlugInInstanceGetFactoryName( + CFPlugInInstanceRef instance, ) { - return _acl_size( - acl, + return _CFPlugInInstanceGetFactoryName( + instance, ); } - late final _acl_sizePtr = - _lookup>('acl_size'); - late final _acl_size = _acl_sizePtr.asFunction(); + late final _CFPlugInInstanceGetFactoryNamePtr = + _lookup>( + 'CFPlugInInstanceGetFactoryName'); + late final _CFPlugInInstanceGetFactoryName = + _CFPlugInInstanceGetFactoryNamePtr.asFunction< + CFStringRef Function(CFPlugInInstanceRef)>(); - ffi.Pointer acl_to_text( - acl_t acl, - ffi.Pointer len_p, + ffi.Pointer CFPlugInInstanceGetInstanceData( + CFPlugInInstanceRef instance, ) { - return _acl_to_text( - acl, - len_p, + return _CFPlugInInstanceGetInstanceData( + instance, ); } - late final _acl_to_textPtr = _lookup< + late final _CFPlugInInstanceGetInstanceDataPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - acl_t, ffi.Pointer)>>('acl_to_text'); - late final _acl_to_text = _acl_to_textPtr.asFunction< - ffi.Pointer Function(acl_t, ffi.Pointer)>(); + ffi.Pointer Function( + CFPlugInInstanceRef)>>('CFPlugInInstanceGetInstanceData'); + late final _CFPlugInInstanceGetInstanceData = + _CFPlugInInstanceGetInstanceDataPtr.asFunction< + ffi.Pointer Function(CFPlugInInstanceRef)>(); - int CFFileSecurityGetTypeID() { - return _CFFileSecurityGetTypeID(); + int CFPlugInInstanceGetTypeID() { + return _CFPlugInInstanceGetTypeID(); } - late final _CFFileSecurityGetTypeIDPtr = + late final _CFPlugInInstanceGetTypeIDPtr = _lookup>( - 'CFFileSecurityGetTypeID'); - late final _CFFileSecurityGetTypeID = - _CFFileSecurityGetTypeIDPtr.asFunction(); + 'CFPlugInInstanceGetTypeID'); + late final _CFPlugInInstanceGetTypeID = + _CFPlugInInstanceGetTypeIDPtr.asFunction(); - CFFileSecurityRef CFFileSecurityCreate( + CFPlugInInstanceRef CFPlugInInstanceCreateWithInstanceDataSize( CFAllocatorRef allocator, + int instanceDataSize, + CFPlugInInstanceDeallocateInstanceDataFunction deallocateInstanceFunction, + CFStringRef factoryName, + CFPlugInInstanceGetInterfaceFunction getInterfaceFunction, ) { - return _CFFileSecurityCreate( + return _CFPlugInInstanceCreateWithInstanceDataSize( allocator, + instanceDataSize, + deallocateInstanceFunction, + factoryName, + getInterfaceFunction, ); } - late final _CFFileSecurityCreatePtr = - _lookup>( - 'CFFileSecurityCreate'); - late final _CFFileSecurityCreate = _CFFileSecurityCreatePtr.asFunction< - CFFileSecurityRef Function(CFAllocatorRef)>(); + late final _CFPlugInInstanceCreateWithInstanceDataSizePtr = _lookup< + ffi.NativeFunction< + CFPlugInInstanceRef Function( + CFAllocatorRef, + CFIndex, + CFPlugInInstanceDeallocateInstanceDataFunction, + CFStringRef, + CFPlugInInstanceGetInterfaceFunction)>>( + 'CFPlugInInstanceCreateWithInstanceDataSize'); + late final _CFPlugInInstanceCreateWithInstanceDataSize = + _CFPlugInInstanceCreateWithInstanceDataSizePtr.asFunction< + CFPlugInInstanceRef Function( + CFAllocatorRef, + int, + CFPlugInInstanceDeallocateInstanceDataFunction, + CFStringRef, + CFPlugInInstanceGetInterfaceFunction)>(); - CFFileSecurityRef CFFileSecurityCreateCopy( + int CFMachPortGetTypeID() { + return _CFMachPortGetTypeID(); + } + + late final _CFMachPortGetTypeIDPtr = + _lookup>('CFMachPortGetTypeID'); + late final _CFMachPortGetTypeID = + _CFMachPortGetTypeIDPtr.asFunction(); + + CFMachPortRef CFMachPortCreate( CFAllocatorRef allocator, - CFFileSecurityRef fileSec, + CFMachPortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, ) { - return _CFFileSecurityCreateCopy( + return _CFMachPortCreate( allocator, - fileSec, + callout, + context, + shouldFreeInfo, ); } - late final _CFFileSecurityCreateCopyPtr = _lookup< + late final _CFMachPortCreatePtr = _lookup< ffi.NativeFunction< - CFFileSecurityRef Function( - CFAllocatorRef, CFFileSecurityRef)>>('CFFileSecurityCreateCopy'); - late final _CFFileSecurityCreateCopy = - _CFFileSecurityCreateCopyPtr.asFunction< - CFFileSecurityRef Function(CFAllocatorRef, CFFileSecurityRef)>(); + CFMachPortRef Function( + CFAllocatorRef, + CFMachPortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMachPortCreate'); + late final _CFMachPortCreate = _CFMachPortCreatePtr.asFunction< + CFMachPortRef Function(CFAllocatorRef, CFMachPortCallBack, + ffi.Pointer, ffi.Pointer)>(); - int CFFileSecurityCopyOwnerUUID( - CFFileSecurityRef fileSec, - ffi.Pointer ownerUUID, + CFMachPortRef CFMachPortCreateWithPort( + CFAllocatorRef allocator, + int portNum, + CFMachPortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, ) { - return _CFFileSecurityCopyOwnerUUID( - fileSec, - ownerUUID, + return _CFMachPortCreateWithPort( + allocator, + portNum, + callout, + context, + shouldFreeInfo, ); } - late final _CFFileSecurityCopyOwnerUUIDPtr = _lookup< + late final _CFMachPortCreateWithPortPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityCopyOwnerUUID'); - late final _CFFileSecurityCopyOwnerUUID = _CFFileSecurityCopyOwnerUUIDPtr - .asFunction)>(); + CFMachPortRef Function( + CFAllocatorRef, + mach_port_t, + CFMachPortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMachPortCreateWithPort'); + late final _CFMachPortCreateWithPort = + _CFMachPortCreateWithPortPtr.asFunction< + CFMachPortRef Function(CFAllocatorRef, int, CFMachPortCallBack, + ffi.Pointer, ffi.Pointer)>(); - int CFFileSecuritySetOwnerUUID( - CFFileSecurityRef fileSec, - CFUUIDRef ownerUUID, + int CFMachPortGetPort( + CFMachPortRef port, ) { - return _CFFileSecuritySetOwnerUUID( - fileSec, - ownerUUID, + return _CFMachPortGetPort( + port, ); } - late final _CFFileSecuritySetOwnerUUIDPtr = _lookup< - ffi.NativeFunction>( - 'CFFileSecuritySetOwnerUUID'); - late final _CFFileSecuritySetOwnerUUID = _CFFileSecuritySetOwnerUUIDPtr - .asFunction(); + late final _CFMachPortGetPortPtr = + _lookup>( + 'CFMachPortGetPort'); + late final _CFMachPortGetPort = + _CFMachPortGetPortPtr.asFunction(); - int CFFileSecurityCopyGroupUUID( - CFFileSecurityRef fileSec, - ffi.Pointer groupUUID, + void CFMachPortGetContext( + CFMachPortRef port, + ffi.Pointer context, ) { - return _CFFileSecurityCopyGroupUUID( - fileSec, - groupUUID, + return _CFMachPortGetContext( + port, + context, ); } - late final _CFFileSecurityCopyGroupUUIDPtr = _lookup< + late final _CFMachPortGetContextPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityCopyGroupUUID'); - late final _CFFileSecurityCopyGroupUUID = _CFFileSecurityCopyGroupUUIDPtr - .asFunction)>(); + ffi.Void Function(CFMachPortRef, + ffi.Pointer)>>('CFMachPortGetContext'); + late final _CFMachPortGetContext = _CFMachPortGetContextPtr.asFunction< + void Function(CFMachPortRef, ffi.Pointer)>(); - int CFFileSecuritySetGroupUUID( - CFFileSecurityRef fileSec, - CFUUIDRef groupUUID, + void CFMachPortInvalidate( + CFMachPortRef port, ) { - return _CFFileSecuritySetGroupUUID( - fileSec, - groupUUID, + return _CFMachPortInvalidate( + port, ); } - late final _CFFileSecuritySetGroupUUIDPtr = _lookup< - ffi.NativeFunction>( - 'CFFileSecuritySetGroupUUID'); - late final _CFFileSecuritySetGroupUUID = _CFFileSecuritySetGroupUUIDPtr - .asFunction(); + late final _CFMachPortInvalidatePtr = + _lookup>( + 'CFMachPortInvalidate'); + late final _CFMachPortInvalidate = + _CFMachPortInvalidatePtr.asFunction(); - int CFFileSecurityCopyAccessControlList( - CFFileSecurityRef fileSec, - ffi.Pointer accessControlList, + int CFMachPortIsValid( + CFMachPortRef port, ) { - return _CFFileSecurityCopyAccessControlList( - fileSec, - accessControlList, + return _CFMachPortIsValid( + port, ); } - late final _CFFileSecurityCopyAccessControlListPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityCopyAccessControlList'); - late final _CFFileSecurityCopyAccessControlList = - _CFFileSecurityCopyAccessControlListPtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + late final _CFMachPortIsValidPtr = + _lookup>( + 'CFMachPortIsValid'); + late final _CFMachPortIsValid = + _CFMachPortIsValidPtr.asFunction(); - int CFFileSecuritySetAccessControlList( - CFFileSecurityRef fileSec, - acl_t accessControlList, + CFMachPortInvalidationCallBack CFMachPortGetInvalidationCallBack( + CFMachPortRef port, ) { - return _CFFileSecuritySetAccessControlList( - fileSec, - accessControlList, + return _CFMachPortGetInvalidationCallBack( + port, ); } - late final _CFFileSecuritySetAccessControlListPtr = - _lookup>( - 'CFFileSecuritySetAccessControlList'); - late final _CFFileSecuritySetAccessControlList = - _CFFileSecuritySetAccessControlListPtr.asFunction< - int Function(CFFileSecurityRef, acl_t)>(); + late final _CFMachPortGetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + CFMachPortInvalidationCallBack Function( + CFMachPortRef)>>('CFMachPortGetInvalidationCallBack'); + late final _CFMachPortGetInvalidationCallBack = + _CFMachPortGetInvalidationCallBackPtr.asFunction< + CFMachPortInvalidationCallBack Function(CFMachPortRef)>(); - int CFFileSecurityGetOwner( - CFFileSecurityRef fileSec, - ffi.Pointer owner, + void CFMachPortSetInvalidationCallBack( + CFMachPortRef port, + CFMachPortInvalidationCallBack callout, ) { - return _CFFileSecurityGetOwner( - fileSec, - owner, + return _CFMachPortSetInvalidationCallBack( + port, + callout, ); } - late final _CFFileSecurityGetOwnerPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityGetOwner'); - late final _CFFileSecurityGetOwner = _CFFileSecurityGetOwnerPtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + late final _CFMachPortSetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMachPortRef, CFMachPortInvalidationCallBack)>>( + 'CFMachPortSetInvalidationCallBack'); + late final _CFMachPortSetInvalidationCallBack = + _CFMachPortSetInvalidationCallBackPtr.asFunction< + void Function(CFMachPortRef, CFMachPortInvalidationCallBack)>(); - int CFFileSecuritySetOwner( - CFFileSecurityRef fileSec, - int owner, + CFRunLoopSourceRef CFMachPortCreateRunLoopSource( + CFAllocatorRef allocator, + CFMachPortRef port, + int order, ) { - return _CFFileSecuritySetOwner( - fileSec, - owner, + return _CFMachPortCreateRunLoopSource( + allocator, + port, + order, ); } - late final _CFFileSecuritySetOwnerPtr = - _lookup>( - 'CFFileSecuritySetOwner'); - late final _CFFileSecuritySetOwner = _CFFileSecuritySetOwnerPtr.asFunction< - int Function(CFFileSecurityRef, int)>(); + late final _CFMachPortCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, + CFIndex)>>('CFMachPortCreateRunLoopSource'); + late final _CFMachPortCreateRunLoopSource = + _CFMachPortCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, int)>(); - int CFFileSecurityGetGroup( - CFFileSecurityRef fileSec, - ffi.Pointer group, - ) { - return _CFFileSecurityGetGroup( - fileSec, - group, - ); + int CFAttributedStringGetTypeID() { + return _CFAttributedStringGetTypeID(); } - late final _CFFileSecurityGetGroupPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityGetGroup'); - late final _CFFileSecurityGetGroup = _CFFileSecurityGetGroupPtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + late final _CFAttributedStringGetTypeIDPtr = + _lookup>( + 'CFAttributedStringGetTypeID'); + late final _CFAttributedStringGetTypeID = + _CFAttributedStringGetTypeIDPtr.asFunction(); - int CFFileSecuritySetGroup( - CFFileSecurityRef fileSec, - int group, + CFAttributedStringRef CFAttributedStringCreate( + CFAllocatorRef alloc, + CFStringRef str, + CFDictionaryRef attributes, ) { - return _CFFileSecuritySetGroup( - fileSec, - group, + return _CFAttributedStringCreate( + alloc, + str, + attributes, ); } - late final _CFFileSecuritySetGroupPtr = - _lookup>( - 'CFFileSecuritySetGroup'); - late final _CFFileSecuritySetGroup = _CFFileSecuritySetGroupPtr.asFunction< - int Function(CFFileSecurityRef, int)>(); + late final _CFAttributedStringCreatePtr = _lookup< + ffi.NativeFunction< + CFAttributedStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFAttributedStringCreate'); + late final _CFAttributedStringCreate = + _CFAttributedStringCreatePtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - int CFFileSecurityGetMode( - CFFileSecurityRef fileSec, - ffi.Pointer mode, + CFAttributedStringRef CFAttributedStringCreateWithSubstring( + CFAllocatorRef alloc, + CFAttributedStringRef aStr, + CFRange range, ) { - return _CFFileSecurityGetMode( - fileSec, - mode, + return _CFAttributedStringCreateWithSubstring( + alloc, + aStr, + range, ); } - late final _CFFileSecurityGetModePtr = _lookup< + late final _CFAttributedStringCreateWithSubstringPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityGetMode'); - late final _CFFileSecurityGetMode = _CFFileSecurityGetModePtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + CFAttributedStringRef Function(CFAllocatorRef, CFAttributedStringRef, + CFRange)>>('CFAttributedStringCreateWithSubstring'); + late final _CFAttributedStringCreateWithSubstring = + _CFAttributedStringCreateWithSubstringPtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFAttributedStringRef, CFRange)>(); - int CFFileSecuritySetMode( - CFFileSecurityRef fileSec, - int mode, + CFAttributedStringRef CFAttributedStringCreateCopy( + CFAllocatorRef alloc, + CFAttributedStringRef aStr, ) { - return _CFFileSecuritySetMode( - fileSec, - mode, + return _CFAttributedStringCreateCopy( + alloc, + aStr, ); } - late final _CFFileSecuritySetModePtr = - _lookup>( - 'CFFileSecuritySetMode'); - late final _CFFileSecuritySetMode = _CFFileSecuritySetModePtr.asFunction< - int Function(CFFileSecurityRef, int)>(); + late final _CFAttributedStringCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFAttributedStringRef Function(CFAllocatorRef, + CFAttributedStringRef)>>('CFAttributedStringCreateCopy'); + late final _CFAttributedStringCreateCopy = + _CFAttributedStringCreateCopyPtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFAttributedStringRef)>(); - int CFFileSecurityClearProperties( - CFFileSecurityRef fileSec, - int clearPropertyMask, + CFStringRef CFAttributedStringGetString( + CFAttributedStringRef aStr, ) { - return _CFFileSecurityClearProperties( - fileSec, - clearPropertyMask, + return _CFAttributedStringGetString( + aStr, ); } - late final _CFFileSecurityClearPropertiesPtr = _lookup< - ffi.NativeFunction>( - 'CFFileSecurityClearProperties'); - late final _CFFileSecurityClearProperties = _CFFileSecurityClearPropertiesPtr - .asFunction(); + late final _CFAttributedStringGetStringPtr = + _lookup>( + 'CFAttributedStringGetString'); + late final _CFAttributedStringGetString = _CFAttributedStringGetStringPtr + .asFunction(); - CFStringRef CFStringTokenizerCopyBestStringLanguage( - CFStringRef string, - CFRange range, + int CFAttributedStringGetLength( + CFAttributedStringRef aStr, ) { - return _CFStringTokenizerCopyBestStringLanguage( - string, - range, + return _CFAttributedStringGetLength( + aStr, ); } - late final _CFStringTokenizerCopyBestStringLanguagePtr = - _lookup>( - 'CFStringTokenizerCopyBestStringLanguage'); - late final _CFStringTokenizerCopyBestStringLanguage = - _CFStringTokenizerCopyBestStringLanguagePtr.asFunction< - CFStringRef Function(CFStringRef, CFRange)>(); - - int CFStringTokenizerGetTypeID() { - return _CFStringTokenizerGetTypeID(); - } - - late final _CFStringTokenizerGetTypeIDPtr = - _lookup>( - 'CFStringTokenizerGetTypeID'); - late final _CFStringTokenizerGetTypeID = - _CFStringTokenizerGetTypeIDPtr.asFunction(); + late final _CFAttributedStringGetLengthPtr = + _lookup>( + 'CFAttributedStringGetLength'); + late final _CFAttributedStringGetLength = _CFAttributedStringGetLengthPtr + .asFunction(); - CFStringTokenizerRef CFStringTokenizerCreate( - CFAllocatorRef alloc, - CFStringRef string, - CFRange range, - int options, - CFLocaleRef locale, + CFDictionaryRef CFAttributedStringGetAttributes( + CFAttributedStringRef aStr, + int loc, + ffi.Pointer effectiveRange, ) { - return _CFStringTokenizerCreate( - alloc, - string, - range, - options, - locale, + return _CFAttributedStringGetAttributes( + aStr, + loc, + effectiveRange, ); } - late final _CFStringTokenizerCreatePtr = _lookup< + late final _CFAttributedStringGetAttributesPtr = _lookup< ffi.NativeFunction< - CFStringTokenizerRef Function(CFAllocatorRef, CFStringRef, CFRange, - CFOptionFlags, CFLocaleRef)>>('CFStringTokenizerCreate'); - late final _CFStringTokenizerCreate = _CFStringTokenizerCreatePtr.asFunction< - CFStringTokenizerRef Function( - CFAllocatorRef, CFStringRef, CFRange, int, CFLocaleRef)>(); + CFDictionaryRef Function(CFAttributedStringRef, CFIndex, + ffi.Pointer)>>('CFAttributedStringGetAttributes'); + late final _CFAttributedStringGetAttributes = + _CFAttributedStringGetAttributesPtr.asFunction< + CFDictionaryRef Function( + CFAttributedStringRef, int, ffi.Pointer)>(); - void CFStringTokenizerSetString( - CFStringTokenizerRef tokenizer, - CFStringRef string, - CFRange range, + CFTypeRef CFAttributedStringGetAttribute( + CFAttributedStringRef aStr, + int loc, + CFStringRef attrName, + ffi.Pointer effectiveRange, ) { - return _CFStringTokenizerSetString( - tokenizer, - string, - range, + return _CFAttributedStringGetAttribute( + aStr, + loc, + attrName, + effectiveRange, ); } - late final _CFStringTokenizerSetStringPtr = _lookup< + late final _CFAttributedStringGetAttributePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFStringTokenizerRef, CFStringRef, - CFRange)>>('CFStringTokenizerSetString'); - late final _CFStringTokenizerSetString = _CFStringTokenizerSetStringPtr - .asFunction(); + CFTypeRef Function(CFAttributedStringRef, CFIndex, CFStringRef, + ffi.Pointer)>>('CFAttributedStringGetAttribute'); + late final _CFAttributedStringGetAttribute = + _CFAttributedStringGetAttributePtr.asFunction< + CFTypeRef Function( + CFAttributedStringRef, int, CFStringRef, ffi.Pointer)>(); - int CFStringTokenizerGoToTokenAtIndex( - CFStringTokenizerRef tokenizer, - int index, + CFDictionaryRef CFAttributedStringGetAttributesAndLongestEffectiveRange( + CFAttributedStringRef aStr, + int loc, + CFRange inRange, + ffi.Pointer longestEffectiveRange, ) { - return _CFStringTokenizerGoToTokenAtIndex( - tokenizer, - index, + return _CFAttributedStringGetAttributesAndLongestEffectiveRange( + aStr, + loc, + inRange, + longestEffectiveRange, ); } - late final _CFStringTokenizerGoToTokenAtIndexPtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(CFStringTokenizerRef, - CFIndex)>>('CFStringTokenizerGoToTokenAtIndex'); - late final _CFStringTokenizerGoToTokenAtIndex = - _CFStringTokenizerGoToTokenAtIndexPtr.asFunction< - int Function(CFStringTokenizerRef, int)>(); + late final _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr = + _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAttributedStringRef, CFIndex, + CFRange, ffi.Pointer)>>( + 'CFAttributedStringGetAttributesAndLongestEffectiveRange'); + late final _CFAttributedStringGetAttributesAndLongestEffectiveRange = + _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr.asFunction< + CFDictionaryRef Function( + CFAttributedStringRef, int, CFRange, ffi.Pointer)>(); - int CFStringTokenizerAdvanceToNextToken( - CFStringTokenizerRef tokenizer, + CFTypeRef CFAttributedStringGetAttributeAndLongestEffectiveRange( + CFAttributedStringRef aStr, + int loc, + CFStringRef attrName, + CFRange inRange, + ffi.Pointer longestEffectiveRange, ) { - return _CFStringTokenizerAdvanceToNextToken( - tokenizer, + return _CFAttributedStringGetAttributeAndLongestEffectiveRange( + aStr, + loc, + attrName, + inRange, + longestEffectiveRange, ); } - late final _CFStringTokenizerAdvanceToNextTokenPtr = - _lookup>( - 'CFStringTokenizerAdvanceToNextToken'); - late final _CFStringTokenizerAdvanceToNextToken = - _CFStringTokenizerAdvanceToNextTokenPtr.asFunction< - int Function(CFStringTokenizerRef)>(); + late final _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr = + _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFAttributedStringRef, CFIndex, + CFStringRef, CFRange, ffi.Pointer)>>( + 'CFAttributedStringGetAttributeAndLongestEffectiveRange'); + late final _CFAttributedStringGetAttributeAndLongestEffectiveRange = + _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr.asFunction< + CFTypeRef Function(CFAttributedStringRef, int, CFStringRef, CFRange, + ffi.Pointer)>(); - CFRange CFStringTokenizerGetCurrentTokenRange( - CFStringTokenizerRef tokenizer, + CFMutableAttributedStringRef CFAttributedStringCreateMutableCopy( + CFAllocatorRef alloc, + int maxLength, + CFAttributedStringRef aStr, ) { - return _CFStringTokenizerGetCurrentTokenRange( - tokenizer, + return _CFAttributedStringCreateMutableCopy( + alloc, + maxLength, + aStr, ); } - late final _CFStringTokenizerGetCurrentTokenRangePtr = - _lookup>( - 'CFStringTokenizerGetCurrentTokenRange'); - late final _CFStringTokenizerGetCurrentTokenRange = - _CFStringTokenizerGetCurrentTokenRangePtr.asFunction< - CFRange Function(CFStringTokenizerRef)>(); + late final _CFAttributedStringCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableAttributedStringRef Function(CFAllocatorRef, CFIndex, + CFAttributedStringRef)>>('CFAttributedStringCreateMutableCopy'); + late final _CFAttributedStringCreateMutableCopy = + _CFAttributedStringCreateMutableCopyPtr.asFunction< + CFMutableAttributedStringRef Function( + CFAllocatorRef, int, CFAttributedStringRef)>(); - CFTypeRef CFStringTokenizerCopyCurrentTokenAttribute( - CFStringTokenizerRef tokenizer, - int attribute, + CFMutableAttributedStringRef CFAttributedStringCreateMutable( + CFAllocatorRef alloc, + int maxLength, ) { - return _CFStringTokenizerCopyCurrentTokenAttribute( - tokenizer, - attribute, + return _CFAttributedStringCreateMutable( + alloc, + maxLength, ); } - late final _CFStringTokenizerCopyCurrentTokenAttributePtr = _lookup< + late final _CFAttributedStringCreateMutablePtr = _lookup< ffi.NativeFunction< - CFTypeRef Function(CFStringTokenizerRef, - CFOptionFlags)>>('CFStringTokenizerCopyCurrentTokenAttribute'); - late final _CFStringTokenizerCopyCurrentTokenAttribute = - _CFStringTokenizerCopyCurrentTokenAttributePtr.asFunction< - CFTypeRef Function(CFStringTokenizerRef, int)>(); + CFMutableAttributedStringRef Function( + CFAllocatorRef, CFIndex)>>('CFAttributedStringCreateMutable'); + late final _CFAttributedStringCreateMutable = + _CFAttributedStringCreateMutablePtr.asFunction< + CFMutableAttributedStringRef Function(CFAllocatorRef, int)>(); - int CFStringTokenizerGetCurrentSubTokens( - CFStringTokenizerRef tokenizer, - ffi.Pointer ranges, - int maxRangeLength, - CFMutableArrayRef derivedSubTokens, + void CFAttributedStringReplaceString( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef replacement, ) { - return _CFStringTokenizerGetCurrentSubTokens( - tokenizer, - ranges, - maxRangeLength, - derivedSubTokens, + return _CFAttributedStringReplaceString( + aStr, + range, + replacement, ); } - late final _CFStringTokenizerGetCurrentSubTokensPtr = _lookup< + late final _CFAttributedStringReplaceStringPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFStringTokenizerRef, ffi.Pointer, CFIndex, - CFMutableArrayRef)>>('CFStringTokenizerGetCurrentSubTokens'); - late final _CFStringTokenizerGetCurrentSubTokens = - _CFStringTokenizerGetCurrentSubTokensPtr.asFunction< - int Function(CFStringTokenizerRef, ffi.Pointer, int, - CFMutableArrayRef)>(); - - int CFFileDescriptorGetTypeID() { - return _CFFileDescriptorGetTypeID(); - } - - late final _CFFileDescriptorGetTypeIDPtr = - _lookup>( - 'CFFileDescriptorGetTypeID'); - late final _CFFileDescriptorGetTypeID = - _CFFileDescriptorGetTypeIDPtr.asFunction(); + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFStringRef)>>('CFAttributedStringReplaceString'); + late final _CFAttributedStringReplaceString = + _CFAttributedStringReplaceStringPtr.asFunction< + void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); - CFFileDescriptorRef CFFileDescriptorCreate( - CFAllocatorRef allocator, - int fd, - int closeOnInvalidate, - CFFileDescriptorCallBack callout, - ffi.Pointer context, + CFMutableStringRef CFAttributedStringGetMutableString( + CFMutableAttributedStringRef aStr, ) { - return _CFFileDescriptorCreate( - allocator, - fd, - closeOnInvalidate, - callout, - context, + return _CFAttributedStringGetMutableString( + aStr, ); } - late final _CFFileDescriptorCreatePtr = _lookup< - ffi.NativeFunction< - CFFileDescriptorRef Function( - CFAllocatorRef, - CFFileDescriptorNativeDescriptor, - Boolean, - CFFileDescriptorCallBack, - ffi.Pointer)>>('CFFileDescriptorCreate'); - late final _CFFileDescriptorCreate = _CFFileDescriptorCreatePtr.asFunction< - CFFileDescriptorRef Function(CFAllocatorRef, int, int, - CFFileDescriptorCallBack, ffi.Pointer)>(); + late final _CFAttributedStringGetMutableStringPtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function(CFMutableAttributedStringRef)>>( + 'CFAttributedStringGetMutableString'); + late final _CFAttributedStringGetMutableString = + _CFAttributedStringGetMutableStringPtr.asFunction< + CFMutableStringRef Function(CFMutableAttributedStringRef)>(); - int CFFileDescriptorGetNativeDescriptor( - CFFileDescriptorRef f, + void CFAttributedStringSetAttributes( + CFMutableAttributedStringRef aStr, + CFRange range, + CFDictionaryRef replacement, + int clearOtherAttributes, ) { - return _CFFileDescriptorGetNativeDescriptor( - f, + return _CFAttributedStringSetAttributes( + aStr, + range, + replacement, + clearOtherAttributes, ); } - late final _CFFileDescriptorGetNativeDescriptorPtr = _lookup< + late final _CFAttributedStringSetAttributesPtr = _lookup< ffi.NativeFunction< - CFFileDescriptorNativeDescriptor Function( - CFFileDescriptorRef)>>('CFFileDescriptorGetNativeDescriptor'); - late final _CFFileDescriptorGetNativeDescriptor = - _CFFileDescriptorGetNativeDescriptorPtr.asFunction< - int Function(CFFileDescriptorRef)>(); + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFDictionaryRef, Boolean)>>('CFAttributedStringSetAttributes'); + late final _CFAttributedStringSetAttributes = + _CFAttributedStringSetAttributesPtr.asFunction< + void Function( + CFMutableAttributedStringRef, CFRange, CFDictionaryRef, int)>(); - void CFFileDescriptorGetContext( - CFFileDescriptorRef f, - ffi.Pointer context, + void CFAttributedStringSetAttribute( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef attrName, + CFTypeRef value, ) { - return _CFFileDescriptorGetContext( - f, - context, + return _CFAttributedStringSetAttribute( + aStr, + range, + attrName, + value, ); } - late final _CFFileDescriptorGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFFileDescriptorRef, ffi.Pointer)>>( - 'CFFileDescriptorGetContext'); - late final _CFFileDescriptorGetContext = - _CFFileDescriptorGetContextPtr.asFunction< + late final _CFAttributedStringSetAttributePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, CFStringRef, + CFTypeRef)>>('CFAttributedStringSetAttribute'); + late final _CFAttributedStringSetAttribute = + _CFAttributedStringSetAttributePtr.asFunction< void Function( - CFFileDescriptorRef, ffi.Pointer)>(); + CFMutableAttributedStringRef, CFRange, CFStringRef, CFTypeRef)>(); - void CFFileDescriptorEnableCallBacks( - CFFileDescriptorRef f, - int callBackTypes, + void CFAttributedStringRemoveAttribute( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef attrName, ) { - return _CFFileDescriptorEnableCallBacks( - f, - callBackTypes, + return _CFAttributedStringRemoveAttribute( + aStr, + range, + attrName, ); } - late final _CFFileDescriptorEnableCallBacksPtr = _lookup< + late final _CFAttributedStringRemoveAttributePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFFileDescriptorRef, - CFOptionFlags)>>('CFFileDescriptorEnableCallBacks'); - late final _CFFileDescriptorEnableCallBacks = - _CFFileDescriptorEnableCallBacksPtr.asFunction< - void Function(CFFileDescriptorRef, int)>(); - - void CFFileDescriptorDisableCallBacks( - CFFileDescriptorRef f, - int callBackTypes, + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFStringRef)>>('CFAttributedStringRemoveAttribute'); + late final _CFAttributedStringRemoveAttribute = + _CFAttributedStringRemoveAttributePtr.asFunction< + void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); + + void CFAttributedStringReplaceAttributedString( + CFMutableAttributedStringRef aStr, + CFRange range, + CFAttributedStringRef replacement, ) { - return _CFFileDescriptorDisableCallBacks( - f, - callBackTypes, + return _CFAttributedStringReplaceAttributedString( + aStr, + range, + replacement, ); } - late final _CFFileDescriptorDisableCallBacksPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFFileDescriptorRef, - CFOptionFlags)>>('CFFileDescriptorDisableCallBacks'); - late final _CFFileDescriptorDisableCallBacks = - _CFFileDescriptorDisableCallBacksPtr.asFunction< - void Function(CFFileDescriptorRef, int)>(); + late final _CFAttributedStringReplaceAttributedStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFAttributedStringRef)>>( + 'CFAttributedStringReplaceAttributedString'); + late final _CFAttributedStringReplaceAttributedString = + _CFAttributedStringReplaceAttributedStringPtr.asFunction< + void Function( + CFMutableAttributedStringRef, CFRange, CFAttributedStringRef)>(); - void CFFileDescriptorInvalidate( - CFFileDescriptorRef f, + void CFAttributedStringBeginEditing( + CFMutableAttributedStringRef aStr, ) { - return _CFFileDescriptorInvalidate( - f, + return _CFAttributedStringBeginEditing( + aStr, ); } - late final _CFFileDescriptorInvalidatePtr = - _lookup>( - 'CFFileDescriptorInvalidate'); - late final _CFFileDescriptorInvalidate = _CFFileDescriptorInvalidatePtr - .asFunction(); + late final _CFAttributedStringBeginEditingPtr = _lookup< + ffi.NativeFunction>( + 'CFAttributedStringBeginEditing'); + late final _CFAttributedStringBeginEditing = + _CFAttributedStringBeginEditingPtr.asFunction< + void Function(CFMutableAttributedStringRef)>(); - int CFFileDescriptorIsValid( - CFFileDescriptorRef f, + void CFAttributedStringEndEditing( + CFMutableAttributedStringRef aStr, ) { - return _CFFileDescriptorIsValid( - f, + return _CFAttributedStringEndEditing( + aStr, ); } - late final _CFFileDescriptorIsValidPtr = - _lookup>( - 'CFFileDescriptorIsValid'); - late final _CFFileDescriptorIsValid = _CFFileDescriptorIsValidPtr.asFunction< - int Function(CFFileDescriptorRef)>(); + late final _CFAttributedStringEndEditingPtr = _lookup< + ffi.NativeFunction>( + 'CFAttributedStringEndEditing'); + late final _CFAttributedStringEndEditing = _CFAttributedStringEndEditingPtr + .asFunction(); - CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource( - CFAllocatorRef allocator, - CFFileDescriptorRef f, - int order, + int CFURLEnumeratorGetTypeID() { + return _CFURLEnumeratorGetTypeID(); + } + + late final _CFURLEnumeratorGetTypeIDPtr = + _lookup>( + 'CFURLEnumeratorGetTypeID'); + late final _CFURLEnumeratorGetTypeID = + _CFURLEnumeratorGetTypeIDPtr.asFunction(); + + CFURLEnumeratorRef CFURLEnumeratorCreateForDirectoryURL( + CFAllocatorRef alloc, + CFURLRef directoryURL, + int option, + CFArrayRef propertyKeys, ) { - return _CFFileDescriptorCreateRunLoopSource( - allocator, - f, - order, + return _CFURLEnumeratorCreateForDirectoryURL( + alloc, + directoryURL, + option, + propertyKeys, ); } - late final _CFFileDescriptorCreateRunLoopSourcePtr = _lookup< + late final _CFURLEnumeratorCreateForDirectoryURLPtr = _lookup< ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFFileDescriptorRef, - CFIndex)>>('CFFileDescriptorCreateRunLoopSource'); - late final _CFFileDescriptorCreateRunLoopSource = - _CFFileDescriptorCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function( - CFAllocatorRef, CFFileDescriptorRef, int)>(); + CFURLEnumeratorRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, + CFArrayRef)>>('CFURLEnumeratorCreateForDirectoryURL'); + late final _CFURLEnumeratorCreateForDirectoryURL = + _CFURLEnumeratorCreateForDirectoryURLPtr.asFunction< + CFURLEnumeratorRef Function( + CFAllocatorRef, CFURLRef, int, CFArrayRef)>(); - int CFUserNotificationGetTypeID() { - return _CFUserNotificationGetTypeID(); + CFURLEnumeratorRef CFURLEnumeratorCreateForMountedVolumes( + CFAllocatorRef alloc, + int option, + CFArrayRef propertyKeys, + ) { + return _CFURLEnumeratorCreateForMountedVolumes( + alloc, + option, + propertyKeys, + ); } - late final _CFUserNotificationGetTypeIDPtr = - _lookup>( - 'CFUserNotificationGetTypeID'); - late final _CFUserNotificationGetTypeID = - _CFUserNotificationGetTypeIDPtr.asFunction(); + late final _CFURLEnumeratorCreateForMountedVolumesPtr = _lookup< + ffi.NativeFunction< + CFURLEnumeratorRef Function(CFAllocatorRef, ffi.Int32, + CFArrayRef)>>('CFURLEnumeratorCreateForMountedVolumes'); + late final _CFURLEnumeratorCreateForMountedVolumes = + _CFURLEnumeratorCreateForMountedVolumesPtr.asFunction< + CFURLEnumeratorRef Function(CFAllocatorRef, int, CFArrayRef)>(); - CFUserNotificationRef CFUserNotificationCreate( - CFAllocatorRef allocator, - double timeout, - int flags, - ffi.Pointer error, - CFDictionaryRef dictionary, + int CFURLEnumeratorGetNextURL( + CFURLEnumeratorRef enumerator, + ffi.Pointer url, + ffi.Pointer error, ) { - return _CFUserNotificationCreate( - allocator, - timeout, - flags, + return _CFURLEnumeratorGetNextURL( + enumerator, + url, error, - dictionary, ); } - late final _CFUserNotificationCreatePtr = _lookup< + late final _CFURLEnumeratorGetNextURLPtr = _lookup< ffi.NativeFunction< - CFUserNotificationRef Function( - CFAllocatorRef, - CFTimeInterval, - CFOptionFlags, - ffi.Pointer, - CFDictionaryRef)>>('CFUserNotificationCreate'); - late final _CFUserNotificationCreate = - _CFUserNotificationCreatePtr.asFunction< - CFUserNotificationRef Function(CFAllocatorRef, double, int, - ffi.Pointer, CFDictionaryRef)>(); + ffi.Int32 Function(CFURLEnumeratorRef, ffi.Pointer, + ffi.Pointer)>>('CFURLEnumeratorGetNextURL'); + late final _CFURLEnumeratorGetNextURL = + _CFURLEnumeratorGetNextURLPtr.asFunction< + int Function(CFURLEnumeratorRef, ffi.Pointer, + ffi.Pointer)>(); - int CFUserNotificationReceiveResponse( - CFUserNotificationRef userNotification, - double timeout, - ffi.Pointer responseFlags, + void CFURLEnumeratorSkipDescendents( + CFURLEnumeratorRef enumerator, ) { - return _CFUserNotificationReceiveResponse( - userNotification, - timeout, - responseFlags, + return _CFURLEnumeratorSkipDescendents( + enumerator, ); } - late final _CFUserNotificationReceiveResponsePtr = _lookup< - ffi.NativeFunction< - SInt32 Function(CFUserNotificationRef, CFTimeInterval, - ffi.Pointer)>>( - 'CFUserNotificationReceiveResponse'); - late final _CFUserNotificationReceiveResponse = - _CFUserNotificationReceiveResponsePtr.asFunction< - int Function( - CFUserNotificationRef, double, ffi.Pointer)>(); + late final _CFURLEnumeratorSkipDescendentsPtr = + _lookup>( + 'CFURLEnumeratorSkipDescendents'); + late final _CFURLEnumeratorSkipDescendents = + _CFURLEnumeratorSkipDescendentsPtr.asFunction< + void Function(CFURLEnumeratorRef)>(); - CFStringRef CFUserNotificationGetResponseValue( - CFUserNotificationRef userNotification, - CFStringRef key, - int idx, + int CFURLEnumeratorGetDescendentLevel( + CFURLEnumeratorRef enumerator, ) { - return _CFUserNotificationGetResponseValue( - userNotification, - key, - idx, + return _CFURLEnumeratorGetDescendentLevel( + enumerator, ); } - late final _CFUserNotificationGetResponseValuePtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFUserNotificationRef, CFStringRef, - CFIndex)>>('CFUserNotificationGetResponseValue'); - late final _CFUserNotificationGetResponseValue = - _CFUserNotificationGetResponseValuePtr.asFunction< - CFStringRef Function(CFUserNotificationRef, CFStringRef, int)>(); + late final _CFURLEnumeratorGetDescendentLevelPtr = + _lookup>( + 'CFURLEnumeratorGetDescendentLevel'); + late final _CFURLEnumeratorGetDescendentLevel = + _CFURLEnumeratorGetDescendentLevelPtr.asFunction< + int Function(CFURLEnumeratorRef)>(); - CFDictionaryRef CFUserNotificationGetResponseDictionary( - CFUserNotificationRef userNotification, + int CFURLEnumeratorGetSourceDidChange( + CFURLEnumeratorRef enumerator, ) { - return _CFUserNotificationGetResponseDictionary( - userNotification, + return _CFURLEnumeratorGetSourceDidChange( + enumerator, ); } - late final _CFUserNotificationGetResponseDictionaryPtr = _lookup< - ffi.NativeFunction>( - 'CFUserNotificationGetResponseDictionary'); - late final _CFUserNotificationGetResponseDictionary = - _CFUserNotificationGetResponseDictionaryPtr.asFunction< - CFDictionaryRef Function(CFUserNotificationRef)>(); + late final _CFURLEnumeratorGetSourceDidChangePtr = + _lookup>( + 'CFURLEnumeratorGetSourceDidChange'); + late final _CFURLEnumeratorGetSourceDidChange = + _CFURLEnumeratorGetSourceDidChangePtr.asFunction< + int Function(CFURLEnumeratorRef)>(); - int CFUserNotificationUpdate( - CFUserNotificationRef userNotification, - double timeout, - int flags, - CFDictionaryRef dictionary, + acl_t acl_dup( + acl_t acl, ) { - return _CFUserNotificationUpdate( - userNotification, - timeout, - flags, - dictionary, + return _acl_dup( + acl, ); } - late final _CFUserNotificationUpdatePtr = _lookup< - ffi.NativeFunction< - SInt32 Function(CFUserNotificationRef, CFTimeInterval, CFOptionFlags, - CFDictionaryRef)>>('CFUserNotificationUpdate'); - late final _CFUserNotificationUpdate = - _CFUserNotificationUpdatePtr.asFunction< - int Function(CFUserNotificationRef, double, int, CFDictionaryRef)>(); + late final _acl_dupPtr = + _lookup>('acl_dup'); + late final _acl_dup = _acl_dupPtr.asFunction(); - int CFUserNotificationCancel( - CFUserNotificationRef userNotification, + int acl_free( + ffi.Pointer obj_p, ) { - return _CFUserNotificationCancel( - userNotification, + return _acl_free( + obj_p, ); } - late final _CFUserNotificationCancelPtr = - _lookup>( - 'CFUserNotificationCancel'); - late final _CFUserNotificationCancel = _CFUserNotificationCancelPtr - .asFunction(); + late final _acl_freePtr = + _lookup)>>( + 'acl_free'); + late final _acl_free = + _acl_freePtr.asFunction)>(); - CFRunLoopSourceRef CFUserNotificationCreateRunLoopSource( - CFAllocatorRef allocator, - CFUserNotificationRef userNotification, - CFUserNotificationCallBack callout, - int order, + acl_t acl_init( + int count, ) { - return _CFUserNotificationCreateRunLoopSource( - allocator, - userNotification, - callout, - order, + return _acl_init( + count, ); } - late final _CFUserNotificationCreateRunLoopSourcePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function( - CFAllocatorRef, - CFUserNotificationRef, - CFUserNotificationCallBack, - CFIndex)>>('CFUserNotificationCreateRunLoopSource'); - late final _CFUserNotificationCreateRunLoopSource = - _CFUserNotificationCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFUserNotificationRef, - CFUserNotificationCallBack, int)>(); + late final _acl_initPtr = + _lookup>('acl_init'); + late final _acl_init = _acl_initPtr.asFunction(); - int CFUserNotificationDisplayNotice( - double timeout, - int flags, - CFURLRef iconURL, - CFURLRef soundURL, - CFURLRef localizationURL, - CFStringRef alertHeader, - CFStringRef alertMessage, - CFStringRef defaultButtonTitle, + int acl_copy_entry( + acl_entry_t dest_d, + acl_entry_t src_d, ) { - return _CFUserNotificationDisplayNotice( - timeout, - flags, - iconURL, - soundURL, - localizationURL, - alertHeader, - alertMessage, - defaultButtonTitle, + return _acl_copy_entry( + dest_d, + src_d, ); } - late final _CFUserNotificationDisplayNoticePtr = _lookup< - ffi.NativeFunction< - SInt32 Function( - CFTimeInterval, - CFOptionFlags, - CFURLRef, - CFURLRef, - CFURLRef, - CFStringRef, - CFStringRef, - CFStringRef)>>('CFUserNotificationDisplayNotice'); - late final _CFUserNotificationDisplayNotice = - _CFUserNotificationDisplayNoticePtr.asFunction< - int Function(double, int, CFURLRef, CFURLRef, CFURLRef, CFStringRef, - CFStringRef, CFStringRef)>(); + late final _acl_copy_entryPtr = + _lookup>( + 'acl_copy_entry'); + late final _acl_copy_entry = + _acl_copy_entryPtr.asFunction(); - int CFUserNotificationDisplayAlert( - double timeout, - int flags, - CFURLRef iconURL, - CFURLRef soundURL, - CFURLRef localizationURL, - CFStringRef alertHeader, - CFStringRef alertMessage, - CFStringRef defaultButtonTitle, - CFStringRef alternateButtonTitle, - CFStringRef otherButtonTitle, - ffi.Pointer responseFlags, + int acl_create_entry( + ffi.Pointer acl_p, + ffi.Pointer entry_p, ) { - return _CFUserNotificationDisplayAlert( - timeout, - flags, - iconURL, - soundURL, - localizationURL, - alertHeader, - alertMessage, - defaultButtonTitle, - alternateButtonTitle, - otherButtonTitle, - responseFlags, + return _acl_create_entry( + acl_p, + entry_p, ); } - late final _CFUserNotificationDisplayAlertPtr = _lookup< + late final _acl_create_entryPtr = _lookup< ffi.NativeFunction< - SInt32 Function( - CFTimeInterval, - CFOptionFlags, - CFURLRef, - CFURLRef, - CFURLRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringRef, - ffi.Pointer)>>('CFUserNotificationDisplayAlert'); - late final _CFUserNotificationDisplayAlert = - _CFUserNotificationDisplayAlertPtr.asFunction< - int Function( - double, - int, - CFURLRef, - CFURLRef, - CFURLRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringRef, - ffi.Pointer)>(); - - late final ffi.Pointer _kCFUserNotificationIconURLKey = - _lookup('kCFUserNotificationIconURLKey'); + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('acl_create_entry'); + late final _acl_create_entry = _acl_create_entryPtr + .asFunction, ffi.Pointer)>(); - CFStringRef get kCFUserNotificationIconURLKey => - _kCFUserNotificationIconURLKey.value; + int acl_create_entry_np( + ffi.Pointer acl_p, + ffi.Pointer entry_p, + int entry_index, + ) { + return _acl_create_entry_np( + acl_p, + entry_p, + entry_index, + ); + } - set kCFUserNotificationIconURLKey(CFStringRef value) => - _kCFUserNotificationIconURLKey.value = value; + late final _acl_create_entry_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('acl_create_entry_np'); + late final _acl_create_entry_np = _acl_create_entry_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final ffi.Pointer _kCFUserNotificationSoundURLKey = - _lookup('kCFUserNotificationSoundURLKey'); + int acl_delete_entry( + acl_t acl, + acl_entry_t entry_d, + ) { + return _acl_delete_entry( + acl, + entry_d, + ); + } - CFStringRef get kCFUserNotificationSoundURLKey => - _kCFUserNotificationSoundURLKey.value; + late final _acl_delete_entryPtr = + _lookup>( + 'acl_delete_entry'); + late final _acl_delete_entry = + _acl_delete_entryPtr.asFunction(); - set kCFUserNotificationSoundURLKey(CFStringRef value) => - _kCFUserNotificationSoundURLKey.value = value; + int acl_get_entry( + acl_t acl, + int entry_id, + ffi.Pointer entry_p, + ) { + return _acl_get_entry( + acl, + entry_id, + entry_p, + ); + } - late final ffi.Pointer _kCFUserNotificationLocalizationURLKey = - _lookup('kCFUserNotificationLocalizationURLKey'); + late final _acl_get_entryPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + acl_t, ffi.Int, ffi.Pointer)>>('acl_get_entry'); + late final _acl_get_entry = _acl_get_entryPtr + .asFunction)>(); - CFStringRef get kCFUserNotificationLocalizationURLKey => - _kCFUserNotificationLocalizationURLKey.value; + int acl_valid( + acl_t acl, + ) { + return _acl_valid( + acl, + ); + } - set kCFUserNotificationLocalizationURLKey(CFStringRef value) => - _kCFUserNotificationLocalizationURLKey.value = value; + late final _acl_validPtr = + _lookup>('acl_valid'); + late final _acl_valid = _acl_validPtr.asFunction(); - late final ffi.Pointer _kCFUserNotificationAlertHeaderKey = - _lookup('kCFUserNotificationAlertHeaderKey'); + int acl_valid_fd_np( + int fd, + int type, + acl_t acl, + ) { + return _acl_valid_fd_np( + fd, + type, + acl, + ); + } - CFStringRef get kCFUserNotificationAlertHeaderKey => - _kCFUserNotificationAlertHeaderKey.value; - - set kCFUserNotificationAlertHeaderKey(CFStringRef value) => - _kCFUserNotificationAlertHeaderKey.value = value; - - late final ffi.Pointer _kCFUserNotificationAlertMessageKey = - _lookup('kCFUserNotificationAlertMessageKey'); - - CFStringRef get kCFUserNotificationAlertMessageKey => - _kCFUserNotificationAlertMessageKey.value; - - set kCFUserNotificationAlertMessageKey(CFStringRef value) => - _kCFUserNotificationAlertMessageKey.value = value; - - late final ffi.Pointer - _kCFUserNotificationDefaultButtonTitleKey = - _lookup('kCFUserNotificationDefaultButtonTitleKey'); - - CFStringRef get kCFUserNotificationDefaultButtonTitleKey => - _kCFUserNotificationDefaultButtonTitleKey.value; - - set kCFUserNotificationDefaultButtonTitleKey(CFStringRef value) => - _kCFUserNotificationDefaultButtonTitleKey.value = value; - - late final ffi.Pointer - _kCFUserNotificationAlternateButtonTitleKey = - _lookup('kCFUserNotificationAlternateButtonTitleKey'); - - CFStringRef get kCFUserNotificationAlternateButtonTitleKey => - _kCFUserNotificationAlternateButtonTitleKey.value; - - set kCFUserNotificationAlternateButtonTitleKey(CFStringRef value) => - _kCFUserNotificationAlternateButtonTitleKey.value = value; - - late final ffi.Pointer _kCFUserNotificationOtherButtonTitleKey = - _lookup('kCFUserNotificationOtherButtonTitleKey'); - - CFStringRef get kCFUserNotificationOtherButtonTitleKey => - _kCFUserNotificationOtherButtonTitleKey.value; - - set kCFUserNotificationOtherButtonTitleKey(CFStringRef value) => - _kCFUserNotificationOtherButtonTitleKey.value = value; - - late final ffi.Pointer - _kCFUserNotificationProgressIndicatorValueKey = - _lookup('kCFUserNotificationProgressIndicatorValueKey'); - - CFStringRef get kCFUserNotificationProgressIndicatorValueKey => - _kCFUserNotificationProgressIndicatorValueKey.value; - - set kCFUserNotificationProgressIndicatorValueKey(CFStringRef value) => - _kCFUserNotificationProgressIndicatorValueKey.value = value; - - late final ffi.Pointer _kCFUserNotificationPopUpTitlesKey = - _lookup('kCFUserNotificationPopUpTitlesKey'); - - CFStringRef get kCFUserNotificationPopUpTitlesKey => - _kCFUserNotificationPopUpTitlesKey.value; - - set kCFUserNotificationPopUpTitlesKey(CFStringRef value) => - _kCFUserNotificationPopUpTitlesKey.value = value; - - late final ffi.Pointer _kCFUserNotificationTextFieldTitlesKey = - _lookup('kCFUserNotificationTextFieldTitlesKey'); - - CFStringRef get kCFUserNotificationTextFieldTitlesKey => - _kCFUserNotificationTextFieldTitlesKey.value; - - set kCFUserNotificationTextFieldTitlesKey(CFStringRef value) => - _kCFUserNotificationTextFieldTitlesKey.value = value; - - late final ffi.Pointer _kCFUserNotificationCheckBoxTitlesKey = - _lookup('kCFUserNotificationCheckBoxTitlesKey'); - - CFStringRef get kCFUserNotificationCheckBoxTitlesKey => - _kCFUserNotificationCheckBoxTitlesKey.value; - - set kCFUserNotificationCheckBoxTitlesKey(CFStringRef value) => - _kCFUserNotificationCheckBoxTitlesKey.value = value; - - late final ffi.Pointer _kCFUserNotificationTextFieldValuesKey = - _lookup('kCFUserNotificationTextFieldValuesKey'); - - CFStringRef get kCFUserNotificationTextFieldValuesKey => - _kCFUserNotificationTextFieldValuesKey.value; - - set kCFUserNotificationTextFieldValuesKey(CFStringRef value) => - _kCFUserNotificationTextFieldValuesKey.value = value; - - late final ffi.Pointer _kCFUserNotificationPopUpSelectionKey = - _lookup('kCFUserNotificationPopUpSelectionKey'); - - CFStringRef get kCFUserNotificationPopUpSelectionKey => - _kCFUserNotificationPopUpSelectionKey.value; - - set kCFUserNotificationPopUpSelectionKey(CFStringRef value) => - _kCFUserNotificationPopUpSelectionKey.value = value; - - late final ffi.Pointer _kCFUserNotificationAlertTopMostKey = - _lookup('kCFUserNotificationAlertTopMostKey'); - - CFStringRef get kCFUserNotificationAlertTopMostKey => - _kCFUserNotificationAlertTopMostKey.value; - - set kCFUserNotificationAlertTopMostKey(CFStringRef value) => - _kCFUserNotificationAlertTopMostKey.value = value; - - late final ffi.Pointer _kCFUserNotificationKeyboardTypesKey = - _lookup('kCFUserNotificationKeyboardTypesKey'); - - CFStringRef get kCFUserNotificationKeyboardTypesKey => - _kCFUserNotificationKeyboardTypesKey.value; - - set kCFUserNotificationKeyboardTypesKey(CFStringRef value) => - _kCFUserNotificationKeyboardTypesKey.value = value; - - int CFXMLNodeGetTypeID() { - return _CFXMLNodeGetTypeID(); - } - - late final _CFXMLNodeGetTypeIDPtr = - _lookup>('CFXMLNodeGetTypeID'); - late final _CFXMLNodeGetTypeID = - _CFXMLNodeGetTypeIDPtr.asFunction(); + late final _acl_valid_fd_npPtr = + _lookup>( + 'acl_valid_fd_np'); + late final _acl_valid_fd_np = + _acl_valid_fd_npPtr.asFunction(); - CFXMLNodeRef CFXMLNodeCreate( - CFAllocatorRef alloc, - int xmlType, - CFStringRef dataString, - ffi.Pointer additionalInfoPtr, - int version, + int acl_valid_file_np( + ffi.Pointer path, + int type, + acl_t acl, ) { - return _CFXMLNodeCreate( - alloc, - xmlType, - dataString, - additionalInfoPtr, - version, + return _acl_valid_file_np( + path, + type, + acl, ); } - late final _CFXMLNodeCreatePtr = _lookup< + late final _acl_valid_file_npPtr = _lookup< ffi.NativeFunction< - CFXMLNodeRef Function(CFAllocatorRef, ffi.Int32, CFStringRef, - ffi.Pointer, CFIndex)>>('CFXMLNodeCreate'); - late final _CFXMLNodeCreate = _CFXMLNodeCreatePtr.asFunction< - CFXMLNodeRef Function( - CFAllocatorRef, int, CFStringRef, ffi.Pointer, int)>(); + ffi.Int Function( + ffi.Pointer, ffi.Int32, acl_t)>>('acl_valid_file_np'); + late final _acl_valid_file_np = _acl_valid_file_npPtr + .asFunction, int, acl_t)>(); - CFXMLNodeRef CFXMLNodeCreateCopy( - CFAllocatorRef alloc, - CFXMLNodeRef origNode, + int acl_valid_link_np( + ffi.Pointer path, + int type, + acl_t acl, ) { - return _CFXMLNodeCreateCopy( - alloc, - origNode, + return _acl_valid_link_np( + path, + type, + acl, ); } - late final _CFXMLNodeCreateCopyPtr = _lookup< + late final _acl_valid_link_npPtr = _lookup< ffi.NativeFunction< - CFXMLNodeRef Function( - CFAllocatorRef, CFXMLNodeRef)>>('CFXMLNodeCreateCopy'); - late final _CFXMLNodeCreateCopy = _CFXMLNodeCreateCopyPtr.asFunction< - CFXMLNodeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); + ffi.Int Function( + ffi.Pointer, ffi.Int32, acl_t)>>('acl_valid_link_np'); + late final _acl_valid_link_np = _acl_valid_link_npPtr + .asFunction, int, acl_t)>(); - int CFXMLNodeGetTypeCode( - CFXMLNodeRef node, + int acl_add_perm( + acl_permset_t permset_d, + int perm, ) { - return _CFXMLNodeGetTypeCode( - node, + return _acl_add_perm( + permset_d, + perm, ); } - late final _CFXMLNodeGetTypeCodePtr = - _lookup>( - 'CFXMLNodeGetTypeCode'); - late final _CFXMLNodeGetTypeCode = - _CFXMLNodeGetTypeCodePtr.asFunction(); + late final _acl_add_permPtr = + _lookup>( + 'acl_add_perm'); + late final _acl_add_perm = + _acl_add_permPtr.asFunction(); - CFStringRef CFXMLNodeGetString( - CFXMLNodeRef node, + int acl_calc_mask( + ffi.Pointer acl_p, ) { - return _CFXMLNodeGetString( - node, + return _acl_calc_mask( + acl_p, ); } - late final _CFXMLNodeGetStringPtr = - _lookup>( - 'CFXMLNodeGetString'); - late final _CFXMLNodeGetString = - _CFXMLNodeGetStringPtr.asFunction(); + late final _acl_calc_maskPtr = + _lookup)>>( + 'acl_calc_mask'); + late final _acl_calc_mask = + _acl_calc_maskPtr.asFunction)>(); - ffi.Pointer CFXMLNodeGetInfoPtr( - CFXMLNodeRef node, + int acl_clear_perms( + acl_permset_t permset_d, ) { - return _CFXMLNodeGetInfoPtr( - node, + return _acl_clear_perms( + permset_d, ); } - late final _CFXMLNodeGetInfoPtrPtr = - _lookup Function(CFXMLNodeRef)>>( - 'CFXMLNodeGetInfoPtr'); - late final _CFXMLNodeGetInfoPtr = _CFXMLNodeGetInfoPtrPtr.asFunction< - ffi.Pointer Function(CFXMLNodeRef)>(); + late final _acl_clear_permsPtr = + _lookup>( + 'acl_clear_perms'); + late final _acl_clear_perms = + _acl_clear_permsPtr.asFunction(); - int CFXMLNodeGetVersion( - CFXMLNodeRef node, + int acl_delete_perm( + acl_permset_t permset_d, + int perm, ) { - return _CFXMLNodeGetVersion( - node, + return _acl_delete_perm( + permset_d, + perm, ); } - late final _CFXMLNodeGetVersionPtr = - _lookup>( - 'CFXMLNodeGetVersion'); - late final _CFXMLNodeGetVersion = - _CFXMLNodeGetVersionPtr.asFunction(); + late final _acl_delete_permPtr = + _lookup>( + 'acl_delete_perm'); + late final _acl_delete_perm = + _acl_delete_permPtr.asFunction(); - CFXMLTreeRef CFXMLTreeCreateWithNode( - CFAllocatorRef allocator, - CFXMLNodeRef node, + int acl_get_perm_np( + acl_permset_t permset_d, + int perm, ) { - return _CFXMLTreeCreateWithNode( - allocator, - node, + return _acl_get_perm_np( + permset_d, + perm, ); } - late final _CFXMLTreeCreateWithNodePtr = _lookup< - ffi.NativeFunction< - CFXMLTreeRef Function( - CFAllocatorRef, CFXMLNodeRef)>>('CFXMLTreeCreateWithNode'); - late final _CFXMLTreeCreateWithNode = _CFXMLTreeCreateWithNodePtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); + late final _acl_get_perm_npPtr = + _lookup>( + 'acl_get_perm_np'); + late final _acl_get_perm_np = + _acl_get_perm_npPtr.asFunction(); - CFXMLNodeRef CFXMLTreeGetNode( - CFXMLTreeRef xmlTree, + int acl_get_permset( + acl_entry_t entry_d, + ffi.Pointer permset_p, ) { - return _CFXMLTreeGetNode( - xmlTree, + return _acl_get_permset( + entry_d, + permset_p, ); } - late final _CFXMLTreeGetNodePtr = - _lookup>( - 'CFXMLTreeGetNode'); - late final _CFXMLTreeGetNode = - _CFXMLTreeGetNodePtr.asFunction(); + late final _acl_get_permsetPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + acl_entry_t, ffi.Pointer)>>('acl_get_permset'); + late final _acl_get_permset = _acl_get_permsetPtr + .asFunction)>(); - int CFXMLParserGetTypeID() { - return _CFXMLParserGetTypeID(); + int acl_set_permset( + acl_entry_t entry_d, + acl_permset_t permset_d, + ) { + return _acl_set_permset( + entry_d, + permset_d, + ); } - late final _CFXMLParserGetTypeIDPtr = - _lookup>('CFXMLParserGetTypeID'); - late final _CFXMLParserGetTypeID = - _CFXMLParserGetTypeIDPtr.asFunction(); + late final _acl_set_permsetPtr = + _lookup>( + 'acl_set_permset'); + late final _acl_set_permset = _acl_set_permsetPtr + .asFunction(); - CFXMLParserRef CFXMLParserCreate( - CFAllocatorRef allocator, - CFDataRef xmlData, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ffi.Pointer callBacks, - ffi.Pointer context, + int acl_maximal_permset_mask_np( + ffi.Pointer mask_p, ) { - return _CFXMLParserCreate( - allocator, - xmlData, - dataSource, - parseOptions, - versionOfNodes, - callBacks, - context, + return _acl_maximal_permset_mask_np( + mask_p, ); } - late final _CFXMLParserCreatePtr = _lookup< + late final _acl_maximal_permset_mask_npPtr = _lookup< ffi.NativeFunction< - CFXMLParserRef Function( - CFAllocatorRef, - CFDataRef, - CFURLRef, - CFOptionFlags, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>('CFXMLParserCreate'); - late final _CFXMLParserCreate = _CFXMLParserCreatePtr.asFunction< - CFXMLParserRef Function( - CFAllocatorRef, - CFDataRef, - CFURLRef, - int, - int, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer)>>('acl_maximal_permset_mask_np'); + late final _acl_maximal_permset_mask_np = _acl_maximal_permset_mask_npPtr + .asFunction)>(); - CFXMLParserRef CFXMLParserCreateWithDataFromURL( - CFAllocatorRef allocator, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ffi.Pointer callBacks, - ffi.Pointer context, + int acl_get_permset_mask_np( + acl_entry_t entry_d, + ffi.Pointer mask_p, ) { - return _CFXMLParserCreateWithDataFromURL( - allocator, - dataSource, - parseOptions, - versionOfNodes, - callBacks, - context, + return _acl_get_permset_mask_np( + entry_d, + mask_p, ); } - late final _CFXMLParserCreateWithDataFromURLPtr = _lookup< - ffi.NativeFunction< - CFXMLParserRef Function( - CFAllocatorRef, - CFURLRef, - CFOptionFlags, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>( - 'CFXMLParserCreateWithDataFromURL'); - late final _CFXMLParserCreateWithDataFromURL = - _CFXMLParserCreateWithDataFromURLPtr.asFunction< - CFXMLParserRef Function( - CFAllocatorRef, - CFURLRef, - int, - int, - ffi.Pointer, - ffi.Pointer)>(); + late final _acl_get_permset_mask_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(acl_entry_t, + ffi.Pointer)>>('acl_get_permset_mask_np'); + late final _acl_get_permset_mask_np = _acl_get_permset_mask_npPtr + .asFunction)>(); - void CFXMLParserGetContext( - CFXMLParserRef parser, - ffi.Pointer context, + int acl_set_permset_mask_np( + acl_entry_t entry_d, + int mask, ) { - return _CFXMLParserGetContext( - parser, - context, + return _acl_set_permset_mask_np( + entry_d, + mask, ); } - late final _CFXMLParserGetContextPtr = _lookup< + late final _acl_set_permset_mask_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFXMLParserRef, - ffi.Pointer)>>('CFXMLParserGetContext'); - late final _CFXMLParserGetContext = _CFXMLParserGetContextPtr.asFunction< - void Function(CFXMLParserRef, ffi.Pointer)>(); + ffi.Int Function( + acl_entry_t, acl_permset_mask_t)>>('acl_set_permset_mask_np'); + late final _acl_set_permset_mask_np = + _acl_set_permset_mask_npPtr.asFunction(); - void CFXMLParserGetCallBacks( - CFXMLParserRef parser, - ffi.Pointer callBacks, + int acl_add_flag_np( + acl_flagset_t flagset_d, + int flag, ) { - return _CFXMLParserGetCallBacks( - parser, - callBacks, + return _acl_add_flag_np( + flagset_d, + flag, ); } - late final _CFXMLParserGetCallBacksPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFXMLParserRef, - ffi.Pointer)>>('CFXMLParserGetCallBacks'); - late final _CFXMLParserGetCallBacks = _CFXMLParserGetCallBacksPtr.asFunction< - void Function(CFXMLParserRef, ffi.Pointer)>(); + late final _acl_add_flag_npPtr = + _lookup>( + 'acl_add_flag_np'); + late final _acl_add_flag_np = + _acl_add_flag_npPtr.asFunction(); - CFURLRef CFXMLParserGetSourceURL( - CFXMLParserRef parser, + int acl_clear_flags_np( + acl_flagset_t flagset_d, ) { - return _CFXMLParserGetSourceURL( - parser, + return _acl_clear_flags_np( + flagset_d, ); } - late final _CFXMLParserGetSourceURLPtr = - _lookup>( - 'CFXMLParserGetSourceURL'); - late final _CFXMLParserGetSourceURL = _CFXMLParserGetSourceURLPtr.asFunction< - CFURLRef Function(CFXMLParserRef)>(); + late final _acl_clear_flags_npPtr = + _lookup>( + 'acl_clear_flags_np'); + late final _acl_clear_flags_np = + _acl_clear_flags_npPtr.asFunction(); - int CFXMLParserGetLocation( - CFXMLParserRef parser, + int acl_delete_flag_np( + acl_flagset_t flagset_d, + int flag, ) { - return _CFXMLParserGetLocation( - parser, + return _acl_delete_flag_np( + flagset_d, + flag, ); } - late final _CFXMLParserGetLocationPtr = - _lookup>( - 'CFXMLParserGetLocation'); - late final _CFXMLParserGetLocation = - _CFXMLParserGetLocationPtr.asFunction(); + late final _acl_delete_flag_npPtr = + _lookup>( + 'acl_delete_flag_np'); + late final _acl_delete_flag_np = + _acl_delete_flag_npPtr.asFunction(); - int CFXMLParserGetLineNumber( - CFXMLParserRef parser, + int acl_get_flag_np( + acl_flagset_t flagset_d, + int flag, ) { - return _CFXMLParserGetLineNumber( - parser, + return _acl_get_flag_np( + flagset_d, + flag, ); } - late final _CFXMLParserGetLineNumberPtr = - _lookup>( - 'CFXMLParserGetLineNumber'); - late final _CFXMLParserGetLineNumber = - _CFXMLParserGetLineNumberPtr.asFunction(); - - ffi.Pointer CFXMLParserGetDocument( - CFXMLParserRef parser, - ) { - return _CFXMLParserGetDocument( - parser, + late final _acl_get_flag_npPtr = + _lookup>( + 'acl_get_flag_np'); + late final _acl_get_flag_np = + _acl_get_flag_npPtr.asFunction(); + + int acl_get_flagset_np( + ffi.Pointer obj_p, + ffi.Pointer flagset_p, + ) { + return _acl_get_flagset_np( + obj_p, + flagset_p, ); } - late final _CFXMLParserGetDocumentPtr = _lookup< - ffi.NativeFunction Function(CFXMLParserRef)>>( - 'CFXMLParserGetDocument'); - late final _CFXMLParserGetDocument = _CFXMLParserGetDocumentPtr.asFunction< - ffi.Pointer Function(CFXMLParserRef)>(); + late final _acl_get_flagset_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('acl_get_flagset_np'); + late final _acl_get_flagset_np = _acl_get_flagset_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - int CFXMLParserGetStatusCode( - CFXMLParserRef parser, + int acl_set_flagset_np( + ffi.Pointer obj_p, + acl_flagset_t flagset_d, ) { - return _CFXMLParserGetStatusCode( - parser, + return _acl_set_flagset_np( + obj_p, + flagset_d, ); } - late final _CFXMLParserGetStatusCodePtr = - _lookup>( - 'CFXMLParserGetStatusCode'); - late final _CFXMLParserGetStatusCode = - _CFXMLParserGetStatusCodePtr.asFunction(); + late final _acl_set_flagset_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, acl_flagset_t)>>('acl_set_flagset_np'); + late final _acl_set_flagset_np = _acl_set_flagset_npPtr + .asFunction, acl_flagset_t)>(); - CFStringRef CFXMLParserCopyErrorDescription( - CFXMLParserRef parser, + ffi.Pointer acl_get_qualifier( + acl_entry_t entry_d, ) { - return _CFXMLParserCopyErrorDescription( - parser, + return _acl_get_qualifier( + entry_d, ); } - late final _CFXMLParserCopyErrorDescriptionPtr = - _lookup>( - 'CFXMLParserCopyErrorDescription'); - late final _CFXMLParserCopyErrorDescription = - _CFXMLParserCopyErrorDescriptionPtr.asFunction< - CFStringRef Function(CFXMLParserRef)>(); + late final _acl_get_qualifierPtr = + _lookup Function(acl_entry_t)>>( + 'acl_get_qualifier'); + late final _acl_get_qualifier = _acl_get_qualifierPtr + .asFunction Function(acl_entry_t)>(); - void CFXMLParserAbort( - CFXMLParserRef parser, - int errorCode, - CFStringRef errorDescription, + int acl_get_tag_type( + acl_entry_t entry_d, + ffi.Pointer tag_type_p, ) { - return _CFXMLParserAbort( - parser, - errorCode, - errorDescription, + return _acl_get_tag_type( + entry_d, + tag_type_p, ); } - late final _CFXMLParserAbortPtr = _lookup< + late final _acl_get_tag_typePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFXMLParserRef, ffi.Int32, CFStringRef)>>('CFXMLParserAbort'); - late final _CFXMLParserAbort = _CFXMLParserAbortPtr.asFunction< - void Function(CFXMLParserRef, int, CFStringRef)>(); + ffi.Int Function( + acl_entry_t, ffi.Pointer)>>('acl_get_tag_type'); + late final _acl_get_tag_type = _acl_get_tag_typePtr + .asFunction)>(); - int CFXMLParserParse( - CFXMLParserRef parser, + int acl_set_qualifier( + acl_entry_t entry_d, + ffi.Pointer tag_qualifier_p, ) { - return _CFXMLParserParse( - parser, + return _acl_set_qualifier( + entry_d, + tag_qualifier_p, ); } - late final _CFXMLParserParsePtr = - _lookup>( - 'CFXMLParserParse'); - late final _CFXMLParserParse = - _CFXMLParserParsePtr.asFunction(); + late final _acl_set_qualifierPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + acl_entry_t, ffi.Pointer)>>('acl_set_qualifier'); + late final _acl_set_qualifier = _acl_set_qualifierPtr + .asFunction)>(); - CFXMLTreeRef CFXMLTreeCreateFromData( - CFAllocatorRef allocator, - CFDataRef xmlData, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, + int acl_set_tag_type( + acl_entry_t entry_d, + int tag_type, ) { - return _CFXMLTreeCreateFromData( - allocator, - xmlData, - dataSource, - parseOptions, - versionOfNodes, + return _acl_set_tag_type( + entry_d, + tag_type, ); } - late final _CFXMLTreeCreateFromDataPtr = _lookup< - ffi.NativeFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, - CFOptionFlags, CFIndex)>>('CFXMLTreeCreateFromData'); - late final _CFXMLTreeCreateFromData = _CFXMLTreeCreateFromDataPtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int)>(); + late final _acl_set_tag_typePtr = + _lookup>( + 'acl_set_tag_type'); + late final _acl_set_tag_type = + _acl_set_tag_typePtr.asFunction(); - CFXMLTreeRef CFXMLTreeCreateFromDataWithError( - CFAllocatorRef allocator, - CFDataRef xmlData, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ffi.Pointer errorDict, + int acl_delete_def_file( + ffi.Pointer path_p, ) { - return _CFXMLTreeCreateFromDataWithError( - allocator, - xmlData, - dataSource, - parseOptions, - versionOfNodes, - errorDict, + return _acl_delete_def_file( + path_p, ); } - late final _CFXMLTreeCreateFromDataWithErrorPtr = _lookup< - ffi.NativeFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, - CFOptionFlags, CFIndex, ffi.Pointer)>>( - 'CFXMLTreeCreateFromDataWithError'); - late final _CFXMLTreeCreateFromDataWithError = - _CFXMLTreeCreateFromDataWithErrorPtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int, - ffi.Pointer)>(); + late final _acl_delete_def_filePtr = + _lookup)>>( + 'acl_delete_def_file'); + late final _acl_delete_def_file = + _acl_delete_def_filePtr.asFunction)>(); - CFXMLTreeRef CFXMLTreeCreateWithDataFromURL( - CFAllocatorRef allocator, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, + acl_t acl_get_fd( + int fd, ) { - return _CFXMLTreeCreateWithDataFromURL( - allocator, - dataSource, - parseOptions, - versionOfNodes, + return _acl_get_fd( + fd, ); } - late final _CFXMLTreeCreateWithDataFromURLPtr = _lookup< - ffi.NativeFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, CFOptionFlags, - CFIndex)>>('CFXMLTreeCreateWithDataFromURL'); - late final _CFXMLTreeCreateWithDataFromURL = - _CFXMLTreeCreateWithDataFromURLPtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, int, int)>(); + late final _acl_get_fdPtr = + _lookup>('acl_get_fd'); + late final _acl_get_fd = _acl_get_fdPtr.asFunction(); - CFDataRef CFXMLTreeCreateXMLData( - CFAllocatorRef allocator, - CFXMLTreeRef xmlTree, + acl_t acl_get_fd_np( + int fd, + int type, ) { - return _CFXMLTreeCreateXMLData( - allocator, - xmlTree, + return _acl_get_fd_np( + fd, + type, ); } - late final _CFXMLTreeCreateXMLDataPtr = _lookup< - ffi.NativeFunction>( - 'CFXMLTreeCreateXMLData'); - late final _CFXMLTreeCreateXMLData = _CFXMLTreeCreateXMLDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFXMLTreeRef)>(); + late final _acl_get_fd_npPtr = + _lookup>( + 'acl_get_fd_np'); + late final _acl_get_fd_np = + _acl_get_fd_npPtr.asFunction(); - CFStringRef CFXMLCreateStringByEscapingEntities( - CFAllocatorRef allocator, - CFStringRef string, - CFDictionaryRef entitiesDictionary, + acl_t acl_get_file( + ffi.Pointer path_p, + int type, ) { - return _CFXMLCreateStringByEscapingEntities( - allocator, - string, - entitiesDictionary, + return _acl_get_file( + path_p, + type, ); } - late final _CFXMLCreateStringByEscapingEntitiesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFDictionaryRef)>>('CFXMLCreateStringByEscapingEntities'); - late final _CFXMLCreateStringByEscapingEntities = - _CFXMLCreateStringByEscapingEntitiesPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); + late final _acl_get_filePtr = _lookup< + ffi.NativeFunction, ffi.Int32)>>( + 'acl_get_file'); + late final _acl_get_file = + _acl_get_filePtr.asFunction, int)>(); - CFStringRef CFXMLCreateStringByUnescapingEntities( - CFAllocatorRef allocator, - CFStringRef string, - CFDictionaryRef entitiesDictionary, + acl_t acl_get_link_np( + ffi.Pointer path_p, + int type, ) { - return _CFXMLCreateStringByUnescapingEntities( - allocator, - string, - entitiesDictionary, + return _acl_get_link_np( + path_p, + type, ); } - late final _CFXMLCreateStringByUnescapingEntitiesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFDictionaryRef)>>('CFXMLCreateStringByUnescapingEntities'); - late final _CFXMLCreateStringByUnescapingEntities = - _CFXMLCreateStringByUnescapingEntitiesPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - - late final ffi.Pointer _kCFXMLTreeErrorDescription = - _lookup('kCFXMLTreeErrorDescription'); - - CFStringRef get kCFXMLTreeErrorDescription => - _kCFXMLTreeErrorDescription.value; + late final _acl_get_link_npPtr = _lookup< + ffi.NativeFunction, ffi.Int32)>>( + 'acl_get_link_np'); + late final _acl_get_link_np = _acl_get_link_npPtr + .asFunction, int)>(); - set kCFXMLTreeErrorDescription(CFStringRef value) => - _kCFXMLTreeErrorDescription.value = value; + int acl_set_fd( + int fd, + acl_t acl, + ) { + return _acl_set_fd( + fd, + acl, + ); + } - late final ffi.Pointer _kCFXMLTreeErrorLineNumber = - _lookup('kCFXMLTreeErrorLineNumber'); + late final _acl_set_fdPtr = + _lookup>( + 'acl_set_fd'); + late final _acl_set_fd = + _acl_set_fdPtr.asFunction(); - CFStringRef get kCFXMLTreeErrorLineNumber => _kCFXMLTreeErrorLineNumber.value; + int acl_set_fd_np( + int fd, + acl_t acl, + int acl_type, + ) { + return _acl_set_fd_np( + fd, + acl, + acl_type, + ); + } - set kCFXMLTreeErrorLineNumber(CFStringRef value) => - _kCFXMLTreeErrorLineNumber.value = value; + late final _acl_set_fd_npPtr = + _lookup>( + 'acl_set_fd_np'); + late final _acl_set_fd_np = + _acl_set_fd_npPtr.asFunction(); - late final ffi.Pointer _kCFXMLTreeErrorLocation = - _lookup('kCFXMLTreeErrorLocation'); + int acl_set_file( + ffi.Pointer path_p, + int type, + acl_t acl, + ) { + return _acl_set_file( + path_p, + type, + acl, + ); + } - CFStringRef get kCFXMLTreeErrorLocation => _kCFXMLTreeErrorLocation.value; + late final _acl_set_filePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int32, acl_t)>>('acl_set_file'); + late final _acl_set_file = _acl_set_filePtr + .asFunction, int, acl_t)>(); - set kCFXMLTreeErrorLocation(CFStringRef value) => - _kCFXMLTreeErrorLocation.value = value; + int acl_set_link_np( + ffi.Pointer path_p, + int type, + acl_t acl, + ) { + return _acl_set_link_np( + path_p, + type, + acl, + ); + } - late final ffi.Pointer _kCFXMLTreeErrorStatusCode = - _lookup('kCFXMLTreeErrorStatusCode'); + late final _acl_set_link_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int32, acl_t)>>('acl_set_link_np'); + late final _acl_set_link_np = _acl_set_link_npPtr + .asFunction, int, acl_t)>(); - CFStringRef get kCFXMLTreeErrorStatusCode => _kCFXMLTreeErrorStatusCode.value; + int acl_copy_ext( + ffi.Pointer buf_p, + acl_t acl, + int size, + ) { + return _acl_copy_ext( + buf_p, + acl, + size, + ); + } - set kCFXMLTreeErrorStatusCode(CFStringRef value) => - _kCFXMLTreeErrorStatusCode.value = value; + late final _acl_copy_extPtr = _lookup< + ffi.NativeFunction< + ssize_t Function( + ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext'); + late final _acl_copy_ext = _acl_copy_extPtr + .asFunction, acl_t, int)>(); - late final ffi.Pointer _kSecPropertyTypeTitle = - _lookup('kSecPropertyTypeTitle'); + int acl_copy_ext_native( + ffi.Pointer buf_p, + acl_t acl, + int size, + ) { + return _acl_copy_ext_native( + buf_p, + acl, + size, + ); + } - CFStringRef get kSecPropertyTypeTitle => _kSecPropertyTypeTitle.value; + late final _acl_copy_ext_nativePtr = _lookup< + ffi.NativeFunction< + ssize_t Function( + ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext_native'); + late final _acl_copy_ext_native = _acl_copy_ext_nativePtr + .asFunction, acl_t, int)>(); - set kSecPropertyTypeTitle(CFStringRef value) => - _kSecPropertyTypeTitle.value = value; + acl_t acl_copy_int( + ffi.Pointer buf_p, + ) { + return _acl_copy_int( + buf_p, + ); + } - late final ffi.Pointer _kSecPropertyTypeError = - _lookup('kSecPropertyTypeError'); + late final _acl_copy_intPtr = + _lookup)>>( + 'acl_copy_int'); + late final _acl_copy_int = + _acl_copy_intPtr.asFunction)>(); - CFStringRef get kSecPropertyTypeError => _kSecPropertyTypeError.value; + acl_t acl_copy_int_native( + ffi.Pointer buf_p, + ) { + return _acl_copy_int_native( + buf_p, + ); + } - set kSecPropertyTypeError(CFStringRef value) => - _kSecPropertyTypeError.value = value; + late final _acl_copy_int_nativePtr = + _lookup)>>( + 'acl_copy_int_native'); + late final _acl_copy_int_native = _acl_copy_int_nativePtr + .asFunction)>(); - late final ffi.Pointer _kSecTrustEvaluationDate = - _lookup('kSecTrustEvaluationDate'); + acl_t acl_from_text( + ffi.Pointer buf_p, + ) { + return _acl_from_text( + buf_p, + ); + } - CFStringRef get kSecTrustEvaluationDate => _kSecTrustEvaluationDate.value; + late final _acl_from_textPtr = + _lookup)>>( + 'acl_from_text'); + late final _acl_from_text = + _acl_from_textPtr.asFunction)>(); - set kSecTrustEvaluationDate(CFStringRef value) => - _kSecTrustEvaluationDate.value = value; + int acl_size( + acl_t acl, + ) { + return _acl_size( + acl, + ); + } - late final ffi.Pointer _kSecTrustExtendedValidation = - _lookup('kSecTrustExtendedValidation'); + late final _acl_sizePtr = + _lookup>('acl_size'); + late final _acl_size = _acl_sizePtr.asFunction(); - CFStringRef get kSecTrustExtendedValidation => - _kSecTrustExtendedValidation.value; + ffi.Pointer acl_to_text( + acl_t acl, + ffi.Pointer len_p, + ) { + return _acl_to_text( + acl, + len_p, + ); + } - set kSecTrustExtendedValidation(CFStringRef value) => - _kSecTrustExtendedValidation.value = value; + late final _acl_to_textPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + acl_t, ffi.Pointer)>>('acl_to_text'); + late final _acl_to_text = _acl_to_textPtr.asFunction< + ffi.Pointer Function(acl_t, ffi.Pointer)>(); - late final ffi.Pointer _kSecTrustOrganizationName = - _lookup('kSecTrustOrganizationName'); + int CFFileSecurityGetTypeID() { + return _CFFileSecurityGetTypeID(); + } - CFStringRef get kSecTrustOrganizationName => _kSecTrustOrganizationName.value; + late final _CFFileSecurityGetTypeIDPtr = + _lookup>( + 'CFFileSecurityGetTypeID'); + late final _CFFileSecurityGetTypeID = + _CFFileSecurityGetTypeIDPtr.asFunction(); - set kSecTrustOrganizationName(CFStringRef value) => - _kSecTrustOrganizationName.value = value; + CFFileSecurityRef CFFileSecurityCreate( + CFAllocatorRef allocator, + ) { + return _CFFileSecurityCreate( + allocator, + ); + } - late final ffi.Pointer _kSecTrustResultValue = - _lookup('kSecTrustResultValue'); + late final _CFFileSecurityCreatePtr = + _lookup>( + 'CFFileSecurityCreate'); + late final _CFFileSecurityCreate = _CFFileSecurityCreatePtr.asFunction< + CFFileSecurityRef Function(CFAllocatorRef)>(); - CFStringRef get kSecTrustResultValue => _kSecTrustResultValue.value; + CFFileSecurityRef CFFileSecurityCreateCopy( + CFAllocatorRef allocator, + CFFileSecurityRef fileSec, + ) { + return _CFFileSecurityCreateCopy( + allocator, + fileSec, + ); + } - set kSecTrustResultValue(CFStringRef value) => - _kSecTrustResultValue.value = value; - - late final ffi.Pointer _kSecTrustRevocationChecked = - _lookup('kSecTrustRevocationChecked'); - - CFStringRef get kSecTrustRevocationChecked => - _kSecTrustRevocationChecked.value; - - set kSecTrustRevocationChecked(CFStringRef value) => - _kSecTrustRevocationChecked.value = value; - - late final ffi.Pointer _kSecTrustRevocationValidUntilDate = - _lookup('kSecTrustRevocationValidUntilDate'); - - CFStringRef get kSecTrustRevocationValidUntilDate => - _kSecTrustRevocationValidUntilDate.value; - - set kSecTrustRevocationValidUntilDate(CFStringRef value) => - _kSecTrustRevocationValidUntilDate.value = value; - - late final ffi.Pointer _kSecTrustCertificateTransparency = - _lookup('kSecTrustCertificateTransparency'); - - CFStringRef get kSecTrustCertificateTransparency => - _kSecTrustCertificateTransparency.value; - - set kSecTrustCertificateTransparency(CFStringRef value) => - _kSecTrustCertificateTransparency.value = value; - - late final ffi.Pointer - _kSecTrustCertificateTransparencyWhiteList = - _lookup('kSecTrustCertificateTransparencyWhiteList'); + late final _CFFileSecurityCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFFileSecurityRef Function( + CFAllocatorRef, CFFileSecurityRef)>>('CFFileSecurityCreateCopy'); + late final _CFFileSecurityCreateCopy = + _CFFileSecurityCreateCopyPtr.asFunction< + CFFileSecurityRef Function(CFAllocatorRef, CFFileSecurityRef)>(); - CFStringRef get kSecTrustCertificateTransparencyWhiteList => - _kSecTrustCertificateTransparencyWhiteList.value; + int CFFileSecurityCopyOwnerUUID( + CFFileSecurityRef fileSec, + ffi.Pointer ownerUUID, + ) { + return _CFFileSecurityCopyOwnerUUID( + fileSec, + ownerUUID, + ); + } - set kSecTrustCertificateTransparencyWhiteList(CFStringRef value) => - _kSecTrustCertificateTransparencyWhiteList.value = value; + late final _CFFileSecurityCopyOwnerUUIDPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyOwnerUUID'); + late final _CFFileSecurityCopyOwnerUUID = _CFFileSecurityCopyOwnerUUIDPtr + .asFunction)>(); - int SecTrustGetTypeID() { - return _SecTrustGetTypeID(); + int CFFileSecuritySetOwnerUUID( + CFFileSecurityRef fileSec, + CFUUIDRef ownerUUID, + ) { + return _CFFileSecuritySetOwnerUUID( + fileSec, + ownerUUID, + ); } - late final _SecTrustGetTypeIDPtr = - _lookup>('SecTrustGetTypeID'); - late final _SecTrustGetTypeID = - _SecTrustGetTypeIDPtr.asFunction(); + late final _CFFileSecuritySetOwnerUUIDPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecuritySetOwnerUUID'); + late final _CFFileSecuritySetOwnerUUID = _CFFileSecuritySetOwnerUUIDPtr + .asFunction(); - int SecTrustCreateWithCertificates( - CFTypeRef certificates, - CFTypeRef policies, - ffi.Pointer trust, + int CFFileSecurityCopyGroupUUID( + CFFileSecurityRef fileSec, + ffi.Pointer groupUUID, ) { - return _SecTrustCreateWithCertificates( - certificates, - policies, - trust, + return _CFFileSecurityCopyGroupUUID( + fileSec, + groupUUID, ); } - late final _SecTrustCreateWithCertificatesPtr = _lookup< + late final _CFFileSecurityCopyGroupUUIDPtr = _lookup< ffi.NativeFunction< - OSStatus Function(CFTypeRef, CFTypeRef, - ffi.Pointer)>>('SecTrustCreateWithCertificates'); - late final _SecTrustCreateWithCertificates = - _SecTrustCreateWithCertificatesPtr.asFunction< - int Function(CFTypeRef, CFTypeRef, ffi.Pointer)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyGroupUUID'); + late final _CFFileSecurityCopyGroupUUID = _CFFileSecurityCopyGroupUUIDPtr + .asFunction)>(); - int SecTrustSetPolicies( - SecTrustRef trust, - CFTypeRef policies, + int CFFileSecuritySetGroupUUID( + CFFileSecurityRef fileSec, + CFUUIDRef groupUUID, ) { - return _SecTrustSetPolicies( - trust, - policies, + return _CFFileSecuritySetGroupUUID( + fileSec, + groupUUID, ); } - late final _SecTrustSetPoliciesPtr = - _lookup>( - 'SecTrustSetPolicies'); - late final _SecTrustSetPolicies = _SecTrustSetPoliciesPtr.asFunction< - int Function(SecTrustRef, CFTypeRef)>(); + late final _CFFileSecuritySetGroupUUIDPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecuritySetGroupUUID'); + late final _CFFileSecuritySetGroupUUID = _CFFileSecuritySetGroupUUIDPtr + .asFunction(); - int SecTrustCopyPolicies( - SecTrustRef trust, - ffi.Pointer policies, + int CFFileSecurityCopyAccessControlList( + CFFileSecurityRef fileSec, + ffi.Pointer accessControlList, ) { - return _SecTrustCopyPolicies( - trust, - policies, + return _CFFileSecurityCopyAccessControlList( + fileSec, + accessControlList, ); } - late final _SecTrustCopyPoliciesPtr = _lookup< + late final _CFFileSecurityCopyAccessControlListPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SecTrustRef, ffi.Pointer)>>('SecTrustCopyPolicies'); - late final _SecTrustCopyPolicies = _SecTrustCopyPoliciesPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyAccessControlList'); + late final _CFFileSecurityCopyAccessControlList = + _CFFileSecurityCopyAccessControlListPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - int SecTrustSetNetworkFetchAllowed( - SecTrustRef trust, - int allowFetch, + int CFFileSecuritySetAccessControlList( + CFFileSecurityRef fileSec, + acl_t accessControlList, ) { - return _SecTrustSetNetworkFetchAllowed( - trust, - allowFetch, + return _CFFileSecuritySetAccessControlList( + fileSec, + accessControlList, ); } - late final _SecTrustSetNetworkFetchAllowedPtr = - _lookup>( - 'SecTrustSetNetworkFetchAllowed'); - late final _SecTrustSetNetworkFetchAllowed = - _SecTrustSetNetworkFetchAllowedPtr.asFunction< - int Function(SecTrustRef, int)>(); + late final _CFFileSecuritySetAccessControlListPtr = + _lookup>( + 'CFFileSecuritySetAccessControlList'); + late final _CFFileSecuritySetAccessControlList = + _CFFileSecuritySetAccessControlListPtr.asFunction< + int Function(CFFileSecurityRef, acl_t)>(); - int SecTrustGetNetworkFetchAllowed( - SecTrustRef trust, - ffi.Pointer allowFetch, + int CFFileSecurityGetOwner( + CFFileSecurityRef fileSec, + ffi.Pointer owner, ) { - return _SecTrustGetNetworkFetchAllowed( - trust, - allowFetch, + return _CFFileSecurityGetOwner( + fileSec, + owner, ); } - late final _SecTrustGetNetworkFetchAllowedPtr = _lookup< + late final _CFFileSecurityGetOwnerPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>('SecTrustGetNetworkFetchAllowed'); - late final _SecTrustGetNetworkFetchAllowed = - _SecTrustGetNetworkFetchAllowedPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetOwner'); + late final _CFFileSecurityGetOwner = _CFFileSecurityGetOwnerPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - int SecTrustSetAnchorCertificates( - SecTrustRef trust, - CFArrayRef anchorCertificates, + int CFFileSecuritySetOwner( + CFFileSecurityRef fileSec, + int owner, ) { - return _SecTrustSetAnchorCertificates( - trust, - anchorCertificates, + return _CFFileSecuritySetOwner( + fileSec, + owner, ); } - late final _SecTrustSetAnchorCertificatesPtr = - _lookup>( - 'SecTrustSetAnchorCertificates'); - late final _SecTrustSetAnchorCertificates = _SecTrustSetAnchorCertificatesPtr - .asFunction(); + late final _CFFileSecuritySetOwnerPtr = + _lookup>( + 'CFFileSecuritySetOwner'); + late final _CFFileSecuritySetOwner = _CFFileSecuritySetOwnerPtr.asFunction< + int Function(CFFileSecurityRef, int)>(); - int SecTrustSetAnchorCertificatesOnly( - SecTrustRef trust, - int anchorCertificatesOnly, + int CFFileSecurityGetGroup( + CFFileSecurityRef fileSec, + ffi.Pointer group, ) { - return _SecTrustSetAnchorCertificatesOnly( - trust, - anchorCertificatesOnly, + return _CFFileSecurityGetGroup( + fileSec, + group, ); } - late final _SecTrustSetAnchorCertificatesOnlyPtr = - _lookup>( - 'SecTrustSetAnchorCertificatesOnly'); - late final _SecTrustSetAnchorCertificatesOnly = - _SecTrustSetAnchorCertificatesOnlyPtr.asFunction< - int Function(SecTrustRef, int)>(); + late final _CFFileSecurityGetGroupPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetGroup'); + late final _CFFileSecurityGetGroup = _CFFileSecurityGetGroupPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - int SecTrustCopyCustomAnchorCertificates( - SecTrustRef trust, - ffi.Pointer anchors, + int CFFileSecuritySetGroup( + CFFileSecurityRef fileSec, + int group, ) { - return _SecTrustCopyCustomAnchorCertificates( - trust, - anchors, + return _CFFileSecuritySetGroup( + fileSec, + group, ); } - late final _SecTrustCopyCustomAnchorCertificatesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, ffi.Pointer)>>( - 'SecTrustCopyCustomAnchorCertificates'); - late final _SecTrustCopyCustomAnchorCertificates = - _SecTrustCopyCustomAnchorCertificatesPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final _CFFileSecuritySetGroupPtr = + _lookup>( + 'CFFileSecuritySetGroup'); + late final _CFFileSecuritySetGroup = _CFFileSecuritySetGroupPtr.asFunction< + int Function(CFFileSecurityRef, int)>(); - int SecTrustSetVerifyDate( - SecTrustRef trust, - CFDateRef verifyDate, + int CFFileSecurityGetMode( + CFFileSecurityRef fileSec, + ffi.Pointer mode, ) { - return _SecTrustSetVerifyDate( - trust, - verifyDate, + return _CFFileSecurityGetMode( + fileSec, + mode, ); } - late final _SecTrustSetVerifyDatePtr = - _lookup>( - 'SecTrustSetVerifyDate'); - late final _SecTrustSetVerifyDate = _SecTrustSetVerifyDatePtr.asFunction< - int Function(SecTrustRef, CFDateRef)>(); + late final _CFFileSecurityGetModePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetMode'); + late final _CFFileSecurityGetMode = _CFFileSecurityGetModePtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - double SecTrustGetVerifyTime( - SecTrustRef trust, + int CFFileSecuritySetMode( + CFFileSecurityRef fileSec, + int mode, ) { - return _SecTrustGetVerifyTime( - trust, + return _CFFileSecuritySetMode( + fileSec, + mode, ); } - late final _SecTrustGetVerifyTimePtr = - _lookup>( - 'SecTrustGetVerifyTime'); - late final _SecTrustGetVerifyTime = - _SecTrustGetVerifyTimePtr.asFunction(); + late final _CFFileSecuritySetModePtr = + _lookup>( + 'CFFileSecuritySetMode'); + late final _CFFileSecuritySetMode = _CFFileSecuritySetModePtr.asFunction< + int Function(CFFileSecurityRef, int)>(); - int SecTrustEvaluate( - SecTrustRef trust, - ffi.Pointer result, + int CFFileSecurityClearProperties( + CFFileSecurityRef fileSec, + int clearPropertyMask, ) { - return _SecTrustEvaluate( - trust, - result, + return _CFFileSecurityClearProperties( + fileSec, + clearPropertyMask, ); } - late final _SecTrustEvaluatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecTrustRef, ffi.Pointer)>>('SecTrustEvaluate'); - late final _SecTrustEvaluate = _SecTrustEvaluatePtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final _CFFileSecurityClearPropertiesPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecurityClearProperties'); + late final _CFFileSecurityClearProperties = _CFFileSecurityClearPropertiesPtr + .asFunction(); - int SecTrustEvaluateAsync( - SecTrustRef trust, - dispatch_queue_t queue, - SecTrustCallback result, + CFStringRef CFStringTokenizerCopyBestStringLanguage( + CFStringRef string, + CFRange range, ) { - return _SecTrustEvaluateAsync( - trust, - queue, - result, + return _CFStringTokenizerCopyBestStringLanguage( + string, + range, ); } - late final _SecTrustEvaluateAsyncPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, dispatch_queue_t, - SecTrustCallback)>>('SecTrustEvaluateAsync'); - late final _SecTrustEvaluateAsync = _SecTrustEvaluateAsyncPtr.asFunction< - int Function(SecTrustRef, dispatch_queue_t, SecTrustCallback)>(); + late final _CFStringTokenizerCopyBestStringLanguagePtr = + _lookup>( + 'CFStringTokenizerCopyBestStringLanguage'); + late final _CFStringTokenizerCopyBestStringLanguage = + _CFStringTokenizerCopyBestStringLanguagePtr.asFunction< + CFStringRef Function(CFStringRef, CFRange)>(); - bool SecTrustEvaluateWithError( - SecTrustRef trust, - ffi.Pointer error, - ) { - return _SecTrustEvaluateWithError( - trust, - error, - ); + int CFStringTokenizerGetTypeID() { + return _CFStringTokenizerGetTypeID(); } - late final _SecTrustEvaluateWithErrorPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(SecTrustRef, - ffi.Pointer)>>('SecTrustEvaluateWithError'); - late final _SecTrustEvaluateWithError = _SecTrustEvaluateWithErrorPtr - .asFunction)>(); + late final _CFStringTokenizerGetTypeIDPtr = + _lookup>( + 'CFStringTokenizerGetTypeID'); + late final _CFStringTokenizerGetTypeID = + _CFStringTokenizerGetTypeIDPtr.asFunction(); - int SecTrustEvaluateAsyncWithError( - SecTrustRef trust, - dispatch_queue_t queue, - SecTrustWithErrorCallback result, + CFStringTokenizerRef CFStringTokenizerCreate( + CFAllocatorRef alloc, + CFStringRef string, + CFRange range, + int options, + CFLocaleRef locale, ) { - return _SecTrustEvaluateAsyncWithError( - trust, - queue, - result, + return _CFStringTokenizerCreate( + alloc, + string, + range, + options, + locale, ); } - late final _SecTrustEvaluateAsyncWithErrorPtr = _lookup< + late final _CFStringTokenizerCreatePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecTrustRef, dispatch_queue_t, - SecTrustWithErrorCallback)>>('SecTrustEvaluateAsyncWithError'); - late final _SecTrustEvaluateAsyncWithError = - _SecTrustEvaluateAsyncWithErrorPtr.asFunction< - int Function( - SecTrustRef, dispatch_queue_t, SecTrustWithErrorCallback)>(); + CFStringTokenizerRef Function(CFAllocatorRef, CFStringRef, CFRange, + CFOptionFlags, CFLocaleRef)>>('CFStringTokenizerCreate'); + late final _CFStringTokenizerCreate = _CFStringTokenizerCreatePtr.asFunction< + CFStringTokenizerRef Function( + CFAllocatorRef, CFStringRef, CFRange, int, CFLocaleRef)>(); - int SecTrustGetTrustResult( - SecTrustRef trust, - ffi.Pointer result, + void CFStringTokenizerSetString( + CFStringTokenizerRef tokenizer, + CFStringRef string, + CFRange range, ) { - return _SecTrustGetTrustResult( - trust, - result, + return _CFStringTokenizerSetString( + tokenizer, + string, + range, ); } - late final _SecTrustGetTrustResultPtr = _lookup< + late final _CFStringTokenizerSetStringPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SecTrustRef, ffi.Pointer)>>('SecTrustGetTrustResult'); - late final _SecTrustGetTrustResult = _SecTrustGetTrustResultPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + ffi.Void Function(CFStringTokenizerRef, CFStringRef, + CFRange)>>('CFStringTokenizerSetString'); + late final _CFStringTokenizerSetString = _CFStringTokenizerSetStringPtr + .asFunction(); - SecKeyRef SecTrustCopyPublicKey( - SecTrustRef trust, + int CFStringTokenizerGoToTokenAtIndex( + CFStringTokenizerRef tokenizer, + int index, ) { - return _SecTrustCopyPublicKey( - trust, + return _CFStringTokenizerGoToTokenAtIndex( + tokenizer, + index, ); } - late final _SecTrustCopyPublicKeyPtr = - _lookup>( - 'SecTrustCopyPublicKey'); - late final _SecTrustCopyPublicKey = - _SecTrustCopyPublicKeyPtr.asFunction(); + late final _CFStringTokenizerGoToTokenAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function(CFStringTokenizerRef, + CFIndex)>>('CFStringTokenizerGoToTokenAtIndex'); + late final _CFStringTokenizerGoToTokenAtIndex = + _CFStringTokenizerGoToTokenAtIndexPtr.asFunction< + int Function(CFStringTokenizerRef, int)>(); - SecKeyRef SecTrustCopyKey( - SecTrustRef trust, + int CFStringTokenizerAdvanceToNextToken( + CFStringTokenizerRef tokenizer, ) { - return _SecTrustCopyKey( - trust, + return _CFStringTokenizerAdvanceToNextToken( + tokenizer, ); } - late final _SecTrustCopyKeyPtr = - _lookup>( - 'SecTrustCopyKey'); - late final _SecTrustCopyKey = - _SecTrustCopyKeyPtr.asFunction(); + late final _CFStringTokenizerAdvanceToNextTokenPtr = + _lookup>( + 'CFStringTokenizerAdvanceToNextToken'); + late final _CFStringTokenizerAdvanceToNextToken = + _CFStringTokenizerAdvanceToNextTokenPtr.asFunction< + int Function(CFStringTokenizerRef)>(); - int SecTrustGetCertificateCount( - SecTrustRef trust, + CFRange CFStringTokenizerGetCurrentTokenRange( + CFStringTokenizerRef tokenizer, ) { - return _SecTrustGetCertificateCount( - trust, + return _CFStringTokenizerGetCurrentTokenRange( + tokenizer, ); } - late final _SecTrustGetCertificateCountPtr = - _lookup>( - 'SecTrustGetCertificateCount'); - late final _SecTrustGetCertificateCount = - _SecTrustGetCertificateCountPtr.asFunction(); + late final _CFStringTokenizerGetCurrentTokenRangePtr = + _lookup>( + 'CFStringTokenizerGetCurrentTokenRange'); + late final _CFStringTokenizerGetCurrentTokenRange = + _CFStringTokenizerGetCurrentTokenRangePtr.asFunction< + CFRange Function(CFStringTokenizerRef)>(); - SecCertificateRef SecTrustGetCertificateAtIndex( - SecTrustRef trust, - int ix, + CFTypeRef CFStringTokenizerCopyCurrentTokenAttribute( + CFStringTokenizerRef tokenizer, + int attribute, ) { - return _SecTrustGetCertificateAtIndex( - trust, - ix, + return _CFStringTokenizerCopyCurrentTokenAttribute( + tokenizer, + attribute, ); } - late final _SecTrustGetCertificateAtIndexPtr = _lookup< - ffi.NativeFunction>( - 'SecTrustGetCertificateAtIndex'); - late final _SecTrustGetCertificateAtIndex = _SecTrustGetCertificateAtIndexPtr - .asFunction(); - - CFDataRef SecTrustCopyExceptions( - SecTrustRef trust, + late final _CFStringTokenizerCopyCurrentTokenAttributePtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFStringTokenizerRef, + CFOptionFlags)>>('CFStringTokenizerCopyCurrentTokenAttribute'); + late final _CFStringTokenizerCopyCurrentTokenAttribute = + _CFStringTokenizerCopyCurrentTokenAttributePtr.asFunction< + CFTypeRef Function(CFStringTokenizerRef, int)>(); + + int CFStringTokenizerGetCurrentSubTokens( + CFStringTokenizerRef tokenizer, + ffi.Pointer ranges, + int maxRangeLength, + CFMutableArrayRef derivedSubTokens, ) { - return _SecTrustCopyExceptions( - trust, + return _CFStringTokenizerGetCurrentSubTokens( + tokenizer, + ranges, + maxRangeLength, + derivedSubTokens, ); } - late final _SecTrustCopyExceptionsPtr = - _lookup>( - 'SecTrustCopyExceptions'); - late final _SecTrustCopyExceptions = - _SecTrustCopyExceptionsPtr.asFunction(); + late final _CFStringTokenizerGetCurrentSubTokensPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFStringTokenizerRef, ffi.Pointer, CFIndex, + CFMutableArrayRef)>>('CFStringTokenizerGetCurrentSubTokens'); + late final _CFStringTokenizerGetCurrentSubTokens = + _CFStringTokenizerGetCurrentSubTokensPtr.asFunction< + int Function(CFStringTokenizerRef, ffi.Pointer, int, + CFMutableArrayRef)>(); - bool SecTrustSetExceptions( - SecTrustRef trust, - CFDataRef exceptions, - ) { - return _SecTrustSetExceptions( - trust, - exceptions, - ); + int CFFileDescriptorGetTypeID() { + return _CFFileDescriptorGetTypeID(); } - late final _SecTrustSetExceptionsPtr = - _lookup>( - 'SecTrustSetExceptions'); - late final _SecTrustSetExceptions = _SecTrustSetExceptionsPtr.asFunction< - bool Function(SecTrustRef, CFDataRef)>(); + late final _CFFileDescriptorGetTypeIDPtr = + _lookup>( + 'CFFileDescriptorGetTypeID'); + late final _CFFileDescriptorGetTypeID = + _CFFileDescriptorGetTypeIDPtr.asFunction(); - CFArrayRef SecTrustCopyProperties( - SecTrustRef trust, + CFFileDescriptorRef CFFileDescriptorCreate( + CFAllocatorRef allocator, + int fd, + int closeOnInvalidate, + CFFileDescriptorCallBack callout, + ffi.Pointer context, ) { - return _SecTrustCopyProperties( - trust, + return _CFFileDescriptorCreate( + allocator, + fd, + closeOnInvalidate, + callout, + context, ); } - late final _SecTrustCopyPropertiesPtr = - _lookup>( - 'SecTrustCopyProperties'); - late final _SecTrustCopyProperties = - _SecTrustCopyPropertiesPtr.asFunction(); + late final _CFFileDescriptorCreatePtr = _lookup< + ffi.NativeFunction< + CFFileDescriptorRef Function( + CFAllocatorRef, + CFFileDescriptorNativeDescriptor, + Boolean, + CFFileDescriptorCallBack, + ffi.Pointer)>>('CFFileDescriptorCreate'); + late final _CFFileDescriptorCreate = _CFFileDescriptorCreatePtr.asFunction< + CFFileDescriptorRef Function(CFAllocatorRef, int, int, + CFFileDescriptorCallBack, ffi.Pointer)>(); - CFDictionaryRef SecTrustCopyResult( - SecTrustRef trust, + int CFFileDescriptorGetNativeDescriptor( + CFFileDescriptorRef f, ) { - return _SecTrustCopyResult( - trust, + return _CFFileDescriptorGetNativeDescriptor( + f, ); } - late final _SecTrustCopyResultPtr = - _lookup>( - 'SecTrustCopyResult'); - late final _SecTrustCopyResult = _SecTrustCopyResultPtr.asFunction< - CFDictionaryRef Function(SecTrustRef)>(); + late final _CFFileDescriptorGetNativeDescriptorPtr = _lookup< + ffi.NativeFunction< + CFFileDescriptorNativeDescriptor Function( + CFFileDescriptorRef)>>('CFFileDescriptorGetNativeDescriptor'); + late final _CFFileDescriptorGetNativeDescriptor = + _CFFileDescriptorGetNativeDescriptorPtr.asFunction< + int Function(CFFileDescriptorRef)>(); - int SecTrustSetOCSPResponse( - SecTrustRef trust, - CFTypeRef responseData, + void CFFileDescriptorGetContext( + CFFileDescriptorRef f, + ffi.Pointer context, ) { - return _SecTrustSetOCSPResponse( - trust, - responseData, + return _CFFileDescriptorGetContext( + f, + context, ); } - late final _SecTrustSetOCSPResponsePtr = - _lookup>( - 'SecTrustSetOCSPResponse'); - late final _SecTrustSetOCSPResponse = _SecTrustSetOCSPResponsePtr.asFunction< - int Function(SecTrustRef, CFTypeRef)>(); + late final _CFFileDescriptorGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFFileDescriptorRef, ffi.Pointer)>>( + 'CFFileDescriptorGetContext'); + late final _CFFileDescriptorGetContext = + _CFFileDescriptorGetContextPtr.asFunction< + void Function( + CFFileDescriptorRef, ffi.Pointer)>(); - int SecTrustSetSignedCertificateTimestamps( - SecTrustRef trust, - CFArrayRef sctArray, + void CFFileDescriptorEnableCallBacks( + CFFileDescriptorRef f, + int callBackTypes, ) { - return _SecTrustSetSignedCertificateTimestamps( - trust, - sctArray, + return _CFFileDescriptorEnableCallBacks( + f, + callBackTypes, ); } - late final _SecTrustSetSignedCertificateTimestampsPtr = - _lookup>( - 'SecTrustSetSignedCertificateTimestamps'); - late final _SecTrustSetSignedCertificateTimestamps = - _SecTrustSetSignedCertificateTimestampsPtr.asFunction< - int Function(SecTrustRef, CFArrayRef)>(); + late final _CFFileDescriptorEnableCallBacksPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFFileDescriptorRef, + CFOptionFlags)>>('CFFileDescriptorEnableCallBacks'); + late final _CFFileDescriptorEnableCallBacks = + _CFFileDescriptorEnableCallBacksPtr.asFunction< + void Function(CFFileDescriptorRef, int)>(); - CFArrayRef SecTrustCopyCertificateChain( - SecTrustRef trust, + void CFFileDescriptorDisableCallBacks( + CFFileDescriptorRef f, + int callBackTypes, ) { - return _SecTrustCopyCertificateChain( - trust, + return _CFFileDescriptorDisableCallBacks( + f, + callBackTypes, ); } - late final _SecTrustCopyCertificateChainPtr = - _lookup>( - 'SecTrustCopyCertificateChain'); - late final _SecTrustCopyCertificateChain = _SecTrustCopyCertificateChainPtr - .asFunction(); - - late final ffi.Pointer _gGuidCssm = - _lookup('gGuidCssm'); - - CSSM_GUID get gGuidCssm => _gGuidCssm.ref; - - late final ffi.Pointer _gGuidAppleFileDL = - _lookup('gGuidAppleFileDL'); - - CSSM_GUID get gGuidAppleFileDL => _gGuidAppleFileDL.ref; - - late final ffi.Pointer _gGuidAppleCSP = - _lookup('gGuidAppleCSP'); - - CSSM_GUID get gGuidAppleCSP => _gGuidAppleCSP.ref; - - late final ffi.Pointer _gGuidAppleCSPDL = - _lookup('gGuidAppleCSPDL'); - - CSSM_GUID get gGuidAppleCSPDL => _gGuidAppleCSPDL.ref; - - late final ffi.Pointer _gGuidAppleX509CL = - _lookup('gGuidAppleX509CL'); - - CSSM_GUID get gGuidAppleX509CL => _gGuidAppleX509CL.ref; - - late final ffi.Pointer _gGuidAppleX509TP = - _lookup('gGuidAppleX509TP'); - - CSSM_GUID get gGuidAppleX509TP => _gGuidAppleX509TP.ref; - - late final ffi.Pointer _gGuidAppleLDAPDL = - _lookup('gGuidAppleLDAPDL'); - - CSSM_GUID get gGuidAppleLDAPDL => _gGuidAppleLDAPDL.ref; - - late final ffi.Pointer _gGuidAppleDotMacTP = - _lookup('gGuidAppleDotMacTP'); - - CSSM_GUID get gGuidAppleDotMacTP => _gGuidAppleDotMacTP.ref; - - late final ffi.Pointer _gGuidAppleSdCSPDL = - _lookup('gGuidAppleSdCSPDL'); - - CSSM_GUID get gGuidAppleSdCSPDL => _gGuidAppleSdCSPDL.ref; - - late final ffi.Pointer _gGuidAppleDotMacDL = - _lookup('gGuidAppleDotMacDL'); - - CSSM_GUID get gGuidAppleDotMacDL => _gGuidAppleDotMacDL.ref; + late final _CFFileDescriptorDisableCallBacksPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFFileDescriptorRef, + CFOptionFlags)>>('CFFileDescriptorDisableCallBacks'); + late final _CFFileDescriptorDisableCallBacks = + _CFFileDescriptorDisableCallBacksPtr.asFunction< + void Function(CFFileDescriptorRef, int)>(); - void cssmPerror( - ffi.Pointer how, - int error, + void CFFileDescriptorInvalidate( + CFFileDescriptorRef f, ) { - return _cssmPerror( - how, - error, + return _CFFileDescriptorInvalidate( + f, ); } - late final _cssmPerrorPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, CSSM_RETURN)>>('cssmPerror'); - late final _cssmPerror = - _cssmPerrorPtr.asFunction, int)>(); + late final _CFFileDescriptorInvalidatePtr = + _lookup>( + 'CFFileDescriptorInvalidate'); + late final _CFFileDescriptorInvalidate = _CFFileDescriptorInvalidatePtr + .asFunction(); - bool cssmOidToAlg( - ffi.Pointer oid, - ffi.Pointer alg, + int CFFileDescriptorIsValid( + CFFileDescriptorRef f, ) { - return _cssmOidToAlg( - oid, - alg, + return _CFFileDescriptorIsValid( + f, ); } - late final _cssmOidToAlgPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer)>>('cssmOidToAlg'); - late final _cssmOidToAlg = _cssmOidToAlgPtr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); + late final _CFFileDescriptorIsValidPtr = + _lookup>( + 'CFFileDescriptorIsValid'); + late final _CFFileDescriptorIsValid = _CFFileDescriptorIsValidPtr.asFunction< + int Function(CFFileDescriptorRef)>(); - ffi.Pointer cssmAlgToOid( - int algId, + CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource( + CFAllocatorRef allocator, + CFFileDescriptorRef f, + int order, ) { - return _cssmAlgToOid( - algId, + return _CFFileDescriptorCreateRunLoopSource( + allocator, + f, + order, ); } - late final _cssmAlgToOidPtr = _lookup< + late final _CFFileDescriptorCreateRunLoopSourcePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(CSSM_ALGORITHMS)>>('cssmAlgToOid'); - late final _cssmAlgToOid = - _cssmAlgToOidPtr.asFunction Function(int)>(); + CFRunLoopSourceRef Function(CFAllocatorRef, CFFileDescriptorRef, + CFIndex)>>('CFFileDescriptorCreateRunLoopSource'); + late final _CFFileDescriptorCreateRunLoopSource = + _CFFileDescriptorCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function( + CFAllocatorRef, CFFileDescriptorRef, int)>(); - int SecTrustSetOptions( - SecTrustRef trustRef, - int options, - ) { - return _SecTrustSetOptions( - trustRef, - options, - ); + int CFUserNotificationGetTypeID() { + return _CFUserNotificationGetTypeID(); } - late final _SecTrustSetOptionsPtr = - _lookup>( - 'SecTrustSetOptions'); - late final _SecTrustSetOptions = - _SecTrustSetOptionsPtr.asFunction(); + late final _CFUserNotificationGetTypeIDPtr = + _lookup>( + 'CFUserNotificationGetTypeID'); + late final _CFUserNotificationGetTypeID = + _CFUserNotificationGetTypeIDPtr.asFunction(); - int SecTrustSetParameters( - SecTrustRef trustRef, - int action, - CFDataRef actionData, + CFUserNotificationRef CFUserNotificationCreate( + CFAllocatorRef allocator, + double timeout, + int flags, + ffi.Pointer error, + CFDictionaryRef dictionary, ) { - return _SecTrustSetParameters( - trustRef, - action, - actionData, + return _CFUserNotificationCreate( + allocator, + timeout, + flags, + error, + dictionary, ); } - late final _SecTrustSetParametersPtr = _lookup< + late final _CFUserNotificationCreatePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecTrustRef, CSSM_TP_ACTION, - CFDataRef)>>('SecTrustSetParameters'); - late final _SecTrustSetParameters = _SecTrustSetParametersPtr.asFunction< - int Function(SecTrustRef, int, CFDataRef)>(); + CFUserNotificationRef Function( + CFAllocatorRef, + CFTimeInterval, + CFOptionFlags, + ffi.Pointer, + CFDictionaryRef)>>('CFUserNotificationCreate'); + late final _CFUserNotificationCreate = + _CFUserNotificationCreatePtr.asFunction< + CFUserNotificationRef Function(CFAllocatorRef, double, int, + ffi.Pointer, CFDictionaryRef)>(); - int SecTrustSetKeychains( - SecTrustRef trust, - CFTypeRef keychainOrArray, + int CFUserNotificationReceiveResponse( + CFUserNotificationRef userNotification, + double timeout, + ffi.Pointer responseFlags, ) { - return _SecTrustSetKeychains( - trust, - keychainOrArray, + return _CFUserNotificationReceiveResponse( + userNotification, + timeout, + responseFlags, ); } - late final _SecTrustSetKeychainsPtr = - _lookup>( - 'SecTrustSetKeychains'); - late final _SecTrustSetKeychains = _SecTrustSetKeychainsPtr.asFunction< - int Function(SecTrustRef, CFTypeRef)>(); + late final _CFUserNotificationReceiveResponsePtr = _lookup< + ffi.NativeFunction< + SInt32 Function(CFUserNotificationRef, CFTimeInterval, + ffi.Pointer)>>( + 'CFUserNotificationReceiveResponse'); + late final _CFUserNotificationReceiveResponse = + _CFUserNotificationReceiveResponsePtr.asFunction< + int Function( + CFUserNotificationRef, double, ffi.Pointer)>(); - int SecTrustGetResult( - SecTrustRef trustRef, - ffi.Pointer result, - ffi.Pointer certChain, - ffi.Pointer> statusChain, + CFStringRef CFUserNotificationGetResponseValue( + CFUserNotificationRef userNotification, + CFStringRef key, + int idx, ) { - return _SecTrustGetResult( - trustRef, - result, - certChain, - statusChain, + return _CFUserNotificationGetResponseValue( + userNotification, + key, + idx, ); } - late final _SecTrustGetResultPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecTrustRef, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'SecTrustGetResult'); - late final _SecTrustGetResult = _SecTrustGetResultPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + late final _CFUserNotificationGetResponseValuePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFUserNotificationRef, CFStringRef, + CFIndex)>>('CFUserNotificationGetResponseValue'); + late final _CFUserNotificationGetResponseValue = + _CFUserNotificationGetResponseValuePtr.asFunction< + CFStringRef Function(CFUserNotificationRef, CFStringRef, int)>(); - int SecTrustGetCssmResult( - SecTrustRef trust, - ffi.Pointer result, + CFDictionaryRef CFUserNotificationGetResponseDictionary( + CFUserNotificationRef userNotification, ) { - return _SecTrustGetCssmResult( - trust, - result, + return _CFUserNotificationGetResponseDictionary( + userNotification, ); } - late final _SecTrustGetCssmResultPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>( - 'SecTrustGetCssmResult'); - late final _SecTrustGetCssmResult = _SecTrustGetCssmResultPtr.asFunction< - int Function( - SecTrustRef, ffi.Pointer)>(); + late final _CFUserNotificationGetResponseDictionaryPtr = _lookup< + ffi.NativeFunction>( + 'CFUserNotificationGetResponseDictionary'); + late final _CFUserNotificationGetResponseDictionary = + _CFUserNotificationGetResponseDictionaryPtr.asFunction< + CFDictionaryRef Function(CFUserNotificationRef)>(); - int SecTrustGetCssmResultCode( - SecTrustRef trust, - ffi.Pointer resultCode, + int CFUserNotificationUpdate( + CFUserNotificationRef userNotification, + double timeout, + int flags, + CFDictionaryRef dictionary, ) { - return _SecTrustGetCssmResultCode( - trust, - resultCode, + return _CFUserNotificationUpdate( + userNotification, + timeout, + flags, + dictionary, ); } - late final _SecTrustGetCssmResultCodePtr = _lookup< + late final _CFUserNotificationUpdatePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>('SecTrustGetCssmResultCode'); - late final _SecTrustGetCssmResultCode = _SecTrustGetCssmResultCodePtr - .asFunction)>(); + SInt32 Function(CFUserNotificationRef, CFTimeInterval, CFOptionFlags, + CFDictionaryRef)>>('CFUserNotificationUpdate'); + late final _CFUserNotificationUpdate = + _CFUserNotificationUpdatePtr.asFunction< + int Function(CFUserNotificationRef, double, int, CFDictionaryRef)>(); - int SecTrustGetTPHandle( - SecTrustRef trust, - ffi.Pointer handle, + int CFUserNotificationCancel( + CFUserNotificationRef userNotification, ) { - return _SecTrustGetTPHandle( - trust, - handle, + return _CFUserNotificationCancel( + userNotification, ); } - late final _SecTrustGetTPHandlePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>('SecTrustGetTPHandle'); - late final _SecTrustGetTPHandle = _SecTrustGetTPHandlePtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final _CFUserNotificationCancelPtr = + _lookup>( + 'CFUserNotificationCancel'); + late final _CFUserNotificationCancel = _CFUserNotificationCancelPtr + .asFunction(); - int SecTrustCopyAnchorCertificates( - ffi.Pointer anchors, + CFRunLoopSourceRef CFUserNotificationCreateRunLoopSource( + CFAllocatorRef allocator, + CFUserNotificationRef userNotification, + CFUserNotificationCallBack callout, + int order, ) { - return _SecTrustCopyAnchorCertificates( - anchors, + return _CFUserNotificationCreateRunLoopSource( + allocator, + userNotification, + callout, + order, ); } - late final _SecTrustCopyAnchorCertificatesPtr = - _lookup)>>( - 'SecTrustCopyAnchorCertificates'); - late final _SecTrustCopyAnchorCertificates = - _SecTrustCopyAnchorCertificatesPtr.asFunction< - int Function(ffi.Pointer)>(); - - int SecCertificateGetTypeID() { - return _SecCertificateGetTypeID(); - } - - late final _SecCertificateGetTypeIDPtr = - _lookup>( - 'SecCertificateGetTypeID'); - late final _SecCertificateGetTypeID = - _SecCertificateGetTypeIDPtr.asFunction(); + late final _CFUserNotificationCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function( + CFAllocatorRef, + CFUserNotificationRef, + CFUserNotificationCallBack, + CFIndex)>>('CFUserNotificationCreateRunLoopSource'); + late final _CFUserNotificationCreateRunLoopSource = + _CFUserNotificationCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFUserNotificationRef, + CFUserNotificationCallBack, int)>(); - SecCertificateRef SecCertificateCreateWithData( - CFAllocatorRef allocator, - CFDataRef data, + int CFUserNotificationDisplayNotice( + double timeout, + int flags, + CFURLRef iconURL, + CFURLRef soundURL, + CFURLRef localizationURL, + CFStringRef alertHeader, + CFStringRef alertMessage, + CFStringRef defaultButtonTitle, ) { - return _SecCertificateCreateWithData( - allocator, - data, + return _CFUserNotificationDisplayNotice( + timeout, + flags, + iconURL, + soundURL, + localizationURL, + alertHeader, + alertMessage, + defaultButtonTitle, ); } - late final _SecCertificateCreateWithDataPtr = _lookup< + late final _CFUserNotificationDisplayNoticePtr = _lookup< ffi.NativeFunction< - SecCertificateRef Function( - CFAllocatorRef, CFDataRef)>>('SecCertificateCreateWithData'); - late final _SecCertificateCreateWithData = _SecCertificateCreateWithDataPtr - .asFunction(); + SInt32 Function( + CFTimeInterval, + CFOptionFlags, + CFURLRef, + CFURLRef, + CFURLRef, + CFStringRef, + CFStringRef, + CFStringRef)>>('CFUserNotificationDisplayNotice'); + late final _CFUserNotificationDisplayNotice = + _CFUserNotificationDisplayNoticePtr.asFunction< + int Function(double, int, CFURLRef, CFURLRef, CFURLRef, CFStringRef, + CFStringRef, CFStringRef)>(); - CFDataRef SecCertificateCopyData( - SecCertificateRef certificate, + int CFUserNotificationDisplayAlert( + double timeout, + int flags, + CFURLRef iconURL, + CFURLRef soundURL, + CFURLRef localizationURL, + CFStringRef alertHeader, + CFStringRef alertMessage, + CFStringRef defaultButtonTitle, + CFStringRef alternateButtonTitle, + CFStringRef otherButtonTitle, + ffi.Pointer responseFlags, ) { - return _SecCertificateCopyData( - certificate, + return _CFUserNotificationDisplayAlert( + timeout, + flags, + iconURL, + soundURL, + localizationURL, + alertHeader, + alertMessage, + defaultButtonTitle, + alternateButtonTitle, + otherButtonTitle, + responseFlags, ); } - late final _SecCertificateCopyDataPtr = - _lookup>( - 'SecCertificateCopyData'); - late final _SecCertificateCopyData = _SecCertificateCopyDataPtr.asFunction< - CFDataRef Function(SecCertificateRef)>(); + late final _CFUserNotificationDisplayAlertPtr = _lookup< + ffi.NativeFunction< + SInt32 Function( + CFTimeInterval, + CFOptionFlags, + CFURLRef, + CFURLRef, + CFURLRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + ffi.Pointer)>>('CFUserNotificationDisplayAlert'); + late final _CFUserNotificationDisplayAlert = + _CFUserNotificationDisplayAlertPtr.asFunction< + int Function( + double, + int, + CFURLRef, + CFURLRef, + CFURLRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + ffi.Pointer)>(); - CFStringRef SecCertificateCopySubjectSummary( - SecCertificateRef certificate, - ) { - return _SecCertificateCopySubjectSummary( - certificate, - ); + late final ffi.Pointer _kCFUserNotificationIconURLKey = + _lookup('kCFUserNotificationIconURLKey'); + + CFStringRef get kCFUserNotificationIconURLKey => + _kCFUserNotificationIconURLKey.value; + + set kCFUserNotificationIconURLKey(CFStringRef value) => + _kCFUserNotificationIconURLKey.value = value; + + late final ffi.Pointer _kCFUserNotificationSoundURLKey = + _lookup('kCFUserNotificationSoundURLKey'); + + CFStringRef get kCFUserNotificationSoundURLKey => + _kCFUserNotificationSoundURLKey.value; + + set kCFUserNotificationSoundURLKey(CFStringRef value) => + _kCFUserNotificationSoundURLKey.value = value; + + late final ffi.Pointer _kCFUserNotificationLocalizationURLKey = + _lookup('kCFUserNotificationLocalizationURLKey'); + + CFStringRef get kCFUserNotificationLocalizationURLKey => + _kCFUserNotificationLocalizationURLKey.value; + + set kCFUserNotificationLocalizationURLKey(CFStringRef value) => + _kCFUserNotificationLocalizationURLKey.value = value; + + late final ffi.Pointer _kCFUserNotificationAlertHeaderKey = + _lookup('kCFUserNotificationAlertHeaderKey'); + + CFStringRef get kCFUserNotificationAlertHeaderKey => + _kCFUserNotificationAlertHeaderKey.value; + + set kCFUserNotificationAlertHeaderKey(CFStringRef value) => + _kCFUserNotificationAlertHeaderKey.value = value; + + late final ffi.Pointer _kCFUserNotificationAlertMessageKey = + _lookup('kCFUserNotificationAlertMessageKey'); + + CFStringRef get kCFUserNotificationAlertMessageKey => + _kCFUserNotificationAlertMessageKey.value; + + set kCFUserNotificationAlertMessageKey(CFStringRef value) => + _kCFUserNotificationAlertMessageKey.value = value; + + late final ffi.Pointer + _kCFUserNotificationDefaultButtonTitleKey = + _lookup('kCFUserNotificationDefaultButtonTitleKey'); + + CFStringRef get kCFUserNotificationDefaultButtonTitleKey => + _kCFUserNotificationDefaultButtonTitleKey.value; + + set kCFUserNotificationDefaultButtonTitleKey(CFStringRef value) => + _kCFUserNotificationDefaultButtonTitleKey.value = value; + + late final ffi.Pointer + _kCFUserNotificationAlternateButtonTitleKey = + _lookup('kCFUserNotificationAlternateButtonTitleKey'); + + CFStringRef get kCFUserNotificationAlternateButtonTitleKey => + _kCFUserNotificationAlternateButtonTitleKey.value; + + set kCFUserNotificationAlternateButtonTitleKey(CFStringRef value) => + _kCFUserNotificationAlternateButtonTitleKey.value = value; + + late final ffi.Pointer _kCFUserNotificationOtherButtonTitleKey = + _lookup('kCFUserNotificationOtherButtonTitleKey'); + + CFStringRef get kCFUserNotificationOtherButtonTitleKey => + _kCFUserNotificationOtherButtonTitleKey.value; + + set kCFUserNotificationOtherButtonTitleKey(CFStringRef value) => + _kCFUserNotificationOtherButtonTitleKey.value = value; + + late final ffi.Pointer + _kCFUserNotificationProgressIndicatorValueKey = + _lookup('kCFUserNotificationProgressIndicatorValueKey'); + + CFStringRef get kCFUserNotificationProgressIndicatorValueKey => + _kCFUserNotificationProgressIndicatorValueKey.value; + + set kCFUserNotificationProgressIndicatorValueKey(CFStringRef value) => + _kCFUserNotificationProgressIndicatorValueKey.value = value; + + late final ffi.Pointer _kCFUserNotificationPopUpTitlesKey = + _lookup('kCFUserNotificationPopUpTitlesKey'); + + CFStringRef get kCFUserNotificationPopUpTitlesKey => + _kCFUserNotificationPopUpTitlesKey.value; + + set kCFUserNotificationPopUpTitlesKey(CFStringRef value) => + _kCFUserNotificationPopUpTitlesKey.value = value; + + late final ffi.Pointer _kCFUserNotificationTextFieldTitlesKey = + _lookup('kCFUserNotificationTextFieldTitlesKey'); + + CFStringRef get kCFUserNotificationTextFieldTitlesKey => + _kCFUserNotificationTextFieldTitlesKey.value; + + set kCFUserNotificationTextFieldTitlesKey(CFStringRef value) => + _kCFUserNotificationTextFieldTitlesKey.value = value; + + late final ffi.Pointer _kCFUserNotificationCheckBoxTitlesKey = + _lookup('kCFUserNotificationCheckBoxTitlesKey'); + + CFStringRef get kCFUserNotificationCheckBoxTitlesKey => + _kCFUserNotificationCheckBoxTitlesKey.value; + + set kCFUserNotificationCheckBoxTitlesKey(CFStringRef value) => + _kCFUserNotificationCheckBoxTitlesKey.value = value; + + late final ffi.Pointer _kCFUserNotificationTextFieldValuesKey = + _lookup('kCFUserNotificationTextFieldValuesKey'); + + CFStringRef get kCFUserNotificationTextFieldValuesKey => + _kCFUserNotificationTextFieldValuesKey.value; + + set kCFUserNotificationTextFieldValuesKey(CFStringRef value) => + _kCFUserNotificationTextFieldValuesKey.value = value; + + late final ffi.Pointer _kCFUserNotificationPopUpSelectionKey = + _lookup('kCFUserNotificationPopUpSelectionKey'); + + CFStringRef get kCFUserNotificationPopUpSelectionKey => + _kCFUserNotificationPopUpSelectionKey.value; + + set kCFUserNotificationPopUpSelectionKey(CFStringRef value) => + _kCFUserNotificationPopUpSelectionKey.value = value; + + late final ffi.Pointer _kCFUserNotificationAlertTopMostKey = + _lookup('kCFUserNotificationAlertTopMostKey'); + + CFStringRef get kCFUserNotificationAlertTopMostKey => + _kCFUserNotificationAlertTopMostKey.value; + + set kCFUserNotificationAlertTopMostKey(CFStringRef value) => + _kCFUserNotificationAlertTopMostKey.value = value; + + late final ffi.Pointer _kCFUserNotificationKeyboardTypesKey = + _lookup('kCFUserNotificationKeyboardTypesKey'); + + CFStringRef get kCFUserNotificationKeyboardTypesKey => + _kCFUserNotificationKeyboardTypesKey.value; + + set kCFUserNotificationKeyboardTypesKey(CFStringRef value) => + _kCFUserNotificationKeyboardTypesKey.value = value; + + int CFXMLNodeGetTypeID() { + return _CFXMLNodeGetTypeID(); } - late final _SecCertificateCopySubjectSummaryPtr = - _lookup>( - 'SecCertificateCopySubjectSummary'); - late final _SecCertificateCopySubjectSummary = - _SecCertificateCopySubjectSummaryPtr.asFunction< - CFStringRef Function(SecCertificateRef)>(); + late final _CFXMLNodeGetTypeIDPtr = + _lookup>('CFXMLNodeGetTypeID'); + late final _CFXMLNodeGetTypeID = + _CFXMLNodeGetTypeIDPtr.asFunction(); - int SecCertificateCopyCommonName( - SecCertificateRef certificate, - ffi.Pointer commonName, + CFXMLNodeRef CFXMLNodeCreate( + CFAllocatorRef alloc, + int xmlType, + CFStringRef dataString, + ffi.Pointer additionalInfoPtr, + int version, ) { - return _SecCertificateCopyCommonName( - certificate, - commonName, + return _CFXMLNodeCreate( + alloc, + xmlType, + dataString, + additionalInfoPtr, + version, ); } - late final _SecCertificateCopyCommonNamePtr = _lookup< + late final _CFXMLNodeCreatePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyCommonName'); - late final _SecCertificateCopyCommonName = _SecCertificateCopyCommonNamePtr - .asFunction)>(); + CFXMLNodeRef Function(CFAllocatorRef, ffi.Int32, CFStringRef, + ffi.Pointer, CFIndex)>>('CFXMLNodeCreate'); + late final _CFXMLNodeCreate = _CFXMLNodeCreatePtr.asFunction< + CFXMLNodeRef Function( + CFAllocatorRef, int, CFStringRef, ffi.Pointer, int)>(); - int SecCertificateCopyEmailAddresses( - SecCertificateRef certificate, - ffi.Pointer emailAddresses, + CFXMLNodeRef CFXMLNodeCreateCopy( + CFAllocatorRef alloc, + CFXMLNodeRef origNode, ) { - return _SecCertificateCopyEmailAddresses( - certificate, - emailAddresses, + return _CFXMLNodeCreateCopy( + alloc, + origNode, ); } - late final _SecCertificateCopyEmailAddressesPtr = _lookup< + late final _CFXMLNodeCreateCopyPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyEmailAddresses'); - late final _SecCertificateCopyEmailAddresses = - _SecCertificateCopyEmailAddressesPtr.asFunction< - int Function(SecCertificateRef, ffi.Pointer)>(); + CFXMLNodeRef Function( + CFAllocatorRef, CFXMLNodeRef)>>('CFXMLNodeCreateCopy'); + late final _CFXMLNodeCreateCopy = _CFXMLNodeCreateCopyPtr.asFunction< + CFXMLNodeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); - CFDataRef SecCertificateCopyNormalizedIssuerSequence( - SecCertificateRef certificate, + int CFXMLNodeGetTypeCode( + CFXMLNodeRef node, ) { - return _SecCertificateCopyNormalizedIssuerSequence( - certificate, + return _CFXMLNodeGetTypeCode( + node, ); } - late final _SecCertificateCopyNormalizedIssuerSequencePtr = - _lookup>( - 'SecCertificateCopyNormalizedIssuerSequence'); - late final _SecCertificateCopyNormalizedIssuerSequence = - _SecCertificateCopyNormalizedIssuerSequencePtr.asFunction< - CFDataRef Function(SecCertificateRef)>(); + late final _CFXMLNodeGetTypeCodePtr = + _lookup>( + 'CFXMLNodeGetTypeCode'); + late final _CFXMLNodeGetTypeCode = + _CFXMLNodeGetTypeCodePtr.asFunction(); - CFDataRef SecCertificateCopyNormalizedSubjectSequence( - SecCertificateRef certificate, + CFStringRef CFXMLNodeGetString( + CFXMLNodeRef node, ) { - return _SecCertificateCopyNormalizedSubjectSequence( - certificate, + return _CFXMLNodeGetString( + node, ); } - late final _SecCertificateCopyNormalizedSubjectSequencePtr = - _lookup>( - 'SecCertificateCopyNormalizedSubjectSequence'); - late final _SecCertificateCopyNormalizedSubjectSequence = - _SecCertificateCopyNormalizedSubjectSequencePtr.asFunction< - CFDataRef Function(SecCertificateRef)>(); + late final _CFXMLNodeGetStringPtr = + _lookup>( + 'CFXMLNodeGetString'); + late final _CFXMLNodeGetString = + _CFXMLNodeGetStringPtr.asFunction(); - SecKeyRef SecCertificateCopyKey( - SecCertificateRef certificate, + ffi.Pointer CFXMLNodeGetInfoPtr( + CFXMLNodeRef node, ) { - return _SecCertificateCopyKey( - certificate, + return _CFXMLNodeGetInfoPtr( + node, ); } - late final _SecCertificateCopyKeyPtr = - _lookup>( - 'SecCertificateCopyKey'); - late final _SecCertificateCopyKey = _SecCertificateCopyKeyPtr.asFunction< - SecKeyRef Function(SecCertificateRef)>(); + late final _CFXMLNodeGetInfoPtrPtr = + _lookup Function(CFXMLNodeRef)>>( + 'CFXMLNodeGetInfoPtr'); + late final _CFXMLNodeGetInfoPtr = _CFXMLNodeGetInfoPtrPtr.asFunction< + ffi.Pointer Function(CFXMLNodeRef)>(); - int SecCertificateCopyPublicKey( - SecCertificateRef certificate, - ffi.Pointer key, + int CFXMLNodeGetVersion( + CFXMLNodeRef node, ) { - return _SecCertificateCopyPublicKey( - certificate, - key, + return _CFXMLNodeGetVersion( + node, ); } - late final _SecCertificateCopyPublicKeyPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyPublicKey'); - late final _SecCertificateCopyPublicKey = _SecCertificateCopyPublicKeyPtr - .asFunction)>(); + late final _CFXMLNodeGetVersionPtr = + _lookup>( + 'CFXMLNodeGetVersion'); + late final _CFXMLNodeGetVersion = + _CFXMLNodeGetVersionPtr.asFunction(); - CFDataRef SecCertificateCopySerialNumberData( - SecCertificateRef certificate, - ffi.Pointer error, + CFXMLTreeRef CFXMLTreeCreateWithNode( + CFAllocatorRef allocator, + CFXMLNodeRef node, ) { - return _SecCertificateCopySerialNumberData( - certificate, - error, + return _CFXMLTreeCreateWithNode( + allocator, + node, ); } - late final _SecCertificateCopySerialNumberDataPtr = _lookup< + late final _CFXMLTreeCreateWithNodePtr = _lookup< ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopySerialNumberData'); - late final _SecCertificateCopySerialNumberData = - _SecCertificateCopySerialNumberDataPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + CFXMLTreeRef Function( + CFAllocatorRef, CFXMLNodeRef)>>('CFXMLTreeCreateWithNode'); + late final _CFXMLTreeCreateWithNode = _CFXMLTreeCreateWithNodePtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); - CFDataRef SecCertificateCopySerialNumber( - SecCertificateRef certificate, - ffi.Pointer error, + CFXMLNodeRef CFXMLTreeGetNode( + CFXMLTreeRef xmlTree, ) { - return _SecCertificateCopySerialNumber( - certificate, - error, + return _CFXMLTreeGetNode( + xmlTree, ); } - late final _SecCertificateCopySerialNumberPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopySerialNumber'); - late final _SecCertificateCopySerialNumber = - _SecCertificateCopySerialNumberPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + late final _CFXMLTreeGetNodePtr = + _lookup>( + 'CFXMLTreeGetNode'); + late final _CFXMLTreeGetNode = + _CFXMLTreeGetNodePtr.asFunction(); - int SecCertificateCreateFromData( - ffi.Pointer data, - int type, - int encoding, - ffi.Pointer certificate, - ) { - return _SecCertificateCreateFromData( - data, - type, - encoding, - certificate, - ); + int CFXMLParserGetTypeID() { + return _CFXMLParserGetTypeID(); } - late final _SecCertificateCreateFromDataPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - ffi.Pointer, - CSSM_CERT_TYPE, - CSSM_CERT_ENCODING, - ffi.Pointer)>>('SecCertificateCreateFromData'); - late final _SecCertificateCreateFromData = - _SecCertificateCreateFromDataPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer)>(); + late final _CFXMLParserGetTypeIDPtr = + _lookup>('CFXMLParserGetTypeID'); + late final _CFXMLParserGetTypeID = + _CFXMLParserGetTypeIDPtr.asFunction(); - int SecCertificateAddToKeychain( - SecCertificateRef certificate, - SecKeychainRef keychain, + CFXMLParserRef CFXMLParserCreate( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer callBacks, + ffi.Pointer context, ) { - return _SecCertificateAddToKeychain( - certificate, - keychain, + return _CFXMLParserCreate( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, + callBacks, + context, ); } - late final _SecCertificateAddToKeychainPtr = _lookup< + late final _CFXMLParserCreatePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - SecKeychainRef)>>('SecCertificateAddToKeychain'); - late final _SecCertificateAddToKeychain = _SecCertificateAddToKeychainPtr - .asFunction(); + CFXMLParserRef Function( + CFAllocatorRef, + CFDataRef, + CFURLRef, + CFOptionFlags, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFXMLParserCreate'); + late final _CFXMLParserCreate = _CFXMLParserCreatePtr.asFunction< + CFXMLParserRef Function( + CFAllocatorRef, + CFDataRef, + CFURLRef, + int, + int, + ffi.Pointer, + ffi.Pointer)>(); - int SecCertificateGetData( - SecCertificateRef certificate, - CSSM_DATA_PTR data, + CFXMLParserRef CFXMLParserCreateWithDataFromURL( + CFAllocatorRef allocator, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer callBacks, + ffi.Pointer context, ) { - return _SecCertificateGetData( - certificate, - data, + return _CFXMLParserCreateWithDataFromURL( + allocator, + dataSource, + parseOptions, + versionOfNodes, + callBacks, + context, ); } - late final _SecCertificateGetDataPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecCertificateRef, CSSM_DATA_PTR)>>('SecCertificateGetData'); - late final _SecCertificateGetData = _SecCertificateGetDataPtr.asFunction< - int Function(SecCertificateRef, CSSM_DATA_PTR)>(); + late final _CFXMLParserCreateWithDataFromURLPtr = _lookup< + ffi.NativeFunction< + CFXMLParserRef Function( + CFAllocatorRef, + CFURLRef, + CFOptionFlags, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>( + 'CFXMLParserCreateWithDataFromURL'); + late final _CFXMLParserCreateWithDataFromURL = + _CFXMLParserCreateWithDataFromURLPtr.asFunction< + CFXMLParserRef Function( + CFAllocatorRef, + CFURLRef, + int, + int, + ffi.Pointer, + ffi.Pointer)>(); - int SecCertificateGetType( - SecCertificateRef certificate, - ffi.Pointer certificateType, + void CFXMLParserGetContext( + CFXMLParserRef parser, + ffi.Pointer context, ) { - return _SecCertificateGetType( - certificate, - certificateType, + return _CFXMLParserGetContext( + parser, + context, ); } - late final _SecCertificateGetTypePtr = _lookup< + late final _CFXMLParserGetContextPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateGetType'); - late final _SecCertificateGetType = _SecCertificateGetTypePtr.asFunction< - int Function(SecCertificateRef, ffi.Pointer)>(); + ffi.Void Function(CFXMLParserRef, + ffi.Pointer)>>('CFXMLParserGetContext'); + late final _CFXMLParserGetContext = _CFXMLParserGetContextPtr.asFunction< + void Function(CFXMLParserRef, ffi.Pointer)>(); - int SecCertificateGetSubject( - SecCertificateRef certificate, - ffi.Pointer> subject, + void CFXMLParserGetCallBacks( + CFXMLParserRef parser, + ffi.Pointer callBacks, ) { - return _SecCertificateGetSubject( - certificate, - subject, + return _CFXMLParserGetCallBacks( + parser, + callBacks, ); } - late final _SecCertificateGetSubjectPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer>)>>( - 'SecCertificateGetSubject'); - late final _SecCertificateGetSubject = - _SecCertificateGetSubjectPtr.asFunction< - int Function( - SecCertificateRef, ffi.Pointer>)>(); + late final _CFXMLParserGetCallBacksPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFXMLParserRef, + ffi.Pointer)>>('CFXMLParserGetCallBacks'); + late final _CFXMLParserGetCallBacks = _CFXMLParserGetCallBacksPtr.asFunction< + void Function(CFXMLParserRef, ffi.Pointer)>(); - int SecCertificateGetIssuer( - SecCertificateRef certificate, - ffi.Pointer> issuer, + CFURLRef CFXMLParserGetSourceURL( + CFXMLParserRef parser, ) { - return _SecCertificateGetIssuer( - certificate, - issuer, + return _CFXMLParserGetSourceURL( + parser, ); } - late final _SecCertificateGetIssuerPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer>)>>( - 'SecCertificateGetIssuer'); - late final _SecCertificateGetIssuer = _SecCertificateGetIssuerPtr.asFunction< - int Function( - SecCertificateRef, ffi.Pointer>)>(); + late final _CFXMLParserGetSourceURLPtr = + _lookup>( + 'CFXMLParserGetSourceURL'); + late final _CFXMLParserGetSourceURL = _CFXMLParserGetSourceURLPtr.asFunction< + CFURLRef Function(CFXMLParserRef)>(); - int SecCertificateGetCLHandle( - SecCertificateRef certificate, - ffi.Pointer clHandle, + int CFXMLParserGetLocation( + CFXMLParserRef parser, ) { - return _SecCertificateGetCLHandle( - certificate, - clHandle, + return _CFXMLParserGetLocation( + parser, ); } - late final _SecCertificateGetCLHandlePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateGetCLHandle'); - late final _SecCertificateGetCLHandle = - _SecCertificateGetCLHandlePtr.asFunction< - int Function(SecCertificateRef, ffi.Pointer)>(); + late final _CFXMLParserGetLocationPtr = + _lookup>( + 'CFXMLParserGetLocation'); + late final _CFXMLParserGetLocation = + _CFXMLParserGetLocationPtr.asFunction(); - int SecCertificateGetAlgorithmID( - SecCertificateRef certificate, - ffi.Pointer> algid, + int CFXMLParserGetLineNumber( + CFXMLParserRef parser, ) { - return _SecCertificateGetAlgorithmID( - certificate, - algid, + return _CFXMLParserGetLineNumber( + parser, ); } - late final _SecCertificateGetAlgorithmIDPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecCertificateRef, ffi.Pointer>)>>( - 'SecCertificateGetAlgorithmID'); - late final _SecCertificateGetAlgorithmID = - _SecCertificateGetAlgorithmIDPtr.asFunction< - int Function( - SecCertificateRef, ffi.Pointer>)>(); + late final _CFXMLParserGetLineNumberPtr = + _lookup>( + 'CFXMLParserGetLineNumber'); + late final _CFXMLParserGetLineNumber = + _CFXMLParserGetLineNumberPtr.asFunction(); - int SecCertificateCopyPreference( - CFStringRef name, - int keyUsage, - ffi.Pointer certificate, + ffi.Pointer CFXMLParserGetDocument( + CFXMLParserRef parser, ) { - return _SecCertificateCopyPreference( - name, - keyUsage, - certificate, + return _CFXMLParserGetDocument( + parser, ); } - late final _SecCertificateCopyPreferencePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(CFStringRef, uint32, - ffi.Pointer)>>('SecCertificateCopyPreference'); - late final _SecCertificateCopyPreference = - _SecCertificateCopyPreferencePtr.asFunction< - int Function(CFStringRef, int, ffi.Pointer)>(); + late final _CFXMLParserGetDocumentPtr = _lookup< + ffi.NativeFunction Function(CFXMLParserRef)>>( + 'CFXMLParserGetDocument'); + late final _CFXMLParserGetDocument = _CFXMLParserGetDocumentPtr.asFunction< + ffi.Pointer Function(CFXMLParserRef)>(); - SecCertificateRef SecCertificateCopyPreferred( - CFStringRef name, - CFArrayRef keyUsage, + int CFXMLParserGetStatusCode( + CFXMLParserRef parser, ) { - return _SecCertificateCopyPreferred( - name, - keyUsage, + return _CFXMLParserGetStatusCode( + parser, ); } - late final _SecCertificateCopyPreferredPtr = _lookup< - ffi.NativeFunction< - SecCertificateRef Function( - CFStringRef, CFArrayRef)>>('SecCertificateCopyPreferred'); - late final _SecCertificateCopyPreferred = _SecCertificateCopyPreferredPtr - .asFunction(); + late final _CFXMLParserGetStatusCodePtr = + _lookup>( + 'CFXMLParserGetStatusCode'); + late final _CFXMLParserGetStatusCode = + _CFXMLParserGetStatusCodePtr.asFunction(); - int SecCertificateSetPreference( - SecCertificateRef certificate, - CFStringRef name, - int keyUsage, - CFDateRef date, + CFStringRef CFXMLParserCopyErrorDescription( + CFXMLParserRef parser, ) { - return _SecCertificateSetPreference( - certificate, - name, - keyUsage, - date, + return _CFXMLParserCopyErrorDescription( + parser, ); } - late final _SecCertificateSetPreferencePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, CFStringRef, uint32, - CFDateRef)>>('SecCertificateSetPreference'); - late final _SecCertificateSetPreference = - _SecCertificateSetPreferencePtr.asFunction< - int Function(SecCertificateRef, CFStringRef, int, CFDateRef)>(); + late final _CFXMLParserCopyErrorDescriptionPtr = + _lookup>( + 'CFXMLParserCopyErrorDescription'); + late final _CFXMLParserCopyErrorDescription = + _CFXMLParserCopyErrorDescriptionPtr.asFunction< + CFStringRef Function(CFXMLParserRef)>(); - int SecCertificateSetPreferred( - SecCertificateRef certificate, - CFStringRef name, - CFArrayRef keyUsage, + void CFXMLParserAbort( + CFXMLParserRef parser, + int errorCode, + CFStringRef errorDescription, ) { - return _SecCertificateSetPreferred( - certificate, - name, - keyUsage, + return _CFXMLParserAbort( + parser, + errorCode, + errorDescription, ); } - late final _SecCertificateSetPreferredPtr = _lookup< + late final _CFXMLParserAbortPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecCertificateRef, CFStringRef, - CFArrayRef)>>('SecCertificateSetPreferred'); - late final _SecCertificateSetPreferred = _SecCertificateSetPreferredPtr - .asFunction(); + ffi.Void Function( + CFXMLParserRef, ffi.Int32, CFStringRef)>>('CFXMLParserAbort'); + late final _CFXMLParserAbort = _CFXMLParserAbortPtr.asFunction< + void Function(CFXMLParserRef, int, CFStringRef)>(); - late final ffi.Pointer _kSecPropertyKeyType = - _lookup('kSecPropertyKeyType'); + int CFXMLParserParse( + CFXMLParserRef parser, + ) { + return _CFXMLParserParse( + parser, + ); + } - CFStringRef get kSecPropertyKeyType => _kSecPropertyKeyType.value; + late final _CFXMLParserParsePtr = + _lookup>( + 'CFXMLParserParse'); + late final _CFXMLParserParse = + _CFXMLParserParsePtr.asFunction(); - set kSecPropertyKeyType(CFStringRef value) => - _kSecPropertyKeyType.value = value; + CFXMLTreeRef CFXMLTreeCreateFromData( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ) { + return _CFXMLTreeCreateFromData( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, + ); + } - late final ffi.Pointer _kSecPropertyKeyLabel = - _lookup('kSecPropertyKeyLabel'); + late final _CFXMLTreeCreateFromDataPtr = _lookup< + ffi.NativeFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, + CFOptionFlags, CFIndex)>>('CFXMLTreeCreateFromData'); + late final _CFXMLTreeCreateFromData = _CFXMLTreeCreateFromDataPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int)>(); - CFStringRef get kSecPropertyKeyLabel => _kSecPropertyKeyLabel.value; + CFXMLTreeRef CFXMLTreeCreateFromDataWithError( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer errorDict, + ) { + return _CFXMLTreeCreateFromDataWithError( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, + errorDict, + ); + } - set kSecPropertyKeyLabel(CFStringRef value) => - _kSecPropertyKeyLabel.value = value; + late final _CFXMLTreeCreateFromDataWithErrorPtr = _lookup< + ffi.NativeFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, + CFOptionFlags, CFIndex, ffi.Pointer)>>( + 'CFXMLTreeCreateFromDataWithError'); + late final _CFXMLTreeCreateFromDataWithError = + _CFXMLTreeCreateFromDataWithErrorPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int, + ffi.Pointer)>(); - late final ffi.Pointer _kSecPropertyKeyLocalizedLabel = - _lookup('kSecPropertyKeyLocalizedLabel'); + CFXMLTreeRef CFXMLTreeCreateWithDataFromURL( + CFAllocatorRef allocator, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ) { + return _CFXMLTreeCreateWithDataFromURL( + allocator, + dataSource, + parseOptions, + versionOfNodes, + ); + } - CFStringRef get kSecPropertyKeyLocalizedLabel => - _kSecPropertyKeyLocalizedLabel.value; + late final _CFXMLTreeCreateWithDataFromURLPtr = _lookup< + ffi.NativeFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, CFOptionFlags, + CFIndex)>>('CFXMLTreeCreateWithDataFromURL'); + late final _CFXMLTreeCreateWithDataFromURL = + _CFXMLTreeCreateWithDataFromURLPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, int, int)>(); - set kSecPropertyKeyLocalizedLabel(CFStringRef value) => - _kSecPropertyKeyLocalizedLabel.value = value; + CFDataRef CFXMLTreeCreateXMLData( + CFAllocatorRef allocator, + CFXMLTreeRef xmlTree, + ) { + return _CFXMLTreeCreateXMLData( + allocator, + xmlTree, + ); + } - late final ffi.Pointer _kSecPropertyKeyValue = - _lookup('kSecPropertyKeyValue'); + late final _CFXMLTreeCreateXMLDataPtr = _lookup< + ffi.NativeFunction>( + 'CFXMLTreeCreateXMLData'); + late final _CFXMLTreeCreateXMLData = _CFXMLTreeCreateXMLDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFXMLTreeRef)>(); - CFStringRef get kSecPropertyKeyValue => _kSecPropertyKeyValue.value; + CFStringRef CFXMLCreateStringByEscapingEntities( + CFAllocatorRef allocator, + CFStringRef string, + CFDictionaryRef entitiesDictionary, + ) { + return _CFXMLCreateStringByEscapingEntities( + allocator, + string, + entitiesDictionary, + ); + } - set kSecPropertyKeyValue(CFStringRef value) => - _kSecPropertyKeyValue.value = value; + late final _CFXMLCreateStringByEscapingEntitiesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFXMLCreateStringByEscapingEntities'); + late final _CFXMLCreateStringByEscapingEntities = + _CFXMLCreateStringByEscapingEntitiesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - late final ffi.Pointer _kSecPropertyTypeWarning = - _lookup('kSecPropertyTypeWarning'); + CFStringRef CFXMLCreateStringByUnescapingEntities( + CFAllocatorRef allocator, + CFStringRef string, + CFDictionaryRef entitiesDictionary, + ) { + return _CFXMLCreateStringByUnescapingEntities( + allocator, + string, + entitiesDictionary, + ); + } - CFStringRef get kSecPropertyTypeWarning => _kSecPropertyTypeWarning.value; + late final _CFXMLCreateStringByUnescapingEntitiesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFXMLCreateStringByUnescapingEntities'); + late final _CFXMLCreateStringByUnescapingEntities = + _CFXMLCreateStringByUnescapingEntitiesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - set kSecPropertyTypeWarning(CFStringRef value) => - _kSecPropertyTypeWarning.value = value; + late final ffi.Pointer _kCFXMLTreeErrorDescription = + _lookup('kCFXMLTreeErrorDescription'); - late final ffi.Pointer _kSecPropertyTypeSuccess = - _lookup('kSecPropertyTypeSuccess'); + CFStringRef get kCFXMLTreeErrorDescription => + _kCFXMLTreeErrorDescription.value; - CFStringRef get kSecPropertyTypeSuccess => _kSecPropertyTypeSuccess.value; + set kCFXMLTreeErrorDescription(CFStringRef value) => + _kCFXMLTreeErrorDescription.value = value; - set kSecPropertyTypeSuccess(CFStringRef value) => - _kSecPropertyTypeSuccess.value = value; + late final ffi.Pointer _kCFXMLTreeErrorLineNumber = + _lookup('kCFXMLTreeErrorLineNumber'); - late final ffi.Pointer _kSecPropertyTypeSection = - _lookup('kSecPropertyTypeSection'); + CFStringRef get kCFXMLTreeErrorLineNumber => _kCFXMLTreeErrorLineNumber.value; - CFStringRef get kSecPropertyTypeSection => _kSecPropertyTypeSection.value; + set kCFXMLTreeErrorLineNumber(CFStringRef value) => + _kCFXMLTreeErrorLineNumber.value = value; - set kSecPropertyTypeSection(CFStringRef value) => - _kSecPropertyTypeSection.value = value; + late final ffi.Pointer _kCFXMLTreeErrorLocation = + _lookup('kCFXMLTreeErrorLocation'); - late final ffi.Pointer _kSecPropertyTypeData = - _lookup('kSecPropertyTypeData'); + CFStringRef get kCFXMLTreeErrorLocation => _kCFXMLTreeErrorLocation.value; - CFStringRef get kSecPropertyTypeData => _kSecPropertyTypeData.value; + set kCFXMLTreeErrorLocation(CFStringRef value) => + _kCFXMLTreeErrorLocation.value = value; - set kSecPropertyTypeData(CFStringRef value) => - _kSecPropertyTypeData.value = value; + late final ffi.Pointer _kCFXMLTreeErrorStatusCode = + _lookup('kCFXMLTreeErrorStatusCode'); - late final ffi.Pointer _kSecPropertyTypeString = - _lookup('kSecPropertyTypeString'); + CFStringRef get kCFXMLTreeErrorStatusCode => _kCFXMLTreeErrorStatusCode.value; - CFStringRef get kSecPropertyTypeString => _kSecPropertyTypeString.value; + set kCFXMLTreeErrorStatusCode(CFStringRef value) => + _kCFXMLTreeErrorStatusCode.value = value; - set kSecPropertyTypeString(CFStringRef value) => - _kSecPropertyTypeString.value = value; + late final ffi.Pointer _kSecPropertyTypeTitle = + _lookup('kSecPropertyTypeTitle'); - late final ffi.Pointer _kSecPropertyTypeURL = - _lookup('kSecPropertyTypeURL'); + CFStringRef get kSecPropertyTypeTitle => _kSecPropertyTypeTitle.value; - CFStringRef get kSecPropertyTypeURL => _kSecPropertyTypeURL.value; + set kSecPropertyTypeTitle(CFStringRef value) => + _kSecPropertyTypeTitle.value = value; - set kSecPropertyTypeURL(CFStringRef value) => - _kSecPropertyTypeURL.value = value; + late final ffi.Pointer _kSecPropertyTypeError = + _lookup('kSecPropertyTypeError'); - late final ffi.Pointer _kSecPropertyTypeDate = - _lookup('kSecPropertyTypeDate'); + CFStringRef get kSecPropertyTypeError => _kSecPropertyTypeError.value; - CFStringRef get kSecPropertyTypeDate => _kSecPropertyTypeDate.value; + set kSecPropertyTypeError(CFStringRef value) => + _kSecPropertyTypeError.value = value; - set kSecPropertyTypeDate(CFStringRef value) => - _kSecPropertyTypeDate.value = value; + late final ffi.Pointer _kSecTrustEvaluationDate = + _lookup('kSecTrustEvaluationDate'); - late final ffi.Pointer _kSecPropertyTypeArray = - _lookup('kSecPropertyTypeArray'); + CFStringRef get kSecTrustEvaluationDate => _kSecTrustEvaluationDate.value; - CFStringRef get kSecPropertyTypeArray => _kSecPropertyTypeArray.value; + set kSecTrustEvaluationDate(CFStringRef value) => + _kSecTrustEvaluationDate.value = value; - set kSecPropertyTypeArray(CFStringRef value) => - _kSecPropertyTypeArray.value = value; + late final ffi.Pointer _kSecTrustExtendedValidation = + _lookup('kSecTrustExtendedValidation'); - late final ffi.Pointer _kSecPropertyTypeNumber = - _lookup('kSecPropertyTypeNumber'); + CFStringRef get kSecTrustExtendedValidation => + _kSecTrustExtendedValidation.value; - CFStringRef get kSecPropertyTypeNumber => _kSecPropertyTypeNumber.value; + set kSecTrustExtendedValidation(CFStringRef value) => + _kSecTrustExtendedValidation.value = value; - set kSecPropertyTypeNumber(CFStringRef value) => - _kSecPropertyTypeNumber.value = value; + late final ffi.Pointer _kSecTrustOrganizationName = + _lookup('kSecTrustOrganizationName'); - CFDictionaryRef SecCertificateCopyValues( - SecCertificateRef certificate, - CFArrayRef keys, - ffi.Pointer error, + CFStringRef get kSecTrustOrganizationName => _kSecTrustOrganizationName.value; + + set kSecTrustOrganizationName(CFStringRef value) => + _kSecTrustOrganizationName.value = value; + + late final ffi.Pointer _kSecTrustResultValue = + _lookup('kSecTrustResultValue'); + + CFStringRef get kSecTrustResultValue => _kSecTrustResultValue.value; + + set kSecTrustResultValue(CFStringRef value) => + _kSecTrustResultValue.value = value; + + late final ffi.Pointer _kSecTrustRevocationChecked = + _lookup('kSecTrustRevocationChecked'); + + CFStringRef get kSecTrustRevocationChecked => + _kSecTrustRevocationChecked.value; + + set kSecTrustRevocationChecked(CFStringRef value) => + _kSecTrustRevocationChecked.value = value; + + late final ffi.Pointer _kSecTrustRevocationValidUntilDate = + _lookup('kSecTrustRevocationValidUntilDate'); + + CFStringRef get kSecTrustRevocationValidUntilDate => + _kSecTrustRevocationValidUntilDate.value; + + set kSecTrustRevocationValidUntilDate(CFStringRef value) => + _kSecTrustRevocationValidUntilDate.value = value; + + late final ffi.Pointer _kSecTrustCertificateTransparency = + _lookup('kSecTrustCertificateTransparency'); + + CFStringRef get kSecTrustCertificateTransparency => + _kSecTrustCertificateTransparency.value; + + set kSecTrustCertificateTransparency(CFStringRef value) => + _kSecTrustCertificateTransparency.value = value; + + late final ffi.Pointer + _kSecTrustCertificateTransparencyWhiteList = + _lookup('kSecTrustCertificateTransparencyWhiteList'); + + CFStringRef get kSecTrustCertificateTransparencyWhiteList => + _kSecTrustCertificateTransparencyWhiteList.value; + + set kSecTrustCertificateTransparencyWhiteList(CFStringRef value) => + _kSecTrustCertificateTransparencyWhiteList.value = value; + + int SecTrustGetTypeID() { + return _SecTrustGetTypeID(); + } + + late final _SecTrustGetTypeIDPtr = + _lookup>('SecTrustGetTypeID'); + late final _SecTrustGetTypeID = + _SecTrustGetTypeIDPtr.asFunction(); + + int SecTrustCreateWithCertificates( + CFTypeRef certificates, + CFTypeRef policies, + ffi.Pointer trust, ) { - return _SecCertificateCopyValues( - certificate, - keys, - error, + return _SecTrustCreateWithCertificates( + certificates, + policies, + trust, ); } - late final _SecCertificateCopyValuesPtr = _lookup< + late final _SecTrustCreateWithCertificatesPtr = _lookup< ffi.NativeFunction< - CFDictionaryRef Function(SecCertificateRef, CFArrayRef, - ffi.Pointer)>>('SecCertificateCopyValues'); - late final _SecCertificateCopyValues = - _SecCertificateCopyValuesPtr.asFunction< - CFDictionaryRef Function( - SecCertificateRef, CFArrayRef, ffi.Pointer)>(); + OSStatus Function(CFTypeRef, CFTypeRef, + ffi.Pointer)>>('SecTrustCreateWithCertificates'); + late final _SecTrustCreateWithCertificates = + _SecTrustCreateWithCertificatesPtr.asFunction< + int Function(CFTypeRef, CFTypeRef, ffi.Pointer)>(); - CFStringRef SecCertificateCopyLongDescription( - CFAllocatorRef alloc, - SecCertificateRef certificate, - ffi.Pointer error, + int SecTrustSetPolicies( + SecTrustRef trust, + CFTypeRef policies, ) { - return _SecCertificateCopyLongDescription( - alloc, - certificate, - error, + return _SecTrustSetPolicies( + trust, + policies, ); } - late final _SecCertificateCopyLongDescriptionPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyLongDescription'); - late final _SecCertificateCopyLongDescription = - _SecCertificateCopyLongDescriptionPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); + late final _SecTrustSetPoliciesPtr = + _lookup>( + 'SecTrustSetPolicies'); + late final _SecTrustSetPolicies = _SecTrustSetPoliciesPtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); - CFStringRef SecCertificateCopyShortDescription( - CFAllocatorRef alloc, - SecCertificateRef certificate, - ffi.Pointer error, + int SecTrustCopyPolicies( + SecTrustRef trust, + ffi.Pointer policies, ) { - return _SecCertificateCopyShortDescription( - alloc, - certificate, - error, + return _SecTrustCopyPolicies( + trust, + policies, ); } - late final _SecCertificateCopyShortDescriptionPtr = _lookup< + late final _SecTrustCopyPoliciesPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyShortDescription'); - late final _SecCertificateCopyShortDescription = - _SecCertificateCopyShortDescriptionPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustCopyPolicies'); + late final _SecTrustCopyPolicies = _SecTrustCopyPoliciesPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - CFDataRef SecCertificateCopyNormalizedIssuerContent( - SecCertificateRef certificate, - ffi.Pointer error, + int SecTrustSetNetworkFetchAllowed( + SecTrustRef trust, + int allowFetch, ) { - return _SecCertificateCopyNormalizedIssuerContent( - certificate, - error, + return _SecTrustSetNetworkFetchAllowed( + trust, + allowFetch, ); } - late final _SecCertificateCopyNormalizedIssuerContentPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( - 'SecCertificateCopyNormalizedIssuerContent'); - late final _SecCertificateCopyNormalizedIssuerContent = - _SecCertificateCopyNormalizedIssuerContentPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + late final _SecTrustSetNetworkFetchAllowedPtr = + _lookup>( + 'SecTrustSetNetworkFetchAllowed'); + late final _SecTrustSetNetworkFetchAllowed = + _SecTrustSetNetworkFetchAllowedPtr.asFunction< + int Function(SecTrustRef, int)>(); - CFDataRef SecCertificateCopyNormalizedSubjectContent( - SecCertificateRef certificate, - ffi.Pointer error, + int SecTrustGetNetworkFetchAllowed( + SecTrustRef trust, + ffi.Pointer allowFetch, ) { - return _SecCertificateCopyNormalizedSubjectContent( - certificate, - error, + return _SecTrustGetNetworkFetchAllowed( + trust, + allowFetch, ); } - late final _SecCertificateCopyNormalizedSubjectContentPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( - 'SecCertificateCopyNormalizedSubjectContent'); - late final _SecCertificateCopyNormalizedSubjectContent = - _SecCertificateCopyNormalizedSubjectContentPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + late final _SecTrustGetNetworkFetchAllowedPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetNetworkFetchAllowed'); + late final _SecTrustGetNetworkFetchAllowed = + _SecTrustGetNetworkFetchAllowedPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - int SecIdentityGetTypeID() { - return _SecIdentityGetTypeID(); + int SecTrustSetAnchorCertificates( + SecTrustRef trust, + CFArrayRef anchorCertificates, + ) { + return _SecTrustSetAnchorCertificates( + trust, + anchorCertificates, + ); } - late final _SecIdentityGetTypeIDPtr = - _lookup>('SecIdentityGetTypeID'); - late final _SecIdentityGetTypeID = - _SecIdentityGetTypeIDPtr.asFunction(); + late final _SecTrustSetAnchorCertificatesPtr = + _lookup>( + 'SecTrustSetAnchorCertificates'); + late final _SecTrustSetAnchorCertificates = _SecTrustSetAnchorCertificatesPtr + .asFunction(); - int SecIdentityCreateWithCertificate( - CFTypeRef keychainOrArray, - SecCertificateRef certificateRef, - ffi.Pointer identityRef, + int SecTrustSetAnchorCertificatesOnly( + SecTrustRef trust, + int anchorCertificatesOnly, ) { - return _SecIdentityCreateWithCertificate( - keychainOrArray, - certificateRef, - identityRef, + return _SecTrustSetAnchorCertificatesOnly( + trust, + anchorCertificatesOnly, ); } - late final _SecIdentityCreateWithCertificatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - CFTypeRef, SecCertificateRef, ffi.Pointer)>>( - 'SecIdentityCreateWithCertificate'); - late final _SecIdentityCreateWithCertificate = - _SecIdentityCreateWithCertificatePtr.asFunction< - int Function( - CFTypeRef, SecCertificateRef, ffi.Pointer)>(); + late final _SecTrustSetAnchorCertificatesOnlyPtr = + _lookup>( + 'SecTrustSetAnchorCertificatesOnly'); + late final _SecTrustSetAnchorCertificatesOnly = + _SecTrustSetAnchorCertificatesOnlyPtr.asFunction< + int Function(SecTrustRef, int)>(); - int SecIdentityCopyCertificate( - SecIdentityRef identityRef, - ffi.Pointer certificateRef, + int SecTrustCopyCustomAnchorCertificates( + SecTrustRef trust, + ffi.Pointer anchors, ) { - return _SecIdentityCopyCertificate( - identityRef, - certificateRef, + return _SecTrustCopyCustomAnchorCertificates( + trust, + anchors, ); } - late final _SecIdentityCopyCertificatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecIdentityRef, - ffi.Pointer)>>('SecIdentityCopyCertificate'); - late final _SecIdentityCopyCertificate = - _SecIdentityCopyCertificatePtr.asFunction< - int Function(SecIdentityRef, ffi.Pointer)>(); + late final _SecTrustCopyCustomAnchorCertificatesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, ffi.Pointer)>>( + 'SecTrustCopyCustomAnchorCertificates'); + late final _SecTrustCopyCustomAnchorCertificates = + _SecTrustCopyCustomAnchorCertificatesPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - int SecIdentityCopyPrivateKey( - SecIdentityRef identityRef, - ffi.Pointer privateKeyRef, + int SecTrustSetVerifyDate( + SecTrustRef trust, + CFDateRef verifyDate, ) { - return _SecIdentityCopyPrivateKey( - identityRef, - privateKeyRef, + return _SecTrustSetVerifyDate( + trust, + verifyDate, ); } - late final _SecIdentityCopyPrivateKeyPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecIdentityRef, - ffi.Pointer)>>('SecIdentityCopyPrivateKey'); - late final _SecIdentityCopyPrivateKey = _SecIdentityCopyPrivateKeyPtr - .asFunction)>(); + late final _SecTrustSetVerifyDatePtr = + _lookup>( + 'SecTrustSetVerifyDate'); + late final _SecTrustSetVerifyDate = _SecTrustSetVerifyDatePtr.asFunction< + int Function(SecTrustRef, CFDateRef)>(); - int SecIdentityCopyPreference( - CFStringRef name, - int keyUsage, - CFArrayRef validIssuers, - ffi.Pointer identity, + double SecTrustGetVerifyTime( + SecTrustRef trust, ) { - return _SecIdentityCopyPreference( - name, - keyUsage, - validIssuers, - identity, + return _SecTrustGetVerifyTime( + trust, ); } - late final _SecIdentityCopyPreferencePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(CFStringRef, CSSM_KEYUSE, CFArrayRef, - ffi.Pointer)>>('SecIdentityCopyPreference'); - late final _SecIdentityCopyPreference = - _SecIdentityCopyPreferencePtr.asFunction< - int Function( - CFStringRef, int, CFArrayRef, ffi.Pointer)>(); + late final _SecTrustGetVerifyTimePtr = + _lookup>( + 'SecTrustGetVerifyTime'); + late final _SecTrustGetVerifyTime = + _SecTrustGetVerifyTimePtr.asFunction(); - SecIdentityRef SecIdentityCopyPreferred( - CFStringRef name, - CFArrayRef keyUsage, - CFArrayRef validIssuers, + int SecTrustEvaluate( + SecTrustRef trust, + ffi.Pointer result, ) { - return _SecIdentityCopyPreferred( - name, - keyUsage, - validIssuers, + return _SecTrustEvaluate( + trust, + result, ); } - late final _SecIdentityCopyPreferredPtr = _lookup< + late final _SecTrustEvaluatePtr = _lookup< ffi.NativeFunction< - SecIdentityRef Function(CFStringRef, CFArrayRef, - CFArrayRef)>>('SecIdentityCopyPreferred'); - late final _SecIdentityCopyPreferred = - _SecIdentityCopyPreferredPtr.asFunction< - SecIdentityRef Function(CFStringRef, CFArrayRef, CFArrayRef)>(); + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustEvaluate'); + late final _SecTrustEvaluate = _SecTrustEvaluatePtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - int SecIdentitySetPreference( - SecIdentityRef identity, - CFStringRef name, - int keyUsage, + int SecTrustEvaluateAsync( + SecTrustRef trust, + dispatch_queue_t queue, + SecTrustCallback result, ) { - return _SecIdentitySetPreference( - identity, - name, - keyUsage, + return _SecTrustEvaluateAsync( + trust, + queue, + result, ); } - late final _SecIdentitySetPreferencePtr = _lookup< + late final _SecTrustEvaluateAsyncPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecIdentityRef, CFStringRef, - CSSM_KEYUSE)>>('SecIdentitySetPreference'); - late final _SecIdentitySetPreference = _SecIdentitySetPreferencePtr - .asFunction(); + OSStatus Function(SecTrustRef, dispatch_queue_t, + SecTrustCallback)>>('SecTrustEvaluateAsync'); + late final _SecTrustEvaluateAsync = _SecTrustEvaluateAsyncPtr.asFunction< + int Function(SecTrustRef, dispatch_queue_t, SecTrustCallback)>(); - int SecIdentitySetPreferred( - SecIdentityRef identity, - CFStringRef name, - CFArrayRef keyUsage, + bool SecTrustEvaluateWithError( + SecTrustRef trust, + ffi.Pointer error, ) { - return _SecIdentitySetPreferred( - identity, - name, - keyUsage, + return _SecTrustEvaluateWithError( + trust, + error, ); } - late final _SecIdentitySetPreferredPtr = _lookup< + late final _SecTrustEvaluateWithErrorPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SecIdentityRef, CFStringRef, - CFArrayRef)>>('SecIdentitySetPreferred'); - late final _SecIdentitySetPreferred = _SecIdentitySetPreferredPtr.asFunction< - int Function(SecIdentityRef, CFStringRef, CFArrayRef)>(); + ffi.Bool Function(SecTrustRef, + ffi.Pointer)>>('SecTrustEvaluateWithError'); + late final _SecTrustEvaluateWithError = _SecTrustEvaluateWithErrorPtr + .asFunction)>(); - int SecIdentityCopySystemIdentity( - CFStringRef domain, - ffi.Pointer idRef, - ffi.Pointer actualDomain, + int SecTrustEvaluateAsyncWithError( + SecTrustRef trust, + dispatch_queue_t queue, + SecTrustWithErrorCallback result, ) { - return _SecIdentityCopySystemIdentity( - domain, - idRef, - actualDomain, + return _SecTrustEvaluateAsyncWithError( + trust, + queue, + result, ); } - late final _SecIdentityCopySystemIdentityPtr = _lookup< + late final _SecTrustEvaluateAsyncWithErrorPtr = _lookup< ffi.NativeFunction< - OSStatus Function(CFStringRef, ffi.Pointer, - ffi.Pointer)>>('SecIdentityCopySystemIdentity'); - late final _SecIdentityCopySystemIdentity = - _SecIdentityCopySystemIdentityPtr.asFunction< - int Function(CFStringRef, ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function(SecTrustRef, dispatch_queue_t, + SecTrustWithErrorCallback)>>('SecTrustEvaluateAsyncWithError'); + late final _SecTrustEvaluateAsyncWithError = + _SecTrustEvaluateAsyncWithErrorPtr.asFunction< + int Function( + SecTrustRef, dispatch_queue_t, SecTrustWithErrorCallback)>(); - int SecIdentitySetSystemIdentity( - CFStringRef domain, - SecIdentityRef idRef, + int SecTrustGetTrustResult( + SecTrustRef trust, + ffi.Pointer result, ) { - return _SecIdentitySetSystemIdentity( - domain, - idRef, + return _SecTrustGetTrustResult( + trust, + result, ); } - late final _SecIdentitySetSystemIdentityPtr = _lookup< - ffi.NativeFunction>( - 'SecIdentitySetSystemIdentity'); - late final _SecIdentitySetSystemIdentity = _SecIdentitySetSystemIdentityPtr - .asFunction(); - - late final ffi.Pointer _kSecIdentityDomainDefault = - _lookup('kSecIdentityDomainDefault'); - - CFStringRef get kSecIdentityDomainDefault => _kSecIdentityDomainDefault.value; - - set kSecIdentityDomainDefault(CFStringRef value) => - _kSecIdentityDomainDefault.value = value; - - late final ffi.Pointer _kSecIdentityDomainKerberosKDC = - _lookup('kSecIdentityDomainKerberosKDC'); - - CFStringRef get kSecIdentityDomainKerberosKDC => - _kSecIdentityDomainKerberosKDC.value; - - set kSecIdentityDomainKerberosKDC(CFStringRef value) => - _kSecIdentityDomainKerberosKDC.value = value; + late final _SecTrustGetTrustResultPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustGetTrustResult'); + late final _SecTrustGetTrustResult = _SecTrustGetTrustResultPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - sec_trust_t sec_trust_create( + SecKeyRef SecTrustCopyPublicKey( SecTrustRef trust, ) { - return _sec_trust_create( + return _SecTrustCopyPublicKey( trust, ); } - late final _sec_trust_createPtr = - _lookup>( - 'sec_trust_create'); - late final _sec_trust_create = - _sec_trust_createPtr.asFunction(); + late final _SecTrustCopyPublicKeyPtr = + _lookup>( + 'SecTrustCopyPublicKey'); + late final _SecTrustCopyPublicKey = + _SecTrustCopyPublicKeyPtr.asFunction(); - SecTrustRef sec_trust_copy_ref( - sec_trust_t trust, + SecKeyRef SecTrustCopyKey( + SecTrustRef trust, ) { - return _sec_trust_copy_ref( + return _SecTrustCopyKey( trust, ); } - late final _sec_trust_copy_refPtr = - _lookup>( - 'sec_trust_copy_ref'); - late final _sec_trust_copy_ref = - _sec_trust_copy_refPtr.asFunction(); + late final _SecTrustCopyKeyPtr = + _lookup>( + 'SecTrustCopyKey'); + late final _SecTrustCopyKey = + _SecTrustCopyKeyPtr.asFunction(); - sec_identity_t sec_identity_create( - SecIdentityRef identity, + int SecTrustGetCertificateCount( + SecTrustRef trust, ) { - return _sec_identity_create( - identity, + return _SecTrustGetCertificateCount( + trust, ); } - late final _sec_identity_createPtr = - _lookup>( - 'sec_identity_create'); - late final _sec_identity_create = _sec_identity_createPtr - .asFunction(); - - sec_identity_t sec_identity_create_with_certificates( - SecIdentityRef identity, - CFArrayRef certificates, + late final _SecTrustGetCertificateCountPtr = + _lookup>( + 'SecTrustGetCertificateCount'); + late final _SecTrustGetCertificateCount = + _SecTrustGetCertificateCountPtr.asFunction(); + + SecCertificateRef SecTrustGetCertificateAtIndex( + SecTrustRef trust, + int ix, ) { - return _sec_identity_create_with_certificates( - identity, - certificates, + return _SecTrustGetCertificateAtIndex( + trust, + ix, ); } - late final _sec_identity_create_with_certificatesPtr = _lookup< - ffi.NativeFunction< - sec_identity_t Function(SecIdentityRef, - CFArrayRef)>>('sec_identity_create_with_certificates'); - late final _sec_identity_create_with_certificates = - _sec_identity_create_with_certificatesPtr - .asFunction(); + late final _SecTrustGetCertificateAtIndexPtr = _lookup< + ffi.NativeFunction>( + 'SecTrustGetCertificateAtIndex'); + late final _SecTrustGetCertificateAtIndex = _SecTrustGetCertificateAtIndexPtr + .asFunction(); - bool sec_identity_access_certificates( - sec_identity_t identity, - ffi.Pointer<_ObjCBlock> handler, + CFDataRef SecTrustCopyExceptions( + SecTrustRef trust, ) { - return _sec_identity_access_certificates( - identity, - handler, + return _SecTrustCopyExceptions( + trust, ); } - late final _sec_identity_access_certificatesPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(sec_identity_t, - ffi.Pointer<_ObjCBlock>)>>('sec_identity_access_certificates'); - late final _sec_identity_access_certificates = - _sec_identity_access_certificatesPtr - .asFunction)>(); + late final _SecTrustCopyExceptionsPtr = + _lookup>( + 'SecTrustCopyExceptions'); + late final _SecTrustCopyExceptions = + _SecTrustCopyExceptionsPtr.asFunction(); - SecIdentityRef sec_identity_copy_ref( - sec_identity_t identity, + bool SecTrustSetExceptions( + SecTrustRef trust, + CFDataRef exceptions, ) { - return _sec_identity_copy_ref( - identity, + return _SecTrustSetExceptions( + trust, + exceptions, ); } - late final _sec_identity_copy_refPtr = - _lookup>( - 'sec_identity_copy_ref'); - late final _sec_identity_copy_ref = _sec_identity_copy_refPtr - .asFunction(); + late final _SecTrustSetExceptionsPtr = + _lookup>( + 'SecTrustSetExceptions'); + late final _SecTrustSetExceptions = _SecTrustSetExceptionsPtr.asFunction< + bool Function(SecTrustRef, CFDataRef)>(); - CFArrayRef sec_identity_copy_certificates_ref( - sec_identity_t identity, + CFArrayRef SecTrustCopyProperties( + SecTrustRef trust, ) { - return _sec_identity_copy_certificates_ref( - identity, + return _SecTrustCopyProperties( + trust, ); } - late final _sec_identity_copy_certificates_refPtr = - _lookup>( - 'sec_identity_copy_certificates_ref'); - late final _sec_identity_copy_certificates_ref = - _sec_identity_copy_certificates_refPtr - .asFunction(); + late final _SecTrustCopyPropertiesPtr = + _lookup>( + 'SecTrustCopyProperties'); + late final _SecTrustCopyProperties = + _SecTrustCopyPropertiesPtr.asFunction(); - sec_certificate_t sec_certificate_create( - SecCertificateRef certificate, + CFDictionaryRef SecTrustCopyResult( + SecTrustRef trust, ) { - return _sec_certificate_create( - certificate, + return _SecTrustCopyResult( + trust, ); } - late final _sec_certificate_createPtr = _lookup< - ffi.NativeFunction>( - 'sec_certificate_create'); - late final _sec_certificate_create = _sec_certificate_createPtr - .asFunction(); + late final _SecTrustCopyResultPtr = + _lookup>( + 'SecTrustCopyResult'); + late final _SecTrustCopyResult = _SecTrustCopyResultPtr.asFunction< + CFDictionaryRef Function(SecTrustRef)>(); - SecCertificateRef sec_certificate_copy_ref( - sec_certificate_t certificate, + int SecTrustSetOCSPResponse( + SecTrustRef trust, + CFTypeRef responseData, ) { - return _sec_certificate_copy_ref( - certificate, + return _SecTrustSetOCSPResponse( + trust, + responseData, ); } - late final _sec_certificate_copy_refPtr = _lookup< - ffi.NativeFunction>( - 'sec_certificate_copy_ref'); - late final _sec_certificate_copy_ref = _sec_certificate_copy_refPtr - .asFunction(); + late final _SecTrustSetOCSPResponsePtr = + _lookup>( + 'SecTrustSetOCSPResponse'); + late final _SecTrustSetOCSPResponse = _SecTrustSetOCSPResponsePtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); - ffi.Pointer sec_protocol_metadata_get_negotiated_protocol( - sec_protocol_metadata_t metadata, + int SecTrustSetSignedCertificateTimestamps( + SecTrustRef trust, + CFArrayRef sctArray, ) { - return _sec_protocol_metadata_get_negotiated_protocol( - metadata, + return _SecTrustSetSignedCertificateTimestamps( + trust, + sctArray, ); } - late final _sec_protocol_metadata_get_negotiated_protocolPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_get_negotiated_protocol'); - late final _sec_protocol_metadata_get_negotiated_protocol = - _sec_protocol_metadata_get_negotiated_protocolPtr.asFunction< - ffi.Pointer Function(sec_protocol_metadata_t)>(); + late final _SecTrustSetSignedCertificateTimestampsPtr = + _lookup>( + 'SecTrustSetSignedCertificateTimestamps'); + late final _SecTrustSetSignedCertificateTimestamps = + _SecTrustSetSignedCertificateTimestampsPtr.asFunction< + int Function(SecTrustRef, CFArrayRef)>(); - dispatch_data_t sec_protocol_metadata_copy_peer_public_key( - sec_protocol_metadata_t metadata, + CFArrayRef SecTrustCopyCertificateChain( + SecTrustRef trust, ) { - return _sec_protocol_metadata_copy_peer_public_key( - metadata, + return _SecTrustCopyCertificateChain( + trust, ); } - late final _sec_protocol_metadata_copy_peer_public_keyPtr = _lookup< - ffi.NativeFunction< - dispatch_data_t Function(sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_copy_peer_public_key'); - late final _sec_protocol_metadata_copy_peer_public_key = - _sec_protocol_metadata_copy_peer_public_keyPtr - .asFunction(); + late final _SecTrustCopyCertificateChainPtr = + _lookup>( + 'SecTrustCopyCertificateChain'); + late final _SecTrustCopyCertificateChain = _SecTrustCopyCertificateChainPtr + .asFunction(); - int sec_protocol_metadata_get_negotiated_tls_protocol_version( - sec_protocol_metadata_t metadata, - ) { - return _sec_protocol_metadata_get_negotiated_tls_protocol_version( - metadata, - ); - } + late final ffi.Pointer _gGuidCssm = + _lookup('gGuidCssm'); - late final _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr = - _lookup>( - 'sec_protocol_metadata_get_negotiated_tls_protocol_version'); - late final _sec_protocol_metadata_get_negotiated_tls_protocol_version = - _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr - .asFunction(); + CSSM_GUID get gGuidCssm => _gGuidCssm.ref; - int sec_protocol_metadata_get_negotiated_protocol_version( - sec_protocol_metadata_t metadata, - ) { - return _sec_protocol_metadata_get_negotiated_protocol_version( - metadata, - ); - } + late final ffi.Pointer _gGuidAppleFileDL = + _lookup('gGuidAppleFileDL'); - late final _sec_protocol_metadata_get_negotiated_protocol_versionPtr = - _lookup>( - 'sec_protocol_metadata_get_negotiated_protocol_version'); - late final _sec_protocol_metadata_get_negotiated_protocol_version = - _sec_protocol_metadata_get_negotiated_protocol_versionPtr - .asFunction(); + CSSM_GUID get gGuidAppleFileDL => _gGuidAppleFileDL.ref; - int sec_protocol_metadata_get_negotiated_tls_ciphersuite( - sec_protocol_metadata_t metadata, + late final ffi.Pointer _gGuidAppleCSP = + _lookup('gGuidAppleCSP'); + + CSSM_GUID get gGuidAppleCSP => _gGuidAppleCSP.ref; + + late final ffi.Pointer _gGuidAppleCSPDL = + _lookup('gGuidAppleCSPDL'); + + CSSM_GUID get gGuidAppleCSPDL => _gGuidAppleCSPDL.ref; + + late final ffi.Pointer _gGuidAppleX509CL = + _lookup('gGuidAppleX509CL'); + + CSSM_GUID get gGuidAppleX509CL => _gGuidAppleX509CL.ref; + + late final ffi.Pointer _gGuidAppleX509TP = + _lookup('gGuidAppleX509TP'); + + CSSM_GUID get gGuidAppleX509TP => _gGuidAppleX509TP.ref; + + late final ffi.Pointer _gGuidAppleLDAPDL = + _lookup('gGuidAppleLDAPDL'); + + CSSM_GUID get gGuidAppleLDAPDL => _gGuidAppleLDAPDL.ref; + + late final ffi.Pointer _gGuidAppleDotMacTP = + _lookup('gGuidAppleDotMacTP'); + + CSSM_GUID get gGuidAppleDotMacTP => _gGuidAppleDotMacTP.ref; + + late final ffi.Pointer _gGuidAppleSdCSPDL = + _lookup('gGuidAppleSdCSPDL'); + + CSSM_GUID get gGuidAppleSdCSPDL => _gGuidAppleSdCSPDL.ref; + + late final ffi.Pointer _gGuidAppleDotMacDL = + _lookup('gGuidAppleDotMacDL'); + + CSSM_GUID get gGuidAppleDotMacDL => _gGuidAppleDotMacDL.ref; + + void cssmPerror( + ffi.Pointer how, + int error, ) { - return _sec_protocol_metadata_get_negotiated_tls_ciphersuite( - metadata, + return _cssmPerror( + how, + error, ); } - late final _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr = - _lookup>( - 'sec_protocol_metadata_get_negotiated_tls_ciphersuite'); - late final _sec_protocol_metadata_get_negotiated_tls_ciphersuite = - _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr - .asFunction(); + late final _cssmPerrorPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, CSSM_RETURN)>>('cssmPerror'); + late final _cssmPerror = + _cssmPerrorPtr.asFunction, int)>(); - int sec_protocol_metadata_get_negotiated_ciphersuite( - sec_protocol_metadata_t metadata, + bool cssmOidToAlg( + ffi.Pointer oid, + ffi.Pointer alg, ) { - return _sec_protocol_metadata_get_negotiated_ciphersuite( - metadata, + return _cssmOidToAlg( + oid, + alg, ); } - late final _sec_protocol_metadata_get_negotiated_ciphersuitePtr = _lookup< - ffi.NativeFunction>( - 'sec_protocol_metadata_get_negotiated_ciphersuite'); - late final _sec_protocol_metadata_get_negotiated_ciphersuite = - _sec_protocol_metadata_get_negotiated_ciphersuitePtr - .asFunction(); + late final _cssmOidToAlgPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>('cssmOidToAlg'); + late final _cssmOidToAlg = _cssmOidToAlgPtr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - bool sec_protocol_metadata_get_early_data_accepted( - sec_protocol_metadata_t metadata, + ffi.Pointer cssmAlgToOid( + int algId, ) { - return _sec_protocol_metadata_get_early_data_accepted( - metadata, + return _cssmAlgToOid( + algId, ); } - late final _sec_protocol_metadata_get_early_data_acceptedPtr = - _lookup>( - 'sec_protocol_metadata_get_early_data_accepted'); - late final _sec_protocol_metadata_get_early_data_accepted = - _sec_protocol_metadata_get_early_data_acceptedPtr - .asFunction(); + late final _cssmAlgToOidPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(CSSM_ALGORITHMS)>>('cssmAlgToOid'); + late final _cssmAlgToOid = + _cssmAlgToOidPtr.asFunction Function(int)>(); - bool sec_protocol_metadata_access_peer_certificate_chain( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + int SecTrustSetOptions( + SecTrustRef trustRef, + int options, ) { - return _sec_protocol_metadata_access_peer_certificate_chain( - metadata, - handler, + return _SecTrustSetOptions( + trustRef, + options, ); } - late final _sec_protocol_metadata_access_peer_certificate_chainPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_peer_certificate_chain'); - late final _sec_protocol_metadata_access_peer_certificate_chain = - _sec_protocol_metadata_access_peer_certificate_chainPtr.asFunction< - bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + late final _SecTrustSetOptionsPtr = + _lookup>( + 'SecTrustSetOptions'); + late final _SecTrustSetOptions = + _SecTrustSetOptionsPtr.asFunction(); - bool sec_protocol_metadata_access_ocsp_response( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + int SecTrustSetParameters( + SecTrustRef trustRef, + int action, + CFDataRef actionData, ) { - return _sec_protocol_metadata_access_ocsp_response( - metadata, - handler, + return _SecTrustSetParameters( + trustRef, + action, + actionData, ); } - late final _sec_protocol_metadata_access_ocsp_responsePtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_ocsp_response'); - late final _sec_protocol_metadata_access_ocsp_response = - _sec_protocol_metadata_access_ocsp_responsePtr.asFunction< - bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + late final _SecTrustSetParametersPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, CSSM_TP_ACTION, + CFDataRef)>>('SecTrustSetParameters'); + late final _SecTrustSetParameters = _SecTrustSetParametersPtr.asFunction< + int Function(SecTrustRef, int, CFDataRef)>(); - bool sec_protocol_metadata_access_supported_signature_algorithms( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + int SecTrustSetKeychains( + SecTrustRef trust, + CFTypeRef keychainOrArray, ) { - return _sec_protocol_metadata_access_supported_signature_algorithms( - metadata, - handler, + return _SecTrustSetKeychains( + trust, + keychainOrArray, ); } - late final _sec_protocol_metadata_access_supported_signature_algorithmsPtr = - _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_supported_signature_algorithms'); - late final _sec_protocol_metadata_access_supported_signature_algorithms = - _sec_protocol_metadata_access_supported_signature_algorithmsPtr - .asFunction< - bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + late final _SecTrustSetKeychainsPtr = + _lookup>( + 'SecTrustSetKeychains'); + late final _SecTrustSetKeychains = _SecTrustSetKeychainsPtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); - bool sec_protocol_metadata_access_distinguished_names( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + int SecTrustGetResult( + SecTrustRef trustRef, + ffi.Pointer result, + ffi.Pointer certChain, + ffi.Pointer> statusChain, ) { - return _sec_protocol_metadata_access_distinguished_names( - metadata, - handler, + return _SecTrustGetResult( + trustRef, + result, + certChain, + statusChain, ); } - late final _sec_protocol_metadata_access_distinguished_namesPtr = _lookup< + late final _SecTrustGetResultPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_distinguished_names'); - late final _sec_protocol_metadata_access_distinguished_names = - _sec_protocol_metadata_access_distinguished_namesPtr.asFunction< - bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function( + SecTrustRef, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>( + 'SecTrustGetResult'); + late final _SecTrustGetResult = _SecTrustGetResultPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - bool sec_protocol_metadata_access_pre_shared_keys( - sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + int SecTrustGetCssmResult( + SecTrustRef trust, + ffi.Pointer result, ) { - return _sec_protocol_metadata_access_pre_shared_keys( - metadata, - handler, + return _SecTrustGetCssmResult( + trust, + result, ); } - late final _sec_protocol_metadata_access_pre_shared_keysPtr = _lookup< + late final _SecTrustGetCssmResultPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_pre_shared_keys'); - late final _sec_protocol_metadata_access_pre_shared_keys = - _sec_protocol_metadata_access_pre_shared_keysPtr.asFunction< - bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SecTrustRef, + ffi.Pointer)>>( + 'SecTrustGetCssmResult'); + late final _SecTrustGetCssmResult = _SecTrustGetCssmResultPtr.asFunction< + int Function( + SecTrustRef, ffi.Pointer)>(); - ffi.Pointer sec_protocol_metadata_get_server_name( - sec_protocol_metadata_t metadata, + int SecTrustGetCssmResultCode( + SecTrustRef trust, + ffi.Pointer resultCode, ) { - return _sec_protocol_metadata_get_server_name( - metadata, + return _SecTrustGetCssmResultCode( + trust, + resultCode, ); } - late final _sec_protocol_metadata_get_server_namePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_get_server_name'); - late final _sec_protocol_metadata_get_server_name = - _sec_protocol_metadata_get_server_namePtr.asFunction< - ffi.Pointer Function(sec_protocol_metadata_t)>(); + late final _SecTrustGetCssmResultCodePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetCssmResultCode'); + late final _SecTrustGetCssmResultCode = _SecTrustGetCssmResultCodePtr + .asFunction)>(); - bool sec_protocol_metadata_peers_are_equal( - sec_protocol_metadata_t metadataA, - sec_protocol_metadata_t metadataB, + int SecTrustGetTPHandle( + SecTrustRef trust, + ffi.Pointer handle, ) { - return _sec_protocol_metadata_peers_are_equal( - metadataA, - metadataB, + return _SecTrustGetTPHandle( + trust, + handle, ); } - late final _sec_protocol_metadata_peers_are_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_peers_are_equal'); - late final _sec_protocol_metadata_peers_are_equal = - _sec_protocol_metadata_peers_are_equalPtr.asFunction< - bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); + late final _SecTrustGetTPHandlePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetTPHandle'); + late final _SecTrustGetTPHandle = _SecTrustGetTPHandlePtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - bool sec_protocol_metadata_challenge_parameters_are_equal( - sec_protocol_metadata_t metadataA, - sec_protocol_metadata_t metadataB, + int SecTrustCopyAnchorCertificates( + ffi.Pointer anchors, ) { - return _sec_protocol_metadata_challenge_parameters_are_equal( - metadataA, - metadataB, + return _SecTrustCopyAnchorCertificates( + anchors, ); } - late final _sec_protocol_metadata_challenge_parameters_are_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_challenge_parameters_are_equal'); - late final _sec_protocol_metadata_challenge_parameters_are_equal = - _sec_protocol_metadata_challenge_parameters_are_equalPtr.asFunction< - bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); + late final _SecTrustCopyAnchorCertificatesPtr = + _lookup)>>( + 'SecTrustCopyAnchorCertificates'); + late final _SecTrustCopyAnchorCertificates = + _SecTrustCopyAnchorCertificatesPtr.asFunction< + int Function(ffi.Pointer)>(); - dispatch_data_t sec_protocol_metadata_create_secret( - sec_protocol_metadata_t metadata, - int label_len, - ffi.Pointer label, - int exporter_length, + int SecCertificateGetTypeID() { + return _SecCertificateGetTypeID(); + } + + late final _SecCertificateGetTypeIDPtr = + _lookup>( + 'SecCertificateGetTypeID'); + late final _SecCertificateGetTypeID = + _SecCertificateGetTypeIDPtr.asFunction(); + + SecCertificateRef SecCertificateCreateWithData( + CFAllocatorRef allocator, + CFDataRef data, ) { - return _sec_protocol_metadata_create_secret( - metadata, - label_len, - label, - exporter_length, + return _SecCertificateCreateWithData( + allocator, + data, ); } - late final _sec_protocol_metadata_create_secretPtr = _lookup< + late final _SecCertificateCreateWithDataPtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function( - sec_protocol_metadata_t, - ffi.Size, - ffi.Pointer, - ffi.Size)>>('sec_protocol_metadata_create_secret'); - late final _sec_protocol_metadata_create_secret = - _sec_protocol_metadata_create_secretPtr.asFunction< - dispatch_data_t Function( - sec_protocol_metadata_t, int, ffi.Pointer, int)>(); + SecCertificateRef Function( + CFAllocatorRef, CFDataRef)>>('SecCertificateCreateWithData'); + late final _SecCertificateCreateWithData = _SecCertificateCreateWithDataPtr + .asFunction(); - dispatch_data_t sec_protocol_metadata_create_secret_with_context( - sec_protocol_metadata_t metadata, - int label_len, - ffi.Pointer label, - int context_len, - ffi.Pointer context, - int exporter_length, + CFDataRef SecCertificateCopyData( + SecCertificateRef certificate, ) { - return _sec_protocol_metadata_create_secret_with_context( - metadata, - label_len, - label, - context_len, - context, - exporter_length, + return _SecCertificateCopyData( + certificate, ); } - late final _sec_protocol_metadata_create_secret_with_contextPtr = _lookup< - ffi.NativeFunction< - dispatch_data_t Function( - sec_protocol_metadata_t, - ffi.Size, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size)>>('sec_protocol_metadata_create_secret_with_context'); - late final _sec_protocol_metadata_create_secret_with_context = - _sec_protocol_metadata_create_secret_with_contextPtr.asFunction< - dispatch_data_t Function(sec_protocol_metadata_t, int, - ffi.Pointer, int, ffi.Pointer, int)>(); + late final _SecCertificateCopyDataPtr = + _lookup>( + 'SecCertificateCopyData'); + late final _SecCertificateCopyData = _SecCertificateCopyDataPtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); - bool sec_protocol_options_are_equal( - sec_protocol_options_t optionsA, - sec_protocol_options_t optionsB, + CFStringRef SecCertificateCopySubjectSummary( + SecCertificateRef certificate, ) { - return _sec_protocol_options_are_equal( - optionsA, - optionsB, + return _SecCertificateCopySubjectSummary( + certificate, ); } - late final _sec_protocol_options_are_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(sec_protocol_options_t, - sec_protocol_options_t)>>('sec_protocol_options_are_equal'); - late final _sec_protocol_options_are_equal = - _sec_protocol_options_are_equalPtr.asFunction< - bool Function(sec_protocol_options_t, sec_protocol_options_t)>(); + late final _SecCertificateCopySubjectSummaryPtr = + _lookup>( + 'SecCertificateCopySubjectSummary'); + late final _SecCertificateCopySubjectSummary = + _SecCertificateCopySubjectSummaryPtr.asFunction< + CFStringRef Function(SecCertificateRef)>(); - void sec_protocol_options_set_local_identity( - sec_protocol_options_t options, - sec_identity_t identity, + int SecCertificateCopyCommonName( + SecCertificateRef certificate, + ffi.Pointer commonName, ) { - return _sec_protocol_options_set_local_identity( - options, - identity, + return _SecCertificateCopyCommonName( + certificate, + commonName, ); } - late final _sec_protocol_options_set_local_identityPtr = _lookup< + late final _SecCertificateCopyCommonNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - sec_identity_t)>>('sec_protocol_options_set_local_identity'); - late final _sec_protocol_options_set_local_identity = - _sec_protocol_options_set_local_identityPtr - .asFunction(); + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyCommonName'); + late final _SecCertificateCopyCommonName = _SecCertificateCopyCommonNamePtr + .asFunction)>(); - void sec_protocol_options_append_tls_ciphersuite( - sec_protocol_options_t options, - int ciphersuite, + int SecCertificateCopyEmailAddresses( + SecCertificateRef certificate, + ffi.Pointer emailAddresses, ) { - return _sec_protocol_options_append_tls_ciphersuite( - options, - ciphersuite, + return _SecCertificateCopyEmailAddresses( + certificate, + emailAddresses, ); } - late final _sec_protocol_options_append_tls_ciphersuitePtr = _lookup< + late final _SecCertificateCopyEmailAddressesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite'); - late final _sec_protocol_options_append_tls_ciphersuite = - _sec_protocol_options_append_tls_ciphersuitePtr - .asFunction(); + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyEmailAddresses'); + late final _SecCertificateCopyEmailAddresses = + _SecCertificateCopyEmailAddressesPtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_add_tls_ciphersuite( - sec_protocol_options_t options, - int ciphersuite, + CFDataRef SecCertificateCopyNormalizedIssuerSequence( + SecCertificateRef certificate, ) { - return _sec_protocol_options_add_tls_ciphersuite( - options, - ciphersuite, + return _SecCertificateCopyNormalizedIssuerSequence( + certificate, ); } - late final _sec_protocol_options_add_tls_ciphersuitePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - SSLCipherSuite)>>('sec_protocol_options_add_tls_ciphersuite'); - late final _sec_protocol_options_add_tls_ciphersuite = - _sec_protocol_options_add_tls_ciphersuitePtr - .asFunction(); + late final _SecCertificateCopyNormalizedIssuerSequencePtr = + _lookup>( + 'SecCertificateCopyNormalizedIssuerSequence'); + late final _SecCertificateCopyNormalizedIssuerSequence = + _SecCertificateCopyNormalizedIssuerSequencePtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); - void sec_protocol_options_append_tls_ciphersuite_group( - sec_protocol_options_t options, - int group, + CFDataRef SecCertificateCopyNormalizedSubjectSequence( + SecCertificateRef certificate, ) { - return _sec_protocol_options_append_tls_ciphersuite_group( - options, - group, + return _SecCertificateCopyNormalizedSubjectSequence( + certificate, ); } - late final _sec_protocol_options_append_tls_ciphersuite_groupPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite_group'); - late final _sec_protocol_options_append_tls_ciphersuite_group = - _sec_protocol_options_append_tls_ciphersuite_groupPtr - .asFunction(); + late final _SecCertificateCopyNormalizedSubjectSequencePtr = + _lookup>( + 'SecCertificateCopyNormalizedSubjectSequence'); + late final _SecCertificateCopyNormalizedSubjectSequence = + _SecCertificateCopyNormalizedSubjectSequencePtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); - void sec_protocol_options_add_tls_ciphersuite_group( - sec_protocol_options_t options, - int group, + SecKeyRef SecCertificateCopyKey( + SecCertificateRef certificate, ) { - return _sec_protocol_options_add_tls_ciphersuite_group( - options, - group, + return _SecCertificateCopyKey( + certificate, ); } - late final _sec_protocol_options_add_tls_ciphersuite_groupPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_add_tls_ciphersuite_group'); - late final _sec_protocol_options_add_tls_ciphersuite_group = - _sec_protocol_options_add_tls_ciphersuite_groupPtr - .asFunction(); + late final _SecCertificateCopyKeyPtr = + _lookup>( + 'SecCertificateCopyKey'); + late final _SecCertificateCopyKey = _SecCertificateCopyKeyPtr.asFunction< + SecKeyRef Function(SecCertificateRef)>(); - void sec_protocol_options_set_tls_min_version( - sec_protocol_options_t options, - int version, + int SecCertificateCopyPublicKey( + SecCertificateRef certificate, + ffi.Pointer key, ) { - return _sec_protocol_options_set_tls_min_version( - options, - version, + return _SecCertificateCopyPublicKey( + certificate, + key, ); } - late final _sec_protocol_options_set_tls_min_versionPtr = _lookup< + late final _SecCertificateCopyPublicKeyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_set_tls_min_version'); - late final _sec_protocol_options_set_tls_min_version = - _sec_protocol_options_set_tls_min_versionPtr - .asFunction(); + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyPublicKey'); + late final _SecCertificateCopyPublicKey = _SecCertificateCopyPublicKeyPtr + .asFunction)>(); - void sec_protocol_options_set_min_tls_protocol_version( - sec_protocol_options_t options, - int version, + CFDataRef SecCertificateCopySerialNumberData( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _sec_protocol_options_set_min_tls_protocol_version( - options, - version, + return _SecCertificateCopySerialNumberData( + certificate, + error, ); } - late final _sec_protocol_options_set_min_tls_protocol_versionPtr = _lookup< + late final _SecCertificateCopySerialNumberDataPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_set_min_tls_protocol_version'); - late final _sec_protocol_options_set_min_tls_protocol_version = - _sec_protocol_options_set_min_tls_protocol_versionPtr - .asFunction(); + CFDataRef Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopySerialNumberData'); + late final _SecCertificateCopySerialNumberData = + _SecCertificateCopySerialNumberDataPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - int sec_protocol_options_get_default_min_tls_protocol_version() { - return _sec_protocol_options_get_default_min_tls_protocol_version(); + CFDataRef SecCertificateCopySerialNumber( + SecCertificateRef certificate, + ffi.Pointer error, + ) { + return _SecCertificateCopySerialNumber( + certificate, + error, + ); } - late final _sec_protocol_options_get_default_min_tls_protocol_versionPtr = - _lookup>( - 'sec_protocol_options_get_default_min_tls_protocol_version'); - late final _sec_protocol_options_get_default_min_tls_protocol_version = - _sec_protocol_options_get_default_min_tls_protocol_versionPtr - .asFunction(); + late final _SecCertificateCopySerialNumberPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopySerialNumber'); + late final _SecCertificateCopySerialNumber = + _SecCertificateCopySerialNumberPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - int sec_protocol_options_get_default_min_dtls_protocol_version() { - return _sec_protocol_options_get_default_min_dtls_protocol_version(); + int SecCertificateCreateFromData( + ffi.Pointer data, + int type, + int encoding, + ffi.Pointer certificate, + ) { + return _SecCertificateCreateFromData( + data, + type, + encoding, + certificate, + ); } - late final _sec_protocol_options_get_default_min_dtls_protocol_versionPtr = - _lookup>( - 'sec_protocol_options_get_default_min_dtls_protocol_version'); - late final _sec_protocol_options_get_default_min_dtls_protocol_version = - _sec_protocol_options_get_default_min_dtls_protocol_versionPtr - .asFunction(); + late final _SecCertificateCreateFromDataPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + ffi.Pointer, + CSSM_CERT_TYPE, + CSSM_CERT_ENCODING, + ffi.Pointer)>>('SecCertificateCreateFromData'); + late final _SecCertificateCreateFromData = + _SecCertificateCreateFromDataPtr.asFunction< + int Function(ffi.Pointer, int, int, + ffi.Pointer)>(); - void sec_protocol_options_set_tls_max_version( - sec_protocol_options_t options, - int version, + int SecCertificateAddToKeychain( + SecCertificateRef certificate, + SecKeychainRef keychain, ) { - return _sec_protocol_options_set_tls_max_version( - options, - version, + return _SecCertificateAddToKeychain( + certificate, + keychain, ); } - late final _sec_protocol_options_set_tls_max_versionPtr = _lookup< + late final _SecCertificateAddToKeychainPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_set_tls_max_version'); - late final _sec_protocol_options_set_tls_max_version = - _sec_protocol_options_set_tls_max_versionPtr - .asFunction(); + OSStatus Function(SecCertificateRef, + SecKeychainRef)>>('SecCertificateAddToKeychain'); + late final _SecCertificateAddToKeychain = _SecCertificateAddToKeychainPtr + .asFunction(); - void sec_protocol_options_set_max_tls_protocol_version( - sec_protocol_options_t options, - int version, + int SecCertificateGetData( + SecCertificateRef certificate, + CSSM_DATA_PTR data, ) { - return _sec_protocol_options_set_max_tls_protocol_version( - options, - version, + return _SecCertificateGetData( + certificate, + data, ); } - late final _sec_protocol_options_set_max_tls_protocol_versionPtr = _lookup< + late final _SecCertificateGetDataPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_set_max_tls_protocol_version'); - late final _sec_protocol_options_set_max_tls_protocol_version = - _sec_protocol_options_set_max_tls_protocol_versionPtr - .asFunction(); + OSStatus Function( + SecCertificateRef, CSSM_DATA_PTR)>>('SecCertificateGetData'); + late final _SecCertificateGetData = _SecCertificateGetDataPtr.asFunction< + int Function(SecCertificateRef, CSSM_DATA_PTR)>(); - int sec_protocol_options_get_default_max_tls_protocol_version() { - return _sec_protocol_options_get_default_max_tls_protocol_version(); + int SecCertificateGetType( + SecCertificateRef certificate, + ffi.Pointer certificateType, + ) { + return _SecCertificateGetType( + certificate, + certificateType, + ); } - late final _sec_protocol_options_get_default_max_tls_protocol_versionPtr = - _lookup>( - 'sec_protocol_options_get_default_max_tls_protocol_version'); - late final _sec_protocol_options_get_default_max_tls_protocol_version = - _sec_protocol_options_get_default_max_tls_protocol_versionPtr - .asFunction(); + late final _SecCertificateGetTypePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateGetType'); + late final _SecCertificateGetType = _SecCertificateGetTypePtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); - int sec_protocol_options_get_default_max_dtls_protocol_version() { - return _sec_protocol_options_get_default_max_dtls_protocol_version(); + int SecCertificateGetSubject( + SecCertificateRef certificate, + ffi.Pointer> subject, + ) { + return _SecCertificateGetSubject( + certificate, + subject, + ); } - late final _sec_protocol_options_get_default_max_dtls_protocol_versionPtr = - _lookup>( - 'sec_protocol_options_get_default_max_dtls_protocol_version'); - late final _sec_protocol_options_get_default_max_dtls_protocol_version = - _sec_protocol_options_get_default_max_dtls_protocol_versionPtr - .asFunction(); + late final _SecCertificateGetSubjectPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer>)>>( + 'SecCertificateGetSubject'); + late final _SecCertificateGetSubject = + _SecCertificateGetSubjectPtr.asFunction< + int Function( + SecCertificateRef, ffi.Pointer>)>(); - bool sec_protocol_options_get_enable_encrypted_client_hello( - sec_protocol_options_t options, + int SecCertificateGetIssuer( + SecCertificateRef certificate, + ffi.Pointer> issuer, ) { - return _sec_protocol_options_get_enable_encrypted_client_hello( - options, + return _SecCertificateGetIssuer( + certificate, + issuer, ); } - late final _sec_protocol_options_get_enable_encrypted_client_helloPtr = - _lookup>( - 'sec_protocol_options_get_enable_encrypted_client_hello'); - late final _sec_protocol_options_get_enable_encrypted_client_hello = - _sec_protocol_options_get_enable_encrypted_client_helloPtr - .asFunction(); + late final _SecCertificateGetIssuerPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer>)>>( + 'SecCertificateGetIssuer'); + late final _SecCertificateGetIssuer = _SecCertificateGetIssuerPtr.asFunction< + int Function( + SecCertificateRef, ffi.Pointer>)>(); - bool sec_protocol_options_get_quic_use_legacy_codepoint( - sec_protocol_options_t options, + int SecCertificateGetCLHandle( + SecCertificateRef certificate, + ffi.Pointer clHandle, ) { - return _sec_protocol_options_get_quic_use_legacy_codepoint( - options, + return _SecCertificateGetCLHandle( + certificate, + clHandle, ); } - late final _sec_protocol_options_get_quic_use_legacy_codepointPtr = - _lookup>( - 'sec_protocol_options_get_quic_use_legacy_codepoint'); - late final _sec_protocol_options_get_quic_use_legacy_codepoint = - _sec_protocol_options_get_quic_use_legacy_codepointPtr - .asFunction(); + late final _SecCertificateGetCLHandlePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateGetCLHandle'); + late final _SecCertificateGetCLHandle = + _SecCertificateGetCLHandlePtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_add_tls_application_protocol( - sec_protocol_options_t options, - ffi.Pointer application_protocol, + int SecCertificateGetAlgorithmID( + SecCertificateRef certificate, + ffi.Pointer> algid, ) { - return _sec_protocol_options_add_tls_application_protocol( - options, - application_protocol, + return _SecCertificateGetAlgorithmID( + certificate, + algid, ); } - late final _sec_protocol_options_add_tls_application_protocolPtr = _lookup< + late final _SecCertificateGetAlgorithmIDPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - sec_protocol_options_t, ffi.Pointer)>>( - 'sec_protocol_options_add_tls_application_protocol'); - late final _sec_protocol_options_add_tls_application_protocol = - _sec_protocol_options_add_tls_application_protocolPtr.asFunction< - void Function(sec_protocol_options_t, ffi.Pointer)>(); + OSStatus Function( + SecCertificateRef, ffi.Pointer>)>>( + 'SecCertificateGetAlgorithmID'); + late final _SecCertificateGetAlgorithmID = + _SecCertificateGetAlgorithmIDPtr.asFunction< + int Function( + SecCertificateRef, ffi.Pointer>)>(); - void sec_protocol_options_set_tls_server_name( - sec_protocol_options_t options, - ffi.Pointer server_name, + int SecCertificateCopyPreference( + CFStringRef name, + int keyUsage, + ffi.Pointer certificate, ) { - return _sec_protocol_options_set_tls_server_name( - options, - server_name, + return _SecCertificateCopyPreference( + name, + keyUsage, + certificate, ); } - late final _sec_protocol_options_set_tls_server_namePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_options_t, ffi.Pointer)>>( - 'sec_protocol_options_set_tls_server_name'); - late final _sec_protocol_options_set_tls_server_name = - _sec_protocol_options_set_tls_server_namePtr.asFunction< - void Function(sec_protocol_options_t, ffi.Pointer)>(); + late final _SecCertificateCopyPreferencePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(CFStringRef, uint32, + ffi.Pointer)>>('SecCertificateCopyPreference'); + late final _SecCertificateCopyPreference = + _SecCertificateCopyPreferencePtr.asFunction< + int Function(CFStringRef, int, ffi.Pointer)>(); - void sec_protocol_options_set_tls_diffie_hellman_parameters( - sec_protocol_options_t options, - dispatch_data_t params, + SecCertificateRef SecCertificateCopyPreferred( + CFStringRef name, + CFArrayRef keyUsage, ) { - return _sec_protocol_options_set_tls_diffie_hellman_parameters( - options, - params, + return _SecCertificateCopyPreferred( + name, + keyUsage, ); } - late final _sec_protocol_options_set_tls_diffie_hellman_parametersPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( - 'sec_protocol_options_set_tls_diffie_hellman_parameters'); - late final _sec_protocol_options_set_tls_diffie_hellman_parameters = - _sec_protocol_options_set_tls_diffie_hellman_parametersPtr - .asFunction(); + late final _SecCertificateCopyPreferredPtr = _lookup< + ffi.NativeFunction< + SecCertificateRef Function( + CFStringRef, CFArrayRef)>>('SecCertificateCopyPreferred'); + late final _SecCertificateCopyPreferred = _SecCertificateCopyPreferredPtr + .asFunction(); - void sec_protocol_options_add_pre_shared_key( - sec_protocol_options_t options, - dispatch_data_t psk, - dispatch_data_t psk_identity, + int SecCertificateSetPreference( + SecCertificateRef certificate, + CFStringRef name, + int keyUsage, + CFDateRef date, ) { - return _sec_protocol_options_add_pre_shared_key( - options, - psk, - psk_identity, + return _SecCertificateSetPreference( + certificate, + name, + keyUsage, + date, ); } - late final _sec_protocol_options_add_pre_shared_keyPtr = _lookup< + late final _SecCertificateSetPreferencePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, dispatch_data_t, - dispatch_data_t)>>('sec_protocol_options_add_pre_shared_key'); - late final _sec_protocol_options_add_pre_shared_key = - _sec_protocol_options_add_pre_shared_keyPtr.asFunction< - void Function( - sec_protocol_options_t, dispatch_data_t, dispatch_data_t)>(); + OSStatus Function(SecCertificateRef, CFStringRef, uint32, + CFDateRef)>>('SecCertificateSetPreference'); + late final _SecCertificateSetPreference = + _SecCertificateSetPreferencePtr.asFunction< + int Function(SecCertificateRef, CFStringRef, int, CFDateRef)>(); - void sec_protocol_options_set_tls_pre_shared_key_identity_hint( - sec_protocol_options_t options, - dispatch_data_t psk_identity_hint, + int SecCertificateSetPreferred( + SecCertificateRef certificate, + CFStringRef name, + CFArrayRef keyUsage, ) { - return _sec_protocol_options_set_tls_pre_shared_key_identity_hint( - options, - psk_identity_hint, + return _SecCertificateSetPreferred( + certificate, + name, + keyUsage, ); } - late final _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( - 'sec_protocol_options_set_tls_pre_shared_key_identity_hint'); - late final _sec_protocol_options_set_tls_pre_shared_key_identity_hint = - _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr - .asFunction(); + late final _SecCertificateSetPreferredPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, CFStringRef, + CFArrayRef)>>('SecCertificateSetPreferred'); + late final _SecCertificateSetPreferred = _SecCertificateSetPreferredPtr + .asFunction(); - void sec_protocol_options_set_pre_shared_key_selection_block( - sec_protocol_options_t options, - sec_protocol_pre_shared_key_selection_t psk_selection_block, - dispatch_queue_t psk_selection_queue, - ) { - return _sec_protocol_options_set_pre_shared_key_selection_block( - options, - psk_selection_block, - psk_selection_queue, - ); - } + late final ffi.Pointer _kSecPropertyKeyType = + _lookup('kSecPropertyKeyType'); - late final _sec_protocol_options_set_pre_shared_key_selection_blockPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_options_t, - sec_protocol_pre_shared_key_selection_t, - dispatch_queue_t)>>( - 'sec_protocol_options_set_pre_shared_key_selection_block'); - late final _sec_protocol_options_set_pre_shared_key_selection_block = - _sec_protocol_options_set_pre_shared_key_selection_blockPtr.asFunction< - void Function(sec_protocol_options_t, - sec_protocol_pre_shared_key_selection_t, dispatch_queue_t)>(); + CFStringRef get kSecPropertyKeyType => _kSecPropertyKeyType.value; - void sec_protocol_options_set_tls_tickets_enabled( - sec_protocol_options_t options, - bool tickets_enabled, - ) { - return _sec_protocol_options_set_tls_tickets_enabled( - options, - tickets_enabled, - ); - } + set kSecPropertyKeyType(CFStringRef value) => + _kSecPropertyKeyType.value = value; - late final _sec_protocol_options_set_tls_tickets_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_tickets_enabled'); - late final _sec_protocol_options_set_tls_tickets_enabled = - _sec_protocol_options_set_tls_tickets_enabledPtr - .asFunction(); + late final ffi.Pointer _kSecPropertyKeyLabel = + _lookup('kSecPropertyKeyLabel'); - void sec_protocol_options_set_tls_is_fallback_attempt( - sec_protocol_options_t options, - bool is_fallback_attempt, - ) { - return _sec_protocol_options_set_tls_is_fallback_attempt( - options, - is_fallback_attempt, - ); - } + CFStringRef get kSecPropertyKeyLabel => _kSecPropertyKeyLabel.value; - late final _sec_protocol_options_set_tls_is_fallback_attemptPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_is_fallback_attempt'); - late final _sec_protocol_options_set_tls_is_fallback_attempt = - _sec_protocol_options_set_tls_is_fallback_attemptPtr - .asFunction(); + set kSecPropertyKeyLabel(CFStringRef value) => + _kSecPropertyKeyLabel.value = value; - void sec_protocol_options_set_tls_resumption_enabled( - sec_protocol_options_t options, - bool resumption_enabled, + late final ffi.Pointer _kSecPropertyKeyLocalizedLabel = + _lookup('kSecPropertyKeyLocalizedLabel'); + + CFStringRef get kSecPropertyKeyLocalizedLabel => + _kSecPropertyKeyLocalizedLabel.value; + + set kSecPropertyKeyLocalizedLabel(CFStringRef value) => + _kSecPropertyKeyLocalizedLabel.value = value; + + late final ffi.Pointer _kSecPropertyKeyValue = + _lookup('kSecPropertyKeyValue'); + + CFStringRef get kSecPropertyKeyValue => _kSecPropertyKeyValue.value; + + set kSecPropertyKeyValue(CFStringRef value) => + _kSecPropertyKeyValue.value = value; + + late final ffi.Pointer _kSecPropertyTypeWarning = + _lookup('kSecPropertyTypeWarning'); + + CFStringRef get kSecPropertyTypeWarning => _kSecPropertyTypeWarning.value; + + set kSecPropertyTypeWarning(CFStringRef value) => + _kSecPropertyTypeWarning.value = value; + + late final ffi.Pointer _kSecPropertyTypeSuccess = + _lookup('kSecPropertyTypeSuccess'); + + CFStringRef get kSecPropertyTypeSuccess => _kSecPropertyTypeSuccess.value; + + set kSecPropertyTypeSuccess(CFStringRef value) => + _kSecPropertyTypeSuccess.value = value; + + late final ffi.Pointer _kSecPropertyTypeSection = + _lookup('kSecPropertyTypeSection'); + + CFStringRef get kSecPropertyTypeSection => _kSecPropertyTypeSection.value; + + set kSecPropertyTypeSection(CFStringRef value) => + _kSecPropertyTypeSection.value = value; + + late final ffi.Pointer _kSecPropertyTypeData = + _lookup('kSecPropertyTypeData'); + + CFStringRef get kSecPropertyTypeData => _kSecPropertyTypeData.value; + + set kSecPropertyTypeData(CFStringRef value) => + _kSecPropertyTypeData.value = value; + + late final ffi.Pointer _kSecPropertyTypeString = + _lookup('kSecPropertyTypeString'); + + CFStringRef get kSecPropertyTypeString => _kSecPropertyTypeString.value; + + set kSecPropertyTypeString(CFStringRef value) => + _kSecPropertyTypeString.value = value; + + late final ffi.Pointer _kSecPropertyTypeURL = + _lookup('kSecPropertyTypeURL'); + + CFStringRef get kSecPropertyTypeURL => _kSecPropertyTypeURL.value; + + set kSecPropertyTypeURL(CFStringRef value) => + _kSecPropertyTypeURL.value = value; + + late final ffi.Pointer _kSecPropertyTypeDate = + _lookup('kSecPropertyTypeDate'); + + CFStringRef get kSecPropertyTypeDate => _kSecPropertyTypeDate.value; + + set kSecPropertyTypeDate(CFStringRef value) => + _kSecPropertyTypeDate.value = value; + + late final ffi.Pointer _kSecPropertyTypeArray = + _lookup('kSecPropertyTypeArray'); + + CFStringRef get kSecPropertyTypeArray => _kSecPropertyTypeArray.value; + + set kSecPropertyTypeArray(CFStringRef value) => + _kSecPropertyTypeArray.value = value; + + late final ffi.Pointer _kSecPropertyTypeNumber = + _lookup('kSecPropertyTypeNumber'); + + CFStringRef get kSecPropertyTypeNumber => _kSecPropertyTypeNumber.value; + + set kSecPropertyTypeNumber(CFStringRef value) => + _kSecPropertyTypeNumber.value = value; + + CFDictionaryRef SecCertificateCopyValues( + SecCertificateRef certificate, + CFArrayRef keys, + ffi.Pointer error, ) { - return _sec_protocol_options_set_tls_resumption_enabled( - options, - resumption_enabled, + return _SecCertificateCopyValues( + certificate, + keys, + error, ); } - late final _sec_protocol_options_set_tls_resumption_enabledPtr = _lookup< + late final _SecCertificateCopyValuesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_resumption_enabled'); - late final _sec_protocol_options_set_tls_resumption_enabled = - _sec_protocol_options_set_tls_resumption_enabledPtr - .asFunction(); + CFDictionaryRef Function(SecCertificateRef, CFArrayRef, + ffi.Pointer)>>('SecCertificateCopyValues'); + late final _SecCertificateCopyValues = + _SecCertificateCopyValuesPtr.asFunction< + CFDictionaryRef Function( + SecCertificateRef, CFArrayRef, ffi.Pointer)>(); - void sec_protocol_options_set_tls_false_start_enabled( - sec_protocol_options_t options, - bool false_start_enabled, + CFStringRef SecCertificateCopyLongDescription( + CFAllocatorRef alloc, + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _sec_protocol_options_set_tls_false_start_enabled( - options, - false_start_enabled, + return _SecCertificateCopyLongDescription( + alloc, + certificate, + error, ); } - late final _sec_protocol_options_set_tls_false_start_enabledPtr = _lookup< + late final _SecCertificateCopyLongDescriptionPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_false_start_enabled'); - late final _sec_protocol_options_set_tls_false_start_enabled = - _sec_protocol_options_set_tls_false_start_enabledPtr - .asFunction(); + CFStringRef Function(CFAllocatorRef, SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyLongDescription'); + late final _SecCertificateCopyLongDescription = + _SecCertificateCopyLongDescriptionPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_tls_ocsp_enabled( - sec_protocol_options_t options, - bool ocsp_enabled, + CFStringRef SecCertificateCopyShortDescription( + CFAllocatorRef alloc, + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _sec_protocol_options_set_tls_ocsp_enabled( - options, - ocsp_enabled, + return _SecCertificateCopyShortDescription( + alloc, + certificate, + error, ); } - late final _sec_protocol_options_set_tls_ocsp_enabledPtr = _lookup< + late final _SecCertificateCopyShortDescriptionPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_ocsp_enabled'); - late final _sec_protocol_options_set_tls_ocsp_enabled = - _sec_protocol_options_set_tls_ocsp_enabledPtr - .asFunction(); + CFStringRef Function(CFAllocatorRef, SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyShortDescription'); + late final _SecCertificateCopyShortDescription = + _SecCertificateCopyShortDescriptionPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_tls_sct_enabled( - sec_protocol_options_t options, - bool sct_enabled, + CFDataRef SecCertificateCopyNormalizedIssuerContent( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _sec_protocol_options_set_tls_sct_enabled( - options, - sct_enabled, + return _SecCertificateCopyNormalizedIssuerContent( + certificate, + error, ); } - late final _sec_protocol_options_set_tls_sct_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_sct_enabled'); - late final _sec_protocol_options_set_tls_sct_enabled = - _sec_protocol_options_set_tls_sct_enabledPtr - .asFunction(); + late final _SecCertificateCopyNormalizedIssuerContentPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( + 'SecCertificateCopyNormalizedIssuerContent'); + late final _SecCertificateCopyNormalizedIssuerContent = + _SecCertificateCopyNormalizedIssuerContentPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_tls_renegotiation_enabled( - sec_protocol_options_t options, - bool renegotiation_enabled, + CFDataRef SecCertificateCopyNormalizedSubjectContent( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _sec_protocol_options_set_tls_renegotiation_enabled( - options, - renegotiation_enabled, + return _SecCertificateCopyNormalizedSubjectContent( + certificate, + error, ); } - late final _sec_protocol_options_set_tls_renegotiation_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_renegotiation_enabled'); - late final _sec_protocol_options_set_tls_renegotiation_enabled = - _sec_protocol_options_set_tls_renegotiation_enabledPtr - .asFunction(); + late final _SecCertificateCopyNormalizedSubjectContentPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( + 'SecCertificateCopyNormalizedSubjectContent'); + late final _SecCertificateCopyNormalizedSubjectContent = + _SecCertificateCopyNormalizedSubjectContentPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_peer_authentication_required( - sec_protocol_options_t options, - bool peer_authentication_required, - ) { - return _sec_protocol_options_set_peer_authentication_required( - options, - peer_authentication_required, - ); + int SecIdentityGetTypeID() { + return _SecIdentityGetTypeID(); } - late final _sec_protocol_options_set_peer_authentication_requiredPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( - 'sec_protocol_options_set_peer_authentication_required'); - late final _sec_protocol_options_set_peer_authentication_required = - _sec_protocol_options_set_peer_authentication_requiredPtr - .asFunction(); + late final _SecIdentityGetTypeIDPtr = + _lookup>('SecIdentityGetTypeID'); + late final _SecIdentityGetTypeID = + _SecIdentityGetTypeIDPtr.asFunction(); - void sec_protocol_options_set_peer_authentication_optional( - sec_protocol_options_t options, - bool peer_authentication_optional, + int SecIdentityCreateWithCertificate( + CFTypeRef keychainOrArray, + SecCertificateRef certificateRef, + ffi.Pointer identityRef, ) { - return _sec_protocol_options_set_peer_authentication_optional( - options, - peer_authentication_optional, + return _SecIdentityCreateWithCertificate( + keychainOrArray, + certificateRef, + identityRef, ); } - late final _sec_protocol_options_set_peer_authentication_optionalPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( - 'sec_protocol_options_set_peer_authentication_optional'); - late final _sec_protocol_options_set_peer_authentication_optional = - _sec_protocol_options_set_peer_authentication_optionalPtr - .asFunction(); + late final _SecIdentityCreateWithCertificatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + CFTypeRef, SecCertificateRef, ffi.Pointer)>>( + 'SecIdentityCreateWithCertificate'); + late final _SecIdentityCreateWithCertificate = + _SecIdentityCreateWithCertificatePtr.asFunction< + int Function( + CFTypeRef, SecCertificateRef, ffi.Pointer)>(); - void sec_protocol_options_set_enable_encrypted_client_hello( - sec_protocol_options_t options, - bool enable_encrypted_client_hello, + int SecIdentityCopyCertificate( + SecIdentityRef identityRef, + ffi.Pointer certificateRef, ) { - return _sec_protocol_options_set_enable_encrypted_client_hello( - options, - enable_encrypted_client_hello, + return _SecIdentityCopyCertificate( + identityRef, + certificateRef, ); } - late final _sec_protocol_options_set_enable_encrypted_client_helloPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( - 'sec_protocol_options_set_enable_encrypted_client_hello'); - late final _sec_protocol_options_set_enable_encrypted_client_hello = - _sec_protocol_options_set_enable_encrypted_client_helloPtr - .asFunction(); + late final _SecIdentityCopyCertificatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecIdentityRef, + ffi.Pointer)>>('SecIdentityCopyCertificate'); + late final _SecIdentityCopyCertificate = + _SecIdentityCopyCertificatePtr.asFunction< + int Function(SecIdentityRef, ffi.Pointer)>(); - void sec_protocol_options_set_quic_use_legacy_codepoint( - sec_protocol_options_t options, - bool quic_use_legacy_codepoint, + int SecIdentityCopyPrivateKey( + SecIdentityRef identityRef, + ffi.Pointer privateKeyRef, ) { - return _sec_protocol_options_set_quic_use_legacy_codepoint( - options, - quic_use_legacy_codepoint, + return _SecIdentityCopyPrivateKey( + identityRef, + privateKeyRef, ); } - late final _sec_protocol_options_set_quic_use_legacy_codepointPtr = _lookup< + late final _SecIdentityCopyPrivateKeyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_quic_use_legacy_codepoint'); - late final _sec_protocol_options_set_quic_use_legacy_codepoint = - _sec_protocol_options_set_quic_use_legacy_codepointPtr - .asFunction(); + OSStatus Function(SecIdentityRef, + ffi.Pointer)>>('SecIdentityCopyPrivateKey'); + late final _SecIdentityCopyPrivateKey = _SecIdentityCopyPrivateKeyPtr + .asFunction)>(); - void sec_protocol_options_set_key_update_block( - sec_protocol_options_t options, - sec_protocol_key_update_t key_update_block, - dispatch_queue_t key_update_queue, + int SecIdentityCopyPreference( + CFStringRef name, + int keyUsage, + CFArrayRef validIssuers, + ffi.Pointer identity, ) { - return _sec_protocol_options_set_key_update_block( - options, - key_update_block, - key_update_queue, + return _SecIdentityCopyPreference( + name, + keyUsage, + validIssuers, + identity, ); } - late final _sec_protocol_options_set_key_update_blockPtr = _lookup< + late final _SecIdentityCopyPreferencePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, sec_protocol_key_update_t, - dispatch_queue_t)>>('sec_protocol_options_set_key_update_block'); - late final _sec_protocol_options_set_key_update_block = - _sec_protocol_options_set_key_update_blockPtr.asFunction< - void Function(sec_protocol_options_t, sec_protocol_key_update_t, - dispatch_queue_t)>(); - - void sec_protocol_options_set_challenge_block( - sec_protocol_options_t options, - sec_protocol_challenge_t challenge_block, - dispatch_queue_t challenge_queue, + OSStatus Function(CFStringRef, CSSM_KEYUSE, CFArrayRef, + ffi.Pointer)>>('SecIdentityCopyPreference'); + late final _SecIdentityCopyPreference = + _SecIdentityCopyPreferencePtr.asFunction< + int Function( + CFStringRef, int, CFArrayRef, ffi.Pointer)>(); + + SecIdentityRef SecIdentityCopyPreferred( + CFStringRef name, + CFArrayRef keyUsage, + CFArrayRef validIssuers, ) { - return _sec_protocol_options_set_challenge_block( - options, - challenge_block, - challenge_queue, + return _SecIdentityCopyPreferred( + name, + keyUsage, + validIssuers, ); } - late final _sec_protocol_options_set_challenge_blockPtr = _lookup< + late final _SecIdentityCopyPreferredPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, sec_protocol_challenge_t, - dispatch_queue_t)>>('sec_protocol_options_set_challenge_block'); - late final _sec_protocol_options_set_challenge_block = - _sec_protocol_options_set_challenge_blockPtr.asFunction< - void Function(sec_protocol_options_t, sec_protocol_challenge_t, - dispatch_queue_t)>(); + SecIdentityRef Function(CFStringRef, CFArrayRef, + CFArrayRef)>>('SecIdentityCopyPreferred'); + late final _SecIdentityCopyPreferred = + _SecIdentityCopyPreferredPtr.asFunction< + SecIdentityRef Function(CFStringRef, CFArrayRef, CFArrayRef)>(); - void sec_protocol_options_set_verify_block( - sec_protocol_options_t options, - sec_protocol_verify_t verify_block, - dispatch_queue_t verify_block_queue, + int SecIdentitySetPreference( + SecIdentityRef identity, + CFStringRef name, + int keyUsage, ) { - return _sec_protocol_options_set_verify_block( - options, - verify_block, - verify_block_queue, + return _SecIdentitySetPreference( + identity, + name, + keyUsage, ); } - late final _sec_protocol_options_set_verify_blockPtr = _lookup< + late final _SecIdentitySetPreferencePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, sec_protocol_verify_t, - dispatch_queue_t)>>('sec_protocol_options_set_verify_block'); - late final _sec_protocol_options_set_verify_block = - _sec_protocol_options_set_verify_blockPtr.asFunction< - void Function(sec_protocol_options_t, sec_protocol_verify_t, - dispatch_queue_t)>(); - - late final ffi.Pointer _kSSLSessionConfig_default = - _lookup('kSSLSessionConfig_default'); - - CFStringRef get kSSLSessionConfig_default => _kSSLSessionConfig_default.value; - - set kSSLSessionConfig_default(CFStringRef value) => - _kSSLSessionConfig_default.value = value; - - late final ffi.Pointer _kSSLSessionConfig_ATSv1 = - _lookup('kSSLSessionConfig_ATSv1'); - - CFStringRef get kSSLSessionConfig_ATSv1 => _kSSLSessionConfig_ATSv1.value; - - set kSSLSessionConfig_ATSv1(CFStringRef value) => - _kSSLSessionConfig_ATSv1.value = value; - - late final ffi.Pointer _kSSLSessionConfig_ATSv1_noPFS = - _lookup('kSSLSessionConfig_ATSv1_noPFS'); - - CFStringRef get kSSLSessionConfig_ATSv1_noPFS => - _kSSLSessionConfig_ATSv1_noPFS.value; - - set kSSLSessionConfig_ATSv1_noPFS(CFStringRef value) => - _kSSLSessionConfig_ATSv1_noPFS.value = value; - - late final ffi.Pointer _kSSLSessionConfig_standard = - _lookup('kSSLSessionConfig_standard'); - - CFStringRef get kSSLSessionConfig_standard => - _kSSLSessionConfig_standard.value; - - set kSSLSessionConfig_standard(CFStringRef value) => - _kSSLSessionConfig_standard.value = value; - - late final ffi.Pointer _kSSLSessionConfig_RC4_fallback = - _lookup('kSSLSessionConfig_RC4_fallback'); - - CFStringRef get kSSLSessionConfig_RC4_fallback => - _kSSLSessionConfig_RC4_fallback.value; - - set kSSLSessionConfig_RC4_fallback(CFStringRef value) => - _kSSLSessionConfig_RC4_fallback.value = value; - - late final ffi.Pointer _kSSLSessionConfig_TLSv1_fallback = - _lookup('kSSLSessionConfig_TLSv1_fallback'); - - CFStringRef get kSSLSessionConfig_TLSv1_fallback => - _kSSLSessionConfig_TLSv1_fallback.value; - - set kSSLSessionConfig_TLSv1_fallback(CFStringRef value) => - _kSSLSessionConfig_TLSv1_fallback.value = value; - - late final ffi.Pointer _kSSLSessionConfig_TLSv1_RC4_fallback = - _lookup('kSSLSessionConfig_TLSv1_RC4_fallback'); - - CFStringRef get kSSLSessionConfig_TLSv1_RC4_fallback => - _kSSLSessionConfig_TLSv1_RC4_fallback.value; - - set kSSLSessionConfig_TLSv1_RC4_fallback(CFStringRef value) => - _kSSLSessionConfig_TLSv1_RC4_fallback.value = value; - - late final ffi.Pointer _kSSLSessionConfig_legacy = - _lookup('kSSLSessionConfig_legacy'); - - CFStringRef get kSSLSessionConfig_legacy => _kSSLSessionConfig_legacy.value; - - set kSSLSessionConfig_legacy(CFStringRef value) => - _kSSLSessionConfig_legacy.value = value; + OSStatus Function(SecIdentityRef, CFStringRef, + CSSM_KEYUSE)>>('SecIdentitySetPreference'); + late final _SecIdentitySetPreference = _SecIdentitySetPreferencePtr + .asFunction(); - late final ffi.Pointer _kSSLSessionConfig_legacy_DHE = - _lookup('kSSLSessionConfig_legacy_DHE'); + int SecIdentitySetPreferred( + SecIdentityRef identity, + CFStringRef name, + CFArrayRef keyUsage, + ) { + return _SecIdentitySetPreferred( + identity, + name, + keyUsage, + ); + } - CFStringRef get kSSLSessionConfig_legacy_DHE => - _kSSLSessionConfig_legacy_DHE.value; + late final _SecIdentitySetPreferredPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecIdentityRef, CFStringRef, + CFArrayRef)>>('SecIdentitySetPreferred'); + late final _SecIdentitySetPreferred = _SecIdentitySetPreferredPtr.asFunction< + int Function(SecIdentityRef, CFStringRef, CFArrayRef)>(); - set kSSLSessionConfig_legacy_DHE(CFStringRef value) => - _kSSLSessionConfig_legacy_DHE.value = value; + int SecIdentityCopySystemIdentity( + CFStringRef domain, + ffi.Pointer idRef, + ffi.Pointer actualDomain, + ) { + return _SecIdentityCopySystemIdentity( + domain, + idRef, + actualDomain, + ); + } - late final ffi.Pointer _kSSLSessionConfig_anonymous = - _lookup('kSSLSessionConfig_anonymous'); + late final _SecIdentityCopySystemIdentityPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>>('SecIdentityCopySystemIdentity'); + late final _SecIdentityCopySystemIdentity = + _SecIdentityCopySystemIdentityPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>(); - CFStringRef get kSSLSessionConfig_anonymous => - _kSSLSessionConfig_anonymous.value; + int SecIdentitySetSystemIdentity( + CFStringRef domain, + SecIdentityRef idRef, + ) { + return _SecIdentitySetSystemIdentity( + domain, + idRef, + ); + } - set kSSLSessionConfig_anonymous(CFStringRef value) => - _kSSLSessionConfig_anonymous.value = value; + late final _SecIdentitySetSystemIdentityPtr = _lookup< + ffi.NativeFunction>( + 'SecIdentitySetSystemIdentity'); + late final _SecIdentitySetSystemIdentity = _SecIdentitySetSystemIdentityPtr + .asFunction(); - late final ffi.Pointer _kSSLSessionConfig_3DES_fallback = - _lookup('kSSLSessionConfig_3DES_fallback'); + late final ffi.Pointer _kSecIdentityDomainDefault = + _lookup('kSecIdentityDomainDefault'); - CFStringRef get kSSLSessionConfig_3DES_fallback => - _kSSLSessionConfig_3DES_fallback.value; + CFStringRef get kSecIdentityDomainDefault => _kSecIdentityDomainDefault.value; - set kSSLSessionConfig_3DES_fallback(CFStringRef value) => - _kSSLSessionConfig_3DES_fallback.value = value; + set kSecIdentityDomainDefault(CFStringRef value) => + _kSecIdentityDomainDefault.value = value; - late final ffi.Pointer _kSSLSessionConfig_TLSv1_3DES_fallback = - _lookup('kSSLSessionConfig_TLSv1_3DES_fallback'); + late final ffi.Pointer _kSecIdentityDomainKerberosKDC = + _lookup('kSecIdentityDomainKerberosKDC'); - CFStringRef get kSSLSessionConfig_TLSv1_3DES_fallback => - _kSSLSessionConfig_TLSv1_3DES_fallback.value; + CFStringRef get kSecIdentityDomainKerberosKDC => + _kSecIdentityDomainKerberosKDC.value; - set kSSLSessionConfig_TLSv1_3DES_fallback(CFStringRef value) => - _kSSLSessionConfig_TLSv1_3DES_fallback.value = value; + set kSecIdentityDomainKerberosKDC(CFStringRef value) => + _kSecIdentityDomainKerberosKDC.value = value; - int SSLContextGetTypeID() { - return _SSLContextGetTypeID(); + sec_trust_t sec_trust_create( + SecTrustRef trust, + ) { + return _sec_trust_create( + trust, + ); } - late final _SSLContextGetTypeIDPtr = - _lookup>('SSLContextGetTypeID'); - late final _SSLContextGetTypeID = - _SSLContextGetTypeIDPtr.asFunction(); + late final _sec_trust_createPtr = + _lookup>( + 'sec_trust_create'); + late final _sec_trust_create = + _sec_trust_createPtr.asFunction(); - SSLContextRef SSLCreateContext( - CFAllocatorRef alloc, - int protocolSide, - int connectionType, + SecTrustRef sec_trust_copy_ref( + sec_trust_t trust, ) { - return _SSLCreateContext( - alloc, - protocolSide, - connectionType, + return _sec_trust_copy_ref( + trust, ); } - late final _SSLCreateContextPtr = _lookup< - ffi.NativeFunction< - SSLContextRef Function( - CFAllocatorRef, ffi.Int32, ffi.Int32)>>('SSLCreateContext'); - late final _SSLCreateContext = _SSLCreateContextPtr.asFunction< - SSLContextRef Function(CFAllocatorRef, int, int)>(); + late final _sec_trust_copy_refPtr = + _lookup>( + 'sec_trust_copy_ref'); + late final _sec_trust_copy_ref = + _sec_trust_copy_refPtr.asFunction(); - int SSLNewContext( - int isServer, - ffi.Pointer contextPtr, + sec_identity_t sec_identity_create( + SecIdentityRef identity, ) { - return _SSLNewContext( - isServer, - contextPtr, + return _sec_identity_create( + identity, ); } - late final _SSLNewContextPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - Boolean, ffi.Pointer)>>('SSLNewContext'); - late final _SSLNewContext = _SSLNewContextPtr.asFunction< - int Function(int, ffi.Pointer)>(); + late final _sec_identity_createPtr = + _lookup>( + 'sec_identity_create'); + late final _sec_identity_create = _sec_identity_createPtr + .asFunction(); - int SSLDisposeContext( - SSLContextRef context, + sec_identity_t sec_identity_create_with_certificates( + SecIdentityRef identity, + CFArrayRef certificates, ) { - return _SSLDisposeContext( - context, + return _sec_identity_create_with_certificates( + identity, + certificates, ); } - late final _SSLDisposeContextPtr = - _lookup>( - 'SSLDisposeContext'); - late final _SSLDisposeContext = - _SSLDisposeContextPtr.asFunction(); + late final _sec_identity_create_with_certificatesPtr = _lookup< + ffi.NativeFunction< + sec_identity_t Function(SecIdentityRef, + CFArrayRef)>>('sec_identity_create_with_certificates'); + late final _sec_identity_create_with_certificates = + _sec_identity_create_with_certificatesPtr + .asFunction(); - int SSLGetSessionState( - SSLContextRef context, - ffi.Pointer state, + bool sec_identity_access_certificates( + sec_identity_t identity, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLGetSessionState( - context, - state, + return _sec_identity_access_certificates( + identity, + handler, ); } - late final _SSLGetSessionStatePtr = _lookup< + late final _sec_identity_access_certificatesPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetSessionState'); - late final _SSLGetSessionState = _SSLGetSessionStatePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Bool Function(sec_identity_t, + ffi.Pointer<_ObjCBlock>)>>('sec_identity_access_certificates'); + late final _sec_identity_access_certificates = + _sec_identity_access_certificatesPtr + .asFunction)>(); - int SSLSetSessionOption( - SSLContextRef context, - int option, - int value, + SecIdentityRef sec_identity_copy_ref( + sec_identity_t identity, ) { - return _SSLSetSessionOption( - context, - option, - value, + return _sec_identity_copy_ref( + identity, ); } - late final _SSLSetSessionOptionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Int32, Boolean)>>('SSLSetSessionOption'); - late final _SSLSetSessionOption = _SSLSetSessionOptionPtr.asFunction< - int Function(SSLContextRef, int, int)>(); + late final _sec_identity_copy_refPtr = + _lookup>( + 'sec_identity_copy_ref'); + late final _sec_identity_copy_ref = _sec_identity_copy_refPtr + .asFunction(); - int SSLGetSessionOption( - SSLContextRef context, - int option, - ffi.Pointer value, + CFArrayRef sec_identity_copy_certificates_ref( + sec_identity_t identity, ) { - return _SSLGetSessionOption( - context, - option, - value, + return _sec_identity_copy_certificates_ref( + identity, ); } - late final _SSLGetSessionOptionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Int32, - ffi.Pointer)>>('SSLGetSessionOption'); - late final _SSLGetSessionOption = _SSLGetSessionOptionPtr.asFunction< - int Function(SSLContextRef, int, ffi.Pointer)>(); + late final _sec_identity_copy_certificates_refPtr = + _lookup>( + 'sec_identity_copy_certificates_ref'); + late final _sec_identity_copy_certificates_ref = + _sec_identity_copy_certificates_refPtr + .asFunction(); - int SSLSetIOFuncs( - SSLContextRef context, - SSLReadFunc readFunc, - SSLWriteFunc writeFunc, + sec_certificate_t sec_certificate_create( + SecCertificateRef certificate, ) { - return _SSLSetIOFuncs( - context, - readFunc, - writeFunc, + return _sec_certificate_create( + certificate, ); } - late final _SSLSetIOFuncsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, SSLReadFunc, SSLWriteFunc)>>('SSLSetIOFuncs'); - late final _SSLSetIOFuncs = _SSLSetIOFuncsPtr.asFunction< - int Function(SSLContextRef, SSLReadFunc, SSLWriteFunc)>(); + late final _sec_certificate_createPtr = _lookup< + ffi.NativeFunction>( + 'sec_certificate_create'); + late final _sec_certificate_create = _sec_certificate_createPtr + .asFunction(); - int SSLSetSessionConfig( - SSLContextRef context, - CFStringRef config, + SecCertificateRef sec_certificate_copy_ref( + sec_certificate_t certificate, ) { - return _SSLSetSessionConfig( - context, - config, + return _sec_certificate_copy_ref( + certificate, ); } - late final _SSLSetSessionConfigPtr = _lookup< - ffi.NativeFunction>( - 'SSLSetSessionConfig'); - late final _SSLSetSessionConfig = _SSLSetSessionConfigPtr.asFunction< - int Function(SSLContextRef, CFStringRef)>(); + late final _sec_certificate_copy_refPtr = _lookup< + ffi.NativeFunction>( + 'sec_certificate_copy_ref'); + late final _sec_certificate_copy_ref = _sec_certificate_copy_refPtr + .asFunction(); - int SSLSetProtocolVersionMin( - SSLContextRef context, - int minVersion, + ffi.Pointer sec_protocol_metadata_get_negotiated_protocol( + sec_protocol_metadata_t metadata, ) { - return _SSLSetProtocolVersionMin( - context, - minVersion, + return _sec_protocol_metadata_get_negotiated_protocol( + metadata, ); } - late final _SSLSetProtocolVersionMinPtr = - _lookup>( - 'SSLSetProtocolVersionMin'); - late final _SSLSetProtocolVersionMin = _SSLSetProtocolVersionMinPtr - .asFunction(); + late final _sec_protocol_metadata_get_negotiated_protocolPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_get_negotiated_protocol'); + late final _sec_protocol_metadata_get_negotiated_protocol = + _sec_protocol_metadata_get_negotiated_protocolPtr.asFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>(); - int SSLGetProtocolVersionMin( - SSLContextRef context, - ffi.Pointer minVersion, + dispatch_data_t sec_protocol_metadata_copy_peer_public_key( + sec_protocol_metadata_t metadata, ) { - return _SSLGetProtocolVersionMin( - context, - minVersion, + return _sec_protocol_metadata_copy_peer_public_key( + metadata, ); } - late final _SSLGetProtocolVersionMinPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetProtocolVersionMin'); - late final _SSLGetProtocolVersionMin = _SSLGetProtocolVersionMinPtr - .asFunction)>(); + late final _sec_protocol_metadata_copy_peer_public_keyPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_copy_peer_public_key'); + late final _sec_protocol_metadata_copy_peer_public_key = + _sec_protocol_metadata_copy_peer_public_keyPtr + .asFunction(); - int SSLSetProtocolVersionMax( - SSLContextRef context, - int maxVersion, + int sec_protocol_metadata_get_negotiated_tls_protocol_version( + sec_protocol_metadata_t metadata, ) { - return _SSLSetProtocolVersionMax( - context, - maxVersion, + return _sec_protocol_metadata_get_negotiated_tls_protocol_version( + metadata, ); } - late final _SSLSetProtocolVersionMaxPtr = - _lookup>( - 'SSLSetProtocolVersionMax'); - late final _SSLSetProtocolVersionMax = _SSLSetProtocolVersionMaxPtr - .asFunction(); + late final _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr = + _lookup>( + 'sec_protocol_metadata_get_negotiated_tls_protocol_version'); + late final _sec_protocol_metadata_get_negotiated_tls_protocol_version = + _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr + .asFunction(); - int SSLGetProtocolVersionMax( - SSLContextRef context, - ffi.Pointer maxVersion, + int sec_protocol_metadata_get_negotiated_protocol_version( + sec_protocol_metadata_t metadata, ) { - return _SSLGetProtocolVersionMax( - context, - maxVersion, + return _sec_protocol_metadata_get_negotiated_protocol_version( + metadata, ); } - late final _SSLGetProtocolVersionMaxPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetProtocolVersionMax'); - late final _SSLGetProtocolVersionMax = _SSLGetProtocolVersionMaxPtr - .asFunction)>(); + late final _sec_protocol_metadata_get_negotiated_protocol_versionPtr = + _lookup>( + 'sec_protocol_metadata_get_negotiated_protocol_version'); + late final _sec_protocol_metadata_get_negotiated_protocol_version = + _sec_protocol_metadata_get_negotiated_protocol_versionPtr + .asFunction(); - int SSLSetProtocolVersionEnabled( - SSLContextRef context, - int protocol, - int enable, + int sec_protocol_metadata_get_negotiated_tls_ciphersuite( + sec_protocol_metadata_t metadata, ) { - return _SSLSetProtocolVersionEnabled( - context, - protocol, - enable, + return _sec_protocol_metadata_get_negotiated_tls_ciphersuite( + metadata, ); } - late final _SSLSetProtocolVersionEnabledPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Int32, - Boolean)>>('SSLSetProtocolVersionEnabled'); - late final _SSLSetProtocolVersionEnabled = _SSLSetProtocolVersionEnabledPtr - .asFunction(); + late final _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr = + _lookup>( + 'sec_protocol_metadata_get_negotiated_tls_ciphersuite'); + late final _sec_protocol_metadata_get_negotiated_tls_ciphersuite = + _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr + .asFunction(); - int SSLGetProtocolVersionEnabled( - SSLContextRef context, - int protocol, - ffi.Pointer enable, + int sec_protocol_metadata_get_negotiated_ciphersuite( + sec_protocol_metadata_t metadata, ) { - return _SSLGetProtocolVersionEnabled( - context, - protocol, - enable, + return _sec_protocol_metadata_get_negotiated_ciphersuite( + metadata, ); } - late final _SSLGetProtocolVersionEnabledPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Int32, - ffi.Pointer)>>('SSLGetProtocolVersionEnabled'); - late final _SSLGetProtocolVersionEnabled = _SSLGetProtocolVersionEnabledPtr - .asFunction)>(); + late final _sec_protocol_metadata_get_negotiated_ciphersuitePtr = _lookup< + ffi.NativeFunction>( + 'sec_protocol_metadata_get_negotiated_ciphersuite'); + late final _sec_protocol_metadata_get_negotiated_ciphersuite = + _sec_protocol_metadata_get_negotiated_ciphersuitePtr + .asFunction(); - int SSLSetProtocolVersion( - SSLContextRef context, - int version, + bool sec_protocol_metadata_get_early_data_accepted( + sec_protocol_metadata_t metadata, ) { - return _SSLSetProtocolVersion( - context, - version, + return _sec_protocol_metadata_get_early_data_accepted( + metadata, ); } - late final _SSLSetProtocolVersionPtr = - _lookup>( - 'SSLSetProtocolVersion'); - late final _SSLSetProtocolVersion = - _SSLSetProtocolVersionPtr.asFunction(); + late final _sec_protocol_metadata_get_early_data_acceptedPtr = + _lookup>( + 'sec_protocol_metadata_get_early_data_accepted'); + late final _sec_protocol_metadata_get_early_data_accepted = + _sec_protocol_metadata_get_early_data_acceptedPtr + .asFunction(); - int SSLGetProtocolVersion( - SSLContextRef context, - ffi.Pointer protocol, + bool sec_protocol_metadata_access_peer_certificate_chain( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLGetProtocolVersion( - context, - protocol, + return _sec_protocol_metadata_access_peer_certificate_chain( + metadata, + handler, ); } - late final _SSLGetProtocolVersionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetProtocolVersion'); - late final _SSLGetProtocolVersion = _SSLGetProtocolVersionPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + late final _sec_protocol_metadata_access_peer_certificate_chainPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_peer_certificate_chain'); + late final _sec_protocol_metadata_access_peer_certificate_chain = + _sec_protocol_metadata_access_peer_certificate_chainPtr.asFunction< + bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); - int SSLSetCertificate( - SSLContextRef context, - CFArrayRef certRefs, + bool sec_protocol_metadata_access_ocsp_response( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLSetCertificate( - context, - certRefs, + return _sec_protocol_metadata_access_ocsp_response( + metadata, + handler, ); } - late final _SSLSetCertificatePtr = - _lookup>( - 'SSLSetCertificate'); - late final _SSLSetCertificate = _SSLSetCertificatePtr.asFunction< - int Function(SSLContextRef, CFArrayRef)>(); + late final _sec_protocol_metadata_access_ocsp_responsePtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_ocsp_response'); + late final _sec_protocol_metadata_access_ocsp_response = + _sec_protocol_metadata_access_ocsp_responsePtr.asFunction< + bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); - int SSLSetConnection( - SSLContextRef context, - SSLConnectionRef connection, + bool sec_protocol_metadata_access_supported_signature_algorithms( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLSetConnection( - context, - connection, + return _sec_protocol_metadata_access_supported_signature_algorithms( + metadata, + handler, ); } - late final _SSLSetConnectionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, SSLConnectionRef)>>('SSLSetConnection'); - late final _SSLSetConnection = _SSLSetConnectionPtr.asFunction< - int Function(SSLContextRef, SSLConnectionRef)>(); + late final _sec_protocol_metadata_access_supported_signature_algorithmsPtr = + _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_supported_signature_algorithms'); + late final _sec_protocol_metadata_access_supported_signature_algorithms = + _sec_protocol_metadata_access_supported_signature_algorithmsPtr + .asFunction< + bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); - int SSLGetConnection( - SSLContextRef context, - ffi.Pointer connection, + bool sec_protocol_metadata_access_distinguished_names( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLGetConnection( - context, - connection, + return _sec_protocol_metadata_access_distinguished_names( + metadata, + handler, ); } - late final _SSLGetConnectionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetConnection'); - late final _SSLGetConnection = _SSLGetConnectionPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + late final _sec_protocol_metadata_access_distinguished_namesPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_distinguished_names'); + late final _sec_protocol_metadata_access_distinguished_names = + _sec_protocol_metadata_access_distinguished_namesPtr.asFunction< + bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); - int SSLSetPeerDomainName( - SSLContextRef context, - ffi.Pointer peerName, - int peerNameLen, + bool sec_protocol_metadata_access_pre_shared_keys( + sec_protocol_metadata_t metadata, + ffi.Pointer<_ObjCBlock> handler, ) { - return _SSLSetPeerDomainName( - context, - peerName, - peerNameLen, + return _sec_protocol_metadata_access_pre_shared_keys( + metadata, + handler, ); } - late final _SSLSetPeerDomainNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetPeerDomainName'); - late final _SSLSetPeerDomainName = _SSLSetPeerDomainNamePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer, int)>(); + late final _sec_protocol_metadata_access_pre_shared_keysPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( + 'sec_protocol_metadata_access_pre_shared_keys'); + late final _sec_protocol_metadata_access_pre_shared_keys = + _sec_protocol_metadata_access_pre_shared_keysPtr.asFunction< + bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); - int SSLGetPeerDomainNameLength( - SSLContextRef context, - ffi.Pointer peerNameLen, + ffi.Pointer sec_protocol_metadata_get_server_name( + sec_protocol_metadata_t metadata, ) { - return _SSLGetPeerDomainNameLength( - context, - peerNameLen, + return _sec_protocol_metadata_get_server_name( + metadata, ); } - late final _SSLGetPeerDomainNameLengthPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetPeerDomainNameLength'); - late final _SSLGetPeerDomainNameLength = _SSLGetPeerDomainNameLengthPtr - .asFunction)>(); + late final _sec_protocol_metadata_get_server_namePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_get_server_name'); + late final _sec_protocol_metadata_get_server_name = + _sec_protocol_metadata_get_server_namePtr.asFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>(); - int SSLGetPeerDomainName( - SSLContextRef context, - ffi.Pointer peerName, - ffi.Pointer peerNameLen, + bool sec_protocol_metadata_peers_are_equal( + sec_protocol_metadata_t metadataA, + sec_protocol_metadata_t metadataB, ) { - return _SSLGetPeerDomainName( - context, - peerName, - peerNameLen, + return _sec_protocol_metadata_peers_are_equal( + metadataA, + metadataB, ); } - late final _SSLGetPeerDomainNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Pointer)>>('SSLGetPeerDomainName'); - late final _SSLGetPeerDomainName = _SSLGetPeerDomainNamePtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + late final _sec_protocol_metadata_peers_are_equalPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_peers_are_equal'); + late final _sec_protocol_metadata_peers_are_equal = + _sec_protocol_metadata_peers_are_equalPtr.asFunction< + bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); - int SSLCopyRequestedPeerNameLength( - SSLContextRef ctx, - ffi.Pointer peerNameLen, + bool sec_protocol_metadata_challenge_parameters_are_equal( + sec_protocol_metadata_t metadataA, + sec_protocol_metadata_t metadataB, ) { - return _SSLCopyRequestedPeerNameLength( - ctx, - peerNameLen, + return _sec_protocol_metadata_challenge_parameters_are_equal( + metadataA, + metadataB, ); } - late final _SSLCopyRequestedPeerNameLengthPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyRequestedPeerNameLength'); - late final _SSLCopyRequestedPeerNameLength = - _SSLCopyRequestedPeerNameLengthPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + late final _sec_protocol_metadata_challenge_parameters_are_equalPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_challenge_parameters_are_equal'); + late final _sec_protocol_metadata_challenge_parameters_are_equal = + _sec_protocol_metadata_challenge_parameters_are_equalPtr.asFunction< + bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); - int SSLCopyRequestedPeerName( - SSLContextRef context, - ffi.Pointer peerName, - ffi.Pointer peerNameLen, + dispatch_data_t sec_protocol_metadata_create_secret( + sec_protocol_metadata_t metadata, + int label_len, + ffi.Pointer label, + int exporter_length, ) { - return _SSLCopyRequestedPeerName( - context, - peerName, - peerNameLen, + return _sec_protocol_metadata_create_secret( + metadata, + label_len, + label, + exporter_length, ); } - late final _SSLCopyRequestedPeerNamePtr = _lookup< + late final _sec_protocol_metadata_create_secretPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Pointer)>>('SSLCopyRequestedPeerName'); - late final _SSLCopyRequestedPeerName = - _SSLCopyRequestedPeerNamePtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + dispatch_data_t Function( + sec_protocol_metadata_t, + ffi.Size, + ffi.Pointer, + ffi.Size)>>('sec_protocol_metadata_create_secret'); + late final _sec_protocol_metadata_create_secret = + _sec_protocol_metadata_create_secretPtr.asFunction< + dispatch_data_t Function( + sec_protocol_metadata_t, int, ffi.Pointer, int)>(); - int SSLSetDatagramHelloCookie( - SSLContextRef dtlsContext, - ffi.Pointer cookie, - int cookieLen, + dispatch_data_t sec_protocol_metadata_create_secret_with_context( + sec_protocol_metadata_t metadata, + int label_len, + ffi.Pointer label, + int context_len, + ffi.Pointer context, + int exporter_length, ) { - return _SSLSetDatagramHelloCookie( - dtlsContext, - cookie, - cookieLen, + return _sec_protocol_metadata_create_secret_with_context( + metadata, + label_len, + label, + context_len, + context, + exporter_length, ); } - late final _SSLSetDatagramHelloCookiePtr = _lookup< + late final _sec_protocol_metadata_create_secret_with_contextPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetDatagramHelloCookie'); - late final _SSLSetDatagramHelloCookie = _SSLSetDatagramHelloCookiePtr - .asFunction, int)>(); + dispatch_data_t Function( + sec_protocol_metadata_t, + ffi.Size, + ffi.Pointer, + ffi.Size, + ffi.Pointer, + ffi.Size)>>('sec_protocol_metadata_create_secret_with_context'); + late final _sec_protocol_metadata_create_secret_with_context = + _sec_protocol_metadata_create_secret_with_contextPtr.asFunction< + dispatch_data_t Function(sec_protocol_metadata_t, int, + ffi.Pointer, int, ffi.Pointer, int)>(); - int SSLSetMaxDatagramRecordSize( - SSLContextRef dtlsContext, - int maxSize, + bool sec_protocol_options_are_equal( + sec_protocol_options_t optionsA, + sec_protocol_options_t optionsB, ) { - return _SSLSetMaxDatagramRecordSize( - dtlsContext, - maxSize, + return _sec_protocol_options_are_equal( + optionsA, + optionsB, ); } - late final _SSLSetMaxDatagramRecordSizePtr = - _lookup>( - 'SSLSetMaxDatagramRecordSize'); - late final _SSLSetMaxDatagramRecordSize = _SSLSetMaxDatagramRecordSizePtr - .asFunction(); + late final _sec_protocol_options_are_equalPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(sec_protocol_options_t, + sec_protocol_options_t)>>('sec_protocol_options_are_equal'); + late final _sec_protocol_options_are_equal = + _sec_protocol_options_are_equalPtr.asFunction< + bool Function(sec_protocol_options_t, sec_protocol_options_t)>(); - int SSLGetMaxDatagramRecordSize( - SSLContextRef dtlsContext, - ffi.Pointer maxSize, + void sec_protocol_options_set_local_identity( + sec_protocol_options_t options, + sec_identity_t identity, ) { - return _SSLGetMaxDatagramRecordSize( - dtlsContext, - maxSize, + return _sec_protocol_options_set_local_identity( + options, + identity, ); } - late final _SSLGetMaxDatagramRecordSizePtr = _lookup< + late final _sec_protocol_options_set_local_identityPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetMaxDatagramRecordSize'); - late final _SSLGetMaxDatagramRecordSize = _SSLGetMaxDatagramRecordSizePtr - .asFunction)>(); + ffi.Void Function(sec_protocol_options_t, + sec_identity_t)>>('sec_protocol_options_set_local_identity'); + late final _sec_protocol_options_set_local_identity = + _sec_protocol_options_set_local_identityPtr + .asFunction(); - int SSLGetNegotiatedProtocolVersion( - SSLContextRef context, - ffi.Pointer protocol, + void sec_protocol_options_append_tls_ciphersuite( + sec_protocol_options_t options, + int ciphersuite, ) { - return _SSLGetNegotiatedProtocolVersion( - context, - protocol, + return _sec_protocol_options_append_tls_ciphersuite( + options, + ciphersuite, ); } - late final _SSLGetNegotiatedProtocolVersionPtr = _lookup< + late final _sec_protocol_options_append_tls_ciphersuitePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNegotiatedProtocolVersion'); - late final _SSLGetNegotiatedProtocolVersion = - _SSLGetNegotiatedProtocolVersionPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite'); + late final _sec_protocol_options_append_tls_ciphersuite = + _sec_protocol_options_append_tls_ciphersuitePtr + .asFunction(); - int SSLGetNumberSupportedCiphers( - SSLContextRef context, - ffi.Pointer numCiphers, + void sec_protocol_options_add_tls_ciphersuite( + sec_protocol_options_t options, + int ciphersuite, ) { - return _SSLGetNumberSupportedCiphers( - context, - numCiphers, + return _sec_protocol_options_add_tls_ciphersuite( + options, + ciphersuite, ); } - late final _SSLGetNumberSupportedCiphersPtr = _lookup< + late final _sec_protocol_options_add_tls_ciphersuitePtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNumberSupportedCiphers'); - late final _SSLGetNumberSupportedCiphers = _SSLGetNumberSupportedCiphersPtr - .asFunction)>(); + ffi.Void Function(sec_protocol_options_t, + SSLCipherSuite)>>('sec_protocol_options_add_tls_ciphersuite'); + late final _sec_protocol_options_add_tls_ciphersuite = + _sec_protocol_options_add_tls_ciphersuitePtr + .asFunction(); - int SSLGetSupportedCiphers( - SSLContextRef context, - ffi.Pointer ciphers, - ffi.Pointer numCiphers, + void sec_protocol_options_append_tls_ciphersuite_group( + sec_protocol_options_t options, + int group, ) { - return _SSLGetSupportedCiphers( - context, - ciphers, - numCiphers, + return _sec_protocol_options_append_tls_ciphersuite_group( + options, + group, ); } - late final _SSLGetSupportedCiphersPtr = _lookup< + late final _sec_protocol_options_append_tls_ciphersuite_groupPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Pointer)>>('SSLGetSupportedCiphers'); - late final _SSLGetSupportedCiphers = _SSLGetSupportedCiphersPtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite_group'); + late final _sec_protocol_options_append_tls_ciphersuite_group = + _sec_protocol_options_append_tls_ciphersuite_groupPtr + .asFunction(); - int SSLGetNumberEnabledCiphers( - SSLContextRef context, - ffi.Pointer numCiphers, + void sec_protocol_options_add_tls_ciphersuite_group( + sec_protocol_options_t options, + int group, ) { - return _SSLGetNumberEnabledCiphers( - context, - numCiphers, + return _sec_protocol_options_add_tls_ciphersuite_group( + options, + group, ); } - late final _SSLGetNumberEnabledCiphersPtr = _lookup< + late final _sec_protocol_options_add_tls_ciphersuite_groupPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNumberEnabledCiphers'); - late final _SSLGetNumberEnabledCiphers = _SSLGetNumberEnabledCiphersPtr - .asFunction)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_add_tls_ciphersuite_group'); + late final _sec_protocol_options_add_tls_ciphersuite_group = + _sec_protocol_options_add_tls_ciphersuite_groupPtr + .asFunction(); - int SSLSetEnabledCiphers( - SSLContextRef context, - ffi.Pointer ciphers, - int numCiphers, + void sec_protocol_options_set_tls_min_version( + sec_protocol_options_t options, + int version, ) { - return _SSLSetEnabledCiphers( - context, - ciphers, - numCiphers, + return _sec_protocol_options_set_tls_min_version( + options, + version, ); } - late final _SSLSetEnabledCiphersPtr = _lookup< + late final _sec_protocol_options_set_tls_min_versionPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetEnabledCiphers'); - late final _SSLSetEnabledCiphers = _SSLSetEnabledCiphersPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer, int)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_set_tls_min_version'); + late final _sec_protocol_options_set_tls_min_version = + _sec_protocol_options_set_tls_min_versionPtr + .asFunction(); - int SSLGetEnabledCiphers( - SSLContextRef context, - ffi.Pointer ciphers, - ffi.Pointer numCiphers, + void sec_protocol_options_set_min_tls_protocol_version( + sec_protocol_options_t options, + int version, ) { - return _SSLGetEnabledCiphers( - context, - ciphers, - numCiphers, + return _sec_protocol_options_set_min_tls_protocol_version( + options, + version, ); } - late final _SSLGetEnabledCiphersPtr = _lookup< + late final _sec_protocol_options_set_min_tls_protocol_versionPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Pointer)>>('SSLGetEnabledCiphers'); - late final _SSLGetEnabledCiphers = _SSLGetEnabledCiphersPtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_set_min_tls_protocol_version'); + late final _sec_protocol_options_set_min_tls_protocol_version = + _sec_protocol_options_set_min_tls_protocol_versionPtr + .asFunction(); - int SSLSetSessionTicketsEnabled( - SSLContextRef context, - int enabled, - ) { - return _SSLSetSessionTicketsEnabled( - context, - enabled, - ); + int sec_protocol_options_get_default_min_tls_protocol_version() { + return _sec_protocol_options_get_default_min_tls_protocol_version(); } - late final _SSLSetSessionTicketsEnabledPtr = - _lookup>( - 'SSLSetSessionTicketsEnabled'); - late final _SSLSetSessionTicketsEnabled = _SSLSetSessionTicketsEnabledPtr - .asFunction(); + late final _sec_protocol_options_get_default_min_tls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_min_tls_protocol_version'); + late final _sec_protocol_options_get_default_min_tls_protocol_version = + _sec_protocol_options_get_default_min_tls_protocol_versionPtr + .asFunction(); - int SSLSetEnableCertVerify( - SSLContextRef context, - int enableVerify, + int sec_protocol_options_get_default_min_dtls_protocol_version() { + return _sec_protocol_options_get_default_min_dtls_protocol_version(); + } + + late final _sec_protocol_options_get_default_min_dtls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_min_dtls_protocol_version'); + late final _sec_protocol_options_get_default_min_dtls_protocol_version = + _sec_protocol_options_get_default_min_dtls_protocol_versionPtr + .asFunction(); + + void sec_protocol_options_set_tls_max_version( + sec_protocol_options_t options, + int version, ) { - return _SSLSetEnableCertVerify( - context, - enableVerify, + return _sec_protocol_options_set_tls_max_version( + options, + version, ); } - late final _SSLSetEnableCertVerifyPtr = - _lookup>( - 'SSLSetEnableCertVerify'); - late final _SSLSetEnableCertVerify = - _SSLSetEnableCertVerifyPtr.asFunction(); + late final _sec_protocol_options_set_tls_max_versionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_set_tls_max_version'); + late final _sec_protocol_options_set_tls_max_version = + _sec_protocol_options_set_tls_max_versionPtr + .asFunction(); - int SSLGetEnableCertVerify( - SSLContextRef context, - ffi.Pointer enableVerify, + void sec_protocol_options_set_max_tls_protocol_version( + sec_protocol_options_t options, + int version, ) { - return _SSLGetEnableCertVerify( - context, - enableVerify, + return _sec_protocol_options_set_max_tls_protocol_version( + options, + version, ); } - late final _SSLGetEnableCertVerifyPtr = _lookup< + late final _sec_protocol_options_set_max_tls_protocol_versionPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetEnableCertVerify'); - late final _SSLGetEnableCertVerify = _SSLGetEnableCertVerifyPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Int32)>>('sec_protocol_options_set_max_tls_protocol_version'); + late final _sec_protocol_options_set_max_tls_protocol_version = + _sec_protocol_options_set_max_tls_protocol_versionPtr + .asFunction(); - int SSLSetAllowsExpiredCerts( - SSLContextRef context, - int allowsExpired, + int sec_protocol_options_get_default_max_tls_protocol_version() { + return _sec_protocol_options_get_default_max_tls_protocol_version(); + } + + late final _sec_protocol_options_get_default_max_tls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_max_tls_protocol_version'); + late final _sec_protocol_options_get_default_max_tls_protocol_version = + _sec_protocol_options_get_default_max_tls_protocol_versionPtr + .asFunction(); + + int sec_protocol_options_get_default_max_dtls_protocol_version() { + return _sec_protocol_options_get_default_max_dtls_protocol_version(); + } + + late final _sec_protocol_options_get_default_max_dtls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_max_dtls_protocol_version'); + late final _sec_protocol_options_get_default_max_dtls_protocol_version = + _sec_protocol_options_get_default_max_dtls_protocol_versionPtr + .asFunction(); + + bool sec_protocol_options_get_enable_encrypted_client_hello( + sec_protocol_options_t options, ) { - return _SSLSetAllowsExpiredCerts( - context, - allowsExpired, + return _sec_protocol_options_get_enable_encrypted_client_hello( + options, ); } - late final _SSLSetAllowsExpiredCertsPtr = - _lookup>( - 'SSLSetAllowsExpiredCerts'); - late final _SSLSetAllowsExpiredCerts = _SSLSetAllowsExpiredCertsPtr - .asFunction(); + late final _sec_protocol_options_get_enable_encrypted_client_helloPtr = + _lookup>( + 'sec_protocol_options_get_enable_encrypted_client_hello'); + late final _sec_protocol_options_get_enable_encrypted_client_hello = + _sec_protocol_options_get_enable_encrypted_client_helloPtr + .asFunction(); - int SSLGetAllowsExpiredCerts( - SSLContextRef context, - ffi.Pointer allowsExpired, + bool sec_protocol_options_get_quic_use_legacy_codepoint( + sec_protocol_options_t options, ) { - return _SSLGetAllowsExpiredCerts( - context, - allowsExpired, + return _sec_protocol_options_get_quic_use_legacy_codepoint( + options, ); } - late final _SSLGetAllowsExpiredCertsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetAllowsExpiredCerts'); - late final _SSLGetAllowsExpiredCerts = _SSLGetAllowsExpiredCertsPtr - .asFunction)>(); + late final _sec_protocol_options_get_quic_use_legacy_codepointPtr = + _lookup>( + 'sec_protocol_options_get_quic_use_legacy_codepoint'); + late final _sec_protocol_options_get_quic_use_legacy_codepoint = + _sec_protocol_options_get_quic_use_legacy_codepointPtr + .asFunction(); - int SSLSetAllowsExpiredRoots( - SSLContextRef context, - int allowsExpired, + void sec_protocol_options_add_tls_application_protocol( + sec_protocol_options_t options, + ffi.Pointer application_protocol, ) { - return _SSLSetAllowsExpiredRoots( - context, - allowsExpired, + return _sec_protocol_options_add_tls_application_protocol( + options, + application_protocol, ); } - late final _SSLSetAllowsExpiredRootsPtr = - _lookup>( - 'SSLSetAllowsExpiredRoots'); - late final _SSLSetAllowsExpiredRoots = _SSLSetAllowsExpiredRootsPtr - .asFunction(); + late final _sec_protocol_options_add_tls_application_protocolPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_options_t, ffi.Pointer)>>( + 'sec_protocol_options_add_tls_application_protocol'); + late final _sec_protocol_options_add_tls_application_protocol = + _sec_protocol_options_add_tls_application_protocolPtr.asFunction< + void Function(sec_protocol_options_t, ffi.Pointer)>(); - int SSLGetAllowsExpiredRoots( - SSLContextRef context, - ffi.Pointer allowsExpired, + void sec_protocol_options_set_tls_server_name( + sec_protocol_options_t options, + ffi.Pointer server_name, ) { - return _SSLGetAllowsExpiredRoots( - context, - allowsExpired, + return _sec_protocol_options_set_tls_server_name( + options, + server_name, ); } - late final _SSLGetAllowsExpiredRootsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetAllowsExpiredRoots'); - late final _SSLGetAllowsExpiredRoots = _SSLGetAllowsExpiredRootsPtr - .asFunction)>(); + late final _sec_protocol_options_set_tls_server_namePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_options_t, ffi.Pointer)>>( + 'sec_protocol_options_set_tls_server_name'); + late final _sec_protocol_options_set_tls_server_name = + _sec_protocol_options_set_tls_server_namePtr.asFunction< + void Function(sec_protocol_options_t, ffi.Pointer)>(); - int SSLSetAllowsAnyRoot( - SSLContextRef context, - int anyRoot, + void sec_protocol_options_set_tls_diffie_hellman_parameters( + sec_protocol_options_t options, + dispatch_data_t params, ) { - return _SSLSetAllowsAnyRoot( - context, - anyRoot, + return _sec_protocol_options_set_tls_diffie_hellman_parameters( + options, + params, ); } - late final _SSLSetAllowsAnyRootPtr = - _lookup>( - 'SSLSetAllowsAnyRoot'); - late final _SSLSetAllowsAnyRoot = - _SSLSetAllowsAnyRootPtr.asFunction(); + late final _sec_protocol_options_set_tls_diffie_hellman_parametersPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( + 'sec_protocol_options_set_tls_diffie_hellman_parameters'); + late final _sec_protocol_options_set_tls_diffie_hellman_parameters = + _sec_protocol_options_set_tls_diffie_hellman_parametersPtr + .asFunction(); - int SSLGetAllowsAnyRoot( - SSLContextRef context, - ffi.Pointer anyRoot, + void sec_protocol_options_add_pre_shared_key( + sec_protocol_options_t options, + dispatch_data_t psk, + dispatch_data_t psk_identity, ) { - return _SSLGetAllowsAnyRoot( - context, - anyRoot, + return _sec_protocol_options_add_pre_shared_key( + options, + psk, + psk_identity, ); } - late final _SSLGetAllowsAnyRootPtr = _lookup< + late final _sec_protocol_options_add_pre_shared_keyPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetAllowsAnyRoot'); - late final _SSLGetAllowsAnyRoot = _SSLGetAllowsAnyRootPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, dispatch_data_t, + dispatch_data_t)>>('sec_protocol_options_add_pre_shared_key'); + late final _sec_protocol_options_add_pre_shared_key = + _sec_protocol_options_add_pre_shared_keyPtr.asFunction< + void Function( + sec_protocol_options_t, dispatch_data_t, dispatch_data_t)>(); - int SSLSetTrustedRoots( - SSLContextRef context, - CFArrayRef trustedRoots, - int replaceExisting, + void sec_protocol_options_set_tls_pre_shared_key_identity_hint( + sec_protocol_options_t options, + dispatch_data_t psk_identity_hint, ) { - return _SSLSetTrustedRoots( - context, - trustedRoots, - replaceExisting, + return _sec_protocol_options_set_tls_pre_shared_key_identity_hint( + options, + psk_identity_hint, ); } - late final _SSLSetTrustedRootsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, CFArrayRef, Boolean)>>('SSLSetTrustedRoots'); - late final _SSLSetTrustedRoots = _SSLSetTrustedRootsPtr.asFunction< - int Function(SSLContextRef, CFArrayRef, int)>(); + late final _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( + 'sec_protocol_options_set_tls_pre_shared_key_identity_hint'); + late final _sec_protocol_options_set_tls_pre_shared_key_identity_hint = + _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr + .asFunction(); - int SSLCopyTrustedRoots( - SSLContextRef context, - ffi.Pointer trustedRoots, + void sec_protocol_options_set_pre_shared_key_selection_block( + sec_protocol_options_t options, + sec_protocol_pre_shared_key_selection_t psk_selection_block, + dispatch_queue_t psk_selection_queue, ) { - return _SSLCopyTrustedRoots( - context, - trustedRoots, + return _sec_protocol_options_set_pre_shared_key_selection_block( + options, + psk_selection_block, + psk_selection_queue, ); } - late final _SSLCopyTrustedRootsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLCopyTrustedRoots'); - late final _SSLCopyTrustedRoots = _SSLCopyTrustedRootsPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + late final _sec_protocol_options_set_pre_shared_key_selection_blockPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_options_t, + sec_protocol_pre_shared_key_selection_t, + dispatch_queue_t)>>( + 'sec_protocol_options_set_pre_shared_key_selection_block'); + late final _sec_protocol_options_set_pre_shared_key_selection_block = + _sec_protocol_options_set_pre_shared_key_selection_blockPtr.asFunction< + void Function(sec_protocol_options_t, + sec_protocol_pre_shared_key_selection_t, dispatch_queue_t)>(); - int SSLCopyPeerCertificates( - SSLContextRef context, - ffi.Pointer certs, + void sec_protocol_options_set_tls_tickets_enabled( + sec_protocol_options_t options, + bool tickets_enabled, ) { - return _SSLCopyPeerCertificates( - context, - certs, + return _sec_protocol_options_set_tls_tickets_enabled( + options, + tickets_enabled, ); } - late final _SSLCopyPeerCertificatesPtr = _lookup< + late final _sec_protocol_options_set_tls_tickets_enabledPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyPeerCertificates'); - late final _SSLCopyPeerCertificates = _SSLCopyPeerCertificatesPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_tickets_enabled'); + late final _sec_protocol_options_set_tls_tickets_enabled = + _sec_protocol_options_set_tls_tickets_enabledPtr + .asFunction(); - int SSLCopyPeerTrust( - SSLContextRef context, - ffi.Pointer trust, + void sec_protocol_options_set_tls_is_fallback_attempt( + sec_protocol_options_t options, + bool is_fallback_attempt, ) { - return _SSLCopyPeerTrust( - context, - trust, + return _sec_protocol_options_set_tls_is_fallback_attempt( + options, + is_fallback_attempt, ); } - late final _SSLCopyPeerTrustPtr = _lookup< + late final _sec_protocol_options_set_tls_is_fallback_attemptPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLCopyPeerTrust'); - late final _SSLCopyPeerTrust = _SSLCopyPeerTrustPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_is_fallback_attempt'); + late final _sec_protocol_options_set_tls_is_fallback_attempt = + _sec_protocol_options_set_tls_is_fallback_attemptPtr + .asFunction(); - int SSLSetPeerID( - SSLContextRef context, - ffi.Pointer peerID, - int peerIDLen, + void sec_protocol_options_set_tls_resumption_enabled( + sec_protocol_options_t options, + bool resumption_enabled, ) { - return _SSLSetPeerID( - context, - peerID, - peerIDLen, + return _sec_protocol_options_set_tls_resumption_enabled( + options, + resumption_enabled, ); } - late final _SSLSetPeerIDPtr = _lookup< + late final _sec_protocol_options_set_tls_resumption_enabledPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer, ffi.Size)>>('SSLSetPeerID'); - late final _SSLSetPeerID = _SSLSetPeerIDPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer, int)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_resumption_enabled'); + late final _sec_protocol_options_set_tls_resumption_enabled = + _sec_protocol_options_set_tls_resumption_enabledPtr + .asFunction(); - int SSLGetPeerID( - SSLContextRef context, - ffi.Pointer> peerID, - ffi.Pointer peerIDLen, + void sec_protocol_options_set_tls_false_start_enabled( + sec_protocol_options_t options, + bool false_start_enabled, ) { - return _SSLGetPeerID( - context, - peerID, - peerIDLen, + return _sec_protocol_options_set_tls_false_start_enabled( + options, + false_start_enabled, ); } - late final _SSLGetPeerIDPtr = _lookup< + late final _sec_protocol_options_set_tls_false_start_enabledPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer>, - ffi.Pointer)>>('SSLGetPeerID'); - late final _SSLGetPeerID = _SSLGetPeerIDPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer>, - ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_false_start_enabled'); + late final _sec_protocol_options_set_tls_false_start_enabled = + _sec_protocol_options_set_tls_false_start_enabledPtr + .asFunction(); - int SSLGetNegotiatedCipher( - SSLContextRef context, - ffi.Pointer cipherSuite, + void sec_protocol_options_set_tls_ocsp_enabled( + sec_protocol_options_t options, + bool ocsp_enabled, ) { - return _SSLGetNegotiatedCipher( - context, - cipherSuite, + return _sec_protocol_options_set_tls_ocsp_enabled( + options, + ocsp_enabled, ); } - late final _SSLGetNegotiatedCipherPtr = _lookup< + late final _sec_protocol_options_set_tls_ocsp_enabledPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNegotiatedCipher'); - late final _SSLGetNegotiatedCipher = _SSLGetNegotiatedCipherPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_ocsp_enabled'); + late final _sec_protocol_options_set_tls_ocsp_enabled = + _sec_protocol_options_set_tls_ocsp_enabledPtr + .asFunction(); - int SSLSetALPNProtocols( - SSLContextRef context, - CFArrayRef protocols, + void sec_protocol_options_set_tls_sct_enabled( + sec_protocol_options_t options, + bool sct_enabled, ) { - return _SSLSetALPNProtocols( - context, - protocols, + return _sec_protocol_options_set_tls_sct_enabled( + options, + sct_enabled, ); } - late final _SSLSetALPNProtocolsPtr = - _lookup>( - 'SSLSetALPNProtocols'); - late final _SSLSetALPNProtocols = _SSLSetALPNProtocolsPtr.asFunction< - int Function(SSLContextRef, CFArrayRef)>(); + late final _sec_protocol_options_set_tls_sct_enabledPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_sct_enabled'); + late final _sec_protocol_options_set_tls_sct_enabled = + _sec_protocol_options_set_tls_sct_enabledPtr + .asFunction(); - int SSLCopyALPNProtocols( - SSLContextRef context, - ffi.Pointer protocols, + void sec_protocol_options_set_tls_renegotiation_enabled( + sec_protocol_options_t options, + bool renegotiation_enabled, ) { - return _SSLCopyALPNProtocols( - context, - protocols, + return _sec_protocol_options_set_tls_renegotiation_enabled( + options, + renegotiation_enabled, ); } - late final _SSLCopyALPNProtocolsPtr = _lookup< + late final _sec_protocol_options_set_tls_renegotiation_enabledPtr = _lookup< ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLCopyALPNProtocols'); - late final _SSLCopyALPNProtocols = _SSLCopyALPNProtocolsPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_tls_renegotiation_enabled'); + late final _sec_protocol_options_set_tls_renegotiation_enabled = + _sec_protocol_options_set_tls_renegotiation_enabledPtr + .asFunction(); - int SSLSetOCSPResponse( - SSLContextRef context, - CFDataRef response, + void sec_protocol_options_set_peer_authentication_required( + sec_protocol_options_t options, + bool peer_authentication_required, ) { - return _SSLSetOCSPResponse( - context, - response, + return _sec_protocol_options_set_peer_authentication_required( + options, + peer_authentication_required, ); } - late final _SSLSetOCSPResponsePtr = - _lookup>( - 'SSLSetOCSPResponse'); - late final _SSLSetOCSPResponse = _SSLSetOCSPResponsePtr.asFunction< - int Function(SSLContextRef, CFDataRef)>(); + late final _sec_protocol_options_set_peer_authentication_requiredPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( + 'sec_protocol_options_set_peer_authentication_required'); + late final _sec_protocol_options_set_peer_authentication_required = + _sec_protocol_options_set_peer_authentication_requiredPtr + .asFunction(); - int SSLSetEncryptionCertificate( - SSLContextRef context, - CFArrayRef certRefs, + void sec_protocol_options_set_peer_authentication_optional( + sec_protocol_options_t options, + bool peer_authentication_optional, ) { - return _SSLSetEncryptionCertificate( - context, - certRefs, + return _sec_protocol_options_set_peer_authentication_optional( + options, + peer_authentication_optional, ); } - late final _SSLSetEncryptionCertificatePtr = - _lookup>( - 'SSLSetEncryptionCertificate'); - late final _SSLSetEncryptionCertificate = _SSLSetEncryptionCertificatePtr - .asFunction(); + late final _sec_protocol_options_set_peer_authentication_optionalPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( + 'sec_protocol_options_set_peer_authentication_optional'); + late final _sec_protocol_options_set_peer_authentication_optional = + _sec_protocol_options_set_peer_authentication_optionalPtr + .asFunction(); - int SSLSetClientSideAuthenticate( - SSLContextRef context, - int auth, + void sec_protocol_options_set_enable_encrypted_client_hello( + sec_protocol_options_t options, + bool enable_encrypted_client_hello, ) { - return _SSLSetClientSideAuthenticate( - context, - auth, + return _sec_protocol_options_set_enable_encrypted_client_hello( + options, + enable_encrypted_client_hello, ); } - late final _SSLSetClientSideAuthenticatePtr = - _lookup>( - 'SSLSetClientSideAuthenticate'); - late final _SSLSetClientSideAuthenticate = _SSLSetClientSideAuthenticatePtr - .asFunction(); + late final _sec_protocol_options_set_enable_encrypted_client_helloPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( + 'sec_protocol_options_set_enable_encrypted_client_hello'); + late final _sec_protocol_options_set_enable_encrypted_client_hello = + _sec_protocol_options_set_enable_encrypted_client_helloPtr + .asFunction(); - int SSLAddDistinguishedName( - SSLContextRef context, - ffi.Pointer derDN, - int derDNLen, + void sec_protocol_options_set_quic_use_legacy_codepoint( + sec_protocol_options_t options, + bool quic_use_legacy_codepoint, ) { - return _SSLAddDistinguishedName( - context, - derDN, - derDNLen, + return _sec_protocol_options_set_quic_use_legacy_codepoint( + options, + quic_use_legacy_codepoint, ); } - late final _SSLAddDistinguishedNamePtr = _lookup< + late final _sec_protocol_options_set_quic_use_legacy_codepointPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLAddDistinguishedName'); - late final _SSLAddDistinguishedName = _SSLAddDistinguishedNamePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer, int)>(); + ffi.Void Function(sec_protocol_options_t, + ffi.Bool)>>('sec_protocol_options_set_quic_use_legacy_codepoint'); + late final _sec_protocol_options_set_quic_use_legacy_codepoint = + _sec_protocol_options_set_quic_use_legacy_codepointPtr + .asFunction(); - int SSLSetCertificateAuthorities( - SSLContextRef context, - CFTypeRef certificateOrArray, - int replaceExisting, + void sec_protocol_options_set_key_update_block( + sec_protocol_options_t options, + sec_protocol_key_update_t key_update_block, + dispatch_queue_t key_update_queue, ) { - return _SSLSetCertificateAuthorities( - context, - certificateOrArray, - replaceExisting, + return _sec_protocol_options_set_key_update_block( + options, + key_update_block, + key_update_queue, ); } - late final _SSLSetCertificateAuthoritiesPtr = _lookup< + late final _sec_protocol_options_set_key_update_blockPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, CFTypeRef, - Boolean)>>('SSLSetCertificateAuthorities'); - late final _SSLSetCertificateAuthorities = _SSLSetCertificateAuthoritiesPtr - .asFunction(); + ffi.Void Function(sec_protocol_options_t, sec_protocol_key_update_t, + dispatch_queue_t)>>('sec_protocol_options_set_key_update_block'); + late final _sec_protocol_options_set_key_update_block = + _sec_protocol_options_set_key_update_blockPtr.asFunction< + void Function(sec_protocol_options_t, sec_protocol_key_update_t, + dispatch_queue_t)>(); - int SSLCopyCertificateAuthorities( - SSLContextRef context, - ffi.Pointer certificates, + void sec_protocol_options_set_challenge_block( + sec_protocol_options_t options, + sec_protocol_challenge_t challenge_block, + dispatch_queue_t challenge_queue, ) { - return _SSLCopyCertificateAuthorities( - context, - certificates, + return _sec_protocol_options_set_challenge_block( + options, + challenge_block, + challenge_queue, ); } - late final _SSLCopyCertificateAuthoritiesPtr = _lookup< + late final _sec_protocol_options_set_challenge_blockPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyCertificateAuthorities'); - late final _SSLCopyCertificateAuthorities = _SSLCopyCertificateAuthoritiesPtr - .asFunction)>(); + ffi.Void Function(sec_protocol_options_t, sec_protocol_challenge_t, + dispatch_queue_t)>>('sec_protocol_options_set_challenge_block'); + late final _sec_protocol_options_set_challenge_block = + _sec_protocol_options_set_challenge_blockPtr.asFunction< + void Function(sec_protocol_options_t, sec_protocol_challenge_t, + dispatch_queue_t)>(); - int SSLCopyDistinguishedNames( - SSLContextRef context, - ffi.Pointer names, + void sec_protocol_options_set_verify_block( + sec_protocol_options_t options, + sec_protocol_verify_t verify_block, + dispatch_queue_t verify_block_queue, ) { - return _SSLCopyDistinguishedNames( - context, - names, + return _sec_protocol_options_set_verify_block( + options, + verify_block, + verify_block_queue, ); } - late final _SSLCopyDistinguishedNamesPtr = _lookup< + late final _sec_protocol_options_set_verify_blockPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyDistinguishedNames'); - late final _SSLCopyDistinguishedNames = _SSLCopyDistinguishedNamesPtr - .asFunction)>(); + ffi.Void Function(sec_protocol_options_t, sec_protocol_verify_t, + dispatch_queue_t)>>('sec_protocol_options_set_verify_block'); + late final _sec_protocol_options_set_verify_block = + _sec_protocol_options_set_verify_blockPtr.asFunction< + void Function(sec_protocol_options_t, sec_protocol_verify_t, + dispatch_queue_t)>(); - int SSLGetClientCertificateState( - SSLContextRef context, - ffi.Pointer clientState, - ) { - return _SSLGetClientCertificateState( - context, - clientState, - ); + late final ffi.Pointer _kSSLSessionConfig_default = + _lookup('kSSLSessionConfig_default'); + + CFStringRef get kSSLSessionConfig_default => _kSSLSessionConfig_default.value; + + set kSSLSessionConfig_default(CFStringRef value) => + _kSSLSessionConfig_default.value = value; + + late final ffi.Pointer _kSSLSessionConfig_ATSv1 = + _lookup('kSSLSessionConfig_ATSv1'); + + CFStringRef get kSSLSessionConfig_ATSv1 => _kSSLSessionConfig_ATSv1.value; + + set kSSLSessionConfig_ATSv1(CFStringRef value) => + _kSSLSessionConfig_ATSv1.value = value; + + late final ffi.Pointer _kSSLSessionConfig_ATSv1_noPFS = + _lookup('kSSLSessionConfig_ATSv1_noPFS'); + + CFStringRef get kSSLSessionConfig_ATSv1_noPFS => + _kSSLSessionConfig_ATSv1_noPFS.value; + + set kSSLSessionConfig_ATSv1_noPFS(CFStringRef value) => + _kSSLSessionConfig_ATSv1_noPFS.value = value; + + late final ffi.Pointer _kSSLSessionConfig_standard = + _lookup('kSSLSessionConfig_standard'); + + CFStringRef get kSSLSessionConfig_standard => + _kSSLSessionConfig_standard.value; + + set kSSLSessionConfig_standard(CFStringRef value) => + _kSSLSessionConfig_standard.value = value; + + late final ffi.Pointer _kSSLSessionConfig_RC4_fallback = + _lookup('kSSLSessionConfig_RC4_fallback'); + + CFStringRef get kSSLSessionConfig_RC4_fallback => + _kSSLSessionConfig_RC4_fallback.value; + + set kSSLSessionConfig_RC4_fallback(CFStringRef value) => + _kSSLSessionConfig_RC4_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_TLSv1_fallback = + _lookup('kSSLSessionConfig_TLSv1_fallback'); + + CFStringRef get kSSLSessionConfig_TLSv1_fallback => + _kSSLSessionConfig_TLSv1_fallback.value; + + set kSSLSessionConfig_TLSv1_fallback(CFStringRef value) => + _kSSLSessionConfig_TLSv1_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_TLSv1_RC4_fallback = + _lookup('kSSLSessionConfig_TLSv1_RC4_fallback'); + + CFStringRef get kSSLSessionConfig_TLSv1_RC4_fallback => + _kSSLSessionConfig_TLSv1_RC4_fallback.value; + + set kSSLSessionConfig_TLSv1_RC4_fallback(CFStringRef value) => + _kSSLSessionConfig_TLSv1_RC4_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_legacy = + _lookup('kSSLSessionConfig_legacy'); + + CFStringRef get kSSLSessionConfig_legacy => _kSSLSessionConfig_legacy.value; + + set kSSLSessionConfig_legacy(CFStringRef value) => + _kSSLSessionConfig_legacy.value = value; + + late final ffi.Pointer _kSSLSessionConfig_legacy_DHE = + _lookup('kSSLSessionConfig_legacy_DHE'); + + CFStringRef get kSSLSessionConfig_legacy_DHE => + _kSSLSessionConfig_legacy_DHE.value; + + set kSSLSessionConfig_legacy_DHE(CFStringRef value) => + _kSSLSessionConfig_legacy_DHE.value = value; + + late final ffi.Pointer _kSSLSessionConfig_anonymous = + _lookup('kSSLSessionConfig_anonymous'); + + CFStringRef get kSSLSessionConfig_anonymous => + _kSSLSessionConfig_anonymous.value; + + set kSSLSessionConfig_anonymous(CFStringRef value) => + _kSSLSessionConfig_anonymous.value = value; + + late final ffi.Pointer _kSSLSessionConfig_3DES_fallback = + _lookup('kSSLSessionConfig_3DES_fallback'); + + CFStringRef get kSSLSessionConfig_3DES_fallback => + _kSSLSessionConfig_3DES_fallback.value; + + set kSSLSessionConfig_3DES_fallback(CFStringRef value) => + _kSSLSessionConfig_3DES_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_TLSv1_3DES_fallback = + _lookup('kSSLSessionConfig_TLSv1_3DES_fallback'); + + CFStringRef get kSSLSessionConfig_TLSv1_3DES_fallback => + _kSSLSessionConfig_TLSv1_3DES_fallback.value; + + set kSSLSessionConfig_TLSv1_3DES_fallback(CFStringRef value) => + _kSSLSessionConfig_TLSv1_3DES_fallback.value = value; + + int SSLContextGetTypeID() { + return _SSLContextGetTypeID(); } - late final _SSLGetClientCertificateStatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetClientCertificateState'); - late final _SSLGetClientCertificateState = _SSLGetClientCertificateStatePtr - .asFunction)>(); + late final _SSLContextGetTypeIDPtr = + _lookup>('SSLContextGetTypeID'); + late final _SSLContextGetTypeID = + _SSLContextGetTypeIDPtr.asFunction(); - int SSLSetDiffieHellmanParams( - SSLContextRef context, - ffi.Pointer dhParams, - int dhParamsLen, + SSLContextRef SSLCreateContext( + CFAllocatorRef alloc, + int protocolSide, + int connectionType, ) { - return _SSLSetDiffieHellmanParams( - context, - dhParams, - dhParamsLen, + return _SSLCreateContext( + alloc, + protocolSide, + connectionType, ); } - late final _SSLSetDiffieHellmanParamsPtr = _lookup< + late final _SSLCreateContextPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetDiffieHellmanParams'); - late final _SSLSetDiffieHellmanParams = _SSLSetDiffieHellmanParamsPtr - .asFunction, int)>(); + SSLContextRef Function( + CFAllocatorRef, ffi.Int32, ffi.Int32)>>('SSLCreateContext'); + late final _SSLCreateContext = _SSLCreateContextPtr.asFunction< + SSLContextRef Function(CFAllocatorRef, int, int)>(); - int SSLGetDiffieHellmanParams( - SSLContextRef context, - ffi.Pointer> dhParams, - ffi.Pointer dhParamsLen, + int SSLNewContext( + int isServer, + ffi.Pointer contextPtr, ) { - return _SSLGetDiffieHellmanParams( - context, - dhParams, - dhParamsLen, + return _SSLNewContext( + isServer, + contextPtr, ); } - late final _SSLGetDiffieHellmanParamsPtr = _lookup< + late final _SSLNewContextPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer>, - ffi.Pointer)>>('SSLGetDiffieHellmanParams'); - late final _SSLGetDiffieHellmanParams = - _SSLGetDiffieHellmanParamsPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer>, - ffi.Pointer)>(); + OSStatus Function( + Boolean, ffi.Pointer)>>('SSLNewContext'); + late final _SSLNewContext = _SSLNewContextPtr.asFunction< + int Function(int, ffi.Pointer)>(); - int SSLSetRsaBlinding( + int SSLDisposeContext( SSLContextRef context, - int blinding, ) { - return _SSLSetRsaBlinding( + return _SSLDisposeContext( context, - blinding, ); } - late final _SSLSetRsaBlindingPtr = - _lookup>( - 'SSLSetRsaBlinding'); - late final _SSLSetRsaBlinding = - _SSLSetRsaBlindingPtr.asFunction(); + late final _SSLDisposeContextPtr = + _lookup>( + 'SSLDisposeContext'); + late final _SSLDisposeContext = + _SSLDisposeContextPtr.asFunction(); - int SSLGetRsaBlinding( + int SSLGetSessionState( SSLContextRef context, - ffi.Pointer blinding, + ffi.Pointer state, ) { - return _SSLGetRsaBlinding( + return _SSLGetSessionState( context, - blinding, + state, ); } - late final _SSLGetRsaBlindingPtr = _lookup< + late final _SSLGetSessionStatePtr = _lookup< ffi.NativeFunction< OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetRsaBlinding'); - late final _SSLGetRsaBlinding = _SSLGetRsaBlindingPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + SSLContextRef, ffi.Pointer)>>('SSLGetSessionState'); + late final _SSLGetSessionState = _SSLGetSessionStatePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - int SSLHandshake( + int SSLSetSessionOption( SSLContextRef context, + int option, + int value, ) { - return _SSLHandshake( + return _SSLSetSessionOption( context, + option, + value, ); } - late final _SSLHandshakePtr = - _lookup>( - 'SSLHandshake'); - late final _SSLHandshake = - _SSLHandshakePtr.asFunction(); + late final _SSLSetSessionOptionPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Int32, Boolean)>>('SSLSetSessionOption'); + late final _SSLSetSessionOption = _SSLSetSessionOptionPtr.asFunction< + int Function(SSLContextRef, int, int)>(); - int SSLReHandshake( + int SSLGetSessionOption( SSLContextRef context, + int option, + ffi.Pointer value, ) { - return _SSLReHandshake( + return _SSLGetSessionOption( context, + option, + value, ); } - late final _SSLReHandshakePtr = - _lookup>( - 'SSLReHandshake'); - late final _SSLReHandshake = - _SSLReHandshakePtr.asFunction(); + late final _SSLGetSessionOptionPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Int32, + ffi.Pointer)>>('SSLGetSessionOption'); + late final _SSLGetSessionOption = _SSLGetSessionOptionPtr.asFunction< + int Function(SSLContextRef, int, ffi.Pointer)>(); - int SSLWrite( + int SSLSetIOFuncs( SSLContextRef context, - ffi.Pointer data, - int dataLength, - ffi.Pointer processed, + SSLReadFunc readFunc, + SSLWriteFunc writeFunc, ) { - return _SSLWrite( + return _SSLSetIOFuncs( context, - data, - dataLength, - processed, + readFunc, + writeFunc, ); } - late final _SSLWritePtr = _lookup< + late final _SSLSetIOFuncsPtr = _lookup< ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, - ffi.Pointer)>>('SSLWrite'); - late final _SSLWrite = _SSLWritePtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, SSLReadFunc, SSLWriteFunc)>>('SSLSetIOFuncs'); + late final _SSLSetIOFuncs = _SSLSetIOFuncsPtr.asFunction< + int Function(SSLContextRef, SSLReadFunc, SSLWriteFunc)>(); - int SSLRead( + int SSLSetSessionConfig( SSLContextRef context, - ffi.Pointer data, - int dataLength, - ffi.Pointer processed, + CFStringRef config, ) { - return _SSLRead( + return _SSLSetSessionConfig( context, - data, - dataLength, - processed, + config, ); } - late final _SSLReadPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, - ffi.Pointer)>>('SSLRead'); - late final _SSLRead = _SSLReadPtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); + late final _SSLSetSessionConfigPtr = _lookup< + ffi.NativeFunction>( + 'SSLSetSessionConfig'); + late final _SSLSetSessionConfig = _SSLSetSessionConfigPtr.asFunction< + int Function(SSLContextRef, CFStringRef)>(); - int SSLGetBufferedReadSize( + int SSLSetProtocolVersionMin( SSLContextRef context, - ffi.Pointer bufferSize, + int minVersion, ) { - return _SSLGetBufferedReadSize( + return _SSLSetProtocolVersionMin( context, - bufferSize, + minVersion, ); } - late final _SSLGetBufferedReadSizePtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetBufferedReadSize'); - late final _SSLGetBufferedReadSize = _SSLGetBufferedReadSizePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + late final _SSLSetProtocolVersionMinPtr = + _lookup>( + 'SSLSetProtocolVersionMin'); + late final _SSLSetProtocolVersionMin = _SSLSetProtocolVersionMinPtr + .asFunction(); - int SSLGetDatagramWriteSize( - SSLContextRef dtlsContext, - ffi.Pointer bufSize, + int SSLGetProtocolVersionMin( + SSLContextRef context, + ffi.Pointer minVersion, ) { - return _SSLGetDatagramWriteSize( - dtlsContext, - bufSize, + return _SSLGetProtocolVersionMin( + context, + minVersion, ); } - late final _SSLGetDatagramWriteSizePtr = _lookup< + late final _SSLGetProtocolVersionMinPtr = _lookup< ffi.NativeFunction< OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetDatagramWriteSize'); - late final _SSLGetDatagramWriteSize = _SSLGetDatagramWriteSizePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + ffi.Pointer)>>('SSLGetProtocolVersionMin'); + late final _SSLGetProtocolVersionMin = _SSLGetProtocolVersionMinPtr + .asFunction)>(); - int SSLClose( + int SSLSetProtocolVersionMax( SSLContextRef context, + int maxVersion, ) { - return _SSLClose( + return _SSLSetProtocolVersionMax( context, + maxVersion, ); } - late final _SSLClosePtr = - _lookup>('SSLClose'); - late final _SSLClose = _SSLClosePtr.asFunction(); - - int SSLSetError( + late final _SSLSetProtocolVersionMaxPtr = + _lookup>( + 'SSLSetProtocolVersionMax'); + late final _SSLSetProtocolVersionMax = _SSLSetProtocolVersionMaxPtr + .asFunction(); + + int SSLGetProtocolVersionMax( SSLContextRef context, - int status, + ffi.Pointer maxVersion, ) { - return _SSLSetError( + return _SSLGetProtocolVersionMax( context, - status, + maxVersion, ); } - late final _SSLSetErrorPtr = - _lookup>( - 'SSLSetError'); - late final _SSLSetError = - _SSLSetErrorPtr.asFunction(); - - /// -1LL - late final ffi.Pointer _NSURLSessionTransferSizeUnknown = - _lookup('NSURLSessionTransferSizeUnknown'); - - int get NSURLSessionTransferSizeUnknown => - _NSURLSessionTransferSizeUnknown.value; - - set NSURLSessionTransferSizeUnknown(int value) => - _NSURLSessionTransferSizeUnknown.value = value; + late final _SSLGetProtocolVersionMaxPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetProtocolVersionMax'); + late final _SSLGetProtocolVersionMax = _SSLGetProtocolVersionMaxPtr + .asFunction)>(); - late final _class_NSURLSession1 = _getClass1("NSURLSession"); - late final _sel_sharedSession1 = _registerName1("sharedSession"); - ffi.Pointer _objc_msgSend_380( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLSetProtocolVersionEnabled( + SSLContextRef context, + int protocol, + int enable, ) { - return __objc_msgSend_380( - obj, - sel, + return _SSLSetProtocolVersionEnabled( + context, + protocol, + enable, ); } - late final __objc_msgSend_380Ptr = _lookup< + late final _SSLSetProtocolVersionEnabledPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Int32, + Boolean)>>('SSLSetProtocolVersionEnabled'); + late final _SSLSetProtocolVersionEnabled = _SSLSetProtocolVersionEnabledPtr + .asFunction(); - late final _class_NSURLSessionConfiguration1 = - _getClass1("NSURLSessionConfiguration"); - late final _sel_defaultSessionConfiguration1 = - _registerName1("defaultSessionConfiguration"); - ffi.Pointer _objc_msgSend_381( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLGetProtocolVersionEnabled( + SSLContextRef context, + int protocol, + ffi.Pointer enable, ) { - return __objc_msgSend_381( - obj, - sel, + return _SSLGetProtocolVersionEnabled( + context, + protocol, + enable, ); } - late final __objc_msgSend_381Ptr = _lookup< + late final _SSLGetProtocolVersionEnabledPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Int32, + ffi.Pointer)>>('SSLGetProtocolVersionEnabled'); + late final _SSLGetProtocolVersionEnabled = _SSLGetProtocolVersionEnabledPtr + .asFunction)>(); - late final _sel_ephemeralSessionConfiguration1 = - _registerName1("ephemeralSessionConfiguration"); - late final _sel_backgroundSessionConfigurationWithIdentifier_1 = - _registerName1("backgroundSessionConfigurationWithIdentifier:"); - ffi.Pointer _objc_msgSend_382( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, + int SSLSetProtocolVersion( + SSLContextRef context, + int version, ) { - return __objc_msgSend_382( - obj, - sel, - identifier, + return _SSLSetProtocolVersion( + context, + version, ); } - late final __objc_msgSend_382Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _SSLSetProtocolVersionPtr = + _lookup>( + 'SSLSetProtocolVersion'); + late final _SSLSetProtocolVersion = + _SSLSetProtocolVersionPtr.asFunction(); - late final _sel_identifier1 = _registerName1("identifier"); - late final _sel_requestCachePolicy1 = _registerName1("requestCachePolicy"); - late final _sel_setRequestCachePolicy_1 = - _registerName1("setRequestCachePolicy:"); - late final _sel_timeoutIntervalForRequest1 = - _registerName1("timeoutIntervalForRequest"); - late final _sel_setTimeoutIntervalForRequest_1 = - _registerName1("setTimeoutIntervalForRequest:"); - late final _sel_timeoutIntervalForResource1 = - _registerName1("timeoutIntervalForResource"); - late final _sel_setTimeoutIntervalForResource_1 = - _registerName1("setTimeoutIntervalForResource:"); - late final _sel_waitsForConnectivity1 = - _registerName1("waitsForConnectivity"); - late final _sel_setWaitsForConnectivity_1 = - _registerName1("setWaitsForConnectivity:"); - late final _sel_isDiscretionary1 = _registerName1("isDiscretionary"); - late final _sel_setDiscretionary_1 = _registerName1("setDiscretionary:"); - late final _sel_sharedContainerIdentifier1 = - _registerName1("sharedContainerIdentifier"); - late final _sel_setSharedContainerIdentifier_1 = - _registerName1("setSharedContainerIdentifier:"); - late final _sel_sessionSendsLaunchEvents1 = - _registerName1("sessionSendsLaunchEvents"); - late final _sel_setSessionSendsLaunchEvents_1 = - _registerName1("setSessionSendsLaunchEvents:"); - late final _sel_connectionProxyDictionary1 = - _registerName1("connectionProxyDictionary"); - late final _sel_setConnectionProxyDictionary_1 = - _registerName1("setConnectionProxyDictionary:"); - late final _sel_TLSMinimumSupportedProtocol1 = - _registerName1("TLSMinimumSupportedProtocol"); - int _objc_msgSend_383( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLGetProtocolVersion( + SSLContextRef context, + ffi.Pointer protocol, ) { - return __objc_msgSend_383( - obj, - sel, + return _SSLGetProtocolVersion( + context, + protocol, ); } - late final __objc_msgSend_383Ptr = _lookup< + late final _SSLGetProtocolVersionPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetProtocolVersion'); + late final _SSLGetProtocolVersion = _SSLGetProtocolVersionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_setTLSMinimumSupportedProtocol_1 = - _registerName1("setTLSMinimumSupportedProtocol:"); - void _objc_msgSend_384( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int SSLSetCertificate( + SSLContextRef context, + CFArrayRef certRefs, ) { - return __objc_msgSend_384( - obj, - sel, - value, + return _SSLSetCertificate( + context, + certRefs, ); } - late final __objc_msgSend_384Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _SSLSetCertificatePtr = + _lookup>( + 'SSLSetCertificate'); + late final _SSLSetCertificate = _SSLSetCertificatePtr.asFunction< + int Function(SSLContextRef, CFArrayRef)>(); - late final _sel_TLSMaximumSupportedProtocol1 = - _registerName1("TLSMaximumSupportedProtocol"); - late final _sel_setTLSMaximumSupportedProtocol_1 = - _registerName1("setTLSMaximumSupportedProtocol:"); - late final _sel_TLSMinimumSupportedProtocolVersion1 = - _registerName1("TLSMinimumSupportedProtocolVersion"); - int _objc_msgSend_385( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLSetConnection( + SSLContextRef context, + SSLConnectionRef connection, ) { - return __objc_msgSend_385( - obj, - sel, + return _SSLSetConnection( + context, + connection, ); } - late final __objc_msgSend_385Ptr = _lookup< + late final _SSLSetConnectionPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, SSLConnectionRef)>>('SSLSetConnection'); + late final _SSLSetConnection = _SSLSetConnectionPtr.asFunction< + int Function(SSLContextRef, SSLConnectionRef)>(); - late final _sel_setTLSMinimumSupportedProtocolVersion_1 = - _registerName1("setTLSMinimumSupportedProtocolVersion:"); - void _objc_msgSend_386( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int SSLGetConnection( + SSLContextRef context, + ffi.Pointer connection, ) { - return __objc_msgSend_386( - obj, - sel, - value, + return _SSLGetConnection( + context, + connection, ); } - late final __objc_msgSend_386Ptr = _lookup< + late final _SSLGetConnectionPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetConnection'); + late final _SSLGetConnection = _SSLGetConnectionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_TLSMaximumSupportedProtocolVersion1 = - _registerName1("TLSMaximumSupportedProtocolVersion"); - late final _sel_setTLSMaximumSupportedProtocolVersion_1 = - _registerName1("setTLSMaximumSupportedProtocolVersion:"); - late final _sel_HTTPShouldSetCookies1 = - _registerName1("HTTPShouldSetCookies"); - late final _sel_setHTTPShouldSetCookies_1 = - _registerName1("setHTTPShouldSetCookies:"); - late final _sel_HTTPCookieAcceptPolicy1 = - _registerName1("HTTPCookieAcceptPolicy"); - late final _sel_setHTTPCookieAcceptPolicy_1 = - _registerName1("setHTTPCookieAcceptPolicy:"); - late final _sel_HTTPAdditionalHeaders1 = - _registerName1("HTTPAdditionalHeaders"); - late final _sel_setHTTPAdditionalHeaders_1 = - _registerName1("setHTTPAdditionalHeaders:"); - late final _sel_HTTPMaximumConnectionsPerHost1 = - _registerName1("HTTPMaximumConnectionsPerHost"); - late final _sel_setHTTPMaximumConnectionsPerHost_1 = - _registerName1("setHTTPMaximumConnectionsPerHost:"); - late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); - late final _sel_setHTTPCookieStorage_1 = - _registerName1("setHTTPCookieStorage:"); - void _objc_msgSend_387( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + int SSLSetPeerDomainName( + SSLContextRef context, + ffi.Pointer peerName, + int peerNameLen, ) { - return __objc_msgSend_387( - obj, - sel, - value, + return _SSLSetPeerDomainName( + context, + peerName, + peerNameLen, ); } - late final __objc_msgSend_387Ptr = _lookup< + late final _SSLSetPeerDomainNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetPeerDomainName'); + late final _SSLSetPeerDomainName = _SSLSetPeerDomainNamePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - late final _class_NSURLCredentialStorage1 = - _getClass1("NSURLCredentialStorage"); - late final _sel_URLCredentialStorage1 = - _registerName1("URLCredentialStorage"); - ffi.Pointer _objc_msgSend_388( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLGetPeerDomainNameLength( + SSLContextRef context, + ffi.Pointer peerNameLen, ) { - return __objc_msgSend_388( - obj, - sel, + return _SSLGetPeerDomainNameLength( + context, + peerNameLen, ); } - late final __objc_msgSend_388Ptr = _lookup< + late final _SSLGetPeerDomainNameLengthPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetPeerDomainNameLength'); + late final _SSLGetPeerDomainNameLength = _SSLGetPeerDomainNameLengthPtr + .asFunction)>(); - late final _sel_setURLCredentialStorage_1 = - _registerName1("setURLCredentialStorage:"); - void _objc_msgSend_389( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + int SSLGetPeerDomainName( + SSLContextRef context, + ffi.Pointer peerName, + ffi.Pointer peerNameLen, ) { - return __objc_msgSend_389( - obj, - sel, - value, + return _SSLGetPeerDomainName( + context, + peerName, + peerNameLen, ); } - late final __objc_msgSend_389Ptr = _lookup< + late final _SSLGetPeerDomainNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLGetPeerDomainName'); + late final _SSLGetPeerDomainName = _SSLGetPeerDomainNamePtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - late final _class_NSURLCache1 = _getClass1("NSURLCache"); - late final _sel_URLCache1 = _registerName1("URLCache"); - ffi.Pointer _objc_msgSend_390( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLCopyRequestedPeerNameLength( + SSLContextRef ctx, + ffi.Pointer peerNameLen, ) { - return __objc_msgSend_390( - obj, - sel, + return _SSLCopyRequestedPeerNameLength( + ctx, + peerNameLen, ); } - late final __objc_msgSend_390Ptr = _lookup< + late final _SSLCopyRequestedPeerNameLengthPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyRequestedPeerNameLength'); + late final _SSLCopyRequestedPeerNameLength = + _SSLCopyRequestedPeerNameLengthPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_setURLCache_1 = _registerName1("setURLCache:"); - void _objc_msgSend_391( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + int SSLCopyRequestedPeerName( + SSLContextRef context, + ffi.Pointer peerName, + ffi.Pointer peerNameLen, ) { - return __objc_msgSend_391( - obj, - sel, - value, + return _SSLCopyRequestedPeerName( + context, + peerName, + peerNameLen, ); } - late final __objc_msgSend_391Ptr = _lookup< + late final _SSLCopyRequestedPeerNamePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLCopyRequestedPeerName'); + late final _SSLCopyRequestedPeerName = + _SSLCopyRequestedPeerNamePtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - late final _sel_shouldUseExtendedBackgroundIdleMode1 = - _registerName1("shouldUseExtendedBackgroundIdleMode"); - late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = - _registerName1("setShouldUseExtendedBackgroundIdleMode:"); - late final _sel_protocolClasses1 = _registerName1("protocolClasses"); - late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); - void _objc_msgSend_392( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + int SSLSetDatagramHelloCookie( + SSLContextRef dtlsContext, + ffi.Pointer cookie, + int cookieLen, ) { - return __objc_msgSend_392( - obj, - sel, - value, + return _SSLSetDatagramHelloCookie( + dtlsContext, + cookie, + cookieLen, ); } - late final __objc_msgSend_392Ptr = _lookup< + late final _SSLSetDatagramHelloCookiePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetDatagramHelloCookie'); + late final _SSLSetDatagramHelloCookie = _SSLSetDatagramHelloCookiePtr + .asFunction, int)>(); - late final _sel_multipathServiceType1 = - _registerName1("multipathServiceType"); - int _objc_msgSend_393( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLSetMaxDatagramRecordSize( + SSLContextRef dtlsContext, + int maxSize, ) { - return __objc_msgSend_393( - obj, - sel, + return _SSLSetMaxDatagramRecordSize( + dtlsContext, + maxSize, ); } - late final __objc_msgSend_393Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _SSLSetMaxDatagramRecordSizePtr = + _lookup>( + 'SSLSetMaxDatagramRecordSize'); + late final _SSLSetMaxDatagramRecordSize = _SSLSetMaxDatagramRecordSizePtr + .asFunction(); - late final _sel_setMultipathServiceType_1 = - _registerName1("setMultipathServiceType:"); - void _objc_msgSend_394( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int SSLGetMaxDatagramRecordSize( + SSLContextRef dtlsContext, + ffi.Pointer maxSize, ) { - return __objc_msgSend_394( - obj, - sel, - value, + return _SSLGetMaxDatagramRecordSize( + dtlsContext, + maxSize, ); } - late final __objc_msgSend_394Ptr = _lookup< + late final _SSLGetMaxDatagramRecordSizePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetMaxDatagramRecordSize'); + late final _SSLGetMaxDatagramRecordSize = _SSLGetMaxDatagramRecordSizePtr + .asFunction)>(); - late final _sel_backgroundSessionConfiguration_1 = - _registerName1("backgroundSessionConfiguration:"); - late final _sel_sessionWithConfiguration_1 = - _registerName1("sessionWithConfiguration:"); - ffi.Pointer _objc_msgSend_395( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer configuration, + int SSLGetNegotiatedProtocolVersion( + SSLContextRef context, + ffi.Pointer protocol, ) { - return __objc_msgSend_395( - obj, - sel, - configuration, + return _SSLGetNegotiatedProtocolVersion( + context, + protocol, ); } - late final __objc_msgSend_395Ptr = _lookup< + late final _SSLGetNegotiatedProtocolVersionPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNegotiatedProtocolVersion'); + late final _SSLGetNegotiatedProtocolVersion = + _SSLGetNegotiatedProtocolVersionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = - _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); - ffi.Pointer _objc_msgSend_396( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer configuration, - ffi.Pointer delegate, - ffi.Pointer queue, + int SSLGetNumberSupportedCiphers( + SSLContextRef context, + ffi.Pointer numCiphers, ) { - return __objc_msgSend_396( - obj, - sel, - configuration, - delegate, - queue, + return _SSLGetNumberSupportedCiphers( + context, + numCiphers, ); } - late final __objc_msgSend_396Ptr = _lookup< + late final _SSLGetNumberSupportedCiphersPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNumberSupportedCiphers'); + late final _SSLGetNumberSupportedCiphers = _SSLGetNumberSupportedCiphersPtr + .asFunction)>(); - late final _sel_delegateQueue1 = _registerName1("delegateQueue"); - late final _sel_delegate1 = _registerName1("delegate"); - late final _sel_configuration1 = _registerName1("configuration"); - late final _sel_sessionDescription1 = _registerName1("sessionDescription"); - late final _sel_setSessionDescription_1 = - _registerName1("setSessionDescription:"); - late final _sel_finishTasksAndInvalidate1 = - _registerName1("finishTasksAndInvalidate"); - late final _sel_invalidateAndCancel1 = _registerName1("invalidateAndCancel"); - late final _sel_resetWithCompletionHandler_1 = - _registerName1("resetWithCompletionHandler:"); - late final _sel_flushWithCompletionHandler_1 = - _registerName1("flushWithCompletionHandler:"); - late final _sel_getTasksWithCompletionHandler_1 = - _registerName1("getTasksWithCompletionHandler:"); - void _objc_msgSend_397( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLGetSupportedCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + ffi.Pointer numCiphers, ) { - return __objc_msgSend_397( - obj, - sel, - completionHandler, + return _SSLGetSupportedCiphers( + context, + ciphers, + numCiphers, ); } - late final __objc_msgSend_397Ptr = _lookup< + late final _SSLGetSupportedCiphersPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLGetSupportedCiphers'); + late final _SSLGetSupportedCiphers = _SSLGetSupportedCiphersPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - late final _sel_getAllTasksWithCompletionHandler_1 = - _registerName1("getAllTasksWithCompletionHandler:"); - void _objc_msgSend_398( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLGetNumberEnabledCiphers( + SSLContextRef context, + ffi.Pointer numCiphers, ) { - return __objc_msgSend_398( - obj, - sel, - completionHandler, + return _SSLGetNumberEnabledCiphers( + context, + numCiphers, ); } - late final __objc_msgSend_398Ptr = _lookup< + late final _SSLGetNumberEnabledCiphersPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNumberEnabledCiphers'); + late final _SSLGetNumberEnabledCiphers = _SSLGetNumberEnabledCiphersPtr + .asFunction)>(); - late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); - late final _sel_dataTaskWithRequest_1 = - _registerName1("dataTaskWithRequest:"); - ffi.Pointer _objc_msgSend_399( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + int SSLSetEnabledCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + int numCiphers, ) { - return __objc_msgSend_399( - obj, - sel, - request, + return _SSLSetEnabledCiphers( + context, + ciphers, + numCiphers, ); } - late final __objc_msgSend_399Ptr = _lookup< + late final _SSLSetEnabledCiphersPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetEnabledCiphers'); + late final _SSLSetEnabledCiphers = _SSLSetEnabledCiphersPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); - ffi.Pointer _objc_msgSend_400( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + int SSLGetEnabledCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + ffi.Pointer numCiphers, ) { - return __objc_msgSend_400( - obj, - sel, - url, + return _SSLGetEnabledCiphers( + context, + ciphers, + numCiphers, ); } - late final __objc_msgSend_400Ptr = _lookup< + late final _SSLGetEnabledCiphersPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLGetEnabledCiphers'); + late final _SSLGetEnabledCiphers = _SSLGetEnabledCiphersPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - late final _class_NSURLSessionUploadTask1 = - _getClass1("NSURLSessionUploadTask"); - late final _sel_uploadTaskWithRequest_fromFile_1 = - _registerName1("uploadTaskWithRequest:fromFile:"); - ffi.Pointer _objc_msgSend_401( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer fileURL, + int SSLSetSessionTicketsEnabled( + SSLContextRef context, + int enabled, ) { - return __objc_msgSend_401( - obj, - sel, - request, - fileURL, + return _SSLSetSessionTicketsEnabled( + context, + enabled, ); } - late final __objc_msgSend_401Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _SSLSetSessionTicketsEnabledPtr = + _lookup>( + 'SSLSetSessionTicketsEnabled'); + late final _SSLSetSessionTicketsEnabled = _SSLSetSessionTicketsEnabledPtr + .asFunction(); - late final _sel_uploadTaskWithRequest_fromData_1 = - _registerName1("uploadTaskWithRequest:fromData:"); - ffi.Pointer _objc_msgSend_402( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer bodyData, + int SSLSetEnableCertVerify( + SSLContextRef context, + int enableVerify, ) { - return __objc_msgSend_402( - obj, - sel, - request, - bodyData, + return _SSLSetEnableCertVerify( + context, + enableVerify, ); } - late final __objc_msgSend_402Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _SSLSetEnableCertVerifyPtr = + _lookup>( + 'SSLSetEnableCertVerify'); + late final _SSLSetEnableCertVerify = + _SSLSetEnableCertVerifyPtr.asFunction(); - late final _sel_uploadTaskWithStreamedRequest_1 = - _registerName1("uploadTaskWithStreamedRequest:"); - ffi.Pointer _objc_msgSend_403( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + int SSLGetEnableCertVerify( + SSLContextRef context, + ffi.Pointer enableVerify, ) { - return __objc_msgSend_403( - obj, - sel, - request, + return _SSLGetEnableCertVerify( + context, + enableVerify, ); } - late final __objc_msgSend_403Ptr = _lookup< + late final _SSLGetEnableCertVerifyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetEnableCertVerify'); + late final _SSLGetEnableCertVerify = _SSLGetEnableCertVerifyPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _class_NSURLSessionDownloadTask1 = - _getClass1("NSURLSessionDownloadTask"); - late final _sel_cancelByProducingResumeData_1 = - _registerName1("cancelByProducingResumeData:"); - void _objc_msgSend_404( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetAllowsExpiredCerts( + SSLContextRef context, + int allowsExpired, ) { - return __objc_msgSend_404( - obj, - sel, - completionHandler, + return _SSLSetAllowsExpiredCerts( + context, + allowsExpired, ); } - late final __objc_msgSend_404Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetAllowsExpiredCertsPtr = + _lookup>( + 'SSLSetAllowsExpiredCerts'); + late final _SSLSetAllowsExpiredCerts = _SSLSetAllowsExpiredCertsPtr + .asFunction(); - late final _sel_downloadTaskWithRequest_1 = - _registerName1("downloadTaskWithRequest:"); - ffi.Pointer _objc_msgSend_405( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + int SSLGetAllowsExpiredCerts( + SSLContextRef context, + ffi.Pointer allowsExpired, ) { - return __objc_msgSend_405( - obj, - sel, - request, + return _SSLGetAllowsExpiredCerts( + context, + allowsExpired, ); } - late final __objc_msgSend_405Ptr = _lookup< + late final _SSLGetAllowsExpiredCertsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetAllowsExpiredCerts'); + late final _SSLGetAllowsExpiredCerts = _SSLGetAllowsExpiredCertsPtr + .asFunction)>(); - late final _sel_downloadTaskWithURL_1 = - _registerName1("downloadTaskWithURL:"); - ffi.Pointer _objc_msgSend_406( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + int SSLSetAllowsExpiredRoots( + SSLContextRef context, + int allowsExpired, ) { - return __objc_msgSend_406( - obj, - sel, - url, + return _SSLSetAllowsExpiredRoots( + context, + allowsExpired, ); } - late final __objc_msgSend_406Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _SSLSetAllowsExpiredRootsPtr = + _lookup>( + 'SSLSetAllowsExpiredRoots'); + late final _SSLSetAllowsExpiredRoots = _SSLSetAllowsExpiredRootsPtr + .asFunction(); - late final _sel_downloadTaskWithResumeData_1 = - _registerName1("downloadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_407( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, + int SSLGetAllowsExpiredRoots( + SSLContextRef context, + ffi.Pointer allowsExpired, ) { - return __objc_msgSend_407( - obj, - sel, - resumeData, + return _SSLGetAllowsExpiredRoots( + context, + allowsExpired, ); } - late final __objc_msgSend_407Ptr = _lookup< + late final _SSLGetAllowsExpiredRootsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetAllowsExpiredRoots'); + late final _SSLGetAllowsExpiredRoots = _SSLGetAllowsExpiredRootsPtr + .asFunction)>(); - late final _class_NSURLSessionStreamTask1 = - _getClass1("NSURLSessionStreamTask"); - late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = - _registerName1( - "readDataOfMinLength:maxLength:timeout:completionHandler:"); - void _objc_msgSend_408( - ffi.Pointer obj, - ffi.Pointer sel, - int minBytes, - int maxBytes, - double timeout, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetAllowsAnyRoot( + SSLContextRef context, + int anyRoot, ) { - return __objc_msgSend_408( - obj, - sel, - minBytes, - maxBytes, - timeout, - completionHandler, + return _SSLSetAllowsAnyRoot( + context, + anyRoot, ); } - late final __objc_msgSend_408Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSUInteger, - NSTimeInterval, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int, - double, ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetAllowsAnyRootPtr = + _lookup>( + 'SSLSetAllowsAnyRoot'); + late final _SSLSetAllowsAnyRoot = + _SSLSetAllowsAnyRootPtr.asFunction(); - late final _sel_writeData_timeout_completionHandler_1 = - _registerName1("writeData:timeout:completionHandler:"); - void _objc_msgSend_409( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - double timeout, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLGetAllowsAnyRoot( + SSLContextRef context, + ffi.Pointer anyRoot, ) { - return __objc_msgSend_409( - obj, - sel, - data, - timeout, - completionHandler, + return _SSLGetAllowsAnyRoot( + context, + anyRoot, ); } - late final __objc_msgSend_409Ptr = _lookup< + late final _SSLGetAllowsAnyRootPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSTimeInterval, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetAllowsAnyRoot'); + late final _SSLGetAllowsAnyRoot = _SSLGetAllowsAnyRootPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_captureStreams1 = _registerName1("captureStreams"); - late final _sel_closeWrite1 = _registerName1("closeWrite"); - late final _sel_closeRead1 = _registerName1("closeRead"); - late final _sel_startSecureConnection1 = - _registerName1("startSecureConnection"); - late final _sel_stopSecureConnection1 = - _registerName1("stopSecureConnection"); - late final _sel_streamTaskWithHostName_port_1 = - _registerName1("streamTaskWithHostName:port:"); - ffi.Pointer _objc_msgSend_410( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer hostname, - int port, + int SSLSetTrustedRoots( + SSLContextRef context, + CFArrayRef trustedRoots, + int replaceExisting, ) { - return __objc_msgSend_410( - obj, - sel, - hostname, - port, + return _SSLSetTrustedRoots( + context, + trustedRoots, + replaceExisting, ); } - late final __objc_msgSend_410Ptr = _lookup< + late final _SSLSetTrustedRootsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + OSStatus Function( + SSLContextRef, CFArrayRef, Boolean)>>('SSLSetTrustedRoots'); + late final _SSLSetTrustedRoots = _SSLSetTrustedRootsPtr.asFunction< + int Function(SSLContextRef, CFArrayRef, int)>(); - late final _class_NSNetService1 = _getClass1("NSNetService"); - late final _sel_streamTaskWithNetService_1 = - _registerName1("streamTaskWithNetService:"); - ffi.Pointer _objc_msgSend_411( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer service, + int SSLCopyTrustedRoots( + SSLContextRef context, + ffi.Pointer trustedRoots, ) { - return __objc_msgSend_411( - obj, - sel, - service, + return _SSLCopyTrustedRoots( + context, + trustedRoots, ); } - late final __objc_msgSend_411Ptr = _lookup< + late final _SSLCopyTrustedRootsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyTrustedRoots'); + late final _SSLCopyTrustedRoots = _SSLCopyTrustedRootsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _class_NSURLSessionWebSocketTask1 = - _getClass1("NSURLSessionWebSocketTask"); - late final _class_NSURLSessionWebSocketMessage1 = - _getClass1("NSURLSessionWebSocketMessage"); - late final _sel_type1 = _registerName1("type"); - int _objc_msgSend_412( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLCopyPeerCertificates( + SSLContextRef context, + ffi.Pointer certs, ) { - return __objc_msgSend_412( - obj, - sel, + return _SSLCopyPeerCertificates( + context, + certs, ); } - late final __objc_msgSend_412Ptr = _lookup< + late final _SSLCopyPeerCertificatesPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyPeerCertificates'); + late final _SSLCopyPeerCertificates = _SSLCopyPeerCertificatesPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_sendMessage_completionHandler_1 = - _registerName1("sendMessage:completionHandler:"); - void _objc_msgSend_413( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer message, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLCopyPeerTrust( + SSLContextRef context, + ffi.Pointer trust, ) { - return __objc_msgSend_413( - obj, - sel, - message, - completionHandler, + return _SSLCopyPeerTrust( + context, + trust, ); } - late final __objc_msgSend_413Ptr = _lookup< + late final _SSLCopyPeerTrustPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyPeerTrust'); + late final _SSLCopyPeerTrust = _SSLCopyPeerTrustPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_receiveMessageWithCompletionHandler_1 = - _registerName1("receiveMessageWithCompletionHandler:"); - void _objc_msgSend_414( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetPeerID( + SSLContextRef context, + ffi.Pointer peerID, + int peerIDLen, ) { - return __objc_msgSend_414( - obj, - sel, - completionHandler, + return _SSLSetPeerID( + context, + peerID, + peerIDLen, ); } - late final __objc_msgSend_414Ptr = _lookup< + late final _SSLSetPeerIDPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer, ffi.Size)>>('SSLSetPeerID'); + late final _SSLSetPeerID = _SSLSetPeerIDPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - late final _sel_sendPingWithPongReceiveHandler_1 = - _registerName1("sendPingWithPongReceiveHandler:"); - void _objc_msgSend_415( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> pongReceiveHandler, + int SSLGetPeerID( + SSLContextRef context, + ffi.Pointer> peerID, + ffi.Pointer peerIDLen, ) { - return __objc_msgSend_415( - obj, - sel, - pongReceiveHandler, + return _SSLGetPeerID( + context, + peerID, + peerIDLen, ); } - late final __objc_msgSend_415Ptr = _lookup< + late final _SSLGetPeerIDPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>>('SSLGetPeerID'); + late final _SSLGetPeerID = _SSLGetPeerIDPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>(); - late final _sel_cancelWithCloseCode_reason_1 = - _registerName1("cancelWithCloseCode:reason:"); - void _objc_msgSend_416( - ffi.Pointer obj, - ffi.Pointer sel, - int closeCode, - ffi.Pointer reason, + int SSLGetNegotiatedCipher( + SSLContextRef context, + ffi.Pointer cipherSuite, ) { - return __objc_msgSend_416( - obj, - sel, - closeCode, - reason, + return _SSLGetNegotiatedCipher( + context, + cipherSuite, ); } - late final __objc_msgSend_416Ptr = _lookup< + late final _SSLGetNegotiatedCipherPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNegotiatedCipher'); + late final _SSLGetNegotiatedCipher = _SSLGetNegotiatedCipherPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_maximumMessageSize1 = _registerName1("maximumMessageSize"); - late final _sel_setMaximumMessageSize_1 = - _registerName1("setMaximumMessageSize:"); - late final _sel_closeCode1 = _registerName1("closeCode"); - int _objc_msgSend_417( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLSetALPNProtocols( + SSLContextRef context, + CFArrayRef protocols, ) { - return __objc_msgSend_417( - obj, - sel, + return _SSLSetALPNProtocols( + context, + protocols, ); } - late final __objc_msgSend_417Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _SSLSetALPNProtocolsPtr = + _lookup>( + 'SSLSetALPNProtocols'); + late final _SSLSetALPNProtocols = _SSLSetALPNProtocolsPtr.asFunction< + int Function(SSLContextRef, CFArrayRef)>(); - late final _sel_closeReason1 = _registerName1("closeReason"); - late final _sel_webSocketTaskWithURL_1 = - _registerName1("webSocketTaskWithURL:"); - ffi.Pointer _objc_msgSend_418( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + int SSLCopyALPNProtocols( + SSLContextRef context, + ffi.Pointer protocols, ) { - return __objc_msgSend_418( - obj, - sel, - url, + return _SSLCopyALPNProtocols( + context, + protocols, ); } - late final __objc_msgSend_418Ptr = _lookup< + late final _SSLCopyALPNProtocolsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyALPNProtocols'); + late final _SSLCopyALPNProtocols = _SSLCopyALPNProtocolsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _sel_webSocketTaskWithURL_protocols_1 = - _registerName1("webSocketTaskWithURL:protocols:"); - ffi.Pointer _objc_msgSend_419( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer protocols, + int SSLSetOCSPResponse( + SSLContextRef context, + CFDataRef response, ) { - return __objc_msgSend_419( - obj, - sel, - url, - protocols, + return _SSLSetOCSPResponse( + context, + response, ); } - late final __objc_msgSend_419Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _SSLSetOCSPResponsePtr = + _lookup>( + 'SSLSetOCSPResponse'); + late final _SSLSetOCSPResponse = _SSLSetOCSPResponsePtr.asFunction< + int Function(SSLContextRef, CFDataRef)>(); - late final _sel_webSocketTaskWithRequest_1 = - _registerName1("webSocketTaskWithRequest:"); - ffi.Pointer _objc_msgSend_420( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + int SSLSetEncryptionCertificate( + SSLContextRef context, + CFArrayRef certRefs, ) { - return __objc_msgSend_420( - obj, - sel, - request, + return _SSLSetEncryptionCertificate( + context, + certRefs, ); } - late final __objc_msgSend_420Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _SSLSetEncryptionCertificatePtr = + _lookup>( + 'SSLSetEncryptionCertificate'); + late final _SSLSetEncryptionCertificate = _SSLSetEncryptionCertificatePtr + .asFunction(); - late final _sel_dataTaskWithRequest_completionHandler_1 = - _registerName1("dataTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_421( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetClientSideAuthenticate( + SSLContextRef context, + int auth, ) { - return __objc_msgSend_421( - obj, - sel, - request, - completionHandler, + return _SSLSetClientSideAuthenticate( + context, + auth, ); } - late final __objc_msgSend_421Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _SSLSetClientSideAuthenticatePtr = + _lookup>( + 'SSLSetClientSideAuthenticate'); + late final _SSLSetClientSideAuthenticate = _SSLSetClientSideAuthenticatePtr + .asFunction(); - late final _sel_dataTaskWithURL_completionHandler_1 = - _registerName1("dataTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_422( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLAddDistinguishedName( + SSLContextRef context, + ffi.Pointer derDN, + int derDNLen, ) { - return __objc_msgSend_422( - obj, - sel, - url, - completionHandler, + return _SSLAddDistinguishedName( + context, + derDN, + derDNLen, ); } - late final __objc_msgSend_422Ptr = _lookup< + late final _SSLAddDistinguishedNamePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLAddDistinguishedName'); + late final _SSLAddDistinguishedName = _SSLAddDistinguishedNamePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = - _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); - ffi.Pointer _objc_msgSend_423( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer fileURL, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetCertificateAuthorities( + SSLContextRef context, + CFTypeRef certificateOrArray, + int replaceExisting, ) { - return __objc_msgSend_423( - obj, - sel, - request, - fileURL, - completionHandler, + return _SSLSetCertificateAuthorities( + context, + certificateOrArray, + replaceExisting, ); } - late final __objc_msgSend_423Ptr = _lookup< + late final _SSLSetCertificateAuthoritiesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, CFTypeRef, + Boolean)>>('SSLSetCertificateAuthorities'); + late final _SSLSetCertificateAuthorities = _SSLSetCertificateAuthoritiesPtr + .asFunction(); - late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = - _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); - ffi.Pointer _objc_msgSend_424( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer bodyData, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLCopyCertificateAuthorities( + SSLContextRef context, + ffi.Pointer certificates, ) { - return __objc_msgSend_424( - obj, - sel, - request, - bodyData, - completionHandler, + return _SSLCopyCertificateAuthorities( + context, + certificates, ); } - late final __objc_msgSend_424Ptr = _lookup< + late final _SSLCopyCertificateAuthoritiesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyCertificateAuthorities'); + late final _SSLCopyCertificateAuthorities = _SSLCopyCertificateAuthoritiesPtr + .asFunction)>(); - late final _sel_downloadTaskWithRequest_completionHandler_1 = - _registerName1("downloadTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_425( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLCopyDistinguishedNames( + SSLContextRef context, + ffi.Pointer names, ) { - return __objc_msgSend_425( - obj, - sel, - request, - completionHandler, + return _SSLCopyDistinguishedNames( + context, + names, ); } - late final __objc_msgSend_425Ptr = _lookup< + late final _SSLCopyDistinguishedNamesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyDistinguishedNames'); + late final _SSLCopyDistinguishedNames = _SSLCopyDistinguishedNamesPtr + .asFunction)>(); - late final _sel_downloadTaskWithURL_completionHandler_1 = - _registerName1("downloadTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_426( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLGetClientCertificateState( + SSLContextRef context, + ffi.Pointer clientState, ) { - return __objc_msgSend_426( - obj, - sel, - url, - completionHandler, + return _SSLGetClientCertificateState( + context, + clientState, ); } - late final __objc_msgSend_426Ptr = _lookup< + late final _SSLGetClientCertificateStatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetClientCertificateState'); + late final _SSLGetClientCertificateState = _SSLGetClientCertificateStatePtr + .asFunction)>(); - late final _sel_downloadTaskWithResumeData_completionHandler_1 = - _registerName1("downloadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_427( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ffi.Pointer<_ObjCBlock> completionHandler, + int SSLSetDiffieHellmanParams( + SSLContextRef context, + ffi.Pointer dhParams, + int dhParamsLen, ) { - return __objc_msgSend_427( - obj, - sel, - resumeData, - completionHandler, - ); + return _SSLSetDiffieHellmanParams( + context, + dhParams, + dhParamsLen, + ); } - late final __objc_msgSend_427Ptr = _lookup< + late final _SSLSetDiffieHellmanParamsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetDiffieHellmanParams'); + late final _SSLSetDiffieHellmanParams = _SSLSetDiffieHellmanParamsPtr + .asFunction, int)>(); - late final ffi.Pointer _NSURLSessionTaskPriorityDefault = - _lookup('NSURLSessionTaskPriorityDefault'); + int SSLGetDiffieHellmanParams( + SSLContextRef context, + ffi.Pointer> dhParams, + ffi.Pointer dhParamsLen, + ) { + return _SSLGetDiffieHellmanParams( + context, + dhParams, + dhParamsLen, + ); + } - double get NSURLSessionTaskPriorityDefault => - _NSURLSessionTaskPriorityDefault.value; + late final _SSLGetDiffieHellmanParamsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>>('SSLGetDiffieHellmanParams'); + late final _SSLGetDiffieHellmanParams = + _SSLGetDiffieHellmanParamsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>(); - set NSURLSessionTaskPriorityDefault(double value) => - _NSURLSessionTaskPriorityDefault.value = value; + int SSLSetRsaBlinding( + SSLContextRef context, + int blinding, + ) { + return _SSLSetRsaBlinding( + context, + blinding, + ); + } - late final ffi.Pointer _NSURLSessionTaskPriorityLow = - _lookup('NSURLSessionTaskPriorityLow'); + late final _SSLSetRsaBlindingPtr = + _lookup>( + 'SSLSetRsaBlinding'); + late final _SSLSetRsaBlinding = + _SSLSetRsaBlindingPtr.asFunction(); - double get NSURLSessionTaskPriorityLow => _NSURLSessionTaskPriorityLow.value; + int SSLGetRsaBlinding( + SSLContextRef context, + ffi.Pointer blinding, + ) { + return _SSLGetRsaBlinding( + context, + blinding, + ); + } - set NSURLSessionTaskPriorityLow(double value) => - _NSURLSessionTaskPriorityLow.value = value; + late final _SSLGetRsaBlindingPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetRsaBlinding'); + late final _SSLGetRsaBlinding = _SSLGetRsaBlindingPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final ffi.Pointer _NSURLSessionTaskPriorityHigh = - _lookup('NSURLSessionTaskPriorityHigh'); + int SSLHandshake( + SSLContextRef context, + ) { + return _SSLHandshake( + context, + ); + } - double get NSURLSessionTaskPriorityHigh => - _NSURLSessionTaskPriorityHigh.value; + late final _SSLHandshakePtr = + _lookup>( + 'SSLHandshake'); + late final _SSLHandshake = + _SSLHandshakePtr.asFunction(); - set NSURLSessionTaskPriorityHigh(double value) => - _NSURLSessionTaskPriorityHigh.value = value; + int SSLReHandshake( + SSLContextRef context, + ) { + return _SSLReHandshake( + context, + ); + } - /// Key in the userInfo dictionary of an NSError received during a failed download. - late final ffi.Pointer> - _NSURLSessionDownloadTaskResumeData = - _lookup>('NSURLSessionDownloadTaskResumeData'); + late final _SSLReHandshakePtr = + _lookup>( + 'SSLReHandshake'); + late final _SSLReHandshake = + _SSLReHandshakePtr.asFunction(); - ffi.Pointer get NSURLSessionDownloadTaskResumeData => - _NSURLSessionDownloadTaskResumeData.value; + int SSLWrite( + SSLContextRef context, + ffi.Pointer data, + int dataLength, + ffi.Pointer processed, + ) { + return _SSLWrite( + context, + data, + dataLength, + processed, + ); + } - set NSURLSessionDownloadTaskResumeData(ffi.Pointer value) => - _NSURLSessionDownloadTaskResumeData.value = value; + late final _SSLWritePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, + ffi.Pointer)>>('SSLWrite'); + late final _SSLWrite = _SSLWritePtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); - late final _class_NSURLSessionTaskTransactionMetrics1 = - _getClass1("NSURLSessionTaskTransactionMetrics"); - late final _sel_request1 = _registerName1("request"); - late final _sel_fetchStartDate1 = _registerName1("fetchStartDate"); - late final _sel_domainLookupStartDate1 = - _registerName1("domainLookupStartDate"); - late final _sel_domainLookupEndDate1 = _registerName1("domainLookupEndDate"); - late final _sel_connectStartDate1 = _registerName1("connectStartDate"); - late final _sel_secureConnectionStartDate1 = - _registerName1("secureConnectionStartDate"); - late final _sel_secureConnectionEndDate1 = - _registerName1("secureConnectionEndDate"); - late final _sel_connectEndDate1 = _registerName1("connectEndDate"); - late final _sel_requestStartDate1 = _registerName1("requestStartDate"); - late final _sel_requestEndDate1 = _registerName1("requestEndDate"); - late final _sel_responseStartDate1 = _registerName1("responseStartDate"); - late final _sel_responseEndDate1 = _registerName1("responseEndDate"); - late final _sel_networkProtocolName1 = _registerName1("networkProtocolName"); - late final _sel_isProxyConnection1 = _registerName1("isProxyConnection"); - late final _sel_isReusedConnection1 = _registerName1("isReusedConnection"); - late final _sel_resourceFetchType1 = _registerName1("resourceFetchType"); - int _objc_msgSend_428( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLRead( + SSLContextRef context, + ffi.Pointer data, + int dataLength, + ffi.Pointer processed, ) { - return __objc_msgSend_428( - obj, - sel, + return _SSLRead( + context, + data, + dataLength, + processed, ); } - late final __objc_msgSend_428Ptr = _lookup< + late final _SSLReadPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, + ffi.Pointer)>>('SSLRead'); + late final _SSLRead = _SSLReadPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); - late final _sel_countOfRequestHeaderBytesSent1 = - _registerName1("countOfRequestHeaderBytesSent"); - late final _sel_countOfRequestBodyBytesSent1 = - _registerName1("countOfRequestBodyBytesSent"); - late final _sel_countOfRequestBodyBytesBeforeEncoding1 = - _registerName1("countOfRequestBodyBytesBeforeEncoding"); - late final _sel_countOfResponseHeaderBytesReceived1 = - _registerName1("countOfResponseHeaderBytesReceived"); - late final _sel_countOfResponseBodyBytesReceived1 = - _registerName1("countOfResponseBodyBytesReceived"); - late final _sel_countOfResponseBodyBytesAfterDecoding1 = - _registerName1("countOfResponseBodyBytesAfterDecoding"); - late final _sel_localAddress1 = _registerName1("localAddress"); - late final _sel_localPort1 = _registerName1("localPort"); - late final _sel_remoteAddress1 = _registerName1("remoteAddress"); - late final _sel_remotePort1 = _registerName1("remotePort"); - late final _sel_negotiatedTLSProtocolVersion1 = - _registerName1("negotiatedTLSProtocolVersion"); - late final _sel_negotiatedTLSCipherSuite1 = - _registerName1("negotiatedTLSCipherSuite"); - late final _sel_isCellular1 = _registerName1("isCellular"); - late final _sel_isExpensive1 = _registerName1("isExpensive"); - late final _sel_isConstrained1 = _registerName1("isConstrained"); - late final _sel_isMultipath1 = _registerName1("isMultipath"); - late final _sel_domainResolutionProtocol1 = - _registerName1("domainResolutionProtocol"); - int _objc_msgSend_429( - ffi.Pointer obj, - ffi.Pointer sel, + int SSLGetBufferedReadSize( + SSLContextRef context, + ffi.Pointer bufferSize, ) { - return __objc_msgSend_429( - obj, - sel, + return _SSLGetBufferedReadSize( + context, + bufferSize, ); } - late final __objc_msgSend_429Ptr = _lookup< + late final _SSLGetBufferedReadSizePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetBufferedReadSize'); + late final _SSLGetBufferedReadSize = _SSLGetBufferedReadSizePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - late final _class_NSURLSessionTaskMetrics1 = - _getClass1("NSURLSessionTaskMetrics"); - late final _sel_transactionMetrics1 = _registerName1("transactionMetrics"); - late final _class_NSDateInterval1 = _getClass1("NSDateInterval"); - late final _sel_taskInterval1 = _registerName1("taskInterval"); - ffi.Pointer _objc_msgSend_430( + int SSLGetDatagramWriteSize( + SSLContextRef dtlsContext, + ffi.Pointer bufSize, + ) { + return _SSLGetDatagramWriteSize( + dtlsContext, + bufSize, + ); + } + + late final _SSLGetDatagramWriteSizePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetDatagramWriteSize'); + late final _SSLGetDatagramWriteSize = _SSLGetDatagramWriteSizePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); + + int SSLClose( + SSLContextRef context, + ) { + return _SSLClose( + context, + ); + } + + late final _SSLClosePtr = + _lookup>('SSLClose'); + late final _SSLClose = _SSLClosePtr.asFunction(); + + int SSLSetError( + SSLContextRef context, + int status, + ) { + return _SSLSetError( + context, + status, + ); + } + + late final _SSLSetErrorPtr = + _lookup>( + 'SSLSetError'); + late final _SSLSetError = + _SSLSetErrorPtr.asFunction(); + + /// -1LL + late final ffi.Pointer _NSURLSessionTransferSizeUnknown = + _lookup('NSURLSessionTransferSizeUnknown'); + + int get NSURLSessionTransferSizeUnknown => + _NSURLSessionTransferSizeUnknown.value; + + set NSURLSessionTransferSizeUnknown(int value) => + _NSURLSessionTransferSizeUnknown.value = value; + + late final _class_NSURLSession1 = _getClass1("NSURLSession"); + late final _sel_sharedSession1 = _registerName1("sharedSession"); + ffi.Pointer _objc_msgSend_387( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_430( + return __objc_msgSend_387( obj, sel, ); } - late final __objc_msgSend_430Ptr = _lookup< + late final __objc_msgSend_387Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< + late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); - late final _sel_redirectCount1 = _registerName1("redirectCount"); - late final _class_NSItemProvider1 = _getClass1("NSItemProvider"); - late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = - _registerName1( - "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); - void _objc_msgSend_431( + late final _class_NSURLSessionConfiguration1 = + _getClass1("NSURLSessionConfiguration"); + late final _sel_defaultSessionConfiguration1 = + _registerName1("defaultSessionConfiguration"); + ffi.Pointer _objc_msgSend_388( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_431( + return __objc_msgSend_388( obj, sel, - typeIdentifier, - visibility, - loadHandler, ); } - late final __objc_msgSend_431Ptr = _lookup< + late final __objc_msgSend_388Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = - _registerName1( - "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); - void _objc_msgSend_432( + late final _sel_ephemeralSessionConfiguration1 = + _registerName1("ephemeralSessionConfiguration"); + late final _sel_backgroundSessionConfigurationWithIdentifier_1 = + _registerName1("backgroundSessionConfigurationWithIdentifier:"); + ffi.Pointer _objc_msgSend_389( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int fileOptions, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, + ffi.Pointer identifier, ) { - return __objc_msgSend_432( + return __objc_msgSend_389( obj, sel, - typeIdentifier, - fileOptions, - visibility, - loadHandler, + identifier, ); } - late final __objc_msgSend_432Ptr = _lookup< + late final __objc_msgSend_389Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_registeredTypeIdentifiers1 = - _registerName1("registeredTypeIdentifiers"); - late final _sel_registeredTypeIdentifiersWithFileOptions_1 = - _registerName1("registeredTypeIdentifiersWithFileOptions:"); - ffi.Pointer _objc_msgSend_433( + late final _sel_identifier1 = _registerName1("identifier"); + late final _sel_requestCachePolicy1 = _registerName1("requestCachePolicy"); + late final _sel_setRequestCachePolicy_1 = + _registerName1("setRequestCachePolicy:"); + late final _sel_timeoutIntervalForRequest1 = + _registerName1("timeoutIntervalForRequest"); + late final _sel_setTimeoutIntervalForRequest_1 = + _registerName1("setTimeoutIntervalForRequest:"); + late final _sel_timeoutIntervalForResource1 = + _registerName1("timeoutIntervalForResource"); + late final _sel_setTimeoutIntervalForResource_1 = + _registerName1("setTimeoutIntervalForResource:"); + late final _sel_waitsForConnectivity1 = + _registerName1("waitsForConnectivity"); + late final _sel_setWaitsForConnectivity_1 = + _registerName1("setWaitsForConnectivity:"); + late final _sel_isDiscretionary1 = _registerName1("isDiscretionary"); + late final _sel_setDiscretionary_1 = _registerName1("setDiscretionary:"); + late final _sel_sharedContainerIdentifier1 = + _registerName1("sharedContainerIdentifier"); + late final _sel_setSharedContainerIdentifier_1 = + _registerName1("setSharedContainerIdentifier:"); + late final _sel_sessionSendsLaunchEvents1 = + _registerName1("sessionSendsLaunchEvents"); + late final _sel_setSessionSendsLaunchEvents_1 = + _registerName1("setSessionSendsLaunchEvents:"); + late final _sel_connectionProxyDictionary1 = + _registerName1("connectionProxyDictionary"); + late final _sel_setConnectionProxyDictionary_1 = + _registerName1("setConnectionProxyDictionary:"); + late final _sel_TLSMinimumSupportedProtocol1 = + _registerName1("TLSMinimumSupportedProtocol"); + int _objc_msgSend_390( ffi.Pointer obj, ffi.Pointer sel, - int fileOptions, ) { - return __objc_msgSend_433( + return __objc_msgSend_390( obj, sel, - fileOptions, ); } - late final __objc_msgSend_433Ptr = _lookup< + late final __objc_msgSend_390Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_hasItemConformingToTypeIdentifier_1 = - _registerName1("hasItemConformingToTypeIdentifier:"); - late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = - _registerName1( - "hasRepresentationConformingToTypeIdentifier:fileOptions:"); - bool _objc_msgSend_434( + late final _sel_setTLSMinimumSupportedProtocol_1 = + _registerName1("setTLSMinimumSupportedProtocol:"); + void _objc_msgSend_391( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int fileOptions, + int value, ) { - return __objc_msgSend_434( + return __objc_msgSend_391( obj, sel, - typeIdentifier, - fileOptions, + value, ); } - late final __objc_msgSend_434Ptr = _lookup< + late final __objc_msgSend_391Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadDataRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_435( + late final _sel_TLSMaximumSupportedProtocol1 = + _registerName1("TLSMaximumSupportedProtocol"); + late final _sel_setTLSMaximumSupportedProtocol_1 = + _registerName1("setTLSMaximumSupportedProtocol:"); + late final _sel_TLSMinimumSupportedProtocolVersion1 = + _registerName1("TLSMinimumSupportedProtocolVersion"); + int _objc_msgSend_392( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_435( + return __objc_msgSend_392( obj, sel, - typeIdentifier, - completionHandler, ); } - late final __objc_msgSend_435Ptr = _lookup< + late final __objc_msgSend_392Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_436( + late final _sel_setTLSMinimumSupportedProtocolVersion_1 = + _registerName1("setTLSMinimumSupportedProtocolVersion:"); + void _objc_msgSend_393( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, + int value, ) { - return __objc_msgSend_436( + return __objc_msgSend_393( obj, sel, - typeIdentifier, - completionHandler, + value, ); } - late final __objc_msgSend_436Ptr = _lookup< + late final __objc_msgSend_393Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_437( + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_TLSMaximumSupportedProtocolVersion1 = + _registerName1("TLSMaximumSupportedProtocolVersion"); + late final _sel_setTLSMaximumSupportedProtocolVersion_1 = + _registerName1("setTLSMaximumSupportedProtocolVersion:"); + late final _sel_HTTPShouldSetCookies1 = + _registerName1("HTTPShouldSetCookies"); + late final _sel_setHTTPShouldSetCookies_1 = + _registerName1("setHTTPShouldSetCookies:"); + late final _sel_HTTPCookieAcceptPolicy1 = + _registerName1("HTTPCookieAcceptPolicy"); + late final _sel_setHTTPCookieAcceptPolicy_1 = + _registerName1("setHTTPCookieAcceptPolicy:"); + late final _sel_HTTPAdditionalHeaders1 = + _registerName1("HTTPAdditionalHeaders"); + late final _sel_setHTTPAdditionalHeaders_1 = + _registerName1("setHTTPAdditionalHeaders:"); + late final _sel_HTTPMaximumConnectionsPerHost1 = + _registerName1("HTTPMaximumConnectionsPerHost"); + late final _sel_setHTTPMaximumConnectionsPerHost_1 = + _registerName1("setHTTPMaximumConnectionsPerHost:"); + late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); + late final _sel_setHTTPCookieStorage_1 = + _registerName1("setHTTPCookieStorage:"); + void _objc_msgSend_394( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, + ffi.Pointer value, ) { - return __objc_msgSend_437( + return __objc_msgSend_394( obj, sel, - typeIdentifier, - completionHandler, + value, ); } - late final __objc_msgSend_437Ptr = _lookup< + late final __objc_msgSend_394Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSURLCredentialStorage1 = + _getClass1("NSURLCredentialStorage"); + late final _sel_URLCredentialStorage1 = + _registerName1("URLCredentialStorage"); + ffi.Pointer _objc_msgSend_395( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_395( + obj, + sel, + ); + } + + late final __objc_msgSend_395Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, ffi.Pointer)>(); - late final _sel_suggestedName1 = _registerName1("suggestedName"); - late final _sel_setSuggestedName_1 = _registerName1("setSuggestedName:"); - late final _sel_initWithObject_1 = _registerName1("initWithObject:"); - late final _sel_registerObject_visibility_1 = - _registerName1("registerObject:visibility:"); - void _objc_msgSend_438( + late final _sel_setURLCredentialStorage_1 = + _registerName1("setURLCredentialStorage:"); + void _objc_msgSend_396( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer object, - int visibility, + ffi.Pointer value, ) { - return __objc_msgSend_438( + return __objc_msgSend_396( obj, sel, - object, - visibility, + value, ); } - late final __objc_msgSend_438Ptr = _lookup< + late final __objc_msgSend_396Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer)>(); - late final _sel_registerObjectOfClass_visibility_loadHandler_1 = - _registerName1("registerObjectOfClass:visibility:loadHandler:"); - void _objc_msgSend_439( + late final _class_NSURLCache1 = _getClass1("NSURLCache"); + late final _sel_URLCache1 = _registerName1("URLCache"); + ffi.Pointer _objc_msgSend_397( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aClass, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_439( + return __objc_msgSend_397( obj, sel, - aClass, - visibility, - loadHandler, ); } - late final __objc_msgSend_439Ptr = _lookup< + late final __objc_msgSend_397Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setURLCache_1 = _registerName1("setURLCache:"); + void _objc_msgSend_398( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_398( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_398Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer)>(); - late final _sel_canLoadObjectOfClass_1 = - _registerName1("canLoadObjectOfClass:"); - late final _sel_loadObjectOfClass_completionHandler_1 = - _registerName1("loadObjectOfClass:completionHandler:"); - ffi.Pointer _objc_msgSend_440( + late final _sel_shouldUseExtendedBackgroundIdleMode1 = + _registerName1("shouldUseExtendedBackgroundIdleMode"); + late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = + _registerName1("setShouldUseExtendedBackgroundIdleMode:"); + late final _sel_protocolClasses1 = _registerName1("protocolClasses"); + late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); + void _objc_msgSend_399( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aClass, - ffi.Pointer<_ObjCBlock> completionHandler, + ffi.Pointer value, ) { - return __objc_msgSend_440( + return __objc_msgSend_399( obj, sel, - aClass, - completionHandler, + value, ); } - late final __objc_msgSend_440Ptr = _lookup< + late final __objc_msgSend_399Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_multipathServiceType1 = + _registerName1("multipathServiceType"); + int _objc_msgSend_400( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_400( + obj, + sel, + ); + } + + late final __objc_msgSend_400Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setMultipathServiceType_1 = + _registerName1("setMultipathServiceType:"); + void _objc_msgSend_401( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_401( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_401Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_backgroundSessionConfiguration_1 = + _registerName1("backgroundSessionConfiguration:"); + late final _sel_sessionWithConfiguration_1 = + _registerName1("sessionWithConfiguration:"); + ffi.Pointer _objc_msgSend_402( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer configuration, + ) { + return __objc_msgSend_402( + obj, + sel, + configuration, + ); + } + + late final __objc_msgSend_402Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = + _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); + ffi.Pointer _objc_msgSend_403( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer configuration, + ffi.Pointer delegate, + ffi.Pointer queue, + ) { + return __objc_msgSend_403( + obj, + sel, + configuration, + delegate, + queue, + ); + } + + late final __objc_msgSend_403Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_delegateQueue1 = _registerName1("delegateQueue"); + late final _sel_configuration1 = _registerName1("configuration"); + late final _sel_sessionDescription1 = _registerName1("sessionDescription"); + late final _sel_setSessionDescription_1 = + _registerName1("setSessionDescription:"); + late final _sel_finishTasksAndInvalidate1 = + _registerName1("finishTasksAndInvalidate"); + late final _sel_invalidateAndCancel1 = _registerName1("invalidateAndCancel"); + late final _sel_resetWithCompletionHandler_1 = + _registerName1("resetWithCompletionHandler:"); + late final _sel_flushWithCompletionHandler_1 = + _registerName1("flushWithCompletionHandler:"); + late final _sel_getTasksWithCompletionHandler_1 = + _registerName1("getTasksWithCompletionHandler:"); + void _objc_msgSend_404( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_404( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_404Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_initWithItem_typeIdentifier_1 = - _registerName1("initWithItem:typeIdentifier:"); - instancetype _objc_msgSend_441( + late final _sel_getAllTasksWithCompletionHandler_1 = + _registerName1("getAllTasksWithCompletionHandler:"); + void _objc_msgSend_405( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer item, - ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_441( + return __objc_msgSend_405( obj, sel, - item, - typeIdentifier, + completionHandler, ); } - late final __objc_msgSend_441Ptr = _lookup< + late final __objc_msgSend_405Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_registerItemForTypeIdentifier_loadHandler_1 = - _registerName1("registerItemForTypeIdentifier:loadHandler:"); - void _objc_msgSend_442( + late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); + late final _sel_dataTaskWithRequest_1 = + _registerName1("dataTaskWithRequest:"); + ffi.Pointer _objc_msgSend_406( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer typeIdentifier, - NSItemProviderLoadHandler loadHandler, + ffi.Pointer request, ) { - return __objc_msgSend_442( + return __objc_msgSend_406( obj, sel, - typeIdentifier, - loadHandler, + request, ); } - late final __objc_msgSend_442Ptr = _lookup< + late final __objc_msgSend_406Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); + ffi.Pointer _objc_msgSend_407( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_407( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_407Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSURLSessionUploadTask1 = + _getClass1("NSURLSessionUploadTask"); + late final _sel_uploadTaskWithRequest_fromFile_1 = + _registerName1("uploadTaskWithRequest:fromFile:"); + ffi.Pointer _objc_msgSend_408( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer fileURL, + ) { + return __objc_msgSend_408( + obj, + sel, + request, + fileURL, + ); + } + + late final __objc_msgSend_408Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSItemProviderLoadHandler)>(); + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = - _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); - void _objc_msgSend_443( + late final _sel_uploadTaskWithRequest_fromData_1 = + _registerName1("uploadTaskWithRequest:fromData:"); + ffi.Pointer _objc_msgSend_409( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer options, - NSItemProviderCompletionHandler completionHandler, + ffi.Pointer request, + ffi.Pointer bodyData, ) { - return __objc_msgSend_443( + return __objc_msgSend_409( obj, sel, - typeIdentifier, - options, - completionHandler, + request, + bodyData, ); } - late final __objc_msgSend_443Ptr = _lookup< + late final __objc_msgSend_409Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< - void Function( + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSItemProviderCompletionHandler)>(); + ffi.Pointer)>(); - late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); - NSItemProviderLoadHandler _objc_msgSend_444( + late final _sel_uploadTaskWithStreamedRequest_1 = + _registerName1("uploadTaskWithStreamedRequest:"); + ffi.Pointer _objc_msgSend_410( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer request, ) { - return __objc_msgSend_444( + return __objc_msgSend_410( obj, sel, + request, ); } - late final __objc_msgSend_444Ptr = _lookup< + late final __objc_msgSend_410Ptr = _lookup< ffi.NativeFunction< - NSItemProviderLoadHandler Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< - NSItemProviderLoadHandler Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_setPreviewImageHandler_1 = - _registerName1("setPreviewImageHandler:"); - void _objc_msgSend_445( + late final _class_NSURLSessionDownloadTask1 = + _getClass1("NSURLSessionDownloadTask"); + late final _sel_cancelByProducingResumeData_1 = + _registerName1("cancelByProducingResumeData:"); + void _objc_msgSend_411( ffi.Pointer obj, ffi.Pointer sel, - NSItemProviderLoadHandler value, + ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_445( + return __objc_msgSend_411( obj, sel, - value, + completionHandler, ); } - late final __objc_msgSend_445Ptr = _lookup< + late final __objc_msgSend_411Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - NSItemProviderLoadHandler)>(); + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_loadPreviewImageWithOptions_completionHandler_1 = - _registerName1("loadPreviewImageWithOptions:completionHandler:"); - void _objc_msgSend_446( + late final _sel_downloadTaskWithRequest_1 = + _registerName1("downloadTaskWithRequest:"); + ffi.Pointer _objc_msgSend_412( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer options, - NSItemProviderCompletionHandler completionHandler, + ffi.Pointer request, ) { - return __objc_msgSend_446( + return __objc_msgSend_412( obj, sel, - options, - completionHandler, + request, ); } - late final __objc_msgSend_446Ptr = _lookup< + late final __objc_msgSend_412Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSItemProviderCompletionHandler)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final ffi.Pointer> - _NSItemProviderPreferredImageSizeKey = - _lookup>('NSItemProviderPreferredImageSizeKey'); + late final _sel_downloadTaskWithURL_1 = + _registerName1("downloadTaskWithURL:"); + ffi.Pointer _objc_msgSend_413( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_413( + obj, + sel, + url, + ); + } - ffi.Pointer get NSItemProviderPreferredImageSizeKey => - _NSItemProviderPreferredImageSizeKey.value; - - set NSItemProviderPreferredImageSizeKey(ffi.Pointer value) => - _NSItemProviderPreferredImageSizeKey.value = value; - - late final ffi.Pointer> - _NSExtensionJavaScriptPreprocessingResultsKey = - _lookup>( - 'NSExtensionJavaScriptPreprocessingResultsKey'); - - ffi.Pointer get NSExtensionJavaScriptPreprocessingResultsKey => - _NSExtensionJavaScriptPreprocessingResultsKey.value; - - set NSExtensionJavaScriptPreprocessingResultsKey( - ffi.Pointer value) => - _NSExtensionJavaScriptPreprocessingResultsKey.value = value; - - late final ffi.Pointer> - _NSExtensionJavaScriptFinalizeArgumentKey = - _lookup>( - 'NSExtensionJavaScriptFinalizeArgumentKey'); - - ffi.Pointer get NSExtensionJavaScriptFinalizeArgumentKey => - _NSExtensionJavaScriptFinalizeArgumentKey.value; - - set NSExtensionJavaScriptFinalizeArgumentKey(ffi.Pointer value) => - _NSExtensionJavaScriptFinalizeArgumentKey.value = value; - - late final ffi.Pointer> _NSItemProviderErrorDomain = - _lookup>('NSItemProviderErrorDomain'); - - ffi.Pointer get NSItemProviderErrorDomain => - _NSItemProviderErrorDomain.value; - - set NSItemProviderErrorDomain(ffi.Pointer value) => - _NSItemProviderErrorDomain.value = value; - - late final ffi.Pointer _NSStringTransformLatinToKatakana = - _lookup('NSStringTransformLatinToKatakana'); - - NSStringTransform get NSStringTransformLatinToKatakana => - _NSStringTransformLatinToKatakana.value; - - set NSStringTransformLatinToKatakana(NSStringTransform value) => - _NSStringTransformLatinToKatakana.value = value; - - late final ffi.Pointer _NSStringTransformLatinToHiragana = - _lookup('NSStringTransformLatinToHiragana'); - - NSStringTransform get NSStringTransformLatinToHiragana => - _NSStringTransformLatinToHiragana.value; - - set NSStringTransformLatinToHiragana(NSStringTransform value) => - _NSStringTransformLatinToHiragana.value = value; - - late final ffi.Pointer _NSStringTransformLatinToHangul = - _lookup('NSStringTransformLatinToHangul'); - - NSStringTransform get NSStringTransformLatinToHangul => - _NSStringTransformLatinToHangul.value; - - set NSStringTransformLatinToHangul(NSStringTransform value) => - _NSStringTransformLatinToHangul.value = value; - - late final ffi.Pointer _NSStringTransformLatinToArabic = - _lookup('NSStringTransformLatinToArabic'); - - NSStringTransform get NSStringTransformLatinToArabic => - _NSStringTransformLatinToArabic.value; - - set NSStringTransformLatinToArabic(NSStringTransform value) => - _NSStringTransformLatinToArabic.value = value; - - late final ffi.Pointer _NSStringTransformLatinToHebrew = - _lookup('NSStringTransformLatinToHebrew'); - - NSStringTransform get NSStringTransformLatinToHebrew => - _NSStringTransformLatinToHebrew.value; - - set NSStringTransformLatinToHebrew(NSStringTransform value) => - _NSStringTransformLatinToHebrew.value = value; - - late final ffi.Pointer _NSStringTransformLatinToThai = - _lookup('NSStringTransformLatinToThai'); - - NSStringTransform get NSStringTransformLatinToThai => - _NSStringTransformLatinToThai.value; - - set NSStringTransformLatinToThai(NSStringTransform value) => - _NSStringTransformLatinToThai.value = value; - - late final ffi.Pointer _NSStringTransformLatinToCyrillic = - _lookup('NSStringTransformLatinToCyrillic'); - - NSStringTransform get NSStringTransformLatinToCyrillic => - _NSStringTransformLatinToCyrillic.value; - - set NSStringTransformLatinToCyrillic(NSStringTransform value) => - _NSStringTransformLatinToCyrillic.value = value; - - late final ffi.Pointer _NSStringTransformLatinToGreek = - _lookup('NSStringTransformLatinToGreek'); - - NSStringTransform get NSStringTransformLatinToGreek => - _NSStringTransformLatinToGreek.value; - - set NSStringTransformLatinToGreek(NSStringTransform value) => - _NSStringTransformLatinToGreek.value = value; - - late final ffi.Pointer _NSStringTransformToLatin = - _lookup('NSStringTransformToLatin'); - - NSStringTransform get NSStringTransformToLatin => - _NSStringTransformToLatin.value; - - set NSStringTransformToLatin(NSStringTransform value) => - _NSStringTransformToLatin.value = value; - - late final ffi.Pointer _NSStringTransformMandarinToLatin = - _lookup('NSStringTransformMandarinToLatin'); - - NSStringTransform get NSStringTransformMandarinToLatin => - _NSStringTransformMandarinToLatin.value; - - set NSStringTransformMandarinToLatin(NSStringTransform value) => - _NSStringTransformMandarinToLatin.value = value; - - late final ffi.Pointer - _NSStringTransformHiraganaToKatakana = - _lookup('NSStringTransformHiraganaToKatakana'); - - NSStringTransform get NSStringTransformHiraganaToKatakana => - _NSStringTransformHiraganaToKatakana.value; - - set NSStringTransformHiraganaToKatakana(NSStringTransform value) => - _NSStringTransformHiraganaToKatakana.value = value; - - late final ffi.Pointer - _NSStringTransformFullwidthToHalfwidth = - _lookup('NSStringTransformFullwidthToHalfwidth'); - - NSStringTransform get NSStringTransformFullwidthToHalfwidth => - _NSStringTransformFullwidthToHalfwidth.value; - - set NSStringTransformFullwidthToHalfwidth(NSStringTransform value) => - _NSStringTransformFullwidthToHalfwidth.value = value; - - late final ffi.Pointer _NSStringTransformToXMLHex = - _lookup('NSStringTransformToXMLHex'); - - NSStringTransform get NSStringTransformToXMLHex => - _NSStringTransformToXMLHex.value; - - set NSStringTransformToXMLHex(NSStringTransform value) => - _NSStringTransformToXMLHex.value = value; - - late final ffi.Pointer _NSStringTransformToUnicodeName = - _lookup('NSStringTransformToUnicodeName'); - - NSStringTransform get NSStringTransformToUnicodeName => - _NSStringTransformToUnicodeName.value; - - set NSStringTransformToUnicodeName(NSStringTransform value) => - _NSStringTransformToUnicodeName.value = value; - - late final ffi.Pointer - _NSStringTransformStripCombiningMarks = - _lookup('NSStringTransformStripCombiningMarks'); - - NSStringTransform get NSStringTransformStripCombiningMarks => - _NSStringTransformStripCombiningMarks.value; - - set NSStringTransformStripCombiningMarks(NSStringTransform value) => - _NSStringTransformStripCombiningMarks.value = value; - - late final ffi.Pointer _NSStringTransformStripDiacritics = - _lookup('NSStringTransformStripDiacritics'); - - NSStringTransform get NSStringTransformStripDiacritics => - _NSStringTransformStripDiacritics.value; - - set NSStringTransformStripDiacritics(NSStringTransform value) => - _NSStringTransformStripDiacritics.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionSuggestedEncodingsKey = - _lookup( - 'NSStringEncodingDetectionSuggestedEncodingsKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionSuggestedEncodingsKey => - _NSStringEncodingDetectionSuggestedEncodingsKey.value; - - set NSStringEncodingDetectionSuggestedEncodingsKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionSuggestedEncodingsKey.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionDisallowedEncodingsKey = - _lookup( - 'NSStringEncodingDetectionDisallowedEncodingsKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionDisallowedEncodingsKey => - _NSStringEncodingDetectionDisallowedEncodingsKey.value; - - set NSStringEncodingDetectionDisallowedEncodingsKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionDisallowedEncodingsKey.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey = - _lookup( - 'NSStringEncodingDetectionUseOnlySuggestedEncodingsKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionUseOnlySuggestedEncodingsKey => - _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value; - - set NSStringEncodingDetectionUseOnlySuggestedEncodingsKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionAllowLossyKey = - _lookup( - 'NSStringEncodingDetectionAllowLossyKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionAllowLossyKey => - _NSStringEncodingDetectionAllowLossyKey.value; - - set NSStringEncodingDetectionAllowLossyKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionAllowLossyKey.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionFromWindowsKey = - _lookup( - 'NSStringEncodingDetectionFromWindowsKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionFromWindowsKey => - _NSStringEncodingDetectionFromWindowsKey.value; - - set NSStringEncodingDetectionFromWindowsKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionFromWindowsKey.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionLossySubstitutionKey = - _lookup( - 'NSStringEncodingDetectionLossySubstitutionKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionLossySubstitutionKey => - _NSStringEncodingDetectionLossySubstitutionKey.value; - - set NSStringEncodingDetectionLossySubstitutionKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionLossySubstitutionKey.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionLikelyLanguageKey = - _lookup( - 'NSStringEncodingDetectionLikelyLanguageKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionLikelyLanguageKey => - _NSStringEncodingDetectionLikelyLanguageKey.value; - - set NSStringEncodingDetectionLikelyLanguageKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionLikelyLanguageKey.value = value; + late final __objc_msgSend_413Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _class_NSMutableString1 = _getClass1("NSMutableString"); - late final _sel_replaceCharactersInRange_withString_1 = - _registerName1("replaceCharactersInRange:withString:"); - void _objc_msgSend_447( + late final _sel_downloadTaskWithResumeData_1 = + _registerName1("downloadTaskWithResumeData:"); + ffi.Pointer _objc_msgSend_414( ffi.Pointer obj, ffi.Pointer sel, - NSRange range, - ffi.Pointer aString, + ffi.Pointer resumeData, ) { - return __objc_msgSend_447( + return __objc_msgSend_414( obj, sel, - range, - aString, + resumeData, ); } - late final __objc_msgSend_447Ptr = _lookup< + late final __objc_msgSend_414Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_insertString_atIndex_1 = - _registerName1("insertString:atIndex:"); - void _objc_msgSend_448( + late final _class_NSURLSessionStreamTask1 = + _getClass1("NSURLSessionStreamTask"); + late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = + _registerName1( + "readDataOfMinLength:maxLength:timeout:completionHandler:"); + void _objc_msgSend_415( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aString, - int loc, + int minBytes, + int maxBytes, + double timeout, + ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_448( + return __objc_msgSend_415( obj, sel, - aString, - loc, + minBytes, + maxBytes, + timeout, + completionHandler, ); } - late final __objc_msgSend_448Ptr = _lookup< + late final __objc_msgSend_415Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSUInteger, + NSTimeInterval, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int, + double, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_deleteCharactersInRange_1 = - _registerName1("deleteCharactersInRange:"); - late final _sel_appendString_1 = _registerName1("appendString:"); - late final _sel_appendFormat_1 = _registerName1("appendFormat:"); - late final _sel_setString_1 = _registerName1("setString:"); - late final _sel_replaceOccurrencesOfString_withString_options_range_1 = - _registerName1("replaceOccurrencesOfString:withString:options:range:"); - int _objc_msgSend_449( + late final _sel_writeData_timeout_completionHandler_1 = + _registerName1("writeData:timeout:completionHandler:"); + void _objc_msgSend_416( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - NSRange searchRange, + ffi.Pointer data, + double timeout, + ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_449( + return __objc_msgSend_416( obj, sel, - target, - replacement, - options, - searchRange, + data, + timeout, + completionHandler, ); } - late final __objc_msgSend_449Ptr = _lookup< + late final __objc_msgSend_416Ptr = _lookup< ffi.NativeFunction< - NSUInteger Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, NSRange)>(); + NSTimeInterval, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_applyTransform_reverse_range_updatedRange_1 = - _registerName1("applyTransform:reverse:range:updatedRange:"); - bool _objc_msgSend_450( + late final _sel_captureStreams1 = _registerName1("captureStreams"); + late final _sel_closeWrite1 = _registerName1("closeWrite"); + late final _sel_closeRead1 = _registerName1("closeRead"); + late final _sel_startSecureConnection1 = + _registerName1("startSecureConnection"); + late final _sel_stopSecureConnection1 = + _registerName1("stopSecureConnection"); + late final _sel_streamTaskWithHostName_port_1 = + _registerName1("streamTaskWithHostName:port:"); + ffi.Pointer _objc_msgSend_417( ffi.Pointer obj, ffi.Pointer sel, - NSStringTransform transform, - bool reverse, - NSRange range, - NSRangePointer resultingRange, + ffi.Pointer hostname, + int port, ) { - return __objc_msgSend_450( + return __objc_msgSend_417( obj, sel, - transform, - reverse, - range, - resultingRange, + hostname, + port, ); } - late final __objc_msgSend_450Ptr = _lookup< + late final __objc_msgSend_417Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - NSStringTransform, - ffi.Bool, - NSRange, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - NSStringTransform, bool, NSRange, NSRangePointer)>(); + ffi.Pointer, + NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); - ffi.Pointer _objc_msgSend_451( + late final _class_NSNetService1 = _getClass1("NSNetService"); + late final _sel_streamTaskWithNetService_1 = + _registerName1("streamTaskWithNetService:"); + ffi.Pointer _objc_msgSend_418( ffi.Pointer obj, ffi.Pointer sel, - int capacity, + ffi.Pointer service, ) { - return __objc_msgSend_451( + return __objc_msgSend_418( obj, sel, - capacity, + service, ); } - late final __objc_msgSend_451Ptr = _lookup< + late final __objc_msgSend_418Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_stringWithCapacity_1 = _registerName1("stringWithCapacity:"); - late final ffi.Pointer _NSCharacterConversionException = - _lookup('NSCharacterConversionException'); - - NSExceptionName get NSCharacterConversionException => - _NSCharacterConversionException.value; - - set NSCharacterConversionException(NSExceptionName value) => - _NSCharacterConversionException.value = value; - - late final ffi.Pointer _NSParseErrorException = - _lookup('NSParseErrorException'); - - NSExceptionName get NSParseErrorException => _NSParseErrorException.value; - - set NSParseErrorException(NSExceptionName value) => - _NSParseErrorException.value = value; + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _class_NSSimpleCString1 = _getClass1("NSSimpleCString"); - late final _class_NSConstantString1 = _getClass1("NSConstantString"); - late final _class_NSMutableCharacterSet1 = - _getClass1("NSMutableCharacterSet"); - late final _sel_addCharactersInRange_1 = - _registerName1("addCharactersInRange:"); - late final _sel_removeCharactersInRange_1 = - _registerName1("removeCharactersInRange:"); - late final _sel_addCharactersInString_1 = - _registerName1("addCharactersInString:"); - late final _sel_removeCharactersInString_1 = - _registerName1("removeCharactersInString:"); - late final _sel_formUnionWithCharacterSet_1 = - _registerName1("formUnionWithCharacterSet:"); - void _objc_msgSend_452( + late final _class_NSURLSessionWebSocketTask1 = + _getClass1("NSURLSessionWebSocketTask"); + late final _class_NSURLSessionWebSocketMessage1 = + _getClass1("NSURLSessionWebSocketMessage"); + late final _sel_type1 = _registerName1("type"); + int _objc_msgSend_419( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherSet, ) { - return __objc_msgSend_452( + return __objc_msgSend_419( obj, sel, - otherSet, ); } - late final __objc_msgSend_452Ptr = _lookup< + late final __objc_msgSend_419Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_formIntersectionWithCharacterSet_1 = - _registerName1("formIntersectionWithCharacterSet:"); - late final _sel_invert1 = _registerName1("invert"); - ffi.Pointer _objc_msgSend_453( + late final _sel_sendMessage_completionHandler_1 = + _registerName1("sendMessage:completionHandler:"); + void _objc_msgSend_420( ffi.Pointer obj, ffi.Pointer sel, - NSRange aRange, + ffi.Pointer message, + ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_453( + return __objc_msgSend_420( obj, sel, - aRange, + message, + completionHandler, ); } - late final __objc_msgSend_453Ptr = _lookup< + late final __objc_msgSend_420Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - ffi.Pointer _objc_msgSend_454( + late final _sel_receiveMessageWithCompletionHandler_1 = + _registerName1("receiveMessageWithCompletionHandler:"); + void _objc_msgSend_421( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aString, + ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_454( + return __objc_msgSend_421( obj, sel, - aString, + completionHandler, ); } - late final __objc_msgSend_454Ptr = _lookup< + late final __objc_msgSend_421Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - ffi.Pointer _objc_msgSend_455( + late final _sel_sendPingWithPongReceiveHandler_1 = + _registerName1("sendPingWithPongReceiveHandler:"); + void _objc_msgSend_422( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer data, + ffi.Pointer<_ObjCBlock> pongReceiveHandler, ) { - return __objc_msgSend_455( + return __objc_msgSend_422( obj, sel, - data, + pongReceiveHandler, ); } - late final __objc_msgSend_455Ptr = _lookup< + late final __objc_msgSend_422Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final ffi.Pointer> _NSHTTPPropertyStatusCodeKey = - _lookup>('NSHTTPPropertyStatusCodeKey'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - ffi.Pointer get NSHTTPPropertyStatusCodeKey => - _NSHTTPPropertyStatusCodeKey.value; + late final _sel_cancelWithCloseCode_reason_1 = + _registerName1("cancelWithCloseCode:reason:"); + void _objc_msgSend_423( + ffi.Pointer obj, + ffi.Pointer sel, + int closeCode, + ffi.Pointer reason, + ) { + return __objc_msgSend_423( + obj, + sel, + closeCode, + reason, + ); + } - set NSHTTPPropertyStatusCodeKey(ffi.Pointer value) => - _NSHTTPPropertyStatusCodeKey.value = value; + late final __objc_msgSend_423Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); - late final ffi.Pointer> - _NSHTTPPropertyStatusReasonKey = - _lookup>('NSHTTPPropertyStatusReasonKey'); + late final _sel_maximumMessageSize1 = _registerName1("maximumMessageSize"); + late final _sel_setMaximumMessageSize_1 = + _registerName1("setMaximumMessageSize:"); + late final _sel_closeCode1 = _registerName1("closeCode"); + int _objc_msgSend_424( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_424( + obj, + sel, + ); + } - ffi.Pointer get NSHTTPPropertyStatusReasonKey => - _NSHTTPPropertyStatusReasonKey.value; + late final __objc_msgSend_424Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - set NSHTTPPropertyStatusReasonKey(ffi.Pointer value) => - _NSHTTPPropertyStatusReasonKey.value = value; + late final _sel_closeReason1 = _registerName1("closeReason"); + late final _sel_webSocketTaskWithURL_1 = + _registerName1("webSocketTaskWithURL:"); + ffi.Pointer _objc_msgSend_425( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_425( + obj, + sel, + url, + ); + } - late final ffi.Pointer> - _NSHTTPPropertyServerHTTPVersionKey = - _lookup>('NSHTTPPropertyServerHTTPVersionKey'); + late final __objc_msgSend_425Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer get NSHTTPPropertyServerHTTPVersionKey => - _NSHTTPPropertyServerHTTPVersionKey.value; + late final _sel_webSocketTaskWithURL_protocols_1 = + _registerName1("webSocketTaskWithURL:protocols:"); + ffi.Pointer _objc_msgSend_426( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer protocols, + ) { + return __objc_msgSend_426( + obj, + sel, + url, + protocols, + ); + } - set NSHTTPPropertyServerHTTPVersionKey(ffi.Pointer value) => - _NSHTTPPropertyServerHTTPVersionKey.value = value; + late final __objc_msgSend_426Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - late final ffi.Pointer> - _NSHTTPPropertyRedirectionHeadersKey = - _lookup>('NSHTTPPropertyRedirectionHeadersKey'); + late final _sel_webSocketTaskWithRequest_1 = + _registerName1("webSocketTaskWithRequest:"); + ffi.Pointer _objc_msgSend_427( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_427( + obj, + sel, + request, + ); + } - ffi.Pointer get NSHTTPPropertyRedirectionHeadersKey => - _NSHTTPPropertyRedirectionHeadersKey.value; + late final __objc_msgSend_427Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set NSHTTPPropertyRedirectionHeadersKey(ffi.Pointer value) => - _NSHTTPPropertyRedirectionHeadersKey.value = value; + late final _sel_dataTaskWithRequest_completionHandler_1 = + _registerName1("dataTaskWithRequest:completionHandler:"); + ffi.Pointer _objc_msgSend_428( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_428( + obj, + sel, + request, + completionHandler, + ); + } - late final ffi.Pointer> - _NSHTTPPropertyErrorPageDataKey = - _lookup>('NSHTTPPropertyErrorPageDataKey'); + late final __objc_msgSend_428Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - ffi.Pointer get NSHTTPPropertyErrorPageDataKey => - _NSHTTPPropertyErrorPageDataKey.value; + late final _sel_dataTaskWithURL_completionHandler_1 = + _registerName1("dataTaskWithURL:completionHandler:"); + ffi.Pointer _objc_msgSend_429( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_429( + obj, + sel, + url, + completionHandler, + ); + } - set NSHTTPPropertyErrorPageDataKey(ffi.Pointer value) => - _NSHTTPPropertyErrorPageDataKey.value = value; + late final __objc_msgSend_429Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final ffi.Pointer> _NSHTTPPropertyHTTPProxy = - _lookup>('NSHTTPPropertyHTTPProxy'); + late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = + _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); + ffi.Pointer _objc_msgSend_430( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer fileURL, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_430( + obj, + sel, + request, + fileURL, + completionHandler, + ); + } - ffi.Pointer get NSHTTPPropertyHTTPProxy => - _NSHTTPPropertyHTTPProxy.value; + late final __objc_msgSend_430Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - set NSHTTPPropertyHTTPProxy(ffi.Pointer value) => - _NSHTTPPropertyHTTPProxy.value = value; + late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = + _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); + ffi.Pointer _objc_msgSend_431( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer bodyData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_431( + obj, + sel, + request, + bodyData, + completionHandler, + ); + } - late final ffi.Pointer> _NSFTPPropertyUserLoginKey = - _lookup>('NSFTPPropertyUserLoginKey'); + late final __objc_msgSend_431Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - ffi.Pointer get NSFTPPropertyUserLoginKey => - _NSFTPPropertyUserLoginKey.value; + late final _sel_downloadTaskWithRequest_completionHandler_1 = + _registerName1("downloadTaskWithRequest:completionHandler:"); + ffi.Pointer _objc_msgSend_432( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_432( + obj, + sel, + request, + completionHandler, + ); + } - set NSFTPPropertyUserLoginKey(ffi.Pointer value) => - _NSFTPPropertyUserLoginKey.value = value; + late final __objc_msgSend_432Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final ffi.Pointer> - _NSFTPPropertyUserPasswordKey = - _lookup>('NSFTPPropertyUserPasswordKey'); + late final _sel_downloadTaskWithURL_completionHandler_1 = + _registerName1("downloadTaskWithURL:completionHandler:"); + ffi.Pointer _objc_msgSend_433( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_433( + obj, + sel, + url, + completionHandler, + ); + } - ffi.Pointer get NSFTPPropertyUserPasswordKey => - _NSFTPPropertyUserPasswordKey.value; + late final __objc_msgSend_433Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - set NSFTPPropertyUserPasswordKey(ffi.Pointer value) => - _NSFTPPropertyUserPasswordKey.value = value; + late final _sel_downloadTaskWithResumeData_completionHandler_1 = + _registerName1("downloadTaskWithResumeData:completionHandler:"); + ffi.Pointer _objc_msgSend_434( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer resumeData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_434( + obj, + sel, + resumeData, + completionHandler, + ); + } - late final ffi.Pointer> - _NSFTPPropertyActiveTransferModeKey = - _lookup>('NSFTPPropertyActiveTransferModeKey'); + late final __objc_msgSend_434Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - ffi.Pointer get NSFTPPropertyActiveTransferModeKey => - _NSFTPPropertyActiveTransferModeKey.value; + late final ffi.Pointer _NSURLSessionTaskPriorityDefault = + _lookup('NSURLSessionTaskPriorityDefault'); - set NSFTPPropertyActiveTransferModeKey(ffi.Pointer value) => - _NSFTPPropertyActiveTransferModeKey.value = value; + double get NSURLSessionTaskPriorityDefault => + _NSURLSessionTaskPriorityDefault.value; - late final ffi.Pointer> _NSFTPPropertyFileOffsetKey = - _lookup>('NSFTPPropertyFileOffsetKey'); + set NSURLSessionTaskPriorityDefault(double value) => + _NSURLSessionTaskPriorityDefault.value = value; - ffi.Pointer get NSFTPPropertyFileOffsetKey => - _NSFTPPropertyFileOffsetKey.value; + late final ffi.Pointer _NSURLSessionTaskPriorityLow = + _lookup('NSURLSessionTaskPriorityLow'); - set NSFTPPropertyFileOffsetKey(ffi.Pointer value) => - _NSFTPPropertyFileOffsetKey.value = value; + double get NSURLSessionTaskPriorityLow => _NSURLSessionTaskPriorityLow.value; - late final ffi.Pointer> _NSFTPPropertyFTPProxy = - _lookup>('NSFTPPropertyFTPProxy'); + set NSURLSessionTaskPriorityLow(double value) => + _NSURLSessionTaskPriorityLow.value = value; - ffi.Pointer get NSFTPPropertyFTPProxy => - _NSFTPPropertyFTPProxy.value; + late final ffi.Pointer _NSURLSessionTaskPriorityHigh = + _lookup('NSURLSessionTaskPriorityHigh'); - set NSFTPPropertyFTPProxy(ffi.Pointer value) => - _NSFTPPropertyFTPProxy.value = value; + double get NSURLSessionTaskPriorityHigh => + _NSURLSessionTaskPriorityHigh.value; - /// A string constant for the "file" URL scheme. If you are using this to compare to a URL's scheme to see if it is a file URL, you should instead use the NSURL fileURL property -- the fileURL property is much faster. - late final ffi.Pointer> _NSURLFileScheme = - _lookup>('NSURLFileScheme'); + set NSURLSessionTaskPriorityHigh(double value) => + _NSURLSessionTaskPriorityHigh.value = value; - ffi.Pointer get NSURLFileScheme => _NSURLFileScheme.value; + /// Key in the userInfo dictionary of an NSError received during a failed download. + late final ffi.Pointer> + _NSURLSessionDownloadTaskResumeData = + _lookup>('NSURLSessionDownloadTaskResumeData'); - set NSURLFileScheme(ffi.Pointer value) => - _NSURLFileScheme.value = value; + ffi.Pointer get NSURLSessionDownloadTaskResumeData => + _NSURLSessionDownloadTaskResumeData.value; - /// Key for the resource properties that have not been set after setResourceValues:error: returns an error, returned as an array of of strings. - late final ffi.Pointer _NSURLKeysOfUnsetValuesKey = - _lookup('NSURLKeysOfUnsetValuesKey'); + set NSURLSessionDownloadTaskResumeData(ffi.Pointer value) => + _NSURLSessionDownloadTaskResumeData.value = value; - NSURLResourceKey get NSURLKeysOfUnsetValuesKey => - _NSURLKeysOfUnsetValuesKey.value; + late final _class_NSURLSessionTaskTransactionMetrics1 = + _getClass1("NSURLSessionTaskTransactionMetrics"); + late final _sel_request1 = _registerName1("request"); + late final _sel_fetchStartDate1 = _registerName1("fetchStartDate"); + late final _sel_domainLookupStartDate1 = + _registerName1("domainLookupStartDate"); + late final _sel_domainLookupEndDate1 = _registerName1("domainLookupEndDate"); + late final _sel_connectStartDate1 = _registerName1("connectStartDate"); + late final _sel_secureConnectionStartDate1 = + _registerName1("secureConnectionStartDate"); + late final _sel_secureConnectionEndDate1 = + _registerName1("secureConnectionEndDate"); + late final _sel_connectEndDate1 = _registerName1("connectEndDate"); + late final _sel_requestStartDate1 = _registerName1("requestStartDate"); + late final _sel_requestEndDate1 = _registerName1("requestEndDate"); + late final _sel_responseStartDate1 = _registerName1("responseStartDate"); + late final _sel_responseEndDate1 = _registerName1("responseEndDate"); + late final _sel_networkProtocolName1 = _registerName1("networkProtocolName"); + late final _sel_isProxyConnection1 = _registerName1("isProxyConnection"); + late final _sel_isReusedConnection1 = _registerName1("isReusedConnection"); + late final _sel_resourceFetchType1 = _registerName1("resourceFetchType"); + int _objc_msgSend_435( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_435( + obj, + sel, + ); + } - set NSURLKeysOfUnsetValuesKey(NSURLResourceKey value) => - _NSURLKeysOfUnsetValuesKey.value = value; + late final __objc_msgSend_435Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - /// The resource name provided by the file system (Read-write, value type NSString) - late final ffi.Pointer _NSURLNameKey = - _lookup('NSURLNameKey'); + late final _sel_countOfRequestHeaderBytesSent1 = + _registerName1("countOfRequestHeaderBytesSent"); + late final _sel_countOfRequestBodyBytesSent1 = + _registerName1("countOfRequestBodyBytesSent"); + late final _sel_countOfRequestBodyBytesBeforeEncoding1 = + _registerName1("countOfRequestBodyBytesBeforeEncoding"); + late final _sel_countOfResponseHeaderBytesReceived1 = + _registerName1("countOfResponseHeaderBytesReceived"); + late final _sel_countOfResponseBodyBytesReceived1 = + _registerName1("countOfResponseBodyBytesReceived"); + late final _sel_countOfResponseBodyBytesAfterDecoding1 = + _registerName1("countOfResponseBodyBytesAfterDecoding"); + late final _sel_localAddress1 = _registerName1("localAddress"); + late final _sel_localPort1 = _registerName1("localPort"); + late final _sel_remoteAddress1 = _registerName1("remoteAddress"); + late final _sel_remotePort1 = _registerName1("remotePort"); + late final _sel_negotiatedTLSProtocolVersion1 = + _registerName1("negotiatedTLSProtocolVersion"); + late final _sel_negotiatedTLSCipherSuite1 = + _registerName1("negotiatedTLSCipherSuite"); + late final _sel_isCellular1 = _registerName1("isCellular"); + late final _sel_isExpensive1 = _registerName1("isExpensive"); + late final _sel_isConstrained1 = _registerName1("isConstrained"); + late final _sel_isMultipath1 = _registerName1("isMultipath"); + late final _sel_domainResolutionProtocol1 = + _registerName1("domainResolutionProtocol"); + int _objc_msgSend_436( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_436( + obj, + sel, + ); + } - NSURLResourceKey get NSURLNameKey => _NSURLNameKey.value; + late final __objc_msgSend_436Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - set NSURLNameKey(NSURLResourceKey value) => _NSURLNameKey.value = value; + late final _class_NSURLSessionTaskMetrics1 = + _getClass1("NSURLSessionTaskMetrics"); + late final _sel_transactionMetrics1 = _registerName1("transactionMetrics"); + late final _class_NSDateInterval1 = _getClass1("NSDateInterval"); + late final _sel_taskInterval1 = _registerName1("taskInterval"); + ffi.Pointer _objc_msgSend_437( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_437( + obj, + sel, + ); + } - /// Localized or extension-hidden name as displayed to users (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedNameKey = - _lookup('NSURLLocalizedNameKey'); + late final __objc_msgSend_437Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - NSURLResourceKey get NSURLLocalizedNameKey => _NSURLLocalizedNameKey.value; + late final _sel_redirectCount1 = _registerName1("redirectCount"); + late final _class_NSItemProvider1 = _getClass1("NSItemProvider"); + late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = + _registerName1( + "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); + void _objc_msgSend_438( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_438( + obj, + sel, + typeIdentifier, + visibility, + loadHandler, + ); + } - set NSURLLocalizedNameKey(NSURLResourceKey value) => - _NSURLLocalizedNameKey.value = value; + late final __objc_msgSend_438Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - /// True for regular files (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsRegularFileKey = - _lookup('NSURLIsRegularFileKey'); + late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = + _registerName1( + "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); + void _objc_msgSend_439( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int fileOptions, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_439( + obj, + sel, + typeIdentifier, + fileOptions, + visibility, + loadHandler, + ); + } - NSURLResourceKey get NSURLIsRegularFileKey => _NSURLIsRegularFileKey.value; + late final __objc_msgSend_439Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - set NSURLIsRegularFileKey(NSURLResourceKey value) => - _NSURLIsRegularFileKey.value = value; + late final _sel_registeredTypeIdentifiers1 = + _registerName1("registeredTypeIdentifiers"); + late final _sel_registeredTypeIdentifiersWithFileOptions_1 = + _registerName1("registeredTypeIdentifiersWithFileOptions:"); + ffi.Pointer _objc_msgSend_440( + ffi.Pointer obj, + ffi.Pointer sel, + int fileOptions, + ) { + return __objc_msgSend_440( + obj, + sel, + fileOptions, + ); + } - /// True for directories (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsDirectoryKey = - _lookup('NSURLIsDirectoryKey'); + late final __objc_msgSend_440Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - NSURLResourceKey get NSURLIsDirectoryKey => _NSURLIsDirectoryKey.value; + late final _sel_hasItemConformingToTypeIdentifier_1 = + _registerName1("hasItemConformingToTypeIdentifier:"); + late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = + _registerName1( + "hasRepresentationConformingToTypeIdentifier:fileOptions:"); + bool _objc_msgSend_441( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + int fileOptions, + ) { + return __objc_msgSend_441( + obj, + sel, + typeIdentifier, + fileOptions, + ); + } - set NSURLIsDirectoryKey(NSURLResourceKey value) => - _NSURLIsDirectoryKey.value = value; + late final __objc_msgSend_441Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - /// True for symlinks (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsSymbolicLinkKey = - _lookup('NSURLIsSymbolicLinkKey'); + late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadDataRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_442( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_442( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } - NSURLResourceKey get NSURLIsSymbolicLinkKey => _NSURLIsSymbolicLinkKey.value; + late final __objc_msgSend_442Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - set NSURLIsSymbolicLinkKey(NSURLResourceKey value) => - _NSURLIsSymbolicLinkKey.value = value; + late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadFileRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_443( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_443( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } - /// True for the root directory of a volume (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsVolumeKey = - _lookup('NSURLIsVolumeKey'); + late final __objc_msgSend_443Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLIsVolumeKey => _NSURLIsVolumeKey.value; + late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = + _registerName1( + "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); + ffi.Pointer _objc_msgSend_444( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_444( + obj, + sel, + typeIdentifier, + completionHandler, + ); + } - set NSURLIsVolumeKey(NSURLResourceKey value) => - _NSURLIsVolumeKey.value = value; + late final __objc_msgSend_444Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// True for packaged directories (Read-only 10_6 and 10_7, read-write 10_8, value type boolean NSNumber). Note: You can only set or clear this property on directories; if you try to set this property on non-directory objects, the property is ignored. If the directory is a package for some other reason (extension type, etc), setting this property to false will have no effect. - late final ffi.Pointer _NSURLIsPackageKey = - _lookup('NSURLIsPackageKey'); + late final _sel_suggestedName1 = _registerName1("suggestedName"); + late final _sel_setSuggestedName_1 = _registerName1("setSuggestedName:"); + late final _sel_initWithObject_1 = _registerName1("initWithObject:"); + late final _sel_registerObject_visibility_1 = + _registerName1("registerObject:visibility:"); + void _objc_msgSend_445( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer object, + int visibility, + ) { + return __objc_msgSend_445( + obj, + sel, + object, + visibility, + ); + } - NSURLResourceKey get NSURLIsPackageKey => _NSURLIsPackageKey.value; + late final __objc_msgSend_445Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - set NSURLIsPackageKey(NSURLResourceKey value) => - _NSURLIsPackageKey.value = value; + late final _sel_registerObjectOfClass_visibility_loadHandler_1 = + _registerName1("registerObjectOfClass:visibility:loadHandler:"); + void _objc_msgSend_446( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + int visibility, + ffi.Pointer<_ObjCBlock> loadHandler, + ) { + return __objc_msgSend_446( + obj, + sel, + aClass, + visibility, + loadHandler, + ); + } - /// True if resource is an application (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsApplicationKey = - _lookup('NSURLIsApplicationKey'); + late final __objc_msgSend_446Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - NSURLResourceKey get NSURLIsApplicationKey => _NSURLIsApplicationKey.value; + late final _sel_canLoadObjectOfClass_1 = + _registerName1("canLoadObjectOfClass:"); + late final _sel_loadObjectOfClass_completionHandler_1 = + _registerName1("loadObjectOfClass:completionHandler:"); + ffi.Pointer _objc_msgSend_447( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aClass, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_447( + obj, + sel, + aClass, + completionHandler, + ); + } - set NSURLIsApplicationKey(NSURLResourceKey value) => - _NSURLIsApplicationKey.value = value; + late final __objc_msgSend_447Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// True if the resource is scriptable. Only applies to applications (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLApplicationIsScriptableKey = - _lookup('NSURLApplicationIsScriptableKey'); + late final _sel_initWithItem_typeIdentifier_1 = + _registerName1("initWithItem:typeIdentifier:"); + instancetype _objc_msgSend_448( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer item, + ffi.Pointer typeIdentifier, + ) { + return __objc_msgSend_448( + obj, + sel, + item, + typeIdentifier, + ); + } - NSURLResourceKey get NSURLApplicationIsScriptableKey => - _NSURLApplicationIsScriptableKey.value; + late final __objc_msgSend_448Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set NSURLApplicationIsScriptableKey(NSURLResourceKey value) => - _NSURLApplicationIsScriptableKey.value = value; + late final _sel_registerItemForTypeIdentifier_loadHandler_1 = + _registerName1("registerItemForTypeIdentifier:loadHandler:"); + void _objc_msgSend_449( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + NSItemProviderLoadHandler loadHandler, + ) { + return __objc_msgSend_449( + obj, + sel, + typeIdentifier, + loadHandler, + ); + } - /// True for system-immutable resources (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsSystemImmutableKey = - _lookup('NSURLIsSystemImmutableKey'); + late final __objc_msgSend_449Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderLoadHandler)>>('objc_msgSend'); + late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSItemProviderLoadHandler)>(); - NSURLResourceKey get NSURLIsSystemImmutableKey => - _NSURLIsSystemImmutableKey.value; + late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = + _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); + void _objc_msgSend_450( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer typeIdentifier, + ffi.Pointer options, + NSItemProviderCompletionHandler completionHandler, + ) { + return __objc_msgSend_450( + obj, + sel, + typeIdentifier, + options, + completionHandler, + ); + } - set NSURLIsSystemImmutableKey(NSURLResourceKey value) => - _NSURLIsSystemImmutableKey.value = value; + late final __objc_msgSend_450Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderCompletionHandler)>>('objc_msgSend'); + late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderCompletionHandler)>(); - /// True for user-immutable resources (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsUserImmutableKey = - _lookup('NSURLIsUserImmutableKey'); + late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); + NSItemProviderLoadHandler _objc_msgSend_451( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_451( + obj, + sel, + ); + } - NSURLResourceKey get NSURLIsUserImmutableKey => - _NSURLIsUserImmutableKey.value; + late final __objc_msgSend_451Ptr = _lookup< + ffi.NativeFunction< + NSItemProviderLoadHandler Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< + NSItemProviderLoadHandler Function( + ffi.Pointer, ffi.Pointer)>(); - set NSURLIsUserImmutableKey(NSURLResourceKey value) => - _NSURLIsUserImmutableKey.value = value; + late final _sel_setPreviewImageHandler_1 = + _registerName1("setPreviewImageHandler:"); + void _objc_msgSend_452( + ffi.Pointer obj, + ffi.Pointer sel, + NSItemProviderLoadHandler value, + ) { + return __objc_msgSend_452( + obj, + sel, + value, + ); + } - /// True for resources normally not displayed to users (Read-write, value type boolean NSNumber). Note: If the resource is a hidden because its name starts with a period, setting this property to false will not change the property. - late final ffi.Pointer _NSURLIsHiddenKey = - _lookup('NSURLIsHiddenKey'); - - NSURLResourceKey get NSURLIsHiddenKey => _NSURLIsHiddenKey.value; - - set NSURLIsHiddenKey(NSURLResourceKey value) => - _NSURLIsHiddenKey.value = value; - - /// True for resources whose filename extension is removed from the localized name property (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLHasHiddenExtensionKey = - _lookup('NSURLHasHiddenExtensionKey'); - - NSURLResourceKey get NSURLHasHiddenExtensionKey => - _NSURLHasHiddenExtensionKey.value; + late final __objc_msgSend_452Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSItemProviderLoadHandler)>>('objc_msgSend'); + late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSItemProviderLoadHandler)>(); - set NSURLHasHiddenExtensionKey(NSURLResourceKey value) => - _NSURLHasHiddenExtensionKey.value = value; + late final _sel_loadPreviewImageWithOptions_completionHandler_1 = + _registerName1("loadPreviewImageWithOptions:completionHandler:"); + void _objc_msgSend_453( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer options, + NSItemProviderCompletionHandler completionHandler, + ) { + return __objc_msgSend_453( + obj, + sel, + options, + completionHandler, + ); + } - /// The date the resource was created (Read-write, value type NSDate) - late final ffi.Pointer _NSURLCreationDateKey = - _lookup('NSURLCreationDateKey'); + late final __objc_msgSend_453Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSItemProviderCompletionHandler)>>('objc_msgSend'); + late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSItemProviderCompletionHandler)>(); - NSURLResourceKey get NSURLCreationDateKey => _NSURLCreationDateKey.value; + late final ffi.Pointer> + _NSItemProviderPreferredImageSizeKey = + _lookup>('NSItemProviderPreferredImageSizeKey'); - set NSURLCreationDateKey(NSURLResourceKey value) => - _NSURLCreationDateKey.value = value; + ffi.Pointer get NSItemProviderPreferredImageSizeKey => + _NSItemProviderPreferredImageSizeKey.value; - /// The date the resource was last accessed (Read-write, value type NSDate) - late final ffi.Pointer _NSURLContentAccessDateKey = - _lookup('NSURLContentAccessDateKey'); + set NSItemProviderPreferredImageSizeKey(ffi.Pointer value) => + _NSItemProviderPreferredImageSizeKey.value = value; - NSURLResourceKey get NSURLContentAccessDateKey => - _NSURLContentAccessDateKey.value; + late final ffi.Pointer> + _NSExtensionJavaScriptPreprocessingResultsKey = + _lookup>( + 'NSExtensionJavaScriptPreprocessingResultsKey'); - set NSURLContentAccessDateKey(NSURLResourceKey value) => - _NSURLContentAccessDateKey.value = value; + ffi.Pointer get NSExtensionJavaScriptPreprocessingResultsKey => + _NSExtensionJavaScriptPreprocessingResultsKey.value; - /// The time the resource content was last modified (Read-write, value type NSDate) - late final ffi.Pointer _NSURLContentModificationDateKey = - _lookup('NSURLContentModificationDateKey'); + set NSExtensionJavaScriptPreprocessingResultsKey( + ffi.Pointer value) => + _NSExtensionJavaScriptPreprocessingResultsKey.value = value; - NSURLResourceKey get NSURLContentModificationDateKey => - _NSURLContentModificationDateKey.value; + late final ffi.Pointer> + _NSExtensionJavaScriptFinalizeArgumentKey = + _lookup>( + 'NSExtensionJavaScriptFinalizeArgumentKey'); - set NSURLContentModificationDateKey(NSURLResourceKey value) => - _NSURLContentModificationDateKey.value = value; + ffi.Pointer get NSExtensionJavaScriptFinalizeArgumentKey => + _NSExtensionJavaScriptFinalizeArgumentKey.value; - /// The time the resource's attributes were last modified (Read-only, value type NSDate) - late final ffi.Pointer _NSURLAttributeModificationDateKey = - _lookup('NSURLAttributeModificationDateKey'); + set NSExtensionJavaScriptFinalizeArgumentKey(ffi.Pointer value) => + _NSExtensionJavaScriptFinalizeArgumentKey.value = value; - NSURLResourceKey get NSURLAttributeModificationDateKey => - _NSURLAttributeModificationDateKey.value; + late final ffi.Pointer> _NSItemProviderErrorDomain = + _lookup>('NSItemProviderErrorDomain'); - set NSURLAttributeModificationDateKey(NSURLResourceKey value) => - _NSURLAttributeModificationDateKey.value = value; + ffi.Pointer get NSItemProviderErrorDomain => + _NSItemProviderErrorDomain.value; - /// Number of hard links to the resource (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLLinkCountKey = - _lookup('NSURLLinkCountKey'); + set NSItemProviderErrorDomain(ffi.Pointer value) => + _NSItemProviderErrorDomain.value = value; - NSURLResourceKey get NSURLLinkCountKey => _NSURLLinkCountKey.value; + late final ffi.Pointer _NSStringTransformLatinToKatakana = + _lookup('NSStringTransformLatinToKatakana'); - set NSURLLinkCountKey(NSURLResourceKey value) => - _NSURLLinkCountKey.value = value; + NSStringTransform get NSStringTransformLatinToKatakana => + _NSStringTransformLatinToKatakana.value; - /// The resource's parent directory, if any (Read-only, value type NSURL) - late final ffi.Pointer _NSURLParentDirectoryURLKey = - _lookup('NSURLParentDirectoryURLKey'); + set NSStringTransformLatinToKatakana(NSStringTransform value) => + _NSStringTransformLatinToKatakana.value = value; - NSURLResourceKey get NSURLParentDirectoryURLKey => - _NSURLParentDirectoryURLKey.value; + late final ffi.Pointer _NSStringTransformLatinToHiragana = + _lookup('NSStringTransformLatinToHiragana'); - set NSURLParentDirectoryURLKey(NSURLResourceKey value) => - _NSURLParentDirectoryURLKey.value = value; + NSStringTransform get NSStringTransformLatinToHiragana => + _NSStringTransformLatinToHiragana.value; - /// URL of the volume on which the resource is stored (Read-only, value type NSURL) - late final ffi.Pointer _NSURLVolumeURLKey = - _lookup('NSURLVolumeURLKey'); + set NSStringTransformLatinToHiragana(NSStringTransform value) => + _NSStringTransformLatinToHiragana.value = value; - NSURLResourceKey get NSURLVolumeURLKey => _NSURLVolumeURLKey.value; + late final ffi.Pointer _NSStringTransformLatinToHangul = + _lookup('NSStringTransformLatinToHangul'); - set NSURLVolumeURLKey(NSURLResourceKey value) => - _NSURLVolumeURLKey.value = value; + NSStringTransform get NSStringTransformLatinToHangul => + _NSStringTransformLatinToHangul.value; - /// Uniform type identifier (UTI) for the resource (Read-only, value type NSString) - late final ffi.Pointer _NSURLTypeIdentifierKey = - _lookup('NSURLTypeIdentifierKey'); + set NSStringTransformLatinToHangul(NSStringTransform value) => + _NSStringTransformLatinToHangul.value = value; - NSURLResourceKey get NSURLTypeIdentifierKey => _NSURLTypeIdentifierKey.value; + late final ffi.Pointer _NSStringTransformLatinToArabic = + _lookup('NSStringTransformLatinToArabic'); - set NSURLTypeIdentifierKey(NSURLResourceKey value) => - _NSURLTypeIdentifierKey.value = value; + NSStringTransform get NSStringTransformLatinToArabic => + _NSStringTransformLatinToArabic.value; - /// File type (UTType) for the resource (Read-only, value type UTType) - late final ffi.Pointer _NSURLContentTypeKey = - _lookup('NSURLContentTypeKey'); + set NSStringTransformLatinToArabic(NSStringTransform value) => + _NSStringTransformLatinToArabic.value = value; - NSURLResourceKey get NSURLContentTypeKey => _NSURLContentTypeKey.value; + late final ffi.Pointer _NSStringTransformLatinToHebrew = + _lookup('NSStringTransformLatinToHebrew'); - set NSURLContentTypeKey(NSURLResourceKey value) => - _NSURLContentTypeKey.value = value; + NSStringTransform get NSStringTransformLatinToHebrew => + _NSStringTransformLatinToHebrew.value; - /// User-visible type or "kind" description (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedTypeDescriptionKey = - _lookup('NSURLLocalizedTypeDescriptionKey'); + set NSStringTransformLatinToHebrew(NSStringTransform value) => + _NSStringTransformLatinToHebrew.value = value; - NSURLResourceKey get NSURLLocalizedTypeDescriptionKey => - _NSURLLocalizedTypeDescriptionKey.value; + late final ffi.Pointer _NSStringTransformLatinToThai = + _lookup('NSStringTransformLatinToThai'); - set NSURLLocalizedTypeDescriptionKey(NSURLResourceKey value) => - _NSURLLocalizedTypeDescriptionKey.value = value; + NSStringTransform get NSStringTransformLatinToThai => + _NSStringTransformLatinToThai.value; - /// The label number assigned to the resource (Read-write, value type NSNumber) - late final ffi.Pointer _NSURLLabelNumberKey = - _lookup('NSURLLabelNumberKey'); + set NSStringTransformLatinToThai(NSStringTransform value) => + _NSStringTransformLatinToThai.value = value; - NSURLResourceKey get NSURLLabelNumberKey => _NSURLLabelNumberKey.value; + late final ffi.Pointer _NSStringTransformLatinToCyrillic = + _lookup('NSStringTransformLatinToCyrillic'); - set NSURLLabelNumberKey(NSURLResourceKey value) => - _NSURLLabelNumberKey.value = value; + NSStringTransform get NSStringTransformLatinToCyrillic => + _NSStringTransformLatinToCyrillic.value; - /// The color of the assigned label (Read-only, value type NSColor) - late final ffi.Pointer _NSURLLabelColorKey = - _lookup('NSURLLabelColorKey'); + set NSStringTransformLatinToCyrillic(NSStringTransform value) => + _NSStringTransformLatinToCyrillic.value = value; - NSURLResourceKey get NSURLLabelColorKey => _NSURLLabelColorKey.value; + late final ffi.Pointer _NSStringTransformLatinToGreek = + _lookup('NSStringTransformLatinToGreek'); - set NSURLLabelColorKey(NSURLResourceKey value) => - _NSURLLabelColorKey.value = value; + NSStringTransform get NSStringTransformLatinToGreek => + _NSStringTransformLatinToGreek.value; - /// The user-visible label text (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedLabelKey = - _lookup('NSURLLocalizedLabelKey'); + set NSStringTransformLatinToGreek(NSStringTransform value) => + _NSStringTransformLatinToGreek.value = value; - NSURLResourceKey get NSURLLocalizedLabelKey => _NSURLLocalizedLabelKey.value; + late final ffi.Pointer _NSStringTransformToLatin = + _lookup('NSStringTransformToLatin'); - set NSURLLocalizedLabelKey(NSURLResourceKey value) => - _NSURLLocalizedLabelKey.value = value; + NSStringTransform get NSStringTransformToLatin => + _NSStringTransformToLatin.value; - /// The icon normally displayed for the resource (Read-only, value type NSImage) - late final ffi.Pointer _NSURLEffectiveIconKey = - _lookup('NSURLEffectiveIconKey'); + set NSStringTransformToLatin(NSStringTransform value) => + _NSStringTransformToLatin.value = value; - NSURLResourceKey get NSURLEffectiveIconKey => _NSURLEffectiveIconKey.value; + late final ffi.Pointer _NSStringTransformMandarinToLatin = + _lookup('NSStringTransformMandarinToLatin'); - set NSURLEffectiveIconKey(NSURLResourceKey value) => - _NSURLEffectiveIconKey.value = value; + NSStringTransform get NSStringTransformMandarinToLatin => + _NSStringTransformMandarinToLatin.value; - /// The custom icon assigned to the resource, if any (Currently not implemented, value type NSImage) - late final ffi.Pointer _NSURLCustomIconKey = - _lookup('NSURLCustomIconKey'); + set NSStringTransformMandarinToLatin(NSStringTransform value) => + _NSStringTransformMandarinToLatin.value = value; - NSURLResourceKey get NSURLCustomIconKey => _NSURLCustomIconKey.value; + late final ffi.Pointer + _NSStringTransformHiraganaToKatakana = + _lookup('NSStringTransformHiraganaToKatakana'); - set NSURLCustomIconKey(NSURLResourceKey value) => - _NSURLCustomIconKey.value = value; + NSStringTransform get NSStringTransformHiraganaToKatakana => + _NSStringTransformHiraganaToKatakana.value; - /// An identifier which can be used to compare two file system objects for equality using -isEqual (i.e, two object identifiers are equal if they have the same file system path or if the paths are linked to same inode on the same file system). This identifier is not persistent across system restarts. (Read-only, value type id ) - late final ffi.Pointer _NSURLFileResourceIdentifierKey = - _lookup('NSURLFileResourceIdentifierKey'); + set NSStringTransformHiraganaToKatakana(NSStringTransform value) => + _NSStringTransformHiraganaToKatakana.value = value; - NSURLResourceKey get NSURLFileResourceIdentifierKey => - _NSURLFileResourceIdentifierKey.value; + late final ffi.Pointer + _NSStringTransformFullwidthToHalfwidth = + _lookup('NSStringTransformFullwidthToHalfwidth'); - set NSURLFileResourceIdentifierKey(NSURLResourceKey value) => - _NSURLFileResourceIdentifierKey.value = value; + NSStringTransform get NSStringTransformFullwidthToHalfwidth => + _NSStringTransformFullwidthToHalfwidth.value; - /// An identifier that can be used to identify the volume the file system object is on. Other objects on the same volume will have the same volume identifier and can be compared using for equality using -isEqual. This identifier is not persistent across system restarts. (Read-only, value type id ) - late final ffi.Pointer _NSURLVolumeIdentifierKey = - _lookup('NSURLVolumeIdentifierKey'); + set NSStringTransformFullwidthToHalfwidth(NSStringTransform value) => + _NSStringTransformFullwidthToHalfwidth.value = value; - NSURLResourceKey get NSURLVolumeIdentifierKey => - _NSURLVolumeIdentifierKey.value; + late final ffi.Pointer _NSStringTransformToXMLHex = + _lookup('NSStringTransformToXMLHex'); - set NSURLVolumeIdentifierKey(NSURLResourceKey value) => - _NSURLVolumeIdentifierKey.value = value; + NSStringTransform get NSStringTransformToXMLHex => + _NSStringTransformToXMLHex.value; - /// The optimal block size when reading or writing this file's data, or nil if not available. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLPreferredIOBlockSizeKey = - _lookup('NSURLPreferredIOBlockSizeKey'); + set NSStringTransformToXMLHex(NSStringTransform value) => + _NSStringTransformToXMLHex.value = value; - NSURLResourceKey get NSURLPreferredIOBlockSizeKey => - _NSURLPreferredIOBlockSizeKey.value; + late final ffi.Pointer _NSStringTransformToUnicodeName = + _lookup('NSStringTransformToUnicodeName'); - set NSURLPreferredIOBlockSizeKey(NSURLResourceKey value) => - _NSURLPreferredIOBlockSizeKey.value = value; + NSStringTransform get NSStringTransformToUnicodeName => + _NSStringTransformToUnicodeName.value; - /// true if this process (as determined by EUID) can read the resource. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsReadableKey = - _lookup('NSURLIsReadableKey'); + set NSStringTransformToUnicodeName(NSStringTransform value) => + _NSStringTransformToUnicodeName.value = value; - NSURLResourceKey get NSURLIsReadableKey => _NSURLIsReadableKey.value; + late final ffi.Pointer + _NSStringTransformStripCombiningMarks = + _lookup('NSStringTransformStripCombiningMarks'); - set NSURLIsReadableKey(NSURLResourceKey value) => - _NSURLIsReadableKey.value = value; + NSStringTransform get NSStringTransformStripCombiningMarks => + _NSStringTransformStripCombiningMarks.value; - /// true if this process (as determined by EUID) can write to the resource. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsWritableKey = - _lookup('NSURLIsWritableKey'); + set NSStringTransformStripCombiningMarks(NSStringTransform value) => + _NSStringTransformStripCombiningMarks.value = value; - NSURLResourceKey get NSURLIsWritableKey => _NSURLIsWritableKey.value; + late final ffi.Pointer _NSStringTransformStripDiacritics = + _lookup('NSStringTransformStripDiacritics'); - set NSURLIsWritableKey(NSURLResourceKey value) => - _NSURLIsWritableKey.value = value; + NSStringTransform get NSStringTransformStripDiacritics => + _NSStringTransformStripDiacritics.value; - /// true if this process (as determined by EUID) can execute a file resource or search a directory resource. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsExecutableKey = - _lookup('NSURLIsExecutableKey'); + set NSStringTransformStripDiacritics(NSStringTransform value) => + _NSStringTransformStripDiacritics.value = value; - NSURLResourceKey get NSURLIsExecutableKey => _NSURLIsExecutableKey.value; + late final ffi.Pointer + _NSStringEncodingDetectionSuggestedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionSuggestedEncodingsKey'); - set NSURLIsExecutableKey(NSURLResourceKey value) => - _NSURLIsExecutableKey.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionSuggestedEncodingsKey => + _NSStringEncodingDetectionSuggestedEncodingsKey.value; - /// The file system object's security information encapsulated in a NSFileSecurity object. (Read-write, Value type NSFileSecurity) - late final ffi.Pointer _NSURLFileSecurityKey = - _lookup('NSURLFileSecurityKey'); + set NSStringEncodingDetectionSuggestedEncodingsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionSuggestedEncodingsKey.value = value; - NSURLResourceKey get NSURLFileSecurityKey => _NSURLFileSecurityKey.value; + late final ffi.Pointer + _NSStringEncodingDetectionDisallowedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionDisallowedEncodingsKey'); - set NSURLFileSecurityKey(NSURLResourceKey value) => - _NSURLFileSecurityKey.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionDisallowedEncodingsKey => + _NSStringEncodingDetectionDisallowedEncodingsKey.value; - /// true if resource should be excluded from backups, false otherwise (Read-write, value type boolean NSNumber). This property is only useful for excluding cache and other application support files which are not needed in a backup. Some operations commonly made to user documents will cause this property to be reset to false and so this property should not be used on user documents. - late final ffi.Pointer _NSURLIsExcludedFromBackupKey = - _lookup('NSURLIsExcludedFromBackupKey'); + set NSStringEncodingDetectionDisallowedEncodingsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionDisallowedEncodingsKey.value = value; - NSURLResourceKey get NSURLIsExcludedFromBackupKey => - _NSURLIsExcludedFromBackupKey.value; + late final ffi.Pointer + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionUseOnlySuggestedEncodingsKey'); - set NSURLIsExcludedFromBackupKey(NSURLResourceKey value) => - _NSURLIsExcludedFromBackupKey.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionUseOnlySuggestedEncodingsKey => + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value; - /// The array of Tag names (Read-write, value type NSArray of NSString) - late final ffi.Pointer _NSURLTagNamesKey = - _lookup('NSURLTagNamesKey'); + set NSStringEncodingDetectionUseOnlySuggestedEncodingsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value = value; - NSURLResourceKey get NSURLTagNamesKey => _NSURLTagNamesKey.value; + late final ffi.Pointer + _NSStringEncodingDetectionAllowLossyKey = + _lookup( + 'NSStringEncodingDetectionAllowLossyKey'); - set NSURLTagNamesKey(NSURLResourceKey value) => - _NSURLTagNamesKey.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionAllowLossyKey => + _NSStringEncodingDetectionAllowLossyKey.value; - /// the URL's path as a file system path (Read-only, value type NSString) - late final ffi.Pointer _NSURLPathKey = - _lookup('NSURLPathKey'); + set NSStringEncodingDetectionAllowLossyKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionAllowLossyKey.value = value; - NSURLResourceKey get NSURLPathKey => _NSURLPathKey.value; + late final ffi.Pointer + _NSStringEncodingDetectionFromWindowsKey = + _lookup( + 'NSStringEncodingDetectionFromWindowsKey'); - set NSURLPathKey(NSURLResourceKey value) => _NSURLPathKey.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionFromWindowsKey => + _NSStringEncodingDetectionFromWindowsKey.value; - /// the URL's path as a canonical absolute file system path (Read-only, value type NSString) - late final ffi.Pointer _NSURLCanonicalPathKey = - _lookup('NSURLCanonicalPathKey'); + set NSStringEncodingDetectionFromWindowsKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionFromWindowsKey.value = value; - NSURLResourceKey get NSURLCanonicalPathKey => _NSURLCanonicalPathKey.value; + late final ffi.Pointer + _NSStringEncodingDetectionLossySubstitutionKey = + _lookup( + 'NSStringEncodingDetectionLossySubstitutionKey'); - set NSURLCanonicalPathKey(NSURLResourceKey value) => - _NSURLCanonicalPathKey.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionLossySubstitutionKey => + _NSStringEncodingDetectionLossySubstitutionKey.value; - /// true if this URL is a file system trigger directory. Traversing or opening a file system trigger will cause an attempt to mount a file system on the trigger directory. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsMountTriggerKey = - _lookup('NSURLIsMountTriggerKey'); + set NSStringEncodingDetectionLossySubstitutionKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionLossySubstitutionKey.value = value; - NSURLResourceKey get NSURLIsMountTriggerKey => _NSURLIsMountTriggerKey.value; + late final ffi.Pointer + _NSStringEncodingDetectionLikelyLanguageKey = + _lookup( + 'NSStringEncodingDetectionLikelyLanguageKey'); - set NSURLIsMountTriggerKey(NSURLResourceKey value) => - _NSURLIsMountTriggerKey.value = value; + NSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionLikelyLanguageKey => + _NSStringEncodingDetectionLikelyLanguageKey.value; - /// An opaque generation identifier which can be compared using isEqual: to determine if the data in a document has been modified. For URLs which refer to the same file inode, the generation identifier will change when the data in the file's data fork is changed (changes to extended attributes or other file system metadata do not change the generation identifier). For URLs which refer to the same directory inode, the generation identifier will change when direct children of that directory are added, removed or renamed (changes to the data of the direct children of that directory will not change the generation identifier). The generation identifier is persistent across system restarts. The generation identifier is tied to a specific document on a specific volume and is not transferred when the document is copied to another volume. This property is not supported by all volumes. (Read-only, value type id ) - late final ffi.Pointer _NSURLGenerationIdentifierKey = - _lookup('NSURLGenerationIdentifierKey'); + set NSStringEncodingDetectionLikelyLanguageKey( + NSStringEncodingDetectionOptionsKey value) => + _NSStringEncodingDetectionLikelyLanguageKey.value = value; - NSURLResourceKey get NSURLGenerationIdentifierKey => - _NSURLGenerationIdentifierKey.value; + late final _class_NSMutableString1 = _getClass1("NSMutableString"); + late final _sel_replaceCharactersInRange_withString_1 = + _registerName1("replaceCharactersInRange:withString:"); + void _objc_msgSend_454( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange range, + ffi.Pointer aString, + ) { + return __objc_msgSend_454( + obj, + sel, + range, + aString, + ); + } - set NSURLGenerationIdentifierKey(NSURLResourceKey value) => - _NSURLGenerationIdentifierKey.value = value; + late final __objc_msgSend_454Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSRange, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, NSRange, + ffi.Pointer)>(); - /// The document identifier -- a value assigned by the kernel to a document (which can be either a file or directory) and is used to identify the document regardless of where it gets moved on a volume. The document identifier survives "safe save” operations; i.e it is sticky to the path it was assigned to (-replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: is the preferred safe-save API). The document identifier is persistent across system restarts. The document identifier is not transferred when the file is copied. Document identifiers are only unique within a single volume. This property is not supported by all volumes. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLDocumentIdentifierKey = - _lookup('NSURLDocumentIdentifierKey'); + late final _sel_insertString_atIndex_1 = + _registerName1("insertString:atIndex:"); + void _objc_msgSend_455( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, + int loc, + ) { + return __objc_msgSend_455( + obj, + sel, + aString, + loc, + ); + } - NSURLResourceKey get NSURLDocumentIdentifierKey => - _NSURLDocumentIdentifierKey.value; + late final __objc_msgSend_455Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - set NSURLDocumentIdentifierKey(NSURLResourceKey value) => - _NSURLDocumentIdentifierKey.value = value; + late final _sel_deleteCharactersInRange_1 = + _registerName1("deleteCharactersInRange:"); + late final _sel_appendString_1 = _registerName1("appendString:"); + late final _sel_appendFormat_1 = _registerName1("appendFormat:"); + late final _sel_setString_1 = _registerName1("setString:"); + late final _sel_replaceOccurrencesOfString_withString_options_range_1 = + _registerName1("replaceOccurrencesOfString:withString:options:range:"); + int _objc_msgSend_456( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer replacement, + int options, + NSRange searchRange, + ) { + return __objc_msgSend_456( + obj, + sel, + target, + replacement, + options, + searchRange, + ); + } - /// The date the resource was created, or renamed into or within its parent directory. Note that inconsistent behavior may be observed when this attribute is requested on hard-linked items. This property is not supported by all volumes. (Read-only before macOS 10.15, iOS 13.0, watchOS 6.0, and tvOS 13.0; Read-write after, value type NSDate) - late final ffi.Pointer _NSURLAddedToDirectoryDateKey = - _lookup('NSURLAddedToDirectoryDateKey'); + late final __objc_msgSend_456Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + NSRange)>>('objc_msgSend'); + late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, NSRange)>(); - NSURLResourceKey get NSURLAddedToDirectoryDateKey => - _NSURLAddedToDirectoryDateKey.value; + late final _sel_applyTransform_reverse_range_updatedRange_1 = + _registerName1("applyTransform:reverse:range:updatedRange:"); + bool _objc_msgSend_457( + ffi.Pointer obj, + ffi.Pointer sel, + NSStringTransform transform, + bool reverse, + NSRange range, + NSRangePointer resultingRange, + ) { + return __objc_msgSend_457( + obj, + sel, + transform, + reverse, + range, + resultingRange, + ); + } - set NSURLAddedToDirectoryDateKey(NSURLResourceKey value) => - _NSURLAddedToDirectoryDateKey.value = value; + late final __objc_msgSend_457Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + NSStringTransform, + ffi.Bool, + NSRange, + NSRangePointer)>>('objc_msgSend'); + late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + NSStringTransform, bool, NSRange, NSRangePointer)>(); - /// The quarantine properties as defined in LSQuarantine.h. To remove quarantine information from a file, pass NSNull as the value when setting this property. (Read-write, value type NSDictionary) - late final ffi.Pointer _NSURLQuarantinePropertiesKey = - _lookup('NSURLQuarantinePropertiesKey'); + ffi.Pointer _objc_msgSend_458( + ffi.Pointer obj, + ffi.Pointer sel, + int capacity, + ) { + return __objc_msgSend_458( + obj, + sel, + capacity, + ); + } - NSURLResourceKey get NSURLQuarantinePropertiesKey => - _NSURLQuarantinePropertiesKey.value; + late final __objc_msgSend_458Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - set NSURLQuarantinePropertiesKey(NSURLResourceKey value) => - _NSURLQuarantinePropertiesKey.value = value; + late final _sel_stringWithCapacity_1 = _registerName1("stringWithCapacity:"); + late final ffi.Pointer _NSCharacterConversionException = + _lookup('NSCharacterConversionException'); - /// Returns the file system object type. (Read-only, value type NSString) - late final ffi.Pointer _NSURLFileResourceTypeKey = - _lookup('NSURLFileResourceTypeKey'); + NSExceptionName get NSCharacterConversionException => + _NSCharacterConversionException.value; - NSURLResourceKey get NSURLFileResourceTypeKey => - _NSURLFileResourceTypeKey.value; + set NSCharacterConversionException(NSExceptionName value) => + _NSCharacterConversionException.value = value; - set NSURLFileResourceTypeKey(NSURLResourceKey value) => - _NSURLFileResourceTypeKey.value = value; + late final ffi.Pointer _NSParseErrorException = + _lookup('NSParseErrorException'); - /// A 64-bit value assigned by APFS that identifies a file's content data stream. Only cloned files and their originals can have the same identifier. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileContentIdentifierKey = - _lookup('NSURLFileContentIdentifierKey'); + NSExceptionName get NSParseErrorException => _NSParseErrorException.value; - NSURLResourceKey get NSURLFileContentIdentifierKey => - _NSURLFileContentIdentifierKey.value; + set NSParseErrorException(NSExceptionName value) => + _NSParseErrorException.value = value; - set NSURLFileContentIdentifierKey(NSURLResourceKey value) => - _NSURLFileContentIdentifierKey.value = value; + late final _class_NSSimpleCString1 = _getClass1("NSSimpleCString"); + late final _class_NSConstantString1 = _getClass1("NSConstantString"); + late final _class_NSMutableCharacterSet1 = + _getClass1("NSMutableCharacterSet"); + late final _sel_addCharactersInRange_1 = + _registerName1("addCharactersInRange:"); + late final _sel_removeCharactersInRange_1 = + _registerName1("removeCharactersInRange:"); + late final _sel_addCharactersInString_1 = + _registerName1("addCharactersInString:"); + late final _sel_removeCharactersInString_1 = + _registerName1("removeCharactersInString:"); + late final _sel_formUnionWithCharacterSet_1 = + _registerName1("formUnionWithCharacterSet:"); + void _objc_msgSend_459( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer otherSet, + ) { + return __objc_msgSend_459( + obj, + sel, + otherSet, + ); + } - /// True for cloned files and their originals that may share all, some, or no data blocks. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLMayShareFileContentKey = - _lookup('NSURLMayShareFileContentKey'); + late final __objc_msgSend_459Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - NSURLResourceKey get NSURLMayShareFileContentKey => - _NSURLMayShareFileContentKey.value; + late final _sel_formIntersectionWithCharacterSet_1 = + _registerName1("formIntersectionWithCharacterSet:"); + late final _sel_invert1 = _registerName1("invert"); + ffi.Pointer _objc_msgSend_460( + ffi.Pointer obj, + ffi.Pointer sel, + NSRange aRange, + ) { + return __objc_msgSend_460( + obj, + sel, + aRange, + ); + } - set NSURLMayShareFileContentKey(NSURLResourceKey value) => - _NSURLMayShareFileContentKey.value = value; + late final __objc_msgSend_460Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSRange)>>('objc_msgSend'); + late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, NSRange)>(); - /// True if the file has extended attributes. False guarantees there are none. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLMayHaveExtendedAttributesKey = - _lookup('NSURLMayHaveExtendedAttributesKey'); + ffi.Pointer _objc_msgSend_461( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aString, + ) { + return __objc_msgSend_461( + obj, + sel, + aString, + ); + } - NSURLResourceKey get NSURLMayHaveExtendedAttributesKey => - _NSURLMayHaveExtendedAttributesKey.value; + late final __objc_msgSend_461Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set NSURLMayHaveExtendedAttributesKey(NSURLResourceKey value) => - _NSURLMayHaveExtendedAttributesKey.value = value; + ffi.Pointer _objc_msgSend_462( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_462( + obj, + sel, + data, + ); + } - /// True if the file can be deleted by the file system when asked to free space. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLIsPurgeableKey = - _lookup('NSURLIsPurgeableKey'); + late final __objc_msgSend_462Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSURLResourceKey get NSURLIsPurgeableKey => _NSURLIsPurgeableKey.value; + late final ffi.Pointer> _NSHTTPPropertyStatusCodeKey = + _lookup>('NSHTTPPropertyStatusCodeKey'); - set NSURLIsPurgeableKey(NSURLResourceKey value) => - _NSURLIsPurgeableKey.value = value; + ffi.Pointer get NSHTTPPropertyStatusCodeKey => + _NSHTTPPropertyStatusCodeKey.value; - /// True if the file has sparse regions. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLIsSparseKey = - _lookup('NSURLIsSparseKey'); + set NSHTTPPropertyStatusCodeKey(ffi.Pointer value) => + _NSHTTPPropertyStatusCodeKey.value = value; - NSURLResourceKey get NSURLIsSparseKey => _NSURLIsSparseKey.value; + late final ffi.Pointer> + _NSHTTPPropertyStatusReasonKey = + _lookup>('NSHTTPPropertyStatusReasonKey'); - set NSURLIsSparseKey(NSURLResourceKey value) => - _NSURLIsSparseKey.value = value; + ffi.Pointer get NSHTTPPropertyStatusReasonKey => + _NSHTTPPropertyStatusReasonKey.value; - /// The file system object type values returned for the NSURLFileResourceTypeKey - late final ffi.Pointer - _NSURLFileResourceTypeNamedPipe = - _lookup('NSURLFileResourceTypeNamedPipe'); + set NSHTTPPropertyStatusReasonKey(ffi.Pointer value) => + _NSHTTPPropertyStatusReasonKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeNamedPipe => - _NSURLFileResourceTypeNamedPipe.value; + late final ffi.Pointer> + _NSHTTPPropertyServerHTTPVersionKey = + _lookup>('NSHTTPPropertyServerHTTPVersionKey'); - set NSURLFileResourceTypeNamedPipe(NSURLFileResourceType value) => - _NSURLFileResourceTypeNamedPipe.value = value; + ffi.Pointer get NSHTTPPropertyServerHTTPVersionKey => + _NSHTTPPropertyServerHTTPVersionKey.value; - late final ffi.Pointer - _NSURLFileResourceTypeCharacterSpecial = - _lookup('NSURLFileResourceTypeCharacterSpecial'); + set NSHTTPPropertyServerHTTPVersionKey(ffi.Pointer value) => + _NSHTTPPropertyServerHTTPVersionKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeCharacterSpecial => - _NSURLFileResourceTypeCharacterSpecial.value; + late final ffi.Pointer> + _NSHTTPPropertyRedirectionHeadersKey = + _lookup>('NSHTTPPropertyRedirectionHeadersKey'); - set NSURLFileResourceTypeCharacterSpecial(NSURLFileResourceType value) => - _NSURLFileResourceTypeCharacterSpecial.value = value; + ffi.Pointer get NSHTTPPropertyRedirectionHeadersKey => + _NSHTTPPropertyRedirectionHeadersKey.value; - late final ffi.Pointer - _NSURLFileResourceTypeDirectory = - _lookup('NSURLFileResourceTypeDirectory'); + set NSHTTPPropertyRedirectionHeadersKey(ffi.Pointer value) => + _NSHTTPPropertyRedirectionHeadersKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeDirectory => - _NSURLFileResourceTypeDirectory.value; + late final ffi.Pointer> + _NSHTTPPropertyErrorPageDataKey = + _lookup>('NSHTTPPropertyErrorPageDataKey'); - set NSURLFileResourceTypeDirectory(NSURLFileResourceType value) => - _NSURLFileResourceTypeDirectory.value = value; + ffi.Pointer get NSHTTPPropertyErrorPageDataKey => + _NSHTTPPropertyErrorPageDataKey.value; - late final ffi.Pointer - _NSURLFileResourceTypeBlockSpecial = - _lookup('NSURLFileResourceTypeBlockSpecial'); + set NSHTTPPropertyErrorPageDataKey(ffi.Pointer value) => + _NSHTTPPropertyErrorPageDataKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeBlockSpecial => - _NSURLFileResourceTypeBlockSpecial.value; + late final ffi.Pointer> _NSHTTPPropertyHTTPProxy = + _lookup>('NSHTTPPropertyHTTPProxy'); - set NSURLFileResourceTypeBlockSpecial(NSURLFileResourceType value) => - _NSURLFileResourceTypeBlockSpecial.value = value; + ffi.Pointer get NSHTTPPropertyHTTPProxy => + _NSHTTPPropertyHTTPProxy.value; - late final ffi.Pointer _NSURLFileResourceTypeRegular = - _lookup('NSURLFileResourceTypeRegular'); + set NSHTTPPropertyHTTPProxy(ffi.Pointer value) => + _NSHTTPPropertyHTTPProxy.value = value; - NSURLFileResourceType get NSURLFileResourceTypeRegular => - _NSURLFileResourceTypeRegular.value; + late final ffi.Pointer> _NSFTPPropertyUserLoginKey = + _lookup>('NSFTPPropertyUserLoginKey'); - set NSURLFileResourceTypeRegular(NSURLFileResourceType value) => - _NSURLFileResourceTypeRegular.value = value; + ffi.Pointer get NSFTPPropertyUserLoginKey => + _NSFTPPropertyUserLoginKey.value; - late final ffi.Pointer - _NSURLFileResourceTypeSymbolicLink = - _lookup('NSURLFileResourceTypeSymbolicLink'); + set NSFTPPropertyUserLoginKey(ffi.Pointer value) => + _NSFTPPropertyUserLoginKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeSymbolicLink => - _NSURLFileResourceTypeSymbolicLink.value; + late final ffi.Pointer> + _NSFTPPropertyUserPasswordKey = + _lookup>('NSFTPPropertyUserPasswordKey'); - set NSURLFileResourceTypeSymbolicLink(NSURLFileResourceType value) => - _NSURLFileResourceTypeSymbolicLink.value = value; + ffi.Pointer get NSFTPPropertyUserPasswordKey => + _NSFTPPropertyUserPasswordKey.value; - late final ffi.Pointer _NSURLFileResourceTypeSocket = - _lookup('NSURLFileResourceTypeSocket'); + set NSFTPPropertyUserPasswordKey(ffi.Pointer value) => + _NSFTPPropertyUserPasswordKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeSocket => - _NSURLFileResourceTypeSocket.value; + late final ffi.Pointer> + _NSFTPPropertyActiveTransferModeKey = + _lookup>('NSFTPPropertyActiveTransferModeKey'); - set NSURLFileResourceTypeSocket(NSURLFileResourceType value) => - _NSURLFileResourceTypeSocket.value = value; + ffi.Pointer get NSFTPPropertyActiveTransferModeKey => + _NSFTPPropertyActiveTransferModeKey.value; - late final ffi.Pointer _NSURLFileResourceTypeUnknown = - _lookup('NSURLFileResourceTypeUnknown'); + set NSFTPPropertyActiveTransferModeKey(ffi.Pointer value) => + _NSFTPPropertyActiveTransferModeKey.value = value; - NSURLFileResourceType get NSURLFileResourceTypeUnknown => - _NSURLFileResourceTypeUnknown.value; + late final ffi.Pointer> _NSFTPPropertyFileOffsetKey = + _lookup>('NSFTPPropertyFileOffsetKey'); - set NSURLFileResourceTypeUnknown(NSURLFileResourceType value) => - _NSURLFileResourceTypeUnknown.value = value; + ffi.Pointer get NSFTPPropertyFileOffsetKey => + _NSFTPPropertyFileOffsetKey.value; - /// dictionary of NSImage/UIImage objects keyed by size - late final ffi.Pointer _NSURLThumbnailDictionaryKey = - _lookup('NSURLThumbnailDictionaryKey'); + set NSFTPPropertyFileOffsetKey(ffi.Pointer value) => + _NSFTPPropertyFileOffsetKey.value = value; - NSURLResourceKey get NSURLThumbnailDictionaryKey => - _NSURLThumbnailDictionaryKey.value; + late final ffi.Pointer> _NSFTPPropertyFTPProxy = + _lookup>('NSFTPPropertyFTPProxy'); - set NSURLThumbnailDictionaryKey(NSURLResourceKey value) => - _NSURLThumbnailDictionaryKey.value = value; + ffi.Pointer get NSFTPPropertyFTPProxy => + _NSFTPPropertyFTPProxy.value; - /// returns all thumbnails as a single NSImage - late final ffi.Pointer _NSURLThumbnailKey = - _lookup('NSURLThumbnailKey'); + set NSFTPPropertyFTPProxy(ffi.Pointer value) => + _NSFTPPropertyFTPProxy.value = value; - NSURLResourceKey get NSURLThumbnailKey => _NSURLThumbnailKey.value; + /// A string constant for the "file" URL scheme. If you are using this to compare to a URL's scheme to see if it is a file URL, you should instead use the NSURL fileURL property -- the fileURL property is much faster. + late final ffi.Pointer> _NSURLFileScheme = + _lookup>('NSURLFileScheme'); - set NSURLThumbnailKey(NSURLResourceKey value) => - _NSURLThumbnailKey.value = value; + ffi.Pointer get NSURLFileScheme => _NSURLFileScheme.value; - /// size key for a 1024 x 1024 thumbnail image - late final ffi.Pointer - _NSThumbnail1024x1024SizeKey = - _lookup('NSThumbnail1024x1024SizeKey'); + set NSURLFileScheme(ffi.Pointer value) => + _NSURLFileScheme.value = value; - NSURLThumbnailDictionaryItem get NSThumbnail1024x1024SizeKey => - _NSThumbnail1024x1024SizeKey.value; + /// Key for the resource properties that have not been set after setResourceValues:error: returns an error, returned as an array of of strings. + late final ffi.Pointer _NSURLKeysOfUnsetValuesKey = + _lookup('NSURLKeysOfUnsetValuesKey'); - set NSThumbnail1024x1024SizeKey(NSURLThumbnailDictionaryItem value) => - _NSThumbnail1024x1024SizeKey.value = value; + NSURLResourceKey get NSURLKeysOfUnsetValuesKey => + _NSURLKeysOfUnsetValuesKey.value; - /// Total file size in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileSizeKey = - _lookup('NSURLFileSizeKey'); + set NSURLKeysOfUnsetValuesKey(NSURLResourceKey value) => + _NSURLKeysOfUnsetValuesKey.value = value; - NSURLResourceKey get NSURLFileSizeKey => _NSURLFileSizeKey.value; + /// The resource name provided by the file system (Read-write, value type NSString) + late final ffi.Pointer _NSURLNameKey = + _lookup('NSURLNameKey'); - set NSURLFileSizeKey(NSURLResourceKey value) => - _NSURLFileSizeKey.value = value; + NSURLResourceKey get NSURLNameKey => _NSURLNameKey.value; - /// Total size allocated on disk for the file in bytes (number of blocks times block size) (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileAllocatedSizeKey = - _lookup('NSURLFileAllocatedSizeKey'); + set NSURLNameKey(NSURLResourceKey value) => _NSURLNameKey.value = value; - NSURLResourceKey get NSURLFileAllocatedSizeKey => - _NSURLFileAllocatedSizeKey.value; + /// Localized or extension-hidden name as displayed to users (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedNameKey = + _lookup('NSURLLocalizedNameKey'); - set NSURLFileAllocatedSizeKey(NSURLResourceKey value) => - _NSURLFileAllocatedSizeKey.value = value; + NSURLResourceKey get NSURLLocalizedNameKey => _NSURLLocalizedNameKey.value; - /// Total displayable size of the file in bytes (this may include space used by metadata), or nil if not available. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLTotalFileSizeKey = - _lookup('NSURLTotalFileSizeKey'); + set NSURLLocalizedNameKey(NSURLResourceKey value) => + _NSURLLocalizedNameKey.value = value; - NSURLResourceKey get NSURLTotalFileSizeKey => _NSURLTotalFileSizeKey.value; + /// True for regular files (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsRegularFileKey = + _lookup('NSURLIsRegularFileKey'); - set NSURLTotalFileSizeKey(NSURLResourceKey value) => - _NSURLTotalFileSizeKey.value = value; + NSURLResourceKey get NSURLIsRegularFileKey => _NSURLIsRegularFileKey.value; - /// Total allocated size of the file in bytes (this may include space used by metadata), or nil if not available. This can be less than the value returned by NSURLTotalFileSizeKey if the resource is compressed. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLTotalFileAllocatedSizeKey = - _lookup('NSURLTotalFileAllocatedSizeKey'); + set NSURLIsRegularFileKey(NSURLResourceKey value) => + _NSURLIsRegularFileKey.value = value; - NSURLResourceKey get NSURLTotalFileAllocatedSizeKey => - _NSURLTotalFileAllocatedSizeKey.value; + /// True for directories (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsDirectoryKey = + _lookup('NSURLIsDirectoryKey'); - set NSURLTotalFileAllocatedSizeKey(NSURLResourceKey value) => - _NSURLTotalFileAllocatedSizeKey.value = value; + NSURLResourceKey get NSURLIsDirectoryKey => _NSURLIsDirectoryKey.value; - /// true if the resource is a Finder alias file or a symlink, false otherwise ( Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsAliasFileKey = - _lookup('NSURLIsAliasFileKey'); + set NSURLIsDirectoryKey(NSURLResourceKey value) => + _NSURLIsDirectoryKey.value = value; - NSURLResourceKey get NSURLIsAliasFileKey => _NSURLIsAliasFileKey.value; + /// True for symlinks (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsSymbolicLinkKey = + _lookup('NSURLIsSymbolicLinkKey'); - set NSURLIsAliasFileKey(NSURLResourceKey value) => - _NSURLIsAliasFileKey.value = value; + NSURLResourceKey get NSURLIsSymbolicLinkKey => _NSURLIsSymbolicLinkKey.value; - /// The protection level for this file - late final ffi.Pointer _NSURLFileProtectionKey = - _lookup('NSURLFileProtectionKey'); + set NSURLIsSymbolicLinkKey(NSURLResourceKey value) => + _NSURLIsSymbolicLinkKey.value = value; - NSURLResourceKey get NSURLFileProtectionKey => _NSURLFileProtectionKey.value; + /// True for the root directory of a volume (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsVolumeKey = + _lookup('NSURLIsVolumeKey'); - set NSURLFileProtectionKey(NSURLResourceKey value) => - _NSURLFileProtectionKey.value = value; + NSURLResourceKey get NSURLIsVolumeKey => _NSURLIsVolumeKey.value; - /// The file has no special protections associated with it. It can be read from or written to at any time. - late final ffi.Pointer _NSURLFileProtectionNone = - _lookup('NSURLFileProtectionNone'); + set NSURLIsVolumeKey(NSURLResourceKey value) => + _NSURLIsVolumeKey.value = value; - NSURLFileProtectionType get NSURLFileProtectionNone => - _NSURLFileProtectionNone.value; + /// True for packaged directories (Read-only 10_6 and 10_7, read-write 10_8, value type boolean NSNumber). Note: You can only set or clear this property on directories; if you try to set this property on non-directory objects, the property is ignored. If the directory is a package for some other reason (extension type, etc), setting this property to false will have no effect. + late final ffi.Pointer _NSURLIsPackageKey = + _lookup('NSURLIsPackageKey'); - set NSURLFileProtectionNone(NSURLFileProtectionType value) => - _NSURLFileProtectionNone.value = value; + NSURLResourceKey get NSURLIsPackageKey => _NSURLIsPackageKey.value; - /// The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting. - late final ffi.Pointer _NSURLFileProtectionComplete = - _lookup('NSURLFileProtectionComplete'); + set NSURLIsPackageKey(NSURLResourceKey value) => + _NSURLIsPackageKey.value = value; - NSURLFileProtectionType get NSURLFileProtectionComplete => - _NSURLFileProtectionComplete.value; + /// True if resource is an application (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsApplicationKey = + _lookup('NSURLIsApplicationKey'); - set NSURLFileProtectionComplete(NSURLFileProtectionType value) => - _NSURLFileProtectionComplete.value = value; + NSURLResourceKey get NSURLIsApplicationKey => _NSURLIsApplicationKey.value; - /// The file is stored in an encrypted format on disk. Files can be created while the device is locked, but once closed, cannot be opened again until the device is unlocked. If the file is opened when unlocked, you may continue to access the file normally, even if the user locks the device. There is a small performance penalty when the file is created and opened, though not when being written to or read from. This can be mitigated by changing the file protection to NSURLFileProtectionComplete when the device is unlocked. - late final ffi.Pointer - _NSURLFileProtectionCompleteUnlessOpen = - _lookup('NSURLFileProtectionCompleteUnlessOpen'); + set NSURLIsApplicationKey(NSURLResourceKey value) => + _NSURLIsApplicationKey.value = value; - NSURLFileProtectionType get NSURLFileProtectionCompleteUnlessOpen => - _NSURLFileProtectionCompleteUnlessOpen.value; + /// True if the resource is scriptable. Only applies to applications (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLApplicationIsScriptableKey = + _lookup('NSURLApplicationIsScriptableKey'); - set NSURLFileProtectionCompleteUnlessOpen(NSURLFileProtectionType value) => - _NSURLFileProtectionCompleteUnlessOpen.value = value; + NSURLResourceKey get NSURLApplicationIsScriptableKey => + _NSURLApplicationIsScriptableKey.value; - /// The file is stored in an encrypted format on disk and cannot be accessed until after the device has booted. After the user unlocks the device for the first time, your app can access the file and continue to access it even if the user subsequently locks the device. - late final ffi.Pointer - _NSURLFileProtectionCompleteUntilFirstUserAuthentication = - _lookup( - 'NSURLFileProtectionCompleteUntilFirstUserAuthentication'); + set NSURLApplicationIsScriptableKey(NSURLResourceKey value) => + _NSURLApplicationIsScriptableKey.value = value; - NSURLFileProtectionType - get NSURLFileProtectionCompleteUntilFirstUserAuthentication => - _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value; + /// True for system-immutable resources (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsSystemImmutableKey = + _lookup('NSURLIsSystemImmutableKey'); - set NSURLFileProtectionCompleteUntilFirstUserAuthentication( - NSURLFileProtectionType value) => - _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; + NSURLResourceKey get NSURLIsSystemImmutableKey => + _NSURLIsSystemImmutableKey.value; - /// The user-visible volume format (Read-only, value type NSString) - late final ffi.Pointer - _NSURLVolumeLocalizedFormatDescriptionKey = - _lookup('NSURLVolumeLocalizedFormatDescriptionKey'); + set NSURLIsSystemImmutableKey(NSURLResourceKey value) => + _NSURLIsSystemImmutableKey.value = value; - NSURLResourceKey get NSURLVolumeLocalizedFormatDescriptionKey => - _NSURLVolumeLocalizedFormatDescriptionKey.value; + /// True for user-immutable resources (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsUserImmutableKey = + _lookup('NSURLIsUserImmutableKey'); - set NSURLVolumeLocalizedFormatDescriptionKey(NSURLResourceKey value) => - _NSURLVolumeLocalizedFormatDescriptionKey.value = value; + NSURLResourceKey get NSURLIsUserImmutableKey => + _NSURLIsUserImmutableKey.value; - /// Total volume capacity in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeTotalCapacityKey = - _lookup('NSURLVolumeTotalCapacityKey'); + set NSURLIsUserImmutableKey(NSURLResourceKey value) => + _NSURLIsUserImmutableKey.value = value; - NSURLResourceKey get NSURLVolumeTotalCapacityKey => - _NSURLVolumeTotalCapacityKey.value; + /// True for resources normally not displayed to users (Read-write, value type boolean NSNumber). Note: If the resource is a hidden because its name starts with a period, setting this property to false will not change the property. + late final ffi.Pointer _NSURLIsHiddenKey = + _lookup('NSURLIsHiddenKey'); - set NSURLVolumeTotalCapacityKey(NSURLResourceKey value) => - _NSURLVolumeTotalCapacityKey.value = value; + NSURLResourceKey get NSURLIsHiddenKey => _NSURLIsHiddenKey.value; - /// Total free space in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeAvailableCapacityKey = - _lookup('NSURLVolumeAvailableCapacityKey'); + set NSURLIsHiddenKey(NSURLResourceKey value) => + _NSURLIsHiddenKey.value = value; - NSURLResourceKey get NSURLVolumeAvailableCapacityKey => - _NSURLVolumeAvailableCapacityKey.value; + /// True for resources whose filename extension is removed from the localized name property (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLHasHiddenExtensionKey = + _lookup('NSURLHasHiddenExtensionKey'); - set NSURLVolumeAvailableCapacityKey(NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityKey.value = value; + NSURLResourceKey get NSURLHasHiddenExtensionKey => + _NSURLHasHiddenExtensionKey.value; - /// Total number of resources on the volume (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeResourceCountKey = - _lookup('NSURLVolumeResourceCountKey'); + set NSURLHasHiddenExtensionKey(NSURLResourceKey value) => + _NSURLHasHiddenExtensionKey.value = value; - NSURLResourceKey get NSURLVolumeResourceCountKey => - _NSURLVolumeResourceCountKey.value; + /// The date the resource was created (Read-write, value type NSDate) + late final ffi.Pointer _NSURLCreationDateKey = + _lookup('NSURLCreationDateKey'); - set NSURLVolumeResourceCountKey(NSURLResourceKey value) => - _NSURLVolumeResourceCountKey.value = value; + NSURLResourceKey get NSURLCreationDateKey => _NSURLCreationDateKey.value; - /// true if the volume format supports persistent object identifiers and can look up file system objects by their IDs (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsPersistentIDsKey = - _lookup('NSURLVolumeSupportsPersistentIDsKey'); + set NSURLCreationDateKey(NSURLResourceKey value) => + _NSURLCreationDateKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsPersistentIDsKey => - _NSURLVolumeSupportsPersistentIDsKey.value; + /// The date the resource was last accessed (Read-write, value type NSDate) + late final ffi.Pointer _NSURLContentAccessDateKey = + _lookup('NSURLContentAccessDateKey'); - set NSURLVolumeSupportsPersistentIDsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsPersistentIDsKey.value = value; + NSURLResourceKey get NSURLContentAccessDateKey => + _NSURLContentAccessDateKey.value; - /// true if the volume format supports symbolic links (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsSymbolicLinksKey = - _lookup('NSURLVolumeSupportsSymbolicLinksKey'); + set NSURLContentAccessDateKey(NSURLResourceKey value) => + _NSURLContentAccessDateKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsSymbolicLinksKey => - _NSURLVolumeSupportsSymbolicLinksKey.value; + /// The time the resource content was last modified (Read-write, value type NSDate) + late final ffi.Pointer _NSURLContentModificationDateKey = + _lookup('NSURLContentModificationDateKey'); - set NSURLVolumeSupportsSymbolicLinksKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSymbolicLinksKey.value = value; + NSURLResourceKey get NSURLContentModificationDateKey => + _NSURLContentModificationDateKey.value; - /// true if the volume format supports hard links (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsHardLinksKey = - _lookup('NSURLVolumeSupportsHardLinksKey'); + set NSURLContentModificationDateKey(NSURLResourceKey value) => + _NSURLContentModificationDateKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsHardLinksKey => - _NSURLVolumeSupportsHardLinksKey.value; + /// The time the resource's attributes were last modified (Read-only, value type NSDate) + late final ffi.Pointer _NSURLAttributeModificationDateKey = + _lookup('NSURLAttributeModificationDateKey'); - set NSURLVolumeSupportsHardLinksKey(NSURLResourceKey value) => - _NSURLVolumeSupportsHardLinksKey.value = value; + NSURLResourceKey get NSURLAttributeModificationDateKey => + _NSURLAttributeModificationDateKey.value; - /// true if the volume format supports a journal used to speed recovery in case of unplanned restart (such as a power outage or crash). This does not necessarily mean the volume is actively using a journal. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsJournalingKey = - _lookup('NSURLVolumeSupportsJournalingKey'); + set NSURLAttributeModificationDateKey(NSURLResourceKey value) => + _NSURLAttributeModificationDateKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsJournalingKey => - _NSURLVolumeSupportsJournalingKey.value; + /// Number of hard links to the resource (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLLinkCountKey = + _lookup('NSURLLinkCountKey'); - set NSURLVolumeSupportsJournalingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsJournalingKey.value = value; + NSURLResourceKey get NSURLLinkCountKey => _NSURLLinkCountKey.value; - /// true if the volume is currently using a journal for speedy recovery after an unplanned restart. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsJournalingKey = - _lookup('NSURLVolumeIsJournalingKey'); + set NSURLLinkCountKey(NSURLResourceKey value) => + _NSURLLinkCountKey.value = value; - NSURLResourceKey get NSURLVolumeIsJournalingKey => - _NSURLVolumeIsJournalingKey.value; + /// The resource's parent directory, if any (Read-only, value type NSURL) + late final ffi.Pointer _NSURLParentDirectoryURLKey = + _lookup('NSURLParentDirectoryURLKey'); - set NSURLVolumeIsJournalingKey(NSURLResourceKey value) => - _NSURLVolumeIsJournalingKey.value = value; + NSURLResourceKey get NSURLParentDirectoryURLKey => + _NSURLParentDirectoryURLKey.value; - /// true if the volume format supports sparse files, that is, files which can have 'holes' that have never been written to, and thus do not consume space on disk. A sparse file may have an allocated size on disk that is less than its logical length (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsSparseFilesKey = - _lookup('NSURLVolumeSupportsSparseFilesKey'); + set NSURLParentDirectoryURLKey(NSURLResourceKey value) => + _NSURLParentDirectoryURLKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsSparseFilesKey => - _NSURLVolumeSupportsSparseFilesKey.value; + /// URL of the volume on which the resource is stored (Read-only, value type NSURL) + late final ffi.Pointer _NSURLVolumeURLKey = + _lookup('NSURLVolumeURLKey'); - set NSURLVolumeSupportsSparseFilesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSparseFilesKey.value = value; + NSURLResourceKey get NSURLVolumeURLKey => _NSURLVolumeURLKey.value; - /// For security reasons, parts of a file (runs) that have never been written to must appear to contain zeroes. true if the volume keeps track of allocated but unwritten runs of a file so that it can substitute zeroes without actually writing zeroes to the media. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsZeroRunsKey = - _lookup('NSURLVolumeSupportsZeroRunsKey'); + set NSURLVolumeURLKey(NSURLResourceKey value) => + _NSURLVolumeURLKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsZeroRunsKey => - _NSURLVolumeSupportsZeroRunsKey.value; + /// Uniform type identifier (UTI) for the resource (Read-only, value type NSString) + late final ffi.Pointer _NSURLTypeIdentifierKey = + _lookup('NSURLTypeIdentifierKey'); - set NSURLVolumeSupportsZeroRunsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsZeroRunsKey.value = value; + NSURLResourceKey get NSURLTypeIdentifierKey => _NSURLTypeIdentifierKey.value; - /// true if the volume format treats upper and lower case characters in file and directory names as different. Otherwise an upper case character is equivalent to a lower case character, and you can't have two names that differ solely in the case of the characters. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsCaseSensitiveNamesKey = - _lookup('NSURLVolumeSupportsCaseSensitiveNamesKey'); + set NSURLTypeIdentifierKey(NSURLResourceKey value) => + _NSURLTypeIdentifierKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsCaseSensitiveNamesKey => - _NSURLVolumeSupportsCaseSensitiveNamesKey.value; + /// File type (UTType) for the resource (Read-only, value type UTType) + late final ffi.Pointer _NSURLContentTypeKey = + _lookup('NSURLContentTypeKey'); - set NSURLVolumeSupportsCaseSensitiveNamesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCaseSensitiveNamesKey.value = value; + NSURLResourceKey get NSURLContentTypeKey => _NSURLContentTypeKey.value; - /// true if the volume format preserves the case of file and directory names. Otherwise the volume may change the case of some characters (typically making them all upper or all lower case). (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsCasePreservedNamesKey = - _lookup('NSURLVolumeSupportsCasePreservedNamesKey'); + set NSURLContentTypeKey(NSURLResourceKey value) => + _NSURLContentTypeKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsCasePreservedNamesKey => - _NSURLVolumeSupportsCasePreservedNamesKey.value; + /// User-visible type or "kind" description (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedTypeDescriptionKey = + _lookup('NSURLLocalizedTypeDescriptionKey'); - set NSURLVolumeSupportsCasePreservedNamesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCasePreservedNamesKey.value = value; + NSURLResourceKey get NSURLLocalizedTypeDescriptionKey => + _NSURLLocalizedTypeDescriptionKey.value; - /// true if the volume supports reliable storage of times for the root directory. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsRootDirectoryDatesKey = - _lookup('NSURLVolumeSupportsRootDirectoryDatesKey'); + set NSURLLocalizedTypeDescriptionKey(NSURLResourceKey value) => + _NSURLLocalizedTypeDescriptionKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsRootDirectoryDatesKey => - _NSURLVolumeSupportsRootDirectoryDatesKey.value; + /// The label number assigned to the resource (Read-write, value type NSNumber) + late final ffi.Pointer _NSURLLabelNumberKey = + _lookup('NSURLLabelNumberKey'); - set NSURLVolumeSupportsRootDirectoryDatesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsRootDirectoryDatesKey.value = value; + NSURLResourceKey get NSURLLabelNumberKey => _NSURLLabelNumberKey.value; - /// true if the volume supports returning volume size values (NSURLVolumeTotalCapacityKey and NSURLVolumeAvailableCapacityKey). (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsVolumeSizesKey = - _lookup('NSURLVolumeSupportsVolumeSizesKey'); + set NSURLLabelNumberKey(NSURLResourceKey value) => + _NSURLLabelNumberKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsVolumeSizesKey => - _NSURLVolumeSupportsVolumeSizesKey.value; + /// The color of the assigned label (Read-only, value type NSColor) + late final ffi.Pointer _NSURLLabelColorKey = + _lookup('NSURLLabelColorKey'); - set NSURLVolumeSupportsVolumeSizesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsVolumeSizesKey.value = value; + NSURLResourceKey get NSURLLabelColorKey => _NSURLLabelColorKey.value; - /// true if the volume can be renamed. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsRenamingKey = - _lookup('NSURLVolumeSupportsRenamingKey'); + set NSURLLabelColorKey(NSURLResourceKey value) => + _NSURLLabelColorKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsRenamingKey => - _NSURLVolumeSupportsRenamingKey.value; + /// The user-visible label text (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedLabelKey = + _lookup('NSURLLocalizedLabelKey'); - set NSURLVolumeSupportsRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsRenamingKey.value = value; + NSURLResourceKey get NSURLLocalizedLabelKey => _NSURLLocalizedLabelKey.value; - /// true if the volume implements whole-file flock(2) style advisory locks, and the O_EXLOCK and O_SHLOCK flags of the open(2) call. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsAdvisoryFileLockingKey = - _lookup('NSURLVolumeSupportsAdvisoryFileLockingKey'); + set NSURLLocalizedLabelKey(NSURLResourceKey value) => + _NSURLLocalizedLabelKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsAdvisoryFileLockingKey => - _NSURLVolumeSupportsAdvisoryFileLockingKey.value; + /// The icon normally displayed for the resource (Read-only, value type NSImage) + late final ffi.Pointer _NSURLEffectiveIconKey = + _lookup('NSURLEffectiveIconKey'); - set NSURLVolumeSupportsAdvisoryFileLockingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsAdvisoryFileLockingKey.value = value; + NSURLResourceKey get NSURLEffectiveIconKey => _NSURLEffectiveIconKey.value; - /// true if the volume implements extended security (ACLs). (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsExtendedSecurityKey = - _lookup('NSURLVolumeSupportsExtendedSecurityKey'); + set NSURLEffectiveIconKey(NSURLResourceKey value) => + _NSURLEffectiveIconKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsExtendedSecurityKey => - _NSURLVolumeSupportsExtendedSecurityKey.value; + /// The custom icon assigned to the resource, if any (Currently not implemented, value type NSImage) + late final ffi.Pointer _NSURLCustomIconKey = + _lookup('NSURLCustomIconKey'); - set NSURLVolumeSupportsExtendedSecurityKey(NSURLResourceKey value) => - _NSURLVolumeSupportsExtendedSecurityKey.value = value; + NSURLResourceKey get NSURLCustomIconKey => _NSURLCustomIconKey.value; - /// true if the volume should be visible via the GUI (i.e., appear on the Desktop as a separate volume). (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsBrowsableKey = - _lookup('NSURLVolumeIsBrowsableKey'); + set NSURLCustomIconKey(NSURLResourceKey value) => + _NSURLCustomIconKey.value = value; - NSURLResourceKey get NSURLVolumeIsBrowsableKey => - _NSURLVolumeIsBrowsableKey.value; + /// An identifier which can be used to compare two file system objects for equality using -isEqual (i.e, two object identifiers are equal if they have the same file system path or if the paths are linked to same inode on the same file system). This identifier is not persistent across system restarts. (Read-only, value type id ) + late final ffi.Pointer _NSURLFileResourceIdentifierKey = + _lookup('NSURLFileResourceIdentifierKey'); - set NSURLVolumeIsBrowsableKey(NSURLResourceKey value) => - _NSURLVolumeIsBrowsableKey.value = value; + NSURLResourceKey get NSURLFileResourceIdentifierKey => + _NSURLFileResourceIdentifierKey.value; - /// The largest file size (in bytes) supported by this file system, or nil if this cannot be determined. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeMaximumFileSizeKey = - _lookup('NSURLVolumeMaximumFileSizeKey'); + set NSURLFileResourceIdentifierKey(NSURLResourceKey value) => + _NSURLFileResourceIdentifierKey.value = value; - NSURLResourceKey get NSURLVolumeMaximumFileSizeKey => - _NSURLVolumeMaximumFileSizeKey.value; + /// An identifier that can be used to identify the volume the file system object is on. Other objects on the same volume will have the same volume identifier and can be compared using for equality using -isEqual. This identifier is not persistent across system restarts. (Read-only, value type id ) + late final ffi.Pointer _NSURLVolumeIdentifierKey = + _lookup('NSURLVolumeIdentifierKey'); - set NSURLVolumeMaximumFileSizeKey(NSURLResourceKey value) => - _NSURLVolumeMaximumFileSizeKey.value = value; + NSURLResourceKey get NSURLVolumeIdentifierKey => + _NSURLVolumeIdentifierKey.value; - /// true if the volume's media is ejectable from the drive mechanism under software control. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsEjectableKey = - _lookup('NSURLVolumeIsEjectableKey'); + set NSURLVolumeIdentifierKey(NSURLResourceKey value) => + _NSURLVolumeIdentifierKey.value = value; - NSURLResourceKey get NSURLVolumeIsEjectableKey => - _NSURLVolumeIsEjectableKey.value; + /// The optimal block size when reading or writing this file's data, or nil if not available. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLPreferredIOBlockSizeKey = + _lookup('NSURLPreferredIOBlockSizeKey'); - set NSURLVolumeIsEjectableKey(NSURLResourceKey value) => - _NSURLVolumeIsEjectableKey.value = value; + NSURLResourceKey get NSURLPreferredIOBlockSizeKey => + _NSURLPreferredIOBlockSizeKey.value; - /// true if the volume's media is removable from the drive mechanism. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsRemovableKey = - _lookup('NSURLVolumeIsRemovableKey'); + set NSURLPreferredIOBlockSizeKey(NSURLResourceKey value) => + _NSURLPreferredIOBlockSizeKey.value = value; - NSURLResourceKey get NSURLVolumeIsRemovableKey => - _NSURLVolumeIsRemovableKey.value; + /// true if this process (as determined by EUID) can read the resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsReadableKey = + _lookup('NSURLIsReadableKey'); - set NSURLVolumeIsRemovableKey(NSURLResourceKey value) => - _NSURLVolumeIsRemovableKey.value = value; + NSURLResourceKey get NSURLIsReadableKey => _NSURLIsReadableKey.value; - /// true if the volume's device is connected to an internal bus, false if connected to an external bus, or nil if not available. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsInternalKey = - _lookup('NSURLVolumeIsInternalKey'); + set NSURLIsReadableKey(NSURLResourceKey value) => + _NSURLIsReadableKey.value = value; - NSURLResourceKey get NSURLVolumeIsInternalKey => - _NSURLVolumeIsInternalKey.value; + /// true if this process (as determined by EUID) can write to the resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsWritableKey = + _lookup('NSURLIsWritableKey'); - set NSURLVolumeIsInternalKey(NSURLResourceKey value) => - _NSURLVolumeIsInternalKey.value = value; + NSURLResourceKey get NSURLIsWritableKey => _NSURLIsWritableKey.value; - /// true if the volume is automounted. Note: do not mistake this with the functionality provided by kCFURLVolumeSupportsBrowsingKey. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsAutomountedKey = - _lookup('NSURLVolumeIsAutomountedKey'); + set NSURLIsWritableKey(NSURLResourceKey value) => + _NSURLIsWritableKey.value = value; - NSURLResourceKey get NSURLVolumeIsAutomountedKey => - _NSURLVolumeIsAutomountedKey.value; + /// true if this process (as determined by EUID) can execute a file resource or search a directory resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsExecutableKey = + _lookup('NSURLIsExecutableKey'); - set NSURLVolumeIsAutomountedKey(NSURLResourceKey value) => - _NSURLVolumeIsAutomountedKey.value = value; + NSURLResourceKey get NSURLIsExecutableKey => _NSURLIsExecutableKey.value; - /// true if the volume is stored on a local device. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsLocalKey = - _lookup('NSURLVolumeIsLocalKey'); + set NSURLIsExecutableKey(NSURLResourceKey value) => + _NSURLIsExecutableKey.value = value; - NSURLResourceKey get NSURLVolumeIsLocalKey => _NSURLVolumeIsLocalKey.value; + /// The file system object's security information encapsulated in a NSFileSecurity object. (Read-write, Value type NSFileSecurity) + late final ffi.Pointer _NSURLFileSecurityKey = + _lookup('NSURLFileSecurityKey'); - set NSURLVolumeIsLocalKey(NSURLResourceKey value) => - _NSURLVolumeIsLocalKey.value = value; + NSURLResourceKey get NSURLFileSecurityKey => _NSURLFileSecurityKey.value; - /// true if the volume is read-only. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsReadOnlyKey = - _lookup('NSURLVolumeIsReadOnlyKey'); + set NSURLFileSecurityKey(NSURLResourceKey value) => + _NSURLFileSecurityKey.value = value; - NSURLResourceKey get NSURLVolumeIsReadOnlyKey => - _NSURLVolumeIsReadOnlyKey.value; + /// true if resource should be excluded from backups, false otherwise (Read-write, value type boolean NSNumber). This property is only useful for excluding cache and other application support files which are not needed in a backup. Some operations commonly made to user documents will cause this property to be reset to false and so this property should not be used on user documents. + late final ffi.Pointer _NSURLIsExcludedFromBackupKey = + _lookup('NSURLIsExcludedFromBackupKey'); - set NSURLVolumeIsReadOnlyKey(NSURLResourceKey value) => - _NSURLVolumeIsReadOnlyKey.value = value; + NSURLResourceKey get NSURLIsExcludedFromBackupKey => + _NSURLIsExcludedFromBackupKey.value; - /// The volume's creation date, or nil if this cannot be determined. (Read-only, value type NSDate) - late final ffi.Pointer _NSURLVolumeCreationDateKey = - _lookup('NSURLVolumeCreationDateKey'); + set NSURLIsExcludedFromBackupKey(NSURLResourceKey value) => + _NSURLIsExcludedFromBackupKey.value = value; - NSURLResourceKey get NSURLVolumeCreationDateKey => - _NSURLVolumeCreationDateKey.value; + /// The array of Tag names (Read-write, value type NSArray of NSString) + late final ffi.Pointer _NSURLTagNamesKey = + _lookup('NSURLTagNamesKey'); - set NSURLVolumeCreationDateKey(NSURLResourceKey value) => - _NSURLVolumeCreationDateKey.value = value; + NSURLResourceKey get NSURLTagNamesKey => _NSURLTagNamesKey.value; - /// The NSURL needed to remount a network volume, or nil if not available. (Read-only, value type NSURL) - late final ffi.Pointer _NSURLVolumeURLForRemountingKey = - _lookup('NSURLVolumeURLForRemountingKey'); + set NSURLTagNamesKey(NSURLResourceKey value) => + _NSURLTagNamesKey.value = value; - NSURLResourceKey get NSURLVolumeURLForRemountingKey => - _NSURLVolumeURLForRemountingKey.value; + /// the URL's path as a file system path (Read-only, value type NSString) + late final ffi.Pointer _NSURLPathKey = + _lookup('NSURLPathKey'); - set NSURLVolumeURLForRemountingKey(NSURLResourceKey value) => - _NSURLVolumeURLForRemountingKey.value = value; + NSURLResourceKey get NSURLPathKey => _NSURLPathKey.value; - /// The volume's persistent UUID as a string, or nil if a persistent UUID is not available for the volume. (Read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeUUIDStringKey = - _lookup('NSURLVolumeUUIDStringKey'); + set NSURLPathKey(NSURLResourceKey value) => _NSURLPathKey.value = value; - NSURLResourceKey get NSURLVolumeUUIDStringKey => - _NSURLVolumeUUIDStringKey.value; + /// the URL's path as a canonical absolute file system path (Read-only, value type NSString) + late final ffi.Pointer _NSURLCanonicalPathKey = + _lookup('NSURLCanonicalPathKey'); - set NSURLVolumeUUIDStringKey(NSURLResourceKey value) => - _NSURLVolumeUUIDStringKey.value = value; + NSURLResourceKey get NSURLCanonicalPathKey => _NSURLCanonicalPathKey.value; - /// The name of the volume (Read-write if NSURLVolumeSupportsRenamingKey is YES, otherwise read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeNameKey = - _lookup('NSURLVolumeNameKey'); + set NSURLCanonicalPathKey(NSURLResourceKey value) => + _NSURLCanonicalPathKey.value = value; - NSURLResourceKey get NSURLVolumeNameKey => _NSURLVolumeNameKey.value; + /// true if this URL is a file system trigger directory. Traversing or opening a file system trigger will cause an attempt to mount a file system on the trigger directory. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsMountTriggerKey = + _lookup('NSURLIsMountTriggerKey'); - set NSURLVolumeNameKey(NSURLResourceKey value) => - _NSURLVolumeNameKey.value = value; + NSURLResourceKey get NSURLIsMountTriggerKey => _NSURLIsMountTriggerKey.value; - /// The user-presentable name of the volume (Read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeLocalizedNameKey = - _lookup('NSURLVolumeLocalizedNameKey'); + set NSURLIsMountTriggerKey(NSURLResourceKey value) => + _NSURLIsMountTriggerKey.value = value; - NSURLResourceKey get NSURLVolumeLocalizedNameKey => - _NSURLVolumeLocalizedNameKey.value; + /// An opaque generation identifier which can be compared using isEqual: to determine if the data in a document has been modified. For URLs which refer to the same file inode, the generation identifier will change when the data in the file's data fork is changed (changes to extended attributes or other file system metadata do not change the generation identifier). For URLs which refer to the same directory inode, the generation identifier will change when direct children of that directory are added, removed or renamed (changes to the data of the direct children of that directory will not change the generation identifier). The generation identifier is persistent across system restarts. The generation identifier is tied to a specific document on a specific volume and is not transferred when the document is copied to another volume. This property is not supported by all volumes. (Read-only, value type id ) + late final ffi.Pointer _NSURLGenerationIdentifierKey = + _lookup('NSURLGenerationIdentifierKey'); - set NSURLVolumeLocalizedNameKey(NSURLResourceKey value) => - _NSURLVolumeLocalizedNameKey.value = value; + NSURLResourceKey get NSURLGenerationIdentifierKey => + _NSURLGenerationIdentifierKey.value; - /// true if the volume is encrypted. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsEncryptedKey = - _lookup('NSURLVolumeIsEncryptedKey'); + set NSURLGenerationIdentifierKey(NSURLResourceKey value) => + _NSURLGenerationIdentifierKey.value = value; - NSURLResourceKey get NSURLVolumeIsEncryptedKey => - _NSURLVolumeIsEncryptedKey.value; + /// The document identifier -- a value assigned by the kernel to a document (which can be either a file or directory) and is used to identify the document regardless of where it gets moved on a volume. The document identifier survives "safe save” operations; i.e it is sticky to the path it was assigned to (-replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: is the preferred safe-save API). The document identifier is persistent across system restarts. The document identifier is not transferred when the file is copied. Document identifiers are only unique within a single volume. This property is not supported by all volumes. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLDocumentIdentifierKey = + _lookup('NSURLDocumentIdentifierKey'); - set NSURLVolumeIsEncryptedKey(NSURLResourceKey value) => - _NSURLVolumeIsEncryptedKey.value = value; + NSURLResourceKey get NSURLDocumentIdentifierKey => + _NSURLDocumentIdentifierKey.value; - /// true if the volume is the root filesystem. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsRootFileSystemKey = - _lookup('NSURLVolumeIsRootFileSystemKey'); + set NSURLDocumentIdentifierKey(NSURLResourceKey value) => + _NSURLDocumentIdentifierKey.value = value; - NSURLResourceKey get NSURLVolumeIsRootFileSystemKey => - _NSURLVolumeIsRootFileSystemKey.value; + /// The date the resource was created, or renamed into or within its parent directory. Note that inconsistent behavior may be observed when this attribute is requested on hard-linked items. This property is not supported by all volumes. (Read-only before macOS 10.15, iOS 13.0, watchOS 6.0, and tvOS 13.0; Read-write after, value type NSDate) + late final ffi.Pointer _NSURLAddedToDirectoryDateKey = + _lookup('NSURLAddedToDirectoryDateKey'); - set NSURLVolumeIsRootFileSystemKey(NSURLResourceKey value) => - _NSURLVolumeIsRootFileSystemKey.value = value; + NSURLResourceKey get NSURLAddedToDirectoryDateKey => + _NSURLAddedToDirectoryDateKey.value; - /// true if the volume supports transparent decompression of compressed files using decmpfs. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsCompressionKey = - _lookup('NSURLVolumeSupportsCompressionKey'); + set NSURLAddedToDirectoryDateKey(NSURLResourceKey value) => + _NSURLAddedToDirectoryDateKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsCompressionKey => - _NSURLVolumeSupportsCompressionKey.value; + /// The quarantine properties as defined in LSQuarantine.h. To remove quarantine information from a file, pass NSNull as the value when setting this property. (Read-write, value type NSDictionary) + late final ffi.Pointer _NSURLQuarantinePropertiesKey = + _lookup('NSURLQuarantinePropertiesKey'); - set NSURLVolumeSupportsCompressionKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCompressionKey.value = value; + NSURLResourceKey get NSURLQuarantinePropertiesKey => + _NSURLQuarantinePropertiesKey.value; - /// true if the volume supports clonefile(2) (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsFileCloningKey = - _lookup('NSURLVolumeSupportsFileCloningKey'); + set NSURLQuarantinePropertiesKey(NSURLResourceKey value) => + _NSURLQuarantinePropertiesKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsFileCloningKey => - _NSURLVolumeSupportsFileCloningKey.value; + /// Returns the file system object type. (Read-only, value type NSString) + late final ffi.Pointer _NSURLFileResourceTypeKey = + _lookup('NSURLFileResourceTypeKey'); - set NSURLVolumeSupportsFileCloningKey(NSURLResourceKey value) => - _NSURLVolumeSupportsFileCloningKey.value = value; + NSURLResourceKey get NSURLFileResourceTypeKey => + _NSURLFileResourceTypeKey.value; - /// true if the volume supports renamex_np(2)'s RENAME_SWAP option (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsSwapRenamingKey = - _lookup('NSURLVolumeSupportsSwapRenamingKey'); + set NSURLFileResourceTypeKey(NSURLResourceKey value) => + _NSURLFileResourceTypeKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsSwapRenamingKey => - _NSURLVolumeSupportsSwapRenamingKey.value; + /// The file system's internal inode identifier for the item. This value is not stable for all file systems or across all mounts, so it should be used sparingly and not persisted. It is useful, for example, to match URLs from the URL enumerator with paths from FSEvents. (Read-only, value type NSNumber containing an unsigned long long). + late final ffi.Pointer _NSURLFileIdentifierKey = + _lookup('NSURLFileIdentifierKey'); - set NSURLVolumeSupportsSwapRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSwapRenamingKey.value = value; + NSURLResourceKey get NSURLFileIdentifierKey => _NSURLFileIdentifierKey.value; - /// true if the volume supports renamex_np(2)'s RENAME_EXCL option (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsExclusiveRenamingKey = - _lookup('NSURLVolumeSupportsExclusiveRenamingKey'); + set NSURLFileIdentifierKey(NSURLResourceKey value) => + _NSURLFileIdentifierKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsExclusiveRenamingKey => - _NSURLVolumeSupportsExclusiveRenamingKey.value; + /// A 64-bit value assigned by APFS that identifies a file's content data stream. Only cloned files and their originals can have the same identifier. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileContentIdentifierKey = + _lookup('NSURLFileContentIdentifierKey'); - set NSURLVolumeSupportsExclusiveRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsExclusiveRenamingKey.value = value; + NSURLResourceKey get NSURLFileContentIdentifierKey => + _NSURLFileContentIdentifierKey.value; - /// true if the volume supports making files immutable with the NSURLIsUserImmutableKey or NSURLIsSystemImmutableKey properties (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsImmutableFilesKey = - _lookup('NSURLVolumeSupportsImmutableFilesKey'); + set NSURLFileContentIdentifierKey(NSURLResourceKey value) => + _NSURLFileContentIdentifierKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsImmutableFilesKey => - _NSURLVolumeSupportsImmutableFilesKey.value; + /// True for cloned files and their originals that may share all, some, or no data blocks. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLMayShareFileContentKey = + _lookup('NSURLMayShareFileContentKey'); - set NSURLVolumeSupportsImmutableFilesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsImmutableFilesKey.value = value; + NSURLResourceKey get NSURLMayShareFileContentKey => + _NSURLMayShareFileContentKey.value; - /// true if the volume supports setting POSIX access permissions with the NSURLFileSecurityKey property (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsAccessPermissionsKey = - _lookup('NSURLVolumeSupportsAccessPermissionsKey'); + set NSURLMayShareFileContentKey(NSURLResourceKey value) => + _NSURLMayShareFileContentKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsAccessPermissionsKey => - _NSURLVolumeSupportsAccessPermissionsKey.value; + /// True if the file has extended attributes. False guarantees there are none. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLMayHaveExtendedAttributesKey = + _lookup('NSURLMayHaveExtendedAttributesKey'); - set NSURLVolumeSupportsAccessPermissionsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsAccessPermissionsKey.value = value; + NSURLResourceKey get NSURLMayHaveExtendedAttributesKey => + _NSURLMayHaveExtendedAttributesKey.value; - /// True if the volume supports the File Protection attribute (see NSURLFileProtectionKey). (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsFileProtectionKey = - _lookup('NSURLVolumeSupportsFileProtectionKey'); + set NSURLMayHaveExtendedAttributesKey(NSURLResourceKey value) => + _NSURLMayHaveExtendedAttributesKey.value = value; - NSURLResourceKey get NSURLVolumeSupportsFileProtectionKey => - _NSURLVolumeSupportsFileProtectionKey.value; + /// True if the file can be deleted by the file system when asked to free space. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLIsPurgeableKey = + _lookup('NSURLIsPurgeableKey'); - set NSURLVolumeSupportsFileProtectionKey(NSURLResourceKey value) => - _NSURLVolumeSupportsFileProtectionKey.value = value; + NSURLResourceKey get NSURLIsPurgeableKey => _NSURLIsPurgeableKey.value; - /// (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeAvailableCapacityForImportantUsageKey = - _lookup( - 'NSURLVolumeAvailableCapacityForImportantUsageKey'); + set NSURLIsPurgeableKey(NSURLResourceKey value) => + _NSURLIsPurgeableKey.value = value; - NSURLResourceKey get NSURLVolumeAvailableCapacityForImportantUsageKey => - _NSURLVolumeAvailableCapacityForImportantUsageKey.value; + /// True if the file has sparse regions. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLIsSparseKey = + _lookup('NSURLIsSparseKey'); - set NSURLVolumeAvailableCapacityForImportantUsageKey( - NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityForImportantUsageKey.value = value; + NSURLResourceKey get NSURLIsSparseKey => _NSURLIsSparseKey.value; - /// (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey = - _lookup( - 'NSURLVolumeAvailableCapacityForOpportunisticUsageKey'); + set NSURLIsSparseKey(NSURLResourceKey value) => + _NSURLIsSparseKey.value = value; - NSURLResourceKey get NSURLVolumeAvailableCapacityForOpportunisticUsageKey => - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value; + /// The file system object type values returned for the NSURLFileResourceTypeKey + late final ffi.Pointer + _NSURLFileResourceTypeNamedPipe = + _lookup('NSURLFileResourceTypeNamedPipe'); - set NSURLVolumeAvailableCapacityForOpportunisticUsageKey( - NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; + NSURLFileResourceType get NSURLFileResourceTypeNamedPipe => + _NSURLFileResourceTypeNamedPipe.value; - /// true if this item is synced to the cloud, false if it is only a local file. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsUbiquitousItemKey = - _lookup('NSURLIsUbiquitousItemKey'); + set NSURLFileResourceTypeNamedPipe(NSURLFileResourceType value) => + _NSURLFileResourceTypeNamedPipe.value = value; - NSURLResourceKey get NSURLIsUbiquitousItemKey => - _NSURLIsUbiquitousItemKey.value; + late final ffi.Pointer + _NSURLFileResourceTypeCharacterSpecial = + _lookup('NSURLFileResourceTypeCharacterSpecial'); - set NSURLIsUbiquitousItemKey(NSURLResourceKey value) => - _NSURLIsUbiquitousItemKey.value = value; + NSURLFileResourceType get NSURLFileResourceTypeCharacterSpecial => + _NSURLFileResourceTypeCharacterSpecial.value; - /// true if this item has conflicts outstanding. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemHasUnresolvedConflictsKey = - _lookup('NSURLUbiquitousItemHasUnresolvedConflictsKey'); + set NSURLFileResourceTypeCharacterSpecial(NSURLFileResourceType value) => + _NSURLFileResourceTypeCharacterSpecial.value = value; - NSURLResourceKey get NSURLUbiquitousItemHasUnresolvedConflictsKey => - _NSURLUbiquitousItemHasUnresolvedConflictsKey.value; + late final ffi.Pointer + _NSURLFileResourceTypeDirectory = + _lookup('NSURLFileResourceTypeDirectory'); - set NSURLUbiquitousItemHasUnresolvedConflictsKey(NSURLResourceKey value) => - _NSURLUbiquitousItemHasUnresolvedConflictsKey.value = value; + NSURLFileResourceType get NSURLFileResourceTypeDirectory => + _NSURLFileResourceTypeDirectory.value; - /// equivalent to NSURLUbiquitousItemDownloadingStatusKey == NSURLUbiquitousItemDownloadingStatusCurrent. Has never behaved as documented in earlier releases, hence deprecated. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsDownloadedKey = - _lookup('NSURLUbiquitousItemIsDownloadedKey'); + set NSURLFileResourceTypeDirectory(NSURLFileResourceType value) => + _NSURLFileResourceTypeDirectory.value = value; - NSURLResourceKey get NSURLUbiquitousItemIsDownloadedKey => - _NSURLUbiquitousItemIsDownloadedKey.value; + late final ffi.Pointer + _NSURLFileResourceTypeBlockSpecial = + _lookup('NSURLFileResourceTypeBlockSpecial'); - set NSURLUbiquitousItemIsDownloadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsDownloadedKey.value = value; + NSURLFileResourceType get NSURLFileResourceTypeBlockSpecial => + _NSURLFileResourceTypeBlockSpecial.value; - /// true if data is being downloaded for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemIsDownloadingKey = - _lookup('NSURLUbiquitousItemIsDownloadingKey'); + set NSURLFileResourceTypeBlockSpecial(NSURLFileResourceType value) => + _NSURLFileResourceTypeBlockSpecial.value = value; - NSURLResourceKey get NSURLUbiquitousItemIsDownloadingKey => - _NSURLUbiquitousItemIsDownloadingKey.value; + late final ffi.Pointer _NSURLFileResourceTypeRegular = + _lookup('NSURLFileResourceTypeRegular'); - set NSURLUbiquitousItemIsDownloadingKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsDownloadingKey.value = value; + NSURLFileResourceType get NSURLFileResourceTypeRegular => + _NSURLFileResourceTypeRegular.value; - /// true if there is data present in the cloud for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsUploadedKey = - _lookup('NSURLUbiquitousItemIsUploadedKey'); + set NSURLFileResourceTypeRegular(NSURLFileResourceType value) => + _NSURLFileResourceTypeRegular.value = value; - NSURLResourceKey get NSURLUbiquitousItemIsUploadedKey => - _NSURLUbiquitousItemIsUploadedKey.value; + late final ffi.Pointer + _NSURLFileResourceTypeSymbolicLink = + _lookup('NSURLFileResourceTypeSymbolicLink'); - set NSURLUbiquitousItemIsUploadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsUploadedKey.value = value; + NSURLFileResourceType get NSURLFileResourceTypeSymbolicLink => + _NSURLFileResourceTypeSymbolicLink.value; - /// true if data is being uploaded for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsUploadingKey = - _lookup('NSURLUbiquitousItemIsUploadingKey'); + set NSURLFileResourceTypeSymbolicLink(NSURLFileResourceType value) => + _NSURLFileResourceTypeSymbolicLink.value = value; - NSURLResourceKey get NSURLUbiquitousItemIsUploadingKey => - _NSURLUbiquitousItemIsUploadingKey.value; + late final ffi.Pointer _NSURLFileResourceTypeSocket = + _lookup('NSURLFileResourceTypeSocket'); - set NSURLUbiquitousItemIsUploadingKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsUploadingKey.value = value; + NSURLFileResourceType get NSURLFileResourceTypeSocket => + _NSURLFileResourceTypeSocket.value; - /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead - late final ffi.Pointer - _NSURLUbiquitousItemPercentDownloadedKey = - _lookup('NSURLUbiquitousItemPercentDownloadedKey'); + set NSURLFileResourceTypeSocket(NSURLFileResourceType value) => + _NSURLFileResourceTypeSocket.value = value; - NSURLResourceKey get NSURLUbiquitousItemPercentDownloadedKey => - _NSURLUbiquitousItemPercentDownloadedKey.value; + late final ffi.Pointer _NSURLFileResourceTypeUnknown = + _lookup('NSURLFileResourceTypeUnknown'); - set NSURLUbiquitousItemPercentDownloadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemPercentDownloadedKey.value = value; + NSURLFileResourceType get NSURLFileResourceTypeUnknown => + _NSURLFileResourceTypeUnknown.value; - /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead - late final ffi.Pointer - _NSURLUbiquitousItemPercentUploadedKey = - _lookup('NSURLUbiquitousItemPercentUploadedKey'); + set NSURLFileResourceTypeUnknown(NSURLFileResourceType value) => + _NSURLFileResourceTypeUnknown.value = value; - NSURLResourceKey get NSURLUbiquitousItemPercentUploadedKey => - _NSURLUbiquitousItemPercentUploadedKey.value; + /// dictionary of NSImage/UIImage objects keyed by size + late final ffi.Pointer _NSURLThumbnailDictionaryKey = + _lookup('NSURLThumbnailDictionaryKey'); - set NSURLUbiquitousItemPercentUploadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemPercentUploadedKey.value = value; + NSURLResourceKey get NSURLThumbnailDictionaryKey => + _NSURLThumbnailDictionaryKey.value; - /// returns the download status of this item. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusKey = - _lookup('NSURLUbiquitousItemDownloadingStatusKey'); + set NSURLThumbnailDictionaryKey(NSURLResourceKey value) => + _NSURLThumbnailDictionaryKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemDownloadingStatusKey => - _NSURLUbiquitousItemDownloadingStatusKey.value; + /// returns all thumbnails as a single NSImage + late final ffi.Pointer _NSURLThumbnailKey = + _lookup('NSURLThumbnailKey'); - set NSURLUbiquitousItemDownloadingStatusKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadingStatusKey.value = value; + NSURLResourceKey get NSURLThumbnailKey => _NSURLThumbnailKey.value; - /// returns the error when downloading the item from iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingErrorKey = - _lookup('NSURLUbiquitousItemDownloadingErrorKey'); + set NSURLThumbnailKey(NSURLResourceKey value) => + _NSURLThumbnailKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemDownloadingErrorKey => - _NSURLUbiquitousItemDownloadingErrorKey.value; + /// size key for a 1024 x 1024 thumbnail image + late final ffi.Pointer + _NSThumbnail1024x1024SizeKey = + _lookup('NSThumbnail1024x1024SizeKey'); - set NSURLUbiquitousItemDownloadingErrorKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadingErrorKey.value = value; + NSURLThumbnailDictionaryItem get NSThumbnail1024x1024SizeKey => + _NSThumbnail1024x1024SizeKey.value; - /// returns the error when uploading the item to iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) - late final ffi.Pointer - _NSURLUbiquitousItemUploadingErrorKey = - _lookup('NSURLUbiquitousItemUploadingErrorKey'); + set NSThumbnail1024x1024SizeKey(NSURLThumbnailDictionaryItem value) => + _NSThumbnail1024x1024SizeKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemUploadingErrorKey => - _NSURLUbiquitousItemUploadingErrorKey.value; + /// Total file size in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileSizeKey = + _lookup('NSURLFileSizeKey'); - set NSURLUbiquitousItemUploadingErrorKey(NSURLResourceKey value) => - _NSURLUbiquitousItemUploadingErrorKey.value = value; + NSURLResourceKey get NSURLFileSizeKey => _NSURLFileSizeKey.value; - /// returns whether a download of this item has already been requested with an API like -startDownloadingUbiquitousItemAtURL:error: (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemDownloadRequestedKey = - _lookup('NSURLUbiquitousItemDownloadRequestedKey'); + set NSURLFileSizeKey(NSURLResourceKey value) => + _NSURLFileSizeKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemDownloadRequestedKey => - _NSURLUbiquitousItemDownloadRequestedKey.value; + /// Total size allocated on disk for the file in bytes (number of blocks times block size) (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileAllocatedSizeKey = + _lookup('NSURLFileAllocatedSizeKey'); - set NSURLUbiquitousItemDownloadRequestedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadRequestedKey.value = value; + NSURLResourceKey get NSURLFileAllocatedSizeKey => + _NSURLFileAllocatedSizeKey.value; - /// returns the name of this item's container as displayed to users. - late final ffi.Pointer - _NSURLUbiquitousItemContainerDisplayNameKey = - _lookup('NSURLUbiquitousItemContainerDisplayNameKey'); + set NSURLFileAllocatedSizeKey(NSURLResourceKey value) => + _NSURLFileAllocatedSizeKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemContainerDisplayNameKey => - _NSURLUbiquitousItemContainerDisplayNameKey.value; + /// Total displayable size of the file in bytes (this may include space used by metadata), or nil if not available. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLTotalFileSizeKey = + _lookup('NSURLTotalFileSizeKey'); - set NSURLUbiquitousItemContainerDisplayNameKey(NSURLResourceKey value) => - _NSURLUbiquitousItemContainerDisplayNameKey.value = value; + NSURLResourceKey get NSURLTotalFileSizeKey => _NSURLTotalFileSizeKey.value; - /// true if the item is excluded from sync, which means it is locally on disk but won't be available on the server. An excluded item is no longer ubiquitous. (Read-write, value type boolean NSNumber - late final ffi.Pointer - _NSURLUbiquitousItemIsExcludedFromSyncKey = - _lookup('NSURLUbiquitousItemIsExcludedFromSyncKey'); + set NSURLTotalFileSizeKey(NSURLResourceKey value) => + _NSURLTotalFileSizeKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemIsExcludedFromSyncKey => - _NSURLUbiquitousItemIsExcludedFromSyncKey.value; + /// Total allocated size of the file in bytes (this may include space used by metadata), or nil if not available. This can be less than the value returned by NSURLTotalFileSizeKey if the resource is compressed. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLTotalFileAllocatedSizeKey = + _lookup('NSURLTotalFileAllocatedSizeKey'); - set NSURLUbiquitousItemIsExcludedFromSyncKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsExcludedFromSyncKey.value = value; + NSURLResourceKey get NSURLTotalFileAllocatedSizeKey => + _NSURLTotalFileAllocatedSizeKey.value; - /// true if the ubiquitous item is shared. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsSharedKey = - _lookup('NSURLUbiquitousItemIsSharedKey'); + set NSURLTotalFileAllocatedSizeKey(NSURLResourceKey value) => + _NSURLTotalFileAllocatedSizeKey.value = value; - NSURLResourceKey get NSURLUbiquitousItemIsSharedKey => - _NSURLUbiquitousItemIsSharedKey.value; + /// true if the resource is a Finder alias file or a symlink, false otherwise ( Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsAliasFileKey = + _lookup('NSURLIsAliasFileKey'); - set NSURLUbiquitousItemIsSharedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsSharedKey.value = value; + NSURLResourceKey get NSURLIsAliasFileKey => _NSURLIsAliasFileKey.value; - /// returns the current user's role for this shared item, or nil if not shared. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousSharedItemCurrentUserRoleKey = - _lookup('NSURLUbiquitousSharedItemCurrentUserRoleKey'); + set NSURLIsAliasFileKey(NSURLResourceKey value) => + _NSURLIsAliasFileKey.value = value; - NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserRoleKey => - _NSURLUbiquitousSharedItemCurrentUserRoleKey.value; + /// The protection level for this file + late final ffi.Pointer _NSURLFileProtectionKey = + _lookup('NSURLFileProtectionKey'); - set NSURLUbiquitousSharedItemCurrentUserRoleKey(NSURLResourceKey value) => - _NSURLUbiquitousSharedItemCurrentUserRoleKey.value = value; + NSURLResourceKey get NSURLFileProtectionKey => _NSURLFileProtectionKey.value; - /// returns the permissions for the current user, or nil if not shared. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey = - _lookup( - 'NSURLUbiquitousSharedItemCurrentUserPermissionsKey'); + set NSURLFileProtectionKey(NSURLResourceKey value) => + _NSURLFileProtectionKey.value = value; - NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserPermissionsKey => - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value; + /// The file has no special protections associated with it. It can be read from or written to at any time. + late final ffi.Pointer _NSURLFileProtectionNone = + _lookup('NSURLFileProtectionNone'); - set NSURLUbiquitousSharedItemCurrentUserPermissionsKey( - NSURLResourceKey value) => - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value = value; + NSURLFileProtectionType get NSURLFileProtectionNone => + _NSURLFileProtectionNone.value; - /// returns a NSPersonNameComponents, or nil if the current user. (Read-only, value type NSPersonNameComponents) - late final ffi.Pointer - _NSURLUbiquitousSharedItemOwnerNameComponentsKey = - _lookup( - 'NSURLUbiquitousSharedItemOwnerNameComponentsKey'); + set NSURLFileProtectionNone(NSURLFileProtectionType value) => + _NSURLFileProtectionNone.value = value; - NSURLResourceKey get NSURLUbiquitousSharedItemOwnerNameComponentsKey => - _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value; + /// The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting. Transient data files with this protection type should be excluded from backups using NSURLIsExcludedFromBackupKey. + late final ffi.Pointer _NSURLFileProtectionComplete = + _lookup('NSURLFileProtectionComplete'); - set NSURLUbiquitousSharedItemOwnerNameComponentsKey(NSURLResourceKey value) => - _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value = value; + NSURLFileProtectionType get NSURLFileProtectionComplete => + _NSURLFileProtectionComplete.value; - /// returns a NSPersonNameComponents for the most recent editor of the document, or nil if it is the current user. (Read-only, value type NSPersonNameComponents) - late final ffi.Pointer - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey = - _lookup( - 'NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey'); + set NSURLFileProtectionComplete(NSURLFileProtectionType value) => + _NSURLFileProtectionComplete.value = value; - NSURLResourceKey - get NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey => - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value; + /// The file is stored in an encrypted format on disk. Files can be created while the device is locked, but once closed, cannot be opened again until the device is unlocked. If the file is opened when unlocked, you may continue to access the file normally, even if the user locks the device. There is a small performance penalty when the file is created and opened, though not when being written to or read from. This can be mitigated by changing the file protection to NSURLFileProtectionComplete when the device is unlocked. Transient data files with this protection type should be excluded from backups using NSURLIsExcludedFromBackupKey. + late final ffi.Pointer + _NSURLFileProtectionCompleteUnlessOpen = + _lookup('NSURLFileProtectionCompleteUnlessOpen'); - set NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey( - NSURLResourceKey value) => - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value = value; + NSURLFileProtectionType get NSURLFileProtectionCompleteUnlessOpen => + _NSURLFileProtectionCompleteUnlessOpen.value; - /// this item has not been downloaded yet. Use startDownloadingUbiquitousItemAtURL:error: to download it. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusNotDownloaded = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusNotDownloaded'); + set NSURLFileProtectionCompleteUnlessOpen(NSURLFileProtectionType value) => + _NSURLFileProtectionCompleteUnlessOpen.value = value; - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusNotDownloaded => - _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value; + /// The file is stored in an encrypted format on disk and cannot be accessed until after the device has booted. After the user unlocks the device for the first time, your app can access the file and continue to access it even if the user subsequently locks the device. + late final ffi.Pointer + _NSURLFileProtectionCompleteUntilFirstUserAuthentication = + _lookup( + 'NSURLFileProtectionCompleteUntilFirstUserAuthentication'); - set NSURLUbiquitousItemDownloadingStatusNotDownloaded( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; + NSURLFileProtectionType + get NSURLFileProtectionCompleteUntilFirstUserAuthentication => + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value; - /// there is a local version of this item available. The most current version will get downloaded as soon as possible. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusDownloaded = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusDownloaded'); + set NSURLFileProtectionCompleteUntilFirstUserAuthentication( + NSURLFileProtectionType value) => + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusDownloaded => - _NSURLUbiquitousItemDownloadingStatusDownloaded.value; + /// The user-visible volume format (Read-only, value type NSString) + late final ffi.Pointer + _NSURLVolumeLocalizedFormatDescriptionKey = + _lookup('NSURLVolumeLocalizedFormatDescriptionKey'); - set NSURLUbiquitousItemDownloadingStatusDownloaded( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusDownloaded.value = value; + NSURLResourceKey get NSURLVolumeLocalizedFormatDescriptionKey => + _NSURLVolumeLocalizedFormatDescriptionKey.value; - /// there is a local version of this item and it is the most up-to-date version known to this device. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusCurrent = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusCurrent'); + set NSURLVolumeLocalizedFormatDescriptionKey(NSURLResourceKey value) => + _NSURLVolumeLocalizedFormatDescriptionKey.value = value; - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusCurrent => - _NSURLUbiquitousItemDownloadingStatusCurrent.value; + /// Total volume capacity in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeTotalCapacityKey = + _lookup('NSURLVolumeTotalCapacityKey'); - set NSURLUbiquitousItemDownloadingStatusCurrent( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusCurrent.value = value; + NSURLResourceKey get NSURLVolumeTotalCapacityKey => + _NSURLVolumeTotalCapacityKey.value; - /// the current user is the owner of this shared item. - late final ffi.Pointer - _NSURLUbiquitousSharedItemRoleOwner = - _lookup( - 'NSURLUbiquitousSharedItemRoleOwner'); + set NSURLVolumeTotalCapacityKey(NSURLResourceKey value) => + _NSURLVolumeTotalCapacityKey.value = value; - NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleOwner => - _NSURLUbiquitousSharedItemRoleOwner.value; + /// Total free space in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeAvailableCapacityKey = + _lookup('NSURLVolumeAvailableCapacityKey'); - set NSURLUbiquitousSharedItemRoleOwner(NSURLUbiquitousSharedItemRole value) => - _NSURLUbiquitousSharedItemRoleOwner.value = value; + NSURLResourceKey get NSURLVolumeAvailableCapacityKey => + _NSURLVolumeAvailableCapacityKey.value; - /// the current user is a participant of this shared item. - late final ffi.Pointer - _NSURLUbiquitousSharedItemRoleParticipant = - _lookup( - 'NSURLUbiquitousSharedItemRoleParticipant'); + set NSURLVolumeAvailableCapacityKey(NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityKey.value = value; - NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleParticipant => - _NSURLUbiquitousSharedItemRoleParticipant.value; + /// Total number of resources on the volume (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeResourceCountKey = + _lookup('NSURLVolumeResourceCountKey'); - set NSURLUbiquitousSharedItemRoleParticipant( - NSURLUbiquitousSharedItemRole value) => - _NSURLUbiquitousSharedItemRoleParticipant.value = value; + NSURLResourceKey get NSURLVolumeResourceCountKey => + _NSURLVolumeResourceCountKey.value; - /// the current user is only allowed to read this item - late final ffi.Pointer - _NSURLUbiquitousSharedItemPermissionsReadOnly = - _lookup( - 'NSURLUbiquitousSharedItemPermissionsReadOnly'); + set NSURLVolumeResourceCountKey(NSURLResourceKey value) => + _NSURLVolumeResourceCountKey.value = value; - NSURLUbiquitousSharedItemPermissions - get NSURLUbiquitousSharedItemPermissionsReadOnly => - _NSURLUbiquitousSharedItemPermissionsReadOnly.value; + /// true if the volume format supports persistent object identifiers and can look up file system objects by their IDs (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsPersistentIDsKey = + _lookup('NSURLVolumeSupportsPersistentIDsKey'); - set NSURLUbiquitousSharedItemPermissionsReadOnly( - NSURLUbiquitousSharedItemPermissions value) => - _NSURLUbiquitousSharedItemPermissionsReadOnly.value = value; + NSURLResourceKey get NSURLVolumeSupportsPersistentIDsKey => + _NSURLVolumeSupportsPersistentIDsKey.value; - /// the current user is allowed to both read and write this item - late final ffi.Pointer - _NSURLUbiquitousSharedItemPermissionsReadWrite = - _lookup( - 'NSURLUbiquitousSharedItemPermissionsReadWrite'); + set NSURLVolumeSupportsPersistentIDsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsPersistentIDsKey.value = value; - NSURLUbiquitousSharedItemPermissions - get NSURLUbiquitousSharedItemPermissionsReadWrite => - _NSURLUbiquitousSharedItemPermissionsReadWrite.value; + /// true if the volume format supports symbolic links (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsSymbolicLinksKey = + _lookup('NSURLVolumeSupportsSymbolicLinksKey'); - set NSURLUbiquitousSharedItemPermissionsReadWrite( - NSURLUbiquitousSharedItemPermissions value) => - _NSURLUbiquitousSharedItemPermissionsReadWrite.value = value; + NSURLResourceKey get NSURLVolumeSupportsSymbolicLinksKey => + _NSURLVolumeSupportsSymbolicLinksKey.value; - late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); - late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); - instancetype _objc_msgSend_456( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer value, - ) { - return __objc_msgSend_456( - obj, - sel, - name, - value, - ); - } + set NSURLVolumeSupportsSymbolicLinksKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSymbolicLinksKey.value = value; - late final __objc_msgSend_456Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + /// true if the volume format supports hard links (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsHardLinksKey = + _lookup('NSURLVolumeSupportsHardLinksKey'); - late final _sel_queryItemWithName_value_1 = - _registerName1("queryItemWithName:value:"); - late final _sel_value1 = _registerName1("value"); - late final _class_NSURLComponents1 = _getClass1("NSURLComponents"); - late final _sel_initWithURL_resolvingAgainstBaseURL_1 = - _registerName1("initWithURL:resolvingAgainstBaseURL:"); - late final _sel_componentsWithURL_resolvingAgainstBaseURL_1 = - _registerName1("componentsWithURL:resolvingAgainstBaseURL:"); - late final _sel_componentsWithString_1 = - _registerName1("componentsWithString:"); - late final _sel_URLRelativeToURL_1 = _registerName1("URLRelativeToURL:"); - ffi.Pointer _objc_msgSend_457( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_457( - obj, - sel, - baseURL, - ); - } + NSURLResourceKey get NSURLVolumeSupportsHardLinksKey => + _NSURLVolumeSupportsHardLinksKey.value; - late final __objc_msgSend_457Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + set NSURLVolumeSupportsHardLinksKey(NSURLResourceKey value) => + _NSURLVolumeSupportsHardLinksKey.value = value; - late final _sel_setScheme_1 = _registerName1("setScheme:"); - late final _sel_setUser_1 = _registerName1("setUser:"); - late final _sel_setPassword_1 = _registerName1("setPassword:"); - late final _sel_setHost_1 = _registerName1("setHost:"); - late final _sel_setPort_1 = _registerName1("setPort:"); - late final _sel_setPath_1 = _registerName1("setPath:"); - late final _sel_setQuery_1 = _registerName1("setQuery:"); - late final _sel_setFragment_1 = _registerName1("setFragment:"); - late final _sel_percentEncodedUser1 = _registerName1("percentEncodedUser"); - late final _sel_setPercentEncodedUser_1 = - _registerName1("setPercentEncodedUser:"); - late final _sel_percentEncodedPassword1 = - _registerName1("percentEncodedPassword"); - late final _sel_setPercentEncodedPassword_1 = - _registerName1("setPercentEncodedPassword:"); - late final _sel_percentEncodedHost1 = _registerName1("percentEncodedHost"); - late final _sel_setPercentEncodedHost_1 = - _registerName1("setPercentEncodedHost:"); - late final _sel_percentEncodedPath1 = _registerName1("percentEncodedPath"); - late final _sel_setPercentEncodedPath_1 = - _registerName1("setPercentEncodedPath:"); - late final _sel_percentEncodedQuery1 = _registerName1("percentEncodedQuery"); - late final _sel_setPercentEncodedQuery_1 = - _registerName1("setPercentEncodedQuery:"); - late final _sel_percentEncodedFragment1 = - _registerName1("percentEncodedFragment"); - late final _sel_setPercentEncodedFragment_1 = - _registerName1("setPercentEncodedFragment:"); - late final _sel_rangeOfScheme1 = _registerName1("rangeOfScheme"); - late final _sel_rangeOfUser1 = _registerName1("rangeOfUser"); - late final _sel_rangeOfPassword1 = _registerName1("rangeOfPassword"); - late final _sel_rangeOfHost1 = _registerName1("rangeOfHost"); - late final _sel_rangeOfPort1 = _registerName1("rangeOfPort"); - late final _sel_rangeOfPath1 = _registerName1("rangeOfPath"); - late final _sel_rangeOfQuery1 = _registerName1("rangeOfQuery"); - late final _sel_rangeOfFragment1 = _registerName1("rangeOfFragment"); - late final _sel_queryItems1 = _registerName1("queryItems"); - late final _sel_setQueryItems_1 = _registerName1("setQueryItems:"); - late final _sel_percentEncodedQueryItems1 = - _registerName1("percentEncodedQueryItems"); - late final _sel_setPercentEncodedQueryItems_1 = - _registerName1("setPercentEncodedQueryItems:"); - late final _class_NSFileSecurity1 = _getClass1("NSFileSecurity"); - late final _class_NSHTTPURLResponse1 = _getClass1("NSHTTPURLResponse"); - late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_1 = - _registerName1("initWithURL:statusCode:HTTPVersion:headerFields:"); - instancetype _objc_msgSend_458( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int statusCode, - ffi.Pointer HTTPVersion, - ffi.Pointer headerFields, - ) { - return __objc_msgSend_458( - obj, - sel, - url, - statusCode, - HTTPVersion, - headerFields, - ); - } + /// true if the volume format supports a journal used to speed recovery in case of unplanned restart (such as a power outage or crash). This does not necessarily mean the volume is actively using a journal. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsJournalingKey = + _lookup('NSURLVolumeSupportsJournalingKey'); - late final __objc_msgSend_458Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer)>(); + NSURLResourceKey get NSURLVolumeSupportsJournalingKey => + _NSURLVolumeSupportsJournalingKey.value; - late final _sel_statusCode1 = _registerName1("statusCode"); - late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); - late final _sel_localizedStringForStatusCode_1 = - _registerName1("localizedStringForStatusCode:"); - ffi.Pointer _objc_msgSend_459( - ffi.Pointer obj, - ffi.Pointer sel, - int statusCode, - ) { - return __objc_msgSend_459( - obj, - sel, - statusCode, - ); - } + set NSURLVolumeSupportsJournalingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsJournalingKey.value = value; - late final __objc_msgSend_459Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + /// true if the volume is currently using a journal for speedy recovery after an unplanned restart. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsJournalingKey = + _lookup('NSURLVolumeIsJournalingKey'); - late final ffi.Pointer _NSGenericException = - _lookup('NSGenericException'); + NSURLResourceKey get NSURLVolumeIsJournalingKey => + _NSURLVolumeIsJournalingKey.value; - NSExceptionName get NSGenericException => _NSGenericException.value; + set NSURLVolumeIsJournalingKey(NSURLResourceKey value) => + _NSURLVolumeIsJournalingKey.value = value; - set NSGenericException(NSExceptionName value) => - _NSGenericException.value = value; + /// true if the volume format supports sparse files, that is, files which can have 'holes' that have never been written to, and thus do not consume space on disk. A sparse file may have an allocated size on disk that is less than its logical length (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsSparseFilesKey = + _lookup('NSURLVolumeSupportsSparseFilesKey'); - late final ffi.Pointer _NSRangeException = - _lookup('NSRangeException'); + NSURLResourceKey get NSURLVolumeSupportsSparseFilesKey => + _NSURLVolumeSupportsSparseFilesKey.value; - NSExceptionName get NSRangeException => _NSRangeException.value; + set NSURLVolumeSupportsSparseFilesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSparseFilesKey.value = value; - set NSRangeException(NSExceptionName value) => - _NSRangeException.value = value; + /// For security reasons, parts of a file (runs) that have never been written to must appear to contain zeroes. true if the volume keeps track of allocated but unwritten runs of a file so that it can substitute zeroes without actually writing zeroes to the media. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsZeroRunsKey = + _lookup('NSURLVolumeSupportsZeroRunsKey'); - late final ffi.Pointer _NSInvalidArgumentException = - _lookup('NSInvalidArgumentException'); + NSURLResourceKey get NSURLVolumeSupportsZeroRunsKey => + _NSURLVolumeSupportsZeroRunsKey.value; - NSExceptionName get NSInvalidArgumentException => - _NSInvalidArgumentException.value; + set NSURLVolumeSupportsZeroRunsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsZeroRunsKey.value = value; - set NSInvalidArgumentException(NSExceptionName value) => - _NSInvalidArgumentException.value = value; + /// true if the volume format treats upper and lower case characters in file and directory names as different. Otherwise an upper case character is equivalent to a lower case character, and you can't have two names that differ solely in the case of the characters. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsCaseSensitiveNamesKey = + _lookup('NSURLVolumeSupportsCaseSensitiveNamesKey'); - late final ffi.Pointer _NSInternalInconsistencyException = - _lookup('NSInternalInconsistencyException'); + NSURLResourceKey get NSURLVolumeSupportsCaseSensitiveNamesKey => + _NSURLVolumeSupportsCaseSensitiveNamesKey.value; - NSExceptionName get NSInternalInconsistencyException => - _NSInternalInconsistencyException.value; + set NSURLVolumeSupportsCaseSensitiveNamesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCaseSensitiveNamesKey.value = value; - set NSInternalInconsistencyException(NSExceptionName value) => - _NSInternalInconsistencyException.value = value; + /// true if the volume format preserves the case of file and directory names. Otherwise the volume may change the case of some characters (typically making them all upper or all lower case). (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsCasePreservedNamesKey = + _lookup('NSURLVolumeSupportsCasePreservedNamesKey'); - late final ffi.Pointer _NSMallocException = - _lookup('NSMallocException'); + NSURLResourceKey get NSURLVolumeSupportsCasePreservedNamesKey => + _NSURLVolumeSupportsCasePreservedNamesKey.value; - NSExceptionName get NSMallocException => _NSMallocException.value; + set NSURLVolumeSupportsCasePreservedNamesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCasePreservedNamesKey.value = value; - set NSMallocException(NSExceptionName value) => - _NSMallocException.value = value; + /// true if the volume supports reliable storage of times for the root directory. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsRootDirectoryDatesKey = + _lookup('NSURLVolumeSupportsRootDirectoryDatesKey'); - late final ffi.Pointer _NSObjectInaccessibleException = - _lookup('NSObjectInaccessibleException'); + NSURLResourceKey get NSURLVolumeSupportsRootDirectoryDatesKey => + _NSURLVolumeSupportsRootDirectoryDatesKey.value; - NSExceptionName get NSObjectInaccessibleException => - _NSObjectInaccessibleException.value; + set NSURLVolumeSupportsRootDirectoryDatesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsRootDirectoryDatesKey.value = value; - set NSObjectInaccessibleException(NSExceptionName value) => - _NSObjectInaccessibleException.value = value; + /// true if the volume supports returning volume size values (NSURLVolumeTotalCapacityKey and NSURLVolumeAvailableCapacityKey). (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsVolumeSizesKey = + _lookup('NSURLVolumeSupportsVolumeSizesKey'); - late final ffi.Pointer _NSObjectNotAvailableException = - _lookup('NSObjectNotAvailableException'); + NSURLResourceKey get NSURLVolumeSupportsVolumeSizesKey => + _NSURLVolumeSupportsVolumeSizesKey.value; - NSExceptionName get NSObjectNotAvailableException => - _NSObjectNotAvailableException.value; + set NSURLVolumeSupportsVolumeSizesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsVolumeSizesKey.value = value; - set NSObjectNotAvailableException(NSExceptionName value) => - _NSObjectNotAvailableException.value = value; + /// true if the volume can be renamed. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsRenamingKey = + _lookup('NSURLVolumeSupportsRenamingKey'); - late final ffi.Pointer _NSDestinationInvalidException = - _lookup('NSDestinationInvalidException'); + NSURLResourceKey get NSURLVolumeSupportsRenamingKey => + _NSURLVolumeSupportsRenamingKey.value; - NSExceptionName get NSDestinationInvalidException => - _NSDestinationInvalidException.value; + set NSURLVolumeSupportsRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsRenamingKey.value = value; - set NSDestinationInvalidException(NSExceptionName value) => - _NSDestinationInvalidException.value = value; + /// true if the volume implements whole-file flock(2) style advisory locks, and the O_EXLOCK and O_SHLOCK flags of the open(2) call. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsAdvisoryFileLockingKey = + _lookup('NSURLVolumeSupportsAdvisoryFileLockingKey'); - late final ffi.Pointer _NSPortTimeoutException = - _lookup('NSPortTimeoutException'); + NSURLResourceKey get NSURLVolumeSupportsAdvisoryFileLockingKey => + _NSURLVolumeSupportsAdvisoryFileLockingKey.value; - NSExceptionName get NSPortTimeoutException => _NSPortTimeoutException.value; + set NSURLVolumeSupportsAdvisoryFileLockingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsAdvisoryFileLockingKey.value = value; - set NSPortTimeoutException(NSExceptionName value) => - _NSPortTimeoutException.value = value; + /// true if the volume implements extended security (ACLs). (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsExtendedSecurityKey = + _lookup('NSURLVolumeSupportsExtendedSecurityKey'); - late final ffi.Pointer _NSInvalidSendPortException = - _lookup('NSInvalidSendPortException'); + NSURLResourceKey get NSURLVolumeSupportsExtendedSecurityKey => + _NSURLVolumeSupportsExtendedSecurityKey.value; - NSExceptionName get NSInvalidSendPortException => - _NSInvalidSendPortException.value; + set NSURLVolumeSupportsExtendedSecurityKey(NSURLResourceKey value) => + _NSURLVolumeSupportsExtendedSecurityKey.value = value; - set NSInvalidSendPortException(NSExceptionName value) => - _NSInvalidSendPortException.value = value; + /// true if the volume should be visible via the GUI (i.e., appear on the Desktop as a separate volume). (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsBrowsableKey = + _lookup('NSURLVolumeIsBrowsableKey'); - late final ffi.Pointer _NSInvalidReceivePortException = - _lookup('NSInvalidReceivePortException'); + NSURLResourceKey get NSURLVolumeIsBrowsableKey => + _NSURLVolumeIsBrowsableKey.value; - NSExceptionName get NSInvalidReceivePortException => - _NSInvalidReceivePortException.value; + set NSURLVolumeIsBrowsableKey(NSURLResourceKey value) => + _NSURLVolumeIsBrowsableKey.value = value; - set NSInvalidReceivePortException(NSExceptionName value) => - _NSInvalidReceivePortException.value = value; + /// The largest file size (in bytes) supported by this file system, or nil if this cannot be determined. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeMaximumFileSizeKey = + _lookup('NSURLVolumeMaximumFileSizeKey'); - late final ffi.Pointer _NSPortSendException = - _lookup('NSPortSendException'); + NSURLResourceKey get NSURLVolumeMaximumFileSizeKey => + _NSURLVolumeMaximumFileSizeKey.value; - NSExceptionName get NSPortSendException => _NSPortSendException.value; + set NSURLVolumeMaximumFileSizeKey(NSURLResourceKey value) => + _NSURLVolumeMaximumFileSizeKey.value = value; - set NSPortSendException(NSExceptionName value) => - _NSPortSendException.value = value; + /// true if the volume's media is ejectable from the drive mechanism under software control. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsEjectableKey = + _lookup('NSURLVolumeIsEjectableKey'); - late final ffi.Pointer _NSPortReceiveException = - _lookup('NSPortReceiveException'); + NSURLResourceKey get NSURLVolumeIsEjectableKey => + _NSURLVolumeIsEjectableKey.value; - NSExceptionName get NSPortReceiveException => _NSPortReceiveException.value; + set NSURLVolumeIsEjectableKey(NSURLResourceKey value) => + _NSURLVolumeIsEjectableKey.value = value; - set NSPortReceiveException(NSExceptionName value) => - _NSPortReceiveException.value = value; + /// true if the volume's media is removable from the drive mechanism. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsRemovableKey = + _lookup('NSURLVolumeIsRemovableKey'); - late final ffi.Pointer _NSOldStyleException = - _lookup('NSOldStyleException'); + NSURLResourceKey get NSURLVolumeIsRemovableKey => + _NSURLVolumeIsRemovableKey.value; - NSExceptionName get NSOldStyleException => _NSOldStyleException.value; + set NSURLVolumeIsRemovableKey(NSURLResourceKey value) => + _NSURLVolumeIsRemovableKey.value = value; - set NSOldStyleException(NSExceptionName value) => - _NSOldStyleException.value = value; + /// true if the volume's device is connected to an internal bus, false if connected to an external bus, or nil if not available. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsInternalKey = + _lookup('NSURLVolumeIsInternalKey'); - late final ffi.Pointer _NSInconsistentArchiveException = - _lookup('NSInconsistentArchiveException'); + NSURLResourceKey get NSURLVolumeIsInternalKey => + _NSURLVolumeIsInternalKey.value; - NSExceptionName get NSInconsistentArchiveException => - _NSInconsistentArchiveException.value; + set NSURLVolumeIsInternalKey(NSURLResourceKey value) => + _NSURLVolumeIsInternalKey.value = value; - set NSInconsistentArchiveException(NSExceptionName value) => - _NSInconsistentArchiveException.value = value; + /// true if the volume is automounted. Note: do not mistake this with the functionality provided by kCFURLVolumeSupportsBrowsingKey. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsAutomountedKey = + _lookup('NSURLVolumeIsAutomountedKey'); - late final _class_NSException1 = _getClass1("NSException"); - late final _sel_exceptionWithName_reason_userInfo_1 = - _registerName1("exceptionWithName:reason:userInfo:"); - ffi.Pointer _objc_msgSend_460( - ffi.Pointer obj, - ffi.Pointer sel, - NSExceptionName name, - ffi.Pointer reason, - ffi.Pointer userInfo, - ) { - return __objc_msgSend_460( - obj, - sel, - name, - reason, - userInfo, - ); - } + NSURLResourceKey get NSURLVolumeIsAutomountedKey => + _NSURLVolumeIsAutomountedKey.value; - late final __objc_msgSend_460Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSExceptionName, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSExceptionName, - ffi.Pointer, - ffi.Pointer)>(); + set NSURLVolumeIsAutomountedKey(NSURLResourceKey value) => + _NSURLVolumeIsAutomountedKey.value = value; - late final _sel_initWithName_reason_userInfo_1 = - _registerName1("initWithName:reason:userInfo:"); - instancetype _objc_msgSend_461( - ffi.Pointer obj, - ffi.Pointer sel, - NSExceptionName aName, - ffi.Pointer aReason, - ffi.Pointer aUserInfo, - ) { - return __objc_msgSend_461( - obj, - sel, - aName, - aReason, - aUserInfo, - ); - } + /// true if the volume is stored on a local device. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsLocalKey = + _lookup('NSURLVolumeIsLocalKey'); - late final __objc_msgSend_461Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSExceptionName, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSExceptionName, ffi.Pointer, ffi.Pointer)>(); + NSURLResourceKey get NSURLVolumeIsLocalKey => _NSURLVolumeIsLocalKey.value; - late final _sel_reason1 = _registerName1("reason"); - late final _sel_callStackReturnAddresses1 = - _registerName1("callStackReturnAddresses"); - late final _sel_callStackSymbols1 = _registerName1("callStackSymbols"); - late final _sel_raise1 = _registerName1("raise"); - late final _sel_raise_format_1 = _registerName1("raise:format:"); - late final _sel_raise_format_arguments_1 = - _registerName1("raise:format:arguments:"); - void _objc_msgSend_462( - ffi.Pointer obj, - ffi.Pointer sel, - NSExceptionName name, - ffi.Pointer format, - va_list argList, - ) { - return __objc_msgSend_462( - obj, - sel, - name, - format, - argList, - ); - } + set NSURLVolumeIsLocalKey(NSURLResourceKey value) => + _NSURLVolumeIsLocalKey.value = value; - late final __objc_msgSend_462Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSExceptionName, - ffi.Pointer, - va_list)>>('objc_msgSend'); - late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSExceptionName, ffi.Pointer, va_list)>(); + /// true if the volume is read-only. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsReadOnlyKey = + _lookup('NSURLVolumeIsReadOnlyKey'); - ffi.Pointer NSGetUncaughtExceptionHandler() { - return _NSGetUncaughtExceptionHandler(); - } + NSURLResourceKey get NSURLVolumeIsReadOnlyKey => + _NSURLVolumeIsReadOnlyKey.value; - late final _NSGetUncaughtExceptionHandlerPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer - Function()>>('NSGetUncaughtExceptionHandler'); - late final _NSGetUncaughtExceptionHandler = _NSGetUncaughtExceptionHandlerPtr - .asFunction Function()>(); + set NSURLVolumeIsReadOnlyKey(NSURLResourceKey value) => + _NSURLVolumeIsReadOnlyKey.value = value; - void NSSetUncaughtExceptionHandler( - ffi.Pointer arg0, - ) { - return _NSSetUncaughtExceptionHandler( - arg0, - ); - } + /// The volume's creation date, or nil if this cannot be determined. (Read-only, value type NSDate) + late final ffi.Pointer _NSURLVolumeCreationDateKey = + _lookup('NSURLVolumeCreationDateKey'); - late final _NSSetUncaughtExceptionHandlerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>>( - 'NSSetUncaughtExceptionHandler'); - late final _NSSetUncaughtExceptionHandler = _NSSetUncaughtExceptionHandlerPtr - .asFunction)>(); + NSURLResourceKey get NSURLVolumeCreationDateKey => + _NSURLVolumeCreationDateKey.value; - late final ffi.Pointer> _NSAssertionHandlerKey = - _lookup>('NSAssertionHandlerKey'); + set NSURLVolumeCreationDateKey(NSURLResourceKey value) => + _NSURLVolumeCreationDateKey.value = value; - ffi.Pointer get NSAssertionHandlerKey => - _NSAssertionHandlerKey.value; + /// The NSURL needed to remount a network volume, or nil if not available. (Read-only, value type NSURL) + late final ffi.Pointer _NSURLVolumeURLForRemountingKey = + _lookup('NSURLVolumeURLForRemountingKey'); - set NSAssertionHandlerKey(ffi.Pointer value) => - _NSAssertionHandlerKey.value = value; + NSURLResourceKey get NSURLVolumeURLForRemountingKey => + _NSURLVolumeURLForRemountingKey.value; - late final _class_NSAssertionHandler1 = _getClass1("NSAssertionHandler"); - late final _sel_currentHandler1 = _registerName1("currentHandler"); - ffi.Pointer _objc_msgSend_463( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_463( - obj, - sel, - ); - } + set NSURLVolumeURLForRemountingKey(NSURLResourceKey value) => + _NSURLVolumeURLForRemountingKey.value = value; - late final __objc_msgSend_463Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + /// The volume's persistent UUID as a string, or nil if a persistent UUID is not available for the volume. (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeUUIDStringKey = + _lookup('NSURLVolumeUUIDStringKey'); - late final _sel_handleFailureInMethod_object_file_lineNumber_description_1 = - _registerName1( - "handleFailureInMethod:object:file:lineNumber:description:"); - void _objc_msgSend_464( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer selector, - ffi.Pointer object, - ffi.Pointer fileName, - int line, - ffi.Pointer format, - ) { - return __objc_msgSend_464( - obj, - sel, - selector, - object, - fileName, - line, - format, - ); - } + NSURLResourceKey get NSURLVolumeUUIDStringKey => + _NSURLVolumeUUIDStringKey.value; - late final __objc_msgSend_464Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + set NSURLVolumeUUIDStringKey(NSURLResourceKey value) => + _NSURLVolumeUUIDStringKey.value = value; - late final _sel_handleFailureInFunction_file_lineNumber_description_1 = - _registerName1("handleFailureInFunction:file:lineNumber:description:"); - void _objc_msgSend_465( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer functionName, - ffi.Pointer fileName, - int line, - ffi.Pointer format, - ) { - return __objc_msgSend_465( - obj, - sel, - functionName, - fileName, - line, - format, - ); - } + /// The name of the volume (Read-write if NSURLVolumeSupportsRenamingKey is YES, otherwise read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeNameKey = + _lookup('NSURLVolumeNameKey'); - late final __objc_msgSend_465Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + NSURLResourceKey get NSURLVolumeNameKey => _NSURLVolumeNameKey.value; - late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); - late final _sel_blockOperationWithBlock_1 = - _registerName1("blockOperationWithBlock:"); - instancetype _objc_msgSend_466( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_466( - obj, - sel, - block, - ); - } + set NSURLVolumeNameKey(NSURLResourceKey value) => + _NSURLVolumeNameKey.value = value; - late final __objc_msgSend_466Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + /// The user-presentable name of the volume (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeLocalizedNameKey = + _lookup('NSURLVolumeLocalizedNameKey'); - late final _sel_addExecutionBlock_1 = _registerName1("addExecutionBlock:"); - late final _sel_executionBlocks1 = _registerName1("executionBlocks"); - late final _class_NSInvocationOperation1 = - _getClass1("NSInvocationOperation"); - late final _sel_initWithTarget_selector_object_1 = - _registerName1("initWithTarget:selector:object:"); - instancetype _objc_msgSend_467( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer sel1, - ffi.Pointer arg, - ) { - return __objc_msgSend_467( - obj, - sel, - target, - sel1, - arg, - ); - } + NSURLResourceKey get NSURLVolumeLocalizedNameKey => + _NSURLVolumeLocalizedNameKey.value; - late final __objc_msgSend_467Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + set NSURLVolumeLocalizedNameKey(NSURLResourceKey value) => + _NSURLVolumeLocalizedNameKey.value = value; - late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); - instancetype _objc_msgSend_468( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer inv, - ) { - return __objc_msgSend_468( - obj, - sel, - inv, - ); - } + /// true if the volume is encrypted. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsEncryptedKey = + _lookup('NSURLVolumeIsEncryptedKey'); - late final __objc_msgSend_468Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + NSURLResourceKey get NSURLVolumeIsEncryptedKey => + _NSURLVolumeIsEncryptedKey.value; - late final _sel_invocation1 = _registerName1("invocation"); - ffi.Pointer _objc_msgSend_469( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_469( - obj, - sel, - ); - } + set NSURLVolumeIsEncryptedKey(NSURLResourceKey value) => + _NSURLVolumeIsEncryptedKey.value = value; - late final __objc_msgSend_469Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + /// true if the volume is the root filesystem. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsRootFileSystemKey = + _lookup('NSURLVolumeIsRootFileSystemKey'); - late final _sel_result1 = _registerName1("result"); - late final ffi.Pointer - _NSInvocationOperationVoidResultException = - _lookup('NSInvocationOperationVoidResultException'); + NSURLResourceKey get NSURLVolumeIsRootFileSystemKey => + _NSURLVolumeIsRootFileSystemKey.value; - NSExceptionName get NSInvocationOperationVoidResultException => - _NSInvocationOperationVoidResultException.value; + set NSURLVolumeIsRootFileSystemKey(NSURLResourceKey value) => + _NSURLVolumeIsRootFileSystemKey.value = value; - set NSInvocationOperationVoidResultException(NSExceptionName value) => - _NSInvocationOperationVoidResultException.value = value; + /// true if the volume supports transparent decompression of compressed files using decmpfs. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsCompressionKey = + _lookup('NSURLVolumeSupportsCompressionKey'); - late final ffi.Pointer - _NSInvocationOperationCancelledException = - _lookup('NSInvocationOperationCancelledException'); + NSURLResourceKey get NSURLVolumeSupportsCompressionKey => + _NSURLVolumeSupportsCompressionKey.value; - NSExceptionName get NSInvocationOperationCancelledException => - _NSInvocationOperationCancelledException.value; + set NSURLVolumeSupportsCompressionKey(NSURLResourceKey value) => + _NSURLVolumeSupportsCompressionKey.value = value; - set NSInvocationOperationCancelledException(NSExceptionName value) => - _NSInvocationOperationCancelledException.value = value; + /// true if the volume supports clonefile(2) (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsFileCloningKey = + _lookup('NSURLVolumeSupportsFileCloningKey'); - late final ffi.Pointer - _NSOperationQueueDefaultMaxConcurrentOperationCount = - _lookup('NSOperationQueueDefaultMaxConcurrentOperationCount'); + NSURLResourceKey get NSURLVolumeSupportsFileCloningKey => + _NSURLVolumeSupportsFileCloningKey.value; - int get NSOperationQueueDefaultMaxConcurrentOperationCount => - _NSOperationQueueDefaultMaxConcurrentOperationCount.value; + set NSURLVolumeSupportsFileCloningKey(NSURLResourceKey value) => + _NSURLVolumeSupportsFileCloningKey.value = value; - set NSOperationQueueDefaultMaxConcurrentOperationCount(int value) => - _NSOperationQueueDefaultMaxConcurrentOperationCount.value = value; + /// true if the volume supports renamex_np(2)'s RENAME_SWAP option (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsSwapRenamingKey = + _lookup('NSURLVolumeSupportsSwapRenamingKey'); - /// Predefined domain for errors from most AppKit and Foundation APIs. - late final ffi.Pointer _NSCocoaErrorDomain = - _lookup('NSCocoaErrorDomain'); + NSURLResourceKey get NSURLVolumeSupportsSwapRenamingKey => + _NSURLVolumeSupportsSwapRenamingKey.value; - NSErrorDomain get NSCocoaErrorDomain => _NSCocoaErrorDomain.value; + set NSURLVolumeSupportsSwapRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsSwapRenamingKey.value = value; - set NSCocoaErrorDomain(NSErrorDomain value) => - _NSCocoaErrorDomain.value = value; + /// true if the volume supports renamex_np(2)'s RENAME_EXCL option (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsExclusiveRenamingKey = + _lookup('NSURLVolumeSupportsExclusiveRenamingKey'); - /// Other predefined domains; value of "code" will correspond to preexisting values in these domains. - late final ffi.Pointer _NSPOSIXErrorDomain = - _lookup('NSPOSIXErrorDomain'); + NSURLResourceKey get NSURLVolumeSupportsExclusiveRenamingKey => + _NSURLVolumeSupportsExclusiveRenamingKey.value; - NSErrorDomain get NSPOSIXErrorDomain => _NSPOSIXErrorDomain.value; + set NSURLVolumeSupportsExclusiveRenamingKey(NSURLResourceKey value) => + _NSURLVolumeSupportsExclusiveRenamingKey.value = value; - set NSPOSIXErrorDomain(NSErrorDomain value) => - _NSPOSIXErrorDomain.value = value; + /// true if the volume supports making files immutable with the NSURLIsUserImmutableKey or NSURLIsSystemImmutableKey properties (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsImmutableFilesKey = + _lookup('NSURLVolumeSupportsImmutableFilesKey'); - late final ffi.Pointer _NSOSStatusErrorDomain = - _lookup('NSOSStatusErrorDomain'); + NSURLResourceKey get NSURLVolumeSupportsImmutableFilesKey => + _NSURLVolumeSupportsImmutableFilesKey.value; - NSErrorDomain get NSOSStatusErrorDomain => _NSOSStatusErrorDomain.value; + set NSURLVolumeSupportsImmutableFilesKey(NSURLResourceKey value) => + _NSURLVolumeSupportsImmutableFilesKey.value = value; - set NSOSStatusErrorDomain(NSErrorDomain value) => - _NSOSStatusErrorDomain.value = value; + /// true if the volume supports setting POSIX access permissions with the NSURLFileSecurityKey property (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsAccessPermissionsKey = + _lookup('NSURLVolumeSupportsAccessPermissionsKey'); - late final ffi.Pointer _NSMachErrorDomain = - _lookup('NSMachErrorDomain'); + NSURLResourceKey get NSURLVolumeSupportsAccessPermissionsKey => + _NSURLVolumeSupportsAccessPermissionsKey.value; - NSErrorDomain get NSMachErrorDomain => _NSMachErrorDomain.value; + set NSURLVolumeSupportsAccessPermissionsKey(NSURLResourceKey value) => + _NSURLVolumeSupportsAccessPermissionsKey.value = value; - set NSMachErrorDomain(NSErrorDomain value) => - _NSMachErrorDomain.value = value; + /// True if the volume supports the File Protection attribute (see NSURLFileProtectionKey). (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsFileProtectionKey = + _lookup('NSURLVolumeSupportsFileProtectionKey'); - /// Key in userInfo. A recommended standard way to embed NSErrors from underlying calls. The value of this key should be an NSError. - late final ffi.Pointer _NSUnderlyingErrorKey = - _lookup('NSUnderlyingErrorKey'); + NSURLResourceKey get NSURLVolumeSupportsFileProtectionKey => + _NSURLVolumeSupportsFileProtectionKey.value; - NSErrorUserInfoKey get NSUnderlyingErrorKey => _NSUnderlyingErrorKey.value; + set NSURLVolumeSupportsFileProtectionKey(NSURLResourceKey value) => + _NSURLVolumeSupportsFileProtectionKey.value = value; - set NSUnderlyingErrorKey(NSErrorUserInfoKey value) => - _NSUnderlyingErrorKey.value = value; + /// (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeAvailableCapacityForImportantUsageKey = + _lookup( + 'NSURLVolumeAvailableCapacityForImportantUsageKey'); - /// Key in userInfo. A recommended standard way to embed a list of several NSErrors from underlying calls. The value of this key should be an NSArray of NSError. This value is independent from the value of `NSUnderlyingErrorKey` - neither, one, or both may be set. - late final ffi.Pointer _NSMultipleUnderlyingErrorsKey = - _lookup('NSMultipleUnderlyingErrorsKey'); + NSURLResourceKey get NSURLVolumeAvailableCapacityForImportantUsageKey => + _NSURLVolumeAvailableCapacityForImportantUsageKey.value; - NSErrorUserInfoKey get NSMultipleUnderlyingErrorsKey => - _NSMultipleUnderlyingErrorsKey.value; + set NSURLVolumeAvailableCapacityForImportantUsageKey( + NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityForImportantUsageKey.value = value; - set NSMultipleUnderlyingErrorsKey(NSErrorUserInfoKey value) => - _NSMultipleUnderlyingErrorsKey.value = value; + /// (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey = + _lookup( + 'NSURLVolumeAvailableCapacityForOpportunisticUsageKey'); - /// NSString, a complete sentence (or more) describing ideally both what failed and why it failed. - late final ffi.Pointer _NSLocalizedDescriptionKey = - _lookup('NSLocalizedDescriptionKey'); + NSURLResourceKey get NSURLVolumeAvailableCapacityForOpportunisticUsageKey => + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value; - NSErrorUserInfoKey get NSLocalizedDescriptionKey => - _NSLocalizedDescriptionKey.value; + set NSURLVolumeAvailableCapacityForOpportunisticUsageKey( + NSURLResourceKey value) => + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; - set NSLocalizedDescriptionKey(NSErrorUserInfoKey value) => - _NSLocalizedDescriptionKey.value = value; + /// The name of the file system type. (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeTypeNameKey = + _lookup('NSURLVolumeTypeNameKey'); - /// NSString, a complete sentence (or more) describing why the operation failed. - late final ffi.Pointer _NSLocalizedFailureReasonErrorKey = - _lookup('NSLocalizedFailureReasonErrorKey'); + NSURLResourceKey get NSURLVolumeTypeNameKey => _NSURLVolumeTypeNameKey.value; - NSErrorUserInfoKey get NSLocalizedFailureReasonErrorKey => - _NSLocalizedFailureReasonErrorKey.value; + set NSURLVolumeTypeNameKey(NSURLResourceKey value) => + _NSURLVolumeTypeNameKey.value = value; - set NSLocalizedFailureReasonErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedFailureReasonErrorKey.value = value; + /// The file system subtype value. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeSubtypeKey = + _lookup('NSURLVolumeSubtypeKey'); - /// NSString, a complete sentence (or more) describing what the user can do to fix the problem. - late final ffi.Pointer - _NSLocalizedRecoverySuggestionErrorKey = - _lookup('NSLocalizedRecoverySuggestionErrorKey'); + NSURLResourceKey get NSURLVolumeSubtypeKey => _NSURLVolumeSubtypeKey.value; - NSErrorUserInfoKey get NSLocalizedRecoverySuggestionErrorKey => - _NSLocalizedRecoverySuggestionErrorKey.value; + set NSURLVolumeSubtypeKey(NSURLResourceKey value) => + _NSURLVolumeSubtypeKey.value = value; - set NSLocalizedRecoverySuggestionErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedRecoverySuggestionErrorKey.value = value; + /// The volume mounted from location. (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeMountFromLocationKey = + _lookup('NSURLVolumeMountFromLocationKey'); - /// NSArray of NSStrings corresponding to button titles. - late final ffi.Pointer - _NSLocalizedRecoveryOptionsErrorKey = - _lookup('NSLocalizedRecoveryOptionsErrorKey'); + NSURLResourceKey get NSURLVolumeMountFromLocationKey => + _NSURLVolumeMountFromLocationKey.value; - NSErrorUserInfoKey get NSLocalizedRecoveryOptionsErrorKey => - _NSLocalizedRecoveryOptionsErrorKey.value; + set NSURLVolumeMountFromLocationKey(NSURLResourceKey value) => + _NSURLVolumeMountFromLocationKey.value = value; - set NSLocalizedRecoveryOptionsErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedRecoveryOptionsErrorKey.value = value; + /// true if this item is synced to the cloud, false if it is only a local file. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsUbiquitousItemKey = + _lookup('NSURLIsUbiquitousItemKey'); - /// Instance of a subclass of NSObject that conforms to the NSErrorRecoveryAttempting informal protocol - late final ffi.Pointer _NSRecoveryAttempterErrorKey = - _lookup('NSRecoveryAttempterErrorKey'); + NSURLResourceKey get NSURLIsUbiquitousItemKey => + _NSURLIsUbiquitousItemKey.value; - NSErrorUserInfoKey get NSRecoveryAttempterErrorKey => - _NSRecoveryAttempterErrorKey.value; + set NSURLIsUbiquitousItemKey(NSURLResourceKey value) => + _NSURLIsUbiquitousItemKey.value = value; - set NSRecoveryAttempterErrorKey(NSErrorUserInfoKey value) => - _NSRecoveryAttempterErrorKey.value = value; + /// true if this item has conflicts outstanding. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemHasUnresolvedConflictsKey = + _lookup('NSURLUbiquitousItemHasUnresolvedConflictsKey'); - /// NSString containing a help anchor - late final ffi.Pointer _NSHelpAnchorErrorKey = - _lookup('NSHelpAnchorErrorKey'); + NSURLResourceKey get NSURLUbiquitousItemHasUnresolvedConflictsKey => + _NSURLUbiquitousItemHasUnresolvedConflictsKey.value; - NSErrorUserInfoKey get NSHelpAnchorErrorKey => _NSHelpAnchorErrorKey.value; + set NSURLUbiquitousItemHasUnresolvedConflictsKey(NSURLResourceKey value) => + _NSURLUbiquitousItemHasUnresolvedConflictsKey.value = value; - set NSHelpAnchorErrorKey(NSErrorUserInfoKey value) => - _NSHelpAnchorErrorKey.value = value; + /// equivalent to NSURLUbiquitousItemDownloadingStatusKey == NSURLUbiquitousItemDownloadingStatusCurrent. Has never behaved as documented in earlier releases, hence deprecated. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsDownloadedKey = + _lookup('NSURLUbiquitousItemIsDownloadedKey'); - /// NSString. This provides a string which will be shown when constructing the debugDescription of the NSError, to be used when debugging or when formatting the error with %@. This string will never be used in localizedDescription, so will not be shown to the user. - late final ffi.Pointer _NSDebugDescriptionErrorKey = - _lookup('NSDebugDescriptionErrorKey'); + NSURLResourceKey get NSURLUbiquitousItemIsDownloadedKey => + _NSURLUbiquitousItemIsDownloadedKey.value; - NSErrorUserInfoKey get NSDebugDescriptionErrorKey => - _NSDebugDescriptionErrorKey.value; + set NSURLUbiquitousItemIsDownloadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsDownloadedKey.value = value; - set NSDebugDescriptionErrorKey(NSErrorUserInfoKey value) => - _NSDebugDescriptionErrorKey.value = value; + /// true if data is being downloaded for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemIsDownloadingKey = + _lookup('NSURLUbiquitousItemIsDownloadingKey'); - /// NSString, a complete sentence (or more) describing what failed. Setting a value for this key in userInfo dictionary of errors received from framework APIs is a good way to customize and fine tune the localizedDescription of an NSError. As an example, for Foundation error code NSFileWriteOutOfSpaceError, setting the value of this key to "The image library could not be saved." will allow the localizedDescription of the error to come out as "The image library could not be saved. The volume Macintosh HD is out of space." rather than the default (say) “You can't save the file ImgDatabaseV2 because the volume Macintosh HD is out of space." - late final ffi.Pointer _NSLocalizedFailureErrorKey = - _lookup('NSLocalizedFailureErrorKey'); + NSURLResourceKey get NSURLUbiquitousItemIsDownloadingKey => + _NSURLUbiquitousItemIsDownloadingKey.value; - NSErrorUserInfoKey get NSLocalizedFailureErrorKey => - _NSLocalizedFailureErrorKey.value; + set NSURLUbiquitousItemIsDownloadingKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsDownloadingKey.value = value; - set NSLocalizedFailureErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedFailureErrorKey.value = value; + /// true if there is data present in the cloud for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsUploadedKey = + _lookup('NSURLUbiquitousItemIsUploadedKey'); - /// NSNumber containing NSStringEncoding - late final ffi.Pointer _NSStringEncodingErrorKey = - _lookup('NSStringEncodingErrorKey'); + NSURLResourceKey get NSURLUbiquitousItemIsUploadedKey => + _NSURLUbiquitousItemIsUploadedKey.value; - NSErrorUserInfoKey get NSStringEncodingErrorKey => - _NSStringEncodingErrorKey.value; + set NSURLUbiquitousItemIsUploadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsUploadedKey.value = value; - set NSStringEncodingErrorKey(NSErrorUserInfoKey value) => - _NSStringEncodingErrorKey.value = value; + /// true if data is being uploaded for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsUploadingKey = + _lookup('NSURLUbiquitousItemIsUploadingKey'); - /// NSURL - late final ffi.Pointer _NSURLErrorKey = - _lookup('NSURLErrorKey'); + NSURLResourceKey get NSURLUbiquitousItemIsUploadingKey => + _NSURLUbiquitousItemIsUploadingKey.value; - NSErrorUserInfoKey get NSURLErrorKey => _NSURLErrorKey.value; + set NSURLUbiquitousItemIsUploadingKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsUploadingKey.value = value; - set NSURLErrorKey(NSErrorUserInfoKey value) => _NSURLErrorKey.value = value; + /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead + late final ffi.Pointer + _NSURLUbiquitousItemPercentDownloadedKey = + _lookup('NSURLUbiquitousItemPercentDownloadedKey'); - /// NSString - late final ffi.Pointer _NSFilePathErrorKey = - _lookup('NSFilePathErrorKey'); + NSURLResourceKey get NSURLUbiquitousItemPercentDownloadedKey => + _NSURLUbiquitousItemPercentDownloadedKey.value; - NSErrorUserInfoKey get NSFilePathErrorKey => _NSFilePathErrorKey.value; + set NSURLUbiquitousItemPercentDownloadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemPercentDownloadedKey.value = value; - set NSFilePathErrorKey(NSErrorUserInfoKey value) => - _NSFilePathErrorKey.value = value; + /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead + late final ffi.Pointer + _NSURLUbiquitousItemPercentUploadedKey = + _lookup('NSURLUbiquitousItemPercentUploadedKey'); - /// Is this an error handle? - /// - /// Requires there to be a current isolate. - bool Dart_IsError( - Object handle, - ) { - return _Dart_IsError( - handle, - ); - } + NSURLResourceKey get NSURLUbiquitousItemPercentUploadedKey => + _NSURLUbiquitousItemPercentUploadedKey.value; - late final _Dart_IsErrorPtr = - _lookup>( - 'Dart_IsError'); - late final _Dart_IsError = - _Dart_IsErrorPtr.asFunction(); + set NSURLUbiquitousItemPercentUploadedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemPercentUploadedKey.value = value; - /// Is this an api error handle? - /// - /// Api error handles are produced when an api function is misused. - /// This happens when a Dart embedding api function is called with - /// invalid arguments or in an invalid context. - /// - /// Requires there to be a current isolate. - bool Dart_IsApiError( - Object handle, - ) { - return _Dart_IsApiError( - handle, - ); - } + /// returns the download status of this item. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusKey = + _lookup('NSURLUbiquitousItemDownloadingStatusKey'); - late final _Dart_IsApiErrorPtr = - _lookup>( - 'Dart_IsApiError'); - late final _Dart_IsApiError = - _Dart_IsApiErrorPtr.asFunction(); + NSURLResourceKey get NSURLUbiquitousItemDownloadingStatusKey => + _NSURLUbiquitousItemDownloadingStatusKey.value; - /// Is this an unhandled exception error handle? - /// - /// Unhandled exception error handles are produced when, during the - /// execution of Dart code, an exception is thrown but not caught. - /// This can occur in any function which triggers the execution of Dart - /// code. - /// - /// See Dart_ErrorGetException and Dart_ErrorGetStackTrace. - /// - /// Requires there to be a current isolate. - bool Dart_IsUnhandledExceptionError( - Object handle, - ) { - return _Dart_IsUnhandledExceptionError( - handle, - ); - } + set NSURLUbiquitousItemDownloadingStatusKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadingStatusKey.value = value; - late final _Dart_IsUnhandledExceptionErrorPtr = - _lookup>( - 'Dart_IsUnhandledExceptionError'); - late final _Dart_IsUnhandledExceptionError = - _Dart_IsUnhandledExceptionErrorPtr.asFunction(); + /// returns the error when downloading the item from iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingErrorKey = + _lookup('NSURLUbiquitousItemDownloadingErrorKey'); - /// Is this a compilation error handle? - /// - /// Compilation error handles are produced when, during the execution - /// of Dart code, a compile-time error occurs. This can occur in any - /// function which triggers the execution of Dart code. - /// - /// Requires there to be a current isolate. - bool Dart_IsCompilationError( - Object handle, - ) { - return _Dart_IsCompilationError( - handle, - ); - } + NSURLResourceKey get NSURLUbiquitousItemDownloadingErrorKey => + _NSURLUbiquitousItemDownloadingErrorKey.value; - late final _Dart_IsCompilationErrorPtr = - _lookup>( - 'Dart_IsCompilationError'); - late final _Dart_IsCompilationError = - _Dart_IsCompilationErrorPtr.asFunction(); + set NSURLUbiquitousItemDownloadingErrorKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadingErrorKey.value = value; - /// Is this a fatal error handle? - /// - /// Fatal error handles are produced when the system wants to shut down - /// the current isolate. - /// - /// Requires there to be a current isolate. - bool Dart_IsFatalError( - Object handle, - ) { - return _Dart_IsFatalError( - handle, - ); - } + /// returns the error when uploading the item to iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) + late final ffi.Pointer + _NSURLUbiquitousItemUploadingErrorKey = + _lookup('NSURLUbiquitousItemUploadingErrorKey'); - late final _Dart_IsFatalErrorPtr = - _lookup>( - 'Dart_IsFatalError'); - late final _Dart_IsFatalError = - _Dart_IsFatalErrorPtr.asFunction(); + NSURLResourceKey get NSURLUbiquitousItemUploadingErrorKey => + _NSURLUbiquitousItemUploadingErrorKey.value; - /// Gets the error message from an error handle. - /// - /// Requires there to be a current isolate. - /// - /// \return A C string containing an error message if the handle is - /// error. An empty C string ("") if the handle is valid. This C - /// String is scope allocated and is only valid until the next call - /// to Dart_ExitScope. - ffi.Pointer Dart_GetError( - Object handle, - ) { - return _Dart_GetError( - handle, - ); - } + set NSURLUbiquitousItemUploadingErrorKey(NSURLResourceKey value) => + _NSURLUbiquitousItemUploadingErrorKey.value = value; - late final _Dart_GetErrorPtr = - _lookup Function(ffi.Handle)>>( - 'Dart_GetError'); - late final _Dart_GetError = - _Dart_GetErrorPtr.asFunction Function(Object)>(); + /// returns whether a download of this item has already been requested with an API like -startDownloadingUbiquitousItemAtURL:error: (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemDownloadRequestedKey = + _lookup('NSURLUbiquitousItemDownloadRequestedKey'); - /// Is this an error handle for an unhandled exception? - bool Dart_ErrorHasException( - Object handle, - ) { - return _Dart_ErrorHasException( - handle, - ); - } + NSURLResourceKey get NSURLUbiquitousItemDownloadRequestedKey => + _NSURLUbiquitousItemDownloadRequestedKey.value; - late final _Dart_ErrorHasExceptionPtr = - _lookup>( - 'Dart_ErrorHasException'); - late final _Dart_ErrorHasException = - _Dart_ErrorHasExceptionPtr.asFunction(); + set NSURLUbiquitousItemDownloadRequestedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemDownloadRequestedKey.value = value; - /// Gets the exception Object from an unhandled exception error handle. - Object Dart_ErrorGetException( - Object handle, - ) { - return _Dart_ErrorGetException( - handle, - ); - } + /// returns the name of this item's container as displayed to users. + late final ffi.Pointer + _NSURLUbiquitousItemContainerDisplayNameKey = + _lookup('NSURLUbiquitousItemContainerDisplayNameKey'); - late final _Dart_ErrorGetExceptionPtr = - _lookup>( - 'Dart_ErrorGetException'); - late final _Dart_ErrorGetException = - _Dart_ErrorGetExceptionPtr.asFunction(); + NSURLResourceKey get NSURLUbiquitousItemContainerDisplayNameKey => + _NSURLUbiquitousItemContainerDisplayNameKey.value; - /// Gets the stack trace Object from an unhandled exception error handle. - Object Dart_ErrorGetStackTrace( - Object handle, - ) { - return _Dart_ErrorGetStackTrace( - handle, - ); - } + set NSURLUbiquitousItemContainerDisplayNameKey(NSURLResourceKey value) => + _NSURLUbiquitousItemContainerDisplayNameKey.value = value; - late final _Dart_ErrorGetStackTracePtr = - _lookup>( - 'Dart_ErrorGetStackTrace'); - late final _Dart_ErrorGetStackTrace = - _Dart_ErrorGetStackTracePtr.asFunction(); + /// true if the item is excluded from sync, which means it is locally on disk but won't be available on the server. An excluded item is no longer ubiquitous. (Read-write, value type boolean NSNumber + late final ffi.Pointer + _NSURLUbiquitousItemIsExcludedFromSyncKey = + _lookup('NSURLUbiquitousItemIsExcludedFromSyncKey'); - /// Produces an api error handle with the provided error message. - /// - /// Requires there to be a current isolate. - /// - /// \param error the error message. - Object Dart_NewApiError( - ffi.Pointer error, - ) { - return _Dart_NewApiError( - error, - ); - } + NSURLResourceKey get NSURLUbiquitousItemIsExcludedFromSyncKey => + _NSURLUbiquitousItemIsExcludedFromSyncKey.value; - late final _Dart_NewApiErrorPtr = - _lookup)>>( - 'Dart_NewApiError'); - late final _Dart_NewApiError = - _Dart_NewApiErrorPtr.asFunction)>(); + set NSURLUbiquitousItemIsExcludedFromSyncKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsExcludedFromSyncKey.value = value; - Object Dart_NewCompilationError( - ffi.Pointer error, - ) { - return _Dart_NewCompilationError( - error, - ); - } + /// true if the ubiquitous item is shared. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsSharedKey = + _lookup('NSURLUbiquitousItemIsSharedKey'); - late final _Dart_NewCompilationErrorPtr = - _lookup)>>( - 'Dart_NewCompilationError'); - late final _Dart_NewCompilationError = _Dart_NewCompilationErrorPtr - .asFunction)>(); + NSURLResourceKey get NSURLUbiquitousItemIsSharedKey => + _NSURLUbiquitousItemIsSharedKey.value; - /// Produces a new unhandled exception error handle. - /// - /// Requires there to be a current isolate. - /// - /// \param exception An instance of a Dart object to be thrown or - /// an ApiError or CompilationError handle. - /// When an ApiError or CompilationError handle is passed in - /// a string object of the error message is created and it becomes - /// the Dart object to be thrown. - Object Dart_NewUnhandledExceptionError( - Object exception, - ) { - return _Dart_NewUnhandledExceptionError( - exception, - ); - } + set NSURLUbiquitousItemIsSharedKey(NSURLResourceKey value) => + _NSURLUbiquitousItemIsSharedKey.value = value; - late final _Dart_NewUnhandledExceptionErrorPtr = - _lookup>( - 'Dart_NewUnhandledExceptionError'); - late final _Dart_NewUnhandledExceptionError = - _Dart_NewUnhandledExceptionErrorPtr.asFunction(); + /// returns the current user's role for this shared item, or nil if not shared. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousSharedItemCurrentUserRoleKey = + _lookup('NSURLUbiquitousSharedItemCurrentUserRoleKey'); - /// Propagates an error. - /// - /// If the provided handle is an unhandled exception error, this - /// function will cause the unhandled exception to be rethrown. This - /// will proceed in the standard way, walking up Dart frames until an - /// appropriate 'catch' block is found, executing 'finally' blocks, - /// etc. - /// - /// If the error is not an unhandled exception error, we will unwind - /// the stack to the next C frame. Intervening Dart frames will be - /// discarded; specifically, 'finally' blocks will not execute. This - /// is the standard way that compilation errors (and the like) are - /// handled by the Dart runtime. - /// - /// In either case, when an error is propagated any current scopes - /// created by Dart_EnterScope will be exited. - /// - /// See the additional discussion under "Propagating Errors" at the - /// beginning of this file. - /// - /// \param An error handle (See Dart_IsError) - /// - /// \return On success, this function does not return. On failure, the - /// process is terminated. - void Dart_PropagateError( - Object handle, - ) { - return _Dart_PropagateError( - handle, - ); - } + NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserRoleKey => + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value; - late final _Dart_PropagateErrorPtr = - _lookup>( - 'Dart_PropagateError'); - late final _Dart_PropagateError = - _Dart_PropagateErrorPtr.asFunction(); + set NSURLUbiquitousSharedItemCurrentUserRoleKey(NSURLResourceKey value) => + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value = value; - /// Converts an object to a string. - /// - /// May generate an unhandled exception error. - /// - /// \return The converted string if no error occurs during - /// the conversion. If an error does occur, an error handle is - /// returned. - Object Dart_ToString( - Object object, - ) { - return _Dart_ToString( - object, - ); - } + /// returns the permissions for the current user, or nil if not shared. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey = + _lookup( + 'NSURLUbiquitousSharedItemCurrentUserPermissionsKey'); - late final _Dart_ToStringPtr = - _lookup>( - 'Dart_ToString'); - late final _Dart_ToString = - _Dart_ToStringPtr.asFunction(); + NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserPermissionsKey => + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value; - /// Checks to see if two handles refer to identically equal objects. - /// - /// If both handles refer to instances, this is equivalent to using the top-level - /// function identical() from dart:core. Otherwise, returns whether the two - /// argument handles refer to the same object. - /// - /// \param obj1 An object to be compared. - /// \param obj2 An object to be compared. - /// - /// \return True if the objects are identically equal. False otherwise. - bool Dart_IdentityEquals( - Object obj1, - Object obj2, - ) { - return _Dart_IdentityEquals( - obj1, - obj2, - ); - } + set NSURLUbiquitousSharedItemCurrentUserPermissionsKey( + NSURLResourceKey value) => + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value = value; - late final _Dart_IdentityEqualsPtr = - _lookup>( - 'Dart_IdentityEquals'); - late final _Dart_IdentityEquals = - _Dart_IdentityEqualsPtr.asFunction(); + /// returns a NSPersonNameComponents, or nil if the current user. (Read-only, value type NSPersonNameComponents) + late final ffi.Pointer + _NSURLUbiquitousSharedItemOwnerNameComponentsKey = + _lookup( + 'NSURLUbiquitousSharedItemOwnerNameComponentsKey'); - /// Allocates a handle in the current scope from a persistent handle. - Object Dart_HandleFromPersistent( - Object object, - ) { - return _Dart_HandleFromPersistent( - object, - ); - } + NSURLResourceKey get NSURLUbiquitousSharedItemOwnerNameComponentsKey => + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value; - late final _Dart_HandleFromPersistentPtr = - _lookup>( - 'Dart_HandleFromPersistent'); - late final _Dart_HandleFromPersistent = - _Dart_HandleFromPersistentPtr.asFunction(); + set NSURLUbiquitousSharedItemOwnerNameComponentsKey(NSURLResourceKey value) => + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value = value; - /// Allocates a handle in the current scope from a weak persistent handle. - /// - /// This will be a handle to Dart_Null if the object has been garbage collected. - Object Dart_HandleFromWeakPersistent( - Dart_WeakPersistentHandle object, - ) { - return _Dart_HandleFromWeakPersistent( - object, - ); - } + /// returns a NSPersonNameComponents for the most recent editor of the document, or nil if it is the current user. (Read-only, value type NSPersonNameComponents) + late final ffi.Pointer + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey = + _lookup( + 'NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey'); - late final _Dart_HandleFromWeakPersistentPtr = _lookup< - ffi.NativeFunction>( - 'Dart_HandleFromWeakPersistent'); - late final _Dart_HandleFromWeakPersistent = _Dart_HandleFromWeakPersistentPtr - .asFunction(); + NSURLResourceKey + get NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey => + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value; - /// Allocates a persistent handle for an object. - /// - /// This handle has the lifetime of the current isolate unless it is - /// explicitly deallocated by calling Dart_DeletePersistentHandle. - /// - /// Requires there to be a current isolate. - Object Dart_NewPersistentHandle( - Object object, - ) { - return _Dart_NewPersistentHandle( - object, - ); - } + set NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey( + NSURLResourceKey value) => + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value = value; - late final _Dart_NewPersistentHandlePtr = - _lookup>( - 'Dart_NewPersistentHandle'); - late final _Dart_NewPersistentHandle = - _Dart_NewPersistentHandlePtr.asFunction(); + /// this item has not been downloaded yet. Use startDownloadingUbiquitousItemAtURL:error: to download it. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusNotDownloaded = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusNotDownloaded'); - /// Assign value of local handle to a persistent handle. - /// - /// Requires there to be a current isolate. - /// - /// \param obj1 A persistent handle whose value needs to be set. - /// \param obj2 An object whose value needs to be set to the persistent handle. - /// - /// \return Success if the persistent handle was set - /// Otherwise, returns an error. - void Dart_SetPersistentHandle( - Object obj1, - Object obj2, - ) { - return _Dart_SetPersistentHandle( - obj1, - obj2, - ); - } + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusNotDownloaded => + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value; - late final _Dart_SetPersistentHandlePtr = - _lookup>( - 'Dart_SetPersistentHandle'); - late final _Dart_SetPersistentHandle = - _Dart_SetPersistentHandlePtr.asFunction(); + set NSURLUbiquitousItemDownloadingStatusNotDownloaded( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; - /// Deallocates a persistent handle. - /// - /// Requires there to be a current isolate group. - void Dart_DeletePersistentHandle( - Object object, - ) { - return _Dart_DeletePersistentHandle( - object, - ); - } + /// there is a local version of this item available. The most current version will get downloaded as soon as possible. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusDownloaded = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusDownloaded'); - late final _Dart_DeletePersistentHandlePtr = - _lookup>( - 'Dart_DeletePersistentHandle'); - late final _Dart_DeletePersistentHandle = - _Dart_DeletePersistentHandlePtr.asFunction(); + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusDownloaded => + _NSURLUbiquitousItemDownloadingStatusDownloaded.value; - /// Allocates a weak persistent handle for an object. - /// - /// This handle has the lifetime of the current isolate. The handle can also be - /// explicitly deallocated by calling Dart_DeleteWeakPersistentHandle. - /// - /// If the object becomes unreachable the callback is invoked with the peer as - /// argument. The callback can be executed on any thread, will have a current - /// isolate group, but will not have a current isolate. The callback can only - /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. This - /// gives the embedder the ability to cleanup data associated with the object. - /// The handle will point to the Dart_Null object after the finalizer has been - /// run. It is illegal to call into the VM with any other Dart_* functions from - /// the callback. If the handle is deleted before the object becomes - /// unreachable, the callback is never invoked. - /// - /// Requires there to be a current isolate. - /// - /// \param object An object with identity. - /// \param peer A pointer to a native object or NULL. This value is - /// provided to callback when it is invoked. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A function pointer that will be invoked sometime - /// after the object is garbage collected, unless the handle has been deleted. - /// A valid callback needs to be specified it cannot be NULL. - /// - /// \return The weak persistent handle or NULL. NULL is returned in case of bad - /// parameters. - Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle( - Object object, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewWeakPersistentHandle( - object, - peer, - external_allocation_size, - callback, - ); - } + set NSURLUbiquitousItemDownloadingStatusDownloaded( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusDownloaded.value = value; - late final _Dart_NewWeakPersistentHandlePtr = _lookup< - ffi.NativeFunction< - Dart_WeakPersistentHandle Function( - ffi.Handle, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewWeakPersistentHandle'); - late final _Dart_NewWeakPersistentHandle = - _Dart_NewWeakPersistentHandlePtr.asFunction< - Dart_WeakPersistentHandle Function( - Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); + /// there is a local version of this item and it is the most up-to-date version known to this device. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusCurrent = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusCurrent'); - /// Deletes the given weak persistent [object] handle. - /// - /// Requires there to be a current isolate group. - void Dart_DeleteWeakPersistentHandle( - Dart_WeakPersistentHandle object, - ) { - return _Dart_DeleteWeakPersistentHandle( - object, - ); - } + NSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusCurrent => + _NSURLUbiquitousItemDownloadingStatusCurrent.value; - late final _Dart_DeleteWeakPersistentHandlePtr = - _lookup>( - 'Dart_DeleteWeakPersistentHandle'); - late final _Dart_DeleteWeakPersistentHandle = - _Dart_DeleteWeakPersistentHandlePtr.asFunction< - void Function(Dart_WeakPersistentHandle)>(); + set NSURLUbiquitousItemDownloadingStatusCurrent( + NSURLUbiquitousItemDownloadingStatus value) => + _NSURLUbiquitousItemDownloadingStatusCurrent.value = value; - /// Updates the external memory size for the given weak persistent handle. - /// - /// May trigger garbage collection. - void Dart_UpdateExternalSize( - Dart_WeakPersistentHandle object, - int external_allocation_size, - ) { - return _Dart_UpdateExternalSize( - object, - external_allocation_size, - ); - } + /// the current user is the owner of this shared item. + late final ffi.Pointer + _NSURLUbiquitousSharedItemRoleOwner = + _lookup( + 'NSURLUbiquitousSharedItemRoleOwner'); - late final _Dart_UpdateExternalSizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_WeakPersistentHandle, - ffi.IntPtr)>>('Dart_UpdateExternalSize'); - late final _Dart_UpdateExternalSize = _Dart_UpdateExternalSizePtr.asFunction< - void Function(Dart_WeakPersistentHandle, int)>(); + NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleOwner => + _NSURLUbiquitousSharedItemRoleOwner.value; - /// Allocates a finalizable handle for an object. - /// - /// This handle has the lifetime of the current isolate group unless the object - /// pointed to by the handle is garbage collected, in this case the VM - /// automatically deletes the handle after invoking the callback associated - /// with the handle. The handle can also be explicitly deallocated by - /// calling Dart_DeleteFinalizableHandle. - /// - /// If the object becomes unreachable the callback is invoked with the - /// the peer as argument. The callback can be executed on any thread, will have - /// an isolate group, but will not have a current isolate. The callback can only - /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. - /// This gives the embedder the ability to cleanup data associated with the - /// object and clear out any cached references to the handle. All references to - /// this handle after the callback will be invalid. It is illegal to call into - /// the VM with any other Dart_* functions from the callback. If the handle is - /// deleted before the object becomes unreachable, the callback is never - /// invoked. - /// - /// Requires there to be a current isolate. - /// - /// \param object An object with identity. - /// \param peer A pointer to a native object or NULL. This value is - /// provided to callback when it is invoked. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A function pointer that will be invoked sometime - /// after the object is garbage collected, unless the handle has been deleted. - /// A valid callback needs to be specified it cannot be NULL. - /// - /// \return The finalizable handle or NULL. NULL is returned in case of bad - /// parameters. - Dart_FinalizableHandle Dart_NewFinalizableHandle( - Object object, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewFinalizableHandle( - object, - peer, - external_allocation_size, - callback, - ); - } + set NSURLUbiquitousSharedItemRoleOwner(NSURLUbiquitousSharedItemRole value) => + _NSURLUbiquitousSharedItemRoleOwner.value = value; - late final _Dart_NewFinalizableHandlePtr = _lookup< - ffi.NativeFunction< - Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, - ffi.IntPtr, Dart_HandleFinalizer)>>('Dart_NewFinalizableHandle'); - late final _Dart_NewFinalizableHandle = - _Dart_NewFinalizableHandlePtr.asFunction< - Dart_FinalizableHandle Function( - Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); + /// the current user is a participant of this shared item. + late final ffi.Pointer + _NSURLUbiquitousSharedItemRoleParticipant = + _lookup( + 'NSURLUbiquitousSharedItemRoleParticipant'); - /// Deletes the given finalizable [object] handle. - /// - /// The caller has to provide the actual Dart object the handle was created from - /// to prove the object (and therefore the finalizable handle) is still alive. - /// - /// Requires there to be a current isolate. - void Dart_DeleteFinalizableHandle( - Dart_FinalizableHandle object, - Object strong_ref_to_object, + NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleParticipant => + _NSURLUbiquitousSharedItemRoleParticipant.value; + + set NSURLUbiquitousSharedItemRoleParticipant( + NSURLUbiquitousSharedItemRole value) => + _NSURLUbiquitousSharedItemRoleParticipant.value = value; + + /// the current user is only allowed to read this item + late final ffi.Pointer + _NSURLUbiquitousSharedItemPermissionsReadOnly = + _lookup( + 'NSURLUbiquitousSharedItemPermissionsReadOnly'); + + NSURLUbiquitousSharedItemPermissions + get NSURLUbiquitousSharedItemPermissionsReadOnly => + _NSURLUbiquitousSharedItemPermissionsReadOnly.value; + + set NSURLUbiquitousSharedItemPermissionsReadOnly( + NSURLUbiquitousSharedItemPermissions value) => + _NSURLUbiquitousSharedItemPermissionsReadOnly.value = value; + + /// the current user is allowed to both read and write this item + late final ffi.Pointer + _NSURLUbiquitousSharedItemPermissionsReadWrite = + _lookup( + 'NSURLUbiquitousSharedItemPermissionsReadWrite'); + + NSURLUbiquitousSharedItemPermissions + get NSURLUbiquitousSharedItemPermissionsReadWrite => + _NSURLUbiquitousSharedItemPermissionsReadWrite.value; + + set NSURLUbiquitousSharedItemPermissionsReadWrite( + NSURLUbiquitousSharedItemPermissions value) => + _NSURLUbiquitousSharedItemPermissionsReadWrite.value = value; + + late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); + late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); + instancetype _objc_msgSend_463( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer name, + ffi.Pointer value, ) { - return _Dart_DeleteFinalizableHandle( - object, - strong_ref_to_object, + return __objc_msgSend_463( + obj, + sel, + name, + value, ); } - late final _Dart_DeleteFinalizableHandlePtr = _lookup< + late final __objc_msgSend_463Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, - ffi.Handle)>>('Dart_DeleteFinalizableHandle'); - late final _Dart_DeleteFinalizableHandle = _Dart_DeleteFinalizableHandlePtr - .asFunction(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - /// Updates the external memory size for the given finalizable handle. - /// - /// The caller has to provide the actual Dart object the handle was created from - /// to prove the object (and therefore the finalizable handle) is still alive. - /// - /// May trigger garbage collection. - void Dart_UpdateFinalizableExternalSize( - Dart_FinalizableHandle object, - Object strong_ref_to_object, - int external_allocation_size, + late final _sel_queryItemWithName_value_1 = + _registerName1("queryItemWithName:value:"); + late final _sel_value1 = _registerName1("value"); + late final _class_NSURLComponents1 = _getClass1("NSURLComponents"); + late final _sel_initWithURL_resolvingAgainstBaseURL_1 = + _registerName1("initWithURL:resolvingAgainstBaseURL:"); + late final _sel_componentsWithURL_resolvingAgainstBaseURL_1 = + _registerName1("componentsWithURL:resolvingAgainstBaseURL:"); + late final _sel_componentsWithString_1 = + _registerName1("componentsWithString:"); + late final _sel_URLRelativeToURL_1 = _registerName1("URLRelativeToURL:"); + ffi.Pointer _objc_msgSend_464( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer baseURL, ) { - return _Dart_UpdateFinalizableExternalSize( - object, - strong_ref_to_object, - external_allocation_size, + return __objc_msgSend_464( + obj, + sel, + baseURL, ); } - late final _Dart_UpdateFinalizableExternalSizePtr = _lookup< + late final __objc_msgSend_464Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, - ffi.IntPtr)>>('Dart_UpdateFinalizableExternalSize'); - late final _Dart_UpdateFinalizableExternalSize = - _Dart_UpdateFinalizableExternalSizePtr.asFunction< - void Function(Dart_FinalizableHandle, Object, int)>(); - - /// Gets the version string for the Dart VM. - /// - /// The version of the Dart VM can be accessed without initializing the VM. - /// - /// \return The version string for the embedded Dart VM. - ffi.Pointer Dart_VersionString() { - return _Dart_VersionString(); - } - - late final _Dart_VersionStringPtr = - _lookup Function()>>( - 'Dart_VersionString'); - late final _Dart_VersionString = - _Dart_VersionStringPtr.asFunction Function()>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - /// Initialize Dart_IsolateFlags with correct version and default values. - void Dart_IsolateFlagsInitialize( - ffi.Pointer flags, + late final _sel_setScheme_1 = _registerName1("setScheme:"); + late final _sel_setUser_1 = _registerName1("setUser:"); + late final _sel_setPassword_1 = _registerName1("setPassword:"); + late final _sel_setHost_1 = _registerName1("setHost:"); + late final _sel_setPort_1 = _registerName1("setPort:"); + late final _sel_setPath_1 = _registerName1("setPath:"); + late final _sel_setQuery_1 = _registerName1("setQuery:"); + late final _sel_setFragment_1 = _registerName1("setFragment:"); + late final _sel_percentEncodedUser1 = _registerName1("percentEncodedUser"); + late final _sel_setPercentEncodedUser_1 = + _registerName1("setPercentEncodedUser:"); + late final _sel_percentEncodedPassword1 = + _registerName1("percentEncodedPassword"); + late final _sel_setPercentEncodedPassword_1 = + _registerName1("setPercentEncodedPassword:"); + late final _sel_percentEncodedHost1 = _registerName1("percentEncodedHost"); + late final _sel_setPercentEncodedHost_1 = + _registerName1("setPercentEncodedHost:"); + late final _sel_percentEncodedPath1 = _registerName1("percentEncodedPath"); + late final _sel_setPercentEncodedPath_1 = + _registerName1("setPercentEncodedPath:"); + late final _sel_percentEncodedQuery1 = _registerName1("percentEncodedQuery"); + late final _sel_setPercentEncodedQuery_1 = + _registerName1("setPercentEncodedQuery:"); + late final _sel_percentEncodedFragment1 = + _registerName1("percentEncodedFragment"); + late final _sel_setPercentEncodedFragment_1 = + _registerName1("setPercentEncodedFragment:"); + late final _sel_encodedHost1 = _registerName1("encodedHost"); + late final _sel_setEncodedHost_1 = _registerName1("setEncodedHost:"); + late final _sel_rangeOfScheme1 = _registerName1("rangeOfScheme"); + late final _sel_rangeOfUser1 = _registerName1("rangeOfUser"); + late final _sel_rangeOfPassword1 = _registerName1("rangeOfPassword"); + late final _sel_rangeOfHost1 = _registerName1("rangeOfHost"); + late final _sel_rangeOfPort1 = _registerName1("rangeOfPort"); + late final _sel_rangeOfPath1 = _registerName1("rangeOfPath"); + late final _sel_rangeOfQuery1 = _registerName1("rangeOfQuery"); + late final _sel_rangeOfFragment1 = _registerName1("rangeOfFragment"); + late final _sel_queryItems1 = _registerName1("queryItems"); + late final _sel_setQueryItems_1 = _registerName1("setQueryItems:"); + late final _sel_percentEncodedQueryItems1 = + _registerName1("percentEncodedQueryItems"); + late final _sel_setPercentEncodedQueryItems_1 = + _registerName1("setPercentEncodedQueryItems:"); + late final _class_NSFileSecurity1 = _getClass1("NSFileSecurity"); + late final _class_NSHTTPURLResponse1 = _getClass1("NSHTTPURLResponse"); + late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_1 = + _registerName1("initWithURL:statusCode:HTTPVersion:headerFields:"); + instancetype _objc_msgSend_465( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + int statusCode, + ffi.Pointer HTTPVersion, + ffi.Pointer headerFields, ) { - return _Dart_IsolateFlagsInitialize( - flags, + return __objc_msgSend_465( + obj, + sel, + url, + statusCode, + HTTPVersion, + headerFields, ); } - late final _Dart_IsolateFlagsInitializePtr = _lookup< + late final __objc_msgSend_465Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer)>>('Dart_IsolateFlagsInitialize'); - late final _Dart_IsolateFlagsInitialize = _Dart_IsolateFlagsInitializePtr - .asFunction)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); - /// Initializes the VM. - /// - /// \param params A struct containing initialization information. The version - /// field of the struct must be DART_INITIALIZE_PARAMS_CURRENT_VERSION. - /// - /// \return NULL if initialization is successful. Returns an error message - /// otherwise. The caller is responsible for freeing the error message. - ffi.Pointer Dart_Initialize( - ffi.Pointer params, + late final _sel_statusCode1 = _registerName1("statusCode"); + late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); + late final _sel_localizedStringForStatusCode_1 = + _registerName1("localizedStringForStatusCode:"); + ffi.Pointer _objc_msgSend_466( + ffi.Pointer obj, + ffi.Pointer sel, + int statusCode, ) { - return _Dart_Initialize( - params, + return __objc_msgSend_466( + obj, + sel, + statusCode, ); } - late final _Dart_InitializePtr = _lookup< + late final __objc_msgSend_466Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('Dart_Initialize'); - late final _Dart_Initialize = _Dart_InitializePtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSInteger)>>('objc_msgSend'); + late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - /// Cleanup state in the VM before process termination. - /// - /// \return NULL if cleanup is successful. Returns an error message otherwise. - /// The caller is responsible for freeing the error message. - /// - /// NOTE: This function must not be called on a thread that was created by the VM - /// itself. - ffi.Pointer Dart_Cleanup() { - return _Dart_Cleanup(); - } + late final ffi.Pointer _NSGenericException = + _lookup('NSGenericException'); - late final _Dart_CleanupPtr = - _lookup Function()>>( - 'Dart_Cleanup'); - late final _Dart_Cleanup = - _Dart_CleanupPtr.asFunction Function()>(); + NSExceptionName get NSGenericException => _NSGenericException.value; - /// Sets command line flags. Should be called before Dart_Initialize. - /// - /// \param argc The length of the arguments array. - /// \param argv An array of arguments. - /// - /// \return NULL if successful. Returns an error message otherwise. - /// The caller is responsible for freeing the error message. - /// - /// NOTE: This call does not store references to the passed in c-strings. - ffi.Pointer Dart_SetVMFlags( - int argc, - ffi.Pointer> argv, + set NSGenericException(NSExceptionName value) => + _NSGenericException.value = value; + + late final ffi.Pointer _NSRangeException = + _lookup('NSRangeException'); + + NSExceptionName get NSRangeException => _NSRangeException.value; + + set NSRangeException(NSExceptionName value) => + _NSRangeException.value = value; + + late final ffi.Pointer _NSInvalidArgumentException = + _lookup('NSInvalidArgumentException'); + + NSExceptionName get NSInvalidArgumentException => + _NSInvalidArgumentException.value; + + set NSInvalidArgumentException(NSExceptionName value) => + _NSInvalidArgumentException.value = value; + + late final ffi.Pointer _NSInternalInconsistencyException = + _lookup('NSInternalInconsistencyException'); + + NSExceptionName get NSInternalInconsistencyException => + _NSInternalInconsistencyException.value; + + set NSInternalInconsistencyException(NSExceptionName value) => + _NSInternalInconsistencyException.value = value; + + late final ffi.Pointer _NSMallocException = + _lookup('NSMallocException'); + + NSExceptionName get NSMallocException => _NSMallocException.value; + + set NSMallocException(NSExceptionName value) => + _NSMallocException.value = value; + + late final ffi.Pointer _NSObjectInaccessibleException = + _lookup('NSObjectInaccessibleException'); + + NSExceptionName get NSObjectInaccessibleException => + _NSObjectInaccessibleException.value; + + set NSObjectInaccessibleException(NSExceptionName value) => + _NSObjectInaccessibleException.value = value; + + late final ffi.Pointer _NSObjectNotAvailableException = + _lookup('NSObjectNotAvailableException'); + + NSExceptionName get NSObjectNotAvailableException => + _NSObjectNotAvailableException.value; + + set NSObjectNotAvailableException(NSExceptionName value) => + _NSObjectNotAvailableException.value = value; + + late final ffi.Pointer _NSDestinationInvalidException = + _lookup('NSDestinationInvalidException'); + + NSExceptionName get NSDestinationInvalidException => + _NSDestinationInvalidException.value; + + set NSDestinationInvalidException(NSExceptionName value) => + _NSDestinationInvalidException.value = value; + + late final ffi.Pointer _NSPortTimeoutException = + _lookup('NSPortTimeoutException'); + + NSExceptionName get NSPortTimeoutException => _NSPortTimeoutException.value; + + set NSPortTimeoutException(NSExceptionName value) => + _NSPortTimeoutException.value = value; + + late final ffi.Pointer _NSInvalidSendPortException = + _lookup('NSInvalidSendPortException'); + + NSExceptionName get NSInvalidSendPortException => + _NSInvalidSendPortException.value; + + set NSInvalidSendPortException(NSExceptionName value) => + _NSInvalidSendPortException.value = value; + + late final ffi.Pointer _NSInvalidReceivePortException = + _lookup('NSInvalidReceivePortException'); + + NSExceptionName get NSInvalidReceivePortException => + _NSInvalidReceivePortException.value; + + set NSInvalidReceivePortException(NSExceptionName value) => + _NSInvalidReceivePortException.value = value; + + late final ffi.Pointer _NSPortSendException = + _lookup('NSPortSendException'); + + NSExceptionName get NSPortSendException => _NSPortSendException.value; + + set NSPortSendException(NSExceptionName value) => + _NSPortSendException.value = value; + + late final ffi.Pointer _NSPortReceiveException = + _lookup('NSPortReceiveException'); + + NSExceptionName get NSPortReceiveException => _NSPortReceiveException.value; + + set NSPortReceiveException(NSExceptionName value) => + _NSPortReceiveException.value = value; + + late final ffi.Pointer _NSOldStyleException = + _lookup('NSOldStyleException'); + + NSExceptionName get NSOldStyleException => _NSOldStyleException.value; + + set NSOldStyleException(NSExceptionName value) => + _NSOldStyleException.value = value; + + late final ffi.Pointer _NSInconsistentArchiveException = + _lookup('NSInconsistentArchiveException'); + + NSExceptionName get NSInconsistentArchiveException => + _NSInconsistentArchiveException.value; + + set NSInconsistentArchiveException(NSExceptionName value) => + _NSInconsistentArchiveException.value = value; + + late final _class_NSException1 = _getClass1("NSException"); + late final _sel_exceptionWithName_reason_userInfo_1 = + _registerName1("exceptionWithName:reason:userInfo:"); + ffi.Pointer _objc_msgSend_467( + ffi.Pointer obj, + ffi.Pointer sel, + NSExceptionName name, + ffi.Pointer reason, + ffi.Pointer userInfo, ) { - return _Dart_SetVMFlags( - argc, - argv, + return __objc_msgSend_467( + obj, + sel, + name, + reason, + userInfo, ); } - late final _Dart_SetVMFlagsPtr = _lookup< + late final __objc_msgSend_467Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer>)>>('Dart_SetVMFlags'); - late final _Dart_SetVMFlags = _Dart_SetVMFlagsPtr.asFunction< - ffi.Pointer Function( - int, ffi.Pointer>)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + ffi.Pointer)>(); - /// Returns true if the named VM flag is of boolean type, specified, and set to - /// true. - /// - /// \param flag_name The name of the flag without leading punctuation - /// (example: "enable_asserts"). - bool Dart_IsVMFlagSet( - ffi.Pointer flag_name, + late final _sel_initWithName_reason_userInfo_1 = + _registerName1("initWithName:reason:userInfo:"); + instancetype _objc_msgSend_468( + ffi.Pointer obj, + ffi.Pointer sel, + NSExceptionName aName, + ffi.Pointer aReason, + ffi.Pointer aUserInfo, ) { - return _Dart_IsVMFlagSet( - flag_name, + return __objc_msgSend_468( + obj, + sel, + aName, + aReason, + aUserInfo, ); } - late final _Dart_IsVMFlagSetPtr = - _lookup)>>( - 'Dart_IsVMFlagSet'); - late final _Dart_IsVMFlagSet = - _Dart_IsVMFlagSetPtr.asFunction)>(); - - /// Creates a new isolate. The new isolate becomes the current isolate. - /// - /// A snapshot can be used to restore the VM quickly to a saved state - /// and is useful for fast startup. If snapshot data is provided, the - /// isolate will be started using that snapshot data. Requires a core snapshot or - /// an app snapshot created by Dart_CreateSnapshot or - /// Dart_CreatePrecompiledSnapshot* from a VM with the same version. - /// - /// Requires there to be no current isolate. - /// - /// \param script_uri The main source file or snapshot this isolate will load. - /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child - /// isolate is created by Isolate.spawn. The embedder should use a URI that - /// allows it to load the same program into such a child isolate. - /// \param name A short name for the isolate to improve debugging messages. - /// Typically of the format 'foo.dart:main()'. - /// \param isolate_snapshot_data - /// \param isolate_snapshot_instructions Buffers containing a snapshot of the - /// isolate or NULL if no snapshot is provided. If provided, the buffers must - /// remain valid until the isolate shuts down. - /// \param flags Pointer to VM specific flags or NULL for default flags. - /// \param isolate_group_data Embedder group data. This data can be obtained - /// by calling Dart_IsolateGroupData and will be passed to the - /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and - /// Dart_IsolateGroupCleanupCallback. - /// \param isolate_data Embedder data. This data will be passed to - /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from - /// this parent isolate. - /// \param error Returns NULL if creation is successful, an error message - /// otherwise. The caller is responsible for calling free() on the error - /// message. - /// - /// \return The new isolate on success, or NULL if isolate creation failed. - Dart_Isolate Dart_CreateIsolateGroup( - ffi.Pointer script_uri, - ffi.Pointer name, - ffi.Pointer isolate_snapshot_data, - ffi.Pointer isolate_snapshot_instructions, - ffi.Pointer flags, - ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data, - ffi.Pointer> error, + late final __objc_msgSend_468Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSExceptionName, ffi.Pointer, ffi.Pointer)>(); + + late final _sel_reason1 = _registerName1("reason"); + late final _sel_callStackReturnAddresses1 = + _registerName1("callStackReturnAddresses"); + late final _sel_callStackSymbols1 = _registerName1("callStackSymbols"); + late final _sel_raise1 = _registerName1("raise"); + late final _sel_raise_format_1 = _registerName1("raise:format:"); + late final _sel_raise_format_arguments_1 = + _registerName1("raise:format:arguments:"); + void _objc_msgSend_469( + ffi.Pointer obj, + ffi.Pointer sel, + NSExceptionName name, + ffi.Pointer format, + va_list argList, ) { - return _Dart_CreateIsolateGroup( - script_uri, + return __objc_msgSend_469( + obj, + sel, name, - isolate_snapshot_data, - isolate_snapshot_instructions, - flags, - isolate_group_data, - isolate_data, - error, + format, + argList, ); } - late final _Dart_CreateIsolateGroupPtr = _lookup< + late final __objc_msgSend_469Ptr = _lookup< ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('Dart_CreateIsolateGroup'); - late final _Dart_CreateIsolateGroup = _Dart_CreateIsolateGroupPtr.asFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSExceptionName, + ffi.Pointer, + va_list)>>('objc_msgSend'); + late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + NSExceptionName, ffi.Pointer, va_list)>(); - /// Creates a new isolate inside the isolate group of [group_member]. - /// - /// Requires there to be no current isolate. - /// - /// \param group_member An isolate from the same group into which the newly created - /// isolate should be born into. Other threads may not have entered / enter this - /// member isolate. - /// \param name A short name for the isolate for debugging purposes. - /// \param shutdown_callback A callback to be called when the isolate is being - /// shutdown (may be NULL). - /// \param cleanup_callback A callback to be called when the isolate is being - /// cleaned up (may be NULL). - /// \param isolate_data The embedder-specific data associated with this isolate. - /// \param error Set to NULL if creation is successful, set to an error - /// message otherwise. The caller is responsible for calling free() on the - /// error message. - /// - /// \return The newly created isolate on success, or NULL if isolate creation - /// failed. - /// - /// If successful, the newly created isolate will become the current isolate. - Dart_Isolate Dart_CreateIsolateInGroup( - Dart_Isolate group_member, - ffi.Pointer name, - Dart_IsolateShutdownCallback shutdown_callback, - Dart_IsolateCleanupCallback cleanup_callback, - ffi.Pointer child_isolate_data, - ffi.Pointer> error, - ) { - return _Dart_CreateIsolateInGroup( - group_member, - name, - shutdown_callback, - cleanup_callback, - child_isolate_data, - error, - ); + ffi.Pointer NSGetUncaughtExceptionHandler() { + return _NSGetUncaughtExceptionHandler(); } - late final _Dart_CreateIsolateInGroupPtr = _lookup< - ffi.NativeFunction< - Dart_Isolate Function( - Dart_Isolate, - ffi.Pointer, - Dart_IsolateShutdownCallback, - Dart_IsolateCleanupCallback, - ffi.Pointer, - ffi.Pointer>)>>( - 'Dart_CreateIsolateInGroup'); - late final _Dart_CreateIsolateInGroup = - _Dart_CreateIsolateInGroupPtr.asFunction< - Dart_Isolate Function( - Dart_Isolate, - ffi.Pointer, - Dart_IsolateShutdownCallback, - Dart_IsolateCleanupCallback, - ffi.Pointer, - ffi.Pointer>)>(); + late final _NSGetUncaughtExceptionHandlerPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer + Function()>>('NSGetUncaughtExceptionHandler'); + late final _NSGetUncaughtExceptionHandler = _NSGetUncaughtExceptionHandlerPtr + .asFunction Function()>(); - /// Creates a new isolate from a Dart Kernel file. The new isolate - /// becomes the current isolate. - /// - /// Requires there to be no current isolate. - /// - /// \param script_uri The main source file or snapshot this isolate will load. - /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child - /// isolate is created by Isolate.spawn. The embedder should use a URI that - /// allows it to load the same program into such a child isolate. - /// \param name A short name for the isolate to improve debugging messages. - /// Typically of the format 'foo.dart:main()'. - /// \param kernel_buffer - /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must - /// remain valid until isolate shutdown. - /// \param flags Pointer to VM specific flags or NULL for default flags. - /// \param isolate_group_data Embedder group data. This data can be obtained - /// by calling Dart_IsolateGroupData and will be passed to the - /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and - /// Dart_IsolateGroupCleanupCallback. - /// \param isolate_data Embedder data. This data will be passed to - /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from - /// this parent isolate. - /// \param error Returns NULL if creation is successful, an error message - /// otherwise. The caller is responsible for calling free() on the error - /// message. - /// - /// \return The new isolate on success, or NULL if isolate creation failed. - Dart_Isolate Dart_CreateIsolateGroupFromKernel( - ffi.Pointer script_uri, - ffi.Pointer name, - ffi.Pointer kernel_buffer, - int kernel_buffer_size, - ffi.Pointer flags, - ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data, - ffi.Pointer> error, + void NSSetUncaughtExceptionHandler( + ffi.Pointer arg0, ) { - return _Dart_CreateIsolateGroupFromKernel( - script_uri, - name, - kernel_buffer, - kernel_buffer_size, - flags, - isolate_group_data, - isolate_data, - error, + return _NSSetUncaughtExceptionHandler( + arg0, ); } - late final _Dart_CreateIsolateGroupFromKernelPtr = _lookup< + late final _NSSetUncaughtExceptionHandlerPtr = _lookup< ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'Dart_CreateIsolateGroupFromKernel'); - late final _Dart_CreateIsolateGroupFromKernel = - _Dart_CreateIsolateGroupFromKernelPtr.asFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - /// Shuts down the current isolate. After this call, the current isolate is NULL. - /// Any current scopes created by Dart_EnterScope will be exited. Invokes the - /// shutdown callback and any callbacks of remaining weak persistent handles. - /// - /// Requires there to be a current isolate. - void Dart_ShutdownIsolate() { - return _Dart_ShutdownIsolate(); - } + ffi.Void Function(ffi.Pointer)>>( + 'NSSetUncaughtExceptionHandler'); + late final _NSSetUncaughtExceptionHandler = _NSSetUncaughtExceptionHandlerPtr + .asFunction)>(); - late final _Dart_ShutdownIsolatePtr = - _lookup>('Dart_ShutdownIsolate'); - late final _Dart_ShutdownIsolate = - _Dart_ShutdownIsolatePtr.asFunction(); + late final ffi.Pointer> _NSAssertionHandlerKey = + _lookup>('NSAssertionHandlerKey'); - /// Returns the current isolate. Will return NULL if there is no - /// current isolate. - Dart_Isolate Dart_CurrentIsolate() { - return _Dart_CurrentIsolate(); - } + ffi.Pointer get NSAssertionHandlerKey => + _NSAssertionHandlerKey.value; - late final _Dart_CurrentIsolatePtr = - _lookup>( - 'Dart_CurrentIsolate'); - late final _Dart_CurrentIsolate = - _Dart_CurrentIsolatePtr.asFunction(); + set NSAssertionHandlerKey(ffi.Pointer value) => + _NSAssertionHandlerKey.value = value; - /// Returns the callback data associated with the current isolate. This - /// data was set when the isolate got created or initialized. - ffi.Pointer Dart_CurrentIsolateData() { - return _Dart_CurrentIsolateData(); + late final _class_NSAssertionHandler1 = _getClass1("NSAssertionHandler"); + late final _sel_currentHandler1 = _registerName1("currentHandler"); + ffi.Pointer _objc_msgSend_470( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_470( + obj, + sel, + ); } - late final _Dart_CurrentIsolateDataPtr = - _lookup Function()>>( - 'Dart_CurrentIsolateData'); - late final _Dart_CurrentIsolateData = _Dart_CurrentIsolateDataPtr.asFunction< - ffi.Pointer Function()>(); + late final __objc_msgSend_470Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - /// Returns the callback data associated with the given isolate. This - /// data was set when the isolate got created or initialized. - ffi.Pointer Dart_IsolateData( - Dart_Isolate isolate, + late final _sel_handleFailureInMethod_object_file_lineNumber_description_1 = + _registerName1( + "handleFailureInMethod:object:file:lineNumber:description:"); + void _objc_msgSend_471( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer selector, + ffi.Pointer object, + ffi.Pointer fileName, + int line, + ffi.Pointer format, ) { - return _Dart_IsolateData( - isolate, + return __objc_msgSend_471( + obj, + sel, + selector, + object, + fileName, + line, + format, ); } - late final _Dart_IsolateDataPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateData'); - late final _Dart_IsolateData = _Dart_IsolateDataPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); + late final __objc_msgSend_471Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - /// Returns the current isolate group. Will return NULL if there is no - /// current isolate group. - Dart_IsolateGroup Dart_CurrentIsolateGroup() { - return _Dart_CurrentIsolateGroup(); + late final _sel_handleFailureInFunction_file_lineNumber_description_1 = + _registerName1("handleFailureInFunction:file:lineNumber:description:"); + void _objc_msgSend_472( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer functionName, + ffi.Pointer fileName, + int line, + ffi.Pointer format, + ) { + return __objc_msgSend_472( + obj, + sel, + functionName, + fileName, + line, + format, + ); } - late final _Dart_CurrentIsolateGroupPtr = - _lookup>( - 'Dart_CurrentIsolateGroup'); - late final _Dart_CurrentIsolateGroup = - _Dart_CurrentIsolateGroupPtr.asFunction(); + late final __objc_msgSend_472Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - /// Returns the callback data associated with the current isolate group. This - /// data was passed to the isolate group when it was created. - ffi.Pointer Dart_CurrentIsolateGroupData() { - return _Dart_CurrentIsolateGroupData(); + late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); + late final _sel_blockOperationWithBlock_1 = + _registerName1("blockOperationWithBlock:"); + instancetype _objc_msgSend_473( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, + ) { + return __objc_msgSend_473( + obj, + sel, + block, + ); } - late final _Dart_CurrentIsolateGroupDataPtr = - _lookup Function()>>( - 'Dart_CurrentIsolateGroupData'); - late final _Dart_CurrentIsolateGroupData = _Dart_CurrentIsolateGroupDataPtr - .asFunction Function()>(); + late final __objc_msgSend_473Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - /// Returns the callback data associated with the specified isolate group. This - /// data was passed to the isolate when it was created. - /// The embedder is responsible for ensuring the consistency of this data - /// with respect to the lifecycle of an isolate group. - ffi.Pointer Dart_IsolateGroupData( - Dart_Isolate isolate, + late final _sel_addExecutionBlock_1 = _registerName1("addExecutionBlock:"); + late final _sel_executionBlocks1 = _registerName1("executionBlocks"); + late final _class_NSInvocationOperation1 = + _getClass1("NSInvocationOperation"); + late final _sel_initWithTarget_selector_object_1 = + _registerName1("initWithTarget:selector:object:"); + instancetype _objc_msgSend_474( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer target, + ffi.Pointer sel1, + ffi.Pointer arg, ) { - return _Dart_IsolateGroupData( - isolate, + return __objc_msgSend_474( + obj, + sel, + target, + sel1, + arg, ); } - late final _Dart_IsolateGroupDataPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateGroupData'); - late final _Dart_IsolateGroupData = _Dart_IsolateGroupDataPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); + late final __objc_msgSend_474Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - /// Returns the debugging name for the current isolate. - /// - /// This name is unique to each isolate and should only be used to make - /// debugging messages more comprehensible. - Object Dart_DebugName() { - return _Dart_DebugName(); + late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); + instancetype _objc_msgSend_475( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer inv, + ) { + return __objc_msgSend_475( + obj, + sel, + inv, + ); } - late final _Dart_DebugNamePtr = - _lookup>('Dart_DebugName'); - late final _Dart_DebugName = - _Dart_DebugNamePtr.asFunction(); + late final __objc_msgSend_475Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - /// Returns the ID for an isolate which is used to query the service protocol. - /// - /// It is the responsibility of the caller to free the returned ID. - ffi.Pointer Dart_IsolateServiceId( - Dart_Isolate isolate, + late final _sel_invocation1 = _registerName1("invocation"); + ffi.Pointer _objc_msgSend_476( + ffi.Pointer obj, + ffi.Pointer sel, ) { - return _Dart_IsolateServiceId( - isolate, + return __objc_msgSend_476( + obj, + sel, ); } - late final _Dart_IsolateServiceIdPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateServiceId'); - late final _Dart_IsolateServiceId = _Dart_IsolateServiceIdPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); - - /// Enters an isolate. After calling this function, - /// the current isolate will be set to the provided isolate. - /// - /// Requires there to be no current isolate. Multiple threads may not be in - /// the same isolate at once. - void Dart_EnterIsolate( - Dart_Isolate isolate, + late final __objc_msgSend_476Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_result1 = _registerName1("result"); + late final ffi.Pointer + _NSInvocationOperationVoidResultException = + _lookup('NSInvocationOperationVoidResultException'); + + NSExceptionName get NSInvocationOperationVoidResultException => + _NSInvocationOperationVoidResultException.value; + + set NSInvocationOperationVoidResultException(NSExceptionName value) => + _NSInvocationOperationVoidResultException.value = value; + + late final ffi.Pointer + _NSInvocationOperationCancelledException = + _lookup('NSInvocationOperationCancelledException'); + + NSExceptionName get NSInvocationOperationCancelledException => + _NSInvocationOperationCancelledException.value; + + set NSInvocationOperationCancelledException(NSExceptionName value) => + _NSInvocationOperationCancelledException.value = value; + + late final ffi.Pointer + _NSOperationQueueDefaultMaxConcurrentOperationCount = + _lookup('NSOperationQueueDefaultMaxConcurrentOperationCount'); + + int get NSOperationQueueDefaultMaxConcurrentOperationCount => + _NSOperationQueueDefaultMaxConcurrentOperationCount.value; + + set NSOperationQueueDefaultMaxConcurrentOperationCount(int value) => + _NSOperationQueueDefaultMaxConcurrentOperationCount.value = value; + + /// Predefined domain for errors from most AppKit and Foundation APIs. + late final ffi.Pointer _NSCocoaErrorDomain = + _lookup('NSCocoaErrorDomain'); + + NSErrorDomain get NSCocoaErrorDomain => _NSCocoaErrorDomain.value; + + set NSCocoaErrorDomain(NSErrorDomain value) => + _NSCocoaErrorDomain.value = value; + + /// Other predefined domains; value of "code" will correspond to preexisting values in these domains. + late final ffi.Pointer _NSPOSIXErrorDomain = + _lookup('NSPOSIXErrorDomain'); + + NSErrorDomain get NSPOSIXErrorDomain => _NSPOSIXErrorDomain.value; + + set NSPOSIXErrorDomain(NSErrorDomain value) => + _NSPOSIXErrorDomain.value = value; + + late final ffi.Pointer _NSOSStatusErrorDomain = + _lookup('NSOSStatusErrorDomain'); + + NSErrorDomain get NSOSStatusErrorDomain => _NSOSStatusErrorDomain.value; + + set NSOSStatusErrorDomain(NSErrorDomain value) => + _NSOSStatusErrorDomain.value = value; + + late final ffi.Pointer _NSMachErrorDomain = + _lookup('NSMachErrorDomain'); + + NSErrorDomain get NSMachErrorDomain => _NSMachErrorDomain.value; + + set NSMachErrorDomain(NSErrorDomain value) => + _NSMachErrorDomain.value = value; + + /// Key in userInfo. A recommended standard way to embed NSErrors from underlying calls. The value of this key should be an NSError. + late final ffi.Pointer _NSUnderlyingErrorKey = + _lookup('NSUnderlyingErrorKey'); + + NSErrorUserInfoKey get NSUnderlyingErrorKey => _NSUnderlyingErrorKey.value; + + set NSUnderlyingErrorKey(NSErrorUserInfoKey value) => + _NSUnderlyingErrorKey.value = value; + + /// Key in userInfo. A recommended standard way to embed a list of several NSErrors from underlying calls. The value of this key should be an NSArray of NSError. This value is independent from the value of `NSUnderlyingErrorKey` - neither, one, or both may be set. + late final ffi.Pointer _NSMultipleUnderlyingErrorsKey = + _lookup('NSMultipleUnderlyingErrorsKey'); + + NSErrorUserInfoKey get NSMultipleUnderlyingErrorsKey => + _NSMultipleUnderlyingErrorsKey.value; + + set NSMultipleUnderlyingErrorsKey(NSErrorUserInfoKey value) => + _NSMultipleUnderlyingErrorsKey.value = value; + + /// NSString, a complete sentence (or more) describing ideally both what failed and why it failed. + late final ffi.Pointer _NSLocalizedDescriptionKey = + _lookup('NSLocalizedDescriptionKey'); + + NSErrorUserInfoKey get NSLocalizedDescriptionKey => + _NSLocalizedDescriptionKey.value; + + set NSLocalizedDescriptionKey(NSErrorUserInfoKey value) => + _NSLocalizedDescriptionKey.value = value; + + /// NSString, a complete sentence (or more) describing why the operation failed. + late final ffi.Pointer _NSLocalizedFailureReasonErrorKey = + _lookup('NSLocalizedFailureReasonErrorKey'); + + NSErrorUserInfoKey get NSLocalizedFailureReasonErrorKey => + _NSLocalizedFailureReasonErrorKey.value; + + set NSLocalizedFailureReasonErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedFailureReasonErrorKey.value = value; + + /// NSString, a complete sentence (or more) describing what the user can do to fix the problem. + late final ffi.Pointer + _NSLocalizedRecoverySuggestionErrorKey = + _lookup('NSLocalizedRecoverySuggestionErrorKey'); + + NSErrorUserInfoKey get NSLocalizedRecoverySuggestionErrorKey => + _NSLocalizedRecoverySuggestionErrorKey.value; + + set NSLocalizedRecoverySuggestionErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedRecoverySuggestionErrorKey.value = value; + + /// NSArray of NSStrings corresponding to button titles. + late final ffi.Pointer + _NSLocalizedRecoveryOptionsErrorKey = + _lookup('NSLocalizedRecoveryOptionsErrorKey'); + + NSErrorUserInfoKey get NSLocalizedRecoveryOptionsErrorKey => + _NSLocalizedRecoveryOptionsErrorKey.value; + + set NSLocalizedRecoveryOptionsErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedRecoveryOptionsErrorKey.value = value; + + /// Instance of a subclass of NSObject that conforms to the NSErrorRecoveryAttempting informal protocol + late final ffi.Pointer _NSRecoveryAttempterErrorKey = + _lookup('NSRecoveryAttempterErrorKey'); + + NSErrorUserInfoKey get NSRecoveryAttempterErrorKey => + _NSRecoveryAttempterErrorKey.value; + + set NSRecoveryAttempterErrorKey(NSErrorUserInfoKey value) => + _NSRecoveryAttempterErrorKey.value = value; + + /// NSString containing a help anchor + late final ffi.Pointer _NSHelpAnchorErrorKey = + _lookup('NSHelpAnchorErrorKey'); + + NSErrorUserInfoKey get NSHelpAnchorErrorKey => _NSHelpAnchorErrorKey.value; + + set NSHelpAnchorErrorKey(NSErrorUserInfoKey value) => + _NSHelpAnchorErrorKey.value = value; + + /// NSString. This provides a string which will be shown when constructing the debugDescription of the NSError, to be used when debugging or when formatting the error with %@. This string will never be used in localizedDescription, so will not be shown to the user. + late final ffi.Pointer _NSDebugDescriptionErrorKey = + _lookup('NSDebugDescriptionErrorKey'); + + NSErrorUserInfoKey get NSDebugDescriptionErrorKey => + _NSDebugDescriptionErrorKey.value; + + set NSDebugDescriptionErrorKey(NSErrorUserInfoKey value) => + _NSDebugDescriptionErrorKey.value = value; + + /// NSString, a complete sentence (or more) describing what failed. Setting a value for this key in userInfo dictionary of errors received from framework APIs is a good way to customize and fine tune the localizedDescription of an NSError. As an example, for Foundation error code NSFileWriteOutOfSpaceError, setting the value of this key to "The image library could not be saved." will allow the localizedDescription of the error to come out as "The image library could not be saved. The volume Macintosh HD is out of space." rather than the default (say) “You can't save the file ImgDatabaseV2 because the volume Macintosh HD is out of space." + late final ffi.Pointer _NSLocalizedFailureErrorKey = + _lookup('NSLocalizedFailureErrorKey'); + + NSErrorUserInfoKey get NSLocalizedFailureErrorKey => + _NSLocalizedFailureErrorKey.value; + + set NSLocalizedFailureErrorKey(NSErrorUserInfoKey value) => + _NSLocalizedFailureErrorKey.value = value; + + /// NSNumber containing NSStringEncoding + late final ffi.Pointer _NSStringEncodingErrorKey = + _lookup('NSStringEncodingErrorKey'); + + NSErrorUserInfoKey get NSStringEncodingErrorKey => + _NSStringEncodingErrorKey.value; + + set NSStringEncodingErrorKey(NSErrorUserInfoKey value) => + _NSStringEncodingErrorKey.value = value; + + /// NSURL + late final ffi.Pointer _NSURLErrorKey = + _lookup('NSURLErrorKey'); + + NSErrorUserInfoKey get NSURLErrorKey => _NSURLErrorKey.value; + + set NSURLErrorKey(NSErrorUserInfoKey value) => _NSURLErrorKey.value = value; + + /// NSString + late final ffi.Pointer _NSFilePathErrorKey = + _lookup('NSFilePathErrorKey'); + + NSErrorUserInfoKey get NSFilePathErrorKey => _NSFilePathErrorKey.value; + + set NSFilePathErrorKey(NSErrorUserInfoKey value) => + _NSFilePathErrorKey.value = value; + + /// Is this an error handle? + /// + /// Requires there to be a current isolate. + bool Dart_IsError( + Object handle, ) { - return _Dart_EnterIsolate( - isolate, + return _Dart_IsError( + handle, ); } - late final _Dart_EnterIsolatePtr = - _lookup>( - 'Dart_EnterIsolate'); - late final _Dart_EnterIsolate = - _Dart_EnterIsolatePtr.asFunction(); + late final _Dart_IsErrorPtr = + _lookup>( + 'Dart_IsError'); + late final _Dart_IsError = + _Dart_IsErrorPtr.asFunction(); - /// Kills the given isolate. + /// Is this an api error handle? /// - /// This function has the same effect as dart:isolate's - /// Isolate.kill(priority:immediate). - /// It can interrupt ordinary Dart code but not native code. If the isolate is - /// in the middle of a long running native function, the isolate will not be - /// killed until control returns to Dart. + /// Api error handles are produced when an api function is misused. + /// This happens when a Dart embedding api function is called with + /// invalid arguments or in an invalid context. /// - /// Does not require a current isolate. It is safe to kill the current isolate if - /// there is one. - void Dart_KillIsolate( - Dart_Isolate isolate, + /// Requires there to be a current isolate. + bool Dart_IsApiError( + Object handle, ) { - return _Dart_KillIsolate( - isolate, + return _Dart_IsApiError( + handle, ); } - late final _Dart_KillIsolatePtr = - _lookup>( - 'Dart_KillIsolate'); - late final _Dart_KillIsolate = - _Dart_KillIsolatePtr.asFunction(); + late final _Dart_IsApiErrorPtr = + _lookup>( + 'Dart_IsApiError'); + late final _Dart_IsApiError = + _Dart_IsApiErrorPtr.asFunction(); - /// Notifies the VM that the embedder expects |size| bytes of memory have become - /// unreachable. The VM may use this hint to adjust the garbage collector's - /// growth policy. + /// Is this an unhandled exception error handle? /// - /// Multiple calls are interpreted as increasing, not replacing, the estimate of - /// unreachable memory. + /// Unhandled exception error handles are produced when, during the + /// execution of Dart code, an exception is thrown but not caught. + /// This can occur in any function which triggers the execution of Dart + /// code. + /// + /// See Dart_ErrorGetException and Dart_ErrorGetStackTrace. /// /// Requires there to be a current isolate. - void Dart_HintFreed( - int size, + bool Dart_IsUnhandledExceptionError( + Object handle, ) { - return _Dart_HintFreed( - size, + return _Dart_IsUnhandledExceptionError( + handle, ); } - late final _Dart_HintFreedPtr = - _lookup>( - 'Dart_HintFreed'); - late final _Dart_HintFreed = - _Dart_HintFreedPtr.asFunction(); + late final _Dart_IsUnhandledExceptionErrorPtr = + _lookup>( + 'Dart_IsUnhandledExceptionError'); + late final _Dart_IsUnhandledExceptionError = + _Dart_IsUnhandledExceptionErrorPtr.asFunction(); - /// Notifies the VM that the embedder expects to be idle until |deadline|. The VM - /// may use this time to perform garbage collection or other tasks to avoid - /// delays during execution of Dart code in the future. + /// Is this a compilation error handle? /// - /// |deadline| is measured in microseconds against the system's monotonic time. - /// This clock can be accessed via Dart_TimelineGetMicros(). + /// Compilation error handles are produced when, during the execution + /// of Dart code, a compile-time error occurs. This can occur in any + /// function which triggers the execution of Dart code. /// /// Requires there to be a current isolate. - void Dart_NotifyIdle( - int deadline, + bool Dart_IsCompilationError( + Object handle, ) { - return _Dart_NotifyIdle( - deadline, + return _Dart_IsCompilationError( + handle, ); } - late final _Dart_NotifyIdlePtr = - _lookup>( - 'Dart_NotifyIdle'); - late final _Dart_NotifyIdle = - _Dart_NotifyIdlePtr.asFunction(); + late final _Dart_IsCompilationErrorPtr = + _lookup>( + 'Dart_IsCompilationError'); + late final _Dart_IsCompilationError = + _Dart_IsCompilationErrorPtr.asFunction(); - /// Notifies the VM that the system is running low on memory. + /// Is this a fatal error handle? /// - /// Does not require a current isolate. Only valid after calling Dart_Initialize. - void Dart_NotifyLowMemory() { - return _Dart_NotifyLowMemory(); + /// Fatal error handles are produced when the system wants to shut down + /// the current isolate. + /// + /// Requires there to be a current isolate. + bool Dart_IsFatalError( + Object handle, + ) { + return _Dart_IsFatalError( + handle, + ); } - late final _Dart_NotifyLowMemoryPtr = - _lookup>('Dart_NotifyLowMemory'); - late final _Dart_NotifyLowMemory = - _Dart_NotifyLowMemoryPtr.asFunction(); + late final _Dart_IsFatalErrorPtr = + _lookup>( + 'Dart_IsFatalError'); + late final _Dart_IsFatalError = + _Dart_IsFatalErrorPtr.asFunction(); - /// Starts the CPU sampling profiler. - void Dart_StartProfiling() { - return _Dart_StartProfiling(); + /// Gets the error message from an error handle. + /// + /// Requires there to be a current isolate. + /// + /// \return A C string containing an error message if the handle is + /// error. An empty C string ("") if the handle is valid. This C + /// String is scope allocated and is only valid until the next call + /// to Dart_ExitScope. + ffi.Pointer Dart_GetError( + Object handle, + ) { + return _Dart_GetError( + handle, + ); } - late final _Dart_StartProfilingPtr = - _lookup>('Dart_StartProfiling'); - late final _Dart_StartProfiling = - _Dart_StartProfilingPtr.asFunction(); + late final _Dart_GetErrorPtr = + _lookup Function(ffi.Handle)>>( + 'Dart_GetError'); + late final _Dart_GetError = + _Dart_GetErrorPtr.asFunction Function(Object)>(); - /// Stops the CPU sampling profiler. - /// - /// Note that some profile samples might still be taken after this fucntion - /// returns due to the asynchronous nature of the implementation on some - /// platforms. - void Dart_StopProfiling() { - return _Dart_StopProfiling(); + /// Is this an error handle for an unhandled exception? + bool Dart_ErrorHasException( + Object handle, + ) { + return _Dart_ErrorHasException( + handle, + ); } - late final _Dart_StopProfilingPtr = - _lookup>('Dart_StopProfiling'); - late final _Dart_StopProfiling = - _Dart_StopProfilingPtr.asFunction(); + late final _Dart_ErrorHasExceptionPtr = + _lookup>( + 'Dart_ErrorHasException'); + late final _Dart_ErrorHasException = + _Dart_ErrorHasExceptionPtr.asFunction(); - /// Notifies the VM that the current thread should not be profiled until a - /// matching call to Dart_ThreadEnableProfiling is made. - /// - /// NOTE: By default, if a thread has entered an isolate it will be profiled. - /// This function should be used when an embedder knows a thread is about - /// to make a blocking call and wants to avoid unnecessary interrupts by - /// the profiler. - void Dart_ThreadDisableProfiling() { - return _Dart_ThreadDisableProfiling(); + /// Gets the exception Object from an unhandled exception error handle. + Object Dart_ErrorGetException( + Object handle, + ) { + return _Dart_ErrorGetException( + handle, + ); } - late final _Dart_ThreadDisableProfilingPtr = - _lookup>( - 'Dart_ThreadDisableProfiling'); - late final _Dart_ThreadDisableProfiling = - _Dart_ThreadDisableProfilingPtr.asFunction(); + late final _Dart_ErrorGetExceptionPtr = + _lookup>( + 'Dart_ErrorGetException'); + late final _Dart_ErrorGetException = + _Dart_ErrorGetExceptionPtr.asFunction(); - /// Notifies the VM that the current thread should be profiled. + /// Gets the stack trace Object from an unhandled exception error handle. + Object Dart_ErrorGetStackTrace( + Object handle, + ) { + return _Dart_ErrorGetStackTrace( + handle, + ); + } + + late final _Dart_ErrorGetStackTracePtr = + _lookup>( + 'Dart_ErrorGetStackTrace'); + late final _Dart_ErrorGetStackTrace = + _Dart_ErrorGetStackTracePtr.asFunction(); + + /// Produces an api error handle with the provided error message. /// - /// NOTE: It is only legal to call this function *after* calling - /// Dart_ThreadDisableProfiling. + /// Requires there to be a current isolate. /// - /// NOTE: By default, if a thread has entered an isolate it will be profiled. - void Dart_ThreadEnableProfiling() { - return _Dart_ThreadEnableProfiling(); + /// \param error the error message. + Object Dart_NewApiError( + ffi.Pointer error, + ) { + return _Dart_NewApiError( + error, + ); } - late final _Dart_ThreadEnableProfilingPtr = - _lookup>( - 'Dart_ThreadEnableProfiling'); - late final _Dart_ThreadEnableProfiling = - _Dart_ThreadEnableProfilingPtr.asFunction(); + late final _Dart_NewApiErrorPtr = + _lookup)>>( + 'Dart_NewApiError'); + late final _Dart_NewApiError = + _Dart_NewApiErrorPtr.asFunction)>(); - /// Register symbol information for the Dart VM's profiler and crash dumps. - /// - /// This consumes the output of //topaz/runtime/dart/profiler_symbols, which - /// should be treated as opaque. - void Dart_AddSymbols( - ffi.Pointer dso_name, - ffi.Pointer buffer, - int buffer_size, + Object Dart_NewCompilationError( + ffi.Pointer error, ) { - return _Dart_AddSymbols( - dso_name, - buffer, - buffer_size, + return _Dart_NewCompilationError( + error, ); } - late final _Dart_AddSymbolsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.IntPtr)>>('Dart_AddSymbols'); - late final _Dart_AddSymbols = _Dart_AddSymbolsPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _Dart_NewCompilationErrorPtr = + _lookup)>>( + 'Dart_NewCompilationError'); + late final _Dart_NewCompilationError = _Dart_NewCompilationErrorPtr + .asFunction)>(); - /// Exits an isolate. After this call, Dart_CurrentIsolate will - /// return NULL. + /// Produces a new unhandled exception error handle. /// /// Requires there to be a current isolate. - void Dart_ExitIsolate() { - return _Dart_ExitIsolate(); + /// + /// \param exception An instance of a Dart object to be thrown or + /// an ApiError or CompilationError handle. + /// When an ApiError or CompilationError handle is passed in + /// a string object of the error message is created and it becomes + /// the Dart object to be thrown. + Object Dart_NewUnhandledExceptionError( + Object exception, + ) { + return _Dart_NewUnhandledExceptionError( + exception, + ); } - late final _Dart_ExitIsolatePtr = - _lookup>('Dart_ExitIsolate'); - late final _Dart_ExitIsolate = - _Dart_ExitIsolatePtr.asFunction(); + late final _Dart_NewUnhandledExceptionErrorPtr = + _lookup>( + 'Dart_NewUnhandledExceptionError'); + late final _Dart_NewUnhandledExceptionError = + _Dart_NewUnhandledExceptionErrorPtr.asFunction(); - /// Creates a full snapshot of the current isolate heap. + /// Propagates an error. /// - /// A full snapshot is a compact representation of the dart vm isolate heap - /// and dart isolate heap states. These snapshots are used to initialize - /// the vm isolate on startup and fast initialization of an isolate. - /// A Snapshot of the heap is created before any dart code has executed. + /// If the provided handle is an unhandled exception error, this + /// function will cause the unhandled exception to be rethrown. This + /// will proceed in the standard way, walking up Dart frames until an + /// appropriate 'catch' block is found, executing 'finally' blocks, + /// etc. /// - /// Requires there to be a current isolate. Not available in the precompiled - /// runtime (check Dart_IsPrecompiledRuntime). + /// If the error is not an unhandled exception error, we will unwind + /// the stack to the next C frame. Intervening Dart frames will be + /// discarded; specifically, 'finally' blocks will not execute. This + /// is the standard way that compilation errors (and the like) are + /// handled by the Dart runtime. /// - /// \param buffer Returns a pointer to a buffer containing the - /// snapshot. This buffer is scope allocated and is only valid - /// until the next call to Dart_ExitScope. - /// \param size Returns the size of the buffer. - /// \param is_core Create a snapshot containing core libraries. - /// Such snapshot should be agnostic to null safety mode. + /// In either case, when an error is propagated any current scopes + /// created by Dart_EnterScope will be exited. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateSnapshot( - ffi.Pointer> vm_snapshot_data_buffer, - ffi.Pointer vm_snapshot_data_size, - ffi.Pointer> isolate_snapshot_data_buffer, - ffi.Pointer isolate_snapshot_data_size, - bool is_core, + /// See the additional discussion under "Propagating Errors" at the + /// beginning of this file. + /// + /// \param An error handle (See Dart_IsError) + /// + /// \return On success, this function does not return. On failure, the + /// process is terminated. + void Dart_PropagateError( + Object handle, ) { - return _Dart_CreateSnapshot( - vm_snapshot_data_buffer, - vm_snapshot_data_size, - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - is_core, + return _Dart_PropagateError( + handle, ); } - late final _Dart_CreateSnapshotPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Bool)>>('Dart_CreateSnapshot'); - late final _Dart_CreateSnapshot = _Dart_CreateSnapshotPtr.asFunction< - Object Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - bool)>(); + late final _Dart_PropagateErrorPtr = + _lookup>( + 'Dart_PropagateError'); + late final _Dart_PropagateError = + _Dart_PropagateErrorPtr.asFunction(); - /// Returns whether the buffer contains a kernel file. + /// Converts an object to a string. /// - /// \param buffer Pointer to a buffer that might contain a kernel binary. - /// \param buffer_size Size of the buffer. + /// May generate an unhandled exception error. /// - /// \return Whether the buffer contains a kernel binary (full or partial). - bool Dart_IsKernel( - ffi.Pointer buffer, - int buffer_size, + /// \return The converted string if no error occurs during + /// the conversion. If an error does occur, an error handle is + /// returned. + Object Dart_ToString( + Object object, ) { - return _Dart_IsKernel( - buffer, - buffer_size, + return _Dart_ToString( + object, ); } - late final _Dart_IsKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_IsKernel'); - late final _Dart_IsKernel = _Dart_IsKernelPtr.asFunction< - bool Function(ffi.Pointer, int)>(); + late final _Dart_ToStringPtr = + _lookup>( + 'Dart_ToString'); + late final _Dart_ToString = + _Dart_ToStringPtr.asFunction(); - /// Make isolate runnable. + /// Checks to see if two handles refer to identically equal objects. /// - /// When isolates are spawned, this function is used to indicate that - /// the creation and initialization (including script loading) of the - /// isolate is complete and the isolate can start. - /// This function expects there to be no current isolate. + /// If both handles refer to instances, this is equivalent to using the top-level + /// function identical() from dart:core. Otherwise, returns whether the two + /// argument handles refer to the same object. /// - /// \param isolate The isolate to be made runnable. + /// \param obj1 An object to be compared. + /// \param obj2 An object to be compared. /// - /// \return NULL if successful. Returns an error message otherwise. The caller - /// is responsible for freeing the error message. - ffi.Pointer Dart_IsolateMakeRunnable( - Dart_Isolate isolate, + /// \return True if the objects are identically equal. False otherwise. + bool Dart_IdentityEquals( + Object obj1, + Object obj2, ) { - return _Dart_IsolateMakeRunnable( - isolate, + return _Dart_IdentityEquals( + obj1, + obj2, ); } - late final _Dart_IsolateMakeRunnablePtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateMakeRunnable'); - late final _Dart_IsolateMakeRunnable = _Dart_IsolateMakeRunnablePtr - .asFunction Function(Dart_Isolate)>(); + late final _Dart_IdentityEqualsPtr = + _lookup>( + 'Dart_IdentityEquals'); + late final _Dart_IdentityEquals = + _Dart_IdentityEqualsPtr.asFunction(); - /// Allows embedders to provide an alternative wakeup mechanism for the - /// delivery of inter-isolate messages. This setting only applies to - /// the current isolate. - /// - /// Most embedders will only call this function once, before isolate - /// execution begins. If this function is called after isolate - /// execution begins, the embedder is responsible for threading issues. - void Dart_SetMessageNotifyCallback( - Dart_MessageNotifyCallback message_notify_callback, + /// Allocates a handle in the current scope from a persistent handle. + Object Dart_HandleFromPersistent( + Object object, ) { - return _Dart_SetMessageNotifyCallback( - message_notify_callback, + return _Dart_HandleFromPersistent( + object, ); } - late final _Dart_SetMessageNotifyCallbackPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetMessageNotifyCallback'); - late final _Dart_SetMessageNotifyCallback = _Dart_SetMessageNotifyCallbackPtr - .asFunction(); + late final _Dart_HandleFromPersistentPtr = + _lookup>( + 'Dart_HandleFromPersistent'); + late final _Dart_HandleFromPersistent = + _Dart_HandleFromPersistentPtr.asFunction(); - /// Query the current message notify callback for the isolate. + /// Allocates a handle in the current scope from a weak persistent handle. /// - /// \return The current message notify callback for the isolate. - Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback() { - return _Dart_GetMessageNotifyCallback(); + /// This will be a handle to Dart_Null if the object has been garbage collected. + Object Dart_HandleFromWeakPersistent( + Dart_WeakPersistentHandle object, + ) { + return _Dart_HandleFromWeakPersistent( + object, + ); } - late final _Dart_GetMessageNotifyCallbackPtr = - _lookup>( - 'Dart_GetMessageNotifyCallback'); - late final _Dart_GetMessageNotifyCallback = _Dart_GetMessageNotifyCallbackPtr - .asFunction(); + late final _Dart_HandleFromWeakPersistentPtr = _lookup< + ffi.NativeFunction>( + 'Dart_HandleFromWeakPersistent'); + late final _Dart_HandleFromWeakPersistent = _Dart_HandleFromWeakPersistentPtr + .asFunction(); - /// If the VM flag `--pause-isolates-on-start` was passed this will be true. + /// Allocates a persistent handle for an object. /// - /// \return A boolean value indicating if pause on start was requested. - bool Dart_ShouldPauseOnStart() { - return _Dart_ShouldPauseOnStart(); + /// This handle has the lifetime of the current isolate unless it is + /// explicitly deallocated by calling Dart_DeletePersistentHandle. + /// + /// Requires there to be a current isolate. + Object Dart_NewPersistentHandle( + Object object, + ) { + return _Dart_NewPersistentHandle( + object, + ); } - late final _Dart_ShouldPauseOnStartPtr = - _lookup>( - 'Dart_ShouldPauseOnStart'); - late final _Dart_ShouldPauseOnStart = - _Dart_ShouldPauseOnStartPtr.asFunction(); + late final _Dart_NewPersistentHandlePtr = + _lookup>( + 'Dart_NewPersistentHandle'); + late final _Dart_NewPersistentHandle = + _Dart_NewPersistentHandlePtr.asFunction(); - /// Override the VM flag `--pause-isolates-on-start` for the current isolate. + /// Assign value of local handle to a persistent handle. /// - /// \param should_pause Should the isolate be paused on start? + /// Requires there to be a current isolate. /// - /// NOTE: This must be called before Dart_IsolateMakeRunnable. - void Dart_SetShouldPauseOnStart( - bool should_pause, + /// \param obj1 A persistent handle whose value needs to be set. + /// \param obj2 An object whose value needs to be set to the persistent handle. + /// + /// \return Success if the persistent handle was set + /// Otherwise, returns an error. + void Dart_SetPersistentHandle( + Object obj1, + Object obj2, ) { - return _Dart_SetShouldPauseOnStart( - should_pause, + return _Dart_SetPersistentHandle( + obj1, + obj2, ); } - late final _Dart_SetShouldPauseOnStartPtr = - _lookup>( - 'Dart_SetShouldPauseOnStart'); - late final _Dart_SetShouldPauseOnStart = - _Dart_SetShouldPauseOnStartPtr.asFunction(); + late final _Dart_SetPersistentHandlePtr = + _lookup>( + 'Dart_SetPersistentHandle'); + late final _Dart_SetPersistentHandle = + _Dart_SetPersistentHandlePtr.asFunction(); - /// Is the current isolate paused on start? + /// Deallocates a persistent handle. /// - /// \return A boolean value indicating if the isolate is paused on start. - bool Dart_IsPausedOnStart() { - return _Dart_IsPausedOnStart(); + /// Requires there to be a current isolate group. + void Dart_DeletePersistentHandle( + Object object, + ) { + return _Dart_DeletePersistentHandle( + object, + ); } - late final _Dart_IsPausedOnStartPtr = - _lookup>('Dart_IsPausedOnStart'); - late final _Dart_IsPausedOnStart = - _Dart_IsPausedOnStartPtr.asFunction(); + late final _Dart_DeletePersistentHandlePtr = + _lookup>( + 'Dart_DeletePersistentHandle'); + late final _Dart_DeletePersistentHandle = + _Dart_DeletePersistentHandlePtr.asFunction(); - /// Called when the embedder has paused the current isolate on start and when - /// the embedder has resumed the isolate. + /// Allocates a weak persistent handle for an object. /// - /// \param paused Is the isolate paused on start? - void Dart_SetPausedOnStart( - bool paused, + /// This handle has the lifetime of the current isolate. The handle can also be + /// explicitly deallocated by calling Dart_DeleteWeakPersistentHandle. + /// + /// If the object becomes unreachable the callback is invoked with the peer as + /// argument. The callback can be executed on any thread, will have a current + /// isolate group, but will not have a current isolate. The callback can only + /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. This + /// gives the embedder the ability to cleanup data associated with the object. + /// The handle will point to the Dart_Null object after the finalizer has been + /// run. It is illegal to call into the VM with any other Dart_* functions from + /// the callback. If the handle is deleted before the object becomes + /// unreachable, the callback is never invoked. + /// + /// Requires there to be a current isolate. + /// + /// \param object An object with identity. + /// \param peer A pointer to a native object or NULL. This value is + /// provided to callback when it is invoked. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A function pointer that will be invoked sometime + /// after the object is garbage collected, unless the handle has been deleted. + /// A valid callback needs to be specified it cannot be NULL. + /// + /// \return The weak persistent handle or NULL. NULL is returned in case of bad + /// parameters. + Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle( + Object object, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, ) { - return _Dart_SetPausedOnStart( - paused, + return _Dart_NewWeakPersistentHandle( + object, + peer, + external_allocation_size, + callback, ); } - late final _Dart_SetPausedOnStartPtr = - _lookup>( - 'Dart_SetPausedOnStart'); - late final _Dart_SetPausedOnStart = - _Dart_SetPausedOnStartPtr.asFunction(); + late final _Dart_NewWeakPersistentHandlePtr = _lookup< + ffi.NativeFunction< + Dart_WeakPersistentHandle Function( + ffi.Handle, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewWeakPersistentHandle'); + late final _Dart_NewWeakPersistentHandle = + _Dart_NewWeakPersistentHandlePtr.asFunction< + Dart_WeakPersistentHandle Function( + Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); - /// If the VM flag `--pause-isolates-on-exit` was passed this will be true. + /// Deletes the given weak persistent [object] handle. /// - /// \return A boolean value indicating if pause on exit was requested. - bool Dart_ShouldPauseOnExit() { - return _Dart_ShouldPauseOnExit(); + /// Requires there to be a current isolate group. + void Dart_DeleteWeakPersistentHandle( + Dart_WeakPersistentHandle object, + ) { + return _Dart_DeleteWeakPersistentHandle( + object, + ); } - late final _Dart_ShouldPauseOnExitPtr = - _lookup>( - 'Dart_ShouldPauseOnExit'); - late final _Dart_ShouldPauseOnExit = - _Dart_ShouldPauseOnExitPtr.asFunction(); + late final _Dart_DeleteWeakPersistentHandlePtr = + _lookup>( + 'Dart_DeleteWeakPersistentHandle'); + late final _Dart_DeleteWeakPersistentHandle = + _Dart_DeleteWeakPersistentHandlePtr.asFunction< + void Function(Dart_WeakPersistentHandle)>(); - /// Override the VM flag `--pause-isolates-on-exit` for the current isolate. + /// Updates the external memory size for the given weak persistent handle. /// - /// \param should_pause Should the isolate be paused on exit? - void Dart_SetShouldPauseOnExit( - bool should_pause, + /// May trigger garbage collection. + void Dart_UpdateExternalSize( + Dart_WeakPersistentHandle object, + int external_allocation_size, ) { - return _Dart_SetShouldPauseOnExit( - should_pause, + return _Dart_UpdateExternalSize( + object, + external_allocation_size, ); } - late final _Dart_SetShouldPauseOnExitPtr = - _lookup>( - 'Dart_SetShouldPauseOnExit'); - late final _Dart_SetShouldPauseOnExit = - _Dart_SetShouldPauseOnExitPtr.asFunction(); + late final _Dart_UpdateExternalSizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(Dart_WeakPersistentHandle, + ffi.IntPtr)>>('Dart_UpdateExternalSize'); + late final _Dart_UpdateExternalSize = _Dart_UpdateExternalSizePtr.asFunction< + void Function(Dart_WeakPersistentHandle, int)>(); - /// Is the current isolate paused on exit? + /// Allocates a finalizable handle for an object. /// - /// \return A boolean value indicating if the isolate is paused on exit. - bool Dart_IsPausedOnExit() { - return _Dart_IsPausedOnExit(); - } - - late final _Dart_IsPausedOnExitPtr = - _lookup>('Dart_IsPausedOnExit'); - late final _Dart_IsPausedOnExit = - _Dart_IsPausedOnExitPtr.asFunction(); - - /// Called when the embedder has paused the current isolate on exit and when - /// the embedder has resumed the isolate. + /// This handle has the lifetime of the current isolate group unless the object + /// pointed to by the handle is garbage collected, in this case the VM + /// automatically deletes the handle after invoking the callback associated + /// with the handle. The handle can also be explicitly deallocated by + /// calling Dart_DeleteFinalizableHandle. /// - /// \param paused Is the isolate paused on exit? - void Dart_SetPausedOnExit( - bool paused, + /// If the object becomes unreachable the callback is invoked with the + /// the peer as argument. The callback can be executed on any thread, will have + /// an isolate group, but will not have a current isolate. The callback can only + /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. + /// This gives the embedder the ability to cleanup data associated with the + /// object and clear out any cached references to the handle. All references to + /// this handle after the callback will be invalid. It is illegal to call into + /// the VM with any other Dart_* functions from the callback. If the handle is + /// deleted before the object becomes unreachable, the callback is never + /// invoked. + /// + /// Requires there to be a current isolate. + /// + /// \param object An object with identity. + /// \param peer A pointer to a native object or NULL. This value is + /// provided to callback when it is invoked. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A function pointer that will be invoked sometime + /// after the object is garbage collected, unless the handle has been deleted. + /// A valid callback needs to be specified it cannot be NULL. + /// + /// \return The finalizable handle or NULL. NULL is returned in case of bad + /// parameters. + Dart_FinalizableHandle Dart_NewFinalizableHandle( + Object object, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, ) { - return _Dart_SetPausedOnExit( - paused, + return _Dart_NewFinalizableHandle( + object, + peer, + external_allocation_size, + callback, ); } - late final _Dart_SetPausedOnExitPtr = - _lookup>( - 'Dart_SetPausedOnExit'); - late final _Dart_SetPausedOnExit = - _Dart_SetPausedOnExitPtr.asFunction(); + late final _Dart_NewFinalizableHandlePtr = _lookup< + ffi.NativeFunction< + Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, + ffi.IntPtr, Dart_HandleFinalizer)>>('Dart_NewFinalizableHandle'); + late final _Dart_NewFinalizableHandle = + _Dart_NewFinalizableHandlePtr.asFunction< + Dart_FinalizableHandle Function( + Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); - /// Called when the embedder has caught a top level unhandled exception error - /// in the current isolate. + /// Deletes the given finalizable [object] handle. /// - /// NOTE: It is illegal to call this twice on the same isolate without first - /// clearing the sticky error to null. + /// The caller has to provide the actual Dart object the handle was created from + /// to prove the object (and therefore the finalizable handle) is still alive. /// - /// \param error The unhandled exception error. - void Dart_SetStickyError( - Object error, + /// Requires there to be a current isolate. + void Dart_DeleteFinalizableHandle( + Dart_FinalizableHandle object, + Object strong_ref_to_object, ) { - return _Dart_SetStickyError( - error, + return _Dart_DeleteFinalizableHandle( + object, + strong_ref_to_object, ); } - late final _Dart_SetStickyErrorPtr = - _lookup>( - 'Dart_SetStickyError'); - late final _Dart_SetStickyError = - _Dart_SetStickyErrorPtr.asFunction(); - - /// Does the current isolate have a sticky error? - bool Dart_HasStickyError() { - return _Dart_HasStickyError(); - } - - late final _Dart_HasStickyErrorPtr = - _lookup>('Dart_HasStickyError'); - late final _Dart_HasStickyError = - _Dart_HasStickyErrorPtr.asFunction(); + late final _Dart_DeleteFinalizableHandlePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(Dart_FinalizableHandle, + ffi.Handle)>>('Dart_DeleteFinalizableHandle'); + late final _Dart_DeleteFinalizableHandle = _Dart_DeleteFinalizableHandlePtr + .asFunction(); - /// Gets the sticky error for the current isolate. + /// Updates the external memory size for the given finalizable handle. /// - /// \return A handle to the sticky error object or null. - Object Dart_GetStickyError() { - return _Dart_GetStickyError(); + /// The caller has to provide the actual Dart object the handle was created from + /// to prove the object (and therefore the finalizable handle) is still alive. + /// + /// May trigger garbage collection. + void Dart_UpdateFinalizableExternalSize( + Dart_FinalizableHandle object, + Object strong_ref_to_object, + int external_allocation_size, + ) { + return _Dart_UpdateFinalizableExternalSize( + object, + strong_ref_to_object, + external_allocation_size, + ); } - late final _Dart_GetStickyErrorPtr = - _lookup>('Dart_GetStickyError'); - late final _Dart_GetStickyError = - _Dart_GetStickyErrorPtr.asFunction(); + late final _Dart_UpdateFinalizableExternalSizePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, + ffi.IntPtr)>>('Dart_UpdateFinalizableExternalSize'); + late final _Dart_UpdateFinalizableExternalSize = + _Dart_UpdateFinalizableExternalSizePtr.asFunction< + void Function(Dart_FinalizableHandle, Object, int)>(); - /// Handles the next pending message for the current isolate. + /// Gets the version string for the Dart VM. /// - /// May generate an unhandled exception error. + /// The version of the Dart VM can be accessed without initializing the VM. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_HandleMessage() { - return _Dart_HandleMessage(); + /// \return The version string for the embedded Dart VM. + ffi.Pointer Dart_VersionString() { + return _Dart_VersionString(); } - late final _Dart_HandleMessagePtr = - _lookup>('Dart_HandleMessage'); - late final _Dart_HandleMessage = - _Dart_HandleMessagePtr.asFunction(); - - /// Drains the microtask queue, then blocks the calling thread until the current - /// isolate recieves a message, then handles all messages. - /// - /// \param timeout_millis When non-zero, the call returns after the indicated - /// number of milliseconds even if no message was received. - /// \return A valid handle if no error occurs, otherwise an error handle. - Object Dart_WaitForEvent( - int timeout_millis, + late final _Dart_VersionStringPtr = + _lookup Function()>>( + 'Dart_VersionString'); + late final _Dart_VersionString = + _Dart_VersionStringPtr.asFunction Function()>(); + + /// Initialize Dart_IsolateFlags with correct version and default values. + void Dart_IsolateFlagsInitialize( + ffi.Pointer flags, ) { - return _Dart_WaitForEvent( - timeout_millis, + return _Dart_IsolateFlagsInitialize( + flags, ); } - late final _Dart_WaitForEventPtr = - _lookup>( - 'Dart_WaitForEvent'); - late final _Dart_WaitForEvent = - _Dart_WaitForEventPtr.asFunction(); + late final _Dart_IsolateFlagsInitializePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer)>>('Dart_IsolateFlagsInitialize'); + late final _Dart_IsolateFlagsInitialize = _Dart_IsolateFlagsInitializePtr + .asFunction)>(); - /// Handles any pending messages for the vm service for the current - /// isolate. - /// - /// This function may be used by an embedder at a breakpoint to avoid - /// pausing the vm service. - /// - /// This function can indirectly cause the message notify callback to - /// be called. + /// Initializes the VM. /// - /// \return true if the vm service requests the program resume - /// execution, false otherwise - bool Dart_HandleServiceMessages() { - return _Dart_HandleServiceMessages(); - } - - late final _Dart_HandleServiceMessagesPtr = - _lookup>( - 'Dart_HandleServiceMessages'); - late final _Dart_HandleServiceMessages = - _Dart_HandleServiceMessagesPtr.asFunction(); - - /// Does the current isolate have pending service messages? + /// \param params A struct containing initialization information. The version + /// field of the struct must be DART_INITIALIZE_PARAMS_CURRENT_VERSION. /// - /// \return true if the isolate has pending service messages, false otherwise. - bool Dart_HasServiceMessages() { - return _Dart_HasServiceMessages(); + /// \return NULL if initialization is successful. Returns an error message + /// otherwise. The caller is responsible for freeing the error message. + ffi.Pointer Dart_Initialize( + ffi.Pointer params, + ) { + return _Dart_Initialize( + params, + ); } - late final _Dart_HasServiceMessagesPtr = - _lookup>( - 'Dart_HasServiceMessages'); - late final _Dart_HasServiceMessages = - _Dart_HasServiceMessagesPtr.asFunction(); + late final _Dart_InitializePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('Dart_Initialize'); + late final _Dart_Initialize = _Dart_InitializePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - /// Processes any incoming messages for the current isolate. - /// - /// This function may only be used when the embedder has not provided - /// an alternate message delivery mechanism with - /// Dart_SetMessageCallbacks. It is provided for convenience. + /// Cleanup state in the VM before process termination. /// - /// This function waits for incoming messages for the current - /// isolate. As new messages arrive, they are handled using - /// Dart_HandleMessage. The routine exits when all ports to the - /// current isolate are closed. + /// \return NULL if cleanup is successful. Returns an error message otherwise. + /// The caller is responsible for freeing the error message. /// - /// \return A valid handle if the run loop exited successfully. If an - /// exception or other error occurs while processing messages, an - /// error handle is returned. - Object Dart_RunLoop() { - return _Dart_RunLoop(); + /// NOTE: This function must not be called on a thread that was created by the VM + /// itself. + ffi.Pointer Dart_Cleanup() { + return _Dart_Cleanup(); } - late final _Dart_RunLoopPtr = - _lookup>('Dart_RunLoop'); - late final _Dart_RunLoop = _Dart_RunLoopPtr.asFunction(); + late final _Dart_CleanupPtr = + _lookup Function()>>( + 'Dart_Cleanup'); + late final _Dart_Cleanup = + _Dart_CleanupPtr.asFunction Function()>(); - /// Lets the VM run message processing for the isolate. + /// Sets command line flags. Should be called before Dart_Initialize. /// - /// This function expects there to a current isolate and the current isolate - /// must not have an active api scope. The VM will take care of making the - /// isolate runnable (if not already), handles its message loop and will take - /// care of shutting the isolate down once it's done. + /// \param argc The length of the arguments array. + /// \param argv An array of arguments. /// - /// \param errors_are_fatal Whether uncaught errors should be fatal. - /// \param on_error_port A port to notify on uncaught errors (or ILLEGAL_PORT). - /// \param on_exit_port A port to notify on exit (or ILLEGAL_PORT). - /// \param error A non-NULL pointer which will hold an error message if the call - /// fails. The error has to be free()ed by the caller. + /// \return NULL if successful. Returns an error message otherwise. + /// The caller is responsible for freeing the error message. /// - /// \return If successfull the VM takes owernship of the isolate and takes care - /// of its message loop. If not successful the caller retains owernship of the - /// isolate. - bool Dart_RunLoopAsync( - bool errors_are_fatal, - int on_error_port, - int on_exit_port, - ffi.Pointer> error, + /// NOTE: This call does not store references to the passed in c-strings. + ffi.Pointer Dart_SetVMFlags( + int argc, + ffi.Pointer> argv, ) { - return _Dart_RunLoopAsync( - errors_are_fatal, - on_error_port, - on_exit_port, - error, + return _Dart_SetVMFlags( + argc, + argv, ); } - late final _Dart_RunLoopAsyncPtr = _lookup< + late final _Dart_SetVMFlagsPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Bool, Dart_Port, Dart_Port, - ffi.Pointer>)>>('Dart_RunLoopAsync'); - late final _Dart_RunLoopAsync = _Dart_RunLoopAsyncPtr.asFunction< - bool Function(bool, int, int, ffi.Pointer>)>(); - - /// Gets the main port id for the current isolate. - int Dart_GetMainPortId() { - return _Dart_GetMainPortId(); - } - - late final _Dart_GetMainPortIdPtr = - _lookup>('Dart_GetMainPortId'); - late final _Dart_GetMainPortId = - _Dart_GetMainPortIdPtr.asFunction(); - - /// Does the current isolate have live ReceivePorts? - /// - /// A ReceivePort is live when it has not been closed. - bool Dart_HasLivePorts() { - return _Dart_HasLivePorts(); - } - - late final _Dart_HasLivePortsPtr = - _lookup>('Dart_HasLivePorts'); - late final _Dart_HasLivePorts = - _Dart_HasLivePortsPtr.asFunction(); + ffi.Pointer Function( + ffi.Int, ffi.Pointer>)>>('Dart_SetVMFlags'); + late final _Dart_SetVMFlags = _Dart_SetVMFlagsPtr.asFunction< + ffi.Pointer Function( + int, ffi.Pointer>)>(); - /// Posts a message for some isolate. The message is a serialized - /// object. - /// - /// Requires there to be a current isolate. - /// - /// \param port The destination port. - /// \param object An object from the current isolate. + /// Returns true if the named VM flag is of boolean type, specified, and set to + /// true. /// - /// \return True if the message was posted. - bool Dart_Post( - int port_id, - Object object, + /// \param flag_name The name of the flag without leading punctuation + /// (example: "enable_asserts"). + bool Dart_IsVMFlagSet( + ffi.Pointer flag_name, ) { - return _Dart_Post( - port_id, - object, + return _Dart_IsVMFlagSet( + flag_name, ); } - late final _Dart_PostPtr = - _lookup>( - 'Dart_Post'); - late final _Dart_Post = - _Dart_PostPtr.asFunction(); + late final _Dart_IsVMFlagSetPtr = + _lookup)>>( + 'Dart_IsVMFlagSet'); + late final _Dart_IsVMFlagSet = + _Dart_IsVMFlagSetPtr.asFunction)>(); - /// Returns a new SendPort with the provided port id. + /// Creates a new isolate. The new isolate becomes the current isolate. /// - /// \param port_id The destination port. + /// A snapshot can be used to restore the VM quickly to a saved state + /// and is useful for fast startup. If snapshot data is provided, the + /// isolate will be started using that snapshot data. Requires a core snapshot or + /// an app snapshot created by Dart_CreateSnapshot or + /// Dart_CreatePrecompiledSnapshot* from a VM with the same version. /// - /// \return A new SendPort if no errors occurs. Otherwise returns - /// an error handle. - Object Dart_NewSendPort( - int port_id, - ) { - return _Dart_NewSendPort( - port_id, - ); - } - - late final _Dart_NewSendPortPtr = - _lookup>( - 'Dart_NewSendPort'); - late final _Dart_NewSendPort = - _Dart_NewSendPortPtr.asFunction(); - - /// Gets the SendPort id for the provided SendPort. - /// \param port A SendPort object whose id is desired. - /// \param port_id Returns the id of the SendPort. - /// \return Success if no error occurs. Otherwise returns - /// an error handle. - Object Dart_SendPortGetId( - Object port, - ffi.Pointer port_id, + /// Requires there to be no current isolate. + /// + /// \param script_uri The main source file or snapshot this isolate will load. + /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child + /// isolate is created by Isolate.spawn. The embedder should use a URI that + /// allows it to load the same program into such a child isolate. + /// \param name A short name for the isolate to improve debugging messages. + /// Typically of the format 'foo.dart:main()'. + /// \param isolate_snapshot_data + /// \param isolate_snapshot_instructions Buffers containing a snapshot of the + /// isolate or NULL if no snapshot is provided. If provided, the buffers must + /// remain valid until the isolate shuts down. + /// \param flags Pointer to VM specific flags or NULL for default flags. + /// \param isolate_group_data Embedder group data. This data can be obtained + /// by calling Dart_IsolateGroupData and will be passed to the + /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and + /// Dart_IsolateGroupCleanupCallback. + /// \param isolate_data Embedder data. This data will be passed to + /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from + /// this parent isolate. + /// \param error Returns NULL if creation is successful, an error message + /// otherwise. The caller is responsible for calling free() on the error + /// message. + /// + /// \return The new isolate on success, or NULL if isolate creation failed. + Dart_Isolate Dart_CreateIsolateGroup( + ffi.Pointer script_uri, + ffi.Pointer name, + ffi.Pointer isolate_snapshot_data, + ffi.Pointer isolate_snapshot_instructions, + ffi.Pointer flags, + ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data, + ffi.Pointer> error, ) { - return _Dart_SendPortGetId( - port, - port_id, + return _Dart_CreateIsolateGroup( + script_uri, + name, + isolate_snapshot_data, + isolate_snapshot_instructions, + flags, + isolate_group_data, + isolate_data, + error, ); } - late final _Dart_SendPortGetIdPtr = _lookup< + late final _Dart_CreateIsolateGroupPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_SendPortGetId'); - late final _Dart_SendPortGetId = _Dart_SendPortGetIdPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('Dart_CreateIsolateGroup'); + late final _Dart_CreateIsolateGroup = _Dart_CreateIsolateGroupPtr.asFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - /// Enters a new scope. + /// Creates a new isolate inside the isolate group of [group_member]. /// - /// All new local handles will be created in this scope. Additionally, - /// some functions may return "scope allocated" memory which is only - /// valid within this scope. + /// Requires there to be no current isolate. /// - /// Requires there to be a current isolate. - void Dart_EnterScope() { - return _Dart_EnterScope(); - } - - late final _Dart_EnterScopePtr = - _lookup>('Dart_EnterScope'); - late final _Dart_EnterScope = - _Dart_EnterScopePtr.asFunction(); - - /// Exits a scope. + /// \param group_member An isolate from the same group into which the newly created + /// isolate should be born into. Other threads may not have entered / enter this + /// member isolate. + /// \param name A short name for the isolate for debugging purposes. + /// \param shutdown_callback A callback to be called when the isolate is being + /// shutdown (may be NULL). + /// \param cleanup_callback A callback to be called when the isolate is being + /// cleaned up (may be NULL). + /// \param isolate_data The embedder-specific data associated with this isolate. + /// \param error Set to NULL if creation is successful, set to an error + /// message otherwise. The caller is responsible for calling free() on the + /// error message. /// - /// The previous scope (if any) becomes the current scope. + /// \return The newly created isolate on success, or NULL if isolate creation + /// failed. /// - /// Requires there to be a current isolate. - void Dart_ExitScope() { - return _Dart_ExitScope(); + /// If successful, the newly created isolate will become the current isolate. + Dart_Isolate Dart_CreateIsolateInGroup( + Dart_Isolate group_member, + ffi.Pointer name, + Dart_IsolateShutdownCallback shutdown_callback, + Dart_IsolateCleanupCallback cleanup_callback, + ffi.Pointer child_isolate_data, + ffi.Pointer> error, + ) { + return _Dart_CreateIsolateInGroup( + group_member, + name, + shutdown_callback, + cleanup_callback, + child_isolate_data, + error, + ); } - late final _Dart_ExitScopePtr = - _lookup>('Dart_ExitScope'); - late final _Dart_ExitScope = _Dart_ExitScopePtr.asFunction(); + late final _Dart_CreateIsolateInGroupPtr = _lookup< + ffi.NativeFunction< + Dart_Isolate Function( + Dart_Isolate, + ffi.Pointer, + Dart_IsolateShutdownCallback, + Dart_IsolateCleanupCallback, + ffi.Pointer, + ffi.Pointer>)>>( + 'Dart_CreateIsolateInGroup'); + late final _Dart_CreateIsolateInGroup = + _Dart_CreateIsolateInGroupPtr.asFunction< + Dart_Isolate Function( + Dart_Isolate, + ffi.Pointer, + Dart_IsolateShutdownCallback, + Dart_IsolateCleanupCallback, + ffi.Pointer, + ffi.Pointer>)>(); - /// The Dart VM uses "zone allocation" for temporary structures. Zones - /// support very fast allocation of small chunks of memory. The chunks - /// cannot be deallocated individually, but instead zones support - /// deallocating all chunks in one fast operation. - /// - /// This function makes it possible for the embedder to allocate - /// temporary data in the VMs zone allocator. - /// - /// Zone allocation is possible: - /// 1. when inside a scope where local handles can be allocated - /// 2. when processing a message from a native port in a native port - /// handler + /// Creates a new isolate from a Dart Kernel file. The new isolate + /// becomes the current isolate. /// - /// All the memory allocated this way will be reclaimed either on the - /// next call to Dart_ExitScope or when the native port handler exits. + /// Requires there to be no current isolate. /// - /// \param size Size of the memory to allocate. + /// \param script_uri The main source file or snapshot this isolate will load. + /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child + /// isolate is created by Isolate.spawn. The embedder should use a URI that + /// allows it to load the same program into such a child isolate. + /// \param name A short name for the isolate to improve debugging messages. + /// Typically of the format 'foo.dart:main()'. + /// \param kernel_buffer + /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must + /// remain valid until isolate shutdown. + /// \param flags Pointer to VM specific flags or NULL for default flags. + /// \param isolate_group_data Embedder group data. This data can be obtained + /// by calling Dart_IsolateGroupData and will be passed to the + /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and + /// Dart_IsolateGroupCleanupCallback. + /// \param isolate_data Embedder data. This data will be passed to + /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from + /// this parent isolate. + /// \param error Returns NULL if creation is successful, an error message + /// otherwise. The caller is responsible for calling free() on the error + /// message. /// - /// \return A pointer to the allocated memory. NULL if allocation - /// failed. Failure might due to is no current VM zone. - ffi.Pointer Dart_ScopeAllocate( - int size, + /// \return The new isolate on success, or NULL if isolate creation failed. + Dart_Isolate Dart_CreateIsolateGroupFromKernel( + ffi.Pointer script_uri, + ffi.Pointer name, + ffi.Pointer kernel_buffer, + int kernel_buffer_size, + ffi.Pointer flags, + ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data, + ffi.Pointer> error, ) { - return _Dart_ScopeAllocate( - size, + return _Dart_CreateIsolateGroupFromKernel( + script_uri, + name, + kernel_buffer, + kernel_buffer_size, + flags, + isolate_group_data, + isolate_data, + error, ); } - late final _Dart_ScopeAllocatePtr = - _lookup Function(ffi.IntPtr)>>( - 'Dart_ScopeAllocate'); - late final _Dart_ScopeAllocate = - _Dart_ScopeAllocatePtr.asFunction Function(int)>(); + late final _Dart_CreateIsolateGroupFromKernelPtr = _lookup< + ffi.NativeFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>( + 'Dart_CreateIsolateGroupFromKernel'); + late final _Dart_CreateIsolateGroupFromKernel = + _Dart_CreateIsolateGroupFromKernelPtr.asFunction< + Dart_Isolate Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - /// Returns the null object. + /// Shuts down the current isolate. After this call, the current isolate is NULL. + /// Any current scopes created by Dart_EnterScope will be exited. Invokes the + /// shutdown callback and any callbacks of remaining weak persistent handles. /// - /// \return A handle to the null object. - Object Dart_Null() { - return _Dart_Null(); + /// Requires there to be a current isolate. + void Dart_ShutdownIsolate() { + return _Dart_ShutdownIsolate(); } - late final _Dart_NullPtr = - _lookup>('Dart_Null'); - late final _Dart_Null = _Dart_NullPtr.asFunction(); + late final _Dart_ShutdownIsolatePtr = + _lookup>('Dart_ShutdownIsolate'); + late final _Dart_ShutdownIsolate = + _Dart_ShutdownIsolatePtr.asFunction(); - /// Is this object null? - bool Dart_IsNull( - Object object, - ) { - return _Dart_IsNull( - object, - ); + /// Returns the current isolate. Will return NULL if there is no + /// current isolate. + Dart_Isolate Dart_CurrentIsolate() { + return _Dart_CurrentIsolate(); } - late final _Dart_IsNullPtr = - _lookup>('Dart_IsNull'); - late final _Dart_IsNull = _Dart_IsNullPtr.asFunction(); + late final _Dart_CurrentIsolatePtr = + _lookup>( + 'Dart_CurrentIsolate'); + late final _Dart_CurrentIsolate = + _Dart_CurrentIsolatePtr.asFunction(); - /// Returns the empty string object. - /// - /// \return A handle to the empty string object. - Object Dart_EmptyString() { - return _Dart_EmptyString(); + /// Returns the callback data associated with the current isolate. This + /// data was set when the isolate got created or initialized. + ffi.Pointer Dart_CurrentIsolateData() { + return _Dart_CurrentIsolateData(); } - late final _Dart_EmptyStringPtr = - _lookup>('Dart_EmptyString'); - late final _Dart_EmptyString = - _Dart_EmptyStringPtr.asFunction(); + late final _Dart_CurrentIsolateDataPtr = + _lookup Function()>>( + 'Dart_CurrentIsolateData'); + late final _Dart_CurrentIsolateData = _Dart_CurrentIsolateDataPtr.asFunction< + ffi.Pointer Function()>(); - /// Returns types that are not classes, and which therefore cannot be looked up - /// as library members by Dart_GetType. - /// - /// \return A handle to the dynamic, void or Never type. - Object Dart_TypeDynamic() { - return _Dart_TypeDynamic(); + /// Returns the callback data associated with the given isolate. This + /// data was set when the isolate got created or initialized. + ffi.Pointer Dart_IsolateData( + Dart_Isolate isolate, + ) { + return _Dart_IsolateData( + isolate, + ); } - late final _Dart_TypeDynamicPtr = - _lookup>('Dart_TypeDynamic'); - late final _Dart_TypeDynamic = - _Dart_TypeDynamicPtr.asFunction(); + late final _Dart_IsolateDataPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateData'); + late final _Dart_IsolateData = _Dart_IsolateDataPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); - Object Dart_TypeVoid() { - return _Dart_TypeVoid(); + /// Returns the current isolate group. Will return NULL if there is no + /// current isolate group. + Dart_IsolateGroup Dart_CurrentIsolateGroup() { + return _Dart_CurrentIsolateGroup(); } - late final _Dart_TypeVoidPtr = - _lookup>('Dart_TypeVoid'); - late final _Dart_TypeVoid = _Dart_TypeVoidPtr.asFunction(); + late final _Dart_CurrentIsolateGroupPtr = + _lookup>( + 'Dart_CurrentIsolateGroup'); + late final _Dart_CurrentIsolateGroup = + _Dart_CurrentIsolateGroupPtr.asFunction(); - Object Dart_TypeNever() { - return _Dart_TypeNever(); + /// Returns the callback data associated with the current isolate group. This + /// data was passed to the isolate group when it was created. + ffi.Pointer Dart_CurrentIsolateGroupData() { + return _Dart_CurrentIsolateGroupData(); } - late final _Dart_TypeNeverPtr = - _lookup>('Dart_TypeNever'); - late final _Dart_TypeNever = - _Dart_TypeNeverPtr.asFunction(); + late final _Dart_CurrentIsolateGroupDataPtr = + _lookup Function()>>( + 'Dart_CurrentIsolateGroupData'); + late final _Dart_CurrentIsolateGroupData = _Dart_CurrentIsolateGroupDataPtr + .asFunction Function()>(); - /// Checks if the two objects are equal. - /// - /// The result of the comparison is returned through the 'equal' - /// parameter. The return value itself is used to indicate success or - /// failure, not equality. - /// - /// May generate an unhandled exception error. - /// - /// \param obj1 An object to be compared. - /// \param obj2 An object to be compared. - /// \param equal Returns the result of the equality comparison. - /// - /// \return A valid handle if no error occurs during the comparison. - Object Dart_ObjectEquals( - Object obj1, - Object obj2, - ffi.Pointer equal, + /// Returns the callback data associated with the specified isolate group. This + /// data was passed to the isolate when it was created. + /// The embedder is responsible for ensuring the consistency of this data + /// with respect to the lifecycle of an isolate group. + ffi.Pointer Dart_IsolateGroupData( + Dart_Isolate isolate, ) { - return _Dart_ObjectEquals( - obj1, - obj2, - equal, + return _Dart_IsolateGroupData( + isolate, ); } - late final _Dart_ObjectEqualsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, - ffi.Pointer)>>('Dart_ObjectEquals'); - late final _Dart_ObjectEquals = _Dart_ObjectEqualsPtr.asFunction< - Object Function(Object, Object, ffi.Pointer)>(); + late final _Dart_IsolateGroupDataPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateGroupData'); + late final _Dart_IsolateGroupData = _Dart_IsolateGroupDataPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); - /// Is this object an instance of some type? - /// - /// The result of the test is returned through the 'instanceof' parameter. - /// The return value itself is used to indicate success or failure. + /// Returns the debugging name for the current isolate. /// - /// \param object An object. - /// \param type A type. - /// \param instanceof Return true if 'object' is an instance of type 'type'. + /// This name is unique to each isolate and should only be used to make + /// debugging messages more comprehensible. + Object Dart_DebugName() { + return _Dart_DebugName(); + } + + late final _Dart_DebugNamePtr = + _lookup>('Dart_DebugName'); + late final _Dart_DebugName = + _Dart_DebugNamePtr.asFunction(); + + /// Returns the ID for an isolate which is used to query the service protocol. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ObjectIsType( - Object object, - Object type, - ffi.Pointer instanceof, + /// It is the responsibility of the caller to free the returned ID. + ffi.Pointer Dart_IsolateServiceId( + Dart_Isolate isolate, ) { - return _Dart_ObjectIsType( - object, - type, - instanceof, + return _Dart_IsolateServiceId( + isolate, ); } - late final _Dart_ObjectIsTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, - ffi.Pointer)>>('Dart_ObjectIsType'); - late final _Dart_ObjectIsType = _Dart_ObjectIsTypePtr.asFunction< - Object Function(Object, Object, ffi.Pointer)>(); + late final _Dart_IsolateServiceIdPtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateServiceId'); + late final _Dart_IsolateServiceId = _Dart_IsolateServiceIdPtr.asFunction< + ffi.Pointer Function(Dart_Isolate)>(); - /// Query object type. - /// - /// \param object Some Object. + /// Enters an isolate. After calling this function, + /// the current isolate will be set to the provided isolate. /// - /// \return true if Object is of the specified type. - bool Dart_IsInstance( - Object object, + /// Requires there to be no current isolate. Multiple threads may not be in + /// the same isolate at once. + void Dart_EnterIsolate( + Dart_Isolate isolate, ) { - return _Dart_IsInstance( - object, + return _Dart_EnterIsolate( + isolate, ); } - late final _Dart_IsInstancePtr = - _lookup>( - 'Dart_IsInstance'); - late final _Dart_IsInstance = - _Dart_IsInstancePtr.asFunction(); + late final _Dart_EnterIsolatePtr = + _lookup>( + 'Dart_EnterIsolate'); + late final _Dart_EnterIsolate = + _Dart_EnterIsolatePtr.asFunction(); - bool Dart_IsNumber( - Object object, + /// Kills the given isolate. + /// + /// This function has the same effect as dart:isolate's + /// Isolate.kill(priority:immediate). + /// It can interrupt ordinary Dart code but not native code. If the isolate is + /// in the middle of a long running native function, the isolate will not be + /// killed until control returns to Dart. + /// + /// Does not require a current isolate. It is safe to kill the current isolate if + /// there is one. + void Dart_KillIsolate( + Dart_Isolate isolate, ) { - return _Dart_IsNumber( - object, + return _Dart_KillIsolate( + isolate, ); } - late final _Dart_IsNumberPtr = - _lookup>( - 'Dart_IsNumber'); - late final _Dart_IsNumber = - _Dart_IsNumberPtr.asFunction(); + late final _Dart_KillIsolatePtr = + _lookup>( + 'Dart_KillIsolate'); + late final _Dart_KillIsolate = + _Dart_KillIsolatePtr.asFunction(); - bool Dart_IsInteger( - Object object, + /// Notifies the VM that the embedder expects |size| bytes of memory have become + /// unreachable. The VM may use this hint to adjust the garbage collector's + /// growth policy. + /// + /// Multiple calls are interpreted as increasing, not replacing, the estimate of + /// unreachable memory. + /// + /// Requires there to be a current isolate. + void Dart_HintFreed( + int size, ) { - return _Dart_IsInteger( - object, + return _Dart_HintFreed( + size, ); } - late final _Dart_IsIntegerPtr = - _lookup>( - 'Dart_IsInteger'); - late final _Dart_IsInteger = - _Dart_IsIntegerPtr.asFunction(); + late final _Dart_HintFreedPtr = + _lookup>( + 'Dart_HintFreed'); + late final _Dart_HintFreed = + _Dart_HintFreedPtr.asFunction(); - bool Dart_IsDouble( - Object object, + /// Notifies the VM that the embedder expects to be idle until |deadline|. The VM + /// may use this time to perform garbage collection or other tasks to avoid + /// delays during execution of Dart code in the future. + /// + /// |deadline| is measured in microseconds against the system's monotonic time. + /// This clock can be accessed via Dart_TimelineGetMicros(). + /// + /// Requires there to be a current isolate. + void Dart_NotifyIdle( + int deadline, ) { - return _Dart_IsDouble( - object, + return _Dart_NotifyIdle( + deadline, ); } - late final _Dart_IsDoublePtr = - _lookup>( - 'Dart_IsDouble'); - late final _Dart_IsDouble = - _Dart_IsDoublePtr.asFunction(); + late final _Dart_NotifyIdlePtr = + _lookup>( + 'Dart_NotifyIdle'); + late final _Dart_NotifyIdle = + _Dart_NotifyIdlePtr.asFunction(); - bool Dart_IsBoolean( - Object object, - ) { - return _Dart_IsBoolean( - object, - ); + /// Notifies the VM that the system is running low on memory. + /// + /// Does not require a current isolate. Only valid after calling Dart_Initialize. + void Dart_NotifyLowMemory() { + return _Dart_NotifyLowMemory(); } - late final _Dart_IsBooleanPtr = - _lookup>( - 'Dart_IsBoolean'); - late final _Dart_IsBoolean = - _Dart_IsBooleanPtr.asFunction(); + late final _Dart_NotifyLowMemoryPtr = + _lookup>('Dart_NotifyLowMemory'); + late final _Dart_NotifyLowMemory = + _Dart_NotifyLowMemoryPtr.asFunction(); - bool Dart_IsString( - Object object, - ) { - return _Dart_IsString( - object, - ); + /// Starts the CPU sampling profiler. + void Dart_StartProfiling() { + return _Dart_StartProfiling(); } - late final _Dart_IsStringPtr = - _lookup>( - 'Dart_IsString'); - late final _Dart_IsString = - _Dart_IsStringPtr.asFunction(); + late final _Dart_StartProfilingPtr = + _lookup>('Dart_StartProfiling'); + late final _Dart_StartProfiling = + _Dart_StartProfilingPtr.asFunction(); - bool Dart_IsStringLatin1( - Object object, - ) { - return _Dart_IsStringLatin1( - object, - ); + /// Stops the CPU sampling profiler. + /// + /// Note that some profile samples might still be taken after this fucntion + /// returns due to the asynchronous nature of the implementation on some + /// platforms. + void Dart_StopProfiling() { + return _Dart_StopProfiling(); } - late final _Dart_IsStringLatin1Ptr = - _lookup>( - 'Dart_IsStringLatin1'); - late final _Dart_IsStringLatin1 = - _Dart_IsStringLatin1Ptr.asFunction(); + late final _Dart_StopProfilingPtr = + _lookup>('Dart_StopProfiling'); + late final _Dart_StopProfiling = + _Dart_StopProfilingPtr.asFunction(); - bool Dart_IsExternalString( - Object object, - ) { - return _Dart_IsExternalString( - object, - ); + /// Notifies the VM that the current thread should not be profiled until a + /// matching call to Dart_ThreadEnableProfiling is made. + /// + /// NOTE: By default, if a thread has entered an isolate it will be profiled. + /// This function should be used when an embedder knows a thread is about + /// to make a blocking call and wants to avoid unnecessary interrupts by + /// the profiler. + void Dart_ThreadDisableProfiling() { + return _Dart_ThreadDisableProfiling(); } - late final _Dart_IsExternalStringPtr = - _lookup>( - 'Dart_IsExternalString'); - late final _Dart_IsExternalString = - _Dart_IsExternalStringPtr.asFunction(); + late final _Dart_ThreadDisableProfilingPtr = + _lookup>( + 'Dart_ThreadDisableProfiling'); + late final _Dart_ThreadDisableProfiling = + _Dart_ThreadDisableProfilingPtr.asFunction(); - bool Dart_IsList( - Object object, - ) { - return _Dart_IsList( - object, - ); + /// Notifies the VM that the current thread should be profiled. + /// + /// NOTE: It is only legal to call this function *after* calling + /// Dart_ThreadDisableProfiling. + /// + /// NOTE: By default, if a thread has entered an isolate it will be profiled. + void Dart_ThreadEnableProfiling() { + return _Dart_ThreadEnableProfiling(); } - late final _Dart_IsListPtr = - _lookup>('Dart_IsList'); - late final _Dart_IsList = _Dart_IsListPtr.asFunction(); + late final _Dart_ThreadEnableProfilingPtr = + _lookup>( + 'Dart_ThreadEnableProfiling'); + late final _Dart_ThreadEnableProfiling = + _Dart_ThreadEnableProfilingPtr.asFunction(); - bool Dart_IsMap( - Object object, + /// Register symbol information for the Dart VM's profiler and crash dumps. + /// + /// This consumes the output of //topaz/runtime/dart/profiler_symbols, which + /// should be treated as opaque. + void Dart_AddSymbols( + ffi.Pointer dso_name, + ffi.Pointer buffer, + int buffer_size, ) { - return _Dart_IsMap( - object, + return _Dart_AddSymbols( + dso_name, + buffer, + buffer_size, ); } - late final _Dart_IsMapPtr = - _lookup>('Dart_IsMap'); - late final _Dart_IsMap = _Dart_IsMapPtr.asFunction(); + late final _Dart_AddSymbolsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.IntPtr)>>('Dart_AddSymbols'); + late final _Dart_AddSymbols = _Dart_AddSymbolsPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - bool Dart_IsLibrary( - Object object, - ) { - return _Dart_IsLibrary( - object, - ); + /// Exits an isolate. After this call, Dart_CurrentIsolate will + /// return NULL. + /// + /// Requires there to be a current isolate. + void Dart_ExitIsolate() { + return _Dart_ExitIsolate(); } - late final _Dart_IsLibraryPtr = - _lookup>( - 'Dart_IsLibrary'); - late final _Dart_IsLibrary = - _Dart_IsLibraryPtr.asFunction(); + late final _Dart_ExitIsolatePtr = + _lookup>('Dart_ExitIsolate'); + late final _Dart_ExitIsolate = + _Dart_ExitIsolatePtr.asFunction(); - bool Dart_IsType( - Object handle, + /// Creates a full snapshot of the current isolate heap. + /// + /// A full snapshot is a compact representation of the dart vm isolate heap + /// and dart isolate heap states. These snapshots are used to initialize + /// the vm isolate on startup and fast initialization of an isolate. + /// A Snapshot of the heap is created before any dart code has executed. + /// + /// Requires there to be a current isolate. Not available in the precompiled + /// runtime (check Dart_IsPrecompiledRuntime). + /// + /// \param buffer Returns a pointer to a buffer containing the + /// snapshot. This buffer is scope allocated and is only valid + /// until the next call to Dart_ExitScope. + /// \param size Returns the size of the buffer. + /// \param is_core Create a snapshot containing core libraries. + /// Such snapshot should be agnostic to null safety mode. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateSnapshot( + ffi.Pointer> vm_snapshot_data_buffer, + ffi.Pointer vm_snapshot_data_size, + ffi.Pointer> isolate_snapshot_data_buffer, + ffi.Pointer isolate_snapshot_data_size, + bool is_core, ) { - return _Dart_IsType( - handle, + return _Dart_CreateSnapshot( + vm_snapshot_data_buffer, + vm_snapshot_data_size, + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + is_core, ); } - late final _Dart_IsTypePtr = - _lookup>('Dart_IsType'); - late final _Dart_IsType = _Dart_IsTypePtr.asFunction(); + late final _Dart_CreateSnapshotPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Bool)>>('Dart_CreateSnapshot'); + late final _Dart_CreateSnapshot = _Dart_CreateSnapshotPtr.asFunction< + Object Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + bool)>(); - bool Dart_IsFunction( - Object handle, + /// Returns whether the buffer contains a kernel file. + /// + /// \param buffer Pointer to a buffer that might contain a kernel binary. + /// \param buffer_size Size of the buffer. + /// + /// \return Whether the buffer contains a kernel binary (full or partial). + bool Dart_IsKernel( + ffi.Pointer buffer, + int buffer_size, ) { - return _Dart_IsFunction( - handle, + return _Dart_IsKernel( + buffer, + buffer_size, ); } - late final _Dart_IsFunctionPtr = - _lookup>( - 'Dart_IsFunction'); - late final _Dart_IsFunction = - _Dart_IsFunctionPtr.asFunction(); + late final _Dart_IsKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_IsKernel'); + late final _Dart_IsKernel = _Dart_IsKernelPtr.asFunction< + bool Function(ffi.Pointer, int)>(); - bool Dart_IsVariable( - Object handle, + /// Make isolate runnable. + /// + /// When isolates are spawned, this function is used to indicate that + /// the creation and initialization (including script loading) of the + /// isolate is complete and the isolate can start. + /// This function expects there to be no current isolate. + /// + /// \param isolate The isolate to be made runnable. + /// + /// \return NULL if successful. Returns an error message otherwise. The caller + /// is responsible for freeing the error message. + ffi.Pointer Dart_IsolateMakeRunnable( + Dart_Isolate isolate, ) { - return _Dart_IsVariable( - handle, + return _Dart_IsolateMakeRunnable( + isolate, ); } - late final _Dart_IsVariablePtr = - _lookup>( - 'Dart_IsVariable'); - late final _Dart_IsVariable = - _Dart_IsVariablePtr.asFunction(); + late final _Dart_IsolateMakeRunnablePtr = + _lookup Function(Dart_Isolate)>>( + 'Dart_IsolateMakeRunnable'); + late final _Dart_IsolateMakeRunnable = _Dart_IsolateMakeRunnablePtr + .asFunction Function(Dart_Isolate)>(); - bool Dart_IsTypeVariable( - Object handle, + /// Allows embedders to provide an alternative wakeup mechanism for the + /// delivery of inter-isolate messages. This setting only applies to + /// the current isolate. + /// + /// Most embedders will only call this function once, before isolate + /// execution begins. If this function is called after isolate + /// execution begins, the embedder is responsible for threading issues. + void Dart_SetMessageNotifyCallback( + Dart_MessageNotifyCallback message_notify_callback, ) { - return _Dart_IsTypeVariable( - handle, + return _Dart_SetMessageNotifyCallback( + message_notify_callback, ); } - late final _Dart_IsTypeVariablePtr = - _lookup>( - 'Dart_IsTypeVariable'); - late final _Dart_IsTypeVariable = - _Dart_IsTypeVariablePtr.asFunction(); + late final _Dart_SetMessageNotifyCallbackPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetMessageNotifyCallback'); + late final _Dart_SetMessageNotifyCallback = _Dart_SetMessageNotifyCallbackPtr + .asFunction(); - bool Dart_IsClosure( - Object object, - ) { - return _Dart_IsClosure( - object, - ); + /// Query the current message notify callback for the isolate. + /// + /// \return The current message notify callback for the isolate. + Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback() { + return _Dart_GetMessageNotifyCallback(); } - late final _Dart_IsClosurePtr = - _lookup>( - 'Dart_IsClosure'); - late final _Dart_IsClosure = - _Dart_IsClosurePtr.asFunction(); + late final _Dart_GetMessageNotifyCallbackPtr = + _lookup>( + 'Dart_GetMessageNotifyCallback'); + late final _Dart_GetMessageNotifyCallback = _Dart_GetMessageNotifyCallbackPtr + .asFunction(); - bool Dart_IsTypedData( - Object object, - ) { - return _Dart_IsTypedData( - object, - ); + /// If the VM flag `--pause-isolates-on-start` was passed this will be true. + /// + /// \return A boolean value indicating if pause on start was requested. + bool Dart_ShouldPauseOnStart() { + return _Dart_ShouldPauseOnStart(); } - late final _Dart_IsTypedDataPtr = - _lookup>( - 'Dart_IsTypedData'); - late final _Dart_IsTypedData = - _Dart_IsTypedDataPtr.asFunction(); + late final _Dart_ShouldPauseOnStartPtr = + _lookup>( + 'Dart_ShouldPauseOnStart'); + late final _Dart_ShouldPauseOnStart = + _Dart_ShouldPauseOnStartPtr.asFunction(); - bool Dart_IsByteBuffer( - Object object, + /// Override the VM flag `--pause-isolates-on-start` for the current isolate. + /// + /// \param should_pause Should the isolate be paused on start? + /// + /// NOTE: This must be called before Dart_IsolateMakeRunnable. + void Dart_SetShouldPauseOnStart( + bool should_pause, ) { - return _Dart_IsByteBuffer( - object, + return _Dart_SetShouldPauseOnStart( + should_pause, ); } - late final _Dart_IsByteBufferPtr = - _lookup>( - 'Dart_IsByteBuffer'); - late final _Dart_IsByteBuffer = - _Dart_IsByteBufferPtr.asFunction(); + late final _Dart_SetShouldPauseOnStartPtr = + _lookup>( + 'Dart_SetShouldPauseOnStart'); + late final _Dart_SetShouldPauseOnStart = + _Dart_SetShouldPauseOnStartPtr.asFunction(); - bool Dart_IsFuture( - Object object, - ) { - return _Dart_IsFuture( - object, - ); + /// Is the current isolate paused on start? + /// + /// \return A boolean value indicating if the isolate is paused on start. + bool Dart_IsPausedOnStart() { + return _Dart_IsPausedOnStart(); } - late final _Dart_IsFuturePtr = - _lookup>( - 'Dart_IsFuture'); - late final _Dart_IsFuture = - _Dart_IsFuturePtr.asFunction(); + late final _Dart_IsPausedOnStartPtr = + _lookup>('Dart_IsPausedOnStart'); + late final _Dart_IsPausedOnStart = + _Dart_IsPausedOnStartPtr.asFunction(); - /// Gets the type of a Dart language object. - /// - /// \param instance Some Dart object. + /// Called when the embedder has paused the current isolate on start and when + /// the embedder has resumed the isolate. /// - /// \return If no error occurs, the type is returned. Otherwise an - /// error handle is returned. - Object Dart_InstanceGetType( - Object instance, + /// \param paused Is the isolate paused on start? + void Dart_SetPausedOnStart( + bool paused, ) { - return _Dart_InstanceGetType( - instance, + return _Dart_SetPausedOnStart( + paused, ); } - late final _Dart_InstanceGetTypePtr = - _lookup>( - 'Dart_InstanceGetType'); - late final _Dart_InstanceGetType = - _Dart_InstanceGetTypePtr.asFunction(); + late final _Dart_SetPausedOnStartPtr = + _lookup>( + 'Dart_SetPausedOnStart'); + late final _Dart_SetPausedOnStart = + _Dart_SetPausedOnStartPtr.asFunction(); - /// Returns the name for the provided class type. + /// If the VM flag `--pause-isolates-on-exit` was passed this will be true. /// - /// \return A valid string handle if no error occurs during the - /// operation. - Object Dart_ClassName( - Object cls_type, - ) { - return _Dart_ClassName( - cls_type, - ); + /// \return A boolean value indicating if pause on exit was requested. + bool Dart_ShouldPauseOnExit() { + return _Dart_ShouldPauseOnExit(); } - late final _Dart_ClassNamePtr = - _lookup>( - 'Dart_ClassName'); - late final _Dart_ClassName = - _Dart_ClassNamePtr.asFunction(); + late final _Dart_ShouldPauseOnExitPtr = + _lookup>( + 'Dart_ShouldPauseOnExit'); + late final _Dart_ShouldPauseOnExit = + _Dart_ShouldPauseOnExitPtr.asFunction(); - /// Returns the name for the provided function or method. + /// Override the VM flag `--pause-isolates-on-exit` for the current isolate. /// - /// \return A valid string handle if no error occurs during the - /// operation. - Object Dart_FunctionName( - Object function, + /// \param should_pause Should the isolate be paused on exit? + void Dart_SetShouldPauseOnExit( + bool should_pause, ) { - return _Dart_FunctionName( - function, + return _Dart_SetShouldPauseOnExit( + should_pause, ); } - late final _Dart_FunctionNamePtr = - _lookup>( - 'Dart_FunctionName'); - late final _Dart_FunctionName = - _Dart_FunctionNamePtr.asFunction(); + late final _Dart_SetShouldPauseOnExitPtr = + _lookup>( + 'Dart_SetShouldPauseOnExit'); + late final _Dart_SetShouldPauseOnExit = + _Dart_SetShouldPauseOnExitPtr.asFunction(); - /// Returns a handle to the owner of a function. - /// - /// The owner of an instance method or a static method is its defining - /// class. The owner of a top-level function is its defining - /// library. The owner of the function of a non-implicit closure is the - /// function of the method or closure that defines the non-implicit - /// closure. + /// Is the current isolate paused on exit? /// - /// \return A valid handle to the owner of the function, or an error - /// handle if the argument is not a valid handle to a function. - Object Dart_FunctionOwner( - Object function, - ) { - return _Dart_FunctionOwner( - function, - ); + /// \return A boolean value indicating if the isolate is paused on exit. + bool Dart_IsPausedOnExit() { + return _Dart_IsPausedOnExit(); } - late final _Dart_FunctionOwnerPtr = - _lookup>( - 'Dart_FunctionOwner'); - late final _Dart_FunctionOwner = - _Dart_FunctionOwnerPtr.asFunction(); + late final _Dart_IsPausedOnExitPtr = + _lookup>('Dart_IsPausedOnExit'); + late final _Dart_IsPausedOnExit = + _Dart_IsPausedOnExitPtr.asFunction(); - /// Determines whether a function handle referes to a static function - /// of method. - /// - /// For the purposes of the embedding API, a top-level function is - /// implicitly declared static. - /// - /// \param function A handle to a function or method declaration. - /// \param is_static Returns whether the function or method is declared static. + /// Called when the embedder has paused the current isolate on exit and when + /// the embedder has resumed the isolate. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_FunctionIsStatic( - Object function, - ffi.Pointer is_static, + /// \param paused Is the isolate paused on exit? + void Dart_SetPausedOnExit( + bool paused, ) { - return _Dart_FunctionIsStatic( - function, - is_static, + return _Dart_SetPausedOnExit( + paused, ); } - late final _Dart_FunctionIsStaticPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_FunctionIsStatic'); - late final _Dart_FunctionIsStatic = _Dart_FunctionIsStaticPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + late final _Dart_SetPausedOnExitPtr = + _lookup>( + 'Dart_SetPausedOnExit'); + late final _Dart_SetPausedOnExit = + _Dart_SetPausedOnExitPtr.asFunction(); - /// Is this object a closure resulting from a tear-off (closurized method)? - /// - /// Returns true for closures produced when an ordinary method is accessed - /// through a getter call. Returns false otherwise, in particular for closures - /// produced from local function declarations. + /// Called when the embedder has caught a top level unhandled exception error + /// in the current isolate. /// - /// \param object Some Object. + /// NOTE: It is illegal to call this twice on the same isolate without first + /// clearing the sticky error to null. /// - /// \return true if Object is a tear-off. - bool Dart_IsTearOff( - Object object, + /// \param error The unhandled exception error. + void Dart_SetStickyError( + Object error, ) { - return _Dart_IsTearOff( - object, + return _Dart_SetStickyError( + error, ); } - late final _Dart_IsTearOffPtr = - _lookup>( - 'Dart_IsTearOff'); - late final _Dart_IsTearOff = - _Dart_IsTearOffPtr.asFunction(); + late final _Dart_SetStickyErrorPtr = + _lookup>( + 'Dart_SetStickyError'); + late final _Dart_SetStickyError = + _Dart_SetStickyErrorPtr.asFunction(); - /// Retrieves the function of a closure. - /// - /// \return A handle to the function of the closure, or an error handle if the - /// argument is not a closure. - Object Dart_ClosureFunction( - Object closure, - ) { - return _Dart_ClosureFunction( - closure, - ); + /// Does the current isolate have a sticky error? + bool Dart_HasStickyError() { + return _Dart_HasStickyError(); } - late final _Dart_ClosureFunctionPtr = - _lookup>( - 'Dart_ClosureFunction'); - late final _Dart_ClosureFunction = - _Dart_ClosureFunctionPtr.asFunction(); + late final _Dart_HasStickyErrorPtr = + _lookup>('Dart_HasStickyError'); + late final _Dart_HasStickyError = + _Dart_HasStickyErrorPtr.asFunction(); - /// Returns a handle to the library which contains class. + /// Gets the sticky error for the current isolate. /// - /// \return A valid handle to the library with owns class, null if the class - /// has no library or an error handle if the argument is not a valid handle - /// to a class type. - Object Dart_ClassLibrary( - Object cls_type, - ) { - return _Dart_ClassLibrary( - cls_type, - ); + /// \return A handle to the sticky error object or null. + Object Dart_GetStickyError() { + return _Dart_GetStickyError(); } - late final _Dart_ClassLibraryPtr = - _lookup>( - 'Dart_ClassLibrary'); - late final _Dart_ClassLibrary = - _Dart_ClassLibraryPtr.asFunction(); + late final _Dart_GetStickyErrorPtr = + _lookup>('Dart_GetStickyError'); + late final _Dart_GetStickyError = + _Dart_GetStickyErrorPtr.asFunction(); - /// Does this Integer fit into a 64-bit signed integer? + /// Handles the next pending message for the current isolate. /// - /// \param integer An integer. - /// \param fits Returns true if the integer fits into a 64-bit signed integer. + /// May generate an unhandled exception error. /// /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerFitsIntoInt64( - Object integer, - ffi.Pointer fits, - ) { - return _Dart_IntegerFitsIntoInt64( - integer, - fits, - ); + Object Dart_HandleMessage() { + return _Dart_HandleMessage(); } - late final _Dart_IntegerFitsIntoInt64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IntegerFitsIntoInt64'); - late final _Dart_IntegerFitsIntoInt64 = _Dart_IntegerFitsIntoInt64Ptr - .asFunction)>(); + late final _Dart_HandleMessagePtr = + _lookup>('Dart_HandleMessage'); + late final _Dart_HandleMessage = + _Dart_HandleMessagePtr.asFunction(); - /// Does this Integer fit into a 64-bit unsigned integer? - /// - /// \param integer An integer. - /// \param fits Returns true if the integer fits into a 64-bit unsigned integer. + /// Drains the microtask queue, then blocks the calling thread until the current + /// isolate recieves a message, then handles all messages. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerFitsIntoUint64( - Object integer, - ffi.Pointer fits, + /// \param timeout_millis When non-zero, the call returns after the indicated + /// number of milliseconds even if no message was received. + /// \return A valid handle if no error occurs, otherwise an error handle. + Object Dart_WaitForEvent( + int timeout_millis, ) { - return _Dart_IntegerFitsIntoUint64( - integer, - fits, + return _Dart_WaitForEvent( + timeout_millis, ); } - late final _Dart_IntegerFitsIntoUint64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer)>>('Dart_IntegerFitsIntoUint64'); - late final _Dart_IntegerFitsIntoUint64 = _Dart_IntegerFitsIntoUint64Ptr - .asFunction)>(); + late final _Dart_WaitForEventPtr = + _lookup>( + 'Dart_WaitForEvent'); + late final _Dart_WaitForEvent = + _Dart_WaitForEventPtr.asFunction(); - /// Returns an Integer with the provided value. + /// Handles any pending messages for the vm service for the current + /// isolate. /// - /// \param value The value of the integer. + /// This function may be used by an embedder at a breakpoint to avoid + /// pausing the vm service. /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewInteger( - int value, - ) { - return _Dart_NewInteger( - value, - ); + /// This function can indirectly cause the message notify callback to + /// be called. + /// + /// \return true if the vm service requests the program resume + /// execution, false otherwise + bool Dart_HandleServiceMessages() { + return _Dart_HandleServiceMessages(); } - late final _Dart_NewIntegerPtr = - _lookup>( - 'Dart_NewInteger'); - late final _Dart_NewInteger = - _Dart_NewIntegerPtr.asFunction(); + late final _Dart_HandleServiceMessagesPtr = + _lookup>( + 'Dart_HandleServiceMessages'); + late final _Dart_HandleServiceMessages = + _Dart_HandleServiceMessagesPtr.asFunction(); - /// Returns an Integer with the provided value. - /// - /// \param value The unsigned value of the integer. + /// Does the current isolate have pending service messages? /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewIntegerFromUint64( - int value, - ) { - return _Dart_NewIntegerFromUint64( - value, - ); + /// \return true if the isolate has pending service messages, false otherwise. + bool Dart_HasServiceMessages() { + return _Dart_HasServiceMessages(); } - late final _Dart_NewIntegerFromUint64Ptr = - _lookup>( - 'Dart_NewIntegerFromUint64'); - late final _Dart_NewIntegerFromUint64 = - _Dart_NewIntegerFromUint64Ptr.asFunction(); + late final _Dart_HasServiceMessagesPtr = + _lookup>( + 'Dart_HasServiceMessages'); + late final _Dart_HasServiceMessages = + _Dart_HasServiceMessagesPtr.asFunction(); - /// Returns an Integer with the provided value. + /// Processes any incoming messages for the current isolate. /// - /// \param value The value of the integer represented as a C string - /// containing a hexadecimal number. + /// This function may only be used when the embedder has not provided + /// an alternate message delivery mechanism with + /// Dart_SetMessageCallbacks. It is provided for convenience. /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewIntegerFromHexCString( - ffi.Pointer value, - ) { - return _Dart_NewIntegerFromHexCString( - value, - ); + /// This function waits for incoming messages for the current + /// isolate. As new messages arrive, they are handled using + /// Dart_HandleMessage. The routine exits when all ports to the + /// current isolate are closed. + /// + /// \return A valid handle if the run loop exited successfully. If an + /// exception or other error occurs while processing messages, an + /// error handle is returned. + Object Dart_RunLoop() { + return _Dart_RunLoop(); } - late final _Dart_NewIntegerFromHexCStringPtr = - _lookup)>>( - 'Dart_NewIntegerFromHexCString'); - late final _Dart_NewIntegerFromHexCString = _Dart_NewIntegerFromHexCStringPtr - .asFunction)>(); + late final _Dart_RunLoopPtr = + _lookup>('Dart_RunLoop'); + late final _Dart_RunLoop = _Dart_RunLoopPtr.asFunction(); - /// Gets the value of an Integer. + /// Lets the VM run message processing for the isolate. /// - /// The integer must fit into a 64-bit signed integer, otherwise an error occurs. + /// This function expects there to a current isolate and the current isolate + /// must not have an active api scope. The VM will take care of making the + /// isolate runnable (if not already), handles its message loop and will take + /// care of shutting the isolate down once it's done. /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer. + /// \param errors_are_fatal Whether uncaught errors should be fatal. + /// \param on_error_port A port to notify on uncaught errors (or ILLEGAL_PORT). + /// \param on_exit_port A port to notify on exit (or ILLEGAL_PORT). + /// \param error A non-NULL pointer which will hold an error message if the call + /// fails. The error has to be free()ed by the caller. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToInt64( - Object integer, - ffi.Pointer value, + /// \return If successfull the VM takes owernship of the isolate and takes care + /// of its message loop. If not successful the caller retains owernship of the + /// isolate. + bool Dart_RunLoopAsync( + bool errors_are_fatal, + int on_error_port, + int on_exit_port, + ffi.Pointer> error, ) { - return _Dart_IntegerToInt64( - integer, - value, + return _Dart_RunLoopAsync( + errors_are_fatal, + on_error_port, + on_exit_port, + error, ); } - late final _Dart_IntegerToInt64Ptr = _lookup< + late final _Dart_RunLoopAsyncPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IntegerToInt64'); - late final _Dart_IntegerToInt64 = _Dart_IntegerToInt64Ptr.asFunction< - Object Function(Object, ffi.Pointer)>(); + ffi.Bool Function(ffi.Bool, Dart_Port, Dart_Port, + ffi.Pointer>)>>('Dart_RunLoopAsync'); + late final _Dart_RunLoopAsync = _Dart_RunLoopAsyncPtr.asFunction< + bool Function(bool, int, int, ffi.Pointer>)>(); - /// Gets the value of an Integer. - /// - /// The integer must fit into a 64-bit unsigned integer, otherwise an - /// error occurs. - /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer. + /// Gets the main port id for the current isolate. + int Dart_GetMainPortId() { + return _Dart_GetMainPortId(); + } + + late final _Dart_GetMainPortIdPtr = + _lookup>('Dart_GetMainPortId'); + late final _Dart_GetMainPortId = + _Dart_GetMainPortIdPtr.asFunction(); + + /// Does the current isolate have live ReceivePorts? /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToUint64( - Object integer, - ffi.Pointer value, - ) { - return _Dart_IntegerToUint64( - integer, - value, - ); + /// A ReceivePort is live when it has not been closed. + bool Dart_HasLivePorts() { + return _Dart_HasLivePorts(); } - late final _Dart_IntegerToUint64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IntegerToUint64'); - late final _Dart_IntegerToUint64 = _Dart_IntegerToUint64Ptr.asFunction< - Object Function(Object, ffi.Pointer)>(); + late final _Dart_HasLivePortsPtr = + _lookup>('Dart_HasLivePorts'); + late final _Dart_HasLivePorts = + _Dart_HasLivePortsPtr.asFunction(); - /// Gets the value of an integer as a hexadecimal C string. + /// Posts a message for some isolate. The message is a serialized + /// object. /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer as a hexadecimal C - /// string. This C string is scope allocated and is only valid until - /// the next call to Dart_ExitScope. + /// Requires there to be a current isolate. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToHexCString( - Object integer, - ffi.Pointer> value, + /// \param port The destination port. + /// \param object An object from the current isolate. + /// + /// \return True if the message was posted. + bool Dart_Post( + int port_id, + Object object, ) { - return _Dart_IntegerToHexCString( - integer, - value, + return _Dart_Post( + port_id, + object, ); } - late final _Dart_IntegerToHexCStringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer>)>>('Dart_IntegerToHexCString'); - late final _Dart_IntegerToHexCString = - _Dart_IntegerToHexCStringPtr.asFunction< - Object Function(Object, ffi.Pointer>)>(); + late final _Dart_PostPtr = + _lookup>( + 'Dart_Post'); + late final _Dart_Post = + _Dart_PostPtr.asFunction(); - /// Returns a Double with the provided value. + /// Returns a new SendPort with the provided port id. /// - /// \param value A double. + /// \param port_id The destination port. /// - /// \return The Double object if no error occurs. Otherwise returns + /// \return A new SendPort if no errors occurs. Otherwise returns /// an error handle. - Object Dart_NewDouble( - double value, + Object Dart_NewSendPort( + int port_id, ) { - return _Dart_NewDouble( - value, + return _Dart_NewSendPort( + port_id, ); } - late final _Dart_NewDoublePtr = - _lookup>( - 'Dart_NewDouble'); - late final _Dart_NewDouble = - _Dart_NewDoublePtr.asFunction(); + late final _Dart_NewSendPortPtr = + _lookup>( + 'Dart_NewSendPort'); + late final _Dart_NewSendPort = + _Dart_NewSendPortPtr.asFunction(); - /// Gets the value of a Double - /// - /// \param double_obj A Double - /// \param value Returns the value of the Double. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_DoubleValue( - Object double_obj, - ffi.Pointer value, + /// Gets the SendPort id for the provided SendPort. + /// \param port A SendPort object whose id is desired. + /// \param port_id Returns the id of the SendPort. + /// \return Success if no error occurs. Otherwise returns + /// an error handle. + Object Dart_SendPortGetId( + Object port, + ffi.Pointer port_id, ) { - return _Dart_DoubleValue( - double_obj, - value, + return _Dart_SendPortGetId( + port, + port_id, ); } - late final _Dart_DoubleValuePtr = _lookup< + late final _Dart_SendPortGetIdPtr = _lookup< ffi.NativeFunction< ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_DoubleValue'); - late final _Dart_DoubleValue = _Dart_DoubleValuePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + ffi.Handle, ffi.Pointer)>>('Dart_SendPortGetId'); + late final _Dart_SendPortGetId = _Dart_SendPortGetIdPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Returns a closure of static function 'function_name' in the class 'class_name' - /// in the exported namespace of specified 'library'. + /// Enters a new scope. /// - /// \param library Library object - /// \param cls_type Type object representing a Class - /// \param function_name Name of the static function in the class + /// All new local handles will be created in this scope. Additionally, + /// some functions may return "scope allocated" memory which is only + /// valid within this scope. /// - /// \return A valid Dart instance if no error occurs during the operation. - Object Dart_GetStaticMethodClosure( - Object library1, - Object cls_type, - Object function_name, - ) { - return _Dart_GetStaticMethodClosure( - library1, - cls_type, - function_name, - ); + /// Requires there to be a current isolate. + void Dart_EnterScope() { + return _Dart_EnterScope(); } - late final _Dart_GetStaticMethodClosurePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, - ffi.Handle)>>('Dart_GetStaticMethodClosure'); - late final _Dart_GetStaticMethodClosure = _Dart_GetStaticMethodClosurePtr - .asFunction(); + late final _Dart_EnterScopePtr = + _lookup>('Dart_EnterScope'); + late final _Dart_EnterScope = + _Dart_EnterScopePtr.asFunction(); - /// Returns the True object. + /// Exits a scope. /// - /// Requires there to be a current isolate. + /// The previous scope (if any) becomes the current scope. /// - /// \return A handle to the True object. - Object Dart_True() { - return _Dart_True(); + /// Requires there to be a current isolate. + void Dart_ExitScope() { + return _Dart_ExitScope(); } - late final _Dart_TruePtr = - _lookup>('Dart_True'); - late final _Dart_True = _Dart_TruePtr.asFunction(); + late final _Dart_ExitScopePtr = + _lookup>('Dart_ExitScope'); + late final _Dart_ExitScope = _Dart_ExitScopePtr.asFunction(); - /// Returns the False object. + /// The Dart VM uses "zone allocation" for temporary structures. Zones + /// support very fast allocation of small chunks of memory. The chunks + /// cannot be deallocated individually, but instead zones support + /// deallocating all chunks in one fast operation. /// - /// Requires there to be a current isolate. + /// This function makes it possible for the embedder to allocate + /// temporary data in the VMs zone allocator. /// - /// \return A handle to the False object. - Object Dart_False() { - return _Dart_False(); + /// Zone allocation is possible: + /// 1. when inside a scope where local handles can be allocated + /// 2. when processing a message from a native port in a native port + /// handler + /// + /// All the memory allocated this way will be reclaimed either on the + /// next call to Dart_ExitScope or when the native port handler exits. + /// + /// \param size Size of the memory to allocate. + /// + /// \return A pointer to the allocated memory. NULL if allocation + /// failed. Failure might due to is no current VM zone. + ffi.Pointer Dart_ScopeAllocate( + int size, + ) { + return _Dart_ScopeAllocate( + size, + ); } - late final _Dart_FalsePtr = - _lookup>('Dart_False'); - late final _Dart_False = _Dart_FalsePtr.asFunction(); + late final _Dart_ScopeAllocatePtr = + _lookup Function(ffi.IntPtr)>>( + 'Dart_ScopeAllocate'); + late final _Dart_ScopeAllocate = + _Dart_ScopeAllocatePtr.asFunction Function(int)>(); - /// Returns a Boolean with the provided value. - /// - /// \param value true or false. + /// Returns the null object. /// - /// \return The Boolean object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewBoolean( - bool value, + /// \return A handle to the null object. + Object Dart_Null() { + return _Dart_Null(); + } + + late final _Dart_NullPtr = + _lookup>('Dart_Null'); + late final _Dart_Null = _Dart_NullPtr.asFunction(); + + /// Is this object null? + bool Dart_IsNull( + Object object, ) { - return _Dart_NewBoolean( - value, + return _Dart_IsNull( + object, ); } - late final _Dart_NewBooleanPtr = - _lookup>( - 'Dart_NewBoolean'); - late final _Dart_NewBoolean = - _Dart_NewBooleanPtr.asFunction(); + late final _Dart_IsNullPtr = + _lookup>('Dart_IsNull'); + late final _Dart_IsNull = _Dart_IsNullPtr.asFunction(); - /// Gets the value of a Boolean + /// Returns the empty string object. /// - /// \param boolean_obj A Boolean - /// \param value Returns the value of the Boolean. + /// \return A handle to the empty string object. + Object Dart_EmptyString() { + return _Dart_EmptyString(); + } + + late final _Dart_EmptyStringPtr = + _lookup>('Dart_EmptyString'); + late final _Dart_EmptyString = + _Dart_EmptyStringPtr.asFunction(); + + /// Returns types that are not classes, and which therefore cannot be looked up + /// as library members by Dart_GetType. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_BooleanValue( - Object boolean_obj, - ffi.Pointer value, + /// \return A handle to the dynamic, void or Never type. + Object Dart_TypeDynamic() { + return _Dart_TypeDynamic(); + } + + late final _Dart_TypeDynamicPtr = + _lookup>('Dart_TypeDynamic'); + late final _Dart_TypeDynamic = + _Dart_TypeDynamicPtr.asFunction(); + + Object Dart_TypeVoid() { + return _Dart_TypeVoid(); + } + + late final _Dart_TypeVoidPtr = + _lookup>('Dart_TypeVoid'); + late final _Dart_TypeVoid = _Dart_TypeVoidPtr.asFunction(); + + Object Dart_TypeNever() { + return _Dart_TypeNever(); + } + + late final _Dart_TypeNeverPtr = + _lookup>('Dart_TypeNever'); + late final _Dart_TypeNever = + _Dart_TypeNeverPtr.asFunction(); + + /// Checks if the two objects are equal. + /// + /// The result of the comparison is returned through the 'equal' + /// parameter. The return value itself is used to indicate success or + /// failure, not equality. + /// + /// May generate an unhandled exception error. + /// + /// \param obj1 An object to be compared. + /// \param obj2 An object to be compared. + /// \param equal Returns the result of the equality comparison. + /// + /// \return A valid handle if no error occurs during the comparison. + Object Dart_ObjectEquals( + Object obj1, + Object obj2, + ffi.Pointer equal, ) { - return _Dart_BooleanValue( - boolean_obj, - value, + return _Dart_ObjectEquals( + obj1, + obj2, + equal, ); } - late final _Dart_BooleanValuePtr = _lookup< + late final _Dart_ObjectEqualsPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_BooleanValue'); - late final _Dart_BooleanValue = _Dart_BooleanValuePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Pointer)>>('Dart_ObjectEquals'); + late final _Dart_ObjectEquals = _Dart_ObjectEqualsPtr.asFunction< + Object Function(Object, Object, ffi.Pointer)>(); - /// Gets the length of a String. + /// Is this object an instance of some type? /// - /// \param str A String. - /// \param length Returns the length of the String. + /// The result of the test is returned through the 'instanceof' parameter. + /// The return value itself is used to indicate success or failure. + /// + /// \param object An object. + /// \param type A type. + /// \param instanceof Return true if 'object' is an instance of type 'type'. /// /// \return A valid handle if no error occurs during the operation. - Object Dart_StringLength( - Object str, - ffi.Pointer length, + Object Dart_ObjectIsType( + Object object, + Object type, + ffi.Pointer instanceof, ) { - return _Dart_StringLength( - str, - length, + return _Dart_ObjectIsType( + object, + type, + instanceof, ); } - late final _Dart_StringLengthPtr = _lookup< + late final _Dart_ObjectIsTypePtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_StringLength'); - late final _Dart_StringLength = _Dart_StringLengthPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Pointer)>>('Dart_ObjectIsType'); + late final _Dart_ObjectIsType = _Dart_ObjectIsTypePtr.asFunction< + Object Function(Object, Object, ffi.Pointer)>(); - /// Returns a String built from the provided C string - /// (There is an implicit assumption that the C string passed in contains - /// UTF-8 encoded characters and '\0' is considered as a termination - /// character). + /// Query object type. /// - /// \param value A C String + /// \param object Some Object. /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromCString( - ffi.Pointer str, + /// \return true if Object is of the specified type. + bool Dart_IsInstance( + Object object, ) { - return _Dart_NewStringFromCString( - str, + return _Dart_IsInstance( + object, ); } - late final _Dart_NewStringFromCStringPtr = - _lookup)>>( - 'Dart_NewStringFromCString'); - late final _Dart_NewStringFromCString = _Dart_NewStringFromCStringPtr - .asFunction)>(); + late final _Dart_IsInstancePtr = + _lookup>( + 'Dart_IsInstance'); + late final _Dart_IsInstance = + _Dart_IsInstancePtr.asFunction(); - /// Returns a String built from an array of UTF-8 encoded characters. - /// - /// \param utf8_array An array of UTF-8 encoded characters. - /// \param length The length of the codepoints array. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF8( - ffi.Pointer utf8_array, - int length, + bool Dart_IsNumber( + Object object, ) { - return _Dart_NewStringFromUTF8( - utf8_array, - length, + return _Dart_IsNumber( + object, ); } - late final _Dart_NewStringFromUTF8Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF8'); - late final _Dart_NewStringFromUTF8 = _Dart_NewStringFromUTF8Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); + late final _Dart_IsNumberPtr = + _lookup>( + 'Dart_IsNumber'); + late final _Dart_IsNumber = + _Dart_IsNumberPtr.asFunction(); - /// Returns a String built from an array of UTF-16 encoded characters. - /// - /// \param utf16_array An array of UTF-16 encoded characters. - /// \param length The length of the codepoints array. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF16( - ffi.Pointer utf16_array, - int length, + bool Dart_IsInteger( + Object object, ) { - return _Dart_NewStringFromUTF16( - utf16_array, - length, + return _Dart_IsInteger( + object, ); } - late final _Dart_NewStringFromUTF16Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF16'); - late final _Dart_NewStringFromUTF16 = _Dart_NewStringFromUTF16Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); + late final _Dart_IsIntegerPtr = + _lookup>( + 'Dart_IsInteger'); + late final _Dart_IsInteger = + _Dart_IsIntegerPtr.asFunction(); - /// Returns a String built from an array of UTF-32 encoded characters. - /// - /// \param utf32_array An array of UTF-32 encoded characters. - /// \param length The length of the codepoints array. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF32( - ffi.Pointer utf32_array, - int length, + bool Dart_IsDouble( + Object object, ) { - return _Dart_NewStringFromUTF32( - utf32_array, - length, + return _Dart_IsDouble( + object, ); } - late final _Dart_NewStringFromUTF32Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF32'); - late final _Dart_NewStringFromUTF32 = _Dart_NewStringFromUTF32Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); + late final _Dart_IsDoublePtr = + _lookup>( + 'Dart_IsDouble'); + late final _Dart_IsDouble = + _Dart_IsDoublePtr.asFunction(); - /// Returns a String which references an external array of - /// Latin-1 (ISO-8859-1) encoded characters. - /// - /// \param latin1_array Array of Latin-1 encoded characters. This must not move. - /// \param length The length of the characters array. - /// \param peer An external pointer to associate with this string. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A callback to be called when this string is finalized. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalLatin1String( - ffi.Pointer latin1_array, - int length, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, + bool Dart_IsBoolean( + Object object, ) { - return _Dart_NewExternalLatin1String( - latin1_array, - length, - peer, - external_allocation_size, - callback, + return _Dart_IsBoolean( + object, ); } - late final _Dart_NewExternalLatin1StringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewExternalLatin1String'); - late final _Dart_NewExternalLatin1String = - _Dart_NewExternalLatin1StringPtr.asFunction< - Object Function(ffi.Pointer, int, ffi.Pointer, - int, Dart_HandleFinalizer)>(); + late final _Dart_IsBooleanPtr = + _lookup>( + 'Dart_IsBoolean'); + late final _Dart_IsBoolean = + _Dart_IsBooleanPtr.asFunction(); - /// Returns a String which references an external array of UTF-16 encoded - /// characters. - /// - /// \param utf16_array An array of UTF-16 encoded characters. This must not move. - /// \param length The length of the characters array. - /// \param peer An external pointer to associate with this string. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A callback to be called when this string is finalized. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalUTF16String( - ffi.Pointer utf16_array, - int length, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, + bool Dart_IsString( + Object object, ) { - return _Dart_NewExternalUTF16String( - utf16_array, - length, - peer, - external_allocation_size, - callback, + return _Dart_IsString( + object, ); } - late final _Dart_NewExternalUTF16StringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewExternalUTF16String'); - late final _Dart_NewExternalUTF16String = - _Dart_NewExternalUTF16StringPtr.asFunction< - Object Function(ffi.Pointer, int, ffi.Pointer, - int, Dart_HandleFinalizer)>(); + late final _Dart_IsStringPtr = + _lookup>( + 'Dart_IsString'); + late final _Dart_IsString = + _Dart_IsStringPtr.asFunction(); - /// Gets the C string representation of a String. - /// (It is a sequence of UTF-8 encoded values with a '\0' termination.) - /// - /// \param str A string. - /// \param cstr Returns the String represented as a C string. - /// This C string is scope allocated and is only valid until - /// the next call to Dart_ExitScope. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToCString( - Object str, - ffi.Pointer> cstr, + bool Dart_IsStringLatin1( + Object object, ) { - return _Dart_StringToCString( - str, - cstr, + return _Dart_IsStringLatin1( + object, ); } - late final _Dart_StringToCStringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer>)>>('Dart_StringToCString'); - late final _Dart_StringToCString = _Dart_StringToCStringPtr.asFunction< - Object Function(Object, ffi.Pointer>)>(); + late final _Dart_IsStringLatin1Ptr = + _lookup>( + 'Dart_IsStringLatin1'); + late final _Dart_IsStringLatin1 = + _Dart_IsStringLatin1Ptr.asFunction(); - /// Gets a UTF-8 encoded representation of a String. - /// - /// Any unpaired surrogate code points in the string will be converted as - /// replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need - /// to preserve unpaired surrogates, use the Dart_StringToUTF16 function. - /// - /// \param str A string. - /// \param utf8_array Returns the String represented as UTF-8 code - /// units. This UTF-8 array is scope allocated and is only valid - /// until the next call to Dart_ExitScope. - /// \param length Used to return the length of the array which was - /// actually used. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToUTF8( - Object str, - ffi.Pointer> utf8_array, - ffi.Pointer length, + bool Dart_IsExternalString( + Object object, ) { - return _Dart_StringToUTF8( - str, - utf8_array, - length, + return _Dart_IsExternalString( + object, ); } - late final _Dart_StringToUTF8Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer>, - ffi.Pointer)>>('Dart_StringToUTF8'); - late final _Dart_StringToUTF8 = _Dart_StringToUTF8Ptr.asFunction< - Object Function(Object, ffi.Pointer>, - ffi.Pointer)>(); + late final _Dart_IsExternalStringPtr = + _lookup>( + 'Dart_IsExternalString'); + late final _Dart_IsExternalString = + _Dart_IsExternalStringPtr.asFunction(); - /// Gets the data corresponding to the string object. This function returns - /// the data only for Latin-1 (ISO-8859-1) string objects. For all other - /// string objects it returns an error. - /// - /// \param str A string. - /// \param latin1_array An array allocated by the caller, used to return - /// the string data. - /// \param length Used to pass in the length of the provided array. - /// Used to return the length of the array which was actually used. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToLatin1( - Object str, - ffi.Pointer latin1_array, - ffi.Pointer length, + bool Dart_IsList( + Object object, ) { - return _Dart_StringToLatin1( - str, - latin1_array, - length, + return _Dart_IsList( + object, ); } - late final _Dart_StringToLatin1Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer, - ffi.Pointer)>>('Dart_StringToLatin1'); - late final _Dart_StringToLatin1 = _Dart_StringToLatin1Ptr.asFunction< - Object Function( - Object, ffi.Pointer, ffi.Pointer)>(); + late final _Dart_IsListPtr = + _lookup>('Dart_IsList'); + late final _Dart_IsList = _Dart_IsListPtr.asFunction(); - /// Gets the UTF-16 encoded representation of a string. - /// - /// \param str A string. - /// \param utf16_array An array allocated by the caller, used to return - /// the array of UTF-16 encoded characters. - /// \param length Used to pass in the length of the provided array. - /// Used to return the length of the array which was actually used. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToUTF16( - Object str, - ffi.Pointer utf16_array, - ffi.Pointer length, + bool Dart_IsMap( + Object object, ) { - return _Dart_StringToUTF16( - str, - utf16_array, - length, + return _Dart_IsMap( + object, ); } - late final _Dart_StringToUTF16Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer, - ffi.Pointer)>>('Dart_StringToUTF16'); - late final _Dart_StringToUTF16 = _Dart_StringToUTF16Ptr.asFunction< - Object Function( - Object, ffi.Pointer, ffi.Pointer)>(); + late final _Dart_IsMapPtr = + _lookup>('Dart_IsMap'); + late final _Dart_IsMap = _Dart_IsMapPtr.asFunction(); - /// Gets the storage size in bytes of a String. - /// - /// \param str A String. - /// \param length Returns the storage size in bytes of the String. - /// This is the size in bytes needed to store the String. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringStorageSize( - Object str, - ffi.Pointer size, + bool Dart_IsLibrary( + Object object, ) { - return _Dart_StringStorageSize( - str, - size, + return _Dart_IsLibrary( + object, ); } - late final _Dart_StringStorageSizePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_StringStorageSize'); - late final _Dart_StringStorageSize = _Dart_StringStorageSizePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + late final _Dart_IsLibraryPtr = + _lookup>( + 'Dart_IsLibrary'); + late final _Dart_IsLibrary = + _Dart_IsLibraryPtr.asFunction(); - /// Retrieves some properties associated with a String. - /// Properties retrieved are: - /// - character size of the string (one or two byte) - /// - length of the string - /// - peer pointer of string if it is an external string. - /// \param str A String. - /// \param char_size Returns the character size of the String. - /// \param str_len Returns the length of the String. - /// \param peer Returns the peer pointer associated with the String or 0 if - /// there is no peer pointer for it. - /// \return Success if no error occurs. Otherwise returns - /// an error handle. - Object Dart_StringGetProperties( - Object str, - ffi.Pointer char_size, - ffi.Pointer str_len, - ffi.Pointer> peer, + bool Dart_IsType( + Object handle, ) { - return _Dart_StringGetProperties( - str, - char_size, - str_len, - peer, + return _Dart_IsType( + handle, ); } - late final _Dart_StringGetPropertiesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('Dart_StringGetProperties'); - late final _Dart_StringGetProperties = - _Dart_StringGetPropertiesPtr.asFunction< - Object Function(Object, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); + late final _Dart_IsTypePtr = + _lookup>('Dart_IsType'); + late final _Dart_IsType = _Dart_IsTypePtr.asFunction(); - /// Returns a List of the desired length. - /// - /// \param length The length of the list. - /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewList( - int length, + bool Dart_IsFunction( + Object handle, ) { - return _Dart_NewList( - length, + return _Dart_IsFunction( + handle, ); } - late final _Dart_NewListPtr = - _lookup>( - 'Dart_NewList'); - late final _Dart_NewList = - _Dart_NewListPtr.asFunction(); + late final _Dart_IsFunctionPtr = + _lookup>( + 'Dart_IsFunction'); + late final _Dart_IsFunction = + _Dart_IsFunctionPtr.asFunction(); - /// TODO(bkonyi): convert this to use nullable types once NNBD is enabled. - /// /** - /// * Returns a List of the desired length with the desired legacy element type. - /// * - /// * \param element_type_id The type of elements of the list. - /// * \param length The length of the list. - /// * - /// * \return The List object if no error occurs. Otherwise returns an error - /// * handle. - /// */ - Object Dart_NewListOf( - int element_type_id, - int length, + bool Dart_IsVariable( + Object handle, ) { - return _Dart_NewListOf( - element_type_id, - length, + return _Dart_IsVariable( + handle, ); } - late final _Dart_NewListOfPtr = - _lookup>( - 'Dart_NewListOf'); - late final _Dart_NewListOf = - _Dart_NewListOfPtr.asFunction(); + late final _Dart_IsVariablePtr = + _lookup>( + 'Dart_IsVariable'); + late final _Dart_IsVariable = + _Dart_IsVariablePtr.asFunction(); - /// Returns a List of the desired length with the desired element type. - /// - /// \param element_type Handle to a nullable type object. E.g., from - /// Dart_GetType or Dart_GetNullableType. - /// - /// \param length The length of the list. - /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewListOfType( - Object element_type, - int length, + bool Dart_IsTypeVariable( + Object handle, ) { - return _Dart_NewListOfType( - element_type, - length, + return _Dart_IsTypeVariable( + handle, ); } - late final _Dart_NewListOfTypePtr = - _lookup>( - 'Dart_NewListOfType'); - late final _Dart_NewListOfType = - _Dart_NewListOfTypePtr.asFunction(); + late final _Dart_IsTypeVariablePtr = + _lookup>( + 'Dart_IsTypeVariable'); + late final _Dart_IsTypeVariable = + _Dart_IsTypeVariablePtr.asFunction(); - /// Returns a List of the desired length with the desired element type, filled - /// with the provided object. - /// - /// \param element_type Handle to a type object. E.g., from Dart_GetType. - /// - /// \param fill_object Handle to an object of type 'element_type' that will be - /// used to populate the list. This parameter can only be Dart_Null() if the - /// length of the list is 0 or 'element_type' is a nullable type. - /// - /// \param length The length of the list. - /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewListOfTypeFilled( - Object element_type, - Object fill_object, - int length, + bool Dart_IsClosure( + Object object, ) { - return _Dart_NewListOfTypeFilled( - element_type, - fill_object, - length, + return _Dart_IsClosure( + object, ); } - late final _Dart_NewListOfTypeFilledPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Handle, ffi.IntPtr)>>('Dart_NewListOfTypeFilled'); - late final _Dart_NewListOfTypeFilled = _Dart_NewListOfTypeFilledPtr - .asFunction(); + late final _Dart_IsClosurePtr = + _lookup>( + 'Dart_IsClosure'); + late final _Dart_IsClosure = + _Dart_IsClosurePtr.asFunction(); - /// Gets the length of a List. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param length Returns the length of the List. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ListLength( - Object list, - ffi.Pointer length, + bool Dart_IsTypedData( + Object object, ) { - return _Dart_ListLength( - list, - length, + return _Dart_IsTypedData( + object, ); } - late final _Dart_ListLengthPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_ListLength'); - late final _Dart_ListLength = _Dart_ListLengthPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + late final _Dart_IsTypedDataPtr = + _lookup>( + 'Dart_IsTypedData'); + late final _Dart_IsTypedData = + _Dart_IsTypedDataPtr.asFunction(); - /// Gets the Object at some index of a List. - /// - /// If the index is out of bounds, an error occurs. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param index A valid index into the List. - /// - /// \return The Object in the List at the specified index if no error - /// occurs. Otherwise returns an error handle. - Object Dart_ListGetAt( - Object list, - int index, + bool Dart_IsByteBuffer( + Object object, ) { - return _Dart_ListGetAt( - list, - index, + return _Dart_IsByteBuffer( + object, ); } - late final _Dart_ListGetAtPtr = - _lookup>( - 'Dart_ListGetAt'); - late final _Dart_ListGetAt = - _Dart_ListGetAtPtr.asFunction(); + late final _Dart_IsByteBufferPtr = + _lookup>( + 'Dart_IsByteBuffer'); + late final _Dart_IsByteBuffer = + _Dart_IsByteBufferPtr.asFunction(); - /// Gets a range of Objects from a List. - /// - /// If any of the requested index values are out of bounds, an error occurs. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param offset The offset of the first item to get. - /// \param length The number of items to get. - /// \param result A pointer to fill with the objects. - /// - /// \return Success if no error occurs during the operation. - Object Dart_ListGetRange( - Object list, - int offset, - int length, - ffi.Pointer result, + bool Dart_IsFuture( + Object object, ) { - return _Dart_ListGetRange( - list, - offset, - length, - result, + return _Dart_IsFuture( + object, ); } - late final _Dart_ListGetRangePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.IntPtr, - ffi.Pointer)>>('Dart_ListGetRange'); - late final _Dart_ListGetRange = _Dart_ListGetRangePtr.asFunction< - Object Function(Object, int, int, ffi.Pointer)>(); + late final _Dart_IsFuturePtr = + _lookup>( + 'Dart_IsFuture'); + late final _Dart_IsFuture = + _Dart_IsFuturePtr.asFunction(); - /// Sets the Object at some index of a List. - /// - /// If the index is out of bounds, an error occurs. - /// - /// May generate an unhandled exception error. + /// Gets the type of a Dart language object. /// - /// \param array A List. - /// \param index A valid index into the List. - /// \param value The Object to put in the List. + /// \param instance Some Dart object. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ListSetAt( - Object list, - int index, - Object value, + /// \return If no error occurs, the type is returned. Otherwise an + /// error handle is returned. + Object Dart_InstanceGetType( + Object instance, ) { - return _Dart_ListSetAt( - list, - index, - value, + return _Dart_InstanceGetType( + instance, ); } - late final _Dart_ListSetAtPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.IntPtr, ffi.Handle)>>('Dart_ListSetAt'); - late final _Dart_ListSetAt = - _Dart_ListSetAtPtr.asFunction(); + late final _Dart_InstanceGetTypePtr = + _lookup>( + 'Dart_InstanceGetType'); + late final _Dart_InstanceGetType = + _Dart_InstanceGetTypePtr.asFunction(); - /// May generate an unhandled exception error. - Object Dart_ListGetAsBytes( - Object list, - int offset, - ffi.Pointer native_array, - int length, + /// Returns the name for the provided class type. + /// + /// \return A valid string handle if no error occurs during the + /// operation. + Object Dart_ClassName( + Object cls_type, ) { - return _Dart_ListGetAsBytes( - list, - offset, - native_array, - length, + return _Dart_ClassName( + cls_type, ); } - late final _Dart_ListGetAsBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, - ffi.IntPtr)>>('Dart_ListGetAsBytes'); - late final _Dart_ListGetAsBytes = _Dart_ListGetAsBytesPtr.asFunction< - Object Function(Object, int, ffi.Pointer, int)>(); + late final _Dart_ClassNamePtr = + _lookup>( + 'Dart_ClassName'); + late final _Dart_ClassName = + _Dart_ClassNamePtr.asFunction(); - /// May generate an unhandled exception error. - Object Dart_ListSetAsBytes( - Object list, - int offset, - ffi.Pointer native_array, - int length, + /// Returns the name for the provided function or method. + /// + /// \return A valid string handle if no error occurs during the + /// operation. + Object Dart_FunctionName( + Object function, ) { - return _Dart_ListSetAsBytes( - list, - offset, - native_array, - length, + return _Dart_FunctionName( + function, ); } - late final _Dart_ListSetAsBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, - ffi.IntPtr)>>('Dart_ListSetAsBytes'); - late final _Dart_ListSetAsBytes = _Dart_ListSetAsBytesPtr.asFunction< - Object Function(Object, int, ffi.Pointer, int)>(); + late final _Dart_FunctionNamePtr = + _lookup>( + 'Dart_FunctionName'); + late final _Dart_FunctionName = + _Dart_FunctionNamePtr.asFunction(); - /// Gets the Object at some key of a Map. - /// - /// May generate an unhandled exception error. + /// Returns a handle to the owner of a function. /// - /// \param map A Map. - /// \param key An Object. + /// The owner of an instance method or a static method is its defining + /// class. The owner of a top-level function is its defining + /// library. The owner of the function of a non-implicit closure is the + /// function of the method or closure that defines the non-implicit + /// closure. /// - /// \return The value in the map at the specified key, null if the map does not - /// contain the key, or an error handle. - Object Dart_MapGetAt( - Object map, - Object key, + /// \return A valid handle to the owner of the function, or an error + /// handle if the argument is not a valid handle to a function. + Object Dart_FunctionOwner( + Object function, ) { - return _Dart_MapGetAt( - map, - key, + return _Dart_FunctionOwner( + function, ); } - late final _Dart_MapGetAtPtr = - _lookup>( - 'Dart_MapGetAt'); - late final _Dart_MapGetAt = - _Dart_MapGetAtPtr.asFunction(); + late final _Dart_FunctionOwnerPtr = + _lookup>( + 'Dart_FunctionOwner'); + late final _Dart_FunctionOwner = + _Dart_FunctionOwnerPtr.asFunction(); - /// Returns whether the Map contains a given key. + /// Determines whether a function handle referes to a static function + /// of method. /// - /// May generate an unhandled exception error. + /// For the purposes of the embedding API, a top-level function is + /// implicitly declared static. /// - /// \param map A Map. + /// \param function A handle to a function or method declaration. + /// \param is_static Returns whether the function or method is declared static. /// - /// \return A handle on a boolean indicating whether map contains the key. - /// Otherwise returns an error handle. - Object Dart_MapContainsKey( - Object map, - Object key, + /// \return A valid handle if no error occurs during the operation. + Object Dart_FunctionIsStatic( + Object function, + ffi.Pointer is_static, ) { - return _Dart_MapContainsKey( - map, - key, + return _Dart_FunctionIsStatic( + function, + is_static, ); } - late final _Dart_MapContainsKeyPtr = - _lookup>( - 'Dart_MapContainsKey'); - late final _Dart_MapContainsKey = - _Dart_MapContainsKeyPtr.asFunction(); + late final _Dart_FunctionIsStaticPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_FunctionIsStatic'); + late final _Dart_FunctionIsStatic = _Dart_FunctionIsStaticPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Gets the list of keys of a Map. + /// Is this object a closure resulting from a tear-off (closurized method)? /// - /// May generate an unhandled exception error. + /// Returns true for closures produced when an ordinary method is accessed + /// through a getter call. Returns false otherwise, in particular for closures + /// produced from local function declarations. /// - /// \param map A Map. + /// \param object Some Object. /// - /// \return The list of key Objects if no error occurs. Otherwise returns an - /// error handle. - Object Dart_MapKeys( - Object map, + /// \return true if Object is a tear-off. + bool Dart_IsTearOff( + Object object, ) { - return _Dart_MapKeys( - map, + return _Dart_IsTearOff( + object, ); } - late final _Dart_MapKeysPtr = - _lookup>( - 'Dart_MapKeys'); - late final _Dart_MapKeys = - _Dart_MapKeysPtr.asFunction(); + late final _Dart_IsTearOffPtr = + _lookup>( + 'Dart_IsTearOff'); + late final _Dart_IsTearOff = + _Dart_IsTearOffPtr.asFunction(); - /// Return type if this object is a TypedData object. + /// Retrieves the function of a closure. /// - /// \return kInvalid if the object is not a TypedData object or the appropriate - /// Dart_TypedData_Type. - int Dart_GetTypeOfTypedData( - Object object, + /// \return A handle to the function of the closure, or an error handle if the + /// argument is not a closure. + Object Dart_ClosureFunction( + Object closure, ) { - return _Dart_GetTypeOfTypedData( - object, + return _Dart_ClosureFunction( + closure, ); } - late final _Dart_GetTypeOfTypedDataPtr = - _lookup>( - 'Dart_GetTypeOfTypedData'); - late final _Dart_GetTypeOfTypedData = - _Dart_GetTypeOfTypedDataPtr.asFunction(); + late final _Dart_ClosureFunctionPtr = + _lookup>( + 'Dart_ClosureFunction'); + late final _Dart_ClosureFunction = + _Dart_ClosureFunctionPtr.asFunction(); - /// Return type if this object is an external TypedData object. + /// Returns a handle to the library which contains class. /// - /// \return kInvalid if the object is not an external TypedData object or - /// the appropriate Dart_TypedData_Type. - int Dart_GetTypeOfExternalTypedData( - Object object, + /// \return A valid handle to the library with owns class, null if the class + /// has no library or an error handle if the argument is not a valid handle + /// to a class type. + Object Dart_ClassLibrary( + Object cls_type, ) { - return _Dart_GetTypeOfExternalTypedData( - object, + return _Dart_ClassLibrary( + cls_type, ); } - late final _Dart_GetTypeOfExternalTypedDataPtr = - _lookup>( - 'Dart_GetTypeOfExternalTypedData'); - late final _Dart_GetTypeOfExternalTypedData = - _Dart_GetTypeOfExternalTypedDataPtr.asFunction(); + late final _Dart_ClassLibraryPtr = + _lookup>( + 'Dart_ClassLibrary'); + late final _Dart_ClassLibrary = + _Dart_ClassLibraryPtr.asFunction(); - /// Returns a TypedData object of the desired length and type. + /// Does this Integer fit into a 64-bit signed integer? /// - /// \param type The type of the TypedData object. - /// \param length The length of the TypedData object (length in type units). + /// \param integer An integer. + /// \param fits Returns true if the integer fits into a 64-bit signed integer. /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewTypedData( - int type, - int length, + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerFitsIntoInt64( + Object integer, + ffi.Pointer fits, ) { - return _Dart_NewTypedData( - type, - length, + return _Dart_IntegerFitsIntoInt64( + integer, + fits, ); } - late final _Dart_NewTypedDataPtr = - _lookup>( - 'Dart_NewTypedData'); - late final _Dart_NewTypedData = - _Dart_NewTypedDataPtr.asFunction(); + late final _Dart_IntegerFitsIntoInt64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerFitsIntoInt64'); + late final _Dart_IntegerFitsIntoInt64 = _Dart_IntegerFitsIntoInt64Ptr + .asFunction)>(); - /// Returns a TypedData object which references an external data array. + /// Does this Integer fit into a 64-bit unsigned integer? /// - /// \param type The type of the data array. - /// \param data A data array. This array must not move. - /// \param length The length of the data array (length in type units). + /// \param integer An integer. + /// \param fits Returns true if the integer fits into a 64-bit unsigned integer. /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalTypedData( - int type, - ffi.Pointer data, - int length, + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerFitsIntoUint64( + Object integer, + ffi.Pointer fits, ) { - return _Dart_NewExternalTypedData( - type, - data, - length, + return _Dart_IntegerFitsIntoUint64( + integer, + fits, ); } - late final _Dart_NewExternalTypedDataPtr = _lookup< + late final _Dart_IntegerFitsIntoUint64Ptr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Int32, ffi.Pointer, - ffi.IntPtr)>>('Dart_NewExternalTypedData'); - late final _Dart_NewExternalTypedData = _Dart_NewExternalTypedDataPtr - .asFunction, int)>(); + ffi.Handle Function(ffi.Handle, + ffi.Pointer)>>('Dart_IntegerFitsIntoUint64'); + late final _Dart_IntegerFitsIntoUint64 = _Dart_IntegerFitsIntoUint64Ptr + .asFunction)>(); - /// Returns a TypedData object which references an external data array. + /// Returns an Integer with the provided value. /// - /// \param type The type of the data array. - /// \param data A data array. This array must not move. - /// \param length The length of the data array (length in type units). - /// \param peer A pointer to a native object or NULL. This value is - /// provided to callback when it is invoked. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A function pointer that will be invoked sometime - /// after the object is garbage collected, unless the handle has been deleted. - /// A valid callback needs to be specified it cannot be NULL. + /// \param value The value of the integer. /// - /// \return The TypedData object if no error occurs. Otherwise returns + /// \return The Integer object if no error occurs. Otherwise returns /// an error handle. - Object Dart_NewExternalTypedDataWithFinalizer( - int type, - ffi.Pointer data, - int length, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, + Object Dart_NewInteger( + int value, ) { - return _Dart_NewExternalTypedDataWithFinalizer( - type, - data, - length, - peer, - external_allocation_size, - callback, + return _Dart_NewInteger( + value, ); } - late final _Dart_NewExternalTypedDataWithFinalizerPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Int32, - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewExternalTypedDataWithFinalizer'); - late final _Dart_NewExternalTypedDataWithFinalizer = - _Dart_NewExternalTypedDataWithFinalizerPtr.asFunction< - Object Function(int, ffi.Pointer, int, - ffi.Pointer, int, Dart_HandleFinalizer)>(); + late final _Dart_NewIntegerPtr = + _lookup>( + 'Dart_NewInteger'); + late final _Dart_NewInteger = + _Dart_NewIntegerPtr.asFunction(); - /// Returns a ByteBuffer object for the typed data. + /// Returns an Integer with the provided value. /// - /// \param type_data The TypedData object. + /// \param value The unsigned value of the integer. /// - /// \return The ByteBuffer object if no error occurs. Otherwise returns + /// \return The Integer object if no error occurs. Otherwise returns /// an error handle. - Object Dart_NewByteBuffer( - Object typed_data, + Object Dart_NewIntegerFromUint64( + int value, ) { - return _Dart_NewByteBuffer( - typed_data, + return _Dart_NewIntegerFromUint64( + value, ); } - late final _Dart_NewByteBufferPtr = - _lookup>( - 'Dart_NewByteBuffer'); - late final _Dart_NewByteBuffer = - _Dart_NewByteBufferPtr.asFunction(); + late final _Dart_NewIntegerFromUint64Ptr = + _lookup>( + 'Dart_NewIntegerFromUint64'); + late final _Dart_NewIntegerFromUint64 = + _Dart_NewIntegerFromUint64Ptr.asFunction(); - /// Acquires access to the internal data address of a TypedData object. - /// - /// \param object The typed data object whose internal data address is to - /// be accessed. - /// \param type The type of the object is returned here. - /// \param data The internal data address is returned here. - /// \param len Size of the typed array is returned here. - /// - /// Notes: - /// When the internal address of the object is acquired any calls to a - /// Dart API function that could potentially allocate an object or run - /// any Dart code will return an error. + /// Returns an Integer with the provided value. /// - /// Any Dart API functions for accessing the data should not be called - /// before the corresponding release. In particular, the object should - /// not be acquired again before its release. This leads to undefined - /// behavior. + /// \param value The value of the integer represented as a C string + /// containing a hexadecimal number. /// - /// \return Success if the internal data address is acquired successfully. - /// Otherwise, returns an error handle. - Object Dart_TypedDataAcquireData( - Object object, - ffi.Pointer type, - ffi.Pointer> data, - ffi.Pointer len, + /// \return The Integer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewIntegerFromHexCString( + ffi.Pointer value, ) { - return _Dart_TypedDataAcquireData( - object, - type, - data, - len, + return _Dart_NewIntegerFromHexCString( + value, ); } - late final _Dart_TypedDataAcquireDataPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('Dart_TypedDataAcquireData'); - late final _Dart_TypedDataAcquireData = - _Dart_TypedDataAcquireDataPtr.asFunction< - Object Function(Object, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); + late final _Dart_NewIntegerFromHexCStringPtr = + _lookup)>>( + 'Dart_NewIntegerFromHexCString'); + late final _Dart_NewIntegerFromHexCString = _Dart_NewIntegerFromHexCStringPtr + .asFunction)>(); - /// Releases access to the internal data address that was acquired earlier using - /// Dart_TypedDataAcquireData. + /// Gets the value of an Integer. /// - /// \param object The typed data object whose internal data address is to be - /// released. + /// The integer must fit into a 64-bit signed integer, otherwise an error occurs. /// - /// \return Success if the internal data address is released successfully. - /// Otherwise, returns an error handle. - Object Dart_TypedDataReleaseData( - Object object, + /// \param integer An Integer. + /// \param value Returns the value of the Integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerToInt64( + Object integer, + ffi.Pointer value, ) { - return _Dart_TypedDataReleaseData( - object, + return _Dart_IntegerToInt64( + integer, + value, ); } - late final _Dart_TypedDataReleaseDataPtr = - _lookup>( - 'Dart_TypedDataReleaseData'); - late final _Dart_TypedDataReleaseData = - _Dart_TypedDataReleaseDataPtr.asFunction(); + late final _Dart_IntegerToInt64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerToInt64'); + late final _Dart_IntegerToInt64 = _Dart_IntegerToInt64Ptr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Returns the TypedData object associated with the ByteBuffer object. + /// Gets the value of an Integer. /// - /// \param byte_buffer The ByteBuffer object. + /// The integer must fit into a 64-bit unsigned integer, otherwise an + /// error occurs. /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_GetDataFromByteBuffer( - Object byte_buffer, + /// \param integer An Integer. + /// \param value Returns the value of the Integer. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerToUint64( + Object integer, + ffi.Pointer value, ) { - return _Dart_GetDataFromByteBuffer( - byte_buffer, + return _Dart_IntegerToUint64( + integer, + value, ); } - late final _Dart_GetDataFromByteBufferPtr = - _lookup>( - 'Dart_GetDataFromByteBuffer'); - late final _Dart_GetDataFromByteBuffer = - _Dart_GetDataFromByteBufferPtr.asFunction(); + late final _Dart_IntegerToUint64Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IntegerToUint64'); + late final _Dart_IntegerToUint64 = _Dart_IntegerToUint64Ptr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Invokes a constructor, creating a new object. - /// - /// This function allows hidden constructors (constructors with leading - /// underscores) to be called. + /// Gets the value of an integer as a hexadecimal C string. /// - /// \param type Type of object to be constructed. - /// \param constructor_name The name of the constructor to invoke. Use - /// Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. - /// This name should not include the name of the class. - /// \param number_of_arguments Size of the arguments array. - /// \param arguments An array of arguments to the constructor. + /// \param integer An Integer. + /// \param value Returns the value of the Integer as a hexadecimal C + /// string. This C string is scope allocated and is only valid until + /// the next call to Dart_ExitScope. /// - /// \return If the constructor is called and completes successfully, - /// then the new object. If an error occurs during execution, then an - /// error handle is returned. - Object Dart_New( - Object type, - Object constructor_name, - int number_of_arguments, - ffi.Pointer arguments, + /// \return A valid handle if no error occurs during the operation. + Object Dart_IntegerToHexCString( + Object integer, + ffi.Pointer> value, ) { - return _Dart_New( - type, - constructor_name, - number_of_arguments, - arguments, + return _Dart_IntegerToHexCString( + integer, + value, ); } - late final _Dart_NewPtr = _lookup< + late final _Dart_IntegerToHexCStringPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_New'); - late final _Dart_New = _Dart_NewPtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); + ffi.Handle Function(ffi.Handle, + ffi.Pointer>)>>('Dart_IntegerToHexCString'); + late final _Dart_IntegerToHexCString = + _Dart_IntegerToHexCStringPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); - /// Allocate a new object without invoking a constructor. + /// Returns a Double with the provided value. /// - /// \param type The type of an object to be allocated. + /// \param value A double. /// - /// \return The new object. If an error occurs during execution, then an - /// error handle is returned. - Object Dart_Allocate( - Object type, + /// \return The Double object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewDouble( + double value, ) { - return _Dart_Allocate( - type, + return _Dart_NewDouble( + value, ); } - late final _Dart_AllocatePtr = - _lookup>( - 'Dart_Allocate'); - late final _Dart_Allocate = - _Dart_AllocatePtr.asFunction(); + late final _Dart_NewDoublePtr = + _lookup>( + 'Dart_NewDouble'); + late final _Dart_NewDouble = + _Dart_NewDoublePtr.asFunction(); - /// Allocate a new object without invoking a constructor, and sets specified - /// native fields. + /// Gets the value of a Double /// - /// \param type The type of an object to be allocated. - /// \param num_native_fields The number of native fields to set. - /// \param native_fields An array containing the value of native fields. + /// \param double_obj A Double + /// \param value Returns the value of the Double. /// - /// \return The new object. If an error occurs during execution, then an - /// error handle is returned. - Object Dart_AllocateWithNativeFields( - Object type, - int num_native_fields, - ffi.Pointer native_fields, + /// \return A valid handle if no error occurs during the operation. + Object Dart_DoubleValue( + Object double_obj, + ffi.Pointer value, ) { - return _Dart_AllocateWithNativeFields( - type, - num_native_fields, - native_fields, + return _Dart_DoubleValue( + double_obj, + value, ); } - late final _Dart_AllocateWithNativeFieldsPtr = _lookup< + late final _Dart_DoubleValuePtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_AllocateWithNativeFields'); - late final _Dart_AllocateWithNativeFields = _Dart_AllocateWithNativeFieldsPtr - .asFunction)>(); + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_DoubleValue'); + late final _Dart_DoubleValue = _Dart_DoubleValuePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Invokes a method or function. - /// - /// The 'target' parameter may be an object, type, or library. If - /// 'target' is an object, then this function will invoke an instance - /// method. If 'target' is a type, then this function will invoke a - /// static method. If 'target' is a library, then this function will - /// invoke a top-level function from that library. - /// NOTE: This API call cannot be used to invoke methods of a type object. - /// - /// This function ignores visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. + /// Returns a closure of static function 'function_name' in the class 'class_name' + /// in the exported namespace of specified 'library'. /// - /// \param target An object, type, or library. - /// \param name The name of the function or method to invoke. - /// \param number_of_arguments Size of the arguments array. - /// \param arguments An array of arguments to the function. + /// \param library Library object + /// \param cls_type Type object representing a Class + /// \param function_name Name of the static function in the class /// - /// \return If the function or method is called and completes - /// successfully, then the return value is returned. If an error - /// occurs during execution, then an error handle is returned. - Object Dart_Invoke( - Object target, - Object name, - int number_of_arguments, - ffi.Pointer arguments, + /// \return A valid Dart instance if no error occurs during the operation. + Object Dart_GetStaticMethodClosure( + Object library1, + Object cls_type, + Object function_name, ) { - return _Dart_Invoke( - target, - name, - number_of_arguments, - arguments, + return _Dart_GetStaticMethodClosure( + library1, + cls_type, + function_name, ); } - late final _Dart_InvokePtr = _lookup< + late final _Dart_GetStaticMethodClosurePtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_Invoke'); - late final _Dart_Invoke = _Dart_InvokePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); + ffi.Handle Function(ffi.Handle, ffi.Handle, + ffi.Handle)>>('Dart_GetStaticMethodClosure'); + late final _Dart_GetStaticMethodClosure = _Dart_GetStaticMethodClosurePtr + .asFunction(); - /// Invokes a Closure with the given arguments. + /// Returns the True object. /// - /// May generate an unhandled exception error. + /// Requires there to be a current isolate. /// - /// \return If no error occurs during execution, then the result of - /// invoking the closure is returned. If an error occurs during - /// execution, then an error handle is returned. - Object Dart_InvokeClosure( - Object closure, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_InvokeClosure( - closure, - number_of_arguments, - arguments, - ); + /// \return A handle to the True object. + Object Dart_True() { + return _Dart_True(); } - late final _Dart_InvokeClosurePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_InvokeClosure'); - late final _Dart_InvokeClosure = _Dart_InvokeClosurePtr.asFunction< - Object Function(Object, int, ffi.Pointer)>(); + late final _Dart_TruePtr = + _lookup>('Dart_True'); + late final _Dart_True = _Dart_TruePtr.asFunction(); - /// Invokes a Generative Constructor on an object that was previously - /// allocated using Dart_Allocate/Dart_AllocateWithNativeFields. - /// - /// The 'target' parameter must be an object. - /// - /// This function ignores visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. + /// Returns the False object. /// - /// \param target An object. - /// \param name The name of the constructor to invoke. - /// Use Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. - /// \param number_of_arguments Size of the arguments array. - /// \param arguments An array of arguments to the function. + /// Requires there to be a current isolate. /// - /// \return If the constructor is called and completes - /// successfully, then the object is returned. If an error - /// occurs during execution, then an error handle is returned. - Object Dart_InvokeConstructor( - Object object, - Object name, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_InvokeConstructor( - object, - name, - number_of_arguments, - arguments, - ); + /// \return A handle to the False object. + Object Dart_False() { + return _Dart_False(); } - late final _Dart_InvokeConstructorPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_InvokeConstructor'); - late final _Dart_InvokeConstructor = _Dart_InvokeConstructorPtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); + late final _Dart_FalsePtr = + _lookup>('Dart_False'); + late final _Dart_False = _Dart_FalsePtr.asFunction(); - /// Gets the value of a field. - /// - /// The 'container' parameter may be an object, type, or library. If - /// 'container' is an object, then this function will access an - /// instance field. If 'container' is a type, then this function will - /// access a static field. If 'container' is a library, then this - /// function will access a top-level variable. - /// NOTE: This API call cannot be used to access fields of a type object. - /// - /// This function ignores field visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. + /// Returns a Boolean with the provided value. /// - /// \param container An object, type, or library. - /// \param name A field name. + /// \param value true or false. /// - /// \return If no error occurs, then the value of the field is - /// returned. Otherwise an error handle is returned. - Object Dart_GetField( - Object container, - Object name, + /// \return The Boolean object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewBoolean( + bool value, ) { - return _Dart_GetField( - container, - name, + return _Dart_NewBoolean( + value, ); } - late final _Dart_GetFieldPtr = - _lookup>( - 'Dart_GetField'); - late final _Dart_GetField = - _Dart_GetFieldPtr.asFunction(); + late final _Dart_NewBooleanPtr = + _lookup>( + 'Dart_NewBoolean'); + late final _Dart_NewBoolean = + _Dart_NewBooleanPtr.asFunction(); - /// Sets the value of a field. - /// - /// The 'container' parameter may actually be an object, type, or - /// library. If 'container' is an object, then this function will - /// access an instance field. If 'container' is a type, then this - /// function will access a static field. If 'container' is a library, - /// then this function will access a top-level variable. - /// NOTE: This API call cannot be used to access fields of a type object. - /// - /// This function ignores field visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. + /// Gets the value of a Boolean /// - /// \param container An object, type, or library. - /// \param name A field name. - /// \param value The new field value. + /// \param boolean_obj A Boolean + /// \param value Returns the value of the Boolean. /// - /// \return A valid handle if no error occurs. - Object Dart_SetField( - Object container, - Object name, - Object value, + /// \return A valid handle if no error occurs during the operation. + Object Dart_BooleanValue( + Object boolean_obj, + ffi.Pointer value, ) { - return _Dart_SetField( - container, - name, + return _Dart_BooleanValue( + boolean_obj, value, ); } - late final _Dart_SetFieldPtr = _lookup< + late final _Dart_BooleanValuePtr = _lookup< ffi.NativeFunction< ffi.Handle Function( - ffi.Handle, ffi.Handle, ffi.Handle)>>('Dart_SetField'); - late final _Dart_SetField = - _Dart_SetFieldPtr.asFunction(); + ffi.Handle, ffi.Pointer)>>('Dart_BooleanValue'); + late final _Dart_BooleanValue = _Dart_BooleanValuePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Throws an exception. - /// - /// This function causes a Dart language exception to be thrown. This - /// will proceed in the standard way, walking up Dart frames until an - /// appropriate 'catch' block is found, executing 'finally' blocks, - /// etc. - /// - /// If an error handle is passed into this function, the error is - /// propagated immediately. See Dart_PropagateError for a discussion - /// of error propagation. + /// Gets the length of a String. /// - /// If successful, this function does not return. Note that this means - /// that the destructors of any stack-allocated C++ objects will not be - /// called. If there are no Dart frames on the stack, an error occurs. + /// \param str A String. + /// \param length Returns the length of the String. /// - /// \return An error handle if the exception was not thrown. - /// Otherwise the function does not return. - Object Dart_ThrowException( - Object exception, + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringLength( + Object str, + ffi.Pointer length, ) { - return _Dart_ThrowException( - exception, + return _Dart_StringLength( + str, + length, ); } - late final _Dart_ThrowExceptionPtr = - _lookup>( - 'Dart_ThrowException'); - late final _Dart_ThrowException = - _Dart_ThrowExceptionPtr.asFunction(); + late final _Dart_StringLengthPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_StringLength'); + late final _Dart_StringLength = _Dart_StringLengthPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Rethrows an exception. + /// Returns a String built from the provided C string + /// (There is an implicit assumption that the C string passed in contains + /// UTF-8 encoded characters and '\0' is considered as a termination + /// character). /// - /// Rethrows an exception, unwinding all dart frames on the stack. If - /// successful, this function does not return. Note that this means - /// that the destructors of any stack-allocated C++ objects will not be - /// called. If there are no Dart frames on the stack, an error occurs. + /// \param value A C String /// - /// \return An error handle if the exception was not thrown. - /// Otherwise the function does not return. - Object Dart_ReThrowException( - Object exception, - Object stacktrace, + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromCString( + ffi.Pointer str, ) { - return _Dart_ReThrowException( - exception, - stacktrace, + return _Dart_NewStringFromCString( + str, ); } - late final _Dart_ReThrowExceptionPtr = - _lookup>( - 'Dart_ReThrowException'); - late final _Dart_ReThrowException = - _Dart_ReThrowExceptionPtr.asFunction(); + late final _Dart_NewStringFromCStringPtr = + _lookup)>>( + 'Dart_NewStringFromCString'); + late final _Dart_NewStringFromCString = _Dart_NewStringFromCStringPtr + .asFunction)>(); - /// Gets the number of native instance fields in an object. - Object Dart_GetNativeInstanceFieldCount( - Object obj, - ffi.Pointer count, + /// Returns a String built from an array of UTF-8 encoded characters. + /// + /// \param utf8_array An array of UTF-8 encoded characters. + /// \param length The length of the codepoints array. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF8( + ffi.Pointer utf8_array, + int length, ) { - return _Dart_GetNativeInstanceFieldCount( - obj, - count, + return _Dart_NewStringFromUTF8( + utf8_array, + length, ); } - late final _Dart_GetNativeInstanceFieldCountPtr = _lookup< + late final _Dart_NewStringFromUTF8Ptr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer)>>('Dart_GetNativeInstanceFieldCount'); - late final _Dart_GetNativeInstanceFieldCount = - _Dart_GetNativeInstanceFieldCountPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + ffi.Handle Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF8'); + late final _Dart_NewStringFromUTF8 = _Dart_NewStringFromUTF8Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); - /// Gets the value of a native field. + /// Returns a String built from an array of UTF-16 encoded characters. /// - /// TODO(turnidge): Document. - Object Dart_GetNativeInstanceField( - Object obj, - int index, - ffi.Pointer value, + /// \param utf16_array An array of UTF-16 encoded characters. + /// \param length The length of the codepoints array. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF16( + ffi.Pointer utf16_array, + int length, ) { - return _Dart_GetNativeInstanceField( - obj, - index, - value, + return _Dart_NewStringFromUTF16( + utf16_array, + length, ); } - late final _Dart_GetNativeInstanceFieldPtr = _lookup< + late final _Dart_NewStringFromUTF16Ptr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeInstanceField'); - late final _Dart_GetNativeInstanceField = _Dart_GetNativeInstanceFieldPtr - .asFunction)>(); + ffi.Handle Function( + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF16'); + late final _Dart_NewStringFromUTF16 = _Dart_NewStringFromUTF16Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); - /// Sets the value of a native field. + /// Returns a String built from an array of UTF-32 encoded characters. /// - /// TODO(turnidge): Document. - Object Dart_SetNativeInstanceField( - Object obj, - int index, - int value, + /// \param utf32_array An array of UTF-32 encoded characters. + /// \param length The length of the codepoints array. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewStringFromUTF32( + ffi.Pointer utf32_array, + int length, ) { - return _Dart_SetNativeInstanceField( - obj, - index, - value, + return _Dart_NewStringFromUTF32( + utf32_array, + length, ); } - late final _Dart_SetNativeInstanceFieldPtr = _lookup< + late final _Dart_NewStringFromUTF32Ptr = _lookup< ffi.NativeFunction< ffi.Handle Function( - ffi.Handle, ffi.Int, ffi.IntPtr)>>('Dart_SetNativeInstanceField'); - late final _Dart_SetNativeInstanceField = _Dart_SetNativeInstanceFieldPtr - .asFunction(); + ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF32'); + late final _Dart_NewStringFromUTF32 = _Dart_NewStringFromUTF32Ptr.asFunction< + Object Function(ffi.Pointer, int)>(); - /// Extracts current isolate group data from the native arguments structure. - ffi.Pointer Dart_GetNativeIsolateGroupData( - Dart_NativeArguments args, + /// Returns a String which references an external array of + /// Latin-1 (ISO-8859-1) encoded characters. + /// + /// \param latin1_array Array of Latin-1 encoded characters. This must not move. + /// \param length The length of the characters array. + /// \param peer An external pointer to associate with this string. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A callback to be called when this string is finalized. + /// + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalLatin1String( + ffi.Pointer latin1_array, + int length, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, ) { - return _Dart_GetNativeIsolateGroupData( - args, + return _Dart_NewExternalLatin1String( + latin1_array, + length, + peer, + external_allocation_size, + callback, ); } - late final _Dart_GetNativeIsolateGroupDataPtr = _lookup< + late final _Dart_NewExternalLatin1StringPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - Dart_NativeArguments)>>('Dart_GetNativeIsolateGroupData'); - late final _Dart_GetNativeIsolateGroupData = - _Dart_GetNativeIsolateGroupDataPtr.asFunction< - ffi.Pointer Function(Dart_NativeArguments)>(); + ffi.Handle Function( + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewExternalLatin1String'); + late final _Dart_NewExternalLatin1String = + _Dart_NewExternalLatin1StringPtr.asFunction< + Object Function(ffi.Pointer, int, ffi.Pointer, + int, Dart_HandleFinalizer)>(); - /// Gets the native arguments based on the types passed in and populates - /// the passed arguments buffer with appropriate native values. + /// Returns a String which references an external array of UTF-16 encoded + /// characters. /// - /// \param args the Native arguments block passed into the native call. - /// \param num_arguments length of argument descriptor array and argument - /// values array passed in. - /// \param arg_descriptors an array that describes the arguments that - /// need to be retrieved. For each argument to be retrieved the descriptor - /// contains the argument number (0, 1 etc.) and the argument type - /// described using Dart_NativeArgument_Type, e.g: - /// DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kBool, 1) indicates - /// that the first argument is to be retrieved and it should be a boolean. - /// \param arg_values array into which the native arguments need to be - /// extracted into, the array is allocated by the caller (it could be - /// stack allocated to avoid the malloc/free performance overhead). + /// \param utf16_array An array of UTF-16 encoded characters. This must not move. + /// \param length The length of the characters array. + /// \param peer An external pointer to associate with this string. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A callback to be called when this string is finalized. /// - /// \return Success if all the arguments could be extracted correctly, - /// returns an error handle if there were any errors while extracting the - /// arguments (mismatched number of arguments, incorrect types, etc.). - Object Dart_GetNativeArguments( - Dart_NativeArguments args, - int num_arguments, - ffi.Pointer arg_descriptors, - ffi.Pointer arg_values, - ) { - return _Dart_GetNativeArguments( - args, - num_arguments, - arg_descriptors, - arg_values, - ); - } - - late final _Dart_GetNativeArgumentsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_NativeArguments, - ffi.Int, - ffi.Pointer, - ffi.Pointer)>>( - 'Dart_GetNativeArguments'); - late final _Dart_GetNativeArguments = _Dart_GetNativeArgumentsPtr.asFunction< - Object Function( - Dart_NativeArguments, - int, - ffi.Pointer, - ffi.Pointer)>(); - - /// Gets the native argument at some index. - Object Dart_GetNativeArgument( - Dart_NativeArguments args, - int index, + /// \return The String object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalUTF16String( + ffi.Pointer utf16_array, + int length, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, ) { - return _Dart_GetNativeArgument( - args, - index, + return _Dart_NewExternalUTF16String( + utf16_array, + length, + peer, + external_allocation_size, + callback, ); } - late final _Dart_GetNativeArgumentPtr = _lookup< + late final _Dart_NewExternalUTF16StringPtr = _lookup< ffi.NativeFunction< ffi.Handle Function( - Dart_NativeArguments, ffi.Int)>>('Dart_GetNativeArgument'); - late final _Dart_GetNativeArgument = _Dart_GetNativeArgumentPtr.asFunction< - Object Function(Dart_NativeArguments, int)>(); + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewExternalUTF16String'); + late final _Dart_NewExternalUTF16String = + _Dart_NewExternalUTF16StringPtr.asFunction< + Object Function(ffi.Pointer, int, ffi.Pointer, + int, Dart_HandleFinalizer)>(); - /// Gets the number of native arguments. - int Dart_GetNativeArgumentCount( - Dart_NativeArguments args, + /// Gets the C string representation of a String. + /// (It is a sequence of UTF-8 encoded values with a '\0' termination.) + /// + /// \param str A string. + /// \param cstr Returns the String represented as a C string. + /// This C string is scope allocated and is only valid until + /// the next call to Dart_ExitScope. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToCString( + Object str, + ffi.Pointer> cstr, ) { - return _Dart_GetNativeArgumentCount( - args, + return _Dart_StringToCString( + str, + cstr, ); } - late final _Dart_GetNativeArgumentCountPtr = - _lookup>( - 'Dart_GetNativeArgumentCount'); - late final _Dart_GetNativeArgumentCount = _Dart_GetNativeArgumentCountPtr - .asFunction(); + late final _Dart_StringToCStringPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + ffi.Pointer>)>>('Dart_StringToCString'); + late final _Dart_StringToCString = _Dart_StringToCStringPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); - /// Gets all the native fields of the native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param num_fields size of the intptr_t array 'field_values' passed in. - /// \param field_values intptr_t array in which native field values are returned. - /// \return Success if the native fields where copied in successfully. Otherwise - /// returns an error handle. On success the native field values are copied - /// into the 'field_values' array, if the argument at 'arg_index' is a - /// null object then 0 is copied as the native field values into the - /// 'field_values' array. - Object Dart_GetNativeFieldsOfArgument( - Dart_NativeArguments args, - int arg_index, - int num_fields, - ffi.Pointer field_values, + /// Gets a UTF-8 encoded representation of a String. + /// + /// Any unpaired surrogate code points in the string will be converted as + /// replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need + /// to preserve unpaired surrogates, use the Dart_StringToUTF16 function. + /// + /// \param str A string. + /// \param utf8_array Returns the String represented as UTF-8 code + /// units. This UTF-8 array is scope allocated and is only valid + /// until the next call to Dart_ExitScope. + /// \param length Used to return the length of the array which was + /// actually used. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToUTF8( + Object str, + ffi.Pointer> utf8_array, + ffi.Pointer length, ) { - return _Dart_GetNativeFieldsOfArgument( - args, - arg_index, - num_fields, - field_values, + return _Dart_StringToUTF8( + str, + utf8_array, + length, ); } - late final _Dart_GetNativeFieldsOfArgumentPtr = _lookup< + late final _Dart_StringToUTF8Ptr = _lookup< ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeFieldsOfArgument'); - late final _Dart_GetNativeFieldsOfArgument = - _Dart_GetNativeFieldsOfArgumentPtr.asFunction< - Object Function( - Dart_NativeArguments, int, int, ffi.Pointer)>(); + ffi.Handle Function(ffi.Handle, ffi.Pointer>, + ffi.Pointer)>>('Dart_StringToUTF8'); + late final _Dart_StringToUTF8 = _Dart_StringToUTF8Ptr.asFunction< + Object Function(Object, ffi.Pointer>, + ffi.Pointer)>(); - /// Gets the native field of the receiver. - Object Dart_GetNativeReceiver( - Dart_NativeArguments args, - ffi.Pointer value, + /// Gets the data corresponding to the string object. This function returns + /// the data only for Latin-1 (ISO-8859-1) string objects. For all other + /// string objects it returns an error. + /// + /// \param str A string. + /// \param latin1_array An array allocated by the caller, used to return + /// the string data. + /// \param length Used to pass in the length of the provided array. + /// Used to return the length of the array which was actually used. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToLatin1( + Object str, + ffi.Pointer latin1_array, + ffi.Pointer length, ) { - return _Dart_GetNativeReceiver( - args, - value, + return _Dart_StringToLatin1( + str, + latin1_array, + length, ); } - late final _Dart_GetNativeReceiverPtr = _lookup< + late final _Dart_StringToLatin1Ptr = _lookup< ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, - ffi.Pointer)>>('Dart_GetNativeReceiver'); - late final _Dart_GetNativeReceiver = _Dart_GetNativeReceiverPtr.asFunction< - Object Function(Dart_NativeArguments, ffi.Pointer)>(); + ffi.Handle Function(ffi.Handle, ffi.Pointer, + ffi.Pointer)>>('Dart_StringToLatin1'); + late final _Dart_StringToLatin1 = _Dart_StringToLatin1Ptr.asFunction< + Object Function( + Object, ffi.Pointer, ffi.Pointer)>(); - /// Gets a string native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param peer Returns the peer pointer if the string argument has one. - /// \return Success if the string argument has a peer, if it does not - /// have a peer then the String object is returned. Otherwise returns - /// an error handle (argument is not a String object). - Object Dart_GetNativeStringArgument( - Dart_NativeArguments args, - int arg_index, - ffi.Pointer> peer, + /// Gets the UTF-16 encoded representation of a string. + /// + /// \param str A string. + /// \param utf16_array An array allocated by the caller, used to return + /// the array of UTF-16 encoded characters. + /// \param length Used to pass in the length of the provided array. + /// Used to return the length of the array which was actually used. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringToUTF16( + Object str, + ffi.Pointer utf16_array, + ffi.Pointer length, ) { - return _Dart_GetNativeStringArgument( - args, - arg_index, - peer, + return _Dart_StringToUTF16( + str, + utf16_array, + length, ); } - late final _Dart_GetNativeStringArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer>)>>( - 'Dart_GetNativeStringArgument'); - late final _Dart_GetNativeStringArgument = - _Dart_GetNativeStringArgumentPtr.asFunction< - Object Function( - Dart_NativeArguments, int, ffi.Pointer>)>(); + late final _Dart_StringToUTF16Ptr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Pointer, + ffi.Pointer)>>('Dart_StringToUTF16'); + late final _Dart_StringToUTF16 = _Dart_StringToUTF16Ptr.asFunction< + Object Function( + Object, ffi.Pointer, ffi.Pointer)>(); - /// Gets an integer native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param value Returns the integer value if the argument is an Integer. - /// \return Success if no error occurs. Otherwise returns an error handle. - Object Dart_GetNativeIntegerArgument( - Dart_NativeArguments args, - int index, - ffi.Pointer value, + /// Gets the storage size in bytes of a String. + /// + /// \param str A String. + /// \param length Returns the storage size in bytes of the String. + /// This is the size in bytes needed to store the String. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_StringStorageSize( + Object str, + ffi.Pointer size, ) { - return _Dart_GetNativeIntegerArgument( - args, - index, - value, + return _Dart_StringStorageSize( + str, + size, ); } - late final _Dart_GetNativeIntegerArgumentPtr = _lookup< + late final _Dart_StringStorageSizePtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeIntegerArgument'); - late final _Dart_GetNativeIntegerArgument = - _Dart_GetNativeIntegerArgumentPtr.asFunction< - Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_StringStorageSize'); + late final _Dart_StringStorageSize = _Dart_StringStorageSizePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Gets a boolean native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param value Returns the boolean value if the argument is a Boolean. - /// \return Success if no error occurs. Otherwise returns an error handle. - Object Dart_GetNativeBooleanArgument( - Dart_NativeArguments args, - int index, - ffi.Pointer value, + /// Retrieves some properties associated with a String. + /// Properties retrieved are: + /// - character size of the string (one or two byte) + /// - length of the string + /// - peer pointer of string if it is an external string. + /// \param str A String. + /// \param char_size Returns the character size of the String. + /// \param str_len Returns the length of the String. + /// \param peer Returns the peer pointer associated with the String or 0 if + /// there is no peer pointer for it. + /// \return Success if no error occurs. Otherwise returns + /// an error handle. + Object Dart_StringGetProperties( + Object str, + ffi.Pointer char_size, + ffi.Pointer str_len, + ffi.Pointer> peer, ) { - return _Dart_GetNativeBooleanArgument( - args, - index, - value, + return _Dart_StringGetProperties( + str, + char_size, + str_len, + peer, ); } - late final _Dart_GetNativeBooleanArgumentPtr = _lookup< + late final _Dart_StringGetPropertiesPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeBooleanArgument'); - late final _Dart_GetNativeBooleanArgument = - _Dart_GetNativeBooleanArgumentPtr.asFunction< - Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); + ffi.Handle Function( + ffi.Handle, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('Dart_StringGetProperties'); + late final _Dart_StringGetProperties = + _Dart_StringGetPropertiesPtr.asFunction< + Object Function(Object, ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - /// Gets a double native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param value Returns the double value if the argument is a double. - /// \return Success if no error occurs. Otherwise returns an error handle. - Object Dart_GetNativeDoubleArgument( - Dart_NativeArguments args, - int index, - ffi.Pointer value, + /// Returns a List of the desired length. + /// + /// \param length The length of the list. + /// + /// \return The List object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewList( + int length, ) { - return _Dart_GetNativeDoubleArgument( - args, - index, - value, + return _Dart_NewList( + length, ); } - late final _Dart_GetNativeDoubleArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeDoubleArgument'); - late final _Dart_GetNativeDoubleArgument = - _Dart_GetNativeDoubleArgumentPtr.asFunction< - Object Function( - Dart_NativeArguments, int, ffi.Pointer)>(); + late final _Dart_NewListPtr = + _lookup>( + 'Dart_NewList'); + late final _Dart_NewList = + _Dart_NewListPtr.asFunction(); - /// Sets the return value for a native function. - /// - /// If retval is an Error handle, then error will be propagated once - /// the native functions exits. See Dart_PropagateError for a - /// discussion of how different types of errors are propagated. - void Dart_SetReturnValue( - Dart_NativeArguments args, - Object retval, + /// TODO(bkonyi): convert this to use nullable types once NNBD is enabled. + /// /** + /// * Returns a List of the desired length with the desired legacy element type. + /// * + /// * \param element_type_id The type of elements of the list. + /// * \param length The length of the list. + /// * + /// * \return The List object if no error occurs. Otherwise returns an error + /// * handle. + /// */ + Object Dart_NewListOf( + int element_type_id, + int length, ) { - return _Dart_SetReturnValue( - args, - retval, + return _Dart_NewListOf( + element_type_id, + length, ); } - late final _Dart_SetReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Handle)>>('Dart_SetReturnValue'); - late final _Dart_SetReturnValue = _Dart_SetReturnValuePtr.asFunction< - void Function(Dart_NativeArguments, Object)>(); + late final _Dart_NewListOfPtr = + _lookup>( + 'Dart_NewListOf'); + late final _Dart_NewListOf = + _Dart_NewListOfPtr.asFunction(); - void Dart_SetWeakHandleReturnValue( - Dart_NativeArguments args, - Dart_WeakPersistentHandle rval, + /// Returns a List of the desired length with the desired element type. + /// + /// \param element_type Handle to a nullable type object. E.g., from + /// Dart_GetType or Dart_GetNullableType. + /// + /// \param length The length of the list. + /// + /// \return The List object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewListOfType( + Object element_type, + int length, ) { - return _Dart_SetWeakHandleReturnValue( - args, - rval, + return _Dart_NewListOfType( + element_type, + length, ); } - late final _Dart_SetWeakHandleReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_NativeArguments, - Dart_WeakPersistentHandle)>>('Dart_SetWeakHandleReturnValue'); - late final _Dart_SetWeakHandleReturnValue = - _Dart_SetWeakHandleReturnValuePtr.asFunction< - void Function(Dart_NativeArguments, Dart_WeakPersistentHandle)>(); + late final _Dart_NewListOfTypePtr = + _lookup>( + 'Dart_NewListOfType'); + late final _Dart_NewListOfType = + _Dart_NewListOfTypePtr.asFunction(); - void Dart_SetBooleanReturnValue( - Dart_NativeArguments args, - bool retval, + /// Returns a List of the desired length with the desired element type, filled + /// with the provided object. + /// + /// \param element_type Handle to a type object. E.g., from Dart_GetType. + /// + /// \param fill_object Handle to an object of type 'element_type' that will be + /// used to populate the list. This parameter can only be Dart_Null() if the + /// length of the list is 0 or 'element_type' is a nullable type. + /// + /// \param length The length of the list. + /// + /// \return The List object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewListOfTypeFilled( + Object element_type, + Object fill_object, + int length, ) { - return _Dart_SetBooleanReturnValue( - args, - retval, + return _Dart_NewListOfTypeFilled( + element_type, + fill_object, + length, ); } - late final _Dart_SetBooleanReturnValuePtr = _lookup< + late final _Dart_NewListOfTypeFilledPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Bool)>>('Dart_SetBooleanReturnValue'); - late final _Dart_SetBooleanReturnValue = _Dart_SetBooleanReturnValuePtr - .asFunction(); + ffi.Handle Function( + ffi.Handle, ffi.Handle, ffi.IntPtr)>>('Dart_NewListOfTypeFilled'); + late final _Dart_NewListOfTypeFilled = _Dart_NewListOfTypeFilledPtr + .asFunction(); - void Dart_SetIntegerReturnValue( - Dart_NativeArguments args, - int retval, + /// Gets the length of a List. + /// + /// May generate an unhandled exception error. + /// + /// \param list A List. + /// \param length Returns the length of the List. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_ListLength( + Object list, + ffi.Pointer length, ) { - return _Dart_SetIntegerReturnValue( - args, - retval, + return _Dart_ListLength( + list, + length, ); } - late final _Dart_SetIntegerReturnValuePtr = _lookup< + late final _Dart_ListLengthPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Int64)>>('Dart_SetIntegerReturnValue'); - late final _Dart_SetIntegerReturnValue = _Dart_SetIntegerReturnValuePtr - .asFunction(); + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_ListLength'); + late final _Dart_ListLength = _Dart_ListLengthPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - void Dart_SetDoubleReturnValue( - Dart_NativeArguments args, - double retval, + /// Gets the Object at some index of a List. + /// + /// If the index is out of bounds, an error occurs. + /// + /// May generate an unhandled exception error. + /// + /// \param list A List. + /// \param index A valid index into the List. + /// + /// \return The Object in the List at the specified index if no error + /// occurs. Otherwise returns an error handle. + Object Dart_ListGetAt( + Object list, + int index, ) { - return _Dart_SetDoubleReturnValue( - args, - retval, + return _Dart_ListGetAt( + list, + index, ); } - late final _Dart_SetDoubleReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Double)>>('Dart_SetDoubleReturnValue'); - late final _Dart_SetDoubleReturnValue = _Dart_SetDoubleReturnValuePtr - .asFunction(); + late final _Dart_ListGetAtPtr = + _lookup>( + 'Dart_ListGetAt'); + late final _Dart_ListGetAt = + _Dart_ListGetAtPtr.asFunction(); - /// Sets the environment callback for the current isolate. This - /// callback is used to lookup environment values by name in the - /// current environment. This enables the embedder to supply values for - /// the const constructors bool.fromEnvironment, int.fromEnvironment - /// and String.fromEnvironment. - Object Dart_SetEnvironmentCallback( - Dart_EnvironmentCallback callback, + /// Gets a range of Objects from a List. + /// + /// If any of the requested index values are out of bounds, an error occurs. + /// + /// May generate an unhandled exception error. + /// + /// \param list A List. + /// \param offset The offset of the first item to get. + /// \param length The number of items to get. + /// \param result A pointer to fill with the objects. + /// + /// \return Success if no error occurs during the operation. + Object Dart_ListGetRange( + Object list, + int offset, + int length, + ffi.Pointer result, ) { - return _Dart_SetEnvironmentCallback( - callback, + return _Dart_ListGetRange( + list, + offset, + length, + result, ); } - late final _Dart_SetEnvironmentCallbackPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetEnvironmentCallback'); - late final _Dart_SetEnvironmentCallback = _Dart_SetEnvironmentCallbackPtr - .asFunction(); + late final _Dart_ListGetRangePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.IntPtr, + ffi.Pointer)>>('Dart_ListGetRange'); + late final _Dart_ListGetRange = _Dart_ListGetRangePtr.asFunction< + Object Function(Object, int, int, ffi.Pointer)>(); - /// Sets the callback used to resolve native functions for a library. + /// Sets the Object at some index of a List. /// - /// \param library A library. - /// \param resolver A native entry resolver. + /// If the index is out of bounds, an error occurs. /// - /// \return A valid handle if the native resolver was set successfully. - Object Dart_SetNativeResolver( - Object library1, - Dart_NativeEntryResolver resolver, - Dart_NativeEntrySymbol symbol, + /// May generate an unhandled exception error. + /// + /// \param array A List. + /// \param index A valid index into the List. + /// \param value The Object to put in the List. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_ListSetAt( + Object list, + int index, + Object value, ) { - return _Dart_SetNativeResolver( - library1, - resolver, - symbol, + return _Dart_ListSetAt( + list, + index, + value, ); } - late final _Dart_SetNativeResolverPtr = _lookup< + late final _Dart_ListSetAtPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, Dart_NativeEntryResolver, - Dart_NativeEntrySymbol)>>('Dart_SetNativeResolver'); - late final _Dart_SetNativeResolver = _Dart_SetNativeResolverPtr.asFunction< - Object Function( - Object, Dart_NativeEntryResolver, Dart_NativeEntrySymbol)>(); + ffi.Handle Function( + ffi.Handle, ffi.IntPtr, ffi.Handle)>>('Dart_ListSetAt'); + late final _Dart_ListSetAt = + _Dart_ListSetAtPtr.asFunction(); - /// Returns the callback used to resolve native functions for a library. - /// - /// \param library A library. - /// \param resolver a pointer to a Dart_NativeEntryResolver - /// - /// \return A valid handle if the library was found. - Object Dart_GetNativeResolver( - Object library1, - ffi.Pointer resolver, + /// May generate an unhandled exception error. + Object Dart_ListGetAsBytes( + Object list, + int offset, + ffi.Pointer native_array, + int length, ) { - return _Dart_GetNativeResolver( - library1, - resolver, + return _Dart_ListGetAsBytes( + list, + offset, + native_array, + length, ); } - late final _Dart_GetNativeResolverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>( - 'Dart_GetNativeResolver'); - late final _Dart_GetNativeResolver = _Dart_GetNativeResolverPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + late final _Dart_ListGetAsBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, + ffi.IntPtr)>>('Dart_ListGetAsBytes'); + late final _Dart_ListGetAsBytes = _Dart_ListGetAsBytesPtr.asFunction< + Object Function(Object, int, ffi.Pointer, int)>(); - /// Returns the callback used to resolve native function symbols for a library. - /// - /// \param library A library. - /// \param resolver a pointer to a Dart_NativeEntrySymbol. - /// - /// \return A valid handle if the library was found. - Object Dart_GetNativeSymbol( - Object library1, - ffi.Pointer resolver, + /// May generate an unhandled exception error. + Object Dart_ListSetAsBytes( + Object list, + int offset, + ffi.Pointer native_array, + int length, ) { - return _Dart_GetNativeSymbol( - library1, - resolver, + return _Dart_ListSetAsBytes( + list, + offset, + native_array, + length, ); } - late final _Dart_GetNativeSymbolPtr = _lookup< + late final _Dart_ListSetAsBytesPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer)>>('Dart_GetNativeSymbol'); - late final _Dart_GetNativeSymbol = _Dart_GetNativeSymbolPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, + ffi.IntPtr)>>('Dart_ListSetAsBytes'); + late final _Dart_ListSetAsBytes = _Dart_ListSetAsBytesPtr.asFunction< + Object Function(Object, int, ffi.Pointer, int)>(); - /// Sets the callback used to resolve FFI native functions for a library. - /// The resolved functions are expected to be a C function pointer of the - /// correct signature (as specified in the `@FfiNative()` function - /// annotation in Dart code). + /// Gets the Object at some key of a Map. /// - /// NOTE: This is an experimental feature and might change in the future. + /// May generate an unhandled exception error. /// - /// \param library A library. - /// \param resolver A native function resolver. + /// \param map A Map. + /// \param key An Object. /// - /// \return A valid handle if the native resolver was set successfully. - Object Dart_SetFfiNativeResolver( - Object library1, - Dart_FfiNativeResolver resolver, + /// \return The value in the map at the specified key, null if the map does not + /// contain the key, or an error handle. + Object Dart_MapGetAt( + Object map, + Object key, ) { - return _Dart_SetFfiNativeResolver( - library1, - resolver, + return _Dart_MapGetAt( + map, + key, ); } - late final _Dart_SetFfiNativeResolverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - Dart_FfiNativeResolver)>>('Dart_SetFfiNativeResolver'); - late final _Dart_SetFfiNativeResolver = _Dart_SetFfiNativeResolverPtr - .asFunction(); + late final _Dart_MapGetAtPtr = + _lookup>( + 'Dart_MapGetAt'); + late final _Dart_MapGetAt = + _Dart_MapGetAtPtr.asFunction(); - /// Sets library tag handler for the current isolate. This handler is - /// used to handle the various tags encountered while loading libraries - /// or scripts in the isolate. + /// Returns whether the Map contains a given key. /// - /// \param handler Handler code to be used for handling the various tags - /// encountered while loading libraries or scripts in the isolate. + /// May generate an unhandled exception error. /// - /// \return If no error occurs, the handler is set for the isolate. - /// Otherwise an error handle is returned. + /// \param map A Map. /// - /// TODO(turnidge): Document. - Object Dart_SetLibraryTagHandler( - Dart_LibraryTagHandler handler, + /// \return A handle on a boolean indicating whether map contains the key. + /// Otherwise returns an error handle. + Object Dart_MapContainsKey( + Object map, + Object key, ) { - return _Dart_SetLibraryTagHandler( - handler, + return _Dart_MapContainsKey( + map, + key, ); } - late final _Dart_SetLibraryTagHandlerPtr = - _lookup>( - 'Dart_SetLibraryTagHandler'); - late final _Dart_SetLibraryTagHandler = _Dart_SetLibraryTagHandlerPtr - .asFunction(); + late final _Dart_MapContainsKeyPtr = + _lookup>( + 'Dart_MapContainsKey'); + late final _Dart_MapContainsKey = + _Dart_MapContainsKeyPtr.asFunction(); - /// Sets the deferred load handler for the current isolate. This handler is - /// used to handle loading deferred imports in an AppJIT or AppAOT program. - Object Dart_SetDeferredLoadHandler( - Dart_DeferredLoadHandler handler, + /// Gets the list of keys of a Map. + /// + /// May generate an unhandled exception error. + /// + /// \param map A Map. + /// + /// \return The list of key Objects if no error occurs. Otherwise returns an + /// error handle. + Object Dart_MapKeys( + Object map, ) { - return _Dart_SetDeferredLoadHandler( - handler, + return _Dart_MapKeys( + map, ); } - late final _Dart_SetDeferredLoadHandlerPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetDeferredLoadHandler'); - late final _Dart_SetDeferredLoadHandler = _Dart_SetDeferredLoadHandlerPtr - .asFunction(); + late final _Dart_MapKeysPtr = + _lookup>( + 'Dart_MapKeys'); + late final _Dart_MapKeys = + _Dart_MapKeysPtr.asFunction(); - /// Notifies the VM that a deferred load completed successfully. This function - /// will eventually cause the corresponding `prefix.loadLibrary()` futures to - /// complete. + /// Return type if this object is a TypedData object. /// - /// Requires the current isolate to be the same current isolate during the - /// invocation of the Dart_DeferredLoadHandler. - Object Dart_DeferredLoadComplete( - int loading_unit_id, - ffi.Pointer snapshot_data, - ffi.Pointer snapshot_instructions, + /// \return kInvalid if the object is not a TypedData object or the appropriate + /// Dart_TypedData_Type. + int Dart_GetTypeOfTypedData( + Object object, ) { - return _Dart_DeferredLoadComplete( - loading_unit_id, - snapshot_data, - snapshot_instructions, + return _Dart_GetTypeOfTypedData( + object, ); } - late final _Dart_DeferredLoadCompletePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.IntPtr, ffi.Pointer, - ffi.Pointer)>>('Dart_DeferredLoadComplete'); - late final _Dart_DeferredLoadComplete = - _Dart_DeferredLoadCompletePtr.asFunction< - Object Function( - int, ffi.Pointer, ffi.Pointer)>(); + late final _Dart_GetTypeOfTypedDataPtr = + _lookup>( + 'Dart_GetTypeOfTypedData'); + late final _Dart_GetTypeOfTypedData = + _Dart_GetTypeOfTypedDataPtr.asFunction(); - /// Notifies the VM that a deferred load failed. This function - /// will eventually cause the corresponding `prefix.loadLibrary()` futures to - /// complete with an error. - /// - /// If `transient` is true, future invocations of `prefix.loadLibrary()` will - /// trigger new load requests. If false, futures invocation will complete with - /// the same error. + /// Return type if this object is an external TypedData object. /// - /// Requires the current isolate to be the same current isolate during the - /// invocation of the Dart_DeferredLoadHandler. - Object Dart_DeferredLoadCompleteError( - int loading_unit_id, - ffi.Pointer error_message, - bool transient, + /// \return kInvalid if the object is not an external TypedData object or + /// the appropriate Dart_TypedData_Type. + int Dart_GetTypeOfExternalTypedData( + Object object, ) { - return _Dart_DeferredLoadCompleteError( - loading_unit_id, - error_message, - transient, + return _Dart_GetTypeOfExternalTypedData( + object, ); } - late final _Dart_DeferredLoadCompleteErrorPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.IntPtr, ffi.Pointer, - ffi.Bool)>>('Dart_DeferredLoadCompleteError'); - late final _Dart_DeferredLoadCompleteError = - _Dart_DeferredLoadCompleteErrorPtr.asFunction< - Object Function(int, ffi.Pointer, bool)>(); + late final _Dart_GetTypeOfExternalTypedDataPtr = + _lookup>( + 'Dart_GetTypeOfExternalTypedData'); + late final _Dart_GetTypeOfExternalTypedData = + _Dart_GetTypeOfExternalTypedDataPtr.asFunction(); - /// Canonicalizes a url with respect to some library. - /// - /// The url is resolved with respect to the library's url and some url - /// normalizations are performed. - /// - /// This canonicalization function should be sufficient for most - /// embedders to implement the Dart_kCanonicalizeUrl tag. + /// Returns a TypedData object of the desired length and type. /// - /// \param base_url The base url relative to which the url is - /// being resolved. - /// \param url The url being resolved and canonicalized. This - /// parameter is a string handle. + /// \param type The type of the TypedData object. + /// \param length The length of the TypedData object (length in type units). /// - /// \return If no error occurs, a String object is returned. Otherwise - /// an error handle is returned. - Object Dart_DefaultCanonicalizeUrl( - Object base_url, - Object url, + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewTypedData( + int type, + int length, ) { - return _Dart_DefaultCanonicalizeUrl( - base_url, - url, + return _Dart_NewTypedData( + type, + length, ); } - late final _Dart_DefaultCanonicalizeUrlPtr = - _lookup>( - 'Dart_DefaultCanonicalizeUrl'); - late final _Dart_DefaultCanonicalizeUrl = _Dart_DefaultCanonicalizeUrlPtr - .asFunction(); + late final _Dart_NewTypedDataPtr = + _lookup>( + 'Dart_NewTypedData'); + late final _Dart_NewTypedData = + _Dart_NewTypedDataPtr.asFunction(); - /// Loads the root library for the current isolate. - /// - /// Requires there to be no current root library. + /// Returns a TypedData object which references an external data array. /// - /// \param buffer A buffer which contains a kernel binary (see - /// pkg/kernel/binary.md). Must remain valid until isolate group shutdown. - /// \param buffer_size Length of the passed in buffer. + /// \param type The type of the data array. + /// \param data A data array. This array must not move. + /// \param length The length of the data array (length in type units). /// - /// \return A handle to the root library, or an error. - Object Dart_LoadScriptFromKernel( - ffi.Pointer kernel_buffer, - int kernel_size, + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalTypedData( + int type, + ffi.Pointer data, + int length, ) { - return _Dart_LoadScriptFromKernel( - kernel_buffer, - kernel_size, + return _Dart_NewExternalTypedData( + type, + data, + length, ); } - late final _Dart_LoadScriptFromKernelPtr = _lookup< + late final _Dart_NewExternalTypedDataPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_LoadScriptFromKernel'); - late final _Dart_LoadScriptFromKernel = _Dart_LoadScriptFromKernelPtr - .asFunction, int)>(); + ffi.Handle Function(ffi.Int32, ffi.Pointer, + ffi.IntPtr)>>('Dart_NewExternalTypedData'); + late final _Dart_NewExternalTypedData = _Dart_NewExternalTypedDataPtr + .asFunction, int)>(); - /// Gets the library for the root script for the current isolate. - /// - /// If the root script has not yet been set for the current isolate, - /// this function returns Dart_Null(). This function never returns an - /// error handle. + /// Returns a TypedData object which references an external data array. /// - /// \return Returns the root Library for the current isolate or Dart_Null(). - Object Dart_RootLibrary() { - return _Dart_RootLibrary(); - } - - late final _Dart_RootLibraryPtr = - _lookup>('Dart_RootLibrary'); - late final _Dart_RootLibrary = - _Dart_RootLibraryPtr.asFunction(); - - /// Sets the root library for the current isolate. + /// \param type The type of the data array. + /// \param data A data array. This array must not move. + /// \param length The length of the data array (length in type units). + /// \param peer A pointer to a native object or NULL. This value is + /// provided to callback when it is invoked. + /// \param external_allocation_size The number of externally allocated + /// bytes for peer. Used to inform the garbage collector. + /// \param callback A function pointer that will be invoked sometime + /// after the object is garbage collected, unless the handle has been deleted. + /// A valid callback needs to be specified it cannot be NULL. /// - /// \return Returns an error handle if `library` is not a library handle. - Object Dart_SetRootLibrary( - Object library1, + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewExternalTypedDataWithFinalizer( + int type, + ffi.Pointer data, + int length, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback, ) { - return _Dart_SetRootLibrary( - library1, + return _Dart_NewExternalTypedDataWithFinalizer( + type, + data, + length, + peer, + external_allocation_size, + callback, ); } - late final _Dart_SetRootLibraryPtr = - _lookup>( - 'Dart_SetRootLibrary'); - late final _Dart_SetRootLibrary = - _Dart_SetRootLibraryPtr.asFunction(); + late final _Dart_NewExternalTypedDataWithFinalizerPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Int32, + ffi.Pointer, + ffi.IntPtr, + ffi.Pointer, + ffi.IntPtr, + Dart_HandleFinalizer)>>('Dart_NewExternalTypedDataWithFinalizer'); + late final _Dart_NewExternalTypedDataWithFinalizer = + _Dart_NewExternalTypedDataWithFinalizerPtr.asFunction< + Object Function(int, ffi.Pointer, int, + ffi.Pointer, int, Dart_HandleFinalizer)>(); - /// Lookup or instantiate a legacy type by name and type arguments from a - /// Library. + /// Returns a ByteBuffer object for the typed data. /// - /// \param library The library containing the class or interface. - /// \param class_name The class name for the type. - /// \param number_of_type_arguments Number of type arguments. - /// For non parametric types the number of type arguments would be 0. - /// \param type_arguments Pointer to an array of type arguments. - /// For non parameteric types a NULL would be passed in for this argument. + /// \param type_data The TypedData object. /// - /// \return If no error occurs, the type is returned. - /// Otherwise an error handle is returned. - Object Dart_GetType( - Object library1, - Object class_name, - int number_of_type_arguments, - ffi.Pointer type_arguments, + /// \return The ByteBuffer object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_NewByteBuffer( + Object typed_data, ) { - return _Dart_GetType( - library1, - class_name, - number_of_type_arguments, - type_arguments, + return _Dart_NewByteBuffer( + typed_data, ); } - late final _Dart_GetTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_GetType'); - late final _Dart_GetType = _Dart_GetTypePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); + late final _Dart_NewByteBufferPtr = + _lookup>( + 'Dart_NewByteBuffer'); + late final _Dart_NewByteBuffer = + _Dart_NewByteBufferPtr.asFunction(); - /// Lookup or instantiate a nullable type by name and type arguments from - /// Library. + /// Acquires access to the internal data address of a TypedData object. /// - /// \param library The library containing the class or interface. - /// \param class_name The class name for the type. - /// \param number_of_type_arguments Number of type arguments. - /// For non parametric types the number of type arguments would be 0. - /// \param type_arguments Pointer to an array of type arguments. - /// For non parameteric types a NULL would be passed in for this argument. + /// \param object The typed data object whose internal data address is to + /// be accessed. + /// \param type The type of the object is returned here. + /// \param data The internal data address is returned here. + /// \param len Size of the typed array is returned here. /// - /// \return If no error occurs, the type is returned. - /// Otherwise an error handle is returned. - Object Dart_GetNullableType( - Object library1, - Object class_name, - int number_of_type_arguments, - ffi.Pointer type_arguments, - ) { - return _Dart_GetNullableType( - library1, - class_name, - number_of_type_arguments, - type_arguments, - ); - } - - late final _Dart_GetNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_GetNullableType'); - late final _Dart_GetNullableType = _Dart_GetNullableTypePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Lookup or instantiate a non-nullable type by name and type arguments from - /// Library. + /// Notes: + /// When the internal address of the object is acquired any calls to a + /// Dart API function that could potentially allocate an object or run + /// any Dart code will return an error. /// - /// \param library The library containing the class or interface. - /// \param class_name The class name for the type. - /// \param number_of_type_arguments Number of type arguments. - /// For non parametric types the number of type arguments would be 0. - /// \param type_arguments Pointer to an array of type arguments. - /// For non parameteric types a NULL would be passed in for this argument. + /// Any Dart API functions for accessing the data should not be called + /// before the corresponding release. In particular, the object should + /// not be acquired again before its release. This leads to undefined + /// behavior. /// - /// \return If no error occurs, the type is returned. - /// Otherwise an error handle is returned. - Object Dart_GetNonNullableType( - Object library1, - Object class_name, - int number_of_type_arguments, - ffi.Pointer type_arguments, + /// \return Success if the internal data address is acquired successfully. + /// Otherwise, returns an error handle. + Object Dart_TypedDataAcquireData( + Object object, + ffi.Pointer type, + ffi.Pointer> data, + ffi.Pointer len, ) { - return _Dart_GetNonNullableType( - library1, - class_name, - number_of_type_arguments, - type_arguments, + return _Dart_TypedDataAcquireData( + object, + type, + data, + len, ); } - late final _Dart_GetNonNullableTypePtr = _lookup< + late final _Dart_TypedDataAcquireDataPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_GetNonNullableType'); - late final _Dart_GetNonNullableType = _Dart_GetNonNullableTypePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); + ffi.Handle Function( + ffi.Handle, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('Dart_TypedDataAcquireData'); + late final _Dart_TypedDataAcquireData = + _Dart_TypedDataAcquireDataPtr.asFunction< + Object Function(Object, ffi.Pointer, + ffi.Pointer>, ffi.Pointer)>(); - /// Creates a nullable version of the provided type. + /// Releases access to the internal data address that was acquired earlier using + /// Dart_TypedDataAcquireData. /// - /// \param type The type to be converted to a nullable type. + /// \param object The typed data object whose internal data address is to be + /// released. /// - /// \return If no error occurs, a nullable type is returned. - /// Otherwise an error handle is returned. - Object Dart_TypeToNullableType( - Object type, + /// \return Success if the internal data address is released successfully. + /// Otherwise, returns an error handle. + Object Dart_TypedDataReleaseData( + Object object, ) { - return _Dart_TypeToNullableType( - type, + return _Dart_TypedDataReleaseData( + object, ); } - late final _Dart_TypeToNullableTypePtr = + late final _Dart_TypedDataReleaseDataPtr = _lookup>( - 'Dart_TypeToNullableType'); - late final _Dart_TypeToNullableType = - _Dart_TypeToNullableTypePtr.asFunction(); + 'Dart_TypedDataReleaseData'); + late final _Dart_TypedDataReleaseData = + _Dart_TypedDataReleaseDataPtr.asFunction(); - /// Creates a non-nullable version of the provided type. + /// Returns the TypedData object associated with the ByteBuffer object. /// - /// \param type The type to be converted to a non-nullable type. + /// \param byte_buffer The ByteBuffer object. /// - /// \return If no error occurs, a non-nullable type is returned. - /// Otherwise an error handle is returned. - Object Dart_TypeToNonNullableType( - Object type, + /// \return The TypedData object if no error occurs. Otherwise returns + /// an error handle. + Object Dart_GetDataFromByteBuffer( + Object byte_buffer, ) { - return _Dart_TypeToNonNullableType( - type, + return _Dart_GetDataFromByteBuffer( + byte_buffer, ); } - late final _Dart_TypeToNonNullableTypePtr = + late final _Dart_GetDataFromByteBufferPtr = _lookup>( - 'Dart_TypeToNonNullableType'); - late final _Dart_TypeToNonNullableType = - _Dart_TypeToNonNullableTypePtr.asFunction(); + 'Dart_GetDataFromByteBuffer'); + late final _Dart_GetDataFromByteBuffer = + _Dart_GetDataFromByteBufferPtr.asFunction(); - /// A type's nullability. + /// Invokes a constructor, creating a new object. /// - /// \param type A Dart type. - /// \param result An out parameter containing the result of the check. True if - /// the type is of the specified nullability, false otherwise. + /// This function allows hidden constructors (constructors with leading + /// underscores) to be called. /// - /// \return Returns an error handle if type is not of type Type. - Object Dart_IsNullableType( + /// \param type Type of object to be constructed. + /// \param constructor_name The name of the constructor to invoke. Use + /// Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. + /// This name should not include the name of the class. + /// \param number_of_arguments Size of the arguments array. + /// \param arguments An array of arguments to the constructor. + /// + /// \return If the constructor is called and completes successfully, + /// then the new object. If an error occurs during execution, then an + /// error handle is returned. + Object Dart_New( Object type, - ffi.Pointer result, + Object constructor_name, + int number_of_arguments, + ffi.Pointer arguments, ) { - return _Dart_IsNullableType( + return _Dart_New( type, - result, + constructor_name, + number_of_arguments, + arguments, ); } - late final _Dart_IsNullableTypePtr = _lookup< + late final _Dart_NewPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IsNullableType'); - late final _Dart_IsNullableType = _Dart_IsNullableTypePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_New'); + late final _Dart_New = _Dart_NewPtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); - Object Dart_IsNonNullableType( + /// Allocate a new object without invoking a constructor. + /// + /// \param type The type of an object to be allocated. + /// + /// \return The new object. If an error occurs during execution, then an + /// error handle is returned. + Object Dart_Allocate( Object type, - ffi.Pointer result, ) { - return _Dart_IsNonNullableType( + return _Dart_Allocate( type, - result, ); } - late final _Dart_IsNonNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IsNonNullableType'); - late final _Dart_IsNonNullableType = _Dart_IsNonNullableTypePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + late final _Dart_AllocatePtr = + _lookup>( + 'Dart_Allocate'); + late final _Dart_Allocate = + _Dart_AllocatePtr.asFunction(); - Object Dart_IsLegacyType( + /// Allocate a new object without invoking a constructor, and sets specified + /// native fields. + /// + /// \param type The type of an object to be allocated. + /// \param num_native_fields The number of native fields to set. + /// \param native_fields An array containing the value of native fields. + /// + /// \return The new object. If an error occurs during execution, then an + /// error handle is returned. + Object Dart_AllocateWithNativeFields( Object type, - ffi.Pointer result, + int num_native_fields, + ffi.Pointer native_fields, ) { - return _Dart_IsLegacyType( + return _Dart_AllocateWithNativeFields( type, - result, + num_native_fields, + native_fields, ); } - late final _Dart_IsLegacyTypePtr = _lookup< + late final _Dart_AllocateWithNativeFieldsPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IsLegacyType'); - late final _Dart_IsLegacyType = _Dart_IsLegacyTypePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + ffi.Handle Function(ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_AllocateWithNativeFields'); + late final _Dart_AllocateWithNativeFields = _Dart_AllocateWithNativeFieldsPtr + .asFunction)>(); - /// Lookup a class or interface by name from a Library. + /// Invokes a method or function. /// - /// \param library The library containing the class or interface. - /// \param class_name The name of the class or interface. + /// The 'target' parameter may be an object, type, or library. If + /// 'target' is an object, then this function will invoke an instance + /// method. If 'target' is a type, then this function will invoke a + /// static method. If 'target' is a library, then this function will + /// invoke a top-level function from that library. + /// NOTE: This API call cannot be used to invoke methods of a type object. /// - /// \return If no error occurs, the class or interface is - /// returned. Otherwise an error handle is returned. - Object Dart_GetClass( - Object library1, - Object class_name, - ) { - return _Dart_GetClass( - library1, - class_name, - ); - } - - late final _Dart_GetClassPtr = - _lookup>( - 'Dart_GetClass'); - late final _Dart_GetClass = - _Dart_GetClassPtr.asFunction(); - - /// Returns an import path to a Library, such as "file:///test.dart" or - /// "dart:core". - Object Dart_LibraryUrl( - Object library1, + /// This function ignores visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param target An object, type, or library. + /// \param name The name of the function or method to invoke. + /// \param number_of_arguments Size of the arguments array. + /// \param arguments An array of arguments to the function. + /// + /// \return If the function or method is called and completes + /// successfully, then the return value is returned. If an error + /// occurs during execution, then an error handle is returned. + Object Dart_Invoke( + Object target, + Object name, + int number_of_arguments, + ffi.Pointer arguments, ) { - return _Dart_LibraryUrl( - library1, + return _Dart_Invoke( + target, + name, + number_of_arguments, + arguments, ); } - late final _Dart_LibraryUrlPtr = - _lookup>( - 'Dart_LibraryUrl'); - late final _Dart_LibraryUrl = - _Dart_LibraryUrlPtr.asFunction(); + late final _Dart_InvokePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_Invoke'); + late final _Dart_Invoke = _Dart_InvokePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); - /// Returns a URL from which a Library was loaded. - Object Dart_LibraryResolvedUrl( - Object library1, + /// Invokes a Closure with the given arguments. + /// + /// May generate an unhandled exception error. + /// + /// \return If no error occurs during execution, then the result of + /// invoking the closure is returned. If an error occurs during + /// execution, then an error handle is returned. + Object Dart_InvokeClosure( + Object closure, + int number_of_arguments, + ffi.Pointer arguments, ) { - return _Dart_LibraryResolvedUrl( - library1, + return _Dart_InvokeClosure( + closure, + number_of_arguments, + arguments, ); } - late final _Dart_LibraryResolvedUrlPtr = - _lookup>( - 'Dart_LibraryResolvedUrl'); - late final _Dart_LibraryResolvedUrl = - _Dart_LibraryResolvedUrlPtr.asFunction(); - - /// \return An array of libraries. - Object Dart_GetLoadedLibraries() { - return _Dart_GetLoadedLibraries(); - } - - late final _Dart_GetLoadedLibrariesPtr = - _lookup>( - 'Dart_GetLoadedLibraries'); - late final _Dart_GetLoadedLibraries = - _Dart_GetLoadedLibrariesPtr.asFunction(); + late final _Dart_InvokeClosurePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_InvokeClosure'); + late final _Dart_InvokeClosure = _Dart_InvokeClosurePtr.asFunction< + Object Function(Object, int, ffi.Pointer)>(); - Object Dart_LookupLibrary( - Object url, + /// Invokes a Generative Constructor on an object that was previously + /// allocated using Dart_Allocate/Dart_AllocateWithNativeFields. + /// + /// The 'target' parameter must be an object. + /// + /// This function ignores visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param target An object. + /// \param name The name of the constructor to invoke. + /// Use Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. + /// \param number_of_arguments Size of the arguments array. + /// \param arguments An array of arguments to the function. + /// + /// \return If the constructor is called and completes + /// successfully, then the object is returned. If an error + /// occurs during execution, then an error handle is returned. + Object Dart_InvokeConstructor( + Object object, + Object name, + int number_of_arguments, + ffi.Pointer arguments, ) { - return _Dart_LookupLibrary( - url, + return _Dart_InvokeConstructor( + object, + name, + number_of_arguments, + arguments, ); } - late final _Dart_LookupLibraryPtr = - _lookup>( - 'Dart_LookupLibrary'); - late final _Dart_LookupLibrary = - _Dart_LookupLibraryPtr.asFunction(); + late final _Dart_InvokeConstructorPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_InvokeConstructor'); + late final _Dart_InvokeConstructor = _Dart_InvokeConstructorPtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); - /// Report an loading error for the library. + /// Gets the value of a field. /// - /// \param library The library that failed to load. - /// \param error The Dart error instance containing the load error. + /// The 'container' parameter may be an object, type, or library. If + /// 'container' is an object, then this function will access an + /// instance field. If 'container' is a type, then this function will + /// access a static field. If 'container' is a library, then this + /// function will access a top-level variable. + /// NOTE: This API call cannot be used to access fields of a type object. /// - /// \return If the VM handles the error, the return value is - /// a null handle. If it doesn't handle the error, the error - /// object is returned. - Object Dart_LibraryHandleError( - Object library1, - Object error, + /// This function ignores field visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param container An object, type, or library. + /// \param name A field name. + /// + /// \return If no error occurs, then the value of the field is + /// returned. Otherwise an error handle is returned. + Object Dart_GetField( + Object container, + Object name, ) { - return _Dart_LibraryHandleError( - library1, - error, + return _Dart_GetField( + container, + name, ); } - late final _Dart_LibraryHandleErrorPtr = + late final _Dart_GetFieldPtr = _lookup>( - 'Dart_LibraryHandleError'); - late final _Dart_LibraryHandleError = - _Dart_LibraryHandleErrorPtr.asFunction(); + 'Dart_GetField'); + late final _Dart_GetField = + _Dart_GetFieldPtr.asFunction(); - /// Called by the embedder to load a partial program. Does not set the root - /// library. + /// Sets the value of a field. /// - /// \param buffer A buffer which contains a kernel binary (see - /// pkg/kernel/binary.md). Must remain valid until isolate shutdown. - /// \param buffer_size Length of the passed in buffer. + /// The 'container' parameter may actually be an object, type, or + /// library. If 'container' is an object, then this function will + /// access an instance field. If 'container' is a type, then this + /// function will access a static field. If 'container' is a library, + /// then this function will access a top-level variable. + /// NOTE: This API call cannot be used to access fields of a type object. /// - /// \return A handle to the main library of the compilation unit, or an error. - Object Dart_LoadLibraryFromKernel( - ffi.Pointer kernel_buffer, - int kernel_buffer_size, + /// This function ignores field visibility (leading underscores in names). + /// + /// May generate an unhandled exception error. + /// + /// \param container An object, type, or library. + /// \param name A field name. + /// \param value The new field value. + /// + /// \return A valid handle if no error occurs. + Object Dart_SetField( + Object container, + Object name, + Object value, ) { - return _Dart_LoadLibraryFromKernel( - kernel_buffer, - kernel_buffer_size, + return _Dart_SetField( + container, + name, + value, ); } - late final _Dart_LoadLibraryFromKernelPtr = _lookup< + late final _Dart_SetFieldPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_LoadLibraryFromKernel'); - late final _Dart_LoadLibraryFromKernel = _Dart_LoadLibraryFromKernelPtr - .asFunction, int)>(); + ffi.Handle Function( + ffi.Handle, ffi.Handle, ffi.Handle)>>('Dart_SetField'); + late final _Dart_SetField = + _Dart_SetFieldPtr.asFunction(); - /// Indicates that all outstanding load requests have been satisfied. - /// This finalizes all the new classes loaded and optionally completes - /// deferred library futures. + /// Throws an exception. /// - /// Requires there to be a current isolate. + /// This function causes a Dart language exception to be thrown. This + /// will proceed in the standard way, walking up Dart frames until an + /// appropriate 'catch' block is found, executing 'finally' blocks, + /// etc. /// - /// \param complete_futures Specify true if all deferred library - /// futures should be completed, false otherwise. + /// If an error handle is passed into this function, the error is + /// propagated immediately. See Dart_PropagateError for a discussion + /// of error propagation. /// - /// \return Success if all classes have been finalized and deferred library - /// futures are completed. Otherwise, returns an error. - Object Dart_FinalizeLoading( - bool complete_futures, + /// If successful, this function does not return. Note that this means + /// that the destructors of any stack-allocated C++ objects will not be + /// called. If there are no Dart frames on the stack, an error occurs. + /// + /// \return An error handle if the exception was not thrown. + /// Otherwise the function does not return. + Object Dart_ThrowException( + Object exception, ) { - return _Dart_FinalizeLoading( - complete_futures, + return _Dart_ThrowException( + exception, ); } - late final _Dart_FinalizeLoadingPtr = - _lookup>( - 'Dart_FinalizeLoading'); - late final _Dart_FinalizeLoading = - _Dart_FinalizeLoadingPtr.asFunction(); + late final _Dart_ThrowExceptionPtr = + _lookup>( + 'Dart_ThrowException'); + late final _Dart_ThrowException = + _Dart_ThrowExceptionPtr.asFunction(); - /// Returns the value of peer field of 'object' in 'peer'. + /// Rethrows an exception. /// - /// \param object An object. - /// \param peer An out parameter that returns the value of the peer - /// field. + /// Rethrows an exception, unwinding all dart frames on the stack. If + /// successful, this function does not return. Note that this means + /// that the destructors of any stack-allocated C++ objects will not be + /// called. If there are no Dart frames on the stack, an error occurs. /// - /// \return Returns an error if 'object' is a subtype of Null, num, or - /// bool. - Object Dart_GetPeer( - Object object, - ffi.Pointer> peer, + /// \return An error handle if the exception was not thrown. + /// Otherwise the function does not return. + Object Dart_ReThrowException( + Object exception, + Object stacktrace, ) { - return _Dart_GetPeer( - object, - peer, + return _Dart_ReThrowException( + exception, + stacktrace, ); } - late final _Dart_GetPeerPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer>)>>('Dart_GetPeer'); - late final _Dart_GetPeer = _Dart_GetPeerPtr.asFunction< - Object Function(Object, ffi.Pointer>)>(); + late final _Dart_ReThrowExceptionPtr = + _lookup>( + 'Dart_ReThrowException'); + late final _Dart_ReThrowException = + _Dart_ReThrowExceptionPtr.asFunction(); - /// Sets the value of the peer field of 'object' to the value of - /// 'peer'. - /// - /// \param object An object. - /// \param peer A value to store in the peer field. - /// - /// \return Returns an error if 'object' is a subtype of Null, num, or - /// bool. - Object Dart_SetPeer( - Object object, - ffi.Pointer peer, + /// Gets the number of native instance fields in an object. + Object Dart_GetNativeInstanceFieldCount( + Object obj, + ffi.Pointer count, ) { - return _Dart_SetPeer( - object, - peer, + return _Dart_GetNativeInstanceFieldCount( + obj, + count, ); } - late final _Dart_SetPeerPtr = _lookup< + late final _Dart_GetNativeInstanceFieldCountPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_SetPeer'); - late final _Dart_SetPeer = _Dart_SetPeerPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); + ffi.Handle Function(ffi.Handle, + ffi.Pointer)>>('Dart_GetNativeInstanceFieldCount'); + late final _Dart_GetNativeInstanceFieldCount = + _Dart_GetNativeInstanceFieldCountPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - bool Dart_IsKernelIsolate( - Dart_Isolate isolate, + /// Gets the value of a native field. + /// + /// TODO(turnidge): Document. + Object Dart_GetNativeInstanceField( + Object obj, + int index, + ffi.Pointer value, ) { - return _Dart_IsKernelIsolate( - isolate, + return _Dart_GetNativeInstanceField( + obj, + index, + value, ); } - late final _Dart_IsKernelIsolatePtr = - _lookup>( - 'Dart_IsKernelIsolate'); - late final _Dart_IsKernelIsolate = - _Dart_IsKernelIsolatePtr.asFunction(); + late final _Dart_GetNativeInstanceFieldPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeInstanceField'); + late final _Dart_GetNativeInstanceField = _Dart_GetNativeInstanceFieldPtr + .asFunction)>(); - bool Dart_KernelIsolateIsRunning() { - return _Dart_KernelIsolateIsRunning(); + /// Sets the value of a native field. + /// + /// TODO(turnidge): Document. + Object Dart_SetNativeInstanceField( + Object obj, + int index, + int value, + ) { + return _Dart_SetNativeInstanceField( + obj, + index, + value, + ); } - late final _Dart_KernelIsolateIsRunningPtr = - _lookup>( - 'Dart_KernelIsolateIsRunning'); - late final _Dart_KernelIsolateIsRunning = - _Dart_KernelIsolateIsRunningPtr.asFunction(); + late final _Dart_SetNativeInstanceFieldPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Int, ffi.IntPtr)>>('Dart_SetNativeInstanceField'); + late final _Dart_SetNativeInstanceField = _Dart_SetNativeInstanceFieldPtr + .asFunction(); - int Dart_KernelPort() { - return _Dart_KernelPort(); + /// Extracts current isolate group data from the native arguments structure. + ffi.Pointer Dart_GetNativeIsolateGroupData( + Dart_NativeArguments args, + ) { + return _Dart_GetNativeIsolateGroupData( + args, + ); } - late final _Dart_KernelPortPtr = - _lookup>('Dart_KernelPort'); - late final _Dart_KernelPort = - _Dart_KernelPortPtr.asFunction(); + late final _Dart_GetNativeIsolateGroupDataPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + Dart_NativeArguments)>>('Dart_GetNativeIsolateGroupData'); + late final _Dart_GetNativeIsolateGroupData = + _Dart_GetNativeIsolateGroupDataPtr.asFunction< + ffi.Pointer Function(Dart_NativeArguments)>(); - /// Compiles the given `script_uri` to a kernel file. - /// - /// \param platform_kernel A buffer containing the kernel of the platform (e.g. - /// `vm_platform_strong.dill`). The VM does not take ownership of this memory. - /// - /// \param platform_kernel_size The length of the platform_kernel buffer. - /// - /// \param snapshot_compile Set to `true` when the compilation is for a snapshot. - /// This is used by the frontend to determine if compilation related information - /// should be printed to console (e.g., null safety mode). - /// - /// \param verbosity Specifies the logging behavior of the kernel compilation - /// service. - /// - /// \return Returns the result of the compilation. - /// - /// On a successful compilation the returned [Dart_KernelCompilationResult] has - /// a status of [Dart_KernelCompilationStatus_Ok] and the `kernel`/`kernel_size` - /// fields are set. The caller takes ownership of the malloc()ed buffer. + /// Gets the native arguments based on the types passed in and populates + /// the passed arguments buffer with appropriate native values. /// - /// On a failed compilation the `error` might be set describing the reason for - /// the failed compilation. The caller takes ownership of the malloc()ed - /// error. + /// \param args the Native arguments block passed into the native call. + /// \param num_arguments length of argument descriptor array and argument + /// values array passed in. + /// \param arg_descriptors an array that describes the arguments that + /// need to be retrieved. For each argument to be retrieved the descriptor + /// contains the argument number (0, 1 etc.) and the argument type + /// described using Dart_NativeArgument_Type, e.g: + /// DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kBool, 1) indicates + /// that the first argument is to be retrieved and it should be a boolean. + /// \param arg_values array into which the native arguments need to be + /// extracted into, the array is allocated by the caller (it could be + /// stack allocated to avoid the malloc/free performance overhead). /// - /// Requires there to be a current isolate. - Dart_KernelCompilationResult Dart_CompileToKernel( - ffi.Pointer script_uri, - ffi.Pointer platform_kernel, - int platform_kernel_size, - bool incremental_compile, - bool snapshot_compile, - ffi.Pointer package_config, - int verbosity, + /// \return Success if all the arguments could be extracted correctly, + /// returns an error handle if there were any errors while extracting the + /// arguments (mismatched number of arguments, incorrect types, etc.). + Object Dart_GetNativeArguments( + Dart_NativeArguments args, + int num_arguments, + ffi.Pointer arg_descriptors, + ffi.Pointer arg_values, ) { - return _Dart_CompileToKernel( - script_uri, - platform_kernel, - platform_kernel_size, - incremental_compile, - snapshot_compile, - package_config, - verbosity, + return _Dart_GetNativeArguments( + args, + num_arguments, + arg_descriptors, + arg_values, ); } - late final _Dart_CompileToKernelPtr = _lookup< - ffi.NativeFunction< - Dart_KernelCompilationResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.IntPtr, - ffi.Bool, - ffi.Bool, - ffi.Pointer, - ffi.Int32)>>('Dart_CompileToKernel'); - late final _Dart_CompileToKernel = _Dart_CompileToKernelPtr.asFunction< - Dart_KernelCompilationResult Function( - ffi.Pointer, - ffi.Pointer, + late final _Dart_GetNativeArgumentsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_NativeArguments, + ffi.Int, + ffi.Pointer, + ffi.Pointer)>>( + 'Dart_GetNativeArguments'); + late final _Dart_GetNativeArguments = _Dart_GetNativeArgumentsPtr.asFunction< + Object Function( + Dart_NativeArguments, int, - bool, - bool, - ffi.Pointer, - int)>(); + ffi.Pointer, + ffi.Pointer)>(); - Dart_KernelCompilationResult Dart_KernelListDependencies() { - return _Dart_KernelListDependencies(); + /// Gets the native argument at some index. + Object Dart_GetNativeArgument( + Dart_NativeArguments args, + int index, + ) { + return _Dart_GetNativeArgument( + args, + index, + ); } - late final _Dart_KernelListDependenciesPtr = - _lookup>( - 'Dart_KernelListDependencies'); - late final _Dart_KernelListDependencies = _Dart_KernelListDependenciesPtr - .asFunction(); + late final _Dart_GetNativeArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_NativeArguments, ffi.Int)>>('Dart_GetNativeArgument'); + late final _Dart_GetNativeArgument = _Dart_GetNativeArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int)>(); - /// Sets the kernel buffer which will be used to load Dart SDK sources - /// dynamically at runtime. - /// - /// \param platform_kernel A buffer containing kernel which has sources for the - /// Dart SDK populated. Note: The VM does not take ownership of this memory. - /// - /// \param platform_kernel_size The length of the platform_kernel buffer. - void Dart_SetDartLibrarySourcesKernel( - ffi.Pointer platform_kernel, - int platform_kernel_size, + /// Gets the number of native arguments. + int Dart_GetNativeArgumentCount( + Dart_NativeArguments args, ) { - return _Dart_SetDartLibrarySourcesKernel( - platform_kernel, - platform_kernel_size, + return _Dart_GetNativeArgumentCount( + args, ); } - late final _Dart_SetDartLibrarySourcesKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_SetDartLibrarySourcesKernel'); - late final _Dart_SetDartLibrarySourcesKernel = - _Dart_SetDartLibrarySourcesKernelPtr.asFunction< - void Function(ffi.Pointer, int)>(); + late final _Dart_GetNativeArgumentCountPtr = + _lookup>( + 'Dart_GetNativeArgumentCount'); + late final _Dart_GetNativeArgumentCount = _Dart_GetNativeArgumentCountPtr + .asFunction(); - /// Detect the null safety opt-in status. - /// - /// When running from source, it is based on the opt-in status of `script_uri`. - /// When running from a kernel buffer, it is based on the mode used when - /// generating `kernel_buffer`. - /// When running from an appJIT or AOT snapshot, it is based on the mode used - /// when generating `snapshot_data`. - /// - /// \param script_uri Uri of the script that contains the source code - /// - /// \param package_config Uri of the package configuration file (either in format - /// of .packages or .dart_tool/package_config.json) for the null safety - /// detection to resolve package imports against. If this parameter is not - /// passed the package resolution of the parent isolate should be used. - /// - /// \param original_working_directory current working directory when the VM - /// process was launched, this is used to correctly resolve the path specified - /// for package_config. - /// - /// \param snapshot_data - /// - /// \param snapshot_instructions Buffers containing a snapshot of the - /// isolate or NULL if no snapshot is provided. If provided, the buffers must - /// remain valid until the isolate shuts down. - /// - /// \param kernel_buffer - /// - /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must - /// remain valid until isolate shutdown. - /// - /// \return Returns true if the null safety is opted in by the input being - /// run `script_uri`, `snapshot_data` or `kernel_buffer`. - bool Dart_DetectNullSafety( - ffi.Pointer script_uri, - ffi.Pointer package_config, - ffi.Pointer original_working_directory, - ffi.Pointer snapshot_data, - ffi.Pointer snapshot_instructions, - ffi.Pointer kernel_buffer, - int kernel_buffer_size, + /// Gets all the native fields of the native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param num_fields size of the intptr_t array 'field_values' passed in. + /// \param field_values intptr_t array in which native field values are returned. + /// \return Success if the native fields where copied in successfully. Otherwise + /// returns an error handle. On success the native field values are copied + /// into the 'field_values' array, if the argument at 'arg_index' is a + /// null object then 0 is copied as the native field values into the + /// 'field_values' array. + Object Dart_GetNativeFieldsOfArgument( + Dart_NativeArguments args, + int arg_index, + int num_fields, + ffi.Pointer field_values, ) { - return _Dart_DetectNullSafety( - script_uri, - package_config, - original_working_directory, - snapshot_data, - snapshot_instructions, - kernel_buffer, - kernel_buffer_size, + return _Dart_GetNativeFieldsOfArgument( + args, + arg_index, + num_fields, + field_values, ); } - late final _Dart_DetectNullSafetyPtr = _lookup< + late final _Dart_GetNativeFieldsOfArgumentPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.IntPtr)>>('Dart_DetectNullSafety'); - late final _Dart_DetectNullSafety = _Dart_DetectNullSafetyPtr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + ffi.Handle Function(Dart_NativeArguments, ffi.Int, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeFieldsOfArgument'); + late final _Dart_GetNativeFieldsOfArgument = + _Dart_GetNativeFieldsOfArgumentPtr.asFunction< + Object Function( + Dart_NativeArguments, int, int, ffi.Pointer)>(); - /// Returns true if isolate is the service isolate. - /// - /// \param isolate An isolate - /// - /// \return Returns true if 'isolate' is the service isolate. - bool Dart_IsServiceIsolate( - Dart_Isolate isolate, + /// Gets the native field of the receiver. + Object Dart_GetNativeReceiver( + Dart_NativeArguments args, + ffi.Pointer value, ) { - return _Dart_IsServiceIsolate( - isolate, + return _Dart_GetNativeReceiver( + args, + value, ); } - late final _Dart_IsServiceIsolatePtr = - _lookup>( - 'Dart_IsServiceIsolate'); - late final _Dart_IsServiceIsolate = - _Dart_IsServiceIsolatePtr.asFunction(); + late final _Dart_GetNativeReceiverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, + ffi.Pointer)>>('Dart_GetNativeReceiver'); + late final _Dart_GetNativeReceiver = _Dart_GetNativeReceiverPtr.asFunction< + Object Function(Dart_NativeArguments, ffi.Pointer)>(); - /// Writes the CPU profile to the timeline as a series of 'instant' events. - /// - /// Note that this is an expensive operation. - /// - /// \param main_port The main port of the Isolate whose profile samples to write. - /// \param error An optional error, must be free()ed by caller. - /// - /// \return Returns true if the profile is successfully written and false - /// otherwise. - bool Dart_WriteProfileToTimeline( - int main_port, - ffi.Pointer> error, + /// Gets a string native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param peer Returns the peer pointer if the string argument has one. + /// \return Success if the string argument has a peer, if it does not + /// have a peer then the String object is returned. Otherwise returns + /// an error handle (argument is not a String object). + Object Dart_GetNativeStringArgument( + Dart_NativeArguments args, + int arg_index, + ffi.Pointer> peer, ) { - return _Dart_WriteProfileToTimeline( - main_port, - error, + return _Dart_GetNativeStringArgument( + args, + arg_index, + peer, ); } - late final _Dart_WriteProfileToTimelinePtr = _lookup< + late final _Dart_GetNativeStringArgumentPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - Dart_Port, ffi.Pointer>)>>( - 'Dart_WriteProfileToTimeline'); - late final _Dart_WriteProfileToTimeline = _Dart_WriteProfileToTimelinePtr - .asFunction>)>(); + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer>)>>( + 'Dart_GetNativeStringArgument'); + late final _Dart_GetNativeStringArgument = + _Dart_GetNativeStringArgumentPtr.asFunction< + Object Function( + Dart_NativeArguments, int, ffi.Pointer>)>(); - /// Compiles all functions reachable from entry points and marks - /// the isolate to disallow future compilation. - /// - /// Entry points should be specified using `@pragma("vm:entry-point")` - /// annotation. - /// - /// \return An error handle if a compilation error or runtime error running const - /// constructors was encountered. - Object Dart_Precompile() { - return _Dart_Precompile(); + /// Gets an integer native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param value Returns the integer value if the argument is an Integer. + /// \return Success if no error occurs. Otherwise returns an error handle. + Object Dart_GetNativeIntegerArgument( + Dart_NativeArguments args, + int index, + ffi.Pointer value, + ) { + return _Dart_GetNativeIntegerArgument( + args, + index, + value, + ); } - late final _Dart_PrecompilePtr = - _lookup>('Dart_Precompile'); - late final _Dart_Precompile = - _Dart_PrecompilePtr.asFunction(); + late final _Dart_GetNativeIntegerArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeIntegerArgument'); + late final _Dart_GetNativeIntegerArgument = + _Dart_GetNativeIntegerArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); - Object Dart_LoadingUnitLibraryUris( - int loading_unit_id, + /// Gets a boolean native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param value Returns the boolean value if the argument is a Boolean. + /// \return Success if no error occurs. Otherwise returns an error handle. + Object Dart_GetNativeBooleanArgument( + Dart_NativeArguments args, + int index, + ffi.Pointer value, ) { - return _Dart_LoadingUnitLibraryUris( - loading_unit_id, + return _Dart_GetNativeBooleanArgument( + args, + index, + value, ); } - late final _Dart_LoadingUnitLibraryUrisPtr = - _lookup>( - 'Dart_LoadingUnitLibraryUris'); - late final _Dart_LoadingUnitLibraryUris = - _Dart_LoadingUnitLibraryUrisPtr.asFunction(); - - /// Creates a precompiled snapshot. - /// - A root library must have been loaded. - /// - Dart_Precompile must have been called. - /// - /// Outputs an assembly file defining the symbols listed in the definitions - /// above. - /// - /// The assembly should be compiled as a static or shared library and linked or - /// loaded by the embedder. Running this snapshot requires a VM compiled with - /// DART_PRECOMPILED_SNAPSHOT. The kDartVmSnapshotData and - /// kDartVmSnapshotInstructions should be passed to Dart_Initialize. The - /// kDartIsolateSnapshotData and kDartIsolateSnapshotInstructions should be - /// passed to Dart_CreateIsolateGroup. - /// - /// The callback will be invoked one or more times to provide the assembly code. - /// - /// If stripped is true, then the assembly code will not include DWARF - /// debugging sections. - /// - /// If debug_callback_data is provided, debug_callback_data will be used with - /// the callback to provide separate debugging information. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateAppAOTSnapshotAsAssembly( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, - bool stripped, - ffi.Pointer debug_callback_data, - ) { - return _Dart_CreateAppAOTSnapshotAsAssembly( - callback, - callback_data, - stripped, - debug_callback_data, - ); - } - - late final _Dart_CreateAppAOTSnapshotAsAssemblyPtr = _lookup< + late final _Dart_GetNativeBooleanArgumentPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - Dart_StreamingWriteCallback, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsAssembly'); - late final _Dart_CreateAppAOTSnapshotAsAssembly = - _Dart_CreateAppAOTSnapshotAsAssemblyPtr.asFunction< - Object Function(Dart_StreamingWriteCallback, ffi.Pointer, - bool, ffi.Pointer)>(); + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeBooleanArgument'); + late final _Dart_GetNativeBooleanArgument = + _Dart_GetNativeBooleanArgumentPtr.asFunction< + Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); - Object Dart_CreateAppAOTSnapshotAsAssemblies( - Dart_CreateLoadingUnitCallback next_callback, - ffi.Pointer next_callback_data, - bool stripped, - Dart_StreamingWriteCallback write_callback, - Dart_StreamingCloseCallback close_callback, + /// Gets a double native argument at some index. + /// \param args Native arguments structure. + /// \param arg_index Index of the desired argument in the structure above. + /// \param value Returns the double value if the argument is a double. + /// \return Success if no error occurs. Otherwise returns an error handle. + Object Dart_GetNativeDoubleArgument( + Dart_NativeArguments args, + int index, + ffi.Pointer value, ) { - return _Dart_CreateAppAOTSnapshotAsAssemblies( - next_callback, - next_callback_data, - stripped, - write_callback, - close_callback, + return _Dart_GetNativeDoubleArgument( + args, + index, + value, ); } - late final _Dart_CreateAppAOTSnapshotAsAssembliesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - ffi.Bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>>( - 'Dart_CreateAppAOTSnapshotAsAssemblies'); - late final _Dart_CreateAppAOTSnapshotAsAssemblies = - _Dart_CreateAppAOTSnapshotAsAssembliesPtr.asFunction< + late final _Dart_GetNativeDoubleArgumentPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_NativeArguments, ffi.Int, + ffi.Pointer)>>('Dart_GetNativeDoubleArgument'); + late final _Dart_GetNativeDoubleArgument = + _Dart_GetNativeDoubleArgumentPtr.asFunction< Object Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>(); + Dart_NativeArguments, int, ffi.Pointer)>(); - /// Creates a precompiled snapshot. - /// - A root library must have been loaded. - /// - Dart_Precompile must have been called. - /// - /// Outputs an ELF shared library defining the symbols - /// - _kDartVmSnapshotData - /// - _kDartVmSnapshotInstructions - /// - _kDartIsolateSnapshotData - /// - _kDartIsolateSnapshotInstructions - /// - /// The shared library should be dynamically loaded by the embedder. - /// Running this snapshot requires a VM compiled with DART_PRECOMPILED_SNAPSHOT. - /// The kDartVmSnapshotData and kDartVmSnapshotInstructions should be passed to - /// Dart_Initialize. The kDartIsolateSnapshotData and - /// kDartIsolateSnapshotInstructions should be passed to Dart_CreateIsolate. - /// - /// The callback will be invoked one or more times to provide the binary output. - /// - /// If stripped is true, then the binary output will not include DWARF - /// debugging sections. - /// - /// If debug_callback_data is provided, debug_callback_data will be used with - /// the callback to provide separate debugging information. + /// Sets the return value for a native function. /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateAppAOTSnapshotAsElf( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, - bool stripped, - ffi.Pointer debug_callback_data, + /// If retval is an Error handle, then error will be propagated once + /// the native functions exits. See Dart_PropagateError for a + /// discussion of how different types of errors are propagated. + void Dart_SetReturnValue( + Dart_NativeArguments args, + Object retval, ) { - return _Dart_CreateAppAOTSnapshotAsElf( - callback, - callback_data, - stripped, - debug_callback_data, + return _Dart_SetReturnValue( + args, + retval, ); } - late final _Dart_CreateAppAOTSnapshotAsElfPtr = _lookup< + late final _Dart_SetReturnValuePtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - Dart_StreamingWriteCallback, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsElf'); - late final _Dart_CreateAppAOTSnapshotAsElf = - _Dart_CreateAppAOTSnapshotAsElfPtr.asFunction< - Object Function(Dart_StreamingWriteCallback, ffi.Pointer, - bool, ffi.Pointer)>(); + ffi.Void Function( + Dart_NativeArguments, ffi.Handle)>>('Dart_SetReturnValue'); + late final _Dart_SetReturnValue = _Dart_SetReturnValuePtr.asFunction< + void Function(Dart_NativeArguments, Object)>(); - Object Dart_CreateAppAOTSnapshotAsElfs( - Dart_CreateLoadingUnitCallback next_callback, - ffi.Pointer next_callback_data, - bool stripped, - Dart_StreamingWriteCallback write_callback, - Dart_StreamingCloseCallback close_callback, + void Dart_SetWeakHandleReturnValue( + Dart_NativeArguments args, + Dart_WeakPersistentHandle rval, ) { - return _Dart_CreateAppAOTSnapshotAsElfs( - next_callback, - next_callback_data, - stripped, - write_callback, - close_callback, + return _Dart_SetWeakHandleReturnValue( + args, + rval, ); } - late final _Dart_CreateAppAOTSnapshotAsElfsPtr = _lookup< + late final _Dart_SetWeakHandleReturnValuePtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - ffi.Bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>>('Dart_CreateAppAOTSnapshotAsElfs'); - late final _Dart_CreateAppAOTSnapshotAsElfs = - _Dart_CreateAppAOTSnapshotAsElfsPtr.asFunction< - Object Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>(); + ffi.Void Function(Dart_NativeArguments, + Dart_WeakPersistentHandle)>>('Dart_SetWeakHandleReturnValue'); + late final _Dart_SetWeakHandleReturnValue = + _Dart_SetWeakHandleReturnValuePtr.asFunction< + void Function(Dart_NativeArguments, Dart_WeakPersistentHandle)>(); - /// Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes - /// kDartVmSnapshotData and kDartVmSnapshotInstructions. It also does - /// not strip DWARF information from the generated assembly or allow for - /// separate debug information. - Object Dart_CreateVMAOTSnapshotAsAssembly( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, + void Dart_SetBooleanReturnValue( + Dart_NativeArguments args, + bool retval, ) { - return _Dart_CreateVMAOTSnapshotAsAssembly( - callback, - callback_data, + return _Dart_SetBooleanReturnValue( + args, + retval, ); } - late final _Dart_CreateVMAOTSnapshotAsAssemblyPtr = _lookup< + late final _Dart_SetBooleanReturnValuePtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(Dart_StreamingWriteCallback, - ffi.Pointer)>>('Dart_CreateVMAOTSnapshotAsAssembly'); - late final _Dart_CreateVMAOTSnapshotAsAssembly = - _Dart_CreateVMAOTSnapshotAsAssemblyPtr.asFunction< - Object Function( - Dart_StreamingWriteCallback, ffi.Pointer)>(); + ffi.Void Function( + Dart_NativeArguments, ffi.Bool)>>('Dart_SetBooleanReturnValue'); + late final _Dart_SetBooleanReturnValue = _Dart_SetBooleanReturnValuePtr + .asFunction(); - /// Sorts the class-ids in depth first traversal order of the inheritance - /// tree. This is a costly operation, but it can make method dispatch - /// more efficient and is done before writing snapshots. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_SortClasses() { - return _Dart_SortClasses(); + void Dart_SetIntegerReturnValue( + Dart_NativeArguments args, + int retval, + ) { + return _Dart_SetIntegerReturnValue( + args, + retval, + ); } - late final _Dart_SortClassesPtr = - _lookup>('Dart_SortClasses'); - late final _Dart_SortClasses = - _Dart_SortClassesPtr.asFunction(); + late final _Dart_SetIntegerReturnValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + Dart_NativeArguments, ffi.Int64)>>('Dart_SetIntegerReturnValue'); + late final _Dart_SetIntegerReturnValue = _Dart_SetIntegerReturnValuePtr + .asFunction(); - /// Creates a snapshot that caches compiled code and type feedback for faster - /// startup and quicker warmup in a subsequent process. - /// - /// Outputs a snapshot in two pieces. The pieces should be passed to - /// Dart_CreateIsolateGroup in a VM using the same VM snapshot pieces used in the - /// current VM. The instructions piece must be loaded with read and execute - /// permissions; the data piece may be loaded as read-only. - /// - /// - Requires the VM to have not been started with --precompilation. - /// - Not supported when targeting IA32. - /// - The VM writing the snapshot and the VM reading the snapshot must be the - /// same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must - /// be targeting the same architecture, and must both be in checked mode or - /// both in unchecked mode. - /// - /// The buffers are scope allocated and are only valid until the next call to - /// Dart_ExitScope. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateAppJITSnapshotAsBlobs( - ffi.Pointer> isolate_snapshot_data_buffer, - ffi.Pointer isolate_snapshot_data_size, - ffi.Pointer> isolate_snapshot_instructions_buffer, - ffi.Pointer isolate_snapshot_instructions_size, + void Dart_SetDoubleReturnValue( + Dart_NativeArguments args, + double retval, ) { - return _Dart_CreateAppJITSnapshotAsBlobs( - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - isolate_snapshot_instructions_buffer, - isolate_snapshot_instructions_size, + return _Dart_SetDoubleReturnValue( + args, + retval, ); } - late final _Dart_CreateAppJITSnapshotAsBlobsPtr = _lookup< + late final _Dart_SetDoubleReturnValuePtr = _lookup< ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('Dart_CreateAppJITSnapshotAsBlobs'); - late final _Dart_CreateAppJITSnapshotAsBlobs = - _Dart_CreateAppJITSnapshotAsBlobsPtr.asFunction< - Object Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); + ffi.Void Function( + Dart_NativeArguments, ffi.Double)>>('Dart_SetDoubleReturnValue'); + late final _Dart_SetDoubleReturnValue = _Dart_SetDoubleReturnValuePtr + .asFunction(); - /// Like Dart_CreateAppJITSnapshotAsBlobs, but also creates a new VM snapshot. - Object Dart_CreateCoreJITSnapshotAsBlobs( - ffi.Pointer> vm_snapshot_data_buffer, - ffi.Pointer vm_snapshot_data_size, - ffi.Pointer> vm_snapshot_instructions_buffer, - ffi.Pointer vm_snapshot_instructions_size, - ffi.Pointer> isolate_snapshot_data_buffer, - ffi.Pointer isolate_snapshot_data_size, - ffi.Pointer> isolate_snapshot_instructions_buffer, - ffi.Pointer isolate_snapshot_instructions_size, + /// Sets the environment callback for the current isolate. This + /// callback is used to lookup environment values by name in the + /// current environment. This enables the embedder to supply values for + /// the const constructors bool.fromEnvironment, int.fromEnvironment + /// and String.fromEnvironment. + Object Dart_SetEnvironmentCallback( + Dart_EnvironmentCallback callback, ) { - return _Dart_CreateCoreJITSnapshotAsBlobs( - vm_snapshot_data_buffer, - vm_snapshot_data_size, - vm_snapshot_instructions_buffer, - vm_snapshot_instructions_size, - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - isolate_snapshot_instructions_buffer, - isolate_snapshot_instructions_size, + return _Dart_SetEnvironmentCallback( + callback, ); } - late final _Dart_CreateCoreJITSnapshotAsBlobsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('Dart_CreateCoreJITSnapshotAsBlobs'); - late final _Dart_CreateCoreJITSnapshotAsBlobs = - _Dart_CreateCoreJITSnapshotAsBlobsPtr.asFunction< - Object Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); + late final _Dart_SetEnvironmentCallbackPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetEnvironmentCallback'); + late final _Dart_SetEnvironmentCallback = _Dart_SetEnvironmentCallbackPtr + .asFunction(); - /// Get obfuscation map for precompiled code. + /// Sets the callback used to resolve native functions for a library. /// - /// Obfuscation map is encoded as a JSON array of pairs (original name, - /// obfuscated name). + /// \param library A library. + /// \param resolver A native entry resolver. /// - /// \return Returns an error handler if the VM was built in a mode that does not - /// support obfuscation. - Object Dart_GetObfuscationMap( - ffi.Pointer> buffer, - ffi.Pointer buffer_length, + /// \return A valid handle if the native resolver was set successfully. + Object Dart_SetNativeResolver( + Object library1, + Dart_NativeEntryResolver resolver, + Dart_NativeEntrySymbol symbol, ) { - return _Dart_GetObfuscationMap( - buffer, - buffer_length, + return _Dart_SetNativeResolver( + library1, + resolver, + symbol, ); } - late final _Dart_GetObfuscationMapPtr = _lookup< + late final _Dart_SetNativeResolverPtr = _lookup< ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer>, - ffi.Pointer)>>('Dart_GetObfuscationMap'); - late final _Dart_GetObfuscationMap = _Dart_GetObfuscationMapPtr.asFunction< + ffi.Handle Function(ffi.Handle, Dart_NativeEntryResolver, + Dart_NativeEntrySymbol)>>('Dart_SetNativeResolver'); + late final _Dart_SetNativeResolver = _Dart_SetNativeResolverPtr.asFunction< Object Function( - ffi.Pointer>, ffi.Pointer)>(); - - /// Returns whether the VM only supports running from precompiled snapshots and - /// not from any other kind of snapshot or from source (that is, the VM was - /// compiled with DART_PRECOMPILED_RUNTIME). - bool Dart_IsPrecompiledRuntime() { - return _Dart_IsPrecompiledRuntime(); - } - - late final _Dart_IsPrecompiledRuntimePtr = - _lookup>( - 'Dart_IsPrecompiledRuntime'); - late final _Dart_IsPrecompiledRuntime = - _Dart_IsPrecompiledRuntimePtr.asFunction(); + Object, Dart_NativeEntryResolver, Dart_NativeEntrySymbol)>(); - /// Print a native stack trace. Used for crash handling. + /// Returns the callback used to resolve native functions for a library. /// - /// If context is NULL, prints the current stack trace. Otherwise, context - /// should be a CONTEXT* (Windows) or ucontext_t* (POSIX) from a signal handler - /// running on the current thread. - void Dart_DumpNativeStackTrace( - ffi.Pointer context, + /// \param library A library. + /// \param resolver a pointer to a Dart_NativeEntryResolver + /// + /// \return A valid handle if the library was found. + Object Dart_GetNativeResolver( + Object library1, + ffi.Pointer resolver, ) { - return _Dart_DumpNativeStackTrace( - context, + return _Dart_GetNativeResolver( + library1, + resolver, ); } - late final _Dart_DumpNativeStackTracePtr = - _lookup)>>( - 'Dart_DumpNativeStackTrace'); - late final _Dart_DumpNativeStackTrace = _Dart_DumpNativeStackTracePtr - .asFunction)>(); - - /// Indicate that the process is about to abort, and the Dart VM should not - /// attempt to cleanup resources. - void Dart_PrepareToAbort() { - return _Dart_PrepareToAbort(); - } - - late final _Dart_PrepareToAbortPtr = - _lookup>('Dart_PrepareToAbort'); - late final _Dart_PrepareToAbort = - _Dart_PrepareToAbortPtr.asFunction(); + late final _Dart_GetNativeResolverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>( + 'Dart_GetNativeResolver'); + late final _Dart_GetNativeResolver = _Dart_GetNativeResolverPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Posts a message on some port. The message will contain the Dart_CObject - /// object graph rooted in 'message'. - /// - /// While the message is being sent the state of the graph of Dart_CObject - /// structures rooted in 'message' should not be accessed, as the message - /// generation will make temporary modifications to the data. When the message - /// has been sent the graph will be fully restored. - /// - /// If true is returned, the message was enqueued, and finalizers for external - /// typed data will eventually run, even if the receiving isolate shuts down - /// before processing the message. If false is returned, the message was not - /// enqueued and ownership of external typed data in the message remains with the - /// caller. - /// - /// This function may be called on any thread when the VM is running (that is, - /// after Dart_Initialize has returned and before Dart_Cleanup has been called). + /// Returns the callback used to resolve native function symbols for a library. /// - /// \param port_id The destination port. - /// \param message The message to send. + /// \param library A library. + /// \param resolver a pointer to a Dart_NativeEntrySymbol. /// - /// \return True if the message was posted. - bool Dart_PostCObject( - int port_id, - ffi.Pointer message, + /// \return A valid handle if the library was found. + Object Dart_GetNativeSymbol( + Object library1, + ffi.Pointer resolver, ) { - return _Dart_PostCObject( - port_id, - message, + return _Dart_GetNativeSymbol( + library1, + resolver, ); } - late final _Dart_PostCObjectPtr = _lookup< + late final _Dart_GetNativeSymbolPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - Dart_Port, ffi.Pointer)>>('Dart_PostCObject'); - late final _Dart_PostCObject = _Dart_PostCObjectPtr.asFunction< - bool Function(int, ffi.Pointer)>(); + ffi.Handle Function(ffi.Handle, + ffi.Pointer)>>('Dart_GetNativeSymbol'); + late final _Dart_GetNativeSymbol = _Dart_GetNativeSymbolPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - /// Posts a message on some port. The message will contain the integer 'message'. + /// Sets the callback used to resolve FFI native functions for a library. + /// The resolved functions are expected to be a C function pointer of the + /// correct signature (as specified in the `@FfiNative()` function + /// annotation in Dart code). /// - /// \param port_id The destination port. - /// \param message The message to send. + /// NOTE: This is an experimental feature and might change in the future. /// - /// \return True if the message was posted. - bool Dart_PostInteger( - int port_id, - int message, + /// \param library A library. + /// \param resolver A native function resolver. + /// + /// \return A valid handle if the native resolver was set successfully. + Object Dart_SetFfiNativeResolver( + Object library1, + Dart_FfiNativeResolver resolver, ) { - return _Dart_PostInteger( - port_id, - message, + return _Dart_SetFfiNativeResolver( + library1, + resolver, ); } - late final _Dart_PostIntegerPtr = - _lookup>( - 'Dart_PostInteger'); - late final _Dart_PostInteger = - _Dart_PostIntegerPtr.asFunction(); + late final _Dart_SetFfiNativeResolverPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, + Dart_FfiNativeResolver)>>('Dart_SetFfiNativeResolver'); + late final _Dart_SetFfiNativeResolver = _Dart_SetFfiNativeResolverPtr + .asFunction(); - /// Creates a new native port. When messages are received on this - /// native port, then they will be dispatched to the provided native - /// message handler. + /// Sets library tag handler for the current isolate. This handler is + /// used to handle the various tags encountered while loading libraries + /// or scripts in the isolate. /// - /// \param name The name of this port in debugging messages. - /// \param handler The C handler to run when messages arrive on the port. - /// \param handle_concurrently Is it okay to process requests on this - /// native port concurrently? + /// \param handler Handler code to be used for handling the various tags + /// encountered while loading libraries or scripts in the isolate. /// - /// \return If successful, returns the port id for the native port. In - /// case of error, returns ILLEGAL_PORT. - int Dart_NewNativePort( - ffi.Pointer name, - Dart_NativeMessageHandler handler, - bool handle_concurrently, + /// \return If no error occurs, the handler is set for the isolate. + /// Otherwise an error handle is returned. + /// + /// TODO(turnidge): Document. + Object Dart_SetLibraryTagHandler( + Dart_LibraryTagHandler handler, ) { - return _Dart_NewNativePort( - name, + return _Dart_SetLibraryTagHandler( handler, - handle_concurrently, ); } - late final _Dart_NewNativePortPtr = _lookup< - ffi.NativeFunction< - Dart_Port Function(ffi.Pointer, Dart_NativeMessageHandler, - ffi.Bool)>>('Dart_NewNativePort'); - late final _Dart_NewNativePort = _Dart_NewNativePortPtr.asFunction< - int Function(ffi.Pointer, Dart_NativeMessageHandler, bool)>(); + late final _Dart_SetLibraryTagHandlerPtr = + _lookup>( + 'Dart_SetLibraryTagHandler'); + late final _Dart_SetLibraryTagHandler = _Dart_SetLibraryTagHandlerPtr + .asFunction(); - /// Closes the native port with the given id. - /// - /// The port must have been allocated by a call to Dart_NewNativePort. - /// - /// \param native_port_id The id of the native port to close. - /// - /// \return Returns true if the port was closed successfully. - bool Dart_CloseNativePort( - int native_port_id, + /// Sets the deferred load handler for the current isolate. This handler is + /// used to handle loading deferred imports in an AppJIT or AppAOT program. + Object Dart_SetDeferredLoadHandler( + Dart_DeferredLoadHandler handler, ) { - return _Dart_CloseNativePort( - native_port_id, + return _Dart_SetDeferredLoadHandler( + handler, ); } - late final _Dart_CloseNativePortPtr = - _lookup>( - 'Dart_CloseNativePort'); - late final _Dart_CloseNativePort = - _Dart_CloseNativePortPtr.asFunction(); + late final _Dart_SetDeferredLoadHandlerPtr = _lookup< + ffi.NativeFunction>( + 'Dart_SetDeferredLoadHandler'); + late final _Dart_SetDeferredLoadHandler = _Dart_SetDeferredLoadHandlerPtr + .asFunction(); - /// Forces all loaded classes and functions to be compiled eagerly in - /// the current isolate.. + /// Notifies the VM that a deferred load completed successfully. This function + /// will eventually cause the corresponding `prefix.loadLibrary()` futures to + /// complete. /// - /// TODO(turnidge): Document. - Object Dart_CompileAll() { - return _Dart_CompileAll(); + /// Requires the current isolate to be the same current isolate during the + /// invocation of the Dart_DeferredLoadHandler. + Object Dart_DeferredLoadComplete( + int loading_unit_id, + ffi.Pointer snapshot_data, + ffi.Pointer snapshot_instructions, + ) { + return _Dart_DeferredLoadComplete( + loading_unit_id, + snapshot_data, + snapshot_instructions, + ); } - late final _Dart_CompileAllPtr = - _lookup>('Dart_CompileAll'); - late final _Dart_CompileAll = - _Dart_CompileAllPtr.asFunction(); + late final _Dart_DeferredLoadCompletePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.IntPtr, ffi.Pointer, + ffi.Pointer)>>('Dart_DeferredLoadComplete'); + late final _Dart_DeferredLoadComplete = + _Dart_DeferredLoadCompletePtr.asFunction< + Object Function( + int, ffi.Pointer, ffi.Pointer)>(); - /// Finalizes all classes. - Object Dart_FinalizeAllClasses() { - return _Dart_FinalizeAllClasses(); + /// Notifies the VM that a deferred load failed. This function + /// will eventually cause the corresponding `prefix.loadLibrary()` futures to + /// complete with an error. + /// + /// If `transient` is true, future invocations of `prefix.loadLibrary()` will + /// trigger new load requests. If false, futures invocation will complete with + /// the same error. + /// + /// Requires the current isolate to be the same current isolate during the + /// invocation of the Dart_DeferredLoadHandler. + Object Dart_DeferredLoadCompleteError( + int loading_unit_id, + ffi.Pointer error_message, + bool transient, + ) { + return _Dart_DeferredLoadCompleteError( + loading_unit_id, + error_message, + transient, + ); } - late final _Dart_FinalizeAllClassesPtr = - _lookup>( - 'Dart_FinalizeAllClasses'); - late final _Dart_FinalizeAllClasses = - _Dart_FinalizeAllClassesPtr.asFunction(); + late final _Dart_DeferredLoadCompleteErrorPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.IntPtr, ffi.Pointer, + ffi.Bool)>>('Dart_DeferredLoadCompleteError'); + late final _Dart_DeferredLoadCompleteError = + _Dart_DeferredLoadCompleteErrorPtr.asFunction< + Object Function(int, ffi.Pointer, bool)>(); - /// This function is intentionally undocumented. + /// Canonicalizes a url with respect to some library. /// - /// It should not be used outside internal tests. - ffi.Pointer Dart_ExecuteInternalCommand( - ffi.Pointer command, - ffi.Pointer arg, + /// The url is resolved with respect to the library's url and some url + /// normalizations are performed. + /// + /// This canonicalization function should be sufficient for most + /// embedders to implement the Dart_kCanonicalizeUrl tag. + /// + /// \param base_url The base url relative to which the url is + /// being resolved. + /// \param url The url being resolved and canonicalized. This + /// parameter is a string handle. + /// + /// \return If no error occurs, a String object is returned. Otherwise + /// an error handle is returned. + Object Dart_DefaultCanonicalizeUrl( + Object base_url, + Object url, ) { - return _Dart_ExecuteInternalCommand( - command, - arg, + return _Dart_DefaultCanonicalizeUrl( + base_url, + url, ); } - late final _Dart_ExecuteInternalCommandPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>('Dart_ExecuteInternalCommand'); - late final _Dart_ExecuteInternalCommand = - _Dart_ExecuteInternalCommandPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _Dart_DefaultCanonicalizeUrlPtr = + _lookup>( + 'Dart_DefaultCanonicalizeUrl'); + late final _Dart_DefaultCanonicalizeUrl = _Dart_DefaultCanonicalizeUrlPtr + .asFunction(); - /// \mainpage Dynamically Linked Dart API + /// Loads the root library for the current isolate. /// - /// This exposes a subset of symbols from dart_api.h and dart_native_api.h - /// available in every Dart embedder through dynamic linking. + /// Requires there to be no current root library. /// - /// All symbols are postfixed with _DL to indicate that they are dynamically - /// linked and to prevent conflicts with the original symbol. + /// \param buffer A buffer which contains a kernel binary (see + /// pkg/kernel/binary.md). Must remain valid until isolate group shutdown. + /// \param buffer_size Length of the passed in buffer. /// - /// Link `dart_api_dl.c` file into your library and invoke - /// `Dart_InitializeApiDL` with `NativeApi.initializeApiDLData`. - int Dart_InitializeApiDL( - ffi.Pointer data, + /// \return A handle to the root library, or an error. + Object Dart_LoadScriptFromKernel( + ffi.Pointer kernel_buffer, + int kernel_size, ) { - return _Dart_InitializeApiDL( - data, + return _Dart_LoadScriptFromKernel( + kernel_buffer, + kernel_size, ); } - late final _Dart_InitializeApiDLPtr = - _lookup)>>( - 'Dart_InitializeApiDL'); - late final _Dart_InitializeApiDL = _Dart_InitializeApiDLPtr.asFunction< - int Function(ffi.Pointer)>(); + late final _Dart_LoadScriptFromKernelPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_LoadScriptFromKernel'); + late final _Dart_LoadScriptFromKernel = _Dart_LoadScriptFromKernelPtr + .asFunction, int)>(); - late final ffi.Pointer _Dart_PostCObject_DL = - _lookup('Dart_PostCObject_DL'); + /// Gets the library for the root script for the current isolate. + /// + /// If the root script has not yet been set for the current isolate, + /// this function returns Dart_Null(). This function never returns an + /// error handle. + /// + /// \return Returns the root Library for the current isolate or Dart_Null(). + Object Dart_RootLibrary() { + return _Dart_RootLibrary(); + } - Dart_PostCObject_Type get Dart_PostCObject_DL => _Dart_PostCObject_DL.value; + late final _Dart_RootLibraryPtr = + _lookup>('Dart_RootLibrary'); + late final _Dart_RootLibrary = + _Dart_RootLibraryPtr.asFunction(); - set Dart_PostCObject_DL(Dart_PostCObject_Type value) => - _Dart_PostCObject_DL.value = value; + /// Sets the root library for the current isolate. + /// + /// \return Returns an error handle if `library` is not a library handle. + Object Dart_SetRootLibrary( + Object library1, + ) { + return _Dart_SetRootLibrary( + library1, + ); + } - late final ffi.Pointer _Dart_PostInteger_DL = - _lookup('Dart_PostInteger_DL'); + late final _Dart_SetRootLibraryPtr = + _lookup>( + 'Dart_SetRootLibrary'); + late final _Dart_SetRootLibrary = + _Dart_SetRootLibraryPtr.asFunction(); - Dart_PostInteger_Type get Dart_PostInteger_DL => _Dart_PostInteger_DL.value; + /// Lookup or instantiate a legacy type by name and type arguments from a + /// Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The class name for the type. + /// \param number_of_type_arguments Number of type arguments. + /// For non parametric types the number of type arguments would be 0. + /// \param type_arguments Pointer to an array of type arguments. + /// For non parameteric types a NULL would be passed in for this argument. + /// + /// \return If no error occurs, the type is returned. + /// Otherwise an error handle is returned. + Object Dart_GetType( + Object library1, + Object class_name, + int number_of_type_arguments, + ffi.Pointer type_arguments, + ) { + return _Dart_GetType( + library1, + class_name, + number_of_type_arguments, + type_arguments, + ); + } - set Dart_PostInteger_DL(Dart_PostInteger_Type value) => - _Dart_PostInteger_DL.value = value; + late final _Dart_GetTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_GetType'); + late final _Dart_GetType = _Dart_GetTypePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); - late final ffi.Pointer _Dart_NewNativePort_DL = - _lookup('Dart_NewNativePort_DL'); + /// Lookup or instantiate a nullable type by name and type arguments from + /// Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The class name for the type. + /// \param number_of_type_arguments Number of type arguments. + /// For non parametric types the number of type arguments would be 0. + /// \param type_arguments Pointer to an array of type arguments. + /// For non parameteric types a NULL would be passed in for this argument. + /// + /// \return If no error occurs, the type is returned. + /// Otherwise an error handle is returned. + Object Dart_GetNullableType( + Object library1, + Object class_name, + int number_of_type_arguments, + ffi.Pointer type_arguments, + ) { + return _Dart_GetNullableType( + library1, + class_name, + number_of_type_arguments, + type_arguments, + ); + } - Dart_NewNativePort_Type get Dart_NewNativePort_DL => - _Dart_NewNativePort_DL.value; + late final _Dart_GetNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_GetNullableType'); + late final _Dart_GetNullableType = _Dart_GetNullableTypePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); - set Dart_NewNativePort_DL(Dart_NewNativePort_Type value) => - _Dart_NewNativePort_DL.value = value; + /// Lookup or instantiate a non-nullable type by name and type arguments from + /// Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The class name for the type. + /// \param number_of_type_arguments Number of type arguments. + /// For non parametric types the number of type arguments would be 0. + /// \param type_arguments Pointer to an array of type arguments. + /// For non parameteric types a NULL would be passed in for this argument. + /// + /// \return If no error occurs, the type is returned. + /// Otherwise an error handle is returned. + Object Dart_GetNonNullableType( + Object library1, + Object class_name, + int number_of_type_arguments, + ffi.Pointer type_arguments, + ) { + return _Dart_GetNonNullableType( + library1, + class_name, + number_of_type_arguments, + type_arguments, + ); + } - late final ffi.Pointer _Dart_CloseNativePort_DL = - _lookup('Dart_CloseNativePort_DL'); + late final _Dart_GetNonNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, + ffi.Pointer)>>('Dart_GetNonNullableType'); + late final _Dart_GetNonNullableType = _Dart_GetNonNullableTypePtr.asFunction< + Object Function(Object, Object, int, ffi.Pointer)>(); - Dart_CloseNativePort_Type get Dart_CloseNativePort_DL => - _Dart_CloseNativePort_DL.value; + /// Creates a nullable version of the provided type. + /// + /// \param type The type to be converted to a nullable type. + /// + /// \return If no error occurs, a nullable type is returned. + /// Otherwise an error handle is returned. + Object Dart_TypeToNullableType( + Object type, + ) { + return _Dart_TypeToNullableType( + type, + ); + } - set Dart_CloseNativePort_DL(Dart_CloseNativePort_Type value) => - _Dart_CloseNativePort_DL.value = value; + late final _Dart_TypeToNullableTypePtr = + _lookup>( + 'Dart_TypeToNullableType'); + late final _Dart_TypeToNullableType = + _Dart_TypeToNullableTypePtr.asFunction(); - late final ffi.Pointer _Dart_IsError_DL = - _lookup('Dart_IsError_DL'); + /// Creates a non-nullable version of the provided type. + /// + /// \param type The type to be converted to a non-nullable type. + /// + /// \return If no error occurs, a non-nullable type is returned. + /// Otherwise an error handle is returned. + Object Dart_TypeToNonNullableType( + Object type, + ) { + return _Dart_TypeToNonNullableType( + type, + ); + } - Dart_IsError_Type get Dart_IsError_DL => _Dart_IsError_DL.value; + late final _Dart_TypeToNonNullableTypePtr = + _lookup>( + 'Dart_TypeToNonNullableType'); + late final _Dart_TypeToNonNullableType = + _Dart_TypeToNonNullableTypePtr.asFunction(); - set Dart_IsError_DL(Dart_IsError_Type value) => - _Dart_IsError_DL.value = value; + /// A type's nullability. + /// + /// \param type A Dart type. + /// \param result An out parameter containing the result of the check. True if + /// the type is of the specified nullability, false otherwise. + /// + /// \return Returns an error handle if type is not of type Type. + Object Dart_IsNullableType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsNullableType( + type, + result, + ); + } - late final ffi.Pointer _Dart_IsApiError_DL = - _lookup('Dart_IsApiError_DL'); + late final _Dart_IsNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IsNullableType'); + late final _Dart_IsNullableType = _Dart_IsNullableTypePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - Dart_IsApiError_Type get Dart_IsApiError_DL => _Dart_IsApiError_DL.value; + Object Dart_IsNonNullableType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsNonNullableType( + type, + result, + ); + } - set Dart_IsApiError_DL(Dart_IsApiError_Type value) => - _Dart_IsApiError_DL.value = value; + late final _Dart_IsNonNullableTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IsNonNullableType'); + late final _Dart_IsNonNullableType = _Dart_IsNonNullableTypePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - late final ffi.Pointer - _Dart_IsUnhandledExceptionError_DL = - _lookup( - 'Dart_IsUnhandledExceptionError_DL'); + Object Dart_IsLegacyType( + Object type, + ffi.Pointer result, + ) { + return _Dart_IsLegacyType( + type, + result, + ); + } - Dart_IsUnhandledExceptionError_Type get Dart_IsUnhandledExceptionError_DL => - _Dart_IsUnhandledExceptionError_DL.value; + late final _Dart_IsLegacyTypePtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_IsLegacyType'); + late final _Dart_IsLegacyType = _Dart_IsLegacyTypePtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - set Dart_IsUnhandledExceptionError_DL( - Dart_IsUnhandledExceptionError_Type value) => - _Dart_IsUnhandledExceptionError_DL.value = value; + /// Lookup a class or interface by name from a Library. + /// + /// \param library The library containing the class or interface. + /// \param class_name The name of the class or interface. + /// + /// \return If no error occurs, the class or interface is + /// returned. Otherwise an error handle is returned. + Object Dart_GetClass( + Object library1, + Object class_name, + ) { + return _Dart_GetClass( + library1, + class_name, + ); + } - late final ffi.Pointer - _Dart_IsCompilationError_DL = - _lookup('Dart_IsCompilationError_DL'); + late final _Dart_GetClassPtr = + _lookup>( + 'Dart_GetClass'); + late final _Dart_GetClass = + _Dart_GetClassPtr.asFunction(); - Dart_IsCompilationError_Type get Dart_IsCompilationError_DL => - _Dart_IsCompilationError_DL.value; + /// Returns an import path to a Library, such as "file:///test.dart" or + /// "dart:core". + Object Dart_LibraryUrl( + Object library1, + ) { + return _Dart_LibraryUrl( + library1, + ); + } - set Dart_IsCompilationError_DL(Dart_IsCompilationError_Type value) => - _Dart_IsCompilationError_DL.value = value; - - late final ffi.Pointer _Dart_IsFatalError_DL = - _lookup('Dart_IsFatalError_DL'); - - Dart_IsFatalError_Type get Dart_IsFatalError_DL => - _Dart_IsFatalError_DL.value; - - set Dart_IsFatalError_DL(Dart_IsFatalError_Type value) => - _Dart_IsFatalError_DL.value = value; - - late final ffi.Pointer _Dart_GetError_DL = - _lookup('Dart_GetError_DL'); - - Dart_GetError_Type get Dart_GetError_DL => _Dart_GetError_DL.value; - - set Dart_GetError_DL(Dart_GetError_Type value) => - _Dart_GetError_DL.value = value; - - late final ffi.Pointer - _Dart_ErrorHasException_DL = - _lookup('Dart_ErrorHasException_DL'); - - Dart_ErrorHasException_Type get Dart_ErrorHasException_DL => - _Dart_ErrorHasException_DL.value; - - set Dart_ErrorHasException_DL(Dart_ErrorHasException_Type value) => - _Dart_ErrorHasException_DL.value = value; - - late final ffi.Pointer - _Dart_ErrorGetException_DL = - _lookup('Dart_ErrorGetException_DL'); - - Dart_ErrorGetException_Type get Dart_ErrorGetException_DL => - _Dart_ErrorGetException_DL.value; - - set Dart_ErrorGetException_DL(Dart_ErrorGetException_Type value) => - _Dart_ErrorGetException_DL.value = value; - - late final ffi.Pointer - _Dart_ErrorGetStackTrace_DL = - _lookup('Dart_ErrorGetStackTrace_DL'); - - Dart_ErrorGetStackTrace_Type get Dart_ErrorGetStackTrace_DL => - _Dart_ErrorGetStackTrace_DL.value; - - set Dart_ErrorGetStackTrace_DL(Dart_ErrorGetStackTrace_Type value) => - _Dart_ErrorGetStackTrace_DL.value = value; - - late final ffi.Pointer _Dart_NewApiError_DL = - _lookup('Dart_NewApiError_DL'); - - Dart_NewApiError_Type get Dart_NewApiError_DL => _Dart_NewApiError_DL.value; - - set Dart_NewApiError_DL(Dart_NewApiError_Type value) => - _Dart_NewApiError_DL.value = value; - - late final ffi.Pointer - _Dart_NewCompilationError_DL = - _lookup('Dart_NewCompilationError_DL'); - - Dart_NewCompilationError_Type get Dart_NewCompilationError_DL => - _Dart_NewCompilationError_DL.value; - - set Dart_NewCompilationError_DL(Dart_NewCompilationError_Type value) => - _Dart_NewCompilationError_DL.value = value; - - late final ffi.Pointer - _Dart_NewUnhandledExceptionError_DL = - _lookup( - 'Dart_NewUnhandledExceptionError_DL'); - - Dart_NewUnhandledExceptionError_Type get Dart_NewUnhandledExceptionError_DL => - _Dart_NewUnhandledExceptionError_DL.value; - - set Dart_NewUnhandledExceptionError_DL( - Dart_NewUnhandledExceptionError_Type value) => - _Dart_NewUnhandledExceptionError_DL.value = value; - - late final ffi.Pointer _Dart_PropagateError_DL = - _lookup('Dart_PropagateError_DL'); - - Dart_PropagateError_Type get Dart_PropagateError_DL => - _Dart_PropagateError_DL.value; - - set Dart_PropagateError_DL(Dart_PropagateError_Type value) => - _Dart_PropagateError_DL.value = value; - - late final ffi.Pointer - _Dart_HandleFromPersistent_DL = - _lookup('Dart_HandleFromPersistent_DL'); - - Dart_HandleFromPersistent_Type get Dart_HandleFromPersistent_DL => - _Dart_HandleFromPersistent_DL.value; - - set Dart_HandleFromPersistent_DL(Dart_HandleFromPersistent_Type value) => - _Dart_HandleFromPersistent_DL.value = value; - - late final ffi.Pointer - _Dart_HandleFromWeakPersistent_DL = - _lookup( - 'Dart_HandleFromWeakPersistent_DL'); - - Dart_HandleFromWeakPersistent_Type get Dart_HandleFromWeakPersistent_DL => - _Dart_HandleFromWeakPersistent_DL.value; - - set Dart_HandleFromWeakPersistent_DL( - Dart_HandleFromWeakPersistent_Type value) => - _Dart_HandleFromWeakPersistent_DL.value = value; - - late final ffi.Pointer - _Dart_NewPersistentHandle_DL = - _lookup('Dart_NewPersistentHandle_DL'); - - Dart_NewPersistentHandle_Type get Dart_NewPersistentHandle_DL => - _Dart_NewPersistentHandle_DL.value; - - set Dart_NewPersistentHandle_DL(Dart_NewPersistentHandle_Type value) => - _Dart_NewPersistentHandle_DL.value = value; - - late final ffi.Pointer - _Dart_SetPersistentHandle_DL = - _lookup('Dart_SetPersistentHandle_DL'); - - Dart_SetPersistentHandle_Type get Dart_SetPersistentHandle_DL => - _Dart_SetPersistentHandle_DL.value; - - set Dart_SetPersistentHandle_DL(Dart_SetPersistentHandle_Type value) => - _Dart_SetPersistentHandle_DL.value = value; - - late final ffi.Pointer - _Dart_DeletePersistentHandle_DL = - _lookup( - 'Dart_DeletePersistentHandle_DL'); - - Dart_DeletePersistentHandle_Type get Dart_DeletePersistentHandle_DL => - _Dart_DeletePersistentHandle_DL.value; - - set Dart_DeletePersistentHandle_DL(Dart_DeletePersistentHandle_Type value) => - _Dart_DeletePersistentHandle_DL.value = value; - - late final ffi.Pointer - _Dart_NewWeakPersistentHandle_DL = - _lookup( - 'Dart_NewWeakPersistentHandle_DL'); - - Dart_NewWeakPersistentHandle_Type get Dart_NewWeakPersistentHandle_DL => - _Dart_NewWeakPersistentHandle_DL.value; - - set Dart_NewWeakPersistentHandle_DL( - Dart_NewWeakPersistentHandle_Type value) => - _Dart_NewWeakPersistentHandle_DL.value = value; - - late final ffi.Pointer - _Dart_DeleteWeakPersistentHandle_DL = - _lookup( - 'Dart_DeleteWeakPersistentHandle_DL'); - - Dart_DeleteWeakPersistentHandle_Type get Dart_DeleteWeakPersistentHandle_DL => - _Dart_DeleteWeakPersistentHandle_DL.value; - - set Dart_DeleteWeakPersistentHandle_DL( - Dart_DeleteWeakPersistentHandle_Type value) => - _Dart_DeleteWeakPersistentHandle_DL.value = value; - - late final ffi.Pointer - _Dart_UpdateExternalSize_DL = - _lookup('Dart_UpdateExternalSize_DL'); - - Dart_UpdateExternalSize_Type get Dart_UpdateExternalSize_DL => - _Dart_UpdateExternalSize_DL.value; - - set Dart_UpdateExternalSize_DL(Dart_UpdateExternalSize_Type value) => - _Dart_UpdateExternalSize_DL.value = value; - - late final ffi.Pointer - _Dart_NewFinalizableHandle_DL = - _lookup('Dart_NewFinalizableHandle_DL'); - - Dart_NewFinalizableHandle_Type get Dart_NewFinalizableHandle_DL => - _Dart_NewFinalizableHandle_DL.value; - - set Dart_NewFinalizableHandle_DL(Dart_NewFinalizableHandle_Type value) => - _Dart_NewFinalizableHandle_DL.value = value; - - late final ffi.Pointer - _Dart_DeleteFinalizableHandle_DL = - _lookup( - 'Dart_DeleteFinalizableHandle_DL'); - - Dart_DeleteFinalizableHandle_Type get Dart_DeleteFinalizableHandle_DL => - _Dart_DeleteFinalizableHandle_DL.value; - - set Dart_DeleteFinalizableHandle_DL( - Dart_DeleteFinalizableHandle_Type value) => - _Dart_DeleteFinalizableHandle_DL.value = value; - - late final ffi.Pointer - _Dart_UpdateFinalizableExternalSize_DL = - _lookup( - 'Dart_UpdateFinalizableExternalSize_DL'); - - Dart_UpdateFinalizableExternalSize_Type - get Dart_UpdateFinalizableExternalSize_DL => - _Dart_UpdateFinalizableExternalSize_DL.value; - - set Dart_UpdateFinalizableExternalSize_DL( - Dart_UpdateFinalizableExternalSize_Type value) => - _Dart_UpdateFinalizableExternalSize_DL.value = value; - - late final ffi.Pointer _Dart_Post_DL = - _lookup('Dart_Post_DL'); - - Dart_Post_Type get Dart_Post_DL => _Dart_Post_DL.value; - - set Dart_Post_DL(Dart_Post_Type value) => _Dart_Post_DL.value = value; - - late final ffi.Pointer _Dart_NewSendPort_DL = - _lookup('Dart_NewSendPort_DL'); - - Dart_NewSendPort_Type get Dart_NewSendPort_DL => _Dart_NewSendPort_DL.value; - - set Dart_NewSendPort_DL(Dart_NewSendPort_Type value) => - _Dart_NewSendPort_DL.value = value; - - late final ffi.Pointer _Dart_SendPortGetId_DL = - _lookup('Dart_SendPortGetId_DL'); - - Dart_SendPortGetId_Type get Dart_SendPortGetId_DL => - _Dart_SendPortGetId_DL.value; - - set Dart_SendPortGetId_DL(Dart_SendPortGetId_Type value) => - _Dart_SendPortGetId_DL.value = value; - - late final ffi.Pointer _Dart_EnterScope_DL = - _lookup('Dart_EnterScope_DL'); - - Dart_EnterScope_Type get Dart_EnterScope_DL => _Dart_EnterScope_DL.value; + late final _Dart_LibraryUrlPtr = + _lookup>( + 'Dart_LibraryUrl'); + late final _Dart_LibraryUrl = + _Dart_LibraryUrlPtr.asFunction(); - set Dart_EnterScope_DL(Dart_EnterScope_Type value) => - _Dart_EnterScope_DL.value = value; + /// Returns a URL from which a Library was loaded. + Object Dart_LibraryResolvedUrl( + Object library1, + ) { + return _Dart_LibraryResolvedUrl( + library1, + ); + } - late final ffi.Pointer _Dart_ExitScope_DL = - _lookup('Dart_ExitScope_DL'); + late final _Dart_LibraryResolvedUrlPtr = + _lookup>( + 'Dart_LibraryResolvedUrl'); + late final _Dart_LibraryResolvedUrl = + _Dart_LibraryResolvedUrlPtr.asFunction(); - Dart_ExitScope_Type get Dart_ExitScope_DL => _Dart_ExitScope_DL.value; + /// \return An array of libraries. + Object Dart_GetLoadedLibraries() { + return _Dart_GetLoadedLibraries(); + } - set Dart_ExitScope_DL(Dart_ExitScope_Type value) => - _Dart_ExitScope_DL.value = value; + late final _Dart_GetLoadedLibrariesPtr = + _lookup>( + 'Dart_GetLoadedLibraries'); + late final _Dart_GetLoadedLibraries = + _Dart_GetLoadedLibrariesPtr.asFunction(); - late final _class_CUPHTTPTaskConfiguration1 = - _getClass1("CUPHTTPTaskConfiguration"); - late final _sel_initWithPort_1 = _registerName1("initWithPort:"); - ffi.Pointer _objc_msgSend_470( - ffi.Pointer obj, - ffi.Pointer sel, - int sendPort, + Object Dart_LookupLibrary( + Object url, ) { - return __objc_msgSend_470( - obj, - sel, - sendPort, + return _Dart_LookupLibrary( + url, ); } - late final __objc_msgSend_470Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, Dart_Port)>>('objc_msgSend'); - late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _Dart_LookupLibraryPtr = + _lookup>( + 'Dart_LookupLibrary'); + late final _Dart_LookupLibrary = + _Dart_LookupLibraryPtr.asFunction(); - late final _sel_sendPort1 = _registerName1("sendPort"); - late final _class_CUPHTTPClientDelegate1 = - _getClass1("CUPHTTPClientDelegate"); - late final _sel_registerTask_withConfiguration_1 = - _registerName1("registerTask:withConfiguration:"); - void _objc_msgSend_471( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer config, + /// Report an loading error for the library. + /// + /// \param library The library that failed to load. + /// \param error The Dart error instance containing the load error. + /// + /// \return If the VM handles the error, the return value is + /// a null handle. If it doesn't handle the error, the error + /// object is returned. + Object Dart_LibraryHandleError( + Object library1, + Object error, ) { - return __objc_msgSend_471( - obj, - sel, - task, - config, + return _Dart_LibraryHandleError( + library1, + error, ); } - late final __objc_msgSend_471Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _Dart_LibraryHandleErrorPtr = + _lookup>( + 'Dart_LibraryHandleError'); + late final _Dart_LibraryHandleError = + _Dart_LibraryHandleErrorPtr.asFunction(); - late final _class_CUPHTTPForwardedDelegate1 = - _getClass1("CUPHTTPForwardedDelegate"); - late final _sel_initWithSession_task_1 = - _registerName1("initWithSession:task:"); - ffi.Pointer _objc_msgSend_472( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, + /// Called by the embedder to load a partial program. Does not set the root + /// library. + /// + /// \param buffer A buffer which contains a kernel binary (see + /// pkg/kernel/binary.md). Must remain valid until isolate shutdown. + /// \param buffer_size Length of the passed in buffer. + /// + /// \return A handle to the main library of the compilation unit, or an error. + Object Dart_LoadLibraryFromKernel( + ffi.Pointer kernel_buffer, + int kernel_buffer_size, ) { - return __objc_msgSend_472( - obj, - sel, - session, - task, + return _Dart_LoadLibraryFromKernel( + kernel_buffer, + kernel_buffer_size, ); } - late final __objc_msgSend_472Ptr = _lookup< + late final _Dart_LoadLibraryFromKernelPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Handle Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_LoadLibraryFromKernel'); + late final _Dart_LoadLibraryFromKernel = _Dart_LoadLibraryFromKernelPtr + .asFunction, int)>(); - late final _sel_finish1 = _registerName1("finish"); - late final _sel_session1 = _registerName1("session"); - late final _sel_task1 = _registerName1("task"); - ffi.Pointer _objc_msgSend_473( - ffi.Pointer obj, - ffi.Pointer sel, + /// Indicates that all outstanding load requests have been satisfied. + /// This finalizes all the new classes loaded and optionally completes + /// deferred library futures. + /// + /// Requires there to be a current isolate. + /// + /// \param complete_futures Specify true if all deferred library + /// futures should be completed, false otherwise. + /// + /// \return Success if all classes have been finalized and deferred library + /// futures are completed. Otherwise, returns an error. + Object Dart_FinalizeLoading( + bool complete_futures, ) { - return __objc_msgSend_473( - obj, - sel, + return _Dart_FinalizeLoading( + complete_futures, ); } - late final __objc_msgSend_473Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _Dart_FinalizeLoadingPtr = + _lookup>( + 'Dart_FinalizeLoading'); + late final _Dart_FinalizeLoading = + _Dart_FinalizeLoadingPtr.asFunction(); - late final _class_NSLock1 = _getClass1("NSLock"); - late final _sel_lock1 = _registerName1("lock"); - ffi.Pointer _objc_msgSend_474( - ffi.Pointer obj, - ffi.Pointer sel, + /// Returns the value of peer field of 'object' in 'peer'. + /// + /// \param object An object. + /// \param peer An out parameter that returns the value of the peer + /// field. + /// + /// \return Returns an error if 'object' is a subtype of Null, num, or + /// bool. + Object Dart_GetPeer( + Object object, + ffi.Pointer> peer, ) { - return __objc_msgSend_474( - obj, - sel, + return _Dart_GetPeer( + object, + peer, ); } - late final __objc_msgSend_474Ptr = _lookup< + late final _Dart_GetPeerPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Handle Function( + ffi.Handle, ffi.Pointer>)>>('Dart_GetPeer'); + late final _Dart_GetPeer = _Dart_GetPeerPtr.asFunction< + Object Function(Object, ffi.Pointer>)>(); - late final _class_CUPHTTPForwardedRedirect1 = - _getClass1("CUPHTTPForwardedRedirect"); - late final _sel_initWithSession_task_response_request_1 = - _registerName1("initWithSession:task:response:request:"); - ffi.Pointer _objc_msgSend_475( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer response, - ffi.Pointer request, + /// Sets the value of the peer field of 'object' to the value of + /// 'peer'. + /// + /// \param object An object. + /// \param peer A value to store in the peer field. + /// + /// \return Returns an error if 'object' is a subtype of Null, num, or + /// bool. + Object Dart_SetPeer( + Object object, + ffi.Pointer peer, ) { - return __objc_msgSend_475( - obj, - sel, - session, - task, - response, - request, + return _Dart_SetPeer( + object, + peer, ); } - late final __objc_msgSend_475Ptr = _lookup< + late final _Dart_SetPeerPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Handle Function( + ffi.Handle, ffi.Pointer)>>('Dart_SetPeer'); + late final _Dart_SetPeer = _Dart_SetPeerPtr.asFunction< + Object Function(Object, ffi.Pointer)>(); - late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); - void _objc_msgSend_476( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + bool Dart_IsKernelIsolate( + Dart_Isolate isolate, ) { - return __objc_msgSend_476( - obj, - sel, - request, + return _Dart_IsKernelIsolate( + isolate, ); } - late final __objc_msgSend_476Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _Dart_IsKernelIsolatePtr = + _lookup>( + 'Dart_IsKernelIsolate'); + late final _Dart_IsKernelIsolate = + _Dart_IsKernelIsolatePtr.asFunction(); - ffi.Pointer _objc_msgSend_477( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_477( - obj, - sel, - ); + bool Dart_KernelIsolateIsRunning() { + return _Dart_KernelIsolateIsRunning(); } - late final __objc_msgSend_477Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _Dart_KernelIsolateIsRunningPtr = + _lookup>( + 'Dart_KernelIsolateIsRunning'); + late final _Dart_KernelIsolateIsRunning = + _Dart_KernelIsolateIsRunningPtr.asFunction(); - late final _sel_redirectRequest1 = _registerName1("redirectRequest"); - late final _class_CUPHTTPForwardedResponse1 = - _getClass1("CUPHTTPForwardedResponse"); - late final _sel_initWithSession_task_response_1 = - _registerName1("initWithSession:task:response:"); - ffi.Pointer _objc_msgSend_478( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer response, - ) { - return __objc_msgSend_478( - obj, - sel, - session, - task, - response, - ); + int Dart_KernelPort() { + return _Dart_KernelPort(); } - late final __objc_msgSend_478Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _Dart_KernelPortPtr = + _lookup>('Dart_KernelPort'); + late final _Dart_KernelPort = + _Dart_KernelPortPtr.asFunction(); - late final _sel_finishWithDisposition_1 = - _registerName1("finishWithDisposition:"); - void _objc_msgSend_479( - ffi.Pointer obj, - ffi.Pointer sel, - int disposition, + /// Compiles the given `script_uri` to a kernel file. + /// + /// \param platform_kernel A buffer containing the kernel of the platform (e.g. + /// `vm_platform_strong.dill`). The VM does not take ownership of this memory. + /// + /// \param platform_kernel_size The length of the platform_kernel buffer. + /// + /// \param snapshot_compile Set to `true` when the compilation is for a snapshot. + /// This is used by the frontend to determine if compilation related information + /// should be printed to console (e.g., null safety mode). + /// + /// \param verbosity Specifies the logging behavior of the kernel compilation + /// service. + /// + /// \return Returns the result of the compilation. + /// + /// On a successful compilation the returned [Dart_KernelCompilationResult] has + /// a status of [Dart_KernelCompilationStatus_Ok] and the `kernel`/`kernel_size` + /// fields are set. The caller takes ownership of the malloc()ed buffer. + /// + /// On a failed compilation the `error` might be set describing the reason for + /// the failed compilation. The caller takes ownership of the malloc()ed + /// error. + /// + /// Requires there to be a current isolate. + Dart_KernelCompilationResult Dart_CompileToKernel( + ffi.Pointer script_uri, + ffi.Pointer platform_kernel, + int platform_kernel_size, + bool incremental_compile, + bool snapshot_compile, + ffi.Pointer package_config, + int verbosity, ) { - return __objc_msgSend_479( - obj, - sel, - disposition, + return _Dart_CompileToKernel( + script_uri, + platform_kernel, + platform_kernel_size, + incremental_compile, + snapshot_compile, + package_config, + verbosity, ); } - late final __objc_msgSend_479Ptr = _lookup< + late final _Dart_CompileToKernelPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + Dart_KernelCompilationResult Function( + ffi.Pointer, + ffi.Pointer, + ffi.IntPtr, + ffi.Bool, + ffi.Bool, + ffi.Pointer, + ffi.Int32)>>('Dart_CompileToKernel'); + late final _Dart_CompileToKernel = _Dart_CompileToKernelPtr.asFunction< + Dart_KernelCompilationResult Function( + ffi.Pointer, + ffi.Pointer, + int, + bool, + bool, + ffi.Pointer, + int)>(); - late final _sel_disposition1 = _registerName1("disposition"); - int _objc_msgSend_480( - ffi.Pointer obj, - ffi.Pointer sel, + Dart_KernelCompilationResult Dart_KernelListDependencies() { + return _Dart_KernelListDependencies(); + } + + late final _Dart_KernelListDependenciesPtr = + _lookup>( + 'Dart_KernelListDependencies'); + late final _Dart_KernelListDependencies = _Dart_KernelListDependenciesPtr + .asFunction(); + + /// Sets the kernel buffer which will be used to load Dart SDK sources + /// dynamically at runtime. + /// + /// \param platform_kernel A buffer containing kernel which has sources for the + /// Dart SDK populated. Note: The VM does not take ownership of this memory. + /// + /// \param platform_kernel_size The length of the platform_kernel buffer. + void Dart_SetDartLibrarySourcesKernel( + ffi.Pointer platform_kernel, + int platform_kernel_size, ) { - return __objc_msgSend_480( - obj, - sel, + return _Dart_SetDartLibrarySourcesKernel( + platform_kernel, + platform_kernel_size, ); } - late final __objc_msgSend_480Ptr = _lookup< + late final _Dart_SetDartLibrarySourcesKernelPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, + ffi.IntPtr)>>('Dart_SetDartLibrarySourcesKernel'); + late final _Dart_SetDartLibrarySourcesKernel = + _Dart_SetDartLibrarySourcesKernelPtr.asFunction< + void Function(ffi.Pointer, int)>(); - late final _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); - late final _sel_initWithSession_task_data_1 = - _registerName1("initWithSession:task:data:"); - ffi.Pointer _objc_msgSend_481( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer data, + /// Detect the null safety opt-in status. + /// + /// When running from source, it is based on the opt-in status of `script_uri`. + /// When running from a kernel buffer, it is based on the mode used when + /// generating `kernel_buffer`. + /// When running from an appJIT or AOT snapshot, it is based on the mode used + /// when generating `snapshot_data`. + /// + /// \param script_uri Uri of the script that contains the source code + /// + /// \param package_config Uri of the package configuration file (either in format + /// of .packages or .dart_tool/package_config.json) for the null safety + /// detection to resolve package imports against. If this parameter is not + /// passed the package resolution of the parent isolate should be used. + /// + /// \param original_working_directory current working directory when the VM + /// process was launched, this is used to correctly resolve the path specified + /// for package_config. + /// + /// \param snapshot_data + /// + /// \param snapshot_instructions Buffers containing a snapshot of the + /// isolate or NULL if no snapshot is provided. If provided, the buffers must + /// remain valid until the isolate shuts down. + /// + /// \param kernel_buffer + /// + /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must + /// remain valid until isolate shutdown. + /// + /// \return Returns true if the null safety is opted in by the input being + /// run `script_uri`, `snapshot_data` or `kernel_buffer`. + bool Dart_DetectNullSafety( + ffi.Pointer script_uri, + ffi.Pointer package_config, + ffi.Pointer original_working_directory, + ffi.Pointer snapshot_data, + ffi.Pointer snapshot_instructions, + ffi.Pointer kernel_buffer, + int kernel_buffer_size, ) { - return __objc_msgSend_481( - obj, - sel, - session, - task, - data, + return _Dart_DetectNullSafety( + script_uri, + package_config, + original_working_directory, + snapshot_data, + snapshot_instructions, + kernel_buffer, + kernel_buffer_size, ); } - late final __objc_msgSend_481Ptr = _lookup< + late final _Dart_DetectNullSafetyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.IntPtr)>>('Dart_DetectNullSafety'); + late final _Dart_DetectNullSafety = _Dart_DetectNullSafetyPtr.asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - late final _class_CUPHTTPForwardedComplete1 = - _getClass1("CUPHTTPForwardedComplete"); - late final _sel_initWithSession_task_error_1 = - _registerName1("initWithSession:task:error:"); - ffi.Pointer _objc_msgSend_482( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer error, + /// Returns true if isolate is the service isolate. + /// + /// \param isolate An isolate + /// + /// \return Returns true if 'isolate' is the service isolate. + bool Dart_IsServiceIsolate( + Dart_Isolate isolate, ) { - return __objc_msgSend_482( - obj, - sel, - session, - task, - error, + return _Dart_IsServiceIsolate( + isolate, ); } - late final __objc_msgSend_482Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _Dart_IsServiceIsolatePtr = + _lookup>( + 'Dart_IsServiceIsolate'); + late final _Dart_IsServiceIsolate = + _Dart_IsServiceIsolatePtr.asFunction(); - late final _class_CUPHTTPForwardedFinishedDownloading1 = - _getClass1("CUPHTTPForwardedFinishedDownloading"); - late final _sel_initWithSession_downloadTask_url_1 = - _registerName1("initWithSession:downloadTask:url:"); - ffi.Pointer _objc_msgSend_483( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer downloadTask, - ffi.Pointer location, + /// Writes the CPU profile to the timeline as a series of 'instant' events. + /// + /// Note that this is an expensive operation. + /// + /// \param main_port The main port of the Isolate whose profile samples to write. + /// \param error An optional error, must be free()ed by caller. + /// + /// \return Returns true if the profile is successfully written and false + /// otherwise. + bool Dart_WriteProfileToTimeline( + int main_port, + ffi.Pointer> error, ) { - return __objc_msgSend_483( - obj, - sel, - session, - downloadTask, - location, + return _Dart_WriteProfileToTimeline( + main_port, + error, ); } - late final __objc_msgSend_483Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_location1 = _registerName1("location"); -} + late final _Dart_WriteProfileToTimelinePtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + Dart_Port, ffi.Pointer>)>>( + 'Dart_WriteProfileToTimeline'); + late final _Dart_WriteProfileToTimeline = _Dart_WriteProfileToTimelinePtr + .asFunction>)>(); -class __mbstate_t extends ffi.Union { - @ffi.Array.multi([128]) - external ffi.Array __mbstate8; + /// Compiles all functions reachable from entry points and marks + /// the isolate to disallow future compilation. + /// + /// Entry points should be specified using `@pragma("vm:entry-point")` + /// annotation. + /// + /// \return An error handle if a compilation error or runtime error running const + /// constructors was encountered. + Object Dart_Precompile() { + return _Dart_Precompile(); + } - @ffi.LongLong() - external int _mbstateL; -} + late final _Dart_PrecompilePtr = + _lookup>('Dart_Precompile'); + late final _Dart_Precompile = + _Dart_PrecompilePtr.asFunction(); -class __darwin_pthread_handler_rec extends ffi.Struct { - external ffi - .Pointer)>> - __routine; + Object Dart_LoadingUnitLibraryUris( + int loading_unit_id, + ) { + return _Dart_LoadingUnitLibraryUris( + loading_unit_id, + ); + } - external ffi.Pointer __arg; + late final _Dart_LoadingUnitLibraryUrisPtr = + _lookup>( + 'Dart_LoadingUnitLibraryUris'); + late final _Dart_LoadingUnitLibraryUris = + _Dart_LoadingUnitLibraryUrisPtr.asFunction(); - external ffi.Pointer<__darwin_pthread_handler_rec> __next; -} + /// Creates a precompiled snapshot. + /// - A root library must have been loaded. + /// - Dart_Precompile must have been called. + /// + /// Outputs an assembly file defining the symbols listed in the definitions + /// above. + /// + /// The assembly should be compiled as a static or shared library and linked or + /// loaded by the embedder. Running this snapshot requires a VM compiled with + /// DART_PRECOMPILED_SNAPSHOT. The kDartVmSnapshotData and + /// kDartVmSnapshotInstructions should be passed to Dart_Initialize. The + /// kDartIsolateSnapshotData and kDartIsolateSnapshotInstructions should be + /// passed to Dart_CreateIsolateGroup. + /// + /// The callback will be invoked one or more times to provide the assembly code. + /// + /// If stripped is true, then the assembly code will not include DWARF + /// debugging sections. + /// + /// If debug_callback_data is provided, debug_callback_data will be used with + /// the callback to provide separate debugging information. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateAppAOTSnapshotAsAssembly( + Dart_StreamingWriteCallback callback, + ffi.Pointer callback_data, + bool stripped, + ffi.Pointer debug_callback_data, + ) { + return _Dart_CreateAppAOTSnapshotAsAssembly( + callback, + callback_data, + stripped, + debug_callback_data, + ); + } -class _opaque_pthread_attr_t extends ffi.Struct { - @ffi.Long() - external int __sig; + late final _Dart_CreateAppAOTSnapshotAsAssemblyPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_StreamingWriteCallback, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsAssembly'); + late final _Dart_CreateAppAOTSnapshotAsAssembly = + _Dart_CreateAppAOTSnapshotAsAssemblyPtr.asFunction< + Object Function(Dart_StreamingWriteCallback, ffi.Pointer, + bool, ffi.Pointer)>(); - @ffi.Array.multi([56]) - external ffi.Array __opaque; -} + Object Dart_CreateAppAOTSnapshotAsAssemblies( + Dart_CreateLoadingUnitCallback next_callback, + ffi.Pointer next_callback_data, + bool stripped, + Dart_StreamingWriteCallback write_callback, + Dart_StreamingCloseCallback close_callback, + ) { + return _Dart_CreateAppAOTSnapshotAsAssemblies( + next_callback, + next_callback_data, + stripped, + write_callback, + close_callback, + ); + } -class _opaque_pthread_cond_t extends ffi.Struct { - @ffi.Long() - external int __sig; + late final _Dart_CreateAppAOTSnapshotAsAssembliesPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + ffi.Bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>>( + 'Dart_CreateAppAOTSnapshotAsAssemblies'); + late final _Dart_CreateAppAOTSnapshotAsAssemblies = + _Dart_CreateAppAOTSnapshotAsAssembliesPtr.asFunction< + Object Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>(); - @ffi.Array.multi([40]) - external ffi.Array __opaque; -} - -class _opaque_pthread_condattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} - -class _opaque_pthread_mutex_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([56]) - external ffi.Array __opaque; -} - -class _opaque_pthread_mutexattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} - -class _opaque_pthread_once_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} - -class _opaque_pthread_rwlock_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([192]) - external ffi.Array __opaque; -} - -class _opaque_pthread_rwlockattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; + /// Creates a precompiled snapshot. + /// - A root library must have been loaded. + /// - Dart_Precompile must have been called. + /// + /// Outputs an ELF shared library defining the symbols + /// - _kDartVmSnapshotData + /// - _kDartVmSnapshotInstructions + /// - _kDartIsolateSnapshotData + /// - _kDartIsolateSnapshotInstructions + /// + /// The shared library should be dynamically loaded by the embedder. + /// Running this snapshot requires a VM compiled with DART_PRECOMPILED_SNAPSHOT. + /// The kDartVmSnapshotData and kDartVmSnapshotInstructions should be passed to + /// Dart_Initialize. The kDartIsolateSnapshotData and + /// kDartIsolateSnapshotInstructions should be passed to Dart_CreateIsolate. + /// + /// The callback will be invoked one or more times to provide the binary output. + /// + /// If stripped is true, then the binary output will not include DWARF + /// debugging sections. + /// + /// If debug_callback_data is provided, debug_callback_data will be used with + /// the callback to provide separate debugging information. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateAppAOTSnapshotAsElf( + Dart_StreamingWriteCallback callback, + ffi.Pointer callback_data, + bool stripped, + ffi.Pointer debug_callback_data, + ) { + return _Dart_CreateAppAOTSnapshotAsElf( + callback, + callback_data, + stripped, + debug_callback_data, + ); + } - @ffi.Array.multi([16]) - external ffi.Array __opaque; -} + late final _Dart_CreateAppAOTSnapshotAsElfPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_StreamingWriteCallback, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsElf'); + late final _Dart_CreateAppAOTSnapshotAsElf = + _Dart_CreateAppAOTSnapshotAsElfPtr.asFunction< + Object Function(Dart_StreamingWriteCallback, ffi.Pointer, + bool, ffi.Pointer)>(); -class _opaque_pthread_t extends ffi.Struct { - @ffi.Long() - external int __sig; + Object Dart_CreateAppAOTSnapshotAsElfs( + Dart_CreateLoadingUnitCallback next_callback, + ffi.Pointer next_callback_data, + bool stripped, + Dart_StreamingWriteCallback write_callback, + Dart_StreamingCloseCallback close_callback, + ) { + return _Dart_CreateAppAOTSnapshotAsElfs( + next_callback, + next_callback_data, + stripped, + write_callback, + close_callback, + ); + } - external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; + late final _Dart_CreateAppAOTSnapshotAsElfsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + ffi.Bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>>('Dart_CreateAppAOTSnapshotAsElfs'); + late final _Dart_CreateAppAOTSnapshotAsElfs = + _Dart_CreateAppAOTSnapshotAsElfsPtr.asFunction< + Object Function( + Dart_CreateLoadingUnitCallback, + ffi.Pointer, + bool, + Dart_StreamingWriteCallback, + Dart_StreamingCloseCallback)>(); - @ffi.Array.multi([8176]) - external ffi.Array __opaque; -} + /// Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes + /// kDartVmSnapshotData and kDartVmSnapshotInstructions. It also does + /// not strip DWARF information from the generated assembly or allow for + /// separate debug information. + Object Dart_CreateVMAOTSnapshotAsAssembly( + Dart_StreamingWriteCallback callback, + ffi.Pointer callback_data, + ) { + return _Dart_CreateVMAOTSnapshotAsAssembly( + callback, + callback_data, + ); + } -@ffi.Packed(1) -class _OSUnalignedU16 extends ffi.Struct { - @ffi.Uint16() - external int __val; -} + late final _Dart_CreateVMAOTSnapshotAsAssemblyPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(Dart_StreamingWriteCallback, + ffi.Pointer)>>('Dart_CreateVMAOTSnapshotAsAssembly'); + late final _Dart_CreateVMAOTSnapshotAsAssembly = + _Dart_CreateVMAOTSnapshotAsAssemblyPtr.asFunction< + Object Function( + Dart_StreamingWriteCallback, ffi.Pointer)>(); -@ffi.Packed(1) -class _OSUnalignedU32 extends ffi.Struct { - @ffi.Uint32() - external int __val; -} + /// Sorts the class-ids in depth first traversal order of the inheritance + /// tree. This is a costly operation, but it can make method dispatch + /// more efficient and is done before writing snapshots. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_SortClasses() { + return _Dart_SortClasses(); + } -@ffi.Packed(1) -class _OSUnalignedU64 extends ffi.Struct { - @ffi.Uint64() - external int __val; -} + late final _Dart_SortClassesPtr = + _lookup>('Dart_SortClasses'); + late final _Dart_SortClasses = + _Dart_SortClassesPtr.asFunction(); -class fd_set extends ffi.Struct { - @ffi.Array.multi([32]) - external ffi.Array<__int32_t> fds_bits; -} + /// Creates a snapshot that caches compiled code and type feedback for faster + /// startup and quicker warmup in a subsequent process. + /// + /// Outputs a snapshot in two pieces. The pieces should be passed to + /// Dart_CreateIsolateGroup in a VM using the same VM snapshot pieces used in the + /// current VM. The instructions piece must be loaded with read and execute + /// permissions; the data piece may be loaded as read-only. + /// + /// - Requires the VM to have not been started with --precompilation. + /// - Not supported when targeting IA32. + /// - The VM writing the snapshot and the VM reading the snapshot must be the + /// same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must + /// be targeting the same architecture, and must both be in checked mode or + /// both in unchecked mode. + /// + /// The buffers are scope allocated and are only valid until the next call to + /// Dart_ExitScope. + /// + /// \return A valid handle if no error occurs during the operation. + Object Dart_CreateAppJITSnapshotAsBlobs( + ffi.Pointer> isolate_snapshot_data_buffer, + ffi.Pointer isolate_snapshot_data_size, + ffi.Pointer> isolate_snapshot_instructions_buffer, + ffi.Pointer isolate_snapshot_instructions_size, + ) { + return _Dart_CreateAppJITSnapshotAsBlobs( + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + isolate_snapshot_instructions_buffer, + isolate_snapshot_instructions_size, + ); + } -typedef __int32_t = ffi.Int; + late final _Dart_CreateAppJITSnapshotAsBlobsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('Dart_CreateAppJITSnapshotAsBlobs'); + late final _Dart_CreateAppJITSnapshotAsBlobs = + _Dart_CreateAppJITSnapshotAsBlobsPtr.asFunction< + Object Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); -class objc_class extends ffi.Opaque {} + /// Like Dart_CreateAppJITSnapshotAsBlobs, but also creates a new VM snapshot. + Object Dart_CreateCoreJITSnapshotAsBlobs( + ffi.Pointer> vm_snapshot_data_buffer, + ffi.Pointer vm_snapshot_data_size, + ffi.Pointer> vm_snapshot_instructions_buffer, + ffi.Pointer vm_snapshot_instructions_size, + ffi.Pointer> isolate_snapshot_data_buffer, + ffi.Pointer isolate_snapshot_data_size, + ffi.Pointer> isolate_snapshot_instructions_buffer, + ffi.Pointer isolate_snapshot_instructions_size, + ) { + return _Dart_CreateCoreJITSnapshotAsBlobs( + vm_snapshot_data_buffer, + vm_snapshot_data_size, + vm_snapshot_instructions_buffer, + vm_snapshot_instructions_size, + isolate_snapshot_data_buffer, + isolate_snapshot_data_size, + isolate_snapshot_instructions_buffer, + isolate_snapshot_instructions_size, + ); + } -class objc_object extends ffi.Struct { - external ffi.Pointer isa; -} + late final _Dart_CreateCoreJITSnapshotAsBlobsPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('Dart_CreateCoreJITSnapshotAsBlobs'); + late final _Dart_CreateCoreJITSnapshotAsBlobs = + _Dart_CreateCoreJITSnapshotAsBlobsPtr.asFunction< + Object Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); -class ObjCObject extends ffi.Opaque {} + /// Get obfuscation map for precompiled code. + /// + /// Obfuscation map is encoded as a JSON array of pairs (original name, + /// obfuscated name). + /// + /// \return Returns an error handler if the VM was built in a mode that does not + /// support obfuscation. + Object Dart_GetObfuscationMap( + ffi.Pointer> buffer, + ffi.Pointer buffer_length, + ) { + return _Dart_GetObfuscationMap( + buffer, + buffer_length, + ); + } -class objc_selector extends ffi.Opaque {} + late final _Dart_GetObfuscationMapPtr = _lookup< + ffi.NativeFunction< + ffi.Handle Function(ffi.Pointer>, + ffi.Pointer)>>('Dart_GetObfuscationMap'); + late final _Dart_GetObfuscationMap = _Dart_GetObfuscationMapPtr.asFunction< + Object Function( + ffi.Pointer>, ffi.Pointer)>(); -class ObjCSel extends ffi.Opaque {} + /// Returns whether the VM only supports running from precompiled snapshots and + /// not from any other kind of snapshot or from source (that is, the VM was + /// compiled with DART_PRECOMPILED_RUNTIME). + bool Dart_IsPrecompiledRuntime() { + return _Dart_IsPrecompiledRuntime(); + } -typedef objc_objectptr_t = ffi.Pointer; + late final _Dart_IsPrecompiledRuntimePtr = + _lookup>( + 'Dart_IsPrecompiledRuntime'); + late final _Dart_IsPrecompiledRuntime = + _Dart_IsPrecompiledRuntimePtr.asFunction(); -class _NSZone extends ffi.Opaque {} + /// Print a native stack trace. Used for crash handling. + /// + /// If context is NULL, prints the current stack trace. Otherwise, context + /// should be a CONTEXT* (Windows) or ucontext_t* (POSIX) from a signal handler + /// running on the current thread. + void Dart_DumpNativeStackTrace( + ffi.Pointer context, + ) { + return _Dart_DumpNativeStackTrace( + context, + ); + } -class _ObjCWrapper implements ffi.Finalizable { - final ffi.Pointer _id; - final NativeCupertinoHttp _lib; - bool _pendingRelease; + late final _Dart_DumpNativeStackTracePtr = + _lookup)>>( + 'Dart_DumpNativeStackTrace'); + late final _Dart_DumpNativeStackTrace = _Dart_DumpNativeStackTracePtr + .asFunction)>(); - _ObjCWrapper._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._objc_retain(_id.cast()); - } - if (release) { - _lib._objc_releaseFinalizer2.attach(this, _id.cast(), detach: this); - } + /// Indicate that the process is about to abort, and the Dart VM should not + /// attempt to cleanup resources. + void Dart_PrepareToAbort() { + return _Dart_PrepareToAbort(); } - /// Releases the reference to the underlying ObjC object held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._objc_release(_id.cast()); - _lib._objc_releaseFinalizer2.detach(this); - } else { - throw StateError( - 'Released an ObjC object that was unowned or already released.'); - } - } + late final _Dart_PrepareToAbortPtr = + _lookup>('Dart_PrepareToAbort'); + late final _Dart_PrepareToAbort = + _Dart_PrepareToAbortPtr.asFunction(); - @override - bool operator ==(Object other) { - return other is _ObjCWrapper && _id == other._id; + /// Posts a message on some port. The message will contain the Dart_CObject + /// object graph rooted in 'message'. + /// + /// While the message is being sent the state of the graph of Dart_CObject + /// structures rooted in 'message' should not be accessed, as the message + /// generation will make temporary modifications to the data. When the message + /// has been sent the graph will be fully restored. + /// + /// If true is returned, the message was enqueued, and finalizers for external + /// typed data will eventually run, even if the receiving isolate shuts down + /// before processing the message. If false is returned, the message was not + /// enqueued and ownership of external typed data in the message remains with the + /// caller. + /// + /// This function may be called on any thread when the VM is running (that is, + /// after Dart_Initialize has returned and before Dart_Cleanup has been called). + /// + /// \param port_id The destination port. + /// \param message The message to send. + /// + /// \return True if the message was posted. + bool Dart_PostCObject( + int port_id, + ffi.Pointer message, + ) { + return _Dart_PostCObject( + port_id, + message, + ); } - @override - int get hashCode => _id.hashCode; -} - -class NSObject extends _ObjCWrapper { - NSObject._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final _Dart_PostCObjectPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + Dart_Port, ffi.Pointer)>>('Dart_PostCObject'); + late final _Dart_PostCObject = _Dart_PostCObjectPtr.asFunction< + bool Function(int, ffi.Pointer)>(); - /// Returns a [NSObject] that points to the same underlying object as [other]. - static NSObject castFrom(T other) { - return NSObject._(other._id, other._lib, retain: true, release: true); + /// Posts a message on some port. The message will contain the integer 'message'. + /// + /// \param port_id The destination port. + /// \param message The message to send. + /// + /// \return True if the message was posted. + bool Dart_PostInteger( + int port_id, + int message, + ) { + return _Dart_PostInteger( + port_id, + message, + ); } - /// Returns a [NSObject] that wraps the given raw object pointer. - static NSObject castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSObject._(other, lib, retain: retain, release: release); - } + late final _Dart_PostIntegerPtr = + _lookup>( + 'Dart_PostInteger'); + late final _Dart_PostInteger = + _Dart_PostIntegerPtr.asFunction(); - /// Returns whether [obj] is an instance of [NSObject]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); + /// Creates a new native port. When messages are received on this + /// native port, then they will be dispatched to the provided native + /// message handler. + /// + /// \param name The name of this port in debugging messages. + /// \param handler The C handler to run when messages arrive on the port. + /// \param handle_concurrently Is it okay to process requests on this + /// native port concurrently? + /// + /// \return If successful, returns the port id for the native port. In + /// case of error, returns ILLEGAL_PORT. + int Dart_NewNativePort( + ffi.Pointer name, + Dart_NativeMessageHandler handler, + bool handle_concurrently, + ) { + return _Dart_NewNativePort( + name, + handler, + handle_concurrently, + ); } - static void load(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); - } + late final _Dart_NewNativePortPtr = _lookup< + ffi.NativeFunction< + Dart_Port Function(ffi.Pointer, Dart_NativeMessageHandler, + ffi.Bool)>>('Dart_NewNativePort'); + late final _Dart_NewNativePort = _Dart_NewNativePortPtr.asFunction< + int Function(ffi.Pointer, Dart_NativeMessageHandler, bool)>(); - static void initialize(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); + /// Closes the native port with the given id. + /// + /// The port must have been allocated by a call to Dart_NewNativePort. + /// + /// \param native_port_id The id of the native port to close. + /// + /// \return Returns true if the port was closed successfully. + bool Dart_CloseNativePort( + int native_port_id, + ) { + return _Dart_CloseNativePort( + native_port_id, + ); } - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final _Dart_CloseNativePortPtr = + _lookup>( + 'Dart_CloseNativePort'); + late final _Dart_CloseNativePort = + _Dart_CloseNativePortPtr.asFunction(); - static NSObject new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); - return NSObject._(_ret, _lib, retain: false, release: true); + /// Forces all loaded classes and functions to be compiled eagerly in + /// the current isolate.. + /// + /// TODO(turnidge): Document. + Object Dart_CompileAll() { + return _Dart_CompileAll(); } - static NSObject allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } + late final _Dart_CompileAllPtr = + _lookup>('Dart_CompileAll'); + late final _Dart_CompileAll = + _Dart_CompileAllPtr.asFunction(); - static NSObject alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); + /// Finalizes all classes. + Object Dart_FinalizeAllClasses() { + return _Dart_FinalizeAllClasses(); } - void dealloc() { - return _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); - } + late final _Dart_FinalizeAllClassesPtr = + _lookup>( + 'Dart_FinalizeAllClasses'); + late final _Dart_FinalizeAllClasses = + _Dart_FinalizeAllClassesPtr.asFunction(); - void finalize() { - return _lib._objc_msgSend_1(_id, _lib._sel_finalize1); + /// This function is intentionally undocumented. + /// + /// It should not be used outside internal tests. + ffi.Pointer Dart_ExecuteInternalCommand( + ffi.Pointer command, + ffi.Pointer arg, + ) { + return _Dart_ExecuteInternalCommand( + command, + arg, + ); } - NSObject copy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); - return NSObject._(_ret, _lib, retain: false, release: true); - } + late final _Dart_ExecuteInternalCommandPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>('Dart_ExecuteInternalCommand'); + late final _Dart_ExecuteInternalCommand = + _Dart_ExecuteInternalCommandPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - NSObject mutableCopy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); - return NSObject._(_ret, _lib, retain: false, release: true); + /// \mainpage Dynamically Linked Dart API + /// + /// This exposes a subset of symbols from dart_api.h and dart_native_api.h + /// available in every Dart embedder through dynamic linking. + /// + /// All symbols are postfixed with _DL to indicate that they are dynamically + /// linked and to prevent conflicts with the original symbol. + /// + /// Link `dart_api_dl.c` file into your library and invoke + /// `Dart_InitializeApiDL` with `NativeApi.initializeApiDLData`. + int Dart_InitializeApiDL( + ffi.Pointer data, + ) { + return _Dart_InitializeApiDL( + data, + ); } - static NSObject copyWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } + late final _Dart_InitializeApiDLPtr = + _lookup)>>( + 'Dart_InitializeApiDL'); + late final _Dart_InitializeApiDL = _Dart_InitializeApiDLPtr.asFunction< + int Function(ffi.Pointer)>(); - static NSObject mutableCopyWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } + late final ffi.Pointer _Dart_PostCObject_DL = + _lookup('Dart_PostCObject_DL'); - static bool instancesRespondToSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4(_lib._class_NSObject1, - _lib._sel_instancesRespondToSelector_1, aSelector); - } + Dart_PostCObject_Type get Dart_PostCObject_DL => _Dart_PostCObject_DL.value; - static bool conformsToProtocol_( - NativeCupertinoHttp _lib, Protocol? protocol) { - return _lib._objc_msgSend_5(_lib._class_NSObject1, - _lib._sel_conformsToProtocol_1, protocol?._id ?? ffi.nullptr); - } + set Dart_PostCObject_DL(Dart_PostCObject_Type value) => + _Dart_PostCObject_DL.value = value; - IMP methodForSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); - } + late final ffi.Pointer _Dart_PostInteger_DL = + _lookup('Dart_PostInteger_DL'); - static IMP instanceMethodForSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_lib._class_NSObject1, - _lib._sel_instanceMethodForSelector_1, aSelector); - } + Dart_PostInteger_Type get Dart_PostInteger_DL => _Dart_PostInteger_DL.value; - void doesNotRecognizeSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_7( - _id, _lib._sel_doesNotRecognizeSelector_1, aSelector); - } + set Dart_PostInteger_DL(Dart_PostInteger_Type value) => + _Dart_PostInteger_DL.value = value; - NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_8( - _id, _lib._sel_forwardingTargetForSelector_1, aSelector); - return NSObject._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer _Dart_NewNativePort_DL = + _lookup('Dart_NewNativePort_DL'); - void forwardInvocation_(NSInvocation? anInvocation) { - return _lib._objc_msgSend_9( - _id, _lib._sel_forwardInvocation_1, anInvocation?._id ?? ffi.nullptr); - } + Dart_NewNativePort_Type get Dart_NewNativePort_DL => + _Dart_NewNativePort_DL.value; - NSMethodSignature methodSignatureForSelector_( - ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_10( - _id, _lib._sel_methodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } + set Dart_NewNativePort_DL(Dart_NewNativePort_Type value) => + _Dart_NewNativePort_DL.value = value; - static NSMethodSignature instanceMethodSignatureForSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_10(_lib._class_NSObject1, - _lib._sel_instanceMethodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer _Dart_CloseNativePort_DL = + _lookup('Dart_CloseNativePort_DL'); - bool allowsWeakReference() { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsWeakReference1); - } + Dart_CloseNativePort_Type get Dart_CloseNativePort_DL => + _Dart_CloseNativePort_DL.value; - bool retainWeakReference() { - return _lib._objc_msgSend_11(_id, _lib._sel_retainWeakReference1); - } + set Dart_CloseNativePort_DL(Dart_CloseNativePort_Type value) => + _Dart_CloseNativePort_DL.value = value; - static bool isSubclassOfClass_(NativeCupertinoHttp _lib, NSObject aClass) { - return _lib._objc_msgSend_0( - _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); - } + late final ffi.Pointer _Dart_IsError_DL = + _lookup('Dart_IsError_DL'); - static bool resolveClassMethod_( - NativeCupertinoHttp _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); - } + Dart_IsError_Type get Dart_IsError_DL => _Dart_IsError_DL.value; - static bool resolveInstanceMethod_( - NativeCupertinoHttp _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); - } + set Dart_IsError_DL(Dart_IsError_Type value) => + _Dart_IsError_DL.value = value; - static int hash(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); - } + late final ffi.Pointer _Dart_IsApiError_DL = + _lookup('Dart_IsApiError_DL'); - static NSObject superclass(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + Dart_IsApiError_Type get Dart_IsApiError_DL => _Dart_IsApiError_DL.value; - static NSObject class1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + set Dart_IsApiError_DL(Dart_IsApiError_Type value) => + _Dart_IsApiError_DL.value = value; - static NSString description(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_32(_lib._class_NSObject1, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_IsUnhandledExceptionError_DL = + _lookup( + 'Dart_IsUnhandledExceptionError_DL'); - static NSString debugDescription(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_32( - _lib._class_NSObject1, _lib._sel_debugDescription1); - return NSString._(_ret, _lib, retain: true, release: true); - } + Dart_IsUnhandledExceptionError_Type get Dart_IsUnhandledExceptionError_DL => + _Dart_IsUnhandledExceptionError_DL.value; - static int version(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_81(_lib._class_NSObject1, _lib._sel_version1); - } + set Dart_IsUnhandledExceptionError_DL( + Dart_IsUnhandledExceptionError_Type value) => + _Dart_IsUnhandledExceptionError_DL.value = value; - static void setVersion_(NativeCupertinoHttp _lib, int aVersion) { - return _lib._objc_msgSend_275( - _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); - } + late final ffi.Pointer + _Dart_IsCompilationError_DL = + _lookup('Dart_IsCompilationError_DL'); - NSObject get classForCoder { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + Dart_IsCompilationError_Type get Dart_IsCompilationError_DL => + _Dart_IsCompilationError_DL.value; - NSObject replacementObjectForCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_replacementObjectForCoder_1, coder?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + set Dart_IsCompilationError_DL(Dart_IsCompilationError_Type value) => + _Dart_IsCompilationError_DL.value = value; - NSObject awakeAfterUsingCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_awakeAfterUsingCoder_1, coder?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: false, release: true); - } + late final ffi.Pointer _Dart_IsFatalError_DL = + _lookup('Dart_IsFatalError_DL'); - static void poseAsClass_(NativeCupertinoHttp _lib, NSObject aClass) { - return _lib._objc_msgSend_200( - _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); - } + Dart_IsFatalError_Type get Dart_IsFatalError_DL => + _Dart_IsFatalError_DL.value; - NSObject get autoContentAccessingProxy { - final _ret = - _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + set Dart_IsFatalError_DL(Dart_IsFatalError_Type value) => + _Dart_IsFatalError_DL.value = value; - void URL_resourceDataDidBecomeAvailable_(NSURL? sender, NSData? newBytes) { - return _lib._objc_msgSend_276( - _id, - _lib._sel_URL_resourceDataDidBecomeAvailable_1, - sender?._id ?? ffi.nullptr, - newBytes?._id ?? ffi.nullptr); - } + late final ffi.Pointer _Dart_GetError_DL = + _lookup('Dart_GetError_DL'); - void URLResourceDidFinishLoading_(NSURL? sender) { - return _lib._objc_msgSend_277(_id, _lib._sel_URLResourceDidFinishLoading_1, - sender?._id ?? ffi.nullptr); - } + Dart_GetError_Type get Dart_GetError_DL => _Dart_GetError_DL.value; - void URLResourceDidCancelLoading_(NSURL? sender) { - return _lib._objc_msgSend_277(_id, _lib._sel_URLResourceDidCancelLoading_1, - sender?._id ?? ffi.nullptr); - } + set Dart_GetError_DL(Dart_GetError_Type value) => + _Dart_GetError_DL.value = value; - void URL_resourceDidFailLoadingWithReason_(NSURL? sender, NSString? reason) { - return _lib._objc_msgSend_278( - _id, - _lib._sel_URL_resourceDidFailLoadingWithReason_1, - sender?._id ?? ffi.nullptr, - reason?._id ?? ffi.nullptr); - } + late final ffi.Pointer + _Dart_ErrorHasException_DL = + _lookup('Dart_ErrorHasException_DL'); - /// Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: - /// - /// - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; - /// - /// The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. - void - attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( - NSError? error, - int recoveryOptionIndex, - NSObject delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo) { - return _lib._objc_msgSend_279( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, - error?._id ?? ffi.nullptr, - recoveryOptionIndex, - delegate._id, - didRecoverSelector, - contextInfo); - } + Dart_ErrorHasException_Type get Dart_ErrorHasException_DL => + _Dart_ErrorHasException_DL.value; - /// Given that an error alert has been presented applicaton-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and return YES if error recovery was completely successful, NO otherwise. The recovery option index is an index into the error's array of localized recovery options. - bool attemptRecoveryFromError_optionIndex_( - NSError? error, int recoveryOptionIndex) { - return _lib._objc_msgSend_280( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_1, - error?._id ?? ffi.nullptr, - recoveryOptionIndex); - } -} + set Dart_ErrorHasException_DL(Dart_ErrorHasException_Type value) => + _Dart_ErrorHasException_DL.value = value; -typedef instancetype = ffi.Pointer; + late final ffi.Pointer + _Dart_ErrorGetException_DL = + _lookup('Dart_ErrorGetException_DL'); -class Protocol extends _ObjCWrapper { - Protocol._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + Dart_ErrorGetException_Type get Dart_ErrorGetException_DL => + _Dart_ErrorGetException_DL.value; - /// Returns a [Protocol] that points to the same underlying object as [other]. - static Protocol castFrom(T other) { - return Protocol._(other._id, other._lib, retain: true, release: true); - } + set Dart_ErrorGetException_DL(Dart_ErrorGetException_Type value) => + _Dart_ErrorGetException_DL.value = value; - /// Returns a [Protocol] that wraps the given raw object pointer. - static Protocol castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return Protocol._(other, lib, retain: retain, release: release); - } + late final ffi.Pointer + _Dart_ErrorGetStackTrace_DL = + _lookup('Dart_ErrorGetStackTrace_DL'); - /// Returns whether [obj] is an instance of [Protocol]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); - } -} + Dart_ErrorGetStackTrace_Type get Dart_ErrorGetStackTrace_DL => + _Dart_ErrorGetStackTrace_DL.value; -typedef IMP = ffi.Pointer>; + set Dart_ErrorGetStackTrace_DL(Dart_ErrorGetStackTrace_Type value) => + _Dart_ErrorGetStackTrace_DL.value = value; -class NSInvocation extends _ObjCWrapper { - NSInvocation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final ffi.Pointer _Dart_NewApiError_DL = + _lookup('Dart_NewApiError_DL'); - /// Returns a [NSInvocation] that points to the same underlying object as [other]. - static NSInvocation castFrom(T other) { - return NSInvocation._(other._id, other._lib, retain: true, release: true); - } + Dart_NewApiError_Type get Dart_NewApiError_DL => _Dart_NewApiError_DL.value; - /// Returns a [NSInvocation] that wraps the given raw object pointer. - static NSInvocation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInvocation._(other, lib, retain: retain, release: release); - } + set Dart_NewApiError_DL(Dart_NewApiError_Type value) => + _Dart_NewApiError_DL.value = value; - /// Returns whether [obj] is an instance of [NSInvocation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInvocation1); - } -} + late final ffi.Pointer + _Dart_NewCompilationError_DL = + _lookup('Dart_NewCompilationError_DL'); -class NSMethodSignature extends _ObjCWrapper { - NSMethodSignature._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + Dart_NewCompilationError_Type get Dart_NewCompilationError_DL => + _Dart_NewCompilationError_DL.value; - /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. - static NSMethodSignature castFrom(T other) { - return NSMethodSignature._(other._id, other._lib, - retain: true, release: true); - } + set Dart_NewCompilationError_DL(Dart_NewCompilationError_Type value) => + _Dart_NewCompilationError_DL.value = value; - /// Returns a [NSMethodSignature] that wraps the given raw object pointer. - static NSMethodSignature castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMethodSignature._(other, lib, retain: retain, release: release); - } + late final ffi.Pointer + _Dart_NewUnhandledExceptionError_DL = + _lookup( + 'Dart_NewUnhandledExceptionError_DL'); - /// Returns whether [obj] is an instance of [NSMethodSignature]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMethodSignature1); - } -} + Dart_NewUnhandledExceptionError_Type get Dart_NewUnhandledExceptionError_DL => + _Dart_NewUnhandledExceptionError_DL.value; -typedef NSUInteger = ffi.UnsignedLong; + set Dart_NewUnhandledExceptionError_DL( + Dart_NewUnhandledExceptionError_Type value) => + _Dart_NewUnhandledExceptionError_DL.value = value; -class NSString extends NSObject { - NSString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + late final ffi.Pointer _Dart_PropagateError_DL = + _lookup('Dart_PropagateError_DL'); - /// Returns a [NSString] that points to the same underlying object as [other]. - static NSString castFrom(T other) { - return NSString._(other._id, other._lib, retain: true, release: true); - } + Dart_PropagateError_Type get Dart_PropagateError_DL => + _Dart_PropagateError_DL.value; - /// Returns a [NSString] that wraps the given raw object pointer. - static NSString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSString._(other, lib, retain: retain, release: release); - } + set Dart_PropagateError_DL(Dart_PropagateError_Type value) => + _Dart_PropagateError_DL.value = value; - /// Returns whether [obj] is an instance of [NSString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); - } + late final ffi.Pointer + _Dart_HandleFromPersistent_DL = + _lookup('Dart_HandleFromPersistent_DL'); - factory NSString(NativeCupertinoHttp _lib, String str) { - final cstr = str.toNativeUtf16(); - final nsstr = stringWithCharacters_length_(_lib, cstr.cast(), str.length); - pkg_ffi.calloc.free(cstr); - return nsstr; - } + Dart_HandleFromPersistent_Type get Dart_HandleFromPersistent_DL => + _Dart_HandleFromPersistent_DL.value; - @override - String toString() { - final data = - dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); - return data.bytes.cast().toDartString(length: length); - } + set Dart_HandleFromPersistent_DL(Dart_HandleFromPersistent_Type value) => + _Dart_HandleFromPersistent_DL.value = value; - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); - } + late final ffi.Pointer + _Dart_HandleFromWeakPersistent_DL = + _lookup( + 'Dart_HandleFromWeakPersistent_DL'); - int characterAtIndex_(int index) { - return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); - } + Dart_HandleFromWeakPersistent_Type get Dart_HandleFromWeakPersistent_DL => + _Dart_HandleFromWeakPersistent_DL.value; - @override - NSString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSString._(_ret, _lib, retain: true, release: true); - } + set Dart_HandleFromWeakPersistent_DL( + Dart_HandleFromWeakPersistent_Type value) => + _Dart_HandleFromWeakPersistent_DL.value = value; - NSString initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_NewPersistentHandle_DL = + _lookup('Dart_NewPersistentHandle_DL'); - NSString substringFromIndex_(int from) { - final _ret = - _lib._objc_msgSend_15(_id, _lib._sel_substringFromIndex_1, from); - return NSString._(_ret, _lib, retain: true, release: true); - } + Dart_NewPersistentHandle_Type get Dart_NewPersistentHandle_DL => + _Dart_NewPersistentHandle_DL.value; - NSString substringToIndex_(int to) { - final _ret = _lib._objc_msgSend_15(_id, _lib._sel_substringToIndex_1, to); - return NSString._(_ret, _lib, retain: true, release: true); - } + set Dart_NewPersistentHandle_DL(Dart_NewPersistentHandle_Type value) => + _Dart_NewPersistentHandle_DL.value = value; - NSString substringWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_16(_id, _lib._sel_substringWithRange_1, range); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer + _Dart_SetPersistentHandle_DL = + _lookup('Dart_SetPersistentHandle_DL'); - void getCharacters_range_(ffi.Pointer buffer, NSRange range) { - return _lib._objc_msgSend_17( - _id, _lib._sel_getCharacters_range_1, buffer, range); - } + Dart_SetPersistentHandle_Type get Dart_SetPersistentHandle_DL => + _Dart_SetPersistentHandle_DL.value; - int compare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_compare_1, string?._id ?? ffi.nullptr); - } + set Dart_SetPersistentHandle_DL(Dart_SetPersistentHandle_Type value) => + _Dart_SetPersistentHandle_DL.value = value; - int compare_options_(NSString? string, int mask) { - return _lib._objc_msgSend_19( - _id, _lib._sel_compare_options_1, string?._id ?? ffi.nullptr, mask); - } + late final ffi.Pointer + _Dart_DeletePersistentHandle_DL = + _lookup( + 'Dart_DeletePersistentHandle_DL'); - int compare_options_range_( - NSString? string, int mask, NSRange rangeOfReceiverToCompare) { - return _lib._objc_msgSend_20(_id, _lib._sel_compare_options_range_1, - string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare); - } + Dart_DeletePersistentHandle_Type get Dart_DeletePersistentHandle_DL => + _Dart_DeletePersistentHandle_DL.value; - int compare_options_range_locale_(NSString? string, int mask, - NSRange rangeOfReceiverToCompare, NSObject locale) { - return _lib._objc_msgSend_21(_id, _lib._sel_compare_options_range_locale_1, - string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare, locale._id); - } + set Dart_DeletePersistentHandle_DL(Dart_DeletePersistentHandle_Type value) => + _Dart_DeletePersistentHandle_DL.value = value; - int caseInsensitiveCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_caseInsensitiveCompare_1, string?._id ?? ffi.nullptr); - } + late final ffi.Pointer + _Dart_NewWeakPersistentHandle_DL = + _lookup( + 'Dart_NewWeakPersistentHandle_DL'); - int localizedCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_localizedCompare_1, string?._id ?? ffi.nullptr); - } + Dart_NewWeakPersistentHandle_Type get Dart_NewWeakPersistentHandle_DL => + _Dart_NewWeakPersistentHandle_DL.value; - int localizedCaseInsensitiveCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, - _lib._sel_localizedCaseInsensitiveCompare_1, - string?._id ?? ffi.nullptr); - } + set Dart_NewWeakPersistentHandle_DL( + Dart_NewWeakPersistentHandle_Type value) => + _Dart_NewWeakPersistentHandle_DL.value = value; - int localizedStandardCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_localizedStandardCompare_1, string?._id ?? ffi.nullptr); - } + late final ffi.Pointer + _Dart_DeleteWeakPersistentHandle_DL = + _lookup( + 'Dart_DeleteWeakPersistentHandle_DL'); - bool isEqualToString_(NSString? aString) { - return _lib._objc_msgSend_22( - _id, _lib._sel_isEqualToString_1, aString?._id ?? ffi.nullptr); - } + Dart_DeleteWeakPersistentHandle_Type get Dart_DeleteWeakPersistentHandle_DL => + _Dart_DeleteWeakPersistentHandle_DL.value; - bool hasPrefix_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_hasPrefix_1, str?._id ?? ffi.nullptr); - } + set Dart_DeleteWeakPersistentHandle_DL( + Dart_DeleteWeakPersistentHandle_Type value) => + _Dart_DeleteWeakPersistentHandle_DL.value = value; - bool hasSuffix_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_hasSuffix_1, str?._id ?? ffi.nullptr); - } + late final ffi.Pointer + _Dart_UpdateExternalSize_DL = + _lookup('Dart_UpdateExternalSize_DL'); - NSString commonPrefixWithString_options_(NSString? str, int mask) { - final _ret = _lib._objc_msgSend_23( - _id, - _lib._sel_commonPrefixWithString_options_1, - str?._id ?? ffi.nullptr, - mask); - return NSString._(_ret, _lib, retain: true, release: true); - } + Dart_UpdateExternalSize_Type get Dart_UpdateExternalSize_DL => + _Dart_UpdateExternalSize_DL.value; - bool containsString_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_containsString_1, str?._id ?? ffi.nullptr); - } + set Dart_UpdateExternalSize_DL(Dart_UpdateExternalSize_Type value) => + _Dart_UpdateExternalSize_DL.value = value; - bool localizedCaseInsensitiveContainsString_(NSString? str) { - return _lib._objc_msgSend_22( - _id, - _lib._sel_localizedCaseInsensitiveContainsString_1, - str?._id ?? ffi.nullptr); - } + late final ffi.Pointer + _Dart_NewFinalizableHandle_DL = + _lookup('Dart_NewFinalizableHandle_DL'); - bool localizedStandardContainsString_(NSString? str) { - return _lib._objc_msgSend_22(_id, - _lib._sel_localizedStandardContainsString_1, str?._id ?? ffi.nullptr); - } + Dart_NewFinalizableHandle_Type get Dart_NewFinalizableHandle_DL => + _Dart_NewFinalizableHandle_DL.value; - NSRange localizedStandardRangeOfString_(NSString? str) { - return _lib._objc_msgSend_24(_id, - _lib._sel_localizedStandardRangeOfString_1, str?._id ?? ffi.nullptr); - } + set Dart_NewFinalizableHandle_DL(Dart_NewFinalizableHandle_Type value) => + _Dart_NewFinalizableHandle_DL.value = value; - NSRange rangeOfString_(NSString? searchString) { - return _lib._objc_msgSend_24( - _id, _lib._sel_rangeOfString_1, searchString?._id ?? ffi.nullptr); - } + late final ffi.Pointer + _Dart_DeleteFinalizableHandle_DL = + _lookup( + 'Dart_DeleteFinalizableHandle_DL'); - NSRange rangeOfString_options_(NSString? searchString, int mask) { - return _lib._objc_msgSend_25(_id, _lib._sel_rangeOfString_options_1, - searchString?._id ?? ffi.nullptr, mask); - } + Dart_DeleteFinalizableHandle_Type get Dart_DeleteFinalizableHandle_DL => + _Dart_DeleteFinalizableHandle_DL.value; - NSRange rangeOfString_options_range_( - NSString? searchString, int mask, NSRange rangeOfReceiverToSearch) { - return _lib._objc_msgSend_26(_id, _lib._sel_rangeOfString_options_range_1, - searchString?._id ?? ffi.nullptr, mask, rangeOfReceiverToSearch); - } + set Dart_DeleteFinalizableHandle_DL( + Dart_DeleteFinalizableHandle_Type value) => + _Dart_DeleteFinalizableHandle_DL.value = value; - NSRange rangeOfString_options_range_locale_(NSString? searchString, int mask, - NSRange rangeOfReceiverToSearch, NSLocale? locale) { - return _lib._objc_msgSend_27( - _id, - _lib._sel_rangeOfString_options_range_locale_1, - searchString?._id ?? ffi.nullptr, - mask, - rangeOfReceiverToSearch, - locale?._id ?? ffi.nullptr); - } + late final ffi.Pointer + _Dart_UpdateFinalizableExternalSize_DL = + _lookup( + 'Dart_UpdateFinalizableExternalSize_DL'); - NSRange rangeOfCharacterFromSet_(NSCharacterSet? searchSet) { - return _lib._objc_msgSend_228(_id, _lib._sel_rangeOfCharacterFromSet_1, - searchSet?._id ?? ffi.nullptr); - } + Dart_UpdateFinalizableExternalSize_Type + get Dart_UpdateFinalizableExternalSize_DL => + _Dart_UpdateFinalizableExternalSize_DL.value; - NSRange rangeOfCharacterFromSet_options_( - NSCharacterSet? searchSet, int mask) { - return _lib._objc_msgSend_229( - _id, - _lib._sel_rangeOfCharacterFromSet_options_1, - searchSet?._id ?? ffi.nullptr, - mask); - } + set Dart_UpdateFinalizableExternalSize_DL( + Dart_UpdateFinalizableExternalSize_Type value) => + _Dart_UpdateFinalizableExternalSize_DL.value = value; - NSRange rangeOfCharacterFromSet_options_range_( - NSCharacterSet? searchSet, int mask, NSRange rangeOfReceiverToSearch) { - return _lib._objc_msgSend_230( - _id, - _lib._sel_rangeOfCharacterFromSet_options_range_1, - searchSet?._id ?? ffi.nullptr, - mask, - rangeOfReceiverToSearch); - } + late final ffi.Pointer _Dart_Post_DL = + _lookup('Dart_Post_DL'); - NSRange rangeOfComposedCharacterSequenceAtIndex_(int index) { - return _lib._objc_msgSend_231( - _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); - } + Dart_Post_Type get Dart_Post_DL => _Dart_Post_DL.value; - NSRange rangeOfComposedCharacterSequencesForRange_(NSRange range) { - return _lib._objc_msgSend_232( - _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); - } + set Dart_Post_DL(Dart_Post_Type value) => _Dart_Post_DL.value = value; - NSString stringByAppendingString_(NSString? aString) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_stringByAppendingString_1, aString?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer _Dart_NewSendPort_DL = + _lookup('Dart_NewSendPort_DL'); - NSString stringByAppendingFormat_(NSString? format) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_stringByAppendingFormat_1, format?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + Dart_NewSendPort_Type get Dart_NewSendPort_DL => _Dart_NewSendPort_DL.value; - double get doubleValue { - return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); - } + set Dart_NewSendPort_DL(Dart_NewSendPort_Type value) => + _Dart_NewSendPort_DL.value = value; - double get floatValue { - return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); - } + late final ffi.Pointer _Dart_SendPortGetId_DL = + _lookup('Dart_SendPortGetId_DL'); - int get intValue { - return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); - } + Dart_SendPortGetId_Type get Dart_SendPortGetId_DL => + _Dart_SendPortGetId_DL.value; - int get integerValue { - return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); - } + set Dart_SendPortGetId_DL(Dart_SendPortGetId_Type value) => + _Dart_SendPortGetId_DL.value = value; - int get longLongValue { - return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); - } + late final ffi.Pointer _Dart_EnterScope_DL = + _lookup('Dart_EnterScope_DL'); - bool get boolValue { - return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); - } + Dart_EnterScope_Type get Dart_EnterScope_DL => _Dart_EnterScope_DL.value; - NSString? get uppercaseString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_uppercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + set Dart_EnterScope_DL(Dart_EnterScope_Type value) => + _Dart_EnterScope_DL.value = value; - NSString? get lowercaseString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lowercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final ffi.Pointer _Dart_ExitScope_DL = + _lookup('Dart_ExitScope_DL'); - NSString? get capitalizedString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_capitalizedString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + Dart_ExitScope_Type get Dart_ExitScope_DL => _Dart_ExitScope_DL.value; - NSString? get localizedUppercaseString { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedUppercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + set Dart_ExitScope_DL(Dart_ExitScope_Type value) => + _Dart_ExitScope_DL.value = value; - NSString? get localizedLowercaseString { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedLowercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + late final _class_CUPHTTPTaskConfiguration1 = + _getClass1("CUPHTTPTaskConfiguration"); + late final _sel_initWithPort_1 = _registerName1("initWithPort:"); + ffi.Pointer _objc_msgSend_477( + ffi.Pointer obj, + ffi.Pointer sel, + int sendPort, + ) { + return __objc_msgSend_477( + obj, + sel, + sendPort, + ); } - NSString? get localizedCapitalizedString { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedCapitalizedString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_477Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, Dart_Port)>>('objc_msgSend'); + late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - NSString uppercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_233( - _id, _lib._sel_uppercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + late final _sel_sendPort1 = _registerName1("sendPort"); + late final _class_CUPHTTPClientDelegate1 = + _getClass1("CUPHTTPClientDelegate"); + late final _sel_registerTask_withConfiguration_1 = + _registerName1("registerTask:withConfiguration:"); + void _objc_msgSend_478( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer config, + ) { + return __objc_msgSend_478( + obj, + sel, + task, + config, + ); } - NSString lowercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_233( - _id, _lib._sel_lowercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_478Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSString capitalizedStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_233(_id, - _lib._sel_capitalizedStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + late final _class_CUPHTTPForwardedDelegate1 = + _getClass1("CUPHTTPForwardedDelegate"); + late final _sel_initWithSession_task_1 = + _registerName1("initWithSession:task:"); + ffi.Pointer _objc_msgSend_479( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ) { + return __objc_msgSend_479( + obj, + sel, + session, + task, + ); } - void getLineStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - NSRange range) { - return _lib._objc_msgSend_234( - _id, - _lib._sel_getLineStart_end_contentsEnd_forRange_1, - startPtr, - lineEndPtr, - contentsEndPtr, - range); - } + late final __objc_msgSend_479Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - NSRange lineRangeForRange_(NSRange range) { - return _lib._objc_msgSend_232(_id, _lib._sel_lineRangeForRange_1, range); + late final _sel_finish1 = _registerName1("finish"); + late final _sel_session1 = _registerName1("session"); + late final _sel_task1 = _registerName1("task"); + ffi.Pointer _objc_msgSend_480( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_480( + obj, + sel, + ); } - void getParagraphStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer parEndPtr, - ffi.Pointer contentsEndPtr, - NSRange range) { - return _lib._objc_msgSend_234( - _id, - _lib._sel_getParagraphStart_end_contentsEnd_forRange_1, - startPtr, - parEndPtr, - contentsEndPtr, - range); - } + late final __objc_msgSend_480Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - NSRange paragraphRangeForRange_(NSRange range) { - return _lib._objc_msgSend_232( - _id, _lib._sel_paragraphRangeForRange_1, range); + late final _class_NSLock1 = _getClass1("NSLock"); + late final _sel_lock1 = _registerName1("lock"); + ffi.Pointer _objc_msgSend_481( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_481( + obj, + sel, + ); } - void enumerateSubstringsInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock13 block) { - return _lib._objc_msgSend_235( - _id, - _lib._sel_enumerateSubstringsInRange_options_usingBlock_1, - range, - opts, - block._id); - } + late final __objc_msgSend_481Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - void enumerateLinesUsingBlock_(ObjCBlock14 block) { - return _lib._objc_msgSend_236( - _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); + late final _class_CUPHTTPForwardedRedirect1 = + _getClass1("CUPHTTPForwardedRedirect"); + late final _sel_initWithSession_task_response_request_1 = + _registerName1("initWithSession:task:response:request:"); + ffi.Pointer _objc_msgSend_482( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer response, + ffi.Pointer request, + ) { + return __objc_msgSend_482( + obj, + sel, + session, + task, + response, + request, + ); } - ffi.Pointer get UTF8String { - return _lib._objc_msgSend_53(_id, _lib._sel_UTF8String1); - } + late final __objc_msgSend_482Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - int get fastestEncoding { - return _lib._objc_msgSend_12(_id, _lib._sel_fastestEncoding1); + late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); + void _objc_msgSend_483( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer request, + ) { + return __objc_msgSend_483( + obj, + sel, + request, + ); } - int get smallestEncoding { - return _lib._objc_msgSend_12(_id, _lib._sel_smallestEncoding1); - } + late final __objc_msgSend_483Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - NSData dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { - final _ret = _lib._objc_msgSend_237(_id, - _lib._sel_dataUsingEncoding_allowLossyConversion_1, encoding, lossy); - return NSData._(_ret, _lib, retain: true, release: true); + ffi.Pointer _objc_msgSend_484( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_484( + obj, + sel, + ); } - NSData dataUsingEncoding_(int encoding) { - final _ret = - _lib._objc_msgSend_238(_id, _lib._sel_dataUsingEncoding_1, encoding); - return NSData._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_484Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - bool canBeConvertedToEncoding_(int encoding) { - return _lib._objc_msgSend_117( - _id, _lib._sel_canBeConvertedToEncoding_1, encoding); - } - - ffi.Pointer cStringUsingEncoding_(int encoding) { - return _lib._objc_msgSend_239( - _id, _lib._sel_cStringUsingEncoding_1, encoding); + late final _sel_redirectRequest1 = _registerName1("redirectRequest"); + late final _class_CUPHTTPForwardedResponse1 = + _getClass1("CUPHTTPForwardedResponse"); + late final _sel_initWithSession_task_response_1 = + _registerName1("initWithSession:task:response:"); + ffi.Pointer _objc_msgSend_485( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer response, + ) { + return __objc_msgSend_485( + obj, + sel, + session, + task, + response, + ); } - bool getCString_maxLength_encoding_( - ffi.Pointer buffer, int maxBufferCount, int encoding) { - return _lib._objc_msgSend_240( - _id, - _lib._sel_getCString_maxLength_encoding_1, - buffer, - maxBufferCount, - encoding); - } + late final __objc_msgSend_485Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, - NSRange range, - NSRangePointer leftover) { - return _lib._objc_msgSend_241( - _id, - _lib._sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover); + late final _sel_finishWithDisposition_1 = + _registerName1("finishWithDisposition:"); + void _objc_msgSend_486( + ffi.Pointer obj, + ffi.Pointer sel, + int disposition, + ) { + return __objc_msgSend_486( + obj, + sel, + disposition, + ); } - int maximumLengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_114( - _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); - } + late final __objc_msgSend_486Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - int lengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_114( - _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); + late final _sel_disposition1 = _registerName1("disposition"); + int _objc_msgSend_487( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_487( + obj, + sel, + ); } - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSString1, _lib._sel_availableStringEncodings1); - } + late final __objc_msgSend_487Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + late final _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); + late final _sel_initWithSession_task_data_1 = + _registerName1("initWithSession:task:data:"); + ffi.Pointer _objc_msgSend_488( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer data, + ) { + return __objc_msgSend_488( + obj, + sel, + session, + task, + data, + ); } - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); - } + late final __objc_msgSend_488Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - NSString? get decomposedStringWithCanonicalMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_decomposedStringWithCanonicalMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + late final _class_CUPHTTPForwardedComplete1 = + _getClass1("CUPHTTPForwardedComplete"); + late final _sel_initWithSession_task_error_1 = + _registerName1("initWithSession:task:error:"); + ffi.Pointer _objc_msgSend_489( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer task, + ffi.Pointer error, + ) { + return __objc_msgSend_489( + obj, + sel, + session, + task, + error, + ); } - NSString? get precomposedStringWithCanonicalMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_precomposedStringWithCanonicalMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_489Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - NSString? get decomposedStringWithCompatibilityMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_decomposedStringWithCompatibilityMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + late final _class_CUPHTTPForwardedFinishedDownloading1 = + _getClass1("CUPHTTPForwardedFinishedDownloading"); + late final _sel_initWithSession_downloadTask_url_1 = + _registerName1("initWithSession:downloadTask:url:"); + ffi.Pointer _objc_msgSend_490( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer downloadTask, + ffi.Pointer location, + ) { + return __objc_msgSend_490( + obj, + sel, + session, + downloadTask, + location, + ); } - NSString? get precomposedStringWithCompatibilityMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_precomposedStringWithCompatibilityMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + late final __objc_msgSend_490Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - NSArray componentsSeparatedByString_(NSString? separator) { - final _ret = _lib._objc_msgSend_159(_id, - _lib._sel_componentsSeparatedByString_1, separator?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } + late final _sel_location1 = _registerName1("location"); +} - NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet? separator) { - final _ret = _lib._objc_msgSend_243( - _id, - _lib._sel_componentsSeparatedByCharactersInSet_1, - separator?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } +final class __mbstate_t extends ffi.Union { + @ffi.Array.multi([128]) + external ffi.Array __mbstate8; - NSString stringByTrimmingCharactersInSet_(NSCharacterSet? set) { - final _ret = _lib._objc_msgSend_244(_id, - _lib._sel_stringByTrimmingCharactersInSet_1, set?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.LongLong() + external int _mbstateL; +} - NSString stringByPaddingToLength_withString_startingAtIndex_( - int newLength, NSString? padString, int padIndex) { - final _ret = _lib._objc_msgSend_245( - _id, - _lib._sel_stringByPaddingToLength_withString_startingAtIndex_1, - newLength, - padString?._id ?? ffi.nullptr, - padIndex); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class __darwin_pthread_handler_rec extends ffi.Struct { + external ffi + .Pointer)>> + __routine; - NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { - final _ret = _lib._objc_msgSend_246( - _id, - _lib._sel_stringByFoldingWithOptions_locale_1, - options, - locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer __arg; - NSString stringByReplacingOccurrencesOfString_withString_options_range_( - NSString? target, - NSString? replacement, - int options, - NSRange searchRange) { - final _ret = _lib._objc_msgSend_247( - _id, - _lib._sel_stringByReplacingOccurrencesOfString_withString_options_range_1, - target?._id ?? ffi.nullptr, - replacement?._id ?? ffi.nullptr, - options, - searchRange); - return NSString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer<__darwin_pthread_handler_rec> __next; +} - NSString stringByReplacingOccurrencesOfString_withString_( - NSString? target, NSString? replacement) { - final _ret = _lib._objc_msgSend_248( - _id, - _lib._sel_stringByReplacingOccurrencesOfString_withString_1, - target?._id ?? ffi.nullptr, - replacement?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class _opaque_pthread_attr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - NSString stringByReplacingCharactersInRange_withString_( - NSRange range, NSString? replacement) { - final _ret = _lib._objc_msgSend_249( - _id, - _lib._sel_stringByReplacingCharactersInRange_withString_1, - range, - replacement?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([56]) + external ffi.Array __opaque; +} - NSString stringByApplyingTransform_reverse_( - NSStringTransform transform, bool reverse) { - final _ret = _lib._objc_msgSend_250( - _id, _lib._sel_stringByApplyingTransform_reverse_1, transform, reverse); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class _opaque_pthread_cond_t extends ffi.Struct { + @ffi.Long() + external int __sig; - bool writeToURL_atomically_encoding_error_(NSURL? url, bool useAuxiliaryFile, - int enc, ffi.Pointer> error) { - return _lib._objc_msgSend_251( - _id, - _lib._sel_writeToURL_atomically_encoding_error_1, - url?._id ?? ffi.nullptr, - useAuxiliaryFile, - enc, - error); - } + @ffi.Array.multi([40]) + external ffi.Array __opaque; +} - bool writeToFile_atomically_encoding_error_( - NSString? path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error) { - return _lib._objc_msgSend_252( - _id, - _lib._sel_writeToFile_atomically_encoding_error_1, - path?._id ?? ffi.nullptr, - useAuxiliaryFile, - enc, - error); - } +final class _opaque_pthread_condattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} - int get hash { - return _lib._objc_msgSend_12(_id, _lib._sel_hash1); - } +final class _opaque_pthread_mutex_t extends ffi.Struct { + @ffi.Long() + external int __sig; - NSString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_253( - _id, - _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, - characters, - length, - freeBuffer); - return NSString._(_ret, _lib, retain: false, release: true); - } + @ffi.Array.multi([56]) + external ffi.Array __opaque; +} - NSString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, int len, ObjCBlock15 deallocator) { - final _ret = _lib._objc_msgSend_254( - _id, - _lib._sel_initWithCharactersNoCopy_length_deallocator_1, - chars, - len, - deallocator._id); - return NSString._(_ret, _lib, retain: false, release: true); - } +final class _opaque_pthread_mutexattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - NSString initWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255( - _id, _lib._sel_initWithCharacters_length_1, characters, length); - return NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} - NSString initWithUTF8String_(ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256( - _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class _opaque_pthread_once_t extends ffi.Struct { + @ffi.Long() + external int __sig; - NSString initWithString_(NSString? aString) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, aString?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} - NSString initWithFormat_(NSString? format) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithFormat_1, format?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class _opaque_pthread_rwlock_t extends ffi.Struct { + @ffi.Long() + external int __sig; - NSString initWithFormat_arguments_(NSString? format, va_list argList) { - final _ret = _lib._objc_msgSend_257( - _id, - _lib._sel_initWithFormat_arguments_1, - format?._id ?? ffi.nullptr, - argList); - return NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([192]) + external ffi.Array __opaque; +} - NSString initWithFormat_locale_(NSString? format, NSObject locale) { - final _ret = _lib._objc_msgSend_258(_id, _lib._sel_initWithFormat_locale_1, - format?._id ?? ffi.nullptr, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class _opaque_pthread_rwlockattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - NSString initWithFormat_locale_arguments_( - NSString? format, NSObject locale, va_list argList) { - final _ret = _lib._objc_msgSend_259( - _id, - _lib._sel_initWithFormat_locale_arguments_1, - format?._id ?? ffi.nullptr, - locale._id, - argList); - return NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array __opaque; +} - NSString initWithData_encoding_(NSData? data, int encoding) { - final _ret = _lib._objc_msgSend_260(_id, _lib._sel_initWithData_encoding_1, - data?._id ?? ffi.nullptr, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class _opaque_pthread_t extends ffi.Struct { + @ffi.Long() + external int __sig; - NSString initWithBytes_length_encoding_( - ffi.Pointer bytes, int len, int encoding) { - final _ret = _lib._objc_msgSend_261( - _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; - NSString initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _lib._objc_msgSend_262( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, - bytes, - len, - encoding, - freeBuffer); - return NSString._(_ret, _lib, retain: false, release: true); - } + @ffi.Array.multi([8176]) + external ffi.Array __opaque; +} - NSString initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - int len, - int encoding, - ObjCBlock12 deallocator) { - final _ret = _lib._objc_msgSend_263( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, - bytes, - len, - encoding, - deallocator._id); - return NSString._(_ret, _lib, retain: false, release: true); - } +abstract class idtype_t { + static const int P_ALL = 0; + static const int P_PID = 1; + static const int P_PGID = 2; +} - static NSString string(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_string1); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class __darwin_arm_exception_state extends ffi.Struct { + @__uint32_t() + external int __exception; - static NSString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __fsr; - static NSString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSString._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __far; +} - static NSString stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSString._(_ret, _lib, retain: true, release: true); - } +typedef __uint32_t = ffi.UnsignedInt; - static NSString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class __darwin_arm_exception_state64 extends ffi.Struct { + @__uint64_t() + external int __far; - static NSString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __esr; - NSString initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _lib._objc_msgSend_264(_id, - _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __exception; +} - static NSString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSString._(_ret, _lib, retain: true, release: true); - } +typedef __uint64_t = ffi.UnsignedLongLong; - NSString initWithContentsOfURL_encoding_error_( - NSURL? url, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_265( - _id, - _lib._sel_initWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class __darwin_arm_thread_state extends ffi.Struct { + @ffi.Array.multi([13]) + external ffi.Array<__uint32_t> __r; - NSString initWithContentsOfFile_encoding_error_( - NSString? path, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_266( - _id, - _lib._sel_initWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __sp; - static NSString stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_265( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __lr; - static NSString stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_266( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __pc; - NSString initWithContentsOfURL_usedEncoding_error_( - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_267( - _id, - _lib._sel_initWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __cpsr; +} - NSString initWithContentsOfFile_usedEncoding_error_( - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_268( - _id, - _lib._sel_initWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class __darwin_arm_thread_state64 extends ffi.Struct { + @ffi.Array.multi([29]) + external ffi.Array<__uint64_t> __x; - static NSString stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_267( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); - } + @__uint64_t() + external int __fp; - static NSString stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_268( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); - } + @__uint64_t() + external int __lr; - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData? data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_269( - _lib._class_NSString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } + @__uint64_t() + external int __sp; - NSObject propertyList() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @__uint64_t() + external int __pc; - NSDictionary propertyListFromStringsFileFormat() { - final _ret = _lib._objc_msgSend_180( - _id, _lib._sel_propertyListFromStringsFileFormat1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + @__uint32_t() + external int __cpsr; - ffi.Pointer cString() { - return _lib._objc_msgSend_53(_id, _lib._sel_cString1); - } + @__uint32_t() + external int __pad; +} - ffi.Pointer lossyCString() { - return _lib._objc_msgSend_53(_id, _lib._sel_lossyCString1); - } +final class __darwin_arm_vfp_state extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array<__uint32_t> __r; - int cStringLength() { - return _lib._objc_msgSend_12(_id, _lib._sel_cStringLength1); - } + @__uint32_t() + external int __fpscr; +} - void getCString_(ffi.Pointer bytes) { - return _lib._objc_msgSend_270(_id, _lib._sel_getCString_1, bytes); - } +final class __darwin_arm_neon_state64 extends ffi.Opaque {} - void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { - return _lib._objc_msgSend_271( - _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); - } +final class __darwin_arm_neon_state extends ffi.Opaque {} - void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, - int maxLength, NSRange aRange, NSRangePointer leftoverRange) { - return _lib._objc_msgSend_272( - _id, - _lib._sel_getCString_maxLength_range_remainingRange_1, - bytes, - maxLength, - aRange, - leftoverRange); - } +final class __arm_pagein_state extends ffi.Struct { + @ffi.Int() + external int __pagein_error; +} - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); - } +final class __arm_legacy_debug_state extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; - NSObject initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; - NSObject initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; +} - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +final class __darwin_arm_debug_state32 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; - NSObject initWithCStringNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_273( - _id, - _lib._sel_initWithCStringNoCopy_length_freeWhenDone_1, - bytes, - length, - freeBuffer); - return NSObject._(_ret, _lib, retain: false, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; - NSObject initWithCString_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_264( - _id, _lib._sel_initWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; - NSObject initWithCString_(ffi.Pointer bytes) { - final _ret = - _lib._objc_msgSend_256(_id, _lib._sel_initWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @__uint64_t() + external int __mdscr_el1; +} - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); - } +final class __darwin_arm_debug_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bvr; - static NSObject stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( - _lib._class_NSString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bcr; - void getCharacters_(ffi.Pointer buffer) { - return _lib._objc_msgSend_274(_id, _lib._sel_getCharacters_1, buffer); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wvr; - /// Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode an URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. - NSString stringByAddingPercentEncodingWithAllowedCharacters_( - NSCharacterSet? allowedCharacters) { - final _ret = _lib._objc_msgSend_244( - _id, - _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, - allowedCharacters?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wcr; - /// Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. - NSString? get stringByRemovingPercentEncoding { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_stringByRemovingPercentEncoding1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @__uint64_t() + external int __mdscr_el1; +} - NSString stringByAddingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_15( - _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class __darwin_arm_cpmu_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __ctrs; +} - NSString stringByReplacingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_15( - _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class __darwin_mcontext32 extends ffi.Struct { + external __darwin_arm_exception_state __es; - static NSString new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); - return NSString._(_ret, _lib, retain: false, release: true); - } + external __darwin_arm_thread_state __ss; - static NSString alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); - return NSString._(_ret, _lib, retain: false, release: true); - } + external __darwin_arm_vfp_state __fs; } -extension StringToNSString on String { - NSString toNSString(NativeCupertinoHttp lib) => NSString(lib, this); -} +final class __darwin_mcontext64 extends ffi.Opaque {} -typedef unichar = ffi.UnsignedShort; +final class __darwin_sigaltstack extends ffi.Struct { + external ffi.Pointer ss_sp; -class NSCoder extends _ObjCWrapper { - NSCoder._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @__darwin_size_t() + external int ss_size; - /// Returns a [NSCoder] that points to the same underlying object as [other]. - static NSCoder castFrom(T other) { - return NSCoder._(other._id, other._lib, retain: true, release: true); - } + @ffi.Int() + external int ss_flags; +} - /// Returns a [NSCoder] that wraps the given raw object pointer. - static NSCoder castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCoder._(other, lib, retain: retain, release: release); - } +typedef __darwin_size_t = ffi.UnsignedLong; - /// Returns whether [obj] is an instance of [NSCoder]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); - } -} +final class __darwin_ucontext extends ffi.Struct { + @ffi.Int() + external int uc_onstack; -typedef NSRange = _NSRange; + @__darwin_sigset_t() + external int uc_sigmask; -class _NSRange extends ffi.Struct { - @NSUInteger() - external int location; + external __darwin_sigaltstack uc_stack; - @NSUInteger() - external int length; -} + external ffi.Pointer<__darwin_ucontext> uc_link; -abstract class NSComparisonResult { - static const int NSOrderedAscending = -1; - static const int NSOrderedSame = 0; - static const int NSOrderedDescending = 1; + @__darwin_size_t() + external int uc_mcsize; + + external ffi.Pointer<__darwin_mcontext64> uc_mcontext; } -abstract class NSStringCompareOptions { - static const int NSCaseInsensitiveSearch = 1; - static const int NSLiteralSearch = 2; - static const int NSBackwardsSearch = 4; - static const int NSAnchoredSearch = 8; - static const int NSNumericSearch = 64; - static const int NSDiacriticInsensitiveSearch = 128; - static const int NSWidthInsensitiveSearch = 256; - static const int NSForcedOrderingSearch = 512; - static const int NSRegularExpressionSearch = 1024; +typedef __darwin_sigset_t = __uint32_t; + +final class sigval extends ffi.Union { + @ffi.Int() + external int sival_int; + + external ffi.Pointer sival_ptr; } -class NSLocale extends _ObjCWrapper { - NSLocale._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final class sigevent extends ffi.Struct { + @ffi.Int() + external int sigev_notify; - /// Returns a [NSLocale] that points to the same underlying object as [other]. - static NSLocale castFrom(T other) { - return NSLocale._(other._id, other._lib, retain: true, release: true); - } + @ffi.Int() + external int sigev_signo; - /// Returns a [NSLocale] that wraps the given raw object pointer. - static NSLocale castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSLocale._(other, lib, retain: retain, release: release); - } + external sigval sigev_value; - /// Returns whether [obj] is an instance of [NSLocale]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLocale1); - } + external ffi.Pointer> + sigev_notify_function; + + external ffi.Pointer sigev_notify_attributes; } -class NSCharacterSet extends NSObject { - NSCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef pthread_attr_t = __darwin_pthread_attr_t; +typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; - /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. - static NSCharacterSet castFrom(T other) { - return NSCharacterSet._(other._id, other._lib, retain: true, release: true); - } +final class __siginfo extends ffi.Struct { + @ffi.Int() + external int si_signo; - /// Returns a [NSCharacterSet] that wraps the given raw object pointer. - static NSCharacterSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCharacterSet._(other, lib, retain: retain, release: release); - } + @ffi.Int() + external int si_errno; - /// Returns whether [obj] is an instance of [NSCharacterSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSCharacterSet1); - } + @ffi.Int() + external int si_code; - static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @pid_t() + external int si_pid; - static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @uid_t() + external int si_uid; - static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSCharacterSet1, - _lib._sel_whitespaceAndNewlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int si_status; - static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer si_addr; - static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + external sigval si_value; - static NSCharacterSet? getLowercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Long() + external int si_band; - static NSCharacterSet? getUppercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([7]) + external ffi.Array __pad; +} - static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +typedef pid_t = __darwin_pid_t; +typedef __darwin_pid_t = __int32_t; +typedef __int32_t = ffi.Int; +typedef uid_t = __darwin_uid_t; +typedef __darwin_uid_t = __uint32_t; - static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +final class __sigaction_u extends ffi.Union { + external ffi.Pointer> + __sa_handler; - static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer)>> + __sa_sigaction; +} - static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +final class __sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; - static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Pointer, ffi.Pointer)>> sa_tramp; - static NSCharacterSet? getCapitalizedLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @sigset_t() + external int sa_mask; - static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int sa_flags; +} - static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: false, release: true); - } +typedef siginfo_t = __siginfo; +typedef sigset_t = __darwin_sigset_t; - static NSCharacterSet characterSetWithRange_( - NativeCupertinoHttp _lib, NSRange aRange) { - final _ret = _lib._objc_msgSend_29( - _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +final class sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; - static NSCharacterSet characterSetWithCharactersInString_( - NativeCupertinoHttp _lib, NSString? aString) { - final _ret = _lib._objc_msgSend_30( - _lib._class_NSCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, - aString?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @sigset_t() + external int sa_mask; - static NSCharacterSet characterSetWithBitmapRepresentation_( - NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_223( - _lib._class_NSCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, - data?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int sa_flags; +} - static NSCharacterSet characterSetWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? fName) { - final _ret = _lib._objc_msgSend_30(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +final class sigvec extends ffi.Struct { + external ffi.Pointer> + sv_handler; - NSCharacterSet initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int sv_mask; - bool characterIsMember_(int aCharacter) { - return _lib._objc_msgSend_224( - _id, _lib._sel_characterIsMember_1, aCharacter); - } + @ffi.Int() + external int sv_flags; +} - NSData? get bitmapRepresentation { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_bitmapRepresentation1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } +final class sigstack extends ffi.Struct { + external ffi.Pointer ss_sp; - NSCharacterSet? get invertedSet { - final _ret = _lib._objc_msgSend_28(_id, _lib._sel_invertedSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int ss_onstack; +} - bool longCharacterIsMember_(int theLongChar) { - return _lib._objc_msgSend_225( - _id, _lib._sel_longCharacterIsMember_1, theLongChar); - } +final class timeval extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; - bool isSupersetOfSet_(NSCharacterSet? theOtherSet) { - return _lib._objc_msgSend_226( - _id, _lib._sel_isSupersetOfSet_1, theOtherSet?._id ?? ffi.nullptr); - } + @__darwin_suseconds_t() + external int tv_usec; +} - bool hasMemberInPlane_(int thePlane) { - return _lib._objc_msgSend_227(_id, _lib._sel_hasMemberInPlane_1, thePlane); - } +typedef __darwin_time_t = ffi.Long; +typedef __darwin_suseconds_t = __int32_t; - /// Returns a character set containing the characters allowed in an URL's user subcomponent. - static NSCharacterSet? getURLUserAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +final class rusage extends ffi.Struct { + external timeval ru_utime; - /// Returns a character set containing the characters allowed in an URL's password subcomponent. - static NSCharacterSet? getURLPasswordAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + external timeval ru_stime; - /// Returns a character set containing the characters allowed in an URL's host subcomponent. - static NSCharacterSet? getURLHostAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Long() + external int ru_maxrss; - /// Returns a character set containing the characters allowed in an URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - static NSCharacterSet? getURLPathAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Long() + external int ru_ixrss; - /// Returns a character set containing the characters allowed in an URL's query component. - static NSCharacterSet? getURLQueryAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Long() + external int ru_idrss; - /// Returns a character set containing the characters allowed in an URL's fragment component. - static NSCharacterSet? getURLFragmentAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + @ffi.Long() + external int ru_isrss; - static NSCharacterSet new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } + @ffi.Long() + external int ru_minflt; - static NSCharacterSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } -} + @ffi.Long() + external int ru_majflt; -class NSData extends NSObject { - NSData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Long() + external int ru_nswap; - /// Returns a [NSData] that points to the same underlying object as [other]. - static NSData castFrom(T other) { - return NSData._(other._id, other._lib, retain: true, release: true); - } + @ffi.Long() + external int ru_inblock; - /// Returns a [NSData] that wraps the given raw object pointer. - static NSData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSData._(other, lib, retain: retain, release: release); - } + @ffi.Long() + external int ru_oublock; - /// Returns whether [obj] is an instance of [NSData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); - } + @ffi.Long() + external int ru_msgsnd; - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); - } + @ffi.Long() + external int ru_msgrcv; - /// The -bytes method returns a pointer to a contiguous region of memory managed by the receiver. - /// If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer - /// Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data. - ffi.Pointer get bytes { - return _lib._objc_msgSend_31(_id, _lib._sel_bytes1); - } + @ffi.Long() + external int ru_nsignals; - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Long() + external int ru_nvcsw; - void getBytes_length_(ffi.Pointer buffer, int length) { - return _lib._objc_msgSend_33( - _id, _lib._sel_getBytes_length_1, buffer, length); - } + @ffi.Long() + external int ru_nivcsw; +} - void getBytes_range_(ffi.Pointer buffer, NSRange range) { - return _lib._objc_msgSend_34( - _id, _lib._sel_getBytes_range_1, buffer, range); - } +final class rusage_info_v0 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - bool isEqualToData_(NSData? other) { - return _lib._objc_msgSend_35( - _id, _lib._sel_isEqualToData_1, other?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_user_time; - NSData subdataWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_36(_id, _lib._sel_subdataWithRange_1, range); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_system_time; - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - /// the atomically flag is ignored if the url is not of a type the supports atomic writes - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - bool writeToFile_options_error_(NSString? path, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_208(_id, _lib._sel_writeToFile_options_error_1, - path?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); - } + @ffi.Uint64() + external int ri_pageins; - bool writeToURL_options_error_(NSURL? url, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_209(_id, _lib._sel_writeToURL_options_error_1, - url?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); - } + @ffi.Uint64() + external int ri_wired_size; - NSRange rangeOfData_options_range_( - NSData? dataToFind, int mask, NSRange searchRange) { - return _lib._objc_msgSend_210(_id, _lib._sel_rangeOfData_options_range_1, - dataToFind?._id ?? ffi.nullptr, mask, searchRange); - } + @ffi.Uint64() + external int ri_resident_size; - /// 'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES. - void enumerateByteRangesUsingBlock_(ObjCBlock11 block) { - return _lib._objc_msgSend_211( - _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._id); - } + @ffi.Uint64() + external int ri_phys_footprint; - static NSData data(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - static NSData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212( - _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; +} - static NSData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); - } +final class rusage_info_v1 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - static NSData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - int length, - bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_user_time; - static NSData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_system_time; - static NSData dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - static NSData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - static NSData dataWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_pageins; - NSData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212( - _id, _lib._sel_initWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_wired_size; - NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212( - _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_resident_size; - NSData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_213(_id, - _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_phys_footprint; - NSData initWithBytesNoCopy_length_deallocator_( - ffi.Pointer bytes, int length, ObjCBlock12 deallocator) { - final _ret = _lib._objc_msgSend_216( - _id, - _lib._sel_initWithBytesNoCopy_length_deallocator_1, - bytes, - length, - deallocator._id); - return NSData._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - NSData initWithContentsOfFile_options_error_(NSString? path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( - _id, - _lib._sel_initWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - NSData initWithContentsOfURL_options_error_(NSURL? url, int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( - _id, - _lib._sel_initWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_user_time; - NSData initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_system_time; - NSData initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - NSData initWithData_(NSData? data) { - final _ret = _lib._objc_msgSend_217( - _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - static NSData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pageins; - /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. - NSData initWithBase64EncodedString_options_( - NSString? base64String, int options) { - final _ret = _lib._objc_msgSend_218( - _id, - _lib._sel_initWithBase64EncodedString_options_1, - base64String?._id ?? ffi.nullptr, - options); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; +} - /// Create a Base-64 encoded NSString from the receiver's contents using the given options. - NSString base64EncodedStringWithOptions_(int options) { - final _ret = _lib._objc_msgSend_219( - _id, _lib._sel_base64EncodedStringWithOptions_1, options); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class rusage_info_v2 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. - NSData initWithBase64EncodedData_options_(NSData? base64Data, int options) { - final _ret = _lib._objc_msgSend_220( - _id, - _lib._sel_initWithBase64EncodedData_options_1, - base64Data?._id ?? ffi.nullptr, - options); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_user_time; - /// Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options. - NSData base64EncodedDataWithOptions_(int options) { - final _ret = _lib._objc_msgSend_221( - _id, _lib._sel_base64EncodedDataWithOptions_1, options); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_system_time; - /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. - NSData decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_222(_id, - _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - NSData compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_222( - _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - void getBytes_(ffi.Pointer buffer) { - return _lib._objc_msgSend_59(_id, _lib._sel_getBytes_1, buffer); - } + @ffi.Uint64() + external int ri_pageins; - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_wired_size; - NSObject initWithContentsOfMappedFile_(NSString? path) { - final _ret = _lib._objc_msgSend_42(_id, - _lib._sel_initWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_resident_size; - /// These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0. - NSObject initWithBase64Encoding_(NSString? base64String) { - final _ret = _lib._objc_msgSend_42(_id, _lib._sel_initWithBase64Encoding_1, - base64String?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_phys_footprint; - NSString base64Encoding() { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_base64Encoding1); - return NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - static NSData new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); - return NSData._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - static NSData alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); - return NSData._(_ret, _lib, retain: false, release: true); - } -} + @ffi.Uint64() + external int ri_child_user_time; -class NSURL extends NSObject { - NSURL._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Uint64() + external int ri_child_system_time; - /// Returns a [NSURL] that points to the same underlying object as [other]. - static NSURL castFrom(T other) { - return NSURL._(other._id, other._lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - /// Returns a [NSURL] that wraps the given raw object pointer. - static NSURL castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURL._(other, lib, retain: retain, release: release); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - /// Returns whether [obj] is an instance of [NSURL]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); - } + @ffi.Uint64() + external int ri_child_pageins; - /// this call percent-encodes both the host and path, so this cannot be used to set a username/password or port in the hostname part or with a IPv6 '[...]' type address. NSURLComponents handles IPv6 addresses correctly. - NSURL initWithScheme_host_path_( - NSString? scheme, NSString? host, NSString? path) { - final _ret = _lib._objc_msgSend_38( - _id, - _lib._sel_initWithScheme_host_path_1, - scheme?._id ?? ffi.nullptr, - host?._id ?? ffi.nullptr, - path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - /// Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL. - NSURL initFileURLWithPath_isDirectory_relativeToURL_( - NSString? path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_39( - _id, - _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, - path?._id ?? ffi.nullptr, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - /// Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. - NSURL initFileURLWithPath_relativeToURL_(NSString? path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_40( - _id, - _lib._sel_initFileURLWithPath_relativeToURL_1, - path?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; +} - NSURL initFileURLWithPath_isDirectory_(NSString? path, bool isDir) { - final _ret = _lib._objc_msgSend_41( - _id, - _lib._sel_initFileURLWithPath_isDirectory_1, - path?._id ?? ffi.nullptr, - isDir); - return NSURL._(_ret, _lib, retain: true, release: true); - } +final class rusage_info_v3 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - /// Better to use initFileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. - NSURL initFileURLWithPath_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initFileURLWithPath_1, path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_user_time; - /// Initializes and returns a newly created file NSURL referencing the local file or directory at path, relative to a base URL. - static NSURL fileURLWithPath_isDirectory_relativeToURL_( - NativeCupertinoHttp _lib, NSString? path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_43( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, - path?._id ?? ffi.nullptr, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_system_time; - /// Better to use fileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. - static NSURL fileURLWithPath_relativeToURL_( - NativeCupertinoHttp _lib, NSString? path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_44( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_relativeToURL_1, - path?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - static NSURL fileURLWithPath_isDirectory_( - NativeCupertinoHttp _lib, NSString? path, bool isDir) { - final _ret = _lib._objc_msgSend_45( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_1, - path?._id ?? ffi.nullptr, - isDir); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - /// Better to use fileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. - static NSURL fileURLWithPath_(NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_46(_lib._class_NSURL1, - _lib._sel_fileURLWithPath_1, path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_pageins; - /// Initializes a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. - NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_47( - _id, - _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_wired_size; - /// Initializes and returns a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. - static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - NativeCupertinoHttp _lib, - ffi.Pointer path, - bool isDir, - NSURL? baseURL) { - final _ret = _lib._objc_msgSend_48( - _lib._class_NSURL1, - _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_resident_size; - /// These methods expect their string arguments to contain any percent escape codes that are necessary. It is an error for URLString to be nil. - NSURL initWithString_(NSString? URLString) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_phys_footprint; - NSURL initWithString_relativeToURL_(NSString? URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_40( - _id, - _lib._sel_initWithString_relativeToURL_1, - URLString?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - static NSURL URLWithString_(NativeCupertinoHttp _lib, NSString? URLString) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSURL1, - _lib._sel_URLWithString_1, URLString?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - static NSURL URLWithString_relativeToURL_( - NativeCupertinoHttp _lib, NSString? URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_40( - _lib._class_NSURL1, - _lib._sel_URLWithString_relativeToURL_1, - URLString?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_user_time; - /// Initializes a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - NSURL initWithDataRepresentation_relativeToURL_( - NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_49( - _id, - _lib._sel_initWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_system_time; - /// Initializes and returns a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - static NSURL URLWithDataRepresentation_relativeToURL_( - NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_50( - _lib._class_NSURL1, - _lib._sel_URLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - /// Initializes a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( - NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_49( - _id, - _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - /// Initializes and returns a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - static NSURL absoluteURLWithDataRepresentation_relativeToURL_( - NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_50( - _lib._class_NSURL1, - _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pageins; - /// Returns the data representation of the URL's relativeString. If the URL was initialized with -initWithData:relativeToURL:, the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with NSUTF8StringEncoding. - NSData? get dataRepresentation { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_dataRepresentation1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - NSString? get absoluteString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_absoluteString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - /// The relative portion of a URL. If baseURL is nil, or if the receiver is itself absolute, this is the same as absoluteString - NSString? get relativeString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativeString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - /// may be nil. - NSURL? get baseURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_baseURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_default; - /// if the receiver is itself absolute, this will return self. - NSURL? get absoluteURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_absoluteURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - /// Any URL is composed of these two basic pieces. The full URL would be the concatenation of [myURL scheme], ':', [myURL resourceSpecifier] - NSString? get scheme { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_background; - NSString? get resourceSpecifier { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_resourceSpecifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - /// If the URL conforms to rfc 1808 (the most common form of URL), the following accessors will return the various components; otherwise they return nil. The litmus test for conformance is as recommended in RFC 1808 - whether the first two characters of resourceSpecifier is @"//". In all cases, they return the component's value after resolving the receiver against its base URL. - NSString? get host { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; - NSNumber? get port { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; - NSString? get user { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - NSString? get password { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_billed_system_time; - NSString? get path { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_serviced_system_time; +} - NSString? get fragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +final class rusage_info_v4 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - NSString? get parameterString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_parameterString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_user_time; - NSString? get query { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_system_time; - /// The same as path if baseURL is nil - NSString? get relativePath { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativePath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - /// Determines if a given URL string's path represents a directory (i.e. the path component in the URL string ends with a '/' character). This does not check the resource the URL refers to. - bool get hasDirectoryPath { - return _lib._objc_msgSend_11(_id, _lib._sel_hasDirectoryPath1); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer buffer, int maxBufferLength) { - return _lib._objc_msgSend_90( - _id, - _lib._sel_getFileSystemRepresentation_maxLength_1, - buffer, - maxBufferLength); - } + @ffi.Uint64() + external int ri_pageins; - /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. The returned C string will be automatically freed just as a returned object would be released; your code should copy the representation or use getFileSystemRepresentation:maxLength: if it needs to store the representation outside of the autorelease context in which the representation is created. - ffi.Pointer get fileSystemRepresentation { - return _lib._objc_msgSend_53(_id, _lib._sel_fileSystemRepresentation1); - } + @ffi.Uint64() + external int ri_wired_size; - /// Whether the scheme is file:; if [myURL isFileURL] is YES, then [myURL path] is suitable for input into NSFileManager or NSPathUtilities. - bool get fileURL { - return _lib._objc_msgSend_11(_id, _lib._sel_isFileURL1); - } + @ffi.Uint64() + external int ri_resident_size; - NSURL? get standardizedURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_standardizedURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_phys_footprint; - /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. - bool checkResourceIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_183( - _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - /// Returns whether the URL is a file reference URL. Symbol is present in iOS 4, but performs no operation. - bool isFileReferenceURL() { - return _lib._objc_msgSend_11(_id, _lib._sel_isFileReferenceURL1); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - /// Returns a file reference URL that refers to the same resource as a specified file URL. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:). Symbol is present in iOS 4, but performs no operation. - NSURL fileReferenceURL() { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileReferenceURL1); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_user_time; - /// Returns a file path URL that refers to the same resource as a specified URL. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. Symbol is present in iOS 4, but performs no operation. - NSURL? get filePathURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_filePathURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_system_time; - /// Returns the resource value identified by a given resource key. This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this method returns YES and value is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool getResourceValue_forKey_error_( - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_184( - _id, _lib._sel_getResourceValue_forKey_error_1, value, key, error); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - /// Returns the resource values identified by specified array of resource keys. This method first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this method returns NULL, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - NSDictionary resourceValuesForKeys_error_( - NSArray? keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_185( - _id, - _lib._sel_resourceValuesForKeys_error_1, - keys?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - /// Sets the resource value identified by a given resource key. This method writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool setResourceValue_forKey_error_(NSObject value, NSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_186( - _id, _lib._sel_setResourceValue_forKey_error_1, value._id, key, error); - } + @ffi.Uint64() + external int ri_child_pageins; - /// Sets any number of resource values of a URL's resource. This method writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to this method or to -setResourceValue:forKey:error: to guarantee the order. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool setResourceValues_error_( - NSDictionary? keyedValues, ffi.Pointer> error) { - return _lib._objc_msgSend_187(_id, _lib._sel_setResourceValues_error_1, - keyedValues?._id ?? ffi.nullptr, error); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - /// Removes the cached resource value identified by a given resource value key from the URL object. Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources. - void removeCachedResourceValueForKey_(NSURLResourceKey key) { - return _lib._objc_msgSend_188( - _id, _lib._sel_removeCachedResourceValueForKey_1, key); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - /// Removes all cached resource values and all temporary resource values from the URL object. This method is currently applicable only to URLs for file system resources. - void removeAllCachedResourceValues() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - /// Sets a temporary resource value on the URL object. Temporary resource values are for client use. Temporary resource values exist only in memory and are never written to the resource's backing store. Once set, a temporary resource value can be copied from the URL object with -getResourceValue:forKey:error: or -resourceValuesForKeys:error:. To remove a temporary resource value from the URL object, use -removeCachedResourceValueForKey:. Care should be taken to ensure the key that identifies a temporary resource value is unique and does not conflict with system defined keys (using reverse domain name notation in your temporary resource value keys is recommended). This method is currently applicable only to URLs for file system resources. - void setTemporaryResourceValue_forKey_(NSObject value, NSURLResourceKey key) { - return _lib._objc_msgSend_189( - _id, _lib._sel_setTemporaryResourceValue_forKey_1, value._id, key); - } + @ffi.Uint64() + external int ri_cpu_time_qos_default; - /// Returns bookmark data for the URL, created with specified options and resource values. If this method returns nil, the optional error is populated. - NSData - bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( - int options, - NSArray? keys, - NSURL? relativeURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_190( - _id, - _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, - options, - keys?._id ?? ffi.nullptr, - relativeURL?._id ?? ffi.nullptr, - error); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - /// Initializes a newly created NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. - NSURL - initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NSData? bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_191( - _id, - _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData?._id ?? ffi.nullptr, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_background; - /// Creates and Initializes an NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. - static NSURL - URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NativeCupertinoHttp _lib, - NSData? bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_191( - _lib._class_NSURL1, - _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData?._id ?? ffi.nullptr, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - /// Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available in the bookmark data. - static NSDictionary resourceValuesForKeys_fromBookmarkData_( - NativeCupertinoHttp _lib, NSArray? keys, NSData? bookmarkData) { - final _ret = _lib._objc_msgSend_192( - _lib._class_NSURL1, - _lib._sel_resourceValuesForKeys_fromBookmarkData_1, - keys?._id ?? ffi.nullptr, - bookmarkData?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; - /// Creates an alias file on disk at a specified location with specified bookmark data. bookmarkData must have been created with the NSURLBookmarkCreationSuitableForBookmarkFile option. bookmarkFileURL must either refer to an existing file (which will be overwritten), or to location in an existing directory. If this method returns NO, the optional error is populated. - static bool writeBookmarkData_toURL_options_error_( - NativeCupertinoHttp _lib, - NSData? bookmarkData, - NSURL? bookmarkFileURL, - int options, - ffi.Pointer> error) { - return _lib._objc_msgSend_193( - _lib._class_NSURL1, - _lib._sel_writeBookmarkData_toURL_options_error_1, - bookmarkData?._id ?? ffi.nullptr, - bookmarkFileURL?._id ?? ffi.nullptr, - options, - error); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; - /// Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. If bookmarkFileURL refers to an alias file created prior to OS X v10.6 that contains Alias Manager information but no bookmark data, this method synthesizes bookmark data for the file. If this method returns nil, the optional error is populated. - static NSData bookmarkDataWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? bookmarkFileURL, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_194( - _lib._class_NSURL1, - _lib._sel_bookmarkDataWithContentsOfURL_error_1, - bookmarkFileURL?._id ?? ffi.nullptr, - error); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - /// Creates and initializes a NSURL that refers to the location specified by resolving the alias file at url. If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, the NSURL returned is the same as url argument. This method fails and returns nil if the url argument is unreachable, or if the original file or directory could not be located or is not reachable, or if the original file or directory is on a volume that could not be located or mounted. If this method fails, the optional error is populated. The NSURLBookmarkResolutionWithSecurityScope option is not supported by this method. - static NSURL URLByResolvingAliasFileAtURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int options, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_195( - _lib._class_NSURL1, - _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, - url?._id ?? ffi.nullptr, - options, - error); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_billed_system_time; - /// Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. When access to this resource is no longer needed the client must call stopAccessingSecurityScopedResource. Each call to startAccessingSecurityScopedResource must be balanced with a call to stopAccessingSecurityScopedResource (Note: this is not reference counted). - bool startAccessingSecurityScopedResource() { - return _lib._objc_msgSend_11( - _id, _lib._sel_startAccessingSecurityScopedResource1); - } + @ffi.Uint64() + external int ri_serviced_system_time; - /// Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource. - void stopAccessingSecurityScopedResource() { - return _lib._objc_msgSend_1( - _id, _lib._sel_stopAccessingSecurityScopedResource1); - } + @ffi.Uint64() + external int ri_logical_writes; - /// Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: - /// - NSMetadataQueryUbiquitousDataScope - /// - NSMetadataQueryUbiquitousDocumentsScope - /// - An NSFilePresenter presenting the contents of the directory located by -URLForUbiquitousContainerIdentifier: or a subdirectory thereof - /// - /// The following methods behave identically to their similarly named methods above (-getResourceValue:forKey:error:, etc.), except that they allow you to get resource values and check for presence regardless of whether the promised item's contents currently exist at the URL. You must use these APIs instead of the normal NSURL resource value APIs if and only if any of the following are true: - /// - You are using a URL that you know came directly from one of the above APIs - /// - You are inside the accessor block of a coordinated read or write that used NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingContentIndependentMetadataOnly - /// - /// Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. - bool getPromisedItemResourceValue_forKey_error_( - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_184( - _id, - _lib._sel_getPromisedItemResourceValue_forKey_error_1, - value, - key, - error); - } + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; - NSDictionary promisedItemResourceValuesForKeys_error_( - NSArray? keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_185( - _id, - _lib._sel_promisedItemResourceValuesForKeys_error_1, - keys?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_instructions; - bool checkPromisedItemIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_183( - _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); - } + @ffi.Uint64() + external int ri_cycles; - /// The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. - static NSURL fileURLWithPathComponents_( - NativeCupertinoHttp _lib, NSArray? components) { - final _ret = _lib._objc_msgSend_196(_lib._class_NSURL1, - _lib._sel_fileURLWithPathComponents_1, components?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_billed_energy; - NSArray? get pathComponents { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_pathComponents1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_serviced_energy; - NSString? get lastPathComponent { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lastPathComponent1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_interval_max_phys_footprint; - NSString? get pathExtension { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_pathExtension1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_runnable_time; +} - NSURL URLByAppendingPathComponent_(NSString? pathComponent) { - final _ret = _lib._objc_msgSend_46( - _id, - _lib._sel_URLByAppendingPathComponent_1, - pathComponent?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } +final class rusage_info_v5 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - NSURL URLByAppendingPathComponent_isDirectory_( - NSString? pathComponent, bool isDirectory) { - final _ret = _lib._objc_msgSend_45( - _id, - _lib._sel_URLByAppendingPathComponent_isDirectory_1, - pathComponent?._id ?? ffi.nullptr, - isDirectory); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_user_time; - NSURL? get URLByDeletingLastPathComponent { - final _ret = - _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingLastPathComponent1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_system_time; - NSURL URLByAppendingPathExtension_(NSString? pathExtension) { - final _ret = _lib._objc_msgSend_46( - _id, - _lib._sel_URLByAppendingPathExtension_1, - pathExtension?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - NSURL? get URLByDeletingPathExtension { - final _ret = - _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingPathExtension1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - /// The following methods work only on `file:` scheme URLs; for non-`file:` scheme URLs, these methods return the URL unchanged. - NSURL? get URLByStandardizingPath { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URLByStandardizingPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_pageins; - NSURL? get URLByResolvingSymlinksInPath { - final _ret = - _lib._objc_msgSend_52(_id, _lib._sel_URLByResolvingSymlinksInPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_wired_size; - /// Blocks to load the data if necessary. If shouldUseCache is YES, then if an equivalent URL has already been loaded and cached, its resource data will be returned immediately. If shouldUseCache is NO, a new load will be started - NSData resourceDataUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_197( - _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); - return NSData._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_resident_size; - /// Starts an asynchronous load of the data, registering delegate to receive notification. Only one such background load can proceed at a time. - void loadResourceDataNotifyingClient_usingCache_( - NSObject client, bool shouldUseCache) { - return _lib._objc_msgSend_198( - _id, - _lib._sel_loadResourceDataNotifyingClient_usingCache_1, - client._id, - shouldUseCache); - } + @ffi.Uint64() + external int ri_phys_footprint; - NSObject propertyForKey_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - /// These attempt to write the given arguments for the resource specified by the URL; they return success or failure - bool setResourceData_(NSData? data) { - return _lib._objc_msgSend_35( - _id, _lib._sel_setResourceData_1, data?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - bool setProperty_forKey_(NSObject property, NSString? propertyKey) { - return _lib._objc_msgSend_199(_id, _lib._sel_setProperty_forKey_1, - property._id, propertyKey?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_child_user_time; - /// Sophisticated clients will want to ask for this, then message the handle directly. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded - NSURLHandle URLHandleUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_207( - _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); - return NSURLHandle._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_system_time; - static NSURL new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); - return NSURL._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - static NSURL alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); - return NSURL._(_ret, _lib, retain: false, release: true); - } -} + @ffi.Uint64() + external int ri_child_interrupt_wkups; -class NSNumber extends NSValue { - NSNumber._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Uint64() + external int ri_child_pageins; - /// Returns a [NSNumber] that points to the same underlying object as [other]. - static NSNumber castFrom(T other) { - return NSNumber._(other._id, other._lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - /// Returns a [NSNumber] that wraps the given raw object pointer. - static NSNumber castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumber._(other, lib, retain: retain, release: release); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - /// Returns whether [obj] is an instance of [NSNumber]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - @override - NSNumber initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_default; - NSNumber initWithChar_(int value) { - final _ret = _lib._objc_msgSend_62(_id, _lib._sel_initWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - NSNumber initWithUnsignedChar_(int value) { - final _ret = - _lib._objc_msgSend_63(_id, _lib._sel_initWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_background; - NSNumber initWithShort_(int value) { - final _ret = _lib._objc_msgSend_64(_id, _lib._sel_initWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - NSNumber initWithUnsignedShort_(int value) { - final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_initWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; - NSNumber initWithInt_(int value) { - final _ret = _lib._objc_msgSend_66(_id, _lib._sel_initWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; - NSNumber initWithUnsignedInt_(int value) { - final _ret = - _lib._objc_msgSend_67(_id, _lib._sel_initWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - NSNumber initWithLong_(int value) { - final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_billed_system_time; - NSNumber initWithUnsignedLong_(int value) { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_serviced_system_time; - NSNumber initWithLongLong_(int value) { - final _ret = - _lib._objc_msgSend_70(_id, _lib._sel_initWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_logical_writes; - NSNumber initWithUnsignedLongLong_(int value) { - final _ret = - _lib._objc_msgSend_71(_id, _lib._sel_initWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; - NSNumber initWithFloat_(double value) { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_initWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_instructions; - NSNumber initWithDouble_(double value) { - final _ret = _lib._objc_msgSend_73(_id, _lib._sel_initWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cycles; - NSNumber initWithBool_(bool value) { - final _ret = _lib._objc_msgSend_74(_id, _lib._sel_initWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_billed_energy; - NSNumber initWithInteger_(int value) { - final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_serviced_energy; - NSNumber initWithUnsignedInteger_(int value) { - final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_interval_max_phys_footprint; - int get charValue { - return _lib._objc_msgSend_75(_id, _lib._sel_charValue1); - } + @ffi.Uint64() + external int ri_runnable_time; - int get unsignedCharValue { - return _lib._objc_msgSend_76(_id, _lib._sel_unsignedCharValue1); - } + @ffi.Uint64() + external int ri_flags; +} - int get shortValue { - return _lib._objc_msgSend_77(_id, _lib._sel_shortValue1); - } +final class rusage_info_v6 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - int get unsignedShortValue { - return _lib._objc_msgSend_78(_id, _lib._sel_unsignedShortValue1); - } + @ffi.Uint64() + external int ri_user_time; - int get intValue { - return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); - } + @ffi.Uint64() + external int ri_system_time; - int get unsignedIntValue { - return _lib._objc_msgSend_80(_id, _lib._sel_unsignedIntValue1); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - int get longValue { - return _lib._objc_msgSend_81(_id, _lib._sel_longValue1); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - int get unsignedLongValue { - return _lib._objc_msgSend_12(_id, _lib._sel_unsignedLongValue1); - } + @ffi.Uint64() + external int ri_pageins; - int get longLongValue { - return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); - } + @ffi.Uint64() + external int ri_wired_size; - int get unsignedLongLongValue { - return _lib._objc_msgSend_83(_id, _lib._sel_unsignedLongLongValue1); - } + @ffi.Uint64() + external int ri_resident_size; - double get floatValue { - return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); - } + @ffi.Uint64() + external int ri_phys_footprint; - double get doubleValue { - return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - bool get boolValue { - return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - int get integerValue { - return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); - } + @ffi.Uint64() + external int ri_child_user_time; - int get unsignedIntegerValue { - return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); - } + @ffi.Uint64() + external int ri_child_system_time; - NSString? get stringValue { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_stringValue1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - int compare_(NSNumber? otherNumber) { - return _lib._objc_msgSend_86( - _id, _lib._sel_compare_1, otherNumber?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - bool isEqualToNumber_(NSNumber? number) { - return _lib._objc_msgSend_87( - _id, _lib._sel_isEqualToNumber_1, number?._id ?? ffi.nullptr); - } + @ffi.Uint64() + external int ri_child_pageins; - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - static NSNumber numberWithChar_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_62( - _lib._class_NSNumber1, _lib._sel_numberWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - static NSNumber numberWithUnsignedChar_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_63( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - static NSNumber numberWithShort_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_64( - _lib._class_NSNumber1, _lib._sel_numberWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_default; - static NSNumber numberWithUnsignedShort_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - static NSNumber numberWithInt_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_66( - _lib._class_NSNumber1, _lib._sel_numberWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_background; - static NSNumber numberWithUnsignedInt_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_67( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - static NSNumber numberWithLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_68( - _lib._class_NSNumber1, _lib._sel_numberWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; - static NSNumber numberWithUnsignedLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; - static NSNumber numberWithLongLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_70( - _lib._class_NSNumber1, _lib._sel_numberWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - static NSNumber numberWithUnsignedLongLong_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_71( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_billed_system_time; - static NSNumber numberWithFloat_(NativeCupertinoHttp _lib, double value) { - final _ret = _lib._objc_msgSend_72( - _lib._class_NSNumber1, _lib._sel_numberWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_serviced_system_time; - static NSNumber numberWithDouble_(NativeCupertinoHttp _lib, double value) { - final _ret = _lib._objc_msgSend_73( - _lib._class_NSNumber1, _lib._sel_numberWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_logical_writes; - static NSNumber numberWithBool_(NativeCupertinoHttp _lib, bool value) { - final _ret = _lib._objc_msgSend_74( - _lib._class_NSNumber1, _lib._sel_numberWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; - static NSNumber numberWithInteger_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_68( - _lib._class_NSNumber1, _lib._sel_numberWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_instructions; - static NSNumber numberWithUnsignedInteger_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_cycles; - static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55(_lib._class_NSNumber1, - _lib._sel_valueWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_billed_energy; - static NSValue value_withObjCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSNumber1, _lib._sel_value_withObjCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_serviced_energy; - static NSValue valueWithNonretainedObject_( - NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_56(_lib._class_NSNumber1, - _lib._sel_valueWithNonretainedObject_1, anObject._id); - return NSValue._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_interval_max_phys_footprint; - static NSValue valueWithPointer_( - NativeCupertinoHttp _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_57( - _lib._class_NSNumber1, _lib._sel_valueWithPointer_1, pointer); - return NSValue._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_runnable_time; - static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_60( - _lib._class_NSNumber1, _lib._sel_valueWithRange_1, range); - return NSValue._(_ret, _lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_flags; - static NSNumber new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } + @ffi.Uint64() + external int ri_user_ptime; - static NSNumber alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } -} + @ffi.Uint64() + external int ri_system_ptime; -class NSValue extends NSObject { - NSValue._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @ffi.Uint64() + external int ri_pinstructions; - /// Returns a [NSValue] that points to the same underlying object as [other]. - static NSValue castFrom(T other) { - return NSValue._(other._id, other._lib, retain: true, release: true); - } + @ffi.Uint64() + external int ri_pcycles; - /// Returns a [NSValue] that wraps the given raw object pointer. - static NSValue castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSValue._(other, lib, retain: retain, release: release); - } + @ffi.Uint64() + external int ri_energy_nj; - /// Returns whether [obj] is an instance of [NSValue]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); - } + @ffi.Uint64() + external int ri_penergy_nj; - void getValue_size_(ffi.Pointer value, int size) { - return _lib._objc_msgSend_33(_id, _lib._sel_getValue_size_1, value, size); - } + @ffi.Array.multi([14]) + external ffi.Array ri_reserved; +} - ffi.Pointer get objCType { - return _lib._objc_msgSend_53(_id, _lib._sel_objCType1); - } +final class rlimit extends ffi.Struct { + @rlim_t() + external int rlim_cur; - NSValue initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_54( - _id, _lib._sel_initWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } + @rlim_t() + external int rlim_max; +} - NSValue initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSValue._(_ret, _lib, retain: true, release: true); - } +typedef rlim_t = __uint64_t; - static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSValue1, _lib._sel_valueWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } +final class proc_rlimit_control_wakeupmon extends ffi.Struct { + @ffi.Uint32() + external int wm_flags; - static NSValue value_withObjCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55( - _lib._class_NSValue1, _lib._sel_value_withObjCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } + @ffi.Int32() + external int wm_rate; +} - static NSValue valueWithNonretainedObject_( - NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_56(_lib._class_NSValue1, - _lib._sel_valueWithNonretainedObject_1, anObject._id); - return NSValue._(_ret, _lib, retain: true, release: true); - } +typedef id_t = __darwin_id_t; +typedef __darwin_id_t = __uint32_t; - NSObject get nonretainedObjectValue { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nonretainedObjectValue1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +@ffi.Packed(1) +final class _OSUnalignedU16 extends ffi.Struct { + @ffi.Uint16() + external int __val; +} - static NSValue valueWithPointer_( - NativeCupertinoHttp _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_57( - _lib._class_NSValue1, _lib._sel_valueWithPointer_1, pointer); - return NSValue._(_ret, _lib, retain: true, release: true); - } +@ffi.Packed(1) +final class _OSUnalignedU32 extends ffi.Struct { + @ffi.Uint32() + external int __val; +} - ffi.Pointer get pointerValue { - return _lib._objc_msgSend_31(_id, _lib._sel_pointerValue1); - } +@ffi.Packed(1) +final class _OSUnalignedU64 extends ffi.Struct { + @ffi.Uint64() + external int __val; +} - bool isEqualToValue_(NSValue? value) { - return _lib._objc_msgSend_58( - _id, _lib._sel_isEqualToValue_1, value?._id ?? ffi.nullptr); - } +final class wait extends ffi.Opaque {} - void getValue_(ffi.Pointer value) { - return _lib._objc_msgSend_59(_id, _lib._sel_getValue_1, value); - } +final class div_t extends ffi.Struct { + @ffi.Int() + external int quot; - static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_60( - _lib._class_NSValue1, _lib._sel_valueWithRange_1, range); - return NSValue._(_ret, _lib, retain: true, release: true); - } + @ffi.Int() + external int rem; +} - NSRange get rangeValue { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeValue1); - } +final class ldiv_t extends ffi.Struct { + @ffi.Long() + external int quot; - static NSValue new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); - return NSValue._(_ret, _lib, retain: false, release: true); - } + @ffi.Long() + external int rem; +} - static NSValue alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); - return NSValue._(_ret, _lib, retain: false, release: true); - } +final class lldiv_t extends ffi.Struct { + @ffi.LongLong() + external int quot; + + @ffi.LongLong() + external int rem; } -typedef NSInteger = ffi.Long; +class _ObjCBlockBase implements ffi.Finalizable { + final ffi.Pointer<_ObjCBlock> _id; + final NativeCupertinoHttp _lib; + bool _pendingRelease; -class NSError extends NSObject { - NSError._(ffi.Pointer id, NativeCupertinoHttp lib, + _ObjCBlockBase._(this._id, this._lib, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSError] that points to the same underlying object as [other]. - static NSError castFrom(T other) { - return NSError._(other._id, other._lib, retain: true, release: true); + : _pendingRelease = release { + if (retain) { + _lib._Block_copy(_id.cast()); + } + if (release) { + _lib._objc_releaseFinalizer2.attach(this, _id.cast(), detach: this); + } } - /// Returns a [NSError] that wraps the given raw object pointer. - static NSError castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSError._(other, lib, retain: retain, release: release); + /// Releases the reference to the underlying ObjC block held by this wrapper. + /// Throws a StateError if this wrapper doesn't currently hold a reference. + void release() { + if (_pendingRelease) { + _pendingRelease = false; + _lib._Block_release(_id.cast()); + _lib._objc_releaseFinalizer2.detach(this); + } else { + throw StateError( + 'Released an ObjC block that was unowned or already released.'); + } } - /// Returns whether [obj] is an instance of [NSError]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); + @override + bool operator ==(Object other) { + return other is _ObjCBlockBase && _id == other._id; } - /// Domain cannot be nil; dict may be nil if no userInfo desired. - NSError initWithDomain_code_userInfo_( - NSErrorDomain domain, int code, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_179( - _id, - _lib._sel_initWithDomain_code_userInfo_1, - domain, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } + @override + int get hashCode => _id.hashCode; - static NSError errorWithDomain_code_userInfo_(NativeCupertinoHttp _lib, - NSErrorDomain domain, int code, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_179( - _lib._class_NSError1, - _lib._sel_errorWithDomain_code_userInfo_1, - domain, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } + /// Return a pointer to this object. + ffi.Pointer<_ObjCBlock> get pointer => _id; +} - /// These define the error. Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts. Codes are domain-specific. - NSErrorDomain get domain { - return _lib._objc_msgSend_32(_id, _lib._sel_domain1); - } +void _ObjCBlock_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block) { + return block.ref.target + .cast>() + .asFunction()(); +} - int get code { - return _lib._objc_msgSend_81(_id, _lib._sel_code1); - } +final _ObjCBlock_closureRegistry = {}; +int _ObjCBlock_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_registerClosure(Function fn) { + final id = ++_ObjCBlock_closureRegistryIndex; + _ObjCBlock_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Additional info which may be used to describe the error further. Examples of keys that might be included in here are "Line Number", "Failed URL", etc. Embedding other errors in here can also be used as a way to communicate underlying reasons for failures; for instance "File System Error" embedded in the userInfo of an NSError returned from a higher level document object. If the embedded error information is itself NSError, the standard key NSUnderlyingErrorKey can be used. - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_closureTrampoline(ffi.Pointer<_ObjCBlock> block) { + return _ObjCBlock_closureRegistry[block.ref.target.address]!(); +} - /// The primary user-presentable message for the error, for instance for NSFileReadNoPermissionError: "The file "File Name" couldn't be opened because you don't have permission to view it.". This message should ideally indicate what failed and why it failed. This value either comes from NSLocalizedDescriptionKey, or NSLocalizedFailureErrorKey+NSLocalizedFailureReasonErrorKey, or NSLocalizedFailureErrorKey. The steps this takes to construct the description include: - /// 1. Look for NSLocalizedDescriptionKey in userInfo, use value as-is if present. - /// 2. Look for NSLocalizedFailureErrorKey in userInfo. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. - /// 3. Fetch NSLocalizedDescriptionKey from userInfoValueProvider, use value as-is if present. - /// 4. Fetch NSLocalizedFailureErrorKey from userInfoValueProvider. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. - /// 5. Look for NSLocalizedFailureReasonErrorKey in userInfo or from userInfoValueProvider; combine with generic "Operation failed" message. - /// 6. Last resort localized but barely-presentable string manufactured from domain and code. The result is never nil. - NSString? get localizedDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock extends _ObjCBlockBase { + ObjCBlock._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - /// Return a complete sentence which describes why the operation failed. For instance, for NSFileReadNoPermissionError: "You don't have permission.". In many cases this will be just the "because" part of the error message (but as a complete sentence, which makes localization easier). Default implementation of this picks up the value of NSLocalizedFailureReasonErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. - NSString? get localizedFailureReason { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedFailureReason1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( + _ObjCBlock_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - /// Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel. For instance, for NSFileReadNoPermissionError: "To view or change permissions, select the item in the Finder and choose File > Get Info.". Default implementation of this picks up the value of NSLocalizedRecoverySuggestionErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. - NSString? get localizedRecoverySuggestion { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedRecoverySuggestion1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock.fromFunction(NativeCupertinoHttp lib, void Function() fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( + _ObjCBlock_closureTrampoline) + .cast(), + _ObjCBlock_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call() { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() + .asFunction block)>()(_id); } +} - /// Return titles of buttons that are appropriate for displaying in an alert. These should match the string provided as a part of localizedRecoverySuggestion. The first string would be the title of the right-most and default button, the second one next to it, and so on. If used in an alert the corresponding default return values are NSAlertFirstButtonReturn + n. Default implementation of this picks up the value of NSLocalizedRecoveryOptionsErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. nil return usually implies no special suggestion, which would imply a single "OK" button. - NSArray? get localizedRecoveryOptions { - final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_localizedRecoveryOptions1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +final class _ObjCBlockDesc extends ffi.Struct { + @ffi.UnsignedLong() + external int reserved; - /// Return an object that conforms to the NSErrorRecoveryAttempting informal protocol. The recovery attempter must be an object that can correctly interpret an index into the array returned by localizedRecoveryOptions. The default implementation of this picks up the value of NSRecoveryAttempterErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. - NSObject get recoveryAttempter { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_recoveryAttempter1); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @ffi.UnsignedLong() + external int size; - /// Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user. This is done automatically by +[NSAlert alertWithError:], which the presentError: variants in NSApplication go through. The default implementation of this picks up the value of the NSHelpAnchorErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. - NSString? get helpAnchor { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_helpAnchor1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer copy_helper; - /// Return a list of underlying errors, if any. It includes the values of both NSUnderlyingErrorKey and NSMultipleUnderlyingErrorsKey. If there are no underlying errors, returns an empty array. - NSArray? get underlyingErrors { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_underlyingErrors1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer dispose_helper; - /// Specify a block which will be called from the implementations of localizedDescription, localizedFailureReason, localizedRecoverySuggestion, localizedRecoveryOptions, recoveryAttempter, helpAnchor, and debugDescription when the underlying value for these is not present in the userInfo dictionary of NSError instances with the specified domain. The provider will be called with the userInfo key corresponding to the queried property: For instance, NSLocalizedDescriptionKey for localizedDescription. The provider should return nil for any keys it is not able to provide and, very importantly, any keys it does not recognize (since we may extend the list of keys in future releases). - /// - /// The specified block will be called synchronously at the time when the above properties are queried. The results are not cached. - /// - /// This provider is optional. It enables localization and formatting of error messages to be done lazily; rather than populating the userInfo at NSError creation time, these keys will be fetched on-demand when asked for. - /// - /// It is expected that only the “owner” of an NSError domain specifies the provider for the domain, and this is done once. This facility is not meant for consumers of errors to customize the userInfo entries. This facility should not be used to customize the behaviors of error domains provided by the system. - /// - /// If an appropriate result for the requested key cannot be provided, return nil rather than choosing to manufacture a generic fallback response such as "Operation could not be completed, error 42." NSError will take care of the fallback cases. - static void setUserInfoValueProviderForDomain_provider_( - NativeCupertinoHttp _lib, - NSErrorDomain errorDomain, - ObjCBlock10 provider) { - return _lib._objc_msgSend_181( - _lib._class_NSError1, - _lib._sel_setUserInfoValueProviderForDomain_provider_1, - errorDomain, - provider._id); + external ffi.Pointer signature; +} + +final class _ObjCBlock extends ffi.Struct { + external ffi.Pointer isa; + + @ffi.Int() + external int flags; + + @ffi.Int() + external int reserved; + + external ffi.Pointer invoke; + + external ffi.Pointer<_ObjCBlockDesc> descriptor; + + external ffi.Pointer target; +} + +int _ObjCBlock1_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock1_closureRegistry = {}; +int _ObjCBlock1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock1_registerClosure(Function fn) { + final id = ++_ObjCBlock1_closureRegistryIndex; + _ObjCBlock1_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +int _ObjCBlock1_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock1_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock1 extends _ObjCBlockBase { + ObjCBlock1._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock1.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer arg0, ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock1_fnPtrTrampoline, 0) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock1.fromFunction(NativeCupertinoHttp lib, + int Function(ffi.Pointer arg0, ffi.Pointer arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock1_closureTrampoline, 0) + .cast(), + _ObjCBlock1_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + int call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } +} - static ObjCBlock10 userInfoValueProviderForDomain_(NativeCupertinoHttp _lib, - NSError? err, NSErrorUserInfoKey userInfoKey, NSErrorDomain errorDomain) { - final _ret = _lib._objc_msgSend_182( - _lib._class_NSError1, - _lib._sel_userInfoValueProviderForDomain_1, - err?._id ?? ffi.nullptr, - userInfoKey, - errorDomain); - return ObjCBlock10._(_ret, _lib); +typedef dev_t = __darwin_dev_t; +typedef __darwin_dev_t = __int32_t; +typedef mode_t = __darwin_mode_t; +typedef __darwin_mode_t = __uint16_t; +typedef __uint16_t = ffi.UnsignedShort; + +final class fd_set extends ffi.Struct { + @ffi.Array.multi([32]) + external ffi.Array<__int32_t> fds_bits; +} + +final class objc_class extends ffi.Opaque {} + +final class objc_object extends ffi.Struct { + external ffi.Pointer isa; +} + +final class ObjCObject extends ffi.Opaque {} + +final class objc_selector extends ffi.Opaque {} + +final class _malloc_zone_t extends ffi.Opaque {} + +final class ObjCSel extends ffi.Opaque {} + +typedef objc_objectptr_t = ffi.Pointer; + +final class _NSZone extends ffi.Opaque {} + +class _ObjCWrapper implements ffi.Finalizable { + final ffi.Pointer _id; + final NativeCupertinoHttp _lib; + bool _pendingRelease; + + _ObjCWrapper._(this._id, this._lib, + {bool retain = false, bool release = false}) + : _pendingRelease = release { + if (retain) { + _lib._objc_retain(_id.cast()); + } + if (release) { + _lib._objc_releaseFinalizer11.attach(this, _id.cast(), detach: this); + } } - static NSError new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); - return NSError._(_ret, _lib, retain: false, release: true); + /// Releases the reference to the underlying ObjC object held by this wrapper. + /// Throws a StateError if this wrapper doesn't currently hold a reference. + void release() { + if (_pendingRelease) { + _pendingRelease = false; + _lib._objc_release(_id.cast()); + _lib._objc_releaseFinalizer11.detach(this); + } else { + throw StateError( + 'Released an ObjC object that was unowned or already released.'); + } } - static NSError alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); - return NSError._(_ret, _lib, retain: false, release: true); + @override + bool operator ==(Object other) { + return other is _ObjCWrapper && _id == other._id; } -} -typedef NSErrorDomain = ffi.Pointer; + @override + int get hashCode => _id.hashCode; -/// Immutable Dictionary -class NSDictionary extends NSObject { - NSDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, + /// Return a pointer to this object. + ffi.Pointer get pointer => _id; +} + +class NSObject extends _ObjCWrapper { + NSObject._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSDictionary] that points to the same underlying object as [other]. - static NSDictionary castFrom(T other) { - return NSDictionary._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSObject] that points to the same underlying object as [other]. + static NSObject castFrom(T other) { + return NSObject._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSDictionary] that wraps the given raw object pointer. - static NSDictionary castFromPointer( + /// Returns a [NSObject] that wraps the given raw object pointer. + static NSObject castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSDictionary._(other, lib, retain: retain, release: release); + return NSObject._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSDictionary]. + /// Returns whether [obj] is an instance of [NSObject]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); - } - - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); } - NSObject objectForKey_(NSObject aKey) { - final _ret = _lib._objc_msgSend_91(_id, _lib._sel_objectForKey_1, aKey._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static void load(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); } - NSEnumerator keyEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_keyEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); + static void initialize(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); } - @override - NSDictionary init() { + NSObject init() { final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_93( - _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSObject new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); + return NSObject._(_ret, _lib, retain: false, release: true); } - NSDictionary initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSObject allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); } - NSArray? get allKeys { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allKeys1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + static NSObject alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); + return NSObject._(_ret, _lib, retain: false, release: true); } - NSArray allKeysForObject_(NSObject anObject) { - final _ret = - _lib._objc_msgSend_96(_id, _lib._sel_allKeysForObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); + void dealloc() { + return _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); } - NSArray? get allValues { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allValues1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + void finalize() { + return _lib._objc_msgSend_1(_id, _lib._sel_finalize1); } - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSObject copy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); + return NSObject._(_ret, _lib, retain: false, release: true); } - NSString? get descriptionInStringsFileFormat { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_descriptionInStringsFileFormat1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSObject mutableCopy() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); + return NSObject._(_ret, _lib, retain: false, release: true); } - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); + static NSObject copyWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); } - NSString descriptionWithLocale_indent_(NSObject locale, int level) { - final _ret = _lib._objc_msgSend_99( - _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); - return NSString._(_ret, _lib, retain: true, release: true); + static NSObject mutableCopyWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); + return NSObject._(_ret, _lib, retain: false, release: true); } - bool isEqualToDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_163(_id, _lib._sel_isEqualToDictionary_1, - otherDictionary?._id ?? ffi.nullptr); + static bool instancesRespondToSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_4(_lib._class_NSObject1, + _lib._sel_instancesRespondToSelector_1, aSelector); } - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); + static bool conformsToProtocol_( + NativeCupertinoHttp _lib, Protocol? protocol) { + return _lib._objc_msgSend_5(_lib._class_NSObject1, + _lib._sel_conformsToProtocol_1, protocol?._id ?? ffi.nullptr); } - NSArray objectsForKeys_notFoundMarker_(NSArray? keys, NSObject marker) { - final _ret = _lib._objc_msgSend_164( - _id, - _lib._sel_objectsForKeys_notFoundMarker_1, - keys?._id ?? ffi.nullptr, - marker._id); - return NSArray._(_ret, _lib, retain: true, release: true); + IMP methodForSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); } - /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. - bool writeToURL_error_( - NSURL? url, ffi.Pointer> error) { - return _lib._objc_msgSend_109( - _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); + static IMP instanceMethodForSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + return _lib._objc_msgSend_6(_lib._class_NSObject1, + _lib._sel_instanceMethodForSelector_1, aSelector); } - NSArray keysSortedByValueUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_107( - _id, _lib._sel_keysSortedByValueUsingSelector_1, comparator); - return NSArray._(_ret, _lib, retain: true, release: true); + void doesNotRecognizeSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_7( + _id, _lib._sel_doesNotRecognizeSelector_1, aSelector); } - /// count refers to the number of elements in the dictionary - void getObjects_andKeys_count_(ffi.Pointer> objects, - ffi.Pointer> keys, int count) { - return _lib._objc_msgSend_165( - _id, _lib._sel_getObjects_andKeys_count_1, objects, keys, count); + NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_8( + _id, _lib._sel_forwardingTargetForSelector_1, aSelector); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSObject objectForKeyedSubscript_(NSObject key) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_objectForKeyedSubscript_1, key._id); - return NSObject._(_ret, _lib, retain: true, release: true); + void forwardInvocation_(NSInvocation? anInvocation) { + return _lib._objc_msgSend_9( + _id, _lib._sel_forwardInvocation_1, anInvocation?._id ?? ffi.nullptr); } - void enumerateKeysAndObjectsUsingBlock_(ObjCBlock8 block) { - return _lib._objc_msgSend_166( - _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); + NSMethodSignature methodSignatureForSelector_( + ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_10( + _id, _lib._sel_methodSignatureForSelector_1, aSelector); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); } - void enumerateKeysAndObjectsWithOptions_usingBlock_( - int opts, ObjCBlock8 block) { - return _lib._objc_msgSend_167( - _id, - _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, - opts, - block._id); + static NSMethodSignature instanceMethodSignatureForSelector_( + NativeCupertinoHttp _lib, ffi.Pointer aSelector) { + final _ret = _lib._objc_msgSend_10(_lib._class_NSObject1, + _lib._sel_instanceMethodSignatureForSelector_1, aSelector); + return NSMethodSignature._(_ret, _lib, retain: true, release: true); } - NSArray keysSortedByValueUsingComparator_(NSComparator cmptr) { - final _ret = _lib._objc_msgSend_141( - _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); + bool allowsWeakReference() { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsWeakReference1); } - NSArray keysSortedByValueWithOptions_usingComparator_( - int opts, NSComparator cmptr) { - final _ret = _lib._objc_msgSend_142(_id, - _lib._sel_keysSortedByValueWithOptions_usingComparator_1, opts, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); + bool retainWeakReference() { + return _lib._objc_msgSend_11(_id, _lib._sel_retainWeakReference1); } - NSObject keysOfEntriesPassingTest_(ObjCBlock9 predicate) { - final _ret = _lib._objc_msgSend_168( - _id, _lib._sel_keysOfEntriesPassingTest_1, predicate._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool isSubclassOfClass_(NativeCupertinoHttp _lib, NSObject aClass) { + return _lib._objc_msgSend_0( + _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); } - NSObject keysOfEntriesWithOptions_passingTest_( - int opts, ObjCBlock9 predicate) { - final _ret = _lib._objc_msgSend_169(_id, - _lib._sel_keysOfEntriesWithOptions_passingTest_1, opts, predicate._id); - return NSObject._(_ret, _lib, retain: true, release: true); + static bool resolveClassMethod_( + NativeCupertinoHttp _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); } - /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:andKeys:count: - void getObjects_andKeys_(ffi.Pointer> objects, - ffi.Pointer> keys) { - return _lib._objc_msgSend_170( - _id, _lib._sel_getObjects_andKeys_1, objects, keys); + static bool resolveInstanceMethod_( + NativeCupertinoHttp _lib, ffi.Pointer sel) { + return _lib._objc_msgSend_4( + _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); } - /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. - static NSDictionary dictionaryWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_171(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static int hash(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); } - static NSDictionary dictionaryWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_172(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSObject superclass(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSDictionary initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_171( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSObject class1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSDictionary initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_172( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSString description(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_32(_lib._class_NSObject1, _lib._sel_description1); + return NSString._(_ret, _lib, retain: true, release: true); } - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); + static NSString debugDescription(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_32( + _lib._class_NSObject1, _lib._sel_debugDescription1); + return NSString._(_ret, _lib, retain: true, release: true); } - /// the atomically flag is ignored if url of a type that cannot be written atomically. - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); + static int version(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_81(_lib._class_NSObject1, _lib._sel_version1); } - static NSDictionary dictionary(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static void setVersion_(NativeCupertinoHttp _lib, int aVersion) { + return _lib._objc_msgSend_279( + _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); } - static NSDictionary dictionaryWithObject_forKey_( - NativeCupertinoHttp _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_173(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSObject get classForCoder { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSDictionary dictionaryWithObjects_forKeys_count_( - NativeCupertinoHttp _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_93(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSObject replacementObjectForCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_replacementObjectForCoder_1, coder?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSDictionary dictionaryWithObjectsAndKeys_( - NativeCupertinoHttp _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_91(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSObject awakeAfterUsingCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_awakeAfterUsingCoder_1, coder?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: false, release: true); } - static NSDictionary dictionaryWithDictionary_( - NativeCupertinoHttp _lib, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_174(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static void poseAsClass_(NativeCupertinoHttp _lib, NSObject aClass) { + return _lib._objc_msgSend_200( + _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); } - static NSDictionary dictionaryWithObjects_forKeys_( - NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_175( - _lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSObject get autoContentAccessingProxy { + final _ret = + _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void URL_resourceDataDidBecomeAvailable_(NSURL? sender, NSData? newBytes) { + return _lib._objc_msgSend_280( + _id, + _lib._sel_URL_resourceDataDidBecomeAvailable_1, + sender?._id ?? ffi.nullptr, + newBytes?._id ?? ffi.nullptr); } - NSDictionary initWithDictionary_(NSDictionary? otherDictionary) { - final _ret = _lib._objc_msgSend_174(_id, _lib._sel_initWithDictionary_1, - otherDictionary?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + void URLResourceDidFinishLoading_(NSURL? sender) { + return _lib._objc_msgSend_281(_id, _lib._sel_URLResourceDidFinishLoading_1, + sender?._id ?? ffi.nullptr); } - NSDictionary initWithDictionary_copyItems_( - NSDictionary? otherDictionary, bool flag) { - final _ret = _lib._objc_msgSend_176( - _id, - _lib._sel_initWithDictionary_copyItems_1, - otherDictionary?._id ?? ffi.nullptr, - flag); - return NSDictionary._(_ret, _lib, retain: false, release: true); + void URLResourceDidCancelLoading_(NSURL? sender) { + return _lib._objc_msgSend_281(_id, _lib._sel_URLResourceDidCancelLoading_1, + sender?._id ?? ffi.nullptr); } - NSDictionary initWithObjects_forKeys_(NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_175( + void URL_resourceDidFailLoadingWithReason_(NSURL? sender, NSString? reason) { + return _lib._objc_msgSend_282( _id, - _lib._sel_initWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + _lib._sel_URL_resourceDidFailLoadingWithReason_1, + sender?._id ?? ffi.nullptr, + reason?._id ?? ffi.nullptr); } - /// Reads dictionary stored in NSPropertyList format from the specified url. - NSDictionary initWithContentsOfURL_error_( - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_177( + /// Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: + /// + /// - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; + /// + /// The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. + void + attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( + NSError? error, + int recoveryOptionIndex, + NSObject delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo) { + return _lib._objc_msgSend_283( _id, - _lib._sel_initWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); + _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, + error?._id ?? ffi.nullptr, + recoveryOptionIndex, + delegate._id, + didRecoverSelector, + contextInfo); } - /// Reads dictionary stored in NSPropertyList format from the specified url. - static NSDictionary dictionaryWithContentsOfURL_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_177( - _lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); + /// Given that an error alert has been presented applicaton-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and return YES if error recovery was completely successful, NO otherwise. The recovery option index is an index into the error's array of localized recovery options. + bool attemptRecoveryFromError_optionIndex_( + NSError? error, int recoveryOptionIndex) { + return _lib._objc_msgSend_284( + _id, + _lib._sel_attemptRecoveryFromError_optionIndex_1, + error?._id ?? ffi.nullptr, + recoveryOptionIndex); } +} - /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. - /// The keys are copied from the array and must be copyable. - /// If the array parameter is nil or not an NSArray, an exception is thrown. - /// If the array of keys is empty, an empty key set is returned. - /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). - /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. - /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. - static NSObject sharedKeySetForKeys_( - NativeCupertinoHttp _lib, NSArray? keys) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSDictionary1, - _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +typedef instancetype = ffi.Pointer; - int countByEnumeratingWithState_objects_count_( - ffi.Pointer state, - ffi.Pointer> buffer, - int len) { - return _lib._objc_msgSend_178( - _id, - _lib._sel_countByEnumeratingWithState_objects_count_1, - state, - buffer, - len); +class Protocol extends _ObjCWrapper { + Protocol._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [Protocol] that points to the same underlying object as [other]. + static Protocol castFrom(T other) { + return Protocol._(other._id, other._lib, retain: true, release: true); } - static NSDictionary new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); - return NSDictionary._(_ret, _lib, retain: false, release: true); + /// Returns a [Protocol] that wraps the given raw object pointer. + static Protocol castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return Protocol._(other, lib, retain: retain, release: release); } - static NSDictionary alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); - return NSDictionary._(_ret, _lib, retain: false, release: true); + /// Returns whether [obj] is an instance of [Protocol]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); } } -class NSEnumerator extends NSObject { - NSEnumerator._(ffi.Pointer id, NativeCupertinoHttp lib, +typedef IMP = ffi.Pointer>; + +class NSInvocation extends _ObjCWrapper { + NSInvocation._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSEnumerator] that points to the same underlying object as [other]. - static NSEnumerator castFrom(T other) { - return NSEnumerator._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSInvocation] that points to the same underlying object as [other]. + static NSInvocation castFrom(T other) { + return NSInvocation._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSEnumerator] that wraps the given raw object pointer. - static NSEnumerator castFromPointer( + /// Returns a [NSInvocation] that wraps the given raw object pointer. + static NSInvocation castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSEnumerator._(other, lib, retain: retain, release: release); + return NSInvocation._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSEnumerator]. + /// Returns whether [obj] is an instance of [NSInvocation]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSEnumerator1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInvocation1); } +} - NSObject nextObject() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nextObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } +class NSMethodSignature extends _ObjCWrapper { + NSMethodSignature._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - NSObject? get allObjects { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. + static NSMethodSignature castFrom(T other) { + return NSMethodSignature._(other._id, other._lib, + retain: true, release: true); } - static NSEnumerator new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); - return NSEnumerator._(_ret, _lib, retain: false, release: true); + /// Returns a [NSMethodSignature] that wraps the given raw object pointer. + static NSMethodSignature castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMethodSignature._(other, lib, retain: retain, release: release); } - static NSEnumerator alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); - return NSEnumerator._(_ret, _lib, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSMethodSignature]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMethodSignature1); } } -/// Immutable Array -class NSArray extends NSObject { - NSArray._(ffi.Pointer id, NativeCupertinoHttp lib, +typedef NSUInteger = ffi.UnsignedLong; + +class NSString extends NSObject { + NSString._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSArray] that points to the same underlying object as [other]. - static NSArray castFrom(T other) { - return NSArray._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSString] that points to the same underlying object as [other]. + static NSString castFrom(T other) { + return NSString._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSArray] that wraps the given raw object pointer. - static NSArray castFromPointer( + /// Returns a [NSString] that wraps the given raw object pointer. + static NSString castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSArray._(other, lib, retain: retain, release: release); + return NSString._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSArray]. + /// Returns whether [obj] is an instance of [NSString]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); } - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); + factory NSString(NativeCupertinoHttp _lib, String str) { + final cstr = str.toNativeUtf16(); + final nsstr = stringWithCharacters_length_(_lib, cstr.cast(), str.length); + pkg_ffi.calloc.free(cstr); + return nsstr; } - NSObject objectAtIndex_(int index) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndex_1, index); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + String toString() { + final data = + dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); + return data.bytes.cast().toDartString(length: length); } - @override - NSArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSArray._(_ret, _lib, retain: true, release: true); + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); } - NSArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_95( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); + int characterAtIndex_(int index) { + return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); } - NSArray initWithCoder_(NSCoder? coder) { + @override + NSString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSString._(_ret, _lib, retain: true, release: true); + } + + NSString initWithCoder_(NSCoder? coder) { final _ret = _lib._objc_msgSend_14( _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSArray arrayByAddingObject_(NSObject anObject) { - final _ret = _lib._objc_msgSend_96( - _id, _lib._sel_arrayByAddingObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); + NSString substringFromIndex_(int from) { + final _ret = + _lib._objc_msgSend_15(_id, _lib._sel_substringFromIndex_1, from); + return NSString._(_ret, _lib, retain: true, release: true); } - NSArray arrayByAddingObjectsFromArray_(NSArray? otherArray) { - final _ret = _lib._objc_msgSend_97( - _id, - _lib._sel_arrayByAddingObjectsFromArray_1, - otherArray?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSString substringToIndex_(int to) { + final _ret = _lib._objc_msgSend_15(_id, _lib._sel_substringToIndex_1, to); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString componentsJoinedByString_(NSString? separator) { - final _ret = _lib._objc_msgSend_98(_id, - _lib._sel_componentsJoinedByString_1, separator?._id ?? ffi.nullptr); + NSString substringWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_16(_id, _lib._sel_substringWithRange_1, range); return NSString._(_ret, _lib, retain: true, release: true); } - bool containsObject_(NSObject anObject) { - return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); + void getCharacters_range_(ffi.Pointer buffer, NSRange range) { + return _lib._objc_msgSend_17( + _id, _lib._sel_getCharacters_range_1, buffer, range); } - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + int compare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_compare_1, string?._id ?? ffi.nullptr); } - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); + int compare_options_(NSString? string, int mask) { + return _lib._objc_msgSend_19( + _id, _lib._sel_compare_options_1, string?._id ?? ffi.nullptr, mask); } - NSString descriptionWithLocale_indent_(NSObject locale, int level) { - final _ret = _lib._objc_msgSend_99( - _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); - return NSString._(_ret, _lib, retain: true, release: true); + int compare_options_range_( + NSString? string, int mask, NSRange rangeOfReceiverToCompare) { + return _lib._objc_msgSend_20(_id, _lib._sel_compare_options_range_1, + string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare); } - NSObject firstObjectCommonWithArray_(NSArray? otherArray) { - final _ret = _lib._objc_msgSend_100(_id, - _lib._sel_firstObjectCommonWithArray_1, otherArray?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + int compare_options_range_locale_(NSString? string, int mask, + NSRange rangeOfReceiverToCompare, NSObject locale) { + return _lib._objc_msgSend_21(_id, _lib._sel_compare_options_range_locale_1, + string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare, locale._id); } - void getObjects_range_( - ffi.Pointer> objects, NSRange range) { - return _lib._objc_msgSend_101( - _id, _lib._sel_getObjects_range_1, objects, range); + int caseInsensitiveCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_caseInsensitiveCompare_1, string?._id ?? ffi.nullptr); } - int indexOfObject_(NSObject anObject) { - return _lib._objc_msgSend_102(_id, _lib._sel_indexOfObject_1, anObject._id); + int localizedCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_localizedCompare_1, string?._id ?? ffi.nullptr); } - int indexOfObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_103( - _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); + int localizedCaseInsensitiveCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, + _lib._sel_localizedCaseInsensitiveCompare_1, + string?._id ?? ffi.nullptr); } - int indexOfObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_102( - _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); + int localizedStandardCompare_(NSString? string) { + return _lib._objc_msgSend_18( + _id, _lib._sel_localizedStandardCompare_1, string?._id ?? ffi.nullptr); } - int indexOfObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_103( - _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); + bool isEqualToString_(NSString? aString) { + return _lib._objc_msgSend_22( + _id, _lib._sel_isEqualToString_1, aString?._id ?? ffi.nullptr); } - bool isEqualToArray_(NSArray? otherArray) { - return _lib._objc_msgSend_104( - _id, _lib._sel_isEqualToArray_1, otherArray?._id ?? ffi.nullptr); + bool hasPrefix_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_hasPrefix_1, str?._id ?? ffi.nullptr); } - NSObject get firstObject { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_firstObject1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool hasSuffix_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_hasSuffix_1, str?._id ?? ffi.nullptr); } - NSObject get lastObject { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_lastObject1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSString commonPrefixWithString_options_(NSString? str, int mask) { + final _ret = _lib._objc_msgSend_23( + _id, + _lib._sel_commonPrefixWithString_options_1, + str?._id ?? ffi.nullptr, + mask); + return NSString._(_ret, _lib, retain: true, release: true); } - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); + bool containsString_(NSString? str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_containsString_1, str?._id ?? ffi.nullptr); } - NSEnumerator reverseObjectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_reverseObjectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); + bool localizedCaseInsensitiveContainsString_(NSString? str) { + return _lib._objc_msgSend_22( + _id, + _lib._sel_localizedCaseInsensitiveContainsString_1, + str?._id ?? ffi.nullptr); } - NSData? get sortedArrayHint { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_sortedArrayHint1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + bool localizedStandardContainsString_(NSString? str) { + return _lib._objc_msgSend_22(_id, + _lib._sel_localizedStandardContainsString_1, str?._id ?? ffi.nullptr); } - NSArray sortedArrayUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context) { - final _ret = _lib._objc_msgSend_105( - _id, _lib._sel_sortedArrayUsingFunction_context_1, comparator, context); - return NSArray._(_ret, _lib, retain: true, release: true); + NSRange localizedStandardRangeOfString_(NSString? str) { + return _lib._objc_msgSend_24(_id, + _lib._sel_localizedStandardRangeOfString_1, str?._id ?? ffi.nullptr); } - NSArray sortedArrayUsingFunction_context_hint_( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - NSData? hint) { - final _ret = _lib._objc_msgSend_106( - _id, - _lib._sel_sortedArrayUsingFunction_context_hint_1, - comparator, - context, - hint?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSRange rangeOfString_(NSString? searchString) { + return _lib._objc_msgSend_24( + _id, _lib._sel_rangeOfString_1, searchString?._id ?? ffi.nullptr); } - NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_107( - _id, _lib._sel_sortedArrayUsingSelector_1, comparator); - return NSArray._(_ret, _lib, retain: true, release: true); + NSRange rangeOfString_options_(NSString? searchString, int mask) { + return _lib._objc_msgSend_25(_id, _lib._sel_rangeOfString_options_1, + searchString?._id ?? ffi.nullptr, mask); } - NSArray subarrayWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_108(_id, _lib._sel_subarrayWithRange_1, range); - return NSArray._(_ret, _lib, retain: true, release: true); + NSRange rangeOfString_options_range_( + NSString? searchString, int mask, NSRange rangeOfReceiverToSearch) { + return _lib._objc_msgSend_26(_id, _lib._sel_rangeOfString_options_range_1, + searchString?._id ?? ffi.nullptr, mask, rangeOfReceiverToSearch); } - /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. - bool writeToURL_error_( - NSURL? url, ffi.Pointer> error) { - return _lib._objc_msgSend_109( - _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); + NSRange rangeOfString_options_range_locale_(NSString? searchString, int mask, + NSRange rangeOfReceiverToSearch, NSLocale? locale) { + return _lib._objc_msgSend_27( + _id, + _lib._sel_rangeOfString_options_range_locale_1, + searchString?._id ?? ffi.nullptr, + mask, + rangeOfReceiverToSearch, + locale?._id ?? ffi.nullptr); } - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_7( - _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); + NSRange rangeOfCharacterFromSet_(NSCharacterSet? searchSet) { + return _lib._objc_msgSend_228(_id, _lib._sel_rangeOfCharacterFromSet_1, + searchSet?._id ?? ffi.nullptr); } - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject argument) { - return _lib._objc_msgSend_110( + NSRange rangeOfCharacterFromSet_options_( + NSCharacterSet? searchSet, int mask) { + return _lib._objc_msgSend_229( _id, - _lib._sel_makeObjectsPerformSelector_withObject_1, - aSelector, - argument._id); + _lib._sel_rangeOfCharacterFromSet_options_1, + searchSet?._id ?? ffi.nullptr, + mask); } - NSArray objectsAtIndexes_(NSIndexSet? indexes) { - final _ret = _lib._objc_msgSend_131( - _id, _lib._sel_objectsAtIndexes_1, indexes?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSRange rangeOfCharacterFromSet_options_range_( + NSCharacterSet? searchSet, int mask, NSRange rangeOfReceiverToSearch) { + return _lib._objc_msgSend_230( + _id, + _lib._sel_rangeOfCharacterFromSet_options_range_1, + searchSet?._id ?? ffi.nullptr, + mask, + rangeOfReceiverToSearch); } - NSObject objectAtIndexedSubscript_(int idx) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndexedSubscript_1, idx); - return NSObject._(_ret, _lib, retain: true, release: true); + NSRange rangeOfComposedCharacterSequenceAtIndex_(int index) { + return _lib._objc_msgSend_231( + _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); } - void enumerateObjectsUsingBlock_(ObjCBlock3 block) { - return _lib._objc_msgSend_132( - _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); + NSRange rangeOfComposedCharacterSequencesForRange_(NSRange range) { + return _lib._objc_msgSend_232( + _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); } - void enumerateObjectsWithOptions_usingBlock_(int opts, ObjCBlock3 block) { - return _lib._objc_msgSend_133(_id, - _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); + NSString stringByAppendingString_(NSString? aString) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_stringByAppendingString_1, aString?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - void enumerateObjectsAtIndexes_options_usingBlock_( - NSIndexSet? s, int opts, ObjCBlock3 block) { - return _lib._objc_msgSend_134( - _id, - _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, - s?._id ?? ffi.nullptr, - opts, - block._id); + NSString stringByAppendingFormat_(NSString? format) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_stringByAppendingFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - int indexOfObjectPassingTest_(ObjCBlock4 predicate) { - return _lib._objc_msgSend_135( - _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); + double get doubleValue { + return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); } - int indexOfObjectWithOptions_passingTest_(int opts, ObjCBlock4 predicate) { - return _lib._objc_msgSend_136(_id, - _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); + double get floatValue { + return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); } - int indexOfObjectAtIndexes_options_passingTest_( - NSIndexSet? s, int opts, ObjCBlock4 predicate) { - return _lib._objc_msgSend_137( - _id, - _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, - s?._id ?? ffi.nullptr, - opts, - predicate._id); + int get intValue { + return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); } - NSIndexSet indexesOfObjectsPassingTest_(ObjCBlock4 predicate) { - final _ret = _lib._objc_msgSend_138( - _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + int get integerValue { + return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); } - NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock4 predicate) { - final _ret = _lib._objc_msgSend_139( - _id, - _lib._sel_indexesOfObjectsWithOptions_passingTest_1, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + int get longLongValue { + return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); } - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( - NSIndexSet? s, int opts, ObjCBlock4 predicate) { - final _ret = _lib._objc_msgSend_140( - _id, - _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, - s?._id ?? ffi.nullptr, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + bool get boolValue { + return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); } - NSArray sortedArrayUsingComparator_(NSComparator cmptr) { - final _ret = _lib._objc_msgSend_141( - _id, _lib._sel_sortedArrayUsingComparator_1, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSString? get uppercaseString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_uppercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSArray sortedArrayWithOptions_usingComparator_( - int opts, NSComparator cmptr) { - final _ret = _lib._objc_msgSend_142( - _id, _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSString? get lowercaseString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lowercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - /// binary search - int indexOfObject_inSortedRange_options_usingComparator_( - NSObject obj, NSRange r, int opts, NSComparator cmp) { - return _lib._objc_msgSend_143( - _id, - _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, - obj._id, - r, - opts, - cmp); + NSString? get capitalizedString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_capitalizedString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSArray array(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); - return NSArray._(_ret, _lib, retain: true, release: true); + NSString? get localizedUppercaseString { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedUppercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSArray arrayWithObject_(NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_91( - _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); + NSString? get localizedLowercaseString { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedLowercaseString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSArray arrayWithObjects_count_(NativeCupertinoHttp _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_95( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); + NSString? get localizedCapitalizedString { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedCapitalizedString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSArray arrayWithObjects_( - NativeCupertinoHttp _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_91( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); + NSString uppercaseStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_233( + _id, _lib._sel_uppercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSArray arrayWithArray_(NativeCupertinoHttp _lib, NSArray? array) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSArray1, - _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSString lowercaseStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_233( + _id, _lib._sel_lowercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - NSArray initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_91(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); + NSString capitalizedStringWithLocale_(NSLocale? locale) { + final _ret = _lib._objc_msgSend_233(_id, + _lib._sel_capitalizedStringWithLocale_1, locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - NSArray initWithArray_(NSArray? array) { - final _ret = _lib._objc_msgSend_100( - _id, _lib._sel_initWithArray_1, array?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + void getLineStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range) { + return _lib._objc_msgSend_234( + _id, + _lib._sel_getLineStart_end_contentsEnd_forRange_1, + startPtr, + lineEndPtr, + contentsEndPtr, + range); } - NSArray initWithArray_copyItems_(NSArray? array, bool flag) { - final _ret = _lib._objc_msgSend_144(_id, - _lib._sel_initWithArray_copyItems_1, array?._id ?? ffi.nullptr, flag); - return NSArray._(_ret, _lib, retain: false, release: true); + NSRange lineRangeForRange_(NSRange range) { + return _lib._objc_msgSend_232(_id, _lib._sel_lineRangeForRange_1, range); } - /// Reads array stored in NSPropertyList format from the specified url. - NSArray initWithContentsOfURL_error_( - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_145( + void getParagraphStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer parEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range) { + return _lib._objc_msgSend_234( _id, - _lib._sel_initWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); + _lib._sel_getParagraphStart_end_contentsEnd_forRange_1, + startPtr, + parEndPtr, + contentsEndPtr, + range); } - /// Reads array stored in NSPropertyList format from the specified url. - static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_145( - _lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); + NSRange paragraphRangeForRange_(NSRange range) { + return _lib._objc_msgSend_232( + _id, _lib._sel_paragraphRangeForRange_1, range); } - NSOrderedCollectionDifference - differenceFromArray_withOptions_usingEquivalenceTest_( - NSArray? other, int options, ObjCBlock7 block) { - final _ret = _lib._objc_msgSend_154( + void enumerateSubstringsInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock15 block) { + return _lib._objc_msgSend_235( _id, - _lib._sel_differenceFromArray_withOptions_usingEquivalenceTest_1, - other?._id ?? ffi.nullptr, - options, + _lib._sel_enumerateSubstringsInRange_options_usingBlock_1, + range, + opts, block._id); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); } - NSOrderedCollectionDifference differenceFromArray_withOptions_( - NSArray? other, int options) { - final _ret = _lib._objc_msgSend_155( - _id, - _lib._sel_differenceFromArray_withOptions_1, - other?._id ?? ffi.nullptr, - options); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + void enumerateLinesUsingBlock_(ObjCBlock16 block) { + return _lib._objc_msgSend_236( + _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); } - /// Uses isEqual: to determine the difference between the parameter and the receiver - NSOrderedCollectionDifference differenceFromArray_(NSArray? other) { - final _ret = _lib._objc_msgSend_156( - _id, _lib._sel_differenceFromArray_1, other?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + ffi.Pointer get UTF8String { + return _lib._objc_msgSend_53(_id, _lib._sel_UTF8String1); } - NSArray arrayByApplyingDifference_( - NSOrderedCollectionDifference? difference) { - final _ret = _lib._objc_msgSend_157(_id, - _lib._sel_arrayByApplyingDifference_1, difference?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + int get fastestEncoding { + return _lib._objc_msgSend_12(_id, _lib._sel_fastestEncoding1); } - /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead. - void getObjects_(ffi.Pointer> objects) { - return _lib._objc_msgSend_158(_id, _lib._sel_getObjects_1, objects); + int get smallestEncoding { + return _lib._objc_msgSend_12(_id, _lib._sel_smallestEncoding1); } - /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. - static NSArray arrayWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_159(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSData dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { + final _ret = _lib._objc_msgSend_237(_id, + _lib._sel_dataUsingEncoding_allowLossyConversion_1, encoding, lossy); + return NSData._(_ret, _lib, retain: true, release: true); } - static NSArray arrayWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_160(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSData dataUsingEncoding_(int encoding) { + final _ret = + _lib._objc_msgSend_238(_id, _lib._sel_dataUsingEncoding_1, encoding); + return NSData._(_ret, _lib, retain: true, release: true); } - NSArray initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_159( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + bool canBeConvertedToEncoding_(int encoding) { + return _lib._objc_msgSend_117( + _id, _lib._sel_canBeConvertedToEncoding_1, encoding); } - NSArray initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + ffi.Pointer cStringUsingEncoding_(int encoding) { + return _lib._objc_msgSend_239( + _id, _lib._sel_cStringUsingEncoding_1, encoding); } - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); + bool getCString_maxLength_encoding_( + ffi.Pointer buffer, int maxBufferCount, int encoding) { + return _lib._objc_msgSend_240( + _id, + _lib._sel_getCString_maxLength_encoding_1, + buffer, + maxBufferCount, + encoding); } - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); + bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, + NSRange range, + NSRangePointer leftover) { + return _lib._objc_msgSend_241( + _id, + _lib._sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, + range, + leftover); } - static NSArray new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); - return NSArray._(_ret, _lib, retain: false, release: true); + int maximumLengthOfBytesUsingEncoding_(int enc) { + return _lib._objc_msgSend_114( + _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); } - static NSArray alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); - return NSArray._(_ret, _lib, retain: false, release: true); + int lengthOfBytesUsingEncoding_(int enc) { + return _lib._objc_msgSend_114( + _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); } -} -class NSIndexSet extends NSObject { - NSIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSString1, _lib._sel_availableStringEncodings1); + } - /// Returns a [NSIndexSet] that points to the same underlying object as [other]. - static NSIndexSet castFrom(T other) { - return NSIndexSet._(other._id, other._lib, retain: true, release: true); + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSIndexSet] that wraps the given raw object pointer. - static NSIndexSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexSet._(other, lib, retain: retain, release: release); + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); } - /// Returns whether [obj] is an instance of [NSIndexSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); + NSString? get decomposedStringWithCanonicalMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_decomposedStringWithCanonicalMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSIndexSet indexSet(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + NSString? get precomposedStringWithCanonicalMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_precomposedStringWithCanonicalMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSIndexSet indexSetWithIndex_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + NSString? get decomposedStringWithCompatibilityMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_decomposedStringWithCompatibilityMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSIndexSet indexSetWithIndexesInRange_( - NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_111( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + NSString? get precomposedStringWithCompatibilityMapping { + final _ret = _lib._objc_msgSend_32( + _id, _lib._sel_precomposedStringWithCompatibilityMapping1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSIndexSet initWithIndexesInRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_111(_id, _lib._sel_initWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + NSArray componentsSeparatedByString_(NSString? separator) { + final _ret = _lib._objc_msgSend_159(_id, + _lib._sel_componentsSeparatedByString_1, separator?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - NSIndexSet initWithIndexSet_(NSIndexSet? indexSet) { - final _ret = _lib._objc_msgSend_112( - _id, _lib._sel_initWithIndexSet_1, indexSet?._id ?? ffi.nullptr); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet? separator) { + final _ret = _lib._objc_msgSend_243( + _id, + _lib._sel_componentsSeparatedByCharactersInSet_1, + separator?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - NSIndexSet initWithIndex_(int value) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + NSString stringByTrimmingCharactersInSet_(NSCharacterSet? set) { + final _ret = _lib._objc_msgSend_244(_id, + _lib._sel_stringByTrimmingCharactersInSet_1, set?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - bool isEqualToIndexSet_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_113( - _id, _lib._sel_isEqualToIndexSet_1, indexSet?._id ?? ffi.nullptr); + NSString stringByPaddingToLength_withString_startingAtIndex_( + int newLength, NSString? padString, int padIndex) { + final _ret = _lib._objc_msgSend_245( + _id, + _lib._sel_stringByPaddingToLength_withString_startingAtIndex_1, + newLength, + padString?._id ?? ffi.nullptr, + padIndex); + return NSString._(_ret, _lib, retain: true, release: true); } - int get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); + NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { + final _ret = _lib._objc_msgSend_246( + _id, + _lib._sel_stringByFoldingWithOptions_locale_1, + options, + locale?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - int get firstIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); + NSString stringByReplacingOccurrencesOfString_withString_options_range_( + NSString? target, + NSString? replacement, + int options, + NSRange searchRange) { + final _ret = _lib._objc_msgSend_247( + _id, + _lib._sel_stringByReplacingOccurrencesOfString_withString_options_range_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr, + options, + searchRange); + return NSString._(_ret, _lib, retain: true, release: true); } - int get lastIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); + NSString stringByReplacingOccurrencesOfString_withString_( + NSString? target, NSString? replacement) { + final _ret = _lib._objc_msgSend_248( + _id, + _lib._sel_stringByReplacingOccurrencesOfString_withString_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - int indexGreaterThanIndex_(int value) { - return _lib._objc_msgSend_114( - _id, _lib._sel_indexGreaterThanIndex_1, value); + NSString stringByReplacingCharactersInRange_withString_( + NSRange range, NSString? replacement) { + final _ret = _lib._objc_msgSend_249( + _id, + _lib._sel_stringByReplacingCharactersInRange_withString_1, + range, + replacement?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - int indexLessThanIndex_(int value) { - return _lib._objc_msgSend_114(_id, _lib._sel_indexLessThanIndex_1, value); + NSString stringByApplyingTransform_reverse_( + NSStringTransform transform, bool reverse) { + final _ret = _lib._objc_msgSend_250( + _id, _lib._sel_stringByApplyingTransform_reverse_1, transform, reverse); + return NSString._(_ret, _lib, retain: true, release: true); } - int indexGreaterThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_114( - _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); + bool writeToURL_atomically_encoding_error_(NSURL? url, bool useAuxiliaryFile, + int enc, ffi.Pointer> error) { + return _lib._objc_msgSend_251( + _id, + _lib._sel_writeToURL_atomically_encoding_error_1, + url?._id ?? ffi.nullptr, + useAuxiliaryFile, + enc, + error); } - int indexLessThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_114( - _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); + bool writeToFile_atomically_encoding_error_( + NSString? path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error) { + return _lib._objc_msgSend_252( + _id, + _lib._sel_writeToFile_atomically_encoding_error_1, + path?._id ?? ffi.nullptr, + useAuxiliaryFile, + enc, + error); } - int getIndexes_maxCount_inIndexRange_(ffi.Pointer indexBuffer, - int bufferSize, NSRangePointer range) { - return _lib._objc_msgSend_115( - _id, - _lib._sel_getIndexes_maxCount_inIndexRange_1, - indexBuffer, - bufferSize, - range); + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - int countOfIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_116( - _id, _lib._sel_countOfIndexesInRange_1, range); + int get hash { + return _lib._objc_msgSend_12(_id, _lib._sel_hash1); } - bool containsIndex_(int value) { - return _lib._objc_msgSend_117(_id, _lib._sel_containsIndex_1, value); + NSString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, int length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_253( + _id, + _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, + characters, + length, + freeBuffer); + return NSString._(_ret, _lib, retain: false, release: true); } - bool containsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_118( - _id, _lib._sel_containsIndexesInRange_1, range); + NSString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, int len, ObjCBlock17 deallocator) { + final _ret = _lib._objc_msgSend_254( + _id, + _lib._sel_initWithCharactersNoCopy_length_deallocator_1, + chars, + len, + deallocator._id); + return NSString._(_ret, _lib, retain: false, release: true); } - bool containsIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_113( - _id, _lib._sel_containsIndexes_1, indexSet?._id ?? ffi.nullptr); + NSString initWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255( + _id, _lib._sel_initWithCharacters_length_1, characters, length); + return NSString._(_ret, _lib, retain: true, release: true); } - bool intersectsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_118( - _id, _lib._sel_intersectsIndexesInRange_1, range); + NSString initWithUTF8String_(ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256( + _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); + return NSString._(_ret, _lib, retain: true, release: true); } - void enumerateIndexesUsingBlock_(ObjCBlock block) { - return _lib._objc_msgSend_119( - _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); + NSString initWithString_(NSString? aString) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, aString?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - void enumerateIndexesWithOptions_usingBlock_(int opts, ObjCBlock block) { - return _lib._objc_msgSend_120(_id, - _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); + NSString initWithFormat_(NSString? format) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - void enumerateIndexesInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock block) { - return _lib._objc_msgSend_121( + NSString initWithFormat_arguments_(NSString? format, va_list argList) { + final _ret = _lib._objc_msgSend_257( _id, - _lib._sel_enumerateIndexesInRange_options_usingBlock_1, - range, - opts, - block._id); + _lib._sel_initWithFormat_arguments_1, + format?._id ?? ffi.nullptr, + argList); + return NSString._(_ret, _lib, retain: true, release: true); } - int indexPassingTest_(ObjCBlock1 predicate) { - return _lib._objc_msgSend_122( - _id, _lib._sel_indexPassingTest_1, predicate._id); + NSString initWithFormat_locale_(NSString? format, NSObject locale) { + final _ret = _lib._objc_msgSend_258(_id, _lib._sel_initWithFormat_locale_1, + format?._id ?? ffi.nullptr, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); } - int indexWithOptions_passingTest_(int opts, ObjCBlock1 predicate) { - return _lib._objc_msgSend_123( - _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); + NSString initWithFormat_locale_arguments_( + NSString? format, NSObject locale, va_list argList) { + final _ret = _lib._objc_msgSend_259( + _id, + _lib._sel_initWithFormat_locale_arguments_1, + format?._id ?? ffi.nullptr, + locale._id, + argList); + return NSString._(_ret, _lib, retain: true, release: true); } - int indexInRange_options_passingTest_( - NSRange range, int opts, ObjCBlock1 predicate) { - return _lib._objc_msgSend_124( + NSString initWithValidatedFormat_validFormatSpecifiers_error_( + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( _id, - _lib._sel_indexInRange_options_passingTest_1, - range, - opts, - predicate._id); + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - NSIndexSet indexesPassingTest_(ObjCBlock1 predicate) { - final _ret = _lib._objc_msgSend_125( - _id, _lib._sel_indexesPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + NSString initWithValidatedFormat_validFormatSpecifiers_locale_error_( + NSString? format, + NSString? validFormatSpecifiers, + NSObject locale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_261( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + locale._id, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - NSIndexSet indexesWithOptions_passingTest_(int opts, ObjCBlock1 predicate) { - final _ret = _lib._objc_msgSend_126( - _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + NSString initWithValidatedFormat_validFormatSpecifiers_arguments_error_( + NSString? format, + NSString? validFormatSpecifiers, + va_list argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_262( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + argList, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - NSIndexSet indexesInRange_options_passingTest_( - NSRange range, int opts, ObjCBlock1 predicate) { - final _ret = _lib._objc_msgSend_127( + NSString + initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( + NSString? format, + NSString? validFormatSpecifiers, + NSObject locale, + va_list argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_263( _id, - _lib._sel_indexesInRange_options_passingTest_1, - range, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + locale._id, + argList, + error); + return NSString._(_ret, _lib, retain: true, release: true); } - void enumerateRangesUsingBlock_(ObjCBlock2 block) { - return _lib._objc_msgSend_128( - _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); + NSString initWithData_encoding_(NSData? data, int encoding) { + final _ret = _lib._objc_msgSend_264(_id, _lib._sel_initWithData_encoding_1, + data?._id ?? ffi.nullptr, encoding); + return NSString._(_ret, _lib, retain: true, release: true); } - void enumerateRangesWithOptions_usingBlock_(int opts, ObjCBlock2 block) { - return _lib._objc_msgSend_129(_id, - _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); + NSString initWithBytes_length_encoding_( + ffi.Pointer bytes, int len, int encoding) { + final _ret = _lib._objc_msgSend_265( + _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); + return NSString._(_ret, _lib, retain: true, release: true); } - void enumerateRangesInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock2 block) { - return _lib._objc_msgSend_130( + NSString initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { + final _ret = _lib._objc_msgSend_266( _id, - _lib._sel_enumerateRangesInRange_options_usingBlock_1, - range, - opts, - block._id); + _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, + bytes, + len, + encoding, + freeBuffer); + return NSString._(_ret, _lib, retain: false, release: true); } - static NSIndexSet new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); + NSString initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + int len, + int encoding, + ObjCBlock14 deallocator) { + final _ret = _lib._objc_msgSend_267( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, + bytes, + len, + encoding, + deallocator._id); + return NSString._(_ret, _lib, retain: false, release: true); } - static NSIndexSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); + static NSString string(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_string1); + return NSString._(_ret, _lib, retain: true, release: true); } -} - -typedef NSRangePointer = ffi.Pointer; -class _ObjCBlockBase implements ffi.Finalizable { - final ffi.Pointer<_ObjCBlock> _id; - final NativeCupertinoHttp _lib; - bool _pendingRelease; - - _ObjCBlockBase._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._Block_copy(_id.cast()); - } - if (release) { - _lib._objc_releaseFinalizer11.attach(this, _id.cast(), detach: this); - } + static NSString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Releases the reference to the underlying ObjC block held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._Block_release(_id.cast()); - _lib._objc_releaseFinalizer11.detach(this); - } else { - throw StateError( - 'Released an ObjC block that was unowned or already released.'); - } + static NSString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSString._(_ret, _lib, retain: true, release: true); } - @override - bool operator ==(Object other) { - return other is _ObjCBlockBase && _id == other._id; + static NSString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSString._(_ret, _lib, retain: true, release: true); } - @override - int get hashCode => _id.hashCode; -} - -void _ObjCBlock_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); -} - -final _ObjCBlock_closureRegistry = {}; -int _ObjCBlock_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_registerClosure(Function fn) { - final id = ++_ObjCBlock_closureRegistryIndex; - _ObjCBlock_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static NSString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return _ObjCBlock_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + static NSString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock extends _ObjCBlockBase { - ObjCBlock._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + static NSString stringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSString1, + _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - NSUInteger arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static NSString + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSString1, + _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock.fromFunction(NativeCupertinoHttp lib, - void Function(int arg0, ffi.Pointer arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock_closureTrampoline) - .cast(), - _ObjCBlock_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, int arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); + NSString initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, int encoding) { + final _ret = _lib._objc_msgSend_268(_id, + _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); + return NSString._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + static NSString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } -class _ObjCBlockDesc extends ffi.Struct { - @ffi.UnsignedLong() - external int reserved; + NSString initWithContentsOfURL_encoding_error_( + NSURL? url, int enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_269( + _id, + _lib._sel_initWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.UnsignedLong() - external int size; + NSString initWithContentsOfFile_encoding_error_( + NSString? path, int enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_270( + _id, + _lib._sel_initWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer copy_helper; + static NSString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_269( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer dispose_helper; + static NSString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_270( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer signature; -} + NSString initWithContentsOfURL_usedEncoding_error_( + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_271( + _id, + _lib._sel_initWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } -class _ObjCBlock extends ffi.Struct { - external ffi.Pointer isa; + NSString initWithContentsOfFile_usedEncoding_error_( + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_272( + _id, + _lib._sel_initWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Int() - external int flags; + static NSString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_271( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Int() - external int reserved; + static NSString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_272( + _lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSString._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer invoke; + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_273( + _lib._class_NSString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } - external ffi.Pointer<_ObjCBlockDesc> descriptor; + NSObject propertyList() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer target; -} + NSDictionary propertyListFromStringsFileFormat() { + final _ret = _lib._objc_msgSend_180( + _id, _lib._sel_propertyListFromStringsFileFormat1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } -abstract class NSEnumerationOptions { - static const int NSEnumerationConcurrent = 1; - static const int NSEnumerationReverse = 2; -} + ffi.Pointer cString() { + return _lib._objc_msgSend_53(_id, _lib._sel_cString1); + } -bool _ObjCBlock1_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); -} + ffi.Pointer lossyCString() { + return _lib._objc_msgSend_53(_id, _lib._sel_lossyCString1); + } -final _ObjCBlock1_closureRegistry = {}; -int _ObjCBlock1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock1_registerClosure(Function fn) { - final id = ++_ObjCBlock1_closureRegistryIndex; - _ObjCBlock1_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + int cStringLength() { + return _lib._objc_msgSend_12(_id, _lib._sel_cStringLength1); + } -bool _ObjCBlock1_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return _ObjCBlock1_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + void getCString_(ffi.Pointer bytes) { + return _lib._objc_msgSend_274(_id, _lib._sel_getCString_1, bytes); + } -class ObjCBlock1 extends _ObjCBlockBase { - ObjCBlock1._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { + return _lib._objc_msgSend_275( + _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); + } - /// Creates a block from a C function pointer. - ObjCBlock1.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock1_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, + int maxLength, NSRange aRange, NSRangePointer leftoverRange) { + return _lib._objc_msgSend_276( + _id, + _lib._sel_getCString_maxLength_range_remainingRange_1, + bytes, + maxLength, + aRange, + leftoverRange); + } - /// Creates a block from a Dart function. - ObjCBlock1.fromFunction(NativeCupertinoHttp lib, - bool Function(int arg0, ffi.Pointer arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock1_closureTrampoline, false) - .cast(), - _ObjCBlock1_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call(int arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock> block, int arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); + } -void _ObjCBlock2_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function( - NSRange arg0, ffi.Pointer arg1)>()(arg0, arg1); -} + NSObject initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -final _ObjCBlock2_closureRegistry = {}; -int _ObjCBlock2_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock2_registerClosure(Function fn) { - final id = ++_ObjCBlock2_closureRegistryIndex; - _ObjCBlock2_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + NSObject initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock2_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { - return _ObjCBlock2_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock2 extends _ObjCBlockBase { - ObjCBlock2._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock2.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSRange arg0, ffi.Pointer arg1)>( - _ObjCBlock2_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + NSObject initWithCStringNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_277( + _id, + _lib._sel_initWithCStringNoCopy_length_freeWhenDone_1, + bytes, + length, + freeBuffer); + return NSObject._(_ret, _lib, retain: false, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock2.fromFunction(NativeCupertinoHttp lib, - void Function(NSRange arg0, ffi.Pointer arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSRange arg0, ffi.Pointer arg1)>( - _ObjCBlock2_closureTrampoline) - .cast(), - _ObjCBlock2_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(NSRange arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); + NSObject initWithCString_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_268( + _id, _lib._sel_initWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + NSObject initWithCString_(ffi.Pointer bytes) { + final _ret = + _lib._objc_msgSend_256(_id, _lib._sel_initWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock3_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } -final _ObjCBlock3_closureRegistry = {}; -int _ObjCBlock3_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock3_registerClosure(Function fn) { - final id = ++_ObjCBlock3_closureRegistryIndex; - _ObjCBlock3_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock3_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _ObjCBlock3_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + void getCharacters_(ffi.Pointer buffer) { + return _lib._objc_msgSend_278(_id, _lib._sel_getCharacters_1, buffer); + } -class ObjCBlock3 extends _ObjCBlockBase { - ObjCBlock3._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode a URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. + NSString stringByAddingPercentEncodingWithAllowedCharacters_( + NSCharacterSet? allowedCharacters) { + final _ret = _lib._objc_msgSend_244( + _id, + _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, + allowedCharacters?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock3.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - NSUInteger arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock3_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. + NSString? get stringByRemovingPercentEncoding { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_stringByRemovingPercentEncoding1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock3.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock3_closureTrampoline) - .cast(), - _ObjCBlock3_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + NSString stringByAddingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_15( + _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); + return NSString._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + NSString stringByReplacingPercentEscapesUsingEncoding_(int enc) { + final _ret = _lib._objc_msgSend_15( + _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); + return NSString._(_ret, _lib, retain: true, release: true); + } -bool _ObjCBlock4_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + static NSString new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); + return NSString._(_ret, _lib, retain: false, release: true); + } -final _ObjCBlock4_closureRegistry = {}; -int _ObjCBlock4_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock4_registerClosure(Function fn) { - final id = ++_ObjCBlock4_closureRegistryIndex; - _ObjCBlock4_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + static NSString alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); + return NSString._(_ret, _lib, retain: false, release: true); + } } -bool _ObjCBlock4_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _ObjCBlock4_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +extension StringToNSString on String { + NSString toNSString(NativeCupertinoHttp lib) => NSString(lib, this); } -class ObjCBlock4 extends _ObjCBlockBase { - ObjCBlock4._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef unichar = ffi.UnsignedShort; - /// Creates a block from a C function pointer. - ObjCBlock4.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - NSUInteger arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock4_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +class NSCoder extends _ObjCWrapper { + NSCoder._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - /// Creates a block from a Dart function. - ObjCBlock4.fromFunction( - NativeCupertinoHttp lib, - bool Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock4_closureTrampoline, false) - .cast(), - _ObjCBlock4_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call( - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + /// Returns a [NSCoder] that points to the same underlying object as [other]. + static NSCoder castFrom(T other) { + return NSCoder._(other._id, other._lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; + /// Returns a [NSCoder] that wraps the given raw object pointer. + static NSCoder castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSCoder._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSCoder]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); + } } -typedef NSComparator = ffi.Pointer<_ObjCBlock>; -int _ObjCBlock5_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); +typedef NSRange = _NSRange; + +final class _NSRange extends ffi.Struct { + @NSUInteger() + external int location; + + @NSUInteger() + external int length; } -final _ObjCBlock5_closureRegistry = {}; -int _ObjCBlock5_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock5_registerClosure(Function fn) { - final id = ++_ObjCBlock5_closureRegistryIndex; - _ObjCBlock5_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; } -int _ObjCBlock5_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock5_closureRegistry[block.ref.target.address]!(arg0, arg1); +abstract class NSStringCompareOptions { + static const int NSCaseInsensitiveSearch = 1; + static const int NSLiteralSearch = 2; + static const int NSBackwardsSearch = 4; + static const int NSAnchoredSearch = 8; + static const int NSNumericSearch = 64; + static const int NSDiacriticInsensitiveSearch = 128; + static const int NSWidthInsensitiveSearch = 256; + static const int NSForcedOrderingSearch = 512; + static const int NSRegularExpressionSearch = 1024; } -class ObjCBlock5 extends _ObjCBlockBase { - ObjCBlock5._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class NSLocale extends _ObjCWrapper { + NSLocale._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - /// Creates a block from a C function pointer. - ObjCBlock5.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock5_fnPtrTrampoline, 0) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock5.fromFunction( - NativeCupertinoHttp lib, - int Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock5_closureTrampoline, 0) - .cast(), - _ObjCBlock5_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - int call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); + /// Returns a [NSLocale] that points to the same underlying object as [other]. + static NSLocale castFrom(T other) { + return NSLocale._(other._id, other._lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} - -abstract class NSSortOptions { - static const int NSSortConcurrent = 1; - static const int NSSortStable = 16; -} + /// Returns a [NSLocale] that wraps the given raw object pointer. + static NSLocale castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSLocale._(other, lib, retain: retain, release: release); + } -abstract class NSBinarySearchingOptions { - static const int NSBinarySearchingFirstEqual = 256; - static const int NSBinarySearchingLastEqual = 512; - static const int NSBinarySearchingInsertionIndex = 1024; + /// Returns whether [obj] is an instance of [NSLocale]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLocale1); + } } -class NSOrderedCollectionDifference extends NSObject { - NSOrderedCollectionDifference._( - ffi.Pointer id, NativeCupertinoHttp lib, +class NSCharacterSet extends NSObject { + NSCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSOrderedCollectionDifference] that points to the same underlying object as [other]. - static NSOrderedCollectionDifference castFrom( - T other) { - return NSOrderedCollectionDifference._(other._id, other._lib, - retain: true, release: true); + /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. + static NSCharacterSet castFrom(T other) { + return NSCharacterSet._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSOrderedCollectionDifference] that wraps the given raw object pointer. - static NSOrderedCollectionDifference castFromPointer( + /// Returns a [NSCharacterSet] that wraps the given raw object pointer. + static NSCharacterSet castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSOrderedCollectionDifference._(other, lib, - retain: retain, release: release); + return NSCharacterSet._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSOrderedCollectionDifference]. + /// Returns whether [obj] is an instance of [NSCharacterSet]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOrderedCollectionDifference1); + obj._lib._class_NSCharacterSet1); } - NSOrderedCollectionDifference initWithChanges_(NSObject? changes) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_initWithChanges_1, changes?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSOrderedCollectionDifference - initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_( - NSIndexSet? inserts, - NSObject? insertedObjects, - NSIndexSet? removes, - NSObject? removedObjects, - NSObject? changes) { - final _ret = _lib._objc_msgSend_146( - _id, - _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1, - inserts?._id ?? ffi.nullptr, - insertedObjects?._id ?? ffi.nullptr, - removes?._id ?? ffi.nullptr, - removedObjects?._id ?? ffi.nullptr, - changes?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSOrderedCollectionDifference - initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_( - NSIndexSet? inserts, - NSObject? insertedObjects, - NSIndexSet? removes, - NSObject? removedObjects) { - final _ret = _lib._objc_msgSend_147( - _id, - _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1, - inserts?._id ?? ffi.nullptr, - insertedObjects?._id ?? ffi.nullptr, - removes?._id ?? ffi.nullptr, - removedObjects?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSCharacterSet1, + _lib._sel_whitespaceAndNewlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSObject? get insertions { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_insertions1); + static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSObject? get removals { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_removals1); + static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - bool get hasChanges { - return _lib._objc_msgSend_11(_id, _lib._sel_hasChanges1); + static NSCharacterSet? getLowercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSOrderedCollectionDifference differenceByTransformingChangesWithBlock_( - ObjCBlock6 block) { - final _ret = _lib._objc_msgSend_153( - _id, _lib._sel_differenceByTransformingChangesWithBlock_1, block._id); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + static NSCharacterSet? getUppercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSOrderedCollectionDifference inverseDifference() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_inverseDifference1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); + static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSOrderedCollectionDifference new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionDifference1, _lib._sel_new1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: false, release: true); + static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSOrderedCollectionDifference alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionDifference1, _lib._sel_alloc1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: false, release: true); + static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } -} -ffi.Pointer _ObjCBlock6_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>()(arg0); -} + static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -final _ObjCBlock6_closureRegistry = {}; -int _ObjCBlock6_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock6_registerClosure(Function fn) { - final id = ++_ObjCBlock6_closureRegistryIndex; - _ObjCBlock6_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -ffi.Pointer _ObjCBlock6_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock6_closureRegistry[block.ref.target.address]!(arg0); -} + static NSCharacterSet? getCapitalizedLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock6 extends _ObjCBlockBase { - ObjCBlock6._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock6.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock6_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: false, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock6.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock6_closureTrampoline) - .cast(), - _ObjCBlock6_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); + static NSCharacterSet characterSetWithRange_( + NativeCupertinoHttp _lib, NSRange aRange) { + final _ret = _lib._objc_msgSend_29( + _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + static NSCharacterSet characterSetWithCharactersInString_( + NativeCupertinoHttp _lib, NSString? aString) { + final _ret = _lib._objc_msgSend_30( + _lib._class_NSCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, + aString?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -class NSOrderedCollectionChange extends NSObject { - NSOrderedCollectionChange._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + static NSCharacterSet characterSetWithBitmapRepresentation_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_223( + _lib._class_NSCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, + data?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSOrderedCollectionChange] that points to the same underlying object as [other]. - static NSOrderedCollectionChange castFrom(T other) { - return NSOrderedCollectionChange._(other._id, other._lib, - retain: true, release: true); + static NSCharacterSet characterSetWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? fName) { + final _ret = _lib._objc_msgSend_30(_lib._class_NSCharacterSet1, + _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSOrderedCollectionChange] that wraps the given raw object pointer. - static NSOrderedCollectionChange castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrderedCollectionChange._(other, lib, - retain: retain, release: release); + NSCharacterSet initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSOrderedCollectionChange]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOrderedCollectionChange1); + bool characterIsMember_(int aCharacter) { + return _lib._objc_msgSend_224( + _id, _lib._sel_characterIsMember_1, aCharacter); } - static NSOrderedCollectionChange changeWithObject_type_index_( - NativeCupertinoHttp _lib, NSObject anObject, int type, int index) { - final _ret = _lib._objc_msgSend_148(_lib._class_NSOrderedCollectionChange1, - _lib._sel_changeWithObject_type_index_1, anObject._id, type, index); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + NSData? get bitmapRepresentation { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_bitmapRepresentation1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - static NSOrderedCollectionChange changeWithObject_type_index_associatedIndex_( - NativeCupertinoHttp _lib, - NSObject anObject, - int type, - int index, - int associatedIndex) { - final _ret = _lib._objc_msgSend_149( - _lib._class_NSOrderedCollectionChange1, - _lib._sel_changeWithObject_type_index_associatedIndex_1, - anObject._id, - type, - index, - associatedIndex); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + NSCharacterSet? get invertedSet { + final _ret = _lib._objc_msgSend_28(_id, _lib._sel_invertedSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSObject get object { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); - return NSObject._(_ret, _lib, retain: true, release: true); + bool longCharacterIsMember_(int theLongChar) { + return _lib._objc_msgSend_225( + _id, _lib._sel_longCharacterIsMember_1, theLongChar); } - int get changeType { - return _lib._objc_msgSend_150(_id, _lib._sel_changeType1); + bool isSupersetOfSet_(NSCharacterSet? theOtherSet) { + return _lib._objc_msgSend_226( + _id, _lib._sel_isSupersetOfSet_1, theOtherSet?._id ?? ffi.nullptr); } - int get index { - return _lib._objc_msgSend_12(_id, _lib._sel_index1); + bool hasMemberInPlane_(int thePlane) { + return _lib._objc_msgSend_227(_id, _lib._sel_hasMemberInPlane_1, thePlane); } - int get associatedIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_associatedIndex1); + /// Returns a character set containing the characters allowed in a URL's user subcomponent. + static NSCharacterSet? getURLUserAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - @override - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Returns a character set containing the characters allowed in a URL's password subcomponent. + static NSCharacterSet? getURLPasswordAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSOrderedCollectionChange initWithObject_type_index_( - NSObject anObject, int type, int index) { - final _ret = _lib._objc_msgSend_151( - _id, _lib._sel_initWithObject_type_index_1, anObject._id, type, index); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + /// Returns a character set containing the characters allowed in a URL's host subcomponent. + static NSCharacterSet? getURLHostAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSOrderedCollectionChange initWithObject_type_index_associatedIndex_( - NSObject anObject, int type, int index, int associatedIndex) { - final _ret = _lib._objc_msgSend_152( - _id, - _lib._sel_initWithObject_type_index_associatedIndex_1, - anObject._id, - type, - index, - associatedIndex); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); + /// Returns a character set containing the characters allowed in a URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + static NSCharacterSet? getURLPathAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSOrderedCollectionChange new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionChange1, _lib._sel_new1); - return NSOrderedCollectionChange._(_ret, _lib, - retain: false, release: true); + /// Returns a character set containing the characters allowed in a URL's query component. + static NSCharacterSet? getURLQueryAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSOrderedCollectionChange alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionChange1, _lib._sel_alloc1); - return NSOrderedCollectionChange._(_ret, _lib, - retain: false, release: true); + /// Returns a character set containing the characters allowed in a URL's fragment component. + static NSCharacterSet? getURLFragmentAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } -} -abstract class NSCollectionChangeType { - static const int NSCollectionChangeInsert = 0; - static const int NSCollectionChangeRemove = 1; -} + static NSCharacterSet new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } -abstract class NSOrderedCollectionDifferenceCalculationOptions { - static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = - 1; - static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = - 2; - static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; + static NSCharacterSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } } -bool _ObjCBlock7_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} - -final _ObjCBlock7_closureRegistry = {}; -int _ObjCBlock7_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock7_registerClosure(Function fn) { - final id = ++_ObjCBlock7_closureRegistryIndex; - _ObjCBlock7_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock7_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock7_closureRegistry[block.ref.target.address]!(arg0, arg1); -} - -class ObjCBlock7 extends _ObjCBlockBase { - ObjCBlock7._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock7.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock7_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock7.fromFunction( - NativeCupertinoHttp lib, - bool Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock7_closureTrampoline, false) - .cast(), - _ObjCBlock7_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } - - ffi.Pointer<_ObjCBlock> get pointer => _id; -} - -void _ObjCBlock8_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} - -final _ObjCBlock8_closureRegistry = {}; -int _ObjCBlock8_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock8_registerClosure(Function fn) { - final id = ++_ObjCBlock8_closureRegistryIndex; - _ObjCBlock8_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock8_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock8_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} - -class ObjCBlock8 extends _ObjCBlockBase { - ObjCBlock8._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock8.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock8_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock8.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock8_closureTrampoline) - .cast(), - _ObjCBlock8_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } - - ffi.Pointer<_ObjCBlock> get pointer => _id; -} - -bool _ObjCBlock9_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} - -final _ObjCBlock9_closureRegistry = {}; -int _ObjCBlock9_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock9_registerClosure(Function fn) { - final id = ++_ObjCBlock9_closureRegistryIndex; - _ObjCBlock9_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock9_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock9_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} - -class ObjCBlock9 extends _ObjCBlockBase { - ObjCBlock9._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock9.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock9_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock9.fromFunction( - NativeCupertinoHttp lib, - bool Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock9_closureTrampoline, false) - .cast(), - _ObjCBlock9_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } - - ffi.Pointer<_ObjCBlock> get pointer => _id; -} - -class NSFastEnumerationState extends ffi.Struct { - @ffi.UnsignedLong() - external int state; - - external ffi.Pointer> itemsPtr; - - external ffi.Pointer mutationsPtr; - - @ffi.Array.multi([5]) - external ffi.Array extra; -} - -ffi.Pointer _ObjCBlock10_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>()(arg0, arg1); -} - -final _ObjCBlock10_closureRegistry = {}; -int _ObjCBlock10_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock10_registerClosure(Function fn) { - final id = ++_ObjCBlock10_closureRegistryIndex; - _ObjCBlock10_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer _ObjCBlock10_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) { - return _ObjCBlock10_closureRegistry[block.ref.target.address]!(arg0, arg1); -} - -class ObjCBlock10 extends _ObjCBlockBase { - ObjCBlock10._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock10.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>( - _ObjCBlock10_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock10.fromFunction( - NativeCupertinoHttp lib, - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>( - _ObjCBlock10_closureTrampoline) - .cast(), - _ObjCBlock10_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call( - ffi.Pointer arg0, NSErrorUserInfoKey arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>()(_id, arg0, arg1); - } - - ffi.Pointer<_ObjCBlock> get pointer => _id; -} - -typedef NSErrorUserInfoKey = ffi.Pointer; -typedef NSURLResourceKey = ffi.Pointer; - -/// Working with Bookmarks and alias (bookmark) files -abstract class NSURLBookmarkCreationOptions { - /// This option does nothing and has no effect on bookmark resolution - static const int NSURLBookmarkCreationPreferFileIDResolution = 256; - - /// creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways - static const int NSURLBookmarkCreationMinimalBookmark = 512; - - /// include the properties required by writeBookmarkData:toURL:options: in the bookmark data created - static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; - - /// include information in the bookmark data which allows the same sandboxed process to access the resource after being relaunched - static const int NSURLBookmarkCreationWithSecurityScope = 2048; - - /// if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted - static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; -} - -abstract class NSURLBookmarkResolutionOptions { - /// don't perform any user interaction during bookmark resolution - static const int NSURLBookmarkResolutionWithoutUI = 256; - - /// don't mount a volume during bookmark resolution - static const int NSURLBookmarkResolutionWithoutMounting = 512; - - /// use the secure information included at creation time to provide the ability to access the resource in a sandboxed process - static const int NSURLBookmarkResolutionWithSecurityScope = 1024; -} - -typedef NSURLBookmarkFileCreationOptions = NSUInteger; - -class NSURLHandle extends NSObject { - NSURLHandle._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSData extends NSObject { + NSData._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSURLHandle] that points to the same underlying object as [other]. - static NSURLHandle castFrom(T other) { - return NSURLHandle._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSData] that points to the same underlying object as [other]. + static NSData castFrom(T other) { + return NSData._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSURLHandle] that wraps the given raw object pointer. - static NSURLHandle castFromPointer( + /// Returns a [NSData] that wraps the given raw object pointer. + static NSData castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSURLHandle._(other, lib, retain: retain, release: release); + return NSData._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSURLHandle]. + /// Returns whether [obj] is an instance of [NSData]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); } - static void registerURLHandleClass_( - NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { - return _lib._objc_msgSend_200(_lib._class_NSURLHandle1, - _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); } - static NSObject URLHandleClassForURL_( - NativeCupertinoHttp _lib, NSURL? anURL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSURLHandle1, - _lib._sel_URLHandleClassForURL_1, anURL?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// The -bytes method returns a pointer to a contiguous region of memory managed by the receiver. + /// If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer + /// Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data. + ffi.Pointer get bytes { + return _lib._objc_msgSend_31(_id, _lib._sel_bytes1); } - int status() { - return _lib._objc_msgSend_202(_id, _lib._sel_status1); + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString failureReason() { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_failureReason1); - return NSString._(_ret, _lib, retain: true, release: true); + void getBytes_length_(ffi.Pointer buffer, int length) { + return _lib._objc_msgSend_33( + _id, _lib._sel_getBytes_length_1, buffer, length); } - void addClient_(NSObject? client) { - return _lib._objc_msgSend_200( - _id, _lib._sel_addClient_1, client?._id ?? ffi.nullptr); + void getBytes_range_(ffi.Pointer buffer, NSRange range) { + return _lib._objc_msgSend_34( + _id, _lib._sel_getBytes_range_1, buffer, range); } - void removeClient_(NSObject? client) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeClient_1, client?._id ?? ffi.nullptr); + bool isEqualToData_(NSData? other) { + return _lib._objc_msgSend_35( + _id, _lib._sel_isEqualToData_1, other?._id ?? ffi.nullptr); } - void loadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); + NSData subdataWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_36(_id, _lib._sel_subdataWithRange_1, range); + return NSData._(_ret, _lib, retain: true, release: true); } - void cancelLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); } - NSData resourceData() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_resourceData1); - return NSData._(_ret, _lib, retain: true, release: true); + /// the atomically flag is ignored if the url is not of a type the supports atomic writes + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); } - NSData availableResourceData() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_availableResourceData1); - return NSData._(_ret, _lib, retain: true, release: true); + bool writeToFile_options_error_(NSString? path, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _lib._objc_msgSend_208(_id, _lib._sel_writeToFile_options_error_1, + path?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); } - int expectedResourceDataSize() { - return _lib._objc_msgSend_82(_id, _lib._sel_expectedResourceDataSize1); + bool writeToURL_options_error_(NSURL? url, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _lib._objc_msgSend_209(_id, _lib._sel_writeToURL_options_error_1, + url?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); } - void flushCachedData() { - return _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); + NSRange rangeOfData_options_range_( + NSData? dataToFind, int mask, NSRange searchRange) { + return _lib._objc_msgSend_210(_id, _lib._sel_rangeOfData_options_range_1, + dataToFind?._id ?? ffi.nullptr, mask, searchRange); } - void backgroundLoadDidFailWithReason_(NSString? reason) { - return _lib._objc_msgSend_188( - _id, - _lib._sel_backgroundLoadDidFailWithReason_1, - reason?._id ?? ffi.nullptr); + /// 'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES. + void enumerateByteRangesUsingBlock_(ObjCBlock13 block) { + return _lib._objc_msgSend_211( + _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._id); } - void didLoadBytes_loadComplete_(NSData? newBytes, bool yorn) { - return _lib._objc_msgSend_203(_id, _lib._sel_didLoadBytes_loadComplete_1, - newBytes?._id ?? ffi.nullptr, yorn); + static NSData data(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); + return NSData._(_ret, _lib, retain: true, release: true); } - static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL? anURL) { - return _lib._objc_msgSend_204(_lib._class_NSURLHandle1, - _lib._sel_canInitWithURL_1, anURL?._id ?? ffi.nullptr); + static NSData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212( + _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); + return NSData._(_ret, _lib, retain: true, release: true); } - static NSURLHandle cachedHandleForURL_( - NativeCupertinoHttp _lib, NSURL? anURL) { - final _ret = _lib._objc_msgSend_205(_lib._class_NSURLHandle1, - _lib._sel_cachedHandleForURL_1, anURL?._id ?? ffi.nullptr); - return NSURLHandle._(_ret, _lib, retain: true, release: true); + static NSData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSData._(_ret, _lib, retain: false, release: true); } - NSObject initWithURL_cached_(NSURL? anURL, bool willCache) { - final _ret = _lib._objc_msgSend_206(_id, _lib._sel_initWithURL_cached_1, - anURL?._id ?? ffi.nullptr, willCache); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_213(_lib._class_NSData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSData._(_ret, _lib, retain: false, release: true); } - NSObject propertyForKey_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _lib._class_NSData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); } - NSObject propertyForKeyIfAvailable_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_42(_id, - _lib._sel_propertyForKeyIfAvailable_1, propertyKey?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); } - bool writeProperty_forKey_(NSObject propertyValue, NSString? propertyKey) { - return _lib._objc_msgSend_199(_id, _lib._sel_writeProperty_forKey_1, - propertyValue._id, propertyKey?._id ?? ffi.nullptr); + static NSData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); } - bool writeData_(NSData? data) { - return _lib._objc_msgSend_35( - _id, _lib._sel_writeData_1, data?._id ?? ffi.nullptr); + static NSData dataWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); } - NSData loadInForeground() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_loadInForeground1); + NSData initWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212( + _id, _lib._sel_initWithBytes_length_1, bytes, length); return NSData._(_ret, _lib, retain: true, release: true); } - void beginLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); + NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212( + _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); + return NSData._(_ret, _lib, retain: false, release: true); } - void endLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); + NSData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _lib._objc_msgSend_213(_id, + _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSData._(_ret, _lib, retain: false, release: true); } - static NSURLHandle new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); + NSData initWithBytesNoCopy_length_deallocator_( + ffi.Pointer bytes, int length, ObjCBlock14 deallocator) { + final _ret = _lib._objc_msgSend_216( + _id, + _lib._sel_initWithBytesNoCopy_length_deallocator_1, + bytes, + length, + deallocator._id); + return NSData._(_ret, _lib, retain: false, release: true); } - static NSURLHandle alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); + NSData initWithContentsOfFile_options_error_(NSString? path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _id, + _lib._sel_initWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); } -} - -abstract class NSURLHandleStatus { - static const int NSURLHandleNotLoaded = 0; - static const int NSURLHandleLoadSucceeded = 1; - static const int NSURLHandleLoadInProgress = 2; - static const int NSURLHandleLoadFailed = 3; -} -abstract class NSDataWritingOptions { - /// Hint to use auxiliary file when saving; equivalent to atomically:YES - static const int NSDataWritingAtomic = 1; + NSData initWithContentsOfURL_options_error_(NSURL? url, int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _id, + _lib._sel_initWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSData._(_ret, _lib, retain: true, release: true); + } - /// Hint to prevent overwriting an existing file. Cannot be combined with NSDataWritingAtomic. - static const int NSDataWritingWithoutOverwriting = 2; - static const int NSDataWritingFileProtectionNone = 268435456; - static const int NSDataWritingFileProtectionComplete = 536870912; - static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; - static const int - NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = - 1073741824; - static const int NSDataWritingFileProtectionMask = 4026531840; + NSData initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } - /// Deprecated name for NSDataWritingAtomic - static const int NSAtomicWrite = 1; -} + NSData initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } -/// Data Search Options -abstract class NSDataSearchOptions { - static const int NSDataSearchBackwards = 1; - static const int NSDataSearchAnchored = 2; -} + NSData initWithData_(NSData? data) { + final _ret = _lib._objc_msgSend_217( + _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock11_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + static NSData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSData._(_ret, _lib, retain: true, release: true); + } -final _ObjCBlock11_closureRegistry = {}; -int _ObjCBlock11_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock11_registerClosure(Function fn) { - final id = ++_ObjCBlock11_closureRegistryIndex; - _ObjCBlock11_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. + NSData initWithBase64EncodedString_options_( + NSString? base64String, int options) { + final _ret = _lib._objc_msgSend_218( + _id, + _lib._sel_initWithBase64EncodedString_options_1, + base64String?._id ?? ffi.nullptr, + options); + return NSData._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock11_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return _ObjCBlock11_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + /// Create a Base-64 encoded NSString from the receiver's contents using the given options. + NSString base64EncodedStringWithOptions_(int options) { + final _ret = _lib._objc_msgSend_219( + _id, _lib._sel_base64EncodedStringWithOptions_1, options); + return NSString._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock11 extends _ObjCBlockBase { - ObjCBlock11._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. + NSData initWithBase64EncodedData_options_(NSData? base64Data, int options) { + final _ret = _lib._objc_msgSend_220( + _id, + _lib._sel_initWithBase64EncodedData_options_1, + base64Data?._id ?? ffi.nullptr, + options); + return NSData._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock11.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>( - _ObjCBlock11_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options. + NSData base64EncodedDataWithOptions_(int options) { + final _ret = _lib._objc_msgSend_221( + _id, _lib._sel_base64EncodedDataWithOptions_1, options); + return NSData._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock11.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>( - _ObjCBlock11_closureTrampoline) - .cast(), - _ObjCBlock11_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. + NSData decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_222(_id, + _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); + return NSData._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + NSData compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_222( + _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); + return NSData._(_ret, _lib, retain: true, release: true); + } -/// Read/Write Options -abstract class NSDataReadingOptions { - /// Hint to map the file in if possible and safe - static const int NSDataReadingMappedIfSafe = 1; + void getBytes_(ffi.Pointer buffer) { + return _lib._objc_msgSend_59(_id, _lib._sel_getBytes_1, buffer); + } - /// Hint to get the file not to be cached in the kernel - static const int NSDataReadingUncached = 2; + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - /// Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given. - static const int NSDataReadingMappedAlways = 8; + NSObject initWithContentsOfMappedFile_(NSString? path) { + final _ret = _lib._objc_msgSend_42(_id, + _lib._sel_initWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - /// Deprecated name for NSDataReadingMappedIfSafe - static const int NSDataReadingMapped = 1; + /// These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0. + NSObject initWithBase64Encoding_(NSString? base64String) { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_initWithBase64Encoding_1, + base64String?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - /// Deprecated name for NSDataReadingMapped - static const int NSMappedRead = 1; + NSString base64Encoding() { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_base64Encoding1); + return NSString._(_ret, _lib, retain: true, release: true); + } - /// Deprecated name for NSDataReadingUncached - static const int NSUncachedRead = 2; -} + static NSData new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); + return NSData._(_ret, _lib, retain: false, release: true); + } -void _ObjCBlock12_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); + static NSData alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); + return NSData._(_ret, _lib, retain: false, release: true); + } } -final _ObjCBlock12_closureRegistry = {}; -int _ObjCBlock12_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock12_registerClosure(Function fn) { - final id = ++_ObjCBlock12_closureRegistryIndex; - _ObjCBlock12_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +class NSURL extends NSObject { + NSURL._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -void _ObjCBlock12_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return _ObjCBlock12_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + /// Returns a [NSURL] that points to the same underlying object as [other]. + static NSURL castFrom(T other) { + return NSURL._(other._id, other._lib, retain: true, release: true); + } -class ObjCBlock12 extends _ObjCBlockBase { - ObjCBlock12._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// Returns a [NSURL] that wraps the given raw object pointer. + static NSURL castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURL._(other, lib, retain: retain, release: release); + } - /// Creates a block from a C function pointer. - ObjCBlock12.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, NSUInteger arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock12_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// Returns whether [obj] is an instance of [NSURL]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); + } - /// Creates a block from a Dart function. - ObjCBlock12.fromFunction(NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, int arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock12_closureTrampoline) - .cast(), - _ObjCBlock12_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); + /// this call percent-encodes both the host and path, so this cannot be used to set a username/password or port in the hostname part or with a IPv6 '[...]' type address. NSURLComponents handles IPv6 addresses correctly. + NSURL initWithScheme_host_path_( + NSString? scheme, NSString? host, NSString? path) { + final _ret = _lib._objc_msgSend_38( + _id, + _lib._sel_initWithScheme_host_path_1, + scheme?._id ?? ffi.nullptr, + host?._id ?? ffi.nullptr, + path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL. + NSURL initFileURLWithPath_isDirectory_relativeToURL_( + NSString? path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_39( + _id, + _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, + path?._id ?? ffi.nullptr, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -abstract class NSDataBase64DecodingOptions { - /// Use the following option to modify the decoding algorithm so that it ignores unknown non-Base64 bytes, including line ending characters. - static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; -} + /// Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. + NSURL initFileURLWithPath_relativeToURL_(NSString? path, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _id, + _lib._sel_initFileURLWithPath_relativeToURL_1, + path?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -/// Base 64 Options -abstract class NSDataBase64EncodingOptions { - /// Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default. - static const int NSDataBase64Encoding64CharacterLineLength = 1; - static const int NSDataBase64Encoding76CharacterLineLength = 2; + NSURL initFileURLWithPath_isDirectory_(NSString? path, bool isDir) { + final _ret = _lib._objc_msgSend_41( + _id, + _lib._sel_initFileURLWithPath_isDirectory_1, + path?._id ?? ffi.nullptr, + isDir); + return NSURL._(_ret, _lib, retain: true, release: true); + } - /// Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF. - static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; - static const int NSDataBase64EncodingEndLineWithLineFeed = 32; -} + /// Better to use initFileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. + NSURL initFileURLWithPath_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initFileURLWithPath_1, path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -/// Various algorithms provided for compression APIs. See NSData and NSMutableData. -abstract class NSDataCompressionAlgorithm { - /// LZFSE is the recommended compression algorithm if you don't have a specific reason to use another algorithm. Note that LZFSE is intended for use with Apple devices only. This algorithm generally compresses better than Zlib, but not as well as LZMA. It is generally slower than LZ4. - static const int NSDataCompressionAlgorithmLZFSE = 0; + /// Initializes and returns a newly created file NSURL referencing the local file or directory at path, relative to a base URL. + static NSURL fileURLWithPath_isDirectory_relativeToURL_( + NativeCupertinoHttp _lib, NSString? path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_43( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, + path?._id ?? ffi.nullptr, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } - /// LZ4 is appropriate if compression speed is critical. LZ4 generally sacrifices compression ratio in order to achieve its greater speed. - /// This implementation of LZ4 makes a small modification to the standard format, which is described in greater detail in . - static const int NSDataCompressionAlgorithmLZ4 = 1; + /// Better to use fileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. + static NSURL fileURLWithPath_relativeToURL_( + NativeCupertinoHttp _lib, NSString? path, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_44( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_relativeToURL_1, + path?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } - /// LZMA is appropriate if compression ratio is critical and memory usage and compression speed are not a factor. LZMA is an order of magnitude slower for both compression and decompression than other algorithms. It can also use a very large amount of memory, so if you need to compress large amounts of data on embedded devices with limited memory you should probably avoid LZMA. - /// Encoding uses LZMA level 6 only, but decompression works with any compression level. - static const int NSDataCompressionAlgorithmLZMA = 2; - - /// Zlib is appropriate if you want a good balance between compression speed and compression ratio, but only if you need interoperability with non-Apple platforms. Otherwise, LZFSE is generally a better choice than Zlib. - /// Encoding uses Zlib level 5 only, but decompression works with any compression level. It uses the raw DEFLATE format as described in IETF RFC 1951. - static const int NSDataCompressionAlgorithmZlib = 3; -} + static NSURL fileURLWithPath_isDirectory_( + NativeCupertinoHttp _lib, NSString? path, bool isDir) { + final _ret = _lib._objc_msgSend_45( + _lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_1, + path?._id ?? ffi.nullptr, + isDir); + return NSURL._(_ret, _lib, retain: true, release: true); + } -typedef UTF32Char = UInt32; -typedef UInt32 = ffi.UnsignedInt; + /// Better to use fileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. + static NSURL fileURLWithPath_(NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_46(_lib._class_NSURL1, + _lib._sel_fileURLWithPath_1, path?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -abstract class NSStringEnumerationOptions { - static const int NSStringEnumerationByLines = 0; - static const int NSStringEnumerationByParagraphs = 1; - static const int NSStringEnumerationByComposedCharacterSequences = 2; - static const int NSStringEnumerationByWords = 3; - static const int NSStringEnumerationBySentences = 4; - static const int NSStringEnumerationByCaretPositions = 5; - static const int NSStringEnumerationByDeletionClusters = 6; - static const int NSStringEnumerationReverse = 256; - static const int NSStringEnumerationSubstringNotRequired = 512; - static const int NSStringEnumerationLocalized = 1024; -} + /// Initializes a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. + NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + ffi.Pointer path, bool isDir, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_47( + _id, + _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, + path, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock13_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - NSRange arg2, ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>()(arg0, arg1, arg2, arg3); -} + /// Initializes and returns a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. + static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + NativeCupertinoHttp _lib, + ffi.Pointer path, + bool isDir, + NSURL? baseURL) { + final _ret = _lib._objc_msgSend_48( + _lib._class_NSURL1, + _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, + path, + isDir, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -final _ObjCBlock13_closureRegistry = {}; -int _ObjCBlock13_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock13_registerClosure(Function fn) { - final id = ++_ObjCBlock13_closureRegistryIndex; - _ObjCBlock13_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// These methods expect their string arguments to contain any percent escape codes that are necessary. It is an error for URLString to be nil. + NSURL initWithString_(NSString? URLString) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock13_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3) { - return _ObjCBlock13_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2, arg3); -} + NSURL initWithString_relativeToURL_(NSString? URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _id, + _lib._sel_initWithString_relativeToURL_1, + URLString?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock13 extends _ObjCBlockBase { - ObjCBlock13._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + static NSURL URLWithString_(NativeCupertinoHttp _lib, NSString? URLString) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSURL1, + _lib._sel_URLWithString_1, URLString?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock13.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - NSRange arg2, ffi.Pointer arg3)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>( - _ObjCBlock13_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static NSURL URLWithString_relativeToURL_( + NativeCupertinoHttp _lib, NSString? URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_40( + _lib._class_NSURL1, + _lib._sel_URLWithString_relativeToURL_1, + URLString?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock13.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, NSRange arg1, NSRange arg2, - ffi.Pointer arg3) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>( - _ObjCBlock13_closureTrampoline) - .cast(), - _ObjCBlock13_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, NSRange arg1, NSRange arg2, - ffi.Pointer arg3) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>()(_id, arg0, arg1, arg2, arg3); + /// Initializes a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + NSURL initWithDataRepresentation_relativeToURL_( + NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_49( + _id, + _lib._sel_initWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// Initializes and returns a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + static NSURL URLWithDataRepresentation_relativeToURL_( + NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_50( + _lib._class_NSURL1, + _lib._sel_URLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock14_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} + /// Initializes a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( + NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_49( + _id, + _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -final _ObjCBlock14_closureRegistry = {}; -int _ObjCBlock14_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock14_registerClosure(Function fn) { - final id = ++_ObjCBlock14_closureRegistryIndex; - _ObjCBlock14_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// Initializes and returns a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. + static NSURL absoluteURLWithDataRepresentation_relativeToURL_( + NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_50( + _lib._class_NSURL1, + _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, + data?._id ?? ffi.nullptr, + baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock14_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock14_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + /// Returns the data representation of the URL's relativeString. If the URL was initialized with -initWithData:relativeToURL:, the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with NSUTF8StringEncoding. + NSData? get dataRepresentation { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_dataRepresentation1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock14 extends _ObjCBlockBase { - ObjCBlock14._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + NSString? get absoluteString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_absoluteString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock14.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock14_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// The relative portion of a URL. If baseURL is nil, or if the receiver is itself absolute, this is the same as absoluteString + NSString? get relativeString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativeString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock14.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock14_closureTrampoline) - .cast(), - _ObjCBlock14_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); + /// may be nil. + NSURL? get baseURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_baseURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// if the receiver is itself absolute, this will return self. + NSURL? get absoluteURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_absoluteURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -typedef NSStringEncoding = NSUInteger; + /// Any URL is composed of these two basic pieces. The full URL would be the concatenation of [myURL scheme], ':', [myURL resourceSpecifier] + NSString? get scheme { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -abstract class NSStringEncodingConversionOptions { - static const int NSStringEncodingConversionAllowLossy = 1; - static const int NSStringEncodingConversionExternalRepresentation = 2; -} + NSString? get resourceSpecifier { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_resourceSpecifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -typedef NSStringTransform = ffi.Pointer; -void _ObjCBlock15_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); -} + /// If the URL conforms to rfc 1808 (the most common form of URL), the following accessors will return the various components; otherwise they return nil. The litmus test for conformance is as recommended in RFC 1808 - whether the first two characters of resourceSpecifier is @"//". In all cases, they return the component's value after resolving the receiver against its base URL. + NSString? get host { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -final _ObjCBlock15_closureRegistry = {}; -int _ObjCBlock15_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock15_registerClosure(Function fn) { - final id = ++_ObjCBlock15_closureRegistryIndex; - _ObjCBlock15_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + NSNumber? get port { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock15_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return _ObjCBlock15_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + NSString? get user { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -class ObjCBlock15 extends _ObjCBlockBase { - ObjCBlock15._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + NSString? get password { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock15.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, NSUInteger arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock15_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + NSString? get path { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock15.fromFunction(NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, int arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock15_closureTrampoline) - .cast(), - _ObjCBlock15_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); + NSString? get fragment { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + NSString? get parameterString { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_parameterString1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -typedef va_list = __builtin_va_list; -typedef __builtin_va_list = ffi.Pointer; + NSString? get query { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -abstract class NSQualityOfService { - static const int NSQualityOfServiceUserInteractive = 33; - static const int NSQualityOfServiceUserInitiated = 25; - static const int NSQualityOfServiceUtility = 17; - static const int NSQualityOfServiceBackground = 9; - static const int NSQualityOfServiceDefault = -1; -} + /// The same as path if baseURL is nil + NSString? get relativePath { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativePath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -abstract class ptrauth_key { - static const int ptrauth_key_asia = 0; - static const int ptrauth_key_asib = 1; - static const int ptrauth_key_asda = 2; - static const int ptrauth_key_asdb = 3; - static const int ptrauth_key_process_independent_code = 0; - static const int ptrauth_key_process_dependent_code = 1; - static const int ptrauth_key_process_independent_data = 2; - static const int ptrauth_key_process_dependent_data = 3; - static const int ptrauth_key_function_pointer = 0; - static const int ptrauth_key_return_address = 1; - static const int ptrauth_key_frame_pointer = 3; - static const int ptrauth_key_block_function = 0; - static const int ptrauth_key_cxx_vtable_pointer = 2; - static const int ptrauth_key_method_list_pointer = 2; - static const int ptrauth_key_objc_isa_pointer = 2; - static const int ptrauth_key_objc_super_pointer = 2; - static const int ptrauth_key_block_descriptor_pointer = 2; - static const int ptrauth_key_objc_sel_pointer = 3; - static const int ptrauth_key_objc_class_ro_pointer = 2; -} + /// Determines if a given URL string's path represents a directory (i.e. the path component in the URL string ends with a '/' character). This does not check the resource the URL refers to. + bool get hasDirectoryPath { + return _lib._objc_msgSend_11(_id, _lib._sel_hasDirectoryPath1); + } -@ffi.Packed(2) -class wide extends ffi.Struct { - @UInt32() - external int lo; + /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. + bool getFileSystemRepresentation_maxLength_( + ffi.Pointer buffer, int maxBufferLength) { + return _lib._objc_msgSend_90( + _id, + _lib._sel_getFileSystemRepresentation_maxLength_1, + buffer, + maxBufferLength); + } - @SInt32() - external int hi; -} - -typedef SInt32 = ffi.Int; + /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. The returned C string will be automatically freed just as a returned object would be released; your code should copy the representation or use getFileSystemRepresentation:maxLength: if it needs to store the representation outside of the autorelease context in which the representation is created. + ffi.Pointer get fileSystemRepresentation { + return _lib._objc_msgSend_53(_id, _lib._sel_fileSystemRepresentation1); + } -@ffi.Packed(2) -class UnsignedWide extends ffi.Struct { - @UInt32() - external int lo; + /// Whether the scheme is file:; if [myURL isFileURL] is YES, then [myURL path] is suitable for input into NSFileManager or NSPathUtilities. + bool get fileURL { + return _lib._objc_msgSend_11(_id, _lib._sel_isFileURL1); + } - @UInt32() - external int hi; -} + NSURL? get standardizedURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_standardizedURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -class Float80 extends ffi.Struct { - @SInt16() - external int exp; + /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. + bool checkResourceIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_183( + _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); + } - @ffi.Array.multi([4]) - external ffi.Array man; -} + /// Returns whether the URL is a file reference URL. Symbol is present in iOS 4, but performs no operation. + bool isFileReferenceURL() { + return _lib._objc_msgSend_11(_id, _lib._sel_isFileReferenceURL1); + } -typedef SInt16 = ffi.Short; -typedef UInt16 = ffi.UnsignedShort; + /// Returns a file reference URL that refers to the same resource as a specified file URL. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:). Symbol is present in iOS 4, but performs no operation. + NSURL fileReferenceURL() { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileReferenceURL1); + return NSURL._(_ret, _lib, retain: true, release: true); + } -class Float96 extends ffi.Struct { - @ffi.Array.multi([2]) - external ffi.Array exp; + /// Returns a file path URL that refers to the same resource as a specified URL. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. Symbol is present in iOS 4, but performs no operation. + NSURL? get filePathURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_filePathURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } - @ffi.Array.multi([4]) - external ffi.Array man; -} + /// Returns the resource value identified by a given resource key. This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this method returns YES and value is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool getResourceValue_forKey_error_( + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_184( + _id, _lib._sel_getResourceValue_forKey_error_1, value, key, error); + } -@ffi.Packed(2) -class Float32Point extends ffi.Struct { - @Float32() - external double x; + /// Returns the resource values identified by specified array of resource keys. This method first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this method returns NULL, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + NSDictionary resourceValuesForKeys_error_( + NSArray? keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_185( + _id, + _lib._sel_resourceValuesForKeys_error_1, + keys?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - @Float32() - external double y; -} + /// Sets the resource value identified by a given resource key. This method writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool setResourceValue_forKey_error_(NSObject value, NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_186( + _id, _lib._sel_setResourceValue_forKey_error_1, value._id, key, error); + } -typedef Float32 = ffi.Float; + /// Sets any number of resource values of a URL's resource. This method writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to this method or to -setResourceValue:forKey:error: to guarantee the order. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. + bool setResourceValues_error_( + NSDictionary? keyedValues, ffi.Pointer> error) { + return _lib._objc_msgSend_187(_id, _lib._sel_setResourceValues_error_1, + keyedValues?._id ?? ffi.nullptr, error); + } -@ffi.Packed(2) -class ProcessSerialNumber extends ffi.Struct { - @UInt32() - external int highLongOfPSN; + /// Removes the cached resource value identified by a given resource value key from the URL object. Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources. + void removeCachedResourceValueForKey_(NSURLResourceKey key) { + return _lib._objc_msgSend_188( + _id, _lib._sel_removeCachedResourceValueForKey_1, key); + } - @UInt32() - external int lowLongOfPSN; -} + /// Removes all cached resource values and all temporary resource values from the URL object. This method is currently applicable only to URLs for file system resources. + void removeAllCachedResourceValues() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); + } -class Point extends ffi.Struct { - @ffi.Short() - external int v; + /// NS_SWIFT_SENDABLE + void setTemporaryResourceValue_forKey_(NSObject value, NSURLResourceKey key) { + return _lib._objc_msgSend_189( + _id, _lib._sel_setTemporaryResourceValue_forKey_1, value._id, key); + } - @ffi.Short() - external int h; -} + /// Returns bookmark data for the URL, created with specified options and resource values. If this method returns nil, the optional error is populated. + NSData + bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( + int options, + NSArray? keys, + NSURL? relativeURL, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_190( + _id, + _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, + options, + keys?._id ?? ffi.nullptr, + relativeURL?._id ?? ffi.nullptr, + error); + return NSData._(_ret, _lib, retain: true, release: true); + } -class Rect extends ffi.Struct { - @ffi.Short() - external int top; + /// Initializes a newly created NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. + NSURL + initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NSData? bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_191( + _id, + _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, + bookmarkData?._id ?? ffi.nullptr, + options, + relativeURL?._id ?? ffi.nullptr, + isStale, + error); + return NSURL._(_ret, _lib, retain: true, release: true); + } - @ffi.Short() - external int left; + /// Creates and Initializes an NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. + static NSURL + URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NativeCupertinoHttp _lib, + NSData? bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_191( + _lib._class_NSURL1, + _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, + bookmarkData?._id ?? ffi.nullptr, + options, + relativeURL?._id ?? ffi.nullptr, + isStale, + error); + return NSURL._(_ret, _lib, retain: true, release: true); + } - @ffi.Short() - external int bottom; + /// Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available in the bookmark data. + static NSDictionary resourceValuesForKeys_fromBookmarkData_( + NativeCupertinoHttp _lib, NSArray? keys, NSData? bookmarkData) { + final _ret = _lib._objc_msgSend_192( + _lib._class_NSURL1, + _lib._sel_resourceValuesForKeys_fromBookmarkData_1, + keys?._id ?? ffi.nullptr, + bookmarkData?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - @ffi.Short() - external int right; -} + /// Creates an alias file on disk at a specified location with specified bookmark data. bookmarkData must have been created with the NSURLBookmarkCreationSuitableForBookmarkFile option. bookmarkFileURL must either refer to an existing file (which will be overwritten), or to location in an existing directory. If this method returns NO, the optional error is populated. + static bool writeBookmarkData_toURL_options_error_( + NativeCupertinoHttp _lib, + NSData? bookmarkData, + NSURL? bookmarkFileURL, + int options, + ffi.Pointer> error) { + return _lib._objc_msgSend_193( + _lib._class_NSURL1, + _lib._sel_writeBookmarkData_toURL_options_error_1, + bookmarkData?._id ?? ffi.nullptr, + bookmarkFileURL?._id ?? ffi.nullptr, + options, + error); + } -@ffi.Packed(2) -class FixedPoint extends ffi.Struct { - @Fixed() - external int x; + /// Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. If bookmarkFileURL refers to an alias file created prior to OS X v10.6 that contains Alias Manager information but no bookmark data, this method synthesizes bookmark data for the file. If this method returns nil, the optional error is populated. + static NSData bookmarkDataWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? bookmarkFileURL, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_194( + _lib._class_NSURL1, + _lib._sel_bookmarkDataWithContentsOfURL_error_1, + bookmarkFileURL?._id ?? ffi.nullptr, + error); + return NSData._(_ret, _lib, retain: true, release: true); + } - @Fixed() - external int y; -} + /// Creates and initializes a NSURL that refers to the location specified by resolving the alias file at url. If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, the NSURL returned is the same as url argument. This method fails and returns nil if the url argument is unreachable, or if the original file or directory could not be located or is not reachable, or if the original file or directory is on a volume that could not be located or mounted. If this method fails, the optional error is populated. The NSURLBookmarkResolutionWithSecurityScope option is not supported by this method. + static NSURL URLByResolvingAliasFileAtURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int options, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_195( + _lib._class_NSURL1, + _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, + url?._id ?? ffi.nullptr, + options, + error); + return NSURL._(_ret, _lib, retain: true, release: true); + } -typedef Fixed = SInt32; + /// Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. When access to this resource is no longer needed the client must call stopAccessingSecurityScopedResource. Each call to startAccessingSecurityScopedResource must be balanced with a call to stopAccessingSecurityScopedResource (Note: this is not reference counted). + bool startAccessingSecurityScopedResource() { + return _lib._objc_msgSend_11( + _id, _lib._sel_startAccessingSecurityScopedResource1); + } -@ffi.Packed(2) -class FixedRect extends ffi.Struct { - @Fixed() - external int left; + /// Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource. + void stopAccessingSecurityScopedResource() { + return _lib._objc_msgSend_1( + _id, _lib._sel_stopAccessingSecurityScopedResource1); + } - @Fixed() - external int top; + /// Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: + /// - NSMetadataQueryUbiquitousDataScope + /// - NSMetadataQueryUbiquitousDocumentsScope + /// - An NSFilePresenter presenting the contents of the directory located by -URLForUbiquitousContainerIdentifier: or a subdirectory thereof + /// + /// The following methods behave identically to their similarly named methods above (-getResourceValue:forKey:error:, etc.), except that they allow you to get resource values and check for presence regardless of whether the promised item's contents currently exist at the URL. You must use these APIs instead of the normal NSURL resource value APIs if and only if any of the following are true: + /// - You are using a URL that you know came directly from one of the above APIs + /// - You are inside the accessor block of a coordinated read or write that used NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingContentIndependentMetadataOnly + /// + /// Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. + bool getPromisedItemResourceValue_forKey_error_( + ffi.Pointer> value, + NSURLResourceKey key, + ffi.Pointer> error) { + return _lib._objc_msgSend_184( + _id, + _lib._sel_getPromisedItemResourceValue_forKey_error_1, + value, + key, + error); + } - @Fixed() - external int right; + NSDictionary promisedItemResourceValuesForKeys_error_( + NSArray? keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_185( + _id, + _lib._sel_promisedItemResourceValuesForKeys_error_1, + keys?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - @Fixed() - external int bottom; -} + bool checkPromisedItemIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_183( + _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); + } -class TimeBaseRecord extends ffi.Opaque {} + /// The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. + static NSURL fileURLWithPathComponents_( + NativeCupertinoHttp _lib, NSArray? components) { + final _ret = _lib._objc_msgSend_196(_lib._class_NSURL1, + _lib._sel_fileURLWithPathComponents_1, components?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -@ffi.Packed(2) -class TimeRecord extends ffi.Struct { - external CompTimeValue value; + NSArray? get pathComponents { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_pathComponents1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } - @TimeScale() - external int scale; + NSString? get lastPathComponent { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lastPathComponent1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - external TimeBase base; -} + NSString? get pathExtension { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_pathExtension1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -typedef CompTimeValue = wide; -typedef TimeScale = SInt32; -typedef TimeBase = ffi.Pointer; + NSURL URLByAppendingPathComponent_(NSString? pathComponent) { + final _ret = _lib._objc_msgSend_46( + _id, + _lib._sel_URLByAppendingPathComponent_1, + pathComponent?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -class NumVersion extends ffi.Struct { - @UInt8() - external int nonRelRev; + NSURL URLByAppendingPathComponent_isDirectory_( + NSString? pathComponent, bool isDirectory) { + final _ret = _lib._objc_msgSend_45( + _id, + _lib._sel_URLByAppendingPathComponent_isDirectory_1, + pathComponent?._id ?? ffi.nullptr, + isDirectory); + return NSURL._(_ret, _lib, retain: true, release: true); + } - @UInt8() - external int stage; + NSURL? get URLByDeletingLastPathComponent { + final _ret = + _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingLastPathComponent1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } - @UInt8() - external int minorAndBugRev; + NSURL URLByAppendingPathExtension_(NSString? pathExtension) { + final _ret = _lib._objc_msgSend_46( + _id, + _lib._sel_URLByAppendingPathExtension_1, + pathExtension?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } - @UInt8() - external int majorRev; -} + NSURL? get URLByDeletingPathExtension { + final _ret = + _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingPathExtension1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -typedef UInt8 = ffi.UnsignedChar; + /// The following methods work only on `file:` scheme URLs; for non-`file:` scheme URLs, these methods return the URL unchanged. + NSURL? get URLByStandardizingPath { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URLByStandardizingPath1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -class NumVersionVariant extends ffi.Union { - external NumVersion parts; + NSURL? get URLByResolvingSymlinksInPath { + final _ret = + _lib._objc_msgSend_52(_id, _lib._sel_URLByResolvingSymlinksInPath1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } - @UInt32() - external int whole; -} + /// Blocks to load the data if necessary. If shouldUseCache is YES, then if an equivalent URL has already been loaded and cached, its resource data will be returned immediately. If shouldUseCache is NO, a new load will be started + NSData resourceDataUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_197( + _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); + return NSData._(_ret, _lib, retain: true, release: true); + } -class VersRec extends ffi.Struct { - external NumVersion numericVersion; + /// Starts an asynchronous load of the data, registering delegate to receive notification. Only one such background load can proceed at a time. + void loadResourceDataNotifyingClient_usingCache_( + NSObject client, bool shouldUseCache) { + return _lib._objc_msgSend_198( + _id, + _lib._sel_loadResourceDataNotifyingClient_usingCache_1, + client._id, + shouldUseCache); + } - @ffi.Short() - external int countryCode; + NSObject propertyForKey_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Array.multi([256]) - external ffi.Array shortVersion; + /// These attempt to write the given arguments for the resource specified by the URL; they return success or failure + bool setResourceData_(NSData? data) { + return _lib._objc_msgSend_35( + _id, _lib._sel_setResourceData_1, data?._id ?? ffi.nullptr); + } - @ffi.Array.multi([256]) - external ffi.Array reserved; -} + bool setProperty_forKey_(NSObject property, NSString? propertyKey) { + return _lib._objc_msgSend_199(_id, _lib._sel_setProperty_forKey_1, + property._id, propertyKey?._id ?? ffi.nullptr); + } -typedef ConstStr255Param = ffi.Pointer; + /// Sophisticated clients will want to ask for this, then message the handle directly. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded + NSURLHandle URLHandleUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_207( + _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); + return NSURLHandle._(_ret, _lib, retain: true, release: true); + } -class __CFString extends ffi.Opaque {} + static NSURL new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); + return NSURL._(_ret, _lib, retain: false, release: true); + } -abstract class CFComparisonResult { - static const int kCFCompareLessThan = -1; - static const int kCFCompareEqualTo = 0; - static const int kCFCompareGreaterThan = 1; + static NSURL alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); + return NSURL._(_ret, _lib, retain: false, release: true); + } } -typedef CFIndex = ffi.Long; - -class CFRange extends ffi.Struct { - @CFIndex() - external int location; - - @CFIndex() - external int length; -} +class NSNumber extends NSValue { + NSNumber._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class __CFNull extends ffi.Opaque {} + /// Returns a [NSNumber] that points to the same underlying object as [other]. + static NSNumber castFrom(T other) { + return NSNumber._(other._id, other._lib, retain: true, release: true); + } -typedef CFTypeID = ffi.UnsignedLong; -typedef CFNullRef = ffi.Pointer<__CFNull>; + /// Returns a [NSNumber] that wraps the given raw object pointer. + static NSNumber castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNumber._(other, lib, retain: retain, release: release); + } -class __CFAllocator extends ffi.Opaque {} + /// Returns whether [obj] is an instance of [NSNumber]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); + } -typedef CFAllocatorRef = ffi.Pointer<__CFAllocator>; + @override + NSNumber initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSNumber._(_ret, _lib, retain: true, release: true); + } -class CFAllocatorContext extends ffi.Struct { - @CFIndex() - external int version; + NSNumber initWithChar_(int value) { + final _ret = _lib._objc_msgSend_62(_id, _lib._sel_initWithChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer info; + NSNumber initWithUnsignedChar_(int value) { + final _ret = + _lib._objc_msgSend_63(_id, _lib._sel_initWithUnsignedChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } - external CFAllocatorRetainCallBack retain; + NSNumber initWithShort_(int value) { + final _ret = _lib._objc_msgSend_64(_id, _lib._sel_initWithShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } - external CFAllocatorReleaseCallBack release; + NSNumber initWithUnsignedShort_(int value) { + final _ret = + _lib._objc_msgSend_65(_id, _lib._sel_initWithUnsignedShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } - external CFAllocatorCopyDescriptionCallBack copyDescription; + NSNumber initWithInt_(int value) { + final _ret = _lib._objc_msgSend_66(_id, _lib._sel_initWithInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } - external CFAllocatorAllocateCallBack allocate; - - external CFAllocatorReallocateCallBack reallocate; - - external CFAllocatorDeallocateCallBack deallocate; + NSNumber initWithUnsignedInt_(int value) { + final _ret = + _lib._objc_msgSend_67(_id, _lib._sel_initWithUnsignedInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } - external CFAllocatorPreferredSizeCallBack preferredSize; -} + NSNumber initWithLong_(int value) { + final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } -typedef CFAllocatorRetainCallBack = ffi.Pointer< - ffi.NativeFunction Function(ffi.Pointer)>>; -typedef CFAllocatorReleaseCallBack - = ffi.Pointer)>>; -typedef CFAllocatorCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFStringRef = ffi.Pointer<__CFString>; -typedef CFAllocatorAllocateCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFIndex, CFOptionFlags, ffi.Pointer)>>; -typedef CFOptionFlags = ffi.UnsignedLong; -typedef CFAllocatorReallocateCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, CFIndex, - CFOptionFlags, ffi.Pointer)>>; -typedef CFAllocatorDeallocateCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFAllocatorPreferredSizeCallBack = ffi.Pointer< - ffi.NativeFunction< - CFIndex Function(CFIndex, CFOptionFlags, ffi.Pointer)>>; -typedef CFTypeRef = ffi.Pointer; -typedef Boolean = ffi.UnsignedChar; -typedef CFHashCode = ffi.UnsignedLong; -typedef NSZone = _NSZone; + NSNumber initWithUnsignedLong_(int value) { + final _ret = + _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } -class NSMutableIndexSet extends NSIndexSet { - NSMutableIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + NSNumber initWithLongLong_(int value) { + final _ret = + _lib._objc_msgSend_70(_id, _lib._sel_initWithLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSMutableIndexSet] that points to the same underlying object as [other]. - static NSMutableIndexSet castFrom(T other) { - return NSMutableIndexSet._(other._id, other._lib, - retain: true, release: true); + NSNumber initWithUnsignedLongLong_(int value) { + final _ret = + _lib._objc_msgSend_71(_id, _lib._sel_initWithUnsignedLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSMutableIndexSet] that wraps the given raw object pointer. - static NSMutableIndexSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableIndexSet._(other, lib, retain: retain, release: release); + NSNumber initWithFloat_(double value) { + final _ret = _lib._objc_msgSend_72(_id, _lib._sel_initWithFloat_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSMutableIndexSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableIndexSet1); + NSNumber initWithDouble_(double value) { + final _ret = _lib._objc_msgSend_73(_id, _lib._sel_initWithDouble_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void addIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_281( - _id, _lib._sel_addIndexes_1, indexSet?._id ?? ffi.nullptr); + NSNumber initWithBool_(bool value) { + final _ret = _lib._objc_msgSend_74(_id, _lib._sel_initWithBool_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void removeIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_281( - _id, _lib._sel_removeIndexes_1, indexSet?._id ?? ffi.nullptr); + NSNumber initWithInteger_(int value) { + final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void removeAllIndexes() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllIndexes1); + NSNumber initWithUnsignedInteger_(int value) { + final _ret = + _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void addIndex_(int value) { - return _lib._objc_msgSend_282(_id, _lib._sel_addIndex_1, value); + int get charValue { + return _lib._objc_msgSend_75(_id, _lib._sel_charValue1); } - void removeIndex_(int value) { - return _lib._objc_msgSend_282(_id, _lib._sel_removeIndex_1, value); + int get unsignedCharValue { + return _lib._objc_msgSend_76(_id, _lib._sel_unsignedCharValue1); } - void addIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_283(_id, _lib._sel_addIndexesInRange_1, range); + int get shortValue { + return _lib._objc_msgSend_77(_id, _lib._sel_shortValue1); } - void removeIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_283(_id, _lib._sel_removeIndexesInRange_1, range); + int get unsignedShortValue { + return _lib._objc_msgSend_78(_id, _lib._sel_unsignedShortValue1); } - void shiftIndexesStartingAtIndex_by_(int index, int delta) { - return _lib._objc_msgSend_284( - _id, _lib._sel_shiftIndexesStartingAtIndex_by_1, index, delta); + int get intValue { + return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); } - static NSMutableIndexSet indexSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableIndexSet1, _lib._sel_indexSet1); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + int get unsignedIntValue { + return _lib._objc_msgSend_80(_id, _lib._sel_unsignedIntValue1); } - static NSMutableIndexSet indexSetWithIndex_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSMutableIndexSet1, _lib._sel_indexSetWithIndex_1, value); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + int get longValue { + return _lib._objc_msgSend_81(_id, _lib._sel_longValue1); } - static NSMutableIndexSet indexSetWithIndexesInRange_( - NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_111(_lib._class_NSMutableIndexSet1, - _lib._sel_indexSetWithIndexesInRange_1, range); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + int get unsignedLongValue { + return _lib._objc_msgSend_12(_id, _lib._sel_unsignedLongValue1); } - static NSMutableIndexSet new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_new1); - return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + int get longLongValue { + return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); } - static NSMutableIndexSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_alloc1); - return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + int get unsignedLongLongValue { + return _lib._objc_msgSend_83(_id, _lib._sel_unsignedLongLongValue1); } -} -/// Mutable Array -class NSMutableArray extends NSArray { - NSMutableArray._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + double get floatValue { + return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); + } - /// Returns a [NSMutableArray] that points to the same underlying object as [other]. - static NSMutableArray castFrom(T other) { - return NSMutableArray._(other._id, other._lib, retain: true, release: true); + double get doubleValue { + return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); } - /// Returns a [NSMutableArray] that wraps the given raw object pointer. - static NSMutableArray castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableArray._(other, lib, retain: retain, release: release); + bool get boolValue { + return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); } - /// Returns whether [obj] is an instance of [NSMutableArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableArray1); + int get integerValue { + return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); } - void addObject_(NSObject anObject) { - return _lib._objc_msgSend_200(_id, _lib._sel_addObject_1, anObject._id); + int get unsignedIntegerValue { + return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); } - void insertObject_atIndex_(NSObject anObject, int index) { - return _lib._objc_msgSend_285( - _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); + NSString? get stringValue { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_stringValue1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - void removeLastObject() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); + int compare_(NSNumber? otherNumber) { + return _lib._objc_msgSend_86( + _id, _lib._sel_compare_1, otherNumber?._id ?? ffi.nullptr); } - void removeObjectAtIndex_(int index) { - return _lib._objc_msgSend_282(_id, _lib._sel_removeObjectAtIndex_1, index); + bool isEqualToNumber_(NSNumber? number) { + return _lib._objc_msgSend_87( + _id, _lib._sel_isEqualToNumber_1, number?._id ?? ffi.nullptr); } - void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { - return _lib._objc_msgSend_286( - _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); } - @override - NSMutableArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithChar_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_62( + _lib._class_NSNumber1, _lib._sel_numberWithChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - NSMutableArray initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithUnsignedChar_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_63( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedChar_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - @override - NSMutableArray initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + static NSNumber numberWithShort_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_64( + _lib._class_NSNumber1, _lib._sel_numberWithShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void addObjectsFromArray_(NSArray? otherArray) { - return _lib._objc_msgSend_287( - _id, _lib._sel_addObjectsFromArray_1, otherArray?._id ?? ffi.nullptr); + static NSNumber numberWithUnsignedShort_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_65( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedShort_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - return _lib._objc_msgSend_288( - _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); + static NSNumber numberWithInt_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_66( + _lib._class_NSNumber1, _lib._sel_numberWithInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void removeAllObjects() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + static NSNumber numberWithUnsignedInt_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_67( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInt_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void removeObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_289( - _id, _lib._sel_removeObject_inRange_1, anObject._id, range); + static NSNumber numberWithLong_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSNumber1, _lib._sel_numberWithLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void removeObject_(NSObject anObject) { - return _lib._objc_msgSend_200(_id, _lib._sel_removeObject_1, anObject._id); + static NSNumber numberWithUnsignedLong_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_69( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_289( - _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); + static NSNumber numberWithLongLong_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_70( + _lib._class_NSNumber1, _lib._sel_numberWithLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void removeObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); + static NSNumber numberWithUnsignedLongLong_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_71( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLongLong_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void removeObjectsFromIndices_numIndices_( - ffi.Pointer indices, int cnt) { - return _lib._objc_msgSend_290( - _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); + static NSNumber numberWithFloat_(NativeCupertinoHttp _lib, double value) { + final _ret = _lib._objc_msgSend_72( + _lib._class_NSNumber1, _lib._sel_numberWithFloat_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void removeObjectsInArray_(NSArray? otherArray) { - return _lib._objc_msgSend_287( - _id, _lib._sel_removeObjectsInArray_1, otherArray?._id ?? ffi.nullptr); + static NSNumber numberWithDouble_(NativeCupertinoHttp _lib, double value) { + final _ret = _lib._objc_msgSend_73( + _lib._class_NSNumber1, _lib._sel_numberWithDouble_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void removeObjectsInRange_(NSRange range) { - return _lib._objc_msgSend_283(_id, _lib._sel_removeObjectsInRange_1, range); + static NSNumber numberWithBool_(NativeCupertinoHttp _lib, bool value) { + final _ret = _lib._objc_msgSend_74( + _lib._class_NSNumber1, _lib._sel_numberWithBool_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void replaceObjectsInRange_withObjectsFromArray_range_( - NSRange range, NSArray? otherArray, NSRange otherRange) { - return _lib._objc_msgSend_291( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, - range, - otherArray?._id ?? ffi.nullptr, - otherRange); + static NSNumber numberWithInteger_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_68( + _lib._class_NSNumber1, _lib._sel_numberWithInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void replaceObjectsInRange_withObjectsFromArray_( - NSRange range, NSArray? otherArray) { - return _lib._objc_msgSend_292( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, - range, - otherArray?._id ?? ffi.nullptr); + static NSNumber numberWithUnsignedInteger_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_69( + _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInteger_1, value); + return NSNumber._(_ret, _lib, retain: true, release: true); } - void setArray_(NSArray? otherArray) { - return _lib._objc_msgSend_287( - _id, _lib._sel_setArray_1, otherArray?._id ?? ffi.nullptr); + static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55(_lib._class_NSNumber1, + _lib._sel_valueWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - void sortUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context) { - return _lib._objc_msgSend_293( - _id, _lib._sel_sortUsingFunction_context_1, compare, context); + static NSValue value_withObjCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSNumber1, _lib._sel_value_withObjCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - void sortUsingSelector_(ffi.Pointer comparator) { - return _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); + static NSValue valueWithNonretainedObject_( + NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_56(_lib._class_NSNumber1, + _lib._sel_valueWithNonretainedObject_1, anObject._id); + return NSValue._(_ret, _lib, retain: true, release: true); } - void insertObjects_atIndexes_(NSArray? objects, NSIndexSet? indexes) { - return _lib._objc_msgSend_294(_id, _lib._sel_insertObjects_atIndexes_1, - objects?._id ?? ffi.nullptr, indexes?._id ?? ffi.nullptr); + static NSValue valueWithPointer_( + NativeCupertinoHttp _lib, ffi.Pointer pointer) { + final _ret = _lib._objc_msgSend_57( + _lib._class_NSNumber1, _lib._sel_valueWithPointer_1, pointer); + return NSValue._(_ret, _lib, retain: true, release: true); } - void removeObjectsAtIndexes_(NSIndexSet? indexes) { - return _lib._objc_msgSend_281( - _id, _lib._sel_removeObjectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_60( + _lib._class_NSNumber1, _lib._sel_valueWithRange_1, range); + return NSValue._(_ret, _lib, retain: true, release: true); } - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet? indexes, NSArray? objects) { - return _lib._objc_msgSend_295( - _id, - _lib._sel_replaceObjectsAtIndexes_withObjects_1, - indexes?._id ?? ffi.nullptr, - objects?._id ?? ffi.nullptr); + static NSNumber new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); + return NSNumber._(_ret, _lib, retain: false, release: true); } - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - return _lib._objc_msgSend_285( - _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); + static NSNumber alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); + return NSNumber._(_ret, _lib, retain: false, release: true); } +} - void sortUsingComparator_(NSComparator cmptr) { - return _lib._objc_msgSend_296(_id, _lib._sel_sortUsingComparator_1, cmptr); +class NSValue extends NSObject { + NSValue._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSValue] that points to the same underlying object as [other]. + static NSValue castFrom(T other) { + return NSValue._(other._id, other._lib, retain: true, release: true); } - void sortWithOptions_usingComparator_(int opts, NSComparator cmptr) { - return _lib._objc_msgSend_297( - _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr); + /// Returns a [NSValue] that wraps the given raw object pointer. + static NSValue castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSValue._(other, lib, retain: retain, release: release); } - static NSMutableArray arrayWithCapacity_( - NativeCupertinoHttp _lib, int numItems) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSValue]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); } - static NSMutableArray arrayWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_298(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + void getValue_size_(ffi.Pointer value, int size) { + return _lib._objc_msgSend_33(_id, _lib._sel_getValue_size_1, value, size); } - static NSMutableArray arrayWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_299(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + ffi.Pointer get objCType { + return _lib._objc_msgSend_53(_id, _lib._sel_objCType1); } - NSMutableArray initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_298( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + NSValue initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_54( + _id, _lib._sel_initWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - NSMutableArray initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_299( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + NSValue initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSValue._(_ret, _lib, retain: true, release: true); } - void applyDifference_(NSOrderedCollectionDifference? difference) { - return _lib._objc_msgSend_300( - _id, _lib._sel_applyDifference_1, difference?._id ?? ffi.nullptr); + static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSValue1, _lib._sel_valueWithBytes_objCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - static NSMutableArray array(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + static NSValue value_withObjCType_(NativeCupertinoHttp _lib, + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_55( + _lib._class_NSValue1, _lib._sel_value_withObjCType_1, value, type); + return NSValue._(_ret, _lib, retain: true, release: true); } - static NSMutableArray arrayWithObject_( + static NSValue valueWithNonretainedObject_( NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_91( - _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + final _ret = _lib._objc_msgSend_56(_lib._class_NSValue1, + _lib._sel_valueWithNonretainedObject_1, anObject._id); + return NSValue._(_ret, _lib, retain: true, release: true); } - static NSMutableArray arrayWithObjects_count_(NativeCupertinoHttp _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_95(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + NSObject get nonretainedObjectValue { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nonretainedObjectValue1); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSMutableArray arrayWithObjects_( - NativeCupertinoHttp _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_1, firstObj._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + static NSValue valueWithPointer_( + NativeCupertinoHttp _lib, ffi.Pointer pointer) { + final _ret = _lib._objc_msgSend_57( + _lib._class_NSValue1, _lib._sel_valueWithPointer_1, pointer); + return NSValue._(_ret, _lib, retain: true, release: true); } - static NSMutableArray arrayWithArray_( - NativeCupertinoHttp _lib, NSArray? array) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableArray1, - _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + ffi.Pointer get pointerValue { + return _lib._objc_msgSend_31(_id, _lib._sel_pointerValue1); } - /// Reads array stored in NSPropertyList format from the specified url. - static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_145( - _lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); + bool isEqualToValue_(NSValue? value) { + return _lib._objc_msgSend_58( + _id, _lib._sel_isEqualToValue_1, value?._id ?? ffi.nullptr); } - static NSMutableArray new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); + void getValue_(ffi.Pointer value) { + return _lib._objc_msgSend_59(_id, _lib._sel_getValue_1, value); } - static NSMutableArray alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); + static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_60( + _lib._class_NSValue1, _lib._sel_valueWithRange_1, range); + return NSValue._(_ret, _lib, retain: true, release: true); } -} -/// Mutable Data -class NSMutableData extends NSData { - NSMutableData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + NSRange get rangeValue { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeValue1); + } - /// Returns a [NSMutableData] that points to the same underlying object as [other]. - static NSMutableData castFrom(T other) { - return NSMutableData._(other._id, other._lib, retain: true, release: true); + static NSValue new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); + return NSValue._(_ret, _lib, retain: false, release: true); } - /// Returns a [NSMutableData] that wraps the given raw object pointer. - static NSMutableData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableData._(other, lib, retain: retain, release: release); + static NSValue alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); + return NSValue._(_ret, _lib, retain: false, release: true); } +} - /// Returns whether [obj] is an instance of [NSMutableData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); - } +typedef NSInteger = ffi.Long; - ffi.Pointer get mutableBytes { - return _lib._objc_msgSend_31(_id, _lib._sel_mutableBytes1); - } +class NSError extends NSObject { + NSError._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @override - int get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); + /// Returns a [NSError] that points to the same underlying object as [other]. + static NSError castFrom(T other) { + return NSError._(other._id, other._lib, retain: true, release: true); } - set length(int value) { - _lib._objc_msgSend_301(_id, _lib._sel_setLength_1, value); + /// Returns a [NSError] that wraps the given raw object pointer. + static NSError castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSError._(other, lib, retain: retain, release: release); } - void appendBytes_length_(ffi.Pointer bytes, int length) { - return _lib._objc_msgSend_33( - _id, _lib._sel_appendBytes_length_1, bytes, length); + /// Returns whether [obj] is an instance of [NSError]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); } - void appendData_(NSData? other) { - return _lib._objc_msgSend_302( - _id, _lib._sel_appendData_1, other?._id ?? ffi.nullptr); + /// Domain cannot be nil; dict may be nil if no userInfo desired. + NSError initWithDomain_code_userInfo_( + NSErrorDomain domain, int code, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_179( + _id, + _lib._sel_initWithDomain_code_userInfo_1, + domain, + code, + dict?._id ?? ffi.nullptr); + return NSError._(_ret, _lib, retain: true, release: true); } - void increaseLengthBy_(int extraLength) { - return _lib._objc_msgSend_282( - _id, _lib._sel_increaseLengthBy_1, extraLength); + static NSError errorWithDomain_code_userInfo_(NativeCupertinoHttp _lib, + NSErrorDomain domain, int code, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_179( + _lib._class_NSError1, + _lib._sel_errorWithDomain_code_userInfo_1, + domain, + code, + dict?._id ?? ffi.nullptr); + return NSError._(_ret, _lib, retain: true, release: true); } - void replaceBytesInRange_withBytes_( - NSRange range, ffi.Pointer bytes) { - return _lib._objc_msgSend_303( - _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); + /// These define the error. Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts. Codes are domain-specific. + NSErrorDomain get domain { + return _lib._objc_msgSend_32(_id, _lib._sel_domain1); } - void resetBytesInRange_(NSRange range) { - return _lib._objc_msgSend_283(_id, _lib._sel_resetBytesInRange_1, range); + int get code { + return _lib._objc_msgSend_81(_id, _lib._sel_code1); } - void setData_(NSData? data) { - return _lib._objc_msgSend_302( - _id, _lib._sel_setData_1, data?._id ?? ffi.nullptr); + /// Additional info which may be used to describe the error further. Examples of keys that might be included in here are "Line Number", "Failed URL", etc. Embedding other errors in here can also be used as a way to communicate underlying reasons for failures; for instance "File System Error" embedded in the userInfo of an NSError returned from a higher level document object. If the embedded error information is itself NSError, the standard key NSUnderlyingErrorKey can be used. + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - void replaceBytesInRange_withBytes_length_(NSRange range, - ffi.Pointer replacementBytes, int replacementLength) { - return _lib._objc_msgSend_304( - _id, - _lib._sel_replaceBytesInRange_withBytes_length_1, - range, - replacementBytes, - replacementLength); + /// The primary user-presentable message for the error, for instance for NSFileReadNoPermissionError: "The file "File Name" couldn't be opened because you don't have permission to view it.". This message should ideally indicate what failed and why it failed. This value either comes from NSLocalizedDescriptionKey, or NSLocalizedFailureErrorKey+NSLocalizedFailureReasonErrorKey, or NSLocalizedFailureErrorKey. The steps this takes to construct the description include: + /// 1. Look for NSLocalizedDescriptionKey in userInfo, use value as-is if present. + /// 2. Look for NSLocalizedFailureErrorKey in userInfo. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. + /// 3. Fetch NSLocalizedDescriptionKey from userInfoValueProvider, use value as-is if present. + /// 4. Fetch NSLocalizedFailureErrorKey from userInfoValueProvider. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. + /// 5. Look for NSLocalizedFailureReasonErrorKey in userInfo or from userInfoValueProvider; combine with generic "Operation failed" message. + /// 6. Last resort localized but barely-presentable string manufactured from domain and code. The result is never nil. + NSString? get localizedDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithCapacity_( - NativeCupertinoHttp _lib, int aNumItems) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// Return a complete sentence which describes why the operation failed. For instance, for NSFileReadNoPermissionError: "You don't have permission.". In many cases this will be just the "because" part of the error message (but as a complete sentence, which makes localization easier). Default implementation of this picks up the value of NSLocalizedFailureReasonErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. + NSString? get localizedFailureReason { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedFailureReason1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithLength_(NativeCupertinoHttp _lib, int length) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel. For instance, for NSFileReadNoPermissionError: "To view or change permissions, select the item in the Finder and choose File > Get Info.". Default implementation of this picks up the value of NSLocalizedRecoverySuggestionErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. + NSString? get localizedRecoverySuggestion { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedRecoverySuggestion1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSMutableData initWithCapacity_(int capacity) { + /// Return titles of buttons that are appropriate for displaying in an alert. These should match the string provided as a part of localizedRecoverySuggestion. The first string would be the title of the right-most and default button, the second one next to it, and so on. If used in an alert the corresponding default return values are NSAlertFirstButtonReturn + n. Default implementation of this picks up the value of NSLocalizedRecoveryOptionsErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. nil return usually implies no special suggestion, which would imply a single "OK" button. + NSArray? get localizedRecoveryOptions { final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableData._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_162(_id, _lib._sel_localizedRecoveryOptions1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - NSMutableData initWithLength_(int length) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithLength_1, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// Return an object that conforms to the NSErrorRecoveryAttempting informal protocol. The recovery attempter must be an object that can correctly interpret an index into the array returned by localizedRecoveryOptions. The default implementation of this picks up the value of NSRecoveryAttempterErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. + NSObject get recoveryAttempter { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_recoveryAttempter1); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// These methods compress or decompress the receiver's contents in-place using the specified algorithm. If the operation is not successful, these methods leave the receiver unchanged.. - bool decompressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_305( - _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); + /// Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user. This is done automatically by +[NSAlert alertWithError:], which the presentError: variants in NSApplication go through. The default implementation of this picks up the value of the NSHelpAnchorErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. + NSString? get helpAnchor { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_helpAnchor1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - bool compressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_305( - _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); + /// Return a list of underlying errors, if any. It includes the values of both NSUnderlyingErrorKey and NSMultipleUnderlyingErrorsKey. If there are no underlying errors, returns an empty array. + NSArray? get underlyingErrors { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_underlyingErrors1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - static NSMutableData data(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// Specify a block which will be called from the implementations of localizedDescription, localizedFailureReason, localizedRecoverySuggestion, localizedRecoveryOptions, recoveryAttempter, helpAnchor, and debugDescription when the underlying value for these is not present in the userInfo dictionary of NSError instances with the specified domain. The provider will be called with the userInfo key corresponding to the queried property: For instance, NSLocalizedDescriptionKey for localizedDescription. The provider should return nil for any keys it is not able to provide and, very importantly, any keys it does not recognize (since we may extend the list of keys in future releases). + /// + /// The specified block will be called synchronously at the time when the above properties are queried. The results are not cached. + /// + /// This provider is optional. It enables localization and formatting of error messages to be done lazily; rather than populating the userInfo at NSError creation time, these keys will be fetched on-demand when asked for. + /// + /// It is expected that only the “owner” of an NSError domain specifies the provider for the domain, and this is done once. This facility is not meant for consumers of errors to customize the userInfo entries. This facility should not be used to customize the behaviors of error domains provided by the system. + /// + /// If an appropriate result for the requested key cannot be provided, return nil rather than choosing to manufacture a generic fallback response such as "Operation could not be completed, error 42." NSError will take care of the fallback cases. + static void setUserInfoValueProviderForDomain_provider_( + NativeCupertinoHttp _lib, + NSErrorDomain errorDomain, + ObjCBlock12 provider) { + return _lib._objc_msgSend_181( + _lib._class_NSError1, + _lib._sel_setUserInfoValueProviderForDomain_provider_1, + errorDomain, + provider._id); } - static NSMutableData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, - _lib._sel_dataWithBytes_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); + static ObjCBlock12 userInfoValueProviderForDomain_(NativeCupertinoHttp _lib, + NSError? err, NSErrorUserInfoKey userInfoKey, NSErrorDomain errorDomain) { + final _ret = _lib._objc_msgSend_182( + _lib._class_NSError1, + _lib._sel_userInfoValueProviderForDomain_1, + err?._id ?? ffi.nullptr, + userInfoKey, + errorDomain); + return ObjCBlock12._(_ret, _lib); } - static NSMutableData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: false, release: true); + static NSError new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); + return NSError._(_ret, _lib, retain: false, release: true); } - static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - int length, - bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSMutableData._(_ret, _lib, retain: false, release: true); + static NSError alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); + return NSError._(_ret, _lib, retain: false, release: true); } +} - static NSMutableData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } +typedef NSErrorDomain = ffi.Pointer; - static NSMutableData dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSMutableData._(_ret, _lib, retain: true, release: true); +/// Immutable Dictionary +class NSDictionary extends NSObject { + NSDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDictionary] that points to the same underlying object as [other]. + static NSDictionary castFrom(T other) { + return NSDictionary._(other._id, other._lib, retain: true, release: true); } - static NSMutableData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// Returns a [NSDictionary] that wraps the given raw object pointer. + static NSDictionary castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDictionary._(other, lib, retain: retain, release: release); } - static NSMutableData dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSDictionary]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); } - static NSMutableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSMutableData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + NSObject objectForKey_(NSObject aKey) { + final _ret = _lib._objc_msgSend_91(_id, _lib._sel_objectForKey_1, aKey._id); return NSObject._(_ret, _lib, retain: true, release: true); } - static NSMutableData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); - return NSMutableData._(_ret, _lib, retain: false, release: true); + NSEnumerator keyEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_keyEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); } - static NSMutableData alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); - return NSMutableData._(_ret, _lib, retain: false, release: true); + @override + NSDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDictionary._(_ret, _lib, retain: true, release: true); } -} -/// Purgeable Data -class NSPurgeableData extends NSMutableData { - NSPurgeableData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + NSDictionary initWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_93( + _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSPurgeableData] that points to the same underlying object as [other]. - static NSPurgeableData castFrom(T other) { - return NSPurgeableData._(other._id, other._lib, - retain: true, release: true); + NSDictionary initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSPurgeableData] that wraps the given raw object pointer. - static NSPurgeableData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPurgeableData._(other, lib, retain: retain, release: release); + NSArray? get allKeys { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allKeys1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSPurgeableData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSPurgeableData1); + NSArray allKeysForObject_(NSObject anObject) { + final _ret = + _lib._objc_msgSend_96(_id, _lib._sel_allKeysForObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithCapacity_( - NativeCupertinoHttp _lib, int aNumItems) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSPurgeableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + NSArray? get allValues { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allValues1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithLength_(NativeCupertinoHttp _lib, int length) { - final _ret = _lib._objc_msgSend_94( - _lib._class_NSPurgeableData1, _lib._sel_dataWithLength_1, length); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData data(NativeCupertinoHttp _lib) { + NSString? get descriptionInStringsFileFormat { final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_data1); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_32(_id, _lib._sel_descriptionInStringsFileFormat1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytes_length_1, bytes, length); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); + NSString descriptionWithLocale_indent_(NSObject locale, int level) { + final _ret = _lib._objc_msgSend_99( + _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - int length, - bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); + bool isEqualToDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_163(_id, _lib._sel_isEqualToDictionary_1, + otherDictionary?._id ?? ffi.nullptr); } - static NSPurgeableData dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString? path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( - _lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( - _lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, - readOptionsMask, - errorPtr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + NSArray objectsForKeys_notFoundMarker_(NSArray? keys, NSObject marker) { + final _ret = _lib._objc_msgSend_164( + _id, + _lib._sel_objectsForKeys_notFoundMarker_1, + keys?._id ?? ffi.nullptr, + marker._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. + bool writeToURL_error_( + NSURL? url, ffi.Pointer> error) { + return _lib._objc_msgSend_109( + _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); } - static NSPurgeableData dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + NSArray keysSortedByValueUsingSelector_(ffi.Pointer comparator) { + final _ret = _lib._objc_msgSend_107( + _id, _lib._sel_keysSortedByValueUsingSelector_1, comparator); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSPurgeableData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + /// count refers to the number of elements in the dictionary + void getObjects_andKeys_count_(ffi.Pointer> objects, + ffi.Pointer> keys, int count) { + return _lib._objc_msgSend_165( + _id, _lib._sel_getObjects_andKeys_count_1, objects, keys, count); } - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + NSObject objectForKeyedSubscript_(NSObject key) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_objectForKeyedSubscript_1, key._id); return NSObject._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_new1); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); + void enumerateKeysAndObjectsUsingBlock_(ObjCBlock10 block) { + return _lib._objc_msgSend_166( + _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); } - static NSPurgeableData alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_alloc1); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); + void enumerateKeysAndObjectsWithOptions_usingBlock_( + int opts, ObjCBlock10 block) { + return _lib._objc_msgSend_167( + _id, + _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, + opts, + block._id); } -} - -/// Mutable Dictionary -class NSMutableDictionary extends NSDictionary { - NSMutableDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. - static NSMutableDictionary castFrom(T other) { - return NSMutableDictionary._(other._id, other._lib, - retain: true, release: true); + NSArray keysSortedByValueUsingComparator_(NSComparator cmptr) { + final _ret = _lib._objc_msgSend_141( + _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. - static NSMutableDictionary castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableDictionary._(other, lib, retain: retain, release: release); + NSArray keysSortedByValueWithOptions_usingComparator_( + int opts, NSComparator cmptr) { + final _ret = _lib._objc_msgSend_142(_id, + _lib._sel_keysSortedByValueWithOptions_usingComparator_1, opts, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSMutableDictionary]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableDictionary1); + NSObject keysOfEntriesPassingTest_(ObjCBlock11 predicate) { + final _ret = _lib._objc_msgSend_168( + _id, _lib._sel_keysOfEntriesPassingTest_1, predicate._id); + return NSObject._(_ret, _lib, retain: true, release: true); } - void removeObjectForKey_(NSObject aKey) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObjectForKey_1, aKey._id); + NSObject keysOfEntriesWithOptions_passingTest_( + int opts, ObjCBlock11 predicate) { + final _ret = _lib._objc_msgSend_169(_id, + _lib._sel_keysOfEntriesWithOptions_passingTest_1, opts, predicate._id); + return NSObject._(_ret, _lib, retain: true, release: true); } - void setObject_forKey_(NSObject anObject, NSObject aKey) { - return _lib._objc_msgSend_306( - _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); - } - - @override - NSMutableDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - NSMutableDictionary initWithCapacity_(int numItems) { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - void addEntriesFromDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_307(_id, _lib._sel_addEntriesFromDictionary_1, - otherDictionary?._id ?? ffi.nullptr); - } - - void removeAllObjects() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } - - void removeObjectsForKeys_(NSArray? keyArray) { - return _lib._objc_msgSend_287( - _id, _lib._sel_removeObjectsForKeys_1, keyArray?._id ?? ffi.nullptr); - } - - void setDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_307( - _id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr); - } - - void setObject_forKeyedSubscript_(NSObject obj, NSObject key) { - return _lib._objc_msgSend_306( - _id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id); - } - - static NSMutableDictionary dictionaryWithCapacity_( - NativeCupertinoHttp _lib, int numItems) { - final _ret = _lib._objc_msgSend_94(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:andKeys:count: + void getObjects_andKeys_(ffi.Pointer> objects, + ffi.Pointer> keys) { + return _lib._objc_msgSend_170( + _id, _lib._sel_getObjects_andKeys_1, objects, keys); } - static NSMutableDictionary dictionaryWithContentsOfFile_( + /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. + static NSDictionary dictionaryWithContentsOfFile_( NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_308(_lib._class_NSMutableDictionary1, + final _ret = _lib._objc_msgSend_171(_lib._class_NSDictionary1, _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithContentsOfURL_( + static NSDictionary dictionaryWithContentsOfURL_( NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_309(_lib._class_NSMutableDictionary1, + final _ret = _lib._objc_msgSend_172(_lib._class_NSDictionary1, _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - NSMutableDictionary initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_308( + NSDictionary initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_171( _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - NSMutableDictionary initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_309( + NSDictionary initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_172( _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - /// Create a mutable dictionary which is optimized for dealing with a known set of keys. - /// Keys that are not in the key set can still be set into the dictionary, but that usage is not optimal. - /// As with any dictionary, the keys must be copyable. - /// If keyset is nil, an exception is thrown. - /// If keyset is not an object returned by +sharedKeySetForKeys:, an exception is thrown. - static NSMutableDictionary dictionaryWithSharedKeySet_( - NativeCupertinoHttp _lib, NSObject keyset) { - final _ret = _lib._objc_msgSend_310(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); } - static NSMutableDictionary dictionary(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + /// the atomically flag is ignored if url of a type that cannot be written atomically. + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); } - static NSMutableDictionary dictionaryWithObject_forKey_( + static NSDictionary dictionary(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + static NSDictionary dictionaryWithObject_forKey_( NativeCupertinoHttp _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_173(_lib._class_NSMutableDictionary1, + final _ret = _lib._objc_msgSend_173(_lib._class_NSDictionary1, _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithObjects_forKeys_count_( + static NSDictionary dictionaryWithObjects_forKeys_count_( NativeCupertinoHttp _lib, ffi.Pointer> objects, ffi.Pointer> keys, int cnt) { - final _ret = _lib._objc_msgSend_93(_lib._class_NSMutableDictionary1, + final _ret = _lib._objc_msgSend_93(_lib._class_NSDictionary1, _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithObjectsAndKeys_( + static NSDictionary dictionaryWithObjectsAndKeys_( NativeCupertinoHttp _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableDictionary1, + final _ret = _lib._objc_msgSend_91(_lib._class_NSDictionary1, _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithDictionary_( + static NSDictionary dictionaryWithDictionary_( NativeCupertinoHttp _lib, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_174(_lib._class_NSMutableDictionary1, + final _ret = _lib._objc_msgSend_174(_lib._class_NSDictionary1, _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithObjects_forKeys_( + static NSDictionary dictionaryWithObjects_forKeys_( NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { final _ret = _lib._objc_msgSend_175( - _lib._class_NSMutableDictionary1, + _lib._class_NSDictionary1, _lib._sel_dictionaryWithObjects_forKeys_1, objects?._id ?? ffi.nullptr, keys?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithDictionary_(NSDictionary? otherDictionary) { + final _ret = _lib._objc_msgSend_174(_id, _lib._sel_initWithDictionary_1, + otherDictionary?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSDictionary initWithDictionary_copyItems_( + NSDictionary? otherDictionary, bool flag) { + final _ret = _lib._objc_msgSend_176( + _id, + _lib._sel_initWithDictionary_copyItems_1, + otherDictionary?._id ?? ffi.nullptr, + flag); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } + + NSDictionary initWithObjects_forKeys_(NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_175( + _id, + _lib._sel_initWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } + + /// Reads dictionary stored in NSPropertyList format from the specified url. + NSDictionary initWithContentsOfURL_error_( + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_177( + _id, + _lib._sel_initWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); } /// Reads dictionary stored in NSPropertyList format from the specified url. @@ -66250,7 +63988,7 @@ class NSMutableDictionary extends NSDictionary { NSURL? url, ffi.Pointer> error) { final _ret = _lib._objc_msgSend_177( - _lib._class_NSMutableDictionary1, + _lib._class_NSDictionary1, _lib._sel_dictionaryWithContentsOfURL_error_1, url?._id ?? ffi.nullptr, error); @@ -66266,23633 +64004,25565 @@ class NSMutableDictionary extends NSDictionary { /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. static NSObject sharedKeySetForKeys_( NativeCupertinoHttp _lib, NSArray? keys) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableDictionary1, + final _ret = _lib._objc_msgSend_100(_lib._class_NSDictionary1, _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); return NSObject._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary new1(NativeCupertinoHttp _lib) { + int countByEnumeratingWithState_objects_count_( + ffi.Pointer state, + ffi.Pointer> buffer, + int len) { + return _lib._objc_msgSend_178( + _id, + _lib._sel_countByEnumeratingWithState_objects_count_1, + state, + buffer, + len); + } + + static NSDictionary new1(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); + return NSDictionary._(_ret, _lib, retain: false, release: true); } - static NSMutableDictionary alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_alloc1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + static NSDictionary alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); + return NSDictionary._(_ret, _lib, retain: false, release: true); } } -class NSNotification extends NSObject { - NSNotification._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSEnumerator extends NSObject { + NSEnumerator._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSNotification] that points to the same underlying object as [other]. - static NSNotification castFrom(T other) { - return NSNotification._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSEnumerator] that points to the same underlying object as [other]. + static NSEnumerator castFrom(T other) { + return NSEnumerator._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSNotification] that wraps the given raw object pointer. - static NSNotification castFromPointer( + /// Returns a [NSEnumerator] that wraps the given raw object pointer. + static NSEnumerator castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSNotification._(other, lib, retain: retain, release: release); + return NSEnumerator._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSNotification]. + /// Returns whether [obj] is an instance of [NSEnumerator]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSNotification1); - } - - NSNotificationName get name { - return _lib._objc_msgSend_32(_id, _lib._sel_name1); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSEnumerator1); } - NSObject get object { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); + NSObject nextObject() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nextObject1); return NSObject._(_ret, _lib, retain: true, release: true); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + NSObject? get allObjects { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSNotification initWithName_object_userInfo_( - NSNotificationName name, NSObject object, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_311( - _id, - _lib._sel_initWithName_object_userInfo_1, - name, - object._id, - userInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); - } - - NSNotification initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); - } - - static NSNotification notificationWithName_object_( - NativeCupertinoHttp _lib, NSNotificationName aName, NSObject anObject) { - final _ret = _lib._objc_msgSend_258(_lib._class_NSNotification1, - _lib._sel_notificationWithName_object_1, aName, anObject._id); - return NSNotification._(_ret, _lib, retain: true, release: true); - } - - static NSNotification notificationWithName_object_userInfo_( - NativeCupertinoHttp _lib, - NSNotificationName aName, - NSObject anObject, - NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_311( - _lib._class_NSNotification1, - _lib._sel_notificationWithName_object_userInfo_1, - aName, - anObject._id, - aUserInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); - } - - @override - NSNotification init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNotification._(_ret, _lib, retain: true, release: true); + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSNotification new1(NativeCupertinoHttp _lib) { + static NSEnumerator new1(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); - return NSNotification._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); + return NSEnumerator._(_ret, _lib, retain: false, release: true); } - static NSNotification alloc(NativeCupertinoHttp _lib) { + static NSEnumerator alloc(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); - return NSNotification._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); + return NSEnumerator._(_ret, _lib, retain: false, release: true); } } -typedef NSNotificationName = ffi.Pointer; - -class NSNotificationCenter extends NSObject { - NSNotificationCenter._(ffi.Pointer id, NativeCupertinoHttp lib, +/// Immutable Array +class NSArray extends NSObject { + NSArray._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSNotificationCenter] that points to the same underlying object as [other]. - static NSNotificationCenter castFrom(T other) { - return NSNotificationCenter._(other._id, other._lib, - retain: true, release: true); + /// Returns a [NSArray] that points to the same underlying object as [other]. + static NSArray castFrom(T other) { + return NSArray._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSNotificationCenter] that wraps the given raw object pointer. - static NSNotificationCenter castFromPointer( + /// Returns a [NSArray] that wraps the given raw object pointer. + static NSArray castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSNotificationCenter._(other, lib, retain: retain, release: release); + return NSArray._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSNotificationCenter]. + /// Returns whether [obj] is an instance of [NSArray]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSNotificationCenter1); - } - - static NSNotificationCenter? getDefaultCenter(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_312( - _lib._class_NSNotificationCenter1, _lib._sel_defaultCenter1); - return _ret.address == 0 - ? null - : NSNotificationCenter._(_ret, _lib, retain: true, release: true); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); } - void addObserver_selector_name_object_( - NSObject observer, - ffi.Pointer aSelector, - NSNotificationName aName, - NSObject anObject) { - return _lib._objc_msgSend_313( - _id, - _lib._sel_addObserver_selector_name_object_1, - observer._id, - aSelector, - aName, - anObject._id); + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - void postNotification_(NSNotification? notification) { - return _lib._objc_msgSend_314( - _id, _lib._sel_postNotification_1, notification?._id ?? ffi.nullptr); + NSObject objectAtIndex_(int index) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndex_1, index); + return NSObject._(_ret, _lib, retain: true, release: true); } - void postNotificationName_object_( - NSNotificationName aName, NSObject anObject) { - return _lib._objc_msgSend_315( - _id, _lib._sel_postNotificationName_object_1, aName, anObject._id); + @override + NSArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSArray._(_ret, _lib, retain: true, release: true); } - void postNotificationName_object_userInfo_( - NSNotificationName aName, NSObject anObject, NSDictionary? aUserInfo) { - return _lib._objc_msgSend_316( - _id, - _lib._sel_postNotificationName_object_userInfo_1, - aName, - anObject._id, - aUserInfo?._id ?? ffi.nullptr); + NSArray initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_95( + _id, _lib._sel_initWithObjects_count_1, objects, cnt); + return NSArray._(_ret, _lib, retain: true, release: true); } - void removeObserver_(NSObject observer) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObserver_1, observer._id); + NSArray initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - void removeObserver_name_object_( - NSObject observer, NSNotificationName aName, NSObject anObject) { - return _lib._objc_msgSend_317(_id, _lib._sel_removeObserver_name_object_1, - observer._id, aName, anObject._id); + NSArray arrayByAddingObject_(NSObject anObject) { + final _ret = _lib._objc_msgSend_96( + _id, _lib._sel_arrayByAddingObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - NSObject addObserverForName_object_queue_usingBlock_(NSNotificationName name, - NSObject obj, NSOperationQueue? queue, ObjCBlock18 block) { - final _ret = _lib._objc_msgSend_346( + NSArray arrayByAddingObjectsFromArray_(NSArray? otherArray) { + final _ret = _lib._objc_msgSend_97( _id, - _lib._sel_addObserverForName_object_queue_usingBlock_1, - name, - obj._id, - queue?._id ?? ffi.nullptr, - block._id); - return NSObject._(_ret, _lib, retain: true, release: true); + _lib._sel_arrayByAddingObjectsFromArray_1, + otherArray?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSNotificationCenter new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotificationCenter1, _lib._sel_new1); - return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + NSString componentsJoinedByString_(NSString? separator) { + final _ret = _lib._objc_msgSend_98(_id, + _lib._sel_componentsJoinedByString_1, separator?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - static NSNotificationCenter alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNotificationCenter1, _lib._sel_alloc1); - return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + bool containsObject_(NSObject anObject) { + return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); } -} -class NSOperationQueue extends NSObject { - NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. - static NSOperationQueue castFrom(T other) { - return NSOperationQueue._(other._id, other._lib, - retain: true, release: true); + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Returns a [NSOperationQueue] that wraps the given raw object pointer. - static NSOperationQueue castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperationQueue._(other, lib, retain: retain, release: release); + NSString descriptionWithLocale_indent_(NSObject locale, int level) { + final _ret = _lib._objc_msgSend_99( + _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); + return NSString._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSOperationQueue]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOperationQueue1); + NSObject firstObjectCommonWithArray_(NSArray? otherArray) { + final _ret = _lib._objc_msgSend_100(_id, + _lib._sel_firstObjectCommonWithArray_1, otherArray?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// @property progress - /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue - /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the - /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the - /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super - /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress - /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% - /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 - /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be - /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by - /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving - /// progress scenario. - /// - /// @example - /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; - /// queue.progress.totalUnitCount = 10; - NSProgress? get progress { - final _ret = _lib._objc_msgSend_318(_id, _lib._sel_progress1); - return _ret.address == 0 - ? null - : NSProgress._(_ret, _lib, retain: true, release: true); + void getObjects_range_( + ffi.Pointer> objects, NSRange range) { + return _lib._objc_msgSend_101( + _id, _lib._sel_getObjects_range_1, objects, range); } - void addOperation_(NSOperation? op) { - return _lib._objc_msgSend_334( - _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); + int indexOfObject_(NSObject anObject) { + return _lib._objc_msgSend_102(_id, _lib._sel_indexOfObject_1, anObject._id); } - void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { - return _lib._objc_msgSend_340( - _id, - _lib._sel_addOperations_waitUntilFinished_1, - ops?._id ?? ffi.nullptr, - wait); + int indexOfObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_103( + _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); } - void addOperationWithBlock_(ObjCBlock16 block) { - return _lib._objc_msgSend_341( - _id, _lib._sel_addOperationWithBlock_1, block._id); + int indexOfObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_102( + _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); } - /// @method addBarrierBlock: - /// @param barrier A block to execute - /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and - /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the - /// `dispatch_barrier_async` function. - void addBarrierBlock_(ObjCBlock16 barrier) { - return _lib._objc_msgSend_341( - _id, _lib._sel_addBarrierBlock_1, barrier._id); + int indexOfObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_103( + _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); } - int get maxConcurrentOperationCount { - return _lib._objc_msgSend_81(_id, _lib._sel_maxConcurrentOperationCount1); + bool isEqualToArray_(NSArray? otherArray) { + return _lib._objc_msgSend_104( + _id, _lib._sel_isEqualToArray_1, otherArray?._id ?? ffi.nullptr); } - set maxConcurrentOperationCount(int value) { - _lib._objc_msgSend_342( - _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + NSObject get firstObject { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_firstObject1); + return NSObject._(_ret, _lib, retain: true, release: true); } - bool get suspended { - return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); + NSObject get lastObject { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_lastObject1); + return NSObject._(_ret, _lib, retain: true, release: true); } - set suspended(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setSuspended_1, value); + NSEnumerator objectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); } - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + NSEnumerator reverseObjectEnumerator() { + final _ret = _lib._objc_msgSend_92(_id, _lib._sel_reverseObjectEnumerator1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + + NSData? get sortedArrayHint { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_sortedArrayHint1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : NSData._(_ret, _lib, retain: true, release: true); } - set name(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + NSArray sortedArrayUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context) { + final _ret = _lib._objc_msgSend_105( + _id, _lib._sel_sortedArrayUsingFunction_context_1, comparator, context); + return NSArray._(_ret, _lib, retain: true, release: true); } - int get qualityOfService { - return _lib._objc_msgSend_338(_id, _lib._sel_qualityOfService1); + NSArray sortedArrayUsingFunction_context_hint_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + NSData? hint) { + final _ret = _lib._objc_msgSend_106( + _id, + _lib._sel_sortedArrayUsingFunction_context_hint_1, + comparator, + context, + hint?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - set qualityOfService(int value) { - _lib._objc_msgSend_339(_id, _lib._sel_setQualityOfService_1, value); + NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { + final _ret = _lib._objc_msgSend_107( + _id, _lib._sel_sortedArrayUsingSelector_1, comparator); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// actually retain - dispatch_queue_t get underlyingQueue { - return _lib._objc_msgSend_343(_id, _lib._sel_underlyingQueue1); + NSArray subarrayWithRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_108(_id, _lib._sel_subarrayWithRange_1, range); + return NSArray._(_ret, _lib, retain: true, release: true); } - /// actually retain - set underlyingQueue(dispatch_queue_t value) { - _lib._objc_msgSend_344(_id, _lib._sel_setUnderlyingQueue_1, value); + /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. + bool writeToURL_error_( + NSURL? url, ffi.Pointer> error) { + return _lib._objc_msgSend_109( + _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); } - void cancelAllOperations() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + void makeObjectsPerformSelector_(ffi.Pointer aSelector) { + return _lib._objc_msgSend_7( + _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); } - void waitUntilAllOperationsAreFinished() { - return _lib._objc_msgSend_1( - _id, _lib._sel_waitUntilAllOperationsAreFinished1); + void makeObjectsPerformSelector_withObject_( + ffi.Pointer aSelector, NSObject argument) { + return _lib._objc_msgSend_110( + _id, + _lib._sel_makeObjectsPerformSelector_withObject_1, + aSelector, + argument._id); } - static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_345( - _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); + NSArray objectsAtIndexes_(NSIndexSet? indexes) { + final _ret = _lib._objc_msgSend_131( + _id, _lib._sel_objectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_345( - _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); + NSObject objectAtIndexedSubscript_(int idx) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndexedSubscript_1, idx); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// These two functions are inherently a race condition and should be avoided if possible - NSArray? get operations { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_operations1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + void enumerateObjectsUsingBlock_(ObjCBlock5 block) { + return _lib._objc_msgSend_132( + _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); } - int get operationCount { - return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); + void enumerateObjectsWithOptions_usingBlock_(int opts, ObjCBlock5 block) { + return _lib._objc_msgSend_133(_id, + _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); } - static NSOperationQueue new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); + void enumerateObjectsAtIndexes_options_usingBlock_( + NSIndexSet? s, int opts, ObjCBlock5 block) { + return _lib._objc_msgSend_134( + _id, + _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, + s?._id ?? ffi.nullptr, + opts, + block._id); } - static NSOperationQueue alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); + int indexOfObjectPassingTest_(ObjCBlock6 predicate) { + return _lib._objc_msgSend_135( + _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); } -} - -class NSProgress extends NSObject { - NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSProgress] that points to the same underlying object as [other]. - static NSProgress castFrom(T other) { - return NSProgress._(other._id, other._lib, retain: true, release: true); + int indexOfObjectWithOptions_passingTest_(int opts, ObjCBlock6 predicate) { + return _lib._objc_msgSend_136(_id, + _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); } - /// Returns a [NSProgress] that wraps the given raw object pointer. - static NSProgress castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProgress._(other, lib, retain: retain, release: release); + int indexOfObjectAtIndexes_options_passingTest_( + NSIndexSet? s, int opts, ObjCBlock6 predicate) { + return _lib._objc_msgSend_137( + _id, + _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, + s?._id ?? ffi.nullptr, + opts, + predicate._id); } - /// Returns whether [obj] is an instance of [NSProgress]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); + NSIndexSet indexesOfObjectsPassingTest_(ObjCBlock6 predicate) { + final _ret = _lib._objc_msgSend_138( + _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - static NSProgress currentProgress(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_318( - _lib._class_NSProgress1, _lib._sel_currentProgress1); - return NSProgress._(_ret, _lib, retain: true, release: true); + NSIndexSet indexesOfObjectsWithOptions_passingTest_( + int opts, ObjCBlock6 predicate) { + final _ret = _lib._objc_msgSend_139( + _id, + _lib._sel_indexesOfObjectsWithOptions_passingTest_1, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - static NSProgress progressWithTotalUnitCount_( - NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_319(_lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( + NSIndexSet? s, int opts, ObjCBlock6 predicate) { + final _ret = _lib._objc_msgSend_140( + _id, + _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, + s?._id ?? ffi.nullptr, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - static NSProgress discreteProgressWithTotalUnitCount_( - NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_319(_lib._class_NSProgress1, - _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + NSArray sortedArrayUsingComparator_(NSComparator cmptr) { + final _ret = _lib._objc_msgSend_141( + _id, _lib._sel_sortedArrayUsingComparator_1, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( - NativeCupertinoHttp _lib, - int unitCount, - NSProgress? parent, - int portionOfParentTotalUnitCount) { - final _ret = _lib._objc_msgSend_320( - _lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, - unitCount, - parent?._id ?? ffi.nullptr, - portionOfParentTotalUnitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + NSArray sortedArrayWithOptions_usingComparator_( + int opts, NSComparator cmptr) { + final _ret = _lib._objc_msgSend_142( + _id, _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - NSProgress initWithParent_userInfo_( - NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { - final _ret = _lib._objc_msgSend_321( + /// binary search + int indexOfObject_inSortedRange_options_usingComparator_( + NSObject obj, NSRange r, int opts, NSComparator cmp) { + return _lib._objc_msgSend_143( _id, - _lib._sel_initWithParent_userInfo_1, - parentProgressOrNil?._id ?? ffi.nullptr, - userInfoOrNil?._id ?? ffi.nullptr); - return NSProgress._(_ret, _lib, retain: true, release: true); + _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, + obj._id, + r, + opts, + cmp); } - void becomeCurrentWithPendingUnitCount_(int unitCount) { - return _lib._objc_msgSend_322( - _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + static NSArray array(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); + return NSArray._(_ret, _lib, retain: true, release: true); } - void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock16 work) { - return _lib._objc_msgSend_323( - _id, - _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, - unitCount, - work._id); + static NSArray arrayWithObject_(NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - void resignCurrent() { - return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + static NSArray arrayWithObjects_count_(NativeCupertinoHttp _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_95( + _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); + return NSArray._(_ret, _lib, retain: true, release: true); } - void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { - return _lib._objc_msgSend_324( - _id, - _lib._sel_addChild_withPendingUnitCount_1, - child?._id ?? ffi.nullptr, - inUnitCount); + static NSArray arrayWithObjects_( + NativeCupertinoHttp _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - int get totalUnitCount { - return _lib._objc_msgSend_325(_id, _lib._sel_totalUnitCount1); + static NSArray arrayWithArray_(NativeCupertinoHttp _lib, NSArray? array) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSArray1, + _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - set totalUnitCount(int value) { - _lib._objc_msgSend_326(_id, _lib._sel_setTotalUnitCount_1, value); + NSArray initWithObjects_(NSObject firstObj) { + final _ret = + _lib._objc_msgSend_91(_id, _lib._sel_initWithObjects_1, firstObj._id); + return NSArray._(_ret, _lib, retain: true, release: true); } - int get completedUnitCount { - return _lib._objc_msgSend_325(_id, _lib._sel_completedUnitCount1); + NSArray initWithArray_(NSArray? array) { + final _ret = _lib._objc_msgSend_100( + _id, _lib._sel_initWithArray_1, array?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - set completedUnitCount(int value) { - _lib._objc_msgSend_326(_id, _lib._sel_setCompletedUnitCount_1, value); + NSArray initWithArray_copyItems_(NSArray? array, bool flag) { + final _ret = _lib._objc_msgSend_144(_id, + _lib._sel_initWithArray_copyItems_1, array?._id ?? ffi.nullptr, flag); + return NSArray._(_ret, _lib, retain: false, release: true); } - NSString? get localizedDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Reads array stored in NSPropertyList format from the specified url. + NSArray initWithContentsOfURL_error_( + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_145( + _id, + _lib._sel_initWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); } - set localizedDescription(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); + /// Reads array stored in NSPropertyList format from the specified url. + static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_145( + _lib._class_NSArray1, + _lib._sel_arrayWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); } - NSString? get localizedAdditionalDescription { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedAdditionalDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + NSOrderedCollectionDifference + differenceFromArray_withOptions_usingEquivalenceTest_( + NSArray? other, int options, ObjCBlock9 block) { + final _ret = _lib._objc_msgSend_154( + _id, + _lib._sel_differenceFromArray_withOptions_usingEquivalenceTest_1, + other?._id ?? ffi.nullptr, + options, + block._id); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - set localizedAdditionalDescription(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setLocalizedAdditionalDescription_1, - value?._id ?? ffi.nullptr); + NSOrderedCollectionDifference differenceFromArray_withOptions_( + NSArray? other, int options) { + final _ret = _lib._objc_msgSend_155( + _id, + _lib._sel_differenceFromArray_withOptions_1, + other?._id ?? ffi.nullptr, + options); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - bool get cancellable { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); + /// Uses isEqual: to determine the difference between the parameter and the receiver + NSOrderedCollectionDifference differenceFromArray_(NSArray? other) { + final _ret = _lib._objc_msgSend_156( + _id, _lib._sel_differenceFromArray_1, other?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - set cancellable(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setCancellable_1, value); + NSArray arrayByApplyingDifference_( + NSOrderedCollectionDifference? difference) { + final _ret = _lib._objc_msgSend_157(_id, + _lib._sel_arrayByApplyingDifference_1, difference?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - bool get pausable { - return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); + /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead. + void getObjects_(ffi.Pointer> objects) { + return _lib._objc_msgSend_158(_id, _lib._sel_getObjects_1, objects); } - set pausable(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setPausable_1, value); + /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. + static NSArray arrayWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_159(_lib._class_NSArray1, + _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + static NSArray arrayWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_160(_lib._class_NSArray1, + _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - bool get paused { - return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); + NSArray initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_159( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - ObjCBlock16 get cancellationHandler { - final _ret = _lib._objc_msgSend_329(_id, _lib._sel_cancellationHandler1); - return ObjCBlock16._(_ret, _lib); + NSArray initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_160( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); } - set cancellationHandler(ObjCBlock16 value) { - _lib._objc_msgSend_330(_id, _lib._sel_setCancellationHandler_1, value._id); + bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, + path?._id ?? ffi.nullptr, useAuxiliaryFile); } - ObjCBlock16 get pausingHandler { - final _ret = _lib._objc_msgSend_329(_id, _lib._sel_pausingHandler1); - return ObjCBlock16._(_ret, _lib); + bool writeToURL_atomically_(NSURL? url, bool atomically) { + return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, + url?._id ?? ffi.nullptr, atomically); } - set pausingHandler(ObjCBlock16 value) { - _lib._objc_msgSend_330(_id, _lib._sel_setPausingHandler_1, value._id); + static NSArray new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); + return NSArray._(_ret, _lib, retain: false, release: true); } - ObjCBlock16 get resumingHandler { - final _ret = _lib._objc_msgSend_329(_id, _lib._sel_resumingHandler1); - return ObjCBlock16._(_ret, _lib); + static NSArray alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); + return NSArray._(_ret, _lib, retain: false, release: true); } +} - set resumingHandler(ObjCBlock16 value) { - _lib._objc_msgSend_330(_id, _lib._sel_setResumingHandler_1, value._id); - } +class NSIndexSet extends NSObject { + NSIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - void setUserInfoObject_forKey_( - NSObject objectOrNil, NSProgressUserInfoKey key) { - return _lib._objc_msgSend_189( - _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); + /// Returns a [NSIndexSet] that points to the same underlying object as [other]. + static NSIndexSet castFrom(T other) { + return NSIndexSet._(other._id, other._lib, retain: true, release: true); } - bool get indeterminate { - return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); + /// Returns a [NSIndexSet] that wraps the given raw object pointer. + static NSIndexSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSIndexSet._(other, lib, retain: retain, release: release); } - double get fractionCompleted { - return _lib._objc_msgSend_85(_id, _lib._sel_fractionCompleted1); + /// Returns whether [obj] is an instance of [NSIndexSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); } - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + static NSIndexSet indexSet(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + static NSIndexSet indexSetWithIndex_(NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - void pause() { - return _lib._objc_msgSend_1(_id, _lib._sel_pause1); + static NSIndexSet indexSetWithIndexesInRange_( + NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_111( + _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + NSIndexSet initWithIndexesInRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_111(_id, _lib._sel_initWithIndexesInRange_1, range); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + NSIndexSet initWithIndexSet_(NSIndexSet? indexSet) { + final _ret = _lib._objc_msgSend_112( + _id, _lib._sel_initWithIndexSet_1, indexSet?._id ?? ffi.nullptr); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - NSProgressKind get kind { - return _lib._objc_msgSend_32(_id, _lib._sel_kind1); + NSIndexSet initWithIndex_(int value) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithIndex_1, value); + return NSIndexSet._(_ret, _lib, retain: true, release: true); } - set kind(NSProgressKind value) { - _lib._objc_msgSend_327(_id, _lib._sel_setKind_1, value); + bool isEqualToIndexSet_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_113( + _id, _lib._sel_isEqualToIndexSet_1, indexSet?._id ?? ffi.nullptr); } - NSNumber? get estimatedTimeRemaining { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_estimatedTimeRemaining1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + int get count { + return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - set estimatedTimeRemaining(NSNumber? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + int get firstIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); } - NSNumber? get throughput { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_throughput1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + int get lastIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); } - set throughput(NSNumber? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + int indexGreaterThanIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexGreaterThanIndex_1, value); } - NSProgressFileOperationKind get fileOperationKind { - return _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); + int indexLessThanIndex_(int value) { + return _lib._objc_msgSend_114(_id, _lib._sel_indexLessThanIndex_1, value); } - set fileOperationKind(NSProgressFileOperationKind value) { - _lib._objc_msgSend_327(_id, _lib._sel_setFileOperationKind_1, value); + int indexGreaterThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); } - NSURL? get fileURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + int indexLessThanOrEqualToIndex_(int value) { + return _lib._objc_msgSend_114( + _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); } - set fileURL(NSURL? value) { - _lib._objc_msgSend_332( - _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + int getIndexes_maxCount_inIndexRange_(ffi.Pointer indexBuffer, + int bufferSize, NSRangePointer range) { + return _lib._objc_msgSend_115( + _id, + _lib._sel_getIndexes_maxCount_inIndexRange_1, + indexBuffer, + bufferSize, + range); } - NSNumber? get fileTotalCount { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileTotalCount1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + int countOfIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_116( + _id, _lib._sel_countOfIndexesInRange_1, range); } - set fileTotalCount(NSNumber? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + bool containsIndex_(int value) { + return _lib._objc_msgSend_117(_id, _lib._sel_containsIndex_1, value); } - NSNumber? get fileCompletedCount { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileCompletedCount1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + bool containsIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_118( + _id, _lib._sel_containsIndexesInRange_1, range); } - set fileCompletedCount(NSNumber? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); + bool containsIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_113( + _id, _lib._sel_containsIndexes_1, indexSet?._id ?? ffi.nullptr); } - void publish() { - return _lib._objc_msgSend_1(_id, _lib._sel_publish1); + bool intersectsIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_118( + _id, _lib._sel_intersectsIndexesInRange_1, range); } - void unpublish() { - return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + void enumerateIndexesUsingBlock_(ObjCBlock2 block) { + return _lib._objc_msgSend_119( + _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); } - static NSObject addSubscriberForFileURL_withPublishingHandler_( - NativeCupertinoHttp _lib, - NSURL? url, - NSProgressPublishingHandler publishingHandler) { - final _ret = _lib._objc_msgSend_333( - _lib._class_NSProgress1, - _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, - url?._id ?? ffi.nullptr, - publishingHandler); - return NSObject._(_ret, _lib, retain: true, release: true); + void enumerateIndexesWithOptions_usingBlock_(int opts, ObjCBlock2 block) { + return _lib._objc_msgSend_120(_id, + _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); } - static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { - return _lib._objc_msgSend_200( - _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + void enumerateIndexesInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock2 block) { + return _lib._objc_msgSend_121( + _id, + _lib._sel_enumerateIndexesInRange_options_usingBlock_1, + range, + opts, + block._id); } - bool get old { - return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); + int indexPassingTest_(ObjCBlock3 predicate) { + return _lib._objc_msgSend_122( + _id, _lib._sel_indexPassingTest_1, predicate._id); } - static NSProgress new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); - return NSProgress._(_ret, _lib, retain: false, release: true); + int indexWithOptions_passingTest_(int opts, ObjCBlock3 predicate) { + return _lib._objc_msgSend_123( + _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); } - static NSProgress alloc(NativeCupertinoHttp _lib) { + int indexInRange_options_passingTest_( + NSRange range, int opts, ObjCBlock3 predicate) { + return _lib._objc_msgSend_124( + _id, + _lib._sel_indexInRange_options_passingTest_1, + range, + opts, + predicate._id); + } + + NSIndexSet indexesPassingTest_(ObjCBlock3 predicate) { + final _ret = _lib._objc_msgSend_125( + _id, _lib._sel_indexesPassingTest_1, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesWithOptions_passingTest_(int opts, ObjCBlock3 predicate) { + final _ret = _lib._objc_msgSend_126( + _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + NSIndexSet indexesInRange_options_passingTest_( + NSRange range, int opts, ObjCBlock3 predicate) { + final _ret = _lib._objc_msgSend_127( + _id, + _lib._sel_indexesInRange_options_passingTest_1, + range, + opts, + predicate._id); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + + void enumerateRangesUsingBlock_(ObjCBlock4 block) { + return _lib._objc_msgSend_128( + _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); + } + + void enumerateRangesWithOptions_usingBlock_(int opts, ObjCBlock4 block) { + return _lib._objc_msgSend_129(_id, + _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); + } + + void enumerateRangesInRange_options_usingBlock_( + NSRange range, int opts, ObjCBlock4 block) { + return _lib._objc_msgSend_130( + _id, + _lib._sel_enumerateRangesInRange_options_usingBlock_1, + range, + opts, + block._id); + } + + static NSIndexSet new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); + return NSIndexSet._(_ret, _lib, retain: false, release: true); + } + + static NSIndexSet alloc(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); - return NSProgress._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); + return NSIndexSet._(_ret, _lib, retain: false, release: true); } } -void _ObjCBlock16_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block) { +typedef NSRangePointer = ffi.Pointer; +void _ObjCBlock2_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { return block.ref.target - .cast>() - .asFunction()(); + .cast< + ffi.NativeFunction< + ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); } -final _ObjCBlock16_closureRegistry = {}; -int _ObjCBlock16_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock16_registerClosure(Function fn) { - final id = ++_ObjCBlock16_closureRegistryIndex; - _ObjCBlock16_closureRegistry[id] = fn; +final _ObjCBlock2_closureRegistry = {}; +int _ObjCBlock2_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock2_registerClosure(Function fn) { + final id = ++_ObjCBlock2_closureRegistryIndex; + _ObjCBlock2_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock16_closureTrampoline(ffi.Pointer<_ObjCBlock> block) { - return _ObjCBlock16_closureRegistry[block.ref.target.address]!(); +void _ObjCBlock2_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return _ObjCBlock2_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock16 extends _ObjCBlockBase { - ObjCBlock16._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock2 extends _ObjCBlockBase { + ObjCBlock2._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock16.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) + ObjCBlock2.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + NSUInteger arg0, ffi.Pointer arg1)>> + ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( - _ObjCBlock16_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock2_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock16.fromFunction(NativeCupertinoHttp lib, void Function() fn) + ObjCBlock2.fromFunction(NativeCupertinoHttp lib, + void Function(int arg0, ffi.Pointer arg1) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( - _ObjCBlock16_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock2_closureTrampoline) .cast(), - _ObjCBlock16_registerClosure(fn)), + _ObjCBlock2_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call() { + void call(int arg0, ffi.Pointer arg1) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() - .asFunction block)>()(_id); + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, int arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } +} - ffi.Pointer<_ObjCBlock> get pointer => _id; +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; } -typedef NSProgressUserInfoKey = ffi.Pointer; -typedef NSProgressKind = ffi.Pointer; -typedef NSProgressFileOperationKind = ffi.Pointer; -typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; -NSProgressUnpublishingHandler _ObjCBlock17_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { +bool _ObjCBlock3_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { return block.ref.target .cast< ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>>() + ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1)>>() .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>()(arg0); + bool Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); } -final _ObjCBlock17_closureRegistry = {}; -int _ObjCBlock17_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock17_registerClosure(Function fn) { - final id = ++_ObjCBlock17_closureRegistryIndex; - _ObjCBlock17_closureRegistry[id] = fn; +final _ObjCBlock3_closureRegistry = {}; +int _ObjCBlock3_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock3_registerClosure(Function fn) { + final id = ++_ObjCBlock3_closureRegistryIndex; + _ObjCBlock3_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -NSProgressUnpublishingHandler _ObjCBlock17_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock17_closureRegistry[block.ref.target.address]!(arg0); +bool _ObjCBlock3_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { + return _ObjCBlock3_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock17 extends _ObjCBlockBase { - ObjCBlock17._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock3 extends _ObjCBlockBase { + ObjCBlock3._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock17.fromFunctionPointer( + ObjCBlock3.fromFunctionPointer( NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>> + ffi.Pointer arg1)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock17_fnPtrTrampoline) + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock3_fnPtrTrampoline, false) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock17.fromFunction(NativeCupertinoHttp lib, - NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) + ObjCBlock3.fromFunction(NativeCupertinoHttp lib, + bool Function(int arg0, ffi.Pointer arg1) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock17_closureTrampoline) + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>( + _ObjCBlock3_closureTrampoline, false) .cast(), - _ObjCBlock17_registerClosure(fn)), + _ObjCBlock3_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - NSProgressUnpublishingHandler call(ffi.Pointer arg0) { + bool call(int arg0, ffi.Pointer arg1) { return _id.ref.invoke .cast< ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, + NSUInteger arg0, ffi.Pointer arg1)>>() .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); + bool Function(ffi.Pointer<_ObjCBlock> block, int arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } - - ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; - -class NSOperation extends NSObject { - NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSOperation] that points to the same underlying object as [other]. - static NSOperation castFrom(T other) { - return NSOperation._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSOperation] that wraps the given raw object pointer. - static NSOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperation._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); - } - - void start() { - return _lib._objc_msgSend_1(_id, _lib._sel_start1); - } - - void main() { - return _lib._objc_msgSend_1(_id, _lib._sel_main1); - } - - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); - } - - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } - - bool get executing { - return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); - } - - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); - } - - /// To be deprecated; use and override 'asynchronous' below - bool get concurrent { - return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); - } - - bool get asynchronous { - return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); - } - - bool get ready { - return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); - } - - void addDependency_(NSOperation? op) { - return _lib._objc_msgSend_334( - _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); - } - - void removeDependency_(NSOperation? op) { - return _lib._objc_msgSend_334( - _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); - } - - NSArray? get dependencies { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_dependencies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - int get queuePriority { - return _lib._objc_msgSend_335(_id, _lib._sel_queuePriority1); - } - - set queuePriority(int value) { - _lib._objc_msgSend_336(_id, _lib._sel_setQueuePriority_1, value); - } - - ObjCBlock16 get completionBlock { - final _ret = _lib._objc_msgSend_329(_id, _lib._sel_completionBlock1); - return ObjCBlock16._(_ret, _lib); - } - - set completionBlock(ObjCBlock16 value) { - _lib._objc_msgSend_330(_id, _lib._sel_setCompletionBlock_1, value._id); - } - - void waitUntilFinished() { - return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); - } - - double get threadPriority { - return _lib._objc_msgSend_85(_id, _lib._sel_threadPriority1); - } - - set threadPriority(double value) { - _lib._objc_msgSend_337(_id, _lib._sel_setThreadPriority_1, value); - } - - int get qualityOfService { - return _lib._objc_msgSend_338(_id, _lib._sel_qualityOfService1); - } +void _ObjCBlock4_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function( + NSRange arg0, ffi.Pointer arg1)>()(arg0, arg1); +} - set qualityOfService(int value) { - _lib._objc_msgSend_339(_id, _lib._sel_setQualityOfService_1, value); - } +final _ObjCBlock4_closureRegistry = {}; +int _ObjCBlock4_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock4_registerClosure(Function fn) { + final id = ++_ObjCBlock4_closureRegistryIndex; + _ObjCBlock4_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock4_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { + return _ObjCBlock4_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - set name(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); - } +class ObjCBlock4 extends _ObjCBlockBase { + ObjCBlock4._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - static NSOperation new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); - return NSOperation._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock4.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSRange arg0, ffi.Pointer arg1)>( + _ObjCBlock4_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - static NSOperation alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); - return NSOperation._(_ret, _lib, retain: false, release: true); + /// Creates a block from a Dart function. + ObjCBlock4.fromFunction(NativeCupertinoHttp lib, + void Function(NSRange arg0, ffi.Pointer arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + NSRange arg0, ffi.Pointer arg1)>( + _ObjCBlock4_closureTrampoline) + .cast(), + _ObjCBlock4_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(NSRange arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } } -abstract class NSOperationQueuePriority { - static const int NSOperationQueuePriorityVeryLow = -8; - static const int NSOperationQueuePriorityLow = -4; - static const int NSOperationQueuePriorityNormal = 0; - static const int NSOperationQueuePriorityHigh = 4; - static const int NSOperationQueuePriorityVeryHigh = 8; -} - -typedef dispatch_queue_t = ffi.Pointer; -void _ObjCBlock18_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { +void _ObjCBlock5_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { return block.ref.target .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); } -final _ObjCBlock18_closureRegistry = {}; -int _ObjCBlock18_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock18_registerClosure(Function fn) { - final id = ++_ObjCBlock18_closureRegistryIndex; - _ObjCBlock18_closureRegistry[id] = fn; +final _ObjCBlock5_closureRegistry = {}; +int _ObjCBlock5_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock5_registerClosure(Function fn) { + final id = ++_ObjCBlock5_closureRegistryIndex; + _ObjCBlock5_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock18_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock18_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock5_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _ObjCBlock5_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); } -class ObjCBlock18 extends _ObjCBlockBase { - ObjCBlock18._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock5 extends _ObjCBlockBase { + ObjCBlock5._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock18.fromFunctionPointer( + ObjCBlock5.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi.Void Function(ffi.Pointer arg0, + NSUInteger arg1, ffi.Pointer arg2)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock18_fnPtrTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock5_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock18.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + ObjCBlock5.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) + fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock18_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock5_closureTrampoline) .cast(), - _ObjCBlock18_registerClosure(fn)), + _ObjCBlock5_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { + void call( + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); } +} - ffi.Pointer<_ObjCBlock> get pointer => _id; +bool _ObjCBlock6_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); } -class NSDate extends NSObject { - NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final _ObjCBlock6_closureRegistry = {}; +int _ObjCBlock6_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock6_registerClosure(Function fn) { + final id = ++_ObjCBlock6_closureRegistryIndex; + _ObjCBlock6_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns a [NSDate] that points to the same underlying object as [other]. - static NSDate castFrom(T other) { - return NSDate._(other._id, other._lib, retain: true, release: true); - } +bool _ObjCBlock6_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _ObjCBlock6_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - /// Returns a [NSDate] that wraps the given raw object pointer. - static NSDate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDate._(other, lib, retain: retain, release: release); +class ObjCBlock6 extends _ObjCBlockBase { + ObjCBlock6._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock6.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + NSUInteger arg1, ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock6_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock6.fromFunction( + NativeCupertinoHttp lib, + bool Function(ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock6_closureTrampoline, false) + .cast(), + _ObjCBlock6_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call( + ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); } +} - /// Returns whether [obj] is an instance of [NSDate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); +typedef NSComparator = ffi.Pointer<_ObjCBlock>; +int _ObjCBlock7_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock7_closureRegistry = {}; +int _ObjCBlock7_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock7_registerClosure(Function fn) { + final id = ++_ObjCBlock7_closureRegistryIndex; + _ObjCBlock7_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +int _ObjCBlock7_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock7_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock7 extends _ObjCBlockBase { + ObjCBlock7._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock7.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock7_fnPtrTrampoline, 0) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock7.fromFunction( + NativeCupertinoHttp lib, + int Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock7_closureTrampoline, 0) + .cast(), + _ObjCBlock7_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + int call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); } +} - double get timeIntervalSinceReferenceDate { - return _lib._objc_msgSend_85( - _id, _lib._sel_timeIntervalSinceReferenceDate1); +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; +} + +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; +} + +class NSOrderedCollectionDifference extends NSObject { + NSOrderedCollectionDifference._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOrderedCollectionDifference] that points to the same underlying object as [other]. + static NSOrderedCollectionDifference castFrom( + T other) { + return NSOrderedCollectionDifference._(other._id, other._lib, + retain: true, release: true); } - @override - NSDate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDate._(_ret, _lib, retain: true, release: true); + /// Returns a [NSOrderedCollectionDifference] that wraps the given raw object pointer. + static NSOrderedCollectionDifference castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOrderedCollectionDifference._(other, lib, + retain: retain, release: release); } - NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _lib._objc_msgSend_347( - _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSOrderedCollectionDifference]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOrderedCollectionDifference1); } - NSDate initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); + NSOrderedCollectionDifference initWithChanges_(NSObject? changes) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_initWithChanges_1, changes?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - double timeIntervalSinceDate_(NSDate? anotherDate) { - return _lib._objc_msgSend_348(_id, _lib._sel_timeIntervalSinceDate_1, - anotherDate?._id ?? ffi.nullptr); + NSOrderedCollectionDifference + initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_( + NSIndexSet? inserts, + NSObject? insertedObjects, + NSIndexSet? removes, + NSObject? removedObjects, + NSObject? changes) { + final _ret = _lib._objc_msgSend_146( + _id, + _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1, + inserts?._id ?? ffi.nullptr, + insertedObjects?._id ?? ffi.nullptr, + removes?._id ?? ffi.nullptr, + removedObjects?._id ?? ffi.nullptr, + changes?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - double get timeIntervalSinceNow { - return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSinceNow1); + NSOrderedCollectionDifference + initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_( + NSIndexSet? inserts, + NSObject? insertedObjects, + NSIndexSet? removes, + NSObject? removedObjects) { + final _ret = _lib._objc_msgSend_147( + _id, + _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1, + inserts?._id ?? ffi.nullptr, + insertedObjects?._id ?? ffi.nullptr, + removes?._id ?? ffi.nullptr, + removedObjects?._id ?? ffi.nullptr); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - double get timeIntervalSince1970 { - return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSince19701); + NSObject? get insertions { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_insertions1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - NSObject addTimeInterval_(double seconds) { - final _ret = - _lib._objc_msgSend_347(_id, _lib._sel_addTimeInterval_1, seconds); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? get removals { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_removals1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - NSDate dateByAddingTimeInterval_(double ti) { - final _ret = - _lib._objc_msgSend_347(_id, _lib._sel_dateByAddingTimeInterval_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); + bool get hasChanges { + return _lib._objc_msgSend_11(_id, _lib._sel_hasChanges1); } - NSDate earlierDate_(NSDate? anotherDate) { - final _ret = _lib._objc_msgSend_349( - _id, _lib._sel_earlierDate_1, anotherDate?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); + NSOrderedCollectionDifference differenceByTransformingChangesWithBlock_( + ObjCBlock8 block) { + final _ret = _lib._objc_msgSend_153( + _id, _lib._sel_differenceByTransformingChangesWithBlock_1, block._id); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - NSDate laterDate_(NSDate? anotherDate) { - final _ret = _lib._objc_msgSend_349( - _id, _lib._sel_laterDate_1, anotherDate?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); + NSOrderedCollectionDifference inverseDifference() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_inverseDifference1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); } - int compare_(NSDate? other) { - return _lib._objc_msgSend_350( - _id, _lib._sel_compare_1, other?._id ?? ffi.nullptr); + static NSOrderedCollectionDifference new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionDifference1, _lib._sel_new1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: false, release: true); } - bool isEqualToDate_(NSDate? otherDate) { - return _lib._objc_msgSend_351( - _id, _lib._sel_isEqualToDate_1, otherDate?._id ?? ffi.nullptr); + static NSOrderedCollectionDifference alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionDifference1, _lib._sel_alloc1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: false, release: true); } +} - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); +ffi.Pointer _ObjCBlock8_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>()(arg0); +} + +final _ObjCBlock8_closureRegistry = {}; +int _ObjCBlock8_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock8_registerClosure(Function fn) { + final id = ++_ObjCBlock8_closureRegistryIndex; + _ObjCBlock8_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer _ObjCBlock8_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock8_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock8 extends _ObjCBlockBase { + ObjCBlock8._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock8.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock8_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock8.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock8_closureTrampoline) + .cast(), + _ObjCBlock8_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); } +} - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); +class NSOrderedCollectionChange extends NSObject { + NSOrderedCollectionChange._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOrderedCollectionChange] that points to the same underlying object as [other]. + static NSOrderedCollectionChange castFrom(T other) { + return NSOrderedCollectionChange._(other._id, other._lib, + retain: true, release: true); } - static NSDate date(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); - return NSDate._(_ret, _lib, retain: true, release: true); + /// Returns a [NSOrderedCollectionChange] that wraps the given raw object pointer. + static NSOrderedCollectionChange castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOrderedCollectionChange._(other, lib, + retain: retain, release: release); } - static NSDate dateWithTimeIntervalSinceNow_( - NativeCupertinoHttp _lib, double secs) { - final _ret = _lib._objc_msgSend_347( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSOrderedCollectionChange]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOrderedCollectionChange1); } - static NSDate dateWithTimeIntervalSinceReferenceDate_( - NativeCupertinoHttp _lib, double ti) { - final _ret = _lib._objc_msgSend_347(_lib._class_NSDate1, - _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); + static NSOrderedCollectionChange changeWithObject_type_index_( + NativeCupertinoHttp _lib, NSObject anObject, int type, int index) { + final _ret = _lib._objc_msgSend_148(_lib._class_NSOrderedCollectionChange1, + _lib._sel_changeWithObject_type_index_1, anObject._id, type, index); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); } - static NSDate dateWithTimeIntervalSince1970_( - NativeCupertinoHttp _lib, double secs) { - final _ret = _lib._objc_msgSend_347( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); + static NSOrderedCollectionChange changeWithObject_type_index_associatedIndex_( + NativeCupertinoHttp _lib, + NSObject anObject, + int type, + int index, + int associatedIndex) { + final _ret = _lib._objc_msgSend_149( + _lib._class_NSOrderedCollectionChange1, + _lib._sel_changeWithObject_type_index_associatedIndex_1, + anObject._id, + type, + index, + associatedIndex); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); } - static NSDate dateWithTimeInterval_sinceDate_( - NativeCupertinoHttp _lib, double secsToBeAdded, NSDate? date) { - final _ret = _lib._objc_msgSend_352( - _lib._class_NSDate1, - _lib._sel_dateWithTimeInterval_sinceDate_1, - secsToBeAdded, - date?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); + NSObject get object { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSDate? getDistantFuture(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_353(_lib._class_NSDate1, _lib._sel_distantFuture1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + int get changeType { + return _lib._objc_msgSend_150(_id, _lib._sel_changeType1); } - static NSDate? getDistantPast(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_353(_lib._class_NSDate1, _lib._sel_distantPast1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + int get index { + return _lib._objc_msgSend_12(_id, _lib._sel_index1); } - static NSDate? getNow(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_353(_lib._class_NSDate1, _lib._sel_now1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + int get associatedIndex { + return _lib._objc_msgSend_12(_id, _lib._sel_associatedIndex1); } - NSDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _lib._objc_msgSend_347( - _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); + @override + NSObject init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _lib._objc_msgSend_347( - _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); + NSOrderedCollectionChange initWithObject_type_index_( + NSObject anObject, int type, int index) { + final _ret = _lib._objc_msgSend_151( + _id, _lib._sel_initWithObject_type_index_1, anObject._id, type, index); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); } - NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate? date) { - final _ret = _lib._objc_msgSend_352( + NSOrderedCollectionChange initWithObject_type_index_associatedIndex_( + NSObject anObject, int type, int index, int associatedIndex) { + final _ret = _lib._objc_msgSend_152( _id, - _lib._sel_initWithTimeInterval_sinceDate_1, - secsToBeAdded, - date?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); + _lib._sel_initWithObject_type_index_associatedIndex_1, + anObject._id, + type, + index, + associatedIndex); + return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); } - static NSDate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); - return NSDate._(_ret, _lib, retain: false, release: true); + static NSOrderedCollectionChange new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionChange1, _lib._sel_new1); + return NSOrderedCollectionChange._(_ret, _lib, + retain: false, release: true); } - static NSDate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); - return NSDate._(_ret, _lib, retain: false, release: true); + static NSOrderedCollectionChange alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOrderedCollectionChange1, _lib._sel_alloc1); + return NSOrderedCollectionChange._(_ret, _lib, + retain: false, release: true); } } -typedef NSTimeInterval = ffi.Double; +abstract class NSCollectionChangeType { + static const int NSCollectionChangeInsert = 0; + static const int NSCollectionChangeRemove = 1; +} -/// ! -/// @enum NSURLRequestCachePolicy -/// -/// @discussion The NSURLRequestCachePolicy enum defines constants that -/// can be used to specify the type of interactions that take place with -/// the caching system when the URL loading system processes a request. -/// Specifically, these constants cover interactions that have to do -/// with whether already-existing cache data is returned to satisfy a -/// URL load request. -/// -/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the -/// caching logic defined in the protocol implementation, if any, is -/// used for a particular URL load request. This is the default policy -/// for URL load requests. -/// -/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the -/// data for the URL load should be loaded from the origin source. No -/// existing local cache data, regardless of its freshness or validity, -/// should be used to satisfy a URL load request. -/// -/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that -/// not only should the local cache data be ignored, but that proxies and -/// other intermediates should be instructed to disregard their caches -/// so far as the protocol allows. -/// -/// @constant NSURLRequestReloadIgnoringCacheData Older name for -/// NSURLRequestReloadIgnoringLocalCacheData. -/// -/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the -/// existing cache data should be used to satisfy a URL load request, -/// regardless of its age or expiration date. However, if there is no -/// existing data in the cache corresponding to a URL load request, -/// the URL is loaded from the origin source. -/// -/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the -/// existing cache data should be used to satisfy a URL load request, -/// regardless of its age or expiration date. However, if there is no -/// existing data in the cache corresponding to a URL load request, no -/// attempt is made to load the URL from the origin source, and the -/// load is considered to have failed. This constant specifies a -/// behavior that is similar to an "offline" mode. -/// -/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that -/// the existing cache data may be used provided the origin source -/// confirms its validity, otherwise the URL is loaded from the -/// origin source. -abstract class NSURLRequestCachePolicy { - static const int NSURLRequestUseProtocolCachePolicy = 0; - static const int NSURLRequestReloadIgnoringLocalCacheData = 1; - static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; - static const int NSURLRequestReloadIgnoringCacheData = 1; - static const int NSURLRequestReturnCacheDataElseLoad = 2; - static const int NSURLRequestReturnCacheDataDontLoad = 3; - static const int NSURLRequestReloadRevalidatingCacheData = 5; -} - -/// ! -/// @enum NSURLRequestNetworkServiceType -/// -/// @discussion The NSURLRequestNetworkServiceType enum defines constants that -/// can be used to specify the service type to associate with this request. The -/// service type is used to provide the networking layers a hint of the purpose -/// of the request. -/// -/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest -/// when created. This value should be left unchanged for the vast majority of requests. -/// -/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP -/// control traffic. -/// -/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video -/// traffic. -/// -/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background -/// traffic (such as a file download). -/// -/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. -/// -/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. -/// -/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. -/// -/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. -/// -/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. -abstract class NSURLRequestNetworkServiceType { - /// Standard internet traffic - static const int NSURLNetworkServiceTypeDefault = 0; - - /// Voice over IP control traffic - static const int NSURLNetworkServiceTypeVoIP = 1; - - /// Video traffic - static const int NSURLNetworkServiceTypeVideo = 2; - - /// Background traffic - static const int NSURLNetworkServiceTypeBackground = 3; - - /// Voice data - static const int NSURLNetworkServiceTypeVoice = 4; - - /// Responsive data - static const int NSURLNetworkServiceTypeResponsiveData = 6; - - /// Multimedia Audio/Video Streaming - static const int NSURLNetworkServiceTypeAVStreaming = 8; - - /// Responsive Multimedia Audio/Video - static const int NSURLNetworkServiceTypeResponsiveAV = 9; - - /// Call Signaling - static const int NSURLNetworkServiceTypeCallSignaling = 11; -} - -/// ! -/// @class NSURLRequest -/// -/// @abstract An NSURLRequest object represents a URL load request in a -/// manner independent of protocol and URL scheme. -/// -/// @discussion NSURLRequest encapsulates two basic data elements about -/// a URL load request: -///
    -///
  • The URL to load. -///
  • The policy to use when consulting the URL content cache made -/// available by the implementation. -///
-/// In addition, NSURLRequest is designed to be extended to support -/// protocol-specific data by adding categories to access a property -/// object provided in an interface targeted at protocol implementors. -///
    -///
  • Protocol implementors should direct their attention to the -/// NSURLRequestExtensibility category on NSURLRequest for more -/// information on how to provide extensions on NSURLRequest to -/// support protocol-specific request information. -///
  • Clients of this API who wish to create NSURLRequest objects to -/// load URL content should consult the protocol-specific NSURLRequest -/// categories that are available. The NSHTTPURLRequest category on -/// NSURLRequest is an example. -///
-///

-/// Objects of this class are used to create NSURLConnection instances, -/// which can are used to perform the load of a URL, or as input to the -/// NSURLConnection class method which performs synchronous loads. -class NSURLRequest extends NSObject { - NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLRequest] that points to the same underlying object as [other]. - static NSURLRequest castFrom(T other) { - return NSURLRequest._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURLRequest] that wraps the given raw object pointer. - static NSURLRequest castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLRequest._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLRequest]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); - } - - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL? URL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSURLRequest1, - _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_11( - _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); - } - - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NativeCupertinoHttp _lib, - NSURL? URL, - int cachePolicy, - double timeoutInterval) { - final _ret = _lib._objc_msgSend_354( - _lib._class_NSURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_(NSURL? URL) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithURL_1, URL?._id ?? ffi.nullptr); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL and - /// cache policy. - /// @discussion This is the designated initializer for the - /// NSURLRequest class. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL? URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_354( - _id, - _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the cache policy of the receiver. - /// @result The cache policy of the receiver. - int get cachePolicy { - return _lib._objc_msgSend_355(_id, _lib._sel_cachePolicy1); - } - - /// ! - /// @abstract Returns the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval alloted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - /// @result The timeout interval of the receiver. - double get timeoutInterval { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); - } - - /// ! - /// @abstract The main document URL associated with this load. - /// @discussion This URL is used for the cookie "same domain as main - /// document" policy. There may also be other future uses. - /// See setMainDocumentURL: - /// NOTE: In the current implementation, this value is unused by the - /// framework. A fully functional version of this method will be available - /// in the future. - /// @result The main document URL. - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. - /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have - /// not explicitly set a networkServiceType (using the setNetworkServiceType method). - /// @result The NSURLRequestNetworkServiceType associated with this request. - int get networkServiceType { - return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); - } - - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @result YES if the receiver is allowed to use the built in cellular radios to - /// satify the request, NO otherwise. - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } - - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @result YES if the receiver is allowed to use an interface marked as expensive to - /// satify the request, NO otherwise. - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } - - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @result YES if the receiver is allowed to use an interface marked as constrained to - /// satify the request, NO otherwise. - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } - - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); - } - - /// ! - /// @abstract Returns the HTTP request method of the receiver. - /// @result the HTTP request method of the receiver. - NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns a dictionary containing all the HTTP header fields - /// of the receiver. - /// @result a dictionary containing all the HTTP header fields of the - /// receiver. - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @method valueForHTTPHeaderField: - /// @abstract Returns the value which corresponds to the given header - /// field. Note that, in keeping with the HTTP RFC, HTTP header field - /// names are case-insensitive. - /// @param field the header field name to use for the lookup - /// (case-insensitive). - /// @result the value associated with the given header field, or nil if - /// there is no value associated with the given header field. - NSString valueForHTTPHeaderField_(NSString? field) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - /// @result The request body data of the receiver. - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the request body stream of the receiver - /// if any has been set - /// @discussion The stream is returned for examination only; it is - /// not safe for the caller to manipulate the stream in any way. Also - /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only - /// one can be set on a given request. Also note that the body stream is - /// preserved across copies, but is LOST when the request is coded via the - /// NSCoding protocol - /// @result The request body stream of the receiver. - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Determine whether default cookie handling will happen for - /// this request. - /// @discussion NOTE: This value is not used prior to 10.3 - /// @result YES if cookies will be sent with and set for this request; - /// otherwise NO. - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); - } - - /// ! - /// @abstract Reports whether the receiver is not expected to wait for the - /// previous response before transmitting. - /// @result YES if the receiver should transmit before the previous response - /// is received. NO if the receiver should wait for the previous response - /// before transmitting. - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); - } - - static NSURLRequest new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } - - static NSURLRequest alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } -} - -class NSInputStream extends _ObjCWrapper { - NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSInputStream] that points to the same underlying object as [other]. - static NSInputStream castFrom(T other) { - return NSInputStream._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSInputStream] that wraps the given raw object pointer. - static NSInputStream castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInputStream._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSInputStream]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); - } -} - -/// ! -/// @class NSMutableURLRequest -/// -/// @abstract An NSMutableURLRequest object represents a mutable URL load -/// request in a manner independent of protocol and URL scheme. -/// -/// @discussion This specialization of NSURLRequest is provided to aid -/// developers who may find it more convenient to mutate a single request -/// object for a series of URL loads instead of creating an immutable -/// NSURLRequest for each load. This programming model is supported by -/// the following contract stipulation between NSMutableURLRequest and -/// NSURLConnection: NSURLConnection makes a deep copy of each -/// NSMutableURLRequest object passed to one of its initializers. -///

NSMutableURLRequest is designed to be extended to support -/// protocol-specific data by adding categories to access a property -/// object provided in an interface targeted at protocol implementors. -///

    -///
  • Protocol implementors should direct their attention to the -/// NSMutableURLRequestExtensibility category on -/// NSMutableURLRequest for more information on how to provide -/// extensions on NSMutableURLRequest to support protocol-specific -/// request information. -///
  • Clients of this API who wish to create NSMutableURLRequest -/// objects to load URL content should consult the protocol-specific -/// NSMutableURLRequest categories that are available. The -/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an -/// example. -///
-class NSMutableURLRequest extends NSURLRequest { - NSMutableURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. - static NSMutableURLRequest castFrom(T other) { - return NSMutableURLRequest._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. - static NSMutableURLRequest castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableURLRequest._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableURLRequest]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableURLRequest1); - } - - /// ! - /// @abstract The URL of the receiver. - @override - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract The URL of the receiver. - set URL(NSURL? value) { - _lib._objc_msgSend_332(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); - } - - /// ! - /// @abstract The cache policy of the receiver. - @override - int get cachePolicy { - return _lib._objc_msgSend_355(_id, _lib._sel_cachePolicy1); - } - - /// ! - /// @abstract The cache policy of the receiver. - set cachePolicy(int value) { - _lib._objc_msgSend_358(_id, _lib._sel_setCachePolicy_1, value); - } - - /// ! - /// @abstract Sets the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - @override - double get timeoutInterval { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); - } - - /// ! - /// @abstract Sets the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - set timeoutInterval(double value) { - _lib._objc_msgSend_337(_id, _lib._sel_setTimeoutInterval_1, value); - } - - /// ! - /// @abstract Sets the main document URL - /// @discussion The caller should pass the URL for an appropriate main - /// document, if known. For example, when loading a web page, the URL - /// of the main html document for the top-level frame should be - /// passed. This main document will be used to implement the cookie - /// "only from same domain as main document" policy, and possibly - /// other things in the future. - /// NOTE: In the current implementation, the passed-in value is unused by the - /// framework. A fully functional version of this method will be available - /// in the future. - @override - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Sets the main document URL - /// @discussion The caller should pass the URL for an appropriate main - /// document, if known. For example, when loading a web page, the URL - /// of the main html document for the top-level frame should be - /// passed. This main document will be used to implement the cookie - /// "only from same domain as main document" policy, and possibly - /// other things in the future. - /// NOTE: In the current implementation, the passed-in value is unused by the - /// framework. A fully functional version of this method will be available - /// in the future. - set mainDocumentURL(NSURL? value) { - _lib._objc_msgSend_332( - _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); - } - - /// ! - /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request - /// @discussion This method is used to provide the network layers with a hint as to the purpose - /// of the request. Most clients should not need to use this method. - @override - int get networkServiceType { - return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); - } - - /// ! - /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request - /// @discussion This method is used to provide the network layers with a hint as to the purpose - /// of the request. Most clients should not need to use this method. - set networkServiceType(int value) { - _lib._objc_msgSend_359(_id, _lib._sel_setNetworkServiceType_1, value); - } - - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @discussion NO if the receiver should not be allowed to use the built in - /// cellular radios to satisfy the request, YES otherwise. The default is YES. - @override - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } - - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @discussion NO if the receiver should not be allowed to use the built in - /// cellular radios to satisfy the request, YES otherwise. The default is YES. - set allowsCellularAccess(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setAllowsCellularAccess_1, value); - } - - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to - /// satify the request, YES otherwise. - @override - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } - - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to - /// satify the request, YES otherwise. - set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); - } - - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to - /// satify the request, YES otherwise. - @override - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } - - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to - /// satify the request, YES otherwise. - set allowsConstrainedNetworkAccess(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); - } - - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - @override - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); - } - - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - set assumesHTTP3Capable(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setAssumesHTTP3Capable_1, value); - } - - /// ! - /// @abstract Sets the HTTP request method of the receiver. - @override - NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Sets the HTTP request method of the receiver. - set HTTPMethod(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setHTTPMethod_1, value?._id ?? ffi.nullptr); - } - - /// ! - /// @abstract Sets the HTTP header fields of the receiver to the given - /// dictionary. - /// @discussion This method replaces all header fields that may have - /// existed before this method call. - ///

Since HTTP header fields must be string values, each object and - /// key in the dictionary passed to this method must answer YES when - /// sent an -isKindOfClass:[NSString class] message. If either - /// the key or value for a key-value pair answers NO when sent this - /// message, the key-value pair is skipped. - @override - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Sets the HTTP header fields of the receiver to the given - /// dictionary. - /// @discussion This method replaces all header fields that may have - /// existed before this method call. - ///

Since HTTP header fields must be string values, each object and - /// key in the dictionary passed to this method must answer YES when - /// sent an -isKindOfClass:[NSString class] message. If either - /// the key or value for a key-value pair answers NO when sent this - /// message, the key-value pair is skipped. - set allHTTPHeaderFields(NSDictionary? value) { - _lib._objc_msgSend_360( - _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); - } - - /// ! - /// @method setValue:forHTTPHeaderField: - /// @abstract Sets the value of the given HTTP header field. - /// @discussion If a value was previously set for the given header - /// field, that value is replaced with the given value. Note that, in - /// keeping with the HTTP RFC, HTTP header field names are - /// case-insensitive. - /// @param value the header field value. - /// @param field the header field name (case-insensitive). - void setValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_361(_id, _lib._sel_setValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); - } - - /// ! - /// @method addValue:forHTTPHeaderField: - /// @abstract Adds an HTTP header field in the current header - /// dictionary. - /// @discussion This method provides a way to add values to header - /// fields incrementally. If a value was previously set for the given - /// header field, the given value is appended to the previously-existing - /// value. The appropriate field delimiter, a comma in the case of HTTP, - /// is added by the implementation, and should not be added to the given - /// value by the caller. Note that, in keeping with the HTTP RFC, HTTP - /// header field names are case-insensitive. - /// @param value the header field value. - /// @param field the header field name (case-insensitive). - void addValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_361(_id, _lib._sel_addValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); - } - - /// ! - /// @abstract Sets the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - @override - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Sets the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - set HTTPBody(NSData? value) { - _lib._objc_msgSend_362( - _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); - } - - /// ! - /// @abstract Sets the request body to be the contents of the given stream. - /// @discussion The provided stream should be unopened; the request will take - /// over the stream's delegate. The entire stream's contents will be - /// transmitted as the HTTP body of the request. Note that the body stream - /// and the body data (set by setHTTPBody:, above) are mutually exclusive - /// - setting one will clear the other. - @override - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Sets the request body to be the contents of the given stream. - /// @discussion The provided stream should be unopened; the request will take - /// over the stream's delegate. The entire stream's contents will be - /// transmitted as the HTTP body of the request. Note that the body stream - /// and the body data (set by setHTTPBody:, above) are mutually exclusive - /// - setting one will clear the other. - set HTTPBodyStream(NSInputStream? value) { - _lib._objc_msgSend_363( - _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); - } - - /// ! - /// @abstract Decide whether default cookie handling will happen for - /// this request (YES if cookies should be sent with and set for this request; - /// otherwise NO). - /// @discussion The default is YES - in other words, cookies are sent from and - /// stored to the cookie manager by default. - /// NOTE: In releases prior to 10.3, this value is ignored - @override - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); - } - - /// ! - /// @abstract Decide whether default cookie handling will happen for - /// this request (YES if cookies should be sent with and set for this request; - /// otherwise NO). - /// @discussion The default is YES - in other words, cookies are sent from and - /// stored to the cookie manager by default. - /// NOTE: In releases prior to 10.3, this value is ignored - set HTTPShouldHandleCookies(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); - } - - /// ! - /// @abstract Sets whether the request should not wait for the previous response - /// before transmitting (YES if the receiver should transmit before the previous response is - /// received. NO to wait for the previous response before transmitting) - /// @discussion Calling this method with a YES value does not guarantee HTTP - /// pipelining behavior. This method may have no effect if an HTTP proxy is - /// configured, or if the HTTP request uses an unsafe request method (e.g., POST - /// requests will not pipeline). Pipelining behavior also may not begin until - /// the second request on a given TCP connection. There may be other situations - /// where pipelining does not occur even though YES was set. - /// HTTP 1.1 allows the client to send multiple requests to the server without - /// waiting for a response. Though HTTP 1.1 requires support for pipelining, - /// some servers report themselves as being HTTP 1.1 but do not support - /// pipelining (disconnecting, sending resources misordered, omitting part of - /// a resource, etc.). - @override - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); - } - - /// ! - /// @abstract Sets whether the request should not wait for the previous response - /// before transmitting (YES if the receiver should transmit before the previous response is - /// received. NO to wait for the previous response before transmitting) - /// @discussion Calling this method with a YES value does not guarantee HTTP - /// pipelining behavior. This method may have no effect if an HTTP proxy is - /// configured, or if the HTTP request uses an unsafe request method (e.g., POST - /// requests will not pipeline). Pipelining behavior also may not begin until - /// the second request on a given TCP connection. There may be other situations - /// where pipelining does not occur even though YES was set. - /// HTTP 1.1 allows the client to send multiple requests to the server without - /// waiting for a response. Though HTTP 1.1 requires support for pipelining, - /// some servers report themselves as being HTTP 1.1 but do not support - /// pipelining (disconnecting, sending resources misordered, omitting part of - /// a resource, etc.). - set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); - } - - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSMutableURLRequest requestWithURL_( - NativeCupertinoHttp _lib, NSURL? URL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableURLRequest1, - _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_11( - _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); - } - - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NativeCupertinoHttp _lib, - NSURL? URL, - int cachePolicy, - double timeoutInterval) { - final _ret = _lib._objc_msgSend_354( - _lib._class_NSMutableURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); - } - - static NSMutableURLRequest new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); - } - - static NSMutableURLRequest alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); - } -} - -abstract class NSURLRequestAttribution { - static const int NSURLRequestAttributionDeveloper = 0; - static const int NSURLRequestAttributionUser = 1; -} - -abstract class NSHTTPCookieAcceptPolicy { - static const int NSHTTPCookieAcceptPolicyAlways = 0; - static const int NSHTTPCookieAcceptPolicyNever = 1; - static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; -} - -class NSHTTPCookieStorage extends NSObject { - NSHTTPCookieStorage._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. - static NSHTTPCookieStorage castFrom(T other) { - return NSHTTPCookieStorage._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. - static NSHTTPCookieStorage castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSHTTPCookieStorage1); - } - - static NSHTTPCookieStorage? getSharedHTTPCookieStorage( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_364( - _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } - - static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_365( - _lib._class_NSHTTPCookieStorage1, - _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, - identifier?._id ?? ffi.nullptr); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } - - NSArray? get cookies { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_cookies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - void setCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_366( - _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); - } - - void deleteCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_366( - _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); - } - - void removeCookiesSinceDate_(NSDate? date) { - return _lib._objc_msgSend_367( - _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); - } - - NSArray cookiesForURL_(NSURL? URL) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_cookiesForURL_1, URL?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - void setCookies_forURL_mainDocumentURL_( - NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { - return _lib._objc_msgSend_368( - _id, - _lib._sel_setCookies_forURL_mainDocumentURL_1, - cookies?._id ?? ffi.nullptr, - URL?._id ?? ffi.nullptr, - mainDocumentURL?._id ?? ffi.nullptr); - } - - int get cookieAcceptPolicy { - return _lib._objc_msgSend_369(_id, _lib._sel_cookieAcceptPolicy1); - } - - set cookieAcceptPolicy(int value) { - _lib._objc_msgSend_370(_id, _lib._sel_setCookieAcceptPolicy_1, value); - } - - NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { - final _ret = _lib._objc_msgSend_97( - _id, - _lib._sel_sortedCookiesUsingDescriptors_1, - sortOrder?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - void storeCookies_forTask_(NSArray? cookies, NSURLSessionTask? task) { - return _lib._objc_msgSend_378(_id, _lib._sel_storeCookies_forTask_1, - cookies?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); - } - - void getCookiesForTask_completionHandler_( - NSURLSessionTask? task, ObjCBlock19 completionHandler) { - return _lib._objc_msgSend_379( - _id, - _lib._sel_getCookiesForTask_completionHandler_1, - task?._id ?? ffi.nullptr, - completionHandler._id); - } - - static NSHTTPCookieStorage new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); - } - - static NSHTTPCookieStorage alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); - } -} - -class NSHTTPCookie extends _ObjCWrapper { - NSHTTPCookie._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. - static NSHTTPCookie castFrom(T other) { - return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. - static NSHTTPCookie castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookie._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSHTTPCookie]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); - } -} - -/// NSURLSessionTask - a cancelable object that refers to the lifetime -/// of processing a given request. -class NSURLSessionTask extends NSObject { - NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. - static NSURLSessionTask castFrom(T other) { - return NSURLSessionTask._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. - static NSURLSessionTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTask._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLSessionTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTask1); - } - - /// an identifier for this task, assigned by and unique to the owning session - int get taskIdentifier { - return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); - } - - /// may be nil if this is a stream task - NSURLRequest? get originalRequest { - final _ret = _lib._objc_msgSend_371(_id, _lib._sel_originalRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// may differ from originalRequest due to http server redirection - NSURLRequest? get currentRequest { - final _ret = _lib._objc_msgSend_371(_id, _lib._sel_currentRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// may be nil if no response has been received - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_373(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); - } - - /// NSProgress object which represents the task progress. - /// It can be used for task progress tracking. - NSProgress? get progress { - final _ret = _lib._objc_msgSend_318(_id, _lib._sel_progress1); - return _ret.address == 0 - ? null - : NSProgress._(_ret, _lib, retain: true, release: true); - } - - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - NSDate? get earliestBeginDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_earliestBeginDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - set earliestBeginDate(NSDate? value) { - _lib._objc_msgSend_374( - _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); - } - - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - int get countOfBytesClientExpectsToSend { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfBytesClientExpectsToSend1); - } - - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - set countOfBytesClientExpectsToSend(int value) { - _lib._objc_msgSend_326( - _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); - } - - int get countOfBytesClientExpectsToReceive { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfBytesClientExpectsToReceive1); - } - - set countOfBytesClientExpectsToReceive(int value) { - _lib._objc_msgSend_326( - _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); - } - - /// number of body bytes already received - int get countOfBytesReceived { - return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesReceived1); - } - - /// number of body bytes already sent - int get countOfBytesSent { - return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesSent1); - } - - /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request - int get countOfBytesExpectedToSend { - return _lib._objc_msgSend_325(_id, _lib._sel_countOfBytesExpectedToSend1); - } - - /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. - int get countOfBytesExpectedToReceive { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfBytesExpectedToReceive1); - } - - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - NSString? get taskDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_taskDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - set taskDescription(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); - } - - /// -cancel returns immediately, but marks a task as being canceled. - /// The task will signal -URLSession:task:didCompleteWithError: with an - /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some - /// cases, the task may signal other work before it acknowledges the - /// cancelation. -cancel may be sent to a task that has been suspended. - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } - - /// The current state of the task within the session. - int get state { - return _lib._objc_msgSend_375(_id, _lib._sel_state1); - } - - /// The error, if any, delivered via -URLSession:task:didCompleteWithError: - /// This property will be nil in the event that no error occured. - NSError? get error { - final _ret = _lib._objc_msgSend_376(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); - } - - /// Suspending a task will prevent the NSURLSession from continuing to - /// load data. There may still be delegate calls made on behalf of - /// this task (for instance, to report data received while suspending) - /// but no further transmissions will be made on behalf of the task - /// until -resume is sent. The timeout timer associated with the task - /// will be disabled while a task is suspended. -suspend and -resume are - /// nestable. - void suspend() { - return _lib._objc_msgSend_1(_id, _lib._sel_suspend1); - } - - void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); - } - - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. - /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. - /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - double get priority { - return _lib._objc_msgSend_84(_id, _lib._sel_priority1); - } - - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. - /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. - /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - set priority(double value) { - _lib._objc_msgSend_377(_id, _lib._sel_setPriority_1, value); - } - - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. - /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - bool get prefersIncrementalDelivery { - return _lib._objc_msgSend_11(_id, _lib._sel_prefersIncrementalDelivery1); - } - - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. - /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - set prefersIncrementalDelivery(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setPrefersIncrementalDelivery_1, value); - } - - @override - NSURLSessionTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTask._(_ret, _lib, retain: true, release: true); - } - - static NSURLSessionTask new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); - } - - static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); - } -} - -class NSURLResponse extends NSObject { - NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLResponse] that points to the same underlying object as [other]. - static NSURLResponse castFrom(T other) { - return NSURLResponse._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURLResponse] that wraps the given raw object pointer. - static NSURLResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLResponse._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); - } - - /// ! - /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: - /// @abstract Initialize an NSURLResponse with the provided values. - /// @param URL the URL - /// @param MIMEType the MIME content type of the response - /// @param length the expected content length of the associated data - /// @param name the name of the text encoding for the associated data, if applicable, else nil - /// @result The initialized NSURLResponse. - /// @discussion This is the designated initializer for NSURLResponse. - NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - NSURL? URL, NSString? MIMEType, int length, NSString? name) { - final _ret = _lib._objc_msgSend_372( - _id, - _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, - URL?._id ?? ffi.nullptr, - MIMEType?._id ?? ffi.nullptr, - length, - name?._id ?? ffi.nullptr); - return NSURLResponse._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the MIME type of the receiver. - /// @discussion The MIME type is based on the information provided - /// from an origin source. However, that value may be changed or - /// corrected by a protocol implementation if it can be determined - /// that the origin server or source reported the information - /// incorrectly or imprecisely. An attempt to guess the MIME type may - /// be made if the origin source did not report any such information. - /// @result The MIME type of the receiver. - NSString? get MIMEType { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_MIMEType1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the expected content length of the receiver. - /// @discussion Some protocol implementations report a content length - /// as part of delivering load metadata, but not all protocols - /// guarantee the amount of data that will be delivered in actuality. - /// Hence, this method returns an expected amount. Clients should use - /// this value as an advisory, and should be prepared to deal with - /// either more or less data. - /// @result The expected content length of the receiver, or -1 if - /// there is no expectation that can be arrived at regarding expected - /// content length. - int get expectedContentLength { - return _lib._objc_msgSend_82(_id, _lib._sel_expectedContentLength1); - } - - /// ! - /// @abstract Returns the name of the text encoding of the receiver. - /// @discussion This name will be the actual string reported by the - /// origin source during the course of performing a protocol-specific - /// URL load. Clients can inspect this string and convert it to an - /// NSStringEncoding or CFStringEncoding using the methods and - /// functions made available in the appropriate framework. - /// @result The name of the text encoding of the receiver, or nil if no - /// text encoding was specified. - NSString? get textEncodingName { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_textEncodingName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns a suggested filename if the resource were saved to disk. - /// @discussion The method first checks if the server has specified a filename using the - /// content disposition header. If no valid filename is specified using that mechanism, - /// this method checks the last path component of the URL. If no valid filename can be - /// obtained using the last path component, this method uses the URL's host as the filename. - /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. - /// In mose cases, this method appends the proper file extension based on the MIME type. - /// This method always returns a valid filename. - /// @result A suggested filename to use if saving the resource to disk. - NSString? get suggestedFilename { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedFilename1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSURLResponse new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); - } - - static NSURLResponse alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); - } -} - -abstract class NSURLSessionTaskState { - /// The task is currently being serviced by the session - static const int NSURLSessionTaskStateRunning = 0; - static const int NSURLSessionTaskStateSuspended = 1; - - /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. - static const int NSURLSessionTaskStateCanceling = 2; - - /// The task has completed and the session will receive no more delegate notifications - static const int NSURLSessionTaskStateCompleted = 3; -} - -void _ObjCBlock19_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} - -final _ObjCBlock19_closureRegistry = {}; -int _ObjCBlock19_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock19_registerClosure(Function fn) { - final id = ++_ObjCBlock19_closureRegistryIndex; - _ObjCBlock19_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock19_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock19_closureRegistry[block.ref.target.address]!(arg0); -} - -class ObjCBlock19 extends _ObjCBlockBase { - ObjCBlock19._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock19.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock19_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock19.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock19_closureTrampoline) - .cast(), - _ObjCBlock19_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } - - ffi.Pointer<_ObjCBlock> get pointer => _id; -} - -class CFArrayCallBacks extends ffi.Struct { - @CFIndex() - external int version; - - external CFArrayRetainCallBack retain; - - external CFArrayReleaseCallBack release; - - external CFArrayCopyDescriptionCallBack copyDescription; - - external CFArrayEqualCallBack equal; -} - -typedef CFArrayRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFArrayReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFArrayCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFArrayEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>>; - -class __CFArray extends ffi.Opaque {} - -typedef CFArrayRef = ffi.Pointer<__CFArray>; -typedef CFMutableArrayRef = ffi.Pointer<__CFArray>; -typedef CFArrayApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFComparatorFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>; - -class OS_object extends NSObject { - OS_object._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [OS_object] that points to the same underlying object as [other]. - static OS_object castFrom(T other) { - return OS_object._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [OS_object] that wraps the given raw object pointer. - static OS_object castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return OS_object._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [OS_object]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_OS_object1); - } - - @override - OS_object init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_object._(_ret, _lib, retain: true, release: true); - } - - static OS_object new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_new1); - return OS_object._(_ret, _lib, retain: false, release: true); - } - - static OS_object alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_alloc1); - return OS_object._(_ret, _lib, retain: false, release: true); - } -} - -class __SecCertificate extends ffi.Opaque {} - -class __SecIdentity extends ffi.Opaque {} - -class __SecKey extends ffi.Opaque {} - -class __SecPolicy extends ffi.Opaque {} - -class __SecAccessControl extends ffi.Opaque {} - -class __SecKeychain extends ffi.Opaque {} - -class __SecKeychainItem extends ffi.Opaque {} - -class __SecKeychainSearch extends ffi.Opaque {} - -class SecKeychainAttribute extends ffi.Struct { - @SecKeychainAttrType() - external int tag; - - @UInt32() - external int length; - - external ffi.Pointer data; -} - -typedef SecKeychainAttrType = OSType; -typedef OSType = FourCharCode; -typedef FourCharCode = UInt32; - -class SecKeychainAttributeList extends ffi.Struct { - @UInt32() - external int count; - - external ffi.Pointer attr; -} - -class __SecTrustedApplication extends ffi.Opaque {} - -class __SecAccess extends ffi.Opaque {} - -class __SecACL extends ffi.Opaque {} - -class __SecPassword extends ffi.Opaque {} - -class SecKeychainAttributeInfo extends ffi.Struct { - @UInt32() - external int count; - - external ffi.Pointer tag; - - external ffi.Pointer format; -} - -typedef OSStatus = SInt32; - -class _RuneEntry extends ffi.Struct { - @__darwin_rune_t() - external int __min; - - @__darwin_rune_t() - external int __max; - - @__darwin_rune_t() - external int __map; - - external ffi.Pointer<__uint32_t> __types; -} - -typedef __darwin_rune_t = __darwin_wchar_t; -typedef __darwin_wchar_t = ffi.Int; -typedef __uint32_t = ffi.UnsignedInt; - -class _RuneRange extends ffi.Struct { - @ffi.Int() - external int __nranges; - - external ffi.Pointer<_RuneEntry> __ranges; -} - -class _RuneCharClass extends ffi.Struct { - @ffi.Array.multi([14]) - external ffi.Array __name; - - @__uint32_t() - external int __mask; -} - -class _RuneLocale extends ffi.Struct { - @ffi.Array.multi([8]) - external ffi.Array __magic; - - @ffi.Array.multi([32]) - external ffi.Array __encoding; - - external ffi.Pointer< - ffi.NativeFunction< - __darwin_rune_t Function(ffi.Pointer, __darwin_size_t, - ffi.Pointer>)>> __sgetrune; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(__darwin_rune_t, ffi.Pointer, - __darwin_size_t, ffi.Pointer>)>> __sputrune; - - @__darwin_rune_t() - external int __invalid_rune; - - @ffi.Array.multi([256]) - external ffi.Array<__uint32_t> __runetype; - - @ffi.Array.multi([256]) - external ffi.Array<__darwin_rune_t> __maplower; - - @ffi.Array.multi([256]) - external ffi.Array<__darwin_rune_t> __mapupper; - - external _RuneRange __runetype_ext; - - external _RuneRange __maplower_ext; - - external _RuneRange __mapupper_ext; - - external ffi.Pointer __variable; - - @ffi.Int() - external int __variable_len; - - @ffi.Int() - external int __ncharclasses; - - external ffi.Pointer<_RuneCharClass> __charclasses; -} - -typedef __darwin_size_t = ffi.UnsignedLong; -typedef __darwin_ct_rune_t = ffi.Int; - -class lconv extends ffi.Struct { - external ffi.Pointer decimal_point; - - external ffi.Pointer thousands_sep; - - external ffi.Pointer grouping; - - external ffi.Pointer int_curr_symbol; - - external ffi.Pointer currency_symbol; - - external ffi.Pointer mon_decimal_point; - - external ffi.Pointer mon_thousands_sep; - - external ffi.Pointer mon_grouping; - - external ffi.Pointer positive_sign; - - external ffi.Pointer negative_sign; - - @ffi.Char() - external int int_frac_digits; - - @ffi.Char() - external int frac_digits; - - @ffi.Char() - external int p_cs_precedes; - - @ffi.Char() - external int p_sep_by_space; - - @ffi.Char() - external int n_cs_precedes; - - @ffi.Char() - external int n_sep_by_space; - - @ffi.Char() - external int p_sign_posn; - - @ffi.Char() - external int n_sign_posn; - - @ffi.Char() - external int int_p_cs_precedes; - - @ffi.Char() - external int int_n_cs_precedes; - - @ffi.Char() - external int int_p_sep_by_space; - - @ffi.Char() - external int int_n_sep_by_space; - - @ffi.Char() - external int int_p_sign_posn; - - @ffi.Char() - external int int_n_sign_posn; -} - -class __float2 extends ffi.Struct { - @ffi.Float() - external double __sinval; - - @ffi.Float() - external double __cosval; -} - -class __double2 extends ffi.Struct { - @ffi.Double() - external double __sinval; - - @ffi.Double() - external double __cosval; -} - -class exception extends ffi.Struct { - @ffi.Int() - external int type; - - external ffi.Pointer name; - - @ffi.Double() - external double arg1; - - @ffi.Double() - external double arg2; - - @ffi.Double() - external double retval; -} - -class __darwin_arm_exception_state extends ffi.Struct { - @__uint32_t() - external int __exception; - - @__uint32_t() - external int __fsr; - - @__uint32_t() - external int __far; -} - -class __darwin_arm_exception_state64 extends ffi.Struct { - @__uint64_t() - external int __far; - - @__uint32_t() - external int __esr; - - @__uint32_t() - external int __exception; -} - -typedef __uint64_t = ffi.UnsignedLongLong; - -class __darwin_arm_thread_state extends ffi.Struct { - @ffi.Array.multi([13]) - external ffi.Array<__uint32_t> __r; - - @__uint32_t() - external int __sp; - - @__uint32_t() - external int __lr; - - @__uint32_t() - external int __pc; - - @__uint32_t() - external int __cpsr; -} - -class __darwin_arm_thread_state64 extends ffi.Struct { - @ffi.Array.multi([29]) - external ffi.Array<__uint64_t> __x; - - @__uint64_t() - external int __fp; - - @__uint64_t() - external int __lr; - - @__uint64_t() - external int __sp; - - @__uint64_t() - external int __pc; - - @__uint32_t() - external int __cpsr; - - @__uint32_t() - external int __pad; -} - -class __darwin_arm_vfp_state extends ffi.Struct { - @ffi.Array.multi([64]) - external ffi.Array<__uint32_t> __r; - - @__uint32_t() - external int __fpscr; -} - -class __darwin_arm_neon_state64 extends ffi.Opaque {} - -class __darwin_arm_neon_state extends ffi.Opaque {} - -class __arm_pagein_state extends ffi.Struct { - @ffi.Int() - external int __pagein_error; -} - -class __arm_legacy_debug_state extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bcr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wcr; -} - -class __darwin_arm_debug_state32 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bcr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wcr; - - @__uint64_t() - external int __mdscr_el1; -} - -class __darwin_arm_debug_state64 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __bvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __bcr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __wvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __wcr; - - @__uint64_t() - external int __mdscr_el1; -} - -class __darwin_arm_cpmu_state64 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __ctrs; -} - -class __darwin_mcontext32 extends ffi.Struct { - external __darwin_arm_exception_state __es; - - external __darwin_arm_thread_state __ss; - - external __darwin_arm_vfp_state __fs; -} - -class __darwin_mcontext64 extends ffi.Opaque {} - -class __darwin_sigaltstack extends ffi.Struct { - external ffi.Pointer ss_sp; - - @__darwin_size_t() - external int ss_size; - - @ffi.Int() - external int ss_flags; +abstract class NSOrderedCollectionDifferenceCalculationOptions { + static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = + 1; + static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = + 2; + static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; } -class __darwin_ucontext extends ffi.Struct { - @ffi.Int() - external int uc_onstack; - - @__darwin_sigset_t() - external int uc_sigmask; - - external __darwin_sigaltstack uc_stack; - - external ffi.Pointer<__darwin_ucontext> uc_link; - - @__darwin_size_t() - external int uc_mcsize; - - external ffi.Pointer<__darwin_mcontext64> uc_mcontext; +bool _ObjCBlock9_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); } -typedef __darwin_sigset_t = __uint32_t; - -class sigval extends ffi.Union { - @ffi.Int() - external int sival_int; - - external ffi.Pointer sival_ptr; +final _ObjCBlock9_closureRegistry = {}; +int _ObjCBlock9_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock9_registerClosure(Function fn) { + final id = ++_ObjCBlock9_closureRegistryIndex; + _ObjCBlock9_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class sigevent extends ffi.Struct { - @ffi.Int() - external int sigev_notify; - - @ffi.Int() - external int sigev_signo; - - external sigval sigev_value; - - external ffi.Pointer> - sigev_notify_function; - - external ffi.Pointer sigev_notify_attributes; +bool _ObjCBlock9_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock9_closureRegistry[block.ref.target.address]!(arg0, arg1); } -typedef pthread_attr_t = __darwin_pthread_attr_t; -typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; - -class __siginfo extends ffi.Struct { - @ffi.Int() - external int si_signo; - - @ffi.Int() - external int si_errno; - - @ffi.Int() - external int si_code; - - @pid_t() - external int si_pid; - - @uid_t() - external int si_uid; - - @ffi.Int() - external int si_status; - - external ffi.Pointer si_addr; - - external sigval si_value; +class ObjCBlock9 extends _ObjCBlockBase { + ObjCBlock9._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Long() - external int si_band; + /// Creates a block from a C function pointer. + ObjCBlock9.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock9_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Array.multi([7]) - external ffi.Array __pad; + /// Creates a block from a Dart function. + ObjCBlock9.fromFunction( + NativeCupertinoHttp lib, + bool Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock9_closureTrampoline, false) + .cast(), + _ObjCBlock9_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } } -typedef pid_t = __darwin_pid_t; -typedef __darwin_pid_t = __int32_t; -typedef uid_t = __darwin_uid_t; -typedef __darwin_uid_t = __uint32_t; - -class __sigaction_u extends ffi.Union { - external ffi.Pointer> - __sa_handler; - - external ffi.Pointer< +void _ObjCBlock10_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer)>> - __sa_sigaction; + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); } -class __sigaction extends ffi.Struct { - external __sigaction_u __sigaction_u1; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer, ffi.Pointer)>> sa_tramp; - - @sigset_t() - external int sa_mask; - - @ffi.Int() - external int sa_flags; +final _ObjCBlock10_closureRegistry = {}; +int _ObjCBlock10_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock10_registerClosure(Function fn) { + final id = ++_ObjCBlock10_closureRegistryIndex; + _ObjCBlock10_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -typedef siginfo_t = __siginfo; -typedef sigset_t = __darwin_sigset_t; - -class sigaction extends ffi.Struct { - external __sigaction_u __sigaction_u1; - - @sigset_t() - external int sa_mask; - - @ffi.Int() - external int sa_flags; +void _ObjCBlock10_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock10_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); } -class sigvec extends ffi.Struct { - external ffi.Pointer> - sv_handler; +class ObjCBlock10 extends _ObjCBlockBase { + ObjCBlock10._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Int() - external int sv_mask; + /// Creates a block from a C function pointer. + ObjCBlock10.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock10_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Int() - external int sv_flags; + /// Creates a block from a Dart function. + ObjCBlock10.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock10_closureTrampoline) + .cast(), + _ObjCBlock10_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } } -class sigstack extends ffi.Struct { - external ffi.Pointer ss_sp; - - @ffi.Int() - external int ss_onstack; +bool _ObjCBlock11_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1, ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); } -typedef pthread_t = __darwin_pthread_t; -typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; -typedef stack_t = __darwin_sigaltstack; - -class __sbuf extends ffi.Struct { - external ffi.Pointer _base; - - @ffi.Int() - external int _size; +final _ObjCBlock11_closureRegistry = {}; +int _ObjCBlock11_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock11_registerClosure(Function fn) { + final id = ++_ObjCBlock11_closureRegistryIndex; + _ObjCBlock11_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class __sFILEX extends ffi.Opaque {} - -class __sFILE extends ffi.Struct { - external ffi.Pointer _p; - - @ffi.Int() - external int _r; - - @ffi.Int() - external int _w; - - @ffi.Short() - external int _flags; - - @ffi.Short() - external int _file; - - external __sbuf _bf; - - @ffi.Int() - external int _lbfsize; - - external ffi.Pointer _cookie; - - external ffi - .Pointer)>> - _close; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> _read; - - external ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> _seek; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> _write; - - external __sbuf _ub; - - external ffi.Pointer<__sFILEX> _extra; - - @ffi.Int() - external int _ur; - - @ffi.Array.multi([3]) - external ffi.Array _ubuf; - - @ffi.Array.multi([1]) - external ffi.Array _nbuf; - - external __sbuf _lb; - - @ffi.Int() - external int _blksize; - - @fpos_t() - external int _offset; +bool _ObjCBlock11_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock11_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); } -typedef fpos_t = __darwin_off_t; -typedef __darwin_off_t = __int64_t; -typedef __int64_t = ffi.LongLong; -typedef FILE = __sFILE; -typedef off_t = __darwin_off_t; -typedef ssize_t = __darwin_ssize_t; -typedef __darwin_ssize_t = ffi.Long; - -abstract class idtype_t { - static const int P_ALL = 0; - static const int P_PID = 1; - static const int P_PGID = 2; -} +class ObjCBlock11 extends _ObjCBlockBase { + ObjCBlock11._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class timeval extends ffi.Struct { - @__darwin_time_t() - external int tv_sec; + /// Creates a block from a C function pointer. + ObjCBlock11.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock11_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @__darwin_suseconds_t() - external int tv_usec; + /// Creates a block from a Dart function. + ObjCBlock11.fromFunction( + NativeCupertinoHttp lib, + bool Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock11_closureTrampoline, false) + .cast(), + _ObjCBlock11_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } } -typedef __darwin_time_t = ffi.Long; -typedef __darwin_suseconds_t = __int32_t; - -class rusage extends ffi.Struct { - external timeval ru_utime; - - external timeval ru_stime; - - @ffi.Long() - external int ru_maxrss; - - @ffi.Long() - external int ru_ixrss; - - @ffi.Long() - external int ru_idrss; - - @ffi.Long() - external int ru_isrss; - - @ffi.Long() - external int ru_minflt; - - @ffi.Long() - external int ru_majflt; - - @ffi.Long() - external int ru_nswap; - - @ffi.Long() - external int ru_inblock; - - @ffi.Long() - external int ru_oublock; - - @ffi.Long() - external int ru_msgsnd; - - @ffi.Long() - external int ru_msgrcv; +final class NSFastEnumerationState extends ffi.Struct { + @ffi.UnsignedLong() + external int state; - @ffi.Long() - external int ru_nsignals; + external ffi.Pointer> itemsPtr; - @ffi.Long() - external int ru_nvcsw; + external ffi.Pointer mutationsPtr; - @ffi.Long() - external int ru_nivcsw; + @ffi.Array.multi([5]) + external ffi.Array extra; } -class rusage_info_v0 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; - - @ffi.Uint64() - external int ri_user_time; - - @ffi.Uint64() - external int ri_system_time; - - @ffi.Uint64() - external int ri_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_interrupt_wkups; - - @ffi.Uint64() - external int ri_pageins; - - @ffi.Uint64() - external int ri_wired_size; - - @ffi.Uint64() - external int ri_resident_size; - - @ffi.Uint64() - external int ri_phys_footprint; - - @ffi.Uint64() - external int ri_proc_start_abstime; +ffi.Pointer _ObjCBlock12_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>()(arg0, arg1); +} - @ffi.Uint64() - external int ri_proc_exit_abstime; +final _ObjCBlock12_closureRegistry = {}; +int _ObjCBlock12_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock12_registerClosure(Function fn) { + final id = ++_ObjCBlock12_closureRegistryIndex; + _ObjCBlock12_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class rusage_info_v1 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; +ffi.Pointer _ObjCBlock12_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) { + return _ObjCBlock12_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @ffi.Uint64() - external int ri_user_time; +class ObjCBlock12 extends _ObjCBlockBase { + ObjCBlock12._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_system_time; + /// Creates a block from a C function pointer. + ObjCBlock12.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>( + _ObjCBlock12_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_pkg_idle_wkups; + /// Creates a block from a Dart function. + ObjCBlock12.fromFunction( + NativeCupertinoHttp lib, + ffi.Pointer Function( + ffi.Pointer arg0, NSErrorUserInfoKey arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>( + _ObjCBlock12_closureTrampoline) + .cast(), + _ObjCBlock12_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call( + ffi.Pointer arg0, NSErrorUserInfoKey arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>()(_id, arg0, arg1); + } +} - @ffi.Uint64() - external int ri_interrupt_wkups; +typedef NSErrorUserInfoKey = ffi.Pointer; +typedef NSURLResourceKey = ffi.Pointer; - @ffi.Uint64() - external int ri_pageins; +/// Working with Bookmarks and alias (bookmark) files +abstract class NSURLBookmarkCreationOptions { + /// This option does nothing and has no effect on bookmark resolution + static const int NSURLBookmarkCreationPreferFileIDResolution = 256; - @ffi.Uint64() - external int ri_wired_size; + /// creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways + static const int NSURLBookmarkCreationMinimalBookmark = 512; - @ffi.Uint64() - external int ri_resident_size; + /// include the properties required by writeBookmarkData:toURL:options: in the bookmark data created + static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; - @ffi.Uint64() - external int ri_phys_footprint; + /// include information in the bookmark data which allows the same sandboxed process to access the resource after being relaunched + static const int NSURLBookmarkCreationWithSecurityScope = 2048; - @ffi.Uint64() - external int ri_proc_start_abstime; + /// if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted + static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; - @ffi.Uint64() - external int ri_proc_exit_abstime; + /// Disable automatic embedding of an implicit security scope. The resolving process will not be able gain access to the resource by security scope, either implicitly or explicitly, through the returned URL. Not applicable to security-scoped bookmarks. + static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = + 536870912; +} - @ffi.Uint64() - external int ri_child_user_time; +abstract class NSURLBookmarkResolutionOptions { + /// don't perform any user interaction during bookmark resolution + static const int NSURLBookmarkResolutionWithoutUI = 256; - @ffi.Uint64() - external int ri_child_system_time; + /// don't mount a volume during bookmark resolution + static const int NSURLBookmarkResolutionWithoutMounting = 512; - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + /// use the secure information included at creation time to provide the ability to access the resource in a sandboxed process + static const int NSURLBookmarkResolutionWithSecurityScope = 1024; - @ffi.Uint64() - external int ri_child_interrupt_wkups; + /// Disable implicitly starting access of the ephemeral security-scoped resource during resolution. Instead, call `-[NSURL startAccessingSecurityScopedResource]` on the returned URL when ready to use the resource. Not applicable to security-scoped bookmarks. + static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; +} - @ffi.Uint64() - external int ri_child_pageins; +typedef NSURLBookmarkFileCreationOptions = NSUInteger; - @ffi.Uint64() - external int ri_child_elapsed_abstime; -} +class NSURLHandle extends NSObject { + NSURLHandle._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class rusage_info_v2 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; + /// Returns a [NSURLHandle] that points to the same underlying object as [other]. + static NSURLHandle castFrom(T other) { + return NSURLHandle._(other._id, other._lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_user_time; + /// Returns a [NSURLHandle] that wraps the given raw object pointer. + static NSURLHandle castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLHandle._(other, lib, retain: retain, release: release); + } - @ffi.Uint64() - external int ri_system_time; + /// Returns whether [obj] is an instance of [NSURLHandle]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + static void registerURLHandleClass_( + NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { + return _lib._objc_msgSend_200(_lib._class_NSURLHandle1, + _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); + } - @ffi.Uint64() - external int ri_interrupt_wkups; + static NSObject URLHandleClassForURL_( + NativeCupertinoHttp _lib, NSURL? anURL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSURLHandle1, + _lib._sel_URLHandleClassForURL_1, anURL?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_pageins; + int status() { + return _lib._objc_msgSend_202(_id, _lib._sel_status1); + } - @ffi.Uint64() - external int ri_wired_size; + NSString failureReason() { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_failureReason1); + return NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_resident_size; + void addClient_(NSObject? client) { + return _lib._objc_msgSend_200( + _id, _lib._sel_addClient_1, client?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_phys_footprint; + void removeClient_(NSObject? client) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeClient_1, client?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_proc_start_abstime; + void loadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); + } - @ffi.Uint64() - external int ri_proc_exit_abstime; + void cancelLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); + } - @ffi.Uint64() - external int ri_child_user_time; + NSData resourceData() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_resourceData1); + return NSData._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_system_time; + NSData availableResourceData() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_availableResourceData1); + return NSData._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + int expectedResourceDataSize() { + return _lib._objc_msgSend_82(_id, _lib._sel_expectedResourceDataSize1); + } - @ffi.Uint64() - external int ri_child_interrupt_wkups; + void flushCachedData() { + return _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); + } - @ffi.Uint64() - external int ri_child_pageins; + void backgroundLoadDidFailWithReason_(NSString? reason) { + return _lib._objc_msgSend_188( + _id, + _lib._sel_backgroundLoadDidFailWithReason_1, + reason?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_child_elapsed_abstime; + void didLoadBytes_loadComplete_(NSData? newBytes, bool yorn) { + return _lib._objc_msgSend_203(_id, _lib._sel_didLoadBytes_loadComplete_1, + newBytes?._id ?? ffi.nullptr, yorn); + } - @ffi.Uint64() - external int ri_diskio_bytesread; + static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL? anURL) { + return _lib._objc_msgSend_204(_lib._class_NSURLHandle1, + _lib._sel_canInitWithURL_1, anURL?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_diskio_byteswritten; -} + static NSURLHandle cachedHandleForURL_( + NativeCupertinoHttp _lib, NSURL? anURL) { + final _ret = _lib._objc_msgSend_205(_lib._class_NSURLHandle1, + _lib._sel_cachedHandleForURL_1, anURL?._id ?? ffi.nullptr); + return NSURLHandle._(_ret, _lib, retain: true, release: true); + } -class rusage_info_v3 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; + NSObject initWithURL_cached_(NSURL? anURL, bool willCache) { + final _ret = _lib._objc_msgSend_206(_id, _lib._sel_initWithURL_cached_1, + anURL?._id ?? ffi.nullptr, willCache); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_user_time; + NSObject propertyForKey_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_system_time; + NSObject propertyForKeyIfAvailable_(NSString? propertyKey) { + final _ret = _lib._objc_msgSend_42(_id, + _lib._sel_propertyForKeyIfAvailable_1, propertyKey?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_pkg_idle_wkups; + bool writeProperty_forKey_(NSObject propertyValue, NSString? propertyKey) { + return _lib._objc_msgSend_199(_id, _lib._sel_writeProperty_forKey_1, + propertyValue._id, propertyKey?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_interrupt_wkups; + bool writeData_(NSData? data) { + return _lib._objc_msgSend_35( + _id, _lib._sel_writeData_1, data?._id ?? ffi.nullptr); + } - @ffi.Uint64() - external int ri_pageins; + NSData loadInForeground() { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_loadInForeground1); + return NSData._(_ret, _lib, retain: true, release: true); + } - @ffi.Uint64() - external int ri_wired_size; + void beginLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); + } - @ffi.Uint64() - external int ri_resident_size; + void endLoadInBackground() { + return _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); + } - @ffi.Uint64() - external int ri_phys_footprint; + static NSURLHandle new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); + return NSURLHandle._(_ret, _lib, retain: false, release: true); + } - @ffi.Uint64() - external int ri_proc_start_abstime; + static NSURLHandle alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); + return NSURLHandle._(_ret, _lib, retain: false, release: true); + } +} - @ffi.Uint64() - external int ri_proc_exit_abstime; +abstract class NSURLHandleStatus { + static const int NSURLHandleNotLoaded = 0; + static const int NSURLHandleLoadSucceeded = 1; + static const int NSURLHandleLoadInProgress = 2; + static const int NSURLHandleLoadFailed = 3; +} - @ffi.Uint64() - external int ri_child_user_time; +abstract class NSDataWritingOptions { + /// Hint to use auxiliary file when saving; equivalent to atomically:YES + static const int NSDataWritingAtomic = 1; - @ffi.Uint64() - external int ri_child_system_time; + /// Hint to prevent overwriting an existing file. Cannot be combined with NSDataWritingAtomic. + static const int NSDataWritingWithoutOverwriting = 2; + static const int NSDataWritingFileProtectionNone = 268435456; + static const int NSDataWritingFileProtectionComplete = 536870912; + static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; + static const int + NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = + 1073741824; + static const int NSDataWritingFileProtectionMask = 4026531840; - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + /// Deprecated name for NSDataWritingAtomic + static const int NSAtomicWrite = 1; +} - @ffi.Uint64() - external int ri_child_interrupt_wkups; +/// Data Search Options +abstract class NSDataSearchOptions { + static const int NSDataSearchBackwards = 1; + static const int NSDataSearchAnchored = 2; +} - @ffi.Uint64() - external int ri_child_pageins; +void _ObjCBlock13_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} - @ffi.Uint64() - external int ri_child_elapsed_abstime; +final _ObjCBlock13_closureRegistry = {}; +int _ObjCBlock13_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock13_registerClosure(Function fn) { + final id = ++_ObjCBlock13_closureRegistryIndex; + _ObjCBlock13_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_diskio_bytesread; +void _ObjCBlock13_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return _ObjCBlock13_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - @ffi.Uint64() - external int ri_diskio_byteswritten; +class ObjCBlock13 extends _ObjCBlockBase { + ObjCBlock13._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_cpu_time_qos_default; + /// Creates a block from a C function pointer. + ObjCBlock13.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>( + _ObjCBlock13_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; + /// Creates a block from a Dart function. + ObjCBlock13.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>( + _ObjCBlock13_closureTrampoline) + .cast(), + _ObjCBlock13_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } +} - @ffi.Uint64() - external int ri_cpu_time_qos_background; +/// Read/Write Options +abstract class NSDataReadingOptions { + /// Hint to map the file in if possible and safe + static const int NSDataReadingMappedIfSafe = 1; - @ffi.Uint64() - external int ri_cpu_time_qos_utility; + /// Hint to get the file not to be cached in the kernel + static const int NSDataReadingUncached = 2; - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; + /// Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given. + static const int NSDataReadingMappedAlways = 8; - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; + /// Deprecated name for NSDataReadingMappedIfSafe + static const int NSDataReadingMapped = 1; - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; + /// Deprecated name for NSDataReadingMapped + static const int NSMappedRead = 1; - @ffi.Uint64() - external int ri_billed_system_time; + /// Deprecated name for NSDataReadingUncached + static const int NSUncachedRead = 2; +} - @ffi.Uint64() - external int ri_serviced_system_time; +void _ObjCBlock14_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); } -class rusage_info_v4 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; +final _ObjCBlock14_closureRegistry = {}; +int _ObjCBlock14_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock14_registerClosure(Function fn) { + final id = ++_ObjCBlock14_closureRegistryIndex; + _ObjCBlock14_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_user_time; +void _ObjCBlock14_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return _ObjCBlock14_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @ffi.Uint64() - external int ri_system_time; +class ObjCBlock14 extends _ObjCBlockBase { + ObjCBlock14._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_pkg_idle_wkups; + /// Creates a block from a C function pointer. + ObjCBlock14.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock14_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_interrupt_wkups; + /// Creates a block from a Dart function. + ObjCBlock14.fromFunction(NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock14_closureTrampoline) + .cast(), + _ObjCBlock14_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); + } +} - @ffi.Uint64() - external int ri_pageins; +abstract class NSDataBase64DecodingOptions { + /// Use the following option to modify the decoding algorithm so that it ignores unknown non-Base64 bytes, including line ending characters. + static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; +} - @ffi.Uint64() - external int ri_wired_size; +/// Base 64 Options +abstract class NSDataBase64EncodingOptions { + /// Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default. + static const int NSDataBase64Encoding64CharacterLineLength = 1; + static const int NSDataBase64Encoding76CharacterLineLength = 2; - @ffi.Uint64() - external int ri_resident_size; + /// Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF. + static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; + static const int NSDataBase64EncodingEndLineWithLineFeed = 32; +} - @ffi.Uint64() - external int ri_phys_footprint; +/// Various algorithms provided for compression APIs. See NSData and NSMutableData. +abstract class NSDataCompressionAlgorithm { + /// LZFSE is the recommended compression algorithm if you don't have a specific reason to use another algorithm. Note that LZFSE is intended for use with Apple devices only. This algorithm generally compresses better than Zlib, but not as well as LZMA. It is generally slower than LZ4. + static const int NSDataCompressionAlgorithmLZFSE = 0; - @ffi.Uint64() - external int ri_proc_start_abstime; + /// LZ4 is appropriate if compression speed is critical. LZ4 generally sacrifices compression ratio in order to achieve its greater speed. + /// This implementation of LZ4 makes a small modification to the standard format, which is described in greater detail in . + static const int NSDataCompressionAlgorithmLZ4 = 1; - @ffi.Uint64() - external int ri_proc_exit_abstime; + /// LZMA is appropriate if compression ratio is critical and memory usage and compression speed are not a factor. LZMA is an order of magnitude slower for both compression and decompression than other algorithms. It can also use a very large amount of memory, so if you need to compress large amounts of data on embedded devices with limited memory you should probably avoid LZMA. + /// Encoding uses LZMA level 6 only, but decompression works with any compression level. + static const int NSDataCompressionAlgorithmLZMA = 2; - @ffi.Uint64() - external int ri_child_user_time; + /// Zlib is appropriate if you want a good balance between compression speed and compression ratio, but only if you need interoperability with non-Apple platforms. Otherwise, LZFSE is generally a better choice than Zlib. + /// Encoding uses Zlib level 5 only, but decompression works with any compression level. It uses the raw DEFLATE format as described in IETF RFC 1951. + static const int NSDataCompressionAlgorithmZlib = 3; +} - @ffi.Uint64() - external int ri_child_system_time; +typedef UTF32Char = UInt32; +typedef UInt32 = ffi.UnsignedInt; - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; +abstract class NSStringEnumerationOptions { + static const int NSStringEnumerationByLines = 0; + static const int NSStringEnumerationByParagraphs = 1; + static const int NSStringEnumerationByComposedCharacterSequences = 2; + static const int NSStringEnumerationByWords = 3; + static const int NSStringEnumerationBySentences = 4; + static const int NSStringEnumerationByCaretPositions = 5; + static const int NSStringEnumerationByDeletionClusters = 6; + static const int NSStringEnumerationReverse = 256; + static const int NSStringEnumerationSubstringNotRequired = 512; + static const int NSStringEnumerationLocalized = 1024; +} - @ffi.Uint64() - external int ri_child_interrupt_wkups; +void _ObjCBlock15_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + NSRange arg2, ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>()(arg0, arg1, arg2, arg3); +} - @ffi.Uint64() - external int ri_child_pageins; +final _ObjCBlock15_closureRegistry = {}; +int _ObjCBlock15_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock15_registerClosure(Function fn) { + final id = ++_ObjCBlock15_closureRegistryIndex; + _ObjCBlock15_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_child_elapsed_abstime; +void _ObjCBlock15_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) { + return _ObjCBlock15_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2, arg3); +} - @ffi.Uint64() - external int ri_diskio_bytesread; +class ObjCBlock15 extends _ObjCBlockBase { + ObjCBlock15._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_diskio_byteswritten; + /// Creates a block from a C function pointer. + ObjCBlock15.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + NSRange arg2, ffi.Pointer arg3)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>( + _ObjCBlock15_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_cpu_time_qos_default; + /// Creates a block from a Dart function. + ObjCBlock15.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>( + _ObjCBlock15_closureTrampoline) + .cast(), + _ObjCBlock15_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>()(_id, arg0, arg1, arg2, arg3); + } +} - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; +void _ObjCBlock16_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} - @ffi.Uint64() - external int ri_cpu_time_qos_background; +final _ObjCBlock16_closureRegistry = {}; +int _ObjCBlock16_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock16_registerClosure(Function fn) { + final id = ++_ObjCBlock16_closureRegistryIndex; + _ObjCBlock16_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_cpu_time_qos_utility; +void _ObjCBlock16_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock16_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; +class ObjCBlock16 extends _ObjCBlockBase { + ObjCBlock16._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; + /// Creates a block from a C function pointer. + ObjCBlock16.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock16_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; + /// Creates a block from a Dart function. + ObjCBlock16.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock16_closureTrampoline) + .cast(), + _ObjCBlock16_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } +} - @ffi.Uint64() - external int ri_billed_system_time; +typedef NSStringEncoding = NSUInteger; - @ffi.Uint64() - external int ri_serviced_system_time; +abstract class NSStringEncodingConversionOptions { + static const int NSStringEncodingConversionAllowLossy = 1; + static const int NSStringEncodingConversionExternalRepresentation = 2; +} - @ffi.Uint64() - external int ri_logical_writes; +typedef NSStringTransform = ffi.Pointer; +void _ObjCBlock17_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); +} - @ffi.Uint64() - external int ri_lifetime_max_phys_footprint; +final _ObjCBlock17_closureRegistry = {}; +int _ObjCBlock17_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock17_registerClosure(Function fn) { + final id = ++_ObjCBlock17_closureRegistryIndex; + _ObjCBlock17_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Uint64() - external int ri_instructions; +void _ObjCBlock17_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { + return _ObjCBlock17_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - @ffi.Uint64() - external int ri_cycles; +class ObjCBlock17 extends _ObjCBlockBase { + ObjCBlock17._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint64() - external int ri_billed_energy; + /// Creates a block from a C function pointer. + ObjCBlock17.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock17_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Uint64() - external int ri_serviced_energy; + /// Creates a block from a Dart function. + ObjCBlock17.fromFunction(NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1)>(_ObjCBlock17_closureTrampoline) + .cast(), + _ObjCBlock17_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); + } +} - @ffi.Uint64() - external int ri_interval_max_phys_footprint; +typedef va_list = __builtin_va_list; +typedef __builtin_va_list = ffi.Pointer; - @ffi.Uint64() - external int ri_runnable_time; +abstract class NSQualityOfService { + static const int NSQualityOfServiceUserInteractive = 33; + static const int NSQualityOfServiceUserInitiated = 25; + static const int NSQualityOfServiceUtility = 17; + static const int NSQualityOfServiceBackground = 9; + static const int NSQualityOfServiceDefault = -1; } -class rusage_info_v5 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; - - @ffi.Uint64() - external int ri_user_time; +abstract class ptrauth_key { + static const int ptrauth_key_asia = 0; + static const int ptrauth_key_asib = 1; + static const int ptrauth_key_asda = 2; + static const int ptrauth_key_asdb = 3; + static const int ptrauth_key_process_independent_code = 0; + static const int ptrauth_key_process_dependent_code = 1; + static const int ptrauth_key_process_independent_data = 2; + static const int ptrauth_key_process_dependent_data = 3; + static const int ptrauth_key_function_pointer = 0; + static const int ptrauth_key_return_address = 1; + static const int ptrauth_key_frame_pointer = 3; + static const int ptrauth_key_block_function = 0; + static const int ptrauth_key_cxx_vtable_pointer = 2; + static const int ptrauth_key_method_list_pointer = 2; + static const int ptrauth_key_objc_isa_pointer = 2; + static const int ptrauth_key_objc_super_pointer = 2; + static const int ptrauth_key_block_descriptor_pointer = 2; + static const int ptrauth_key_objc_sel_pointer = 3; + static const int ptrauth_key_objc_class_ro_pointer = 2; +} - @ffi.Uint64() - external int ri_system_time; +@ffi.Packed(2) +final class wide extends ffi.Struct { + @UInt32() + external int lo; - @ffi.Uint64() - external int ri_pkg_idle_wkups; + @SInt32() + external int hi; +} - @ffi.Uint64() - external int ri_interrupt_wkups; +typedef SInt32 = ffi.Int; - @ffi.Uint64() - external int ri_pageins; +@ffi.Packed(2) +final class UnsignedWide extends ffi.Struct { + @UInt32() + external int lo; - @ffi.Uint64() - external int ri_wired_size; + @UInt32() + external int hi; +} - @ffi.Uint64() - external int ri_resident_size; +final class Float80 extends ffi.Struct { + @SInt16() + external int exp; - @ffi.Uint64() - external int ri_phys_footprint; + @ffi.Array.multi([4]) + external ffi.Array man; +} - @ffi.Uint64() - external int ri_proc_start_abstime; +typedef SInt16 = ffi.Short; +typedef UInt16 = ffi.UnsignedShort; - @ffi.Uint64() - external int ri_proc_exit_abstime; +final class Float96 extends ffi.Struct { + @ffi.Array.multi([2]) + external ffi.Array exp; - @ffi.Uint64() - external int ri_child_user_time; + @ffi.Array.multi([4]) + external ffi.Array man; +} - @ffi.Uint64() - external int ri_child_system_time; +@ffi.Packed(2) +final class Float32Point extends ffi.Struct { + @Float32() + external double x; - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; + @Float32() + external double y; +} - @ffi.Uint64() - external int ri_child_interrupt_wkups; +typedef Float32 = ffi.Float; - @ffi.Uint64() - external int ri_child_pageins; +@ffi.Packed(2) +final class ProcessSerialNumber extends ffi.Struct { + @UInt32() + external int highLongOfPSN; - @ffi.Uint64() - external int ri_child_elapsed_abstime; + @UInt32() + external int lowLongOfPSN; +} - @ffi.Uint64() - external int ri_diskio_bytesread; +final class Point extends ffi.Struct { + @ffi.Short() + external int v; - @ffi.Uint64() - external int ri_diskio_byteswritten; + @ffi.Short() + external int h; +} - @ffi.Uint64() - external int ri_cpu_time_qos_default; +final class Rect extends ffi.Struct { + @ffi.Short() + external int top; - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; + @ffi.Short() + external int left; - @ffi.Uint64() - external int ri_cpu_time_qos_background; + @ffi.Short() + external int bottom; - @ffi.Uint64() - external int ri_cpu_time_qos_utility; + @ffi.Short() + external int right; +} - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; +@ffi.Packed(2) +final class FixedPoint extends ffi.Struct { + @Fixed() + external int x; - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; + @Fixed() + external int y; +} - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; +typedef Fixed = SInt32; - @ffi.Uint64() - external int ri_billed_system_time; +@ffi.Packed(2) +final class FixedRect extends ffi.Struct { + @Fixed() + external int left; - @ffi.Uint64() - external int ri_serviced_system_time; + @Fixed() + external int top; - @ffi.Uint64() - external int ri_logical_writes; + @Fixed() + external int right; - @ffi.Uint64() - external int ri_lifetime_max_phys_footprint; + @Fixed() + external int bottom; +} - @ffi.Uint64() - external int ri_instructions; +final class TimeBaseRecord extends ffi.Opaque {} - @ffi.Uint64() - external int ri_cycles; +@ffi.Packed(2) +final class TimeRecord extends ffi.Struct { + external CompTimeValue value; - @ffi.Uint64() - external int ri_billed_energy; + @TimeScale() + external int scale; - @ffi.Uint64() - external int ri_serviced_energy; + external TimeBase base; +} - @ffi.Uint64() - external int ri_interval_max_phys_footprint; +typedef CompTimeValue = wide; +typedef TimeScale = SInt32; +typedef TimeBase = ffi.Pointer; - @ffi.Uint64() - external int ri_runnable_time; +final class NumVersion extends ffi.Struct { + @UInt8() + external int nonRelRev; - @ffi.Uint64() - external int ri_flags; -} + @UInt8() + external int stage; -class rlimit extends ffi.Struct { - @rlim_t() - external int rlim_cur; + @UInt8() + external int minorAndBugRev; - @rlim_t() - external int rlim_max; + @UInt8() + external int majorRev; } -typedef rlim_t = __uint64_t; +typedef UInt8 = ffi.UnsignedChar; -class proc_rlimit_control_wakeupmon extends ffi.Struct { - @ffi.Uint32() - external int wm_flags; +final class NumVersionVariant extends ffi.Union { + external NumVersion parts; - @ffi.Int32() - external int wm_rate; + @UInt32() + external int whole; } -typedef id_t = __darwin_id_t; -typedef __darwin_id_t = __uint32_t; +final class VersRec extends ffi.Struct { + external NumVersion numericVersion; -class wait extends ffi.Opaque {} + @ffi.Short() + external int countryCode; -class div_t extends ffi.Struct { - @ffi.Int() - external int quot; + @ffi.Array.multi([256]) + external ffi.Array shortVersion; - @ffi.Int() - external int rem; + @ffi.Array.multi([256]) + external ffi.Array reserved; } -class ldiv_t extends ffi.Struct { - @ffi.Long() - external int quot; - - @ffi.Long() - external int rem; -} +typedef ConstStr255Param = ffi.Pointer; -class lldiv_t extends ffi.Struct { - @ffi.LongLong() - external int quot; +final class __CFString extends ffi.Opaque {} - @ffi.LongLong() - external int rem; +abstract class CFComparisonResult { + static const int kCFCompareLessThan = -1; + static const int kCFCompareEqualTo = 0; + static const int kCFCompareGreaterThan = 1; } -int _ObjCBlock20_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} +typedef CFIndex = ffi.Long; -final _ObjCBlock20_closureRegistry = {}; -int _ObjCBlock20_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock20_registerClosure(Function fn) { - final id = ++_ObjCBlock20_closureRegistryIndex; - _ObjCBlock20_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +final class CFRange extends ffi.Struct { + @CFIndex() + external int location; -int _ObjCBlock20_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock20_closureRegistry[block.ref.target.address]!(arg0, arg1); + @CFIndex() + external int length; } -class ObjCBlock20 extends _ObjCBlockBase { - ObjCBlock20._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class __CFNull extends ffi.Opaque {} - /// Creates a block from a C function pointer. - ObjCBlock20.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock20_fnPtrTrampoline, 0) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +typedef CFTypeID = ffi.UnsignedLong; +typedef CFNullRef = ffi.Pointer<__CFNull>; - /// Creates a block from a Dart function. - ObjCBlock20.fromFunction(NativeCupertinoHttp lib, - int Function(ffi.Pointer arg0, ffi.Pointer arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock20_closureTrampoline, 0) - .cast(), - _ObjCBlock20_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - int call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } +final class __CFAllocator extends ffi.Opaque {} - ffi.Pointer<_ObjCBlock> get pointer => _id; -} +typedef CFAllocatorRef = ffi.Pointer<__CFAllocator>; -typedef dev_t = __darwin_dev_t; -typedef __darwin_dev_t = __int32_t; -typedef mode_t = __darwin_mode_t; -typedef __darwin_mode_t = __uint16_t; -typedef __uint16_t = ffi.UnsignedShort; -typedef errno_t = ffi.Int; -typedef rsize_t = __darwin_size_t; +final class CFAllocatorContext extends ffi.Struct { + @CFIndex() + external int version; -class timespec extends ffi.Struct { - @__darwin_time_t() - external int tv_sec; + external ffi.Pointer info; - @ffi.Long() - external int tv_nsec; -} + external CFAllocatorRetainCallBack retain; -class tm extends ffi.Struct { - @ffi.Int() - external int tm_sec; + external CFAllocatorReleaseCallBack release; - @ffi.Int() - external int tm_min; + external CFAllocatorCopyDescriptionCallBack copyDescription; - @ffi.Int() - external int tm_hour; + external CFAllocatorAllocateCallBack allocate; - @ffi.Int() - external int tm_mday; + external CFAllocatorReallocateCallBack reallocate; - @ffi.Int() - external int tm_mon; + external CFAllocatorDeallocateCallBack deallocate; - @ffi.Int() - external int tm_year; + external CFAllocatorPreferredSizeCallBack preferredSize; +} - @ffi.Int() - external int tm_wday; +typedef CFAllocatorRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>>; +typedef CFAllocatorReleaseCallBack = ffi + .Pointer info)>>; +typedef CFAllocatorCopyDescriptionCallBack = ffi.Pointer< + ffi.NativeFunction info)>>; +typedef CFStringRef = ffi.Pointer<__CFString>; +typedef CFAllocatorAllocateCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFIndex allocSize, CFOptionFlags hint, + ffi.Pointer info)>>; +typedef CFOptionFlags = ffi.UnsignedLong; +typedef CFAllocatorReallocateCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer ptr, + CFIndex newsize, CFOptionFlags hint, ffi.Pointer info)>>; +typedef CFAllocatorDeallocateCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer ptr, ffi.Pointer info)>>; +typedef CFAllocatorPreferredSizeCallBack = ffi.Pointer< + ffi.NativeFunction< + CFIndex Function( + CFIndex size, CFOptionFlags hint, ffi.Pointer info)>>; +typedef CFTypeRef = ffi.Pointer; +typedef Boolean = ffi.UnsignedChar; +typedef CFHashCode = ffi.UnsignedLong; +typedef NSZone = _NSZone; - @ffi.Int() - external int tm_yday; +class NSMutableIndexSet extends NSIndexSet { + NSMutableIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Int() - external int tm_isdst; + /// Returns a [NSMutableIndexSet] that points to the same underlying object as [other]. + static NSMutableIndexSet castFrom(T other) { + return NSMutableIndexSet._(other._id, other._lib, + retain: true, release: true); + } - @ffi.Long() - external int tm_gmtoff; + /// Returns a [NSMutableIndexSet] that wraps the given raw object pointer. + static NSMutableIndexSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableIndexSet._(other, lib, retain: retain, release: release); + } - external ffi.Pointer tm_zone; -} + /// Returns whether [obj] is an instance of [NSMutableIndexSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableIndexSet1); + } -typedef clock_t = __darwin_clock_t; -typedef __darwin_clock_t = ffi.UnsignedLong; -typedef time_t = __darwin_time_t; + void addIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_285( + _id, _lib._sel_addIndexes_1, indexSet?._id ?? ffi.nullptr); + } -abstract class clockid_t { - static const int _CLOCK_REALTIME = 0; - static const int _CLOCK_MONOTONIC = 6; - static const int _CLOCK_MONOTONIC_RAW = 4; - static const int _CLOCK_MONOTONIC_RAW_APPROX = 5; - static const int _CLOCK_UPTIME_RAW = 8; - static const int _CLOCK_UPTIME_RAW_APPROX = 9; - static const int _CLOCK_PROCESS_CPUTIME_ID = 12; - static const int _CLOCK_THREAD_CPUTIME_ID = 16; -} + void removeIndexes_(NSIndexSet? indexSet) { + return _lib._objc_msgSend_285( + _id, _lib._sel_removeIndexes_1, indexSet?._id ?? ffi.nullptr); + } -typedef intmax_t = ffi.Long; + void removeAllIndexes() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllIndexes1); + } -class imaxdiv_t extends ffi.Struct { - @intmax_t() - external int quot; + void addIndex_(int value) { + return _lib._objc_msgSend_286(_id, _lib._sel_addIndex_1, value); + } - @intmax_t() - external int rem; -} + void removeIndex_(int value) { + return _lib._objc_msgSend_286(_id, _lib._sel_removeIndex_1, value); + } -typedef uintmax_t = ffi.UnsignedLong; + void addIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_287(_id, _lib._sel_addIndexesInRange_1, range); + } -class CFBagCallBacks extends ffi.Struct { - @CFIndex() - external int version; + void removeIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_287(_id, _lib._sel_removeIndexesInRange_1, range); + } - external CFBagRetainCallBack retain; + void shiftIndexesStartingAtIndex_by_(int index, int delta) { + return _lib._objc_msgSend_288( + _id, _lib._sel_shiftIndexesStartingAtIndex_by_1, index, delta); + } - external CFBagReleaseCallBack release; + static NSMutableIndexSet indexSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableIndexSet1, _lib._sel_indexSet1); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } - external CFBagCopyDescriptionCallBack copyDescription; + static NSMutableIndexSet indexSetWithIndex_( + NativeCupertinoHttp _lib, int value) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableIndexSet1, _lib._sel_indexSetWithIndex_1, value); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } - external CFBagEqualCallBack equal; + static NSMutableIndexSet indexSetWithIndexesInRange_( + NativeCupertinoHttp _lib, NSRange range) { + final _ret = _lib._objc_msgSend_111(_lib._class_NSMutableIndexSet1, + _lib._sel_indexSetWithIndexesInRange_1, range); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } - external CFBagHashCallBack hash; -} + static NSMutableIndexSet new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_new1); + return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + } -typedef CFBagRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFBagReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFBagCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFBagEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFBagHashCallBack = ffi - .Pointer)>>; + static NSMutableIndexSet alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_alloc1); + return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + } +} -class __CFBag extends ffi.Opaque {} +/// Mutable Array +class NSMutableArray extends NSArray { + NSMutableArray._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -typedef CFBagRef = ffi.Pointer<__CFBag>; -typedef CFMutableBagRef = ffi.Pointer<__CFBag>; -typedef CFBagApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + /// Returns a [NSMutableArray] that points to the same underlying object as [other]. + static NSMutableArray castFrom(T other) { + return NSMutableArray._(other._id, other._lib, retain: true, release: true); + } -class CFBinaryHeapCompareContext extends ffi.Struct { - @CFIndex() - external int version; + /// Returns a [NSMutableArray] that wraps the given raw object pointer. + static NSMutableArray castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableArray._(other, lib, retain: retain, release: release); + } - external ffi.Pointer info; + /// Returns whether [obj] is an instance of [NSMutableArray]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableArray1); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + void addObject_(NSObject anObject) { + return _lib._objc_msgSend_200(_id, _lib._sel_addObject_1, anObject._id); + } - external ffi - .Pointer)>> - release; + void insertObject_atIndex_(NSObject anObject, int index) { + return _lib._objc_msgSend_289( + _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + void removeLastObject() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); + } -class CFBinaryHeapCallBacks extends ffi.Struct { - @CFIndex() - external int version; + void removeObjectAtIndex_(int index) { + return _lib._objc_msgSend_286(_id, _lib._sel_removeObjectAtIndex_1, index); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef, ffi.Pointer)>> retain; + void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { + return _lib._objc_msgSend_290( + _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>> release; + @override + NSMutableArray init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; + NSMutableArray initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>> compare; -} + @override + NSMutableArray initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -class __CFBinaryHeap extends ffi.Opaque {} + void addObjectsFromArray_(NSArray? otherArray) { + return _lib._objc_msgSend_291( + _id, _lib._sel_addObjectsFromArray_1, otherArray?._id ?? ffi.nullptr); + } -typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; -typedef CFBinaryHeapApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + return _lib._objc_msgSend_292( + _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); + } -class __CFBitVector extends ffi.Opaque {} + void removeAllObjects() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } -typedef CFBitVectorRef = ffi.Pointer<__CFBitVector>; -typedef CFMutableBitVectorRef = ffi.Pointer<__CFBitVector>; -typedef CFBit = UInt32; + void removeObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_293( + _id, _lib._sel_removeObject_inRange_1, anObject._id, range); + } -abstract class __CFByteOrder { - static const int CFByteOrderUnknown = 0; - static const int CFByteOrderLittleEndian = 1; - static const int CFByteOrderBigEndian = 2; -} + void removeObject_(NSObject anObject) { + return _lib._objc_msgSend_200(_id, _lib._sel_removeObject_1, anObject._id); + } -class CFSwappedFloat32 extends ffi.Struct { - @ffi.Uint32() - external int v; -} + void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_293( + _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); + } -class CFSwappedFloat64 extends ffi.Struct { - @ffi.Uint64() - external int v; -} + void removeObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); + } -class CFDictionaryKeyCallBacks extends ffi.Struct { - @CFIndex() - external int version; + void removeObjectsFromIndices_numIndices_( + ffi.Pointer indices, int cnt) { + return _lib._objc_msgSend_294( + _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); + } - external CFDictionaryRetainCallBack retain; + void removeObjectsInArray_(NSArray? otherArray) { + return _lib._objc_msgSend_291( + _id, _lib._sel_removeObjectsInArray_1, otherArray?._id ?? ffi.nullptr); + } - external CFDictionaryReleaseCallBack release; + void removeObjectsInRange_(NSRange range) { + return _lib._objc_msgSend_287(_id, _lib._sel_removeObjectsInRange_1, range); + } - external CFDictionaryCopyDescriptionCallBack copyDescription; + void replaceObjectsInRange_withObjectsFromArray_range_( + NSRange range, NSArray? otherArray, NSRange otherRange) { + return _lib._objc_msgSend_295( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, + range, + otherArray?._id ?? ffi.nullptr, + otherRange); + } - external CFDictionaryEqualCallBack equal; + void replaceObjectsInRange_withObjectsFromArray_( + NSRange range, NSArray? otherArray) { + return _lib._objc_msgSend_296( + _id, + _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, + range, + otherArray?._id ?? ffi.nullptr); + } - external CFDictionaryHashCallBack hash; -} + void setArray_(NSArray? otherArray) { + return _lib._objc_msgSend_291( + _id, _lib._sel_setArray_1, otherArray?._id ?? ffi.nullptr); + } -typedef CFDictionaryRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFDictionaryReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFDictionaryCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFDictionaryEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFDictionaryHashCallBack = ffi - .Pointer)>>; + void sortUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context) { + return _lib._objc_msgSend_297( + _id, _lib._sel_sortUsingFunction_context_1, compare, context); + } -class CFDictionaryValueCallBacks extends ffi.Struct { - @CFIndex() - external int version; + void sortUsingSelector_(ffi.Pointer comparator) { + return _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); + } - external CFDictionaryRetainCallBack retain; + void insertObjects_atIndexes_(NSArray? objects, NSIndexSet? indexes) { + return _lib._objc_msgSend_298(_id, _lib._sel_insertObjects_atIndexes_1, + objects?._id ?? ffi.nullptr, indexes?._id ?? ffi.nullptr); + } - external CFDictionaryReleaseCallBack release; + void removeObjectsAtIndexes_(NSIndexSet? indexes) { + return _lib._objc_msgSend_285( + _id, _lib._sel_removeObjectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + } - external CFDictionaryCopyDescriptionCallBack copyDescription; + void replaceObjectsAtIndexes_withObjects_( + NSIndexSet? indexes, NSArray? objects) { + return _lib._objc_msgSend_299( + _id, + _lib._sel_replaceObjectsAtIndexes_withObjects_1, + indexes?._id ?? ffi.nullptr, + objects?._id ?? ffi.nullptr); + } - external CFDictionaryEqualCallBack equal; -} + void setObject_atIndexedSubscript_(NSObject obj, int idx) { + return _lib._objc_msgSend_289( + _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); + } -class __CFDictionary extends ffi.Opaque {} + void sortUsingComparator_(NSComparator cmptr) { + return _lib._objc_msgSend_300(_id, _lib._sel_sortUsingComparator_1, cmptr); + } -typedef CFDictionaryRef = ffi.Pointer<__CFDictionary>; -typedef CFMutableDictionaryRef = ffi.Pointer<__CFDictionary>; -typedef CFDictionaryApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>; + void sortWithOptions_usingComparator_(int opts, NSComparator cmptr) { + return _lib._objc_msgSend_301( + _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr); + } -class __CFNotificationCenter extends ffi.Opaque {} + static NSMutableArray arrayWithCapacity_( + NativeCupertinoHttp _lib, int numItems) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -abstract class CFNotificationSuspensionBehavior { - static const int CFNotificationSuspensionBehaviorDrop = 1; - static const int CFNotificationSuspensionBehaviorCoalesce = 2; - static const int CFNotificationSuspensionBehaviorHold = 3; - static const int CFNotificationSuspensionBehaviorDeliverImmediately = 4; -} + static NSMutableArray arrayWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_302(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -typedef CFNotificationCenterRef = ffi.Pointer<__CFNotificationCenter>; -typedef CFNotificationCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFNotificationCenterRef, ffi.Pointer, - CFNotificationName, ffi.Pointer, CFDictionaryRef)>>; -typedef CFNotificationName = CFStringRef; + static NSMutableArray arrayWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_303(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -class __CFLocale extends ffi.Opaque {} + NSMutableArray initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_302( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -typedef CFLocaleRef = ffi.Pointer<__CFLocale>; -typedef CFLocaleIdentifier = CFStringRef; -typedef LangCode = SInt16; -typedef RegionCode = SInt16; + NSMutableArray initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_303( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -abstract class CFLocaleLanguageDirection { - static const int kCFLocaleLanguageDirectionUnknown = 0; - static const int kCFLocaleLanguageDirectionLeftToRight = 1; - static const int kCFLocaleLanguageDirectionRightToLeft = 2; - static const int kCFLocaleLanguageDirectionTopToBottom = 3; - static const int kCFLocaleLanguageDirectionBottomToTop = 4; -} + void applyDifference_(NSOrderedCollectionDifference? difference) { + return _lib._objc_msgSend_304( + _id, _lib._sel_applyDifference_1, difference?._id ?? ffi.nullptr); + } -typedef CFLocaleKey = CFStringRef; -typedef CFCalendarIdentifier = CFStringRef; -typedef CFAbsoluteTime = CFTimeInterval; -typedef CFTimeInterval = ffi.Double; + static NSMutableArray array(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -class __CFDate extends ffi.Opaque {} + static NSMutableArray arrayWithObject_( + NativeCupertinoHttp _lib, NSObject anObject) { + final _ret = _lib._objc_msgSend_91( + _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -typedef CFDateRef = ffi.Pointer<__CFDate>; + static NSMutableArray arrayWithObjects_count_(NativeCupertinoHttp _lib, + ffi.Pointer> objects, int cnt) { + final _ret = _lib._objc_msgSend_95(_lib._class_NSMutableArray1, + _lib._sel_arrayWithObjects_count_1, objects, cnt); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -class __CFTimeZone extends ffi.Opaque {} + static NSMutableArray arrayWithObjects_( + NativeCupertinoHttp _lib, NSObject firstObj) { + final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableArray1, + _lib._sel_arrayWithObjects_1, firstObj._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } -class CFGregorianDate extends ffi.Struct { - @SInt32() - external int year; + static NSMutableArray arrayWithArray_( + NativeCupertinoHttp _lib, NSArray? array) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableArray1, + _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } - @SInt8() - external int month; + /// Reads array stored in NSPropertyList format from the specified url. + static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL? url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_145( + _lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSArray._(_ret, _lib, retain: true, release: true); + } - @SInt8() - external int day; + static NSMutableArray new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } - @SInt8() - external int hour; + static NSMutableArray alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } +} - @SInt8() - external int minute; +/// Mutable Data +class NSMutableData extends NSData { + NSMutableData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Double() - external double second; -} + /// Returns a [NSMutableData] that points to the same underlying object as [other]. + static NSMutableData castFrom(T other) { + return NSMutableData._(other._id, other._lib, retain: true, release: true); + } -typedef SInt8 = ffi.SignedChar; + /// Returns a [NSMutableData] that wraps the given raw object pointer. + static NSMutableData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableData._(other, lib, retain: retain, release: release); + } -class CFGregorianUnits extends ffi.Struct { - @SInt32() - external int years; + /// Returns whether [obj] is an instance of [NSMutableData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); + } - @SInt32() - external int months; + ffi.Pointer get mutableBytes { + return _lib._objc_msgSend_31(_id, _lib._sel_mutableBytes1); + } - @SInt32() - external int days; + @override + int get length { + return _lib._objc_msgSend_12(_id, _lib._sel_length1); + } - @SInt32() - external int hours; + set length(int value) { + _lib._objc_msgSend_305(_id, _lib._sel_setLength_1, value); + } - @SInt32() - external int minutes; + void appendBytes_length_(ffi.Pointer bytes, int length) { + return _lib._objc_msgSend_33( + _id, _lib._sel_appendBytes_length_1, bytes, length); + } - @ffi.Double() - external double seconds; -} + void appendData_(NSData? other) { + return _lib._objc_msgSend_306( + _id, _lib._sel_appendData_1, other?._id ?? ffi.nullptr); + } -abstract class CFGregorianUnitFlags { - static const int kCFGregorianUnitsYears = 1; - static const int kCFGregorianUnitsMonths = 2; - static const int kCFGregorianUnitsDays = 4; - static const int kCFGregorianUnitsHours = 8; - static const int kCFGregorianUnitsMinutes = 16; - static const int kCFGregorianUnitsSeconds = 32; - static const int kCFGregorianAllUnits = 16777215; -} + void increaseLengthBy_(int extraLength) { + return _lib._objc_msgSend_286( + _id, _lib._sel_increaseLengthBy_1, extraLength); + } -typedef CFTimeZoneRef = ffi.Pointer<__CFTimeZone>; + void replaceBytesInRange_withBytes_( + NSRange range, ffi.Pointer bytes) { + return _lib._objc_msgSend_307( + _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); + } -class __CFData extends ffi.Opaque {} + void resetBytesInRange_(NSRange range) { + return _lib._objc_msgSend_287(_id, _lib._sel_resetBytesInRange_1, range); + } -typedef CFDataRef = ffi.Pointer<__CFData>; -typedef CFMutableDataRef = ffi.Pointer<__CFData>; + void setData_(NSData? data) { + return _lib._objc_msgSend_306( + _id, _lib._sel_setData_1, data?._id ?? ffi.nullptr); + } -abstract class CFDataSearchFlags { - static const int kCFDataSearchBackwards = 1; - static const int kCFDataSearchAnchored = 2; -} + void replaceBytesInRange_withBytes_length_(NSRange range, + ffi.Pointer replacementBytes, int replacementLength) { + return _lib._objc_msgSend_308( + _id, + _lib._sel_replaceBytesInRange_withBytes_length_1, + range, + replacementBytes, + replacementLength); + } -class __CFCharacterSet extends ffi.Opaque {} + static NSMutableData dataWithCapacity_( + NativeCupertinoHttp _lib, int aNumItems) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFCharacterSetPredefinedSet { - static const int kCFCharacterSetControl = 1; - static const int kCFCharacterSetWhitespace = 2; - static const int kCFCharacterSetWhitespaceAndNewline = 3; - static const int kCFCharacterSetDecimalDigit = 4; - static const int kCFCharacterSetLetter = 5; - static const int kCFCharacterSetLowercaseLetter = 6; - static const int kCFCharacterSetUppercaseLetter = 7; - static const int kCFCharacterSetNonBase = 8; - static const int kCFCharacterSetDecomposable = 9; - static const int kCFCharacterSetAlphaNumeric = 10; - static const int kCFCharacterSetPunctuation = 11; - static const int kCFCharacterSetCapitalizedLetter = 13; - static const int kCFCharacterSetSymbol = 14; - static const int kCFCharacterSetNewline = 15; - static const int kCFCharacterSetIllegal = 12; -} + static NSMutableData dataWithLength_(NativeCupertinoHttp _lib, int length) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -typedef CFCharacterSetRef = ffi.Pointer<__CFCharacterSet>; -typedef CFMutableCharacterSetRef = ffi.Pointer<__CFCharacterSet>; -typedef UniChar = UInt16; + NSMutableData initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, capacity); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFStringBuiltInEncodings { - static const int kCFStringEncodingMacRoman = 0; - static const int kCFStringEncodingWindowsLatin1 = 1280; - static const int kCFStringEncodingISOLatin1 = 513; - static const int kCFStringEncodingNextStepLatin = 2817; - static const int kCFStringEncodingASCII = 1536; - static const int kCFStringEncodingUnicode = 256; - static const int kCFStringEncodingUTF8 = 134217984; - static const int kCFStringEncodingNonLossyASCII = 3071; - static const int kCFStringEncodingUTF16 = 256; - static const int kCFStringEncodingUTF16BE = 268435712; - static const int kCFStringEncodingUTF16LE = 335544576; - static const int kCFStringEncodingUTF32 = 201326848; - static const int kCFStringEncodingUTF32BE = 402653440; - static const int kCFStringEncodingUTF32LE = 469762304; -} + NSMutableData initWithLength_(int length) { + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithLength_1, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -typedef CFStringEncoding = UInt32; -typedef CFMutableStringRef = ffi.Pointer<__CFString>; -typedef StringPtr = ffi.Pointer; -typedef ConstStringPtr = ffi.Pointer; + /// These methods compress or decompress the receiver's contents in-place using the specified algorithm. If the operation is not successful, these methods leave the receiver unchanged.. + bool decompressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_309( + _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); + } -abstract class CFStringCompareFlags { - static const int kCFCompareCaseInsensitive = 1; - static const int kCFCompareBackwards = 4; - static const int kCFCompareAnchored = 8; - static const int kCFCompareNonliteral = 16; - static const int kCFCompareLocalized = 32; - static const int kCFCompareNumerically = 64; - static const int kCFCompareDiacriticInsensitive = 128; - static const int kCFCompareWidthInsensitive = 256; - static const int kCFCompareForcedOrdering = 512; -} + bool compressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _lib._objc_msgSend_309( + _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); + } -abstract class CFStringNormalizationForm { - static const int kCFStringNormalizationFormD = 0; - static const int kCFStringNormalizationFormKD = 1; - static const int kCFStringNormalizationFormC = 2; - static const int kCFStringNormalizationFormKC = 3; -} + static NSMutableData data(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -class CFStringInlineBuffer extends ffi.Struct { - @ffi.Array.multi([64]) - external ffi.Array buffer; + static NSMutableData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, + _lib._sel_dataWithBytes_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } - external CFStringRef theString; + static NSMutableData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } - external ffi.Pointer directUniCharBuffer; + static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_213(_lib._class_NSMutableData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } - external ffi.Pointer directCStringBuffer; + static NSMutableData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } - external CFRange rangeToBuffer; + static NSMutableData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } - @CFIndex() - external int bufferedRangeStart; + static NSMutableData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } - @CFIndex() - external int bufferedRangeEnd; -} + static NSMutableData dataWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFTimeZoneNameStyle { - static const int kCFTimeZoneNameStyleStandard = 0; - static const int kCFTimeZoneNameStyleShortStandard = 1; - static const int kCFTimeZoneNameStyleDaylightSaving = 2; - static const int kCFTimeZoneNameStyleShortDaylightSaving = 3; - static const int kCFTimeZoneNameStyleGeneric = 4; - static const int kCFTimeZoneNameStyleShortGeneric = 5; -} + static NSMutableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSMutableData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: true, release: true); + } -class __CFCalendar extends ffi.Opaque {} + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -typedef CFCalendarRef = ffi.Pointer<__CFCalendar>; + static NSMutableData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } -abstract class CFCalendarUnit { - static const int kCFCalendarUnitEra = 2; - static const int kCFCalendarUnitYear = 4; - static const int kCFCalendarUnitMonth = 8; - static const int kCFCalendarUnitDay = 16; - static const int kCFCalendarUnitHour = 32; - static const int kCFCalendarUnitMinute = 64; - static const int kCFCalendarUnitSecond = 128; - static const int kCFCalendarUnitWeek = 256; - static const int kCFCalendarUnitWeekday = 512; - static const int kCFCalendarUnitWeekdayOrdinal = 1024; - static const int kCFCalendarUnitQuarter = 2048; - static const int kCFCalendarUnitWeekOfMonth = 4096; - static const int kCFCalendarUnitWeekOfYear = 8192; - static const int kCFCalendarUnitYearForWeekOfYear = 16384; + static NSMutableData alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } } -class __CFDateFormatter extends ffi.Opaque {} +/// Purgeable Data +class NSPurgeableData extends NSMutableData { + NSPurgeableData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -abstract class CFDateFormatterStyle { - static const int kCFDateFormatterNoStyle = 0; - static const int kCFDateFormatterShortStyle = 1; - static const int kCFDateFormatterMediumStyle = 2; - static const int kCFDateFormatterLongStyle = 3; - static const int kCFDateFormatterFullStyle = 4; -} + /// Returns a [NSPurgeableData] that points to the same underlying object as [other]. + static NSPurgeableData castFrom(T other) { + return NSPurgeableData._(other._id, other._lib, + retain: true, release: true); + } -abstract class CFISO8601DateFormatOptions { - static const int kCFISO8601DateFormatWithYear = 1; - static const int kCFISO8601DateFormatWithMonth = 2; - static const int kCFISO8601DateFormatWithWeekOfYear = 4; - static const int kCFISO8601DateFormatWithDay = 16; - static const int kCFISO8601DateFormatWithTime = 32; - static const int kCFISO8601DateFormatWithTimeZone = 64; - static const int kCFISO8601DateFormatWithSpaceBetweenDateAndTime = 128; - static const int kCFISO8601DateFormatWithDashSeparatorInDate = 256; - static const int kCFISO8601DateFormatWithColonSeparatorInTime = 512; - static const int kCFISO8601DateFormatWithColonSeparatorInTimeZone = 1024; - static const int kCFISO8601DateFormatWithFractionalSeconds = 2048; - static const int kCFISO8601DateFormatWithFullDate = 275; - static const int kCFISO8601DateFormatWithFullTime = 1632; - static const int kCFISO8601DateFormatWithInternetDateTime = 1907; -} + /// Returns a [NSPurgeableData] that wraps the given raw object pointer. + static NSPurgeableData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSPurgeableData._(other, lib, retain: retain, release: release); + } -typedef CFDateFormatterRef = ffi.Pointer<__CFDateFormatter>; -typedef CFDateFormatterKey = CFStringRef; + /// Returns whether [obj] is an instance of [NSPurgeableData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSPurgeableData1); + } -class __CFError extends ffi.Opaque {} + static NSPurgeableData dataWithCapacity_( + NativeCupertinoHttp _lib, int aNumItems) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSPurgeableData1, _lib._sel_dataWithCapacity_1, aNumItems); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -typedef CFErrorDomain = CFStringRef; -typedef CFErrorRef = ffi.Pointer<__CFError>; + static NSPurgeableData dataWithLength_(NativeCupertinoHttp _lib, int length) { + final _ret = _lib._objc_msgSend_94( + _lib._class_NSPurgeableData1, _lib._sel_dataWithLength_1, length); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData data(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_data1); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -class __CFBoolean extends ffi.Opaque {} + static NSPurgeableData dataWithBytes_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytes_length_1, bytes, length); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -typedef CFBooleanRef = ffi.Pointer<__CFBoolean>; + static NSPurgeableData dataWithBytesNoCopy_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } -abstract class CFNumberType { - static const int kCFNumberSInt8Type = 1; - static const int kCFNumberSInt16Type = 2; - static const int kCFNumberSInt32Type = 3; - static const int kCFNumberSInt64Type = 4; - static const int kCFNumberFloat32Type = 5; - static const int kCFNumberFloat64Type = 6; - static const int kCFNumberCharType = 7; - static const int kCFNumberShortType = 8; - static const int kCFNumberIntType = 9; - static const int kCFNumberLongType = 10; - static const int kCFNumberLongLongType = 11; - static const int kCFNumberFloatType = 12; - static const int kCFNumberDoubleType = 13; - static const int kCFNumberCFIndexType = 14; - static const int kCFNumberNSIntegerType = 15; - static const int kCFNumberCGFloatType = 16; - static const int kCFNumberMaxType = 16; -} + static NSPurgeableData dataWithBytesNoCopy_length_freeWhenDone_( + NativeCupertinoHttp _lib, + ffi.Pointer bytes, + int length, + bool b) { + final _ret = _lib._objc_msgSend_213(_lib._class_NSPurgeableData1, + _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } -class __CFNumber extends ffi.Opaque {} + static NSPurgeableData dataWithContentsOfFile_options_error_( + NativeCupertinoHttp _lib, + NSString? path, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_214( + _lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfFile_options_error_1, + path?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -typedef CFNumberRef = ffi.Pointer<__CFNumber>; + static NSPurgeableData dataWithContentsOfURL_options_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfURL_options_error_1, + url?._id ?? ffi.nullptr, + readOptionsMask, + errorPtr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -class __CFNumberFormatter extends ffi.Opaque {} + static NSPurgeableData dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFNumberFormatterStyle { - static const int kCFNumberFormatterNoStyle = 0; - static const int kCFNumberFormatterDecimalStyle = 1; - static const int kCFNumberFormatterCurrencyStyle = 2; - static const int kCFNumberFormatterPercentStyle = 3; - static const int kCFNumberFormatterScientificStyle = 4; - static const int kCFNumberFormatterSpellOutStyle = 5; - static const int kCFNumberFormatterOrdinalStyle = 6; - static const int kCFNumberFormatterCurrencyISOCodeStyle = 8; - static const int kCFNumberFormatterCurrencyPluralStyle = 9; - static const int kCFNumberFormatterCurrencyAccountingStyle = 10; -} + static NSPurgeableData dataWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -typedef CFNumberFormatterRef = ffi.Pointer<__CFNumberFormatter>; + static NSPurgeableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSPurgeableData1, + _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); + } -abstract class CFNumberFormatterOptionFlags { - static const int kCFNumberFormatterParseIntegersOnly = 1; -} + static NSObject dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -typedef CFNumberFormatterKey = CFStringRef; + static NSPurgeableData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_new1); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } -abstract class CFNumberFormatterRoundingMode { - static const int kCFNumberFormatterRoundCeiling = 0; - static const int kCFNumberFormatterRoundFloor = 1; - static const int kCFNumberFormatterRoundDown = 2; - static const int kCFNumberFormatterRoundUp = 3; - static const int kCFNumberFormatterRoundHalfEven = 4; - static const int kCFNumberFormatterRoundHalfDown = 5; - static const int kCFNumberFormatterRoundHalfUp = 6; + static NSPurgeableData alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_alloc1); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } } -abstract class CFNumberFormatterPadPosition { - static const int kCFNumberFormatterPadBeforePrefix = 0; - static const int kCFNumberFormatterPadAfterPrefix = 1; - static const int kCFNumberFormatterPadBeforeSuffix = 2; - static const int kCFNumberFormatterPadAfterSuffix = 3; -} +/// Mutable Dictionary +class NSMutableDictionary extends NSDictionary { + NSMutableDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -typedef CFPropertyListRef = CFTypeRef; + /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. + static NSMutableDictionary castFrom(T other) { + return NSMutableDictionary._(other._id, other._lib, + retain: true, release: true); + } -abstract class CFURLPathStyle { - static const int kCFURLPOSIXPathStyle = 0; - static const int kCFURLHFSPathStyle = 1; - static const int kCFURLWindowsPathStyle = 2; -} + /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. + static NSMutableDictionary castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableDictionary._(other, lib, retain: retain, release: release); + } -class __CFURL extends ffi.Opaque {} + /// Returns whether [obj] is an instance of [NSMutableDictionary]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableDictionary1); + } -typedef CFURLRef = ffi.Pointer<__CFURL>; + void removeObjectForKey_(NSObject aKey) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObjectForKey_1, aKey._id); + } -abstract class CFURLComponentType { - static const int kCFURLComponentScheme = 1; - static const int kCFURLComponentNetLocation = 2; - static const int kCFURLComponentPath = 3; - static const int kCFURLComponentResourceSpecifier = 4; - static const int kCFURLComponentUser = 5; - static const int kCFURLComponentPassword = 6; - static const int kCFURLComponentUserInfo = 7; - static const int kCFURLComponentHost = 8; - static const int kCFURLComponentPort = 9; - static const int kCFURLComponentParameterString = 10; - static const int kCFURLComponentQuery = 11; - static const int kCFURLComponentFragment = 12; -} + void setObject_forKey_(NSObject anObject, NSObject aKey) { + return _lib._objc_msgSend_310( + _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); + } -class FSRef extends ffi.Opaque {} + @override + NSMutableDictionary init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -abstract class CFURLBookmarkCreationOptions { - static const int kCFURLBookmarkCreationMinimalBookmarkMask = 512; - static const int kCFURLBookmarkCreationSuitableForBookmarkFile = 1024; - static const int kCFURLBookmarkCreationWithSecurityScope = 2048; - static const int kCFURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = - 4096; - static const int kCFURLBookmarkCreationWithoutImplicitSecurityScope = - 536870912; - static const int kCFURLBookmarkCreationPreferFileIDResolutionMask = 256; -} + NSMutableDictionary initWithCapacity_(int numItems) { + final _ret = + _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -abstract class CFURLBookmarkResolutionOptions { - static const int kCFURLBookmarkResolutionWithoutUIMask = 256; - static const int kCFURLBookmarkResolutionWithoutMountingMask = 512; - static const int kCFURLBookmarkResolutionWithSecurityScope = 1024; - static const int kCFURLBookmarkResolutionWithoutImplicitStartAccessing = - 32768; - static const int kCFBookmarkResolutionWithoutUIMask = 256; - static const int kCFBookmarkResolutionWithoutMountingMask = 512; -} + @override + NSMutableDictionary initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -typedef CFURLBookmarkFileCreationOptions = CFOptionFlags; + void addEntriesFromDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_311(_id, _lib._sel_addEntriesFromDictionary_1, + otherDictionary?._id ?? ffi.nullptr); + } -class mach_port_status extends ffi.Struct { - @mach_port_rights_t() - external int mps_pset; + void removeAllObjects() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + } - @mach_port_seqno_t() - external int mps_seqno; + void removeObjectsForKeys_(NSArray? keyArray) { + return _lib._objc_msgSend_291( + _id, _lib._sel_removeObjectsForKeys_1, keyArray?._id ?? ffi.nullptr); + } - @mach_port_mscount_t() - external int mps_mscount; + void setDictionary_(NSDictionary? otherDictionary) { + return _lib._objc_msgSend_311( + _id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr); + } - @mach_port_msgcount_t() - external int mps_qlimit; + void setObject_forKeyedSubscript_(NSObject obj, NSObject key) { + return _lib._objc_msgSend_310( + _id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id); + } - @mach_port_msgcount_t() - external int mps_msgcount; + static NSMutableDictionary dictionaryWithCapacity_( + NativeCupertinoHttp _lib, int numItems) { + final _ret = _lib._objc_msgSend_94(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithCapacity_1, numItems); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - @mach_port_rights_t() - external int mps_sorights; + static NSMutableDictionary dictionaryWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_312(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - @boolean_t() - external int mps_srights; + static NSMutableDictionary dictionaryWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_313(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - @boolean_t() - external int mps_pdrequest; + NSMutableDictionary initWithContentsOfFile_(NSString? path) { + final _ret = _lib._objc_msgSend_312( + _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - @boolean_t() - external int mps_nsrequest; + NSMutableDictionary initWithContentsOfURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_313( + _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - @natural_t() - external int mps_flags; -} + /// Create a mutable dictionary which is optimized for dealing with a known set of keys. + /// Keys that are not in the key set can still be set into the dictionary, but that usage is not optimal. + /// As with any dictionary, the keys must be copyable. + /// If keyset is nil, an exception is thrown. + /// If keyset is not an object returned by +sharedKeySetForKeys:, an exception is thrown. + static NSMutableDictionary dictionaryWithSharedKeySet_( + NativeCupertinoHttp _lib, NSObject keyset) { + final _ret = _lib._objc_msgSend_314(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -typedef mach_port_rights_t = natural_t; -typedef natural_t = __darwin_natural_t; -typedef __darwin_natural_t = ffi.UnsignedInt; -typedef mach_port_seqno_t = natural_t; -typedef mach_port_mscount_t = natural_t; -typedef mach_port_msgcount_t = natural_t; -typedef boolean_t = ffi.Int; + static NSMutableDictionary dictionary(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -class mach_port_limits extends ffi.Struct { - @mach_port_msgcount_t() - external int mpl_qlimit; -} + static NSMutableDictionary dictionaryWithObject_forKey_( + NativeCupertinoHttp _lib, NSObject object, NSObject key) { + final _ret = _lib._objc_msgSend_173(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -class mach_port_info_ext extends ffi.Struct { - external mach_port_status_t mpie_status; + static NSMutableDictionary dictionaryWithObjects_forKeys_count_( + NativeCupertinoHttp _lib, + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _lib._objc_msgSend_93(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - @mach_port_msgcount_t() - external int mpie_boost_cnt; + static NSMutableDictionary dictionaryWithObjectsAndKeys_( + NativeCupertinoHttp _lib, NSObject firstObject) { + final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } - @ffi.Array.multi([6]) - external ffi.Array reserved; -} + static NSMutableDictionary dictionaryWithDictionary_( + NativeCupertinoHttp _lib, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_174(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -typedef mach_port_status_t = mach_port_status; + static NSMutableDictionary dictionaryWithObjects_forKeys_( + NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { + final _ret = _lib._objc_msgSend_175( + _lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, + objects?._id ?? ffi.nullptr, + keys?._id ?? ffi.nullptr); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } -class mach_port_guard_info extends ffi.Struct { - @ffi.Uint64() - external int mpgi_guard; -} + /// Reads dictionary stored in NSPropertyList format from the specified url. + static NSDictionary dictionaryWithContentsOfURL_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_177( + _lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, + url?._id ?? ffi.nullptr, + error); + return NSDictionary._(_ret, _lib, retain: true, release: true); + } -class mach_port_qos extends ffi.Opaque {} + /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. + /// The keys are copied from the array and must be copyable. + /// If the array parameter is nil or not an NSArray, an exception is thrown. + /// If the array of keys is empty, an empty key set is returned. + /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). + /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. + /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. + static NSObject sharedKeySetForKeys_( + NativeCupertinoHttp _lib, NSArray? keys) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableDictionary1, + _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -class mach_service_port_info extends ffi.Struct { - @ffi.Array.multi([255]) - external ffi.Array mspi_string_name; + static NSMutableDictionary new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } - @ffi.Uint8() - external int mspi_domain_type; + static NSMutableDictionary alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableDictionary1, _lib._sel_alloc1); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } } -class mach_port_options extends ffi.Struct { - @ffi.Uint32() - external int flags; - - external mach_port_limits_t mpl; -} +class NSNotification extends NSObject { + NSNotification._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -typedef mach_port_limits_t = mach_port_limits; + /// Returns a [NSNotification] that points to the same underlying object as [other]. + static NSNotification castFrom(T other) { + return NSNotification._(other._id, other._lib, retain: true, release: true); + } -abstract class mach_port_guard_exception_codes { - static const int kGUARD_EXC_DESTROY = 1; - static const int kGUARD_EXC_MOD_REFS = 2; - static const int kGUARD_EXC_SET_CONTEXT = 4; - static const int kGUARD_EXC_UNGUARDED = 8; - static const int kGUARD_EXC_INCORRECT_GUARD = 16; - static const int kGUARD_EXC_IMMOVABLE = 32; - static const int kGUARD_EXC_STRICT_REPLY = 64; - static const int kGUARD_EXC_MSG_FILTERED = 128; - static const int kGUARD_EXC_INVALID_RIGHT = 256; - static const int kGUARD_EXC_INVALID_NAME = 512; - static const int kGUARD_EXC_INVALID_VALUE = 1024; - static const int kGUARD_EXC_INVALID_ARGUMENT = 2048; - static const int kGUARD_EXC_RIGHT_EXISTS = 4096; - static const int kGUARD_EXC_KERN_NO_SPACE = 8192; - static const int kGUARD_EXC_KERN_FAILURE = 16384; - static const int kGUARD_EXC_KERN_RESOURCE = 32768; - static const int kGUARD_EXC_SEND_INVALID_REPLY = 65536; - static const int kGUARD_EXC_SEND_INVALID_VOUCHER = 131072; - static const int kGUARD_EXC_SEND_INVALID_RIGHT = 262144; - static const int kGUARD_EXC_RCV_INVALID_NAME = 524288; - static const int kGUARD_EXC_RCV_GUARDED_DESC = 1048576; - static const int kGUARD_EXC_MOD_REFS_NON_FATAL = 2097152; - static const int kGUARD_EXC_IMMOVABLE_NON_FATAL = 4194304; -} + /// Returns a [NSNotification] that wraps the given raw object pointer. + static NSNotification castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNotification._(other, lib, retain: retain, release: release); + } -class __CFRunLoop extends ffi.Opaque {} + /// Returns whether [obj] is an instance of [NSNotification]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSNotification1); + } -class __CFRunLoopSource extends ffi.Opaque {} + NSNotificationName get name { + return _lib._objc_msgSend_32(_id, _lib._sel_name1); + } -class __CFRunLoopObserver extends ffi.Opaque {} + NSObject get object { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); + return NSObject._(_ret, _lib, retain: true, release: true); + } -class __CFRunLoopTimer extends ffi.Opaque {} + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } -abstract class CFRunLoopRunResult { - static const int kCFRunLoopRunFinished = 1; - static const int kCFRunLoopRunStopped = 2; - static const int kCFRunLoopRunTimedOut = 3; - static const int kCFRunLoopRunHandledSource = 4; -} + NSNotification initWithName_object_userInfo_( + NSNotificationName name, NSObject object, NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_315( + _id, + _lib._sel_initWithName_object_userInfo_1, + name, + object._id, + userInfo?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } -abstract class CFRunLoopActivity { - static const int kCFRunLoopEntry = 1; - static const int kCFRunLoopBeforeTimers = 2; - static const int kCFRunLoopBeforeSources = 4; - static const int kCFRunLoopBeforeWaiting = 32; - static const int kCFRunLoopAfterWaiting = 64; - static const int kCFRunLoopExit = 128; - static const int kCFRunLoopAllActivities = 268435455; -} + NSNotification initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } -typedef CFRunLoopMode = CFStringRef; -typedef CFRunLoopRef = ffi.Pointer<__CFRunLoop>; -typedef CFRunLoopSourceRef = ffi.Pointer<__CFRunLoopSource>; -typedef CFRunLoopObserverRef = ffi.Pointer<__CFRunLoopObserver>; -typedef CFRunLoopTimerRef = ffi.Pointer<__CFRunLoopTimer>; + static NSNotification notificationWithName_object_( + NativeCupertinoHttp _lib, NSNotificationName aName, NSObject anObject) { + final _ret = _lib._objc_msgSend_258(_lib._class_NSNotification1, + _lib._sel_notificationWithName_object_1, aName, anObject._id); + return NSNotification._(_ret, _lib, retain: true, release: true); + } -class CFRunLoopSourceContext extends ffi.Struct { - @CFIndex() - external int version; + static NSNotification notificationWithName_object_userInfo_( + NativeCupertinoHttp _lib, + NSNotificationName aName, + NSObject anObject, + NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_315( + _lib._class_NSNotification1, + _lib._sel_notificationWithName_object_userInfo_1, + aName, + anObject._id, + aUserInfo?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer info; + @override + NSNotification init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSNotification._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + static NSNotification new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); + return NSNotification._(_ret, _lib, retain: false, release: true); + } - external ffi - .Pointer)>> - release; + static NSNotification alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); + return NSNotification._(_ret, _lib, retain: false, release: true); + } +} - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; +typedef NSNotificationName = ffi.Pointer; - external ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>> - equal; +class NSNotificationCenter extends NSObject { + NSNotificationCenter._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external ffi.Pointer< - ffi.NativeFunction)>> hash; + /// Returns a [NSNotificationCenter] that points to the same underlying object as [other]. + static NSNotificationCenter castFrom(T other) { + return NSNotificationCenter._(other._id, other._lib, + retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, CFRunLoopRef, CFRunLoopMode)>> schedule; + /// Returns a [NSNotificationCenter] that wraps the given raw object pointer. + static NSNotificationCenter castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNotificationCenter._(other, lib, retain: retain, release: release); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, CFRunLoopRef, CFRunLoopMode)>> cancel; + /// Returns whether [obj] is an instance of [NSNotificationCenter]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSNotificationCenter1); + } - external ffi - .Pointer)>> - perform; -} + static NSNotificationCenter? getDefaultCenter(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_316( + _lib._class_NSNotificationCenter1, _lib._sel_defaultCenter1); + return _ret.address == 0 + ? null + : NSNotificationCenter._(_ret, _lib, retain: true, release: true); + } -class CFRunLoopSourceContext1 extends ffi.Struct { - @CFIndex() - external int version; + void addObserver_selector_name_object_( + NSObject observer, + ffi.Pointer aSelector, + NSNotificationName aName, + NSObject anObject) { + return _lib._objc_msgSend_317( + _id, + _lib._sel_addObserver_selector_name_object_1, + observer._id, + aSelector, + aName, + anObject._id); + } - external ffi.Pointer info; + void postNotification_(NSNotification? notification) { + return _lib._objc_msgSend_318( + _id, _lib._sel_postNotification_1, notification?._id ?? ffi.nullptr); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + void postNotificationName_object_( + NSNotificationName aName, NSObject anObject) { + return _lib._objc_msgSend_319( + _id, _lib._sel_postNotificationName_object_1, aName, anObject._id); + } - external ffi - .Pointer)>> - release; + void postNotificationName_object_userInfo_( + NSNotificationName aName, NSObject anObject, NSDictionary? aUserInfo) { + return _lib._objc_msgSend_320( + _id, + _lib._sel_postNotificationName_object_userInfo_1, + aName, + anObject._id, + aUserInfo?._id ?? ffi.nullptr); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; + void removeObserver_(NSObject observer) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObserver_1, observer._id); + } - external ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>> - equal; + void removeObserver_name_object_( + NSObject observer, NSNotificationName aName, NSObject anObject) { + return _lib._objc_msgSend_321(_id, _lib._sel_removeObserver_name_object_1, + observer._id, aName, anObject._id); + } - external ffi.Pointer< - ffi.NativeFunction)>> hash; + NSObject addObserverForName_object_queue_usingBlock_(NSNotificationName name, + NSObject obj, NSOperationQueue? queue, ObjCBlock19 block) { + final _ret = _lib._objc_msgSend_350( + _id, + _lib._sel_addObserverForName_object_queue_usingBlock_1, + name, + obj._id, + queue?._id ?? ffi.nullptr, + block._id); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction)>> getPort; + static NSNotificationCenter new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotificationCenter1, _lib._sel_new1); + return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, CFIndex, - CFAllocatorRef, ffi.Pointer)>> perform; + static NSNotificationCenter alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSNotificationCenter1, _lib._sel_alloc1); + return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + } } -typedef mach_port_t = __darwin_mach_port_t; -typedef __darwin_mach_port_t = __darwin_mach_port_name_t; -typedef __darwin_mach_port_name_t = __darwin_natural_t; +class NSOperationQueue extends NSObject { + NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class CFRunLoopObserverContext extends ffi.Struct { - @CFIndex() - external int version; + /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. + static NSOperationQueue castFrom(T other) { + return NSOperationQueue._(other._id, other._lib, + retain: true, release: true); + } - external ffi.Pointer info; + /// Returns a [NSOperationQueue] that wraps the given raw object pointer. + static NSOperationQueue castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOperationQueue._(other, lib, retain: retain, release: release); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + /// Returns whether [obj] is an instance of [NSOperationQueue]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOperationQueue1); + } - external ffi - .Pointer)>> - release; + /// @property progress + /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue + /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the + /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the + /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super + /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress + /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% + /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 + /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be + /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by + /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving + /// progress scenario. + /// + /// @example + /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; + /// queue.progress.totalUnitCount = 10; + NSProgress? get progress { + final _ret = _lib._objc_msgSend_322(_id, _lib._sel_progress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + void addOperation_(NSOperation? op) { + return _lib._objc_msgSend_338( + _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); + } -typedef CFRunLoopObserverCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFRunLoopObserverRef, ffi.Int32, ffi.Pointer)>>; -void _ObjCBlock21_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() - .asFunction< - void Function(CFRunLoopObserverRef arg0, int arg1)>()(arg0, arg1); -} + void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { + return _lib._objc_msgSend_344( + _id, + _lib._sel_addOperations_waitUntilFinished_1, + ops?._id ?? ffi.nullptr, + wait); + } -final _ObjCBlock21_closureRegistry = {}; -int _ObjCBlock21_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock21_registerClosure(Function fn) { - final id = ++_ObjCBlock21_closureRegistryIndex; - _ObjCBlock21_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + void addOperationWithBlock_(ObjCBlock block) { + return _lib._objc_msgSend_345( + _id, _lib._sel_addOperationWithBlock_1, block._id); + } -void _ObjCBlock21_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { - return _ObjCBlock21_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + /// @method addBarrierBlock: + /// @param barrier A block to execute + /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and + /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the + /// `dispatch_barrier_async` function. + void addBarrierBlock_(ObjCBlock barrier) { + return _lib._objc_msgSend_345( + _id, _lib._sel_addBarrierBlock_1, barrier._id); + } -class ObjCBlock21 extends _ObjCBlockBase { - ObjCBlock21._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + int get maxConcurrentOperationCount { + return _lib._objc_msgSend_81(_id, _lib._sel_maxConcurrentOperationCount1); + } - /// Creates a block from a C function pointer. - ObjCBlock21.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>> - ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, - ffi.Int32 arg1)>(_ObjCBlock21_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + set maxConcurrentOperationCount(int value) { + _lib._objc_msgSend_346( + _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + } - /// Creates a block from a Dart function. - ObjCBlock21.fromFunction(NativeCupertinoHttp lib, - void Function(CFRunLoopObserverRef arg0, int arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, - ffi.Int32 arg1)>(_ObjCBlock21_closureTrampoline) - .cast(), - _ObjCBlock21_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(CFRunLoopObserverRef arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, int arg1)>()(_id, arg0, arg1); + bool get suspended { + return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + set suspended(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setSuspended_1, value); + } -class CFRunLoopTimerContext extends ffi.Struct { - @CFIndex() - external int version; + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer info; + set name(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + int get qualityOfService { + return _lib._objc_msgSend_342(_id, _lib._sel_qualityOfService1); + } - external ffi - .Pointer)>> - release; + set qualityOfService(int value) { + _lib._objc_msgSend_343(_id, _lib._sel_setQualityOfService_1, value); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + /// actually retain + dispatch_queue_t get underlyingQueue { + return _lib._objc_msgSend_347(_id, _lib._sel_underlyingQueue1); + } -typedef CFRunLoopTimerCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, ffi.Pointer)>>; -void _ObjCBlock22_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); -} + /// actually retain + set underlyingQueue(dispatch_queue_t value) { + _lib._objc_msgSend_348(_id, _lib._sel_setUnderlyingQueue_1, value); + } -final _ObjCBlock22_closureRegistry = {}; -int _ObjCBlock22_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock22_registerClosure(Function fn) { - final id = ++_ObjCBlock22_closureRegistryIndex; - _ObjCBlock22_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + void cancelAllOperations() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + } -void _ObjCBlock22_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { - return _ObjCBlock22_closureRegistry[block.ref.target.address]!(arg0); -} + void waitUntilAllOperationsAreFinished() { + return _lib._objc_msgSend_1( + _id, _lib._sel_waitUntilAllOperationsAreFinished1); + } -class ObjCBlock22 extends _ObjCBlockBase { - ObjCBlock22._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_349( + _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock22.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopTimerRef arg0)>( - _ObjCBlock22_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_349( + _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a Dart function. - ObjCBlock22.fromFunction( - NativeCupertinoHttp lib, void Function(CFRunLoopTimerRef arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopTimerRef arg0)>( - _ObjCBlock22_closureTrampoline) - .cast(), - _ObjCBlock22_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(CFRunLoopTimerRef arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopTimerRef arg0)>()(_id, arg0); + /// These two functions are inherently a race condition and should be avoided if possible + NSArray? get operations { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_operations1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + int get operationCount { + return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); + } -class __CFSocket extends ffi.Opaque {} + static NSOperationQueue new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } -abstract class CFSocketError { - static const int kCFSocketSuccess = 0; - static const int kCFSocketError = -1; - static const int kCFSocketTimeout = -2; + static NSOperationQueue alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } } -class CFSocketSignature extends ffi.Struct { - @SInt32() - external int protocolFamily; - - @SInt32() - external int socketType; +class NSProgress extends NSObject { + NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @SInt32() - external int protocol; + /// Returns a [NSProgress] that points to the same underlying object as [other]. + static NSProgress castFrom(T other) { + return NSProgress._(other._id, other._lib, retain: true, release: true); + } - external CFDataRef address; -} + /// Returns a [NSProgress] that wraps the given raw object pointer. + static NSProgress castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSProgress._(other, lib, retain: retain, release: release); + } -abstract class CFSocketCallBackType { - static const int kCFSocketNoCallBack = 0; - static const int kCFSocketReadCallBack = 1; - static const int kCFSocketAcceptCallBack = 2; - static const int kCFSocketDataCallBack = 3; - static const int kCFSocketConnectCallBack = 4; - static const int kCFSocketWriteCallBack = 8; -} + /// Returns whether [obj] is an instance of [NSProgress]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); + } -class CFSocketContext extends ffi.Struct { - @CFIndex() - external int version; + static NSProgress currentProgress(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_322( + _lib._class_NSProgress1, _lib._sel_currentProgress1); + return NSProgress._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer info; + static NSProgress progressWithTotalUnitCount_( + NativeCupertinoHttp _lib, int unitCount) { + final _ret = _lib._objc_msgSend_323(_lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + static NSProgress discreteProgressWithTotalUnitCount_( + NativeCupertinoHttp _lib, int unitCount) { + final _ret = _lib._objc_msgSend_323(_lib._class_NSProgress1, + _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } - external ffi - .Pointer)>> - release; + static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( + NativeCupertinoHttp _lib, + int unitCount, + NSProgress? parent, + int portionOfParentTotalUnitCount) { + final _ret = _lib._objc_msgSend_324( + _lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, + unitCount, + parent?._id ?? ffi.nullptr, + portionOfParentTotalUnitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + NSProgress initWithParent_userInfo_( + NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { + final _ret = _lib._objc_msgSend_325( + _id, + _lib._sel_initWithParent_userInfo_1, + parentProgressOrNil?._id ?? ffi.nullptr, + userInfoOrNil?._id ?? ffi.nullptr); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -typedef CFSocketRef = ffi.Pointer<__CFSocket>; -typedef CFSocketCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFSocketRef, ffi.Int32, CFDataRef, - ffi.Pointer, ffi.Pointer)>>; -typedef CFSocketNativeHandle = ffi.Int; + void becomeCurrentWithPendingUnitCount_(int unitCount) { + return _lib._objc_msgSend_326( + _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + } -class accessx_descriptor extends ffi.Struct { - @ffi.UnsignedInt() - external int ad_name_offset; + void performAsCurrentWithPendingUnitCount_usingBlock_( + int unitCount, ObjCBlock work) { + return _lib._objc_msgSend_327( + _id, + _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, + unitCount, + work._id); + } - @ffi.Int() - external int ad_flags; + void resignCurrent() { + return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + } - @ffi.Array.multi([2]) - external ffi.Array ad_pad; -} + void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { + return _lib._objc_msgSend_328( + _id, + _lib._sel_addChild_withPendingUnitCount_1, + child?._id ?? ffi.nullptr, + inUnitCount); + } -typedef gid_t = __darwin_gid_t; -typedef __darwin_gid_t = __uint32_t; -typedef useconds_t = __darwin_useconds_t; -typedef __darwin_useconds_t = __uint32_t; + int get totalUnitCount { + return _lib._objc_msgSend_329(_id, _lib._sel_totalUnitCount1); + } -class fssearchblock extends ffi.Opaque {} + set totalUnitCount(int value) { + _lib._objc_msgSend_330(_id, _lib._sel_setTotalUnitCount_1, value); + } -class searchstate extends ffi.Opaque {} + int get completedUnitCount { + return _lib._objc_msgSend_329(_id, _lib._sel_completedUnitCount1); + } -class flock extends ffi.Struct { - @off_t() - external int l_start; + set completedUnitCount(int value) { + _lib._objc_msgSend_330(_id, _lib._sel_setCompletedUnitCount_1, value); + } - @off_t() - external int l_len; + NSString? get localizedDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @pid_t() - external int l_pid; + set localizedDescription(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); + } - @ffi.Short() - external int l_type; + NSString? get localizedAdditionalDescription { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedAdditionalDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @ffi.Short() - external int l_whence; -} + set localizedAdditionalDescription(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setLocalizedAdditionalDescription_1, + value?._id ?? ffi.nullptr); + } -class flocktimeout extends ffi.Struct { - external flock fl; + bool get cancellable { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); + } - external timespec timeout; -} + set cancellable(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setCancellable_1, value); + } -class radvisory extends ffi.Struct { - @off_t() - external int ra_offset; + bool get pausable { + return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); + } - @ffi.Int() - external int ra_count; -} + set pausable(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setPausable_1, value); + } -class fsignatures extends ffi.Struct { - @off_t() - external int fs_file_start; + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + } - external ffi.Pointer fs_blob_start; + bool get paused { + return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); + } - @ffi.Size() - external int fs_blob_size; + ObjCBlock get cancellationHandler { + final _ret = _lib._objc_msgSend_333(_id, _lib._sel_cancellationHandler1); + return ObjCBlock._(_ret, _lib); + } - @ffi.Size() - external int fs_fsignatures_size; + set cancellationHandler(ObjCBlock value) { + _lib._objc_msgSend_334(_id, _lib._sel_setCancellationHandler_1, value._id); + } - @ffi.Array.multi([20]) - external ffi.Array fs_cdhash; + ObjCBlock get pausingHandler { + final _ret = _lib._objc_msgSend_333(_id, _lib._sel_pausingHandler1); + return ObjCBlock._(_ret, _lib); + } - @ffi.Int() - external int fs_hash_type; -} + set pausingHandler(ObjCBlock value) { + _lib._objc_msgSend_334(_id, _lib._sel_setPausingHandler_1, value._id); + } -class fsupplement extends ffi.Struct { - @off_t() - external int fs_file_start; + ObjCBlock get resumingHandler { + final _ret = _lib._objc_msgSend_333(_id, _lib._sel_resumingHandler1); + return ObjCBlock._(_ret, _lib); + } - @off_t() - external int fs_blob_start; + set resumingHandler(ObjCBlock value) { + _lib._objc_msgSend_334(_id, _lib._sel_setResumingHandler_1, value._id); + } - @ffi.Size() - external int fs_blob_size; + void setUserInfoObject_forKey_( + NSObject objectOrNil, NSProgressUserInfoKey key) { + return _lib._objc_msgSend_189( + _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); + } - @ffi.Int() - external int fs_orig_fd; -} + bool get indeterminate { + return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); + } -class fchecklv extends ffi.Struct { - @off_t() - external int lv_file_start; + double get fractionCompleted { + return _lib._objc_msgSend_85(_id, _lib._sel_fractionCompleted1); + } - @ffi.Size() - external int lv_error_message_size; + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + } - external ffi.Pointer lv_error_message; -} + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } -class fgetsigsinfo extends ffi.Struct { - @off_t() - external int fg_file_start; + void pause() { + return _lib._objc_msgSend_1(_id, _lib._sel_pause1); + } - @ffi.Int() - external int fg_info_request; + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } - @ffi.Int() - external int fg_sig_is_platform; -} + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } -class fstore extends ffi.Struct { - @ffi.UnsignedInt() - external int fst_flags; + NSProgressKind get kind { + return _lib._objc_msgSend_32(_id, _lib._sel_kind1); + } - @ffi.Int() - external int fst_posmode; + set kind(NSProgressKind value) { + _lib._objc_msgSend_331(_id, _lib._sel_setKind_1, value); + } - @off_t() - external int fst_offset; + NSNumber? get estimatedTimeRemaining { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_estimatedTimeRemaining1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } - @off_t() - external int fst_length; + set estimatedTimeRemaining(NSNumber? value) { + _lib._objc_msgSend_335( + _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + } - @off_t() - external int fst_bytesalloc; -} + NSNumber? get throughput { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_throughput1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } -class fpunchhole extends ffi.Struct { - @ffi.UnsignedInt() - external int fp_flags; + set throughput(NSNumber? value) { + _lib._objc_msgSend_335( + _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + } - @ffi.UnsignedInt() - external int reserved; + NSProgressFileOperationKind get fileOperationKind { + return _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); + } - @off_t() - external int fp_offset; + set fileOperationKind(NSProgressFileOperationKind value) { + _lib._objc_msgSend_331(_id, _lib._sel_setFileOperationKind_1, value); + } - @off_t() - external int fp_length; -} + NSURL? get fileURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -class ftrimactivefile extends ffi.Struct { - @off_t() - external int fta_offset; + set fileURL(NSURL? value) { + _lib._objc_msgSend_336( + _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + } - @off_t() - external int fta_length; -} + NSNumber? get fileTotalCount { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileTotalCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } -class fspecread extends ffi.Struct { - @ffi.UnsignedInt() - external int fsr_flags; + set fileTotalCount(NSNumber? value) { + _lib._objc_msgSend_335( + _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + } - @ffi.UnsignedInt() - external int reserved; + NSNumber? get fileCompletedCount { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileCompletedCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } - @off_t() - external int fsr_offset; + set fileCompletedCount(NSNumber? value) { + _lib._objc_msgSend_335( + _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); + } - @off_t() - external int fsr_length; -} + void publish() { + return _lib._objc_msgSend_1(_id, _lib._sel_publish1); + } -class fbootstraptransfer extends ffi.Struct { - @off_t() - external int fbt_offset; + void unpublish() { + return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + } - @ffi.Size() - external int fbt_length; + static NSObject addSubscriberForFileURL_withPublishingHandler_( + NativeCupertinoHttp _lib, + NSURL? url, + NSProgressPublishingHandler publishingHandler) { + final _ret = _lib._objc_msgSend_337( + _lib._class_NSProgress1, + _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, + url?._id ?? ffi.nullptr, + publishingHandler); + return NSObject._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer fbt_buffer; -} + static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { + return _lib._objc_msgSend_200( + _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + } -@ffi.Packed(4) -class log2phys extends ffi.Struct { - @ffi.UnsignedInt() - external int l2p_flags; + bool get old { + return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); + } - @off_t() - external int l2p_contigbytes; + static NSProgress new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } - @off_t() - external int l2p_devoffset; + static NSProgress alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } } -class _filesec extends ffi.Opaque {} - -abstract class filesec_property_t { - static const int FILESEC_OWNER = 1; - static const int FILESEC_GROUP = 2; - static const int FILESEC_UUID = 3; - static const int FILESEC_MODE = 4; - static const int FILESEC_ACL = 5; - static const int FILESEC_GRPUUID = 6; - static const int FILESEC_ACL_RAW = 100; - static const int FILESEC_ACL_ALLOCSIZE = 101; +typedef NSProgressUserInfoKey = ffi.Pointer; +typedef NSProgressKind = ffi.Pointer; +typedef NSProgressFileOperationKind = ffi.Pointer; +typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; +NSProgressUnpublishingHandler _ObjCBlock18_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>()(arg0); } -typedef filesec_t = ffi.Pointer<_filesec>; - -abstract class os_clockid_t { - static const int OS_CLOCK_MACH_ABSOLUTE_TIME = 32; +final _ObjCBlock18_closureRegistry = {}; +int _ObjCBlock18_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock18_registerClosure(Function fn) { + final id = ++_ObjCBlock18_closureRegistryIndex; + _ObjCBlock18_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class os_workgroup_attr_opaque_s extends ffi.Struct { - @ffi.Uint32() - external int sig; - - @ffi.Array.multi([60]) - external ffi.Array opaque; +NSProgressUnpublishingHandler _ObjCBlock18_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock18_closureRegistry[block.ref.target.address]!(arg0); } -class os_workgroup_interval_data_opaque_s extends ffi.Struct { - @ffi.Uint32() - external int sig; - - @ffi.Array.multi([56]) - external ffi.Array opaque; -} +class ObjCBlock18 extends _ObjCBlockBase { + ObjCBlock18._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class os_workgroup_join_token_opaque_s extends ffi.Struct { - @ffi.Uint32() - external int sig; + /// Creates a block from a C function pointer. + ObjCBlock18.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock18_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @ffi.Array.multi([36]) - external ffi.Array opaque; + /// Creates a block from a Dart function. + ObjCBlock18.fromFunction(NativeCupertinoHttp lib, + NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock18_closureTrampoline) + .cast(), + _ObjCBlock18_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + NSProgressUnpublishingHandler call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } } -class OS_os_workgroup extends OS_object { - OS_os_workgroup._(ffi.Pointer id, NativeCupertinoHttp lib, +typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; + +class NSOperation extends NSObject { + NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [OS_os_workgroup] that points to the same underlying object as [other]. - static OS_os_workgroup castFrom(T other) { - return OS_os_workgroup._(other._id, other._lib, - retain: true, release: true); + /// Returns a [NSOperation] that points to the same underlying object as [other]. + static NSOperation castFrom(T other) { + return NSOperation._(other._id, other._lib, retain: true, release: true); } - /// Returns a [OS_os_workgroup] that wraps the given raw object pointer. - static OS_os_workgroup castFromPointer( + /// Returns a [NSOperation] that wraps the given raw object pointer. + static NSOperation castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return OS_os_workgroup._(other, lib, retain: retain, release: release); + return NSOperation._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [OS_os_workgroup]. + /// Returns whether [obj] is an instance of [NSOperation]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_OS_os_workgroup1); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); } - @override - OS_os_workgroup init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_os_workgroup._(_ret, _lib, retain: true, release: true); + void start() { + return _lib._objc_msgSend_1(_id, _lib._sel_start1); } - static OS_os_workgroup new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_OS_os_workgroup1, _lib._sel_new1); - return OS_os_workgroup._(_ret, _lib, retain: false, release: true); + void main() { + return _lib._objc_msgSend_1(_id, _lib._sel_main1); } - static OS_os_workgroup alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_OS_os_workgroup1, _lib._sel_alloc1); - return OS_os_workgroup._(_ret, _lib, retain: false, release: true); + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); } -} - -typedef os_workgroup_t = ffi.Pointer; -typedef os_workgroup_join_token_t - = ffi.Pointer; -typedef os_workgroup_working_arena_destructor_t - = ffi.Pointer)>>; -typedef os_workgroup_index = ffi.Uint32; - -class os_workgroup_max_parallel_threads_attr_s extends ffi.Opaque {} -typedef os_workgroup_mpt_attr_t - = ffi.Pointer; - -class OS_os_workgroup_interval extends OS_os_workgroup { - OS_os_workgroup_interval._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } - /// Returns a [OS_os_workgroup_interval] that points to the same underlying object as [other]. - static OS_os_workgroup_interval castFrom(T other) { - return OS_os_workgroup_interval._(other._id, other._lib, - retain: true, release: true); + bool get executing { + return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); } - /// Returns a [OS_os_workgroup_interval] that wraps the given raw object pointer. - static OS_os_workgroup_interval castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return OS_os_workgroup_interval._(other, lib, - retain: retain, release: release); + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); } - /// Returns whether [obj] is an instance of [OS_os_workgroup_interval]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_OS_os_workgroup_interval1); + /// To be deprecated; use and override 'asynchronous' below + bool get concurrent { + return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); } - @override - OS_os_workgroup_interval init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_os_workgroup_interval._(_ret, _lib, retain: true, release: true); + bool get asynchronous { + return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); } - static OS_os_workgroup_interval new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_OS_os_workgroup_interval1, _lib._sel_new1); - return OS_os_workgroup_interval._(_ret, _lib, retain: false, release: true); + bool get ready { + return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); } - static OS_os_workgroup_interval alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_OS_os_workgroup_interval1, _lib._sel_alloc1); - return OS_os_workgroup_interval._(_ret, _lib, retain: false, release: true); + void addDependency_(NSOperation? op) { + return _lib._objc_msgSend_338( + _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); } -} -typedef os_workgroup_interval_t = ffi.Pointer; -typedef os_workgroup_interval_data_t - = ffi.Pointer; + void removeDependency_(NSOperation? op) { + return _lib._objc_msgSend_338( + _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); + } -class OS_os_workgroup_parallel extends OS_os_workgroup { - OS_os_workgroup_parallel._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + NSArray? get dependencies { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_dependencies1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } - /// Returns a [OS_os_workgroup_parallel] that points to the same underlying object as [other]. - static OS_os_workgroup_parallel castFrom(T other) { - return OS_os_workgroup_parallel._(other._id, other._lib, - retain: true, release: true); + int get queuePriority { + return _lib._objc_msgSend_339(_id, _lib._sel_queuePriority1); } - /// Returns a [OS_os_workgroup_parallel] that wraps the given raw object pointer. - static OS_os_workgroup_parallel castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return OS_os_workgroup_parallel._(other, lib, - retain: retain, release: release); + set queuePriority(int value) { + _lib._objc_msgSend_340(_id, _lib._sel_setQueuePriority_1, value); } - /// Returns whether [obj] is an instance of [OS_os_workgroup_parallel]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_OS_os_workgroup_parallel1); + ObjCBlock get completionBlock { + final _ret = _lib._objc_msgSend_333(_id, _lib._sel_completionBlock1); + return ObjCBlock._(_ret, _lib); } - @override - OS_os_workgroup_parallel init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_os_workgroup_parallel._(_ret, _lib, retain: true, release: true); + set completionBlock(ObjCBlock value) { + _lib._objc_msgSend_334(_id, _lib._sel_setCompletionBlock_1, value._id); } - static OS_os_workgroup_parallel new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_OS_os_workgroup_parallel1, _lib._sel_new1); - return OS_os_workgroup_parallel._(_ret, _lib, retain: false, release: true); + void waitUntilFinished() { + return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); } - static OS_os_workgroup_parallel alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_OS_os_workgroup_parallel1, _lib._sel_alloc1); - return OS_os_workgroup_parallel._(_ret, _lib, retain: false, release: true); + double get threadPriority { + return _lib._objc_msgSend_85(_id, _lib._sel_threadPriority1); } -} -typedef os_workgroup_parallel_t = ffi.Pointer; -typedef os_workgroup_attr_t = ffi.Pointer; + set threadPriority(double value) { + _lib._objc_msgSend_341(_id, _lib._sel_setThreadPriority_1, value); + } -class time_value extends ffi.Struct { - @integer_t() - external int seconds; + int get qualityOfService { + return _lib._objc_msgSend_342(_id, _lib._sel_qualityOfService1); + } - @integer_t() - external int microseconds; -} + set qualityOfService(int value) { + _lib._objc_msgSend_343(_id, _lib._sel_setQualityOfService_1, value); + } -typedef integer_t = ffi.Int; + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -class mach_timespec extends ffi.Struct { - @ffi.UnsignedInt() - external int tv_sec; + set name(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } - @clock_res_t() - external int tv_nsec; -} + static NSOperation new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); + return NSOperation._(_ret, _lib, retain: false, release: true); + } -typedef clock_res_t = ffi.Int; -typedef dispatch_time_t = ffi.Uint64; + static NSOperation alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); + return NSOperation._(_ret, _lib, retain: false, release: true); + } +} -abstract class qos_class_t { - static const int QOS_CLASS_USER_INTERACTIVE = 33; - static const int QOS_CLASS_USER_INITIATED = 25; - static const int QOS_CLASS_DEFAULT = 21; - static const int QOS_CLASS_UTILITY = 17; - static const int QOS_CLASS_BACKGROUND = 9; - static const int QOS_CLASS_UNSPECIFIED = 0; +abstract class NSOperationQueuePriority { + static const int NSOperationQueuePriorityVeryLow = -8; + static const int NSOperationQueuePriorityLow = -4; + static const int NSOperationQueuePriorityNormal = 0; + static const int NSOperationQueuePriorityHigh = 4; + static const int NSOperationQueuePriorityVeryHigh = 8; } -typedef dispatch_object_t = ffi.Pointer; -typedef dispatch_function_t - = ffi.Pointer)>>; -typedef dispatch_block_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock23_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { +typedef dispatch_queue_t = ffi.Pointer; +void _ObjCBlock19_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { return block.ref.target - .cast>() - .asFunction()(arg0); + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); } -final _ObjCBlock23_closureRegistry = {}; -int _ObjCBlock23_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock23_registerClosure(Function fn) { - final id = ++_ObjCBlock23_closureRegistryIndex; - _ObjCBlock23_closureRegistry[id] = fn; +final _ObjCBlock19_closureRegistry = {}; +int _ObjCBlock19_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock19_registerClosure(Function fn) { + final id = ++_ObjCBlock19_closureRegistryIndex; + _ObjCBlock19_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock23_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock23_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock19_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock19_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock23 extends _ObjCBlockBase { - ObjCBlock23._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock19 extends _ObjCBlockBase { + ObjCBlock19._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock23.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) + ObjCBlock19.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Size arg0)>(_ObjCBlock23_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock19_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock23.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + ObjCBlock19.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Size arg0)>(_ObjCBlock23_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock19_closureTrampoline) .cast(), - _ObjCBlock23_registerClosure(fn)), + _ObjCBlock19_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0) { + void call(ffi.Pointer arg0) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Size arg0)>>() + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); } - - ffi.Pointer<_ObjCBlock> get pointer => _id; } -class dispatch_queue_s extends ffi.Opaque {} +class NSDate extends NSObject { + NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -typedef dispatch_queue_global_t = ffi.Pointer; -typedef uintptr_t = ffi.UnsignedLong; + /// Returns a [NSDate] that points to the same underlying object as [other]. + static NSDate castFrom(T other) { + return NSDate._(other._id, other._lib, retain: true, release: true); + } -class dispatch_queue_attr_s extends ffi.Opaque {} + /// Returns a [NSDate] that wraps the given raw object pointer. + static NSDate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDate._(other, lib, retain: retain, release: release); + } -typedef dispatch_queue_attr_t = ffi.Pointer; + /// Returns whether [obj] is an instance of [NSDate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); + } -abstract class dispatch_autorelease_frequency_t { - static const int DISPATCH_AUTORELEASE_FREQUENCY_INHERIT = 0; - static const int DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM = 1; - static const int DISPATCH_AUTORELEASE_FREQUENCY_NEVER = 2; -} + double get timeIntervalSinceReferenceDate { + return _lib._objc_msgSend_85( + _id, _lib._sel_timeIntervalSinceReferenceDate1); + } -abstract class dispatch_block_flags_t { - static const int DISPATCH_BLOCK_BARRIER = 1; - static const int DISPATCH_BLOCK_DETACHED = 2; - static const int DISPATCH_BLOCK_ASSIGN_CURRENT = 4; - static const int DISPATCH_BLOCK_NO_QOS_CLASS = 8; - static const int DISPATCH_BLOCK_INHERIT_QOS_CLASS = 16; - static const int DISPATCH_BLOCK_ENFORCE_QOS_CLASS = 32; -} + @override + NSDate init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_type_descriptor_t extends ffi.Opaque {} + NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _lib._objc_msgSend_351( + _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_port_descriptor_t extends ffi.Opaque {} + NSDate initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_ool_descriptor32_t extends ffi.Opaque {} + double timeIntervalSinceDate_(NSDate? anotherDate) { + return _lib._objc_msgSend_352(_id, _lib._sel_timeIntervalSinceDate_1, + anotherDate?._id ?? ffi.nullptr); + } -class mach_msg_ool_descriptor64_t extends ffi.Opaque {} + double get timeIntervalSinceNow { + return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSinceNow1); + } -class mach_msg_ool_descriptor_t extends ffi.Opaque {} + double get timeIntervalSince1970 { + return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSince19701); + } -class mach_msg_ool_ports_descriptor32_t extends ffi.Opaque {} + NSObject addTimeInterval_(double seconds) { + final _ret = + _lib._objc_msgSend_351(_id, _lib._sel_addTimeInterval_1, seconds); + return NSObject._(_ret, _lib, retain: true, release: true); + } -class mach_msg_ool_ports_descriptor64_t extends ffi.Opaque {} + NSDate dateByAddingTimeInterval_(double ti) { + final _ret = + _lib._objc_msgSend_351(_id, _lib._sel_dateByAddingTimeInterval_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_ool_ports_descriptor_t extends ffi.Opaque {} + NSDate earlierDate_(NSDate? anotherDate) { + final _ret = _lib._objc_msgSend_353( + _id, _lib._sel_earlierDate_1, anotherDate?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_guarded_port_descriptor32_t extends ffi.Opaque {} + NSDate laterDate_(NSDate? anotherDate) { + final _ret = _lib._objc_msgSend_353( + _id, _lib._sel_laterDate_1, anotherDate?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_guarded_port_descriptor64_t extends ffi.Opaque {} + int compare_(NSDate? other) { + return _lib._objc_msgSend_354( + _id, _lib._sel_compare_1, other?._id ?? ffi.nullptr); + } -class mach_msg_guarded_port_descriptor_t extends ffi.Opaque {} + bool isEqualToDate_(NSDate? otherDate) { + return _lib._objc_msgSend_355( + _id, _lib._sel_isEqualToDate_1, otherDate?._id ?? ffi.nullptr); + } -class mach_msg_descriptor_t extends ffi.Opaque {} + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -class mach_msg_body_t extends ffi.Struct { - @mach_msg_size_t() - external int msgh_descriptor_count; -} + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } -typedef mach_msg_size_t = natural_t; + static NSDate date(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); + return NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_header_t extends ffi.Struct { - @mach_msg_bits_t() - external int msgh_bits; + static NSDate dateWithTimeIntervalSinceNow_( + NativeCupertinoHttp _lib, double secs) { + final _ret = _lib._objc_msgSend_351( + _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } - @mach_msg_size_t() - external int msgh_size; + static NSDate dateWithTimeIntervalSinceReferenceDate_( + NativeCupertinoHttp _lib, double ti) { + final _ret = _lib._objc_msgSend_351(_lib._class_NSDate1, + _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } - @mach_port_t() - external int msgh_remote_port; + static NSDate dateWithTimeIntervalSince1970_( + NativeCupertinoHttp _lib, double secs) { + final _ret = _lib._objc_msgSend_351( + _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } - @mach_port_t() - external int msgh_local_port; + static NSDate dateWithTimeInterval_sinceDate_( + NativeCupertinoHttp _lib, double secsToBeAdded, NSDate? date) { + final _ret = _lib._objc_msgSend_356( + _lib._class_NSDate1, + _lib._sel_dateWithTimeInterval_sinceDate_1, + secsToBeAdded, + date?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } - @mach_port_name_t() - external int msgh_voucher_port; + static NSDate? getDistantFuture(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_357(_lib._class_NSDate1, _lib._sel_distantFuture1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } - @mach_msg_id_t() - external int msgh_id; -} + static NSDate? getDistantPast(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_357(_lib._class_NSDate1, _lib._sel_distantPast1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } -typedef mach_msg_bits_t = ffi.UnsignedInt; -typedef mach_port_name_t = natural_t; -typedef mach_msg_id_t = integer_t; + static NSDate? getNow(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_357(_lib._class_NSDate1, _lib._sel_now1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } -class mach_msg_base_t extends ffi.Struct { - external mach_msg_header_t header; + NSDate initWithTimeIntervalSinceNow_(double secs) { + final _ret = _lib._objc_msgSend_351( + _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } - external mach_msg_body_t body; + NSDate initWithTimeIntervalSince1970_(double secs) { + final _ret = _lib._objc_msgSend_351( + _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate? date) { + final _ret = _lib._objc_msgSend_356( + _id, + _lib._sel_initWithTimeInterval_sinceDate_1, + secsToBeAdded, + date?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); + return NSDate._(_ret, _lib, retain: false, release: true); + } + + static NSDate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); + return NSDate._(_ret, _lib, retain: false, release: true); + } } -class mach_msg_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; +typedef NSTimeInterval = ffi.Double; - @mach_msg_trailer_size_t() - external int msgh_trailer_size; +/// ! +/// @enum NSURLRequestCachePolicy +/// +/// @discussion The NSURLRequestCachePolicy enum defines constants that +/// can be used to specify the type of interactions that take place with +/// the caching system when the URL loading system processes a request. +/// Specifically, these constants cover interactions that have to do +/// with whether already-existing cache data is returned to satisfy a +/// URL load request. +/// +/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the +/// caching logic defined in the protocol implementation, if any, is +/// used for a particular URL load request. This is the default policy +/// for URL load requests. +/// +/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the +/// data for the URL load should be loaded from the origin source. No +/// existing local cache data, regardless of its freshness or validity, +/// should be used to satisfy a URL load request. +/// +/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that +/// not only should the local cache data be ignored, but that proxies and +/// other intermediates should be instructed to disregard their caches +/// so far as the protocol allows. +/// +/// @constant NSURLRequestReloadIgnoringCacheData Older name for +/// NSURLRequestReloadIgnoringLocalCacheData. +/// +/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, +/// the URL is loaded from the origin source. +/// +/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, no +/// attempt is made to load the URL from the origin source, and the +/// load is considered to have failed. This constant specifies a +/// behavior that is similar to an "offline" mode. +/// +/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that +/// the existing cache data may be used provided the origin source +/// confirms its validity, otherwise the URL is loaded from the +/// origin source. +abstract class NSURLRequestCachePolicy { + static const int NSURLRequestUseProtocolCachePolicy = 0; + static const int NSURLRequestReloadIgnoringLocalCacheData = 1; + static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; + static const int NSURLRequestReloadIgnoringCacheData = 1; + static const int NSURLRequestReturnCacheDataElseLoad = 2; + static const int NSURLRequestReturnCacheDataDontLoad = 3; + static const int NSURLRequestReloadRevalidatingCacheData = 5; } -typedef mach_msg_trailer_type_t = ffi.UnsignedInt; -typedef mach_msg_trailer_size_t = ffi.UnsignedInt; +/// ! +/// @enum NSURLRequestNetworkServiceType +/// +/// @discussion The NSURLRequestNetworkServiceType enum defines constants that +/// can be used to specify the service type to associate with this request. The +/// service type is used to provide the networking layers a hint of the purpose +/// of the request. +/// +/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest +/// when created. This value should be left unchanged for the vast majority of requests. +/// +/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP +/// control traffic. +/// +/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video +/// traffic. +/// +/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background +/// traffic (such as a file download). +/// +/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. +/// +/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. +/// +/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. +abstract class NSURLRequestNetworkServiceType { + /// Standard internet traffic + static const int NSURLNetworkServiceTypeDefault = 0; -class mach_msg_seqno_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + /// Voice over IP control traffic + static const int NSURLNetworkServiceTypeVoIP = 1; - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + /// Video traffic + static const int NSURLNetworkServiceTypeVideo = 2; - @mach_port_seqno_t() - external int msgh_seqno; + /// Background traffic + static const int NSURLNetworkServiceTypeBackground = 3; + + /// Voice data + static const int NSURLNetworkServiceTypeVoice = 4; + + /// Responsive data + static const int NSURLNetworkServiceTypeResponsiveData = 6; + + /// Multimedia Audio/Video Streaming + static const int NSURLNetworkServiceTypeAVStreaming = 8; + + /// Responsive Multimedia Audio/Video + static const int NSURLNetworkServiceTypeResponsiveAV = 9; + + /// Call Signaling + static const int NSURLNetworkServiceTypeCallSignaling = 11; } -class security_token_t extends ffi.Struct { - @ffi.Array.multi([2]) - external ffi.Array val; +/// ! +/// @enum NSURLRequestAttribution +/// +/// @discussion The NSURLRequestAttribution enum is used to indicate whether the +/// user or developer specified the URL. +/// +/// @constant NSURLRequestAttributionDeveloper Indicates that the URL was specified +/// by the developer. This is the default value for an NSURLRequest when created. +/// +/// @constant NSURLRequestAttributionUser Indicates that the URL was specified by +/// the user. +abstract class NSURLRequestAttribution { + static const int NSURLRequestAttributionDeveloper = 0; + static const int NSURLRequestAttributionUser = 1; } -class mach_msg_security_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; +/// ! +/// @class NSURLRequest +/// +/// @abstract An NSURLRequest object represents a URL load request in a +/// manner independent of protocol and URL scheme. +/// +/// @discussion NSURLRequest encapsulates two basic data elements about +/// a URL load request: +///

    +///
  • The URL to load. +///
  • The policy to use when consulting the URL content cache made +/// available by the implementation. +///
+/// In addition, NSURLRequest is designed to be extended to support +/// protocol-specific data by adding categories to access a property +/// object provided in an interface targeted at protocol implementors. +///
    +///
  • Protocol implementors should direct their attention to the +/// NSURLRequestExtensibility category on NSURLRequest for more +/// information on how to provide extensions on NSURLRequest to +/// support protocol-specific request information. +///
  • Clients of this API who wish to create NSURLRequest objects to +/// load URL content should consult the protocol-specific NSURLRequest +/// categories that are available. The NSHTTPURLRequest category on +/// NSURLRequest is an example. +///
+///

+/// Objects of this class are used to create NSURLConnection instances, +/// which can are used to perform the load of a URL, or as input to the +/// NSURLConnection class method which performs synchronous loads. +class NSURLRequest extends NSObject { + NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + /// Returns a [NSURLRequest] that points to the same underlying object as [other]. + static NSURLRequest castFrom(T other) { + return NSURLRequest._(other._id, other._lib, retain: true, release: true); + } - @mach_port_seqno_t() - external int msgh_seqno; + /// Returns a [NSURLRequest] that wraps the given raw object pointer. + static NSURLRequest castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLRequest._(other, lib, retain: retain, release: release); + } - external security_token_t msgh_sender; -} + /// Returns whether [obj] is an instance of [NSURLRequest]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); + } -class audit_token_t extends ffi.Struct { - @ffi.Array.multi([8]) - external ffi.Array val; -} + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL? URL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSURLRequest1, + _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } -class mach_msg_audit_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_11( + _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); + } - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + NativeCupertinoHttp _lib, + NSURL? URL, + int cachePolicy, + double timeoutInterval) { + final _ret = _lib._objc_msgSend_358( + _lib._class_NSURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } - @mach_port_seqno_t() - external int msgh_seqno; + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_(NSURL? URL) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithURL_1, URL?._id ?? ffi.nullptr); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } - external security_token_t msgh_sender; + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL and + /// cache policy. + /// @discussion This is the designated initializer for the + /// NSURLRequest class. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_cachePolicy_timeoutInterval_( + NSURL? URL, int cachePolicy, double timeoutInterval) { + final _ret = _lib._objc_msgSend_358( + _id, + _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } - external audit_token_t msgh_audit; -} + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -@ffi.Packed(4) -class mach_msg_context_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + /// ! + /// @abstract Returns the cache policy of the receiver. + /// @result The cache policy of the receiver. + int get cachePolicy { + return _lib._objc_msgSend_359(_id, _lib._sel_cachePolicy1); + } - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + /// ! + /// @abstract Returns the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + /// @result The timeout interval of the receiver. + double get timeoutInterval { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); + } - @mach_port_seqno_t() - external int msgh_seqno; + /// ! + /// @abstract The main document URL associated with this load. + /// @discussion This URL is used for the cookie "same domain as main + /// document" policy, and attributing the request as a sub-resource + /// of a user-specified URL. There may also be other future uses. + /// See setMainDocumentURL: + /// @result The main document URL. + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } - external security_token_t msgh_sender; + /// ! + /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. + /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have + /// not explicitly set a networkServiceType (using the setNetworkServiceType method). + /// @result The NSURLRequestNetworkServiceType associated with this request. + int get networkServiceType { + return _lib._objc_msgSend_360(_id, _lib._sel_networkServiceType1); + } - external audit_token_t msgh_audit; + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @result YES if the receiver is allowed to use the built in cellular radios to + /// satisfy the request, NO otherwise. + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); + } - @mach_port_context_t() - external int msgh_context; -} + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @result YES if the receiver is allowed to use an interface marked as expensive to + /// satisfy the request, NO otherwise. + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } -typedef mach_port_context_t = vm_offset_t; -typedef vm_offset_t = uintptr_t; + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @result YES if the receiver is allowed to use an interface marked as constrained to + /// satisfy the request, NO otherwise. + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } -class msg_labels_t extends ffi.Struct { - @mach_port_name_t() - external int sender; -} + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); + } -@ffi.Packed(4) -class mach_msg_mac_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; + /// ! + /// @abstract Returns the NSURLRequestAttribution associated with this request. + /// @discussion This will return NSURLRequestAttributionDeveloper for requests that + /// have not explicitly set an attribution. + /// @result The NSURLRequestAttribution associated with this request. + int get attribution { + return _lib._objc_msgSend_361(_id, _lib._sel_attribution1); + } - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + /// ! + /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. + /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, + /// No otherwise. Defaults to NO. + bool get requiresDNSSECValidation { + return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); + } - @mach_port_seqno_t() - external int msgh_seqno; + /// ! + /// @abstract Returns the HTTP request method of the receiver. + /// @result the HTTP request method of the receiver. + NSString? get HTTPMethod { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - external security_token_t msgh_sender; + /// ! + /// @abstract Returns a dictionary containing all the HTTP header fields + /// of the receiver. + /// @result a dictionary containing all the HTTP header fields of the + /// receiver. + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } - external audit_token_t msgh_audit; + /// ! + /// @method valueForHTTPHeaderField: + /// @abstract Returns the value which corresponds to the given header + /// field. Note that, in keeping with the HTTP RFC, HTTP header field + /// names are case-insensitive. + /// @param field the header field name to use for the lookup + /// (case-insensitive). + /// @result the value associated with the given header field, or nil if + /// there is no value associated with the given header field. + NSString valueForHTTPHeaderField_(NSString? field) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } - @mach_port_context_t() - external int msgh_context; + /// ! + /// @abstract Returns the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + /// @result The request body data of the receiver. + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } - @mach_msg_filter_id() - external int msgh_ad; + /// ! + /// @abstract Returns the request body stream of the receiver + /// if any has been set + /// @discussion The stream is returned for examination only; it is + /// not safe for the caller to manipulate the stream in any way. Also + /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only + /// one can be set on a given request. Also note that the body stream is + /// preserved across copies, but is LOST when the request is coded via the + /// NSCoding protocol + /// @result The request body stream of the receiver. + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } - external msg_labels_t msgh_labels; -} + /// ! + /// @abstract Determine whether default cookie handling will happen for + /// this request. + /// @discussion NOTE: This value is not used prior to 10.3 + /// @result YES if cookies will be sent with and set for this request; + /// otherwise NO. + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); + } -typedef mach_msg_filter_id = ffi.Int; + /// ! + /// @abstract Reports whether the receiver is not expected to wait for the + /// previous response before transmitting. + /// @result YES if the receiver should transmit before the previous response + /// is received. NO if the receiver should wait for the previous response + /// before transmitting. + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + } -class mach_msg_empty_send_t extends ffi.Struct { - external mach_msg_header_t header; + static NSURLRequest new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); + } + + static NSURLRequest alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); + } } -class mach_msg_empty_rcv_t extends ffi.Struct { - external mach_msg_header_t header; +class NSInputStream extends _ObjCWrapper { + NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external mach_msg_trailer_t trailer; -} + /// Returns a [NSInputStream] that points to the same underlying object as [other]. + static NSInputStream castFrom(T other) { + return NSInputStream._(other._id, other._lib, retain: true, release: true); + } -class mach_msg_empty_t extends ffi.Union { - external mach_msg_empty_send_t send; + /// Returns a [NSInputStream] that wraps the given raw object pointer. + static NSInputStream castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInputStream._(other, lib, retain: retain, release: release); + } - external mach_msg_empty_rcv_t rcv; + /// Returns whether [obj] is an instance of [NSInputStream]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); + } } -typedef mach_msg_return_t = kern_return_t; -typedef kern_return_t = ffi.Int; -typedef mach_msg_option_t = integer_t; -typedef mach_msg_timeout_t = natural_t; +/// ! +/// @class NSMutableURLRequest +/// +/// @abstract An NSMutableURLRequest object represents a mutable URL load +/// request in a manner independent of protocol and URL scheme. +/// +/// @discussion This specialization of NSURLRequest is provided to aid +/// developers who may find it more convenient to mutate a single request +/// object for a series of URL loads instead of creating an immutable +/// NSURLRequest for each load. This programming model is supported by +/// the following contract stipulation between NSMutableURLRequest and +/// NSURLConnection: NSURLConnection makes a deep copy of each +/// NSMutableURLRequest object passed to one of its initializers. +///

NSMutableURLRequest is designed to be extended to support +/// protocol-specific data by adding categories to access a property +/// object provided in an interface targeted at protocol implementors. +///

    +///
  • Protocol implementors should direct their attention to the +/// NSMutableURLRequestExtensibility category on +/// NSMutableURLRequest for more information on how to provide +/// extensions on NSMutableURLRequest to support protocol-specific +/// request information. +///
  • Clients of this API who wish to create NSMutableURLRequest +/// objects to load URL content should consult the protocol-specific +/// NSMutableURLRequest categories that are available. The +/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an +/// example. +///
+class NSMutableURLRequest extends NSURLRequest { + NSMutableURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class dispatch_source_type_s extends ffi.Opaque {} + /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. + static NSMutableURLRequest castFrom(T other) { + return NSMutableURLRequest._(other._id, other._lib, + retain: true, release: true); + } -typedef dispatch_source_t = ffi.Pointer; -typedef dispatch_source_type_t = ffi.Pointer; -typedef dispatch_group_t = ffi.Pointer; -typedef dispatch_semaphore_t = ffi.Pointer; -typedef dispatch_once_t = ffi.IntPtr; + /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. + static NSMutableURLRequest castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableURLRequest._(other, lib, retain: retain, release: release); + } -class dispatch_data_s extends ffi.Opaque {} + /// Returns whether [obj] is an instance of [NSMutableURLRequest]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableURLRequest1); + } -typedef dispatch_data_t = ffi.Pointer; -typedef dispatch_data_applier_t = ffi.Pointer<_ObjCBlock>; -bool _ObjCBlock24_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, - ffi.Pointer arg2, ffi.Size arg3)>>() - .asFunction< - bool Function(dispatch_data_t arg0, int arg1, - ffi.Pointer arg2, int arg3)>()(arg0, arg1, arg2, arg3); -} + /// ! + /// @abstract The URL of the receiver. + @override + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -final _ObjCBlock24_closureRegistry = {}; -int _ObjCBlock24_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock24_registerClosure(Function fn) { - final id = ++_ObjCBlock24_closureRegistryIndex; - _ObjCBlock24_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// ! + /// @abstract The URL of the receiver. + set URL(NSURL? value) { + _lib._objc_msgSend_336(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); + } -bool _ObjCBlock24_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { - return _ObjCBlock24_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2, arg3); -} + /// ! + /// @abstract The cache policy of the receiver. + @override + int get cachePolicy { + return _lib._objc_msgSend_359(_id, _lib._sel_cachePolicy1); + } -class ObjCBlock24 extends _ObjCBlockBase { - ObjCBlock24._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// ! + /// @abstract The cache policy of the receiver. + set cachePolicy(int value) { + _lib._objc_msgSend_363(_id, _lib._sel_setCachePolicy_1, value); + } - /// Creates a block from a C function pointer. - ObjCBlock24.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, - ffi.Pointer arg2, ffi.Size arg3)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Size arg1, - ffi.Pointer arg2, - ffi.Size arg3)>(_ObjCBlock24_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + @override + double get timeoutInterval { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); + } - /// Creates a block from a Dart function. - ObjCBlock24.fromFunction( - NativeCupertinoHttp lib, - bool Function(dispatch_data_t arg0, int arg1, ffi.Pointer arg2, - int arg3) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Size arg1, - ffi.Pointer arg2, - ffi.Size arg3)>( - _ObjCBlock24_closureTrampoline, false) - .cast(), - _ObjCBlock24_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - bool call( - dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Size arg1, - ffi.Pointer arg2, - ffi.Size arg3)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - int arg1, - ffi.Pointer arg2, - int arg3)>()(_id, arg0, arg1, arg2, arg3); + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + set timeoutInterval(double value) { + _lib._objc_msgSend_341(_id, _lib._sel_setTimeoutInterval_1, value); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} - -typedef dispatch_fd_t = ffi.Int; -void _ObjCBlock25_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>>() - .asFunction()(arg0, arg1); -} - -final _ObjCBlock25_closureRegistry = {}; -int _ObjCBlock25_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock25_registerClosure(Function fn) { - final id = ++_ObjCBlock25_closureRegistryIndex; - _ObjCBlock25_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document is used to implement the cookie "only + /// from same domain as main document" policy, attributing this request + /// as a sub-resource of a user-specified URL, and possibly other things + /// in the future. + @override + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -void _ObjCBlock25_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { - return _ObjCBlock25_closureRegistry[block.ref.target.address]!(arg0, arg1); -} + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document is used to implement the cookie "only + /// from same domain as main document" policy, attributing this request + /// as a sub-resource of a user-specified URL, and possibly other things + /// in the future. + set mainDocumentURL(NSURL? value) { + _lib._objc_msgSend_336( + _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); + } -class ObjCBlock25 extends _ObjCBlockBase { - ObjCBlock25._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + @override + int get networkServiceType { + return _lib._objc_msgSend_360(_id, _lib._sel_networkServiceType1); + } - /// Creates a block from a C function pointer. - ObjCBlock25.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Int arg1)>(_ObjCBlock25_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + set networkServiceType(int value) { + _lib._objc_msgSend_364(_id, _lib._sel_setNetworkServiceType_1, value); + } - /// Creates a block from a Dart function. - ObjCBlock25.fromFunction( - NativeCupertinoHttp lib, void Function(dispatch_data_t arg0, int arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Int arg1)>(_ObjCBlock25_closureTrampoline) - .cast(), - _ObjCBlock25_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(dispatch_data_t arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, ffi.Int arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, - int arg1)>()(_id, arg0, arg1); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + @override + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + set allowsCellularAccess(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setAllowsCellularAccess_1, value); + } -typedef dispatch_io_t = ffi.Pointer; -typedef dispatch_io_type_t = ffi.UnsignedLong; -void _ObjCBlock26_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); -} + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satisfy the request, YES otherwise. + @override + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } -final _ObjCBlock26_closureRegistry = {}; -int _ObjCBlock26_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock26_registerClosure(Function fn) { - final id = ++_ObjCBlock26_closureRegistryIndex; - _ObjCBlock26_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satisfy the request, YES otherwise. + set allowsExpensiveNetworkAccess(bool value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); + } -void _ObjCBlock26_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock26_closureRegistry[block.ref.target.address]!(arg0); -} + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satisfy the request, YES otherwise. + @override + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); + } -class ObjCBlock26 extends _ObjCBlockBase { - ObjCBlock26._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satisfy the request, YES otherwise. + set allowsConstrainedNetworkAccess(bool value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + } - /// Creates a block from a C function pointer. - ObjCBlock26.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Int arg0)>(_ObjCBlock26_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + @override + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); + } - /// Creates a block from a Dart function. - ObjCBlock26.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Int arg0)>(_ObjCBlock26_closureTrampoline) - .cast(), - _ObjCBlock26_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Int arg0)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + set assumesHTTP3Capable(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setAssumesHTTP3Capable_1, value); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// ! + /// @abstract Sets the NSURLRequestAttribution to associate with this request. + /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the + /// user. Defaults to NSURLRequestAttributionDeveloper. + @override + int get attribution { + return _lib._objc_msgSend_361(_id, _lib._sel_attribution1); + } -typedef dispatch_io_handler_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock27_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() - .asFunction< - void Function( - bool arg0, dispatch_data_t arg1, int arg2)>()(arg0, arg1, arg2); -} + /// ! + /// @abstract Sets the NSURLRequestAttribution to associate with this request. + /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the + /// user. Defaults to NSURLRequestAttributionDeveloper. + set attribution(int value) { + _lib._objc_msgSend_365(_id, _lib._sel_setAttribution_1, value); + } -final _ObjCBlock27_closureRegistry = {}; -int _ObjCBlock27_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock27_registerClosure(Function fn) { - final id = ++_ObjCBlock27_closureRegistryIndex; - _ObjCBlock27_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// ! + /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. + /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, + /// No otherwise. Defaults to NO. + @override + bool get requiresDNSSECValidation { + return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); + } -void _ObjCBlock27_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { - return _ObjCBlock27_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + /// ! + /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. + /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, + /// No otherwise. Defaults to NO. + set requiresDNSSECValidation(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setRequiresDNSSECValidation_1, value); + } -class ObjCBlock27 extends _ObjCBlockBase { - ObjCBlock27._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + /// ! + /// @abstract Sets the HTTP request method of the receiver. + @override + NSString? get HTTPMethod { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - /// Creates a block from a C function pointer. - ObjCBlock27.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0, - dispatch_data_t arg1, - ffi.Int arg2)>(_ObjCBlock27_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// ! + /// @abstract Sets the HTTP request method of the receiver. + set HTTPMethod(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setHTTPMethod_1, value?._id ?? ffi.nullptr); + } - /// Creates a block from a Dart function. - ObjCBlock27.fromFunction(NativeCupertinoHttp lib, - void Function(bool arg0, dispatch_data_t arg1, int arg2) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0, - dispatch_data_t arg1, - ffi.Int arg2)>(_ObjCBlock27_closureTrampoline) - .cast(), - _ObjCBlock27_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(bool arg0, dispatch_data_t arg1, int arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0, - dispatch_data_t arg1, ffi.Int arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, bool arg0, - dispatch_data_t arg1, int arg2)>()(_id, arg0, arg1, arg2); + /// ! + /// @abstract Sets the HTTP header fields of the receiver to the given + /// dictionary. + /// @discussion This method replaces all header fields that may have + /// existed before this method call. + ///

Since HTTP header fields must be string values, each object and + /// key in the dictionary passed to this method must answer YES when + /// sent an -isKindOfClass:[NSString class] message. If either + /// the key or value for a key-value pair answers NO when sent this + /// message, the key-value pair is skipped. + @override + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + /// ! + /// @abstract Sets the HTTP header fields of the receiver to the given + /// dictionary. + /// @discussion This method replaces all header fields that may have + /// existed before this method call. + ///

Since HTTP header fields must be string values, each object and + /// key in the dictionary passed to this method must answer YES when + /// sent an -isKindOfClass:[NSString class] message. If either + /// the key or value for a key-value pair answers NO when sent this + /// message, the key-value pair is skipped. + set allHTTPHeaderFields(NSDictionary? value) { + _lib._objc_msgSend_366( + _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); + } -typedef dispatch_io_close_flags_t = ffi.UnsignedLong; -typedef dispatch_io_interval_flags_t = ffi.UnsignedLong; -typedef dispatch_workloop_t = ffi.Pointer; + /// ! + /// @method setValue:forHTTPHeaderField: + /// @abstract Sets the value of the given HTTP header field. + /// @discussion If a value was previously set for the given header + /// field, that value is replaced with the given value. Note that, in + /// keeping with the HTTP RFC, HTTP header field names are + /// case-insensitive. + /// @param value the header field value. + /// @param field the header field name (case-insensitive). + void setValue_forHTTPHeaderField_(NSString? value, NSString? field) { + return _lib._objc_msgSend_367(_id, _lib._sel_setValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + } -class CFStreamError extends ffi.Struct { - @CFIndex() - external int domain; + /// ! + /// @method addValue:forHTTPHeaderField: + /// @abstract Adds an HTTP header field in the current header + /// dictionary. + /// @discussion This method provides a way to add values to header + /// fields incrementally. If a value was previously set for the given + /// header field, the given value is appended to the previously-existing + /// value. The appropriate field delimiter, a comma in the case of HTTP, + /// is added by the implementation, and should not be added to the given + /// value by the caller. Note that, in keeping with the HTTP RFC, HTTP + /// header field names are case-insensitive. + /// @param value the header field value. + /// @param field the header field name (case-insensitive). + void addValue_forHTTPHeaderField_(NSString? value, NSString? field) { + return _lib._objc_msgSend_367(_id, _lib._sel_addValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + } - @SInt32() - external int error; -} + /// ! + /// @abstract Sets the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + @override + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } -abstract class CFStreamStatus { - static const int kCFStreamStatusNotOpen = 0; - static const int kCFStreamStatusOpening = 1; - static const int kCFStreamStatusOpen = 2; - static const int kCFStreamStatusReading = 3; - static const int kCFStreamStatusWriting = 4; - static const int kCFStreamStatusAtEnd = 5; - static const int kCFStreamStatusClosed = 6; - static const int kCFStreamStatusError = 7; -} + /// ! + /// @abstract Sets the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + set HTTPBody(NSData? value) { + _lib._objc_msgSend_368( + _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); + } -abstract class CFStreamEventType { - static const int kCFStreamEventNone = 0; - static const int kCFStreamEventOpenCompleted = 1; - static const int kCFStreamEventHasBytesAvailable = 2; - static const int kCFStreamEventCanAcceptBytes = 4; - static const int kCFStreamEventErrorOccurred = 8; - static const int kCFStreamEventEndEncountered = 16; -} + /// ! + /// @abstract Sets the request body to be the contents of the given stream. + /// @discussion The provided stream should be unopened; the request will take + /// over the stream's delegate. The entire stream's contents will be + /// transmitted as the HTTP body of the request. Note that the body stream + /// and the body data (set by setHTTPBody:, above) are mutually exclusive + /// - setting one will clear the other. + @override + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); + } -class CFStreamClientContext extends ffi.Struct { - @CFIndex() - external int version; + /// ! + /// @abstract Sets the request body to be the contents of the given stream. + /// @discussion The provided stream should be unopened; the request will take + /// over the stream's delegate. The entire stream's contents will be + /// transmitted as the HTTP body of the request. Note that the body stream + /// and the body data (set by setHTTPBody:, above) are mutually exclusive + /// - setting one will clear the other. + set HTTPBodyStream(NSInputStream? value) { + _lib._objc_msgSend_369( + _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); + } - external ffi.Pointer info; + /// ! + /// @abstract Decide whether default cookie handling will happen for + /// this request (YES if cookies should be sent with and set for this request; + /// otherwise NO). + /// @discussion The default is YES - in other words, cookies are sent from and + /// stored to the cookie manager by default. + /// NOTE: In releases prior to 10.3, this value is ignored + @override + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + /// ! + /// @abstract Decide whether default cookie handling will happen for + /// this request (YES if cookies should be sent with and set for this request; + /// otherwise NO). + /// @discussion The default is YES - in other words, cookies are sent from and + /// stored to the cookie manager by default. + /// NOTE: In releases prior to 10.3, this value is ignored + set HTTPShouldHandleCookies(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); + } - external ffi - .Pointer)>> - release; + /// ! + /// @abstract Sets whether the request should not wait for the previous response + /// before transmitting (YES if the receiver should transmit before the previous response is + /// received. NO to wait for the previous response before transmitting) + /// @discussion Calling this method with a YES value does not guarantee HTTP + /// pipelining behavior. This method may have no effect if an HTTP proxy is + /// configured, or if the HTTP request uses an unsafe request method (e.g., POST + /// requests will not pipeline). Pipelining behavior also may not begin until + /// the second request on a given TCP connection. There may be other situations + /// where pipelining does not occur even though YES was set. + /// HTTP 1.1 allows the client to send multiple requests to the server without + /// waiting for a response. Though HTTP 1.1 requires support for pipelining, + /// some servers report themselves as being HTTP 1.1 but do not support + /// pipelining (disconnecting, sending resources misordered, omitting part of + /// a resource, etc.). + @override + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + /// ! + /// @abstract Sets whether the request should not wait for the previous response + /// before transmitting (YES if the receiver should transmit before the previous response is + /// received. NO to wait for the previous response before transmitting) + /// @discussion Calling this method with a YES value does not guarantee HTTP + /// pipelining behavior. This method may have no effect if an HTTP proxy is + /// configured, or if the HTTP request uses an unsafe request method (e.g., POST + /// requests will not pipeline). Pipelining behavior also may not begin until + /// the second request on a given TCP connection. There may be other situations + /// where pipelining does not occur even though YES was set. + /// HTTP 1.1 allows the client to send multiple requests to the server without + /// waiting for a response. Though HTTP 1.1 requires support for pipelining, + /// some servers report themselves as being HTTP 1.1 but do not support + /// pipelining (disconnecting, sending resources misordered, omitting part of + /// a resource, etc.). + set HTTPShouldUsePipelining(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + } -class __CFReadStream extends ffi.Opaque {} + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_( + NativeCupertinoHttp _lib, NSURL? URL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableURLRequest1, + _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } -class __CFWriteStream extends ffi.Opaque {} + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_11( + _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); + } -typedef CFStreamPropertyKey = CFStringRef; -typedef CFReadStreamRef = ffi.Pointer<__CFReadStream>; -typedef CFWriteStreamRef = ffi.Pointer<__CFWriteStream>; -typedef CFReadStreamClientCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, ffi.Int32, ffi.Pointer)>>; -typedef CFWriteStreamClientCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, ffi.Int32, ffi.Pointer)>>; + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( + NativeCupertinoHttp _lib, + NSURL? URL, + int cachePolicy, + double timeoutInterval) { + final _ret = _lib._objc_msgSend_358( + _lib._class_NSMutableURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } -abstract class CFStreamErrorDomain { - static const int kCFStreamErrorDomainCustom = -1; - static const int kCFStreamErrorDomainPOSIX = 1; - static const int kCFStreamErrorDomainMacOSStatus = 2; -} + static NSMutableURLRequest new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + } -abstract class CFPropertyListMutabilityOptions { - static const int kCFPropertyListImmutable = 0; - static const int kCFPropertyListMutableContainers = 1; - static const int kCFPropertyListMutableContainersAndLeaves = 2; + static NSMutableURLRequest alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + } } -abstract class CFPropertyListFormat { - static const int kCFPropertyListOpenStepFormat = 1; - static const int kCFPropertyListXMLFormat_v1_0 = 100; - static const int kCFPropertyListBinaryFormat_v1_0 = 200; +abstract class NSHTTPCookieAcceptPolicy { + static const int NSHTTPCookieAcceptPolicyAlways = 0; + static const int NSHTTPCookieAcceptPolicyNever = 1; + static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; } -class CFSetCallBacks extends ffi.Struct { - @CFIndex() - external int version; +class NSHTTPCookieStorage extends NSObject { + NSHTTPCookieStorage._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external CFSetRetainCallBack retain; + /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + static NSHTTPCookieStorage castFrom(T other) { + return NSHTTPCookieStorage._(other._id, other._lib, + retain: true, release: true); + } - external CFSetReleaseCallBack release; + /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. + static NSHTTPCookieStorage castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); + } - external CFSetCopyDescriptionCallBack copyDescription; + /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSHTTPCookieStorage1); + } - external CFSetEqualCallBack equal; + static NSHTTPCookieStorage? getSharedHTTPCookieStorage( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_370( + _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } - external CFSetHashCallBack hash; -} + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_371( + _lib._class_NSHTTPCookieStorage1, + _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, + identifier?._id ?? ffi.nullptr); + return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + } -typedef CFSetRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFSetReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, ffi.Pointer)>>; -typedef CFSetCopyDescriptionCallBack = ffi - .Pointer)>>; -typedef CFSetEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(ffi.Pointer, ffi.Pointer)>>; -typedef CFSetHashCallBack = ffi - .Pointer)>>; + NSArray? get cookies { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_cookies1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -class __CFSet extends ffi.Opaque {} + void setCookie_(NSHTTPCookie? cookie) { + return _lib._objc_msgSend_372( + _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); + } -typedef CFSetRef = ffi.Pointer<__CFSet>; -typedef CFMutableSetRef = ffi.Pointer<__CFSet>; -typedef CFSetApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + void deleteCookie_(NSHTTPCookie? cookie) { + return _lib._objc_msgSend_372( + _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); + } -abstract class CFStringEncodings { - static const int kCFStringEncodingMacJapanese = 1; - static const int kCFStringEncodingMacChineseTrad = 2; - static const int kCFStringEncodingMacKorean = 3; - static const int kCFStringEncodingMacArabic = 4; - static const int kCFStringEncodingMacHebrew = 5; - static const int kCFStringEncodingMacGreek = 6; - static const int kCFStringEncodingMacCyrillic = 7; - static const int kCFStringEncodingMacDevanagari = 9; - static const int kCFStringEncodingMacGurmukhi = 10; - static const int kCFStringEncodingMacGujarati = 11; - static const int kCFStringEncodingMacOriya = 12; - static const int kCFStringEncodingMacBengali = 13; - static const int kCFStringEncodingMacTamil = 14; - static const int kCFStringEncodingMacTelugu = 15; - static const int kCFStringEncodingMacKannada = 16; - static const int kCFStringEncodingMacMalayalam = 17; - static const int kCFStringEncodingMacSinhalese = 18; - static const int kCFStringEncodingMacBurmese = 19; - static const int kCFStringEncodingMacKhmer = 20; - static const int kCFStringEncodingMacThai = 21; - static const int kCFStringEncodingMacLaotian = 22; - static const int kCFStringEncodingMacGeorgian = 23; - static const int kCFStringEncodingMacArmenian = 24; - static const int kCFStringEncodingMacChineseSimp = 25; - static const int kCFStringEncodingMacTibetan = 26; - static const int kCFStringEncodingMacMongolian = 27; - static const int kCFStringEncodingMacEthiopic = 28; - static const int kCFStringEncodingMacCentralEurRoman = 29; - static const int kCFStringEncodingMacVietnamese = 30; - static const int kCFStringEncodingMacExtArabic = 31; - static const int kCFStringEncodingMacSymbol = 33; - static const int kCFStringEncodingMacDingbats = 34; - static const int kCFStringEncodingMacTurkish = 35; - static const int kCFStringEncodingMacCroatian = 36; - static const int kCFStringEncodingMacIcelandic = 37; - static const int kCFStringEncodingMacRomanian = 38; - static const int kCFStringEncodingMacCeltic = 39; - static const int kCFStringEncodingMacGaelic = 40; - static const int kCFStringEncodingMacFarsi = 140; - static const int kCFStringEncodingMacUkrainian = 152; - static const int kCFStringEncodingMacInuit = 236; - static const int kCFStringEncodingMacVT100 = 252; - static const int kCFStringEncodingMacHFS = 255; - static const int kCFStringEncodingISOLatin2 = 514; - static const int kCFStringEncodingISOLatin3 = 515; - static const int kCFStringEncodingISOLatin4 = 516; - static const int kCFStringEncodingISOLatinCyrillic = 517; - static const int kCFStringEncodingISOLatinArabic = 518; - static const int kCFStringEncodingISOLatinGreek = 519; - static const int kCFStringEncodingISOLatinHebrew = 520; - static const int kCFStringEncodingISOLatin5 = 521; - static const int kCFStringEncodingISOLatin6 = 522; - static const int kCFStringEncodingISOLatinThai = 523; - static const int kCFStringEncodingISOLatin7 = 525; - static const int kCFStringEncodingISOLatin8 = 526; - static const int kCFStringEncodingISOLatin9 = 527; - static const int kCFStringEncodingISOLatin10 = 528; - static const int kCFStringEncodingDOSLatinUS = 1024; - static const int kCFStringEncodingDOSGreek = 1029; - static const int kCFStringEncodingDOSBalticRim = 1030; - static const int kCFStringEncodingDOSLatin1 = 1040; - static const int kCFStringEncodingDOSGreek1 = 1041; - static const int kCFStringEncodingDOSLatin2 = 1042; - static const int kCFStringEncodingDOSCyrillic = 1043; - static const int kCFStringEncodingDOSTurkish = 1044; - static const int kCFStringEncodingDOSPortuguese = 1045; - static const int kCFStringEncodingDOSIcelandic = 1046; - static const int kCFStringEncodingDOSHebrew = 1047; - static const int kCFStringEncodingDOSCanadianFrench = 1048; - static const int kCFStringEncodingDOSArabic = 1049; - static const int kCFStringEncodingDOSNordic = 1050; - static const int kCFStringEncodingDOSRussian = 1051; - static const int kCFStringEncodingDOSGreek2 = 1052; - static const int kCFStringEncodingDOSThai = 1053; - static const int kCFStringEncodingDOSJapanese = 1056; - static const int kCFStringEncodingDOSChineseSimplif = 1057; - static const int kCFStringEncodingDOSKorean = 1058; - static const int kCFStringEncodingDOSChineseTrad = 1059; - static const int kCFStringEncodingWindowsLatin2 = 1281; - static const int kCFStringEncodingWindowsCyrillic = 1282; - static const int kCFStringEncodingWindowsGreek = 1283; - static const int kCFStringEncodingWindowsLatin5 = 1284; - static const int kCFStringEncodingWindowsHebrew = 1285; - static const int kCFStringEncodingWindowsArabic = 1286; - static const int kCFStringEncodingWindowsBalticRim = 1287; - static const int kCFStringEncodingWindowsVietnamese = 1288; - static const int kCFStringEncodingWindowsKoreanJohab = 1296; - static const int kCFStringEncodingANSEL = 1537; - static const int kCFStringEncodingJIS_X0201_76 = 1568; - static const int kCFStringEncodingJIS_X0208_83 = 1569; - static const int kCFStringEncodingJIS_X0208_90 = 1570; - static const int kCFStringEncodingJIS_X0212_90 = 1571; - static const int kCFStringEncodingJIS_C6226_78 = 1572; - static const int kCFStringEncodingShiftJIS_X0213 = 1576; - static const int kCFStringEncodingShiftJIS_X0213_MenKuTen = 1577; - static const int kCFStringEncodingGB_2312_80 = 1584; - static const int kCFStringEncodingGBK_95 = 1585; - static const int kCFStringEncodingGB_18030_2000 = 1586; - static const int kCFStringEncodingKSC_5601_87 = 1600; - static const int kCFStringEncodingKSC_5601_92_Johab = 1601; - static const int kCFStringEncodingCNS_11643_92_P1 = 1617; - static const int kCFStringEncodingCNS_11643_92_P2 = 1618; - static const int kCFStringEncodingCNS_11643_92_P3 = 1619; - static const int kCFStringEncodingISO_2022_JP = 2080; - static const int kCFStringEncodingISO_2022_JP_2 = 2081; - static const int kCFStringEncodingISO_2022_JP_1 = 2082; - static const int kCFStringEncodingISO_2022_JP_3 = 2083; - static const int kCFStringEncodingISO_2022_CN = 2096; - static const int kCFStringEncodingISO_2022_CN_EXT = 2097; - static const int kCFStringEncodingISO_2022_KR = 2112; - static const int kCFStringEncodingEUC_JP = 2336; - static const int kCFStringEncodingEUC_CN = 2352; - static const int kCFStringEncodingEUC_TW = 2353; - static const int kCFStringEncodingEUC_KR = 2368; - static const int kCFStringEncodingShiftJIS = 2561; - static const int kCFStringEncodingKOI8_R = 2562; - static const int kCFStringEncodingBig5 = 2563; - static const int kCFStringEncodingMacRomanLatin1 = 2564; - static const int kCFStringEncodingHZ_GB_2312 = 2565; - static const int kCFStringEncodingBig5_HKSCS_1999 = 2566; - static const int kCFStringEncodingVISCII = 2567; - static const int kCFStringEncodingKOI8_U = 2568; - static const int kCFStringEncodingBig5_E = 2569; - static const int kCFStringEncodingNextStepJapanese = 2818; - static const int kCFStringEncodingEBCDIC_US = 3073; - static const int kCFStringEncodingEBCDIC_CP037 = 3074; - static const int kCFStringEncodingUTF7 = 67109120; - static const int kCFStringEncodingUTF7_IMAP = 2576; - static const int kCFStringEncodingShiftJIS_X0213_00 = 1576; -} + void removeCookiesSinceDate_(NSDate? date) { + return _lib._objc_msgSend_373( + _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); + } -class CFTreeContext extends ffi.Struct { - @CFIndex() - external int version; + NSArray cookiesForURL_(NSURL? URL) { + final _ret = _lib._objc_msgSend_160( + _id, _lib._sel_cookiesForURL_1, URL?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer info; + void setCookies_forURL_mainDocumentURL_( + NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { + return _lib._objc_msgSend_374( + _id, + _lib._sel_setCookies_forURL_mainDocumentURL_1, + cookies?._id ?? ffi.nullptr, + URL?._id ?? ffi.nullptr, + mainDocumentURL?._id ?? ffi.nullptr); + } - external CFTreeRetainCallBack retain; + int get cookieAcceptPolicy { + return _lib._objc_msgSend_375(_id, _lib._sel_cookieAcceptPolicy1); + } - external CFTreeReleaseCallBack release; + set cookieAcceptPolicy(int value) { + _lib._objc_msgSend_376(_id, _lib._sel_setCookieAcceptPolicy_1, value); + } - external CFTreeCopyDescriptionCallBack copyDescription; -} + NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { + final _ret = _lib._objc_msgSend_97( + _id, + _lib._sel_sortedCookiesUsingDescriptors_1, + sortOrder?._id ?? ffi.nullptr); + return NSArray._(_ret, _lib, retain: true, release: true); + } -typedef CFTreeRetainCallBack = ffi.Pointer< - ffi.NativeFunction Function(ffi.Pointer)>>; -typedef CFTreeReleaseCallBack - = ffi.Pointer)>>; -typedef CFTreeCopyDescriptionCallBack = ffi - .Pointer)>>; + void storeCookies_forTask_(NSArray? cookies, NSURLSessionTask? task) { + return _lib._objc_msgSend_385(_id, _lib._sel_storeCookies_forTask_1, + cookies?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); + } -class __CFTree extends ffi.Opaque {} + void getCookiesForTask_completionHandler_( + NSURLSessionTask? task, ObjCBlock20 completionHandler) { + return _lib._objc_msgSend_386( + _id, + _lib._sel_getCookiesForTask_completionHandler_1, + task?._id ?? ffi.nullptr, + completionHandler._id); + } -typedef CFTreeRef = ffi.Pointer<__CFTree>; -typedef CFTreeApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + static NSHTTPCookieStorage new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + } -abstract class CFURLError { - static const int kCFURLUnknownError = -10; - static const int kCFURLUnknownSchemeError = -11; - static const int kCFURLResourceNotFoundError = -12; - static const int kCFURLResourceAccessViolationError = -13; - static const int kCFURLRemoteHostUnavailableError = -14; - static const int kCFURLImproperArgumentsError = -15; - static const int kCFURLUnknownPropertyKeyError = -16; - static const int kCFURLPropertyKeyUnavailableError = -17; - static const int kCFURLTimeoutError = -18; + static NSHTTPCookieStorage alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + } } -class __CFUUID extends ffi.Opaque {} - -class CFUUIDBytes extends ffi.Struct { - @UInt8() - external int byte0; - - @UInt8() - external int byte1; - - @UInt8() - external int byte2; - - @UInt8() - external int byte3; - - @UInt8() - external int byte4; - - @UInt8() - external int byte5; - - @UInt8() - external int byte6; - - @UInt8() - external int byte7; - - @UInt8() - external int byte8; +class NSHTTPCookie extends _ObjCWrapper { + NSHTTPCookie._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @UInt8() - external int byte9; + /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. + static NSHTTPCookie castFrom(T other) { + return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); + } - @UInt8() - external int byte10; + /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. + static NSHTTPCookie castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPCookie._(other, lib, retain: retain, release: release); + } - @UInt8() - external int byte11; + /// Returns whether [obj] is an instance of [NSHTTPCookie]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); + } +} - @UInt8() - external int byte12; +/// NSURLSessionTask - a cancelable object that refers to the lifetime +/// of processing a given request. +class NSURLSessionTask extends NSObject { + NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @UInt8() - external int byte13; + /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. + static NSURLSessionTask castFrom(T other) { + return NSURLSessionTask._(other._id, other._lib, + retain: true, release: true); + } - @UInt8() - external int byte14; + /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. + static NSURLSessionTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionTask._(other, lib, retain: retain, release: release); + } - @UInt8() - external int byte15; -} + /// Returns whether [obj] is an instance of [NSURLSessionTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionTask1); + } -typedef CFUUIDRef = ffi.Pointer<__CFUUID>; + /// an identifier for this task, assigned by and unique to the owning session + int get taskIdentifier { + return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); + } -class __CFBundle extends ffi.Opaque {} + /// may be nil if this is a stream task + NSURLRequest? get originalRequest { + final _ret = _lib._objc_msgSend_377(_id, _lib._sel_originalRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } -typedef CFBundleRef = ffi.Pointer<__CFBundle>; -typedef cpu_type_t = integer_t; -typedef CFPlugInRef = ffi.Pointer<__CFBundle>; -typedef CFBundleRefNum = ffi.Int; + /// may differ from originalRequest due to http server redirection + NSURLRequest? get currentRequest { + final _ret = _lib._objc_msgSend_377(_id, _lib._sel_currentRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } -class __CFMessagePort extends ffi.Opaque {} + /// may be nil if no response has been received + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_379(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } -class CFMessagePortContext extends ffi.Struct { - @CFIndex() - external int version; + /// Sets a task-specific delegate. Methods not implemented on this delegate will + /// still be forwarded to the session delegate. + /// + /// Cannot be modified after task resumes. Not supported on background session. + /// + /// Delegate is strongly referenced until the task completes, after which it is + /// reset to `nil`. + NSObject? get delegate { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer info; + /// Sets a task-specific delegate. Methods not implemented on this delegate will + /// still be forwarded to the session delegate. + /// + /// Cannot be modified after task resumes. Not supported on background session. + /// + /// Delegate is strongly referenced until the task completes, after which it is + /// reset to `nil`. + set delegate(NSObject? value) { + _lib._objc_msgSend_380( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + /// NSProgress object which represents the task progress. + /// It can be used for task progress tracking. + NSProgress? get progress { + final _ret = _lib._objc_msgSend_322(_id, _lib._sel_progress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); + } - external ffi - .Pointer)>> - release; + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + NSDate? get earliestBeginDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_earliestBeginDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + set earliestBeginDate(NSDate? value) { + _lib._objc_msgSend_381( + _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); + } -typedef CFMessagePortRef = ffi.Pointer<__CFMessagePort>; -typedef CFMessagePortCallBack = ffi.Pointer< - ffi.NativeFunction< - CFDataRef Function( - CFMessagePortRef, SInt32, CFDataRef, ffi.Pointer)>>; -typedef CFMessagePortInvalidationCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFMessagePortRef, ffi.Pointer)>>; -typedef CFPlugInFactoryFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, CFUUIDRef)>>; + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + int get countOfBytesClientExpectsToSend { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfBytesClientExpectsToSend1); + } -class __CFPlugInInstance extends ffi.Opaque {} + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + set countOfBytesClientExpectsToSend(int value) { + _lib._objc_msgSend_330( + _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); + } -typedef CFPlugInInstanceRef = ffi.Pointer<__CFPlugInInstance>; -typedef CFPlugInInstanceDeallocateInstanceDataFunction - = ffi.Pointer)>>; -typedef CFPlugInInstanceGetInterfaceFunction = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(CFPlugInInstanceRef, CFStringRef, - ffi.Pointer>)>>; + int get countOfBytesClientExpectsToReceive { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfBytesClientExpectsToReceive1); + } -class __CFMachPort extends ffi.Opaque {} + set countOfBytesClientExpectsToReceive(int value) { + _lib._objc_msgSend_330( + _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); + } -class CFMachPortContext extends ffi.Struct { - @CFIndex() - external int version; + /// number of body bytes already sent + int get countOfBytesSent { + return _lib._objc_msgSend_329(_id, _lib._sel_countOfBytesSent1); + } - external ffi.Pointer info; + /// number of body bytes already received + int get countOfBytesReceived { + return _lib._objc_msgSend_329(_id, _lib._sel_countOfBytesReceived1); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; + /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request + int get countOfBytesExpectedToSend { + return _lib._objc_msgSend_329(_id, _lib._sel_countOfBytesExpectedToSend1); + } - external ffi - .Pointer)>> - release; + /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. + int get countOfBytesExpectedToReceive { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfBytesExpectedToReceive1); + } - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; -} + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + NSString? get taskDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_taskDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -typedef CFMachPortRef = ffi.Pointer<__CFMachPort>; -typedef CFMachPortCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFMachPortRef, ffi.Pointer, CFIndex, - ffi.Pointer)>>; -typedef CFMachPortInvalidationCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFMachPortRef, ffi.Pointer)>>; + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + set taskDescription(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); + } -class __CFAttributedString extends ffi.Opaque {} + /// -cancel returns immediately, but marks a task as being canceled. + /// The task will signal -URLSession:task:didCompleteWithError: with an + /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some + /// cases, the task may signal other work before it acknowledges the + /// cancelation. -cancel may be sent to a task that has been suspended. + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } -typedef CFAttributedStringRef = ffi.Pointer<__CFAttributedString>; -typedef CFMutableAttributedStringRef = ffi.Pointer<__CFAttributedString>; + /// The current state of the task within the session. + int get state { + return _lib._objc_msgSend_382(_id, _lib._sel_state1); + } -class __CFURLEnumerator extends ffi.Opaque {} + /// The error, if any, delivered via -URLSession:task:didCompleteWithError: + /// This property will be nil in the event that no error occurred. + NSError? get error { + final _ret = _lib._objc_msgSend_383(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } -abstract class CFURLEnumeratorOptions { - static const int kCFURLEnumeratorDefaultBehavior = 0; - static const int kCFURLEnumeratorDescendRecursively = 1; - static const int kCFURLEnumeratorSkipInvisibles = 2; - static const int kCFURLEnumeratorGenerateFileReferenceURLs = 4; - static const int kCFURLEnumeratorSkipPackageContents = 8; - static const int kCFURLEnumeratorIncludeDirectoriesPreOrder = 16; - static const int kCFURLEnumeratorIncludeDirectoriesPostOrder = 32; - static const int kCFURLEnumeratorGenerateRelativePathURLs = 64; -} + /// Suspending a task will prevent the NSURLSession from continuing to + /// load data. There may still be delegate calls made on behalf of + /// this task (for instance, to report data received while suspending) + /// but no further transmissions will be made on behalf of the task + /// until -resume is sent. The timeout timer associated with the task + /// will be disabled while a task is suspended. -suspend and -resume are + /// nestable. + void suspend() { + return _lib._objc_msgSend_1(_id, _lib._sel_suspend1); + } -typedef CFURLEnumeratorRef = ffi.Pointer<__CFURLEnumerator>; + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } -abstract class CFURLEnumeratorResult { - static const int kCFURLEnumeratorSuccess = 1; - static const int kCFURLEnumeratorEnd = 2; - static const int kCFURLEnumeratorError = 3; - static const int kCFURLEnumeratorDirectoryPostOrderSuccess = 4; -} + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. + /// + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + double get priority { + return _lib._objc_msgSend_84(_id, _lib._sel_priority1); + } -class guid_t extends ffi.Union { - @ffi.Array.multi([16]) - external ffi.Array g_guid; + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. + /// + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + set priority(double value) { + _lib._objc_msgSend_384(_id, _lib._sel_setPriority_1, value); + } - @ffi.Array.multi([4]) - external ffi.Array g_guid_asint; -} + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + bool get prefersIncrementalDelivery { + return _lib._objc_msgSend_11(_id, _lib._sel_prefersIncrementalDelivery1); + } -@ffi.Packed(1) -class ntsid_t extends ffi.Struct { - @u_int8_t() - external int sid_kind; + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + set prefersIncrementalDelivery(bool value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setPrefersIncrementalDelivery_1, value); + } - @u_int8_t() - external int sid_authcount; + @override + NSURLSessionTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } - @ffi.Array.multi([6]) - external ffi.Array sid_authority; + static NSURLSessionTask new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } - @ffi.Array.multi([16]) - external ffi.Array sid_authorities; + static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } } -typedef u_int8_t = ffi.UnsignedChar; -typedef u_int32_t = ffi.UnsignedInt; - -class kauth_identity_extlookup extends ffi.Struct { - @u_int32_t() - external int el_seqno; - - @u_int32_t() - external int el_result; +class NSURLResponse extends NSObject { + NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @u_int32_t() - external int el_flags; + /// Returns a [NSURLResponse] that points to the same underlying object as [other]. + static NSURLResponse castFrom(T other) { + return NSURLResponse._(other._id, other._lib, retain: true, release: true); + } - @__darwin_pid_t() - external int el_info_pid; + /// Returns a [NSURLResponse] that wraps the given raw object pointer. + static NSURLResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLResponse._(other, lib, retain: retain, release: release); + } - @u_int64_t() - external int el_extend; + /// Returns whether [obj] is an instance of [NSURLResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); + } - @u_int32_t() - external int el_info_reserved_1; + /// ! + /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: + /// @abstract Initialize an NSURLResponse with the provided values. + /// @param URL the URL + /// @param MIMEType the MIME content type of the response + /// @param length the expected content length of the associated data + /// @param name the name of the text encoding for the associated data, if applicable, else nil + /// @result The initialized NSURLResponse. + /// @discussion This is the designated initializer for NSURLResponse. + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + NSURL? URL, NSString? MIMEType, int length, NSString? name) { + final _ret = _lib._objc_msgSend_378( + _id, + _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, + URL?._id ?? ffi.nullptr, + MIMEType?._id ?? ffi.nullptr, + length, + name?._id ?? ffi.nullptr); + return NSURLResponse._(_ret, _lib, retain: true, release: true); + } - @uid_t() - external int el_uid; + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } - external guid_t el_uguid; + /// ! + /// @abstract Returns the MIME type of the receiver. + /// @discussion The MIME type is based on the information provided + /// from an origin source. However, that value may be changed or + /// corrected by a protocol implementation if it can be determined + /// that the origin server or source reported the information + /// incorrectly or imprecisely. An attempt to guess the MIME type may + /// be made if the origin source did not report any such information. + /// @result The MIME type of the receiver. + NSString? get MIMEType { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_MIMEType1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @u_int32_t() - external int el_uguid_valid; + /// ! + /// @abstract Returns the expected content length of the receiver. + /// @discussion Some protocol implementations report a content length + /// as part of delivering load metadata, but not all protocols + /// guarantee the amount of data that will be delivered in actuality. + /// Hence, this method returns an expected amount. Clients should use + /// this value as an advisory, and should be prepared to deal with + /// either more or less data. + /// @result The expected content length of the receiver, or -1 if + /// there is no expectation that can be arrived at regarding expected + /// content length. + int get expectedContentLength { + return _lib._objc_msgSend_82(_id, _lib._sel_expectedContentLength1); + } - external ntsid_t el_usid; + /// ! + /// @abstract Returns the name of the text encoding of the receiver. + /// @discussion This name will be the actual string reported by the + /// origin source during the course of performing a protocol-specific + /// URL load. Clients can inspect this string and convert it to an + /// NSStringEncoding or CFStringEncoding using the methods and + /// functions made available in the appropriate framework. + /// @result The name of the text encoding of the receiver, or nil if no + /// text encoding was specified. + NSString? get textEncodingName { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_textEncodingName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @u_int32_t() - external int el_usid_valid; + /// ! + /// @abstract Returns a suggested filename if the resource were saved to disk. + /// @discussion The method first checks if the server has specified a filename using the + /// content disposition header. If no valid filename is specified using that mechanism, + /// this method checks the last path component of the URL. If no valid filename can be + /// obtained using the last path component, this method uses the URL's host as the filename. + /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. + /// In most cases, this method appends the proper file extension based on the MIME type. + /// This method always returns a valid filename. + /// @result A suggested filename to use if saving the resource to disk. + NSString? get suggestedFilename { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedFilename1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - @gid_t() - external int el_gid; + static NSURLResponse new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); + } - external guid_t el_gguid; + static NSURLResponse alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); + } +} - @u_int32_t() - external int el_gguid_valid; +abstract class NSURLSessionTaskState { + /// The task is currently being serviced by the session + static const int NSURLSessionTaskStateRunning = 0; + static const int NSURLSessionTaskStateSuspended = 1; - external ntsid_t el_gsid; + /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. + static const int NSURLSessionTaskStateCanceling = 2; - @u_int32_t() - external int el_gsid_valid; + /// The task has completed and the session will receive no more delegate notifications + static const int NSURLSessionTaskStateCompleted = 3; +} - @u_int32_t() - external int el_member_valid; +void _ObjCBlock20_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} - @u_int32_t() - external int el_sup_grp_cnt; +final _ObjCBlock20_closureRegistry = {}; +int _ObjCBlock20_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock20_registerClosure(Function fn) { + final id = ++_ObjCBlock20_closureRegistryIndex; + _ObjCBlock20_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @ffi.Array.multi([16]) - external ffi.Array el_sup_groups; +void _ObjCBlock20_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock20_closureRegistry[block.ref.target.address]!(arg0); } -typedef u_int64_t = ffi.UnsignedLongLong; +class ObjCBlock20 extends _ObjCBlockBase { + ObjCBlock20._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class kauth_cache_sizes extends ffi.Struct { - @u_int32_t() - external int kcs_group_size; + /// Creates a block from a C function pointer. + ObjCBlock20.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock20_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @u_int32_t() - external int kcs_id_size; + /// Creates a block from a Dart function. + ObjCBlock20.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock20_closureTrampoline) + .cast(), + _ObjCBlock20_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } } -class kauth_ace extends ffi.Struct { - external guid_t ace_applicable; +final class CFArrayCallBacks extends ffi.Struct { + @CFIndex() + external int version; - @u_int32_t() - external int ace_flags; + external CFArrayRetainCallBack retain; - @kauth_ace_rights_t() - external int ace_rights; + external CFArrayReleaseCallBack release; + + external CFArrayCopyDescriptionCallBack copyDescription; + + external CFArrayEqualCallBack equal; } -typedef kauth_ace_rights_t = u_int32_t; +typedef CFArrayRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer value)>>; +typedef CFArrayReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer value)>>; +typedef CFArrayCopyDescriptionCallBack = ffi.Pointer< + ffi.NativeFunction value)>>; +typedef CFArrayEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function( + ffi.Pointer value1, ffi.Pointer value2)>>; -class kauth_acl extends ffi.Struct { - @u_int32_t() - external int acl_entrycount; +final class __CFArray extends ffi.Opaque {} - @u_int32_t() - external int acl_flags; +typedef CFArrayRef = ffi.Pointer<__CFArray>; +typedef CFMutableArrayRef = ffi.Pointer<__CFArray>; +typedef CFArrayApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer value, ffi.Pointer context)>>; +typedef CFComparatorFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer val1, + ffi.Pointer val2, ffi.Pointer context)>>; - @ffi.Array.multi([1]) - external ffi.Array acl_ace; -} +class OS_object extends NSObject { + OS_object._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class kauth_filesec extends ffi.Struct { - @u_int32_t() - external int fsec_magic; + /// Returns a [OS_object] that points to the same underlying object as [other]. + static OS_object castFrom(T other) { + return OS_object._(other._id, other._lib, retain: true, release: true); + } - external guid_t fsec_owner; + /// Returns a [OS_object] that wraps the given raw object pointer. + static OS_object castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return OS_object._(other, lib, retain: retain, release: release); + } - external guid_t fsec_group; + /// Returns whether [obj] is an instance of [OS_object]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_OS_object1); + } - external kauth_acl fsec_acl; -} + @override + OS_object init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_object._(_ret, _lib, retain: true, release: true); + } -abstract class acl_perm_t { - static const int ACL_READ_DATA = 2; - static const int ACL_LIST_DIRECTORY = 2; - static const int ACL_WRITE_DATA = 4; - static const int ACL_ADD_FILE = 4; - static const int ACL_EXECUTE = 8; - static const int ACL_SEARCH = 8; - static const int ACL_DELETE = 16; - static const int ACL_APPEND_DATA = 32; - static const int ACL_ADD_SUBDIRECTORY = 32; - static const int ACL_DELETE_CHILD = 64; - static const int ACL_READ_ATTRIBUTES = 128; - static const int ACL_WRITE_ATTRIBUTES = 256; - static const int ACL_READ_EXTATTRIBUTES = 512; - static const int ACL_WRITE_EXTATTRIBUTES = 1024; - static const int ACL_READ_SECURITY = 2048; - static const int ACL_WRITE_SECURITY = 4096; - static const int ACL_CHANGE_OWNER = 8192; - static const int ACL_SYNCHRONIZE = 1048576; -} + static OS_object new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_new1); + return OS_object._(_ret, _lib, retain: false, release: true); + } -abstract class acl_tag_t { - static const int ACL_UNDEFINED_TAG = 0; - static const int ACL_EXTENDED_ALLOW = 1; - static const int ACL_EXTENDED_DENY = 2; + static OS_object alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_alloc1); + return OS_object._(_ret, _lib, retain: false, release: true); + } } -abstract class acl_type_t { - static const int ACL_TYPE_EXTENDED = 256; - static const int ACL_TYPE_ACCESS = 0; - static const int ACL_TYPE_DEFAULT = 1; - static const int ACL_TYPE_AFS = 2; - static const int ACL_TYPE_CODA = 3; - static const int ACL_TYPE_NTFS = 4; - static const int ACL_TYPE_NWFS = 5; -} +final class __SecCertificate extends ffi.Opaque {} -abstract class acl_entry_id_t { - static const int ACL_FIRST_ENTRY = 0; - static const int ACL_NEXT_ENTRY = -1; - static const int ACL_LAST_ENTRY = -2; -} +final class __SecIdentity extends ffi.Opaque {} -abstract class acl_flag_t { - static const int ACL_FLAG_DEFER_INHERIT = 1; - static const int ACL_FLAG_NO_INHERIT = 131072; - static const int ACL_ENTRY_INHERITED = 16; - static const int ACL_ENTRY_FILE_INHERIT = 32; - static const int ACL_ENTRY_DIRECTORY_INHERIT = 64; - static const int ACL_ENTRY_LIMIT_INHERIT = 128; - static const int ACL_ENTRY_ONLY_INHERIT = 256; -} +final class __SecKey extends ffi.Opaque {} -class _acl extends ffi.Opaque {} +final class __SecPolicy extends ffi.Opaque {} -class _acl_entry extends ffi.Opaque {} +final class __SecAccessControl extends ffi.Opaque {} -class _acl_permset extends ffi.Opaque {} +final class __SecKeychain extends ffi.Opaque {} -class _acl_flagset extends ffi.Opaque {} +final class __SecKeychainItem extends ffi.Opaque {} -typedef acl_t = ffi.Pointer<_acl>; -typedef acl_entry_t = ffi.Pointer<_acl_entry>; -typedef acl_permset_t = ffi.Pointer<_acl_permset>; -typedef acl_permset_mask_t = u_int64_t; -typedef acl_flagset_t = ffi.Pointer<_acl_flagset>; +final class __SecKeychainSearch extends ffi.Opaque {} -class __CFFileSecurity extends ffi.Opaque {} +final class SecKeychainAttribute extends ffi.Struct { + @SecKeychainAttrType() + external int tag; -typedef CFFileSecurityRef = ffi.Pointer<__CFFileSecurity>; + @UInt32() + external int length; -abstract class CFFileSecurityClearOptions { - static const int kCFFileSecurityClearOwner = 1; - static const int kCFFileSecurityClearGroup = 2; - static const int kCFFileSecurityClearMode = 4; - static const int kCFFileSecurityClearOwnerUUID = 8; - static const int kCFFileSecurityClearGroupUUID = 16; - static const int kCFFileSecurityClearAccessControlList = 32; + external ffi.Pointer data; } -class __CFStringTokenizer extends ffi.Opaque {} +typedef SecKeychainAttrType = OSType; +typedef OSType = FourCharCode; +typedef FourCharCode = UInt32; -abstract class CFStringTokenizerTokenType { - static const int kCFStringTokenizerTokenNone = 0; - static const int kCFStringTokenizerTokenNormal = 1; - static const int kCFStringTokenizerTokenHasSubTokensMask = 2; - static const int kCFStringTokenizerTokenHasDerivedSubTokensMask = 4; - static const int kCFStringTokenizerTokenHasHasNumbersMask = 8; - static const int kCFStringTokenizerTokenHasNonLettersMask = 16; - static const int kCFStringTokenizerTokenIsCJWordMask = 32; +final class SecKeychainAttributeList extends ffi.Struct { + @UInt32() + external int count; + + external ffi.Pointer attr; } -typedef CFStringTokenizerRef = ffi.Pointer<__CFStringTokenizer>; +final class __SecTrustedApplication extends ffi.Opaque {} -class __CFFileDescriptor extends ffi.Opaque {} +final class __SecAccess extends ffi.Opaque {} -class CFFileDescriptorContext extends ffi.Struct { - @CFIndex() - external int version; +final class __SecACL extends ffi.Opaque {} - external ffi.Pointer info; +final class __SecPassword extends ffi.Opaque {} - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> retain; +final class SecKeychainAttributeInfo extends ffi.Struct { + @UInt32() + external int count; - external ffi - .Pointer)>> - release; + external ffi.Pointer tag; - external ffi.Pointer< - ffi.NativeFunction)>> - copyDescription; + external ffi.Pointer format; } -typedef CFFileDescriptorRef = ffi.Pointer<__CFFileDescriptor>; -typedef CFFileDescriptorNativeDescriptor = ffi.Int; -typedef CFFileDescriptorCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFFileDescriptorRef, CFOptionFlags, ffi.Pointer)>>; +typedef OSStatus = SInt32; -class __CFUserNotification extends ffi.Opaque {} +final class _RuneEntry extends ffi.Struct { + @__darwin_rune_t() + external int __min; -typedef CFUserNotificationRef = ffi.Pointer<__CFUserNotification>; -typedef CFUserNotificationCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFUserNotificationRef, CFOptionFlags)>>; + @__darwin_rune_t() + external int __max; -class __CFXMLNode extends ffi.Opaque {} + @__darwin_rune_t() + external int __map; -abstract class CFXMLNodeTypeCode { - static const int kCFXMLNodeTypeDocument = 1; - static const int kCFXMLNodeTypeElement = 2; - static const int kCFXMLNodeTypeAttribute = 3; - static const int kCFXMLNodeTypeProcessingInstruction = 4; - static const int kCFXMLNodeTypeComment = 5; - static const int kCFXMLNodeTypeText = 6; - static const int kCFXMLNodeTypeCDATASection = 7; - static const int kCFXMLNodeTypeDocumentFragment = 8; - static const int kCFXMLNodeTypeEntity = 9; - static const int kCFXMLNodeTypeEntityReference = 10; - static const int kCFXMLNodeTypeDocumentType = 11; - static const int kCFXMLNodeTypeWhitespace = 12; - static const int kCFXMLNodeTypeNotation = 13; - static const int kCFXMLNodeTypeElementTypeDeclaration = 14; - static const int kCFXMLNodeTypeAttributeListDeclaration = 15; + external ffi.Pointer<__uint32_t> __types; } -class CFXMLElementInfo extends ffi.Struct { - external CFDictionaryRef attributes; - - external CFArrayRef attributeOrder; +typedef __darwin_rune_t = __darwin_wchar_t; +typedef __darwin_wchar_t = ffi.Int; - @Boolean() - external int isEmpty; +final class _RuneRange extends ffi.Struct { + @ffi.Int() + external int __nranges; - @ffi.Array.multi([3]) - external ffi.Array _reserved; + external ffi.Pointer<_RuneEntry> __ranges; } -class CFXMLProcessingInstructionInfo extends ffi.Struct { - external CFStringRef dataString; +final class _RuneCharClass extends ffi.Struct { + @ffi.Array.multi([14]) + external ffi.Array __name; + + @__uint32_t() + external int __mask; } -class CFXMLDocumentInfo extends ffi.Struct { - external CFURLRef sourceURL; +final class _RuneLocale extends ffi.Struct { + @ffi.Array.multi([8]) + external ffi.Array __magic; - @CFStringEncoding() - external int encoding; -} + @ffi.Array.multi([32]) + external ffi.Array __encoding; -class CFXMLExternalID extends ffi.Struct { - external CFURLRef systemID; + external ffi.Pointer< + ffi.NativeFunction< + __darwin_rune_t Function(ffi.Pointer, __darwin_size_t, + ffi.Pointer>)>> __sgetrune; - external CFStringRef publicID; -} + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(__darwin_rune_t, ffi.Pointer, + __darwin_size_t, ffi.Pointer>)>> __sputrune; -class CFXMLDocumentTypeInfo extends ffi.Struct { - external CFXMLExternalID externalID; -} + @__darwin_rune_t() + external int __invalid_rune; -class CFXMLNotationInfo extends ffi.Struct { - external CFXMLExternalID externalID; -} + @ffi.Array.multi([256]) + external ffi.Array<__uint32_t> __runetype; -class CFXMLElementTypeDeclarationInfo extends ffi.Struct { - external CFStringRef contentDescription; -} + @ffi.Array.multi([256]) + external ffi.Array<__darwin_rune_t> __maplower; -class CFXMLAttributeDeclarationInfo extends ffi.Struct { - external CFStringRef attributeName; + @ffi.Array.multi([256]) + external ffi.Array<__darwin_rune_t> __mapupper; - external CFStringRef typeString; + external _RuneRange __runetype_ext; - external CFStringRef defaultString; -} + external _RuneRange __maplower_ext; -class CFXMLAttributeListDeclarationInfo extends ffi.Struct { - @CFIndex() - external int numberOfAttributes; + external _RuneRange __mapupper_ext; - external ffi.Pointer attributes; -} + external ffi.Pointer __variable; -abstract class CFXMLEntityTypeCode { - static const int kCFXMLEntityTypeParameter = 0; - static const int kCFXMLEntityTypeParsedInternal = 1; - static const int kCFXMLEntityTypeParsedExternal = 2; - static const int kCFXMLEntityTypeUnparsed = 3; - static const int kCFXMLEntityTypeCharacter = 4; + @ffi.Int() + external int __variable_len; + + @ffi.Int() + external int __ncharclasses; + + external ffi.Pointer<_RuneCharClass> __charclasses; } -class CFXMLEntityInfo extends ffi.Struct { - @ffi.Int32() - external int entityType; +typedef __darwin_ct_rune_t = ffi.Int; - external CFStringRef replacementText; +final class lconv extends ffi.Struct { + external ffi.Pointer decimal_point; - external CFXMLExternalID entityID; + external ffi.Pointer thousands_sep; - external CFStringRef notationName; -} + external ffi.Pointer grouping; -class CFXMLEntityReferenceInfo extends ffi.Struct { - @ffi.Int32() - external int entityType; -} + external ffi.Pointer int_curr_symbol; -typedef CFXMLNodeRef = ffi.Pointer<__CFXMLNode>; -typedef CFXMLTreeRef = CFTreeRef; + external ffi.Pointer currency_symbol; -class __CFXMLParser extends ffi.Opaque {} + external ffi.Pointer mon_decimal_point; -abstract class CFXMLParserOptions { - static const int kCFXMLParserValidateDocument = 1; - static const int kCFXMLParserSkipMetaData = 2; - static const int kCFXMLParserReplacePhysicalEntities = 4; - static const int kCFXMLParserSkipWhitespace = 8; - static const int kCFXMLParserResolveExternalEntities = 16; - static const int kCFXMLParserAddImpliedAttributes = 32; - static const int kCFXMLParserAllOptions = 16777215; - static const int kCFXMLParserNoOptions = 0; -} + external ffi.Pointer mon_thousands_sep; -abstract class CFXMLParserStatusCode { - static const int kCFXMLStatusParseNotBegun = -2; - static const int kCFXMLStatusParseInProgress = -1; - static const int kCFXMLStatusParseSuccessful = 0; - static const int kCFXMLErrorUnexpectedEOF = 1; - static const int kCFXMLErrorUnknownEncoding = 2; - static const int kCFXMLErrorEncodingConversionFailure = 3; - static const int kCFXMLErrorMalformedProcessingInstruction = 4; - static const int kCFXMLErrorMalformedDTD = 5; - static const int kCFXMLErrorMalformedName = 6; - static const int kCFXMLErrorMalformedCDSect = 7; - static const int kCFXMLErrorMalformedCloseTag = 8; - static const int kCFXMLErrorMalformedStartTag = 9; - static const int kCFXMLErrorMalformedDocument = 10; - static const int kCFXMLErrorElementlessDocument = 11; - static const int kCFXMLErrorMalformedComment = 12; - static const int kCFXMLErrorMalformedCharacterReference = 13; - static const int kCFXMLErrorMalformedParsedCharacterData = 14; - static const int kCFXMLErrorNoData = 15; -} + external ffi.Pointer mon_grouping; -class CFXMLParserCallBacks extends ffi.Struct { - @CFIndex() - external int version; + external ffi.Pointer positive_sign; - external CFXMLParserCreateXMLStructureCallBack createXMLStructure; + external ffi.Pointer negative_sign; - external CFXMLParserAddChildCallBack addChild; + @ffi.Char() + external int int_frac_digits; - external CFXMLParserEndXMLStructureCallBack endXMLStructure; + @ffi.Char() + external int frac_digits; - external CFXMLParserResolveExternalEntityCallBack resolveExternalEntity; + @ffi.Char() + external int p_cs_precedes; - external CFXMLParserHandleErrorCallBack handleError; -} + @ffi.Char() + external int p_sep_by_space; -typedef CFXMLParserCreateXMLStructureCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFXMLParserRef, CFXMLNodeRef, ffi.Pointer)>>; -typedef CFXMLParserRef = ffi.Pointer<__CFXMLParser>; -typedef CFXMLParserAddChildCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFXMLParserRef, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>; -typedef CFXMLParserEndXMLStructureCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFXMLParserRef, ffi.Pointer, ffi.Pointer)>>; -typedef CFXMLParserResolveExternalEntityCallBack = ffi.Pointer< - ffi.NativeFunction< - CFDataRef Function(CFXMLParserRef, ffi.Pointer, - ffi.Pointer)>>; -typedef CFXMLParserHandleErrorCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(CFXMLParserRef, ffi.Int32, ffi.Pointer)>>; + @ffi.Char() + external int n_cs_precedes; -class CFXMLParserContext extends ffi.Struct { - @CFIndex() - external int version; + @ffi.Char() + external int n_sep_by_space; - external ffi.Pointer info; + @ffi.Char() + external int p_sign_posn; - external CFXMLParserRetainCallBack retain; + @ffi.Char() + external int n_sign_posn; - external CFXMLParserReleaseCallBack release; + @ffi.Char() + external int int_p_cs_precedes; - external CFXMLParserCopyDescriptionCallBack copyDescription; -} + @ffi.Char() + external int int_n_cs_precedes; -typedef CFXMLParserRetainCallBack = ffi.Pointer< - ffi.NativeFunction Function(ffi.Pointer)>>; -typedef CFXMLParserReleaseCallBack - = ffi.Pointer)>>; -typedef CFXMLParserCopyDescriptionCallBack = ffi - .Pointer)>>; + @ffi.Char() + external int int_p_sep_by_space; -abstract class SecTrustResultType { - static const int kSecTrustResultInvalid = 0; - static const int kSecTrustResultProceed = 1; - static const int kSecTrustResultConfirm = 2; - static const int kSecTrustResultDeny = 3; - static const int kSecTrustResultUnspecified = 4; - static const int kSecTrustResultRecoverableTrustFailure = 5; - static const int kSecTrustResultFatalTrustFailure = 6; - static const int kSecTrustResultOtherError = 7; -} + @ffi.Char() + external int int_n_sep_by_space; -class __SecTrust extends ffi.Opaque {} + @ffi.Char() + external int int_p_sign_posn; -typedef SecTrustRef = ffi.Pointer<__SecTrust>; -typedef SecTrustCallback = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock28_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>>() - .asFunction()(arg0, arg1); + @ffi.Char() + external int int_n_sign_posn; } -final _ObjCBlock28_closureRegistry = {}; -int _ObjCBlock28_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock28_registerClosure(Function fn) { - final id = ++_ObjCBlock28_closureRegistryIndex; - _ObjCBlock28_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +final class __float2 extends ffi.Struct { + @ffi.Float() + external double __sinval; + + @ffi.Float() + external double __cosval; } -void _ObjCBlock28_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { - return _ObjCBlock28_closureRegistry[block.ref.target.address]!(arg0, arg1); +final class __double2 extends ffi.Struct { + @ffi.Double() + external double __sinval; + + @ffi.Double() + external double __cosval; } -class ObjCBlock28 extends _ObjCBlockBase { - ObjCBlock28._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class exception extends ffi.Struct { + @ffi.Int() + external int type; - /// Creates a block from a C function pointer. - ObjCBlock28.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>> - ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - ffi.Int32 arg1)>(_ObjCBlock28_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external ffi.Pointer name; - /// Creates a block from a Dart function. - ObjCBlock28.fromFunction( - NativeCupertinoHttp lib, void Function(SecTrustRef arg0, int arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - ffi.Int32 arg1)>(_ObjCBlock28_closureTrampoline) - .cast(), - _ObjCBlock28_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(SecTrustRef arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, ffi.Int32 arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, - int arg1)>()(_id, arg0, arg1); - } + @ffi.Double() + external double arg1; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Double() + external double arg2; -typedef SecTrustWithErrorCallback = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock29_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, bool arg1, CFErrorRef arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() - .asFunction< - void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2)>()( - arg0, arg1, arg2); + @ffi.Double() + external double retval; } -final _ObjCBlock29_closureRegistry = {}; -int _ObjCBlock29_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock29_registerClosure(Function fn) { - final id = ++_ObjCBlock29_closureRegistryIndex; - _ObjCBlock29_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +typedef pthread_t = __darwin_pthread_t; +typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; +typedef stack_t = __darwin_sigaltstack; -void _ObjCBlock29_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, bool arg1, CFErrorRef arg2) { - return _ObjCBlock29_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +final class __sbuf extends ffi.Struct { + external ffi.Pointer _base; + + @ffi.Int() + external int _size; } -class ObjCBlock29 extends _ObjCBlockBase { - ObjCBlock29._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class __sFILEX extends ffi.Opaque {} - /// Creates a block from a C function pointer. - ObjCBlock29.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - ffi.Bool arg1, - CFErrorRef arg2)>(_ObjCBlock29_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class __sFILE extends ffi.Struct { + external ffi.Pointer _p; - /// Creates a block from a Dart function. - ObjCBlock29.fromFunction(NativeCupertinoHttp lib, - void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - ffi.Bool arg1, - CFErrorRef arg2)>(_ObjCBlock29_closureTrampoline) - .cast(), - _ObjCBlock29_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(SecTrustRef arg0, bool arg1, CFErrorRef arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, - bool arg1, CFErrorRef arg2)>()(_id, arg0, arg1, arg2); - } + @ffi.Int() + external int _r; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @ffi.Int() + external int _w; -typedef SecKeyRef = ffi.Pointer<__SecKey>; -typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; + @ffi.Short() + external int _flags; -class cssm_data extends ffi.Struct { - @ffi.Size() - external int Length; + @ffi.Short() + external int _file; + + external __sbuf _bf; + + @ffi.Int() + external int _lbfsize; + + external ffi.Pointer _cookie; + + external ffi + .Pointer)>> + _close; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> _read; + + external ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> _seek; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> _write; + + external __sbuf _ub; + + external ffi.Pointer<__sFILEX> _extra; + + @ffi.Int() + external int _ur; + + @ffi.Array.multi([3]) + external ffi.Array _ubuf; - external ffi.Pointer Data; -} + @ffi.Array.multi([1]) + external ffi.Array _nbuf; -class SecAsn1AlgId extends ffi.Struct { - external SecAsn1Oid algorithm; + external __sbuf _lb; - external SecAsn1Item parameters; + @ffi.Int() + external int _blksize; + + @fpos_t() + external int _offset; } -typedef SecAsn1Oid = cssm_data; -typedef SecAsn1Item = cssm_data; +typedef fpos_t = __darwin_off_t; +typedef __darwin_off_t = __int64_t; +typedef __int64_t = ffi.LongLong; +typedef FILE = __sFILE; +typedef off_t = __darwin_off_t; +typedef ssize_t = __darwin_ssize_t; +typedef __darwin_ssize_t = ffi.Long; +typedef errno_t = ffi.Int; +typedef rsize_t = ffi.UnsignedLong; -class SecAsn1PubKeyInfo extends ffi.Struct { - external SecAsn1AlgId algorithm; +final class timespec extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; - external SecAsn1Item subjectPublicKey; + @ffi.Long() + external int tv_nsec; } -class SecAsn1Template_struct extends ffi.Struct { - @ffi.Uint32() - external int kind; +final class tm extends ffi.Struct { + @ffi.Int() + external int tm_sec; - @ffi.Uint32() - external int offset; + @ffi.Int() + external int tm_min; - external ffi.Pointer sub; + @ffi.Int() + external int tm_hour; - @ffi.Uint32() - external int size; -} + @ffi.Int() + external int tm_mday; -class cssm_guid extends ffi.Struct { - @uint32() - external int Data1; + @ffi.Int() + external int tm_mon; - @uint16() - external int Data2; + @ffi.Int() + external int tm_year; - @uint16() - external int Data3; + @ffi.Int() + external int tm_wday; - @ffi.Array.multi([8]) - external ffi.Array Data4; -} + @ffi.Int() + external int tm_yday; -typedef uint32 = ffi.Uint32; -typedef uint16 = ffi.Uint16; -typedef uint8 = ffi.Uint8; + @ffi.Int() + external int tm_isdst; -class cssm_version extends ffi.Struct { - @uint32() - external int Major; + @ffi.Long() + external int tm_gmtoff; - @uint32() - external int Minor; + external ffi.Pointer tm_zone; } -class cssm_subservice_uid extends ffi.Struct { - external CSSM_GUID Guid; +typedef clock_t = __darwin_clock_t; +typedef __darwin_clock_t = ffi.UnsignedLong; +typedef time_t = __darwin_time_t; - external CSSM_VERSION Version; +abstract class clockid_t { + static const int _CLOCK_REALTIME = 0; + static const int _CLOCK_MONOTONIC = 6; + static const int _CLOCK_MONOTONIC_RAW = 4; + static const int _CLOCK_MONOTONIC_RAW_APPROX = 5; + static const int _CLOCK_UPTIME_RAW = 8; + static const int _CLOCK_UPTIME_RAW_APPROX = 9; + static const int _CLOCK_PROCESS_CPUTIME_ID = 12; + static const int _CLOCK_THREAD_CPUTIME_ID = 16; +} - @uint32() - external int SubserviceId; +typedef intmax_t = ffi.Long; - @CSSM_SERVICE_TYPE() - external int SubserviceType; +final class imaxdiv_t extends ffi.Struct { + @intmax_t() + external int quot; + + @intmax_t() + external int rem; } -typedef CSSM_GUID = cssm_guid; -typedef CSSM_VERSION = cssm_version; -typedef CSSM_SERVICE_TYPE = CSSM_SERVICE_MASK; -typedef CSSM_SERVICE_MASK = uint32; +typedef uintmax_t = ffi.UnsignedLong; -class cssm_net_address extends ffi.Struct { - @CSSM_NET_ADDRESS_TYPE() - external int AddressType; +final class CFBagCallBacks extends ffi.Struct { + @CFIndex() + external int version; - external SecAsn1Item Address; -} + external CFBagRetainCallBack retain; -typedef CSSM_NET_ADDRESS_TYPE = uint32; + external CFBagReleaseCallBack release; -class cssm_crypto_data extends ffi.Struct { - external SecAsn1Item Param; + external CFBagCopyDescriptionCallBack copyDescription; - external CSSM_CALLBACK Callback; + external CFBagEqualCallBack equal; - external ffi.Pointer CallerCtx; + external CFBagHashCallBack hash; } -typedef CSSM_CALLBACK = ffi.Pointer< +typedef CFBagRetainCallBack = ffi.Pointer< ffi.NativeFunction< - CSSM_RETURN Function(CSSM_DATA_PTR, ffi.Pointer)>>; -typedef CSSM_RETURN = sint32; -typedef sint32 = ffi.Int32; -typedef CSSM_DATA_PTR = ffi.Pointer; + ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer value)>>; +typedef CFBagReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer value)>>; +typedef CFBagCopyDescriptionCallBack = ffi.Pointer< + ffi.NativeFunction value)>>; +typedef CFBagEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function( + ffi.Pointer value1, ffi.Pointer value2)>>; +typedef CFBagHashCallBack = ffi.Pointer< + ffi.NativeFunction value)>>; -class cssm_list_element extends ffi.Struct { - external ffi.Pointer NextElement; +final class __CFBag extends ffi.Opaque {} - @CSSM_WORDID_TYPE() - external int WordID; +typedef CFBagRef = ffi.Pointer<__CFBag>; +typedef CFMutableBagRef = ffi.Pointer<__CFBag>; +typedef CFBagApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer value, ffi.Pointer context)>>; - @CSSM_LIST_ELEMENT_TYPE() - external int ElementType; +final class CFBinaryHeapCompareContext extends ffi.Struct { + @CFIndex() + external int version; - external UnnamedUnion1 Element; -} + external ffi.Pointer info; -typedef CSSM_WORDID_TYPE = sint32; -typedef CSSM_LIST_ELEMENT_TYPE = uint32; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; -class UnnamedUnion1 extends ffi.Union { - external CSSM_LIST Sublist; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - external SecAsn1Item Word; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -typedef CSSM_LIST = cssm_list; +final class CFBinaryHeapCallBacks extends ffi.Struct { + @CFIndex() + external int version; -class cssm_list extends ffi.Struct { - @CSSM_LIST_TYPE() - external int ListType; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer ptr)>> retain; - external CSSM_LIST_ELEMENT_PTR Head; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer ptr)>> release; - external CSSM_LIST_ELEMENT_PTR Tail; -} + external ffi.Pointer< + ffi.NativeFunction ptr)>> + copyDescription; -typedef CSSM_LIST_TYPE = uint32; -typedef CSSM_LIST_ELEMENT_PTR = ffi.Pointer; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer ptr1, + ffi.Pointer ptr2, + ffi.Pointer context)>> compare; +} -class CSSM_TUPLE extends ffi.Struct { - external CSSM_LIST Issuer; +final class __CFBinaryHeap extends ffi.Opaque {} - external CSSM_LIST Subject; +typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; +typedef CFBinaryHeapApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer val, ffi.Pointer context)>>; - @CSSM_BOOL() - external int Delegate; +final class __CFBitVector extends ffi.Opaque {} - external CSSM_LIST AuthorizationTag; +typedef CFBitVectorRef = ffi.Pointer<__CFBitVector>; +typedef CFMutableBitVectorRef = ffi.Pointer<__CFBitVector>; +typedef CFBit = UInt32; - external CSSM_LIST ValidityPeriod; +abstract class __CFByteOrder { + static const int CFByteOrderUnknown = 0; + static const int CFByteOrderLittleEndian = 1; + static const int CFByteOrderBigEndian = 2; } -typedef CSSM_BOOL = sint32; - -class cssm_tuplegroup extends ffi.Struct { - @uint32() - external int NumberOfTuples; +final class CFSwappedFloat32 extends ffi.Struct { + @ffi.Uint32() + external int v; +} - external CSSM_TUPLE_PTR Tuples; +final class CFSwappedFloat64 extends ffi.Struct { + @ffi.Uint64() + external int v; } -typedef CSSM_TUPLE_PTR = ffi.Pointer; +final class CFDictionaryKeyCallBacks extends ffi.Struct { + @CFIndex() + external int version; -class cssm_sample extends ffi.Struct { - external CSSM_LIST TypedSample; + external CFDictionaryRetainCallBack retain; - external ffi.Pointer Verifier; -} + external CFDictionaryReleaseCallBack release; -typedef CSSM_SUBSERVICE_UID = cssm_subservice_uid; + external CFDictionaryCopyDescriptionCallBack copyDescription; -class cssm_samplegroup extends ffi.Struct { - @uint32() - external int NumberOfSamples; + external CFDictionaryEqualCallBack equal; - external ffi.Pointer Samples; + external CFDictionaryHashCallBack hash; } -typedef CSSM_SAMPLE = cssm_sample; +typedef CFDictionaryRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer value)>>; +typedef CFDictionaryReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer value)>>; +typedef CFDictionaryCopyDescriptionCallBack = ffi.Pointer< + ffi.NativeFunction value)>>; +typedef CFDictionaryEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function( + ffi.Pointer value1, ffi.Pointer value2)>>; +typedef CFDictionaryHashCallBack = ffi.Pointer< + ffi.NativeFunction value)>>; -class cssm_memory_funcs extends ffi.Struct { - external CSSM_MALLOC malloc_func; +final class CFDictionaryValueCallBacks extends ffi.Struct { + @CFIndex() + external int version; - external CSSM_FREE free_func; + external CFDictionaryRetainCallBack retain; - external CSSM_REALLOC realloc_func; + external CFDictionaryReleaseCallBack release; - external CSSM_CALLOC calloc_func; + external CFDictionaryCopyDescriptionCallBack copyDescription; - external ffi.Pointer AllocRef; + external CFDictionaryEqualCallBack equal; } -typedef CSSM_MALLOC = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CSSM_SIZE, ffi.Pointer)>>; -typedef CSSM_SIZE = ffi.Size; -typedef CSSM_FREE = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef CSSM_REALLOC = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, CSSM_SIZE, ffi.Pointer)>>; -typedef CSSM_CALLOC = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - uint32, CSSM_SIZE, ffi.Pointer)>>; +final class __CFDictionary extends ffi.Opaque {} -class cssm_encoded_cert extends ffi.Struct { - @CSSM_CERT_TYPE() - external int CertType; +typedef CFDictionaryRef = ffi.Pointer<__CFDictionary>; +typedef CFMutableDictionaryRef = ffi.Pointer<__CFDictionary>; +typedef CFDictionaryApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer key, + ffi.Pointer value, ffi.Pointer context)>>; - @CSSM_CERT_ENCODING() - external int CertEncoding; +final class __CFNotificationCenter extends ffi.Opaque {} - external SecAsn1Item CertBlob; +abstract class CFNotificationSuspensionBehavior { + static const int CFNotificationSuspensionBehaviorDrop = 1; + static const int CFNotificationSuspensionBehaviorCoalesce = 2; + static const int CFNotificationSuspensionBehaviorHold = 3; + static const int CFNotificationSuspensionBehaviorDeliverImmediately = 4; } -typedef CSSM_CERT_TYPE = uint32; -typedef CSSM_CERT_ENCODING = uint32; +typedef CFNotificationCenterRef = ffi.Pointer<__CFNotificationCenter>; +typedef CFNotificationCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo)>>; +typedef CFNotificationName = CFStringRef; -class cssm_parsed_cert extends ffi.Struct { - @CSSM_CERT_TYPE() - external int CertType; +final class __CFLocale extends ffi.Opaque {} - @CSSM_CERT_PARSE_FORMAT() - external int ParsedCertFormat; +typedef CFLocaleRef = ffi.Pointer<__CFLocale>; +typedef CFLocaleIdentifier = CFStringRef; +typedef LangCode = SInt16; +typedef RegionCode = SInt16; - external ffi.Pointer ParsedCert; +abstract class CFLocaleLanguageDirection { + static const int kCFLocaleLanguageDirectionUnknown = 0; + static const int kCFLocaleLanguageDirectionLeftToRight = 1; + static const int kCFLocaleLanguageDirectionRightToLeft = 2; + static const int kCFLocaleLanguageDirectionTopToBottom = 3; + static const int kCFLocaleLanguageDirectionBottomToTop = 4; } -typedef CSSM_CERT_PARSE_FORMAT = uint32; +typedef CFLocaleKey = CFStringRef; +typedef CFCalendarIdentifier = CFStringRef; +typedef CFAbsoluteTime = CFTimeInterval; +typedef CFTimeInterval = ffi.Double; -class cssm_cert_pair extends ffi.Struct { - external CSSM_ENCODED_CERT EncodedCert; +final class __CFDate extends ffi.Opaque {} - external CSSM_PARSED_CERT ParsedCert; -} +typedef CFDateRef = ffi.Pointer<__CFDate>; -typedef CSSM_ENCODED_CERT = cssm_encoded_cert; -typedef CSSM_PARSED_CERT = cssm_parsed_cert; +final class __CFTimeZone extends ffi.Opaque {} -class cssm_certgroup extends ffi.Struct { - @CSSM_CERT_TYPE() - external int CertType; +final class CFGregorianDate extends ffi.Struct { + @SInt32() + external int year; - @CSSM_CERT_ENCODING() - external int CertEncoding; + @SInt8() + external int month; - @uint32() - external int NumCerts; + @SInt8() + external int day; - external UnnamedUnion2 GroupList; + @SInt8() + external int hour; - @CSSM_CERTGROUP_TYPE() - external int CertGroupType; + @SInt8() + external int minute; - external ffi.Pointer Reserved; + @ffi.Double() + external double second; } -class UnnamedUnion2 extends ffi.Union { - external CSSM_DATA_PTR CertList; +typedef SInt8 = ffi.SignedChar; - external CSSM_ENCODED_CERT_PTR EncodedCertList; +final class CFGregorianUnits extends ffi.Struct { + @SInt32() + external int years; - external CSSM_PARSED_CERT_PTR ParsedCertList; + @SInt32() + external int months; - external CSSM_CERT_PAIR_PTR PairCertList; -} + @SInt32() + external int days; -typedef CSSM_ENCODED_CERT_PTR = ffi.Pointer; -typedef CSSM_PARSED_CERT_PTR = ffi.Pointer; -typedef CSSM_CERT_PAIR_PTR = ffi.Pointer; -typedef CSSM_CERTGROUP_TYPE = uint32; + @SInt32() + external int hours; -class cssm_base_certs extends ffi.Struct { - @CSSM_TP_HANDLE() - external int TPHandle; + @SInt32() + external int minutes; - @CSSM_CL_HANDLE() - external int CLHandle; + @ffi.Double() + external double seconds; +} - external CSSM_CERTGROUP Certs; +abstract class CFGregorianUnitFlags { + static const int kCFGregorianUnitsYears = 1; + static const int kCFGregorianUnitsMonths = 2; + static const int kCFGregorianUnitsDays = 4; + static const int kCFGregorianUnitsHours = 8; + static const int kCFGregorianUnitsMinutes = 16; + static const int kCFGregorianUnitsSeconds = 32; + static const int kCFGregorianAllUnits = 16777215; } -typedef CSSM_TP_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_MODULE_HANDLE = CSSM_HANDLE; -typedef CSSM_HANDLE = CSSM_INTPTR; -typedef CSSM_INTPTR = ffi.IntPtr; -typedef CSSM_CL_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_CERTGROUP = cssm_certgroup; +typedef CFTimeZoneRef = ffi.Pointer<__CFTimeZone>; -class cssm_access_credentials extends ffi.Struct { - @ffi.Array.multi([68]) - external ffi.Array EntryTag; +final class __CFData extends ffi.Opaque {} - external CSSM_BASE_CERTS BaseCerts; +typedef CFDataRef = ffi.Pointer<__CFData>; +typedef CFMutableDataRef = ffi.Pointer<__CFData>; - external CSSM_SAMPLEGROUP Samples; +abstract class CFDataSearchFlags { + static const int kCFDataSearchBackwards = 1; + static const int kCFDataSearchAnchored = 2; +} - external CSSM_CHALLENGE_CALLBACK Callback; +final class __CFCharacterSet extends ffi.Opaque {} - external ffi.Pointer CallerCtx; +abstract class CFCharacterSetPredefinedSet { + static const int kCFCharacterSetControl = 1; + static const int kCFCharacterSetWhitespace = 2; + static const int kCFCharacterSetWhitespaceAndNewline = 3; + static const int kCFCharacterSetDecimalDigit = 4; + static const int kCFCharacterSetLetter = 5; + static const int kCFCharacterSetLowercaseLetter = 6; + static const int kCFCharacterSetUppercaseLetter = 7; + static const int kCFCharacterSetNonBase = 8; + static const int kCFCharacterSetDecomposable = 9; + static const int kCFCharacterSetAlphaNumeric = 10; + static const int kCFCharacterSetPunctuation = 11; + static const int kCFCharacterSetCapitalizedLetter = 13; + static const int kCFCharacterSetSymbol = 14; + static const int kCFCharacterSetNewline = 15; + static const int kCFCharacterSetIllegal = 12; } -typedef CSSM_BASE_CERTS = cssm_base_certs; -typedef CSSM_SAMPLEGROUP = cssm_samplegroup; -typedef CSSM_CHALLENGE_CALLBACK = ffi.Pointer< - ffi.NativeFunction< - CSSM_RETURN Function(ffi.Pointer, CSSM_SAMPLEGROUP_PTR, - ffi.Pointer, ffi.Pointer)>>; -typedef CSSM_SAMPLEGROUP_PTR = ffi.Pointer; -typedef CSSM_MEMORY_FUNCS = cssm_memory_funcs; +typedef CFCharacterSetRef = ffi.Pointer<__CFCharacterSet>; +typedef CFMutableCharacterSetRef = ffi.Pointer<__CFCharacterSet>; +typedef UniChar = UInt16; -class cssm_authorizationgroup extends ffi.Struct { - @uint32() - external int NumberOfAuthTags; +final class __CFError extends ffi.Opaque {} - external ffi.Pointer AuthTags; -} +typedef CFErrorDomain = CFStringRef; +typedef CFErrorRef = ffi.Pointer<__CFError>; -typedef CSSM_ACL_AUTHORIZATION_TAG = sint32; +abstract class CFStringBuiltInEncodings { + static const int kCFStringEncodingMacRoman = 0; + static const int kCFStringEncodingWindowsLatin1 = 1280; + static const int kCFStringEncodingISOLatin1 = 513; + static const int kCFStringEncodingNextStepLatin = 2817; + static const int kCFStringEncodingASCII = 1536; + static const int kCFStringEncodingUnicode = 256; + static const int kCFStringEncodingUTF8 = 134217984; + static const int kCFStringEncodingNonLossyASCII = 3071; + static const int kCFStringEncodingUTF16 = 256; + static const int kCFStringEncodingUTF16BE = 268435712; + static const int kCFStringEncodingUTF16LE = 335544576; + static const int kCFStringEncodingUTF32 = 201326848; + static const int kCFStringEncodingUTF32BE = 402653440; + static const int kCFStringEncodingUTF32LE = 469762304; +} -class cssm_acl_validity_period extends ffi.Struct { - external SecAsn1Item StartDate; +typedef CFStringEncoding = UInt32; +typedef CFMutableStringRef = ffi.Pointer<__CFString>; +typedef StringPtr = ffi.Pointer; +typedef ConstStringPtr = ffi.Pointer; - external SecAsn1Item EndDate; +abstract class CFStringCompareFlags { + static const int kCFCompareCaseInsensitive = 1; + static const int kCFCompareBackwards = 4; + static const int kCFCompareAnchored = 8; + static const int kCFCompareNonliteral = 16; + static const int kCFCompareLocalized = 32; + static const int kCFCompareNumerically = 64; + static const int kCFCompareDiacriticInsensitive = 128; + static const int kCFCompareWidthInsensitive = 256; + static const int kCFCompareForcedOrdering = 512; } -class cssm_acl_entry_prototype extends ffi.Struct { - external CSSM_LIST TypedSubject; +abstract class CFStringNormalizationForm { + static const int kCFStringNormalizationFormD = 0; + static const int kCFStringNormalizationFormKD = 1; + static const int kCFStringNormalizationFormC = 2; + static const int kCFStringNormalizationFormKC = 3; +} - @CSSM_BOOL() - external int Delegate; +final class CFStringInlineBuffer extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array buffer; - external CSSM_AUTHORIZATIONGROUP Authorization; + external CFStringRef theString; - external CSSM_ACL_VALIDITY_PERIOD TimeRange; + external ffi.Pointer directUniCharBuffer; - @ffi.Array.multi([68]) - external ffi.Array EntryTag; -} + external ffi.Pointer directCStringBuffer; -typedef CSSM_AUTHORIZATIONGROUP = cssm_authorizationgroup; -typedef CSSM_ACL_VALIDITY_PERIOD = cssm_acl_validity_period; + external CFRange rangeToBuffer; -class cssm_acl_owner_prototype extends ffi.Struct { - external CSSM_LIST TypedSubject; + @CFIndex() + external int bufferedRangeStart; - @CSSM_BOOL() - external int Delegate; + @CFIndex() + external int bufferedRangeEnd; } -class cssm_acl_entry_input extends ffi.Struct { - external CSSM_ACL_ENTRY_PROTOTYPE Prototype; - - external CSSM_ACL_SUBJECT_CALLBACK Callback; - - external ffi.Pointer CallerContext; +abstract class CFTimeZoneNameStyle { + static const int kCFTimeZoneNameStyleStandard = 0; + static const int kCFTimeZoneNameStyleShortStandard = 1; + static const int kCFTimeZoneNameStyleDaylightSaving = 2; + static const int kCFTimeZoneNameStyleShortDaylightSaving = 3; + static const int kCFTimeZoneNameStyleGeneric = 4; + static const int kCFTimeZoneNameStyleShortGeneric = 5; } -typedef CSSM_ACL_ENTRY_PROTOTYPE = cssm_acl_entry_prototype; -typedef CSSM_ACL_SUBJECT_CALLBACK = ffi.Pointer< - ffi.NativeFunction< - CSSM_RETURN Function(ffi.Pointer, CSSM_LIST_PTR, - ffi.Pointer, ffi.Pointer)>>; -typedef CSSM_LIST_PTR = ffi.Pointer; +final class __CFCalendar extends ffi.Opaque {} -class cssm_resource_control_context extends ffi.Struct { - external CSSM_ACCESS_CREDENTIALS_PTR AccessCred; +typedef CFCalendarRef = ffi.Pointer<__CFCalendar>; - external CSSM_ACL_ENTRY_INPUT InitialAclEntry; +abstract class CFCalendarUnit { + static const int kCFCalendarUnitEra = 2; + static const int kCFCalendarUnitYear = 4; + static const int kCFCalendarUnitMonth = 8; + static const int kCFCalendarUnitDay = 16; + static const int kCFCalendarUnitHour = 32; + static const int kCFCalendarUnitMinute = 64; + static const int kCFCalendarUnitSecond = 128; + static const int kCFCalendarUnitWeek = 256; + static const int kCFCalendarUnitWeekday = 512; + static const int kCFCalendarUnitWeekdayOrdinal = 1024; + static const int kCFCalendarUnitQuarter = 2048; + static const int kCFCalendarUnitWeekOfMonth = 4096; + static const int kCFCalendarUnitWeekOfYear = 8192; + static const int kCFCalendarUnitYearForWeekOfYear = 16384; } -typedef CSSM_ACCESS_CREDENTIALS_PTR = ffi.Pointer; -typedef CSSM_ACL_ENTRY_INPUT = cssm_acl_entry_input; - -class cssm_acl_entry_info extends ffi.Struct { - external CSSM_ACL_ENTRY_PROTOTYPE EntryPublicInfo; +final class CGPoint extends ffi.Struct { + @CGFloat() + external double x; - @CSSM_ACL_HANDLE() - external int EntryHandle; + @CGFloat() + external double y; } -typedef CSSM_ACL_HANDLE = CSSM_HANDLE; +typedef CGFloat = ffi.Double; -class cssm_acl_edit extends ffi.Struct { - @CSSM_ACL_EDIT_MODE() - external int EditMode; +final class CGSize extends ffi.Struct { + @CGFloat() + external double width; - @CSSM_ACL_HANDLE() - external int OldEntryHandle; + @CGFloat() + external double height; +} - external ffi.Pointer NewEntry; +final class CGVector extends ffi.Struct { + @CGFloat() + external double dx; + + @CGFloat() + external double dy; } -typedef CSSM_ACL_EDIT_MODE = uint32; +final class CGRect extends ffi.Struct { + external CGPoint origin; -class cssm_func_name_addr extends ffi.Struct { - @ffi.Array.multi([68]) - external ffi.Array Name; + external CGSize size; +} - external CSSM_PROC_ADDR Address; +abstract class CGRectEdge { + static const int CGRectMinXEdge = 0; + static const int CGRectMinYEdge = 1; + static const int CGRectMaxXEdge = 2; + static const int CGRectMaxYEdge = 3; } -typedef CSSM_PROC_ADDR = ffi.Pointer>; +final class CGAffineTransform extends ffi.Struct { + @CGFloat() + external double a; -class cssm_date extends ffi.Struct { - @ffi.Array.multi([4]) - external ffi.Array Year; + @CGFloat() + external double b; - @ffi.Array.multi([2]) - external ffi.Array Month; + @CGFloat() + external double c; - @ffi.Array.multi([2]) - external ffi.Array Day; -} + @CGFloat() + external double d; -class cssm_range extends ffi.Struct { - @uint32() - external int Min; + @CGFloat() + external double tx; - @uint32() - external int Max; + @CGFloat() + external double ty; } -class cssm_query_size_data extends ffi.Struct { - @uint32() - external int SizeInputBlock; +final class CGAffineTransformComponents extends ffi.Struct { + external CGSize scale; - @uint32() - external int SizeOutputBlock; -} + @CGFloat() + external double horizontalShear; -class cssm_key_size extends ffi.Struct { - @uint32() - external int LogicalKeySizeInBits; + @CGFloat() + external double rotation; - @uint32() - external int EffectiveKeySizeInBits; + external CGVector translation; } -class cssm_keyheader extends ffi.Struct { - @CSSM_HEADERVERSION() - external int HeaderVersion; +final class __CFDateFormatter extends ffi.Opaque {} - external CSSM_GUID CspId; +abstract class CFDateFormatterStyle { + static const int kCFDateFormatterNoStyle = 0; + static const int kCFDateFormatterShortStyle = 1; + static const int kCFDateFormatterMediumStyle = 2; + static const int kCFDateFormatterLongStyle = 3; + static const int kCFDateFormatterFullStyle = 4; +} - @CSSM_KEYBLOB_TYPE() - external int BlobType; +abstract class CFISO8601DateFormatOptions { + static const int kCFISO8601DateFormatWithYear = 1; + static const int kCFISO8601DateFormatWithMonth = 2; + static const int kCFISO8601DateFormatWithWeekOfYear = 4; + static const int kCFISO8601DateFormatWithDay = 16; + static const int kCFISO8601DateFormatWithTime = 32; + static const int kCFISO8601DateFormatWithTimeZone = 64; + static const int kCFISO8601DateFormatWithSpaceBetweenDateAndTime = 128; + static const int kCFISO8601DateFormatWithDashSeparatorInDate = 256; + static const int kCFISO8601DateFormatWithColonSeparatorInTime = 512; + static const int kCFISO8601DateFormatWithColonSeparatorInTimeZone = 1024; + static const int kCFISO8601DateFormatWithFractionalSeconds = 2048; + static const int kCFISO8601DateFormatWithFullDate = 275; + static const int kCFISO8601DateFormatWithFullTime = 1632; + static const int kCFISO8601DateFormatWithInternetDateTime = 1907; +} - @CSSM_KEYBLOB_FORMAT() - external int Format; +typedef CFDateFormatterRef = ffi.Pointer<__CFDateFormatter>; +typedef CFDateFormatterKey = CFStringRef; - @CSSM_ALGORITHMS() - external int AlgorithmId; +final class __CFBoolean extends ffi.Opaque {} - @CSSM_KEYCLASS() - external int KeyClass; +typedef CFBooleanRef = ffi.Pointer<__CFBoolean>; - @uint32() - external int LogicalKeySizeInBits; +abstract class CFNumberType { + static const int kCFNumberSInt8Type = 1; + static const int kCFNumberSInt16Type = 2; + static const int kCFNumberSInt32Type = 3; + static const int kCFNumberSInt64Type = 4; + static const int kCFNumberFloat32Type = 5; + static const int kCFNumberFloat64Type = 6; + static const int kCFNumberCharType = 7; + static const int kCFNumberShortType = 8; + static const int kCFNumberIntType = 9; + static const int kCFNumberLongType = 10; + static const int kCFNumberLongLongType = 11; + static const int kCFNumberFloatType = 12; + static const int kCFNumberDoubleType = 13; + static const int kCFNumberCFIndexType = 14; + static const int kCFNumberNSIntegerType = 15; + static const int kCFNumberCGFloatType = 16; + static const int kCFNumberMaxType = 16; +} - @CSSM_KEYATTR_FLAGS() - external int KeyAttr; +final class __CFNumber extends ffi.Opaque {} - @CSSM_KEYUSE() - external int KeyUsage; +typedef CFNumberRef = ffi.Pointer<__CFNumber>; - external CSSM_DATE StartDate; +final class __CFNumberFormatter extends ffi.Opaque {} - external CSSM_DATE EndDate; +abstract class CFNumberFormatterStyle { + static const int kCFNumberFormatterNoStyle = 0; + static const int kCFNumberFormatterDecimalStyle = 1; + static const int kCFNumberFormatterCurrencyStyle = 2; + static const int kCFNumberFormatterPercentStyle = 3; + static const int kCFNumberFormatterScientificStyle = 4; + static const int kCFNumberFormatterSpellOutStyle = 5; + static const int kCFNumberFormatterOrdinalStyle = 6; + static const int kCFNumberFormatterCurrencyISOCodeStyle = 8; + static const int kCFNumberFormatterCurrencyPluralStyle = 9; + static const int kCFNumberFormatterCurrencyAccountingStyle = 10; +} - @CSSM_ALGORITHMS() - external int WrapAlgorithmId; +typedef CFNumberFormatterRef = ffi.Pointer<__CFNumberFormatter>; - @CSSM_ENCRYPT_MODE() - external int WrapMode; +abstract class CFNumberFormatterOptionFlags { + static const int kCFNumberFormatterParseIntegersOnly = 1; +} - @uint32() - external int Reserved; +typedef CFNumberFormatterKey = CFStringRef; + +abstract class CFNumberFormatterRoundingMode { + static const int kCFNumberFormatterRoundCeiling = 0; + static const int kCFNumberFormatterRoundFloor = 1; + static const int kCFNumberFormatterRoundDown = 2; + static const int kCFNumberFormatterRoundUp = 3; + static const int kCFNumberFormatterRoundHalfEven = 4; + static const int kCFNumberFormatterRoundHalfDown = 5; + static const int kCFNumberFormatterRoundHalfUp = 6; } -typedef CSSM_HEADERVERSION = uint32; -typedef CSSM_KEYBLOB_TYPE = uint32; -typedef CSSM_KEYBLOB_FORMAT = uint32; -typedef CSSM_ALGORITHMS = uint32; -typedef CSSM_KEYCLASS = uint32; -typedef CSSM_KEYATTR_FLAGS = uint32; -typedef CSSM_KEYUSE = uint32; -typedef CSSM_DATE = cssm_date; -typedef CSSM_ENCRYPT_MODE = uint32; +abstract class CFNumberFormatterPadPosition { + static const int kCFNumberFormatterPadBeforePrefix = 0; + static const int kCFNumberFormatterPadAfterPrefix = 1; + static const int kCFNumberFormatterPadBeforeSuffix = 2; + static const int kCFNumberFormatterPadAfterSuffix = 3; +} -class cssm_key extends ffi.Struct { - external CSSM_KEYHEADER KeyHeader; +typedef CFPropertyListRef = CFTypeRef; - external SecAsn1Item KeyData; +abstract class CFURLPathStyle { + static const int kCFURLPOSIXPathStyle = 0; + static const int kCFURLHFSPathStyle = 1; + static const int kCFURLWindowsPathStyle = 2; } -typedef CSSM_KEYHEADER = cssm_keyheader; +final class __CFURL extends ffi.Opaque {} -class cssm_dl_db_handle extends ffi.Struct { - @CSSM_DL_HANDLE() - external int DLHandle; +typedef CFURLRef = ffi.Pointer<__CFURL>; - @CSSM_DB_HANDLE() - external int DBHandle; +abstract class CFURLComponentType { + static const int kCFURLComponentScheme = 1; + static const int kCFURLComponentNetLocation = 2; + static const int kCFURLComponentPath = 3; + static const int kCFURLComponentResourceSpecifier = 4; + static const int kCFURLComponentUser = 5; + static const int kCFURLComponentPassword = 6; + static const int kCFURLComponentUserInfo = 7; + static const int kCFURLComponentHost = 8; + static const int kCFURLComponentPort = 9; + static const int kCFURLComponentParameterString = 10; + static const int kCFURLComponentQuery = 11; + static const int kCFURLComponentFragment = 12; } -typedef CSSM_DL_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_DB_HANDLE = CSSM_MODULE_HANDLE; - -class cssm_context_attribute extends ffi.Struct { - @CSSM_ATTRIBUTE_TYPE() - external int AttributeType; +final class FSRef extends ffi.Opaque {} - @uint32() - external int AttributeLength; +abstract class CFURLBookmarkCreationOptions { + static const int kCFURLBookmarkCreationMinimalBookmarkMask = 512; + static const int kCFURLBookmarkCreationSuitableForBookmarkFile = 1024; + static const int kCFURLBookmarkCreationWithSecurityScope = 2048; + static const int kCFURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = + 4096; + static const int kCFURLBookmarkCreationWithoutImplicitSecurityScope = + 536870912; + static const int kCFURLBookmarkCreationPreferFileIDResolutionMask = 256; +} - external cssm_context_attribute_value Attribute; +abstract class CFURLBookmarkResolutionOptions { + static const int kCFURLBookmarkResolutionWithoutUIMask = 256; + static const int kCFURLBookmarkResolutionWithoutMountingMask = 512; + static const int kCFURLBookmarkResolutionWithSecurityScope = 1024; + static const int kCFURLBookmarkResolutionWithoutImplicitStartAccessing = + 32768; + static const int kCFBookmarkResolutionWithoutUIMask = 256; + static const int kCFBookmarkResolutionWithoutMountingMask = 512; } -typedef CSSM_ATTRIBUTE_TYPE = uint32; +typedef CFURLBookmarkFileCreationOptions = CFOptionFlags; -class cssm_context_attribute_value extends ffi.Union { - external ffi.Pointer String; +final class mach_port_status extends ffi.Struct { + @mach_port_rights_t() + external int mps_pset; - @uint32() - external int Uint32; + @mach_port_seqno_t() + external int mps_seqno; - external CSSM_ACCESS_CREDENTIALS_PTR AccessCredentials; + @mach_port_mscount_t() + external int mps_mscount; - external CSSM_KEY_PTR Key; + @mach_port_msgcount_t() + external int mps_qlimit; - external CSSM_DATA_PTR Data; + @mach_port_msgcount_t() + external int mps_msgcount; - @CSSM_PADDING() - external int Padding; + @mach_port_rights_t() + external int mps_sorights; - external CSSM_DATE_PTR Date; + @boolean_t() + external int mps_srights; - external CSSM_RANGE_PTR Range; + @boolean_t() + external int mps_pdrequest; - external CSSM_CRYPTO_DATA_PTR CryptoData; + @boolean_t() + external int mps_nsrequest; - external CSSM_VERSION_PTR Version; + @natural_t() + external int mps_flags; +} - external CSSM_DL_DB_HANDLE_PTR DLDBHandle; +typedef mach_port_rights_t = natural_t; +typedef natural_t = __darwin_natural_t; +typedef __darwin_natural_t = ffi.UnsignedInt; +typedef mach_port_seqno_t = natural_t; +typedef mach_port_mscount_t = natural_t; +typedef mach_port_msgcount_t = natural_t; +typedef boolean_t = ffi.Int; - external ffi.Pointer KRProfile; +final class mach_port_limits extends ffi.Struct { + @mach_port_msgcount_t() + external int mpl_qlimit; } -typedef CSSM_KEY_PTR = ffi.Pointer; -typedef CSSM_PADDING = uint32; -typedef CSSM_DATE_PTR = ffi.Pointer; -typedef CSSM_RANGE_PTR = ffi.Pointer; -typedef CSSM_CRYPTO_DATA_PTR = ffi.Pointer; -typedef CSSM_VERSION_PTR = ffi.Pointer; -typedef CSSM_DL_DB_HANDLE_PTR = ffi.Pointer; +final class mach_port_info_ext extends ffi.Struct { + external mach_port_status_t mpie_status; -class cssm_kr_profile extends ffi.Opaque {} + @mach_port_msgcount_t() + external int mpie_boost_cnt; -class cssm_context extends ffi.Struct { - @CSSM_CONTEXT_TYPE() - external int ContextType; + @ffi.Array.multi([6]) + external ffi.Array reserved; +} - @CSSM_ALGORITHMS() - external int AlgorithmType; +typedef mach_port_status_t = mach_port_status; - @uint32() - external int NumberOfAttributes; +final class mach_port_guard_info extends ffi.Struct { + @ffi.Uint64() + external int mpgi_guard; +} - external CSSM_CONTEXT_ATTRIBUTE_PTR ContextAttributes; +final class mach_port_qos extends ffi.Opaque {} - @CSSM_CSP_HANDLE() - external int CSPHandle; +final class mach_service_port_info extends ffi.Struct { + @ffi.Array.multi([255]) + external ffi.Array mspi_string_name; - @CSSM_BOOL() - external int Privileged; + @ffi.Uint8() + external int mspi_domain_type; +} - @uint32() - external int EncryptionProhibited; +final class mach_port_options extends ffi.Struct { + @ffi.Uint32() + external int flags; - @uint32() - external int WorkFactor; + external mach_port_limits_t mpl; - @uint32() - external int Reserved; + external UnnamedUnion1 unnamed; } -typedef CSSM_CONTEXT_TYPE = uint32; -typedef CSSM_CONTEXT_ATTRIBUTE_PTR = ffi.Pointer; -typedef CSSM_CSP_HANDLE = CSSM_MODULE_HANDLE; +typedef mach_port_limits_t = mach_port_limits; -class cssm_pkcs1_oaep_params extends ffi.Struct { - @uint32() - external int HashAlgorithm; +final class UnnamedUnion1 extends ffi.Union { + @ffi.Array.multi([2]) + external ffi.Array reserved; - external SecAsn1Item HashParams; + @mach_port_name_t() + external int work_interval_port; - @CSSM_PKCS_OAEP_MGF() - external int MGF; + external mach_service_port_info_t service_port_info; - external SecAsn1Item MGFParams; + @mach_port_name_t() + external int service_port_name; +} - @CSSM_PKCS_OAEP_PSOURCE() - external int PSource; +typedef mach_port_name_t = natural_t; +typedef mach_service_port_info_t = ffi.Pointer; - external SecAsn1Item PSourceParams; +abstract class mach_port_guard_exception_codes { + static const int kGUARD_EXC_DESTROY = 1; + static const int kGUARD_EXC_MOD_REFS = 2; + static const int kGUARD_EXC_INVALID_OPTIONS = 3; + static const int kGUARD_EXC_SET_CONTEXT = 4; + static const int kGUARD_EXC_THREAD_SET_STATE = 5; + static const int kGUARD_EXC_UNGUARDED = 8; + static const int kGUARD_EXC_INCORRECT_GUARD = 16; + static const int kGUARD_EXC_IMMOVABLE = 32; + static const int kGUARD_EXC_STRICT_REPLY = 64; + static const int kGUARD_EXC_MSG_FILTERED = 128; + static const int kGUARD_EXC_INVALID_RIGHT = 256; + static const int kGUARD_EXC_INVALID_NAME = 512; + static const int kGUARD_EXC_INVALID_VALUE = 1024; + static const int kGUARD_EXC_INVALID_ARGUMENT = 2048; + static const int kGUARD_EXC_RIGHT_EXISTS = 4096; + static const int kGUARD_EXC_KERN_NO_SPACE = 8192; + static const int kGUARD_EXC_KERN_FAILURE = 16384; + static const int kGUARD_EXC_KERN_RESOURCE = 32768; + static const int kGUARD_EXC_SEND_INVALID_REPLY = 65536; + static const int kGUARD_EXC_SEND_INVALID_VOUCHER = 131072; + static const int kGUARD_EXC_SEND_INVALID_RIGHT = 262144; + static const int kGUARD_EXC_RCV_INVALID_NAME = 524288; + static const int kGUARD_EXC_RCV_GUARDED_DESC = 1048576; + static const int kGUARD_EXC_MOD_REFS_NON_FATAL = 2097152; + static const int kGUARD_EXC_IMMOVABLE_NON_FATAL = 4194304; + static const int kGUARD_EXC_REQUIRE_REPLY_PORT_SEMANTICS = 8388608; } -typedef CSSM_PKCS_OAEP_MGF = uint32; -typedef CSSM_PKCS_OAEP_PSOURCE = uint32; +final class __CFRunLoop extends ffi.Opaque {} -class cssm_csp_operational_statistics extends ffi.Struct { - @CSSM_BOOL() - external int UserAuthenticated; +final class __CFRunLoopSource extends ffi.Opaque {} - @CSSM_CSP_FLAGS() - external int DeviceFlags; +final class __CFRunLoopObserver extends ffi.Opaque {} - @uint32() - external int TokenMaxSessionCount; +final class __CFRunLoopTimer extends ffi.Opaque {} - @uint32() - external int TokenOpenedSessionCount; +abstract class CFRunLoopRunResult { + static const int kCFRunLoopRunFinished = 1; + static const int kCFRunLoopRunStopped = 2; + static const int kCFRunLoopRunTimedOut = 3; + static const int kCFRunLoopRunHandledSource = 4; +} - @uint32() - external int TokenMaxRWSessionCount; +abstract class CFRunLoopActivity { + static const int kCFRunLoopEntry = 1; + static const int kCFRunLoopBeforeTimers = 2; + static const int kCFRunLoopBeforeSources = 4; + static const int kCFRunLoopBeforeWaiting = 32; + static const int kCFRunLoopAfterWaiting = 64; + static const int kCFRunLoopExit = 128; + static const int kCFRunLoopAllActivities = 268435455; +} - @uint32() - external int TokenOpenedRWSessionCount; +typedef CFRunLoopMode = CFStringRef; +typedef CFRunLoopRef = ffi.Pointer<__CFRunLoop>; +typedef CFRunLoopSourceRef = ffi.Pointer<__CFRunLoopSource>; +typedef CFRunLoopObserverRef = ffi.Pointer<__CFRunLoopObserver>; +typedef CFRunLoopTimerRef = ffi.Pointer<__CFRunLoopTimer>; - @uint32() - external int TokenTotalPublicMem; +final class CFRunLoopSourceContext extends ffi.Struct { + @CFIndex() + external int version; - @uint32() - external int TokenFreePublicMem; + external ffi.Pointer info; - @uint32() - external int TokenTotalPrivateMem; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - @uint32() - external int TokenFreePrivateMem; -} + external ffi.Pointer< + ffi.NativeFunction info)>> + release; -typedef CSSM_CSP_FLAGS = uint32; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; -class cssm_pkcs5_pbkdf1_params extends ffi.Struct { - external SecAsn1Item Passphrase; + external ffi.Pointer< + ffi.NativeFunction< + Boolean Function( + ffi.Pointer info1, ffi.Pointer info2)>> equal; - external SecAsn1Item InitVector; -} + external ffi.Pointer< + ffi.NativeFunction info)>> hash; -class cssm_pkcs5_pbkdf2_params extends ffi.Struct { - external SecAsn1Item Passphrase; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer info, CFRunLoopRef rl, + CFRunLoopMode mode)>> schedule; - @CSSM_PKCS5_PBKDF2_PRF() - external int PseudoRandomFunction; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer info, CFRunLoopRef rl, + CFRunLoopMode mode)>> cancel; + + external ffi.Pointer< + ffi.NativeFunction info)>> + perform; } -typedef CSSM_PKCS5_PBKDF2_PRF = uint32; +final class CFRunLoopSourceContext1 extends ffi.Struct { + @CFIndex() + external int version; -class cssm_kea_derive_params extends ffi.Struct { - external SecAsn1Item Rb; + external ffi.Pointer info; - external SecAsn1Item Yb; -} + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; -class cssm_tp_authority_id extends ffi.Struct { - external ffi.Pointer AuthorityCert; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - external CSSM_NET_ADDRESS_PTR AuthorityLocation; -} + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; -typedef CSSM_NET_ADDRESS_PTR = ffi.Pointer; + external ffi.Pointer< + ffi.NativeFunction< + Boolean Function( + ffi.Pointer info1, ffi.Pointer info2)>> equal; -class cssm_field extends ffi.Struct { - external SecAsn1Oid FieldOid; + external ffi.Pointer< + ffi.NativeFunction info)>> hash; - external SecAsn1Item FieldValue; + external ffi.Pointer< + ffi.NativeFunction info)>> + getPort; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer msg, + CFIndex size, + CFAllocatorRef allocator, + ffi.Pointer info)>> perform; } -class cssm_tp_policyinfo extends ffi.Struct { - @uint32() - external int NumberOfPolicyIds; +typedef mach_port_t = __darwin_mach_port_t; +typedef __darwin_mach_port_t = __darwin_mach_port_name_t; +typedef __darwin_mach_port_name_t = __darwin_natural_t; - external CSSM_FIELD_PTR PolicyIds; +final class CFRunLoopObserverContext extends ffi.Struct { + @CFIndex() + external int version; - external ffi.Pointer PolicyControl; + external ffi.Pointer info; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; + + external ffi.Pointer< + ffi.NativeFunction info)>> + release; + + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -typedef CSSM_FIELD_PTR = ffi.Pointer; +typedef CFRunLoopObserverCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef observer, ffi.Int32 activity, + ffi.Pointer info)>>; +void _ObjCBlock21_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() + .asFunction< + void Function(CFRunLoopObserverRef arg0, int arg1)>()(arg0, arg1); +} -class cssm_dl_db_list extends ffi.Struct { - @uint32() - external int NumHandles; +final _ObjCBlock21_closureRegistry = {}; +int _ObjCBlock21_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock21_registerClosure(Function fn) { + final id = ++_ObjCBlock21_closureRegistryIndex; + _ObjCBlock21_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external CSSM_DL_DB_HANDLE_PTR DLDBHandle; +void _ObjCBlock21_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { + return _ObjCBlock21_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class cssm_tp_callerauth_context extends ffi.Struct { - external CSSM_TP_POLICYINFO Policy; +class ObjCBlock21 extends _ObjCBlockBase { + ObjCBlock21._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external CSSM_TIMESTRING VerifyTime; + /// Creates a block from a C function pointer. + ObjCBlock21.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>> + ptr) + : this._( + lib + ._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, + ffi.Int32 arg1)>(_ObjCBlock21_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @CSSM_TP_STOP_ON() - external int VerificationAbortOn; + /// Creates a block from a Dart function. + ObjCBlock21.fromFunction(NativeCupertinoHttp lib, + void Function(CFRunLoopObserverRef arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, + ffi.Int32 arg1)>(_ObjCBlock21_closureTrampoline) + .cast(), + _ObjCBlock21_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(CFRunLoopObserverRef arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, int arg1)>()(_id, arg0, arg1); + } +} - external CSSM_TP_VERIFICATION_RESULTS_CALLBACK CallbackWithVerifiedCert; +final class CFRunLoopTimerContext extends ffi.Struct { + @CFIndex() + external int version; - @uint32() - external int NumberOfAnchorCerts; + external ffi.Pointer info; - external CSSM_DATA_PTR AnchorCerts; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - external CSSM_DL_DB_LIST_PTR DBList; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -typedef CSSM_TP_POLICYINFO = cssm_tp_policyinfo; -typedef CSSM_TIMESTRING = ffi.Pointer; -typedef CSSM_TP_STOP_ON = uint32; -typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACK = ffi.Pointer< +typedef CFRunLoopTimerCallBack = ffi.Pointer< ffi.NativeFunction< - CSSM_RETURN Function( - CSSM_MODULE_HANDLE, ffi.Pointer, CSSM_DATA_PTR)>>; -typedef CSSM_DL_DB_LIST_PTR = ffi.Pointer; - -class cssm_encoded_crl extends ffi.Struct { - @CSSM_CRL_TYPE() - external int CrlType; - - @CSSM_CRL_ENCODING() - external int CrlEncoding; - - external SecAsn1Item CrlBlob; + ffi.Void Function( + CFRunLoopTimerRef timer, ffi.Pointer info)>>; +void _ObjCBlock22_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); } -typedef CSSM_CRL_TYPE = uint32; -typedef CSSM_CRL_ENCODING = uint32; - -class cssm_parsed_crl extends ffi.Struct { - @CSSM_CRL_TYPE() - external int CrlType; - - @CSSM_CRL_PARSE_FORMAT() - external int ParsedCrlFormat; - - external ffi.Pointer ParsedCrl; +final _ObjCBlock22_closureRegistry = {}; +int _ObjCBlock22_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock22_registerClosure(Function fn) { + final id = ++_ObjCBlock22_closureRegistryIndex; + _ObjCBlock22_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -typedef CSSM_CRL_PARSE_FORMAT = uint32; - -class cssm_crl_pair extends ffi.Struct { - external CSSM_ENCODED_CRL EncodedCrl; - - external CSSM_PARSED_CRL ParsedCrl; +void _ObjCBlock22_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { + return _ObjCBlock22_closureRegistry[block.ref.target.address]!(arg0); } -typedef CSSM_ENCODED_CRL = cssm_encoded_crl; -typedef CSSM_PARSED_CRL = cssm_parsed_crl; - -class cssm_crlgroup extends ffi.Struct { - @CSSM_CRL_TYPE() - external int CrlType; - - @CSSM_CRL_ENCODING() - external int CrlEncoding; - - @uint32() - external int NumberOfCrls; +class ObjCBlock22 extends _ObjCBlockBase { + ObjCBlock22._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external UnnamedUnion3 GroupCrlList; + /// Creates a block from a C function pointer. + ObjCBlock22.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopTimerRef arg0)>( + _ObjCBlock22_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - @CSSM_CRLGROUP_TYPE() - external int CrlGroupType; + /// Creates a block from a Dart function. + ObjCBlock22.fromFunction( + NativeCupertinoHttp lib, void Function(CFRunLoopTimerRef arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopTimerRef arg0)>( + _ObjCBlock22_closureTrampoline) + .cast(), + _ObjCBlock22_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(CFRunLoopTimerRef arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopTimerRef arg0)>()(_id, arg0); + } } -class UnnamedUnion3 extends ffi.Union { - external CSSM_DATA_PTR CrlList; - - external CSSM_ENCODED_CRL_PTR EncodedCrlList; - - external CSSM_PARSED_CRL_PTR ParsedCrlList; +final class __CFSocket extends ffi.Opaque {} - external CSSM_CRL_PAIR_PTR PairCrlList; +abstract class CFSocketError { + static const int kCFSocketSuccess = 0; + static const int kCFSocketError = -1; + static const int kCFSocketTimeout = -2; } -typedef CSSM_ENCODED_CRL_PTR = ffi.Pointer; -typedef CSSM_PARSED_CRL_PTR = ffi.Pointer; -typedef CSSM_CRL_PAIR_PTR = ffi.Pointer; -typedef CSSM_CRLGROUP_TYPE = uint32; - -class cssm_fieldgroup extends ffi.Struct { - @ffi.Int() - external int NumberOfFields; +final class CFSocketSignature extends ffi.Struct { + @SInt32() + external int protocolFamily; - external CSSM_FIELD_PTR Fields; -} + @SInt32() + external int socketType; -class cssm_evidence extends ffi.Struct { - @CSSM_EVIDENCE_FORM() - external int EvidenceForm; + @SInt32() + external int protocol; - external ffi.Pointer Evidence; + external CFDataRef address; } -typedef CSSM_EVIDENCE_FORM = uint32; - -class cssm_tp_verify_context extends ffi.Struct { - @CSSM_TP_ACTION() - external int Action; - - external SecAsn1Item ActionData; - - external CSSM_CRLGROUP Crls; - - external CSSM_TP_CALLERAUTH_CONTEXT_PTR Cred; +abstract class CFSocketCallBackType { + static const int kCFSocketNoCallBack = 0; + static const int kCFSocketReadCallBack = 1; + static const int kCFSocketAcceptCallBack = 2; + static const int kCFSocketDataCallBack = 3; + static const int kCFSocketConnectCallBack = 4; + static const int kCFSocketWriteCallBack = 8; } -typedef CSSM_TP_ACTION = uint32; -typedef CSSM_CRLGROUP = cssm_crlgroup; -typedef CSSM_TP_CALLERAUTH_CONTEXT_PTR - = ffi.Pointer; - -class cssm_tp_verify_context_result extends ffi.Struct { - @uint32() - external int NumberOfEvidences; +final class CFSocketContext extends ffi.Struct { + @CFIndex() + external int version; - external CSSM_EVIDENCE_PTR Evidence; -} + external ffi.Pointer info; -typedef CSSM_EVIDENCE_PTR = ffi.Pointer; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; -class cssm_tp_request_set extends ffi.Struct { - @uint32() - external int NumberOfRequests; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - external ffi.Pointer Requests; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -class cssm_tp_result_set extends ffi.Struct { - @uint32() - external int NumberOfResults; +typedef CFSocketRef = ffi.Pointer<__CFSocket>; +typedef CFSocketCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFSocketRef s, ffi.Int32 type, CFDataRef address, + ffi.Pointer data, ffi.Pointer info)>>; +typedef CFSocketNativeHandle = ffi.Int; - external ffi.Pointer Results; -} +final class accessx_descriptor extends ffi.Struct { + @ffi.UnsignedInt() + external int ad_name_offset; -class cssm_tp_confirm_response extends ffi.Struct { - @uint32() - external int NumberOfResponses; + @ffi.Int() + external int ad_flags; - external CSSM_TP_CONFIRM_STATUS_PTR Responses; + @ffi.Array.multi([2]) + external ffi.Array ad_pad; } -typedef CSSM_TP_CONFIRM_STATUS_PTR = ffi.Pointer; - -class cssm_tp_certissue_input extends ffi.Struct { - external CSSM_SUBSERVICE_UID CSPSubserviceUid; +typedef gid_t = __darwin_gid_t; +typedef __darwin_gid_t = __uint32_t; +typedef useconds_t = __darwin_useconds_t; +typedef __darwin_useconds_t = __uint32_t; - @CSSM_CL_HANDLE() - external int CLHandle; +final class fssearchblock extends ffi.Opaque {} - @uint32() - external int NumberOfTemplateFields; +final class searchstate extends ffi.Opaque {} - external CSSM_FIELD_PTR SubjectCertFields; +final class flock extends ffi.Struct { + @off_t() + external int l_start; - @CSSM_TP_SERVICES() - external int MoreServiceRequests; + @off_t() + external int l_len; - @uint32() - external int NumberOfServiceControls; + @pid_t() + external int l_pid; - external CSSM_FIELD_PTR ServiceControls; + @ffi.Short() + external int l_type; - external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; + @ffi.Short() + external int l_whence; } -typedef CSSM_TP_SERVICES = uint32; - -class cssm_tp_certissue_output extends ffi.Struct { - @CSSM_TP_CERTISSUE_STATUS() - external int IssueStatus; - - external CSSM_CERTGROUP_PTR CertGroup; +final class flocktimeout extends ffi.Struct { + external flock fl; - @CSSM_TP_SERVICES() - external int PerformedServiceRequests; + external timespec timeout; } -typedef CSSM_TP_CERTISSUE_STATUS = uint32; -typedef CSSM_CERTGROUP_PTR = ffi.Pointer; +final class radvisory extends ffi.Struct { + @off_t() + external int ra_offset; -class cssm_tp_certchange_input extends ffi.Struct { - @CSSM_TP_CERTCHANGE_ACTION() - external int Action; + @ffi.Int() + external int ra_count; +} - @CSSM_TP_CERTCHANGE_REASON() - external int Reason; +final class fsignatures extends ffi.Struct { + @off_t() + external int fs_file_start; - @CSSM_CL_HANDLE() - external int CLHandle; + external ffi.Pointer fs_blob_start; - external CSSM_DATA_PTR Cert; + @ffi.Size() + external int fs_blob_size; - external CSSM_FIELD_PTR ChangeInfo; + @ffi.Size() + external int fs_fsignatures_size; - external CSSM_TIMESTRING StartTime; + @ffi.Array.multi([20]) + external ffi.Array fs_cdhash; - external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; + @ffi.Int() + external int fs_hash_type; } -typedef CSSM_TP_CERTCHANGE_ACTION = uint32; -typedef CSSM_TP_CERTCHANGE_REASON = uint32; +final class fsupplement extends ffi.Struct { + @off_t() + external int fs_file_start; -class cssm_tp_certchange_output extends ffi.Struct { - @CSSM_TP_CERTCHANGE_STATUS() - external int ActionStatus; + @off_t() + external int fs_blob_start; - external CSSM_FIELD RevokeInfo; -} + @ffi.Size() + external int fs_blob_size; -typedef CSSM_TP_CERTCHANGE_STATUS = uint32; -typedef CSSM_FIELD = cssm_field; + @ffi.Int() + external int fs_orig_fd; +} -class cssm_tp_certverify_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; +final class fchecklv extends ffi.Struct { + @off_t() + external int lv_file_start; - external CSSM_DATA_PTR Cert; + @ffi.Size() + external int lv_error_message_size; - external CSSM_TP_VERIFY_CONTEXT_PTR VerifyContext; + external ffi.Pointer lv_error_message; } -typedef CSSM_TP_VERIFY_CONTEXT_PTR = ffi.Pointer; - -class cssm_tp_certverify_output extends ffi.Struct { - @CSSM_TP_CERTVERIFY_STATUS() - external int VerifyStatus; +final class fgetsigsinfo extends ffi.Struct { + @off_t() + external int fg_file_start; - @uint32() - external int NumberOfEvidence; + @ffi.Int() + external int fg_info_request; - external CSSM_EVIDENCE_PTR Evidence; + @ffi.Int() + external int fg_sig_is_platform; } -typedef CSSM_TP_CERTVERIFY_STATUS = uint32; - -class cssm_tp_certnotarize_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; +final class fstore extends ffi.Struct { + @ffi.UnsignedInt() + external int fst_flags; - @uint32() - external int NumberOfFields; + @ffi.Int() + external int fst_posmode; - external CSSM_FIELD_PTR MoreFields; + @off_t() + external int fst_offset; - external CSSM_FIELD_PTR SignScope; + @off_t() + external int fst_length; - @uint32() - external int ScopeSize; + @off_t() + external int fst_bytesalloc; +} - @CSSM_TP_SERVICES() - external int MoreServiceRequests; +final class fpunchhole extends ffi.Struct { + @ffi.UnsignedInt() + external int fp_flags; - @uint32() - external int NumberOfServiceControls; + @ffi.UnsignedInt() + external int reserved; - external CSSM_FIELD_PTR ServiceControls; + @off_t() + external int fp_offset; - external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; + @off_t() + external int fp_length; } -class cssm_tp_certnotarize_output extends ffi.Struct { - @CSSM_TP_CERTNOTARIZE_STATUS() - external int NotarizeStatus; - - external CSSM_CERTGROUP_PTR NotarizedCertGroup; +final class ftrimactivefile extends ffi.Struct { + @off_t() + external int fta_offset; - @CSSM_TP_SERVICES() - external int PerformedServiceRequests; + @off_t() + external int fta_length; } -typedef CSSM_TP_CERTNOTARIZE_STATUS = uint32; - -class cssm_tp_certreclaim_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; +final class fspecread extends ffi.Struct { + @ffi.UnsignedInt() + external int fsr_flags; - @uint32() - external int NumberOfSelectionFields; + @ffi.UnsignedInt() + external int reserved; - external CSSM_FIELD_PTR SelectionFields; + @off_t() + external int fsr_offset; - external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; + @off_t() + external int fsr_length; } -class cssm_tp_certreclaim_output extends ffi.Struct { - @CSSM_TP_CERTRECLAIM_STATUS() - external int ReclaimStatus; +@ffi.Packed(4) +final class log2phys extends ffi.Struct { + @ffi.UnsignedInt() + external int l2p_flags; - external CSSM_CERTGROUP_PTR ReclaimedCertGroup; + @off_t() + external int l2p_contigbytes; - @CSSM_LONG_HANDLE() - external int KeyCacheHandle; + @off_t() + external int l2p_devoffset; } -typedef CSSM_TP_CERTRECLAIM_STATUS = uint32; -typedef CSSM_LONG_HANDLE = uint64; -typedef uint64 = ffi.Uint64; +final class _filesec extends ffi.Opaque {} -class cssm_tp_crlissue_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; +abstract class filesec_property_t { + static const int FILESEC_OWNER = 1; + static const int FILESEC_GROUP = 2; + static const int FILESEC_UUID = 3; + static const int FILESEC_MODE = 4; + static const int FILESEC_ACL = 5; + static const int FILESEC_GRPUUID = 6; + static const int FILESEC_ACL_RAW = 100; + static const int FILESEC_ACL_ALLOCSIZE = 101; +} - @uint32() - external int CrlIdentifier; +typedef filesec_t = ffi.Pointer<_filesec>; - external CSSM_TIMESTRING CrlThisTime; +abstract class os_clockid_t { + static const int OS_CLOCK_MACH_ABSOLUTE_TIME = 32; +} - external CSSM_FIELD_PTR PolicyIdentifier; +final class os_workgroup_attr_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; - external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; + @ffi.Array.multi([60]) + external ffi.Array opaque; } -class cssm_tp_crlissue_output extends ffi.Struct { - @CSSM_TP_CRLISSUE_STATUS() - external int IssueStatus; - - external CSSM_ENCODED_CRL_PTR Crl; +final class os_workgroup_interval_data_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; - external CSSM_TIMESTRING CrlNextTime; + @ffi.Array.multi([56]) + external ffi.Array opaque; } -typedef CSSM_TP_CRLISSUE_STATUS = uint32; - -class cssm_cert_bundle_header extends ffi.Struct { - @CSSM_CERT_BUNDLE_TYPE() - external int BundleType; +final class os_workgroup_join_token_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; - @CSSM_CERT_BUNDLE_ENCODING() - external int BundleEncoding; + @ffi.Array.multi([36]) + external ffi.Array opaque; } -typedef CSSM_CERT_BUNDLE_TYPE = uint32; -typedef CSSM_CERT_BUNDLE_ENCODING = uint32; +class OS_os_workgroup extends OS_object { + OS_os_workgroup._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class cssm_cert_bundle extends ffi.Struct { - external CSSM_CERT_BUNDLE_HEADER BundleHeader; + /// Returns a [OS_os_workgroup] that points to the same underlying object as [other]. + static OS_os_workgroup castFrom(T other) { + return OS_os_workgroup._(other._id, other._lib, + retain: true, release: true); + } - external SecAsn1Item Bundle; -} + /// Returns a [OS_os_workgroup] that wraps the given raw object pointer. + static OS_os_workgroup castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return OS_os_workgroup._(other, lib, retain: retain, release: release); + } -typedef CSSM_CERT_BUNDLE_HEADER = cssm_cert_bundle_header; + /// Returns whether [obj] is an instance of [OS_os_workgroup]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_OS_os_workgroup1); + } -class cssm_db_attribute_info extends ffi.Struct { - @CSSM_DB_ATTRIBUTE_NAME_FORMAT() - external int AttributeNameFormat; + @override + OS_os_workgroup init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_os_workgroup._(_ret, _lib, retain: true, release: true); + } - external cssm_db_attribute_label Label; + static OS_os_workgroup new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_OS_os_workgroup1, _lib._sel_new1); + return OS_os_workgroup._(_ret, _lib, retain: false, release: true); + } - @CSSM_DB_ATTRIBUTE_FORMAT() - external int AttributeFormat; + static OS_os_workgroup alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_OS_os_workgroup1, _lib._sel_alloc1); + return OS_os_workgroup._(_ret, _lib, retain: false, release: true); + } } -typedef CSSM_DB_ATTRIBUTE_NAME_FORMAT = uint32; +typedef os_workgroup_t = ffi.Pointer; +typedef os_workgroup_join_token_t + = ffi.Pointer; +typedef os_workgroup_working_arena_destructor_t + = ffi.Pointer)>>; +typedef os_workgroup_index = ffi.Uint32; -class cssm_db_attribute_label extends ffi.Union { - external ffi.Pointer AttributeName; +final class os_workgroup_max_parallel_threads_attr_s extends ffi.Opaque {} - external SecAsn1Oid AttributeOID; +typedef os_workgroup_mpt_attr_t + = ffi.Pointer; - @uint32() - external int AttributeID; -} +class OS_os_workgroup_interval extends OS_os_workgroup { + OS_os_workgroup_interval._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -typedef CSSM_DB_ATTRIBUTE_FORMAT = uint32; + /// Returns a [OS_os_workgroup_interval] that points to the same underlying object as [other]. + static OS_os_workgroup_interval castFrom(T other) { + return OS_os_workgroup_interval._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [OS_os_workgroup_interval] that wraps the given raw object pointer. + static OS_os_workgroup_interval castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return OS_os_workgroup_interval._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [OS_os_workgroup_interval]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_OS_os_workgroup_interval1); + } -class cssm_db_attribute_data extends ffi.Struct { - external CSSM_DB_ATTRIBUTE_INFO Info; + @override + OS_os_workgroup_interval init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_os_workgroup_interval._(_ret, _lib, retain: true, release: true); + } - @uint32() - external int NumberOfValues; + static OS_os_workgroup_interval new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_OS_os_workgroup_interval1, _lib._sel_new1); + return OS_os_workgroup_interval._(_ret, _lib, retain: false, release: true); + } - external CSSM_DATA_PTR Value; + static OS_os_workgroup_interval alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_OS_os_workgroup_interval1, _lib._sel_alloc1); + return OS_os_workgroup_interval._(_ret, _lib, retain: false, release: true); + } } -typedef CSSM_DB_ATTRIBUTE_INFO = cssm_db_attribute_info; - -class cssm_db_record_attribute_info extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int DataRecordType; +typedef os_workgroup_interval_t = ffi.Pointer; +typedef os_workgroup_interval_data_t + = ffi.Pointer; - @uint32() - external int NumberOfAttributes; +class OS_os_workgroup_parallel extends OS_os_workgroup { + OS_os_workgroup_parallel._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - external CSSM_DB_ATTRIBUTE_INFO_PTR AttributeInfo; -} + /// Returns a [OS_os_workgroup_parallel] that points to the same underlying object as [other]. + static OS_os_workgroup_parallel castFrom(T other) { + return OS_os_workgroup_parallel._(other._id, other._lib, + retain: true, release: true); + } -typedef CSSM_DB_RECORDTYPE = uint32; -typedef CSSM_DB_ATTRIBUTE_INFO_PTR = ffi.Pointer; + /// Returns a [OS_os_workgroup_parallel] that wraps the given raw object pointer. + static OS_os_workgroup_parallel castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return OS_os_workgroup_parallel._(other, lib, + retain: retain, release: release); + } -class cssm_db_record_attribute_data extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int DataRecordType; + /// Returns whether [obj] is an instance of [OS_os_workgroup_parallel]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_OS_os_workgroup_parallel1); + } - @uint32() - external int SemanticInformation; + @override + OS_os_workgroup_parallel init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return OS_os_workgroup_parallel._(_ret, _lib, retain: true, release: true); + } - @uint32() - external int NumberOfAttributes; + static OS_os_workgroup_parallel new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_OS_os_workgroup_parallel1, _lib._sel_new1); + return OS_os_workgroup_parallel._(_ret, _lib, retain: false, release: true); + } - external CSSM_DB_ATTRIBUTE_DATA_PTR AttributeData; + static OS_os_workgroup_parallel alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_OS_os_workgroup_parallel1, _lib._sel_alloc1); + return OS_os_workgroup_parallel._(_ret, _lib, retain: false, release: true); + } } -typedef CSSM_DB_ATTRIBUTE_DATA_PTR = ffi.Pointer; +typedef os_workgroup_parallel_t = ffi.Pointer; +typedef os_workgroup_attr_t = ffi.Pointer; -class cssm_db_parsing_module_info extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int RecordType; +final class time_value extends ffi.Struct { + @integer_t() + external int seconds; - external CSSM_SUBSERVICE_UID ModuleSubserviceUid; + @integer_t() + external int microseconds; } -class cssm_db_index_info extends ffi.Struct { - @CSSM_DB_INDEX_TYPE() - external int IndexType; +typedef integer_t = ffi.Int; - @CSSM_DB_INDEXED_DATA_LOCATION() - external int IndexedDataLocation; +final class mach_timespec extends ffi.Struct { + @ffi.UnsignedInt() + external int tv_sec; - external CSSM_DB_ATTRIBUTE_INFO Info; + @clock_res_t() + external int tv_nsec; } -typedef CSSM_DB_INDEX_TYPE = uint32; -typedef CSSM_DB_INDEXED_DATA_LOCATION = uint32; - -class cssm_db_unique_record extends ffi.Struct { - external CSSM_DB_INDEX_INFO RecordLocator; +typedef clock_res_t = ffi.Int; +typedef dispatch_time_t = ffi.Uint64; - external SecAsn1Item RecordIdentifier; +abstract class qos_class_t { + static const int QOS_CLASS_USER_INTERACTIVE = 33; + static const int QOS_CLASS_USER_INITIATED = 25; + static const int QOS_CLASS_DEFAULT = 21; + static const int QOS_CLASS_UTILITY = 17; + static const int QOS_CLASS_BACKGROUND = 9; + static const int QOS_CLASS_UNSPECIFIED = 0; } -typedef CSSM_DB_INDEX_INFO = cssm_db_index_info; - -class cssm_db_record_index_info extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int DataRecordType; +typedef dispatch_object_t = ffi.Pointer; +typedef dispatch_function_t + = ffi.Pointer)>>; +typedef dispatch_block_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock23_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} - @uint32() - external int NumberOfIndexes; +final _ObjCBlock23_closureRegistry = {}; +int _ObjCBlock23_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock23_registerClosure(Function fn) { + final id = ++_ObjCBlock23_closureRegistryIndex; + _ObjCBlock23_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external CSSM_DB_INDEX_INFO_PTR IndexInfo; +void _ObjCBlock23_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock23_closureRegistry[block.ref.target.address]!(arg0); } -typedef CSSM_DB_INDEX_INFO_PTR = ffi.Pointer; +class ObjCBlock23 extends _ObjCBlockBase { + ObjCBlock23._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -class cssm_dbinfo extends ffi.Struct { - @uint32() - external int NumberOfRecordTypes; + /// Creates a block from a C function pointer. + ObjCBlock23.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Size arg0)>(_ObjCBlock23_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external CSSM_DB_PARSING_MODULE_INFO_PTR DefaultParsingModules; + /// Creates a block from a Dart function. + ObjCBlock23.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Size arg0)>(_ObjCBlock23_closureTrampoline) + .cast(), + _ObjCBlock23_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(int arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Size arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); + } +} - external CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR RecordAttributeNames; +final class dispatch_queue_s extends ffi.Opaque {} - external CSSM_DB_RECORD_INDEX_INFO_PTR RecordIndexes; +typedef dispatch_queue_global_t = ffi.Pointer; - @CSSM_BOOL() - external int IsLocal; +final class dispatch_queue_attr_s extends ffi.Opaque {} - external ffi.Pointer AccessPath; +typedef dispatch_queue_attr_t = ffi.Pointer; - external ffi.Pointer Reserved; +abstract class dispatch_autorelease_frequency_t { + static const int DISPATCH_AUTORELEASE_FREQUENCY_INHERIT = 0; + static const int DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM = 1; + static const int DISPATCH_AUTORELEASE_FREQUENCY_NEVER = 2; } -typedef CSSM_DB_PARSING_MODULE_INFO_PTR - = ffi.Pointer; -typedef CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR - = ffi.Pointer; -typedef CSSM_DB_RECORD_INDEX_INFO_PTR = ffi.Pointer; - -class cssm_selection_predicate extends ffi.Struct { - @CSSM_DB_OPERATOR() - external int DbOperator; - - external CSSM_DB_ATTRIBUTE_DATA Attribute; +abstract class dispatch_block_flags_t { + static const int DISPATCH_BLOCK_BARRIER = 1; + static const int DISPATCH_BLOCK_DETACHED = 2; + static const int DISPATCH_BLOCK_ASSIGN_CURRENT = 4; + static const int DISPATCH_BLOCK_NO_QOS_CLASS = 8; + static const int DISPATCH_BLOCK_INHERIT_QOS_CLASS = 16; + static const int DISPATCH_BLOCK_ENFORCE_QOS_CLASS = 32; } -typedef CSSM_DB_OPERATOR = uint32; -typedef CSSM_DB_ATTRIBUTE_DATA = cssm_db_attribute_data; +final class mach_msg_type_descriptor_t extends ffi.Opaque {} -class cssm_query_limits extends ffi.Struct { - @uint32() - external int TimeLimit; +final class mach_msg_port_descriptor_t extends ffi.Opaque {} - @uint32() - external int SizeLimit; -} +final class mach_msg_ool_descriptor32_t extends ffi.Opaque {} -class cssm_query extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int RecordType; +final class mach_msg_ool_descriptor64_t extends ffi.Opaque {} - @CSSM_DB_CONJUNCTIVE() - external int Conjunctive; +final class mach_msg_ool_descriptor_t extends ffi.Opaque {} - @uint32() - external int NumSelectionPredicates; +final class mach_msg_ool_ports_descriptor32_t extends ffi.Opaque {} - external CSSM_SELECTION_PREDICATE_PTR SelectionPredicate; +final class mach_msg_ool_ports_descriptor64_t extends ffi.Opaque {} - external CSSM_QUERY_LIMITS QueryLimits; +final class mach_msg_ool_ports_descriptor_t extends ffi.Opaque {} - @CSSM_QUERY_FLAGS() - external int QueryFlags; -} +final class mach_msg_guarded_port_descriptor32_t extends ffi.Opaque {} -typedef CSSM_DB_CONJUNCTIVE = uint32; -typedef CSSM_SELECTION_PREDICATE_PTR = ffi.Pointer; -typedef CSSM_QUERY_LIMITS = cssm_query_limits; -typedef CSSM_QUERY_FLAGS = uint32; +final class mach_msg_guarded_port_descriptor64_t extends ffi.Opaque {} -class cssm_dl_pkcs11_attributes extends ffi.Struct { - @uint32() - external int DeviceAccessFlags; -} +final class mach_msg_guarded_port_descriptor_t extends ffi.Opaque {} -class cssm_name_list extends ffi.Struct { - @uint32() - external int NumStrings; +final class mach_msg_descriptor_t extends ffi.Opaque {} - external ffi.Pointer> String; +final class mach_msg_body_t extends ffi.Struct { + @mach_msg_size_t() + external int msgh_descriptor_count; } -class cssm_db_schema_attribute_info extends ffi.Struct { - @uint32() - external int AttributeId; - - external ffi.Pointer AttributeName; +typedef mach_msg_size_t = natural_t; - external SecAsn1Oid AttributeNameID; +final class mach_msg_header_t extends ffi.Struct { + @mach_msg_bits_t() + external int msgh_bits; - @CSSM_DB_ATTRIBUTE_FORMAT() - external int DataType; -} + @mach_msg_size_t() + external int msgh_size; -class cssm_db_schema_index_info extends ffi.Struct { - @uint32() - external int AttributeId; + @mach_port_t() + external int msgh_remote_port; - @uint32() - external int IndexId; + @mach_port_t() + external int msgh_local_port; - @CSSM_DB_INDEX_TYPE() - external int IndexType; + @mach_port_name_t() + external int msgh_voucher_port; - @CSSM_DB_INDEXED_DATA_LOCATION() - external int IndexedDataLocation; + @mach_msg_id_t() + external int msgh_id; } -class cssm_x509_type_value_pair extends ffi.Struct { - external SecAsn1Oid type; +typedef mach_msg_bits_t = ffi.UnsignedInt; +typedef mach_msg_id_t = integer_t; - @CSSM_BER_TAG() - external int valueType; +final class mach_msg_base_t extends ffi.Struct { + external mach_msg_header_t header; - external SecAsn1Item value; + external mach_msg_body_t body; } -typedef CSSM_BER_TAG = uint8; - -class cssm_x509_rdn extends ffi.Struct { - @uint32() - external int numberOfPairs; +final class mach_msg_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; - external CSSM_X509_TYPE_VALUE_PAIR_PTR AttributeTypeAndValue; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; } -typedef CSSM_X509_TYPE_VALUE_PAIR_PTR = ffi.Pointer; - -class cssm_x509_name extends ffi.Struct { - @uint32() - external int numberOfRDNs; - - external CSSM_X509_RDN_PTR RelativeDistinguishedName; -} +typedef mach_msg_trailer_type_t = ffi.UnsignedInt; +typedef mach_msg_trailer_size_t = ffi.UnsignedInt; -typedef CSSM_X509_RDN_PTR = ffi.Pointer; +final class mach_msg_seqno_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -class cssm_x509_time extends ffi.Struct { - @CSSM_BER_TAG() - external int timeType; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - external SecAsn1Item time; + @mach_port_seqno_t() + external int msgh_seqno; } -class x509_validity extends ffi.Struct { - external CSSM_X509_TIME notBefore; - - external CSSM_X509_TIME notAfter; +final class security_token_t extends ffi.Struct { + @ffi.Array.multi([2]) + external ffi.Array val; } -typedef CSSM_X509_TIME = cssm_x509_time; +final class mach_msg_security_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -class cssm_x509ext_basicConstraints extends ffi.Struct { - @CSSM_BOOL() - external int cA; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - @CSSM_X509_OPTION() - external int pathLenConstraintPresent; + @mach_port_seqno_t() + external int msgh_seqno; - @uint32() - external int pathLenConstraint; + external security_token_t msgh_sender; } -typedef CSSM_X509_OPTION = CSSM_BOOL; - -abstract class extension_data_format { - static const int CSSM_X509_DATAFORMAT_ENCODED = 0; - static const int CSSM_X509_DATAFORMAT_PARSED = 1; - static const int CSSM_X509_DATAFORMAT_PAIR = 2; +final class audit_token_t extends ffi.Struct { + @ffi.Array.multi([8]) + external ffi.Array val; } -class cssm_x509_extensionTagAndValue extends ffi.Struct { - @CSSM_BER_TAG() - external int type; +final class mach_msg_audit_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; - external SecAsn1Item value; -} + @mach_msg_trailer_size_t() + external int msgh_trailer_size; -class cssm_x509ext_pair extends ffi.Struct { - external CSSM_X509EXT_TAGandVALUE tagAndValue; + @mach_port_seqno_t() + external int msgh_seqno; - external ffi.Pointer parsedValue; + external security_token_t msgh_sender; + + external audit_token_t msgh_audit; } -typedef CSSM_X509EXT_TAGandVALUE = cssm_x509_extensionTagAndValue; +@ffi.Packed(4) +final class mach_msg_context_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -class cssm_x509_extension extends ffi.Struct { - external SecAsn1Oid extnId; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - @CSSM_BOOL() - external int critical; + @mach_port_seqno_t() + external int msgh_seqno; - @ffi.Int32() - external int format; + external security_token_t msgh_sender; - external cssm_x509ext_value value; + external audit_token_t msgh_audit; - external SecAsn1Item BERvalue; + @mach_port_context_t() + external int msgh_context; } -class cssm_x509ext_value extends ffi.Union { - external ffi.Pointer tagAndValue; - - external ffi.Pointer parsedValue; +typedef mach_port_context_t = vm_offset_t; +typedef vm_offset_t = ffi.UintPtr; - external ffi.Pointer valuePair; +final class msg_labels_t extends ffi.Struct { + @mach_port_name_t() + external int sender; } -typedef CSSM_X509EXT_PAIR = cssm_x509ext_pair; +@ffi.Packed(4) +final class mach_msg_mac_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -class cssm_x509_extensions extends ffi.Struct { - @uint32() - external int numberOfExtensions; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - external CSSM_X509_EXTENSION_PTR extensions; -} + @mach_port_seqno_t() + external int msgh_seqno; -typedef CSSM_X509_EXTENSION_PTR = ffi.Pointer; + external security_token_t msgh_sender; -class cssm_x509_tbs_certificate extends ffi.Struct { - external SecAsn1Item version; + external audit_token_t msgh_audit; - external SecAsn1Item serialNumber; + @mach_port_context_t() + external int msgh_context; - external SecAsn1AlgId signature; + @mach_msg_filter_id() + external int msgh_ad; - external CSSM_X509_NAME issuer; + external msg_labels_t msgh_labels; +} - external CSSM_X509_VALIDITY validity; +typedef mach_msg_filter_id = ffi.Int; - external CSSM_X509_NAME subject; +final class mach_msg_empty_send_t extends ffi.Struct { + external mach_msg_header_t header; +} - external SecAsn1PubKeyInfo subjectPublicKeyInfo; +final class mach_msg_empty_rcv_t extends ffi.Struct { + external mach_msg_header_t header; - external SecAsn1Item issuerUniqueIdentifier; + external mach_msg_trailer_t trailer; +} - external SecAsn1Item subjectUniqueIdentifier; +final class mach_msg_empty_t extends ffi.Union { + external mach_msg_empty_send_t send; - external CSSM_X509_EXTENSIONS extensions; + external mach_msg_empty_rcv_t rcv; } -typedef CSSM_X509_NAME = cssm_x509_name; -typedef CSSM_X509_VALIDITY = x509_validity; -typedef CSSM_X509_EXTENSIONS = cssm_x509_extensions; +typedef mach_msg_return_t = kern_return_t; +typedef kern_return_t = ffi.Int; +typedef mach_msg_option_t = integer_t; +typedef mach_msg_timeout_t = natural_t; -class cssm_x509_signature extends ffi.Struct { - external SecAsn1AlgId algorithmIdentifier; +final class dispatch_source_type_s extends ffi.Opaque {} - external SecAsn1Item encrypted; -} +typedef dispatch_source_t = ffi.Pointer; +typedef dispatch_source_type_t = ffi.Pointer; +typedef dispatch_group_t = ffi.Pointer; +typedef dispatch_semaphore_t = ffi.Pointer; +typedef dispatch_once_t = ffi.IntPtr; -class cssm_x509_signed_certificate extends ffi.Struct { - external CSSM_X509_TBS_CERTIFICATE certificate; +final class dispatch_data_s extends ffi.Opaque {} - external CSSM_X509_SIGNATURE signature; +typedef dispatch_data_t = ffi.Pointer; +typedef dispatch_data_applier_t = ffi.Pointer<_ObjCBlock>; +bool _ObjCBlock24_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, + ffi.Pointer arg2, ffi.Size arg3)>>() + .asFunction< + bool Function(dispatch_data_t arg0, int arg1, + ffi.Pointer arg2, int arg3)>()(arg0, arg1, arg2, arg3); } -typedef CSSM_X509_TBS_CERTIFICATE = cssm_x509_tbs_certificate; -typedef CSSM_X509_SIGNATURE = cssm_x509_signature; - -class cssm_x509ext_policyQualifierInfo extends ffi.Struct { - external SecAsn1Oid policyQualifierId; +final _ObjCBlock24_closureRegistry = {}; +int _ObjCBlock24_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock24_registerClosure(Function fn) { + final id = ++_ObjCBlock24_closureRegistryIndex; + _ObjCBlock24_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external SecAsn1Item value; +bool _ObjCBlock24_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { + return _ObjCBlock24_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2, arg3); } -class cssm_x509ext_policyQualifiers extends ffi.Struct { - @uint32() - external int numberOfPolicyQualifiers; +class ObjCBlock24 extends _ObjCBlockBase { + ObjCBlock24._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external ffi.Pointer policyQualifier; + /// Creates a block from a C function pointer. + ObjCBlock24.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, + ffi.Pointer arg2, ffi.Size arg3)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Size arg1, + ffi.Pointer arg2, + ffi.Size arg3)>(_ObjCBlock24_fnPtrTrampoline, false) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock24.fromFunction( + NativeCupertinoHttp lib, + bool Function(dispatch_data_t arg0, int arg1, ffi.Pointer arg2, + int arg3) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Size arg1, + ffi.Pointer arg2, + ffi.Size arg3)>( + _ObjCBlock24_closureTrampoline, false) + .cast(), + _ObjCBlock24_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + bool call( + dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Size arg1, + ffi.Pointer arg2, + ffi.Size arg3)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + int arg1, + ffi.Pointer arg2, + int arg3)>()(_id, arg0, arg1, arg2, arg3); + } } -typedef CSSM_X509EXT_POLICYQUALIFIERINFO = cssm_x509ext_policyQualifierInfo; - -class cssm_x509ext_policyInfo extends ffi.Struct { - external SecAsn1Oid policyIdentifier; - - external CSSM_X509EXT_POLICYQUALIFIERS policyQualifiers; +typedef dispatch_fd_t = ffi.Int; +void _ObjCBlock25_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>>() + .asFunction()(arg0, arg1); } -typedef CSSM_X509EXT_POLICYQUALIFIERS = cssm_x509ext_policyQualifiers; - -class cssm_x509_revoked_cert_entry extends ffi.Struct { - external SecAsn1Item certificateSerialNumber; - - external CSSM_X509_TIME revocationDate; - - external CSSM_X509_EXTENSIONS extensions; +final _ObjCBlock25_closureRegistry = {}; +int _ObjCBlock25_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock25_registerClosure(Function fn) { + final id = ++_ObjCBlock25_closureRegistryIndex; + _ObjCBlock25_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class cssm_x509_revoked_cert_list extends ffi.Struct { - @uint32() - external int numberOfRevokedCertEntries; - - external CSSM_X509_REVOKED_CERT_ENTRY_PTR revokedCertEntry; +void _ObjCBlock25_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { + return _ObjCBlock25_closureRegistry[block.ref.target.address]!(arg0, arg1); } -typedef CSSM_X509_REVOKED_CERT_ENTRY_PTR - = ffi.Pointer; - -class cssm_x509_tbs_certlist extends ffi.Struct { - external SecAsn1Item version; - - external SecAsn1AlgId signature; - - external CSSM_X509_NAME issuer; - - external CSSM_X509_TIME thisUpdate; - - external CSSM_X509_TIME nextUpdate; +class ObjCBlock25 extends _ObjCBlockBase { + ObjCBlock25._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - external CSSM_X509_REVOKED_CERT_LIST_PTR revokedCertificates; + /// Creates a block from a C function pointer. + ObjCBlock25.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Int arg1)>(_ObjCBlock25_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external CSSM_X509_EXTENSIONS extensions; + /// Creates a block from a Dart function. + ObjCBlock25.fromFunction( + NativeCupertinoHttp lib, void Function(dispatch_data_t arg0, int arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Int arg1)>(_ObjCBlock25_closureTrampoline) + .cast(), + _ObjCBlock25_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(dispatch_data_t arg0, int arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, ffi.Int arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, + int arg1)>()(_id, arg0, arg1); + } } -typedef CSSM_X509_REVOKED_CERT_LIST_PTR - = ffi.Pointer; - -class cssm_x509_signed_crl extends ffi.Struct { - external CSSM_X509_TBS_CERTLIST tbsCertList; - - external CSSM_X509_SIGNATURE signature; +typedef dispatch_io_t = ffi.Pointer; +typedef dispatch_io_type_t = ffi.UnsignedLong; +void _ObjCBlock26_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); } -typedef CSSM_X509_TBS_CERTLIST = cssm_x509_tbs_certlist; - -abstract class __CE_GeneralNameType { - static const int GNT_OtherName = 0; - static const int GNT_RFC822Name = 1; - static const int GNT_DNSName = 2; - static const int GNT_X400Address = 3; - static const int GNT_DirectoryName = 4; - static const int GNT_EdiPartyName = 5; - static const int GNT_URI = 6; - static const int GNT_IPAddress = 7; - static const int GNT_RegisteredID = 8; +final _ObjCBlock26_closureRegistry = {}; +int _ObjCBlock26_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock26_registerClosure(Function fn) { + final id = ++_ObjCBlock26_closureRegistryIndex; + _ObjCBlock26_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class __CE_OtherName extends ffi.Struct { - external SecAsn1Oid typeId; - - external SecAsn1Item value; +void _ObjCBlock26_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock26_closureRegistry[block.ref.target.address]!(arg0); } -class __CE_GeneralName extends ffi.Struct { - @ffi.Int32() - external int nameType; +class ObjCBlock26 extends _ObjCBlockBase { + ObjCBlock26._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @CSSM_BOOL() - external int berEncoded; + /// Creates a block from a C function pointer. + ObjCBlock26.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Int arg0)>(_ObjCBlock26_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external SecAsn1Item name; + /// Creates a block from a Dart function. + ObjCBlock26.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Int arg0)>(_ObjCBlock26_closureTrampoline) + .cast(), + _ObjCBlock26_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(int arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Int arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); + } } -class __CE_GeneralNames extends ffi.Struct { - @uint32() - external int numNames; - - external ffi.Pointer generalName; +typedef dispatch_io_handler_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock27_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() + .asFunction< + void Function( + bool arg0, dispatch_data_t arg1, int arg2)>()(arg0, arg1, arg2); } -typedef CE_GeneralName = __CE_GeneralName; - -class __CE_AuthorityKeyID extends ffi.Struct { - @CSSM_BOOL() - external int keyIdentifierPresent; - - external SecAsn1Item keyIdentifier; +final _ObjCBlock27_closureRegistry = {}; +int _ObjCBlock27_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock27_registerClosure(Function fn) { + final id = ++_ObjCBlock27_closureRegistryIndex; + _ObjCBlock27_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @CSSM_BOOL() - external int generalNamesPresent; +void _ObjCBlock27_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { + return _ObjCBlock27_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - external ffi.Pointer generalNames; +class ObjCBlock27 extends _ObjCBlockBase { + ObjCBlock27._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @CSSM_BOOL() - external int serialNumberPresent; + /// Creates a block from a C function pointer. + ObjCBlock27.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0, + dispatch_data_t arg1, + ffi.Int arg2)>(_ObjCBlock27_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external SecAsn1Item serialNumber; + /// Creates a block from a Dart function. + ObjCBlock27.fromFunction(NativeCupertinoHttp lib, + void Function(bool arg0, dispatch_data_t arg1, int arg2) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0, + dispatch_data_t arg1, + ffi.Int arg2)>(_ObjCBlock27_closureTrampoline) + .cast(), + _ObjCBlock27_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(bool arg0, dispatch_data_t arg1, int arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0, + dispatch_data_t arg1, ffi.Int arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, bool arg0, + dispatch_data_t arg1, int arg2)>()(_id, arg0, arg1, arg2); + } } -typedef CE_GeneralNames = __CE_GeneralNames; +typedef dispatch_io_close_flags_t = ffi.UnsignedLong; +typedef dispatch_io_interval_flags_t = ffi.UnsignedLong; +typedef dispatch_workloop_t = ffi.Pointer; -class __CE_ExtendedKeyUsage extends ffi.Struct { - @uint32() - external int numPurposes; +final class CFStreamError extends ffi.Struct { + @CFIndex() + external int domain; - external CSSM_OID_PTR purposes; + @SInt32() + external int error; } -typedef CSSM_OID_PTR = ffi.Pointer; - -class __CE_BasicConstraints extends ffi.Struct { - @CSSM_BOOL() - external int cA; - - @CSSM_BOOL() - external int pathLenConstraintPresent; +abstract class CFStreamStatus { + static const int kCFStreamStatusNotOpen = 0; + static const int kCFStreamStatusOpening = 1; + static const int kCFStreamStatusOpen = 2; + static const int kCFStreamStatusReading = 3; + static const int kCFStreamStatusWriting = 4; + static const int kCFStreamStatusAtEnd = 5; + static const int kCFStreamStatusClosed = 6; + static const int kCFStreamStatusError = 7; +} - @uint32() - external int pathLenConstraint; +abstract class CFStreamEventType { + static const int kCFStreamEventNone = 0; + static const int kCFStreamEventOpenCompleted = 1; + static const int kCFStreamEventHasBytesAvailable = 2; + static const int kCFStreamEventCanAcceptBytes = 4; + static const int kCFStreamEventErrorOccurred = 8; + static const int kCFStreamEventEndEncountered = 16; } -class __CE_PolicyQualifierInfo extends ffi.Struct { - external SecAsn1Oid policyQualifierId; +final class CFStreamClientContext extends ffi.Struct { + @CFIndex() + external int version; - external SecAsn1Item qualifier; -} + external ffi.Pointer info; -class __CE_PolicyInformation extends ffi.Struct { - external SecAsn1Oid certPolicyId; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - @uint32() - external int numPolicyQualifiers; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - external ffi.Pointer policyQualifiers; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -typedef CE_PolicyQualifierInfo = __CE_PolicyQualifierInfo; - -class __CE_CertPolicies extends ffi.Struct { - @uint32() - external int numPolicies; +final class __CFReadStream extends ffi.Opaque {} - external ffi.Pointer policies; -} +final class __CFWriteStream extends ffi.Opaque {} -typedef CE_PolicyInformation = __CE_PolicyInformation; +typedef CFStreamPropertyKey = CFStringRef; +typedef CFReadStreamRef = ffi.Pointer<__CFReadStream>; +typedef CFWriteStreamRef = ffi.Pointer<__CFWriteStream>; +typedef CFReadStreamClientCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef stream, ffi.Int32 type, + ffi.Pointer clientCallBackInfo)>>; +typedef CFWriteStreamClientCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFWriteStreamRef stream, ffi.Int32 type, + ffi.Pointer clientCallBackInfo)>>; -abstract class __CE_CrlDistributionPointNameType { - static const int CE_CDNT_FullName = 0; - static const int CE_CDNT_NameRelativeToCrlIssuer = 1; +abstract class CFStreamErrorDomain { + static const int kCFStreamErrorDomainCustom = -1; + static const int kCFStreamErrorDomainPOSIX = 1; + static const int kCFStreamErrorDomainMacOSStatus = 2; } -class __CE_DistributionPointName extends ffi.Struct { - @ffi.Int32() - external int nameType; +abstract class CFPropertyListMutabilityOptions { + static const int kCFPropertyListImmutable = 0; + static const int kCFPropertyListMutableContainers = 1; + static const int kCFPropertyListMutableContainersAndLeaves = 2; +} - external UnnamedUnion4 dpn; +abstract class CFPropertyListFormat { + static const int kCFPropertyListOpenStepFormat = 1; + static const int kCFPropertyListXMLFormat_v1_0 = 100; + static const int kCFPropertyListBinaryFormat_v1_0 = 200; } -class UnnamedUnion4 extends ffi.Union { - external ffi.Pointer fullName; +final class CFSetCallBacks extends ffi.Struct { + @CFIndex() + external int version; - external CSSM_X509_RDN_PTR rdn; -} + external CFSetRetainCallBack retain; -class __CE_CRLDistributionPoint extends ffi.Struct { - external ffi.Pointer distPointName; + external CFSetReleaseCallBack release; - @CSSM_BOOL() - external int reasonsPresent; + external CFSetCopyDescriptionCallBack copyDescription; - @CE_CrlDistReasonFlags() - external int reasons; + external CFSetEqualCallBack equal; - external ffi.Pointer crlIssuer; + external CFSetHashCallBack hash; } -typedef CE_DistributionPointName = __CE_DistributionPointName; -typedef CE_CrlDistReasonFlags = uint8; +typedef CFSetRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer value)>>; +typedef CFSetReleaseCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer value)>>; +typedef CFSetCopyDescriptionCallBack = ffi.Pointer< + ffi.NativeFunction value)>>; +typedef CFSetEqualCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function( + ffi.Pointer value1, ffi.Pointer value2)>>; +typedef CFSetHashCallBack = ffi.Pointer< + ffi.NativeFunction value)>>; -class __CE_CRLDistPointsSyntax extends ffi.Struct { - @uint32() - external int numDistPoints; +final class __CFSet extends ffi.Opaque {} - external ffi.Pointer distPoints; +typedef CFSetRef = ffi.Pointer<__CFSet>; +typedef CFMutableSetRef = ffi.Pointer<__CFSet>; +typedef CFSetApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer value, ffi.Pointer context)>>; + +abstract class CFStringEncodings { + static const int kCFStringEncodingMacJapanese = 1; + static const int kCFStringEncodingMacChineseTrad = 2; + static const int kCFStringEncodingMacKorean = 3; + static const int kCFStringEncodingMacArabic = 4; + static const int kCFStringEncodingMacHebrew = 5; + static const int kCFStringEncodingMacGreek = 6; + static const int kCFStringEncodingMacCyrillic = 7; + static const int kCFStringEncodingMacDevanagari = 9; + static const int kCFStringEncodingMacGurmukhi = 10; + static const int kCFStringEncodingMacGujarati = 11; + static const int kCFStringEncodingMacOriya = 12; + static const int kCFStringEncodingMacBengali = 13; + static const int kCFStringEncodingMacTamil = 14; + static const int kCFStringEncodingMacTelugu = 15; + static const int kCFStringEncodingMacKannada = 16; + static const int kCFStringEncodingMacMalayalam = 17; + static const int kCFStringEncodingMacSinhalese = 18; + static const int kCFStringEncodingMacBurmese = 19; + static const int kCFStringEncodingMacKhmer = 20; + static const int kCFStringEncodingMacThai = 21; + static const int kCFStringEncodingMacLaotian = 22; + static const int kCFStringEncodingMacGeorgian = 23; + static const int kCFStringEncodingMacArmenian = 24; + static const int kCFStringEncodingMacChineseSimp = 25; + static const int kCFStringEncodingMacTibetan = 26; + static const int kCFStringEncodingMacMongolian = 27; + static const int kCFStringEncodingMacEthiopic = 28; + static const int kCFStringEncodingMacCentralEurRoman = 29; + static const int kCFStringEncodingMacVietnamese = 30; + static const int kCFStringEncodingMacExtArabic = 31; + static const int kCFStringEncodingMacSymbol = 33; + static const int kCFStringEncodingMacDingbats = 34; + static const int kCFStringEncodingMacTurkish = 35; + static const int kCFStringEncodingMacCroatian = 36; + static const int kCFStringEncodingMacIcelandic = 37; + static const int kCFStringEncodingMacRomanian = 38; + static const int kCFStringEncodingMacCeltic = 39; + static const int kCFStringEncodingMacGaelic = 40; + static const int kCFStringEncodingMacFarsi = 140; + static const int kCFStringEncodingMacUkrainian = 152; + static const int kCFStringEncodingMacInuit = 236; + static const int kCFStringEncodingMacVT100 = 252; + static const int kCFStringEncodingMacHFS = 255; + static const int kCFStringEncodingISOLatin2 = 514; + static const int kCFStringEncodingISOLatin3 = 515; + static const int kCFStringEncodingISOLatin4 = 516; + static const int kCFStringEncodingISOLatinCyrillic = 517; + static const int kCFStringEncodingISOLatinArabic = 518; + static const int kCFStringEncodingISOLatinGreek = 519; + static const int kCFStringEncodingISOLatinHebrew = 520; + static const int kCFStringEncodingISOLatin5 = 521; + static const int kCFStringEncodingISOLatin6 = 522; + static const int kCFStringEncodingISOLatinThai = 523; + static const int kCFStringEncodingISOLatin7 = 525; + static const int kCFStringEncodingISOLatin8 = 526; + static const int kCFStringEncodingISOLatin9 = 527; + static const int kCFStringEncodingISOLatin10 = 528; + static const int kCFStringEncodingDOSLatinUS = 1024; + static const int kCFStringEncodingDOSGreek = 1029; + static const int kCFStringEncodingDOSBalticRim = 1030; + static const int kCFStringEncodingDOSLatin1 = 1040; + static const int kCFStringEncodingDOSGreek1 = 1041; + static const int kCFStringEncodingDOSLatin2 = 1042; + static const int kCFStringEncodingDOSCyrillic = 1043; + static const int kCFStringEncodingDOSTurkish = 1044; + static const int kCFStringEncodingDOSPortuguese = 1045; + static const int kCFStringEncodingDOSIcelandic = 1046; + static const int kCFStringEncodingDOSHebrew = 1047; + static const int kCFStringEncodingDOSCanadianFrench = 1048; + static const int kCFStringEncodingDOSArabic = 1049; + static const int kCFStringEncodingDOSNordic = 1050; + static const int kCFStringEncodingDOSRussian = 1051; + static const int kCFStringEncodingDOSGreek2 = 1052; + static const int kCFStringEncodingDOSThai = 1053; + static const int kCFStringEncodingDOSJapanese = 1056; + static const int kCFStringEncodingDOSChineseSimplif = 1057; + static const int kCFStringEncodingDOSKorean = 1058; + static const int kCFStringEncodingDOSChineseTrad = 1059; + static const int kCFStringEncodingWindowsLatin2 = 1281; + static const int kCFStringEncodingWindowsCyrillic = 1282; + static const int kCFStringEncodingWindowsGreek = 1283; + static const int kCFStringEncodingWindowsLatin5 = 1284; + static const int kCFStringEncodingWindowsHebrew = 1285; + static const int kCFStringEncodingWindowsArabic = 1286; + static const int kCFStringEncodingWindowsBalticRim = 1287; + static const int kCFStringEncodingWindowsVietnamese = 1288; + static const int kCFStringEncodingWindowsKoreanJohab = 1296; + static const int kCFStringEncodingANSEL = 1537; + static const int kCFStringEncodingJIS_X0201_76 = 1568; + static const int kCFStringEncodingJIS_X0208_83 = 1569; + static const int kCFStringEncodingJIS_X0208_90 = 1570; + static const int kCFStringEncodingJIS_X0212_90 = 1571; + static const int kCFStringEncodingJIS_C6226_78 = 1572; + static const int kCFStringEncodingShiftJIS_X0213 = 1576; + static const int kCFStringEncodingShiftJIS_X0213_MenKuTen = 1577; + static const int kCFStringEncodingGB_2312_80 = 1584; + static const int kCFStringEncodingGBK_95 = 1585; + static const int kCFStringEncodingGB_18030_2000 = 1586; + static const int kCFStringEncodingKSC_5601_87 = 1600; + static const int kCFStringEncodingKSC_5601_92_Johab = 1601; + static const int kCFStringEncodingCNS_11643_92_P1 = 1617; + static const int kCFStringEncodingCNS_11643_92_P2 = 1618; + static const int kCFStringEncodingCNS_11643_92_P3 = 1619; + static const int kCFStringEncodingISO_2022_JP = 2080; + static const int kCFStringEncodingISO_2022_JP_2 = 2081; + static const int kCFStringEncodingISO_2022_JP_1 = 2082; + static const int kCFStringEncodingISO_2022_JP_3 = 2083; + static const int kCFStringEncodingISO_2022_CN = 2096; + static const int kCFStringEncodingISO_2022_CN_EXT = 2097; + static const int kCFStringEncodingISO_2022_KR = 2112; + static const int kCFStringEncodingEUC_JP = 2336; + static const int kCFStringEncodingEUC_CN = 2352; + static const int kCFStringEncodingEUC_TW = 2353; + static const int kCFStringEncodingEUC_KR = 2368; + static const int kCFStringEncodingShiftJIS = 2561; + static const int kCFStringEncodingKOI8_R = 2562; + static const int kCFStringEncodingBig5 = 2563; + static const int kCFStringEncodingMacRomanLatin1 = 2564; + static const int kCFStringEncodingHZ_GB_2312 = 2565; + static const int kCFStringEncodingBig5_HKSCS_1999 = 2566; + static const int kCFStringEncodingVISCII = 2567; + static const int kCFStringEncodingKOI8_U = 2568; + static const int kCFStringEncodingBig5_E = 2569; + static const int kCFStringEncodingNextStepJapanese = 2818; + static const int kCFStringEncodingEBCDIC_US = 3073; + static const int kCFStringEncodingEBCDIC_CP037 = 3074; + static const int kCFStringEncodingUTF7 = 67109120; + static const int kCFStringEncodingUTF7_IMAP = 2576; + static const int kCFStringEncodingShiftJIS_X0213_00 = 1576; } -typedef CE_CRLDistributionPoint = __CE_CRLDistributionPoint; +final class CFTreeContext extends ffi.Struct { + @CFIndex() + external int version; -class __CE_AccessDescription extends ffi.Struct { - external SecAsn1Oid accessMethod; + external ffi.Pointer info; - external CE_GeneralName accessLocation; -} + external CFTreeRetainCallBack retain; -class __CE_AuthorityInfoAccess extends ffi.Struct { - @uint32() - external int numAccessDescriptions; + external CFTreeReleaseCallBack release; - external ffi.Pointer accessDescriptions; + external CFTreeCopyDescriptionCallBack copyDescription; } -typedef CE_AccessDescription = __CE_AccessDescription; +typedef CFTreeRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>>; +typedef CFTreeReleaseCallBack = ffi + .Pointer info)>>; +typedef CFTreeCopyDescriptionCallBack = ffi.Pointer< + ffi.NativeFunction info)>>; -class __CE_SemanticsInformation extends ffi.Struct { - external ffi.Pointer semanticsIdentifier; +final class __CFTree extends ffi.Opaque {} - external ffi.Pointer - nameRegistrationAuthorities; +typedef CFTreeRef = ffi.Pointer<__CFTree>; +typedef CFTreeApplierFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer value, ffi.Pointer context)>>; + +abstract class CFURLError { + static const int kCFURLUnknownError = -10; + static const int kCFURLUnknownSchemeError = -11; + static const int kCFURLResourceNotFoundError = -12; + static const int kCFURLResourceAccessViolationError = -13; + static const int kCFURLRemoteHostUnavailableError = -14; + static const int kCFURLImproperArgumentsError = -15; + static const int kCFURLUnknownPropertyKeyError = -16; + static const int kCFURLPropertyKeyUnavailableError = -17; + static const int kCFURLTimeoutError = -18; } -typedef CE_NameRegistrationAuthorities = CE_GeneralNames; +final class __CFUUID extends ffi.Opaque {} -class __CE_QC_Statement extends ffi.Struct { - external SecAsn1Oid statementId; +final class CFUUIDBytes extends ffi.Struct { + @UInt8() + external int byte0; - external ffi.Pointer semanticsInfo; + @UInt8() + external int byte1; - external ffi.Pointer otherInfo; -} + @UInt8() + external int byte2; -typedef CE_SemanticsInformation = __CE_SemanticsInformation; + @UInt8() + external int byte3; -class __CE_QC_Statements extends ffi.Struct { - @uint32() - external int numQCStatements; + @UInt8() + external int byte4; - external ffi.Pointer qcStatements; -} + @UInt8() + external int byte5; -typedef CE_QC_Statement = __CE_QC_Statement; + @UInt8() + external int byte6; -class __CE_IssuingDistributionPoint extends ffi.Struct { - external ffi.Pointer distPointName; + @UInt8() + external int byte7; - @CSSM_BOOL() - external int onlyUserCertsPresent; + @UInt8() + external int byte8; - @CSSM_BOOL() - external int onlyUserCerts; + @UInt8() + external int byte9; - @CSSM_BOOL() - external int onlyCACertsPresent; + @UInt8() + external int byte10; - @CSSM_BOOL() - external int onlyCACerts; + @UInt8() + external int byte11; - @CSSM_BOOL() - external int onlySomeReasonsPresent; + @UInt8() + external int byte12; - @CE_CrlDistReasonFlags() - external int onlySomeReasons; + @UInt8() + external int byte13; - @CSSM_BOOL() - external int indirectCrlPresent; + @UInt8() + external int byte14; - @CSSM_BOOL() - external int indirectCrl; + @UInt8() + external int byte15; } -class __CE_GeneralSubtree extends ffi.Struct { - external ffi.Pointer base; +typedef CFUUIDRef = ffi.Pointer<__CFUUID>; - @uint32() - external int minimum; +final class __CFBundle extends ffi.Opaque {} - @CSSM_BOOL() - external int maximumPresent; +typedef CFBundleRef = ffi.Pointer<__CFBundle>; +typedef cpu_type_t = integer_t; +typedef CFPlugInRef = ffi.Pointer<__CFBundle>; +typedef CFBundleRefNum = ffi.Int; - @uint32() - external int maximum; -} +final class __CFMessagePort extends ffi.Opaque {} -class __CE_GeneralSubtrees extends ffi.Struct { - @uint32() - external int numSubtrees; +final class CFMessagePortContext extends ffi.Struct { + @CFIndex() + external int version; - external ffi.Pointer subtrees; -} + external ffi.Pointer info; -typedef CE_GeneralSubtree = __CE_GeneralSubtree; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; -class __CE_NameConstraints extends ffi.Struct { - external ffi.Pointer permitted; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - external ffi.Pointer excluded; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -typedef CE_GeneralSubtrees = __CE_GeneralSubtrees; - -class __CE_PolicyMapping extends ffi.Struct { - external SecAsn1Oid issuerDomainPolicy; +typedef CFMessagePortRef = ffi.Pointer<__CFMessagePort>; +typedef CFMessagePortCallBack = ffi.Pointer< + ffi.NativeFunction< + CFDataRef Function(CFMessagePortRef local, SInt32 msgid, CFDataRef data, + ffi.Pointer info)>>; +typedef CFMessagePortInvalidationCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFMessagePortRef ms, ffi.Pointer info)>>; +typedef CFPlugInFactoryFunction = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFAllocatorRef allocator, CFUUIDRef typeUUID)>>; - external SecAsn1Oid subjectDomainPolicy; -} +final class __CFPlugInInstance extends ffi.Opaque {} -class __CE_PolicyMappings extends ffi.Struct { - @uint32() - external int numPolicyMappings; +typedef CFPlugInInstanceRef = ffi.Pointer<__CFPlugInInstance>; +typedef CFPlugInInstanceDeallocateInstanceDataFunction = ffi.Pointer< + ffi.NativeFunction instanceData)>>; +typedef CFPlugInInstanceGetInterfaceFunction = ffi.Pointer< + ffi.NativeFunction< + Boolean Function( + CFPlugInInstanceRef instance, + CFStringRef interfaceName, + ffi.Pointer> ftbl)>>; - external ffi.Pointer policyMappings; -} +final class __CFMachPort extends ffi.Opaque {} -typedef CE_PolicyMapping = __CE_PolicyMapping; +final class CFMachPortContext extends ffi.Struct { + @CFIndex() + external int version; -class __CE_PolicyConstraints extends ffi.Struct { - @CSSM_BOOL() - external int requireExplicitPolicyPresent; + external ffi.Pointer info; - @uint32() - external int requireExplicitPolicy; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - @CSSM_BOOL() - external int inhibitPolicyMappingPresent; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - @uint32() - external int inhibitPolicyMapping; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -abstract class __CE_DataType { - static const int DT_AuthorityKeyID = 0; - static const int DT_SubjectKeyID = 1; - static const int DT_KeyUsage = 2; - static const int DT_SubjectAltName = 3; - static const int DT_IssuerAltName = 4; - static const int DT_ExtendedKeyUsage = 5; - static const int DT_BasicConstraints = 6; - static const int DT_CertPolicies = 7; - static const int DT_NetscapeCertType = 8; - static const int DT_CrlNumber = 9; - static const int DT_DeltaCrl = 10; - static const int DT_CrlReason = 11; - static const int DT_CrlDistributionPoints = 12; - static const int DT_IssuingDistributionPoint = 13; - static const int DT_AuthorityInfoAccess = 14; - static const int DT_Other = 15; - static const int DT_QC_Statements = 16; - static const int DT_NameConstraints = 17; - static const int DT_PolicyMappings = 18; - static const int DT_PolicyConstraints = 19; - static const int DT_InhibitAnyPolicy = 20; -} +typedef CFMachPortRef = ffi.Pointer<__CFMachPort>; +typedef CFMachPortCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFMachPortRef port, ffi.Pointer msg, + CFIndex size, ffi.Pointer info)>>; +typedef CFMachPortInvalidationCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFMachPortRef port, ffi.Pointer info)>>; -class CE_Data extends ffi.Union { - external CE_AuthorityKeyID authorityKeyID; +final class __CFAttributedString extends ffi.Opaque {} - external CE_SubjectKeyID subjectKeyID; +typedef CFAttributedStringRef = ffi.Pointer<__CFAttributedString>; +typedef CFMutableAttributedStringRef = ffi.Pointer<__CFAttributedString>; - @CE_KeyUsage() - external int keyUsage; +final class __CFURLEnumerator extends ffi.Opaque {} - external CE_GeneralNames subjectAltName; +abstract class CFURLEnumeratorOptions { + static const int kCFURLEnumeratorDefaultBehavior = 0; + static const int kCFURLEnumeratorDescendRecursively = 1; + static const int kCFURLEnumeratorSkipInvisibles = 2; + static const int kCFURLEnumeratorGenerateFileReferenceURLs = 4; + static const int kCFURLEnumeratorSkipPackageContents = 8; + static const int kCFURLEnumeratorIncludeDirectoriesPreOrder = 16; + static const int kCFURLEnumeratorIncludeDirectoriesPostOrder = 32; + static const int kCFURLEnumeratorGenerateRelativePathURLs = 64; +} - external CE_GeneralNames issuerAltName; +typedef CFURLEnumeratorRef = ffi.Pointer<__CFURLEnumerator>; - external CE_ExtendedKeyUsage extendedKeyUsage; +abstract class CFURLEnumeratorResult { + static const int kCFURLEnumeratorSuccess = 1; + static const int kCFURLEnumeratorEnd = 2; + static const int kCFURLEnumeratorError = 3; + static const int kCFURLEnumeratorDirectoryPostOrderSuccess = 4; +} - external CE_BasicConstraints basicConstraints; +final class guid_t extends ffi.Union { + @ffi.Array.multi([16]) + external ffi.Array g_guid; - external CE_CertPolicies certPolicies; + @ffi.Array.multi([4]) + external ffi.Array g_guid_asint; +} - @CE_NetscapeCertType() - external int netscapeCertType; +@ffi.Packed(1) +final class ntsid_t extends ffi.Struct { + @u_int8_t() + external int sid_kind; - @CE_CrlNumber() - external int crlNumber; + @u_int8_t() + external int sid_authcount; - @CE_DeltaCrl() - external int deltaCrl; + @ffi.Array.multi([6]) + external ffi.Array sid_authority; - @CE_CrlReason() - external int crlReason; + @ffi.Array.multi([16]) + external ffi.Array sid_authorities; +} - external CE_CRLDistPointsSyntax crlDistPoints; +typedef u_int8_t = ffi.UnsignedChar; +typedef u_int32_t = ffi.UnsignedInt; - external CE_IssuingDistributionPoint issuingDistPoint; +final class kauth_identity_extlookup extends ffi.Struct { + @u_int32_t() + external int el_seqno; - external CE_AuthorityInfoAccess authorityInfoAccess; + @u_int32_t() + external int el_result; - external CE_QC_Statements qualifiedCertStatements; + @u_int32_t() + external int el_flags; - external CE_NameConstraints nameConstraints; + @__darwin_pid_t() + external int el_info_pid; - external CE_PolicyMappings policyMappings; + @u_int64_t() + external int el_extend; - external CE_PolicyConstraints policyConstraints; + @u_int32_t() + external int el_info_reserved_1; - @CE_InhibitAnyPolicy() - external int inhibitAnyPolicy; + @uid_t() + external int el_uid; - external SecAsn1Item rawData; -} + external guid_t el_uguid; -typedef CE_AuthorityKeyID = __CE_AuthorityKeyID; -typedef CE_SubjectKeyID = SecAsn1Item; -typedef CE_KeyUsage = uint16; -typedef CE_ExtendedKeyUsage = __CE_ExtendedKeyUsage; -typedef CE_BasicConstraints = __CE_BasicConstraints; -typedef CE_CertPolicies = __CE_CertPolicies; -typedef CE_NetscapeCertType = uint16; -typedef CE_CrlNumber = uint32; -typedef CE_DeltaCrl = uint32; -typedef CE_CrlReason = uint32; -typedef CE_CRLDistPointsSyntax = __CE_CRLDistPointsSyntax; -typedef CE_IssuingDistributionPoint = __CE_IssuingDistributionPoint; -typedef CE_AuthorityInfoAccess = __CE_AuthorityInfoAccess; -typedef CE_QC_Statements = __CE_QC_Statements; -typedef CE_NameConstraints = __CE_NameConstraints; -typedef CE_PolicyMappings = __CE_PolicyMappings; -typedef CE_PolicyConstraints = __CE_PolicyConstraints; -typedef CE_InhibitAnyPolicy = uint32; + @u_int32_t() + external int el_uguid_valid; -class __CE_DataAndType extends ffi.Struct { - @ffi.Int32() - external int type; + external ntsid_t el_usid; - external CE_Data extension1; + @u_int32_t() + external int el_usid_valid; - @CSSM_BOOL() - external int critical; -} + @gid_t() + external int el_gid; -class cssm_acl_process_subject_selector extends ffi.Struct { - @uint16() - external int version; + external guid_t el_gguid; - @uint16() - external int mask; + @u_int32_t() + external int el_gguid_valid; - @uint32() - external int uid; + external ntsid_t el_gsid; - @uint32() - external int gid; -} + @u_int32_t() + external int el_gsid_valid; -class cssm_acl_keychain_prompt_selector extends ffi.Struct { - @uint16() - external int version; + @u_int32_t() + external int el_member_valid; - @uint16() - external int flags; -} + @u_int32_t() + external int el_sup_grp_cnt; -abstract class cssm_appledl_open_parameters_mask { - static const int kCSSM_APPLEDL_MASK_MODE = 1; + @ffi.Array.multi([16]) + external ffi.Array el_sup_groups; } -class cssm_appledl_open_parameters extends ffi.Struct { - @uint32() - external int length; - - @uint32() - external int version; - - @CSSM_BOOL() - external int autoCommit; +typedef u_int64_t = ffi.UnsignedLongLong; - @uint32() - external int mask; +final class kauth_cache_sizes extends ffi.Struct { + @u_int32_t() + external int kcs_group_size; - @mode_t() - external int mode; + @u_int32_t() + external int kcs_id_size; } -class cssm_applecspdl_db_settings_parameters extends ffi.Struct { - @uint32() - external int idleTimeout; +final class kauth_ace extends ffi.Struct { + external guid_t ace_applicable; - @uint8() - external int lockOnSleep; -} + @u_int32_t() + external int ace_flags; -class cssm_applecspdl_db_is_locked_parameters extends ffi.Struct { - @uint8() - external int isLocked; + @kauth_ace_rights_t() + external int ace_rights; } -class cssm_applecspdl_db_change_password_parameters extends ffi.Struct { - external ffi.Pointer accessCredentials; -} +typedef kauth_ace_rights_t = u_int32_t; -typedef CSSM_ACCESS_CREDENTIALS = cssm_access_credentials; +final class kauth_acl extends ffi.Struct { + @u_int32_t() + external int acl_entrycount; -class CSSM_APPLE_TP_NAME_OID extends ffi.Struct { - external ffi.Pointer string; + @u_int32_t() + external int acl_flags; - external ffi.Pointer oid; + @ffi.Array.multi([1]) + external ffi.Array acl_ace; } -class CSSM_APPLE_TP_CERT_REQUEST extends ffi.Struct { - @CSSM_CSP_HANDLE() - external int cspHand; - - @CSSM_CL_HANDLE() - external int clHand; - - @uint32() - external int serialNumber; - - @uint32() - external int numSubjectNames; - - external ffi.Pointer subjectNames; - - @uint32() - external int numIssuerNames; - - external ffi.Pointer issuerNames; - - external CSSM_X509_NAME_PTR issuerNameX509; - - external ffi.Pointer certPublicKey; - - external ffi.Pointer issuerPrivateKey; - - @CSSM_ALGORITHMS() - external int signatureAlg; - - external SecAsn1Oid signatureOid; - - @uint32() - external int notBefore; - - @uint32() - external int notAfter; +final class kauth_filesec extends ffi.Struct { + @u_int32_t() + external int fsec_magic; - @uint32() - external int numExtensions; + external guid_t fsec_owner; - external ffi.Pointer extensions; + external guid_t fsec_group; - external ffi.Pointer challengeString; + external kauth_acl fsec_acl; } -typedef CSSM_X509_NAME_PTR = ffi.Pointer; -typedef CSSM_KEY = cssm_key; -typedef CE_DataAndType = __CE_DataAndType; - -class CSSM_APPLE_TP_SSL_OPTIONS extends ffi.Struct { - @uint32() - external int Version; - - @uint32() - external int ServerNameLen; - - external ffi.Pointer ServerName; - - @uint32() - external int Flags; +abstract class acl_perm_t { + static const int ACL_READ_DATA = 2; + static const int ACL_LIST_DIRECTORY = 2; + static const int ACL_WRITE_DATA = 4; + static const int ACL_ADD_FILE = 4; + static const int ACL_EXECUTE = 8; + static const int ACL_SEARCH = 8; + static const int ACL_DELETE = 16; + static const int ACL_APPEND_DATA = 32; + static const int ACL_ADD_SUBDIRECTORY = 32; + static const int ACL_DELETE_CHILD = 64; + static const int ACL_READ_ATTRIBUTES = 128; + static const int ACL_WRITE_ATTRIBUTES = 256; + static const int ACL_READ_EXTATTRIBUTES = 512; + static const int ACL_WRITE_EXTATTRIBUTES = 1024; + static const int ACL_READ_SECURITY = 2048; + static const int ACL_WRITE_SECURITY = 4096; + static const int ACL_CHANGE_OWNER = 8192; + static const int ACL_SYNCHRONIZE = 1048576; } -class CSSM_APPLE_TP_CRL_OPTIONS extends ffi.Struct { - @uint32() - external int Version; - - @CSSM_APPLE_TP_CRL_OPT_FLAGS() - external int CrlFlags; - - external CSSM_DL_DB_HANDLE_PTR crlStore; +abstract class acl_tag_t { + static const int ACL_UNDEFINED_TAG = 0; + static const int ACL_EXTENDED_ALLOW = 1; + static const int ACL_EXTENDED_DENY = 2; } -typedef CSSM_APPLE_TP_CRL_OPT_FLAGS = uint32; - -class CSSM_APPLE_TP_SMIME_OPTIONS extends ffi.Struct { - @uint32() - external int Version; - - @CE_KeyUsage() - external int IntendedUsage; - - @uint32() - external int SenderEmailLen; - - external ffi.Pointer SenderEmail; +abstract class acl_type_t { + static const int ACL_TYPE_EXTENDED = 256; + static const int ACL_TYPE_ACCESS = 0; + static const int ACL_TYPE_DEFAULT = 1; + static const int ACL_TYPE_AFS = 2; + static const int ACL_TYPE_CODA = 3; + static const int ACL_TYPE_NTFS = 4; + static const int ACL_TYPE_NWFS = 5; } -class CSSM_APPLE_TP_ACTION_DATA extends ffi.Struct { - @uint32() - external int Version; +abstract class acl_entry_id_t { + static const int ACL_FIRST_ENTRY = 0; + static const int ACL_NEXT_ENTRY = -1; + static const int ACL_LAST_ENTRY = -2; +} - @CSSM_APPLE_TP_ACTION_FLAGS() - external int ActionFlags; +abstract class acl_flag_t { + static const int ACL_FLAG_DEFER_INHERIT = 1; + static const int ACL_FLAG_NO_INHERIT = 131072; + static const int ACL_ENTRY_INHERITED = 16; + static const int ACL_ENTRY_FILE_INHERIT = 32; + static const int ACL_ENTRY_DIRECTORY_INHERIT = 64; + static const int ACL_ENTRY_LIMIT_INHERIT = 128; + static const int ACL_ENTRY_ONLY_INHERIT = 256; } -typedef CSSM_APPLE_TP_ACTION_FLAGS = uint32; +final class _acl extends ffi.Opaque {} -class CSSM_TP_APPLE_EVIDENCE_INFO extends ffi.Struct { - @CSSM_TP_APPLE_CERT_STATUS() - external int StatusBits; +final class _acl_entry extends ffi.Opaque {} - @uint32() - external int NumStatusCodes; +final class _acl_permset extends ffi.Opaque {} - external ffi.Pointer StatusCodes; +final class _acl_flagset extends ffi.Opaque {} - @uint32() - external int Index; +typedef acl_t = ffi.Pointer<_acl>; +typedef acl_entry_t = ffi.Pointer<_acl_entry>; +typedef acl_permset_t = ffi.Pointer<_acl_permset>; +typedef acl_permset_mask_t = u_int64_t; +typedef acl_flagset_t = ffi.Pointer<_acl_flagset>; - external CSSM_DL_DB_HANDLE DlDbHandle; +final class __CFFileSecurity extends ffi.Opaque {} - external CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord; +typedef CFFileSecurityRef = ffi.Pointer<__CFFileSecurity>; + +abstract class CFFileSecurityClearOptions { + static const int kCFFileSecurityClearOwner = 1; + static const int kCFFileSecurityClearGroup = 2; + static const int kCFFileSecurityClearMode = 4; + static const int kCFFileSecurityClearOwnerUUID = 8; + static const int kCFFileSecurityClearGroupUUID = 16; + static const int kCFFileSecurityClearAccessControlList = 32; } -typedef CSSM_TP_APPLE_CERT_STATUS = uint32; -typedef CSSM_DL_DB_HANDLE = cssm_dl_db_handle; -typedef CSSM_DB_UNIQUE_RECORD_PTR = ffi.Pointer; +final class __CFStringTokenizer extends ffi.Opaque {} -class CSSM_TP_APPLE_EVIDENCE_HEADER extends ffi.Struct { - @uint32() - external int Version; +abstract class CFStringTokenizerTokenType { + static const int kCFStringTokenizerTokenNone = 0; + static const int kCFStringTokenizerTokenNormal = 1; + static const int kCFStringTokenizerTokenHasSubTokensMask = 2; + static const int kCFStringTokenizerTokenHasDerivedSubTokensMask = 4; + static const int kCFStringTokenizerTokenHasHasNumbersMask = 8; + static const int kCFStringTokenizerTokenHasNonLettersMask = 16; + static const int kCFStringTokenizerTokenIsCJWordMask = 32; } -class CSSM_APPLE_CL_CSR_REQUEST extends ffi.Struct { - external CSSM_X509_NAME_PTR subjectNameX509; +typedef CFStringTokenizerRef = ffi.Pointer<__CFStringTokenizer>; - @CSSM_ALGORITHMS() - external int signatureAlg; +final class __CFFileDescriptor extends ffi.Opaque {} - external SecAsn1Oid signatureOid; +final class CFFileDescriptorContext extends ffi.Struct { + @CFIndex() + external int version; - @CSSM_CSP_HANDLE() - external int cspHand; + external ffi.Pointer info; - external ffi.Pointer subjectPublicKey; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - external ffi.Pointer subjectPrivateKey; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - external ffi.Pointer challengeString; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -abstract class SecTrustOptionFlags { - static const int kSecTrustOptionAllowExpired = 1; - static const int kSecTrustOptionLeafIsCA = 2; - static const int kSecTrustOptionFetchIssuerFromNet = 4; - static const int kSecTrustOptionAllowExpiredRoot = 8; - static const int kSecTrustOptionRequireRevPerCert = 16; - static const int kSecTrustOptionUseTrustSettings = 32; - static const int kSecTrustOptionImplicitAnchors = 64; -} +typedef CFFileDescriptorRef = ffi.Pointer<__CFFileDescriptor>; +typedef CFFileDescriptorNativeDescriptor = ffi.Int; +typedef CFFileDescriptorCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFFileDescriptorRef f, CFOptionFlags callBackTypes, + ffi.Pointer info)>>; -typedef CSSM_TP_VERIFY_CONTEXT_RESULT_PTR - = ffi.Pointer; -typedef SecKeychainRef = ffi.Pointer<__SecKeychain>; +final class __CFUserNotification extends ffi.Opaque {} -abstract class SecKeyUsage { - static const int kSecKeyUsageUnspecified = 0; - static const int kSecKeyUsageDigitalSignature = 1; - static const int kSecKeyUsageNonRepudiation = 2; - static const int kSecKeyUsageContentCommitment = 2; - static const int kSecKeyUsageKeyEncipherment = 4; - static const int kSecKeyUsageDataEncipherment = 8; - static const int kSecKeyUsageKeyAgreement = 16; - static const int kSecKeyUsageKeyCertSign = 32; - static const int kSecKeyUsageCRLSign = 64; - static const int kSecKeyUsageEncipherOnly = 128; - static const int kSecKeyUsageDecipherOnly = 256; - static const int kSecKeyUsageCritical = -2147483648; - static const int kSecKeyUsageAll = 2147483647; -} +typedef CFUserNotificationRef = ffi.Pointer<__CFUserNotification>; +typedef CFUserNotificationCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFUserNotificationRef userNotification, + CFOptionFlags responseFlags)>>; -typedef SecIdentityRef = ffi.Pointer<__SecIdentity>; +final class __CFXMLNode extends ffi.Opaque {} -abstract class SSLCiphersuiteGroup { - static const int kSSLCiphersuiteGroupDefault = 0; - static const int kSSLCiphersuiteGroupCompatibility = 1; - static const int kSSLCiphersuiteGroupLegacy = 2; - static const int kSSLCiphersuiteGroupATS = 3; - static const int kSSLCiphersuiteGroupATSCompatibility = 4; +abstract class CFXMLNodeTypeCode { + static const int kCFXMLNodeTypeDocument = 1; + static const int kCFXMLNodeTypeElement = 2; + static const int kCFXMLNodeTypeAttribute = 3; + static const int kCFXMLNodeTypeProcessingInstruction = 4; + static const int kCFXMLNodeTypeComment = 5; + static const int kCFXMLNodeTypeText = 6; + static const int kCFXMLNodeTypeCDATASection = 7; + static const int kCFXMLNodeTypeDocumentFragment = 8; + static const int kCFXMLNodeTypeEntity = 9; + static const int kCFXMLNodeTypeEntityReference = 10; + static const int kCFXMLNodeTypeDocumentType = 11; + static const int kCFXMLNodeTypeWhitespace = 12; + static const int kCFXMLNodeTypeNotation = 13; + static const int kCFXMLNodeTypeElementTypeDeclaration = 14; + static const int kCFXMLNodeTypeAttributeListDeclaration = 15; } -abstract class tls_protocol_version_t { - static const int tls_protocol_version_TLSv10 = 769; - static const int tls_protocol_version_TLSv11 = 770; - static const int tls_protocol_version_TLSv12 = 771; - static const int tls_protocol_version_TLSv13 = 772; - static const int tls_protocol_version_DTLSv10 = -257; - static const int tls_protocol_version_DTLSv12 = -259; -} +final class CFXMLElementInfo extends ffi.Struct { + external CFDictionaryRef attributes; -abstract class tls_ciphersuite_t { - static const int tls_ciphersuite_RSA_WITH_3DES_EDE_CBC_SHA = 10; - static const int tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA = 47; - static const int tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA = 53; - static const int tls_ciphersuite_RSA_WITH_AES_128_GCM_SHA256 = 156; - static const int tls_ciphersuite_RSA_WITH_AES_256_GCM_SHA384 = 157; - static const int tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA256 = 60; - static const int tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA256 = 61; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; - static const int tls_ciphersuite_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; - static const int tls_ciphersuite_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = - -13144; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = - -13143; - static const int tls_ciphersuite_AES_128_GCM_SHA256 = 4865; - static const int tls_ciphersuite_AES_256_GCM_SHA384 = 4866; - static const int tls_ciphersuite_CHACHA20_POLY1305_SHA256 = 4867; -} + external CFArrayRef attributeOrder; -abstract class tls_ciphersuite_group_t { - static const int tls_ciphersuite_group_default = 0; - static const int tls_ciphersuite_group_compatibility = 1; - static const int tls_ciphersuite_group_legacy = 2; - static const int tls_ciphersuite_group_ats = 3; - static const int tls_ciphersuite_group_ats_compatibility = 4; -} + @Boolean() + external int isEmpty; -abstract class SSLProtocol { - static const int kSSLProtocolUnknown = 0; - static const int kTLSProtocol1 = 4; - static const int kTLSProtocol11 = 7; - static const int kTLSProtocol12 = 8; - static const int kDTLSProtocol1 = 9; - static const int kTLSProtocol13 = 10; - static const int kDTLSProtocol12 = 11; - static const int kTLSProtocolMaxSupported = 999; - static const int kSSLProtocol2 = 1; - static const int kSSLProtocol3 = 2; - static const int kSSLProtocol3Only = 3; - static const int kTLSProtocol1Only = 5; - static const int kSSLProtocolAll = 6; + @ffi.Array.multi([3]) + external ffi.Array _reserved; } -typedef sec_trust_t = ffi.Pointer; -typedef sec_identity_t = ffi.Pointer; -void _ObjCBlock30_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); +final class CFXMLProcessingInstructionInfo extends ffi.Struct { + external CFStringRef dataString; } -final _ObjCBlock30_closureRegistry = {}; -int _ObjCBlock30_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock30_registerClosure(Function fn) { - final id = ++_ObjCBlock30_closureRegistryIndex; - _ObjCBlock30_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +final class CFXMLDocumentInfo extends ffi.Struct { + external CFURLRef sourceURL; -void _ObjCBlock30_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { - return _ObjCBlock30_closureRegistry[block.ref.target.address]!(arg0); + @CFStringEncoding() + external int encoding; } -class ObjCBlock30 extends _ObjCBlockBase { - ObjCBlock30._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock30.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - sec_certificate_t arg0)>( - _ObjCBlock30_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock30.fromFunction( - NativeCupertinoHttp lib, void Function(sec_certificate_t arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - sec_certificate_t arg0)>( - _ObjCBlock30_closureTrampoline) - .cast(), - _ObjCBlock30_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(sec_certificate_t arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - sec_certificate_t arg0)>()(_id, arg0); - } +final class CFXMLExternalID extends ffi.Struct { + external CFURLRef systemID; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CFStringRef publicID; } -typedef sec_certificate_t = ffi.Pointer; -typedef sec_protocol_metadata_t = ffi.Pointer; -typedef SSLCipherSuite = ffi.Uint16; -void _ObjCBlock31_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); +final class CFXMLDocumentTypeInfo extends ffi.Struct { + external CFXMLExternalID externalID; } -final _ObjCBlock31_closureRegistry = {}; -int _ObjCBlock31_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock31_registerClosure(Function fn) { - final id = ++_ObjCBlock31_closureRegistryIndex; - _ObjCBlock31_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +final class CFXMLNotationInfo extends ffi.Struct { + external CFXMLExternalID externalID; } -void _ObjCBlock31_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock31_closureRegistry[block.ref.target.address]!(arg0); +final class CFXMLElementTypeDeclarationInfo extends ffi.Struct { + external CFStringRef contentDescription; } -class ObjCBlock31 extends _ObjCBlockBase { - ObjCBlock31._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock31.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Uint16 arg0)>(_ObjCBlock31_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class CFXMLAttributeDeclarationInfo extends ffi.Struct { + external CFStringRef attributeName; - /// Creates a block from a Dart function. - ObjCBlock31.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Uint16 arg0)>(_ObjCBlock31_closureTrampoline) - .cast(), - _ObjCBlock31_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Uint16 arg0)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); - } + external CFStringRef typeString; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CFStringRef defaultString; } -void _ObjCBlock32_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, dispatch_data_t arg1)>>() - .asFunction< - void Function( - dispatch_data_t arg0, dispatch_data_t arg1)>()(arg0, arg1); -} +final class CFXMLAttributeListDeclarationInfo extends ffi.Struct { + @CFIndex() + external int numberOfAttributes; -final _ObjCBlock32_closureRegistry = {}; -int _ObjCBlock32_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock32_registerClosure(Function fn) { - final id = ++_ObjCBlock32_closureRegistryIndex; - _ObjCBlock32_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + external ffi.Pointer attributes; } -void _ObjCBlock32_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { - return _ObjCBlock32_closureRegistry[block.ref.target.address]!(arg0, arg1); +abstract class CFXMLEntityTypeCode { + static const int kCFXMLEntityTypeParameter = 0; + static const int kCFXMLEntityTypeParsedInternal = 1; + static const int kCFXMLEntityTypeParsedExternal = 2; + static const int kCFXMLEntityTypeUnparsed = 3; + static const int kCFXMLEntityTypeCharacter = 4; } -class ObjCBlock32 extends _ObjCBlockBase { - ObjCBlock32._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock32.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - dispatch_data_t arg0, dispatch_data_t arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - dispatch_data_t arg1)>(_ObjCBlock32_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock32.fromFunction(NativeCupertinoHttp lib, - void Function(dispatch_data_t arg0, dispatch_data_t arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, dispatch_data_t arg1)>( - _ObjCBlock32_closureTrampoline) - .cast(), - _ObjCBlock32_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(dispatch_data_t arg0, dispatch_data_t arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, dispatch_data_t arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, - dispatch_data_t arg1)>()(_id, arg0, arg1); - } +final class CFXMLEntityInfo extends ffi.Struct { + @ffi.Int32() + external int entityType; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + external CFStringRef replacementText; -typedef sec_protocol_options_t = ffi.Pointer; -typedef sec_protocol_pre_shared_key_selection_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock33_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>>() - .asFunction< - void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>()( - arg0, arg1, arg2); -} + external CFXMLExternalID entityID; -final _ObjCBlock33_closureRegistry = {}; -int _ObjCBlock33_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock33_registerClosure(Function fn) { - final id = ++_ObjCBlock33_closureRegistryIndex; - _ObjCBlock33_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + external CFStringRef notationName; } -void _ObjCBlock33_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) { - return _ObjCBlock33_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +final class CFXMLEntityReferenceInfo extends ffi.Struct { + @ffi.Int32() + external int entityType; } -class ObjCBlock33 extends _ObjCBlockBase { - ObjCBlock33._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock33.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>(_ObjCBlock33_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock33.fromFunction( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>(_ObjCBlock33_closureTrampoline) - .cast(), - _ObjCBlock33_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(sec_protocol_metadata_t arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>()(_id, arg0, arg1, arg2); - } +typedef CFXMLNodeRef = ffi.Pointer<__CFXMLNode>; +typedef CFXMLTreeRef = CFTreeRef; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} +final class __CFXMLParser extends ffi.Opaque {} -typedef sec_protocol_pre_shared_key_selection_complete_t - = ffi.Pointer<_ObjCBlock>; -typedef sec_protocol_key_update_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock34_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>>() - .asFunction< - void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>()(arg0, arg1); +abstract class CFXMLParserOptions { + static const int kCFXMLParserValidateDocument = 1; + static const int kCFXMLParserSkipMetaData = 2; + static const int kCFXMLParserReplacePhysicalEntities = 4; + static const int kCFXMLParserSkipWhitespace = 8; + static const int kCFXMLParserResolveExternalEntities = 16; + static const int kCFXMLParserAddImpliedAttributes = 32; + static const int kCFXMLParserAllOptions = 16777215; + static const int kCFXMLParserNoOptions = 0; } -final _ObjCBlock34_closureRegistry = {}; -int _ObjCBlock34_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock34_registerClosure(Function fn) { - final id = ++_ObjCBlock34_closureRegistryIndex; - _ObjCBlock34_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +abstract class CFXMLParserStatusCode { + static const int kCFXMLStatusParseNotBegun = -2; + static const int kCFXMLStatusParseInProgress = -1; + static const int kCFXMLStatusParseSuccessful = 0; + static const int kCFXMLErrorUnexpectedEOF = 1; + static const int kCFXMLErrorUnknownEncoding = 2; + static const int kCFXMLErrorEncodingConversionFailure = 3; + static const int kCFXMLErrorMalformedProcessingInstruction = 4; + static const int kCFXMLErrorMalformedDTD = 5; + static const int kCFXMLErrorMalformedName = 6; + static const int kCFXMLErrorMalformedCDSect = 7; + static const int kCFXMLErrorMalformedCloseTag = 8; + static const int kCFXMLErrorMalformedStartTag = 9; + static const int kCFXMLErrorMalformedDocument = 10; + static const int kCFXMLErrorElementlessDocument = 11; + static const int kCFXMLErrorMalformedComment = 12; + static const int kCFXMLErrorMalformedCharacterReference = 13; + static const int kCFXMLErrorMalformedParsedCharacterData = 14; + static const int kCFXMLErrorNoData = 15; } -void _ObjCBlock34_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { - return _ObjCBlock34_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +final class CFXMLParserCallBacks extends ffi.Struct { + @CFIndex() + external int version; -class ObjCBlock34 extends _ObjCBlockBase { - ObjCBlock34._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + external CFXMLParserCreateXMLStructureCallBack createXMLStructure; - /// Creates a block from a C function pointer. - ObjCBlock34.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>( - _ObjCBlock34_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CFXMLParserAddChildCallBack addChild; - /// Creates a block from a Dart function. - ObjCBlock34.fromFunction( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>( - _ObjCBlock34_closureTrampoline) - .cast(), - _ObjCBlock34_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>()(_id, arg0, arg1); - } + external CFXMLParserEndXMLStructureCallBack endXMLStructure; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + external CFXMLParserResolveExternalEntityCallBack resolveExternalEntity; -typedef sec_protocol_key_update_complete_t = ffi.Pointer<_ObjCBlock>; -typedef sec_protocol_challenge_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock35_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>>() - .asFunction< - void Function(sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>()(arg0, arg1); + external CFXMLParserHandleErrorCallBack handleError; } -final _ObjCBlock35_closureRegistry = {}; -int _ObjCBlock35_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock35_registerClosure(Function fn) { - final id = ++_ObjCBlock35_closureRegistryIndex; - _ObjCBlock35_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +typedef CFXMLParserCreateXMLStructureCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(CFXMLParserRef parser, + CFXMLNodeRef nodeDesc, ffi.Pointer info)>>; +typedef CFXMLParserRef = ffi.Pointer<__CFXMLParser>; +typedef CFXMLParserAddChildCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFXMLParserRef parser, ffi.Pointer parent, + ffi.Pointer child, ffi.Pointer info)>>; +typedef CFXMLParserEndXMLStructureCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(CFXMLParserRef parser, ffi.Pointer xmlType, + ffi.Pointer info)>>; +typedef CFXMLParserResolveExternalEntityCallBack = ffi.Pointer< + ffi.NativeFunction< + CFDataRef Function(CFXMLParserRef parser, + ffi.Pointer extID, ffi.Pointer info)>>; +typedef CFXMLParserHandleErrorCallBack = ffi.Pointer< + ffi.NativeFunction< + Boolean Function(CFXMLParserRef parser, ffi.Int32 error, + ffi.Pointer info)>>; -void _ObjCBlock35_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { - return _ObjCBlock35_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +final class CFXMLParserContext extends ffi.Struct { + @CFIndex() + external int version; -class ObjCBlock35 extends _ObjCBlockBase { - ObjCBlock35._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + external ffi.Pointer info; - /// Creates a block from a C function pointer. - ObjCBlock35.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>( - _ObjCBlock35_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CFXMLParserRetainCallBack retain; - /// Creates a block from a Dart function. - ObjCBlock35.fromFunction( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>( - _ObjCBlock35_closureTrampoline) - .cast(), - _ObjCBlock35_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>()(_id, arg0, arg1); - } + external CFXMLParserReleaseCallBack release; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CFXMLParserCopyDescriptionCallBack copyDescription; } -typedef sec_protocol_challenge_complete_t = ffi.Pointer<_ObjCBlock>; -typedef sec_protocol_verify_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock36_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) { +typedef CFXMLParserRetainCallBack = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>>; +typedef CFXMLParserReleaseCallBack = ffi + .Pointer info)>>; +typedef CFXMLParserCopyDescriptionCallBack = ffi.Pointer< + ffi.NativeFunction info)>>; + +abstract class SecTrustResultType { + static const int kSecTrustResultInvalid = 0; + static const int kSecTrustResultProceed = 1; + static const int kSecTrustResultConfirm = 2; + static const int kSecTrustResultDeny = 3; + static const int kSecTrustResultUnspecified = 4; + static const int kSecTrustResultRecoverableTrustFailure = 5; + static const int kSecTrustResultFatalTrustFailure = 6; + static const int kSecTrustResultOtherError = 7; +} + +final class __SecTrust extends ffi.Opaque {} + +typedef SecTrustRef = ffi.Pointer<__SecTrust>; +typedef SecTrustCallback = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock28_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { return block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>>() - .asFunction< - void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>()(arg0, arg1, arg2); + ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>>() + .asFunction()(arg0, arg1); } -final _ObjCBlock36_closureRegistry = {}; -int _ObjCBlock36_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock36_registerClosure(Function fn) { - final id = ++_ObjCBlock36_closureRegistryIndex; - _ObjCBlock36_closureRegistry[id] = fn; +final _ObjCBlock28_closureRegistry = {}; +int _ObjCBlock28_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock28_registerClosure(Function fn) { + final id = ++_ObjCBlock28_closureRegistryIndex; + _ObjCBlock28_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock36_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) { - return _ObjCBlock36_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +void _ObjCBlock28_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { + return _ObjCBlock28_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock36 extends _ObjCBlockBase { - ObjCBlock36._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock28 extends _ObjCBlockBase { + ObjCBlock28._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock36.fromFunctionPointer( + ObjCBlock28.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_trust_t arg1, sec_protocol_verify_complete_t arg2)>> + ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>> ptr) : this._( lib ._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>( - _ObjCBlock36_fnPtrTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + ffi.Int32 arg1)>(_ObjCBlock28_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock36.fromFunction( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) - fn) + ObjCBlock28.fromFunction( + NativeCupertinoHttp lib, void Function(SecTrustRef arg0, int arg1) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>( - _ObjCBlock36_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + ffi.Int32 arg1)>(_ObjCBlock28_closureTrampoline) .cast(), - _ObjCBlock36_registerClosure(fn)), + _ObjCBlock28_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) { + void call(SecTrustRef arg0, int arg1) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>>() + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, ffi.Int32 arg1)>>() .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>()(_id, arg0, arg1, arg2); + void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, + int arg1)>()(_id, arg0, arg1); } - - ffi.Pointer<_ObjCBlock> get pointer => _id; } -typedef sec_protocol_verify_complete_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock37_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { +typedef SecTrustWithErrorCallback = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock29_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, bool arg1, CFErrorRef arg2) { return block.ref.target - .cast>() - .asFunction()(arg0); + .cast< + ffi.NativeFunction< + ffi.Void Function( + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() + .asFunction< + void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2)>()( + arg0, arg1, arg2); } -final _ObjCBlock37_closureRegistry = {}; -int _ObjCBlock37_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock37_registerClosure(Function fn) { - final id = ++_ObjCBlock37_closureRegistryIndex; - _ObjCBlock37_closureRegistry[id] = fn; +final _ObjCBlock29_closureRegistry = {}; +int _ObjCBlock29_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock29_registerClosure(Function fn) { + final id = ++_ObjCBlock29_closureRegistryIndex; + _ObjCBlock29_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock37_closureTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { - return _ObjCBlock37_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock29_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, bool arg1, CFErrorRef arg2) { + return _ObjCBlock29_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); } -class ObjCBlock37 extends _ObjCBlockBase { - ObjCBlock37._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock29 extends _ObjCBlockBase { + ObjCBlock29._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock37.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) + ObjCBlock29.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>> + ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0)>(_ObjCBlock37_fnPtrTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + ffi.Bool arg1, + CFErrorRef arg2)>(_ObjCBlock29_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock37.fromFunction(NativeCupertinoHttp lib, void Function(bool arg0) fn) + ObjCBlock29.fromFunction(NativeCupertinoHttp lib, + void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0)>(_ObjCBlock37_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + ffi.Bool arg1, + CFErrorRef arg2)>(_ObjCBlock29_closureTrampoline) .cast(), - _ObjCBlock37_registerClosure(fn)), + _ObjCBlock29_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(bool arg0) { + void call(SecTrustRef arg0, bool arg1, CFErrorRef arg2) { return _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0)>>() + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, bool arg0)>()(_id, arg0); + void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, + bool arg1, CFErrorRef arg2)>()(_id, arg0, arg1, arg2); } +} - ffi.Pointer<_ObjCBlock> get pointer => _id; +typedef SecKeyRef = ffi.Pointer<__SecKey>; +typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; + +final class cssm_data extends ffi.Struct { + @ffi.Size() + external int Length; + + external ffi.Pointer Data; } -class SSLContext extends ffi.Opaque {} +final class SecAsn1AlgId extends ffi.Struct { + external SecAsn1Oid algorithm; -abstract class SSLSessionOption { - static const int kSSLSessionOptionBreakOnServerAuth = 0; - static const int kSSLSessionOptionBreakOnCertRequested = 1; - static const int kSSLSessionOptionBreakOnClientAuth = 2; - static const int kSSLSessionOptionFalseStart = 3; - static const int kSSLSessionOptionSendOneByteRecord = 4; - static const int kSSLSessionOptionAllowServerIdentityChange = 5; - static const int kSSLSessionOptionFallback = 6; - static const int kSSLSessionOptionBreakOnClientHello = 7; - static const int kSSLSessionOptionAllowRenegotiation = 8; - static const int kSSLSessionOptionEnableSessionTickets = 9; + external SecAsn1Item parameters; } -abstract class SSLSessionState { - static const int kSSLIdle = 0; - static const int kSSLHandshake = 1; - static const int kSSLConnected = 2; - static const int kSSLClosed = 3; - static const int kSSLAborted = 4; +typedef SecAsn1Oid = cssm_data; +typedef SecAsn1Item = cssm_data; + +final class SecAsn1PubKeyInfo extends ffi.Struct { + external SecAsn1AlgId algorithm; + + external SecAsn1Item subjectPublicKey; } -abstract class SSLClientCertificateState { - static const int kSSLClientCertNone = 0; - static const int kSSLClientCertRequested = 1; - static const int kSSLClientCertSent = 2; - static const int kSSLClientCertRejected = 3; +final class SecAsn1Template_struct extends ffi.Struct { + @ffi.Uint32() + external int kind; + + @ffi.Uint32() + external int offset; + + external ffi.Pointer sub; + + @ffi.Uint32() + external int size; } -abstract class SSLProtocolSide { - static const int kSSLServerSide = 0; - static const int kSSLClientSide = 1; +final class cssm_guid extends ffi.Struct { + @uint32() + external int Data1; + + @uint16() + external int Data2; + + @uint16() + external int Data3; + + @ffi.Array.multi([8]) + external ffi.Array Data4; } -abstract class SSLConnectionType { - static const int kSSLStreamType = 0; - static const int kSSLDatagramType = 1; +typedef uint32 = ffi.Uint32; +typedef uint16 = ffi.Uint16; +typedef uint8 = ffi.Uint8; + +final class cssm_version extends ffi.Struct { + @uint32() + external int Major; + + @uint32() + external int Minor; } -typedef SSLContextRef = ffi.Pointer; -typedef SSLReadFunc = ffi.Pointer< - ffi.NativeFunction< - OSStatus Function( - SSLConnectionRef, ffi.Pointer, ffi.Pointer)>>; -typedef SSLConnectionRef = ffi.Pointer; -typedef SSLWriteFunc = ffi.Pointer< - ffi.NativeFunction< - OSStatus Function( - SSLConnectionRef, ffi.Pointer, ffi.Pointer)>>; +final class cssm_subservice_uid extends ffi.Struct { + external CSSM_GUID Guid; -abstract class SSLAuthenticate { - static const int kNeverAuthenticate = 0; - static const int kAlwaysAuthenticate = 1; - static const int kTryAuthenticate = 2; + external CSSM_VERSION Version; + + @uint32() + external int SubserviceId; + + @CSSM_SERVICE_TYPE() + external int SubserviceType; } -/// NSURLSession is a replacement API for NSURLConnection. It provides -/// options that affect the policy of, and various aspects of the -/// mechanism by which NSURLRequest objects are retrieved from the -/// network. -/// -/// An NSURLSession may be bound to a delegate object. The delegate is -/// invoked for certain events during the lifetime of a session, such as -/// server authentication or determining whether a resource to be loaded -/// should be converted into a download. -/// -/// NSURLSession instances are threadsafe. -/// -/// The default NSURLSession uses a system provided delegate and is -/// appropriate to use in place of existing code that uses -/// +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] -/// -/// An NSURLSession creates NSURLSessionTask objects which represent the -/// action of a resource being loaded. These are analogous to -/// NSURLConnection objects but provide for more control and a unified -/// delegate model. -/// -/// NSURLSessionTask objects are always created in a suspended state and -/// must be sent the -resume message before they will execute. -/// -/// Subclasses of NSURLSessionTask are used to syntactically -/// differentiate between data and file downloads. -/// -/// An NSURLSessionDataTask receives the resource as a series of calls to -/// the URLSession:dataTask:didReceiveData: delegate method. This is type of -/// task most commonly associated with retrieving objects for immediate parsing -/// by the consumer. -/// -/// An NSURLSessionUploadTask differs from an NSURLSessionDataTask -/// in how its instance is constructed. Upload tasks are explicitly created -/// by referencing a file or data object to upload, or by utilizing the -/// -URLSession:task:needNewBodyStream: delegate message to supply an upload -/// body. -/// -/// An NSURLSessionDownloadTask will directly write the response data to -/// a temporary file. When completed, the delegate is sent -/// URLSession:downloadTask:didFinishDownloadingToURL: and given an opportunity -/// to move this file to a permanent location in its sandboxed container, or to -/// otherwise read the file. If canceled, an NSURLSessionDownloadTask can -/// produce a data blob that can be used to resume a download at a later -/// time. -/// -/// Beginning with iOS 9 and Mac OS X 10.11, NSURLSessionStream is -/// available as a task type. This allows for direct TCP/IP connection -/// to a given host and port with optional secure handshaking and -/// navigation of proxies. Data tasks may also be upgraded to a -/// NSURLSessionStream task via the HTTP Upgrade: header and appropriate -/// use of the pipelining option of NSURLSessionConfiguration. See RFC -/// 2817 and RFC 6455 for information about the Upgrade: header, and -/// comments below on turning data tasks into stream tasks. -/// -/// An NSURLSessionWebSocketTask is a task that allows clients to connect to servers supporting -/// WebSocket. The task will perform the HTTP handshake to upgrade the connection -/// and once the WebSocket handshake is successful, the client can read and write -/// messages that will be framed using the WebSocket protocol by the framework. -class NSURLSession extends NSObject { - NSURLSession._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_GUID = cssm_guid; +typedef CSSM_VERSION = cssm_version; +typedef CSSM_SERVICE_TYPE = CSSM_SERVICE_MASK; +typedef CSSM_SERVICE_MASK = uint32; + +final class cssm_net_address extends ffi.Struct { + @CSSM_NET_ADDRESS_TYPE() + external int AddressType; - /// Returns a [NSURLSession] that points to the same underlying object as [other]. - static NSURLSession castFrom(T other) { - return NSURLSession._(other._id, other._lib, retain: true, release: true); - } + external SecAsn1Item Address; +} - /// Returns a [NSURLSession] that wraps the given raw object pointer. - static NSURLSession castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSession._(other, lib, retain: retain, release: release); - } +typedef CSSM_NET_ADDRESS_TYPE = uint32; - /// Returns whether [obj] is an instance of [NSURLSession]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLSession1); - } +final class cssm_crypto_data extends ffi.Struct { + external SecAsn1Item Param; - /// The shared session uses the currently set global NSURLCache, - /// NSHTTPCookieStorage and NSURLCredentialStorage objects. - static NSURLSession? getSharedSession(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_380( - _lib._class_NSURLSession1, _lib._sel_sharedSession1); - return _ret.address == 0 - ? null - : NSURLSession._(_ret, _lib, retain: true, release: true); - } + external CSSM_CALLBACK Callback; - /// Customization of NSURLSession occurs during creation of a new session. - /// If you only need to use the convenience routines with custom - /// configuration options it is not necessary to specify a delegate. - /// If you do specify a delegate, the delegate will be retained until after - /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. - static NSURLSession sessionWithConfiguration_( - NativeCupertinoHttp _lib, NSURLSessionConfiguration? configuration) { - final _ret = _lib._objc_msgSend_395( - _lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_1, - configuration?._id ?? ffi.nullptr); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer CallerCtx; +} - static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( - NativeCupertinoHttp _lib, - NSURLSessionConfiguration? configuration, - NSObject? delegate, - NSOperationQueue? queue) { - final _ret = _lib._objc_msgSend_396( - _lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, - configuration?._id ?? ffi.nullptr, - delegate?._id ?? ffi.nullptr, - queue?._id ?? ffi.nullptr); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_CALLBACK = ffi.Pointer< + ffi.NativeFunction< + CSSM_RETURN Function( + CSSM_DATA_PTR OutData, ffi.Pointer CallerCtx)>>; +typedef CSSM_RETURN = sint32; +typedef sint32 = ffi.Int32; +typedef CSSM_DATA_PTR = ffi.Pointer; - NSOperationQueue? get delegateQueue { - final _ret = _lib._objc_msgSend_345(_id, _lib._sel_delegateQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); - } +final class cssm_list_element extends ffi.Struct { + external ffi.Pointer NextElement; - NSObject? get delegate { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + @CSSM_WORDID_TYPE() + external int WordID; - NSURLSessionConfiguration? get configuration { - final _ret = _lib._objc_msgSend_381(_id, _lib._sel_configuration1); - return _ret.address == 0 - ? null - : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } + @CSSM_LIST_ELEMENT_TYPE() + external int ElementType; - /// The sessionDescription property is available for the developer to - /// provide a descriptive label for the session. - NSString? get sessionDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_sessionDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + external UnnamedUnion2 Element; +} - /// The sessionDescription property is available for the developer to - /// provide a descriptive label for the session. - set sessionDescription(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); - } +typedef CSSM_WORDID_TYPE = sint32; +typedef CSSM_LIST_ELEMENT_TYPE = uint32; - /// -finishTasksAndInvalidate returns immediately and existing tasks will be allowed - /// to run to completion. New tasks may not be created. The session - /// will continue to make delegate callbacks until URLSession:didBecomeInvalidWithError: - /// has been issued. - /// - /// -finishTasksAndInvalidate and -invalidateAndCancel do not - /// have any effect on the shared session singleton. - /// - /// When invalidating a background session, it is not safe to create another background - /// session with the same identifier until URLSession:didBecomeInvalidWithError: has - /// been issued. - void finishTasksAndInvalidate() { - return _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); - } +final class UnnamedUnion2 extends ffi.Union { + external CSSM_LIST Sublist; - /// -invalidateAndCancel acts as -finishTasksAndInvalidate, but issues - /// -cancel to all outstanding tasks for this session. Note task - /// cancellation is subject to the state of the task, and some tasks may - /// have already have completed at the time they are sent -cancel. - void invalidateAndCancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); - } + external SecAsn1Item Word; +} - /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue if not nil. - void resetWithCompletionHandler_(ObjCBlock16 completionHandler) { - return _lib._objc_msgSend_341( - _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); - } +typedef CSSM_LIST = cssm_list; - /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue if not nil. - void flushWithCompletionHandler_(ObjCBlock16 completionHandler) { - return _lib._objc_msgSend_341( - _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); - } +final class cssm_list extends ffi.Struct { + @CSSM_LIST_TYPE() + external int ListType; - /// invokes completionHandler with outstanding data, upload and download tasks. - void getTasksWithCompletionHandler_(ObjCBlock38 completionHandler) { - return _lib._objc_msgSend_397( - _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); - } + external CSSM_LIST_ELEMENT_PTR Head; - /// invokes completionHandler with all outstanding tasks. - void getAllTasksWithCompletionHandler_(ObjCBlock19 completionHandler) { - return _lib._objc_msgSend_398(_id, - _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._id); - } + external CSSM_LIST_ELEMENT_PTR Tail; +} - /// Creates a data task with the given request. The request may have a body stream. - NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_399( - _id, _lib._sel_dataTaskWithRequest_1, request?._id ?? ffi.nullptr); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_LIST_TYPE = uint32; +typedef CSSM_LIST_ELEMENT_PTR = ffi.Pointer; - /// Creates a data task to retrieve the contents of the given URL. - NSURLSessionDataTask dataTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_400( - _id, _lib._sel_dataTaskWithURL_1, url?._id ?? ffi.nullptr); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } +final class CSSM_TUPLE extends ffi.Struct { + external CSSM_LIST Issuer; - /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( - NSURLRequest? request, NSURL? fileURL) { - final _ret = _lib._objc_msgSend_401( - _id, - _lib._sel_uploadTaskWithRequest_fromFile_1, - request?._id ?? ffi.nullptr, - fileURL?._id ?? ffi.nullptr); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_LIST Subject; - /// Creates an upload task with the given request. The body of the request is provided from the bodyData. - NSURLSessionUploadTask uploadTaskWithRequest_fromData_( - NSURLRequest? request, NSData? bodyData) { - final _ret = _lib._objc_msgSend_402( - _id, - _lib._sel_uploadTaskWithRequest_fromData_1, - request?._id ?? ffi.nullptr, - bodyData?._id ?? ffi.nullptr); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + @CSSM_BOOL() + external int Delegate; - /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. - NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_403(_id, - _lib._sel_uploadTaskWithStreamedRequest_1, request?._id ?? ffi.nullptr); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_LIST AuthorizationTag; - /// Creates a download task with the given request. - NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_405( - _id, _lib._sel_downloadTaskWithRequest_1, request?._id ?? ffi.nullptr); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_LIST ValidityPeriod; +} - /// Creates a download task to download the contents of the given URL. - NSURLSessionDownloadTask downloadTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_406( - _id, _lib._sel_downloadTaskWithURL_1, url?._id ?? ffi.nullptr); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_BOOL = sint32; - /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. - NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData? resumeData) { - final _ret = _lib._objc_msgSend_407(_id, - _lib._sel_downloadTaskWithResumeData_1, resumeData?._id ?? ffi.nullptr); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +final class cssm_tuplegroup extends ffi.Struct { + @uint32() + external int NumberOfTuples; - /// Creates a bidirectional stream task to a given host and port. - NSURLSessionStreamTask streamTaskWithHostName_port_( - NSString? hostname, int port) { - final _ret = _lib._objc_msgSend_410( - _id, - _lib._sel_streamTaskWithHostName_port_1, - hostname?._id ?? ffi.nullptr, - port); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_TUPLE_PTR Tuples; +} - /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. - /// The NSNetService will be resolved before any IO completes. - NSURLSessionStreamTask streamTaskWithNetService_(NSNetService? service) { - final _ret = _lib._objc_msgSend_411( - _id, _lib._sel_streamTaskWithNetService_1, service?._id ?? ffi.nullptr); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_TUPLE_PTR = ffi.Pointer; - /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. - NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_418( - _id, _lib._sel_webSocketTaskWithURL_1, url?._id ?? ffi.nullptr); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } +final class cssm_sample extends ffi.Struct { + external CSSM_LIST TypedSample; - /// Creates a WebSocket task given the url and an array of protocols. The protocols will be used in the WebSocket handshake to - /// negotiate a prefered protocol with the server - /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC - NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( - NSURL? url, NSArray? protocols) { - final _ret = _lib._objc_msgSend_419( - _id, - _lib._sel_webSocketTaskWithURL_protocols_1, - url?._id ?? ffi.nullptr, - protocols?._id ?? ffi.nullptr); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer Verifier; +} - /// Creates a WebSocket task given the request. The request properties can be modified and will be used by the task during the HTTP handshake phase. - /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol - /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. - NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_420( - _id, _lib._sel_webSocketTaskWithRequest_1, request?._id ?? ffi.nullptr); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_SUBSERVICE_UID = cssm_subservice_uid; - @override - NSURLSession init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } +final class cssm_samplegroup extends ffi.Struct { + @uint32() + external int NumberOfSamples; - static NSURLSession new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_new1); - return NSURLSession._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer Samples; +} - /// data task convenience methods. These methods create tasks that - /// bypass the normal delegate calls for response and data delivery, - /// and provide a simple cancelable asynchronous interface to receiving - /// data. Errors will be returned in the NSURLErrorDomain, - /// see . The delegate, if any, will still be - /// called for authentication challenges. - NSURLSessionDataTask dataTaskWithRequest_completionHandler_( - NSURLRequest? request, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_421( - _id, - _lib._sel_dataTaskWithRequest_completionHandler_1, - request?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_SAMPLE = cssm_sample; - NSURLSessionDataTask dataTaskWithURL_completionHandler_( - NSURL? url, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_422( - _id, - _lib._sel_dataTaskWithURL_completionHandler_1, - url?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } +final class cssm_memory_funcs extends ffi.Struct { + external CSSM_MALLOC malloc_func; - /// upload convenience method. - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( - NSURLRequest? request, NSURL? fileURL, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_423( - _id, - _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, - request?._id ?? ffi.nullptr, - fileURL?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_FREE free_func; - NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( - NSURLRequest? request, NSData? bodyData, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_424( - _id, - _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, - request?._id ?? ffi.nullptr, - bodyData?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_REALLOC realloc_func; - /// download task convenience methods. When a download successfully - /// completes, the NSURL will point to a file that must be read or - /// copied during the invocation of the completion routine. The file - /// will be removed automatically. - NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( - NSURLRequest? request, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_425( - _id, - _lib._sel_downloadTaskWithRequest_completionHandler_1, - request?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_CALLOC calloc_func; - NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( - NSURL? url, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_426( - _id, - _lib._sel_downloadTaskWithURL_completionHandler_1, - url?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer AllocRef; +} - NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( - NSData? resumeData, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_427( - _id, - _lib._sel_downloadTaskWithResumeData_completionHandler_1, - resumeData?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_MALLOC = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CSSM_SIZE size, ffi.Pointer allocref)>>; +typedef CSSM_SIZE = ffi.Size; +typedef CSSM_FREE = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer memblock, ffi.Pointer allocref)>>; +typedef CSSM_REALLOC = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer memblock, + CSSM_SIZE size, ffi.Pointer allocref)>>; +typedef CSSM_CALLOC = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + uint32 num, CSSM_SIZE size, ffi.Pointer allocref)>>; - static NSURLSession alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_alloc1); - return NSURLSession._(_ret, _lib, retain: false, release: true); - } +final class cssm_encoded_cert extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; + + @CSSM_CERT_ENCODING() + external int CertEncoding; + + external SecAsn1Item CertBlob; } -/// Configuration options for an NSURLSession. When a session is -/// created, a copy of the configuration object is made - you cannot -/// modify the configuration of a session after it has been created. -/// -/// The shared session uses the global singleton credential, cache -/// and cookie storage objects. -/// -/// An ephemeral session has no persistent disk storage for cookies, -/// cache or credentials. -/// -/// A background session can be used to perform networking operations -/// on behalf of a suspended application, within certain constraints. -class NSURLSessionConfiguration extends NSObject { - NSURLSessionConfiguration._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_CERT_TYPE = uint32; +typedef CSSM_CERT_ENCODING = uint32; - /// Returns a [NSURLSessionConfiguration] that points to the same underlying object as [other]. - static NSURLSessionConfiguration castFrom(T other) { - return NSURLSessionConfiguration._(other._id, other._lib, - retain: true, release: true); - } +final class cssm_parsed_cert extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; - /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. - static NSURLSessionConfiguration castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionConfiguration._(other, lib, - retain: retain, release: release); - } + @CSSM_CERT_PARSE_FORMAT() + external int ParsedCertFormat; - /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionConfiguration1); - } + external ffi.Pointer ParsedCert; +} - static NSURLSessionConfiguration? getDefaultSessionConfiguration( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_381(_lib._class_NSURLSessionConfiguration1, - _lib._sel_defaultSessionConfiguration1); - return _ret.address == 0 - ? null - : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_CERT_PARSE_FORMAT = uint32; - static NSURLSessionConfiguration? getEphemeralSessionConfiguration( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_381(_lib._class_NSURLSessionConfiguration1, - _lib._sel_ephemeralSessionConfiguration1); - return _ret.address == 0 - ? null - : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +final class cssm_cert_pair extends ffi.Struct { + external CSSM_ENCODED_CERT EncodedCert; - static NSURLSessionConfiguration - backgroundSessionConfigurationWithIdentifier_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_382( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfigurationWithIdentifier_1, - identifier?._id ?? ffi.nullptr); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } + external CSSM_PARSED_CERT ParsedCert; +} - /// identifier for the background session configuration - NSString? get identifier { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_identifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_ENCODED_CERT = cssm_encoded_cert; +typedef CSSM_PARSED_CERT = cssm_parsed_cert; - /// default cache policy for requests - int get requestCachePolicy { - return _lib._objc_msgSend_355(_id, _lib._sel_requestCachePolicy1); - } +final class cssm_certgroup extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; - /// default cache policy for requests - set requestCachePolicy(int value) { - _lib._objc_msgSend_358(_id, _lib._sel_setRequestCachePolicy_1, value); - } + @CSSM_CERT_ENCODING() + external int CertEncoding; - /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. - double get timeoutIntervalForRequest { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForRequest1); - } + @uint32() + external int NumCerts; + + external UnnamedUnion3 GroupList; + + @CSSM_CERTGROUP_TYPE() + external int CertGroupType; + + external ffi.Pointer Reserved; +} + +final class UnnamedUnion3 extends ffi.Union { + external CSSM_DATA_PTR CertList; + + external CSSM_ENCODED_CERT_PTR EncodedCertList; + + external CSSM_PARSED_CERT_PTR ParsedCertList; + + external CSSM_CERT_PAIR_PTR PairCertList; +} + +typedef CSSM_ENCODED_CERT_PTR = ffi.Pointer; +typedef CSSM_PARSED_CERT_PTR = ffi.Pointer; +typedef CSSM_CERT_PAIR_PTR = ffi.Pointer; +typedef CSSM_CERTGROUP_TYPE = uint32; + +final class cssm_base_certs extends ffi.Struct { + @CSSM_TP_HANDLE() + external int TPHandle; + + @CSSM_CL_HANDLE() + external int CLHandle; + + external CSSM_CERTGROUP Certs; +} + +typedef CSSM_TP_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_MODULE_HANDLE = CSSM_HANDLE; +typedef CSSM_HANDLE = CSSM_INTPTR; +typedef CSSM_INTPTR = ffi.IntPtr; +typedef CSSM_CL_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_CERTGROUP = cssm_certgroup; + +final class cssm_access_credentials extends ffi.Struct { + @ffi.Array.multi([68]) + external ffi.Array EntryTag; + + external CSSM_BASE_CERTS BaseCerts; + + external CSSM_SAMPLEGROUP Samples; + + external CSSM_CHALLENGE_CALLBACK Callback; + + external ffi.Pointer CallerCtx; +} + +typedef CSSM_BASE_CERTS = cssm_base_certs; +typedef CSSM_SAMPLEGROUP = cssm_samplegroup; +typedef CSSM_CHALLENGE_CALLBACK = ffi.Pointer< + ffi.NativeFunction< + CSSM_RETURN Function( + ffi.Pointer Challenge, + CSSM_SAMPLEGROUP_PTR Response, + ffi.Pointer CallerCtx, + ffi.Pointer MemFuncs)>>; +typedef CSSM_SAMPLEGROUP_PTR = ffi.Pointer; +typedef CSSM_MEMORY_FUNCS = cssm_memory_funcs; - /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. - set timeoutIntervalForRequest(double value) { - _lib._objc_msgSend_337( - _id, _lib._sel_setTimeoutIntervalForRequest_1, value); - } +final class cssm_authorizationgroup extends ffi.Struct { + @uint32() + external int NumberOfAuthTags; - /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. - double get timeoutIntervalForResource { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForResource1); - } + external ffi.Pointer AuthTags; +} - /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. - set timeoutIntervalForResource(double value) { - _lib._objc_msgSend_337( - _id, _lib._sel_setTimeoutIntervalForResource_1, value); - } +typedef CSSM_ACL_AUTHORIZATION_TAG = sint32; - /// type of service for requests. - int get networkServiceType { - return _lib._objc_msgSend_356(_id, _lib._sel_networkServiceType1); - } +final class cssm_acl_validity_period extends ffi.Struct { + external SecAsn1Item StartDate; - /// type of service for requests. - set networkServiceType(int value) { - _lib._objc_msgSend_359(_id, _lib._sel_setNetworkServiceType_1, value); - } + external SecAsn1Item EndDate; +} - /// allow request to route over cellular. - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } +final class cssm_acl_entry_prototype extends ffi.Struct { + external CSSM_LIST TypedSubject; - /// allow request to route over cellular. - set allowsCellularAccess(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setAllowsCellularAccess_1, value); - } + @CSSM_BOOL() + external int Delegate; - /// allow request to route over expensive networks. Defaults to YES. - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } + external CSSM_AUTHORIZATIONGROUP Authorization; - /// allow request to route over expensive networks. Defaults to YES. - set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); - } + external CSSM_ACL_VALIDITY_PERIOD TimeRange; - /// allow request to route over networks in constrained mode. Defaults to YES. - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } + @ffi.Array.multi([68]) + external ffi.Array EntryTag; +} - /// allow request to route over networks in constrained mode. Defaults to YES. - set allowsConstrainedNetworkAccess(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); - } +typedef CSSM_AUTHORIZATIONGROUP = cssm_authorizationgroup; +typedef CSSM_ACL_VALIDITY_PERIOD = cssm_acl_validity_period; - /// Causes tasks to wait for network connectivity to become available, rather - /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) - /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest - /// property does not apply, but the timeoutIntervalForResource property does. - /// - /// Unsatisfactory connectivity (that requires waiting) includes cases where the - /// device has limited or insufficient connectivity for a task (e.g., only has a - /// cellular connection but the allowsCellularAccess property is NO, or requires - /// a VPN connection in order to reach the desired host). - /// - /// Default value is NO. Ignored by background sessions, as background sessions - /// always wait for connectivity. - bool get waitsForConnectivity { - return _lib._objc_msgSend_11(_id, _lib._sel_waitsForConnectivity1); - } +final class cssm_acl_owner_prototype extends ffi.Struct { + external CSSM_LIST TypedSubject; - /// Causes tasks to wait for network connectivity to become available, rather - /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) - /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest - /// property does not apply, but the timeoutIntervalForResource property does. - /// - /// Unsatisfactory connectivity (that requires waiting) includes cases where the - /// device has limited or insufficient connectivity for a task (e.g., only has a - /// cellular connection but the allowsCellularAccess property is NO, or requires - /// a VPN connection in order to reach the desired host). - /// - /// Default value is NO. Ignored by background sessions, as background sessions - /// always wait for connectivity. - set waitsForConnectivity(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setWaitsForConnectivity_1, value); - } + @CSSM_BOOL() + external int Delegate; +} - /// allows background tasks to be scheduled at the discretion of the system for optimal performance. - bool get discretionary { - return _lib._objc_msgSend_11(_id, _lib._sel_isDiscretionary1); - } +final class cssm_acl_entry_input extends ffi.Struct { + external CSSM_ACL_ENTRY_PROTOTYPE Prototype; - /// allows background tasks to be scheduled at the discretion of the system for optimal performance. - set discretionary(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setDiscretionary_1, value); - } + external CSSM_ACL_SUBJECT_CALLBACK Callback; - /// The identifier of the shared data container into which files in background sessions should be downloaded. - /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or - /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. - NSString? get sharedContainerIdentifier { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_sharedContainerIdentifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer CallerContext; +} - /// The identifier of the shared data container into which files in background sessions should be downloaded. - /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or - /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. - set sharedContainerIdentifier(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setSharedContainerIdentifier_1, - value?._id ?? ffi.nullptr); - } +typedef CSSM_ACL_ENTRY_PROTOTYPE = cssm_acl_entry_prototype; +typedef CSSM_ACL_SUBJECT_CALLBACK = ffi.Pointer< + ffi.NativeFunction< + CSSM_RETURN Function( + ffi.Pointer SubjectRequest, + CSSM_LIST_PTR SubjectResponse, + ffi.Pointer CallerContext, + ffi.Pointer MemFuncs)>>; +typedef CSSM_LIST_PTR = ffi.Pointer; - /// Allows the app to be resumed or launched in the background when tasks in background sessions complete - /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: - /// and the default value is YES. - /// - /// NOTE: macOS apps based on AppKit do not support background launch. - bool get sessionSendsLaunchEvents { - return _lib._objc_msgSend_11(_id, _lib._sel_sessionSendsLaunchEvents1); - } +final class cssm_resource_control_context extends ffi.Struct { + external CSSM_ACCESS_CREDENTIALS_PTR AccessCred; - /// Allows the app to be resumed or launched in the background when tasks in background sessions complete - /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: - /// and the default value is YES. - /// - /// NOTE: macOS apps based on AppKit do not support background launch. - set sessionSendsLaunchEvents(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); - } + external CSSM_ACL_ENTRY_INPUT InitialAclEntry; +} - /// The proxy dictionary, as described by - NSDictionary? get connectionProxyDictionary { - final _ret = - _lib._objc_msgSend_180(_id, _lib._sel_connectionProxyDictionary1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_ACCESS_CREDENTIALS_PTR = ffi.Pointer; +typedef CSSM_ACL_ENTRY_INPUT = cssm_acl_entry_input; - /// The proxy dictionary, as described by - set connectionProxyDictionary(NSDictionary? value) { - _lib._objc_msgSend_360(_id, _lib._sel_setConnectionProxyDictionary_1, - value?._id ?? ffi.nullptr); - } +final class cssm_acl_entry_info extends ffi.Struct { + external CSSM_ACL_ENTRY_PROTOTYPE EntryPublicInfo; - /// The minimum allowable versions of the TLS protocol, from - int get TLSMinimumSupportedProtocol { - return _lib._objc_msgSend_383(_id, _lib._sel_TLSMinimumSupportedProtocol1); - } + @CSSM_ACL_HANDLE() + external int EntryHandle; +} - /// The minimum allowable versions of the TLS protocol, from - set TLSMinimumSupportedProtocol(int value) { - _lib._objc_msgSend_384( - _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); - } +typedef CSSM_ACL_HANDLE = CSSM_HANDLE; - /// The maximum allowable versions of the TLS protocol, from - int get TLSMaximumSupportedProtocol { - return _lib._objc_msgSend_383(_id, _lib._sel_TLSMaximumSupportedProtocol1); - } +final class cssm_acl_edit extends ffi.Struct { + @CSSM_ACL_EDIT_MODE() + external int EditMode; - /// The maximum allowable versions of the TLS protocol, from - set TLSMaximumSupportedProtocol(int value) { - _lib._objc_msgSend_384( - _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); - } + @CSSM_ACL_HANDLE() + external int OldEntryHandle; - /// The minimum allowable versions of the TLS protocol, from - int get TLSMinimumSupportedProtocolVersion { - return _lib._objc_msgSend_385( - _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); - } + external ffi.Pointer NewEntry; +} - /// The minimum allowable versions of the TLS protocol, from - set TLSMinimumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_386( - _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); - } +typedef CSSM_ACL_EDIT_MODE = uint32; - /// The maximum allowable versions of the TLS protocol, from - int get TLSMaximumSupportedProtocolVersion { - return _lib._objc_msgSend_385( - _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); - } +final class cssm_func_name_addr extends ffi.Struct { + @ffi.Array.multi([68]) + external ffi.Array Name; - /// The maximum allowable versions of the TLS protocol, from - set TLSMaximumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_386( - _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); - } + external CSSM_PROC_ADDR Address; +} - /// Allow the use of HTTP pipelining - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); - } +typedef CSSM_PROC_ADDR = ffi.Pointer>; - /// Allow the use of HTTP pipelining - set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); - } +final class cssm_date extends ffi.Struct { + @ffi.Array.multi([4]) + external ffi.Array Year; - /// Allow the session to set cookies on requests - bool get HTTPShouldSetCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldSetCookies1); - } + @ffi.Array.multi([2]) + external ffi.Array Month; - /// Allow the session to set cookies on requests - set HTTPShouldSetCookies(bool value) { - _lib._objc_msgSend_328(_id, _lib._sel_setHTTPShouldSetCookies_1, value); - } + @ffi.Array.multi([2]) + external ffi.Array Day; +} - /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. - int get HTTPCookieAcceptPolicy { - return _lib._objc_msgSend_369(_id, _lib._sel_HTTPCookieAcceptPolicy1); - } +final class cssm_range extends ffi.Struct { + @uint32() + external int Min; - /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. - set HTTPCookieAcceptPolicy(int value) { - _lib._objc_msgSend_370(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); - } + @uint32() + external int Max; +} - /// Specifies additional headers which will be set on outgoing requests. - /// Note that these headers are added to the request only if not already present. - NSDictionary? get HTTPAdditionalHeaders { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_HTTPAdditionalHeaders1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +final class cssm_query_size_data extends ffi.Struct { + @uint32() + external int SizeInputBlock; - /// Specifies additional headers which will be set on outgoing requests. - /// Note that these headers are added to the request only if not already present. - set HTTPAdditionalHeaders(NSDictionary? value) { - _lib._objc_msgSend_360( - _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); - } + @uint32() + external int SizeOutputBlock; +} - /// The maximum number of simultanous persistent connections per host - int get HTTPMaximumConnectionsPerHost { - return _lib._objc_msgSend_81(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); - } +final class cssm_key_size extends ffi.Struct { + @uint32() + external int LogicalKeySizeInBits; - /// The maximum number of simultanous persistent connections per host - set HTTPMaximumConnectionsPerHost(int value) { - _lib._objc_msgSend_342( - _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); - } + @uint32() + external int EffectiveKeySizeInBits; +} - /// The cookie storage object to use, or nil to indicate that no cookies should be handled - NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _lib._objc_msgSend_364(_id, _lib._sel_HTTPCookieStorage1); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } +final class cssm_keyheader extends ffi.Struct { + @CSSM_HEADERVERSION() + external int HeaderVersion; - /// The cookie storage object to use, or nil to indicate that no cookies should be handled - set HTTPCookieStorage(NSHTTPCookieStorage? value) { - _lib._objc_msgSend_387( - _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); - } + external CSSM_GUID CspId; - /// The credential storage object, or nil to indicate that no credential storage is to be used - NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _lib._objc_msgSend_388(_id, _lib._sel_URLCredentialStorage1); - return _ret.address == 0 - ? null - : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); - } + @CSSM_KEYBLOB_TYPE() + external int BlobType; - /// The credential storage object, or nil to indicate that no credential storage is to be used - set URLCredentialStorage(NSURLCredentialStorage? value) { - _lib._objc_msgSend_389( - _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); - } + @CSSM_KEYBLOB_FORMAT() + external int Format; - /// The URL resource cache, or nil to indicate that no caching is to be performed - NSURLCache? get URLCache { - final _ret = _lib._objc_msgSend_390(_id, _lib._sel_URLCache1); - return _ret.address == 0 - ? null - : NSURLCache._(_ret, _lib, retain: true, release: true); - } + @CSSM_ALGORITHMS() + external int AlgorithmId; - /// The URL resource cache, or nil to indicate that no caching is to be performed - set URLCache(NSURLCache? value) { - _lib._objc_msgSend_391( - _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); - } + @CSSM_KEYCLASS() + external int KeyClass; - /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open - /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) - bool get shouldUseExtendedBackgroundIdleMode { - return _lib._objc_msgSend_11( - _id, _lib._sel_shouldUseExtendedBackgroundIdleMode1); - } + @uint32() + external int LogicalKeySizeInBits; - /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open - /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) - set shouldUseExtendedBackgroundIdleMode(bool value) { - _lib._objc_msgSend_328( - _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); - } + @CSSM_KEYATTR_FLAGS() + external int KeyAttr; - /// An optional array of Class objects which subclass NSURLProtocol. - /// The Class will be sent +canInitWithRequest: when determining if - /// an instance of the class can be used for a given URL scheme. - /// You should not use +[NSURLProtocol registerClass:], as that - /// method will register your class with the default session rather - /// than with an instance of NSURLSession. - /// Custom NSURLProtocol subclasses are not available to background - /// sessions. - NSArray? get protocolClasses { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_protocolClasses1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + @CSSM_KEYUSE() + external int KeyUsage; - /// An optional array of Class objects which subclass NSURLProtocol. - /// The Class will be sent +canInitWithRequest: when determining if - /// an instance of the class can be used for a given URL scheme. - /// You should not use +[NSURLProtocol registerClass:], as that - /// method will register your class with the default session rather - /// than with an instance of NSURLSession. - /// Custom NSURLProtocol subclasses are not available to background - /// sessions. - set protocolClasses(NSArray? value) { - _lib._objc_msgSend_392( - _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); - } + external CSSM_DATE StartDate; - /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone - int get multipathServiceType { - return _lib._objc_msgSend_393(_id, _lib._sel_multipathServiceType1); - } + external CSSM_DATE EndDate; - /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone - set multipathServiceType(int value) { - _lib._objc_msgSend_394(_id, _lib._sel_setMultipathServiceType_1, value); - } + @CSSM_ALGORITHMS() + external int WrapAlgorithmId; - @override - NSURLSessionConfiguration init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } + @CSSM_ENCRYPT_MODE() + external int WrapMode; - static NSURLSessionConfiguration new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionConfiguration1, _lib._sel_new1); - return NSURLSessionConfiguration._(_ret, _lib, - retain: false, release: true); - } + @uint32() + external int Reserved; +} - static NSURLSessionConfiguration backgroundSessionConfiguration_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_382( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfiguration_1, - identifier?._id ?? ffi.nullptr); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_HEADERVERSION = uint32; +typedef CSSM_KEYBLOB_TYPE = uint32; +typedef CSSM_KEYBLOB_FORMAT = uint32; +typedef CSSM_ALGORITHMS = uint32; +typedef CSSM_KEYCLASS = uint32; +typedef CSSM_KEYATTR_FLAGS = uint32; +typedef CSSM_KEYUSE = uint32; +typedef CSSM_DATE = cssm_date; +typedef CSSM_ENCRYPT_MODE = uint32; - static NSURLSessionConfiguration alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); - return NSURLSessionConfiguration._(_ret, _lib, - retain: false, release: true); - } -} +final class cssm_key extends ffi.Struct { + external CSSM_KEYHEADER KeyHeader; -class NSURLCredentialStorage extends _ObjCWrapper { - NSURLCredentialStorage._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + external SecAsn1Item KeyData; +} - /// Returns a [NSURLCredentialStorage] that points to the same underlying object as [other]. - static NSURLCredentialStorage castFrom(T other) { - return NSURLCredentialStorage._(other._id, other._lib, - retain: true, release: true); - } +typedef CSSM_KEYHEADER = cssm_keyheader; - /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. - static NSURLCredentialStorage castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCredentialStorage._(other, lib, - retain: retain, release: release); - } +final class cssm_dl_db_handle extends ffi.Struct { + @CSSM_DL_HANDLE() + external int DLHandle; - /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLCredentialStorage1); - } + @CSSM_DB_HANDLE() + external int DBHandle; } -class NSURLCache extends _ObjCWrapper { - NSURLCache._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_DL_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_DB_HANDLE = CSSM_MODULE_HANDLE; - /// Returns a [NSURLCache] that points to the same underlying object as [other]. - static NSURLCache castFrom(T other) { - return NSURLCache._(other._id, other._lib, retain: true, release: true); - } +final class cssm_context_attribute extends ffi.Struct { + @CSSM_ATTRIBUTE_TYPE() + external int AttributeType; - /// Returns a [NSURLCache] that wraps the given raw object pointer. - static NSURLCache castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCache._(other, lib, retain: retain, release: release); - } + @uint32() + external int AttributeLength; - /// Returns whether [obj] is an instance of [NSURLCache]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); - } + external cssm_context_attribute_value Attribute; } -/// ! -/// @enum NSURLSessionMultipathServiceType -/// -/// @discussion The NSURLSessionMultipathServiceType enum defines constants that -/// can be used to specify the multipath service type to associate an NSURLSession. The -/// multipath service type determines whether multipath TCP should be attempted and the conditions -/// for creating and switching between subflows. Using these service types requires the appropriate entitlement. Any connection attempt will fail if the process does not have the required entitlement. -/// A primary interface is a generally less expensive interface in terms of both cost and power (such as WiFi or ethernet). A secondary interface is more expensive (such as 3G or LTE). -/// -/// @constant NSURLSessionMultipathServiceTypeNone Specifies that multipath tcp should not be used. Connections will use a single flow. -/// This is the default value. No entitlement is required to set this value. -/// -/// @constant NSURLSessionMultipathServiceTypeHandover Specifies that a secondary subflow should only be used -/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entilement. -/// -/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secodary subflow should be used if the -/// primary subflow is not performing adequately (packet loss, high round trip times, bandwidth issues). The secondary -/// subflow will be created more aggressively than with NSURLSessionMultipathServiceTypeHandover. Requires the com.apple.developer.networking.multipath entitlement. -/// -/// @constant NSURLSessionMultipathServiceTypeAggregate Specifies that multiple subflows across multiple interfaces should be -/// used for better bandwidth. This mode is only available for experimentation on devices configured for development use. -/// It can be enabled in the Developer section of the Settings app. -abstract class NSURLSessionMultipathServiceType { - /// None - no multipath (default) - static const int NSURLSessionMultipathServiceTypeNone = 0; +typedef CSSM_ATTRIBUTE_TYPE = uint32; - /// Handover - secondary flows brought up when primary flow is not performing adequately. - static const int NSURLSessionMultipathServiceTypeHandover = 1; +final class cssm_context_attribute_value extends ffi.Union { + external ffi.Pointer String; - /// Interactive - secondary flows created more aggressively. - static const int NSURLSessionMultipathServiceTypeInteractive = 2; + @uint32() + external int Uint32; - /// Aggregate - multiple subflows used for greater bandwitdh. - static const int NSURLSessionMultipathServiceTypeAggregate = 3; -} + external CSSM_ACCESS_CREDENTIALS_PTR AccessCredentials; -void _ObjCBlock38_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} + external CSSM_KEY_PTR Key; + + external CSSM_DATA_PTR Data; + + @CSSM_PADDING() + external int Padding; -final _ObjCBlock38_closureRegistry = {}; -int _ObjCBlock38_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock38_registerClosure(Function fn) { - final id = ++_ObjCBlock38_closureRegistryIndex; - _ObjCBlock38_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + external CSSM_DATE_PTR Date; -void _ObjCBlock38_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock38_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} + external CSSM_RANGE_PTR Range; -class ObjCBlock38 extends _ObjCBlockBase { - ObjCBlock38._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); + external CSSM_CRYPTO_DATA_PTR CryptoData; - /// Creates a block from a C function pointer. - ObjCBlock38.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock38_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CSSM_VERSION_PTR Version; - /// Creates a block from a Dart function. - ObjCBlock38.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock38_closureTrampoline) - .cast(), - _ObjCBlock38_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + external CSSM_DL_DB_HANDLE_PTR DLDBHandle; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external ffi.Pointer KRProfile; } -/// An NSURLSessionDataTask does not provide any additional -/// functionality over an NSURLSessionTask and its presence is merely -/// to provide lexical differentiation from download and upload tasks. -class NSURLSessionDataTask extends NSURLSessionTask { - NSURLSessionDataTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_KEY_PTR = ffi.Pointer; +typedef CSSM_PADDING = uint32; +typedef CSSM_DATE_PTR = ffi.Pointer; +typedef CSSM_RANGE_PTR = ffi.Pointer; +typedef CSSM_CRYPTO_DATA_PTR = ffi.Pointer; +typedef CSSM_VERSION_PTR = ffi.Pointer; +typedef CSSM_DL_DB_HANDLE_PTR = ffi.Pointer; - /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. - static NSURLSessionDataTask castFrom(T other) { - return NSURLSessionDataTask._(other._id, other._lib, - retain: true, release: true); - } +final class cssm_kr_profile extends ffi.Opaque {} - /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. - static NSURLSessionDataTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDataTask._(other, lib, retain: retain, release: release); - } +final class cssm_context extends ffi.Struct { + @CSSM_CONTEXT_TYPE() + external int ContextType; - /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionDataTask1); - } + @CSSM_ALGORITHMS() + external int AlgorithmType; - @override - NSURLSessionDataTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int NumberOfAttributes; - static NSURLSessionDataTask new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); - } + external CSSM_CONTEXT_ATTRIBUTE_PTR ContextAttributes; - static NSURLSessionDataTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); - } + @CSSM_CSP_HANDLE() + external int CSPHandle; + + @CSSM_BOOL() + external int Privileged; + + @uint32() + external int EncryptionProhibited; + + @uint32() + external int WorkFactor; + + @uint32() + external int Reserved; } -/// An NSURLSessionUploadTask does not currently provide any additional -/// functionality over an NSURLSessionDataTask. All delegate messages -/// that may be sent referencing an NSURLSessionDataTask equally apply -/// to NSURLSessionUploadTasks. -class NSURLSessionUploadTask extends NSURLSessionDataTask { - NSURLSessionUploadTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_CONTEXT_TYPE = uint32; +typedef CSSM_CONTEXT_ATTRIBUTE_PTR = ffi.Pointer; +typedef CSSM_CSP_HANDLE = CSSM_MODULE_HANDLE; - /// Returns a [NSURLSessionUploadTask] that points to the same underlying object as [other]. - static NSURLSessionUploadTask castFrom(T other) { - return NSURLSessionUploadTask._(other._id, other._lib, - retain: true, release: true); - } +final class cssm_pkcs1_oaep_params extends ffi.Struct { + @uint32() + external int HashAlgorithm; - /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. - static NSURLSessionUploadTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionUploadTask._(other, lib, - retain: retain, release: release); - } + external SecAsn1Item HashParams; - /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionUploadTask1); - } + @CSSM_PKCS_OAEP_MGF() + external int MGF; - @override - NSURLSessionUploadTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + external SecAsn1Item MGFParams; - static NSURLSessionUploadTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionUploadTask1, _lib._sel_new1); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } + @CSSM_PKCS_OAEP_PSOURCE() + external int PSource; - static NSURLSessionUploadTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionUploadTask1, _lib._sel_alloc1); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } + external SecAsn1Item PSourceParams; } -/// NSURLSessionDownloadTask is a task that represents a download to -/// local storage. -class NSURLSessionDownloadTask extends NSURLSessionTask { - NSURLSessionDownloadTask._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_PKCS_OAEP_MGF = uint32; +typedef CSSM_PKCS_OAEP_PSOURCE = uint32; - /// Returns a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. - static NSURLSessionDownloadTask castFrom(T other) { - return NSURLSessionDownloadTask._(other._id, other._lib, - retain: true, release: true); - } +final class cssm_csp_operational_statistics extends ffi.Struct { + @CSSM_BOOL() + external int UserAuthenticated; - /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. - static NSURLSessionDownloadTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDownloadTask._(other, lib, - retain: retain, release: release); - } + @CSSM_CSP_FLAGS() + external int DeviceFlags; - /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionDownloadTask1); - } + @uint32() + external int TokenMaxSessionCount; - /// Cancel the download (and calls the superclass -cancel). If - /// conditions will allow for resuming the download in the future, the - /// callback will be called with an opaque data blob, which may be used - /// with -downloadTaskWithResumeData: to attempt to resume the download. - /// If resume data cannot be created, the completion handler will be - /// called with nil resumeData. - void cancelByProducingResumeData_(ObjCBlock39 completionHandler) { - return _lib._objc_msgSend_404( - _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); - } + @uint32() + external int TokenOpenedSessionCount; - @override - NSURLSessionDownloadTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int TokenMaxRWSessionCount; - static NSURLSessionDownloadTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_new1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); - } + @uint32() + external int TokenOpenedRWSessionCount; - static NSURLSessionDownloadTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_alloc1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); - } + @uint32() + external int TokenTotalPublicMem; + + @uint32() + external int TokenFreePublicMem; + + @uint32() + external int TokenTotalPrivateMem; + + @uint32() + external int TokenFreePrivateMem; } -void _ObjCBlock39_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); +typedef CSSM_CSP_FLAGS = uint32; + +final class cssm_pkcs5_pbkdf1_params extends ffi.Struct { + external SecAsn1Item Passphrase; + + external SecAsn1Item InitVector; } -final _ObjCBlock39_closureRegistry = {}; -int _ObjCBlock39_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock39_registerClosure(Function fn) { - final id = ++_ObjCBlock39_closureRegistryIndex; - _ObjCBlock39_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +final class cssm_pkcs5_pbkdf2_params extends ffi.Struct { + external SecAsn1Item Passphrase; + + @CSSM_PKCS5_PBKDF2_PRF() + external int PseudoRandomFunction; } -void _ObjCBlock39_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock39_closureRegistry[block.ref.target.address]!(arg0); +typedef CSSM_PKCS5_PBKDF2_PRF = uint32; + +final class cssm_kea_derive_params extends ffi.Struct { + external SecAsn1Item Rb; + + external SecAsn1Item Yb; } -class ObjCBlock39 extends _ObjCBlockBase { - ObjCBlock39._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class cssm_tp_authority_id extends ffi.Struct { + external ffi.Pointer AuthorityCert; - /// Creates a block from a C function pointer. - ObjCBlock39.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock39_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CSSM_NET_ADDRESS_PTR AuthorityLocation; +} - /// Creates a block from a Dart function. - ObjCBlock39.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock39_closureTrampoline) - .cast(), - _ObjCBlock39_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } +typedef CSSM_NET_ADDRESS_PTR = ffi.Pointer; - ffi.Pointer<_ObjCBlock> get pointer => _id; +final class cssm_field extends ffi.Struct { + external SecAsn1Oid FieldOid; + + external SecAsn1Item FieldValue; } -/// An NSURLSessionStreamTask provides an interface to perform reads -/// and writes to a TCP/IP stream created via NSURLSession. This task -/// may be explicitly created from an NSURLSession, or created as a -/// result of the appropriate disposition response to a -/// -URLSession:dataTask:didReceiveResponse: delegate message. -/// -/// NSURLSessionStreamTask can be used to perform asynchronous reads -/// and writes. Reads and writes are enquened and executed serially, -/// with the completion handler being invoked on the sessions delegate -/// queuee. If an error occurs, or the task is canceled, all -/// outstanding read and write calls will have their completion -/// handlers invoked with an appropriate error. -/// -/// It is also possible to create NSInputStream and NSOutputStream -/// instances from an NSURLSessionTask by sending -/// -captureStreams to the task. All outstanding read and writess are -/// completed before the streams are created. Once the streams are -/// delivered to the session delegate, the task is considered complete -/// and will receive no more messsages. These streams are -/// disassociated from the underlying session. -class NSURLSessionStreamTask extends NSURLSessionTask { - NSURLSessionStreamTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final class cssm_tp_policyinfo extends ffi.Struct { + @uint32() + external int NumberOfPolicyIds; - /// Returns a [NSURLSessionStreamTask] that points to the same underlying object as [other]. - static NSURLSessionStreamTask castFrom(T other) { - return NSURLSessionStreamTask._(other._id, other._lib, - retain: true, release: true); - } + external CSSM_FIELD_PTR PolicyIds; - /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. - static NSURLSessionStreamTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionStreamTask._(other, lib, - retain: retain, release: release); - } + external ffi.Pointer PolicyControl; +} - /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionStreamTask1); - } +typedef CSSM_FIELD_PTR = ffi.Pointer; - /// Read minBytes, or at most maxBytes bytes and invoke the completion - /// handler on the sessions delegate queue with the data or an error. - /// If an error occurs, any outstanding reads will also fail, and new - /// read requests will error out immediately. - void readDataOfMinLength_maxLength_timeout_completionHandler_(int minBytes, - int maxBytes, double timeout, ObjCBlock40 completionHandler) { - return _lib._objc_msgSend_408( - _id, - _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, - minBytes, - maxBytes, - timeout, - completionHandler._id); - } +final class cssm_dl_db_list extends ffi.Struct { + @uint32() + external int NumHandles; - /// Write the data completely to the underlying socket. If all the - /// bytes have not been written by the timeout, a timeout error will - /// occur. Note that invocation of the completion handler does not - /// guarantee that the remote side has received all the bytes, only - /// that they have been written to the kernel. - void writeData_timeout_completionHandler_( - NSData? data, double timeout, ObjCBlock41 completionHandler) { - return _lib._objc_msgSend_409( - _id, - _lib._sel_writeData_timeout_completionHandler_1, - data?._id ?? ffi.nullptr, - timeout, - completionHandler._id); - } + external CSSM_DL_DB_HANDLE_PTR DLDBHandle; +} - /// -captureStreams completes any already enqueued reads - /// and writes, and then invokes the - /// URLSession:streamTask:didBecomeInputStream:outputStream: delegate - /// message. When that message is received, the task object is - /// considered completed and will not receive any more delegate - /// messages. - void captureStreams() { - return _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); - } +final class cssm_tp_callerauth_context extends ffi.Struct { + external CSSM_TP_POLICYINFO Policy; - /// Enqueue a request to close the write end of the underlying socket. - /// All outstanding IO will complete before the write side of the - /// socket is closed. The server, however, may continue to write bytes - /// back to the client, so best practice is to continue reading from - /// the server until you receive EOF. - void closeWrite() { - return _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); - } + external CSSM_TIMESTRING VerifyTime; - /// Enqueue a request to close the read side of the underlying socket. - /// All outstanding IO will complete before the read side is closed. - /// You may continue writing to the server. - void closeRead() { - return _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); - } + @CSSM_TP_STOP_ON() + external int VerificationAbortOn; - /// Begin encrypted handshake. The hanshake begins after all pending - /// IO has completed. TLS authentication callbacks are sent to the - /// session's -URLSession:task:didReceiveChallenge:completionHandler: - void startSecureConnection() { - return _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); - } + external CSSM_TP_VERIFICATION_RESULTS_CALLBACK CallbackWithVerifiedCert; - /// Cleanly close a secure connection after all pending secure IO has - /// completed. - /// - /// @warning This API is non-functional. - void stopSecureConnection() { - return _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); - } + @uint32() + external int NumberOfAnchorCerts; - @override - NSURLSessionStreamTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_DATA_PTR AnchorCerts; - static NSURLSessionStreamTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionStreamTask1, _lib._sel_new1); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); - } + external CSSM_DL_DB_LIST_PTR DBList; - static NSURLSessionStreamTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); - } + external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } -void _ObjCBlock40_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); +typedef CSSM_TP_POLICYINFO = cssm_tp_policyinfo; +typedef CSSM_TIMESTRING = ffi.Pointer; +typedef CSSM_TP_STOP_ON = uint32; +typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACK = ffi.Pointer< + ffi.NativeFunction< + CSSM_RETURN Function(CSSM_MODULE_HANDLE ModuleHandle, + ffi.Pointer CallerCtx, CSSM_DATA_PTR VerifiedCert)>>; +typedef CSSM_DL_DB_LIST_PTR = ffi.Pointer; + +final class cssm_encoded_crl extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; + + @CSSM_CRL_ENCODING() + external int CrlEncoding; + + external SecAsn1Item CrlBlob; } -final _ObjCBlock40_closureRegistry = {}; -int _ObjCBlock40_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock40_registerClosure(Function fn) { - final id = ++_ObjCBlock40_closureRegistryIndex; - _ObjCBlock40_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CSSM_CRL_TYPE = uint32; +typedef CSSM_CRL_ENCODING = uint32; + +final class cssm_parsed_crl extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; + + @CSSM_CRL_PARSE_FORMAT() + external int ParsedCrlFormat; + + external ffi.Pointer ParsedCrl; } -void _ObjCBlock40_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _ObjCBlock40_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +typedef CSSM_CRL_PARSE_FORMAT = uint32; + +final class cssm_crl_pair extends ffi.Struct { + external CSSM_ENCODED_CRL EncodedCrl; + + external CSSM_PARSED_CRL ParsedCrl; } -class ObjCBlock40 extends _ObjCBlockBase { - ObjCBlock40._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_ENCODED_CRL = cssm_encoded_crl; +typedef CSSM_PARSED_CRL = cssm_parsed_crl; - /// Creates a block from a C function pointer. - ObjCBlock40.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock40_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class cssm_crlgroup extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; - /// Creates a block from a Dart function. - ObjCBlock40.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock40_closureTrampoline) - .cast(), - _ObjCBlock40_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + @CSSM_CRL_ENCODING() + external int CrlEncoding; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @uint32() + external int NumberOfCrls; + + external UnnamedUnion4 GroupCrlList; + + @CSSM_CRLGROUP_TYPE() + external int CrlGroupType; } -void _ObjCBlock41_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); +final class UnnamedUnion4 extends ffi.Union { + external CSSM_DATA_PTR CrlList; + + external CSSM_ENCODED_CRL_PTR EncodedCrlList; + + external CSSM_PARSED_CRL_PTR ParsedCrlList; + + external CSSM_CRL_PAIR_PTR PairCrlList; } -final _ObjCBlock41_closureRegistry = {}; -int _ObjCBlock41_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock41_registerClosure(Function fn) { - final id = ++_ObjCBlock41_closureRegistryIndex; - _ObjCBlock41_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CSSM_ENCODED_CRL_PTR = ffi.Pointer; +typedef CSSM_PARSED_CRL_PTR = ffi.Pointer; +typedef CSSM_CRL_PAIR_PTR = ffi.Pointer; +typedef CSSM_CRLGROUP_TYPE = uint32; + +final class cssm_fieldgroup extends ffi.Struct { + @ffi.Int() + external int NumberOfFields; + + external CSSM_FIELD_PTR Fields; } -void _ObjCBlock41_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock41_closureRegistry[block.ref.target.address]!(arg0); +final class cssm_evidence extends ffi.Struct { + @CSSM_EVIDENCE_FORM() + external int EvidenceForm; + + external ffi.Pointer Evidence; } -class ObjCBlock41 extends _ObjCBlockBase { - ObjCBlock41._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_EVIDENCE_FORM = uint32; - /// Creates a block from a C function pointer. - ObjCBlock41.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock41_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class cssm_tp_verify_context extends ffi.Struct { + @CSSM_TP_ACTION() + external int Action; - /// Creates a block from a Dart function. - ObjCBlock41.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock41_closureTrampoline) - .cast(), - _ObjCBlock41_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } + external SecAsn1Item ActionData; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + external CSSM_CRLGROUP Crls; -class NSNetService extends _ObjCWrapper { - NSNetService._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + external CSSM_TP_CALLERAUTH_CONTEXT_PTR Cred; +} - /// Returns a [NSNetService] that points to the same underlying object as [other]. - static NSNetService castFrom(T other) { - return NSNetService._(other._id, other._lib, retain: true, release: true); - } +typedef CSSM_TP_ACTION = uint32; +typedef CSSM_CRLGROUP = cssm_crlgroup; +typedef CSSM_TP_CALLERAUTH_CONTEXT_PTR + = ffi.Pointer; - /// Returns a [NSNetService] that wraps the given raw object pointer. - static NSNetService castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNetService._(other, lib, retain: retain, release: release); - } +final class cssm_tp_verify_context_result extends ffi.Struct { + @uint32() + external int NumberOfEvidences; - /// Returns whether [obj] is an instance of [NSNetService]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNetService1); - } + external CSSM_EVIDENCE_PTR Evidence; } -/// A WebSocket task can be created with a ws or wss url. A client can also provide -/// a list of protocols it wishes to advertise during the WebSocket handshake phase. -/// Once the handshake is successfully completed the client will be notified through an optional delegate. -/// All reads and writes enqueued before the completion of the handshake will be queued up and -/// executed once the hanshake succeeds. Before the handshake completes, the client can be called to handle -/// redirection or authentication using the same delegates as NSURLSessionTask. WebSocket task will also provide -/// support for cookies and will store cookies to the cookie storage on the session and will attach cookies to -/// outgoing HTTP handshake requests. -class NSURLSessionWebSocketTask extends NSURLSessionTask { - NSURLSessionWebSocketTask._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_EVIDENCE_PTR = ffi.Pointer; - /// Returns a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. - static NSURLSessionWebSocketTask castFrom(T other) { - return NSURLSessionWebSocketTask._(other._id, other._lib, - retain: true, release: true); - } +final class cssm_tp_request_set extends ffi.Struct { + @uint32() + external int NumberOfRequests; - /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. - static NSURLSessionWebSocketTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionWebSocketTask._(other, lib, - retain: retain, release: release); - } + external ffi.Pointer Requests; +} - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionWebSocketTask1); - } +final class cssm_tp_result_set extends ffi.Struct { + @uint32() + external int NumberOfResults; - /// Sends a WebSocket message. If an error occurs, any outstanding work will also fail. - /// Note that invocation of the completion handler does not - /// guarantee that the remote side has received all the bytes, only - /// that they have been written to the kernel. - void sendMessage_completionHandler_( - NSURLSessionWebSocketMessage? message, ObjCBlock41 completionHandler) { - return _lib._objc_msgSend_413( - _id, - _lib._sel_sendMessage_completionHandler_1, - message?._id ?? ffi.nullptr, - completionHandler._id); - } + external ffi.Pointer Results; +} - /// Reads a WebSocket message once all the frames of the message are available. - /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out - /// and all outstanding work will also fail resulting in the end of the task. - void receiveMessageWithCompletionHandler_(ObjCBlock42 completionHandler) { - return _lib._objc_msgSend_414(_id, - _lib._sel_receiveMessageWithCompletionHandler_1, completionHandler._id); - } +final class cssm_tp_confirm_response extends ffi.Struct { + @uint32() + external int NumberOfResponses; - /// Sends a ping frame from the client side. The pongReceiveHandler is invoked when the client - /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving - /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. - /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. - void sendPingWithPongReceiveHandler_(ObjCBlock41 pongReceiveHandler) { - return _lib._objc_msgSend_415(_id, - _lib._sel_sendPingWithPongReceiveHandler_1, pongReceiveHandler._id); - } + external CSSM_TP_CONFIRM_STATUS_PTR Responses; +} - /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. - /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. - void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { - return _lib._objc_msgSend_416(_id, _lib._sel_cancelWithCloseCode_reason_1, - closeCode, reason?._id ?? ffi.nullptr); - } +typedef CSSM_TP_CONFIRM_STATUS_PTR = ffi.Pointer; - /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Recieve calls will error out if this value is reached - int get maximumMessageSize { - return _lib._objc_msgSend_81(_id, _lib._sel_maximumMessageSize1); - } +final class cssm_tp_certissue_input extends ffi.Struct { + external CSSM_SUBSERVICE_UID CSPSubserviceUid; - /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Recieve calls will error out if this value is reached - set maximumMessageSize(int value) { - _lib._objc_msgSend_342(_id, _lib._sel_setMaximumMessageSize_1, value); - } + @CSSM_CL_HANDLE() + external int CLHandle; - /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid - int get closeCode { - return _lib._objc_msgSend_417(_id, _lib._sel_closeCode1); - } + @uint32() + external int NumberOfTemplateFields; - /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running - NSData? get closeReason { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_closeReason1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } + external CSSM_FIELD_PTR SubjectCertFields; - @override - NSURLSessionWebSocketTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } + @CSSM_TP_SERVICES() + external int MoreServiceRequests; - static NSURLSessionWebSocketTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_new1); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); - } + @uint32() + external int NumberOfServiceControls; - static NSURLSessionWebSocketTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_alloc1); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); - } + external CSSM_FIELD_PTR ServiceControls; + + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; } -/// The client can create a WebSocket message object that will be passed to the send calls -/// and will be delivered from the receive calls. The message can be initialized with data or string. -/// If initialized with data, the string property will be nil and vice versa. -class NSURLSessionWebSocketMessage extends NSObject { - NSURLSessionWebSocketMessage._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_TP_SERVICES = uint32; - /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. - static NSURLSessionWebSocketMessage castFrom( - T other) { - return NSURLSessionWebSocketMessage._(other._id, other._lib, - retain: true, release: true); - } +final class cssm_tp_certissue_output extends ffi.Struct { + @CSSM_TP_CERTISSUE_STATUS() + external int IssueStatus; - /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. - static NSURLSessionWebSocketMessage castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionWebSocketMessage._(other, lib, - retain: retain, release: release); - } + external CSSM_CERTGROUP_PTR CertGroup; - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionWebSocketMessage1); - } + @CSSM_TP_SERVICES() + external int PerformedServiceRequests; +} - /// Create a message with data type - NSURLSessionWebSocketMessage initWithData_(NSData? data) { - final _ret = _lib._objc_msgSend_217( - _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } +typedef CSSM_TP_CERTISSUE_STATUS = uint32; +typedef CSSM_CERTGROUP_PTR = ffi.Pointer; - /// Create a message with string type - NSURLSessionWebSocketMessage initWithString_(NSString? string) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, string?._id ?? ffi.nullptr); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } +final class cssm_tp_certchange_input extends ffi.Struct { + @CSSM_TP_CERTCHANGE_ACTION() + external int Action; - int get type { - return _lib._objc_msgSend_412(_id, _lib._sel_type1); - } + @CSSM_TP_CERTCHANGE_REASON() + external int Reason; - NSData? get data { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } + @CSSM_CL_HANDLE() + external int CLHandle; - NSString? get string { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + external CSSM_DATA_PTR Cert; - @override - NSURLSessionWebSocketMessage init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } + external CSSM_FIELD_PTR ChangeInfo; - static NSURLSessionWebSocketMessage new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_new1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); - } + external CSSM_TIMESTRING StartTime; - static NSURLSessionWebSocketMessage alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_alloc1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); - } + external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } -abstract class NSURLSessionWebSocketMessageType { - static const int NSURLSessionWebSocketMessageTypeData = 0; - static const int NSURLSessionWebSocketMessageTypeString = 1; -} +typedef CSSM_TP_CERTCHANGE_ACTION = uint32; +typedef CSSM_TP_CERTCHANGE_REASON = uint32; -void _ObjCBlock42_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} +final class cssm_tp_certchange_output extends ffi.Struct { + @CSSM_TP_CERTCHANGE_STATUS() + external int ActionStatus; -final _ObjCBlock42_closureRegistry = {}; -int _ObjCBlock42_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock42_registerClosure(Function fn) { - final id = ++_ObjCBlock42_closureRegistryIndex; - _ObjCBlock42_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + external CSSM_FIELD RevokeInfo; } -void _ObjCBlock42_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock42_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +typedef CSSM_TP_CERTCHANGE_STATUS = uint32; +typedef CSSM_FIELD = cssm_field; -class ObjCBlock42 extends _ObjCBlockBase { - ObjCBlock42._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class cssm_tp_certverify_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; - /// Creates a block from a C function pointer. - ObjCBlock42.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock42_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CSSM_DATA_PTR Cert; - /// Creates a block from a Dart function. - ObjCBlock42.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock42_closureTrampoline) - .cast(), - _ObjCBlock42_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + external CSSM_TP_VERIFY_CONTEXT_PTR VerifyContext; +} - ffi.Pointer<_ObjCBlock> get pointer => _id; +typedef CSSM_TP_VERIFY_CONTEXT_PTR = ffi.Pointer; + +final class cssm_tp_certverify_output extends ffi.Struct { + @CSSM_TP_CERTVERIFY_STATUS() + external int VerifyStatus; + + @uint32() + external int NumberOfEvidence; + + external CSSM_EVIDENCE_PTR Evidence; } -/// The WebSocket close codes follow the close codes given in the RFC -abstract class NSURLSessionWebSocketCloseCode { - static const int NSURLSessionWebSocketCloseCodeInvalid = 0; - static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; - static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; - static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; - static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; - static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; - static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; - static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; - static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; - static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; - static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = - 1010; - static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; - static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; +typedef CSSM_TP_CERTVERIFY_STATUS = uint32; + +final class cssm_tp_certnotarize_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; + + @uint32() + external int NumberOfFields; + + external CSSM_FIELD_PTR MoreFields; + + external CSSM_FIELD_PTR SignScope; + + @uint32() + external int ScopeSize; + + @CSSM_TP_SERVICES() + external int MoreServiceRequests; + + @uint32() + external int NumberOfServiceControls; + + external CSSM_FIELD_PTR ServiceControls; + + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; } -void _ObjCBlock43_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); +final class cssm_tp_certnotarize_output extends ffi.Struct { + @CSSM_TP_CERTNOTARIZE_STATUS() + external int NotarizeStatus; + + external CSSM_CERTGROUP_PTR NotarizedCertGroup; + + @CSSM_TP_SERVICES() + external int PerformedServiceRequests; } -final _ObjCBlock43_closureRegistry = {}; -int _ObjCBlock43_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock43_registerClosure(Function fn) { - final id = ++_ObjCBlock43_closureRegistryIndex; - _ObjCBlock43_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CSSM_TP_CERTNOTARIZE_STATUS = uint32; + +final class cssm_tp_certreclaim_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; + + @uint32() + external int NumberOfSelectionFields; + + external CSSM_FIELD_PTR SelectionFields; + + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; } -void _ObjCBlock43_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock43_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +final class cssm_tp_certreclaim_output extends ffi.Struct { + @CSSM_TP_CERTRECLAIM_STATUS() + external int ReclaimStatus; + + external CSSM_CERTGROUP_PTR ReclaimedCertGroup; + + @CSSM_LONG_HANDLE() + external int KeyCacheHandle; } -class ObjCBlock43 extends _ObjCBlockBase { - ObjCBlock43._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_TP_CERTRECLAIM_STATUS = uint32; +typedef CSSM_LONG_HANDLE = uint64; +typedef uint64 = ffi.Uint64; - /// Creates a block from a C function pointer. - ObjCBlock43.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock43_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class cssm_tp_crlissue_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; - /// Creates a block from a Dart function. - ObjCBlock43.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock43_closureTrampoline) - .cast(), - _ObjCBlock43_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + @uint32() + external int CrlIdentifier; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external CSSM_TIMESTRING CrlThisTime; + + external CSSM_FIELD_PTR PolicyIdentifier; + + external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } -void _ObjCBlock44_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); +final class cssm_tp_crlissue_output extends ffi.Struct { + @CSSM_TP_CRLISSUE_STATUS() + external int IssueStatus; + + external CSSM_ENCODED_CRL_PTR Crl; + + external CSSM_TIMESTRING CrlNextTime; } -final _ObjCBlock44_closureRegistry = {}; -int _ObjCBlock44_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock44_registerClosure(Function fn) { - final id = ++_ObjCBlock44_closureRegistryIndex; - _ObjCBlock44_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CSSM_TP_CRLISSUE_STATUS = uint32; + +final class cssm_cert_bundle_header extends ffi.Struct { + @CSSM_CERT_BUNDLE_TYPE() + external int BundleType; + + @CSSM_CERT_BUNDLE_ENCODING() + external int BundleEncoding; } -void _ObjCBlock44_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock44_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +typedef CSSM_CERT_BUNDLE_TYPE = uint32; +typedef CSSM_CERT_BUNDLE_ENCODING = uint32; + +final class cssm_cert_bundle extends ffi.Struct { + external CSSM_CERT_BUNDLE_HEADER BundleHeader; + + external SecAsn1Item Bundle; } -class ObjCBlock44 extends _ObjCBlockBase { - ObjCBlock44._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_CERT_BUNDLE_HEADER = cssm_cert_bundle_header; - /// Creates a block from a C function pointer. - ObjCBlock44.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock44_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class cssm_db_attribute_info extends ffi.Struct { + @CSSM_DB_ATTRIBUTE_NAME_FORMAT() + external int AttributeNameFormat; - /// Creates a block from a Dart function. - ObjCBlock44.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock44_closureTrampoline) - .cast(), - _ObjCBlock44_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + external cssm_db_attribute_label Label; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @CSSM_DB_ATTRIBUTE_FORMAT() + external int AttributeFormat; } -/// Disposition options for various delegate messages -abstract class NSURLSessionDelayedRequestDisposition { - /// Use the original request provided when the task was created; the request parameter is ignored. - static const int NSURLSessionDelayedRequestContinueLoading = 0; +typedef CSSM_DB_ATTRIBUTE_NAME_FORMAT = uint32; - /// Use the specified request, which may not be nil. - static const int NSURLSessionDelayedRequestUseNewRequest = 1; +final class cssm_db_attribute_label extends ffi.Union { + external ffi.Pointer AttributeName; - /// Cancel the task; the request parameter is ignored. - static const int NSURLSessionDelayedRequestCancel = 2; + external SecAsn1Oid AttributeOID; + + @uint32() + external int AttributeID; } -abstract class NSURLSessionAuthChallengeDisposition { - /// Use the specified credential, which may be nil - static const int NSURLSessionAuthChallengeUseCredential = 0; +typedef CSSM_DB_ATTRIBUTE_FORMAT = uint32; - /// Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored. - static const int NSURLSessionAuthChallengePerformDefaultHandling = 1; +final class cssm_db_attribute_data extends ffi.Struct { + external CSSM_DB_ATTRIBUTE_INFO Info; - /// The entire request will be canceled; the credential parameter is ignored. - static const int NSURLSessionAuthChallengeCancelAuthenticationChallenge = 2; + @uint32() + external int NumberOfValues; - /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. - static const int NSURLSessionAuthChallengeRejectProtectionSpace = 3; + external CSSM_DATA_PTR Value; } -abstract class NSURLSessionResponseDisposition { - /// Cancel the load, this is the same as -[task cancel] - static const int NSURLSessionResponseCancel = 0; +typedef CSSM_DB_ATTRIBUTE_INFO = cssm_db_attribute_info; - /// Allow the load to continue - static const int NSURLSessionResponseAllow = 1; +final class cssm_db_record_attribute_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; - /// Turn this request into a download - static const int NSURLSessionResponseBecomeDownload = 2; + @uint32() + external int NumberOfAttributes; - /// Turn this task into a stream task - static const int NSURLSessionResponseBecomeStream = 3; + external CSSM_DB_ATTRIBUTE_INFO_PTR AttributeInfo; } -/// The resource fetch type. -abstract class NSURLSessionTaskMetricsResourceFetchType { - static const int NSURLSessionTaskMetricsResourceFetchTypeUnknown = 0; +typedef CSSM_DB_RECORDTYPE = uint32; +typedef CSSM_DB_ATTRIBUTE_INFO_PTR = ffi.Pointer; - /// The resource was loaded over the network. - static const int NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad = 1; +final class cssm_db_record_attribute_data extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; - /// The resource was pushed by the server to the client. - static const int NSURLSessionTaskMetricsResourceFetchTypeServerPush = 2; + @uint32() + external int SemanticInformation; - /// The resource was retrieved from the local storage. - static const int NSURLSessionTaskMetricsResourceFetchTypeLocalCache = 3; + @uint32() + external int NumberOfAttributes; + + external CSSM_DB_ATTRIBUTE_DATA_PTR AttributeData; } -/// DNS protocol used for domain resolution. -abstract class NSURLSessionTaskMetricsDomainResolutionProtocol { - static const int NSURLSessionTaskMetricsDomainResolutionProtocolUnknown = 0; +typedef CSSM_DB_ATTRIBUTE_DATA_PTR = ffi.Pointer; - /// Resolution used DNS over UDP. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolUDP = 1; +final class cssm_db_parsing_module_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int RecordType; - /// Resolution used DNS over TCP. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolTCP = 2; + external CSSM_SUBSERVICE_UID ModuleSubserviceUid; +} - /// Resolution used DNS over TLS. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolTLS = 3; +final class cssm_db_index_info extends ffi.Struct { + @CSSM_DB_INDEX_TYPE() + external int IndexType; - /// Resolution used DNS over HTTPS. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS = 4; + @CSSM_DB_INDEXED_DATA_LOCATION() + external int IndexedDataLocation; + + external CSSM_DB_ATTRIBUTE_INFO Info; } -/// This class defines the performance metrics collected for a request/response transaction during the task execution. -class NSURLSessionTaskTransactionMetrics extends NSObject { - NSURLSessionTaskTransactionMetrics._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_DB_INDEX_TYPE = uint32; +typedef CSSM_DB_INDEXED_DATA_LOCATION = uint32; - /// Returns a [NSURLSessionTaskTransactionMetrics] that points to the same underlying object as [other]. - static NSURLSessionTaskTransactionMetrics castFrom( - T other) { - return NSURLSessionTaskTransactionMetrics._(other._id, other._lib, - retain: true, release: true); - } +final class cssm_db_unique_record extends ffi.Struct { + external CSSM_DB_INDEX_INFO RecordLocator; - /// Returns a [NSURLSessionTaskTransactionMetrics] that wraps the given raw object pointer. - static NSURLSessionTaskTransactionMetrics castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTaskTransactionMetrics._(other, lib, - retain: retain, release: release); - } + external SecAsn1Item RecordIdentifier; +} - /// Returns whether [obj] is an instance of [NSURLSessionTaskTransactionMetrics]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTaskTransactionMetrics1); - } +typedef CSSM_DB_INDEX_INFO = cssm_db_index_info; - /// Represents the transaction request. - NSURLRequest? get request { - final _ret = _lib._objc_msgSend_371(_id, _lib._sel_request1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } +final class cssm_db_record_index_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; - /// Represents the transaction response. Can be nil if error occurred and no response was generated. - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_373(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int NumberOfIndexes; - /// fetchStartDate returns the time when the user agent started fetching the resource, whether or not the resource was retrieved from the server or local resources. - /// - /// The following metrics will be set to nil, if a persistent connection was used or the resource was retrieved from local resources: - /// - /// domainLookupStartDate - /// domainLookupEndDate - /// connectStartDate - /// connectEndDate - /// secureConnectionStartDate - /// secureConnectionEndDate - NSDate? get fetchStartDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_fetchStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + external CSSM_DB_INDEX_INFO_PTR IndexInfo; +} - /// domainLookupStartDate returns the time immediately before the user agent started the name lookup for the resource. - NSDate? get domainLookupStartDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_domainLookupStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_DB_INDEX_INFO_PTR = ffi.Pointer; - /// domainLookupEndDate returns the time after the name lookup was completed. - NSDate? get domainLookupEndDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_domainLookupEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +final class cssm_dbinfo extends ffi.Struct { + @uint32() + external int NumberOfRecordTypes; - /// connectStartDate is the time immediately before the user agent started establishing the connection to the server. - /// - /// For example, this would correspond to the time immediately before the user agent started trying to establish the TCP connection. - NSDate? get connectStartDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_connectStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + external CSSM_DB_PARSING_MODULE_INFO_PTR DefaultParsingModules; - /// If an encrypted connection was used, secureConnectionStartDate is the time immediately before the user agent started the security handshake to secure the current connection. - /// - /// For example, this would correspond to the time immediately before the user agent started the TLS handshake. - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSDate? get secureConnectionStartDate { - final _ret = - _lib._objc_msgSend_353(_id, _lib._sel_secureConnectionStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + external CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR RecordAttributeNames; + + external CSSM_DB_RECORD_INDEX_INFO_PTR RecordIndexes; + + @CSSM_BOOL() + external int IsLocal; + + external ffi.Pointer AccessPath; + + external ffi.Pointer Reserved; +} + +typedef CSSM_DB_PARSING_MODULE_INFO_PTR + = ffi.Pointer; +typedef CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR + = ffi.Pointer; +typedef CSSM_DB_RECORD_INDEX_INFO_PTR = ffi.Pointer; + +final class cssm_selection_predicate extends ffi.Struct { + @CSSM_DB_OPERATOR() + external int DbOperator; + + external CSSM_DB_ATTRIBUTE_DATA Attribute; +} + +typedef CSSM_DB_OPERATOR = uint32; +typedef CSSM_DB_ATTRIBUTE_DATA = cssm_db_attribute_data; + +final class cssm_query_limits extends ffi.Struct { + @uint32() + external int TimeLimit; + + @uint32() + external int SizeLimit; +} - /// If an encrypted connection was used, secureConnectionEndDate is the time immediately after the security handshake completed. - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSDate? get secureConnectionEndDate { - final _ret = - _lib._objc_msgSend_353(_id, _lib._sel_secureConnectionEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +final class cssm_query extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int RecordType; - /// connectEndDate is the time immediately after the user agent finished establishing the connection to the server, including completion of security-related and other handshakes. - NSDate? get connectEndDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_connectEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + @CSSM_DB_CONJUNCTIVE() + external int Conjunctive; - /// requestStartDate is the time immediately before the user agent started requesting the source, regardless of whether the resource was retrieved from the server or local resources. - /// - /// For example, this would correspond to the time immediately before the user agent sent an HTTP GET request. - NSDate? get requestStartDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_requestStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int NumSelectionPredicates; - /// requestEndDate is the time immediately after the user agent finished requesting the source, regardless of whether the resource was retrieved from the server or local resources. - /// - /// For example, this would correspond to the time immediately after the user agent finished sending the last byte of the request. - NSDate? get requestEndDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_requestEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + external CSSM_SELECTION_PREDICATE_PTR SelectionPredicate; - /// responseStartDate is the time immediately after the user agent received the first byte of the response from the server or from local resources. - /// - /// For example, this would correspond to the time immediately after the user agent received the first byte of an HTTP response. - NSDate? get responseStartDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_responseStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + external CSSM_QUERY_LIMITS QueryLimits; - /// responseEndDate is the time immediately after the user agent received the last byte of the resource. - NSDate? get responseEndDate { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_responseEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + @CSSM_QUERY_FLAGS() + external int QueryFlags; +} - /// The network protocol used to fetch the resource, as identified by the ALPN Protocol ID Identification Sequence [RFC7301]. - /// E.g., h2, http/1.1, spdy/3.1. - /// - /// When a proxy is configured AND a tunnel connection is established, then this attribute returns the value for the tunneled protocol. - /// - /// For example: - /// If no proxy were used, and HTTP/2 was negotiated, then h2 would be returned. - /// If HTTP/1.1 were used to the proxy, and the tunneled connection was HTTP/2, then h2 would be returned. - /// If HTTP/1.1 were used to the proxy, and there were no tunnel, then http/1.1 would be returned. - NSString? get networkProtocolName { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_networkProtocolName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_DB_CONJUNCTIVE = uint32; +typedef CSSM_SELECTION_PREDICATE_PTR = ffi.Pointer; +typedef CSSM_QUERY_LIMITS = cssm_query_limits; +typedef CSSM_QUERY_FLAGS = uint32; - /// This property is set to YES if a proxy connection was used to fetch the resource. - bool get proxyConnection { - return _lib._objc_msgSend_11(_id, _lib._sel_isProxyConnection1); - } +final class cssm_dl_pkcs11_attributes extends ffi.Struct { + @uint32() + external int DeviceAccessFlags; +} - /// This property is set to YES if a persistent connection was used to fetch the resource. - bool get reusedConnection { - return _lib._objc_msgSend_11(_id, _lib._sel_isReusedConnection1); - } +final class cssm_name_list extends ffi.Struct { + @uint32() + external int NumStrings; - /// Indicates whether the resource was loaded, pushed or retrieved from the local cache. - int get resourceFetchType { - return _lib._objc_msgSend_428(_id, _lib._sel_resourceFetchType1); - } + external ffi.Pointer> String; +} - /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. - int get countOfRequestHeaderBytesSent { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfRequestHeaderBytesSent1); - } +final class cssm_db_schema_attribute_info extends ffi.Struct { + @uint32() + external int AttributeId; - /// countOfRequestBodyBytesSent is the number of bytes transferred for request body. - /// It includes protocol-specific framing, transfer encoding, and content encoding. - int get countOfRequestBodyBytesSent { - return _lib._objc_msgSend_325(_id, _lib._sel_countOfRequestBodyBytesSent1); - } + external ffi.Pointer AttributeName; - /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. - int get countOfRequestBodyBytesBeforeEncoding { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); - } + external SecAsn1Oid AttributeNameID; - /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. - int get countOfResponseHeaderBytesReceived { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfResponseHeaderBytesReceived1); - } + @CSSM_DB_ATTRIBUTE_FORMAT() + external int DataType; +} - /// countOfResponseBodyBytesReceived is the number of bytes transferred for response header. - /// It includes protocol-specific framing, transfer encoding, and content encoding. - int get countOfResponseBodyBytesReceived { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfResponseBodyBytesReceived1); - } +final class cssm_db_schema_index_info extends ffi.Struct { + @uint32() + external int AttributeId; - /// countOfResponseBodyBytesAfterDecoding is the size of data delivered to your delegate or completion handler. - int get countOfResponseBodyBytesAfterDecoding { - return _lib._objc_msgSend_325( - _id, _lib._sel_countOfResponseBodyBytesAfterDecoding1); - } + @uint32() + external int IndexId; - /// localAddress is the IP address string of the local interface for the connection. - /// - /// For multipath protocols, this is the local address of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSString? get localAddress { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localAddress1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + @CSSM_DB_INDEX_TYPE() + external int IndexType; - /// localPort is the port number of the local interface for the connection. - /// - /// For multipath protocols, this is the local port of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSNumber? get localPort { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_localPort1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } + @CSSM_DB_INDEXED_DATA_LOCATION() + external int IndexedDataLocation; +} - /// remoteAddress is the IP address string of the remote interface for the connection. - /// - /// For multipath protocols, this is the remote address of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSString? get remoteAddress { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_remoteAddress1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +final class cssm_x509_type_value_pair extends ffi.Struct { + external SecAsn1Oid type; - /// remotePort is the port number of the remote interface for the connection. - /// - /// For multipath protocols, this is the remote port of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSNumber? get remotePort { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_remotePort1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } + @CSSM_BER_TAG() + external int valueType; - /// negotiatedTLSProtocolVersion is the TLS protocol version negotiated for the connection. - /// It is a 2-byte sequence in host byte order. - /// - /// Please refer to tls_protocol_version_t enum in Security/SecProtocolTypes.h - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSNumber? get negotiatedTLSProtocolVersion { - final _ret = - _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSProtocolVersion1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } + external SecAsn1Item value; +} - /// negotiatedTLSCipherSuite is the TLS cipher suite negotiated for the connection. - /// It is a 2-byte sequence in host byte order. - /// - /// Please refer to tls_ciphersuite_t enum in Security/SecProtocolTypes.h - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSNumber? get negotiatedTLSCipherSuite { - final _ret = - _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSCipherSuite1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_BER_TAG = uint8; - /// Whether the connection is established over a cellular interface. - bool get cellular { - return _lib._objc_msgSend_11(_id, _lib._sel_isCellular1); - } +final class cssm_x509_rdn extends ffi.Struct { + @uint32() + external int numberOfPairs; - /// Whether the connection is established over an expensive interface. - bool get expensive { - return _lib._objc_msgSend_11(_id, _lib._sel_isExpensive1); - } + external CSSM_X509_TYPE_VALUE_PAIR_PTR AttributeTypeAndValue; +} - /// Whether the connection is established over a constrained interface. - bool get constrained { - return _lib._objc_msgSend_11(_id, _lib._sel_isConstrained1); - } +typedef CSSM_X509_TYPE_VALUE_PAIR_PTR = ffi.Pointer; - /// Whether a multipath protocol is successfully negotiated for the connection. - bool get multipath { - return _lib._objc_msgSend_11(_id, _lib._sel_isMultipath1); - } +final class cssm_x509_name extends ffi.Struct { + @uint32() + external int numberOfRDNs; - /// DNS protocol used for domain resolution. - int get domainResolutionProtocol { - return _lib._objc_msgSend_429(_id, _lib._sel_domainResolutionProtocol1); - } + external CSSM_X509_RDN_PTR RelativeDistinguishedName; +} - @override - NSURLSessionTaskTransactionMetrics init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: true, release: true); - } +typedef CSSM_X509_RDN_PTR = ffi.Pointer; - static NSURLSessionTaskTransactionMetrics new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_new1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: false, release: true); - } +final class cssm_x509_time extends ffi.Struct { + @CSSM_BER_TAG() + external int timeType; - static NSURLSessionTaskTransactionMetrics alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_alloc1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: false, release: true); - } + external SecAsn1Item time; } -class NSURLSessionTaskMetrics extends NSObject { - NSURLSessionTaskMetrics._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final class x509_validity extends ffi.Struct { + external CSSM_X509_TIME notBefore; - /// Returns a [NSURLSessionTaskMetrics] that points to the same underlying object as [other]. - static NSURLSessionTaskMetrics castFrom(T other) { - return NSURLSessionTaskMetrics._(other._id, other._lib, - retain: true, release: true); - } + external CSSM_X509_TIME notAfter; +} - /// Returns a [NSURLSessionTaskMetrics] that wraps the given raw object pointer. - static NSURLSessionTaskMetrics castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTaskMetrics._(other, lib, - retain: retain, release: release); - } +typedef CSSM_X509_TIME = cssm_x509_time; - /// Returns whether [obj] is an instance of [NSURLSessionTaskMetrics]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTaskMetrics1); - } +final class cssm_x509ext_basicConstraints extends ffi.Struct { + @CSSM_BOOL() + external int cA; - /// transactionMetrics array contains the metrics collected for every request/response transaction created during the task execution. - NSArray? get transactionMetrics { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_transactionMetrics1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + @CSSM_X509_OPTION() + external int pathLenConstraintPresent; - /// Interval from the task creation time to the task completion time. - /// Task creation time is the time when the task was instantiated. - /// Task completion time is the time when the task is about to change its internal state to completed. - NSDateInterval? get taskInterval { - final _ret = _lib._objc_msgSend_430(_id, _lib._sel_taskInterval1); - return _ret.address == 0 - ? null - : NSDateInterval._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int pathLenConstraint; +} - /// redirectCount is the number of redirects that were recorded. - int get redirectCount { - return _lib._objc_msgSend_12(_id, _lib._sel_redirectCount1); - } +typedef CSSM_X509_OPTION = CSSM_BOOL; - @override - NSURLSessionTaskMetrics init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: true, release: true); - } +abstract class extension_data_format { + static const int CSSM_X509_DATAFORMAT_ENCODED = 0; + static const int CSSM_X509_DATAFORMAT_PARSED = 1; + static const int CSSM_X509_DATAFORMAT_PAIR = 2; +} - static NSURLSessionTaskMetrics new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskMetrics1, _lib._sel_new1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); - } +final class cssm_x509_extensionTagAndValue extends ffi.Struct { + @CSSM_BER_TAG() + external int type; - static NSURLSessionTaskMetrics alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskMetrics1, _lib._sel_alloc1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); - } + external SecAsn1Item value; } -class NSDateInterval extends _ObjCWrapper { - NSDateInterval._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final class cssm_x509ext_pair extends ffi.Struct { + external CSSM_X509EXT_TAGandVALUE tagAndValue; - /// Returns a [NSDateInterval] that points to the same underlying object as [other]. - static NSDateInterval castFrom(T other) { - return NSDateInterval._(other._id, other._lib, retain: true, release: true); - } + external ffi.Pointer parsedValue; +} - /// Returns a [NSDateInterval] that wraps the given raw object pointer. - static NSDateInterval castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDateInterval._(other, lib, retain: retain, release: release); - } +typedef CSSM_X509EXT_TAGandVALUE = cssm_x509_extensionTagAndValue; - /// Returns whether [obj] is an instance of [NSDateInterval]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSDateInterval1); - } +final class cssm_x509_extension extends ffi.Struct { + external SecAsn1Oid extnId; + + @CSSM_BOOL() + external int critical; + + @ffi.Int32() + external int format; + + external cssm_x509ext_value value; + + external SecAsn1Item BERvalue; } -abstract class NSItemProviderRepresentationVisibility { - static const int NSItemProviderRepresentationVisibilityAll = 0; - static const int NSItemProviderRepresentationVisibilityTeam = 1; - static const int NSItemProviderRepresentationVisibilityGroup = 2; - static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; +final class cssm_x509ext_value extends ffi.Union { + external ffi.Pointer tagAndValue; + + external ffi.Pointer parsedValue; + + external ffi.Pointer valuePair; } -abstract class NSItemProviderFileOptions { - static const int NSItemProviderFileOptionOpenInPlace = 1; +typedef CSSM_X509EXT_PAIR = cssm_x509ext_pair; + +final class cssm_x509_extensions extends ffi.Struct { + @uint32() + external int numberOfExtensions; + + external CSSM_X509_EXTENSION_PTR extensions; } -class NSItemProvider extends NSObject { - NSItemProvider._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_X509_EXTENSION_PTR = ffi.Pointer; - /// Returns a [NSItemProvider] that points to the same underlying object as [other]. - static NSItemProvider castFrom(T other) { - return NSItemProvider._(other._id, other._lib, retain: true, release: true); - } +final class cssm_x509_tbs_certificate extends ffi.Struct { + external SecAsn1Item version; - /// Returns a [NSItemProvider] that wraps the given raw object pointer. - static NSItemProvider castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSItemProvider._(other, lib, retain: retain, release: release); - } + external SecAsn1Item serialNumber; - /// Returns whether [obj] is an instance of [NSItemProvider]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSItemProvider1); - } + external SecAsn1AlgId signature; - @override - NSItemProvider init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_NAME issuer; - void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( - NSString? typeIdentifier, int visibility, ObjCBlock45 loadHandler) { - return _lib._objc_msgSend_431( - _id, - _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - visibility, - loadHandler._id); - } + external CSSM_X509_VALIDITY validity; - void - registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( - NSString? typeIdentifier, - int fileOptions, - int visibility, - ObjCBlock47 loadHandler) { - return _lib._objc_msgSend_432( - _id, - _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - fileOptions, - visibility, - loadHandler._id); - } + external CSSM_X509_NAME subject; - NSArray? get registeredTypeIdentifiers { - final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_registeredTypeIdentifiers1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + external SecAsn1PubKeyInfo subjectPublicKeyInfo; - NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { - final _ret = _lib._objc_msgSend_433( - _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); - return NSArray._(_ret, _lib, retain: true, release: true); - } + external SecAsn1Item issuerUniqueIdentifier; - bool hasItemConformingToTypeIdentifier_(NSString? typeIdentifier) { - return _lib._objc_msgSend_22( - _id, - _lib._sel_hasItemConformingToTypeIdentifier_1, - typeIdentifier?._id ?? ffi.nullptr); - } + external SecAsn1Item subjectUniqueIdentifier; - bool hasRepresentationConformingToTypeIdentifier_fileOptions_( - NSString? typeIdentifier, int fileOptions) { - return _lib._objc_msgSend_434( - _id, - _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, - typeIdentifier?._id ?? ffi.nullptr, - fileOptions); - } + external CSSM_X509_EXTENSIONS extensions; +} - NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( - NSString? typeIdentifier, ObjCBlock46 completionHandler) { - final _ret = _lib._objc_msgSend_435( - _id, - _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_X509_NAME = cssm_x509_name; +typedef CSSM_X509_VALIDITY = x509_validity; +typedef CSSM_X509_EXTENSIONS = cssm_x509_extensions; - NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( - NSString? typeIdentifier, ObjCBlock49 completionHandler) { - final _ret = _lib._objc_msgSend_436( - _id, - _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +final class cssm_x509_signature extends ffi.Struct { + external SecAsn1AlgId algorithmIdentifier; - NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( - NSString? typeIdentifier, ObjCBlock48 completionHandler) { - final _ret = _lib._objc_msgSend_437( - _id, - _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); - } + external SecAsn1Item encrypted; +} + +final class cssm_x509_signed_certificate extends ffi.Struct { + external CSSM_X509_TBS_CERTIFICATE certificate; + + external CSSM_X509_SIGNATURE signature; +} + +typedef CSSM_X509_TBS_CERTIFICATE = cssm_x509_tbs_certificate; +typedef CSSM_X509_SIGNATURE = cssm_x509_signature; + +final class cssm_x509ext_policyQualifierInfo extends ffi.Struct { + external SecAsn1Oid policyQualifierId; + + external SecAsn1Item value; +} - NSString? get suggestedName { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +final class cssm_x509ext_policyQualifiers extends ffi.Struct { + @uint32() + external int numberOfPolicyQualifiers; - set suggestedName(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); - } + external ffi.Pointer policyQualifier; +} - NSItemProvider initWithObject_(NSObject? object) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_initWithObject_1, object?._id ?? ffi.nullptr); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_X509EXT_POLICYQUALIFIERINFO = cssm_x509ext_policyQualifierInfo; - void registerObject_visibility_(NSObject? object, int visibility) { - return _lib._objc_msgSend_438(_id, _lib._sel_registerObject_visibility_1, - object?._id ?? ffi.nullptr, visibility); - } +final class cssm_x509ext_policyInfo extends ffi.Struct { + external SecAsn1Oid policyIdentifier; - void registerObjectOfClass_visibility_loadHandler_( - NSObject? aClass, int visibility, ObjCBlock50 loadHandler) { - return _lib._objc_msgSend_439( - _id, - _lib._sel_registerObjectOfClass_visibility_loadHandler_1, - aClass?._id ?? ffi.nullptr, - visibility, - loadHandler._id); - } + external CSSM_X509EXT_POLICYQUALIFIERS policyQualifiers; +} - bool canLoadObjectOfClass_(NSObject? aClass) { - return _lib._objc_msgSend_0( - _id, _lib._sel_canLoadObjectOfClass_1, aClass?._id ?? ffi.nullptr); - } +typedef CSSM_X509EXT_POLICYQUALIFIERS = cssm_x509ext_policyQualifiers; - NSProgress loadObjectOfClass_completionHandler_( - NSObject? aClass, ObjCBlock51 completionHandler) { - final _ret = _lib._objc_msgSend_440( - _id, - _lib._sel_loadObjectOfClass_completionHandler_1, - aClass?._id ?? ffi.nullptr, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +final class cssm_x509_revoked_cert_entry extends ffi.Struct { + external SecAsn1Item certificateSerialNumber; - NSItemProvider initWithItem_typeIdentifier_( - NSObject? item, NSString? typeIdentifier) { - final _ret = _lib._objc_msgSend_441( - _id, - _lib._sel_initWithItem_typeIdentifier_1, - item?._id ?? ffi.nullptr, - typeIdentifier?._id ?? ffi.nullptr); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_TIME revocationDate; - NSItemProvider initWithContentsOfURL_(NSURL? fileURL) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithContentsOfURL_1, fileURL?._id ?? ffi.nullptr); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_EXTENSIONS extensions; +} - void registerItemForTypeIdentifier_loadHandler_( - NSString? typeIdentifier, NSItemProviderLoadHandler loadHandler) { - return _lib._objc_msgSend_442( - _id, - _lib._sel_registerItemForTypeIdentifier_loadHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - loadHandler); - } +final class cssm_x509_revoked_cert_list extends ffi.Struct { + @uint32() + external int numberOfRevokedCertEntries; - void loadItemForTypeIdentifier_options_completionHandler_( - NSString? typeIdentifier, - NSDictionary? options, - NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_443( - _id, - _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - options?._id ?? ffi.nullptr, - completionHandler); - } + external CSSM_X509_REVOKED_CERT_ENTRY_PTR revokedCertEntry; +} - NSItemProviderLoadHandler get previewImageHandler { - return _lib._objc_msgSend_444(_id, _lib._sel_previewImageHandler1); - } +typedef CSSM_X509_REVOKED_CERT_ENTRY_PTR + = ffi.Pointer; - set previewImageHandler(NSItemProviderLoadHandler value) { - _lib._objc_msgSend_445(_id, _lib._sel_setPreviewImageHandler_1, value); - } +final class cssm_x509_tbs_certlist extends ffi.Struct { + external SecAsn1Item version; - void loadPreviewImageWithOptions_completionHandler_(NSDictionary? options, - NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_446( - _id, - _lib._sel_loadPreviewImageWithOptions_completionHandler_1, - options?._id ?? ffi.nullptr, - completionHandler); - } + external SecAsn1AlgId signature; - static NSItemProvider new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_new1); - return NSItemProvider._(_ret, _lib, retain: false, release: true); - } + external CSSM_X509_NAME issuer; - static NSItemProvider alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_alloc1); - return NSItemProvider._(_ret, _lib, retain: false, release: true); - } -} + external CSSM_X509_TIME thisUpdate; -ffi.Pointer _ObjCBlock45_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>()(arg0); + external CSSM_X509_TIME nextUpdate; + + external CSSM_X509_REVOKED_CERT_LIST_PTR revokedCertificates; + + external CSSM_X509_EXTENSIONS extensions; } -final _ObjCBlock45_closureRegistry = {}; -int _ObjCBlock45_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock45_registerClosure(Function fn) { - final id = ++_ObjCBlock45_closureRegistryIndex; - _ObjCBlock45_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CSSM_X509_REVOKED_CERT_LIST_PTR + = ffi.Pointer; + +final class cssm_x509_signed_crl extends ffi.Struct { + external CSSM_X509_TBS_CERTLIST tbsCertList; + + external CSSM_X509_SIGNATURE signature; } -ffi.Pointer _ObjCBlock45_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock45_closureRegistry[block.ref.target.address]!(arg0); +typedef CSSM_X509_TBS_CERTLIST = cssm_x509_tbs_certlist; + +abstract class __CE_GeneralNameType { + static const int GNT_OtherName = 0; + static const int GNT_RFC822Name = 1; + static const int GNT_DNSName = 2; + static const int GNT_X400Address = 3; + static const int GNT_DirectoryName = 4; + static const int GNT_EdiPartyName = 5; + static const int GNT_URI = 6; + static const int GNT_IPAddress = 7; + static const int GNT_RegisteredID = 8; } -class ObjCBlock45 extends _ObjCBlockBase { - ObjCBlock45._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class __CE_OtherName extends ffi.Struct { + external SecAsn1Oid typeId; - /// Creates a block from a C function pointer. - ObjCBlock45.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock45_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external SecAsn1Item value; +} - /// Creates a block from a Dart function. - ObjCBlock45.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock45_closureTrampoline) - .cast(), - _ObjCBlock45_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); - } +final class __CE_GeneralName extends ffi.Struct { + @ffi.Int32() + external int nameType; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @CSSM_BOOL() + external int berEncoded; + + external SecAsn1Item name; } -void _ObjCBlock46_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); +final class __CE_GeneralNames extends ffi.Struct { + @uint32() + external int numNames; + + external ffi.Pointer generalName; } -final _ObjCBlock46_closureRegistry = {}; -int _ObjCBlock46_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock46_registerClosure(Function fn) { - final id = ++_ObjCBlock46_closureRegistryIndex; - _ObjCBlock46_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CE_GeneralName = __CE_GeneralName; + +final class __CE_AuthorityKeyID extends ffi.Struct { + @CSSM_BOOL() + external int keyIdentifierPresent; + + external SecAsn1Item keyIdentifier; + + @CSSM_BOOL() + external int generalNamesPresent; + + external ffi.Pointer generalNames; + + @CSSM_BOOL() + external int serialNumberPresent; + + external SecAsn1Item serialNumber; } -void _ObjCBlock46_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock46_closureRegistry[block.ref.target.address]!(arg0, arg1); +typedef CE_GeneralNames = __CE_GeneralNames; + +final class __CE_ExtendedKeyUsage extends ffi.Struct { + @uint32() + external int numPurposes; + + external CSSM_OID_PTR purposes; } -class ObjCBlock46 extends _ObjCBlockBase { - ObjCBlock46._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CSSM_OID_PTR = ffi.Pointer; - /// Creates a block from a C function pointer. - ObjCBlock46.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock46_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class __CE_BasicConstraints extends ffi.Struct { + @CSSM_BOOL() + external int cA; - /// Creates a block from a Dart function. - ObjCBlock46.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock46_closureTrampoline) - .cast(), - _ObjCBlock46_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + @CSSM_BOOL() + external int pathLenConstraintPresent; - ffi.Pointer<_ObjCBlock> get pointer => _id; + @uint32() + external int pathLenConstraint; } -ffi.Pointer _ObjCBlock47_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>()(arg0); +final class __CE_PolicyQualifierInfo extends ffi.Struct { + external SecAsn1Oid policyQualifierId; + + external SecAsn1Item qualifier; } -final _ObjCBlock47_closureRegistry = {}; -int _ObjCBlock47_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock47_registerClosure(Function fn) { - final id = ++_ObjCBlock47_closureRegistryIndex; - _ObjCBlock47_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +final class __CE_PolicyInformation extends ffi.Struct { + external SecAsn1Oid certPolicyId; + + @uint32() + external int numPolicyQualifiers; + + external ffi.Pointer policyQualifiers; } -ffi.Pointer _ObjCBlock47_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock47_closureRegistry[block.ref.target.address]!(arg0); +typedef CE_PolicyQualifierInfo = __CE_PolicyQualifierInfo; + +final class __CE_CertPolicies extends ffi.Struct { + @uint32() + external int numPolicies; + + external ffi.Pointer policies; } -class ObjCBlock47 extends _ObjCBlockBase { - ObjCBlock47._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CE_PolicyInformation = __CE_PolicyInformation; - /// Creates a block from a C function pointer. - ObjCBlock47.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock47_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +abstract class __CE_CrlDistributionPointNameType { + static const int CE_CDNT_FullName = 0; + static const int CE_CDNT_NameRelativeToCrlIssuer = 1; +} - /// Creates a block from a Dart function. - ObjCBlock47.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock47_closureTrampoline) - .cast(), - _ObjCBlock47_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); - } +final class __CE_DistributionPointName extends ffi.Struct { + @ffi.Int32() + external int nameType; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external UnnamedUnion5 dpn; } -void _ObjCBlock48_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); +final class UnnamedUnion5 extends ffi.Union { + external ffi.Pointer fullName; + + external CSSM_X509_RDN_PTR rdn; } -final _ObjCBlock48_closureRegistry = {}; -int _ObjCBlock48_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock48_registerClosure(Function fn) { - final id = ++_ObjCBlock48_closureRegistryIndex; - _ObjCBlock48_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +final class __CE_CRLDistributionPoint extends ffi.Struct { + external ffi.Pointer distPointName; + + @CSSM_BOOL() + external int reasonsPresent; + + @CE_CrlDistReasonFlags() + external int reasons; + + external ffi.Pointer crlIssuer; } -void _ObjCBlock48_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _ObjCBlock48_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +typedef CE_DistributionPointName = __CE_DistributionPointName; +typedef CE_CrlDistReasonFlags = uint8; + +final class __CE_CRLDistPointsSyntax extends ffi.Struct { + @uint32() + external int numDistPoints; + + external ffi.Pointer distPoints; } -class ObjCBlock48 extends _ObjCBlockBase { - ObjCBlock48._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CE_CRLDistributionPoint = __CE_CRLDistributionPoint; - /// Creates a block from a C function pointer. - ObjCBlock48.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock48_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class __CE_AccessDescription extends ffi.Struct { + external SecAsn1Oid accessMethod; - /// Creates a block from a Dart function. - ObjCBlock48.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock48_closureTrampoline) - .cast(), - _ObjCBlock48_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + external CE_GeneralName accessLocation; +} + +final class __CE_AuthorityInfoAccess extends ffi.Struct { + @uint32() + external int numAccessDescriptions; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external ffi.Pointer accessDescriptions; } -void _ObjCBlock49_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} +typedef CE_AccessDescription = __CE_AccessDescription; -final _ObjCBlock49_closureRegistry = {}; -int _ObjCBlock49_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock49_registerClosure(Function fn) { - final id = ++_ObjCBlock49_closureRegistryIndex; - _ObjCBlock49_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +final class __CE_SemanticsInformation extends ffi.Struct { + external ffi.Pointer semanticsIdentifier; -void _ObjCBlock49_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock49_closureRegistry[block.ref.target.address]!(arg0, arg1); + external ffi.Pointer + nameRegistrationAuthorities; } -class ObjCBlock49 extends _ObjCBlockBase { - ObjCBlock49._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CE_NameRegistrationAuthorities = CE_GeneralNames; - /// Creates a block from a C function pointer. - ObjCBlock49.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock49_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class __CE_QC_Statement extends ffi.Struct { + external SecAsn1Oid statementId; - /// Creates a block from a Dart function. - ObjCBlock49.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock49_closureTrampoline) - .cast(), - _ObjCBlock49_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + external ffi.Pointer semanticsInfo; - ffi.Pointer<_ObjCBlock> get pointer => _id; + external ffi.Pointer otherInfo; } -ffi.Pointer _ObjCBlock50_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>()(arg0); -} +typedef CE_SemanticsInformation = __CE_SemanticsInformation; -final _ObjCBlock50_closureRegistry = {}; -int _ObjCBlock50_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock50_registerClosure(Function fn) { - final id = ++_ObjCBlock50_closureRegistryIndex; - _ObjCBlock50_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +final class __CE_QC_Statements extends ffi.Struct { + @uint32() + external int numQCStatements; -ffi.Pointer _ObjCBlock50_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock50_closureRegistry[block.ref.target.address]!(arg0); + external ffi.Pointer qcStatements; } -class ObjCBlock50 extends _ObjCBlockBase { - ObjCBlock50._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CE_QC_Statement = __CE_QC_Statement; - /// Creates a block from a C function pointer. - ObjCBlock50.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock50_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class __CE_IssuingDistributionPoint extends ffi.Struct { + external ffi.Pointer distPointName; - /// Creates a block from a Dart function. - ObjCBlock50.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock50_closureTrampoline) - .cast(), - _ObjCBlock50_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); - } + @CSSM_BOOL() + external int onlyUserCertsPresent; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + @CSSM_BOOL() + external int onlyUserCerts; -void _ObjCBlock51_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); + @CSSM_BOOL() + external int onlyCACertsPresent; + + @CSSM_BOOL() + external int onlyCACerts; + + @CSSM_BOOL() + external int onlySomeReasonsPresent; + + @CE_CrlDistReasonFlags() + external int onlySomeReasons; + + @CSSM_BOOL() + external int indirectCrlPresent; + + @CSSM_BOOL() + external int indirectCrl; } -final _ObjCBlock51_closureRegistry = {}; -int _ObjCBlock51_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock51_registerClosure(Function fn) { - final id = ++_ObjCBlock51_closureRegistryIndex; - _ObjCBlock51_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +final class __CE_GeneralSubtree extends ffi.Struct { + external ffi.Pointer base; + + @uint32() + external int minimum; + + @CSSM_BOOL() + external int maximumPresent; + + @uint32() + external int maximum; } -void _ObjCBlock51_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock51_closureRegistry[block.ref.target.address]!(arg0, arg1); +final class __CE_GeneralSubtrees extends ffi.Struct { + @uint32() + external int numSubtrees; + + external ffi.Pointer subtrees; } -class ObjCBlock51 extends _ObjCBlockBase { - ObjCBlock51._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +typedef CE_GeneralSubtree = __CE_GeneralSubtree; - /// Creates a block from a C function pointer. - ObjCBlock51.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock51_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class __CE_NameConstraints extends ffi.Struct { + external ffi.Pointer permitted; - /// Creates a block from a Dart function. - ObjCBlock51.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock51_closureTrampoline) - .cast(), - _ObjCBlock51_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + external ffi.Pointer excluded; +} - ffi.Pointer<_ObjCBlock> get pointer => _id; +typedef CE_GeneralSubtrees = __CE_GeneralSubtrees; + +final class __CE_PolicyMapping extends ffi.Struct { + external SecAsn1Oid issuerDomainPolicy; + + external SecAsn1Oid subjectDomainPolicy; } -typedef NSItemProviderLoadHandler = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock52_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); +final class __CE_PolicyMappings extends ffi.Struct { + @uint32() + external int numPolicyMappings; + + external ffi.Pointer policyMappings; } -final _ObjCBlock52_closureRegistry = {}; -int _ObjCBlock52_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock52_registerClosure(Function fn) { - final id = ++_ObjCBlock52_closureRegistryIndex; - _ObjCBlock52_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CE_PolicyMapping = __CE_PolicyMapping; + +final class __CE_PolicyConstraints extends ffi.Struct { + @CSSM_BOOL() + external int requireExplicitPolicyPresent; + + @uint32() + external int requireExplicitPolicy; + + @CSSM_BOOL() + external int inhibitPolicyMappingPresent; + + @uint32() + external int inhibitPolicyMapping; } -void _ObjCBlock52_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock52_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); +abstract class __CE_DataType { + static const int DT_AuthorityKeyID = 0; + static const int DT_SubjectKeyID = 1; + static const int DT_KeyUsage = 2; + static const int DT_SubjectAltName = 3; + static const int DT_IssuerAltName = 4; + static const int DT_ExtendedKeyUsage = 5; + static const int DT_BasicConstraints = 6; + static const int DT_CertPolicies = 7; + static const int DT_NetscapeCertType = 8; + static const int DT_CrlNumber = 9; + static const int DT_DeltaCrl = 10; + static const int DT_CrlReason = 11; + static const int DT_CrlDistributionPoints = 12; + static const int DT_IssuingDistributionPoint = 13; + static const int DT_AuthorityInfoAccess = 14; + static const int DT_Other = 15; + static const int DT_QC_Statements = 16; + static const int DT_NameConstraints = 17; + static const int DT_PolicyMappings = 18; + static const int DT_PolicyConstraints = 19; + static const int DT_InhibitAnyPolicy = 20; } -class ObjCBlock52 extends _ObjCBlockBase { - ObjCBlock52._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +final class CE_Data extends ffi.Union { + external CE_AuthorityKeyID authorityKeyID; - /// Creates a block from a C function pointer. - ObjCBlock52.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock52_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CE_SubjectKeyID subjectKeyID; - /// Creates a block from a Dart function. - ObjCBlock52.fromFunction( - NativeCupertinoHttp lib, - void Function(NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, ffi.Pointer arg2) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock52_closureTrampoline) - .cast(), - _ObjCBlock52_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + @CE_KeyUsage() + external int keyUsage; - ffi.Pointer<_ObjCBlock> get pointer => _id; -} + external CE_GeneralNames subjectAltName; -typedef NSItemProviderCompletionHandler = ffi.Pointer<_ObjCBlock>; + external CE_GeneralNames issuerAltName; -abstract class NSItemProviderErrorCode { - static const int NSItemProviderUnknownError = -1; - static const int NSItemProviderItemUnavailableError = -1000; - static const int NSItemProviderUnexpectedValueClassError = -1100; - static const int NSItemProviderUnavailableCoercionError = -1200; -} + external CE_ExtendedKeyUsage extendedKeyUsage; -typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; + external CE_BasicConstraints basicConstraints; -class NSMutableString extends NSString { - NSMutableString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + external CE_CertPolicies certPolicies; - /// Returns a [NSMutableString] that points to the same underlying object as [other]. - static NSMutableString castFrom(T other) { - return NSMutableString._(other._id, other._lib, - retain: true, release: true); - } + @CE_NetscapeCertType() + external int netscapeCertType; - /// Returns a [NSMutableString] that wraps the given raw object pointer. - static NSMutableString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableString._(other, lib, retain: retain, release: release); - } + @CE_CrlNumber() + external int crlNumber; - /// Returns whether [obj] is an instance of [NSMutableString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableString1); - } + @CE_DeltaCrl() + external int deltaCrl; - void replaceCharactersInRange_withString_(NSRange range, NSString? aString) { - return _lib._objc_msgSend_447( - _id, - _lib._sel_replaceCharactersInRange_withString_1, - range, - aString?._id ?? ffi.nullptr); - } + @CE_CrlReason() + external int crlReason; - void insertString_atIndex_(NSString? aString, int loc) { - return _lib._objc_msgSend_448(_id, _lib._sel_insertString_atIndex_1, - aString?._id ?? ffi.nullptr, loc); - } + external CE_CRLDistPointsSyntax crlDistPoints; + + external CE_IssuingDistributionPoint issuingDistPoint; + + external CE_AuthorityInfoAccess authorityInfoAccess; + + external CE_QC_Statements qualifiedCertStatements; + + external CE_NameConstraints nameConstraints; + + external CE_PolicyMappings policyMappings; + + external CE_PolicyConstraints policyConstraints; + + @CE_InhibitAnyPolicy() + external int inhibitAnyPolicy; + + external SecAsn1Item rawData; +} + +typedef CE_AuthorityKeyID = __CE_AuthorityKeyID; +typedef CE_SubjectKeyID = SecAsn1Item; +typedef CE_KeyUsage = uint16; +typedef CE_ExtendedKeyUsage = __CE_ExtendedKeyUsage; +typedef CE_BasicConstraints = __CE_BasicConstraints; +typedef CE_CertPolicies = __CE_CertPolicies; +typedef CE_NetscapeCertType = uint16; +typedef CE_CrlNumber = uint32; +typedef CE_DeltaCrl = uint32; +typedef CE_CrlReason = uint32; +typedef CE_CRLDistPointsSyntax = __CE_CRLDistPointsSyntax; +typedef CE_IssuingDistributionPoint = __CE_IssuingDistributionPoint; +typedef CE_AuthorityInfoAccess = __CE_AuthorityInfoAccess; +typedef CE_QC_Statements = __CE_QC_Statements; +typedef CE_NameConstraints = __CE_NameConstraints; +typedef CE_PolicyMappings = __CE_PolicyMappings; +typedef CE_PolicyConstraints = __CE_PolicyConstraints; +typedef CE_InhibitAnyPolicy = uint32; + +final class __CE_DataAndType extends ffi.Struct { + @ffi.Int32() + external int type; + + external CE_Data extension1; + + @CSSM_BOOL() + external int critical; +} - void deleteCharactersInRange_(NSRange range) { - return _lib._objc_msgSend_283( - _id, _lib._sel_deleteCharactersInRange_1, range); - } +final class cssm_acl_process_subject_selector extends ffi.Struct { + @uint16() + external int version; - void appendString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_appendString_1, aString?._id ?? ffi.nullptr); - } + @uint16() + external int mask; - void appendFormat_(NSString? format) { - return _lib._objc_msgSend_188( - _id, _lib._sel_appendFormat_1, format?._id ?? ffi.nullptr); - } + @uint32() + external int uid; - void setString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_setString_1, aString?._id ?? ffi.nullptr); - } + @uint32() + external int gid; +} - int replaceOccurrencesOfString_withString_options_range_(NSString? target, - NSString? replacement, int options, NSRange searchRange) { - return _lib._objc_msgSend_449( - _id, - _lib._sel_replaceOccurrencesOfString_withString_options_range_1, - target?._id ?? ffi.nullptr, - replacement?._id ?? ffi.nullptr, - options, - searchRange); - } +final class cssm_acl_keychain_prompt_selector extends ffi.Struct { + @uint16() + external int version; - bool applyTransform_reverse_range_updatedRange_(NSStringTransform transform, - bool reverse, NSRange range, NSRangePointer resultingRange) { - return _lib._objc_msgSend_450( - _id, - _lib._sel_applyTransform_reverse_range_updatedRange_1, - transform, - reverse, - range, - resultingRange); - } + @uint16() + external int flags; +} - NSMutableString initWithCapacity_(int capacity) { - final _ret = - _lib._objc_msgSend_451(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +abstract class cssm_appledl_open_parameters_mask { + static const int kCSSM_APPLEDL_MASK_MODE = 1; +} - static NSMutableString stringWithCapacity_( - NativeCupertinoHttp _lib, int capacity) { - final _ret = _lib._objc_msgSend_451( - _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +final class cssm_appledl_open_parameters extends ffi.Struct { + @uint32() + external int length; - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); - } + @uint32() + external int version; - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSMutableString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } + @CSSM_BOOL() + external int autoCommit; - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); - } + @uint32() + external int mask; - static NSMutableString string(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_string1); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + @mode_t() + external int mode; +} - static NSMutableString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +final class cssm_applecspdl_db_settings_parameters extends ffi.Struct { + @uint32() + external int idleTimeout; - static NSMutableString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSMutableString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + @uint8() + external int lockOnSleep; +} - static NSMutableString stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSMutableString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +final class cssm_applecspdl_db_is_locked_parameters extends ffi.Struct { + @uint8() + external int isLocked; +} - static NSMutableString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +final class cssm_applecspdl_db_change_password_parameters extends ffi.Struct { + external ffi.Pointer accessCredentials; +} - static NSMutableString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_ACCESS_CREDENTIALS = cssm_access_credentials; - static NSMutableString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSMutableString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +final class CSSM_APPLE_TP_NAME_OID extends ffi.Struct { + external ffi.Pointer string; - static NSMutableString stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_265( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer oid; +} - static NSMutableString stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_266( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } +final class CSSM_APPLE_TP_CERT_REQUEST extends ffi.Struct { + @CSSM_CSP_HANDLE() + external int cspHand; - static NSMutableString stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_267( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + @CSSM_CL_HANDLE() + external int clHand; - static NSMutableString stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_268( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int serialNumber; - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData? data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_269( - _lib._class_NSMutableString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } + @uint32() + external int numSubjectNames; - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer subjectNames; - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int numIssuerNames; - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSMutableString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer issuerNames; - static NSObject stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( - _lib._class_NSMutableString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_NAME_PTR issuerNameX509; - static NSMutableString new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_new1); - return NSMutableString._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer certPublicKey; - static NSMutableString alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_alloc1); - return NSMutableString._(_ret, _lib, retain: false, release: true); - } -} + external ffi.Pointer issuerPrivateKey; -typedef NSExceptionName = ffi.Pointer; + @CSSM_ALGORITHMS() + external int signatureAlg; -class NSSimpleCString extends NSString { - NSSimpleCString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + external SecAsn1Oid signatureOid; - /// Returns a [NSSimpleCString] that points to the same underlying object as [other]. - static NSSimpleCString castFrom(T other) { - return NSSimpleCString._(other._id, other._lib, - retain: true, release: true); - } + @uint32() + external int notBefore; - /// Returns a [NSSimpleCString] that wraps the given raw object pointer. - static NSSimpleCString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSSimpleCString._(other, lib, retain: retain, release: release); - } + @uint32() + external int notAfter; - /// Returns whether [obj] is an instance of [NSSimpleCString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSSimpleCString1); - } + @uint32() + external int numExtensions; - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSSimpleCString1, _lib._sel_availableStringEncodings1); - } + external ffi.Pointer extensions; - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSSimpleCString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer challengeString; +} - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSSimpleCString1, _lib._sel_defaultCStringEncoding1); - } +typedef CSSM_X509_NAME_PTR = ffi.Pointer; +typedef CSSM_KEY = cssm_key; +typedef CE_DataAndType = __CE_DataAndType; - static NSSimpleCString string(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_string1); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +final class CSSM_APPLE_TP_SSL_OPTIONS extends ffi.Struct { + @uint32() + external int Version; - static NSSimpleCString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int ServerNameLen; - static NSSimpleCString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSSimpleCString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer ServerName; - static NSSimpleCString stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSSimpleCString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int Flags; +} - static NSSimpleCString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +final class CSSM_APPLE_TP_CRL_OPTIONS extends ffi.Struct { + @uint32() + external int Version; - static NSSimpleCString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + @CSSM_APPLE_TP_CRL_OPT_FLAGS() + external int CrlFlags; - static NSSimpleCString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSSimpleCString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + external CSSM_DL_DB_HANDLE_PTR crlStore; +} - static NSSimpleCString stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_265( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_APPLE_TP_CRL_OPT_FLAGS = uint32; - static NSSimpleCString stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_266( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +final class CSSM_APPLE_TP_SMIME_OPTIONS extends ffi.Struct { + @uint32() + external int Version; - static NSSimpleCString stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_267( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + @CE_KeyUsage() + external int IntendedUsage; - static NSSimpleCString stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_268( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int SenderEmailLen; - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData? data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_269( - _lib._class_NSSimpleCString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } + external ffi.Pointer SenderEmail; +} - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +final class CSSM_APPLE_TP_ACTION_DATA extends ffi.Struct { + @uint32() + external int Version; - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } + @CSSM_APPLE_TP_ACTION_FLAGS() + external int ActionFlags; +} - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSSimpleCString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_APPLE_TP_ACTION_FLAGS = uint32; - static NSObject stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( - _lib._class_NSSimpleCString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } +final class CSSM_TP_APPLE_EVIDENCE_INFO extends ffi.Struct { + @CSSM_TP_APPLE_CERT_STATUS() + external int StatusBits; - static NSSimpleCString new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_new1); - return NSSimpleCString._(_ret, _lib, retain: false, release: true); - } + @uint32() + external int NumStatusCodes; - static NSSimpleCString alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_alloc1); - return NSSimpleCString._(_ret, _lib, retain: false, release: true); - } -} + external ffi.Pointer StatusCodes; -class NSConstantString extends NSSimpleCString { - NSConstantString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + @uint32() + external int Index; - /// Returns a [NSConstantString] that points to the same underlying object as [other]. - static NSConstantString castFrom(T other) { - return NSConstantString._(other._id, other._lib, - retain: true, release: true); - } + external CSSM_DL_DB_HANDLE DlDbHandle; - /// Returns a [NSConstantString] that wraps the given raw object pointer. - static NSConstantString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSConstantString._(other, lib, retain: retain, release: release); - } + external CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord; +} - /// Returns whether [obj] is an instance of [NSConstantString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSConstantString1); - } +typedef CSSM_TP_APPLE_CERT_STATUS = uint32; +typedef CSSM_DL_DB_HANDLE = cssm_dl_db_handle; +typedef CSSM_DB_UNIQUE_RECORD_PTR = ffi.Pointer; + +final class CSSM_TP_APPLE_EVIDENCE_HEADER extends ffi.Struct { + @uint32() + external int Version; +} - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( - _lib._class_NSConstantString1, _lib._sel_availableStringEncodings1); - } +final class CSSM_APPLE_CL_CSR_REQUEST extends ffi.Struct { + external CSSM_X509_NAME_PTR subjectNameX509; - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSConstantString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } + @CSSM_ALGORITHMS() + external int signatureAlg; - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSConstantString1, _lib._sel_defaultCStringEncoding1); - } + external SecAsn1Oid signatureOid; - static NSConstantString string(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_string1); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } + @CSSM_CSP_HANDLE() + external int cspHand; - static NSConstantString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer subjectPublicKey; - static NSConstantString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSConstantString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer subjectPrivateKey; - static NSConstantString stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSConstantString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer challengeString; +} - static NSConstantString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +abstract class SecTrustOptionFlags { + static const int kSecTrustOptionAllowExpired = 1; + static const int kSecTrustOptionLeafIsCA = 2; + static const int kSecTrustOptionFetchIssuerFromNet = 4; + static const int kSecTrustOptionAllowExpiredRoot = 8; + static const int kSecTrustOptionRequireRevPerCert = 16; + static const int kSecTrustOptionUseTrustSettings = 32; + static const int kSecTrustOptionImplicitAnchors = 64; +} - static NSConstantString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_TP_VERIFY_CONTEXT_RESULT_PTR + = ffi.Pointer; +typedef SecKeychainRef = ffi.Pointer<__SecKeychain>; - static NSConstantString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSConstantString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +abstract class SecKeyUsage { + static const int kSecKeyUsageUnspecified = 0; + static const int kSecKeyUsageDigitalSignature = 1; + static const int kSecKeyUsageNonRepudiation = 2; + static const int kSecKeyUsageContentCommitment = 2; + static const int kSecKeyUsageKeyEncipherment = 4; + static const int kSecKeyUsageDataEncipherment = 8; + static const int kSecKeyUsageKeyAgreement = 16; + static const int kSecKeyUsageKeyCertSign = 32; + static const int kSecKeyUsageCRLSign = 64; + static const int kSecKeyUsageEncipherOnly = 128; + static const int kSecKeyUsageDecipherOnly = 256; + static const int kSecKeyUsageCritical = -2147483648; + static const int kSecKeyUsageAll = 2147483647; +} - static NSConstantString stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_265( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +typedef SecIdentityRef = ffi.Pointer<__SecIdentity>; - static NSConstantString stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - int enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_266( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +abstract class SSLCiphersuiteGroup { + static const int kSSLCiphersuiteGroupDefault = 0; + static const int kSSLCiphersuiteGroupCompatibility = 1; + static const int kSSLCiphersuiteGroupLegacy = 2; + static const int kSSLCiphersuiteGroupATS = 3; + static const int kSSLCiphersuiteGroupATSCompatibility = 4; +} - static NSConstantString stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL? url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_267( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +abstract class tls_protocol_version_t { + static const int tls_protocol_version_TLSv10 = 769; + static const int tls_protocol_version_TLSv11 = 770; + static const int tls_protocol_version_TLSv12 = 771; + static const int tls_protocol_version_TLSv13 = 772; + static const int tls_protocol_version_DTLSv10 = -257; + static const int tls_protocol_version_DTLSv12 = -259; +} - static NSConstantString stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString? path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_268( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, - enc, - error); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +abstract class tls_ciphersuite_t { + static const int tls_ciphersuite_RSA_WITH_3DES_EDE_CBC_SHA = 10; + static const int tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA = 47; + static const int tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA = 53; + static const int tls_ciphersuite_RSA_WITH_AES_128_GCM_SHA256 = 156; + static const int tls_ciphersuite_RSA_WITH_AES_256_GCM_SHA384 = 157; + static const int tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA256 = 60; + static const int tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA256 = 61; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; + static const int tls_ciphersuite_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; + static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; + static const int tls_ciphersuite_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = + -13144; + static const int tls_ciphersuite_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = + -13143; + static const int tls_ciphersuite_AES_128_GCM_SHA256 = 4865; + static const int tls_ciphersuite_AES_256_GCM_SHA384 = 4866; + static const int tls_ciphersuite_CHACHA20_POLY1305_SHA256 = 4867; +} - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData? data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_269( - _lib._class_NSConstantString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } +abstract class tls_ciphersuite_group_t { + static const int tls_ciphersuite_group_default = 0; + static const int tls_ciphersuite_group_compatibility = 1; + static const int tls_ciphersuite_group_legacy = 2; + static const int tls_ciphersuite_group_ats = 3; + static const int tls_ciphersuite_group_ats_compatibility = 4; +} - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +abstract class SSLProtocol { + static const int kSSLProtocolUnknown = 0; + static const int kTLSProtocol1 = 4; + static const int kTLSProtocol11 = 7; + static const int kTLSProtocol12 = 8; + static const int kDTLSProtocol1 = 9; + static const int kTLSProtocol13 = 10; + static const int kDTLSProtocol12 = 11; + static const int kTLSProtocolMaxSupported = 999; + static const int kSSLProtocol2 = 1; + static const int kSSLProtocol3 = 2; + static const int kSSLProtocol3Only = 3; + static const int kTLSProtocol1Only = 5; + static const int kSSLProtocolAll = 6; +} - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +typedef sec_trust_t = ffi.Pointer; +typedef sec_identity_t = ffi.Pointer; +void _ObjCBlock30_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_264(_lib._class_NSConstantString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock30_closureRegistry = {}; +int _ObjCBlock30_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock30_registerClosure(Function fn) { + final id = ++_ObjCBlock30_closureRegistryIndex; + _ObjCBlock30_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSObject stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( - _lib._class_NSConstantString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock30_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { + return _ObjCBlock30_closureRegistry[block.ref.target.address]!(arg0); +} - static NSConstantString new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_new1); - return NSConstantString._(_ret, _lib, retain: false, release: true); - } +class ObjCBlock30 extends _ObjCBlockBase { + ObjCBlock30._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - static NSConstantString alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_alloc1); - return NSConstantString._(_ret, _lib, retain: false, release: true); + /// Creates a block from a C function pointer. + ObjCBlock30.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + sec_certificate_t arg0)>( + _ObjCBlock30_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock30.fromFunction( + NativeCupertinoHttp lib, void Function(sec_certificate_t arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + sec_certificate_t arg0)>( + _ObjCBlock30_closureTrampoline) + .cast(), + _ObjCBlock30_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(sec_certificate_t arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + sec_certificate_t arg0)>()(_id, arg0); } } -class NSMutableCharacterSet extends NSCharacterSet { - NSMutableCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef sec_certificate_t = ffi.Pointer; +typedef sec_protocol_metadata_t = ffi.Pointer; +typedef SSLCipherSuite = ffi.Uint16; +void _ObjCBlock31_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} - /// Returns a [NSMutableCharacterSet] that points to the same underlying object as [other]. - static NSMutableCharacterSet castFrom(T other) { - return NSMutableCharacterSet._(other._id, other._lib, - retain: true, release: true); - } +final _ObjCBlock31_closureRegistry = {}; +int _ObjCBlock31_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock31_registerClosure(Function fn) { + final id = ++_ObjCBlock31_closureRegistryIndex; + _ObjCBlock31_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns a [NSMutableCharacterSet] that wraps the given raw object pointer. - static NSMutableCharacterSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableCharacterSet._(other, lib, - retain: retain, release: release); - } +void _ObjCBlock31_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock31_closureRegistry[block.ref.target.address]!(arg0); +} - /// Returns whether [obj] is an instance of [NSMutableCharacterSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableCharacterSet1); - } +class ObjCBlock31 extends _ObjCBlockBase { + ObjCBlock31._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - void addCharactersInRange_(NSRange aRange) { - return _lib._objc_msgSend_283( - _id, _lib._sel_addCharactersInRange_1, aRange); - } + /// Creates a block from a C function pointer. + ObjCBlock31.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Uint16 arg0)>(_ObjCBlock31_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - void removeCharactersInRange_(NSRange aRange) { - return _lib._objc_msgSend_283( - _id, _lib._sel_removeCharactersInRange_1, aRange); + /// Creates a block from a Dart function. + ObjCBlock31.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Uint16 arg0)>(_ObjCBlock31_closureTrampoline) + .cast(), + _ObjCBlock31_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(int arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Uint16 arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); } +} - void addCharactersInString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_addCharactersInString_1, aString?._id ?? ffi.nullptr); - } +void _ObjCBlock32_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(dispatch_data_t arg0, dispatch_data_t arg1)>>() + .asFunction< + void Function( + dispatch_data_t arg0, dispatch_data_t arg1)>()(arg0, arg1); +} - void removeCharactersInString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_removeCharactersInString_1, aString?._id ?? ffi.nullptr); - } +final _ObjCBlock32_closureRegistry = {}; +int _ObjCBlock32_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock32_registerClosure(Function fn) { + final id = ++_ObjCBlock32_closureRegistryIndex; + _ObjCBlock32_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - void formUnionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_452(_id, _lib._sel_formUnionWithCharacterSet_1, - otherSet?._id ?? ffi.nullptr); - } +void _ObjCBlock32_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { + return _ObjCBlock32_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - void formIntersectionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_452( - _id, - _lib._sel_formIntersectionWithCharacterSet_1, - otherSet?._id ?? ffi.nullptr); - } +class ObjCBlock32 extends _ObjCBlockBase { + ObjCBlock32._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - void invert() { - return _lib._objc_msgSend_1(_id, _lib._sel_invert1); - } + /// Creates a block from a C function pointer. + ObjCBlock32.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + dispatch_data_t arg0, dispatch_data_t arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + dispatch_data_t arg1)>(_ObjCBlock32_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_controlCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock32.fromFunction(NativeCupertinoHttp lib, + void Function(dispatch_data_t arg0, dispatch_data_t arg1) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, dispatch_data_t arg1)>( + _ObjCBlock32_closureTrampoline) + .cast(), + _ObjCBlock32_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(dispatch_data_t arg0, dispatch_data_t arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, dispatch_data_t arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, + dispatch_data_t arg1)>()(_id, arg0, arg1); } +} - static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +typedef sec_protocol_options_t = ffi.Pointer; +typedef sec_protocol_pre_shared_key_selection_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock33_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>>() + .asFunction< + void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>()( + arg0, arg1, arg2); +} - static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_whitespaceAndNewlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock33_closureRegistry = {}; +int _ObjCBlock33_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock33_registerClosure(Function fn) { + final id = ++_ObjCBlock33_closureRegistryIndex; + _ObjCBlock33_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_decimalDigitCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock33_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) { + return _ObjCBlock33_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_letterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock33 extends _ObjCBlockBase { + ObjCBlock33._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - static NSCharacterSet? getLowercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_lowercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock33.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>(_ObjCBlock33_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - static NSCharacterSet? getUppercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_uppercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock33.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>(_ObjCBlock33_closureTrampoline) + .cast(), + _ObjCBlock33_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(sec_protocol_metadata_t arg0, dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>()(_id, arg0, arg1, arg2); } +} - static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +typedef sec_protocol_pre_shared_key_selection_complete_t + = ffi.Pointer<_ObjCBlock>; +typedef sec_protocol_key_update_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock34_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>>() + .asFunction< + void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>()(arg0, arg1); +} - static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_alphanumericCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock34_closureRegistry = {}; +int _ObjCBlock34_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock34_registerClosure(Function fn) { + final id = ++_ObjCBlock34_closureRegistryIndex; + _ObjCBlock34_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_decomposableCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock34_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { + return _ObjCBlock34_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_illegalCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock34 extends _ObjCBlockBase { + ObjCBlock34._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_punctuationCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock34.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>( + _ObjCBlock34_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - static NSCharacterSet? getCapitalizedLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_capitalizedLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock34.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>( + _ObjCBlock34_closureTrampoline) + .cast(), + _ObjCBlock34_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>()(_id, arg0, arg1); } +} - static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_symbolCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +typedef sec_protocol_key_update_complete_t = ffi.Pointer<_ObjCBlock>; +typedef sec_protocol_challenge_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock35_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>>() + .asFunction< + void Function(sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>()(arg0, arg1); +} - static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_newlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: false, release: true); - } +final _ObjCBlock35_closureRegistry = {}; +int _ObjCBlock35_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock35_registerClosure(Function fn) { + final id = ++_ObjCBlock35_closureRegistryIndex; + _ObjCBlock35_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static NSMutableCharacterSet characterSetWithRange_( - NativeCupertinoHttp _lib, NSRange aRange) { - final _ret = _lib._objc_msgSend_453(_lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithRange_1, aRange); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock35_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { + return _ObjCBlock35_closureRegistry[block.ref.target.address]!(arg0, arg1); +} - static NSMutableCharacterSet characterSetWithCharactersInString_( - NativeCupertinoHttp _lib, NSString? aString) { - final _ret = _lib._objc_msgSend_454( - _lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, - aString?._id ?? ffi.nullptr); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock35 extends _ObjCBlockBase { + ObjCBlock35._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - static NSMutableCharacterSet characterSetWithBitmapRepresentation_( - NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_455( - _lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, - data?._id ?? ffi.nullptr); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock35.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>( + _ObjCBlock35_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - static NSMutableCharacterSet characterSetWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? fName) { - final _ret = _lib._objc_msgSend_454(_lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock35.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>( + _ObjCBlock35_closureTrampoline) + .cast(), + _ObjCBlock35_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>()(_id, arg0, arg1); } +} - /// Returns a character set containing the characters allowed in an URL's user subcomponent. - static NSCharacterSet? getURLUserAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLUserAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +typedef sec_protocol_challenge_complete_t = ffi.Pointer<_ObjCBlock>; +typedef sec_protocol_verify_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock36_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>>() + .asFunction< + void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>()(arg0, arg1, arg2); +} - /// Returns a character set containing the characters allowed in an URL's password subcomponent. - static NSCharacterSet? getURLPasswordAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLPasswordAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +final _ObjCBlock36_closureRegistry = {}; +int _ObjCBlock36_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock36_registerClosure(Function fn) { + final id = ++_ObjCBlock36_closureRegistryIndex; + _ObjCBlock36_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns a character set containing the characters allowed in an URL's host subcomponent. - static NSCharacterSet? getURLHostAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLHostAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock36_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) { + return _ObjCBlock36_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} - /// Returns a character set containing the characters allowed in an URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - static NSCharacterSet? getURLPathAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLPathAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +class ObjCBlock36 extends _ObjCBlockBase { + ObjCBlock36._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - /// Returns a character set containing the characters allowed in an URL's query component. - static NSCharacterSet? getURLQueryAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLQueryAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock36.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_trust_t arg1, sec_protocol_verify_complete_t arg2)>> + ptr) + : this._( + lib + ._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>( + _ObjCBlock36_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - /// Returns a character set containing the characters allowed in an URL's fragment component. - static NSCharacterSet? getURLFragmentAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLFragmentAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Creates a block from a Dart function. + ObjCBlock36.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>( + _ObjCBlock36_closureTrampoline) + .cast(), + _ObjCBlock36_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>()(_id, arg0, arg1, arg2); } +} - static NSMutableCharacterSet new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableCharacterSet1, _lib._sel_new1); - return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); - } +typedef sec_protocol_verify_complete_t = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock37_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { + return block.ref.target + .cast>() + .asFunction()(arg0); +} - static NSMutableCharacterSet alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableCharacterSet1, _lib._sel_alloc1); - return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); - } +final _ObjCBlock37_closureRegistry = {}; +int _ObjCBlock37_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock37_registerClosure(Function fn) { + final id = ++_ObjCBlock37_closureRegistryIndex; + _ObjCBlock37_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -typedef NSURLFileResourceType = ffi.Pointer; -typedef NSURLThumbnailDictionaryItem = ffi.Pointer; -typedef NSURLFileProtectionType = ffi.Pointer; -typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; -typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; -typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; +void _ObjCBlock37_closureTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { + return _ObjCBlock37_closureRegistry[block.ref.target.address]!(arg0); +} -/// NSURLQueryItem encapsulates a single query name-value pair. The name and value strings of a query name-value pair are not percent encoded. For use with the NSURLComponents queryItems property. -class NSURLQueryItem extends NSObject { - NSURLQueryItem._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +class ObjCBlock37 extends _ObjCBlockBase { + ObjCBlock37._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - /// Returns a [NSURLQueryItem] that points to the same underlying object as [other]. - static NSURLQueryItem castFrom(T other) { - return NSURLQueryItem._(other._id, other._lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + ObjCBlock37.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0)>(_ObjCBlock37_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - /// Returns a [NSURLQueryItem] that wraps the given raw object pointer. - static NSURLQueryItem castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLQueryItem._(other, lib, retain: retain, release: release); + /// Creates a block from a Dart function. + ObjCBlock37.fromFunction(NativeCupertinoHttp lib, void Function(bool arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Bool arg0)>(_ObjCBlock37_closureTrampoline) + .cast(), + _ObjCBlock37_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(bool arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, bool arg0)>()(_id, arg0); } +} - /// Returns whether [obj] is an instance of [NSURLQueryItem]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLQueryItem1); - } +final class SSLContext extends ffi.Opaque {} - NSURLQueryItem initWithName_value_(NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_456(_id, _lib._sel_initWithName_value_1, - name?._id ?? ffi.nullptr, value?._id ?? ffi.nullptr); - return NSURLQueryItem._(_ret, _lib, retain: true, release: true); - } +abstract class SSLSessionOption { + static const int kSSLSessionOptionBreakOnServerAuth = 0; + static const int kSSLSessionOptionBreakOnCertRequested = 1; + static const int kSSLSessionOptionBreakOnClientAuth = 2; + static const int kSSLSessionOptionFalseStart = 3; + static const int kSSLSessionOptionSendOneByteRecord = 4; + static const int kSSLSessionOptionAllowServerIdentityChange = 5; + static const int kSSLSessionOptionFallback = 6; + static const int kSSLSessionOptionBreakOnClientHello = 7; + static const int kSSLSessionOptionAllowRenegotiation = 8; + static const int kSSLSessionOptionEnableSessionTickets = 9; +} - static NSURLQueryItem queryItemWithName_value_( - NativeCupertinoHttp _lib, NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_456( - _lib._class_NSURLQueryItem1, - _lib._sel_queryItemWithName_value_1, - name?._id ?? ffi.nullptr, - value?._id ?? ffi.nullptr); - return NSURLQueryItem._(_ret, _lib, retain: true, release: true); - } +abstract class SSLSessionState { + static const int kSSLIdle = 0; + static const int kSSLHandshake = 1; + static const int kSSLConnected = 2; + static const int kSSLClosed = 3; + static const int kSSLAborted = 4; +} - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +abstract class SSLClientCertificateState { + static const int kSSLClientCertNone = 0; + static const int kSSLClientCertRequested = 1; + static const int kSSLClientCertSent = 2; + static const int kSSLClientCertRejected = 3; +} - NSString? get value { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_value1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +abstract class SSLProtocolSide { + static const int kSSLServerSide = 0; + static const int kSSLClientSide = 1; +} - static NSURLQueryItem new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_new1); - return NSURLQueryItem._(_ret, _lib, retain: false, release: true); - } +abstract class SSLConnectionType { + static const int kSSLStreamType = 0; + static const int kSSLDatagramType = 1; +} - static NSURLQueryItem alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_alloc1); - return NSURLQueryItem._(_ret, _lib, retain: false, release: true); - } +typedef SSLContextRef = ffi.Pointer; +typedef SSLReadFunc = ffi.Pointer< + ffi.NativeFunction< + OSStatus Function(SSLConnectionRef connection, + ffi.Pointer data, ffi.Pointer dataLength)>>; +typedef SSLConnectionRef = ffi.Pointer; +typedef SSLWriteFunc = ffi.Pointer< + ffi.NativeFunction< + OSStatus Function(SSLConnectionRef connection, + ffi.Pointer data, ffi.Pointer dataLength)>>; + +abstract class SSLAuthenticate { + static const int kNeverAuthenticate = 0; + static const int kAlwaysAuthenticate = 1; + static const int kTryAuthenticate = 2; } -class NSURLComponents extends NSObject { - NSURLComponents._(ffi.Pointer id, NativeCupertinoHttp lib, +/// NSURLSession is a replacement API for NSURLConnection. It provides +/// options that affect the policy of, and various aspects of the +/// mechanism by which NSURLRequest objects are retrieved from the +/// network. +/// +/// An NSURLSession may be bound to a delegate object. The delegate is +/// invoked for certain events during the lifetime of a session, such as +/// server authentication or determining whether a resource to be loaded +/// should be converted into a download. +/// +/// NSURLSession instances are thread-safe. +/// +/// The default NSURLSession uses a system provided delegate and is +/// appropriate to use in place of existing code that uses +/// +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] +/// +/// An NSURLSession creates NSURLSessionTask objects which represent the +/// action of a resource being loaded. These are analogous to +/// NSURLConnection objects but provide for more control and a unified +/// delegate model. +/// +/// NSURLSessionTask objects are always created in a suspended state and +/// must be sent the -resume message before they will execute. +/// +/// Subclasses of NSURLSessionTask are used to syntactically +/// differentiate between data and file downloads. +/// +/// An NSURLSessionDataTask receives the resource as a series of calls to +/// the URLSession:dataTask:didReceiveData: delegate method. This is type of +/// task most commonly associated with retrieving objects for immediate parsing +/// by the consumer. +/// +/// An NSURLSessionUploadTask differs from an NSURLSessionDataTask +/// in how its instance is constructed. Upload tasks are explicitly created +/// by referencing a file or data object to upload, or by utilizing the +/// -URLSession:task:needNewBodyStream: delegate message to supply an upload +/// body. +/// +/// An NSURLSessionDownloadTask will directly write the response data to +/// a temporary file. When completed, the delegate is sent +/// URLSession:downloadTask:didFinishDownloadingToURL: and given an opportunity +/// to move this file to a permanent location in its sandboxed container, or to +/// otherwise read the file. If canceled, an NSURLSessionDownloadTask can +/// produce a data blob that can be used to resume a download at a later +/// time. +/// +/// Beginning with iOS 9 and Mac OS X 10.11, NSURLSessionStream is +/// available as a task type. This allows for direct TCP/IP connection +/// to a given host and port with optional secure handshaking and +/// navigation of proxies. Data tasks may also be upgraded to a +/// NSURLSessionStream task via the HTTP Upgrade: header and appropriate +/// use of the pipelining option of NSURLSessionConfiguration. See RFC +/// 2817 and RFC 6455 for information about the Upgrade: header, and +/// comments below on turning data tasks into stream tasks. +/// +/// An NSURLSessionWebSocketTask is a task that allows clients to connect to servers supporting +/// WebSocket. The task will perform the HTTP handshake to upgrade the connection +/// and once the WebSocket handshake is successful, the client can read and write +/// messages that will be framed using the WebSocket protocol by the framework. +class NSURLSession extends NSObject { + NSURLSession._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSURLComponents] that points to the same underlying object as [other]. - static NSURLComponents castFrom(T other) { - return NSURLComponents._(other._id, other._lib, - retain: true, release: true); + /// Returns a [NSURLSession] that points to the same underlying object as [other]. + static NSURLSession castFrom(T other) { + return NSURLSession._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSURLComponents] that wraps the given raw object pointer. - static NSURLComponents castFromPointer( + /// Returns a [NSURLSession] that wraps the given raw object pointer. + static NSURLSession castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSURLComponents._(other, lib, retain: retain, release: release); + return NSURLSession._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSURLComponents]. + /// Returns whether [obj] is an instance of [NSURLSession]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLComponents1); - } - - /// Initialize a NSURLComponents with all components undefined. Designated initializer. - @override - NSURLComponents init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } - - /// Initialize a NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. - NSURLComponents initWithURL_resolvingAgainstBaseURL_( - NSURL? url, bool resolve) { - final _ret = _lib._objc_msgSend_206( - _id, - _lib._sel_initWithURL_resolvingAgainstBaseURL_1, - url?._id ?? ffi.nullptr, - resolve); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } - - /// Initializes and returns a newly created NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. - static NSURLComponents componentsWithURL_resolvingAgainstBaseURL_( - NativeCupertinoHttp _lib, NSURL? url, bool resolve) { - final _ret = _lib._objc_msgSend_206( - _lib._class_NSURLComponents1, - _lib._sel_componentsWithURL_resolvingAgainstBaseURL_1, - url?._id ?? ffi.nullptr, - resolve); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } - - /// Initialize a NSURLComponents with a URL string. If the URLString is malformed, nil is returned. - NSURLComponents initWithString_(NSString? URLString) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } - - /// Initializes and returns a newly created NSURLComponents with a URL string. If the URLString is malformed, nil is returned. - static NSURLComponents componentsWithString_( - NativeCupertinoHttp _lib, NSString? URLString) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSURLComponents1, - _lib._sel_componentsWithString_1, URLString?._id ?? ffi.nullptr); - return NSURLComponents._(_ret, _lib, retain: true, release: true); - } - - /// Returns a URL created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSURL URLRelativeToURL_(NSURL? baseURL) { - final _ret = _lib._objc_msgSend_457( - _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Returns a URL string created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSString? get string { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLSession1); } - /// Attempting to set the scheme with an invalid scheme string will cause an exception. - NSString? get scheme { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); + /// The shared session uses the currently set global NSURLCache, + /// NSHTTPCookieStorage and NSURLCredentialStorage objects. + static NSURLSession? getSharedSession(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_387( + _lib._class_NSURLSession1, _lib._sel_sharedSession1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// Attempting to set the scheme with an invalid scheme string will cause an exception. - set scheme(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); + : NSURLSession._(_ret, _lib, retain: true, release: true); } - NSString? get user { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Customization of NSURLSession occurs during creation of a new session. + /// If you only need to use the convenience routines with custom + /// configuration options it is not necessary to specify a delegate. + /// If you do specify a delegate, the delegate will be retained until after + /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. + static NSURLSession sessionWithConfiguration_( + NativeCupertinoHttp _lib, NSURLSessionConfiguration? configuration) { + final _ret = _lib._objc_msgSend_402( + _lib._class_NSURLSession1, + _lib._sel_sessionWithConfiguration_1, + configuration?._id ?? ffi.nullptr); + return NSURLSession._(_ret, _lib, retain: true, release: true); } - set user(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NativeCupertinoHttp _lib, + NSURLSessionConfiguration? configuration, + NSObject? delegate, + NSOperationQueue? queue) { + final _ret = _lib._objc_msgSend_403( + _lib._class_NSURLSession1, + _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, + configuration?._id ?? ffi.nullptr, + delegate?._id ?? ffi.nullptr, + queue?._id ?? ffi.nullptr); + return NSURLSession._(_ret, _lib, retain: true, release: true); } - NSString? get password { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); + NSOperationQueue? get delegateQueue { + final _ret = _lib._objc_msgSend_349(_id, _lib._sel_delegateQueue1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set password(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); + : NSOperationQueue._(_ret, _lib, retain: true, release: true); } - NSString? get host { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); + NSObject? get delegate { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set host(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); + : NSObject._(_ret, _lib, retain: true, release: true); } - /// Attempting to set a negative port number will cause an exception. - NSNumber? get port { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); + NSURLSessionConfiguration? get configuration { + final _ret = _lib._objc_msgSend_388(_id, _lib._sel_configuration1); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - /// Attempting to set a negative port number will cause an exception. - set port(NSNumber? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - NSString? get path { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); + /// The sessionDescription property is available for the developer to + /// provide a descriptive label for the session. + NSString? get sessionDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_sessionDescription1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } - set path(NSString? value) { - _lib._objc_msgSend_327(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); - } - - NSString? get query { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// The sessionDescription property is available for the developer to + /// provide a descriptive label for the session. + set sessionDescription(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); } - set query(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); + /// -finishTasksAndInvalidate returns immediately and existing tasks will be allowed + /// to run to completion. New tasks may not be created. The session + /// will continue to make delegate callbacks until URLSession:didBecomeInvalidWithError: + /// has been issued. + /// + /// -finishTasksAndInvalidate and -invalidateAndCancel do not + /// have any effect on the shared session singleton. + /// + /// When invalidating a background session, it is not safe to create another background + /// session with the same identifier until URLSession:didBecomeInvalidWithError: has + /// been issued. + void finishTasksAndInvalidate() { + return _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); } - NSString? get fragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// -invalidateAndCancel acts as -finishTasksAndInvalidate, but issues + /// -cancel to all outstanding tasks for this session. Note task + /// cancellation is subject to the state of the task, and some tasks may + /// have already have completed at the time they are sent -cancel. + void invalidateAndCancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); } - set fragment(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); + /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue. + void resetWithCompletionHandler_(ObjCBlock completionHandler) { + return _lib._objc_msgSend_345( + _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); } - /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - NSString? get percentEncodedUser { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedUser1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue. + void flushWithCompletionHandler_(ObjCBlock completionHandler) { + return _lib._objc_msgSend_345( + _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); } - /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - set percentEncodedUser(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); + /// invokes completionHandler with outstanding data, upload and download tasks. + void getTasksWithCompletionHandler_(ObjCBlock38 completionHandler) { + return _lib._objc_msgSend_404( + _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); } - NSString? get percentEncodedPassword { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPassword1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// invokes completionHandler with all outstanding tasks. + void getAllTasksWithCompletionHandler_(ObjCBlock20 completionHandler) { + return _lib._objc_msgSend_405(_id, + _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._id); } - set percentEncodedPassword(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); + /// Creates a data task with the given request. The request may have a body stream. + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_406( + _id, _lib._sel_dataTaskWithRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } - NSString? get percentEncodedHost { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedHost1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates a data task to retrieve the contents of the given URL. + NSURLSessionDataTask dataTaskWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_407( + _id, _lib._sel_dataTaskWithURL_1, url?._id ?? ffi.nullptr); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } - set percentEncodedHost(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); + /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest? request, NSURL? fileURL) { + final _ret = _lib._objc_msgSend_408( + _id, + _lib._sel_uploadTaskWithRequest_fromFile_1, + request?._id ?? ffi.nullptr, + fileURL?._id ?? ffi.nullptr); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } - NSString? get percentEncodedPath { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates an upload task with the given request. The body of the request is provided from the bodyData. + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest? request, NSData? bodyData) { + final _ret = _lib._objc_msgSend_409( + _id, + _lib._sel_uploadTaskWithRequest_fromData_1, + request?._id ?? ffi.nullptr, + bodyData?._id ?? ffi.nullptr); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } - set percentEncodedPath(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); + /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_410(_id, + _lib._sel_uploadTaskWithStreamedRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } - NSString? get percentEncodedQuery { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedQuery1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates a download task with the given request. + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_412( + _id, _lib._sel_downloadTaskWithRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - set percentEncodedQuery(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); + /// Creates a download task to download the contents of the given URL. + NSURLSessionDownloadTask downloadTaskWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_413( + _id, _lib._sel_downloadTaskWithURL_1, url?._id ?? ffi.nullptr); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - NSString? get percentEncodedFragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedFragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. + NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData? resumeData) { + final _ret = _lib._objc_msgSend_414(_id, + _lib._sel_downloadTaskWithResumeData_1, resumeData?._id ?? ffi.nullptr); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - set percentEncodedFragment(NSString? value) { - _lib._objc_msgSend_327( - _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); + /// Creates a bidirectional stream task to a given host and port. + NSURLSessionStreamTask streamTaskWithHostName_port_( + NSString? hostname, int port) { + final _ret = _lib._objc_msgSend_417( + _id, + _lib._sel_streamTaskWithHostName_port_1, + hostname?._id ?? ffi.nullptr, + port); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); } - /// These properties return the character range of a component in the URL string returned by -[NSURLComponents string]. If the component does not exist in the NSURLComponents object, {NSNotFound, 0} is returned. Note: Zero length components are legal. For example, the URL string "scheme://:@/?#" has a zero length user, password, host, query and fragment; the URL strings "scheme:" and "" both have a zero length path. - NSRange get rangeOfScheme { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfScheme1); + /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. + /// The NSNetService will be resolved before any IO completes. + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService? service) { + final _ret = _lib._objc_msgSend_418( + _id, _lib._sel_streamTaskWithNetService_1, service?._id ?? ffi.nullptr); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); } - NSRange get rangeOfUser { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfUser1); + /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. + NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_425( + _id, _lib._sel_webSocketTaskWithURL_1, url?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } - NSRange get rangeOfPassword { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPassword1); + /// Creates a WebSocket task given the url and an array of protocols. The protocols will be used in the WebSocket handshake to + /// negotiate a preferred protocol with the server + /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + NSURL? url, NSArray? protocols) { + final _ret = _lib._objc_msgSend_426( + _id, + _lib._sel_webSocketTaskWithURL_protocols_1, + url?._id ?? ffi.nullptr, + protocols?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } - NSRange get rangeOfHost { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfHost1); + /// Creates a WebSocket task given the request. The request properties can be modified and will be used by the task during the HTTP handshake phase. + /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol + /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_427( + _id, _lib._sel_webSocketTaskWithRequest_1, request?._id ?? ffi.nullptr); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } - NSRange get rangeOfPort { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPort1); + @override + NSURLSession init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSession._(_ret, _lib, retain: true, release: true); } - NSRange get rangeOfPath { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPath1); + static NSURLSession new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_new1); + return NSURLSession._(_ret, _lib, retain: false, release: true); } - NSRange get rangeOfQuery { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfQuery1); + /// data task convenience methods. These methods create tasks that + /// bypass the normal delegate calls for response and data delivery, + /// and provide a simple cancelable asynchronous interface to receiving + /// data. Errors will be returned in the NSURLErrorDomain, + /// see . The delegate, if any, will still be + /// called for authentication challenges. + NSURLSessionDataTask dataTaskWithRequest_completionHandler_( + NSURLRequest? request, ObjCBlock43 completionHandler) { + final _ret = _lib._objc_msgSend_428( + _id, + _lib._sel_dataTaskWithRequest_completionHandler_1, + request?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } - NSRange get rangeOfFragment { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfFragment1); + NSURLSessionDataTask dataTaskWithURL_completionHandler_( + NSURL? url, ObjCBlock43 completionHandler) { + final _ret = _lib._objc_msgSend_429( + _id, + _lib._sel_dataTaskWithURL_completionHandler_1, + url?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } - /// The query component as an array of NSURLQueryItems for this NSURLComponents. - /// - /// Each NSURLQueryItem represents a single key-value pair, - /// - /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. - /// - /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. - /// - /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. - /// - /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. - NSArray? get queryItems { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_queryItems1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + /// upload convenience method. + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest? request, NSURL? fileURL, ObjCBlock43 completionHandler) { + final _ret = _lib._objc_msgSend_430( + _id, + _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, + request?._id ?? ffi.nullptr, + fileURL?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } - /// The query component as an array of NSURLQueryItems for this NSURLComponents. - /// - /// Each NSURLQueryItem represents a single key-value pair, - /// - /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. - /// - /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. - /// - /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. - /// - /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. - set queryItems(NSArray? value) { - _lib._objc_msgSend_392( - _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest? request, NSData? bodyData, ObjCBlock43 completionHandler) { + final _ret = _lib._objc_msgSend_431( + _id, + _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, + request?._id ?? ffi.nullptr, + bodyData?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } - /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. - /// - /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. - NSArray? get percentEncodedQueryItems { - final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_percentEncodedQueryItems1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + /// download task convenience methods. When a download successfully + /// completes, the NSURL will point to a file that must be read or + /// copied during the invocation of the completion routine. The file + /// will be removed automatically. + NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( + NSURLRequest? request, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_432( + _id, + _lib._sel_downloadTaskWithRequest_completionHandler_1, + request?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. - /// - /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. - set percentEncodedQueryItems(NSArray? value) { - _lib._objc_msgSend_392(_id, _lib._sel_setPercentEncodedQueryItems_1, - value?._id ?? ffi.nullptr); + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( + NSURL? url, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_433( + _id, + _lib._sel_downloadTaskWithURL_completionHandler_1, + url?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - static NSURLComponents new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_new1); - return NSURLComponents._(_ret, _lib, retain: false, release: true); + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + NSData? resumeData, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_434( + _id, + _lib._sel_downloadTaskWithResumeData_completionHandler_1, + resumeData?._id ?? ffi.nullptr, + completionHandler._id); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - static NSURLComponents alloc(NativeCupertinoHttp _lib) { + static NSURLSession alloc(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_alloc1); - return NSURLComponents._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_alloc1); + return NSURLSession._(_ret, _lib, retain: false, release: true); } } -/// NSFileSecurity encapsulates a file system object's security information. NSFileSecurity and CFFileSecurity are toll-free bridged. Use the CFFileSecurity API for access to the low-level file security properties encapsulated by NSFileSecurity. -class NSFileSecurity extends NSObject { - NSFileSecurity._(ffi.Pointer id, NativeCupertinoHttp lib, +/// Configuration options for an NSURLSession. When a session is +/// created, a copy of the configuration object is made - you cannot +/// modify the configuration of a session after it has been created. +/// +/// The shared session uses the global singleton credential, cache +/// and cookie storage objects. +/// +/// An ephemeral session has no persistent disk storage for cookies, +/// cache or credentials. +/// +/// A background session can be used to perform networking operations +/// on behalf of a suspended application, within certain constraints. +class NSURLSessionConfiguration extends NSObject { + NSURLSessionConfiguration._( + ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSFileSecurity] that points to the same underlying object as [other]. - static NSFileSecurity castFrom(T other) { - return NSFileSecurity._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSURLSessionConfiguration] that points to the same underlying object as [other]. + static NSURLSessionConfiguration castFrom(T other) { + return NSURLSessionConfiguration._(other._id, other._lib, + retain: true, release: true); } - /// Returns a [NSFileSecurity] that wraps the given raw object pointer. - static NSFileSecurity castFromPointer( + /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. + static NSURLSessionConfiguration castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSFileSecurity._(other, lib, retain: retain, release: release); + return NSURLSessionConfiguration._(other, lib, + retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSFileSecurity]. + /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSFileSecurity1); + obj._lib._class_NSURLSessionConfiguration1); } - NSFileSecurity initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSFileSecurity._(_ret, _lib, retain: true, release: true); + static NSURLSessionConfiguration? getDefaultSessionConfiguration( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_388(_lib._class_NSURLSessionConfiguration1, + _lib._sel_defaultSessionConfiguration1); + return _ret.address == 0 + ? null + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - static NSFileSecurity new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_new1); - return NSFileSecurity._(_ret, _lib, retain: false, release: true); + static NSURLSessionConfiguration? getEphemeralSessionConfiguration( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_388(_lib._class_NSURLSessionConfiguration1, + _lib._sel_ephemeralSessionConfiguration1); + return _ret.address == 0 + ? null + : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - static NSFileSecurity alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_alloc1); - return NSFileSecurity._(_ret, _lib, retain: false, release: true); + static NSURLSessionConfiguration + backgroundSessionConfigurationWithIdentifier_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_389( + _lib._class_NSURLSessionConfiguration1, + _lib._sel_backgroundSessionConfigurationWithIdentifier_1, + identifier?._id ?? ffi.nullptr); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } -} -/// ! -/// @class NSHTTPURLResponse -/// -/// @abstract An NSHTTPURLResponse object represents a response to an -/// HTTP URL load. It is a specialization of NSURLResponse which -/// provides conveniences for accessing information specific to HTTP -/// protocol responses. -class NSHTTPURLResponse extends NSURLResponse { - NSHTTPURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// identifier for the background session configuration + NSString? get identifier { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_identifier1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } - /// Returns a [NSHTTPURLResponse] that points to the same underlying object as [other]. - static NSHTTPURLResponse castFrom(T other) { - return NSHTTPURLResponse._(other._id, other._lib, - retain: true, release: true); + /// default cache policy for requests + int get requestCachePolicy { + return _lib._objc_msgSend_359(_id, _lib._sel_requestCachePolicy1); } - /// Returns a [NSHTTPURLResponse] that wraps the given raw object pointer. - static NSHTTPURLResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPURLResponse._(other, lib, retain: retain, release: release); + /// default cache policy for requests + set requestCachePolicy(int value) { + _lib._objc_msgSend_363(_id, _lib._sel_setRequestCachePolicy_1, value); } - /// Returns whether [obj] is an instance of [NSHTTPURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSHTTPURLResponse1); + /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. + double get timeoutIntervalForRequest { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForRequest1); } - /// ! - /// @method initWithURL:statusCode:HTTPVersion:headerFields: - /// @abstract initializer for NSHTTPURLResponse objects. - /// @param url the URL from which the response was generated. - /// @param statusCode an HTTP status code. - /// @param HTTPVersion The version of the HTTP response as represented by the server. This is typically represented as "HTTP/1.1". - /// @param headerFields A dictionary representing the header keys and values of the server response. - /// @result the instance of the object, or NULL if an error occurred during initialization. - /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. - NSHTTPURLResponse initWithURL_statusCode_HTTPVersion_headerFields_(NSURL? url, - int statusCode, NSString? HTTPVersion, NSDictionary? headerFields) { - final _ret = _lib._objc_msgSend_458( - _id, - _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, - url?._id ?? ffi.nullptr, - statusCode, - HTTPVersion?._id ?? ffi.nullptr, - headerFields?._id ?? ffi.nullptr); - return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. + set timeoutIntervalForRequest(double value) { + _lib._objc_msgSend_341( + _id, _lib._sel_setTimeoutIntervalForRequest_1, value); } - /// ! - /// @abstract Returns the HTTP status code of the receiver. - /// @result The HTTP status code of the receiver. - int get statusCode { - return _lib._objc_msgSend_81(_id, _lib._sel_statusCode1); + /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. + double get timeoutIntervalForResource { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForResource1); } - /// ! - /// @abstract Returns a dictionary containing all the HTTP header fields - /// of the receiver. - /// @discussion By examining this header dictionary, clients can see - /// the "raw" header information which was reported to the protocol - /// implementation by the HTTP server. This may be of use to - /// sophisticated or special-purpose HTTP clients. - /// @result A dictionary containing all the HTTP header fields of the - /// receiver. - NSDictionary? get allHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. + set timeoutIntervalForResource(double value) { + _lib._objc_msgSend_341( + _id, _lib._sel_setTimeoutIntervalForResource_1, value); } - /// ! - /// @method valueForHTTPHeaderField: - /// @abstract Returns the value which corresponds to the given header - /// field. Note that, in keeping with the HTTP RFC, HTTP header field - /// names are case-insensitive. - /// @param field the header field name to use for the lookup - /// (case-insensitive). - /// @result the value associated with the given header field, or nil if - /// there is no value associated with the given header field. - NSString valueForHTTPHeaderField_(NSString? field) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + /// type of service for requests. + int get networkServiceType { + return _lib._objc_msgSend_360(_id, _lib._sel_networkServiceType1); } - /// ! - /// @method localizedStringForStatusCode: - /// @abstract Convenience method which returns a localized string - /// corresponding to the status code for this response. - /// @param statusCode the status code to use to produce a localized string. - /// @result A localized string corresponding to the given status code. - static NSString localizedStringForStatusCode_( - NativeCupertinoHttp _lib, int statusCode) { - final _ret = _lib._objc_msgSend_459(_lib._class_NSHTTPURLResponse1, - _lib._sel_localizedStringForStatusCode_1, statusCode); - return NSString._(_ret, _lib, retain: true, release: true); + /// type of service for requests. + set networkServiceType(int value) { + _lib._objc_msgSend_364(_id, _lib._sel_setNetworkServiceType_1, value); } - static NSHTTPURLResponse new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_new1); - return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + /// allow request to route over cellular. + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); } - static NSHTTPURLResponse alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_alloc1); - return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + /// allow request to route over cellular. + set allowsCellularAccess(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setAllowsCellularAccess_1, value); } -} -class NSException extends NSObject { - NSException._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// allow request to route over expensive networks. Defaults to YES. + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + } - /// Returns a [NSException] that points to the same underlying object as [other]. - static NSException castFrom(T other) { - return NSException._(other._id, other._lib, retain: true, release: true); + /// allow request to route over expensive networks. Defaults to YES. + set allowsExpensiveNetworkAccess(bool value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); } - /// Returns a [NSException] that wraps the given raw object pointer. - static NSException castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSException._(other, lib, retain: retain, release: release); + /// allow request to route over networks in constrained mode. Defaults to YES. + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); } - /// Returns whether [obj] is an instance of [NSException]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSException1); + /// allow request to route over networks in constrained mode. Defaults to YES. + set allowsConstrainedNetworkAccess(bool value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); } - static NSException exceptionWithName_reason_userInfo_( - NativeCupertinoHttp _lib, - NSExceptionName name, - NSString? reason, - NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_460( - _lib._class_NSException1, - _lib._sel_exceptionWithName_reason_userInfo_1, - name, - reason?._id ?? ffi.nullptr, - userInfo?._id ?? ffi.nullptr); - return NSException._(_ret, _lib, retain: true, release: true); + /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. + bool get requiresDNSSECValidation { + return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); } - NSException initWithName_reason_userInfo_( - NSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_461( - _id, - _lib._sel_initWithName_reason_userInfo_1, - aName, - aReason?._id ?? ffi.nullptr, - aUserInfo?._id ?? ffi.nullptr); - return NSException._(_ret, _lib, retain: true, release: true); + /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. + set requiresDNSSECValidation(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setRequiresDNSSECValidation_1, value); } - NSExceptionName get name { - return _lib._objc_msgSend_32(_id, _lib._sel_name1); + /// Causes tasks to wait for network connectivity to become available, rather + /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) + /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest + /// property does not apply, but the timeoutIntervalForResource property does. + /// + /// Unsatisfactory connectivity (that requires waiting) includes cases where the + /// device has limited or insufficient connectivity for a task (e.g., only has a + /// cellular connection but the allowsCellularAccess property is NO, or requires + /// a VPN connection in order to reach the desired host). + /// + /// Default value is NO. Ignored by background sessions, as background sessions + /// always wait for connectivity. + bool get waitsForConnectivity { + return _lib._objc_msgSend_11(_id, _lib._sel_waitsForConnectivity1); } - NSString? get reason { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_reason1); + /// Causes tasks to wait for network connectivity to become available, rather + /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) + /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest + /// property does not apply, but the timeoutIntervalForResource property does. + /// + /// Unsatisfactory connectivity (that requires waiting) includes cases where the + /// device has limited or insufficient connectivity for a task (e.g., only has a + /// cellular connection but the allowsCellularAccess property is NO, or requires + /// a VPN connection in order to reach the desired host). + /// + /// Default value is NO. Ignored by background sessions, as background sessions + /// always wait for connectivity. + set waitsForConnectivity(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setWaitsForConnectivity_1, value); + } + + /// allows background tasks to be scheduled at the discretion of the system for optimal performance. + bool get discretionary { + return _lib._objc_msgSend_11(_id, _lib._sel_isDiscretionary1); + } + + /// allows background tasks to be scheduled at the discretion of the system for optimal performance. + set discretionary(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setDiscretionary_1, value); + } + + /// The identifier of the shared data container into which files in background sessions should be downloaded. + /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or + /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. + NSString? get sharedContainerIdentifier { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_sharedContainerIdentifier1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + /// The identifier of the shared data container into which files in background sessions should be downloaded. + /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or + /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. + set sharedContainerIdentifier(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setSharedContainerIdentifier_1, + value?._id ?? ffi.nullptr); } - NSArray? get callStackReturnAddresses { + /// Allows the app to be resumed or launched in the background when tasks in background sessions complete + /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: + /// and the default value is YES. + /// + /// NOTE: macOS apps based on AppKit do not support background launch. + bool get sessionSendsLaunchEvents { + return _lib._objc_msgSend_11(_id, _lib._sel_sessionSendsLaunchEvents1); + } + + /// Allows the app to be resumed or launched in the background when tasks in background sessions complete + /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: + /// and the default value is YES. + /// + /// NOTE: macOS apps based on AppKit do not support background launch. + set sessionSendsLaunchEvents(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); + } + + /// The proxy dictionary, as described by + NSDictionary? get connectionProxyDictionary { final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_callStackReturnAddresses1); + _lib._objc_msgSend_180(_id, _lib._sel_connectionProxyDictionary1); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : NSDictionary._(_ret, _lib, retain: true, release: true); } - NSArray? get callStackSymbols { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_callStackSymbols1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + /// The proxy dictionary, as described by + set connectionProxyDictionary(NSDictionary? value) { + _lib._objc_msgSend_366(_id, _lib._sel_setConnectionProxyDictionary_1, + value?._id ?? ffi.nullptr); } - void raise() { - return _lib._objc_msgSend_1(_id, _lib._sel_raise1); + /// The minimum allowable versions of the TLS protocol, from + int get TLSMinimumSupportedProtocol { + return _lib._objc_msgSend_390(_id, _lib._sel_TLSMinimumSupportedProtocol1); } - static void raise_format_( - NativeCupertinoHttp _lib, NSExceptionName name, NSString? format) { - return _lib._objc_msgSend_361(_lib._class_NSException1, - _lib._sel_raise_format_1, name, format?._id ?? ffi.nullptr); + /// The minimum allowable versions of the TLS protocol, from + set TLSMinimumSupportedProtocol(int value) { + _lib._objc_msgSend_391( + _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); } - static void raise_format_arguments_(NativeCupertinoHttp _lib, - NSExceptionName name, NSString? format, va_list argList) { - return _lib._objc_msgSend_462( - _lib._class_NSException1, - _lib._sel_raise_format_arguments_1, - name, - format?._id ?? ffi.nullptr, - argList); + /// The maximum allowable versions of the TLS protocol, from + int get TLSMaximumSupportedProtocol { + return _lib._objc_msgSend_390(_id, _lib._sel_TLSMaximumSupportedProtocol1); } - static NSException new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_new1); - return NSException._(_ret, _lib, retain: false, release: true); + /// The maximum allowable versions of the TLS protocol, from + set TLSMaximumSupportedProtocol(int value) { + _lib._objc_msgSend_391( + _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); } - static NSException alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); - return NSException._(_ret, _lib, retain: false, release: true); + /// The minimum allowable versions of the TLS protocol, from + int get TLSMinimumSupportedProtocolVersion { + return _lib._objc_msgSend_392( + _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); } -} - -typedef NSUncaughtExceptionHandler - = ffi.NativeFunction)>; - -class NSAssertionHandler extends NSObject { - NSAssertionHandler._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSAssertionHandler] that points to the same underlying object as [other]. - static NSAssertionHandler castFrom(T other) { - return NSAssertionHandler._(other._id, other._lib, - retain: true, release: true); + /// The minimum allowable versions of the TLS protocol, from + set TLSMinimumSupportedProtocolVersion(int value) { + _lib._objc_msgSend_393( + _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); } - /// Returns a [NSAssertionHandler] that wraps the given raw object pointer. - static NSAssertionHandler castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSAssertionHandler._(other, lib, retain: retain, release: release); + /// The maximum allowable versions of the TLS protocol, from + int get TLSMaximumSupportedProtocolVersion { + return _lib._objc_msgSend_392( + _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); } - /// Returns whether [obj] is an instance of [NSAssertionHandler]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSAssertionHandler1); + /// The maximum allowable versions of the TLS protocol, from + set TLSMaximumSupportedProtocolVersion(int value) { + _lib._objc_msgSend_393( + _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); } - static NSAssertionHandler? getCurrentHandler(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_463( - _lib._class_NSAssertionHandler1, _lib._sel_currentHandler1); - return _ret.address == 0 - ? null - : NSAssertionHandler._(_ret, _lib, retain: true, release: true); + /// Allow the use of HTTP pipelining + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); } - void handleFailureInMethod_object_file_lineNumber_description_( - ffi.Pointer selector, - NSObject object, - NSString? fileName, - int line, - NSString? format) { - return _lib._objc_msgSend_464( - _id, - _lib._sel_handleFailureInMethod_object_file_lineNumber_description_1, - selector, - object._id, - fileName?._id ?? ffi.nullptr, - line, - format?._id ?? ffi.nullptr); + /// Allow the use of HTTP pipelining + set HTTPShouldUsePipelining(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); } - void handleFailureInFunction_file_lineNumber_description_( - NSString? functionName, NSString? fileName, int line, NSString? format) { - return _lib._objc_msgSend_465( - _id, - _lib._sel_handleFailureInFunction_file_lineNumber_description_1, - functionName?._id ?? ffi.nullptr, - fileName?._id ?? ffi.nullptr, - line, - format?._id ?? ffi.nullptr); + /// Allow the session to set cookies on requests + bool get HTTPShouldSetCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldSetCookies1); } - static NSAssertionHandler new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_new1); - return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + /// Allow the session to set cookies on requests + set HTTPShouldSetCookies(bool value) { + _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldSetCookies_1, value); } - static NSAssertionHandler alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_alloc1); - return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. + int get HTTPCookieAcceptPolicy { + return _lib._objc_msgSend_375(_id, _lib._sel_HTTPCookieAcceptPolicy1); } -} -class NSBlockOperation extends NSOperation { - NSBlockOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSBlockOperation] that points to the same underlying object as [other]. - static NSBlockOperation castFrom(T other) { - return NSBlockOperation._(other._id, other._lib, - retain: true, release: true); + /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. + set HTTPCookieAcceptPolicy(int value) { + _lib._objc_msgSend_376(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); } - /// Returns a [NSBlockOperation] that wraps the given raw object pointer. - static NSBlockOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSBlockOperation._(other, lib, retain: retain, release: release); + /// Specifies additional headers which will be set on outgoing requests. + /// Note that these headers are added to the request only if not already present. + NSDictionary? get HTTPAdditionalHeaders { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_HTTPAdditionalHeaders1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSBlockOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSBlockOperation1); + /// Specifies additional headers which will be set on outgoing requests. + /// Note that these headers are added to the request only if not already present. + set HTTPAdditionalHeaders(NSDictionary? value) { + _lib._objc_msgSend_366( + _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); } - static NSBlockOperation blockOperationWithBlock_( - NativeCupertinoHttp _lib, ObjCBlock16 block) { - final _ret = _lib._objc_msgSend_466(_lib._class_NSBlockOperation1, - _lib._sel_blockOperationWithBlock_1, block._id); - return NSBlockOperation._(_ret, _lib, retain: true, release: true); + /// The maximum number of simultaneous persistent connections per host + int get HTTPMaximumConnectionsPerHost { + return _lib._objc_msgSend_81(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); } - void addExecutionBlock_(ObjCBlock16 block) { - return _lib._objc_msgSend_341( - _id, _lib._sel_addExecutionBlock_1, block._id); + /// The maximum number of simultaneous persistent connections per host + set HTTPMaximumConnectionsPerHost(int value) { + _lib._objc_msgSend_346( + _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); } - NSArray? get executionBlocks { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_executionBlocks1); + /// The cookie storage object to use, or nil to indicate that no cookies should be handled + NSHTTPCookieStorage? get HTTPCookieStorage { + final _ret = _lib._objc_msgSend_370(_id, _lib._sel_HTTPCookieStorage1); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); } - static NSBlockOperation new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_new1); - return NSBlockOperation._(_ret, _lib, retain: false, release: true); + /// The cookie storage object to use, or nil to indicate that no cookies should be handled + set HTTPCookieStorage(NSHTTPCookieStorage? value) { + _lib._objc_msgSend_394( + _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); } - static NSBlockOperation alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_alloc1); - return NSBlockOperation._(_ret, _lib, retain: false, release: true); + /// The credential storage object, or nil to indicate that no credential storage is to be used + NSURLCredentialStorage? get URLCredentialStorage { + final _ret = _lib._objc_msgSend_395(_id, _lib._sel_URLCredentialStorage1); + return _ret.address == 0 + ? null + : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); } -} - -class NSInvocationOperation extends NSOperation { - NSInvocationOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSInvocationOperation] that points to the same underlying object as [other]. - static NSInvocationOperation castFrom(T other) { - return NSInvocationOperation._(other._id, other._lib, - retain: true, release: true); + /// The credential storage object, or nil to indicate that no credential storage is to be used + set URLCredentialStorage(NSURLCredentialStorage? value) { + _lib._objc_msgSend_396( + _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); } - /// Returns a [NSInvocationOperation] that wraps the given raw object pointer. - static NSInvocationOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInvocationOperation._(other, lib, - retain: retain, release: release); + /// The URL resource cache, or nil to indicate that no caching is to be performed + NSURLCache? get URLCache { + final _ret = _lib._objc_msgSend_397(_id, _lib._sel_URLCache1); + return _ret.address == 0 + ? null + : NSURLCache._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSInvocationOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSInvocationOperation1); + /// The URL resource cache, or nil to indicate that no caching is to be performed + set URLCache(NSURLCache? value) { + _lib._objc_msgSend_398( + _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); } - NSInvocationOperation initWithTarget_selector_object_( - NSObject target, ffi.Pointer sel, NSObject arg) { - final _ret = _lib._objc_msgSend_467(_id, - _lib._sel_initWithTarget_selector_object_1, target._id, sel, arg._id); - return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open + /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) + bool get shouldUseExtendedBackgroundIdleMode { + return _lib._objc_msgSend_11( + _id, _lib._sel_shouldUseExtendedBackgroundIdleMode1); } - NSInvocationOperation initWithInvocation_(NSInvocation? inv) { - final _ret = _lib._objc_msgSend_468( - _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); - return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open + /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) + set shouldUseExtendedBackgroundIdleMode(bool value) { + _lib._objc_msgSend_332( + _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); } - NSInvocation? get invocation { - final _ret = _lib._objc_msgSend_469(_id, _lib._sel_invocation1); + /// An optional array of Class objects which subclass NSURLProtocol. + /// The Class will be sent +canInitWithRequest: when determining if + /// an instance of the class can be used for a given URL scheme. + /// You should not use +[NSURLProtocol registerClass:], as that + /// method will register your class with the default session rather + /// than with an instance of NSURLSession. + /// Custom NSURLProtocol subclasses are not available to background + /// sessions. + NSArray? get protocolClasses { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_protocolClasses1); return _ret.address == 0 ? null - : NSInvocation._(_ret, _lib, retain: true, release: true); + : NSArray._(_ret, _lib, retain: true, release: true); } - NSObject get result { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_result1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// An optional array of Class objects which subclass NSURLProtocol. + /// The Class will be sent +canInitWithRequest: when determining if + /// an instance of the class can be used for a given URL scheme. + /// You should not use +[NSURLProtocol registerClass:], as that + /// method will register your class with the default session rather + /// than with an instance of NSURLSession. + /// Custom NSURLProtocol subclasses are not available to background + /// sessions. + set protocolClasses(NSArray? value) { + _lib._objc_msgSend_399( + _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); } - static NSInvocationOperation new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocationOperation1, _lib._sel_new1); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone + int get multipathServiceType { + return _lib._objc_msgSend_400(_id, _lib._sel_multipathServiceType1); } - static NSInvocationOperation alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocationOperation1, _lib._sel_alloc1); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone + set multipathServiceType(int value) { + _lib._objc_msgSend_401(_id, _lib._sel_setMultipathServiceType_1, value); } -} - -class _Dart_Isolate extends ffi.Opaque {} - -class _Dart_IsolateGroup extends ffi.Opaque {} - -class _Dart_Handle extends ffi.Opaque {} - -class _Dart_WeakPersistentHandle extends ffi.Opaque {} - -class _Dart_FinalizableHandle extends ffi.Opaque {} - -typedef Dart_WeakPersistentHandle = ffi.Pointer<_Dart_WeakPersistentHandle>; - -/// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the -/// version when changing this struct. -typedef Dart_HandleFinalizer = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; -typedef Dart_FinalizableHandle = ffi.Pointer<_Dart_FinalizableHandle>; - -class Dart_IsolateFlags extends ffi.Struct { - @ffi.Int32() - external int version; - - @ffi.Bool() - external bool enable_asserts; - - @ffi.Bool() - external bool use_field_guards; - - @ffi.Bool() - external bool use_osr; - - @ffi.Bool() - external bool obfuscate; - - @ffi.Bool() - external bool load_vmservice_library; - @ffi.Bool() - external bool copy_parent_code; - - @ffi.Bool() - external bool null_safety; + @override + NSURLSessionConfiguration init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } - @ffi.Bool() - external bool is_system_isolate; -} + static NSURLSessionConfiguration new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionConfiguration1, _lib._sel_new1); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, release: true); + } -/// Forward declaration -class Dart_CodeObserver extends ffi.Struct { - external ffi.Pointer data; + static NSURLSessionConfiguration backgroundSessionConfiguration_( + NativeCupertinoHttp _lib, NSString? identifier) { + final _ret = _lib._objc_msgSend_389( + _lib._class_NSURLSessionConfiguration1, + _lib._sel_backgroundSessionConfiguration_1, + identifier?._id ?? ffi.nullptr); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + } - external Dart_OnNewCodeCallback on_new_code; + static NSURLSessionConfiguration alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, release: true); + } } -/// Callback provided by the embedder that is used by the VM to notify on code -/// object creation, *before* it is invoked the first time. -/// This is useful for embedders wanting to e.g. keep track of PCs beyond -/// the lifetime of the garbage collected code objects. -/// Note that an address range may be used by more than one code object over the -/// lifecycle of a process. Clients of this function should record timestamps for -/// these compilation events and when collecting PCs to disambiguate reused -/// address ranges. -typedef Dart_OnNewCodeCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - uintptr_t, uintptr_t)>>; - -/// Describes how to initialize the VM. Used with Dart_Initialize. -/// -/// \param version Identifies the version of the struct used by the client. -/// should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. -/// \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate -/// or NULL if no snapshot is provided. If provided, the buffer must remain -/// valid until Dart_Cleanup returns. -/// \param instructions_snapshot A buffer containing a snapshot of precompiled -/// instructions, or NULL if no snapshot is provided. If provided, the buffer -/// must remain valid until Dart_Cleanup returns. -/// \param initialize_isolate A function to be called during isolate -/// initialization inside an existing isolate group. -/// See Dart_InitializeIsolateCallback. -/// \param create_group A function to be called during isolate group creation. -/// See Dart_IsolateGroupCreateCallback. -/// \param shutdown A function to be called right before an isolate is shutdown. -/// See Dart_IsolateShutdownCallback. -/// \param cleanup A function to be called after an isolate was shutdown. -/// See Dart_IsolateCleanupCallback. -/// \param cleanup_group A function to be called after an isolate group is shutdown. -/// See Dart_IsolateGroupCleanupCallback. -/// \param get_service_assets A function to be called by the service isolate when -/// it requires the vmservice assets archive. -/// See Dart_GetVMServiceAssetsArchive. -/// \param code_observer An external code observer callback function. -/// The observer can be invoked as early as during the Dart_Initialize() call. -class Dart_InitializeParams extends ffi.Struct { - @ffi.Int32() - external int version; - - external ffi.Pointer vm_snapshot_data; - - external ffi.Pointer vm_snapshot_instructions; - - external Dart_IsolateGroupCreateCallback create_group; - - external Dart_InitializeIsolateCallback initialize_isolate; - - external Dart_IsolateShutdownCallback shutdown_isolate; - - external Dart_IsolateCleanupCallback cleanup_isolate; - - external Dart_IsolateGroupCleanupCallback cleanup_group; - - external Dart_ThreadExitCallback thread_exit; - - external Dart_FileOpenCallback file_open; - - external Dart_FileReadCallback file_read; - - external Dart_FileWriteCallback file_write; - - external Dart_FileCloseCallback file_close; - - external Dart_EntropySource entropy_source; - - external Dart_GetVMServiceAssetsArchive get_service_assets; - - @ffi.Bool() - external bool start_kernel_isolate; - - external ffi.Pointer code_observer; -} +class NSURLCredentialStorage extends _ObjCWrapper { + NSURLCredentialStorage._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -/// An isolate creation and initialization callback function. -/// -/// This callback, provided by the embedder, is called when the VM -/// needs to create an isolate. The callback should create an isolate -/// by calling Dart_CreateIsolateGroup and load any scripts required for -/// execution. -/// -/// This callback may be called on a different thread than the one -/// running the parent isolate. -/// -/// When the function returns NULL, it is the responsibility of this -/// function to ensure that Dart_ShutdownIsolate has been called if -/// required (for example, if the isolate was created successfully by -/// Dart_CreateIsolateGroup() but the root library fails to load -/// successfully, then the function should call Dart_ShutdownIsolate -/// before returning). -/// -/// When the function returns NULL, the function should set *error to -/// a malloc-allocated buffer containing a useful error message. The -/// caller of this function (the VM) will make sure that the buffer is -/// freed. -/// -/// \param script_uri The uri of the main source file or snapshot to load. -/// Either the URI of the parent isolate set in Dart_CreateIsolateGroup for -/// Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the -/// library tag handler of the parent isolate. -/// The callback is responsible for loading the program by a call to -/// Dart_LoadScriptFromKernel. -/// \param main The name of the main entry point this isolate will -/// eventually run. This is provided for advisory purposes only to -/// improve debugging messages. The main function is not invoked by -/// this function. -/// \param package_root Ignored. -/// \param package_config Uri of the package configuration file (either in format -/// of .packages or .dart_tool/package_config.json) for this isolate -/// to resolve package imports against. If this parameter is not passed the -/// package resolution of the parent isolate should be used. -/// \param flags Default flags for this isolate being spawned. Either inherited -/// from the spawning isolate or passed as parameters when spawning the -/// isolate from Dart code. -/// \param isolate_data The isolate data which was passed to the -/// parent isolate when it was created by calling Dart_CreateIsolateGroup(). -/// \param error A structure into which the embedder can place a -/// C string containing an error message in the case of failures. -/// -/// \return The embedder returns NULL if the creation and -/// initialization was not successful and the isolate if successful. -typedef Dart_IsolateGroupCreateCallback = ffi.Pointer< - ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>; + /// Returns a [NSURLCredentialStorage] that points to the same underlying object as [other]. + static NSURLCredentialStorage castFrom(T other) { + return NSURLCredentialStorage._(other._id, other._lib, + retain: true, release: true); + } -/// An isolate is the unit of concurrency in Dart. Each isolate has -/// its own memory and thread of control. No state is shared between -/// isolates. Instead, isolates communicate by message passing. -/// -/// Each thread keeps track of its current isolate, which is the -/// isolate which is ready to execute on the current thread. The -/// current isolate may be NULL, in which case no isolate is ready to -/// execute. Most of the Dart apis require there to be a current -/// isolate in order to function without error. The current isolate is -/// set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. -typedef Dart_Isolate = ffi.Pointer<_Dart_Isolate>; + /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. + static NSURLCredentialStorage castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLCredentialStorage._(other, lib, + retain: retain, release: release); + } -/// An isolate initialization callback function. -/// -/// This callback, provided by the embedder, is called when the VM has created an -/// isolate within an existing isolate group (i.e. from the same source as an -/// existing isolate). -/// -/// The callback should setup native resolvers and might want to set a custom -/// message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as -/// runnable. -/// -/// This callback may be called on a different thread than the one -/// running the parent isolate. -/// -/// When the function returns `false`, it is the responsibility of this -/// function to ensure that `Dart_ShutdownIsolate` has been called. -/// -/// When the function returns `false`, the function should set *error to -/// a malloc-allocated buffer containing a useful error message. The -/// caller of this function (the VM) will make sure that the buffer is -/// freed. -/// -/// \param child_isolate_data The callback data to associate with the new -/// child isolate. -/// \param error A structure into which the embedder can place a -/// C string containing an error message in the case the initialization fails. -/// -/// \return The embedder returns true if the initialization was successful and -/// false otherwise (in which case the VM will terminate the isolate). -typedef Dart_InitializeIsolateCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer>, - ffi.Pointer>)>>; + /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLCredentialStorage1); + } +} -/// An isolate shutdown callback function. -/// -/// This callback, provided by the embedder, is called before the vm -/// shuts down an isolate. The isolate being shutdown will be the current -/// isolate. It is safe to run Dart code. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -/// \param isolate_data The same callback data which was passed to the isolate -/// when it was created. -typedef Dart_IsolateShutdownCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; +class NSURLCache extends _ObjCWrapper { + NSURLCache._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -/// An isolate cleanup callback function. -/// -/// This callback, provided by the embedder, is called after the vm -/// shuts down an isolate. There will be no current isolate and it is *not* -/// safe to run Dart code. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -/// \param isolate_data The same callback data which was passed to the isolate -/// when it was created. -typedef Dart_IsolateCleanupCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer)>>; + /// Returns a [NSURLCache] that points to the same underlying object as [other]. + static NSURLCache castFrom(T other) { + return NSURLCache._(other._id, other._lib, retain: true, release: true); + } -/// An isolate group cleanup callback function. -/// -/// This callback, provided by the embedder, is called after the vm -/// shuts down an isolate group. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -typedef Dart_IsolateGroupCleanupCallback - = ffi.Pointer)>>; + /// Returns a [NSURLCache] that wraps the given raw object pointer. + static NSURLCache castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLCache._(other, lib, retain: retain, release: release); + } -/// A thread death callback function. -/// This callback, provided by the embedder, is called before a thread in the -/// vm thread pool exits. -/// This function could be used to dispose of native resources that -/// are associated and attached to the thread, in order to avoid leaks. -typedef Dart_ThreadExitCallback - = ffi.Pointer>; + /// Returns whether [obj] is an instance of [NSURLCache]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); + } +} -/// Callbacks provided by the embedder for file operations. If the -/// embedder does not allow file operations these callbacks can be -/// NULL. -/// -/// Dart_FileOpenCallback - opens a file for reading or writing. -/// \param name The name of the file to open. -/// \param write A boolean variable which indicates if the file is to -/// opened for writing. If there is an existing file it needs to truncated. +/// ! +/// @enum NSURLSessionMultipathServiceType /// -/// Dart_FileReadCallback - Read contents of file. -/// \param data Buffer allocated in the callback into which the contents -/// of the file are read into. It is the responsibility of the caller to -/// free this buffer. -/// \param file_length A variable into which the length of the file is returned. -/// In the case of an error this value would be -1. -/// \param stream Handle to the opened file. +/// @discussion The NSURLSessionMultipathServiceType enum defines constants that +/// can be used to specify the multipath service type to associate an NSURLSession. The +/// multipath service type determines whether multipath TCP should be attempted and the conditions +/// for creating and switching between subflows. Using these service types requires the appropriate entitlement. Any connection attempt will fail if the process does not have the required entitlement. +/// A primary interface is a generally less expensive interface in terms of both cost and power (such as WiFi or ethernet). A secondary interface is more expensive (such as 3G or LTE). /// -/// Dart_FileWriteCallback - Write data into file. -/// \param data Buffer which needs to be written into the file. -/// \param length Length of the buffer. -/// \param stream Handle to the opened file. +/// @constant NSURLSessionMultipathServiceTypeNone Specifies that multipath tcp should not be used. Connections will use a single flow. +/// This is the default value. No entitlement is required to set this value. /// -/// Dart_FileCloseCallback - Closes the opened file. -/// \param stream Handle to the opened file. -typedef Dart_FileOpenCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Bool)>>; -typedef Dart_FileReadCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>>; -typedef Dart_FileWriteCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.IntPtr, ffi.Pointer)>>; -typedef Dart_FileCloseCallback - = ffi.Pointer)>>; -typedef Dart_EntropySource = ffi.Pointer< - ffi.NativeFunction, ffi.IntPtr)>>; - -/// Callback provided by the embedder that is used by the vmservice isolate -/// to request the asset archive. The asset archive must be an uncompressed tar -/// archive that is stored in a Uint8List. +/// @constant NSURLSessionMultipathServiceTypeHandover Specifies that a secondary subflow should only be used +/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entitlement. /// -/// If the embedder has no vmservice isolate assets, the callback can be NULL. +/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secondary subflow should be used if the +/// primary subflow is not performing adequately (packet loss, high round trip times, bandwidth issues). The secondary +/// subflow will be created more aggressively than with NSURLSessionMultipathServiceTypeHandover. Requires the com.apple.developer.networking.multipath entitlement. /// -/// \return The embedder must return a handle to a Uint8List containing an -/// uncompressed tar archive or null. -typedef Dart_GetVMServiceAssetsArchive - = ffi.Pointer>; -typedef Dart_IsolateGroup = ffi.Pointer<_Dart_IsolateGroup>; +/// @constant NSURLSessionMultipathServiceTypeAggregate Specifies that multiple subflows across multiple interfaces should be +/// used for better bandwidth. This mode is only available for experimentation on devices configured for development use. +/// It can be enabled in the Developer section of the Settings app. +abstract class NSURLSessionMultipathServiceType { + /// None - no multipath (default) + static const int NSURLSessionMultipathServiceTypeNone = 0; -/// A message notification callback. -/// -/// This callback allows the embedder to provide an alternate wakeup -/// mechanism for the delivery of inter-isolate messages. It is the -/// responsibility of the embedder to call Dart_HandleMessage to -/// process the message. -typedef Dart_MessageNotifyCallback - = ffi.Pointer>; + /// Handover - secondary flows brought up when primary flow is not performing adequately. + static const int NSURLSessionMultipathServiceTypeHandover = 1; -/// A port is used to send or receive inter-isolate messages -typedef Dart_Port = ffi.Int64; + /// Interactive - secondary flows created more aggressively. + static const int NSURLSessionMultipathServiceTypeInteractive = 2; -abstract class Dart_CoreType_Id { - static const int Dart_CoreType_Dynamic = 0; - static const int Dart_CoreType_Int = 1; - static const int Dart_CoreType_String = 2; + /// Aggregate - multiple subflows used for greater bandwidth. + static const int NSURLSessionMultipathServiceTypeAggregate = 3; } -/// ========== -/// Typed Data -/// ========== -abstract class Dart_TypedData_Type { - static const int Dart_TypedData_kByteData = 0; - static const int Dart_TypedData_kInt8 = 1; - static const int Dart_TypedData_kUint8 = 2; - static const int Dart_TypedData_kUint8Clamped = 3; - static const int Dart_TypedData_kInt16 = 4; - static const int Dart_TypedData_kUint16 = 5; - static const int Dart_TypedData_kInt32 = 6; - static const int Dart_TypedData_kUint32 = 7; - static const int Dart_TypedData_kInt64 = 8; - static const int Dart_TypedData_kUint64 = 9; - static const int Dart_TypedData_kFloat32 = 10; - static const int Dart_TypedData_kFloat64 = 11; - static const int Dart_TypedData_kInt32x4 = 12; - static const int Dart_TypedData_kFloat32x4 = 13; - static const int Dart_TypedData_kFloat64x2 = 14; - static const int Dart_TypedData_kInvalid = 15; +void _ObjCBlock38_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); } -class _Dart_NativeArguments extends ffi.Opaque {} - -/// The arguments to a native function. -/// -/// This object is passed to a native function to represent its -/// arguments and return value. It allows access to the arguments to a -/// native function by index. It also allows the return value of a -/// native function to be set. -typedef Dart_NativeArguments = ffi.Pointer<_Dart_NativeArguments>; +final _ObjCBlock38_closureRegistry = {}; +int _ObjCBlock38_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock38_registerClosure(Function fn) { + final id = ++_ObjCBlock38_closureRegistryIndex; + _ObjCBlock38_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -abstract class Dart_NativeArgument_Type { - static const int Dart_NativeArgument_kBool = 0; - static const int Dart_NativeArgument_kInt32 = 1; - static const int Dart_NativeArgument_kUint32 = 2; - static const int Dart_NativeArgument_kInt64 = 3; - static const int Dart_NativeArgument_kUint64 = 4; - static const int Dart_NativeArgument_kDouble = 5; - static const int Dart_NativeArgument_kString = 6; - static const int Dart_NativeArgument_kInstance = 7; - static const int Dart_NativeArgument_kNativeFields = 8; +void _ObjCBlock38_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock38_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); } -class _Dart_NativeArgument_Descriptor extends ffi.Struct { - @ffi.Uint8() - external int type; +class ObjCBlock38 extends _ObjCBlockBase { + ObjCBlock38._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.Uint8() - external int index; -} + /// Creates a block from a C function pointer. + ObjCBlock38.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock38_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -class _Dart_NativeArgument_Value extends ffi.Opaque {} + /// Creates a block from a Dart function. + ObjCBlock38.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock38_closureTrampoline) + .cast(), + _ObjCBlock38_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } +} -typedef Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor; -typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; +/// An NSURLSessionDataTask does not provide any additional +/// functionality over an NSURLSessionTask and its presence is merely +/// to provide lexical differentiation from download and upload tasks. +class NSURLSessionDataTask extends NSURLSessionTask { + NSURLSessionDataTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -/// An environment lookup callback function. -/// -/// \param name The name of the value to lookup in the environment. -/// -/// \return A valid handle to a string if the name exists in the -/// current environment or Dart_Null() if not. -typedef Dart_EnvironmentCallback - = ffi.Pointer>; + /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. + static NSURLSessionDataTask castFrom(T other) { + return NSURLSessionDataTask._(other._id, other._lib, + retain: true, release: true); + } -/// Native entry resolution callback. -/// -/// For libraries and scripts which have native functions, the embedder -/// can provide a native entry resolver. This callback is used to map a -/// name/arity to a Dart_NativeFunction. If no function is found, the -/// callback should return NULL. -/// -/// The parameters to the native resolver function are: -/// \param name a Dart string which is the name of the native function. -/// \param num_of_arguments is the number of arguments expected by the -/// native function. -/// \param auto_setup_scope is a boolean flag that can be set by the resolver -/// to indicate if this function needs a Dart API scope (see Dart_EnterScope/ -/// Dart_ExitScope) to be setup automatically by the VM before calling into -/// the native function. By default most native functions would require this -/// to be true but some light weight native functions which do not call back -/// into the VM through the Dart API may not require a Dart scope to be -/// setup automatically. -/// -/// \return A valid Dart_NativeFunction which resolves to a native entry point -/// for the native function. -/// -/// See Dart_SetNativeResolver. -typedef Dart_NativeEntryResolver = ffi.Pointer< - ffi.NativeFunction< - Dart_NativeFunction Function( - ffi.Handle, ffi.Int, ffi.Pointer)>>; + /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. + static NSURLSessionDataTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionDataTask._(other, lib, retain: retain, release: release); + } -/// A native function. -typedef Dart_NativeFunction - = ffi.Pointer>; + /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionDataTask1); + } -/// Native entry symbol lookup callback. -/// -/// For libraries and scripts which have native functions, the embedder -/// can provide a callback for mapping a native entry to a symbol. This callback -/// maps a native function entry PC to the native function name. If no native -/// entry symbol can be found, the callback should return NULL. -/// -/// The parameters to the native reverse resolver function are: -/// \param nf A Dart_NativeFunction. -/// -/// \return A const UTF-8 string containing the symbol name or NULL. -/// -/// See Dart_SetNativeResolver. -typedef Dart_NativeEntrySymbol = ffi.Pointer< - ffi.NativeFunction Function(Dart_NativeFunction)>>; + @override + NSURLSessionDataTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } -/// FFI Native C function pointer resolver callback. -/// -/// See Dart_SetFfiNativeResolver. -typedef Dart_FfiNativeResolver = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, uintptr_t)>>; + static NSURLSessionDataTask new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } -/// ===================== -/// Scripts and Libraries -/// ===================== -abstract class Dart_LibraryTag { - static const int Dart_kCanonicalizeUrl = 0; - static const int Dart_kImportTag = 1; - static const int Dart_kKernelTag = 2; + static NSURLSessionDataTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } } -/// The library tag handler is a multi-purpose callback provided by the -/// embedder to the Dart VM. The embedder implements the tag handler to -/// provide the ability to load Dart scripts and imports. -/// -/// -- TAGS -- -/// -/// Dart_kCanonicalizeUrl -/// -/// This tag indicates that the embedder should canonicalize 'url' with -/// respect to 'library'. For most embedders, the -/// Dart_DefaultCanonicalizeUrl function is a sufficient implementation -/// of this tag. The return value should be a string holding the -/// canonicalized url. -/// -/// Dart_kImportTag -/// -/// This tag is used to load a library from IsolateMirror.loadUri. The embedder -/// should call Dart_LoadLibraryFromKernel to provide the library to the VM. The -/// return value should be an error or library (the result from -/// Dart_LoadLibraryFromKernel). -/// -/// Dart_kKernelTag -/// -/// This tag is used to load the intermediate file (kernel) generated by -/// the Dart front end. This tag is typically used when a 'hot-reload' -/// of an application is needed and the VM is 'use dart front end' mode. -/// The dart front end typically compiles all the scripts, imports and part -/// files into one intermediate file hence we don't use the source/import or -/// script tags. The return value should be an error or a TypedData containing -/// the kernel bytes. -typedef Dart_LibraryTagHandler = ffi.Pointer< - ffi.NativeFunction>; +/// An NSURLSessionUploadTask does not currently provide any additional +/// functionality over an NSURLSessionDataTask. All delegate messages +/// that may be sent referencing an NSURLSessionDataTask equally apply +/// to NSURLSessionUploadTasks. +class NSURLSessionUploadTask extends NSURLSessionDataTask { + NSURLSessionUploadTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -/// Handles deferred loading requests. When this handler is invoked, it should -/// eventually load the deferred loading unit with the given id and call -/// Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is -/// recommended that the loading occur asynchronously, but it is permitted to -/// call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the -/// handler returns. -/// -/// If an error is returned, it will be propogated through -/// `prefix.loadLibrary()`. This is useful for synchronous -/// implementations, which must propogate any unwind errors from -/// Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler -/// should return a non-error such as `Dart_Null()`. -typedef Dart_DeferredLoadHandler - = ffi.Pointer>; + /// Returns a [NSURLSessionUploadTask] that points to the same underlying object as [other]. + static NSURLSessionUploadTask castFrom(T other) { + return NSURLSessionUploadTask._(other._id, other._lib, + retain: true, release: true); + } -/// TODO(33433): Remove kernel service from the embedding API. -abstract class Dart_KernelCompilationStatus { - static const int Dart_KernelCompilationStatus_Unknown = -1; - static const int Dart_KernelCompilationStatus_Ok = 0; - static const int Dart_KernelCompilationStatus_Error = 1; - static const int Dart_KernelCompilationStatus_Crash = 2; - static const int Dart_KernelCompilationStatus_MsgFailed = 3; + /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. + static NSURLSessionUploadTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionUploadTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionUploadTask1); + } + + @override + NSURLSessionUploadTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionUploadTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionUploadTask1, _lib._sel_new1); + return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionUploadTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionUploadTask1, _lib._sel_alloc1); + return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + } } -class Dart_KernelCompilationResult extends ffi.Struct { - @ffi.Int32() - external int status; +/// NSURLSessionDownloadTask is a task that represents a download to +/// local storage. +class NSURLSessionDownloadTask extends NSURLSessionTask { + NSURLSessionDownloadTask._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - @ffi.Bool() - external bool null_safety; + /// Returns a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. + static NSURLSessionDownloadTask castFrom(T other) { + return NSURLSessionDownloadTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. + static NSURLSessionDownloadTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionDownloadTask._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionDownloadTask1); + } + + /// Cancel the download (and calls the superclass -cancel). If + /// conditions will allow for resuming the download in the future, the + /// callback will be called with an opaque data blob, which may be used + /// with -downloadTaskWithResumeData: to attempt to resume the download. + /// If resume data cannot be created, the completion handler will be + /// called with nil resumeData. + void cancelByProducingResumeData_(ObjCBlock39 completionHandler) { + return _lib._objc_msgSend_411( + _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); + } - external ffi.Pointer error; + @override + NSURLSessionDownloadTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); + } - external ffi.Pointer kernel; + static NSURLSessionDownloadTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_new1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + } - @ffi.IntPtr() - external int kernel_size; + static NSURLSessionDownloadTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_alloc1); + return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + } } -abstract class Dart_KernelCompilationVerbosityLevel { - static const int Dart_KernelCompilationVerbosityLevel_Error = 0; - static const int Dart_KernelCompilationVerbosityLevel_Warning = 1; - static const int Dart_KernelCompilationVerbosityLevel_Info = 2; - static const int Dart_KernelCompilationVerbosityLevel_All = 3; +void _ObjCBlock39_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); } -class Dart_SourceFile extends ffi.Struct { - external ffi.Pointer uri; +final _ObjCBlock39_closureRegistry = {}; +int _ObjCBlock39_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock39_registerClosure(Function fn) { + final id = ++_ObjCBlock39_closureRegistryIndex; + _ObjCBlock39_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external ffi.Pointer source; +void _ObjCBlock39_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock39_closureRegistry[block.ref.target.address]!(arg0); } -typedef Dart_StreamingWriteCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.IntPtr)>>; -typedef Dart_CreateLoadingUnitCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer>, - ffi.Pointer>)>>; -typedef Dart_StreamingCloseCallback - = ffi.Pointer)>>; +class ObjCBlock39 extends _ObjCBlockBase { + ObjCBlock39._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -/// A Dart_CObject is used for representing Dart objects as native C -/// data outside the Dart heap. These objects are totally detached from -/// the Dart heap. Only a subset of the Dart objects have a -/// representation as a Dart_CObject. -/// -/// The string encoding in the 'value.as_string' is UTF-8. + /// Creates a block from a C function pointer. + ObjCBlock39.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock39_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock39.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock39_closureTrampoline) + .cast(), + _ObjCBlock39_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } +} + +/// An NSURLSessionStreamTask provides an interface to perform reads +/// and writes to a TCP/IP stream created via NSURLSession. This task +/// may be explicitly created from an NSURLSession, or created as a +/// result of the appropriate disposition response to a +/// -URLSession:dataTask:didReceiveResponse: delegate message. /// -/// All the different types from dart:typed_data are exposed as type -/// kTypedData. The specific type from dart:typed_data is in the type -/// field of the as_typed_data structure. The length in the -/// as_typed_data structure is always in bytes. +/// NSURLSessionStreamTask can be used to perform asynchronous reads +/// and writes. Reads and writes are enqueued and executed serially, +/// with the completion handler being invoked on the sessions delegate +/// queue. If an error occurs, or the task is canceled, all +/// outstanding read and write calls will have their completion +/// handlers invoked with an appropriate error. /// -/// The data for kTypedData is copied on message send and ownership remains with -/// the caller. The ownership of data for kExternalTyped is passed to the VM on -/// message send and returned when the VM invokes the -/// Dart_HandleFinalizer callback; a non-NULL callback must be provided. -abstract class Dart_CObject_Type { - static const int Dart_CObject_kNull = 0; - static const int Dart_CObject_kBool = 1; - static const int Dart_CObject_kInt32 = 2; - static const int Dart_CObject_kInt64 = 3; - static const int Dart_CObject_kDouble = 4; - static const int Dart_CObject_kString = 5; - static const int Dart_CObject_kArray = 6; - static const int Dart_CObject_kTypedData = 7; - static const int Dart_CObject_kExternalTypedData = 8; - static const int Dart_CObject_kSendPort = 9; - static const int Dart_CObject_kCapability = 10; - static const int Dart_CObject_kNativePointer = 11; - static const int Dart_CObject_kUnsupported = 12; - static const int Dart_CObject_kNumberOfTypes = 13; -} +/// It is also possible to create NSInputStream and NSOutputStream +/// instances from an NSURLSessionTask by sending +/// -captureStreams to the task. All outstanding reads and writes are +/// completed before the streams are created. Once the streams are +/// delivered to the session delegate, the task is considered complete +/// and will receive no more messages. These streams are +/// disassociated from the underlying session. +class NSURLSessionStreamTask extends NSURLSessionTask { + NSURLSessionStreamTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -class _Dart_CObject extends ffi.Struct { - @ffi.Int32() - external int type; + /// Returns a [NSURLSessionStreamTask] that points to the same underlying object as [other]. + static NSURLSessionStreamTask castFrom(T other) { + return NSURLSessionStreamTask._(other._id, other._lib, + retain: true, release: true); + } - external UnnamedUnion5 value; -} + /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. + static NSURLSessionStreamTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionStreamTask._(other, lib, + retain: retain, release: release); + } -class UnnamedUnion5 extends ffi.Union { - @ffi.Bool() - external bool as_bool; + /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionStreamTask1); + } - @ffi.Int32() - external int as_int32; + /// Read minBytes, or at most maxBytes bytes and invoke the completion + /// handler on the sessions delegate queue with the data or an error. + /// If an error occurs, any outstanding reads will also fail, and new + /// read requests will error out immediately. + void readDataOfMinLength_maxLength_timeout_completionHandler_(int minBytes, + int maxBytes, double timeout, ObjCBlock40 completionHandler) { + return _lib._objc_msgSend_415( + _id, + _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, + minBytes, + maxBytes, + timeout, + completionHandler._id); + } - @ffi.Int64() - external int as_int64; + /// Write the data completely to the underlying socket. If all the + /// bytes have not been written by the timeout, a timeout error will + /// occur. Note that invocation of the completion handler does not + /// guarantee that the remote side has received all the bytes, only + /// that they have been written to the kernel. + void writeData_timeout_completionHandler_( + NSData? data, double timeout, ObjCBlock41 completionHandler) { + return _lib._objc_msgSend_416( + _id, + _lib._sel_writeData_timeout_completionHandler_1, + data?._id ?? ffi.nullptr, + timeout, + completionHandler._id); + } - @ffi.Double() - external double as_double; + /// -captureStreams completes any already enqueued reads + /// and writes, and then invokes the + /// URLSession:streamTask:didBecomeInputStream:outputStream: delegate + /// message. When that message is received, the task object is + /// considered completed and will not receive any more delegate + /// messages. + void captureStreams() { + return _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); + } - external ffi.Pointer as_string; + /// Enqueue a request to close the write end of the underlying socket. + /// All outstanding IO will complete before the write side of the + /// socket is closed. The server, however, may continue to write bytes + /// back to the client, so best practice is to continue reading from + /// the server until you receive EOF. + void closeWrite() { + return _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); + } - external UnnamedStruct5 as_send_port; + /// Enqueue a request to close the read side of the underlying socket. + /// All outstanding IO will complete before the read side is closed. + /// You may continue writing to the server. + void closeRead() { + return _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); + } - external UnnamedStruct6 as_capability; + /// Begin encrypted handshake. The handshake begins after all pending + /// IO has completed. TLS authentication callbacks are sent to the + /// session's -URLSession:task:didReceiveChallenge:completionHandler: + void startSecureConnection() { + return _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); + } - external UnnamedStruct7 as_array; + /// Cleanly close a secure connection after all pending secure IO has + /// completed. + /// + /// @warning This API is non-functional. + void stopSecureConnection() { + return _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); + } - external UnnamedStruct8 as_typed_data; + @override + NSURLSessionStreamTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); + } - external UnnamedStruct9 as_external_typed_data; + static NSURLSessionStreamTask new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionStreamTask1, _lib._sel_new1); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + } - external UnnamedStruct10 as_native_pointer; + static NSURLSessionStreamTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + } } -class UnnamedStruct5 extends ffi.Struct { - @Dart_Port() - external int id; - - @Dart_Port() - external int origin_id; +void _ObjCBlock40_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); } -class UnnamedStruct6 extends ffi.Struct { - @ffi.Int64() - external int id; +final _ObjCBlock40_closureRegistry = {}; +int _ObjCBlock40_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock40_registerClosure(Function fn) { + final id = ++_ObjCBlock40_closureRegistryIndex; + _ObjCBlock40_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class UnnamedStruct7 extends ffi.Struct { - @ffi.IntPtr() - external int length; - - external ffi.Pointer> values; +void _ObjCBlock40_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _ObjCBlock40_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); } -class UnnamedStruct8 extends ffi.Struct { - @ffi.Int32() - external int type; +class ObjCBlock40 extends _ObjCBlockBase { + ObjCBlock40._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - /// in elements, not bytes - @ffi.IntPtr() - external int length; + /// Creates a block from a C function pointer. + ObjCBlock40.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock40_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external ffi.Pointer values; + /// Creates a block from a Dart function. + ObjCBlock40.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock40_closureTrampoline) + .cast(), + _ObjCBlock40_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } } -class UnnamedStruct9 extends ffi.Struct { - @ffi.Int32() - external int type; - - /// in elements, not bytes - @ffi.IntPtr() - external int length; - - external ffi.Pointer data; +void _ObjCBlock41_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} - external ffi.Pointer peer; +final _ObjCBlock41_closureRegistry = {}; +int _ObjCBlock41_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock41_registerClosure(Function fn) { + final id = ++_ObjCBlock41_closureRegistryIndex; + _ObjCBlock41_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - external Dart_HandleFinalizer callback; +void _ObjCBlock41_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock41_closureRegistry[block.ref.target.address]!(arg0); } -class UnnamedStruct10 extends ffi.Struct { - @ffi.IntPtr() - external int ptr; +class ObjCBlock41 extends _ObjCBlockBase { + ObjCBlock41._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - @ffi.IntPtr() - external int size; + /// Creates a block from a C function pointer. + ObjCBlock41.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock41_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; - external Dart_HandleFinalizer callback; + /// Creates a block from a Dart function. + ObjCBlock41.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock41_closureTrampoline) + .cast(), + _ObjCBlock41_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } } -typedef Dart_CObject = _Dart_CObject; +class NSNetService extends _ObjCWrapper { + NSNetService._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -/// A native message handler. -/// -/// This handler is associated with a native port by calling -/// Dart_NewNativePort. -/// -/// The message received is decoded into the message structure. The -/// lifetime of the message data is controlled by the caller. All the -/// data references from the message are allocated by the caller and -/// will be reclaimed when returning to it. -typedef Dart_NativeMessageHandler = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_Port, ffi.Pointer)>>; -typedef Dart_PostCObject_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(Dart_Port_DL, ffi.Pointer)>>; + /// Returns a [NSNetService] that points to the same underlying object as [other]. + static NSNetService castFrom(T other) { + return NSNetService._(other._id, other._lib, retain: true, release: true); + } -/// ============================================================================ -/// IMPORTANT! Never update these signatures without properly updating -/// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. -/// -/// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types -/// to trigger compile-time errors if the sybols in those files are updated -/// without updating these. -/// -/// Function return and argument types, and typedefs are carbon copied. Structs -/// are typechecked nominally in C/C++, so they are not copied, instead a -/// comment is added to their definition. -typedef Dart_Port_DL = ffi.Int64; -typedef Dart_PostInteger_Type = ffi - .Pointer>; -typedef Dart_NewNativePort_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_Port_DL Function( - ffi.Pointer, Dart_NativeMessageHandler_DL, ffi.Bool)>>; -typedef Dart_NativeMessageHandler_DL = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_Port_DL, ffi.Pointer)>>; -typedef Dart_CloseNativePort_Type - = ffi.Pointer>; -typedef Dart_IsError_Type - = ffi.Pointer>; -typedef Dart_IsApiError_Type - = ffi.Pointer>; -typedef Dart_IsUnhandledExceptionError_Type - = ffi.Pointer>; -typedef Dart_IsCompilationError_Type - = ffi.Pointer>; -typedef Dart_IsFatalError_Type - = ffi.Pointer>; -typedef Dart_GetError_Type = ffi - .Pointer Function(ffi.Handle)>>; -typedef Dart_ErrorHasException_Type - = ffi.Pointer>; -typedef Dart_ErrorGetException_Type - = ffi.Pointer>; -typedef Dart_ErrorGetStackTrace_Type - = ffi.Pointer>; -typedef Dart_NewApiError_Type = ffi - .Pointer)>>; -typedef Dart_NewCompilationError_Type = ffi - .Pointer)>>; -typedef Dart_NewUnhandledExceptionError_Type - = ffi.Pointer>; -typedef Dart_PropagateError_Type - = ffi.Pointer>; -typedef Dart_HandleFromPersistent_Type - = ffi.Pointer>; -typedef Dart_HandleFromWeakPersistent_Type = ffi.Pointer< - ffi.NativeFunction>; -typedef Dart_NewPersistentHandle_Type - = ffi.Pointer>; -typedef Dart_SetPersistentHandle_Type = ffi - .Pointer>; -typedef Dart_DeletePersistentHandle_Type - = ffi.Pointer>; -typedef Dart_NewWeakPersistentHandle_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_WeakPersistentHandle Function(ffi.Handle, ffi.Pointer, - ffi.IntPtr, Dart_HandleFinalizer)>>; -typedef Dart_DeleteWeakPersistentHandle_Type = ffi - .Pointer>; -typedef Dart_UpdateExternalSize_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_WeakPersistentHandle, ffi.IntPtr)>>; -typedef Dart_NewFinalizableHandle_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, - ffi.IntPtr, Dart_HandleFinalizer)>>; -typedef Dart_DeleteFinalizableHandle_Type = ffi.Pointer< - ffi.NativeFunction>; -typedef Dart_UpdateFinalizableExternalSize_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, ffi.IntPtr)>>; -typedef Dart_Post_Type = ffi - .Pointer>; -typedef Dart_NewSendPort_Type - = ffi.Pointer>; -typedef Dart_SendPortGetId_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer)>>; -typedef Dart_EnterScope_Type - = ffi.Pointer>; -typedef Dart_ExitScope_Type - = ffi.Pointer>; + /// Returns a [NSNetService] that wraps the given raw object pointer. + static NSNetService castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNetService._(other, lib, retain: retain, release: release); + } -/// The type of message being sent to a Dart port. See CUPHTTPClientDelegate. -abstract class MessageType { - static const int ResponseMessage = 0; - static const int DataMessage = 1; - static const int CompletedMessage = 2; - static const int RedirectMessage = 3; - static const int FinishedDownloading = 4; + /// Returns whether [obj] is an instance of [NSNetService]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNetService1); + } } -/// The configuration associated with a NSURLSessionTask. -/// See CUPHTTPClientDelegate. -class CUPHTTPTaskConfiguration extends NSObject { - CUPHTTPTaskConfiguration._( +/// A WebSocket task can be created with a ws or wss url. A client can also provide +/// a list of protocols it wishes to advertise during the WebSocket handshake phase. +/// Once the handshake is successfully completed the client will be notified through an optional delegate. +/// All reads and writes enqueued before the completion of the handshake will be queued up and +/// executed once the handshake succeeds. Before the handshake completes, the client can be called to handle +/// redirection or authentication using the same delegates as NSURLSessionTask. WebSocket task will also provide +/// support for cookies and will store cookies to the cookie storage on the session and will attach cookies to +/// outgoing HTTP handshake requests. +class NSURLSessionWebSocketTask extends NSURLSessionTask { + NSURLSessionWebSocketTask._( ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [CUPHTTPTaskConfiguration] that points to the same underlying object as [other]. - static CUPHTTPTaskConfiguration castFrom(T other) { - return CUPHTTPTaskConfiguration._(other._id, other._lib, + /// Returns a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. + static NSURLSessionWebSocketTask castFrom(T other) { + return NSURLSessionWebSocketTask._(other._id, other._lib, retain: true, release: true); } - /// Returns a [CUPHTTPTaskConfiguration] that wraps the given raw object pointer. - static CUPHTTPTaskConfiguration castFromPointer( + /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. + static NSURLSessionWebSocketTask castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return CUPHTTPTaskConfiguration._(other, lib, + return NSURLSessionWebSocketTask._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [CUPHTTPTaskConfiguration]. + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPTaskConfiguration1); + obj._lib._class_NSURLSessionWebSocketTask1); } - NSObject initWithPort_(int sendPort) { - final _ret = - _lib._objc_msgSend_470(_id, _lib._sel_initWithPort_1, sendPort); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Sends a WebSocket message. If an error occurs, any outstanding work will also fail. + /// Note that invocation of the completion handler does not + /// guarantee that the remote side has received all the bytes, only + /// that they have been written to the kernel. + void sendMessage_completionHandler_( + NSURLSessionWebSocketMessage? message, ObjCBlock41 completionHandler) { + return _lib._objc_msgSend_420( + _id, + _lib._sel_sendMessage_completionHandler_1, + message?._id ?? ffi.nullptr, + completionHandler._id); } - int get sendPort { - return _lib._objc_msgSend_325(_id, _lib._sel_sendPort1); + /// Reads a WebSocket message once all the frames of the message are available. + /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out + /// and all outstanding work will also fail resulting in the end of the task. + void receiveMessageWithCompletionHandler_(ObjCBlock42 completionHandler) { + return _lib._objc_msgSend_421(_id, + _lib._sel_receiveMessageWithCompletionHandler_1, completionHandler._id); } - static CUPHTTPTaskConfiguration new1(NativeCupertinoHttp _lib) { + /// Sends a ping frame from the client side. The pongReceiveHandler is invoked when the client + /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving + /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. + /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. + void sendPingWithPongReceiveHandler_(ObjCBlock41 pongReceiveHandler) { + return _lib._objc_msgSend_422(_id, + _lib._sel_sendPingWithPongReceiveHandler_1, pongReceiveHandler._id); + } + + /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. + /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. + void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { + return _lib._objc_msgSend_423(_id, _lib._sel_cancelWithCloseCode_reason_1, + closeCode, reason?._id ?? ffi.nullptr); + } + + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached + int get maximumMessageSize { + return _lib._objc_msgSend_81(_id, _lib._sel_maximumMessageSize1); + } + + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached + set maximumMessageSize(int value) { + _lib._objc_msgSend_346(_id, _lib._sel_setMaximumMessageSize_1, value); + } + + /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid + int get closeCode { + return _lib._objc_msgSend_424(_id, _lib._sel_closeCode1); + } + + /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running + NSData? get closeReason { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_closeReason1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLSessionWebSocketTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionWebSocketTask new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_new1); - return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + _lib._class_NSURLSessionWebSocketTask1, _lib._sel_new1); + return NSURLSessionWebSocketTask._(_ret, _lib, + retain: false, release: true); } - static CUPHTTPTaskConfiguration alloc(NativeCupertinoHttp _lib) { + static NSURLSessionWebSocketTask alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_alloc1); - return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + _lib._class_NSURLSessionWebSocketTask1, _lib._sel_alloc1); + return NSURLSessionWebSocketTask._(_ret, _lib, + retain: false, release: true); } } -/// A delegate for NSURLSession that forwards events for registered -/// NSURLSessionTasks and forwards them to a port for consumption in Dart. -/// -/// The messages sent to the port are contained in a List with one of 3 -/// possible formats: -/// -/// 1. When the delegate receives a HTTP redirect response: -/// [MessageType::RedirectMessage, ] -/// -/// 2. When the delegate receives a HTTP response: -/// [MessageType::ResponseMessage, ] -/// -/// 3. When the delegate receives some HTTP data: -/// [MessageType::DataMessage, ] -/// -/// 4. When the delegate is informed that the response is complete: -/// [MessageType::CompletedMessage, ] -class CUPHTTPClientDelegate extends NSObject { - CUPHTTPClientDelegate._(ffi.Pointer id, NativeCupertinoHttp lib, +/// The client can create a WebSocket message object that will be passed to the send calls +/// and will be delivered from the receive calls. The message can be initialized with data or string. +/// If initialized with data, the string property will be nil and vice versa. +class NSURLSessionWebSocketMessage extends NSObject { + NSURLSessionWebSocketMessage._( + ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [CUPHTTPClientDelegate] that points to the same underlying object as [other]. - static CUPHTTPClientDelegate castFrom(T other) { - return CUPHTTPClientDelegate._(other._id, other._lib, + /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. + static NSURLSessionWebSocketMessage castFrom( + T other) { + return NSURLSessionWebSocketMessage._(other._id, other._lib, retain: true, release: true); } - /// Returns a [CUPHTTPClientDelegate] that wraps the given raw object pointer. - static CUPHTTPClientDelegate castFromPointer( + /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. + static NSURLSessionWebSocketMessage castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return CUPHTTPClientDelegate._(other, lib, + return NSURLSessionWebSocketMessage._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [CUPHTTPClientDelegate]. + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPClientDelegate1); + obj._lib._class_NSURLSessionWebSocketMessage1); } - /// Instruct the delegate to forward events for the given task to the port - /// specified in the configuration. - void registerTask_withConfiguration_( - NSURLSessionTask? task, CUPHTTPTaskConfiguration? config) { - return _lib._objc_msgSend_471( - _id, - _lib._sel_registerTask_withConfiguration_1, - task?._id ?? ffi.nullptr, - config?._id ?? ffi.nullptr); + /// Create a message with data type + NSURLSessionWebSocketMessage initWithData_(NSData? data) { + final _ret = _lib._objc_msgSend_217( + _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); } - static CUPHTTPClientDelegate new1(NativeCupertinoHttp _lib) { + /// Create a message with string type + NSURLSessionWebSocketMessage initWithString_(NSString? string) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, string?._id ?? ffi.nullptr); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } + + int get type { + return _lib._objc_msgSend_419(_id, _lib._sel_type1); + } + + NSData? get data { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + NSString? get string { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + @override + NSURLSessionWebSocketMessage init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: true, release: true); + } + + static NSURLSessionWebSocketMessage new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPClientDelegate1, _lib._sel_new1); - return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_new1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: false, release: true); + } + + static NSURLSessionWebSocketMessage alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_alloc1); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: false, release: true); + } +} + +abstract class NSURLSessionWebSocketMessageType { + static const int NSURLSessionWebSocketMessageTypeData = 0; + static const int NSURLSessionWebSocketMessageTypeString = 1; +} + +void _ObjCBlock42_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} + +final _ObjCBlock42_closureRegistry = {}; +int _ObjCBlock42_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock42_registerClosure(Function fn) { + final id = ++_ObjCBlock42_closureRegistryIndex; + _ObjCBlock42_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock42_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock42_closureRegistry[block.ref.target.address]!(arg0, arg1); +} + +class ObjCBlock42 extends _ObjCBlockBase { + ObjCBlock42._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock42.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock42_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock42.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock42_closureTrampoline) + .cast(), + _ObjCBlock42_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } +} + +/// The WebSocket close codes follow the close codes given in the RFC +abstract class NSURLSessionWebSocketCloseCode { + static const int NSURLSessionWebSocketCloseCodeInvalid = 0; + static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; + static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; + static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; + static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; + static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; + static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; + static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; + static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; + static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; + static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = + 1010; + static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; + static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; +} + +void _ObjCBlock43_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock43_closureRegistry = {}; +int _ObjCBlock43_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock43_registerClosure(Function fn) { + final id = ++_ObjCBlock43_closureRegistryIndex; + _ObjCBlock43_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock43_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock43_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock43 extends _ObjCBlockBase { + ObjCBlock43._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock43.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock43_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock43.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock43_closureTrampoline) + .cast(), + _ObjCBlock43_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } +} + +void _ObjCBlock44_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} + +final _ObjCBlock44_closureRegistry = {}; +int _ObjCBlock44_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock44_registerClosure(Function fn) { + final id = ++_ObjCBlock44_closureRegistryIndex; + _ObjCBlock44_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock44_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock44_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} + +class ObjCBlock44 extends _ObjCBlockBase { + ObjCBlock44._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock44.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock44_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock44.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock44_closureTrampoline) + .cast(), + _ObjCBlock44_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); } +} - static CUPHTTPClientDelegate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPClientDelegate1, _lib._sel_alloc1); - return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); - } +/// Disposition options for various delegate messages +abstract class NSURLSessionDelayedRequestDisposition { + /// Use the original request provided when the task was created; the request parameter is ignored. + static const int NSURLSessionDelayedRequestContinueLoading = 0; + + /// Use the specified request, which may not be nil. + static const int NSURLSessionDelayedRequestUseNewRequest = 1; + + /// Cancel the task; the request parameter is ignored. + static const int NSURLSessionDelayedRequestCancel = 2; } -/// An object used to communicate redirect information to Dart code. -/// -/// The flow is: -/// 1. CUPHTTPClientDelegate receives a message from the URL Loading System. -/// 2. CUPHTTPClientDelegate creates a new CUPHTTPForwardedDelegate subclass. -/// 3. CUPHTTPClientDelegate sends the CUPHTTPForwardedDelegate to the -/// configured Dart_Port. -/// 4. CUPHTTPClientDelegate waits on CUPHTTPForwardedDelegate.lock -/// 5. When the Dart code is done process the message received on the port, -/// it calls [CUPHTTPForwardedDelegate finish*], which releases the lock. -/// 6. CUPHTTPClientDelegate continues running. -class CUPHTTPForwardedDelegate extends NSObject { - CUPHTTPForwardedDelegate._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +abstract class NSURLSessionAuthChallengeDisposition { + /// Use the specified credential, which may be nil + static const int NSURLSessionAuthChallengeUseCredential = 0; - /// Returns a [CUPHTTPForwardedDelegate] that points to the same underlying object as [other]. - static CUPHTTPForwardedDelegate castFrom(T other) { - return CUPHTTPForwardedDelegate._(other._id, other._lib, - retain: true, release: true); - } + /// Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored. + static const int NSURLSessionAuthChallengePerformDefaultHandling = 1; - /// Returns a [CUPHTTPForwardedDelegate] that wraps the given raw object pointer. - static CUPHTTPForwardedDelegate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedDelegate._(other, lib, - retain: retain, release: release); - } + /// The entire request will be canceled; the credential parameter is ignored. + static const int NSURLSessionAuthChallengeCancelAuthenticationChallenge = 2; - /// Returns whether [obj] is an instance of [CUPHTTPForwardedDelegate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedDelegate1); - } + /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. + static const int NSURLSessionAuthChallengeRejectProtectionSpace = 3; +} - NSObject initWithSession_task_( - NSURLSession? session, NSURLSessionTask? task) { - final _ret = _lib._objc_msgSend_472(_id, _lib._sel_initWithSession_task_1, - session?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } +abstract class NSURLSessionResponseDisposition { + /// Cancel the load, this is the same as -[task cancel] + static const int NSURLSessionResponseCancel = 0; - /// Indicates that the task should continue executing using the given request. - void finish() { - return _lib._objc_msgSend_1(_id, _lib._sel_finish1); - } + /// Allow the load to continue + static const int NSURLSessionResponseAllow = 1; - NSURLSession? get session { - final _ret = _lib._objc_msgSend_380(_id, _lib._sel_session1); - return _ret.address == 0 - ? null - : NSURLSession._(_ret, _lib, retain: true, release: true); - } + /// Turn this request into a download + static const int NSURLSessionResponseBecomeDownload = 2; - NSURLSessionTask? get task { - final _ret = _lib._objc_msgSend_473(_id, _lib._sel_task1); - return _ret.address == 0 - ? null - : NSURLSessionTask._(_ret, _lib, retain: true, release: true); - } + /// Turn this task into a stream task + static const int NSURLSessionResponseBecomeStream = 3; +} - /// This property is meant to be used only by CUPHTTPClientDelegate. - NSLock? get lock { - final _ret = _lib._objc_msgSend_474(_id, _lib._sel_lock1); - return _ret.address == 0 - ? null - : NSLock._(_ret, _lib, retain: true, release: true); - } +/// The resource fetch type. +abstract class NSURLSessionTaskMetricsResourceFetchType { + static const int NSURLSessionTaskMetricsResourceFetchTypeUnknown = 0; - static CUPHTTPForwardedDelegate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_new1); - return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); - } + /// The resource was loaded over the network. + static const int NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad = 1; - static CUPHTTPForwardedDelegate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_alloc1); - return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); - } + /// The resource was pushed by the server to the client. + static const int NSURLSessionTaskMetricsResourceFetchTypeServerPush = 2; + + /// The resource was retrieved from the local storage. + static const int NSURLSessionTaskMetricsResourceFetchTypeLocalCache = 3; } -class NSLock extends _ObjCWrapper { - NSLock._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +/// DNS protocol used for domain resolution. +abstract class NSURLSessionTaskMetricsDomainResolutionProtocol { + static const int NSURLSessionTaskMetricsDomainResolutionProtocolUnknown = 0; - /// Returns a [NSLock] that points to the same underlying object as [other]. - static NSLock castFrom(T other) { - return NSLock._(other._id, other._lib, retain: true, release: true); - } + /// Resolution used DNS over UDP. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolUDP = 1; - /// Returns a [NSLock] that wraps the given raw object pointer. - static NSLock castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSLock._(other, lib, retain: retain, release: release); - } + /// Resolution used DNS over TCP. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolTCP = 2; - /// Returns whether [obj] is an instance of [NSLock]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLock1); - } + /// Resolution used DNS over TLS. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolTLS = 3; + + /// Resolution used DNS over HTTPS. + static const int NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS = 4; } -class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedRedirect._( +/// This class defines the performance metrics collected for a request/response transaction during the task execution. +class NSURLSessionTaskTransactionMetrics extends NSObject { + NSURLSessionTaskTransactionMetrics._( ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [CUPHTTPForwardedRedirect] that points to the same underlying object as [other]. - static CUPHTTPForwardedRedirect castFrom(T other) { - return CUPHTTPForwardedRedirect._(other._id, other._lib, + /// Returns a [NSURLSessionTaskTransactionMetrics] that points to the same underlying object as [other]. + static NSURLSessionTaskTransactionMetrics castFrom( + T other) { + return NSURLSessionTaskTransactionMetrics._(other._id, other._lib, retain: true, release: true); } - /// Returns a [CUPHTTPForwardedRedirect] that wraps the given raw object pointer. - static CUPHTTPForwardedRedirect castFromPointer( + /// Returns a [NSURLSessionTaskTransactionMetrics] that wraps the given raw object pointer. + static NSURLSessionTaskTransactionMetrics castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return CUPHTTPForwardedRedirect._(other, lib, + return NSURLSessionTaskTransactionMetrics._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedRedirect]. + /// Returns whether [obj] is an instance of [NSURLSessionTaskTransactionMetrics]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedRedirect1); + obj._lib._class_NSURLSessionTaskTransactionMetrics1); } - NSObject initWithSession_task_response_request_( - NSURLSession? session, - NSURLSessionTask? task, - NSHTTPURLResponse? response, - NSURLRequest? request) { - final _ret = _lib._objc_msgSend_475( - _id, - _lib._sel_initWithSession_task_response_request_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - response?._id ?? ffi.nullptr, - request?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Represents the transaction request. + NSURLRequest? get request { + final _ret = _lib._objc_msgSend_377(_id, _lib._sel_request1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); } - /// Indicates that the task should continue executing using the given request. - /// If the request is NIL then the redirect is not followed and the task is - /// complete. - void finishWithRequest_(NSURLRequest? request) { - return _lib._objc_msgSend_476( - _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); + /// Represents the transaction response. Can be nil if error occurred and no response was generated. + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_379(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); } - NSHTTPURLResponse? get response { - final _ret = _lib._objc_msgSend_477(_id, _lib._sel_response1); + /// fetchStartDate returns the time when the user agent started fetching the resource, whether or not the resource was retrieved from the server or local resources. + /// + /// The following metrics will be set to nil, if a persistent connection was used or the resource was retrieved from local resources: + /// + /// domainLookupStartDate + /// domainLookupEndDate + /// connectStartDate + /// connectEndDate + /// secureConnectionStartDate + /// secureConnectionEndDate + NSDate? get fetchStartDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_fetchStartDate1); return _ret.address == 0 ? null - : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + : NSDate._(_ret, _lib, retain: true, release: true); } - NSURLRequest? get request { - final _ret = _lib._objc_msgSend_371(_id, _lib._sel_request1); + /// domainLookupStartDate returns the time immediately before the user agent started the name lookup for the resource. + NSDate? get domainLookupStartDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_domainLookupStartDate1); return _ret.address == 0 ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); + : NSDate._(_ret, _lib, retain: true, release: true); } - /// This property is meant to be used only by CUPHTTPClientDelegate. - NSURLRequest? get redirectRequest { - final _ret = _lib._objc_msgSend_371(_id, _lib._sel_redirectRequest1); + /// domainLookupEndDate returns the time after the name lookup was completed. + NSDate? get domainLookupEndDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_domainLookupEndDate1); return _ret.address == 0 ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); + : NSDate._(_ret, _lib, retain: true, release: true); } - static CUPHTTPForwardedRedirect new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_new1); - return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + /// connectStartDate is the time immediately before the user agent started establishing the connection to the server. + /// + /// For example, this would correspond to the time immediately before the user agent started trying to establish the TCP connection. + NSDate? get connectStartDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_connectStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - static CUPHTTPForwardedRedirect alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_alloc1); - return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + /// If an encrypted connection was used, secureConnectionStartDate is the time immediately before the user agent started the security handshake to secure the current connection. + /// + /// For example, this would correspond to the time immediately before the user agent started the TLS handshake. + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSDate? get secureConnectionStartDate { + final _ret = + _lib._objc_msgSend_357(_id, _lib._sel_secureConnectionStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } -} -class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedResponse._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// If an encrypted connection was used, secureConnectionEndDate is the time immediately after the security handshake completed. + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSDate? get secureConnectionEndDate { + final _ret = + _lib._objc_msgSend_357(_id, _lib._sel_secureConnectionEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } - /// Returns a [CUPHTTPForwardedResponse] that points to the same underlying object as [other]. - static CUPHTTPForwardedResponse castFrom(T other) { - return CUPHTTPForwardedResponse._(other._id, other._lib, - retain: true, release: true); + /// connectEndDate is the time immediately after the user agent finished establishing the connection to the server, including completion of security-related and other handshakes. + NSDate? get connectEndDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_connectEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - /// Returns a [CUPHTTPForwardedResponse] that wraps the given raw object pointer. - static CUPHTTPForwardedResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedResponse._(other, lib, - retain: retain, release: release); + /// requestStartDate is the time immediately before the user agent started requesting the source, regardless of whether the resource was retrieved from the server or local resources. + /// + /// For example, this would correspond to the time immediately before the user agent sent an HTTP GET request. + NSDate? get requestStartDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_requestStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedResponse1); + /// requestEndDate is the time immediately after the user agent finished requesting the source, regardless of whether the resource was retrieved from the server or local resources. + /// + /// For example, this would correspond to the time immediately after the user agent finished sending the last byte of the request. + NSDate? get requestEndDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_requestEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - NSObject initWithSession_task_response_( - NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { - final _ret = _lib._objc_msgSend_478( - _id, - _lib._sel_initWithSession_task_response_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - response?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// responseStartDate is the time immediately after the user agent received the first byte of the response from the server or from local resources. + /// + /// For example, this would correspond to the time immediately after the user agent received the first byte of an HTTP response. + NSDate? get responseStartDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_responseStartDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - void finishWithDisposition_(int disposition) { - return _lib._objc_msgSend_479( - _id, _lib._sel_finishWithDisposition_1, disposition); + /// responseEndDate is the time immediately after the user agent received the last byte of the resource. + NSDate? get responseEndDate { + final _ret = _lib._objc_msgSend_357(_id, _lib._sel_responseEndDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_373(_id, _lib._sel_response1); + /// The network protocol used to fetch the resource, as identified by the ALPN Protocol ID Identification Sequence [RFC7301]. + /// E.g., h3, h2, http/1.1. + /// + /// When a proxy is configured AND a tunnel connection is established, then this attribute returns the value for the tunneled protocol. + /// + /// For example: + /// If no proxy were used, and HTTP/2 was negotiated, then h2 would be returned. + /// If HTTP/1.1 were used to the proxy, and the tunneled connection was HTTP/2, then h2 would be returned. + /// If HTTP/1.1 were used to the proxy, and there were no tunnel, then http/1.1 would be returned. + NSString? get networkProtocolName { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_networkProtocolName1); return _ret.address == 0 ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - /// This property is meant to be used only by CUPHTTPClientDelegate. - int get disposition { - return _lib._objc_msgSend_480(_id, _lib._sel_disposition1); + /// This property is set to YES if a proxy connection was used to fetch the resource. + bool get proxyConnection { + return _lib._objc_msgSend_11(_id, _lib._sel_isProxyConnection1); } - static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedResponse1, _lib._sel_new1); - return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + /// This property is set to YES if a persistent connection was used to fetch the resource. + bool get reusedConnection { + return _lib._objc_msgSend_11(_id, _lib._sel_isReusedConnection1); } - static CUPHTTPForwardedResponse alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedResponse1, _lib._sel_alloc1); - return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + /// Indicates whether the resource was loaded, pushed or retrieved from the local cache. + int get resourceFetchType { + return _lib._objc_msgSend_435(_id, _lib._sel_resourceFetchType1); } -} -class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. + int get countOfRequestHeaderBytesSent { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfRequestHeaderBytesSent1); + } - /// Returns a [CUPHTTPForwardedData] that points to the same underlying object as [other]. - static CUPHTTPForwardedData castFrom(T other) { - return CUPHTTPForwardedData._(other._id, other._lib, - retain: true, release: true); + /// countOfRequestBodyBytesSent is the number of bytes transferred for request body. + /// It includes protocol-specific framing, transfer encoding, and content encoding. + int get countOfRequestBodyBytesSent { + return _lib._objc_msgSend_329(_id, _lib._sel_countOfRequestBodyBytesSent1); } - /// Returns a [CUPHTTPForwardedData] that wraps the given raw object pointer. - static CUPHTTPForwardedData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedData._(other, lib, retain: retain, release: release); + /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. + int get countOfRequestBodyBytesBeforeEncoding { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedData1); + /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. + int get countOfResponseHeaderBytesReceived { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfResponseHeaderBytesReceived1); } - NSObject initWithSession_task_data_( - NSURLSession? session, NSURLSessionTask? task, NSData? data) { - final _ret = _lib._objc_msgSend_481( - _id, - _lib._sel_initWithSession_task_data_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - data?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// countOfResponseBodyBytesReceived is the number of bytes transferred for response header. + /// It includes protocol-specific framing, transfer encoding, and content encoding. + int get countOfResponseBodyBytesReceived { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfResponseBodyBytesReceived1); } - NSData? get data { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); + /// countOfResponseBodyBytesAfterDecoding is the size of data delivered to your delegate or completion handler. + int get countOfResponseBodyBytesAfterDecoding { + return _lib._objc_msgSend_329( + _id, _lib._sel_countOfResponseBodyBytesAfterDecoding1); + } + + /// localAddress is the IP address string of the local interface for the connection. + /// + /// For multipath protocols, this is the local address of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSString? get localAddress { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localAddress1); return _ret.address == 0 ? null - : NSData._(_ret, _lib, retain: true, release: true); + : NSString._(_ret, _lib, retain: true, release: true); } - static CUPHTTPForwardedData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_CUPHTTPForwardedData1, _lib._sel_new1); - return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + /// localPort is the port number of the local interface for the connection. + /// + /// For multipath protocols, this is the local port of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSNumber? get localPort { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_localPort1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); } - static CUPHTTPForwardedData alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedData1, _lib._sel_alloc1); - return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + /// remoteAddress is the IP address string of the remote interface for the connection. + /// + /// For multipath protocols, this is the remote address of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSString? get remoteAddress { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_remoteAddress1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } -} -class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedComplete._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// remotePort is the port number of the remote interface for the connection. + /// + /// For multipath protocols, this is the remote port of the initial flow. + /// + /// If a connection was not used, this attribute is set to nil. + NSNumber? get remotePort { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_remotePort1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } - /// Returns a [CUPHTTPForwardedComplete] that points to the same underlying object as [other]. - static CUPHTTPForwardedComplete castFrom(T other) { - return CUPHTTPForwardedComplete._(other._id, other._lib, - retain: true, release: true); + /// negotiatedTLSProtocolVersion is the TLS protocol version negotiated for the connection. + /// It is a 2-byte sequence in host byte order. + /// + /// Please refer to tls_protocol_version_t enum in Security/SecProtocolTypes.h + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSNumber? get negotiatedTLSProtocolVersion { + final _ret = + _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSProtocolVersion1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); } - /// Returns a [CUPHTTPForwardedComplete] that wraps the given raw object pointer. - static CUPHTTPForwardedComplete castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedComplete._(other, lib, - retain: retain, release: release); + /// negotiatedTLSCipherSuite is the TLS cipher suite negotiated for the connection. + /// It is a 2-byte sequence in host byte order. + /// + /// Please refer to tls_ciphersuite_t enum in Security/SecProtocolTypes.h + /// + /// If an encrypted connection was not used, this attribute is set to nil. + NSNumber? get negotiatedTLSCipherSuite { + final _ret = + _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSCipherSuite1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedComplete]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedComplete1); + /// Whether the connection is established over a cellular interface. + bool get cellular { + return _lib._objc_msgSend_11(_id, _lib._sel_isCellular1); } - NSObject initWithSession_task_error_( - NSURLSession? session, NSURLSessionTask? task, NSError? error) { - final _ret = _lib._objc_msgSend_482( - _id, - _lib._sel_initWithSession_task_error_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - error?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Whether the connection is established over an expensive interface. + bool get expensive { + return _lib._objc_msgSend_11(_id, _lib._sel_isExpensive1); + } + + /// Whether the connection is established over a constrained interface. + bool get constrained { + return _lib._objc_msgSend_11(_id, _lib._sel_isConstrained1); + } + + /// Whether a multipath protocol is successfully negotiated for the connection. + bool get multipath { + return _lib._objc_msgSend_11(_id, _lib._sel_isMultipath1); } - NSError? get error { - final _ret = _lib._objc_msgSend_376(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); + /// DNS protocol used for domain resolution. + int get domainResolutionProtocol { + return _lib._objc_msgSend_436(_id, _lib._sel_domainResolutionProtocol1); } - static CUPHTTPForwardedComplete new1(NativeCupertinoHttp _lib) { + @override + NSURLSessionTaskTransactionMetrics init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: true, release: true); + } + + static NSURLSessionTaskTransactionMetrics new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedComplete1, _lib._sel_new1); - return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_new1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: false, release: true); } - static CUPHTTPForwardedComplete alloc(NativeCupertinoHttp _lib) { + static NSURLSessionTaskTransactionMetrics alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedComplete1, _lib._sel_alloc1); - return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_alloc1); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: false, release: true); } } -class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedFinishedDownloading._( - ffi.Pointer id, NativeCupertinoHttp lib, +class NSURLSessionTaskMetrics extends NSObject { + NSURLSessionTaskMetrics._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [CUPHTTPForwardedFinishedDownloading] that points to the same underlying object as [other]. - static CUPHTTPForwardedFinishedDownloading castFrom( - T other) { - return CUPHTTPForwardedFinishedDownloading._(other._id, other._lib, + /// Returns a [NSURLSessionTaskMetrics] that points to the same underlying object as [other]. + static NSURLSessionTaskMetrics castFrom(T other) { + return NSURLSessionTaskMetrics._(other._id, other._lib, retain: true, release: true); } - /// Returns a [CUPHTTPForwardedFinishedDownloading] that wraps the given raw object pointer. - static CUPHTTPForwardedFinishedDownloading castFromPointer( + /// Returns a [NSURLSessionTaskMetrics] that wraps the given raw object pointer. + static NSURLSessionTaskMetrics castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return CUPHTTPForwardedFinishedDownloading._(other, lib, + return NSURLSessionTaskMetrics._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedFinishedDownloading]. + /// Returns whether [obj] is an instance of [NSURLSessionTaskMetrics]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedFinishedDownloading1); + obj._lib._class_NSURLSessionTaskMetrics1); } - NSObject initWithSession_downloadTask_url_(NSURLSession? session, - NSURLSessionDownloadTask? downloadTask, NSURL? location) { - final _ret = _lib._objc_msgSend_483( - _id, - _lib._sel_initWithSession_downloadTask_url_1, - session?._id ?? ffi.nullptr, - downloadTask?._id ?? ffi.nullptr, - location?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// transactionMetrics array contains the metrics collected for every request/response transaction created during the task execution. + NSArray? get transactionMetrics { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_transactionMetrics1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - NSURL? get location { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_location1); + /// Interval from the task creation time to the task completion time. + /// Task creation time is the time when the task was instantiated. + /// Task completion time is the time when the task is about to change its internal state to completed. + NSDateInterval? get taskInterval { + final _ret = _lib._objc_msgSend_437(_id, _lib._sel_taskInterval1); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); + : NSDateInterval._(_ret, _lib, retain: true, release: true); } - static CUPHTTPForwardedFinishedDownloading new1(NativeCupertinoHttp _lib) { + /// redirectCount is the number of redirects that were recorded. + int get redirectCount { + return _lib._objc_msgSend_12(_id, _lib._sel_redirectCount1); + } + + @override + NSURLSessionTaskMetrics init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionTaskMetrics new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_new1); - return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, - retain: false, release: true); + _lib._class_NSURLSessionTaskMetrics1, _lib._sel_new1); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); } - static CUPHTTPForwardedFinishedDownloading alloc(NativeCupertinoHttp _lib) { + static NSURLSessionTaskMetrics alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_alloc1); - return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, - retain: false, release: true); + _lib._class_NSURLSessionTaskMetrics1, _lib._sel_alloc1); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); } } -const int noErr = 0; - -const int kNilOptions = 0; - -const int kVariableLengthArray = 1; - -const int kUnknownType = 1061109567; - -const int normal = 0; - -const int bold = 1; - -const int italic = 2; - -const int underline = 4; - -const int outline = 8; - -const int shadow = 16; - -const int condense = 32; - -const int extend = 64; - -const int developStage = 32; - -const int alphaStage = 64; - -const int betaStage = 96; - -const int finalStage = 128; - -const int NSScannedOption = 1; - -const int NSCollectorDisabledOption = 2; - -const int errSecSuccess = 0; - -const int errSecUnimplemented = -4; - -const int errSecDiskFull = -34; - -const int errSecDskFull = -34; - -const int errSecIO = -36; - -const int errSecOpWr = -49; - -const int errSecParam = -50; - -const int errSecWrPerm = -61; - -const int errSecAllocate = -108; - -const int errSecUserCanceled = -128; - -const int errSecBadReq = -909; - -const int errSecInternalComponent = -2070; - -const int errSecCoreFoundationUnknown = -4960; - -const int errSecMissingEntitlement = -34018; - -const int errSecRestrictedAPI = -34020; - -const int errSecNotAvailable = -25291; - -const int errSecReadOnly = -25292; - -const int errSecAuthFailed = -25293; - -const int errSecNoSuchKeychain = -25294; - -const int errSecInvalidKeychain = -25295; - -const int errSecDuplicateKeychain = -25296; - -const int errSecDuplicateCallback = -25297; - -const int errSecInvalidCallback = -25298; - -const int errSecDuplicateItem = -25299; - -const int errSecItemNotFound = -25300; - -const int errSecBufferTooSmall = -25301; - -const int errSecDataTooLarge = -25302; - -const int errSecNoSuchAttr = -25303; - -const int errSecInvalidItemRef = -25304; - -const int errSecInvalidSearchRef = -25305; - -const int errSecNoSuchClass = -25306; - -const int errSecNoDefaultKeychain = -25307; - -const int errSecInteractionNotAllowed = -25308; - -const int errSecReadOnlyAttr = -25309; - -const int errSecWrongSecVersion = -25310; - -const int errSecKeySizeNotAllowed = -25311; - -const int errSecNoStorageModule = -25312; - -const int errSecNoCertificateModule = -25313; - -const int errSecNoPolicyModule = -25314; - -const int errSecInteractionRequired = -25315; - -const int errSecDataNotAvailable = -25316; - -const int errSecDataNotModifiable = -25317; - -const int errSecCreateChainFailed = -25318; - -const int errSecInvalidPrefsDomain = -25319; - -const int errSecInDarkWake = -25320; - -const int errSecACLNotSimple = -25240; - -const int errSecPolicyNotFound = -25241; - -const int errSecInvalidTrustSetting = -25242; - -const int errSecNoAccessForItem = -25243; - -const int errSecInvalidOwnerEdit = -25244; - -const int errSecTrustNotAvailable = -25245; - -const int errSecUnsupportedFormat = -25256; - -const int errSecUnknownFormat = -25257; - -const int errSecKeyIsSensitive = -25258; - -const int errSecMultiplePrivKeys = -25259; - -const int errSecPassphraseRequired = -25260; - -const int errSecInvalidPasswordRef = -25261; - -const int errSecInvalidTrustSettings = -25262; - -const int errSecNoTrustSettings = -25263; - -const int errSecPkcs12VerifyFailure = -25264; - -const int errSecNotSigner = -26267; - -const int errSecDecode = -26275; - -const int errSecServiceNotAvailable = -67585; - -const int errSecInsufficientClientID = -67586; - -const int errSecDeviceReset = -67587; - -const int errSecDeviceFailed = -67588; - -const int errSecAppleAddAppACLSubject = -67589; +class NSDateInterval extends _ObjCWrapper { + NSDateInterval._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecApplePublicKeyIncomplete = -67590; + /// Returns a [NSDateInterval] that points to the same underlying object as [other]. + static NSDateInterval castFrom(T other) { + return NSDateInterval._(other._id, other._lib, retain: true, release: true); + } -const int errSecAppleSignatureMismatch = -67591; + /// Returns a [NSDateInterval] that wraps the given raw object pointer. + static NSDateInterval castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDateInterval._(other, lib, retain: retain, release: release); + } -const int errSecAppleInvalidKeyStartDate = -67592; + /// Returns whether [obj] is an instance of [NSDateInterval]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSDateInterval1); + } +} -const int errSecAppleInvalidKeyEndDate = -67593; +abstract class NSItemProviderRepresentationVisibility { + static const int NSItemProviderRepresentationVisibilityAll = 0; + static const int NSItemProviderRepresentationVisibilityTeam = 1; + static const int NSItemProviderRepresentationVisibilityGroup = 2; + static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; +} -const int errSecConversionError = -67594; +abstract class NSItemProviderFileOptions { + static const int NSItemProviderFileOptionOpenInPlace = 1; +} -const int errSecAppleSSLv2Rollback = -67595; +class NSItemProvider extends NSObject { + NSItemProvider._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecQuotaExceeded = -67596; + /// Returns a [NSItemProvider] that points to the same underlying object as [other]. + static NSItemProvider castFrom(T other) { + return NSItemProvider._(other._id, other._lib, retain: true, release: true); + } -const int errSecFileTooBig = -67597; + /// Returns a [NSItemProvider] that wraps the given raw object pointer. + static NSItemProvider castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSItemProvider._(other, lib, retain: retain, release: release); + } -const int errSecInvalidDatabaseBlob = -67598; + /// Returns whether [obj] is an instance of [NSItemProvider]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSItemProvider1); + } -const int errSecInvalidKeyBlob = -67599; + @override + NSItemProvider init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } -const int errSecIncompatibleDatabaseBlob = -67600; + void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( + NSString? typeIdentifier, int visibility, ObjCBlock45 loadHandler) { + return _lib._objc_msgSend_438( + _id, + _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + visibility, + loadHandler._id); + } -const int errSecIncompatibleKeyBlob = -67601; + void + registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( + NSString? typeIdentifier, + int fileOptions, + int visibility, + ObjCBlock47 loadHandler) { + return _lib._objc_msgSend_439( + _id, + _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + fileOptions, + visibility, + loadHandler._id); + } -const int errSecHostNameMismatch = -67602; + NSArray? get registeredTypeIdentifiers { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_registeredTypeIdentifiers1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSecUnknownCriticalExtensionFlag = -67603; + NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { + final _ret = _lib._objc_msgSend_440( + _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); + return NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSecNoBasicConstraints = -67604; + bool hasItemConformingToTypeIdentifier_(NSString? typeIdentifier) { + return _lib._objc_msgSend_22( + _id, + _lib._sel_hasItemConformingToTypeIdentifier_1, + typeIdentifier?._id ?? ffi.nullptr); + } -const int errSecNoBasicConstraintsCA = -67605; + bool hasRepresentationConformingToTypeIdentifier_fileOptions_( + NSString? typeIdentifier, int fileOptions) { + return _lib._objc_msgSend_441( + _id, + _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, + typeIdentifier?._id ?? ffi.nullptr, + fileOptions); + } -const int errSecInvalidAuthorityKeyID = -67606; + NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( + NSString? typeIdentifier, ObjCBlock46 completionHandler) { + final _ret = _lib._objc_msgSend_442( + _id, + _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidSubjectKeyID = -67607; + NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( + NSString? typeIdentifier, ObjCBlock49 completionHandler) { + final _ret = _lib._objc_msgSend_443( + _id, + _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidKeyUsageForPolicy = -67608; + NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( + NSString? typeIdentifier, ObjCBlock48 completionHandler) { + final _ret = _lib._objc_msgSend_444( + _id, + _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidExtendedKeyUsage = -67609; + NSString? get suggestedName { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidIDLinkage = -67610; + set suggestedName(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); + } -const int errSecPathLengthConstraintExceeded = -67611; + NSItemProvider initWithObject_(NSObject? object) { + final _ret = _lib._objc_msgSend_91( + _id, _lib._sel_initWithObject_1, object?._id ?? ffi.nullptr); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidRoot = -67612; + void registerObject_visibility_(NSObject? object, int visibility) { + return _lib._objc_msgSend_445(_id, _lib._sel_registerObject_visibility_1, + object?._id ?? ffi.nullptr, visibility); + } -const int errSecCRLExpired = -67613; + void registerObjectOfClass_visibility_loadHandler_( + NSObject? aClass, int visibility, ObjCBlock50 loadHandler) { + return _lib._objc_msgSend_446( + _id, + _lib._sel_registerObjectOfClass_visibility_loadHandler_1, + aClass?._id ?? ffi.nullptr, + visibility, + loadHandler._id); + } -const int errSecCRLNotValidYet = -67614; + bool canLoadObjectOfClass_(NSObject? aClass) { + return _lib._objc_msgSend_0( + _id, _lib._sel_canLoadObjectOfClass_1, aClass?._id ?? ffi.nullptr); + } -const int errSecCRLNotFound = -67615; + NSProgress loadObjectOfClass_completionHandler_( + NSObject? aClass, ObjCBlock51 completionHandler) { + final _ret = _lib._objc_msgSend_447( + _id, + _lib._sel_loadObjectOfClass_completionHandler_1, + aClass?._id ?? ffi.nullptr, + completionHandler._id); + return NSProgress._(_ret, _lib, retain: true, release: true); + } -const int errSecCRLServerDown = -67616; + NSItemProvider initWithItem_typeIdentifier_( + NSObject? item, NSString? typeIdentifier) { + final _ret = _lib._objc_msgSend_448( + _id, + _lib._sel_initWithItem_typeIdentifier_1, + item?._id ?? ffi.nullptr, + typeIdentifier?._id ?? ffi.nullptr); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } -const int errSecCRLBadURI = -67617; + NSItemProvider initWithContentsOfURL_(NSURL? fileURL) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithContentsOfURL_1, fileURL?._id ?? ffi.nullptr); + return NSItemProvider._(_ret, _lib, retain: true, release: true); + } -const int errSecUnknownCertExtension = -67618; + void registerItemForTypeIdentifier_loadHandler_( + NSString? typeIdentifier, NSItemProviderLoadHandler loadHandler) { + return _lib._objc_msgSend_449( + _id, + _lib._sel_registerItemForTypeIdentifier_loadHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + loadHandler); + } -const int errSecUnknownCRLExtension = -67619; + void loadItemForTypeIdentifier_options_completionHandler_( + NSString? typeIdentifier, + NSDictionary? options, + NSItemProviderCompletionHandler completionHandler) { + return _lib._objc_msgSend_450( + _id, + _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, + typeIdentifier?._id ?? ffi.nullptr, + options?._id ?? ffi.nullptr, + completionHandler); + } -const int errSecCRLNotTrusted = -67620; + NSItemProviderLoadHandler get previewImageHandler { + return _lib._objc_msgSend_451(_id, _lib._sel_previewImageHandler1); + } -const int errSecCRLPolicyFailed = -67621; + set previewImageHandler(NSItemProviderLoadHandler value) { + _lib._objc_msgSend_452(_id, _lib._sel_setPreviewImageHandler_1, value); + } -const int errSecIDPFailure = -67622; + void loadPreviewImageWithOptions_completionHandler_(NSDictionary? options, + NSItemProviderCompletionHandler completionHandler) { + return _lib._objc_msgSend_453( + _id, + _lib._sel_loadPreviewImageWithOptions_completionHandler_1, + options?._id ?? ffi.nullptr, + completionHandler); + } -const int errSecSMIMEEmailAddressesNotFound = -67623; + static NSItemProvider new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_new1); + return NSItemProvider._(_ret, _lib, retain: false, release: true); + } -const int errSecSMIMEBadExtendedKeyUsage = -67624; + static NSItemProvider alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_alloc1); + return NSItemProvider._(_ret, _lib, retain: false, release: true); + } +} -const int errSecSMIMEBadKeyUsage = -67625; +ffi.Pointer _ObjCBlock45_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>()(arg0); +} -const int errSecSMIMEKeyUsageNotCritical = -67626; +final _ObjCBlock45_closureRegistry = {}; +int _ObjCBlock45_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock45_registerClosure(Function fn) { + final id = ++_ObjCBlock45_closureRegistryIndex; + _ObjCBlock45_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecSMIMENoEmailAddress = -67627; +ffi.Pointer _ObjCBlock45_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return _ObjCBlock45_closureRegistry[block.ref.target.address]!(arg0); +} -const int errSecSMIMESubjAltNameNotCritical = -67628; +class ObjCBlock45 extends _ObjCBlockBase { + ObjCBlock45._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecSSLBadExtendedKeyUsage = -67629; + /// Creates a block from a C function pointer. + ObjCBlock45.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock45_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecOCSPBadResponse = -67630; + /// Creates a block from a Dart function. + ObjCBlock45.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock45_closureTrampoline) + .cast(), + _ObjCBlock45_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); + } +} -const int errSecOCSPBadRequest = -67631; +void _ObjCBlock46_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} -const int errSecOCSPUnavailable = -67632; +final _ObjCBlock46_closureRegistry = {}; +int _ObjCBlock46_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock46_registerClosure(Function fn) { + final id = ++_ObjCBlock46_closureRegistryIndex; + _ObjCBlock46_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecOCSPStatusUnrecognized = -67633; +void _ObjCBlock46_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock46_closureRegistry[block.ref.target.address]!(arg0, arg1); +} -const int errSecEndOfData = -67634; +class ObjCBlock46 extends _ObjCBlockBase { + ObjCBlock46._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecIncompleteCertRevocationCheck = -67635; + /// Creates a block from a C function pointer. + ObjCBlock46.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock46_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecNetworkFailure = -67636; + /// Creates a block from a Dart function. + ObjCBlock46.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock46_closureTrampoline) + .cast(), + _ObjCBlock46_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } +} -const int errSecOCSPNotTrustedToAnchor = -67637; +ffi.Pointer _ObjCBlock47_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>()(arg0); +} -const int errSecRecordModified = -67638; +final _ObjCBlock47_closureRegistry = {}; +int _ObjCBlock47_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock47_registerClosure(Function fn) { + final id = ++_ObjCBlock47_closureRegistryIndex; + _ObjCBlock47_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecOCSPSignatureError = -67639; +ffi.Pointer _ObjCBlock47_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return _ObjCBlock47_closureRegistry[block.ref.target.address]!(arg0); +} -const int errSecOCSPNoSigner = -67640; +class ObjCBlock47 extends _ObjCBlockBase { + ObjCBlock47._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecOCSPResponderMalformedReq = -67641; + /// Creates a block from a C function pointer. + ObjCBlock47.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock47_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecOCSPResponderInternalError = -67642; + /// Creates a block from a Dart function. + ObjCBlock47.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock47_closureTrampoline) + .cast(), + _ObjCBlock47_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); + } +} -const int errSecOCSPResponderTryLater = -67643; +void _ObjCBlock48_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} -const int errSecOCSPResponderSignatureRequired = -67644; +final _ObjCBlock48_closureRegistry = {}; +int _ObjCBlock48_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock48_registerClosure(Function fn) { + final id = ++_ObjCBlock48_closureRegistryIndex; + _ObjCBlock48_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecOCSPResponderUnauthorized = -67645; +void _ObjCBlock48_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _ObjCBlock48_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} -const int errSecOCSPResponseNonceMismatch = -67646; +class ObjCBlock48 extends _ObjCBlockBase { + ObjCBlock48._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecCodeSigningBadCertChainLength = -67647; + /// Creates a block from a C function pointer. + ObjCBlock48.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock48_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecCodeSigningNoBasicConstraints = -67648; + /// Creates a block from a Dart function. + ObjCBlock48.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>( + _ObjCBlock48_closureTrampoline) + .cast(), + _ObjCBlock48_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call( + ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } +} -const int errSecCodeSigningBadPathLengthConstraint = -67649; +void _ObjCBlock49_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} -const int errSecCodeSigningNoExtendedKeyUsage = -67650; +final _ObjCBlock49_closureRegistry = {}; +int _ObjCBlock49_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock49_registerClosure(Function fn) { + final id = ++_ObjCBlock49_closureRegistryIndex; + _ObjCBlock49_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecCodeSigningDevelopment = -67651; +void _ObjCBlock49_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock49_closureRegistry[block.ref.target.address]!(arg0, arg1); +} -const int errSecResourceSignBadCertChainLength = -67652; +class ObjCBlock49 extends _ObjCBlockBase { + ObjCBlock49._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecResourceSignBadExtKeyUsage = -67653; + /// Creates a block from a C function pointer. + ObjCBlock49.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock49_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecTrustSettingDeny = -67654; + /// Creates a block from a Dart function. + ObjCBlock49.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock49_closureTrampoline) + .cast(), + _ObjCBlock49_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } +} -const int errSecInvalidSubjectName = -67655; +ffi.Pointer _ObjCBlock50_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>()(arg0); +} -const int errSecUnknownQualifiedCertStatement = -67656; +final _ObjCBlock50_closureRegistry = {}; +int _ObjCBlock50_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock50_registerClosure(Function fn) { + final id = ++_ObjCBlock50_closureRegistryIndex; + _ObjCBlock50_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecMobileMeRequestQueued = -67657; +ffi.Pointer _ObjCBlock50_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { + return _ObjCBlock50_closureRegistry[block.ref.target.address]!(arg0); +} -const int errSecMobileMeRequestRedirected = -67658; +class ObjCBlock50 extends _ObjCBlockBase { + ObjCBlock50._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecMobileMeServerError = -67659; + /// Creates a block from a C function pointer. + ObjCBlock50.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock50_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecMobileMeServerNotAvailable = -67660; + /// Creates a block from a Dart function. + ObjCBlock50.fromFunction(NativeCupertinoHttp lib, + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>( + _ObjCBlock50_closureTrampoline) + .cast(), + _ObjCBlock50_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); + } +} -const int errSecMobileMeServerAlreadyExists = -67661; +void _ObjCBlock51_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>()(arg0, arg1); +} -const int errSecMobileMeServerServiceErr = -67662; +final _ObjCBlock51_closureRegistry = {}; +int _ObjCBlock51_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock51_registerClosure(Function fn) { + final id = ++_ObjCBlock51_closureRegistryIndex; + _ObjCBlock51_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecMobileMeRequestAlreadyPending = -67663; +void _ObjCBlock51_closureTrampoline(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1) { + return _ObjCBlock51_closureRegistry[block.ref.target.address]!(arg0, arg1); +} -const int errSecMobileMeNoRequestPending = -67664; +class ObjCBlock51 extends _ObjCBlockBase { + ObjCBlock51._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecMobileMeCSRVerifyFailure = -67665; + /// Creates a block from a C function pointer. + ObjCBlock51.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock51_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecMobileMeFailedConsistencyCheck = -67666; + /// Creates a block from a Dart function. + ObjCBlock51.fromFunction( + NativeCupertinoHttp lib, + void Function(ffi.Pointer arg0, ffi.Pointer arg1) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock51_closureTrampoline) + .cast(), + _ObjCBlock51_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0, ffi.Pointer arg1) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>()(_id, arg0, arg1); + } +} -const int errSecNotInitialized = -67667; +typedef NSItemProviderLoadHandler = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock52_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(arg0, arg1, arg2); +} -const int errSecInvalidHandleUsage = -67668; +final _ObjCBlock52_closureRegistry = {}; +int _ObjCBlock52_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock52_registerClosure(Function fn) { + final id = ++_ObjCBlock52_closureRegistryIndex; + _ObjCBlock52_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -const int errSecPVCReferentNotFound = -67669; +void _ObjCBlock52_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + return _ObjCBlock52_closureRegistry[block.ref.target.address]!( + arg0, arg1, arg2); +} -const int errSecFunctionIntegrityFail = -67670; +class ObjCBlock52 extends _ObjCBlockBase { + ObjCBlock52._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); -const int errSecInternalError = -67671; + /// Creates a block from a C function pointer. + ObjCBlock52.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock52_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; -const int errSecMemoryError = -67672; + /// Creates a block from a Dart function. + ObjCBlock52.fromFunction( + NativeCupertinoHttp lib, + void Function(NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, ffi.Pointer arg2) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock52_closureTrampoline) + .cast(), + _ObjCBlock52_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, + ffi.Pointer arg2) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); + } +} -const int errSecInvalidData = -67673; +typedef NSItemProviderCompletionHandler = ffi.Pointer<_ObjCBlock>; -const int errSecMDSError = -67674; +abstract class NSItemProviderErrorCode { + static const int NSItemProviderUnknownError = -1; + static const int NSItemProviderItemUnavailableError = -1000; + static const int NSItemProviderUnexpectedValueClassError = -1100; + static const int NSItemProviderUnavailableCoercionError = -1200; +} -const int errSecInvalidPointer = -67675; +typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; -const int errSecSelfCheckFailed = -67676; +class NSMutableString extends NSString { + NSMutableString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecFunctionFailed = -67677; + /// Returns a [NSMutableString] that points to the same underlying object as [other]. + static NSMutableString castFrom(T other) { + return NSMutableString._(other._id, other._lib, + retain: true, release: true); + } -const int errSecModuleManifestVerifyFailed = -67678; + /// Returns a [NSMutableString] that wraps the given raw object pointer. + static NSMutableString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableString._(other, lib, retain: retain, release: release); + } -const int errSecInvalidGUID = -67679; + /// Returns whether [obj] is an instance of [NSMutableString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableString1); + } -const int errSecInvalidHandle = -67680; + void replaceCharactersInRange_withString_(NSRange range, NSString? aString) { + return _lib._objc_msgSend_454( + _id, + _lib._sel_replaceCharactersInRange_withString_1, + range, + aString?._id ?? ffi.nullptr); + } -const int errSecInvalidDBList = -67681; + void insertString_atIndex_(NSString? aString, int loc) { + return _lib._objc_msgSend_455(_id, _lib._sel_insertString_atIndex_1, + aString?._id ?? ffi.nullptr, loc); + } -const int errSecInvalidPassthroughID = -67682; + void deleteCharactersInRange_(NSRange range) { + return _lib._objc_msgSend_287( + _id, _lib._sel_deleteCharactersInRange_1, range); + } -const int errSecInvalidNetworkAddress = -67683; + void appendString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_appendString_1, aString?._id ?? ffi.nullptr); + } -const int errSecCRLAlreadySigned = -67684; + void appendFormat_(NSString? format) { + return _lib._objc_msgSend_188( + _id, _lib._sel_appendFormat_1, format?._id ?? ffi.nullptr); + } -const int errSecInvalidNumberOfFields = -67685; + void setString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_setString_1, aString?._id ?? ffi.nullptr); + } -const int errSecVerificationFailure = -67686; + int replaceOccurrencesOfString_withString_options_range_(NSString? target, + NSString? replacement, int options, NSRange searchRange) { + return _lib._objc_msgSend_456( + _id, + _lib._sel_replaceOccurrencesOfString_withString_options_range_1, + target?._id ?? ffi.nullptr, + replacement?._id ?? ffi.nullptr, + options, + searchRange); + } -const int errSecUnknownTag = -67687; + bool applyTransform_reverse_range_updatedRange_(NSStringTransform transform, + bool reverse, NSRange range, NSRangePointer resultingRange) { + return _lib._objc_msgSend_457( + _id, + _lib._sel_applyTransform_reverse_range_updatedRange_1, + transform, + reverse, + range, + resultingRange); + } -const int errSecInvalidSignature = -67688; + NSMutableString initWithCapacity_(int capacity) { + final _ret = + _lib._objc_msgSend_458(_id, _lib._sel_initWithCapacity_1, capacity); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidName = -67689; + static NSMutableString stringWithCapacity_( + NativeCupertinoHttp _lib, int capacity) { + final _ret = _lib._objc_msgSend_458( + _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidCertificateRef = -67690; + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); + } -const int errSecInvalidCertificateGroup = -67691; + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSMutableString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecTagNotFound = -67692; + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); + } -const int errSecInvalidQuery = -67693; + static NSMutableString string(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_string1); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidValue = -67694; + static NSMutableString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecCallbackFailed = -67695; + static NSMutableString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSMutableString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecACLDeleteFailed = -67696; + static NSMutableString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSMutableString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecACLReplaceFailed = -67697; + static NSMutableString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecACLAddFailed = -67698; + static NSMutableString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecACLChangeFailed = -67699; + static NSMutableString stringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSMutableString1, + _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAccessCredentials = -67700; + static NSMutableString + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSMutableString1, + _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidRecord = -67701; + static NSMutableString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSMutableString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidACL = -67702; + static NSMutableString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_269( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidSampleValue = -67703; + static NSMutableString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_270( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecIncompatibleVersion = -67704; + static NSMutableString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_271( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecPrivilegeNotGranted = -67705; + static NSMutableString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_272( + _lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidScope = -67706; + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_273( + _lib._class_NSMutableString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } -const int errSecPVCAlreadyConfigured = -67707; + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidPVC = -67708; + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecEMMLoadFailed = -67709; + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSMutableString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecEMMUnloadFailed = -67710; + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSMutableString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecAddinLoadFailed = -67711; + static NSMutableString new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_new1); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } -const int errSecInvalidKeyRef = -67712; + static NSMutableString alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_alloc1); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } +} -const int errSecInvalidKeyHierarchy = -67713; +typedef NSExceptionName = ffi.Pointer; -const int errSecAddinUnloadFailed = -67714; +class NSSimpleCString extends NSString { + NSSimpleCString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecLibraryReferenceNotFound = -67715; + /// Returns a [NSSimpleCString] that points to the same underlying object as [other]. + static NSSimpleCString castFrom(T other) { + return NSSimpleCString._(other._id, other._lib, + retain: true, release: true); + } -const int errSecInvalidAddinFunctionTable = -67716; + /// Returns a [NSSimpleCString] that wraps the given raw object pointer. + static NSSimpleCString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSSimpleCString._(other, lib, retain: retain, release: release); + } -const int errSecInvalidServiceMask = -67717; + /// Returns whether [obj] is an instance of [NSSimpleCString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSSimpleCString1); + } -const int errSecModuleNotLoaded = -67718; + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSSimpleCString1, _lib._sel_availableStringEncodings1); + } -const int errSecInvalidSubServiceID = -67719; + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSSimpleCString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecAttributeNotInContext = -67720; + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSSimpleCString1, _lib._sel_defaultCStringEncoding1); + } -const int errSecModuleManagerInitializeFailed = -67721; + static NSSimpleCString string(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_string1); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecModuleManagerNotFound = -67722; + static NSSimpleCString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecEventNotificationCallbackNotFound = -67723; + static NSSimpleCString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSSimpleCString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecInputLengthError = -67724; + static NSSimpleCString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSSimpleCString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecOutputLengthError = -67725; + static NSSimpleCString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecPrivilegeNotSupported = -67726; + static NSSimpleCString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecDeviceError = -67727; + static NSSimpleCString stringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecAttachHandleBusy = -67728; + static NSSimpleCString + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSSimpleCString1, + _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecNotLoggedIn = -67729; + static NSSimpleCString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSSimpleCString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecAlgorithmMismatch = -67730; + static NSSimpleCString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_269( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecKeyUsageIncorrect = -67731; + static NSSimpleCString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_270( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecKeyBlobTypeIncorrect = -67732; + static NSSimpleCString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_271( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecKeyHeaderInconsistent = -67733; + static NSSimpleCString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_272( + _lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedKeyFormat = -67734; + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_273( + _lib._class_NSSimpleCString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } -const int errSecUnsupportedKeySize = -67735; + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidKeyUsageMask = -67736; + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedKeyUsageMask = -67737; + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSSimpleCString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidKeyAttributeMask = -67738; + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSSimpleCString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedKeyAttributeMask = -67739; + static NSSimpleCString new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_new1); + return NSSimpleCString._(_ret, _lib, retain: false, release: true); + } -const int errSecInvalidKeyLabel = -67740; + static NSSimpleCString alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_alloc1); + return NSSimpleCString._(_ret, _lib, retain: false, release: true); + } +} -const int errSecUnsupportedKeyLabel = -67741; +class NSConstantString extends NSSimpleCString { + NSConstantString._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecInvalidKeyFormat = -67742; + /// Returns a [NSConstantString] that points to the same underlying object as [other]. + static NSConstantString castFrom(T other) { + return NSConstantString._(other._id, other._lib, + retain: true, release: true); + } -const int errSecUnsupportedVectorOfBuffers = -67743; + /// Returns a [NSConstantString] that wraps the given raw object pointer. + static NSConstantString castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSConstantString._(other, lib, retain: retain, release: release); + } -const int errSecInvalidInputVector = -67744; + /// Returns whether [obj] is an instance of [NSConstantString]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSConstantString1); + } -const int errSecInvalidOutputVector = -67745; + static ffi.Pointer getAvailableStringEncodings( + NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_242( + _lib._class_NSConstantString1, _lib._sel_availableStringEncodings1); + } -const int errSecInvalidContext = -67746; + static NSString localizedNameOfStringEncoding_( + NativeCupertinoHttp _lib, int encoding) { + final _ret = _lib._objc_msgSend_15(_lib._class_NSConstantString1, + _lib._sel_localizedNameOfStringEncoding_1, encoding); + return NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAlgorithm = -67747; + static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_12( + _lib._class_NSConstantString1, _lib._sel_defaultCStringEncoding1); + } -const int errSecInvalidAttributeKey = -67748; + static NSConstantString string(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_string1); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeKey = -67749; + static NSConstantString stringWithString_( + NativeCupertinoHttp _lib, NSString? string) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeInitVector = -67750; + static NSConstantString stringWithCharacters_length_( + NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { + final _ret = _lib._objc_msgSend_255(_lib._class_NSConstantString1, + _lib._sel_stringWithCharacters_length_1, characters, length); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeInitVector = -67751; + static NSConstantString stringWithUTF8String_( + NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_256(_lib._class_NSConstantString1, + _lib._sel_stringWithUTF8String_1, nullTerminatedCString); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeSalt = -67752; + static NSConstantString stringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeSalt = -67753; + static NSConstantString localizedStringWithFormat_( + NativeCupertinoHttp _lib, NSString? format) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributePadding = -67754; + static NSConstantString + stringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSConstantString1, + _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributePadding = -67755; + static NSConstantString + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString? format, + NSString? validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_260( + _lib._class_NSConstantString1, + _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, + format?._id ?? ffi.nullptr, + validFormatSpecifiers?._id ?? ffi.nullptr, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeRandom = -67756; + static NSConstantString stringWithCString_encoding_( + NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSConstantString1, + _lib._sel_stringWithCString_encoding_1, cString, enc); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeRandom = -67757; + static NSConstantString stringWithContentsOfURL_encoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_269( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_encoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeSeed = -67758; + static NSConstantString stringWithContentsOfFile_encoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + int enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_270( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_encoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeSeed = -67759; + static NSConstantString stringWithContentsOfURL_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSURL? url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_271( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, + url?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributePassphrase = -67760; + static NSConstantString stringWithContentsOfFile_usedEncoding_error_( + NativeCupertinoHttp _lib, + NSString? path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_272( + _lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, + path?._id ?? ffi.nullptr, + enc, + error); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributePassphrase = -67761; + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NativeCupertinoHttp _lib, + NSData? data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _lib._objc_msgSend_273( + _lib._class_NSConstantString1, + _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, + data?._id ?? ffi.nullptr, + opts?._id ?? ffi.nullptr, + string, + usedLossyConversion); + } -const int errSecInvalidAttributeKeyLength = -67762; + static NSObject stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeKeyLength = -67763; + static NSObject stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeBlockSize = -67764; + static NSObject stringWithCString_length_( + NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { + final _ret = _lib._objc_msgSend_268(_lib._class_NSConstantString1, + _lib._sel_stringWithCString_length_1, bytes, length); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeBlockSize = -67765; + static NSObject stringWithCString_( + NativeCupertinoHttp _lib, ffi.Pointer bytes) { + final _ret = _lib._objc_msgSend_256( + _lib._class_NSConstantString1, _lib._sel_stringWithCString_1, bytes); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeOutputSize = -67766; + static NSConstantString new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_new1); + return NSConstantString._(_ret, _lib, retain: false, release: true); + } -const int errSecMissingAttributeOutputSize = -67767; + static NSConstantString alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_alloc1); + return NSConstantString._(_ret, _lib, retain: false, release: true); + } +} -const int errSecInvalidAttributeRounds = -67768; +class NSMutableCharacterSet extends NSCharacterSet { + NSMutableCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecMissingAttributeRounds = -67769; + /// Returns a [NSMutableCharacterSet] that points to the same underlying object as [other]. + static NSMutableCharacterSet castFrom(T other) { + return NSMutableCharacterSet._(other._id, other._lib, + retain: true, release: true); + } -const int errSecInvalidAlgorithmParms = -67770; + /// Returns a [NSMutableCharacterSet] that wraps the given raw object pointer. + static NSMutableCharacterSet castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSMutableCharacterSet._(other, lib, + retain: retain, release: release); + } -const int errSecMissingAlgorithmParms = -67771; + /// Returns whether [obj] is an instance of [NSMutableCharacterSet]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSMutableCharacterSet1); + } -const int errSecInvalidAttributeLabel = -67772; + void addCharactersInRange_(NSRange aRange) { + return _lib._objc_msgSend_287( + _id, _lib._sel_addCharactersInRange_1, aRange); + } -const int errSecMissingAttributeLabel = -67773; + void removeCharactersInRange_(NSRange aRange) { + return _lib._objc_msgSend_287( + _id, _lib._sel_removeCharactersInRange_1, aRange); + } -const int errSecInvalidAttributeKeyType = -67774; + void addCharactersInString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_addCharactersInString_1, aString?._id ?? ffi.nullptr); + } -const int errSecMissingAttributeKeyType = -67775; + void removeCharactersInString_(NSString? aString) { + return _lib._objc_msgSend_188( + _id, _lib._sel_removeCharactersInString_1, aString?._id ?? ffi.nullptr); + } -const int errSecInvalidAttributeMode = -67776; + void formUnionWithCharacterSet_(NSCharacterSet? otherSet) { + return _lib._objc_msgSend_459(_id, _lib._sel_formUnionWithCharacterSet_1, + otherSet?._id ?? ffi.nullptr); + } -const int errSecMissingAttributeMode = -67777; + void formIntersectionWithCharacterSet_(NSCharacterSet? otherSet) { + return _lib._objc_msgSend_459( + _id, + _lib._sel_formIntersectionWithCharacterSet_1, + otherSet?._id ?? ffi.nullptr); + } -const int errSecInvalidAttributeEffectiveBits = -67778; + void invert() { + return _lib._objc_msgSend_1(_id, _lib._sel_invert1); + } -const int errSecMissingAttributeEffectiveBits = -67779; + static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_controlCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeStartDate = -67780; + static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_whitespaceCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeStartDate = -67781; + static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_whitespaceAndNewlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeEndDate = -67782; + static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_decimalDigitCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeEndDate = -67783; + static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_letterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeVersion = -67784; + static NSCharacterSet? getLowercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_lowercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeVersion = -67785; + static NSCharacterSet? getUppercaseLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_uppercaseLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributePrime = -67786; + static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_nonBaseCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributePrime = -67787; + static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_alphanumericCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeBase = -67788; + static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_decomposableCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeBase = -67789; + static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_illegalCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeSubprime = -67790; + static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_punctuationCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeSubprime = -67791; + static NSCharacterSet? getCapitalizedLetterCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_capitalizedLetterCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeIterationCount = -67792; + static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_symbolCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeIterationCount = -67793; + static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28( + _lib._class_NSMutableCharacterSet1, _lib._sel_newlineCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: false, release: true); + } -const int errSecInvalidAttributeDLDBHandle = -67794; + static NSMutableCharacterSet characterSetWithRange_( + NativeCupertinoHttp _lib, NSRange aRange) { + final _ret = _lib._objc_msgSend_460(_lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithRange_1, aRange); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeDLDBHandle = -67795; + static NSMutableCharacterSet characterSetWithCharactersInString_( + NativeCupertinoHttp _lib, NSString? aString) { + final _ret = _lib._objc_msgSend_461( + _lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, + aString?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeAccessCredentials = -67796; + static NSMutableCharacterSet characterSetWithBitmapRepresentation_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_462( + _lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, + data?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeAccessCredentials = -67797; + static NSMutableCharacterSet characterSetWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString? fName) { + final _ret = _lib._objc_msgSend_461(_lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributePublicKeyFormat = -67798; + /// Returns a character set containing the characters allowed in a URL's user subcomponent. + static NSCharacterSet? getURLUserAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLUserAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributePublicKeyFormat = -67799; + /// Returns a character set containing the characters allowed in a URL's password subcomponent. + static NSCharacterSet? getURLPasswordAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLPasswordAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributePrivateKeyFormat = -67800; + /// Returns a character set containing the characters allowed in a URL's host subcomponent. + static NSCharacterSet? getURLHostAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLHostAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributePrivateKeyFormat = -67801; + /// Returns a character set containing the characters allowed in a URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + static NSCharacterSet? getURLPathAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLPathAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeSymmetricKeyFormat = -67802; + /// Returns a character set containing the characters allowed in a URL's query component. + static NSCharacterSet? getURLQueryAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLQueryAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecMissingAttributeSymmetricKeyFormat = -67803; + /// Returns a character set containing the characters allowed in a URL's fragment component. + static NSCharacterSet? getURLFragmentAllowedCharacterSet( + NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, + _lib._sel_URLFragmentAllowedCharacterSet1); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAttributeWrappedKeyFormat = -67804; + static NSMutableCharacterSet new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableCharacterSet1, _lib._sel_new1); + return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); + } -const int errSecMissingAttributeWrappedKeyFormat = -67805; + static NSMutableCharacterSet alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSMutableCharacterSet1, _lib._sel_alloc1); + return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); + } +} -const int errSecStagedOperationInProgress = -67806; +typedef NSURLFileResourceType = ffi.Pointer; +typedef NSURLThumbnailDictionaryItem = ffi.Pointer; +typedef NSURLFileProtectionType = ffi.Pointer; +typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; +typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; +typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; -const int errSecStagedOperationNotStarted = -67807; +/// NSURLQueryItem encapsulates a single query name-value pair. The name and value strings of a query name-value pair are not percent encoded. For use with the NSURLComponents queryItems property. +class NSURLQueryItem extends NSObject { + NSURLQueryItem._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecVerifyFailed = -67808; + /// Returns a [NSURLQueryItem] that points to the same underlying object as [other]. + static NSURLQueryItem castFrom(T other) { + return NSURLQueryItem._(other._id, other._lib, retain: true, release: true); + } -const int errSecQuerySizeUnknown = -67809; + /// Returns a [NSURLQueryItem] that wraps the given raw object pointer. + static NSURLQueryItem castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLQueryItem._(other, lib, retain: retain, release: release); + } -const int errSecBlockSizeMismatch = -67810; + /// Returns whether [obj] is an instance of [NSURLQueryItem]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLQueryItem1); + } -const int errSecPublicKeyInconsistent = -67811; + NSURLQueryItem initWithName_value_(NSString? name, NSString? value) { + final _ret = _lib._objc_msgSend_463(_id, _lib._sel_initWithName_value_1, + name?._id ?? ffi.nullptr, value?._id ?? ffi.nullptr); + return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + } -const int errSecDeviceVerifyFailed = -67812; + static NSURLQueryItem queryItemWithName_value_( + NativeCupertinoHttp _lib, NSString? name, NSString? value) { + final _ret = _lib._objc_msgSend_463( + _lib._class_NSURLQueryItem1, + _lib._sel_queryItemWithName_value_1, + name?._id ?? ffi.nullptr, + value?._id ?? ffi.nullptr); + return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidLoginName = -67813; + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecAlreadyLoggedIn = -67814; + NSString? get value { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_value1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidDigestAlgorithm = -67815; + static NSURLQueryItem new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_new1); + return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + } -const int errSecInvalidCRLGroup = -67816; + static NSURLQueryItem alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_alloc1); + return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + } +} -const int errSecCertificateCannotOperate = -67817; +class NSURLComponents extends NSObject { + NSURLComponents._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecCertificateExpired = -67818; + /// Returns a [NSURLComponents] that points to the same underlying object as [other]. + static NSURLComponents castFrom(T other) { + return NSURLComponents._(other._id, other._lib, + retain: true, release: true); + } -const int errSecCertificateNotValidYet = -67819; + /// Returns a [NSURLComponents] that wraps the given raw object pointer. + static NSURLComponents castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLComponents._(other, lib, retain: retain, release: release); + } -const int errSecCertificateRevoked = -67820; + /// Returns whether [obj] is an instance of [NSURLComponents]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLComponents1); + } -const int errSecCertificateSuspended = -67821; + /// Initialize a NSURLComponents with all components undefined. Designated initializer. + @override + NSURLComponents init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } -const int errSecInsufficientCredentials = -67822; + /// Initialize a NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. + NSURLComponents initWithURL_resolvingAgainstBaseURL_( + NSURL? url, bool resolve) { + final _ret = _lib._objc_msgSend_206( + _id, + _lib._sel_initWithURL_resolvingAgainstBaseURL_1, + url?._id ?? ffi.nullptr, + resolve); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAction = -67823; + /// Initializes and returns a newly created NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. + static NSURLComponents componentsWithURL_resolvingAgainstBaseURL_( + NativeCupertinoHttp _lib, NSURL? url, bool resolve) { + final _ret = _lib._objc_msgSend_206( + _lib._class_NSURLComponents1, + _lib._sel_componentsWithURL_resolvingAgainstBaseURL_1, + url?._id ?? ffi.nullptr, + resolve); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAuthority = -67824; + /// Initialize a NSURLComponents with a URL string. If the URLString is malformed, nil is returned. + NSURLComponents initWithString_(NSString? URLString) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } -const int errSecVerifyActionFailed = -67825; + /// Initializes and returns a newly created NSURLComponents with a URL string. If the URLString is malformed, nil is returned. + static NSURLComponents componentsWithString_( + NativeCupertinoHttp _lib, NSString? URLString) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSURLComponents1, + _lib._sel_componentsWithString_1, URLString?._id ?? ffi.nullptr); + return NSURLComponents._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidCertAuthority = -67826; + /// Returns a URL created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidCRLAuthority = -67827; + /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSURL URLRelativeToURL_(NSURL? baseURL) { + final _ret = _lib._objc_msgSend_464( + _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); + return NSURL._(_ret, _lib, retain: true, release: true); + } -const int errSecInvaldCRLAuthority = -67827; + /// Returns a URL string created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. + NSString? get string { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidCRLEncoding = -67828; + /// Attempting to set the scheme with an invalid scheme string will cause an exception. + NSString? get scheme { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidCRLType = -67829; + /// Attempting to set the scheme with an invalid scheme string will cause an exception. + set scheme(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidCRL = -67830; + NSString? get user { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidFormType = -67831; + set user(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidID = -67832; + NSString? get password { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidIdentifier = -67833; + set password(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidIndex = -67834; + NSString? get host { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidPolicyIdentifiers = -67835; + set host(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidTimeString = -67836; + /// Attempting to set a negative port number will cause an exception. + NSNumber? get port { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidReason = -67837; + /// Attempting to set a negative port number will cause an exception. + set port(NSNumber? value) { + _lib._objc_msgSend_335(_id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidRequestInputs = -67838; + NSString? get path { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidResponseVector = -67839; + set path(NSString? value) { + _lib._objc_msgSend_331(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidStopOnPolicy = -67840; + NSString? get query { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidTuple = -67841; + set query(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); + } -const int errSecMultipleValuesUnsupported = -67842; + NSString? get fragment { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecNotTrusted = -67843; + set fragment(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); + } -const int errSecNoDefaultAuthority = -67844; + /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + NSString? get percentEncodedUser { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedUser1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecRejectedForm = -67845; + /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + set percentEncodedUser(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); + } -const int errSecRequestLost = -67846; + NSString? get percentEncodedPassword { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPassword1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecRequestRejected = -67847; + set percentEncodedPassword(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); + } -const int errSecUnsupportedAddressType = -67848; + NSString? get percentEncodedHost { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedHost1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecUnsupportedService = -67849; + set percentEncodedHost(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidTupleGroup = -67850; + NSString? get percentEncodedPath { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPath1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidBaseACLs = -67851; + set percentEncodedPath(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidTupleCredentials = -67852; + NSString? get percentEncodedQuery { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedQuery1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidTupleCredendtials = -67852; + set percentEncodedQuery(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidEncoding = -67853; + NSString? get percentEncodedFragment { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedFragment1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidValidityPeriod = -67854; + set percentEncodedFragment(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidRequestor = -67855; + NSString? get encodedHost { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_encodedHost1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecRequestDescriptor = -67856; + set encodedHost(NSString? value) { + _lib._objc_msgSend_331( + _id, _lib._sel_setEncodedHost_1, value?._id ?? ffi.nullptr); + } -const int errSecInvalidBundleInfo = -67857; + /// These properties return the character range of a component in the URL string returned by -[NSURLComponents string]. If the component does not exist in the NSURLComponents object, {NSNotFound, 0} is returned. Note: Zero length components are legal. For example, the URL string "scheme://:@/?#" has a zero length user, password, host, query and fragment; the URL strings "scheme:" and "" both have a zero length path. + NSRange get rangeOfScheme { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfScheme1); + } -const int errSecInvalidCRLIndex = -67858; + NSRange get rangeOfUser { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfUser1); + } -const int errSecNoFieldValues = -67859; + NSRange get rangeOfPassword { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPassword1); + } -const int errSecUnsupportedFieldFormat = -67860; + NSRange get rangeOfHost { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfHost1); + } -const int errSecUnsupportedIndexInfo = -67861; + NSRange get rangeOfPort { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPort1); + } -const int errSecUnsupportedLocality = -67862; + NSRange get rangeOfPath { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPath1); + } -const int errSecUnsupportedNumAttributes = -67863; + NSRange get rangeOfQuery { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfQuery1); + } -const int errSecUnsupportedNumIndexes = -67864; + NSRange get rangeOfFragment { + return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfFragment1); + } -const int errSecUnsupportedNumRecordTypes = -67865; + /// The query component as an array of NSURLQueryItems for this NSURLComponents. + /// + /// Each NSURLQueryItem represents a single key-value pair, + /// + /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. + /// + /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. + /// + /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. + /// + /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. + NSArray? get queryItems { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_queryItems1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSecFieldSpecifiedMultiple = -67866; + /// The query component as an array of NSURLQueryItems for this NSURLComponents. + /// + /// Each NSURLQueryItem represents a single key-value pair, + /// + /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. + /// + /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. + /// + /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. + /// + /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. + set queryItems(NSArray? value) { + _lib._objc_msgSend_399( + _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); + } -const int errSecIncompatibleFieldFormat = -67867; + /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. + /// + /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. + NSArray? get percentEncodedQueryItems { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_percentEncodedQueryItems1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidParsingModule = -67868; + /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. + /// + /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. + set percentEncodedQueryItems(NSArray? value) { + _lib._objc_msgSend_399(_id, _lib._sel_setPercentEncodedQueryItems_1, + value?._id ?? ffi.nullptr); + } -const int errSecDatabaseLocked = -67869; + static NSURLComponents new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_new1); + return NSURLComponents._(_ret, _lib, retain: false, release: true); + } -const int errSecDatastoreIsOpen = -67870; + static NSURLComponents alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_alloc1); + return NSURLComponents._(_ret, _lib, retain: false, release: true); + } +} -const int errSecMissingValue = -67871; +/// NSFileSecurity encapsulates a file system object's security information. NSFileSecurity and CFFileSecurity are toll-free bridged. Use the CFFileSecurity API for access to the low-level file security properties encapsulated by NSFileSecurity. +class NSFileSecurity extends NSObject { + NSFileSecurity._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecUnsupportedQueryLimits = -67872; + /// Returns a [NSFileSecurity] that points to the same underlying object as [other]. + static NSFileSecurity castFrom(T other) { + return NSFileSecurity._(other._id, other._lib, retain: true, release: true); + } -const int errSecUnsupportedNumSelectionPreds = -67873; + /// Returns a [NSFileSecurity] that wraps the given raw object pointer. + static NSFileSecurity castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSFileSecurity._(other, lib, retain: retain, release: release); + } -const int errSecUnsupportedOperator = -67874; + /// Returns whether [obj] is an instance of [NSFileSecurity]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSFileSecurity1); + } -const int errSecInvalidDBLocation = -67875; + NSFileSecurity initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSFileSecurity._(_ret, _lib, retain: true, release: true); + } -const int errSecInvalidAccessRequest = -67876; + static NSFileSecurity new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_new1); + return NSFileSecurity._(_ret, _lib, retain: false, release: true); + } -const int errSecInvalidIndexInfo = -67877; + static NSFileSecurity alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_alloc1); + return NSFileSecurity._(_ret, _lib, retain: false, release: true); + } +} -const int errSecInvalidNewOwner = -67878; +/// ! +/// @class NSHTTPURLResponse +/// +/// @abstract An NSHTTPURLResponse object represents a response to an +/// HTTP URL load. It is a specialization of NSURLResponse which +/// provides conveniences for accessing information specific to HTTP +/// protocol responses. +class NSHTTPURLResponse extends NSURLResponse { + NSHTTPURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecInvalidModifyMode = -67879; + /// Returns a [NSHTTPURLResponse] that points to the same underlying object as [other]. + static NSHTTPURLResponse castFrom(T other) { + return NSHTTPURLResponse._(other._id, other._lib, + retain: true, release: true); + } -const int errSecMissingRequiredExtension = -67880; + /// Returns a [NSHTTPURLResponse] that wraps the given raw object pointer. + static NSHTTPURLResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHTTPURLResponse._(other, lib, retain: retain, release: release); + } -const int errSecExtendedKeyUsageNotCritical = -67881; + /// Returns whether [obj] is an instance of [NSHTTPURLResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSHTTPURLResponse1); + } -const int errSecTimestampMissing = -67882; + /// ! + /// @method initWithURL:statusCode:HTTPVersion:headerFields: + /// @abstract initializer for NSHTTPURLResponse objects. + /// @param url the URL from which the response was generated. + /// @param statusCode an HTTP status code. + /// @param HTTPVersion The version of the HTTP response as represented by the server. This is typically represented as "HTTP/1.1". + /// @param headerFields A dictionary representing the header keys and values of the server response. + /// @result the instance of the object, or NULL if an error occurred during initialization. + /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. + NSHTTPURLResponse initWithURL_statusCode_HTTPVersion_headerFields_(NSURL? url, + int statusCode, NSString? HTTPVersion, NSDictionary? headerFields) { + final _ret = _lib._objc_msgSend_465( + _id, + _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, + url?._id ?? ffi.nullptr, + statusCode, + HTTPVersion?._id ?? ffi.nullptr, + headerFields?._id ?? ffi.nullptr); + return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampInvalid = -67883; + /// ! + /// @abstract Returns the HTTP status code of the receiver. + /// @result The HTTP status code of the receiver. + int get statusCode { + return _lib._objc_msgSend_81(_id, _lib._sel_statusCode1); + } -const int errSecTimestampNotTrusted = -67884; + /// ! + /// @abstract Returns a dictionary containing all the HTTP header fields + /// of the receiver. + /// @discussion By examining this header dictionary, clients can see + /// the "raw" header information which was reported to the protocol + /// implementation by the HTTP server. This may be of use to + /// sophisticated or special-purpose HTTP clients. + /// @result A dictionary containing all the HTTP header fields of the + /// receiver. + NSDictionary? get allHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHeaderFields1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampServiceNotAvailable = -67885; + /// ! + /// @method valueForHTTPHeaderField: + /// @abstract Returns the value which corresponds to the given header + /// field. Note that, in keeping with the HTTP RFC, HTTP header field + /// names are case-insensitive. + /// @param field the header field name to use for the lookup + /// (case-insensitive). + /// @result the value associated with the given header field, or nil if + /// there is no value associated with the given header field. + NSString valueForHTTPHeaderField_(NSString? field) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampBadAlg = -67886; + /// ! + /// @method localizedStringForStatusCode: + /// @abstract Convenience method which returns a localized string + /// corresponding to the status code for this response. + /// @param statusCode the status code to use to produce a localized string. + /// @result A localized string corresponding to the given status code. + static NSString localizedStringForStatusCode_( + NativeCupertinoHttp _lib, int statusCode) { + final _ret = _lib._objc_msgSend_466(_lib._class_NSHTTPURLResponse1, + _lib._sel_localizedStringForStatusCode_1, statusCode); + return NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampBadRequest = -67887; + static NSHTTPURLResponse new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_new1); + return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + } -const int errSecTimestampBadDataFormat = -67888; + static NSHTTPURLResponse alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_alloc1); + return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + } +} -const int errSecTimestampTimeNotAvailable = -67889; +class NSException extends NSObject { + NSException._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSecTimestampUnacceptedPolicy = -67890; + /// Returns a [NSException] that points to the same underlying object as [other]. + static NSException castFrom(T other) { + return NSException._(other._id, other._lib, retain: true, release: true); + } -const int errSecTimestampUnacceptedExtension = -67891; + /// Returns a [NSException] that wraps the given raw object pointer. + static NSException castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSException._(other, lib, retain: retain, release: release); + } -const int errSecTimestampAddInfoNotAvailable = -67892; + /// Returns whether [obj] is an instance of [NSException]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSException1); + } -const int errSecTimestampSystemFailure = -67893; + static NSException exceptionWithName_reason_userInfo_( + NativeCupertinoHttp _lib, + NSExceptionName name, + NSString? reason, + NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_467( + _lib._class_NSException1, + _lib._sel_exceptionWithName_reason_userInfo_1, + name, + reason?._id ?? ffi.nullptr, + userInfo?._id ?? ffi.nullptr); + return NSException._(_ret, _lib, retain: true, release: true); + } -const int errSecSigningTimeMissing = -67894; + NSException initWithName_reason_userInfo_( + NSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_468( + _id, + _lib._sel_initWithName_reason_userInfo_1, + aName, + aReason?._id ?? ffi.nullptr, + aUserInfo?._id ?? ffi.nullptr); + return NSException._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampRejection = -67895; + NSExceptionName get name { + return _lib._objc_msgSend_32(_id, _lib._sel_name1); + } -const int errSecTimestampWaiting = -67896; + NSString? get reason { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_reason1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampRevocationWarning = -67897; + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } -const int errSecTimestampRevocationNotification = -67898; + NSArray? get callStackReturnAddresses { + final _ret = + _lib._objc_msgSend_162(_id, _lib._sel_callStackReturnAddresses1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSecCertificatePolicyNotAllowed = -67899; + NSArray? get callStackSymbols { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_callStackSymbols1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSecCertificateNameNotAllowed = -67900; + void raise() { + return _lib._objc_msgSend_1(_id, _lib._sel_raise1); + } -const int errSecCertificateValidityPeriodTooLong = -67901; + static void raise_format_( + NativeCupertinoHttp _lib, NSExceptionName name, NSString? format) { + return _lib._objc_msgSend_367(_lib._class_NSException1, + _lib._sel_raise_format_1, name, format?._id ?? ffi.nullptr); + } -const int errSecCertificateIsCA = -67902; + static void raise_format_arguments_(NativeCupertinoHttp _lib, + NSExceptionName name, NSString? format, va_list argList) { + return _lib._objc_msgSend_469( + _lib._class_NSException1, + _lib._sel_raise_format_arguments_1, + name, + format?._id ?? ffi.nullptr, + argList); + } -const int errSecCertificateDuplicateExtension = -67903; + static NSException new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_new1); + return NSException._(_ret, _lib, retain: false, release: true); + } -const int errSSLProtocol = -9800; + static NSException alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); + return NSException._(_ret, _lib, retain: false, release: true); + } +} -const int errSSLNegotiation = -9801; +typedef NSUncaughtExceptionHandler + = ffi.NativeFunction exception)>; -const int errSSLFatalAlert = -9802; +class NSAssertionHandler extends NSObject { + NSAssertionHandler._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSSLWouldBlock = -9803; + /// Returns a [NSAssertionHandler] that points to the same underlying object as [other]. + static NSAssertionHandler castFrom(T other) { + return NSAssertionHandler._(other._id, other._lib, + retain: true, release: true); + } -const int errSSLSessionNotFound = -9804; + /// Returns a [NSAssertionHandler] that wraps the given raw object pointer. + static NSAssertionHandler castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSAssertionHandler._(other, lib, retain: retain, release: release); + } -const int errSSLClosedGraceful = -9805; + /// Returns whether [obj] is an instance of [NSAssertionHandler]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSAssertionHandler1); + } -const int errSSLClosedAbort = -9806; + static NSAssertionHandler? getCurrentHandler(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_470( + _lib._class_NSAssertionHandler1, _lib._sel_currentHandler1); + return _ret.address == 0 + ? null + : NSAssertionHandler._(_ret, _lib, retain: true, release: true); + } -const int errSSLXCertChainInvalid = -9807; + void handleFailureInMethod_object_file_lineNumber_description_( + ffi.Pointer selector, + NSObject object, + NSString? fileName, + int line, + NSString? format) { + return _lib._objc_msgSend_471( + _id, + _lib._sel_handleFailureInMethod_object_file_lineNumber_description_1, + selector, + object._id, + fileName?._id ?? ffi.nullptr, + line, + format?._id ?? ffi.nullptr); + } -const int errSSLBadCert = -9808; + void handleFailureInFunction_file_lineNumber_description_( + NSString? functionName, NSString? fileName, int line, NSString? format) { + return _lib._objc_msgSend_472( + _id, + _lib._sel_handleFailureInFunction_file_lineNumber_description_1, + functionName?._id ?? ffi.nullptr, + fileName?._id ?? ffi.nullptr, + line, + format?._id ?? ffi.nullptr); + } -const int errSSLCrypto = -9809; + static NSAssertionHandler new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_new1); + return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + } -const int errSSLInternal = -9810; + static NSAssertionHandler alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_alloc1); + return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + } +} -const int errSSLModuleAttach = -9811; +class NSBlockOperation extends NSOperation { + NSBlockOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSSLUnknownRootCert = -9812; + /// Returns a [NSBlockOperation] that points to the same underlying object as [other]. + static NSBlockOperation castFrom(T other) { + return NSBlockOperation._(other._id, other._lib, + retain: true, release: true); + } -const int errSSLNoRootCert = -9813; + /// Returns a [NSBlockOperation] that wraps the given raw object pointer. + static NSBlockOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSBlockOperation._(other, lib, retain: retain, release: release); + } -const int errSSLCertExpired = -9814; + /// Returns whether [obj] is an instance of [NSBlockOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSBlockOperation1); + } -const int errSSLCertNotYetValid = -9815; + static NSBlockOperation blockOperationWithBlock_( + NativeCupertinoHttp _lib, ObjCBlock block) { + final _ret = _lib._objc_msgSend_473(_lib._class_NSBlockOperation1, + _lib._sel_blockOperationWithBlock_1, block._id); + return NSBlockOperation._(_ret, _lib, retain: true, release: true); + } -const int errSSLClosedNoNotify = -9816; + void addExecutionBlock_(ObjCBlock block) { + return _lib._objc_msgSend_345( + _id, _lib._sel_addExecutionBlock_1, block._id); + } -const int errSSLBufferOverflow = -9817; + NSArray? get executionBlocks { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_executionBlocks1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); + } -const int errSSLBadCipherSuite = -9818; + static NSBlockOperation new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_new1); + return NSBlockOperation._(_ret, _lib, retain: false, release: true); + } -const int errSSLPeerUnexpectedMsg = -9819; + static NSBlockOperation alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_alloc1); + return NSBlockOperation._(_ret, _lib, retain: false, release: true); + } +} -const int errSSLPeerBadRecordMac = -9820; +class NSInvocationOperation extends NSOperation { + NSInvocationOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int errSSLPeerDecryptionFail = -9821; + /// Returns a [NSInvocationOperation] that points to the same underlying object as [other]. + static NSInvocationOperation castFrom(T other) { + return NSInvocationOperation._(other._id, other._lib, + retain: true, release: true); + } -const int errSSLPeerRecordOverflow = -9822; + /// Returns a [NSInvocationOperation] that wraps the given raw object pointer. + static NSInvocationOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSInvocationOperation._(other, lib, + retain: retain, release: release); + } -const int errSSLPeerDecompressFail = -9823; + /// Returns whether [obj] is an instance of [NSInvocationOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSInvocationOperation1); + } -const int errSSLPeerHandshakeFail = -9824; + NSInvocationOperation initWithTarget_selector_object_( + NSObject target, ffi.Pointer sel, NSObject arg) { + final _ret = _lib._objc_msgSend_474(_id, + _lib._sel_initWithTarget_selector_object_1, target._id, sel, arg._id); + return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + } -const int errSSLPeerBadCert = -9825; + NSInvocationOperation initWithInvocation_(NSInvocation? inv) { + final _ret = _lib._objc_msgSend_475( + _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); + return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + } -const int errSSLPeerUnsupportedCert = -9826; + NSInvocation? get invocation { + final _ret = _lib._objc_msgSend_476(_id, _lib._sel_invocation1); + return _ret.address == 0 + ? null + : NSInvocation._(_ret, _lib, retain: true, release: true); + } -const int errSSLPeerCertRevoked = -9827; + NSObject get result { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_result1); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int errSSLPeerCertExpired = -9828; + static NSInvocationOperation new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInvocationOperation1, _lib._sel_new1); + return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + } -const int errSSLPeerCertUnknown = -9829; + static NSInvocationOperation alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSInvocationOperation1, _lib._sel_alloc1); + return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + } +} -const int errSSLIllegalParam = -9830; +final class _Dart_Isolate extends ffi.Opaque {} -const int errSSLPeerUnknownCA = -9831; +final class _Dart_IsolateGroup extends ffi.Opaque {} -const int errSSLPeerAccessDenied = -9832; +final class _Dart_Handle extends ffi.Opaque {} -const int errSSLPeerDecodeError = -9833; +final class _Dart_WeakPersistentHandle extends ffi.Opaque {} -const int errSSLPeerDecryptError = -9834; +final class _Dart_FinalizableHandle extends ffi.Opaque {} -const int errSSLPeerExportRestriction = -9835; +typedef Dart_WeakPersistentHandle = ffi.Pointer<_Dart_WeakPersistentHandle>; -const int errSSLPeerProtocolVersion = -9836; +/// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the +/// version when changing this struct. +typedef Dart_HandleFinalizer = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer isolate_callback_data, + ffi.Pointer peer)>>; +typedef Dart_FinalizableHandle = ffi.Pointer<_Dart_FinalizableHandle>; -const int errSSLPeerInsufficientSecurity = -9837; +final class Dart_IsolateFlags extends ffi.Struct { + @ffi.Int32() + external int version; -const int errSSLPeerInternalError = -9838; + @ffi.Bool() + external bool enable_asserts; -const int errSSLPeerUserCancelled = -9839; + @ffi.Bool() + external bool use_field_guards; -const int errSSLPeerNoRenegotiation = -9840; + @ffi.Bool() + external bool use_osr; -const int errSSLPeerAuthCompleted = -9841; + @ffi.Bool() + external bool obfuscate; -const int errSSLClientCertRequested = -9842; + @ffi.Bool() + external bool load_vmservice_library; -const int errSSLHostNameMismatch = -9843; + @ffi.Bool() + external bool copy_parent_code; -const int errSSLConnectionRefused = -9844; + @ffi.Bool() + external bool null_safety; -const int errSSLDecryptionFail = -9845; + @ffi.Bool() + external bool is_system_isolate; +} -const int errSSLBadRecordMac = -9846; +/// Forward declaration +final class Dart_CodeObserver extends ffi.Struct { + external ffi.Pointer data; -const int errSSLRecordOverflow = -9847; + external Dart_OnNewCodeCallback on_new_code; +} -const int errSSLBadConfiguration = -9848; +/// Callback provided by the embedder that is used by the VM to notify on code +/// object creation, *before* it is invoked the first time. +/// This is useful for embedders wanting to e.g. keep track of PCs beyond +/// the lifetime of the garbage collected code objects. +/// Note that an address range may be used by more than one code object over the +/// lifecycle of a process. Clients of this function should record timestamps for +/// these compilation events and when collecting PCs to disambiguate reused +/// address ranges. +typedef Dart_OnNewCodeCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer observer, + ffi.Pointer name, ffi.UintPtr base, ffi.UintPtr size)>>; -const int errSSLUnexpectedRecord = -9849; +/// Describes how to initialize the VM. Used with Dart_Initialize. +/// +/// \param version Identifies the version of the struct used by the client. +/// should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. +/// \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate +/// or NULL if no snapshot is provided. If provided, the buffer must remain +/// valid until Dart_Cleanup returns. +/// \param instructions_snapshot A buffer containing a snapshot of precompiled +/// instructions, or NULL if no snapshot is provided. If provided, the buffer +/// must remain valid until Dart_Cleanup returns. +/// \param initialize_isolate A function to be called during isolate +/// initialization inside an existing isolate group. +/// See Dart_InitializeIsolateCallback. +/// \param create_group A function to be called during isolate group creation. +/// See Dart_IsolateGroupCreateCallback. +/// \param shutdown A function to be called right before an isolate is shutdown. +/// See Dart_IsolateShutdownCallback. +/// \param cleanup A function to be called after an isolate was shutdown. +/// See Dart_IsolateCleanupCallback. +/// \param cleanup_group A function to be called after an isolate group is shutdown. +/// See Dart_IsolateGroupCleanupCallback. +/// \param get_service_assets A function to be called by the service isolate when +/// it requires the vmservice assets archive. +/// See Dart_GetVMServiceAssetsArchive. +/// \param code_observer An external code observer callback function. +/// The observer can be invoked as early as during the Dart_Initialize() call. +final class Dart_InitializeParams extends ffi.Struct { + @ffi.Int32() + external int version; -const int errSSLWeakPeerEphemeralDHKey = -9850; + external ffi.Pointer vm_snapshot_data; -const int errSSLClientHelloReceived = -9851; + external ffi.Pointer vm_snapshot_instructions; -const int errSSLTransportReset = -9852; + external Dart_IsolateGroupCreateCallback create_group; -const int errSSLNetworkTimeout = -9853; + external Dart_InitializeIsolateCallback initialize_isolate; -const int errSSLConfigurationFailed = -9854; + external Dart_IsolateShutdownCallback shutdown_isolate; -const int errSSLUnsupportedExtension = -9855; + external Dart_IsolateCleanupCallback cleanup_isolate; -const int errSSLUnexpectedMessage = -9856; + external Dart_IsolateGroupCleanupCallback cleanup_group; -const int errSSLDecompressFail = -9857; + external Dart_ThreadExitCallback thread_exit; -const int errSSLHandshakeFail = -9858; + external Dart_FileOpenCallback file_open; -const int errSSLDecodeError = -9859; + external Dart_FileReadCallback file_read; -const int errSSLInappropriateFallback = -9860; + external Dart_FileWriteCallback file_write; -const int errSSLMissingExtension = -9861; + external Dart_FileCloseCallback file_close; -const int errSSLBadCertificateStatusResponse = -9862; + external Dart_EntropySource entropy_source; -const int errSSLCertificateRequired = -9863; + external Dart_GetVMServiceAssetsArchive get_service_assets; -const int errSSLUnknownPSKIdentity = -9864; + @ffi.Bool() + external bool start_kernel_isolate; -const int errSSLUnrecognizedName = -9865; + external ffi.Pointer code_observer; +} -const int errSSLATSViolation = -9880; +/// An isolate creation and initialization callback function. +/// +/// This callback, provided by the embedder, is called when the VM +/// needs to create an isolate. The callback should create an isolate +/// by calling Dart_CreateIsolateGroup and load any scripts required for +/// execution. +/// +/// This callback may be called on a different thread than the one +/// running the parent isolate. +/// +/// When the function returns NULL, it is the responsibility of this +/// function to ensure that Dart_ShutdownIsolate has been called if +/// required (for example, if the isolate was created successfully by +/// Dart_CreateIsolateGroup() but the root library fails to load +/// successfully, then the function should call Dart_ShutdownIsolate +/// before returning). +/// +/// When the function returns NULL, the function should set *error to +/// a malloc-allocated buffer containing a useful error message. The +/// caller of this function (the VM) will make sure that the buffer is +/// freed. +/// +/// \param script_uri The uri of the main source file or snapshot to load. +/// Either the URI of the parent isolate set in Dart_CreateIsolateGroup for +/// Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the +/// library tag handler of the parent isolate. +/// The callback is responsible for loading the program by a call to +/// Dart_LoadScriptFromKernel. +/// \param main The name of the main entry point this isolate will +/// eventually run. This is provided for advisory purposes only to +/// improve debugging messages. The main function is not invoked by +/// this function. +/// \param package_root Ignored. +/// \param package_config Uri of the package configuration file (either in format +/// of .packages or .dart_tool/package_config.json) for this isolate +/// to resolve package imports against. If this parameter is not passed the +/// package resolution of the parent isolate should be used. +/// \param flags Default flags for this isolate being spawned. Either inherited +/// from the spawning isolate or passed as parameters when spawning the +/// isolate from Dart code. +/// \param isolate_data The isolate data which was passed to the +/// parent isolate when it was created by calling Dart_CreateIsolateGroup(). +/// \param error A structure into which the embedder can place a +/// C string containing an error message in the case of failures. +/// +/// \return The embedder returns NULL if the creation and +/// initialization was not successful and the isolate if successful. +typedef Dart_IsolateGroupCreateCallback = ffi.Pointer< + ffi.NativeFunction< + Dart_Isolate Function( + ffi.Pointer script_uri, + ffi.Pointer main, + ffi.Pointer package_root, + ffi.Pointer package_config, + ffi.Pointer flags, + ffi.Pointer isolate_data, + ffi.Pointer> error)>>; -const int errSSLATSMinimumVersionViolation = -9881; +/// An isolate is the unit of concurrency in Dart. Each isolate has +/// its own memory and thread of control. No state is shared between +/// isolates. Instead, isolates communicate by message passing. +/// +/// Each thread keeps track of its current isolate, which is the +/// isolate which is ready to execute on the current thread. The +/// current isolate may be NULL, in which case no isolate is ready to +/// execute. Most of the Dart apis require there to be a current +/// isolate in order to function without error. The current isolate is +/// set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. +typedef Dart_Isolate = ffi.Pointer<_Dart_Isolate>; -const int errSSLATSCiphersuiteViolation = -9882; +/// An isolate initialization callback function. +/// +/// This callback, provided by the embedder, is called when the VM has created an +/// isolate within an existing isolate group (i.e. from the same source as an +/// existing isolate). +/// +/// The callback should setup native resolvers and might want to set a custom +/// message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as +/// runnable. +/// +/// This callback may be called on a different thread than the one +/// running the parent isolate. +/// +/// When the function returns `false`, it is the responsibility of this +/// function to ensure that `Dart_ShutdownIsolate` has been called. +/// +/// When the function returns `false`, the function should set *error to +/// a malloc-allocated buffer containing a useful error message. The +/// caller of this function (the VM) will make sure that the buffer is +/// freed. +/// +/// \param child_isolate_data The callback data to associate with the new +/// child isolate. +/// \param error A structure into which the embedder can place a +/// C string containing an error message in the case the initialization fails. +/// +/// \return The embedder returns true if the initialization was successful and +/// false otherwise (in which case the VM will terminate the isolate). +typedef Dart_InitializeIsolateCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer> child_isolate_data, + ffi.Pointer> error)>>; -const int errSSLATSMinimumKeySizeViolation = -9883; +/// An isolate shutdown callback function. +/// +/// This callback, provided by the embedder, is called before the vm +/// shuts down an isolate. The isolate being shutdown will be the current +/// isolate. It is safe to run Dart code. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +/// \param isolate_data The same callback data which was passed to the isolate +/// when it was created. +typedef Dart_IsolateShutdownCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data)>>; -const int errSSLATSLeafCertificateHashAlgorithmViolation = -9884; +/// An isolate cleanup callback function. +/// +/// This callback, provided by the embedder, is called after the vm +/// shuts down an isolate. There will be no current isolate and it is *not* +/// safe to run Dart code. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +/// \param isolate_data The same callback data which was passed to the isolate +/// when it was created. +typedef Dart_IsolateCleanupCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data)>>; -const int errSSLATSCertificateHashAlgorithmViolation = -9885; +/// An isolate group cleanup callback function. +/// +/// This callback, provided by the embedder, is called after the vm +/// shuts down an isolate group. +/// +/// This function should be used to dispose of native resources that +/// are allocated to an isolate in order to avoid leaks. +/// +/// \param isolate_group_data The same callback data which was passed to the +/// isolate group when it was created. +typedef Dart_IsolateGroupCleanupCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer isolate_group_data)>>; -const int errSSLATSCertificateTrustViolation = -9886; +/// A thread death callback function. +/// This callback, provided by the embedder, is called before a thread in the +/// vm thread pool exits. +/// This function could be used to dispose of native resources that +/// are associated and attached to the thread, in order to avoid leaks. +typedef Dart_ThreadExitCallback + = ffi.Pointer>; -const int errSSLEarlyDataRejected = -9890; +/// Callbacks provided by the embedder for file operations. If the +/// embedder does not allow file operations these callbacks can be +/// NULL. +/// +/// Dart_FileOpenCallback - opens a file for reading or writing. +/// \param name The name of the file to open. +/// \param write A boolean variable which indicates if the file is to +/// opened for writing. If there is an existing file it needs to truncated. +/// +/// Dart_FileReadCallback - Read contents of file. +/// \param data Buffer allocated in the callback into which the contents +/// of the file are read into. It is the responsibility of the caller to +/// free this buffer. +/// \param file_length A variable into which the length of the file is returned. +/// In the case of an error this value would be -1. +/// \param stream Handle to the opened file. +/// +/// Dart_FileWriteCallback - Write data into file. +/// \param data Buffer which needs to be written into the file. +/// \param length Length of the buffer. +/// \param stream Handle to the opened file. +/// +/// Dart_FileCloseCallback - Closes the opened file. +/// \param stream Handle to the opened file. +typedef Dart_FileOpenCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer name, ffi.Bool write)>>; +typedef Dart_FileReadCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer> data, + ffi.Pointer file_length, + ffi.Pointer stream)>>; +typedef Dart_FileWriteCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer data, ffi.IntPtr length, + ffi.Pointer stream)>>; +typedef Dart_FileCloseCallback = ffi.Pointer< + ffi.NativeFunction stream)>>; +typedef Dart_EntropySource = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer buffer, ffi.IntPtr length)>>; -const int OSUnknownByteOrder = 0; +/// Callback provided by the embedder that is used by the vmservice isolate +/// to request the asset archive. The asset archive must be an uncompressed tar +/// archive that is stored in a Uint8List. +/// +/// If the embedder has no vmservice isolate assets, the callback can be NULL. +/// +/// \return The embedder must return a handle to a Uint8List containing an +/// uncompressed tar archive or null. +typedef Dart_GetVMServiceAssetsArchive + = ffi.Pointer>; +typedef Dart_IsolateGroup = ffi.Pointer<_Dart_IsolateGroup>; -const int OSLittleEndian = 1; +/// A message notification callback. +/// +/// This callback allows the embedder to provide an alternate wakeup +/// mechanism for the delivery of inter-isolate messages. It is the +/// responsibility of the embedder to call Dart_HandleMessage to +/// process the message. +typedef Dart_MessageNotifyCallback = ffi + .Pointer>; -const int OSBigEndian = 2; +/// A port is used to send or receive inter-isolate messages +typedef Dart_Port = ffi.Int64; -const int kCFNotificationDeliverImmediately = 1; +abstract class Dart_CoreType_Id { + static const int Dart_CoreType_Dynamic = 0; + static const int Dart_CoreType_Int = 1; + static const int Dart_CoreType_String = 2; +} -const int kCFNotificationPostToAllSessions = 2; +/// ========== +/// Typed Data +/// ========== +abstract class Dart_TypedData_Type { + static const int Dart_TypedData_kByteData = 0; + static const int Dart_TypedData_kInt8 = 1; + static const int Dart_TypedData_kUint8 = 2; + static const int Dart_TypedData_kUint8Clamped = 3; + static const int Dart_TypedData_kInt16 = 4; + static const int Dart_TypedData_kUint16 = 5; + static const int Dart_TypedData_kInt32 = 6; + static const int Dart_TypedData_kUint32 = 7; + static const int Dart_TypedData_kInt64 = 8; + static const int Dart_TypedData_kUint64 = 9; + static const int Dart_TypedData_kFloat32 = 10; + static const int Dart_TypedData_kFloat64 = 11; + static const int Dart_TypedData_kInt32x4 = 12; + static const int Dart_TypedData_kFloat32x4 = 13; + static const int Dart_TypedData_kFloat64x2 = 14; + static const int Dart_TypedData_kInvalid = 15; +} -const int kCFCalendarComponentsWrap = 1; +final class _Dart_NativeArguments extends ffi.Opaque {} -const int kCFSocketAutomaticallyReenableReadCallBack = 1; +/// The arguments to a native function. +/// +/// This object is passed to a native function to represent its +/// arguments and return value. It allows access to the arguments to a +/// native function by index. It also allows the return value of a +/// native function to be set. +typedef Dart_NativeArguments = ffi.Pointer<_Dart_NativeArguments>; -const int kCFSocketAutomaticallyReenableAcceptCallBack = 2; +abstract class Dart_NativeArgument_Type { + static const int Dart_NativeArgument_kBool = 0; + static const int Dart_NativeArgument_kInt32 = 1; + static const int Dart_NativeArgument_kUint32 = 2; + static const int Dart_NativeArgument_kInt64 = 3; + static const int Dart_NativeArgument_kUint64 = 4; + static const int Dart_NativeArgument_kDouble = 5; + static const int Dart_NativeArgument_kString = 6; + static const int Dart_NativeArgument_kInstance = 7; + static const int Dart_NativeArgument_kNativeFields = 8; +} -const int kCFSocketAutomaticallyReenableDataCallBack = 3; +final class _Dart_NativeArgument_Descriptor extends ffi.Struct { + @ffi.Uint8() + external int type; -const int kCFSocketAutomaticallyReenableWriteCallBack = 8; + @ffi.Uint8() + external int index; +} -const int kCFSocketLeaveErrors = 64; +final class _Dart_NativeArgument_Value extends ffi.Opaque {} -const int kCFSocketCloseOnInvalidate = 128; +typedef Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor; +typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; -const int DISPATCH_WALLTIME_NOW = -2; +/// An environment lookup callback function. +/// +/// \param name The name of the value to lookup in the environment. +/// +/// \return A valid handle to a string if the name exists in the +/// current environment or Dart_Null() if not. +typedef Dart_EnvironmentCallback + = ffi.Pointer>; -const int kCFPropertyListReadCorruptError = 3840; +/// Native entry resolution callback. +/// +/// For libraries and scripts which have native functions, the embedder +/// can provide a native entry resolver. This callback is used to map a +/// name/arity to a Dart_NativeFunction. If no function is found, the +/// callback should return NULL. +/// +/// The parameters to the native resolver function are: +/// \param name a Dart string which is the name of the native function. +/// \param num_of_arguments is the number of arguments expected by the +/// native function. +/// \param auto_setup_scope is a boolean flag that can be set by the resolver +/// to indicate if this function needs a Dart API scope (see Dart_EnterScope/ +/// Dart_ExitScope) to be setup automatically by the VM before calling into +/// the native function. By default most native functions would require this +/// to be true but some light weight native functions which do not call back +/// into the VM through the Dart API may not require a Dart scope to be +/// setup automatically. +/// +/// \return A valid Dart_NativeFunction which resolves to a native entry point +/// for the native function. +/// +/// See Dart_SetNativeResolver. +typedef Dart_NativeEntryResolver = ffi.Pointer< + ffi.NativeFunction< + Dart_NativeFunction Function(ffi.Handle name, ffi.Int num_of_arguments, + ffi.Pointer auto_setup_scope)>>; -const int kCFPropertyListReadUnknownVersionError = 3841; +/// A native function. +typedef Dart_NativeFunction = ffi.Pointer< + ffi.NativeFunction>; -const int kCFPropertyListReadStreamError = 3842; +/// Native entry symbol lookup callback. +/// +/// For libraries and scripts which have native functions, the embedder +/// can provide a callback for mapping a native entry to a symbol. This callback +/// maps a native function entry PC to the native function name. If no native +/// entry symbol can be found, the callback should return NULL. +/// +/// The parameters to the native reverse resolver function are: +/// \param nf A Dart_NativeFunction. +/// +/// \return A const UTF-8 string containing the symbol name or NULL. +/// +/// See Dart_SetNativeResolver. +typedef Dart_NativeEntrySymbol = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(Dart_NativeFunction nf)>>; -const int kCFPropertyListWriteStreamError = 3851; +/// FFI Native C function pointer resolver callback. +/// +/// See Dart_SetFfiNativeResolver. +typedef Dart_FfiNativeResolver = ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer name, ffi.UintPtr args_n)>>; -const int kCFBundleExecutableArchitectureI386 = 7; +/// ===================== +/// Scripts and Libraries +/// ===================== +abstract class Dart_LibraryTag { + static const int Dart_kCanonicalizeUrl = 0; + static const int Dart_kImportTag = 1; + static const int Dart_kKernelTag = 2; +} -const int kCFBundleExecutableArchitecturePPC = 18; +/// The library tag handler is a multi-purpose callback provided by the +/// embedder to the Dart VM. The embedder implements the tag handler to +/// provide the ability to load Dart scripts and imports. +/// +/// -- TAGS -- +/// +/// Dart_kCanonicalizeUrl +/// +/// This tag indicates that the embedder should canonicalize 'url' with +/// respect to 'library'. For most embedders, the +/// Dart_DefaultCanonicalizeUrl function is a sufficient implementation +/// of this tag. The return value should be a string holding the +/// canonicalized url. +/// +/// Dart_kImportTag +/// +/// This tag is used to load a library from IsolateMirror.loadUri. The embedder +/// should call Dart_LoadLibraryFromKernel to provide the library to the VM. The +/// return value should be an error or library (the result from +/// Dart_LoadLibraryFromKernel). +/// +/// Dart_kKernelTag +/// +/// This tag is used to load the intermediate file (kernel) generated by +/// the Dart front end. This tag is typically used when a 'hot-reload' +/// of an application is needed and the VM is 'use dart front end' mode. +/// The dart front end typically compiles all the scripts, imports and part +/// files into one intermediate file hence we don't use the source/import or +/// script tags. The return value should be an error or a TypedData containing +/// the kernel bytes. +typedef Dart_LibraryTagHandler = ffi.Pointer< + ffi.NativeFunction< + ffi.Handle Function(ffi.Int32 tag, + ffi.Handle library_or_package_map_url, ffi.Handle url)>>; -const int kCFBundleExecutableArchitectureX86_64 = 16777223; +/// Handles deferred loading requests. When this handler is invoked, it should +/// eventually load the deferred loading unit with the given id and call +/// Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is +/// recommended that the loading occur asynchronously, but it is permitted to +/// call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the +/// handler returns. +/// +/// If an error is returned, it will be propogated through +/// `prefix.loadLibrary()`. This is useful for synchronous +/// implementations, which must propogate any unwind errors from +/// Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler +/// should return a non-error such as `Dart_Null()`. +typedef Dart_DeferredLoadHandler = ffi.Pointer< + ffi.NativeFunction>; -const int kCFBundleExecutableArchitecturePPC64 = 16777234; +/// TODO(33433): Remove kernel service from the embedding API. +abstract class Dart_KernelCompilationStatus { + static const int Dart_KernelCompilationStatus_Unknown = -1; + static const int Dart_KernelCompilationStatus_Ok = 0; + static const int Dart_KernelCompilationStatus_Error = 1; + static const int Dart_KernelCompilationStatus_Crash = 2; + static const int Dart_KernelCompilationStatus_MsgFailed = 3; +} -const int kCFBundleExecutableArchitectureARM64 = 16777228; +final class Dart_KernelCompilationResult extends ffi.Struct { + @ffi.Int32() + external int status; -const int kCFMessagePortSuccess = 0; + @ffi.Bool() + external bool null_safety; -const int kCFMessagePortSendTimeout = -1; + external ffi.Pointer error; -const int kCFMessagePortReceiveTimeout = -2; + external ffi.Pointer kernel; -const int kCFMessagePortIsInvalid = -3; + @ffi.IntPtr() + external int kernel_size; +} -const int kCFMessagePortTransportError = -4; +abstract class Dart_KernelCompilationVerbosityLevel { + static const int Dart_KernelCompilationVerbosityLevel_Error = 0; + static const int Dart_KernelCompilationVerbosityLevel_Warning = 1; + static const int Dart_KernelCompilationVerbosityLevel_Info = 2; + static const int Dart_KernelCompilationVerbosityLevel_All = 3; +} -const int kCFMessagePortBecameInvalidError = -5; +final class Dart_SourceFile extends ffi.Struct { + external ffi.Pointer uri; -const int kCFStringTokenizerUnitWord = 0; + external ffi.Pointer source; +} -const int kCFStringTokenizerUnitSentence = 1; +typedef Dart_StreamingWriteCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer callback_data, + ffi.Pointer buffer, ffi.IntPtr size)>>; +typedef Dart_CreateLoadingUnitCallback = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer callback_data, + ffi.IntPtr loading_unit_id, + ffi.Pointer> write_callback_data, + ffi.Pointer> write_debug_callback_data)>>; +typedef Dart_StreamingCloseCallback = ffi.Pointer< + ffi.NativeFunction callback_data)>>; -const int kCFStringTokenizerUnitParagraph = 2; +/// A Dart_CObject is used for representing Dart objects as native C +/// data outside the Dart heap. These objects are totally detached from +/// the Dart heap. Only a subset of the Dart objects have a +/// representation as a Dart_CObject. +/// +/// The string encoding in the 'value.as_string' is UTF-8. +/// +/// All the different types from dart:typed_data are exposed as type +/// kTypedData. The specific type from dart:typed_data is in the type +/// field of the as_typed_data structure. The length in the +/// as_typed_data structure is always in bytes. +/// +/// The data for kTypedData is copied on message send and ownership remains with +/// the caller. The ownership of data for kExternalTyped is passed to the VM on +/// message send and returned when the VM invokes the +/// Dart_HandleFinalizer callback; a non-NULL callback must be provided. +abstract class Dart_CObject_Type { + static const int Dart_CObject_kNull = 0; + static const int Dart_CObject_kBool = 1; + static const int Dart_CObject_kInt32 = 2; + static const int Dart_CObject_kInt64 = 3; + static const int Dart_CObject_kDouble = 4; + static const int Dart_CObject_kString = 5; + static const int Dart_CObject_kArray = 6; + static const int Dart_CObject_kTypedData = 7; + static const int Dart_CObject_kExternalTypedData = 8; + static const int Dart_CObject_kSendPort = 9; + static const int Dart_CObject_kCapability = 10; + static const int Dart_CObject_kNativePointer = 11; + static const int Dart_CObject_kUnsupported = 12; + static const int Dart_CObject_kNumberOfTypes = 13; +} -const int kCFStringTokenizerUnitLineBreak = 3; +final class _Dart_CObject extends ffi.Struct { + @ffi.Int32() + external int type; -const int kCFStringTokenizerUnitWordBoundary = 4; + external UnnamedUnion6 value; +} -const int kCFStringTokenizerAttributeLatinTranscription = 65536; +final class UnnamedUnion6 extends ffi.Union { + @ffi.Bool() + external bool as_bool; -const int kCFStringTokenizerAttributeLanguage = 131072; + @ffi.Int32() + external int as_int32; -const int kCFFileDescriptorReadCallBack = 1; + @ffi.Int64() + external int as_int64; -const int kCFFileDescriptorWriteCallBack = 2; + @ffi.Double() + external double as_double; -const int kCFUserNotificationStopAlertLevel = 0; + external ffi.Pointer as_string; -const int kCFUserNotificationNoteAlertLevel = 1; + external UnnamedStruct5 as_send_port; -const int kCFUserNotificationCautionAlertLevel = 2; + external UnnamedStruct6 as_capability; -const int kCFUserNotificationPlainAlertLevel = 3; + external UnnamedStruct7 as_array; -const int kCFUserNotificationDefaultResponse = 0; + external UnnamedStruct8 as_typed_data; -const int kCFUserNotificationAlternateResponse = 1; + external UnnamedStruct9 as_external_typed_data; -const int kCFUserNotificationOtherResponse = 2; + external UnnamedStruct10 as_native_pointer; +} -const int kCFUserNotificationCancelResponse = 3; +final class UnnamedStruct5 extends ffi.Struct { + @Dart_Port() + external int id; -const int kCFUserNotificationNoDefaultButtonFlag = 32; + @Dart_Port() + external int origin_id; +} -const int kCFUserNotificationUseRadioButtonsFlag = 64; +final class UnnamedStruct6 extends ffi.Struct { + @ffi.Int64() + external int id; +} -const int kCFXMLNodeCurrentVersion = 1; +final class UnnamedStruct7 extends ffi.Struct { + @ffi.IntPtr() + external int length; -const int CSSM_INVALID_HANDLE = 0; + external ffi.Pointer> values; +} -const int CSSM_FALSE = 0; +final class UnnamedStruct8 extends ffi.Struct { + @ffi.Int32() + external int type; -const int CSSM_TRUE = 1; + /// in elements, not bytes + @ffi.IntPtr() + external int length; -const int CSSM_OK = 0; + external ffi.Pointer values; +} -const int CSSM_MODULE_STRING_SIZE = 64; +final class UnnamedStruct9 extends ffi.Struct { + @ffi.Int32() + external int type; -const int CSSM_KEY_HIERARCHY_NONE = 0; + /// in elements, not bytes + @ffi.IntPtr() + external int length; -const int CSSM_KEY_HIERARCHY_INTEG = 1; + external ffi.Pointer data; -const int CSSM_KEY_HIERARCHY_EXPORT = 2; + external ffi.Pointer peer; -const int CSSM_PVC_NONE = 0; + external Dart_HandleFinalizer callback; +} -const int CSSM_PVC_APP = 1; +final class UnnamedStruct10 extends ffi.Struct { + @ffi.IntPtr() + external int ptr; -const int CSSM_PVC_SP = 2; + @ffi.IntPtr() + external int size; -const int CSSM_PRIVILEGE_SCOPE_NONE = 0; + external Dart_HandleFinalizer callback; +} -const int CSSM_PRIVILEGE_SCOPE_PROCESS = 1; +typedef Dart_CObject = _Dart_CObject; -const int CSSM_PRIVILEGE_SCOPE_THREAD = 2; +/// A native message handler. +/// +/// This handler is associated with a native port by calling +/// Dart_NewNativePort. +/// +/// The message received is decoded into the message structure. The +/// lifetime of the message data is controlled by the caller. All the +/// data references from the message are allocated by the caller and +/// will be reclaimed when returning to it. +typedef Dart_NativeMessageHandler = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + Dart_Port dest_port_id, ffi.Pointer message)>>; +typedef Dart_PostCObject_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + Dart_Port_DL port_id, ffi.Pointer message)>>; -const int CSSM_SERVICE_CSSM = 1; +/// ============================================================================ +/// IMPORTANT! Never update these signatures without properly updating +/// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. +/// +/// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types +/// to trigger compile-time errors if the sybols in those files are updated +/// without updating these. +/// +/// Function return and argument types, and typedefs are carbon copied. Structs +/// are typechecked nominally in C/C++, so they are not copied, instead a +/// comment is added to their definition. +typedef Dart_Port_DL = ffi.Int64; +typedef Dart_PostInteger_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(Dart_Port_DL port_id, ffi.Int64 message)>>; +typedef Dart_NewNativePort_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_Port_DL Function( + ffi.Pointer name, + Dart_NativeMessageHandler_DL handler, + ffi.Bool handle_concurrently)>>; +typedef Dart_NativeMessageHandler_DL = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + Dart_Port_DL dest_port_id, ffi.Pointer message)>>; +typedef Dart_CloseNativePort_Type = ffi.Pointer< + ffi.NativeFunction>; +typedef Dart_IsError_Type + = ffi.Pointer>; +typedef Dart_IsApiError_Type + = ffi.Pointer>; +typedef Dart_IsUnhandledExceptionError_Type + = ffi.Pointer>; +typedef Dart_IsCompilationError_Type + = ffi.Pointer>; +typedef Dart_IsFatalError_Type + = ffi.Pointer>; +typedef Dart_GetError_Type = ffi.Pointer< + ffi.NativeFunction Function(ffi.Handle handle)>>; +typedef Dart_ErrorHasException_Type + = ffi.Pointer>; +typedef Dart_ErrorGetException_Type + = ffi.Pointer>; +typedef Dart_ErrorGetStackTrace_Type + = ffi.Pointer>; +typedef Dart_NewApiError_Type = ffi.Pointer< + ffi.NativeFunction error)>>; +typedef Dart_NewCompilationError_Type = ffi.Pointer< + ffi.NativeFunction error)>>; +typedef Dart_NewUnhandledExceptionError_Type = ffi + .Pointer>; +typedef Dart_PropagateError_Type + = ffi.Pointer>; +typedef Dart_HandleFromPersistent_Type + = ffi.Pointer>; +typedef Dart_HandleFromWeakPersistent_Type = ffi.Pointer< + ffi.NativeFunction>; +typedef Dart_NewPersistentHandle_Type + = ffi.Pointer>; +typedef Dart_SetPersistentHandle_Type = ffi.Pointer< + ffi.NativeFunction>; +typedef Dart_DeletePersistentHandle_Type + = ffi.Pointer>; +typedef Dart_NewWeakPersistentHandle_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_WeakPersistentHandle Function( + ffi.Handle object, + ffi.Pointer peer, + ffi.IntPtr external_allocation_size, + Dart_HandleFinalizer callback)>>; +typedef Dart_DeleteWeakPersistentHandle_Type = ffi.Pointer< + ffi.NativeFunction>; +typedef Dart_UpdateExternalSize_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(Dart_WeakPersistentHandle object, + ffi.IntPtr external_allocation_size)>>; +typedef Dart_NewFinalizableHandle_Type = ffi.Pointer< + ffi.NativeFunction< + Dart_FinalizableHandle Function( + ffi.Handle object, + ffi.Pointer peer, + ffi.IntPtr external_allocation_size, + Dart_HandleFinalizer callback)>>; +typedef Dart_DeleteFinalizableHandle_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + Dart_FinalizableHandle object, ffi.Handle strong_ref_to_object)>>; +typedef Dart_UpdateFinalizableExternalSize_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + Dart_FinalizableHandle object, + ffi.Handle strong_ref_to_object, + ffi.IntPtr external_allocation_size)>>; +typedef Dart_Post_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(Dart_Port_DL port_id, ffi.Handle object)>>; +typedef Dart_NewSendPort_Type = ffi + .Pointer>; +typedef Dart_SendPortGetId_Type = ffi.Pointer< + ffi.NativeFunction< + ffi.Handle Function( + ffi.Handle port, ffi.Pointer port_id)>>; +typedef Dart_EnterScope_Type + = ffi.Pointer>; +typedef Dart_ExitScope_Type + = ffi.Pointer>; -const int CSSM_SERVICE_CSP = 2; +/// The type of message being sent to a Dart port. See CUPHTTPClientDelegate. +abstract class MessageType { + static const int ResponseMessage = 0; + static const int DataMessage = 1; + static const int CompletedMessage = 2; + static const int RedirectMessage = 3; + static const int FinishedDownloading = 4; +} -const int CSSM_SERVICE_DL = 4; +/// The configuration associated with a NSURLSessionTask. +/// See CUPHTTPClientDelegate. +class CUPHTTPTaskConfiguration extends NSObject { + CUPHTTPTaskConfiguration._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_SERVICE_CL = 8; + /// Returns a [CUPHTTPTaskConfiguration] that points to the same underlying object as [other]. + static CUPHTTPTaskConfiguration castFrom(T other) { + return CUPHTTPTaskConfiguration._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_SERVICE_TP = 16; + /// Returns a [CUPHTTPTaskConfiguration] that wraps the given raw object pointer. + static CUPHTTPTaskConfiguration castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPTaskConfiguration._(other, lib, + retain: retain, release: release); + } -const int CSSM_SERVICE_AC = 32; + /// Returns whether [obj] is an instance of [CUPHTTPTaskConfiguration]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPTaskConfiguration1); + } -const int CSSM_SERVICE_KR = 64; + NSObject initWithPort_(int sendPort) { + final _ret = + _lib._objc_msgSend_477(_id, _lib._sel_initWithPort_1, sendPort); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_NOTIFY_INSERT = 1; + int get sendPort { + return _lib._objc_msgSend_329(_id, _lib._sel_sendPort1); + } -const int CSSM_NOTIFY_REMOVE = 2; + static CUPHTTPTaskConfiguration new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_new1); + return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + } -const int CSSM_NOTIFY_FAULT = 3; + static CUPHTTPTaskConfiguration alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_alloc1); + return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_ATTACH_READ_ONLY = 1; +/// A delegate for NSURLSession that forwards events for registered +/// NSURLSessionTasks and forwards them to a port for consumption in Dart. +/// +/// The messages sent to the port are contained in a List with one of 3 +/// possible formats: +/// +/// 1. When the delegate receives a HTTP redirect response: +/// [MessageType::RedirectMessage, ] +/// +/// 2. When the delegate receives a HTTP response: +/// [MessageType::ResponseMessage, ] +/// +/// 3. When the delegate receives some HTTP data: +/// [MessageType::DataMessage, ] +/// +/// 4. When the delegate is informed that the response is complete: +/// [MessageType::CompletedMessage, ] +class CUPHTTPClientDelegate extends NSObject { + CUPHTTPClientDelegate._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_USEE_LAST = 255; + /// Returns a [CUPHTTPClientDelegate] that points to the same underlying object as [other]. + static CUPHTTPClientDelegate castFrom(T other) { + return CUPHTTPClientDelegate._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_USEE_NONE = 0; + /// Returns a [CUPHTTPClientDelegate] that wraps the given raw object pointer. + static CUPHTTPClientDelegate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPClientDelegate._(other, lib, + retain: retain, release: release); + } -const int CSSM_USEE_DOMESTIC = 1; + /// Returns whether [obj] is an instance of [CUPHTTPClientDelegate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPClientDelegate1); + } -const int CSSM_USEE_FINANCIAL = 2; + /// Instruct the delegate to forward events for the given task to the port + /// specified in the configuration. + void registerTask_withConfiguration_( + NSURLSessionTask? task, CUPHTTPTaskConfiguration? config) { + return _lib._objc_msgSend_478( + _id, + _lib._sel_registerTask_withConfiguration_1, + task?._id ?? ffi.nullptr, + config?._id ?? ffi.nullptr); + } -const int CSSM_USEE_KRLE = 3; + static CUPHTTPClientDelegate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPClientDelegate1, _lib._sel_new1); + return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + } -const int CSSM_USEE_KRENT = 4; + static CUPHTTPClientDelegate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPClientDelegate1, _lib._sel_alloc1); + return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_USEE_SSL = 5; +/// An object used to communicate redirect information to Dart code. +/// +/// The flow is: +/// 1. CUPHTTPClientDelegate receives a message from the URL Loading System. +/// 2. CUPHTTPClientDelegate creates a new CUPHTTPForwardedDelegate subclass. +/// 3. CUPHTTPClientDelegate sends the CUPHTTPForwardedDelegate to the +/// configured Dart_Port. +/// 4. CUPHTTPClientDelegate waits on CUPHTTPForwardedDelegate.lock +/// 5. When the Dart code is done process the message received on the port, +/// it calls [CUPHTTPForwardedDelegate finish*], which releases the lock. +/// 6. CUPHTTPClientDelegate continues running. +class CUPHTTPForwardedDelegate extends NSObject { + CUPHTTPForwardedDelegate._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_USEE_AUTHENTICATION = 6; + /// Returns a [CUPHTTPForwardedDelegate] that points to the same underlying object as [other]. + static CUPHTTPForwardedDelegate castFrom(T other) { + return CUPHTTPForwardedDelegate._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_USEE_KEYEXCH = 7; + /// Returns a [CUPHTTPForwardedDelegate] that wraps the given raw object pointer. + static CUPHTTPForwardedDelegate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedDelegate._(other, lib, + retain: retain, release: release); + } -const int CSSM_USEE_MEDICAL = 8; + /// Returns whether [obj] is an instance of [CUPHTTPForwardedDelegate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedDelegate1); + } -const int CSSM_USEE_INSURANCE = 9; + NSObject initWithSession_task_( + NSURLSession? session, NSURLSessionTask? task) { + final _ret = _lib._objc_msgSend_479(_id, _lib._sel_initWithSession_task_1, + session?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_USEE_WEAK = 10; + /// Indicates that the task should continue executing using the given request. + void finish() { + return _lib._objc_msgSend_1(_id, _lib._sel_finish1); + } -const int CSSM_ADDR_NONE = 0; + NSURLSession? get session { + final _ret = _lib._objc_msgSend_387(_id, _lib._sel_session1); + return _ret.address == 0 + ? null + : NSURLSession._(_ret, _lib, retain: true, release: true); + } -const int CSSM_ADDR_CUSTOM = 1; + NSURLSessionTask? get task { + final _ret = _lib._objc_msgSend_480(_id, _lib._sel_task1); + return _ret.address == 0 + ? null + : NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } -const int CSSM_ADDR_URL = 2; + /// This property is meant to be used only by CUPHTTPClientDelegate. + NSLock? get lock { + final _ret = _lib._objc_msgSend_481(_id, _lib._sel_lock1); + return _ret.address == 0 + ? null + : NSLock._(_ret, _lib, retain: true, release: true); + } -const int CSSM_ADDR_SOCKADDR = 3; + static CUPHTTPForwardedDelegate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_new1); + return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + } -const int CSSM_ADDR_NAME = 4; + static CUPHTTPForwardedDelegate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_alloc1); + return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_NET_PROTO_NONE = 0; +class NSLock extends _ObjCWrapper { + NSLock._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_NET_PROTO_CUSTOM = 1; + /// Returns a [NSLock] that points to the same underlying object as [other]. + static NSLock castFrom(T other) { + return NSLock._(other._id, other._lib, retain: true, release: true); + } -const int CSSM_NET_PROTO_UNSPECIFIED = 2; + /// Returns a [NSLock] that wraps the given raw object pointer. + static NSLock castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSLock._(other, lib, retain: retain, release: release); + } -const int CSSM_NET_PROTO_LDAP = 3; + /// Returns whether [obj] is an instance of [NSLock]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLock1); + } +} -const int CSSM_NET_PROTO_LDAPS = 4; +class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedRedirect._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_NET_PROTO_LDAPNS = 5; + /// Returns a [CUPHTTPForwardedRedirect] that points to the same underlying object as [other]. + static CUPHTTPForwardedRedirect castFrom(T other) { + return CUPHTTPForwardedRedirect._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_NET_PROTO_X500DAP = 6; + /// Returns a [CUPHTTPForwardedRedirect] that wraps the given raw object pointer. + static CUPHTTPForwardedRedirect castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedRedirect._(other, lib, + retain: retain, release: release); + } -const int CSSM_NET_PROTO_FTP = 7; + /// Returns whether [obj] is an instance of [CUPHTTPForwardedRedirect]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedRedirect1); + } -const int CSSM_NET_PROTO_FTPS = 8; + NSObject initWithSession_task_response_request_( + NSURLSession? session, + NSURLSessionTask? task, + NSHTTPURLResponse? response, + NSURLRequest? request) { + final _ret = _lib._objc_msgSend_482( + _id, + _lib._sel_initWithSession_task_response_request_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + response?._id ?? ffi.nullptr, + request?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_NET_PROTO_OCSP = 9; + /// Indicates that the task should continue executing using the given request. + /// If the request is NIL then the redirect is not followed and the task is + /// complete. + void finishWithRequest_(NSURLRequest? request) { + return _lib._objc_msgSend_483( + _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); + } -const int CSSM_NET_PROTO_CMP = 10; + NSHTTPURLResponse? get response { + final _ret = _lib._objc_msgSend_484(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + } -const int CSSM_NET_PROTO_CMPS = 11; + NSURLRequest? get request { + final _ret = _lib._objc_msgSend_377(_id, _lib._sel_request1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID__UNK_ = -1; + /// This property is meant to be used only by CUPHTTPClientDelegate. + NSURLRequest? get redirectRequest { + final _ret = _lib._objc_msgSend_377(_id, _lib._sel_redirectRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID__NLU_ = 0; + static CUPHTTPForwardedRedirect new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_new1); + return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + } -const int CSSM_WORDID__STAR_ = 1; + static CUPHTTPForwardedRedirect alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_alloc1); + return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_WORDID_A = 2; +class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedResponse._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_WORDID_ACL = 3; + /// Returns a [CUPHTTPForwardedResponse] that points to the same underlying object as [other]. + static CUPHTTPForwardedResponse castFrom(T other) { + return CUPHTTPForwardedResponse._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_WORDID_ALPHA = 4; + /// Returns a [CUPHTTPForwardedResponse] that wraps the given raw object pointer. + static CUPHTTPForwardedResponse castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedResponse._(other, lib, + retain: retain, release: release); + } -const int CSSM_WORDID_B = 5; + /// Returns whether [obj] is an instance of [CUPHTTPForwardedResponse]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedResponse1); + } -const int CSSM_WORDID_BER = 6; + NSObject initWithSession_task_response_( + NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { + final _ret = _lib._objc_msgSend_485( + _id, + _lib._sel_initWithSession_task_response_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + response?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_BINARY = 7; + void finishWithDisposition_(int disposition) { + return _lib._objc_msgSend_486( + _id, _lib._sel_finishWithDisposition_1, disposition); + } -const int CSSM_WORDID_BIOMETRIC = 8; + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_379(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_C = 9; + /// This property is meant to be used only by CUPHTTPClientDelegate. + int get disposition { + return _lib._objc_msgSend_487(_id, _lib._sel_disposition1); + } -const int CSSM_WORDID_CANCELED = 10; + static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedResponse1, _lib._sel_new1); + return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + } -const int CSSM_WORDID_CERT = 11; + static CUPHTTPForwardedResponse alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedResponse1, _lib._sel_alloc1); + return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_WORDID_COMMENT = 12; +class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedData._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_WORDID_CRL = 13; + /// Returns a [CUPHTTPForwardedData] that points to the same underlying object as [other]. + static CUPHTTPForwardedData castFrom(T other) { + return CUPHTTPForwardedData._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_WORDID_CUSTOM = 14; + /// Returns a [CUPHTTPForwardedData] that wraps the given raw object pointer. + static CUPHTTPForwardedData castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedData._(other, lib, retain: retain, release: release); + } -const int CSSM_WORDID_D = 15; + /// Returns whether [obj] is an instance of [CUPHTTPForwardedData]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedData1); + } -const int CSSM_WORDID_DATE = 16; + NSObject initWithSession_task_data_( + NSURLSession? session, NSURLSessionTask? task, NSData? data) { + final _ret = _lib._objc_msgSend_488( + _id, + _lib._sel_initWithSession_task_data_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + data?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_DB_DELETE = 17; + NSData? get data { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_DB_EXEC_STORED_QUERY = 18; + static CUPHTTPForwardedData new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_CUPHTTPForwardedData1, _lib._sel_new1); + return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + } -const int CSSM_WORDID_DB_INSERT = 19; + static CUPHTTPForwardedData alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedData1, _lib._sel_alloc1); + return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_WORDID_DB_MODIFY = 20; +class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedComplete._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_WORDID_DB_READ = 21; + /// Returns a [CUPHTTPForwardedComplete] that points to the same underlying object as [other]. + static CUPHTTPForwardedComplete castFrom(T other) { + return CUPHTTPForwardedComplete._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_WORDID_DBS_CREATE = 22; + /// Returns a [CUPHTTPForwardedComplete] that wraps the given raw object pointer. + static CUPHTTPForwardedComplete castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedComplete._(other, lib, + retain: retain, release: release); + } -const int CSSM_WORDID_DBS_DELETE = 23; + /// Returns whether [obj] is an instance of [CUPHTTPForwardedComplete]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedComplete1); + } -const int CSSM_WORDID_DECRYPT = 24; + NSObject initWithSession_task_error_( + NSURLSession? session, NSURLSessionTask? task, NSError? error) { + final _ret = _lib._objc_msgSend_489( + _id, + _lib._sel_initWithSession_task_error_1, + session?._id ?? ffi.nullptr, + task?._id ?? ffi.nullptr, + error?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_DELETE = 25; + NSError? get error { + final _ret = _lib._objc_msgSend_383(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_DELTA_CRL = 26; + static CUPHTTPForwardedComplete new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedComplete1, _lib._sel_new1); + return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + } -const int CSSM_WORDID_DER = 27; + static CUPHTTPForwardedComplete alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedComplete1, _lib._sel_alloc1); + return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + } +} -const int CSSM_WORDID_DERIVE = 28; +class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedFinishedDownloading._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); -const int CSSM_WORDID_DISPLAY = 29; + /// Returns a [CUPHTTPForwardedFinishedDownloading] that points to the same underlying object as [other]. + static CUPHTTPForwardedFinishedDownloading castFrom( + T other) { + return CUPHTTPForwardedFinishedDownloading._(other._id, other._lib, + retain: true, release: true); + } -const int CSSM_WORDID_DO = 30; + /// Returns a [CUPHTTPForwardedFinishedDownloading] that wraps the given raw object pointer. + static CUPHTTPForwardedFinishedDownloading castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedFinishedDownloading._(other, lib, + retain: retain, release: release); + } -const int CSSM_WORDID_DSA = 31; + /// Returns whether [obj] is an instance of [CUPHTTPForwardedFinishedDownloading]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedFinishedDownloading1); + } -const int CSSM_WORDID_DSA_SHA1 = 32; + NSObject initWithSession_downloadTask_url_(NSURLSession? session, + NSURLSessionDownloadTask? downloadTask, NSURL? location) { + final _ret = _lib._objc_msgSend_490( + _id, + _lib._sel_initWithSession_downloadTask_url_1, + session?._id ?? ffi.nullptr, + downloadTask?._id ?? ffi.nullptr, + location?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_E = 33; + NSURL? get location { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_location1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } -const int CSSM_WORDID_ELGAMAL = 34; + static CUPHTTPForwardedFinishedDownloading new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_new1); + return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, + retain: false, release: true); + } -const int CSSM_WORDID_ENCRYPT = 35; + static CUPHTTPForwardedFinishedDownloading alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_alloc1); + return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, + retain: false, release: true); + } +} -const int CSSM_WORDID_ENTRY = 36; +const int noErr = 0; -const int CSSM_WORDID_EXPORT_CLEAR = 37; +const int kNilOptions = 0; -const int CSSM_WORDID_EXPORT_WRAPPED = 38; +const int kVariableLengthArray = 1; -const int CSSM_WORDID_G = 39; +const int kUnknownType = 1061109567; -const int CSSM_WORDID_GE = 40; +const int normal = 0; -const int CSSM_WORDID_GENKEY = 41; +const int bold = 1; -const int CSSM_WORDID_HASH = 42; +const int italic = 2; -const int CSSM_WORDID_HASHED_PASSWORD = 43; +const int underline = 4; -const int CSSM_WORDID_HASHED_SUBJECT = 44; +const int outline = 8; -const int CSSM_WORDID_HAVAL = 45; +const int shadow = 16; -const int CSSM_WORDID_IBCHASH = 46; +const int condense = 32; -const int CSSM_WORDID_IMPORT_CLEAR = 47; +const int extend = 64; -const int CSSM_WORDID_IMPORT_WRAPPED = 48; +const int developStage = 32; -const int CSSM_WORDID_INTEL = 49; +const int alphaStage = 64; -const int CSSM_WORDID_ISSUER = 50; +const int betaStage = 96; -const int CSSM_WORDID_ISSUER_INFO = 51; +const int finalStage = 128; -const int CSSM_WORDID_K_OF_N = 52; +const int NSScannedOption = 1; -const int CSSM_WORDID_KEA = 53; +const int NSCollectorDisabledOption = 2; -const int CSSM_WORDID_KEYHOLDER = 54; +const int errSecSuccess = 0; -const int CSSM_WORDID_L = 55; +const int errSecUnimplemented = -4; -const int CSSM_WORDID_LE = 56; +const int errSecDiskFull = -34; -const int CSSM_WORDID_LOGIN = 57; +const int errSecDskFull = -34; -const int CSSM_WORDID_LOGIN_NAME = 58; +const int errSecIO = -36; -const int CSSM_WORDID_MAC = 59; +const int errSecOpWr = -49; -const int CSSM_WORDID_MD2 = 60; +const int errSecParam = -50; -const int CSSM_WORDID_MD2WITHRSA = 61; +const int errSecWrPerm = -61; -const int CSSM_WORDID_MD4 = 62; +const int errSecAllocate = -108; -const int CSSM_WORDID_MD5 = 63; +const int errSecUserCanceled = -128; -const int CSSM_WORDID_MD5WITHRSA = 64; +const int errSecBadReq = -909; -const int CSSM_WORDID_N = 65; +const int errSecInternalComponent = -2070; -const int CSSM_WORDID_NAME = 66; +const int errSecCoreFoundationUnknown = -4960; -const int CSSM_WORDID_NDR = 67; +const int errSecMissingEntitlement = -34018; -const int CSSM_WORDID_NHASH = 68; +const int errSecRestrictedAPI = -34020; -const int CSSM_WORDID_NOT_AFTER = 69; +const int errSecNotAvailable = -25291; -const int CSSM_WORDID_NOT_BEFORE = 70; +const int errSecReadOnly = -25292; -const int CSSM_WORDID_NULL = 71; +const int errSecAuthFailed = -25293; -const int CSSM_WORDID_NUMERIC = 72; +const int errSecNoSuchKeychain = -25294; -const int CSSM_WORDID_OBJECT_HASH = 73; +const int errSecInvalidKeychain = -25295; -const int CSSM_WORDID_ONE_TIME = 74; +const int errSecDuplicateKeychain = -25296; -const int CSSM_WORDID_ONLINE = 75; +const int errSecDuplicateCallback = -25297; -const int CSSM_WORDID_OWNER = 76; +const int errSecInvalidCallback = -25298; -const int CSSM_WORDID_P = 77; +const int errSecDuplicateItem = -25299; -const int CSSM_WORDID_PAM_NAME = 78; +const int errSecItemNotFound = -25300; -const int CSSM_WORDID_PASSWORD = 79; +const int errSecBufferTooSmall = -25301; -const int CSSM_WORDID_PGP = 80; +const int errSecDataTooLarge = -25302; -const int CSSM_WORDID_PREFIX = 81; +const int errSecNoSuchAttr = -25303; -const int CSSM_WORDID_PRIVATE_KEY = 82; +const int errSecInvalidItemRef = -25304; -const int CSSM_WORDID_PROMPTED_BIOMETRIC = 83; +const int errSecInvalidSearchRef = -25305; -const int CSSM_WORDID_PROMPTED_PASSWORD = 84; +const int errSecNoSuchClass = -25306; -const int CSSM_WORDID_PROPAGATE = 85; +const int errSecNoDefaultKeychain = -25307; -const int CSSM_WORDID_PROTECTED_BIOMETRIC = 86; +const int errSecInteractionNotAllowed = -25308; -const int CSSM_WORDID_PROTECTED_PASSWORD = 87; +const int errSecReadOnlyAttr = -25309; -const int CSSM_WORDID_PROTECTED_PIN = 88; +const int errSecWrongSecVersion = -25310; -const int CSSM_WORDID_PUBLIC_KEY = 89; +const int errSecKeySizeNotAllowed = -25311; -const int CSSM_WORDID_PUBLIC_KEY_FROM_CERT = 90; +const int errSecNoStorageModule = -25312; -const int CSSM_WORDID_Q = 91; +const int errSecNoCertificateModule = -25313; -const int CSSM_WORDID_RANGE = 92; +const int errSecNoPolicyModule = -25314; -const int CSSM_WORDID_REVAL = 93; +const int errSecInteractionRequired = -25315; -const int CSSM_WORDID_RIPEMAC = 94; +const int errSecDataNotAvailable = -25316; -const int CSSM_WORDID_RIPEMD = 95; +const int errSecDataNotModifiable = -25317; -const int CSSM_WORDID_RIPEMD160 = 96; +const int errSecCreateChainFailed = -25318; -const int CSSM_WORDID_RSA = 97; +const int errSecInvalidPrefsDomain = -25319; -const int CSSM_WORDID_RSA_ISO9796 = 98; +const int errSecInDarkWake = -25320; -const int CSSM_WORDID_RSA_PKCS = 99; +const int errSecACLNotSimple = -25240; -const int CSSM_WORDID_RSA_PKCS_MD5 = 100; +const int errSecPolicyNotFound = -25241; -const int CSSM_WORDID_RSA_PKCS_SHA1 = 101; +const int errSecInvalidTrustSetting = -25242; -const int CSSM_WORDID_RSA_PKCS1 = 102; +const int errSecNoAccessForItem = -25243; -const int CSSM_WORDID_RSA_PKCS1_MD5 = 103; +const int errSecInvalidOwnerEdit = -25244; -const int CSSM_WORDID_RSA_PKCS1_SHA1 = 104; +const int errSecTrustNotAvailable = -25245; -const int CSSM_WORDID_RSA_PKCS1_SIG = 105; +const int errSecUnsupportedFormat = -25256; -const int CSSM_WORDID_RSA_RAW = 106; +const int errSecUnknownFormat = -25257; -const int CSSM_WORDID_SDSIV1 = 107; +const int errSecKeyIsSensitive = -25258; -const int CSSM_WORDID_SEQUENCE = 108; +const int errSecMultiplePrivKeys = -25259; -const int CSSM_WORDID_SET = 109; +const int errSecPassphraseRequired = -25260; -const int CSSM_WORDID_SEXPR = 110; +const int errSecInvalidPasswordRef = -25261; -const int CSSM_WORDID_SHA1 = 111; +const int errSecInvalidTrustSettings = -25262; -const int CSSM_WORDID_SHA1WITHDSA = 112; +const int errSecNoTrustSettings = -25263; -const int CSSM_WORDID_SHA1WITHECDSA = 113; +const int errSecPkcs12VerifyFailure = -25264; -const int CSSM_WORDID_SHA1WITHRSA = 114; +const int errSecNotSigner = -26267; -const int CSSM_WORDID_SIGN = 115; +const int errSecDecode = -26275; -const int CSSM_WORDID_SIGNATURE = 116; +const int errSecServiceNotAvailable = -67585; -const int CSSM_WORDID_SIGNED_NONCE = 117; +const int errSecInsufficientClientID = -67586; -const int CSSM_WORDID_SIGNED_SECRET = 118; +const int errSecDeviceReset = -67587; -const int CSSM_WORDID_SPKI = 119; +const int errSecDeviceFailed = -67588; -const int CSSM_WORDID_SUBJECT = 120; +const int errSecAppleAddAppACLSubject = -67589; -const int CSSM_WORDID_SUBJECT_INFO = 121; +const int errSecApplePublicKeyIncomplete = -67590; -const int CSSM_WORDID_TAG = 122; +const int errSecAppleSignatureMismatch = -67591; -const int CSSM_WORDID_THRESHOLD = 123; +const int errSecAppleInvalidKeyStartDate = -67592; -const int CSSM_WORDID_TIME = 124; +const int errSecAppleInvalidKeyEndDate = -67593; -const int CSSM_WORDID_URI = 125; +const int errSecConversionError = -67594; -const int CSSM_WORDID_VERSION = 126; +const int errSecAppleSSLv2Rollback = -67595; -const int CSSM_WORDID_X509_ATTRIBUTE = 127; +const int errSecQuotaExceeded = -67596; -const int CSSM_WORDID_X509V1 = 128; +const int errSecFileTooBig = -67597; -const int CSSM_WORDID_X509V2 = 129; +const int errSecInvalidDatabaseBlob = -67598; -const int CSSM_WORDID_X509V3 = 130; +const int errSecInvalidKeyBlob = -67599; -const int CSSM_WORDID_X9_ATTRIBUTE = 131; +const int errSecIncompatibleDatabaseBlob = -67600; -const int CSSM_WORDID_VENDOR_START = 65536; +const int errSecIncompatibleKeyBlob = -67601; -const int CSSM_WORDID_VENDOR_END = 2147418112; +const int errSecHostNameMismatch = -67602; -const int CSSM_LIST_ELEMENT_DATUM = 0; +const int errSecUnknownCriticalExtensionFlag = -67603; -const int CSSM_LIST_ELEMENT_SUBLIST = 1; +const int errSecNoBasicConstraints = -67604; -const int CSSM_LIST_ELEMENT_WORDID = 2; +const int errSecNoBasicConstraintsCA = -67605; -const int CSSM_LIST_TYPE_UNKNOWN = 0; +const int errSecInvalidAuthorityKeyID = -67606; -const int CSSM_LIST_TYPE_CUSTOM = 1; +const int errSecInvalidSubjectKeyID = -67607; -const int CSSM_LIST_TYPE_SEXPR = 2; +const int errSecInvalidKeyUsageForPolicy = -67608; -const int CSSM_SAMPLE_TYPE_PASSWORD = 79; +const int errSecInvalidExtendedKeyUsage = -67609; -const int CSSM_SAMPLE_TYPE_HASHED_PASSWORD = 43; +const int errSecInvalidIDLinkage = -67610; -const int CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD = 87; +const int errSecPathLengthConstraintExceeded = -67611; -const int CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD = 84; +const int errSecInvalidRoot = -67612; -const int CSSM_SAMPLE_TYPE_SIGNED_NONCE = 117; +const int errSecCRLExpired = -67613; -const int CSSM_SAMPLE_TYPE_SIGNED_SECRET = 118; +const int errSecCRLNotValidYet = -67614; -const int CSSM_SAMPLE_TYPE_BIOMETRIC = 8; +const int errSecCRLNotFound = -67615; -const int CSSM_SAMPLE_TYPE_PROTECTED_BIOMETRIC = 86; +const int errSecCRLServerDown = -67616; -const int CSSM_SAMPLE_TYPE_PROMPTED_BIOMETRIC = 83; +const int errSecCRLBadURI = -67617; -const int CSSM_SAMPLE_TYPE_THRESHOLD = 123; +const int errSecUnknownCertExtension = -67618; -const int CSSM_CERT_UNKNOWN = 0; +const int errSecUnknownCRLExtension = -67619; -const int CSSM_CERT_X_509v1 = 1; +const int errSecCRLNotTrusted = -67620; -const int CSSM_CERT_X_509v2 = 2; +const int errSecCRLPolicyFailed = -67621; -const int CSSM_CERT_X_509v3 = 3; +const int errSecIDPFailure = -67622; -const int CSSM_CERT_PGP = 4; +const int errSecSMIMEEmailAddressesNotFound = -67623; -const int CSSM_CERT_SPKI = 5; +const int errSecSMIMEBadExtendedKeyUsage = -67624; -const int CSSM_CERT_SDSIv1 = 6; +const int errSecSMIMEBadKeyUsage = -67625; -const int CSSM_CERT_Intel = 8; +const int errSecSMIMEKeyUsageNotCritical = -67626; -const int CSSM_CERT_X_509_ATTRIBUTE = 9; +const int errSecSMIMENoEmailAddress = -67627; -const int CSSM_CERT_X9_ATTRIBUTE = 10; +const int errSecSMIMESubjAltNameNotCritical = -67628; -const int CSSM_CERT_TUPLE = 11; +const int errSecSSLBadExtendedKeyUsage = -67629; -const int CSSM_CERT_ACL_ENTRY = 12; +const int errSecOCSPBadResponse = -67630; -const int CSSM_CERT_MULTIPLE = 32766; +const int errSecOCSPBadRequest = -67631; -const int CSSM_CERT_LAST = 32767; +const int errSecOCSPUnavailable = -67632; -const int CSSM_CL_CUSTOM_CERT_TYPE = 32768; +const int errSecOCSPStatusUnrecognized = -67633; -const int CSSM_CERT_ENCODING_UNKNOWN = 0; +const int errSecEndOfData = -67634; -const int CSSM_CERT_ENCODING_CUSTOM = 1; +const int errSecIncompleteCertRevocationCheck = -67635; -const int CSSM_CERT_ENCODING_BER = 2; +const int errSecNetworkFailure = -67636; -const int CSSM_CERT_ENCODING_DER = 3; +const int errSecOCSPNotTrustedToAnchor = -67637; -const int CSSM_CERT_ENCODING_NDR = 4; +const int errSecRecordModified = -67638; -const int CSSM_CERT_ENCODING_SEXPR = 5; +const int errSecOCSPSignatureError = -67639; -const int CSSM_CERT_ENCODING_PGP = 6; +const int errSecOCSPNoSigner = -67640; -const int CSSM_CERT_ENCODING_MULTIPLE = 32766; +const int errSecOCSPResponderMalformedReq = -67641; -const int CSSM_CERT_ENCODING_LAST = 32767; +const int errSecOCSPResponderInternalError = -67642; -const int CSSM_CL_CUSTOM_CERT_ENCODING = 32768; +const int errSecOCSPResponderTryLater = -67643; -const int CSSM_CERT_PARSE_FORMAT_NONE = 0; +const int errSecOCSPResponderSignatureRequired = -67644; -const int CSSM_CERT_PARSE_FORMAT_CUSTOM = 1; +const int errSecOCSPResponderUnauthorized = -67645; -const int CSSM_CERT_PARSE_FORMAT_SEXPR = 2; +const int errSecOCSPResponseNonceMismatch = -67646; -const int CSSM_CERT_PARSE_FORMAT_COMPLEX = 3; +const int errSecCodeSigningBadCertChainLength = -67647; -const int CSSM_CERT_PARSE_FORMAT_OID_NAMED = 4; +const int errSecCodeSigningNoBasicConstraints = -67648; -const int CSSM_CERT_PARSE_FORMAT_TUPLE = 5; +const int errSecCodeSigningBadPathLengthConstraint = -67649; -const int CSSM_CERT_PARSE_FORMAT_MULTIPLE = 32766; +const int errSecCodeSigningNoExtendedKeyUsage = -67650; -const int CSSM_CERT_PARSE_FORMAT_LAST = 32767; +const int errSecCodeSigningDevelopment = -67651; -const int CSSM_CL_CUSTOM_CERT_PARSE_FORMAT = 32768; +const int errSecResourceSignBadCertChainLength = -67652; -const int CSSM_CERTGROUP_DATA = 0; +const int errSecResourceSignBadExtKeyUsage = -67653; -const int CSSM_CERTGROUP_ENCODED_CERT = 1; +const int errSecTrustSettingDeny = -67654; -const int CSSM_CERTGROUP_PARSED_CERT = 2; +const int errSecInvalidSubjectName = -67655; -const int CSSM_CERTGROUP_CERT_PAIR = 3; +const int errSecUnknownQualifiedCertStatement = -67656; -const int CSSM_ACL_SUBJECT_TYPE_ANY = 1; +const int errSecMobileMeRequestQueued = -67657; -const int CSSM_ACL_SUBJECT_TYPE_THRESHOLD = 123; +const int errSecMobileMeRequestRedirected = -67658; -const int CSSM_ACL_SUBJECT_TYPE_PASSWORD = 79; +const int errSecMobileMeServerError = -67659; -const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD = 87; +const int errSecMobileMeServerNotAvailable = -67660; -const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD = 84; +const int errSecMobileMeServerAlreadyExists = -67661; -const int CSSM_ACL_SUBJECT_TYPE_PUBLIC_KEY = 89; +const int errSecMobileMeServerServiceErr = -67662; -const int CSSM_ACL_SUBJECT_TYPE_HASHED_SUBJECT = 44; +const int errSecMobileMeRequestAlreadyPending = -67663; -const int CSSM_ACL_SUBJECT_TYPE_BIOMETRIC = 8; +const int errSecMobileMeNoRequestPending = -67664; -const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_BIOMETRIC = 86; +const int errSecMobileMeCSRVerifyFailure = -67665; -const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_BIOMETRIC = 83; +const int errSecMobileMeFailedConsistencyCheck = -67666; -const int CSSM_ACL_SUBJECT_TYPE_LOGIN_NAME = 58; +const int errSecNotInitialized = -67667; -const int CSSM_ACL_SUBJECT_TYPE_EXT_PAM_NAME = 78; +const int errSecInvalidHandleUsage = -67668; -const int CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START = 65536; +const int errSecPVCReferentNotFound = -67669; -const int CSSM_ACL_AUTHORIZATION_ANY = 1; +const int errSecFunctionIntegrityFail = -67670; -const int CSSM_ACL_AUTHORIZATION_LOGIN = 57; +const int errSecInternalError = -67671; -const int CSSM_ACL_AUTHORIZATION_GENKEY = 41; +const int errSecMemoryError = -67672; -const int CSSM_ACL_AUTHORIZATION_DELETE = 25; +const int errSecInvalidData = -67673; -const int CSSM_ACL_AUTHORIZATION_EXPORT_WRAPPED = 38; +const int errSecMDSError = -67674; -const int CSSM_ACL_AUTHORIZATION_EXPORT_CLEAR = 37; +const int errSecInvalidPointer = -67675; -const int CSSM_ACL_AUTHORIZATION_IMPORT_WRAPPED = 48; +const int errSecSelfCheckFailed = -67676; -const int CSSM_ACL_AUTHORIZATION_IMPORT_CLEAR = 47; +const int errSecFunctionFailed = -67677; -const int CSSM_ACL_AUTHORIZATION_SIGN = 115; +const int errSecModuleManifestVerifyFailed = -67678; -const int CSSM_ACL_AUTHORIZATION_ENCRYPT = 35; +const int errSecInvalidGUID = -67679; -const int CSSM_ACL_AUTHORIZATION_DECRYPT = 24; +const int errSecInvalidHandle = -67680; -const int CSSM_ACL_AUTHORIZATION_MAC = 59; +const int errSecInvalidDBList = -67681; -const int CSSM_ACL_AUTHORIZATION_DERIVE = 28; +const int errSecInvalidPassthroughID = -67682; -const int CSSM_ACL_AUTHORIZATION_DBS_CREATE = 22; +const int errSecInvalidNetworkAddress = -67683; -const int CSSM_ACL_AUTHORIZATION_DBS_DELETE = 23; +const int errSecCRLAlreadySigned = -67684; -const int CSSM_ACL_AUTHORIZATION_DB_READ = 21; +const int errSecInvalidNumberOfFields = -67685; -const int CSSM_ACL_AUTHORIZATION_DB_INSERT = 19; +const int errSecVerificationFailure = -67686; -const int CSSM_ACL_AUTHORIZATION_DB_MODIFY = 20; +const int errSecUnknownTag = -67687; -const int CSSM_ACL_AUTHORIZATION_DB_DELETE = 17; +const int errSecInvalidSignature = -67688; -const int CSSM_ACL_EDIT_MODE_ADD = 1; +const int errSecInvalidName = -67689; -const int CSSM_ACL_EDIT_MODE_DELETE = 2; +const int errSecInvalidCertificateRef = -67690; -const int CSSM_ACL_EDIT_MODE_REPLACE = 3; +const int errSecInvalidCertificateGroup = -67691; -const int CSSM_KEYHEADER_VERSION = 2; +const int errSecTagNotFound = -67692; -const int CSSM_KEYBLOB_RAW = 0; +const int errSecInvalidQuery = -67693; -const int CSSM_KEYBLOB_REFERENCE = 2; +const int errSecInvalidValue = -67694; -const int CSSM_KEYBLOB_WRAPPED = 3; +const int errSecCallbackFailed = -67695; -const int CSSM_KEYBLOB_OTHER = -1; +const int errSecACLDeleteFailed = -67696; -const int CSSM_KEYBLOB_RAW_FORMAT_NONE = 0; +const int errSecACLReplaceFailed = -67697; -const int CSSM_KEYBLOB_RAW_FORMAT_PKCS1 = 1; +const int errSecACLAddFailed = -67698; -const int CSSM_KEYBLOB_RAW_FORMAT_PKCS3 = 2; +const int errSecACLChangeFailed = -67699; -const int CSSM_KEYBLOB_RAW_FORMAT_MSCAPI = 3; +const int errSecInvalidAccessCredentials = -67700; -const int CSSM_KEYBLOB_RAW_FORMAT_PGP = 4; +const int errSecInvalidRecord = -67701; -const int CSSM_KEYBLOB_RAW_FORMAT_FIPS186 = 5; +const int errSecInvalidACL = -67702; -const int CSSM_KEYBLOB_RAW_FORMAT_BSAFE = 6; +const int errSecInvalidSampleValue = -67703; -const int CSSM_KEYBLOB_RAW_FORMAT_CCA = 9; +const int errSecIncompatibleVersion = -67704; -const int CSSM_KEYBLOB_RAW_FORMAT_PKCS8 = 10; +const int errSecPrivilegeNotGranted = -67705; -const int CSSM_KEYBLOB_RAW_FORMAT_SPKI = 11; +const int errSecInvalidScope = -67706; -const int CSSM_KEYBLOB_RAW_FORMAT_OCTET_STRING = 12; +const int errSecPVCAlreadyConfigured = -67707; -const int CSSM_KEYBLOB_RAW_FORMAT_OTHER = -1; +const int errSecInvalidPVC = -67708; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_NONE = 0; +const int errSecEMMLoadFailed = -67709; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS8 = 1; +const int errSecEMMUnloadFailed = -67710; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS7 = 2; +const int errSecAddinLoadFailed = -67711; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_MSCAPI = 3; +const int errSecInvalidKeyRef = -67712; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_OTHER = -1; +const int errSecInvalidKeyHierarchy = -67713; -const int CSSM_KEYBLOB_REF_FORMAT_INTEGER = 0; +const int errSecAddinUnloadFailed = -67714; -const int CSSM_KEYBLOB_REF_FORMAT_STRING = 1; +const int errSecLibraryReferenceNotFound = -67715; -const int CSSM_KEYBLOB_REF_FORMAT_SPKI = 2; +const int errSecInvalidAddinFunctionTable = -67716; -const int CSSM_KEYBLOB_REF_FORMAT_OTHER = -1; +const int errSecInvalidServiceMask = -67717; -const int CSSM_KEYCLASS_PUBLIC_KEY = 0; +const int errSecModuleNotLoaded = -67718; -const int CSSM_KEYCLASS_PRIVATE_KEY = 1; +const int errSecInvalidSubServiceID = -67719; -const int CSSM_KEYCLASS_SESSION_KEY = 2; +const int errSecAttributeNotInContext = -67720; -const int CSSM_KEYCLASS_SECRET_PART = 3; +const int errSecModuleManagerInitializeFailed = -67721; -const int CSSM_KEYCLASS_OTHER = -1; +const int errSecModuleManagerNotFound = -67722; -const int CSSM_KEYATTR_RETURN_DEFAULT = 0; +const int errSecEventNotificationCallbackNotFound = -67723; -const int CSSM_KEYATTR_RETURN_DATA = 268435456; +const int errSecInputLengthError = -67724; -const int CSSM_KEYATTR_RETURN_REF = 536870912; +const int errSecOutputLengthError = -67725; -const int CSSM_KEYATTR_RETURN_NONE = 1073741824; +const int errSecPrivilegeNotSupported = -67726; -const int CSSM_KEYATTR_PERMANENT = 1; +const int errSecDeviceError = -67727; -const int CSSM_KEYATTR_PRIVATE = 2; +const int errSecAttachHandleBusy = -67728; -const int CSSM_KEYATTR_MODIFIABLE = 4; +const int errSecNotLoggedIn = -67729; -const int CSSM_KEYATTR_SENSITIVE = 8; +const int errSecAlgorithmMismatch = -67730; -const int CSSM_KEYATTR_EXTRACTABLE = 32; +const int errSecKeyUsageIncorrect = -67731; -const int CSSM_KEYATTR_ALWAYS_SENSITIVE = 16; +const int errSecKeyBlobTypeIncorrect = -67732; -const int CSSM_KEYATTR_NEVER_EXTRACTABLE = 64; +const int errSecKeyHeaderInconsistent = -67733; -const int CSSM_KEYUSE_ANY = -2147483648; +const int errSecUnsupportedKeyFormat = -67734; -const int CSSM_KEYUSE_ENCRYPT = 1; +const int errSecUnsupportedKeySize = -67735; -const int CSSM_KEYUSE_DECRYPT = 2; +const int errSecInvalidKeyUsageMask = -67736; -const int CSSM_KEYUSE_SIGN = 4; +const int errSecUnsupportedKeyUsageMask = -67737; -const int CSSM_KEYUSE_VERIFY = 8; +const int errSecInvalidKeyAttributeMask = -67738; -const int CSSM_KEYUSE_SIGN_RECOVER = 16; +const int errSecUnsupportedKeyAttributeMask = -67739; -const int CSSM_KEYUSE_VERIFY_RECOVER = 32; +const int errSecInvalidKeyLabel = -67740; -const int CSSM_KEYUSE_WRAP = 64; +const int errSecUnsupportedKeyLabel = -67741; -const int CSSM_KEYUSE_UNWRAP = 128; +const int errSecInvalidKeyFormat = -67742; -const int CSSM_KEYUSE_DERIVE = 256; +const int errSecUnsupportedVectorOfBuffers = -67743; -const int CSSM_ALGID_NONE = 0; +const int errSecInvalidInputVector = -67744; -const int CSSM_ALGID_CUSTOM = 1; +const int errSecInvalidOutputVector = -67745; -const int CSSM_ALGID_DH = 2; +const int errSecInvalidContext = -67746; -const int CSSM_ALGID_PH = 3; +const int errSecInvalidAlgorithm = -67747; -const int CSSM_ALGID_KEA = 4; +const int errSecInvalidAttributeKey = -67748; -const int CSSM_ALGID_MD2 = 5; +const int errSecMissingAttributeKey = -67749; -const int CSSM_ALGID_MD4 = 6; +const int errSecInvalidAttributeInitVector = -67750; -const int CSSM_ALGID_MD5 = 7; +const int errSecMissingAttributeInitVector = -67751; -const int CSSM_ALGID_SHA1 = 8; +const int errSecInvalidAttributeSalt = -67752; -const int CSSM_ALGID_NHASH = 9; +const int errSecMissingAttributeSalt = -67753; -const int CSSM_ALGID_HAVAL = 10; +const int errSecInvalidAttributePadding = -67754; -const int CSSM_ALGID_RIPEMD = 11; +const int errSecMissingAttributePadding = -67755; -const int CSSM_ALGID_IBCHASH = 12; +const int errSecInvalidAttributeRandom = -67756; -const int CSSM_ALGID_RIPEMAC = 13; +const int errSecMissingAttributeRandom = -67757; -const int CSSM_ALGID_DES = 14; +const int errSecInvalidAttributeSeed = -67758; -const int CSSM_ALGID_DESX = 15; +const int errSecMissingAttributeSeed = -67759; -const int CSSM_ALGID_RDES = 16; +const int errSecInvalidAttributePassphrase = -67760; -const int CSSM_ALGID_3DES_3KEY_EDE = 17; +const int errSecMissingAttributePassphrase = -67761; -const int CSSM_ALGID_3DES_2KEY_EDE = 18; +const int errSecInvalidAttributeKeyLength = -67762; -const int CSSM_ALGID_3DES_1KEY_EEE = 19; +const int errSecMissingAttributeKeyLength = -67763; -const int CSSM_ALGID_3DES_3KEY = 17; +const int errSecInvalidAttributeBlockSize = -67764; -const int CSSM_ALGID_3DES_3KEY_EEE = 20; +const int errSecMissingAttributeBlockSize = -67765; -const int CSSM_ALGID_3DES_2KEY = 18; +const int errSecInvalidAttributeOutputSize = -67766; -const int CSSM_ALGID_3DES_2KEY_EEE = 21; +const int errSecMissingAttributeOutputSize = -67767; -const int CSSM_ALGID_3DES_1KEY = 20; +const int errSecInvalidAttributeRounds = -67768; -const int CSSM_ALGID_IDEA = 22; +const int errSecMissingAttributeRounds = -67769; -const int CSSM_ALGID_RC2 = 23; +const int errSecInvalidAlgorithmParms = -67770; -const int CSSM_ALGID_RC5 = 24; +const int errSecMissingAlgorithmParms = -67771; -const int CSSM_ALGID_RC4 = 25; +const int errSecInvalidAttributeLabel = -67772; -const int CSSM_ALGID_SEAL = 26; +const int errSecMissingAttributeLabel = -67773; -const int CSSM_ALGID_CAST = 27; +const int errSecInvalidAttributeKeyType = -67774; -const int CSSM_ALGID_BLOWFISH = 28; +const int errSecMissingAttributeKeyType = -67775; -const int CSSM_ALGID_SKIPJACK = 29; +const int errSecInvalidAttributeMode = -67776; -const int CSSM_ALGID_LUCIFER = 30; +const int errSecMissingAttributeMode = -67777; -const int CSSM_ALGID_MADRYGA = 31; +const int errSecInvalidAttributeEffectiveBits = -67778; -const int CSSM_ALGID_FEAL = 32; +const int errSecMissingAttributeEffectiveBits = -67779; -const int CSSM_ALGID_REDOC = 33; +const int errSecInvalidAttributeStartDate = -67780; -const int CSSM_ALGID_REDOC3 = 34; +const int errSecMissingAttributeStartDate = -67781; -const int CSSM_ALGID_LOKI = 35; +const int errSecInvalidAttributeEndDate = -67782; -const int CSSM_ALGID_KHUFU = 36; +const int errSecMissingAttributeEndDate = -67783; -const int CSSM_ALGID_KHAFRE = 37; +const int errSecInvalidAttributeVersion = -67784; -const int CSSM_ALGID_MMB = 38; +const int errSecMissingAttributeVersion = -67785; -const int CSSM_ALGID_GOST = 39; +const int errSecInvalidAttributePrime = -67786; -const int CSSM_ALGID_SAFER = 40; +const int errSecMissingAttributePrime = -67787; -const int CSSM_ALGID_CRAB = 41; +const int errSecInvalidAttributeBase = -67788; -const int CSSM_ALGID_RSA = 42; +const int errSecMissingAttributeBase = -67789; -const int CSSM_ALGID_DSA = 43; +const int errSecInvalidAttributeSubprime = -67790; -const int CSSM_ALGID_MD5WithRSA = 44; +const int errSecMissingAttributeSubprime = -67791; -const int CSSM_ALGID_MD2WithRSA = 45; +const int errSecInvalidAttributeIterationCount = -67792; -const int CSSM_ALGID_ElGamal = 46; +const int errSecMissingAttributeIterationCount = -67793; -const int CSSM_ALGID_MD2Random = 47; +const int errSecInvalidAttributeDLDBHandle = -67794; -const int CSSM_ALGID_MD5Random = 48; +const int errSecMissingAttributeDLDBHandle = -67795; -const int CSSM_ALGID_SHARandom = 49; +const int errSecInvalidAttributeAccessCredentials = -67796; -const int CSSM_ALGID_DESRandom = 50; +const int errSecMissingAttributeAccessCredentials = -67797; -const int CSSM_ALGID_SHA1WithRSA = 51; +const int errSecInvalidAttributePublicKeyFormat = -67798; -const int CSSM_ALGID_CDMF = 52; +const int errSecMissingAttributePublicKeyFormat = -67799; -const int CSSM_ALGID_CAST3 = 53; +const int errSecInvalidAttributePrivateKeyFormat = -67800; -const int CSSM_ALGID_CAST5 = 54; +const int errSecMissingAttributePrivateKeyFormat = -67801; -const int CSSM_ALGID_GenericSecret = 55; +const int errSecInvalidAttributeSymmetricKeyFormat = -67802; -const int CSSM_ALGID_ConcatBaseAndKey = 56; +const int errSecMissingAttributeSymmetricKeyFormat = -67803; -const int CSSM_ALGID_ConcatKeyAndBase = 57; +const int errSecInvalidAttributeWrappedKeyFormat = -67804; -const int CSSM_ALGID_ConcatBaseAndData = 58; +const int errSecMissingAttributeWrappedKeyFormat = -67805; -const int CSSM_ALGID_ConcatDataAndBase = 59; +const int errSecStagedOperationInProgress = -67806; -const int CSSM_ALGID_XORBaseAndData = 60; +const int errSecStagedOperationNotStarted = -67807; -const int CSSM_ALGID_ExtractFromKey = 61; +const int errSecVerifyFailed = -67808; -const int CSSM_ALGID_SSL3PrePrimaryGen = 62; +const int errSecQuerySizeUnknown = -67809; -const int CSSM_ALGID_SSL3PreMasterGen = 62; +const int errSecBlockSizeMismatch = -67810; -const int CSSM_ALGID_SSL3PrimaryDerive = 63; +const int errSecPublicKeyInconsistent = -67811; -const int CSSM_ALGID_SSL3MasterDerive = 63; +const int errSecDeviceVerifyFailed = -67812; -const int CSSM_ALGID_SSL3KeyAndMacDerive = 64; +const int errSecInvalidLoginName = -67813; -const int CSSM_ALGID_SSL3MD5_MAC = 65; +const int errSecAlreadyLoggedIn = -67814; -const int CSSM_ALGID_SSL3SHA1_MAC = 66; +const int errSecInvalidDigestAlgorithm = -67815; -const int CSSM_ALGID_PKCS5_PBKDF1_MD5 = 67; +const int errSecInvalidCRLGroup = -67816; -const int CSSM_ALGID_PKCS5_PBKDF1_MD2 = 68; +const int errSecCertificateCannotOperate = -67817; -const int CSSM_ALGID_PKCS5_PBKDF1_SHA1 = 69; +const int errSecCertificateExpired = -67818; -const int CSSM_ALGID_WrapLynks = 70; +const int errSecCertificateNotValidYet = -67819; -const int CSSM_ALGID_WrapSET_OAEP = 71; +const int errSecCertificateRevoked = -67820; -const int CSSM_ALGID_BATON = 72; +const int errSecCertificateSuspended = -67821; -const int CSSM_ALGID_ECDSA = 73; +const int errSecInsufficientCredentials = -67822; -const int CSSM_ALGID_MAYFLY = 74; +const int errSecInvalidAction = -67823; -const int CSSM_ALGID_JUNIPER = 75; +const int errSecInvalidAuthority = -67824; -const int CSSM_ALGID_FASTHASH = 76; +const int errSecVerifyActionFailed = -67825; -const int CSSM_ALGID_3DES = 77; +const int errSecInvalidCertAuthority = -67826; -const int CSSM_ALGID_SSL3MD5 = 78; +const int errSecInvalidCRLAuthority = -67827; -const int CSSM_ALGID_SSL3SHA1 = 79; +const int errSecInvaldCRLAuthority = -67827; -const int CSSM_ALGID_FortezzaTimestamp = 80; +const int errSecInvalidCRLEncoding = -67828; -const int CSSM_ALGID_SHA1WithDSA = 81; +const int errSecInvalidCRLType = -67829; -const int CSSM_ALGID_SHA1WithECDSA = 82; +const int errSecInvalidCRL = -67830; -const int CSSM_ALGID_DSA_BSAFE = 83; +const int errSecInvalidFormType = -67831; -const int CSSM_ALGID_ECDH = 84; +const int errSecInvalidID = -67832; -const int CSSM_ALGID_ECMQV = 85; +const int errSecInvalidIdentifier = -67833; -const int CSSM_ALGID_PKCS12_SHA1_PBE = 86; +const int errSecInvalidIndex = -67834; -const int CSSM_ALGID_ECNRA = 87; +const int errSecInvalidPolicyIdentifiers = -67835; -const int CSSM_ALGID_SHA1WithECNRA = 88; +const int errSecInvalidTimeString = -67836; -const int CSSM_ALGID_ECES = 89; +const int errSecInvalidReason = -67837; -const int CSSM_ALGID_ECAES = 90; +const int errSecInvalidRequestInputs = -67838; -const int CSSM_ALGID_SHA1HMAC = 91; +const int errSecInvalidResponseVector = -67839; -const int CSSM_ALGID_FIPS186Random = 92; +const int errSecInvalidStopOnPolicy = -67840; -const int CSSM_ALGID_ECC = 93; +const int errSecInvalidTuple = -67841; -const int CSSM_ALGID_MQV = 94; +const int errSecMultipleValuesUnsupported = -67842; -const int CSSM_ALGID_NRA = 95; +const int errSecNotTrusted = -67843; -const int CSSM_ALGID_IntelPlatformRandom = 96; +const int errSecNoDefaultAuthority = -67844; -const int CSSM_ALGID_UTC = 97; +const int errSecRejectedForm = -67845; -const int CSSM_ALGID_HAVAL3 = 98; +const int errSecRequestLost = -67846; -const int CSSM_ALGID_HAVAL4 = 99; +const int errSecRequestRejected = -67847; -const int CSSM_ALGID_HAVAL5 = 100; +const int errSecUnsupportedAddressType = -67848; -const int CSSM_ALGID_TIGER = 101; +const int errSecUnsupportedService = -67849; -const int CSSM_ALGID_MD5HMAC = 102; +const int errSecInvalidTupleGroup = -67850; -const int CSSM_ALGID_PKCS5_PBKDF2 = 103; +const int errSecInvalidBaseACLs = -67851; -const int CSSM_ALGID_RUNNING_COUNTER = 104; +const int errSecInvalidTupleCredentials = -67852; -const int CSSM_ALGID_LAST = 2147483647; +const int errSecInvalidTupleCredendtials = -67852; -const int CSSM_ALGID_VENDOR_DEFINED = -2147483648; +const int errSecInvalidEncoding = -67853; -const int CSSM_ALGMODE_NONE = 0; +const int errSecInvalidValidityPeriod = -67854; -const int CSSM_ALGMODE_CUSTOM = 1; +const int errSecInvalidRequestor = -67855; -const int CSSM_ALGMODE_ECB = 2; +const int errSecRequestDescriptor = -67856; -const int CSSM_ALGMODE_ECBPad = 3; +const int errSecInvalidBundleInfo = -67857; -const int CSSM_ALGMODE_CBC = 4; +const int errSecInvalidCRLIndex = -67858; -const int CSSM_ALGMODE_CBC_IV8 = 5; +const int errSecNoFieldValues = -67859; -const int CSSM_ALGMODE_CBCPadIV8 = 6; +const int errSecUnsupportedFieldFormat = -67860; -const int CSSM_ALGMODE_CFB = 7; +const int errSecUnsupportedIndexInfo = -67861; -const int CSSM_ALGMODE_CFB_IV8 = 8; +const int errSecUnsupportedLocality = -67862; -const int CSSM_ALGMODE_CFBPadIV8 = 9; +const int errSecUnsupportedNumAttributes = -67863; -const int CSSM_ALGMODE_OFB = 10; +const int errSecUnsupportedNumIndexes = -67864; -const int CSSM_ALGMODE_OFB_IV8 = 11; +const int errSecUnsupportedNumRecordTypes = -67865; -const int CSSM_ALGMODE_OFBPadIV8 = 12; +const int errSecFieldSpecifiedMultiple = -67866; -const int CSSM_ALGMODE_COUNTER = 13; +const int errSecIncompatibleFieldFormat = -67867; -const int CSSM_ALGMODE_BC = 14; +const int errSecInvalidParsingModule = -67868; -const int CSSM_ALGMODE_PCBC = 15; +const int errSecDatabaseLocked = -67869; -const int CSSM_ALGMODE_CBCC = 16; +const int errSecDatastoreIsOpen = -67870; -const int CSSM_ALGMODE_OFBNLF = 17; +const int errSecMissingValue = -67871; -const int CSSM_ALGMODE_PBC = 18; +const int errSecUnsupportedQueryLimits = -67872; -const int CSSM_ALGMODE_PFB = 19; +const int errSecUnsupportedNumSelectionPreds = -67873; -const int CSSM_ALGMODE_CBCPD = 20; +const int errSecUnsupportedOperator = -67874; -const int CSSM_ALGMODE_PUBLIC_KEY = 21; +const int errSecInvalidDBLocation = -67875; -const int CSSM_ALGMODE_PRIVATE_KEY = 22; +const int errSecInvalidAccessRequest = -67876; -const int CSSM_ALGMODE_SHUFFLE = 23; +const int errSecInvalidIndexInfo = -67877; -const int CSSM_ALGMODE_ECB64 = 24; +const int errSecInvalidNewOwner = -67878; -const int CSSM_ALGMODE_CBC64 = 25; +const int errSecInvalidModifyMode = -67879; -const int CSSM_ALGMODE_OFB64 = 26; +const int errSecMissingRequiredExtension = -67880; -const int CSSM_ALGMODE_CFB32 = 28; +const int errSecExtendedKeyUsageNotCritical = -67881; -const int CSSM_ALGMODE_CFB16 = 29; +const int errSecTimestampMissing = -67882; -const int CSSM_ALGMODE_CFB8 = 30; +const int errSecTimestampInvalid = -67883; -const int CSSM_ALGMODE_WRAP = 31; +const int errSecTimestampNotTrusted = -67884; -const int CSSM_ALGMODE_PRIVATE_WRAP = 32; +const int errSecTimestampServiceNotAvailable = -67885; -const int CSSM_ALGMODE_RELAYX = 33; +const int errSecTimestampBadAlg = -67886; -const int CSSM_ALGMODE_ECB128 = 34; +const int errSecTimestampBadRequest = -67887; -const int CSSM_ALGMODE_ECB96 = 35; +const int errSecTimestampBadDataFormat = -67888; -const int CSSM_ALGMODE_CBC128 = 36; +const int errSecTimestampTimeNotAvailable = -67889; -const int CSSM_ALGMODE_OAEP_HASH = 37; +const int errSecTimestampUnacceptedPolicy = -67890; -const int CSSM_ALGMODE_PKCS1_EME_V15 = 38; +const int errSecTimestampUnacceptedExtension = -67891; -const int CSSM_ALGMODE_PKCS1_EME_OAEP = 39; +const int errSecTimestampAddInfoNotAvailable = -67892; -const int CSSM_ALGMODE_PKCS1_EMSA_V15 = 40; +const int errSecTimestampSystemFailure = -67893; -const int CSSM_ALGMODE_ISO_9796 = 41; +const int errSecSigningTimeMissing = -67894; -const int CSSM_ALGMODE_X9_31 = 42; +const int errSecTimestampRejection = -67895; -const int CSSM_ALGMODE_LAST = 2147483647; +const int errSecTimestampWaiting = -67896; -const int CSSM_ALGMODE_VENDOR_DEFINED = -2147483648; +const int errSecTimestampRevocationWarning = -67897; -const int CSSM_CSP_SOFTWARE = 1; +const int errSecTimestampRevocationNotification = -67898; -const int CSSM_CSP_HARDWARE = 2; +const int errSecCertificatePolicyNotAllowed = -67899; -const int CSSM_CSP_HYBRID = 3; +const int errSecCertificateNameNotAllowed = -67900; -const int CSSM_ALGCLASS_NONE = 0; +const int errSecCertificateValidityPeriodTooLong = -67901; -const int CSSM_ALGCLASS_CUSTOM = 1; +const int errSecCertificateIsCA = -67902; -const int CSSM_ALGCLASS_SIGNATURE = 2; +const int errSecCertificateDuplicateExtension = -67903; -const int CSSM_ALGCLASS_SYMMETRIC = 3; +const int errSSLProtocol = -9800; -const int CSSM_ALGCLASS_DIGEST = 4; +const int errSSLNegotiation = -9801; -const int CSSM_ALGCLASS_RANDOMGEN = 5; +const int errSSLFatalAlert = -9802; -const int CSSM_ALGCLASS_UNIQUEGEN = 6; +const int errSSLWouldBlock = -9803; -const int CSSM_ALGCLASS_MAC = 7; +const int errSSLSessionNotFound = -9804; -const int CSSM_ALGCLASS_ASYMMETRIC = 8; +const int errSSLClosedGraceful = -9805; -const int CSSM_ALGCLASS_KEYGEN = 9; +const int errSSLClosedAbort = -9806; -const int CSSM_ALGCLASS_DERIVEKEY = 10; +const int errSSLXCertChainInvalid = -9807; -const int CSSM_ATTRIBUTE_DATA_NONE = 0; +const int errSSLBadCert = -9808; -const int CSSM_ATTRIBUTE_DATA_UINT32 = 268435456; +const int errSSLCrypto = -9809; -const int CSSM_ATTRIBUTE_DATA_CSSM_DATA = 536870912; +const int errSSLInternal = -9810; -const int CSSM_ATTRIBUTE_DATA_CRYPTO_DATA = 805306368; +const int errSSLModuleAttach = -9811; -const int CSSM_ATTRIBUTE_DATA_KEY = 1073741824; +const int errSSLUnknownRootCert = -9812; -const int CSSM_ATTRIBUTE_DATA_STRING = 1342177280; +const int errSSLNoRootCert = -9813; -const int CSSM_ATTRIBUTE_DATA_DATE = 1610612736; +const int errSSLCertExpired = -9814; -const int CSSM_ATTRIBUTE_DATA_RANGE = 1879048192; +const int errSSLCertNotYetValid = -9815; -const int CSSM_ATTRIBUTE_DATA_ACCESS_CREDENTIALS = -2147483648; +const int errSSLClosedNoNotify = -9816; -const int CSSM_ATTRIBUTE_DATA_VERSION = 16777216; +const int errSSLBufferOverflow = -9817; -const int CSSM_ATTRIBUTE_DATA_DL_DB_HANDLE = 33554432; +const int errSSLBadCipherSuite = -9818; -const int CSSM_ATTRIBUTE_DATA_KR_PROFILE = 50331648; +const int errSSLPeerUnexpectedMsg = -9819; -const int CSSM_ATTRIBUTE_TYPE_MASK = -16777216; +const int errSSLPeerBadRecordMac = -9820; -const int CSSM_ATTRIBUTE_NONE = 0; +const int errSSLPeerDecryptionFail = -9821; -const int CSSM_ATTRIBUTE_CUSTOM = 536870913; +const int errSSLPeerRecordOverflow = -9822; -const int CSSM_ATTRIBUTE_DESCRIPTION = 1342177282; +const int errSSLPeerDecompressFail = -9823; -const int CSSM_ATTRIBUTE_KEY = 1073741827; +const int errSSLPeerHandshakeFail = -9824; -const int CSSM_ATTRIBUTE_INIT_VECTOR = 536870916; +const int errSSLPeerBadCert = -9825; -const int CSSM_ATTRIBUTE_SALT = 536870917; +const int errSSLPeerUnsupportedCert = -9826; -const int CSSM_ATTRIBUTE_PADDING = 268435462; +const int errSSLPeerCertRevoked = -9827; -const int CSSM_ATTRIBUTE_RANDOM = 536870919; +const int errSSLPeerCertExpired = -9828; -const int CSSM_ATTRIBUTE_SEED = 805306376; +const int errSSLPeerCertUnknown = -9829; -const int CSSM_ATTRIBUTE_PASSPHRASE = 805306377; +const int errSSLIllegalParam = -9830; -const int CSSM_ATTRIBUTE_KEY_LENGTH = 268435466; +const int errSSLPeerUnknownCA = -9831; -const int CSSM_ATTRIBUTE_KEY_LENGTH_RANGE = 1879048203; +const int errSSLPeerAccessDenied = -9832; -const int CSSM_ATTRIBUTE_BLOCK_SIZE = 268435468; +const int errSSLPeerDecodeError = -9833; -const int CSSM_ATTRIBUTE_OUTPUT_SIZE = 268435469; +const int errSSLPeerDecryptError = -9834; -const int CSSM_ATTRIBUTE_ROUNDS = 268435470; +const int errSSLPeerExportRestriction = -9835; -const int CSSM_ATTRIBUTE_IV_SIZE = 268435471; +const int errSSLPeerProtocolVersion = -9836; -const int CSSM_ATTRIBUTE_ALG_PARAMS = 536870928; +const int errSSLPeerInsufficientSecurity = -9837; -const int CSSM_ATTRIBUTE_LABEL = 536870929; +const int errSSLPeerInternalError = -9838; -const int CSSM_ATTRIBUTE_KEY_TYPE = 268435474; +const int errSSLPeerUserCancelled = -9839; -const int CSSM_ATTRIBUTE_MODE = 268435475; +const int errSSLPeerNoRenegotiation = -9840; -const int CSSM_ATTRIBUTE_EFFECTIVE_BITS = 268435476; +const int errSSLPeerAuthCompleted = -9841; -const int CSSM_ATTRIBUTE_START_DATE = 1610612757; +const int errSSLClientCertRequested = -9842; -const int CSSM_ATTRIBUTE_END_DATE = 1610612758; +const int errSSLHostNameMismatch = -9843; -const int CSSM_ATTRIBUTE_KEYUSAGE = 268435479; +const int errSSLConnectionRefused = -9844; -const int CSSM_ATTRIBUTE_KEYATTR = 268435480; +const int errSSLDecryptionFail = -9845; -const int CSSM_ATTRIBUTE_VERSION = 16777241; +const int errSSLBadRecordMac = -9846; -const int CSSM_ATTRIBUTE_PRIME = 536870938; +const int errSSLRecordOverflow = -9847; -const int CSSM_ATTRIBUTE_BASE = 536870939; +const int errSSLBadConfiguration = -9848; -const int CSSM_ATTRIBUTE_SUBPRIME = 536870940; +const int errSSLUnexpectedRecord = -9849; -const int CSSM_ATTRIBUTE_ALG_ID = 268435485; +const int errSSLWeakPeerEphemeralDHKey = -9850; -const int CSSM_ATTRIBUTE_ITERATION_COUNT = 268435486; +const int errSSLClientHelloReceived = -9851; -const int CSSM_ATTRIBUTE_ROUNDS_RANGE = 1879048223; +const int errSSLTransportReset = -9852; -const int CSSM_ATTRIBUTE_KRPROFILE_LOCAL = 50331680; +const int errSSLNetworkTimeout = -9853; -const int CSSM_ATTRIBUTE_KRPROFILE_REMOTE = 50331681; +const int errSSLConfigurationFailed = -9854; -const int CSSM_ATTRIBUTE_CSP_HANDLE = 268435490; +const int errSSLUnsupportedExtension = -9855; -const int CSSM_ATTRIBUTE_DL_DB_HANDLE = 33554467; +const int errSSLUnexpectedMessage = -9856; -const int CSSM_ATTRIBUTE_ACCESS_CREDENTIALS = -2147483612; +const int errSSLDecompressFail = -9857; -const int CSSM_ATTRIBUTE_PUBLIC_KEY_FORMAT = 268435493; +const int errSSLHandshakeFail = -9858; -const int CSSM_ATTRIBUTE_PRIVATE_KEY_FORMAT = 268435494; +const int errSSLDecodeError = -9859; -const int CSSM_ATTRIBUTE_SYMMETRIC_KEY_FORMAT = 268435495; +const int errSSLInappropriateFallback = -9860; -const int CSSM_ATTRIBUTE_WRAPPED_KEY_FORMAT = 268435496; +const int errSSLMissingExtension = -9861; -const int CSSM_PADDING_NONE = 0; +const int errSSLBadCertificateStatusResponse = -9862; -const int CSSM_PADDING_CUSTOM = 1; +const int errSSLCertificateRequired = -9863; -const int CSSM_PADDING_ZERO = 2; +const int errSSLUnknownPSKIdentity = -9864; -const int CSSM_PADDING_ONE = 3; +const int errSSLUnrecognizedName = -9865; -const int CSSM_PADDING_ALTERNATE = 4; +const int errSSLATSViolation = -9880; -const int CSSM_PADDING_FF = 5; +const int errSSLATSMinimumVersionViolation = -9881; -const int CSSM_PADDING_PKCS5 = 6; +const int errSSLATSCiphersuiteViolation = -9882; -const int CSSM_PADDING_PKCS7 = 7; +const int errSSLATSMinimumKeySizeViolation = -9883; -const int CSSM_PADDING_CIPHERSTEALING = 8; +const int errSSLATSLeafCertificateHashAlgorithmViolation = -9884; -const int CSSM_PADDING_RANDOM = 9; +const int errSSLATSCertificateHashAlgorithmViolation = -9885; -const int CSSM_PADDING_PKCS1 = 10; +const int errSSLATSCertificateTrustViolation = -9886; -const int CSSM_PADDING_SIGRAW = 11; +const int errSSLEarlyDataRejected = -9890; -const int CSSM_PADDING_VENDOR_DEFINED = -2147483648; +const int OSUnknownByteOrder = 0; -const int CSSM_CSP_TOK_RNG = 1; +const int OSLittleEndian = 1; -const int CSSM_CSP_TOK_CLOCK_EXISTS = 64; +const int OSBigEndian = 2; -const int CSSM_CSP_RDR_TOKENPRESENT = 1; +const int kCFNotificationDeliverImmediately = 1; -const int CSSM_CSP_RDR_EXISTS = 2; +const int kCFNotificationPostToAllSessions = 2; -const int CSSM_CSP_RDR_HW = 4; +const int kCFCalendarComponentsWrap = 1; -const int CSSM_CSP_TOK_WRITE_PROTECTED = 2; +const int kCFSocketAutomaticallyReenableReadCallBack = 1; -const int CSSM_CSP_TOK_LOGIN_REQUIRED = 4; +const int kCFSocketAutomaticallyReenableAcceptCallBack = 2; -const int CSSM_CSP_TOK_USER_PIN_INITIALIZED = 8; +const int kCFSocketAutomaticallyReenableDataCallBack = 3; -const int CSSM_CSP_TOK_PROT_AUTHENTICATION = 256; +const int kCFSocketAutomaticallyReenableWriteCallBack = 8; -const int CSSM_CSP_TOK_USER_PIN_EXPIRED = 1048576; +const int kCFSocketLeaveErrors = 64; -const int CSSM_CSP_TOK_SESSION_KEY_PASSWORD = 2097152; +const int kCFSocketCloseOnInvalidate = 128; -const int CSSM_CSP_TOK_PRIVATE_KEY_PASSWORD = 4194304; +const int DISPATCH_WALLTIME_NOW = -2; -const int CSSM_CSP_STORES_PRIVATE_KEYS = 16777216; +const int kCFPropertyListReadCorruptError = 3840; -const int CSSM_CSP_STORES_PUBLIC_KEYS = 33554432; +const int kCFPropertyListReadUnknownVersionError = 3841; -const int CSSM_CSP_STORES_SESSION_KEYS = 67108864; +const int kCFPropertyListReadStreamError = 3842; -const int CSSM_CSP_STORES_CERTIFICATES = 134217728; +const int kCFPropertyListWriteStreamError = 3851; -const int CSSM_CSP_STORES_GENERIC = 268435456; +const int kCFBundleExecutableArchitectureI386 = 7; -const int CSSM_PKCS_OAEP_MGF_NONE = 0; +const int kCFBundleExecutableArchitecturePPC = 18; -const int CSSM_PKCS_OAEP_MGF1_SHA1 = 1; +const int kCFBundleExecutableArchitectureX86_64 = 16777223; -const int CSSM_PKCS_OAEP_MGF1_MD5 = 2; +const int kCFBundleExecutableArchitecturePPC64 = 16777234; -const int CSSM_PKCS_OAEP_PSOURCE_NONE = 0; +const int kCFBundleExecutableArchitectureARM64 = 16777228; -const int CSSM_PKCS_OAEP_PSOURCE_Pspecified = 1; +const int kCFMessagePortSuccess = 0; -const int CSSM_VALUE_NOT_AVAILABLE = -1; +const int kCFMessagePortSendTimeout = -1; -const int CSSM_PKCS5_PBKDF2_PRF_HMAC_SHA1 = 0; +const int kCFMessagePortReceiveTimeout = -2; -const int CSSM_TP_AUTHORITY_REQUEST_CERTISSUE = 1; +const int kCFMessagePortIsInvalid = -3; -const int CSSM_TP_AUTHORITY_REQUEST_CERTREVOKE = 2; +const int kCFMessagePortTransportError = -4; -const int CSSM_TP_AUTHORITY_REQUEST_CERTSUSPEND = 3; +const int kCFMessagePortBecameInvalidError = -5; -const int CSSM_TP_AUTHORITY_REQUEST_CERTRESUME = 4; +const int kCFStringTokenizerUnitWord = 0; -const int CSSM_TP_AUTHORITY_REQUEST_CERTVERIFY = 5; +const int kCFStringTokenizerUnitSentence = 1; -const int CSSM_TP_AUTHORITY_REQUEST_CERTNOTARIZE = 6; +const int kCFStringTokenizerUnitParagraph = 2; -const int CSSM_TP_AUTHORITY_REQUEST_CERTUSERECOVER = 7; +const int kCFStringTokenizerUnitLineBreak = 3; -const int CSSM_TP_AUTHORITY_REQUEST_CRLISSUE = 256; +const int kCFStringTokenizerUnitWordBoundary = 4; -const int CSSM_TP_KEY_ARCHIVE = 1; +const int kCFStringTokenizerAttributeLatinTranscription = 65536; -const int CSSM_TP_CERT_PUBLISH = 2; +const int kCFStringTokenizerAttributeLanguage = 131072; -const int CSSM_TP_CERT_NOTIFY_RENEW = 4; +const int kCFFileDescriptorReadCallBack = 1; -const int CSSM_TP_CERT_DIR_UPDATE = 8; +const int kCFFileDescriptorWriteCallBack = 2; -const int CSSM_TP_CRL_DISTRIBUTE = 16; +const int kCFUserNotificationStopAlertLevel = 0; -const int CSSM_TP_ACTION_DEFAULT = 0; +const int kCFUserNotificationNoteAlertLevel = 1; -const int CSSM_TP_STOP_ON_POLICY = 0; +const int kCFUserNotificationCautionAlertLevel = 2; -const int CSSM_TP_STOP_ON_NONE = 1; +const int kCFUserNotificationPlainAlertLevel = 3; -const int CSSM_TP_STOP_ON_FIRST_PASS = 2; +const int kCFUserNotificationDefaultResponse = 0; -const int CSSM_TP_STOP_ON_FIRST_FAIL = 3; +const int kCFUserNotificationAlternateResponse = 1; -const int CSSM_CRL_PARSE_FORMAT_NONE = 0; +const int kCFUserNotificationOtherResponse = 2; -const int CSSM_CRL_PARSE_FORMAT_CUSTOM = 1; +const int kCFUserNotificationCancelResponse = 3; -const int CSSM_CRL_PARSE_FORMAT_SEXPR = 2; +const int kCFUserNotificationNoDefaultButtonFlag = 32; -const int CSSM_CRL_PARSE_FORMAT_COMPLEX = 3; +const int kCFUserNotificationUseRadioButtonsFlag = 64; -const int CSSM_CRL_PARSE_FORMAT_OID_NAMED = 4; +const int kCFXMLNodeCurrentVersion = 1; -const int CSSM_CRL_PARSE_FORMAT_TUPLE = 5; +const int CSSM_INVALID_HANDLE = 0; -const int CSSM_CRL_PARSE_FORMAT_MULTIPLE = 32766; +const int CSSM_FALSE = 0; -const int CSSM_CRL_PARSE_FORMAT_LAST = 32767; +const int CSSM_TRUE = 1; -const int CSSM_CL_CUSTOM_CRL_PARSE_FORMAT = 32768; +const int CSSM_OK = 0; -const int CSSM_CRL_TYPE_UNKNOWN = 0; +const int CSSM_MODULE_STRING_SIZE = 64; -const int CSSM_CRL_TYPE_X_509v1 = 1; +const int CSSM_KEY_HIERARCHY_NONE = 0; -const int CSSM_CRL_TYPE_X_509v2 = 2; +const int CSSM_KEY_HIERARCHY_INTEG = 1; -const int CSSM_CRL_TYPE_SPKI = 3; +const int CSSM_KEY_HIERARCHY_EXPORT = 2; -const int CSSM_CRL_TYPE_MULTIPLE = 32766; +const int CSSM_PVC_NONE = 0; -const int CSSM_CRL_ENCODING_UNKNOWN = 0; +const int CSSM_PVC_APP = 1; -const int CSSM_CRL_ENCODING_CUSTOM = 1; +const int CSSM_PVC_SP = 2; -const int CSSM_CRL_ENCODING_BER = 2; +const int CSSM_PRIVILEGE_SCOPE_NONE = 0; -const int CSSM_CRL_ENCODING_DER = 3; +const int CSSM_PRIVILEGE_SCOPE_PROCESS = 1; -const int CSSM_CRL_ENCODING_BLOOM = 4; +const int CSSM_PRIVILEGE_SCOPE_THREAD = 2; -const int CSSM_CRL_ENCODING_SEXPR = 5; +const int CSSM_SERVICE_CSSM = 1; -const int CSSM_CRL_ENCODING_MULTIPLE = 32766; +const int CSSM_SERVICE_CSP = 2; -const int CSSM_CRLGROUP_DATA = 0; +const int CSSM_SERVICE_DL = 4; -const int CSSM_CRLGROUP_ENCODED_CRL = 1; +const int CSSM_SERVICE_CL = 8; -const int CSSM_CRLGROUP_PARSED_CRL = 2; +const int CSSM_SERVICE_TP = 16; -const int CSSM_CRLGROUP_CRL_PAIR = 3; +const int CSSM_SERVICE_AC = 32; -const int CSSM_EVIDENCE_FORM_UNSPECIFIC = 0; +const int CSSM_SERVICE_KR = 64; -const int CSSM_EVIDENCE_FORM_CERT = 1; +const int CSSM_NOTIFY_INSERT = 1; -const int CSSM_EVIDENCE_FORM_CRL = 2; +const int CSSM_NOTIFY_REMOVE = 2; -const int CSSM_EVIDENCE_FORM_CERT_ID = 3; +const int CSSM_NOTIFY_FAULT = 3; -const int CSSM_EVIDENCE_FORM_CRL_ID = 4; +const int CSSM_ATTACH_READ_ONLY = 1; -const int CSSM_EVIDENCE_FORM_VERIFIER_TIME = 5; +const int CSSM_USEE_LAST = 255; -const int CSSM_EVIDENCE_FORM_CRL_THISTIME = 6; +const int CSSM_USEE_NONE = 0; -const int CSSM_EVIDENCE_FORM_CRL_NEXTTIME = 7; +const int CSSM_USEE_DOMESTIC = 1; -const int CSSM_EVIDENCE_FORM_POLICYINFO = 8; +const int CSSM_USEE_FINANCIAL = 2; -const int CSSM_EVIDENCE_FORM_TUPLEGROUP = 9; +const int CSSM_USEE_KRLE = 3; -const int CSSM_TP_CONFIRM_STATUS_UNKNOWN = 0; +const int CSSM_USEE_KRENT = 4; -const int CSSM_TP_CONFIRM_ACCEPT = 1; +const int CSSM_USEE_SSL = 5; -const int CSSM_TP_CONFIRM_REJECT = 2; +const int CSSM_USEE_AUTHENTICATION = 6; -const int CSSM_ESTIMATED_TIME_UNKNOWN = -1; +const int CSSM_USEE_KEYEXCH = 7; -const int CSSM_ELAPSED_TIME_UNKNOWN = -1; +const int CSSM_USEE_MEDICAL = 8; -const int CSSM_ELAPSED_TIME_COMPLETE = -2; +const int CSSM_USEE_INSURANCE = 9; -const int CSSM_TP_CERTISSUE_STATUS_UNKNOWN = 0; +const int CSSM_USEE_WEAK = 10; -const int CSSM_TP_CERTISSUE_OK = 1; +const int CSSM_ADDR_NONE = 0; -const int CSSM_TP_CERTISSUE_OKWITHCERTMODS = 2; +const int CSSM_ADDR_CUSTOM = 1; -const int CSSM_TP_CERTISSUE_OKWITHSERVICEMODS = 3; +const int CSSM_ADDR_URL = 2; -const int CSSM_TP_CERTISSUE_REJECTED = 4; +const int CSSM_ADDR_SOCKADDR = 3; -const int CSSM_TP_CERTISSUE_NOT_AUTHORIZED = 5; +const int CSSM_ADDR_NAME = 4; -const int CSSM_TP_CERTISSUE_WILL_BE_REVOKED = 6; +const int CSSM_NET_PROTO_NONE = 0; -const int CSSM_TP_CERTCHANGE_NONE = 0; +const int CSSM_NET_PROTO_CUSTOM = 1; -const int CSSM_TP_CERTCHANGE_REVOKE = 1; +const int CSSM_NET_PROTO_UNSPECIFIED = 2; -const int CSSM_TP_CERTCHANGE_HOLD = 2; +const int CSSM_NET_PROTO_LDAP = 3; -const int CSSM_TP_CERTCHANGE_RELEASE = 3; +const int CSSM_NET_PROTO_LDAPS = 4; -const int CSSM_TP_CERTCHANGE_REASON_UNKNOWN = 0; +const int CSSM_NET_PROTO_LDAPNS = 5; -const int CSSM_TP_CERTCHANGE_REASON_KEYCOMPROMISE = 1; +const int CSSM_NET_PROTO_X500DAP = 6; -const int CSSM_TP_CERTCHANGE_REASON_CACOMPROMISE = 2; +const int CSSM_NET_PROTO_FTP = 7; -const int CSSM_TP_CERTCHANGE_REASON_CEASEOPERATION = 3; +const int CSSM_NET_PROTO_FTPS = 8; -const int CSSM_TP_CERTCHANGE_REASON_AFFILIATIONCHANGE = 4; +const int CSSM_NET_PROTO_OCSP = 9; -const int CSSM_TP_CERTCHANGE_REASON_SUPERCEDED = 5; +const int CSSM_NET_PROTO_CMP = 10; -const int CSSM_TP_CERTCHANGE_REASON_SUSPECTEDCOMPROMISE = 6; +const int CSSM_NET_PROTO_CMPS = 11; -const int CSSM_TP_CERTCHANGE_REASON_HOLDRELEASE = 7; +const int CSSM_WORDID__UNK_ = -1; -const int CSSM_TP_CERTCHANGE_STATUS_UNKNOWN = 0; +const int CSSM_WORDID__NLU_ = 0; -const int CSSM_TP_CERTCHANGE_OK = 1; +const int CSSM_WORDID__STAR_ = 1; -const int CSSM_TP_CERTCHANGE_OKWITHNEWTIME = 2; +const int CSSM_WORDID_A = 2; -const int CSSM_TP_CERTCHANGE_WRONGCA = 3; +const int CSSM_WORDID_ACL = 3; -const int CSSM_TP_CERTCHANGE_REJECTED = 4; +const int CSSM_WORDID_ALPHA = 4; -const int CSSM_TP_CERTCHANGE_NOT_AUTHORIZED = 5; +const int CSSM_WORDID_B = 5; -const int CSSM_TP_CERTVERIFY_UNKNOWN = 0; +const int CSSM_WORDID_BER = 6; -const int CSSM_TP_CERTVERIFY_VALID = 1; +const int CSSM_WORDID_BINARY = 7; -const int CSSM_TP_CERTVERIFY_INVALID = 2; +const int CSSM_WORDID_BIOMETRIC = 8; -const int CSSM_TP_CERTVERIFY_REVOKED = 3; +const int CSSM_WORDID_C = 9; -const int CSSM_TP_CERTVERIFY_SUSPENDED = 4; +const int CSSM_WORDID_CANCELED = 10; -const int CSSM_TP_CERTVERIFY_EXPIRED = 5; +const int CSSM_WORDID_CERT = 11; -const int CSSM_TP_CERTVERIFY_NOT_VALID_YET = 6; +const int CSSM_WORDID_COMMENT = 12; -const int CSSM_TP_CERTVERIFY_INVALID_AUTHORITY = 7; +const int CSSM_WORDID_CRL = 13; -const int CSSM_TP_CERTVERIFY_INVALID_SIGNATURE = 8; +const int CSSM_WORDID_CUSTOM = 14; -const int CSSM_TP_CERTVERIFY_INVALID_CERT_VALUE = 9; +const int CSSM_WORDID_D = 15; -const int CSSM_TP_CERTVERIFY_INVALID_CERTGROUP = 10; +const int CSSM_WORDID_DATE = 16; -const int CSSM_TP_CERTVERIFY_INVALID_POLICY = 11; +const int CSSM_WORDID_DB_DELETE = 17; -const int CSSM_TP_CERTVERIFY_INVALID_POLICY_IDS = 12; +const int CSSM_WORDID_DB_EXEC_STORED_QUERY = 18; -const int CSSM_TP_CERTVERIFY_INVALID_BASIC_CONSTRAINTS = 13; +const int CSSM_WORDID_DB_INSERT = 19; -const int CSSM_TP_CERTVERIFY_INVALID_CRL_DIST_PT = 14; +const int CSSM_WORDID_DB_MODIFY = 20; -const int CSSM_TP_CERTVERIFY_INVALID_NAME_TREE = 15; +const int CSSM_WORDID_DB_READ = 21; -const int CSSM_TP_CERTVERIFY_UNKNOWN_CRITICAL_EXT = 16; +const int CSSM_WORDID_DBS_CREATE = 22; -const int CSSM_TP_CERTNOTARIZE_STATUS_UNKNOWN = 0; +const int CSSM_WORDID_DBS_DELETE = 23; -const int CSSM_TP_CERTNOTARIZE_OK = 1; +const int CSSM_WORDID_DECRYPT = 24; -const int CSSM_TP_CERTNOTARIZE_OKWITHOUTFIELDS = 2; +const int CSSM_WORDID_DELETE = 25; -const int CSSM_TP_CERTNOTARIZE_OKWITHSERVICEMODS = 3; +const int CSSM_WORDID_DELTA_CRL = 26; -const int CSSM_TP_CERTNOTARIZE_REJECTED = 4; +const int CSSM_WORDID_DER = 27; -const int CSSM_TP_CERTNOTARIZE_NOT_AUTHORIZED = 5; +const int CSSM_WORDID_DERIVE = 28; -const int CSSM_TP_CERTRECLAIM_STATUS_UNKNOWN = 0; +const int CSSM_WORDID_DISPLAY = 29; -const int CSSM_TP_CERTRECLAIM_OK = 1; +const int CSSM_WORDID_DO = 30; -const int CSSM_TP_CERTRECLAIM_NOMATCH = 2; +const int CSSM_WORDID_DSA = 31; -const int CSSM_TP_CERTRECLAIM_REJECTED = 3; +const int CSSM_WORDID_DSA_SHA1 = 32; -const int CSSM_TP_CERTRECLAIM_NOT_AUTHORIZED = 4; +const int CSSM_WORDID_E = 33; -const int CSSM_TP_CRLISSUE_STATUS_UNKNOWN = 0; +const int CSSM_WORDID_ELGAMAL = 34; -const int CSSM_TP_CRLISSUE_OK = 1; +const int CSSM_WORDID_ENCRYPT = 35; -const int CSSM_TP_CRLISSUE_NOT_CURRENT = 2; +const int CSSM_WORDID_ENTRY = 36; -const int CSSM_TP_CRLISSUE_INVALID_DOMAIN = 3; +const int CSSM_WORDID_EXPORT_CLEAR = 37; -const int CSSM_TP_CRLISSUE_UNKNOWN_IDENTIFIER = 4; +const int CSSM_WORDID_EXPORT_WRAPPED = 38; -const int CSSM_TP_CRLISSUE_REJECTED = 5; +const int CSSM_WORDID_G = 39; -const int CSSM_TP_CRLISSUE_NOT_AUTHORIZED = 6; +const int CSSM_WORDID_GE = 40; -const int CSSM_TP_FORM_TYPE_GENERIC = 0; +const int CSSM_WORDID_GENKEY = 41; -const int CSSM_TP_FORM_TYPE_REGISTRATION = 1; +const int CSSM_WORDID_HASH = 42; -const int CSSM_CL_TEMPLATE_INTERMEDIATE_CERT = 1; +const int CSSM_WORDID_HASHED_PASSWORD = 43; -const int CSSM_CL_TEMPLATE_PKIX_CERTTEMPLATE = 2; +const int CSSM_WORDID_HASHED_SUBJECT = 44; -const int CSSM_CERT_BUNDLE_UNKNOWN = 0; +const int CSSM_WORDID_HAVAL = 45; -const int CSSM_CERT_BUNDLE_CUSTOM = 1; +const int CSSM_WORDID_IBCHASH = 46; -const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_DATA = 2; +const int CSSM_WORDID_IMPORT_CLEAR = 47; -const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_ENVELOPED_DATA = 3; +const int CSSM_WORDID_IMPORT_WRAPPED = 48; -const int CSSM_CERT_BUNDLE_PKCS12 = 4; +const int CSSM_WORDID_INTEL = 49; -const int CSSM_CERT_BUNDLE_PFX = 5; +const int CSSM_WORDID_ISSUER = 50; -const int CSSM_CERT_BUNDLE_SPKI_SEQUENCE = 6; +const int CSSM_WORDID_ISSUER_INFO = 51; -const int CSSM_CERT_BUNDLE_PGP_KEYRING = 7; +const int CSSM_WORDID_K_OF_N = 52; -const int CSSM_CERT_BUNDLE_LAST = 32767; +const int CSSM_WORDID_KEA = 53; -const int CSSM_CL_CUSTOM_CERT_BUNDLE_TYPE = 32768; +const int CSSM_WORDID_KEYHOLDER = 54; -const int CSSM_CERT_BUNDLE_ENCODING_UNKNOWN = 0; +const int CSSM_WORDID_L = 55; -const int CSSM_CERT_BUNDLE_ENCODING_CUSTOM = 1; +const int CSSM_WORDID_LE = 56; -const int CSSM_CERT_BUNDLE_ENCODING_BER = 2; +const int CSSM_WORDID_LOGIN = 57; -const int CSSM_CERT_BUNDLE_ENCODING_DER = 3; +const int CSSM_WORDID_LOGIN_NAME = 58; -const int CSSM_CERT_BUNDLE_ENCODING_SEXPR = 4; +const int CSSM_WORDID_MAC = 59; -const int CSSM_CERT_BUNDLE_ENCODING_PGP = 5; +const int CSSM_WORDID_MD2 = 60; -const int CSSM_FIELDVALUE_COMPLEX_DATA_TYPE = -1; +const int CSSM_WORDID_MD2WITHRSA = 61; -const int CSSM_DB_ATTRIBUTE_NAME_AS_STRING = 0; +const int CSSM_WORDID_MD4 = 62; -const int CSSM_DB_ATTRIBUTE_NAME_AS_OID = 1; +const int CSSM_WORDID_MD5 = 63; -const int CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER = 2; +const int CSSM_WORDID_MD5WITHRSA = 64; -const int CSSM_DB_ATTRIBUTE_FORMAT_STRING = 0; +const int CSSM_WORDID_N = 65; -const int CSSM_DB_ATTRIBUTE_FORMAT_SINT32 = 1; +const int CSSM_WORDID_NAME = 66; -const int CSSM_DB_ATTRIBUTE_FORMAT_UINT32 = 2; +const int CSSM_WORDID_NDR = 67; -const int CSSM_DB_ATTRIBUTE_FORMAT_BIG_NUM = 3; +const int CSSM_WORDID_NHASH = 68; -const int CSSM_DB_ATTRIBUTE_FORMAT_REAL = 4; +const int CSSM_WORDID_NOT_AFTER = 69; -const int CSSM_DB_ATTRIBUTE_FORMAT_TIME_DATE = 5; +const int CSSM_WORDID_NOT_BEFORE = 70; -const int CSSM_DB_ATTRIBUTE_FORMAT_BLOB = 6; +const int CSSM_WORDID_NULL = 71; -const int CSSM_DB_ATTRIBUTE_FORMAT_MULTI_UINT32 = 7; +const int CSSM_WORDID_NUMERIC = 72; -const int CSSM_DB_ATTRIBUTE_FORMAT_COMPLEX = 8; +const int CSSM_WORDID_OBJECT_HASH = 73; -const int CSSM_DB_RECORDTYPE_SCHEMA_START = 0; +const int CSSM_WORDID_ONE_TIME = 74; -const int CSSM_DB_RECORDTYPE_SCHEMA_END = 4; +const int CSSM_WORDID_ONLINE = 75; -const int CSSM_DB_RECORDTYPE_OPEN_GROUP_START = 10; +const int CSSM_WORDID_OWNER = 76; -const int CSSM_DB_RECORDTYPE_OPEN_GROUP_END = 18; +const int CSSM_WORDID_P = 77; -const int CSSM_DB_RECORDTYPE_APP_DEFINED_START = -2147483648; +const int CSSM_WORDID_PAM_NAME = 78; -const int CSSM_DB_RECORDTYPE_APP_DEFINED_END = -1; +const int CSSM_WORDID_PASSWORD = 79; -const int CSSM_DL_DB_SCHEMA_INFO = 0; +const int CSSM_WORDID_PGP = 80; -const int CSSM_DL_DB_SCHEMA_INDEXES = 1; +const int CSSM_WORDID_PREFIX = 81; -const int CSSM_DL_DB_SCHEMA_ATTRIBUTES = 2; +const int CSSM_WORDID_PRIVATE_KEY = 82; -const int CSSM_DL_DB_SCHEMA_PARSING_MODULE = 3; +const int CSSM_WORDID_PROMPTED_BIOMETRIC = 83; -const int CSSM_DL_DB_RECORD_ANY = 10; +const int CSSM_WORDID_PROMPTED_PASSWORD = 84; -const int CSSM_DL_DB_RECORD_CERT = 11; +const int CSSM_WORDID_PROPAGATE = 85; -const int CSSM_DL_DB_RECORD_CRL = 12; +const int CSSM_WORDID_PROTECTED_BIOMETRIC = 86; -const int CSSM_DL_DB_RECORD_POLICY = 13; +const int CSSM_WORDID_PROTECTED_PASSWORD = 87; -const int CSSM_DL_DB_RECORD_GENERIC = 14; +const int CSSM_WORDID_PROTECTED_PIN = 88; -const int CSSM_DL_DB_RECORD_PUBLIC_KEY = 15; +const int CSSM_WORDID_PUBLIC_KEY = 89; -const int CSSM_DL_DB_RECORD_PRIVATE_KEY = 16; +const int CSSM_WORDID_PUBLIC_KEY_FROM_CERT = 90; -const int CSSM_DL_DB_RECORD_SYMMETRIC_KEY = 17; +const int CSSM_WORDID_Q = 91; -const int CSSM_DL_DB_RECORD_ALL_KEYS = 18; +const int CSSM_WORDID_RANGE = 92; -const int CSSM_DB_CERT_USE_TRUSTED = 1; +const int CSSM_WORDID_REVAL = 93; -const int CSSM_DB_CERT_USE_SYSTEM = 2; +const int CSSM_WORDID_RIPEMAC = 94; -const int CSSM_DB_CERT_USE_OWNER = 4; +const int CSSM_WORDID_RIPEMD = 95; -const int CSSM_DB_CERT_USE_REVOKED = 8; +const int CSSM_WORDID_RIPEMD160 = 96; -const int CSSM_DB_CERT_USE_SIGNING = 16; +const int CSSM_WORDID_RSA = 97; -const int CSSM_DB_CERT_USE_PRIVACY = 32; +const int CSSM_WORDID_RSA_ISO9796 = 98; -const int CSSM_DB_INDEX_UNIQUE = 0; +const int CSSM_WORDID_RSA_PKCS = 99; -const int CSSM_DB_INDEX_NONUNIQUE = 1; +const int CSSM_WORDID_RSA_PKCS_MD5 = 100; -const int CSSM_DB_INDEX_ON_UNKNOWN = 0; +const int CSSM_WORDID_RSA_PKCS_SHA1 = 101; -const int CSSM_DB_INDEX_ON_ATTRIBUTE = 1; +const int CSSM_WORDID_RSA_PKCS1 = 102; -const int CSSM_DB_INDEX_ON_RECORD = 2; +const int CSSM_WORDID_RSA_PKCS1_MD5 = 103; -const int CSSM_DB_ACCESS_READ = 1; +const int CSSM_WORDID_RSA_PKCS1_SHA1 = 104; -const int CSSM_DB_ACCESS_WRITE = 2; +const int CSSM_WORDID_RSA_PKCS1_SIG = 105; -const int CSSM_DB_ACCESS_PRIVILEGED = 4; +const int CSSM_WORDID_RSA_RAW = 106; -const int CSSM_DB_MODIFY_ATTRIBUTE_NONE = 0; +const int CSSM_WORDID_SDSIV1 = 107; -const int CSSM_DB_MODIFY_ATTRIBUTE_ADD = 1; +const int CSSM_WORDID_SEQUENCE = 108; -const int CSSM_DB_MODIFY_ATTRIBUTE_DELETE = 2; +const int CSSM_WORDID_SET = 109; -const int CSSM_DB_MODIFY_ATTRIBUTE_REPLACE = 3; +const int CSSM_WORDID_SEXPR = 110; -const int CSSM_DB_EQUAL = 0; +const int CSSM_WORDID_SHA1 = 111; -const int CSSM_DB_NOT_EQUAL = 1; +const int CSSM_WORDID_SHA1WITHDSA = 112; -const int CSSM_DB_LESS_THAN = 2; +const int CSSM_WORDID_SHA1WITHECDSA = 113; -const int CSSM_DB_GREATER_THAN = 3; +const int CSSM_WORDID_SHA1WITHRSA = 114; -const int CSSM_DB_CONTAINS = 4; +const int CSSM_WORDID_SIGN = 115; -const int CSSM_DB_CONTAINS_INITIAL_SUBSTRING = 5; +const int CSSM_WORDID_SIGNATURE = 116; -const int CSSM_DB_CONTAINS_FINAL_SUBSTRING = 6; +const int CSSM_WORDID_SIGNED_NONCE = 117; -const int CSSM_DB_NONE = 0; +const int CSSM_WORDID_SIGNED_SECRET = 118; -const int CSSM_DB_AND = 1; +const int CSSM_WORDID_SPKI = 119; -const int CSSM_DB_OR = 2; +const int CSSM_WORDID_SUBJECT = 120; -const int CSSM_QUERY_TIMELIMIT_NONE = 0; +const int CSSM_WORDID_SUBJECT_INFO = 121; -const int CSSM_QUERY_SIZELIMIT_NONE = 0; +const int CSSM_WORDID_TAG = 122; -const int CSSM_QUERY_RETURN_DATA = 1; +const int CSSM_WORDID_THRESHOLD = 123; -const int CSSM_DL_UNKNOWN = 0; +const int CSSM_WORDID_TIME = 124; -const int CSSM_DL_CUSTOM = 1; +const int CSSM_WORDID_URI = 125; -const int CSSM_DL_LDAP = 2; +const int CSSM_WORDID_VERSION = 126; -const int CSSM_DL_ODBC = 3; +const int CSSM_WORDID_X509_ATTRIBUTE = 127; -const int CSSM_DL_PKCS11 = 4; +const int CSSM_WORDID_X509V1 = 128; -const int CSSM_DL_FFS = 5; +const int CSSM_WORDID_X509V2 = 129; -const int CSSM_DL_MEMORY = 6; +const int CSSM_WORDID_X509V3 = 130; -const int CSSM_DL_REMOTEDIR = 7; +const int CSSM_WORDID_X9_ATTRIBUTE = 131; -const int CSSM_DB_DATASTORES_UNKNOWN = -1; +const int CSSM_WORDID_VENDOR_START = 65536; -const int CSSM_DB_TRANSACTIONAL_MODE = 0; +const int CSSM_WORDID_VENDOR_END = 2147418112; -const int CSSM_DB_FILESYSTEMSCAN_MODE = 1; +const int CSSM_LIST_ELEMENT_DATUM = 0; -const int CSSM_BASE_ERROR = -2147418112; +const int CSSM_LIST_ELEMENT_SUBLIST = 1; -const int CSSM_ERRORCODE_MODULE_EXTENT = 2048; +const int CSSM_LIST_ELEMENT_WORDID = 2; -const int CSSM_ERRORCODE_CUSTOM_OFFSET = 1024; +const int CSSM_LIST_TYPE_UNKNOWN = 0; -const int CSSM_ERRORCODE_COMMON_EXTENT = 256; +const int CSSM_LIST_TYPE_CUSTOM = 1; -const int CSSM_CSSM_BASE_ERROR = -2147418112; +const int CSSM_LIST_TYPE_SEXPR = 2; -const int CSSM_CSSM_PRIVATE_ERROR = -2147417088; +const int CSSM_SAMPLE_TYPE_PASSWORD = 79; -const int CSSM_CSP_BASE_ERROR = -2147416064; +const int CSSM_SAMPLE_TYPE_HASHED_PASSWORD = 43; -const int CSSM_CSP_PRIVATE_ERROR = -2147415040; +const int CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD = 87; -const int CSSM_DL_BASE_ERROR = -2147414016; +const int CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD = 84; -const int CSSM_DL_PRIVATE_ERROR = -2147412992; +const int CSSM_SAMPLE_TYPE_SIGNED_NONCE = 117; -const int CSSM_CL_BASE_ERROR = -2147411968; +const int CSSM_SAMPLE_TYPE_SIGNED_SECRET = 118; -const int CSSM_CL_PRIVATE_ERROR = -2147410944; +const int CSSM_SAMPLE_TYPE_BIOMETRIC = 8; -const int CSSM_TP_BASE_ERROR = -2147409920; +const int CSSM_SAMPLE_TYPE_PROTECTED_BIOMETRIC = 86; -const int CSSM_TP_PRIVATE_ERROR = -2147408896; +const int CSSM_SAMPLE_TYPE_PROMPTED_BIOMETRIC = 83; -const int CSSM_KR_BASE_ERROR = -2147407872; +const int CSSM_SAMPLE_TYPE_THRESHOLD = 123; -const int CSSM_KR_PRIVATE_ERROR = -2147406848; +const int CSSM_CERT_UNKNOWN = 0; -const int CSSM_AC_BASE_ERROR = -2147405824; +const int CSSM_CERT_X_509v1 = 1; -const int CSSM_AC_PRIVATE_ERROR = -2147404800; +const int CSSM_CERT_X_509v2 = 2; -const int CSSM_MDS_BASE_ERROR = -2147414016; +const int CSSM_CERT_X_509v3 = 3; -const int CSSM_MDS_PRIVATE_ERROR = -2147412992; +const int CSSM_CERT_PGP = 4; -const int CSSMERR_CSSM_INVALID_ADDIN_HANDLE = -2147417855; +const int CSSM_CERT_SPKI = 5; -const int CSSMERR_CSSM_NOT_INITIALIZED = -2147417854; +const int CSSM_CERT_SDSIv1 = 6; -const int CSSMERR_CSSM_INVALID_HANDLE_USAGE = -2147417853; +const int CSSM_CERT_Intel = 8; -const int CSSMERR_CSSM_PVC_REFERENT_NOT_FOUND = -2147417852; +const int CSSM_CERT_X_509_ATTRIBUTE = 9; -const int CSSMERR_CSSM_FUNCTION_INTEGRITY_FAIL = -2147417851; +const int CSSM_CERT_X9_ATTRIBUTE = 10; -const int CSSM_ERRCODE_INTERNAL_ERROR = 1; +const int CSSM_CERT_TUPLE = 11; -const int CSSM_ERRCODE_MEMORY_ERROR = 2; +const int CSSM_CERT_ACL_ENTRY = 12; -const int CSSM_ERRCODE_MDS_ERROR = 3; +const int CSSM_CERT_MULTIPLE = 32766; -const int CSSM_ERRCODE_INVALID_POINTER = 4; +const int CSSM_CERT_LAST = 32767; -const int CSSM_ERRCODE_INVALID_INPUT_POINTER = 5; +const int CSSM_CL_CUSTOM_CERT_TYPE = 32768; -const int CSSM_ERRCODE_INVALID_OUTPUT_POINTER = 6; +const int CSSM_CERT_ENCODING_UNKNOWN = 0; -const int CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED = 7; +const int CSSM_CERT_ENCODING_CUSTOM = 1; -const int CSSM_ERRCODE_SELF_CHECK_FAILED = 8; +const int CSSM_CERT_ENCODING_BER = 2; -const int CSSM_ERRCODE_OS_ACCESS_DENIED = 9; +const int CSSM_CERT_ENCODING_DER = 3; -const int CSSM_ERRCODE_FUNCTION_FAILED = 10; +const int CSSM_CERT_ENCODING_NDR = 4; -const int CSSM_ERRCODE_MODULE_MANIFEST_VERIFY_FAILED = 11; +const int CSSM_CERT_ENCODING_SEXPR = 5; -const int CSSM_ERRCODE_INVALID_GUID = 12; +const int CSSM_CERT_ENCODING_PGP = 6; -const int CSSM_ERRCODE_OPERATION_AUTH_DENIED = 32; +const int CSSM_CERT_ENCODING_MULTIPLE = 32766; -const int CSSM_ERRCODE_OBJECT_USE_AUTH_DENIED = 33; +const int CSSM_CERT_ENCODING_LAST = 32767; -const int CSSM_ERRCODE_OBJECT_MANIP_AUTH_DENIED = 34; +const int CSSM_CL_CUSTOM_CERT_ENCODING = 32768; -const int CSSM_ERRCODE_OBJECT_ACL_NOT_SUPPORTED = 35; +const int CSSM_CERT_PARSE_FORMAT_NONE = 0; -const int CSSM_ERRCODE_OBJECT_ACL_REQUIRED = 36; +const int CSSM_CERT_PARSE_FORMAT_CUSTOM = 1; -const int CSSM_ERRCODE_INVALID_ACCESS_CREDENTIALS = 37; +const int CSSM_CERT_PARSE_FORMAT_SEXPR = 2; -const int CSSM_ERRCODE_INVALID_ACL_BASE_CERTS = 38; +const int CSSM_CERT_PARSE_FORMAT_COMPLEX = 3; -const int CSSM_ERRCODE_ACL_BASE_CERTS_NOT_SUPPORTED = 39; +const int CSSM_CERT_PARSE_FORMAT_OID_NAMED = 4; -const int CSSM_ERRCODE_INVALID_SAMPLE_VALUE = 40; +const int CSSM_CERT_PARSE_FORMAT_TUPLE = 5; -const int CSSM_ERRCODE_SAMPLE_VALUE_NOT_SUPPORTED = 41; +const int CSSM_CERT_PARSE_FORMAT_MULTIPLE = 32766; -const int CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE = 42; +const int CSSM_CERT_PARSE_FORMAT_LAST = 32767; -const int CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED = 43; +const int CSSM_CL_CUSTOM_CERT_PARSE_FORMAT = 32768; -const int CSSM_ERRCODE_INVALID_ACL_CHALLENGE_CALLBACK = 44; +const int CSSM_CERTGROUP_DATA = 0; -const int CSSM_ERRCODE_ACL_CHALLENGE_CALLBACK_FAILED = 45; +const int CSSM_CERTGROUP_ENCODED_CERT = 1; -const int CSSM_ERRCODE_INVALID_ACL_ENTRY_TAG = 46; +const int CSSM_CERTGROUP_PARSED_CERT = 2; -const int CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND = 47; +const int CSSM_CERTGROUP_CERT_PAIR = 3; -const int CSSM_ERRCODE_INVALID_ACL_EDIT_MODE = 48; +const int CSSM_ACL_SUBJECT_TYPE_ANY = 1; -const int CSSM_ERRCODE_ACL_CHANGE_FAILED = 49; +const int CSSM_ACL_SUBJECT_TYPE_THRESHOLD = 123; -const int CSSM_ERRCODE_INVALID_NEW_ACL_ENTRY = 50; +const int CSSM_ACL_SUBJECT_TYPE_PASSWORD = 79; -const int CSSM_ERRCODE_INVALID_NEW_ACL_OWNER = 51; +const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD = 87; -const int CSSM_ERRCODE_ACL_DELETE_FAILED = 52; +const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD = 84; -const int CSSM_ERRCODE_ACL_REPLACE_FAILED = 53; +const int CSSM_ACL_SUBJECT_TYPE_PUBLIC_KEY = 89; -const int CSSM_ERRCODE_ACL_ADD_FAILED = 54; +const int CSSM_ACL_SUBJECT_TYPE_HASHED_SUBJECT = 44; -const int CSSM_ERRCODE_INVALID_CONTEXT_HANDLE = 64; +const int CSSM_ACL_SUBJECT_TYPE_BIOMETRIC = 8; -const int CSSM_ERRCODE_INCOMPATIBLE_VERSION = 65; +const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_BIOMETRIC = 86; -const int CSSM_ERRCODE_INVALID_CERTGROUP_POINTER = 66; +const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_BIOMETRIC = 83; -const int CSSM_ERRCODE_INVALID_CERT_POINTER = 67; +const int CSSM_ACL_SUBJECT_TYPE_LOGIN_NAME = 58; -const int CSSM_ERRCODE_INVALID_CRL_POINTER = 68; +const int CSSM_ACL_SUBJECT_TYPE_EXT_PAM_NAME = 78; -const int CSSM_ERRCODE_INVALID_FIELD_POINTER = 69; +const int CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START = 65536; -const int CSSM_ERRCODE_INVALID_DATA = 70; +const int CSSM_ACL_AUTHORIZATION_ANY = 1; -const int CSSM_ERRCODE_CRL_ALREADY_SIGNED = 71; +const int CSSM_ACL_AUTHORIZATION_LOGIN = 57; -const int CSSM_ERRCODE_INVALID_NUMBER_OF_FIELDS = 72; +const int CSSM_ACL_AUTHORIZATION_GENKEY = 41; -const int CSSM_ERRCODE_VERIFICATION_FAILURE = 73; +const int CSSM_ACL_AUTHORIZATION_DELETE = 25; -const int CSSM_ERRCODE_INVALID_DB_HANDLE = 74; +const int CSSM_ACL_AUTHORIZATION_EXPORT_WRAPPED = 38; -const int CSSM_ERRCODE_PRIVILEGE_NOT_GRANTED = 75; +const int CSSM_ACL_AUTHORIZATION_EXPORT_CLEAR = 37; -const int CSSM_ERRCODE_INVALID_DB_LIST = 76; +const int CSSM_ACL_AUTHORIZATION_IMPORT_WRAPPED = 48; -const int CSSM_ERRCODE_INVALID_DB_LIST_POINTER = 77; +const int CSSM_ACL_AUTHORIZATION_IMPORT_CLEAR = 47; -const int CSSM_ERRCODE_UNKNOWN_FORMAT = 78; +const int CSSM_ACL_AUTHORIZATION_SIGN = 115; -const int CSSM_ERRCODE_UNKNOWN_TAG = 79; +const int CSSM_ACL_AUTHORIZATION_ENCRYPT = 35; -const int CSSM_ERRCODE_INVALID_CSP_HANDLE = 80; +const int CSSM_ACL_AUTHORIZATION_DECRYPT = 24; -const int CSSM_ERRCODE_INVALID_DL_HANDLE = 81; +const int CSSM_ACL_AUTHORIZATION_MAC = 59; -const int CSSM_ERRCODE_INVALID_CL_HANDLE = 82; +const int CSSM_ACL_AUTHORIZATION_DERIVE = 28; -const int CSSM_ERRCODE_INVALID_TP_HANDLE = 83; +const int CSSM_ACL_AUTHORIZATION_DBS_CREATE = 22; -const int CSSM_ERRCODE_INVALID_KR_HANDLE = 84; +const int CSSM_ACL_AUTHORIZATION_DBS_DELETE = 23; -const int CSSM_ERRCODE_INVALID_AC_HANDLE = 85; +const int CSSM_ACL_AUTHORIZATION_DB_READ = 21; -const int CSSM_ERRCODE_INVALID_PASSTHROUGH_ID = 86; +const int CSSM_ACL_AUTHORIZATION_DB_INSERT = 19; -const int CSSM_ERRCODE_INVALID_NETWORK_ADDR = 87; +const int CSSM_ACL_AUTHORIZATION_DB_MODIFY = 20; -const int CSSM_ERRCODE_INVALID_CRYPTO_DATA = 88; +const int CSSM_ACL_AUTHORIZATION_DB_DELETE = 17; -const int CSSMERR_CSSM_INTERNAL_ERROR = -2147418111; +const int CSSM_ACL_EDIT_MODE_ADD = 1; -const int CSSMERR_CSSM_MEMORY_ERROR = -2147418110; +const int CSSM_ACL_EDIT_MODE_DELETE = 2; -const int CSSMERR_CSSM_MDS_ERROR = -2147418109; +const int CSSM_ACL_EDIT_MODE_REPLACE = 3; -const int CSSMERR_CSSM_INVALID_POINTER = -2147418108; +const int CSSM_KEYHEADER_VERSION = 2; -const int CSSMERR_CSSM_INVALID_INPUT_POINTER = -2147418107; +const int CSSM_KEYBLOB_RAW = 0; -const int CSSMERR_CSSM_INVALID_OUTPUT_POINTER = -2147418106; +const int CSSM_KEYBLOB_REFERENCE = 2; -const int CSSMERR_CSSM_FUNCTION_NOT_IMPLEMENTED = -2147418105; +const int CSSM_KEYBLOB_WRAPPED = 3; -const int CSSMERR_CSSM_SELF_CHECK_FAILED = -2147418104; +const int CSSM_KEYBLOB_OTHER = -1; -const int CSSMERR_CSSM_OS_ACCESS_DENIED = -2147418103; +const int CSSM_KEYBLOB_RAW_FORMAT_NONE = 0; -const int CSSMERR_CSSM_FUNCTION_FAILED = -2147418102; +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS1 = 1; -const int CSSMERR_CSSM_MODULE_MANIFEST_VERIFY_FAILED = -2147418101; +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS3 = 2; -const int CSSMERR_CSSM_INVALID_GUID = -2147418100; +const int CSSM_KEYBLOB_RAW_FORMAT_MSCAPI = 3; -const int CSSMERR_CSSM_INVALID_CONTEXT_HANDLE = -2147418048; +const int CSSM_KEYBLOB_RAW_FORMAT_PGP = 4; -const int CSSMERR_CSSM_INCOMPATIBLE_VERSION = -2147418047; +const int CSSM_KEYBLOB_RAW_FORMAT_FIPS186 = 5; -const int CSSMERR_CSSM_PRIVILEGE_NOT_GRANTED = -2147418037; +const int CSSM_KEYBLOB_RAW_FORMAT_BSAFE = 6; -const int CSSM_CSSM_BASE_CSSM_ERROR = -2147417840; +const int CSSM_KEYBLOB_RAW_FORMAT_CCA = 9; -const int CSSMERR_CSSM_SCOPE_NOT_SUPPORTED = -2147417839; +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS8 = 10; -const int CSSMERR_CSSM_PVC_ALREADY_CONFIGURED = -2147417838; +const int CSSM_KEYBLOB_RAW_FORMAT_SPKI = 11; -const int CSSMERR_CSSM_INVALID_PVC = -2147417837; +const int CSSM_KEYBLOB_RAW_FORMAT_OCTET_STRING = 12; -const int CSSMERR_CSSM_EMM_LOAD_FAILED = -2147417836; +const int CSSM_KEYBLOB_RAW_FORMAT_OTHER = -1; -const int CSSMERR_CSSM_EMM_UNLOAD_FAILED = -2147417835; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_NONE = 0; -const int CSSMERR_CSSM_ADDIN_LOAD_FAILED = -2147417834; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS8 = 1; -const int CSSMERR_CSSM_INVALID_KEY_HIERARCHY = -2147417833; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS7 = 2; -const int CSSMERR_CSSM_ADDIN_UNLOAD_FAILED = -2147417832; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_MSCAPI = 3; -const int CSSMERR_CSSM_LIB_REF_NOT_FOUND = -2147417831; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OTHER = -1; -const int CSSMERR_CSSM_INVALID_ADDIN_FUNCTION_TABLE = -2147417830; +const int CSSM_KEYBLOB_REF_FORMAT_INTEGER = 0; -const int CSSMERR_CSSM_EMM_AUTHENTICATE_FAILED = -2147417829; +const int CSSM_KEYBLOB_REF_FORMAT_STRING = 1; -const int CSSMERR_CSSM_ADDIN_AUTHENTICATE_FAILED = -2147417828; +const int CSSM_KEYBLOB_REF_FORMAT_SPKI = 2; -const int CSSMERR_CSSM_INVALID_SERVICE_MASK = -2147417827; +const int CSSM_KEYBLOB_REF_FORMAT_OTHER = -1; -const int CSSMERR_CSSM_MODULE_NOT_LOADED = -2147417826; +const int CSSM_KEYCLASS_PUBLIC_KEY = 0; -const int CSSMERR_CSSM_INVALID_SUBSERVICEID = -2147417825; +const int CSSM_KEYCLASS_PRIVATE_KEY = 1; -const int CSSMERR_CSSM_BUFFER_TOO_SMALL = -2147417824; +const int CSSM_KEYCLASS_SESSION_KEY = 2; -const int CSSMERR_CSSM_INVALID_ATTRIBUTE = -2147417823; +const int CSSM_KEYCLASS_SECRET_PART = 3; -const int CSSMERR_CSSM_ATTRIBUTE_NOT_IN_CONTEXT = -2147417822; +const int CSSM_KEYCLASS_OTHER = -1; -const int CSSMERR_CSSM_MODULE_MANAGER_INITIALIZE_FAIL = -2147417821; +const int CSSM_KEYATTR_RETURN_DEFAULT = 0; -const int CSSMERR_CSSM_MODULE_MANAGER_NOT_FOUND = -2147417820; +const int CSSM_KEYATTR_RETURN_DATA = 268435456; -const int CSSMERR_CSSM_EVENT_NOTIFICATION_CALLBACK_NOT_FOUND = -2147417819; +const int CSSM_KEYATTR_RETURN_REF = 536870912; -const int CSSMERR_CSP_INTERNAL_ERROR = -2147416063; +const int CSSM_KEYATTR_RETURN_NONE = 1073741824; -const int CSSMERR_CSP_MEMORY_ERROR = -2147416062; +const int CSSM_KEYATTR_PERMANENT = 1; -const int CSSMERR_CSP_MDS_ERROR = -2147416061; +const int CSSM_KEYATTR_PRIVATE = 2; -const int CSSMERR_CSP_INVALID_POINTER = -2147416060; +const int CSSM_KEYATTR_MODIFIABLE = 4; -const int CSSMERR_CSP_INVALID_INPUT_POINTER = -2147416059; +const int CSSM_KEYATTR_SENSITIVE = 8; -const int CSSMERR_CSP_INVALID_OUTPUT_POINTER = -2147416058; +const int CSSM_KEYATTR_EXTRACTABLE = 32; -const int CSSMERR_CSP_FUNCTION_NOT_IMPLEMENTED = -2147416057; +const int CSSM_KEYATTR_ALWAYS_SENSITIVE = 16; -const int CSSMERR_CSP_SELF_CHECK_FAILED = -2147416056; +const int CSSM_KEYATTR_NEVER_EXTRACTABLE = 64; -const int CSSMERR_CSP_OS_ACCESS_DENIED = -2147416055; +const int CSSM_KEYUSE_ANY = -2147483648; -const int CSSMERR_CSP_FUNCTION_FAILED = -2147416054; +const int CSSM_KEYUSE_ENCRYPT = 1; -const int CSSMERR_CSP_OPERATION_AUTH_DENIED = -2147416032; +const int CSSM_KEYUSE_DECRYPT = 2; -const int CSSMERR_CSP_OBJECT_USE_AUTH_DENIED = -2147416031; +const int CSSM_KEYUSE_SIGN = 4; -const int CSSMERR_CSP_OBJECT_MANIP_AUTH_DENIED = -2147416030; +const int CSSM_KEYUSE_VERIFY = 8; -const int CSSMERR_CSP_OBJECT_ACL_NOT_SUPPORTED = -2147416029; +const int CSSM_KEYUSE_SIGN_RECOVER = 16; -const int CSSMERR_CSP_OBJECT_ACL_REQUIRED = -2147416028; +const int CSSM_KEYUSE_VERIFY_RECOVER = 32; -const int CSSMERR_CSP_INVALID_ACCESS_CREDENTIALS = -2147416027; +const int CSSM_KEYUSE_WRAP = 64; -const int CSSMERR_CSP_INVALID_ACL_BASE_CERTS = -2147416026; +const int CSSM_KEYUSE_UNWRAP = 128; -const int CSSMERR_CSP_ACL_BASE_CERTS_NOT_SUPPORTED = -2147416025; +const int CSSM_KEYUSE_DERIVE = 256; -const int CSSMERR_CSP_INVALID_SAMPLE_VALUE = -2147416024; +const int CSSM_ALGID_NONE = 0; -const int CSSMERR_CSP_SAMPLE_VALUE_NOT_SUPPORTED = -2147416023; +const int CSSM_ALGID_CUSTOM = 1; -const int CSSMERR_CSP_INVALID_ACL_SUBJECT_VALUE = -2147416022; +const int CSSM_ALGID_DH = 2; -const int CSSMERR_CSP_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147416021; +const int CSSM_ALGID_PH = 3; -const int CSSMERR_CSP_INVALID_ACL_CHALLENGE_CALLBACK = -2147416020; +const int CSSM_ALGID_KEA = 4; -const int CSSMERR_CSP_ACL_CHALLENGE_CALLBACK_FAILED = -2147416019; +const int CSSM_ALGID_MD2 = 5; -const int CSSMERR_CSP_INVALID_ACL_ENTRY_TAG = -2147416018; +const int CSSM_ALGID_MD4 = 6; -const int CSSMERR_CSP_ACL_ENTRY_TAG_NOT_FOUND = -2147416017; +const int CSSM_ALGID_MD5 = 7; -const int CSSMERR_CSP_INVALID_ACL_EDIT_MODE = -2147416016; +const int CSSM_ALGID_SHA1 = 8; -const int CSSMERR_CSP_ACL_CHANGE_FAILED = -2147416015; +const int CSSM_ALGID_NHASH = 9; -const int CSSMERR_CSP_INVALID_NEW_ACL_ENTRY = -2147416014; +const int CSSM_ALGID_HAVAL = 10; -const int CSSMERR_CSP_INVALID_NEW_ACL_OWNER = -2147416013; +const int CSSM_ALGID_RIPEMD = 11; -const int CSSMERR_CSP_ACL_DELETE_FAILED = -2147416012; +const int CSSM_ALGID_IBCHASH = 12; -const int CSSMERR_CSP_ACL_REPLACE_FAILED = -2147416011; +const int CSSM_ALGID_RIPEMAC = 13; -const int CSSMERR_CSP_ACL_ADD_FAILED = -2147416010; +const int CSSM_ALGID_DES = 14; -const int CSSMERR_CSP_INVALID_CONTEXT_HANDLE = -2147416000; +const int CSSM_ALGID_DESX = 15; -const int CSSMERR_CSP_PRIVILEGE_NOT_GRANTED = -2147415989; +const int CSSM_ALGID_RDES = 16; -const int CSSMERR_CSP_INVALID_DATA = -2147415994; +const int CSSM_ALGID_3DES_3KEY_EDE = 17; -const int CSSMERR_CSP_INVALID_PASSTHROUGH_ID = -2147415978; +const int CSSM_ALGID_3DES_2KEY_EDE = 18; -const int CSSMERR_CSP_INVALID_CRYPTO_DATA = -2147415976; +const int CSSM_ALGID_3DES_1KEY_EEE = 19; -const int CSSM_CSP_BASE_CSP_ERROR = -2147415808; +const int CSSM_ALGID_3DES_3KEY = 17; -const int CSSMERR_CSP_INPUT_LENGTH_ERROR = -2147415807; +const int CSSM_ALGID_3DES_3KEY_EEE = 20; -const int CSSMERR_CSP_OUTPUT_LENGTH_ERROR = -2147415806; +const int CSSM_ALGID_3DES_2KEY = 18; -const int CSSMERR_CSP_PRIVILEGE_NOT_SUPPORTED = -2147415805; +const int CSSM_ALGID_3DES_2KEY_EEE = 21; -const int CSSMERR_CSP_DEVICE_ERROR = -2147415804; +const int CSSM_ALGID_3DES_1KEY = 20; -const int CSSMERR_CSP_DEVICE_MEMORY_ERROR = -2147415803; +const int CSSM_ALGID_IDEA = 22; -const int CSSMERR_CSP_ATTACH_HANDLE_BUSY = -2147415802; +const int CSSM_ALGID_RC2 = 23; -const int CSSMERR_CSP_NOT_LOGGED_IN = -2147415801; +const int CSSM_ALGID_RC5 = 24; -const int CSSMERR_CSP_INVALID_KEY = -2147415792; +const int CSSM_ALGID_RC4 = 25; -const int CSSMERR_CSP_INVALID_KEY_REFERENCE = -2147415791; +const int CSSM_ALGID_SEAL = 26; -const int CSSMERR_CSP_INVALID_KEY_CLASS = -2147415790; +const int CSSM_ALGID_CAST = 27; -const int CSSMERR_CSP_ALGID_MISMATCH = -2147415789; +const int CSSM_ALGID_BLOWFISH = 28; -const int CSSMERR_CSP_KEY_USAGE_INCORRECT = -2147415788; +const int CSSM_ALGID_SKIPJACK = 29; -const int CSSMERR_CSP_KEY_BLOB_TYPE_INCORRECT = -2147415787; +const int CSSM_ALGID_LUCIFER = 30; -const int CSSMERR_CSP_KEY_HEADER_INCONSISTENT = -2147415786; +const int CSSM_ALGID_MADRYGA = 31; -const int CSSMERR_CSP_UNSUPPORTED_KEY_FORMAT = -2147415785; +const int CSSM_ALGID_FEAL = 32; -const int CSSMERR_CSP_UNSUPPORTED_KEY_SIZE = -2147415784; +const int CSSM_ALGID_REDOC = 33; -const int CSSMERR_CSP_INVALID_KEY_POINTER = -2147415783; +const int CSSM_ALGID_REDOC3 = 34; -const int CSSMERR_CSP_INVALID_KEYUSAGE_MASK = -2147415782; +const int CSSM_ALGID_LOKI = 35; -const int CSSMERR_CSP_UNSUPPORTED_KEYUSAGE_MASK = -2147415781; +const int CSSM_ALGID_KHUFU = 36; -const int CSSMERR_CSP_INVALID_KEYATTR_MASK = -2147415780; +const int CSSM_ALGID_KHAFRE = 37; -const int CSSMERR_CSP_UNSUPPORTED_KEYATTR_MASK = -2147415779; +const int CSSM_ALGID_MMB = 38; -const int CSSMERR_CSP_INVALID_KEY_LABEL = -2147415778; +const int CSSM_ALGID_GOST = 39; -const int CSSMERR_CSP_UNSUPPORTED_KEY_LABEL = -2147415777; +const int CSSM_ALGID_SAFER = 40; -const int CSSMERR_CSP_INVALID_KEY_FORMAT = -2147415776; +const int CSSM_ALGID_CRAB = 41; -const int CSSMERR_CSP_INVALID_DATA_COUNT = -2147415768; +const int CSSM_ALGID_RSA = 42; -const int CSSMERR_CSP_VECTOR_OF_BUFS_UNSUPPORTED = -2147415767; +const int CSSM_ALGID_DSA = 43; -const int CSSMERR_CSP_INVALID_INPUT_VECTOR = -2147415766; +const int CSSM_ALGID_MD5WithRSA = 44; -const int CSSMERR_CSP_INVALID_OUTPUT_VECTOR = -2147415765; +const int CSSM_ALGID_MD2WithRSA = 45; -const int CSSMERR_CSP_INVALID_CONTEXT = -2147415760; +const int CSSM_ALGID_ElGamal = 46; -const int CSSMERR_CSP_INVALID_ALGORITHM = -2147415759; +const int CSSM_ALGID_MD2Random = 47; -const int CSSMERR_CSP_INVALID_ATTR_KEY = -2147415754; +const int CSSM_ALGID_MD5Random = 48; -const int CSSMERR_CSP_MISSING_ATTR_KEY = -2147415753; +const int CSSM_ALGID_SHARandom = 49; -const int CSSMERR_CSP_INVALID_ATTR_INIT_VECTOR = -2147415752; +const int CSSM_ALGID_DESRandom = 50; -const int CSSMERR_CSP_MISSING_ATTR_INIT_VECTOR = -2147415751; +const int CSSM_ALGID_SHA1WithRSA = 51; -const int CSSMERR_CSP_INVALID_ATTR_SALT = -2147415750; +const int CSSM_ALGID_CDMF = 52; -const int CSSMERR_CSP_MISSING_ATTR_SALT = -2147415749; +const int CSSM_ALGID_CAST3 = 53; -const int CSSMERR_CSP_INVALID_ATTR_PADDING = -2147415748; +const int CSSM_ALGID_CAST5 = 54; -const int CSSMERR_CSP_MISSING_ATTR_PADDING = -2147415747; +const int CSSM_ALGID_GenericSecret = 55; -const int CSSMERR_CSP_INVALID_ATTR_RANDOM = -2147415746; +const int CSSM_ALGID_ConcatBaseAndKey = 56; -const int CSSMERR_CSP_MISSING_ATTR_RANDOM = -2147415745; +const int CSSM_ALGID_ConcatKeyAndBase = 57; -const int CSSMERR_CSP_INVALID_ATTR_SEED = -2147415744; +const int CSSM_ALGID_ConcatBaseAndData = 58; -const int CSSMERR_CSP_MISSING_ATTR_SEED = -2147415743; +const int CSSM_ALGID_ConcatDataAndBase = 59; -const int CSSMERR_CSP_INVALID_ATTR_PASSPHRASE = -2147415742; +const int CSSM_ALGID_XORBaseAndData = 60; -const int CSSMERR_CSP_MISSING_ATTR_PASSPHRASE = -2147415741; +const int CSSM_ALGID_ExtractFromKey = 61; -const int CSSMERR_CSP_INVALID_ATTR_KEY_LENGTH = -2147415740; +const int CSSM_ALGID_SSL3PrePrimaryGen = 62; -const int CSSMERR_CSP_MISSING_ATTR_KEY_LENGTH = -2147415739; +const int CSSM_ALGID_SSL3PreMasterGen = 62; -const int CSSMERR_CSP_INVALID_ATTR_BLOCK_SIZE = -2147415738; +const int CSSM_ALGID_SSL3PrimaryDerive = 63; -const int CSSMERR_CSP_MISSING_ATTR_BLOCK_SIZE = -2147415737; +const int CSSM_ALGID_SSL3MasterDerive = 63; -const int CSSMERR_CSP_INVALID_ATTR_OUTPUT_SIZE = -2147415708; +const int CSSM_ALGID_SSL3KeyAndMacDerive = 64; -const int CSSMERR_CSP_MISSING_ATTR_OUTPUT_SIZE = -2147415707; +const int CSSM_ALGID_SSL3MD5_MAC = 65; -const int CSSMERR_CSP_INVALID_ATTR_ROUNDS = -2147415706; +const int CSSM_ALGID_SSL3SHA1_MAC = 66; -const int CSSMERR_CSP_MISSING_ATTR_ROUNDS = -2147415705; +const int CSSM_ALGID_PKCS5_PBKDF1_MD5 = 67; -const int CSSMERR_CSP_INVALID_ATTR_ALG_PARAMS = -2147415704; +const int CSSM_ALGID_PKCS5_PBKDF1_MD2 = 68; -const int CSSMERR_CSP_MISSING_ATTR_ALG_PARAMS = -2147415703; +const int CSSM_ALGID_PKCS5_PBKDF1_SHA1 = 69; -const int CSSMERR_CSP_INVALID_ATTR_LABEL = -2147415702; +const int CSSM_ALGID_WrapLynks = 70; -const int CSSMERR_CSP_MISSING_ATTR_LABEL = -2147415701; +const int CSSM_ALGID_WrapSET_OAEP = 71; -const int CSSMERR_CSP_INVALID_ATTR_KEY_TYPE = -2147415700; +const int CSSM_ALGID_BATON = 72; -const int CSSMERR_CSP_MISSING_ATTR_KEY_TYPE = -2147415699; +const int CSSM_ALGID_ECDSA = 73; -const int CSSMERR_CSP_INVALID_ATTR_MODE = -2147415698; +const int CSSM_ALGID_MAYFLY = 74; -const int CSSMERR_CSP_MISSING_ATTR_MODE = -2147415697; +const int CSSM_ALGID_JUNIPER = 75; -const int CSSMERR_CSP_INVALID_ATTR_EFFECTIVE_BITS = -2147415696; +const int CSSM_ALGID_FASTHASH = 76; -const int CSSMERR_CSP_MISSING_ATTR_EFFECTIVE_BITS = -2147415695; +const int CSSM_ALGID_3DES = 77; -const int CSSMERR_CSP_INVALID_ATTR_START_DATE = -2147415694; +const int CSSM_ALGID_SSL3MD5 = 78; -const int CSSMERR_CSP_MISSING_ATTR_START_DATE = -2147415693; +const int CSSM_ALGID_SSL3SHA1 = 79; -const int CSSMERR_CSP_INVALID_ATTR_END_DATE = -2147415692; +const int CSSM_ALGID_FortezzaTimestamp = 80; -const int CSSMERR_CSP_MISSING_ATTR_END_DATE = -2147415691; +const int CSSM_ALGID_SHA1WithDSA = 81; -const int CSSMERR_CSP_INVALID_ATTR_VERSION = -2147415690; +const int CSSM_ALGID_SHA1WithECDSA = 82; -const int CSSMERR_CSP_MISSING_ATTR_VERSION = -2147415689; +const int CSSM_ALGID_DSA_BSAFE = 83; -const int CSSMERR_CSP_INVALID_ATTR_PRIME = -2147415688; +const int CSSM_ALGID_ECDH = 84; -const int CSSMERR_CSP_MISSING_ATTR_PRIME = -2147415687; +const int CSSM_ALGID_ECMQV = 85; -const int CSSMERR_CSP_INVALID_ATTR_BASE = -2147415686; +const int CSSM_ALGID_PKCS12_SHA1_PBE = 86; -const int CSSMERR_CSP_MISSING_ATTR_BASE = -2147415685; +const int CSSM_ALGID_ECNRA = 87; -const int CSSMERR_CSP_INVALID_ATTR_SUBPRIME = -2147415684; +const int CSSM_ALGID_SHA1WithECNRA = 88; -const int CSSMERR_CSP_MISSING_ATTR_SUBPRIME = -2147415683; +const int CSSM_ALGID_ECES = 89; -const int CSSMERR_CSP_INVALID_ATTR_ITERATION_COUNT = -2147415682; +const int CSSM_ALGID_ECAES = 90; -const int CSSMERR_CSP_MISSING_ATTR_ITERATION_COUNT = -2147415681; +const int CSSM_ALGID_SHA1HMAC = 91; -const int CSSMERR_CSP_INVALID_ATTR_DL_DB_HANDLE = -2147415680; +const int CSSM_ALGID_FIPS186Random = 92; -const int CSSMERR_CSP_MISSING_ATTR_DL_DB_HANDLE = -2147415679; +const int CSSM_ALGID_ECC = 93; -const int CSSMERR_CSP_INVALID_ATTR_ACCESS_CREDENTIALS = -2147415678; +const int CSSM_ALGID_MQV = 94; -const int CSSMERR_CSP_MISSING_ATTR_ACCESS_CREDENTIALS = -2147415677; +const int CSSM_ALGID_NRA = 95; -const int CSSMERR_CSP_INVALID_ATTR_PUBLIC_KEY_FORMAT = -2147415676; +const int CSSM_ALGID_IntelPlatformRandom = 96; -const int CSSMERR_CSP_MISSING_ATTR_PUBLIC_KEY_FORMAT = -2147415675; +const int CSSM_ALGID_UTC = 97; -const int CSSMERR_CSP_INVALID_ATTR_PRIVATE_KEY_FORMAT = -2147415674; +const int CSSM_ALGID_HAVAL3 = 98; -const int CSSMERR_CSP_MISSING_ATTR_PRIVATE_KEY_FORMAT = -2147415673; +const int CSSM_ALGID_HAVAL4 = 99; -const int CSSMERR_CSP_INVALID_ATTR_SYMMETRIC_KEY_FORMAT = -2147415672; +const int CSSM_ALGID_HAVAL5 = 100; -const int CSSMERR_CSP_MISSING_ATTR_SYMMETRIC_KEY_FORMAT = -2147415671; +const int CSSM_ALGID_TIGER = 101; -const int CSSMERR_CSP_INVALID_ATTR_WRAPPED_KEY_FORMAT = -2147415670; +const int CSSM_ALGID_MD5HMAC = 102; -const int CSSMERR_CSP_MISSING_ATTR_WRAPPED_KEY_FORMAT = -2147415669; +const int CSSM_ALGID_PKCS5_PBKDF2 = 103; -const int CSSMERR_CSP_STAGED_OPERATION_IN_PROGRESS = -2147415736; +const int CSSM_ALGID_RUNNING_COUNTER = 104; -const int CSSMERR_CSP_STAGED_OPERATION_NOT_STARTED = -2147415735; +const int CSSM_ALGID_LAST = 2147483647; -const int CSSMERR_CSP_VERIFY_FAILED = -2147415734; +const int CSSM_ALGID_VENDOR_DEFINED = -2147483648; -const int CSSMERR_CSP_INVALID_SIGNATURE = -2147415733; +const int CSSM_ALGMODE_NONE = 0; -const int CSSMERR_CSP_QUERY_SIZE_UNKNOWN = -2147415732; +const int CSSM_ALGMODE_CUSTOM = 1; -const int CSSMERR_CSP_BLOCK_SIZE_MISMATCH = -2147415731; +const int CSSM_ALGMODE_ECB = 2; -const int CSSMERR_CSP_PRIVATE_KEY_NOT_FOUND = -2147415730; +const int CSSM_ALGMODE_ECBPad = 3; -const int CSSMERR_CSP_PUBLIC_KEY_INCONSISTENT = -2147415729; +const int CSSM_ALGMODE_CBC = 4; -const int CSSMERR_CSP_DEVICE_VERIFY_FAILED = -2147415728; +const int CSSM_ALGMODE_CBC_IV8 = 5; -const int CSSMERR_CSP_INVALID_LOGIN_NAME = -2147415727; +const int CSSM_ALGMODE_CBCPadIV8 = 6; -const int CSSMERR_CSP_ALREADY_LOGGED_IN = -2147415726; +const int CSSM_ALGMODE_CFB = 7; -const int CSSMERR_CSP_PRIVATE_KEY_ALREADY_EXISTS = -2147415725; +const int CSSM_ALGMODE_CFB_IV8 = 8; -const int CSSMERR_CSP_KEY_LABEL_ALREADY_EXISTS = -2147415724; +const int CSSM_ALGMODE_CFBPadIV8 = 9; -const int CSSMERR_CSP_INVALID_DIGEST_ALGORITHM = -2147415723; +const int CSSM_ALGMODE_OFB = 10; -const int CSSMERR_CSP_CRYPTO_DATA_CALLBACK_FAILED = -2147415722; +const int CSSM_ALGMODE_OFB_IV8 = 11; -const int CSSMERR_TP_INTERNAL_ERROR = -2147409919; +const int CSSM_ALGMODE_OFBPadIV8 = 12; -const int CSSMERR_TP_MEMORY_ERROR = -2147409918; +const int CSSM_ALGMODE_COUNTER = 13; -const int CSSMERR_TP_MDS_ERROR = -2147409917; +const int CSSM_ALGMODE_BC = 14; -const int CSSMERR_TP_INVALID_POINTER = -2147409916; +const int CSSM_ALGMODE_PCBC = 15; -const int CSSMERR_TP_INVALID_INPUT_POINTER = -2147409915; +const int CSSM_ALGMODE_CBCC = 16; -const int CSSMERR_TP_INVALID_OUTPUT_POINTER = -2147409914; +const int CSSM_ALGMODE_OFBNLF = 17; -const int CSSMERR_TP_FUNCTION_NOT_IMPLEMENTED = -2147409913; +const int CSSM_ALGMODE_PBC = 18; -const int CSSMERR_TP_SELF_CHECK_FAILED = -2147409912; +const int CSSM_ALGMODE_PFB = 19; -const int CSSMERR_TP_OS_ACCESS_DENIED = -2147409911; +const int CSSM_ALGMODE_CBCPD = 20; -const int CSSMERR_TP_FUNCTION_FAILED = -2147409910; +const int CSSM_ALGMODE_PUBLIC_KEY = 21; -const int CSSMERR_TP_INVALID_CONTEXT_HANDLE = -2147409856; +const int CSSM_ALGMODE_PRIVATE_KEY = 22; -const int CSSMERR_TP_INVALID_DATA = -2147409850; +const int CSSM_ALGMODE_SHUFFLE = 23; -const int CSSMERR_TP_INVALID_DB_LIST = -2147409844; +const int CSSM_ALGMODE_ECB64 = 24; -const int CSSMERR_TP_INVALID_CERTGROUP_POINTER = -2147409854; +const int CSSM_ALGMODE_CBC64 = 25; -const int CSSMERR_TP_INVALID_CERT_POINTER = -2147409853; +const int CSSM_ALGMODE_OFB64 = 26; -const int CSSMERR_TP_INVALID_CRL_POINTER = -2147409852; +const int CSSM_ALGMODE_CFB32 = 28; -const int CSSMERR_TP_INVALID_FIELD_POINTER = -2147409851; +const int CSSM_ALGMODE_CFB16 = 29; -const int CSSMERR_TP_INVALID_NETWORK_ADDR = -2147409833; +const int CSSM_ALGMODE_CFB8 = 30; -const int CSSMERR_TP_CRL_ALREADY_SIGNED = -2147409849; +const int CSSM_ALGMODE_WRAP = 31; -const int CSSMERR_TP_INVALID_NUMBER_OF_FIELDS = -2147409848; +const int CSSM_ALGMODE_PRIVATE_WRAP = 32; -const int CSSMERR_TP_VERIFICATION_FAILURE = -2147409847; +const int CSSM_ALGMODE_RELAYX = 33; -const int CSSMERR_TP_INVALID_DB_HANDLE = -2147409846; +const int CSSM_ALGMODE_ECB128 = 34; -const int CSSMERR_TP_UNKNOWN_FORMAT = -2147409842; +const int CSSM_ALGMODE_ECB96 = 35; -const int CSSMERR_TP_UNKNOWN_TAG = -2147409841; +const int CSSM_ALGMODE_CBC128 = 36; -const int CSSMERR_TP_INVALID_PASSTHROUGH_ID = -2147409834; +const int CSSM_ALGMODE_OAEP_HASH = 37; -const int CSSMERR_TP_INVALID_CSP_HANDLE = -2147409840; +const int CSSM_ALGMODE_PKCS1_EME_V15 = 38; -const int CSSMERR_TP_INVALID_DL_HANDLE = -2147409839; +const int CSSM_ALGMODE_PKCS1_EME_OAEP = 39; -const int CSSMERR_TP_INVALID_CL_HANDLE = -2147409838; +const int CSSM_ALGMODE_PKCS1_EMSA_V15 = 40; -const int CSSMERR_TP_INVALID_DB_LIST_POINTER = -2147409843; +const int CSSM_ALGMODE_ISO_9796 = 41; -const int CSSM_TP_BASE_TP_ERROR = -2147409664; +const int CSSM_ALGMODE_X9_31 = 42; -const int CSSMERR_TP_INVALID_CALLERAUTH_CONTEXT_POINTER = -2147409663; +const int CSSM_ALGMODE_LAST = 2147483647; -const int CSSMERR_TP_INVALID_IDENTIFIER_POINTER = -2147409662; +const int CSSM_ALGMODE_VENDOR_DEFINED = -2147483648; -const int CSSMERR_TP_INVALID_KEYCACHE_HANDLE = -2147409661; +const int CSSM_CSP_SOFTWARE = 1; -const int CSSMERR_TP_INVALID_CERTGROUP = -2147409660; +const int CSSM_CSP_HARDWARE = 2; -const int CSSMERR_TP_INVALID_CRLGROUP = -2147409659; +const int CSSM_CSP_HYBRID = 3; -const int CSSMERR_TP_INVALID_CRLGROUP_POINTER = -2147409658; +const int CSSM_ALGCLASS_NONE = 0; -const int CSSMERR_TP_AUTHENTICATION_FAILED = -2147409657; +const int CSSM_ALGCLASS_CUSTOM = 1; -const int CSSMERR_TP_CERTGROUP_INCOMPLETE = -2147409656; +const int CSSM_ALGCLASS_SIGNATURE = 2; -const int CSSMERR_TP_CERTIFICATE_CANT_OPERATE = -2147409655; +const int CSSM_ALGCLASS_SYMMETRIC = 3; -const int CSSMERR_TP_CERT_EXPIRED = -2147409654; +const int CSSM_ALGCLASS_DIGEST = 4; -const int CSSMERR_TP_CERT_NOT_VALID_YET = -2147409653; +const int CSSM_ALGCLASS_RANDOMGEN = 5; -const int CSSMERR_TP_CERT_REVOKED = -2147409652; +const int CSSM_ALGCLASS_UNIQUEGEN = 6; -const int CSSMERR_TP_CERT_SUSPENDED = -2147409651; +const int CSSM_ALGCLASS_MAC = 7; -const int CSSMERR_TP_INSUFFICIENT_CREDENTIALS = -2147409650; +const int CSSM_ALGCLASS_ASYMMETRIC = 8; -const int CSSMERR_TP_INVALID_ACTION = -2147409649; +const int CSSM_ALGCLASS_KEYGEN = 9; -const int CSSMERR_TP_INVALID_ACTION_DATA = -2147409648; +const int CSSM_ALGCLASS_DERIVEKEY = 10; -const int CSSMERR_TP_INVALID_ANCHOR_CERT = -2147409646; +const int CSSM_ATTRIBUTE_DATA_NONE = 0; -const int CSSMERR_TP_INVALID_AUTHORITY = -2147409645; +const int CSSM_ATTRIBUTE_DATA_UINT32 = 268435456; -const int CSSMERR_TP_VERIFY_ACTION_FAILED = -2147409644; +const int CSSM_ATTRIBUTE_DATA_CSSM_DATA = 536870912; -const int CSSMERR_TP_INVALID_CERTIFICATE = -2147409643; +const int CSSM_ATTRIBUTE_DATA_CRYPTO_DATA = 805306368; -const int CSSMERR_TP_INVALID_CERT_AUTHORITY = -2147409642; +const int CSSM_ATTRIBUTE_DATA_KEY = 1073741824; -const int CSSMERR_TP_INVALID_CRL_AUTHORITY = -2147409641; +const int CSSM_ATTRIBUTE_DATA_STRING = 1342177280; -const int CSSMERR_TP_INVALID_CRL_ENCODING = -2147409640; +const int CSSM_ATTRIBUTE_DATA_DATE = 1610612736; -const int CSSMERR_TP_INVALID_CRL_TYPE = -2147409639; +const int CSSM_ATTRIBUTE_DATA_RANGE = 1879048192; -const int CSSMERR_TP_INVALID_CRL = -2147409638; +const int CSSM_ATTRIBUTE_DATA_ACCESS_CREDENTIALS = -2147483648; -const int CSSMERR_TP_INVALID_FORM_TYPE = -2147409637; +const int CSSM_ATTRIBUTE_DATA_VERSION = 16777216; -const int CSSMERR_TP_INVALID_ID = -2147409636; +const int CSSM_ATTRIBUTE_DATA_DL_DB_HANDLE = 33554432; -const int CSSMERR_TP_INVALID_IDENTIFIER = -2147409635; +const int CSSM_ATTRIBUTE_DATA_KR_PROFILE = 50331648; -const int CSSMERR_TP_INVALID_INDEX = -2147409634; +const int CSSM_ATTRIBUTE_TYPE_MASK = -16777216; -const int CSSMERR_TP_INVALID_NAME = -2147409633; +const int CSSM_ATTRIBUTE_NONE = 0; -const int CSSMERR_TP_INVALID_POLICY_IDENTIFIERS = -2147409632; +const int CSSM_ATTRIBUTE_CUSTOM = 536870913; -const int CSSMERR_TP_INVALID_TIMESTRING = -2147409631; +const int CSSM_ATTRIBUTE_DESCRIPTION = 1342177282; -const int CSSMERR_TP_INVALID_REASON = -2147409630; +const int CSSM_ATTRIBUTE_KEY = 1073741827; -const int CSSMERR_TP_INVALID_REQUEST_INPUTS = -2147409629; +const int CSSM_ATTRIBUTE_INIT_VECTOR = 536870916; -const int CSSMERR_TP_INVALID_RESPONSE_VECTOR = -2147409628; +const int CSSM_ATTRIBUTE_SALT = 536870917; -const int CSSMERR_TP_INVALID_SIGNATURE = -2147409627; +const int CSSM_ATTRIBUTE_PADDING = 268435462; -const int CSSMERR_TP_INVALID_STOP_ON_POLICY = -2147409626; +const int CSSM_ATTRIBUTE_RANDOM = 536870919; -const int CSSMERR_TP_INVALID_CALLBACK = -2147409625; +const int CSSM_ATTRIBUTE_SEED = 805306376; -const int CSSMERR_TP_INVALID_TUPLE = -2147409624; +const int CSSM_ATTRIBUTE_PASSPHRASE = 805306377; -const int CSSMERR_TP_NOT_SIGNER = -2147409623; +const int CSSM_ATTRIBUTE_KEY_LENGTH = 268435466; -const int CSSMERR_TP_NOT_TRUSTED = -2147409622; +const int CSSM_ATTRIBUTE_KEY_LENGTH_RANGE = 1879048203; -const int CSSMERR_TP_NO_DEFAULT_AUTHORITY = -2147409621; +const int CSSM_ATTRIBUTE_BLOCK_SIZE = 268435468; -const int CSSMERR_TP_REJECTED_FORM = -2147409620; +const int CSSM_ATTRIBUTE_OUTPUT_SIZE = 268435469; -const int CSSMERR_TP_REQUEST_LOST = -2147409619; +const int CSSM_ATTRIBUTE_ROUNDS = 268435470; -const int CSSMERR_TP_REQUEST_REJECTED = -2147409618; +const int CSSM_ATTRIBUTE_IV_SIZE = 268435471; -const int CSSMERR_TP_UNSUPPORTED_ADDR_TYPE = -2147409617; +const int CSSM_ATTRIBUTE_ALG_PARAMS = 536870928; -const int CSSMERR_TP_UNSUPPORTED_SERVICE = -2147409616; +const int CSSM_ATTRIBUTE_LABEL = 536870929; -const int CSSMERR_TP_INVALID_TUPLEGROUP_POINTER = -2147409615; +const int CSSM_ATTRIBUTE_KEY_TYPE = 268435474; -const int CSSMERR_TP_INVALID_TUPLEGROUP = -2147409614; +const int CSSM_ATTRIBUTE_MODE = 268435475; -const int CSSMERR_AC_INTERNAL_ERROR = -2147405823; +const int CSSM_ATTRIBUTE_EFFECTIVE_BITS = 268435476; -const int CSSMERR_AC_MEMORY_ERROR = -2147405822; +const int CSSM_ATTRIBUTE_START_DATE = 1610612757; -const int CSSMERR_AC_MDS_ERROR = -2147405821; +const int CSSM_ATTRIBUTE_END_DATE = 1610612758; -const int CSSMERR_AC_INVALID_POINTER = -2147405820; +const int CSSM_ATTRIBUTE_KEYUSAGE = 268435479; -const int CSSMERR_AC_INVALID_INPUT_POINTER = -2147405819; +const int CSSM_ATTRIBUTE_KEYATTR = 268435480; -const int CSSMERR_AC_INVALID_OUTPUT_POINTER = -2147405818; +const int CSSM_ATTRIBUTE_VERSION = 16777241; -const int CSSMERR_AC_FUNCTION_NOT_IMPLEMENTED = -2147405817; +const int CSSM_ATTRIBUTE_PRIME = 536870938; -const int CSSMERR_AC_SELF_CHECK_FAILED = -2147405816; +const int CSSM_ATTRIBUTE_BASE = 536870939; -const int CSSMERR_AC_OS_ACCESS_DENIED = -2147405815; +const int CSSM_ATTRIBUTE_SUBPRIME = 536870940; -const int CSSMERR_AC_FUNCTION_FAILED = -2147405814; +const int CSSM_ATTRIBUTE_ALG_ID = 268435485; -const int CSSMERR_AC_INVALID_CONTEXT_HANDLE = -2147405760; +const int CSSM_ATTRIBUTE_ITERATION_COUNT = 268435486; -const int CSSMERR_AC_INVALID_DATA = -2147405754; +const int CSSM_ATTRIBUTE_ROUNDS_RANGE = 1879048223; -const int CSSMERR_AC_INVALID_DB_LIST = -2147405748; +const int CSSM_ATTRIBUTE_KRPROFILE_LOCAL = 50331680; -const int CSSMERR_AC_INVALID_PASSTHROUGH_ID = -2147405738; +const int CSSM_ATTRIBUTE_KRPROFILE_REMOTE = 50331681; -const int CSSMERR_AC_INVALID_DL_HANDLE = -2147405743; +const int CSSM_ATTRIBUTE_CSP_HANDLE = 268435490; -const int CSSMERR_AC_INVALID_CL_HANDLE = -2147405742; +const int CSSM_ATTRIBUTE_DL_DB_HANDLE = 33554467; -const int CSSMERR_AC_INVALID_TP_HANDLE = -2147405741; +const int CSSM_ATTRIBUTE_ACCESS_CREDENTIALS = -2147483612; -const int CSSMERR_AC_INVALID_DB_HANDLE = -2147405750; +const int CSSM_ATTRIBUTE_PUBLIC_KEY_FORMAT = 268435493; -const int CSSMERR_AC_INVALID_DB_LIST_POINTER = -2147405747; +const int CSSM_ATTRIBUTE_PRIVATE_KEY_FORMAT = 268435494; -const int CSSM_AC_BASE_AC_ERROR = -2147405568; +const int CSSM_ATTRIBUTE_SYMMETRIC_KEY_FORMAT = 268435495; -const int CSSMERR_AC_INVALID_BASE_ACLS = -2147405567; +const int CSSM_ATTRIBUTE_WRAPPED_KEY_FORMAT = 268435496; -const int CSSMERR_AC_INVALID_TUPLE_CREDENTIALS = -2147405566; +const int CSSM_PADDING_NONE = 0; -const int CSSMERR_AC_INVALID_ENCODING = -2147405565; +const int CSSM_PADDING_CUSTOM = 1; -const int CSSMERR_AC_INVALID_VALIDITY_PERIOD = -2147405564; +const int CSSM_PADDING_ZERO = 2; -const int CSSMERR_AC_INVALID_REQUESTOR = -2147405563; +const int CSSM_PADDING_ONE = 3; -const int CSSMERR_AC_INVALID_REQUEST_DESCRIPTOR = -2147405562; +const int CSSM_PADDING_ALTERNATE = 4; -const int CSSMERR_CL_INTERNAL_ERROR = -2147411967; +const int CSSM_PADDING_FF = 5; -const int CSSMERR_CL_MEMORY_ERROR = -2147411966; +const int CSSM_PADDING_PKCS5 = 6; -const int CSSMERR_CL_MDS_ERROR = -2147411965; +const int CSSM_PADDING_PKCS7 = 7; -const int CSSMERR_CL_INVALID_POINTER = -2147411964; +const int CSSM_PADDING_CIPHERSTEALING = 8; -const int CSSMERR_CL_INVALID_INPUT_POINTER = -2147411963; +const int CSSM_PADDING_RANDOM = 9; -const int CSSMERR_CL_INVALID_OUTPUT_POINTER = -2147411962; +const int CSSM_PADDING_PKCS1 = 10; -const int CSSMERR_CL_FUNCTION_NOT_IMPLEMENTED = -2147411961; +const int CSSM_PADDING_SIGRAW = 11; -const int CSSMERR_CL_SELF_CHECK_FAILED = -2147411960; +const int CSSM_PADDING_VENDOR_DEFINED = -2147483648; -const int CSSMERR_CL_OS_ACCESS_DENIED = -2147411959; +const int CSSM_CSP_TOK_RNG = 1; -const int CSSMERR_CL_FUNCTION_FAILED = -2147411958; +const int CSSM_CSP_TOK_CLOCK_EXISTS = 64; -const int CSSMERR_CL_INVALID_CONTEXT_HANDLE = -2147411904; +const int CSSM_CSP_RDR_TOKENPRESENT = 1; -const int CSSMERR_CL_INVALID_CERTGROUP_POINTER = -2147411902; +const int CSSM_CSP_RDR_EXISTS = 2; -const int CSSMERR_CL_INVALID_CERT_POINTER = -2147411901; +const int CSSM_CSP_RDR_HW = 4; -const int CSSMERR_CL_INVALID_CRL_POINTER = -2147411900; +const int CSSM_CSP_TOK_WRITE_PROTECTED = 2; -const int CSSMERR_CL_INVALID_FIELD_POINTER = -2147411899; +const int CSSM_CSP_TOK_LOGIN_REQUIRED = 4; -const int CSSMERR_CL_INVALID_DATA = -2147411898; +const int CSSM_CSP_TOK_USER_PIN_INITIALIZED = 8; -const int CSSMERR_CL_CRL_ALREADY_SIGNED = -2147411897; +const int CSSM_CSP_TOK_PROT_AUTHENTICATION = 256; -const int CSSMERR_CL_INVALID_NUMBER_OF_FIELDS = -2147411896; +const int CSSM_CSP_TOK_USER_PIN_EXPIRED = 1048576; -const int CSSMERR_CL_VERIFICATION_FAILURE = -2147411895; +const int CSSM_CSP_TOK_SESSION_KEY_PASSWORD = 2097152; -const int CSSMERR_CL_UNKNOWN_FORMAT = -2147411890; +const int CSSM_CSP_TOK_PRIVATE_KEY_PASSWORD = 4194304; -const int CSSMERR_CL_UNKNOWN_TAG = -2147411889; +const int CSSM_CSP_STORES_PRIVATE_KEYS = 16777216; -const int CSSMERR_CL_INVALID_PASSTHROUGH_ID = -2147411882; +const int CSSM_CSP_STORES_PUBLIC_KEYS = 33554432; -const int CSSM_CL_BASE_CL_ERROR = -2147411712; +const int CSSM_CSP_STORES_SESSION_KEYS = 67108864; -const int CSSMERR_CL_INVALID_BUNDLE_POINTER = -2147411711; +const int CSSM_CSP_STORES_CERTIFICATES = 134217728; -const int CSSMERR_CL_INVALID_CACHE_HANDLE = -2147411710; +const int CSSM_CSP_STORES_GENERIC = 268435456; -const int CSSMERR_CL_INVALID_RESULTS_HANDLE = -2147411709; +const int CSSM_PKCS_OAEP_MGF_NONE = 0; -const int CSSMERR_CL_INVALID_BUNDLE_INFO = -2147411708; +const int CSSM_PKCS_OAEP_MGF1_SHA1 = 1; -const int CSSMERR_CL_INVALID_CRL_INDEX = -2147411707; +const int CSSM_PKCS_OAEP_MGF1_MD5 = 2; -const int CSSMERR_CL_INVALID_SCOPE = -2147411706; +const int CSSM_PKCS_OAEP_PSOURCE_NONE = 0; -const int CSSMERR_CL_NO_FIELD_VALUES = -2147411705; +const int CSSM_PKCS_OAEP_PSOURCE_Pspecified = 1; -const int CSSMERR_CL_SCOPE_NOT_SUPPORTED = -2147411704; +const int CSSM_VALUE_NOT_AVAILABLE = -1; -const int CSSMERR_DL_INTERNAL_ERROR = -2147414015; +const int CSSM_PKCS5_PBKDF2_PRF_HMAC_SHA1 = 0; -const int CSSMERR_DL_MEMORY_ERROR = -2147414014; +const int CSSM_TP_AUTHORITY_REQUEST_CERTISSUE = 1; -const int CSSMERR_DL_MDS_ERROR = -2147414013; +const int CSSM_TP_AUTHORITY_REQUEST_CERTREVOKE = 2; -const int CSSMERR_DL_INVALID_POINTER = -2147414012; +const int CSSM_TP_AUTHORITY_REQUEST_CERTSUSPEND = 3; -const int CSSMERR_DL_INVALID_INPUT_POINTER = -2147414011; +const int CSSM_TP_AUTHORITY_REQUEST_CERTRESUME = 4; -const int CSSMERR_DL_INVALID_OUTPUT_POINTER = -2147414010; +const int CSSM_TP_AUTHORITY_REQUEST_CERTVERIFY = 5; -const int CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED = -2147414009; +const int CSSM_TP_AUTHORITY_REQUEST_CERTNOTARIZE = 6; -const int CSSMERR_DL_SELF_CHECK_FAILED = -2147414008; +const int CSSM_TP_AUTHORITY_REQUEST_CERTUSERECOVER = 7; -const int CSSMERR_DL_OS_ACCESS_DENIED = -2147414007; +const int CSSM_TP_AUTHORITY_REQUEST_CRLISSUE = 256; -const int CSSMERR_DL_FUNCTION_FAILED = -2147414006; +const int CSSM_TP_KEY_ARCHIVE = 1; -const int CSSMERR_DL_INVALID_CSP_HANDLE = -2147413936; +const int CSSM_TP_CERT_PUBLISH = 2; -const int CSSMERR_DL_INVALID_DL_HANDLE = -2147413935; +const int CSSM_TP_CERT_NOTIFY_RENEW = 4; -const int CSSMERR_DL_INVALID_CL_HANDLE = -2147413934; +const int CSSM_TP_CERT_DIR_UPDATE = 8; -const int CSSMERR_DL_INVALID_DB_LIST_POINTER = -2147413939; +const int CSSM_TP_CRL_DISTRIBUTE = 16; -const int CSSMERR_DL_OPERATION_AUTH_DENIED = -2147413984; +const int CSSM_TP_ACTION_DEFAULT = 0; -const int CSSMERR_DL_OBJECT_USE_AUTH_DENIED = -2147413983; +const int CSSM_TP_STOP_ON_POLICY = 0; -const int CSSMERR_DL_OBJECT_MANIP_AUTH_DENIED = -2147413982; +const int CSSM_TP_STOP_ON_NONE = 1; -const int CSSMERR_DL_OBJECT_ACL_NOT_SUPPORTED = -2147413981; +const int CSSM_TP_STOP_ON_FIRST_PASS = 2; -const int CSSMERR_DL_OBJECT_ACL_REQUIRED = -2147413980; +const int CSSM_TP_STOP_ON_FIRST_FAIL = 3; -const int CSSMERR_DL_INVALID_ACCESS_CREDENTIALS = -2147413979; +const int CSSM_CRL_PARSE_FORMAT_NONE = 0; -const int CSSMERR_DL_INVALID_ACL_BASE_CERTS = -2147413978; +const int CSSM_CRL_PARSE_FORMAT_CUSTOM = 1; -const int CSSMERR_DL_ACL_BASE_CERTS_NOT_SUPPORTED = -2147413977; +const int CSSM_CRL_PARSE_FORMAT_SEXPR = 2; -const int CSSMERR_DL_INVALID_SAMPLE_VALUE = -2147413976; +const int CSSM_CRL_PARSE_FORMAT_COMPLEX = 3; -const int CSSMERR_DL_SAMPLE_VALUE_NOT_SUPPORTED = -2147413975; +const int CSSM_CRL_PARSE_FORMAT_OID_NAMED = 4; -const int CSSMERR_DL_INVALID_ACL_SUBJECT_VALUE = -2147413974; +const int CSSM_CRL_PARSE_FORMAT_TUPLE = 5; -const int CSSMERR_DL_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147413973; +const int CSSM_CRL_PARSE_FORMAT_MULTIPLE = 32766; -const int CSSMERR_DL_INVALID_ACL_CHALLENGE_CALLBACK = -2147413972; +const int CSSM_CRL_PARSE_FORMAT_LAST = 32767; -const int CSSMERR_DL_ACL_CHALLENGE_CALLBACK_FAILED = -2147413971; +const int CSSM_CL_CUSTOM_CRL_PARSE_FORMAT = 32768; -const int CSSMERR_DL_INVALID_ACL_ENTRY_TAG = -2147413970; +const int CSSM_CRL_TYPE_UNKNOWN = 0; -const int CSSMERR_DL_ACL_ENTRY_TAG_NOT_FOUND = -2147413969; +const int CSSM_CRL_TYPE_X_509v1 = 1; -const int CSSMERR_DL_INVALID_ACL_EDIT_MODE = -2147413968; +const int CSSM_CRL_TYPE_X_509v2 = 2; -const int CSSMERR_DL_ACL_CHANGE_FAILED = -2147413967; +const int CSSM_CRL_TYPE_SPKI = 3; -const int CSSMERR_DL_INVALID_NEW_ACL_ENTRY = -2147413966; +const int CSSM_CRL_TYPE_MULTIPLE = 32766; -const int CSSMERR_DL_INVALID_NEW_ACL_OWNER = -2147413965; +const int CSSM_CRL_ENCODING_UNKNOWN = 0; -const int CSSMERR_DL_ACL_DELETE_FAILED = -2147413964; +const int CSSM_CRL_ENCODING_CUSTOM = 1; -const int CSSMERR_DL_ACL_REPLACE_FAILED = -2147413963; +const int CSSM_CRL_ENCODING_BER = 2; -const int CSSMERR_DL_ACL_ADD_FAILED = -2147413962; +const int CSSM_CRL_ENCODING_DER = 3; -const int CSSMERR_DL_INVALID_DB_HANDLE = -2147413942; +const int CSSM_CRL_ENCODING_BLOOM = 4; -const int CSSMERR_DL_INVALID_PASSTHROUGH_ID = -2147413930; +const int CSSM_CRL_ENCODING_SEXPR = 5; -const int CSSMERR_DL_INVALID_NETWORK_ADDR = -2147413929; +const int CSSM_CRL_ENCODING_MULTIPLE = 32766; -const int CSSM_DL_BASE_DL_ERROR = -2147413760; +const int CSSM_CRLGROUP_DATA = 0; -const int CSSMERR_DL_DATABASE_CORRUPT = -2147413759; +const int CSSM_CRLGROUP_ENCODED_CRL = 1; -const int CSSMERR_DL_INVALID_RECORD_INDEX = -2147413752; +const int CSSM_CRLGROUP_PARSED_CRL = 2; -const int CSSMERR_DL_INVALID_RECORDTYPE = -2147413751; +const int CSSM_CRLGROUP_CRL_PAIR = 3; -const int CSSMERR_DL_INVALID_FIELD_NAME = -2147413750; +const int CSSM_EVIDENCE_FORM_UNSPECIFIC = 0; -const int CSSMERR_DL_UNSUPPORTED_FIELD_FORMAT = -2147413749; +const int CSSM_EVIDENCE_FORM_CERT = 1; -const int CSSMERR_DL_UNSUPPORTED_INDEX_INFO = -2147413748; +const int CSSM_EVIDENCE_FORM_CRL = 2; -const int CSSMERR_DL_UNSUPPORTED_LOCALITY = -2147413747; +const int CSSM_EVIDENCE_FORM_CERT_ID = 3; -const int CSSMERR_DL_UNSUPPORTED_NUM_ATTRIBUTES = -2147413746; +const int CSSM_EVIDENCE_FORM_CRL_ID = 4; -const int CSSMERR_DL_UNSUPPORTED_NUM_INDEXES = -2147413745; +const int CSSM_EVIDENCE_FORM_VERIFIER_TIME = 5; -const int CSSMERR_DL_UNSUPPORTED_NUM_RECORDTYPES = -2147413744; +const int CSSM_EVIDENCE_FORM_CRL_THISTIME = 6; -const int CSSMERR_DL_UNSUPPORTED_RECORDTYPE = -2147413743; +const int CSSM_EVIDENCE_FORM_CRL_NEXTTIME = 7; -const int CSSMERR_DL_FIELD_SPECIFIED_MULTIPLE = -2147413742; +const int CSSM_EVIDENCE_FORM_POLICYINFO = 8; -const int CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT = -2147413741; +const int CSSM_EVIDENCE_FORM_TUPLEGROUP = 9; -const int CSSMERR_DL_INVALID_PARSING_MODULE = -2147413740; +const int CSSM_TP_CONFIRM_STATUS_UNKNOWN = 0; -const int CSSMERR_DL_INVALID_DB_NAME = -2147413738; +const int CSSM_TP_CONFIRM_ACCEPT = 1; -const int CSSMERR_DL_DATASTORE_DOESNOT_EXIST = -2147413737; +const int CSSM_TP_CONFIRM_REJECT = 2; -const int CSSMERR_DL_DATASTORE_ALREADY_EXISTS = -2147413736; +const int CSSM_ESTIMATED_TIME_UNKNOWN = -1; -const int CSSMERR_DL_DB_LOCKED = -2147413735; +const int CSSM_ELAPSED_TIME_UNKNOWN = -1; -const int CSSMERR_DL_DATASTORE_IS_OPEN = -2147413734; +const int CSSM_ELAPSED_TIME_COMPLETE = -2; -const int CSSMERR_DL_RECORD_NOT_FOUND = -2147413733; +const int CSSM_TP_CERTISSUE_STATUS_UNKNOWN = 0; -const int CSSMERR_DL_MISSING_VALUE = -2147413732; +const int CSSM_TP_CERTISSUE_OK = 1; -const int CSSMERR_DL_UNSUPPORTED_QUERY = -2147413731; +const int CSSM_TP_CERTISSUE_OKWITHCERTMODS = 2; -const int CSSMERR_DL_UNSUPPORTED_QUERY_LIMITS = -2147413730; +const int CSSM_TP_CERTISSUE_OKWITHSERVICEMODS = 3; -const int CSSMERR_DL_UNSUPPORTED_NUM_SELECTION_PREDS = -2147413729; +const int CSSM_TP_CERTISSUE_REJECTED = 4; -const int CSSMERR_DL_UNSUPPORTED_OPERATOR = -2147413727; +const int CSSM_TP_CERTISSUE_NOT_AUTHORIZED = 5; -const int CSSMERR_DL_INVALID_RESULTS_HANDLE = -2147413726; +const int CSSM_TP_CERTISSUE_WILL_BE_REVOKED = 6; -const int CSSMERR_DL_INVALID_DB_LOCATION = -2147413725; +const int CSSM_TP_CERTCHANGE_NONE = 0; -const int CSSMERR_DL_INVALID_ACCESS_REQUEST = -2147413724; +const int CSSM_TP_CERTCHANGE_REVOKE = 1; -const int CSSMERR_DL_INVALID_INDEX_INFO = -2147413723; +const int CSSM_TP_CERTCHANGE_HOLD = 2; -const int CSSMERR_DL_INVALID_SELECTION_TAG = -2147413722; +const int CSSM_TP_CERTCHANGE_RELEASE = 3; -const int CSSMERR_DL_INVALID_NEW_OWNER = -2147413721; +const int CSSM_TP_CERTCHANGE_REASON_UNKNOWN = 0; -const int CSSMERR_DL_INVALID_RECORD_UID = -2147413720; +const int CSSM_TP_CERTCHANGE_REASON_KEYCOMPROMISE = 1; -const int CSSMERR_DL_INVALID_UNIQUE_INDEX_DATA = -2147413719; +const int CSSM_TP_CERTCHANGE_REASON_CACOMPROMISE = 2; -const int CSSMERR_DL_INVALID_MODIFY_MODE = -2147413718; +const int CSSM_TP_CERTCHANGE_REASON_CEASEOPERATION = 3; -const int CSSMERR_DL_INVALID_OPEN_PARAMETERS = -2147413717; +const int CSSM_TP_CERTCHANGE_REASON_AFFILIATIONCHANGE = 4; -const int CSSMERR_DL_RECORD_MODIFIED = -2147413716; +const int CSSM_TP_CERTCHANGE_REASON_SUPERCEDED = 5; -const int CSSMERR_DL_ENDOFDATA = -2147413715; +const int CSSM_TP_CERTCHANGE_REASON_SUSPECTEDCOMPROMISE = 6; -const int CSSMERR_DL_INVALID_QUERY = -2147413714; +const int CSSM_TP_CERTCHANGE_REASON_HOLDRELEASE = 7; -const int CSSMERR_DL_INVALID_VALUE = -2147413713; +const int CSSM_TP_CERTCHANGE_STATUS_UNKNOWN = 0; -const int CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTED = -2147413712; +const int CSSM_TP_CERTCHANGE_OK = 1; -const int CSSMERR_DL_STALE_UNIQUE_RECORD = -2147413711; +const int CSSM_TP_CERTCHANGE_OKWITHNEWTIME = 2; -const int CSSM_WORDID_KEYCHAIN_PROMPT = 65536; +const int CSSM_TP_CERTCHANGE_WRONGCA = 3; -const int CSSM_WORDID_KEYCHAIN_LOCK = 65537; +const int CSSM_TP_CERTCHANGE_REJECTED = 4; -const int CSSM_WORDID_KEYCHAIN_CHANGE_LOCK = 65538; +const int CSSM_TP_CERTCHANGE_NOT_AUTHORIZED = 5; -const int CSSM_WORDID_PROCESS = 65539; +const int CSSM_TP_CERTVERIFY_UNKNOWN = 0; -const int CSSM_WORDID__RESERVED_1 = 65540; +const int CSSM_TP_CERTVERIFY_VALID = 1; -const int CSSM_WORDID_SYMMETRIC_KEY = 65541; +const int CSSM_TP_CERTVERIFY_INVALID = 2; -const int CSSM_WORDID_SYSTEM = 65542; +const int CSSM_TP_CERTVERIFY_REVOKED = 3; -const int CSSM_WORDID_KEY = 65543; +const int CSSM_TP_CERTVERIFY_SUSPENDED = 4; -const int CSSM_WORDID_PIN = 65544; +const int CSSM_TP_CERTVERIFY_EXPIRED = 5; -const int CSSM_WORDID_PREAUTH = 65545; +const int CSSM_TP_CERTVERIFY_NOT_VALID_YET = 6; -const int CSSM_WORDID_PREAUTH_SOURCE = 65546; +const int CSSM_TP_CERTVERIFY_INVALID_AUTHORITY = 7; -const int CSSM_WORDID_ASYMMETRIC_KEY = 65547; +const int CSSM_TP_CERTVERIFY_INVALID_SIGNATURE = 8; -const int CSSM_WORDID_PARTITION = 65548; +const int CSSM_TP_CERTVERIFY_INVALID_CERT_VALUE = 9; -const int CSSM_WORDID_KEYBAG_KEY = 65549; +const int CSSM_TP_CERTVERIFY_INVALID_CERTGROUP = 10; -const int CSSM_WORDID__FIRST_UNUSED = 65550; +const int CSSM_TP_CERTVERIFY_INVALID_POLICY = 11; -const int CSSM_ACL_SUBJECT_TYPE_KEYCHAIN_PROMPT = 65536; +const int CSSM_TP_CERTVERIFY_INVALID_POLICY_IDS = 12; -const int CSSM_ACL_SUBJECT_TYPE_PROCESS = 65539; +const int CSSM_TP_CERTVERIFY_INVALID_BASIC_CONSTRAINTS = 13; -const int CSSM_ACL_SUBJECT_TYPE_CODE_SIGNATURE = 116; +const int CSSM_TP_CERTVERIFY_INVALID_CRL_DIST_PT = 14; -const int CSSM_ACL_SUBJECT_TYPE_COMMENT = 12; +const int CSSM_TP_CERTVERIFY_INVALID_NAME_TREE = 15; -const int CSSM_ACL_SUBJECT_TYPE_SYMMETRIC_KEY = 65541; +const int CSSM_TP_CERTVERIFY_UNKNOWN_CRITICAL_EXT = 16; -const int CSSM_ACL_SUBJECT_TYPE_PREAUTH = 65545; +const int CSSM_TP_CERTNOTARIZE_STATUS_UNKNOWN = 0; -const int CSSM_ACL_SUBJECT_TYPE_PREAUTH_SOURCE = 65546; +const int CSSM_TP_CERTNOTARIZE_OK = 1; -const int CSSM_ACL_SUBJECT_TYPE_ASYMMETRIC_KEY = 65547; +const int CSSM_TP_CERTNOTARIZE_OKWITHOUTFIELDS = 2; -const int CSSM_ACL_SUBJECT_TYPE_PARTITION = 65548; +const int CSSM_TP_CERTNOTARIZE_OKWITHSERVICEMODS = 3; -const int CSSM_SAMPLE_TYPE_KEYCHAIN_PROMPT = 65536; +const int CSSM_TP_CERTNOTARIZE_REJECTED = 4; -const int CSSM_SAMPLE_TYPE_KEYCHAIN_LOCK = 65537; +const int CSSM_TP_CERTNOTARIZE_NOT_AUTHORIZED = 5; -const int CSSM_SAMPLE_TYPE_KEYCHAIN_CHANGE_LOCK = 65538; +const int CSSM_TP_CERTRECLAIM_STATUS_UNKNOWN = 0; -const int CSSM_SAMPLE_TYPE_PROCESS = 65539; +const int CSSM_TP_CERTRECLAIM_OK = 1; -const int CSSM_SAMPLE_TYPE_COMMENT = 12; +const int CSSM_TP_CERTRECLAIM_NOMATCH = 2; -const int CSSM_SAMPLE_TYPE_RETRY_ID = 85; +const int CSSM_TP_CERTRECLAIM_REJECTED = 3; -const int CSSM_SAMPLE_TYPE_SYMMETRIC_KEY = 65541; +const int CSSM_TP_CERTRECLAIM_NOT_AUTHORIZED = 4; -const int CSSM_SAMPLE_TYPE_PREAUTH = 65545; +const int CSSM_TP_CRLISSUE_STATUS_UNKNOWN = 0; -const int CSSM_SAMPLE_TYPE_ASYMMETRIC_KEY = 65547; +const int CSSM_TP_CRLISSUE_OK = 1; -const int CSSM_SAMPLE_TYPE_KEYBAG_KEY = 65549; +const int CSSM_TP_CRLISSUE_NOT_CURRENT = 2; -const int CSSM_ACL_AUTHORIZATION_CHANGE_ACL = 65536; +const int CSSM_TP_CRLISSUE_INVALID_DOMAIN = 3; -const int CSSM_ACL_AUTHORIZATION_CHANGE_OWNER = 65537; +const int CSSM_TP_CRLISSUE_UNKNOWN_IDENTIFIER = 4; -const int CSSM_ACL_AUTHORIZATION_PARTITION_ID = 65538; +const int CSSM_TP_CRLISSUE_REJECTED = 5; -const int CSSM_ACL_AUTHORIZATION_INTEGRITY = 65539; +const int CSSM_TP_CRLISSUE_NOT_AUTHORIZED = 6; -const int CSSM_ACL_AUTHORIZATION_PREAUTH_BASE = 16842752; +const int CSSM_TP_FORM_TYPE_GENERIC = 0; -const int CSSM_ACL_AUTHORIZATION_PREAUTH_END = 16908288; +const int CSSM_TP_FORM_TYPE_REGISTRATION = 1; -const int CSSM_ACL_CODE_SIGNATURE_INVALID = 0; +const int CSSM_CL_TEMPLATE_INTERMEDIATE_CERT = 1; -const int CSSM_ACL_CODE_SIGNATURE_OSX = 1; +const int CSSM_CL_TEMPLATE_PKIX_CERTTEMPLATE = 2; -const int CSSM_ACL_MATCH_UID = 1; +const int CSSM_CERT_BUNDLE_UNKNOWN = 0; -const int CSSM_ACL_MATCH_GID = 2; +const int CSSM_CERT_BUNDLE_CUSTOM = 1; -const int CSSM_ACL_MATCH_HONOR_ROOT = 256; +const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_DATA = 2; -const int CSSM_ACL_MATCH_BITS = 3; +const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_ENVELOPED_DATA = 3; -const int CSSM_ACL_PROCESS_SELECTOR_CURRENT_VERSION = 257; +const int CSSM_CERT_BUNDLE_PKCS12 = 4; -const int CSSM_ACL_KEYCHAIN_PROMPT_CURRENT_VERSION = 257; +const int CSSM_CERT_BUNDLE_PFX = 5; -const int CSSM_ACL_KEYCHAIN_PROMPT_REQUIRE_PASSPHRASE = 1; +const int CSSM_CERT_BUNDLE_SPKI_SEQUENCE = 6; -const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED = 16; +const int CSSM_CERT_BUNDLE_PGP_KEYRING = 7; -const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED_ACT = 32; +const int CSSM_CERT_BUNDLE_LAST = 32767; -const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID = 64; +const int CSSM_CL_CUSTOM_CERT_BUNDLE_TYPE = 32768; -const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID_ACT = 128; +const int CSSM_CERT_BUNDLE_ENCODING_UNKNOWN = 0; -const int CSSM_ACL_PREAUTH_TRACKING_COUNT_MASK = 255; +const int CSSM_CERT_BUNDLE_ENCODING_CUSTOM = 1; -const int CSSM_ACL_PREAUTH_TRACKING_BLOCKED = 0; +const int CSSM_CERT_BUNDLE_ENCODING_BER = 2; -const int CSSM_ACL_PREAUTH_TRACKING_UNKNOWN = 1073741824; +const int CSSM_CERT_BUNDLE_ENCODING_DER = 3; -const int CSSM_ACL_PREAUTH_TRACKING_AUTHORIZED = -2147483648; +const int CSSM_CERT_BUNDLE_ENCODING_SEXPR = 4; -const int CSSM_DB_ACCESS_RESET = 65536; +const int CSSM_CERT_BUNDLE_ENCODING_PGP = 5; -const int CSSM_ALGID_APPLE_YARROW = -2147483648; +const int CSSM_FIELDVALUE_COMPLEX_DATA_TYPE = -1; -const int CSSM_ALGID_AES = -2147483647; +const int CSSM_DB_ATTRIBUTE_NAME_AS_STRING = 0; -const int CSSM_ALGID_FEE = -2147483646; +const int CSSM_DB_ATTRIBUTE_NAME_AS_OID = 1; -const int CSSM_ALGID_FEE_MD5 = -2147483645; +const int CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER = 2; -const int CSSM_ALGID_FEE_SHA1 = -2147483644; +const int CSSM_DB_ATTRIBUTE_FORMAT_STRING = 0; -const int CSSM_ALGID_FEED = -2147483643; +const int CSSM_DB_ATTRIBUTE_FORMAT_SINT32 = 1; -const int CSSM_ALGID_FEEDEXP = -2147483642; +const int CSSM_DB_ATTRIBUTE_FORMAT_UINT32 = 2; -const int CSSM_ALGID_ASC = -2147483641; +const int CSSM_DB_ATTRIBUTE_FORMAT_BIG_NUM = 3; -const int CSSM_ALGID_SHA1HMAC_LEGACY = -2147483640; +const int CSSM_DB_ATTRIBUTE_FORMAT_REAL = 4; -const int CSSM_ALGID_KEYCHAIN_KEY = -2147483639; +const int CSSM_DB_ATTRIBUTE_FORMAT_TIME_DATE = 5; -const int CSSM_ALGID_PKCS12_PBE_ENCR = -2147483638; +const int CSSM_DB_ATTRIBUTE_FORMAT_BLOB = 6; -const int CSSM_ALGID_PKCS12_PBE_MAC = -2147483637; +const int CSSM_DB_ATTRIBUTE_FORMAT_MULTI_UINT32 = 7; -const int CSSM_ALGID_SECURE_PASSPHRASE = -2147483636; +const int CSSM_DB_ATTRIBUTE_FORMAT_COMPLEX = 8; -const int CSSM_ALGID_PBE_OPENSSL_MD5 = -2147483635; +const int CSSM_DB_RECORDTYPE_SCHEMA_START = 0; -const int CSSM_ALGID_SHA256 = -2147483634; +const int CSSM_DB_RECORDTYPE_SCHEMA_END = 4; -const int CSSM_ALGID_SHA384 = -2147483633; +const int CSSM_DB_RECORDTYPE_OPEN_GROUP_START = 10; -const int CSSM_ALGID_SHA512 = -2147483632; +const int CSSM_DB_RECORDTYPE_OPEN_GROUP_END = 18; -const int CSSM_ALGID_ENTROPY_DEFAULT = -2147483631; +const int CSSM_DB_RECORDTYPE_APP_DEFINED_START = -2147483648; -const int CSSM_ALGID_SHA224 = -2147483630; +const int CSSM_DB_RECORDTYPE_APP_DEFINED_END = -1; -const int CSSM_ALGID_SHA224WithRSA = -2147483629; +const int CSSM_DL_DB_SCHEMA_INFO = 0; -const int CSSM_ALGID_SHA256WithRSA = -2147483628; +const int CSSM_DL_DB_SCHEMA_INDEXES = 1; -const int CSSM_ALGID_SHA384WithRSA = -2147483627; +const int CSSM_DL_DB_SCHEMA_ATTRIBUTES = 2; -const int CSSM_ALGID_SHA512WithRSA = -2147483626; +const int CSSM_DL_DB_SCHEMA_PARSING_MODULE = 3; -const int CSSM_ALGID_OPENSSH1 = -2147483625; +const int CSSM_DL_DB_RECORD_ANY = 10; -const int CSSM_ALGID_SHA224WithECDSA = -2147483624; +const int CSSM_DL_DB_RECORD_CERT = 11; -const int CSSM_ALGID_SHA256WithECDSA = -2147483623; +const int CSSM_DL_DB_RECORD_CRL = 12; -const int CSSM_ALGID_SHA384WithECDSA = -2147483622; +const int CSSM_DL_DB_RECORD_POLICY = 13; -const int CSSM_ALGID_SHA512WithECDSA = -2147483621; +const int CSSM_DL_DB_RECORD_GENERIC = 14; -const int CSSM_ALGID_ECDSA_SPECIFIED = -2147483620; +const int CSSM_DL_DB_RECORD_PUBLIC_KEY = 15; -const int CSSM_ALGID_ECDH_X963_KDF = -2147483619; +const int CSSM_DL_DB_RECORD_PRIVATE_KEY = 16; -const int CSSM_ALGID__FIRST_UNUSED = -2147483618; +const int CSSM_DL_DB_RECORD_SYMMETRIC_KEY = 17; -const int CSSM_PADDING_APPLE_SSLv2 = -2147483648; +const int CSSM_DL_DB_RECORD_ALL_KEYS = 18; -const int CSSM_KEYBLOB_RAW_FORMAT_VENDOR_DEFINED = -2147483648; +const int CSSM_DB_CERT_USE_TRUSTED = 1; -const int CSSM_KEYBLOB_RAW_FORMAT_X509 = -2147483648; +const int CSSM_DB_CERT_USE_SYSTEM = 2; -const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH = -2147483647; +const int CSSM_DB_CERT_USE_OWNER = 4; -const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSL = -2147483646; +const int CSSM_DB_CERT_USE_REVOKED = 8; -const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH2 = -2147483645; +const int CSSM_DB_CERT_USE_SIGNING = 16; -const int CSSM_CUSTOM_COMMON_ERROR_EXTENT = 224; +const int CSSM_DB_CERT_USE_PRIVACY = 32; -const int CSSM_ERRCODE_NO_USER_INTERACTION = 224; +const int CSSM_DB_INDEX_UNIQUE = 0; -const int CSSM_ERRCODE_USER_CANCELED = 225; +const int CSSM_DB_INDEX_NONUNIQUE = 1; -const int CSSM_ERRCODE_SERVICE_NOT_AVAILABLE = 226; +const int CSSM_DB_INDEX_ON_UNKNOWN = 0; -const int CSSM_ERRCODE_INSUFFICIENT_CLIENT_IDENTIFICATION = 227; +const int CSSM_DB_INDEX_ON_ATTRIBUTE = 1; -const int CSSM_ERRCODE_DEVICE_RESET = 228; +const int CSSM_DB_INDEX_ON_RECORD = 2; -const int CSSM_ERRCODE_DEVICE_FAILED = 229; +const int CSSM_DB_ACCESS_READ = 1; -const int CSSM_ERRCODE_IN_DARK_WAKE = 230; +const int CSSM_DB_ACCESS_WRITE = 2; -const int CSSMERR_CSSM_NO_USER_INTERACTION = -2147417888; +const int CSSM_DB_ACCESS_PRIVILEGED = 4; -const int CSSMERR_AC_NO_USER_INTERACTION = -2147405600; +const int CSSM_DB_MODIFY_ATTRIBUTE_NONE = 0; -const int CSSMERR_CSP_NO_USER_INTERACTION = -2147415840; +const int CSSM_DB_MODIFY_ATTRIBUTE_ADD = 1; -const int CSSMERR_CL_NO_USER_INTERACTION = -2147411744; +const int CSSM_DB_MODIFY_ATTRIBUTE_DELETE = 2; -const int CSSMERR_DL_NO_USER_INTERACTION = -2147413792; +const int CSSM_DB_MODIFY_ATTRIBUTE_REPLACE = 3; -const int CSSMERR_TP_NO_USER_INTERACTION = -2147409696; +const int CSSM_DB_EQUAL = 0; -const int CSSMERR_CSSM_USER_CANCELED = -2147417887; +const int CSSM_DB_NOT_EQUAL = 1; -const int CSSMERR_AC_USER_CANCELED = -2147405599; +const int CSSM_DB_LESS_THAN = 2; -const int CSSMERR_CSP_USER_CANCELED = -2147415839; +const int CSSM_DB_GREATER_THAN = 3; -const int CSSMERR_CL_USER_CANCELED = -2147411743; +const int CSSM_DB_CONTAINS = 4; -const int CSSMERR_DL_USER_CANCELED = -2147413791; +const int CSSM_DB_CONTAINS_INITIAL_SUBSTRING = 5; -const int CSSMERR_TP_USER_CANCELED = -2147409695; +const int CSSM_DB_CONTAINS_FINAL_SUBSTRING = 6; -const int CSSMERR_CSSM_SERVICE_NOT_AVAILABLE = -2147417886; +const int CSSM_DB_NONE = 0; -const int CSSMERR_AC_SERVICE_NOT_AVAILABLE = -2147405598; +const int CSSM_DB_AND = 1; -const int CSSMERR_CSP_SERVICE_NOT_AVAILABLE = -2147415838; +const int CSSM_DB_OR = 2; -const int CSSMERR_CL_SERVICE_NOT_AVAILABLE = -2147411742; +const int CSSM_QUERY_TIMELIMIT_NONE = 0; -const int CSSMERR_DL_SERVICE_NOT_AVAILABLE = -2147413790; +const int CSSM_QUERY_SIZELIMIT_NONE = 0; -const int CSSMERR_TP_SERVICE_NOT_AVAILABLE = -2147409694; +const int CSSM_QUERY_RETURN_DATA = 1; -const int CSSMERR_CSSM_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147417885; +const int CSSM_DL_UNKNOWN = 0; -const int CSSMERR_AC_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147405597; +const int CSSM_DL_CUSTOM = 1; -const int CSSMERR_CSP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147415837; +const int CSSM_DL_LDAP = 2; -const int CSSMERR_CL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147411741; +const int CSSM_DL_ODBC = 3; -const int CSSMERR_DL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147413789; +const int CSSM_DL_PKCS11 = 4; -const int CSSMERR_TP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147409693; +const int CSSM_DL_FFS = 5; -const int CSSMERR_CSSM_DEVICE_RESET = -2147417884; +const int CSSM_DL_MEMORY = 6; -const int CSSMERR_AC_DEVICE_RESET = -2147405596; +const int CSSM_DL_REMOTEDIR = 7; -const int CSSMERR_CSP_DEVICE_RESET = -2147415836; +const int CSSM_DB_DATASTORES_UNKNOWN = -1; -const int CSSMERR_CL_DEVICE_RESET = -2147411740; +const int CSSM_DB_TRANSACTIONAL_MODE = 0; -const int CSSMERR_DL_DEVICE_RESET = -2147413788; +const int CSSM_DB_FILESYSTEMSCAN_MODE = 1; -const int CSSMERR_TP_DEVICE_RESET = -2147409692; +const int CSSM_BASE_ERROR = -2147418112; -const int CSSMERR_CSSM_DEVICE_FAILED = -2147417883; +const int CSSM_ERRORCODE_MODULE_EXTENT = 2048; -const int CSSMERR_AC_DEVICE_FAILED = -2147405595; +const int CSSM_ERRORCODE_CUSTOM_OFFSET = 1024; -const int CSSMERR_CSP_DEVICE_FAILED = -2147415835; +const int CSSM_ERRORCODE_COMMON_EXTENT = 256; -const int CSSMERR_CL_DEVICE_FAILED = -2147411739; +const int CSSM_CSSM_BASE_ERROR = -2147418112; -const int CSSMERR_DL_DEVICE_FAILED = -2147413787; +const int CSSM_CSSM_PRIVATE_ERROR = -2147417088; -const int CSSMERR_TP_DEVICE_FAILED = -2147409691; +const int CSSM_CSP_BASE_ERROR = -2147416064; -const int CSSMERR_CSSM_IN_DARK_WAKE = -2147417882; +const int CSSM_CSP_PRIVATE_ERROR = -2147415040; -const int CSSMERR_AC_IN_DARK_WAKE = -2147405594; +const int CSSM_DL_BASE_ERROR = -2147414016; -const int CSSMERR_CSP_IN_DARK_WAKE = -2147415834; +const int CSSM_DL_PRIVATE_ERROR = -2147412992; -const int CSSMERR_CL_IN_DARK_WAKE = -2147411738; +const int CSSM_CL_BASE_ERROR = -2147411968; -const int CSSMERR_DL_IN_DARK_WAKE = -2147413786; +const int CSSM_CL_PRIVATE_ERROR = -2147410944; -const int CSSMERR_TP_IN_DARK_WAKE = -2147409690; +const int CSSM_TP_BASE_ERROR = -2147409920; -const int CSSMERR_CSP_APPLE_ADD_APPLICATION_ACL_SUBJECT = -2147415040; +const int CSSM_TP_PRIVATE_ERROR = -2147408896; -const int CSSMERR_CSP_APPLE_PUBLIC_KEY_INCOMPLETE = -2147415039; +const int CSSM_KR_BASE_ERROR = -2147407872; -const int CSSMERR_CSP_APPLE_SIGNATURE_MISMATCH = -2147415038; +const int CSSM_KR_PRIVATE_ERROR = -2147406848; -const int CSSMERR_CSP_APPLE_INVALID_KEY_START_DATE = -2147415037; +const int CSSM_AC_BASE_ERROR = -2147405824; -const int CSSMERR_CSP_APPLE_INVALID_KEY_END_DATE = -2147415036; +const int CSSM_AC_PRIVATE_ERROR = -2147404800; -const int CSSMERR_CSPDL_APPLE_DL_CONVERSION_ERROR = -2147415035; +const int CSSM_MDS_BASE_ERROR = -2147414016; -const int CSSMERR_CSP_APPLE_SSLv2_ROLLBACK = -2147415034; +const int CSSM_MDS_PRIVATE_ERROR = -2147412992; -const int CSSM_DL_DB_RECORD_GENERIC_PASSWORD = -2147483648; +const int CSSMERR_CSSM_INVALID_ADDIN_HANDLE = -2147417855; -const int CSSM_DL_DB_RECORD_INTERNET_PASSWORD = -2147483647; +const int CSSMERR_CSSM_NOT_INITIALIZED = -2147417854; -const int CSSM_DL_DB_RECORD_APPLESHARE_PASSWORD = -2147483646; +const int CSSMERR_CSSM_INVALID_HANDLE_USAGE = -2147417853; -const int CSSM_DL_DB_RECORD_X509_CERTIFICATE = -2147479552; +const int CSSMERR_CSSM_PVC_REFERENT_NOT_FOUND = -2147417852; -const int CSSM_DL_DB_RECORD_USER_TRUST = -2147479551; +const int CSSMERR_CSSM_FUNCTION_INTEGRITY_FAIL = -2147417851; -const int CSSM_DL_DB_RECORD_X509_CRL = -2147479550; +const int CSSM_ERRCODE_INTERNAL_ERROR = 1; -const int CSSM_DL_DB_RECORD_UNLOCK_REFERRAL = -2147479549; +const int CSSM_ERRCODE_MEMORY_ERROR = 2; -const int CSSM_DL_DB_RECORD_EXTENDED_ATTRIBUTE = -2147479548; +const int CSSM_ERRCODE_MDS_ERROR = 3; -const int CSSM_DL_DB_RECORD_METADATA = -2147450880; +const int CSSM_ERRCODE_INVALID_POINTER = 4; -const int CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT = 0; +const int CSSM_ERRCODE_INVALID_INPUT_POINTER = 5; -const int CSSM_APPLEFILEDL_COMMIT = 1; +const int CSSM_ERRCODE_INVALID_OUTPUT_POINTER = 6; -const int CSSM_APPLEFILEDL_ROLLBACK = 2; +const int CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED = 7; -const int CSSM_APPLEFILEDL_TAKE_FILE_LOCK = 3; +const int CSSM_ERRCODE_SELF_CHECK_FAILED = 8; -const int CSSM_APPLEFILEDL_MAKE_BACKUP = 4; +const int CSSM_ERRCODE_OS_ACCESS_DENIED = 9; -const int CSSM_APPLEFILEDL_MAKE_COPY = 5; +const int CSSM_ERRCODE_FUNCTION_FAILED = 10; -const int CSSM_APPLEFILEDL_DELETE_FILE = 6; +const int CSSM_ERRCODE_MODULE_MANIFEST_VERIFY_FAILED = 11; -const int CSSM_APPLE_UNLOCK_TYPE_KEY_DIRECT = 1; +const int CSSM_ERRCODE_INVALID_GUID = 12; -const int CSSM_APPLE_UNLOCK_TYPE_WRAPPED_PRIVATE = 2; +const int CSSM_ERRCODE_OPERATION_AUTH_DENIED = 32; -const int CSSM_APPLE_UNLOCK_TYPE_KEYBAG = 3; +const int CSSM_ERRCODE_OBJECT_USE_AUTH_DENIED = 33; -const int CSSMERR_APPLEDL_INVALID_OPEN_PARAMETERS = -2147412992; +const int CSSM_ERRCODE_OBJECT_MANIP_AUTH_DENIED = 34; -const int CSSMERR_APPLEDL_DISK_FULL = -2147412991; +const int CSSM_ERRCODE_OBJECT_ACL_NOT_SUPPORTED = 35; -const int CSSMERR_APPLEDL_QUOTA_EXCEEDED = -2147412990; +const int CSSM_ERRCODE_OBJECT_ACL_REQUIRED = 36; -const int CSSMERR_APPLEDL_FILE_TOO_BIG = -2147412989; +const int CSSM_ERRCODE_INVALID_ACCESS_CREDENTIALS = 37; -const int CSSMERR_APPLEDL_INVALID_DATABASE_BLOB = -2147412988; +const int CSSM_ERRCODE_INVALID_ACL_BASE_CERTS = 38; -const int CSSMERR_APPLEDL_INVALID_KEY_BLOB = -2147412987; +const int CSSM_ERRCODE_ACL_BASE_CERTS_NOT_SUPPORTED = 39; -const int CSSMERR_APPLEDL_INCOMPATIBLE_DATABASE_BLOB = -2147412986; +const int CSSM_ERRCODE_INVALID_SAMPLE_VALUE = 40; -const int CSSMERR_APPLEDL_INCOMPATIBLE_KEY_BLOB = -2147412985; +const int CSSM_ERRCODE_SAMPLE_VALUE_NOT_SUPPORTED = 41; -const int CSSMERR_APPLETP_HOSTNAME_MISMATCH = -2147408896; +const int CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE = 42; -const int CSSMERR_APPLETP_UNKNOWN_CRITICAL_EXTEN = -2147408895; +const int CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED = 43; -const int CSSMERR_APPLETP_NO_BASIC_CONSTRAINTS = -2147408894; +const int CSSM_ERRCODE_INVALID_ACL_CHALLENGE_CALLBACK = 44; -const int CSSMERR_APPLETP_INVALID_CA = -2147408893; +const int CSSM_ERRCODE_ACL_CHALLENGE_CALLBACK_FAILED = 45; -const int CSSMERR_APPLETP_INVALID_AUTHORITY_ID = -2147408892; +const int CSSM_ERRCODE_INVALID_ACL_ENTRY_TAG = 46; -const int CSSMERR_APPLETP_INVALID_SUBJECT_ID = -2147408891; +const int CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND = 47; -const int CSSMERR_APPLETP_INVALID_KEY_USAGE = -2147408890; +const int CSSM_ERRCODE_INVALID_ACL_EDIT_MODE = 48; -const int CSSMERR_APPLETP_INVALID_EXTENDED_KEY_USAGE = -2147408889; +const int CSSM_ERRCODE_ACL_CHANGE_FAILED = 49; -const int CSSMERR_APPLETP_INVALID_ID_LINKAGE = -2147408888; +const int CSSM_ERRCODE_INVALID_NEW_ACL_ENTRY = 50; -const int CSSMERR_APPLETP_PATH_LEN_CONSTRAINT = -2147408887; +const int CSSM_ERRCODE_INVALID_NEW_ACL_OWNER = 51; -const int CSSMERR_APPLETP_INVALID_ROOT = -2147408886; +const int CSSM_ERRCODE_ACL_DELETE_FAILED = 52; -const int CSSMERR_APPLETP_CRL_EXPIRED = -2147408885; +const int CSSM_ERRCODE_ACL_REPLACE_FAILED = 53; -const int CSSMERR_APPLETP_CRL_NOT_VALID_YET = -2147408884; +const int CSSM_ERRCODE_ACL_ADD_FAILED = 54; -const int CSSMERR_APPLETP_CRL_NOT_FOUND = -2147408883; +const int CSSM_ERRCODE_INVALID_CONTEXT_HANDLE = 64; -const int CSSMERR_APPLETP_CRL_SERVER_DOWN = -2147408882; +const int CSSM_ERRCODE_INCOMPATIBLE_VERSION = 65; -const int CSSMERR_APPLETP_CRL_BAD_URI = -2147408881; +const int CSSM_ERRCODE_INVALID_CERTGROUP_POINTER = 66; -const int CSSMERR_APPLETP_UNKNOWN_CERT_EXTEN = -2147408880; +const int CSSM_ERRCODE_INVALID_CERT_POINTER = 67; -const int CSSMERR_APPLETP_UNKNOWN_CRL_EXTEN = -2147408879; +const int CSSM_ERRCODE_INVALID_CRL_POINTER = 68; -const int CSSMERR_APPLETP_CRL_NOT_TRUSTED = -2147408878; +const int CSSM_ERRCODE_INVALID_FIELD_POINTER = 69; -const int CSSMERR_APPLETP_CRL_INVALID_ANCHOR_CERT = -2147408877; +const int CSSM_ERRCODE_INVALID_DATA = 70; -const int CSSMERR_APPLETP_CRL_POLICY_FAIL = -2147408876; +const int CSSM_ERRCODE_CRL_ALREADY_SIGNED = 71; -const int CSSMERR_APPLETP_IDP_FAIL = -2147408875; +const int CSSM_ERRCODE_INVALID_NUMBER_OF_FIELDS = 72; -const int CSSMERR_APPLETP_CERT_NOT_FOUND_FROM_ISSUER = -2147408874; +const int CSSM_ERRCODE_VERIFICATION_FAILURE = 73; -const int CSSMERR_APPLETP_BAD_CERT_FROM_ISSUER = -2147408873; +const int CSSM_ERRCODE_INVALID_DB_HANDLE = 74; -const int CSSMERR_APPLETP_SMIME_EMAIL_ADDRS_NOT_FOUND = -2147408872; +const int CSSM_ERRCODE_PRIVILEGE_NOT_GRANTED = 75; -const int CSSMERR_APPLETP_SMIME_BAD_EXT_KEY_USE = -2147408871; +const int CSSM_ERRCODE_INVALID_DB_LIST = 76; -const int CSSMERR_APPLETP_SMIME_BAD_KEY_USE = -2147408870; +const int CSSM_ERRCODE_INVALID_DB_LIST_POINTER = 77; -const int CSSMERR_APPLETP_SMIME_KEYUSAGE_NOT_CRITICAL = -2147408869; +const int CSSM_ERRCODE_UNKNOWN_FORMAT = 78; -const int CSSMERR_APPLETP_SMIME_NO_EMAIL_ADDRS = -2147408868; +const int CSSM_ERRCODE_UNKNOWN_TAG = 79; -const int CSSMERR_APPLETP_SMIME_SUBJ_ALT_NAME_NOT_CRIT = -2147408867; +const int CSSM_ERRCODE_INVALID_CSP_HANDLE = 80; -const int CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE = -2147408866; +const int CSSM_ERRCODE_INVALID_DL_HANDLE = 81; -const int CSSMERR_APPLETP_OCSP_BAD_RESPONSE = -2147408865; +const int CSSM_ERRCODE_INVALID_CL_HANDLE = 82; -const int CSSMERR_APPLETP_OCSP_BAD_REQUEST = -2147408864; +const int CSSM_ERRCODE_INVALID_TP_HANDLE = 83; -const int CSSMERR_APPLETP_OCSP_UNAVAILABLE = -2147408863; +const int CSSM_ERRCODE_INVALID_KR_HANDLE = 84; -const int CSSMERR_APPLETP_OCSP_STATUS_UNRECOGNIZED = -2147408862; +const int CSSM_ERRCODE_INVALID_AC_HANDLE = 85; -const int CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK = -2147408861; +const int CSSM_ERRCODE_INVALID_PASSTHROUGH_ID = 86; -const int CSSMERR_APPLETP_NETWORK_FAILURE = -2147408860; +const int CSSM_ERRCODE_INVALID_NETWORK_ADDR = 87; -const int CSSMERR_APPLETP_OCSP_NOT_TRUSTED = -2147408859; +const int CSSM_ERRCODE_INVALID_CRYPTO_DATA = 88; -const int CSSMERR_APPLETP_OCSP_INVALID_ANCHOR_CERT = -2147408858; +const int CSSMERR_CSSM_INTERNAL_ERROR = -2147418111; -const int CSSMERR_APPLETP_OCSP_SIG_ERROR = -2147408857; +const int CSSMERR_CSSM_MEMORY_ERROR = -2147418110; -const int CSSMERR_APPLETP_OCSP_NO_SIGNER = -2147408856; +const int CSSMERR_CSSM_MDS_ERROR = -2147418109; -const int CSSMERR_APPLETP_OCSP_RESP_MALFORMED_REQ = -2147408855; +const int CSSMERR_CSSM_INVALID_POINTER = -2147418108; -const int CSSMERR_APPLETP_OCSP_RESP_INTERNAL_ERR = -2147408854; +const int CSSMERR_CSSM_INVALID_INPUT_POINTER = -2147418107; -const int CSSMERR_APPLETP_OCSP_RESP_TRY_LATER = -2147408853; +const int CSSMERR_CSSM_INVALID_OUTPUT_POINTER = -2147418106; -const int CSSMERR_APPLETP_OCSP_RESP_SIG_REQUIRED = -2147408852; +const int CSSMERR_CSSM_FUNCTION_NOT_IMPLEMENTED = -2147418105; -const int CSSMERR_APPLETP_OCSP_RESP_UNAUTHORIZED = -2147408851; +const int CSSMERR_CSSM_SELF_CHECK_FAILED = -2147418104; -const int CSSMERR_APPLETP_OCSP_NONCE_MISMATCH = -2147408850; +const int CSSMERR_CSSM_OS_ACCESS_DENIED = -2147418103; -const int CSSMERR_APPLETP_CS_BAD_CERT_CHAIN_LENGTH = -2147408849; +const int CSSMERR_CSSM_FUNCTION_FAILED = -2147418102; -const int CSSMERR_APPLETP_CS_NO_BASIC_CONSTRAINTS = -2147408848; +const int CSSMERR_CSSM_MODULE_MANIFEST_VERIFY_FAILED = -2147418101; -const int CSSMERR_APPLETP_CS_BAD_PATH_LENGTH = -2147408847; +const int CSSMERR_CSSM_INVALID_GUID = -2147418100; -const int CSSMERR_APPLETP_CS_NO_EXTENDED_KEY_USAGE = -2147408846; +const int CSSMERR_CSSM_INVALID_CONTEXT_HANDLE = -2147418048; -const int CSSMERR_APPLETP_CODE_SIGN_DEVELOPMENT = -2147408845; +const int CSSMERR_CSSM_INCOMPATIBLE_VERSION = -2147418047; -const int CSSMERR_APPLETP_RS_BAD_CERT_CHAIN_LENGTH = -2147408844; +const int CSSMERR_CSSM_PRIVILEGE_NOT_GRANTED = -2147418037; -const int CSSMERR_APPLETP_RS_BAD_EXTENDED_KEY_USAGE = -2147408843; +const int CSSM_CSSM_BASE_CSSM_ERROR = -2147417840; -const int CSSMERR_APPLETP_TRUST_SETTING_DENY = -2147408842; +const int CSSMERR_CSSM_SCOPE_NOT_SUPPORTED = -2147417839; -const int CSSMERR_APPLETP_INVALID_EMPTY_SUBJECT = -2147408841; +const int CSSMERR_CSSM_PVC_ALREADY_CONFIGURED = -2147417838; -const int CSSMERR_APPLETP_UNKNOWN_QUAL_CERT_STATEMENT = -2147408840; +const int CSSMERR_CSSM_INVALID_PVC = -2147417837; -const int CSSMERR_APPLETP_MISSING_REQUIRED_EXTENSION = -2147408839; +const int CSSMERR_CSSM_EMM_LOAD_FAILED = -2147417836; -const int CSSMERR_APPLETP_EXT_KEYUSAGE_NOT_CRITICAL = -2147408838; +const int CSSMERR_CSSM_EMM_UNLOAD_FAILED = -2147417835; -const int CSSMERR_APPLETP_IDENTIFIER_MISSING = -2147408837; +const int CSSMERR_CSSM_ADDIN_LOAD_FAILED = -2147417834; -const int CSSMERR_APPLETP_CA_PIN_MISMATCH = -2147408836; +const int CSSMERR_CSSM_INVALID_KEY_HIERARCHY = -2147417833; -const int CSSMERR_APPLETP_LEAF_PIN_MISMATCH = -2147408835; +const int CSSMERR_CSSM_ADDIN_UNLOAD_FAILED = -2147417832; -const int CSSMERR_APPLE_DOTMAC_REQ_QUEUED = -2147408796; +const int CSSMERR_CSSM_LIB_REF_NOT_FOUND = -2147417831; -const int CSSMERR_APPLE_DOTMAC_REQ_REDIRECT = -2147408795; +const int CSSMERR_CSSM_INVALID_ADDIN_FUNCTION_TABLE = -2147417830; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ERR = -2147408794; +const int CSSMERR_CSSM_EMM_AUTHENTICATE_FAILED = -2147417829; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_PARAM = -2147408793; +const int CSSMERR_CSSM_ADDIN_AUTHENTICATE_FAILED = -2147417828; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_AUTH = -2147408792; +const int CSSMERR_CSSM_INVALID_SERVICE_MASK = -2147417827; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_UNIMPL = -2147408791; +const int CSSMERR_CSSM_MODULE_NOT_LOADED = -2147417826; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_NOT_AVAIL = -2147408790; +const int CSSMERR_CSSM_INVALID_SUBSERVICEID = -2147417825; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ALREADY_EXIST = -2147408789; +const int CSSMERR_CSSM_BUFFER_TOO_SMALL = -2147417824; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_SERVICE_ERROR = -2147408788; +const int CSSMERR_CSSM_INVALID_ATTRIBUTE = -2147417823; -const int CSSMERR_APPLE_DOTMAC_REQ_IS_PENDING = -2147408787; +const int CSSMERR_CSSM_ATTRIBUTE_NOT_IN_CONTEXT = -2147417822; -const int CSSMERR_APPLE_DOTMAC_NO_REQ_PENDING = -2147408786; +const int CSSMERR_CSSM_MODULE_MANAGER_INITIALIZE_FAIL = -2147417821; -const int CSSMERR_APPLE_DOTMAC_CSR_VERIFY_FAIL = -2147408785; +const int CSSMERR_CSSM_MODULE_MANAGER_NOT_FOUND = -2147417820; -const int CSSMERR_APPLE_DOTMAC_FAILED_CONSISTENCY_CHECK = -2147408784; +const int CSSMERR_CSSM_EVENT_NOTIFICATION_CALLBACK_NOT_FOUND = -2147417819; -const int CSSM_APPLEDL_OPEN_PARAMETERS_VERSION = 1; +const int CSSMERR_CSP_INTERNAL_ERROR = -2147416063; -const int CSSM_APPLECSPDL_DB_LOCK = 0; +const int CSSMERR_CSP_MEMORY_ERROR = -2147416062; -const int CSSM_APPLECSPDL_DB_UNLOCK = 1; +const int CSSMERR_CSP_MDS_ERROR = -2147416061; -const int CSSM_APPLECSPDL_DB_GET_SETTINGS = 2; +const int CSSMERR_CSP_INVALID_POINTER = -2147416060; -const int CSSM_APPLECSPDL_DB_SET_SETTINGS = 3; +const int CSSMERR_CSP_INVALID_INPUT_POINTER = -2147416059; -const int CSSM_APPLECSPDL_DB_IS_LOCKED = 4; +const int CSSMERR_CSP_INVALID_OUTPUT_POINTER = -2147416058; -const int CSSM_APPLECSPDL_DB_CHANGE_PASSWORD = 5; +const int CSSMERR_CSP_FUNCTION_NOT_IMPLEMENTED = -2147416057; -const int CSSM_APPLECSPDL_DB_GET_HANDLE = 6; +const int CSSMERR_CSP_SELF_CHECK_FAILED = -2147416056; -const int CSSM_APPLESCPDL_CSP_GET_KEYHANDLE = 7; +const int CSSMERR_CSP_OS_ACCESS_DENIED = -2147416055; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_8 = 8; +const int CSSMERR_CSP_FUNCTION_FAILED = -2147416054; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_9 = 9; +const int CSSMERR_CSP_OPERATION_AUTH_DENIED = -2147416032; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_10 = 10; +const int CSSMERR_CSP_OBJECT_USE_AUTH_DENIED = -2147416031; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_11 = 11; +const int CSSMERR_CSP_OBJECT_MANIP_AUTH_DENIED = -2147416030; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_12 = 12; +const int CSSMERR_CSP_OBJECT_ACL_NOT_SUPPORTED = -2147416029; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_13 = 13; +const int CSSMERR_CSP_OBJECT_ACL_REQUIRED = -2147416028; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_14 = 14; +const int CSSMERR_CSP_INVALID_ACCESS_CREDENTIALS = -2147416027; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_15 = 15; +const int CSSMERR_CSP_INVALID_ACL_BASE_CERTS = -2147416026; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_16 = 16; +const int CSSMERR_CSP_ACL_BASE_CERTS_NOT_SUPPORTED = -2147416025; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_17 = 17; +const int CSSMERR_CSP_INVALID_SAMPLE_VALUE = -2147416024; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_18 = 18; +const int CSSMERR_CSP_SAMPLE_VALUE_NOT_SUPPORTED = -2147416023; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_19 = 19; +const int CSSMERR_CSP_INVALID_ACL_SUBJECT_VALUE = -2147416022; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_20 = 20; +const int CSSMERR_CSP_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147416021; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_21 = 21; +const int CSSMERR_CSP_INVALID_ACL_CHALLENGE_CALLBACK = -2147416020; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_22 = 22; +const int CSSMERR_CSP_ACL_CHALLENGE_CALLBACK_FAILED = -2147416019; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_23 = 23; +const int CSSMERR_CSP_INVALID_ACL_ENTRY_TAG = -2147416018; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_24 = 24; +const int CSSMERR_CSP_ACL_ENTRY_TAG_NOT_FOUND = -2147416017; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_25 = 25; +const int CSSMERR_CSP_INVALID_ACL_EDIT_MODE = -2147416016; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_26 = 26; +const int CSSMERR_CSP_ACL_CHANGE_FAILED = -2147416015; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_27 = 27; +const int CSSMERR_CSP_INVALID_NEW_ACL_ENTRY = -2147416014; -const int CSSM_APPLECSP_KEYDIGEST = 256; +const int CSSMERR_CSP_INVALID_NEW_ACL_OWNER = -2147416013; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_APPLE_CUSTOM = 100; +const int CSSMERR_CSP_ACL_DELETE_FAILED = -2147416012; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSL = 101; +const int CSSMERR_CSP_ACL_REPLACE_FAILED = -2147416011; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSH1 = 102; +const int CSSMERR_CSP_ACL_ADD_FAILED = -2147416010; -const int CSSM_ATTRIBUTE_VENDOR_DEFINED = 8388608; +const int CSSMERR_CSP_INVALID_CONTEXT_HANDLE = -2147416000; -const int CSSM_ATTRIBUTE_PUBLIC_KEY = 1082130432; +const int CSSMERR_CSP_PRIVILEGE_NOT_GRANTED = -2147415989; -const int CSSM_ATTRIBUTE_FEE_PRIME_TYPE = 276824065; +const int CSSMERR_CSP_INVALID_DATA = -2147415994; -const int CSSM_ATTRIBUTE_FEE_CURVE_TYPE = 276824066; +const int CSSMERR_CSP_INVALID_PASSTHROUGH_ID = -2147415978; -const int CSSM_ATTRIBUTE_ASC_OPTIMIZATION = 276824067; +const int CSSMERR_CSP_INVALID_CRYPTO_DATA = -2147415976; -const int CSSM_ATTRIBUTE_RSA_BLINDING = 276824068; +const int CSSM_CSP_BASE_CSP_ERROR = -2147415808; -const int CSSM_ATTRIBUTE_PARAM_KEY = 1082130437; +const int CSSMERR_CSP_INPUT_LENGTH_ERROR = -2147415807; -const int CSSM_ATTRIBUTE_PROMPT = 545259526; +const int CSSMERR_CSP_OUTPUT_LENGTH_ERROR = -2147415806; -const int CSSM_ATTRIBUTE_ALERT_TITLE = 545259527; +const int CSSMERR_CSP_PRIVILEGE_NOT_SUPPORTED = -2147415805; -const int CSSM_ATTRIBUTE_VERIFY_PASSPHRASE = 276824072; +const int CSSMERR_CSP_DEVICE_ERROR = -2147415804; -const int CSSM_FEE_PRIME_TYPE_DEFAULT = 0; +const int CSSMERR_CSP_DEVICE_MEMORY_ERROR = -2147415803; -const int CSSM_FEE_PRIME_TYPE_MERSENNE = 1; +const int CSSMERR_CSP_ATTACH_HANDLE_BUSY = -2147415802; -const int CSSM_FEE_PRIME_TYPE_FEE = 2; +const int CSSMERR_CSP_NOT_LOGGED_IN = -2147415801; -const int CSSM_FEE_PRIME_TYPE_GENERAL = 3; +const int CSSMERR_CSP_INVALID_KEY = -2147415792; -const int CSSM_FEE_CURVE_TYPE_DEFAULT = 0; +const int CSSMERR_CSP_INVALID_KEY_REFERENCE = -2147415791; -const int CSSM_FEE_CURVE_TYPE_MONTGOMERY = 1; +const int CSSMERR_CSP_INVALID_KEY_CLASS = -2147415790; -const int CSSM_FEE_CURVE_TYPE_WEIERSTRASS = 2; +const int CSSMERR_CSP_ALGID_MISMATCH = -2147415789; -const int CSSM_FEE_CURVE_TYPE_ANSI_X9_62 = 3; +const int CSSMERR_CSP_KEY_USAGE_INCORRECT = -2147415788; -const int CSSM_ASC_OPTIMIZE_DEFAULT = 0; +const int CSSMERR_CSP_KEY_BLOB_TYPE_INCORRECT = -2147415787; -const int CSSM_ASC_OPTIMIZE_SIZE = 1; +const int CSSMERR_CSP_KEY_HEADER_INCONSISTENT = -2147415786; -const int CSSM_ASC_OPTIMIZE_SECURITY = 2; +const int CSSMERR_CSP_UNSUPPORTED_KEY_FORMAT = -2147415785; -const int CSSM_ASC_OPTIMIZE_TIME = 3; +const int CSSMERR_CSP_UNSUPPORTED_KEY_SIZE = -2147415784; -const int CSSM_ASC_OPTIMIZE_TIME_SIZE = 4; +const int CSSMERR_CSP_INVALID_KEY_POINTER = -2147415783; -const int CSSM_ASC_OPTIMIZE_ASCII = 5; +const int CSSMERR_CSP_INVALID_KEYUSAGE_MASK = -2147415782; -const int CSSM_KEYATTR_PARTIAL = 65536; +const int CSSMERR_CSP_UNSUPPORTED_KEYUSAGE_MASK = -2147415781; -const int CSSM_KEYATTR_PUBLIC_KEY_ENCRYPT = 131072; +const int CSSMERR_CSP_INVALID_KEYATTR_MASK = -2147415780; -const int CSSM_TP_ACTION_REQUIRE_CRL_PER_CERT = 1; +const int CSSMERR_CSP_UNSUPPORTED_KEYATTR_MASK = -2147415779; -const int CSSM_TP_ACTION_FETCH_CRL_FROM_NET = 2; +const int CSSMERR_CSP_INVALID_KEY_LABEL = -2147415778; -const int CSSM_TP_ACTION_CRL_SUFFICIENT = 4; +const int CSSMERR_CSP_UNSUPPORTED_KEY_LABEL = -2147415777; -const int CSSM_TP_ACTION_REQUIRE_CRL_IF_PRESENT = 8; +const int CSSMERR_CSP_INVALID_KEY_FORMAT = -2147415776; -const int CSSM_TP_ACTION_ALLOW_EXPIRED = 1; +const int CSSMERR_CSP_INVALID_DATA_COUNT = -2147415768; -const int CSSM_TP_ACTION_LEAF_IS_CA = 2; +const int CSSMERR_CSP_VECTOR_OF_BUFS_UNSUPPORTED = -2147415767; -const int CSSM_TP_ACTION_FETCH_CERT_FROM_NET = 4; +const int CSSMERR_CSP_INVALID_INPUT_VECTOR = -2147415766; -const int CSSM_TP_ACTION_ALLOW_EXPIRED_ROOT = 8; +const int CSSMERR_CSP_INVALID_OUTPUT_VECTOR = -2147415765; -const int CSSM_TP_ACTION_REQUIRE_REV_PER_CERT = 16; +const int CSSMERR_CSP_INVALID_CONTEXT = -2147415760; -const int CSSM_TP_ACTION_TRUST_SETTINGS = 32; +const int CSSMERR_CSP_INVALID_ALGORITHM = -2147415759; -const int CSSM_TP_ACTION_IMPLICIT_ANCHORS = 64; +const int CSSMERR_CSP_INVALID_ATTR_KEY = -2147415754; -const int CSSM_CERT_STATUS_EXPIRED = 1; +const int CSSMERR_CSP_MISSING_ATTR_KEY = -2147415753; -const int CSSM_CERT_STATUS_NOT_VALID_YET = 2; +const int CSSMERR_CSP_INVALID_ATTR_INIT_VECTOR = -2147415752; -const int CSSM_CERT_STATUS_IS_IN_INPUT_CERTS = 4; +const int CSSMERR_CSP_MISSING_ATTR_INIT_VECTOR = -2147415751; -const int CSSM_CERT_STATUS_IS_IN_ANCHORS = 8; +const int CSSMERR_CSP_INVALID_ATTR_SALT = -2147415750; -const int CSSM_CERT_STATUS_IS_ROOT = 16; +const int CSSMERR_CSP_MISSING_ATTR_SALT = -2147415749; -const int CSSM_CERT_STATUS_IS_FROM_NET = 32; +const int CSSMERR_CSP_INVALID_ATTR_PADDING = -2147415748; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_USER = 64; +const int CSSMERR_CSP_MISSING_ATTR_PADDING = -2147415747; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_ADMIN = 128; +const int CSSMERR_CSP_INVALID_ATTR_RANDOM = -2147415746; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_SYSTEM = 256; +const int CSSMERR_CSP_MISSING_ATTR_RANDOM = -2147415745; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_TRUST = 512; +const int CSSMERR_CSP_INVALID_ATTR_SEED = -2147415744; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_DENY = 1024; +const int CSSMERR_CSP_MISSING_ATTR_SEED = -2147415743; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_IGNORED_ERROR = 2048; +const int CSSMERR_CSP_INVALID_ATTR_PASSPHRASE = -2147415742; -const int CSSM_EVIDENCE_FORM_APPLE_HEADER = -2147483648; +const int CSSMERR_CSP_MISSING_ATTR_PASSPHRASE = -2147415741; -const int CSSM_EVIDENCE_FORM_APPLE_CERTGROUP = -2147483647; +const int CSSMERR_CSP_INVALID_ATTR_KEY_LENGTH = -2147415740; -const int CSSM_EVIDENCE_FORM_APPLE_CERT_INFO = -2147483646; +const int CSSMERR_CSP_MISSING_ATTR_KEY_LENGTH = -2147415739; -const int CSSM_APPLEX509CL_OBTAIN_CSR = 0; +const int CSSMERR_CSP_INVALID_ATTR_BLOCK_SIZE = -2147415738; -const int CSSM_APPLEX509CL_VERIFY_CSR = 1; +const int CSSMERR_CSP_MISSING_ATTR_BLOCK_SIZE = -2147415737; -const int kSecSubjectItemAttr = 1937072746; +const int CSSMERR_CSP_INVALID_ATTR_OUTPUT_SIZE = -2147415708; -const int kSecIssuerItemAttr = 1769173877; +const int CSSMERR_CSP_MISSING_ATTR_OUTPUT_SIZE = -2147415707; -const int kSecSerialNumberItemAttr = 1936614002; +const int CSSMERR_CSP_INVALID_ATTR_ROUNDS = -2147415706; -const int kSecPublicKeyHashItemAttr = 1752198009; +const int CSSMERR_CSP_MISSING_ATTR_ROUNDS = -2147415705; -const int kSecSubjectKeyIdentifierItemAttr = 1936419172; +const int CSSMERR_CSP_INVALID_ATTR_ALG_PARAMS = -2147415704; -const int kSecCertTypeItemAttr = 1668577648; +const int CSSMERR_CSP_MISSING_ATTR_ALG_PARAMS = -2147415703; -const int kSecCertEncodingItemAttr = 1667591779; +const int CSSMERR_CSP_INVALID_ATTR_LABEL = -2147415702; -const int SSL_NULL_WITH_NULL_NULL = 0; +const int CSSMERR_CSP_MISSING_ATTR_LABEL = -2147415701; -const int SSL_RSA_WITH_NULL_MD5 = 1; +const int CSSMERR_CSP_INVALID_ATTR_KEY_TYPE = -2147415700; -const int SSL_RSA_WITH_NULL_SHA = 2; +const int CSSMERR_CSP_MISSING_ATTR_KEY_TYPE = -2147415699; -const int SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3; +const int CSSMERR_CSP_INVALID_ATTR_MODE = -2147415698; -const int SSL_RSA_WITH_RC4_128_MD5 = 4; +const int CSSMERR_CSP_MISSING_ATTR_MODE = -2147415697; -const int SSL_RSA_WITH_RC4_128_SHA = 5; +const int CSSMERR_CSP_INVALID_ATTR_EFFECTIVE_BITS = -2147415696; -const int SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6; +const int CSSMERR_CSP_MISSING_ATTR_EFFECTIVE_BITS = -2147415695; -const int SSL_RSA_WITH_IDEA_CBC_SHA = 7; +const int CSSMERR_CSP_INVALID_ATTR_START_DATE = -2147415694; -const int SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8; +const int CSSMERR_CSP_MISSING_ATTR_START_DATE = -2147415693; -const int SSL_RSA_WITH_DES_CBC_SHA = 9; +const int CSSMERR_CSP_INVALID_ATTR_END_DATE = -2147415692; -const int SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10; +const int CSSMERR_CSP_MISSING_ATTR_END_DATE = -2147415691; -const int SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11; +const int CSSMERR_CSP_INVALID_ATTR_VERSION = -2147415690; -const int SSL_DH_DSS_WITH_DES_CBC_SHA = 12; +const int CSSMERR_CSP_MISSING_ATTR_VERSION = -2147415689; -const int SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; +const int CSSMERR_CSP_INVALID_ATTR_PRIME = -2147415688; -const int SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14; +const int CSSMERR_CSP_MISSING_ATTR_PRIME = -2147415687; -const int SSL_DH_RSA_WITH_DES_CBC_SHA = 15; +const int CSSMERR_CSP_INVALID_ATTR_BASE = -2147415686; -const int SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; +const int CSSMERR_CSP_MISSING_ATTR_BASE = -2147415685; -const int SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17; +const int CSSMERR_CSP_INVALID_ATTR_SUBPRIME = -2147415684; -const int SSL_DHE_DSS_WITH_DES_CBC_SHA = 18; +const int CSSMERR_CSP_MISSING_ATTR_SUBPRIME = -2147415683; -const int SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; +const int CSSMERR_CSP_INVALID_ATTR_ITERATION_COUNT = -2147415682; -const int SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20; +const int CSSMERR_CSP_MISSING_ATTR_ITERATION_COUNT = -2147415681; -const int SSL_DHE_RSA_WITH_DES_CBC_SHA = 21; +const int CSSMERR_CSP_INVALID_ATTR_DL_DB_HANDLE = -2147415680; -const int SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; +const int CSSMERR_CSP_MISSING_ATTR_DL_DB_HANDLE = -2147415679; -const int SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23; +const int CSSMERR_CSP_INVALID_ATTR_ACCESS_CREDENTIALS = -2147415678; -const int SSL_DH_anon_WITH_RC4_128_MD5 = 24; +const int CSSMERR_CSP_MISSING_ATTR_ACCESS_CREDENTIALS = -2147415677; -const int SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25; +const int CSSMERR_CSP_INVALID_ATTR_PUBLIC_KEY_FORMAT = -2147415676; -const int SSL_DH_anon_WITH_DES_CBC_SHA = 26; +const int CSSMERR_CSP_MISSING_ATTR_PUBLIC_KEY_FORMAT = -2147415675; -const int SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; +const int CSSMERR_CSP_INVALID_ATTR_PRIVATE_KEY_FORMAT = -2147415674; -const int SSL_FORTEZZA_DMS_WITH_NULL_SHA = 28; +const int CSSMERR_CSP_MISSING_ATTR_PRIVATE_KEY_FORMAT = -2147415673; -const int SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = 29; +const int CSSMERR_CSP_INVALID_ATTR_SYMMETRIC_KEY_FORMAT = -2147415672; -const int TLS_RSA_WITH_AES_128_CBC_SHA = 47; +const int CSSMERR_CSP_MISSING_ATTR_SYMMETRIC_KEY_FORMAT = -2147415671; -const int TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48; +const int CSSMERR_CSP_INVALID_ATTR_WRAPPED_KEY_FORMAT = -2147415670; -const int TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49; +const int CSSMERR_CSP_MISSING_ATTR_WRAPPED_KEY_FORMAT = -2147415669; -const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50; +const int CSSMERR_CSP_STAGED_OPERATION_IN_PROGRESS = -2147415736; -const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51; +const int CSSMERR_CSP_STAGED_OPERATION_NOT_STARTED = -2147415735; -const int TLS_DH_anon_WITH_AES_128_CBC_SHA = 52; +const int CSSMERR_CSP_VERIFY_FAILED = -2147415734; -const int TLS_RSA_WITH_AES_256_CBC_SHA = 53; +const int CSSMERR_CSP_INVALID_SIGNATURE = -2147415733; -const int TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54; +const int CSSMERR_CSP_QUERY_SIZE_UNKNOWN = -2147415732; -const int TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55; +const int CSSMERR_CSP_BLOCK_SIZE_MISMATCH = -2147415731; -const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56; +const int CSSMERR_CSP_PRIVATE_KEY_NOT_FOUND = -2147415730; -const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57; +const int CSSMERR_CSP_PUBLIC_KEY_INCONSISTENT = -2147415729; -const int TLS_DH_anon_WITH_AES_256_CBC_SHA = 58; +const int CSSMERR_CSP_DEVICE_VERIFY_FAILED = -2147415728; -const int TLS_ECDH_ECDSA_WITH_NULL_SHA = -16383; +const int CSSMERR_CSP_INVALID_LOGIN_NAME = -2147415727; -const int TLS_ECDH_ECDSA_WITH_RC4_128_SHA = -16382; +const int CSSMERR_CSP_ALREADY_LOGGED_IN = -2147415726; -const int TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = -16381; +const int CSSMERR_CSP_PRIVATE_KEY_ALREADY_EXISTS = -2147415725; -const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = -16380; +const int CSSMERR_CSP_KEY_LABEL_ALREADY_EXISTS = -2147415724; -const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = -16379; +const int CSSMERR_CSP_INVALID_DIGEST_ALGORITHM = -2147415723; -const int TLS_ECDHE_ECDSA_WITH_NULL_SHA = -16378; +const int CSSMERR_CSP_CRYPTO_DATA_CALLBACK_FAILED = -2147415722; -const int TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = -16377; +const int CSSMERR_TP_INTERNAL_ERROR = -2147409919; -const int TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; +const int CSSMERR_TP_MEMORY_ERROR = -2147409918; -const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; +const int CSSMERR_TP_MDS_ERROR = -2147409917; -const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; +const int CSSMERR_TP_INVALID_POINTER = -2147409916; -const int TLS_ECDH_RSA_WITH_NULL_SHA = -16373; +const int CSSMERR_TP_INVALID_INPUT_POINTER = -2147409915; -const int TLS_ECDH_RSA_WITH_RC4_128_SHA = -16372; +const int CSSMERR_TP_INVALID_OUTPUT_POINTER = -2147409914; -const int TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = -16371; +const int CSSMERR_TP_FUNCTION_NOT_IMPLEMENTED = -2147409913; -const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = -16370; +const int CSSMERR_TP_SELF_CHECK_FAILED = -2147409912; -const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = -16369; +const int CSSMERR_TP_OS_ACCESS_DENIED = -2147409911; -const int TLS_ECDHE_RSA_WITH_NULL_SHA = -16368; +const int CSSMERR_TP_FUNCTION_FAILED = -2147409910; -const int TLS_ECDHE_RSA_WITH_RC4_128_SHA = -16367; +const int CSSMERR_TP_INVALID_CONTEXT_HANDLE = -2147409856; -const int TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; +const int CSSMERR_TP_INVALID_DATA = -2147409850; -const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; +const int CSSMERR_TP_INVALID_DB_LIST = -2147409844; -const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; +const int CSSMERR_TP_INVALID_CERTGROUP_POINTER = -2147409854; -const int TLS_ECDH_anon_WITH_NULL_SHA = -16363; +const int CSSMERR_TP_INVALID_CERT_POINTER = -2147409853; -const int TLS_ECDH_anon_WITH_RC4_128_SHA = -16362; +const int CSSMERR_TP_INVALID_CRL_POINTER = -2147409852; -const int TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = -16361; +const int CSSMERR_TP_INVALID_FIELD_POINTER = -2147409851; -const int TLS_ECDH_anon_WITH_AES_128_CBC_SHA = -16360; +const int CSSMERR_TP_INVALID_NETWORK_ADDR = -2147409833; -const int TLS_ECDH_anon_WITH_AES_256_CBC_SHA = -16359; +const int CSSMERR_TP_CRL_ALREADY_SIGNED = -2147409849; -const int TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = -16331; +const int CSSMERR_TP_INVALID_NUMBER_OF_FIELDS = -2147409848; -const int TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = -16330; +const int CSSMERR_TP_VERIFICATION_FAILURE = -2147409847; -const int TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = -13141; +const int CSSMERR_TP_INVALID_DB_HANDLE = -2147409846; -const int TLS_NULL_WITH_NULL_NULL = 0; +const int CSSMERR_TP_UNKNOWN_FORMAT = -2147409842; -const int TLS_RSA_WITH_NULL_MD5 = 1; +const int CSSMERR_TP_UNKNOWN_TAG = -2147409841; -const int TLS_RSA_WITH_NULL_SHA = 2; +const int CSSMERR_TP_INVALID_PASSTHROUGH_ID = -2147409834; -const int TLS_RSA_WITH_RC4_128_MD5 = 4; +const int CSSMERR_TP_INVALID_CSP_HANDLE = -2147409840; -const int TLS_RSA_WITH_RC4_128_SHA = 5; +const int CSSMERR_TP_INVALID_DL_HANDLE = -2147409839; -const int TLS_RSA_WITH_3DES_EDE_CBC_SHA = 10; +const int CSSMERR_TP_INVALID_CL_HANDLE = -2147409838; -const int TLS_RSA_WITH_NULL_SHA256 = 59; +const int CSSMERR_TP_INVALID_DB_LIST_POINTER = -2147409843; -const int TLS_RSA_WITH_AES_128_CBC_SHA256 = 60; +const int CSSM_TP_BASE_TP_ERROR = -2147409664; -const int TLS_RSA_WITH_AES_256_CBC_SHA256 = 61; +const int CSSMERR_TP_INVALID_CALLERAUTH_CONTEXT_POINTER = -2147409663; -const int TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; +const int CSSMERR_TP_INVALID_IDENTIFIER_POINTER = -2147409662; -const int TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; +const int CSSMERR_TP_INVALID_KEYCACHE_HANDLE = -2147409661; -const int TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; +const int CSSMERR_TP_INVALID_CERTGROUP = -2147409660; -const int TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; +const int CSSMERR_TP_INVALID_CRLGROUP = -2147409659; -const int TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 62; +const int CSSMERR_TP_INVALID_CRLGROUP_POINTER = -2147409658; -const int TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 63; +const int CSSMERR_TP_AUTHENTICATION_FAILED = -2147409657; -const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 64; +const int CSSMERR_TP_CERTGROUP_INCOMPLETE = -2147409656; -const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 103; +const int CSSMERR_TP_CERTIFICATE_CANT_OPERATE = -2147409655; -const int TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 104; +const int CSSMERR_TP_CERT_EXPIRED = -2147409654; -const int TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 105; +const int CSSMERR_TP_CERT_NOT_VALID_YET = -2147409653; -const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 106; +const int CSSMERR_TP_CERT_REVOKED = -2147409652; -const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 107; +const int CSSMERR_TP_CERT_SUSPENDED = -2147409651; -const int TLS_DH_anon_WITH_RC4_128_MD5 = 24; +const int CSSMERR_TP_INSUFFICIENT_CREDENTIALS = -2147409650; -const int TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; +const int CSSMERR_TP_INVALID_ACTION = -2147409649; -const int TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 108; +const int CSSMERR_TP_INVALID_ACTION_DATA = -2147409648; -const int TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 109; +const int CSSMERR_TP_INVALID_ANCHOR_CERT = -2147409646; -const int TLS_PSK_WITH_RC4_128_SHA = 138; +const int CSSMERR_TP_INVALID_AUTHORITY = -2147409645; -const int TLS_PSK_WITH_3DES_EDE_CBC_SHA = 139; +const int CSSMERR_TP_VERIFY_ACTION_FAILED = -2147409644; -const int TLS_PSK_WITH_AES_128_CBC_SHA = 140; +const int CSSMERR_TP_INVALID_CERTIFICATE = -2147409643; -const int TLS_PSK_WITH_AES_256_CBC_SHA = 141; +const int CSSMERR_TP_INVALID_CERT_AUTHORITY = -2147409642; -const int TLS_DHE_PSK_WITH_RC4_128_SHA = 142; +const int CSSMERR_TP_INVALID_CRL_AUTHORITY = -2147409641; -const int TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = 143; +const int CSSMERR_TP_INVALID_CRL_ENCODING = -2147409640; -const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA = 144; +const int CSSMERR_TP_INVALID_CRL_TYPE = -2147409639; -const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA = 145; +const int CSSMERR_TP_INVALID_CRL = -2147409638; -const int TLS_RSA_PSK_WITH_RC4_128_SHA = 146; +const int CSSMERR_TP_INVALID_FORM_TYPE = -2147409637; -const int TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = 147; +const int CSSMERR_TP_INVALID_ID = -2147409636; -const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA = 148; +const int CSSMERR_TP_INVALID_IDENTIFIER = -2147409635; -const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA = 149; +const int CSSMERR_TP_INVALID_INDEX = -2147409634; -const int TLS_PSK_WITH_NULL_SHA = 44; +const int CSSMERR_TP_INVALID_NAME = -2147409633; -const int TLS_DHE_PSK_WITH_NULL_SHA = 45; +const int CSSMERR_TP_INVALID_POLICY_IDENTIFIERS = -2147409632; -const int TLS_RSA_PSK_WITH_NULL_SHA = 46; +const int CSSMERR_TP_INVALID_TIMESTRING = -2147409631; -const int TLS_RSA_WITH_AES_128_GCM_SHA256 = 156; +const int CSSMERR_TP_INVALID_REASON = -2147409630; -const int TLS_RSA_WITH_AES_256_GCM_SHA384 = 157; +const int CSSMERR_TP_INVALID_REQUEST_INPUTS = -2147409629; -const int TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 158; +const int CSSMERR_TP_INVALID_RESPONSE_VECTOR = -2147409628; -const int TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 159; +const int CSSMERR_TP_INVALID_SIGNATURE = -2147409627; -const int TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = 160; +const int CSSMERR_TP_INVALID_STOP_ON_POLICY = -2147409626; -const int TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = 161; +const int CSSMERR_TP_INVALID_CALLBACK = -2147409625; -const int TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = 162; +const int CSSMERR_TP_INVALID_TUPLE = -2147409624; -const int TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = 163; +const int CSSMERR_TP_NOT_SIGNER = -2147409623; -const int TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = 164; +const int CSSMERR_TP_NOT_TRUSTED = -2147409622; -const int TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = 165; +const int CSSMERR_TP_NO_DEFAULT_AUTHORITY = -2147409621; -const int TLS_DH_anon_WITH_AES_128_GCM_SHA256 = 166; +const int CSSMERR_TP_REJECTED_FORM = -2147409620; -const int TLS_DH_anon_WITH_AES_256_GCM_SHA384 = 167; +const int CSSMERR_TP_REQUEST_LOST = -2147409619; -const int TLS_PSK_WITH_AES_128_GCM_SHA256 = 168; +const int CSSMERR_TP_REQUEST_REJECTED = -2147409618; -const int TLS_PSK_WITH_AES_256_GCM_SHA384 = 169; +const int CSSMERR_TP_UNSUPPORTED_ADDR_TYPE = -2147409617; -const int TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 170; +const int CSSMERR_TP_UNSUPPORTED_SERVICE = -2147409616; -const int TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 171; +const int CSSMERR_TP_INVALID_TUPLEGROUP_POINTER = -2147409615; -const int TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = 172; +const int CSSMERR_TP_INVALID_TUPLEGROUP = -2147409614; -const int TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = 173; +const int CSSMERR_AC_INTERNAL_ERROR = -2147405823; -const int TLS_PSK_WITH_AES_128_CBC_SHA256 = 174; +const int CSSMERR_AC_MEMORY_ERROR = -2147405822; -const int TLS_PSK_WITH_AES_256_CBC_SHA384 = 175; +const int CSSMERR_AC_MDS_ERROR = -2147405821; -const int TLS_PSK_WITH_NULL_SHA256 = 176; +const int CSSMERR_AC_INVALID_POINTER = -2147405820; -const int TLS_PSK_WITH_NULL_SHA384 = 177; +const int CSSMERR_AC_INVALID_INPUT_POINTER = -2147405819; -const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = 178; +const int CSSMERR_AC_INVALID_OUTPUT_POINTER = -2147405818; -const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = 179; +const int CSSMERR_AC_FUNCTION_NOT_IMPLEMENTED = -2147405817; -const int TLS_DHE_PSK_WITH_NULL_SHA256 = 180; +const int CSSMERR_AC_SELF_CHECK_FAILED = -2147405816; -const int TLS_DHE_PSK_WITH_NULL_SHA384 = 181; +const int CSSMERR_AC_OS_ACCESS_DENIED = -2147405815; -const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = 182; +const int CSSMERR_AC_FUNCTION_FAILED = -2147405814; -const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = 183; +const int CSSMERR_AC_INVALID_CONTEXT_HANDLE = -2147405760; -const int TLS_RSA_PSK_WITH_NULL_SHA256 = 184; +const int CSSMERR_AC_INVALID_DATA = -2147405754; -const int TLS_RSA_PSK_WITH_NULL_SHA384 = 185; +const int CSSMERR_AC_INVALID_DB_LIST = -2147405748; -const int TLS_AES_128_GCM_SHA256 = 4865; +const int CSSMERR_AC_INVALID_PASSTHROUGH_ID = -2147405738; -const int TLS_AES_256_GCM_SHA384 = 4866; +const int CSSMERR_AC_INVALID_DL_HANDLE = -2147405743; -const int TLS_CHACHA20_POLY1305_SHA256 = 4867; +const int CSSMERR_AC_INVALID_CL_HANDLE = -2147405742; -const int TLS_AES_128_CCM_SHA256 = 4868; +const int CSSMERR_AC_INVALID_TP_HANDLE = -2147405741; -const int TLS_AES_128_CCM_8_SHA256 = 4869; +const int CSSMERR_AC_INVALID_DB_HANDLE = -2147405750; -const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; +const int CSSMERR_AC_INVALID_DB_LIST_POINTER = -2147405747; -const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; +const int CSSM_AC_BASE_AC_ERROR = -2147405568; -const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = -16347; +const int CSSMERR_AC_INVALID_BASE_ACLS = -2147405567; -const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = -16346; +const int CSSMERR_AC_INVALID_TUPLE_CREDENTIALS = -2147405566; -const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; +const int CSSMERR_AC_INVALID_ENCODING = -2147405565; -const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; +const int CSSMERR_AC_INVALID_VALIDITY_PERIOD = -2147405564; -const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = -16343; +const int CSSMERR_AC_INVALID_REQUESTOR = -2147405563; -const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = -16342; +const int CSSMERR_AC_INVALID_REQUEST_DESCRIPTOR = -2147405562; -const int TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; +const int CSSMERR_CL_INTERNAL_ERROR = -2147411967; -const int TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; +const int CSSMERR_CL_MEMORY_ERROR = -2147411966; -const int TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = -16339; +const int CSSMERR_CL_MDS_ERROR = -2147411965; -const int TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = -16338; +const int CSSMERR_CL_INVALID_POINTER = -2147411964; -const int TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; +const int CSSMERR_CL_INVALID_INPUT_POINTER = -2147411963; -const int TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; +const int CSSMERR_CL_INVALID_OUTPUT_POINTER = -2147411962; -const int TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = -16335; +const int CSSMERR_CL_FUNCTION_NOT_IMPLEMENTED = -2147411961; -const int TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = -16334; +const int CSSMERR_CL_SELF_CHECK_FAILED = -2147411960; -const int TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = -13144; +const int CSSMERR_CL_OS_ACCESS_DENIED = -2147411959; -const int TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = -13143; +const int CSSMERR_CL_FUNCTION_FAILED = -2147411958; -const int TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 255; +const int CSSMERR_CL_INVALID_CONTEXT_HANDLE = -2147411904; -const int SSL_RSA_WITH_RC2_CBC_MD5 = -128; +const int CSSMERR_CL_INVALID_CERTGROUP_POINTER = -2147411902; -const int SSL_RSA_WITH_IDEA_CBC_MD5 = -127; +const int CSSMERR_CL_INVALID_CERT_POINTER = -2147411901; -const int SSL_RSA_WITH_DES_CBC_MD5 = -126; +const int CSSMERR_CL_INVALID_CRL_POINTER = -2147411900; -const int SSL_RSA_WITH_3DES_EDE_CBC_MD5 = -125; +const int CSSMERR_CL_INVALID_FIELD_POINTER = -2147411899; -const int SSL_NO_SUCH_CIPHERSUITE = -1; +const int CSSMERR_CL_INVALID_DATA = -2147411898; -const int NSASCIIStringEncoding = 1; +const int CSSMERR_CL_CRL_ALREADY_SIGNED = -2147411897; -const int NSNEXTSTEPStringEncoding = 2; +const int CSSMERR_CL_INVALID_NUMBER_OF_FIELDS = -2147411896; -const int NSJapaneseEUCStringEncoding = 3; +const int CSSMERR_CL_VERIFICATION_FAILURE = -2147411895; -const int NSUTF8StringEncoding = 4; +const int CSSMERR_CL_UNKNOWN_FORMAT = -2147411890; -const int NSISOLatin1StringEncoding = 5; +const int CSSMERR_CL_UNKNOWN_TAG = -2147411889; -const int NSSymbolStringEncoding = 6; +const int CSSMERR_CL_INVALID_PASSTHROUGH_ID = -2147411882; -const int NSNonLossyASCIIStringEncoding = 7; +const int CSSM_CL_BASE_CL_ERROR = -2147411712; -const int NSShiftJISStringEncoding = 8; +const int CSSMERR_CL_INVALID_BUNDLE_POINTER = -2147411711; -const int NSISOLatin2StringEncoding = 9; +const int CSSMERR_CL_INVALID_CACHE_HANDLE = -2147411710; -const int NSUnicodeStringEncoding = 10; +const int CSSMERR_CL_INVALID_RESULTS_HANDLE = -2147411709; -const int NSWindowsCP1251StringEncoding = 11; +const int CSSMERR_CL_INVALID_BUNDLE_INFO = -2147411708; -const int NSWindowsCP1252StringEncoding = 12; +const int CSSMERR_CL_INVALID_CRL_INDEX = -2147411707; -const int NSWindowsCP1253StringEncoding = 13; +const int CSSMERR_CL_INVALID_SCOPE = -2147411706; -const int NSWindowsCP1254StringEncoding = 14; +const int CSSMERR_CL_NO_FIELD_VALUES = -2147411705; -const int NSWindowsCP1250StringEncoding = 15; +const int CSSMERR_CL_SCOPE_NOT_SUPPORTED = -2147411704; -const int NSISO2022JPStringEncoding = 21; +const int CSSMERR_DL_INTERNAL_ERROR = -2147414015; -const int NSMacOSRomanStringEncoding = 30; +const int CSSMERR_DL_MEMORY_ERROR = -2147414014; -const int NSUTF16StringEncoding = 10; +const int CSSMERR_DL_MDS_ERROR = -2147414013; -const int NSUTF16BigEndianStringEncoding = 2415919360; +const int CSSMERR_DL_INVALID_POINTER = -2147414012; -const int NSUTF16LittleEndianStringEncoding = 2483028224; +const int CSSMERR_DL_INVALID_INPUT_POINTER = -2147414011; -const int NSUTF32StringEncoding = 2348810496; +const int CSSMERR_DL_INVALID_OUTPUT_POINTER = -2147414010; -const int NSUTF32BigEndianStringEncoding = 2550137088; +const int CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED = -2147414009; -const int NSUTF32LittleEndianStringEncoding = 2617245952; +const int CSSMERR_DL_SELF_CHECK_FAILED = -2147414008; -const int NSProprietaryStringEncoding = 65536; +const int CSSMERR_DL_OS_ACCESS_DENIED = -2147414007; -const int NSOpenStepUnicodeReservedBase = 62464; +const int CSSMERR_DL_FUNCTION_FAILED = -2147414006; -const int kNativeArgNumberPos = 0; +const int CSSMERR_DL_INVALID_CSP_HANDLE = -2147413936; -const int kNativeArgNumberSize = 8; +const int CSSMERR_DL_INVALID_DL_HANDLE = -2147413935; -const int kNativeArgTypePos = 8; +const int CSSMERR_DL_INVALID_CL_HANDLE = -2147413934; -const int kNativeArgTypeSize = 8; +const int CSSMERR_DL_INVALID_DB_LIST_POINTER = -2147413939; -const int DYNAMIC_TARGETS_ENABLED = 0; +const int CSSMERR_DL_OPERATION_AUTH_DENIED = -2147413984; -const int TARGET_OS_MAC = 1; +const int CSSMERR_DL_OBJECT_USE_AUTH_DENIED = -2147413983; -const int TARGET_OS_WIN32 = 0; +const int CSSMERR_DL_OBJECT_MANIP_AUTH_DENIED = -2147413982; -const int TARGET_OS_WINDOWS = 0; +const int CSSMERR_DL_OBJECT_ACL_NOT_SUPPORTED = -2147413981; -const int TARGET_OS_UNIX = 0; +const int CSSMERR_DL_OBJECT_ACL_REQUIRED = -2147413980; -const int TARGET_OS_LINUX = 0; +const int CSSMERR_DL_INVALID_ACCESS_CREDENTIALS = -2147413979; -const int TARGET_OS_OSX = 1; +const int CSSMERR_DL_INVALID_ACL_BASE_CERTS = -2147413978; -const int TARGET_OS_IPHONE = 0; +const int CSSMERR_DL_ACL_BASE_CERTS_NOT_SUPPORTED = -2147413977; -const int TARGET_OS_IOS = 0; +const int CSSMERR_DL_INVALID_SAMPLE_VALUE = -2147413976; -const int TARGET_OS_WATCH = 0; +const int CSSMERR_DL_SAMPLE_VALUE_NOT_SUPPORTED = -2147413975; -const int TARGET_OS_TV = 0; +const int CSSMERR_DL_INVALID_ACL_SUBJECT_VALUE = -2147413974; -const int TARGET_OS_MACCATALYST = 0; +const int CSSMERR_DL_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147413973; -const int TARGET_OS_UIKITFORMAC = 0; +const int CSSMERR_DL_INVALID_ACL_CHALLENGE_CALLBACK = -2147413972; -const int TARGET_OS_SIMULATOR = 0; +const int CSSMERR_DL_ACL_CHALLENGE_CALLBACK_FAILED = -2147413971; -const int TARGET_OS_EMBEDDED = 0; +const int CSSMERR_DL_INVALID_ACL_ENTRY_TAG = -2147413970; -const int TARGET_OS_RTKIT = 0; +const int CSSMERR_DL_ACL_ENTRY_TAG_NOT_FOUND = -2147413969; -const int TARGET_OS_DRIVERKIT = 0; +const int CSSMERR_DL_INVALID_ACL_EDIT_MODE = -2147413968; -const int TARGET_IPHONE_SIMULATOR = 0; +const int CSSMERR_DL_ACL_CHANGE_FAILED = -2147413967; -const int TARGET_OS_NANO = 0; +const int CSSMERR_DL_INVALID_NEW_ACL_ENTRY = -2147413966; -const int TARGET_ABI_USES_IOS_VALUES = 1; +const int CSSMERR_DL_INVALID_NEW_ACL_OWNER = -2147413965; -const int TARGET_CPU_PPC = 0; +const int CSSMERR_DL_ACL_DELETE_FAILED = -2147413964; -const int TARGET_CPU_PPC64 = 0; +const int CSSMERR_DL_ACL_REPLACE_FAILED = -2147413963; -const int TARGET_CPU_68K = 0; +const int CSSMERR_DL_ACL_ADD_FAILED = -2147413962; -const int TARGET_CPU_X86 = 0; +const int CSSMERR_DL_INVALID_DB_HANDLE = -2147413942; -const int TARGET_CPU_X86_64 = 0; +const int CSSMERR_DL_INVALID_PASSTHROUGH_ID = -2147413930; -const int TARGET_CPU_ARM = 0; +const int CSSMERR_DL_INVALID_NETWORK_ADDR = -2147413929; -const int TARGET_CPU_ARM64 = 1; +const int CSSM_DL_BASE_DL_ERROR = -2147413760; -const int TARGET_CPU_MIPS = 0; +const int CSSMERR_DL_DATABASE_CORRUPT = -2147413759; -const int TARGET_CPU_SPARC = 0; +const int CSSMERR_DL_INVALID_RECORD_INDEX = -2147413752; -const int TARGET_CPU_ALPHA = 0; +const int CSSMERR_DL_INVALID_RECORDTYPE = -2147413751; -const int TARGET_RT_MAC_CFM = 0; +const int CSSMERR_DL_INVALID_FIELD_NAME = -2147413750; -const int TARGET_RT_MAC_MACHO = 1; +const int CSSMERR_DL_UNSUPPORTED_FIELD_FORMAT = -2147413749; -const int TARGET_RT_LITTLE_ENDIAN = 1; +const int CSSMERR_DL_UNSUPPORTED_INDEX_INFO = -2147413748; -const int TARGET_RT_BIG_ENDIAN = 0; +const int CSSMERR_DL_UNSUPPORTED_LOCALITY = -2147413747; -const int TARGET_RT_64_BIT = 1; +const int CSSMERR_DL_UNSUPPORTED_NUM_ATTRIBUTES = -2147413746; -const int __DARWIN_ONLY_64_BIT_INO_T = 1; +const int CSSMERR_DL_UNSUPPORTED_NUM_INDEXES = -2147413745; -const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; +const int CSSMERR_DL_UNSUPPORTED_NUM_RECORDTYPES = -2147413744; -const int __DARWIN_ONLY_VERS_1050 = 1; +const int CSSMERR_DL_UNSUPPORTED_RECORDTYPE = -2147413743; -const int __DARWIN_UNIX03 = 1; +const int CSSMERR_DL_FIELD_SPECIFIED_MULTIPLE = -2147413742; -const int __DARWIN_64_BIT_INO_T = 1; +const int CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT = -2147413741; -const int __DARWIN_VERS_1050 = 1; +const int CSSMERR_DL_INVALID_PARSING_MODULE = -2147413740; -const int __DARWIN_NON_CANCELABLE = 0; +const int CSSMERR_DL_INVALID_DB_NAME = -2147413738; -const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN'; +const int CSSMERR_DL_DATASTORE_DOESNOT_EXIST = -2147413737; -const int __DARWIN_C_ANSI = 4096; +const int CSSMERR_DL_DATASTORE_ALREADY_EXISTS = -2147413736; -const int __DARWIN_C_FULL = 900000; +const int CSSMERR_DL_DB_LOCKED = -2147413735; -const int __DARWIN_C_LEVEL = 900000; +const int CSSMERR_DL_DATASTORE_IS_OPEN = -2147413734; -const int __STDC_WANT_LIB_EXT1__ = 1; +const int CSSMERR_DL_RECORD_NOT_FOUND = -2147413733; -const int __DARWIN_NO_LONG_LONG = 0; +const int CSSMERR_DL_MISSING_VALUE = -2147413732; -const int _DARWIN_FEATURE_64_BIT_INODE = 1; +const int CSSMERR_DL_UNSUPPORTED_QUERY = -2147413731; -const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1; +const int CSSMERR_DL_UNSUPPORTED_QUERY_LIMITS = -2147413730; -const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1; +const int CSSMERR_DL_UNSUPPORTED_NUM_SELECTION_PREDS = -2147413729; -const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1; +const int CSSMERR_DL_UNSUPPORTED_OPERATOR = -2147413727; -const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3; +const int CSSMERR_DL_INVALID_RESULTS_HANDLE = -2147413726; -const int __has_ptrcheck = 0; +const int CSSMERR_DL_INVALID_DB_LOCATION = -2147413725; -const int __DARWIN_NULL = 0; +const int CSSMERR_DL_INVALID_ACCESS_REQUEST = -2147413724; -const int __PTHREAD_SIZE__ = 8176; +const int CSSMERR_DL_INVALID_INDEX_INFO = -2147413723; -const int __PTHREAD_ATTR_SIZE__ = 56; +const int CSSMERR_DL_INVALID_SELECTION_TAG = -2147413722; -const int __PTHREAD_MUTEXATTR_SIZE__ = 8; +const int CSSMERR_DL_INVALID_NEW_OWNER = -2147413721; -const int __PTHREAD_MUTEX_SIZE__ = 56; +const int CSSMERR_DL_INVALID_RECORD_UID = -2147413720; -const int __PTHREAD_CONDATTR_SIZE__ = 8; +const int CSSMERR_DL_INVALID_UNIQUE_INDEX_DATA = -2147413719; -const int __PTHREAD_COND_SIZE__ = 40; +const int CSSMERR_DL_INVALID_MODIFY_MODE = -2147413718; -const int __PTHREAD_ONCE_SIZE__ = 8; +const int CSSMERR_DL_INVALID_OPEN_PARAMETERS = -2147413717; -const int __PTHREAD_RWLOCK_SIZE__ = 192; +const int CSSMERR_DL_RECORD_MODIFIED = -2147413716; -const int __PTHREAD_RWLOCKATTR_SIZE__ = 16; +const int CSSMERR_DL_ENDOFDATA = -2147413715; -const int _QUAD_HIGHWORD = 1; +const int CSSMERR_DL_INVALID_QUERY = -2147413714; -const int _QUAD_LOWWORD = 0; +const int CSSMERR_DL_INVALID_VALUE = -2147413713; -const int __DARWIN_LITTLE_ENDIAN = 1234; +const int CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTED = -2147413712; -const int __DARWIN_BIG_ENDIAN = 4321; +const int CSSMERR_DL_STALE_UNIQUE_RECORD = -2147413711; -const int __DARWIN_PDP_ENDIAN = 3412; +const int CSSM_WORDID_KEYCHAIN_PROMPT = 65536; -const int __DARWIN_BYTE_ORDER = 1234; +const int CSSM_WORDID_KEYCHAIN_LOCK = 65537; -const int LITTLE_ENDIAN = 1234; +const int CSSM_WORDID_KEYCHAIN_CHANGE_LOCK = 65538; -const int BIG_ENDIAN = 4321; +const int CSSM_WORDID_PROCESS = 65539; -const int PDP_ENDIAN = 3412; +const int CSSM_WORDID__RESERVED_1 = 65540; -const int BYTE_ORDER = 1234; +const int CSSM_WORDID_SYMMETRIC_KEY = 65541; -const int __WORDSIZE = 64; +const int CSSM_WORDID_SYSTEM = 65542; -const int INT8_MAX = 127; +const int CSSM_WORDID_KEY = 65543; -const int INT16_MAX = 32767; +const int CSSM_WORDID_PIN = 65544; -const int INT32_MAX = 2147483647; +const int CSSM_WORDID_PREAUTH = 65545; -const int INT64_MAX = 9223372036854775807; +const int CSSM_WORDID_PREAUTH_SOURCE = 65546; -const int INT8_MIN = -128; +const int CSSM_WORDID_ASYMMETRIC_KEY = 65547; -const int INT16_MIN = -32768; +const int CSSM_WORDID_PARTITION = 65548; -const int INT32_MIN = -2147483648; +const int CSSM_WORDID_KEYBAG_KEY = 65549; -const int INT64_MIN = -9223372036854775808; +const int CSSM_WORDID__FIRST_UNUSED = 65550; -const int UINT8_MAX = 255; +const int CSSM_ACL_SUBJECT_TYPE_KEYCHAIN_PROMPT = 65536; -const int UINT16_MAX = 65535; +const int CSSM_ACL_SUBJECT_TYPE_PROCESS = 65539; -const int UINT32_MAX = 4294967295; +const int CSSM_ACL_SUBJECT_TYPE_CODE_SIGNATURE = 116; -const int UINT64_MAX = -1; +const int CSSM_ACL_SUBJECT_TYPE_COMMENT = 12; -const int INT_LEAST8_MIN = -128; +const int CSSM_ACL_SUBJECT_TYPE_SYMMETRIC_KEY = 65541; -const int INT_LEAST16_MIN = -32768; +const int CSSM_ACL_SUBJECT_TYPE_PREAUTH = 65545; -const int INT_LEAST32_MIN = -2147483648; +const int CSSM_ACL_SUBJECT_TYPE_PREAUTH_SOURCE = 65546; -const int INT_LEAST64_MIN = -9223372036854775808; +const int CSSM_ACL_SUBJECT_TYPE_ASYMMETRIC_KEY = 65547; -const int INT_LEAST8_MAX = 127; +const int CSSM_ACL_SUBJECT_TYPE_PARTITION = 65548; -const int INT_LEAST16_MAX = 32767; +const int CSSM_SAMPLE_TYPE_KEYCHAIN_PROMPT = 65536; -const int INT_LEAST32_MAX = 2147483647; +const int CSSM_SAMPLE_TYPE_KEYCHAIN_LOCK = 65537; -const int INT_LEAST64_MAX = 9223372036854775807; +const int CSSM_SAMPLE_TYPE_KEYCHAIN_CHANGE_LOCK = 65538; -const int UINT_LEAST8_MAX = 255; +const int CSSM_SAMPLE_TYPE_PROCESS = 65539; -const int UINT_LEAST16_MAX = 65535; +const int CSSM_SAMPLE_TYPE_COMMENT = 12; -const int UINT_LEAST32_MAX = 4294967295; +const int CSSM_SAMPLE_TYPE_RETRY_ID = 85; -const int UINT_LEAST64_MAX = -1; +const int CSSM_SAMPLE_TYPE_SYMMETRIC_KEY = 65541; -const int INT_FAST8_MIN = -128; +const int CSSM_SAMPLE_TYPE_PREAUTH = 65545; -const int INT_FAST16_MIN = -32768; +const int CSSM_SAMPLE_TYPE_ASYMMETRIC_KEY = 65547; -const int INT_FAST32_MIN = -2147483648; +const int CSSM_SAMPLE_TYPE_KEYBAG_KEY = 65549; -const int INT_FAST64_MIN = -9223372036854775808; +const int CSSM_ACL_AUTHORIZATION_CHANGE_ACL = 65536; -const int INT_FAST8_MAX = 127; +const int CSSM_ACL_AUTHORIZATION_CHANGE_OWNER = 65537; -const int INT_FAST16_MAX = 32767; +const int CSSM_ACL_AUTHORIZATION_PARTITION_ID = 65538; -const int INT_FAST32_MAX = 2147483647; +const int CSSM_ACL_AUTHORIZATION_INTEGRITY = 65539; -const int INT_FAST64_MAX = 9223372036854775807; +const int CSSM_ACL_AUTHORIZATION_PREAUTH_BASE = 16842752; -const int UINT_FAST8_MAX = 255; +const int CSSM_ACL_AUTHORIZATION_PREAUTH_END = 16908288; -const int UINT_FAST16_MAX = 65535; +const int CSSM_ACL_CODE_SIGNATURE_INVALID = 0; -const int UINT_FAST32_MAX = 4294967295; +const int CSSM_ACL_CODE_SIGNATURE_OSX = 1; -const int UINT_FAST64_MAX = -1; +const int CSSM_ACL_MATCH_UID = 1; -const int INTPTR_MAX = 9223372036854775807; +const int CSSM_ACL_MATCH_GID = 2; -const int INTPTR_MIN = -9223372036854775808; +const int CSSM_ACL_MATCH_HONOR_ROOT = 256; -const int UINTPTR_MAX = -1; +const int CSSM_ACL_MATCH_BITS = 3; -const int INTMAX_MAX = 9223372036854775807; +const int CSSM_ACL_PROCESS_SELECTOR_CURRENT_VERSION = 257; -const int UINTMAX_MAX = -1; +const int CSSM_ACL_KEYCHAIN_PROMPT_CURRENT_VERSION = 257; -const int INTMAX_MIN = -9223372036854775808; +const int CSSM_ACL_KEYCHAIN_PROMPT_REQUIRE_PASSPHRASE = 1; -const int PTRDIFF_MIN = -9223372036854775808; +const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED = 16; -const int PTRDIFF_MAX = 9223372036854775807; +const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED_ACT = 32; -const int SIZE_MAX = -1; +const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID = 64; -const int RSIZE_MAX = 9223372036854775807; +const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID_ACT = 128; -const int WCHAR_MAX = 2147483647; +const int CSSM_ACL_PREAUTH_TRACKING_COUNT_MASK = 255; -const int WCHAR_MIN = -2147483648; +const int CSSM_ACL_PREAUTH_TRACKING_BLOCKED = 0; -const int WINT_MIN = -2147483648; +const int CSSM_ACL_PREAUTH_TRACKING_UNKNOWN = 1073741824; -const int WINT_MAX = 2147483647; +const int CSSM_ACL_PREAUTH_TRACKING_AUTHORIZED = -2147483648; -const int SIG_ATOMIC_MIN = -2147483648; +const int CSSM_DB_ACCESS_RESET = 65536; -const int SIG_ATOMIC_MAX = 2147483647; +const int CSSM_ALGID_APPLE_YARROW = -2147483648; -const int __API_TO_BE_DEPRECATED = 100000; +const int CSSM_ALGID_AES = -2147483647; -const int __MAC_10_0 = 1000; +const int CSSM_ALGID_FEE = -2147483646; -const int __MAC_10_1 = 1010; +const int CSSM_ALGID_FEE_MD5 = -2147483645; -const int __MAC_10_2 = 1020; +const int CSSM_ALGID_FEE_SHA1 = -2147483644; -const int __MAC_10_3 = 1030; +const int CSSM_ALGID_FEED = -2147483643; -const int __MAC_10_4 = 1040; +const int CSSM_ALGID_FEEDEXP = -2147483642; -const int __MAC_10_5 = 1050; +const int CSSM_ALGID_ASC = -2147483641; -const int __MAC_10_6 = 1060; +const int CSSM_ALGID_SHA1HMAC_LEGACY = -2147483640; -const int __MAC_10_7 = 1070; +const int CSSM_ALGID_KEYCHAIN_KEY = -2147483639; -const int __MAC_10_8 = 1080; +const int CSSM_ALGID_PKCS12_PBE_ENCR = -2147483638; -const int __MAC_10_9 = 1090; +const int CSSM_ALGID_PKCS12_PBE_MAC = -2147483637; -const int __MAC_10_10 = 101000; +const int CSSM_ALGID_SECURE_PASSPHRASE = -2147483636; -const int __MAC_10_10_2 = 101002; +const int CSSM_ALGID_PBE_OPENSSL_MD5 = -2147483635; -const int __MAC_10_10_3 = 101003; +const int CSSM_ALGID_SHA256 = -2147483634; -const int __MAC_10_11 = 101100; +const int CSSM_ALGID_SHA384 = -2147483633; -const int __MAC_10_11_2 = 101102; +const int CSSM_ALGID_SHA512 = -2147483632; -const int __MAC_10_11_3 = 101103; +const int CSSM_ALGID_ENTROPY_DEFAULT = -2147483631; -const int __MAC_10_11_4 = 101104; +const int CSSM_ALGID_SHA224 = -2147483630; -const int __MAC_10_12 = 101200; +const int CSSM_ALGID_SHA224WithRSA = -2147483629; -const int __MAC_10_12_1 = 101201; +const int CSSM_ALGID_SHA256WithRSA = -2147483628; -const int __MAC_10_12_2 = 101202; +const int CSSM_ALGID_SHA384WithRSA = -2147483627; -const int __MAC_10_12_4 = 101204; +const int CSSM_ALGID_SHA512WithRSA = -2147483626; -const int __MAC_10_13 = 101300; +const int CSSM_ALGID_OPENSSH1 = -2147483625; -const int __MAC_10_13_1 = 101301; +const int CSSM_ALGID_SHA224WithECDSA = -2147483624; -const int __MAC_10_13_2 = 101302; +const int CSSM_ALGID_SHA256WithECDSA = -2147483623; -const int __MAC_10_13_4 = 101304; +const int CSSM_ALGID_SHA384WithECDSA = -2147483622; -const int __MAC_10_14 = 101400; +const int CSSM_ALGID_SHA512WithECDSA = -2147483621; -const int __MAC_10_14_1 = 101401; +const int CSSM_ALGID_ECDSA_SPECIFIED = -2147483620; -const int __MAC_10_14_4 = 101404; +const int CSSM_ALGID_ECDH_X963_KDF = -2147483619; -const int __MAC_10_14_6 = 101406; +const int CSSM_ALGID__FIRST_UNUSED = -2147483618; -const int __MAC_10_15 = 101500; +const int CSSM_PADDING_APPLE_SSLv2 = -2147483648; -const int __MAC_10_15_1 = 101501; +const int CSSM_KEYBLOB_RAW_FORMAT_VENDOR_DEFINED = -2147483648; -const int __MAC_10_15_4 = 101504; +const int CSSM_KEYBLOB_RAW_FORMAT_X509 = -2147483648; -const int __MAC_10_16 = 101600; +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH = -2147483647; -const int __MAC_11_0 = 110000; +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSL = -2147483646; -const int __MAC_11_1 = 110100; +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH2 = -2147483645; -const int __MAC_11_3 = 110300; +const int CSSM_CUSTOM_COMMON_ERROR_EXTENT = 224; -const int __MAC_11_4 = 110400; +const int CSSM_ERRCODE_NO_USER_INTERACTION = 224; -const int __MAC_11_5 = 110500; +const int CSSM_ERRCODE_USER_CANCELED = 225; -const int __MAC_11_6 = 110600; +const int CSSM_ERRCODE_SERVICE_NOT_AVAILABLE = 226; -const int __MAC_12_0 = 120000; +const int CSSM_ERRCODE_INSUFFICIENT_CLIENT_IDENTIFICATION = 227; -const int __MAC_12_1 = 120100; +const int CSSM_ERRCODE_DEVICE_RESET = 228; -const int __MAC_12_2 = 120200; +const int CSSM_ERRCODE_DEVICE_FAILED = 229; -const int __MAC_12_3 = 120300; +const int CSSM_ERRCODE_IN_DARK_WAKE = 230; -const int __IPHONE_2_0 = 20000; +const int CSSMERR_CSSM_NO_USER_INTERACTION = -2147417888; -const int __IPHONE_2_1 = 20100; +const int CSSMERR_AC_NO_USER_INTERACTION = -2147405600; -const int __IPHONE_2_2 = 20200; +const int CSSMERR_CSP_NO_USER_INTERACTION = -2147415840; -const int __IPHONE_3_0 = 30000; +const int CSSMERR_CL_NO_USER_INTERACTION = -2147411744; -const int __IPHONE_3_1 = 30100; +const int CSSMERR_DL_NO_USER_INTERACTION = -2147413792; -const int __IPHONE_3_2 = 30200; +const int CSSMERR_TP_NO_USER_INTERACTION = -2147409696; -const int __IPHONE_4_0 = 40000; +const int CSSMERR_CSSM_USER_CANCELED = -2147417887; -const int __IPHONE_4_1 = 40100; +const int CSSMERR_AC_USER_CANCELED = -2147405599; -const int __IPHONE_4_2 = 40200; +const int CSSMERR_CSP_USER_CANCELED = -2147415839; -const int __IPHONE_4_3 = 40300; +const int CSSMERR_CL_USER_CANCELED = -2147411743; -const int __IPHONE_5_0 = 50000; +const int CSSMERR_DL_USER_CANCELED = -2147413791; -const int __IPHONE_5_1 = 50100; +const int CSSMERR_TP_USER_CANCELED = -2147409695; -const int __IPHONE_6_0 = 60000; +const int CSSMERR_CSSM_SERVICE_NOT_AVAILABLE = -2147417886; -const int __IPHONE_6_1 = 60100; +const int CSSMERR_AC_SERVICE_NOT_AVAILABLE = -2147405598; -const int __IPHONE_7_0 = 70000; +const int CSSMERR_CSP_SERVICE_NOT_AVAILABLE = -2147415838; -const int __IPHONE_7_1 = 70100; +const int CSSMERR_CL_SERVICE_NOT_AVAILABLE = -2147411742; -const int __IPHONE_8_0 = 80000; +const int CSSMERR_DL_SERVICE_NOT_AVAILABLE = -2147413790; -const int __IPHONE_8_1 = 80100; +const int CSSMERR_TP_SERVICE_NOT_AVAILABLE = -2147409694; -const int __IPHONE_8_2 = 80200; +const int CSSMERR_CSSM_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147417885; -const int __IPHONE_8_3 = 80300; +const int CSSMERR_AC_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147405597; -const int __IPHONE_8_4 = 80400; +const int CSSMERR_CSP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147415837; -const int __IPHONE_9_0 = 90000; +const int CSSMERR_CL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147411741; -const int __IPHONE_9_1 = 90100; +const int CSSMERR_DL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147413789; -const int __IPHONE_9_2 = 90200; +const int CSSMERR_TP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147409693; -const int __IPHONE_9_3 = 90300; +const int CSSMERR_CSSM_DEVICE_RESET = -2147417884; -const int __IPHONE_10_0 = 100000; +const int CSSMERR_AC_DEVICE_RESET = -2147405596; -const int __IPHONE_10_1 = 100100; +const int CSSMERR_CSP_DEVICE_RESET = -2147415836; -const int __IPHONE_10_2 = 100200; +const int CSSMERR_CL_DEVICE_RESET = -2147411740; -const int __IPHONE_10_3 = 100300; +const int CSSMERR_DL_DEVICE_RESET = -2147413788; -const int __IPHONE_11_0 = 110000; +const int CSSMERR_TP_DEVICE_RESET = -2147409692; -const int __IPHONE_11_1 = 110100; +const int CSSMERR_CSSM_DEVICE_FAILED = -2147417883; -const int __IPHONE_11_2 = 110200; +const int CSSMERR_AC_DEVICE_FAILED = -2147405595; -const int __IPHONE_11_3 = 110300; +const int CSSMERR_CSP_DEVICE_FAILED = -2147415835; -const int __IPHONE_11_4 = 110400; +const int CSSMERR_CL_DEVICE_FAILED = -2147411739; -const int __IPHONE_12_0 = 120000; +const int CSSMERR_DL_DEVICE_FAILED = -2147413787; -const int __IPHONE_12_1 = 120100; +const int CSSMERR_TP_DEVICE_FAILED = -2147409691; -const int __IPHONE_12_2 = 120200; +const int CSSMERR_CSSM_IN_DARK_WAKE = -2147417882; -const int __IPHONE_12_3 = 120300; +const int CSSMERR_AC_IN_DARK_WAKE = -2147405594; -const int __IPHONE_12_4 = 120400; +const int CSSMERR_CSP_IN_DARK_WAKE = -2147415834; -const int __IPHONE_13_0 = 130000; +const int CSSMERR_CL_IN_DARK_WAKE = -2147411738; -const int __IPHONE_13_1 = 130100; +const int CSSMERR_DL_IN_DARK_WAKE = -2147413786; -const int __IPHONE_13_2 = 130200; +const int CSSMERR_TP_IN_DARK_WAKE = -2147409690; -const int __IPHONE_13_3 = 130300; +const int CSSMERR_CSP_APPLE_ADD_APPLICATION_ACL_SUBJECT = -2147415040; -const int __IPHONE_13_4 = 130400; +const int CSSMERR_CSP_APPLE_PUBLIC_KEY_INCOMPLETE = -2147415039; -const int __IPHONE_13_5 = 130500; +const int CSSMERR_CSP_APPLE_SIGNATURE_MISMATCH = -2147415038; -const int __IPHONE_13_6 = 130600; +const int CSSMERR_CSP_APPLE_INVALID_KEY_START_DATE = -2147415037; -const int __IPHONE_13_7 = 130700; +const int CSSMERR_CSP_APPLE_INVALID_KEY_END_DATE = -2147415036; -const int __IPHONE_14_0 = 140000; +const int CSSMERR_CSPDL_APPLE_DL_CONVERSION_ERROR = -2147415035; -const int __IPHONE_14_1 = 140100; +const int CSSMERR_CSP_APPLE_SSLv2_ROLLBACK = -2147415034; -const int __IPHONE_14_2 = 140200; +const int CSSM_DL_DB_RECORD_GENERIC_PASSWORD = -2147483648; -const int __IPHONE_14_3 = 140300; +const int CSSM_DL_DB_RECORD_INTERNET_PASSWORD = -2147483647; -const int __IPHONE_14_5 = 140500; +const int CSSM_DL_DB_RECORD_APPLESHARE_PASSWORD = -2147483646; -const int __IPHONE_14_6 = 140600; +const int CSSM_DL_DB_RECORD_X509_CERTIFICATE = -2147479552; -const int __IPHONE_14_7 = 140700; +const int CSSM_DL_DB_RECORD_USER_TRUST = -2147479551; -const int __IPHONE_14_8 = 140800; +const int CSSM_DL_DB_RECORD_X509_CRL = -2147479550; -const int __IPHONE_15_0 = 150000; +const int CSSM_DL_DB_RECORD_UNLOCK_REFERRAL = -2147479549; -const int __IPHONE_15_1 = 150100; +const int CSSM_DL_DB_RECORD_EXTENDED_ATTRIBUTE = -2147479548; -const int __IPHONE_15_2 = 150200; +const int CSSM_DL_DB_RECORD_METADATA = -2147450880; -const int __IPHONE_15_3 = 150300; +const int CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT = 0; -const int __IPHONE_15_4 = 150400; +const int CSSM_APPLEFILEDL_COMMIT = 1; -const int __TVOS_9_0 = 90000; +const int CSSM_APPLEFILEDL_ROLLBACK = 2; -const int __TVOS_9_1 = 90100; +const int CSSM_APPLEFILEDL_TAKE_FILE_LOCK = 3; -const int __TVOS_9_2 = 90200; +const int CSSM_APPLEFILEDL_MAKE_BACKUP = 4; -const int __TVOS_10_0 = 100000; +const int CSSM_APPLEFILEDL_MAKE_COPY = 5; -const int __TVOS_10_0_1 = 100001; +const int CSSM_APPLEFILEDL_DELETE_FILE = 6; -const int __TVOS_10_1 = 100100; +const int CSSM_APPLE_UNLOCK_TYPE_KEY_DIRECT = 1; -const int __TVOS_10_2 = 100200; +const int CSSM_APPLE_UNLOCK_TYPE_WRAPPED_PRIVATE = 2; -const int __TVOS_11_0 = 110000; +const int CSSM_APPLE_UNLOCK_TYPE_KEYBAG = 3; -const int __TVOS_11_1 = 110100; +const int CSSMERR_APPLEDL_INVALID_OPEN_PARAMETERS = -2147412992; -const int __TVOS_11_2 = 110200; +const int CSSMERR_APPLEDL_DISK_FULL = -2147412991; -const int __TVOS_11_3 = 110300; +const int CSSMERR_APPLEDL_QUOTA_EXCEEDED = -2147412990; -const int __TVOS_11_4 = 110400; +const int CSSMERR_APPLEDL_FILE_TOO_BIG = -2147412989; -const int __TVOS_12_0 = 120000; +const int CSSMERR_APPLEDL_INVALID_DATABASE_BLOB = -2147412988; -const int __TVOS_12_1 = 120100; +const int CSSMERR_APPLEDL_INVALID_KEY_BLOB = -2147412987; -const int __TVOS_12_2 = 120200; +const int CSSMERR_APPLEDL_INCOMPATIBLE_DATABASE_BLOB = -2147412986; -const int __TVOS_12_3 = 120300; +const int CSSMERR_APPLEDL_INCOMPATIBLE_KEY_BLOB = -2147412985; -const int __TVOS_12_4 = 120400; +const int CSSMERR_APPLETP_HOSTNAME_MISMATCH = -2147408896; -const int __TVOS_13_0 = 130000; +const int CSSMERR_APPLETP_UNKNOWN_CRITICAL_EXTEN = -2147408895; -const int __TVOS_13_2 = 130200; +const int CSSMERR_APPLETP_NO_BASIC_CONSTRAINTS = -2147408894; -const int __TVOS_13_3 = 130300; +const int CSSMERR_APPLETP_INVALID_CA = -2147408893; -const int __TVOS_13_4 = 130400; +const int CSSMERR_APPLETP_INVALID_AUTHORITY_ID = -2147408892; -const int __TVOS_14_0 = 140000; +const int CSSMERR_APPLETP_INVALID_SUBJECT_ID = -2147408891; -const int __TVOS_14_1 = 140100; +const int CSSMERR_APPLETP_INVALID_KEY_USAGE = -2147408890; -const int __TVOS_14_2 = 140200; +const int CSSMERR_APPLETP_INVALID_EXTENDED_KEY_USAGE = -2147408889; -const int __TVOS_14_3 = 140300; +const int CSSMERR_APPLETP_INVALID_ID_LINKAGE = -2147408888; -const int __TVOS_14_5 = 140500; +const int CSSMERR_APPLETP_PATH_LEN_CONSTRAINT = -2147408887; -const int __TVOS_14_6 = 140600; +const int CSSMERR_APPLETP_INVALID_ROOT = -2147408886; -const int __TVOS_14_7 = 140700; +const int CSSMERR_APPLETP_CRL_EXPIRED = -2147408885; -const int __TVOS_15_0 = 150000; +const int CSSMERR_APPLETP_CRL_NOT_VALID_YET = -2147408884; -const int __TVOS_15_1 = 150100; +const int CSSMERR_APPLETP_CRL_NOT_FOUND = -2147408883; -const int __TVOS_15_2 = 150200; +const int CSSMERR_APPLETP_CRL_SERVER_DOWN = -2147408882; -const int __TVOS_15_3 = 150300; +const int CSSMERR_APPLETP_CRL_BAD_URI = -2147408881; -const int __TVOS_15_4 = 150400; +const int CSSMERR_APPLETP_UNKNOWN_CERT_EXTEN = -2147408880; -const int __WATCHOS_1_0 = 10000; +const int CSSMERR_APPLETP_UNKNOWN_CRL_EXTEN = -2147408879; -const int __WATCHOS_2_0 = 20000; +const int CSSMERR_APPLETP_CRL_NOT_TRUSTED = -2147408878; -const int __WATCHOS_2_1 = 20100; +const int CSSMERR_APPLETP_CRL_INVALID_ANCHOR_CERT = -2147408877; -const int __WATCHOS_2_2 = 20200; +const int CSSMERR_APPLETP_CRL_POLICY_FAIL = -2147408876; -const int __WATCHOS_3_0 = 30000; +const int CSSMERR_APPLETP_IDP_FAIL = -2147408875; -const int __WATCHOS_3_1 = 30100; +const int CSSMERR_APPLETP_CERT_NOT_FOUND_FROM_ISSUER = -2147408874; -const int __WATCHOS_3_1_1 = 30101; +const int CSSMERR_APPLETP_BAD_CERT_FROM_ISSUER = -2147408873; -const int __WATCHOS_3_2 = 30200; +const int CSSMERR_APPLETP_SMIME_EMAIL_ADDRS_NOT_FOUND = -2147408872; -const int __WATCHOS_4_0 = 40000; +const int CSSMERR_APPLETP_SMIME_BAD_EXT_KEY_USE = -2147408871; -const int __WATCHOS_4_1 = 40100; +const int CSSMERR_APPLETP_SMIME_BAD_KEY_USE = -2147408870; -const int __WATCHOS_4_2 = 40200; +const int CSSMERR_APPLETP_SMIME_KEYUSAGE_NOT_CRITICAL = -2147408869; -const int __WATCHOS_4_3 = 40300; +const int CSSMERR_APPLETP_SMIME_NO_EMAIL_ADDRS = -2147408868; -const int __WATCHOS_5_0 = 50000; +const int CSSMERR_APPLETP_SMIME_SUBJ_ALT_NAME_NOT_CRIT = -2147408867; -const int __WATCHOS_5_1 = 50100; +const int CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE = -2147408866; -const int __WATCHOS_5_2 = 50200; +const int CSSMERR_APPLETP_OCSP_BAD_RESPONSE = -2147408865; -const int __WATCHOS_5_3 = 50300; +const int CSSMERR_APPLETP_OCSP_BAD_REQUEST = -2147408864; -const int __WATCHOS_6_0 = 60000; +const int CSSMERR_APPLETP_OCSP_UNAVAILABLE = -2147408863; -const int __WATCHOS_6_1 = 60100; +const int CSSMERR_APPLETP_OCSP_STATUS_UNRECOGNIZED = -2147408862; -const int __WATCHOS_6_2 = 60200; +const int CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK = -2147408861; -const int __WATCHOS_7_0 = 70000; +const int CSSMERR_APPLETP_NETWORK_FAILURE = -2147408860; -const int __WATCHOS_7_1 = 70100; +const int CSSMERR_APPLETP_OCSP_NOT_TRUSTED = -2147408859; -const int __WATCHOS_7_2 = 70200; +const int CSSMERR_APPLETP_OCSP_INVALID_ANCHOR_CERT = -2147408858; -const int __WATCHOS_7_3 = 70300; +const int CSSMERR_APPLETP_OCSP_SIG_ERROR = -2147408857; -const int __WATCHOS_7_4 = 70400; +const int CSSMERR_APPLETP_OCSP_NO_SIGNER = -2147408856; -const int __WATCHOS_7_5 = 70500; +const int CSSMERR_APPLETP_OCSP_RESP_MALFORMED_REQ = -2147408855; -const int __WATCHOS_7_6 = 70600; +const int CSSMERR_APPLETP_OCSP_RESP_INTERNAL_ERR = -2147408854; -const int __WATCHOS_8_0 = 80000; +const int CSSMERR_APPLETP_OCSP_RESP_TRY_LATER = -2147408853; -const int __WATCHOS_8_1 = 80100; +const int CSSMERR_APPLETP_OCSP_RESP_SIG_REQUIRED = -2147408852; -const int __WATCHOS_8_3 = 80300; +const int CSSMERR_APPLETP_OCSP_RESP_UNAUTHORIZED = -2147408851; -const int __WATCHOS_8_4 = 80400; +const int CSSMERR_APPLETP_OCSP_NONCE_MISMATCH = -2147408850; -const int __WATCHOS_8_5 = 80500; +const int CSSMERR_APPLETP_CS_BAD_CERT_CHAIN_LENGTH = -2147408849; -const int MAC_OS_X_VERSION_10_0 = 1000; +const int CSSMERR_APPLETP_CS_NO_BASIC_CONSTRAINTS = -2147408848; -const int MAC_OS_X_VERSION_10_1 = 1010; +const int CSSMERR_APPLETP_CS_BAD_PATH_LENGTH = -2147408847; -const int MAC_OS_X_VERSION_10_2 = 1020; +const int CSSMERR_APPLETP_CS_NO_EXTENDED_KEY_USAGE = -2147408846; -const int MAC_OS_X_VERSION_10_3 = 1030; +const int CSSMERR_APPLETP_CODE_SIGN_DEVELOPMENT = -2147408845; -const int MAC_OS_X_VERSION_10_4 = 1040; +const int CSSMERR_APPLETP_RS_BAD_CERT_CHAIN_LENGTH = -2147408844; -const int MAC_OS_X_VERSION_10_5 = 1050; +const int CSSMERR_APPLETP_RS_BAD_EXTENDED_KEY_USAGE = -2147408843; -const int MAC_OS_X_VERSION_10_6 = 1060; +const int CSSMERR_APPLETP_TRUST_SETTING_DENY = -2147408842; -const int MAC_OS_X_VERSION_10_7 = 1070; +const int CSSMERR_APPLETP_INVALID_EMPTY_SUBJECT = -2147408841; -const int MAC_OS_X_VERSION_10_8 = 1080; +const int CSSMERR_APPLETP_UNKNOWN_QUAL_CERT_STATEMENT = -2147408840; -const int MAC_OS_X_VERSION_10_9 = 1090; +const int CSSMERR_APPLETP_MISSING_REQUIRED_EXTENSION = -2147408839; -const int MAC_OS_X_VERSION_10_10 = 101000; +const int CSSMERR_APPLETP_EXT_KEYUSAGE_NOT_CRITICAL = -2147408838; -const int MAC_OS_X_VERSION_10_10_2 = 101002; +const int CSSMERR_APPLETP_IDENTIFIER_MISSING = -2147408837; -const int MAC_OS_X_VERSION_10_10_3 = 101003; +const int CSSMERR_APPLETP_CA_PIN_MISMATCH = -2147408836; -const int MAC_OS_X_VERSION_10_11 = 101100; +const int CSSMERR_APPLETP_LEAF_PIN_MISMATCH = -2147408835; -const int MAC_OS_X_VERSION_10_11_2 = 101102; +const int CSSMERR_APPLE_DOTMAC_REQ_QUEUED = -2147408796; -const int MAC_OS_X_VERSION_10_11_3 = 101103; +const int CSSMERR_APPLE_DOTMAC_REQ_REDIRECT = -2147408795; -const int MAC_OS_X_VERSION_10_11_4 = 101104; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ERR = -2147408794; -const int MAC_OS_X_VERSION_10_12 = 101200; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_PARAM = -2147408793; -const int MAC_OS_X_VERSION_10_12_1 = 101201; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_AUTH = -2147408792; -const int MAC_OS_X_VERSION_10_12_2 = 101202; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_UNIMPL = -2147408791; -const int MAC_OS_X_VERSION_10_12_4 = 101204; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_NOT_AVAIL = -2147408790; -const int MAC_OS_X_VERSION_10_13 = 101300; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ALREADY_EXIST = -2147408789; -const int MAC_OS_X_VERSION_10_13_1 = 101301; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_SERVICE_ERROR = -2147408788; -const int MAC_OS_X_VERSION_10_13_2 = 101302; +const int CSSMERR_APPLE_DOTMAC_REQ_IS_PENDING = -2147408787; -const int MAC_OS_X_VERSION_10_13_4 = 101304; +const int CSSMERR_APPLE_DOTMAC_NO_REQ_PENDING = -2147408786; -const int MAC_OS_X_VERSION_10_14 = 101400; +const int CSSMERR_APPLE_DOTMAC_CSR_VERIFY_FAIL = -2147408785; -const int MAC_OS_X_VERSION_10_14_1 = 101401; +const int CSSMERR_APPLE_DOTMAC_FAILED_CONSISTENCY_CHECK = -2147408784; -const int MAC_OS_X_VERSION_10_14_4 = 101404; +const int CSSM_APPLEDL_OPEN_PARAMETERS_VERSION = 1; -const int MAC_OS_X_VERSION_10_14_6 = 101406; +const int CSSM_APPLECSPDL_DB_LOCK = 0; -const int MAC_OS_X_VERSION_10_15 = 101500; +const int CSSM_APPLECSPDL_DB_UNLOCK = 1; -const int MAC_OS_X_VERSION_10_15_1 = 101501; +const int CSSM_APPLECSPDL_DB_GET_SETTINGS = 2; -const int MAC_OS_X_VERSION_10_16 = 101600; +const int CSSM_APPLECSPDL_DB_SET_SETTINGS = 3; -const int MAC_OS_VERSION_11_0 = 110000; +const int CSSM_APPLECSPDL_DB_IS_LOCKED = 4; -const int MAC_OS_VERSION_12_0 = 120000; +const int CSSM_APPLECSPDL_DB_CHANGE_PASSWORD = 5; -const int __DRIVERKIT_19_0 = 190000; +const int CSSM_APPLECSPDL_DB_GET_HANDLE = 6; -const int __DRIVERKIT_20_0 = 200000; +const int CSSM_APPLESCPDL_CSP_GET_KEYHANDLE = 7; -const int __DRIVERKIT_21_0 = 210000; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_8 = 8; -const int __MAC_OS_X_VERSION_MIN_REQUIRED = 120000; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_9 = 9; -const int __MAC_OS_X_VERSION_MAX_ALLOWED = 120300; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_10 = 10; -const int __ENABLE_LEGACY_MAC_AVAILABILITY = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_11 = 11; -const int __DARWIN_FD_SETSIZE = 1024; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_12 = 12; -const int __DARWIN_NBBY = 8; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_13 = 13; -const int NBBY = 8; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_14 = 14; -const int FD_SETSIZE = 1024; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_15 = 15; -const int MAC_OS_VERSION_11_1 = 110100; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_16 = 16; -const int MAC_OS_VERSION_11_3 = 110300; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_17 = 17; -const int MAC_OS_X_VERSION_MIN_REQUIRED = 120000; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_18 = 18; -const int MAC_OS_X_VERSION_MAX_ALLOWED = 120000; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_19 = 19; -const int __AVAILABILITY_MACROS_USES_AVAILABILITY = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_20 = 20; -const int OBJC_API_VERSION = 2; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_21 = 21; -const int OBJC_NO_GC = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_22 = 22; -const int NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_23 = 23; -const int OBJC_OLD_DISPATCH_PROTOTYPES = 0; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_24 = 24; -const int true1 = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_25 = 25; -const int false1 = 0; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_26 = 26; -const int __bool_true_false_are_defined = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_27 = 27; -const int OBJC_BOOL_IS_BOOL = 1; +const int CSSM_APPLECSP_KEYDIGEST = 256; -const int YES = 1; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_APPLE_CUSTOM = 100; -const int NO = 0; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSL = 101; -const int NSIntegerMax = 9223372036854775807; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSH1 = 102; -const int NSIntegerMin = -9223372036854775808; +const int CSSM_ATTRIBUTE_VENDOR_DEFINED = 8388608; -const int NSUIntegerMax = -1; +const int CSSM_ATTRIBUTE_PUBLIC_KEY = 1082130432; -const int NSINTEGER_DEFINED = 1; +const int CSSM_ATTRIBUTE_FEE_PRIME_TYPE = 276824065; -const int __GNUC_VA_LIST = 1; +const int CSSM_ATTRIBUTE_FEE_CURVE_TYPE = 276824066; -const int __DARWIN_CLK_TCK = 100; +const int CSSM_ATTRIBUTE_ASC_OPTIMIZATION = 276824067; -const int CHAR_BIT = 8; +const int CSSM_ATTRIBUTE_RSA_BLINDING = 276824068; -const int MB_LEN_MAX = 6; +const int CSSM_ATTRIBUTE_PARAM_KEY = 1082130437; -const int CLK_TCK = 100; +const int CSSM_ATTRIBUTE_PROMPT = 545259526; -const int SCHAR_MAX = 127; +const int CSSM_ATTRIBUTE_ALERT_TITLE = 545259527; -const int SCHAR_MIN = -128; +const int CSSM_ATTRIBUTE_VERIFY_PASSPHRASE = 276824072; -const int UCHAR_MAX = 255; +const int CSSM_FEE_PRIME_TYPE_DEFAULT = 0; -const int CHAR_MAX = 127; +const int CSSM_FEE_PRIME_TYPE_MERSENNE = 1; -const int CHAR_MIN = -128; +const int CSSM_FEE_PRIME_TYPE_FEE = 2; -const int USHRT_MAX = 65535; +const int CSSM_FEE_PRIME_TYPE_GENERAL = 3; -const int SHRT_MAX = 32767; +const int CSSM_FEE_CURVE_TYPE_DEFAULT = 0; -const int SHRT_MIN = -32768; +const int CSSM_FEE_CURVE_TYPE_MONTGOMERY = 1; -const int UINT_MAX = 4294967295; +const int CSSM_FEE_CURVE_TYPE_WEIERSTRASS = 2; -const int INT_MAX = 2147483647; +const int CSSM_FEE_CURVE_TYPE_ANSI_X9_62 = 3; -const int INT_MIN = -2147483648; +const int CSSM_ASC_OPTIMIZE_DEFAULT = 0; -const int ULONG_MAX = -1; +const int CSSM_ASC_OPTIMIZE_SIZE = 1; -const int LONG_MAX = 9223372036854775807; +const int CSSM_ASC_OPTIMIZE_SECURITY = 2; -const int LONG_MIN = -9223372036854775808; +const int CSSM_ASC_OPTIMIZE_TIME = 3; -const int ULLONG_MAX = -1; +const int CSSM_ASC_OPTIMIZE_TIME_SIZE = 4; -const int LLONG_MAX = 9223372036854775807; +const int CSSM_ASC_OPTIMIZE_ASCII = 5; -const int LLONG_MIN = -9223372036854775808; +const int CSSM_KEYATTR_PARTIAL = 65536; -const int LONG_BIT = 64; +const int CSSM_KEYATTR_PUBLIC_KEY_ENCRYPT = 131072; -const int SSIZE_MAX = 9223372036854775807; +const int CSSM_TP_ACTION_REQUIRE_CRL_PER_CERT = 1; -const int WORD_BIT = 32; +const int CSSM_TP_ACTION_FETCH_CRL_FROM_NET = 2; -const int SIZE_T_MAX = -1; +const int CSSM_TP_ACTION_CRL_SUFFICIENT = 4; -const int UQUAD_MAX = -1; +const int CSSM_TP_ACTION_REQUIRE_CRL_IF_PRESENT = 8; -const int QUAD_MAX = 9223372036854775807; +const int CSSM_TP_ACTION_ALLOW_EXPIRED = 1; -const int QUAD_MIN = -9223372036854775808; +const int CSSM_TP_ACTION_LEAF_IS_CA = 2; -const int ARG_MAX = 1048576; +const int CSSM_TP_ACTION_FETCH_CERT_FROM_NET = 4; -const int CHILD_MAX = 266; +const int CSSM_TP_ACTION_ALLOW_EXPIRED_ROOT = 8; -const int GID_MAX = 2147483647; +const int CSSM_TP_ACTION_REQUIRE_REV_PER_CERT = 16; -const int LINK_MAX = 32767; +const int CSSM_TP_ACTION_TRUST_SETTINGS = 32; -const int MAX_CANON = 1024; +const int CSSM_TP_ACTION_IMPLICIT_ANCHORS = 64; -const int MAX_INPUT = 1024; +const int CSSM_CERT_STATUS_EXPIRED = 1; -const int NAME_MAX = 255; +const int CSSM_CERT_STATUS_NOT_VALID_YET = 2; -const int NGROUPS_MAX = 16; +const int CSSM_CERT_STATUS_IS_IN_INPUT_CERTS = 4; -const int UID_MAX = 2147483647; +const int CSSM_CERT_STATUS_IS_IN_ANCHORS = 8; -const int OPEN_MAX = 10240; +const int CSSM_CERT_STATUS_IS_ROOT = 16; -const int PATH_MAX = 1024; +const int CSSM_CERT_STATUS_IS_FROM_NET = 32; -const int PIPE_BUF = 512; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_USER = 64; -const int BC_BASE_MAX = 99; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_ADMIN = 128; -const int BC_DIM_MAX = 2048; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_SYSTEM = 256; -const int BC_SCALE_MAX = 99; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_TRUST = 512; -const int BC_STRING_MAX = 1000; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_DENY = 1024; -const int CHARCLASS_NAME_MAX = 14; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_IGNORED_ERROR = 2048; -const int COLL_WEIGHTS_MAX = 2; +const int CSSM_EVIDENCE_FORM_APPLE_HEADER = -2147483648; -const int EQUIV_CLASS_MAX = 2; +const int CSSM_EVIDENCE_FORM_APPLE_CERTGROUP = -2147483647; -const int EXPR_NEST_MAX = 32; +const int CSSM_EVIDENCE_FORM_APPLE_CERT_INFO = -2147483646; -const int LINE_MAX = 2048; +const int CSSM_APPLEX509CL_OBTAIN_CSR = 0; -const int RE_DUP_MAX = 255; +const int CSSM_APPLEX509CL_VERIFY_CSR = 1; -const int NZERO = 20; +const int kSecSubjectItemAttr = 1937072746; -const int _POSIX_ARG_MAX = 4096; +const int kSecIssuerItemAttr = 1769173877; -const int _POSIX_CHILD_MAX = 25; +const int kSecSerialNumberItemAttr = 1936614002; -const int _POSIX_LINK_MAX = 8; +const int kSecPublicKeyHashItemAttr = 1752198009; -const int _POSIX_MAX_CANON = 255; +const int kSecSubjectKeyIdentifierItemAttr = 1936419172; -const int _POSIX_MAX_INPUT = 255; +const int kSecCertTypeItemAttr = 1668577648; -const int _POSIX_NAME_MAX = 14; +const int kSecCertEncodingItemAttr = 1667591779; -const int _POSIX_NGROUPS_MAX = 8; +const int SSL_NULL_WITH_NULL_NULL = 0; -const int _POSIX_OPEN_MAX = 20; +const int SSL_RSA_WITH_NULL_MD5 = 1; -const int _POSIX_PATH_MAX = 256; +const int SSL_RSA_WITH_NULL_SHA = 2; -const int _POSIX_PIPE_BUF = 512; +const int SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3; -const int _POSIX_SSIZE_MAX = 32767; +const int SSL_RSA_WITH_RC4_128_MD5 = 4; -const int _POSIX_STREAM_MAX = 8; +const int SSL_RSA_WITH_RC4_128_SHA = 5; -const int _POSIX_TZNAME_MAX = 6; +const int SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6; -const int _POSIX2_BC_BASE_MAX = 99; +const int SSL_RSA_WITH_IDEA_CBC_SHA = 7; -const int _POSIX2_BC_DIM_MAX = 2048; +const int SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8; -const int _POSIX2_BC_SCALE_MAX = 99; +const int SSL_RSA_WITH_DES_CBC_SHA = 9; -const int _POSIX2_BC_STRING_MAX = 1000; +const int SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10; -const int _POSIX2_EQUIV_CLASS_MAX = 2; +const int SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11; -const int _POSIX2_EXPR_NEST_MAX = 32; +const int SSL_DH_DSS_WITH_DES_CBC_SHA = 12; -const int _POSIX2_LINE_MAX = 2048; +const int SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; -const int _POSIX2_RE_DUP_MAX = 255; +const int SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14; -const int _POSIX_AIO_LISTIO_MAX = 2; +const int SSL_DH_RSA_WITH_DES_CBC_SHA = 15; -const int _POSIX_AIO_MAX = 1; +const int SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; -const int _POSIX_DELAYTIMER_MAX = 32; +const int SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17; -const int _POSIX_MQ_OPEN_MAX = 8; +const int SSL_DHE_DSS_WITH_DES_CBC_SHA = 18; -const int _POSIX_MQ_PRIO_MAX = 32; +const int SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; -const int _POSIX_RTSIG_MAX = 8; +const int SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20; -const int _POSIX_SEM_NSEMS_MAX = 256; +const int SSL_DHE_RSA_WITH_DES_CBC_SHA = 21; -const int _POSIX_SEM_VALUE_MAX = 32767; +const int SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; -const int _POSIX_SIGQUEUE_MAX = 32; +const int SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23; -const int _POSIX_TIMER_MAX = 32; +const int SSL_DH_anon_WITH_RC4_128_MD5 = 24; -const int _POSIX_CLOCKRES_MIN = 20000000; +const int SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25; -const int _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4; +const int SSL_DH_anon_WITH_DES_CBC_SHA = 26; -const int _POSIX_THREAD_KEYS_MAX = 128; +const int SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; -const int _POSIX_THREAD_THREADS_MAX = 64; +const int SSL_FORTEZZA_DMS_WITH_NULL_SHA = 28; -const int PTHREAD_DESTRUCTOR_ITERATIONS = 4; +const int SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = 29; -const int PTHREAD_KEYS_MAX = 512; +const int TLS_RSA_WITH_AES_128_CBC_SHA = 47; -const int PTHREAD_STACK_MIN = 16384; +const int TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48; -const int _POSIX_HOST_NAME_MAX = 255; +const int TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49; -const int _POSIX_LOGIN_NAME_MAX = 9; +const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50; -const int _POSIX_SS_REPL_MAX = 4; +const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51; -const int _POSIX_SYMLINK_MAX = 255; +const int TLS_DH_anon_WITH_AES_128_CBC_SHA = 52; -const int _POSIX_SYMLOOP_MAX = 8; +const int TLS_RSA_WITH_AES_256_CBC_SHA = 53; -const int _POSIX_TRACE_EVENT_NAME_MAX = 30; +const int TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54; -const int _POSIX_TRACE_NAME_MAX = 8; +const int TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55; -const int _POSIX_TRACE_SYS_MAX = 8; +const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56; -const int _POSIX_TRACE_USER_EVENT_MAX = 32; +const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57; -const int _POSIX_TTY_NAME_MAX = 9; +const int TLS_DH_anon_WITH_AES_256_CBC_SHA = 58; -const int _POSIX2_CHARCLASS_NAME_MAX = 14; +const int TLS_ECDH_ECDSA_WITH_NULL_SHA = -16383; -const int _POSIX2_COLL_WEIGHTS_MAX = 2; +const int TLS_ECDH_ECDSA_WITH_RC4_128_SHA = -16382; -const int _POSIX_RE_DUP_MAX = 255; +const int TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = -16381; -const int OFF_MIN = -9223372036854775808; +const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = -16380; -const int OFF_MAX = 9223372036854775807; +const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = -16379; -const int PASS_MAX = 128; +const int TLS_ECDHE_ECDSA_WITH_NULL_SHA = -16378; -const int NL_ARGMAX = 9; +const int TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = -16377; -const int NL_LANGMAX = 14; +const int TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; -const int NL_MSGMAX = 32767; +const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; -const int NL_NMAX = 1; +const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; -const int NL_SETMAX = 255; +const int TLS_ECDH_RSA_WITH_NULL_SHA = -16373; -const int NL_TEXTMAX = 2048; +const int TLS_ECDH_RSA_WITH_RC4_128_SHA = -16372; -const int _XOPEN_IOV_MAX = 16; +const int TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = -16371; -const int IOV_MAX = 1024; +const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = -16370; -const int _XOPEN_NAME_MAX = 255; +const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = -16369; -const int _XOPEN_PATH_MAX = 1024; +const int TLS_ECDHE_RSA_WITH_NULL_SHA = -16368; -const int NS_BLOCKS_AVAILABLE = 1; +const int TLS_ECDHE_RSA_WITH_RC4_128_SHA = -16367; -const int __COREFOUNDATION_CFAVAILABILITY__ = 1; +const int TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; -const int API_TO_BE_DEPRECATED = 100000; +const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; -const int __CF_ENUM_FIXED_IS_AVAILABLE = 1; +const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; -const double NSFoundationVersionNumber10_0 = 397.4; +const int TLS_ECDH_anon_WITH_NULL_SHA = -16363; -const double NSFoundationVersionNumber10_1 = 425.0; +const int TLS_ECDH_anon_WITH_RC4_128_SHA = -16362; -const double NSFoundationVersionNumber10_1_1 = 425.0; +const int TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = -16361; -const double NSFoundationVersionNumber10_1_2 = 425.0; +const int TLS_ECDH_anon_WITH_AES_128_CBC_SHA = -16360; -const double NSFoundationVersionNumber10_1_3 = 425.0; +const int TLS_ECDH_anon_WITH_AES_256_CBC_SHA = -16359; -const double NSFoundationVersionNumber10_1_4 = 425.0; +const int TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = -16331; -const double NSFoundationVersionNumber10_2 = 462.0; +const int TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = -16330; -const double NSFoundationVersionNumber10_2_1 = 462.0; +const int TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = -13141; -const double NSFoundationVersionNumber10_2_2 = 462.0; +const int TLS_NULL_WITH_NULL_NULL = 0; -const double NSFoundationVersionNumber10_2_3 = 462.0; +const int TLS_RSA_WITH_NULL_MD5 = 1; -const double NSFoundationVersionNumber10_2_4 = 462.0; +const int TLS_RSA_WITH_NULL_SHA = 2; -const double NSFoundationVersionNumber10_2_5 = 462.0; +const int TLS_RSA_WITH_RC4_128_MD5 = 4; -const double NSFoundationVersionNumber10_2_6 = 462.0; +const int TLS_RSA_WITH_RC4_128_SHA = 5; -const double NSFoundationVersionNumber10_2_7 = 462.7; +const int TLS_RSA_WITH_3DES_EDE_CBC_SHA = 10; -const double NSFoundationVersionNumber10_2_8 = 462.7; +const int TLS_RSA_WITH_NULL_SHA256 = 59; -const double NSFoundationVersionNumber10_3 = 500.0; +const int TLS_RSA_WITH_AES_128_CBC_SHA256 = 60; -const double NSFoundationVersionNumber10_3_1 = 500.0; +const int TLS_RSA_WITH_AES_256_CBC_SHA256 = 61; -const double NSFoundationVersionNumber10_3_2 = 500.3; +const int TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; -const double NSFoundationVersionNumber10_3_3 = 500.54; +const int TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; -const double NSFoundationVersionNumber10_3_4 = 500.56; +const int TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; -const double NSFoundationVersionNumber10_3_5 = 500.56; +const int TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; -const double NSFoundationVersionNumber10_3_6 = 500.56; +const int TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 62; -const double NSFoundationVersionNumber10_3_7 = 500.56; +const int TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 63; -const double NSFoundationVersionNumber10_3_8 = 500.56; +const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 64; -const double NSFoundationVersionNumber10_3_9 = 500.58; +const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 103; -const double NSFoundationVersionNumber10_4 = 567.0; +const int TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 104; -const double NSFoundationVersionNumber10_4_1 = 567.0; +const int TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 105; -const double NSFoundationVersionNumber10_4_2 = 567.12; +const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 106; -const double NSFoundationVersionNumber10_4_3 = 567.21; +const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 107; -const double NSFoundationVersionNumber10_4_4_Intel = 567.23; +const int TLS_DH_anon_WITH_RC4_128_MD5 = 24; -const double NSFoundationVersionNumber10_4_4_PowerPC = 567.21; +const int TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; -const double NSFoundationVersionNumber10_4_5 = 567.25; +const int TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 108; -const double NSFoundationVersionNumber10_4_6 = 567.26; +const int TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 109; -const double NSFoundationVersionNumber10_4_7 = 567.27; +const int TLS_PSK_WITH_RC4_128_SHA = 138; -const double NSFoundationVersionNumber10_4_8 = 567.28; +const int TLS_PSK_WITH_3DES_EDE_CBC_SHA = 139; -const double NSFoundationVersionNumber10_4_9 = 567.29; +const int TLS_PSK_WITH_AES_128_CBC_SHA = 140; -const double NSFoundationVersionNumber10_4_10 = 567.29; +const int TLS_PSK_WITH_AES_256_CBC_SHA = 141; -const double NSFoundationVersionNumber10_4_11 = 567.36; +const int TLS_DHE_PSK_WITH_RC4_128_SHA = 142; -const double NSFoundationVersionNumber10_5 = 677.0; +const int TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = 143; -const double NSFoundationVersionNumber10_5_1 = 677.1; +const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA = 144; -const double NSFoundationVersionNumber10_5_2 = 677.15; +const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA = 145; -const double NSFoundationVersionNumber10_5_3 = 677.19; +const int TLS_RSA_PSK_WITH_RC4_128_SHA = 146; -const double NSFoundationVersionNumber10_5_4 = 677.19; +const int TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = 147; -const double NSFoundationVersionNumber10_5_5 = 677.21; +const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA = 148; -const double NSFoundationVersionNumber10_5_6 = 677.22; +const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA = 149; -const double NSFoundationVersionNumber10_5_7 = 677.24; +const int TLS_PSK_WITH_NULL_SHA = 44; -const double NSFoundationVersionNumber10_5_8 = 677.26; +const int TLS_DHE_PSK_WITH_NULL_SHA = 45; -const double NSFoundationVersionNumber10_6 = 751.0; +const int TLS_RSA_PSK_WITH_NULL_SHA = 46; -const double NSFoundationVersionNumber10_6_1 = 751.0; +const int TLS_RSA_WITH_AES_128_GCM_SHA256 = 156; -const double NSFoundationVersionNumber10_6_2 = 751.14; +const int TLS_RSA_WITH_AES_256_GCM_SHA384 = 157; -const double NSFoundationVersionNumber10_6_3 = 751.21; +const int TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 158; -const double NSFoundationVersionNumber10_6_4 = 751.29; +const int TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 159; -const double NSFoundationVersionNumber10_6_5 = 751.42; +const int TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = 160; -const double NSFoundationVersionNumber10_6_6 = 751.53; +const int TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = 161; -const double NSFoundationVersionNumber10_6_7 = 751.53; +const int TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = 162; -const double NSFoundationVersionNumber10_6_8 = 751.62; +const int TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = 163; -const double NSFoundationVersionNumber10_7 = 833.1; +const int TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = 164; -const double NSFoundationVersionNumber10_7_1 = 833.1; +const int TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = 165; -const double NSFoundationVersionNumber10_7_2 = 833.2; +const int TLS_DH_anon_WITH_AES_128_GCM_SHA256 = 166; -const double NSFoundationVersionNumber10_7_3 = 833.24; +const int TLS_DH_anon_WITH_AES_256_GCM_SHA384 = 167; -const double NSFoundationVersionNumber10_7_4 = 833.25; +const int TLS_PSK_WITH_AES_128_GCM_SHA256 = 168; -const double NSFoundationVersionNumber10_8 = 945.0; +const int TLS_PSK_WITH_AES_256_GCM_SHA384 = 169; -const double NSFoundationVersionNumber10_8_1 = 945.0; +const int TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 170; -const double NSFoundationVersionNumber10_8_2 = 945.11; +const int TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 171; -const double NSFoundationVersionNumber10_8_3 = 945.16; +const int TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = 172; -const double NSFoundationVersionNumber10_8_4 = 945.18; +const int TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = 173; -const int NSFoundationVersionNumber10_9 = 1056; +const int TLS_PSK_WITH_AES_128_CBC_SHA256 = 174; -const int NSFoundationVersionNumber10_9_1 = 1056; +const int TLS_PSK_WITH_AES_256_CBC_SHA384 = 175; -const double NSFoundationVersionNumber10_9_2 = 1056.13; +const int TLS_PSK_WITH_NULL_SHA256 = 176; -const double NSFoundationVersionNumber10_10 = 1151.16; +const int TLS_PSK_WITH_NULL_SHA384 = 177; -const double NSFoundationVersionNumber10_10_1 = 1151.16; +const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = 178; -const double NSFoundationVersionNumber10_10_2 = 1152.14; +const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = 179; -const double NSFoundationVersionNumber10_10_3 = 1153.2; +const int TLS_DHE_PSK_WITH_NULL_SHA256 = 180; -const double NSFoundationVersionNumber10_10_4 = 1153.2; +const int TLS_DHE_PSK_WITH_NULL_SHA384 = 181; -const int NSFoundationVersionNumber10_10_5 = 1154; +const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = 182; -const int NSFoundationVersionNumber10_10_Max = 1199; +const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = 183; -const int NSFoundationVersionNumber10_11 = 1252; +const int TLS_RSA_PSK_WITH_NULL_SHA256 = 184; -const double NSFoundationVersionNumber10_11_1 = 1255.1; +const int TLS_RSA_PSK_WITH_NULL_SHA384 = 185; -const double NSFoundationVersionNumber10_11_2 = 1256.1; +const int TLS_AES_128_GCM_SHA256 = 4865; -const double NSFoundationVersionNumber10_11_3 = 1256.1; +const int TLS_AES_256_GCM_SHA384 = 4866; -const int NSFoundationVersionNumber10_11_4 = 1258; +const int TLS_CHACHA20_POLY1305_SHA256 = 4867; -const int NSFoundationVersionNumber10_11_Max = 1299; +const int TLS_AES_128_CCM_SHA256 = 4868; -const int __COREFOUNDATION_CFBASE__ = 1; +const int TLS_AES_128_CCM_8_SHA256 = 4869; -const int UNIVERSAL_INTERFACES_VERSION = 1024; +const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; -const int PRAGMA_IMPORT = 0; +const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; -const int PRAGMA_ONCE = 0; +const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = -16347; -const int PRAGMA_STRUCT_PACK = 1; +const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = -16346; -const int PRAGMA_STRUCT_PACKPUSH = 1; +const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; -const int PRAGMA_STRUCT_ALIGN = 0; +const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; -const int PRAGMA_ENUM_PACK = 0; +const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = -16343; -const int PRAGMA_ENUM_ALWAYSINT = 0; +const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = -16342; -const int PRAGMA_ENUM_OPTIONS = 0; +const int TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; -const int TYPE_EXTENDED = 0; +const int TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; -const int TYPE_LONGDOUBLE_IS_DOUBLE = 0; +const int TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = -16339; -const int TYPE_LONGLONG = 1; +const int TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = -16338; -const int FUNCTION_PASCAL = 0; +const int TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; -const int FUNCTION_DECLSPEC = 0; +const int TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; -const int FUNCTION_WIN32CC = 0; +const int TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = -16335; -const int TARGET_API_MAC_OS8 = 0; +const int TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = -16334; -const int TARGET_API_MAC_CARBON = 1; +const int TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = -13144; -const int TARGET_API_MAC_OSX = 1; +const int TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = -13143; -const int TARGET_CARBON = 1; +const int TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 255; -const int OLDROUTINENAMES = 0; +const int SSL_RSA_WITH_RC2_CBC_MD5 = -128; -const int OPAQUE_TOOLBOX_STRUCTS = 1; +const int SSL_RSA_WITH_IDEA_CBC_MD5 = -127; -const int OPAQUE_UPP_TYPES = 1; +const int SSL_RSA_WITH_DES_CBC_MD5 = -126; -const int ACCESSOR_CALLS_ARE_FUNCTIONS = 1; +const int SSL_RSA_WITH_3DES_EDE_CBC_MD5 = -125; -const int CALL_NOT_IN_CARBON = 0; +const int SSL_NO_SUCH_CIPHERSUITE = -1; -const int MIXEDMODE_CALLS_ARE_FUNCTIONS = 1; +const int NSASCIIStringEncoding = 1; -const int ALLOW_OBSOLETE_CARBON_MACMEMORY = 0; +const int NSNEXTSTEPStringEncoding = 2; -const int ALLOW_OBSOLETE_CARBON_OSUTILS = 0; +const int NSJapaneseEUCStringEncoding = 3; -const int NULL = 0; +const int NSUTF8StringEncoding = 4; -const int kInvalidID = 0; +const int NSISOLatin1StringEncoding = 5; -const int TRUE = 1; +const int NSSymbolStringEncoding = 6; -const int FALSE = 0; +const int NSNonLossyASCIIStringEncoding = 7; -const double kCFCoreFoundationVersionNumber10_0 = 196.4; +const int NSShiftJISStringEncoding = 8; -const double kCFCoreFoundationVersionNumber10_0_3 = 196.5; +const int NSISOLatin2StringEncoding = 9; -const double kCFCoreFoundationVersionNumber10_1 = 226.0; +const int NSUnicodeStringEncoding = 10; -const double kCFCoreFoundationVersionNumber10_1_1 = 226.0; +const int NSWindowsCP1251StringEncoding = 11; -const double kCFCoreFoundationVersionNumber10_1_2 = 227.2; +const int NSWindowsCP1252StringEncoding = 12; -const double kCFCoreFoundationVersionNumber10_1_3 = 227.2; +const int NSWindowsCP1253StringEncoding = 13; -const double kCFCoreFoundationVersionNumber10_1_4 = 227.3; +const int NSWindowsCP1254StringEncoding = 14; -const double kCFCoreFoundationVersionNumber10_2 = 263.0; +const int NSWindowsCP1250StringEncoding = 15; -const double kCFCoreFoundationVersionNumber10_2_1 = 263.1; +const int NSISO2022JPStringEncoding = 21; -const double kCFCoreFoundationVersionNumber10_2_2 = 263.1; +const int NSMacOSRomanStringEncoding = 30; -const double kCFCoreFoundationVersionNumber10_2_3 = 263.3; +const int NSUTF16StringEncoding = 10; -const double kCFCoreFoundationVersionNumber10_2_4 = 263.3; +const int NSUTF16BigEndianStringEncoding = 2415919360; -const double kCFCoreFoundationVersionNumber10_2_5 = 263.5; +const int NSUTF16LittleEndianStringEncoding = 2483028224; -const double kCFCoreFoundationVersionNumber10_2_6 = 263.5; +const int NSUTF32StringEncoding = 2348810496; -const double kCFCoreFoundationVersionNumber10_2_7 = 263.5; +const int NSUTF32BigEndianStringEncoding = 2550137088; -const double kCFCoreFoundationVersionNumber10_2_8 = 263.5; +const int NSUTF32LittleEndianStringEncoding = 2617245952; -const double kCFCoreFoundationVersionNumber10_3 = 299.0; +const int NSProprietaryStringEncoding = 65536; -const double kCFCoreFoundationVersionNumber10_3_1 = 299.0; +const int NSOpenStepUnicodeReservedBase = 62464; -const double kCFCoreFoundationVersionNumber10_3_2 = 299.0; +const int kNativeArgNumberPos = 0; -const double kCFCoreFoundationVersionNumber10_3_3 = 299.3; +const int kNativeArgNumberSize = 8; -const double kCFCoreFoundationVersionNumber10_3_4 = 299.31; +const int kNativeArgTypePos = 8; -const double kCFCoreFoundationVersionNumber10_3_5 = 299.31; +const int kNativeArgTypeSize = 8; -const double kCFCoreFoundationVersionNumber10_3_6 = 299.32; +const int DYNAMIC_TARGETS_ENABLED = 0; -const double kCFCoreFoundationVersionNumber10_3_7 = 299.33; +const int TARGET_OS_MAC = 1; -const double kCFCoreFoundationVersionNumber10_3_8 = 299.33; +const int TARGET_OS_WIN32 = 0; -const double kCFCoreFoundationVersionNumber10_3_9 = 299.35; +const int TARGET_OS_WINDOWS = 0; -const double kCFCoreFoundationVersionNumber10_4 = 368.0; +const int TARGET_OS_UNIX = 0; -const double kCFCoreFoundationVersionNumber10_4_1 = 368.1; +const int TARGET_OS_LINUX = 0; -const double kCFCoreFoundationVersionNumber10_4_2 = 368.11; +const int TARGET_OS_OSX = 1; -const double kCFCoreFoundationVersionNumber10_4_3 = 368.18; +const int TARGET_OS_IPHONE = 0; -const double kCFCoreFoundationVersionNumber10_4_4_Intel = 368.26; +const int TARGET_OS_IOS = 0; -const double kCFCoreFoundationVersionNumber10_4_4_PowerPC = 368.25; +const int TARGET_OS_WATCH = 0; -const double kCFCoreFoundationVersionNumber10_4_5_Intel = 368.26; +const int TARGET_OS_TV = 0; -const double kCFCoreFoundationVersionNumber10_4_5_PowerPC = 368.25; +const int TARGET_OS_MACCATALYST = 0; -const double kCFCoreFoundationVersionNumber10_4_6_Intel = 368.26; +const int TARGET_OS_UIKITFORMAC = 0; -const double kCFCoreFoundationVersionNumber10_4_6_PowerPC = 368.25; +const int TARGET_OS_SIMULATOR = 0; -const double kCFCoreFoundationVersionNumber10_4_7 = 368.27; +const int TARGET_OS_EMBEDDED = 0; -const double kCFCoreFoundationVersionNumber10_4_8 = 368.27; +const int TARGET_OS_RTKIT = 0; -const double kCFCoreFoundationVersionNumber10_4_9 = 368.28; +const int TARGET_OS_DRIVERKIT = 0; -const double kCFCoreFoundationVersionNumber10_4_10 = 368.28; +const int TARGET_IPHONE_SIMULATOR = 0; -const double kCFCoreFoundationVersionNumber10_4_11 = 368.31; +const int TARGET_OS_NANO = 0; -const double kCFCoreFoundationVersionNumber10_5 = 476.0; +const int TARGET_ABI_USES_IOS_VALUES = 1; -const double kCFCoreFoundationVersionNumber10_5_1 = 476.0; +const int TARGET_CPU_PPC = 0; -const double kCFCoreFoundationVersionNumber10_5_2 = 476.1; +const int TARGET_CPU_PPC64 = 0; -const double kCFCoreFoundationVersionNumber10_5_3 = 476.13; +const int TARGET_CPU_68K = 0; -const double kCFCoreFoundationVersionNumber10_5_4 = 476.14; +const int TARGET_CPU_X86 = 0; -const double kCFCoreFoundationVersionNumber10_5_5 = 476.15; +const int TARGET_CPU_X86_64 = 0; -const double kCFCoreFoundationVersionNumber10_5_6 = 476.17; +const int TARGET_CPU_ARM = 0; -const double kCFCoreFoundationVersionNumber10_5_7 = 476.18; +const int TARGET_CPU_ARM64 = 1; -const double kCFCoreFoundationVersionNumber10_5_8 = 476.19; +const int TARGET_CPU_MIPS = 0; -const double kCFCoreFoundationVersionNumber10_6 = 550.0; +const int TARGET_CPU_SPARC = 0; -const double kCFCoreFoundationVersionNumber10_6_1 = 550.0; +const int TARGET_CPU_ALPHA = 0; -const double kCFCoreFoundationVersionNumber10_6_2 = 550.13; +const int TARGET_RT_MAC_CFM = 0; -const double kCFCoreFoundationVersionNumber10_6_3 = 550.19; +const int TARGET_RT_MAC_MACHO = 1; -const double kCFCoreFoundationVersionNumber10_6_4 = 550.29; +const int TARGET_RT_LITTLE_ENDIAN = 1; -const double kCFCoreFoundationVersionNumber10_6_5 = 550.42; +const int TARGET_RT_BIG_ENDIAN = 0; -const double kCFCoreFoundationVersionNumber10_6_6 = 550.42; +const int TARGET_RT_64_BIT = 1; -const double kCFCoreFoundationVersionNumber10_6_7 = 550.42; +const int __API_TO_BE_DEPRECATED = 100000; -const double kCFCoreFoundationVersionNumber10_6_8 = 550.43; +const int __API_TO_BE_DEPRECATED_MACOS = 100000; -const double kCFCoreFoundationVersionNumber10_7 = 635.0; +const int __API_TO_BE_DEPRECATED_IOS = 100000; -const double kCFCoreFoundationVersionNumber10_7_1 = 635.0; +const int __API_TO_BE_DEPRECATED_TVOS = 100000; -const double kCFCoreFoundationVersionNumber10_7_2 = 635.15; +const int __API_TO_BE_DEPRECATED_WATCHOS = 100000; -const double kCFCoreFoundationVersionNumber10_7_3 = 635.19; +const int __API_TO_BE_DEPRECATED_MACCATALYST = 100000; -const double kCFCoreFoundationVersionNumber10_7_4 = 635.21; +const int __API_TO_BE_DEPRECATED_DRIVERKIT = 100000; -const double kCFCoreFoundationVersionNumber10_7_5 = 635.21; +const int __MAC_10_0 = 1000; -const double kCFCoreFoundationVersionNumber10_8 = 744.0; +const int __MAC_10_1 = 1010; -const double kCFCoreFoundationVersionNumber10_8_1 = 744.0; +const int __MAC_10_2 = 1020; -const double kCFCoreFoundationVersionNumber10_8_2 = 744.12; +const int __MAC_10_3 = 1030; -const double kCFCoreFoundationVersionNumber10_8_3 = 744.18; +const int __MAC_10_4 = 1040; -const double kCFCoreFoundationVersionNumber10_8_4 = 744.19; +const int __MAC_10_5 = 1050; -const double kCFCoreFoundationVersionNumber10_9 = 855.11; +const int __MAC_10_6 = 1060; -const double kCFCoreFoundationVersionNumber10_9_1 = 855.11; +const int __MAC_10_7 = 1070; -const double kCFCoreFoundationVersionNumber10_9_2 = 855.14; +const int __MAC_10_8 = 1080; -const double kCFCoreFoundationVersionNumber10_10 = 1151.16; +const int __MAC_10_9 = 1090; -const double kCFCoreFoundationVersionNumber10_10_1 = 1151.16; +const int __MAC_10_10 = 101000; -const int kCFCoreFoundationVersionNumber10_10_2 = 1152; +const int __MAC_10_10_2 = 101002; -const double kCFCoreFoundationVersionNumber10_10_3 = 1153.18; +const int __MAC_10_10_3 = 101003; -const double kCFCoreFoundationVersionNumber10_10_4 = 1153.18; +const int __MAC_10_11 = 101100; -const double kCFCoreFoundationVersionNumber10_10_5 = 1153.18; +const int __MAC_10_11_2 = 101102; -const int kCFCoreFoundationVersionNumber10_10_Max = 1199; +const int __MAC_10_11_3 = 101103; -const int kCFCoreFoundationVersionNumber10_11 = 1253; +const int __MAC_10_11_4 = 101104; -const double kCFCoreFoundationVersionNumber10_11_1 = 1255.1; +const int __MAC_10_12 = 101200; -const double kCFCoreFoundationVersionNumber10_11_2 = 1256.14; +const int __MAC_10_12_1 = 101201; -const double kCFCoreFoundationVersionNumber10_11_3 = 1256.14; +const int __MAC_10_12_2 = 101202; -const double kCFCoreFoundationVersionNumber10_11_4 = 1258.1; +const int __MAC_10_12_4 = 101204; -const int kCFCoreFoundationVersionNumber10_11_Max = 1299; +const int __MAC_10_13 = 101300; -const int ISA_PTRAUTH_DISCRIMINATOR = 27361; +const int __MAC_10_13_1 = 101301; -const double NSTimeIntervalSince1970 = 978307200.0; +const int __MAC_10_13_2 = 101302; -const int __COREFOUNDATION_CFARRAY__ = 1; +const int __MAC_10_13_4 = 101304; -const int OS_OBJECT_HAVE_OBJC_SUPPORT = 0; +const int __MAC_10_14 = 101400; -const int OS_OBJECT_USE_OBJC = 0; +const int __MAC_10_14_1 = 101401; -const int OS_OBJECT_SWIFT3 = 0; +const int __MAC_10_14_4 = 101404; -const int OS_OBJECT_USE_OBJC_RETAIN_RELEASE = 0; +const int __MAC_10_14_6 = 101406; -const int SEC_OS_IPHONE = 0; +const int __MAC_10_15 = 101500; -const int SEC_OS_OSX = 1; +const int __MAC_10_15_1 = 101501; -const int SEC_OS_OSX_INCLUDES = 1; +const int __MAC_10_15_4 = 101504; -const int SECURITY_TYPE_UNIFICATION = 1; +const int __MAC_10_16 = 101600; -const int __COREFOUNDATION_COREFOUNDATION__ = 1; +const int __MAC_11_0 = 110000; -const int __COREFOUNDATION__ = 1; +const int __MAC_11_1 = 110100; -const String __ASSERT_FILE_NAME = 'temp_for_macros.hpp'; +const int __MAC_11_3 = 110300; -const int __DARWIN_WCHAR_MAX = 2147483647; +const int __MAC_11_4 = 110400; -const int __DARWIN_WCHAR_MIN = -2147483648; +const int __MAC_11_5 = 110500; -const int _FORTIFY_SOURCE = 2; +const int __MAC_11_6 = 110600; -const int _CACHED_RUNES = 256; +const int __MAC_12_0 = 120000; -const int _CRMASK = -256; +const int __MAC_12_1 = 120100; -const String _RUNE_MAGIC_A = 'RuneMagA'; +const int __MAC_12_2 = 120200; -const int _CTYPE_A = 256; +const int __MAC_12_3 = 120300; -const int _CTYPE_C = 512; +const int __MAC_13_0 = 130000; -const int _CTYPE_D = 1024; +const int __MAC_13_1 = 130100; -const int _CTYPE_G = 2048; +const int __MAC_13_2 = 130200; -const int _CTYPE_L = 4096; +const int __MAC_13_3 = 130300; -const int _CTYPE_P = 8192; +const int __IPHONE_2_0 = 20000; -const int _CTYPE_S = 16384; +const int __IPHONE_2_1 = 20100; -const int _CTYPE_U = 32768; +const int __IPHONE_2_2 = 20200; -const int _CTYPE_X = 65536; +const int __IPHONE_3_0 = 30000; -const int _CTYPE_B = 131072; +const int __IPHONE_3_1 = 30100; -const int _CTYPE_R = 262144; +const int __IPHONE_3_2 = 30200; -const int _CTYPE_I = 524288; +const int __IPHONE_4_0 = 40000; -const int _CTYPE_T = 1048576; +const int __IPHONE_4_1 = 40100; -const int _CTYPE_Q = 2097152; +const int __IPHONE_4_2 = 40200; -const int _CTYPE_SW0 = 536870912; +const int __IPHONE_4_3 = 40300; -const int _CTYPE_SW1 = 1073741824; +const int __IPHONE_5_0 = 50000; -const int _CTYPE_SW2 = 2147483648; +const int __IPHONE_5_1 = 50100; -const int _CTYPE_SW3 = 3221225472; +const int __IPHONE_6_0 = 60000; -const int _CTYPE_SWM = 3758096384; +const int __IPHONE_6_1 = 60100; -const int _CTYPE_SWS = 30; +const int __IPHONE_7_0 = 70000; -const int EPERM = 1; +const int __IPHONE_7_1 = 70100; -const int ENOENT = 2; +const int __IPHONE_8_0 = 80000; -const int ESRCH = 3; +const int __IPHONE_8_1 = 80100; -const int EINTR = 4; +const int __IPHONE_8_2 = 80200; -const int EIO = 5; +const int __IPHONE_8_3 = 80300; -const int ENXIO = 6; +const int __IPHONE_8_4 = 80400; -const int E2BIG = 7; +const int __IPHONE_9_0 = 90000; -const int ENOEXEC = 8; +const int __IPHONE_9_1 = 90100; -const int EBADF = 9; +const int __IPHONE_9_2 = 90200; -const int ECHILD = 10; +const int __IPHONE_9_3 = 90300; -const int EDEADLK = 11; +const int __IPHONE_10_0 = 100000; -const int ENOMEM = 12; +const int __IPHONE_10_1 = 100100; -const int EACCES = 13; +const int __IPHONE_10_2 = 100200; -const int EFAULT = 14; +const int __IPHONE_10_3 = 100300; -const int ENOTBLK = 15; +const int __IPHONE_11_0 = 110000; -const int EBUSY = 16; +const int __IPHONE_11_1 = 110100; -const int EEXIST = 17; +const int __IPHONE_11_2 = 110200; -const int EXDEV = 18; +const int __IPHONE_11_3 = 110300; -const int ENODEV = 19; +const int __IPHONE_11_4 = 110400; -const int ENOTDIR = 20; +const int __IPHONE_12_0 = 120000; -const int EISDIR = 21; +const int __IPHONE_12_1 = 120100; -const int EINVAL = 22; +const int __IPHONE_12_2 = 120200; -const int ENFILE = 23; +const int __IPHONE_12_3 = 120300; -const int EMFILE = 24; +const int __IPHONE_12_4 = 120400; -const int ENOTTY = 25; +const int __IPHONE_13_0 = 130000; -const int ETXTBSY = 26; +const int __IPHONE_13_1 = 130100; -const int EFBIG = 27; +const int __IPHONE_13_2 = 130200; -const int ENOSPC = 28; +const int __IPHONE_13_3 = 130300; -const int ESPIPE = 29; +const int __IPHONE_13_4 = 130400; -const int EROFS = 30; +const int __IPHONE_13_5 = 130500; -const int EMLINK = 31; +const int __IPHONE_13_6 = 130600; -const int EPIPE = 32; +const int __IPHONE_13_7 = 130700; -const int EDOM = 33; +const int __IPHONE_14_0 = 140000; -const int ERANGE = 34; +const int __IPHONE_14_1 = 140100; -const int EAGAIN = 35; +const int __IPHONE_14_2 = 140200; -const int EWOULDBLOCK = 35; +const int __IPHONE_14_3 = 140300; -const int EINPROGRESS = 36; +const int __IPHONE_14_5 = 140500; -const int EALREADY = 37; +const int __IPHONE_14_6 = 140600; -const int ENOTSOCK = 38; +const int __IPHONE_14_7 = 140700; -const int EDESTADDRREQ = 39; +const int __IPHONE_14_8 = 140800; -const int EMSGSIZE = 40; +const int __IPHONE_15_0 = 150000; -const int EPROTOTYPE = 41; +const int __IPHONE_15_1 = 150100; -const int ENOPROTOOPT = 42; +const int __IPHONE_15_2 = 150200; -const int EPROTONOSUPPORT = 43; +const int __IPHONE_15_3 = 150300; -const int ESOCKTNOSUPPORT = 44; +const int __IPHONE_15_4 = 150400; -const int ENOTSUP = 45; +const int __IPHONE_16_0 = 160000; -const int EPFNOSUPPORT = 46; +const int __IPHONE_16_1 = 160100; -const int EAFNOSUPPORT = 47; +const int __IPHONE_16_2 = 160200; -const int EADDRINUSE = 48; +const int __IPHONE_16_3 = 160300; -const int EADDRNOTAVAIL = 49; +const int __IPHONE_16_4 = 160400; -const int ENETDOWN = 50; +const int __TVOS_9_0 = 90000; -const int ENETUNREACH = 51; +const int __TVOS_9_1 = 90100; -const int ENETRESET = 52; +const int __TVOS_9_2 = 90200; -const int ECONNABORTED = 53; +const int __TVOS_10_0 = 100000; -const int ECONNRESET = 54; +const int __TVOS_10_0_1 = 100001; -const int ENOBUFS = 55; +const int __TVOS_10_1 = 100100; -const int EISCONN = 56; +const int __TVOS_10_2 = 100200; -const int ENOTCONN = 57; +const int __TVOS_11_0 = 110000; -const int ESHUTDOWN = 58; +const int __TVOS_11_1 = 110100; -const int ETOOMANYREFS = 59; +const int __TVOS_11_2 = 110200; -const int ETIMEDOUT = 60; +const int __TVOS_11_3 = 110300; -const int ECONNREFUSED = 61; +const int __TVOS_11_4 = 110400; -const int ELOOP = 62; +const int __TVOS_12_0 = 120000; -const int ENAMETOOLONG = 63; +const int __TVOS_12_1 = 120100; -const int EHOSTDOWN = 64; +const int __TVOS_12_2 = 120200; -const int EHOSTUNREACH = 65; +const int __TVOS_12_3 = 120300; -const int ENOTEMPTY = 66; +const int __TVOS_12_4 = 120400; -const int EPROCLIM = 67; +const int __TVOS_13_0 = 130000; -const int EUSERS = 68; +const int __TVOS_13_2 = 130200; -const int EDQUOT = 69; +const int __TVOS_13_3 = 130300; -const int ESTALE = 70; +const int __TVOS_13_4 = 130400; -const int EREMOTE = 71; +const int __TVOS_14_0 = 140000; -const int EBADRPC = 72; +const int __TVOS_14_1 = 140100; -const int ERPCMISMATCH = 73; +const int __TVOS_14_2 = 140200; -const int EPROGUNAVAIL = 74; +const int __TVOS_14_3 = 140300; -const int EPROGMISMATCH = 75; +const int __TVOS_14_5 = 140500; -const int EPROCUNAVAIL = 76; +const int __TVOS_14_6 = 140600; -const int ENOLCK = 77; +const int __TVOS_14_7 = 140700; -const int ENOSYS = 78; +const int __TVOS_15_0 = 150000; -const int EFTYPE = 79; +const int __TVOS_15_1 = 150100; -const int EAUTH = 80; +const int __TVOS_15_2 = 150200; -const int ENEEDAUTH = 81; +const int __TVOS_15_3 = 150300; -const int EPWROFF = 82; +const int __TVOS_15_4 = 150400; -const int EDEVERR = 83; +const int __TVOS_16_0 = 160000; -const int EOVERFLOW = 84; +const int __TVOS_16_1 = 160100; -const int EBADEXEC = 85; +const int __TVOS_16_2 = 160200; -const int EBADARCH = 86; +const int __TVOS_16_3 = 160300; -const int ESHLIBVERS = 87; +const int __TVOS_16_4 = 160400; -const int EBADMACHO = 88; +const int __WATCHOS_1_0 = 10000; -const int ECANCELED = 89; +const int __WATCHOS_2_0 = 20000; -const int EIDRM = 90; +const int __WATCHOS_2_1 = 20100; -const int ENOMSG = 91; +const int __WATCHOS_2_2 = 20200; -const int EILSEQ = 92; +const int __WATCHOS_3_0 = 30000; -const int ENOATTR = 93; +const int __WATCHOS_3_1 = 30100; -const int EBADMSG = 94; +const int __WATCHOS_3_1_1 = 30101; -const int EMULTIHOP = 95; +const int __WATCHOS_3_2 = 30200; -const int ENODATA = 96; +const int __WATCHOS_4_0 = 40000; -const int ENOLINK = 97; +const int __WATCHOS_4_1 = 40100; -const int ENOSR = 98; +const int __WATCHOS_4_2 = 40200; -const int ENOSTR = 99; +const int __WATCHOS_4_3 = 40300; -const int EPROTO = 100; +const int __WATCHOS_5_0 = 50000; -const int ETIME = 101; +const int __WATCHOS_5_1 = 50100; -const int EOPNOTSUPP = 102; +const int __WATCHOS_5_2 = 50200; -const int ENOPOLICY = 103; +const int __WATCHOS_5_3 = 50300; -const int ENOTRECOVERABLE = 104; +const int __WATCHOS_6_0 = 60000; -const int EOWNERDEAD = 105; +const int __WATCHOS_6_1 = 60100; -const int EQFULL = 106; +const int __WATCHOS_6_2 = 60200; -const int ELAST = 106; +const int __WATCHOS_7_0 = 70000; -const int FLT_EVAL_METHOD = 0; +const int __WATCHOS_7_1 = 70100; -const int FLT_RADIX = 2; +const int __WATCHOS_7_2 = 70200; -const int FLT_MANT_DIG = 24; +const int __WATCHOS_7_3 = 70300; -const int DBL_MANT_DIG = 53; +const int __WATCHOS_7_4 = 70400; -const int LDBL_MANT_DIG = 53; +const int __WATCHOS_7_5 = 70500; -const int FLT_DIG = 6; +const int __WATCHOS_7_6 = 70600; -const int DBL_DIG = 15; +const int __WATCHOS_8_0 = 80000; -const int LDBL_DIG = 15; +const int __WATCHOS_8_1 = 80100; -const int FLT_MIN_EXP = -125; +const int __WATCHOS_8_3 = 80300; -const int DBL_MIN_EXP = -1021; +const int __WATCHOS_8_4 = 80400; -const int LDBL_MIN_EXP = -1021; +const int __WATCHOS_8_5 = 80500; -const int FLT_MIN_10_EXP = -37; +const int __WATCHOS_9_0 = 90000; -const int DBL_MIN_10_EXP = -307; +const int __WATCHOS_9_1 = 90100; -const int LDBL_MIN_10_EXP = -307; +const int __WATCHOS_9_2 = 90200; -const int FLT_MAX_EXP = 128; +const int __WATCHOS_9_3 = 90300; -const int DBL_MAX_EXP = 1024; +const int __WATCHOS_9_4 = 90400; -const int LDBL_MAX_EXP = 1024; +const int MAC_OS_X_VERSION_10_0 = 1000; -const int FLT_MAX_10_EXP = 38; +const int MAC_OS_X_VERSION_10_1 = 1010; -const int DBL_MAX_10_EXP = 308; +const int MAC_OS_X_VERSION_10_2 = 1020; -const int LDBL_MAX_10_EXP = 308; +const int MAC_OS_X_VERSION_10_3 = 1030; -const double FLT_MAX = 3.4028234663852886e+38; +const int MAC_OS_X_VERSION_10_4 = 1040; -const double DBL_MAX = 1.7976931348623157e+308; +const int MAC_OS_X_VERSION_10_5 = 1050; -const double LDBL_MAX = 1.7976931348623157e+308; +const int MAC_OS_X_VERSION_10_6 = 1060; -const double FLT_EPSILON = 1.1920928955078125e-7; +const int MAC_OS_X_VERSION_10_7 = 1070; -const double DBL_EPSILON = 2.220446049250313e-16; +const int MAC_OS_X_VERSION_10_8 = 1080; -const double LDBL_EPSILON = 2.220446049250313e-16; +const int MAC_OS_X_VERSION_10_9 = 1090; -const double FLT_MIN = 1.1754943508222875e-38; +const int MAC_OS_X_VERSION_10_10 = 101000; -const double DBL_MIN = 2.2250738585072014e-308; +const int MAC_OS_X_VERSION_10_10_2 = 101002; -const double LDBL_MIN = 2.2250738585072014e-308; +const int MAC_OS_X_VERSION_10_10_3 = 101003; -const int DECIMAL_DIG = 17; +const int MAC_OS_X_VERSION_10_11 = 101100; -const int FLT_HAS_SUBNORM = 1; +const int MAC_OS_X_VERSION_10_11_2 = 101102; -const int DBL_HAS_SUBNORM = 1; +const int MAC_OS_X_VERSION_10_11_3 = 101103; -const int LDBL_HAS_SUBNORM = 1; +const int MAC_OS_X_VERSION_10_11_4 = 101104; -const double FLT_TRUE_MIN = 1.401298464324817e-45; +const int MAC_OS_X_VERSION_10_12 = 101200; -const double DBL_TRUE_MIN = 5e-324; +const int MAC_OS_X_VERSION_10_12_1 = 101201; -const double LDBL_TRUE_MIN = 5e-324; +const int MAC_OS_X_VERSION_10_12_2 = 101202; -const int FLT_DECIMAL_DIG = 9; +const int MAC_OS_X_VERSION_10_12_4 = 101204; -const int DBL_DECIMAL_DIG = 17; +const int MAC_OS_X_VERSION_10_13 = 101300; -const int LDBL_DECIMAL_DIG = 17; +const int MAC_OS_X_VERSION_10_13_1 = 101301; -const int LC_ALL = 0; +const int MAC_OS_X_VERSION_10_13_2 = 101302; -const int LC_COLLATE = 1; +const int MAC_OS_X_VERSION_10_13_4 = 101304; -const int LC_CTYPE = 2; +const int MAC_OS_X_VERSION_10_14 = 101400; -const int LC_MONETARY = 3; +const int MAC_OS_X_VERSION_10_14_1 = 101401; -const int LC_NUMERIC = 4; +const int MAC_OS_X_VERSION_10_14_4 = 101404; -const int LC_TIME = 5; +const int MAC_OS_X_VERSION_10_14_6 = 101406; -const int LC_MESSAGES = 6; +const int MAC_OS_X_VERSION_10_15 = 101500; -const int _LC_LAST = 7; +const int MAC_OS_X_VERSION_10_15_1 = 101501; -const double HUGE_VAL = double.infinity; +const int MAC_OS_X_VERSION_10_16 = 101600; -const double HUGE_VALF = double.infinity; +const int MAC_OS_VERSION_11_0 = 110000; -const double HUGE_VALL = double.infinity; +const int MAC_OS_VERSION_12_0 = 120000; -const double NAN = double.nan; +const int MAC_OS_VERSION_13_0 = 130000; -const double INFINITY = double.infinity; +const int __DRIVERKIT_19_0 = 190000; -const int FP_NAN = 1; +const int __DRIVERKIT_20_0 = 200000; -const int FP_INFINITE = 2; +const int __DRIVERKIT_21_0 = 210000; -const int FP_ZERO = 3; +const int __MAC_OS_X_VERSION_MIN_REQUIRED = 130000; -const int FP_NORMAL = 4; +const int __MAC_OS_X_VERSION_MAX_ALLOWED = 130300; -const int FP_SUBNORMAL = 5; +const int __ENABLE_LEGACY_MAC_AVAILABILITY = 1; -const int FP_SUPERNORMAL = 6; +const int __DARWIN_ONLY_64_BIT_INO_T = 1; -const int FP_FAST_FMA = 1; +const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; -const int FP_FAST_FMAF = 1; +const int __DARWIN_ONLY_VERS_1050 = 1; -const int FP_FAST_FMAL = 1; +const int __DARWIN_UNIX03 = 1; -const int FP_ILOGB0 = -2147483648; +const int __DARWIN_64_BIT_INO_T = 1; -const int FP_ILOGBNAN = -2147483648; +const int __DARWIN_VERS_1050 = 1; -const int MATH_ERRNO = 1; +const int __DARWIN_NON_CANCELABLE = 0; -const int MATH_ERREXCEPT = 2; +const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN'; -const double M_E = 2.718281828459045; +const int __DARWIN_C_ANSI = 4096; -const double M_LOG2E = 1.4426950408889634; +const int __DARWIN_C_FULL = 900000; -const double M_LOG10E = 0.4342944819032518; +const int __DARWIN_C_LEVEL = 900000; -const double M_LN2 = 0.6931471805599453; +const int __STDC_WANT_LIB_EXT1__ = 1; -const double M_LN10 = 2.302585092994046; +const int __DARWIN_NO_LONG_LONG = 0; -const double M_PI = 3.141592653589793; +const int _DARWIN_FEATURE_64_BIT_INODE = 1; -const double M_PI_2 = 1.5707963267948966; +const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1; -const double M_PI_4 = 0.7853981633974483; +const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1; -const double M_1_PI = 0.3183098861837907; +const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1; -const double M_2_PI = 0.6366197723675814; +const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3; -const double M_2_SQRTPI = 1.1283791670955126; +const int __has_ptrcheck = 0; -const double M_SQRT2 = 1.4142135623730951; +const int __DARWIN_NULL = 0; -const double M_SQRT1_2 = 0.7071067811865476; +const int __PTHREAD_SIZE__ = 8176; -const double MAXFLOAT = 3.4028234663852886e+38; +const int __PTHREAD_ATTR_SIZE__ = 56; -const int FP_SNAN = 1; +const int __PTHREAD_MUTEXATTR_SIZE__ = 8; -const int FP_QNAN = 1; +const int __PTHREAD_MUTEX_SIZE__ = 56; -const double HUGE = 3.4028234663852886e+38; +const int __PTHREAD_CONDATTR_SIZE__ = 8; -const double X_TLOSS = 14148475504056880.0; +const int __PTHREAD_COND_SIZE__ = 40; -const int DOMAIN = 1; +const int __PTHREAD_ONCE_SIZE__ = 8; -const int SING = 2; +const int __PTHREAD_RWLOCK_SIZE__ = 192; -const int OVERFLOW = 3; +const int __PTHREAD_RWLOCKATTR_SIZE__ = 16; -const int UNDERFLOW = 4; +const int __DARWIN_WCHAR_MAX = 2147483647; -const int TLOSS = 5; +const int __DARWIN_WCHAR_MIN = -2147483648; -const int PLOSS = 6; +const int __DARWIN_WEOF = -1; -const int _JBLEN = 48; +const int _FORTIFY_SOURCE = 2; const int __DARWIN_NSIG = 32; @@ -89964,6 +89634,8 @@ const int SIGUSR1 = 30; const int SIGUSR2 = 31; +const int USER_ADDR_NULL = 0; + const int __DARWIN_OPAQUE_ARM_THREAD_STATE64 = 0; const int SIGEV_NONE = 0; @@ -90108,75 +89780,111 @@ const int SV_NOCLDSTOP = 8; const int SV_SIGINFO = 64; -const int RENAME_SECLUDE = 1; +const int __WORDSIZE = 64; + +const int INT8_MAX = 127; + +const int INT16_MAX = 32767; -const int RENAME_SWAP = 2; +const int INT32_MAX = 2147483647; -const int RENAME_EXCL = 4; +const int INT64_MAX = 9223372036854775807; -const int RENAME_RESERVED1 = 8; +const int INT8_MIN = -128; -const int RENAME_NOFOLLOW_ANY = 16; +const int INT16_MIN = -32768; -const int __SLBF = 1; +const int INT32_MIN = -2147483648; -const int __SNBF = 2; +const int INT64_MIN = -9223372036854775808; -const int __SRD = 4; +const int UINT8_MAX = 255; -const int __SWR = 8; +const int UINT16_MAX = 65535; -const int __SRW = 16; +const int UINT32_MAX = 4294967295; -const int __SEOF = 32; +const int UINT64_MAX = -1; -const int __SERR = 64; +const int INT_LEAST8_MIN = -128; -const int __SMBF = 128; +const int INT_LEAST16_MIN = -32768; -const int __SAPP = 256; +const int INT_LEAST32_MIN = -2147483648; -const int __SSTR = 512; +const int INT_LEAST64_MIN = -9223372036854775808; -const int __SOPT = 1024; +const int INT_LEAST8_MAX = 127; -const int __SNPT = 2048; +const int INT_LEAST16_MAX = 32767; -const int __SOFF = 4096; +const int INT_LEAST32_MAX = 2147483647; -const int __SMOD = 8192; +const int INT_LEAST64_MAX = 9223372036854775807; -const int __SALC = 16384; +const int UINT_LEAST8_MAX = 255; -const int __SIGN = 32768; +const int UINT_LEAST16_MAX = 65535; -const int _IOFBF = 0; +const int UINT_LEAST32_MAX = 4294967295; -const int _IOLBF = 1; +const int UINT_LEAST64_MAX = -1; -const int _IONBF = 2; +const int INT_FAST8_MIN = -128; -const int BUFSIZ = 1024; +const int INT_FAST16_MIN = -32768; -const int EOF = -1; +const int INT_FAST32_MIN = -2147483648; -const int FOPEN_MAX = 20; +const int INT_FAST64_MIN = -9223372036854775808; -const int FILENAME_MAX = 1024; +const int INT_FAST8_MAX = 127; -const String P_tmpdir = '/var/tmp/'; +const int INT_FAST16_MAX = 32767; -const int L_tmpnam = 1024; +const int INT_FAST32_MAX = 2147483647; -const int TMP_MAX = 308915776; +const int INT_FAST64_MAX = 9223372036854775807; -const int SEEK_SET = 0; +const int UINT_FAST8_MAX = 255; -const int SEEK_CUR = 1; +const int UINT_FAST16_MAX = 65535; -const int SEEK_END = 2; +const int UINT_FAST32_MAX = 4294967295; -const int L_ctermid = 1024; +const int UINT_FAST64_MAX = -1; + +const int INTPTR_MAX = 9223372036854775807; + +const int INTPTR_MIN = -9223372036854775808; + +const int UINTPTR_MAX = -1; + +const int INTMAX_MAX = 9223372036854775807; + +const int UINTMAX_MAX = -1; + +const int INTMAX_MIN = -9223372036854775808; + +const int PTRDIFF_MIN = -9223372036854775808; + +const int PTRDIFF_MAX = 9223372036854775807; + +const int SIZE_MAX = -1; + +const int RSIZE_MAX = 9223372036854775807; + +const int WCHAR_MAX = 2147483647; + +const int WCHAR_MIN = -2147483648; + +const int WINT_MIN = -2147483648; + +const int WINT_MAX = 2147483647; + +const int SIG_ATOMIC_MIN = -2147483648; + +const int SIG_ATOMIC_MAX = 2147483647; const int PRIO_PROCESS = 0; @@ -90212,10 +89920,18 @@ const int RUSAGE_INFO_V4 = 4; const int RUSAGE_INFO_V5 = 5; -const int RUSAGE_INFO_CURRENT = 5; +const int RUSAGE_INFO_V6 = 6; + +const int RUSAGE_INFO_CURRENT = 6; const int RU_PROC_RUNS_RESLIDE = 1; +const int RLIM_INFINITY = 9223372036854775807; + +const int RLIM_SAVED_MAX = 9223372036854775807; + +const int RLIM_SAVED_CUR = 9223372036854775807; + const int RLIMIT_CPU = 0; const int RLIMIT_FSIZE = 1; @@ -90280,6 +89996,8 @@ const int IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE = 8; const int IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES = 9; +const int IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY = 10; + const int IOPOL_SCOPE_PROCESS = 0; const int IOPOL_SCOPE_THREAD = 1; @@ -90336,6 +90054,10 @@ const int IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF = 0; const int IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON = 1; +const int IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT = 0; + +const int IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON = 1; + const int WNOHANG = 1; const int WUNTRACED = 2; @@ -90356,13 +90078,87 @@ const int WAIT_ANY = -1; const int WAIT_MYPGRP = 0; +const int _QUAD_HIGHWORD = 1; + +const int _QUAD_LOWWORD = 0; + +const int __DARWIN_LITTLE_ENDIAN = 1234; + +const int __DARWIN_BIG_ENDIAN = 4321; + +const int __DARWIN_PDP_ENDIAN = 3412; + +const int __DARWIN_BYTE_ORDER = 1234; + +const int LITTLE_ENDIAN = 1234; + +const int BIG_ENDIAN = 4321; + +const int PDP_ENDIAN = 3412; + +const int BYTE_ORDER = 1234; + +const int NULL = 0; + const int EXIT_FAILURE = 1; const int EXIT_SUCCESS = 0; const int RAND_MAX = 2147483647; -const int TIME_UTC = 1; +const int __DARWIN_FD_SETSIZE = 1024; + +const int __DARWIN_NBBY = 8; + +const int __DARWIN_NFDBITS = 32; + +const int NBBY = 8; + +const int NFDBITS = 32; + +const int FD_SETSIZE = 1024; + +const int __bool_true_false_are_defined = 1; + +const int true1 = 1; + +const int false1 = 0; + +const int __GNUC_VA_LIST = 1; + +const int _POSIX_THREAD_KEYS_MAX = 128; + +const int API_TO_BE_DEPRECATED = 100000; + +const int API_TO_BE_DEPRECATED_MACOS = 100000; + +const int API_TO_BE_DEPRECATED_IOS = 100000; + +const int API_TO_BE_DEPRECATED_TVOS = 100000; + +const int API_TO_BE_DEPRECATED_WATCHOS = 100000; + +const int API_TO_BE_DEPRECATED_DRIVERKIT = 100000; + +const int TRUE = 1; + +const int FALSE = 0; + +const int OS_OBJECT_HAVE_OBJC_SUPPORT = 0; + +const int OS_OBJECT_USE_OBJC = 0; + +const int OS_OBJECT_SWIFT3 = 0; + +const int OS_OBJECT_USE_OBJC_RETAIN_RELEASE = 0; + +const String __ASSERT_FILE_NAME = 'temp_for_macros.hpp'; + +const int SEEK_SET = 0; + +const int SEEK_CUR = 1; + +const int SEEK_END = 2; const String __PRI_8_LENGTH_MODIFIER__ = 'hh'; @@ -90682,57 +90478,47 @@ const String SCNuMAX = 'ju'; const String SCNxMAX = 'jx'; -const int __COREFOUNDATION_CFBAG__ = 1; - -const int __COREFOUNDATION_CFBINARYHEAP__ = 1; - -const int __COREFOUNDATION_CFBITVECTOR__ = 1; - -const int __COREFOUNDATION_CFBYTEORDER__ = 1; - -const int CF_USE_OSBYTEORDER_H = 1; - -const int __COREFOUNDATION_CFCALENDAR__ = 1; +const int MACH_PORT_NULL = 0; -const int __COREFOUNDATION_CFLOCALE__ = 1; +const int MACH_PORT_DEAD = 4294967295; -const int __COREFOUNDATION_CFDICTIONARY__ = 1; +const int MACH_PORT_RIGHT_SEND = 0; -const int __COREFOUNDATION_CFNOTIFICATIONCENTER__ = 1; +const int MACH_PORT_RIGHT_RECEIVE = 1; -const int __COREFOUNDATION_CFDATE__ = 1; +const int MACH_PORT_RIGHT_SEND_ONCE = 2; -const int __COREFOUNDATION_CFTIMEZONE__ = 1; +const int MACH_PORT_RIGHT_PORT_SET = 3; -const int __COREFOUNDATION_CFDATA__ = 1; +const int MACH_PORT_RIGHT_DEAD_NAME = 4; -const int __COREFOUNDATION_CFSTRING__ = 1; +const int MACH_PORT_RIGHT_LABELH = 5; -const int __COREFOUNDATION_CFCHARACTERSET__ = 1; +const int MACH_PORT_RIGHT_NUMBER = 6; -const int kCFStringEncodingInvalidId = 4294967295; +const int MACH_PORT_TYPE_NONE = 0; -const int __kCFStringInlineBufferLength = 64; +const int MACH_PORT_TYPE_SEND = 65536; -const int __COREFOUNDATION_CFDATEFORMATTER__ = 1; +const int MACH_PORT_TYPE_RECEIVE = 131072; -const int __COREFOUNDATION_CFERROR__ = 1; +const int MACH_PORT_TYPE_SEND_ONCE = 262144; -const int __COREFOUNDATION_CFNUMBER__ = 1; +const int MACH_PORT_TYPE_PORT_SET = 524288; -const int __COREFOUNDATION_CFNUMBERFORMATTER__ = 1; +const int MACH_PORT_TYPE_DEAD_NAME = 1048576; -const int __COREFOUNDATION_CFPREFERENCES__ = 1; +const int MACH_PORT_TYPE_LABELH = 2097152; -const int __COREFOUNDATION_CFPROPERTYLIST__ = 1; +const int MACH_PORT_TYPE_SEND_RECEIVE = 196608; -const int __COREFOUNDATION_CFSTREAM__ = 1; +const int MACH_PORT_TYPE_SEND_RIGHTS = 327680; -const int __COREFOUNDATION_CFURL__ = 1; +const int MACH_PORT_TYPE_PORT_RIGHTS = 458752; -const int __COREFOUNDATION_CFRUNLOOP__ = 1; +const int MACH_PORT_TYPE_PORT_OR_DEAD = 1507328; -const int MACH_PORT_NULL = 0; +const int MACH_PORT_TYPE_ALL_RIGHTS = 2031616; const int MACH_PORT_TYPE_DNREQUEST = 2147483648; @@ -90792,10 +90578,20 @@ const int MACH_PORT_INFO_EXT = 7; const int MACH_PORT_GUARD_INFO = 8; +const int MACH_PORT_LIMITS_INFO_COUNT = 1; + +const int MACH_PORT_RECEIVE_STATUS_COUNT = 10; + const int MACH_PORT_DNREQUESTS_SIZE_COUNT = 1; +const int MACH_PORT_INFO_EXT_COUNT = 17; + +const int MACH_PORT_GUARD_INFO_COUNT = 2; + const int MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN = 255; +const int MACH_SERVICE_PORT_INFO_COUNT = 0; + const int MPO_CONTEXT_AS_GUARD = 1; const int MPO_QLIMIT = 2; @@ -90820,6 +90616,12 @@ const int MPO_SERVICE_PORT = 1024; const int MPO_CONNECTION_PORT = 2048; +const int MPO_REPLY_PORT = 4096; + +const int MPO_ENFORCE_REPLY_PORT_SEMANTICS = 8192; + +const int MPO_PROVISIONAL_REPLY_PORT = 16384; + const int GUARD_TYPE_MACH_PORT = 1; const int MAX_FATAL_kGUARD_EXC_CODE = 128; @@ -90852,8 +90654,6 @@ const int MPG_STRICT = 1; const int MPG_IMMOVABLE_RECEIVE = 2; -const int __COREFOUNDATION_CFSOCKET__ = 1; - const int _POSIX_VERSION = 200112; const int _POSIX2_VERSION = 200112; @@ -91028,7 +90828,7 @@ const int _POSIX_SHARED_MEMORY_OBJECTS = -1; const int _POSIX_SHELL = 200112; -const int _POSIX_SPAWN = -1; +const int _POSIX_SPAWN = 200112; const int _POSIX_SPIN_LOCKS = -1; @@ -91536,6 +91336,10 @@ const int O_CLOEXEC = 16777216; const int O_NOFOLLOW_ANY = 536870912; +const int O_EXEC = 1073741824; + +const int O_SEARCH = 1074790400; + const int AT_FDCWD = -2; const int AT_EACCESS = 16; @@ -91556,6 +91360,10 @@ const int O_DP_GETRAWENCRYPTED = 1; const int O_DP_GETRAWUNENCRYPTED = 2; +const int O_DP_AUTHENTICATE = 4; + +const int AUTH_OPEN_NOAUTHFD = -1; + const int FAPPEND = 8; const int FASYNC = 64; @@ -91680,7 +91488,11 @@ const int F_ADDFILESUPPL = 104; const int F_GETSIGSINFO = 105; -const int F_FSRESERVED = 106; +const int F_SETLEASE = 106; + +const int F_GETLEASE = 107; + +const int F_TRANSFEREXTENTS = 110; const int FCNTL_FS_SPECIFIC_BASE = 65536; @@ -91754,6 +91566,8 @@ const int F_ALLOCATECONTIG = 2; const int F_ALLOCATEALL = 4; +const int F_ALLOCATEPERSIST = 8; + const int F_PEOFPOSMODE = 3; const int F_VOLPOSMODE = 4; @@ -91774,6 +91588,8 @@ const int O_POPUP = 2147483648; const int O_ALERT = 536870912; +const int FILESEC_GUID = 3; + const int DISPATCH_API_VERSION = 20181008; const int __OS_WORKGROUP_ATTR_SIZE__ = 60; @@ -91958,6 +91774,8 @@ const int KERN_NOT_FOUND = 56; const int KERN_RETURN_MAX = 256; +const int MACH_MSG_TIMEOUT_NONE = 0; + const int MACH_MSGH_BITS_ZERO = 0; const int MACH_MSGH_BITS_REMOTE_MASK = 31; @@ -91984,6 +91802,8 @@ const int MACH_MSGH_BITS_CIRCULAR = 268435456; const int MACH_MSGH_BITS_USED = 2954829599; +const int MACH_MSG_PRIORITY_UNSPECIFIED = 0; + const int MACH_MSG_TYPE_MOVE_RECEIVE = 16; const int MACH_MSG_TYPE_MOVE_SEND = 17; @@ -92030,8 +91850,22 @@ const int MACH_MSG_OOL_VOLATILE_DESCRIPTOR = 3; const int MACH_MSG_GUARDED_PORT_DESCRIPTOR = 4; +const int MACH_MSG_DESCRIPTOR_MAX = 4; + const int MACH_MSG_TRAILER_FORMAT_0 = 0; +const int MACH_MSG_FILTER_POLICY_ALLOW = 0; + +const int MACH_MSG_TRAILER_MINIMUM_SIZE = 8; + +const int MAX_TRAILER_SIZE = 68; + +const int MACH_MSG_TRAILER_FORMAT_0_SIZE = 20; + +const int MACH_MSG_SIZE_MAX = 4294967295; + +const int MACH_MSG_SIZE_RELIABLE = 262144; + const int MACH_MSGH_KIND_NORMAL = 0; const int MACH_MSGH_KIND_NOTIFICATION = 1; @@ -92048,6 +91882,8 @@ const int MACH_MSG_TYPE_PORT_SEND_ONCE = 18; const int MACH_MSG_TYPE_LAST = 22; +const int MACH_MSG_TYPE_POLYMORPHIC = 4294967295; + const int MACH_MSG_OPTION_NONE = 0; const int MACH_SEND_MSG = 1; @@ -92168,12 +92004,18 @@ const int MACH_SEND_INVALID_TRAILER = 268435473; const int MACH_SEND_INVALID_CONTEXT = 268435474; +const int MACH_SEND_INVALID_OPTIONS = 268435475; + const int MACH_SEND_INVALID_RT_OOL_SIZE = 268435477; const int MACH_SEND_NO_GRANT_DEST = 268435478; const int MACH_SEND_MSG_FILTERED = 268435479; +const int MACH_SEND_AUX_TOO_SMALL = 268435480; + +const int MACH_SEND_AUX_TOO_LARGE = 268435481; + const int MACH_RCV_IN_PROGRESS = 268451841; const int MACH_RCV_INVALID_NAME = 268451842; @@ -92208,6 +92050,8 @@ const int MACH_RCV_IN_PROGRESS_TIMED = 268451857; const int MACH_RCV_INVALID_REPLY = 268451858; +const int MACH_RCV_INVALID_ARGUMENTS = 268451859; + const int DISPATCH_MACH_SEND_DEAD = 1; const int DISPATCH_MEMORYPRESSURE_NORMAL = 1; @@ -92254,666 +92098,14 @@ const int DISPATCH_IO_STOP = 1; const int DISPATCH_IO_STRICT_INTERVAL = 1; -const int __COREFOUNDATION_CFSET__ = 1; - -const int __COREFOUNDATION_CFSTRINGENCODINGEXT__ = 1; - -const int __COREFOUNDATION_CFTREE__ = 1; - -const int __COREFOUNDATION_CFURLACCESS__ = 1; - -const int __COREFOUNDATION_CFUUID__ = 1; - -const int __COREFOUNDATION_CFUTILITIES__ = 1; - -const int __COREFOUNDATION_CFBUNDLE__ = 1; - -const int CPU_STATE_MAX = 4; - -const int CPU_STATE_USER = 0; - -const int CPU_STATE_SYSTEM = 1; - -const int CPU_STATE_IDLE = 2; - -const int CPU_STATE_NICE = 3; - -const int CPU_ARCH_MASK = 4278190080; - -const int CPU_ARCH_ABI64 = 16777216; - -const int CPU_ARCH_ABI64_32 = 33554432; - -const int CPU_SUBTYPE_MASK = 4278190080; - -const int CPU_SUBTYPE_LIB64 = 2147483648; - -const int CPU_SUBTYPE_PTRAUTH_ABI = 2147483648; - -const int CPU_SUBTYPE_INTEL_FAMILY_MAX = 15; - -const int CPU_SUBTYPE_INTEL_MODEL_ALL = 0; - -const int CPU_SUBTYPE_ARM64_PTR_AUTH_MASK = 251658240; - -const int CPUFAMILY_UNKNOWN = 0; - -const int CPUFAMILY_POWERPC_G3 = 3471054153; - -const int CPUFAMILY_POWERPC_G4 = 2009171118; - -const int CPUFAMILY_POWERPC_G5 = 3983988906; - -const int CPUFAMILY_INTEL_6_13 = 2855483691; - -const int CPUFAMILY_INTEL_PENRYN = 2028621756; - -const int CPUFAMILY_INTEL_NEHALEM = 1801080018; - -const int CPUFAMILY_INTEL_WESTMERE = 1463508716; - -const int CPUFAMILY_INTEL_SANDYBRIDGE = 1418770316; - -const int CPUFAMILY_INTEL_IVYBRIDGE = 526772277; - -const int CPUFAMILY_INTEL_HASWELL = 280134364; - -const int CPUFAMILY_INTEL_BROADWELL = 1479463068; - -const int CPUFAMILY_INTEL_SKYLAKE = 939270559; - -const int CPUFAMILY_INTEL_KABYLAKE = 260141638; - -const int CPUFAMILY_INTEL_ICELAKE = 943936839; - -const int CPUFAMILY_INTEL_COMETLAKE = 486055998; - -const int CPUFAMILY_ARM_9 = 3878847406; - -const int CPUFAMILY_ARM_11 = 2415272152; - -const int CPUFAMILY_ARM_XSCALE = 1404044789; - -const int CPUFAMILY_ARM_12 = 3172666089; - -const int CPUFAMILY_ARM_13 = 214503012; - -const int CPUFAMILY_ARM_14 = 2517073649; - -const int CPUFAMILY_ARM_15 = 2823887818; - -const int CPUFAMILY_ARM_SWIFT = 506291073; - -const int CPUFAMILY_ARM_CYCLONE = 933271106; - -const int CPUFAMILY_ARM_TYPHOON = 747742334; - -const int CPUFAMILY_ARM_TWISTER = 2465937352; - -const int CPUFAMILY_ARM_HURRICANE = 1741614739; - -const int CPUFAMILY_ARM_MONSOON_MISTRAL = 3894312694; - -const int CPUFAMILY_ARM_VORTEX_TEMPEST = 131287967; - -const int CPUFAMILY_ARM_LIGHTNING_THUNDER = 1176831186; - -const int CPUFAMILY_ARM_FIRESTORM_ICESTORM = 458787763; - -const int CPUFAMILY_ARM_BLIZZARD_AVALANCHE = 3660830781; - -const int CPUSUBFAMILY_UNKNOWN = 0; - -const int CPUSUBFAMILY_ARM_HP = 1; - -const int CPUSUBFAMILY_ARM_HG = 2; - -const int CPUSUBFAMILY_ARM_M = 3; - -const int CPUSUBFAMILY_ARM_HS = 4; - -const int CPUSUBFAMILY_ARM_HC_HD = 5; - -const int CPUFAMILY_INTEL_6_23 = 2028621756; - -const int CPUFAMILY_INTEL_6_26 = 1801080018; - -const int __COREFOUNDATION_CFMESSAGEPORT__ = 1; - -const int __COREFOUNDATION_CFPLUGIN__ = 1; - -const int COREFOUNDATION_CFPLUGINCOM_SEPARATE = 1; - -const int __COREFOUNDATION_CFMACHPORT__ = 1; - -const int __COREFOUNDATION_CFATTRIBUTEDSTRING__ = 1; - -const int __COREFOUNDATION_CFURLENUMERATOR__ = 1; - -const int __COREFOUNDATION_CFFILESECURITY__ = 1; - -const int KAUTH_GUID_SIZE = 16; - -const int KAUTH_NTSID_MAX_AUTHORITIES = 16; - -const int KAUTH_NTSID_HDRSIZE = 8; - -const int KAUTH_EXTLOOKUP_SUCCESS = 0; - -const int KAUTH_EXTLOOKUP_BADRQ = 1; - -const int KAUTH_EXTLOOKUP_FAILURE = 2; - -const int KAUTH_EXTLOOKUP_FATAL = 3; - -const int KAUTH_EXTLOOKUP_INPROG = 100; - -const int KAUTH_EXTLOOKUP_VALID_UID = 1; - -const int KAUTH_EXTLOOKUP_VALID_UGUID = 2; - -const int KAUTH_EXTLOOKUP_VALID_USID = 4; - -const int KAUTH_EXTLOOKUP_VALID_GID = 8; - -const int KAUTH_EXTLOOKUP_VALID_GGUID = 16; - -const int KAUTH_EXTLOOKUP_VALID_GSID = 32; - -const int KAUTH_EXTLOOKUP_WANT_UID = 64; - -const int KAUTH_EXTLOOKUP_WANT_UGUID = 128; - -const int KAUTH_EXTLOOKUP_WANT_USID = 256; - -const int KAUTH_EXTLOOKUP_WANT_GID = 512; - -const int KAUTH_EXTLOOKUP_WANT_GGUID = 1024; - -const int KAUTH_EXTLOOKUP_WANT_GSID = 2048; - -const int KAUTH_EXTLOOKUP_WANT_MEMBERSHIP = 4096; - -const int KAUTH_EXTLOOKUP_VALID_MEMBERSHIP = 8192; - -const int KAUTH_EXTLOOKUP_ISMEMBER = 16384; - -const int KAUTH_EXTLOOKUP_VALID_PWNAM = 32768; - -const int KAUTH_EXTLOOKUP_WANT_PWNAM = 65536; - -const int KAUTH_EXTLOOKUP_VALID_GRNAM = 131072; - -const int KAUTH_EXTLOOKUP_WANT_GRNAM = 262144; - -const int KAUTH_EXTLOOKUP_VALID_SUPGRPS = 524288; - -const int KAUTH_EXTLOOKUP_WANT_SUPGRPS = 1048576; - -const int KAUTH_EXTLOOKUP_REGISTER = 0; - -const int KAUTH_EXTLOOKUP_RESULT = 1; - -const int KAUTH_EXTLOOKUP_WORKER = 2; - -const int KAUTH_EXTLOOKUP_DEREGISTER = 4; - -const int KAUTH_GET_CACHE_SIZES = 8; - -const int KAUTH_SET_CACHE_SIZES = 16; - -const int KAUTH_CLEAR_CACHES = 32; - -const String IDENTITYSVC_ENTITLEMENT = 'com.apple.private.identitysvc'; - -const int KAUTH_ACE_KINDMASK = 15; - -const int KAUTH_ACE_PERMIT = 1; - -const int KAUTH_ACE_DENY = 2; - -const int KAUTH_ACE_AUDIT = 3; - -const int KAUTH_ACE_ALARM = 4; - -const int KAUTH_ACE_INHERITED = 16; - -const int KAUTH_ACE_FILE_INHERIT = 32; - -const int KAUTH_ACE_DIRECTORY_INHERIT = 64; - -const int KAUTH_ACE_LIMIT_INHERIT = 128; - -const int KAUTH_ACE_ONLY_INHERIT = 256; - -const int KAUTH_ACE_SUCCESS = 512; - -const int KAUTH_ACE_FAILURE = 1024; - -const int KAUTH_ACE_INHERIT_CONTROL_FLAGS = 480; - -const int KAUTH_ACE_GENERIC_ALL = 2097152; - -const int KAUTH_ACE_GENERIC_EXECUTE = 4194304; - -const int KAUTH_ACE_GENERIC_WRITE = 8388608; - -const int KAUTH_ACE_GENERIC_READ = 16777216; - -const int KAUTH_ACL_MAX_ENTRIES = 128; - -const int KAUTH_ACL_FLAGS_PRIVATE = 65535; - -const int KAUTH_ACL_DEFER_INHERIT = 65536; - -const int KAUTH_ACL_NO_INHERIT = 131072; - -const int KAUTH_FILESEC_MAGIC = 19710317; - -const int KAUTH_FILESEC_FLAGS_PRIVATE = 65535; - -const int KAUTH_FILESEC_DEFER_INHERIT = 65536; - -const int KAUTH_FILESEC_NO_INHERIT = 131072; - -const String KAUTH_FILESEC_XATTR = 'com.apple.system.Security'; - -const int KAUTH_ENDIAN_HOST = 1; - -const int KAUTH_ENDIAN_DISK = 2; - -const int KAUTH_VNODE_READ_DATA = 2; - -const int KAUTH_VNODE_LIST_DIRECTORY = 2; - -const int KAUTH_VNODE_WRITE_DATA = 4; - -const int KAUTH_VNODE_ADD_FILE = 4; - -const int KAUTH_VNODE_EXECUTE = 8; - -const int KAUTH_VNODE_SEARCH = 8; - -const int KAUTH_VNODE_DELETE = 16; - -const int KAUTH_VNODE_APPEND_DATA = 32; - -const int KAUTH_VNODE_ADD_SUBDIRECTORY = 32; - -const int KAUTH_VNODE_DELETE_CHILD = 64; - -const int KAUTH_VNODE_READ_ATTRIBUTES = 128; - -const int KAUTH_VNODE_WRITE_ATTRIBUTES = 256; - -const int KAUTH_VNODE_READ_EXTATTRIBUTES = 512; - -const int KAUTH_VNODE_WRITE_EXTATTRIBUTES = 1024; - -const int KAUTH_VNODE_READ_SECURITY = 2048; - -const int KAUTH_VNODE_WRITE_SECURITY = 4096; - -const int KAUTH_VNODE_TAKE_OWNERSHIP = 8192; - -const int KAUTH_VNODE_CHANGE_OWNER = 8192; - -const int KAUTH_VNODE_SYNCHRONIZE = 1048576; - -const int KAUTH_VNODE_LINKTARGET = 33554432; - -const int KAUTH_VNODE_CHECKIMMUTABLE = 67108864; - -const int KAUTH_VNODE_ACCESS = 2147483648; - -const int KAUTH_VNODE_NOIMMUTABLE = 1073741824; - -const int KAUTH_VNODE_SEARCHBYANYONE = 536870912; - -const int KAUTH_VNODE_GENERIC_READ_BITS = 2690; - -const int KAUTH_VNODE_GENERIC_WRITE_BITS = 5492; - -const int KAUTH_VNODE_GENERIC_EXECUTE_BITS = 8; - -const int KAUTH_VNODE_GENERIC_ALL_BITS = 8190; - -const int KAUTH_VNODE_WRITE_RIGHTS = 100676980; - -const int __DARWIN_ACL_READ_DATA = 2; - -const int __DARWIN_ACL_LIST_DIRECTORY = 2; - -const int __DARWIN_ACL_WRITE_DATA = 4; - -const int __DARWIN_ACL_ADD_FILE = 4; - -const int __DARWIN_ACL_EXECUTE = 8; - -const int __DARWIN_ACL_SEARCH = 8; - -const int __DARWIN_ACL_DELETE = 16; - -const int __DARWIN_ACL_APPEND_DATA = 32; - -const int __DARWIN_ACL_ADD_SUBDIRECTORY = 32; - -const int __DARWIN_ACL_DELETE_CHILD = 64; - -const int __DARWIN_ACL_READ_ATTRIBUTES = 128; - -const int __DARWIN_ACL_WRITE_ATTRIBUTES = 256; - -const int __DARWIN_ACL_READ_EXTATTRIBUTES = 512; - -const int __DARWIN_ACL_WRITE_EXTATTRIBUTES = 1024; - -const int __DARWIN_ACL_READ_SECURITY = 2048; - -const int __DARWIN_ACL_WRITE_SECURITY = 4096; - -const int __DARWIN_ACL_CHANGE_OWNER = 8192; - -const int __DARWIN_ACL_SYNCHRONIZE = 1048576; - -const int __DARWIN_ACL_EXTENDED_ALLOW = 1; - -const int __DARWIN_ACL_EXTENDED_DENY = 2; - -const int __DARWIN_ACL_ENTRY_INHERITED = 16; - -const int __DARWIN_ACL_ENTRY_FILE_INHERIT = 32; - -const int __DARWIN_ACL_ENTRY_DIRECTORY_INHERIT = 64; - -const int __DARWIN_ACL_ENTRY_LIMIT_INHERIT = 128; - -const int __DARWIN_ACL_ENTRY_ONLY_INHERIT = 256; - -const int __DARWIN_ACL_FLAG_NO_INHERIT = 131072; - -const int ACL_MAX_ENTRIES = 128; - -const int ACL_UNDEFINED_ID = 0; - -const int __COREFOUNDATION_CFSTRINGTOKENIZER__ = 1; - -const int __COREFOUNDATION_CFFILEDESCRIPTOR__ = 1; - -const int __COREFOUNDATION_CFUSERNOTIFICATION__ = 1; - -const int __COREFOUNDATION_CFXMLNODE__ = 1; - -const int __COREFOUNDATION_CFXMLPARSER__ = 1; - -const int _CSSMTYPE_H_ = 1; - -const int _CSSMCONFIG_H_ = 1; - -const int SEC_ASN1_TAG_MASK = 255; - -const int SEC_ASN1_TAGNUM_MASK = 31; - -const int SEC_ASN1_BOOLEAN = 1; - -const int SEC_ASN1_INTEGER = 2; - -const int SEC_ASN1_BIT_STRING = 3; - -const int SEC_ASN1_OCTET_STRING = 4; - -const int SEC_ASN1_NULL = 5; - -const int SEC_ASN1_OBJECT_ID = 6; - -const int SEC_ASN1_OBJECT_DESCRIPTOR = 7; - -const int SEC_ASN1_REAL = 9; - -const int SEC_ASN1_ENUMERATED = 10; - -const int SEC_ASN1_EMBEDDED_PDV = 11; - -const int SEC_ASN1_UTF8_STRING = 12; - -const int SEC_ASN1_SEQUENCE = 16; - -const int SEC_ASN1_SET = 17; - -const int SEC_ASN1_NUMERIC_STRING = 18; - -const int SEC_ASN1_PRINTABLE_STRING = 19; - -const int SEC_ASN1_T61_STRING = 20; - -const int SEC_ASN1_VIDEOTEX_STRING = 21; - -const int SEC_ASN1_IA5_STRING = 22; - -const int SEC_ASN1_UTC_TIME = 23; - -const int SEC_ASN1_GENERALIZED_TIME = 24; - -const int SEC_ASN1_GRAPHIC_STRING = 25; - -const int SEC_ASN1_VISIBLE_STRING = 26; - -const int SEC_ASN1_GENERAL_STRING = 27; - -const int SEC_ASN1_UNIVERSAL_STRING = 28; - -const int SEC_ASN1_BMP_STRING = 30; - -const int SEC_ASN1_HIGH_TAG_NUMBER = 31; - -const int SEC_ASN1_TELETEX_STRING = 20; - -const int SEC_ASN1_METHOD_MASK = 32; - -const int SEC_ASN1_PRIMITIVE = 0; - -const int SEC_ASN1_CONSTRUCTED = 32; - -const int SEC_ASN1_CLASS_MASK = 192; - -const int SEC_ASN1_UNIVERSAL = 0; - -const int SEC_ASN1_APPLICATION = 64; - -const int SEC_ASN1_CONTEXT_SPECIFIC = 128; - -const int SEC_ASN1_PRIVATE = 192; - -const int SEC_ASN1_OPTIONAL = 256; - -const int SEC_ASN1_EXPLICIT = 512; - -const int SEC_ASN1_ANY = 1024; - -const int SEC_ASN1_INLINE = 2048; - -const int SEC_ASN1_POINTER = 4096; - -const int SEC_ASN1_GROUP = 8192; - -const int SEC_ASN1_DYNAMIC = 16384; - -const int SEC_ASN1_SKIP = 32768; - -const int SEC_ASN1_INNER = 65536; - -const int SEC_ASN1_SAVE = 131072; - -const int SEC_ASN1_SKIP_REST = 524288; - -const int SEC_ASN1_CHOICE = 1048576; - -const int SEC_ASN1_SIGNED_INT = 8388608; - -const int SEC_ASN1_SEQUENCE_OF = 8208; - -const int SEC_ASN1_SET_OF = 8209; - -const int SEC_ASN1_ANY_CONTENTS = 66560; - -const int _CSSMAPPLE_H_ = 1; - -const int _CSSMERR_H_ = 1; - -const int _X509DEFS_H_ = 1; - -const int BER_TAG_UNKNOWN = 0; - -const int BER_TAG_BOOLEAN = 1; - -const int BER_TAG_INTEGER = 2; - -const int BER_TAG_BIT_STRING = 3; - -const int BER_TAG_OCTET_STRING = 4; - -const int BER_TAG_NULL = 5; - -const int BER_TAG_OID = 6; - -const int BER_TAG_OBJECT_DESCRIPTOR = 7; - -const int BER_TAG_EXTERNAL = 8; - -const int BER_TAG_REAL = 9; - -const int BER_TAG_ENUMERATED = 10; - -const int BER_TAG_PKIX_UTF8_STRING = 12; - -const int BER_TAG_SEQUENCE = 16; - -const int BER_TAG_SET = 17; - -const int BER_TAG_NUMERIC_STRING = 18; - -const int BER_TAG_PRINTABLE_STRING = 19; - -const int BER_TAG_T61_STRING = 20; - -const int BER_TAG_TELETEX_STRING = 20; - -const int BER_TAG_VIDEOTEX_STRING = 21; - -const int BER_TAG_IA5_STRING = 22; - -const int BER_TAG_UTC_TIME = 23; - -const int BER_TAG_GENERALIZED_TIME = 24; - -const int BER_TAG_GRAPHIC_STRING = 25; - -const int BER_TAG_ISO646_STRING = 26; - -const int BER_TAG_GENERAL_STRING = 27; - -const int BER_TAG_VISIBLE_STRING = 26; - -const int BER_TAG_PKIX_UNIVERSAL_STRING = 28; - -const int BER_TAG_PKIX_BMP_STRING = 30; - -const int CE_KU_DigitalSignature = 32768; - -const int CE_KU_NonRepudiation = 16384; - -const int CE_KU_KeyEncipherment = 8192; - -const int CE_KU_DataEncipherment = 4096; - -const int CE_KU_KeyAgreement = 2048; - -const int CE_KU_KeyCertSign = 1024; - -const int CE_KU_CRLSign = 512; - -const int CE_KU_EncipherOnly = 256; - -const int CE_KU_DecipherOnly = 128; - -const int CE_CR_Unspecified = 0; - -const int CE_CR_KeyCompromise = 1; - -const int CE_CR_CACompromise = 2; - -const int CE_CR_AffiliationChanged = 3; - -const int CE_CR_Superseded = 4; - -const int CE_CR_CessationOfOperation = 5; - -const int CE_CR_CertificateHold = 6; - -const int CE_CR_RemoveFromCRL = 8; - -const int CE_CD_Unspecified = 128; - -const int CE_CD_KeyCompromise = 64; - -const int CE_CD_CACompromise = 32; - -const int CE_CD_AffiliationChanged = 16; - -const int CE_CD_Superseded = 8; - -const int CE_CD_CessationOfOperation = 4; - -const int CE_CD_CertificateHold = 2; - -const int CSSM_APPLE_TP_SSL_OPTS_VERSION = 1; - -const int CSSM_APPLE_TP_SSL_CLIENT = 1; - -const int CSSM_APPLE_TP_CRL_OPTS_VERSION = 0; - -const int CSSM_APPLE_TP_SMIME_OPTS_VERSION = 0; - -const int CSSM_APPLE_TP_ACTION_VERSION = 0; - -const int CSSM_TP_APPLE_EVIDENCE_VERSION = 0; - -const int CSSM_EVIDENCE_FORM_APPLE_CUSTOM = 2147483648; - -const String CSSM_APPLE_CRL_END_OF_TIME = '99991231235959'; - -const String kKeychainSuffix = '.keychain'; - -const String kKeychainDbSuffix = '.keychain-db'; - -const String kSystemKeychainName = 'System.keychain'; - -const String kSystemKeychainDir = '/Library/Keychains/'; - -const String kSystemUnlockFile = '/var/db/SystemKey'; - -const String kSystemKeychainPath = '/Library/Keychains/System.keychain'; - -const String CSSM_APPLE_ACL_TAG_PARTITION_ID = '___PARTITION___'; - -const String CSSM_APPLE_ACL_TAG_INTEGRITY = '___INTEGRITY___'; - -const int errSecErrnoBase = 100000; - -const int errSecErrnoLimit = 100255; - -const int SEC_PROTOCOL_CERT_COMPRESSION_DEFAULT = 1; - -const int NSMaximumStringLength = 2147483646; - -const int NS_UNICHAR_IS_EIGHT_BIT = 0; - const int NSURLResponseUnknownLength = -1; const int DART_FLAGS_CURRENT_VERSION = 12; const int DART_INITIALIZE_PARAMS_CURRENT_VERSION = 4; +const int ILLEGAL_PORT = 0; + const String DART_KERNEL_ISOLATE_NAME = 'kernel-service'; const String DART_VM_SERVICE_ISOLATE_NAME = 'vm-service'; diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 2b7d0e8374..b45695dce8 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,12 +2,12 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 0.1.2-dev +version: 1.0.0 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: - sdk: ">=2.19.0 <3.0.0" - flutter: ">=3.0.0" + sdk: ^3.0.0 + flutter: ^3.10.0 # If changed, update test matrix. dependencies: ffi: ^2.0.1 @@ -18,7 +18,7 @@ dependencies: dev_dependencies: dart_flutter_team_lints: ^1.0.0 - ffigen: ^7.2.0 + ffigen: ^8.0.2 flutter: plugin: From aebd936fb1d722a327d6c1a0f7bf1bba18a8d162 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 May 2023 02:17:04 +0000 Subject: [PATCH 233/448] Bump actions/labeler from 4.0.2 to 4.0.4 (#952) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/labeler](https://github.com/actions/labeler) from 4.0.2 to 4.0.4.

Release notes

Sourced from actions/labeler's releases.

v4.0.4

What's Changed

New Contributors

Full Changelog: https://github.com/actions/labeler/compare/v4...v4.0.4

v4.0.3

What's Changed

  • Make the repo-token input optional. Default is github.token (#227)
  • Bump typescript to 4.9.5 (#496)
  • Bump prettier to 2.8.4 (#498)
  • Bump @​vercel/ncc to 0.36.1 (#493)
  • Bump @​actions/github, minimatch and @​types/minimatch (#477)
  • Update documentation (#278, #285, #476 and #495)
Commits
  • 0776a67 Merge pull request #571 from akv-platform/remove-implicit-dependencies
  • 2713f73 Bump @​typescript-eslint/eslint-plugin from 5.59.6 to 5.59.7 (#572)
  • a4eda65 Bump @​typescript-eslint/parser from 5.59.6 to 5.59.7 (#573)
  • 5c4deb8 Revert "fix: correct reading of sync-labels input. (#480)" (#564)
  • 08382d1 Move eslint-plugin-node to dev dependencies
  • 61662e8 Bump eslint from 8.40.0 to 8.41.0 (#569)
  • d1dd326 Install eslint-plugin-node
  • 9107682 Update configuration files
  • 6b107e7 Bump @​typescript-eslint/parser from 5.59.5 to 5.59.6 (#565)
  • d93c73a Bump @​typescript-eslint/eslint-plugin from 5.59.5 to 5.59.6 (#566)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/labeler&package-manager=github_actions&previous-version=4.0.2&new-version=4.0.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/pull_request_label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request_label.yml b/.github/workflows/pull_request_label.yml index 26758a596e..2a9e34d873 100644 --- a/.github/workflows/pull_request_label.yml +++ b/.github/workflows/pull_request_label.yml @@ -16,7 +16,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@5c7539237e04b714afd8ad9b4aed733815b9fab4 + - uses: actions/labeler@0776a679364a9a16110aac8d0f40f5e11009e327 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true From 4aa917d95824e02d9eee859a5bb9ea5dfecf88ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 May 2023 02:46:17 +0000 Subject: [PATCH 234/448] Bump futureware-tech/simulator-action from 1 to 2 (#936) Bumps [futureware-tech/simulator-action](https://github.com/futureware-tech/simulator-action) from 1 to 2.
Release notes

Sourced from futureware-tech/simulator-action's releases.

v2

  • Update a few packages for security reasons.
  • Bump NodeJS to 16 (#249).
Changelog

Sourced from futureware-tech/simulator-action's changelog.

v2

  • Update a few packages for security reasons.
  • Bump NodeJS to 16 (#249).
Commits
  • ee05c11 Merge pull request #254 from futureware-tech/version-bump
  • adda788 File name conventions from newest eslint
  • 01e3384 Disable linter for i18n (as instructed by GitHub)
  • 00a77ea Fix new typescript findings
  • b15d416 Package v2
  • e6322bb Update package-lock.json version
  • 3b0adbc Add NodeJS version for nvm
  • e0d70c2 Merge pull request #229 from futureware-tech/dependabot/npm_and_yarn/types/se...
  • eaa7758 Merge pull request #248 from futureware-tech/dependabot/npm_and_yarn/types/no...
  • e8aa581 Merge pull request #250 from futureware-tech/node16
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=futureware-tech/simulator-action&package-manager=github_actions&previous-version=1&new-version=2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/cupertino.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index c1cf3f3eed..ef4f2b8911 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -57,7 +57,7 @@ jobs: working-directory: pkgs/cupertino_http/example steps: - uses: actions/checkout@v3 - - uses: futureware-tech/simulator-action@v1 + - uses: futureware-tech/simulator-action@v2 with: model: 'iPhone 8' - uses: subosito/flutter-action@v2 From 3c99707dd72e220c370843df92e366fec07eb35b Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 31 May 2023 16:04:14 -0700 Subject: [PATCH 235/448] Update readme and prepare for a new release (#954) --- pkgs/cupertino_http/CHANGELOG.md | 4 ++++ pkgs/cupertino_http/README.md | 17 ----------------- pkgs/cupertino_http/example/pubspec.yaml | 2 +- pkgs/cupertino_http/pubspec.yaml | 4 ++-- 4 files changed, 7 insertions(+), 20 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 67bd149863..bb0dd931e8 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.1 + +* Remove experimental status from "Readme" + ## 1.0.0 * Require Dart 3.0 diff --git a/pkgs/cupertino_http/README.md b/pkgs/cupertino_http/README.md index 8585b7add5..83514dcc40 100644 --- a/pkgs/cupertino_http/README.md +++ b/pkgs/cupertino_http/README.md @@ -4,23 +4,6 @@ A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System][]. -## Status: Experimental - -**NOTE**: This package is currently experimental and published under the -[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to -solicit feedback. - -For packages in the labs.dart.dev publisher we generally plan to either graduate -the package into a supported publisher (dart.dev, tools.dart.dev) after a period -of feedback and iteration, or discontinue the package. These packages have a -much higher expected rate of API and breaking changes. - -Your feedback is valuable and will help us evolve this package. -For general feedback and suggestions please comment in the -[feedback issue](https://github.com/dart-lang/http/issues/764). -For bugs, please file an issue in the -[bug tracker](https://github.com/dart-lang/http/issues). - ## Motivation Using the [Foundation URL Loading System][], rather than the socket-based diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index ff57651272..81f4dc72b9 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -7,7 +7,7 @@ version: 1.0.0+1 environment: sdk: ^3.0.0 - flutter: ^3.10.0 + flutter: '>=3.10.0' dependencies: cached_network_image: ^3.2.3 diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index b45695dce8..a18670a22c 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,12 +2,12 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 1.0.0 +version: 1.0.1 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: sdk: ^3.0.0 - flutter: ^3.10.0 # If changed, update test matrix. + flutter: '>=3.10.0' # If changed, update test matrix. dependencies: ffi: ^2.0.1 From 4c37158dcd3bc0568988feb1456df16a9f5c9cc2 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 2 Jun 2023 13:39:34 -0700 Subject: [PATCH 236/448] Reland "support the nsurl session web socket api" (#950) --- pkgs/cupertino_http/CHANGELOG.md | 4 + .../url_session_task_test.dart | 135 +++++++++++++ pkgs/cupertino_http/ffigen.yaml | 1 + .../ios/Classes/CUPHTTPCompletionHelper.m | 1 + .../cupertino_http/lib/src/cupertino_api.dart | 191 +++++++++++++++++- .../lib/src/native_cupertino_bindings.dart | 55 +++++ .../macos/Classes/CUPHTTPCompletionHelper.m | 1 + pkgs/cupertino_http/pubspec.yaml | 2 +- .../src/CUPHTTPClientDelegate.m | 8 +- .../src/CUPHTTPCompletionHelper.h | 31 +++ .../src/CUPHTTPCompletionHelper.m | 45 +++++ 11 files changed, 460 insertions(+), 14 deletions(-) create mode 100644 pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m create mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m create mode 100644 pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h create mode 100644 pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index bb0dd931e8..2d60dd4c5d 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.0 + +* Add websocket support to `cupertino_api`. + ## 1.0.1 * Remove experimental status from "Readme" diff --git a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart index 0c5c56b2ec..35e411b84a 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart @@ -9,6 +9,139 @@ import 'package:flutter/foundation.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; +void testWebSocketTask() { + group('websocket', () { + late HttpServer server; + int? lastCloseCode; + String? lastCloseReason; + + setUp(() async { + lastCloseCode = null; + lastCloseReason = null; + server = await HttpServer.bind('localhost', 0) + ..listen((request) { + if (request.uri.path.endsWith('error')) { + request.response.statusCode = 500; + request.response.close(); + } else { + WebSocketTransformer.upgrade(request) + .then((websocket) => websocket.listen((event) { + final code = request.uri.queryParameters['code']; + final reason = request.uri.queryParameters['reason']; + + websocket.add(event); + if (!request.uri.queryParameters.containsKey('noclose')) { + websocket.close( + code == null ? null : int.parse(code), reason); + } + }, onDone: () { + lastCloseCode = websocket.closeCode; + lastCloseReason = websocket.closeReason; + })); + } + }); + }); + + tearDown(() async { + await server.close(); + }); + + test('client code and reason', () async { + final session = URLSession.sharedSession(); + final task = session.webSocketTaskWithRequest(URLRequest.fromUrl( + Uri.parse('ws://localhost:${server.port}/?noclose'))) + ..resume(); + await task + .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); + await task.receiveMessage(); + task.cancelWithCloseCode( + 4998, Data.fromUint8List(Uint8List.fromList('Bye'.codeUnits))); + + // Allow the server to run and save the close code. + while (lastCloseCode == null) { + await Future.delayed(const Duration(milliseconds: 10)); + } + expect(lastCloseCode, 4998); + expect(lastCloseReason, 'Bye'); + }); + + test('server code and reason', () async { + final session = URLSession.sharedSession(); + final task = session.webSocketTaskWithRequest(URLRequest.fromUrl( + Uri.parse('ws://localhost:${server.port}/?code=4999&reason=fun'))) + ..resume(); + await task + .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); + await task.receiveMessage(); + await expectLater(task.receiveMessage(), + throwsA(isA().having((e) => e.code, 'code', 57 // NOT_CONNECTED + ))); + + expect(task.closeCode, 4999); + expect(task.closeReason!.bytes, 'fun'.codeUnits); + task.cancel(); + }); + + test('data message', () async { + final session = URLSession.sharedSession(); + final task = session.webSocketTaskWithRequest( + URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}'))) + ..resume(); + await task.sendMessage(URLSessionWebSocketMessage.fromData( + Data.fromUint8List(Uint8List.fromList([1, 2, 3])))); + final receivedMessage = await task.receiveMessage(); + expect(receivedMessage.type, + URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeData); + expect(receivedMessage.data!.bytes, [1, 2, 3]); + expect(receivedMessage.string, null); + task.cancel(); + }); + + test('text message', () async { + final session = URLSession.sharedSession(); + final task = session.webSocketTaskWithRequest( + URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}'))) + ..resume(); + await task + .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); + final receivedMessage = await task.receiveMessage(); + expect(receivedMessage.type, + URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeString); + expect(receivedMessage.data, null); + expect(receivedMessage.string, 'Hello World!'); + task.cancel(); + }); + + test('send failure', () async { + final session = URLSession.sharedSession(); + final task = session.webSocketTaskWithRequest( + URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}/error'))) + ..resume(); + await expectLater( + task.sendMessage( + URLSessionWebSocketMessage.fromString('Hello World!')), + throwsA(isA().having( + (e) => e.code, 'code', -1011 // NSURLErrorBadServerResponse + ))); + task.cancel(); + }); + + test('receive failure', () async { + final session = URLSession.sharedSession(); + final task = session.webSocketTaskWithRequest( + URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}'))) + ..resume(); + await task + .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); + await task.receiveMessage(); + await expectLater(task.receiveMessage(), + throwsA(isA().having((e) => e.code, 'code', 57 // NOT_CONNECTED + ))); + task.cancel(); + }); + }); +} + void testURLSessionTask( URLSessionTask Function(URLSession session, Uri url) f) { group('task states', () { @@ -231,4 +364,6 @@ void main() { testURLSessionTask((session, uri) => session.downloadTaskWithRequest(URLRequest.fromUrl(uri))); }); + + testWebSocketTask(); } diff --git a/pkgs/cupertino_http/ffigen.yaml b/pkgs/cupertino_http/ffigen.yaml index a63ab1134f..2ac2ce517f 100644 --- a/pkgs/cupertino_http/ffigen.yaml +++ b/pkgs/cupertino_http/ffigen.yaml @@ -22,6 +22,7 @@ headers: - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' - 'src/CUPHTTPClientDelegate.h' - 'src/CUPHTTPForwardedDelegate.h' + - 'src/CUPHTTPCompletionHelper.h' preamble: | // ignore_for_file: always_specify_types // ignore_for_file: camel_case_types diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m new file mode 100644 index 0000000000..b05d1fc717 --- /dev/null +++ b/pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m @@ -0,0 +1 @@ +#include "../../src/CUPHTTPCompletionHelper.m" diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index a5b9347c43..1fa2524b3f 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -26,6 +26,7 @@ /// ``` library; +import 'dart:async'; import 'dart:ffi'; import 'dart:isolate'; import 'dart:math'; @@ -111,10 +112,18 @@ enum URLRequestNetworkService { networkServiceTypeCallSignaling } +/// The type of a WebSocket message i.e. text or data. +/// +/// See [NSURLSessionWebSocketMessageType](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessagetype) +enum URLSessionWebSocketMessageType { + urlSessionWebSocketMessageTypeData, + urlSessionWebSocketMessageTypeString, +} + /// Information about a failure. /// /// See [NSError](https://developer.apple.com/documentation/foundation/nserror) -class Error extends _ObjectHolder { +class Error extends _ObjectHolder implements Exception { Error._(super.c); /// The numeric code for the error e.g. -1003 (kCFURLErrorCannotFindHost). @@ -493,6 +502,54 @@ enum URLSessionTaskState { urlSessionTaskStateCompleted, } +/// A WebSocket message. +/// +/// See [NSURLSessionWebSocketMessage](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage) +class URLSessionWebSocketMessage + extends _ObjectHolder { + URLSessionWebSocketMessage._(super.nsObject); + + /// Create a WebSocket data message. + /// + /// See [NSURLSessionWebSocketMessage initWithData:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181192-initwithdata) + factory URLSessionWebSocketMessage.fromData(Data d) => + URLSessionWebSocketMessage._( + ncb.NSURLSessionWebSocketMessage.alloc(linkedLibs) + .initWithData_(d._nsObject)); + + /// Create a WebSocket string message. + /// + /// See [NSURLSessionWebSocketMessage initWitString:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181193-initwithstring) + factory URLSessionWebSocketMessage.fromString(String s) => + URLSessionWebSocketMessage._( + ncb.NSURLSessionWebSocketMessage.alloc(linkedLibs) + .initWithString_(s.toNSString(linkedLibs))); + + /// The data associated with the WebSocket message. + /// + /// Will be `null` if the [URLSessionWebSocketMessage] is a string message. + /// + /// See [NSURLSessionWebSocketMessage.data](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181191-data) + Data? get data => _nsObject.data == null ? null : Data._(_nsObject.data!); + + /// The string associated with the WebSocket message. + /// + /// Will be `null` if the [URLSessionWebSocketMessage] is a data message. + /// + /// See [NSURLSessionWebSocketMessage.string](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181194-string) + String? get string => toStringOrNull(_nsObject.string); + + /// The type of the WebSocket message. + /// + /// See [NSURLSessionWebSocketMessage.type](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181195-type) + URLSessionWebSocketMessageType get type => + URLSessionWebSocketMessageType.values[_nsObject.type]; + + @override + String toString() => + '[URLSessionWebSocketMessage type=$type string=$string data=$data]'; +} + /// A task associated with downloading a URI. /// /// See [NSURLSessionTask](https://developer.apple.com/documentation/foundation/nsurlsessiontask) @@ -609,18 +666,18 @@ class URLSessionTask extends _ObjectHolder { /// The number of content bytes that are expected to be received from the /// server. /// - /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410663-countofbytesexpectedtoreceive) + /// See [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1410663-countofbytesexpectedtoreceive) int get countOfBytesExpectedToReceive => _nsObject.countOfBytesExpectedToReceive; /// The number of content bytes that have been received from the server. /// - /// [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411581-countofbytesreceived) + /// See [NSURLSessionTask.countOfBytesReceived](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411581-countofbytesreceived) int get countOfBytesReceived => _nsObject.countOfBytesReceived; /// The number of content bytes that the task expects to send to the server. /// - /// [NSURLSessionTask.countOfBytesExpectedToSend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411534-countofbytesexpectedtosend) + /// See [NSURLSessionTask.countOfBytesExpectedToSend](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1411534-countofbytesexpectedtosend) int get countOfBytesExpectedToSend => _nsObject.countOfBytesExpectedToSend; /// Whether the body of the response should be delivered incrementally or not. @@ -630,12 +687,12 @@ class URLSessionTask extends _ObjectHolder { /// Whether the body of the response should be delivered incrementally or not. /// - /// [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) + /// See [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) bool get prefersIncrementalDelivery => _nsObject.prefersIncrementalDelivery; /// Whether the body of the response should be delivered incrementally or not. /// - /// [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) + /// See [NSURLSessionTask.prefersIncrementalDelivery](https://developer.apple.com/documentation/foundation/nsurlsessiontask/3735881-prefersincrementaldelivery) set prefersIncrementalDelivery(bool value) => _nsObject.prefersIncrementalDelivery = value; @@ -665,6 +722,109 @@ class URLSessionDownloadTask extends URLSessionTask { String toString() => _toStringHelper('URLSessionDownloadTask'); } +/// A task associated with a WebSocket connection. +/// +/// See [NSURLSessionWebSocketTask](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask) +class URLSessionWebSocketTask extends URLSessionTask { + final ncb.NSURLSessionWebSocketTask _urlSessionWebSocketTask; + + URLSessionWebSocketTask._(ncb.NSURLSessionWebSocketTask super.c) + : _urlSessionWebSocketTask = c, + super._(); + + /// The close code set when the WebSocket connection is closed. + /// + /// See [NSURLSessionWebSocketTask.closeCode](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181201-closecode) + int get closeCode => _urlSessionWebSocketTask.closeCode; + + /// The close reason set when the WebSocket connection is closed. + /// If there is no close reason available this property will be null. + /// + /// See [NSURLSessionWebSocketTask.closeReason](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181202-closereason) + Data? get closeReason { + final reason = _urlSessionWebSocketTask.closeReason; + if (reason == null) { + return null; + } else { + return Data._(reason); + } + } + + /// Sends a single WebSocket message. + /// + /// The returned future will complete successfully when the message is sent + /// and with an [Error] on failure. + /// + /// See [NSURLSessionWebSocketTask.sendMessage:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181205-sendmessage) + Future sendMessage(URLSessionWebSocketMessage message) async { + final completer = Completer(); + final completionPort = ReceivePort(); + completionPort.listen((message) { + final ep = Pointer.fromAddress(message as int); + if (ep.address == 0) { + completer.complete(); + } else { + final error = Error._(ncb.NSError.castFromPointer(linkedLibs, ep, + retain: false, release: true)); + completer.completeError(error); + } + completionPort.close(); + }); + + helperLibs.CUPHTTPSendMessage(_urlSessionWebSocketTask.pointer, + message._nsObject.pointer, completionPort.sendPort.nativePort); + await completer.future; + } + + /// Receives a single WebSocket message. + /// + /// Throws an [Error] on failure. + /// + /// See [NSURLSessionWebSocketTask.receiveMessageWithCompletionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181204-receivemessagewithcompletionhand) + Future receiveMessage() async { + final completer = Completer(); + final completionPort = ReceivePort(); + completionPort.listen((d) { + final messageAndError = d as List; + + final mp = Pointer.fromAddress(messageAndError[0] as int); + final ep = Pointer.fromAddress(messageAndError[1] as int); + + final message = mp.address == 0 + ? null + : URLSessionWebSocketMessage._( + ncb.NSURLSessionWebSocketMessage.castFromPointer(linkedLibs, mp, + retain: false, release: true)); + final error = ep.address == 0 + ? null + : Error._(ncb.NSError.castFromPointer(linkedLibs, ep, + retain: false, release: true)); + + if (error != null) { + completer.completeError(error); + } else { + completer.complete(message); + } + completionPort.close(); + }); + + helperLibs.CUPHTTPReceiveMessage( + _urlSessionWebSocketTask.pointer, completionPort.sendPort.nativePort); + return completer.future; + } + + /// Sends close frame with the given code and optional reason. + /// + /// See [NSURLSessionWebSocketTask.cancelWithCloseCode:reason:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181200-cancelwithclosecode) + void cancelWithCloseCode(int closeCode, Data? reason) { + _urlSessionWebSocketTask.cancelWithCloseCode_reason_( + closeCode, reason?._nsObject); + } + + @override + String toString() => _toStringHelper('NSURLSessionWebSocketTask'); +} + /// A request to load a URL. /// /// See [NSURLRequest](https://developer.apple.com/documentation/foundation/nsurlrequest) @@ -1155,4 +1315,23 @@ class URLSession extends _ObjectHolder { onResponse: _onResponse); return task; } + + /// Creates a [URLSessionWebSocketTask] that represents a connection to a + /// WebSocket endpoint. + /// + /// To add custom protocols, add a "Sec-WebSocket-Protocol" header with a list + /// of protocols to [request]. + /// + /// See [NSURLSession webSocketTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/3235750-websockettaskwithrequest) + URLSessionWebSocketTask webSocketTaskWithRequest(URLRequest request) { + final task = URLSessionWebSocketTask._( + _nsObject.webSocketTaskWithRequest_(request._nsObject)); + _setupDelegation(_delegate, this, task, + onComplete: _onComplete, + onData: _onData, + onFinishedDownloading: _onFinishedDownloading, + onRedirect: _onRedirect, + onResponse: _onResponse); + return task; + } } diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index 1c4a15f8f6..273085f9e5 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -58684,6 +58684,61 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_location1 = _registerName1("location"); + + /// Creates a `Dart_CObject` containing the given `NSObject` pointer as an int. + Dart_CObject NSObjectToCObject( + ffi.Pointer n, + ) { + return _NSObjectToCObject( + n, + ); + } + + late final _NSObjectToCObjectPtr = _lookup< + ffi.NativeFunction)>>( + 'NSObjectToCObject'); + late final _NSObjectToCObject = _NSObjectToCObjectPtr.asFunction< + Dart_CObject Function(ffi.Pointer)>(); + + /// Executes [NSURLSessionWebSocketTask sendMessage:completionHandler:] and + /// sends the results of the completion handler to the given `Dart_Port`. + void CUPHTTPSendMessage( + ffi.Pointer task, + ffi.Pointer message, + int sendPort, + ) { + return _CUPHTTPSendMessage( + task, + message, + sendPort, + ); + } + + late final _CUPHTTPSendMessagePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + Dart_Port)>>('CUPHTTPSendMessage'); + late final _CUPHTTPSendMessage = _CUPHTTPSendMessagePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + /// Executes [NSURLSessionWebSocketTask receiveMessageWithCompletionHandler:] + /// and sends the results of the completion handler to the given `Dart_Port`. + void CUPHTTPReceiveMessage( + ffi.Pointer task, + int sendPort, + ) { + return _CUPHTTPReceiveMessage( + task, + sendPort, + ); + } + + late final _CUPHTTPReceiveMessagePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, Dart_Port)>>('CUPHTTPReceiveMessage'); + late final _CUPHTTPReceiveMessage = _CUPHTTPReceiveMessagePtr.asFunction< + void Function(ffi.Pointer, int)>(); } final class __mbstate_t extends ffi.Union { diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m new file mode 100644 index 0000000000..b05d1fc717 --- /dev/null +++ b/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m @@ -0,0 +1 @@ +#include "../../src/CUPHTTPCompletionHelper.m" diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index a18670a22c..82581dcda6 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 1.0.1 +version: 1.1.0-wip repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: diff --git a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m index a1eff15f9a..e04d3f3a8c 100644 --- a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m +++ b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m @@ -7,15 +7,9 @@ #import #include +#import "CUPHTTPCompletionHelper.h" #import "CUPHTTPForwardedDelegate.h" -static Dart_CObject NSObjectToCObject(NSObject* n) { - Dart_CObject cobj; - cobj.type = Dart_CObject_kInt64; - cobj.value.as_int64 = (int64_t) n; - return cobj; -} - static Dart_CObject MessageTypeToCObject(MessageType messageType) { Dart_CObject cobj; cobj.type = Dart_CObject_kInt64; diff --git a/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h b/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h new file mode 100644 index 0000000000..501b80b1fc --- /dev/null +++ b/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h @@ -0,0 +1,31 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Normally, we'd "import " +// but that would mean that ffigen would process every file in the Foundation +// framework, which is huge. So just import the headers that we need. +#import +#import + +#include "dart-sdk/include/dart_api_dl.h" + +/** + * Creates a `Dart_CObject` containing the given `NSObject` pointer as an int. + */ +Dart_CObject NSObjectToCObject(NSObject* n); + +/** + * Executes [NSURLSessionWebSocketTask sendMessage:completionHandler:] and + * sends the results of the completion handler to the given `Dart_Port`. + */ +extern void CUPHTTPSendMessage(NSURLSessionWebSocketTask *task, + NSURLSessionWebSocketMessage *message, + Dart_Port sendPort); + +/** + * Executes [NSURLSessionWebSocketTask receiveMessageWithCompletionHandler:] + * and sends the results of the completion handler to the given `Dart_Port`. + */ +extern void CUPHTTPReceiveMessage(NSURLSessionWebSocketTask *task, + Dart_Port sendPort); diff --git a/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m new file mode 100644 index 0000000000..9f8137d395 --- /dev/null +++ b/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m @@ -0,0 +1,45 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#import "CUPHTTPCompletionHelper.h" + +#import +#include + +Dart_CObject NSObjectToCObject(NSObject* n) { + Dart_CObject cobj; + cobj.type = Dart_CObject_kInt64; + cobj.value.as_int64 = (int64_t) n; + return cobj; +} + +void CUPHTTPSendMessage(NSURLSessionWebSocketTask *task, NSURLSessionWebSocketMessage *message, Dart_Port sendPort) { + [task sendMessage: message + completionHandler: ^(NSError *error) { + [error retain]; + Dart_CObject message_cobj = NSObjectToCObject(error); + const bool success = Dart_PostCObject_DL(sendPort, &message_cobj); + NSCAssert(success, @"Dart_PostCObject_DL failed."); + }]; +} + +void CUPHTTPReceiveMessage(NSURLSessionWebSocketTask *task, Dart_Port sendPort) { + [task + receiveMessageWithCompletionHandler: ^(NSURLSessionWebSocketMessage *message, NSError *error) { + [message retain]; + [error retain]; + + Dart_CObject cmessage = NSObjectToCObject(message); + Dart_CObject cerror = NSObjectToCObject(error); + Dart_CObject* message_carray[] = { &cmessage, &cerror }; + + Dart_CObject message_cobj; + message_cobj.type = Dart_CObject_kArray; + message_cobj.value.as_array.length = 2; + message_cobj.value.as_array.values = message_carray; + + const bool success = Dart_PostCObject_DL(sendPort, &message_cobj); + NSCAssert(success, @"Dart_PostCObject_DL failed."); + }]; +} From 0cc7fcaf10df3b462eca7230a6e96c080124b83f Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 9 Jun 2023 08:30:13 -0700 Subject: [PATCH 237/448] Support delegate methods for WebSocketTask (#958) --- .../url_session_delegate_test.dart | 235 ++++++++++++++++++ .../url_session_task_test.dart | 9 + .../cupertino_http/lib/src/cupertino_api.dart | 228 ++++++++++++----- .../lib/src/native_cupertino_bindings.dart | 208 ++++++++++++++++ .../src/CUPHTTPClientDelegate.h | 2 + .../src/CUPHTTPClientDelegate.m | 65 ++++- .../src/CUPHTTPForwardedDelegate.h | 22 ++ .../src/CUPHTTPForwardedDelegate.m | 41 +++ 8 files changed, 749 insertions(+), 61 deletions(-) diff --git a/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart index 50cf1245d3..0d86694c09 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; +import 'dart:convert'; import 'dart:io'; import 'package:cupertino_http/cupertino_http.dart'; @@ -435,6 +436,235 @@ void testOnRedirect(URLSessionConfiguration config) { }); } +void testOnWebSocketTaskOpened(URLSessionConfiguration config) { + group('onWebSocketTaskOpened', () { + late HttpServer server; + + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + if (request.requestedUri.queryParameters.containsKey('error')) { + request.response.statusCode = 500; + unawaited(request.response.close()); + return; + } + final webSocket = await WebSocketTransformer.upgrade( + request, + protocolSelector: (l) => 'myprotocol', + ); + await webSocket.close(); + }); + }); + tearDown(() { + server.close(); + }); + + test('with protocol', () async { + final c = Completer(); + late String? actualProtocol; + late URLSession actualSession; + late URLSessionWebSocketTask actualTask; + + final session = URLSession.sessionWithConfiguration(config, + onWebSocketTaskOpened: (s, t, p) { + actualSession = s; + actualTask = t; + actualProtocol = p; + c.complete(); + }); + + final request = MutableURLRequest.fromUrl( + Uri.parse('http://localhost:${server.port}')) + ..setValueForHttpHeaderField('Sec-WebSocket-Protocol', 'myprotocol'); + + final task = session.webSocketTaskWithRequest(request)..resume(); + await c.future; + expect(actualSession, session); + expect(actualTask, task); + expect(actualProtocol, 'myprotocol'); + }); + + test('without protocol', () async { + final c = Completer(); + late String? actualProtocol; + late URLSession actualSession; + late URLSessionWebSocketTask actualTask; + + final session = URLSession.sessionWithConfiguration(config, + onWebSocketTaskOpened: (s, t, p) { + actualSession = s; + actualTask = t; + actualProtocol = p; + c.complete(); + }); + + final request = MutableURLRequest.fromUrl( + Uri.parse('http://localhost:${server.port}')); + final task = session.webSocketTaskWithRequest(request)..resume(); + await c.future; + expect(actualSession, session); + expect(actualTask, task); + expect(actualProtocol, null); + }); + + test('server failure', () async { + final c = Completer(); + var onWebSocketTaskOpenedCalled = false; + + final session = URLSession.sessionWithConfiguration(config, + onWebSocketTaskOpened: (s, t, p) { + onWebSocketTaskOpenedCalled = true; + }, onComplete: (s, t, e) { + expect(e, isNotNull); + c.complete(); + }); + + final request = MutableURLRequest.fromUrl( + Uri.parse('http://localhost:${server.port}?error=1')); + session.webSocketTaskWithRequest(request).resume(); + await c.future; + expect(onWebSocketTaskOpenedCalled, false); + }); + }); +} + +void testOnWebSocketTaskClosed(URLSessionConfiguration config) { + group('testOnWebSocketTaskClosed', () { + late HttpServer server; + late int? serverCode; + late String? serverReason; + + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + if (request.requestedUri.queryParameters.containsKey('error')) { + request.response.statusCode = 500; + unawaited(request.response.close()); + return; + } + final webSocket = await WebSocketTransformer.upgrade( + request, + ); + await webSocket.close(serverCode, serverReason); + }); + }); + tearDown(() { + server.close(); + }); + + test('close no code', () async { + final c = Completer(); + late int actualCloseCode; + late String? actualReason; + late URLSession actualSession; + late URLSessionWebSocketTask actualTask; + + serverCode = null; + serverReason = null; + + final session = URLSession.sessionWithConfiguration(config, + onWebSocketTaskOpened: (session, task, protocol) {}, + onWebSocketTaskClosed: (session, task, closeCode, reason) { + actualSession = session; + actualTask = task; + actualCloseCode = closeCode!; + actualReason = utf8.decode(reason!.bytes); + c.complete(); + }); + + final request = MutableURLRequest.fromUrl( + Uri.parse('http://localhost:${server.port}')); + + final task = session.webSocketTaskWithRequest(request)..resume(); + + expect( + task.receiveMessage(), + throwsA(isA() + .having((e) => e.code, 'code', 57 // Socket is not connected. + ))); + await c.future; + expect(actualSession, session); + expect(actualTask, task); + expect(actualCloseCode, 1005); + expect(actualReason, ''); + }); + + test('close code', () async { + final c = Completer(); + late int actualCloseCode; + late String? actualReason; + late URLSession actualSession; + late URLSessionWebSocketTask actualTask; + + serverCode = 4000; + serverReason = null; + + final session = URLSession.sessionWithConfiguration(config, + onWebSocketTaskOpened: (session, task, protocol) {}, + onWebSocketTaskClosed: (session, task, closeCode, reason) { + actualSession = session; + actualTask = task; + actualCloseCode = closeCode!; + actualReason = utf8.decode(reason!.bytes); + c.complete(); + }); + + final request = MutableURLRequest.fromUrl( + Uri.parse('http://localhost:${server.port}')); + + final task = session.webSocketTaskWithRequest(request)..resume(); + + expect( + task.receiveMessage(), + throwsA(isA() + .having((e) => e.code, 'code', 57 // Socket is not connected. + ))); + await c.future; + expect(actualSession, session); + expect(actualTask, task); + expect(actualCloseCode, serverCode); + expect(actualReason, ''); + }); + + test('close code and reason', () async { + final c = Completer(); + late int actualCloseCode; + late String? actualReason; + late URLSession actualSession; + late URLSessionWebSocketTask actualTask; + + serverCode = 4000; + serverReason = 'no real reason'; + + final session = URLSession.sessionWithConfiguration(config, + onWebSocketTaskOpened: (session, task, protocol) {}, + onWebSocketTaskClosed: (session, task, closeCode, reason) { + actualSession = session; + actualTask = task; + actualCloseCode = closeCode!; + actualReason = utf8.decode(reason!.bytes); + c.complete(); + }); + + final request = MutableURLRequest.fromUrl( + Uri.parse('http://localhost:${server.port}')); + + final task = session.webSocketTaskWithRequest(request)..resume(); + + expect( + task.receiveMessage(), + throwsA(isA() + .having((e) => e.code, 'code', 57 // Socket is not connected. + ))); + await c.future; + expect(actualSession, session); + expect(actualTask, task); + expect(actualCloseCode, serverCode); + expect(actualReason, serverReason); + }); + }); +} + void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); @@ -446,6 +676,7 @@ void main() { testOnData(config); // onRedirect is not called for background sessions. testOnFinishedDownloading(config); + // WebSocket tasks are not supported in background sessions. }); group('defaultSessionConfiguration', () { @@ -455,6 +686,8 @@ void main() { testOnData(config); testOnRedirect(config); testOnFinishedDownloading(config); + testOnWebSocketTaskOpened(config); + testOnWebSocketTaskClosed(config); }); group('ephemeralSessionConfiguration', () { @@ -464,5 +697,7 @@ void main() { testOnData(config); testOnRedirect(config); testOnFinishedDownloading(config); + testOnWebSocketTaskOpened(config); + testOnWebSocketTaskClosed(config); }); } diff --git a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart index 35e411b84a..c15f1a86d2 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart @@ -46,6 +46,15 @@ void testWebSocketTask() { await server.close(); }); + test('background session', () { + final session = URLSession.sessionWithConfiguration( + URLSessionConfiguration.backgroundSession('background')); + expect( + () => session.webSocketTaskWithRequest(URLRequest.fromUrl( + Uri.parse('ws://localhost:${server.port}/?noclose'))), + throwsUnsupportedError); + }); + test('client code and reason', () async { final session = URLSession.sharedSession(); final task = session.webSocketTaskWithRequest(URLRequest.fromUrl( diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 1fa2524b3f..16c79e0f78 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -171,33 +171,44 @@ class Error extends _ObjectHolder implements Exception { /// See [NSURLSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration) class URLSessionConfiguration extends _ObjectHolder { - URLSessionConfiguration._(super.c); + // A configuration created with + // [`backgroundSessionConfigurationWithIdentifier`](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1407496-backgroundsessionconfigurationwi) + final bool _isBackground; + + URLSessionConfiguration._(super.c, {required bool isBackground}) + : _isBackground = isBackground; /// A configuration suitable for performing HTTP uploads and downloads in /// the background. /// /// See [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1407496-backgroundsessionconfigurationwi) factory URLSessionConfiguration.backgroundSession(String identifier) => - URLSessionConfiguration._(ncb.NSURLSessionConfiguration - .backgroundSessionConfigurationWithIdentifier_( - linkedLibs, identifier.toNSString(linkedLibs))); + URLSessionConfiguration._( + ncb.NSURLSessionConfiguration + .backgroundSessionConfigurationWithIdentifier_( + linkedLibs, identifier.toNSString(linkedLibs)), + isBackground: true); /// A configuration that uses caching and saves cookies and credentials. /// /// See [NSURLSessionConfiguration defaultSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411560-defaultsessionconfiguration) factory URLSessionConfiguration.defaultSessionConfiguration() => - URLSessionConfiguration._(ncb.NSURLSessionConfiguration.castFrom( - ncb.NSURLSessionConfiguration.getDefaultSessionConfiguration( - linkedLibs)!)); + URLSessionConfiguration._( + ncb.NSURLSessionConfiguration.castFrom( + ncb.NSURLSessionConfiguration.getDefaultSessionConfiguration( + linkedLibs)!), + isBackground: false); /// A session configuration that uses no persistent storage for caches, /// cookies, or credentials. /// /// See [NSURLSessionConfiguration ephemeralSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1410529-ephemeralsessionconfiguration) factory URLSessionConfiguration.ephemeralSessionConfiguration() => - URLSessionConfiguration._(ncb.NSURLSessionConfiguration.castFrom( - ncb.NSURLSessionConfiguration.getEphemeralSessionConfiguration( - linkedLibs)!)); + URLSessionConfiguration._( + ncb.NSURLSessionConfiguration.castFrom( + ncb.NSURLSessionConfiguration.getEphemeralSessionConfiguration( + linkedLibs)!), + isBackground: false); /// Whether connections over a cellular network are allowed. /// @@ -970,18 +981,27 @@ class MutableURLRequest extends URLRequest { /// to send a [ncb.CUPHTTPForwardedDelegate] object to a send port, which is /// then processed by [_setupDelegation] and forwarded to the given methods. void _setupDelegation( - ncb.CUPHTTPClientDelegate delegate, URLSession session, URLSessionTask task, - {URLRequest? Function(URLSession session, URLSessionTask task, - HTTPURLResponse response, URLRequest newRequest)? - onRedirect, - URLSessionResponseDisposition Function( - URLSession session, URLSessionTask task, URLResponse response)? - onResponse, - void Function(URLSession session, URLSessionTask task, Data error)? onData, - void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? - onFinishedDownloading, - void Function(URLSession session, URLSessionTask task, Error? error)? - onComplete}) { + ncb.CUPHTTPClientDelegate delegate, + URLSession session, + URLSessionTask task, { + URLRequest? Function(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest newRequest)? + onRedirect, + URLSessionResponseDisposition Function( + URLSession session, URLSessionTask task, URLResponse response)? + onResponse, + void Function(URLSession session, URLSessionTask task, Data error)? onData, + void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? + onFinishedDownloading, + void Function(URLSession session, URLSessionTask task, Error? error)? + onComplete, + void Function( + URLSession session, URLSessionWebSocketTask task, String? protocol)? + onWebSocketTaskOpened, + void Function(URLSession session, URLSessionWebSocketTask task, int closeCode, + Data? reason)? + onWebSocketTaskClosed, +}) { final responsePort = ReceivePort(); responsePort.listen((d) { final message = d as List; @@ -1110,6 +1130,51 @@ void _setupDelegation( responsePort.close(); } break; + case ncb.MessageType.WebSocketOpened: + final webSocketOpened = + ncb.CUPHTTPForwardedWebSocketOpened.castFrom(forwardedDelegate); + + try { + if (onWebSocketTaskOpened == null) { + break; + } + try { + onWebSocketTaskOpened(session, task as URLSessionWebSocketTask, + webSocketOpened.protocol?.toString()); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + } finally { + webSocketOpened.finish(); + } + break; + case ncb.MessageType.WebSocketClosed: + final webSocketClosed = + ncb.CUPHTTPForwardedWebSocketClosed.castFrom(forwardedDelegate); + + try { + if (onWebSocketTaskClosed == null) { + break; + } + try { + onWebSocketTaskClosed( + session, + task as URLSessionWebSocketTask, + webSocketClosed.closeCode, + webSocketClosed.reason == null + ? null + : Data._(webSocketClosed.reason!)); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + } finally { + webSocketClosed.finish(); + } + break; } }); final config = ncb.CUPHTTPTaskConfiguration.castFrom( @@ -1126,36 +1191,55 @@ class URLSession extends _ObjectHolder { // Provide our own native delegate to `NSURLSession` because delegates can be // called on arbitrary threads and Dart code cannot be. static final _delegate = ncb.CUPHTTPClientDelegate.new1(helperLibs); + // Indicates if the session is a background session. Copied from the + // [URLSessionConfiguration._isBackground] associated with this [URLSession]. + final bool _isBackground; - URLRequest? Function(URLSession session, URLSessionTask task, + final URLRequest? Function(URLSession session, URLSessionTask task, HTTPURLResponse response, URLRequest newRequest)? _onRedirect; - URLSessionResponseDisposition Function( + final URLSessionResponseDisposition Function( URLSession session, URLSessionTask task, URLResponse response)? _onResponse; - void Function(URLSession session, URLSessionTask task, Data error)? _onData; - void Function(URLSession session, URLSessionTask task, Error? error)? + final void Function(URLSession session, URLSessionTask task, Data error)? + _onData; + final void Function(URLSession session, URLSessionTask task, Error? error)? _onComplete; - void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? + final void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? _onFinishedDownloading; - - URLSession._(super.c, - {URLRequest? Function(URLSession session, URLSessionTask task, - HTTPURLResponse response, URLRequest newRequest)? - onRedirect, - URLSessionResponseDisposition Function( - URLSession session, URLSessionTask task, URLResponse response)? - onResponse, - void Function(URLSession session, URLSessionTask task, Data error)? - onData, - void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? - onFinishedDownloading, - void Function(URLSession session, URLSessionTask task, Error? error)? - onComplete}) - : _onRedirect = onRedirect, + final void Function( + URLSession session, URLSessionWebSocketTask task, String? protocol)? + _onWebSocketTaskOpened; + final void Function(URLSession session, URLSessionWebSocketTask task, + int closeCode, Data? reason)? _onWebSocketTaskClosed; + + URLSession._( + super.c, { + required bool isBackground, + URLRequest? Function(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest newRequest)? + onRedirect, + URLSessionResponseDisposition Function( + URLSession session, URLSessionTask task, URLResponse response)? + onResponse, + void Function(URLSession session, URLSessionTask task, Data error)? onData, + void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? + onFinishedDownloading, + void Function(URLSession session, URLSessionTask task, Error? error)? + onComplete, + void Function( + URLSession session, URLSessionWebSocketTask task, String? protocol)? + onWebSocketTaskOpened, + void Function(URLSession session, URLSessionWebSocketTask task, + int closeCode, Data? reason)? + onWebSocketTaskClosed, + }) : _isBackground = isBackground, + _onRedirect = onRedirect, _onResponse = onResponse, _onData = onData, _onFinishedDownloading = onFinishedDownloading, - _onComplete = onComplete; + _onComplete = onComplete, + _onWebSocketTaskOpened = onWebSocketTaskOpened, + _onWebSocketTaskClosed = onWebSocketTaskClosed; /// A client with reasonable default behavior. /// @@ -1193,19 +1277,35 @@ class URLSession extends _ObjectHolder { /// [URLSession:task:didCompleteWithError:](https://developer.apple.com/documentation/foundation/nsurlsessiontaskdelegate/1411610-urlsession) /// /// See [sessionWithConfiguration:delegate:delegateQueue:](https://developer.apple.com/documentation/foundation/nsurlsession/1411597-sessionwithconfiguration) - factory URLSession.sessionWithConfiguration(URLSessionConfiguration config, - {URLRequest? Function(URLSession session, URLSessionTask task, - HTTPURLResponse response, URLRequest newRequest)? - onRedirect, - URLSessionResponseDisposition Function( - URLSession session, URLSessionTask task, URLResponse response)? - onResponse, - void Function(URLSession session, URLSessionTask task, Data error)? - onData, - void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? - onFinishedDownloading, - void Function(URLSession session, URLSessionTask task, Error? error)? - onComplete}) { + /// + /// If [onWebSocketTaskOpened] is set then it will be called when a + /// [URLSessionWebSocketTask] successfully negotiated the handshake with the + /// server. + /// + /// If [onWebSocketTaskClosed] is set then it will be called if a + /// [URLSessionWebSocketTask] receives a close control frame from the server. + /// NOTE: A [URLSessionWebSocketTask.receiveMessage] must be in flight for + /// [onWebSocketTaskClosed] to be called. + factory URLSession.sessionWithConfiguration( + URLSessionConfiguration config, { + URLRequest? Function(URLSession session, URLSessionTask task, + HTTPURLResponse response, URLRequest newRequest)? + onRedirect, + URLSessionResponseDisposition Function( + URLSession session, URLSessionTask task, URLResponse response)? + onResponse, + void Function(URLSession session, URLSessionTask task, Data error)? onData, + void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? + onFinishedDownloading, + void Function(URLSession session, URLSessionTask task, Error? error)? + onComplete, + void Function( + URLSession session, URLSessionWebSocketTask task, String? protocol)? + onWebSocketTaskOpened, + void Function(URLSession session, URLSessionWebSocketTask task, + int? closeCode, Data? reason)? + onWebSocketTaskClosed, + }) { // Avoid the complexity of simultaneous or out-of-order delegate callbacks // by only allowing callbacks to execute sequentially. // See https://developer.apple.com/forums/thread/47252 @@ -1220,18 +1320,22 @@ class URLSession extends _ObjectHolder { return URLSession._( ncb.NSURLSession.sessionWithConfiguration_delegate_delegateQueue_( linkedLibs, config._nsObject, _delegate, queue), + isBackground: config._isBackground, onRedirect: onRedirect, onResponse: onResponse, onData: onData, onFinishedDownloading: onFinishedDownloading, - onComplete: onComplete); + onComplete: onComplete, + onWebSocketTaskOpened: onWebSocketTaskOpened, + onWebSocketTaskClosed: onWebSocketTaskClosed); } /// A **copy** of the configuration for this session. /// /// See [NSURLSession.configuration](https://developer.apple.com/documentation/foundation/nsurlsession/1411477-configuration) URLSessionConfiguration get configuration => URLSessionConfiguration._( - ncb.NSURLSessionConfiguration.castFrom(_nsObject.configuration!)); + ncb.NSURLSessionConfiguration.castFrom(_nsObject.configuration!), + isBackground: _isBackground); /// A description of the session that may be useful for debugging. /// @@ -1324,6 +1428,10 @@ class URLSession extends _ObjectHolder { /// /// See [NSURLSession webSocketTaskWithRequest:](https://developer.apple.com/documentation/foundation/nsurlsession/3235750-websockettaskwithrequest) URLSessionWebSocketTask webSocketTaskWithRequest(URLRequest request) { + if (_isBackground) { + throw UnsupportedError( + 'WebSocket tasks are not supported in background sessions'); + } final task = URLSessionWebSocketTask._( _nsObject.webSocketTaskWithRequest_(request._nsObject)); _setupDelegation(_delegate, this, task, @@ -1331,7 +1439,9 @@ class URLSession extends _ObjectHolder { onData: _onData, onFinishedDownloading: _onFinishedDownloading, onRedirect: _onRedirect, - onResponse: _onResponse); + onResponse: _onResponse, + onWebSocketTaskOpened: _onWebSocketTaskOpened, + onWebSocketTaskClosed: _onWebSocketTaskClosed); return task; } } diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index 273085f9e5..9ed49e403a 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -58684,6 +58684,82 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_location1 = _registerName1("location"); + late final _class_CUPHTTPForwardedWebSocketOpened1 = + _getClass1("CUPHTTPForwardedWebSocketOpened"); + late final _sel_initWithSession_webSocketTask_didOpenWithProtocol_1 = + _registerName1("initWithSession:webSocketTask:didOpenWithProtocol:"); + ffi.Pointer _objc_msgSend_491( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer webSocketTask, + ffi.Pointer protocol, + ) { + return __objc_msgSend_491( + obj, + sel, + session, + webSocketTask, + protocol, + ); + } + + late final __objc_msgSend_491Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_491 = __objc_msgSend_491Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_protocol1 = _registerName1("protocol"); + late final _class_CUPHTTPForwardedWebSocketClosed1 = + _getClass1("CUPHTTPForwardedWebSocketClosed"); + late final _sel_initWithSession_webSocketTask_didCloseWithCode_reason_1 = + _registerName1("initWithSession:webSocketTask:didCloseWithCode:reason:"); + ffi.Pointer _objc_msgSend_492( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer session, + ffi.Pointer webSocketTask, + int closeCode, + ffi.Pointer reason, + ) { + return __objc_msgSend_492( + obj, + sel, + session, + webSocketTask, + closeCode, + reason, + ); + } + + late final __objc_msgSend_492Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_492 = __objc_msgSend_492Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); /// Creates a `Dart_CObject` containing the given `NSObject` pointer as an int. Dart_CObject NSObjectToCObject( @@ -83755,6 +83831,8 @@ abstract class MessageType { static const int CompletedMessage = 2; static const int RedirectMessage = 3; static const int FinishedDownloading = 4; + static const int WebSocketOpened = 5; + static const int WebSocketClosed = 6; } /// The configuration associated with a NSURLSessionTask. @@ -84305,6 +84383,136 @@ class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { } } +class CUPHTTPForwardedWebSocketOpened extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedWebSocketOpened._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedWebSocketOpened] that points to the same underlying object as [other]. + static CUPHTTPForwardedWebSocketOpened castFrom( + T other) { + return CUPHTTPForwardedWebSocketOpened._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedWebSocketOpened] that wraps the given raw object pointer. + static CUPHTTPForwardedWebSocketOpened castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedWebSocketOpened._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedWebSocketOpened]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedWebSocketOpened1); + } + + NSObject initWithSession_webSocketTask_didOpenWithProtocol_( + NSURLSession? session, + NSURLSessionWebSocketTask? webSocketTask, + NSString? protocol) { + final _ret = _lib._objc_msgSend_491( + _id, + _lib._sel_initWithSession_webSocketTask_didOpenWithProtocol_1, + session?._id ?? ffi.nullptr, + webSocketTask?._id ?? ffi.nullptr, + protocol?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSString? get protocol { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_protocol1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedWebSocketOpened new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedWebSocketOpened1, _lib._sel_new1); + return CUPHTTPForwardedWebSocketOpened._(_ret, _lib, + retain: false, release: true); + } + + static CUPHTTPForwardedWebSocketOpened alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedWebSocketOpened1, _lib._sel_alloc1); + return CUPHTTPForwardedWebSocketOpened._(_ret, _lib, + retain: false, release: true); + } +} + +class CUPHTTPForwardedWebSocketClosed extends CUPHTTPForwardedDelegate { + CUPHTTPForwardedWebSocketClosed._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPForwardedWebSocketClosed] that points to the same underlying object as [other]. + static CUPHTTPForwardedWebSocketClosed castFrom( + T other) { + return CUPHTTPForwardedWebSocketClosed._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPForwardedWebSocketClosed] that wraps the given raw object pointer. + static CUPHTTPForwardedWebSocketClosed castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPForwardedWebSocketClosed._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPForwardedWebSocketClosed]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPForwardedWebSocketClosed1); + } + + NSObject initWithSession_webSocketTask_didCloseWithCode_reason_( + NSURLSession? session, + NSURLSessionWebSocketTask? webSocketTask, + int closeCode, + NSData? reason) { + final _ret = _lib._objc_msgSend_492( + _id, + _lib._sel_initWithSession_webSocketTask_didCloseWithCode_reason_1, + session?._id ?? ffi.nullptr, + webSocketTask?._id ?? ffi.nullptr, + closeCode, + reason?._id ?? ffi.nullptr); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + int get closeCode { + return _lib._objc_msgSend_424(_id, _lib._sel_closeCode1); + } + + NSData? get reason { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_reason1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); + } + + static CUPHTTPForwardedWebSocketClosed new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedWebSocketClosed1, _lib._sel_new1); + return CUPHTTPForwardedWebSocketClosed._(_ret, _lib, + retain: false, release: true); + } + + static CUPHTTPForwardedWebSocketClosed alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPForwardedWebSocketClosed1, _lib._sel_alloc1); + return CUPHTTPForwardedWebSocketClosed._(_ret, _lib, + retain: false, release: true); + } +} + const int noErr = 0; const int kNilOptions = 0; diff --git a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.h b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.h index be1d0e2d08..775b70af56 100644 --- a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.h +++ b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.h @@ -19,6 +19,8 @@ typedef NS_ENUM(NSInteger, MessageType) { CompletedMessage = 2, RedirectMessage = 3, FinishedDownloading = 4, + WebSocketOpened = 5, + WebSocketClosed = 6, }; /** diff --git a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m index e04d3f3a8c..b89b93c076 100644 --- a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m +++ b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m @@ -46,7 +46,8 @@ - (void)dealloc { [super dealloc]; } -- (void)registerTask:(NSURLSessionTask *) task withConfiguration:(CUPHTTPTaskConfiguration *)config { +- (void)registerTask:(NSURLSessionTask *) task + withConfiguration:(CUPHTTPTaskConfiguration *)config { [taskConfigurations setObject:config forKey:task]; } @@ -155,7 +156,7 @@ - (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)task } - (void)URLSession:(NSURLSession *)session - downloadTask:(NSURLSessionDownloadTask *)downloadTask + downloadTask:(NSURLSessionDownloadTask *)downloadTask didFinishDownloadingToURL:(NSURL *)location { CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:downloadTask]; NSAssert(config != nil, @"No configuration for task."); @@ -213,4 +214,64 @@ - (void)URLSession:(NSURLSession *)session [forwardedComplete release]; } +// https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketdelegate?language=objc + + +- (void)URLSession:(NSURLSession *)session + webSocketTask:(NSURLSessionWebSocketTask *)task +didOpenWithProtocol:(NSString *)protocol { + CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; + NSAssert(config != nil, @"No configuration for task."); + + CUPHTTPForwardedWebSocketOpened *opened = [[CUPHTTPForwardedWebSocketOpened alloc] + initWithSession:session webSocketTask:task + didOpenWithProtocol: protocol]; + + Dart_CObject ctype = MessageTypeToCObject(WebSocketOpened); + Dart_CObject cComplete = NSObjectToCObject(opened); + Dart_CObject* message_carray[] = { &ctype, &cComplete }; + + Dart_CObject message_cobj; + message_cobj.type = Dart_CObject_kArray; + message_cobj.value.as_array.length = 2; + message_cobj.value.as_array.values = message_carray; + + [opened.lock lock]; // After this line, any attempt to acquire the lock will wait. + const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); + NSAssert(success, @"Dart_PostCObject_DL failed."); + + [opened.lock lock]; + [opened release]; +} + + +- (void)URLSession:(NSURLSession *)session + webSocketTask:(NSURLSessionWebSocketTask *)task + didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode + reason:(NSData *)reason { + CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; + NSAssert(config != nil, @"No configuration for task."); + + CUPHTTPForwardedWebSocketClosed *closed = [[CUPHTTPForwardedWebSocketClosed alloc] + initWithSession:session webSocketTask:task + code: closeCode + reason: reason]; + + Dart_CObject ctype = MessageTypeToCObject(WebSocketClosed); + Dart_CObject cComplete = NSObjectToCObject(closed); + Dart_CObject* message_carray[] = { &ctype, &cComplete }; + + Dart_CObject message_cobj; + message_cobj.type = Dart_CObject_kArray; + message_cobj.value.as_array.length = 2; + message_cobj.value.as_array.values = message_carray; + + [closed.lock lock]; // After this line, any attempt to acquire the lock will wait. + const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); + NSAssert(success, @"Dart_PostCObject_DL failed."); + + [closed.lock lock]; + [closed release]; +} + @end diff --git a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h index 7e6ce336a2..9e76ca80fb 100644 --- a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h +++ b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h @@ -106,3 +106,25 @@ @property (readonly) NSURL* location; @end + +@interface CUPHTTPForwardedWebSocketOpened : CUPHTTPForwardedDelegate + +- (id) initWithSession:(NSURLSession *)session + webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask + didOpenWithProtocol:(NSString *)protocol; + +@property (readonly) NSString* protocol; + +@end + +@interface CUPHTTPForwardedWebSocketClosed : CUPHTTPForwardedDelegate + +- (id) initWithSession:(NSURLSession *)session + webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask + didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode + reason:(NSData *)reason; + +@property (readonly) NSURLSessionWebSocketCloseCode closeCode; +@property (readonly) NSData* reason; + +@end diff --git a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m index 7ffa812fe9..03e413d5db 100644 --- a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m +++ b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m @@ -140,3 +140,44 @@ - (void) dealloc { } @end + +@implementation CUPHTTPForwardedWebSocketOpened + +- (id) initWithSession:(NSURLSession *)session + webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask + didOpenWithProtocol:(NSString *)protocol { + self = [super initWithSession: session task: webSocketTask]; + if (self != nil) { + self->_protocol = [protocol retain]; + } + return self; +} + +- (void) dealloc { + [self->_protocol release]; + [super dealloc]; +} + +@end + +@implementation CUPHTTPForwardedWebSocketClosed + +- (id) initWithSession:(NSURLSession *)session + webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask + code:(NSURLSessionWebSocketCloseCode)closeCode + reason:(NSData *)reason { + self = [super initWithSession: session task: webSocketTask]; + if (self != nil) { + self->_closeCode = closeCode; + self->_reason = [reason retain]; + } + return self; +} + +- (void) dealloc { + [self->_reason release]; + [super dealloc]; +} + +@end + From 1c54b908e5f152f6a91b84eddbb4f4e6f6276c7b Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 9 Jun 2023 08:30:29 -0700 Subject: [PATCH 238/448] Run common URLSessionTask tests on URLSessionWebSocketTask (#959) --- .../url_session_task_test.dart | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart index c15f1a86d2..8ea2d86828 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart @@ -151,8 +151,9 @@ void testWebSocketTask() { }); } -void testURLSessionTask( - URLSessionTask Function(URLSession session, Uri url) f) { +void testURLSessionTaskCommon( + URLSessionTask Function(URLSession session, Uri url) f, + {bool suspendedAfterCancel = false}) { group('task states', () { late HttpServer server; late URLSessionTask task; @@ -186,7 +187,11 @@ void testURLSessionTask( test('cancel', () { task.cancel(); - expect(task.state, URLSessionTaskState.urlSessionTaskStateCanceling); + if (suspendedAfterCancel) { + expect(task.state, URLSessionTaskState.urlSessionTaskStateSuspended); + } else { + expect(task.state, URLSessionTaskState.urlSessionTaskStateCanceling); + } expect(task.response, null); task.toString(); // Just verify that there is no crash. }); @@ -365,14 +370,21 @@ void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); group('data task', () { - testURLSessionTask( + testURLSessionTaskCommon( (session, uri) => session.dataTaskWithRequest(URLRequest.fromUrl(uri))); }); group('download task', () { - testURLSessionTask((session, uri) => + testURLSessionTaskCommon((session, uri) => session.downloadTaskWithRequest(URLRequest.fromUrl(uri))); }); + group('websocket task', () { + testURLSessionTaskCommon( + (session, uri) => + session.webSocketTaskWithRequest(URLRequest.fromUrl(uri)), + suspendedAfterCancel: true); + }); + testWebSocketTask(); } From 0000263afe64ac0c2d5b7c6ebcc8da44dcec8e75 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 16 Jun 2023 12:34:45 -0700 Subject: [PATCH 239/448] Unskip a skipped test (#966) The linked issue is closed as fixed. Skip only when required by the client implementation. --- .../http_client_conformance_tests/lib/src/redirect_tests.dart | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart index 6be306c787..6a5c547709 100644 --- a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart @@ -51,9 +51,7 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { client.send(request), throwsA(isA() .having((e) => e.message, 'message', 'Redirect limit exceeded'))); - }, - skip: 'Re-enable after https://github.com/dart-lang/sdk/issues/49012 ' - 'is fixed'); + }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : false); test('exactly the right number of allowed redirects', () async { final request = Request('GET', Uri.http(host, '/5')) From 82eee3f58db7f7f54d002f3b4064e8f1d86751da Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 20 Jun 2023 12:23:31 -0700 Subject: [PATCH 240/448] Make StreameRequest.sink a StreamSink (#965) Closes #727 This class was not designed for extension, but there is at least one extending implementation. I don't see any overrides of this field, so no existing usage should be broken. Some new lints may surface for unawaited futures - the returned futures should not be awaited. --- pkgs/http/CHANGELOG.md | 10 +++++++--- pkgs/http/lib/src/streamed_request.dart | 9 ++++++--- pkgs/http/pubspec.yaml | 2 +- pkgs/http/test/html/client_test.dart | 7 ++++--- pkgs/http/test/html/streamed_request_test.dart | 8 +++++--- pkgs/http/test/io/client_test.dart | 11 +++++------ pkgs/http/test/io/streamed_request_test.dart | 11 +++++------ 7 files changed, 33 insertions(+), 25 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 29d7761fc6..a23d4c9b22 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,7 +1,11 @@ -## 1.0.1 +## 1.1.0-wip + +* Add better error messages for `SocketException`s when using `IOClient`. +* Make `StreamedRequest.sink` a `StreamSink`. This makes `request.sink.close()` + return a `Future` instead of `void`, but the returned future should _not_ be + awaited. The Future returned from `sink.close()` may only complete after the + request has been sent. -* Add better error messages for `SocketException`s when using `IOClient`. - ## 1.0.0 * Requires Dart 3.0 or later. diff --git a/pkgs/http/lib/src/streamed_request.dart b/pkgs/http/lib/src/streamed_request.dart index 46519567b9..d10386e263 100644 --- a/pkgs/http/lib/src/streamed_request.dart +++ b/pkgs/http/lib/src/streamed_request.dart @@ -20,9 +20,12 @@ import 'byte_stream.dart'; /// ```dart /// final request = http.StreamedRequest('POST', Uri.http('example.com', '')) /// ..contentLength = 10 -/// ..sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) -/// ..sink.close(); // The sink must be closed to end the request. +/// ..sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); /// +/// // The sink must be closed to end the request. +/// // The Future returned from `close()` may not complete until after the +/// // request is sent, and it should not be awaited. +/// unawaited(request.sink.close()); /// final response = await request.send(); /// ``` class StreamedRequest extends BaseRequest { @@ -32,7 +35,7 @@ class StreamedRequest extends BaseRequest { /// buffered. /// /// Closing this signals the end of the request. - EventSink> get sink => _controller.sink; + StreamSink> get sink => _controller.sink; /// The controller for [sink], from which [BaseRequest] will read data for /// [finalize]. diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 30d8878ee0..ac6f66fda2 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.0.1-wip +version: 1.1.0-wip description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http diff --git a/pkgs/http/test/html/client_test.dart b/pkgs/http/test/html/client_test.dart index b56b228518..1a6c634362 100644 --- a/pkgs/http/test/html/client_test.dart +++ b/pkgs/http/test/html/client_test.dart @@ -5,6 +5,8 @@ @TestOn('browser') library; +import 'dart:async'; + import 'package:http/browser_client.dart'; import 'package:http/http.dart' as http; import 'package:test/test.dart'; @@ -17,9 +19,8 @@ void main() { var request = http.StreamedRequest('POST', echoUrl); var responseFuture = client.send(request); - request.sink - ..add('{"hello": "world"}'.codeUnits) - ..close(); + request.sink.add('{"hello": "world"}'.codeUnits); + unawaited(request.sink.close()); var response = await responseFuture; var bytesString = await response.stream.bytesToString(); diff --git a/pkgs/http/test/html/streamed_request_test.dart b/pkgs/http/test/html/streamed_request_test.dart index c7671734b6..1668656046 100644 --- a/pkgs/http/test/html/streamed_request_test.dart +++ b/pkgs/http/test/html/streamed_request_test.dart @@ -5,6 +5,8 @@ @TestOn('browser') library; +import 'dart:async'; + import 'package:http/browser_client.dart'; import 'package:http/http.dart' as http; import 'package:test/test.dart'; @@ -16,8 +18,8 @@ void main() { test("works when it's set", () async { var request = http.StreamedRequest('POST', echoUrl) ..contentLength = 10 - ..sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) - ..sink.close(); + ..sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); + unawaited(request.sink.close()); final response = await BrowserClient().send(request); @@ -28,7 +30,7 @@ void main() { test("works when it's not set", () async { var request = http.StreamedRequest('POST', echoUrl); request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - request.sink.close(); + unawaited(request.sink.close()); final response = await BrowserClient().send(request); expect(await response.stream.toBytes(), diff --git a/pkgs/http/test/io/client_test.dart b/pkgs/http/test/io/client_test.dart index 9476f054ad..fd426a8b3f 100644 --- a/pkgs/http/test/io/client_test.dart +++ b/pkgs/http/test/io/client_test.dart @@ -5,6 +5,7 @@ @TestOn('vm') library; +import 'dart:async'; import 'dart:convert'; import 'dart:io'; @@ -42,9 +43,8 @@ void main() { ..headers[HttpHeaders.userAgentHeader] = 'Dart'; var responseFuture = client.send(request); - request - ..sink.add('{"hello": "world"}'.codeUnits) - ..sink.close(); + request.sink.add('{"hello": "world"}'.codeUnits); + unawaited(request.sink.close()); var response = await responseFuture; @@ -81,9 +81,8 @@ void main() { ..headers[HttpHeaders.userAgentHeader] = 'Dart'; var responseFuture = client.send(request); - request - ..sink.add('{"hello": "world"}'.codeUnits) - ..sink.close(); + request.sink.add('{"hello": "world"}'.codeUnits); + unawaited(request.sink.close()); var response = await responseFuture; diff --git a/pkgs/http/test/io/streamed_request_test.dart b/pkgs/http/test/io/streamed_request_test.dart index 76efd6fe56..f0e990c767 100644 --- a/pkgs/http/test/io/streamed_request_test.dart +++ b/pkgs/http/test/io/streamed_request_test.dart @@ -5,6 +5,7 @@ @TestOn('vm') library; +import 'dart:async'; import 'dart:convert'; import 'package:http/http.dart' as http; @@ -22,9 +23,8 @@ void main() { test('controls the Content-Length header', () async { var request = http.StreamedRequest('POST', serverUrl) ..contentLength = 10 - ..sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) - ..sink.close(); - + ..sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); + unawaited(request.sink.close()); var response = await request.send(); expect( await utf8.decodeStream(response.stream), @@ -35,8 +35,7 @@ void main() { test('defaults to sending no Content-Length', () async { var request = http.StreamedRequest('POST', serverUrl); request.sink.add([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - request.sink.close(); - + unawaited(request.sink.close()); var response = await request.send(); expect(await utf8.decodeStream(response.stream), parse(containsPair('headers', isNot(contains('content-length'))))); @@ -47,7 +46,7 @@ void main() { test('.send() with a response with no content length', () async { var request = http.StreamedRequest('GET', serverUrl.resolve('/no-content-length')); - request.sink.close(); + unawaited(request.sink.close()); var response = await request.send(); expect(await utf8.decodeStream(response.stream), equals('body')); }); From 687028ae591fdbd9edd97332dc0292fe0d3c788d Mon Sep 17 00:00:00 2001 From: Alex James Date: Mon, 26 Jun 2023 22:34:20 +0100 Subject: [PATCH 241/448] Create java http package (#971) --- pkgs/java_http/CHANGELOG.md | 3 +++ pkgs/java_http/LICENSE | 27 +++++++++++++++++++ pkgs/java_http/README.md | 25 +++++++++++++++++ pkgs/java_http/example/java_http_example.dart | 12 +++++++++ pkgs/java_http/lib/java_http.dart | 7 +++++ pkgs/java_http/lib/src/java_http_base.dart | 9 +++++++ pkgs/java_http/pubspec.yaml | 14 ++++++++++ pkgs/java_http/test/java_http_test.dart | 22 +++++++++++++++ 8 files changed, 119 insertions(+) create mode 100644 pkgs/java_http/CHANGELOG.md create mode 100644 pkgs/java_http/LICENSE create mode 100644 pkgs/java_http/README.md create mode 100644 pkgs/java_http/example/java_http_example.dart create mode 100644 pkgs/java_http/lib/java_http.dart create mode 100644 pkgs/java_http/lib/src/java_http_base.dart create mode 100644 pkgs/java_http/pubspec.yaml create mode 100644 pkgs/java_http/test/java_http_test.dart diff --git a/pkgs/java_http/CHANGELOG.md b/pkgs/java_http/CHANGELOG.md new file mode 100644 index 0000000000..65e52db74c --- /dev/null +++ b/pkgs/java_http/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +- Initial development release. diff --git a/pkgs/java_http/LICENSE b/pkgs/java_http/LICENSE new file mode 100644 index 0000000000..cf6aefe5df --- /dev/null +++ b/pkgs/java_http/LICENSE @@ -0,0 +1,27 @@ +Copyright 2023, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/pkgs/java_http/README.md b/pkgs/java_http/README.md new file mode 100644 index 0000000000..5f54bd298b --- /dev/null +++ b/pkgs/java_http/README.md @@ -0,0 +1,25 @@ +A Dart package for making HTTP requests using native Java APIs +([java.net.HttpURLConnection](https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html)). + +Using native Java APIs has several advantages on Android: + + * Support for `KeyStore` `PrivateKey`s ([#50669](https://github.com/dart-lang/sdk/issues/50669)) + * Support for the system proxy ([#50434](https://github.com/dart-lang/sdk/issues/50434)) + * Support for user-installed certificates ([#50435](https://github.com/dart-lang/sdk/issues/50435)) + +## Status: Experimental + +**NOTE**: This package is currently experimental and published under the +[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to +solicit feedback. + +For packages in the labs.dart.dev publisher we generally plan to either graduate +the package into a supported publisher (dart.dev, tools.dart.dev) after a period +of feedback and iteration, or discontinue the package. These packages have a +much higher expected rate of API and breaking changes. + +Your feedback is valuable and will help us evolve this package. +For general feedback and suggestions please comment in the +[feedback issue](https://github.com/dart-lang/http/issues/764). +For bugs, please file an issue in the +[bug tracker](https://github.com/dart-lang/http/issues). \ No newline at end of file diff --git a/pkgs/java_http/example/java_http_example.dart b/pkgs/java_http/example/java_http_example.dart new file mode 100644 index 0000000000..8b5e33d6f5 --- /dev/null +++ b/pkgs/java_http/example/java_http_example.dart @@ -0,0 +1,12 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// This code was generated by the Dart create command with the package template. + +import 'package:java_http/java_http.dart'; + +void main() { + var awesome = Awesome(); + print('awesome: ${awesome.isAwesome}'); +} diff --git a/pkgs/java_http/lib/java_http.dart b/pkgs/java_http/lib/java_http.dart new file mode 100644 index 0000000000..6498d22ead --- /dev/null +++ b/pkgs/java_http/lib/java_http.dart @@ -0,0 +1,7 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +library; + +export 'src/java_http_base.dart'; diff --git a/pkgs/java_http/lib/src/java_http_base.dart b/pkgs/java_http/lib/src/java_http_base.dart new file mode 100644 index 0000000000..8660e18936 --- /dev/null +++ b/pkgs/java_http/lib/src/java_http_base.dart @@ -0,0 +1,9 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// This code was generated by the Dart create command with the package template. + +class Awesome { + bool get isAwesome => true; +} diff --git a/pkgs/java_http/pubspec.yaml b/pkgs/java_http/pubspec.yaml new file mode 100644 index 0000000000..20cb429e54 --- /dev/null +++ b/pkgs/java_http/pubspec.yaml @@ -0,0 +1,14 @@ +name: java_http +description: A Dart package for making HTTP requests using java.net.HttpURLConnection. +version: 0.0.1 +repository: https://github.com/dart-lang/http/tree/master/pkgs/java_http +publish_to: none + +environment: + sdk: ^3.0.0 + +dependencies: + +dev_dependencies: + lints: ^2.0.0 + test: ^1.21.0 diff --git a/pkgs/java_http/test/java_http_test.dart b/pkgs/java_http/test/java_http_test.dart new file mode 100644 index 0000000000..e859141d2f --- /dev/null +++ b/pkgs/java_http/test/java_http_test.dart @@ -0,0 +1,22 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// This code was generated by the Dart create command with the package template. + +import 'package:java_http/java_http.dart'; +import 'package:test/test.dart'; + +void main() { + group('A group of tests', () { + final awesome = Awesome(); + + setUp(() { + // Additional setup goes here. + }); + + test('First Test', () { + expect(awesome.isAwesome, isTrue); + }); + }); +} From 5e755f212cbb9772fc8a75aa0a4e9c28dabe2382 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 26 Jun 2023 14:34:46 -0700 Subject: [PATCH 242/448] Prepare to publish package:http (#973) --- pkgs/http/CHANGELOG.md | 2 +- pkgs/http/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index a23d4c9b22..86f9805011 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.1.0-wip +## 1.1.0 * Add better error messages for `SocketException`s when using `IOClient`. * Make `StreamedRequest.sink` a `StreamSink`. This makes `request.sink.close()` diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index ac6f66fda2..990ca6ad37 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.1.0-wip +version: 1.1.0 description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http From 164b1e298a8784fc913fdcd6ebfd472b2d004809 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jul 2023 03:33:47 +0000 Subject: [PATCH 243/448] Bump actions/labeler from 4.0.4 to 4.2.0 (#976) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/labeler](https://github.com/actions/labeler) from 4.0.4 to 4.2.0.
Release notes

Sourced from actions/labeler's releases.

v4.2.0

What's Changed

In the scope of this release, the following outputs were added by @​danielsht86 in #60:

  • new-labels - a comma-separated string that contains all newly added labels.
  • all-labels - a comma-separated string that contains all labels currently assigned to the PR.

For detailed information, please refer to our updated documentation.

The issue of encountering an HttpError: Server Error when adding more than 50 labels has been successfully resolved by @​markmssd in #497. However, it's important to note that the GitHub API imposes a limit of 100 labels. To ensure smooth operation, a warning message that will alert you if the number of labels exceeds this limit was implemented. From this point forward, if more than 100 labels are specified, only the first 100 will be assigned.

The error handling for the Resource not accessible by integration error was added by @​jsoref in #405. Now, if the workflow is misconfigured, the labeler provides a clear warning and guidance for correction.

This release also includes the following changes:

New Contributors

Full Changelog: https://github.com/actions/labeler/compare/v4...v4.2.0

v4.1.0

What's Changed

In scope of this release, the dot input was added by @​kachkaev in actions/labeler#316. It allows patterns to match paths starting with a period. This input is set to false by default.

Usage

name: "Pull Request Labeler"
on:
- pull_request_target

jobs: triage: permissions: contents: read pull-requests: write runs-on: ubuntu-latest steps: - uses: actions/labeler@v4 with: dot: true

... (truncated)

Commits
  • 0967ca8 Added output (#60)
  • 375538a Bump @​octokit/plugin-retry from 5.0.2 to 5.0.4 (#599)
  • 8d17e8a Bump @​typescript-eslint/parser from 5.60.0 to 5.60.1 (#597)
  • 9d45a74 Bump @​typescript-eslint/eslint-plugin from 5.60.0 to 5.60.1 (#598)
  • 130636a Bump eslint from 8.42.0 to 8.43.0 (#592)
  • 54aeabf Bump @​typescript-eslint/parser from 5.59.11 to 5.60.0 (#593)
  • 899595f Bump eslint-plugin-jest from 27.2.1 to 27.2.2 (#591)
  • 8056174 Bump @​typescript-eslint/eslint-plugin from 5.59.11 to 5.60.0 (#594)
  • 7a202e6 fix: Limit number of labels added to 100 (#497)
  • b5ff161 Explain misconfigured workflow (#405)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/labeler&package-manager=github_actions&previous-version=4.0.4&new-version=4.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/pull_request_label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request_label.yml b/.github/workflows/pull_request_label.yml index 2a9e34d873..1c9d1e4f84 100644 --- a/.github/workflows/pull_request_label.yml +++ b/.github/workflows/pull_request_label.yml @@ -16,7 +16,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@0776a679364a9a16110aac8d0f40f5e11009e327 + - uses: actions/labeler@0967ca812e7fdc8f5f71402a1b486d5bd061fe20 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true From d8fc0e9defb02d8052b050452419a4b624d38443 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 5 Jul 2023 12:54:47 -0700 Subject: [PATCH 244/448] Support Steam> as a provider of request data (#975) --- pkgs/cupertino_http/CHANGELOG.md | 5 + .../client_conformance_test.dart | 5 +- .../example/integration_test/client_test.dart | 65 + .../example/integration_test/data_test.dart | 10 +- .../example/integration_test/error_test.dart | 32 +- .../example/integration_test/main.dart | 2 + .../integration_test/mutable_data_test.dart | 7 +- .../mutable_url_request_test.dart | 4 +- .../url_session_task_test.dart | 10 +- pkgs/cupertino_http/example/pubspec.yaml | 3 + pkgs/cupertino_http/ffigen.yaml | 1 + .../CUPHTTPStreamToNSInputStreamAdapter.m | 1 + .../cupertino_http/lib/src/cupertino_api.dart | 86 +- .../lib/src/cupertino_client.dart | 32 +- .../lib/src/native_cupertino_bindings.dart | 2581 ++++++++++++----- .../CUPHTTPStreamToNSInputStreamAdapter.m | 1 + pkgs/cupertino_http/pubspec.yaml | 2 +- .../src/CUPHTTPStreamToNSInputStreamAdapter.h | 23 + .../src/CUPHTTPStreamToNSInputStreamAdapter.m | 173 ++ .../lib/src/request_body_server.dart | 15 +- .../lib/src/request_body_streamed_tests.dart | 5 +- .../lib/src/request_body_tests.dart | 136 +- 22 files changed, 2433 insertions(+), 766 deletions(-) create mode 100644 pkgs/cupertino_http/example/integration_test/client_test.dart create mode 100644 pkgs/cupertino_http/ios/Classes/CUPHTTPStreamToNSInputStreamAdapter.m create mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPStreamToNSInputStreamAdapter.m create mode 100644 pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.h create mode 100644 pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.m diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 2d60dd4c5d..b0a68e33a1 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,6 +1,11 @@ ## 1.1.0 * Add websocket support to `cupertino_api`. +* Add streaming upload support, i.e., if `CupertinoClient.send()` is called + with a `StreamedRequest` then the data will be sent to the server + incrementally. +* Deprecate `Data.fromUint8List` in favor of `Data.fromList`, which accepts + any `List`. ## 1.0.1 diff --git a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart index 28d9bbc891..a0823bf71d 100644 --- a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart +++ b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart @@ -11,12 +11,11 @@ void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); group('defaultSessionConfiguration', () { - testAll(CupertinoClient.defaultSessionConfiguration, - canStreamRequestBody: false); + testAll(CupertinoClient.defaultSessionConfiguration); }); group('fromSessionConfiguration', () { final config = URLSessionConfiguration.ephemeralSessionConfiguration(); testAll(() => CupertinoClient.fromSessionConfiguration(config), - canStreamRequestBody: false, canWorkInIsolates: false); + canWorkInIsolates: false); }); } diff --git a/pkgs/cupertino_http/example/integration_test/client_test.dart b/pkgs/cupertino_http/example/integration_test/client_test.dart new file mode 100644 index 0000000000..9247783a09 --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/client_test.dart @@ -0,0 +1,65 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:io'; +import 'dart:typed_data'; + +import 'package:convert/convert.dart'; +import 'package:crypto/crypto.dart'; +import 'package:cupertino_http/cupertino_http.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:http/http.dart'; +import 'package:integration_test/integration_test.dart'; + +void testClient(Client client) { + group('client tests', () { + late HttpServer server; + late Uri uri; + late List serverHash; + + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + var hashSink = AccumulatorSink(); + final hashConverter = sha1.startChunkedConversion(hashSink); + await request.listen(hashConverter.add).asFuture(); + hashConverter.close(); + serverHash = hashSink.events.single.bytes; + await request.response.close(); + }); + uri = Uri.http('localhost:${server.port}'); + }); + tearDown(() { + server.close(); + }); + + test('large single item stream', () async { + // This tests that `CUPHTTPStreamToNSInputStreamAdapter` correctly + // handles calls to `read:maxLength:` where the maximum length + // is smaller than the amount of data in the buffer. + final size = (Platform.isIOS ? 10 : 100) * 1024 * 1024; + final data = Uint8List(size); + for (var i = 0; i < data.length; ++i) { + data[i] = i % 256; + } + final request = StreamedRequest('POST', uri); + request.sink.add(data); + request.sink.close(); + await client.send(request); + expect(serverHash, sha1.convert(data).bytes); + }); + }); +} + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('defaultSessionConfiguration', () { + testClient(CupertinoClient.defaultSessionConfiguration()); + }); + group('fromSessionConfiguration', () { + final config = URLSessionConfiguration.ephemeralSessionConfiguration(); + testClient(CupertinoClient.fromSessionConfiguration(config)); + }); +} diff --git a/pkgs/cupertino_http/example/integration_test/data_test.dart b/pkgs/cupertino_http/example/integration_test/data_test.dart index 9ed6ee1e15..981bcef614 100644 --- a/pkgs/cupertino_http/example/integration_test/data_test.dart +++ b/pkgs/cupertino_http/example/integration_test/data_test.dart @@ -12,7 +12,7 @@ void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); group('empty data', () { - final data = Data.fromUint8List(Uint8List(0)); + final data = Data.fromList([]); test('length', () => expect(data.length, 0)); test('bytes', () => expect(data.bytes, Uint8List(0))); @@ -20,7 +20,7 @@ void main() { }); group('non-empty data', () { - final data = Data.fromUint8List(Uint8List.fromList([1, 2, 3, 4, 5])); + final data = Data.fromList([1, 2, 3, 4, 5]); test('length', () => expect(data.length, 5)); test( 'bytes', () => expect(data.bytes, Uint8List.fromList([1, 2, 3, 4, 5]))); @@ -29,12 +29,12 @@ void main() { group('Data.fromData', () { test('from empty', () { - final from = Data.fromUint8List(Uint8List(0)); - expect(Data.fromData(from).bytes, Uint8List.fromList([])); + final from = Data.fromList([]); + expect(Data.fromData(from).bytes, Uint8List(0)); }); test('from non-empty', () { - final from = Data.fromUint8List(Uint8List.fromList([1, 2, 3, 4, 5])); + final from = Data.fromList([1, 2, 3, 4, 5]); expect(Data.fromData(from).bytes, Uint8List.fromList([1, 2, 3, 4, 5])); }); }); diff --git a/pkgs/cupertino_http/example/integration_test/error_test.dart b/pkgs/cupertino_http/example/integration_test/error_test.dart index c04af1e9fa..06216519c8 100644 --- a/pkgs/cupertino_http/example/integration_test/error_test.dart +++ b/pkgs/cupertino_http/example/integration_test/error_test.dart @@ -2,15 +2,37 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -@Skip('Error tests cannot currently be written. See comments in this file.') -library; - +import 'package:cupertino_http/cupertino_http.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - // TODO(https://github.com/dart-lang/ffigen/issues/386): Implement tests - // when an initializer is callable. + group('error', () { + test('simple', () { + final e = Error.fromCustomDomain('test domain', 123); + expect(e.code, 123); + expect(e.domain, 'test domain'); + expect(e.localizedDescription, + allOf(contains('test domain'), contains('123'))); + expect(e.localizedFailureReason, null); + expect(e.localizedRecoverySuggestion, null); + expect(e.toString(), allOf(contains('test domain'), contains('123'))); + }); + + test('localized description', () { + final e = Error.fromCustomDomain('test domain', 123, + localizedDescription: 'This is a description'); + expect(e.code, 123); + expect(e.domain, 'test domain'); + expect(e.localizedDescription, 'This is a description'); + expect(e.localizedFailureReason, null); + expect(e.localizedRecoverySuggestion, null); + expect( + e.toString(), + allOf(contains('test domain'), contains('123'), + contains('This is a description'))); + }); + }); } diff --git a/pkgs/cupertino_http/example/integration_test/main.dart b/pkgs/cupertino_http/example/integration_test/main.dart index fe9ea47b0f..05ae1212f2 100644 --- a/pkgs/cupertino_http/example/integration_test/main.dart +++ b/pkgs/cupertino_http/example/integration_test/main.dart @@ -5,6 +5,7 @@ import 'package:integration_test/integration_test.dart'; import 'client_conformance_test.dart' as client_conformance_test; +import 'client_test.dart' as client_test; import 'data_test.dart' as data_test; import 'error_test.dart' as error_test; import 'http_url_response_test.dart' as http_url_response_test; @@ -27,6 +28,7 @@ void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); client_conformance_test.main(); + client_test.main(); data_test.main(); error_test.main(); http_url_response_test.main(); diff --git a/pkgs/cupertino_http/example/integration_test/mutable_data_test.dart b/pkgs/cupertino_http/example/integration_test/mutable_data_test.dart index 2378e17751..f323574c5d 100644 --- a/pkgs/cupertino_http/example/integration_test/mutable_data_test.dart +++ b/pkgs/cupertino_http/example/integration_test/mutable_data_test.dart @@ -21,16 +21,15 @@ void main() { group('appendBytes', () { test('append no bytes', () { - final data = MutableData.empty()..appendBytes(Uint8List(0)); + final data = MutableData.empty()..appendBytes([]); expect(data.bytes, Uint8List(0)); data.toString(); // Just verify that there is no crash. }); test('append some bytes', () { - final data = MutableData.empty() - ..appendBytes(Uint8List.fromList([1, 2, 3, 4, 5])); + final data = MutableData.empty()..appendBytes([1, 2, 3, 4, 5]); expect(data.bytes, Uint8List.fromList([1, 2, 3, 4, 5])); - data.appendBytes(Uint8List.fromList([6, 7, 8, 9, 10])); + data.appendBytes([6, 7, 8, 9, 10]); expect(data.bytes, Uint8List.fromList([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])); data.toString(); // Just verify that there is no crash. }); diff --git a/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart b/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart index 56433afef6..9239d07511 100644 --- a/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart +++ b/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart @@ -47,13 +47,13 @@ void main() { test('empty', () => expect(request.httpBody, null)); test('set', () { - request.httpBody = Data.fromUint8List(Uint8List.fromList([1, 2, 3])); + request.httpBody = Data.fromList([1, 2, 3]); expect(request.httpBody!.bytes, Uint8List.fromList([1, 2, 3])); request.toString(); // Just verify that there is no crash. }); test('set to null', () { request - ..httpBody = Data.fromUint8List(Uint8List.fromList([1, 2, 3])) + ..httpBody = Data.fromList([1, 2, 3]) ..httpBody = null; expect(request.httpBody, null); }); diff --git a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart index 8ea2d86828..c00de9c142 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart @@ -5,7 +5,6 @@ import 'dart:io'; import 'package:cupertino_http/cupertino_http.dart'; -import 'package:flutter/foundation.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; @@ -63,8 +62,7 @@ void testWebSocketTask() { await task .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); await task.receiveMessage(); - task.cancelWithCloseCode( - 4998, Data.fromUint8List(Uint8List.fromList('Bye'.codeUnits))); + task.cancelWithCloseCode(4998, Data.fromList('Bye'.codeUnits)); // Allow the server to run and save the close code. while (lastCloseCode == null) { @@ -96,8 +94,8 @@ void testWebSocketTask() { final task = session.webSocketTaskWithRequest( URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}'))) ..resume(); - await task.sendMessage(URLSessionWebSocketMessage.fromData( - Data.fromUint8List(Uint8List.fromList([1, 2, 3])))); + await task.sendMessage( + URLSessionWebSocketMessage.fromData(Data.fromList([1, 2, 3]))); final receivedMessage = await task.receiveMessage(); expect(receivedMessage.type, URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeData); @@ -221,7 +219,7 @@ void testURLSessionTaskCommon( MutableURLRequest.fromUrl( Uri.parse('http://localhost:${server.port}/mypath')) ..httpMethod = 'POST' - ..httpBody = Data.fromUint8List(Uint8List.fromList([1, 2, 3]))) + ..httpBody = Data.fromList([1, 2, 3])) ..prefersIncrementalDelivery = false ..priority = 0.2 ..taskDescription = 'my task description' diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index 81f4dc72b9..be727312a2 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -19,7 +19,10 @@ dependencies: http: ^0.13.5 dev_dependencies: + convert: ^3.1.1 + crypto: ^3.0.3 dart_flutter_team_lints: ^1.0.0 + ffi: ^2.0.1 flutter_test: sdk: flutter http_client_conformance_tests: diff --git a/pkgs/cupertino_http/ffigen.yaml b/pkgs/cupertino_http/ffigen.yaml index 2ac2ce517f..4c1e48d7c5 100644 --- a/pkgs/cupertino_http/ffigen.yaml +++ b/pkgs/cupertino_http/ffigen.yaml @@ -23,6 +23,7 @@ headers: - 'src/CUPHTTPClientDelegate.h' - 'src/CUPHTTPForwardedDelegate.h' - 'src/CUPHTTPCompletionHelper.h' + - 'src/CUPHTTPStreamToNSInputStreamAdapter.h' preamble: | // ignore_for_file: always_specify_types // ignore_for_file: camel_case_types diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPStreamToNSInputStreamAdapter.m b/pkgs/cupertino_http/ios/Classes/CUPHTTPStreamToNSInputStreamAdapter.m new file mode 100644 index 0000000000..46eb84ba89 --- /dev/null +++ b/pkgs/cupertino_http/ios/Classes/CUPHTTPStreamToNSInputStreamAdapter.m @@ -0,0 +1 @@ +#include "../../src/CUPHTTPStreamToNSInputStreamAdapter.m" diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 16c79e0f78..414154c590 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -32,6 +32,7 @@ import 'dart:isolate'; import 'dart:math'; import 'dart:typed_data'; +import 'package:async/async.dart'; import 'package:ffi/ffi.dart'; import 'native_cupertino_bindings.dart' as ncb; @@ -120,12 +121,74 @@ enum URLSessionWebSocketMessageType { urlSessionWebSocketMessageTypeString, } +ncb.NSInputStream _streamToNSInputStream(Stream> stream) { + const maxReadAheadSize = 4096; + final queue = StreamQueue(stream); + final port = ReceivePort(); + final inputStream = ncb.CUPHTTPStreamToNSInputStreamAdapter.alloc(helperLibs) + .initWithPort_(port.sendPort.nativePort); + + late StreamSubscription s; + // Messages from `CUPHTTPStreamToNSInputStreamAdapter` indicate that the task + // is attempting to read more data but there is none available. + s = port.listen((_) async { + if (inputStream.streamStatus == ncb.NSStreamStatus.NSStreamStatusClosed) { + return; + } + + // Prevent multiple executions of this code to be in flight at once. + s.pause(); + while (await queue.hasNext && + inputStream.streamStatus != ncb.NSStreamStatus.NSStreamStatusClosed) { + late final List next; + try { + next = await queue.next; + } catch (e) { + inputStream.setError_(Error.fromCustomDomain('DartError', 0, + localizedDescription: e.toString()) + ._nsObject); + break; + } + // In practice the read length request will be large (>1MB) so, + // instead of adding that much data, try to keep the buffer + // at least `maxReadAheadSize`. + if (inputStream.addData_(Data.fromList(next)._nsObject) > + maxReadAheadSize) { + break; + } + } + if (!await queue.hasNext) { + inputStream.setDone(); + } else { + s.resume(); + } + }); + return inputStream; +} + /// Information about a failure. /// /// See [NSError](https://developer.apple.com/documentation/foundation/nserror) class Error extends _ObjectHolder implements Exception { Error._(super.c); + /// Create an Error from a custom domain. + factory Error.fromCustomDomain(String domain, int code, + {String? localizedDescription}) { + final d = ncb.NSMutableDictionary.alloc(linkedLibs).init(); + + if (localizedDescription != null) { + d.setObject_forKey_( + localizedDescription.toNSString(linkedLibs), + ncb.NSString.castFromPointer( + linkedLibs, linkedLibs.NSLocalizedDescriptionKey), + ); + } + final e = ncb.NSError.alloc(linkedLibs).initWithDomain_code_userInfo_( + domain.toNSString(linkedLibs).pointer, code, d); + return Error._(e); + } + /// The numeric code for the error e.g. -1003 (kCFURLErrorCannotFindHost). /// /// The interpretation of this code will depend on the domain of the error @@ -135,8 +198,11 @@ class Error extends _ObjectHolder implements Exception { /// See [NSError.code](https://developer.apple.com/documentation/foundation/nserror/1409165-code) int get code => _nsObject.code; - // TODO(https://github.com/dart-lang/ffigen/issues/386): expose - // `NSError.domain` when correct type aliases are available. + /// The error domain, for example `"NSPOSIXErrorDomain"`. + /// + /// See [NSError.domain](https://developer.apple.com/documentation/foundation/nserror/1413924-domain) + String get domain => + ncb.NSString.castFromPointer(linkedLibs, _nsObject.domain).toString(); /// A description of the error in the current locale e.g. /// 'A server with the specified hostname could not be found.' @@ -159,6 +225,7 @@ class Error extends _ObjectHolder implements Exception { @override String toString() => '[Error ' + 'domain=$domain ' 'code=$code ' 'localizedDescription=$localizedDescription ' 'localizedFailureReason=$localizedFailureReason ' @@ -362,7 +429,7 @@ class Data extends _ObjectHolder { Data._(ncb.NSData.dataWithData_(linkedLibs, d._nsObject)); /// A new [Data] object containing the given bytes. - factory Data.fromUint8List(Uint8List l) { + factory Data.fromList(List l) { final buffer = calloc(l.length); try { buffer.asTypedList(l.length).setAll(0, l); @@ -375,6 +442,10 @@ class Data extends _ObjectHolder { } } + /// A new [Data] object containing the given bytes. + @Deprecated('Use Data.fromList instead') + factory Data.fromUint8List(Uint8List l) = Data.fromList; + /// The number of bytes contained in the object. /// /// See [NSData.length](https://developer.apple.com/documentation/foundation/nsdata/1416769-length) @@ -421,7 +492,7 @@ class MutableData extends Data { /// Appends the given data. /// /// See [NSMutableData appendBytes:length:](https://developer.apple.com/documentation/foundation/nsmutabledata/1407704-appendbytes) - void appendBytes(Uint8List l) { + void appendBytes(List l) { final f = calloc(l.length); try { f.asTypedList(l.length).setAll(0, l); @@ -945,6 +1016,13 @@ class MutableURLRequest extends URLRequest { _mutableUrlRequest.HTTPBody = data?._nsObject; } + /// Sets the body of the request to the given [Stream]. + /// + /// See [NSMutableURLRequest.HTTPBodyStream](https://developer.apple.com/documentation/foundation/nsurlrequest/1407341-httpbodystream). + set httpBodyStream(Stream> stream) { + _mutableUrlRequest.HTTPBodyStream = _streamToNSInputStream(stream); + } + set httpMethod(String method) { _mutableUrlRequest.HTTPMethod = method.toNSString(linkedLibs); } diff --git a/pkgs/cupertino_http/lib/src/cupertino_client.dart b/pkgs/cupertino_http/lib/src/cupertino_client.dart index b4b05969fd..a716b49418 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_client.dart @@ -10,6 +10,7 @@ import 'dart:async'; import 'dart:io'; import 'dart:typed_data'; +import 'package:async/async.dart'; import 'package:http/http.dart'; import 'cupertino_api.dart'; @@ -211,6 +212,20 @@ class CupertinoClient extends BaseClient { _urlSession = null; } + /// Returns true if [stream] includes at least one list with an element. + /// + /// Since [_hasData] consumes [stream], returns a new stream containing the + /// equivalent data. + static Future<(bool, Stream>)> _hasData( + Stream> stream) async { + final queue = StreamQueue(stream); + while (await queue.hasNext && (await queue.peek).isEmpty) { + await queue.next; + } + + return (await queue.hasNext, queue.rest); + } + @override Future send(BaseRequest request) async { // The expected success case flow (without redirects) is: @@ -233,12 +248,19 @@ class CupertinoClient extends BaseClient { final stream = request.finalize(); - final bytes = await stream.toBytes(); - final d = Data.fromUint8List(bytes); - final urlRequest = MutableURLRequest.fromUrl(request.url) - ..httpMethod = request.method - ..httpBody = d; + ..httpMethod = request.method; + + if (request is Request) { + // Optimize the (typical) `Request` case since assigning to + // `httpBodyStream` requires a lot of expensive setup and data passing. + urlRequest.httpBody = Data.fromList(request.bodyBytes); + } else if (await _hasData(stream) case (true, final s)) { + // If the request is supposed to be bodyless (e.g. GET requests) + // then setting `httpBodyStream` will cause the request to fail - + // even if the stream is empty. + urlRequest.httpBodyStream = s; + } // This will preserve Apple default headers - is that what we want? request.headers.forEach(urlRequest.setValueForHttpHeaderField); diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index 9ed49e403a..b384d7bc4c 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -13287,22 +13287,317 @@ class NativeCupertinoHttp { _registerName1("valueForHTTPHeaderField:"); late final _sel_HTTPBody1 = _registerName1("HTTPBody"); late final _class_NSInputStream1 = _getClass1("NSInputStream"); - late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); - ffi.Pointer _objc_msgSend_362( + late final _class_NSStream1 = _getClass1("NSStream"); + late final _sel_open1 = _registerName1("open"); + late final _sel_close1 = _registerName1("close"); + late final _sel_delegate1 = _registerName1("delegate"); + late final _sel_setDelegate_1 = _registerName1("setDelegate:"); + void _objc_msgSend_362( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer value, ) { return __objc_msgSend_362( obj, sel, + value, ); } late final __objc_msgSend_362Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _class_NSRunLoop1 = _getClass1("NSRunLoop"); + late final _sel_scheduleInRunLoop_forMode_1 = + _registerName1("scheduleInRunLoop:forMode:"); + void _objc_msgSend_363( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer aRunLoop, + NSRunLoopMode mode, + ) { + return __objc_msgSend_363( + obj, + sel, + aRunLoop, + mode, + ); + } + + late final __objc_msgSend_363Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRunLoopMode)>>('objc_msgSend'); + late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRunLoopMode)>(); + + late final _sel_removeFromRunLoop_forMode_1 = + _registerName1("removeFromRunLoop:forMode:"); + late final _sel_streamStatus1 = _registerName1("streamStatus"); + int _objc_msgSend_364( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_364( + obj, + sel, + ); + } + + late final __objc_msgSend_364Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_streamError1 = _registerName1("streamError"); + ffi.Pointer _objc_msgSend_365( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_365( + obj, + sel, + ); + } + + late final __objc_msgSend_365Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< + late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + late final _class_NSOutputStream1 = _getClass1("NSOutputStream"); + late final _sel_write_maxLength_1 = _registerName1("write:maxLength:"); + int _objc_msgSend_366( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + int len, + ) { + return __objc_msgSend_366( + obj, + sel, + buffer, + len, + ); + } + + late final __objc_msgSend_366Ptr = _lookup< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_hasSpaceAvailable1 = _registerName1("hasSpaceAvailable"); + late final _sel_initToMemory1 = _registerName1("initToMemory"); + late final _sel_initToBuffer_capacity_1 = + _registerName1("initToBuffer:capacity:"); + instancetype _objc_msgSend_367( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer buffer, + int capacity, + ) { + return __objc_msgSend_367( + obj, + sel, + buffer, + capacity, + ); + } + + late final __objc_msgSend_367Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); + + late final _sel_initWithURL_append_1 = _registerName1("initWithURL:append:"); + late final _sel_initToFileAtPath_append_1 = + _registerName1("initToFileAtPath:append:"); + late final _sel_outputStreamToMemory1 = + _registerName1("outputStreamToMemory"); + late final _sel_outputStreamToBuffer_capacity_1 = + _registerName1("outputStreamToBuffer:capacity:"); + late final _sel_outputStreamToFileAtPath_append_1 = + _registerName1("outputStreamToFileAtPath:append:"); + late final _sel_outputStreamWithURL_append_1 = + _registerName1("outputStreamWithURL:append:"); + late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_1 = + _registerName1("getStreamsToHostWithName:port:inputStream:outputStream:"); + void _objc_msgSend_368( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, + ) { + return __objc_msgSend_368( + obj, + sel, + hostname, + port, + inputStream, + outputStream, + ); + } + + late final __objc_msgSend_368Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _class_NSHost1 = _getClass1("NSHost"); + late final _sel_getStreamsToHost_port_inputStream_outputStream_1 = + _registerName1("getStreamsToHost:port:inputStream:outputStream:"); + void _objc_msgSend_369( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, + ) { + return __objc_msgSend_369( + obj, + sel, + host, + port, + inputStream, + outputStream, + ); + } + + late final __objc_msgSend_369Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1 = + _registerName1("getBoundStreamsWithBufferSize:inputStream:outputStream:"); + void _objc_msgSend_370( + ffi.Pointer obj, + ffi.Pointer sel, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, + ) { + return __objc_msgSend_370( + obj, + sel, + bufferSize, + inputStream, + outputStream, + ); + } + + late final __objc_msgSend_370Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); + + late final _sel_read_maxLength_1 = _registerName1("read:maxLength:"); + late final _sel_getBuffer_length_1 = _registerName1("getBuffer:length:"); + bool _objc_msgSend_371( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> buffer, + ffi.Pointer len, + ) { + return __objc_msgSend_371( + obj, + sel, + buffer, + len, + ); + } + + late final __objc_msgSend_371Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, ffi.Pointer)>(); + + late final _sel_hasBytesAvailable1 = _registerName1("hasBytesAvailable"); + late final _sel_initWithFileAtPath_1 = _registerName1("initWithFileAtPath:"); + late final _sel_inputStreamWithData_1 = + _registerName1("inputStreamWithData:"); + late final _sel_inputStreamWithFileAtPath_1 = + _registerName1("inputStreamWithFileAtPath:"); + late final _sel_inputStreamWithURL_1 = _registerName1("inputStreamWithURL:"); + late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); + ffi.Pointer _objc_msgSend_372( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_372( + obj, + sel, + ); + } + + late final __objc_msgSend_372Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -13313,46 +13608,46 @@ class NativeCupertinoHttp { late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); late final _sel_setURL_1 = _registerName1("setURL:"); late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); - void _objc_msgSend_363( + void _objc_msgSend_373( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_363( + return __objc_msgSend_373( obj, sel, value, ); } - late final __objc_msgSend_363Ptr = _lookup< + late final __objc_msgSend_373Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< + late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); late final _sel_setNetworkServiceType_1 = _registerName1("setNetworkServiceType:"); - void _objc_msgSend_364( + void _objc_msgSend_374( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_364( + return __objc_msgSend_374( obj, sel, value, ); } - late final __objc_msgSend_364Ptr = _lookup< + late final __objc_msgSend_374Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< + late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_setAllowsCellularAccess_1 = @@ -13364,23 +13659,23 @@ class NativeCupertinoHttp { late final _sel_setAssumesHTTP3Capable_1 = _registerName1("setAssumesHTTP3Capable:"); late final _sel_setAttribution_1 = _registerName1("setAttribution:"); - void _objc_msgSend_365( + void _objc_msgSend_375( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_365( + return __objc_msgSend_375( obj, sel, value, ); } - late final __objc_msgSend_365Ptr = _lookup< + late final __objc_msgSend_375Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< + late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_setRequiresDNSSECValidation_1 = @@ -13388,35 +13683,35 @@ class NativeCupertinoHttp { late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); late final _sel_setAllHTTPHeaderFields_1 = _registerName1("setAllHTTPHeaderFields:"); - void _objc_msgSend_366( + void _objc_msgSend_376( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_366( + return __objc_msgSend_376( obj, sel, value, ); } - late final __objc_msgSend_366Ptr = _lookup< + late final __objc_msgSend_376Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< + late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setValue_forHTTPHeaderField_1 = _registerName1("setValue:forHTTPHeaderField:"); - void _objc_msgSend_367( + void _objc_msgSend_377( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ffi.Pointer field, ) { - return __objc_msgSend_367( + return __objc_msgSend_377( obj, sel, value, @@ -13424,58 +13719,58 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_367Ptr = _lookup< + late final __objc_msgSend_377Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< + late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_addValue_forHTTPHeaderField_1 = _registerName1("addValue:forHTTPHeaderField:"); late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); - void _objc_msgSend_368( + void _objc_msgSend_378( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_368( + return __objc_msgSend_378( obj, sel, value, ); } - late final __objc_msgSend_368Ptr = _lookup< + late final __objc_msgSend_378Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< + late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); - void _objc_msgSend_369( + void _objc_msgSend_379( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_369( + return __objc_msgSend_379( obj, sel, value, ); } - late final __objc_msgSend_369Ptr = _lookup< + late final __objc_msgSend_379Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< + late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -13486,103 +13781,103 @@ class NativeCupertinoHttp { late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); late final _sel_sharedHTTPCookieStorage1 = _registerName1("sharedHTTPCookieStorage"); - ffi.Pointer _objc_msgSend_370( + ffi.Pointer _objc_msgSend_380( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_370( + return __objc_msgSend_380( obj, sel, ); } - late final __objc_msgSend_370Ptr = _lookup< + late final __objc_msgSend_380Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< + late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); - ffi.Pointer _objc_msgSend_371( + ffi.Pointer _objc_msgSend_381( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer identifier, ) { - return __objc_msgSend_371( + return __objc_msgSend_381( obj, sel, identifier, ); } - late final __objc_msgSend_371Ptr = _lookup< + late final __objc_msgSend_381Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< + late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_cookies1 = _registerName1("cookies"); late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); late final _sel_setCookie_1 = _registerName1("setCookie:"); - void _objc_msgSend_372( + void _objc_msgSend_382( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer cookie, ) { - return __objc_msgSend_372( + return __objc_msgSend_382( obj, sel, cookie, ); } - late final __objc_msgSend_372Ptr = _lookup< + late final __objc_msgSend_382Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< + late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); late final _sel_removeCookiesSinceDate_1 = _registerName1("removeCookiesSinceDate:"); - void _objc_msgSend_373( + void _objc_msgSend_383( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer date, ) { - return __objc_msgSend_373( + return __objc_msgSend_383( obj, sel, date, ); } - late final __objc_msgSend_373Ptr = _lookup< + late final __objc_msgSend_383Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< + late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); late final _sel_setCookies_forURL_mainDocumentURL_1 = _registerName1("setCookies:forURL:mainDocumentURL:"); - void _objc_msgSend_374( + void _objc_msgSend_384( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer cookies, ffi.Pointer URL, ffi.Pointer mainDocumentURL, ) { - return __objc_msgSend_374( + return __objc_msgSend_384( obj, sel, cookies, @@ -13591,7 +13886,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_374Ptr = _lookup< + late final __objc_msgSend_384Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -13599,7 +13894,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< + late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -13608,42 +13903,42 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); - int _objc_msgSend_375( + int _objc_msgSend_385( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_375( + return __objc_msgSend_385( obj, sel, ); } - late final __objc_msgSend_375Ptr = _lookup< + late final __objc_msgSend_385Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< + late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setCookieAcceptPolicy_1 = _registerName1("setCookieAcceptPolicy:"); - void _objc_msgSend_376( + void _objc_msgSend_386( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_376( + return __objc_msgSend_386( obj, sel, value, ); } - late final __objc_msgSend_376Ptr = _lookup< + late final __objc_msgSend_386Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< + late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_sortedCookiesUsingDescriptors_1 = @@ -13651,21 +13946,21 @@ class NativeCupertinoHttp { late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); late final _sel_originalRequest1 = _registerName1("originalRequest"); - ffi.Pointer _objc_msgSend_377( + ffi.Pointer _objc_msgSend_387( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_377( + return __objc_msgSend_387( obj, sel, ); } - late final __objc_msgSend_377Ptr = _lookup< + late final __objc_msgSend_387Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< + late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -13674,7 +13969,7 @@ class NativeCupertinoHttp { late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = _registerName1( "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); - instancetype _objc_msgSend_378( + instancetype _objc_msgSend_388( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer URL, @@ -13682,7 +13977,7 @@ class NativeCupertinoHttp { int length, ffi.Pointer name, ) { - return __objc_msgSend_378( + return __objc_msgSend_388( obj, sel, URL, @@ -13692,7 +13987,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_378Ptr = _lookup< + late final __objc_msgSend_388Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -13701,7 +13996,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< + late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -13716,66 +14011,44 @@ class NativeCupertinoHttp { late final _sel_textEncodingName1 = _registerName1("textEncodingName"); late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); late final _sel_response1 = _registerName1("response"); - ffi.Pointer _objc_msgSend_379( + ffi.Pointer _objc_msgSend_389( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_379( + return __objc_msgSend_389( obj, sel, ); } - late final __objc_msgSend_379Ptr = _lookup< + late final __objc_msgSend_389Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< + late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); - late final _sel_delegate1 = _registerName1("delegate"); - late final _sel_setDelegate_1 = _registerName1("setDelegate:"); - void _objc_msgSend_380( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_380( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_380Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); late final _sel_setEarliestBeginDate_1 = _registerName1("setEarliestBeginDate:"); - void _objc_msgSend_381( + void _objc_msgSend_390( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_381( + return __objc_msgSend_390( obj, sel, value, ); } - late final __objc_msgSend_381Ptr = _lookup< + late final __objc_msgSend_390Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< + late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -13797,62 +14070,44 @@ class NativeCupertinoHttp { late final _sel_taskDescription1 = _registerName1("taskDescription"); late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); late final _sel_state1 = _registerName1("state"); - int _objc_msgSend_382( + int _objc_msgSend_391( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_382( + return __objc_msgSend_391( obj, sel, ); } - late final __objc_msgSend_382Ptr = _lookup< + late final __objc_msgSend_391Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< + late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_error1 = _registerName1("error"); - ffi.Pointer _objc_msgSend_383( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_383( - obj, - sel, - ); - } - - late final __objc_msgSend_383Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - late final _sel_suspend1 = _registerName1("suspend"); late final _sel_priority1 = _registerName1("priority"); late final _sel_setPriority_1 = _registerName1("setPriority:"); - void _objc_msgSend_384( + void _objc_msgSend_392( ffi.Pointer obj, ffi.Pointer sel, double value, ) { - return __objc_msgSend_384( + return __objc_msgSend_392( obj, sel, value, ); } - late final __objc_msgSend_384Ptr = _lookup< + late final __objc_msgSend_392Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< + late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, double)>(); late final _sel_prefersIncrementalDelivery1 = @@ -13861,13 +14116,13 @@ class NativeCupertinoHttp { _registerName1("setPrefersIncrementalDelivery:"); late final _sel_storeCookies_forTask_1 = _registerName1("storeCookies:forTask:"); - void _objc_msgSend_385( + void _objc_msgSend_393( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer cookies, ffi.Pointer task, ) { - return __objc_msgSend_385( + return __objc_msgSend_393( obj, sel, cookies, @@ -13875,26 +14130,26 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_385Ptr = _lookup< + late final __objc_msgSend_393Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< + late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_getCookiesForTask_completionHandler_1 = _registerName1("getCookiesForTask:completionHandler:"); - void _objc_msgSend_386( + void _objc_msgSend_394( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer task, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_386( + return __objc_msgSend_394( obj, sel, task, @@ -13902,14 +14157,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_386Ptr = _lookup< + late final __objc_msgSend_394Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< + late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); @@ -47260,21 +47515,21 @@ class NativeCupertinoHttp { late final _class_NSURLSession1 = _getClass1("NSURLSession"); late final _sel_sharedSession1 = _registerName1("sharedSession"); - ffi.Pointer _objc_msgSend_387( + ffi.Pointer _objc_msgSend_395( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_387( + return __objc_msgSend_395( obj, sel, ); } - late final __objc_msgSend_387Ptr = _lookup< + late final __objc_msgSend_395Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< + late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -47282,21 +47537,21 @@ class NativeCupertinoHttp { _getClass1("NSURLSessionConfiguration"); late final _sel_defaultSessionConfiguration1 = _registerName1("defaultSessionConfiguration"); - ffi.Pointer _objc_msgSend_388( + ffi.Pointer _objc_msgSend_396( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_388( + return __objc_msgSend_396( obj, sel, ); } - late final __objc_msgSend_388Ptr = _lookup< + late final __objc_msgSend_396Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< + late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -47304,23 +47559,23 @@ class NativeCupertinoHttp { _registerName1("ephemeralSessionConfiguration"); late final _sel_backgroundSessionConfigurationWithIdentifier_1 = _registerName1("backgroundSessionConfigurationWithIdentifier:"); - ffi.Pointer _objc_msgSend_389( + ffi.Pointer _objc_msgSend_397( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer identifier, ) { - return __objc_msgSend_389( + return __objc_msgSend_397( obj, sel, identifier, ); } - late final __objc_msgSend_389Ptr = _lookup< + late final __objc_msgSend_397Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< + late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47356,42 +47611,42 @@ class NativeCupertinoHttp { _registerName1("setConnectionProxyDictionary:"); late final _sel_TLSMinimumSupportedProtocol1 = _registerName1("TLSMinimumSupportedProtocol"); - int _objc_msgSend_390( + int _objc_msgSend_398( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_390( + return __objc_msgSend_398( obj, sel, ); } - late final __objc_msgSend_390Ptr = _lookup< + late final __objc_msgSend_398Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< + late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setTLSMinimumSupportedProtocol_1 = _registerName1("setTLSMinimumSupportedProtocol:"); - void _objc_msgSend_391( + void _objc_msgSend_399( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_391( + return __objc_msgSend_399( obj, sel, value, ); } - late final __objc_msgSend_391Ptr = _lookup< + late final __objc_msgSend_399Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< + late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_TLSMaximumSupportedProtocol1 = @@ -47400,42 +47655,42 @@ class NativeCupertinoHttp { _registerName1("setTLSMaximumSupportedProtocol:"); late final _sel_TLSMinimumSupportedProtocolVersion1 = _registerName1("TLSMinimumSupportedProtocolVersion"); - int _objc_msgSend_392( + int _objc_msgSend_400( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_392( + return __objc_msgSend_400( obj, sel, ); } - late final __objc_msgSend_392Ptr = _lookup< + late final __objc_msgSend_400Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< + late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setTLSMinimumSupportedProtocolVersion_1 = _registerName1("setTLSMinimumSupportedProtocolVersion:"); - void _objc_msgSend_393( + void _objc_msgSend_401( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_393( + return __objc_msgSend_401( obj, sel, value, ); } - late final __objc_msgSend_393Ptr = _lookup< + late final __objc_msgSend_401Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< + late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_TLSMaximumSupportedProtocolVersion1 = @@ -47461,23 +47716,23 @@ class NativeCupertinoHttp { late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); late final _sel_setHTTPCookieStorage_1 = _registerName1("setHTTPCookieStorage:"); - void _objc_msgSend_394( + void _objc_msgSend_402( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_394( + return __objc_msgSend_402( obj, sel, value, ); } - late final __objc_msgSend_394Ptr = _lookup< + late final __objc_msgSend_402Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< + late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47485,84 +47740,84 @@ class NativeCupertinoHttp { _getClass1("NSURLCredentialStorage"); late final _sel_URLCredentialStorage1 = _registerName1("URLCredentialStorage"); - ffi.Pointer _objc_msgSend_395( + ffi.Pointer _objc_msgSend_403( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_395( + return __objc_msgSend_403( obj, sel, ); } - late final __objc_msgSend_395Ptr = _lookup< + late final __objc_msgSend_403Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< + late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setURLCredentialStorage_1 = _registerName1("setURLCredentialStorage:"); - void _objc_msgSend_396( + void _objc_msgSend_404( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_396( + return __objc_msgSend_404( obj, sel, value, ); } - late final __objc_msgSend_396Ptr = _lookup< + late final __objc_msgSend_404Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< + late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _class_NSURLCache1 = _getClass1("NSURLCache"); late final _sel_URLCache1 = _registerName1("URLCache"); - ffi.Pointer _objc_msgSend_397( + ffi.Pointer _objc_msgSend_405( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_397( + return __objc_msgSend_405( obj, sel, ); } - late final __objc_msgSend_397Ptr = _lookup< + late final __objc_msgSend_405Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< + late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setURLCache_1 = _registerName1("setURLCache:"); - void _objc_msgSend_398( + void _objc_msgSend_406( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_398( + return __objc_msgSend_406( obj, sel, value, ); } - late final __objc_msgSend_398Ptr = _lookup< + late final __objc_msgSend_406Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< + late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47572,100 +47827,100 @@ class NativeCupertinoHttp { _registerName1("setShouldUseExtendedBackgroundIdleMode:"); late final _sel_protocolClasses1 = _registerName1("protocolClasses"); late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); - void _objc_msgSend_399( + void _objc_msgSend_407( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_399( + return __objc_msgSend_407( obj, sel, value, ); } - late final __objc_msgSend_399Ptr = _lookup< + late final __objc_msgSend_407Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< + late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_multipathServiceType1 = _registerName1("multipathServiceType"); - int _objc_msgSend_400( + int _objc_msgSend_408( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_400( + return __objc_msgSend_408( obj, sel, ); } - late final __objc_msgSend_400Ptr = _lookup< + late final __objc_msgSend_408Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< + late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setMultipathServiceType_1 = _registerName1("setMultipathServiceType:"); - void _objc_msgSend_401( + void _objc_msgSend_409( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_401( + return __objc_msgSend_409( obj, sel, value, ); } - late final __objc_msgSend_401Ptr = _lookup< + late final __objc_msgSend_409Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< + late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_backgroundSessionConfiguration_1 = _registerName1("backgroundSessionConfiguration:"); late final _sel_sessionWithConfiguration_1 = _registerName1("sessionWithConfiguration:"); - ffi.Pointer _objc_msgSend_402( + ffi.Pointer _objc_msgSend_410( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer configuration, ) { - return __objc_msgSend_402( + return __objc_msgSend_410( obj, sel, configuration, ); } - late final __objc_msgSend_402Ptr = _lookup< + late final __objc_msgSend_410Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< + late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); - ffi.Pointer _objc_msgSend_403( + ffi.Pointer _objc_msgSend_411( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer configuration, ffi.Pointer delegate, ffi.Pointer queue, ) { - return __objc_msgSend_403( + return __objc_msgSend_411( obj, sel, configuration, @@ -47674,7 +47929,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_403Ptr = _lookup< + late final __objc_msgSend_411Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -47682,7 +47937,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< + late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -47704,89 +47959,89 @@ class NativeCupertinoHttp { _registerName1("flushWithCompletionHandler:"); late final _sel_getTasksWithCompletionHandler_1 = _registerName1("getTasksWithCompletionHandler:"); - void _objc_msgSend_404( + void _objc_msgSend_412( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_404( + return __objc_msgSend_412( obj, sel, completionHandler, ); } - late final __objc_msgSend_404Ptr = _lookup< + late final __objc_msgSend_412Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< + late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_getAllTasksWithCompletionHandler_1 = _registerName1("getAllTasksWithCompletionHandler:"); - void _objc_msgSend_405( + void _objc_msgSend_413( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_405( + return __objc_msgSend_413( obj, sel, completionHandler, ); } - late final __objc_msgSend_405Ptr = _lookup< + late final __objc_msgSend_413Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< + late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); late final _sel_dataTaskWithRequest_1 = _registerName1("dataTaskWithRequest:"); - ffi.Pointer _objc_msgSend_406( + ffi.Pointer _objc_msgSend_414( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_406( + return __objc_msgSend_414( obj, sel, request, ); } - late final __objc_msgSend_406Ptr = _lookup< + late final __objc_msgSend_414Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< + late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); - ffi.Pointer _objc_msgSend_407( + ffi.Pointer _objc_msgSend_415( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_407( + return __objc_msgSend_415( obj, sel, url, ); } - late final __objc_msgSend_407Ptr = _lookup< + late final __objc_msgSend_415Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< + late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47794,13 +48049,13 @@ class NativeCupertinoHttp { _getClass1("NSURLSessionUploadTask"); late final _sel_uploadTaskWithRequest_fromFile_1 = _registerName1("uploadTaskWithRequest:fromFile:"); - ffi.Pointer _objc_msgSend_408( + ffi.Pointer _objc_msgSend_416( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer fileURL, ) { - return __objc_msgSend_408( + return __objc_msgSend_416( obj, sel, request, @@ -47808,14 +48063,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_408Ptr = _lookup< + late final __objc_msgSend_416Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< + late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -47824,13 +48079,13 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithRequest_fromData_1 = _registerName1("uploadTaskWithRequest:fromData:"); - ffi.Pointer _objc_msgSend_409( + ffi.Pointer _objc_msgSend_417( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer bodyData, ) { - return __objc_msgSend_409( + return __objc_msgSend_417( obj, sel, request, @@ -47838,14 +48093,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_409Ptr = _lookup< + late final __objc_msgSend_417Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< + late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -47854,23 +48109,23 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithStreamedRequest_1 = _registerName1("uploadTaskWithStreamedRequest:"); - ffi.Pointer _objc_msgSend_410( + ffi.Pointer _objc_msgSend_418( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_410( + return __objc_msgSend_418( obj, sel, request, ); } - late final __objc_msgSend_410Ptr = _lookup< + late final __objc_msgSend_418Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< + late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47878,89 +48133,89 @@ class NativeCupertinoHttp { _getClass1("NSURLSessionDownloadTask"); late final _sel_cancelByProducingResumeData_1 = _registerName1("cancelByProducingResumeData:"); - void _objc_msgSend_411( + void _objc_msgSend_419( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_411( + return __objc_msgSend_419( obj, sel, completionHandler, ); } - late final __objc_msgSend_411Ptr = _lookup< + late final __objc_msgSend_419Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< + late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_downloadTaskWithRequest_1 = _registerName1("downloadTaskWithRequest:"); - ffi.Pointer _objc_msgSend_412( + ffi.Pointer _objc_msgSend_420( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_412( + return __objc_msgSend_420( obj, sel, request, ); } - late final __objc_msgSend_412Ptr = _lookup< + late final __objc_msgSend_420Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< + late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_downloadTaskWithURL_1 = _registerName1("downloadTaskWithURL:"); - ffi.Pointer _objc_msgSend_413( + ffi.Pointer _objc_msgSend_421( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_413( + return __objc_msgSend_421( obj, sel, url, ); } - late final __objc_msgSend_413Ptr = _lookup< + late final __objc_msgSend_421Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< + late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_downloadTaskWithResumeData_1 = _registerName1("downloadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_414( + ffi.Pointer _objc_msgSend_422( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer resumeData, ) { - return __objc_msgSend_414( + return __objc_msgSend_422( obj, sel, resumeData, ); } - late final __objc_msgSend_414Ptr = _lookup< + late final __objc_msgSend_422Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< + late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47969,7 +48224,7 @@ class NativeCupertinoHttp { late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = _registerName1( "readDataOfMinLength:maxLength:timeout:completionHandler:"); - void _objc_msgSend_415( + void _objc_msgSend_423( ffi.Pointer obj, ffi.Pointer sel, int minBytes, @@ -47977,7 +48232,7 @@ class NativeCupertinoHttp { double timeout, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_415( + return __objc_msgSend_423( obj, sel, minBytes, @@ -47987,7 +48242,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_415Ptr = _lookup< + late final __objc_msgSend_423Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -47996,20 +48251,20 @@ class NativeCupertinoHttp { NSUInteger, NSTimeInterval, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< + late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, int, double, ffi.Pointer<_ObjCBlock>)>(); late final _sel_writeData_timeout_completionHandler_1 = _registerName1("writeData:timeout:completionHandler:"); - void _objc_msgSend_416( + void _objc_msgSend_424( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, double timeout, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_416( + return __objc_msgSend_424( obj, sel, data, @@ -48018,7 +48273,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_416Ptr = _lookup< + late final __objc_msgSend_424Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48026,7 +48281,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSTimeInterval, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< + late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); @@ -48039,13 +48294,13 @@ class NativeCupertinoHttp { _registerName1("stopSecureConnection"); late final _sel_streamTaskWithHostName_port_1 = _registerName1("streamTaskWithHostName:port:"); - ffi.Pointer _objc_msgSend_417( + ffi.Pointer _objc_msgSend_425( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer hostname, int port, ) { - return __objc_msgSend_417( + return __objc_msgSend_425( obj, sel, hostname, @@ -48053,37 +48308,37 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_417Ptr = _lookup< + late final __objc_msgSend_425Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< + late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _class_NSNetService1 = _getClass1("NSNetService"); late final _sel_streamTaskWithNetService_1 = _registerName1("streamTaskWithNetService:"); - ffi.Pointer _objc_msgSend_418( + ffi.Pointer _objc_msgSend_426( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer service, ) { - return __objc_msgSend_418( + return __objc_msgSend_426( obj, sel, service, ); } - late final __objc_msgSend_418Ptr = _lookup< + late final __objc_msgSend_426Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< + late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -48092,32 +48347,32 @@ class NativeCupertinoHttp { late final _class_NSURLSessionWebSocketMessage1 = _getClass1("NSURLSessionWebSocketMessage"); late final _sel_type1 = _registerName1("type"); - int _objc_msgSend_419( + int _objc_msgSend_427( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_419( + return __objc_msgSend_427( obj, sel, ); } - late final __objc_msgSend_419Ptr = _lookup< + late final __objc_msgSend_427Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< + late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_sendMessage_completionHandler_1 = _registerName1("sendMessage:completionHandler:"); - void _objc_msgSend_420( + void _objc_msgSend_428( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer message, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_420( + return __objc_msgSend_428( obj, sel, message, @@ -48125,70 +48380,70 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_420Ptr = _lookup< + late final __objc_msgSend_428Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< + late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_receiveMessageWithCompletionHandler_1 = _registerName1("receiveMessageWithCompletionHandler:"); - void _objc_msgSend_421( + void _objc_msgSend_429( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_421( + return __objc_msgSend_429( obj, sel, completionHandler, ); } - late final __objc_msgSend_421Ptr = _lookup< + late final __objc_msgSend_429Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< + late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_sendPingWithPongReceiveHandler_1 = _registerName1("sendPingWithPongReceiveHandler:"); - void _objc_msgSend_422( + void _objc_msgSend_430( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> pongReceiveHandler, ) { - return __objc_msgSend_422( + return __objc_msgSend_430( obj, sel, pongReceiveHandler, ); } - late final __objc_msgSend_422Ptr = _lookup< + late final __objc_msgSend_430Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< + late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_cancelWithCloseCode_reason_1 = _registerName1("cancelWithCloseCode:reason:"); - void _objc_msgSend_423( + void _objc_msgSend_431( ffi.Pointer obj, ffi.Pointer sel, int closeCode, ffi.Pointer reason, ) { - return __objc_msgSend_423( + return __objc_msgSend_431( obj, sel, closeCode, @@ -48196,11 +48451,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_423Ptr = _lookup< + late final __objc_msgSend_431Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< + late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); @@ -48208,55 +48463,55 @@ class NativeCupertinoHttp { late final _sel_setMaximumMessageSize_1 = _registerName1("setMaximumMessageSize:"); late final _sel_closeCode1 = _registerName1("closeCode"); - int _objc_msgSend_424( + int _objc_msgSend_432( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_424( + return __objc_msgSend_432( obj, sel, ); } - late final __objc_msgSend_424Ptr = _lookup< + late final __objc_msgSend_432Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< + late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_closeReason1 = _registerName1("closeReason"); late final _sel_webSocketTaskWithURL_1 = _registerName1("webSocketTaskWithURL:"); - ffi.Pointer _objc_msgSend_425( + ffi.Pointer _objc_msgSend_433( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_425( + return __objc_msgSend_433( obj, sel, url, ); } - late final __objc_msgSend_425Ptr = _lookup< + late final __objc_msgSend_433Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< + late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_webSocketTaskWithURL_protocols_1 = _registerName1("webSocketTaskWithURL:protocols:"); - ffi.Pointer _objc_msgSend_426( + ffi.Pointer _objc_msgSend_434( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer protocols, ) { - return __objc_msgSend_426( + return __objc_msgSend_434( obj, sel, url, @@ -48264,14 +48519,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_426Ptr = _lookup< + late final __objc_msgSend_434Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< + late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48280,35 +48535,35 @@ class NativeCupertinoHttp { late final _sel_webSocketTaskWithRequest_1 = _registerName1("webSocketTaskWithRequest:"); - ffi.Pointer _objc_msgSend_427( + ffi.Pointer _objc_msgSend_435( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_427( + return __objc_msgSend_435( obj, sel, request, ); } - late final __objc_msgSend_427Ptr = _lookup< + late final __objc_msgSend_435Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< + late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dataTaskWithRequest_completionHandler_1 = _registerName1("dataTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_428( + ffi.Pointer _objc_msgSend_436( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_428( + return __objc_msgSend_436( obj, sel, request, @@ -48316,14 +48571,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_428Ptr = _lookup< + late final __objc_msgSend_436Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< + late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48332,13 +48587,13 @@ class NativeCupertinoHttp { late final _sel_dataTaskWithURL_completionHandler_1 = _registerName1("dataTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_429( + ffi.Pointer _objc_msgSend_437( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_429( + return __objc_msgSend_437( obj, sel, url, @@ -48346,14 +48601,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_429Ptr = _lookup< + late final __objc_msgSend_437Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< + late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48362,14 +48617,14 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); - ffi.Pointer _objc_msgSend_430( + ffi.Pointer _objc_msgSend_438( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer fileURL, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_430( + return __objc_msgSend_438( obj, sel, request, @@ -48378,7 +48633,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_430Ptr = _lookup< + late final __objc_msgSend_438Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -48386,7 +48641,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< + late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48396,14 +48651,14 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); - ffi.Pointer _objc_msgSend_431( + ffi.Pointer _objc_msgSend_439( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer bodyData, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_431( + return __objc_msgSend_439( obj, sel, request, @@ -48412,7 +48667,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_431Ptr = _lookup< + late final __objc_msgSend_439Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -48420,7 +48675,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< + late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48430,13 +48685,13 @@ class NativeCupertinoHttp { late final _sel_downloadTaskWithRequest_completionHandler_1 = _registerName1("downloadTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_432( + ffi.Pointer _objc_msgSend_440( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_432( + return __objc_msgSend_440( obj, sel, request, @@ -48444,14 +48699,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_432Ptr = _lookup< + late final __objc_msgSend_440Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< + late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48460,13 +48715,13 @@ class NativeCupertinoHttp { late final _sel_downloadTaskWithURL_completionHandler_1 = _registerName1("downloadTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_433( + ffi.Pointer _objc_msgSend_441( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_433( + return __objc_msgSend_441( obj, sel, url, @@ -48474,14 +48729,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_433Ptr = _lookup< + late final __objc_msgSend_441Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< + late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48490,13 +48745,13 @@ class NativeCupertinoHttp { late final _sel_downloadTaskWithResumeData_completionHandler_1 = _registerName1("downloadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_434( + ffi.Pointer _objc_msgSend_442( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer resumeData, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_434( + return __objc_msgSend_442( obj, sel, resumeData, @@ -48504,14 +48759,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_434Ptr = _lookup< + late final __objc_msgSend_442Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< + late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48576,21 +48831,21 @@ class NativeCupertinoHttp { late final _sel_isProxyConnection1 = _registerName1("isProxyConnection"); late final _sel_isReusedConnection1 = _registerName1("isReusedConnection"); late final _sel_resourceFetchType1 = _registerName1("resourceFetchType"); - int _objc_msgSend_435( + int _objc_msgSend_443( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_435( + return __objc_msgSend_443( obj, sel, ); } - late final __objc_msgSend_435Ptr = _lookup< + late final __objc_msgSend_443Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< + late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_countOfRequestHeaderBytesSent1 = @@ -48619,21 +48874,21 @@ class NativeCupertinoHttp { late final _sel_isMultipath1 = _registerName1("isMultipath"); late final _sel_domainResolutionProtocol1 = _registerName1("domainResolutionProtocol"); - int _objc_msgSend_436( + int _objc_msgSend_444( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_436( + return __objc_msgSend_444( obj, sel, ); } - late final __objc_msgSend_436Ptr = _lookup< + late final __objc_msgSend_444Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< + late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _class_NSURLSessionTaskMetrics1 = @@ -48641,21 +48896,21 @@ class NativeCupertinoHttp { late final _sel_transactionMetrics1 = _registerName1("transactionMetrics"); late final _class_NSDateInterval1 = _getClass1("NSDateInterval"); late final _sel_taskInterval1 = _registerName1("taskInterval"); - ffi.Pointer _objc_msgSend_437( + ffi.Pointer _objc_msgSend_445( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_437( + return __objc_msgSend_445( obj, sel, ); } - late final __objc_msgSend_437Ptr = _lookup< + late final __objc_msgSend_445Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< + late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -48664,14 +48919,14 @@ class NativeCupertinoHttp { late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = _registerName1( "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); - void _objc_msgSend_438( + void _objc_msgSend_446( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, int visibility, ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_438( + return __objc_msgSend_446( obj, sel, typeIdentifier, @@ -48680,7 +48935,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_438Ptr = _lookup< + late final __objc_msgSend_446Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48688,14 +48943,14 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< + late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = _registerName1( "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); - void _objc_msgSend_439( + void _objc_msgSend_447( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, @@ -48703,7 +48958,7 @@ class NativeCupertinoHttp { int visibility, ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_439( + return __objc_msgSend_447( obj, sel, typeIdentifier, @@ -48713,7 +48968,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_439Ptr = _lookup< + late final __objc_msgSend_447Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48722,7 +48977,7 @@ class NativeCupertinoHttp { ffi.Int32, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< + late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); @@ -48730,23 +48985,23 @@ class NativeCupertinoHttp { _registerName1("registeredTypeIdentifiers"); late final _sel_registeredTypeIdentifiersWithFileOptions_1 = _registerName1("registeredTypeIdentifiersWithFileOptions:"); - ffi.Pointer _objc_msgSend_440( + ffi.Pointer _objc_msgSend_448( ffi.Pointer obj, ffi.Pointer sel, int fileOptions, ) { - return __objc_msgSend_440( + return __objc_msgSend_448( obj, sel, fileOptions, ); } - late final __objc_msgSend_440Ptr = _lookup< + late final __objc_msgSend_448Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< + late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -48755,13 +49010,13 @@ class NativeCupertinoHttp { late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = _registerName1( "hasRepresentationConformingToTypeIdentifier:fileOptions:"); - bool _objc_msgSend_441( + bool _objc_msgSend_449( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, int fileOptions, ) { - return __objc_msgSend_441( + return __objc_msgSend_449( obj, sel, typeIdentifier, @@ -48769,24 +49024,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_441Ptr = _lookup< + late final __objc_msgSend_449Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< + late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = _registerName1( "loadDataRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_442( + ffi.Pointer _objc_msgSend_450( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_442( + return __objc_msgSend_450( obj, sel, typeIdentifier, @@ -48794,14 +49049,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_442Ptr = _lookup< + late final __objc_msgSend_450Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< + late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48811,13 +49066,13 @@ class NativeCupertinoHttp { late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = _registerName1( "loadFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_443( + ffi.Pointer _objc_msgSend_451( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_443( + return __objc_msgSend_451( obj, sel, typeIdentifier, @@ -48825,14 +49080,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_443Ptr = _lookup< + late final __objc_msgSend_451Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< + late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48842,13 +49097,13 @@ class NativeCupertinoHttp { late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = _registerName1( "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_444( + ffi.Pointer _objc_msgSend_452( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_444( + return __objc_msgSend_452( obj, sel, typeIdentifier, @@ -48856,14 +49111,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_444Ptr = _lookup< + late final __objc_msgSend_452Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< + late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48875,13 +49130,13 @@ class NativeCupertinoHttp { late final _sel_initWithObject_1 = _registerName1("initWithObject:"); late final _sel_registerObject_visibility_1 = _registerName1("registerObject:visibility:"); - void _objc_msgSend_445( + void _objc_msgSend_453( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer object, int visibility, ) { - return __objc_msgSend_445( + return __objc_msgSend_453( obj, sel, object, @@ -48889,24 +49144,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_445Ptr = _lookup< + late final __objc_msgSend_453Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< + late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_registerObjectOfClass_visibility_loadHandler_1 = _registerName1("registerObjectOfClass:visibility:loadHandler:"); - void _objc_msgSend_446( + void _objc_msgSend_454( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aClass, int visibility, ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_446( + return __objc_msgSend_454( obj, sel, aClass, @@ -48915,7 +49170,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_446Ptr = _lookup< + late final __objc_msgSend_454Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48923,7 +49178,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< + late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); @@ -48931,13 +49186,13 @@ class NativeCupertinoHttp { _registerName1("canLoadObjectOfClass:"); late final _sel_loadObjectOfClass_completionHandler_1 = _registerName1("loadObjectOfClass:completionHandler:"); - ffi.Pointer _objc_msgSend_447( + ffi.Pointer _objc_msgSend_455( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aClass, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_447( + return __objc_msgSend_455( obj, sel, aClass, @@ -48945,14 +49200,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_447Ptr = _lookup< + late final __objc_msgSend_455Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< + late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48961,13 +49216,13 @@ class NativeCupertinoHttp { late final _sel_initWithItem_typeIdentifier_1 = _registerName1("initWithItem:typeIdentifier:"); - instancetype _objc_msgSend_448( + instancetype _objc_msgSend_456( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer item, ffi.Pointer typeIdentifier, ) { - return __objc_msgSend_448( + return __objc_msgSend_456( obj, sel, item, @@ -48975,26 +49230,26 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_448Ptr = _lookup< + late final __objc_msgSend_456Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< + late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_registerItemForTypeIdentifier_loadHandler_1 = _registerName1("registerItemForTypeIdentifier:loadHandler:"); - void _objc_msgSend_449( + void _objc_msgSend_457( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, NSItemProviderLoadHandler loadHandler, ) { - return __objc_msgSend_449( + return __objc_msgSend_457( obj, sel, typeIdentifier, @@ -49002,27 +49257,27 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_449Ptr = _lookup< + late final __objc_msgSend_457Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< + late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>(); late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); - void _objc_msgSend_450( + void _objc_msgSend_458( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer options, NSItemProviderCompletionHandler completionHandler, ) { - return __objc_msgSend_450( + return __objc_msgSend_458( obj, sel, typeIdentifier, @@ -49031,7 +49286,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_450Ptr = _lookup< + late final __objc_msgSend_458Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -49039,7 +49294,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< + late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -49048,55 +49303,55 @@ class NativeCupertinoHttp { NSItemProviderCompletionHandler)>(); late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); - NSItemProviderLoadHandler _objc_msgSend_451( + NSItemProviderLoadHandler _objc_msgSend_459( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_451( + return __objc_msgSend_459( obj, sel, ); } - late final __objc_msgSend_451Ptr = _lookup< + late final __objc_msgSend_459Ptr = _lookup< ffi.NativeFunction< NSItemProviderLoadHandler Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< + late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< NSItemProviderLoadHandler Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setPreviewImageHandler_1 = _registerName1("setPreviewImageHandler:"); - void _objc_msgSend_452( + void _objc_msgSend_460( ffi.Pointer obj, ffi.Pointer sel, NSItemProviderLoadHandler value, ) { - return __objc_msgSend_452( + return __objc_msgSend_460( obj, sel, value, ); } - late final __objc_msgSend_452Ptr = _lookup< + late final __objc_msgSend_460Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< + late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>(); late final _sel_loadPreviewImageWithOptions_completionHandler_1 = _registerName1("loadPreviewImageWithOptions:completionHandler:"); - void _objc_msgSend_453( + void _objc_msgSend_461( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer options, NSItemProviderCompletionHandler completionHandler, ) { - return __objc_msgSend_453( + return __objc_msgSend_461( obj, sel, options, @@ -49104,14 +49359,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_453Ptr = _lookup< + late final __objc_msgSend_461Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< + late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderCompletionHandler)>(); @@ -49398,13 +49653,13 @@ class NativeCupertinoHttp { late final _class_NSMutableString1 = _getClass1("NSMutableString"); late final _sel_replaceCharactersInRange_withString_1 = _registerName1("replaceCharactersInRange:withString:"); - void _objc_msgSend_454( + void _objc_msgSend_462( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ffi.Pointer aString, ) { - return __objc_msgSend_454( + return __objc_msgSend_462( obj, sel, range, @@ -49412,23 +49667,23 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_454Ptr = _lookup< + late final __objc_msgSend_462Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< + late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>(); late final _sel_insertString_atIndex_1 = _registerName1("insertString:atIndex:"); - void _objc_msgSend_455( + void _objc_msgSend_463( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aString, int loc, ) { - return __objc_msgSend_455( + return __objc_msgSend_463( obj, sel, aString, @@ -49436,11 +49691,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_455Ptr = _lookup< + late final __objc_msgSend_463Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< + late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -49451,7 +49706,7 @@ class NativeCupertinoHttp { late final _sel_setString_1 = _registerName1("setString:"); late final _sel_replaceOccurrencesOfString_withString_options_range_1 = _registerName1("replaceOccurrencesOfString:withString:options:range:"); - int _objc_msgSend_456( + int _objc_msgSend_464( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer target, @@ -49459,7 +49714,7 @@ class NativeCupertinoHttp { int options, NSRange searchRange, ) { - return __objc_msgSend_456( + return __objc_msgSend_464( obj, sel, target, @@ -49469,7 +49724,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_456Ptr = _lookup< + late final __objc_msgSend_464Ptr = _lookup< ffi.NativeFunction< NSUInteger Function( ffi.Pointer, @@ -49478,13 +49733,13 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< + late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, NSRange)>(); late final _sel_applyTransform_reverse_range_updatedRange_1 = _registerName1("applyTransform:reverse:range:updatedRange:"); - bool _objc_msgSend_457( + bool _objc_msgSend_465( ffi.Pointer obj, ffi.Pointer sel, NSStringTransform transform, @@ -49492,7 +49747,7 @@ class NativeCupertinoHttp { NSRange range, NSRangePointer resultingRange, ) { - return __objc_msgSend_457( + return __objc_msgSend_465( obj, sel, transform, @@ -49502,7 +49757,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_457Ptr = _lookup< + late final __objc_msgSend_465Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -49511,27 +49766,27 @@ class NativeCupertinoHttp { ffi.Bool, NSRange, NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< + late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, NSStringTransform, bool, NSRange, NSRangePointer)>(); - ffi.Pointer _objc_msgSend_458( + ffi.Pointer _objc_msgSend_466( ffi.Pointer obj, ffi.Pointer sel, int capacity, ) { - return __objc_msgSend_458( + return __objc_msgSend_466( obj, sel, capacity, ); } - late final __objc_msgSend_458Ptr = _lookup< + late final __objc_msgSend_466Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< + late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -49567,86 +49822,86 @@ class NativeCupertinoHttp { _registerName1("removeCharactersInString:"); late final _sel_formUnionWithCharacterSet_1 = _registerName1("formUnionWithCharacterSet:"); - void _objc_msgSend_459( + void _objc_msgSend_467( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherSet, ) { - return __objc_msgSend_459( + return __objc_msgSend_467( obj, sel, otherSet, ); } - late final __objc_msgSend_459Ptr = _lookup< + late final __objc_msgSend_467Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< + late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_formIntersectionWithCharacterSet_1 = _registerName1("formIntersectionWithCharacterSet:"); late final _sel_invert1 = _registerName1("invert"); - ffi.Pointer _objc_msgSend_460( + ffi.Pointer _objc_msgSend_468( ffi.Pointer obj, ffi.Pointer sel, NSRange aRange, ) { - return __objc_msgSend_460( + return __objc_msgSend_468( obj, sel, aRange, ); } - late final __objc_msgSend_460Ptr = _lookup< + late final __objc_msgSend_468Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< + late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSRange)>(); - ffi.Pointer _objc_msgSend_461( + ffi.Pointer _objc_msgSend_469( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aString, ) { - return __objc_msgSend_461( + return __objc_msgSend_469( obj, sel, aString, ); } - late final __objc_msgSend_461Ptr = _lookup< + late final __objc_msgSend_469Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< + late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_462( + ffi.Pointer _objc_msgSend_470( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, ) { - return __objc_msgSend_462( + return __objc_msgSend_470( obj, sel, data, ); } - late final __objc_msgSend_462Ptr = _lookup< + late final __objc_msgSend_470Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< + late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -51232,13 +51487,13 @@ class NativeCupertinoHttp { late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); - instancetype _objc_msgSend_463( + instancetype _objc_msgSend_471( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer name, ffi.Pointer value, ) { - return __objc_msgSend_463( + return __objc_msgSend_471( obj, sel, name, @@ -51246,14 +51501,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_463Ptr = _lookup< + late final __objc_msgSend_471Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< + late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -51268,23 +51523,23 @@ class NativeCupertinoHttp { late final _sel_componentsWithString_1 = _registerName1("componentsWithString:"); late final _sel_URLRelativeToURL_1 = _registerName1("URLRelativeToURL:"); - ffi.Pointer _objc_msgSend_464( + ffi.Pointer _objc_msgSend_472( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer baseURL, ) { - return __objc_msgSend_464( + return __objc_msgSend_472( obj, sel, baseURL, ); } - late final __objc_msgSend_464Ptr = _lookup< + late final __objc_msgSend_472Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< + late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -51336,7 +51591,7 @@ class NativeCupertinoHttp { late final _class_NSHTTPURLResponse1 = _getClass1("NSHTTPURLResponse"); late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_1 = _registerName1("initWithURL:statusCode:HTTPVersion:headerFields:"); - instancetype _objc_msgSend_465( + instancetype _objc_msgSend_473( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, @@ -51344,7 +51599,7 @@ class NativeCupertinoHttp { ffi.Pointer HTTPVersion, ffi.Pointer headerFields, ) { - return __objc_msgSend_465( + return __objc_msgSend_473( obj, sel, url, @@ -51354,7 +51609,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_465Ptr = _lookup< + late final __objc_msgSend_473Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -51363,7 +51618,7 @@ class NativeCupertinoHttp { NSInteger, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< + late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -51376,23 +51631,23 @@ class NativeCupertinoHttp { late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); late final _sel_localizedStringForStatusCode_1 = _registerName1("localizedStringForStatusCode:"); - ffi.Pointer _objc_msgSend_466( + ffi.Pointer _objc_msgSend_474( ffi.Pointer obj, ffi.Pointer sel, int statusCode, ) { - return __objc_msgSend_466( + return __objc_msgSend_474( obj, sel, statusCode, ); } - late final __objc_msgSend_466Ptr = _lookup< + late final __objc_msgSend_474Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< + late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -51527,14 +51782,14 @@ class NativeCupertinoHttp { late final _class_NSException1 = _getClass1("NSException"); late final _sel_exceptionWithName_reason_userInfo_1 = _registerName1("exceptionWithName:reason:userInfo:"); - ffi.Pointer _objc_msgSend_467( + ffi.Pointer _objc_msgSend_475( ffi.Pointer obj, ffi.Pointer sel, NSExceptionName name, ffi.Pointer reason, ffi.Pointer userInfo, ) { - return __objc_msgSend_467( + return __objc_msgSend_475( obj, sel, name, @@ -51543,7 +51798,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_467Ptr = _lookup< + late final __objc_msgSend_475Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -51551,7 +51806,7 @@ class NativeCupertinoHttp { NSExceptionName, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< + late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -51561,14 +51816,14 @@ class NativeCupertinoHttp { late final _sel_initWithName_reason_userInfo_1 = _registerName1("initWithName:reason:userInfo:"); - instancetype _objc_msgSend_468( + instancetype _objc_msgSend_476( ffi.Pointer obj, ffi.Pointer sel, NSExceptionName aName, ffi.Pointer aReason, ffi.Pointer aUserInfo, ) { - return __objc_msgSend_468( + return __objc_msgSend_476( obj, sel, aName, @@ -51577,7 +51832,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_468Ptr = _lookup< + late final __objc_msgSend_476Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -51585,7 +51840,7 @@ class NativeCupertinoHttp { NSExceptionName, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< + late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, NSExceptionName, ffi.Pointer, ffi.Pointer)>(); @@ -51597,14 +51852,14 @@ class NativeCupertinoHttp { late final _sel_raise_format_1 = _registerName1("raise:format:"); late final _sel_raise_format_arguments_1 = _registerName1("raise:format:arguments:"); - void _objc_msgSend_469( + void _objc_msgSend_477( ffi.Pointer obj, ffi.Pointer sel, NSExceptionName name, ffi.Pointer format, va_list argList, ) { - return __objc_msgSend_469( + return __objc_msgSend_477( obj, sel, name, @@ -51613,7 +51868,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_469Ptr = _lookup< + late final __objc_msgSend_477Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -51621,7 +51876,7 @@ class NativeCupertinoHttp { NSExceptionName, ffi.Pointer, va_list)>>('objc_msgSend'); - late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< + late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSExceptionName, ffi.Pointer, va_list)>(); @@ -51662,28 +51917,28 @@ class NativeCupertinoHttp { late final _class_NSAssertionHandler1 = _getClass1("NSAssertionHandler"); late final _sel_currentHandler1 = _registerName1("currentHandler"); - ffi.Pointer _objc_msgSend_470( + ffi.Pointer _objc_msgSend_478( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_470( + return __objc_msgSend_478( obj, sel, ); } - late final __objc_msgSend_470Ptr = _lookup< + late final __objc_msgSend_478Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< + late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_handleFailureInMethod_object_file_lineNumber_description_1 = _registerName1( "handleFailureInMethod:object:file:lineNumber:description:"); - void _objc_msgSend_471( + void _objc_msgSend_479( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer selector, @@ -51692,7 +51947,7 @@ class NativeCupertinoHttp { int line, ffi.Pointer format, ) { - return __objc_msgSend_471( + return __objc_msgSend_479( obj, sel, selector, @@ -51703,7 +51958,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_471Ptr = _lookup< + late final __objc_msgSend_479Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -51713,7 +51968,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< + late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -51725,7 +51980,7 @@ class NativeCupertinoHttp { late final _sel_handleFailureInFunction_file_lineNumber_description_1 = _registerName1("handleFailureInFunction:file:lineNumber:description:"); - void _objc_msgSend_472( + void _objc_msgSend_480( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer functionName, @@ -51733,7 +51988,7 @@ class NativeCupertinoHttp { int line, ffi.Pointer format, ) { - return __objc_msgSend_472( + return __objc_msgSend_480( obj, sel, functionName, @@ -51743,7 +51998,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_472Ptr = _lookup< + late final __objc_msgSend_480Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -51752,7 +52007,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< + late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -51764,23 +52019,23 @@ class NativeCupertinoHttp { late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); late final _sel_blockOperationWithBlock_1 = _registerName1("blockOperationWithBlock:"); - instancetype _objc_msgSend_473( + instancetype _objc_msgSend_481( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_473( + return __objc_msgSend_481( obj, sel, block, ); } - late final __objc_msgSend_473Ptr = _lookup< + late final __objc_msgSend_481Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< + late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); @@ -51790,14 +52045,14 @@ class NativeCupertinoHttp { _getClass1("NSInvocationOperation"); late final _sel_initWithTarget_selector_object_1 = _registerName1("initWithTarget:selector:object:"); - instancetype _objc_msgSend_474( + instancetype _objc_msgSend_482( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer target, ffi.Pointer sel1, ffi.Pointer arg, ) { - return __objc_msgSend_474( + return __objc_msgSend_482( obj, sel, target, @@ -51806,7 +52061,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_474Ptr = _lookup< + late final __objc_msgSend_482Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -51814,7 +52069,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< + late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -51823,42 +52078,42 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); - instancetype _objc_msgSend_475( + instancetype _objc_msgSend_483( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer inv, ) { - return __objc_msgSend_475( + return __objc_msgSend_483( obj, sel, inv, ); } - late final __objc_msgSend_475Ptr = _lookup< + late final __objc_msgSend_483Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< + late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_invocation1 = _registerName1("invocation"); - ffi.Pointer _objc_msgSend_476( + ffi.Pointer _objc_msgSend_484( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_476( + return __objc_msgSend_484( obj, sel, ); } - late final __objc_msgSend_476Ptr = _lookup< + late final __objc_msgSend_484Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< + late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -58298,23 +58553,23 @@ class NativeCupertinoHttp { late final _class_CUPHTTPTaskConfiguration1 = _getClass1("CUPHTTPTaskConfiguration"); late final _sel_initWithPort_1 = _registerName1("initWithPort:"); - ffi.Pointer _objc_msgSend_477( + ffi.Pointer _objc_msgSend_485( ffi.Pointer obj, ffi.Pointer sel, int sendPort, ) { - return __objc_msgSend_477( + return __objc_msgSend_485( obj, sel, sendPort, ); } - late final __objc_msgSend_477Ptr = _lookup< + late final __objc_msgSend_485Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, Dart_Port)>>('objc_msgSend'); - late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< + late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -58323,13 +58578,13 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPClientDelegate"); late final _sel_registerTask_withConfiguration_1 = _registerName1("registerTask:withConfiguration:"); - void _objc_msgSend_478( + void _objc_msgSend_486( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer task, ffi.Pointer config, ) { - return __objc_msgSend_478( + return __objc_msgSend_486( obj, sel, task, @@ -58337,14 +58592,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_478Ptr = _lookup< + late final __objc_msgSend_486Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< + late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -58352,13 +58607,13 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedDelegate"); late final _sel_initWithSession_task_1 = _registerName1("initWithSession:task:"); - ffi.Pointer _objc_msgSend_479( + ffi.Pointer _objc_msgSend_487( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ) { - return __objc_msgSend_479( + return __objc_msgSend_487( obj, sel, session, @@ -58366,14 +58621,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_479Ptr = _lookup< + late final __objc_msgSend_487Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< + late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58383,41 +58638,41 @@ class NativeCupertinoHttp { late final _sel_finish1 = _registerName1("finish"); late final _sel_session1 = _registerName1("session"); late final _sel_task1 = _registerName1("task"); - ffi.Pointer _objc_msgSend_480( + ffi.Pointer _objc_msgSend_488( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_480( + return __objc_msgSend_488( obj, sel, ); } - late final __objc_msgSend_480Ptr = _lookup< + late final __objc_msgSend_488Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< + late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _class_NSLock1 = _getClass1("NSLock"); late final _sel_lock1 = _registerName1("lock"); - ffi.Pointer _objc_msgSend_481( + ffi.Pointer _objc_msgSend_489( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_481( + return __objc_msgSend_489( obj, sel, ); } - late final __objc_msgSend_481Ptr = _lookup< + late final __objc_msgSend_489Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< + late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -58425,7 +58680,7 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedRedirect"); late final _sel_initWithSession_task_response_request_1 = _registerName1("initWithSession:task:response:request:"); - ffi.Pointer _objc_msgSend_482( + ffi.Pointer _objc_msgSend_490( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, @@ -58433,7 +58688,7 @@ class NativeCupertinoHttp { ffi.Pointer response, ffi.Pointer request, ) { - return __objc_msgSend_482( + return __objc_msgSend_490( obj, sel, session, @@ -58443,7 +58698,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_482Ptr = _lookup< + late final __objc_msgSend_490Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58452,7 +58707,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< + late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58462,41 +58717,41 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); - void _objc_msgSend_483( + void _objc_msgSend_491( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_483( + return __objc_msgSend_491( obj, sel, request, ); } - late final __objc_msgSend_483Ptr = _lookup< + late final __objc_msgSend_491Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< + late final __objc_msgSend_491 = __objc_msgSend_491Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_484( + ffi.Pointer _objc_msgSend_492( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_484( + return __objc_msgSend_492( obj, sel, ); } - late final __objc_msgSend_484Ptr = _lookup< + late final __objc_msgSend_492Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< + late final __objc_msgSend_492 = __objc_msgSend_492Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -58505,14 +58760,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedResponse"); late final _sel_initWithSession_task_response_1 = _registerName1("initWithSession:task:response:"); - ffi.Pointer _objc_msgSend_485( + ffi.Pointer _objc_msgSend_493( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ffi.Pointer response, ) { - return __objc_msgSend_485( + return __objc_msgSend_493( obj, sel, session, @@ -58521,7 +58776,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_485Ptr = _lookup< + late final __objc_msgSend_493Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58529,7 +58784,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< + late final __objc_msgSend_493 = __objc_msgSend_493Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58539,54 +58794,54 @@ class NativeCupertinoHttp { late final _sel_finishWithDisposition_1 = _registerName1("finishWithDisposition:"); - void _objc_msgSend_486( + void _objc_msgSend_494( ffi.Pointer obj, ffi.Pointer sel, int disposition, ) { - return __objc_msgSend_486( + return __objc_msgSend_494( obj, sel, disposition, ); } - late final __objc_msgSend_486Ptr = _lookup< + late final __objc_msgSend_494Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< + late final __objc_msgSend_494 = __objc_msgSend_494Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_disposition1 = _registerName1("disposition"); - int _objc_msgSend_487( + int _objc_msgSend_495( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_487( + return __objc_msgSend_495( obj, sel, ); } - late final __objc_msgSend_487Ptr = _lookup< + late final __objc_msgSend_495Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< + late final __objc_msgSend_495 = __objc_msgSend_495Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); late final _sel_initWithSession_task_data_1 = _registerName1("initWithSession:task:data:"); - ffi.Pointer _objc_msgSend_488( + ffi.Pointer _objc_msgSend_496( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ffi.Pointer data, ) { - return __objc_msgSend_488( + return __objc_msgSend_496( obj, sel, session, @@ -58595,7 +58850,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_488Ptr = _lookup< + late final __objc_msgSend_496Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58603,7 +58858,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< + late final __objc_msgSend_496 = __objc_msgSend_496Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58615,14 +58870,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedComplete"); late final _sel_initWithSession_task_error_1 = _registerName1("initWithSession:task:error:"); - ffi.Pointer _objc_msgSend_489( + ffi.Pointer _objc_msgSend_497( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ffi.Pointer error, ) { - return __objc_msgSend_489( + return __objc_msgSend_497( obj, sel, session, @@ -58631,7 +58886,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_489Ptr = _lookup< + late final __objc_msgSend_497Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58639,7 +58894,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< + late final __objc_msgSend_497 = __objc_msgSend_497Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58651,14 +58906,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedFinishedDownloading"); late final _sel_initWithSession_downloadTask_url_1 = _registerName1("initWithSession:downloadTask:url:"); - ffi.Pointer _objc_msgSend_490( + ffi.Pointer _objc_msgSend_498( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer downloadTask, ffi.Pointer location, ) { - return __objc_msgSend_490( + return __objc_msgSend_498( obj, sel, session, @@ -58667,7 +58922,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_490Ptr = _lookup< + late final __objc_msgSend_498Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58675,7 +58930,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< + late final __objc_msgSend_498 = __objc_msgSend_498Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58688,14 +58943,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedWebSocketOpened"); late final _sel_initWithSession_webSocketTask_didOpenWithProtocol_1 = _registerName1("initWithSession:webSocketTask:didOpenWithProtocol:"); - ffi.Pointer _objc_msgSend_491( + ffi.Pointer _objc_msgSend_499( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer webSocketTask, ffi.Pointer protocol, ) { - return __objc_msgSend_491( + return __objc_msgSend_499( obj, sel, session, @@ -58704,7 +58959,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_491Ptr = _lookup< + late final __objc_msgSend_499Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58712,7 +58967,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_491 = __objc_msgSend_491Ptr.asFunction< + late final __objc_msgSend_499 = __objc_msgSend_499Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58725,7 +58980,7 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedWebSocketClosed"); late final _sel_initWithSession_webSocketTask_didCloseWithCode_reason_1 = _registerName1("initWithSession:webSocketTask:didCloseWithCode:reason:"); - ffi.Pointer _objc_msgSend_492( + ffi.Pointer _objc_msgSend_500( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, @@ -58733,7 +58988,7 @@ class NativeCupertinoHttp { int closeCode, ffi.Pointer reason, ) { - return __objc_msgSend_492( + return __objc_msgSend_500( obj, sel, session, @@ -58743,7 +58998,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_492Ptr = _lookup< + late final __objc_msgSend_500Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58752,7 +59007,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_492 = __objc_msgSend_492Ptr.asFunction< + late final __objc_msgSend_500 = __objc_msgSend_500Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58815,6 +59070,295 @@ class NativeCupertinoHttp { ffi.Pointer, Dart_Port)>>('CUPHTTPReceiveMessage'); late final _CUPHTTPReceiveMessage = _CUPHTTPReceiveMessagePtr.asFunction< void Function(ffi.Pointer, int)>(); + + late final ffi.Pointer _NSStreamSocketSecurityLevelKey = + _lookup('NSStreamSocketSecurityLevelKey'); + + NSStreamPropertyKey get NSStreamSocketSecurityLevelKey => + _NSStreamSocketSecurityLevelKey.value; + + set NSStreamSocketSecurityLevelKey(NSStreamPropertyKey value) => + _NSStreamSocketSecurityLevelKey.value = value; + + late final ffi.Pointer + _NSStreamSocketSecurityLevelNone = + _lookup('NSStreamSocketSecurityLevelNone'); + + NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelNone => + _NSStreamSocketSecurityLevelNone.value; + + set NSStreamSocketSecurityLevelNone(NSStreamSocketSecurityLevel value) => + _NSStreamSocketSecurityLevelNone.value = value; + + late final ffi.Pointer + _NSStreamSocketSecurityLevelSSLv2 = + _lookup('NSStreamSocketSecurityLevelSSLv2'); + + NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelSSLv2 => + _NSStreamSocketSecurityLevelSSLv2.value; + + set NSStreamSocketSecurityLevelSSLv2(NSStreamSocketSecurityLevel value) => + _NSStreamSocketSecurityLevelSSLv2.value = value; + + late final ffi.Pointer + _NSStreamSocketSecurityLevelSSLv3 = + _lookup('NSStreamSocketSecurityLevelSSLv3'); + + NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelSSLv3 => + _NSStreamSocketSecurityLevelSSLv3.value; + + set NSStreamSocketSecurityLevelSSLv3(NSStreamSocketSecurityLevel value) => + _NSStreamSocketSecurityLevelSSLv3.value = value; + + late final ffi.Pointer + _NSStreamSocketSecurityLevelTLSv1 = + _lookup('NSStreamSocketSecurityLevelTLSv1'); + + NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelTLSv1 => + _NSStreamSocketSecurityLevelTLSv1.value; + + set NSStreamSocketSecurityLevelTLSv1(NSStreamSocketSecurityLevel value) => + _NSStreamSocketSecurityLevelTLSv1.value = value; + + late final ffi.Pointer + _NSStreamSocketSecurityLevelNegotiatedSSL = + _lookup( + 'NSStreamSocketSecurityLevelNegotiatedSSL'); + + NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelNegotiatedSSL => + _NSStreamSocketSecurityLevelNegotiatedSSL.value; + + set NSStreamSocketSecurityLevelNegotiatedSSL( + NSStreamSocketSecurityLevel value) => + _NSStreamSocketSecurityLevelNegotiatedSSL.value = value; + + late final ffi.Pointer + _NSStreamSOCKSProxyConfigurationKey = + _lookup('NSStreamSOCKSProxyConfigurationKey'); + + NSStreamPropertyKey get NSStreamSOCKSProxyConfigurationKey => + _NSStreamSOCKSProxyConfigurationKey.value; + + set NSStreamSOCKSProxyConfigurationKey(NSStreamPropertyKey value) => + _NSStreamSOCKSProxyConfigurationKey.value = value; + + late final ffi.Pointer + _NSStreamSOCKSProxyHostKey = + _lookup('NSStreamSOCKSProxyHostKey'); + + NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyHostKey => + _NSStreamSOCKSProxyHostKey.value; + + set NSStreamSOCKSProxyHostKey(NSStreamSOCKSProxyConfiguration value) => + _NSStreamSOCKSProxyHostKey.value = value; + + late final ffi.Pointer + _NSStreamSOCKSProxyPortKey = + _lookup('NSStreamSOCKSProxyPortKey'); + + NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyPortKey => + _NSStreamSOCKSProxyPortKey.value; + + set NSStreamSOCKSProxyPortKey(NSStreamSOCKSProxyConfiguration value) => + _NSStreamSOCKSProxyPortKey.value = value; + + late final ffi.Pointer + _NSStreamSOCKSProxyVersionKey = + _lookup('NSStreamSOCKSProxyVersionKey'); + + NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyVersionKey => + _NSStreamSOCKSProxyVersionKey.value; + + set NSStreamSOCKSProxyVersionKey(NSStreamSOCKSProxyConfiguration value) => + _NSStreamSOCKSProxyVersionKey.value = value; + + late final ffi.Pointer + _NSStreamSOCKSProxyUserKey = + _lookup('NSStreamSOCKSProxyUserKey'); + + NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyUserKey => + _NSStreamSOCKSProxyUserKey.value; + + set NSStreamSOCKSProxyUserKey(NSStreamSOCKSProxyConfiguration value) => + _NSStreamSOCKSProxyUserKey.value = value; + + late final ffi.Pointer + _NSStreamSOCKSProxyPasswordKey = + _lookup('NSStreamSOCKSProxyPasswordKey'); + + NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyPasswordKey => + _NSStreamSOCKSProxyPasswordKey.value; + + set NSStreamSOCKSProxyPasswordKey(NSStreamSOCKSProxyConfiguration value) => + _NSStreamSOCKSProxyPasswordKey.value = value; + + late final ffi.Pointer + _NSStreamSOCKSProxyVersion4 = + _lookup('NSStreamSOCKSProxyVersion4'); + + NSStreamSOCKSProxyVersion get NSStreamSOCKSProxyVersion4 => + _NSStreamSOCKSProxyVersion4.value; + + set NSStreamSOCKSProxyVersion4(NSStreamSOCKSProxyVersion value) => + _NSStreamSOCKSProxyVersion4.value = value; + + late final ffi.Pointer + _NSStreamSOCKSProxyVersion5 = + _lookup('NSStreamSOCKSProxyVersion5'); + + NSStreamSOCKSProxyVersion get NSStreamSOCKSProxyVersion5 => + _NSStreamSOCKSProxyVersion5.value; + + set NSStreamSOCKSProxyVersion5(NSStreamSOCKSProxyVersion value) => + _NSStreamSOCKSProxyVersion5.value = value; + + late final ffi.Pointer + _NSStreamDataWrittenToMemoryStreamKey = + _lookup('NSStreamDataWrittenToMemoryStreamKey'); + + NSStreamPropertyKey get NSStreamDataWrittenToMemoryStreamKey => + _NSStreamDataWrittenToMemoryStreamKey.value; + + set NSStreamDataWrittenToMemoryStreamKey(NSStreamPropertyKey value) => + _NSStreamDataWrittenToMemoryStreamKey.value = value; + + late final ffi.Pointer _NSStreamFileCurrentOffsetKey = + _lookup('NSStreamFileCurrentOffsetKey'); + + NSStreamPropertyKey get NSStreamFileCurrentOffsetKey => + _NSStreamFileCurrentOffsetKey.value; + + set NSStreamFileCurrentOffsetKey(NSStreamPropertyKey value) => + _NSStreamFileCurrentOffsetKey.value = value; + + late final ffi.Pointer _NSStreamSocketSSLErrorDomain = + _lookup('NSStreamSocketSSLErrorDomain'); + + NSErrorDomain1 get NSStreamSocketSSLErrorDomain => + _NSStreamSocketSSLErrorDomain.value; + + set NSStreamSocketSSLErrorDomain(NSErrorDomain1 value) => + _NSStreamSocketSSLErrorDomain.value = value; + + late final ffi.Pointer _NSStreamSOCKSErrorDomain = + _lookup('NSStreamSOCKSErrorDomain'); + + NSErrorDomain1 get NSStreamSOCKSErrorDomain => + _NSStreamSOCKSErrorDomain.value; + + set NSStreamSOCKSErrorDomain(NSErrorDomain1 value) => + _NSStreamSOCKSErrorDomain.value = value; + + late final ffi.Pointer _NSStreamNetworkServiceType = + _lookup('NSStreamNetworkServiceType'); + + NSStreamPropertyKey get NSStreamNetworkServiceType => + _NSStreamNetworkServiceType.value; + + set NSStreamNetworkServiceType(NSStreamPropertyKey value) => + _NSStreamNetworkServiceType.value = value; + + late final ffi.Pointer + _NSStreamNetworkServiceTypeVoIP = + _lookup( + 'NSStreamNetworkServiceTypeVoIP'); + + NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeVoIP => + _NSStreamNetworkServiceTypeVoIP.value; + + set NSStreamNetworkServiceTypeVoIP(NSStreamNetworkServiceTypeValue value) => + _NSStreamNetworkServiceTypeVoIP.value = value; + + late final ffi.Pointer + _NSStreamNetworkServiceTypeVideo = + _lookup( + 'NSStreamNetworkServiceTypeVideo'); + + NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeVideo => + _NSStreamNetworkServiceTypeVideo.value; + + set NSStreamNetworkServiceTypeVideo(NSStreamNetworkServiceTypeValue value) => + _NSStreamNetworkServiceTypeVideo.value = value; + + late final ffi.Pointer + _NSStreamNetworkServiceTypeBackground = + _lookup( + 'NSStreamNetworkServiceTypeBackground'); + + NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeBackground => + _NSStreamNetworkServiceTypeBackground.value; + + set NSStreamNetworkServiceTypeBackground( + NSStreamNetworkServiceTypeValue value) => + _NSStreamNetworkServiceTypeBackground.value = value; + + late final ffi.Pointer + _NSStreamNetworkServiceTypeVoice = + _lookup( + 'NSStreamNetworkServiceTypeVoice'); + + NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeVoice => + _NSStreamNetworkServiceTypeVoice.value; + + set NSStreamNetworkServiceTypeVoice(NSStreamNetworkServiceTypeValue value) => + _NSStreamNetworkServiceTypeVoice.value = value; + + late final ffi.Pointer + _NSStreamNetworkServiceTypeCallSignaling = + _lookup( + 'NSStreamNetworkServiceTypeCallSignaling'); + + NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeCallSignaling => + _NSStreamNetworkServiceTypeCallSignaling.value; + + set NSStreamNetworkServiceTypeCallSignaling( + NSStreamNetworkServiceTypeValue value) => + _NSStreamNetworkServiceTypeCallSignaling.value = value; + + late final _class_CUPHTTPStreamToNSInputStreamAdapter1 = + _getClass1("CUPHTTPStreamToNSInputStreamAdapter"); + late final _sel_addData_1 = _registerName1("addData:"); + int _objc_msgSend_501( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_501( + obj, + sel, + data, + ); + } + + late final __objc_msgSend_501Ptr = _lookup< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_501 = __objc_msgSend_501Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_setDone1 = _registerName1("setDone"); + late final _sel_setError_1 = _registerName1("setError:"); + void _objc_msgSend_502( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer error, + ) { + return __objc_msgSend_502( + obj, + sel, + error, + ); + } + + late final __objc_msgSend_502Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_502 = __objc_msgSend_502Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); } final class __mbstate_t extends ffi.Union { @@ -69682,7 +70226,7 @@ class NSURLRequest extends NSObject { /// NSCoding protocol /// @result The request body stream of the receiver. NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_362(_id, _lib._sel_HTTPBodyStream1); + final _ret = _lib._objc_msgSend_372(_id, _lib._sel_HTTPBodyStream1); return _ret.address == 0 ? null : NSInputStream._(_ret, _lib, retain: true, release: true); @@ -69721,7 +70265,7 @@ class NSURLRequest extends NSObject { } } -class NSInputStream extends _ObjCWrapper { +class NSInputStream extends NSStream { NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); @@ -69743,6 +70287,450 @@ class NSInputStream extends _ObjCWrapper { return obj._lib._objc_msgSend_0( obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); } + + int read_maxLength_(ffi.Pointer buffer, int len) { + return _lib._objc_msgSend_366(_id, _lib._sel_read_maxLength_1, buffer, len); + } + + bool getBuffer_length_( + ffi.Pointer> buffer, ffi.Pointer len) { + return _lib._objc_msgSend_371( + _id, _lib._sel_getBuffer_length_1, buffer, len); + } + + bool get hasBytesAvailable { + return _lib._objc_msgSend_11(_id, _lib._sel_hasBytesAvailable1); + } + + NSInputStream initWithData_(NSData? data) { + final _ret = _lib._objc_msgSend_217( + _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + return NSInputStream._(_ret, _lib, retain: true, release: true); + } + + NSInputStream initWithURL_(NSURL? url) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithURL_1, url?._id ?? ffi.nullptr); + return NSInputStream._(_ret, _lib, retain: true, release: true); + } + + NSInputStream initWithFileAtPath_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithFileAtPath_1, path?._id ?? ffi.nullptr); + return NSInputStream._(_ret, _lib, retain: true, release: true); + } + + static NSInputStream inputStreamWithData_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSInputStream1, + _lib._sel_inputStreamWithData_1, data?._id ?? ffi.nullptr); + return NSInputStream._(_ret, _lib, retain: true, release: true); + } + + static NSInputStream inputStreamWithFileAtPath_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSInputStream1, + _lib._sel_inputStreamWithFileAtPath_1, path?._id ?? ffi.nullptr); + return NSInputStream._(_ret, _lib, retain: true, release: true); + } + + static NSInputStream inputStreamWithURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSInputStream1, + _lib._sel_inputStreamWithURL_1, url?._id ?? ffi.nullptr); + return NSInputStream._(_ret, _lib, retain: true, release: true); + } + + static void getStreamsToHostWithName_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSString? hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_368( + _lib._class_NSInputStream1, + _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, + hostname?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } + + static void getStreamsToHost_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSHost? host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_369( + _lib._class_NSInputStream1, + _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, + host?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } + + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + NativeCupertinoHttp _lib, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_370( + _lib._class_NSInputStream1, + _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, + bufferSize, + inputStream, + outputStream); + } + + static NSInputStream new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_new1); + return NSInputStream._(_ret, _lib, retain: false, release: true); + } + + static NSInputStream alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_alloc1); + return NSInputStream._(_ret, _lib, retain: false, release: true); + } +} + +class NSStream extends NSObject { + NSStream._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSStream] that points to the same underlying object as [other]. + static NSStream castFrom(T other) { + return NSStream._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSStream] that wraps the given raw object pointer. + static NSStream castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSStream._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSStream]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSStream1); + } + + void open() { + return _lib._objc_msgSend_1(_id, _lib._sel_open1); + } + + void close() { + return _lib._objc_msgSend_1(_id, _lib._sel_close1); + } + + NSObject? get delegate { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + set delegate(NSObject? value) { + _lib._objc_msgSend_362( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + } + + NSObject propertyForKey_(NSStreamPropertyKey key) { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_propertyForKey_1, key); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + bool setProperty_forKey_(NSObject property, NSStreamPropertyKey key) { + return _lib._objc_msgSend_199( + _id, _lib._sel_setProperty_forKey_1, property._id, key); + } + + void scheduleInRunLoop_forMode_(NSRunLoop? aRunLoop, NSRunLoopMode mode) { + return _lib._objc_msgSend_363(_id, _lib._sel_scheduleInRunLoop_forMode_1, + aRunLoop?._id ?? ffi.nullptr, mode); + } + + void removeFromRunLoop_forMode_(NSRunLoop? aRunLoop, NSRunLoopMode mode) { + return _lib._objc_msgSend_363(_id, _lib._sel_removeFromRunLoop_forMode_1, + aRunLoop?._id ?? ffi.nullptr, mode); + } + + int get streamStatus { + return _lib._objc_msgSend_364(_id, _lib._sel_streamStatus1); + } + + NSError? get streamError { + final _ret = _lib._objc_msgSend_365(_id, _lib._sel_streamError1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } + + static void getStreamsToHostWithName_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSString? hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_368( + _lib._class_NSStream1, + _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, + hostname?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } + + static void getStreamsToHost_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSHost? host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_369( + _lib._class_NSStream1, + _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, + host?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } + + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + NativeCupertinoHttp _lib, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_370( + _lib._class_NSStream1, + _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, + bufferSize, + inputStream, + outputStream); + } + + static NSStream new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_new1); + return NSStream._(_ret, _lib, retain: false, release: true); + } + + static NSStream alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_alloc1); + return NSStream._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSStreamPropertyKey = ffi.Pointer; + +class NSRunLoop extends _ObjCWrapper { + NSRunLoop._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSRunLoop] that points to the same underlying object as [other]. + static NSRunLoop castFrom(T other) { + return NSRunLoop._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSRunLoop] that wraps the given raw object pointer. + static NSRunLoop castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSRunLoop._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSRunLoop]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSRunLoop1); + } +} + +typedef NSRunLoopMode = ffi.Pointer; + +abstract class NSStreamStatus { + static const int NSStreamStatusNotOpen = 0; + static const int NSStreamStatusOpening = 1; + static const int NSStreamStatusOpen = 2; + static const int NSStreamStatusReading = 3; + static const int NSStreamStatusWriting = 4; + static const int NSStreamStatusAtEnd = 5; + static const int NSStreamStatusClosed = 6; + static const int NSStreamStatusError = 7; +} + +class NSOutputStream extends NSStream { + NSOutputStream._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOutputStream] that points to the same underlying object as [other]. + static NSOutputStream castFrom(T other) { + return NSOutputStream._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSOutputStream] that wraps the given raw object pointer. + static NSOutputStream castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOutputStream._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOutputStream]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOutputStream1); + } + + int write_maxLength_(ffi.Pointer buffer, int len) { + return _lib._objc_msgSend_366( + _id, _lib._sel_write_maxLength_1, buffer, len); + } + + bool get hasSpaceAvailable { + return _lib._objc_msgSend_11(_id, _lib._sel_hasSpaceAvailable1); + } + + NSOutputStream initToMemory() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initToMemory1); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + NSOutputStream initToBuffer_capacity_( + ffi.Pointer buffer, int capacity) { + final _ret = _lib._objc_msgSend_367( + _id, _lib._sel_initToBuffer_capacity_1, buffer, capacity); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + NSOutputStream initWithURL_append_(NSURL? url, bool shouldAppend) { + final _ret = _lib._objc_msgSend_206(_id, _lib._sel_initWithURL_append_1, + url?._id ?? ffi.nullptr, shouldAppend); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + NSOutputStream initToFileAtPath_append_(NSString? path, bool shouldAppend) { + final _ret = _lib._objc_msgSend_41(_id, _lib._sel_initToFileAtPath_append_1, + path?._id ?? ffi.nullptr, shouldAppend); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream outputStreamToMemory(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOutputStream1, _lib._sel_outputStreamToMemory1); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream outputStreamToBuffer_capacity_( + NativeCupertinoHttp _lib, ffi.Pointer buffer, int capacity) { + final _ret = _lib._objc_msgSend_367(_lib._class_NSOutputStream1, + _lib._sel_outputStreamToBuffer_capacity_1, buffer, capacity); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream outputStreamToFileAtPath_append_( + NativeCupertinoHttp _lib, NSString? path, bool shouldAppend) { + final _ret = _lib._objc_msgSend_41( + _lib._class_NSOutputStream1, + _lib._sel_outputStreamToFileAtPath_append_1, + path?._id ?? ffi.nullptr, + shouldAppend); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream outputStreamWithURL_append_( + NativeCupertinoHttp _lib, NSURL? url, bool shouldAppend) { + final _ret = _lib._objc_msgSend_206( + _lib._class_NSOutputStream1, + _lib._sel_outputStreamWithURL_append_1, + url?._id ?? ffi.nullptr, + shouldAppend); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static void getStreamsToHostWithName_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSString? hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_368( + _lib._class_NSOutputStream1, + _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, + hostname?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } + + static void getStreamsToHost_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSHost? host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_369( + _lib._class_NSOutputStream1, + _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, + host?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } + + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + NativeCupertinoHttp _lib, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_370( + _lib._class_NSOutputStream1, + _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, + bufferSize, + inputStream, + outputStream); + } + + static NSOutputStream new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_new1); + return NSOutputStream._(_ret, _lib, retain: false, release: true); + } + + static NSOutputStream alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_alloc1); + return NSOutputStream._(_ret, _lib, retain: false, release: true); + } +} + +class NSHost extends _ObjCWrapper { + NSHost._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSHost] that points to the same underlying object as [other]. + static NSHost castFrom(T other) { + return NSHost._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSHost] that wraps the given raw object pointer. + static NSHost castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHost._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSHost]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHost1); + } } /// ! @@ -69823,7 +70811,7 @@ class NSMutableURLRequest extends NSURLRequest { /// ! /// @abstract The cache policy of the receiver. set cachePolicy(int value) { - _lib._objc_msgSend_363(_id, _lib._sel_setCachePolicy_1, value); + _lib._objc_msgSend_373(_id, _lib._sel_setCachePolicy_1, value); } /// ! @@ -69904,7 +70892,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion This method is used to provide the network layers with a hint as to the purpose /// of the request. Most clients should not need to use this method. set networkServiceType(int value) { - _lib._objc_msgSend_364(_id, _lib._sel_setNetworkServiceType_1, value); + _lib._objc_msgSend_374(_id, _lib._sel_setNetworkServiceType_1, value); } /// ! @@ -70000,7 +70988,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the /// user. Defaults to NSURLRequestAttributionDeveloper. set attribution(int value) { - _lib._objc_msgSend_365(_id, _lib._sel_setAttribution_1, value); + _lib._objc_msgSend_375(_id, _lib._sel_setAttribution_1, value); } /// ! @@ -70066,7 +71054,7 @@ class NSMutableURLRequest extends NSURLRequest { /// the key or value for a key-value pair answers NO when sent this /// message, the key-value pair is skipped. set allHTTPHeaderFields(NSDictionary? value) { - _lib._objc_msgSend_366( + _lib._objc_msgSend_376( _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); } @@ -70080,7 +71068,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @param value the header field value. /// @param field the header field name (case-insensitive). void setValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_367(_id, _lib._sel_setValue_forHTTPHeaderField_1, + return _lib._objc_msgSend_377(_id, _lib._sel_setValue_forHTTPHeaderField_1, value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); } @@ -70098,7 +71086,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @param value the header field value. /// @param field the header field name (case-insensitive). void addValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_367(_id, _lib._sel_addValue_forHTTPHeaderField_1, + return _lib._objc_msgSend_377(_id, _lib._sel_addValue_forHTTPHeaderField_1, value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); } @@ -70119,7 +71107,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion This data is sent as the message body of the request, as /// in done in an HTTP POST request. set HTTPBody(NSData? value) { - _lib._objc_msgSend_368( + _lib._objc_msgSend_378( _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); } @@ -70132,7 +71120,7 @@ class NSMutableURLRequest extends NSURLRequest { /// - setting one will clear the other. @override NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_362(_id, _lib._sel_HTTPBodyStream1); + final _ret = _lib._objc_msgSend_372(_id, _lib._sel_HTTPBodyStream1); return _ret.address == 0 ? null : NSInputStream._(_ret, _lib, retain: true, release: true); @@ -70146,7 +71134,7 @@ class NSMutableURLRequest extends NSURLRequest { /// and the body data (set by setHTTPBody:, above) are mutually exclusive /// - setting one will clear the other. set HTTPBodyStream(NSInputStream? value) { - _lib._objc_msgSend_369( + _lib._objc_msgSend_379( _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); } @@ -70306,7 +71294,7 @@ class NSHTTPCookieStorage extends NSObject { static NSHTTPCookieStorage? getSharedHTTPCookieStorage( NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_370( + final _ret = _lib._objc_msgSend_380( _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); return _ret.address == 0 ? null @@ -70315,7 +71303,7 @@ class NSHTTPCookieStorage extends NSObject { static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_371( + final _ret = _lib._objc_msgSend_381( _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, identifier?._id ?? ffi.nullptr); @@ -70330,17 +71318,17 @@ class NSHTTPCookieStorage extends NSObject { } void setCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_372( + return _lib._objc_msgSend_382( _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); } void deleteCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_372( + return _lib._objc_msgSend_382( _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); } void removeCookiesSinceDate_(NSDate? date) { - return _lib._objc_msgSend_373( + return _lib._objc_msgSend_383( _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); } @@ -70352,7 +71340,7 @@ class NSHTTPCookieStorage extends NSObject { void setCookies_forURL_mainDocumentURL_( NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { - return _lib._objc_msgSend_374( + return _lib._objc_msgSend_384( _id, _lib._sel_setCookies_forURL_mainDocumentURL_1, cookies?._id ?? ffi.nullptr, @@ -70361,11 +71349,11 @@ class NSHTTPCookieStorage extends NSObject { } int get cookieAcceptPolicy { - return _lib._objc_msgSend_375(_id, _lib._sel_cookieAcceptPolicy1); + return _lib._objc_msgSend_385(_id, _lib._sel_cookieAcceptPolicy1); } set cookieAcceptPolicy(int value) { - _lib._objc_msgSend_376(_id, _lib._sel_setCookieAcceptPolicy_1, value); + _lib._objc_msgSend_386(_id, _lib._sel_setCookieAcceptPolicy_1, value); } NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { @@ -70377,13 +71365,13 @@ class NSHTTPCookieStorage extends NSObject { } void storeCookies_forTask_(NSArray? cookies, NSURLSessionTask? task) { - return _lib._objc_msgSend_385(_id, _lib._sel_storeCookies_forTask_1, + return _lib._objc_msgSend_393(_id, _lib._sel_storeCookies_forTask_1, cookies?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); } void getCookiesForTask_completionHandler_( NSURLSessionTask? task, ObjCBlock20 completionHandler) { - return _lib._objc_msgSend_386( + return _lib._objc_msgSend_394( _id, _lib._sel_getCookiesForTask_completionHandler_1, task?._id ?? ffi.nullptr, @@ -70460,7 +71448,7 @@ class NSURLSessionTask extends NSObject { /// may be nil if this is a stream task NSURLRequest? get originalRequest { - final _ret = _lib._objc_msgSend_377(_id, _lib._sel_originalRequest1); + final _ret = _lib._objc_msgSend_387(_id, _lib._sel_originalRequest1); return _ret.address == 0 ? null : NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -70468,7 +71456,7 @@ class NSURLSessionTask extends NSObject { /// may differ from originalRequest due to http server redirection NSURLRequest? get currentRequest { - final _ret = _lib._objc_msgSend_377(_id, _lib._sel_currentRequest1); + final _ret = _lib._objc_msgSend_387(_id, _lib._sel_currentRequest1); return _ret.address == 0 ? null : NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -70476,7 +71464,7 @@ class NSURLSessionTask extends NSObject { /// may be nil if no response has been received NSURLResponse? get response { - final _ret = _lib._objc_msgSend_379(_id, _lib._sel_response1); + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_response1); return _ret.address == 0 ? null : NSURLResponse._(_ret, _lib, retain: true, release: true); @@ -70504,7 +71492,7 @@ class NSURLSessionTask extends NSObject { /// Delegate is strongly referenced until the task completes, after which it is /// reset to `nil`. set delegate(NSObject? value) { - _lib._objc_msgSend_380( + _lib._objc_msgSend_362( _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); } @@ -70535,7 +71523,7 @@ class NSURLSessionTask extends NSObject { /// Only applies to tasks created from background NSURLSession instances; has no /// effect for tasks created from other session types. set earliestBeginDate(NSDate? value) { - _lib._objc_msgSend_381( + _lib._objc_msgSend_390( _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); } @@ -70613,13 +71601,13 @@ class NSURLSessionTask extends NSObject { /// The current state of the task within the session. int get state { - return _lib._objc_msgSend_382(_id, _lib._sel_state1); + return _lib._objc_msgSend_391(_id, _lib._sel_state1); } /// The error, if any, delivered via -URLSession:task:didCompleteWithError: /// This property will be nil in the event that no error occurred. NSError? get error { - final _ret = _lib._objc_msgSend_383(_id, _lib._sel_error1); + final _ret = _lib._objc_msgSend_365(_id, _lib._sel_error1); return _ret.address == 0 ? null : NSError._(_ret, _lib, retain: true, release: true); @@ -70671,7 +71659,7 @@ class NSURLSessionTask extends NSObject { /// priority levels are provided: NSURLSessionTaskPriorityLow and /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. set priority(double value) { - _lib._objc_msgSend_384(_id, _lib._sel_setPriority_1, value); + _lib._objc_msgSend_392(_id, _lib._sel_setPriority_1, value); } /// Provides a hint indicating if incremental delivery of a partial response body @@ -70752,7 +71740,7 @@ class NSURLResponse extends NSObject { /// @discussion This is the designated initializer for NSURLResponse. NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( NSURL? URL, NSString? MIMEType, int length, NSString? name) { - final _ret = _lib._objc_msgSend_378( + final _ret = _lib._objc_msgSend_388( _id, _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, URL?._id ?? ffi.nullptr, @@ -77529,7 +78517,7 @@ class NSURLSession extends NSObject { /// The shared session uses the currently set global NSURLCache, /// NSHTTPCookieStorage and NSURLCredentialStorage objects. static NSURLSession? getSharedSession(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_387( + final _ret = _lib._objc_msgSend_395( _lib._class_NSURLSession1, _lib._sel_sharedSession1); return _ret.address == 0 ? null @@ -77543,7 +78531,7 @@ class NSURLSession extends NSObject { /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. static NSURLSession sessionWithConfiguration_( NativeCupertinoHttp _lib, NSURLSessionConfiguration? configuration) { - final _ret = _lib._objc_msgSend_402( + final _ret = _lib._objc_msgSend_410( _lib._class_NSURLSession1, _lib._sel_sessionWithConfiguration_1, configuration?._id ?? ffi.nullptr); @@ -77555,7 +78543,7 @@ class NSURLSession extends NSObject { NSURLSessionConfiguration? configuration, NSObject? delegate, NSOperationQueue? queue) { - final _ret = _lib._objc_msgSend_403( + final _ret = _lib._objc_msgSend_411( _lib._class_NSURLSession1, _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, configuration?._id ?? ffi.nullptr, @@ -77579,7 +78567,7 @@ class NSURLSession extends NSObject { } NSURLSessionConfiguration? get configuration { - final _ret = _lib._objc_msgSend_388(_id, _lib._sel_configuration1); + final _ret = _lib._objc_msgSend_396(_id, _lib._sel_configuration1); return _ret.address == 0 ? null : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); @@ -77638,26 +78626,26 @@ class NSURLSession extends NSObject { /// invokes completionHandler with outstanding data, upload and download tasks. void getTasksWithCompletionHandler_(ObjCBlock38 completionHandler) { - return _lib._objc_msgSend_404( + return _lib._objc_msgSend_412( _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); } /// invokes completionHandler with all outstanding tasks. void getAllTasksWithCompletionHandler_(ObjCBlock20 completionHandler) { - return _lib._objc_msgSend_405(_id, + return _lib._objc_msgSend_413(_id, _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._id); } /// Creates a data task with the given request. The request may have a body stream. NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_406( + final _ret = _lib._objc_msgSend_414( _id, _lib._sel_dataTaskWithRequest_1, request?._id ?? ffi.nullptr); return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } /// Creates a data task to retrieve the contents of the given URL. NSURLSessionDataTask dataTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_407( + final _ret = _lib._objc_msgSend_415( _id, _lib._sel_dataTaskWithURL_1, url?._id ?? ffi.nullptr); return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } @@ -77665,7 +78653,7 @@ class NSURLSession extends NSObject { /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( NSURLRequest? request, NSURL? fileURL) { - final _ret = _lib._objc_msgSend_408( + final _ret = _lib._objc_msgSend_416( _id, _lib._sel_uploadTaskWithRequest_fromFile_1, request?._id ?? ffi.nullptr, @@ -77676,7 +78664,7 @@ class NSURLSession extends NSObject { /// Creates an upload task with the given request. The body of the request is provided from the bodyData. NSURLSessionUploadTask uploadTaskWithRequest_fromData_( NSURLRequest? request, NSData? bodyData) { - final _ret = _lib._objc_msgSend_409( + final _ret = _lib._objc_msgSend_417( _id, _lib._sel_uploadTaskWithRequest_fromData_1, request?._id ?? ffi.nullptr, @@ -77686,28 +78674,28 @@ class NSURLSession extends NSObject { /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_410(_id, + final _ret = _lib._objc_msgSend_418(_id, _lib._sel_uploadTaskWithStreamedRequest_1, request?._id ?? ffi.nullptr); return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } /// Creates a download task with the given request. NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_412( + final _ret = _lib._objc_msgSend_420( _id, _lib._sel_downloadTaskWithRequest_1, request?._id ?? ffi.nullptr); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } /// Creates a download task to download the contents of the given URL. NSURLSessionDownloadTask downloadTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_413( + final _ret = _lib._objc_msgSend_421( _id, _lib._sel_downloadTaskWithURL_1, url?._id ?? ffi.nullptr); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData? resumeData) { - final _ret = _lib._objc_msgSend_414(_id, + final _ret = _lib._objc_msgSend_422(_id, _lib._sel_downloadTaskWithResumeData_1, resumeData?._id ?? ffi.nullptr); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } @@ -77715,7 +78703,7 @@ class NSURLSession extends NSObject { /// Creates a bidirectional stream task to a given host and port. NSURLSessionStreamTask streamTaskWithHostName_port_( NSString? hostname, int port) { - final _ret = _lib._objc_msgSend_417( + final _ret = _lib._objc_msgSend_425( _id, _lib._sel_streamTaskWithHostName_port_1, hostname?._id ?? ffi.nullptr, @@ -77726,14 +78714,14 @@ class NSURLSession extends NSObject { /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. /// The NSNetService will be resolved before any IO completes. NSURLSessionStreamTask streamTaskWithNetService_(NSNetService? service) { - final _ret = _lib._objc_msgSend_418( + final _ret = _lib._objc_msgSend_426( _id, _lib._sel_streamTaskWithNetService_1, service?._id ?? ffi.nullptr); return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); } /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_425( + final _ret = _lib._objc_msgSend_433( _id, _lib._sel_webSocketTaskWithURL_1, url?._id ?? ffi.nullptr); return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } @@ -77743,7 +78731,7 @@ class NSURLSession extends NSObject { /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( NSURL? url, NSArray? protocols) { - final _ret = _lib._objc_msgSend_426( + final _ret = _lib._objc_msgSend_434( _id, _lib._sel_webSocketTaskWithURL_protocols_1, url?._id ?? ffi.nullptr, @@ -77755,7 +78743,7 @@ class NSURLSession extends NSObject { /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_427( + final _ret = _lib._objc_msgSend_435( _id, _lib._sel_webSocketTaskWithRequest_1, request?._id ?? ffi.nullptr); return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } @@ -77780,7 +78768,7 @@ class NSURLSession extends NSObject { /// called for authentication challenges. NSURLSessionDataTask dataTaskWithRequest_completionHandler_( NSURLRequest? request, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_428( + final _ret = _lib._objc_msgSend_436( _id, _lib._sel_dataTaskWithRequest_completionHandler_1, request?._id ?? ffi.nullptr, @@ -77790,7 +78778,7 @@ class NSURLSession extends NSObject { NSURLSessionDataTask dataTaskWithURL_completionHandler_( NSURL? url, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_429( + final _ret = _lib._objc_msgSend_437( _id, _lib._sel_dataTaskWithURL_completionHandler_1, url?._id ?? ffi.nullptr, @@ -77801,7 +78789,7 @@ class NSURLSession extends NSObject { /// upload convenience method. NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( NSURLRequest? request, NSURL? fileURL, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_430( + final _ret = _lib._objc_msgSend_438( _id, _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, request?._id ?? ffi.nullptr, @@ -77812,7 +78800,7 @@ class NSURLSession extends NSObject { NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( NSURLRequest? request, NSData? bodyData, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_431( + final _ret = _lib._objc_msgSend_439( _id, _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, request?._id ?? ffi.nullptr, @@ -77827,7 +78815,7 @@ class NSURLSession extends NSObject { /// will be removed automatically. NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( NSURLRequest? request, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_432( + final _ret = _lib._objc_msgSend_440( _id, _lib._sel_downloadTaskWithRequest_completionHandler_1, request?._id ?? ffi.nullptr, @@ -77837,7 +78825,7 @@ class NSURLSession extends NSObject { NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( NSURL? url, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_433( + final _ret = _lib._objc_msgSend_441( _id, _lib._sel_downloadTaskWithURL_completionHandler_1, url?._id ?? ffi.nullptr, @@ -77847,7 +78835,7 @@ class NSURLSession extends NSObject { NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( NSData? resumeData, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_434( + final _ret = _lib._objc_msgSend_442( _id, _lib._sel_downloadTaskWithResumeData_completionHandler_1, resumeData?._id ?? ffi.nullptr, @@ -77902,7 +78890,7 @@ class NSURLSessionConfiguration extends NSObject { static NSURLSessionConfiguration? getDefaultSessionConfiguration( NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_388(_lib._class_NSURLSessionConfiguration1, + final _ret = _lib._objc_msgSend_396(_lib._class_NSURLSessionConfiguration1, _lib._sel_defaultSessionConfiguration1); return _ret.address == 0 ? null @@ -77911,7 +78899,7 @@ class NSURLSessionConfiguration extends NSObject { static NSURLSessionConfiguration? getEphemeralSessionConfiguration( NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_388(_lib._class_NSURLSessionConfiguration1, + final _ret = _lib._objc_msgSend_396(_lib._class_NSURLSessionConfiguration1, _lib._sel_ephemeralSessionConfiguration1); return _ret.address == 0 ? null @@ -77921,7 +78909,7 @@ class NSURLSessionConfiguration extends NSObject { static NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier_( NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_389( + final _ret = _lib._objc_msgSend_397( _lib._class_NSURLSessionConfiguration1, _lib._sel_backgroundSessionConfigurationWithIdentifier_1, identifier?._id ?? ffi.nullptr); @@ -77943,7 +78931,7 @@ class NSURLSessionConfiguration extends NSObject { /// default cache policy for requests set requestCachePolicy(int value) { - _lib._objc_msgSend_363(_id, _lib._sel_setRequestCachePolicy_1, value); + _lib._objc_msgSend_373(_id, _lib._sel_setRequestCachePolicy_1, value); } /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. @@ -77975,7 +78963,7 @@ class NSURLSessionConfiguration extends NSObject { /// type of service for requests. set networkServiceType(int value) { - _lib._objc_msgSend_364(_id, _lib._sel_setNetworkServiceType_1, value); + _lib._objc_msgSend_374(_id, _lib._sel_setNetworkServiceType_1, value); } /// allow request to route over cellular. @@ -78111,53 +79099,53 @@ class NSURLSessionConfiguration extends NSObject { /// The proxy dictionary, as described by set connectionProxyDictionary(NSDictionary? value) { - _lib._objc_msgSend_366(_id, _lib._sel_setConnectionProxyDictionary_1, + _lib._objc_msgSend_376(_id, _lib._sel_setConnectionProxyDictionary_1, value?._id ?? ffi.nullptr); } /// The minimum allowable versions of the TLS protocol, from int get TLSMinimumSupportedProtocol { - return _lib._objc_msgSend_390(_id, _lib._sel_TLSMinimumSupportedProtocol1); + return _lib._objc_msgSend_398(_id, _lib._sel_TLSMinimumSupportedProtocol1); } /// The minimum allowable versions of the TLS protocol, from set TLSMinimumSupportedProtocol(int value) { - _lib._objc_msgSend_391( + _lib._objc_msgSend_399( _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); } /// The maximum allowable versions of the TLS protocol, from int get TLSMaximumSupportedProtocol { - return _lib._objc_msgSend_390(_id, _lib._sel_TLSMaximumSupportedProtocol1); + return _lib._objc_msgSend_398(_id, _lib._sel_TLSMaximumSupportedProtocol1); } /// The maximum allowable versions of the TLS protocol, from set TLSMaximumSupportedProtocol(int value) { - _lib._objc_msgSend_391( + _lib._objc_msgSend_399( _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); } /// The minimum allowable versions of the TLS protocol, from int get TLSMinimumSupportedProtocolVersion { - return _lib._objc_msgSend_392( + return _lib._objc_msgSend_400( _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); } /// The minimum allowable versions of the TLS protocol, from set TLSMinimumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_393( + _lib._objc_msgSend_401( _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); } /// The maximum allowable versions of the TLS protocol, from int get TLSMaximumSupportedProtocolVersion { - return _lib._objc_msgSend_392( + return _lib._objc_msgSend_400( _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); } /// The maximum allowable versions of the TLS protocol, from set TLSMaximumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_393( + _lib._objc_msgSend_401( _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); } @@ -78183,12 +79171,12 @@ class NSURLSessionConfiguration extends NSObject { /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. int get HTTPCookieAcceptPolicy { - return _lib._objc_msgSend_375(_id, _lib._sel_HTTPCookieAcceptPolicy1); + return _lib._objc_msgSend_385(_id, _lib._sel_HTTPCookieAcceptPolicy1); } /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. set HTTPCookieAcceptPolicy(int value) { - _lib._objc_msgSend_376(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); + _lib._objc_msgSend_386(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); } /// Specifies additional headers which will be set on outgoing requests. @@ -78203,7 +79191,7 @@ class NSURLSessionConfiguration extends NSObject { /// Specifies additional headers which will be set on outgoing requests. /// Note that these headers are added to the request only if not already present. set HTTPAdditionalHeaders(NSDictionary? value) { - _lib._objc_msgSend_366( + _lib._objc_msgSend_376( _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); } @@ -78220,7 +79208,7 @@ class NSURLSessionConfiguration extends NSObject { /// The cookie storage object to use, or nil to indicate that no cookies should be handled NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _lib._objc_msgSend_370(_id, _lib._sel_HTTPCookieStorage1); + final _ret = _lib._objc_msgSend_380(_id, _lib._sel_HTTPCookieStorage1); return _ret.address == 0 ? null : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); @@ -78228,13 +79216,13 @@ class NSURLSessionConfiguration extends NSObject { /// The cookie storage object to use, or nil to indicate that no cookies should be handled set HTTPCookieStorage(NSHTTPCookieStorage? value) { - _lib._objc_msgSend_394( + _lib._objc_msgSend_402( _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); } /// The credential storage object, or nil to indicate that no credential storage is to be used NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _lib._objc_msgSend_395(_id, _lib._sel_URLCredentialStorage1); + final _ret = _lib._objc_msgSend_403(_id, _lib._sel_URLCredentialStorage1); return _ret.address == 0 ? null : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); @@ -78242,13 +79230,13 @@ class NSURLSessionConfiguration extends NSObject { /// The credential storage object, or nil to indicate that no credential storage is to be used set URLCredentialStorage(NSURLCredentialStorage? value) { - _lib._objc_msgSend_396( + _lib._objc_msgSend_404( _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); } /// The URL resource cache, or nil to indicate that no caching is to be performed NSURLCache? get URLCache { - final _ret = _lib._objc_msgSend_397(_id, _lib._sel_URLCache1); + final _ret = _lib._objc_msgSend_405(_id, _lib._sel_URLCache1); return _ret.address == 0 ? null : NSURLCache._(_ret, _lib, retain: true, release: true); @@ -78256,7 +79244,7 @@ class NSURLSessionConfiguration extends NSObject { /// The URL resource cache, or nil to indicate that no caching is to be performed set URLCache(NSURLCache? value) { - _lib._objc_msgSend_398( + _lib._objc_msgSend_406( _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); } @@ -78298,18 +79286,18 @@ class NSURLSessionConfiguration extends NSObject { /// Custom NSURLProtocol subclasses are not available to background /// sessions. set protocolClasses(NSArray? value) { - _lib._objc_msgSend_399( + _lib._objc_msgSend_407( _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); } /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone int get multipathServiceType { - return _lib._objc_msgSend_400(_id, _lib._sel_multipathServiceType1); + return _lib._objc_msgSend_408(_id, _lib._sel_multipathServiceType1); } /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone set multipathServiceType(int value) { - _lib._objc_msgSend_401(_id, _lib._sel_setMultipathServiceType_1, value); + _lib._objc_msgSend_409(_id, _lib._sel_setMultipathServiceType_1, value); } @override @@ -78327,7 +79315,7 @@ class NSURLSessionConfiguration extends NSObject { static NSURLSessionConfiguration backgroundSessionConfiguration_( NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_389( + final _ret = _lib._objc_msgSend_397( _lib._class_NSURLSessionConfiguration1, _lib._sel_backgroundSessionConfiguration_1, identifier?._id ?? ffi.nullptr); @@ -78659,7 +79647,7 @@ class NSURLSessionDownloadTask extends NSURLSessionTask { /// If resume data cannot be created, the completion handler will be /// called with nil resumeData. void cancelByProducingResumeData_(ObjCBlock39 completionHandler) { - return _lib._objc_msgSend_411( + return _lib._objc_msgSend_419( _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); } @@ -78801,7 +79789,7 @@ class NSURLSessionStreamTask extends NSURLSessionTask { /// read requests will error out immediately. void readDataOfMinLength_maxLength_timeout_completionHandler_(int minBytes, int maxBytes, double timeout, ObjCBlock40 completionHandler) { - return _lib._objc_msgSend_415( + return _lib._objc_msgSend_423( _id, _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, minBytes, @@ -78817,7 +79805,7 @@ class NSURLSessionStreamTask extends NSURLSessionTask { /// that they have been written to the kernel. void writeData_timeout_completionHandler_( NSData? data, double timeout, ObjCBlock41 completionHandler) { - return _lib._objc_msgSend_416( + return _lib._objc_msgSend_424( _id, _lib._sel_writeData_timeout_completionHandler_1, data?._id ?? ffi.nullptr, @@ -79107,7 +80095,7 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { /// that they have been written to the kernel. void sendMessage_completionHandler_( NSURLSessionWebSocketMessage? message, ObjCBlock41 completionHandler) { - return _lib._objc_msgSend_420( + return _lib._objc_msgSend_428( _id, _lib._sel_sendMessage_completionHandler_1, message?._id ?? ffi.nullptr, @@ -79118,7 +80106,7 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out /// and all outstanding work will also fail resulting in the end of the task. void receiveMessageWithCompletionHandler_(ObjCBlock42 completionHandler) { - return _lib._objc_msgSend_421(_id, + return _lib._objc_msgSend_429(_id, _lib._sel_receiveMessageWithCompletionHandler_1, completionHandler._id); } @@ -79127,14 +80115,14 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. void sendPingWithPongReceiveHandler_(ObjCBlock41 pongReceiveHandler) { - return _lib._objc_msgSend_422(_id, + return _lib._objc_msgSend_430(_id, _lib._sel_sendPingWithPongReceiveHandler_1, pongReceiveHandler._id); } /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { - return _lib._objc_msgSend_423(_id, _lib._sel_cancelWithCloseCode_reason_1, + return _lib._objc_msgSend_431(_id, _lib._sel_cancelWithCloseCode_reason_1, closeCode, reason?._id ?? ffi.nullptr); } @@ -79150,7 +80138,7 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid int get closeCode { - return _lib._objc_msgSend_424(_id, _lib._sel_closeCode1); + return _lib._objc_msgSend_432(_id, _lib._sel_closeCode1); } /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running @@ -79229,7 +80217,7 @@ class NSURLSessionWebSocketMessage extends NSObject { } int get type { - return _lib._objc_msgSend_419(_id, _lib._sel_type1); + return _lib._objc_msgSend_427(_id, _lib._sel_type1); } NSData? get data { @@ -79679,7 +80667,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// Represents the transaction request. NSURLRequest? get request { - final _ret = _lib._objc_msgSend_377(_id, _lib._sel_request1); + final _ret = _lib._objc_msgSend_387(_id, _lib._sel_request1); return _ret.address == 0 ? null : NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -79687,7 +80675,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// Represents the transaction response. Can be nil if error occurred and no response was generated. NSURLResponse? get response { - final _ret = _lib._objc_msgSend_379(_id, _lib._sel_response1); + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_response1); return _ret.address == 0 ? null : NSURLResponse._(_ret, _lib, retain: true, release: true); @@ -79834,7 +80822,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// Indicates whether the resource was loaded, pushed or retrieved from the local cache. int get resourceFetchType { - return _lib._objc_msgSend_435(_id, _lib._sel_resourceFetchType1); + return _lib._objc_msgSend_443(_id, _lib._sel_resourceFetchType1); } /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. @@ -79972,7 +80960,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// DNS protocol used for domain resolution. int get domainResolutionProtocol { - return _lib._objc_msgSend_436(_id, _lib._sel_domainResolutionProtocol1); + return _lib._objc_msgSend_444(_id, _lib._sel_domainResolutionProtocol1); } @override @@ -80034,7 +81022,7 @@ class NSURLSessionTaskMetrics extends NSObject { /// Task creation time is the time when the task was instantiated. /// Task completion time is the time when the task is about to change its internal state to completed. NSDateInterval? get taskInterval { - final _ret = _lib._objc_msgSend_437(_id, _lib._sel_taskInterval1); + final _ret = _lib._objc_msgSend_445(_id, _lib._sel_taskInterval1); return _ret.address == 0 ? null : NSDateInterval._(_ret, _lib, retain: true, release: true); @@ -80130,7 +81118,7 @@ class NSItemProvider extends NSObject { void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( NSString? typeIdentifier, int visibility, ObjCBlock45 loadHandler) { - return _lib._objc_msgSend_438( + return _lib._objc_msgSend_446( _id, _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80144,7 +81132,7 @@ class NSItemProvider extends NSObject { int fileOptions, int visibility, ObjCBlock47 loadHandler) { - return _lib._objc_msgSend_439( + return _lib._objc_msgSend_447( _id, _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80162,7 +81150,7 @@ class NSItemProvider extends NSObject { } NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { - final _ret = _lib._objc_msgSend_440( + final _ret = _lib._objc_msgSend_448( _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); return NSArray._(_ret, _lib, retain: true, release: true); } @@ -80176,7 +81164,7 @@ class NSItemProvider extends NSObject { bool hasRepresentationConformingToTypeIdentifier_fileOptions_( NSString? typeIdentifier, int fileOptions) { - return _lib._objc_msgSend_441( + return _lib._objc_msgSend_449( _id, _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80185,7 +81173,7 @@ class NSItemProvider extends NSObject { NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( NSString? typeIdentifier, ObjCBlock46 completionHandler) { - final _ret = _lib._objc_msgSend_442( + final _ret = _lib._objc_msgSend_450( _id, _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80195,7 +81183,7 @@ class NSItemProvider extends NSObject { NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( NSString? typeIdentifier, ObjCBlock49 completionHandler) { - final _ret = _lib._objc_msgSend_443( + final _ret = _lib._objc_msgSend_451( _id, _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80205,7 +81193,7 @@ class NSItemProvider extends NSObject { NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( NSString? typeIdentifier, ObjCBlock48 completionHandler) { - final _ret = _lib._objc_msgSend_444( + final _ret = _lib._objc_msgSend_452( _id, _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80232,13 +81220,13 @@ class NSItemProvider extends NSObject { } void registerObject_visibility_(NSObject? object, int visibility) { - return _lib._objc_msgSend_445(_id, _lib._sel_registerObject_visibility_1, + return _lib._objc_msgSend_453(_id, _lib._sel_registerObject_visibility_1, object?._id ?? ffi.nullptr, visibility); } void registerObjectOfClass_visibility_loadHandler_( NSObject? aClass, int visibility, ObjCBlock50 loadHandler) { - return _lib._objc_msgSend_446( + return _lib._objc_msgSend_454( _id, _lib._sel_registerObjectOfClass_visibility_loadHandler_1, aClass?._id ?? ffi.nullptr, @@ -80253,7 +81241,7 @@ class NSItemProvider extends NSObject { NSProgress loadObjectOfClass_completionHandler_( NSObject? aClass, ObjCBlock51 completionHandler) { - final _ret = _lib._objc_msgSend_447( + final _ret = _lib._objc_msgSend_455( _id, _lib._sel_loadObjectOfClass_completionHandler_1, aClass?._id ?? ffi.nullptr, @@ -80263,7 +81251,7 @@ class NSItemProvider extends NSObject { NSItemProvider initWithItem_typeIdentifier_( NSObject? item, NSString? typeIdentifier) { - final _ret = _lib._objc_msgSend_448( + final _ret = _lib._objc_msgSend_456( _id, _lib._sel_initWithItem_typeIdentifier_1, item?._id ?? ffi.nullptr, @@ -80279,7 +81267,7 @@ class NSItemProvider extends NSObject { void registerItemForTypeIdentifier_loadHandler_( NSString? typeIdentifier, NSItemProviderLoadHandler loadHandler) { - return _lib._objc_msgSend_449( + return _lib._objc_msgSend_457( _id, _lib._sel_registerItemForTypeIdentifier_loadHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80290,7 +81278,7 @@ class NSItemProvider extends NSObject { NSString? typeIdentifier, NSDictionary? options, NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_450( + return _lib._objc_msgSend_458( _id, _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -80299,16 +81287,16 @@ class NSItemProvider extends NSObject { } NSItemProviderLoadHandler get previewImageHandler { - return _lib._objc_msgSend_451(_id, _lib._sel_previewImageHandler1); + return _lib._objc_msgSend_459(_id, _lib._sel_previewImageHandler1); } set previewImageHandler(NSItemProviderLoadHandler value) { - _lib._objc_msgSend_452(_id, _lib._sel_setPreviewImageHandler_1, value); + _lib._objc_msgSend_460(_id, _lib._sel_setPreviewImageHandler_1, value); } void loadPreviewImageWithOptions_completionHandler_(NSDictionary? options, NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_453( + return _lib._objc_msgSend_461( _id, _lib._sel_loadPreviewImageWithOptions_completionHandler_1, options?._id ?? ffi.nullptr, @@ -81028,7 +82016,7 @@ class NSMutableString extends NSString { } void replaceCharactersInRange_withString_(NSRange range, NSString? aString) { - return _lib._objc_msgSend_454( + return _lib._objc_msgSend_462( _id, _lib._sel_replaceCharactersInRange_withString_1, range, @@ -81036,7 +82024,7 @@ class NSMutableString extends NSString { } void insertString_atIndex_(NSString? aString, int loc) { - return _lib._objc_msgSend_455(_id, _lib._sel_insertString_atIndex_1, + return _lib._objc_msgSend_463(_id, _lib._sel_insertString_atIndex_1, aString?._id ?? ffi.nullptr, loc); } @@ -81062,7 +82050,7 @@ class NSMutableString extends NSString { int replaceOccurrencesOfString_withString_options_range_(NSString? target, NSString? replacement, int options, NSRange searchRange) { - return _lib._objc_msgSend_456( + return _lib._objc_msgSend_464( _id, _lib._sel_replaceOccurrencesOfString_withString_options_range_1, target?._id ?? ffi.nullptr, @@ -81073,7 +82061,7 @@ class NSMutableString extends NSString { bool applyTransform_reverse_range_updatedRange_(NSStringTransform transform, bool reverse, NSRange range, NSRangePointer resultingRange) { - return _lib._objc_msgSend_457( + return _lib._objc_msgSend_465( _id, _lib._sel_applyTransform_reverse_range_updatedRange_1, transform, @@ -81084,13 +82072,13 @@ class NSMutableString extends NSString { NSMutableString initWithCapacity_(int capacity) { final _ret = - _lib._objc_msgSend_458(_id, _lib._sel_initWithCapacity_1, capacity); + _lib._objc_msgSend_466(_id, _lib._sel_initWithCapacity_1, capacity); return NSMutableString._(_ret, _lib, retain: true, release: true); } static NSMutableString stringWithCapacity_( NativeCupertinoHttp _lib, int capacity) { - final _ret = _lib._objc_msgSend_458( + final _ret = _lib._objc_msgSend_466( _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); return NSMutableString._(_ret, _lib, retain: true, release: true); } @@ -81816,12 +82804,12 @@ class NSMutableCharacterSet extends NSCharacterSet { } void formUnionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_459(_id, _lib._sel_formUnionWithCharacterSet_1, + return _lib._objc_msgSend_467(_id, _lib._sel_formUnionWithCharacterSet_1, otherSet?._id ?? ffi.nullptr); } void formIntersectionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_459( + return _lib._objc_msgSend_467( _id, _lib._sel_formIntersectionWithCharacterSet_1, otherSet?._id ?? ffi.nullptr); @@ -81957,14 +82945,14 @@ class NSMutableCharacterSet extends NSCharacterSet { static NSMutableCharacterSet characterSetWithRange_( NativeCupertinoHttp _lib, NSRange aRange) { - final _ret = _lib._objc_msgSend_460(_lib._class_NSMutableCharacterSet1, + final _ret = _lib._objc_msgSend_468(_lib._class_NSMutableCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); } static NSMutableCharacterSet characterSetWithCharactersInString_( NativeCupertinoHttp _lib, NSString? aString) { - final _ret = _lib._objc_msgSend_461( + final _ret = _lib._objc_msgSend_469( _lib._class_NSMutableCharacterSet1, _lib._sel_characterSetWithCharactersInString_1, aString?._id ?? ffi.nullptr); @@ -81973,7 +82961,7 @@ class NSMutableCharacterSet extends NSCharacterSet { static NSMutableCharacterSet characterSetWithBitmapRepresentation_( NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_462( + final _ret = _lib._objc_msgSend_470( _lib._class_NSMutableCharacterSet1, _lib._sel_characterSetWithBitmapRepresentation_1, data?._id ?? ffi.nullptr); @@ -81982,7 +82970,7 @@ class NSMutableCharacterSet extends NSCharacterSet { static NSMutableCharacterSet characterSetWithContentsOfFile_( NativeCupertinoHttp _lib, NSString? fName) { - final _ret = _lib._objc_msgSend_461(_lib._class_NSMutableCharacterSet1, + final _ret = _lib._objc_msgSend_469(_lib._class_NSMutableCharacterSet1, _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); } @@ -82092,14 +83080,14 @@ class NSURLQueryItem extends NSObject { } NSURLQueryItem initWithName_value_(NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_463(_id, _lib._sel_initWithName_value_1, + final _ret = _lib._objc_msgSend_471(_id, _lib._sel_initWithName_value_1, name?._id ?? ffi.nullptr, value?._id ?? ffi.nullptr); return NSURLQueryItem._(_ret, _lib, retain: true, release: true); } static NSURLQueryItem queryItemWithName_value_( NativeCupertinoHttp _lib, NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_463( + final _ret = _lib._objc_msgSend_471( _lib._class_NSURLQueryItem1, _lib._sel_queryItemWithName_value_1, name?._id ?? ffi.nullptr, @@ -82212,7 +83200,7 @@ class NSURLComponents extends NSObject { /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. NSURL URLRelativeToURL_(NSURL? baseURL) { - final _ret = _lib._objc_msgSend_464( + final _ret = _lib._objc_msgSend_472( _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); return NSURL._(_ret, _lib, retain: true, release: true); } @@ -82470,7 +83458,7 @@ class NSURLComponents extends NSObject { /// /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. set queryItems(NSArray? value) { - _lib._objc_msgSend_399( + _lib._objc_msgSend_407( _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); } @@ -82489,7 +83477,7 @@ class NSURLComponents extends NSObject { /// /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. set percentEncodedQueryItems(NSArray? value) { - _lib._objc_msgSend_399(_id, _lib._sel_setPercentEncodedQueryItems_1, + _lib._objc_msgSend_407(_id, _lib._sel_setPercentEncodedQueryItems_1, value?._id ?? ffi.nullptr); } @@ -82591,7 +83579,7 @@ class NSHTTPURLResponse extends NSURLResponse { /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. NSHTTPURLResponse initWithURL_statusCode_HTTPVersion_headerFields_(NSURL? url, int statusCode, NSString? HTTPVersion, NSDictionary? headerFields) { - final _ret = _lib._objc_msgSend_465( + final _ret = _lib._objc_msgSend_473( _id, _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, url?._id ?? ffi.nullptr, @@ -82647,7 +83635,7 @@ class NSHTTPURLResponse extends NSURLResponse { /// @result A localized string corresponding to the given status code. static NSString localizedStringForStatusCode_( NativeCupertinoHttp _lib, int statusCode) { - final _ret = _lib._objc_msgSend_466(_lib._class_NSHTTPURLResponse1, + final _ret = _lib._objc_msgSend_474(_lib._class_NSHTTPURLResponse1, _lib._sel_localizedStringForStatusCode_1, statusCode); return NSString._(_ret, _lib, retain: true, release: true); } @@ -82693,7 +83681,7 @@ class NSException extends NSObject { NSExceptionName name, NSString? reason, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_467( + final _ret = _lib._objc_msgSend_475( _lib._class_NSException1, _lib._sel_exceptionWithName_reason_userInfo_1, name, @@ -82704,7 +83692,7 @@ class NSException extends NSObject { NSException initWithName_reason_userInfo_( NSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_468( + final _ret = _lib._objc_msgSend_476( _id, _lib._sel_initWithName_reason_userInfo_1, aName, @@ -82752,13 +83740,13 @@ class NSException extends NSObject { static void raise_format_( NativeCupertinoHttp _lib, NSExceptionName name, NSString? format) { - return _lib._objc_msgSend_367(_lib._class_NSException1, + return _lib._objc_msgSend_377(_lib._class_NSException1, _lib._sel_raise_format_1, name, format?._id ?? ffi.nullptr); } static void raise_format_arguments_(NativeCupertinoHttp _lib, NSExceptionName name, NSString? format, va_list argList) { - return _lib._objc_msgSend_469( + return _lib._objc_msgSend_477( _lib._class_NSException1, _lib._sel_raise_format_arguments_1, name, @@ -82806,7 +83794,7 @@ class NSAssertionHandler extends NSObject { } static NSAssertionHandler? getCurrentHandler(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_470( + final _ret = _lib._objc_msgSend_478( _lib._class_NSAssertionHandler1, _lib._sel_currentHandler1); return _ret.address == 0 ? null @@ -82819,7 +83807,7 @@ class NSAssertionHandler extends NSObject { NSString? fileName, int line, NSString? format) { - return _lib._objc_msgSend_471( + return _lib._objc_msgSend_479( _id, _lib._sel_handleFailureInMethod_object_file_lineNumber_description_1, selector, @@ -82831,7 +83819,7 @@ class NSAssertionHandler extends NSObject { void handleFailureInFunction_file_lineNumber_description_( NSString? functionName, NSString? fileName, int line, NSString? format) { - return _lib._objc_msgSend_472( + return _lib._objc_msgSend_480( _id, _lib._sel_handleFailureInFunction_file_lineNumber_description_1, functionName?._id ?? ffi.nullptr, @@ -82879,7 +83867,7 @@ class NSBlockOperation extends NSOperation { static NSBlockOperation blockOperationWithBlock_( NativeCupertinoHttp _lib, ObjCBlock block) { - final _ret = _lib._objc_msgSend_473(_lib._class_NSBlockOperation1, + final _ret = _lib._objc_msgSend_481(_lib._class_NSBlockOperation1, _lib._sel_blockOperationWithBlock_1, block._id); return NSBlockOperation._(_ret, _lib, retain: true, release: true); } @@ -82936,19 +83924,19 @@ class NSInvocationOperation extends NSOperation { NSInvocationOperation initWithTarget_selector_object_( NSObject target, ffi.Pointer sel, NSObject arg) { - final _ret = _lib._objc_msgSend_474(_id, + final _ret = _lib._objc_msgSend_482(_id, _lib._sel_initWithTarget_selector_object_1, target._id, sel, arg._id); return NSInvocationOperation._(_ret, _lib, retain: true, release: true); } NSInvocationOperation initWithInvocation_(NSInvocation? inv) { - final _ret = _lib._objc_msgSend_475( + final _ret = _lib._objc_msgSend_483( _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); return NSInvocationOperation._(_ret, _lib, retain: true, release: true); } NSInvocation? get invocation { - final _ret = _lib._objc_msgSend_476(_id, _lib._sel_invocation1); + final _ret = _lib._objc_msgSend_484(_id, _lib._sel_invocation1); return _ret.address == 0 ? null : NSInvocation._(_ret, _lib, retain: true, release: true); @@ -83865,7 +84853,7 @@ class CUPHTTPTaskConfiguration extends NSObject { NSObject initWithPort_(int sendPort) { final _ret = - _lib._objc_msgSend_477(_id, _lib._sel_initWithPort_1, sendPort); + _lib._objc_msgSend_485(_id, _lib._sel_initWithPort_1, sendPort); return NSObject._(_ret, _lib, retain: true, release: true); } @@ -83932,7 +84920,7 @@ class CUPHTTPClientDelegate extends NSObject { /// specified in the configuration. void registerTask_withConfiguration_( NSURLSessionTask? task, CUPHTTPTaskConfiguration? config) { - return _lib._objc_msgSend_478( + return _lib._objc_msgSend_486( _id, _lib._sel_registerTask_withConfiguration_1, task?._id ?? ffi.nullptr, @@ -83991,7 +84979,7 @@ class CUPHTTPForwardedDelegate extends NSObject { NSObject initWithSession_task_( NSURLSession? session, NSURLSessionTask? task) { - final _ret = _lib._objc_msgSend_479(_id, _lib._sel_initWithSession_task_1, + final _ret = _lib._objc_msgSend_487(_id, _lib._sel_initWithSession_task_1, session?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); return NSObject._(_ret, _lib, retain: true, release: true); } @@ -84002,14 +84990,14 @@ class CUPHTTPForwardedDelegate extends NSObject { } NSURLSession? get session { - final _ret = _lib._objc_msgSend_387(_id, _lib._sel_session1); + final _ret = _lib._objc_msgSend_395(_id, _lib._sel_session1); return _ret.address == 0 ? null : NSURLSession._(_ret, _lib, retain: true, release: true); } NSURLSessionTask? get task { - final _ret = _lib._objc_msgSend_480(_id, _lib._sel_task1); + final _ret = _lib._objc_msgSend_488(_id, _lib._sel_task1); return _ret.address == 0 ? null : NSURLSessionTask._(_ret, _lib, retain: true, release: true); @@ -84017,7 +85005,7 @@ class CUPHTTPForwardedDelegate extends NSObject { /// This property is meant to be used only by CUPHTTPClientDelegate. NSLock? get lock { - final _ret = _lib._objc_msgSend_481(_id, _lib._sel_lock1); + final _ret = _lib._objc_msgSend_489(_id, _lib._sel_lock1); return _ret.address == 0 ? null : NSLock._(_ret, _lib, retain: true, release: true); @@ -84091,7 +85079,7 @@ class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { NSURLSessionTask? task, NSHTTPURLResponse? response, NSURLRequest? request) { - final _ret = _lib._objc_msgSend_482( + final _ret = _lib._objc_msgSend_490( _id, _lib._sel_initWithSession_task_response_request_1, session?._id ?? ffi.nullptr, @@ -84105,19 +85093,19 @@ class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { /// If the request is NIL then the redirect is not followed and the task is /// complete. void finishWithRequest_(NSURLRequest? request) { - return _lib._objc_msgSend_483( + return _lib._objc_msgSend_491( _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); } NSHTTPURLResponse? get response { - final _ret = _lib._objc_msgSend_484(_id, _lib._sel_response1); + final _ret = _lib._objc_msgSend_492(_id, _lib._sel_response1); return _ret.address == 0 ? null : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); } NSURLRequest? get request { - final _ret = _lib._objc_msgSend_377(_id, _lib._sel_request1); + final _ret = _lib._objc_msgSend_387(_id, _lib._sel_request1); return _ret.address == 0 ? null : NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -84125,7 +85113,7 @@ class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { /// This property is meant to be used only by CUPHTTPClientDelegate. NSURLRequest? get redirectRequest { - final _ret = _lib._objc_msgSend_377(_id, _lib._sel_redirectRequest1); + final _ret = _lib._objc_msgSend_387(_id, _lib._sel_redirectRequest1); return _ret.address == 0 ? null : NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -84172,7 +85160,7 @@ class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { NSObject initWithSession_task_response_( NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { - final _ret = _lib._objc_msgSend_485( + final _ret = _lib._objc_msgSend_493( _id, _lib._sel_initWithSession_task_response_1, session?._id ?? ffi.nullptr, @@ -84182,12 +85170,12 @@ class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { } void finishWithDisposition_(int disposition) { - return _lib._objc_msgSend_486( + return _lib._objc_msgSend_494( _id, _lib._sel_finishWithDisposition_1, disposition); } NSURLResponse? get response { - final _ret = _lib._objc_msgSend_379(_id, _lib._sel_response1); + final _ret = _lib._objc_msgSend_389(_id, _lib._sel_response1); return _ret.address == 0 ? null : NSURLResponse._(_ret, _lib, retain: true, release: true); @@ -84195,7 +85183,7 @@ class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { /// This property is meant to be used only by CUPHTTPClientDelegate. int get disposition { - return _lib._objc_msgSend_487(_id, _lib._sel_disposition1); + return _lib._objc_msgSend_495(_id, _lib._sel_disposition1); } static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { @@ -84237,7 +85225,7 @@ class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { NSObject initWithSession_task_data_( NSURLSession? session, NSURLSessionTask? task, NSData? data) { - final _ret = _lib._objc_msgSend_488( + final _ret = _lib._objc_msgSend_496( _id, _lib._sel_initWithSession_task_data_1, session?._id ?? ffi.nullptr, @@ -84294,7 +85282,7 @@ class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { NSObject initWithSession_task_error_( NSURLSession? session, NSURLSessionTask? task, NSError? error) { - final _ret = _lib._objc_msgSend_489( + final _ret = _lib._objc_msgSend_497( _id, _lib._sel_initWithSession_task_error_1, session?._id ?? ffi.nullptr, @@ -84304,7 +85292,7 @@ class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { } NSError? get error { - final _ret = _lib._objc_msgSend_383(_id, _lib._sel_error1); + final _ret = _lib._objc_msgSend_365(_id, _lib._sel_error1); return _ret.address == 0 ? null : NSError._(_ret, _lib, retain: true, release: true); @@ -84352,7 +85340,7 @@ class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { NSObject initWithSession_downloadTask_url_(NSURLSession? session, NSURLSessionDownloadTask? downloadTask, NSURL? location) { - final _ret = _lib._objc_msgSend_490( + final _ret = _lib._objc_msgSend_498( _id, _lib._sel_initWithSession_downloadTask_url_1, session?._id ?? ffi.nullptr, @@ -84414,7 +85402,7 @@ class CUPHTTPForwardedWebSocketOpened extends CUPHTTPForwardedDelegate { NSURLSession? session, NSURLSessionWebSocketTask? webSocketTask, NSString? protocol) { - final _ret = _lib._objc_msgSend_491( + final _ret = _lib._objc_msgSend_499( _id, _lib._sel_initWithSession_webSocketTask_didOpenWithProtocol_1, session?._id ?? ffi.nullptr, @@ -84477,7 +85465,7 @@ class CUPHTTPForwardedWebSocketClosed extends CUPHTTPForwardedDelegate { NSURLSessionWebSocketTask? webSocketTask, int closeCode, NSData? reason) { - final _ret = _lib._objc_msgSend_492( + final _ret = _lib._objc_msgSend_500( _id, _lib._sel_initWithSession_webSocketTask_didCloseWithCode_reason_1, session?._id ?? ffi.nullptr, @@ -84488,7 +85476,7 @@ class CUPHTTPForwardedWebSocketClosed extends CUPHTTPForwardedDelegate { } int get closeCode { - return _lib._objc_msgSend_424(_id, _lib._sel_closeCode1); + return _lib._objc_msgSend_432(_id, _lib._sel_closeCode1); } NSData? get reason { @@ -84513,6 +85501,159 @@ class CUPHTTPForwardedWebSocketClosed extends CUPHTTPForwardedDelegate { } } +abstract class NSStreamEvent { + static const int NSStreamEventNone = 0; + static const int NSStreamEventOpenCompleted = 1; + static const int NSStreamEventHasBytesAvailable = 2; + static const int NSStreamEventHasSpaceAvailable = 4; + static const int NSStreamEventErrorOccurred = 8; + static const int NSStreamEventEndEncountered = 16; +} + +typedef NSStreamSocketSecurityLevel = ffi.Pointer; +typedef NSStreamSOCKSProxyConfiguration = ffi.Pointer; +typedef NSStreamSOCKSProxyVersion = ffi.Pointer; +typedef NSErrorDomain1 = ffi.Pointer; +typedef NSStreamNetworkServiceTypeValue = ffi.Pointer; + +/// The configuration associated with a NSURLSessionTask. +/// See CUPHTTPClientDelegate. +class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { + CUPHTTPStreamToNSInputStreamAdapter._( + ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [CUPHTTPStreamToNSInputStreamAdapter] that points to the same underlying object as [other]. + static CUPHTTPStreamToNSInputStreamAdapter castFrom( + T other) { + return CUPHTTPStreamToNSInputStreamAdapter._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [CUPHTTPStreamToNSInputStreamAdapter] that wraps the given raw object pointer. + static CUPHTTPStreamToNSInputStreamAdapter castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return CUPHTTPStreamToNSInputStreamAdapter._(other, lib, + retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [CUPHTTPStreamToNSInputStreamAdapter]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_CUPHTTPStreamToNSInputStreamAdapter1); + } + + CUPHTTPStreamToNSInputStreamAdapter initWithPort_(int sendPort) { + final _ret = + _lib._objc_msgSend_485(_id, _lib._sel_initWithPort_1, sendPort); + return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: true, release: true); + } + + int addData_(NSData? data) { + return _lib._objc_msgSend_501( + _id, _lib._sel_addData_1, data?._id ?? ffi.nullptr); + } + + void setDone() { + return _lib._objc_msgSend_1(_id, _lib._sel_setDone1); + } + + void setError_(NSError? error) { + return _lib._objc_msgSend_502( + _id, _lib._sel_setError_1, error?._id ?? ffi.nullptr); + } + + static CUPHTTPStreamToNSInputStreamAdapter inputStreamWithData_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217( + _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, + _lib._sel_inputStreamWithData_1, + data?._id ?? ffi.nullptr); + return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: true, release: true); + } + + static CUPHTTPStreamToNSInputStreamAdapter inputStreamWithFileAtPath_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42( + _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, + _lib._sel_inputStreamWithFileAtPath_1, + path?._id ?? ffi.nullptr); + return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: true, release: true); + } + + static CUPHTTPStreamToNSInputStreamAdapter inputStreamWithURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201( + _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, + _lib._sel_inputStreamWithURL_1, + url?._id ?? ffi.nullptr); + return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: true, release: true); + } + + static void getStreamsToHostWithName_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSString? hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_368( + _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, + _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, + hostname?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } + + static void getStreamsToHost_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSHost? host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_369( + _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, + _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, + host?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } + + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + NativeCupertinoHttp _lib, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_370( + _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, + _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, + bufferSize, + inputStream, + outputStream); + } + + static CUPHTTPStreamToNSInputStreamAdapter new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_new1); + return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: false, release: true); + } + + static CUPHTTPStreamToNSInputStreamAdapter alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_alloc1); + return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: false, release: true); + } +} + const int noErr = 0; const int kNilOptions = 0; diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPStreamToNSInputStreamAdapter.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPStreamToNSInputStreamAdapter.m new file mode 100644 index 0000000000..46eb84ba89 --- /dev/null +++ b/pkgs/cupertino_http/macos/Classes/CUPHTTPStreamToNSInputStreamAdapter.m @@ -0,0 +1 @@ +#include "../../src/CUPHTTPStreamToNSInputStreamAdapter.m" diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 82581dcda6..34cf11e3aa 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -10,11 +10,11 @@ environment: flutter: '>=3.10.0' # If changed, update test matrix. dependencies: + async: ^2.5.0 ffi: ^2.0.1 flutter: sdk: flutter http: '>=0.13.4 <2.0.0' - meta: ^1.7.0 dev_dependencies: dart_flutter_team_lints: ^1.0.0 diff --git a/pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.h b/pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.h new file mode 100644 index 0000000000..6b0e2242d0 --- /dev/null +++ b/pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.h @@ -0,0 +1,23 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Normally, we'd "import " +// but that would mean that ffigen would process every file in the Foundation +// framework, which is huge. So just import the headers that we need. +#import +#import + +#include "dart-sdk/include/dart_api_dl.h" + +/** + * A helper to convert a Dart Stream> into an Objective-C input stream. + */ +@interface CUPHTTPStreamToNSInputStreamAdapter : NSInputStream + +- (instancetype)initWithPort:(Dart_Port)sendPort; +- (NSUInteger)addData:(NSData *)data; +- (void)setDone; +- (void)setError:(NSError *)error; + +@end diff --git a/pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.m b/pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.m new file mode 100644 index 0000000000..ae4b0e223b --- /dev/null +++ b/pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.m @@ -0,0 +1,173 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#import "CUPHTTPStreamToNSInputStreamAdapter.h" + +#import +#include + +@implementation CUPHTTPStreamToNSInputStreamAdapter { + Dart_Port _sendPort; + NSCondition* _dataCondition; + NSMutableData * _data; + NSStreamStatus _status; + BOOL _done; + NSError* _error; + id _delegate; // This is a weak reference. +} + +- (instancetype)initWithPort:(Dart_Port)sendPort { + self = [super init]; + if (self != nil) { + _sendPort = sendPort; + _dataCondition = [[NSCondition alloc] init]; + _data = [[NSMutableData alloc] init]; + _done = NO; + _status = NSStreamStatusNotOpen; + _error = nil; + _delegate = self; + } + return self; +} + +- (void)dealloc { + [_dataCondition release]; + [_data release]; + [_error release]; + [super dealloc]; +} + +- (NSUInteger)addData:(NSData *)data { + [_dataCondition lock]; + [_data appendData: data]; + [_dataCondition broadcast]; + [_dataCondition unlock]; + return [_data length]; +} + +- (void)setDone { + [_dataCondition lock]; + _done = YES; + [_dataCondition broadcast]; + [_dataCondition unlock]; +} + +- (void)setError:(NSError *)error { + [_dataCondition lock]; + [_error release]; + _error = [error retain]; + _status = NSStreamStatusError; + [_dataCondition broadcast]; + [_dataCondition unlock]; +} + + +#pragma mark - NSStream + +- (void)scheduleInRunLoop:(NSRunLoop*)runLoop forMode:(NSString*)mode { +} + +- (void)removeFromRunLoop:(NSRunLoop*)runLoop forMode:(NSString*)mode { +} + +- (void)open { + [_dataCondition lock]; + _status = NSStreamStatusOpen; + [_dataCondition unlock]; +} + +- (void)close { + [_dataCondition lock]; + _status = NSStreamStatusClosed; + [_dataCondition unlock]; +} + +- (id)propertyForKey:(NSStreamPropertyKey)key { + return nil; +} + +- (BOOL)setProperty:(id)property forKey:(NSStreamPropertyKey)key { + return NO; +} + +- (id)delegate { + return _delegate; +} + +- (void)setDelegate:(id)delegate { + if (delegate == nil) { + _delegate = self; + } else { + _delegate = delegate; + } +} + +- (NSError*)streamError { + return _error; +} + +- (NSStreamStatus)streamStatus { + return _status; +} + +#pragma mark - NSInputStream + +- (NSInteger)read:(uint8_t*)buffer maxLength:(NSUInteger)len { + os_log_with_type(OS_LOG_DEFAULT, + OS_LOG_TYPE_DEBUG, + "CUPHTTPStreamToNSInputStreamAdapter: read len=%tu", len); + [_dataCondition lock]; + + while ([_data length] == 0 && !_done && _error == nil) { + // There is no data to return so signal the Dart code that it should add more data through + // [self addData:]. + Dart_CObject message_cobj; + message_cobj.type = Dart_CObject_kInt64; + message_cobj.value.as_int64 = len; + + const bool success = Dart_PostCObject_DL(_sendPort, &message_cobj); + NSCAssert(success, @"Dart_PostCObject_DL failed."); + + [_dataCondition wait]; + } + + NSInteger copySize; + if (_error == nil) { + copySize = MIN(len, [_data length]); + NSRange readRange = NSMakeRange(0, copySize); + [_data getBytes:(void *)buffer range: readRange]; + // Shift the remaining data over to the beginning of the buffer. + [_data replaceBytesInRange: readRange withBytes: NULL length: 0]; + + if (_done && [_data length] == 0) { + _status = NSStreamStatusAtEnd; + } + } else { + copySize = -1; + } + + [_dataCondition unlock]; + return copySize; +} + +- (BOOL)getBuffer:(uint8_t**)buffer length:(NSUInteger*)len { + return NO; +} + +- (BOOL)hasBytesAvailable { + return YES; +} + +#pragma mark - NSStreamDelegate + +- (void)stream:(NSStream *)theStream handleEvent:(NSStreamEvent)streamEvent { + id delegate = _delegate; + if (delegate != self) { + os_log_with_type(OS_LOG_DEFAULT, + OS_LOG_TYPE_ERROR, + "CUPHTTPStreamToNSInputStreamAdapter: non-self delegate was invoked"); + } +} + +@end diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_server.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_server.dart index 03108c1db2..9b61f4f64a 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_server.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_server.dart @@ -33,9 +33,18 @@ void hybridMain(StreamChannel channel) async { ..set('Access-Control-Allow-Headers', 'Content-Type'); } else { channel.sink.add(request.headers[HttpHeaders.contentTypeHeader]); - final serverReceivedBody = - await const Utf8Decoder().bind(request).fold('', (p, e) => '$p$e'); - channel.sink.add(serverReceivedBody); + try { + final serverReceivedBody = await const Utf8Decoder() + .bind(request) + .fold('', (p, e) => '$p$e'); + channel.sink.add(serverReceivedBody); + } on HttpException catch (e) { + // The server may through if the client disconnections. + // This can happen if there is an error in the request + // stream. + print('Request Body Server Exception: $e'); + return; + } } unawaited(request.response.close()); }); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart index 1f6c5b58b3..560858dc3c 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart @@ -54,9 +54,8 @@ void testRequestBodyStreamed(Client client, } final request = StreamedRequest('POST', Uri.http(host, '')); - const Utf8Encoder() - .bind(count()) - .listen(request.sink.add, onDone: request.sink.close); + const Utf8Encoder().bind(count()).listen(request.sink.add, + onError: request.sink.addError, onDone: request.sink.close); await client.send(request); expect(lastReceived, greaterThanOrEqualTo(1000)); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart index 473fddcdf7..e211da5755 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart @@ -40,16 +40,16 @@ class _Plus2Encoding extends Encoding { /// 'POST'. void testRequestBody(Client client) { group('request body', () { - late final String host; - late final StreamChannel httpServerChannel; - late final StreamQueue httpServerQueue; + late String host; + late StreamChannel httpServerChannel; + late StreamQueue httpServerQueue; - setUpAll(() async { + setUp(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); host = 'localhost:${await httpServerQueue.next}'; }); - tearDownAll(() => httpServerChannel.sink.add(null)); + tearDown(() => httpServerChannel.sink.add(null)); test('client.post() with string body', () async { await client.post(Uri.http(host, ''), body: 'Hello World!'); @@ -152,5 +152,131 @@ void testRequestBody(Client client) { expect(serverReceivedContentType, ['image/png; charset=plus2']); expect(serverReceivedBody.codeUnits, [1, 2, 3, 4, 5]); }); + + test('client.send() with stream containing empty lists', () async { + final request = StreamedRequest('POST', Uri.http(host, '')); + request.headers['Content-Type'] = 'image/png'; + request.sink.add([]); + request.sink.add([]); + request.sink.add([1]); + request.sink.add([2]); + request.sink.add([]); + request.sink.add([3, 4]); + request.sink.add([]); + request.sink.add([5]); + // ignore: unawaited_futures + request.sink.close(); + await client.send(request); + + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next as String; + + expect(serverReceivedContentType, ['image/png']); + expect(serverReceivedBody.codeUnits, [1, 2, 3, 4, 5]); + }); + + test('client.send() with slow stream', () async { + Stream> stream() async* { + await Future.delayed(const Duration(milliseconds: 100)); + yield [1]; + await Future.delayed(const Duration(milliseconds: 100)); + yield [2]; + await Future.delayed(const Duration(milliseconds: 100)); + yield [3]; + await Future.delayed(const Duration(milliseconds: 100)); + yield [4]; + await Future.delayed(const Duration(milliseconds: 100)); + yield [5]; + await Future.delayed(const Duration(milliseconds: 100)); + yield [6, 7, 8]; + await Future.delayed(const Duration(milliseconds: 100)); + yield [9, 10]; + await Future.delayed(const Duration(milliseconds: 100)); + } + + final request = StreamedRequest('POST', Uri.http(host, '')); + request.headers['Content-Type'] = 'image/png'; + + stream().listen(request.sink.add, + onError: request.sink.addError, onDone: request.sink.close); + await client.send(request); + + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next as String; + + expect(serverReceivedContentType, ['image/png']); + expect(serverReceivedBody.codeUnits, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); + }); + + test('client.send() with stream that raises', () async { + Stream> stream() async* { + yield [0]; + yield [1]; + throw ArgumentError('this is a test'); + } + + final request = StreamedRequest('POST', Uri.http(host, '')); + request.headers['Content-Type'] = 'image/png'; + + stream().listen(request.sink.add, + onError: request.sink.addError, onDone: request.sink.close); + + await expectLater(client.send(request), + throwsA(anyOf(isA(), isA()))); + }); + + test('client.send() GET with empty stream', () async { + final request = StreamedRequest('GET', Uri.http(host, '')); + request.headers['Content-Type'] = 'image/png'; + // ignore: unawaited_futures + request.sink.close(); + + final response = await client.send(request); + expect(response.statusCode, 200); + + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next as String; + + expect(serverReceivedContentType, ['image/png']); + expect(serverReceivedBody.codeUnits, []); + }); + + test('client.send() GET with stream containing only empty lists', () async { + final request = StreamedRequest('GET', Uri.http(host, '')); + request.headers['Content-Type'] = 'image/png'; + request.sink.add([]); + request.sink.add([]); + request.sink.add([]); + // ignore: unawaited_futures + request.sink.close(); + + final response = await client.send(request); + expect(response.statusCode, 200); + + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next as String; + + expect(serverReceivedContentType, ['image/png']); + expect(serverReceivedBody.codeUnits, []); + }); + + test('client.send() GET with non-empty stream', () async { + final request = StreamedRequest('GET', Uri.http(host, '')); + request.headers['Content-Type'] = 'image/png'; + request.sink.add('Hello World!'.codeUnits); + // ignore: unawaited_futures + request.sink.close(); + + final response = await client.send(request); + expect(response.statusCode, 200); + + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next as String; + + expect(serverReceivedContentType, ['image/png']); + expect(serverReceivedBody, 'Hello World!'); + // using io passes, on web body is not transmitted, on cupertino_http + // exception. + }, skip: 'unclear semantics for GET requests with body'); }); } From 7536d021eb6484a7b7926945907c2f1c5969709c Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 5 Jul 2023 16:06:24 -0700 Subject: [PATCH 245/448] Fix a bug where ...WebSocketClosed had two different initializer signatures (#981) * Fix a bug where CUPHTTPForwardedWebSocketClosed had two different initializer signatures * Fix formatting. --- .../lib/src/native_cupertino_bindings.dart | 16 ++++++---------- .../src/CUPHTTPForwardedDelegate.h | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index b384d7bc4c..d2ca3d22b4 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -58978,8 +58978,8 @@ class NativeCupertinoHttp { late final _sel_protocol1 = _registerName1("protocol"); late final _class_CUPHTTPForwardedWebSocketClosed1 = _getClass1("CUPHTTPForwardedWebSocketClosed"); - late final _sel_initWithSession_webSocketTask_didCloseWithCode_reason_1 = - _registerName1("initWithSession:webSocketTask:didCloseWithCode:reason:"); + late final _sel_initWithSession_webSocketTask_code_reason_1 = + _registerName1("initWithSession:webSocketTask:code:reason:"); ffi.Pointer _objc_msgSend_500( ffi.Pointer obj, ffi.Pointer sel, @@ -85460,14 +85460,11 @@ class CUPHTTPForwardedWebSocketClosed extends CUPHTTPForwardedDelegate { obj._lib._class_CUPHTTPForwardedWebSocketClosed1); } - NSObject initWithSession_webSocketTask_didCloseWithCode_reason_( - NSURLSession? session, - NSURLSessionWebSocketTask? webSocketTask, - int closeCode, - NSData? reason) { + NSObject initWithSession_webSocketTask_code_reason_(NSURLSession? session, + NSURLSessionWebSocketTask? webSocketTask, int closeCode, NSData? reason) { final _ret = _lib._objc_msgSend_500( _id, - _lib._sel_initWithSession_webSocketTask_didCloseWithCode_reason_1, + _lib._sel_initWithSession_webSocketTask_code_reason_1, session?._id ?? ffi.nullptr, webSocketTask?._id ?? ffi.nullptr, closeCode, @@ -85516,8 +85513,7 @@ typedef NSStreamSOCKSProxyVersion = ffi.Pointer; typedef NSErrorDomain1 = ffi.Pointer; typedef NSStreamNetworkServiceTypeValue = ffi.Pointer; -/// The configuration associated with a NSURLSessionTask. -/// See CUPHTTPClientDelegate. +/// A helper to convert a Dart Stream> into an Objective-C input stream. class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { CUPHTTPStreamToNSInputStreamAdapter._( ffi.Pointer id, NativeCupertinoHttp lib, diff --git a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h index 9e76ca80fb..3cf0e827da 100644 --- a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h +++ b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h @@ -121,7 +121,7 @@ - (id) initWithSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask - didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode + code:(NSURLSessionWebSocketCloseCode)closeCode reason:(NSData *)reason; @property (readonly) NSURLSessionWebSocketCloseCode closeCode; From ea4c5b3e59a22cc5dd43b14c22a1f728b1f1cc20 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 5 Jul 2023 16:11:12 -0700 Subject: [PATCH 246/448] Document that the network entitlement is required when running in the macOS sandbox (#979) * Add a note pointing out that a network entitlement is required to use cupertino_http * Add a note about entitlements. --- pkgs/cupertino_http/lib/cupertino_http.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 89af0a3c1b..243ac81436 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -5,6 +5,12 @@ /// Provides access to the /// [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). /// +/// **NOTE**: If sandboxed with the App Sandbox (the default Flutter +/// configuration on macOS) then the +/// [`com.apple.security.network.client`](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_network_client) +/// entitlement is required to use `package:cupertino_http`. See +/// [Entitlements and the App Sandbox](https://docs.flutter.dev/platform-integration/macos/building#entitlements-and-the-app-sandbox). +/// /// # CupertinoClient /// /// The most convenient way to `package:cupertino_http` it is through From d41ce3454df8f65350b6b5198491367d2d6b895f Mon Sep 17 00:00:00 2001 From: Alex James Date: Fri, 7 Jul 2023 18:15:48 +0100 Subject: [PATCH 247/448] Java http BaseClient implementation (#980) --- .github/workflows/java.yml | 67 +++ pkgs/java_http/.gitignore | 1 + pkgs/java_http/analysis_options.yaml | 5 + pkgs/java_http/jnigen.yaml | 15 + pkgs/java_http/lib/java_http.dart | 3 +- pkgs/java_http/lib/src/java_client.dart | 43 ++ .../lib/src/third_party/java/net/URL.dart | 399 ++++++++++++++++++ .../src/third_party/java/net/_package.dart | 1 + pkgs/java_http/pubspec.yaml | 7 + pkgs/java_http/test/java_client_test.dart | 13 + 10 files changed, 552 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/java.yml create mode 100644 pkgs/java_http/.gitignore create mode 100644 pkgs/java_http/analysis_options.yaml create mode 100644 pkgs/java_http/jnigen.yaml create mode 100644 pkgs/java_http/lib/src/java_client.dart create mode 100644 pkgs/java_http/lib/src/third_party/java/net/URL.dart create mode 100644 pkgs/java_http/lib/src/third_party/java/net/_package.dart create mode 100644 pkgs/java_http/test/java_client_test.dart diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml new file mode 100644 index 0000000000..498226f7a5 --- /dev/null +++ b/.github/workflows/java.yml @@ -0,0 +1,67 @@ +name: package:java_http CI + +on: + push: + branches: + - main + - master + paths: + - 'pkgs/java_http/**' + - 'pkgs/http_client_conformance_tests/**' + - '.github/workflows/java.yml' + pull_request: + paths: + - 'pkgs/java_http/**' + - 'pkgs/http_client_conformance_tests/**' + - '.github/workflows/java.yml' + schedule: + # Runs every Sunday at midnight (00:00 UTC). + - cron: "0 0 * * 0" + +env: + PUB_ENVIRONMENT: bot.github + +jobs: + analyze: + name: Lint and static analysis + runs-on: ubuntu-latest + defaults: + run: + working-directory: pkgs/java_http + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + + - id: install + name: Install dependencies + run: dart pub get + + - name: Check formatting + run: dart format --output=none --set-exit-if-changed . + if: always() && steps.install.outcome == 'success' + + - name: Analyze code + run: dart analyze --fatal-infos + if: always() && steps.install.outcome == 'success' + + test: + needs: analyze + name: Build and test + runs-on: ubuntu-latest + defaults: + run: + working-directory: pkgs/java_http + + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + + - name: Build jni dynamic libraries + run: dart run jni:setup + + - name: Run tests + run: dart test diff --git a/pkgs/java_http/.gitignore b/pkgs/java_http/.gitignore new file mode 100644 index 0000000000..567609b123 --- /dev/null +++ b/pkgs/java_http/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/pkgs/java_http/analysis_options.yaml b/pkgs/java_http/analysis_options.yaml new file mode 100644 index 0000000000..1bff4c9f23 --- /dev/null +++ b/pkgs/java_http/analysis_options.yaml @@ -0,0 +1,5 @@ +include: ../../analysis_options.yaml + +analyzer: + exclude: + - lib/src/third_party/** diff --git a/pkgs/java_http/jnigen.yaml b/pkgs/java_http/jnigen.yaml new file mode 100644 index 0000000000..6e9ffcb143 --- /dev/null +++ b/pkgs/java_http/jnigen.yaml @@ -0,0 +1,15 @@ +# Regenerate bindings with `dart run jnigen --config jnigen.yaml`. + +summarizer: + backend: asm + +output: + bindings_type: dart_only + dart: + path: 'lib/src/third_party/' + +class_path: + - 'classes.jar' + +classes: + - 'java.net.URL' diff --git a/pkgs/java_http/lib/java_http.dart b/pkgs/java_http/lib/java_http.dart index 6498d22ead..743aa40223 100644 --- a/pkgs/java_http/lib/java_http.dart +++ b/pkgs/java_http/lib/java_http.dart @@ -2,6 +2,5 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -library; - +export 'src/java_client.dart'; export 'src/java_http_base.dart'; diff --git a/pkgs/java_http/lib/src/java_client.dart b/pkgs/java_http/lib/src/java_client.dart new file mode 100644 index 0000000000..0c00c3388a --- /dev/null +++ b/pkgs/java_http/lib/src/java_client.dart @@ -0,0 +1,43 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:convert'; +import 'dart:io'; + +import 'package:http/http.dart'; +import 'package:jni/jni.dart'; +import 'package:path/path.dart'; + +import 'third_party/java/net/URL.dart'; + +// TODO: Add a description of the implementation. +// Look at the description of cronet_client.dart and cupertino_client.dart for +// examples. +// See https://github.com/dart-lang/http/pull/980#discussion_r1253697461. +class JavaClient extends BaseClient { + void _initJVM() { + if (!Platform.isAndroid) { + Jni.spawnIfNotExists(dylibDir: join('build', 'jni_libs')); + } + } + + @override + Future send(BaseRequest request) async { + // TODO: Move the call to _initJVM() to the JavaClient constructor. + // See https://github.com/dart-lang/http/pull/980#discussion_r1253700470. + _initJVM(); + + final javaUrl = URL.ctor3(request.url.toString().toJString()); + final dartUrl = Uri.parse(javaUrl.toString1().toDartString()); + + const result = 'Hello World!'; + final stream = Stream.value(latin1.encode(result)); + + return StreamedResponse(stream, 200, + contentLength: 12, + request: Request(request.method, dartUrl), + headers: {'content-type': 'text/plain'}, + reasonPhrase: 'OK'); + } +} diff --git a/pkgs/java_http/lib/src/third_party/java/net/URL.dart b/pkgs/java_http/lib/src/third_party/java/net/URL.dart new file mode 100644 index 0000000000..8c420875f4 --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/net/URL.dart @@ -0,0 +1,399 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: file_names +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_shown_name + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +/// from: java.net.URL +class URL extends jni.JObject { + @override + late final jni.JObjType $type = type; + + URL.fromRef( + jni.JObjectPtr ref, + ) : super.fromRef(ref); + + static final _class = jni.Jni.findJClass(r"java/net/URL"); + + /// The type which includes information such as the signature of this class. + static const type = $URLType(); + static final _id_ctor = jni.Jni.accessors.getMethodIDOf(_class.reference, + r"", r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V"); + + /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2) + /// The returned object must be deleted after use, by calling the `delete` method. + factory URL( + jni.JString string, + jni.JString string1, + int i, + jni.JString string2, + ) { + return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, _id_ctor, [ + string.reference, + string1.reference, + jni.JValueInt(i), + string2.reference + ]).object); + } + + static final _id_ctor1 = jni.Jni.accessors.getMethodIDOf(_class.reference, + r"", r"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); + + /// from: public void (java.lang.String string, java.lang.String string1, java.lang.String string2) + /// The returned object must be deleted after use, by calling the `delete` method. + factory URL.ctor1( + jni.JString string, + jni.JString string1, + jni.JString string2, + ) { + return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, + _id_ctor1, + [string.reference, string1.reference, string2.reference]).object); + } + + static final _id_ctor2 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r"", + r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V"); + + /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2, java.net.URLStreamHandler uRLStreamHandler) + /// The returned object must be deleted after use, by calling the `delete` method. + factory URL.ctor2( + jni.JString string, + jni.JString string1, + int i, + jni.JString string2, + jni.JObject uRLStreamHandler, + ) { + return URL.fromRef( + jni.Jni.accessors.newObjectWithArgs(_class.reference, _id_ctor2, [ + string.reference, + string1.reference, + jni.JValueInt(i), + string2.reference, + uRLStreamHandler.reference + ]).object); + } + + static final _id_ctor3 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"", r"(Ljava/lang/String;)V"); + + /// from: public void (java.lang.String string) + /// The returned object must be deleted after use, by calling the `delete` method. + factory URL.ctor3( + jni.JString string, + ) { + return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, _id_ctor3, [string.reference]).object); + } + + static final _id_ctor4 = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"", r"(Ljava/net/URL;Ljava/lang/String;)V"); + + /// from: public void (java.net.URL uRL, java.lang.String string) + /// The returned object must be deleted after use, by calling the `delete` method. + factory URL.ctor4( + URL uRL, + jni.JString string, + ) { + return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, _id_ctor4, [uRL.reference, string.reference]).object); + } + + static final _id_ctor5 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r"", + r"(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V"); + + /// from: public void (java.net.URL uRL, java.lang.String string, java.net.URLStreamHandler uRLStreamHandler) + /// The returned object must be deleted after use, by calling the `delete` method. + factory URL.ctor5( + URL uRL, + jni.JString string, + jni.JObject uRLStreamHandler, + ) { + return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, + _id_ctor5, + [uRL.reference, string.reference, uRLStreamHandler.reference]).object); + } + + static final _id_getQuery = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getQuery", r"()Ljava/lang/String;"); + + /// from: public java.lang.String getQuery() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getQuery() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getQuery, jni.JniCallType.objectType, []).object); + } + + static final _id_getPath = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getPath", r"()Ljava/lang/String;"); + + /// from: public java.lang.String getPath() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getPath() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getPath, jni.JniCallType.objectType, []).object); + } + + static final _id_getUserInfo = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getUserInfo", r"()Ljava/lang/String;"); + + /// from: public java.lang.String getUserInfo() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getUserInfo() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getUserInfo, jni.JniCallType.objectType, []).object); + } + + static final _id_getAuthority = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getAuthority", r"()Ljava/lang/String;"); + + /// from: public java.lang.String getAuthority() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getAuthority() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getAuthority, jni.JniCallType.objectType, []).object); + } + + static final _id_getPort = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"getPort", r"()I"); + + /// from: public int getPort() + int getPort() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getPort, jni.JniCallType.intType, []).integer; + } + + static final _id_getDefaultPort = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getDefaultPort", r"()I"); + + /// from: public int getDefaultPort() + int getDefaultPort() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getDefaultPort, jni.JniCallType.intType, []).integer; + } + + static final _id_getProtocol = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getProtocol", r"()Ljava/lang/String;"); + + /// from: public java.lang.String getProtocol() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getProtocol() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getProtocol, jni.JniCallType.objectType, []).object); + } + + static final _id_getHost = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getHost", r"()Ljava/lang/String;"); + + /// from: public java.lang.String getHost() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getHost() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getHost, jni.JniCallType.objectType, []).object); + } + + static final _id_getFile = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getFile", r"()Ljava/lang/String;"); + + /// from: public java.lang.String getFile() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getFile() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getFile, jni.JniCallType.objectType, []).object); + } + + static final _id_getRef = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getRef", r"()Ljava/lang/String;"); + + /// from: public java.lang.String getRef() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getRef() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getRef, jni.JniCallType.objectType, []).object); + } + + static final _id_equals1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"equals", r"(Ljava/lang/Object;)Z"); + + /// from: public boolean equals(java.lang.Object object) + bool equals1( + jni.JObject object, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_equals1, + jni.JniCallType.booleanType, [object.reference]).boolean; + } + + static final _id_hashCode1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"hashCode", r"()I"); + + /// from: public int hashCode() + int hashCode1() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_hashCode1, jni.JniCallType.intType, []).integer; + } + + static final _id_sameFile = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"sameFile", r"(Ljava/net/URL;)Z"); + + /// from: public boolean sameFile(java.net.URL uRL) + bool sameFile( + URL uRL, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_sameFile, + jni.JniCallType.booleanType, [uRL.reference]).boolean; + } + + static final _id_toString1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"toString", r"()Ljava/lang/String;"); + + /// from: public java.lang.String toString() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString toString1() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_toString1, jni.JniCallType.objectType, []).object); + } + + static final _id_toExternalForm = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"toExternalForm", r"()Ljava/lang/String;"); + + /// from: public java.lang.String toExternalForm() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString toExternalForm() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_toExternalForm, jni.JniCallType.objectType, []).object); + } + + static final _id_toURI = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"toURI", r"()Ljava/net/URI;"); + + /// from: public java.net.URI toURI() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JObject toURI() { + return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_toURI, jni.JniCallType.objectType, []).object); + } + + static final _id_openConnection = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"openConnection", r"()Ljava/net/URLConnection;"); + + /// from: public java.net.URLConnection openConnection() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JObject openConnection() { + return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_openConnection, jni.JniCallType.objectType, []).object); + } + + static final _id_openConnection1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r"openConnection", + r"(Ljava/net/Proxy;)Ljava/net/URLConnection;"); + + /// from: public java.net.URLConnection openConnection(java.net.Proxy proxy) + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JObject openConnection1( + jni.JObject proxy, + ) { + return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_openConnection1, + jni.JniCallType.objectType, + [proxy.reference]).object); + } + + static final _id_openStream = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"openStream", r"()Ljava/io/InputStream;"); + + /// from: public final java.io.InputStream openStream() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JObject openStream() { + return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_openStream, jni.JniCallType.objectType, []).object); + } + + static final _id_getContent = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getContent", r"()Ljava/lang/Object;"); + + /// from: public final java.lang.Object getContent() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JObject getContent() { + return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getContent, jni.JniCallType.objectType, []).object); + } + + static final _id_getContent1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r"getContent", + r"([Ljava/lang/Class;)Ljava/lang/Object;"); + + /// from: public final java.lang.Object getContent(java.lang.Object[] classs) + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JObject getContent1( + jni.JArray classs, + ) { + return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getContent1, + jni.JniCallType.objectType, + [classs.reference]).object); + } + + static final _id_setURLStreamHandlerFactory = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"setURLStreamHandlerFactory", + r"(Ljava/net/URLStreamHandlerFactory;)V"); + + /// from: static public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory uRLStreamHandlerFactory) + static void setURLStreamHandlerFactory( + jni.JObject uRLStreamHandlerFactory, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_setURLStreamHandlerFactory, + jni.JniCallType.voidType, + [uRLStreamHandlerFactory.reference]).check(); + } +} + +class $URLType extends jni.JObjType { + const $URLType(); + + @override + String get signature => r"Ljava/net/URL;"; + + @override + URL fromRef(jni.JObjectPtr ref) => URL.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($URLType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($URLType) && other is $URLType; + } +} diff --git a/pkgs/java_http/lib/src/third_party/java/net/_package.dart b/pkgs/java_http/lib/src/third_party/java/net/_package.dart new file mode 100644 index 0000000000..4cfea9a1d2 --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/net/_package.dart @@ -0,0 +1 @@ +export "URL.dart"; diff --git a/pkgs/java_http/pubspec.yaml b/pkgs/java_http/pubspec.yaml index 20cb429e54..a11cdf912a 100644 --- a/pkgs/java_http/pubspec.yaml +++ b/pkgs/java_http/pubspec.yaml @@ -8,7 +8,14 @@ environment: sdk: ^3.0.0 dependencies: + http: '>=0.13.4 <2.0.0' + jni: ^0.5.0 + path: ^1.8.0 dev_dependencies: + dart_flutter_team_lints: ^1.0.0 + http_client_conformance_tests: + path: ../http_client_conformance_tests/ + jnigen: ^0.5.0 lints: ^2.0.0 test: ^1.21.0 diff --git a/pkgs/java_http/test/java_client_test.dart b/pkgs/java_http/test/java_client_test.dart new file mode 100644 index 0000000000..f3afbb07c0 --- /dev/null +++ b/pkgs/java_http/test/java_client_test.dart @@ -0,0 +1,13 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. 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:http_client_conformance_tests/http_client_conformance_tests.dart'; +import 'package:java_http/java_http.dart'; +import 'package:test/test.dart'; + +void main() { + group('java_http client conformance tests', () { + testResponseBody(JavaClient(), canStreamResponseBody: false); + }); +} From a72fc9f53be4dc29ed85736b5560361585e541b5 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 11 Jul 2023 15:00:04 -0700 Subject: [PATCH 248/448] Make native bindings pass `dart analysis` (#985) --- pkgs/cupertino_http/CHANGELOG.md | 2 ++ pkgs/cupertino_http/analysis_options.yaml | 4 ---- pkgs/cupertino_http/ffigen.yaml | 3 +++ pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart | 3 +++ 4 files changed, 8 insertions(+), 4 deletions(-) delete mode 100644 pkgs/cupertino_http/analysis_options.yaml diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index b0a68e33a1..de027abfb7 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -6,6 +6,8 @@ incrementally. * Deprecate `Data.fromUint8List` in favor of `Data.fromList`, which accepts any `List`. +* Disable additional analyses for generated Objective-C bindings to prevent + errors from `dart analyze`. ## 1.0.1 diff --git a/pkgs/cupertino_http/analysis_options.yaml b/pkgs/cupertino_http/analysis_options.yaml deleted file mode 100644 index 5a27f84e32..0000000000 --- a/pkgs/cupertino_http/analysis_options.yaml +++ /dev/null @@ -1,4 +0,0 @@ -include: ../../analysis_options.yaml - -analyzer: - exclude: [lib/src/native_cupertino_bindings.dart] diff --git a/pkgs/cupertino_http/ffigen.yaml b/pkgs/cupertino_http/ffigen.yaml index 4c1e48d7c5..43df82e58d 100644 --- a/pkgs/cupertino_http/ffigen.yaml +++ b/pkgs/cupertino_http/ffigen.yaml @@ -28,6 +28,9 @@ preamble: | // ignore_for_file: always_specify_types // ignore_for_file: camel_case_types // ignore_for_file: non_constant_identifier_names + // ignore_for_file: unused_element + // ignore_for_file: unused_field + // ignore_for_file: return_of_invalid_type comments: style: any length: full diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index d2ca3d22b4..1f05f8af71 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -1,6 +1,9 @@ // ignore_for_file: always_specify_types // ignore_for_file: camel_case_types // ignore_for_file: non_constant_identifier_names +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: return_of_invalid_type // AUTO GENERATED FILE, DO NOT EDIT. // From c72aeb7d3ba5db9ac5c9a5e55e5a95b4089cd767 Mon Sep 17 00:00:00 2001 From: Alex James Date: Fri, 21 Jul 2023 16:34:05 +0100 Subject: [PATCH 249/448] Java http send method (#987) --- pkgs/java_http/jnigen.yaml | 4 + pkgs/java_http/lib/src/java_client.dart | 136 ++- .../src/third_party/java/io/InputStream.dart | 224 +++++ .../lib/src/third_party/java/io/_package.dart | 1 + .../lib/src/third_party/java/lang/System.dart | 466 ++++++++++ .../src/third_party/java/lang/_package.dart | 1 + .../java/net/HttpURLConnection.dart | 523 +++++++++++ .../lib/src/third_party/java/net/URL.dart | 28 +- .../third_party/java/net/URLConnection.dart | 833 ++++++++++++++++++ .../src/third_party/java/net/_package.dart | 2 + pkgs/java_http/test/java_client_test.dart | 3 + 11 files changed, 2199 insertions(+), 22 deletions(-) create mode 100644 pkgs/java_http/lib/src/third_party/java/io/InputStream.dart create mode 100644 pkgs/java_http/lib/src/third_party/java/io/_package.dart create mode 100644 pkgs/java_http/lib/src/third_party/java/lang/System.dart create mode 100644 pkgs/java_http/lib/src/third_party/java/lang/_package.dart create mode 100644 pkgs/java_http/lib/src/third_party/java/net/HttpURLConnection.dart create mode 100644 pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart diff --git a/pkgs/java_http/jnigen.yaml b/pkgs/java_http/jnigen.yaml index 6e9ffcb143..6f470e196d 100644 --- a/pkgs/java_http/jnigen.yaml +++ b/pkgs/java_http/jnigen.yaml @@ -12,4 +12,8 @@ class_path: - 'classes.jar' classes: + - 'java.io.InputStream' + - 'java.lang.System' + - 'java.net.HttpURLConnection' - 'java.net.URL' + - 'java.net.URLConnection' diff --git a/pkgs/java_http/lib/src/java_client.dart b/pkgs/java_http/lib/src/java_client.dart index 0c00c3388a..283fce5ff1 100644 --- a/pkgs/java_http/lib/src/java_client.dart +++ b/pkgs/java_http/lib/src/java_client.dart @@ -2,13 +2,16 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:convert'; import 'dart:io'; +import 'dart:isolate'; +import 'dart:typed_data'; import 'package:http/http.dart'; import 'package:jni/jni.dart'; import 'package:path/path.dart'; +import 'third_party/java/lang/System.dart'; +import 'third_party/java/net/HttpURLConnection.dart'; import 'third_party/java/net/URL.dart'; // TODO: Add a description of the implementation. @@ -20,6 +23,12 @@ class JavaClient extends BaseClient { if (!Platform.isAndroid) { Jni.spawnIfNotExists(dylibDir: join('build', 'jni_libs')); } + + // TODO: Determine if we can remove this. + // It's a workaround to fix the tests not passing on GitHub CI. + // See https://github.com/dart-lang/http/pull/987#issuecomment-1636170371. + System.setProperty( + 'java.net.preferIPv6Addresses'.toJString(), 'true'.toJString()); } @override @@ -28,16 +37,123 @@ class JavaClient extends BaseClient { // See https://github.com/dart-lang/http/pull/980#discussion_r1253700470. _initJVM(); - final javaUrl = URL.ctor3(request.url.toString().toJString()); - final dartUrl = Uri.parse(javaUrl.toString1().toDartString()); + final (statusCode, reasonPhrase, responseHeaders, responseBody) = + await Isolate.run(() { + request.finalize(); + + final httpUrlConnection = URL + .ctor3(request.url.toString().toJString()) + .openConnection() + .castTo(HttpURLConnection.type, deleteOriginal: true); + + request.headers.forEach((headerName, headerValue) { + httpUrlConnection.setRequestProperty( + headerName.toJString(), headerValue.toJString()); + }); + + httpUrlConnection.setRequestMethod(request.method.toJString()); + + final statusCode = _statusCode(request, httpUrlConnection); + final reasonPhrase = _reasonPhrase(httpUrlConnection); + final responseHeaders = _responseHeaders(httpUrlConnection); + final responseBody = _responseBody(httpUrlConnection); + + httpUrlConnection.disconnect(); + + return ( + statusCode, + reasonPhrase, + responseHeaders, + responseBody, + ); + }); + + return StreamedResponse(Stream.value(responseBody), statusCode, + contentLength: _contentLengthHeader(request, responseHeaders), + request: request, + headers: responseHeaders, + reasonPhrase: reasonPhrase); + } + + int _statusCode(BaseRequest request, HttpURLConnection httpUrlConnection) { + final statusCode = httpUrlConnection.getResponseCode(); + + if (statusCode == -1) { + throw ClientException( + 'Status code can not be discerned from the response.', request.url); + } + + return statusCode; + } + + String? _reasonPhrase(HttpURLConnection httpUrlConnection) { + final reasonPhrase = httpUrlConnection.getResponseMessage(); + + return reasonPhrase.isNull + ? null + : reasonPhrase.toDartString(deleteOriginal: true); + } + + Map _responseHeaders(HttpURLConnection httpUrlConnection) { + final headers = >{}; + + for (var i = 0;; i++) { + final headerName = httpUrlConnection.getHeaderFieldKey(i); + final headerValue = httpUrlConnection.getHeaderField1(i); + + // If the header name and header value are both null then we have reached + // the end of the response headers. + if (headerName.isNull && headerValue.isNull) break; + + // The HTTP response header status line is returned as a header field + // where the field key is null and the field is the status line. + // Other package:http implementations don't include the status line as a + // header. So we don't add the status line to the headers. + if (headerName.isNull) continue; + + headers + .putIfAbsent(headerName.toDartString(), () => []) + .add(headerValue.toDartString()); + } + + return headers + .map((key, value) => MapEntry(key.toLowerCase(), value.join(','))); + } + + int? _contentLengthHeader(BaseRequest request, Map headers) { + final contentLengthHeader = headers['content-length']; + + // Return null if the content length header is not set. + if (contentLengthHeader == null) return null; + + // Throw ClientException if the content length header is not an integer. + final contentLength = int.tryParse(contentLengthHeader); + if (contentLength == null) { + throw ClientException( + 'Invalid content-length header: $contentLengthHeader. ' + 'Content-length must be a non-negative integer.', + request.url, + ); + } + + return contentLength; + } + + Uint8List _responseBody(HttpURLConnection httpUrlConnection) { + final responseCode = httpUrlConnection.getResponseCode(); + + final inputStream = (responseCode >= 200 && responseCode <= 299) + ? httpUrlConnection.getInputStream() + : httpUrlConnection.getErrorStream(); + + final bytes = []; + int byte; + while ((byte = inputStream.read()) != -1) { + bytes.add(byte); + } - const result = 'Hello World!'; - final stream = Stream.value(latin1.encode(result)); + inputStream.close(); - return StreamedResponse(stream, 200, - contentLength: 12, - request: Request(request.method, dartUrl), - headers: {'content-type': 'text/plain'}, - reasonPhrase: 'OK'); + return Uint8List.fromList(bytes); } } diff --git a/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart b/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart new file mode 100644 index 0000000000..ec99ebc1a1 --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart @@ -0,0 +1,224 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: file_names +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_shown_name + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +/// from: java.io.InputStream +class InputStream extends jni.JObject { + @override + late final jni.JObjType $type = type; + + InputStream.fromRef( + jni.JObjectPtr ref, + ) : super.fromRef(ref); + + static final _class = jni.Jni.findJClass(r"java/io/InputStream"); + + /// The type which includes information such as the signature of this class. + static const type = $InputStreamType(); + static final _id_ctor = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"", r"()V"); + + /// from: public void () + /// The returned object must be deleted after use, by calling the `delete` method. + factory InputStream() { + return InputStream.fromRef(jni.Jni.accessors + .newObjectWithArgs(_class.reference, _id_ctor, []).object); + } + + static final _id_nullInputStream = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"nullInputStream", r"()Ljava/io/InputStream;"); + + /// from: static public java.io.InputStream nullInputStream() + /// The returned object must be deleted after use, by calling the `delete` method. + static InputStream nullInputStream() { + return const $InputStreamType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_nullInputStream, + jni.JniCallType.objectType, []).object); + } + + static final _id_read = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"()I"); + + /// from: public abstract int read() + int read() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_read, jni.JniCallType.intType, []).integer; + } + + static final _id_read1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"([B)I"); + + /// from: public int read(byte[] bs) + int read1( + jni.JArray bs, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_read1, jni.JniCallType.intType, [bs.reference]).integer; + } + + static final _id_read2 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"([BII)I"); + + /// from: public int read(byte[] bs, int i, int i1) + int read2( + jni.JArray bs, + int i, + int i1, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_read2, + jni.JniCallType.intType, + [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).integer; + } + + static final _id_readAllBytes = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"readAllBytes", r"()[B"); + + /// from: public byte[] readAllBytes() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JArray readAllBytes() { + return const jni.JArrayType(jni.jbyteType()).fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_readAllBytes, + jni.JniCallType.objectType, []).object); + } + + static final _id_readNBytes = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"readNBytes", r"(I)[B"); + + /// from: public byte[] readNBytes(int i) + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JArray readNBytes( + int i, + ) { + return const jni.JArrayType(jni.jbyteType()).fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_readNBytes, + jni.JniCallType.objectType, [jni.JValueInt(i)]).object); + } + + static final _id_readNBytes1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"readNBytes", r"([BII)I"); + + /// from: public int readNBytes(byte[] bs, int i, int i1) + int readNBytes1( + jni.JArray bs, + int i, + int i1, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_readNBytes1, + jni.JniCallType.intType, + [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).integer; + } + + static final _id_skip = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"skip", r"(J)J"); + + /// from: public long skip(long j) + int skip( + int j, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_skip, jni.JniCallType.longType, [j]).long; + } + + static final _id_available = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"available", r"()I"); + + /// from: public int available() + int available() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_available, jni.JniCallType.intType, []).integer; + } + + static final _id_close = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"close", r"()V"); + + /// from: public void close() + void close() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_close, jni.JniCallType.voidType, []).check(); + } + + static final _id_mark = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"mark", r"(I)V"); + + /// from: public void mark(int i) + void mark( + int i, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_mark, + jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); + } + + static final _id_reset = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"reset", r"()V"); + + /// from: public void reset() + void reset() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_reset, jni.JniCallType.voidType, []).check(); + } + + static final _id_markSupported = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"markSupported", r"()Z"); + + /// from: public boolean markSupported() + bool markSupported() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_markSupported, jni.JniCallType.booleanType, []).boolean; + } + + static final _id_transferTo = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"transferTo", r"(Ljava/io/OutputStream;)J"); + + /// from: public long transferTo(java.io.OutputStream outputStream) + int transferTo( + jni.JObject outputStream, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_transferTo, + jni.JniCallType.longType, [outputStream.reference]).long; + } +} + +class $InputStreamType extends jni.JObjType { + const $InputStreamType(); + + @override + String get signature => r"Ljava/io/InputStream;"; + + @override + InputStream fromRef(jni.JObjectPtr ref) => InputStream.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($InputStreamType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($InputStreamType) && other is $InputStreamType; + } +} diff --git a/pkgs/java_http/lib/src/third_party/java/io/_package.dart b/pkgs/java_http/lib/src/third_party/java/io/_package.dart new file mode 100644 index 0000000000..19b2828809 --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/io/_package.dart @@ -0,0 +1 @@ +export "InputStream.dart"; diff --git a/pkgs/java_http/lib/src/third_party/java/lang/System.dart b/pkgs/java_http/lib/src/third_party/java/lang/System.dart new file mode 100644 index 0000000000..42b3b860d6 --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/lang/System.dart @@ -0,0 +1,466 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: file_names +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_shown_name + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +import "../io/InputStream.dart" as inputstream_; + +/// from: java.lang.System +class System extends jni.JObject { + @override + late final jni.JObjType $type = type; + + System.fromRef( + jni.JObjectPtr ref, + ) : super.fromRef(ref); + + static final _class = jni.Jni.findJClass(r"java/lang/System"); + + /// The type which includes information such as the signature of this class. + static const type = $SystemType(); + static final _id_in0 = jni.Jni.accessors.getStaticFieldIDOf( + _class.reference, + r"in", + r"Ljava/io/InputStream;", + ); + + /// from: static public final java.io.InputStream in + /// The returned object must be deleted after use, by calling the `delete` method. + static inputstream_.InputStream get in0 => + const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors + .getStaticField(_class.reference, _id_in0, jni.JniCallType.objectType) + .object); + + static final _id_out = jni.Jni.accessors.getStaticFieldIDOf( + _class.reference, + r"out", + r"Ljava/io/PrintStream;", + ); + + /// from: static public final java.io.PrintStream out + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JObject get out => + const jni.JObjectType().fromRef(jni.Jni.accessors + .getStaticField(_class.reference, _id_out, jni.JniCallType.objectType) + .object); + + static final _id_err = jni.Jni.accessors.getStaticFieldIDOf( + _class.reference, + r"err", + r"Ljava/io/PrintStream;", + ); + + /// from: static public final java.io.PrintStream err + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JObject get err => + const jni.JObjectType().fromRef(jni.Jni.accessors + .getStaticField(_class.reference, _id_err, jni.JniCallType.objectType) + .object); + + static final _id_setIn = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"setIn", r"(Ljava/io/InputStream;)V"); + + /// from: static public void setIn(java.io.InputStream inputStream) + static void setIn( + inputstream_.InputStream inputStream, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_setIn, jni.JniCallType.voidType, [inputStream.reference]).check(); + } + + static final _id_setOut = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"setOut", r"(Ljava/io/PrintStream;)V"); + + /// from: static public void setOut(java.io.PrintStream printStream) + static void setOut( + jni.JObject printStream, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_setOut, jni.JniCallType.voidType, [printStream.reference]).check(); + } + + static final _id_setErr = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"setErr", r"(Ljava/io/PrintStream;)V"); + + /// from: static public void setErr(java.io.PrintStream printStream) + static void setErr( + jni.JObject printStream, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_setErr, jni.JniCallType.voidType, [printStream.reference]).check(); + } + + static final _id_console = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"console", r"()Ljava/io/Console;"); + + /// from: static public java.io.Console console() + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JObject console() { + return const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_console, + jni.JniCallType.objectType, []).object); + } + + static final _id_inheritedChannel = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"inheritedChannel", r"()Ljava/nio/channels/Channel;"); + + /// from: static public java.nio.channels.Channel inheritedChannel() + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JObject inheritedChannel() { + return const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_inheritedChannel, + jni.JniCallType.objectType, []).object); + } + + static final _id_setSecurityManager = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r"setSecurityManager", + r"(Ljava/lang/SecurityManager;)V"); + + /// from: static public void setSecurityManager(java.lang.SecurityManager securityManager) + static void setSecurityManager( + jni.JObject securityManager, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_setSecurityManager, + jni.JniCallType.voidType, + [securityManager.reference]).check(); + } + + static final _id_getSecurityManager = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r"getSecurityManager", + r"()Ljava/lang/SecurityManager;"); + + /// from: static public java.lang.SecurityManager getSecurityManager() + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JObject getSecurityManager() { + return const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_getSecurityManager, + jni.JniCallType.objectType, []).object); + } + + static final _id_currentTimeMillis = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"currentTimeMillis", r"()J"); + + /// from: static public native long currentTimeMillis() + static int currentTimeMillis() { + return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_currentTimeMillis, jni.JniCallType.longType, []).long; + } + + static final _id_nanoTime = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"nanoTime", r"()J"); + + /// from: static public native long nanoTime() + static int nanoTime() { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, _id_nanoTime, jni.JniCallType.longType, []).long; + } + + static final _id_arraycopy = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r"arraycopy", + r"(Ljava/lang/Object;ILjava/lang/Object;II)V"); + + /// from: static public native void arraycopy(java.lang.Object object, int i, java.lang.Object object1, int i1, int i2) + static void arraycopy( + jni.JObject object, + int i, + jni.JObject object1, + int i1, + int i2, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, _id_arraycopy, jni.JniCallType.voidType, [ + object.reference, + jni.JValueInt(i), + object1.reference, + jni.JValueInt(i1), + jni.JValueInt(i2) + ]).check(); + } + + static final _id_identityHashCode = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"identityHashCode", r"(Ljava/lang/Object;)I"); + + /// from: static public native int identityHashCode(java.lang.Object object) + static int identityHashCode( + jni.JObject object, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_identityHashCode, + jni.JniCallType.intType, + [object.reference]).integer; + } + + static final _id_getProperties = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"getProperties", r"()Ljava/util/Properties;"); + + /// from: static public java.util.Properties getProperties() + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JObject getProperties() { + return const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_getProperties, + jni.JniCallType.objectType, []).object); + } + + static final _id_lineSeparator = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"lineSeparator", r"()Ljava/lang/String;"); + + /// from: static public java.lang.String lineSeparator() + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JString lineSeparator() { + return const jni.JStringType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_lineSeparator, + jni.JniCallType.objectType, []).object); + } + + static final _id_setProperties = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"setProperties", r"(Ljava/util/Properties;)V"); + + /// from: static public void setProperties(java.util.Properties properties) + static void setProperties( + jni.JObject properties, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_setProperties, + jni.JniCallType.voidType, + [properties.reference]).check(); + } + + static final _id_getProperty = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r"getProperty", + r"(Ljava/lang/String;)Ljava/lang/String;"); + + /// from: static public java.lang.String getProperty(java.lang.String string) + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JString getProperty( + jni.JString string, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_getProperty, + jni.JniCallType.objectType, [string.reference]).object); + } + + static final _id_getProperty1 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r"getProperty", + r"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"); + + /// from: static public java.lang.String getProperty(java.lang.String string, java.lang.String string1) + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JString getProperty1( + jni.JString string, + jni.JString string1, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_getProperty1, + jni.JniCallType.objectType, + [string.reference, string1.reference]).object); + } + + static final _id_setProperty = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r"setProperty", + r"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"); + + /// from: static public java.lang.String setProperty(java.lang.String string, java.lang.String string1) + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JString setProperty( + jni.JString string, + jni.JString string1, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_setProperty, + jni.JniCallType.objectType, + [string.reference, string1.reference]).object); + } + + static final _id_clearProperty = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r"clearProperty", + r"(Ljava/lang/String;)Ljava/lang/String;"); + + /// from: static public java.lang.String clearProperty(java.lang.String string) + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JString clearProperty( + jni.JString string, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_clearProperty, + jni.JniCallType.objectType, [string.reference]).object); + } + + static final _id_getenv = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"getenv", r"(Ljava/lang/String;)Ljava/lang/String;"); + + /// from: static public java.lang.String getenv(java.lang.String string) + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JString getenv( + jni.JString string, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_getenv, + jni.JniCallType.objectType, [string.reference]).object); + } + + static final _id_getenv1 = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"getenv", r"()Ljava/util/Map;"); + + /// from: static public java.util.Map getenv() + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JMap getenv1() { + return const jni.JMapType(jni.JStringType(), jni.JStringType()).fromRef( + jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_getenv1, jni.JniCallType.objectType, []).object); + } + + static final _id_getLogger = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r"getLogger", + r"(Ljava/lang/String;)Ljava/lang/System$Logger;"); + + /// from: static public java.lang.System$Logger getLogger(java.lang.String string) + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JObject getLogger( + jni.JString string, + ) { + return const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_getLogger, + jni.JniCallType.objectType, [string.reference]).object); + } + + static final _id_getLogger1 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r"getLogger", + r"(Ljava/lang/String;Ljava/util/ResourceBundle;)Ljava/lang/System$Logger;"); + + /// from: static public java.lang.System$Logger getLogger(java.lang.String string, java.util.ResourceBundle resourceBundle) + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JObject getLogger1( + jni.JString string, + jni.JObject resourceBundle, + ) { + return const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_getLogger1, + jni.JniCallType.objectType, + [string.reference, resourceBundle.reference]).object); + } + + static final _id_exit = + jni.Jni.accessors.getStaticMethodIDOf(_class.reference, r"exit", r"(I)V"); + + /// from: static public void exit(int i) + static void exit( + int i, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_exit, jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); + } + + static final _id_gc = + jni.Jni.accessors.getStaticMethodIDOf(_class.reference, r"gc", r"()V"); + + /// from: static public void gc() + static void gc() { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, _id_gc, jni.JniCallType.voidType, []).check(); + } + + static final _id_runFinalization = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"runFinalization", r"()V"); + + /// from: static public void runFinalization() + static void runFinalization() { + return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_runFinalization, jni.JniCallType.voidType, []).check(); + } + + static final _id_load = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"load", r"(Ljava/lang/String;)V"); + + /// from: static public void load(java.lang.String string) + static void load( + jni.JString string, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_load, jni.JniCallType.voidType, [string.reference]).check(); + } + + static final _id_loadLibrary = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"loadLibrary", r"(Ljava/lang/String;)V"); + + /// from: static public void loadLibrary(java.lang.String string) + static void loadLibrary( + jni.JString string, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_loadLibrary, jni.JniCallType.voidType, [string.reference]).check(); + } + + static final _id_mapLibraryName = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r"mapLibraryName", + r"(Ljava/lang/String;)Ljava/lang/String;"); + + /// from: static public native java.lang.String mapLibraryName(java.lang.String string) + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JString mapLibraryName( + jni.JString string, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_mapLibraryName, + jni.JniCallType.objectType, [string.reference]).object); + } +} + +class $SystemType extends jni.JObjType { + const $SystemType(); + + @override + String get signature => r"Ljava/lang/System;"; + + @override + System fromRef(jni.JObjectPtr ref) => System.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($SystemType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($SystemType) && other is $SystemType; + } +} diff --git a/pkgs/java_http/lib/src/third_party/java/lang/_package.dart b/pkgs/java_http/lib/src/third_party/java/lang/_package.dart new file mode 100644 index 0000000000..b468ec065d --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/lang/_package.dart @@ -0,0 +1 @@ +export "System.dart"; diff --git a/pkgs/java_http/lib/src/third_party/java/net/HttpURLConnection.dart b/pkgs/java_http/lib/src/third_party/java/net/HttpURLConnection.dart new file mode 100644 index 0000000000..ba1954b02d --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/net/HttpURLConnection.dart @@ -0,0 +1,523 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: file_names +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_shown_name + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +import "URLConnection.dart" as urlconnection_; + +import "URL.dart" as url_; + +import "../io/InputStream.dart" as inputstream_; + +/// from: java.net.HttpURLConnection +class HttpURLConnection extends urlconnection_.URLConnection { + @override + late final jni.JObjType $type = type; + + HttpURLConnection.fromRef( + jni.JObjectPtr ref, + ) : super.fromRef(ref); + + static final _class = jni.Jni.findJClass(r"java/net/HttpURLConnection"); + + /// The type which includes information such as the signature of this class. + static const type = $HttpURLConnectionType(); + static final _id_method = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"method", + r"Ljava/lang/String;", + ); + + /// from: protected java.lang.String method + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString get method => const jni.JStringType().fromRef(jni.Jni.accessors + .getField(reference, _id_method, jni.JniCallType.objectType) + .object); + + /// from: protected java.lang.String method + /// The returned object must be deleted after use, by calling the `delete` method. + set method(jni.JString value) => + jni.Jni.env.SetObjectField(reference, _id_method, value.reference); + + static final _id_chunkLength = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"chunkLength", + r"I", + ); + + /// from: protected int chunkLength + int get chunkLength => jni.Jni.accessors + .getField(reference, _id_chunkLength, jni.JniCallType.intType) + .integer; + + /// from: protected int chunkLength + set chunkLength(int value) => + jni.Jni.env.SetIntField(reference, _id_chunkLength, value); + + static final _id_fixedContentLength = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"fixedContentLength", + r"I", + ); + + /// from: protected int fixedContentLength + int get fixedContentLength => jni.Jni.accessors + .getField(reference, _id_fixedContentLength, jni.JniCallType.intType) + .integer; + + /// from: protected int fixedContentLength + set fixedContentLength(int value) => + jni.Jni.env.SetIntField(reference, _id_fixedContentLength, value); + + static final _id_fixedContentLengthLong = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"fixedContentLengthLong", + r"J", + ); + + /// from: protected long fixedContentLengthLong + int get fixedContentLengthLong => jni.Jni.accessors + .getField(reference, _id_fixedContentLengthLong, jni.JniCallType.longType) + .long; + + /// from: protected long fixedContentLengthLong + set fixedContentLengthLong(int value) => + jni.Jni.env.SetLongField(reference, _id_fixedContentLengthLong, value); + + static final _id_responseCode = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"responseCode", + r"I", + ); + + /// from: protected int responseCode + int get responseCode => jni.Jni.accessors + .getField(reference, _id_responseCode, jni.JniCallType.intType) + .integer; + + /// from: protected int responseCode + set responseCode(int value) => + jni.Jni.env.SetIntField(reference, _id_responseCode, value); + + static final _id_responseMessage = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"responseMessage", + r"Ljava/lang/String;", + ); + + /// from: protected java.lang.String responseMessage + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString get responseMessage => + const jni.JStringType().fromRef(jni.Jni.accessors + .getField(reference, _id_responseMessage, jni.JniCallType.objectType) + .object); + + /// from: protected java.lang.String responseMessage + /// The returned object must be deleted after use, by calling the `delete` method. + set responseMessage(jni.JString value) => jni.Jni.env + .SetObjectField(reference, _id_responseMessage, value.reference); + + static final _id_instanceFollowRedirects = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"instanceFollowRedirects", + r"Z", + ); + + /// from: protected boolean instanceFollowRedirects + bool get instanceFollowRedirects => jni.Jni.accessors + .getField( + reference, _id_instanceFollowRedirects, jni.JniCallType.booleanType) + .boolean; + + /// from: protected boolean instanceFollowRedirects + set instanceFollowRedirects(bool value) => jni.Jni.env + .SetBooleanField(reference, _id_instanceFollowRedirects, value ? 1 : 0); + + /// from: static public final int HTTP_OK + static const HTTP_OK = 200; + + /// from: static public final int HTTP_CREATED + static const HTTP_CREATED = 201; + + /// from: static public final int HTTP_ACCEPTED + static const HTTP_ACCEPTED = 202; + + /// from: static public final int HTTP_NOT_AUTHORITATIVE + static const HTTP_NOT_AUTHORITATIVE = 203; + + /// from: static public final int HTTP_NO_CONTENT + static const HTTP_NO_CONTENT = 204; + + /// from: static public final int HTTP_RESET + static const HTTP_RESET = 205; + + /// from: static public final int HTTP_PARTIAL + static const HTTP_PARTIAL = 206; + + /// from: static public final int HTTP_MULT_CHOICE + static const HTTP_MULT_CHOICE = 300; + + /// from: static public final int HTTP_MOVED_PERM + static const HTTP_MOVED_PERM = 301; + + /// from: static public final int HTTP_MOVED_TEMP + static const HTTP_MOVED_TEMP = 302; + + /// from: static public final int HTTP_SEE_OTHER + static const HTTP_SEE_OTHER = 303; + + /// from: static public final int HTTP_NOT_MODIFIED + static const HTTP_NOT_MODIFIED = 304; + + /// from: static public final int HTTP_USE_PROXY + static const HTTP_USE_PROXY = 305; + + /// from: static public final int HTTP_BAD_REQUEST + static const HTTP_BAD_REQUEST = 400; + + /// from: static public final int HTTP_UNAUTHORIZED + static const HTTP_UNAUTHORIZED = 401; + + /// from: static public final int HTTP_PAYMENT_REQUIRED + static const HTTP_PAYMENT_REQUIRED = 402; + + /// from: static public final int HTTP_FORBIDDEN + static const HTTP_FORBIDDEN = 403; + + /// from: static public final int HTTP_NOT_FOUND + static const HTTP_NOT_FOUND = 404; + + /// from: static public final int HTTP_BAD_METHOD + static const HTTP_BAD_METHOD = 405; + + /// from: static public final int HTTP_NOT_ACCEPTABLE + static const HTTP_NOT_ACCEPTABLE = 406; + + /// from: static public final int HTTP_PROXY_AUTH + static const HTTP_PROXY_AUTH = 407; + + /// from: static public final int HTTP_CLIENT_TIMEOUT + static const HTTP_CLIENT_TIMEOUT = 408; + + /// from: static public final int HTTP_CONFLICT + static const HTTP_CONFLICT = 409; + + /// from: static public final int HTTP_GONE + static const HTTP_GONE = 410; + + /// from: static public final int HTTP_LENGTH_REQUIRED + static const HTTP_LENGTH_REQUIRED = 411; + + /// from: static public final int HTTP_PRECON_FAILED + static const HTTP_PRECON_FAILED = 412; + + /// from: static public final int HTTP_ENTITY_TOO_LARGE + static const HTTP_ENTITY_TOO_LARGE = 413; + + /// from: static public final int HTTP_REQ_TOO_LONG + static const HTTP_REQ_TOO_LONG = 414; + + /// from: static public final int HTTP_UNSUPPORTED_TYPE + static const HTTP_UNSUPPORTED_TYPE = 415; + + /// from: static public final int HTTP_SERVER_ERROR + static const HTTP_SERVER_ERROR = 500; + + /// from: static public final int HTTP_INTERNAL_ERROR + static const HTTP_INTERNAL_ERROR = 500; + + /// from: static public final int HTTP_NOT_IMPLEMENTED + static const HTTP_NOT_IMPLEMENTED = 501; + + /// from: static public final int HTTP_BAD_GATEWAY + static const HTTP_BAD_GATEWAY = 502; + + /// from: static public final int HTTP_UNAVAILABLE + static const HTTP_UNAVAILABLE = 503; + + /// from: static public final int HTTP_GATEWAY_TIMEOUT + static const HTTP_GATEWAY_TIMEOUT = 504; + + /// from: static public final int HTTP_VERSION + static const HTTP_VERSION = 505; + + static final _id_setAuthenticator = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"setAuthenticator", r"(Ljava/net/Authenticator;)V"); + + /// from: public void setAuthenticator(java.net.Authenticator authenticator) + void setAuthenticator( + jni.JObject authenticator, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_setAuthenticator, + jni.JniCallType.voidType, [authenticator.reference]).check(); + } + + static final _id_getHeaderFieldKey = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getHeaderFieldKey", r"(I)Ljava/lang/String;"); + + /// from: public java.lang.String getHeaderFieldKey(int i) + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getHeaderFieldKey( + int i, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getHeaderFieldKey, + jni.JniCallType.objectType, + [jni.JValueInt(i)]).object); + } + + static final _id_setFixedLengthStreamingMode = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"setFixedLengthStreamingMode", r"(I)V"); + + /// from: public void setFixedLengthStreamingMode(int i) + void setFixedLengthStreamingMode( + int i, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_setFixedLengthStreamingMode, + jni.JniCallType.voidType, + [jni.JValueInt(i)]).check(); + } + + static final _id_setFixedLengthStreamingMode1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"setFixedLengthStreamingMode", r"(J)V"); + + /// from: public void setFixedLengthStreamingMode(long j) + void setFixedLengthStreamingMode1( + int j, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_setFixedLengthStreamingMode1, + jni.JniCallType.voidType, + [j]).check(); + } + + static final _id_setChunkedStreamingMode = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"setChunkedStreamingMode", r"(I)V"); + + /// from: public void setChunkedStreamingMode(int i) + void setChunkedStreamingMode( + int i, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_setChunkedStreamingMode, + jni.JniCallType.voidType, + [jni.JValueInt(i)]).check(); + } + + static final _id_getHeaderField1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getHeaderField", r"(I)Ljava/lang/String;"); + + /// from: public java.lang.String getHeaderField(int i) + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getHeaderField1( + int i, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getHeaderField1, + jni.JniCallType.objectType, + [jni.JValueInt(i)]).object); + } + + static final _id_ctor = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"", r"(Ljava/net/URL;)V"); + + /// from: protected void (java.net.URL uRL) + /// The returned object must be deleted after use, by calling the `delete` method. + factory HttpURLConnection( + url_.URL uRL, + ) { + return HttpURLConnection.fromRef(jni.Jni.accessors + .newObjectWithArgs(_class.reference, _id_ctor, [uRL.reference]).object); + } + + static final _id_setFollowRedirects = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"setFollowRedirects", r"(Z)V"); + + /// from: static public void setFollowRedirects(boolean z) + static void setFollowRedirects( + bool z, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_setFollowRedirects, jni.JniCallType.voidType, [z ? 1 : 0]).check(); + } + + static final _id_getFollowRedirects = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"getFollowRedirects", r"()Z"); + + /// from: static public boolean getFollowRedirects() + static bool getFollowRedirects() { + return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_getFollowRedirects, jni.JniCallType.booleanType, []).boolean; + } + + static final _id_setInstanceFollowRedirects = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"setInstanceFollowRedirects", r"(Z)V"); + + /// from: public void setInstanceFollowRedirects(boolean z) + void setInstanceFollowRedirects( + bool z, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_setInstanceFollowRedirects, + jni.JniCallType.voidType, + [z ? 1 : 0]).check(); + } + + static final _id_getInstanceFollowRedirects = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getInstanceFollowRedirects", r"()Z"); + + /// from: public boolean getInstanceFollowRedirects() + bool getInstanceFollowRedirects() { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getInstanceFollowRedirects, + jni.JniCallType.booleanType, []).boolean; + } + + static final _id_setRequestMethod = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"setRequestMethod", r"(Ljava/lang/String;)V"); + + /// from: public void setRequestMethod(java.lang.String string) + void setRequestMethod( + jni.JString string, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_setRequestMethod, + jni.JniCallType.voidType, [string.reference]).check(); + } + + static final _id_getRequestMethod = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getRequestMethod", r"()Ljava/lang/String;"); + + /// from: public java.lang.String getRequestMethod() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getRequestMethod() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getRequestMethod, + jni.JniCallType.objectType, []).object); + } + + static final _id_getResponseCode = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getResponseCode", r"()I"); + + /// from: public int getResponseCode() + int getResponseCode() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getResponseCode, jni.JniCallType.intType, []).integer; + } + + static final _id_getResponseMessage = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getResponseMessage", r"()Ljava/lang/String;"); + + /// from: public java.lang.String getResponseMessage() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getResponseMessage() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getResponseMessage, + jni.JniCallType.objectType, []).object); + } + + static final _id_getHeaderFieldDate = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getHeaderFieldDate", r"(Ljava/lang/String;J)J"); + + /// from: public long getHeaderFieldDate(java.lang.String string, long j) + int getHeaderFieldDate( + jni.JString string, + int j, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getHeaderFieldDate, + jni.JniCallType.longType, + [string.reference, j]).long; + } + + static final _id_disconnect = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"disconnect", r"()V"); + + /// from: public abstract void disconnect() + void disconnect() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_disconnect, jni.JniCallType.voidType, []).check(); + } + + static final _id_usingProxy = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"usingProxy", r"()Z"); + + /// from: public abstract boolean usingProxy() + bool usingProxy() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_usingProxy, jni.JniCallType.booleanType, []).boolean; + } + + static final _id_getPermission = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getPermission", r"()Ljava/security/Permission;"); + + /// from: public java.security.Permission getPermission() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JObject getPermission() { + return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getPermission, jni.JniCallType.objectType, []).object); + } + + static final _id_getErrorStream = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getErrorStream", r"()Ljava/io/InputStream;"); + + /// from: public java.io.InputStream getErrorStream() + /// The returned object must be deleted after use, by calling the `delete` method. + inputstream_.InputStream getErrorStream() { + return const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_getErrorStream, + jni.JniCallType.objectType, []).object); + } +} + +class $HttpURLConnectionType extends jni.JObjType { + const $HttpURLConnectionType(); + + @override + String get signature => r"Ljava/net/HttpURLConnection;"; + + @override + HttpURLConnection fromRef(jni.JObjectPtr ref) => + HttpURLConnection.fromRef(ref); + + @override + jni.JObjType get superType => const urlconnection_.$URLConnectionType(); + + @override + final superCount = 2; + + @override + int get hashCode => ($HttpURLConnectionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($HttpURLConnectionType) && + other is $HttpURLConnectionType; + } +} diff --git a/pkgs/java_http/lib/src/third_party/java/net/URL.dart b/pkgs/java_http/lib/src/third_party/java/net/URL.dart index 8c420875f4..3c6e5e6ba6 100644 --- a/pkgs/java_http/lib/src/third_party/java/net/URL.dart +++ b/pkgs/java_http/lib/src/third_party/java/net/URL.dart @@ -19,6 +19,10 @@ import "dart:ffi" as ffi; import "package:jni/internal_helpers_for_jnigen.dart"; import "package:jni/jni.dart" as jni; +import "URLConnection.dart" as urlconnection_; + +import "../io/InputStream.dart" as inputstream_; + /// from: java.net.URL class URL extends jni.JObject { @override @@ -299,9 +303,10 @@ class URL extends jni.JObject { /// from: public java.net.URLConnection openConnection() /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject openConnection() { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_openConnection, jni.JniCallType.objectType, []).object); + urlconnection_.URLConnection openConnection() { + return const urlconnection_.$URLConnectionType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_openConnection, + jni.JniCallType.objectType, []).object); } static final _id_openConnection1 = jni.Jni.accessors.getMethodIDOf( @@ -311,14 +316,12 @@ class URL extends jni.JObject { /// from: public java.net.URLConnection openConnection(java.net.Proxy proxy) /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject openConnection1( + urlconnection_.URLConnection openConnection1( jni.JObject proxy, ) { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_openConnection1, - jni.JniCallType.objectType, - [proxy.reference]).object); + return const urlconnection_.$URLConnectionType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_openConnection1, + jni.JniCallType.objectType, [proxy.reference]).object); } static final _id_openStream = jni.Jni.accessors.getMethodIDOf( @@ -326,9 +329,10 @@ class URL extends jni.JObject { /// from: public final java.io.InputStream openStream() /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject openStream() { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_openStream, jni.JniCallType.objectType, []).object); + inputstream_.InputStream openStream() { + return const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors + .callMethodWithArgs( + reference, _id_openStream, jni.JniCallType.objectType, []).object); } static final _id_getContent = jni.Jni.accessors diff --git a/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart b/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart new file mode 100644 index 0000000000..28c3f4697a --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart @@ -0,0 +1,833 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: file_names +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_shown_name + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +import "URL.dart" as url_; + +import "../io/InputStream.dart" as inputstream_; + +/// from: java.net.URLConnection +class URLConnection extends jni.JObject { + @override + late final jni.JObjType $type = type; + + URLConnection.fromRef( + jni.JObjectPtr ref, + ) : super.fromRef(ref); + + static final _class = jni.Jni.findJClass(r"java/net/URLConnection"); + + /// The type which includes information such as the signature of this class. + static const type = $URLConnectionType(); + static final _id_url = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"url", + r"Ljava/net/URL;", + ); + + /// from: protected java.net.URL url + /// The returned object must be deleted after use, by calling the `delete` method. + url_.URL get url => const url_.$URLType().fromRef(jni.Jni.accessors + .getField(reference, _id_url, jni.JniCallType.objectType) + .object); + + /// from: protected java.net.URL url + /// The returned object must be deleted after use, by calling the `delete` method. + set url(url_.URL value) => + jni.Jni.env.SetObjectField(reference, _id_url, value.reference); + + static final _id_doInput = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"doInput", + r"Z", + ); + + /// from: protected boolean doInput + bool get doInput => jni.Jni.accessors + .getField(reference, _id_doInput, jni.JniCallType.booleanType) + .boolean; + + /// from: protected boolean doInput + set doInput(bool value) => + jni.Jni.env.SetBooleanField(reference, _id_doInput, value ? 1 : 0); + + static final _id_doOutput = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"doOutput", + r"Z", + ); + + /// from: protected boolean doOutput + bool get doOutput => jni.Jni.accessors + .getField(reference, _id_doOutput, jni.JniCallType.booleanType) + .boolean; + + /// from: protected boolean doOutput + set doOutput(bool value) => + jni.Jni.env.SetBooleanField(reference, _id_doOutput, value ? 1 : 0); + + static final _id_allowUserInteraction = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"allowUserInteraction", + r"Z", + ); + + /// from: protected boolean allowUserInteraction + bool get allowUserInteraction => jni.Jni.accessors + .getField( + reference, _id_allowUserInteraction, jni.JniCallType.booleanType) + .boolean; + + /// from: protected boolean allowUserInteraction + set allowUserInteraction(bool value) => jni.Jni.env + .SetBooleanField(reference, _id_allowUserInteraction, value ? 1 : 0); + + static final _id_useCaches = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"useCaches", + r"Z", + ); + + /// from: protected boolean useCaches + bool get useCaches => jni.Jni.accessors + .getField(reference, _id_useCaches, jni.JniCallType.booleanType) + .boolean; + + /// from: protected boolean useCaches + set useCaches(bool value) => + jni.Jni.env.SetBooleanField(reference, _id_useCaches, value ? 1 : 0); + + static final _id_ifModifiedSince = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"ifModifiedSince", + r"J", + ); + + /// from: protected long ifModifiedSince + int get ifModifiedSince => jni.Jni.accessors + .getField(reference, _id_ifModifiedSince, jni.JniCallType.longType) + .long; + + /// from: protected long ifModifiedSince + set ifModifiedSince(int value) => + jni.Jni.env.SetLongField(reference, _id_ifModifiedSince, value); + + static final _id_connected = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"connected", + r"Z", + ); + + /// from: protected boolean connected + bool get connected => jni.Jni.accessors + .getField(reference, _id_connected, jni.JniCallType.booleanType) + .boolean; + + /// from: protected boolean connected + set connected(bool value) => + jni.Jni.env.SetBooleanField(reference, _id_connected, value ? 1 : 0); + + static final _id_getFileNameMap = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"getFileNameMap", r"()Ljava/net/FileNameMap;"); + + /// from: static public java.net.FileNameMap getFileNameMap() + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JObject getFileNameMap() { + return const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_getFileNameMap, + jni.JniCallType.objectType, []).object); + } + + static final _id_setFileNameMap = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"setFileNameMap", r"(Ljava/net/FileNameMap;)V"); + + /// from: static public void setFileNameMap(java.net.FileNameMap fileNameMap) + static void setFileNameMap( + jni.JObject fileNameMap, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_setFileNameMap, + jni.JniCallType.voidType, + [fileNameMap.reference]).check(); + } + + static final _id_connect = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"connect", r"()V"); + + /// from: public abstract void connect() + void connect() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_connect, jni.JniCallType.voidType, []).check(); + } + + static final _id_setConnectTimeout = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"setConnectTimeout", r"(I)V"); + + /// from: public void setConnectTimeout(int i) + void setConnectTimeout( + int i, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_setConnectTimeout, + jni.JniCallType.voidType, + [jni.JValueInt(i)]).check(); + } + + static final _id_getConnectTimeout = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getConnectTimeout", r"()I"); + + /// from: public int getConnectTimeout() + int getConnectTimeout() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getConnectTimeout, jni.JniCallType.intType, []).integer; + } + + static final _id_setReadTimeout = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"setReadTimeout", r"(I)V"); + + /// from: public void setReadTimeout(int i) + void setReadTimeout( + int i, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_setReadTimeout, + jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); + } + + static final _id_getReadTimeout = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getReadTimeout", r"()I"); + + /// from: public int getReadTimeout() + int getReadTimeout() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getReadTimeout, jni.JniCallType.intType, []).integer; + } + + static final _id_ctor = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"", r"(Ljava/net/URL;)V"); + + /// from: protected void (java.net.URL uRL) + /// The returned object must be deleted after use, by calling the `delete` method. + factory URLConnection( + url_.URL uRL, + ) { + return URLConnection.fromRef(jni.Jni.accessors + .newObjectWithArgs(_class.reference, _id_ctor, [uRL.reference]).object); + } + + static final _id_getURL = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getURL", r"()Ljava/net/URL;"); + + /// from: public java.net.URL getURL() + /// The returned object must be deleted after use, by calling the `delete` method. + url_.URL getURL() { + return const url_.$URLType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getURL, jni.JniCallType.objectType, []).object); + } + + static final _id_getContentLength = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getContentLength", r"()I"); + + /// from: public int getContentLength() + int getContentLength() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getContentLength, jni.JniCallType.intType, []).integer; + } + + static final _id_getContentLengthLong = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getContentLengthLong", r"()J"); + + /// from: public long getContentLengthLong() + int getContentLengthLong() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getContentLengthLong, jni.JniCallType.longType, []).long; + } + + static final _id_getContentType = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getContentType", r"()Ljava/lang/String;"); + + /// from: public java.lang.String getContentType() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getContentType() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getContentType, jni.JniCallType.objectType, []).object); + } + + static final _id_getContentEncoding = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getContentEncoding", r"()Ljava/lang/String;"); + + /// from: public java.lang.String getContentEncoding() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getContentEncoding() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getContentEncoding, + jni.JniCallType.objectType, []).object); + } + + static final _id_getExpiration = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getExpiration", r"()J"); + + /// from: public long getExpiration() + int getExpiration() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getExpiration, jni.JniCallType.longType, []).long; + } + + static final _id_getDate = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"getDate", r"()J"); + + /// from: public long getDate() + int getDate() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getDate, jni.JniCallType.longType, []).long; + } + + static final _id_getLastModified = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getLastModified", r"()J"); + + /// from: public long getLastModified() + int getLastModified() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getLastModified, jni.JniCallType.longType, []).long; + } + + static final _id_getHeaderField = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r"getHeaderField", + r"(Ljava/lang/String;)Ljava/lang/String;"); + + /// from: public java.lang.String getHeaderField(java.lang.String string) + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getHeaderField( + jni.JString string, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getHeaderField, + jni.JniCallType.objectType, + [string.reference]).object); + } + + static final _id_getHeaderFields = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getHeaderFields", r"()Ljava/util/Map;"); + + /// from: public java.util.Map getHeaderFields() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JMap> getHeaderFields() { + return const jni.JMapType( + jni.JStringType(), jni.JListType(jni.JStringType())) + .fromRef(jni.Jni.accessors.callMethodWithArgs(reference, + _id_getHeaderFields, jni.JniCallType.objectType, []).object); + } + + static final _id_getHeaderFieldInt = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getHeaderFieldInt", r"(Ljava/lang/String;I)I"); + + /// from: public int getHeaderFieldInt(java.lang.String string, int i) + int getHeaderFieldInt( + jni.JString string, + int i, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getHeaderFieldInt, + jni.JniCallType.intType, + [string.reference, jni.JValueInt(i)]).integer; + } + + static final _id_getHeaderFieldLong = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getHeaderFieldLong", r"(Ljava/lang/String;J)J"); + + /// from: public long getHeaderFieldLong(java.lang.String string, long j) + int getHeaderFieldLong( + jni.JString string, + int j, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getHeaderFieldLong, + jni.JniCallType.longType, + [string.reference, j]).long; + } + + static final _id_getHeaderFieldDate = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getHeaderFieldDate", r"(Ljava/lang/String;J)J"); + + /// from: public long getHeaderFieldDate(java.lang.String string, long j) + int getHeaderFieldDate( + jni.JString string, + int j, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getHeaderFieldDate, + jni.JniCallType.longType, + [string.reference, j]).long; + } + + static final _id_getHeaderFieldKey = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getHeaderFieldKey", r"(I)Ljava/lang/String;"); + + /// from: public java.lang.String getHeaderFieldKey(int i) + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getHeaderFieldKey( + int i, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getHeaderFieldKey, + jni.JniCallType.objectType, + [jni.JValueInt(i)]).object); + } + + static final _id_getHeaderField1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getHeaderField", r"(I)Ljava/lang/String;"); + + /// from: public java.lang.String getHeaderField(int i) + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getHeaderField1( + int i, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getHeaderField1, + jni.JniCallType.objectType, + [jni.JValueInt(i)]).object); + } + + static final _id_getContent = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getContent", r"()Ljava/lang/Object;"); + + /// from: public java.lang.Object getContent() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JObject getContent() { + return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getContent, jni.JniCallType.objectType, []).object); + } + + static final _id_getContent1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r"getContent", + r"([Ljava/lang/Class;)Ljava/lang/Object;"); + + /// from: public java.lang.Object getContent(java.lang.Object[] classs) + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JObject getContent1( + jni.JArray classs, + ) { + return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getContent1, + jni.JniCallType.objectType, + [classs.reference]).object); + } + + static final _id_getPermission = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getPermission", r"()Ljava/security/Permission;"); + + /// from: public java.security.Permission getPermission() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JObject getPermission() { + return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getPermission, jni.JniCallType.objectType, []).object); + } + + static final _id_getInputStream = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getInputStream", r"()Ljava/io/InputStream;"); + + /// from: public java.io.InputStream getInputStream() + /// The returned object must be deleted after use, by calling the `delete` method. + inputstream_.InputStream getInputStream() { + return const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_getInputStream, + jni.JniCallType.objectType, []).object); + } + + static final _id_getOutputStream = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getOutputStream", r"()Ljava/io/OutputStream;"); + + /// from: public java.io.OutputStream getOutputStream() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JObject getOutputStream() { + return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getOutputStream, jni.JniCallType.objectType, []).object); + } + + static final _id_toString1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"toString", r"()Ljava/lang/String;"); + + /// from: public java.lang.String toString() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString toString1() { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_toString1, jni.JniCallType.objectType, []).object); + } + + static final _id_setDoInput = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"setDoInput", r"(Z)V"); + + /// from: public void setDoInput(boolean z) + void setDoInput( + bool z, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_setDoInput, + jni.JniCallType.voidType, [z ? 1 : 0]).check(); + } + + static final _id_getDoInput = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"getDoInput", r"()Z"); + + /// from: public boolean getDoInput() + bool getDoInput() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getDoInput, jni.JniCallType.booleanType, []).boolean; + } + + static final _id_setDoOutput = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"setDoOutput", r"(Z)V"); + + /// from: public void setDoOutput(boolean z) + void setDoOutput( + bool z, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_setDoOutput, + jni.JniCallType.voidType, [z ? 1 : 0]).check(); + } + + static final _id_getDoOutput = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"getDoOutput", r"()Z"); + + /// from: public boolean getDoOutput() + bool getDoOutput() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getDoOutput, jni.JniCallType.booleanType, []).boolean; + } + + static final _id_setAllowUserInteraction = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"setAllowUserInteraction", r"(Z)V"); + + /// from: public void setAllowUserInteraction(boolean z) + void setAllowUserInteraction( + bool z, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_setAllowUserInteraction, + jni.JniCallType.voidType, + [z ? 1 : 0]).check(); + } + + static final _id_getAllowUserInteraction = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getAllowUserInteraction", r"()Z"); + + /// from: public boolean getAllowUserInteraction() + bool getAllowUserInteraction() { + return jni.Jni.accessors.callMethodWithArgs(reference, + _id_getAllowUserInteraction, jni.JniCallType.booleanType, []).boolean; + } + + static final _id_setDefaultAllowUserInteraction = jni.Jni.accessors + .getStaticMethodIDOf( + _class.reference, r"setDefaultAllowUserInteraction", r"(Z)V"); + + /// from: static public void setDefaultAllowUserInteraction(boolean z) + static void setDefaultAllowUserInteraction( + bool z, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_setDefaultAllowUserInteraction, + jni.JniCallType.voidType, + [z ? 1 : 0]).check(); + } + + static final _id_getDefaultAllowUserInteraction = jni.Jni.accessors + .getStaticMethodIDOf( + _class.reference, r"getDefaultAllowUserInteraction", r"()Z"); + + /// from: static public boolean getDefaultAllowUserInteraction() + static bool getDefaultAllowUserInteraction() { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_getDefaultAllowUserInteraction, + jni.JniCallType.booleanType, []).boolean; + } + + static final _id_setUseCaches = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"setUseCaches", r"(Z)V"); + + /// from: public void setUseCaches(boolean z) + void setUseCaches( + bool z, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_setUseCaches, + jni.JniCallType.voidType, [z ? 1 : 0]).check(); + } + + static final _id_getUseCaches = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getUseCaches", r"()Z"); + + /// from: public boolean getUseCaches() + bool getUseCaches() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getUseCaches, jni.JniCallType.booleanType, []).boolean; + } + + static final _id_setIfModifiedSince = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"setIfModifiedSince", r"(J)V"); + + /// from: public void setIfModifiedSince(long j) + void setIfModifiedSince( + int j, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, + _id_setIfModifiedSince, jni.JniCallType.voidType, [j]).check(); + } + + static final _id_getIfModifiedSince = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getIfModifiedSince", r"()J"); + + /// from: public long getIfModifiedSince() + int getIfModifiedSince() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_getIfModifiedSince, jni.JniCallType.longType, []).long; + } + + static final _id_getDefaultUseCaches = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"getDefaultUseCaches", r"()Z"); + + /// from: public boolean getDefaultUseCaches() + bool getDefaultUseCaches() { + return jni.Jni.accessors.callMethodWithArgs(reference, + _id_getDefaultUseCaches, jni.JniCallType.booleanType, []).boolean; + } + + static final _id_setDefaultUseCaches = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"setDefaultUseCaches", r"(Z)V"); + + /// from: public void setDefaultUseCaches(boolean z) + void setDefaultUseCaches( + bool z, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, + _id_setDefaultUseCaches, jni.JniCallType.voidType, [z ? 1 : 0]).check(); + } + + static final _id_setDefaultUseCaches1 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"setDefaultUseCaches", r"(Ljava/lang/String;Z)V"); + + /// from: static public void setDefaultUseCaches(java.lang.String string, boolean z) + static void setDefaultUseCaches1( + jni.JString string, + bool z, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_setDefaultUseCaches1, + jni.JniCallType.voidType, + [string.reference, z ? 1 : 0]).check(); + } + + static final _id_getDefaultUseCaches1 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"getDefaultUseCaches", r"(Ljava/lang/String;)Z"); + + /// from: static public boolean getDefaultUseCaches(java.lang.String string) + static bool getDefaultUseCaches1( + jni.JString string, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_getDefaultUseCaches1, + jni.JniCallType.booleanType, + [string.reference]).boolean; + } + + static final _id_setRequestProperty = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r"setRequestProperty", + r"(Ljava/lang/String;Ljava/lang/String;)V"); + + /// from: public void setRequestProperty(java.lang.String string, java.lang.String string1) + void setRequestProperty( + jni.JString string, + jni.JString string1, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_setRequestProperty, + jni.JniCallType.voidType, + [string.reference, string1.reference]).check(); + } + + static final _id_addRequestProperty = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r"addRequestProperty", + r"(Ljava/lang/String;Ljava/lang/String;)V"); + + /// from: public void addRequestProperty(java.lang.String string, java.lang.String string1) + void addRequestProperty( + jni.JString string, + jni.JString string1, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_addRequestProperty, + jni.JniCallType.voidType, + [string.reference, string1.reference]).check(); + } + + static final _id_getRequestProperty = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r"getRequestProperty", + r"(Ljava/lang/String;)Ljava/lang/String;"); + + /// from: public java.lang.String getRequestProperty(java.lang.String string) + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JString getRequestProperty( + jni.JString string, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getRequestProperty, + jni.JniCallType.objectType, + [string.reference]).object); + } + + static final _id_getRequestProperties = jni.Jni.accessors.getMethodIDOf( + _class.reference, r"getRequestProperties", r"()Ljava/util/Map;"); + + /// from: public java.util.Map getRequestProperties() + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JMap> getRequestProperties() { + return const jni.JMapType( + jni.JStringType(), jni.JListType(jni.JStringType())) + .fromRef(jni.Jni.accessors.callMethodWithArgs(reference, + _id_getRequestProperties, jni.JniCallType.objectType, []).object); + } + + static final _id_setDefaultRequestProperty = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"setDefaultRequestProperty", + r"(Ljava/lang/String;Ljava/lang/String;)V"); + + /// from: static public void setDefaultRequestProperty(java.lang.String string, java.lang.String string1) + static void setDefaultRequestProperty( + jni.JString string, + jni.JString string1, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_setDefaultRequestProperty, + jni.JniCallType.voidType, + [string.reference, string1.reference]).check(); + } + + static final _id_getDefaultRequestProperty = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"getDefaultRequestProperty", + r"(Ljava/lang/String;)Ljava/lang/String;"); + + /// from: static public java.lang.String getDefaultRequestProperty(java.lang.String string) + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JString getDefaultRequestProperty( + jni.JString string, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_getDefaultRequestProperty, + jni.JniCallType.objectType, + [string.reference]).object); + } + + static final _id_setContentHandlerFactory = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"setContentHandlerFactory", + r"(Ljava/net/ContentHandlerFactory;)V"); + + /// from: static public void setContentHandlerFactory(java.net.ContentHandlerFactory contentHandlerFactory) + static void setContentHandlerFactory( + jni.JObject contentHandlerFactory, + ) { + return jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_setContentHandlerFactory, + jni.JniCallType.voidType, + [contentHandlerFactory.reference]).check(); + } + + static final _id_guessContentTypeFromName = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"guessContentTypeFromName", + r"(Ljava/lang/String;)Ljava/lang/String;"); + + /// from: static public java.lang.String guessContentTypeFromName(java.lang.String string) + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JString guessContentTypeFromName( + jni.JString string, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_guessContentTypeFromName, + jni.JniCallType.objectType, + [string.reference]).object); + } + + static final _id_guessContentTypeFromStream = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r"guessContentTypeFromStream", + r"(Ljava/io/InputStream;)Ljava/lang/String;"); + + /// from: static public java.lang.String guessContentTypeFromStream(java.io.InputStream inputStream) + /// The returned object must be deleted after use, by calling the `delete` method. + static jni.JString guessContentTypeFromStream( + inputstream_.InputStream inputStream, + ) { + return const jni.JStringType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_guessContentTypeFromStream, + jni.JniCallType.objectType, + [inputStream.reference]).object); + } +} + +class $URLConnectionType extends jni.JObjType { + const $URLConnectionType(); + + @override + String get signature => r"Ljava/net/URLConnection;"; + + @override + URLConnection fromRef(jni.JObjectPtr ref) => URLConnection.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($URLConnectionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($URLConnectionType) && + other is $URLConnectionType; + } +} diff --git a/pkgs/java_http/lib/src/third_party/java/net/_package.dart b/pkgs/java_http/lib/src/third_party/java/net/_package.dart index 4cfea9a1d2..f52baa0ff1 100644 --- a/pkgs/java_http/lib/src/third_party/java/net/_package.dart +++ b/pkgs/java_http/lib/src/third_party/java/net/_package.dart @@ -1 +1,3 @@ +export "HttpURLConnection.dart"; export "URL.dart"; +export "URLConnection.dart"; diff --git a/pkgs/java_http/test/java_client_test.dart b/pkgs/java_http/test/java_client_test.dart index f3afbb07c0..0f48c0b7b7 100644 --- a/pkgs/java_http/test/java_client_test.dart +++ b/pkgs/java_http/test/java_client_test.dart @@ -9,5 +9,8 @@ import 'package:test/test.dart'; void main() { group('java_http client conformance tests', () { testResponseBody(JavaClient(), canStreamResponseBody: false); + testResponseHeaders(JavaClient()); + testRequestHeaders(JavaClient()); + testMultipleClients(JavaClient.new); }); } From abc3e30485e2c06a5e0afd99494d809cdff0ac56 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 21 Jul 2023 16:31:41 -0700 Subject: [PATCH 250/448] Harmonize response header behavior (#993) --- pkgs/cronet_http/CHANGELOG.md | 1 + pkgs/cronet_http/lib/src/cronet_client.dart | 18 +++- pkgs/cronet_http/pubspec.yaml | 2 +- pkgs/cupertino_http/CHANGELOG.md | 1 + .../lib/src/cupertino_client.dart | 16 +++- pkgs/http/CHANGELOG.md | 6 ++ pkgs/http/lib/src/browser_client.dart | 10 +++ pkgs/http/lib/src/io_client.dart | 5 +- pkgs/http/pubspec.yaml | 2 +- .../lib/src/response_headers_server.dart | 21 +++-- .../lib/src/response_headers_tests.dart | 87 +++++++++++++++++-- pkgs/java_http/lib/src/java_client.dart | 39 +++++---- 12 files changed, 168 insertions(+), 40 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 8126700d45..fe0c35faca 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.2.2 * Require Dart 3.0 +* Throw `ClientException` when the `'Content-Length'` header is invalid. ## 0.2.1 diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index 8799d43166..3e4007eb27 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -21,6 +21,7 @@ import 'package:http/http.dart'; import 'messages.dart' as messages; final _api = messages.HttpApi(); +final _digitRegex = RegExp(r'^\d+$'); final Finalizer _cronetEngineFinalizer = Finalizer(_api.freeEngine); @@ -266,11 +267,20 @@ class CronetClient extends BaseClient { .cast>() .map((key, value) => MapEntry(key.toLowerCase(), value.join(','))); - final contentLengthHeader = responseHeaders['content-length']; + int? contentLength; + switch (responseHeaders['content-length']) { + case final contentLengthHeader? + when !_digitRegex.hasMatch(contentLengthHeader): + throw ClientException( + 'Invalid content-length header [$contentLengthHeader].', + request.url, + ); + case final contentLengthHeader?: + contentLength = int.parse(contentLengthHeader); + } + return StreamedResponse(responseDataController.stream, result.statusCode, - contentLength: contentLengthHeader == null - ? null - : int.tryParse(contentLengthHeader), + contentLength: contentLength, reasonPhrase: result.statusText, request: request, isRedirect: result.isRedirect, diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index e90c9b0c90..f1517a6957 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.2.1 +version: 0.2.2 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index de027abfb7..8f5ed3d145 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -8,6 +8,7 @@ any `List`. * Disable additional analyses for generated Objective-C bindings to prevent errors from `dart analyze`. +* Throw `ClientException` when the `'Content-Length'` header is invalid. ## 1.0.1 diff --git a/pkgs/cupertino_http/lib/src/cupertino_client.dart b/pkgs/cupertino_http/lib/src/cupertino_client.dart index a716b49418..a4c7715de5 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_client.dart @@ -15,6 +15,8 @@ import 'package:http/http.dart'; import 'cupertino_api.dart'; +final _digitRegex = RegExp(r'^\d+$'); + class _TaskTracker { final responseCompleter = Completer(); final BaseRequest request; @@ -279,6 +281,17 @@ class CupertinoClient extends BaseClient { throw ClientException('Redirect limit exceeded', request.url); } + final responseHeaders = response.allHeaderFields + .map((key, value) => MapEntry(key.toLowerCase(), value)); + + if (responseHeaders['content-length'] case final contentLengthHeader? + when !_digitRegex.hasMatch(contentLengthHeader)) { + throw ClientException( + 'Invalid content-length header [$contentLengthHeader].', + request.url, + ); + } + return StreamedResponse( taskTracker.responseController.stream, response.statusCode, @@ -288,8 +301,7 @@ class CupertinoClient extends BaseClient { reasonPhrase: _findReasonPhrase(response.statusCode), request: request, isRedirect: !request.followRedirects && taskTracker.numRedirects > 0, - headers: response.allHeaderFields - .map((key, value) => MapEntry(key.toLowerCase(), value)), + headers: responseHeaders, ); } } diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 86f9805011..6d39b104df 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.1.1 + +* `BrowserClient` throws `ClientException` when the `'Content-Length'` header + is invalid. +* `IOClient` trims trailing whitespace on header values. + ## 1.1.0 * Add better error messages for `SocketException`s when using `IOClient`. diff --git a/pkgs/http/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart index ddaa43feae..9345be0ce1 100644 --- a/pkgs/http/lib/src/browser_client.dart +++ b/pkgs/http/lib/src/browser_client.dart @@ -12,6 +12,8 @@ import 'byte_stream.dart'; import 'exception.dart'; import 'streamed_response.dart'; +final _digitRegex = RegExp(r'^\d+$'); + /// Create a [BrowserClient]. /// /// Used from conditional imports, matches the definition in `client_stub.dart`. @@ -64,6 +66,14 @@ class BrowserClient extends BaseClient { var completer = Completer(); unawaited(xhr.onLoad.first.then((_) { + if (xhr.responseHeaders['content-length'] case final contentLengthHeader? + when !_digitRegex.hasMatch(contentLengthHeader)) { + completer.completeError(ClientException( + 'Invalid content-length header [$contentLengthHeader].', + request.url, + )); + return; + } var body = (xhr.response as ByteBuffer).asUint8List(); completer.complete(StreamedResponse( ByteStream.fromBytes(body), xhr.status!, diff --git a/pkgs/http/lib/src/io_client.dart b/pkgs/http/lib/src/io_client.dart index 88d44113e8..247cc8cad6 100644 --- a/pkgs/http/lib/src/io_client.dart +++ b/pkgs/http/lib/src/io_client.dart @@ -98,7 +98,10 @@ class IOClient extends BaseClient { var headers = {}; response.headers.forEach((key, values) { - headers[key] = values.join(','); + // TODO: Remove trimRight() when + // https://github.com/dart-lang/sdk/issues/53005 is resolved and the + // package:http SDK constraint requires that version or later. + headers[key] = values.map((value) => value.trimRight()).join(','); }); return IOStreamedResponse( diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 990ca6ad37..ec23e2d608 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.1.0 +version: 1.1.1-wip description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_server.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_server.dart index 3f2d4d3f0f..54431edd74 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_headers_server.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_server.dart @@ -22,14 +22,21 @@ void hybridMain(StreamChannel channel) async { server = (await HttpServer.bind('localhost', 0)) ..listen((request) async { - request.response.headers.set('Access-Control-Allow-Origin', '*'); - request.response.headers.set('Access-Control-Expose-Headers', '*'); + await request.drain(); + final socket = await request.response.detachSocket(writeHeaders: false); - (await clientQueue.next as Map).forEach((key, value) => request - .response.headers - .set(key as String, value as String, preserveHeaderCase: true)); - - await request.response.close(); + final headers = (await clientQueue.next) as String; + socket + ..writeAll([ + 'HTTP/1.1 200 OK', + 'Access-Control-Allow-Origin: *', + 'Access-Control-Expose-Headers: *', + 'Content-Type: text/plain', + '', // Add \r\n at the end of this header section. + ], '\r\n') + ..write(headers) + ..write('Connection: Closed\r\n\r\n'); + await socket.close(); unawaited(server.close()); }); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart index 9b2c262c3d..012fa63943 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart @@ -24,14 +24,23 @@ void testResponseHeaders(Client client) async { }); test('single header', () async { - httpServerChannel.sink.add({'foo': 'bar'}); + httpServerChannel.sink.add('foo: bar\r\n'); final response = await client.get(Uri.http(host, '')); expect(response.headers['foo'], 'bar'); }); - test('UPPERCASE header', () async { - httpServerChannel.sink.add({'foo': 'BAR'}); + test('UPPERCASE header value', () async { + httpServerChannel.sink.add('foo: BAR\r\n'); + + final response = await client.get(Uri.http(host, '')); + // RFC 2616 14.44 states that header field names are case-insensitive. + // http.Client canonicalizes field names into lower case. + expect(response.headers['foo'], 'BAR'); + }); + + test('space surrounding header value', () async { + httpServerChannel.sink.add('foo: \t BAR \t \r\n'); final response = await client.get(Uri.http(host, '')); // RFC 2616 14.44 states that header field names are case-insensitive. @@ -41,7 +50,7 @@ void testResponseHeaders(Client client) async { test('multiple headers', () async { httpServerChannel.sink - .add({'field1': 'value1', 'field2': 'value2', 'field3': 'value3'}); + .add('field1: value1\r\n' 'field2: value2\r\n' 'field3: value3\r\n'); final response = await client.get(Uri.http(host, '')); expect(response.headers['field1'], 'value1'); @@ -50,10 +59,76 @@ void testResponseHeaders(Client client) async { }); test('multiple values per header', () async { - httpServerChannel.sink.add({'list': 'apple, orange, banana'}); + // RFC-2616 4.2 says: + // "The field value MAY be preceded by any amount of LWS, though a single + // SP is preferred." and + // "The field-content does not include any leading or trailing LWS ..." + httpServerChannel.sink.add('list: apple, orange, banana\r\n'); final response = await client.get(Uri.http(host, '')); - expect(response.headers['list'], 'apple, orange, banana'); + expect(response.headers['list'], + matches(r'apple[ \t]*,[ \t]*orange[ \t]*,[ \t]*banana')); + }); + + test('multiple values per header surrounded with spaces', () async { + httpServerChannel.sink + .add('list: \t apple \t, \t orange \t , \t banana\t \t \r\n'); + + final response = await client.get(Uri.http(host, '')); + expect(response.headers['list'], + matches(r'apple[ \t]*,[ \t]*orange[ \t]*,[ \t]*banana')); + }); + + test('multiple headers with the same name', () async { + httpServerChannel.sink.add('list: apple\r\n' + 'list: orange\r\n' + 'list: banana\r\n'); + + final response = await client.get(Uri.http(host, '')); + expect(response.headers['list'], + matches(r'apple[ \t]*,[ \t]*orange[ \t]*,[ \t]*banana')); + }); + + test('multiple headers with the same name but different cases', () async { + httpServerChannel.sink.add('list: apple\r\n' + 'LIST: orange\r\n' + 'List: banana\r\n'); + + final response = await client.get(Uri.http(host, '')); + expect(response.headers['list'], + matches(r'apple[ \t]*,[ \t]*orange[ \t]*,[ \t]*banana')); + }); + + group('content length', () { + test('surrounded in spaces', () async { + // RFC-2616 4.2 says: + // "The field value MAY be preceded by any amount of LWS, though a + // single SP is preferred." and + // "The field-content does not include any leading or trailing LWS ..." + httpServerChannel.sink.add('content-length: \t 0 \t \r\n'); + final response = await client.get(Uri.http(host, '')); + expect(response.contentLength, 0); + }, + skip: 'Enable after https://github.com/dart-lang/sdk/issues/51532 ' + 'is fixed'); + + test('non-integer', () async { + httpServerChannel.sink.add('content-length: cat\r\n'); + await expectLater( + client.get(Uri.http(host, '')), throwsA(isA())); + }); + + test('negative', () async { + httpServerChannel.sink.add('content-length: -5\r\n'); + await expectLater( + client.get(Uri.http(host, '')), throwsA(isA())); + }); + + test('bigger than actual body', () async { + httpServerChannel.sink.add('content-length: 100\r\n'); + await expectLater( + client.get(Uri.http(host, '')), throwsA(isA())); + }); }); }); } diff --git a/pkgs/java_http/lib/src/java_client.dart b/pkgs/java_http/lib/src/java_client.dart index 283fce5ff1..f652084507 100644 --- a/pkgs/java_http/lib/src/java_client.dart +++ b/pkgs/java_http/lib/src/java_client.dart @@ -14,6 +14,8 @@ import 'third_party/java/lang/System.dart'; import 'third_party/java/net/HttpURLConnection.dart'; import 'third_party/java/net/URL.dart'; +final _digitRegex = RegExp(r'^\d+$'); + // TODO: Add a description of the implementation. // Look at the description of cronet_client.dart and cupertino_client.dart for // examples. @@ -69,7 +71,8 @@ class JavaClient extends BaseClient { }); return StreamedResponse(Stream.value(responseBody), statusCode, - contentLength: _contentLengthHeader(request, responseHeaders), + contentLength: + _contentLengthHeader(request, responseHeaders, responseBody.length), request: request, headers: responseHeaders, reasonPhrase: reasonPhrase); @@ -112,28 +115,28 @@ class JavaClient extends BaseClient { if (headerName.isNull) continue; headers - .putIfAbsent(headerName.toDartString(), () => []) + .putIfAbsent(headerName.toDartString().toLowerCase(), () => []) .add(headerValue.toDartString()); } - return headers - .map((key, value) => MapEntry(key.toLowerCase(), value.join(','))); + return headers.map((key, value) => MapEntry(key, value.join(','))); } - int? _contentLengthHeader(BaseRequest request, Map headers) { - final contentLengthHeader = headers['content-length']; - - // Return null if the content length header is not set. - if (contentLengthHeader == null) return null; - - // Throw ClientException if the content length header is not an integer. - final contentLength = int.tryParse(contentLengthHeader); - if (contentLength == null) { - throw ClientException( - 'Invalid content-length header: $contentLengthHeader. ' - 'Content-length must be a non-negative integer.', - request.url, - ); + int? _contentLengthHeader( + BaseRequest request, Map headers, int bodyLength) { + int? contentLength; + switch (headers['content-length']) { + case final contentLengthHeader? + when !_digitRegex.hasMatch(contentLengthHeader): + throw ClientException( + 'Invalid content-length header [$contentLengthHeader].', + request.url, + ); + case final contentLengthHeader?: + contentLength = int.parse(contentLengthHeader); + if (bodyLength < contentLength) { + throw ClientException('Unexpected end of body', request.url); + } } return contentLength; From 0025c9867e6f6d814be44463d9f103f9622a9d24 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 27 Jul 2023 17:48:21 -0700 Subject: [PATCH 251/448] Ignore generated flutter plugin files (#996) These files both start with comments stating that they should not be edited by hand nor checked into source control. Add them to the `.gitignore`. --- pkgs/java_http/.gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/java_http/.gitignore b/pkgs/java_http/.gitignore index 567609b123..28e4a6c94b 100644 --- a/pkgs/java_http/.gitignore +++ b/pkgs/java_http/.gitignore @@ -1 +1,3 @@ build/ +.flutter-plugins +.flutter-plugins-dependencies From 86090d69f0cc69b2afe5736c1b4139443d277b27 Mon Sep 17 00:00:00 2001 From: Alex James Date: Mon, 31 Jul 2023 20:20:07 +0100 Subject: [PATCH 252/448] [java_http] send request body (#995) --- pkgs/java_http/jnigen.yaml | 1 + pkgs/java_http/lib/src/java_client.dart | 43 ++++-- .../src/third_party/java/io/InputStream.dart | 4 +- .../src/third_party/java/io/OutputStream.dart | 136 ++++++++++++++++++ .../lib/src/third_party/java/io/_package.dart | 1 + .../third_party/java/net/URLConnection.dart | 9 +- pkgs/java_http/test/java_client_test.dart | 2 + 7 files changed, 183 insertions(+), 13 deletions(-) create mode 100644 pkgs/java_http/lib/src/third_party/java/io/OutputStream.dart diff --git a/pkgs/java_http/jnigen.yaml b/pkgs/java_http/jnigen.yaml index 6f470e196d..2a8302685c 100644 --- a/pkgs/java_http/jnigen.yaml +++ b/pkgs/java_http/jnigen.yaml @@ -13,6 +13,7 @@ class_path: classes: - 'java.io.InputStream' + - 'java.io.OutputStream' - 'java.lang.System' - 'java.net.HttpURLConnection' - 'java.net.URL' diff --git a/pkgs/java_http/lib/src/java_client.dart b/pkgs/java_http/lib/src/java_client.dart index f652084507..51847a50f6 100644 --- a/pkgs/java_http/lib/src/java_client.dart +++ b/pkgs/java_http/lib/src/java_client.dart @@ -39,23 +39,29 @@ class JavaClient extends BaseClient { // See https://github.com/dart-lang/http/pull/980#discussion_r1253700470. _initJVM(); - final (statusCode, reasonPhrase, responseHeaders, responseBody) = - await Isolate.run(() { - request.finalize(); + // We can't send a StreamedRequest to another Isolate. + // But we can send Map, String, UInt8List, Uri. + final requestBody = await request.finalize().toBytes(); + final requestHeaders = request.headers; + final requestMethod = request.method; + final requestUrl = request.url; + final (statusCode, reasonPhrase, responseHeaders, responseBody) = + await Isolate.run(() async { final httpUrlConnection = URL - .ctor3(request.url.toString().toJString()) + .ctor3(requestUrl.toString().toJString()) .openConnection() .castTo(HttpURLConnection.type, deleteOriginal: true); - request.headers.forEach((headerName, headerValue) { + requestHeaders.forEach((headerName, headerValue) { httpUrlConnection.setRequestProperty( headerName.toJString(), headerValue.toJString()); }); - httpUrlConnection.setRequestMethod(request.method.toJString()); + httpUrlConnection.setRequestMethod(requestMethod.toJString()); + _setRequestBody(httpUrlConnection, requestBody); - final statusCode = _statusCode(request, httpUrlConnection); + final statusCode = _statusCode(requestUrl, httpUrlConnection); final reasonPhrase = _reasonPhrase(httpUrlConnection); final responseHeaders = _responseHeaders(httpUrlConnection); final responseBody = _responseBody(httpUrlConnection); @@ -78,12 +84,26 @@ class JavaClient extends BaseClient { reasonPhrase: reasonPhrase); } - int _statusCode(BaseRequest request, HttpURLConnection httpUrlConnection) { + void _setRequestBody( + HttpURLConnection httpUrlConnection, + Uint8List requestBody, + ) { + if (requestBody.isEmpty) return; + + httpUrlConnection.setDoOutput(true); + + httpUrlConnection.getOutputStream() + ..write1(requestBody.toJArray()) + ..flush() + ..close(); + } + + int _statusCode(Uri requestUrl, HttpURLConnection httpUrlConnection) { final statusCode = httpUrlConnection.getResponseCode(); if (statusCode == -1) { throw ClientException( - 'Status code can not be discerned from the response.', request.url); + 'Status code can not be discerned from the response.', requestUrl); } return statusCode; @@ -160,3 +180,8 @@ class JavaClient extends BaseClient { return Uint8List.fromList(bytes); } } + +extension on Uint8List { + JArray toJArray() => + JArray(jbyte.type, length)..setRange(0, length, this); +} diff --git a/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart b/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart index ec99ebc1a1..3b930d49cd 100644 --- a/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart +++ b/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart @@ -19,6 +19,8 @@ import "dart:ffi" as ffi; import "package:jni/internal_helpers_for_jnigen.dart"; import "package:jni/jni.dart" as jni; +import "OutputStream.dart" as outputstream_; + /// from: java.io.InputStream class InputStream extends jni.JObject { @override @@ -192,7 +194,7 @@ class InputStream extends jni.JObject { /// from: public long transferTo(java.io.OutputStream outputStream) int transferTo( - jni.JObject outputStream, + outputstream_.OutputStream outputStream, ) { return jni.Jni.accessors.callMethodWithArgs(reference, _id_transferTo, jni.JniCallType.longType, [outputStream.reference]).long; diff --git a/pkgs/java_http/lib/src/third_party/java/io/OutputStream.dart b/pkgs/java_http/lib/src/third_party/java/io/OutputStream.dart new file mode 100644 index 0000000000..ce4966c0aa --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/io/OutputStream.dart @@ -0,0 +1,136 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: file_names +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_shown_name + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +/// from: java.io.OutputStream +class OutputStream extends jni.JObject { + @override + late final jni.JObjType $type = type; + + OutputStream.fromRef( + jni.JObjectPtr ref, + ) : super.fromRef(ref); + + static final _class = jni.Jni.findJClass(r"java/io/OutputStream"); + + /// The type which includes information such as the signature of this class. + static const type = $OutputStreamType(); + static final _id_ctor = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"", r"()V"); + + /// from: public void () + /// The returned object must be deleted after use, by calling the `delete` method. + factory OutputStream() { + return OutputStream.fromRef(jni.Jni.accessors + .newObjectWithArgs(_class.reference, _id_ctor, []).object); + } + + static final _id_nullOutputStream = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r"nullOutputStream", r"()Ljava/io/OutputStream;"); + + /// from: static public java.io.OutputStream nullOutputStream() + /// The returned object must be deleted after use, by calling the `delete` method. + static OutputStream nullOutputStream() { + return const $OutputStreamType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_nullOutputStream, + jni.JniCallType.objectType, []).object); + } + + static final _id_write = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"write", r"(I)V"); + + /// from: public abstract void write(int i) + void write( + int i, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_write, + jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); + } + + static final _id_write1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"write", r"([B)V"); + + /// from: public void write(byte[] bs) + void write1( + jni.JArray bs, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_write1, + jni.JniCallType.voidType, [bs.reference]).check(); + } + + static final _id_write2 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"write", r"([BII)V"); + + /// from: public void write(byte[] bs, int i, int i1) + void write2( + jni.JArray bs, + int i, + int i1, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_write2, + jni.JniCallType.voidType, + [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).check(); + } + + static final _id_flush = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"flush", r"()V"); + + /// from: public void flush() + void flush() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_flush, jni.JniCallType.voidType, []).check(); + } + + static final _id_close = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"close", r"()V"); + + /// from: public void close() + void close() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_close, jni.JniCallType.voidType, []).check(); + } +} + +class $OutputStreamType extends jni.JObjType { + const $OutputStreamType(); + + @override + String get signature => r"Ljava/io/OutputStream;"; + + @override + OutputStream fromRef(jni.JObjectPtr ref) => OutputStream.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($OutputStreamType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($OutputStreamType) && + other is $OutputStreamType; + } +} diff --git a/pkgs/java_http/lib/src/third_party/java/io/_package.dart b/pkgs/java_http/lib/src/third_party/java/io/_package.dart index 19b2828809..ef72615333 100644 --- a/pkgs/java_http/lib/src/third_party/java/io/_package.dart +++ b/pkgs/java_http/lib/src/third_party/java/io/_package.dart @@ -1 +1,2 @@ export "InputStream.dart"; +export "OutputStream.dart"; diff --git a/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart b/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart index 28c3f4697a..6dd56e1df9 100644 --- a/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart +++ b/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart @@ -23,6 +23,8 @@ import "URL.dart" as url_; import "../io/InputStream.dart" as inputstream_; +import "../io/OutputStream.dart" as outputstream_; + /// from: java.net.URLConnection class URLConnection extends jni.JObject { @override @@ -467,9 +469,10 @@ class URLConnection extends jni.JObject { /// from: public java.io.OutputStream getOutputStream() /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject getOutputStream() { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getOutputStream, jni.JniCallType.objectType, []).object); + outputstream_.OutputStream getOutputStream() { + return const outputstream_.$OutputStreamType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_getOutputStream, + jni.JniCallType.objectType, []).object); } static final _id_toString1 = jni.Jni.accessors diff --git a/pkgs/java_http/test/java_client_test.dart b/pkgs/java_http/test/java_client_test.dart index 0f48c0b7b7..5ad0120099 100644 --- a/pkgs/java_http/test/java_client_test.dart +++ b/pkgs/java_http/test/java_client_test.dart @@ -8,8 +8,10 @@ import 'package:test/test.dart'; void main() { group('java_http client conformance tests', () { + testIsolate(JavaClient.new); testResponseBody(JavaClient(), canStreamResponseBody: false); testResponseHeaders(JavaClient()); + testRequestBody(JavaClient()); testRequestHeaders(JavaClient()); testMultipleClients(JavaClient.new); }); From 587d114556457271e9ad60580e27e1a4fc25df19 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 03:21:22 +0000 Subject: [PATCH 253/448] Bump actions/labeler from 4.2.0 to 4.3.0 (#1000) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/labeler](https://github.com/actions/labeler) from 4.2.0 to 4.3.0.
Release notes

Sourced from actions/labeler's releases.

v4.3.0

What's Changed

In scope of this release, the ability to specify pull request number(s) was added by @​credfeto in actions/labeler#349.

Support for reading from the configuration file presented on the runner was added by @​lrstanley in actions/labeler#394. It allows you to use a configuration file generated during workflow run or uploaded from a separate repository.

Please refer to the action documentation for more information.

This release also includes the following changes:

New Contributors

Full Changelog: https://github.com/actions/labeler/compare/v4...v4.3.0

Commits
  • ac9175f Bump @​octokit/plugin-retry from 5.0.4 to 5.0.5 (#610)
  • 7542ec7 Bump tough-cookie from 4.1.2 to 4.1.3 (#609)
  • be13bbd Early exit when no files are changed. (#456)
  • 994304c feat(config): support reading from local file if it exists (#394)
  • 327d35f Added ability to pass in an optional PR number as a parameter (#349)
  • 65f306b Fix a typo in the example about using the action outputs (#606)
  • b669025 Bump @​typescript-eslint/eslint-plugin from 5.60.1 to 5.61.0 (#604)
  • 52979ba Bump @​typescript-eslint/parser from 5.60.1 to 5.61.0 (#602)
  • 5bea145 Bump eslint from 8.43.0 to 8.44.0 (#601)
  • a212485 Add examples to match all repo files (#600)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/labeler&package-manager=github_actions&previous-version=4.2.0&new-version=4.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/pull_request_label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request_label.yml b/.github/workflows/pull_request_label.yml index 1c9d1e4f84..9933aad40d 100644 --- a/.github/workflows/pull_request_label.yml +++ b/.github/workflows/pull_request_label.yml @@ -16,7 +16,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@0967ca812e7fdc8f5f71402a1b486d5bd061fe20 + - uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true From e6868a899fc93c8a322c012f8fb26280a6ed079d Mon Sep 17 00:00:00 2001 From: Alex James Date: Tue, 8 Aug 2023 14:05:42 +0100 Subject: [PATCH 254/448] Remove example test from java_http (#1001) The example test was generated by the Dart 'create' command. --- pkgs/java_http/test/java_http_test.dart | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 pkgs/java_http/test/java_http_test.dart diff --git a/pkgs/java_http/test/java_http_test.dart b/pkgs/java_http/test/java_http_test.dart deleted file mode 100644 index e859141d2f..0000000000 --- a/pkgs/java_http/test/java_http_test.dart +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// This code was generated by the Dart create command with the package template. - -import 'package:java_http/java_http.dart'; -import 'package:test/test.dart'; - -void main() { - group('A group of tests', () { - final awesome = Awesome(); - - setUp(() { - // Additional setup goes here. - }); - - test('First Test', () { - expect(awesome.isAwesome, isTrue); - }); - }); -} From 1aafcfe2a962621581da5263eb6461a59f911ea0 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 15 Aug 2023 10:00:00 -0700 Subject: [PATCH 255/448] Add some additional header tests (#1006) * Add some additional header tests - Tests for folder headers - Tests for headers values containing spaces - Tests for header names that are upper case --- pkgs/http/lib/src/base_response.dart | 20 +++++++ .../lib/src/response_headers_tests.dart | 56 +++++++++++++++++-- 2 files changed, 72 insertions(+), 4 deletions(-) diff --git a/pkgs/http/lib/src/base_response.dart b/pkgs/http/lib/src/base_response.dart index a09dcea4ed..ed95f6cdb2 100644 --- a/pkgs/http/lib/src/base_response.dart +++ b/pkgs/http/lib/src/base_response.dart @@ -26,6 +26,26 @@ abstract class BaseResponse { // TODO(nweiz): automatically parse cookies from headers + /// The HTTP headers returned by the server. + /// + /// The header names are converted to lowercase and stored with their + /// associated header values. + /// + /// If the server returns multiple headers with the same name then the header + /// values will be associated with a single key and seperated by commas and + /// possibly whitespace. For example: + /// ```dart + /// // HTTP/1.1 200 OK + /// // Fruit: Apple + /// // Fruit: Banana + /// // Fruit: Grape + /// final values = response.headers['fruit']!.split(RegExp(r'\s*,\s*')); + /// // values = ['Apple', 'Banana', 'Grape'] + /// ``` + /// + /// If a header value contains whitespace then that whitespace may be replaced + /// by a single space. Leading and trailing whitespace in header values are + /// always removed. // TODO(nweiz): make this a HttpHeaders object. final Map headers; diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart index 012fa63943..4f920428ae 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart @@ -30,12 +30,19 @@ void testResponseHeaders(Client client) async { expect(response.headers['foo'], 'bar'); }); + test('UPPERCASE header name', () async { + // RFC 2616 14.44 states that header field names are case-insensitive. + // http.Client canonicalizes field names into lower case. + httpServerChannel.sink.add('FOO: bar\r\n'); + + final response = await client.get(Uri.http(host, '')); + expect(response.headers['foo'], 'bar'); + }); + test('UPPERCASE header value', () async { httpServerChannel.sink.add('foo: BAR\r\n'); final response = await client.get(Uri.http(host, '')); - // RFC 2616 14.44 states that header field names are case-insensitive. - // http.Client canonicalizes field names into lower case. expect(response.headers['foo'], 'BAR'); }); @@ -43,11 +50,27 @@ void testResponseHeaders(Client client) async { httpServerChannel.sink.add('foo: \t BAR \t \r\n'); final response = await client.get(Uri.http(host, '')); - // RFC 2616 14.44 states that header field names are case-insensitive. - // http.Client canonicalizes field names into lower case. expect(response.headers['foo'], 'BAR'); }); + test('space in header value', () async { + httpServerChannel.sink.add('foo: BAR BAZ\r\n'); + + final response = await client.get(Uri.http(host, '')); + expect(response.headers['foo'], 'BAR BAZ'); + }); + + test('multiple spaces in header value', () async { + // RFC 2616 4.2 allows LWS between header values to be replace with a + // single space. + // See https://datatracker.ietf.org/doc/html/rfc2616#section-4.2 + httpServerChannel.sink.add('foo: BAR \t BAZ\r\n'); + + final response = await client.get(Uri.http(host, '')); + expect( + response.headers['foo'], matches(RegExp('BAR {0,2}[ \t] {0,3}BAZ'))); + }); + test('multiple headers', () async { httpServerChannel.sink .add('field1: value1\r\n' 'field2: value2\r\n' 'field3: value3\r\n'); @@ -130,5 +153,30 @@ void testResponseHeaders(Client client) async { client.get(Uri.http(host, '')), throwsA(isA())); }); }); + + group('folded headers', () { + // RFC2616 says that HTTP Headers can be split across multiple lines. + // See https://datatracker.ietf.org/doc/html/rfc2616#section-2.2 + test('leading space', () async { + httpServerChannel.sink.add('foo: BAR\r\n BAZ\r\n'); + + final response = await client.get(Uri.http(host, '')); + expect(response.headers['foo'], 'BAR BAZ'); + }, + skip: 'Enable after https://github.com/dart-lang/sdk/issues/53185 ' + 'is fixed'); + + test('extra whitespace', () async { + httpServerChannel.sink.add('foo: BAR \t \r\n \t BAZ \t \r\n'); + + final response = await client.get(Uri.http(host, '')); + // RFC 2616 4.2 allows LWS between header values to be replace with a + // single space. + expect( + response.headers['foo'], + allOf(matches(RegExp(r'BAR {0,3}[ \t]? {0,7}[ \t]? {0,3}BAZ')), + contains(' '))); + }); + }); }); } From 93a721efc80b52c71638bf48986113efee417b7a Mon Sep 17 00:00:00 2001 From: Alex James Date: Thu, 17 Aug 2023 17:16:12 +0100 Subject: [PATCH 256/448] JavaClient can stream the HTTP response body (#1005) --- pkgs/java_http/lib/src/java_client.dart | 171 ++++++++++++++++------ pkgs/java_http/pubspec.yaml | 1 + pkgs/java_http/test/java_client_test.dart | 3 +- 3 files changed, 127 insertions(+), 48 deletions(-) diff --git a/pkgs/java_http/lib/src/java_client.dart b/pkgs/java_http/lib/src/java_client.dart index 51847a50f6..1076deae5c 100644 --- a/pkgs/java_http/lib/src/java_client.dart +++ b/pkgs/java_http/lib/src/java_client.dart @@ -2,10 +2,12 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'dart:async'; import 'dart:io'; import 'dart:isolate'; import 'dart:typed_data'; +import 'package:async/async.dart'; import 'package:http/http.dart'; import 'package:jni/jni.dart'; import 'package:path/path.dart'; @@ -39,51 +41,118 @@ class JavaClient extends BaseClient { // See https://github.com/dart-lang/http/pull/980#discussion_r1253700470. _initJVM(); + final receivePort = ReceivePort(); + final events = StreamQueue(receivePort); + // We can't send a StreamedRequest to another Isolate. // But we can send Map, String, UInt8List, Uri. - final requestBody = await request.finalize().toBytes(); - final requestHeaders = request.headers; - final requestMethod = request.method; - final requestUrl = request.url; - - final (statusCode, reasonPhrase, responseHeaders, responseBody) = - await Isolate.run(() async { - final httpUrlConnection = URL - .ctor3(requestUrl.toString().toJString()) - .openConnection() - .castTo(HttpURLConnection.type, deleteOriginal: true); - - requestHeaders.forEach((headerName, headerValue) { - httpUrlConnection.setRequestProperty( - headerName.toJString(), headerValue.toJString()); - }); - - httpUrlConnection.setRequestMethod(requestMethod.toJString()); - _setRequestBody(httpUrlConnection, requestBody); - - final statusCode = _statusCode(requestUrl, httpUrlConnection); - final reasonPhrase = _reasonPhrase(httpUrlConnection); - final responseHeaders = _responseHeaders(httpUrlConnection); - final responseBody = _responseBody(httpUrlConnection); - - httpUrlConnection.disconnect(); + final isolateRequest = ( + sendPort: receivePort.sendPort, + url: request.url, + method: request.method, + headers: request.headers, + body: await request.finalize().toBytes(), + ); + + // Could create a new class to hold the data for the isolate instead + // of using a record. + await Isolate.spawn(_isolateMethod, isolateRequest); + + final statusCodeEvent = await events.next; + late int statusCode; + if (statusCodeEvent is ClientException) { + // Do we need to close the ReceivePort here as well? + receivePort.close(); + throw statusCodeEvent; + } else { + statusCode = statusCodeEvent as int; + } - return ( - statusCode, - reasonPhrase, - responseHeaders, - responseBody, - ); - }); + final reasonPhrase = await events.next as String?; + final responseHeaders = await events.next as Map; + + Stream> responseBodyStream(Stream events) async* { + try { + await for (final event in events) { + if (event is List) { + yield event; + } else if (event is ClientException) { + throw event; + } else if (event == null) { + return; + } + } + } finally { + // TODO: Should we kill the isolate here? + receivePort.close(); + } + } - return StreamedResponse(Stream.value(responseBody), statusCode, - contentLength: - _contentLengthHeader(request, responseHeaders, responseBody.length), + return StreamedResponse(responseBodyStream(events.rest), statusCode, + contentLength: _parseContentLengthHeader(request.url, responseHeaders), request: request, headers: responseHeaders, reasonPhrase: reasonPhrase); } + // TODO: Rename _isolateMethod to something more descriptive. + void _isolateMethod( + ({ + SendPort sendPort, + Uint8List body, + Map headers, + String method, + Uri url, + }) request, + ) { + final httpUrlConnection = URL + .ctor3(request.url.toString().toJString()) + .openConnection() + .castTo(HttpURLConnection.type, deleteOriginal: true); + + request.headers.forEach((headerName, headerValue) { + httpUrlConnection.setRequestProperty( + headerName.toJString(), headerValue.toJString()); + }); + + httpUrlConnection.setRequestMethod(request.method.toJString()); + _setRequestBody(httpUrlConnection, request.body); + + try { + final statusCode = _statusCode(request.url, httpUrlConnection); + request.sendPort.send(statusCode); + } on ClientException catch (e) { + request.sendPort.send(e); + httpUrlConnection.disconnect(); + return; + } + + final reasonPhrase = _reasonPhrase(httpUrlConnection); + request.sendPort.send(reasonPhrase); + + final responseHeaders = _responseHeaders(httpUrlConnection); + request.sendPort.send(responseHeaders); + + // TODO: Throws a ClientException if the content length header is invalid. + // I think we need to send the ClientException over the SendPort. + final contentLengthHeader = _parseContentLengthHeader( + request.url, + responseHeaders, + ); + + _responseBody( + request.url, + httpUrlConnection, + request.sendPort, + contentLengthHeader, + ); + + httpUrlConnection.disconnect(); + + // Signals to the receiving isolate that we are done sending events. + request.sendPort.send(null); + } + void _setRequestBody( HttpURLConnection httpUrlConnection, Uint8List requestBody, @@ -142,42 +211,50 @@ class JavaClient extends BaseClient { return headers.map((key, value) => MapEntry(key, value.join(','))); } - int? _contentLengthHeader( - BaseRequest request, Map headers, int bodyLength) { + int? _parseContentLengthHeader( + Uri requestUrl, + Map headers, + ) { int? contentLength; switch (headers['content-length']) { case final contentLengthHeader? when !_digitRegex.hasMatch(contentLengthHeader): throw ClientException( 'Invalid content-length header [$contentLengthHeader].', - request.url, + requestUrl, ); case final contentLengthHeader?: contentLength = int.parse(contentLengthHeader); - if (bodyLength < contentLength) { - throw ClientException('Unexpected end of body', request.url); - } } return contentLength; } - Uint8List _responseBody(HttpURLConnection httpUrlConnection) { + void _responseBody( + Uri requestUrl, + HttpURLConnection httpUrlConnection, + SendPort sendPort, + int? expectedBodyLength, + ) { final responseCode = httpUrlConnection.getResponseCode(); final inputStream = (responseCode >= 200 && responseCode <= 299) ? httpUrlConnection.getInputStream() : httpUrlConnection.getErrorStream(); - final bytes = []; int byte; + var actualBodyLength = 0; + // TODO: inputStream.read() could throw IOException. while ((byte = inputStream.read()) != -1) { - bytes.add(byte); + sendPort.send([byte]); + actualBodyLength++; } - inputStream.close(); + if (expectedBodyLength != null && actualBodyLength < expectedBodyLength) { + sendPort.send(ClientException('Unexpected end of body', requestUrl)); + } - return Uint8List.fromList(bytes); + inputStream.close(); } } diff --git a/pkgs/java_http/pubspec.yaml b/pkgs/java_http/pubspec.yaml index a11cdf912a..ecba4f13e6 100644 --- a/pkgs/java_http/pubspec.yaml +++ b/pkgs/java_http/pubspec.yaml @@ -8,6 +8,7 @@ environment: sdk: ^3.0.0 dependencies: + async: ^2.11.0 http: '>=0.13.4 <2.0.0' jni: ^0.5.0 path: ^1.8.0 diff --git a/pkgs/java_http/test/java_client_test.dart b/pkgs/java_http/test/java_client_test.dart index 5ad0120099..011b6a6633 100644 --- a/pkgs/java_http/test/java_client_test.dart +++ b/pkgs/java_http/test/java_client_test.dart @@ -9,7 +9,8 @@ import 'package:test/test.dart'; void main() { group('java_http client conformance tests', () { testIsolate(JavaClient.new); - testResponseBody(JavaClient(), canStreamResponseBody: false); + testResponseBody(JavaClient()); + testResponseBodyStreamed(JavaClient()); testResponseHeaders(JavaClient()); testRequestBody(JavaClient()); testRequestHeaders(JavaClient()); From e1b12ce41510949cefadc5ae2599a9283d0d9d3a Mon Sep 17 00:00:00 2001 From: Alex James Date: Fri, 18 Aug 2023 17:17:45 +0100 Subject: [PATCH 257/448] Add java_http .gitattributes file (#999) --- pkgs/java_http/.gitattributes | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 pkgs/java_http/.gitattributes diff --git a/pkgs/java_http/.gitattributes b/pkgs/java_http/.gitattributes new file mode 100644 index 0000000000..9def68ab79 --- /dev/null +++ b/pkgs/java_http/.gitattributes @@ -0,0 +1,5 @@ +# Vendored code is excluded from language stats in the GitHub repo. +lib/src/third_party/** linguist-vendored + +# jnigen generated code is hidden in GitHub diffs. +lib/src/third_party/java/** linguist-generated From 4c46550a9a9daf14a6c3aef6763d455c1cc0ed4f Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 23 Aug 2023 12:52:46 -0700 Subject: [PATCH 258/448] Don't check the formatting of `ffigen`ed code (#1010) --- .github/workflows/cupertino.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index ef4f2b8911..739257f80c 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -36,7 +36,14 @@ jobs: name: Install dependencies run: flutter pub get - name: Check formatting - run: dart format --output=none --set-exit-if-changed . + # Don't lint the generated file native_cupertino_bindings.dart + # This approach is simpler than using `find` and excluding that file + # because `dart format` also excludes other file e.g. ones in + # directories start with '.'. + run: > + mv lib/src/native_cupertino_bindings.dart lib/src/native_cupertino_bindings.tmp && + dart format --output=none --set-exit-if-changed . && + mv lib/src/native_cupertino_bindings.tmp lib/src/native_cupertino_bindings.dart if: always() && steps.install.outcome == 'success' - name: Analyze code run: flutter analyze --fatal-infos From a7bf903bff35a268815a35897e9f626a8601a222 Mon Sep 17 00:00:00 2001 From: Alex James Date: Thu, 24 Aug 2023 01:12:02 +0100 Subject: [PATCH 259/448] JavaClient stream response body using byte arrays (#1007) --- pkgs/java_http/jnigen.yaml | 1 + pkgs/java_http/lib/src/java_client.dart | 55 +++- .../java/io/BufferedInputStream.dart | 248 ++++++++++++++++++ .../lib/src/third_party/java/io/_package.dart | 1 + 4 files changed, 291 insertions(+), 14 deletions(-) create mode 100644 pkgs/java_http/lib/src/third_party/java/io/BufferedInputStream.dart diff --git a/pkgs/java_http/jnigen.yaml b/pkgs/java_http/jnigen.yaml index 2a8302685c..a99320fc26 100644 --- a/pkgs/java_http/jnigen.yaml +++ b/pkgs/java_http/jnigen.yaml @@ -12,6 +12,7 @@ class_path: - 'classes.jar' classes: + - 'java.io.BufferedInputStream' - 'java.io.InputStream' - 'java.io.OutputStream' - 'java.lang.System' diff --git a/pkgs/java_http/lib/src/java_client.dart b/pkgs/java_http/lib/src/java_client.dart index 1076deae5c..379c640b1d 100644 --- a/pkgs/java_http/lib/src/java_client.dart +++ b/pkgs/java_http/lib/src/java_client.dart @@ -12,6 +12,7 @@ import 'package:http/http.dart'; import 'package:jni/jni.dart'; import 'package:path/path.dart'; +import 'third_party/java/io/BufferedInputStream.dart'; import 'third_party/java/lang/System.dart'; import 'third_party/java/net/HttpURLConnection.dart'; import 'third_party/java/net/URL.dart'; @@ -96,7 +97,7 @@ class JavaClient extends BaseClient { } // TODO: Rename _isolateMethod to something more descriptive. - void _isolateMethod( + Future _isolateMethod( ({ SendPort sendPort, Uint8List body, @@ -104,7 +105,7 @@ class JavaClient extends BaseClient { String method, Uri url, }) request, - ) { + ) async { final httpUrlConnection = URL .ctor3(request.url.toString().toJString()) .openConnection() @@ -140,7 +141,7 @@ class JavaClient extends BaseClient { responseHeaders, ); - _responseBody( + await _responseBody( request.url, httpUrlConnection, request.sendPort, @@ -230,31 +231,46 @@ class JavaClient extends BaseClient { return contentLength; } - void _responseBody( + Future _responseBody( Uri requestUrl, HttpURLConnection httpUrlConnection, SendPort sendPort, int? expectedBodyLength, - ) { + ) async { final responseCode = httpUrlConnection.getResponseCode(); - final inputStream = (responseCode >= 200 && responseCode <= 299) - ? httpUrlConnection.getInputStream() - : httpUrlConnection.getErrorStream(); + final responseBodyStream = (responseCode >= 200 && responseCode <= 299) + ? BufferedInputStream(httpUrlConnection.getInputStream()) + : BufferedInputStream(httpUrlConnection.getErrorStream()); - int byte; var actualBodyLength = 0; - // TODO: inputStream.read() could throw IOException. - while ((byte = inputStream.read()) != -1) { - sendPort.send([byte]); - actualBodyLength++; + final bytesBuffer = JArray(jbyte.type, 4096); + + while (true) { + // TODO: read1() could throw IOException. + final bytesCount = + responseBodyStream.read1(bytesBuffer, 0, bytesBuffer.length); + + if (bytesCount == -1) { + break; + } + + if (bytesCount == 0) { + // No more data is available without blocking so give other Isolates an + // opportunity to run. + await Future.delayed(Duration.zero); + continue; + } + + sendPort.send(bytesBuffer.toUint8List(length: bytesCount)); + actualBodyLength += bytesCount; } if (expectedBodyLength != null && actualBodyLength < expectedBodyLength) { sendPort.send(ClientException('Unexpected end of body', requestUrl)); } - inputStream.close(); + responseBodyStream.close(); } } @@ -262,3 +278,14 @@ extension on Uint8List { JArray toJArray() => JArray(jbyte.type, length)..setRange(0, length, this); } + +extension on JArray { + Uint8List toUint8List({int? length}) { + length ??= this.length; + final list = Uint8List(length); + for (var i = 0; i < length; i++) { + list[i] = this[i]; + } + return list; + } +} diff --git a/pkgs/java_http/lib/src/third_party/java/io/BufferedInputStream.dart b/pkgs/java_http/lib/src/third_party/java/io/BufferedInputStream.dart new file mode 100644 index 0000000000..c732e12b0c --- /dev/null +++ b/pkgs/java_http/lib/src/third_party/java/io/BufferedInputStream.dart @@ -0,0 +1,248 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: file_names +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_shown_name + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +import "InputStream.dart" as inputstream_; + +/// from: java.io.BufferedInputStream +class BufferedInputStream extends jni.JObject { + @override + late final jni.JObjType $type = type; + + BufferedInputStream.fromRef( + jni.JObjectPtr ref, + ) : super.fromRef(ref); + + static final _class = jni.Jni.findJClass(r"java/io/BufferedInputStream"); + + /// The type which includes information such as the signature of this class. + static const type = $BufferedInputStreamType(); + static final _id_buf = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"buf", + r"[B", + ); + + /// from: protected byte[] buf + /// The returned object must be deleted after use, by calling the `delete` method. + jni.JArray get buf => + const jni.JArrayType(jni.jbyteType()).fromRef(jni.Jni.accessors + .getField(reference, _id_buf, jni.JniCallType.objectType) + .object); + + /// from: protected byte[] buf + /// The returned object must be deleted after use, by calling the `delete` method. + set buf(jni.JArray value) => + jni.Jni.env.SetObjectField(reference, _id_buf, value.reference); + + static final _id_count = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"count", + r"I", + ); + + /// from: protected int count + int get count => jni.Jni.accessors + .getField(reference, _id_count, jni.JniCallType.intType) + .integer; + + /// from: protected int count + set count(int value) => jni.Jni.env.SetIntField(reference, _id_count, value); + + static final _id_pos = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"pos", + r"I", + ); + + /// from: protected int pos + int get pos => jni.Jni.accessors + .getField(reference, _id_pos, jni.JniCallType.intType) + .integer; + + /// from: protected int pos + set pos(int value) => jni.Jni.env.SetIntField(reference, _id_pos, value); + + static final _id_markpos = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"markpos", + r"I", + ); + + /// from: protected int markpos + int get markpos => jni.Jni.accessors + .getField(reference, _id_markpos, jni.JniCallType.intType) + .integer; + + /// from: protected int markpos + set markpos(int value) => + jni.Jni.env.SetIntField(reference, _id_markpos, value); + + static final _id_marklimit = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r"marklimit", + r"I", + ); + + /// from: protected int marklimit + int get marklimit => jni.Jni.accessors + .getField(reference, _id_marklimit, jni.JniCallType.intType) + .integer; + + /// from: protected int marklimit + set marklimit(int value) => + jni.Jni.env.SetIntField(reference, _id_marklimit, value); + + static final _id_ctor = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"", r"(Ljava/io/InputStream;)V"); + + /// from: public void (java.io.InputStream inputStream) + /// The returned object must be deleted after use, by calling the `delete` method. + factory BufferedInputStream( + inputstream_.InputStream inputStream, + ) { + return BufferedInputStream.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, _id_ctor, [inputStream.reference]).object); + } + + static final _id_ctor1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"", r"(Ljava/io/InputStream;I)V"); + + /// from: public void (java.io.InputStream inputStream, int i) + /// The returned object must be deleted after use, by calling the `delete` method. + factory BufferedInputStream.ctor1( + inputstream_.InputStream inputStream, + int i, + ) { + return BufferedInputStream.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, + _id_ctor1, + [inputStream.reference, jni.JValueInt(i)]).object); + } + + static final _id_read = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"()I"); + + /// from: public int read() + int read() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_read, jni.JniCallType.intType, []).integer; + } + + static final _id_read1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"([BII)I"); + + /// from: public int read(byte[] bs, int i, int i1) + int read1( + jni.JArray bs, + int i, + int i1, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, + _id_read1, + jni.JniCallType.intType, + [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).integer; + } + + static final _id_skip = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"skip", r"(J)J"); + + /// from: public long skip(long j) + int skip( + int j, + ) { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_skip, jni.JniCallType.longType, [j]).long; + } + + static final _id_available = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"available", r"()I"); + + /// from: public int available() + int available() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_available, jni.JniCallType.intType, []).integer; + } + + static final _id_mark = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"mark", r"(I)V"); + + /// from: public void mark(int i) + void mark( + int i, + ) { + return jni.Jni.accessors.callMethodWithArgs(reference, _id_mark, + jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); + } + + static final _id_reset = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"reset", r"()V"); + + /// from: public void reset() + void reset() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_reset, jni.JniCallType.voidType, []).check(); + } + + static final _id_markSupported = jni.Jni.accessors + .getMethodIDOf(_class.reference, r"markSupported", r"()Z"); + + /// from: public boolean markSupported() + bool markSupported() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_markSupported, jni.JniCallType.booleanType, []).boolean; + } + + static final _id_close = + jni.Jni.accessors.getMethodIDOf(_class.reference, r"close", r"()V"); + + /// from: public void close() + void close() { + return jni.Jni.accessors.callMethodWithArgs( + reference, _id_close, jni.JniCallType.voidType, []).check(); + } +} + +class $BufferedInputStreamType extends jni.JObjType { + const $BufferedInputStreamType(); + + @override + String get signature => r"Ljava/io/BufferedInputStream;"; + + @override + BufferedInputStream fromRef(jni.JObjectPtr ref) => + BufferedInputStream.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($BufferedInputStreamType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($BufferedInputStreamType) && + other is $BufferedInputStreamType; + } +} diff --git a/pkgs/java_http/lib/src/third_party/java/io/_package.dart b/pkgs/java_http/lib/src/third_party/java/io/_package.dart index ef72615333..a25d6e85d2 100644 --- a/pkgs/java_http/lib/src/third_party/java/io/_package.dart +++ b/pkgs/java_http/lib/src/third_party/java/io/_package.dart @@ -1,2 +1,3 @@ +export "BufferedInputStream.dart"; export "InputStream.dart"; export "OutputStream.dart"; From c3025b35b22b311af9a73536892fc2196a27859c Mon Sep 17 00:00:00 2001 From: Alex James Date: Sat, 26 Aug 2023 01:17:01 +0100 Subject: [PATCH 260/448] Add response status code test (#1009) --- .../lib/http_client_conformance_tests.dart | 3 ++ .../lib/src/response_status_line_server.dart | 42 +++++++++++++++++++ .../src/response_status_line_server_vm.dart | 12 ++++++ .../src/response_status_line_server_web.dart | 10 +++++ .../lib/src/response_status_line_tests.dart | 39 +++++++++++++++++ pkgs/java_http/test/java_client_test.dart | 1 + 6 files changed, 107 insertions(+) create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_status_line_server.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_status_line_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_status_line_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index 3500bf8df2..3d003193e9 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -15,6 +15,7 @@ import 'src/request_headers_tests.dart'; import 'src/response_body_streamed_test.dart'; import 'src/response_body_tests.dart'; import 'src/response_headers_tests.dart'; +import 'src/response_status_line_tests.dart'; import 'src/server_errors_test.dart'; export 'src/close_tests.dart' show testClose; @@ -29,6 +30,7 @@ export 'src/request_headers_tests.dart' show testRequestHeaders; export 'src/response_body_streamed_test.dart' show testResponseBodyStreamed; export 'src/response_body_tests.dart' show testResponseBody; export 'src/response_headers_tests.dart' show testResponseHeaders; +export 'src/response_status_line_tests.dart' show testResponseStatusLine; export 'src/server_errors_test.dart' show testServerErrors; /// Runs the entire test suite against the given [Client]. @@ -64,6 +66,7 @@ void testAll(Client Function() clientFactory, canStreamResponseBody: canStreamResponseBody); testRequestHeaders(clientFactory()); testResponseHeaders(clientFactory()); + testResponseStatusLine(clientFactory()); testRedirect(clientFactory(), redirectAlwaysAllowed: redirectAlwaysAllowed); testServerErrors(clientFactory()); testCompressedResponseBody(clientFactory()); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_status_line_server.dart b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server.dart new file mode 100644 index 0000000000..66d44889a1 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server.dart @@ -0,0 +1,42 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:async/async.dart'; +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that returns a custom status line. +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// On Request Received: +/// - load response status line from channel +/// - exit +void hybridMain(StreamChannel channel) async { + late HttpServer server; + final clientQueue = StreamQueue(channel.stream); + + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + final socket = await request.response.detachSocket(writeHeaders: false); + + final statusLine = (await clientQueue.next) as String; + socket.writeAll( + [ + statusLine, + 'Content-Length: 0', + '\r\n', // Add \r\n at the end of this header section. + ], + '\r\n', // Separate each field by \r\n. + ); + await socket.close(); + unawaited(server.close()); + }); + + channel.sink.add(server.port); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_vm.dart new file mode 100644 index 0000000000..ff2ea84f02 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'response_status_line_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_web.dart new file mode 100644 index 0000000000..f1ebbcbd3a --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_web.dart @@ -0,0 +1,10 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: + 'http_client_conformance_tests/src/response_status_line_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart new file mode 100644 index 0000000000..922236ccc1 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart @@ -0,0 +1,39 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +import 'response_status_line_server_vm.dart' + if (dart.library.html) 'response_status_line_server_web.dart'; + +/// Tests that the [Client] correctly processes the response status line. +void testResponseStatusLine(Client client) async { + group('response status line', () { + late String host; + late StreamChannel httpServerChannel; + late StreamQueue httpServerQueue; + + setUp(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + + test( + 'without status code', + () async { + httpServerChannel.sink.add('HTTP/1.1 OK'); + await expectLater( + client.get(Uri.http(host, '')), + throwsA(isA()), + ); + }, + skip: + 'Enable after https://github.com/dart-lang/http/issues/1013 is fixed', + ); + }); +} diff --git a/pkgs/java_http/test/java_client_test.dart b/pkgs/java_http/test/java_client_test.dart index 011b6a6633..c6e769ca6f 100644 --- a/pkgs/java_http/test/java_client_test.dart +++ b/pkgs/java_http/test/java_client_test.dart @@ -12,6 +12,7 @@ void main() { testResponseBody(JavaClient()); testResponseBodyStreamed(JavaClient()); testResponseHeaders(JavaClient()); + testResponseStatusLine(JavaClient()); testRequestBody(JavaClient()); testRequestHeaders(JavaClient()); testMultipleClients(JavaClient.new); From 48ecf18dce73ed104b1620e2b1085fd7a3593dc1 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 31 Aug 2023 09:22:27 -0700 Subject: [PATCH 261/448] Clarify how to set the body without a content type header (#1014) --- pkgs/http/lib/src/request.dart | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/http/lib/src/request.dart b/pkgs/http/lib/src/request.dart index 1c7aa306ba..c15e55169d 100644 --- a/pkgs/http/lib/src/request.dart +++ b/pkgs/http/lib/src/request.dart @@ -69,7 +69,16 @@ class Request extends BaseRequest { /// /// This is converted to and from [body] using [encoding]. /// - /// This list should only be set, not be modified in place. + /// This list should only be set, not modified in place. + /// + /// Unlike [body], setting [bodyBytes] does not implicitly set a + /// `Content-Type` header. + /// + /// ```dart + /// final request = Request('GET', Uri.https('example.com', 'whatsit/create')) + /// ..bodyBytes = utf8.encode(jsonEncode({})) + /// ..headers['content-type'] = 'application/json'; + /// ``` Uint8List get bodyBytes => _bodyBytes; Uint8List _bodyBytes; @@ -86,6 +95,9 @@ class Request extends BaseRequest { /// header, one will be added with the type `text/plain`. Then the `charset` /// parameter of the `Content-Type` header (whether new or pre-existing) will /// be set to [encoding] if it wasn't already set. + /// + /// To set the body of the request, without setting the `Content-Type` header, + /// use [bodyBytes]. String get body => encoding.decode(bodyBytes); set body(String value) { From c776f39968c0fad8fa1b395dd98f546617ab2b7c Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Tue, 12 Sep 2023 08:53:15 -0700 Subject: [PATCH 262/448] Avoid passing a nullable value to Completer.complete (#1015) This is cleanup work required to start enforcing this with static analysis, as per https://github.com/dart-lang/sdk/issues/53253. Real quick this issue is that this code is unsafe: ```dart void f(Completer c, int? i) { Future.value(i); // Ouch! c.complete(i); // Ouch! } ``` --- pkgs/cupertino_http/lib/src/cupertino_api.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 414154c590..1f0a10369d 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -885,7 +885,7 @@ class URLSessionWebSocketTask extends URLSessionTask { if (error != null) { completer.completeError(error); } else { - completer.complete(message); + completer.complete(message!); } completionPort.close(); }); From 662f6f3dde86e8db97cc8dadf4621b99661369ad Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 12 Sep 2023 14:56:00 -0700 Subject: [PATCH 263/448] Switch `cronet_http` to use jnigen (#1016) --- .github/workflows/cronet.yml | 4 +- pkgs/cronet_http/.gitattributes | 6 +- pkgs/cronet_http/CHANGELOG.md | 8 + pkgs/cronet_http/android/build.gradle | 1 - .../plugins/cronet_http/CronetHttpPlugin.kt | 239 - .../cronet_http/UrlRequestCallbackProxy.kt | 77 + .../example/integration_test/client_test.dart | 50 +- .../cronet_configuration_test.dart | 14 +- pkgs/cronet_http/example/lib/main.dart | 9 +- pkgs/cronet_http/jnigen.yaml | 31 + pkgs/cronet_http/lib/src/cronet_client.dart | 302 +- .../cronet_http/lib/src/jni/jni_bindings.dart | 3954 +++++++++++++++++ pkgs/cronet_http/pigeons/messages.dart | 106 - pkgs/cronet_http/pubspec.yaml | 9 +- pkgs/cronet_http/tool/run_pigeon.sh | 12 - .../lib/src/redirect_tests.dart | 11 +- 16 files changed, 4292 insertions(+), 541 deletions(-) delete mode 100644 pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt create mode 100644 pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/UrlRequestCallbackProxy.kt create mode 100644 pkgs/cronet_http/jnigen.yaml create mode 100644 pkgs/cronet_http/lib/src/jni/jni_bindings.dart delete mode 100644 pkgs/cronet_http/pigeons/messages.dart delete mode 100644 pkgs/cronet_http/tool/run_pigeon.sh diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 0b35e16aae..cd788c6c72 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -55,9 +55,7 @@ jobs: java-version: '17' - uses: subosito/flutter-action@v2 with: - # TODO: Change to 'stable' when a release version of flutter - # pins version 1.21.1 or later of 'package:test' - channel: 'master' + channel: 'stable' - name: Run tests uses: reactivecircus/android-emulator-runner@v2 with: diff --git a/pkgs/cronet_http/.gitattributes b/pkgs/cronet_http/.gitattributes index 907dfd352a..94741c6e03 100644 --- a/pkgs/cronet_http/.gitattributes +++ b/pkgs/cronet_http/.gitattributes @@ -1,4 +1,2 @@ -# pigeon generated code -lib/src/messages.dart linguist-generated -android/src/main/java/io/flutter/plugins/cronet_http/Messages.java linguist-generated - +# jnigen generated code +lib/src/jni/jni_bindings.dart linguist-generated diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index fe0c35faca..416553137a 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.3.0-jni + +* Switch to using `package:jnigen` for bindings to Cronet +* Support for running in background isolates. +* **Breaking Change:** `CronetEngine.build()` returns a `CronetEngine` rather + than a `Future` and `CronetClient.fromCronetEngineFuture()` + has been removed because it is no longer necessary. + ## 0.2.2 * Require Dart 3.0 diff --git a/pkgs/cronet_http/android/build.gradle b/pkgs/cronet_http/android/build.gradle index 665c659da5..bf79214106 100644 --- a/pkgs/cronet_http/android/build.gradle +++ b/pkgs/cronet_http/android/build.gradle @@ -38,7 +38,6 @@ android { sourceSets { main.java.srcDirs += 'src/main/kotlin' - main.java.srcDirs += 'src/main/java' } defaultConfig { diff --git a/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt b/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt deleted file mode 100644 index 09d0ff1e84..0000000000 --- a/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/CronetHttpPlugin.kt +++ /dev/null @@ -1,239 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -package io.flutter.plugins.cronet_http - -import android.os.Handler -import android.os.Looper -import androidx.annotation.NonNull -import io.flutter.embedding.engine.plugins.FlutterPlugin -import io.flutter.plugin.common.EventChannel -import org.chromium.net.CronetEngine -import org.chromium.net.CronetException -import org.chromium.net.UploadDataProviders -import org.chromium.net.UrlRequest -import org.chromium.net.UrlResponseInfo -import java.nio.ByteBuffer -import java.util.concurrent.Executors -import java.util.concurrent.atomic.AtomicInteger - -class CronetHttpPlugin : FlutterPlugin, Messages.HttpApi { - private lateinit var flutterPluginBinding: FlutterPlugin.FlutterPluginBinding - - private val engineIdToEngine = HashMap() - private val executor = Executors.newCachedThreadPool() - private val mainThreadHandler = Handler(Looper.getMainLooper()) - private val channelId = AtomicInteger(0) - private val engineId = AtomicInteger(0) - - override fun onAttachedToEngine( - @NonNull flutterPluginBinding: FlutterPlugin.FlutterPluginBinding - ) { - Messages.HttpApi.setup(flutterPluginBinding.binaryMessenger, this) - this.flutterPluginBinding = flutterPluginBinding - } - - override fun onDetachedFromEngine(@NonNull binding: FlutterPlugin.FlutterPluginBinding) { - Messages.HttpApi.setup(binding.binaryMessenger, null) - } - - override fun createEngine(createRequest: Messages.CreateEngineRequest): Messages.CreateEngineResponse { - try { - val builder = CronetEngine.Builder(flutterPluginBinding.getApplicationContext()) - - if (createRequest.getStoragePath() != null) { - builder.setStoragePath(createRequest.getStoragePath()!!) - } - - if (createRequest.getCacheMode() == Messages.CacheMode.disabled) { - builder.enableHttpCache(createRequest.getCacheMode()!!.ordinal, 0) - } else if (createRequest.getCacheMode() != null && createRequest.getCacheMaxSize() != null) { - builder.enableHttpCache(createRequest.getCacheMode()!!.ordinal, createRequest.getCacheMaxSize()!!) - } - - if (createRequest.getEnableBrotli() != null) { - builder.enableBrotli(createRequest.getEnableBrotli()!!) - } - - if (createRequest.getEnableHttp2() != null) { - builder.enableHttp2(createRequest.getEnableHttp2()!!) - } - - if (createRequest.getEnablePublicKeyPinningBypassForLocalTrustAnchors() != null) { - builder.enablePublicKeyPinningBypassForLocalTrustAnchors(createRequest.getEnablePublicKeyPinningBypassForLocalTrustAnchors()!!) - } - - if (createRequest.getEnableQuic() != null) { - builder.enableQuic(createRequest.getEnableQuic()!!) - } - - if (createRequest.getUserAgent() != null) { - builder.setUserAgent(createRequest.getUserAgent()!!) - } - - val engine = builder.build() - val engineName = "cronet_engine_" + engineId.incrementAndGet() - engineIdToEngine.put(engineName, engine) - return Messages.CreateEngineResponse.Builder() - .setEngineId(engineName) - .build() - } catch (e: IllegalArgumentException) { - return Messages.CreateEngineResponse.Builder() - .setErrorString(e.message) - .setErrorType(Messages.ExceptionType.illegalArgumentException) - .build() - } catch (e: Exception) { - return Messages.CreateEngineResponse.Builder() - .setErrorString(e.message) - .setErrorType(Messages.ExceptionType.otherException) - .build() - } - } - - override fun freeEngine(engineId: String) { - engineIdToEngine.remove(engineId) - } - - private fun createRequest(startRequest: Messages.StartRequest, cronetEngine: CronetEngine, eventSink: EventChannel.EventSink): UrlRequest { - var numRedirects = 0 - - val cronetRequest = cronetEngine.newUrlRequestBuilder( - startRequest.url, - object : UrlRequest.Callback() { - override fun onRedirectReceived( - request: UrlRequest, - info: UrlResponseInfo, - newLocationUrl: String - ) { - if (!startRequest.getFollowRedirects()) { - request.cancel() - mainThreadHandler.post({ - eventSink.success( - Messages.EventMessage.Builder() - .setType(Messages.EventMessageType.responseStarted) - .setResponseStarted( - Messages.ResponseStarted.Builder() - .setStatusCode(info.getHttpStatusCode().toLong()) - .setStatusText(info.getHttpStatusText()) - .setHeaders(info.getAllHeaders()) - .setIsRedirect(true) - .build() - ) - .build() - .toMap() - ) - }) - } - ++numRedirects - if (numRedirects <= startRequest.getMaxRedirects()) { - request.followRedirect() - } else { - request.cancel() - mainThreadHandler.post({ - eventSink.success( - Messages.EventMessage.Builder() - .setType(Messages.EventMessageType.tooManyRedirects) - .build() - .toMap() - ) - }) - } - } - - override fun onResponseStarted(request: UrlRequest?, info: UrlResponseInfo) { - mainThreadHandler.post({ - eventSink.success( - Messages.EventMessage.Builder() - .setType(Messages.EventMessageType.responseStarted) - .setResponseStarted( - Messages.ResponseStarted.Builder() - .setStatusCode(info.getHttpStatusCode().toLong()) - .setStatusText(info.getHttpStatusText()) - .setHeaders(info.getAllHeaders()) - .setIsRedirect(false) - .build() - ) - .build() - .toMap() - ) - }) - request?.read(ByteBuffer.allocateDirect(1024 * 1024)) - } - - override fun onReadCompleted( - request: UrlRequest, - info: UrlResponseInfo, - byteBuffer: ByteBuffer - ) { - byteBuffer.flip() - val b = ByteArray(byteBuffer.remaining()) - byteBuffer.get(b) - mainThreadHandler.post({ - eventSink.success( - Messages.EventMessage.Builder() - .setType(Messages.EventMessageType.readCompleted) - .setReadCompleted(Messages.ReadCompleted.Builder().setData(b).build()) - .build() - .toMap() - ) - }) - byteBuffer.clear() - request?.read(byteBuffer) - } - - override fun onSucceeded(request: UrlRequest, info: UrlResponseInfo?) { - mainThreadHandler.post({ eventSink.endOfStream() }) - } - - override fun onFailed( - request: UrlRequest, - info: UrlResponseInfo?, - error: CronetException - ) { - mainThreadHandler.post({ eventSink.error("CronetException", error.toString(), null) }) - } - }, - executor - ) - - if (startRequest.getBody().size > 0) { - cronetRequest.setUploadDataProvider( - UploadDataProviders.create(startRequest.getBody()), - executor - ) - } - cronetRequest.setHttpMethod(startRequest.getMethod()) - for ((key, value) in startRequest.getHeaders()) { - cronetRequest.addHeader(key, value) - } - return cronetRequest.build() - } - - override fun start(startRequest: Messages.StartRequest): Messages.StartResponse { - // Create a unique channel to communicate Cronet events to the Dart client code with. - val channelName = "plugins.flutter.io/cronet_event/" + channelId.incrementAndGet() - val eventChannel = EventChannel(flutterPluginBinding.binaryMessenger, channelName) - - // Don't start the Cronet request until the Dart client code is listening for events. - val streamHandler = - object : EventChannel.StreamHandler { - override fun onListen(arguments: Any?, events: EventChannel.EventSink) { - try { - val cronetEngine = engineIdToEngine.getValue(startRequest.engineId) - val cronetRequest = createRequest(startRequest, cronetEngine, events) - cronetRequest.start() - } catch (e: Exception) { - mainThreadHandler.post({ events.error("CronetException", e.toString(), null) }) - } - } - - override fun onCancel(arguments: Any?) {} - } - eventChannel.setStreamHandler(streamHandler) - - return Messages.StartResponse.Builder().setEventChannel(channelName).build() - } - - override fun dummy(arg1: Messages.EventMessage) {} -} diff --git a/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/UrlRequestCallbackProxy.kt b/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/UrlRequestCallbackProxy.kt new file mode 100644 index 0000000000..c16fb681e9 --- /dev/null +++ b/pkgs/cronet_http/android/src/main/kotlin/io/flutter/plugins/cronet_http/UrlRequestCallbackProxy.kt @@ -0,0 +1,77 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Cronet allows developers to manage HTTP requests by subclassing the +// the abstract class `UrlRequest.Callback`. +// +// `package:jnigen` does not support the ability to subclass abstract Java +// classes in Dart (see https://github.com/dart-lang/jnigen/issues/348). +// +// This file provides an interface `UrlRequestCallbackInterface`, which can +// be implemented in Dart and a wrapper class `UrlRequestCallbackProxy`, which +// can be passed to the Cronet API. + +package io.flutter.plugins.cronet_http + +import org.chromium.net.CronetException +import org.chromium.net.UrlRequest +import org.chromium.net.UrlResponseInfo +import java.nio.ByteBuffer + + +class UrlRequestCallbackProxy(val callback: UrlRequestCallbackInterface) : UrlRequest.Callback() { + public interface UrlRequestCallbackInterface { + fun onRedirectReceived( + request: UrlRequest, + info: UrlResponseInfo, + newLocationUrl: String + ) + + fun onResponseStarted(request: UrlRequest?, info: UrlResponseInfo) + fun onReadCompleted( + request: UrlRequest, + info: UrlResponseInfo, + byteBuffer: ByteBuffer + ) + + fun onSucceeded(request: UrlRequest, info: UrlResponseInfo?) + fun onFailed( + request: UrlRequest, + info: UrlResponseInfo?, + error: CronetException + ) + } + + override fun onRedirectReceived( + request: UrlRequest, + info: UrlResponseInfo, + newLocationUrl: String + ) { + callback.onRedirectReceived(request, info, newLocationUrl); + } + + override fun onResponseStarted(request: UrlRequest?, info: UrlResponseInfo) { + callback.onResponseStarted(request, info); + } + + override fun onReadCompleted( + request: UrlRequest, + info: UrlResponseInfo, + byteBuffer: ByteBuffer + ) { + callback.onReadCompleted(request, info, byteBuffer); + } + + override fun onSucceeded(request: UrlRequest, info: UrlResponseInfo?) { + callback.onSucceeded(request, info); + } + + override fun onFailed( + request: UrlRequest, + info: UrlResponseInfo?, + error: CronetException + ) { + callback.onFailed(request, info, error); + } +} diff --git a/pkgs/cronet_http/example/integration_test/client_test.dart b/pkgs/cronet_http/example/integration_test/client_test.dart index 4c279d7618..cc6b80edfc 100644 --- a/pkgs/cronet_http/example/integration_test/client_test.dart +++ b/pkgs/cronet_http/example/integration_test/client_test.dart @@ -3,48 +3,27 @@ // BSD-style license that can be found in the LICENSE file. import 'package:cronet_http/cronet_http.dart'; -import 'package:http/http.dart'; import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; -void testClientConformance(CronetClient Function() clientFactory) { - testAll(clientFactory, canStreamRequestBody: false, canWorkInIsolates: false); -} - Future testConformance() async { - group('default cronet engine', - () => testClientConformance(CronetClient.defaultCronetEngine)); - - final engine = await CronetEngine.build( - cacheMode: CacheMode.disabled, userAgent: 'Test Agent (Engine)'); + group( + 'default cronet engine', + () => testAll( + CronetClient.defaultCronetEngine, + canStreamRequestBody: false, + )); group('from cronet engine', () { - testClientConformance(() => CronetClient.fromCronetEngine(engine)); - }); - - group('from cronet engine future', () { - final engineFuture = CronetEngine.build( - cacheMode: CacheMode.disabled, userAgent: 'Test Agent (Future)'); - testClientConformance( - () => CronetClient.fromCronetEngineFuture(engineFuture)); - }); -} - -Future testClientFromFutureFails() async { - test('cronet engine future fails', () async { - final engineFuture = CronetEngine.build( - cacheMode: CacheMode.disk, - storagePath: '/non-existent-path/', // Will cause `build` to throw. - userAgent: 'Test Agent (Future)'); - - final client = CronetClient.fromCronetEngineFuture(engineFuture); - await expectLater( - client.get(Uri.http('example.com', '/')), - throwsA((Exception e) => - e is ClientException && - e.message.contains('Exception building CronetEngine: ' - 'Invalid argument(s): Storage path must'))); + testAll( + () { + final engine = CronetEngine.build( + cacheMode: CacheMode.disabled, userAgent: 'Test Agent (Future)'); + return CronetClient.fromCronetEngine(engine); + }, + canStreamRequestBody: false, + ); }); } @@ -52,5 +31,4 @@ void main() async { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); await testConformance(); - await testClientFromFutureFails(); } diff --git a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart index 91f85cd797..f787ebc39a 100644 --- a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart +++ b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart @@ -31,7 +31,7 @@ void testCache() { }); test('disabled', () async { - final engine = await CronetEngine.build(cacheMode: CacheMode.disabled); + final engine = CronetEngine.build(cacheMode: CacheMode.disabled); final client = CronetClient.fromCronetEngine(engine); await client.get(Uri.parse('http://localhost:${server.port}')); await client.get(Uri.parse('http://localhost:${server.port}')); @@ -39,7 +39,7 @@ void testCache() { }); test('memory', () async { - final engine = await CronetEngine.build( + final engine = CronetEngine.build( cacheMode: CacheMode.memory, cacheMaxSize: 1024 * 1024); final client = CronetClient.fromCronetEngine(engine); await client.get(Uri.parse('http://localhost:${server.port}')); @@ -48,7 +48,7 @@ void testCache() { }); test('disk', () async { - final engine = await CronetEngine.build( + final engine = CronetEngine.build( cacheMode: CacheMode.disk, cacheMaxSize: 1024 * 1024, storagePath: (await Directory.systemTemp.createTemp()).absolute.path); @@ -59,7 +59,7 @@ void testCache() { }); test('diskNoHttp', () async { - final engine = await CronetEngine.build( + final engine = CronetEngine.build( cacheMode: CacheMode.diskNoHttp, cacheMaxSize: 1024 * 1024, storagePath: (await Directory.systemTemp.createTemp()).absolute.path); @@ -76,14 +76,14 @@ void testInvalidConfigurations() { group('invalidConfigurations', () { test('no storagePath', () async { expect( - () async => await CronetEngine.build( + () async => CronetEngine.build( cacheMode: CacheMode.disk, cacheMaxSize: 1024 * 1024), throwsArgumentError); }); test('non-existing storagePath', () async { expect( - () async => await CronetEngine.build( + () async => CronetEngine.build( cacheMode: CacheMode.disk, cacheMaxSize: 1024 * 1024, storagePath: '/a/b/c/d'), @@ -112,7 +112,7 @@ void testUserAgent() { }); test('userAgent', () async { - final engine = await CronetEngine.build(userAgent: 'fake-agent'); + final engine = CronetEngine.build(userAgent: 'fake-agent'); await CronetClient.fromCronetEngine(engine) .get(Uri.parse('http://localhost:${server.port}')); expect(requestHeaders['user-agent'], ['fake-agent']); diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index fdbc6b999f..f3d17ea3d4 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -15,12 +15,9 @@ import 'book.dart'; void main() { var clientFactory = Client.new; // Constructs the default client. if (Platform.isAndroid) { - Future? engine; - clientFactory = () { - engine ??= CronetEngine.build( - cacheMode: CacheMode.memory, userAgent: 'Book Agent'); - return CronetClient.fromCronetEngineFuture(engine!); - }; + final engine = CronetEngine.build( + cacheMode: CacheMode.memory, userAgent: 'Book Agent'); + clientFactory = () => CronetClient.fromCronetEngine(engine); } runWithClient(() => runApp(const BookSearchApp()), clientFactory); } diff --git a/pkgs/cronet_http/jnigen.yaml b/pkgs/cronet_http/jnigen.yaml new file mode 100644 index 0000000000..1b2f2a7490 --- /dev/null +++ b/pkgs/cronet_http/jnigen.yaml @@ -0,0 +1,31 @@ +# Regenerate bindings with `dart run jnigen --config jnigen.yaml`. + +summarizer: + backend: asm + +android_sdk_config: + add_gradle_deps: true + android_example: 'example/' + +suspend_fun_to_async: true + +output: + bindings_type: dart_only + dart: + path: 'lib/src/jni/jni_bindings.dart' + structure: single_file + +classes: + - 'io.flutter.plugins.cronet_http.UrlRequestCallbackProxy' + - 'java.net.URL' + - 'java.nio.Buffer' + - 'java.nio.ByteBuffer' + - 'java.util.concurrent.Executors' + - 'org.chromium.net.CronetEngine' + - 'org.chromium.net.CronetException' + - 'org.chromium.net.UploadDataProviders' + - 'org.chromium.net.UrlRequest' + - 'org.chromium.net.UrlResponseInfo' + +enable_experiment: + - 'interface_implementation' diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index 3e4007eb27..a95b36dc2e 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -14,17 +14,15 @@ library; import 'dart:async'; +import 'dart:typed_data'; -import 'package:flutter/services.dart'; import 'package:http/http.dart'; +import 'package:jni/jni.dart'; -import 'messages.dart' as messages; +import 'jni/jni_bindings.dart' as jb; -final _api = messages.HttpApi(); final _digitRegex = RegExp(r'^\d+$'); -final Finalizer _cronetEngineFinalizer = Finalizer(_api.freeEngine); - /// The type of caching to use when making HTTP requests. enum CacheMode { disabled, @@ -35,9 +33,9 @@ enum CacheMode { /// An environment that can be used to make HTTP requests. class CronetEngine { - final String _engineId; + late final jb.CronetEngine _engine; - CronetEngine._(String engineId) : _engineId = engineId; + CronetEngine._(this._engine); /// Construct a new [CronetEngine] with the given configuration. /// @@ -70,7 +68,7 @@ class CronetEngine { /// should be used per [CronetEngine]. /// /// [userAgent] controls the `User-Agent` header. - static Future build( + static CronetEngine build( {CacheMode? cacheMode, int? cacheMaxSize, bool? enableBrotli, @@ -78,37 +76,65 @@ class CronetEngine { bool? enablePublicKeyPinningBypassForLocalTrustAnchors, bool? enableQuic, String? storagePath, - String? userAgent}) async { - final response = await _api.createEngine(messages.CreateEngineRequest( - cacheMode: cacheMode != null - ? messages.CacheMode.values[cacheMode.index] - : null, - cacheMaxSize: cacheMaxSize, - enableBrotli: enableBrotli, - enableHttp2: enableHttp2, - enablePublicKeyPinningBypassForLocalTrustAnchors: - enablePublicKeyPinningBypassForLocalTrustAnchors, - enableQuic: enableQuic, - storagePath: storagePath, - userAgent: userAgent)); - if (response.errorString != null) { - if (response.errorType == - messages.ExceptionType.illegalArgumentException) { - throw ArgumentError(response.errorString); + String? userAgent}) { + final builder = jb.CronetEngine_Builder( + JObject.fromRef(Jni.getCachedApplicationContext())); + + try { + if (storagePath != null) { + builder.setStoragePath(storagePath.toJString()); + } + + if (cacheMode == CacheMode.disabled) { + builder.enableHttpCache(0, 0); // HTTP_CACHE_DISABLED, 0 bytes + } else if (cacheMode != null && cacheMaxSize != null) { + builder.enableHttpCache(cacheMode.index, cacheMaxSize); + } + + if (enableBrotli != null) { + builder.enableBrotli(enableBrotli); + } + + if (enableHttp2 != null) { + builder.enableHttp2(enableHttp2); + } + + if (enablePublicKeyPinningBypassForLocalTrustAnchors != null) { + builder.enablePublicKeyPinningBypassForLocalTrustAnchors( + enablePublicKeyPinningBypassForLocalTrustAnchors); } - throw Exception(response.errorString); + + if (enableQuic != null) { + builder.enableQuic(enableQuic); + } + + if (userAgent != null) { + builder.setUserAgent(userAgent.toJString()); + } + + return CronetEngine._(builder.build()); + } on JniException catch (e) { + // TODO: Decode this exception in a better way when + // https://github.com/dart-lang/jnigen/issues/239 is fixed. + if (e.message.contains('java.lang.IllegalArgumentException:')) { + throw ArgumentError( + e.message.split('java.lang.IllegalArgumentException:').last); + } + rethrow; } - final engine = CronetEngine._(response.engineId!); - _cronetEngineFinalizer.attach(engine, engine._engineId); - return engine; } void close() { - _cronetEngineFinalizer.detach(this); - _api.freeEngine(_engineId); + _engine.shutdown(); } } +Map _cronetToClientHeaders( + JMap> cronetHeaders) => + cronetHeaders.map((key, value) => MapEntry( + key.toDartString(releaseOriginal: true).toLowerCase(), + value.join(','))); + /// A HTTP [Client] based on the /// [Cronet](https://developer.android.com/guide/topics/connectivity/cronet) /// network stack. @@ -133,9 +159,10 @@ class CronetEngine { /// } /// } /// ``` +/// class CronetClient extends BaseClient { + static final _executor = jb.Executors.newCachedThreadPool(); CronetEngine? _engine; - Future? _engineFuture; bool _isClosed = false; /// Indicates that [_engine] was constructed as an implementation detail for @@ -143,14 +170,16 @@ class CronetClient extends BaseClient { /// should be closed when this [CronetClient] is closed. final bool _ownedEngine; - CronetClient._(this._engineFuture, this._ownedEngine); + CronetClient._(this._engine, this._ownedEngine) { + Jni.initDLApi(); + } /// A [CronetClient] that will be initialized with a new [CronetEngine]. factory CronetClient.defaultCronetEngine() => CronetClient._(null, true); /// A [CronetClient] configured with a [CronetEngine]. factory CronetClient.fromCronetEngine(CronetEngine engine) => - CronetClient._(Future.value(engine), false); + CronetClient._(engine, false); /// A [CronetClient] configured with a [Future] containing a [CronetEngine]. /// @@ -168,9 +197,6 @@ class CronetClient extends BaseClient { /// runWithClient(() => runApp(const BookSearchApp()), clientFactory); /// } /// ``` - factory CronetClient.fromCronetEngineFuture(Future engine) => - CronetClient._(engine, false); - @override void close() { if (!_isClosed && _ownedEngine) { @@ -186,26 +212,115 @@ class CronetClient extends BaseClient { 'HTTP request failed. Client is already closed.', request.url); } - if (_engine == null) { - // Create the future here rather than in the [fromCronetEngineFuture] - // factory so that [close] does not have to await the future just to - // close it in the case where [send] is never called. - // - // Assign to _engineFuture instead of just `await`ing the result of - // `CronetEngine.build()` to prevent concurrent executions of `send` - // from creating multiple [CronetEngine]s. - _engineFuture ??= CronetEngine.build(); - try { - _engine = await _engineFuture; - } catch (e) { - throw ClientException( - 'Exception building CronetEngine: ${e.toString()}', request.url); - } - } + _engine ??= CronetEngine.build(); final stream = request.finalize(); - final body = await stream.toBytes(); + final responseCompleter = Completer(); + final engine = _engine!._engine; + + late jb.UrlRequest cronetRequest; + var numRedirects = 0; + StreamController>? responseStream; + jb.ByteBuffer? byteBuffer; + + // The order of callbacks generated by Cronet is documented here: + // https://developer.android.com/guide/topics/connectivity/cronet/lifecycle + + final cronetCallbacks = + jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface.implement( + jb.$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl( + onResponseStarted: (urlRequest, responseInfo) { + responseStream = StreamController(); + final responseHeaders = + _cronetToClientHeaders(responseInfo.getAllHeaders()); + int? contentLength; + + switch (responseHeaders['content-length']) { + case final contentLengthHeader? + when !_digitRegex.hasMatch(contentLengthHeader): + responseCompleter.completeError(ClientException( + 'Invalid content-length header [$contentLengthHeader].', + request.url, + )); + urlRequest.cancel(); + return; + case final contentLengthHeader?: + contentLength = int.parse(contentLengthHeader); + } + responseCompleter.complete(StreamedResponse( + responseStream!.stream, + responseInfo.getHttpStatusCode(), + contentLength: contentLength, + reasonPhrase: responseInfo + .getHttpStatusText() + .toDartString(releaseOriginal: true), + request: request, + isRedirect: false, + headers: responseHeaders, + )); + + byteBuffer = jb.ByteBuffer.allocateDirect(1024 * 1024); + urlRequest.read(byteBuffer!); + }, + onRedirectReceived: (urlRequest, responseInfo, newLocationUrl) { + if (!request.followRedirects) { + cronetRequest.cancel(); + responseCompleter.complete(StreamedResponse( + const Stream.empty(), // Cronet provides no body for redirects. + responseInfo.getHttpStatusCode(), + contentLength: 0, + reasonPhrase: responseInfo + .getHttpStatusText() + .toDartString(releaseOriginal: true), + request: request, + isRedirect: true, + headers: _cronetToClientHeaders(responseInfo.getAllHeaders()))); + return; + } + ++numRedirects; + if (numRedirects <= request.maxRedirects) { + cronetRequest.followRedirect(); + } else { + cronetRequest.cancel(); + responseCompleter.completeError( + ClientException('Redirect limit exceeded', request.url)); + } + }, + onReadCompleted: (urlRequest, responseInfo, byteBuffer) { + byteBuffer.flip(); + + final remaining = byteBuffer.remaining(); + final data = Uint8List(remaining); + // TODO: Use a more efficient approach when + // https://github.com/dart-lang/jnigen/issues/387 is fixed. + for (var i = 0; i < remaining; ++i) { + data[i] = byteBuffer.get1(i); + } + responseStream!.add(data); + byteBuffer.clear(); + cronetRequest.read(byteBuffer); + }, + onSucceeded: (urlRequest, responseInfo) { + responseStream!.sink.close(); + }, + onFailed: (urlRequest, responseInfo, cronetException) { + final error = ClientException( + 'Cronet exception: ${cronetException.toString()}', request.url); + if (responseStream == null) { + responseCompleter.completeError(error); + } else { + responseStream!.addError(error); + responseStream!.close(); + } + }, + )); + + final builder = engine.newUrlRequestBuilder( + request.url.toString().toJString(), + jb.UrlRequestCallbackProxy.new1(cronetCallbacks), + _executor, + ); var headers = request.headers; if (body.isNotEmpty && @@ -214,76 +329,19 @@ class CronetClient extends BaseClient { // 'Content-Type' header. headers = {...headers, 'content-type': 'application/octet-stream'}; } + headers.forEach((k, v) => builder.addHeader(k.toJString(), v.toJString())); - final response = await _api.start(messages.StartRequest( - engineId: _engine!._engineId, - url: request.url.toString(), - method: request.method, - headers: headers, - body: body, - followRedirects: request.followRedirects, - maxRedirects: request.maxRedirects, - )); - - final responseCompleter = Completer(); - final responseDataController = StreamController(); - - void raiseException(Exception exception) { - if (responseCompleter.isCompleted) { - responseDataController.addError(exception); - } else { - responseCompleter.completeError(exception); + if (body.isNotEmpty) { + // TODO: Use a more efficient approach when + // https://github.com/dart-lang/jnigen/issues/387 is fixed. + final bodyBytes = JArray(jbyte.type, body.length); + for (var i = 0; i < body.length; ++i) { + bodyBytes[i] = body[i]; } - responseDataController.close(); - } - - final e = EventChannel(response.eventChannel); - e.receiveBroadcastStream().listen( - (e) { - final event = messages.EventMessage.decode(e as Object); - switch (event.type) { - case messages.EventMessageType.responseStarted: - responseCompleter.complete(event.responseStarted!); - break; - case messages.EventMessageType.readCompleted: - responseDataController.sink.add(event.readCompleted!.data); - break; - case messages.EventMessageType.tooManyRedirects: - raiseException( - ClientException('Redirect limit exceeded', request.url)); - break; - default: - throw UnsupportedError('Unexpected event: ${event.type}'); - } - }, - onDone: responseDataController.close, - onError: (Object e) { - final pe = e as PlatformException; - raiseException(ClientException(pe.message!, request.url)); - }); - - final result = await responseCompleter.future; - final responseHeaders = result.headers - .cast>() - .map((key, value) => MapEntry(key.toLowerCase(), value.join(','))); - - int? contentLength; - switch (responseHeaders['content-length']) { - case final contentLengthHeader? - when !_digitRegex.hasMatch(contentLengthHeader): - throw ClientException( - 'Invalid content-length header [$contentLengthHeader].', - request.url, - ); - case final contentLengthHeader?: - contentLength = int.parse(contentLengthHeader); + builder.setUploadDataProvider( + jb.UploadDataProviders.create4(bodyBytes), _executor); } - - return StreamedResponse(responseDataController.stream, result.statusCode, - contentLength: contentLength, - reasonPhrase: result.statusText, - request: request, - isRedirect: result.isRedirect, - headers: responseHeaders); + cronetRequest = builder.build()..start(); + return responseCompleter.future.whenComplete(() => byteBuffer?.release()); } } diff --git a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart new file mode 100644 index 0000000000..2479675771 --- /dev/null +++ b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart @@ -0,0 +1,3954 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +import 'dart:ffi' as ffi; +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: file_names +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: lines_longer_than_80_chars + +import 'dart:isolate' show ReceivePort; + +import 'package:jni/internal_helpers_for_jnigen.dart'; +import 'package:jni/jni.dart' as jni; + +/// from: io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface +class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { + @override + late final jni.JObjType + $type = type; + + UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = jni.Jni.findJClass( + r'io/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface'); + + /// The type which includes information such as the signature of this class. + static const type = + $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType(); + static final _id_onRedirectReceived = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onRedirectReceived', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V'); + + /// from: public abstract void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string) + void onRedirectReceived( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + jni.JString string, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, _id_onRedirectReceived, jni.JniCallType.voidType, [ + urlRequest.reference, + urlResponseInfo.reference, + string.reference + ]).check(); + + static final _id_onResponseStarted = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onResponseStarted', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + + /// from: public abstract void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + void onResponseStarted( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_onResponseStarted, + jni.JniCallType.voidType, + [urlRequest.reference, urlResponseInfo.reference]).check(); + + static final _id_onReadCompleted = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onReadCompleted', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V'); + + /// from: public abstract void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer) + void onReadCompleted( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + ByteBuffer byteBuffer, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, _id_onReadCompleted, jni.JniCallType.voidType, [ + urlRequest.reference, + urlResponseInfo.reference, + byteBuffer.reference + ]).check(); + + static final _id_onSucceeded = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onSucceeded', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + + /// from: public abstract void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + void onSucceeded( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_onSucceeded, + jni.JniCallType.voidType, + [urlRequest.reference, urlResponseInfo.reference]).check(); + + static final _id_onFailed = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onFailed', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V'); + + /// from: public abstract void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException) + void onFailed( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + CronetException cronetException, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, _id_onFailed, jni.JniCallType.voidType, [ + urlRequest.reference, + urlResponseInfo.reference, + cronetException.reference + ]).check(); + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) => + _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == + r'onRedirectReceived(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V') { + _$impls[$p]!.onRedirectReceived( + $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), + $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), + $a[2].castTo(const jni.JStringType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == + r'onResponseStarted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V') { + _$impls[$p]!.onResponseStarted( + $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), + $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == + r'onReadCompleted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V') { + _$impls[$p]!.onReadCompleted( + $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), + $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), + $a[2].castTo(const $ByteBufferType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == + r'onSucceeded(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V') { + _$impls[$p]!.onSucceeded( + $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), + $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == + r'onFailed(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V') { + _$impls[$p]!.onFailed( + $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), + $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), + $a[2].castTo(const $CronetExceptionType(), releaseOriginal: true), + ); + return jni.nullptr; + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e.toString()); + } + return jni.nullptr; + } + + factory UrlRequestCallbackProxy_UrlRequestCallbackInterface.implement( + $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl $impl, + ) { + final $p = ReceivePort(); + final $x = UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromRef( + ProtectedJniExtensions.newPortProxy( + r'io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface', + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl { + factory $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl({ + required void Function(UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, jni.JString string) + onRedirectReceived, + required void Function( + UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) + onResponseStarted, + required void Function(UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, ByteBuffer byteBuffer) + onReadCompleted, + required void Function( + UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) + onSucceeded, + required void Function(UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, CronetException cronetException) + onFailed, + }) = _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl; + + void onRedirectReceived(UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, jni.JString string); + void onResponseStarted( + UrlRequest urlRequest, UrlResponseInfo urlResponseInfo); + void onReadCompleted(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, + ByteBuffer byteBuffer); + void onSucceeded(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo); + void onFailed(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, + CronetException cronetException); +} + +class _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl + implements $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl { + _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl({ + required void Function(UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, jni.JString string) + onRedirectReceived, + required void Function( + UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) + onResponseStarted, + required void Function(UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, ByteBuffer byteBuffer) + onReadCompleted, + required void Function( + UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) + onSucceeded, + required void Function(UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, CronetException cronetException) + onFailed, + }) : _onRedirectReceived = onRedirectReceived, + _onResponseStarted = onResponseStarted, + _onReadCompleted = onReadCompleted, + _onSucceeded = onSucceeded, + _onFailed = onFailed; + + final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, + jni.JString string) _onRedirectReceived; + final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) + _onResponseStarted; + final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, + ByteBuffer byteBuffer) _onReadCompleted; + final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) + _onSucceeded; + final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, + CronetException cronetException) _onFailed; + + void onRedirectReceived(UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, jni.JString string) => + _onRedirectReceived(urlRequest, urlResponseInfo, string); + + void onResponseStarted( + UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) => + _onResponseStarted(urlRequest, urlResponseInfo); + + void onReadCompleted(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, + ByteBuffer byteBuffer) => + _onReadCompleted(urlRequest, urlResponseInfo, byteBuffer); + + void onSucceeded(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) => + _onSucceeded(urlRequest, urlResponseInfo); + + void onFailed(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, + CronetException cronetException) => + _onFailed(urlRequest, urlResponseInfo, cronetException); +} + +class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType + extends jni.JObjType { + const $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType(); + + @override + String get signature => + r'Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;'; + + @override + UrlRequestCallbackProxy_UrlRequestCallbackInterface fromRef( + jni.JObjectPtr ref) => + UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => + ($UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == + $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType && + other is $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType; +} + +/// from: io.flutter.plugins.cronet_http.UrlRequestCallbackProxy +class UrlRequestCallbackProxy extends UrlRequest_Callback { + @override + late final jni.JObjType $type = type; + + UrlRequestCallbackProxy.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = jni.Jni.findJClass( + r'io/flutter/plugins/cronet_http/UrlRequestCallbackProxy'); + + /// The type which includes information such as the signature of this class. + static const type = $UrlRequestCallbackProxyType(); + static final _id_new1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'', + r'(Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;)V'); + + /// from: public void (io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface urlRequestCallbackInterface) + /// The returned object must be released after use, by calling the [release] method. + factory UrlRequestCallbackProxy.new1( + UrlRequestCallbackProxy_UrlRequestCallbackInterface + urlRequestCallbackInterface, + ) => + UrlRequestCallbackProxy.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, + _id_new1, + [urlRequestCallbackInterface.reference]).object); + + static final _id_getCallback = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'getCallback', + r'()Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;'); + + /// from: public final io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface getCallback() + /// The returned object must be released after use, by calling the [release] method. + UrlRequestCallbackProxy_UrlRequestCallbackInterface getCallback() => + const $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType().fromRef( + jni.Jni.accessors.callMethodWithArgs(reference, _id_getCallback, + jni.JniCallType.objectType, []).object); + + static final _id_onRedirectReceived = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onRedirectReceived', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V'); + + /// from: public void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string) + void onRedirectReceived( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + jni.JString string, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, _id_onRedirectReceived, jni.JniCallType.voidType, [ + urlRequest.reference, + urlResponseInfo.reference, + string.reference + ]).check(); + + static final _id_onResponseStarted = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onResponseStarted', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + + /// from: public void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + void onResponseStarted( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_onResponseStarted, + jni.JniCallType.voidType, + [urlRequest.reference, urlResponseInfo.reference]).check(); + + static final _id_onReadCompleted = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onReadCompleted', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V'); + + /// from: public void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer) + void onReadCompleted( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + ByteBuffer byteBuffer, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, _id_onReadCompleted, jni.JniCallType.voidType, [ + urlRequest.reference, + urlResponseInfo.reference, + byteBuffer.reference + ]).check(); + + static final _id_onSucceeded = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onSucceeded', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + + /// from: public void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + void onSucceeded( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_onSucceeded, + jni.JniCallType.voidType, + [urlRequest.reference, urlResponseInfo.reference]).check(); + + static final _id_onFailed = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onFailed', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V'); + + /// from: public void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException) + void onFailed( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + CronetException cronetException, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, _id_onFailed, jni.JniCallType.voidType, [ + urlRequest.reference, + urlResponseInfo.reference, + cronetException.reference + ]).check(); +} + +class $UrlRequestCallbackProxyType + extends jni.JObjType { + const $UrlRequestCallbackProxyType(); + + @override + String get signature => + r'Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy;'; + + @override + UrlRequestCallbackProxy fromRef(jni.JObjectPtr ref) => + UrlRequestCallbackProxy.fromRef(ref); + + @override + jni.JObjType get superType => const $UrlRequest_CallbackType(); + + @override + final superCount = 2; + + @override + int get hashCode => ($UrlRequestCallbackProxyType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $UrlRequestCallbackProxyType && + other is $UrlRequestCallbackProxyType; +} + +/// from: java.net.URL +class URL extends jni.JObject { + @override + late final jni.JObjType $type = type; + + URL.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = jni.Jni.findJClass(r'java/net/URL'); + + /// The type which includes information such as the signature of this class. + static const type = $URLType(); + static final _id_new0 = jni.Jni.accessors.getMethodIDOf(_class.reference, + r'', r'(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V'); + + /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2) + /// The returned object must be released after use, by calling the [release] method. + factory URL( + jni.JString string, + jni.JString string1, + int i, + jni.JString string2, + ) => + URL.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, _id_new0, [ + string.reference, + string1.reference, + jni.JValueInt(i), + string2.reference + ]).object); + + static final _id_new1 = jni.Jni.accessors.getMethodIDOf(_class.reference, + r'', r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V'); + + /// from: public void (java.lang.String string, java.lang.String string1, java.lang.String string2) + /// The returned object must be released after use, by calling the [release] method. + factory URL.new1( + jni.JString string, + jni.JString string1, + jni.JString string2, + ) => + URL.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, + _id_new1, + [string.reference, string1.reference, string2.reference]).object); + + static final _id_new2 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'', + r'(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V'); + + /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2, java.net.URLStreamHandler uRLStreamHandler) + /// The returned object must be released after use, by calling the [release] method. + factory URL.new2( + jni.JString string, + jni.JString string1, + int i, + jni.JString string2, + jni.JObject uRLStreamHandler, + ) => + URL.fromRef( + jni.Jni.accessors.newObjectWithArgs(_class.reference, _id_new2, [ + string.reference, + string1.reference, + jni.JValueInt(i), + string2.reference, + uRLStreamHandler.reference + ]).object); + + static final _id_new3 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'', r'(Ljava/lang/String;)V'); + + /// from: public void (java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + factory URL.new3( + jni.JString string, + ) => + URL.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, _id_new3, [string.reference]).object); + + static final _id_new4 = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'', r'(Ljava/net/URL;Ljava/lang/String;)V'); + + /// from: public void (java.net.URL uRL, java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + factory URL.new4( + URL uRL, + jni.JString string, + ) => + URL.fromRef(jni.Jni.accessors.newObjectWithArgs(_class.reference, + _id_new4, [uRL.reference, string.reference]).object); + + static final _id_new5 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'', + r'(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V'); + + /// from: public void (java.net.URL uRL, java.lang.String string, java.net.URLStreamHandler uRLStreamHandler) + /// The returned object must be released after use, by calling the [release] method. + factory URL.new5( + URL uRL, + jni.JString string, + jni.JObject uRLStreamHandler, + ) => + URL.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, _id_new5, [ + uRL.reference, + string.reference, + uRLStreamHandler.reference + ]).object); + + static final _id_getQuery = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getQuery', r'()Ljava/lang/String;'); + + /// from: public java.lang.String getQuery() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getQuery() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getQuery, jni.JniCallType.objectType, []).object); + + static final _id_getPath = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getPath', r'()Ljava/lang/String;'); + + /// from: public java.lang.String getPath() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getPath() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getPath, jni.JniCallType.objectType, []).object); + + static final _id_getUserInfo = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getUserInfo', r'()Ljava/lang/String;'); + + /// from: public java.lang.String getUserInfo() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getUserInfo() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getUserInfo, jni.JniCallType.objectType, []).object); + + static final _id_getAuthority = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'getAuthority', r'()Ljava/lang/String;'); + + /// from: public java.lang.String getAuthority() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getAuthority() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getAuthority, jni.JniCallType.objectType, []).object); + + static final _id_getPort = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getPort', r'()I'); + + /// from: public int getPort() + int getPort() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_getPort, jni.JniCallType.intType, []).integer; + + static final _id_getDefaultPort = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getDefaultPort', r'()I'); + + /// from: public int getDefaultPort() + int getDefaultPort() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_getDefaultPort, jni.JniCallType.intType, []).integer; + + static final _id_getProtocol = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getProtocol', r'()Ljava/lang/String;'); + + /// from: public java.lang.String getProtocol() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getProtocol() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getProtocol, jni.JniCallType.objectType, []).object); + + static final _id_getHost = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getHost', r'()Ljava/lang/String;'); + + /// from: public java.lang.String getHost() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getHost() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getHost, jni.JniCallType.objectType, []).object); + + static final _id_getFile = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getFile', r'()Ljava/lang/String;'); + + /// from: public java.lang.String getFile() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getFile() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getFile, jni.JniCallType.objectType, []).object); + + static final _id_getRef = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getRef', r'()Ljava/lang/String;'); + + /// from: public java.lang.String getRef() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getRef() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getRef, jni.JniCallType.objectType, []).object); + + static final _id_equals1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'equals', r'(Ljava/lang/Object;)Z'); + + /// from: public boolean equals(java.lang.Object object) + bool equals1( + jni.JObject object, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_equals1, + jni.JniCallType.booleanType, [object.reference]).boolean; + + static final _id_hashCode1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'hashCode', r'()I'); + + /// from: public int hashCode() + int hashCode1() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_hashCode1, jni.JniCallType.intType, []).integer; + + static final _id_sameFile = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'sameFile', r'(Ljava/net/URL;)Z'); + + /// from: public boolean sameFile(java.net.URL uRL) + bool sameFile( + URL uRL, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_sameFile, + jni.JniCallType.booleanType, [uRL.reference]).boolean; + + static final _id_toString1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'toString', r'()Ljava/lang/String;'); + + /// from: public java.lang.String toString() + /// The returned object must be released after use, by calling the [release] method. + jni.JString toString1() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_toString1, jni.JniCallType.objectType, []).object); + + static final _id_toExternalForm = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'toExternalForm', r'()Ljava/lang/String;'); + + /// from: public java.lang.String toExternalForm() + /// The returned object must be released after use, by calling the [release] method. + jni.JString toExternalForm() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_toExternalForm, + jni.JniCallType.objectType, []).object); + + static final _id_toURI = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'toURI', r'()Ljava/net/URI;'); + + /// from: public java.net.URI toURI() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject toURI() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_toURI, jni.JniCallType.objectType, []).object); + + static final _id_openConnection = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'openConnection', r'()Ljava/net/URLConnection;'); + + /// from: public java.net.URLConnection openConnection() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject openConnection() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_openConnection, + jni.JniCallType.objectType, []).object); + + static final _id_openConnection1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'openConnection', + r'(Ljava/net/Proxy;)Ljava/net/URLConnection;'); + + /// from: public java.net.URLConnection openConnection(java.net.Proxy proxy) + /// The returned object must be released after use, by calling the [release] method. + jni.JObject openConnection1( + jni.JObject proxy, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_openConnection1, + jni.JniCallType.objectType, + [proxy.reference]).object); + + static final _id_openStream = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'openStream', r'()Ljava/io/InputStream;'); + + /// from: public java.io.InputStream openStream() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject openStream() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_openStream, jni.JniCallType.objectType, []).object); + + static final _id_getContent = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getContent', r'()Ljava/lang/Object;'); + + /// from: public java.lang.Object getContent() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject getContent() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getContent, jni.JniCallType.objectType, []).object); + + static final _id_getContent1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'getContent', + r'([Ljava/lang/Class;)Ljava/lang/Object;'); + + /// from: public java.lang.Object getContent(java.lang.Class[] classs) + /// The returned object must be released after use, by calling the [release] method. + jni.JObject getContent1( + jni.JArray classs, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getContent1, + jni.JniCallType.objectType, + [classs.reference]).object); + + static final _id_setURLStreamHandlerFactory = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r'setURLStreamHandlerFactory', + r'(Ljava/net/URLStreamHandlerFactory;)V'); + + /// from: static public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory uRLStreamHandlerFactory) + static void setURLStreamHandlerFactory( + jni.JObject uRLStreamHandlerFactory, + ) => + jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_setURLStreamHandlerFactory, + jni.JniCallType.voidType, + [uRLStreamHandlerFactory.reference]).check(); +} + +class $URLType extends jni.JObjType { + const $URLType(); + + @override + String get signature => r'Ljava/net/URL;'; + + @override + URL fromRef(jni.JObjectPtr ref) => URL.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($URLType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $URLType && other is $URLType; +} + +/// from: java.nio.Buffer +class Buffer extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Buffer.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = jni.Jni.findJClass(r'java/nio/Buffer'); + + /// The type which includes information such as the signature of this class. + static const type = $BufferType(); + static final _id_capacity = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'capacity', r'()I'); + + /// from: public final int capacity() + int capacity() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_capacity, jni.JniCallType.intType, []).integer; + + static final _id_position = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'position', r'()I'); + + /// from: public final int position() + int position() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_position, jni.JniCallType.intType, []).integer; + + static final _id_position1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'position', r'(I)Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer position(int i) + /// The returned object must be released after use, by calling the [release] method. + Buffer position1( + int i, + ) => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_position1, + jni.JniCallType.objectType, + [jni.JValueInt(i)]).object); + + static final _id_limit = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'limit', r'()I'); + + /// from: public final int limit() + int limit() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_limit, jni.JniCallType.intType, []).integer; + + static final _id_limit1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'limit', r'(I)Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer limit(int i) + /// The returned object must be released after use, by calling the [release] method. + Buffer limit1( + int i, + ) => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_limit1, + jni.JniCallType.objectType, + [jni.JValueInt(i)]).object); + + static final _id_mark = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'mark', r'()Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer mark() + /// The returned object must be released after use, by calling the [release] method. + Buffer mark() => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_mark, jni.JniCallType.objectType, []).object); + + static final _id_reset = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'reset', r'()Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer reset() + /// The returned object must be released after use, by calling the [release] method. + Buffer reset() => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_reset, jni.JniCallType.objectType, []).object); + + static final _id_clear = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'clear', r'()Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer clear() + /// The returned object must be released after use, by calling the [release] method. + Buffer clear() => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_clear, jni.JniCallType.objectType, []).object); + + static final _id_flip = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'flip', r'()Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer flip() + /// The returned object must be released after use, by calling the [release] method. + Buffer flip() => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_flip, jni.JniCallType.objectType, []).object); + + static final _id_rewind = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'rewind', r'()Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer rewind() + /// The returned object must be released after use, by calling the [release] method. + Buffer rewind() => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_rewind, jni.JniCallType.objectType, []).object); + + static final _id_remaining = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'remaining', r'()I'); + + /// from: public final int remaining() + int remaining() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_remaining, jni.JniCallType.intType, []).integer; + + static final _id_hasRemaining = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'hasRemaining', r'()Z'); + + /// from: public final boolean hasRemaining() + bool hasRemaining() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_hasRemaining, jni.JniCallType.booleanType, []).boolean; + + static final _id_isReadOnly = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'isReadOnly', r'()Z'); + + /// from: public abstract boolean isReadOnly() + bool isReadOnly() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_isReadOnly, jni.JniCallType.booleanType, []).boolean; + + static final _id_hasArray = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'hasArray', r'()Z'); + + /// from: public abstract boolean hasArray() + bool hasArray() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_hasArray, jni.JniCallType.booleanType, []).boolean; + + static final _id_array = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'array', r'()Ljava/lang/Object;'); + + /// from: public abstract java.lang.Object array() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject array() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_array, jni.JniCallType.objectType, []).object); + + static final _id_arrayOffset = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'arrayOffset', r'()I'); + + /// from: public abstract int arrayOffset() + int arrayOffset() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_arrayOffset, jni.JniCallType.intType, []).integer; + + static final _id_isDirect = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'isDirect', r'()Z'); + + /// from: public abstract boolean isDirect() + bool isDirect() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_isDirect, jni.JniCallType.booleanType, []).boolean; +} + +class $BufferType extends jni.JObjType { + const $BufferType(); + + @override + String get signature => r'Ljava/nio/Buffer;'; + + @override + Buffer fromRef(jni.JObjectPtr ref) => Buffer.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($BufferType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $BufferType && other is $BufferType; +} + +/// from: java.nio.ByteBuffer +class ByteBuffer extends Buffer { + @override + late final jni.JObjType $type = type; + + ByteBuffer.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = jni.Jni.findJClass(r'java/nio/ByteBuffer'); + + /// The type which includes information such as the signature of this class. + static const type = $ByteBufferType(); + static final _id_allocateDirect = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r'allocateDirect', r'(I)Ljava/nio/ByteBuffer;'); + + /// from: static public java.nio.ByteBuffer allocateDirect(int i) + /// The returned object must be released after use, by calling the [release] method. + static ByteBuffer allocateDirect( + int i, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_allocateDirect, + jni.JniCallType.objectType, [jni.JValueInt(i)]).object); + + static final _id_allocate = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r'allocate', r'(I)Ljava/nio/ByteBuffer;'); + + /// from: static public java.nio.ByteBuffer allocate(int i) + /// The returned object must be released after use, by calling the [release] method. + static ByteBuffer allocate( + int i, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_allocate, + jni.JniCallType.objectType, [jni.JValueInt(i)]).object); + + static final _id_wrap = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r'wrap', r'([BII)Ljava/nio/ByteBuffer;'); + + /// from: static public java.nio.ByteBuffer wrap(byte[] bs, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + static ByteBuffer wrap( + jni.JArray bs, + int i, + int i1, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_wrap, + jni.JniCallType.objectType, + [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).object); + + static final _id_wrap1 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, r'wrap', r'([B)Ljava/nio/ByteBuffer;'); + + /// from: static public java.nio.ByteBuffer wrap(byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + static ByteBuffer wrap1( + jni.JArray bs, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_wrap1, + jni.JniCallType.objectType, [bs.reference]).object); + + static final _id_slice = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'slice', r'()Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer slice() + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer slice() => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_slice, jni.JniCallType.objectType, []).object); + + static final _id_duplicate = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'duplicate', r'()Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer duplicate() + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer duplicate() => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_duplicate, jni.JniCallType.objectType, []).object); + + static final _id_asReadOnlyBuffer = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'asReadOnlyBuffer', r'()Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer asReadOnlyBuffer() + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer asReadOnlyBuffer() => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_asReadOnlyBuffer, + jni.JniCallType.objectType, []).object); + + static final _id_get0 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'get', r'()B'); + + /// from: public abstract byte get() + int get0() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_get0, jni.JniCallType.byteType, []).byte; + + static final _id_put = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'put', r'(B)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer put(byte b) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer put( + int b, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_put, + jni.JniCallType.objectType, + [jni.JValueByte(b)]).object); + + static final _id_get1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'get', r'(I)B'); + + /// from: public abstract byte get(int i) + int get1( + int i, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_get1, + jni.JniCallType.byteType, [jni.JValueInt(i)]).byte; + + static final _id_put1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'put', r'(IB)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer put(int i, byte b) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer put1( + int i, + int b, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_put1, + jni.JniCallType.objectType, + [jni.JValueInt(i), jni.JValueByte(b)]).object); + + static final _id_get2 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'get', r'([BII)Ljava/nio/ByteBuffer;'); + + /// from: public java.nio.ByteBuffer get(byte[] bs, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer get2( + jni.JArray bs, + int i, + int i1, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_get2, + jni.JniCallType.objectType, + [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).object); + + static final _id_get3 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'get', r'([B)Ljava/nio/ByteBuffer;'); + + /// from: public java.nio.ByteBuffer get(byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer get3( + jni.JArray bs, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_get3, + jni.JniCallType.objectType, + [bs.reference]).object); + + static final _id_put2 = jni.Jni.accessors.getMethodIDOf(_class.reference, + r'put', r'(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;'); + + /// from: public java.nio.ByteBuffer put(java.nio.ByteBuffer byteBuffer) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer put2( + ByteBuffer byteBuffer, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_put2, + jni.JniCallType.objectType, + [byteBuffer.reference]).object); + + static final _id_put3 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'put', r'([BII)Ljava/nio/ByteBuffer;'); + + /// from: public java.nio.ByteBuffer put(byte[] bs, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer put3( + jni.JArray bs, + int i, + int i1, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_put3, + jni.JniCallType.objectType, + [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).object); + + static final _id_put4 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'put', r'([B)Ljava/nio/ByteBuffer;'); + + /// from: public final java.nio.ByteBuffer put(byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer put4( + jni.JArray bs, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_put4, + jni.JniCallType.objectType, + [bs.reference]).object); + + static final _id_hasArray = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'hasArray', r'()Z'); + + /// from: public final boolean hasArray() + bool hasArray() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_hasArray, jni.JniCallType.booleanType, []).boolean; + + static final _id_array1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'array', r'()[B'); + + /// from: public final byte[] array() + /// The returned object must be released after use, by calling the [release] method. + jni.JArray array1() => const jni.JArrayType(jni.jbyteType()) + .fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_array1, jni.JniCallType.objectType, []).object); + + static final _id_arrayOffset = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'arrayOffset', r'()I'); + + /// from: public final int arrayOffset() + int arrayOffset() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_arrayOffset, jni.JniCallType.intType, []).integer; + + static final _id_position1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'position', r'(I)Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer position(int i) + /// The returned object must be released after use, by calling the [release] method. + Buffer position1( + int i, + ) => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_position1, + jni.JniCallType.objectType, + [jni.JValueInt(i)]).object); + + static final _id_limit1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'limit', r'(I)Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer limit(int i) + /// The returned object must be released after use, by calling the [release] method. + Buffer limit1( + int i, + ) => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_limit1, + jni.JniCallType.objectType, + [jni.JValueInt(i)]).object); + + static final _id_mark = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'mark', r'()Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer mark() + /// The returned object must be released after use, by calling the [release] method. + Buffer mark() => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_mark, jni.JniCallType.objectType, []).object); + + static final _id_reset = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'reset', r'()Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer reset() + /// The returned object must be released after use, by calling the [release] method. + Buffer reset() => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_reset, jni.JniCallType.objectType, []).object); + + static final _id_clear = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'clear', r'()Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer clear() + /// The returned object must be released after use, by calling the [release] method. + Buffer clear() => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_clear, jni.JniCallType.objectType, []).object); + + static final _id_flip = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'flip', r'()Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer flip() + /// The returned object must be released after use, by calling the [release] method. + Buffer flip() => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_flip, jni.JniCallType.objectType, []).object); + + static final _id_rewind = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'rewind', r'()Ljava/nio/Buffer;'); + + /// from: public java.nio.Buffer rewind() + /// The returned object must be released after use, by calling the [release] method. + Buffer rewind() => + const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_rewind, jni.JniCallType.objectType, []).object); + + static final _id_compact = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'compact', r'()Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer compact() + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer compact() => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_compact, jni.JniCallType.objectType, []).object); + + static final _id_isDirect = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'isDirect', r'()Z'); + + /// from: public abstract boolean isDirect() + bool isDirect() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_isDirect, jni.JniCallType.booleanType, []).boolean; + + static final _id_toString1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'toString', r'()Ljava/lang/String;'); + + /// from: public java.lang.String toString() + /// The returned object must be released after use, by calling the [release] method. + jni.JString toString1() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_toString1, jni.JniCallType.objectType, []).object); + + static final _id_hashCode1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'hashCode', r'()I'); + + /// from: public int hashCode() + int hashCode1() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_hashCode1, jni.JniCallType.intType, []).integer; + + static final _id_equals1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'equals', r'(Ljava/lang/Object;)Z'); + + /// from: public boolean equals(java.lang.Object object) + bool equals1( + jni.JObject object, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_equals1, + jni.JniCallType.booleanType, [object.reference]).boolean; + + static final _id_compareTo = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'compareTo', r'(Ljava/nio/ByteBuffer;)I'); + + /// from: public int compareTo(java.nio.ByteBuffer byteBuffer) + int compareTo( + ByteBuffer byteBuffer, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_compareTo, + jni.JniCallType.intType, [byteBuffer.reference]).integer; + + static final _id_order = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'order', r'()Ljava/nio/ByteOrder;'); + + /// from: public final java.nio.ByteOrder order() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject order() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_order, jni.JniCallType.objectType, []).object); + + static final _id_order1 = jni.Jni.accessors.getMethodIDOf(_class.reference, + r'order', r'(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;'); + + /// from: public final java.nio.ByteBuffer order(java.nio.ByteOrder byteOrder) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer order1( + jni.JObject byteOrder, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_order1, + jni.JniCallType.objectType, + [byteOrder.reference]).object); + + static final _id_alignmentOffset = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'alignmentOffset', r'(II)I'); + + /// from: public final int alignmentOffset(int i, int i1) + int alignmentOffset( + int i, + int i1, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_alignmentOffset, + jni.JniCallType.intType, + [jni.JValueInt(i), jni.JValueInt(i1)]).integer; + + static final _id_alignedSlice = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'alignedSlice', r'(I)Ljava/nio/ByteBuffer;'); + + /// from: public final java.nio.ByteBuffer alignedSlice(int i) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer alignedSlice( + int i, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_alignedSlice, + jni.JniCallType.objectType, + [jni.JValueInt(i)]).object); + + static final _id_getChar = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getChar', r'()C'); + + /// from: public abstract char getChar() + int getChar() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_getChar, jni.JniCallType.charType, []).char; + + static final _id_putChar = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'putChar', r'(C)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer putChar(char c) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer putChar( + int c, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_putChar, + jni.JniCallType.objectType, + [jni.JValueChar(c)]).object); + + static final _id_getChar1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getChar', r'(I)C'); + + /// from: public abstract char getChar(int i) + int getChar1( + int i, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_getChar1, + jni.JniCallType.charType, [jni.JValueInt(i)]).char; + + static final _id_putChar1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'putChar', r'(IC)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer putChar(int i, char c) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer putChar1( + int i, + int c, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_putChar1, + jni.JniCallType.objectType, + [jni.JValueInt(i), jni.JValueChar(c)]).object); + + static final _id_asCharBuffer = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'asCharBuffer', r'()Ljava/nio/CharBuffer;'); + + /// from: public abstract java.nio.CharBuffer asCharBuffer() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject asCharBuffer() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_asCharBuffer, jni.JniCallType.objectType, []).object); + + static final _id_getShort = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getShort', r'()S'); + + /// from: public abstract short getShort() + int getShort() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_getShort, jni.JniCallType.shortType, []).short; + + static final _id_putShort = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'putShort', r'(S)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer putShort(short s) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer putShort( + int s, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_putShort, + jni.JniCallType.objectType, + [jni.JValueShort(s)]).object); + + static final _id_getShort1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getShort', r'(I)S'); + + /// from: public abstract short getShort(int i) + int getShort1( + int i, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_getShort1, + jni.JniCallType.shortType, [jni.JValueInt(i)]).short; + + static final _id_putShort1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'putShort', r'(IS)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer putShort(int i, short s) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer putShort1( + int i, + int s, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_putShort1, + jni.JniCallType.objectType, + [jni.JValueInt(i), jni.JValueShort(s)]).object); + + static final _id_asShortBuffer = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'asShortBuffer', r'()Ljava/nio/ShortBuffer;'); + + /// from: public abstract java.nio.ShortBuffer asShortBuffer() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject asShortBuffer() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_asShortBuffer, jni.JniCallType.objectType, []).object); + + static final _id_getInt = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getInt', r'()I'); + + /// from: public abstract int getInt() + int getInt() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_getInt, jni.JniCallType.intType, []).integer; + + static final _id_putInt = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'putInt', r'(I)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer putInt(int i) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer putInt( + int i, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_putInt, + jni.JniCallType.objectType, + [jni.JValueInt(i)]).object); + + static final _id_getInt1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getInt', r'(I)I'); + + /// from: public abstract int getInt(int i) + int getInt1( + int i, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_getInt1, + jni.JniCallType.intType, [jni.JValueInt(i)]).integer; + + static final _id_putInt1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'putInt', r'(II)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer putInt(int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer putInt1( + int i, + int i1, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_putInt1, + jni.JniCallType.objectType, + [jni.JValueInt(i), jni.JValueInt(i1)]).object); + + static final _id_asIntBuffer = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'asIntBuffer', r'()Ljava/nio/IntBuffer;'); + + /// from: public abstract java.nio.IntBuffer asIntBuffer() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject asIntBuffer() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_asIntBuffer, jni.JniCallType.objectType, []).object); + + static final _id_getLong = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getLong', r'()J'); + + /// from: public abstract long getLong() + int getLong() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_getLong, jni.JniCallType.longType, []).long; + + static final _id_putLong = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'putLong', r'(J)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer putLong(long j) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer putLong( + int j, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_putLong, jni.JniCallType.objectType, [j]).object); + + static final _id_getLong1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getLong', r'(I)J'); + + /// from: public abstract long getLong(int i) + int getLong1( + int i, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_getLong1, + jni.JniCallType.longType, [jni.JValueInt(i)]).long; + + static final _id_putLong1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'putLong', r'(IJ)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer putLong(int i, long j) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer putLong1( + int i, + int j, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_putLong1, + jni.JniCallType.objectType, + [jni.JValueInt(i), j]).object); + + static final _id_asLongBuffer = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'asLongBuffer', r'()Ljava/nio/LongBuffer;'); + + /// from: public abstract java.nio.LongBuffer asLongBuffer() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject asLongBuffer() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_asLongBuffer, jni.JniCallType.objectType, []).object); + + static final _id_getFloat = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getFloat', r'()F'); + + /// from: public abstract float getFloat() + double getFloat() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_getFloat, jni.JniCallType.floatType, []).float; + + static final _id_putFloat = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'putFloat', r'(F)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer putFloat(float f) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer putFloat( + double f, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_putFloat, + jni.JniCallType.objectType, + [jni.JValueFloat(f)]).object); + + static final _id_getFloat1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getFloat', r'(I)F'); + + /// from: public abstract float getFloat(int i) + double getFloat1( + int i, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_getFloat1, + jni.JniCallType.floatType, [jni.JValueInt(i)]).float; + + static final _id_putFloat1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'putFloat', r'(IF)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer putFloat(int i, float f) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer putFloat1( + int i, + double f, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_putFloat1, + jni.JniCallType.objectType, + [jni.JValueInt(i), jni.JValueFloat(f)]).object); + + static final _id_asFloatBuffer = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'asFloatBuffer', r'()Ljava/nio/FloatBuffer;'); + + /// from: public abstract java.nio.FloatBuffer asFloatBuffer() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject asFloatBuffer() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_asFloatBuffer, jni.JniCallType.objectType, []).object); + + static final _id_getDouble = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getDouble', r'()D'); + + /// from: public abstract double getDouble() + double getDouble() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_getDouble, jni.JniCallType.doubleType, []).doubleFloat; + + static final _id_putDouble = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'putDouble', r'(D)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer putDouble(double d) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer putDouble( + double d, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_putDouble, jni.JniCallType.objectType, [d]).object); + + static final _id_getDouble1 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'getDouble', r'(I)D'); + + /// from: public abstract double getDouble(int i) + double getDouble1( + int i, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_getDouble1, + jni.JniCallType.doubleType, [jni.JValueInt(i)]).doubleFloat; + + static final _id_putDouble1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'putDouble', r'(ID)Ljava/nio/ByteBuffer;'); + + /// from: public abstract java.nio.ByteBuffer putDouble(int i, double d) + /// The returned object must be released after use, by calling the [release] method. + ByteBuffer putDouble1( + int i, + double d, + ) => + const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_putDouble1, + jni.JniCallType.objectType, + [jni.JValueInt(i), d]).object); + + static final _id_asDoubleBuffer = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'asDoubleBuffer', r'()Ljava/nio/DoubleBuffer;'); + + /// from: public abstract java.nio.DoubleBuffer asDoubleBuffer() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject asDoubleBuffer() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_asDoubleBuffer, + jni.JniCallType.objectType, []).object); + + static final _id_array = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'array', r'()Ljava/lang/Object;'); + + /// from: public java.lang.Object array() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject array() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_array, jni.JniCallType.objectType, []).object); + + static final _id_compareTo1 = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'compareTo', r'(Ljava/lang/Object;)I'); + + /// from: public int compareTo(java.lang.Object object) + int compareTo1( + jni.JObject object, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_compareTo1, + jni.JniCallType.intType, [object.reference]).integer; +} + +class $ByteBufferType extends jni.JObjType { + const $ByteBufferType(); + + @override + String get signature => r'Ljava/nio/ByteBuffer;'; + + @override + ByteBuffer fromRef(jni.JObjectPtr ref) => ByteBuffer.fromRef(ref); + + @override + jni.JObjType get superType => const $BufferType(); + + @override + final superCount = 2; + + @override + int get hashCode => ($ByteBufferType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $ByteBufferType && other is $ByteBufferType; +} + +/// from: java.util.concurrent.Executors +class Executors extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Executors.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = jni.Jni.findJClass(r'java/util/concurrent/Executors'); + + /// The type which includes information such as the signature of this class. + static const type = $ExecutorsType(); + static final _id_newFixedThreadPool = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'newFixedThreadPool', + r'(I)Ljava/util/concurrent/ExecutorService;'); + + /// from: static public java.util.concurrent.ExecutorService newFixedThreadPool(int i) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject newFixedThreadPool( + int i, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_newFixedThreadPool, + jni.JniCallType.objectType, [jni.JValueInt(i)]).object); + + static final _id_newWorkStealingPool = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'newWorkStealingPool', + r'(I)Ljava/util/concurrent/ExecutorService;'); + + /// from: static public java.util.concurrent.ExecutorService newWorkStealingPool(int i) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject newWorkStealingPool( + int i, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_newWorkStealingPool, + jni.JniCallType.objectType, [jni.JValueInt(i)]).object); + + static final _id_newWorkStealingPool1 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'newWorkStealingPool', + r'()Ljava/util/concurrent/ExecutorService;'); + + /// from: static public java.util.concurrent.ExecutorService newWorkStealingPool() + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject newWorkStealingPool1() => const jni.JObjectType().fromRef( + jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_newWorkStealingPool1, jni.JniCallType.objectType, []).object); + + static final _id_newFixedThreadPool1 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'newFixedThreadPool', + r'(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;'); + + /// from: static public java.util.concurrent.ExecutorService newFixedThreadPool(int i, java.util.concurrent.ThreadFactory threadFactory) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject newFixedThreadPool1( + int i, + jni.JObject threadFactory, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_newFixedThreadPool1, + jni.JniCallType.objectType, + [jni.JValueInt(i), threadFactory.reference]).object); + + static final _id_newSingleThreadExecutor = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r'newSingleThreadExecutor', + r'()Ljava/util/concurrent/ExecutorService;'); + + /// from: static public java.util.concurrent.ExecutorService newSingleThreadExecutor() + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject newSingleThreadExecutor() => const jni.JObjectType() + .fromRef(jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_newSingleThreadExecutor, jni.JniCallType.objectType, []).object); + + static final _id_newSingleThreadExecutor1 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'newSingleThreadExecutor', + r'(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;'); + + /// from: static public java.util.concurrent.ExecutorService newSingleThreadExecutor(java.util.concurrent.ThreadFactory threadFactory) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject newSingleThreadExecutor1( + jni.JObject threadFactory, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_newSingleThreadExecutor1, + jni.JniCallType.objectType, + [threadFactory.reference]).object); + + static final _id_newCachedThreadPool = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'newCachedThreadPool', + r'()Ljava/util/concurrent/ExecutorService;'); + + /// from: static public java.util.concurrent.ExecutorService newCachedThreadPool() + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject newCachedThreadPool() => const jni.JObjectType().fromRef( + jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_newCachedThreadPool, jni.JniCallType.objectType, []).object); + + static final _id_newCachedThreadPool1 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'newCachedThreadPool', + r'(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;'); + + /// from: static public java.util.concurrent.ExecutorService newCachedThreadPool(java.util.concurrent.ThreadFactory threadFactory) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject newCachedThreadPool1( + jni.JObject threadFactory, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_newCachedThreadPool1, + jni.JniCallType.objectType, [threadFactory.reference]).object); + + static final _id_newSingleThreadScheduledExecutor = jni.Jni.accessors + .getStaticMethodIDOf( + _class.reference, + r'newSingleThreadScheduledExecutor', + r'()Ljava/util/concurrent/ScheduledExecutorService;'); + + /// from: static public java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor() + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject newSingleThreadScheduledExecutor() => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_newSingleThreadScheduledExecutor, + jni.JniCallType.objectType, []).object); + + static final _id_newSingleThreadScheduledExecutor1 = jni.Jni.accessors + .getStaticMethodIDOf( + _class.reference, + r'newSingleThreadScheduledExecutor', + r'(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;'); + + /// from: static public java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory threadFactory) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject newSingleThreadScheduledExecutor1( + jni.JObject threadFactory, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_newSingleThreadScheduledExecutor1, + jni.JniCallType.objectType, + [threadFactory.reference]).object); + + static final _id_newScheduledThreadPool = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r'newScheduledThreadPool', + r'(I)Ljava/util/concurrent/ScheduledExecutorService;'); + + /// from: static public java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int i) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject newScheduledThreadPool( + int i, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_newScheduledThreadPool, + jni.JniCallType.objectType, + [jni.JValueInt(i)]).object); + + static final _id_newScheduledThreadPool1 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'newScheduledThreadPool', + r'(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;'); + + /// from: static public java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int i, java.util.concurrent.ThreadFactory threadFactory) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject newScheduledThreadPool1( + int i, + jni.JObject threadFactory, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_newScheduledThreadPool1, + jni.JniCallType.objectType, + [jni.JValueInt(i), threadFactory.reference]).object); + + static final _id_unconfigurableExecutorService = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r'unconfigurableExecutorService', + r'(Ljava/util/concurrent/ExecutorService;)Ljava/util/concurrent/ExecutorService;'); + + /// from: static public java.util.concurrent.ExecutorService unconfigurableExecutorService(java.util.concurrent.ExecutorService executorService) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject unconfigurableExecutorService( + jni.JObject executorService, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_unconfigurableExecutorService, + jni.JniCallType.objectType, + [executorService.reference]).object); + + static final _id_unconfigurableScheduledExecutorService = jni.Jni.accessors + .getStaticMethodIDOf( + _class.reference, + r'unconfigurableScheduledExecutorService', + r'(Ljava/util/concurrent/ScheduledExecutorService;)Ljava/util/concurrent/ScheduledExecutorService;'); + + /// from: static public java.util.concurrent.ScheduledExecutorService unconfigurableScheduledExecutorService(java.util.concurrent.ScheduledExecutorService scheduledExecutorService) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject unconfigurableScheduledExecutorService( + jni.JObject scheduledExecutorService, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_unconfigurableScheduledExecutorService, + jni.JniCallType.objectType, + [scheduledExecutorService.reference]).object); + + static final _id_defaultThreadFactory = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'defaultThreadFactory', + r'()Ljava/util/concurrent/ThreadFactory;'); + + /// from: static public java.util.concurrent.ThreadFactory defaultThreadFactory() + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject defaultThreadFactory() => const jni.JObjectType().fromRef( + jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_defaultThreadFactory, jni.JniCallType.objectType, []).object); + + static final _id_privilegedThreadFactory = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r'privilegedThreadFactory', + r'()Ljava/util/concurrent/ThreadFactory;'); + + /// from: static public java.util.concurrent.ThreadFactory privilegedThreadFactory() + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject privilegedThreadFactory() => const jni.JObjectType() + .fromRef(jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, + _id_privilegedThreadFactory, jni.JniCallType.objectType, []).object); + + static final _id_callable = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'callable', + r'(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Callable;'); + + /// from: static public java.util.concurrent.Callable callable(java.lang.Runnable runnable, T object) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject callable<$T extends jni.JObject>( + jni.JObject runnable, + $T object, { + jni.JObjType<$T>? T, + }) { + T ??= jni.lowestCommonSuperType([ + object.$type, + ]) as jni.JObjType<$T>; + return const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_callable, + jni.JniCallType.objectType, + [runnable.reference, object.reference]).object); + } + + static final _id_callable1 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'callable', + r'(Ljava/lang/Runnable;)Ljava/util/concurrent/Callable;'); + + /// from: static public java.util.concurrent.Callable callable(java.lang.Runnable runnable) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject callable1( + jni.JObject runnable, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_callable1, + jni.JniCallType.objectType, [runnable.reference]).object); + + static final _id_callable2 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'callable', + r'(Ljava/security/PrivilegedAction;)Ljava/util/concurrent/Callable;'); + + /// from: static public java.util.concurrent.Callable callable(java.security.PrivilegedAction privilegedAction) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject callable2( + jni.JObject privilegedAction, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_callable2, + jni.JniCallType.objectType, [privilegedAction.reference]).object); + + static final _id_callable3 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'callable', + r'(Ljava/security/PrivilegedExceptionAction;)Ljava/util/concurrent/Callable;'); + + /// from: static public java.util.concurrent.Callable callable(java.security.PrivilegedExceptionAction privilegedExceptionAction) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject callable3( + jni.JObject privilegedExceptionAction, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_callable3, + jni.JniCallType.objectType, + [privilegedExceptionAction.reference]).object); + + static final _id_privilegedCallable = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'privilegedCallable', + r'(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;'); + + /// from: static public java.util.concurrent.Callable privilegedCallable(java.util.concurrent.Callable callable) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject privilegedCallable<$T extends jni.JObject>( + jni.JObject callable, { + required jni.JObjType<$T> T, + }) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_privilegedCallable, + jni.JniCallType.objectType, [callable.reference]).object); + + static final _id_privilegedCallableUsingCurrentClassLoader = jni.Jni.accessors + .getStaticMethodIDOf( + _class.reference, + r'privilegedCallableUsingCurrentClassLoader', + r'(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;'); + + /// from: static public java.util.concurrent.Callable privilegedCallableUsingCurrentClassLoader(java.util.concurrent.Callable callable) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject + privilegedCallableUsingCurrentClassLoader<$T extends jni.JObject>( + jni.JObject callable, { + required jni.JObjType<$T> T, + }) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_privilegedCallableUsingCurrentClassLoader, + jni.JniCallType.objectType, + [callable.reference]).object); +} + +class $ExecutorsType extends jni.JObjType { + const $ExecutorsType(); + + @override + String get signature => r'Ljava/util/concurrent/Executors;'; + + @override + Executors fromRef(jni.JObjectPtr ref) => Executors.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ExecutorsType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $ExecutorsType && other is $ExecutorsType; +} + +/// from: org.chromium.net.CronetEngine$Builder$LibraryLoader +class CronetEngine_Builder_LibraryLoader extends jni.JObject { + @override + late final jni.JObjType $type = type; + + CronetEngine_Builder_LibraryLoader.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = jni.Jni.findJClass( + r'org/chromium/net/CronetEngine$Builder$LibraryLoader'); + + /// The type which includes information such as the signature of this class. + static const type = $CronetEngine_Builder_LibraryLoaderType(); + static final _id_new0 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory CronetEngine_Builder_LibraryLoader() => + CronetEngine_Builder_LibraryLoader.fromRef(jni.Jni.accessors + .newObjectWithArgs(_class.reference, _id_new0, []).object); + + static final _id_loadLibrary = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'loadLibrary', r'(Ljava/lang/String;)V'); + + /// from: public abstract void loadLibrary(java.lang.String string) + void loadLibrary( + jni.JString string, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_loadLibrary, + jni.JniCallType.voidType, [string.reference]).check(); +} + +class $CronetEngine_Builder_LibraryLoaderType + extends jni.JObjType { + const $CronetEngine_Builder_LibraryLoaderType(); + + @override + String get signature => + r'Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;'; + + @override + CronetEngine_Builder_LibraryLoader fromRef(jni.JObjectPtr ref) => + CronetEngine_Builder_LibraryLoader.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($CronetEngine_Builder_LibraryLoaderType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $CronetEngine_Builder_LibraryLoaderType && + other is $CronetEngine_Builder_LibraryLoaderType; +} + +/// from: org.chromium.net.CronetEngine$Builder +class CronetEngine_Builder extends jni.JObject { + @override + late final jni.JObjType $type = type; + + CronetEngine_Builder.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = + jni.Jni.findJClass(r'org/chromium/net/CronetEngine$Builder'); + + /// The type which includes information such as the signature of this class. + static const type = $CronetEngine_BuilderType(); + static final _id_mBuilderDelegate = jni.Jni.accessors.getFieldIDOf( + _class.reference, + r'mBuilderDelegate', + r'Lorg/chromium/net/ICronetEngineBuilder;', + ); + + /// from: protected final org.chromium.net.ICronetEngineBuilder mBuilderDelegate + /// The returned object must be released after use, by calling the [release] method. + jni.JObject get mBuilderDelegate => + const jni.JObjectType().fromRef(jni.Jni.accessors + .getField(reference, _id_mBuilderDelegate, jni.JniCallType.objectType) + .object); + + /// from: static public final int HTTP_CACHE_DISABLED + static const HTTP_CACHE_DISABLED = 0; + + /// from: static public final int HTTP_CACHE_IN_MEMORY + static const HTTP_CACHE_IN_MEMORY = 1; + + /// from: static public final int HTTP_CACHE_DISK_NO_HTTP + static const HTTP_CACHE_DISK_NO_HTTP = 2; + + /// from: static public final int HTTP_CACHE_DISK + static const HTTP_CACHE_DISK = 3; + + static final _id_new0 = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'', r'(Landroid/content/Context;)V'); + + /// from: public void (android.content.Context context) + /// The returned object must be released after use, by calling the [release] method. + factory CronetEngine_Builder( + jni.JObject context, + ) => + CronetEngine_Builder.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, _id_new0, [context.reference]).object); + + static final _id_new1 = jni.Jni.accessors.getMethodIDOf(_class.reference, + r'', r'(Lorg/chromium/net/ICronetEngineBuilder;)V'); + + /// from: public void (org.chromium.net.ICronetEngineBuilder iCronetEngineBuilder) + /// The returned object must be released after use, by calling the [release] method. + factory CronetEngine_Builder.new1( + jni.JObject iCronetEngineBuilder, + ) => + CronetEngine_Builder.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, _id_new1, [iCronetEngineBuilder.reference]).object); + + static final _id_getDefaultUserAgent = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'getDefaultUserAgent', r'()Ljava/lang/String;'); + + /// from: public java.lang.String getDefaultUserAgent() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getDefaultUserAgent() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getDefaultUserAgent, + jni.JniCallType.objectType, []).object); + + static final _id_setUserAgent = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setUserAgent', + r'(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder setUserAgent(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder setUserAgent( + jni.JString string, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setUserAgent, + jni.JniCallType.objectType, [string.reference]).object); + + static final _id_setStoragePath = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setStoragePath', + r'(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder setStoragePath(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder setStoragePath( + jni.JString string, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setStoragePath, + jni.JniCallType.objectType, [string.reference]).object); + + static final _id_setLibraryLoader = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setLibraryLoader', + r'(Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder setLibraryLoader(org.chromium.net.CronetEngine$Builder$LibraryLoader libraryLoader) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder setLibraryLoader( + CronetEngine_Builder_LibraryLoader libraryLoader, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setLibraryLoader, + jni.JniCallType.objectType, [libraryLoader.reference]).object); + + static final _id_enableQuic = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'enableQuic', + r'(Z)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder enableQuic(boolean z) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder enableQuic( + bool z, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_enableQuic, + jni.JniCallType.objectType, [z ? 1 : 0]).object); + + static final _id_enableHttp2 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'enableHttp2', + r'(Z)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder enableHttp2(boolean z) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder enableHttp2( + bool z, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_enableHttp2, + jni.JniCallType.objectType, [z ? 1 : 0]).object); + + static final _id_enableSdch = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'enableSdch', + r'(Z)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder enableSdch(boolean z) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder enableSdch( + bool z, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_enableSdch, + jni.JniCallType.objectType, [z ? 1 : 0]).object); + + static final _id_enableBrotli = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'enableBrotli', + r'(Z)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder enableBrotli(boolean z) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder enableBrotli( + bool z, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_enableBrotli, + jni.JniCallType.objectType, [z ? 1 : 0]).object); + + static final _id_enableHttpCache = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'enableHttpCache', + r'(IJ)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder enableHttpCache(int i, long j) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder enableHttpCache( + int i, + int j, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_enableHttpCache, + jni.JniCallType.objectType, [jni.JValueInt(i), j]).object); + + static final _id_addQuicHint = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'addQuicHint', + r'(Ljava/lang/String;II)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder addQuicHint(java.lang.String string, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder addQuicHint( + jni.JString string, + int i, + int i1, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs( + reference, + _id_addQuicHint, + jni.JniCallType.objectType, + [string.reference, jni.JValueInt(i), jni.JValueInt(i1)]).object); + + static final _id_addPublicKeyPins = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'addPublicKeyPins', + r'(Ljava/lang/String;Ljava/util/Set;ZLjava/util/Date;)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder addPublicKeyPins(java.lang.String string, java.util.Set set, boolean z, java.util.Date date) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder addPublicKeyPins( + jni.JString string, + jni.JSet> set0, + bool z, + jni.JObject date, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs( + reference, _id_addPublicKeyPins, jni.JniCallType.objectType, [ + string.reference, + set0.reference, + z ? 1 : 0, + date.reference + ]).object); + + static final _id_enablePublicKeyPinningBypassForLocalTrustAnchors = + jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'enablePublicKeyPinningBypassForLocalTrustAnchors', + r'(Z)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder enablePublicKeyPinningBypassForLocalTrustAnchors(boolean z) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder enablePublicKeyPinningBypassForLocalTrustAnchors( + bool z, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs( + reference, + _id_enablePublicKeyPinningBypassForLocalTrustAnchors, + jni.JniCallType.objectType, + [z ? 1 : 0]).object); + + static final _id_setThreadPriority = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setThreadPriority', + r'(I)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder setThreadPriority(int i) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder setThreadPriority( + int i, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setThreadPriority, + jni.JniCallType.objectType, [jni.JValueInt(i)]).object); + + static final _id_enableNetworkQualityEstimator = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'enableNetworkQualityEstimator', + r'(Z)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder enableNetworkQualityEstimator(boolean z) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder enableNetworkQualityEstimator( + bool z, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_enableNetworkQualityEstimator, + jni.JniCallType.objectType, [z ? 1 : 0]).object); + + static final _id_setQuicOptions = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setQuicOptions', + r'(Lorg/chromium/net/QuicOptions;)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder setQuicOptions(org.chromium.net.QuicOptions quicOptions) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder setQuicOptions( + jni.JObject quicOptions, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setQuicOptions, + jni.JniCallType.objectType, [quicOptions.reference]).object); + + static final _id_setQuicOptions1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setQuicOptions', + r'(Lorg/chromium/net/QuicOptions$Builder;)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder setQuicOptions(org.chromium.net.QuicOptions$Builder builder) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder setQuicOptions1( + jni.JObject builder, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setQuicOptions1, + jni.JniCallType.objectType, [builder.reference]).object); + + static final _id_setDnsOptions = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setDnsOptions', + r'(Lorg/chromium/net/DnsOptions;)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder setDnsOptions(org.chromium.net.DnsOptions dnsOptions) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder setDnsOptions( + jni.JObject dnsOptions, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setDnsOptions, + jni.JniCallType.objectType, [dnsOptions.reference]).object); + + static final _id_setDnsOptions1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setDnsOptions', + r'(Lorg/chromium/net/DnsOptions$Builder;)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder setDnsOptions(org.chromium.net.DnsOptions$Builder builder) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder setDnsOptions1( + jni.JObject builder, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setDnsOptions1, + jni.JniCallType.objectType, [builder.reference]).object); + + static final _id_setConnectionMigrationOptions = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setConnectionMigrationOptions', + r'(Lorg/chromium/net/ConnectionMigrationOptions;)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder setConnectionMigrationOptions(org.chromium.net.ConnectionMigrationOptions connectionMigrationOptions) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder setConnectionMigrationOptions( + jni.JObject connectionMigrationOptions, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs( + reference, + _id_setConnectionMigrationOptions, + jni.JniCallType.objectType, + [connectionMigrationOptions.reference]).object); + + static final _id_setConnectionMigrationOptions1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setConnectionMigrationOptions', + r'(Lorg/chromium/net/ConnectionMigrationOptions$Builder;)Lorg/chromium/net/CronetEngine$Builder;'); + + /// from: public org.chromium.net.CronetEngine$Builder setConnectionMigrationOptions(org.chromium.net.ConnectionMigrationOptions$Builder builder) + /// The returned object must be released after use, by calling the [release] method. + CronetEngine_Builder setConnectionMigrationOptions1( + jni.JObject builder, + ) => + const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setConnectionMigrationOptions1, + jni.JniCallType.objectType, [builder.reference]).object); + + static final _id_build = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'build', r'()Lorg/chromium/net/CronetEngine;'); + + /// from: public org.chromium.net.CronetEngine build() + /// The returned object must be released after use, by calling the [release] method. + CronetEngine build() => + const $CronetEngineType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_build, jni.JniCallType.objectType, []).object); +} + +class $CronetEngine_BuilderType extends jni.JObjType { + const $CronetEngine_BuilderType(); + + @override + String get signature => r'Lorg/chromium/net/CronetEngine$Builder;'; + + @override + CronetEngine_Builder fromRef(jni.JObjectPtr ref) => + CronetEngine_Builder.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($CronetEngine_BuilderType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $CronetEngine_BuilderType && + other is $CronetEngine_BuilderType; +} + +/// from: org.chromium.net.CronetEngine +class CronetEngine extends jni.JObject { + @override + late final jni.JObjType $type = type; + + CronetEngine.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = jni.Jni.findJClass(r'org/chromium/net/CronetEngine'); + + /// The type which includes information such as the signature of this class. + static const type = $CronetEngineType(); + + /// from: static public final int ACTIVE_REQUEST_COUNT_UNKNOWN + static const ACTIVE_REQUEST_COUNT_UNKNOWN = -1; + + /// from: static public final int CONNECTION_METRIC_UNKNOWN + static const CONNECTION_METRIC_UNKNOWN = -1; + + /// from: static public final int EFFECTIVE_CONNECTION_TYPE_UNKNOWN + static const EFFECTIVE_CONNECTION_TYPE_UNKNOWN = 0; + + /// from: static public final int EFFECTIVE_CONNECTION_TYPE_OFFLINE + static const EFFECTIVE_CONNECTION_TYPE_OFFLINE = 1; + + /// from: static public final int EFFECTIVE_CONNECTION_TYPE_SLOW_2G + static const EFFECTIVE_CONNECTION_TYPE_SLOW_2G = 2; + + /// from: static public final int EFFECTIVE_CONNECTION_TYPE_2G + static const EFFECTIVE_CONNECTION_TYPE_2G = 3; + + /// from: static public final int EFFECTIVE_CONNECTION_TYPE_3G + static const EFFECTIVE_CONNECTION_TYPE_3G = 4; + + /// from: static public final int EFFECTIVE_CONNECTION_TYPE_4G + static const EFFECTIVE_CONNECTION_TYPE_4G = 5; + + static final _id_new0 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory CronetEngine() => CronetEngine.fromRef(jni.Jni.accessors + .newObjectWithArgs(_class.reference, _id_new0, []).object); + + static final _id_getVersionString = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'getVersionString', r'()Ljava/lang/String;'); + + /// from: public abstract java.lang.String getVersionString() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getVersionString() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getVersionString, + jni.JniCallType.objectType, []).object); + + static final _id_shutdown = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'shutdown', r'()V'); + + /// from: public abstract void shutdown() + void shutdown() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_shutdown, jni.JniCallType.voidType, []).check(); + + static final _id_startNetLogToFile = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'startNetLogToFile', r'(Ljava/lang/String;Z)V'); + + /// from: public abstract void startNetLogToFile(java.lang.String string, boolean z) + void startNetLogToFile( + jni.JString string, + bool z, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_startNetLogToFile, + jni.JniCallType.voidType, [string.reference, z ? 1 : 0]).check(); + + static final _id_stopNetLog = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'stopNetLog', r'()V'); + + /// from: public abstract void stopNetLog() + void stopNetLog() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_stopNetLog, jni.JniCallType.voidType, []).check(); + + static final _id_getGlobalMetricsDeltas = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getGlobalMetricsDeltas', r'()[B'); + + /// from: public abstract byte[] getGlobalMetricsDeltas() + /// The returned object must be released after use, by calling the [release] method. + jni.JArray getGlobalMetricsDeltas() => + const jni.JArrayType(jni.jbyteType()).fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_getGlobalMetricsDeltas, + jni.JniCallType.objectType, []).object); + + static final _id_openConnection = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'openConnection', + r'(Ljava/net/URL;)Ljava/net/URLConnection;'); + + /// from: public abstract java.net.URLConnection openConnection(java.net.URL uRL) + /// The returned object must be released after use, by calling the [release] method. + jni.JObject openConnection( + URL uRL, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_openConnection, + jni.JniCallType.objectType, + [uRL.reference]).object); + + static final _id_createURLStreamHandlerFactory = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'createURLStreamHandlerFactory', + r'()Ljava/net/URLStreamHandlerFactory;'); + + /// from: public abstract java.net.URLStreamHandlerFactory createURLStreamHandlerFactory() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject createURLStreamHandlerFactory() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_createURLStreamHandlerFactory, + jni.JniCallType.objectType, []).object); + + static final _id_newUrlRequestBuilder = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'newUrlRequestBuilder', + r'(Ljava/lang/String;Lorg/chromium/net/UrlRequest$Callback;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;'); + + /// from: public abstract org.chromium.net.UrlRequest$Builder newUrlRequestBuilder(java.lang.String string, org.chromium.net.UrlRequest$Callback callback, java.util.concurrent.Executor executor) + /// The returned object must be released after use, by calling the [release] method. + UrlRequest_Builder newUrlRequestBuilder( + jni.JString string, + UrlRequest_Callback callback, + jni.JObject executor, + ) => + const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs( + reference, _id_newUrlRequestBuilder, jni.JniCallType.objectType, [ + string.reference, + callback.reference, + executor.reference + ]).object); + + static final _id_getActiveRequestCount = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getActiveRequestCount', r'()I'); + + /// from: public int getActiveRequestCount() + int getActiveRequestCount() => jni.Jni.accessors.callMethodWithArgs(reference, + _id_getActiveRequestCount, jni.JniCallType.intType, []).integer; + + static final _id_addRequestFinishedListener = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'addRequestFinishedListener', + r'(Lorg/chromium/net/RequestFinishedInfo$Listener;)V'); + + /// from: public void addRequestFinishedListener(org.chromium.net.RequestFinishedInfo$Listener listener) + void addRequestFinishedListener( + jni.JObject listener, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_addRequestFinishedListener, + jni.JniCallType.voidType, + [listener.reference]).check(); + + static final _id_removeRequestFinishedListener = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'removeRequestFinishedListener', + r'(Lorg/chromium/net/RequestFinishedInfo$Listener;)V'); + + /// from: public void removeRequestFinishedListener(org.chromium.net.RequestFinishedInfo$Listener listener) + void removeRequestFinishedListener( + jni.JObject listener, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_removeRequestFinishedListener, + jni.JniCallType.voidType, + [listener.reference]).check(); + + static final _id_getHttpRttMs = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getHttpRttMs', r'()I'); + + /// from: public int getHttpRttMs() + int getHttpRttMs() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_getHttpRttMs, jni.JniCallType.intType, []).integer; + + static final _id_getTransportRttMs = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getTransportRttMs', r'()I'); + + /// from: public int getTransportRttMs() + int getTransportRttMs() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_getTransportRttMs, jni.JniCallType.intType, []).integer; + + static final _id_getDownstreamThroughputKbps = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getDownstreamThroughputKbps', r'()I'); + + /// from: public int getDownstreamThroughputKbps() + int getDownstreamThroughputKbps() => jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getDownstreamThroughputKbps, + jni.JniCallType.intType, []).integer; + + static final _id_startNetLogToDisk = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'startNetLogToDisk', r'(Ljava/lang/String;ZI)V'); + + /// from: public void startNetLogToDisk(java.lang.String string, boolean z, int i) + void startNetLogToDisk( + jni.JString string, + bool z, + int i, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_startNetLogToDisk, + jni.JniCallType.voidType, + [string.reference, z ? 1 : 0, jni.JValueInt(i)]).check(); + + static final _id_getEffectiveConnectionType = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getEffectiveConnectionType', r'()I'); + + /// from: public int getEffectiveConnectionType() + int getEffectiveConnectionType() => jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getEffectiveConnectionType, + jni.JniCallType.intType, []).integer; + + static final _id_configureNetworkQualityEstimatorForTesting = + jni.Jni.accessors.getMethodIDOf(_class.reference, + r'configureNetworkQualityEstimatorForTesting', r'(ZZZ)V'); + + /// from: public void configureNetworkQualityEstimatorForTesting(boolean z, boolean z1, boolean z2) + void configureNetworkQualityEstimatorForTesting( + bool z, + bool z1, + bool z2, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_configureNetworkQualityEstimatorForTesting, + jni.JniCallType.voidType, + [z ? 1 : 0, z1 ? 1 : 0, z2 ? 1 : 0]).check(); + + static final _id_addRttListener = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'addRttListener', + r'(Lorg/chromium/net/NetworkQualityRttListener;)V'); + + /// from: public void addRttListener(org.chromium.net.NetworkQualityRttListener networkQualityRttListener) + void addRttListener( + jni.JObject networkQualityRttListener, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_addRttListener, + jni.JniCallType.voidType, + [networkQualityRttListener.reference]).check(); + + static final _id_removeRttListener = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'removeRttListener', + r'(Lorg/chromium/net/NetworkQualityRttListener;)V'); + + /// from: public void removeRttListener(org.chromium.net.NetworkQualityRttListener networkQualityRttListener) + void removeRttListener( + jni.JObject networkQualityRttListener, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_removeRttListener, + jni.JniCallType.voidType, + [networkQualityRttListener.reference]).check(); + + static final _id_addThroughputListener = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'addThroughputListener', + r'(Lorg/chromium/net/NetworkQualityThroughputListener;)V'); + + /// from: public void addThroughputListener(org.chromium.net.NetworkQualityThroughputListener networkQualityThroughputListener) + void addThroughputListener( + jni.JObject networkQualityThroughputListener, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_addThroughputListener, + jni.JniCallType.voidType, + [networkQualityThroughputListener.reference]).check(); + + static final _id_removeThroughputListener = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'removeThroughputListener', + r'(Lorg/chromium/net/NetworkQualityThroughputListener;)V'); + + /// from: public void removeThroughputListener(org.chromium.net.NetworkQualityThroughputListener networkQualityThroughputListener) + void removeThroughputListener( + jni.JObject networkQualityThroughputListener, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_removeThroughputListener, + jni.JniCallType.voidType, + [networkQualityThroughputListener.reference]).check(); +} + +class $CronetEngineType extends jni.JObjType { + const $CronetEngineType(); + + @override + String get signature => r'Lorg/chromium/net/CronetEngine;'; + + @override + CronetEngine fromRef(jni.JObjectPtr ref) => CronetEngine.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($CronetEngineType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $CronetEngineType && other is $CronetEngineType; +} + +/// from: org.chromium.net.CronetException +class CronetException extends jni.JObject { + @override + late final jni.JObjType $type = type; + + CronetException.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = jni.Jni.findJClass(r'org/chromium/net/CronetException'); + + /// The type which includes information such as the signature of this class. + static const type = $CronetExceptionType(); + static final _id_new0 = jni.Jni.accessors.getMethodIDOf(_class.reference, + r'', r'(Ljava/lang/String;Ljava/lang/Throwable;)V'); + + /// from: protected void (java.lang.String string, java.lang.Throwable throwable) + /// The returned object must be released after use, by calling the [release] method. + factory CronetException( + jni.JString string, + jni.JObject throwable, + ) => + CronetException.fromRef(jni.Jni.accessors.newObjectWithArgs( + _class.reference, + _id_new0, + [string.reference, throwable.reference]).object); +} + +class $CronetExceptionType extends jni.JObjType { + const $CronetExceptionType(); + + @override + String get signature => r'Lorg/chromium/net/CronetException;'; + + @override + CronetException fromRef(jni.JObjectPtr ref) => CronetException.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($CronetExceptionType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $CronetExceptionType && + other is $CronetExceptionType; +} + +/// from: org.chromium.net.UploadDataProviders +class UploadDataProviders extends jni.JObject { + @override + late final jni.JObjType $type = type; + + UploadDataProviders.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = + jni.Jni.findJClass(r'org/chromium/net/UploadDataProviders'); + + /// The type which includes information such as the signature of this class. + static const type = $UploadDataProvidersType(); + static final _id_create = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'create', + r'(Ljava/io/File;)Lorg/chromium/net/UploadDataProvider;'); + + /// from: static public org.chromium.net.UploadDataProvider create(java.io.File file) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject create( + jni.JObject file, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_create, + jni.JniCallType.objectType, [file.reference]).object); + + static final _id_create1 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'create', + r'(Landroid/os/ParcelFileDescriptor;)Lorg/chromium/net/UploadDataProvider;'); + + /// from: static public org.chromium.net.UploadDataProvider create(android.os.ParcelFileDescriptor parcelFileDescriptor) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject create1( + jni.JObject parcelFileDescriptor, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_create1, + jni.JniCallType.objectType, + [parcelFileDescriptor.reference]).object); + + static final _id_create2 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'create', + r'(Ljava/nio/ByteBuffer;)Lorg/chromium/net/UploadDataProvider;'); + + /// from: static public org.chromium.net.UploadDataProvider create(java.nio.ByteBuffer byteBuffer) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject create2( + ByteBuffer byteBuffer, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_create2, + jni.JniCallType.objectType, [byteBuffer.reference]).object); + + static final _id_create3 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'create', + r'([BII)Lorg/chromium/net/UploadDataProvider;'); + + /// from: static public org.chromium.net.UploadDataProvider create(byte[] bs, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject create3( + jni.JArray bs, + int i, + int i1, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs( + _class.reference, + _id_create3, + jni.JniCallType.objectType, + [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).object); + + static final _id_create4 = jni.Jni.accessors.getStaticMethodIDOf( + _class.reference, + r'create', + r'([B)Lorg/chromium/net/UploadDataProvider;'); + + /// from: static public org.chromium.net.UploadDataProvider create(byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + static jni.JObject create4( + jni.JArray bs, + ) => + const jni.JObjectType().fromRef(jni.Jni.accessors + .callStaticMethodWithArgs(_class.reference, _id_create4, + jni.JniCallType.objectType, [bs.reference]).object); +} + +class $UploadDataProvidersType extends jni.JObjType { + const $UploadDataProvidersType(); + + @override + String get signature => r'Lorg/chromium/net/UploadDataProviders;'; + + @override + UploadDataProviders fromRef(jni.JObjectPtr ref) => + UploadDataProviders.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($UploadDataProvidersType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $UploadDataProvidersType && + other is $UploadDataProvidersType; +} + +/// from: org.chromium.net.UrlRequest$Builder +class UrlRequest_Builder extends jni.JObject { + @override + late final jni.JObjType $type = type; + + UrlRequest_Builder.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = + jni.Jni.findJClass(r'org/chromium/net/UrlRequest$Builder'); + + /// The type which includes information such as the signature of this class. + static const type = $UrlRequest_BuilderType(); + + /// from: static public final int REQUEST_PRIORITY_IDLE + static const REQUEST_PRIORITY_IDLE = 0; + + /// from: static public final int REQUEST_PRIORITY_LOWEST + static const REQUEST_PRIORITY_LOWEST = 1; + + /// from: static public final int REQUEST_PRIORITY_LOW + static const REQUEST_PRIORITY_LOW = 2; + + /// from: static public final int REQUEST_PRIORITY_MEDIUM + static const REQUEST_PRIORITY_MEDIUM = 3; + + /// from: static public final int REQUEST_PRIORITY_HIGHEST + static const REQUEST_PRIORITY_HIGHEST = 4; + + static final _id_new0 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory UrlRequest_Builder() => UrlRequest_Builder.fromRef(jni.Jni.accessors + .newObjectWithArgs(_class.reference, _id_new0, []).object); + + static final _id_setHttpMethod = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setHttpMethod', + r'(Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;'); + + /// from: public abstract org.chromium.net.UrlRequest$Builder setHttpMethod(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + UrlRequest_Builder setHttpMethod( + jni.JString string, + ) => + const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setHttpMethod, + jni.JniCallType.objectType, [string.reference]).object); + + static final _id_addHeader = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'addHeader', + r'(Ljava/lang/String;Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;'); + + /// from: public abstract org.chromium.net.UrlRequest$Builder addHeader(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + UrlRequest_Builder addHeader( + jni.JString string, + jni.JString string1, + ) => + const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs( + reference, + _id_addHeader, + jni.JniCallType.objectType, + [string.reference, string1.reference]).object); + + static final _id_disableCache = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'disableCache', + r'()Lorg/chromium/net/UrlRequest$Builder;'); + + /// from: public abstract org.chromium.net.UrlRequest$Builder disableCache() + /// The returned object must be released after use, by calling the [release] method. + UrlRequest_Builder disableCache() => const $UrlRequest_BuilderType().fromRef( + jni.Jni.accessors.callMethodWithArgs( + reference, _id_disableCache, jni.JniCallType.objectType, []).object); + + static final _id_setPriority = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setPriority', + r'(I)Lorg/chromium/net/UrlRequest$Builder;'); + + /// from: public abstract org.chromium.net.UrlRequest$Builder setPriority(int i) + /// The returned object must be released after use, by calling the [release] method. + UrlRequest_Builder setPriority( + int i, + ) => + const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setPriority, + jni.JniCallType.objectType, [jni.JValueInt(i)]).object); + + static final _id_setUploadDataProvider = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setUploadDataProvider', + r'(Lorg/chromium/net/UploadDataProvider;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;'); + + /// from: public abstract org.chromium.net.UrlRequest$Builder setUploadDataProvider(org.chromium.net.UploadDataProvider uploadDataProvider, java.util.concurrent.Executor executor) + /// The returned object must be released after use, by calling the [release] method. + UrlRequest_Builder setUploadDataProvider( + jni.JObject uploadDataProvider, + jni.JObject executor, + ) => + const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs( + reference, + _id_setUploadDataProvider, + jni.JniCallType.objectType, + [uploadDataProvider.reference, executor.reference]).object); + + static final _id_allowDirectExecutor = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'allowDirectExecutor', + r'()Lorg/chromium/net/UrlRequest$Builder;'); + + /// from: public abstract org.chromium.net.UrlRequest$Builder allowDirectExecutor() + /// The returned object must be released after use, by calling the [release] method. + UrlRequest_Builder allowDirectExecutor() => const $UrlRequest_BuilderType() + .fromRef(jni.Jni.accessors.callMethodWithArgs(reference, + _id_allowDirectExecutor, jni.JniCallType.objectType, []).object); + + static final _id_addRequestAnnotation = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'addRequestAnnotation', + r'(Ljava/lang/Object;)Lorg/chromium/net/UrlRequest$Builder;'); + + /// from: public org.chromium.net.UrlRequest$Builder addRequestAnnotation(java.lang.Object object) + /// The returned object must be released after use, by calling the [release] method. + UrlRequest_Builder addRequestAnnotation( + jni.JObject object, + ) => + const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_addRequestAnnotation, + jni.JniCallType.objectType, [object.reference]).object); + + static final _id_setTrafficStatsTag = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setTrafficStatsTag', + r'(I)Lorg/chromium/net/UrlRequest$Builder;'); + + /// from: public org.chromium.net.UrlRequest$Builder setTrafficStatsTag(int i) + /// The returned object must be released after use, by calling the [release] method. + UrlRequest_Builder setTrafficStatsTag( + int i, + ) => + const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setTrafficStatsTag, + jni.JniCallType.objectType, [jni.JValueInt(i)]).object); + + static final _id_setTrafficStatsUid = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setTrafficStatsUid', + r'(I)Lorg/chromium/net/UrlRequest$Builder;'); + + /// from: public org.chromium.net.UrlRequest$Builder setTrafficStatsUid(int i) + /// The returned object must be released after use, by calling the [release] method. + UrlRequest_Builder setTrafficStatsUid( + int i, + ) => + const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setTrafficStatsUid, + jni.JniCallType.objectType, [jni.JValueInt(i)]).object); + + static final _id_setRequestFinishedListener = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'setRequestFinishedListener', + r'(Lorg/chromium/net/RequestFinishedInfo$Listener;)Lorg/chromium/net/UrlRequest$Builder;'); + + /// from: public org.chromium.net.UrlRequest$Builder setRequestFinishedListener(org.chromium.net.RequestFinishedInfo$Listener listener) + /// The returned object must be released after use, by calling the [release] method. + UrlRequest_Builder setRequestFinishedListener( + jni.JObject listener, + ) => + const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_setRequestFinishedListener, + jni.JniCallType.objectType, [listener.reference]).object); + + static final _id_build = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'build', r'()Lorg/chromium/net/UrlRequest;'); + + /// from: public abstract org.chromium.net.UrlRequest build() + /// The returned object must be released after use, by calling the [release] method. + UrlRequest build() => + const $UrlRequestType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_build, jni.JniCallType.objectType, []).object); +} + +class $UrlRequest_BuilderType extends jni.JObjType { + const $UrlRequest_BuilderType(); + + @override + String get signature => r'Lorg/chromium/net/UrlRequest$Builder;'; + + @override + UrlRequest_Builder fromRef(jni.JObjectPtr ref) => + UrlRequest_Builder.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($UrlRequest_BuilderType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $UrlRequest_BuilderType && + other is $UrlRequest_BuilderType; +} + +/// from: org.chromium.net.UrlRequest$Callback +class UrlRequest_Callback extends jni.JObject { + @override + late final jni.JObjType $type = type; + + UrlRequest_Callback.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = + jni.Jni.findJClass(r'org/chromium/net/UrlRequest$Callback'); + + /// The type which includes information such as the signature of this class. + static const type = $UrlRequest_CallbackType(); + static final _id_new0 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory UrlRequest_Callback() => UrlRequest_Callback.fromRef(jni.Jni.accessors + .newObjectWithArgs(_class.reference, _id_new0, []).object); + + static final _id_onRedirectReceived = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onRedirectReceived', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V'); + + /// from: public abstract void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string) + void onRedirectReceived( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + jni.JString string, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, _id_onRedirectReceived, jni.JniCallType.voidType, [ + urlRequest.reference, + urlResponseInfo.reference, + string.reference + ]).check(); + + static final _id_onResponseStarted = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onResponseStarted', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + + /// from: public abstract void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + void onResponseStarted( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_onResponseStarted, + jni.JniCallType.voidType, + [urlRequest.reference, urlResponseInfo.reference]).check(); + + static final _id_onReadCompleted = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onReadCompleted', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V'); + + /// from: public abstract void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer) + void onReadCompleted( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + ByteBuffer byteBuffer, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, _id_onReadCompleted, jni.JniCallType.voidType, [ + urlRequest.reference, + urlResponseInfo.reference, + byteBuffer.reference + ]).check(); + + static final _id_onSucceeded = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onSucceeded', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + + /// from: public abstract void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + void onSucceeded( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_onSucceeded, + jni.JniCallType.voidType, + [urlRequest.reference, urlResponseInfo.reference]).check(); + + static final _id_onFailed = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onFailed', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V'); + + /// from: public abstract void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException) + void onFailed( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + CronetException cronetException, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, _id_onFailed, jni.JniCallType.voidType, [ + urlRequest.reference, + urlResponseInfo.reference, + cronetException.reference + ]).check(); + + static final _id_onCanceled = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'onCanceled', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + + /// from: public void onCanceled(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + void onCanceled( + UrlRequest urlRequest, + UrlResponseInfo urlResponseInfo, + ) => + jni.Jni.accessors.callMethodWithArgs( + reference, + _id_onCanceled, + jni.JniCallType.voidType, + [urlRequest.reference, urlResponseInfo.reference]).check(); +} + +class $UrlRequest_CallbackType extends jni.JObjType { + const $UrlRequest_CallbackType(); + + @override + String get signature => r'Lorg/chromium/net/UrlRequest$Callback;'; + + @override + UrlRequest_Callback fromRef(jni.JObjectPtr ref) => + UrlRequest_Callback.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($UrlRequest_CallbackType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $UrlRequest_CallbackType && + other is $UrlRequest_CallbackType; +} + +/// from: org.chromium.net.UrlRequest$Status +class UrlRequest_Status extends jni.JObject { + @override + late final jni.JObjType $type = type; + + UrlRequest_Status.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = + jni.Jni.findJClass(r'org/chromium/net/UrlRequest$Status'); + + /// The type which includes information such as the signature of this class. + static const type = $UrlRequest_StatusType(); + + /// from: static public final int INVALID + static const INVALID = -1; + + /// from: static public final int IDLE + static const IDLE = 0; + + /// from: static public final int WAITING_FOR_STALLED_SOCKET_POOL + static const WAITING_FOR_STALLED_SOCKET_POOL = 1; + + /// from: static public final int WAITING_FOR_AVAILABLE_SOCKET + static const WAITING_FOR_AVAILABLE_SOCKET = 2; + + /// from: static public final int WAITING_FOR_DELEGATE + static const WAITING_FOR_DELEGATE = 3; + + /// from: static public final int WAITING_FOR_CACHE + static const WAITING_FOR_CACHE = 4; + + /// from: static public final int DOWNLOADING_PAC_FILE + static const DOWNLOADING_PAC_FILE = 5; + + /// from: static public final int RESOLVING_PROXY_FOR_URL + static const RESOLVING_PROXY_FOR_URL = 6; + + /// from: static public final int RESOLVING_HOST_IN_PAC_FILE + static const RESOLVING_HOST_IN_PAC_FILE = 7; + + /// from: static public final int ESTABLISHING_PROXY_TUNNEL + static const ESTABLISHING_PROXY_TUNNEL = 8; + + /// from: static public final int RESOLVING_HOST + static const RESOLVING_HOST = 9; + + /// from: static public final int CONNECTING + static const CONNECTING = 10; + + /// from: static public final int SSL_HANDSHAKE + static const SSL_HANDSHAKE = 11; + + /// from: static public final int SENDING_REQUEST + static const SENDING_REQUEST = 12; + + /// from: static public final int WAITING_FOR_RESPONSE + static const WAITING_FOR_RESPONSE = 13; + + /// from: static public final int READING_RESPONSE + static const READING_RESPONSE = 14; +} + +class $UrlRequest_StatusType extends jni.JObjType { + const $UrlRequest_StatusType(); + + @override + String get signature => r'Lorg/chromium/net/UrlRequest$Status;'; + + @override + UrlRequest_Status fromRef(jni.JObjectPtr ref) => + UrlRequest_Status.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($UrlRequest_StatusType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $UrlRequest_StatusType && + other is $UrlRequest_StatusType; +} + +/// from: org.chromium.net.UrlRequest$StatusListener +class UrlRequest_StatusListener extends jni.JObject { + @override + late final jni.JObjType $type = type; + + UrlRequest_StatusListener.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = + jni.Jni.findJClass(r'org/chromium/net/UrlRequest$StatusListener'); + + /// The type which includes information such as the signature of this class. + static const type = $UrlRequest_StatusListenerType(); + static final _id_new0 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory UrlRequest_StatusListener() => + UrlRequest_StatusListener.fromRef(jni.Jni.accessors + .newObjectWithArgs(_class.reference, _id_new0, []).object); + + static final _id_onStatus = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'onStatus', r'(I)V'); + + /// from: public abstract void onStatus(int i) + void onStatus( + int i, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_onStatus, + jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); +} + +class $UrlRequest_StatusListenerType + extends jni.JObjType { + const $UrlRequest_StatusListenerType(); + + @override + String get signature => r'Lorg/chromium/net/UrlRequest$StatusListener;'; + + @override + UrlRequest_StatusListener fromRef(jni.JObjectPtr ref) => + UrlRequest_StatusListener.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($UrlRequest_StatusListenerType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $UrlRequest_StatusListenerType && + other is $UrlRequest_StatusListenerType; +} + +/// from: org.chromium.net.UrlRequest +class UrlRequest extends jni.JObject { + @override + late final jni.JObjType $type = type; + + UrlRequest.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = jni.Jni.findJClass(r'org/chromium/net/UrlRequest'); + + /// The type which includes information such as the signature of this class. + static const type = $UrlRequestType(); + static final _id_new0 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory UrlRequest() => UrlRequest.fromRef(jni.Jni.accessors + .newObjectWithArgs(_class.reference, _id_new0, []).object); + + static final _id_start = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'start', r'()V'); + + /// from: public abstract void start() + void start() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_start, jni.JniCallType.voidType, []).check(); + + static final _id_followRedirect = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'followRedirect', r'()V'); + + /// from: public abstract void followRedirect() + void followRedirect() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_followRedirect, jni.JniCallType.voidType, []).check(); + + static final _id_read = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'read', r'(Ljava/nio/ByteBuffer;)V'); + + /// from: public abstract void read(java.nio.ByteBuffer byteBuffer) + void read( + ByteBuffer byteBuffer, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_read, + jni.JniCallType.voidType, [byteBuffer.reference]).check(); + + static final _id_cancel = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'cancel', r'()V'); + + /// from: public abstract void cancel() + void cancel() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_cancel, jni.JniCallType.voidType, []).check(); + + static final _id_isDone = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'isDone', r'()Z'); + + /// from: public abstract boolean isDone() + bool isDone() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_isDone, jni.JniCallType.booleanType, []).boolean; + + static final _id_getStatus = jni.Jni.accessors.getMethodIDOf(_class.reference, + r'getStatus', r'(Lorg/chromium/net/UrlRequest$StatusListener;)V'); + + /// from: public abstract void getStatus(org.chromium.net.UrlRequest$StatusListener statusListener) + void getStatus( + UrlRequest_StatusListener statusListener, + ) => + jni.Jni.accessors.callMethodWithArgs(reference, _id_getStatus, + jni.JniCallType.voidType, [statusListener.reference]).check(); +} + +class $UrlRequestType extends jni.JObjType { + const $UrlRequestType(); + + @override + String get signature => r'Lorg/chromium/net/UrlRequest;'; + + @override + UrlRequest fromRef(jni.JObjectPtr ref) => UrlRequest.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($UrlRequestType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $UrlRequestType && other is $UrlRequestType; +} + +/// from: org.chromium.net.UrlResponseInfo$HeaderBlock +class UrlResponseInfo_HeaderBlock extends jni.JObject { + @override + late final jni.JObjType $type = type; + + UrlResponseInfo_HeaderBlock.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = + jni.Jni.findJClass(r'org/chromium/net/UrlResponseInfo$HeaderBlock'); + + /// The type which includes information such as the signature of this class. + static const type = $UrlResponseInfo_HeaderBlockType(); + static final _id_new0 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory UrlResponseInfo_HeaderBlock() => + UrlResponseInfo_HeaderBlock.fromRef(jni.Jni.accessors + .newObjectWithArgs(_class.reference, _id_new0, []).object); + + static final _id_getAsList = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getAsList', r'()Ljava/util/List;'); + + /// from: public abstract java.util.List getAsList() + /// The returned object must be released after use, by calling the [release] method. + jni.JList getAsList() => const jni.JListType(jni.JObjectType()) + .fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getAsList, jni.JniCallType.objectType, []).object); + + static final _id_getAsMap = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getAsMap', r'()Ljava/util/Map;'); + + /// from: public abstract java.util.Map getAsMap() + /// The returned object must be released after use, by calling the [release] method. + jni.JMap> getAsMap() => + const jni.JMapType(jni.JStringType(), jni.JListType(jni.JStringType())) + .fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getAsMap, jni.JniCallType.objectType, []).object); +} + +class $UrlResponseInfo_HeaderBlockType + extends jni.JObjType { + const $UrlResponseInfo_HeaderBlockType(); + + @override + String get signature => r'Lorg/chromium/net/UrlResponseInfo$HeaderBlock;'; + + @override + UrlResponseInfo_HeaderBlock fromRef(jni.JObjectPtr ref) => + UrlResponseInfo_HeaderBlock.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($UrlResponseInfo_HeaderBlockType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $UrlResponseInfo_HeaderBlockType && + other is $UrlResponseInfo_HeaderBlockType; +} + +/// from: org.chromium.net.UrlResponseInfo +class UrlResponseInfo extends jni.JObject { + @override + late final jni.JObjType $type = type; + + UrlResponseInfo.fromRef( + super.ref, + ) : super.fromRef(); + + static final _class = jni.Jni.findJClass(r'org/chromium/net/UrlResponseInfo'); + + /// The type which includes information such as the signature of this class. + static const type = $UrlResponseInfoType(); + static final _id_new0 = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory UrlResponseInfo() => UrlResponseInfo.fromRef(jni.Jni.accessors + .newObjectWithArgs(_class.reference, _id_new0, []).object); + + static final _id_getUrl = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getUrl', r'()Ljava/lang/String;'); + + /// from: public abstract java.lang.String getUrl() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getUrl() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getUrl, jni.JniCallType.objectType, []).object); + + static final _id_getUrlChain = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getUrlChain', r'()Ljava/util/List;'); + + /// from: public abstract java.util.List getUrlChain() + /// The returned object must be released after use, by calling the [release] method. + jni.JList getUrlChain() => const jni.JListType(jni.JStringType()) + .fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getUrlChain, jni.JniCallType.objectType, []).object); + + static final _id_getHttpStatusCode = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getHttpStatusCode', r'()I'); + + /// from: public abstract int getHttpStatusCode() + int getHttpStatusCode() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_getHttpStatusCode, jni.JniCallType.intType, []).integer; + + static final _id_getHttpStatusText = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'getHttpStatusText', r'()Ljava/lang/String;'); + + /// from: public abstract java.lang.String getHttpStatusText() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getHttpStatusText() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getHttpStatusText, + jni.JniCallType.objectType, []).object); + + static final _id_getAllHeadersAsList = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'getAllHeadersAsList', r'()Ljava/util/List;'); + + /// from: public abstract java.util.List getAllHeadersAsList() + /// The returned object must be released after use, by calling the [release] method. + jni.JList getAllHeadersAsList() => + const jni.JListType(jni.JObjectType()).fromRef(jni.Jni.accessors + .callMethodWithArgs(reference, _id_getAllHeadersAsList, + jni.JniCallType.objectType, []).object); + + static final _id_getAllHeaders = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getAllHeaders', r'()Ljava/util/Map;'); + + /// from: public abstract java.util.Map getAllHeaders() + /// The returned object must be released after use, by calling the [release] method. + jni.JMap> getAllHeaders() => + const jni.JMapType(jni.JStringType(), jni.JListType(jni.JStringType())) + .fromRef(jni.Jni.accessors.callMethodWithArgs(reference, + _id_getAllHeaders, jni.JniCallType.objectType, []).object); + + static final _id_wasCached = + jni.Jni.accessors.getMethodIDOf(_class.reference, r'wasCached', r'()Z'); + + /// from: public abstract boolean wasCached() + bool wasCached() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_wasCached, jni.JniCallType.booleanType, []).boolean; + + static final _id_getNegotiatedProtocol = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'getNegotiatedProtocol', r'()Ljava/lang/String;'); + + /// from: public abstract java.lang.String getNegotiatedProtocol() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getNegotiatedProtocol() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getNegotiatedProtocol, + jni.JniCallType.objectType, []).object); + + static final _id_getProxyServer = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'getProxyServer', r'()Ljava/lang/String;'); + + /// from: public abstract java.lang.String getProxyServer() + /// The returned object must be released after use, by calling the [release] method. + jni.JString getProxyServer() => + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, + _id_getProxyServer, + jni.JniCallType.objectType, []).object); + + static final _id_getReceivedByteCount = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getReceivedByteCount', r'()J'); + + /// from: public abstract long getReceivedByteCount() + int getReceivedByteCount() => jni.Jni.accessors.callMethodWithArgs( + reference, _id_getReceivedByteCount, jni.JniCallType.longType, []).long; +} + +class $UrlResponseInfoType extends jni.JObjType { + const $UrlResponseInfoType(); + + @override + String get signature => r'Lorg/chromium/net/UrlResponseInfo;'; + + @override + UrlResponseInfo fromRef(jni.JObjectPtr ref) => UrlResponseInfo.fromRef(ref); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($UrlResponseInfoType).hashCode; + + @override + bool operator ==(Object other) => + other.runtimeType == $UrlResponseInfoType && + other is $UrlResponseInfoType; +} diff --git a/pkgs/cronet_http/pigeons/messages.dart b/pkgs/cronet_http/pigeons/messages.dart deleted file mode 100644 index 52adb78b64..0000000000 --- a/pkgs/cronet_http/pigeons/messages.dart +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -/// Defines messages exchanged between the cronet_http native and Dart code. - -import 'package:pigeon/pigeon.dart'; - -enum CacheMode { - disabled, - memory, - diskNoHttp, - disk, -} - -/// An event message sent when the response headers are received. -/// -/// If [StartRequest.followRedirects] was false, then the first response, -/// regardless of whether it is a redirect or not, will be returned. Otherwise, -/// this is the response after all redirects have been followed. -/// -/// See -/// [UrlRequest.Callback.onResponseStarted](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#public-abstract-void-onresponsestarted-urlrequest-request,-urlresponseinfo-info) -class ResponseStarted { - Map?> headers; - int statusCode; - String statusText; - bool isRedirect; -} - -/// An event message sent when part of the response body has been received. -/// -/// See -/// [UrlRequest.Callback.onReadCompleted](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#public-abstract-void-onreadcompleted-urlrequest-request,-urlresponseinfo-info,-bytebuffer-bytebuffer) -class ReadCompleted { - Uint8List data; -} - -enum ExceptionType { - illegalArgumentException, - otherException, -} - -enum EventMessageType { responseStarted, readCompleted, tooManyRedirects } - -/// Encapsulates a message sent from Cronet to the Dart client. -class EventMessage { - EventMessageType type; - - // Set if [type] == responseStarted; - ResponseStarted? responseStarted; - - // Set if [type] == readCompleted; - ReadCompleted? readCompleted; -} - -class CreateEngineRequest { - CacheMode? cacheMode; - int? cacheMaxSize; - bool? enableBrotli; - bool? enableHttp2; - bool? enablePublicKeyPinningBypassForLocalTrustAnchors; - bool? enableQuic; - String? storagePath; - String? userAgent; -} - -class CreateEngineResponse { - String? engineId; - String? errorString; - ExceptionType? errorType; -} - -class StartRequest { - String engineId; - String url; - String method; - Map headers; - Uint8List body; - int maxRedirects; - bool followRedirects; -} - -class StartResponse { - // The channel that the caller should listen to for events related to the - // HTTP request. - String eventChannel; -} - -@HostApi() -abstract class HttpApi { - // Create a new CronetEngine with the given properties and returns it's id. - CreateEngineResponse createEngine(CreateEngineRequest request); - - // Free the resources associated with the CronetEngine. - void freeEngine(String engineId); - - /// Starts an HTTP request using an existing CronetEngine and returns a - /// channel where future results will be streamed. - StartResponse start(StartRequest request); - - // Pigeon does not generate code for classes that are not used in an API. - // So create a dummy method that includes classes that will be used for - // other purposes e.g. are sent over an `EventChannel`. - void dummy(EventMessage message); -} diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index f1517a6957..129547c1aa 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.2.2 +version: 0.3.0-jni repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: @@ -12,10 +12,11 @@ dependencies: flutter: sdk: flutter http: '>=0.13.4 <2.0.0' + jni: ^0.6.1 dev_dependencies: dart_flutter_team_lints: ^1.0.0 - pigeon: ^3.2.3 + jnigen: ^0.6.0 xml: ^6.1.0 yaml_edit: ^2.0.3 @@ -23,5 +24,5 @@ flutter: plugin: platforms: android: - package: io.flutter.plugins.cronet_http - pluginClass: CronetHttpPlugin + ffiPlugin: true + diff --git a/pkgs/cronet_http/tool/run_pigeon.sh b/pkgs/cronet_http/tool/run_pigeon.sh deleted file mode 100644 index 47494319c4..0000000000 --- a/pkgs/cronet_http/tool/run_pigeon.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# Generate the platform messages used by cronet_http. -cd ../ - -flutter pub run pigeon \ - --input pigeons/messages.dart \ - --dart_out lib/src/messages.dart \ - --java_out android/src/main/java/io/flutter/plugins/cronet_http/Messages.java \ - --java_package "io.flutter.plugins.cronet_http" - -dart format lib/src/messages.dart diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart index 6a5c547709..e21a5c2d4a 100644 --- a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart @@ -35,6 +35,15 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { expect(response.isRedirect, true); }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : false); + test('disallow redirect, 0 maxRedirects', () async { + final request = Request('GET', Uri.http(host, '/1')) + ..followRedirects = false + ..maxRedirects = 0; + final response = await client.send(request); + expect(response.statusCode, 302); + expect(response.isRedirect, true); + }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : false); + test('allow redirect', () async { final request = Request('GET', Uri.http(host, '/1')) ..followRedirects = true; @@ -43,7 +52,7 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { expect(response.isRedirect, false); }); - test('allow redirect, 0 maxRedirects, ', () async { + test('allow redirect, 0 maxRedirects', () async { final request = Request('GET', Uri.http(host, '/1')) ..followRedirects = true ..maxRedirects = 0; From 594934b7214541bbb0b8c32d08d34a073a7c1e93 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 12 Sep 2023 16:33:09 -0700 Subject: [PATCH 264/448] Separate the cronet callbacks from the `send` method (#1017) --- pkgs/cronet_http/lib/src/cronet_client.dart | 201 ++++++++++---------- 1 file changed, 101 insertions(+), 100 deletions(-) diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index a95b36dc2e..ec6258affd 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -135,6 +135,103 @@ Map _cronetToClientHeaders( key.toDartString(releaseOriginal: true).toLowerCase(), value.join(','))); +jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( + BaseRequest request, Completer responseCompleter) { + StreamController>? responseStream; + jb.ByteBuffer? byteBuffer; + var numRedirects = 0; + + // The order of callbacks generated by Cronet is documented here: + // https://developer.android.com/guide/topics/connectivity/cronet/lifecycle + return jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface.implement( + jb.$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl( + onResponseStarted: (urlRequest, responseInfo) { + responseStream = StreamController(); + final responseHeaders = + _cronetToClientHeaders(responseInfo.getAllHeaders()); + int? contentLength; + + switch (responseHeaders['content-length']) { + case final contentLengthHeader? + when !_digitRegex.hasMatch(contentLengthHeader): + responseCompleter.completeError(ClientException( + 'Invalid content-length header [$contentLengthHeader].', + request.url, + )); + urlRequest.cancel(); + return; + case final contentLengthHeader?: + contentLength = int.parse(contentLengthHeader); + } + responseCompleter.complete(StreamedResponse( + responseStream!.stream, + responseInfo.getHttpStatusCode(), + contentLength: contentLength, + reasonPhrase: responseInfo + .getHttpStatusText() + .toDartString(releaseOriginal: true), + request: request, + isRedirect: false, + headers: responseHeaders, + )); + + byteBuffer = jb.ByteBuffer.allocateDirect(1024 * 1024); + urlRequest.read(byteBuffer!); + }, + onRedirectReceived: (urlRequest, responseInfo, newLocationUrl) { + if (!request.followRedirects) { + urlRequest.cancel(); + responseCompleter.complete(StreamedResponse( + const Stream.empty(), // Cronet provides no body for redirects. + responseInfo.getHttpStatusCode(), + contentLength: 0, + reasonPhrase: responseInfo + .getHttpStatusText() + .toDartString(releaseOriginal: true), + request: request, + isRedirect: true, + headers: _cronetToClientHeaders(responseInfo.getAllHeaders()))); + return; + } + ++numRedirects; + if (numRedirects <= request.maxRedirects) { + urlRequest.followRedirect(); + } else { + urlRequest.cancel(); + responseCompleter.completeError( + ClientException('Redirect limit exceeded', request.url)); + } + }, + onReadCompleted: (urlRequest, responseInfo, byteBuffer) { + byteBuffer.flip(); + + final remaining = byteBuffer.remaining(); + final data = Uint8List(remaining); + // TODO: Use a more efficient approach when + // https://github.com/dart-lang/jnigen/issues/387 is fixed. + for (var i = 0; i < remaining; ++i) { + data[i] = byteBuffer.get1(i); + } + responseStream!.add(data); + byteBuffer.clear(); + urlRequest.read(byteBuffer); + }, + onSucceeded: (urlRequest, responseInfo) { + responseStream!.sink.close(); + }, + onFailed: (urlRequest, responseInfo, cronetException) { + final error = ClientException( + 'Cronet exception: ${cronetException.toString()}', request.url); + if (responseStream == null) { + responseCompleter.completeError(error); + } else { + responseStream!.addError(error); + responseStream!.close(); + } + }, + )); +} + /// A HTTP [Client] based on the /// [Cronet](https://developer.android.com/guide/topics/connectivity/cronet) /// network stack. @@ -219,106 +316,10 @@ class CronetClient extends BaseClient { final responseCompleter = Completer(); final engine = _engine!._engine; - late jb.UrlRequest cronetRequest; - var numRedirects = 0; - StreamController>? responseStream; - jb.ByteBuffer? byteBuffer; - - // The order of callbacks generated by Cronet is documented here: - // https://developer.android.com/guide/topics/connectivity/cronet/lifecycle - - final cronetCallbacks = - jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface.implement( - jb.$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl( - onResponseStarted: (urlRequest, responseInfo) { - responseStream = StreamController(); - final responseHeaders = - _cronetToClientHeaders(responseInfo.getAllHeaders()); - int? contentLength; - - switch (responseHeaders['content-length']) { - case final contentLengthHeader? - when !_digitRegex.hasMatch(contentLengthHeader): - responseCompleter.completeError(ClientException( - 'Invalid content-length header [$contentLengthHeader].', - request.url, - )); - urlRequest.cancel(); - return; - case final contentLengthHeader?: - contentLength = int.parse(contentLengthHeader); - } - responseCompleter.complete(StreamedResponse( - responseStream!.stream, - responseInfo.getHttpStatusCode(), - contentLength: contentLength, - reasonPhrase: responseInfo - .getHttpStatusText() - .toDartString(releaseOriginal: true), - request: request, - isRedirect: false, - headers: responseHeaders, - )); - - byteBuffer = jb.ByteBuffer.allocateDirect(1024 * 1024); - urlRequest.read(byteBuffer!); - }, - onRedirectReceived: (urlRequest, responseInfo, newLocationUrl) { - if (!request.followRedirects) { - cronetRequest.cancel(); - responseCompleter.complete(StreamedResponse( - const Stream.empty(), // Cronet provides no body for redirects. - responseInfo.getHttpStatusCode(), - contentLength: 0, - reasonPhrase: responseInfo - .getHttpStatusText() - .toDartString(releaseOriginal: true), - request: request, - isRedirect: true, - headers: _cronetToClientHeaders(responseInfo.getAllHeaders()))); - return; - } - ++numRedirects; - if (numRedirects <= request.maxRedirects) { - cronetRequest.followRedirect(); - } else { - cronetRequest.cancel(); - responseCompleter.completeError( - ClientException('Redirect limit exceeded', request.url)); - } - }, - onReadCompleted: (urlRequest, responseInfo, byteBuffer) { - byteBuffer.flip(); - - final remaining = byteBuffer.remaining(); - final data = Uint8List(remaining); - // TODO: Use a more efficient approach when - // https://github.com/dart-lang/jnigen/issues/387 is fixed. - for (var i = 0; i < remaining; ++i) { - data[i] = byteBuffer.get1(i); - } - responseStream!.add(data); - byteBuffer.clear(); - cronetRequest.read(byteBuffer); - }, - onSucceeded: (urlRequest, responseInfo) { - responseStream!.sink.close(); - }, - onFailed: (urlRequest, responseInfo, cronetException) { - final error = ClientException( - 'Cronet exception: ${cronetException.toString()}', request.url); - if (responseStream == null) { - responseCompleter.completeError(error); - } else { - responseStream!.addError(error); - responseStream!.close(); - } - }, - )); - final builder = engine.newUrlRequestBuilder( request.url.toString().toJString(), - jb.UrlRequestCallbackProxy.new1(cronetCallbacks), + jb.UrlRequestCallbackProxy.new1( + _urlRequestCallbacks(request, responseCompleter)), _executor, ); @@ -341,7 +342,7 @@ class CronetClient extends BaseClient { builder.setUploadDataProvider( jb.UploadDataProviders.create4(bodyBytes), _executor); } - cronetRequest = builder.build()..start(); - return responseCompleter.future.whenComplete(() => byteBuffer?.release()); + builder.build().start(); + return responseCompleter.future; } } From 06fccb2e256d814023cc98231228f86b2e798b58 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Wed, 13 Sep 2023 19:53:20 -0500 Subject: [PATCH 265/448] Cleanup `package:http` utils (#1011) --- pkgs/http/lib/src/utils.dart | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/pkgs/http/lib/src/utils.dart b/pkgs/http/lib/src/utils.dart index e79108e88a..72ec1529f2 100644 --- a/pkgs/http/lib/src/utils.dart +++ b/pkgs/http/lib/src/utils.dart @@ -12,14 +12,11 @@ import 'byte_stream.dart'; /// /// mapToQuery({"foo": "bar", "baz": "bang"}); /// //=> "foo=bar&baz=bang" -String mapToQuery(Map map, {Encoding? encoding}) { - var pairs = >[]; - map.forEach((key, value) => pairs.add([ - Uri.encodeQueryComponent(key, encoding: encoding ?? utf8), - Uri.encodeQueryComponent(value, encoding: encoding ?? utf8) - ])); - return pairs.map((pair) => '${pair[0]}=${pair[1]}').join('&'); -} +String mapToQuery(Map map, {required Encoding encoding}) => + map.entries + .map((e) => '${Uri.encodeQueryComponent(e.key, encoding: encoding)}' + '=${Uri.encodeQueryComponent(e.value, encoding: encoding)}') + .join('&'); /// Returns the [Encoding] that corresponds to [charset]. /// @@ -34,8 +31,6 @@ Encoding encodingForCharset(String? charset, [Encoding fallback = latin1]) { /// /// Throws a [FormatException] if no [Encoding] was found that corresponds to /// [charset]. -/// -/// [charset] may not be null. Encoding requiredEncodingForCharset(String charset) => Encoding.getByName(charset) ?? (throw FormatException('Unsupported encoding "$charset".')); @@ -53,9 +48,8 @@ bool isPlainAscii(String string) => _asciiOnly.hasMatch(string); /// If [input] is a [TypedData], this just returns a view on [input]. Uint8List toUint8List(List input) { if (input is Uint8List) return input; - if (input is TypedData) { - // TODO(nweiz): remove "as" when issue 11080 is fixed. - return Uint8List.view((input as TypedData).buffer); + if (input case TypedData data) { + return Uint8List.view(data.buffer); } return Uint8List.fromList(input); } From 062596aaafa64b5839c6376e2e3d35fc36ebc0b5 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 14 Sep 2023 09:07:20 -0700 Subject: [PATCH 266/448] Use efficient operations when copying bytes between Dart and Java (#1019) --- pkgs/cronet_http/CHANGELOG.md | 4 + pkgs/cronet_http/android/build.gradle | 10 + pkgs/cronet_http/android/consumer-rules.pro | 1 + .../example/android/app/build.gradle | 3 + pkgs/cronet_http/jnigen.yaml | 4 - pkgs/cronet_http/lib/src/cronet_client.dart | 28 +- .../cronet_http/lib/src/jni/jni_bindings.dart | 1507 +---------------- pkgs/cronet_http/pubspec.yaml | 6 +- 8 files changed, 124 insertions(+), 1439 deletions(-) create mode 100644 pkgs/cronet_http/android/consumer-rules.pro diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 416553137a..28116260c7 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.0-jni + +* Use more efficient operations when copying bytes between Java and Dart. + ## 0.3.0-jni * Switch to using `package:jnigen` for bindings to Cronet diff --git a/pkgs/cronet_http/android/build.gradle b/pkgs/cronet_http/android/build.gradle index bf79214106..3a91d8a295 100644 --- a/pkgs/cronet_http/android/build.gradle +++ b/pkgs/cronet_http/android/build.gradle @@ -43,6 +43,16 @@ android { defaultConfig { minSdkVersion 16 } + + defaultConfig { + consumerProguardFiles 'consumer-rules.pro' + } + + buildTypes { + release { + minifyEnabled false + } + } } dependencies { diff --git a/pkgs/cronet_http/android/consumer-rules.pro b/pkgs/cronet_http/android/consumer-rules.pro new file mode 100644 index 0000000000..00f4f3efe1 --- /dev/null +++ b/pkgs/cronet_http/android/consumer-rules.pro @@ -0,0 +1 @@ +-keep class io.flutter.plugins.cronet_http.** { *; } diff --git a/pkgs/cronet_http/example/android/app/build.gradle b/pkgs/cronet_http/example/android/app/build.gradle index d42d02a0da..88b33564c3 100644 --- a/pkgs/cronet_http/example/android/app/build.gradle +++ b/pkgs/cronet_http/example/android/app/build.gradle @@ -67,4 +67,7 @@ flutter { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + // ""com.google.android.gms:play-services-cronet" is only present so that + // `jnigen` will work. Applications should not include this line. + implementation "com.google.android.gms:play-services-cronet:18.0.1" } diff --git a/pkgs/cronet_http/jnigen.yaml b/pkgs/cronet_http/jnigen.yaml index 1b2f2a7490..a16d38f48d 100644 --- a/pkgs/cronet_http/jnigen.yaml +++ b/pkgs/cronet_http/jnigen.yaml @@ -7,8 +7,6 @@ android_sdk_config: add_gradle_deps: true android_example: 'example/' -suspend_fun_to_async: true - output: bindings_type: dart_only dart: @@ -18,8 +16,6 @@ output: classes: - 'io.flutter.plugins.cronet_http.UrlRequestCallbackProxy' - 'java.net.URL' - - 'java.nio.Buffer' - - 'java.nio.ByteBuffer' - 'java.util.concurrent.Executors' - 'org.chromium.net.CronetEngine' - 'org.chromium.net.CronetException' diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index ec6258affd..69143208fc 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -14,7 +14,6 @@ library; import 'dart:async'; -import 'dart:typed_data'; import 'package:http/http.dart'; import 'package:jni/jni.dart'; @@ -22,6 +21,7 @@ import 'package:jni/jni.dart'; import 'jni/jni_bindings.dart' as jb; final _digitRegex = RegExp(r'^\d+$'); +const _bufferSize = 10 * 1024; // The size of the Cronet read buffer. /// The type of caching to use when making HTTP requests. enum CacheMode { @@ -138,7 +138,7 @@ Map _cronetToClientHeaders( jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( BaseRequest request, Completer responseCompleter) { StreamController>? responseStream; - jb.ByteBuffer? byteBuffer; + JByteBuffer? jByteBuffer; var numRedirects = 0; // The order of callbacks generated by Cronet is documented here: @@ -175,8 +175,8 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( headers: responseHeaders, )); - byteBuffer = jb.ByteBuffer.allocateDirect(1024 * 1024); - urlRequest.read(byteBuffer!); + jByteBuffer = JByteBuffer.allocateDirect(_bufferSize); + urlRequest.read(jByteBuffer!); }, onRedirectReceived: (urlRequest, responseInfo, newLocationUrl) { if (!request.followRedirects) { @@ -204,20 +204,15 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( }, onReadCompleted: (urlRequest, responseInfo, byteBuffer) { byteBuffer.flip(); + responseStream! + .add(jByteBuffer!.asUint8List().sublist(0, byteBuffer.remaining)); - final remaining = byteBuffer.remaining(); - final data = Uint8List(remaining); - // TODO: Use a more efficient approach when - // https://github.com/dart-lang/jnigen/issues/387 is fixed. - for (var i = 0; i < remaining; ++i) { - data[i] = byteBuffer.get1(i); - } - responseStream!.add(data); byteBuffer.clear(); urlRequest.read(byteBuffer); }, onSucceeded: (urlRequest, responseInfo) { responseStream!.sink.close(); + jByteBuffer?.release(); }, onFailed: (urlRequest, responseInfo, cronetException) { final error = ClientException( @@ -228,6 +223,7 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( responseStream!.addError(error); responseStream!.close(); } + jByteBuffer?.release(); }, )); } @@ -333,14 +329,8 @@ class CronetClient extends BaseClient { headers.forEach((k, v) => builder.addHeader(k.toJString(), v.toJString())); if (body.isNotEmpty) { - // TODO: Use a more efficient approach when - // https://github.com/dart-lang/jnigen/issues/387 is fixed. - final bodyBytes = JArray(jbyte.type, body.length); - for (var i = 0; i < body.length; ++i) { - bodyBytes[i] = body[i]; - } builder.setUploadDataProvider( - jb.UploadDataProviders.create4(bodyBytes), _executor); + jb.UploadDataProviders.create2(body.toJByteBuffer()), _executor); } builder.build().start(); return responseCompleter.future; diff --git a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart index 2479675771..c8df6936f2 100644 --- a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart +++ b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart @@ -1,11 +1,11 @@ // Autogenerated by jnigen. DO NOT EDIT! -import 'dart:ffi' as ffi; // ignore_for_file: annotate_overrides // ignore_for_file: camel_case_extensions // ignore_for_file: camel_case_types // ignore_for_file: constant_identifier_names // ignore_for_file: file_names +// ignore_for_file: lines_longer_than_80_chars // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: non_constant_identifier_names // ignore_for_file: overridden_fields @@ -15,10 +15,9 @@ import 'dart:ffi' as ffi; // ignore_for_file: unused_import // ignore_for_file: unused_local_variable // ignore_for_file: unused_shown_name -// ignore_for_file: lines_longer_than_80_chars +import 'dart:ffi' as ffi; import 'dart:isolate' show ReceivePort; - import 'package:jni/internal_helpers_for_jnigen.dart'; import 'package:jni/jni.dart' as jni; @@ -81,7 +80,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { void onReadCompleted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ByteBuffer byteBuffer, + jni.JByteBuffer byteBuffer, ) => jni.Jni.accessors.callMethodWithArgs( reference, _id_onReadCompleted, jni.JniCallType.voidType, [ @@ -178,7 +177,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { _$impls[$p]!.onReadCompleted( $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), - $a[2].castTo(const $ByteBufferType(), releaseOriginal: true), + $a[2].castTo(const jni.JByteBufferType(), releaseOriginal: true), ); return jni.nullptr; } @@ -241,7 +240,7 @@ abstract class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl { UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) onResponseStarted, required void Function(UrlRequest urlRequest, - UrlResponseInfo urlResponseInfo, ByteBuffer byteBuffer) + UrlResponseInfo urlResponseInfo, jni.JByteBuffer byteBuffer) onReadCompleted, required void Function( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) @@ -256,7 +255,7 @@ abstract class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl { void onResponseStarted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo); void onReadCompleted(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ByteBuffer byteBuffer); + jni.JByteBuffer byteBuffer); void onSucceeded(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo); void onFailed(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, CronetException cronetException); @@ -272,7 +271,7 @@ class _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) onResponseStarted, required void Function(UrlRequest urlRequest, - UrlResponseInfo urlResponseInfo, ByteBuffer byteBuffer) + UrlResponseInfo urlResponseInfo, jni.JByteBuffer byteBuffer) onReadCompleted, required void Function( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) @@ -291,7 +290,7 @@ class _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) _onResponseStarted; final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ByteBuffer byteBuffer) _onReadCompleted; + jni.JByteBuffer byteBuffer) _onReadCompleted; final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) _onSucceeded; final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, @@ -306,7 +305,7 @@ class _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl _onResponseStarted(urlRequest, urlResponseInfo); void onReadCompleted(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ByteBuffer byteBuffer) => + jni.JByteBuffer byteBuffer) => _onReadCompleted(urlRequest, urlResponseInfo, byteBuffer); void onSucceeded(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) => @@ -317,7 +316,7 @@ class _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl _onFailed(urlRequest, urlResponseInfo, cronetException); } -class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType +final class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType extends jni.JObjType { const $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType(); @@ -432,7 +431,7 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { void onReadCompleted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ByteBuffer byteBuffer, + jni.JByteBuffer byteBuffer, ) => jni.Jni.accessors.callMethodWithArgs( reference, _id_onReadCompleted, jni.JniCallType.voidType, [ @@ -476,7 +475,7 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { ]).check(); } -class $UrlRequestCallbackProxyType +final class $UrlRequestCallbackProxyType extends jni.JObjType { const $UrlRequestCallbackProxyType(); @@ -743,1082 +742,117 @@ class URL extends jni.JObject { /// from: public java.lang.String toExternalForm() /// The returned object must be released after use, by calling the [release] method. jni.JString toExternalForm() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_toExternalForm, - jni.JniCallType.objectType, []).object); - - static final _id_toURI = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'toURI', r'()Ljava/net/URI;'); - - /// from: public java.net.URI toURI() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject toURI() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_toURI, jni.JniCallType.objectType, []).object); - - static final _id_openConnection = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'openConnection', r'()Ljava/net/URLConnection;'); - - /// from: public java.net.URLConnection openConnection() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject openConnection() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_openConnection, - jni.JniCallType.objectType, []).object); - - static final _id_openConnection1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'openConnection', - r'(Ljava/net/Proxy;)Ljava/net/URLConnection;'); - - /// from: public java.net.URLConnection openConnection(java.net.Proxy proxy) - /// The returned object must be released after use, by calling the [release] method. - jni.JObject openConnection1( - jni.JObject proxy, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_openConnection1, - jni.JniCallType.objectType, - [proxy.reference]).object); - - static final _id_openStream = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'openStream', r'()Ljava/io/InputStream;'); - - /// from: public java.io.InputStream openStream() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject openStream() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_openStream, jni.JniCallType.objectType, []).object); - - static final _id_getContent = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getContent', r'()Ljava/lang/Object;'); - - /// from: public java.lang.Object getContent() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject getContent() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getContent, jni.JniCallType.objectType, []).object); - - static final _id_getContent1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'getContent', - r'([Ljava/lang/Class;)Ljava/lang/Object;'); - - /// from: public java.lang.Object getContent(java.lang.Class[] classs) - /// The returned object must be released after use, by calling the [release] method. - jni.JObject getContent1( - jni.JArray classs, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getContent1, - jni.JniCallType.objectType, - [classs.reference]).object); - - static final _id_setURLStreamHandlerFactory = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r'setURLStreamHandlerFactory', - r'(Ljava/net/URLStreamHandlerFactory;)V'); - - /// from: static public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory uRLStreamHandlerFactory) - static void setURLStreamHandlerFactory( - jni.JObject uRLStreamHandlerFactory, - ) => - jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setURLStreamHandlerFactory, - jni.JniCallType.voidType, - [uRLStreamHandlerFactory.reference]).check(); -} - -class $URLType extends jni.JObjType { - const $URLType(); - - @override - String get signature => r'Ljava/net/URL;'; - - @override - URL fromRef(jni.JObjectPtr ref) => URL.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($URLType).hashCode; - - @override - bool operator ==(Object other) => - other.runtimeType == $URLType && other is $URLType; -} - -/// from: java.nio.Buffer -class Buffer extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Buffer.fromRef( - super.ref, - ) : super.fromRef(); - - static final _class = jni.Jni.findJClass(r'java/nio/Buffer'); - - /// The type which includes information such as the signature of this class. - static const type = $BufferType(); - static final _id_capacity = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'capacity', r'()I'); - - /// from: public final int capacity() - int capacity() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_capacity, jni.JniCallType.intType, []).integer; - - static final _id_position = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'position', r'()I'); - - /// from: public final int position() - int position() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_position, jni.JniCallType.intType, []).integer; - - static final _id_position1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'position', r'(I)Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer position(int i) - /// The returned object must be released after use, by calling the [release] method. - Buffer position1( - int i, - ) => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_position1, - jni.JniCallType.objectType, - [jni.JValueInt(i)]).object); - - static final _id_limit = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'limit', r'()I'); - - /// from: public final int limit() - int limit() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_limit, jni.JniCallType.intType, []).integer; - - static final _id_limit1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'limit', r'(I)Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer limit(int i) - /// The returned object must be released after use, by calling the [release] method. - Buffer limit1( - int i, - ) => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_limit1, - jni.JniCallType.objectType, - [jni.JValueInt(i)]).object); - - static final _id_mark = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'mark', r'()Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer mark() - /// The returned object must be released after use, by calling the [release] method. - Buffer mark() => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_mark, jni.JniCallType.objectType, []).object); - - static final _id_reset = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'reset', r'()Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer reset() - /// The returned object must be released after use, by calling the [release] method. - Buffer reset() => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_reset, jni.JniCallType.objectType, []).object); - - static final _id_clear = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'clear', r'()Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer clear() - /// The returned object must be released after use, by calling the [release] method. - Buffer clear() => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_clear, jni.JniCallType.objectType, []).object); - - static final _id_flip = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'flip', r'()Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer flip() - /// The returned object must be released after use, by calling the [release] method. - Buffer flip() => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_flip, jni.JniCallType.objectType, []).object); - - static final _id_rewind = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'rewind', r'()Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer rewind() - /// The returned object must be released after use, by calling the [release] method. - Buffer rewind() => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_rewind, jni.JniCallType.objectType, []).object); - - static final _id_remaining = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'remaining', r'()I'); - - /// from: public final int remaining() - int remaining() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_remaining, jni.JniCallType.intType, []).integer; - - static final _id_hasRemaining = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'hasRemaining', r'()Z'); - - /// from: public final boolean hasRemaining() - bool hasRemaining() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_hasRemaining, jni.JniCallType.booleanType, []).boolean; - - static final _id_isReadOnly = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'isReadOnly', r'()Z'); - - /// from: public abstract boolean isReadOnly() - bool isReadOnly() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_isReadOnly, jni.JniCallType.booleanType, []).boolean; - - static final _id_hasArray = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'hasArray', r'()Z'); - - /// from: public abstract boolean hasArray() - bool hasArray() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_hasArray, jni.JniCallType.booleanType, []).boolean; - - static final _id_array = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'array', r'()Ljava/lang/Object;'); - - /// from: public abstract java.lang.Object array() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject array() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_array, jni.JniCallType.objectType, []).object); - - static final _id_arrayOffset = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'arrayOffset', r'()I'); - - /// from: public abstract int arrayOffset() - int arrayOffset() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_arrayOffset, jni.JniCallType.intType, []).integer; - - static final _id_isDirect = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'isDirect', r'()Z'); - - /// from: public abstract boolean isDirect() - bool isDirect() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_isDirect, jni.JniCallType.booleanType, []).boolean; -} - -class $BufferType extends jni.JObjType { - const $BufferType(); - - @override - String get signature => r'Ljava/nio/Buffer;'; - - @override - Buffer fromRef(jni.JObjectPtr ref) => Buffer.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($BufferType).hashCode; - - @override - bool operator ==(Object other) => - other.runtimeType == $BufferType && other is $BufferType; -} - -/// from: java.nio.ByteBuffer -class ByteBuffer extends Buffer { - @override - late final jni.JObjType $type = type; - - ByteBuffer.fromRef( - super.ref, - ) : super.fromRef(); - - static final _class = jni.Jni.findJClass(r'java/nio/ByteBuffer'); - - /// The type which includes information such as the signature of this class. - static const type = $ByteBufferType(); - static final _id_allocateDirect = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r'allocateDirect', r'(I)Ljava/nio/ByteBuffer;'); - - /// from: static public java.nio.ByteBuffer allocateDirect(int i) - /// The returned object must be released after use, by calling the [release] method. - static ByteBuffer allocateDirect( - int i, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_allocateDirect, - jni.JniCallType.objectType, [jni.JValueInt(i)]).object); - - static final _id_allocate = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r'allocate', r'(I)Ljava/nio/ByteBuffer;'); - - /// from: static public java.nio.ByteBuffer allocate(int i) - /// The returned object must be released after use, by calling the [release] method. - static ByteBuffer allocate( - int i, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_allocate, - jni.JniCallType.objectType, [jni.JValueInt(i)]).object); - - static final _id_wrap = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r'wrap', r'([BII)Ljava/nio/ByteBuffer;'); - - /// from: static public java.nio.ByteBuffer wrap(byte[] bs, int i, int i1) - /// The returned object must be released after use, by calling the [release] method. - static ByteBuffer wrap( - jni.JArray bs, - int i, - int i1, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_wrap, - jni.JniCallType.objectType, - [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).object); - - static final _id_wrap1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r'wrap', r'([B)Ljava/nio/ByteBuffer;'); - - /// from: static public java.nio.ByteBuffer wrap(byte[] bs) - /// The returned object must be released after use, by calling the [release] method. - static ByteBuffer wrap1( - jni.JArray bs, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_wrap1, - jni.JniCallType.objectType, [bs.reference]).object); - - static final _id_slice = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'slice', r'()Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer slice() - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer slice() => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_slice, jni.JniCallType.objectType, []).object); - - static final _id_duplicate = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'duplicate', r'()Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer duplicate() - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer duplicate() => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_duplicate, jni.JniCallType.objectType, []).object); - - static final _id_asReadOnlyBuffer = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'asReadOnlyBuffer', r'()Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer asReadOnlyBuffer() - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer asReadOnlyBuffer() => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_asReadOnlyBuffer, - jni.JniCallType.objectType, []).object); - - static final _id_get0 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'get', r'()B'); - - /// from: public abstract byte get() - int get0() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_get0, jni.JniCallType.byteType, []).byte; - - static final _id_put = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'put', r'(B)Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer put(byte b) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer put( - int b, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_put, - jni.JniCallType.objectType, - [jni.JValueByte(b)]).object); - - static final _id_get1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'get', r'(I)B'); - - /// from: public abstract byte get(int i) - int get1( - int i, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_get1, - jni.JniCallType.byteType, [jni.JValueInt(i)]).byte; - - static final _id_put1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'put', r'(IB)Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer put(int i, byte b) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer put1( - int i, - int b, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_put1, - jni.JniCallType.objectType, - [jni.JValueInt(i), jni.JValueByte(b)]).object); - - static final _id_get2 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'get', r'([BII)Ljava/nio/ByteBuffer;'); - - /// from: public java.nio.ByteBuffer get(byte[] bs, int i, int i1) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer get2( - jni.JArray bs, - int i, - int i1, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_get2, - jni.JniCallType.objectType, - [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).object); - - static final _id_get3 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'get', r'([B)Ljava/nio/ByteBuffer;'); - - /// from: public java.nio.ByteBuffer get(byte[] bs) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer get3( - jni.JArray bs, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_get3, - jni.JniCallType.objectType, - [bs.reference]).object); - - static final _id_put2 = jni.Jni.accessors.getMethodIDOf(_class.reference, - r'put', r'(Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;'); - - /// from: public java.nio.ByteBuffer put(java.nio.ByteBuffer byteBuffer) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer put2( - ByteBuffer byteBuffer, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_put2, - jni.JniCallType.objectType, - [byteBuffer.reference]).object); - - static final _id_put3 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'put', r'([BII)Ljava/nio/ByteBuffer;'); - - /// from: public java.nio.ByteBuffer put(byte[] bs, int i, int i1) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer put3( - jni.JArray bs, - int i, - int i1, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_put3, - jni.JniCallType.objectType, - [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).object); - - static final _id_put4 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'put', r'([B)Ljava/nio/ByteBuffer;'); - - /// from: public final java.nio.ByteBuffer put(byte[] bs) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer put4( - jni.JArray bs, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_put4, - jni.JniCallType.objectType, - [bs.reference]).object); - - static final _id_hasArray = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'hasArray', r'()Z'); - - /// from: public final boolean hasArray() - bool hasArray() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_hasArray, jni.JniCallType.booleanType, []).boolean; - - static final _id_array1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'array', r'()[B'); - - /// from: public final byte[] array() - /// The returned object must be released after use, by calling the [release] method. - jni.JArray array1() => const jni.JArrayType(jni.jbyteType()) - .fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_array1, jni.JniCallType.objectType, []).object); - - static final _id_arrayOffset = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'arrayOffset', r'()I'); - - /// from: public final int arrayOffset() - int arrayOffset() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_arrayOffset, jni.JniCallType.intType, []).integer; - - static final _id_position1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'position', r'(I)Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer position(int i) - /// The returned object must be released after use, by calling the [release] method. - Buffer position1( - int i, - ) => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_position1, - jni.JniCallType.objectType, - [jni.JValueInt(i)]).object); - - static final _id_limit1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'limit', r'(I)Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer limit(int i) - /// The returned object must be released after use, by calling the [release] method. - Buffer limit1( - int i, - ) => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_limit1, - jni.JniCallType.objectType, - [jni.JValueInt(i)]).object); - - static final _id_mark = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'mark', r'()Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer mark() - /// The returned object must be released after use, by calling the [release] method. - Buffer mark() => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_mark, jni.JniCallType.objectType, []).object); - - static final _id_reset = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'reset', r'()Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer reset() - /// The returned object must be released after use, by calling the [release] method. - Buffer reset() => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_reset, jni.JniCallType.objectType, []).object); - - static final _id_clear = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'clear', r'()Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer clear() - /// The returned object must be released after use, by calling the [release] method. - Buffer clear() => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_clear, jni.JniCallType.objectType, []).object); - - static final _id_flip = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'flip', r'()Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer flip() - /// The returned object must be released after use, by calling the [release] method. - Buffer flip() => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_flip, jni.JniCallType.objectType, []).object); - - static final _id_rewind = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'rewind', r'()Ljava/nio/Buffer;'); - - /// from: public java.nio.Buffer rewind() - /// The returned object must be released after use, by calling the [release] method. - Buffer rewind() => - const $BufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_rewind, jni.JniCallType.objectType, []).object); - - static final _id_compact = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'compact', r'()Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer compact() - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer compact() => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_compact, jni.JniCallType.objectType, []).object); - - static final _id_isDirect = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'isDirect', r'()Z'); - - /// from: public abstract boolean isDirect() - bool isDirect() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_isDirect, jni.JniCallType.booleanType, []).boolean; - - static final _id_toString1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'toString', r'()Ljava/lang/String;'); - - /// from: public java.lang.String toString() - /// The returned object must be released after use, by calling the [release] method. - jni.JString toString1() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_toString1, jni.JniCallType.objectType, []).object); - - static final _id_hashCode1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'hashCode', r'()I'); - - /// from: public int hashCode() - int hashCode1() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_hashCode1, jni.JniCallType.intType, []).integer; - - static final _id_equals1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'equals', r'(Ljava/lang/Object;)Z'); - - /// from: public boolean equals(java.lang.Object object) - bool equals1( - jni.JObject object, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_equals1, - jni.JniCallType.booleanType, [object.reference]).boolean; - - static final _id_compareTo = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'compareTo', r'(Ljava/nio/ByteBuffer;)I'); - - /// from: public int compareTo(java.nio.ByteBuffer byteBuffer) - int compareTo( - ByteBuffer byteBuffer, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_compareTo, - jni.JniCallType.intType, [byteBuffer.reference]).integer; - - static final _id_order = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'order', r'()Ljava/nio/ByteOrder;'); - - /// from: public final java.nio.ByteOrder order() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject order() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_order, jni.JniCallType.objectType, []).object); - - static final _id_order1 = jni.Jni.accessors.getMethodIDOf(_class.reference, - r'order', r'(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;'); - - /// from: public final java.nio.ByteBuffer order(java.nio.ByteOrder byteOrder) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer order1( - jni.JObject byteOrder, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_order1, - jni.JniCallType.objectType, - [byteOrder.reference]).object); - - static final _id_alignmentOffset = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'alignmentOffset', r'(II)I'); - - /// from: public final int alignmentOffset(int i, int i1) - int alignmentOffset( - int i, - int i1, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_alignmentOffset, - jni.JniCallType.intType, - [jni.JValueInt(i), jni.JValueInt(i1)]).integer; - - static final _id_alignedSlice = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'alignedSlice', r'(I)Ljava/nio/ByteBuffer;'); - - /// from: public final java.nio.ByteBuffer alignedSlice(int i) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer alignedSlice( - int i, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_alignedSlice, - jni.JniCallType.objectType, - [jni.JValueInt(i)]).object); - - static final _id_getChar = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getChar', r'()C'); - - /// from: public abstract char getChar() - int getChar() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_getChar, jni.JniCallType.charType, []).char; - - static final _id_putChar = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'putChar', r'(C)Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer putChar(char c) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer putChar( - int c, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_putChar, - jni.JniCallType.objectType, - [jni.JValueChar(c)]).object); - - static final _id_getChar1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getChar', r'(I)C'); - - /// from: public abstract char getChar(int i) - int getChar1( - int i, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_getChar1, - jni.JniCallType.charType, [jni.JValueInt(i)]).char; - - static final _id_putChar1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'putChar', r'(IC)Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer putChar(int i, char c) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer putChar1( - int i, - int c, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_putChar1, - jni.JniCallType.objectType, - [jni.JValueInt(i), jni.JValueChar(c)]).object); - - static final _id_asCharBuffer = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'asCharBuffer', r'()Ljava/nio/CharBuffer;'); - - /// from: public abstract java.nio.CharBuffer asCharBuffer() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject asCharBuffer() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_asCharBuffer, jni.JniCallType.objectType, []).object); - - static final _id_getShort = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getShort', r'()S'); - - /// from: public abstract short getShort() - int getShort() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_getShort, jni.JniCallType.shortType, []).short; - - static final _id_putShort = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'putShort', r'(S)Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer putShort(short s) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer putShort( - int s, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_putShort, - jni.JniCallType.objectType, - [jni.JValueShort(s)]).object); - - static final _id_getShort1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getShort', r'(I)S'); - - /// from: public abstract short getShort(int i) - int getShort1( - int i, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_getShort1, - jni.JniCallType.shortType, [jni.JValueInt(i)]).short; - - static final _id_putShort1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'putShort', r'(IS)Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer putShort(int i, short s) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer putShort1( - int i, - int s, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_putShort1, - jni.JniCallType.objectType, - [jni.JValueInt(i), jni.JValueShort(s)]).object); - - static final _id_asShortBuffer = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'asShortBuffer', r'()Ljava/nio/ShortBuffer;'); - - /// from: public abstract java.nio.ShortBuffer asShortBuffer() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject asShortBuffer() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_asShortBuffer, jni.JniCallType.objectType, []).object); - - static final _id_getInt = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getInt', r'()I'); - - /// from: public abstract int getInt() - int getInt() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_getInt, jni.JniCallType.intType, []).integer; - - static final _id_putInt = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'putInt', r'(I)Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer putInt(int i) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer putInt( - int i, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_putInt, - jni.JniCallType.objectType, - [jni.JValueInt(i)]).object); - - static final _id_getInt1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getInt', r'(I)I'); - - /// from: public abstract int getInt(int i) - int getInt1( - int i, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_getInt1, - jni.JniCallType.intType, [jni.JValueInt(i)]).integer; - - static final _id_putInt1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'putInt', r'(II)Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer putInt(int i, int i1) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer putInt1( - int i, - int i1, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_putInt1, - jni.JniCallType.objectType, - [jni.JValueInt(i), jni.JValueInt(i1)]).object); - - static final _id_asIntBuffer = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'asIntBuffer', r'()Ljava/nio/IntBuffer;'); - - /// from: public abstract java.nio.IntBuffer asIntBuffer() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject asIntBuffer() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_asIntBuffer, jni.JniCallType.objectType, []).object); - - static final _id_getLong = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getLong', r'()J'); - - /// from: public abstract long getLong() - int getLong() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_getLong, jni.JniCallType.longType, []).long; - - static final _id_putLong = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'putLong', r'(J)Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer putLong(long j) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer putLong( - int j, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_putLong, jni.JniCallType.objectType, [j]).object); - - static final _id_getLong1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getLong', r'(I)J'); - - /// from: public abstract long getLong(int i) - int getLong1( - int i, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_getLong1, - jni.JniCallType.longType, [jni.JValueInt(i)]).long; - - static final _id_putLong1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'putLong', r'(IJ)Ljava/nio/ByteBuffer;'); - - /// from: public abstract java.nio.ByteBuffer putLong(int i, long j) - /// The returned object must be released after use, by calling the [release] method. - ByteBuffer putLong1( - int i, - int j, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( reference, - _id_putLong1, - jni.JniCallType.objectType, - [jni.JValueInt(i), j]).object); + _id_toExternalForm, + jni.JniCallType.objectType, []).object); - static final _id_asLongBuffer = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'asLongBuffer', r'()Ljava/nio/LongBuffer;'); + static final _id_toURI = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'toURI', r'()Ljava/net/URI;'); - /// from: public abstract java.nio.LongBuffer asLongBuffer() + /// from: public java.net.URI toURI() /// The returned object must be released after use, by calling the [release] method. - jni.JObject asLongBuffer() => + jni.JObject toURI() => const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_asLongBuffer, jni.JniCallType.objectType, []).object); - - static final _id_getFloat = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getFloat', r'()F'); - - /// from: public abstract float getFloat() - double getFloat() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_getFloat, jni.JniCallType.floatType, []).float; + reference, _id_toURI, jni.JniCallType.objectType, []).object); - static final _id_putFloat = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'putFloat', r'(F)Ljava/nio/ByteBuffer;'); + static final _id_openConnection = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'openConnection', r'()Ljava/net/URLConnection;'); - /// from: public abstract java.nio.ByteBuffer putFloat(float f) + /// from: public java.net.URLConnection openConnection() /// The returned object must be released after use, by calling the [release] method. - ByteBuffer putFloat( - double f, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + jni.JObject openConnection() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( reference, - _id_putFloat, - jni.JniCallType.objectType, - [jni.JValueFloat(f)]).object); - - static final _id_getFloat1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getFloat', r'(I)F'); - - /// from: public abstract float getFloat(int i) - double getFloat1( - int i, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_getFloat1, - jni.JniCallType.floatType, [jni.JValueInt(i)]).float; + _id_openConnection, + jni.JniCallType.objectType, []).object); - static final _id_putFloat1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'putFloat', r'(IF)Ljava/nio/ByteBuffer;'); + static final _id_openConnection1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'openConnection', + r'(Ljava/net/Proxy;)Ljava/net/URLConnection;'); - /// from: public abstract java.nio.ByteBuffer putFloat(int i, float f) + /// from: public java.net.URLConnection openConnection(java.net.Proxy proxy) /// The returned object must be released after use, by calling the [release] method. - ByteBuffer putFloat1( - int i, - double f, + jni.JObject openConnection1( + jni.JObject proxy, ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( reference, - _id_putFloat1, + _id_openConnection1, jni.JniCallType.objectType, - [jni.JValueInt(i), jni.JValueFloat(f)]).object); + [proxy.reference]).object); - static final _id_asFloatBuffer = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'asFloatBuffer', r'()Ljava/nio/FloatBuffer;'); + static final _id_openStream = jni.Jni.accessors.getMethodIDOf( + _class.reference, r'openStream', r'()Ljava/io/InputStream;'); - /// from: public abstract java.nio.FloatBuffer asFloatBuffer() + /// from: public java.io.InputStream openStream() /// The returned object must be released after use, by calling the [release] method. - jni.JObject asFloatBuffer() => + jni.JObject openStream() => const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_asFloatBuffer, jni.JniCallType.objectType, []).object); - - static final _id_getDouble = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getDouble', r'()D'); - - /// from: public abstract double getDouble() - double getDouble() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_getDouble, jni.JniCallType.doubleType, []).doubleFloat; + reference, _id_openStream, jni.JniCallType.objectType, []).object); - static final _id_putDouble = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'putDouble', r'(D)Ljava/nio/ByteBuffer;'); + static final _id_getContent = jni.Jni.accessors + .getMethodIDOf(_class.reference, r'getContent', r'()Ljava/lang/Object;'); - /// from: public abstract java.nio.ByteBuffer putDouble(double d) + /// from: public java.lang.Object getContent() /// The returned object must be released after use, by calling the [release] method. - ByteBuffer putDouble( - double d, - ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_putDouble, jni.JniCallType.objectType, [d]).object); - - static final _id_getDouble1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getDouble', r'(I)D'); - - /// from: public abstract double getDouble(int i) - double getDouble1( - int i, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_getDouble1, - jni.JniCallType.doubleType, [jni.JValueInt(i)]).doubleFloat; + jni.JObject getContent() => + const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( + reference, _id_getContent, jni.JniCallType.objectType, []).object); - static final _id_putDouble1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'putDouble', r'(ID)Ljava/nio/ByteBuffer;'); + static final _id_getContent1 = jni.Jni.accessors.getMethodIDOf( + _class.reference, + r'getContent', + r'([Ljava/lang/Class;)Ljava/lang/Object;'); - /// from: public abstract java.nio.ByteBuffer putDouble(int i, double d) + /// from: public java.lang.Object getContent(java.lang.Class[] classs) /// The returned object must be released after use, by calling the [release] method. - ByteBuffer putDouble1( - int i, - double d, + jni.JObject getContent1( + jni.JArray classs, ) => - const $ByteBufferType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_putDouble1, - jni.JniCallType.objectType, - [jni.JValueInt(i), d]).object); - - static final _id_asDoubleBuffer = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'asDoubleBuffer', r'()Ljava/nio/DoubleBuffer;'); - - /// from: public abstract java.nio.DoubleBuffer asDoubleBuffer() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject asDoubleBuffer() => const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( reference, - _id_asDoubleBuffer, - jni.JniCallType.objectType, []).object); - - static final _id_array = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'array', r'()Ljava/lang/Object;'); - - /// from: public java.lang.Object array() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject array() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_array, jni.JniCallType.objectType, []).object); + _id_getContent1, + jni.JniCallType.objectType, + [classs.reference]).object); - static final _id_compareTo1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'compareTo', r'(Ljava/lang/Object;)I'); + static final _id_setURLStreamHandlerFactory = jni.Jni.accessors + .getStaticMethodIDOf(_class.reference, r'setURLStreamHandlerFactory', + r'(Ljava/net/URLStreamHandlerFactory;)V'); - /// from: public int compareTo(java.lang.Object object) - int compareTo1( - jni.JObject object, + /// from: static public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory uRLStreamHandlerFactory) + static void setURLStreamHandlerFactory( + jni.JObject uRLStreamHandlerFactory, ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_compareTo1, - jni.JniCallType.intType, [object.reference]).integer; + jni.Jni.accessors.callStaticMethodWithArgs( + _class.reference, + _id_setURLStreamHandlerFactory, + jni.JniCallType.voidType, + [uRLStreamHandlerFactory.reference]).check(); } -class $ByteBufferType extends jni.JObjType { - const $ByteBufferType(); +final class $URLType extends jni.JObjType { + const $URLType(); @override - String get signature => r'Ljava/nio/ByteBuffer;'; + String get signature => r'Ljava/net/URL;'; @override - ByteBuffer fromRef(jni.JObjectPtr ref) => ByteBuffer.fromRef(ref); + URL fromRef(jni.JObjectPtr ref) => URL.fromRef(ref); @override - jni.JObjType get superType => const $BufferType(); + jni.JObjType get superType => const jni.JObjectType(); @override - final superCount = 2; + final superCount = 1; @override - int get hashCode => ($ByteBufferType).hashCode; + int get hashCode => ($URLType).hashCode; @override bool operator ==(Object other) => - other.runtimeType == $ByteBufferType && other is $ByteBufferType; + other.runtimeType == $URLType && other is $URLType; } /// from: java.util.concurrent.Executors @@ -2169,7 +1203,7 @@ class Executors extends jni.JObject { [callable.reference]).object); } -class $ExecutorsType extends jni.JObjType { +final class $ExecutorsType extends jni.JObjType { const $ExecutorsType(); @override @@ -2226,7 +1260,7 @@ class CronetEngine_Builder_LibraryLoader extends jni.JObject { jni.JniCallType.voidType, [string.reference]).check(); } -class $CronetEngine_Builder_LibraryLoaderType +final class $CronetEngine_Builder_LibraryLoaderType extends jni.JObjType { const $CronetEngine_Builder_LibraryLoaderType(); @@ -2497,120 +1531,6 @@ class CronetEngine_Builder extends jni.JObject { jni.JniCallType.objectType, [z ? 1 : 0]).object); - static final _id_setThreadPriority = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setThreadPriority', - r'(I)Lorg/chromium/net/CronetEngine$Builder;'); - - /// from: public org.chromium.net.CronetEngine$Builder setThreadPriority(int i) - /// The returned object must be released after use, by calling the [release] method. - CronetEngine_Builder setThreadPriority( - int i, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setThreadPriority, - jni.JniCallType.objectType, [jni.JValueInt(i)]).object); - - static final _id_enableNetworkQualityEstimator = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'enableNetworkQualityEstimator', - r'(Z)Lorg/chromium/net/CronetEngine$Builder;'); - - /// from: public org.chromium.net.CronetEngine$Builder enableNetworkQualityEstimator(boolean z) - /// The returned object must be released after use, by calling the [release] method. - CronetEngine_Builder enableNetworkQualityEstimator( - bool z, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_enableNetworkQualityEstimator, - jni.JniCallType.objectType, [z ? 1 : 0]).object); - - static final _id_setQuicOptions = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setQuicOptions', - r'(Lorg/chromium/net/QuicOptions;)Lorg/chromium/net/CronetEngine$Builder;'); - - /// from: public org.chromium.net.CronetEngine$Builder setQuicOptions(org.chromium.net.QuicOptions quicOptions) - /// The returned object must be released after use, by calling the [release] method. - CronetEngine_Builder setQuicOptions( - jni.JObject quicOptions, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setQuicOptions, - jni.JniCallType.objectType, [quicOptions.reference]).object); - - static final _id_setQuicOptions1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setQuicOptions', - r'(Lorg/chromium/net/QuicOptions$Builder;)Lorg/chromium/net/CronetEngine$Builder;'); - - /// from: public org.chromium.net.CronetEngine$Builder setQuicOptions(org.chromium.net.QuicOptions$Builder builder) - /// The returned object must be released after use, by calling the [release] method. - CronetEngine_Builder setQuicOptions1( - jni.JObject builder, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setQuicOptions1, - jni.JniCallType.objectType, [builder.reference]).object); - - static final _id_setDnsOptions = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setDnsOptions', - r'(Lorg/chromium/net/DnsOptions;)Lorg/chromium/net/CronetEngine$Builder;'); - - /// from: public org.chromium.net.CronetEngine$Builder setDnsOptions(org.chromium.net.DnsOptions dnsOptions) - /// The returned object must be released after use, by calling the [release] method. - CronetEngine_Builder setDnsOptions( - jni.JObject dnsOptions, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setDnsOptions, - jni.JniCallType.objectType, [dnsOptions.reference]).object); - - static final _id_setDnsOptions1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setDnsOptions', - r'(Lorg/chromium/net/DnsOptions$Builder;)Lorg/chromium/net/CronetEngine$Builder;'); - - /// from: public org.chromium.net.CronetEngine$Builder setDnsOptions(org.chromium.net.DnsOptions$Builder builder) - /// The returned object must be released after use, by calling the [release] method. - CronetEngine_Builder setDnsOptions1( - jni.JObject builder, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setDnsOptions1, - jni.JniCallType.objectType, [builder.reference]).object); - - static final _id_setConnectionMigrationOptions = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setConnectionMigrationOptions', - r'(Lorg/chromium/net/ConnectionMigrationOptions;)Lorg/chromium/net/CronetEngine$Builder;'); - - /// from: public org.chromium.net.CronetEngine$Builder setConnectionMigrationOptions(org.chromium.net.ConnectionMigrationOptions connectionMigrationOptions) - /// The returned object must be released after use, by calling the [release] method. - CronetEngine_Builder setConnectionMigrationOptions( - jni.JObject connectionMigrationOptions, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs( - reference, - _id_setConnectionMigrationOptions, - jni.JniCallType.objectType, - [connectionMigrationOptions.reference]).object); - - static final _id_setConnectionMigrationOptions1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setConnectionMigrationOptions', - r'(Lorg/chromium/net/ConnectionMigrationOptions$Builder;)Lorg/chromium/net/CronetEngine$Builder;'); - - /// from: public org.chromium.net.CronetEngine$Builder setConnectionMigrationOptions(org.chromium.net.ConnectionMigrationOptions$Builder builder) - /// The returned object must be released after use, by calling the [release] method. - CronetEngine_Builder setConnectionMigrationOptions1( - jni.JObject builder, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setConnectionMigrationOptions1, - jni.JniCallType.objectType, [builder.reference]).object); - static final _id_build = jni.Jni.accessors.getMethodIDOf( _class.reference, r'build', r'()Lorg/chromium/net/CronetEngine;'); @@ -2621,7 +1541,8 @@ class CronetEngine_Builder extends jni.JObject { reference, _id_build, jni.JniCallType.objectType, []).object); } -class $CronetEngine_BuilderType extends jni.JObjType { +final class $CronetEngine_BuilderType + extends jni.JObjType { const $CronetEngine_BuilderType(); @override @@ -2659,31 +1580,6 @@ class CronetEngine extends jni.JObject { /// The type which includes information such as the signature of this class. static const type = $CronetEngineType(); - - /// from: static public final int ACTIVE_REQUEST_COUNT_UNKNOWN - static const ACTIVE_REQUEST_COUNT_UNKNOWN = -1; - - /// from: static public final int CONNECTION_METRIC_UNKNOWN - static const CONNECTION_METRIC_UNKNOWN = -1; - - /// from: static public final int EFFECTIVE_CONNECTION_TYPE_UNKNOWN - static const EFFECTIVE_CONNECTION_TYPE_UNKNOWN = 0; - - /// from: static public final int EFFECTIVE_CONNECTION_TYPE_OFFLINE - static const EFFECTIVE_CONNECTION_TYPE_OFFLINE = 1; - - /// from: static public final int EFFECTIVE_CONNECTION_TYPE_SLOW_2G - static const EFFECTIVE_CONNECTION_TYPE_SLOW_2G = 2; - - /// from: static public final int EFFECTIVE_CONNECTION_TYPE_2G - static const EFFECTIVE_CONNECTION_TYPE_2G = 3; - - /// from: static public final int EFFECTIVE_CONNECTION_TYPE_3G - static const EFFECTIVE_CONNECTION_TYPE_3G = 4; - - /// from: static public final int EFFECTIVE_CONNECTION_TYPE_4G - static const EFFECTIVE_CONNECTION_TYPE_4G = 5; - static final _id_new0 = jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); @@ -2785,168 +1681,9 @@ class CronetEngine extends jni.JObject { callback.reference, executor.reference ]).object); - - static final _id_getActiveRequestCount = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getActiveRequestCount', r'()I'); - - /// from: public int getActiveRequestCount() - int getActiveRequestCount() => jni.Jni.accessors.callMethodWithArgs(reference, - _id_getActiveRequestCount, jni.JniCallType.intType, []).integer; - - static final _id_addRequestFinishedListener = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'addRequestFinishedListener', - r'(Lorg/chromium/net/RequestFinishedInfo$Listener;)V'); - - /// from: public void addRequestFinishedListener(org.chromium.net.RequestFinishedInfo$Listener listener) - void addRequestFinishedListener( - jni.JObject listener, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_addRequestFinishedListener, - jni.JniCallType.voidType, - [listener.reference]).check(); - - static final _id_removeRequestFinishedListener = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'removeRequestFinishedListener', - r'(Lorg/chromium/net/RequestFinishedInfo$Listener;)V'); - - /// from: public void removeRequestFinishedListener(org.chromium.net.RequestFinishedInfo$Listener listener) - void removeRequestFinishedListener( - jni.JObject listener, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_removeRequestFinishedListener, - jni.JniCallType.voidType, - [listener.reference]).check(); - - static final _id_getHttpRttMs = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getHttpRttMs', r'()I'); - - /// from: public int getHttpRttMs() - int getHttpRttMs() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_getHttpRttMs, jni.JniCallType.intType, []).integer; - - static final _id_getTransportRttMs = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getTransportRttMs', r'()I'); - - /// from: public int getTransportRttMs() - int getTransportRttMs() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_getTransportRttMs, jni.JniCallType.intType, []).integer; - - static final _id_getDownstreamThroughputKbps = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getDownstreamThroughputKbps', r'()I'); - - /// from: public int getDownstreamThroughputKbps() - int getDownstreamThroughputKbps() => jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getDownstreamThroughputKbps, - jni.JniCallType.intType, []).integer; - - static final _id_startNetLogToDisk = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'startNetLogToDisk', r'(Ljava/lang/String;ZI)V'); - - /// from: public void startNetLogToDisk(java.lang.String string, boolean z, int i) - void startNetLogToDisk( - jni.JString string, - bool z, - int i, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_startNetLogToDisk, - jni.JniCallType.voidType, - [string.reference, z ? 1 : 0, jni.JValueInt(i)]).check(); - - static final _id_getEffectiveConnectionType = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getEffectiveConnectionType', r'()I'); - - /// from: public int getEffectiveConnectionType() - int getEffectiveConnectionType() => jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getEffectiveConnectionType, - jni.JniCallType.intType, []).integer; - - static final _id_configureNetworkQualityEstimatorForTesting = - jni.Jni.accessors.getMethodIDOf(_class.reference, - r'configureNetworkQualityEstimatorForTesting', r'(ZZZ)V'); - - /// from: public void configureNetworkQualityEstimatorForTesting(boolean z, boolean z1, boolean z2) - void configureNetworkQualityEstimatorForTesting( - bool z, - bool z1, - bool z2, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_configureNetworkQualityEstimatorForTesting, - jni.JniCallType.voidType, - [z ? 1 : 0, z1 ? 1 : 0, z2 ? 1 : 0]).check(); - - static final _id_addRttListener = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'addRttListener', - r'(Lorg/chromium/net/NetworkQualityRttListener;)V'); - - /// from: public void addRttListener(org.chromium.net.NetworkQualityRttListener networkQualityRttListener) - void addRttListener( - jni.JObject networkQualityRttListener, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_addRttListener, - jni.JniCallType.voidType, - [networkQualityRttListener.reference]).check(); - - static final _id_removeRttListener = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'removeRttListener', - r'(Lorg/chromium/net/NetworkQualityRttListener;)V'); - - /// from: public void removeRttListener(org.chromium.net.NetworkQualityRttListener networkQualityRttListener) - void removeRttListener( - jni.JObject networkQualityRttListener, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_removeRttListener, - jni.JniCallType.voidType, - [networkQualityRttListener.reference]).check(); - - static final _id_addThroughputListener = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'addThroughputListener', - r'(Lorg/chromium/net/NetworkQualityThroughputListener;)V'); - - /// from: public void addThroughputListener(org.chromium.net.NetworkQualityThroughputListener networkQualityThroughputListener) - void addThroughputListener( - jni.JObject networkQualityThroughputListener, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_addThroughputListener, - jni.JniCallType.voidType, - [networkQualityThroughputListener.reference]).check(); - - static final _id_removeThroughputListener = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'removeThroughputListener', - r'(Lorg/chromium/net/NetworkQualityThroughputListener;)V'); - - /// from: public void removeThroughputListener(org.chromium.net.NetworkQualityThroughputListener networkQualityThroughputListener) - void removeThroughputListener( - jni.JObject networkQualityThroughputListener, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_removeThroughputListener, - jni.JniCallType.voidType, - [networkQualityThroughputListener.reference]).check(); } -class $CronetEngineType extends jni.JObjType { +final class $CronetEngineType extends jni.JObjType { const $CronetEngineType(); @override @@ -2997,7 +1734,7 @@ class CronetException extends jni.JObject { [string.reference, throwable.reference]).object); } -class $CronetExceptionType extends jni.JObjType { +final class $CronetExceptionType extends jni.JObjType { const $CronetExceptionType(); @override @@ -3074,7 +1811,7 @@ class UploadDataProviders extends jni.JObject { /// from: static public org.chromium.net.UploadDataProvider create(java.nio.ByteBuffer byteBuffer) /// The returned object must be released after use, by calling the [release] method. static jni.JObject create2( - ByteBuffer byteBuffer, + jni.JByteBuffer byteBuffer, ) => const jni.JObjectType().fromRef(jni.Jni.accessors .callStaticMethodWithArgs(_class.reference, _id_create2, @@ -3114,7 +1851,7 @@ class UploadDataProviders extends jni.JObject { jni.JniCallType.objectType, [bs.reference]).object); } -class $UploadDataProvidersType extends jni.JObjType { +final class $UploadDataProvidersType extends jni.JObjType { const $UploadDataProvidersType(); @override @@ -3263,62 +2000,6 @@ class UrlRequest_Builder extends jni.JObject { .fromRef(jni.Jni.accessors.callMethodWithArgs(reference, _id_allowDirectExecutor, jni.JniCallType.objectType, []).object); - static final _id_addRequestAnnotation = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'addRequestAnnotation', - r'(Ljava/lang/Object;)Lorg/chromium/net/UrlRequest$Builder;'); - - /// from: public org.chromium.net.UrlRequest$Builder addRequestAnnotation(java.lang.Object object) - /// The returned object must be released after use, by calling the [release] method. - UrlRequest_Builder addRequestAnnotation( - jni.JObject object, - ) => - const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_addRequestAnnotation, - jni.JniCallType.objectType, [object.reference]).object); - - static final _id_setTrafficStatsTag = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setTrafficStatsTag', - r'(I)Lorg/chromium/net/UrlRequest$Builder;'); - - /// from: public org.chromium.net.UrlRequest$Builder setTrafficStatsTag(int i) - /// The returned object must be released after use, by calling the [release] method. - UrlRequest_Builder setTrafficStatsTag( - int i, - ) => - const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setTrafficStatsTag, - jni.JniCallType.objectType, [jni.JValueInt(i)]).object); - - static final _id_setTrafficStatsUid = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setTrafficStatsUid', - r'(I)Lorg/chromium/net/UrlRequest$Builder;'); - - /// from: public org.chromium.net.UrlRequest$Builder setTrafficStatsUid(int i) - /// The returned object must be released after use, by calling the [release] method. - UrlRequest_Builder setTrafficStatsUid( - int i, - ) => - const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setTrafficStatsUid, - jni.JniCallType.objectType, [jni.JValueInt(i)]).object); - - static final _id_setRequestFinishedListener = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setRequestFinishedListener', - r'(Lorg/chromium/net/RequestFinishedInfo$Listener;)Lorg/chromium/net/UrlRequest$Builder;'); - - /// from: public org.chromium.net.UrlRequest$Builder setRequestFinishedListener(org.chromium.net.RequestFinishedInfo$Listener listener) - /// The returned object must be released after use, by calling the [release] method. - UrlRequest_Builder setRequestFinishedListener( - jni.JObject listener, - ) => - const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setRequestFinishedListener, - jni.JniCallType.objectType, [listener.reference]).object); - static final _id_build = jni.Jni.accessors.getMethodIDOf( _class.reference, r'build', r'()Lorg/chromium/net/UrlRequest;'); @@ -3329,7 +2010,7 @@ class UrlRequest_Builder extends jni.JObject { reference, _id_build, jni.JniCallType.objectType, []).object); } -class $UrlRequest_BuilderType extends jni.JObjType { +final class $UrlRequest_BuilderType extends jni.JObjType { const $UrlRequest_BuilderType(); @override @@ -3419,7 +2100,7 @@ class UrlRequest_Callback extends jni.JObject { void onReadCompleted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ByteBuffer byteBuffer, + jni.JByteBuffer byteBuffer, ) => jni.Jni.accessors.callMethodWithArgs( reference, _id_onReadCompleted, jni.JniCallType.voidType, [ @@ -3479,7 +2160,7 @@ class UrlRequest_Callback extends jni.JObject { [urlRequest.reference, urlResponseInfo.reference]).check(); } -class $UrlRequest_CallbackType extends jni.JObjType { +final class $UrlRequest_CallbackType extends jni.JObjType { const $UrlRequest_CallbackType(); @override @@ -3568,7 +2249,7 @@ class UrlRequest_Status extends jni.JObject { static const READING_RESPONSE = 14; } -class $UrlRequest_StatusType extends jni.JObjType { +final class $UrlRequest_StatusType extends jni.JObjType { const $UrlRequest_StatusType(); @override @@ -3627,7 +2308,7 @@ class UrlRequest_StatusListener extends jni.JObject { jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); } -class $UrlRequest_StatusListenerType +final class $UrlRequest_StatusListenerType extends jni.JObjType { const $UrlRequest_StatusListenerType(); @@ -3693,7 +2374,7 @@ class UrlRequest extends jni.JObject { /// from: public abstract void read(java.nio.ByteBuffer byteBuffer) void read( - ByteBuffer byteBuffer, + jni.JByteBuffer byteBuffer, ) => jni.Jni.accessors.callMethodWithArgs(reference, _id_read, jni.JniCallType.voidType, [byteBuffer.reference]).check(); @@ -3723,7 +2404,7 @@ class UrlRequest extends jni.JObject { jni.JniCallType.voidType, [statusListener.reference]).check(); } -class $UrlRequestType extends jni.JObjType { +final class $UrlRequestType extends jni.JObjType { const $UrlRequestType(); @override @@ -3789,7 +2470,7 @@ class UrlResponseInfo_HeaderBlock extends jni.JObject { reference, _id_getAsMap, jni.JniCallType.objectType, []).object); } -class $UrlResponseInfo_HeaderBlockType +final class $UrlResponseInfo_HeaderBlockType extends jni.JObjType { const $UrlResponseInfo_HeaderBlockType(); @@ -3929,7 +2610,7 @@ class UrlResponseInfo extends jni.JObject { reference, _id_getReceivedByteCount, jni.JniCallType.longType, []).long; } -class $UrlResponseInfoType extends jni.JObjType { +final class $UrlResponseInfoType extends jni.JObjType { const $UrlResponseInfoType(); @override diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 129547c1aa..80d13015d6 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.3.0-jni +version: 0.4.0-jni repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: @@ -12,11 +12,11 @@ dependencies: flutter: sdk: flutter http: '>=0.13.4 <2.0.0' - jni: ^0.6.1 + jni: ^0.7.0 dev_dependencies: dart_flutter_team_lints: ^1.0.0 - jnigen: ^0.6.0 + jnigen: ^0.7.0 xml: ^6.1.0 yaml_edit: ^2.0.3 From aa67b3951a5e097eda033b091066c87b29988e35 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 15 Sep 2023 14:44:29 -0700 Subject: [PATCH 267/448] Remove invalid status line tests and replace them with valid status line tests (#1018) --- .../lib/src/response_status_line_server.dart | 1 + .../lib/src/response_status_line_tests.dart | 32 +++++++++++-------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/pkgs/http_client_conformance_tests/lib/src/response_status_line_server.dart b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server.dart index 66d44889a1..f27aca8896 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_status_line_server.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server.dart @@ -29,6 +29,7 @@ void hybridMain(StreamChannel channel) async { socket.writeAll( [ statusLine, + 'Access-Control-Allow-Origin: *', 'Content-Length: 0', '\r\n', // Add \r\n at the end of this header section. ], diff --git a/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart index 922236ccc1..b618fa099c 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart @@ -10,7 +10,10 @@ import 'package:test/test.dart'; import 'response_status_line_server_vm.dart' if (dart.library.html) 'response_status_line_server_web.dart'; -/// Tests that the [Client] correctly processes the response status line. +/// Tests that the [Client] correctly processes the response status line (e.g. +/// 'HTTP/1.1 200 OK\r\n'). +/// +/// Clients behavior varies considerably if the status line is not valid. void testResponseStatusLine(Client client) async { group('response status line', () { late String host; @@ -23,17 +26,20 @@ void testResponseStatusLine(Client client) async { host = 'localhost:${await httpServerQueue.next}'; }); - test( - 'without status code', - () async { - httpServerChannel.sink.add('HTTP/1.1 OK'); - await expectLater( - client.get(Uri.http(host, '')), - throwsA(isA()), - ); - }, - skip: - 'Enable after https://github.com/dart-lang/http/issues/1013 is fixed', - ); + test('complete', () async { + httpServerChannel.sink.add('HTTP/1.1 201 Created'); + final response = await client.get(Uri.http(host, '')); + expect(response.statusCode, 201); + expect(response.reasonPhrase, 'Created'); + }); + + test('no reason phrase', () async { + httpServerChannel.sink.add('HTTP/1.1 201'); + final response = await client.get(Uri.http(host, '')); + expect(response.statusCode, 201); + // An empty Reason-Phrase is allowed according to RFC-2616. Any of these + // interpretations seem reasonable. + expect(response.reasonPhrase, anyOf(isNull, '', 'Created')); + }); }); } From 903b8cf15c0ff3a52eaece2d72c19663fcb58e8e Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 19 Sep 2023 10:24:29 -0700 Subject: [PATCH 268/448] Add the ability to control the URL cache. (#1020) --- pkgs/cupertino_http/CHANGELOG.md | 2 + .../example/integration_test/main.dart | 2 + .../integration_test/url_cache_test.dart | 72 + pkgs/cupertino_http/ffigen.yaml | 1 + .../cupertino_http/lib/src/cupertino_api.dart | 69 +- .../lib/src/native_cupertino_bindings.dart | 10150 +++++++++------- pkgs/cupertino_http/lib/src/utils.dart | 3 + pkgs/cupertino_http/pubspec.yaml | 6 +- 8 files changed, 5585 insertions(+), 4720 deletions(-) create mode 100644 pkgs/cupertino_http/example/integration_test/url_cache_test.dart diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 8f5ed3d145..3a69c498dc 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -9,6 +9,8 @@ * Disable additional analyses for generated Objective-C bindings to prevent errors from `dart analyze`. * Throw `ClientException` when the `'Content-Length'` header is invalid. +* Add support for configurable caching through + `URLSessionConfiguration.cache`. ## 1.0.1 diff --git a/pkgs/cupertino_http/example/integration_test/main.dart b/pkgs/cupertino_http/example/integration_test/main.dart index 05ae1212f2..12128b5b9a 100644 --- a/pkgs/cupertino_http/example/integration_test/main.dart +++ b/pkgs/cupertino_http/example/integration_test/main.dart @@ -11,6 +11,7 @@ import 'error_test.dart' as error_test; import 'http_url_response_test.dart' as http_url_response_test; import 'mutable_data_test.dart' as mutable_data_test; import 'mutable_url_request_test.dart' as mutable_url_request_test; +import 'url_cache_test.dart' as url_cache_test; import 'url_request_test.dart' as url_request_test; import 'url_response_test.dart' as url_response_test; import 'url_session_configuration_test.dart' as url_session_configuration_test; @@ -34,6 +35,7 @@ void main() { http_url_response_test.main(); mutable_data_test.main(); mutable_url_request_test.main(); + url_cache_test.main(); url_request_test.main(); url_response_test.main(); url_session_configuration_test.main(); diff --git a/pkgs/cupertino_http/example/integration_test/url_cache_test.dart b/pkgs/cupertino_http/example/integration_test/url_cache_test.dart new file mode 100644 index 0000000000..4b55b1a3c9 --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/url_cache_test.dart @@ -0,0 +1,72 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:cupertino_http/cupertino_http.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:test/test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('dataTaskWithCompletionHandler', () { + late HttpServer server; + var uncachedRequestCount = 0; + + setUp(() async { + uncachedRequestCount = 0; + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + if (request.headers['if-none-match']?.first == '1234') { + request.response.statusCode = 304; + await request.response.close(); + return; + } + ++uncachedRequestCount; + request.response.headers.set('Content-Type', 'text/plain'); + request.response.headers.set('ETag', '1234'); + request.response.write('Hello World'); + await request.response.close(); + }); + }); + tearDown(() { + server.close(); + }); + + Future doRequest(URLSession session) { + final request = + URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}')); + final c = Completer(); + session.dataTaskWithCompletionHandler(request, (d, r, e) { + c.complete(); + }).resume(); + return c.future; + } + + test('no cache', () async { + final config = URLSessionConfiguration.defaultSessionConfiguration() + ..cache = null; + final session = URLSession.sessionWithConfiguration(config); + + await doRequest(session); + await doRequest(session); + + expect(uncachedRequestCount, 2); + }); + + test('with cache', () async { + final config = URLSessionConfiguration.defaultSessionConfiguration() + ..cache = URLCache.withCapacity(memoryCapacity: 100000); + final session = URLSession.sessionWithConfiguration(config); + + await doRequest(session); + await doRequest(session); + + expect(uncachedRequestCount, 1); + }); + }); +} diff --git a/pkgs/cupertino_http/ffigen.yaml b/pkgs/cupertino_http/ffigen.yaml index 43df82e58d..3e535933a9 100644 --- a/pkgs/cupertino_http/ffigen.yaml +++ b/pkgs/cupertino_http/ffigen.yaml @@ -11,6 +11,7 @@ headers: - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSData.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLCache.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLRequest.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h' diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 1f0a10369d..01c4853b1c 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -233,6 +233,35 @@ class Error extends _ObjectHolder implements Exception { ']'; } +/// A cache for [URLRequest]s. Used by [URLSessionConfiguration.cache]. +/// +/// See [NSURLCache](https://developer.apple.com/documentation/foundation/nsurlcache) +class URLCache extends _ObjectHolder { + URLCache._(super.c); + + /// The default URLCache. + /// + /// See [NSURLCache.sharedURLCache](https://developer.apple.com/documentation/foundation/nsurlcache/1413377-sharedurlcache) + static URLCache? get sharedURLCache { + final sharedCache = ncb.NSURLCache.getSharedURLCache(linkedLibs); + return sharedCache == null ? null : URLCache._(sharedCache); + } + + /// Create a new [URLCache] with the given memory and disk cache sizes. + /// + /// [memoryCapacity] and [diskCapacity] are specified in bytes. + /// + /// [directory] is the file system location where the disk cache will be + /// stored. If `null` then the default directory will be used. + /// + /// See [NSURLCache initWithMemoryCapacity:diskCapacity:directoryURL:](https://developer.apple.com/documentation/foundation/nsurlcache/3240612-initwithmemorycapacity) + factory URLCache.withCapacity( + {int memoryCapacity = 0, int diskCapacity = 0, Uri? directory}) => + URLCache._(ncb.NSURLCache.alloc(linkedLibs) + .initWithMemoryCapacity_diskCapacity_directoryURL_(memoryCapacity, + diskCapacity, directory == null ? null : uriToNSURL(directory))); +} + /// Controls the behavior of a URLSession. /// /// See [NSURLSessionConfiguration](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration) @@ -300,6 +329,15 @@ class URLSessionConfiguration set allowsExpensiveNetworkAccess(bool value) => _nsObject.allowsExpensiveNetworkAccess = value; + /// The [URLCache] used to cache the results of [URLSessionTask]s. + /// + /// A value of `nil` indicates that no cache will be used. + /// + /// See [NSURLSessionConfiguration.URLCache](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1410148-urlcache) + URLCache? get cache => + _nsObject.URLCache == null ? null : URLCache._(_nsObject.URLCache!); + set cache(URLCache? cache) => _nsObject.URLCache = cache?._nsObject; + /// Whether background tasks can be delayed by the system. /// /// See [NSURLSessionConfiguration.discretionary](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411552-discretionary) @@ -314,10 +352,10 @@ class URLSessionConfiguration set httpCookieAcceptPolicy(HTTPCookieAcceptPolicy value) => _nsObject.HTTPCookieAcceptPolicy = value.index; - // The maximum number of connections that a URLSession can have open to the - // same host. + /// The maximum number of connections that a URLSession can have open to the + /// same host. // - // See [NSURLSessionConfiguration.HTTPMaximumConnectionsPerHost](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1407597-httpmaximumconnectionsperhost). + /// See [NSURLSessionConfiguration.HTTPMaximumConnectionsPerHost](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1407597-httpmaximumconnectionsperhost). int get httpMaximumConnectionsPerHost => _nsObject.HTTPMaximumConnectionsPerHost; set httpMaximumConnectionsPerHost(int value) => @@ -354,9 +392,9 @@ class URLSessionConfiguration set networkServiceType(URLRequestNetworkService value) => _nsObject.networkServiceType = value.index; - // Controls how to deal with response caching. - // - // See [NSURLSessionConfiguration.requestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411655-requestcachepolicy) + /// Controls how to deal with response caching. + /// + /// See [NSURLSessionConfiguration.requestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411655-requestcachepolicy) URLRequestCachePolicy get requestCachePolicy => URLRequestCachePolicy.values[_nsObject.requestCachePolicy]; set requestCachePolicy(URLRequestCachePolicy value) => @@ -422,9 +460,9 @@ class URLSessionConfiguration class Data extends _ObjectHolder { Data._(super.c); - // A new [Data] from an existing one. - // - // See [NSData dataWithData:](https://developer.apple.com/documentation/foundation/nsdata/1547230-datawithdata) + /// A new [Data] from an existing one. + /// + /// See [NSData dataWithData:](https://developer.apple.com/documentation/foundation/nsdata/1547230-datawithdata) factory Data.fromData(Data d) => Data._(ncb.NSData.dataWithData_(linkedLibs, d._nsObject)); @@ -916,11 +954,8 @@ class URLRequest extends _ObjectHolder { /// Creates a request for a URL. /// /// See [NSURLRequest.requestWithURL:](https://developer.apple.com/documentation/foundation/nsurlrequest/1528603-requestwithurl) - factory URLRequest.fromUrl(Uri uri) { - final url = ncb.NSURL - .URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs)); - return URLRequest._(ncb.NSURLRequest.requestWithURL_(linkedLibs, url)); - } + factory URLRequest.fromUrl(Uri uri) => URLRequest._( + ncb.NSURLRequest.requestWithURL_(linkedLibs, uriToNSURL(uri))); /// Returns all of the HTTP headers for the request. /// @@ -934,9 +969,9 @@ class URLRequest extends _ObjectHolder { } } - // Controls how to deal with caching for the request. - // - // See [NSURLSession.cachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequest/1407944-cachepolicy) + /// Controls how to deal with caching for the request. + /// + /// See [NSURLSession.cachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequest/1407944-cachepolicy) URLRequestCachePolicy get cachePolicy => URLRequestCachePolicy.values[_nsObject.cachePolicy]; diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index 1f05f8af71..1d2383ef51 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -305,8 +305,9 @@ class NativeCupertinoHttp { } late final _callocPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Size, ffi.Size)>>('calloc'); + ffi + .NativeFunction Function(ffi.Size, ffi.Size)>>( + 'calloc'); late final _calloc = _callocPtr.asFunction Function(int, int)>(); @@ -366,8 +367,9 @@ class NativeCupertinoHttp { } late final _aligned_allocPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Size, ffi.Size)>>('aligned_alloc'); + ffi + .NativeFunction Function(ffi.Size, ffi.Size)>>( + 'aligned_alloc'); late final _aligned_alloc = _aligned_allocPtr.asFunction Function(int, int)>(); @@ -624,8 +626,9 @@ class NativeCupertinoHttp { } late final _mblenPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('mblen'); + ffi + .NativeFunction, ffi.Size)>>( + 'mblen'); late final _mblen = _mblenPtr.asFunction, int)>(); @@ -883,8 +886,9 @@ class NativeCupertinoHttp { } late final _wctombPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.WChar)>>('wctomb'); + ffi + .NativeFunction, ffi.WChar)>>( + 'wctomb'); late final _wctomb = _wctombPtr.asFunction, int)>(); @@ -952,8 +956,9 @@ class NativeCupertinoHttp { } late final _erand48Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer)>>('erand48'); + ffi + .NativeFunction)>>( + 'erand48'); late final _erand48 = _erand48Ptr.asFunction)>(); @@ -1062,8 +1067,9 @@ class NativeCupertinoHttp { } late final _jrand48Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer)>>('jrand48'); + ffi + .NativeFunction)>>( + 'jrand48'); late final _jrand48 = _jrand48Ptr.asFunction)>(); @@ -1089,8 +1095,9 @@ class NativeCupertinoHttp { } late final _lcong48Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>>('lcong48'); + ffi + .NativeFunction)>>( + 'lcong48'); late final _lcong48 = _lcong48Ptr.asFunction)>(); @@ -1147,8 +1154,9 @@ class NativeCupertinoHttp { } late final _nrand48Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer)>>('nrand48'); + ffi + .NativeFunction)>>( + 'nrand48'); late final _nrand48 = _nrand48Ptr.asFunction)>(); @@ -1401,9 +1409,9 @@ class NativeCupertinoHttp { } late final _arc4random_bufPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Size)>>('arc4random_buf'); + ffi + .NativeFunction, ffi.Size)>>( + 'arc4random_buf'); late final _arc4random_buf = _arc4random_bufPtr .asFunction, int)>(); @@ -1788,8 +1796,9 @@ class NativeCupertinoHttp { } late final _getloadavgPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int)>>('getloadavg'); + ffi + .NativeFunction, ffi.Int)>>( + 'getloadavg'); late final _getloadavg = _getloadavgPtr.asFunction, int)>(); @@ -2378,9 +2387,9 @@ class NativeCupertinoHttp { } late final _objc_retainedObjectPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - objc_objectptr_t)>>('objc_retainedObject'); + ffi + .NativeFunction Function(objc_objectptr_t)>>( + 'objc_retainedObject'); late final _objc_retainedObject = _objc_retainedObjectPtr .asFunction Function(objc_objectptr_t)>(); @@ -2393,9 +2402,9 @@ class NativeCupertinoHttp { } late final _objc_unretainedObjectPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - objc_objectptr_t)>>('objc_unretainedObject'); + ffi + .NativeFunction Function(objc_objectptr_t)>>( + 'objc_unretainedObject'); late final _objc_unretainedObject = _objc_unretainedObjectPtr .asFunction Function(objc_objectptr_t)>(); @@ -2408,9 +2417,9 @@ class NativeCupertinoHttp { } late final _objc_unretainedPointerPtr = _lookup< - ffi.NativeFunction< - objc_objectptr_t Function( - ffi.Pointer)>>('objc_unretainedPointer'); + ffi + .NativeFunction)>>( + 'objc_unretainedPointer'); late final _objc_unretainedPointer = _objc_unretainedPointerPtr .asFunction)>(); @@ -10290,8 +10299,9 @@ class NativeCupertinoHttp { } late final _NSLogvPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, va_list)>>('NSLogv'); + ffi + .NativeFunction, va_list)>>( + 'NSLogv'); late final _NSLogv = _NSLogvPtr.asFunction, va_list)>(); @@ -10361,9 +10371,9 @@ class NativeCupertinoHttp { } late final __Block_object_disposePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Int)>>('_Block_object_dispose'); + ffi + .NativeFunction, ffi.Int)>>( + '_Block_object_dispose'); late final __Block_object_dispose = __Block_object_disposePtr .asFunction, int)>(); @@ -10919,9 +10929,9 @@ class NativeCupertinoHttp { } late final _NSZoneFromPointerPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSZoneFromPointer'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'NSZoneFromPointer'); late final _NSZoneFromPointer = _NSZoneFromPointerPtr.asFunction< ffi.Pointer Function(ffi.Pointer)>(); @@ -12066,23 +12076,26 @@ class NativeCupertinoHttp { ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _class_NSNotification1 = _getClass1("NSNotification"); - late final _sel_name1 = _registerName1("name"); - late final _sel_initWithName_object_userInfo_1 = - _registerName1("initWithName:object:userInfo:"); + late final _class_NSCachedURLResponse1 = _getClass1("NSCachedURLResponse"); + late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); + late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = + _registerName1( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); instancetype _objc_msgSend_315( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName name, - ffi.Pointer object, - ffi.Pointer userInfo, + ffi.Pointer URL, + ffi.Pointer MIMEType, + int length, + ffi.Pointer name, ) { return __objc_msgSend_315( obj, sel, + URL, + MIMEType, + length, name, - object, - userInfo, ); } @@ -12091,1447 +12104,1460 @@ class NativeCupertinoHttp { instancetype Function( ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer, + ffi.Pointer, + NSInteger, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer, + ffi.Pointer, + int, ffi.Pointer)>(); - late final _sel_notificationWithName_object_1 = - _registerName1("notificationWithName:object:"); - late final _sel_notificationWithName_object_userInfo_1 = - _registerName1("notificationWithName:object:userInfo:"); - late final _class_NSNotificationCenter1 = _getClass1("NSNotificationCenter"); - late final _sel_defaultCenter1 = _registerName1("defaultCenter"); - ffi.Pointer _objc_msgSend_316( + late final _sel_URL1 = _registerName1("URL"); + late final _sel_MIMEType1 = _registerName1("MIMEType"); + late final _sel_expectedContentLength1 = + _registerName1("expectedContentLength"); + late final _sel_textEncodingName1 = _registerName1("textEncodingName"); + late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); + late final _sel_initWithResponse_data_1 = + _registerName1("initWithResponse:data:"); + instancetype _objc_msgSend_316( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer response, + ffi.Pointer data, ) { return __objc_msgSend_316( obj, sel, + response, + data, ); } late final __objc_msgSend_316Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_addObserver_selector_name_object_1 = - _registerName1("addObserver:selector:name:object:"); - void _objc_msgSend_317( + late final _sel_initWithResponse_data_userInfo_storagePolicy_1 = + _registerName1("initWithResponse:data:userInfo:storagePolicy:"); + instancetype _objc_msgSend_317( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer aSelector, - NSNotificationName aName, - ffi.Pointer anObject, + ffi.Pointer response, + ffi.Pointer data, + ffi.Pointer userInfo, + int storagePolicy, ) { return __objc_msgSend_317( obj, sel, - observer, - aSelector, - aName, - anObject, + response, + data, + userInfo, + storagePolicy, ); } late final __objc_msgSend_317Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer)>>('objc_msgSend'); + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< - void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer)>(); + ffi.Pointer, + ffi.Pointer, + int)>(); - late final _sel_postNotification_1 = _registerName1("postNotification:"); - void _objc_msgSend_318( + late final _sel_response1 = _registerName1("response"); + ffi.Pointer _objc_msgSend_318( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer notification, ) { return __objc_msgSend_318( obj, sel, - notification, ); } late final __objc_msgSend_318Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_postNotificationName_object_1 = - _registerName1("postNotificationName:object:"); - void _objc_msgSend_319( + late final _sel_storagePolicy1 = _registerName1("storagePolicy"); + int _objc_msgSend_319( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName aName, - ffi.Pointer anObject, ) { return __objc_msgSend_319( obj, sel, - aName, - anObject, ); } late final __objc_msgSend_319Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer)>>('objc_msgSend'); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer)>(); + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_postNotificationName_object_userInfo_1 = - _registerName1("postNotificationName:object:userInfo:"); - void _objc_msgSend_320( + late final _class_NSURLCache1 = _getClass1("NSURLCache"); + late final _sel_sharedURLCache1 = _registerName1("sharedURLCache"); + ffi.Pointer _objc_msgSend_320( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName aName, - ffi.Pointer anObject, - ffi.Pointer aUserInfo, ) { return __objc_msgSend_320( obj, sel, - aName, - anObject, - aUserInfo, ); } late final __objc_msgSend_320Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_removeObserver_1 = _registerName1("removeObserver:"); - late final _sel_removeObserver_name_object_1 = - _registerName1("removeObserver:name:object:"); + late final _sel_setSharedURLCache_1 = _registerName1("setSharedURLCache:"); void _objc_msgSend_321( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer observer, - NSNotificationName aName, - ffi.Pointer anObject, + ffi.Pointer value, ) { return __objc_msgSend_321( obj, sel, - observer, - aName, - anObject, + value, ); } late final __objc_msgSend_321Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSNotificationName, + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSNotificationName, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); - late final _class_NSProgress1 = _getClass1("NSProgress"); - late final _sel_currentProgress1 = _registerName1("currentProgress"); - ffi.Pointer _objc_msgSend_322( + late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_1 = + _registerName1("initWithMemoryCapacity:diskCapacity:diskPath:"); + instancetype _objc_msgSend_322( ffi.Pointer obj, ffi.Pointer sel, + int memoryCapacity, + int diskCapacity, + ffi.Pointer path, ) { return __objc_msgSend_322( obj, sel, + memoryCapacity, + diskCapacity, + path, ); } late final __objc_msgSend_322Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSUInteger, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, int, + int, ffi.Pointer)>(); - late final _sel_progressWithTotalUnitCount_1 = - _registerName1("progressWithTotalUnitCount:"); - ffi.Pointer _objc_msgSend_323( + late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_1 = + _registerName1("initWithMemoryCapacity:diskCapacity:directoryURL:"); + instancetype _objc_msgSend_323( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, + int memoryCapacity, + int diskCapacity, + ffi.Pointer directoryURL, ) { return __objc_msgSend_323( obj, sel, - unitCount, + memoryCapacity, + diskCapacity, + directoryURL, ); } late final __objc_msgSend_323Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSUInteger, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, int, + int, ffi.Pointer)>(); - late final _sel_discreteProgressWithTotalUnitCount_1 = - _registerName1("discreteProgressWithTotalUnitCount:"); - late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = - _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); - ffi.Pointer _objc_msgSend_324( + late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); + late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); + late final _sel_supportsSecureCoding1 = + _registerName1("supportsSecureCoding"); + late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); + instancetype _objc_msgSend_324( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, - ffi.Pointer parent, - int portionOfParentTotalUnitCount, + ffi.Pointer URL, + int cachePolicy, + double timeoutInterval, ) { return __objc_msgSend_324( obj, sel, - unitCount, - parent, - portionOfParentTotalUnitCount, + URL, + cachePolicy, + timeoutInterval, ); } late final __objc_msgSend_324Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Int64, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); + ffi.Int32, + NSTimeInterval)>>('objc_msgSend'); late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, double)>(); - late final _sel_initWithParent_userInfo_1 = - _registerName1("initWithParent:userInfo:"); - instancetype _objc_msgSend_325( + late final _sel_initWithURL_1 = _registerName1("initWithURL:"); + late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = + _registerName1("initWithURL:cachePolicy:timeoutInterval:"); + late final _sel_cachePolicy1 = _registerName1("cachePolicy"); + int _objc_msgSend_325( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer parentProgressOrNil, - ffi.Pointer userInfoOrNil, ) { return __objc_msgSend_325( obj, sel, - parentProgressOrNil, - userInfoOrNil, ); } late final __objc_msgSend_325Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_becomeCurrentWithPendingUnitCount_1 = - _registerName1("becomeCurrentWithPendingUnitCount:"); - void _objc_msgSend_326( + late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); + late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); + late final _sel_networkServiceType1 = _registerName1("networkServiceType"); + int _objc_msgSend_326( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, ) { return __objc_msgSend_326( obj, sel, - unitCount, ); } late final __objc_msgSend_326Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = - _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); - void _objc_msgSend_327( + late final _sel_allowsCellularAccess1 = + _registerName1("allowsCellularAccess"); + late final _sel_allowsExpensiveNetworkAccess1 = + _registerName1("allowsExpensiveNetworkAccess"); + late final _sel_allowsConstrainedNetworkAccess1 = + _registerName1("allowsConstrainedNetworkAccess"); + late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); + late final _sel_attribution1 = _registerName1("attribution"); + int _objc_msgSend_327( ffi.Pointer obj, ffi.Pointer sel, - int unitCount, - ffi.Pointer<_ObjCBlock> work, ) { return __objc_msgSend_327( obj, sel, - unitCount, - work, ); } late final __objc_msgSend_327Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_resignCurrent1 = _registerName1("resignCurrent"); - late final _sel_addChild_withPendingUnitCount_1 = - _registerName1("addChild:withPendingUnitCount:"); + late final _sel_requiresDNSSECValidation1 = + _registerName1("requiresDNSSECValidation"); + late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); + late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); + late final _sel_valueForHTTPHeaderField_1 = + _registerName1("valueForHTTPHeaderField:"); + late final _sel_HTTPBody1 = _registerName1("HTTPBody"); + late final _class_NSInputStream1 = _getClass1("NSInputStream"); + late final _class_NSStream1 = _getClass1("NSStream"); + late final _sel_open1 = _registerName1("open"); + late final _sel_close1 = _registerName1("close"); + late final _sel_delegate1 = _registerName1("delegate"); + late final _sel_setDelegate_1 = _registerName1("setDelegate:"); void _objc_msgSend_328( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer child, - int inUnitCount, + ffi.Pointer value, ) { return __objc_msgSend_328( obj, sel, - child, - inUnitCount, + value, ); } late final __objc_msgSend_328Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer)>(); - late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); - int _objc_msgSend_329( + late final _class_NSRunLoop1 = _getClass1("NSRunLoop"); + late final _sel_scheduleInRunLoop_forMode_1 = + _registerName1("scheduleInRunLoop:forMode:"); + void _objc_msgSend_329( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer aRunLoop, + NSRunLoopMode mode, ) { return __objc_msgSend_329( obj, sel, + aRunLoop, + mode, ); } late final __objc_msgSend_329Ptr = _lookup< ffi.NativeFunction< - ffi.Int64 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRunLoopMode)>>('objc_msgSend'); late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSRunLoopMode)>(); - late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); - void _objc_msgSend_330( + late final _sel_removeFromRunLoop_forMode_1 = + _registerName1("removeFromRunLoop:forMode:"); + late final _sel_streamStatus1 = _registerName1("streamStatus"); + int _objc_msgSend_330( ffi.Pointer obj, ffi.Pointer sel, - int value, ) { return __objc_msgSend_330( obj, sel, - value, ); } late final __objc_msgSend_330Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); - late final _sel_setCompletedUnitCount_1 = - _registerName1("setCompletedUnitCount:"); - late final _sel_setLocalizedDescription_1 = - _registerName1("setLocalizedDescription:"); - void _objc_msgSend_331( + late final _sel_streamError1 = _registerName1("streamError"); + ffi.Pointer _objc_msgSend_331( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, ) { return __objc_msgSend_331( obj, sel, - value, ); } late final __objc_msgSend_331Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_localizedAdditionalDescription1 = - _registerName1("localizedAdditionalDescription"); - late final _sel_setLocalizedAdditionalDescription_1 = - _registerName1("setLocalizedAdditionalDescription:"); - late final _sel_isCancellable1 = _registerName1("isCancellable"); - late final _sel_setCancellable_1 = _registerName1("setCancellable:"); - void _objc_msgSend_332( + late final _class_NSOutputStream1 = _getClass1("NSOutputStream"); + late final _sel_write_maxLength_1 = _registerName1("write:maxLength:"); + int _objc_msgSend_332( ffi.Pointer obj, ffi.Pointer sel, - bool value, + ffi.Pointer buffer, + int len, ) { return __objc_msgSend_332( obj, sel, - value, + buffer, + len, ); } late final __objc_msgSend_332Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); + NSInteger Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, bool)>(); + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_isPausable1 = _registerName1("isPausable"); - late final _sel_setPausable_1 = _registerName1("setPausable:"); - late final _sel_isCancelled1 = _registerName1("isCancelled"); - late final _sel_isPaused1 = _registerName1("isPaused"); - late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_333( + late final _sel_hasSpaceAvailable1 = _registerName1("hasSpaceAvailable"); + late final _sel_initToMemory1 = _registerName1("initToMemory"); + late final _sel_initToBuffer_capacity_1 = + _registerName1("initToBuffer:capacity:"); + instancetype _objc_msgSend_333( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer buffer, + int capacity, ) { return __objc_msgSend_333( obj, sel, + buffer, + capacity, ); } late final __objc_msgSend_333Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSUInteger)>>('objc_msgSend'); late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_setCancellationHandler_1 = - _registerName1("setCancellationHandler:"); + late final _sel_initWithURL_append_1 = _registerName1("initWithURL:append:"); + late final _sel_initToFileAtPath_append_1 = + _registerName1("initToFileAtPath:append:"); + late final _sel_outputStreamToMemory1 = + _registerName1("outputStreamToMemory"); + late final _sel_outputStreamToBuffer_capacity_1 = + _registerName1("outputStreamToBuffer:capacity:"); + late final _sel_outputStreamToFileAtPath_append_1 = + _registerName1("outputStreamToFileAtPath:append:"); + late final _sel_outputStreamWithURL_append_1 = + _registerName1("outputStreamWithURL:append:"); + late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_1 = + _registerName1("getStreamsToHostWithName:port:inputStream:outputStream:"); void _objc_msgSend_334( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, + ffi.Pointer hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, ) { return __objc_msgSend_334( obj, sel, - value, + hostname, + port, + inputStream, + outputStream, ); } late final __objc_msgSend_334Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_pausingHandler1 = _registerName1("pausingHandler"); - late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); - late final _sel_resumingHandler1 = _registerName1("resumingHandler"); - late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); - late final _sel_setUserInfoObject_forKey_1 = - _registerName1("setUserInfoObject:forKey:"); - late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); - late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); - late final _sel_isFinished1 = _registerName1("isFinished"); - late final _sel_cancel1 = _registerName1("cancel"); - late final _sel_pause1 = _registerName1("pause"); - late final _sel_resume1 = _registerName1("resume"); - late final _sel_kind1 = _registerName1("kind"); - late final _sel_setKind_1 = _registerName1("setKind:"); - late final _sel_estimatedTimeRemaining1 = - _registerName1("estimatedTimeRemaining"); - late final _sel_setEstimatedTimeRemaining_1 = - _registerName1("setEstimatedTimeRemaining:"); + late final _class_NSHost1 = _getClass1("NSHost"); + late final _sel_getStreamsToHost_port_inputStream_outputStream_1 = + _registerName1("getStreamsToHost:port:inputStream:outputStream:"); void _objc_msgSend_335( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, ) { return __objc_msgSend_335( obj, sel, - value, + host, + port, + inputStream, + outputStream, ); } late final __objc_msgSend_335Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_throughput1 = _registerName1("throughput"); - late final _sel_setThroughput_1 = _registerName1("setThroughput:"); - late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); - late final _sel_setFileOperationKind_1 = - _registerName1("setFileOperationKind:"); - late final _sel_fileURL1 = _registerName1("fileURL"); - late final _sel_setFileURL_1 = _registerName1("setFileURL:"); + late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1 = + _registerName1("getBoundStreamsWithBufferSize:inputStream:outputStream:"); void _objc_msgSend_336( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_336( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream, + ) { + return __objc_msgSend_336( obj, sel, - value, + bufferSize, + inputStream, + outputStream, ); } late final __objc_msgSend_336Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer>, + ffi.Pointer>)>>('objc_msgSend'); late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer>)>(); - late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); - late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); - late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); - late final _sel_setFileCompletedCount_1 = - _registerName1("setFileCompletedCount:"); - late final _sel_publish1 = _registerName1("publish"); - late final _sel_unpublish1 = _registerName1("unpublish"); - late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = - _registerName1("addSubscriberForFileURL:withPublishingHandler:"); - ffi.Pointer _objc_msgSend_337( + late final _sel_read_maxLength_1 = _registerName1("read:maxLength:"); + late final _sel_getBuffer_length_1 = _registerName1("getBuffer:length:"); + bool _objc_msgSend_337( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer url, - NSProgressPublishingHandler publishingHandler, + ffi.Pointer> buffer, + ffi.Pointer len, ) { return __objc_msgSend_337( obj, sel, - url, - publishingHandler, + buffer, + len, ); } late final __objc_msgSend_337Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>>('objc_msgSend'); + ffi.Pointer>, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>(); + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>, ffi.Pointer)>(); - late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); - late final _sel_isOld1 = _registerName1("isOld"); - late final _sel_progress1 = _registerName1("progress"); - late final _class_NSOperation1 = _getClass1("NSOperation"); - late final _sel_start1 = _registerName1("start"); - late final _sel_main1 = _registerName1("main"); - late final _sel_isExecuting1 = _registerName1("isExecuting"); - late final _sel_isConcurrent1 = _registerName1("isConcurrent"); - late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); - late final _sel_isReady1 = _registerName1("isReady"); - late final _sel_addDependency_1 = _registerName1("addDependency:"); - void _objc_msgSend_338( + late final _sel_hasBytesAvailable1 = _registerName1("hasBytesAvailable"); + late final _sel_initWithFileAtPath_1 = _registerName1("initWithFileAtPath:"); + late final _sel_inputStreamWithData_1 = + _registerName1("inputStreamWithData:"); + late final _sel_inputStreamWithFileAtPath_1 = + _registerName1("inputStreamWithFileAtPath:"); + late final _sel_inputStreamWithURL_1 = _registerName1("inputStreamWithURL:"); + late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); + ffi.Pointer _objc_msgSend_338( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer op, ) { return __objc_msgSend_338( obj, sel, - op, ); } late final __objc_msgSend_338Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_removeDependency_1 = _registerName1("removeDependency:"); - late final _sel_dependencies1 = _registerName1("dependencies"); - late final _sel_queuePriority1 = _registerName1("queuePriority"); - int _objc_msgSend_339( + late final _sel_HTTPShouldHandleCookies1 = + _registerName1("HTTPShouldHandleCookies"); + late final _sel_HTTPShouldUsePipelining1 = + _registerName1("HTTPShouldUsePipelining"); + late final _sel_cachedResponseForRequest_1 = + _registerName1("cachedResponseForRequest:"); + ffi.Pointer _objc_msgSend_339( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer request, ) { return __objc_msgSend_339( obj, sel, + request, ); } late final __objc_msgSend_339Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); + late final _sel_storeCachedResponse_forRequest_1 = + _registerName1("storeCachedResponse:forRequest:"); void _objc_msgSend_340( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer cachedResponse, + ffi.Pointer request, ) { return __objc_msgSend_340( obj, sel, - value, + cachedResponse, + request, ); } late final __objc_msgSend_340Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_completionBlock1 = _registerName1("completionBlock"); - late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); - late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); - late final _sel_threadPriority1 = _registerName1("threadPriority"); - late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); + late final _sel_removeCachedResponseForRequest_1 = + _registerName1("removeCachedResponseForRequest:"); void _objc_msgSend_341( ffi.Pointer obj, ffi.Pointer sel, - double value, + ffi.Pointer request, ) { return __objc_msgSend_341( obj, sel, - value, + request, ); } late final __objc_msgSend_341Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double)>>('objc_msgSend'); + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_qualityOfService1 = _registerName1("qualityOfService"); - int _objc_msgSend_342( + late final _sel_removeAllCachedResponses1 = + _registerName1("removeAllCachedResponses"); + late final _class_NSDate1 = _getClass1("NSDate"); + late final _sel_timeIntervalSinceReferenceDate1 = + _registerName1("timeIntervalSinceReferenceDate"); + late final _sel_initWithTimeIntervalSinceReferenceDate_1 = + _registerName1("initWithTimeIntervalSinceReferenceDate:"); + instancetype _objc_msgSend_342( ffi.Pointer obj, ffi.Pointer sel, + double ti, ) { return __objc_msgSend_342( obj, sel, + ti, ); } late final __objc_msgSend_342Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval)>>('objc_msgSend'); late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, ffi.Pointer, double)>(); - late final _sel_setQualityOfService_1 = - _registerName1("setQualityOfService:"); - void _objc_msgSend_343( + late final _sel_timeIntervalSinceDate_1 = + _registerName1("timeIntervalSinceDate:"); + double _objc_msgSend_343( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer anotherDate, ) { return __objc_msgSend_343( obj, sel, - value, + anotherDate, ); } late final __objc_msgSend_343Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); + NSTimeInterval Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + double Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_setName_1 = _registerName1("setName:"); - late final _sel_addOperation_1 = _registerName1("addOperation:"); - late final _sel_addOperations_waitUntilFinished_1 = - _registerName1("addOperations:waitUntilFinished:"); - void _objc_msgSend_344( + late final _sel_timeIntervalSinceNow1 = + _registerName1("timeIntervalSinceNow"); + late final _sel_timeIntervalSince19701 = + _registerName1("timeIntervalSince1970"); + late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); + late final _sel_dateByAddingTimeInterval_1 = + _registerName1("dateByAddingTimeInterval:"); + late final _sel_earlierDate_1 = _registerName1("earlierDate:"); + ffi.Pointer _objc_msgSend_344( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer ops, - bool wait, + ffi.Pointer anotherDate, ) { return __objc_msgSend_344( obj, sel, - ops, - wait, + anotherDate, ); } late final __objc_msgSend_344Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_addOperationWithBlock_1 = - _registerName1("addOperationWithBlock:"); - void _objc_msgSend_345( + late final _sel_laterDate_1 = _registerName1("laterDate:"); + int _objc_msgSend_345( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer other, ) { return __objc_msgSend_345( obj, sel, - block, + other, ); } late final __objc_msgSend_345Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); - late final _sel_maxConcurrentOperationCount1 = - _registerName1("maxConcurrentOperationCount"); - late final _sel_setMaxConcurrentOperationCount_1 = - _registerName1("setMaxConcurrentOperationCount:"); - void _objc_msgSend_346( + late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); + bool _objc_msgSend_346( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer otherDate, ) { return __objc_msgSend_346( obj, sel, - value, + otherDate, ); } late final __objc_msgSend_346Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSInteger)>>('objc_msgSend'); + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_isSuspended1 = _registerName1("isSuspended"); - late final _sel_setSuspended_1 = _registerName1("setSuspended:"); - late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); - dispatch_queue_t _objc_msgSend_347( + late final _sel_date1 = _registerName1("date"); + late final _sel_dateWithTimeIntervalSinceNow_1 = + _registerName1("dateWithTimeIntervalSinceNow:"); + late final _sel_dateWithTimeIntervalSinceReferenceDate_1 = + _registerName1("dateWithTimeIntervalSinceReferenceDate:"); + late final _sel_dateWithTimeIntervalSince1970_1 = + _registerName1("dateWithTimeIntervalSince1970:"); + late final _sel_dateWithTimeInterval_sinceDate_1 = + _registerName1("dateWithTimeInterval:sinceDate:"); + instancetype _objc_msgSend_347( ffi.Pointer obj, ffi.Pointer sel, + double secsToBeAdded, + ffi.Pointer date, ) { return __objc_msgSend_347( obj, sel, + secsToBeAdded, + date, ); } late final __objc_msgSend_347Ptr = _lookup< ffi.NativeFunction< - dispatch_queue_t Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + instancetype Function(ffi.Pointer, ffi.Pointer, + NSTimeInterval, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< - dispatch_queue_t Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + double, ffi.Pointer)>(); - late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); - void _objc_msgSend_348( + late final _sel_distantFuture1 = _registerName1("distantFuture"); + ffi.Pointer _objc_msgSend_348( ffi.Pointer obj, ffi.Pointer sel, - dispatch_queue_t value, ) { return __objc_msgSend_348( obj, sel, - value, ); } late final __objc_msgSend_348Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - dispatch_queue_t)>>('objc_msgSend'); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); - late final _sel_waitUntilAllOperationsAreFinished1 = - _registerName1("waitUntilAllOperationsAreFinished"); - late final _sel_currentQueue1 = _registerName1("currentQueue"); - ffi.Pointer _objc_msgSend_349( + late final _sel_distantPast1 = _registerName1("distantPast"); + late final _sel_now1 = _registerName1("now"); + late final _sel_initWithTimeIntervalSinceNow_1 = + _registerName1("initWithTimeIntervalSinceNow:"); + late final _sel_initWithTimeIntervalSince1970_1 = + _registerName1("initWithTimeIntervalSince1970:"); + late final _sel_initWithTimeInterval_sinceDate_1 = + _registerName1("initWithTimeInterval:sinceDate:"); + late final _sel_removeCachedResponsesSinceDate_1 = + _registerName1("removeCachedResponsesSinceDate:"); + void _objc_msgSend_349( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer date, ) { return __objc_msgSend_349( obj, sel, + date, ); } late final __objc_msgSend_349Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_mainQueue1 = _registerName1("mainQueue"); - late final _sel_operations1 = _registerName1("operations"); - late final _sel_operationCount1 = _registerName1("operationCount"); - late final _sel_addObserverForName_object_queue_usingBlock_1 = - _registerName1("addObserverForName:object:queue:usingBlock:"); + late final _sel_memoryCapacity1 = _registerName1("memoryCapacity"); + late final _sel_setMemoryCapacity_1 = _registerName1("setMemoryCapacity:"); + late final _sel_diskCapacity1 = _registerName1("diskCapacity"); + late final _sel_setDiskCapacity_1 = _registerName1("setDiskCapacity:"); + late final _sel_currentMemoryUsage1 = _registerName1("currentMemoryUsage"); + late final _sel_currentDiskUsage1 = _registerName1("currentDiskUsage"); + late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); + late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); + late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); + late final _sel_originalRequest1 = _registerName1("originalRequest"); ffi.Pointer _objc_msgSend_350( ffi.Pointer obj, ffi.Pointer sel, - NSNotificationName name, - ffi.Pointer obj1, - ffi.Pointer queue, - ffi.Pointer<_ObjCBlock> block, ) { return __objc_msgSend_350( obj, sel, - name, - obj1, - queue, - block, ); } late final __objc_msgSend_350Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final ffi.Pointer - _NSSystemClockDidChangeNotification = - _lookup('NSSystemClockDidChangeNotification'); - - NSNotificationName get NSSystemClockDidChangeNotification => - _NSSystemClockDidChangeNotification.value; - - set NSSystemClockDidChangeNotification(NSNotificationName value) => - _NSSystemClockDidChangeNotification.value = value; + ffi.Pointer, ffi.Pointer)>(); - late final _class_NSDate1 = _getClass1("NSDate"); - late final _sel_timeIntervalSinceReferenceDate1 = - _registerName1("timeIntervalSinceReferenceDate"); - late final _sel_initWithTimeIntervalSinceReferenceDate_1 = - _registerName1("initWithTimeIntervalSinceReferenceDate:"); - instancetype _objc_msgSend_351( + late final _sel_currentRequest1 = _registerName1("currentRequest"); + late final _class_NSProgress1 = _getClass1("NSProgress"); + late final _sel_currentProgress1 = _registerName1("currentProgress"); + ffi.Pointer _objc_msgSend_351( ffi.Pointer obj, ffi.Pointer sel, - double ti, ) { return __objc_msgSend_351( obj, sel, - ti, ); } late final __objc_msgSend_351Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSTimeInterval)>>('objc_msgSend'); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, double)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_timeIntervalSinceDate_1 = - _registerName1("timeIntervalSinceDate:"); - double _objc_msgSend_352( + late final _sel_progressWithTotalUnitCount_1 = + _registerName1("progressWithTotalUnitCount:"); + ffi.Pointer _objc_msgSend_352( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anotherDate, + int unitCount, ) { return __objc_msgSend_352( obj, sel, - anotherDate, + unitCount, ); } late final __objc_msgSend_352Ptr = _lookup< ffi.NativeFunction< - NSTimeInterval Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_timeIntervalSinceNow1 = - _registerName1("timeIntervalSinceNow"); - late final _sel_timeIntervalSince19701 = - _registerName1("timeIntervalSince1970"); - late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); - late final _sel_dateByAddingTimeInterval_1 = - _registerName1("dateByAddingTimeInterval:"); - late final _sel_earlierDate_1 = _registerName1("earlierDate:"); + late final _sel_discreteProgressWithTotalUnitCount_1 = + _registerName1("discreteProgressWithTotalUnitCount:"); + late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = + _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); ffi.Pointer _objc_msgSend_353( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer anotherDate, + int unitCount, + ffi.Pointer parent, + int portionOfParentTotalUnitCount, ) { return __objc_msgSend_353( obj, sel, - anotherDate, + unitCount, + parent, + portionOfParentTotalUnitCount, ); } late final __objc_msgSend_353Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer, int, ffi.Pointer, int)>(); - late final _sel_laterDate_1 = _registerName1("laterDate:"); - int _objc_msgSend_354( + late final _sel_initWithParent_userInfo_1 = + _registerName1("initWithParent:userInfo:"); + instancetype _objc_msgSend_354( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer other, + ffi.Pointer parentProgressOrNil, + ffi.Pointer userInfoOrNil, ) { return __objc_msgSend_354( obj, sel, - other, + parentProgressOrNil, + userInfoOrNil, ); } late final __objc_msgSend_354Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); - bool _objc_msgSend_355( + late final _sel_becomeCurrentWithPendingUnitCount_1 = + _registerName1("becomeCurrentWithPendingUnitCount:"); + void _objc_msgSend_355( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer otherDate, + int unitCount, ) { return __objc_msgSend_355( obj, sel, - otherDate, + unitCount, ); } late final __objc_msgSend_355Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_date1 = _registerName1("date"); - late final _sel_dateWithTimeIntervalSinceNow_1 = - _registerName1("dateWithTimeIntervalSinceNow:"); - late final _sel_dateWithTimeIntervalSinceReferenceDate_1 = - _registerName1("dateWithTimeIntervalSinceReferenceDate:"); - late final _sel_dateWithTimeIntervalSince1970_1 = - _registerName1("dateWithTimeIntervalSince1970:"); - late final _sel_dateWithTimeInterval_sinceDate_1 = - _registerName1("dateWithTimeInterval:sinceDate:"); - instancetype _objc_msgSend_356( + late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = + _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); + void _objc_msgSend_356( ffi.Pointer obj, ffi.Pointer sel, - double secsToBeAdded, - ffi.Pointer date, + int unitCount, + ffi.Pointer<_ObjCBlock> work, ) { return __objc_msgSend_356( obj, sel, - secsToBeAdded, - date, + unitCount, + work, ); } late final __objc_msgSend_356Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSTimeInterval, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - double, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_distantFuture1 = _registerName1("distantFuture"); - ffi.Pointer _objc_msgSend_357( + late final _sel_resignCurrent1 = _registerName1("resignCurrent"); + late final _sel_addChild_withPendingUnitCount_1 = + _registerName1("addChild:withPendingUnitCount:"); + void _objc_msgSend_357( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer child, + int inUnitCount, ) { return __objc_msgSend_357( obj, sel, + child, + inUnitCount, ); } late final __objc_msgSend_357Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int64)>>('objc_msgSend'); late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); - late final _sel_distantPast1 = _registerName1("distantPast"); - late final _sel_now1 = _registerName1("now"); - late final _sel_initWithTimeIntervalSinceNow_1 = - _registerName1("initWithTimeIntervalSinceNow:"); - late final _sel_initWithTimeIntervalSince1970_1 = - _registerName1("initWithTimeIntervalSince1970:"); - late final _sel_initWithTimeInterval_sinceDate_1 = - _registerName1("initWithTimeInterval:sinceDate:"); - late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); - late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); - late final _sel_supportsSecureCoding1 = - _registerName1("supportsSecureCoding"); - late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = - _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); - instancetype _objc_msgSend_358( + late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); + int _objc_msgSend_358( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer URL, - int cachePolicy, - double timeoutInterval, ) { return __objc_msgSend_358( obj, sel, - URL, - cachePolicy, - timeoutInterval, ); } late final __objc_msgSend_358Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSTimeInterval)>>('objc_msgSend'); + ffi.Int64 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, double)>(); + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithURL_1 = _registerName1("initWithURL:"); - late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = - _registerName1("initWithURL:cachePolicy:timeoutInterval:"); - late final _sel_URL1 = _registerName1("URL"); - late final _sel_cachePolicy1 = _registerName1("cachePolicy"); - int _objc_msgSend_359( + late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); + void _objc_msgSend_359( ffi.Pointer obj, ffi.Pointer sel, + int value, ) { return __objc_msgSend_359( obj, sel, + value, ); } late final __objc_msgSend_359Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int64)>>('objc_msgSend'); late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); - late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); - late final _sel_networkServiceType1 = _registerName1("networkServiceType"); - int _objc_msgSend_360( + late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); + late final _sel_setCompletedUnitCount_1 = + _registerName1("setCompletedUnitCount:"); + late final _sel_setLocalizedDescription_1 = + _registerName1("setLocalizedDescription:"); + void _objc_msgSend_360( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer value, ) { return __objc_msgSend_360( obj, sel, + value, ); } late final __objc_msgSend_360Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_allowsCellularAccess1 = - _registerName1("allowsCellularAccess"); - late final _sel_allowsExpensiveNetworkAccess1 = - _registerName1("allowsExpensiveNetworkAccess"); - late final _sel_allowsConstrainedNetworkAccess1 = - _registerName1("allowsConstrainedNetworkAccess"); - late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); - late final _sel_attribution1 = _registerName1("attribution"); - int _objc_msgSend_361( + late final _sel_localizedAdditionalDescription1 = + _registerName1("localizedAdditionalDescription"); + late final _sel_setLocalizedAdditionalDescription_1 = + _registerName1("setLocalizedAdditionalDescription:"); + late final _sel_isCancellable1 = _registerName1("isCancellable"); + late final _sel_setCancellable_1 = _registerName1("setCancellable:"); + void _objc_msgSend_361( ffi.Pointer obj, ffi.Pointer sel, + bool value, ) { return __objc_msgSend_361( obj, sel, + value, ); } late final __objc_msgSend_361Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, bool)>(); - late final _sel_requiresDNSSECValidation1 = - _registerName1("requiresDNSSECValidation"); - late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); - late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); - late final _sel_valueForHTTPHeaderField_1 = - _registerName1("valueForHTTPHeaderField:"); - late final _sel_HTTPBody1 = _registerName1("HTTPBody"); - late final _class_NSInputStream1 = _getClass1("NSInputStream"); - late final _class_NSStream1 = _getClass1("NSStream"); - late final _sel_open1 = _registerName1("open"); - late final _sel_close1 = _registerName1("close"); - late final _sel_delegate1 = _registerName1("delegate"); - late final _sel_setDelegate_1 = _registerName1("setDelegate:"); - void _objc_msgSend_362( + late final _sel_isPausable1 = _registerName1("isPausable"); + late final _sel_setPausable_1 = _registerName1("setPausable:"); + late final _sel_isCancelled1 = _registerName1("isCancelled"); + late final _sel_isPaused1 = _registerName1("isPaused"); + late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); + ffi.Pointer<_ObjCBlock> _objc_msgSend_362( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, ) { return __objc_msgSend_362( obj, sel, - value, ); } late final __objc_msgSend_362Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer<_ObjCBlock> Function( + ffi.Pointer, ffi.Pointer)>(); - late final _class_NSRunLoop1 = _getClass1("NSRunLoop"); - late final _sel_scheduleInRunLoop_forMode_1 = - _registerName1("scheduleInRunLoop:forMode:"); + late final _sel_setCancellationHandler_1 = + _registerName1("setCancellationHandler:"); void _objc_msgSend_363( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer aRunLoop, - NSRunLoopMode mode, + ffi.Pointer<_ObjCBlock> value, ) { return __objc_msgSend_363( obj, sel, - aRunLoop, - mode, + value, ); } late final __objc_msgSend_363Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRunLoopMode)>>('objc_msgSend'); + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRunLoopMode)>(); + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_removeFromRunLoop_forMode_1 = - _registerName1("removeFromRunLoop:forMode:"); - late final _sel_streamStatus1 = _registerName1("streamStatus"); - int _objc_msgSend_364( + late final _sel_pausingHandler1 = _registerName1("pausingHandler"); + late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); + late final _sel_resumingHandler1 = _registerName1("resumingHandler"); + late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); + late final _sel_setUserInfoObject_forKey_1 = + _registerName1("setUserInfoObject:forKey:"); + late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); + late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); + late final _sel_isFinished1 = _registerName1("isFinished"); + late final _sel_cancel1 = _registerName1("cancel"); + late final _sel_pause1 = _registerName1("pause"); + late final _sel_resume1 = _registerName1("resume"); + late final _sel_kind1 = _registerName1("kind"); + late final _sel_setKind_1 = _registerName1("setKind:"); + late final _sel_estimatedTimeRemaining1 = + _registerName1("estimatedTimeRemaining"); + late final _sel_setEstimatedTimeRemaining_1 = + _registerName1("setEstimatedTimeRemaining:"); + void _objc_msgSend_364( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer value, ) { return __objc_msgSend_364( obj, sel, + value, ); } late final __objc_msgSend_364Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_streamError1 = _registerName1("streamError"); - ffi.Pointer _objc_msgSend_365( + late final _sel_throughput1 = _registerName1("throughput"); + late final _sel_setThroughput_1 = _registerName1("setThroughput:"); + late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); + late final _sel_setFileOperationKind_1 = + _registerName1("setFileOperationKind:"); + late final _sel_fileURL1 = _registerName1("fileURL"); + late final _sel_setFileURL_1 = _registerName1("setFileURL:"); + void _objc_msgSend_365( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer value, ) { return __objc_msgSend_365( obj, sel, + value, ); } late final __objc_msgSend_365Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _class_NSOutputStream1 = _getClass1("NSOutputStream"); - late final _sel_write_maxLength_1 = _registerName1("write:maxLength:"); - int _objc_msgSend_366( + late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); + late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); + late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); + late final _sel_setFileCompletedCount_1 = + _registerName1("setFileCompletedCount:"); + late final _sel_publish1 = _registerName1("publish"); + late final _sel_unpublish1 = _registerName1("unpublish"); + late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = + _registerName1("addSubscriberForFileURL:withPublishingHandler:"); + ffi.Pointer _objc_msgSend_366( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, - int len, + ffi.Pointer url, + NSProgressPublishingHandler publishingHandler, ) { return __objc_msgSend_366( obj, sel, - buffer, - len, + url, + publishingHandler, ); } late final __objc_msgSend_366Ptr = _lookup< ffi.NativeFunction< - NSInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>>('objc_msgSend'); late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>(); - late final _sel_hasSpaceAvailable1 = _registerName1("hasSpaceAvailable"); - late final _sel_initToMemory1 = _registerName1("initToMemory"); - late final _sel_initToBuffer_capacity_1 = - _registerName1("initToBuffer:capacity:"); - instancetype _objc_msgSend_367( + late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); + late final _sel_isOld1 = _registerName1("isOld"); + late final _sel_progress1 = _registerName1("progress"); + late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); + late final _sel_setEarliestBeginDate_1 = + _registerName1("setEarliestBeginDate:"); + void _objc_msgSend_367( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer buffer, - int capacity, + ffi.Pointer value, ) { return __objc_msgSend_367( obj, sel, - buffer, - capacity, + value, ); } late final __objc_msgSend_367Ptr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_initWithURL_append_1 = _registerName1("initWithURL:append:"); - late final _sel_initToFileAtPath_append_1 = - _registerName1("initToFileAtPath:append:"); - late final _sel_outputStreamToMemory1 = - _registerName1("outputStreamToMemory"); - late final _sel_outputStreamToBuffer_capacity_1 = - _registerName1("outputStreamToBuffer:capacity:"); - late final _sel_outputStreamToFileAtPath_append_1 = - _registerName1("outputStreamToFileAtPath:append:"); - late final _sel_outputStreamWithURL_append_1 = - _registerName1("outputStreamWithURL:append:"); - late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_1 = - _registerName1("getStreamsToHostWithName:port:inputStream:outputStream:"); - void _objc_msgSend_368( + late final _sel_countOfBytesClientExpectsToSend1 = + _registerName1("countOfBytesClientExpectsToSend"); + late final _sel_setCountOfBytesClientExpectsToSend_1 = + _registerName1("setCountOfBytesClientExpectsToSend:"); + late final _sel_countOfBytesClientExpectsToReceive1 = + _registerName1("countOfBytesClientExpectsToReceive"); + late final _sel_setCountOfBytesClientExpectsToReceive_1 = + _registerName1("setCountOfBytesClientExpectsToReceive:"); + late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); + late final _sel_countOfBytesReceived1 = + _registerName1("countOfBytesReceived"); + late final _sel_countOfBytesExpectedToSend1 = + _registerName1("countOfBytesExpectedToSend"); + late final _sel_countOfBytesExpectedToReceive1 = + _registerName1("countOfBytesExpectedToReceive"); + late final _sel_taskDescription1 = _registerName1("taskDescription"); + late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); + late final _sel_state1 = _registerName1("state"); + int _objc_msgSend_368( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, ) { return __objc_msgSend_368( obj, sel, - hostname, - port, - inputStream, - outputStream, ); } late final __objc_msgSend_368Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _class_NSHost1 = _getClass1("NSHost"); - late final _sel_getStreamsToHost_port_inputStream_outputStream_1 = - _registerName1("getStreamsToHost:port:inputStream:outputStream:"); + late final _sel_error1 = _registerName1("error"); + late final _sel_suspend1 = _registerName1("suspend"); + late final _sel_priority1 = _registerName1("priority"); + late final _sel_setPriority_1 = _registerName1("setPriority:"); void _objc_msgSend_369( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, + double value, ) { return __objc_msgSend_369( obj, sel, - host, - port, - inputStream, - outputStream, + value, ); } late final __objc_msgSend_369Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Float)>>('objc_msgSend'); late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); + void Function(ffi.Pointer, ffi.Pointer, double)>(); - late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1 = - _registerName1("getBoundStreamsWithBufferSize:inputStream:outputStream:"); + late final _sel_prefersIncrementalDelivery1 = + _registerName1("prefersIncrementalDelivery"); + late final _sel_setPrefersIncrementalDelivery_1 = + _registerName1("setPrefersIncrementalDelivery:"); + late final _sel_storeCachedResponse_forDataTask_1 = + _registerName1("storeCachedResponse:forDataTask:"); void _objc_msgSend_370( ffi.Pointer obj, ffi.Pointer sel, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, + ffi.Pointer cachedResponse, + ffi.Pointer dataTask, ) { return __objc_msgSend_370( obj, sel, - bufferSize, - inputStream, - outputStream, + cachedResponse, + dataTask, ); } @@ -13540,161 +13566,169 @@ class NativeCupertinoHttp { ffi.Void Function( ffi.Pointer, ffi.Pointer, - NSUInteger, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_read_maxLength_1 = _registerName1("read:maxLength:"); - late final _sel_getBuffer_length_1 = _registerName1("getBuffer:length:"); - bool _objc_msgSend_371( + late final _sel_getCachedResponseForDataTask_completionHandler_1 = + _registerName1("getCachedResponseForDataTask:completionHandler:"); + void _objc_msgSend_371( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer> buffer, - ffi.Pointer len, + ffi.Pointer dataTask, + ffi.Pointer<_ObjCBlock> completionHandler, ) { return __objc_msgSend_371( obj, sel, - buffer, - len, + dataTask, + completionHandler, ); } late final __objc_msgSend_371Ptr = _lookup< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('objc_msgSend'); + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _sel_hasBytesAvailable1 = _registerName1("hasBytesAvailable"); - late final _sel_initWithFileAtPath_1 = _registerName1("initWithFileAtPath:"); - late final _sel_inputStreamWithData_1 = - _registerName1("inputStreamWithData:"); - late final _sel_inputStreamWithFileAtPath_1 = - _registerName1("inputStreamWithFileAtPath:"); - late final _sel_inputStreamWithURL_1 = _registerName1("inputStreamWithURL:"); - late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); - ffi.Pointer _objc_msgSend_372( + late final _sel_removeCachedResponseForDataTask_1 = + _registerName1("removeCachedResponseForDataTask:"); + void _objc_msgSend_372( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer dataTask, ) { return __objc_msgSend_372( obj, sel, + dataTask, ); } late final __objc_msgSend_372Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_HTTPShouldHandleCookies1 = - _registerName1("HTTPShouldHandleCookies"); - late final _sel_HTTPShouldUsePipelining1 = - _registerName1("HTTPShouldUsePipelining"); - late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); - late final _sel_setURL_1 = _registerName1("setURL:"); - late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); - void _objc_msgSend_373( + late final _class_NSNotification1 = _getClass1("NSNotification"); + late final _sel_name1 = _registerName1("name"); + late final _sel_initWithName_object_userInfo_1 = + _registerName1("initWithName:object:userInfo:"); + instancetype _objc_msgSend_373( ffi.Pointer obj, ffi.Pointer sel, - int value, + NSNotificationName name, + ffi.Pointer object, + ffi.Pointer userInfo, ) { return __objc_msgSend_373( obj, sel, - value, + name, + object, + userInfo, ); } late final __objc_msgSend_373Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer)>(); - late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); - late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); - late final _sel_setNetworkServiceType_1 = - _registerName1("setNetworkServiceType:"); - void _objc_msgSend_374( + late final _sel_notificationWithName_object_1 = + _registerName1("notificationWithName:object:"); + late final _sel_notificationWithName_object_userInfo_1 = + _registerName1("notificationWithName:object:userInfo:"); + late final _class_NSNotificationCenter1 = _getClass1("NSNotificationCenter"); + late final _sel_defaultCenter1 = _registerName1("defaultCenter"); + ffi.Pointer _objc_msgSend_374( ffi.Pointer obj, ffi.Pointer sel, - int value, ) { return __objc_msgSend_374( obj, sel, - value, ); } late final __objc_msgSend_374Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_setAllowsCellularAccess_1 = - _registerName1("setAllowsCellularAccess:"); - late final _sel_setAllowsExpensiveNetworkAccess_1 = - _registerName1("setAllowsExpensiveNetworkAccess:"); - late final _sel_setAllowsConstrainedNetworkAccess_1 = - _registerName1("setAllowsConstrainedNetworkAccess:"); - late final _sel_setAssumesHTTP3Capable_1 = - _registerName1("setAssumesHTTP3Capable:"); - late final _sel_setAttribution_1 = _registerName1("setAttribution:"); + late final _sel_addObserver_selector_name_object_1 = + _registerName1("addObserver:selector:name:object:"); void _objc_msgSend_375( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer observer, + ffi.Pointer aSelector, + NSNotificationName aName, + ffi.Pointer anObject, ) { return __objc_msgSend_375( obj, sel, - value, + observer, + aSelector, + aName, + anObject, ); } late final __objc_msgSend_375Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer)>(); - late final _sel_setRequiresDNSSECValidation_1 = - _registerName1("setRequiresDNSSECValidation:"); - late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); - late final _sel_setAllHTTPHeaderFields_1 = - _registerName1("setAllHTTPHeaderFields:"); + late final _sel_postNotification_1 = _registerName1("postNotification:"); void _objc_msgSend_376( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer notification, ) { return __objc_msgSend_376( obj, sel, - value, + notification, ); } @@ -13706,315 +13740,307 @@ class NativeCupertinoHttp { void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_setValue_forHTTPHeaderField_1 = - _registerName1("setValue:forHTTPHeaderField:"); + late final _sel_postNotificationName_object_1 = + _registerName1("postNotificationName:object:"); void _objc_msgSend_377( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer field, + NSNotificationName aName, + ffi.Pointer anObject, ) { return __objc_msgSend_377( obj, sel, - value, - field, + aName, + anObject, ); } late final __objc_msgSend_377Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSNotificationName, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSNotificationName, ffi.Pointer)>(); - late final _sel_addValue_forHTTPHeaderField_1 = - _registerName1("addValue:forHTTPHeaderField:"); - late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); + late final _sel_postNotificationName_object_userInfo_1 = + _registerName1("postNotificationName:object:userInfo:"); void _objc_msgSend_378( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + NSNotificationName aName, + ffi.Pointer anObject, + ffi.Pointer aUserInfo, ) { return __objc_msgSend_378( obj, sel, - value, + aName, + anObject, + aUserInfo, ); } late final __objc_msgSend_378Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, + void Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); + late final _sel_removeObserver_1 = _registerName1("removeObserver:"); + late final _sel_removeObserver_name_object_1 = + _registerName1("removeObserver:name:object:"); void _objc_msgSend_379( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer observer, + NSNotificationName aName, + ffi.Pointer anObject, ) { return __objc_msgSend_379( obj, sel, - value, + observer, + aName, + anObject, ); } late final __objc_msgSend_379Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSNotificationName, ffi.Pointer)>(); - late final _sel_setHTTPShouldHandleCookies_1 = - _registerName1("setHTTPShouldHandleCookies:"); - late final _sel_setHTTPShouldUsePipelining_1 = - _registerName1("setHTTPShouldUsePipelining:"); - late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); - late final _sel_sharedHTTPCookieStorage1 = - _registerName1("sharedHTTPCookieStorage"); - ffi.Pointer _objc_msgSend_380( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_380( - obj, - sel, - ); + late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); + late final _class_NSOperation1 = _getClass1("NSOperation"); + late final _sel_start1 = _registerName1("start"); + late final _sel_main1 = _registerName1("main"); + late final _sel_isExecuting1 = _registerName1("isExecuting"); + late final _sel_isConcurrent1 = _registerName1("isConcurrent"); + late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); + late final _sel_isReady1 = _registerName1("isReady"); + late final _sel_addDependency_1 = _registerName1("addDependency:"); + void _objc_msgSend_380( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer op, + ) { + return __objc_msgSend_380( + obj, + sel, + op, + ); } late final __objc_msgSend_380Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = - _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); - ffi.Pointer _objc_msgSend_381( + late final _sel_removeDependency_1 = _registerName1("removeDependency:"); + late final _sel_dependencies1 = _registerName1("dependencies"); + late final _sel_queuePriority1 = _registerName1("queuePriority"); + int _objc_msgSend_381( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer identifier, ) { return __objc_msgSend_381( obj, sel, - identifier, ); } late final __objc_msgSend_381Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_cookies1 = _registerName1("cookies"); - late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); - late final _sel_setCookie_1 = _registerName1("setCookie:"); + late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); void _objc_msgSend_382( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer cookie, + int value, ) { return __objc_msgSend_382( obj, sel, - cookie, + value, ); } late final __objc_msgSend_382Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Int32)>>('objc_msgSend'); late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); - late final _sel_removeCookiesSinceDate_1 = - _registerName1("removeCookiesSinceDate:"); + late final _sel_completionBlock1 = _registerName1("completionBlock"); + late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); + late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); + late final _sel_threadPriority1 = _registerName1("threadPriority"); + late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); void _objc_msgSend_383( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer date, + double value, ) { return __objc_msgSend_383( obj, sel, - date, + value, ); } late final __objc_msgSend_383Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Double)>>('objc_msgSend'); late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, double)>(); - late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); - late final _sel_setCookies_forURL_mainDocumentURL_1 = - _registerName1("setCookies:forURL:mainDocumentURL:"); - void _objc_msgSend_384( + late final _sel_qualityOfService1 = _registerName1("qualityOfService"); + int _objc_msgSend_384( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer URL, - ffi.Pointer mainDocumentURL, ) { return __objc_msgSend_384( obj, sel, - cookies, - URL, - mainDocumentURL, ); } late final __objc_msgSend_384Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + int Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); - int _objc_msgSend_385( + late final _sel_setQualityOfService_1 = + _registerName1("setQualityOfService:"); + void _objc_msgSend_385( ffi.Pointer obj, ffi.Pointer sel, + int value, ) { return __objc_msgSend_385( obj, sel, + value, ); } late final __objc_msgSend_385Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_setCookieAcceptPolicy_1 = - _registerName1("setCookieAcceptPolicy:"); + late final _sel_setName_1 = _registerName1("setName:"); + late final _sel_addOperation_1 = _registerName1("addOperation:"); + late final _sel_addOperations_waitUntilFinished_1 = + _registerName1("addOperations:waitUntilFinished:"); void _objc_msgSend_386( ffi.Pointer obj, ffi.Pointer sel, - int value, + ffi.Pointer ops, + bool wait, ) { return __objc_msgSend_386( obj, sel, - value, + ops, + wait, ); } late final __objc_msgSend_386Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); - late final _sel_sortedCookiesUsingDescriptors_1 = - _registerName1("sortedCookiesUsingDescriptors:"); - late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); - late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); - late final _sel_originalRequest1 = _registerName1("originalRequest"); - ffi.Pointer _objc_msgSend_387( + late final _sel_addOperationWithBlock_1 = + _registerName1("addOperationWithBlock:"); + void _objc_msgSend_387( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> block, ) { return __objc_msgSend_387( obj, sel, + block, ); } late final __objc_msgSend_387Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_currentRequest1 = _registerName1("currentRequest"); - late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); - late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = - _registerName1( - "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); - instancetype _objc_msgSend_388( + late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); + late final _sel_maxConcurrentOperationCount1 = + _registerName1("maxConcurrentOperationCount"); + late final _sel_setMaxConcurrentOperationCount_1 = + _registerName1("setMaxConcurrentOperationCount:"); + void _objc_msgSend_388( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer URL, - ffi.Pointer MIMEType, - int length, - ffi.Pointer name, + int value, ) { return __objc_msgSend_388( obj, sel, - URL, - MIMEType, - length, - name, + value, ); } late final __objc_msgSend_388Ptr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSInteger)>>('objc_msgSend'); late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_MIMEType1 = _registerName1("MIMEType"); - late final _sel_expectedContentLength1 = - _registerName1("expectedContentLength"); - late final _sel_textEncodingName1 = _registerName1("textEncodingName"); - late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); - late final _sel_response1 = _registerName1("response"); - ffi.Pointer _objc_msgSend_389( + late final _sel_isSuspended1 = _registerName1("isSuspended"); + late final _sel_setSuspended_1 = _registerName1("setSuspended:"); + late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); + dispatch_queue_t _objc_msgSend_389( ffi.Pointer obj, ffi.Pointer sel, ) { @@ -14026,19 +14052,17 @@ class NativeCupertinoHttp { late final __objc_msgSend_389Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + dispatch_queue_t Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< - ffi.Pointer Function( + dispatch_queue_t Function( ffi.Pointer, ffi.Pointer)>(); - late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); - late final _sel_setEarliestBeginDate_1 = - _registerName1("setEarliestBeginDate:"); + late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); void _objc_msgSend_390( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer value, + dispatch_queue_t value, ) { return __objc_msgSend_390( obj, @@ -14050,30 +14074,16 @@ class NativeCupertinoHttp { late final __objc_msgSend_390Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + dispatch_queue_t)>>('objc_msgSend'); late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + void Function( + ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); - late final _sel_countOfBytesClientExpectsToSend1 = - _registerName1("countOfBytesClientExpectsToSend"); - late final _sel_setCountOfBytesClientExpectsToSend_1 = - _registerName1("setCountOfBytesClientExpectsToSend:"); - late final _sel_countOfBytesClientExpectsToReceive1 = - _registerName1("countOfBytesClientExpectsToReceive"); - late final _sel_setCountOfBytesClientExpectsToReceive_1 = - _registerName1("setCountOfBytesClientExpectsToReceive:"); - late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); - late final _sel_countOfBytesReceived1 = - _registerName1("countOfBytesReceived"); - late final _sel_countOfBytesExpectedToSend1 = - _registerName1("countOfBytesExpectedToSend"); - late final _sel_countOfBytesExpectedToReceive1 = - _registerName1("countOfBytesExpectedToReceive"); - late final _sel_taskDescription1 = _registerName1("taskDescription"); - late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); - late final _sel_state1 = _registerName1("state"); - int _objc_msgSend_391( + late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); + late final _sel_waitUntilAllOperationsAreFinished1 = + _registerName1("waitUntilAllOperationsAreFinished"); + late final _sel_currentQueue1 = _registerName1("currentQueue"); + ffi.Pointer _objc_msgSend_391( ffi.Pointer obj, ffi.Pointer sel, ) { @@ -14085,145 +14095,488 @@ class NativeCupertinoHttp { late final __objc_msgSend_391Ptr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_error1 = _registerName1("error"); - late final _sel_suspend1 = _registerName1("suspend"); - late final _sel_priority1 = _registerName1("priority"); - late final _sel_setPriority_1 = _registerName1("setPriority:"); - void _objc_msgSend_392( + late final _sel_mainQueue1 = _registerName1("mainQueue"); + late final _sel_operations1 = _registerName1("operations"); + late final _sel_operationCount1 = _registerName1("operationCount"); + late final _sel_addObserverForName_object_queue_usingBlock_1 = + _registerName1("addObserverForName:object:queue:usingBlock:"); + ffi.Pointer _objc_msgSend_392( ffi.Pointer obj, ffi.Pointer sel, - double value, + NSNotificationName name, + ffi.Pointer obj1, + ffi.Pointer queue, + ffi.Pointer<_ObjCBlock> block, ) { return __objc_msgSend_392( obj, sel, - value, + name, + obj1, + queue, + block, ); } late final __objc_msgSend_392Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float)>>('objc_msgSend'); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSNotificationName, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); - late final _sel_prefersIncrementalDelivery1 = - _registerName1("prefersIncrementalDelivery"); - late final _sel_setPrefersIncrementalDelivery_1 = - _registerName1("setPrefersIncrementalDelivery:"); - late final _sel_storeCookies_forTask_1 = - _registerName1("storeCookies:forTask:"); + late final ffi.Pointer + _NSSystemClockDidChangeNotification = + _lookup('NSSystemClockDidChangeNotification'); + + NSNotificationName get NSSystemClockDidChangeNotification => + _NSSystemClockDidChangeNotification.value; + + set NSSystemClockDidChangeNotification(NSNotificationName value) => + _NSSystemClockDidChangeNotification.value = value; + + late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); + late final _sel_setURL_1 = _registerName1("setURL:"); + late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); void _objc_msgSend_393( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer task, + int value, ) { return __objc_msgSend_393( obj, sel, - cookies, - task, + value, ); } late final __objc_msgSend_393Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_getCookiesForTask_completionHandler_1 = - _registerName1("getCookiesForTask:completionHandler:"); + late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); + late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); + late final _sel_setNetworkServiceType_1 = + _registerName1("setNetworkServiceType:"); void _objc_msgSend_394( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer<_ObjCBlock> completionHandler, + int value, ) { return __objc_msgSend_394( obj, sel, - task, - completionHandler, + value, ); } late final __objc_msgSend_394Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final ffi.Pointer - _NSHTTPCookieManagerAcceptPolicyChangedNotification = - _lookup( - 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); + void Function(ffi.Pointer, ffi.Pointer, int)>(); - NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; + late final _sel_setAllowsCellularAccess_1 = + _registerName1("setAllowsCellularAccess:"); + late final _sel_setAllowsExpensiveNetworkAccess_1 = + _registerName1("setAllowsExpensiveNetworkAccess:"); + late final _sel_setAllowsConstrainedNetworkAccess_1 = + _registerName1("setAllowsConstrainedNetworkAccess:"); + late final _sel_setAssumesHTTP3Capable_1 = + _registerName1("setAssumesHTTP3Capable:"); + late final _sel_setAttribution_1 = _registerName1("setAttribution:"); + void _objc_msgSend_395( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_395( + obj, + sel, + value, + ); + } - set NSHTTPCookieManagerAcceptPolicyChangedNotification( - NSNotificationName value) => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; + late final __objc_msgSend_395Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final ffi.Pointer - _NSHTTPCookieManagerCookiesChangedNotification = - _lookup( - 'NSHTTPCookieManagerCookiesChangedNotification'); + late final _sel_setRequiresDNSSECValidation_1 = + _registerName1("setRequiresDNSSECValidation:"); + late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); + late final _sel_setAllHTTPHeaderFields_1 = + _registerName1("setAllHTTPHeaderFields:"); + void _objc_msgSend_396( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_396( + obj, + sel, + value, + ); + } - NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => - _NSHTTPCookieManagerCookiesChangedNotification.value; + late final __objc_msgSend_396Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => - _NSHTTPCookieManagerCookiesChangedNotification.value = value; + late final _sel_setValue_forHTTPHeaderField_1 = + _registerName1("setValue:forHTTPHeaderField:"); + void _objc_msgSend_397( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer field, + ) { + return __objc_msgSend_397( + obj, + sel, + value, + field, + ); + } - late final ffi.Pointer - _NSProgressEstimatedTimeRemainingKey = - _lookup('NSProgressEstimatedTimeRemainingKey'); + late final __objc_msgSend_397Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => - _NSProgressEstimatedTimeRemainingKey.value; + late final _sel_addValue_forHTTPHeaderField_1 = + _registerName1("addValue:forHTTPHeaderField:"); + late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); + void _objc_msgSend_398( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_398( + obj, + sel, + value, + ); + } - set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey value) => - _NSProgressEstimatedTimeRemainingKey.value = value; + late final __objc_msgSend_398Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - late final ffi.Pointer _NSProgressThroughputKey = - _lookup('NSProgressThroughputKey'); + late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); + void _objc_msgSend_399( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_399( + obj, + sel, + value, + ); + } - NSProgressUserInfoKey get NSProgressThroughputKey => - _NSProgressThroughputKey.value; + late final __objc_msgSend_399Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); - set NSProgressThroughputKey(NSProgressUserInfoKey value) => - _NSProgressThroughputKey.value = value; + late final _sel_setHTTPShouldHandleCookies_1 = + _registerName1("setHTTPShouldHandleCookies:"); + late final _sel_setHTTPShouldUsePipelining_1 = + _registerName1("setHTTPShouldUsePipelining:"); + late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); + late final _sel_sharedHTTPCookieStorage1 = + _registerName1("sharedHTTPCookieStorage"); + ffi.Pointer _objc_msgSend_400( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_400( + obj, + sel, + ); + } - late final ffi.Pointer _NSProgressKindFile = - _lookup('NSProgressKindFile'); + late final __objc_msgSend_400Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - NSProgressKind get NSProgressKindFile => _NSProgressKindFile.value; + late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = + _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); + ffi.Pointer _objc_msgSend_401( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer identifier, + ) { + return __objc_msgSend_401( + obj, + sel, + identifier, + ); + } - set NSProgressKindFile(NSProgressKind value) => - _NSProgressKindFile.value = value; + late final __objc_msgSend_401Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final ffi.Pointer - _NSProgressFileOperationKindKey = - _lookup('NSProgressFileOperationKindKey'); + late final _sel_cookies1 = _registerName1("cookies"); + late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); + late final _sel_setCookie_1 = _registerName1("setCookie:"); + void _objc_msgSend_402( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookie, + ) { + return __objc_msgSend_402( + obj, + sel, + cookie, + ); + } + + late final __objc_msgSend_402Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); + late final _sel_removeCookiesSinceDate_1 = + _registerName1("removeCookiesSinceDate:"); + late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); + late final _sel_setCookies_forURL_mainDocumentURL_1 = + _registerName1("setCookies:forURL:mainDocumentURL:"); + void _objc_msgSend_403( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer URL, + ffi.Pointer mainDocumentURL, + ) { + return __objc_msgSend_403( + obj, + sel, + cookies, + URL, + mainDocumentURL, + ); + } + + late final __objc_msgSend_403Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); + int _objc_msgSend_404( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_404( + obj, + sel, + ); + } + + late final __objc_msgSend_404Ptr = _lookup< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); + + late final _sel_setCookieAcceptPolicy_1 = + _registerName1("setCookieAcceptPolicy:"); + void _objc_msgSend_405( + ffi.Pointer obj, + ffi.Pointer sel, + int value, + ) { + return __objc_msgSend_405( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_405Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int32)>>('objc_msgSend'); + late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + late final _sel_sortedCookiesUsingDescriptors_1 = + _registerName1("sortedCookiesUsingDescriptors:"); + late final _sel_storeCookies_forTask_1 = + _registerName1("storeCookies:forTask:"); + void _objc_msgSend_406( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer cookies, + ffi.Pointer task, + ) { + return __objc_msgSend_406( + obj, + sel, + cookies, + task, + ); + } + + late final __objc_msgSend_406Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + late final _sel_getCookiesForTask_completionHandler_1 = + _registerName1("getCookiesForTask:completionHandler:"); + void _objc_msgSend_407( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer task, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_407( + obj, + sel, + task, + completionHandler, + ); + } + + late final __objc_msgSend_407Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + + late final ffi.Pointer + _NSHTTPCookieManagerAcceptPolicyChangedNotification = + _lookup( + 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); + + NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; + + set NSHTTPCookieManagerAcceptPolicyChangedNotification( + NSNotificationName value) => + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; + + late final ffi.Pointer + _NSHTTPCookieManagerCookiesChangedNotification = + _lookup( + 'NSHTTPCookieManagerCookiesChangedNotification'); + + NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => + _NSHTTPCookieManagerCookiesChangedNotification.value; + + set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => + _NSHTTPCookieManagerCookiesChangedNotification.value = value; + + late final ffi.Pointer + _NSProgressEstimatedTimeRemainingKey = + _lookup('NSProgressEstimatedTimeRemainingKey'); + + NSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => + _NSProgressEstimatedTimeRemainingKey.value; + + set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey value) => + _NSProgressEstimatedTimeRemainingKey.value = value; + + late final ffi.Pointer _NSProgressThroughputKey = + _lookup('NSProgressThroughputKey'); + + NSProgressUserInfoKey get NSProgressThroughputKey => + _NSProgressThroughputKey.value; + + set NSProgressThroughputKey(NSProgressUserInfoKey value) => + _NSProgressThroughputKey.value = value; + + late final ffi.Pointer _NSProgressKindFile = + _lookup('NSProgressKindFile'); + + NSProgressKind get NSProgressKindFile => _NSProgressKindFile.value; + + set NSProgressKindFile(NSProgressKind value) => + _NSProgressKindFile.value = value; + + late final ffi.Pointer + _NSProgressFileOperationKindKey = + _lookup('NSProgressFileOperationKindKey'); NSProgressUserInfoKey get NSProgressFileOperationKindKey => _NSProgressFileOperationKindKey.value; @@ -14517,9 +14870,9 @@ class NativeCupertinoHttp { } late final _CFArrayGetValueAtIndexPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFArrayRef, CFIndex)>>('CFArrayGetValueAtIndex'); + ffi + .NativeFunction Function(CFArrayRef, CFIndex)>>( + 'CFArrayGetValueAtIndex'); late final _CFArrayGetValueAtIndex = _CFArrayGetValueAtIndexPtr.asFunction< ffi.Pointer Function(CFArrayRef, int)>(); @@ -15646,8 +15999,9 @@ class NativeCupertinoHttp { } late final _frexpfPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Pointer)>>('frexpf'); + ffi + .NativeFunction)>>( + 'frexpf'); late final _frexpf = _frexpfPtr.asFunction)>(); @@ -16515,8 +16869,9 @@ class NativeCupertinoHttp { } late final _fmafPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Float, ffi.Float)>>('fmaf'); + ffi + .NativeFunction>( + 'fmaf'); late final _fmaf = _fmafPtr.asFunction(); @@ -16932,8 +17287,8 @@ class NativeCupertinoHttp { ffi.Pointer> Function( ffi.Int, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Int)>>)>>('bsd_signal'); + ffi + .NativeFunction>)>>('bsd_signal'); late final _bsd_signal = _bsd_signalPtr.asFunction< ffi.Pointer> Function( int, ffi.Pointer>)>(); @@ -18316,8 +18671,9 @@ class NativeCupertinoHttp { } late final _fseekoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, off_t, ffi.Int)>>('fseeko'); + ffi + .NativeFunction, off_t, ffi.Int)>>( + 'fseeko'); late final _fseeko = _fseekoPtr.asFunction, int, int)>(); @@ -19387,8 +19743,9 @@ class NativeCupertinoHttp { } late final _strnlenPtr = _lookup< - ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Size)>>('strnlen'); + ffi + .NativeFunction, ffi.Size)>>( + 'strnlen'); late final _strnlen = _strnlenPtr.asFunction, int)>(); @@ -19593,8 +19950,9 @@ class NativeCupertinoHttp { } late final _strmodePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int, ffi.Pointer)>>('strmode'); + ffi + .NativeFunction)>>( + 'strmode'); late final _strmode = _strmodePtr.asFunction)>(); @@ -19722,8 +20080,9 @@ class NativeCupertinoHttp { } late final _bzeroPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size)>>('bzero'); + ffi + .NativeFunction, ffi.Size)>>( + 'bzero'); late final _bzero = _bzeroPtr.asFunction, int)>(); @@ -19926,8 +20285,9 @@ class NativeCupertinoHttp { } late final _ctimePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctime'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'ctime'); late final _ctime = _ctimePtr .asFunction Function(ffi.Pointer)>(); @@ -19969,8 +20329,8 @@ class NativeCupertinoHttp { } late final _gmtimePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'gmtime'); + ffi + .NativeFunction Function(ffi.Pointer)>>('gmtime'); late final _gmtime = _gmtimePtr.asFunction Function(ffi.Pointer)>(); @@ -20217,8 +20577,9 @@ class NativeCupertinoHttp { } late final _clock_getresPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_getres'); + ffi + .NativeFunction)>>( + 'clock_getres'); late final _clock_getres = _clock_getresPtr.asFunction)>(); @@ -20233,8 +20594,9 @@ class NativeCupertinoHttp { } late final _clock_gettimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_gettime'); + ffi + .NativeFunction)>>( + 'clock_gettime'); late final _clock_gettime = _clock_gettimePtr.asFunction)>(); @@ -20263,8 +20625,9 @@ class NativeCupertinoHttp { } late final _clock_settimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_settime'); + ffi + .NativeFunction)>>( + 'clock_settime'); late final _clock_settime = _clock_settimePtr.asFunction)>(); @@ -20511,9 +20874,9 @@ class NativeCupertinoHttp { } late final _CFBagGetCountOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function( - CFBagRef, ffi.Pointer)>>('CFBagGetCountOfValue'); + ffi + .NativeFunction)>>( + 'CFBagGetCountOfValue'); late final _CFBagGetCountOfValue = _CFBagGetCountOfValuePtr.asFunction< int Function(CFBagRef, ffi.Pointer)>(); @@ -20528,9 +20891,9 @@ class NativeCupertinoHttp { } late final _CFBagContainsValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFBagRef, ffi.Pointer)>>('CFBagContainsValue'); + ffi + .NativeFunction)>>( + 'CFBagContainsValue'); late final _CFBagContainsValue = _CFBagContainsValuePtr.asFunction< int Function(CFBagRef, ffi.Pointer)>(); @@ -21131,9 +21494,9 @@ class NativeCupertinoHttp { } late final _CFBitVectorSetCountPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFIndex)>>('CFBitVectorSetCount'); + ffi + .NativeFunction>( + 'CFBitVectorSetCount'); late final _CFBitVectorSetCount = _CFBitVectorSetCountPtr.asFunction< void Function(CFMutableBitVectorRef, int)>(); @@ -21148,9 +21511,9 @@ class NativeCupertinoHttp { } late final _CFBitVectorFlipBitAtIndexPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFIndex)>>('CFBitVectorFlipBitAtIndex'); + ffi + .NativeFunction>( + 'CFBitVectorFlipBitAtIndex'); late final _CFBitVectorFlipBitAtIndex = _CFBitVectorFlipBitAtIndexPtr .asFunction(); @@ -21165,9 +21528,9 @@ class NativeCupertinoHttp { } late final _CFBitVectorFlipBitsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFRange)>>('CFBitVectorFlipBits'); + ffi + .NativeFunction>( + 'CFBitVectorFlipBits'); late final _CFBitVectorFlipBits = _CFBitVectorFlipBitsPtr.asFunction< void Function(CFMutableBitVectorRef, CFRange)>(); @@ -22073,9 +22436,9 @@ class NativeCupertinoHttp { } late final _CFLocaleCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFLocaleRef Function( - CFAllocatorRef, CFLocaleRef)>>('CFLocaleCreateCopy'); + ffi + .NativeFunction>( + 'CFLocaleCreateCopy'); late final _CFLocaleCreateCopy = _CFLocaleCreateCopyPtr.asFunction< CFLocaleRef Function(CFAllocatorRef, CFLocaleRef)>(); @@ -22467,8 +22830,9 @@ class NativeCupertinoHttp { } late final _CFDateCreatePtr = _lookup< - ffi.NativeFunction< - CFDateRef Function(CFAllocatorRef, CFAbsoluteTime)>>('CFDateCreate'); + ffi + .NativeFunction>( + 'CFDateCreate'); late final _CFDateCreate = _CFDateCreatePtr.asFunction(); @@ -22745,9 +23109,9 @@ class NativeCupertinoHttp { } late final _CFDataCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableDataRef Function( - CFAllocatorRef, CFIndex)>>('CFDataCreateMutable'); + ffi + .NativeFunction>( + 'CFDataCreateMutable'); late final _CFDataCreateMutable = _CFDataCreateMutablePtr.asFunction< CFMutableDataRef Function(CFAllocatorRef, int)>(); @@ -22975,9 +23339,9 @@ class NativeCupertinoHttp { } late final _CFCharacterSetCreateWithCharactersInRangePtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFRange)>>('CFCharacterSetCreateWithCharactersInRange'); + ffi + .NativeFunction>( + 'CFCharacterSetCreateWithCharactersInRange'); late final _CFCharacterSetCreateWithCharactersInRange = _CFCharacterSetCreateWithCharactersInRangePtr.asFunction< CFCharacterSetRef Function(CFAllocatorRef, CFRange)>(); @@ -23079,9 +23443,9 @@ class NativeCupertinoHttp { } late final _CFCharacterSetCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableCharacterSetRef Function( - CFAllocatorRef)>>('CFCharacterSetCreateMutable'); + ffi + .NativeFunction>( + 'CFCharacterSetCreateMutable'); late final _CFCharacterSetCreateMutable = _CFCharacterSetCreateMutablePtr .asFunction(); @@ -23776,9 +24140,9 @@ class NativeCupertinoHttp { } late final _CFStringCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef)>>('CFStringCreateCopy'); + ffi + .NativeFunction>( + 'CFStringCreateCopy'); late final _CFStringCreateCopy = _CFStringCreateCopyPtr.asFunction< CFStringRef Function(CFAllocatorRef, CFStringRef)>(); @@ -24685,9 +25049,9 @@ class NativeCupertinoHttp { } late final _CFStringAppendPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFStringRef)>>('CFStringAppend'); + ffi + .NativeFunction>( + 'CFStringAppend'); late final _CFStringAppend = _CFStringAppendPtr.asFunction< void Function(CFMutableStringRef, CFStringRef)>(); @@ -24856,9 +25220,9 @@ class NativeCupertinoHttp { } late final _CFStringReplaceAllPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFStringRef)>>('CFStringReplaceAll'); + ffi + .NativeFunction>( + 'CFStringReplaceAll'); late final _CFStringReplaceAll = _CFStringReplaceAllPtr.asFunction< void Function(CFMutableStringRef, CFStringRef)>(); @@ -24940,8 +25304,9 @@ class NativeCupertinoHttp { } late final _CFStringTrimPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFStringRef)>>('CFStringTrim'); + ffi + .NativeFunction>( + 'CFStringTrim'); late final _CFStringTrim = _CFStringTrimPtr.asFunction< void Function(CFMutableStringRef, CFStringRef)>(); @@ -24970,9 +25335,9 @@ class NativeCupertinoHttp { } late final _CFStringLowercasePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFLocaleRef)>>('CFStringLowercase'); + ffi + .NativeFunction>( + 'CFStringLowercase'); late final _CFStringLowercase = _CFStringLowercasePtr.asFunction< void Function(CFMutableStringRef, CFLocaleRef)>(); @@ -24987,9 +25352,9 @@ class NativeCupertinoHttp { } late final _CFStringUppercasePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFLocaleRef)>>('CFStringUppercase'); + ffi + .NativeFunction>( + 'CFStringUppercase'); late final _CFStringUppercase = _CFStringUppercasePtr.asFunction< void Function(CFMutableStringRef, CFLocaleRef)>(); @@ -25004,9 +25369,9 @@ class NativeCupertinoHttp { } late final _CFStringCapitalizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFLocaleRef)>>('CFStringCapitalize'); + ffi + .NativeFunction>( + 'CFStringCapitalize'); late final _CFStringCapitalize = _CFStringCapitalizePtr.asFunction< void Function(CFMutableStringRef, CFLocaleRef)>(); @@ -25593,9 +25958,9 @@ class NativeCupertinoHttp { } late final _CFTimeZoneCopyAbbreviationPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneCopyAbbreviation'); + ffi + .NativeFunction>( + 'CFTimeZoneCopyAbbreviation'); late final _CFTimeZoneCopyAbbreviation = _CFTimeZoneCopyAbbreviationPtr .asFunction(); @@ -26195,9 +26560,9 @@ class NativeCupertinoHttp { } late final _CFDateFormatterSetFormatPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFDateFormatterRef, CFStringRef)>>('CFDateFormatterSetFormat'); + ffi + .NativeFunction>( + 'CFDateFormatterSetFormat'); late final _CFDateFormatterSetFormat = _CFDateFormatterSetFormatPtr .asFunction(); @@ -28671,9 +29036,9 @@ class NativeCupertinoHttp { } late final _CFURLSetTemporaryResourcePropertyForKeyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFURLRef, CFStringRef, - CFTypeRef)>>('CFURLSetTemporaryResourcePropertyForKey'); + ffi + .NativeFunction>( + 'CFURLSetTemporaryResourcePropertyForKey'); late final _CFURLSetTemporaryResourcePropertyForKey = _CFURLSetTemporaryResourcePropertyForKeyPtr.asFunction< void Function(CFURLRef, CFStringRef, CFTypeRef)>(); @@ -28689,9 +29054,9 @@ class NativeCupertinoHttp { } late final _CFURLResourceIsReachablePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFURLRef, ffi.Pointer)>>('CFURLResourceIsReachable'); + ffi + .NativeFunction)>>( + 'CFURLResourceIsReachable'); late final _CFURLResourceIsReachable = _CFURLResourceIsReachablePtr .asFunction)>(); @@ -32061,8 +32426,9 @@ class NativeCupertinoHttp { } late final _pathconfPtr = _lookup< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Int)>>('pathconf'); + ffi + .NativeFunction, ffi.Int)>>( + 'pathconf'); late final _pathconf = _pathconfPtr.asFunction, int)>(); @@ -32403,8 +32769,9 @@ class NativeCupertinoHttp { } late final _encryptPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int)>>('encrypt'); + ffi + .NativeFunction, ffi.Int)>>( + 'encrypt'); late final _encrypt = _encryptPtr.asFunction, int)>(); @@ -32731,8 +33098,9 @@ class NativeCupertinoHttp { } late final _getlogin_rPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('getlogin_r'); + ffi + .NativeFunction, ffi.Size)>>( + 'getlogin_r'); late final _getlogin_r = _getlogin_rPtr.asFunction, int)>(); @@ -32764,8 +33132,9 @@ class NativeCupertinoHttp { } late final _gethostnamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('gethostname'); + ffi + .NativeFunction, ffi.Size)>>( + 'gethostname'); late final _gethostname = _gethostnamePtr.asFunction, int)>(); @@ -34747,9 +35116,9 @@ class NativeCupertinoHttp { } late final _dispatch_get_contextPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - dispatch_object_t)>>('dispatch_get_context'); + ffi + .NativeFunction Function(dispatch_object_t)>>( + 'dispatch_get_context'); late final _dispatch_get_context = _dispatch_get_contextPtr .asFunction Function(dispatch_object_t)>(); @@ -36037,9 +36406,9 @@ class NativeCupertinoHttp { } late final _dispatch_source_merge_dataPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_source_t, ffi.UintPtr)>>('dispatch_source_merge_data'); + ffi + .NativeFunction>( + 'dispatch_source_merge_data'); late final _dispatch_source_merge_data = _dispatch_source_merge_dataPtr .asFunction(); @@ -36684,9 +37053,9 @@ class NativeCupertinoHttp { } late final _dispatch_io_barrierPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_io_t, dispatch_block_t)>>('dispatch_io_barrier'); + ffi + .NativeFunction>( + 'dispatch_io_barrier'); late final _dispatch_io_barrier = _dispatch_io_barrierPtr .asFunction(); @@ -36764,9 +37133,9 @@ class NativeCupertinoHttp { } late final _dispatch_workloop_createPtr = _lookup< - ffi.NativeFunction< - dispatch_workloop_t Function( - ffi.Pointer)>>('dispatch_workloop_create'); + ffi + .NativeFunction)>>( + 'dispatch_workloop_create'); late final _dispatch_workloop_create = _dispatch_workloop_createPtr .asFunction)>(); @@ -36779,9 +37148,9 @@ class NativeCupertinoHttp { } late final _dispatch_workloop_create_inactivePtr = _lookup< - ffi.NativeFunction< - dispatch_workloop_t Function( - ffi.Pointer)>>('dispatch_workloop_create_inactive'); + ffi + .NativeFunction)>>( + 'dispatch_workloop_create_inactive'); late final _dispatch_workloop_create_inactive = _dispatch_workloop_create_inactivePtr .asFunction)>(); @@ -36797,9 +37166,9 @@ class NativeCupertinoHttp { } late final _dispatch_workloop_set_autorelease_frequencyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_workloop_t, - ffi.Int32)>>('dispatch_workloop_set_autorelease_frequency'); + ffi + .NativeFunction>( + 'dispatch_workloop_set_autorelease_frequency'); late final _dispatch_workloop_set_autorelease_frequency = _dispatch_workloop_set_autorelease_frequencyPtr .asFunction(); @@ -36922,9 +37291,9 @@ class NativeCupertinoHttp { } late final _CFReadStreamCreateWithFilePtr = _lookup< - ffi.NativeFunction< - CFReadStreamRef Function( - CFAllocatorRef, CFURLRef)>>('CFReadStreamCreateWithFile'); + ffi + .NativeFunction>( + 'CFReadStreamCreateWithFile'); late final _CFReadStreamCreateWithFile = _CFReadStreamCreateWithFilePtr .asFunction(); @@ -36939,9 +37308,9 @@ class NativeCupertinoHttp { } late final _CFWriteStreamCreateWithFilePtr = _lookup< - ffi.NativeFunction< - CFWriteStreamRef Function( - CFAllocatorRef, CFURLRef)>>('CFWriteStreamCreateWithFile'); + ffi + .NativeFunction>( + 'CFWriteStreamCreateWithFile'); late final _CFWriteStreamCreateWithFile = _CFWriteStreamCreateWithFilePtr .asFunction(); @@ -38112,9 +38481,9 @@ class NativeCupertinoHttp { } late final _CFSetGetCountOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function( - CFSetRef, ffi.Pointer)>>('CFSetGetCountOfValue'); + ffi + .NativeFunction)>>( + 'CFSetGetCountOfValue'); late final _CFSetGetCountOfValue = _CFSetGetCountOfValuePtr.asFunction< int Function(CFSetRef, ffi.Pointer)>(); @@ -38129,9 +38498,9 @@ class NativeCupertinoHttp { } late final _CFSetContainsValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFSetRef, ffi.Pointer)>>('CFSetContainsValue'); + ffi + .NativeFunction)>>( + 'CFSetContainsValue'); late final _CFSetContainsValue = _CFSetContainsValuePtr.asFunction< int Function(CFSetRef, ffi.Pointer)>(); @@ -40465,9 +40834,9 @@ class NativeCupertinoHttp { } late final _CFPlugInInstanceGetInstanceDataPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFPlugInInstanceRef)>>('CFPlugInInstanceGetInstanceData'); + ffi + .NativeFunction Function(CFPlugInInstanceRef)>>( + 'CFPlugInInstanceGetInstanceData'); late final _CFPlugInInstanceGetInstanceData = _CFPlugInInstanceGetInstanceDataPtr.asFunction< ffi.Pointer Function(CFPlugInInstanceRef)>(); @@ -41510,9 +41879,9 @@ class NativeCupertinoHttp { } late final _acl_maximal_permset_mask_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer)>>('acl_maximal_permset_mask_np'); + ffi + .NativeFunction)>>( + 'acl_maximal_permset_mask_np'); late final _acl_maximal_permset_mask_np = _acl_maximal_permset_mask_npPtr .asFunction)>(); @@ -41544,9 +41913,9 @@ class NativeCupertinoHttp { } late final _acl_set_permset_mask_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - acl_entry_t, acl_permset_mask_t)>>('acl_set_permset_mask_np'); + ffi + .NativeFunction>( + 'acl_set_permset_mask_np'); late final _acl_set_permset_mask_np = _acl_set_permset_mask_npPtr.asFunction(); @@ -42304,9 +42673,9 @@ class NativeCupertinoHttp { } late final _CFStringTokenizerGoToTokenAtIndexPtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(CFStringTokenizerRef, - CFIndex)>>('CFStringTokenizerGoToTokenAtIndex'); + ffi + .NativeFunction>( + 'CFStringTokenizerGoToTokenAtIndex'); late final _CFStringTokenizerGoToTokenAtIndex = _CFStringTokenizerGoToTokenAtIndexPtr.asFunction< int Function(CFStringTokenizerRef, int)>(); @@ -42985,9 +43354,9 @@ class NativeCupertinoHttp { } late final _CFXMLNodeCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFXMLNodeRef Function( - CFAllocatorRef, CFXMLNodeRef)>>('CFXMLNodeCreateCopy'); + ffi + .NativeFunction>( + 'CFXMLNodeCreateCopy'); late final _CFXMLNodeCreateCopy = _CFXMLNodeCreateCopyPtr.asFunction< CFXMLNodeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); @@ -43058,9 +43427,9 @@ class NativeCupertinoHttp { } late final _CFXMLTreeCreateWithNodePtr = _lookup< - ffi.NativeFunction< - CFXMLTreeRef Function( - CFAllocatorRef, CFXMLNodeRef)>>('CFXMLTreeCreateWithNode'); + ffi + .NativeFunction>( + 'CFXMLTreeCreateWithNode'); late final _CFXMLTreeCreateWithNode = _CFXMLTreeCreateWithNodePtr.asFunction< CFXMLTreeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); @@ -44089,8 +44458,9 @@ class NativeCupertinoHttp { } late final _cssmAlgToOidPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(CSSM_ALGORITHMS)>>('cssmAlgToOid'); + ffi + .NativeFunction Function(CSSM_ALGORITHMS)>>( + 'cssmAlgToOid'); late final _cssmAlgToOid = _cssmAlgToOidPtr.asFunction Function(int)>(); @@ -44481,9 +44851,9 @@ class NativeCupertinoHttp { } late final _SecCertificateGetDataPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecCertificateRef, CSSM_DATA_PTR)>>('SecCertificateGetData'); + ffi + .NativeFunction>( + 'SecCertificateGetData'); late final _SecCertificateGetData = _SecCertificateGetDataPtr.asFunction< int Function(SecCertificateRef, CSSM_DATA_PTR)>(); @@ -44612,9 +44982,9 @@ class NativeCupertinoHttp { } late final _SecCertificateCopyPreferredPtr = _lookup< - ffi.NativeFunction< - SecCertificateRef Function( - CFStringRef, CFArrayRef)>>('SecCertificateCopyPreferred'); + ffi + .NativeFunction>( + 'SecCertificateCopyPreferred'); late final _SecCertificateCopyPreferred = _SecCertificateCopyPreferredPtr .asFunction(); @@ -45117,9 +45487,9 @@ class NativeCupertinoHttp { } late final _sec_identity_create_with_certificatesPtr = _lookup< - ffi.NativeFunction< - sec_identity_t Function(SecIdentityRef, - CFArrayRef)>>('sec_identity_create_with_certificates'); + ffi + .NativeFunction>( + 'sec_identity_create_with_certificates'); late final _sec_identity_create_with_certificates = _sec_identity_create_with_certificatesPtr .asFunction(); @@ -45224,8 +45594,8 @@ class NativeCupertinoHttp { } late final _sec_protocol_metadata_copy_peer_public_keyPtr = _lookup< - ffi.NativeFunction< - dispatch_data_t Function(sec_protocol_metadata_t)>>( + ffi + .NativeFunction>( 'sec_protocol_metadata_copy_peer_public_key'); late final _sec_protocol_metadata_copy_peer_public_key = _sec_protocol_metadata_copy_peer_public_keyPtr @@ -45903,9 +46273,9 @@ class NativeCupertinoHttp { } late final _sec_protocol_options_set_tls_tickets_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_tickets_enabled'); + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_tickets_enabled'); late final _sec_protocol_options_set_tls_tickets_enabled = _sec_protocol_options_set_tls_tickets_enabledPtr .asFunction(); @@ -45921,9 +46291,9 @@ class NativeCupertinoHttp { } late final _sec_protocol_options_set_tls_is_fallback_attemptPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_is_fallback_attempt'); + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_is_fallback_attempt'); late final _sec_protocol_options_set_tls_is_fallback_attempt = _sec_protocol_options_set_tls_is_fallback_attemptPtr .asFunction(); @@ -45939,9 +46309,9 @@ class NativeCupertinoHttp { } late final _sec_protocol_options_set_tls_resumption_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_resumption_enabled'); + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_resumption_enabled'); late final _sec_protocol_options_set_tls_resumption_enabled = _sec_protocol_options_set_tls_resumption_enabledPtr .asFunction(); @@ -45957,9 +46327,9 @@ class NativeCupertinoHttp { } late final _sec_protocol_options_set_tls_false_start_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_false_start_enabled'); + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_false_start_enabled'); late final _sec_protocol_options_set_tls_false_start_enabled = _sec_protocol_options_set_tls_false_start_enabledPtr .asFunction(); @@ -45975,9 +46345,9 @@ class NativeCupertinoHttp { } late final _sec_protocol_options_set_tls_ocsp_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_ocsp_enabled'); + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_ocsp_enabled'); late final _sec_protocol_options_set_tls_ocsp_enabled = _sec_protocol_options_set_tls_ocsp_enabledPtr .asFunction(); @@ -45993,9 +46363,9 @@ class NativeCupertinoHttp { } late final _sec_protocol_options_set_tls_sct_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_sct_enabled'); + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_sct_enabled'); late final _sec_protocol_options_set_tls_sct_enabled = _sec_protocol_options_set_tls_sct_enabledPtr .asFunction(); @@ -46011,9 +46381,9 @@ class NativeCupertinoHttp { } late final _sec_protocol_options_set_tls_renegotiation_enabledPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_tls_renegotiation_enabled'); + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_renegotiation_enabled'); late final _sec_protocol_options_set_tls_renegotiation_enabled = _sec_protocol_options_set_tls_renegotiation_enabledPtr .asFunction(); @@ -46086,9 +46456,9 @@ class NativeCupertinoHttp { } late final _sec_protocol_options_set_quic_use_legacy_codepointPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Bool)>>('sec_protocol_options_set_quic_use_legacy_codepoint'); + ffi + .NativeFunction>( + 'sec_protocol_options_set_quic_use_legacy_codepoint'); late final _sec_protocol_options_set_quic_use_legacy_codepoint = _sec_protocol_options_set_quic_use_legacy_codepointPtr .asFunction(); @@ -46574,9 +46944,9 @@ class NativeCupertinoHttp { } late final _SSLSetConnectionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, SSLConnectionRef)>>('SSLSetConnection'); + ffi + .NativeFunction>( + 'SSLSetConnection'); late final _SSLSetConnection = _SSLSetConnectionPtr.asFunction< int Function(SSLContextRef, SSLConnectionRef)>(); @@ -47518,21 +47888,21 @@ class NativeCupertinoHttp { late final _class_NSURLSession1 = _getClass1("NSURLSession"); late final _sel_sharedSession1 = _registerName1("sharedSession"); - ffi.Pointer _objc_msgSend_395( + ffi.Pointer _objc_msgSend_408( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_395( + return __objc_msgSend_408( obj, sel, ); } - late final __objc_msgSend_395Ptr = _lookup< + late final __objc_msgSend_408Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< + late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -47540,21 +47910,21 @@ class NativeCupertinoHttp { _getClass1("NSURLSessionConfiguration"); late final _sel_defaultSessionConfiguration1 = _registerName1("defaultSessionConfiguration"); - ffi.Pointer _objc_msgSend_396( + ffi.Pointer _objc_msgSend_409( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_396( + return __objc_msgSend_409( obj, sel, ); } - late final __objc_msgSend_396Ptr = _lookup< + late final __objc_msgSend_409Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< + late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -47562,23 +47932,23 @@ class NativeCupertinoHttp { _registerName1("ephemeralSessionConfiguration"); late final _sel_backgroundSessionConfigurationWithIdentifier_1 = _registerName1("backgroundSessionConfigurationWithIdentifier:"); - ffi.Pointer _objc_msgSend_397( + ffi.Pointer _objc_msgSend_410( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer identifier, ) { - return __objc_msgSend_397( + return __objc_msgSend_410( obj, sel, identifier, ); } - late final __objc_msgSend_397Ptr = _lookup< + late final __objc_msgSend_410Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< + late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47614,42 +47984,42 @@ class NativeCupertinoHttp { _registerName1("setConnectionProxyDictionary:"); late final _sel_TLSMinimumSupportedProtocol1 = _registerName1("TLSMinimumSupportedProtocol"); - int _objc_msgSend_398( + int _objc_msgSend_411( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_398( + return __objc_msgSend_411( obj, sel, ); } - late final __objc_msgSend_398Ptr = _lookup< + late final __objc_msgSend_411Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< + late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setTLSMinimumSupportedProtocol_1 = _registerName1("setTLSMinimumSupportedProtocol:"); - void _objc_msgSend_399( + void _objc_msgSend_412( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_399( + return __objc_msgSend_412( obj, sel, value, ); } - late final __objc_msgSend_399Ptr = _lookup< + late final __objc_msgSend_412Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< + late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_TLSMaximumSupportedProtocol1 = @@ -47658,42 +48028,42 @@ class NativeCupertinoHttp { _registerName1("setTLSMaximumSupportedProtocol:"); late final _sel_TLSMinimumSupportedProtocolVersion1 = _registerName1("TLSMinimumSupportedProtocolVersion"); - int _objc_msgSend_400( + int _objc_msgSend_413( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_400( + return __objc_msgSend_413( obj, sel, ); } - late final __objc_msgSend_400Ptr = _lookup< + late final __objc_msgSend_413Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< + late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setTLSMinimumSupportedProtocolVersion_1 = _registerName1("setTLSMinimumSupportedProtocolVersion:"); - void _objc_msgSend_401( + void _objc_msgSend_414( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_401( + return __objc_msgSend_414( obj, sel, value, ); } - late final __objc_msgSend_401Ptr = _lookup< + late final __objc_msgSend_414Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< + late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_TLSMaximumSupportedProtocolVersion1 = @@ -47719,23 +48089,23 @@ class NativeCupertinoHttp { late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); late final _sel_setHTTPCookieStorage_1 = _registerName1("setHTTPCookieStorage:"); - void _objc_msgSend_402( + void _objc_msgSend_415( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_402( + return __objc_msgSend_415( obj, sel, value, ); } - late final __objc_msgSend_402Ptr = _lookup< + late final __objc_msgSend_415Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< + late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47743,187 +48113,148 @@ class NativeCupertinoHttp { _getClass1("NSURLCredentialStorage"); late final _sel_URLCredentialStorage1 = _registerName1("URLCredentialStorage"); - ffi.Pointer _objc_msgSend_403( + ffi.Pointer _objc_msgSend_416( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_403( + return __objc_msgSend_416( obj, sel, ); } - late final __objc_msgSend_403Ptr = _lookup< + late final __objc_msgSend_416Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< + late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setURLCredentialStorage_1 = _registerName1("setURLCredentialStorage:"); - void _objc_msgSend_404( + void _objc_msgSend_417( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_404( + return __objc_msgSend_417( obj, sel, value, ); } - late final __objc_msgSend_404Ptr = _lookup< + late final __objc_msgSend_417Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< + late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _class_NSURLCache1 = _getClass1("NSURLCache"); late final _sel_URLCache1 = _registerName1("URLCache"); - ffi.Pointer _objc_msgSend_405( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_405( - obj, - sel, - ); - } - - late final __objc_msgSend_405Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - late final _sel_setURLCache_1 = _registerName1("setURLCache:"); - void _objc_msgSend_406( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_406( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_406Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - late final _sel_shouldUseExtendedBackgroundIdleMode1 = _registerName1("shouldUseExtendedBackgroundIdleMode"); late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = _registerName1("setShouldUseExtendedBackgroundIdleMode:"); late final _sel_protocolClasses1 = _registerName1("protocolClasses"); late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); - void _objc_msgSend_407( + void _objc_msgSend_418( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_407( + return __objc_msgSend_418( obj, sel, value, ); } - late final __objc_msgSend_407Ptr = _lookup< + late final __objc_msgSend_418Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< + late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_multipathServiceType1 = _registerName1("multipathServiceType"); - int _objc_msgSend_408( + int _objc_msgSend_419( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_408( + return __objc_msgSend_419( obj, sel, ); } - late final __objc_msgSend_408Ptr = _lookup< + late final __objc_msgSend_419Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< + late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setMultipathServiceType_1 = _registerName1("setMultipathServiceType:"); - void _objc_msgSend_409( + void _objc_msgSend_420( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_409( + return __objc_msgSend_420( obj, sel, value, ); } - late final __objc_msgSend_409Ptr = _lookup< + late final __objc_msgSend_420Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< + late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_backgroundSessionConfiguration_1 = _registerName1("backgroundSessionConfiguration:"); late final _sel_sessionWithConfiguration_1 = _registerName1("sessionWithConfiguration:"); - ffi.Pointer _objc_msgSend_410( + ffi.Pointer _objc_msgSend_421( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer configuration, ) { - return __objc_msgSend_410( + return __objc_msgSend_421( obj, sel, configuration, ); } - late final __objc_msgSend_410Ptr = _lookup< + late final __objc_msgSend_421Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< + late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); - ffi.Pointer _objc_msgSend_411( + ffi.Pointer _objc_msgSend_422( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer configuration, ffi.Pointer delegate, ffi.Pointer queue, ) { - return __objc_msgSend_411( + return __objc_msgSend_422( obj, sel, configuration, @@ -47932,7 +48263,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_411Ptr = _lookup< + late final __objc_msgSend_422Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -47940,7 +48271,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< + late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -47962,89 +48293,88 @@ class NativeCupertinoHttp { _registerName1("flushWithCompletionHandler:"); late final _sel_getTasksWithCompletionHandler_1 = _registerName1("getTasksWithCompletionHandler:"); - void _objc_msgSend_412( + void _objc_msgSend_423( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_412( + return __objc_msgSend_423( obj, sel, completionHandler, ); } - late final __objc_msgSend_412Ptr = _lookup< + late final __objc_msgSend_423Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< + late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_getAllTasksWithCompletionHandler_1 = _registerName1("getAllTasksWithCompletionHandler:"); - void _objc_msgSend_413( + void _objc_msgSend_424( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_413( + return __objc_msgSend_424( obj, sel, completionHandler, ); } - late final __objc_msgSend_413Ptr = _lookup< + late final __objc_msgSend_424Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< + late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); late final _sel_dataTaskWithRequest_1 = _registerName1("dataTaskWithRequest:"); - ffi.Pointer _objc_msgSend_414( + ffi.Pointer _objc_msgSend_425( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_414( + return __objc_msgSend_425( obj, sel, request, ); } - late final __objc_msgSend_414Ptr = _lookup< + late final __objc_msgSend_425Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< + late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); - ffi.Pointer _objc_msgSend_415( + ffi.Pointer _objc_msgSend_426( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_415( + return __objc_msgSend_426( obj, sel, url, ); } - late final __objc_msgSend_415Ptr = _lookup< + late final __objc_msgSend_426Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< + late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -48052,13 +48382,13 @@ class NativeCupertinoHttp { _getClass1("NSURLSessionUploadTask"); late final _sel_uploadTaskWithRequest_fromFile_1 = _registerName1("uploadTaskWithRequest:fromFile:"); - ffi.Pointer _objc_msgSend_416( + ffi.Pointer _objc_msgSend_427( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer fileURL, ) { - return __objc_msgSend_416( + return __objc_msgSend_427( obj, sel, request, @@ -48066,14 +48396,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_416Ptr = _lookup< + late final __objc_msgSend_427Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< + late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48082,13 +48412,13 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithRequest_fromData_1 = _registerName1("uploadTaskWithRequest:fromData:"); - ffi.Pointer _objc_msgSend_417( + ffi.Pointer _objc_msgSend_428( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer bodyData, ) { - return __objc_msgSend_417( + return __objc_msgSend_428( obj, sel, request, @@ -48096,14 +48426,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_417Ptr = _lookup< + late final __objc_msgSend_428Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< + late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48112,23 +48442,23 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithStreamedRequest_1 = _registerName1("uploadTaskWithStreamedRequest:"); - ffi.Pointer _objc_msgSend_418( + ffi.Pointer _objc_msgSend_429( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_418( + return __objc_msgSend_429( obj, sel, request, ); } - late final __objc_msgSend_418Ptr = _lookup< + late final __objc_msgSend_429Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< + late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -48136,89 +48466,89 @@ class NativeCupertinoHttp { _getClass1("NSURLSessionDownloadTask"); late final _sel_cancelByProducingResumeData_1 = _registerName1("cancelByProducingResumeData:"); - void _objc_msgSend_419( + void _objc_msgSend_430( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_419( + return __objc_msgSend_430( obj, sel, completionHandler, ); } - late final __objc_msgSend_419Ptr = _lookup< + late final __objc_msgSend_430Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< + late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_downloadTaskWithRequest_1 = _registerName1("downloadTaskWithRequest:"); - ffi.Pointer _objc_msgSend_420( + ffi.Pointer _objc_msgSend_431( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_420( + return __objc_msgSend_431( obj, sel, request, ); } - late final __objc_msgSend_420Ptr = _lookup< + late final __objc_msgSend_431Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< + late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_downloadTaskWithURL_1 = _registerName1("downloadTaskWithURL:"); - ffi.Pointer _objc_msgSend_421( + ffi.Pointer _objc_msgSend_432( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_421( + return __objc_msgSend_432( obj, sel, url, ); } - late final __objc_msgSend_421Ptr = _lookup< + late final __objc_msgSend_432Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< + late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_downloadTaskWithResumeData_1 = _registerName1("downloadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_422( + ffi.Pointer _objc_msgSend_433( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer resumeData, ) { - return __objc_msgSend_422( + return __objc_msgSend_433( obj, sel, resumeData, ); } - late final __objc_msgSend_422Ptr = _lookup< + late final __objc_msgSend_433Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< + late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -48227,7 +48557,7 @@ class NativeCupertinoHttp { late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = _registerName1( "readDataOfMinLength:maxLength:timeout:completionHandler:"); - void _objc_msgSend_423( + void _objc_msgSend_434( ffi.Pointer obj, ffi.Pointer sel, int minBytes, @@ -48235,7 +48565,7 @@ class NativeCupertinoHttp { double timeout, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_423( + return __objc_msgSend_434( obj, sel, minBytes, @@ -48245,7 +48575,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_423Ptr = _lookup< + late final __objc_msgSend_434Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48254,20 +48584,20 @@ class NativeCupertinoHttp { NSUInteger, NSTimeInterval, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< + late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, int, double, ffi.Pointer<_ObjCBlock>)>(); late final _sel_writeData_timeout_completionHandler_1 = _registerName1("writeData:timeout:completionHandler:"); - void _objc_msgSend_424( + void _objc_msgSend_435( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, double timeout, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_424( + return __objc_msgSend_435( obj, sel, data, @@ -48276,7 +48606,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_424Ptr = _lookup< + late final __objc_msgSend_435Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48284,7 +48614,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSTimeInterval, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< + late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); @@ -48297,13 +48627,13 @@ class NativeCupertinoHttp { _registerName1("stopSecureConnection"); late final _sel_streamTaskWithHostName_port_1 = _registerName1("streamTaskWithHostName:port:"); - ffi.Pointer _objc_msgSend_425( + ffi.Pointer _objc_msgSend_436( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer hostname, int port, ) { - return __objc_msgSend_425( + return __objc_msgSend_436( obj, sel, hostname, @@ -48311,37 +48641,37 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_425Ptr = _lookup< + late final __objc_msgSend_436Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< + late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _class_NSNetService1 = _getClass1("NSNetService"); late final _sel_streamTaskWithNetService_1 = _registerName1("streamTaskWithNetService:"); - ffi.Pointer _objc_msgSend_426( + ffi.Pointer _objc_msgSend_437( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer service, ) { - return __objc_msgSend_426( + return __objc_msgSend_437( obj, sel, service, ); } - late final __objc_msgSend_426Ptr = _lookup< + late final __objc_msgSend_437Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< + late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -48350,32 +48680,32 @@ class NativeCupertinoHttp { late final _class_NSURLSessionWebSocketMessage1 = _getClass1("NSURLSessionWebSocketMessage"); late final _sel_type1 = _registerName1("type"); - int _objc_msgSend_427( + int _objc_msgSend_438( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_427( + return __objc_msgSend_438( obj, sel, ); } - late final __objc_msgSend_427Ptr = _lookup< + late final __objc_msgSend_438Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< + late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_sendMessage_completionHandler_1 = _registerName1("sendMessage:completionHandler:"); - void _objc_msgSend_428( + void _objc_msgSend_439( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer message, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_428( + return __objc_msgSend_439( obj, sel, message, @@ -48383,70 +48713,70 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_428Ptr = _lookup< + late final __objc_msgSend_439Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< + late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_receiveMessageWithCompletionHandler_1 = _registerName1("receiveMessageWithCompletionHandler:"); - void _objc_msgSend_429( + void _objc_msgSend_440( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_429( + return __objc_msgSend_440( obj, sel, completionHandler, ); } - late final __objc_msgSend_429Ptr = _lookup< + late final __objc_msgSend_440Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< + late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_sendPingWithPongReceiveHandler_1 = _registerName1("sendPingWithPongReceiveHandler:"); - void _objc_msgSend_430( + void _objc_msgSend_441( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> pongReceiveHandler, ) { - return __objc_msgSend_430( + return __objc_msgSend_441( obj, sel, pongReceiveHandler, ); } - late final __objc_msgSend_430Ptr = _lookup< + late final __objc_msgSend_441Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< + late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_cancelWithCloseCode_reason_1 = _registerName1("cancelWithCloseCode:reason:"); - void _objc_msgSend_431( + void _objc_msgSend_442( ffi.Pointer obj, ffi.Pointer sel, int closeCode, ffi.Pointer reason, ) { - return __objc_msgSend_431( + return __objc_msgSend_442( obj, sel, closeCode, @@ -48454,11 +48784,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_431Ptr = _lookup< + late final __objc_msgSend_442Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< + late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); @@ -48466,55 +48796,55 @@ class NativeCupertinoHttp { late final _sel_setMaximumMessageSize_1 = _registerName1("setMaximumMessageSize:"); late final _sel_closeCode1 = _registerName1("closeCode"); - int _objc_msgSend_432( + int _objc_msgSend_443( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_432( + return __objc_msgSend_443( obj, sel, ); } - late final __objc_msgSend_432Ptr = _lookup< + late final __objc_msgSend_443Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< + late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_closeReason1 = _registerName1("closeReason"); late final _sel_webSocketTaskWithURL_1 = _registerName1("webSocketTaskWithURL:"); - ffi.Pointer _objc_msgSend_433( + ffi.Pointer _objc_msgSend_444( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_433( + return __objc_msgSend_444( obj, sel, url, ); } - late final __objc_msgSend_433Ptr = _lookup< + late final __objc_msgSend_444Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< + late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_webSocketTaskWithURL_protocols_1 = _registerName1("webSocketTaskWithURL:protocols:"); - ffi.Pointer _objc_msgSend_434( + ffi.Pointer _objc_msgSend_445( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer protocols, ) { - return __objc_msgSend_434( + return __objc_msgSend_445( obj, sel, url, @@ -48522,14 +48852,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_434Ptr = _lookup< + late final __objc_msgSend_445Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< + late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48538,35 +48868,35 @@ class NativeCupertinoHttp { late final _sel_webSocketTaskWithRequest_1 = _registerName1("webSocketTaskWithRequest:"); - ffi.Pointer _objc_msgSend_435( + ffi.Pointer _objc_msgSend_446( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_435( + return __objc_msgSend_446( obj, sel, request, ); } - late final __objc_msgSend_435Ptr = _lookup< + late final __objc_msgSend_446Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< + late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dataTaskWithRequest_completionHandler_1 = _registerName1("dataTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_436( + ffi.Pointer _objc_msgSend_447( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_436( + return __objc_msgSend_447( obj, sel, request, @@ -48574,14 +48904,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_436Ptr = _lookup< + late final __objc_msgSend_447Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< + late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48590,13 +48920,13 @@ class NativeCupertinoHttp { late final _sel_dataTaskWithURL_completionHandler_1 = _registerName1("dataTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_437( + ffi.Pointer _objc_msgSend_448( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_437( + return __objc_msgSend_448( obj, sel, url, @@ -48604,14 +48934,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_437Ptr = _lookup< + late final __objc_msgSend_448Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< + late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48620,14 +48950,14 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); - ffi.Pointer _objc_msgSend_438( + ffi.Pointer _objc_msgSend_449( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer fileURL, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_438( + return __objc_msgSend_449( obj, sel, request, @@ -48636,7 +48966,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_438Ptr = _lookup< + late final __objc_msgSend_449Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -48644,7 +48974,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< + late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48654,14 +48984,14 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); - ffi.Pointer _objc_msgSend_439( + ffi.Pointer _objc_msgSend_450( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer bodyData, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_439( + return __objc_msgSend_450( obj, sel, request, @@ -48670,7 +49000,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_439Ptr = _lookup< + late final __objc_msgSend_450Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -48678,7 +49008,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< + late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48688,13 +49018,13 @@ class NativeCupertinoHttp { late final _sel_downloadTaskWithRequest_completionHandler_1 = _registerName1("downloadTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_440( + ffi.Pointer _objc_msgSend_451( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_440( + return __objc_msgSend_451( obj, sel, request, @@ -48702,14 +49032,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_440Ptr = _lookup< + late final __objc_msgSend_451Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< + late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48718,13 +49048,13 @@ class NativeCupertinoHttp { late final _sel_downloadTaskWithURL_completionHandler_1 = _registerName1("downloadTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_441( + ffi.Pointer _objc_msgSend_452( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_441( + return __objc_msgSend_452( obj, sel, url, @@ -48732,14 +49062,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_441Ptr = _lookup< + late final __objc_msgSend_452Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< + late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48748,13 +49078,13 @@ class NativeCupertinoHttp { late final _sel_downloadTaskWithResumeData_completionHandler_1 = _registerName1("downloadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_442( + ffi.Pointer _objc_msgSend_453( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer resumeData, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_442( + return __objc_msgSend_453( obj, sel, resumeData, @@ -48762,14 +49092,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_442Ptr = _lookup< + late final __objc_msgSend_453Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< + late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48834,21 +49164,21 @@ class NativeCupertinoHttp { late final _sel_isProxyConnection1 = _registerName1("isProxyConnection"); late final _sel_isReusedConnection1 = _registerName1("isReusedConnection"); late final _sel_resourceFetchType1 = _registerName1("resourceFetchType"); - int _objc_msgSend_443( + int _objc_msgSend_454( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_443( + return __objc_msgSend_454( obj, sel, ); } - late final __objc_msgSend_443Ptr = _lookup< + late final __objc_msgSend_454Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< + late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_countOfRequestHeaderBytesSent1 = @@ -48877,21 +49207,21 @@ class NativeCupertinoHttp { late final _sel_isMultipath1 = _registerName1("isMultipath"); late final _sel_domainResolutionProtocol1 = _registerName1("domainResolutionProtocol"); - int _objc_msgSend_444( + int _objc_msgSend_455( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_444( + return __objc_msgSend_455( obj, sel, ); } - late final __objc_msgSend_444Ptr = _lookup< + late final __objc_msgSend_455Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< + late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _class_NSURLSessionTaskMetrics1 = @@ -48899,21 +49229,21 @@ class NativeCupertinoHttp { late final _sel_transactionMetrics1 = _registerName1("transactionMetrics"); late final _class_NSDateInterval1 = _getClass1("NSDateInterval"); late final _sel_taskInterval1 = _registerName1("taskInterval"); - ffi.Pointer _objc_msgSend_445( + ffi.Pointer _objc_msgSend_456( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_445( + return __objc_msgSend_456( obj, sel, ); } - late final __objc_msgSend_445Ptr = _lookup< + late final __objc_msgSend_456Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< + late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -48922,14 +49252,14 @@ class NativeCupertinoHttp { late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = _registerName1( "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); - void _objc_msgSend_446( + void _objc_msgSend_457( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, int visibility, ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_446( + return __objc_msgSend_457( obj, sel, typeIdentifier, @@ -48938,7 +49268,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_446Ptr = _lookup< + late final __objc_msgSend_457Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48946,14 +49276,14 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< + late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = _registerName1( "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); - void _objc_msgSend_447( + void _objc_msgSend_458( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, @@ -48961,7 +49291,7 @@ class NativeCupertinoHttp { int visibility, ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_447( + return __objc_msgSend_458( obj, sel, typeIdentifier, @@ -48971,7 +49301,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_447Ptr = _lookup< + late final __objc_msgSend_458Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48980,7 +49310,7 @@ class NativeCupertinoHttp { ffi.Int32, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< + late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); @@ -48988,23 +49318,23 @@ class NativeCupertinoHttp { _registerName1("registeredTypeIdentifiers"); late final _sel_registeredTypeIdentifiersWithFileOptions_1 = _registerName1("registeredTypeIdentifiersWithFileOptions:"); - ffi.Pointer _objc_msgSend_448( + ffi.Pointer _objc_msgSend_459( ffi.Pointer obj, ffi.Pointer sel, int fileOptions, ) { - return __objc_msgSend_448( + return __objc_msgSend_459( obj, sel, fileOptions, ); } - late final __objc_msgSend_448Ptr = _lookup< + late final __objc_msgSend_459Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< + late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -49013,13 +49343,13 @@ class NativeCupertinoHttp { late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = _registerName1( "hasRepresentationConformingToTypeIdentifier:fileOptions:"); - bool _objc_msgSend_449( + bool _objc_msgSend_460( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, int fileOptions, ) { - return __objc_msgSend_449( + return __objc_msgSend_460( obj, sel, typeIdentifier, @@ -49027,24 +49357,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_449Ptr = _lookup< + late final __objc_msgSend_460Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< + late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = _registerName1( "loadDataRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_450( + ffi.Pointer _objc_msgSend_461( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_450( + return __objc_msgSend_461( obj, sel, typeIdentifier, @@ -49052,14 +49382,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_450Ptr = _lookup< + late final __objc_msgSend_461Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< + late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -49069,13 +49399,13 @@ class NativeCupertinoHttp { late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = _registerName1( "loadFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_451( + ffi.Pointer _objc_msgSend_462( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_451( + return __objc_msgSend_462( obj, sel, typeIdentifier, @@ -49083,14 +49413,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_451Ptr = _lookup< + late final __objc_msgSend_462Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< + late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -49100,13 +49430,13 @@ class NativeCupertinoHttp { late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = _registerName1( "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_452( + ffi.Pointer _objc_msgSend_463( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_452( + return __objc_msgSend_463( obj, sel, typeIdentifier, @@ -49114,14 +49444,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_452Ptr = _lookup< + late final __objc_msgSend_463Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< + late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -49133,13 +49463,13 @@ class NativeCupertinoHttp { late final _sel_initWithObject_1 = _registerName1("initWithObject:"); late final _sel_registerObject_visibility_1 = _registerName1("registerObject:visibility:"); - void _objc_msgSend_453( + void _objc_msgSend_464( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer object, int visibility, ) { - return __objc_msgSend_453( + return __objc_msgSend_464( obj, sel, object, @@ -49147,24 +49477,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_453Ptr = _lookup< + late final __objc_msgSend_464Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< + late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_registerObjectOfClass_visibility_loadHandler_1 = _registerName1("registerObjectOfClass:visibility:loadHandler:"); - void _objc_msgSend_454( + void _objc_msgSend_465( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aClass, int visibility, ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_454( + return __objc_msgSend_465( obj, sel, aClass, @@ -49173,7 +49503,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_454Ptr = _lookup< + late final __objc_msgSend_465Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -49181,7 +49511,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< + late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); @@ -49189,13 +49519,13 @@ class NativeCupertinoHttp { _registerName1("canLoadObjectOfClass:"); late final _sel_loadObjectOfClass_completionHandler_1 = _registerName1("loadObjectOfClass:completionHandler:"); - ffi.Pointer _objc_msgSend_455( + ffi.Pointer _objc_msgSend_466( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aClass, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_455( + return __objc_msgSend_466( obj, sel, aClass, @@ -49203,14 +49533,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_455Ptr = _lookup< + late final __objc_msgSend_466Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< + late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -49219,13 +49549,13 @@ class NativeCupertinoHttp { late final _sel_initWithItem_typeIdentifier_1 = _registerName1("initWithItem:typeIdentifier:"); - instancetype _objc_msgSend_456( + instancetype _objc_msgSend_467( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer item, ffi.Pointer typeIdentifier, ) { - return __objc_msgSend_456( + return __objc_msgSend_467( obj, sel, item, @@ -49233,26 +49563,26 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_456Ptr = _lookup< + late final __objc_msgSend_467Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< + late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_registerItemForTypeIdentifier_loadHandler_1 = _registerName1("registerItemForTypeIdentifier:loadHandler:"); - void _objc_msgSend_457( + void _objc_msgSend_468( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, NSItemProviderLoadHandler loadHandler, ) { - return __objc_msgSend_457( + return __objc_msgSend_468( obj, sel, typeIdentifier, @@ -49260,27 +49590,27 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_457Ptr = _lookup< + late final __objc_msgSend_468Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< + late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>(); late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); - void _objc_msgSend_458( + void _objc_msgSend_469( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer options, NSItemProviderCompletionHandler completionHandler, ) { - return __objc_msgSend_458( + return __objc_msgSend_469( obj, sel, typeIdentifier, @@ -49289,7 +49619,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_458Ptr = _lookup< + late final __objc_msgSend_469Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -49297,7 +49627,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< + late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -49306,55 +49636,55 @@ class NativeCupertinoHttp { NSItemProviderCompletionHandler)>(); late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); - NSItemProviderLoadHandler _objc_msgSend_459( + NSItemProviderLoadHandler _objc_msgSend_470( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_459( + return __objc_msgSend_470( obj, sel, ); } - late final __objc_msgSend_459Ptr = _lookup< + late final __objc_msgSend_470Ptr = _lookup< ffi.NativeFunction< NSItemProviderLoadHandler Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< + late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< NSItemProviderLoadHandler Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setPreviewImageHandler_1 = _registerName1("setPreviewImageHandler:"); - void _objc_msgSend_460( + void _objc_msgSend_471( ffi.Pointer obj, ffi.Pointer sel, NSItemProviderLoadHandler value, ) { - return __objc_msgSend_460( + return __objc_msgSend_471( obj, sel, value, ); } - late final __objc_msgSend_460Ptr = _lookup< + late final __objc_msgSend_471Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< + late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>(); late final _sel_loadPreviewImageWithOptions_completionHandler_1 = _registerName1("loadPreviewImageWithOptions:completionHandler:"); - void _objc_msgSend_461( + void _objc_msgSend_472( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer options, NSItemProviderCompletionHandler completionHandler, ) { - return __objc_msgSend_461( + return __objc_msgSend_472( obj, sel, options, @@ -49362,14 +49692,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_461Ptr = _lookup< + late final __objc_msgSend_472Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< + late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderCompletionHandler)>(); @@ -49656,13 +49986,13 @@ class NativeCupertinoHttp { late final _class_NSMutableString1 = _getClass1("NSMutableString"); late final _sel_replaceCharactersInRange_withString_1 = _registerName1("replaceCharactersInRange:withString:"); - void _objc_msgSend_462( + void _objc_msgSend_473( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ffi.Pointer aString, ) { - return __objc_msgSend_462( + return __objc_msgSend_473( obj, sel, range, @@ -49670,23 +50000,23 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_462Ptr = _lookup< + late final __objc_msgSend_473Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< + late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>(); late final _sel_insertString_atIndex_1 = _registerName1("insertString:atIndex:"); - void _objc_msgSend_463( + void _objc_msgSend_474( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aString, int loc, ) { - return __objc_msgSend_463( + return __objc_msgSend_474( obj, sel, aString, @@ -49694,11 +50024,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_463Ptr = _lookup< + late final __objc_msgSend_474Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< + late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -49709,7 +50039,7 @@ class NativeCupertinoHttp { late final _sel_setString_1 = _registerName1("setString:"); late final _sel_replaceOccurrencesOfString_withString_options_range_1 = _registerName1("replaceOccurrencesOfString:withString:options:range:"); - int _objc_msgSend_464( + int _objc_msgSend_475( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer target, @@ -49717,7 +50047,7 @@ class NativeCupertinoHttp { int options, NSRange searchRange, ) { - return __objc_msgSend_464( + return __objc_msgSend_475( obj, sel, target, @@ -49727,7 +50057,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_464Ptr = _lookup< + late final __objc_msgSend_475Ptr = _lookup< ffi.NativeFunction< NSUInteger Function( ffi.Pointer, @@ -49736,13 +50066,13 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< + late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, NSRange)>(); late final _sel_applyTransform_reverse_range_updatedRange_1 = _registerName1("applyTransform:reverse:range:updatedRange:"); - bool _objc_msgSend_465( + bool _objc_msgSend_476( ffi.Pointer obj, ffi.Pointer sel, NSStringTransform transform, @@ -49750,7 +50080,7 @@ class NativeCupertinoHttp { NSRange range, NSRangePointer resultingRange, ) { - return __objc_msgSend_465( + return __objc_msgSend_476( obj, sel, transform, @@ -49760,7 +50090,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_465Ptr = _lookup< + late final __objc_msgSend_476Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -49769,27 +50099,27 @@ class NativeCupertinoHttp { ffi.Bool, NSRange, NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< + late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, NSStringTransform, bool, NSRange, NSRangePointer)>(); - ffi.Pointer _objc_msgSend_466( + ffi.Pointer _objc_msgSend_477( ffi.Pointer obj, ffi.Pointer sel, int capacity, ) { - return __objc_msgSend_466( + return __objc_msgSend_477( obj, sel, capacity, ); } - late final __objc_msgSend_466Ptr = _lookup< + late final __objc_msgSend_477Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< + late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -49825,86 +50155,86 @@ class NativeCupertinoHttp { _registerName1("removeCharactersInString:"); late final _sel_formUnionWithCharacterSet_1 = _registerName1("formUnionWithCharacterSet:"); - void _objc_msgSend_467( + void _objc_msgSend_478( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherSet, ) { - return __objc_msgSend_467( + return __objc_msgSend_478( obj, sel, otherSet, ); } - late final __objc_msgSend_467Ptr = _lookup< + late final __objc_msgSend_478Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< + late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_formIntersectionWithCharacterSet_1 = _registerName1("formIntersectionWithCharacterSet:"); late final _sel_invert1 = _registerName1("invert"); - ffi.Pointer _objc_msgSend_468( + ffi.Pointer _objc_msgSend_479( ffi.Pointer obj, ffi.Pointer sel, NSRange aRange, ) { - return __objc_msgSend_468( + return __objc_msgSend_479( obj, sel, aRange, ); } - late final __objc_msgSend_468Ptr = _lookup< + late final __objc_msgSend_479Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< + late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSRange)>(); - ffi.Pointer _objc_msgSend_469( + ffi.Pointer _objc_msgSend_480( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aString, ) { - return __objc_msgSend_469( + return __objc_msgSend_480( obj, sel, aString, ); } - late final __objc_msgSend_469Ptr = _lookup< + late final __objc_msgSend_480Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< + late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_470( + ffi.Pointer _objc_msgSend_481( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, ) { - return __objc_msgSend_470( + return __objc_msgSend_481( obj, sel, data, ); } - late final __objc_msgSend_470Ptr = _lookup< + late final __objc_msgSend_481Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< + late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -51490,13 +51820,13 @@ class NativeCupertinoHttp { late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); - instancetype _objc_msgSend_471( + instancetype _objc_msgSend_482( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer name, ffi.Pointer value, ) { - return __objc_msgSend_471( + return __objc_msgSend_482( obj, sel, name, @@ -51504,14 +51834,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_471Ptr = _lookup< + late final __objc_msgSend_482Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< + late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -51526,23 +51856,23 @@ class NativeCupertinoHttp { late final _sel_componentsWithString_1 = _registerName1("componentsWithString:"); late final _sel_URLRelativeToURL_1 = _registerName1("URLRelativeToURL:"); - ffi.Pointer _objc_msgSend_472( + ffi.Pointer _objc_msgSend_483( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer baseURL, ) { - return __objc_msgSend_472( + return __objc_msgSend_483( obj, sel, baseURL, ); } - late final __objc_msgSend_472Ptr = _lookup< + late final __objc_msgSend_483Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< + late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -51594,7 +51924,7 @@ class NativeCupertinoHttp { late final _class_NSHTTPURLResponse1 = _getClass1("NSHTTPURLResponse"); late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_1 = _registerName1("initWithURL:statusCode:HTTPVersion:headerFields:"); - instancetype _objc_msgSend_473( + instancetype _objc_msgSend_484( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, @@ -51602,7 +51932,7 @@ class NativeCupertinoHttp { ffi.Pointer HTTPVersion, ffi.Pointer headerFields, ) { - return __objc_msgSend_473( + return __objc_msgSend_484( obj, sel, url, @@ -51612,7 +51942,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_473Ptr = _lookup< + late final __objc_msgSend_484Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -51621,7 +51951,7 @@ class NativeCupertinoHttp { NSInteger, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< + late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -51634,23 +51964,23 @@ class NativeCupertinoHttp { late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); late final _sel_localizedStringForStatusCode_1 = _registerName1("localizedStringForStatusCode:"); - ffi.Pointer _objc_msgSend_474( + ffi.Pointer _objc_msgSend_485( ffi.Pointer obj, ffi.Pointer sel, int statusCode, ) { - return __objc_msgSend_474( + return __objc_msgSend_485( obj, sel, statusCode, ); } - late final __objc_msgSend_474Ptr = _lookup< + late final __objc_msgSend_485Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< + late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -51785,14 +52115,14 @@ class NativeCupertinoHttp { late final _class_NSException1 = _getClass1("NSException"); late final _sel_exceptionWithName_reason_userInfo_1 = _registerName1("exceptionWithName:reason:userInfo:"); - ffi.Pointer _objc_msgSend_475( + ffi.Pointer _objc_msgSend_486( ffi.Pointer obj, ffi.Pointer sel, NSExceptionName name, ffi.Pointer reason, ffi.Pointer userInfo, ) { - return __objc_msgSend_475( + return __objc_msgSend_486( obj, sel, name, @@ -51801,7 +52131,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_475Ptr = _lookup< + late final __objc_msgSend_486Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -51809,7 +52139,7 @@ class NativeCupertinoHttp { NSExceptionName, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< + late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -51819,14 +52149,14 @@ class NativeCupertinoHttp { late final _sel_initWithName_reason_userInfo_1 = _registerName1("initWithName:reason:userInfo:"); - instancetype _objc_msgSend_476( + instancetype _objc_msgSend_487( ffi.Pointer obj, ffi.Pointer sel, NSExceptionName aName, ffi.Pointer aReason, ffi.Pointer aUserInfo, ) { - return __objc_msgSend_476( + return __objc_msgSend_487( obj, sel, aName, @@ -51835,7 +52165,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_476Ptr = _lookup< + late final __objc_msgSend_487Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -51843,7 +52173,7 @@ class NativeCupertinoHttp { NSExceptionName, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< + late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, NSExceptionName, ffi.Pointer, ffi.Pointer)>(); @@ -51855,14 +52185,14 @@ class NativeCupertinoHttp { late final _sel_raise_format_1 = _registerName1("raise:format:"); late final _sel_raise_format_arguments_1 = _registerName1("raise:format:arguments:"); - void _objc_msgSend_477( + void _objc_msgSend_488( ffi.Pointer obj, ffi.Pointer sel, NSExceptionName name, ffi.Pointer format, va_list argList, ) { - return __objc_msgSend_477( + return __objc_msgSend_488( obj, sel, name, @@ -51871,7 +52201,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_477Ptr = _lookup< + late final __objc_msgSend_488Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -51879,7 +52209,7 @@ class NativeCupertinoHttp { NSExceptionName, ffi.Pointer, va_list)>>('objc_msgSend'); - late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< + late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSExceptionName, ffi.Pointer, va_list)>(); @@ -51888,9 +52218,9 @@ class NativeCupertinoHttp { } late final _NSGetUncaughtExceptionHandlerPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer - Function()>>('NSGetUncaughtExceptionHandler'); + ffi + .NativeFunction Function()>>( + 'NSGetUncaughtExceptionHandler'); late final _NSGetUncaughtExceptionHandler = _NSGetUncaughtExceptionHandlerPtr .asFunction Function()>(); @@ -51920,28 +52250,28 @@ class NativeCupertinoHttp { late final _class_NSAssertionHandler1 = _getClass1("NSAssertionHandler"); late final _sel_currentHandler1 = _registerName1("currentHandler"); - ffi.Pointer _objc_msgSend_478( + ffi.Pointer _objc_msgSend_489( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_478( + return __objc_msgSend_489( obj, sel, ); } - late final __objc_msgSend_478Ptr = _lookup< + late final __objc_msgSend_489Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< + late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_handleFailureInMethod_object_file_lineNumber_description_1 = _registerName1( "handleFailureInMethod:object:file:lineNumber:description:"); - void _objc_msgSend_479( + void _objc_msgSend_490( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer selector, @@ -51950,7 +52280,7 @@ class NativeCupertinoHttp { int line, ffi.Pointer format, ) { - return __objc_msgSend_479( + return __objc_msgSend_490( obj, sel, selector, @@ -51961,7 +52291,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_479Ptr = _lookup< + late final __objc_msgSend_490Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -51971,7 +52301,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< + late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -51983,7 +52313,7 @@ class NativeCupertinoHttp { late final _sel_handleFailureInFunction_file_lineNumber_description_1 = _registerName1("handleFailureInFunction:file:lineNumber:description:"); - void _objc_msgSend_480( + void _objc_msgSend_491( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer functionName, @@ -51991,7 +52321,7 @@ class NativeCupertinoHttp { int line, ffi.Pointer format, ) { - return __objc_msgSend_480( + return __objc_msgSend_491( obj, sel, functionName, @@ -52001,7 +52331,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_480Ptr = _lookup< + late final __objc_msgSend_491Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -52010,7 +52340,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< + late final __objc_msgSend_491 = __objc_msgSend_491Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -52022,23 +52352,23 @@ class NativeCupertinoHttp { late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); late final _sel_blockOperationWithBlock_1 = _registerName1("blockOperationWithBlock:"); - instancetype _objc_msgSend_481( + instancetype _objc_msgSend_492( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_481( + return __objc_msgSend_492( obj, sel, block, ); } - late final __objc_msgSend_481Ptr = _lookup< + late final __objc_msgSend_492Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< + late final __objc_msgSend_492 = __objc_msgSend_492Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); @@ -52048,14 +52378,14 @@ class NativeCupertinoHttp { _getClass1("NSInvocationOperation"); late final _sel_initWithTarget_selector_object_1 = _registerName1("initWithTarget:selector:object:"); - instancetype _objc_msgSend_482( + instancetype _objc_msgSend_493( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer target, ffi.Pointer sel1, ffi.Pointer arg, ) { - return __objc_msgSend_482( + return __objc_msgSend_493( obj, sel, target, @@ -52064,7 +52394,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_482Ptr = _lookup< + late final __objc_msgSend_493Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -52072,7 +52402,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< + late final __objc_msgSend_493 = __objc_msgSend_493Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -52081,42 +52411,42 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); - instancetype _objc_msgSend_483( + instancetype _objc_msgSend_494( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer inv, ) { - return __objc_msgSend_483( + return __objc_msgSend_494( obj, sel, inv, ); } - late final __objc_msgSend_483Ptr = _lookup< + late final __objc_msgSend_494Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< + late final __objc_msgSend_494 = __objc_msgSend_494Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_invocation1 = _registerName1("invocation"); - ffi.Pointer _objc_msgSend_484( + ffi.Pointer _objc_msgSend_495( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_484( + return __objc_msgSend_495( obj, sel, ); } - late final __objc_msgSend_484Ptr = _lookup< + late final __objc_msgSend_495Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< + late final __objc_msgSend_495 = __objc_msgSend_495Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -52938,9 +53268,9 @@ class NativeCupertinoHttp { } late final _Dart_IsolateFlagsInitializePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer)>>('Dart_IsolateFlagsInitialize'); + ffi + .NativeFunction)>>( + 'Dart_IsolateFlagsInitialize'); late final _Dart_IsolateFlagsInitialize = _Dart_IsolateFlagsInitializePtr .asFunction)>(); @@ -56428,9 +56758,9 @@ class NativeCupertinoHttp { } late final _Dart_GetNativeArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_NativeArguments, ffi.Int)>>('Dart_GetNativeArgument'); + ffi + .NativeFunction>( + 'Dart_GetNativeArgument'); late final _Dart_GetNativeArgument = _Dart_GetNativeArgumentPtr.asFunction< Object Function(Dart_NativeArguments, int)>(); @@ -56621,9 +56951,9 @@ class NativeCupertinoHttp { } late final _Dart_SetReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Handle)>>('Dart_SetReturnValue'); + ffi + .NativeFunction>( + 'Dart_SetReturnValue'); late final _Dart_SetReturnValue = _Dart_SetReturnValuePtr.asFunction< void Function(Dart_NativeArguments, Object)>(); @@ -56656,9 +56986,9 @@ class NativeCupertinoHttp { } late final _Dart_SetBooleanReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Bool)>>('Dart_SetBooleanReturnValue'); + ffi + .NativeFunction>( + 'Dart_SetBooleanReturnValue'); late final _Dart_SetBooleanReturnValue = _Dart_SetBooleanReturnValuePtr .asFunction(); @@ -56673,9 +57003,9 @@ class NativeCupertinoHttp { } late final _Dart_SetIntegerReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Int64)>>('Dart_SetIntegerReturnValue'); + ffi + .NativeFunction>( + 'Dart_SetIntegerReturnValue'); late final _Dart_SetIntegerReturnValue = _Dart_SetIntegerReturnValuePtr .asFunction(); @@ -56690,9 +57020,9 @@ class NativeCupertinoHttp { } late final _Dart_SetDoubleReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - Dart_NativeArguments, ffi.Double)>>('Dart_SetDoubleReturnValue'); + ffi + .NativeFunction>( + 'Dart_SetDoubleReturnValue'); late final _Dart_SetDoubleReturnValue = _Dart_SetDoubleReturnValuePtr .asFunction(); @@ -58556,23 +58886,23 @@ class NativeCupertinoHttp { late final _class_CUPHTTPTaskConfiguration1 = _getClass1("CUPHTTPTaskConfiguration"); late final _sel_initWithPort_1 = _registerName1("initWithPort:"); - ffi.Pointer _objc_msgSend_485( + ffi.Pointer _objc_msgSend_496( ffi.Pointer obj, ffi.Pointer sel, int sendPort, ) { - return __objc_msgSend_485( + return __objc_msgSend_496( obj, sel, sendPort, ); } - late final __objc_msgSend_485Ptr = _lookup< + late final __objc_msgSend_496Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, Dart_Port)>>('objc_msgSend'); - late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< + late final __objc_msgSend_496 = __objc_msgSend_496Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -58581,13 +58911,13 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPClientDelegate"); late final _sel_registerTask_withConfiguration_1 = _registerName1("registerTask:withConfiguration:"); - void _objc_msgSend_486( + void _objc_msgSend_497( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer task, ffi.Pointer config, ) { - return __objc_msgSend_486( + return __objc_msgSend_497( obj, sel, task, @@ -58595,14 +58925,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_486Ptr = _lookup< + late final __objc_msgSend_497Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< + late final __objc_msgSend_497 = __objc_msgSend_497Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -58610,13 +58940,13 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedDelegate"); late final _sel_initWithSession_task_1 = _registerName1("initWithSession:task:"); - ffi.Pointer _objc_msgSend_487( + ffi.Pointer _objc_msgSend_498( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ) { - return __objc_msgSend_487( + return __objc_msgSend_498( obj, sel, session, @@ -58624,14 +58954,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_487Ptr = _lookup< + late final __objc_msgSend_498Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< + late final __objc_msgSend_498 = __objc_msgSend_498Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58641,41 +58971,41 @@ class NativeCupertinoHttp { late final _sel_finish1 = _registerName1("finish"); late final _sel_session1 = _registerName1("session"); late final _sel_task1 = _registerName1("task"); - ffi.Pointer _objc_msgSend_488( + ffi.Pointer _objc_msgSend_499( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_488( + return __objc_msgSend_499( obj, sel, ); } - late final __objc_msgSend_488Ptr = _lookup< + late final __objc_msgSend_499Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< + late final __objc_msgSend_499 = __objc_msgSend_499Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _class_NSLock1 = _getClass1("NSLock"); late final _sel_lock1 = _registerName1("lock"); - ffi.Pointer _objc_msgSend_489( + ffi.Pointer _objc_msgSend_500( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_489( + return __objc_msgSend_500( obj, sel, ); } - late final __objc_msgSend_489Ptr = _lookup< + late final __objc_msgSend_500Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< + late final __objc_msgSend_500 = __objc_msgSend_500Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -58683,7 +59013,7 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedRedirect"); late final _sel_initWithSession_task_response_request_1 = _registerName1("initWithSession:task:response:request:"); - ffi.Pointer _objc_msgSend_490( + ffi.Pointer _objc_msgSend_501( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, @@ -58691,7 +59021,7 @@ class NativeCupertinoHttp { ffi.Pointer response, ffi.Pointer request, ) { - return __objc_msgSend_490( + return __objc_msgSend_501( obj, sel, session, @@ -58701,7 +59031,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_490Ptr = _lookup< + late final __objc_msgSend_501Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58710,7 +59040,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< + late final __objc_msgSend_501 = __objc_msgSend_501Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58720,41 +59050,21 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); - void _objc_msgSend_491( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_491( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_491Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_491 = __objc_msgSend_491Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_492( + ffi.Pointer _objc_msgSend_502( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_492( + return __objc_msgSend_502( obj, sel, ); } - late final __objc_msgSend_492Ptr = _lookup< + late final __objc_msgSend_502Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_492 = __objc_msgSend_492Ptr.asFunction< + late final __objc_msgSend_502 = __objc_msgSend_502Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -58763,14 +59073,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedResponse"); late final _sel_initWithSession_task_response_1 = _registerName1("initWithSession:task:response:"); - ffi.Pointer _objc_msgSend_493( + ffi.Pointer _objc_msgSend_503( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ffi.Pointer response, ) { - return __objc_msgSend_493( + return __objc_msgSend_503( obj, sel, session, @@ -58779,7 +59089,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_493Ptr = _lookup< + late final __objc_msgSend_503Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58787,7 +59097,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_493 = __objc_msgSend_493Ptr.asFunction< + late final __objc_msgSend_503 = __objc_msgSend_503Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58797,54 +59107,54 @@ class NativeCupertinoHttp { late final _sel_finishWithDisposition_1 = _registerName1("finishWithDisposition:"); - void _objc_msgSend_494( + void _objc_msgSend_504( ffi.Pointer obj, ffi.Pointer sel, int disposition, ) { - return __objc_msgSend_494( + return __objc_msgSend_504( obj, sel, disposition, ); } - late final __objc_msgSend_494Ptr = _lookup< + late final __objc_msgSend_504Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_494 = __objc_msgSend_494Ptr.asFunction< + late final __objc_msgSend_504 = __objc_msgSend_504Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_disposition1 = _registerName1("disposition"); - int _objc_msgSend_495( + int _objc_msgSend_505( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_495( + return __objc_msgSend_505( obj, sel, ); } - late final __objc_msgSend_495Ptr = _lookup< + late final __objc_msgSend_505Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_495 = __objc_msgSend_495Ptr.asFunction< + late final __objc_msgSend_505 = __objc_msgSend_505Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); late final _sel_initWithSession_task_data_1 = _registerName1("initWithSession:task:data:"); - ffi.Pointer _objc_msgSend_496( + ffi.Pointer _objc_msgSend_506( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ffi.Pointer data, ) { - return __objc_msgSend_496( + return __objc_msgSend_506( obj, sel, session, @@ -58853,7 +59163,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_496Ptr = _lookup< + late final __objc_msgSend_506Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58861,7 +59171,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_496 = __objc_msgSend_496Ptr.asFunction< + late final __objc_msgSend_506 = __objc_msgSend_506Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58873,14 +59183,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedComplete"); late final _sel_initWithSession_task_error_1 = _registerName1("initWithSession:task:error:"); - ffi.Pointer _objc_msgSend_497( + ffi.Pointer _objc_msgSend_507( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ffi.Pointer error, ) { - return __objc_msgSend_497( + return __objc_msgSend_507( obj, sel, session, @@ -58889,7 +59199,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_497Ptr = _lookup< + late final __objc_msgSend_507Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58897,7 +59207,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_497 = __objc_msgSend_497Ptr.asFunction< + late final __objc_msgSend_507 = __objc_msgSend_507Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58909,14 +59219,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedFinishedDownloading"); late final _sel_initWithSession_downloadTask_url_1 = _registerName1("initWithSession:downloadTask:url:"); - ffi.Pointer _objc_msgSend_498( + ffi.Pointer _objc_msgSend_508( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer downloadTask, ffi.Pointer location, ) { - return __objc_msgSend_498( + return __objc_msgSend_508( obj, sel, session, @@ -58925,7 +59235,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_498Ptr = _lookup< + late final __objc_msgSend_508Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58933,7 +59243,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_498 = __objc_msgSend_498Ptr.asFunction< + late final __objc_msgSend_508 = __objc_msgSend_508Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58946,14 +59256,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedWebSocketOpened"); late final _sel_initWithSession_webSocketTask_didOpenWithProtocol_1 = _registerName1("initWithSession:webSocketTask:didOpenWithProtocol:"); - ffi.Pointer _objc_msgSend_499( + ffi.Pointer _objc_msgSend_509( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer webSocketTask, ffi.Pointer protocol, ) { - return __objc_msgSend_499( + return __objc_msgSend_509( obj, sel, session, @@ -58962,7 +59272,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_499Ptr = _lookup< + late final __objc_msgSend_509Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -58970,7 +59280,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_499 = __objc_msgSend_499Ptr.asFunction< + late final __objc_msgSend_509 = __objc_msgSend_509Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58983,7 +59293,7 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedWebSocketClosed"); late final _sel_initWithSession_webSocketTask_code_reason_1 = _registerName1("initWithSession:webSocketTask:code:reason:"); - ffi.Pointer _objc_msgSend_500( + ffi.Pointer _objc_msgSend_510( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, @@ -58991,7 +59301,7 @@ class NativeCupertinoHttp { int closeCode, ffi.Pointer reason, ) { - return __objc_msgSend_500( + return __objc_msgSend_510( obj, sel, session, @@ -59001,7 +59311,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_500Ptr = _lookup< + late final __objc_msgSend_510Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -59010,7 +59320,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_500 = __objc_msgSend_500Ptr.asFunction< + late final __objc_msgSend_510 = __objc_msgSend_510Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -59321,45 +59631,45 @@ class NativeCupertinoHttp { late final _class_CUPHTTPStreamToNSInputStreamAdapter1 = _getClass1("CUPHTTPStreamToNSInputStreamAdapter"); late final _sel_addData_1 = _registerName1("addData:"); - int _objc_msgSend_501( + int _objc_msgSend_511( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, ) { - return __objc_msgSend_501( + return __objc_msgSend_511( obj, sel, data, ); } - late final __objc_msgSend_501Ptr = _lookup< + late final __objc_msgSend_511Ptr = _lookup< ffi.NativeFunction< NSUInteger Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_501 = __objc_msgSend_501Ptr.asFunction< + late final __objc_msgSend_511 = __objc_msgSend_511Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setDone1 = _registerName1("setDone"); late final _sel_setError_1 = _registerName1("setError:"); - void _objc_msgSend_502( + void _objc_msgSend_512( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer error, ) { - return __objc_msgSend_502( + return __objc_msgSend_512( obj, sel, error, ); } - late final __objc_msgSend_502Ptr = _lookup< + late final __objc_msgSend_512Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_502 = __objc_msgSend_502Ptr.asFunction< + late final __objc_msgSend_512 = __objc_msgSend_512Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); } @@ -59374,7 +59684,7 @@ final class __mbstate_t extends ffi.Union { final class __darwin_pthread_handler_rec extends ffi.Struct { external ffi - .Pointer)>> + .Pointer)>> __routine; external ffi.Pointer __arg; @@ -60561,8 +60871,8 @@ class ObjCBlock extends _ObjCBlockBase { void call() { return _id.ref.invoke .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() + ffi + .NativeFunction block)>>() .asFunction block)>()(_id); } } @@ -66495,19 +66805,26 @@ class ObjCBlock11 extends _ObjCBlockBase { /// Creates a block from a C function pointer. ObjCBlock11.fromFunctionPointer( NativeCupertinoHttp lib, - ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> + ffi.Pointer< + ffi + .NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> ptr) : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock11_fnPtrTrampoline, false) - .cast(), - ptr.cast()), + lib + ._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>( + _ObjCBlock11_fnPtrTrampoline, false) + .cast(), + ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; @@ -66917,16 +67234,17 @@ class ObjCBlock13 extends _ObjCBlockBase { ffi.Pointer arg2)>> ptr) : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>( - _ObjCBlock13_fnPtrTrampoline) - .cast(), - ptr.cast()), + lib + ._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>( + _ObjCBlock13_fnPtrTrampoline) + .cast(), + ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; @@ -68583,1213 +68901,876 @@ class NSMutableDictionary extends NSDictionary { } } -class NSNotification extends NSObject { - NSNotification._(ffi.Pointer id, NativeCupertinoHttp lib, +/// ! +/// @enum NSURLCacheStoragePolicy +/// +/// @discussion The NSURLCacheStoragePolicy enum defines constants that +/// can be used to specify the type of storage that is allowable for an +/// NSCachedURLResponse object that is to be stored in an NSURLCache. +/// +/// @constant NSURLCacheStorageAllowed Specifies that storage in an +/// NSURLCache is allowed without restriction. +/// +/// @constant NSURLCacheStorageAllowedInMemoryOnly Specifies that +/// storage in an NSURLCache is allowed; however storage should be +/// done in memory only, no disk storage should be done. +/// +/// @constant NSURLCacheStorageNotAllowed Specifies that storage in an +/// NSURLCache is not allowed in any fashion, either in memory or on +/// disk. +abstract class NSURLCacheStoragePolicy { + static const int NSURLCacheStorageAllowed = 0; + static const int NSURLCacheStorageAllowedInMemoryOnly = 1; + static const int NSURLCacheStorageNotAllowed = 2; +} + +/// ! +/// @class NSCachedURLResponse +/// NSCachedURLResponse is a class whose objects functions as a wrapper for +/// objects that are stored in the framework's caching system. +/// It is used to maintain characteristics and attributes of a cached +/// object. +class NSCachedURLResponse extends NSObject { + NSCachedURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSNotification] that points to the same underlying object as [other]. - static NSNotification castFrom(T other) { - return NSNotification._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSCachedURLResponse] that points to the same underlying object as [other]. + static NSCachedURLResponse castFrom(T other) { + return NSCachedURLResponse._(other._id, other._lib, + retain: true, release: true); } - /// Returns a [NSNotification] that wraps the given raw object pointer. - static NSNotification castFromPointer( + /// Returns a [NSCachedURLResponse] that wraps the given raw object pointer. + static NSCachedURLResponse castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSNotification._(other, lib, retain: retain, release: release); + return NSCachedURLResponse._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSNotification]. + /// Returns whether [obj] is an instance of [NSCachedURLResponse]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSNotification1); + obj._lib._class_NSCachedURLResponse1); } - NSNotificationName get name { - return _lib._objc_msgSend_32(_id, _lib._sel_name1); + /// ! + /// @method initWithResponse:data + /// @abstract Initializes an NSCachedURLResponse with the given + /// response and data. + /// @discussion A default NSURLCacheStoragePolicy is used for + /// NSCachedURLResponse objects initialized with this method: + /// NSURLCacheStorageAllowed. + /// @param response a NSURLResponse object. + /// @param data an NSData object representing the URL content + /// corresponding to the given response. + /// @result an initialized NSCachedURLResponse. + NSCachedURLResponse initWithResponse_data_( + NSURLResponse? response, NSData? data) { + final _ret = _lib._objc_msgSend_316(_id, _lib._sel_initWithResponse_data_1, + response?._id ?? ffi.nullptr, data?._id ?? ffi.nullptr); + return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); } - NSObject get object { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); - return NSObject._(_ret, _lib, retain: true, release: true); + /// ! + /// @method initWithResponse:data:userInfo:storagePolicy: + /// @abstract Initializes an NSCachedURLResponse with the given + /// response, data, user-info dictionary, and storage policy. + /// @param response a NSURLResponse object. + /// @param data an NSData object representing the URL content + /// corresponding to the given response. + /// @param userInfo a dictionary user-specified information to be + /// stored with the NSCachedURLResponse. + /// @param storagePolicy an NSURLCacheStoragePolicy constant. + /// @result an initialized NSCachedURLResponse. + NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( + NSURLResponse? response, + NSData? data, + NSDictionary? userInfo, + int storagePolicy) { + final _ret = _lib._objc_msgSend_317( + _id, + _lib._sel_initWithResponse_data_userInfo_storagePolicy_1, + response?._id ?? ffi.nullptr, + data?._id ?? ffi.nullptr, + userInfo?._id ?? ffi.nullptr, + storagePolicy); + return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + /// ! + /// @abstract Returns the response wrapped by this instance. + /// @result The response wrapped by this instance. + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_318(_id, _lib._sel_response1); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSNotification initWithName_object_userInfo_( - NSNotificationName name, NSObject object, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_315( - _id, - _lib._sel_initWithName_object_userInfo_1, - name, - object._id, - userInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); - } - - NSNotification initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + : NSURLResponse._(_ret, _lib, retain: true, release: true); } - static NSNotification notificationWithName_object_( - NativeCupertinoHttp _lib, NSNotificationName aName, NSObject anObject) { - final _ret = _lib._objc_msgSend_258(_lib._class_NSNotification1, - _lib._sel_notificationWithName_object_1, aName, anObject._id); - return NSNotification._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns the data of the receiver. + /// @result The data of the receiver. + NSData? get data { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - static NSNotification notificationWithName_object_userInfo_( - NativeCupertinoHttp _lib, - NSNotificationName aName, - NSObject anObject, - NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_315( - _lib._class_NSNotification1, - _lib._sel_notificationWithName_object_userInfo_1, - aName, - anObject._id, - aUserInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns the userInfo dictionary of the receiver. + /// @result The userInfo dictionary of the receiver. + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - @override - NSNotification init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNotification._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns the NSURLCacheStoragePolicy constant of the receiver. + /// @result The NSURLCacheStoragePolicy constant of the receiver. + int get storagePolicy { + return _lib._objc_msgSend_319(_id, _lib._sel_storagePolicy1); } - static NSNotification new1(NativeCupertinoHttp _lib) { + static NSCachedURLResponse new1(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); - return NSNotification._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSCachedURLResponse1, _lib._sel_new1); + return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); } - static NSNotification alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); - return NSNotification._(_ret, _lib, retain: false, release: true); + static NSCachedURLResponse alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSCachedURLResponse1, _lib._sel_alloc1); + return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); } } -typedef NSNotificationName = ffi.Pointer; - -class NSNotificationCenter extends NSObject { - NSNotificationCenter._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSURLResponse extends NSObject { + NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSNotificationCenter] that points to the same underlying object as [other]. - static NSNotificationCenter castFrom(T other) { - return NSNotificationCenter._(other._id, other._lib, - retain: true, release: true); + /// Returns a [NSURLResponse] that points to the same underlying object as [other]. + static NSURLResponse castFrom(T other) { + return NSURLResponse._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSNotificationCenter] that wraps the given raw object pointer. - static NSNotificationCenter castFromPointer( + /// Returns a [NSURLResponse] that wraps the given raw object pointer. + static NSURLResponse castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSNotificationCenter._(other, lib, retain: retain, release: release); + return NSURLResponse._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSNotificationCenter]. + /// Returns whether [obj] is an instance of [NSURLResponse]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSNotificationCenter1); - } - - static NSNotificationCenter? getDefaultCenter(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_316( - _lib._class_NSNotificationCenter1, _lib._sel_defaultCenter1); - return _ret.address == 0 - ? null - : NSNotificationCenter._(_ret, _lib, retain: true, release: true); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); } - void addObserver_selector_name_object_( - NSObject observer, - ffi.Pointer aSelector, - NSNotificationName aName, - NSObject anObject) { - return _lib._objc_msgSend_317( + /// ! + /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: + /// @abstract Initialize an NSURLResponse with the provided values. + /// @param URL the URL + /// @param MIMEType the MIME content type of the response + /// @param length the expected content length of the associated data + /// @param name the name of the text encoding for the associated data, if applicable, else nil + /// @result The initialized NSURLResponse. + /// @discussion This is the designated initializer for NSURLResponse. + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + NSURL? URL, NSString? MIMEType, int length, NSString? name) { + final _ret = _lib._objc_msgSend_315( _id, - _lib._sel_addObserver_selector_name_object_1, - observer._id, - aSelector, - aName, - anObject._id); - } - - void postNotification_(NSNotification? notification) { - return _lib._objc_msgSend_318( - _id, _lib._sel_postNotification_1, notification?._id ?? ffi.nullptr); + _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, + URL?._id ?? ffi.nullptr, + MIMEType?._id ?? ffi.nullptr, + length, + name?._id ?? ffi.nullptr); + return NSURLResponse._(_ret, _lib, retain: true, release: true); } - void postNotificationName_object_( - NSNotificationName aName, NSObject anObject) { - return _lib._objc_msgSend_319( - _id, _lib._sel_postNotificationName_object_1, aName, anObject._id); + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - void postNotificationName_object_userInfo_( - NSNotificationName aName, NSObject anObject, NSDictionary? aUserInfo) { - return _lib._objc_msgSend_320( - _id, - _lib._sel_postNotificationName_object_userInfo_1, - aName, - anObject._id, - aUserInfo?._id ?? ffi.nullptr); + /// ! + /// @abstract Returns the MIME type of the receiver. + /// @discussion The MIME type is based on the information provided + /// from an origin source. However, that value may be changed or + /// corrected by a protocol implementation if it can be determined + /// that the origin server or source reported the information + /// incorrectly or imprecisely. An attempt to guess the MIME type may + /// be made if the origin source did not report any such information. + /// @result The MIME type of the receiver. + NSString? get MIMEType { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_MIMEType1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - void removeObserver_(NSObject observer) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObserver_1, observer._id); + /// ! + /// @abstract Returns the expected content length of the receiver. + /// @discussion Some protocol implementations report a content length + /// as part of delivering load metadata, but not all protocols + /// guarantee the amount of data that will be delivered in actuality. + /// Hence, this method returns an expected amount. Clients should use + /// this value as an advisory, and should be prepared to deal with + /// either more or less data. + /// @result The expected content length of the receiver, or -1 if + /// there is no expectation that can be arrived at regarding expected + /// content length. + int get expectedContentLength { + return _lib._objc_msgSend_82(_id, _lib._sel_expectedContentLength1); } - void removeObserver_name_object_( - NSObject observer, NSNotificationName aName, NSObject anObject) { - return _lib._objc_msgSend_321(_id, _lib._sel_removeObserver_name_object_1, - observer._id, aName, anObject._id); + /// ! + /// @abstract Returns the name of the text encoding of the receiver. + /// @discussion This name will be the actual string reported by the + /// origin source during the course of performing a protocol-specific + /// URL load. Clients can inspect this string and convert it to an + /// NSStringEncoding or CFStringEncoding using the methods and + /// functions made available in the appropriate framework. + /// @result The name of the text encoding of the receiver, or nil if no + /// text encoding was specified. + NSString? get textEncodingName { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_textEncodingName1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSObject addObserverForName_object_queue_usingBlock_(NSNotificationName name, - NSObject obj, NSOperationQueue? queue, ObjCBlock19 block) { - final _ret = _lib._objc_msgSend_350( - _id, - _lib._sel_addObserverForName_object_queue_usingBlock_1, - name, - obj._id, - queue?._id ?? ffi.nullptr, - block._id); - return NSObject._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns a suggested filename if the resource were saved to disk. + /// @discussion The method first checks if the server has specified a filename using the + /// content disposition header. If no valid filename is specified using that mechanism, + /// this method checks the last path component of the URL. If no valid filename can be + /// obtained using the last path component, this method uses the URL's host as the filename. + /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. + /// In most cases, this method appends the proper file extension based on the MIME type. + /// This method always returns a valid filename. + /// @result A suggested filename to use if saving the resource to disk. + NSString? get suggestedFilename { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedFilename1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSNotificationCenter new1(NativeCupertinoHttp _lib) { + static NSURLResponse new1(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotificationCenter1, _lib._sel_new1); - return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); } - static NSNotificationCenter alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNotificationCenter1, _lib._sel_alloc1); - return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + static NSURLResponse alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); + return NSURLResponse._(_ret, _lib, retain: false, release: true); } } -class NSOperationQueue extends NSObject { - NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSURLCache extends NSObject { + NSURLCache._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. - static NSOperationQueue castFrom(T other) { - return NSOperationQueue._(other._id, other._lib, - retain: true, release: true); + /// Returns a [NSURLCache] that points to the same underlying object as [other]. + static NSURLCache castFrom(T other) { + return NSURLCache._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSOperationQueue] that wraps the given raw object pointer. - static NSOperationQueue castFromPointer( + /// Returns a [NSURLCache] that wraps the given raw object pointer. + static NSURLCache castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSOperationQueue._(other, lib, retain: retain, release: release); + return NSURLCache._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSOperationQueue]. + /// Returns whether [obj] is an instance of [NSURLCache]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOperationQueue1); + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); } - /// @property progress - /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue - /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the - /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the - /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super - /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress - /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% - /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 - /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be - /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by - /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving - /// progress scenario. - /// - /// @example - /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; - /// queue.progress.totalUnitCount = 10; - NSProgress? get progress { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_progress1); + /// ! + /// @property sharedURLCache + /// @abstract Returns the shared NSURLCache instance or + /// sets the NSURLCache instance shared by all clients of + /// the current process. This will be the new object returned when + /// calls to the sharedURLCache method are made. + /// @discussion Unless set explicitly through a call to + /// +setSharedURLCache:, this method returns an NSURLCache + /// instance created with the following default values: + ///
    + ///
  • Memory capacity: 4 megabytes (4 * 1024 * 1024 bytes) + ///
  • Disk capacity: 20 megabytes (20 * 1024 * 1024 bytes) + ///
  • Disk path: (user home directory)/Library/Caches/(application bundle id) + ///
+ ///

Users who do not have special caching requirements or + /// constraints should find the default shared cache instance + /// acceptable. If this default shared cache instance is not + /// acceptable, +setSharedURLCache: can be called to set a + /// different NSURLCache instance to be returned from this method. + /// Callers should take care to ensure that the setter is called + /// at a time when no other caller has a reference to the previously-set + /// shared URL cache. This is to prevent storing cache data from + /// becoming unexpectedly unretrievable. + /// @result the shared NSURLCache instance. + static NSURLCache? getSharedURLCache(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_320( + _lib._class_NSURLCache1, _lib._sel_sharedURLCache1); return _ret.address == 0 ? null - : NSProgress._(_ret, _lib, retain: true, release: true); + : NSURLCache._(_ret, _lib, retain: true, release: true); } - void addOperation_(NSOperation? op) { - return _lib._objc_msgSend_338( - _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); + /// ! + /// @property sharedURLCache + /// @abstract Returns the shared NSURLCache instance or + /// sets the NSURLCache instance shared by all clients of + /// the current process. This will be the new object returned when + /// calls to the sharedURLCache method are made. + /// @discussion Unless set explicitly through a call to + /// +setSharedURLCache:, this method returns an NSURLCache + /// instance created with the following default values: + ///

    + ///
  • Memory capacity: 4 megabytes (4 * 1024 * 1024 bytes) + ///
  • Disk capacity: 20 megabytes (20 * 1024 * 1024 bytes) + ///
  • Disk path: (user home directory)/Library/Caches/(application bundle id) + ///
+ ///

Users who do not have special caching requirements or + /// constraints should find the default shared cache instance + /// acceptable. If this default shared cache instance is not + /// acceptable, +setSharedURLCache: can be called to set a + /// different NSURLCache instance to be returned from this method. + /// Callers should take care to ensure that the setter is called + /// at a time when no other caller has a reference to the previously-set + /// shared URL cache. This is to prevent storing cache data from + /// becoming unexpectedly unretrievable. + /// @result the shared NSURLCache instance. + static void setSharedURLCache(NativeCupertinoHttp _lib, NSURLCache? value) { + _lib._objc_msgSend_321(_lib._class_NSURLCache1, + _lib._sel_setSharedURLCache_1, value?._id ?? ffi.nullptr); } - void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { - return _lib._objc_msgSend_344( + /// ! + /// @method initWithMemoryCapacity:diskCapacity:diskPath: + /// @abstract Initializes an NSURLCache with the given capacity and + /// path. + /// @discussion The returned NSURLCache is backed by disk, so + /// developers can be more liberal with space when choosing the + /// capacity for this kind of cache. A disk cache measured in the tens + /// of megabytes should be acceptable in most cases. + /// @param memoryCapacity the capacity, measured in bytes, for the cache in memory. + /// @param diskCapacity the capacity, measured in bytes, for the cache on disk. + /// @param path the path on disk where the cache data is stored. + /// @result an initialized NSURLCache, with the given capacity, backed + /// by disk. + NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( + int memoryCapacity, int diskCapacity, NSString? path) { + final _ret = _lib._objc_msgSend_322( _id, - _lib._sel_addOperations_waitUntilFinished_1, - ops?._id ?? ffi.nullptr, - wait); + _lib._sel_initWithMemoryCapacity_diskCapacity_diskPath_1, + memoryCapacity, + diskCapacity, + path?._id ?? ffi.nullptr); + return NSURLCache._(_ret, _lib, retain: true, release: true); } - void addOperationWithBlock_(ObjCBlock block) { - return _lib._objc_msgSend_345( - _id, _lib._sel_addOperationWithBlock_1, block._id); + /// ! + /// @method initWithMemoryCapacity:diskCapacity:directoryURL: + /// @abstract Initializes an NSURLCache with the given capacity and directory. + /// @param memoryCapacity the capacity, measured in bytes, for the cache in memory. Or 0 to disable memory cache. + /// @param diskCapacity the capacity, measured in bytes, for the cache on disk. Or 0 to disable disk cache. + /// @param directoryURL the path to a directory on disk where the cache data is stored. Or nil for default directory. + /// @result an initialized NSURLCache, with the given capacity, optionally backed by disk. + NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( + int memoryCapacity, int diskCapacity, NSURL? directoryURL) { + final _ret = _lib._objc_msgSend_323( + _id, + _lib._sel_initWithMemoryCapacity_diskCapacity_directoryURL_1, + memoryCapacity, + diskCapacity, + directoryURL?._id ?? ffi.nullptr); + return NSURLCache._(_ret, _lib, retain: true, release: true); } - /// @method addBarrierBlock: - /// @param barrier A block to execute - /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and - /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the - /// `dispatch_barrier_async` function. - void addBarrierBlock_(ObjCBlock barrier) { - return _lib._objc_msgSend_345( - _id, _lib._sel_addBarrierBlock_1, barrier._id); + /// ! + /// @method cachedResponseForRequest: + /// @abstract Returns the NSCachedURLResponse stored in the cache with + /// the given request. + /// @discussion The method returns nil if there is no + /// NSCachedURLResponse stored using the given request. + /// @param request the NSURLRequest to use as a key for the lookup. + /// @result The NSCachedURLResponse stored in the cache with the given + /// request, or nil if there is no NSCachedURLResponse stored with the + /// given request. + NSCachedURLResponse cachedResponseForRequest_(NSURLRequest? request) { + final _ret = _lib._objc_msgSend_339( + _id, _lib._sel_cachedResponseForRequest_1, request?._id ?? ffi.nullptr); + return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); } - int get maxConcurrentOperationCount { - return _lib._objc_msgSend_81(_id, _lib._sel_maxConcurrentOperationCount1); + /// ! + /// @method storeCachedResponse:forRequest: + /// @abstract Stores the given NSCachedURLResponse in the cache using + /// the given request. + /// @param cachedResponse The cached response to store. + /// @param request the NSURLRequest to use as a key for the storage. + void storeCachedResponse_forRequest_( + NSCachedURLResponse? cachedResponse, NSURLRequest? request) { + return _lib._objc_msgSend_340( + _id, + _lib._sel_storeCachedResponse_forRequest_1, + cachedResponse?._id ?? ffi.nullptr, + request?._id ?? ffi.nullptr); } - set maxConcurrentOperationCount(int value) { - _lib._objc_msgSend_346( - _id, _lib._sel_setMaxConcurrentOperationCount_1, value); + /// ! + /// @method removeCachedResponseForRequest: + /// @abstract Removes the NSCachedURLResponse from the cache that is + /// stored using the given request. + /// @discussion No action is taken if there is no NSCachedURLResponse + /// stored with the given request. + /// @param request the NSURLRequest to use as a key for the lookup. + void removeCachedResponseForRequest_(NSURLRequest? request) { + return _lib._objc_msgSend_341( + _id, + _lib._sel_removeCachedResponseForRequest_1, + request?._id ?? ffi.nullptr); } - bool get suspended { - return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); + /// ! + /// @method removeAllCachedResponses + /// @abstract Clears the given cache, removing all NSCachedURLResponse + /// objects that it stores. + void removeAllCachedResponses() { + return _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResponses1); } - set suspended(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setSuspended_1, value); + /// ! + /// @method removeCachedResponsesSince: + /// @abstract Clears the given cache of any cached responses since the provided date. + void removeCachedResponsesSinceDate_(NSDate? date) { + return _lib._objc_msgSend_349(_id, + _lib._sel_removeCachedResponsesSinceDate_1, date?._id ?? ffi.nullptr); } - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract In-memory capacity of the receiver. + /// @discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary. + /// @result The in-memory capacity, measured in bytes, for the receiver. + int get memoryCapacity { + return _lib._objc_msgSend_12(_id, _lib._sel_memoryCapacity1); } - set name(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + /// ! + /// @abstract In-memory capacity of the receiver. + /// @discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary. + /// @result The in-memory capacity, measured in bytes, for the receiver. + set memoryCapacity(int value) { + _lib._objc_msgSend_305(_id, _lib._sel_setMemoryCapacity_1, value); } - int get qualityOfService { - return _lib._objc_msgSend_342(_id, _lib._sel_qualityOfService1); + /// ! + /// @abstract The on-disk capacity of the receiver. + /// @discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary. + int get diskCapacity { + return _lib._objc_msgSend_12(_id, _lib._sel_diskCapacity1); } - set qualityOfService(int value) { - _lib._objc_msgSend_343(_id, _lib._sel_setQualityOfService_1, value); + /// ! + /// @abstract The on-disk capacity of the receiver. + /// @discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary. + set diskCapacity(int value) { + _lib._objc_msgSend_305(_id, _lib._sel_setDiskCapacity_1, value); } - /// actually retain - dispatch_queue_t get underlyingQueue { - return _lib._objc_msgSend_347(_id, _lib._sel_underlyingQueue1); + /// ! + /// @abstract Returns the current amount of space consumed by the + /// in-memory cache of the receiver. + /// @discussion This size, measured in bytes, indicates the current + /// usage of the in-memory cache. + /// @result the current usage of the in-memory cache of the receiver. + int get currentMemoryUsage { + return _lib._objc_msgSend_12(_id, _lib._sel_currentMemoryUsage1); } - /// actually retain - set underlyingQueue(dispatch_queue_t value) { - _lib._objc_msgSend_348(_id, _lib._sel_setUnderlyingQueue_1, value); + /// ! + /// @abstract Returns the current amount of space consumed by the + /// on-disk cache of the receiver. + /// @discussion This size, measured in bytes, indicates the current + /// usage of the on-disk cache. + /// @result the current usage of the on-disk cache of the receiver. + int get currentDiskUsage { + return _lib._objc_msgSend_12(_id, _lib._sel_currentDiskUsage1); } - void cancelAllOperations() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); - } - - void waitUntilAllOperationsAreFinished() { - return _lib._objc_msgSend_1( - _id, _lib._sel_waitUntilAllOperationsAreFinished1); - } - - static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_349( - _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); - } - - static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_349( - _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); + void storeCachedResponse_forDataTask_( + NSCachedURLResponse? cachedResponse, NSURLSessionDataTask? dataTask) { + return _lib._objc_msgSend_370( + _id, + _lib._sel_storeCachedResponse_forDataTask_1, + cachedResponse?._id ?? ffi.nullptr, + dataTask?._id ?? ffi.nullptr); } - /// These two functions are inherently a race condition and should be avoided if possible - NSArray? get operations { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_operations1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + void getCachedResponseForDataTask_completionHandler_( + NSURLSessionDataTask? dataTask, ObjCBlock19 completionHandler) { + return _lib._objc_msgSend_371( + _id, + _lib._sel_getCachedResponseForDataTask_completionHandler_1, + dataTask?._id ?? ffi.nullptr, + completionHandler._id); } - int get operationCount { - return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); + void removeCachedResponseForDataTask_(NSURLSessionDataTask? dataTask) { + return _lib._objc_msgSend_372( + _id, + _lib._sel_removeCachedResponseForDataTask_1, + dataTask?._id ?? ffi.nullptr); } - static NSOperationQueue new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); + static NSURLCache new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_new1); + return NSURLCache._(_ret, _lib, retain: false, release: true); } - static NSOperationQueue alloc(NativeCupertinoHttp _lib) { + static NSURLCache alloc(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_alloc1); + return NSURLCache._(_ret, _lib, retain: false, release: true); } } -class NSProgress extends NSObject { - NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSURLRequest extends NSObject { + NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSProgress] that points to the same underlying object as [other]. - static NSProgress castFrom(T other) { - return NSProgress._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSURLRequest] that points to the same underlying object as [other]. + static NSURLRequest castFrom(T other) { + return NSURLRequest._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSProgress] that wraps the given raw object pointer. - static NSProgress castFromPointer( + /// Returns a [NSURLRequest] that wraps the given raw object pointer. + static NSURLRequest castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSProgress._(other, lib, retain: retain, release: release); + return NSURLRequest._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSProgress]. + /// Returns whether [obj] is an instance of [NSURLRequest]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); - } - - static NSProgress currentProgress(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_322( - _lib._class_NSProgress1, _lib._sel_currentProgress1); - return NSProgress._(_ret, _lib, retain: true, release: true); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); } - static NSProgress progressWithTotalUnitCount_( - NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_323(_lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL? URL) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSURLRequest1, + _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + return NSURLRequest._(_ret, _lib, retain: true, release: true); } - static NSProgress discreteProgressWithTotalUnitCount_( - NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_323(_lib._class_NSProgress1, - _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_11( + _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); } - static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( NativeCupertinoHttp _lib, - int unitCount, - NSProgress? parent, - int portionOfParentTotalUnitCount) { + NSURL? URL, + int cachePolicy, + double timeoutInterval) { final _ret = _lib._objc_msgSend_324( - _lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, - unitCount, - parent?._id ?? ffi.nullptr, - portionOfParentTotalUnitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); - } - - NSProgress initWithParent_userInfo_( - NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { - final _ret = _lib._objc_msgSend_325( - _id, - _lib._sel_initWithParent_userInfo_1, - parentProgressOrNil?._id ?? ffi.nullptr, - userInfoOrNil?._id ?? ffi.nullptr); - return NSProgress._(_ret, _lib, retain: true, release: true); - } - - void becomeCurrentWithPendingUnitCount_(int unitCount) { - return _lib._objc_msgSend_326( - _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); - } - - void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock work) { - return _lib._objc_msgSend_327( - _id, - _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, - unitCount, - work._id); + _lib._class_NSURLRequest1, + _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); } - void resignCurrent() { - return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_(NSURL? URL) { + final _ret = _lib._objc_msgSend_201( + _id, _lib._sel_initWithURL_1, URL?._id ?? ffi.nullptr); + return NSURLRequest._(_ret, _lib, retain: true, release: true); } - void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { - return _lib._objc_msgSend_328( + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL and + /// cache policy. + /// @discussion This is the designated initializer for the + /// NSURLRequest class. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_cachePolicy_timeoutInterval_( + NSURL? URL, int cachePolicy, double timeoutInterval) { + final _ret = _lib._objc_msgSend_324( _id, - _lib._sel_addChild_withPendingUnitCount_1, - child?._id ?? ffi.nullptr, - inUnitCount); - } - - int get totalUnitCount { - return _lib._objc_msgSend_329(_id, _lib._sel_totalUnitCount1); - } - - set totalUnitCount(int value) { - _lib._objc_msgSend_330(_id, _lib._sel_setTotalUnitCount_1, value); - } - - int get completedUnitCount { - return _lib._objc_msgSend_329(_id, _lib._sel_completedUnitCount1); - } - - set completedUnitCount(int value) { - _lib._objc_msgSend_330(_id, _lib._sel_setCompletedUnitCount_1, value); - } - - NSString? get localizedDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set localizedDescription(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); + _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, + URL?._id ?? ffi.nullptr, + cachePolicy, + timeoutInterval); + return NSURLRequest._(_ret, _lib, retain: true, release: true); } - NSString? get localizedAdditionalDescription { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedAdditionalDescription1); + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + NSURL? get URL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set localizedAdditionalDescription(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setLocalizedAdditionalDescription_1, - value?._id ?? ffi.nullptr); - } - - bool get cancellable { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); - } - - set cancellable(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setCancellable_1, value); - } - - bool get pausable { - return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); - } - - set pausable(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setPausable_1, value); - } - - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); - } - - bool get paused { - return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); - } - - ObjCBlock get cancellationHandler { - final _ret = _lib._objc_msgSend_333(_id, _lib._sel_cancellationHandler1); - return ObjCBlock._(_ret, _lib); - } - - set cancellationHandler(ObjCBlock value) { - _lib._objc_msgSend_334(_id, _lib._sel_setCancellationHandler_1, value._id); - } - - ObjCBlock get pausingHandler { - final _ret = _lib._objc_msgSend_333(_id, _lib._sel_pausingHandler1); - return ObjCBlock._(_ret, _lib); - } - - set pausingHandler(ObjCBlock value) { - _lib._objc_msgSend_334(_id, _lib._sel_setPausingHandler_1, value._id); - } - - ObjCBlock get resumingHandler { - final _ret = _lib._objc_msgSend_333(_id, _lib._sel_resumingHandler1); - return ObjCBlock._(_ret, _lib); - } - - set resumingHandler(ObjCBlock value) { - _lib._objc_msgSend_334(_id, _lib._sel_setResumingHandler_1, value._id); - } - - void setUserInfoObject_forKey_( - NSObject objectOrNil, NSProgressUserInfoKey key) { - return _lib._objc_msgSend_189( - _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); - } - - bool get indeterminate { - return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); - } - - double get fractionCompleted { - return _lib._objc_msgSend_85(_id, _lib._sel_fractionCompleted1); - } - - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); - } - - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + : NSURL._(_ret, _lib, retain: true, release: true); } - void pause() { - return _lib._objc_msgSend_1(_id, _lib._sel_pause1); + /// ! + /// @abstract Returns the cache policy of the receiver. + /// @result The cache policy of the receiver. + int get cachePolicy { + return _lib._objc_msgSend_325(_id, _lib._sel_cachePolicy1); } - void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + /// ! + /// @abstract Returns the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + /// @result The timeout interval of the receiver. + double get timeoutInterval { + return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + /// ! + /// @abstract The main document URL associated with this load. + /// @discussion This URL is used for the cookie "same domain as main + /// document" policy, and attributing the request as a sub-resource + /// of a user-specified URL. There may also be other future uses. + /// See setMainDocumentURL: + /// @result The main document URL. + NSURL? get mainDocumentURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSProgressKind get kind { - return _lib._objc_msgSend_32(_id, _lib._sel_kind1); + : NSURL._(_ret, _lib, retain: true, release: true); } - set kind(NSProgressKind value) { - _lib._objc_msgSend_331(_id, _lib._sel_setKind_1, value); + /// ! + /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. + /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have + /// not explicitly set a networkServiceType (using the setNetworkServiceType method). + /// @result The NSURLRequestNetworkServiceType associated with this request. + int get networkServiceType { + return _lib._objc_msgSend_326(_id, _lib._sel_networkServiceType1); } - NSNumber? get estimatedTimeRemaining { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_estimatedTimeRemaining1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @result YES if the receiver is allowed to use the built in cellular radios to + /// satisfy the request, NO otherwise. + bool get allowsCellularAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); } - set estimatedTimeRemaining(NSNumber? value) { - _lib._objc_msgSend_335( - _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @result YES if the receiver is allowed to use an interface marked as expensive to + /// satisfy the request, NO otherwise. + bool get allowsExpensiveNetworkAccess { + return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); } - NSNumber? get throughput { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_throughput1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @result YES if the receiver is allowed to use an interface marked as constrained to + /// satisfy the request, NO otherwise. + bool get allowsConstrainedNetworkAccess { + return _lib._objc_msgSend_11( + _id, _lib._sel_allowsConstrainedNetworkAccess1); } - set throughput(NSNumber? value) { - _lib._objc_msgSend_335( - _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + bool get assumesHTTP3Capable { + return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); } - NSProgressFileOperationKind get fileOperationKind { - return _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); + /// ! + /// @abstract Returns the NSURLRequestAttribution associated with this request. + /// @discussion This will return NSURLRequestAttributionDeveloper for requests that + /// have not explicitly set an attribution. + /// @result The NSURLRequestAttribution associated with this request. + int get attribution { + return _lib._objc_msgSend_327(_id, _lib._sel_attribution1); } - set fileOperationKind(NSProgressFileOperationKind value) { - _lib._objc_msgSend_331(_id, _lib._sel_setFileOperationKind_1, value); + /// ! + /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. + /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, + /// No otherwise. Defaults to NO. + bool get requiresDNSSECValidation { + return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); } - NSURL? get fileURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileURL1); + /// ! + /// @abstract Returns the HTTP request method of the receiver. + /// @result the HTTP request method of the receiver. + NSString? get HTTPMethod { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - set fileURL(NSURL? value) { - _lib._objc_msgSend_336( - _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + : NSString._(_ret, _lib, retain: true, release: true); } - NSNumber? get fileTotalCount { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileTotalCount1); + /// ! + /// @abstract Returns a dictionary containing all the HTTP header fields + /// of the receiver. + /// @result a dictionary containing all the HTTP header fields of the + /// receiver. + NSDictionary? get allHTTPHeaderFields { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + : NSDictionary._(_ret, _lib, retain: true, release: true); } - set fileTotalCount(NSNumber? value) { - _lib._objc_msgSend_335( - _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + /// ! + /// @method valueForHTTPHeaderField: + /// @abstract Returns the value which corresponds to the given header + /// field. Note that, in keeping with the HTTP RFC, HTTP header field + /// names are case-insensitive. + /// @param field the header field name to use for the lookup + /// (case-insensitive). + /// @result the value associated with the given header field, or nil if + /// there is no value associated with the given header field. + NSString valueForHTTPHeaderField_(NSString? field) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); + return NSString._(_ret, _lib, retain: true, release: true); } - NSNumber? get fileCompletedCount { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileCompletedCount1); + /// ! + /// @abstract Returns the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + /// @result The request body data of the receiver. + NSData? get HTTPBody { + final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - set fileCompletedCount(NSNumber? value) { - _lib._objc_msgSend_335( - _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); - } - - void publish() { - return _lib._objc_msgSend_1(_id, _lib._sel_publish1); - } - - void unpublish() { - return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + : NSData._(_ret, _lib, retain: true, release: true); } - static NSObject addSubscriberForFileURL_withPublishingHandler_( - NativeCupertinoHttp _lib, - NSURL? url, - NSProgressPublishingHandler publishingHandler) { - final _ret = _lib._objc_msgSend_337( - _lib._class_NSProgress1, - _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, - url?._id ?? ffi.nullptr, - publishingHandler); - return NSObject._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns the request body stream of the receiver + /// if any has been set + /// @discussion The stream is returned for examination only; it is + /// not safe for the caller to manipulate the stream in any way. Also + /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only + /// one can be set on a given request. Also note that the body stream is + /// preserved across copies, but is LOST when the request is coded via the + /// NSCoding protocol + /// @result The request body stream of the receiver. + NSInputStream? get HTTPBodyStream { + final _ret = _lib._objc_msgSend_338(_id, _lib._sel_HTTPBodyStream1); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); } - static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { - return _lib._objc_msgSend_200( - _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + /// ! + /// @abstract Determine whether default cookie handling will happen for + /// this request. + /// @discussion NOTE: This value is not used prior to 10.3 + /// @result YES if cookies will be sent with and set for this request; + /// otherwise NO. + bool get HTTPShouldHandleCookies { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); } - bool get old { - return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); + /// ! + /// @abstract Reports whether the receiver is not expected to wait for the + /// previous response before transmitting. + /// @result YES if the receiver should transmit before the previous response + /// is received. NO if the receiver should wait for the previous response + /// before transmitting. + bool get HTTPShouldUsePipelining { + return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); } - static NSProgress new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); - return NSProgress._(_ret, _lib, retain: false, release: true); + static NSURLRequest new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); } - static NSProgress alloc(NativeCupertinoHttp _lib) { + static NSURLRequest alloc(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); - return NSProgress._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); + return NSURLRequest._(_ret, _lib, retain: false, release: true); } } -typedef NSProgressUserInfoKey = ffi.Pointer; -typedef NSProgressKind = ffi.Pointer; -typedef NSProgressFileOperationKind = ffi.Pointer; -typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; -NSProgressUnpublishingHandler _ObjCBlock18_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>()(arg0); -} - -final _ObjCBlock18_closureRegistry = {}; -int _ObjCBlock18_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock18_registerClosure(Function fn) { - final id = ++_ObjCBlock18_closureRegistryIndex; - _ObjCBlock18_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -NSProgressUnpublishingHandler _ObjCBlock18_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock18_closureRegistry[block.ref.target.address]!(arg0); -} - -class ObjCBlock18 extends _ObjCBlockBase { - ObjCBlock18._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock18.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock18_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock18.fromFunction(NativeCupertinoHttp lib, - NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock18_closureTrampoline) - .cast(), - _ObjCBlock18_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - NSProgressUnpublishingHandler call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } -} - -typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; - -class NSOperation extends NSObject { - NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSOperation] that points to the same underlying object as [other]. - static NSOperation castFrom(T other) { - return NSOperation._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSOperation] that wraps the given raw object pointer. - static NSOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperation._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); - } - - void start() { - return _lib._objc_msgSend_1(_id, _lib._sel_start1); - } - - void main() { - return _lib._objc_msgSend_1(_id, _lib._sel_main1); - } - - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); - } - - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } - - bool get executing { - return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); - } - - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); - } - - /// To be deprecated; use and override 'asynchronous' below - bool get concurrent { - return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); - } - - bool get asynchronous { - return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); - } - - bool get ready { - return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); - } - - void addDependency_(NSOperation? op) { - return _lib._objc_msgSend_338( - _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); - } - - void removeDependency_(NSOperation? op) { - return _lib._objc_msgSend_338( - _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); - } - - NSArray? get dependencies { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_dependencies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - int get queuePriority { - return _lib._objc_msgSend_339(_id, _lib._sel_queuePriority1); - } - - set queuePriority(int value) { - _lib._objc_msgSend_340(_id, _lib._sel_setQueuePriority_1, value); - } - - ObjCBlock get completionBlock { - final _ret = _lib._objc_msgSend_333(_id, _lib._sel_completionBlock1); - return ObjCBlock._(_ret, _lib); - } - - set completionBlock(ObjCBlock value) { - _lib._objc_msgSend_334(_id, _lib._sel_setCompletionBlock_1, value._id); - } - - void waitUntilFinished() { - return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); - } - - double get threadPriority { - return _lib._objc_msgSend_85(_id, _lib._sel_threadPriority1); - } - - set threadPriority(double value) { - _lib._objc_msgSend_341(_id, _lib._sel_setThreadPriority_1, value); - } - - int get qualityOfService { - return _lib._objc_msgSend_342(_id, _lib._sel_qualityOfService1); - } - - set qualityOfService(int value) { - _lib._objc_msgSend_343(_id, _lib._sel_setQualityOfService_1, value); - } - - NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set name(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); - } - - static NSOperation new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); - return NSOperation._(_ret, _lib, retain: false, release: true); - } - - static NSOperation alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); - return NSOperation._(_ret, _lib, retain: false, release: true); - } -} - -abstract class NSOperationQueuePriority { - static const int NSOperationQueuePriorityVeryLow = -8; - static const int NSOperationQueuePriorityLow = -4; - static const int NSOperationQueuePriorityNormal = 0; - static const int NSOperationQueuePriorityHigh = 4; - static const int NSOperationQueuePriorityVeryHigh = 8; -} - -typedef dispatch_queue_t = ffi.Pointer; -void _ObjCBlock19_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} - -final _ObjCBlock19_closureRegistry = {}; -int _ObjCBlock19_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock19_registerClosure(Function fn) { - final id = ++_ObjCBlock19_closureRegistryIndex; - _ObjCBlock19_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock19_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock19_closureRegistry[block.ref.target.address]!(arg0); -} - -class ObjCBlock19 extends _ObjCBlockBase { - ObjCBlock19._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock19.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock19_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock19.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock19_closureTrampoline) - .cast(), - _ObjCBlock19_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } -} - -class NSDate extends NSObject { - NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSDate] that points to the same underlying object as [other]. - static NSDate castFrom(T other) { - return NSDate._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSDate] that wraps the given raw object pointer. - static NSDate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDate._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSDate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); - } - - double get timeIntervalSinceReferenceDate { - return _lib._objc_msgSend_85( - _id, _lib._sel_timeIntervalSinceReferenceDate1); - } - - @override - NSDate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _lib._objc_msgSend_351( - _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - double timeIntervalSinceDate_(NSDate? anotherDate) { - return _lib._objc_msgSend_352(_id, _lib._sel_timeIntervalSinceDate_1, - anotherDate?._id ?? ffi.nullptr); - } - - double get timeIntervalSinceNow { - return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSinceNow1); - } - - double get timeIntervalSince1970 { - return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSince19701); - } - - NSObject addTimeInterval_(double seconds) { - final _ret = - _lib._objc_msgSend_351(_id, _lib._sel_addTimeInterval_1, seconds); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSDate dateByAddingTimeInterval_(double ti) { - final _ret = - _lib._objc_msgSend_351(_id, _lib._sel_dateByAddingTimeInterval_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate earlierDate_(NSDate? anotherDate) { - final _ret = _lib._objc_msgSend_353( - _id, _lib._sel_earlierDate_1, anotherDate?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate laterDate_(NSDate? anotherDate) { - final _ret = _lib._objc_msgSend_353( - _id, _lib._sel_laterDate_1, anotherDate?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - int compare_(NSDate? other) { - return _lib._objc_msgSend_354( - _id, _lib._sel_compare_1, other?._id ?? ffi.nullptr); - } - - bool isEqualToDate_(NSDate? otherDate) { - return _lib._objc_msgSend_355( - _id, _lib._sel_isEqualToDate_1, otherDate?._id ?? ffi.nullptr); - } - - NSString? get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSDate date(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSinceNow_( - NativeCupertinoHttp _lib, double secs) { - final _ret = _lib._objc_msgSend_351( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSinceReferenceDate_( - NativeCupertinoHttp _lib, double ti) { - final _ret = _lib._objc_msgSend_351(_lib._class_NSDate1, - _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSince1970_( - NativeCupertinoHttp _lib, double secs) { - final _ret = _lib._objc_msgSend_351( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate dateWithTimeInterval_sinceDate_( - NativeCupertinoHttp _lib, double secsToBeAdded, NSDate? date) { - final _ret = _lib._objc_msgSend_356( - _lib._class_NSDate1, - _lib._sel_dateWithTimeInterval_sinceDate_1, - secsToBeAdded, - date?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate? getDistantFuture(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_357(_lib._class_NSDate1, _lib._sel_distantFuture1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate? getDistantPast(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_357(_lib._class_NSDate1, _lib._sel_distantPast1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate? getNow(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_357(_lib._class_NSDate1, _lib._sel_now1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _lib._objc_msgSend_351( - _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _lib._objc_msgSend_351( - _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate? date) { - final _ret = _lib._objc_msgSend_356( - _id, - _lib._sel_initWithTimeInterval_sinceDate_1, - secsToBeAdded, - date?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); - } - - static NSDate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); - return NSDate._(_ret, _lib, retain: false, release: true); - } - - static NSDate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); - return NSDate._(_ret, _lib, retain: false, release: true); - } -} - -typedef NSTimeInterval = ffi.Double; - /// ! /// @enum NSURLRequestCachePolicy /// @@ -69846,6 +69827,8 @@ abstract class NSURLRequestCachePolicy { static const int NSURLRequestReloadRevalidatingCacheData = 5; } +typedef NSTimeInterval = ffi.Double; + /// ! /// @enum NSURLRequestNetworkServiceType /// @@ -69920,819 +69903,2090 @@ abstract class NSURLRequestAttribution { static const int NSURLRequestAttributionUser = 1; } -/// ! -/// @class NSURLRequest -/// -/// @abstract An NSURLRequest object represents a URL load request in a -/// manner independent of protocol and URL scheme. -/// -/// @discussion NSURLRequest encapsulates two basic data elements about -/// a URL load request: -///

    -///
  • The URL to load. -///
  • The policy to use when consulting the URL content cache made -/// available by the implementation. -///
-/// In addition, NSURLRequest is designed to be extended to support -/// protocol-specific data by adding categories to access a property -/// object provided in an interface targeted at protocol implementors. -///
    -///
  • Protocol implementors should direct their attention to the -/// NSURLRequestExtensibility category on NSURLRequest for more -/// information on how to provide extensions on NSURLRequest to -/// support protocol-specific request information. -///
  • Clients of this API who wish to create NSURLRequest objects to -/// load URL content should consult the protocol-specific NSURLRequest -/// categories that are available. The NSHTTPURLRequest category on -/// NSURLRequest is an example. -///
-///

-/// Objects of this class are used to create NSURLConnection instances, -/// which can are used to perform the load of a URL, or as input to the -/// NSURLConnection class method which performs synchronous loads. -class NSURLRequest extends NSObject { - NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSInputStream extends NSStream { + NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSURLRequest] that points to the same underlying object as [other]. - static NSURLRequest castFrom(T other) { - return NSURLRequest._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSInputStream] that points to the same underlying object as [other]. + static NSInputStream castFrom(T other) { + return NSInputStream._(other._id, other._lib, retain: true, release: true); } - /// Returns a [NSURLRequest] that wraps the given raw object pointer. - static NSURLRequest castFromPointer( + /// Returns a [NSInputStream] that wraps the given raw object pointer. + static NSInputStream castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSURLRequest._(other, lib, retain: retain, release: release); + return NSInputStream._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSURLRequest]. + /// Returns whether [obj] is an instance of [NSInputStream]. static bool isInstance(_ObjCWrapper obj) { return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); } - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL? URL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSURLRequest1, - _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + int read_maxLength_(ffi.Pointer buffer, int len) { + return _lib._objc_msgSend_332(_id, _lib._sel_read_maxLength_1, buffer, len); } - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_11( - _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); + bool getBuffer_length_( + ffi.Pointer> buffer, ffi.Pointer len) { + return _lib._objc_msgSend_337( + _id, _lib._sel_getBuffer_length_1, buffer, len); } - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NativeCupertinoHttp _lib, - NSURL? URL, - int cachePolicy, - double timeoutInterval) { - final _ret = _lib._objc_msgSend_358( - _lib._class_NSURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + bool get hasBytesAvailable { + return _lib._objc_msgSend_11(_id, _lib._sel_hasBytesAvailable1); } - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_(NSURL? URL) { + NSInputStream initWithData_(NSData? data) { + final _ret = _lib._objc_msgSend_217( + _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + return NSInputStream._(_ret, _lib, retain: true, release: true); + } + + NSInputStream initWithURL_(NSURL? url) { final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithURL_1, URL?._id ?? ffi.nullptr); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + _id, _lib._sel_initWithURL_1, url?._id ?? ffi.nullptr); + return NSInputStream._(_ret, _lib, retain: true, release: true); } - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL and - /// cache policy. - /// @discussion This is the designated initializer for the - /// NSURLRequest class. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL? URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_358( - _id, - _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + NSInputStream initWithFileAtPath_(NSString? path) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_initWithFileAtPath_1, path?._id ?? ffi.nullptr); + return NSInputStream._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static NSInputStream inputStreamWithData_( + NativeCupertinoHttp _lib, NSData? data) { + final _ret = _lib._objc_msgSend_217(_lib._class_NSInputStream1, + _lib._sel_inputStreamWithData_1, data?._id ?? ffi.nullptr); + return NSInputStream._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the cache policy of the receiver. - /// @result The cache policy of the receiver. - int get cachePolicy { - return _lib._objc_msgSend_359(_id, _lib._sel_cachePolicy1); + static NSInputStream inputStreamWithFileAtPath_( + NativeCupertinoHttp _lib, NSString? path) { + final _ret = _lib._objc_msgSend_42(_lib._class_NSInputStream1, + _lib._sel_inputStreamWithFileAtPath_1, path?._id ?? ffi.nullptr); + return NSInputStream._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - /// @result The timeout interval of the receiver. - double get timeoutInterval { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); + static NSInputStream inputStreamWithURL_( + NativeCupertinoHttp _lib, NSURL? url) { + final _ret = _lib._objc_msgSend_201(_lib._class_NSInputStream1, + _lib._sel_inputStreamWithURL_1, url?._id ?? ffi.nullptr); + return NSInputStream._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract The main document URL associated with this load. - /// @discussion This URL is used for the cookie "same domain as main - /// document" policy, and attributing the request as a sub-resource - /// of a user-specified URL. There may also be other future uses. - /// See setMainDocumentURL: - /// @result The main document URL. - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + static void getStreamsToHostWithName_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSString? hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_334( + _lib._class_NSInputStream1, + _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, + hostname?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); } - /// ! - /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. - /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have - /// not explicitly set a networkServiceType (using the setNetworkServiceType method). - /// @result The NSURLRequestNetworkServiceType associated with this request. - int get networkServiceType { - return _lib._objc_msgSend_360(_id, _lib._sel_networkServiceType1); + static void getStreamsToHost_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSHost? host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_335( + _lib._class_NSInputStream1, + _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, + host?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); } - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @result YES if the receiver is allowed to use the built in cellular radios to - /// satisfy the request, NO otherwise. - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + NativeCupertinoHttp _lib, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_336( + _lib._class_NSInputStream1, + _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, + bufferSize, + inputStream, + outputStream); } - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @result YES if the receiver is allowed to use an interface marked as expensive to - /// satisfy the request, NO otherwise. - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); + static NSInputStream new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_new1); + return NSInputStream._(_ret, _lib, retain: false, release: true); } - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @result YES if the receiver is allowed to use an interface marked as constrained to - /// satisfy the request, NO otherwise. - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); + static NSInputStream alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_alloc1); + return NSInputStream._(_ret, _lib, retain: false, release: true); } +} - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); +class NSStream extends NSObject { + NSStream._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSStream] that points to the same underlying object as [other]. + static NSStream castFrom(T other) { + return NSStream._(other._id, other._lib, retain: true, release: true); } - /// ! - /// @abstract Returns the NSURLRequestAttribution associated with this request. - /// @discussion This will return NSURLRequestAttributionDeveloper for requests that - /// have not explicitly set an attribution. - /// @result The NSURLRequestAttribution associated with this request. - int get attribution { - return _lib._objc_msgSend_361(_id, _lib._sel_attribution1); + /// Returns a [NSStream] that wraps the given raw object pointer. + static NSStream castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSStream._(other, lib, retain: retain, release: release); } - /// ! - /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. - /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, - /// No otherwise. Defaults to NO. - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); + /// Returns whether [obj] is an instance of [NSStream]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSStream1); } - /// ! - /// @abstract Returns the HTTP request method of the receiver. - /// @result the HTTP request method of the receiver. - NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + void open() { + return _lib._objc_msgSend_1(_id, _lib._sel_open1); } - /// ! - /// @abstract Returns a dictionary containing all the HTTP header fields - /// of the receiver. - /// @result a dictionary containing all the HTTP header fields of the - /// receiver. - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); + void close() { + return _lib._objc_msgSend_1(_id, _lib._sel_close1); + } + + NSObject? get delegate { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); return _ret.address == 0 ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + : NSObject._(_ret, _lib, retain: true, release: true); } - /// ! - /// @method valueForHTTPHeaderField: - /// @abstract Returns the value which corresponds to the given header - /// field. Note that, in keeping with the HTTP RFC, HTTP header field - /// names are case-insensitive. - /// @param field the header field name to use for the lookup - /// (case-insensitive). - /// @result the value associated with the given header field, or nil if - /// there is no value associated with the given header field. - NSString valueForHTTPHeaderField_(NSString? field) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + set delegate(NSObject? value) { + _lib._objc_msgSend_328( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); } - /// ! - /// @abstract Returns the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - /// @result The request body data of the receiver. - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + NSObject propertyForKey_(NSStreamPropertyKey key) { + final _ret = _lib._objc_msgSend_42(_id, _lib._sel_propertyForKey_1, key); + return NSObject._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Returns the request body stream of the receiver - /// if any has been set - /// @discussion The stream is returned for examination only; it is - /// not safe for the caller to manipulate the stream in any way. Also - /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only - /// one can be set on a given request. Also note that the body stream is - /// preserved across copies, but is LOST when the request is coded via the - /// NSCoding protocol - /// @result The request body stream of the receiver. - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_372(_id, _lib._sel_HTTPBodyStream1); + bool setProperty_forKey_(NSObject property, NSStreamPropertyKey key) { + return _lib._objc_msgSend_199( + _id, _lib._sel_setProperty_forKey_1, property._id, key); + } + + void scheduleInRunLoop_forMode_(NSRunLoop? aRunLoop, NSRunLoopMode mode) { + return _lib._objc_msgSend_329(_id, _lib._sel_scheduleInRunLoop_forMode_1, + aRunLoop?._id ?? ffi.nullptr, mode); + } + + void removeFromRunLoop_forMode_(NSRunLoop? aRunLoop, NSRunLoopMode mode) { + return _lib._objc_msgSend_329(_id, _lib._sel_removeFromRunLoop_forMode_1, + aRunLoop?._id ?? ffi.nullptr, mode); + } + + int get streamStatus { + return _lib._objc_msgSend_330(_id, _lib._sel_streamStatus1); + } + + NSError? get streamError { + final _ret = _lib._objc_msgSend_331(_id, _lib._sel_streamError1); return _ret.address == 0 ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + : NSError._(_ret, _lib, retain: true, release: true); } - /// ! - /// @abstract Determine whether default cookie handling will happen for - /// this request. - /// @discussion NOTE: This value is not used prior to 10.3 - /// @result YES if cookies will be sent with and set for this request; - /// otherwise NO. - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); + static void getStreamsToHostWithName_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSString? hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_334( + _lib._class_NSStream1, + _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, + hostname?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); } - /// ! - /// @abstract Reports whether the receiver is not expected to wait for the - /// previous response before transmitting. - /// @result YES if the receiver should transmit before the previous response - /// is received. NO if the receiver should wait for the previous response - /// before transmitting. - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + static void getStreamsToHost_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSHost? host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_335( + _lib._class_NSStream1, + _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, + host?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } + + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + NativeCupertinoHttp _lib, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_336( + _lib._class_NSStream1, + _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, + bufferSize, + inputStream, + outputStream); + } + + static NSStream new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_new1); + return NSStream._(_ret, _lib, retain: false, release: true); + } + + static NSStream alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_alloc1); + return NSStream._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSStreamPropertyKey = ffi.Pointer; + +class NSRunLoop extends _ObjCWrapper { + NSRunLoop._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSRunLoop] that points to the same underlying object as [other]. + static NSRunLoop castFrom(T other) { + return NSRunLoop._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSRunLoop] that wraps the given raw object pointer. + static NSRunLoop castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSRunLoop._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSRunLoop]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSRunLoop1); + } +} + +typedef NSRunLoopMode = ffi.Pointer; + +abstract class NSStreamStatus { + static const int NSStreamStatusNotOpen = 0; + static const int NSStreamStatusOpening = 1; + static const int NSStreamStatusOpen = 2; + static const int NSStreamStatusReading = 3; + static const int NSStreamStatusWriting = 4; + static const int NSStreamStatusAtEnd = 5; + static const int NSStreamStatusClosed = 6; + static const int NSStreamStatusError = 7; +} + +class NSOutputStream extends NSStream { + NSOutputStream._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSOutputStream] that points to the same underlying object as [other]. + static NSOutputStream castFrom(T other) { + return NSOutputStream._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSOutputStream] that wraps the given raw object pointer. + static NSOutputStream castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOutputStream._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSOutputStream]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOutputStream1); + } + + int write_maxLength_(ffi.Pointer buffer, int len) { + return _lib._objc_msgSend_332( + _id, _lib._sel_write_maxLength_1, buffer, len); + } + + bool get hasSpaceAvailable { + return _lib._objc_msgSend_11(_id, _lib._sel_hasSpaceAvailable1); + } + + NSOutputStream initToMemory() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initToMemory1); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + NSOutputStream initToBuffer_capacity_( + ffi.Pointer buffer, int capacity) { + final _ret = _lib._objc_msgSend_333( + _id, _lib._sel_initToBuffer_capacity_1, buffer, capacity); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + NSOutputStream initWithURL_append_(NSURL? url, bool shouldAppend) { + final _ret = _lib._objc_msgSend_206(_id, _lib._sel_initWithURL_append_1, + url?._id ?? ffi.nullptr, shouldAppend); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + NSOutputStream initToFileAtPath_append_(NSString? path, bool shouldAppend) { + final _ret = _lib._objc_msgSend_41(_id, _lib._sel_initToFileAtPath_append_1, + path?._id ?? ffi.nullptr, shouldAppend); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream outputStreamToMemory(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSOutputStream1, _lib._sel_outputStreamToMemory1); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream outputStreamToBuffer_capacity_( + NativeCupertinoHttp _lib, ffi.Pointer buffer, int capacity) { + final _ret = _lib._objc_msgSend_333(_lib._class_NSOutputStream1, + _lib._sel_outputStreamToBuffer_capacity_1, buffer, capacity); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream outputStreamToFileAtPath_append_( + NativeCupertinoHttp _lib, NSString? path, bool shouldAppend) { + final _ret = _lib._objc_msgSend_41( + _lib._class_NSOutputStream1, + _lib._sel_outputStreamToFileAtPath_append_1, + path?._id ?? ffi.nullptr, + shouldAppend); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static NSOutputStream outputStreamWithURL_append_( + NativeCupertinoHttp _lib, NSURL? url, bool shouldAppend) { + final _ret = _lib._objc_msgSend_206( + _lib._class_NSOutputStream1, + _lib._sel_outputStreamWithURL_append_1, + url?._id ?? ffi.nullptr, + shouldAppend); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + + static void getStreamsToHostWithName_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSString? hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_334( + _lib._class_NSOutputStream1, + _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, + hostname?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } + + static void getStreamsToHost_port_inputStream_outputStream_( + NativeCupertinoHttp _lib, + NSHost? host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_335( + _lib._class_NSOutputStream1, + _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, + host?._id ?? ffi.nullptr, + port, + inputStream, + outputStream); + } + + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + NativeCupertinoHttp _lib, + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _lib._objc_msgSend_336( + _lib._class_NSOutputStream1, + _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, + bufferSize, + inputStream, + outputStream); + } + + static NSOutputStream new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_new1); + return NSOutputStream._(_ret, _lib, retain: false, release: true); + } + + static NSOutputStream alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_alloc1); + return NSOutputStream._(_ret, _lib, retain: false, release: true); + } +} + +class NSHost extends _ObjCWrapper { + NSHost._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSHost] that points to the same underlying object as [other]. + static NSHost castFrom(T other) { + return NSHost._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSHost] that wraps the given raw object pointer. + static NSHost castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSHost._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSHost]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHost1); + } +} + +class NSDate extends NSObject { + NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSDate] that points to the same underlying object as [other]. + static NSDate castFrom(T other) { + return NSDate._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSDate] that wraps the given raw object pointer. + static NSDate castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSDate._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSDate]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); + } + + double get timeIntervalSinceReferenceDate { + return _lib._objc_msgSend_85( + _id, _lib._sel_timeIntervalSinceReferenceDate1); + } + + @override + NSDate init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _lib._objc_msgSend_342( + _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + double timeIntervalSinceDate_(NSDate? anotherDate) { + return _lib._objc_msgSend_343(_id, _lib._sel_timeIntervalSinceDate_1, + anotherDate?._id ?? ffi.nullptr); + } + + double get timeIntervalSinceNow { + return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSinceNow1); + } + + double get timeIntervalSince1970 { + return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSince19701); + } + + NSObject addTimeInterval_(double seconds) { + final _ret = + _lib._objc_msgSend_342(_id, _lib._sel_addTimeInterval_1, seconds); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSDate dateByAddingTimeInterval_(double ti) { + final _ret = + _lib._objc_msgSend_342(_id, _lib._sel_dateByAddingTimeInterval_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate earlierDate_(NSDate? anotherDate) { + final _ret = _lib._objc_msgSend_344( + _id, _lib._sel_earlierDate_1, anotherDate?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate laterDate_(NSDate? anotherDate) { + final _ret = _lib._objc_msgSend_344( + _id, _lib._sel_laterDate_1, anotherDate?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + int compare_(NSDate? other) { + return _lib._objc_msgSend_345( + _id, _lib._sel_compare_1, other?._id ?? ffi.nullptr); + } + + bool isEqualToDate_(NSDate? otherDate) { + return _lib._objc_msgSend_346( + _id, _lib._sel_isEqualToDate_1, otherDate?._id ?? ffi.nullptr); + } + + NSString? get description { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject locale) { + final _ret = _lib._objc_msgSend_88( + _id, _lib._sel_descriptionWithLocale_1, locale._id); + return NSString._(_ret, _lib, retain: true, release: true); + } + + static NSDate date(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSinceNow_( + NativeCupertinoHttp _lib, double secs) { + final _ret = _lib._objc_msgSend_342( + _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSinceReferenceDate_( + NativeCupertinoHttp _lib, double ti) { + final _ret = _lib._objc_msgSend_342(_lib._class_NSDate1, + _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSince1970_( + NativeCupertinoHttp _lib, double secs) { + final _ret = _lib._objc_msgSend_342( + _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate dateWithTimeInterval_sinceDate_( + NativeCupertinoHttp _lib, double secsToBeAdded, NSDate? date) { + final _ret = _lib._objc_msgSend_347( + _lib._class_NSDate1, + _lib._sel_dateWithTimeInterval_sinceDate_1, + secsToBeAdded, + date?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate? getDistantFuture(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_348(_lib._class_NSDate1, _lib._sel_distantFuture1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate? getDistantPast(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_348(_lib._class_NSDate1, _lib._sel_distantPast1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate? getNow(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_348(_lib._class_NSDate1, _lib._sel_now1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeIntervalSinceNow_(double secs) { + final _ret = _lib._objc_msgSend_342( + _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeIntervalSince1970_(double secs) { + final _ret = _lib._objc_msgSend_342( + _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate? date) { + final _ret = _lib._objc_msgSend_347( + _id, + _lib._sel_initWithTimeInterval_sinceDate_1, + secsToBeAdded, + date?._id ?? ffi.nullptr); + return NSDate._(_ret, _lib, retain: true, release: true); + } + + static NSDate new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); + return NSDate._(_ret, _lib, retain: false, release: true); + } + + static NSDate alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); + return NSDate._(_ret, _lib, retain: false, release: true); + } +} + +class NSURLSessionDataTask extends NSURLSessionTask { + NSURLSessionDataTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. + static NSURLSessionDataTask castFrom(T other) { + return NSURLSessionDataTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. + static NSURLSessionDataTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionDataTask._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionDataTask1); + } + + @override + NSURLSessionDataTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionDataTask new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionDataTask alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } +} + +/// NSURLSessionTask - a cancelable object that refers to the lifetime +/// of processing a given request. +class NSURLSessionTask extends NSObject { + NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. + static NSURLSessionTask castFrom(T other) { + return NSURLSessionTask._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. + static NSURLSessionTask castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSURLSessionTask._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSURLSessionTask]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSURLSessionTask1); + } + + /// an identifier for this task, assigned by and unique to the owning session + int get taskIdentifier { + return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); + } + + /// may be nil if this is a stream task + NSURLRequest? get originalRequest { + final _ret = _lib._objc_msgSend_350(_id, _lib._sel_originalRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// may differ from originalRequest due to http server redirection + NSURLRequest? get currentRequest { + final _ret = _lib._objc_msgSend_350(_id, _lib._sel_currentRequest1); + return _ret.address == 0 + ? null + : NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// may be nil if no response has been received + NSURLResponse? get response { + final _ret = _lib._objc_msgSend_318(_id, _lib._sel_response1); + return _ret.address == 0 + ? null + : NSURLResponse._(_ret, _lib, retain: true, release: true); + } + + /// Sets a task-specific delegate. Methods not implemented on this delegate will + /// still be forwarded to the session delegate. + /// + /// Cannot be modified after task resumes. Not supported on background session. + /// + /// Delegate is strongly referenced until the task completes, after which it is + /// reset to `nil`. + NSObject? get delegate { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + /// Sets a task-specific delegate. Methods not implemented on this delegate will + /// still be forwarded to the session delegate. + /// + /// Cannot be modified after task resumes. Not supported on background session. + /// + /// Delegate is strongly referenced until the task completes, after which it is + /// reset to `nil`. + set delegate(NSObject? value) { + _lib._objc_msgSend_328( + _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + } + + /// NSProgress object which represents the task progress. + /// It can be used for task progress tracking. + NSProgress? get progress { + final _ret = _lib._objc_msgSend_351(_id, _lib._sel_progress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); + } + + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + NSDate? get earliestBeginDate { + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_earliestBeginDate1); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); + } + + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + set earliestBeginDate(NSDate? value) { + _lib._objc_msgSend_367( + _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); + } + + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + int get countOfBytesClientExpectsToSend { + return _lib._objc_msgSend_358( + _id, _lib._sel_countOfBytesClientExpectsToSend1); + } + + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + set countOfBytesClientExpectsToSend(int value) { + _lib._objc_msgSend_359( + _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); + } + + int get countOfBytesClientExpectsToReceive { + return _lib._objc_msgSend_358( + _id, _lib._sel_countOfBytesClientExpectsToReceive1); + } + + set countOfBytesClientExpectsToReceive(int value) { + _lib._objc_msgSend_359( + _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); + } + + /// number of body bytes already sent + int get countOfBytesSent { + return _lib._objc_msgSend_358(_id, _lib._sel_countOfBytesSent1); + } + + /// number of body bytes already received + int get countOfBytesReceived { + return _lib._objc_msgSend_358(_id, _lib._sel_countOfBytesReceived1); + } + + /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request + int get countOfBytesExpectedToSend { + return _lib._objc_msgSend_358(_id, _lib._sel_countOfBytesExpectedToSend1); + } + + /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. + int get countOfBytesExpectedToReceive { + return _lib._objc_msgSend_358( + _id, _lib._sel_countOfBytesExpectedToReceive1); + } + + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + NSString? get taskDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_taskDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + set taskDescription(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); + } + + /// -cancel returns immediately, but marks a task as being canceled. + /// The task will signal -URLSession:task:didCompleteWithError: with an + /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some + /// cases, the task may signal other work before it acknowledges the + /// cancelation. -cancel may be sent to a task that has been suspended. + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + /// The current state of the task within the session. + int get state { + return _lib._objc_msgSend_368(_id, _lib._sel_state1); + } + + /// The error, if any, delivered via -URLSession:task:didCompleteWithError: + /// This property will be nil in the event that no error occurred. + NSError? get error { + final _ret = _lib._objc_msgSend_331(_id, _lib._sel_error1); + return _ret.address == 0 + ? null + : NSError._(_ret, _lib, retain: true, release: true); + } + + /// Suspending a task will prevent the NSURLSession from continuing to + /// load data. There may still be delegate calls made on behalf of + /// this task (for instance, to report data received while suspending) + /// but no further transmissions will be made on behalf of the task + /// until -resume is sent. The timeout timer associated with the task + /// will be disabled while a task is suspended. -suspend and -resume are + /// nestable. + void suspend() { + return _lib._objc_msgSend_1(_id, _lib._sel_suspend1); + } + + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } + + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. + /// + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + double get priority { + return _lib._objc_msgSend_84(_id, _lib._sel_priority1); + } + + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. + /// + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + set priority(double value) { + _lib._objc_msgSend_369(_id, _lib._sel_setPriority_1, value); + } + + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + bool get prefersIncrementalDelivery { + return _lib._objc_msgSend_11(_id, _lib._sel_prefersIncrementalDelivery1); + } + + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + set prefersIncrementalDelivery(bool value) { + _lib._objc_msgSend_361( + _id, _lib._sel_setPrefersIncrementalDelivery_1, value); + } + + @override + NSURLSessionTask init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLSessionTask._(_ret, _lib, retain: true, release: true); + } + + static NSURLSessionTask new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } + + static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } +} + +class NSProgress extends NSObject { + NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSProgress] that points to the same underlying object as [other]. + static NSProgress castFrom(T other) { + return NSProgress._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSProgress] that wraps the given raw object pointer. + static NSProgress castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSProgress._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSProgress]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); + } + + static NSProgress currentProgress(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_351( + _lib._class_NSProgress1, _lib._sel_currentProgress1); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress progressWithTotalUnitCount_( + NativeCupertinoHttp _lib, int unitCount) { + final _ret = _lib._objc_msgSend_352(_lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress discreteProgressWithTotalUnitCount_( + NativeCupertinoHttp _lib, int unitCount) { + final _ret = _lib._objc_msgSend_352(_lib._class_NSProgress1, + _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( + NativeCupertinoHttp _lib, + int unitCount, + NSProgress? parent, + int portionOfParentTotalUnitCount) { + final _ret = _lib._objc_msgSend_353( + _lib._class_NSProgress1, + _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, + unitCount, + parent?._id ?? ffi.nullptr, + portionOfParentTotalUnitCount); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + NSProgress initWithParent_userInfo_( + NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { + final _ret = _lib._objc_msgSend_354( + _id, + _lib._sel_initWithParent_userInfo_1, + parentProgressOrNil?._id ?? ffi.nullptr, + userInfoOrNil?._id ?? ffi.nullptr); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + + void becomeCurrentWithPendingUnitCount_(int unitCount) { + return _lib._objc_msgSend_355( + _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + } + + void performAsCurrentWithPendingUnitCount_usingBlock_( + int unitCount, ObjCBlock work) { + return _lib._objc_msgSend_356( + _id, + _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, + unitCount, + work._id); + } + + void resignCurrent() { + return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + } + + void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { + return _lib._objc_msgSend_357( + _id, + _lib._sel_addChild_withPendingUnitCount_1, + child?._id ?? ffi.nullptr, + inUnitCount); + } + + int get totalUnitCount { + return _lib._objc_msgSend_358(_id, _lib._sel_totalUnitCount1); + } + + set totalUnitCount(int value) { + _lib._objc_msgSend_359(_id, _lib._sel_setTotalUnitCount_1, value); + } + + int get completedUnitCount { + return _lib._objc_msgSend_358(_id, _lib._sel_completedUnitCount1); + } + + set completedUnitCount(int value) { + _lib._objc_msgSend_359(_id, _lib._sel_setCompletedUnitCount_1, value); + } + + NSString? get localizedDescription { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set localizedDescription(NSString? value) { + _lib._objc_msgSend_360( + _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); + } + + NSString? get localizedAdditionalDescription { + final _ret = + _lib._objc_msgSend_32(_id, _lib._sel_localizedAdditionalDescription1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); + } + + set localizedAdditionalDescription(NSString? value) { + _lib._objc_msgSend_360(_id, _lib._sel_setLocalizedAdditionalDescription_1, + value?._id ?? ffi.nullptr); + } + + bool get cancellable { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); + } + + set cancellable(bool value) { + _lib._objc_msgSend_361(_id, _lib._sel_setCancellable_1, value); + } + + bool get pausable { + return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); + } + + set pausable(bool value) { + _lib._objc_msgSend_361(_id, _lib._sel_setPausable_1, value); + } + + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + } + + bool get paused { + return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); + } + + ObjCBlock get cancellationHandler { + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_cancellationHandler1); + return ObjCBlock._(_ret, _lib); + } + + set cancellationHandler(ObjCBlock value) { + _lib._objc_msgSend_363(_id, _lib._sel_setCancellationHandler_1, value._id); + } + + ObjCBlock get pausingHandler { + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_pausingHandler1); + return ObjCBlock._(_ret, _lib); + } + + set pausingHandler(ObjCBlock value) { + _lib._objc_msgSend_363(_id, _lib._sel_setPausingHandler_1, value._id); + } + + ObjCBlock get resumingHandler { + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_resumingHandler1); + return ObjCBlock._(_ret, _lib); + } + + set resumingHandler(ObjCBlock value) { + _lib._objc_msgSend_363(_id, _lib._sel_setResumingHandler_1, value._id); + } + + void setUserInfoObject_forKey_( + NSObject objectOrNil, NSProgressUserInfoKey key) { + return _lib._objc_msgSend_189( + _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); + } + + bool get indeterminate { + return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); + } + + double get fractionCompleted { + return _lib._objc_msgSend_85(_id, _lib._sel_fractionCompleted1); + } + + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + } + + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + } + + void pause() { + return _lib._objc_msgSend_1(_id, _lib._sel_pause1); + } + + void resume() { + return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + } + + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSProgressKind get kind { + return _lib._objc_msgSend_32(_id, _lib._sel_kind1); + } + + set kind(NSProgressKind value) { + _lib._objc_msgSend_360(_id, _lib._sel_setKind_1, value); + } + + NSNumber? get estimatedTimeRemaining { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_estimatedTimeRemaining1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set estimatedTimeRemaining(NSNumber? value) { + _lib._objc_msgSend_364( + _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get throughput { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_throughput1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set throughput(NSNumber? value) { + _lib._objc_msgSend_364( + _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); + } + + NSProgressFileOperationKind get fileOperationKind { + return _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); + } + + set fileOperationKind(NSProgressFileOperationKind value) { + _lib._objc_msgSend_360(_id, _lib._sel_setFileOperationKind_1, value); + } + + NSURL? get fileURL { + final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + set fileURL(NSURL? value) { + _lib._objc_msgSend_365( + _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get fileTotalCount { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileTotalCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set fileTotalCount(NSNumber? value) { + _lib._objc_msgSend_364( + _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + } + + NSNumber? get fileCompletedCount { + final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileCompletedCount1); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); + } + + set fileCompletedCount(NSNumber? value) { + _lib._objc_msgSend_364( + _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); + } + + void publish() { + return _lib._objc_msgSend_1(_id, _lib._sel_publish1); + } + + void unpublish() { + return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + } + + static NSObject addSubscriberForFileURL_withPublishingHandler_( + NativeCupertinoHttp _lib, + NSURL? url, + NSProgressPublishingHandler publishingHandler) { + final _ret = _lib._objc_msgSend_366( + _lib._class_NSProgress1, + _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, + url?._id ?? ffi.nullptr, + publishingHandler); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { + return _lib._objc_msgSend_200( + _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + } + + bool get old { + return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); + } + + static NSProgress new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } + + static NSProgress alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); + return NSProgress._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSProgressUserInfoKey = ffi.Pointer; +typedef NSProgressKind = ffi.Pointer; +typedef NSProgressFileOperationKind = ffi.Pointer; +typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; +NSProgressUnpublishingHandler _ObjCBlock18_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>()(arg0); +} + +final _ObjCBlock18_closureRegistry = {}; +int _ObjCBlock18_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock18_registerClosure(Function fn) { + final id = ++_ObjCBlock18_closureRegistryIndex; + _ObjCBlock18_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +NSProgressUnpublishingHandler _ObjCBlock18_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock18_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock18 extends _ObjCBlockBase { + ObjCBlock18._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock18.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock18_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock18.fromFunction(NativeCupertinoHttp lib, + NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock18_closureTrampoline) + .cast(), + _ObjCBlock18_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + NSProgressUnpublishingHandler call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } +} + +typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; + +abstract class NSURLSessionTaskState { + /// The task is currently being serviced by the session + static const int NSURLSessionTaskStateRunning = 0; + static const int NSURLSessionTaskStateSuspended = 1; + + /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. + static const int NSURLSessionTaskStateCanceling = 2; + + /// The task has completed and the session will receive no more delegate notifications + static const int NSURLSessionTaskStateCompleted = 3; +} + +void _ObjCBlock19_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); +} + +final _ObjCBlock19_closureRegistry = {}; +int _ObjCBlock19_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock19_registerClosure(Function fn) { + final id = ++_ObjCBlock19_closureRegistryIndex; + _ObjCBlock19_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock19_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock19_closureRegistry[block.ref.target.address]!(arg0); +} + +class ObjCBlock19 extends _ObjCBlockBase { + ObjCBlock19._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); + + /// Creates a block from a C function pointer. + ObjCBlock19.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock19_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock19.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock19_closureTrampoline) + .cast(), + _ObjCBlock19_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); + } +} + +class NSNotification extends NSObject { + NSNotification._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNotification] that points to the same underlying object as [other]. + static NSNotification castFrom(T other) { + return NSNotification._(other._id, other._lib, retain: true, release: true); + } + + /// Returns a [NSNotification] that wraps the given raw object pointer. + static NSNotification castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNotification._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNotification]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSNotification1); + } + + NSNotificationName get name { + return _lib._objc_msgSend_32(_id, _lib._sel_name1); + } + + NSObject get object { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + NSDictionary? get userInfo { + final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSNotification initWithName_object_userInfo_( + NSNotificationName name, NSObject object, NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_373( + _id, + _lib._sel_initWithName_object_userInfo_1, + name, + object._id, + userInfo?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + NSNotification initWithCoder_(NSCoder? coder) { + final _ret = _lib._objc_msgSend_14( + _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + static NSNotification notificationWithName_object_( + NativeCupertinoHttp _lib, NSNotificationName aName, NSObject anObject) { + final _ret = _lib._objc_msgSend_258(_lib._class_NSNotification1, + _lib._sel_notificationWithName_object_1, aName, anObject._id); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + static NSNotification notificationWithName_object_userInfo_( + NativeCupertinoHttp _lib, + NSNotificationName aName, + NSObject anObject, + NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_373( + _lib._class_NSNotification1, + _lib._sel_notificationWithName_object_userInfo_1, + aName, + anObject._id, + aUserInfo?._id ?? ffi.nullptr); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + @override + NSNotification init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSNotification._(_ret, _lib, retain: true, release: true); + } + + static NSNotification new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); + return NSNotification._(_ret, _lib, retain: false, release: true); + } + + static NSNotification alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); + return NSNotification._(_ret, _lib, retain: false, release: true); + } +} + +typedef NSNotificationName = ffi.Pointer; + +class NSNotificationCenter extends NSObject { + NSNotificationCenter._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); + + /// Returns a [NSNotificationCenter] that points to the same underlying object as [other]. + static NSNotificationCenter castFrom(T other) { + return NSNotificationCenter._(other._id, other._lib, + retain: true, release: true); + } + + /// Returns a [NSNotificationCenter] that wraps the given raw object pointer. + static NSNotificationCenter castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSNotificationCenter._(other, lib, retain: retain, release: release); + } + + /// Returns whether [obj] is an instance of [NSNotificationCenter]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSNotificationCenter1); + } + + static NSNotificationCenter? getDefaultCenter(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_374( + _lib._class_NSNotificationCenter1, _lib._sel_defaultCenter1); + return _ret.address == 0 + ? null + : NSNotificationCenter._(_ret, _lib, retain: true, release: true); + } + + void addObserver_selector_name_object_( + NSObject observer, + ffi.Pointer aSelector, + NSNotificationName aName, + NSObject anObject) { + return _lib._objc_msgSend_375( + _id, + _lib._sel_addObserver_selector_name_object_1, + observer._id, + aSelector, + aName, + anObject._id); + } + + void postNotification_(NSNotification? notification) { + return _lib._objc_msgSend_376( + _id, _lib._sel_postNotification_1, notification?._id ?? ffi.nullptr); + } + + void postNotificationName_object_( + NSNotificationName aName, NSObject anObject) { + return _lib._objc_msgSend_377( + _id, _lib._sel_postNotificationName_object_1, aName, anObject._id); + } + + void postNotificationName_object_userInfo_( + NSNotificationName aName, NSObject anObject, NSDictionary? aUserInfo) { + return _lib._objc_msgSend_378( + _id, + _lib._sel_postNotificationName_object_userInfo_1, + aName, + anObject._id, + aUserInfo?._id ?? ffi.nullptr); + } + + void removeObserver_(NSObject observer) { + return _lib._objc_msgSend_200( + _id, _lib._sel_removeObserver_1, observer._id); + } + + void removeObserver_name_object_( + NSObject observer, NSNotificationName aName, NSObject anObject) { + return _lib._objc_msgSend_379(_id, _lib._sel_removeObserver_name_object_1, + observer._id, aName, anObject._id); + } + + NSObject addObserverForName_object_queue_usingBlock_(NSNotificationName name, + NSObject obj, NSOperationQueue? queue, ObjCBlock20 block) { + final _ret = _lib._objc_msgSend_392( + _id, + _lib._sel_addObserverForName_object_queue_usingBlock_1, + name, + obj._id, + queue?._id ?? ffi.nullptr, + block._id); + return NSObject._(_ret, _lib, retain: true, release: true); } - static NSURLRequest new1(NativeCupertinoHttp _lib) { + static NSNotificationCenter new1(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSNotificationCenter1, _lib._sel_new1); + return NSNotificationCenter._(_ret, _lib, retain: false, release: true); } - static NSURLRequest alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); + static NSNotificationCenter alloc(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2( + _lib._class_NSNotificationCenter1, _lib._sel_alloc1); + return NSNotificationCenter._(_ret, _lib, retain: false, release: true); } } -class NSInputStream extends NSStream { - NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, +class NSOperationQueue extends NSObject { + NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, {bool retain = false, bool release = false}) : super._(id, lib, retain: retain, release: release); - /// Returns a [NSInputStream] that points to the same underlying object as [other]. - static NSInputStream castFrom(T other) { - return NSInputStream._(other._id, other._lib, retain: true, release: true); + /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. + static NSOperationQueue castFrom(T other) { + return NSOperationQueue._(other._id, other._lib, + retain: true, release: true); } - /// Returns a [NSInputStream] that wraps the given raw object pointer. - static NSInputStream castFromPointer( + /// Returns a [NSOperationQueue] that wraps the given raw object pointer. + static NSOperationQueue castFromPointer( NativeCupertinoHttp lib, ffi.Pointer other, {bool retain = false, bool release = false}) { - return NSInputStream._(other, lib, retain: retain, release: release); + return NSOperationQueue._(other, lib, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSInputStream]. + /// Returns whether [obj] is an instance of [NSOperationQueue]. static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); + return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, + obj._lib._class_NSOperationQueue1); } - int read_maxLength_(ffi.Pointer buffer, int len) { - return _lib._objc_msgSend_366(_id, _lib._sel_read_maxLength_1, buffer, len); + /// @property progress + /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue + /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the + /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the + /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super + /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress + /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% + /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 + /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be + /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by + /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving + /// progress scenario. + /// + /// @example + /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; + /// queue.progress.totalUnitCount = 10; + NSProgress? get progress { + final _ret = _lib._objc_msgSend_351(_id, _lib._sel_progress1); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); } - bool getBuffer_length_( - ffi.Pointer> buffer, ffi.Pointer len) { - return _lib._objc_msgSend_371( - _id, _lib._sel_getBuffer_length_1, buffer, len); + void addOperation_(NSOperation? op) { + return _lib._objc_msgSend_380( + _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); } - bool get hasBytesAvailable { - return _lib._objc_msgSend_11(_id, _lib._sel_hasBytesAvailable1); + void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { + return _lib._objc_msgSend_386( + _id, + _lib._sel_addOperations_waitUntilFinished_1, + ops?._id ?? ffi.nullptr, + wait); } - NSInputStream initWithData_(NSData? data) { - final _ret = _lib._objc_msgSend_217( - _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); - return NSInputStream._(_ret, _lib, retain: true, release: true); + void addOperationWithBlock_(ObjCBlock block) { + return _lib._objc_msgSend_387( + _id, _lib._sel_addOperationWithBlock_1, block._id); } - NSInputStream initWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithURL_1, url?._id ?? ffi.nullptr); - return NSInputStream._(_ret, _lib, retain: true, release: true); + /// @method addBarrierBlock: + /// @param barrier A block to execute + /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and + /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the + /// `dispatch_barrier_async` function. + void addBarrierBlock_(ObjCBlock barrier) { + return _lib._objc_msgSend_387( + _id, _lib._sel_addBarrierBlock_1, barrier._id); } - NSInputStream initWithFileAtPath_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithFileAtPath_1, path?._id ?? ffi.nullptr); - return NSInputStream._(_ret, _lib, retain: true, release: true); + int get maxConcurrentOperationCount { + return _lib._objc_msgSend_81(_id, _lib._sel_maxConcurrentOperationCount1); } - static NSInputStream inputStreamWithData_( - NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSInputStream1, - _lib._sel_inputStreamWithData_1, data?._id ?? ffi.nullptr); - return NSInputStream._(_ret, _lib, retain: true, release: true); + set maxConcurrentOperationCount(int value) { + _lib._objc_msgSend_388( + _id, _lib._sel_setMaxConcurrentOperationCount_1, value); } - static NSInputStream inputStreamWithFileAtPath_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSInputStream1, - _lib._sel_inputStreamWithFileAtPath_1, path?._id ?? ffi.nullptr); - return NSInputStream._(_ret, _lib, retain: true, release: true); + bool get suspended { + return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); } - static NSInputStream inputStreamWithURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSInputStream1, - _lib._sel_inputStreamWithURL_1, url?._id ?? ffi.nullptr); - return NSInputStream._(_ret, _lib, retain: true, release: true); + set suspended(bool value) { + _lib._objc_msgSend_361(_id, _lib._sel_setSuspended_1, value); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSString? hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _lib._objc_msgSend_368( - _lib._class_NSInputStream1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname?._id ?? ffi.nullptr, - port, - inputStream, - outputStream); + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static void getStreamsToHost_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSHost? host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _lib._objc_msgSend_369( - _lib._class_NSInputStream1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host?._id ?? ffi.nullptr, - port, - inputStream, - outputStream); + set name(NSString? value) { + _lib._objc_msgSend_360(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); } - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - NativeCupertinoHttp _lib, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _lib._objc_msgSend_370( - _lib._class_NSInputStream1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); + int get qualityOfService { + return _lib._objc_msgSend_384(_id, _lib._sel_qualityOfService1); } - static NSInputStream new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_new1); - return NSInputStream._(_ret, _lib, retain: false, release: true); + set qualityOfService(int value) { + _lib._objc_msgSend_385(_id, _lib._sel_setQualityOfService_1, value); } - static NSInputStream alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_alloc1); - return NSInputStream._(_ret, _lib, retain: false, release: true); + /// actually retain + dispatch_queue_t get underlyingQueue { + return _lib._objc_msgSend_389(_id, _lib._sel_underlyingQueue1); } -} -class NSStream extends NSObject { - NSStream._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSStream] that points to the same underlying object as [other]. - static NSStream castFrom(T other) { - return NSStream._(other._id, other._lib, retain: true, release: true); + /// actually retain + set underlyingQueue(dispatch_queue_t value) { + _lib._objc_msgSend_390(_id, _lib._sel_setUnderlyingQueue_1, value); } - /// Returns a [NSStream] that wraps the given raw object pointer. - static NSStream castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSStream._(other, lib, retain: retain, release: release); + void cancelAllOperations() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); } - /// Returns whether [obj] is an instance of [NSStream]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSStream1); + void waitUntilAllOperationsAreFinished() { + return _lib._objc_msgSend_1( + _id, _lib._sel_waitUntilAllOperationsAreFinished1); } - void open() { - return _lib._objc_msgSend_1(_id, _lib._sel_open1); + static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_391( + _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); } - void close() { - return _lib._objc_msgSend_1(_id, _lib._sel_close1); + static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_391( + _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); + return _ret.address == 0 + ? null + : NSOperationQueue._(_ret, _lib, retain: true, release: true); } - NSObject? get delegate { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); + /// These two functions are inherently a race condition and should be avoided if possible + NSArray? get operations { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_operations1); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : NSArray._(_ret, _lib, retain: true, release: true); } - set delegate(NSObject? value) { - _lib._objc_msgSend_362( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); + int get operationCount { + return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); } - NSObject propertyForKey_(NSStreamPropertyKey key) { - final _ret = _lib._objc_msgSend_42(_id, _lib._sel_propertyForKey_1, key); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSOperationQueue new1(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); } - bool setProperty_forKey_(NSObject property, NSStreamPropertyKey key) { - return _lib._objc_msgSend_199( - _id, _lib._sel_setProperty_forKey_1, property._id, key); + static NSOperationQueue alloc(NativeCupertinoHttp _lib) { + final _ret = + _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); } +} - void scheduleInRunLoop_forMode_(NSRunLoop? aRunLoop, NSRunLoopMode mode) { - return _lib._objc_msgSend_363(_id, _lib._sel_scheduleInRunLoop_forMode_1, - aRunLoop?._id ?? ffi.nullptr, mode); - } +class NSOperation extends NSObject { + NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, + {bool retain = false, bool release = false}) + : super._(id, lib, retain: retain, release: release); - void removeFromRunLoop_forMode_(NSRunLoop? aRunLoop, NSRunLoopMode mode) { - return _lib._objc_msgSend_363(_id, _lib._sel_removeFromRunLoop_forMode_1, - aRunLoop?._id ?? ffi.nullptr, mode); + /// Returns a [NSOperation] that points to the same underlying object as [other]. + static NSOperation castFrom(T other) { + return NSOperation._(other._id, other._lib, retain: true, release: true); } - int get streamStatus { - return _lib._objc_msgSend_364(_id, _lib._sel_streamStatus1); + /// Returns a [NSOperation] that wraps the given raw object pointer. + static NSOperation castFromPointer( + NativeCupertinoHttp lib, ffi.Pointer other, + {bool retain = false, bool release = false}) { + return NSOperation._(other, lib, retain: retain, release: release); } - NSError? get streamError { - final _ret = _lib._objc_msgSend_365(_id, _lib._sel_streamError1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSOperation]. + static bool isInstance(_ObjCWrapper obj) { + return obj._lib._objc_msgSend_0( + obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSString? hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _lib._objc_msgSend_368( - _lib._class_NSStream1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname?._id ?? ffi.nullptr, - port, - inputStream, - outputStream); + void start() { + return _lib._objc_msgSend_1(_id, _lib._sel_start1); } - static void getStreamsToHost_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSHost? host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _lib._objc_msgSend_369( - _lib._class_NSStream1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host?._id ?? ffi.nullptr, - port, - inputStream, - outputStream); + void main() { + return _lib._objc_msgSend_1(_id, _lib._sel_main1); } - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - NativeCupertinoHttp _lib, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _lib._objc_msgSend_370( - _lib._class_NSStream1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); + bool get cancelled { + return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); } - static NSStream new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_new1); - return NSStream._(_ret, _lib, retain: false, release: true); + void cancel() { + return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); } - static NSStream alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_alloc1); - return NSStream._(_ret, _lib, retain: false, release: true); + bool get executing { + return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); } -} - -typedef NSStreamPropertyKey = ffi.Pointer; -class NSRunLoop extends _ObjCWrapper { - NSRunLoop._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSRunLoop] that points to the same underlying object as [other]. - static NSRunLoop castFrom(T other) { - return NSRunLoop._(other._id, other._lib, retain: true, release: true); + bool get finished { + return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); } - /// Returns a [NSRunLoop] that wraps the given raw object pointer. - static NSRunLoop castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSRunLoop._(other, lib, retain: retain, release: release); + /// To be deprecated; use and override 'asynchronous' below + bool get concurrent { + return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); } - /// Returns whether [obj] is an instance of [NSRunLoop]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSRunLoop1); + bool get asynchronous { + return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); } -} - -typedef NSRunLoopMode = ffi.Pointer; - -abstract class NSStreamStatus { - static const int NSStreamStatusNotOpen = 0; - static const int NSStreamStatusOpening = 1; - static const int NSStreamStatusOpen = 2; - static const int NSStreamStatusReading = 3; - static const int NSStreamStatusWriting = 4; - static const int NSStreamStatusAtEnd = 5; - static const int NSStreamStatusClosed = 6; - static const int NSStreamStatusError = 7; -} - -class NSOutputStream extends NSStream { - NSOutputStream._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSOutputStream] that points to the same underlying object as [other]. - static NSOutputStream castFrom(T other) { - return NSOutputStream._(other._id, other._lib, retain: true, release: true); + bool get ready { + return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); } - /// Returns a [NSOutputStream] that wraps the given raw object pointer. - static NSOutputStream castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOutputStream._(other, lib, retain: retain, release: release); + void addDependency_(NSOperation? op) { + return _lib._objc_msgSend_380( + _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); } - /// Returns whether [obj] is an instance of [NSOutputStream]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOutputStream1); + void removeDependency_(NSOperation? op) { + return _lib._objc_msgSend_380( + _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); } - int write_maxLength_(ffi.Pointer buffer, int len) { - return _lib._objc_msgSend_366( - _id, _lib._sel_write_maxLength_1, buffer, len); + NSArray? get dependencies { + final _ret = _lib._objc_msgSend_162(_id, _lib._sel_dependencies1); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - bool get hasSpaceAvailable { - return _lib._objc_msgSend_11(_id, _lib._sel_hasSpaceAvailable1); + int get queuePriority { + return _lib._objc_msgSend_381(_id, _lib._sel_queuePriority1); } - NSOutputStream initToMemory() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initToMemory1); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + set queuePriority(int value) { + _lib._objc_msgSend_382(_id, _lib._sel_setQueuePriority_1, value); } - NSOutputStream initToBuffer_capacity_( - ffi.Pointer buffer, int capacity) { - final _ret = _lib._objc_msgSend_367( - _id, _lib._sel_initToBuffer_capacity_1, buffer, capacity); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + ObjCBlock get completionBlock { + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_completionBlock1); + return ObjCBlock._(_ret, _lib); } - NSOutputStream initWithURL_append_(NSURL? url, bool shouldAppend) { - final _ret = _lib._objc_msgSend_206(_id, _lib._sel_initWithURL_append_1, - url?._id ?? ffi.nullptr, shouldAppend); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + set completionBlock(ObjCBlock value) { + _lib._objc_msgSend_363(_id, _lib._sel_setCompletionBlock_1, value._id); } - NSOutputStream initToFileAtPath_append_(NSString? path, bool shouldAppend) { - final _ret = _lib._objc_msgSend_41(_id, _lib._sel_initToFileAtPath_append_1, - path?._id ?? ffi.nullptr, shouldAppend); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + void waitUntilFinished() { + return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); } - static NSOutputStream outputStreamToMemory(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOutputStream1, _lib._sel_outputStreamToMemory1); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + double get threadPriority { + return _lib._objc_msgSend_85(_id, _lib._sel_threadPriority1); } - static NSOutputStream outputStreamToBuffer_capacity_( - NativeCupertinoHttp _lib, ffi.Pointer buffer, int capacity) { - final _ret = _lib._objc_msgSend_367(_lib._class_NSOutputStream1, - _lib._sel_outputStreamToBuffer_capacity_1, buffer, capacity); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + set threadPriority(double value) { + _lib._objc_msgSend_383(_id, _lib._sel_setThreadPriority_1, value); } - static NSOutputStream outputStreamToFileAtPath_append_( - NativeCupertinoHttp _lib, NSString? path, bool shouldAppend) { - final _ret = _lib._objc_msgSend_41( - _lib._class_NSOutputStream1, - _lib._sel_outputStreamToFileAtPath_append_1, - path?._id ?? ffi.nullptr, - shouldAppend); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + int get qualityOfService { + return _lib._objc_msgSend_384(_id, _lib._sel_qualityOfService1); } - static NSOutputStream outputStreamWithURL_append_( - NativeCupertinoHttp _lib, NSURL? url, bool shouldAppend) { - final _ret = _lib._objc_msgSend_206( - _lib._class_NSOutputStream1, - _lib._sel_outputStreamWithURL_append_1, - url?._id ?? ffi.nullptr, - shouldAppend); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + set qualityOfService(int value) { + _lib._objc_msgSend_385(_id, _lib._sel_setQualityOfService_1, value); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSString? hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _lib._objc_msgSend_368( - _lib._class_NSOutputStream1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname?._id ?? ffi.nullptr, - port, - inputStream, - outputStream); + NSString? get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static void getStreamsToHost_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSHost? host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _lib._objc_msgSend_369( - _lib._class_NSOutputStream1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host?._id ?? ffi.nullptr, - port, - inputStream, - outputStream); + set name(NSString? value) { + _lib._objc_msgSend_360(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); } - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - NativeCupertinoHttp _lib, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _lib._objc_msgSend_370( - _lib._class_NSOutputStream1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); + static NSOperation new1(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); + return NSOperation._(_ret, _lib, retain: false, release: true); } - static NSOutputStream new1(NativeCupertinoHttp _lib) { + static NSOperation alloc(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_new1); - return NSOutputStream._(_ret, _lib, retain: false, release: true); + _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); + return NSOperation._(_ret, _lib, retain: false, release: true); } +} - static NSOutputStream alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_alloc1); - return NSOutputStream._(_ret, _lib, retain: false, release: true); - } +abstract class NSOperationQueuePriority { + static const int NSOperationQueuePriorityVeryLow = -8; + static const int NSOperationQueuePriorityLow = -4; + static const int NSOperationQueuePriorityNormal = 0; + static const int NSOperationQueuePriorityHigh = 4; + static const int NSOperationQueuePriorityVeryHigh = 8; +} + +typedef dispatch_queue_t = ffi.Pointer; +void _ObjCBlock20_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction arg0)>()(arg0); } -class NSHost extends _ObjCWrapper { - NSHost._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final _ObjCBlock20_closureRegistry = {}; +int _ObjCBlock20_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock20_registerClosure(Function fn) { + final id = ++_ObjCBlock20_closureRegistryIndex; + _ObjCBlock20_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns a [NSHost] that points to the same underlying object as [other]. - static NSHost castFrom(T other) { - return NSHost._(other._id, other._lib, retain: true, release: true); - } +void _ObjCBlock20_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { + return _ObjCBlock20_closureRegistry[block.ref.target.address]!(arg0); +} - /// Returns a [NSHost] that wraps the given raw object pointer. - static NSHost castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHost._(other, lib, retain: retain, release: release); - } +class ObjCBlock20 extends _ObjCBlockBase { + ObjCBlock20._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) + : super._(id, lib, retain: false, release: true); - /// Returns whether [obj] is an instance of [NSHost]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHost1); + /// Creates a block from a C function pointer. + ObjCBlock20.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock20_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + ObjCBlock20.fromFunction( + NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>( + _ObjCBlock20_closureTrampoline) + .cast(), + _ObjCBlock20_registerClosure(fn)), + lib); + static ffi.Pointer? _dartFuncTrampoline; + void call(ffi.Pointer arg0) { + return _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>()(_id, arg0); } } @@ -70801,20 +72055,20 @@ class NSMutableURLRequest extends NSURLRequest { /// ! /// @abstract The URL of the receiver. set URL(NSURL? value) { - _lib._objc_msgSend_336(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); + _lib._objc_msgSend_365(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); } /// ! /// @abstract The cache policy of the receiver. @override int get cachePolicy { - return _lib._objc_msgSend_359(_id, _lib._sel_cachePolicy1); + return _lib._objc_msgSend_325(_id, _lib._sel_cachePolicy1); } /// ! /// @abstract The cache policy of the receiver. set cachePolicy(int value) { - _lib._objc_msgSend_373(_id, _lib._sel_setCachePolicy_1, value); + _lib._objc_msgSend_393(_id, _lib._sel_setCachePolicy_1, value); } /// ! @@ -70847,7 +72101,7 @@ class NSMutableURLRequest extends NSURLRequest { /// is considered to have timed out. This timeout interval is measured /// in seconds. set timeoutInterval(double value) { - _lib._objc_msgSend_341(_id, _lib._sel_setTimeoutInterval_1, value); + _lib._objc_msgSend_383(_id, _lib._sel_setTimeoutInterval_1, value); } /// ! @@ -70877,7 +72131,7 @@ class NSMutableURLRequest extends NSURLRequest { /// as a sub-resource of a user-specified URL, and possibly other things /// in the future. set mainDocumentURL(NSURL? value) { - _lib._objc_msgSend_336( + _lib._objc_msgSend_365( _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); } @@ -70887,7 +72141,7 @@ class NSMutableURLRequest extends NSURLRequest { /// of the request. Most clients should not need to use this method. @override int get networkServiceType { - return _lib._objc_msgSend_360(_id, _lib._sel_networkServiceType1); + return _lib._objc_msgSend_326(_id, _lib._sel_networkServiceType1); } /// ! @@ -70895,7 +72149,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion This method is used to provide the network layers with a hint as to the purpose /// of the request. Most clients should not need to use this method. set networkServiceType(int value) { - _lib._objc_msgSend_374(_id, _lib._sel_setNetworkServiceType_1, value); + _lib._objc_msgSend_394(_id, _lib._sel_setNetworkServiceType_1, value); } /// ! @@ -70914,7 +72168,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion NO if the receiver should not be allowed to use the built in /// cellular radios to satisfy the request, YES otherwise. The default is YES. set allowsCellularAccess(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setAllowsCellularAccess_1, value); + _lib._objc_msgSend_361(_id, _lib._sel_setAllowsCellularAccess_1, value); } /// ! @@ -70933,7 +72187,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to /// satisfy the request, YES otherwise. set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_332( + _lib._objc_msgSend_361( _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); } @@ -70954,7 +72208,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to /// satisfy the request, YES otherwise. set allowsConstrainedNetworkAccess(bool value) { - _lib._objc_msgSend_332( + _lib._objc_msgSend_361( _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); } @@ -70974,7 +72228,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. /// The default may be YES in a future OS update. set assumesHTTP3Capable(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setAssumesHTTP3Capable_1, value); + _lib._objc_msgSend_361(_id, _lib._sel_setAssumesHTTP3Capable_1, value); } /// ! @@ -70983,7 +72237,7 @@ class NSMutableURLRequest extends NSURLRequest { /// user. Defaults to NSURLRequestAttributionDeveloper. @override int get attribution { - return _lib._objc_msgSend_361(_id, _lib._sel_attribution1); + return _lib._objc_msgSend_327(_id, _lib._sel_attribution1); } /// ! @@ -70991,7 +72245,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the /// user. Defaults to NSURLRequestAttributionDeveloper. set attribution(int value) { - _lib._objc_msgSend_375(_id, _lib._sel_setAttribution_1, value); + _lib._objc_msgSend_395(_id, _lib._sel_setAttribution_1, value); } /// ! @@ -71008,7 +72262,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, /// No otherwise. Defaults to NO. set requiresDNSSECValidation(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setRequiresDNSSECValidation_1, value); + _lib._objc_msgSend_361(_id, _lib._sel_setRequiresDNSSECValidation_1, value); } /// ! @@ -71024,7 +72278,7 @@ class NSMutableURLRequest extends NSURLRequest { /// ! /// @abstract Sets the HTTP request method of the receiver. set HTTPMethod(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setHTTPMethod_1, value?._id ?? ffi.nullptr); } @@ -71057,7 +72311,7 @@ class NSMutableURLRequest extends NSURLRequest { /// the key or value for a key-value pair answers NO when sent this /// message, the key-value pair is skipped. set allHTTPHeaderFields(NSDictionary? value) { - _lib._objc_msgSend_376( + _lib._objc_msgSend_396( _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); } @@ -71071,7 +72325,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @param value the header field value. /// @param field the header field name (case-insensitive). void setValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_377(_id, _lib._sel_setValue_forHTTPHeaderField_1, + return _lib._objc_msgSend_397(_id, _lib._sel_setValue_forHTTPHeaderField_1, value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); } @@ -71089,7 +72343,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @param value the header field value. /// @param field the header field name (case-insensitive). void addValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_377(_id, _lib._sel_addValue_forHTTPHeaderField_1, + return _lib._objc_msgSend_397(_id, _lib._sel_addValue_forHTTPHeaderField_1, value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); } @@ -71110,7 +72364,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion This data is sent as the message body of the request, as /// in done in an HTTP POST request. set HTTPBody(NSData? value) { - _lib._objc_msgSend_378( + _lib._objc_msgSend_398( _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); } @@ -71123,7 +72377,7 @@ class NSMutableURLRequest extends NSURLRequest { /// - setting one will clear the other. @override NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_372(_id, _lib._sel_HTTPBodyStream1); + final _ret = _lib._objc_msgSend_338(_id, _lib._sel_HTTPBodyStream1); return _ret.address == 0 ? null : NSInputStream._(_ret, _lib, retain: true, release: true); @@ -71137,7 +72391,7 @@ class NSMutableURLRequest extends NSURLRequest { /// and the body data (set by setHTTPBody:, above) are mutually exclusive /// - setting one will clear the other. set HTTPBodyStream(NSInputStream? value) { - _lib._objc_msgSend_379( + _lib._objc_msgSend_399( _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); } @@ -71161,7 +72415,7 @@ class NSMutableURLRequest extends NSURLRequest { /// stored to the cookie manager by default. /// NOTE: In releases prior to 10.3, this value is ignored set HTTPShouldHandleCookies(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); + _lib._objc_msgSend_361(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); } /// ! @@ -71200,7 +72454,7 @@ class NSMutableURLRequest extends NSURLRequest { /// pipelining (disconnecting, sending resources misordered, omitting part of /// a resource, etc.). set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + _lib._objc_msgSend_361(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); } /// ! @@ -71243,7 +72497,7 @@ class NSMutableURLRequest extends NSURLRequest { NSURL? URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_358( + final _ret = _lib._objc_msgSend_324( _lib._class_NSMutableURLRequest1, _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, URL?._id ?? ffi.nullptr, @@ -71297,7 +72551,7 @@ class NSHTTPCookieStorage extends NSObject { static NSHTTPCookieStorage? getSharedHTTPCookieStorage( NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_380( + final _ret = _lib._objc_msgSend_400( _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); return _ret.address == 0 ? null @@ -71306,7 +72560,7 @@ class NSHTTPCookieStorage extends NSObject { static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_381( + final _ret = _lib._objc_msgSend_401( _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, identifier?._id ?? ffi.nullptr); @@ -71321,17 +72575,17 @@ class NSHTTPCookieStorage extends NSObject { } void setCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_382( + return _lib._objc_msgSend_402( _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); } void deleteCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_382( + return _lib._objc_msgSend_402( _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); } void removeCookiesSinceDate_(NSDate? date) { - return _lib._objc_msgSend_383( + return _lib._objc_msgSend_349( _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); } @@ -71343,7 +72597,7 @@ class NSHTTPCookieStorage extends NSObject { void setCookies_forURL_mainDocumentURL_( NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { - return _lib._objc_msgSend_384( + return _lib._objc_msgSend_403( _id, _lib._sel_setCookies_forURL_mainDocumentURL_1, cookies?._id ?? ffi.nullptr, @@ -71352,11 +72606,11 @@ class NSHTTPCookieStorage extends NSObject { } int get cookieAcceptPolicy { - return _lib._objc_msgSend_385(_id, _lib._sel_cookieAcceptPolicy1); + return _lib._objc_msgSend_404(_id, _lib._sel_cookieAcceptPolicy1); } set cookieAcceptPolicy(int value) { - _lib._objc_msgSend_386(_id, _lib._sel_setCookieAcceptPolicy_1, value); + _lib._objc_msgSend_405(_id, _lib._sel_setCookieAcceptPolicy_1, value); } NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { @@ -71368,13 +72622,13 @@ class NSHTTPCookieStorage extends NSObject { } void storeCookies_forTask_(NSArray? cookies, NSURLSessionTask? task) { - return _lib._objc_msgSend_393(_id, _lib._sel_storeCookies_forTask_1, + return _lib._objc_msgSend_406(_id, _lib._sel_storeCookies_forTask_1, cookies?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); } void getCookiesForTask_completionHandler_( - NSURLSessionTask? task, ObjCBlock20 completionHandler) { - return _lib._objc_msgSend_394( + NSURLSessionTask? task, ObjCBlock21 completionHandler) { + return _lib._objc_msgSend_407( _id, _lib._sel_getCookiesForTask_completionHandler_1, task?._id ?? ffi.nullptr, @@ -71418,441 +72672,7 @@ class NSHTTPCookie extends _ObjCWrapper { } } -/// NSURLSessionTask - a cancelable object that refers to the lifetime -/// of processing a given request. -class NSURLSessionTask extends NSObject { - NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. - static NSURLSessionTask castFrom(T other) { - return NSURLSessionTask._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. - static NSURLSessionTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTask._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLSessionTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTask1); - } - - /// an identifier for this task, assigned by and unique to the owning session - int get taskIdentifier { - return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); - } - - /// may be nil if this is a stream task - NSURLRequest? get originalRequest { - final _ret = _lib._objc_msgSend_387(_id, _lib._sel_originalRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// may differ from originalRequest due to http server redirection - NSURLRequest? get currentRequest { - final _ret = _lib._objc_msgSend_387(_id, _lib._sel_currentRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// may be nil if no response has been received - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_389(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); - } - - /// Sets a task-specific delegate. Methods not implemented on this delegate will - /// still be forwarded to the session delegate. - /// - /// Cannot be modified after task resumes. Not supported on background session. - /// - /// Delegate is strongly referenced until the task completes, after which it is - /// reset to `nil`. - NSObject? get delegate { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - /// Sets a task-specific delegate. Methods not implemented on this delegate will - /// still be forwarded to the session delegate. - /// - /// Cannot be modified after task resumes. Not supported on background session. - /// - /// Delegate is strongly referenced until the task completes, after which it is - /// reset to `nil`. - set delegate(NSObject? value) { - _lib._objc_msgSend_362( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); - } - - /// NSProgress object which represents the task progress. - /// It can be used for task progress tracking. - NSProgress? get progress { - final _ret = _lib._objc_msgSend_322(_id, _lib._sel_progress1); - return _ret.address == 0 - ? null - : NSProgress._(_ret, _lib, retain: true, release: true); - } - - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - NSDate? get earliestBeginDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_earliestBeginDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - set earliestBeginDate(NSDate? value) { - _lib._objc_msgSend_390( - _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); - } - - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - int get countOfBytesClientExpectsToSend { - return _lib._objc_msgSend_329( - _id, _lib._sel_countOfBytesClientExpectsToSend1); - } - - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - set countOfBytesClientExpectsToSend(int value) { - _lib._objc_msgSend_330( - _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); - } - - int get countOfBytesClientExpectsToReceive { - return _lib._objc_msgSend_329( - _id, _lib._sel_countOfBytesClientExpectsToReceive1); - } - - set countOfBytesClientExpectsToReceive(int value) { - _lib._objc_msgSend_330( - _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); - } - - /// number of body bytes already sent - int get countOfBytesSent { - return _lib._objc_msgSend_329(_id, _lib._sel_countOfBytesSent1); - } - - /// number of body bytes already received - int get countOfBytesReceived { - return _lib._objc_msgSend_329(_id, _lib._sel_countOfBytesReceived1); - } - - /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request - int get countOfBytesExpectedToSend { - return _lib._objc_msgSend_329(_id, _lib._sel_countOfBytesExpectedToSend1); - } - - /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. - int get countOfBytesExpectedToReceive { - return _lib._objc_msgSend_329( - _id, _lib._sel_countOfBytesExpectedToReceive1); - } - - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - NSString? get taskDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_taskDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - set taskDescription(NSString? value) { - _lib._objc_msgSend_331( - _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); - } - - /// -cancel returns immediately, but marks a task as being canceled. - /// The task will signal -URLSession:task:didCompleteWithError: with an - /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some - /// cases, the task may signal other work before it acknowledges the - /// cancelation. -cancel may be sent to a task that has been suspended. - void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } - - /// The current state of the task within the session. - int get state { - return _lib._objc_msgSend_391(_id, _lib._sel_state1); - } - - /// The error, if any, delivered via -URLSession:task:didCompleteWithError: - /// This property will be nil in the event that no error occurred. - NSError? get error { - final _ret = _lib._objc_msgSend_365(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); - } - - /// Suspending a task will prevent the NSURLSession from continuing to - /// load data. There may still be delegate calls made on behalf of - /// this task (for instance, to report data received while suspending) - /// but no further transmissions will be made on behalf of the task - /// until -resume is sent. The timeout timer associated with the task - /// will be disabled while a task is suspended. -suspend and -resume are - /// nestable. - void suspend() { - return _lib._objc_msgSend_1(_id, _lib._sel_suspend1); - } - - void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); - } - - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. - /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. - /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - double get priority { - return _lib._objc_msgSend_84(_id, _lib._sel_priority1); - } - - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. - /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. - /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - set priority(double value) { - _lib._objc_msgSend_392(_id, _lib._sel_setPriority_1, value); - } - - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. - /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - bool get prefersIncrementalDelivery { - return _lib._objc_msgSend_11(_id, _lib._sel_prefersIncrementalDelivery1); - } - - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. - /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - set prefersIncrementalDelivery(bool value) { - _lib._objc_msgSend_332( - _id, _lib._sel_setPrefersIncrementalDelivery_1, value); - } - - @override - NSURLSessionTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTask._(_ret, _lib, retain: true, release: true); - } - - static NSURLSessionTask new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); - } - - static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); - } -} - -class NSURLResponse extends NSObject { - NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLResponse] that points to the same underlying object as [other]. - static NSURLResponse castFrom(T other) { - return NSURLResponse._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURLResponse] that wraps the given raw object pointer. - static NSURLResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLResponse._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); - } - - /// ! - /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: - /// @abstract Initialize an NSURLResponse with the provided values. - /// @param URL the URL - /// @param MIMEType the MIME content type of the response - /// @param length the expected content length of the associated data - /// @param name the name of the text encoding for the associated data, if applicable, else nil - /// @result The initialized NSURLResponse. - /// @discussion This is the designated initializer for NSURLResponse. - NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - NSURL? URL, NSString? MIMEType, int length, NSString? name) { - final _ret = _lib._objc_msgSend_388( - _id, - _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, - URL?._id ?? ffi.nullptr, - MIMEType?._id ?? ffi.nullptr, - length, - name?._id ?? ffi.nullptr); - return NSURLResponse._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the MIME type of the receiver. - /// @discussion The MIME type is based on the information provided - /// from an origin source. However, that value may be changed or - /// corrected by a protocol implementation if it can be determined - /// that the origin server or source reported the information - /// incorrectly or imprecisely. An attempt to guess the MIME type may - /// be made if the origin source did not report any such information. - /// @result The MIME type of the receiver. - NSString? get MIMEType { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_MIMEType1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the expected content length of the receiver. - /// @discussion Some protocol implementations report a content length - /// as part of delivering load metadata, but not all protocols - /// guarantee the amount of data that will be delivered in actuality. - /// Hence, this method returns an expected amount. Clients should use - /// this value as an advisory, and should be prepared to deal with - /// either more or less data. - /// @result The expected content length of the receiver, or -1 if - /// there is no expectation that can be arrived at regarding expected - /// content length. - int get expectedContentLength { - return _lib._objc_msgSend_82(_id, _lib._sel_expectedContentLength1); - } - - /// ! - /// @abstract Returns the name of the text encoding of the receiver. - /// @discussion This name will be the actual string reported by the - /// origin source during the course of performing a protocol-specific - /// URL load. Clients can inspect this string and convert it to an - /// NSStringEncoding or CFStringEncoding using the methods and - /// functions made available in the appropriate framework. - /// @result The name of the text encoding of the receiver, or nil if no - /// text encoding was specified. - NSString? get textEncodingName { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_textEncodingName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns a suggested filename if the resource were saved to disk. - /// @discussion The method first checks if the server has specified a filename using the - /// content disposition header. If no valid filename is specified using that mechanism, - /// this method checks the last path component of the URL. If no valid filename can be - /// obtained using the last path component, this method uses the URL's host as the filename. - /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. - /// In most cases, this method appends the proper file extension based on the MIME type. - /// This method always returns a valid filename. - /// @result A suggested filename to use if saving the resource to disk. - NSString? get suggestedFilename { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedFilename1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSURLResponse new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); - } - - static NSURLResponse alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); - } -} - -abstract class NSURLSessionTaskState { - /// The task is currently being serviced by the session - static const int NSURLSessionTaskStateRunning = 0; - static const int NSURLSessionTaskStateSuspended = 1; - - /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. - static const int NSURLSessionTaskStateCanceling = 2; - - /// The task has completed and the session will receive no more delegate notifications - static const int NSURLSessionTaskStateCompleted = 3; -} - -void _ObjCBlock20_fnPtrTrampoline( +void _ObjCBlock21_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { return block.ref.target .cast< @@ -71860,52 +72680,52 @@ void _ObjCBlock20_fnPtrTrampoline( .asFunction arg0)>()(arg0); } -final _ObjCBlock20_closureRegistry = {}; -int _ObjCBlock20_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock20_registerClosure(Function fn) { - final id = ++_ObjCBlock20_closureRegistryIndex; - _ObjCBlock20_closureRegistry[id] = fn; +final _ObjCBlock21_closureRegistry = {}; +int _ObjCBlock21_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock21_registerClosure(Function fn) { + final id = ++_ObjCBlock21_closureRegistryIndex; + _ObjCBlock21_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock20_closureTrampoline( +void _ObjCBlock21_closureTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock20_closureRegistry[block.ref.target.address]!(arg0); + return _ObjCBlock21_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock20 extends _ObjCBlockBase { - ObjCBlock20._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock21 extends _ObjCBlockBase { + ObjCBlock21._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock20.fromFunctionPointer( + ObjCBlock21.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0)>( - _ObjCBlock20_fnPtrTrampoline) + _ObjCBlock21_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock20.fromFunction( + ObjCBlock21.fromFunction( NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0)>( - _ObjCBlock20_closureTrampoline) + _ObjCBlock21_closureTrampoline) .cast(), - _ObjCBlock20_registerClosure(fn)), + _ObjCBlock21_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(ffi.Pointer arg0) { @@ -72268,7 +73088,7 @@ final class __sFILE extends ffi.Struct { external ffi.Pointer _cookie; external ffi - .Pointer)>> + .Pointer)>> _close; external ffi.Pointer< @@ -73272,7 +74092,7 @@ typedef CFRunLoopObserverCallBack = ffi.Pointer< ffi.NativeFunction< ffi.Void Function(CFRunLoopObserverRef observer, ffi.Int32 activity, ffi.Pointer info)>>; -void _ObjCBlock21_fnPtrTrampoline( +void _ObjCBlock22_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { return block.ref.target .cast< @@ -73282,45 +74102,44 @@ void _ObjCBlock21_fnPtrTrampoline( void Function(CFRunLoopObserverRef arg0, int arg1)>()(arg0, arg1); } -final _ObjCBlock21_closureRegistry = {}; -int _ObjCBlock21_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock21_registerClosure(Function fn) { - final id = ++_ObjCBlock21_closureRegistryIndex; - _ObjCBlock21_closureRegistry[id] = fn; +final _ObjCBlock22_closureRegistry = {}; +int _ObjCBlock22_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock22_registerClosure(Function fn) { + final id = ++_ObjCBlock22_closureRegistryIndex; + _ObjCBlock22_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock21_closureTrampoline( +void _ObjCBlock22_closureTrampoline( ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { - return _ObjCBlock21_closureRegistry[block.ref.target.address]!(arg0, arg1); + return _ObjCBlock22_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock21 extends _ObjCBlockBase { - ObjCBlock21._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock22 extends _ObjCBlockBase { + ObjCBlock22._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock21.fromFunctionPointer( + ObjCBlock22.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>> ptr) : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, - ffi.Int32 arg1)>(_ObjCBlock21_fnPtrTrampoline) - .cast(), - ptr.cast()), + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, + ffi.Int32 arg1)>(_ObjCBlock22_fnPtrTrampoline) + .cast(), + ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock21.fromFunction(NativeCupertinoHttp lib, + ObjCBlock22.fromFunction(NativeCupertinoHttp lib, void Function(CFRunLoopObserverRef arg0, int arg1) fn) : this._( lib._newBlock1( @@ -73328,9 +74147,9 @@ class ObjCBlock21 extends _ObjCBlockBase { ffi.Void Function( ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, - ffi.Int32 arg1)>(_ObjCBlock21_closureTrampoline) + ffi.Int32 arg1)>(_ObjCBlock22_closureTrampoline) .cast(), - _ObjCBlock21_registerClosure(fn)), + _ObjCBlock22_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(CFRunLoopObserverRef arg0, int arg1) { @@ -73368,32 +74187,32 @@ typedef CFRunLoopTimerCallBack = ffi.Pointer< ffi.NativeFunction< ffi.Void Function( CFRunLoopTimerRef timer, ffi.Pointer info)>>; -void _ObjCBlock22_fnPtrTrampoline( +void _ObjCBlock23_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { return block.ref.target .cast>() .asFunction()(arg0); } -final _ObjCBlock22_closureRegistry = {}; -int _ObjCBlock22_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock22_registerClosure(Function fn) { - final id = ++_ObjCBlock22_closureRegistryIndex; - _ObjCBlock22_closureRegistry[id] = fn; +final _ObjCBlock23_closureRegistry = {}; +int _ObjCBlock23_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock23_registerClosure(Function fn) { + final id = ++_ObjCBlock23_closureRegistryIndex; + _ObjCBlock23_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock22_closureTrampoline( +void _ObjCBlock23_closureTrampoline( ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { - return _ObjCBlock22_closureRegistry[block.ref.target.address]!(arg0); + return _ObjCBlock23_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock22 extends _ObjCBlockBase { - ObjCBlock22._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock23 extends _ObjCBlockBase { + ObjCBlock23._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock22.fromFunctionPointer( + ObjCBlock23.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer> ptr) @@ -73402,23 +74221,23 @@ class ObjCBlock22 extends _ObjCBlockBase { _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0)>( - _ObjCBlock22_fnPtrTrampoline) + _ObjCBlock23_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock22.fromFunction( + ObjCBlock23.fromFunction( NativeCupertinoHttp lib, void Function(CFRunLoopTimerRef arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0)>( - _ObjCBlock22_closureTrampoline) + _ObjCBlock23_closureTrampoline) .cast(), - _ObjCBlock22_registerClosure(fn)), + _ObjCBlock23_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(CFRunLoopTimerRef arg0) { @@ -73888,50 +74707,50 @@ typedef dispatch_object_t = ffi.Pointer; typedef dispatch_function_t = ffi.Pointer)>>; typedef dispatch_block_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock23_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { +void _ObjCBlock24_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { return block.ref.target .cast>() .asFunction()(arg0); } -final _ObjCBlock23_closureRegistry = {}; -int _ObjCBlock23_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock23_registerClosure(Function fn) { - final id = ++_ObjCBlock23_closureRegistryIndex; - _ObjCBlock23_closureRegistry[id] = fn; +final _ObjCBlock24_closureRegistry = {}; +int _ObjCBlock24_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock24_registerClosure(Function fn) { + final id = ++_ObjCBlock24_closureRegistryIndex; + _ObjCBlock24_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock23_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock23_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock24_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock24_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock23 extends _ObjCBlockBase { - ObjCBlock23._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock24 extends _ObjCBlockBase { + ObjCBlock24._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock23.fromFunctionPointer(NativeCupertinoHttp lib, + ObjCBlock24.fromFunctionPointer(NativeCupertinoHttp lib, ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Size arg0)>(_ObjCBlock23_fnPtrTrampoline) + ffi.Size arg0)>(_ObjCBlock24_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock23.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + ObjCBlock24.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Size arg0)>(_ObjCBlock23_closureTrampoline) + ffi.Size arg0)>(_ObjCBlock24_closureTrampoline) .cast(), - _ObjCBlock23_registerClosure(fn)), + _ObjCBlock24_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(int arg0) { @@ -74175,7 +74994,7 @@ final class dispatch_data_s extends ffi.Opaque {} typedef dispatch_data_t = ffi.Pointer; typedef dispatch_data_applier_t = ffi.Pointer<_ObjCBlock>; -bool _ObjCBlock24_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, +bool _ObjCBlock25_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { return block.ref.target .cast< @@ -74187,26 +75006,26 @@ bool _ObjCBlock24_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg2, int arg3)>()(arg0, arg1, arg2, arg3); } -final _ObjCBlock24_closureRegistry = {}; -int _ObjCBlock24_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock24_registerClosure(Function fn) { - final id = ++_ObjCBlock24_closureRegistryIndex; - _ObjCBlock24_closureRegistry[id] = fn; +final _ObjCBlock25_closureRegistry = {}; +int _ObjCBlock25_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock25_registerClosure(Function fn) { + final id = ++_ObjCBlock25_closureRegistryIndex; + _ObjCBlock25_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -bool _ObjCBlock24_closureTrampoline(ffi.Pointer<_ObjCBlock> block, +bool _ObjCBlock25_closureTrampoline(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { - return _ObjCBlock24_closureRegistry[block.ref.target.address]!( + return _ObjCBlock25_closureRegistry[block.ref.target.address]!( arg0, arg1, arg2, arg3); } -class ObjCBlock24 extends _ObjCBlockBase { - ObjCBlock24._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock25 extends _ObjCBlockBase { + ObjCBlock25._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock24.fromFunctionPointer( + ObjCBlock25.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -74221,14 +75040,14 @@ class ObjCBlock24 extends _ObjCBlockBase { dispatch_data_t arg0, ffi.Size arg1, ffi.Pointer arg2, - ffi.Size arg3)>(_ObjCBlock24_fnPtrTrampoline, false) + ffi.Size arg3)>(_ObjCBlock25_fnPtrTrampoline, false) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock24.fromFunction( + ObjCBlock25.fromFunction( NativeCupertinoHttp lib, bool Function(dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) @@ -74242,9 +75061,9 @@ class ObjCBlock24 extends _ObjCBlockBase { ffi.Size arg1, ffi.Pointer arg2, ffi.Size arg3)>( - _ObjCBlock24_closureTrampoline, false) + _ObjCBlock25_closureTrampoline, false) .cast(), - _ObjCBlock24_registerClosure(fn)), + _ObjCBlock25_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; bool call( @@ -74269,7 +75088,7 @@ class ObjCBlock24 extends _ObjCBlockBase { } typedef dispatch_fd_t = ffi.Int; -void _ObjCBlock25_fnPtrTrampoline( +void _ObjCBlock26_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { return block.ref.target .cast< @@ -74278,25 +75097,25 @@ void _ObjCBlock25_fnPtrTrampoline( .asFunction()(arg0, arg1); } -final _ObjCBlock25_closureRegistry = {}; -int _ObjCBlock25_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock25_registerClosure(Function fn) { - final id = ++_ObjCBlock25_closureRegistryIndex; - _ObjCBlock25_closureRegistry[id] = fn; +final _ObjCBlock26_closureRegistry = {}; +int _ObjCBlock26_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock26_registerClosure(Function fn) { + final id = ++_ObjCBlock26_closureRegistryIndex; + _ObjCBlock26_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock25_closureTrampoline( +void _ObjCBlock26_closureTrampoline( ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { - return _ObjCBlock25_closureRegistry[block.ref.target.address]!(arg0, arg1); + return _ObjCBlock26_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock25 extends _ObjCBlockBase { - ObjCBlock25._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock26 extends _ObjCBlockBase { + ObjCBlock26._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock25.fromFunctionPointer( + ObjCBlock26.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -74308,14 +75127,14 @@ class ObjCBlock25 extends _ObjCBlockBase { ffi.Void Function( ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, - ffi.Int arg1)>(_ObjCBlock25_fnPtrTrampoline) + ffi.Int arg1)>(_ObjCBlock26_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock25.fromFunction( + ObjCBlock26.fromFunction( NativeCupertinoHttp lib, void Function(dispatch_data_t arg0, int arg1) fn) : this._( lib._newBlock1( @@ -74323,9 +75142,9 @@ class ObjCBlock25 extends _ObjCBlockBase { ffi.Void Function( ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, - ffi.Int arg1)>(_ObjCBlock25_closureTrampoline) + ffi.Int arg1)>(_ObjCBlock26_closureTrampoline) .cast(), - _ObjCBlock25_registerClosure(fn)), + _ObjCBlock26_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(dispatch_data_t arg0, int arg1) { @@ -74342,50 +75161,50 @@ class ObjCBlock25 extends _ObjCBlockBase { typedef dispatch_io_t = ffi.Pointer; typedef dispatch_io_type_t = ffi.UnsignedLong; -void _ObjCBlock26_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { +void _ObjCBlock27_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { return block.ref.target .cast>() .asFunction()(arg0); } -final _ObjCBlock26_closureRegistry = {}; -int _ObjCBlock26_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock26_registerClosure(Function fn) { - final id = ++_ObjCBlock26_closureRegistryIndex; - _ObjCBlock26_closureRegistry[id] = fn; +final _ObjCBlock27_closureRegistry = {}; +int _ObjCBlock27_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock27_registerClosure(Function fn) { + final id = ++_ObjCBlock27_closureRegistryIndex; + _ObjCBlock27_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock26_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock26_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock27_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock27_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock26 extends _ObjCBlockBase { - ObjCBlock26._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock27 extends _ObjCBlockBase { + ObjCBlock27._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock26.fromFunctionPointer(NativeCupertinoHttp lib, + ObjCBlock27.fromFunctionPointer(NativeCupertinoHttp lib, ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Int arg0)>(_ObjCBlock26_fnPtrTrampoline) + ffi.Int arg0)>(_ObjCBlock27_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock26.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + ObjCBlock27.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Int arg0)>(_ObjCBlock26_closureTrampoline) + ffi.Int arg0)>(_ObjCBlock27_closureTrampoline) .cast(), - _ObjCBlock26_registerClosure(fn)), + _ObjCBlock27_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(int arg0) { @@ -74401,7 +75220,7 @@ class ObjCBlock26 extends _ObjCBlockBase { } typedef dispatch_io_handler_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock27_fnPtrTrampoline( +void _ObjCBlock28_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { return block.ref.target .cast< @@ -74413,31 +75232,31 @@ void _ObjCBlock27_fnPtrTrampoline( bool arg0, dispatch_data_t arg1, int arg2)>()(arg0, arg1, arg2); } -final _ObjCBlock27_closureRegistry = {}; -int _ObjCBlock27_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock27_registerClosure(Function fn) { - final id = ++_ObjCBlock27_closureRegistryIndex; - _ObjCBlock27_closureRegistry[id] = fn; +final _ObjCBlock28_closureRegistry = {}; +int _ObjCBlock28_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock28_registerClosure(Function fn) { + final id = ++_ObjCBlock28_closureRegistryIndex; + _ObjCBlock28_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock27_closureTrampoline( +void _ObjCBlock28_closureTrampoline( ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { - return _ObjCBlock27_closureRegistry[block.ref.target.address]!( + return _ObjCBlock28_closureRegistry[block.ref.target.address]!( arg0, arg1, arg2); } -class ObjCBlock27 extends _ObjCBlockBase { - ObjCBlock27._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock28 extends _ObjCBlockBase { + ObjCBlock28._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock27.fromFunctionPointer( + ObjCBlock28.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>> + ffi.Void Function(ffi.Bool arg0, dispatch_data_t arg1, + ffi.Int arg2)>> ptr) : this._( lib._newBlock1( @@ -74446,14 +75265,14 @@ class ObjCBlock27 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0, dispatch_data_t arg1, - ffi.Int arg2)>(_ObjCBlock27_fnPtrTrampoline) + ffi.Int arg2)>(_ObjCBlock28_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock27.fromFunction(NativeCupertinoHttp lib, + ObjCBlock28.fromFunction(NativeCupertinoHttp lib, void Function(bool arg0, dispatch_data_t arg1, int arg2) fn) : this._( lib._newBlock1( @@ -74462,9 +75281,9 @@ class ObjCBlock27 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0, dispatch_data_t arg1, - ffi.Int arg2)>(_ObjCBlock27_closureTrampoline) + ffi.Int arg2)>(_ObjCBlock28_closureTrampoline) .cast(), - _ObjCBlock27_registerClosure(fn)), + _ObjCBlock28_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(bool arg0, dispatch_data_t arg1, int arg2) { @@ -75407,7 +76226,7 @@ final class __SecTrust extends ffi.Opaque {} typedef SecTrustRef = ffi.Pointer<__SecTrust>; typedef SecTrustCallback = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock28_fnPtrTrampoline( +void _ObjCBlock29_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { return block.ref.target .cast< @@ -75416,25 +76235,25 @@ void _ObjCBlock28_fnPtrTrampoline( .asFunction()(arg0, arg1); } -final _ObjCBlock28_closureRegistry = {}; -int _ObjCBlock28_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock28_registerClosure(Function fn) { - final id = ++_ObjCBlock28_closureRegistryIndex; - _ObjCBlock28_closureRegistry[id] = fn; +final _ObjCBlock29_closureRegistry = {}; +int _ObjCBlock29_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock29_registerClosure(Function fn) { + final id = ++_ObjCBlock29_closureRegistryIndex; + _ObjCBlock29_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock28_closureTrampoline( +void _ObjCBlock29_closureTrampoline( ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { - return _ObjCBlock28_closureRegistry[block.ref.target.address]!(arg0, arg1); + return _ObjCBlock29_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock28 extends _ObjCBlockBase { - ObjCBlock28._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock29 extends _ObjCBlockBase { + ObjCBlock29._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock28.fromFunctionPointer( + ObjCBlock29.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -75447,14 +76266,14 @@ class ObjCBlock28 extends _ObjCBlockBase { ffi.Void Function( ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, - ffi.Int32 arg1)>(_ObjCBlock28_fnPtrTrampoline) + ffi.Int32 arg1)>(_ObjCBlock29_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock28.fromFunction( + ObjCBlock29.fromFunction( NativeCupertinoHttp lib, void Function(SecTrustRef arg0, int arg1) fn) : this._( lib._newBlock1( @@ -75462,9 +76281,9 @@ class ObjCBlock28 extends _ObjCBlockBase { ffi.Void Function( ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, - ffi.Int32 arg1)>(_ObjCBlock28_closureTrampoline) + ffi.Int32 arg1)>(_ObjCBlock29_closureTrampoline) .cast(), - _ObjCBlock28_registerClosure(fn)), + _ObjCBlock29_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(SecTrustRef arg0, int arg1) { @@ -75480,7 +76299,7 @@ class ObjCBlock28 extends _ObjCBlockBase { } typedef SecTrustWithErrorCallback = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock29_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock30_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, bool arg1, CFErrorRef arg2) { return block.ref.target .cast< @@ -75492,26 +76311,26 @@ void _ObjCBlock29_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, arg0, arg1, arg2); } -final _ObjCBlock29_closureRegistry = {}; -int _ObjCBlock29_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock29_registerClosure(Function fn) { - final id = ++_ObjCBlock29_closureRegistryIndex; - _ObjCBlock29_closureRegistry[id] = fn; +final _ObjCBlock30_closureRegistry = {}; +int _ObjCBlock30_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock30_registerClosure(Function fn) { + final id = ++_ObjCBlock30_closureRegistryIndex; + _ObjCBlock30_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock29_closureTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock30_closureTrampoline(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, bool arg1, CFErrorRef arg2) { - return _ObjCBlock29_closureRegistry[block.ref.target.address]!( + return _ObjCBlock30_closureRegistry[block.ref.target.address]!( arg0, arg1, arg2); } -class ObjCBlock29 extends _ObjCBlockBase { - ObjCBlock29._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock30 extends _ObjCBlockBase { + ObjCBlock30._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock29.fromFunctionPointer( + ObjCBlock30.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -75525,14 +76344,14 @@ class ObjCBlock29 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, ffi.Bool arg1, - CFErrorRef arg2)>(_ObjCBlock29_fnPtrTrampoline) + CFErrorRef arg2)>(_ObjCBlock30_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock29.fromFunction(NativeCupertinoHttp lib, + ObjCBlock30.fromFunction(NativeCupertinoHttp lib, void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2) fn) : this._( lib._newBlock1( @@ -75541,9 +76360,9 @@ class ObjCBlock29 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, ffi.Bool arg1, - CFErrorRef arg2)>(_ObjCBlock29_closureTrampoline) + CFErrorRef arg2)>(_ObjCBlock30_closureTrampoline) .cast(), - _ObjCBlock29_registerClosure(fn)), + _ObjCBlock30_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(SecTrustRef arg0, bool arg1, CFErrorRef arg2) { @@ -77743,32 +78562,32 @@ abstract class SSLProtocol { typedef sec_trust_t = ffi.Pointer; typedef sec_identity_t = ffi.Pointer; -void _ObjCBlock30_fnPtrTrampoline( +void _ObjCBlock31_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { return block.ref.target .cast>() .asFunction()(arg0); } -final _ObjCBlock30_closureRegistry = {}; -int _ObjCBlock30_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock30_registerClosure(Function fn) { - final id = ++_ObjCBlock30_closureRegistryIndex; - _ObjCBlock30_closureRegistry[id] = fn; +final _ObjCBlock31_closureRegistry = {}; +int _ObjCBlock31_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock31_registerClosure(Function fn) { + final id = ++_ObjCBlock31_closureRegistryIndex; + _ObjCBlock31_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock30_closureTrampoline( +void _ObjCBlock31_closureTrampoline( ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { - return _ObjCBlock30_closureRegistry[block.ref.target.address]!(arg0); + return _ObjCBlock31_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock30 extends _ObjCBlockBase { - ObjCBlock30._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock31 extends _ObjCBlockBase { + ObjCBlock31._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock30.fromFunctionPointer( + ObjCBlock31.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer> ptr) @@ -77777,23 +78596,23 @@ class ObjCBlock30 extends _ObjCBlockBase { _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0)>( - _ObjCBlock30_fnPtrTrampoline) + _ObjCBlock31_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock30.fromFunction( + ObjCBlock31.fromFunction( NativeCupertinoHttp lib, void Function(sec_certificate_t arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0)>( - _ObjCBlock30_closureTrampoline) + _ObjCBlock31_closureTrampoline) .cast(), - _ObjCBlock30_registerClosure(fn)), + _ObjCBlock31_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(sec_certificate_t arg0) { @@ -77811,50 +78630,50 @@ class ObjCBlock30 extends _ObjCBlockBase { typedef sec_certificate_t = ffi.Pointer; typedef sec_protocol_metadata_t = ffi.Pointer; typedef SSLCipherSuite = ffi.Uint16; -void _ObjCBlock31_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { +void _ObjCBlock32_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { return block.ref.target .cast>() .asFunction()(arg0); } -final _ObjCBlock31_closureRegistry = {}; -int _ObjCBlock31_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock31_registerClosure(Function fn) { - final id = ++_ObjCBlock31_closureRegistryIndex; - _ObjCBlock31_closureRegistry[id] = fn; +final _ObjCBlock32_closureRegistry = {}; +int _ObjCBlock32_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock32_registerClosure(Function fn) { + final id = ++_ObjCBlock32_closureRegistryIndex; + _ObjCBlock32_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock31_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock31_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock32_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { + return _ObjCBlock32_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock31 extends _ObjCBlockBase { - ObjCBlock31._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock32 extends _ObjCBlockBase { + ObjCBlock32._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock31.fromFunctionPointer(NativeCupertinoHttp lib, + ObjCBlock32.fromFunctionPointer(NativeCupertinoHttp lib, ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Uint16 arg0)>(_ObjCBlock31_fnPtrTrampoline) + ffi.Uint16 arg0)>(_ObjCBlock32_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock31.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + ObjCBlock32.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Uint16 arg0)>(_ObjCBlock31_closureTrampoline) + ffi.Uint16 arg0)>(_ObjCBlock32_closureTrampoline) .cast(), - _ObjCBlock31_registerClosure(fn)), + _ObjCBlock32_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(int arg0) { @@ -77869,7 +78688,7 @@ class ObjCBlock31 extends _ObjCBlockBase { } } -void _ObjCBlock32_fnPtrTrampoline( +void _ObjCBlock33_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { return block.ref.target .cast< @@ -77880,25 +78699,25 @@ void _ObjCBlock32_fnPtrTrampoline( dispatch_data_t arg0, dispatch_data_t arg1)>()(arg0, arg1); } -final _ObjCBlock32_closureRegistry = {}; -int _ObjCBlock32_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock32_registerClosure(Function fn) { - final id = ++_ObjCBlock32_closureRegistryIndex; - _ObjCBlock32_closureRegistry[id] = fn; +final _ObjCBlock33_closureRegistry = {}; +int _ObjCBlock33_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock33_registerClosure(Function fn) { + final id = ++_ObjCBlock33_closureRegistryIndex; + _ObjCBlock33_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock32_closureTrampoline( +void _ObjCBlock33_closureTrampoline( ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { - return _ObjCBlock32_closureRegistry[block.ref.target.address]!(arg0, arg1); + return _ObjCBlock33_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock32 extends _ObjCBlockBase { - ObjCBlock32._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock33 extends _ObjCBlockBase { + ObjCBlock33._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock32.fromFunctionPointer( + ObjCBlock33.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -77911,23 +78730,23 @@ class ObjCBlock32 extends _ObjCBlockBase { ffi.Void Function( ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, - dispatch_data_t arg1)>(_ObjCBlock32_fnPtrTrampoline) + dispatch_data_t arg1)>(_ObjCBlock33_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock32.fromFunction(NativeCupertinoHttp lib, + ObjCBlock33.fromFunction(NativeCupertinoHttp lib, void Function(dispatch_data_t arg0, dispatch_data_t arg1) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1)>( - _ObjCBlock32_closureTrampoline) + _ObjCBlock33_closureTrampoline) .cast(), - _ObjCBlock32_registerClosure(fn)), + _ObjCBlock33_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(dispatch_data_t arg0, dispatch_data_t arg1) { @@ -77944,7 +78763,7 @@ class ObjCBlock32 extends _ObjCBlockBase { typedef sec_protocol_options_t = ffi.Pointer; typedef sec_protocol_pre_shared_key_selection_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock33_fnPtrTrampoline( +void _ObjCBlock34_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, sec_protocol_metadata_t arg0, dispatch_data_t arg1, @@ -77962,29 +78781,29 @@ void _ObjCBlock33_fnPtrTrampoline( arg0, arg1, arg2); } -final _ObjCBlock33_closureRegistry = {}; -int _ObjCBlock33_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock33_registerClosure(Function fn) { - final id = ++_ObjCBlock33_closureRegistryIndex; - _ObjCBlock33_closureRegistry[id] = fn; +final _ObjCBlock34_closureRegistry = {}; +int _ObjCBlock34_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock34_registerClosure(Function fn) { + final id = ++_ObjCBlock34_closureRegistryIndex; + _ObjCBlock34_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock33_closureTrampoline( +void _ObjCBlock34_closureTrampoline( ffi.Pointer<_ObjCBlock> block, sec_protocol_metadata_t arg0, dispatch_data_t arg1, sec_protocol_pre_shared_key_selection_complete_t arg2) { - return _ObjCBlock33_closureRegistry[block.ref.target.address]!( + return _ObjCBlock34_closureRegistry[block.ref.target.address]!( arg0, arg1, arg2); } -class ObjCBlock33 extends _ObjCBlockBase { - ObjCBlock33._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock34 extends _ObjCBlockBase { + ObjCBlock34._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock33.fromFunctionPointer( + ObjCBlock34.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -78001,14 +78820,14 @@ class ObjCBlock33 extends _ObjCBlockBase { sec_protocol_metadata_t arg0, dispatch_data_t arg1, sec_protocol_pre_shared_key_selection_complete_t - arg2)>(_ObjCBlock33_fnPtrTrampoline) + arg2)>(_ObjCBlock34_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock33.fromFunction( + ObjCBlock34.fromFunction( NativeCupertinoHttp lib, void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, sec_protocol_pre_shared_key_selection_complete_t arg2) @@ -78021,9 +78840,9 @@ class ObjCBlock33 extends _ObjCBlockBase { sec_protocol_metadata_t arg0, dispatch_data_t arg1, sec_protocol_pre_shared_key_selection_complete_t - arg2)>(_ObjCBlock33_closureTrampoline) + arg2)>(_ObjCBlock34_closureTrampoline) .cast(), - _ObjCBlock33_registerClosure(fn)), + _ObjCBlock34_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(sec_protocol_metadata_t arg0, dispatch_data_t arg1, @@ -78049,7 +78868,7 @@ class ObjCBlock33 extends _ObjCBlockBase { typedef sec_protocol_pre_shared_key_selection_complete_t = ffi.Pointer<_ObjCBlock>; typedef sec_protocol_key_update_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock34_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock35_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { return block.ref.target .cast< @@ -78061,25 +78880,25 @@ void _ObjCBlock34_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, sec_protocol_key_update_complete_t arg1)>()(arg0, arg1); } -final _ObjCBlock34_closureRegistry = {}; -int _ObjCBlock34_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock34_registerClosure(Function fn) { - final id = ++_ObjCBlock34_closureRegistryIndex; - _ObjCBlock34_closureRegistry[id] = fn; +final _ObjCBlock35_closureRegistry = {}; +int _ObjCBlock35_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock35_registerClosure(Function fn) { + final id = ++_ObjCBlock35_closureRegistryIndex; + _ObjCBlock35_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock34_closureTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock35_closureTrampoline(ffi.Pointer<_ObjCBlock> block, sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { - return _ObjCBlock34_closureRegistry[block.ref.target.address]!(arg0, arg1); + return _ObjCBlock35_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock34 extends _ObjCBlockBase { - ObjCBlock34._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock35 extends _ObjCBlockBase { + ObjCBlock35._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock34.fromFunctionPointer( + ObjCBlock35.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -78093,14 +78912,14 @@ class ObjCBlock34 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1)>( - _ObjCBlock34_fnPtrTrampoline) + _ObjCBlock35_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock34.fromFunction( + ObjCBlock35.fromFunction( NativeCupertinoHttp lib, void Function(sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) @@ -78112,9 +78931,9 @@ class ObjCBlock34 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1)>( - _ObjCBlock34_closureTrampoline) + _ObjCBlock35_closureTrampoline) .cast(), - _ObjCBlock34_registerClosure(fn)), + _ObjCBlock35_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call( @@ -78136,7 +78955,7 @@ class ObjCBlock34 extends _ObjCBlockBase { typedef sec_protocol_key_update_complete_t = ffi.Pointer<_ObjCBlock>; typedef sec_protocol_challenge_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock35_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock36_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { return block.ref.target .cast< @@ -78148,25 +78967,25 @@ void _ObjCBlock35_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, sec_protocol_challenge_complete_t arg1)>()(arg0, arg1); } -final _ObjCBlock35_closureRegistry = {}; -int _ObjCBlock35_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock35_registerClosure(Function fn) { - final id = ++_ObjCBlock35_closureRegistryIndex; - _ObjCBlock35_closureRegistry[id] = fn; +final _ObjCBlock36_closureRegistry = {}; +int _ObjCBlock36_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock36_registerClosure(Function fn) { + final id = ++_ObjCBlock36_closureRegistryIndex; + _ObjCBlock36_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock35_closureTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock36_closureTrampoline(ffi.Pointer<_ObjCBlock> block, sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { - return _ObjCBlock35_closureRegistry[block.ref.target.address]!(arg0, arg1); + return _ObjCBlock36_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock35 extends _ObjCBlockBase { - ObjCBlock35._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock36 extends _ObjCBlockBase { + ObjCBlock36._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock35.fromFunctionPointer( + ObjCBlock36.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -78174,20 +78993,21 @@ class ObjCBlock35 extends _ObjCBlockBase { sec_protocol_challenge_complete_t arg1)>> ptr) : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>( - _ObjCBlock35_fnPtrTrampoline) - .cast(), - ptr.cast()), + lib + ._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>( + _ObjCBlock36_fnPtrTrampoline) + .cast(), + ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock35.fromFunction( + ObjCBlock36.fromFunction( NativeCupertinoHttp lib, void Function(sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) fn) @@ -78198,9 +79018,9 @@ class ObjCBlock35 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1)>( - _ObjCBlock35_closureTrampoline) + _ObjCBlock36_closureTrampoline) .cast(), - _ObjCBlock35_registerClosure(fn)), + _ObjCBlock36_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call( @@ -78222,7 +79042,7 @@ class ObjCBlock35 extends _ObjCBlockBase { typedef sec_protocol_challenge_complete_t = ffi.Pointer<_ObjCBlock>; typedef sec_protocol_verify_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock36_fnPtrTrampoline( +void _ObjCBlock37_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, sec_protocol_metadata_t arg0, sec_trust_t arg1, @@ -78237,52 +79057,52 @@ void _ObjCBlock36_fnPtrTrampoline( sec_protocol_verify_complete_t arg2)>()(arg0, arg1, arg2); } -final _ObjCBlock36_closureRegistry = {}; -int _ObjCBlock36_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock36_registerClosure(Function fn) { - final id = ++_ObjCBlock36_closureRegistryIndex; - _ObjCBlock36_closureRegistry[id] = fn; +final _ObjCBlock37_closureRegistry = {}; +int _ObjCBlock37_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock37_registerClosure(Function fn) { + final id = ++_ObjCBlock37_closureRegistryIndex; + _ObjCBlock37_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock36_closureTrampoline( +void _ObjCBlock37_closureTrampoline( ffi.Pointer<_ObjCBlock> block, sec_protocol_metadata_t arg0, sec_trust_t arg1, sec_protocol_verify_complete_t arg2) { - return _ObjCBlock36_closureRegistry[block.ref.target.address]!( + return _ObjCBlock37_closureRegistry[block.ref.target.address]!( arg0, arg1, arg2); } -class ObjCBlock36 extends _ObjCBlockBase { - ObjCBlock36._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock37 extends _ObjCBlockBase { + ObjCBlock37._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock36.fromFunctionPointer( + ObjCBlock37.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< - ffi.NativeFunction< + ffi + .NativeFunction< ffi.Void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, sec_protocol_verify_complete_t arg2)>> ptr) : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>( - _ObjCBlock36_fnPtrTrampoline) - .cast(), - ptr.cast()), + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>( + _ObjCBlock37_fnPtrTrampoline) + .cast(), + ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock36.fromFunction( + ObjCBlock37.fromFunction( NativeCupertinoHttp lib, void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, sec_protocol_verify_complete_t arg2) @@ -78295,9 +79115,9 @@ class ObjCBlock36 extends _ObjCBlockBase { sec_protocol_metadata_t arg0, sec_trust_t arg1, sec_protocol_verify_complete_t arg2)>( - _ObjCBlock36_closureTrampoline) + _ObjCBlock37_closureTrampoline) .cast(), - _ObjCBlock36_registerClosure(fn)), + _ObjCBlock37_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(sec_protocol_metadata_t arg0, sec_trust_t arg1, @@ -78320,50 +79140,50 @@ class ObjCBlock36 extends _ObjCBlockBase { } typedef sec_protocol_verify_complete_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock37_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { +void _ObjCBlock38_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { return block.ref.target .cast>() .asFunction()(arg0); } -final _ObjCBlock37_closureRegistry = {}; -int _ObjCBlock37_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock37_registerClosure(Function fn) { - final id = ++_ObjCBlock37_closureRegistryIndex; - _ObjCBlock37_closureRegistry[id] = fn; +final _ObjCBlock38_closureRegistry = {}; +int _ObjCBlock38_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock38_registerClosure(Function fn) { + final id = ++_ObjCBlock38_closureRegistryIndex; + _ObjCBlock38_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock37_closureTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { - return _ObjCBlock37_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock38_closureTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { + return _ObjCBlock38_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock37 extends _ObjCBlockBase { - ObjCBlock37._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock38 extends _ObjCBlockBase { + ObjCBlock38._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock37.fromFunctionPointer(NativeCupertinoHttp lib, + ObjCBlock38.fromFunctionPointer(NativeCupertinoHttp lib, ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0)>(_ObjCBlock37_fnPtrTrampoline) + ffi.Bool arg0)>(_ObjCBlock38_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock37.fromFunction(NativeCupertinoHttp lib, void Function(bool arg0) fn) + ObjCBlock38.fromFunction(NativeCupertinoHttp lib, void Function(bool arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0)>(_ObjCBlock37_closureTrampoline) + ffi.Bool arg0)>(_ObjCBlock38_closureTrampoline) .cast(), - _ObjCBlock37_registerClosure(fn)), + _ObjCBlock38_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(bool arg0) { @@ -78520,7 +79340,7 @@ class NSURLSession extends NSObject { /// The shared session uses the currently set global NSURLCache, /// NSHTTPCookieStorage and NSURLCredentialStorage objects. static NSURLSession? getSharedSession(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_395( + final _ret = _lib._objc_msgSend_408( _lib._class_NSURLSession1, _lib._sel_sharedSession1); return _ret.address == 0 ? null @@ -78534,7 +79354,7 @@ class NSURLSession extends NSObject { /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. static NSURLSession sessionWithConfiguration_( NativeCupertinoHttp _lib, NSURLSessionConfiguration? configuration) { - final _ret = _lib._objc_msgSend_410( + final _ret = _lib._objc_msgSend_421( _lib._class_NSURLSession1, _lib._sel_sessionWithConfiguration_1, configuration?._id ?? ffi.nullptr); @@ -78546,7 +79366,7 @@ class NSURLSession extends NSObject { NSURLSessionConfiguration? configuration, NSObject? delegate, NSOperationQueue? queue) { - final _ret = _lib._objc_msgSend_411( + final _ret = _lib._objc_msgSend_422( _lib._class_NSURLSession1, _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, configuration?._id ?? ffi.nullptr, @@ -78556,7 +79376,7 @@ class NSURLSession extends NSObject { } NSOperationQueue? get delegateQueue { - final _ret = _lib._objc_msgSend_349(_id, _lib._sel_delegateQueue1); + final _ret = _lib._objc_msgSend_391(_id, _lib._sel_delegateQueue1); return _ret.address == 0 ? null : NSOperationQueue._(_ret, _lib, retain: true, release: true); @@ -78570,7 +79390,7 @@ class NSURLSession extends NSObject { } NSURLSessionConfiguration? get configuration { - final _ret = _lib._objc_msgSend_396(_id, _lib._sel_configuration1); + final _ret = _lib._objc_msgSend_409(_id, _lib._sel_configuration1); return _ret.address == 0 ? null : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); @@ -78588,7 +79408,7 @@ class NSURLSession extends NSObject { /// The sessionDescription property is available for the developer to /// provide a descriptive label for the session. set sessionDescription(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); } @@ -78617,38 +79437,38 @@ class NSURLSession extends NSObject { /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue. void resetWithCompletionHandler_(ObjCBlock completionHandler) { - return _lib._objc_msgSend_345( + return _lib._objc_msgSend_387( _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); } /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue. void flushWithCompletionHandler_(ObjCBlock completionHandler) { - return _lib._objc_msgSend_345( + return _lib._objc_msgSend_387( _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); } /// invokes completionHandler with outstanding data, upload and download tasks. - void getTasksWithCompletionHandler_(ObjCBlock38 completionHandler) { - return _lib._objc_msgSend_412( + void getTasksWithCompletionHandler_(ObjCBlock39 completionHandler) { + return _lib._objc_msgSend_423( _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); } /// invokes completionHandler with all outstanding tasks. - void getAllTasksWithCompletionHandler_(ObjCBlock20 completionHandler) { - return _lib._objc_msgSend_413(_id, + void getAllTasksWithCompletionHandler_(ObjCBlock21 completionHandler) { + return _lib._objc_msgSend_424(_id, _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._id); } /// Creates a data task with the given request. The request may have a body stream. NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_414( + final _ret = _lib._objc_msgSend_425( _id, _lib._sel_dataTaskWithRequest_1, request?._id ?? ffi.nullptr); return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } /// Creates a data task to retrieve the contents of the given URL. NSURLSessionDataTask dataTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_415( + final _ret = _lib._objc_msgSend_426( _id, _lib._sel_dataTaskWithURL_1, url?._id ?? ffi.nullptr); return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } @@ -78656,7 +79476,7 @@ class NSURLSession extends NSObject { /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( NSURLRequest? request, NSURL? fileURL) { - final _ret = _lib._objc_msgSend_416( + final _ret = _lib._objc_msgSend_427( _id, _lib._sel_uploadTaskWithRequest_fromFile_1, request?._id ?? ffi.nullptr, @@ -78667,7 +79487,7 @@ class NSURLSession extends NSObject { /// Creates an upload task with the given request. The body of the request is provided from the bodyData. NSURLSessionUploadTask uploadTaskWithRequest_fromData_( NSURLRequest? request, NSData? bodyData) { - final _ret = _lib._objc_msgSend_417( + final _ret = _lib._objc_msgSend_428( _id, _lib._sel_uploadTaskWithRequest_fromData_1, request?._id ?? ffi.nullptr, @@ -78677,28 +79497,28 @@ class NSURLSession extends NSObject { /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_418(_id, + final _ret = _lib._objc_msgSend_429(_id, _lib._sel_uploadTaskWithStreamedRequest_1, request?._id ?? ffi.nullptr); return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } /// Creates a download task with the given request. NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_420( + final _ret = _lib._objc_msgSend_431( _id, _lib._sel_downloadTaskWithRequest_1, request?._id ?? ffi.nullptr); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } /// Creates a download task to download the contents of the given URL. NSURLSessionDownloadTask downloadTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_421( + final _ret = _lib._objc_msgSend_432( _id, _lib._sel_downloadTaskWithURL_1, url?._id ?? ffi.nullptr); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData? resumeData) { - final _ret = _lib._objc_msgSend_422(_id, + final _ret = _lib._objc_msgSend_433(_id, _lib._sel_downloadTaskWithResumeData_1, resumeData?._id ?? ffi.nullptr); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } @@ -78706,7 +79526,7 @@ class NSURLSession extends NSObject { /// Creates a bidirectional stream task to a given host and port. NSURLSessionStreamTask streamTaskWithHostName_port_( NSString? hostname, int port) { - final _ret = _lib._objc_msgSend_425( + final _ret = _lib._objc_msgSend_436( _id, _lib._sel_streamTaskWithHostName_port_1, hostname?._id ?? ffi.nullptr, @@ -78717,14 +79537,14 @@ class NSURLSession extends NSObject { /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. /// The NSNetService will be resolved before any IO completes. NSURLSessionStreamTask streamTaskWithNetService_(NSNetService? service) { - final _ret = _lib._objc_msgSend_426( + final _ret = _lib._objc_msgSend_437( _id, _lib._sel_streamTaskWithNetService_1, service?._id ?? ffi.nullptr); return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); } /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_433( + final _ret = _lib._objc_msgSend_444( _id, _lib._sel_webSocketTaskWithURL_1, url?._id ?? ffi.nullptr); return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } @@ -78734,7 +79554,7 @@ class NSURLSession extends NSObject { /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( NSURL? url, NSArray? protocols) { - final _ret = _lib._objc_msgSend_434( + final _ret = _lib._objc_msgSend_445( _id, _lib._sel_webSocketTaskWithURL_protocols_1, url?._id ?? ffi.nullptr, @@ -78746,7 +79566,7 @@ class NSURLSession extends NSObject { /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_435( + final _ret = _lib._objc_msgSend_446( _id, _lib._sel_webSocketTaskWithRequest_1, request?._id ?? ffi.nullptr); return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } @@ -78770,8 +79590,8 @@ class NSURLSession extends NSObject { /// see . The delegate, if any, will still be /// called for authentication challenges. NSURLSessionDataTask dataTaskWithRequest_completionHandler_( - NSURLRequest? request, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_436( + NSURLRequest? request, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_447( _id, _lib._sel_dataTaskWithRequest_completionHandler_1, request?._id ?? ffi.nullptr, @@ -78780,8 +79600,8 @@ class NSURLSession extends NSObject { } NSURLSessionDataTask dataTaskWithURL_completionHandler_( - NSURL? url, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_437( + NSURL? url, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_448( _id, _lib._sel_dataTaskWithURL_completionHandler_1, url?._id ?? ffi.nullptr, @@ -78791,8 +79611,8 @@ class NSURLSession extends NSObject { /// upload convenience method. NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( - NSURLRequest? request, NSURL? fileURL, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_438( + NSURLRequest? request, NSURL? fileURL, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_449( _id, _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, request?._id ?? ffi.nullptr, @@ -78802,8 +79622,8 @@ class NSURLSession extends NSObject { } NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( - NSURLRequest? request, NSData? bodyData, ObjCBlock43 completionHandler) { - final _ret = _lib._objc_msgSend_439( + NSURLRequest? request, NSData? bodyData, ObjCBlock44 completionHandler) { + final _ret = _lib._objc_msgSend_450( _id, _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, request?._id ?? ffi.nullptr, @@ -78817,8 +79637,8 @@ class NSURLSession extends NSObject { /// copied during the invocation of the completion routine. The file /// will be removed automatically. NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( - NSURLRequest? request, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_440( + NSURLRequest? request, ObjCBlock45 completionHandler) { + final _ret = _lib._objc_msgSend_451( _id, _lib._sel_downloadTaskWithRequest_completionHandler_1, request?._id ?? ffi.nullptr, @@ -78827,8 +79647,8 @@ class NSURLSession extends NSObject { } NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( - NSURL? url, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_441( + NSURL? url, ObjCBlock45 completionHandler) { + final _ret = _lib._objc_msgSend_452( _id, _lib._sel_downloadTaskWithURL_completionHandler_1, url?._id ?? ffi.nullptr, @@ -78837,8 +79657,8 @@ class NSURLSession extends NSObject { } NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( - NSData? resumeData, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_442( + NSData? resumeData, ObjCBlock45 completionHandler) { + final _ret = _lib._objc_msgSend_453( _id, _lib._sel_downloadTaskWithResumeData_completionHandler_1, resumeData?._id ?? ffi.nullptr, @@ -78893,7 +79713,7 @@ class NSURLSessionConfiguration extends NSObject { static NSURLSessionConfiguration? getDefaultSessionConfiguration( NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_396(_lib._class_NSURLSessionConfiguration1, + final _ret = _lib._objc_msgSend_409(_lib._class_NSURLSessionConfiguration1, _lib._sel_defaultSessionConfiguration1); return _ret.address == 0 ? null @@ -78902,7 +79722,7 @@ class NSURLSessionConfiguration extends NSObject { static NSURLSessionConfiguration? getEphemeralSessionConfiguration( NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_396(_lib._class_NSURLSessionConfiguration1, + final _ret = _lib._objc_msgSend_409(_lib._class_NSURLSessionConfiguration1, _lib._sel_ephemeralSessionConfiguration1); return _ret.address == 0 ? null @@ -78912,7 +79732,7 @@ class NSURLSessionConfiguration extends NSObject { static NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier_( NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_397( + final _ret = _lib._objc_msgSend_410( _lib._class_NSURLSessionConfiguration1, _lib._sel_backgroundSessionConfigurationWithIdentifier_1, identifier?._id ?? ffi.nullptr); @@ -78929,12 +79749,12 @@ class NSURLSessionConfiguration extends NSObject { /// default cache policy for requests int get requestCachePolicy { - return _lib._objc_msgSend_359(_id, _lib._sel_requestCachePolicy1); + return _lib._objc_msgSend_325(_id, _lib._sel_requestCachePolicy1); } /// default cache policy for requests set requestCachePolicy(int value) { - _lib._objc_msgSend_373(_id, _lib._sel_setRequestCachePolicy_1, value); + _lib._objc_msgSend_393(_id, _lib._sel_setRequestCachePolicy_1, value); } /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. @@ -78944,7 +79764,7 @@ class NSURLSessionConfiguration extends NSObject { /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. set timeoutIntervalForRequest(double value) { - _lib._objc_msgSend_341( + _lib._objc_msgSend_383( _id, _lib._sel_setTimeoutIntervalForRequest_1, value); } @@ -78955,18 +79775,18 @@ class NSURLSessionConfiguration extends NSObject { /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. set timeoutIntervalForResource(double value) { - _lib._objc_msgSend_341( + _lib._objc_msgSend_383( _id, _lib._sel_setTimeoutIntervalForResource_1, value); } /// type of service for requests. int get networkServiceType { - return _lib._objc_msgSend_360(_id, _lib._sel_networkServiceType1); + return _lib._objc_msgSend_326(_id, _lib._sel_networkServiceType1); } /// type of service for requests. set networkServiceType(int value) { - _lib._objc_msgSend_374(_id, _lib._sel_setNetworkServiceType_1, value); + _lib._objc_msgSend_394(_id, _lib._sel_setNetworkServiceType_1, value); } /// allow request to route over cellular. @@ -78976,7 +79796,7 @@ class NSURLSessionConfiguration extends NSObject { /// allow request to route over cellular. set allowsCellularAccess(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setAllowsCellularAccess_1, value); + _lib._objc_msgSend_361(_id, _lib._sel_setAllowsCellularAccess_1, value); } /// allow request to route over expensive networks. Defaults to YES. @@ -78986,7 +79806,7 @@ class NSURLSessionConfiguration extends NSObject { /// allow request to route over expensive networks. Defaults to YES. set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_332( + _lib._objc_msgSend_361( _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); } @@ -78998,7 +79818,7 @@ class NSURLSessionConfiguration extends NSObject { /// allow request to route over networks in constrained mode. Defaults to YES. set allowsConstrainedNetworkAccess(bool value) { - _lib._objc_msgSend_332( + _lib._objc_msgSend_361( _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); } @@ -79009,7 +79829,7 @@ class NSURLSessionConfiguration extends NSObject { /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. set requiresDNSSECValidation(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setRequiresDNSSECValidation_1, value); + _lib._objc_msgSend_361(_id, _lib._sel_setRequiresDNSSECValidation_1, value); } /// Causes tasks to wait for network connectivity to become available, rather @@ -79041,7 +79861,7 @@ class NSURLSessionConfiguration extends NSObject { /// Default value is NO. Ignored by background sessions, as background sessions /// always wait for connectivity. set waitsForConnectivity(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setWaitsForConnectivity_1, value); + _lib._objc_msgSend_361(_id, _lib._sel_setWaitsForConnectivity_1, value); } /// allows background tasks to be scheduled at the discretion of the system for optimal performance. @@ -79051,7 +79871,7 @@ class NSURLSessionConfiguration extends NSObject { /// allows background tasks to be scheduled at the discretion of the system for optimal performance. set discretionary(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setDiscretionary_1, value); + _lib._objc_msgSend_361(_id, _lib._sel_setDiscretionary_1, value); } /// The identifier of the shared data container into which files in background sessions should be downloaded. @@ -79069,7 +79889,7 @@ class NSURLSessionConfiguration extends NSObject { /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. set sharedContainerIdentifier(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setSharedContainerIdentifier_1, + _lib._objc_msgSend_360(_id, _lib._sel_setSharedContainerIdentifier_1, value?._id ?? ffi.nullptr); } @@ -79088,7 +79908,7 @@ class NSURLSessionConfiguration extends NSObject { /// /// NOTE: macOS apps based on AppKit do not support background launch. set sessionSendsLaunchEvents(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); + _lib._objc_msgSend_361(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); } /// The proxy dictionary, as described by @@ -79102,53 +79922,53 @@ class NSURLSessionConfiguration extends NSObject { /// The proxy dictionary, as described by set connectionProxyDictionary(NSDictionary? value) { - _lib._objc_msgSend_376(_id, _lib._sel_setConnectionProxyDictionary_1, + _lib._objc_msgSend_396(_id, _lib._sel_setConnectionProxyDictionary_1, value?._id ?? ffi.nullptr); } /// The minimum allowable versions of the TLS protocol, from int get TLSMinimumSupportedProtocol { - return _lib._objc_msgSend_398(_id, _lib._sel_TLSMinimumSupportedProtocol1); + return _lib._objc_msgSend_411(_id, _lib._sel_TLSMinimumSupportedProtocol1); } /// The minimum allowable versions of the TLS protocol, from set TLSMinimumSupportedProtocol(int value) { - _lib._objc_msgSend_399( + _lib._objc_msgSend_412( _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); } /// The maximum allowable versions of the TLS protocol, from int get TLSMaximumSupportedProtocol { - return _lib._objc_msgSend_398(_id, _lib._sel_TLSMaximumSupportedProtocol1); + return _lib._objc_msgSend_411(_id, _lib._sel_TLSMaximumSupportedProtocol1); } /// The maximum allowable versions of the TLS protocol, from set TLSMaximumSupportedProtocol(int value) { - _lib._objc_msgSend_399( + _lib._objc_msgSend_412( _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); } /// The minimum allowable versions of the TLS protocol, from int get TLSMinimumSupportedProtocolVersion { - return _lib._objc_msgSend_400( + return _lib._objc_msgSend_413( _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); } /// The minimum allowable versions of the TLS protocol, from set TLSMinimumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_401( + _lib._objc_msgSend_414( _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); } /// The maximum allowable versions of the TLS protocol, from int get TLSMaximumSupportedProtocolVersion { - return _lib._objc_msgSend_400( + return _lib._objc_msgSend_413( _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); } /// The maximum allowable versions of the TLS protocol, from set TLSMaximumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_401( + _lib._objc_msgSend_414( _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); } @@ -79159,7 +79979,7 @@ class NSURLSessionConfiguration extends NSObject { /// Allow the use of HTTP pipelining set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + _lib._objc_msgSend_361(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); } /// Allow the session to set cookies on requests @@ -79169,17 +79989,17 @@ class NSURLSessionConfiguration extends NSObject { /// Allow the session to set cookies on requests set HTTPShouldSetCookies(bool value) { - _lib._objc_msgSend_332(_id, _lib._sel_setHTTPShouldSetCookies_1, value); + _lib._objc_msgSend_361(_id, _lib._sel_setHTTPShouldSetCookies_1, value); } /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. int get HTTPCookieAcceptPolicy { - return _lib._objc_msgSend_385(_id, _lib._sel_HTTPCookieAcceptPolicy1); + return _lib._objc_msgSend_404(_id, _lib._sel_HTTPCookieAcceptPolicy1); } /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. set HTTPCookieAcceptPolicy(int value) { - _lib._objc_msgSend_386(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); + _lib._objc_msgSend_405(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); } /// Specifies additional headers which will be set on outgoing requests. @@ -79194,7 +80014,7 @@ class NSURLSessionConfiguration extends NSObject { /// Specifies additional headers which will be set on outgoing requests. /// Note that these headers are added to the request only if not already present. set HTTPAdditionalHeaders(NSDictionary? value) { - _lib._objc_msgSend_376( + _lib._objc_msgSend_396( _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); } @@ -79205,13 +80025,13 @@ class NSURLSessionConfiguration extends NSObject { /// The maximum number of simultaneous persistent connections per host set HTTPMaximumConnectionsPerHost(int value) { - _lib._objc_msgSend_346( + _lib._objc_msgSend_388( _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); } /// The cookie storage object to use, or nil to indicate that no cookies should be handled NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _lib._objc_msgSend_380(_id, _lib._sel_HTTPCookieStorage1); + final _ret = _lib._objc_msgSend_400(_id, _lib._sel_HTTPCookieStorage1); return _ret.address == 0 ? null : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); @@ -79219,13 +80039,13 @@ class NSURLSessionConfiguration extends NSObject { /// The cookie storage object to use, or nil to indicate that no cookies should be handled set HTTPCookieStorage(NSHTTPCookieStorage? value) { - _lib._objc_msgSend_402( + _lib._objc_msgSend_415( _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); } /// The credential storage object, or nil to indicate that no credential storage is to be used NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _lib._objc_msgSend_403(_id, _lib._sel_URLCredentialStorage1); + final _ret = _lib._objc_msgSend_416(_id, _lib._sel_URLCredentialStorage1); return _ret.address == 0 ? null : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); @@ -79233,13 +80053,13 @@ class NSURLSessionConfiguration extends NSObject { /// The credential storage object, or nil to indicate that no credential storage is to be used set URLCredentialStorage(NSURLCredentialStorage? value) { - _lib._objc_msgSend_404( + _lib._objc_msgSend_417( _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); } /// The URL resource cache, or nil to indicate that no caching is to be performed NSURLCache? get URLCache { - final _ret = _lib._objc_msgSend_405(_id, _lib._sel_URLCache1); + final _ret = _lib._objc_msgSend_320(_id, _lib._sel_URLCache1); return _ret.address == 0 ? null : NSURLCache._(_ret, _lib, retain: true, release: true); @@ -79247,7 +80067,7 @@ class NSURLSessionConfiguration extends NSObject { /// The URL resource cache, or nil to indicate that no caching is to be performed set URLCache(NSURLCache? value) { - _lib._objc_msgSend_406( + _lib._objc_msgSend_321( _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); } @@ -79261,7 +80081,7 @@ class NSURLSessionConfiguration extends NSObject { /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) set shouldUseExtendedBackgroundIdleMode(bool value) { - _lib._objc_msgSend_332( + _lib._objc_msgSend_361( _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); } @@ -79289,18 +80109,18 @@ class NSURLSessionConfiguration extends NSObject { /// Custom NSURLProtocol subclasses are not available to background /// sessions. set protocolClasses(NSArray? value) { - _lib._objc_msgSend_407( + _lib._objc_msgSend_418( _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); } /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone int get multipathServiceType { - return _lib._objc_msgSend_408(_id, _lib._sel_multipathServiceType1); + return _lib._objc_msgSend_419(_id, _lib._sel_multipathServiceType1); } /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone set multipathServiceType(int value) { - _lib._objc_msgSend_409(_id, _lib._sel_setMultipathServiceType_1, value); + _lib._objc_msgSend_420(_id, _lib._sel_setMultipathServiceType_1, value); } @override @@ -79318,7 +80138,7 @@ class NSURLSessionConfiguration extends NSObject { static NSURLSessionConfiguration backgroundSessionConfiguration_( NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_397( + final _ret = _lib._objc_msgSend_410( _lib._class_NSURLSessionConfiguration1, _lib._sel_backgroundSessionConfiguration_1, identifier?._id ?? ffi.nullptr); @@ -79359,30 +80179,6 @@ class NSURLCredentialStorage extends _ObjCWrapper { } } -class NSURLCache extends _ObjCWrapper { - NSURLCache._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLCache] that points to the same underlying object as [other]. - static NSURLCache castFrom(T other) { - return NSURLCache._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURLCache] that wraps the given raw object pointer. - static NSURLCache castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCache._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLCache]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); - } -} - /// ! /// @enum NSURLSessionMultipathServiceType /// @@ -79419,7 +80215,7 @@ abstract class NSURLSessionMultipathServiceType { static const int NSURLSessionMultipathServiceTypeAggregate = 3; } -void _ObjCBlock38_fnPtrTrampoline( +void _ObjCBlock39_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1, @@ -79438,29 +80234,29 @@ void _ObjCBlock38_fnPtrTrampoline( ffi.Pointer arg2)>()(arg0, arg1, arg2); } -final _ObjCBlock38_closureRegistry = {}; -int _ObjCBlock38_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock38_registerClosure(Function fn) { - final id = ++_ObjCBlock38_closureRegistryIndex; - _ObjCBlock38_closureRegistry[id] = fn; +final _ObjCBlock39_closureRegistry = {}; +int _ObjCBlock39_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock39_registerClosure(Function fn) { + final id = ++_ObjCBlock39_closureRegistryIndex; + _ObjCBlock39_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock38_closureTrampoline( +void _ObjCBlock39_closureTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) { - return _ObjCBlock38_closureRegistry[block.ref.target.address]!( + return _ObjCBlock39_closureRegistry[block.ref.target.address]!( arg0, arg1, arg2); } -class ObjCBlock38 extends _ObjCBlockBase { - ObjCBlock38._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock39 extends _ObjCBlockBase { + ObjCBlock39._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock38.fromFunctionPointer( + ObjCBlock39.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -79477,14 +80273,14 @@ class ObjCBlock38 extends _ObjCBlockBase { ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>( - _ObjCBlock38_fnPtrTrampoline) + _ObjCBlock39_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock38.fromFunction( + ObjCBlock39.fromFunction( NativeCupertinoHttp lib, void Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) @@ -79497,9 +80293,9 @@ class ObjCBlock38 extends _ObjCBlockBase { ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>( - _ObjCBlock38_closureTrampoline) + _ObjCBlock39_closureTrampoline) .cast(), - _ObjCBlock38_registerClosure(fn)), + _ObjCBlock39_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(ffi.Pointer arg0, ffi.Pointer arg1, @@ -79521,52 +80317,6 @@ class ObjCBlock38 extends _ObjCBlockBase { } } -/// An NSURLSessionDataTask does not provide any additional -/// functionality over an NSURLSessionTask and its presence is merely -/// to provide lexical differentiation from download and upload tasks. -class NSURLSessionDataTask extends NSURLSessionTask { - NSURLSessionDataTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. - static NSURLSessionDataTask castFrom(T other) { - return NSURLSessionDataTask._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. - static NSURLSessionDataTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDataTask._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionDataTask1); - } - - @override - NSURLSessionDataTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } - - static NSURLSessionDataTask new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); - } - - static NSURLSessionDataTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); - } -} - /// An NSURLSessionUploadTask does not currently provide any additional /// functionality over an NSURLSessionDataTask. All delegate messages /// that may be sent referencing an NSURLSessionDataTask equally apply @@ -79649,8 +80399,8 @@ class NSURLSessionDownloadTask extends NSURLSessionTask { /// with -downloadTaskWithResumeData: to attempt to resume the download. /// If resume data cannot be created, the completion handler will be /// called with nil resumeData. - void cancelByProducingResumeData_(ObjCBlock39 completionHandler) { - return _lib._objc_msgSend_419( + void cancelByProducingResumeData_(ObjCBlock40 completionHandler) { + return _lib._objc_msgSend_430( _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); } @@ -79673,7 +80423,7 @@ class NSURLSessionDownloadTask extends NSURLSessionTask { } } -void _ObjCBlock39_fnPtrTrampoline( +void _ObjCBlock40_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { return block.ref.target .cast< @@ -79681,52 +80431,52 @@ void _ObjCBlock39_fnPtrTrampoline( .asFunction arg0)>()(arg0); } -final _ObjCBlock39_closureRegistry = {}; -int _ObjCBlock39_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock39_registerClosure(Function fn) { - final id = ++_ObjCBlock39_closureRegistryIndex; - _ObjCBlock39_closureRegistry[id] = fn; +final _ObjCBlock40_closureRegistry = {}; +int _ObjCBlock40_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock40_registerClosure(Function fn) { + final id = ++_ObjCBlock40_closureRegistryIndex; + _ObjCBlock40_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock39_closureTrampoline( +void _ObjCBlock40_closureTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock39_closureRegistry[block.ref.target.address]!(arg0); + return _ObjCBlock40_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock39 extends _ObjCBlockBase { - ObjCBlock39._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock40 extends _ObjCBlockBase { + ObjCBlock40._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock39.fromFunctionPointer( + ObjCBlock40.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0)>( - _ObjCBlock39_fnPtrTrampoline) + _ObjCBlock40_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock39.fromFunction( + ObjCBlock40.fromFunction( NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0)>( - _ObjCBlock39_closureTrampoline) + _ObjCBlock40_closureTrampoline) .cast(), - _ObjCBlock39_registerClosure(fn)), + _ObjCBlock40_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(ffi.Pointer arg0) { @@ -79791,8 +80541,8 @@ class NSURLSessionStreamTask extends NSURLSessionTask { /// If an error occurs, any outstanding reads will also fail, and new /// read requests will error out immediately. void readDataOfMinLength_maxLength_timeout_completionHandler_(int minBytes, - int maxBytes, double timeout, ObjCBlock40 completionHandler) { - return _lib._objc_msgSend_423( + int maxBytes, double timeout, ObjCBlock41 completionHandler) { + return _lib._objc_msgSend_434( _id, _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, minBytes, @@ -79807,8 +80557,8 @@ class NSURLSessionStreamTask extends NSURLSessionTask { /// guarantee that the remote side has received all the bytes, only /// that they have been written to the kernel. void writeData_timeout_completionHandler_( - NSData? data, double timeout, ObjCBlock41 completionHandler) { - return _lib._objc_msgSend_424( + NSData? data, double timeout, ObjCBlock42 completionHandler) { + return _lib._objc_msgSend_435( _id, _lib._sel_writeData_timeout_completionHandler_1, data?._id ?? ffi.nullptr, @@ -79876,7 +80626,7 @@ class NSURLSessionStreamTask extends NSURLSessionTask { } } -void _ObjCBlock40_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock41_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { return block.ref.target .cast< @@ -79888,26 +80638,26 @@ void _ObjCBlock40_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg2)>()(arg0, arg1, arg2); } -final _ObjCBlock40_closureRegistry = {}; -int _ObjCBlock40_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock40_registerClosure(Function fn) { - final id = ++_ObjCBlock40_closureRegistryIndex; - _ObjCBlock40_closureRegistry[id] = fn; +final _ObjCBlock41_closureRegistry = {}; +int _ObjCBlock41_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock41_registerClosure(Function fn) { + final id = ++_ObjCBlock41_closureRegistryIndex; + _ObjCBlock41_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock40_closureTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock41_closureTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _ObjCBlock40_closureRegistry[block.ref.target.address]!( + return _ObjCBlock41_closureRegistry[block.ref.target.address]!( arg0, arg1, arg2); } -class ObjCBlock40 extends _ObjCBlockBase { - ObjCBlock40._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock41 extends _ObjCBlockBase { + ObjCBlock41._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock40.fromFunctionPointer( + ObjCBlock41.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -79922,14 +80672,14 @@ class ObjCBlock40 extends _ObjCBlockBase { ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>( - _ObjCBlock40_fnPtrTrampoline) + _ObjCBlock41_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock40.fromFunction( + ObjCBlock41.fromFunction( NativeCupertinoHttp lib, void Function(ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) @@ -79942,9 +80692,9 @@ class ObjCBlock40 extends _ObjCBlockBase { ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>( - _ObjCBlock40_closureTrampoline) + _ObjCBlock41_closureTrampoline) .cast(), - _ObjCBlock40_registerClosure(fn)), + _ObjCBlock41_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call( @@ -79966,7 +80716,7 @@ class ObjCBlock40 extends _ObjCBlockBase { } } -void _ObjCBlock41_fnPtrTrampoline( +void _ObjCBlock42_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { return block.ref.target .cast< @@ -79974,52 +80724,52 @@ void _ObjCBlock41_fnPtrTrampoline( .asFunction arg0)>()(arg0); } -final _ObjCBlock41_closureRegistry = {}; -int _ObjCBlock41_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock41_registerClosure(Function fn) { - final id = ++_ObjCBlock41_closureRegistryIndex; - _ObjCBlock41_closureRegistry[id] = fn; +final _ObjCBlock42_closureRegistry = {}; +int _ObjCBlock42_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock42_registerClosure(Function fn) { + final id = ++_ObjCBlock42_closureRegistryIndex; + _ObjCBlock42_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock41_closureTrampoline( +void _ObjCBlock42_closureTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock41_closureRegistry[block.ref.target.address]!(arg0); + return _ObjCBlock42_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock41 extends _ObjCBlockBase { - ObjCBlock41._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock42 extends _ObjCBlockBase { + ObjCBlock42._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock41.fromFunctionPointer( + ObjCBlock42.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0)>( - _ObjCBlock41_fnPtrTrampoline) + _ObjCBlock42_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock41.fromFunction( + ObjCBlock42.fromFunction( NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0)>( - _ObjCBlock41_closureTrampoline) + _ObjCBlock42_closureTrampoline) .cast(), - _ObjCBlock41_registerClosure(fn)), + _ObjCBlock42_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(ffi.Pointer arg0) { @@ -80097,8 +80847,8 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { /// guarantee that the remote side has received all the bytes, only /// that they have been written to the kernel. void sendMessage_completionHandler_( - NSURLSessionWebSocketMessage? message, ObjCBlock41 completionHandler) { - return _lib._objc_msgSend_428( + NSURLSessionWebSocketMessage? message, ObjCBlock42 completionHandler) { + return _lib._objc_msgSend_439( _id, _lib._sel_sendMessage_completionHandler_1, message?._id ?? ffi.nullptr, @@ -80108,8 +80858,8 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { /// Reads a WebSocket message once all the frames of the message are available. /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out /// and all outstanding work will also fail resulting in the end of the task. - void receiveMessageWithCompletionHandler_(ObjCBlock42 completionHandler) { - return _lib._objc_msgSend_429(_id, + void receiveMessageWithCompletionHandler_(ObjCBlock43 completionHandler) { + return _lib._objc_msgSend_440(_id, _lib._sel_receiveMessageWithCompletionHandler_1, completionHandler._id); } @@ -80117,15 +80867,15 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. - void sendPingWithPongReceiveHandler_(ObjCBlock41 pongReceiveHandler) { - return _lib._objc_msgSend_430(_id, + void sendPingWithPongReceiveHandler_(ObjCBlock42 pongReceiveHandler) { + return _lib._objc_msgSend_441(_id, _lib._sel_sendPingWithPongReceiveHandler_1, pongReceiveHandler._id); } /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { - return _lib._objc_msgSend_431(_id, _lib._sel_cancelWithCloseCode_reason_1, + return _lib._objc_msgSend_442(_id, _lib._sel_cancelWithCloseCode_reason_1, closeCode, reason?._id ?? ffi.nullptr); } @@ -80136,12 +80886,12 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached set maximumMessageSize(int value) { - _lib._objc_msgSend_346(_id, _lib._sel_setMaximumMessageSize_1, value); + _lib._objc_msgSend_388(_id, _lib._sel_setMaximumMessageSize_1, value); } /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid int get closeCode { - return _lib._objc_msgSend_432(_id, _lib._sel_closeCode1); + return _lib._objc_msgSend_443(_id, _lib._sel_closeCode1); } /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running @@ -80220,7 +80970,7 @@ class NSURLSessionWebSocketMessage extends NSObject { } int get type { - return _lib._objc_msgSend_427(_id, _lib._sel_type1); + return _lib._objc_msgSend_438(_id, _lib._sel_type1); } NSData? get data { @@ -80264,7 +81014,7 @@ abstract class NSURLSessionWebSocketMessageType { static const int NSURLSessionWebSocketMessageTypeString = 1; } -void _ObjCBlock42_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock43_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1) { return block.ref.target .cast< @@ -80276,25 +81026,25 @@ void _ObjCBlock42_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg1)>()(arg0, arg1); } -final _ObjCBlock42_closureRegistry = {}; -int _ObjCBlock42_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock42_registerClosure(Function fn) { - final id = ++_ObjCBlock42_closureRegistryIndex; - _ObjCBlock42_closureRegistry[id] = fn; +final _ObjCBlock43_closureRegistry = {}; +int _ObjCBlock43_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock43_registerClosure(Function fn) { + final id = ++_ObjCBlock43_closureRegistryIndex; + _ObjCBlock43_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock42_closureTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock43_closureTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock42_closureRegistry[block.ref.target.address]!(arg0, arg1); + return _ObjCBlock43_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock42 extends _ObjCBlockBase { - ObjCBlock42._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock43 extends _ObjCBlockBase { + ObjCBlock43._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock42.fromFunctionPointer( + ObjCBlock43.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -80308,14 +81058,14 @@ class ObjCBlock42 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1)>( - _ObjCBlock42_fnPtrTrampoline) + _ObjCBlock43_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock42.fromFunction( + ObjCBlock43.fromFunction( NativeCupertinoHttp lib, void Function(ffi.Pointer arg0, ffi.Pointer arg1) fn) @@ -80326,9 +81076,9 @@ class ObjCBlock42 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1)>( - _ObjCBlock42_closureTrampoline) + _ObjCBlock43_closureTrampoline) .cast(), - _ObjCBlock42_registerClosure(fn)), + _ObjCBlock43_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(ffi.Pointer arg0, ffi.Pointer arg1) { @@ -80365,7 +81115,7 @@ abstract class NSURLSessionWebSocketCloseCode { static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; } -void _ObjCBlock43_fnPtrTrampoline( +void _ObjCBlock44_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1, @@ -80384,29 +81134,29 @@ void _ObjCBlock43_fnPtrTrampoline( ffi.Pointer arg2)>()(arg0, arg1, arg2); } -final _ObjCBlock43_closureRegistry = {}; -int _ObjCBlock43_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock43_registerClosure(Function fn) { - final id = ++_ObjCBlock43_closureRegistryIndex; - _ObjCBlock43_closureRegistry[id] = fn; +final _ObjCBlock44_closureRegistry = {}; +int _ObjCBlock44_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock44_registerClosure(Function fn) { + final id = ++_ObjCBlock44_closureRegistryIndex; + _ObjCBlock44_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock43_closureTrampoline( +void _ObjCBlock44_closureTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) { - return _ObjCBlock43_closureRegistry[block.ref.target.address]!( + return _ObjCBlock44_closureRegistry[block.ref.target.address]!( arg0, arg1, arg2); } -class ObjCBlock43 extends _ObjCBlockBase { - ObjCBlock43._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock44 extends _ObjCBlockBase { + ObjCBlock44._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock43.fromFunctionPointer( + ObjCBlock44.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -80423,14 +81173,14 @@ class ObjCBlock43 extends _ObjCBlockBase { ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>( - _ObjCBlock43_fnPtrTrampoline) + _ObjCBlock44_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock43.fromFunction( + ObjCBlock44.fromFunction( NativeCupertinoHttp lib, void Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) @@ -80443,9 +81193,9 @@ class ObjCBlock43 extends _ObjCBlockBase { ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>( - _ObjCBlock43_closureTrampoline) + _ObjCBlock44_closureTrampoline) .cast(), - _ObjCBlock43_registerClosure(fn)), + _ObjCBlock44_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(ffi.Pointer arg0, ffi.Pointer arg1, @@ -80467,7 +81217,7 @@ class ObjCBlock43 extends _ObjCBlockBase { } } -void _ObjCBlock44_fnPtrTrampoline( +void _ObjCBlock45_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1, @@ -80486,29 +81236,29 @@ void _ObjCBlock44_fnPtrTrampoline( ffi.Pointer arg2)>()(arg0, arg1, arg2); } -final _ObjCBlock44_closureRegistry = {}; -int _ObjCBlock44_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock44_registerClosure(Function fn) { - final id = ++_ObjCBlock44_closureRegistryIndex; - _ObjCBlock44_closureRegistry[id] = fn; +final _ObjCBlock45_closureRegistry = {}; +int _ObjCBlock45_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock45_registerClosure(Function fn) { + final id = ++_ObjCBlock45_closureRegistryIndex; + _ObjCBlock45_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock44_closureTrampoline( +void _ObjCBlock45_closureTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) { - return _ObjCBlock44_closureRegistry[block.ref.target.address]!( + return _ObjCBlock45_closureRegistry[block.ref.target.address]!( arg0, arg1, arg2); } -class ObjCBlock44 extends _ObjCBlockBase { - ObjCBlock44._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock45 extends _ObjCBlockBase { + ObjCBlock45._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock44.fromFunctionPointer( + ObjCBlock45.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -80525,14 +81275,14 @@ class ObjCBlock44 extends _ObjCBlockBase { ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>( - _ObjCBlock44_fnPtrTrampoline) + _ObjCBlock45_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock44.fromFunction( + ObjCBlock45.fromFunction( NativeCupertinoHttp lib, void Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) @@ -80545,9 +81295,9 @@ class ObjCBlock44 extends _ObjCBlockBase { ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>( - _ObjCBlock44_closureTrampoline) + _ObjCBlock45_closureTrampoline) .cast(), - _ObjCBlock44_registerClosure(fn)), + _ObjCBlock45_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(ffi.Pointer arg0, ffi.Pointer arg1, @@ -80670,7 +81420,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// Represents the transaction request. NSURLRequest? get request { - final _ret = _lib._objc_msgSend_387(_id, _lib._sel_request1); + final _ret = _lib._objc_msgSend_350(_id, _lib._sel_request1); return _ret.address == 0 ? null : NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -80678,7 +81428,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// Represents the transaction response. Can be nil if error occurred and no response was generated. NSURLResponse? get response { - final _ret = _lib._objc_msgSend_389(_id, _lib._sel_response1); + final _ret = _lib._objc_msgSend_318(_id, _lib._sel_response1); return _ret.address == 0 ? null : NSURLResponse._(_ret, _lib, retain: true, release: true); @@ -80695,7 +81445,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// secureConnectionStartDate /// secureConnectionEndDate NSDate? get fetchStartDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_fetchStartDate1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_fetchStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -80703,7 +81453,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// domainLookupStartDate returns the time immediately before the user agent started the name lookup for the resource. NSDate? get domainLookupStartDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_domainLookupStartDate1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_domainLookupStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -80711,7 +81461,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// domainLookupEndDate returns the time after the name lookup was completed. NSDate? get domainLookupEndDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_domainLookupEndDate1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_domainLookupEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -80721,7 +81471,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// For example, this would correspond to the time immediately before the user agent started trying to establish the TCP connection. NSDate? get connectStartDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_connectStartDate1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_connectStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -80734,7 +81484,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// If an encrypted connection was not used, this attribute is set to nil. NSDate? get secureConnectionStartDate { final _ret = - _lib._objc_msgSend_357(_id, _lib._sel_secureConnectionStartDate1); + _lib._objc_msgSend_348(_id, _lib._sel_secureConnectionStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -80745,7 +81495,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// If an encrypted connection was not used, this attribute is set to nil. NSDate? get secureConnectionEndDate { final _ret = - _lib._objc_msgSend_357(_id, _lib._sel_secureConnectionEndDate1); + _lib._objc_msgSend_348(_id, _lib._sel_secureConnectionEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -80753,7 +81503,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// connectEndDate is the time immediately after the user agent finished establishing the connection to the server, including completion of security-related and other handshakes. NSDate? get connectEndDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_connectEndDate1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_connectEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -80763,7 +81513,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// For example, this would correspond to the time immediately before the user agent sent an HTTP GET request. NSDate? get requestStartDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_requestStartDate1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_requestStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -80773,7 +81523,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// For example, this would correspond to the time immediately after the user agent finished sending the last byte of the request. NSDate? get requestEndDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_requestEndDate1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_requestEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -80783,7 +81533,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// For example, this would correspond to the time immediately after the user agent received the first byte of an HTTP response. NSDate? get responseStartDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_responseStartDate1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_responseStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -80791,7 +81541,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// responseEndDate is the time immediately after the user agent received the last byte of the resource. NSDate? get responseEndDate { - final _ret = _lib._objc_msgSend_357(_id, _lib._sel_responseEndDate1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_responseEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -80825,43 +81575,43 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// Indicates whether the resource was loaded, pushed or retrieved from the local cache. int get resourceFetchType { - return _lib._objc_msgSend_443(_id, _lib._sel_resourceFetchType1); + return _lib._objc_msgSend_454(_id, _lib._sel_resourceFetchType1); } /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. int get countOfRequestHeaderBytesSent { - return _lib._objc_msgSend_329( + return _lib._objc_msgSend_358( _id, _lib._sel_countOfRequestHeaderBytesSent1); } /// countOfRequestBodyBytesSent is the number of bytes transferred for request body. /// It includes protocol-specific framing, transfer encoding, and content encoding. int get countOfRequestBodyBytesSent { - return _lib._objc_msgSend_329(_id, _lib._sel_countOfRequestBodyBytesSent1); + return _lib._objc_msgSend_358(_id, _lib._sel_countOfRequestBodyBytesSent1); } /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. int get countOfRequestBodyBytesBeforeEncoding { - return _lib._objc_msgSend_329( + return _lib._objc_msgSend_358( _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); } /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. int get countOfResponseHeaderBytesReceived { - return _lib._objc_msgSend_329( + return _lib._objc_msgSend_358( _id, _lib._sel_countOfResponseHeaderBytesReceived1); } /// countOfResponseBodyBytesReceived is the number of bytes transferred for response header. /// It includes protocol-specific framing, transfer encoding, and content encoding. int get countOfResponseBodyBytesReceived { - return _lib._objc_msgSend_329( + return _lib._objc_msgSend_358( _id, _lib._sel_countOfResponseBodyBytesReceived1); } /// countOfResponseBodyBytesAfterDecoding is the size of data delivered to your delegate or completion handler. int get countOfResponseBodyBytesAfterDecoding { - return _lib._objc_msgSend_329( + return _lib._objc_msgSend_358( _id, _lib._sel_countOfResponseBodyBytesAfterDecoding1); } @@ -80963,7 +81713,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// DNS protocol used for domain resolution. int get domainResolutionProtocol { - return _lib._objc_msgSend_444(_id, _lib._sel_domainResolutionProtocol1); + return _lib._objc_msgSend_455(_id, _lib._sel_domainResolutionProtocol1); } @override @@ -81025,7 +81775,7 @@ class NSURLSessionTaskMetrics extends NSObject { /// Task creation time is the time when the task was instantiated. /// Task completion time is the time when the task is about to change its internal state to completed. NSDateInterval? get taskInterval { - final _ret = _lib._objc_msgSend_445(_id, _lib._sel_taskInterval1); + final _ret = _lib._objc_msgSend_456(_id, _lib._sel_taskInterval1); return _ret.address == 0 ? null : NSDateInterval._(_ret, _lib, retain: true, release: true); @@ -81120,8 +81870,8 @@ class NSItemProvider extends NSObject { } void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( - NSString? typeIdentifier, int visibility, ObjCBlock45 loadHandler) { - return _lib._objc_msgSend_446( + NSString? typeIdentifier, int visibility, ObjCBlock46 loadHandler) { + return _lib._objc_msgSend_457( _id, _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -81134,8 +81884,8 @@ class NSItemProvider extends NSObject { NSString? typeIdentifier, int fileOptions, int visibility, - ObjCBlock47 loadHandler) { - return _lib._objc_msgSend_447( + ObjCBlock48 loadHandler) { + return _lib._objc_msgSend_458( _id, _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -81153,7 +81903,7 @@ class NSItemProvider extends NSObject { } NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { - final _ret = _lib._objc_msgSend_448( + final _ret = _lib._objc_msgSend_459( _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); return NSArray._(_ret, _lib, retain: true, release: true); } @@ -81167,7 +81917,7 @@ class NSItemProvider extends NSObject { bool hasRepresentationConformingToTypeIdentifier_fileOptions_( NSString? typeIdentifier, int fileOptions) { - return _lib._objc_msgSend_449( + return _lib._objc_msgSend_460( _id, _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, typeIdentifier?._id ?? ffi.nullptr, @@ -81175,8 +81925,8 @@ class NSItemProvider extends NSObject { } NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( - NSString? typeIdentifier, ObjCBlock46 completionHandler) { - final _ret = _lib._objc_msgSend_450( + NSString? typeIdentifier, ObjCBlock47 completionHandler) { + final _ret = _lib._objc_msgSend_461( _id, _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -81185,8 +81935,8 @@ class NSItemProvider extends NSObject { } NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( - NSString? typeIdentifier, ObjCBlock49 completionHandler) { - final _ret = _lib._objc_msgSend_451( + NSString? typeIdentifier, ObjCBlock50 completionHandler) { + final _ret = _lib._objc_msgSend_462( _id, _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -81195,8 +81945,8 @@ class NSItemProvider extends NSObject { } NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( - NSString? typeIdentifier, ObjCBlock48 completionHandler) { - final _ret = _lib._objc_msgSend_452( + NSString? typeIdentifier, ObjCBlock49 completionHandler) { + final _ret = _lib._objc_msgSend_463( _id, _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -81212,7 +81962,7 @@ class NSItemProvider extends NSObject { } set suggestedName(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); } @@ -81223,13 +81973,13 @@ class NSItemProvider extends NSObject { } void registerObject_visibility_(NSObject? object, int visibility) { - return _lib._objc_msgSend_453(_id, _lib._sel_registerObject_visibility_1, + return _lib._objc_msgSend_464(_id, _lib._sel_registerObject_visibility_1, object?._id ?? ffi.nullptr, visibility); } void registerObjectOfClass_visibility_loadHandler_( - NSObject? aClass, int visibility, ObjCBlock50 loadHandler) { - return _lib._objc_msgSend_454( + NSObject? aClass, int visibility, ObjCBlock51 loadHandler) { + return _lib._objc_msgSend_465( _id, _lib._sel_registerObjectOfClass_visibility_loadHandler_1, aClass?._id ?? ffi.nullptr, @@ -81243,8 +81993,8 @@ class NSItemProvider extends NSObject { } NSProgress loadObjectOfClass_completionHandler_( - NSObject? aClass, ObjCBlock51 completionHandler) { - final _ret = _lib._objc_msgSend_455( + NSObject? aClass, ObjCBlock52 completionHandler) { + final _ret = _lib._objc_msgSend_466( _id, _lib._sel_loadObjectOfClass_completionHandler_1, aClass?._id ?? ffi.nullptr, @@ -81254,7 +82004,7 @@ class NSItemProvider extends NSObject { NSItemProvider initWithItem_typeIdentifier_( NSObject? item, NSString? typeIdentifier) { - final _ret = _lib._objc_msgSend_456( + final _ret = _lib._objc_msgSend_467( _id, _lib._sel_initWithItem_typeIdentifier_1, item?._id ?? ffi.nullptr, @@ -81270,7 +82020,7 @@ class NSItemProvider extends NSObject { void registerItemForTypeIdentifier_loadHandler_( NSString? typeIdentifier, NSItemProviderLoadHandler loadHandler) { - return _lib._objc_msgSend_457( + return _lib._objc_msgSend_468( _id, _lib._sel_registerItemForTypeIdentifier_loadHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -81281,7 +82031,7 @@ class NSItemProvider extends NSObject { NSString? typeIdentifier, NSDictionary? options, NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_458( + return _lib._objc_msgSend_469( _id, _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, typeIdentifier?._id ?? ffi.nullptr, @@ -81290,16 +82040,16 @@ class NSItemProvider extends NSObject { } NSItemProviderLoadHandler get previewImageHandler { - return _lib._objc_msgSend_459(_id, _lib._sel_previewImageHandler1); + return _lib._objc_msgSend_470(_id, _lib._sel_previewImageHandler1); } set previewImageHandler(NSItemProviderLoadHandler value) { - _lib._objc_msgSend_460(_id, _lib._sel_setPreviewImageHandler_1, value); + _lib._objc_msgSend_471(_id, _lib._sel_setPreviewImageHandler_1, value); } void loadPreviewImageWithOptions_completionHandler_(NSDictionary? options, NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_461( + return _lib._objc_msgSend_472( _id, _lib._sel_loadPreviewImageWithOptions_completionHandler_1, options?._id ?? ffi.nullptr, @@ -81319,7 +82069,7 @@ class NSItemProvider extends NSObject { } } -ffi.Pointer _ObjCBlock45_fnPtrTrampoline( +ffi.Pointer _ObjCBlock46_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { return block.ref.target .cast< @@ -81330,25 +82080,25 @@ ffi.Pointer _ObjCBlock45_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> arg0)>()(arg0); } -final _ObjCBlock45_closureRegistry = {}; -int _ObjCBlock45_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock45_registerClosure(Function fn) { - final id = ++_ObjCBlock45_closureRegistryIndex; - _ObjCBlock45_closureRegistry[id] = fn; +final _ObjCBlock46_closureRegistry = {}; +int _ObjCBlock46_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock46_registerClosure(Function fn) { + final id = ++_ObjCBlock46_closureRegistryIndex; + _ObjCBlock46_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -ffi.Pointer _ObjCBlock45_closureTrampoline( +ffi.Pointer _ObjCBlock46_closureTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock45_closureRegistry[block.ref.target.address]!(arg0); + return _ObjCBlock46_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock45 extends _ObjCBlockBase { - ObjCBlock45._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock46 extends _ObjCBlockBase { + ObjCBlock46._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock45.fromFunctionPointer( + ObjCBlock46.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -81361,14 +82111,14 @@ class ObjCBlock45 extends _ObjCBlockBase { ffi.Pointer Function( ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock45_fnPtrTrampoline) + _ObjCBlock46_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock45.fromFunction(NativeCupertinoHttp lib, + ObjCBlock46.fromFunction(NativeCupertinoHttp lib, ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) : this._( lib._newBlock1( @@ -81376,9 +82126,9 @@ class ObjCBlock45 extends _ObjCBlockBase { ffi.Pointer Function( ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock45_closureTrampoline) + _ObjCBlock46_closureTrampoline) .cast(), - _ObjCBlock45_registerClosure(fn)), + _ObjCBlock46_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { @@ -81393,7 +82143,7 @@ class ObjCBlock45 extends _ObjCBlockBase { } } -void _ObjCBlock46_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock47_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1) { return block.ref.target .cast< @@ -81405,25 +82155,25 @@ void _ObjCBlock46_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg1)>()(arg0, arg1); } -final _ObjCBlock46_closureRegistry = {}; -int _ObjCBlock46_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock46_registerClosure(Function fn) { - final id = ++_ObjCBlock46_closureRegistryIndex; - _ObjCBlock46_closureRegistry[id] = fn; +final _ObjCBlock47_closureRegistry = {}; +int _ObjCBlock47_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock47_registerClosure(Function fn) { + final id = ++_ObjCBlock47_closureRegistryIndex; + _ObjCBlock47_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock46_closureTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock47_closureTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock46_closureRegistry[block.ref.target.address]!(arg0, arg1); + return _ObjCBlock47_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock46 extends _ObjCBlockBase { - ObjCBlock46._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock47 extends _ObjCBlockBase { + ObjCBlock47._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock46.fromFunctionPointer( + ObjCBlock47.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -81437,14 +82187,14 @@ class ObjCBlock46 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1)>( - _ObjCBlock46_fnPtrTrampoline) + _ObjCBlock47_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock46.fromFunction( + ObjCBlock47.fromFunction( NativeCupertinoHttp lib, void Function(ffi.Pointer arg0, ffi.Pointer arg1) fn) @@ -81455,9 +82205,9 @@ class ObjCBlock46 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1)>( - _ObjCBlock46_closureTrampoline) + _ObjCBlock47_closureTrampoline) .cast(), - _ObjCBlock46_registerClosure(fn)), + _ObjCBlock47_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(ffi.Pointer arg0, ffi.Pointer arg1) { @@ -81476,7 +82226,7 @@ class ObjCBlock46 extends _ObjCBlockBase { } } -ffi.Pointer _ObjCBlock47_fnPtrTrampoline( +ffi.Pointer _ObjCBlock48_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { return block.ref.target .cast< @@ -81487,25 +82237,25 @@ ffi.Pointer _ObjCBlock47_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> arg0)>()(arg0); } -final _ObjCBlock47_closureRegistry = {}; -int _ObjCBlock47_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock47_registerClosure(Function fn) { - final id = ++_ObjCBlock47_closureRegistryIndex; - _ObjCBlock47_closureRegistry[id] = fn; +final _ObjCBlock48_closureRegistry = {}; +int _ObjCBlock48_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock48_registerClosure(Function fn) { + final id = ++_ObjCBlock48_closureRegistryIndex; + _ObjCBlock48_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -ffi.Pointer _ObjCBlock47_closureTrampoline( +ffi.Pointer _ObjCBlock48_closureTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock47_closureRegistry[block.ref.target.address]!(arg0); + return _ObjCBlock48_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock47 extends _ObjCBlockBase { - ObjCBlock47._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock48 extends _ObjCBlockBase { + ObjCBlock48._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock47.fromFunctionPointer( + ObjCBlock48.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -81518,14 +82268,14 @@ class ObjCBlock47 extends _ObjCBlockBase { ffi.Pointer Function( ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock47_fnPtrTrampoline) + _ObjCBlock48_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock47.fromFunction(NativeCupertinoHttp lib, + ObjCBlock48.fromFunction(NativeCupertinoHttp lib, ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) : this._( lib._newBlock1( @@ -81533,9 +82283,9 @@ class ObjCBlock47 extends _ObjCBlockBase { ffi.Pointer Function( ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock47_closureTrampoline) + _ObjCBlock48_closureTrampoline) .cast(), - _ObjCBlock47_registerClosure(fn)), + _ObjCBlock48_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { @@ -81550,7 +82300,7 @@ class ObjCBlock47 extends _ObjCBlockBase { } } -void _ObjCBlock48_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock49_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { return block.ref.target .cast< @@ -81562,26 +82312,26 @@ void _ObjCBlock48_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg2)>()(arg0, arg1, arg2); } -final _ObjCBlock48_closureRegistry = {}; -int _ObjCBlock48_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock48_registerClosure(Function fn) { - final id = ++_ObjCBlock48_closureRegistryIndex; - _ObjCBlock48_closureRegistry[id] = fn; +final _ObjCBlock49_closureRegistry = {}; +int _ObjCBlock49_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock49_registerClosure(Function fn) { + final id = ++_ObjCBlock49_closureRegistryIndex; + _ObjCBlock49_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock48_closureTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock49_closureTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _ObjCBlock48_closureRegistry[block.ref.target.address]!( + return _ObjCBlock49_closureRegistry[block.ref.target.address]!( arg0, arg1, arg2); } -class ObjCBlock48 extends _ObjCBlockBase { - ObjCBlock48._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock49 extends _ObjCBlockBase { + ObjCBlock49._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock48.fromFunctionPointer( + ObjCBlock49.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -81596,14 +82346,14 @@ class ObjCBlock48 extends _ObjCBlockBase { ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>( - _ObjCBlock48_fnPtrTrampoline) + _ObjCBlock49_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock48.fromFunction( + ObjCBlock49.fromFunction( NativeCupertinoHttp lib, void Function(ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) @@ -81616,9 +82366,9 @@ class ObjCBlock48 extends _ObjCBlockBase { ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>( - _ObjCBlock48_closureTrampoline) + _ObjCBlock49_closureTrampoline) .cast(), - _ObjCBlock48_registerClosure(fn)), + _ObjCBlock49_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call( @@ -81640,7 +82390,7 @@ class ObjCBlock48 extends _ObjCBlockBase { } } -void _ObjCBlock49_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock50_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1) { return block.ref.target .cast< @@ -81652,25 +82402,25 @@ void _ObjCBlock49_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg1)>()(arg0, arg1); } -final _ObjCBlock49_closureRegistry = {}; -int _ObjCBlock49_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock49_registerClosure(Function fn) { - final id = ++_ObjCBlock49_closureRegistryIndex; - _ObjCBlock49_closureRegistry[id] = fn; +final _ObjCBlock50_closureRegistry = {}; +int _ObjCBlock50_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock50_registerClosure(Function fn) { + final id = ++_ObjCBlock50_closureRegistryIndex; + _ObjCBlock50_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock49_closureTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock50_closureTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock49_closureRegistry[block.ref.target.address]!(arg0, arg1); + return _ObjCBlock50_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock49 extends _ObjCBlockBase { - ObjCBlock49._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock50 extends _ObjCBlockBase { + ObjCBlock50._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock49.fromFunctionPointer( + ObjCBlock50.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -81684,14 +82434,14 @@ class ObjCBlock49 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1)>( - _ObjCBlock49_fnPtrTrampoline) + _ObjCBlock50_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock49.fromFunction( + ObjCBlock50.fromFunction( NativeCupertinoHttp lib, void Function(ffi.Pointer arg0, ffi.Pointer arg1) fn) @@ -81702,9 +82452,9 @@ class ObjCBlock49 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1)>( - _ObjCBlock49_closureTrampoline) + _ObjCBlock50_closureTrampoline) .cast(), - _ObjCBlock49_registerClosure(fn)), + _ObjCBlock50_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(ffi.Pointer arg0, ffi.Pointer arg1) { @@ -81723,7 +82473,7 @@ class ObjCBlock49 extends _ObjCBlockBase { } } -ffi.Pointer _ObjCBlock50_fnPtrTrampoline( +ffi.Pointer _ObjCBlock51_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { return block.ref.target .cast< @@ -81734,25 +82484,25 @@ ffi.Pointer _ObjCBlock50_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> arg0)>()(arg0); } -final _ObjCBlock50_closureRegistry = {}; -int _ObjCBlock50_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock50_registerClosure(Function fn) { - final id = ++_ObjCBlock50_closureRegistryIndex; - _ObjCBlock50_closureRegistry[id] = fn; +final _ObjCBlock51_closureRegistry = {}; +int _ObjCBlock51_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock51_registerClosure(Function fn) { + final id = ++_ObjCBlock51_closureRegistryIndex; + _ObjCBlock51_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -ffi.Pointer _ObjCBlock50_closureTrampoline( +ffi.Pointer _ObjCBlock51_closureTrampoline( ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock50_closureRegistry[block.ref.target.address]!(arg0); + return _ObjCBlock51_closureRegistry[block.ref.target.address]!(arg0); } -class ObjCBlock50 extends _ObjCBlockBase { - ObjCBlock50._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock51 extends _ObjCBlockBase { + ObjCBlock51._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock50.fromFunctionPointer( + ObjCBlock51.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -81765,14 +82515,14 @@ class ObjCBlock50 extends _ObjCBlockBase { ffi.Pointer Function( ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock50_fnPtrTrampoline) + _ObjCBlock51_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock50.fromFunction(NativeCupertinoHttp lib, + ObjCBlock51.fromFunction(NativeCupertinoHttp lib, ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) : this._( lib._newBlock1( @@ -81780,9 +82530,9 @@ class ObjCBlock50 extends _ObjCBlockBase { ffi.Pointer Function( ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock50_closureTrampoline) + _ObjCBlock51_closureTrampoline) .cast(), - _ObjCBlock50_registerClosure(fn)), + _ObjCBlock51_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { @@ -81797,7 +82547,7 @@ class ObjCBlock50 extends _ObjCBlockBase { } } -void _ObjCBlock51_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock52_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1) { return block.ref.target .cast< @@ -81809,25 +82559,25 @@ void _ObjCBlock51_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg1)>()(arg0, arg1); } -final _ObjCBlock51_closureRegistry = {}; -int _ObjCBlock51_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock51_registerClosure(Function fn) { - final id = ++_ObjCBlock51_closureRegistryIndex; - _ObjCBlock51_closureRegistry[id] = fn; +final _ObjCBlock52_closureRegistry = {}; +int _ObjCBlock52_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock52_registerClosure(Function fn) { + final id = ++_ObjCBlock52_closureRegistryIndex; + _ObjCBlock52_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock51_closureTrampoline(ffi.Pointer<_ObjCBlock> block, +void _ObjCBlock52_closureTrampoline(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock51_closureRegistry[block.ref.target.address]!(arg0, arg1); + return _ObjCBlock52_closureRegistry[block.ref.target.address]!(arg0, arg1); } -class ObjCBlock51 extends _ObjCBlockBase { - ObjCBlock51._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock52 extends _ObjCBlockBase { + ObjCBlock52._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock51.fromFunctionPointer( + ObjCBlock52.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -81841,14 +82591,14 @@ class ObjCBlock51 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1)>( - _ObjCBlock51_fnPtrTrampoline) + _ObjCBlock52_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock51.fromFunction( + ObjCBlock52.fromFunction( NativeCupertinoHttp lib, void Function(ffi.Pointer arg0, ffi.Pointer arg1) fn) @@ -81859,9 +82609,9 @@ class ObjCBlock51 extends _ObjCBlockBase { ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1)>( - _ObjCBlock51_closureTrampoline) + _ObjCBlock52_closureTrampoline) .cast(), - _ObjCBlock51_registerClosure(fn)), + _ObjCBlock52_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(ffi.Pointer arg0, ffi.Pointer arg1) { @@ -81881,7 +82631,7 @@ class ObjCBlock51 extends _ObjCBlockBase { } typedef NSItemProviderLoadHandler = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock52_fnPtrTrampoline( +void _ObjCBlock53_fnPtrTrampoline( ffi.Pointer<_ObjCBlock> block, NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, @@ -81900,29 +82650,29 @@ void _ObjCBlock52_fnPtrTrampoline( ffi.Pointer arg2)>()(arg0, arg1, arg2); } -final _ObjCBlock52_closureRegistry = {}; -int _ObjCBlock52_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock52_registerClosure(Function fn) { - final id = ++_ObjCBlock52_closureRegistryIndex; - _ObjCBlock52_closureRegistry[id] = fn; +final _ObjCBlock53_closureRegistry = {}; +int _ObjCBlock53_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock53_registerClosure(Function fn) { + final id = ++_ObjCBlock53_closureRegistryIndex; + _ObjCBlock53_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock52_closureTrampoline( +void _ObjCBlock53_closureTrampoline( ffi.Pointer<_ObjCBlock> block, NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, ffi.Pointer arg2) { - return _ObjCBlock52_closureRegistry[block.ref.target.address]!( + return _ObjCBlock53_closureRegistry[block.ref.target.address]!( arg0, arg1, arg2); } -class ObjCBlock52 extends _ObjCBlockBase { - ObjCBlock52._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) +class ObjCBlock53 extends _ObjCBlockBase { + ObjCBlock53._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) : super._(id, lib, retain: false, release: true); /// Creates a block from a C function pointer. - ObjCBlock52.fromFunctionPointer( + ObjCBlock53.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -81939,14 +82689,14 @@ class ObjCBlock52 extends _ObjCBlockBase { NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, ffi.Pointer arg2)>( - _ObjCBlock52_fnPtrTrampoline) + _ObjCBlock53_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock52.fromFunction( + ObjCBlock53.fromFunction( NativeCupertinoHttp lib, void Function(NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, ffi.Pointer arg2) @@ -81959,9 +82709,9 @@ class ObjCBlock52 extends _ObjCBlockBase { NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, ffi.Pointer arg2)>( - _ObjCBlock52_closureTrampoline) + _ObjCBlock53_closureTrampoline) .cast(), - _ObjCBlock52_registerClosure(fn)), + _ObjCBlock53_registerClosure(fn)), lib); static ffi.Pointer? _dartFuncTrampoline; void call(NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, @@ -82019,7 +82769,7 @@ class NSMutableString extends NSString { } void replaceCharactersInRange_withString_(NSRange range, NSString? aString) { - return _lib._objc_msgSend_462( + return _lib._objc_msgSend_473( _id, _lib._sel_replaceCharactersInRange_withString_1, range, @@ -82027,7 +82777,7 @@ class NSMutableString extends NSString { } void insertString_atIndex_(NSString? aString, int loc) { - return _lib._objc_msgSend_463(_id, _lib._sel_insertString_atIndex_1, + return _lib._objc_msgSend_474(_id, _lib._sel_insertString_atIndex_1, aString?._id ?? ffi.nullptr, loc); } @@ -82053,7 +82803,7 @@ class NSMutableString extends NSString { int replaceOccurrencesOfString_withString_options_range_(NSString? target, NSString? replacement, int options, NSRange searchRange) { - return _lib._objc_msgSend_464( + return _lib._objc_msgSend_475( _id, _lib._sel_replaceOccurrencesOfString_withString_options_range_1, target?._id ?? ffi.nullptr, @@ -82064,7 +82814,7 @@ class NSMutableString extends NSString { bool applyTransform_reverse_range_updatedRange_(NSStringTransform transform, bool reverse, NSRange range, NSRangePointer resultingRange) { - return _lib._objc_msgSend_465( + return _lib._objc_msgSend_476( _id, _lib._sel_applyTransform_reverse_range_updatedRange_1, transform, @@ -82075,13 +82825,13 @@ class NSMutableString extends NSString { NSMutableString initWithCapacity_(int capacity) { final _ret = - _lib._objc_msgSend_466(_id, _lib._sel_initWithCapacity_1, capacity); + _lib._objc_msgSend_477(_id, _lib._sel_initWithCapacity_1, capacity); return NSMutableString._(_ret, _lib, retain: true, release: true); } static NSMutableString stringWithCapacity_( NativeCupertinoHttp _lib, int capacity) { - final _ret = _lib._objc_msgSend_466( + final _ret = _lib._objc_msgSend_477( _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); return NSMutableString._(_ret, _lib, retain: true, release: true); } @@ -82807,12 +83557,12 @@ class NSMutableCharacterSet extends NSCharacterSet { } void formUnionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_467(_id, _lib._sel_formUnionWithCharacterSet_1, + return _lib._objc_msgSend_478(_id, _lib._sel_formUnionWithCharacterSet_1, otherSet?._id ?? ffi.nullptr); } void formIntersectionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_467( + return _lib._objc_msgSend_478( _id, _lib._sel_formIntersectionWithCharacterSet_1, otherSet?._id ?? ffi.nullptr); @@ -82948,14 +83698,14 @@ class NSMutableCharacterSet extends NSCharacterSet { static NSMutableCharacterSet characterSetWithRange_( NativeCupertinoHttp _lib, NSRange aRange) { - final _ret = _lib._objc_msgSend_468(_lib._class_NSMutableCharacterSet1, + final _ret = _lib._objc_msgSend_479(_lib._class_NSMutableCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); } static NSMutableCharacterSet characterSetWithCharactersInString_( NativeCupertinoHttp _lib, NSString? aString) { - final _ret = _lib._objc_msgSend_469( + final _ret = _lib._objc_msgSend_480( _lib._class_NSMutableCharacterSet1, _lib._sel_characterSetWithCharactersInString_1, aString?._id ?? ffi.nullptr); @@ -82964,7 +83714,7 @@ class NSMutableCharacterSet extends NSCharacterSet { static NSMutableCharacterSet characterSetWithBitmapRepresentation_( NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_470( + final _ret = _lib._objc_msgSend_481( _lib._class_NSMutableCharacterSet1, _lib._sel_characterSetWithBitmapRepresentation_1, data?._id ?? ffi.nullptr); @@ -82973,7 +83723,7 @@ class NSMutableCharacterSet extends NSCharacterSet { static NSMutableCharacterSet characterSetWithContentsOfFile_( NativeCupertinoHttp _lib, NSString? fName) { - final _ret = _lib._objc_msgSend_469(_lib._class_NSMutableCharacterSet1, + final _ret = _lib._objc_msgSend_480(_lib._class_NSMutableCharacterSet1, _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); } @@ -83083,14 +83833,14 @@ class NSURLQueryItem extends NSObject { } NSURLQueryItem initWithName_value_(NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_471(_id, _lib._sel_initWithName_value_1, + final _ret = _lib._objc_msgSend_482(_id, _lib._sel_initWithName_value_1, name?._id ?? ffi.nullptr, value?._id ?? ffi.nullptr); return NSURLQueryItem._(_ret, _lib, retain: true, release: true); } static NSURLQueryItem queryItemWithName_value_( NativeCupertinoHttp _lib, NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_471( + final _ret = _lib._objc_msgSend_482( _lib._class_NSURLQueryItem1, _lib._sel_queryItemWithName_value_1, name?._id ?? ffi.nullptr, @@ -83203,7 +83953,7 @@ class NSURLComponents extends NSObject { /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. NSURL URLRelativeToURL_(NSURL? baseURL) { - final _ret = _lib._objc_msgSend_472( + final _ret = _lib._objc_msgSend_483( _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); return NSURL._(_ret, _lib, retain: true, release: true); } @@ -83226,7 +83976,7 @@ class NSURLComponents extends NSObject { /// Attempting to set the scheme with an invalid scheme string will cause an exception. set scheme(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); } @@ -83238,7 +83988,7 @@ class NSURLComponents extends NSObject { } set user(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); + _lib._objc_msgSend_360(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); } NSString? get password { @@ -83249,7 +83999,7 @@ class NSURLComponents extends NSObject { } set password(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); } @@ -83261,7 +84011,7 @@ class NSURLComponents extends NSObject { } set host(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); + _lib._objc_msgSend_360(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); } /// Attempting to set a negative port number will cause an exception. @@ -83274,7 +84024,7 @@ class NSURLComponents extends NSObject { /// Attempting to set a negative port number will cause an exception. set port(NSNumber? value) { - _lib._objc_msgSend_335(_id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); + _lib._objc_msgSend_364(_id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); } NSString? get path { @@ -83285,7 +84035,7 @@ class NSURLComponents extends NSObject { } set path(NSString? value) { - _lib._objc_msgSend_331(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); + _lib._objc_msgSend_360(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); } NSString? get query { @@ -83296,7 +84046,7 @@ class NSURLComponents extends NSObject { } set query(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); } @@ -83308,7 +84058,7 @@ class NSURLComponents extends NSObject { } set fragment(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); } @@ -83322,7 +84072,7 @@ class NSURLComponents extends NSObject { /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). set percentEncodedUser(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); } @@ -83334,7 +84084,7 @@ class NSURLComponents extends NSObject { } set percentEncodedPassword(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); } @@ -83346,7 +84096,7 @@ class NSURLComponents extends NSObject { } set percentEncodedHost(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); } @@ -83358,7 +84108,7 @@ class NSURLComponents extends NSObject { } set percentEncodedPath(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); } @@ -83370,7 +84120,7 @@ class NSURLComponents extends NSObject { } set percentEncodedQuery(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); } @@ -83382,7 +84132,7 @@ class NSURLComponents extends NSObject { } set percentEncodedFragment(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); } @@ -83394,7 +84144,7 @@ class NSURLComponents extends NSObject { } set encodedHost(NSString? value) { - _lib._objc_msgSend_331( + _lib._objc_msgSend_360( _id, _lib._sel_setEncodedHost_1, value?._id ?? ffi.nullptr); } @@ -83461,7 +84211,7 @@ class NSURLComponents extends NSObject { /// /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. set queryItems(NSArray? value) { - _lib._objc_msgSend_407( + _lib._objc_msgSend_418( _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); } @@ -83480,7 +84230,7 @@ class NSURLComponents extends NSObject { /// /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. set percentEncodedQueryItems(NSArray? value) { - _lib._objc_msgSend_407(_id, _lib._sel_setPercentEncodedQueryItems_1, + _lib._objc_msgSend_418(_id, _lib._sel_setPercentEncodedQueryItems_1, value?._id ?? ffi.nullptr); } @@ -83582,7 +84332,7 @@ class NSHTTPURLResponse extends NSURLResponse { /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. NSHTTPURLResponse initWithURL_statusCode_HTTPVersion_headerFields_(NSURL? url, int statusCode, NSString? HTTPVersion, NSDictionary? headerFields) { - final _ret = _lib._objc_msgSend_473( + final _ret = _lib._objc_msgSend_484( _id, _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, url?._id ?? ffi.nullptr, @@ -83638,7 +84388,7 @@ class NSHTTPURLResponse extends NSURLResponse { /// @result A localized string corresponding to the given status code. static NSString localizedStringForStatusCode_( NativeCupertinoHttp _lib, int statusCode) { - final _ret = _lib._objc_msgSend_474(_lib._class_NSHTTPURLResponse1, + final _ret = _lib._objc_msgSend_485(_lib._class_NSHTTPURLResponse1, _lib._sel_localizedStringForStatusCode_1, statusCode); return NSString._(_ret, _lib, retain: true, release: true); } @@ -83684,7 +84434,7 @@ class NSException extends NSObject { NSExceptionName name, NSString? reason, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_475( + final _ret = _lib._objc_msgSend_486( _lib._class_NSException1, _lib._sel_exceptionWithName_reason_userInfo_1, name, @@ -83695,7 +84445,7 @@ class NSException extends NSObject { NSException initWithName_reason_userInfo_( NSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_476( + final _ret = _lib._objc_msgSend_487( _id, _lib._sel_initWithName_reason_userInfo_1, aName, @@ -83743,13 +84493,13 @@ class NSException extends NSObject { static void raise_format_( NativeCupertinoHttp _lib, NSExceptionName name, NSString? format) { - return _lib._objc_msgSend_377(_lib._class_NSException1, + return _lib._objc_msgSend_397(_lib._class_NSException1, _lib._sel_raise_format_1, name, format?._id ?? ffi.nullptr); } static void raise_format_arguments_(NativeCupertinoHttp _lib, NSExceptionName name, NSString? format, va_list argList) { - return _lib._objc_msgSend_477( + return _lib._objc_msgSend_488( _lib._class_NSException1, _lib._sel_raise_format_arguments_1, name, @@ -83797,7 +84547,7 @@ class NSAssertionHandler extends NSObject { } static NSAssertionHandler? getCurrentHandler(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_478( + final _ret = _lib._objc_msgSend_489( _lib._class_NSAssertionHandler1, _lib._sel_currentHandler1); return _ret.address == 0 ? null @@ -83810,7 +84560,7 @@ class NSAssertionHandler extends NSObject { NSString? fileName, int line, NSString? format) { - return _lib._objc_msgSend_479( + return _lib._objc_msgSend_490( _id, _lib._sel_handleFailureInMethod_object_file_lineNumber_description_1, selector, @@ -83822,7 +84572,7 @@ class NSAssertionHandler extends NSObject { void handleFailureInFunction_file_lineNumber_description_( NSString? functionName, NSString? fileName, int line, NSString? format) { - return _lib._objc_msgSend_480( + return _lib._objc_msgSend_491( _id, _lib._sel_handleFailureInFunction_file_lineNumber_description_1, functionName?._id ?? ffi.nullptr, @@ -83870,13 +84620,13 @@ class NSBlockOperation extends NSOperation { static NSBlockOperation blockOperationWithBlock_( NativeCupertinoHttp _lib, ObjCBlock block) { - final _ret = _lib._objc_msgSend_481(_lib._class_NSBlockOperation1, + final _ret = _lib._objc_msgSend_492(_lib._class_NSBlockOperation1, _lib._sel_blockOperationWithBlock_1, block._id); return NSBlockOperation._(_ret, _lib, retain: true, release: true); } void addExecutionBlock_(ObjCBlock block) { - return _lib._objc_msgSend_345( + return _lib._objc_msgSend_387( _id, _lib._sel_addExecutionBlock_1, block._id); } @@ -83927,19 +84677,19 @@ class NSInvocationOperation extends NSOperation { NSInvocationOperation initWithTarget_selector_object_( NSObject target, ffi.Pointer sel, NSObject arg) { - final _ret = _lib._objc_msgSend_482(_id, + final _ret = _lib._objc_msgSend_493(_id, _lib._sel_initWithTarget_selector_object_1, target._id, sel, arg._id); return NSInvocationOperation._(_ret, _lib, retain: true, release: true); } NSInvocationOperation initWithInvocation_(NSInvocation? inv) { - final _ret = _lib._objc_msgSend_483( + final _ret = _lib._objc_msgSend_494( _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); return NSInvocationOperation._(_ret, _lib, retain: true, release: true); } NSInvocation? get invocation { - final _ret = _lib._objc_msgSend_484(_id, _lib._sel_invocation1); + final _ret = _lib._objc_msgSend_495(_id, _lib._sel_invocation1); return _ret.address == 0 ? null : NSInvocation._(_ret, _lib, retain: true, release: true); @@ -84443,8 +85193,8 @@ typedef Dart_NativeFunction = ffi.Pointer< /// /// See Dart_SetNativeResolver. typedef Dart_NativeEntrySymbol = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(Dart_NativeFunction nf)>>; + ffi + .NativeFunction Function(Dart_NativeFunction nf)>>; /// FFI Native C function pointer resolver callback. /// @@ -84856,12 +85606,12 @@ class CUPHTTPTaskConfiguration extends NSObject { NSObject initWithPort_(int sendPort) { final _ret = - _lib._objc_msgSend_485(_id, _lib._sel_initWithPort_1, sendPort); + _lib._objc_msgSend_496(_id, _lib._sel_initWithPort_1, sendPort); return NSObject._(_ret, _lib, retain: true, release: true); } int get sendPort { - return _lib._objc_msgSend_329(_id, _lib._sel_sendPort1); + return _lib._objc_msgSend_358(_id, _lib._sel_sendPort1); } static CUPHTTPTaskConfiguration new1(NativeCupertinoHttp _lib) { @@ -84923,7 +85673,7 @@ class CUPHTTPClientDelegate extends NSObject { /// specified in the configuration. void registerTask_withConfiguration_( NSURLSessionTask? task, CUPHTTPTaskConfiguration? config) { - return _lib._objc_msgSend_486( + return _lib._objc_msgSend_497( _id, _lib._sel_registerTask_withConfiguration_1, task?._id ?? ffi.nullptr, @@ -84982,7 +85732,7 @@ class CUPHTTPForwardedDelegate extends NSObject { NSObject initWithSession_task_( NSURLSession? session, NSURLSessionTask? task) { - final _ret = _lib._objc_msgSend_487(_id, _lib._sel_initWithSession_task_1, + final _ret = _lib._objc_msgSend_498(_id, _lib._sel_initWithSession_task_1, session?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); return NSObject._(_ret, _lib, retain: true, release: true); } @@ -84993,14 +85743,14 @@ class CUPHTTPForwardedDelegate extends NSObject { } NSURLSession? get session { - final _ret = _lib._objc_msgSend_395(_id, _lib._sel_session1); + final _ret = _lib._objc_msgSend_408(_id, _lib._sel_session1); return _ret.address == 0 ? null : NSURLSession._(_ret, _lib, retain: true, release: true); } NSURLSessionTask? get task { - final _ret = _lib._objc_msgSend_488(_id, _lib._sel_task1); + final _ret = _lib._objc_msgSend_499(_id, _lib._sel_task1); return _ret.address == 0 ? null : NSURLSessionTask._(_ret, _lib, retain: true, release: true); @@ -85008,7 +85758,7 @@ class CUPHTTPForwardedDelegate extends NSObject { /// This property is meant to be used only by CUPHTTPClientDelegate. NSLock? get lock { - final _ret = _lib._objc_msgSend_489(_id, _lib._sel_lock1); + final _ret = _lib._objc_msgSend_500(_id, _lib._sel_lock1); return _ret.address == 0 ? null : NSLock._(_ret, _lib, retain: true, release: true); @@ -85082,7 +85832,7 @@ class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { NSURLSessionTask? task, NSHTTPURLResponse? response, NSURLRequest? request) { - final _ret = _lib._objc_msgSend_490( + final _ret = _lib._objc_msgSend_501( _id, _lib._sel_initWithSession_task_response_request_1, session?._id ?? ffi.nullptr, @@ -85096,19 +85846,19 @@ class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { /// If the request is NIL then the redirect is not followed and the task is /// complete. void finishWithRequest_(NSURLRequest? request) { - return _lib._objc_msgSend_491( + return _lib._objc_msgSend_341( _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); } NSHTTPURLResponse? get response { - final _ret = _lib._objc_msgSend_492(_id, _lib._sel_response1); + final _ret = _lib._objc_msgSend_502(_id, _lib._sel_response1); return _ret.address == 0 ? null : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); } NSURLRequest? get request { - final _ret = _lib._objc_msgSend_387(_id, _lib._sel_request1); + final _ret = _lib._objc_msgSend_350(_id, _lib._sel_request1); return _ret.address == 0 ? null : NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -85116,7 +85866,7 @@ class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { /// This property is meant to be used only by CUPHTTPClientDelegate. NSURLRequest? get redirectRequest { - final _ret = _lib._objc_msgSend_387(_id, _lib._sel_redirectRequest1); + final _ret = _lib._objc_msgSend_350(_id, _lib._sel_redirectRequest1); return _ret.address == 0 ? null : NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -85163,7 +85913,7 @@ class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { NSObject initWithSession_task_response_( NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { - final _ret = _lib._objc_msgSend_493( + final _ret = _lib._objc_msgSend_503( _id, _lib._sel_initWithSession_task_response_1, session?._id ?? ffi.nullptr, @@ -85173,12 +85923,12 @@ class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { } void finishWithDisposition_(int disposition) { - return _lib._objc_msgSend_494( + return _lib._objc_msgSend_504( _id, _lib._sel_finishWithDisposition_1, disposition); } NSURLResponse? get response { - final _ret = _lib._objc_msgSend_389(_id, _lib._sel_response1); + final _ret = _lib._objc_msgSend_318(_id, _lib._sel_response1); return _ret.address == 0 ? null : NSURLResponse._(_ret, _lib, retain: true, release: true); @@ -85186,7 +85936,7 @@ class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { /// This property is meant to be used only by CUPHTTPClientDelegate. int get disposition { - return _lib._objc_msgSend_495(_id, _lib._sel_disposition1); + return _lib._objc_msgSend_505(_id, _lib._sel_disposition1); } static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { @@ -85228,7 +85978,7 @@ class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { NSObject initWithSession_task_data_( NSURLSession? session, NSURLSessionTask? task, NSData? data) { - final _ret = _lib._objc_msgSend_496( + final _ret = _lib._objc_msgSend_506( _id, _lib._sel_initWithSession_task_data_1, session?._id ?? ffi.nullptr, @@ -85285,7 +86035,7 @@ class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { NSObject initWithSession_task_error_( NSURLSession? session, NSURLSessionTask? task, NSError? error) { - final _ret = _lib._objc_msgSend_497( + final _ret = _lib._objc_msgSend_507( _id, _lib._sel_initWithSession_task_error_1, session?._id ?? ffi.nullptr, @@ -85295,7 +86045,7 @@ class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { } NSError? get error { - final _ret = _lib._objc_msgSend_365(_id, _lib._sel_error1); + final _ret = _lib._objc_msgSend_331(_id, _lib._sel_error1); return _ret.address == 0 ? null : NSError._(_ret, _lib, retain: true, release: true); @@ -85343,7 +86093,7 @@ class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { NSObject initWithSession_downloadTask_url_(NSURLSession? session, NSURLSessionDownloadTask? downloadTask, NSURL? location) { - final _ret = _lib._objc_msgSend_498( + final _ret = _lib._objc_msgSend_508( _id, _lib._sel_initWithSession_downloadTask_url_1, session?._id ?? ffi.nullptr, @@ -85405,7 +86155,7 @@ class CUPHTTPForwardedWebSocketOpened extends CUPHTTPForwardedDelegate { NSURLSession? session, NSURLSessionWebSocketTask? webSocketTask, NSString? protocol) { - final _ret = _lib._objc_msgSend_499( + final _ret = _lib._objc_msgSend_509( _id, _lib._sel_initWithSession_webSocketTask_didOpenWithProtocol_1, session?._id ?? ffi.nullptr, @@ -85465,7 +86215,7 @@ class CUPHTTPForwardedWebSocketClosed extends CUPHTTPForwardedDelegate { NSObject initWithSession_webSocketTask_code_reason_(NSURLSession? session, NSURLSessionWebSocketTask? webSocketTask, int closeCode, NSData? reason) { - final _ret = _lib._objc_msgSend_500( + final _ret = _lib._objc_msgSend_510( _id, _lib._sel_initWithSession_webSocketTask_code_reason_1, session?._id ?? ffi.nullptr, @@ -85476,7 +86226,7 @@ class CUPHTTPForwardedWebSocketClosed extends CUPHTTPForwardedDelegate { } int get closeCode { - return _lib._objc_msgSend_432(_id, _lib._sel_closeCode1); + return _lib._objc_msgSend_443(_id, _lib._sel_closeCode1); } NSData? get reason { @@ -85546,13 +86296,13 @@ class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { CUPHTTPStreamToNSInputStreamAdapter initWithPort_(int sendPort) { final _ret = - _lib._objc_msgSend_485(_id, _lib._sel_initWithPort_1, sendPort); + _lib._objc_msgSend_496(_id, _lib._sel_initWithPort_1, sendPort); return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, retain: true, release: true); } int addData_(NSData? data) { - return _lib._objc_msgSend_501( + return _lib._objc_msgSend_511( _id, _lib._sel_addData_1, data?._id ?? ffi.nullptr); } @@ -85561,7 +86311,7 @@ class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { } void setError_(NSError? error) { - return _lib._objc_msgSend_502( + return _lib._objc_msgSend_512( _id, _lib._sel_setError_1, error?._id ?? ffi.nullptr); } @@ -85601,7 +86351,7 @@ class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { int port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_368( + return _lib._objc_msgSend_334( _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, hostname?._id ?? ffi.nullptr, @@ -85616,7 +86366,7 @@ class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { int port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_369( + return _lib._objc_msgSend_335( _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, host?._id ?? ffi.nullptr, @@ -85630,7 +86380,7 @@ class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { int bufferSize, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_370( + return _lib._objc_msgSend_336( _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, bufferSize, diff --git a/pkgs/cupertino_http/lib/src/utils.dart b/pkgs/cupertino_http/lib/src/utils.dart index fa76bafac8..be23e5cdcb 100644 --- a/pkgs/cupertino_http/lib/src/utils.dart +++ b/pkgs/cupertino_http/lib/src/utils.dart @@ -77,3 +77,6 @@ Map stringDictToMap(ncb.NSDictionary d) { return m; } + +ncb.NSURL uriToNSURL(Uri uri) => + ncb.NSURL.URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs)); diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 34cf11e3aa..9d639a8450 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 1.1.0-wip +version: 1.1.0 repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: @@ -11,14 +11,14 @@ environment: dependencies: async: ^2.5.0 - ffi: ^2.0.1 + ffi: ^2.1.0 flutter: sdk: flutter http: '>=0.13.4 <2.0.0' dev_dependencies: dart_flutter_team_lints: ^1.0.0 - ffigen: ^8.0.2 + ffigen: ^9.0.1 flutter: plugin: From 6edacd23b0b7071aa59095e0c943e14d3e0b66b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 03:40:40 +0000 Subject: [PATCH 269/448] Bump actions/cache from 3.3.1 to 3.3.2 (#1023) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/cache](https://github.com/actions/cache) from 3.3.1 to 3.3.2.

Release notes

Sourced from actions/cache's releases.

v3.3.2

What's Changed

New Contributors

Full Changelog: https://github.com/actions/cache/compare/v3...v3.3.2

Changelog

Sourced from actions/cache's changelog.

Releases

3.0.0

  • Updated minimum runner version support from node 12 -> node 16

3.0.1

  • Added support for caching from GHES 3.5.
  • Fixed download issue for files > 2GB during restore.

3.0.2

  • Added support for dynamic cache size cap on GHES.

3.0.3

  • Fixed avoiding empty cache save when no files are available for caching. (issue)

3.0.4

  • Fixed tar creation error while trying to create tar with path as ~/ home folder on ubuntu-latest. (issue)

3.0.5

  • Removed error handling by consuming actions/cache 3.0 toolkit, Now cache server error handling will be done by toolkit. (PR)

3.0.6

  • Fixed #809 - zstd -d: no such file or directory error
  • Fixed #833 - cache doesn't work with github workspace directory

3.0.7

  • Fixed #810 - download stuck issue. A new timeout is introduced in the download process to abort the download if it gets stuck and doesn't finish within an hour.

3.0.8

  • Fix zstd not working for windows on gnu tar in issues #888 and #891.
  • Allowing users to provide a custom timeout as input for aborting download of a cache segment using an environment variable SEGMENT_DOWNLOAD_TIMEOUT_MINS. Default is 60 minutes.

3.0.9

  • Enhanced the warning message for cache unavailablity in case of GHES.

3.0.10

  • Fix a bug with sorting inputs.
  • Update definition for restore-keys in README.md

... (truncated)

Commits
  • 704facf Merge pull request #1236 from actions/bethanyj28/bump-version
  • 17e2888 Add to RELEASES.md
  • 667d8fd bump action version to 3.3.2
  • f7ebb81 Consume latest toolkit and fix dangling promise bug (#1217)
  • 67b839e Merge pull request #1187 from jorendorff/jorendorff/rm-add-to-project
  • 57f0e3f Remove actions to add new PRs and issues to a project board
  • 04f198b Merge pull request #1132 from vorburger/bazel-example
  • bd9b49b Merge branch 'main' into bazel-example
  • ea05037 Merge pull request #1122 from actions/pdotl-patch-1
  • 6a1a45d Merge branch 'main' into pdotl-patch-1
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=3.3.1&new-version=3.3.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/dart.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 59fa5fb6d7..e3784a4d5c 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http_client_conformance_tests;commands:analyze" @@ -74,7 +74,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:analyze" @@ -104,7 +104,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" @@ -143,7 +143,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:format" @@ -182,7 +182,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:command" @@ -218,7 +218,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:test_1" @@ -254,7 +254,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:test_0" @@ -290,7 +290,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:command" @@ -326,7 +326,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_1" @@ -362,7 +362,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_0" From affc57b9d6eb0be8443088e5348dcd945be67f14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 03:40:42 +0000 Subject: [PATCH 270/448] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (#1024) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.0 to 1.5.1.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available in an environment variable, DART_HOME (#43).
  • Fixed an issue where cached downloads could lead to unzip issues on self-hosted runners (#35).

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

  • Added a flavor option setup.sh to allow downloading unpublished builds.

v1.0.0

  • Promoted to 1.0 stable.

v0.5

  • Fixed a Windows pub global activate path issue.

... (truncated)

Commits
  • 8a4b97e Support renaming the be channel to main. (#102)
  • 0970dcf Bump @​actions/http-client from 2.1.0 to 2.1.1 (#101)
  • e58aeb6 updates for the latest version of extension types (#100)
  • deafe40 Convert to extension types (#99)
  • cdb51ff Bump semver from 6.3.0 to 6.3.1 (#98)
  • e2fce12 update JS interop - remove JS typedef references (#97)
  • 42c988f set up a cron to build the action's javascript (#96)
  • 007c7cb blast_repo fixes (#92)
  • 08de7e0 Remove annotations no longer needed (#91)
  • bd8bef0 Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (#89)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.5.0&new-version=1.5.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/dart.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index e3784a4d5c..b27e709138 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -29,7 +29,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: stable - id: checkout @@ -54,7 +54,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: "2.19.0" - id: checkout @@ -84,7 +84,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: "3.0.0" - id: checkout @@ -114,7 +114,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: dev - id: checkout @@ -153,7 +153,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: dev - id: checkout @@ -192,7 +192,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: "3.0.0" - id: checkout @@ -228,7 +228,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: "3.0.0" - id: checkout @@ -264,7 +264,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: "3.0.0" - id: checkout @@ -300,7 +300,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: dev - id: checkout @@ -336,7 +336,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: dev - id: checkout @@ -372,7 +372,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: dev - id: checkout From d6d79ec6578b5e1abb52d28e773e6014e8f4c41c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 04:12:22 +0000 Subject: [PATCH 271/448] Bump actions/checkout from 3 to 4 (#1025) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
Release notes

Sourced from actions/checkout's releases.

v4.0.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v4.0.0

v3.6.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3.5.3...v3.6.0

v3.5.3

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v3.5.3

v3.5.2

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v3.5.1...v3.5.2

v3.5.1

What's Changed

New Contributors

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/cronet.yml | 4 ++-- .github/workflows/cupertino.yml | 4 ++-- .github/workflows/dart.yml | 22 +++++++++++----------- .github/workflows/java.yml | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index cd788c6c72..94fcf1ca87 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -26,7 +26,7 @@ jobs: run: working-directory: pkgs/cronet_http steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: # TODO: Change to 'stable' when a release version of flutter @@ -48,7 +48,7 @@ jobs: name: "Build and test" runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: actions/setup-java@v3 with: distribution: 'zulu' diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 739257f80c..8854421038 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -28,7 +28,7 @@ jobs: run: working-directory: pkgs/cupertino_http steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -63,7 +63,7 @@ jobs: run: working-directory: pkgs/cupertino_http/example steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: futureware-tech/simulator-action@v2 with: model: 'iPhone 8' diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index b27e709138..5f6799e44f 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -34,7 +34,7 @@ jobs: sdk: stable - id: checkout name: Checkout repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - name: mono_repo self validate run: dart pub global activate mono_repo 6.5.7 - name: mono_repo self validate @@ -59,7 +59,7 @@ jobs: sdk: "2.19.0" - id: checkout name: Checkout repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_client_conformance_tests_pub_upgrade name: pkgs/http_client_conformance_tests; dart pub upgrade run: dart pub upgrade @@ -89,7 +89,7 @@ jobs: sdk: "3.0.0" - id: checkout name: Checkout repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -119,7 +119,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -158,7 +158,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -197,7 +197,7 @@ jobs: sdk: "3.0.0" - id: checkout name: Checkout repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -233,7 +233,7 @@ jobs: sdk: "3.0.0" - id: checkout name: Checkout repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -269,7 +269,7 @@ jobs: sdk: "3.0.0" - id: checkout name: Checkout repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -305,7 +305,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -341,7 +341,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -377,7 +377,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 498226f7a5..ec1b9da029 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -29,7 +29,7 @@ jobs: run: working-directory: pkgs/java_http steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: channel: 'stable' @@ -55,7 +55,7 @@ jobs: working-directory: pkgs/java_http steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: channel: 'stable' From c6c92b1bb1cf90e453aecabb4e0ebd224492f895 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 10 Oct 2023 13:01:44 -0700 Subject: [PATCH 272/448] Prepare to release cronet 0.4.0 (#1031) --- pkgs/cronet_http/CHANGELOG.md | 2 +- pkgs/cronet_http/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 28116260c7..6d230165b7 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.4.0-jni +## 0.4.0 * Use more efficient operations when copying bytes between Java and Dart. diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 80d13015d6..37ba7afcbd 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.4.0-jni +version: 0.4.0 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: From 68c788f3e9d6c4f759f2fc99e55f7f8d3989026e Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 11 Oct 2023 12:38:16 -0700 Subject: [PATCH 273/448] Remove obsolete pigeon-generated file (#1032) --- .../flutter/plugins/cronet_http/Messages.java | 827 ------------------ pkgs/cronet_http/lib/src/messages.dart | 445 ---------- 2 files changed, 1272 deletions(-) delete mode 100644 pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java delete mode 100644 pkgs/cronet_http/lib/src/messages.dart diff --git a/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java b/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java deleted file mode 100644 index daf4edd2bd..0000000000 --- a/pkgs/cronet_http/android/src/main/java/io/flutter/plugins/cronet_http/Messages.java +++ /dev/null @@ -1,827 +0,0 @@ -// Autogenerated from Pigeon (v3.2.3), do not edit directly. -// See also: https://pub.dev/packages/pigeon - -package io.flutter.plugins.cronet_http; - -import android.util.Log; -import androidx.annotation.NonNull; -import androidx.annotation.Nullable; -import io.flutter.plugin.common.BasicMessageChannel; -import io.flutter.plugin.common.BinaryMessenger; -import io.flutter.plugin.common.MessageCodec; -import io.flutter.plugin.common.StandardMessageCodec; -import java.io.ByteArrayOutputStream; -import java.nio.ByteBuffer; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.HashMap; - -/** Generated class from Pigeon. */ -@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression"}) -public class Messages { - - public enum CacheMode { - disabled(0), - memory(1), - diskNoHttp(2), - disk(3); - - private int index; - private CacheMode(final int index) { - this.index = index; - } - } - - public enum ExceptionType { - illegalArgumentException(0), - otherException(1); - - private int index; - private ExceptionType(final int index) { - this.index = index; - } - } - - public enum EventMessageType { - responseStarted(0), - readCompleted(1), - tooManyRedirects(2); - - private int index; - private EventMessageType(final int index) { - this.index = index; - } - } - - /** Generated class from Pigeon that represents data sent in messages. */ - public static class ResponseStarted { - private @NonNull Map> headers; - public @NonNull Map> getHeaders() { return headers; } - public void setHeaders(@NonNull Map> setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"headers\" is null."); - } - this.headers = setterArg; - } - - private @NonNull Long statusCode; - public @NonNull Long getStatusCode() { return statusCode; } - public void setStatusCode(@NonNull Long setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"statusCode\" is null."); - } - this.statusCode = setterArg; - } - - private @NonNull String statusText; - public @NonNull String getStatusText() { return statusText; } - public void setStatusText(@NonNull String setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"statusText\" is null."); - } - this.statusText = setterArg; - } - - private @NonNull Boolean isRedirect; - public @NonNull Boolean getIsRedirect() { return isRedirect; } - public void setIsRedirect(@NonNull Boolean setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"isRedirect\" is null."); - } - this.isRedirect = setterArg; - } - - /** Constructor is private to enforce null safety; use Builder. */ - private ResponseStarted() {} - public static final class Builder { - private @Nullable Map> headers; - public @NonNull Builder setHeaders(@NonNull Map> setterArg) { - this.headers = setterArg; - return this; - } - private @Nullable Long statusCode; - public @NonNull Builder setStatusCode(@NonNull Long setterArg) { - this.statusCode = setterArg; - return this; - } - private @Nullable String statusText; - public @NonNull Builder setStatusText(@NonNull String setterArg) { - this.statusText = setterArg; - return this; - } - private @Nullable Boolean isRedirect; - public @NonNull Builder setIsRedirect(@NonNull Boolean setterArg) { - this.isRedirect = setterArg; - return this; - } - public @NonNull ResponseStarted build() { - ResponseStarted pigeonReturn = new ResponseStarted(); - pigeonReturn.setHeaders(headers); - pigeonReturn.setStatusCode(statusCode); - pigeonReturn.setStatusText(statusText); - pigeonReturn.setIsRedirect(isRedirect); - return pigeonReturn; - } - } - @NonNull Map toMap() { - Map toMapResult = new HashMap<>(); - toMapResult.put("headers", headers); - toMapResult.put("statusCode", statusCode); - toMapResult.put("statusText", statusText); - toMapResult.put("isRedirect", isRedirect); - return toMapResult; - } - static @NonNull ResponseStarted fromMap(@NonNull Map map) { - ResponseStarted pigeonResult = new ResponseStarted(); - Object headers = map.get("headers"); - pigeonResult.setHeaders((Map>)headers); - Object statusCode = map.get("statusCode"); - pigeonResult.setStatusCode((statusCode == null) ? null : ((statusCode instanceof Integer) ? (Integer)statusCode : (Long)statusCode)); - Object statusText = map.get("statusText"); - pigeonResult.setStatusText((String)statusText); - Object isRedirect = map.get("isRedirect"); - pigeonResult.setIsRedirect((Boolean)isRedirect); - return pigeonResult; - } - } - - /** Generated class from Pigeon that represents data sent in messages. */ - public static class ReadCompleted { - private @NonNull byte[] data; - public @NonNull byte[] getData() { return data; } - public void setData(@NonNull byte[] setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"data\" is null."); - } - this.data = setterArg; - } - - /** Constructor is private to enforce null safety; use Builder. */ - private ReadCompleted() {} - public static final class Builder { - private @Nullable byte[] data; - public @NonNull Builder setData(@NonNull byte[] setterArg) { - this.data = setterArg; - return this; - } - public @NonNull ReadCompleted build() { - ReadCompleted pigeonReturn = new ReadCompleted(); - pigeonReturn.setData(data); - return pigeonReturn; - } - } - @NonNull Map toMap() { - Map toMapResult = new HashMap<>(); - toMapResult.put("data", data); - return toMapResult; - } - static @NonNull ReadCompleted fromMap(@NonNull Map map) { - ReadCompleted pigeonResult = new ReadCompleted(); - Object data = map.get("data"); - pigeonResult.setData((byte[])data); - return pigeonResult; - } - } - - /** Generated class from Pigeon that represents data sent in messages. */ - public static class EventMessage { - private @NonNull EventMessageType type; - public @NonNull EventMessageType getType() { return type; } - public void setType(@NonNull EventMessageType setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"type\" is null."); - } - this.type = setterArg; - } - - private @Nullable ResponseStarted responseStarted; - public @Nullable ResponseStarted getResponseStarted() { return responseStarted; } - public void setResponseStarted(@Nullable ResponseStarted setterArg) { - this.responseStarted = setterArg; - } - - private @Nullable ReadCompleted readCompleted; - public @Nullable ReadCompleted getReadCompleted() { return readCompleted; } - public void setReadCompleted(@Nullable ReadCompleted setterArg) { - this.readCompleted = setterArg; - } - - /** Constructor is private to enforce null safety; use Builder. */ - private EventMessage() {} - public static final class Builder { - private @Nullable EventMessageType type; - public @NonNull Builder setType(@NonNull EventMessageType setterArg) { - this.type = setterArg; - return this; - } - private @Nullable ResponseStarted responseStarted; - public @NonNull Builder setResponseStarted(@Nullable ResponseStarted setterArg) { - this.responseStarted = setterArg; - return this; - } - private @Nullable ReadCompleted readCompleted; - public @NonNull Builder setReadCompleted(@Nullable ReadCompleted setterArg) { - this.readCompleted = setterArg; - return this; - } - public @NonNull EventMessage build() { - EventMessage pigeonReturn = new EventMessage(); - pigeonReturn.setType(type); - pigeonReturn.setResponseStarted(responseStarted); - pigeonReturn.setReadCompleted(readCompleted); - return pigeonReturn; - } - } - @NonNull Map toMap() { - Map toMapResult = new HashMap<>(); - toMapResult.put("type", type == null ? null : type.index); - toMapResult.put("responseStarted", (responseStarted == null) ? null : responseStarted.toMap()); - toMapResult.put("readCompleted", (readCompleted == null) ? null : readCompleted.toMap()); - return toMapResult; - } - static @NonNull EventMessage fromMap(@NonNull Map map) { - EventMessage pigeonResult = new EventMessage(); - Object type = map.get("type"); - pigeonResult.setType(type == null ? null : EventMessageType.values()[(int)type]); - Object responseStarted = map.get("responseStarted"); - pigeonResult.setResponseStarted((responseStarted == null) ? null : ResponseStarted.fromMap((Map)responseStarted)); - Object readCompleted = map.get("readCompleted"); - pigeonResult.setReadCompleted((readCompleted == null) ? null : ReadCompleted.fromMap((Map)readCompleted)); - return pigeonResult; - } - } - - /** Generated class from Pigeon that represents data sent in messages. */ - public static class CreateEngineRequest { - private @Nullable CacheMode cacheMode; - public @Nullable CacheMode getCacheMode() { return cacheMode; } - public void setCacheMode(@Nullable CacheMode setterArg) { - this.cacheMode = setterArg; - } - - private @Nullable Long cacheMaxSize; - public @Nullable Long getCacheMaxSize() { return cacheMaxSize; } - public void setCacheMaxSize(@Nullable Long setterArg) { - this.cacheMaxSize = setterArg; - } - - private @Nullable Boolean enableBrotli; - public @Nullable Boolean getEnableBrotli() { return enableBrotli; } - public void setEnableBrotli(@Nullable Boolean setterArg) { - this.enableBrotli = setterArg; - } - - private @Nullable Boolean enableHttp2; - public @Nullable Boolean getEnableHttp2() { return enableHttp2; } - public void setEnableHttp2(@Nullable Boolean setterArg) { - this.enableHttp2 = setterArg; - } - - private @Nullable Boolean enablePublicKeyPinningBypassForLocalTrustAnchors; - public @Nullable Boolean getEnablePublicKeyPinningBypassForLocalTrustAnchors() { return enablePublicKeyPinningBypassForLocalTrustAnchors; } - public void setEnablePublicKeyPinningBypassForLocalTrustAnchors(@Nullable Boolean setterArg) { - this.enablePublicKeyPinningBypassForLocalTrustAnchors = setterArg; - } - - private @Nullable Boolean enableQuic; - public @Nullable Boolean getEnableQuic() { return enableQuic; } - public void setEnableQuic(@Nullable Boolean setterArg) { - this.enableQuic = setterArg; - } - - private @Nullable String storagePath; - public @Nullable String getStoragePath() { return storagePath; } - public void setStoragePath(@Nullable String setterArg) { - this.storagePath = setterArg; - } - - private @Nullable String userAgent; - public @Nullable String getUserAgent() { return userAgent; } - public void setUserAgent(@Nullable String setterArg) { - this.userAgent = setterArg; - } - - public static final class Builder { - private @Nullable CacheMode cacheMode; - public @NonNull Builder setCacheMode(@Nullable CacheMode setterArg) { - this.cacheMode = setterArg; - return this; - } - private @Nullable Long cacheMaxSize; - public @NonNull Builder setCacheMaxSize(@Nullable Long setterArg) { - this.cacheMaxSize = setterArg; - return this; - } - private @Nullable Boolean enableBrotli; - public @NonNull Builder setEnableBrotli(@Nullable Boolean setterArg) { - this.enableBrotli = setterArg; - return this; - } - private @Nullable Boolean enableHttp2; - public @NonNull Builder setEnableHttp2(@Nullable Boolean setterArg) { - this.enableHttp2 = setterArg; - return this; - } - private @Nullable Boolean enablePublicKeyPinningBypassForLocalTrustAnchors; - public @NonNull Builder setEnablePublicKeyPinningBypassForLocalTrustAnchors(@Nullable Boolean setterArg) { - this.enablePublicKeyPinningBypassForLocalTrustAnchors = setterArg; - return this; - } - private @Nullable Boolean enableQuic; - public @NonNull Builder setEnableQuic(@Nullable Boolean setterArg) { - this.enableQuic = setterArg; - return this; - } - private @Nullable String storagePath; - public @NonNull Builder setStoragePath(@Nullable String setterArg) { - this.storagePath = setterArg; - return this; - } - private @Nullable String userAgent; - public @NonNull Builder setUserAgent(@Nullable String setterArg) { - this.userAgent = setterArg; - return this; - } - public @NonNull CreateEngineRequest build() { - CreateEngineRequest pigeonReturn = new CreateEngineRequest(); - pigeonReturn.setCacheMode(cacheMode); - pigeonReturn.setCacheMaxSize(cacheMaxSize); - pigeonReturn.setEnableBrotli(enableBrotli); - pigeonReturn.setEnableHttp2(enableHttp2); - pigeonReturn.setEnablePublicKeyPinningBypassForLocalTrustAnchors(enablePublicKeyPinningBypassForLocalTrustAnchors); - pigeonReturn.setEnableQuic(enableQuic); - pigeonReturn.setStoragePath(storagePath); - pigeonReturn.setUserAgent(userAgent); - return pigeonReturn; - } - } - @NonNull Map toMap() { - Map toMapResult = new HashMap<>(); - toMapResult.put("cacheMode", cacheMode == null ? null : cacheMode.index); - toMapResult.put("cacheMaxSize", cacheMaxSize); - toMapResult.put("enableBrotli", enableBrotli); - toMapResult.put("enableHttp2", enableHttp2); - toMapResult.put("enablePublicKeyPinningBypassForLocalTrustAnchors", enablePublicKeyPinningBypassForLocalTrustAnchors); - toMapResult.put("enableQuic", enableQuic); - toMapResult.put("storagePath", storagePath); - toMapResult.put("userAgent", userAgent); - return toMapResult; - } - static @NonNull CreateEngineRequest fromMap(@NonNull Map map) { - CreateEngineRequest pigeonResult = new CreateEngineRequest(); - Object cacheMode = map.get("cacheMode"); - pigeonResult.setCacheMode(cacheMode == null ? null : CacheMode.values()[(int)cacheMode]); - Object cacheMaxSize = map.get("cacheMaxSize"); - pigeonResult.setCacheMaxSize((cacheMaxSize == null) ? null : ((cacheMaxSize instanceof Integer) ? (Integer)cacheMaxSize : (Long)cacheMaxSize)); - Object enableBrotli = map.get("enableBrotli"); - pigeonResult.setEnableBrotli((Boolean)enableBrotli); - Object enableHttp2 = map.get("enableHttp2"); - pigeonResult.setEnableHttp2((Boolean)enableHttp2); - Object enablePublicKeyPinningBypassForLocalTrustAnchors = map.get("enablePublicKeyPinningBypassForLocalTrustAnchors"); - pigeonResult.setEnablePublicKeyPinningBypassForLocalTrustAnchors((Boolean)enablePublicKeyPinningBypassForLocalTrustAnchors); - Object enableQuic = map.get("enableQuic"); - pigeonResult.setEnableQuic((Boolean)enableQuic); - Object storagePath = map.get("storagePath"); - pigeonResult.setStoragePath((String)storagePath); - Object userAgent = map.get("userAgent"); - pigeonResult.setUserAgent((String)userAgent); - return pigeonResult; - } - } - - /** Generated class from Pigeon that represents data sent in messages. */ - public static class CreateEngineResponse { - private @Nullable String engineId; - public @Nullable String getEngineId() { return engineId; } - public void setEngineId(@Nullable String setterArg) { - this.engineId = setterArg; - } - - private @Nullable String errorString; - public @Nullable String getErrorString() { return errorString; } - public void setErrorString(@Nullable String setterArg) { - this.errorString = setterArg; - } - - private @Nullable ExceptionType errorType; - public @Nullable ExceptionType getErrorType() { return errorType; } - public void setErrorType(@Nullable ExceptionType setterArg) { - this.errorType = setterArg; - } - - public static final class Builder { - private @Nullable String engineId; - public @NonNull Builder setEngineId(@Nullable String setterArg) { - this.engineId = setterArg; - return this; - } - private @Nullable String errorString; - public @NonNull Builder setErrorString(@Nullable String setterArg) { - this.errorString = setterArg; - return this; - } - private @Nullable ExceptionType errorType; - public @NonNull Builder setErrorType(@Nullable ExceptionType setterArg) { - this.errorType = setterArg; - return this; - } - public @NonNull CreateEngineResponse build() { - CreateEngineResponse pigeonReturn = new CreateEngineResponse(); - pigeonReturn.setEngineId(engineId); - pigeonReturn.setErrorString(errorString); - pigeonReturn.setErrorType(errorType); - return pigeonReturn; - } - } - @NonNull Map toMap() { - Map toMapResult = new HashMap<>(); - toMapResult.put("engineId", engineId); - toMapResult.put("errorString", errorString); - toMapResult.put("errorType", errorType == null ? null : errorType.index); - return toMapResult; - } - static @NonNull CreateEngineResponse fromMap(@NonNull Map map) { - CreateEngineResponse pigeonResult = new CreateEngineResponse(); - Object engineId = map.get("engineId"); - pigeonResult.setEngineId((String)engineId); - Object errorString = map.get("errorString"); - pigeonResult.setErrorString((String)errorString); - Object errorType = map.get("errorType"); - pigeonResult.setErrorType(errorType == null ? null : ExceptionType.values()[(int)errorType]); - return pigeonResult; - } - } - - /** Generated class from Pigeon that represents data sent in messages. */ - public static class StartRequest { - private @NonNull String engineId; - public @NonNull String getEngineId() { return engineId; } - public void setEngineId(@NonNull String setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"engineId\" is null."); - } - this.engineId = setterArg; - } - - private @NonNull String url; - public @NonNull String getUrl() { return url; } - public void setUrl(@NonNull String setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"url\" is null."); - } - this.url = setterArg; - } - - private @NonNull String method; - public @NonNull String getMethod() { return method; } - public void setMethod(@NonNull String setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"method\" is null."); - } - this.method = setterArg; - } - - private @NonNull Map headers; - public @NonNull Map getHeaders() { return headers; } - public void setHeaders(@NonNull Map setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"headers\" is null."); - } - this.headers = setterArg; - } - - private @NonNull byte[] body; - public @NonNull byte[] getBody() { return body; } - public void setBody(@NonNull byte[] setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"body\" is null."); - } - this.body = setterArg; - } - - private @NonNull Long maxRedirects; - public @NonNull Long getMaxRedirects() { return maxRedirects; } - public void setMaxRedirects(@NonNull Long setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"maxRedirects\" is null."); - } - this.maxRedirects = setterArg; - } - - private @NonNull Boolean followRedirects; - public @NonNull Boolean getFollowRedirects() { return followRedirects; } - public void setFollowRedirects(@NonNull Boolean setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"followRedirects\" is null."); - } - this.followRedirects = setterArg; - } - - /** Constructor is private to enforce null safety; use Builder. */ - private StartRequest() {} - public static final class Builder { - private @Nullable String engineId; - public @NonNull Builder setEngineId(@NonNull String setterArg) { - this.engineId = setterArg; - return this; - } - private @Nullable String url; - public @NonNull Builder setUrl(@NonNull String setterArg) { - this.url = setterArg; - return this; - } - private @Nullable String method; - public @NonNull Builder setMethod(@NonNull String setterArg) { - this.method = setterArg; - return this; - } - private @Nullable Map headers; - public @NonNull Builder setHeaders(@NonNull Map setterArg) { - this.headers = setterArg; - return this; - } - private @Nullable byte[] body; - public @NonNull Builder setBody(@NonNull byte[] setterArg) { - this.body = setterArg; - return this; - } - private @Nullable Long maxRedirects; - public @NonNull Builder setMaxRedirects(@NonNull Long setterArg) { - this.maxRedirects = setterArg; - return this; - } - private @Nullable Boolean followRedirects; - public @NonNull Builder setFollowRedirects(@NonNull Boolean setterArg) { - this.followRedirects = setterArg; - return this; - } - public @NonNull StartRequest build() { - StartRequest pigeonReturn = new StartRequest(); - pigeonReturn.setEngineId(engineId); - pigeonReturn.setUrl(url); - pigeonReturn.setMethod(method); - pigeonReturn.setHeaders(headers); - pigeonReturn.setBody(body); - pigeonReturn.setMaxRedirects(maxRedirects); - pigeonReturn.setFollowRedirects(followRedirects); - return pigeonReturn; - } - } - @NonNull Map toMap() { - Map toMapResult = new HashMap<>(); - toMapResult.put("engineId", engineId); - toMapResult.put("url", url); - toMapResult.put("method", method); - toMapResult.put("headers", headers); - toMapResult.put("body", body); - toMapResult.put("maxRedirects", maxRedirects); - toMapResult.put("followRedirects", followRedirects); - return toMapResult; - } - static @NonNull StartRequest fromMap(@NonNull Map map) { - StartRequest pigeonResult = new StartRequest(); - Object engineId = map.get("engineId"); - pigeonResult.setEngineId((String)engineId); - Object url = map.get("url"); - pigeonResult.setUrl((String)url); - Object method = map.get("method"); - pigeonResult.setMethod((String)method); - Object headers = map.get("headers"); - pigeonResult.setHeaders((Map)headers); - Object body = map.get("body"); - pigeonResult.setBody((byte[])body); - Object maxRedirects = map.get("maxRedirects"); - pigeonResult.setMaxRedirects((maxRedirects == null) ? null : ((maxRedirects instanceof Integer) ? (Integer)maxRedirects : (Long)maxRedirects)); - Object followRedirects = map.get("followRedirects"); - pigeonResult.setFollowRedirects((Boolean)followRedirects); - return pigeonResult; - } - } - - /** Generated class from Pigeon that represents data sent in messages. */ - public static class StartResponse { - private @NonNull String eventChannel; - public @NonNull String getEventChannel() { return eventChannel; } - public void setEventChannel(@NonNull String setterArg) { - if (setterArg == null) { - throw new IllegalStateException("Nonnull field \"eventChannel\" is null."); - } - this.eventChannel = setterArg; - } - - /** Constructor is private to enforce null safety; use Builder. */ - private StartResponse() {} - public static final class Builder { - private @Nullable String eventChannel; - public @NonNull Builder setEventChannel(@NonNull String setterArg) { - this.eventChannel = setterArg; - return this; - } - public @NonNull StartResponse build() { - StartResponse pigeonReturn = new StartResponse(); - pigeonReturn.setEventChannel(eventChannel); - return pigeonReturn; - } - } - @NonNull Map toMap() { - Map toMapResult = new HashMap<>(); - toMapResult.put("eventChannel", eventChannel); - return toMapResult; - } - static @NonNull StartResponse fromMap(@NonNull Map map) { - StartResponse pigeonResult = new StartResponse(); - Object eventChannel = map.get("eventChannel"); - pigeonResult.setEventChannel((String)eventChannel); - return pigeonResult; - } - } - private static class HttpApiCodec extends StandardMessageCodec { - public static final HttpApiCodec INSTANCE = new HttpApiCodec(); - private HttpApiCodec() {} - @Override - protected Object readValueOfType(byte type, ByteBuffer buffer) { - switch (type) { - case (byte)128: - return CreateEngineRequest.fromMap((Map) readValue(buffer)); - - case (byte)129: - return CreateEngineResponse.fromMap((Map) readValue(buffer)); - - case (byte)130: - return EventMessage.fromMap((Map) readValue(buffer)); - - case (byte)131: - return ReadCompleted.fromMap((Map) readValue(buffer)); - - case (byte)132: - return ResponseStarted.fromMap((Map) readValue(buffer)); - - case (byte)133: - return StartRequest.fromMap((Map) readValue(buffer)); - - case (byte)134: - return StartResponse.fromMap((Map) readValue(buffer)); - - default: - return super.readValueOfType(type, buffer); - - } - } - @Override - protected void writeValue(ByteArrayOutputStream stream, Object value) { - if (value instanceof CreateEngineRequest) { - stream.write(128); - writeValue(stream, ((CreateEngineRequest) value).toMap()); - } else - if (value instanceof CreateEngineResponse) { - stream.write(129); - writeValue(stream, ((CreateEngineResponse) value).toMap()); - } else - if (value instanceof EventMessage) { - stream.write(130); - writeValue(stream, ((EventMessage) value).toMap()); - } else - if (value instanceof ReadCompleted) { - stream.write(131); - writeValue(stream, ((ReadCompleted) value).toMap()); - } else - if (value instanceof ResponseStarted) { - stream.write(132); - writeValue(stream, ((ResponseStarted) value).toMap()); - } else - if (value instanceof StartRequest) { - stream.write(133); - writeValue(stream, ((StartRequest) value).toMap()); - } else - if (value instanceof StartResponse) { - stream.write(134); - writeValue(stream, ((StartResponse) value).toMap()); - } else -{ - super.writeValue(stream, value); - } - } - } - - /** Generated interface from Pigeon that represents a handler of messages from Flutter.*/ - public interface HttpApi { - @NonNull CreateEngineResponse createEngine(@NonNull CreateEngineRequest request); - void freeEngine(@NonNull String engineId); - @NonNull StartResponse start(@NonNull StartRequest request); - void dummy(@NonNull EventMessage message); - - /** The codec used by HttpApi. */ - static MessageCodec getCodec() { - return HttpApiCodec.INSTANCE; - } - - /** Sets up an instance of `HttpApi` to handle messages through the `binaryMessenger`. */ - static void setup(BinaryMessenger binaryMessenger, HttpApi api) { - { - BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.HttpApi.createEngine", getCodec()); - if (api != null) { - channel.setMessageHandler((message, reply) -> { - Map wrapped = new HashMap<>(); - try { - ArrayList args = (ArrayList)message; - CreateEngineRequest requestArg = (CreateEngineRequest)args.get(0); - if (requestArg == null) { - throw new NullPointerException("requestArg unexpectedly null."); - } - CreateEngineResponse output = api.createEngine(requestArg); - wrapped.put("result", output); - } - catch (Error | RuntimeException exception) { - wrapped.put("error", wrapError(exception)); - } - reply.reply(wrapped); - }); - } else { - channel.setMessageHandler(null); - } - } - { - BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.HttpApi.freeEngine", getCodec()); - if (api != null) { - channel.setMessageHandler((message, reply) -> { - Map wrapped = new HashMap<>(); - try { - ArrayList args = (ArrayList)message; - String engineIdArg = (String)args.get(0); - if (engineIdArg == null) { - throw new NullPointerException("engineIdArg unexpectedly null."); - } - api.freeEngine(engineIdArg); - wrapped.put("result", null); - } - catch (Error | RuntimeException exception) { - wrapped.put("error", wrapError(exception)); - } - reply.reply(wrapped); - }); - } else { - channel.setMessageHandler(null); - } - } - { - BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.HttpApi.start", getCodec()); - if (api != null) { - channel.setMessageHandler((message, reply) -> { - Map wrapped = new HashMap<>(); - try { - ArrayList args = (ArrayList)message; - StartRequest requestArg = (StartRequest)args.get(0); - if (requestArg == null) { - throw new NullPointerException("requestArg unexpectedly null."); - } - StartResponse output = api.start(requestArg); - wrapped.put("result", output); - } - catch (Error | RuntimeException exception) { - wrapped.put("error", wrapError(exception)); - } - reply.reply(wrapped); - }); - } else { - channel.setMessageHandler(null); - } - } - { - BasicMessageChannel channel = - new BasicMessageChannel<>(binaryMessenger, "dev.flutter.pigeon.HttpApi.dummy", getCodec()); - if (api != null) { - channel.setMessageHandler((message, reply) -> { - Map wrapped = new HashMap<>(); - try { - ArrayList args = (ArrayList)message; - EventMessage messageArg = (EventMessage)args.get(0); - if (messageArg == null) { - throw new NullPointerException("messageArg unexpectedly null."); - } - api.dummy(messageArg); - wrapped.put("result", null); - } - catch (Error | RuntimeException exception) { - wrapped.put("error", wrapError(exception)); - } - reply.reply(wrapped); - }); - } else { - channel.setMessageHandler(null); - } - } - } - } - private static Map wrapError(Throwable exception) { - Map errorMap = new HashMap<>(); - errorMap.put("message", exception.toString()); - errorMap.put("code", exception.getClass().getSimpleName()); - errorMap.put("details", "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); - return errorMap; - } -} diff --git a/pkgs/cronet_http/lib/src/messages.dart b/pkgs/cronet_http/lib/src/messages.dart deleted file mode 100644 index 47e0a920e9..0000000000 --- a/pkgs/cronet_http/lib/src/messages.dart +++ /dev/null @@ -1,445 +0,0 @@ -// Autogenerated from Pigeon (v3.2.3), do not edit directly. -// See also: https://pub.dev/packages/pigeon -// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import -import 'dart:async'; -import 'dart:typed_data' show Uint8List, Int32List, Int64List, Float64List; - -import 'package:flutter/foundation.dart' show WriteBuffer, ReadBuffer; -import 'package:flutter/services.dart'; - -enum CacheMode { - disabled, - memory, - diskNoHttp, - disk, -} - -enum ExceptionType { - illegalArgumentException, - otherException, -} - -enum EventMessageType { - responseStarted, - readCompleted, - tooManyRedirects, -} - -class ResponseStarted { - ResponseStarted({ - required this.headers, - required this.statusCode, - required this.statusText, - required this.isRedirect, - }); - - Map?> headers; - int statusCode; - String statusText; - bool isRedirect; - - Object encode() { - final Map pigeonMap = {}; - pigeonMap['headers'] = headers; - pigeonMap['statusCode'] = statusCode; - pigeonMap['statusText'] = statusText; - pigeonMap['isRedirect'] = isRedirect; - return pigeonMap; - } - - static ResponseStarted decode(Object message) { - final Map pigeonMap = message as Map; - return ResponseStarted( - headers: (pigeonMap['headers'] as Map?)! - .cast?>(), - statusCode: pigeonMap['statusCode']! as int, - statusText: pigeonMap['statusText']! as String, - isRedirect: pigeonMap['isRedirect']! as bool, - ); - } -} - -class ReadCompleted { - ReadCompleted({ - required this.data, - }); - - Uint8List data; - - Object encode() { - final Map pigeonMap = {}; - pigeonMap['data'] = data; - return pigeonMap; - } - - static ReadCompleted decode(Object message) { - final Map pigeonMap = message as Map; - return ReadCompleted( - data: pigeonMap['data']! as Uint8List, - ); - } -} - -class EventMessage { - EventMessage({ - required this.type, - this.responseStarted, - this.readCompleted, - }); - - EventMessageType type; - ResponseStarted? responseStarted; - ReadCompleted? readCompleted; - - Object encode() { - final Map pigeonMap = {}; - pigeonMap['type'] = type.index; - pigeonMap['responseStarted'] = responseStarted?.encode(); - pigeonMap['readCompleted'] = readCompleted?.encode(); - return pigeonMap; - } - - static EventMessage decode(Object message) { - final Map pigeonMap = message as Map; - return EventMessage( - type: EventMessageType.values[pigeonMap['type']! as int], - responseStarted: pigeonMap['responseStarted'] != null - ? ResponseStarted.decode(pigeonMap['responseStarted']!) - : null, - readCompleted: pigeonMap['readCompleted'] != null - ? ReadCompleted.decode(pigeonMap['readCompleted']!) - : null, - ); - } -} - -class CreateEngineRequest { - CreateEngineRequest({ - this.cacheMode, - this.cacheMaxSize, - this.enableBrotli, - this.enableHttp2, - this.enablePublicKeyPinningBypassForLocalTrustAnchors, - this.enableQuic, - this.storagePath, - this.userAgent, - }); - - CacheMode? cacheMode; - int? cacheMaxSize; - bool? enableBrotli; - bool? enableHttp2; - bool? enablePublicKeyPinningBypassForLocalTrustAnchors; - bool? enableQuic; - String? storagePath; - String? userAgent; - - Object encode() { - final Map pigeonMap = {}; - pigeonMap['cacheMode'] = cacheMode?.index; - pigeonMap['cacheMaxSize'] = cacheMaxSize; - pigeonMap['enableBrotli'] = enableBrotli; - pigeonMap['enableHttp2'] = enableHttp2; - pigeonMap['enablePublicKeyPinningBypassForLocalTrustAnchors'] = - enablePublicKeyPinningBypassForLocalTrustAnchors; - pigeonMap['enableQuic'] = enableQuic; - pigeonMap['storagePath'] = storagePath; - pigeonMap['userAgent'] = userAgent; - return pigeonMap; - } - - static CreateEngineRequest decode(Object message) { - final Map pigeonMap = message as Map; - return CreateEngineRequest( - cacheMode: pigeonMap['cacheMode'] != null - ? CacheMode.values[pigeonMap['cacheMode']! as int] - : null, - cacheMaxSize: pigeonMap['cacheMaxSize'] as int?, - enableBrotli: pigeonMap['enableBrotli'] as bool?, - enableHttp2: pigeonMap['enableHttp2'] as bool?, - enablePublicKeyPinningBypassForLocalTrustAnchors: - pigeonMap['enablePublicKeyPinningBypassForLocalTrustAnchors'] - as bool?, - enableQuic: pigeonMap['enableQuic'] as bool?, - storagePath: pigeonMap['storagePath'] as String?, - userAgent: pigeonMap['userAgent'] as String?, - ); - } -} - -class CreateEngineResponse { - CreateEngineResponse({ - this.engineId, - this.errorString, - this.errorType, - }); - - String? engineId; - String? errorString; - ExceptionType? errorType; - - Object encode() { - final Map pigeonMap = {}; - pigeonMap['engineId'] = engineId; - pigeonMap['errorString'] = errorString; - pigeonMap['errorType'] = errorType?.index; - return pigeonMap; - } - - static CreateEngineResponse decode(Object message) { - final Map pigeonMap = message as Map; - return CreateEngineResponse( - engineId: pigeonMap['engineId'] as String?, - errorString: pigeonMap['errorString'] as String?, - errorType: pigeonMap['errorType'] != null - ? ExceptionType.values[pigeonMap['errorType']! as int] - : null, - ); - } -} - -class StartRequest { - StartRequest({ - required this.engineId, - required this.url, - required this.method, - required this.headers, - required this.body, - required this.maxRedirects, - required this.followRedirects, - }); - - String engineId; - String url; - String method; - Map headers; - Uint8List body; - int maxRedirects; - bool followRedirects; - - Object encode() { - final Map pigeonMap = {}; - pigeonMap['engineId'] = engineId; - pigeonMap['url'] = url; - pigeonMap['method'] = method; - pigeonMap['headers'] = headers; - pigeonMap['body'] = body; - pigeonMap['maxRedirects'] = maxRedirects; - pigeonMap['followRedirects'] = followRedirects; - return pigeonMap; - } - - static StartRequest decode(Object message) { - final Map pigeonMap = message as Map; - return StartRequest( - engineId: pigeonMap['engineId']! as String, - url: pigeonMap['url']! as String, - method: pigeonMap['method']! as String, - headers: (pigeonMap['headers'] as Map?)! - .cast(), - body: pigeonMap['body']! as Uint8List, - maxRedirects: pigeonMap['maxRedirects']! as int, - followRedirects: pigeonMap['followRedirects']! as bool, - ); - } -} - -class StartResponse { - StartResponse({ - required this.eventChannel, - }); - - String eventChannel; - - Object encode() { - final Map pigeonMap = {}; - pigeonMap['eventChannel'] = eventChannel; - return pigeonMap; - } - - static StartResponse decode(Object message) { - final Map pigeonMap = message as Map; - return StartResponse( - eventChannel: pigeonMap['eventChannel']! as String, - ); - } -} - -class _HttpApiCodec extends StandardMessageCodec { - const _HttpApiCodec(); - @override - void writeValue(WriteBuffer buffer, Object? value) { - if (value is CreateEngineRequest) { - buffer.putUint8(128); - writeValue(buffer, value.encode()); - } else if (value is CreateEngineResponse) { - buffer.putUint8(129); - writeValue(buffer, value.encode()); - } else if (value is EventMessage) { - buffer.putUint8(130); - writeValue(buffer, value.encode()); - } else if (value is ReadCompleted) { - buffer.putUint8(131); - writeValue(buffer, value.encode()); - } else if (value is ResponseStarted) { - buffer.putUint8(132); - writeValue(buffer, value.encode()); - } else if (value is StartRequest) { - buffer.putUint8(133); - writeValue(buffer, value.encode()); - } else if (value is StartResponse) { - buffer.putUint8(134); - writeValue(buffer, value.encode()); - } else { - super.writeValue(buffer, value); - } - } - - @override - Object? readValueOfType(int type, ReadBuffer buffer) { - switch (type) { - case 128: - return CreateEngineRequest.decode(readValue(buffer)!); - - case 129: - return CreateEngineResponse.decode(readValue(buffer)!); - - case 130: - return EventMessage.decode(readValue(buffer)!); - - case 131: - return ReadCompleted.decode(readValue(buffer)!); - - case 132: - return ResponseStarted.decode(readValue(buffer)!); - - case 133: - return StartRequest.decode(readValue(buffer)!); - - case 134: - return StartResponse.decode(readValue(buffer)!); - - default: - return super.readValueOfType(type, buffer); - } - } -} - -class HttpApi { - /// Constructor for [HttpApi]. The [binaryMessenger] named argument is - /// available for dependency injection. If it is left null, the default - /// BinaryMessenger will be used which routes to the host platform. - HttpApi({BinaryMessenger? binaryMessenger}) - : _binaryMessenger = binaryMessenger; - - final BinaryMessenger? _binaryMessenger; - - static const MessageCodec codec = _HttpApiCodec(); - - Future createEngine( - CreateEngineRequest arg_request) async { - final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HttpApi.createEngine', codec, - binaryMessenger: _binaryMessenger); - final Map? replyMap = - await channel.send([arg_request]) as Map?; - if (replyMap == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel.', - ); - } else if (replyMap['error'] != null) { - final Map error = - (replyMap['error'] as Map?)!; - throw PlatformException( - code: (error['code'] as String?)!, - message: error['message'] as String?, - details: error['details'], - ); - } else if (replyMap['result'] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (replyMap['result'] as CreateEngineResponse?)!; - } - } - - Future freeEngine(String arg_engineId) async { - final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HttpApi.freeEngine', codec, - binaryMessenger: _binaryMessenger); - final Map? replyMap = - await channel.send([arg_engineId]) as Map?; - if (replyMap == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel.', - ); - } else if (replyMap['error'] != null) { - final Map error = - (replyMap['error'] as Map?)!; - throw PlatformException( - code: (error['code'] as String?)!, - message: error['message'] as String?, - details: error['details'], - ); - } else { - return; - } - } - - Future start(StartRequest arg_request) async { - final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HttpApi.start', codec, - binaryMessenger: _binaryMessenger); - final Map? replyMap = - await channel.send([arg_request]) as Map?; - if (replyMap == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel.', - ); - } else if (replyMap['error'] != null) { - final Map error = - (replyMap['error'] as Map?)!; - throw PlatformException( - code: (error['code'] as String?)!, - message: error['message'] as String?, - details: error['details'], - ); - } else if (replyMap['result'] == null) { - throw PlatformException( - code: 'null-error', - message: 'Host platform returned null value for non-null return value.', - ); - } else { - return (replyMap['result'] as StartResponse?)!; - } - } - - Future dummy(EventMessage arg_message) async { - final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HttpApi.dummy', codec, - binaryMessenger: _binaryMessenger); - final Map? replyMap = - await channel.send([arg_message]) as Map?; - if (replyMap == null) { - throw PlatformException( - code: 'channel-error', - message: 'Unable to establish connection on channel.', - ); - } else if (replyMap['error'] != null) { - final Map error = - (replyMap['error'] as Map?)!; - throw PlatformException( - code: (error['code'] as String?)!, - message: error['message'] as String?, - details: error['details'], - ); - } else { - return; - } - } -} From 03fe4cba375013ba4551fe4cc25ab7fb2cb69b44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 03:51:59 +0000 Subject: [PATCH 274/448] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (#1038) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.1 to 1.6.0.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available in an environment variable, DART_HOME (#43).
  • Fixed an issue where cached downloads could lead to unzip issues on self-hosted runners (#35).

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

  • Added a flavor option setup.sh to allow downloading unpublished builds.

v1.0.0

  • Promoted to 1.0 stable.

v0.5

  • Fixed a Windows pub global activate path issue.

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.5.1&new-version=1.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/dart.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 5f6799e44f..b9249217b9 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -29,7 +29,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: stable - id: checkout @@ -54,7 +54,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: "2.19.0" - id: checkout @@ -84,7 +84,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: "3.0.0" - id: checkout @@ -114,7 +114,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: dev - id: checkout @@ -153,7 +153,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: dev - id: checkout @@ -192,7 +192,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: "3.0.0" - id: checkout @@ -228,7 +228,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: "3.0.0" - id: checkout @@ -264,7 +264,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: "3.0.0" - id: checkout @@ -300,7 +300,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: dev - id: checkout @@ -336,7 +336,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: dev - id: checkout @@ -372,7 +372,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: dev - id: checkout From 0c25432b5bca5adac149fd7ad8cab90cfbb12f78 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 03:55:08 +0000 Subject: [PATCH 275/448] Bump futureware-tech/simulator-action from 2 to 3 (#1037) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [futureware-tech/simulator-action](https://github.com/futureware-tech/simulator-action) from 2 to 3.
Changelog

Sourced from futureware-tech/simulator-action's changelog.

v3

  • Breaking: change the default simulator from "model = iPhone 8" to "os = iOS", to avoid re-releasing the action each time the current model gets outdated.
  • Bump NodeJS to 20.
Commits
  • bfa03d9 Merge pull request #397 from futureware-tech/macos-13
  • 8c4d418 Release v3
  • b767cf0 Default to os=iOS instead of model=iPhone8
  • 01ee1d9 npm update
  • e6e56fc Lossy dependency version spec in package.json
  • 5579cd8 Bump NodeJS (16 -> 20) and npm update
  • 736249c Merge pull request #345 from futureware-tech/dependabot/npm_and_yarn/typescri...
  • 737bb51 Bump @​typescript-eslint/parser from 5.59.1 to 5.59.5
  • 0122b9b Merge pull request #343 from futureware-tech/dependabot/npm_and_yarn/eslint-8...
  • c6607ed Merge pull request #346 from futureware-tech/dependabot/npm_and_yarn/types/se...
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=futureware-tech/simulator-action&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/cupertino.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 8854421038..6617635ce2 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -64,7 +64,7 @@ jobs: working-directory: pkgs/cupertino_http/example steps: - uses: actions/checkout@v4 - - uses: futureware-tech/simulator-action@v2 + - uses: futureware-tech/simulator-action@v3 with: model: 'iPhone 8' - uses: subosito/flutter-action@v2 From 83e633b692824176f2bc5d64916a386149c180f3 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 2 Nov 2023 12:43:45 -0700 Subject: [PATCH 276/448] Add a skeleton "http_profile" package (#1036) --- .github/workflows/dart.yml | 79 +++++++++++++++---- pkgs/http_profile/CHANGELOG.md | 3 + pkgs/http_profile/LICENSE | 27 +++++++ pkgs/http_profile/README.md | 2 + pkgs/http_profile/lib/http_profile.dart | 33 ++++++++ pkgs/http_profile/mono_pkg.yaml | 14 ++++ pkgs/http_profile/pubspec.yaml | 15 ++++ .../test/profiling_enabled_test.dart | 22 ++++++ tool/ci.sh | 2 +- 9 files changed, 179 insertions(+), 18 deletions(-) create mode 100644 pkgs/http_profile/CHANGELOG.md create mode 100644 pkgs/http_profile/LICENSE create mode 100644 pkgs/http_profile/README.md create mode 100644 pkgs/http_profile/lib/http_profile.dart create mode 100644 pkgs/http_profile/mono_pkg.yaml create mode 100644 pkgs/http_profile/pubspec.yaml create mode 100644 pkgs/http_profile/test/profiling_enabled_test.dart diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index b9249217b9..fc4da99ccd 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.5.7 +# Created with package:mono_repo v6.6.0 name: Dart CI on: push: @@ -36,7 +36,7 @@ jobs: name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - name: mono_repo self validate - run: dart pub global activate mono_repo 6.5.7 + run: dart pub global activate mono_repo 6.6.0 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: @@ -70,16 +70,16 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests job_003: - name: "analyze_and_format; Dart 3.0.0; PKG: pkgs/http; `dart analyze --fatal-infos`" + name: "analyze_and_format; Dart 3.0.0; PKGS: pkgs/http, pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile;commands:analyze" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -99,17 +99,26 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http + - id: pkgs_http_profile_pub_upgrade + name: pkgs/http_profile; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_profile + - name: "pkgs/http_profile; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_profile job_004: - name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" + name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile;commands:analyze" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -138,17 +147,26 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests + - id: pkgs_http_profile_pub_upgrade + name: pkgs/http_profile; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_profile + - name: "pkgs/http_profile; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_profile job_005: - name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart format --output=none --set-exit-if-changed .`" + name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:format" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile;commands:format" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -177,6 +195,15 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests + - id: pkgs_http_profile_pub_upgrade + name: pkgs/http_profile; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_profile + - name: "pkgs/http_profile; dart format --output=none --set-exit-if-changed ." + run: "dart format --output=none --set-exit-if-changed ." + if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_profile job_006: name: "unit_test; Dart 3.0.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest @@ -250,16 +277,16 @@ jobs: - job_004 - job_005 job_008: - name: "unit_test; Dart 3.0.0; PKG: pkgs/http; `dart test --platform vm`" + name: "unit_test; Dart 3.0.0; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -279,6 +306,15 @@ jobs: run: dart test --platform vm if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http + - id: pkgs_http_profile_pub_upgrade + name: pkgs/http_profile; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_profile + - name: "pkgs/http_profile; dart test --platform vm" + run: dart test --platform vm + if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_profile needs: - job_001 - job_002 @@ -358,16 +394,16 @@ jobs: - job_004 - job_005 job_011: - name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform vm`" + name: "unit_test; Dart dev; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_profile;commands:test_0" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -387,6 +423,15 @@ jobs: run: dart test --platform vm if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http + - id: pkgs_http_profile_pub_upgrade + name: pkgs/http_profile; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_profile + - name: "pkgs/http_profile; dart test --platform vm" + run: dart test --platform vm + if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_profile needs: - job_001 - job_002 diff --git a/pkgs/http_profile/CHANGELOG.md b/pkgs/http_profile/CHANGELOG.md new file mode 100644 index 0000000000..8f2e70fcf2 --- /dev/null +++ b/pkgs/http_profile/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* Skeleton class and test definitions. diff --git a/pkgs/http_profile/LICENSE b/pkgs/http_profile/LICENSE new file mode 100644 index 0000000000..baa79ce1d3 --- /dev/null +++ b/pkgs/http_profile/LICENSE @@ -0,0 +1,27 @@ +Copyright 2023, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pkgs/http_profile/README.md b/pkgs/http_profile/README.md new file mode 100644 index 0000000000..1ca1305b76 --- /dev/null +++ b/pkgs/http_profile/README.md @@ -0,0 +1,2 @@ +An **experimental** package that allows HTTP clients outside of the Dart SDK +to integrate with the DevTools Network tab. diff --git a/pkgs/http_profile/lib/http_profile.dart b/pkgs/http_profile/lib/http_profile.dart new file mode 100644 index 0000000000..ea27665fb1 --- /dev/null +++ b/pkgs/http_profile/lib/http_profile.dart @@ -0,0 +1,33 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:io'; + +/// A record of debugging information about an HTTP request. +final class HttpClientRequestProfile { + /// Whether HTTP profiling is enabled or not. + /// + /// The value can be changed programmatically or through the DevTools Network + /// UX. + static bool get profilingEnabled => HttpClient.enableTimelineLogging; + static set profilingEnabled(bool enabled) => + HttpClient.enableTimelineLogging = enabled; + + String? requestMethod; + String? requestUri; + + HttpClientRequestProfile._(); + + /// If HTTP profiling is enabled, returns + /// a [HttpClientRequestProfile] otherwise returns `null`. + static HttpClientRequestProfile? profile() { + // Always return `null` in product mode so that the + // profiling code can be tree shaken away. + if (const bool.fromEnvironment('dart.vm.product') || !profilingEnabled) { + return null; + } + final requestProfile = HttpClientRequestProfile._(); + return requestProfile; + } +} diff --git a/pkgs/http_profile/mono_pkg.yaml b/pkgs/http_profile/mono_pkg.yaml new file mode 100644 index 0000000000..977b336758 --- /dev/null +++ b/pkgs/http_profile/mono_pkg.yaml @@ -0,0 +1,14 @@ +sdk: +- pubspec +- dev + +stages: +- analyze_and_format: + - analyze: --fatal-infos + - format: + sdk: + - dev +- unit_test: + - test: --platform vm + os: + - linux diff --git a/pkgs/http_profile/pubspec.yaml b/pkgs/http_profile/pubspec.yaml new file mode 100644 index 0000000000..9e3b69e12f --- /dev/null +++ b/pkgs/http_profile/pubspec.yaml @@ -0,0 +1,15 @@ +name: http_profile +description: >- + A library used by HTTP client authors to integrate with the DevTools + Network tab. +publish_to: none +repository: https://github.com/dart-lang/http/tree/master/pkgs/http_profile + +environment: + sdk: ^3.0.0 + +dependencies: + test: ^1.24.9 + +dev_dependencies: + dart_flutter_team_lints: ^2.1.1 diff --git a/pkgs/http_profile/test/profiling_enabled_test.dart b/pkgs/http_profile/test/profiling_enabled_test.dart new file mode 100644 index 0000000000..6336da6ee4 --- /dev/null +++ b/pkgs/http_profile/test/profiling_enabled_test.dart @@ -0,0 +1,22 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. 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:http_profile/http_profile.dart'; +import 'package:test/test.dart'; + +void main() { + test('profiling enabled', () async { + HttpClientRequestProfile.profilingEnabled = true; + expect(HttpClient.enableTimelineLogging, true); + expect(HttpClientRequestProfile.profile(), isNotNull); + }); + + test('profiling disabled', () async { + HttpClientRequestProfile.profilingEnabled = false; + expect(HttpClient.enableTimelineLogging, false); + expect(HttpClientRequestProfile.profile(), isNull); + }); +} diff --git a/tool/ci.sh b/tool/ci.sh index 91d1c5f752..f9acff8cb0 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.5.7 +# Created with package:mono_repo v6.6.0 # Support built in commands on windows out of the box. # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") From d5cd338d2852b9acdf8655aec66dfed7144f58b8 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 2 Nov 2023 15:33:13 -0700 Subject: [PATCH 277/448] Fix obsolete `CronetClient()` constructor usage (#1042) --- pkgs/cronet_http/CHANGELOG.md | 4 ++++ pkgs/cronet_http/lib/cronet_http.dart | 2 +- pkgs/cronet_http/lib/src/cronet_client.dart | 2 +- pkgs/cronet_http/pubspec.yaml | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 6d230165b7..e415bf641f 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.1 + +* Fix obsolete `CronetClient()` constructor usage. + ## 0.4.0 * Use more efficient operations when copying bytes between Java and Dart. diff --git a/pkgs/cronet_http/lib/cronet_http.dart b/pkgs/cronet_http/lib/cronet_http.dart index e41af71f9e..fe6499fc6d 100644 --- a/pkgs/cronet_http/lib/cronet_http.dart +++ b/pkgs/cronet_http/lib/cronet_http.dart @@ -10,7 +10,7 @@ /// import 'package:cronet_http/cronet_http.dart'; /// /// void main() async { -/// var client = CronetClient(); +/// var client = CronetClient.defaultCronetEngine(); /// final response = await client.get( /// Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'})); /// if (response.statusCode != 200) { diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index 69143208fc..c4d0d19006 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -235,7 +235,7 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( /// For example: /// ``` /// void main() async { -/// var client = CronetClient(); +/// var client = CronetClient.defaultCronetEngine(); /// final response = await client.get( /// Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'})); /// if (response.statusCode != 200) { diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 37ba7afcbd..70d56f7788 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.4.0 +version: 0.4.1 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: From cdde2e303f1fce4aa8cbf76d5b431599d4d19339 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 2 Nov 2023 15:58:29 -0700 Subject: [PATCH 278/448] Require package:jni >= 0.7.1 to fix macOS build (#1041) --- pkgs/cronet_http/CHANGELOG.md | 3 +++ pkgs/cronet_http/pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index e415bf641f..2947efb663 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,4 +1,7 @@ ## 0.4.1 + +* Require `package:jni >= 0.7.1` so that depending on `package:cronet_http` + does not break macOS builds. * Fix obsolete `CronetClient()` constructor usage. diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 70d56f7788..451df156a8 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter http: '>=0.13.4 <2.0.0' - jni: ^0.7.0 + jni: ^0.7.1 dev_dependencies: dart_flutter_team_lints: ^1.0.0 From 92d7362b83d21401afb8e6a408e98d19f2b84d83 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 6 Nov 2023 21:15:50 -0800 Subject: [PATCH 279/448] Create a flutter example application that uses multiple client implementations (#1040) --- .github/workflows/dart.yml | 262 ++++++- README.md | 1 + pkgs/cronet_http/example/lib/book.dart | 24 +- pkgs/cronet_http/example/lib/main.dart | 8 +- pkgs/cronet_http/example/pubspec.yaml | 2 +- pkgs/cupertino_http/example/lib/book.dart | 22 +- pkgs/cupertino_http/example/lib/main.dart | 5 + pkgs/flutter_http_example/.gitignore | 44 ++ pkgs/flutter_http_example/.metadata | 45 ++ pkgs/flutter_http_example/README.md | 43 ++ pkgs/flutter_http_example/android/.gitignore | 13 + .../android/app/build.gradle | 67 ++ .../android/app/src/debug/AndroidManifest.xml | 7 + .../android/app/src/main/AndroidManifest.xml | 34 + .../flutter_http_example/MainActivity.kt | 6 + .../res/drawable-v21/launch_background.xml | 12 + .../main/res/drawable/launch_background.xml | 12 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values-night/styles.xml | 18 + .../app/src/main/res/values/styles.xml | 18 + .../app/src/profile/AndroidManifest.xml | 7 + .../flutter_http_example/android/build.gradle | 31 + .../android/gradle.properties | 3 + .../gradle/wrapper/gradle-wrapper.properties | 5 + .../android/settings.gradle | 20 + pkgs/flutter_http_example/ios/.gitignore | 34 + .../ios/Flutter/AppFrameworkInfo.plist | 26 + .../ios/Flutter/Debug.xcconfig | 1 + .../ios/Flutter/Release.xcconfig | 1 + .../ios/Runner.xcodeproj/project.pbxproj | 614 ++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 98 +++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/WorkspaceSettings.xcsettings | 8 + .../ios/Runner/AppDelegate.swift | 13 + .../AppIcon.appiconset/Contents.json | 122 +++ .../Icon-App-1024x1024@1x.png | Bin 0 -> 10932 bytes .../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 0 -> 295 bytes .../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 0 -> 406 bytes .../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 0 -> 450 bytes .../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 0 -> 282 bytes .../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 0 -> 462 bytes .../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 0 -> 704 bytes .../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 0 -> 406 bytes .../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 0 -> 586 bytes .../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 0 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 0 -> 862 bytes .../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 0 -> 1674 bytes .../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 0 -> 762 bytes .../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 0 -> 1226 bytes .../Icon-App-83.5x83.5@2x.png | Bin 0 -> 1418 bytes .../LaunchImage.imageset/Contents.json | 23 + .../LaunchImage.imageset/LaunchImage.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@2x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/LaunchImage@3x.png | Bin 0 -> 68 bytes .../LaunchImage.imageset/README.md | 5 + .../Runner/Base.lproj/LaunchScreen.storyboard | 37 + .../ios/Runner/Base.lproj/Main.storyboard | 26 + .../ios/Runner/Info.plist | 49 ++ .../ios/Runner/Runner-Bridging-Header.h | 1 + .../ios/RunnerTests/RunnerTests.swift | 12 + pkgs/flutter_http_example/lib/book.dart | 32 + .../lib/http_client_factory.dart | 19 + .../lib/http_client_factory_web.dart | 8 + pkgs/flutter_http_example/lib/main.dart | 154 ++++ pkgs/flutter_http_example/linux/.gitignore | 1 + .../flutter_http_example/linux/CMakeLists.txt | 139 ++++ .../linux/flutter/CMakeLists.txt | 88 +++ .../flutter/generated_plugin_registrant.cc | 11 + .../flutter/generated_plugin_registrant.h | 15 + .../linux/flutter/generated_plugins.cmake | 23 + pkgs/flutter_http_example/linux/main.cc | 6 + .../linux/my_application.cc | 104 +++ .../linux/my_application.h | 18 + pkgs/flutter_http_example/macos/.gitignore | 7 + .../macos/Flutter/Flutter-Debug.xcconfig | 1 + .../macos/Flutter/Flutter-Release.xcconfig | 1 + .../Flutter/GeneratedPluginRegistrant.swift | 10 + .../macos/Runner.xcodeproj/project.pbxproj | 695 ++++++++++++++++++ .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/xcschemes/Runner.xcscheme | 98 +++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../macos/Runner/AppDelegate.swift | 9 + .../AppIcon.appiconset/Contents.json | 68 ++ .../AppIcon.appiconset/app_icon_1024.png | Bin 0 -> 102994 bytes .../AppIcon.appiconset/app_icon_128.png | Bin 0 -> 5680 bytes .../AppIcon.appiconset/app_icon_16.png | Bin 0 -> 520 bytes .../AppIcon.appiconset/app_icon_256.png | Bin 0 -> 14142 bytes .../AppIcon.appiconset/app_icon_32.png | Bin 0 -> 1066 bytes .../AppIcon.appiconset/app_icon_512.png | Bin 0 -> 36406 bytes .../AppIcon.appiconset/app_icon_64.png | Bin 0 -> 2218 bytes .../macos/Runner/Base.lproj/MainMenu.xib | 343 +++++++++ .../macos/Runner/Configs/AppInfo.xcconfig | 14 + .../macos/Runner/Configs/Debug.xcconfig | 2 + .../macos/Runner/Configs/Release.xcconfig | 2 + .../macos/Runner/Configs/Warnings.xcconfig | 13 + .../macos/Runner/DebugProfile.entitlements | 14 + .../macos/Runner/Info.plist | 32 + .../macos/Runner/MainFlutterWindow.swift | 15 + .../macos/Runner/Release.entitlements | 10 + .../macos/RunnerTests/RunnerTests.swift | 12 + pkgs/flutter_http_example/mono_pkg.yaml | 14 + pkgs/flutter_http_example/pubspec.yaml | 32 + .../test/widget_test.dart | 64 ++ pkgs/flutter_http_example/web/favicon.png | Bin 0 -> 917 bytes .../web/icons/Icon-192.png | Bin 0 -> 5292 bytes .../web/icons/Icon-512.png | Bin 0 -> 8252 bytes .../web/icons/Icon-maskable-192.png | Bin 0 -> 5594 bytes .../web/icons/Icon-maskable-512.png | Bin 0 -> 20998 bytes pkgs/flutter_http_example/web/index.html | 59 ++ pkgs/flutter_http_example/web/manifest.json | 35 + pkgs/flutter_http_example/windows/.gitignore | 17 + .../windows/CMakeLists.txt | 102 +++ .../windows/flutter/CMakeLists.txt | 104 +++ .../flutter/generated_plugin_registrant.cc | 11 + .../flutter/generated_plugin_registrant.h | 15 + .../windows/flutter/generated_plugins.cmake | 23 + .../windows/runner/CMakeLists.txt | 40 + .../windows/runner/Runner.rc | 121 +++ .../windows/runner/flutter_window.cpp | 71 ++ .../windows/runner/flutter_window.h | 33 + .../windows/runner/main.cpp | 43 ++ .../windows/runner/resource.h | 16 + .../windows/runner/resources/app_icon.ico | Bin 0 -> 33772 bytes .../windows/runner/runner.exe.manifest | 20 + .../windows/runner/utils.cpp | 65 ++ .../windows/runner/utils.h | 19 + .../windows/runner/win32_window.cpp | 288 ++++++++ .../windows/runner/win32_window.h | 102 +++ tool/ci.sh | 20 +- 138 files changed, 5061 insertions(+), 57 deletions(-) create mode 100644 pkgs/flutter_http_example/.gitignore create mode 100644 pkgs/flutter_http_example/.metadata create mode 100644 pkgs/flutter_http_example/README.md create mode 100644 pkgs/flutter_http_example/android/.gitignore create mode 100644 pkgs/flutter_http_example/android/app/build.gradle create mode 100644 pkgs/flutter_http_example/android/app/src/debug/AndroidManifest.xml create mode 100644 pkgs/flutter_http_example/android/app/src/main/AndroidManifest.xml create mode 100644 pkgs/flutter_http_example/android/app/src/main/kotlin/com/example/flutter_http_example/MainActivity.kt create mode 100644 pkgs/flutter_http_example/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 pkgs/flutter_http_example/android/app/src/main/res/drawable/launch_background.xml create mode 100644 pkgs/flutter_http_example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 pkgs/flutter_http_example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 pkgs/flutter_http_example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 pkgs/flutter_http_example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 pkgs/flutter_http_example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 pkgs/flutter_http_example/android/app/src/main/res/values-night/styles.xml create mode 100644 pkgs/flutter_http_example/android/app/src/main/res/values/styles.xml create mode 100644 pkgs/flutter_http_example/android/app/src/profile/AndroidManifest.xml create mode 100644 pkgs/flutter_http_example/android/build.gradle create mode 100644 pkgs/flutter_http_example/android/gradle.properties create mode 100644 pkgs/flutter_http_example/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 pkgs/flutter_http_example/android/settings.gradle create mode 100644 pkgs/flutter_http_example/ios/.gitignore create mode 100644 pkgs/flutter_http_example/ios/Flutter/AppFrameworkInfo.plist create mode 100644 pkgs/flutter_http_example/ios/Flutter/Debug.xcconfig create mode 100644 pkgs/flutter_http_example/ios/Flutter/Release.xcconfig create mode 100644 pkgs/flutter_http_example/ios/Runner.xcodeproj/project.pbxproj create mode 100644 pkgs/flutter_http_example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 pkgs/flutter_http_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 pkgs/flutter_http_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 pkgs/flutter_http_example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 pkgs/flutter_http_example/ios/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 pkgs/flutter_http_example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 pkgs/flutter_http_example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings create mode 100644 pkgs/flutter_http_example/ios/Runner/AppDelegate.swift create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png create mode 100644 pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md create mode 100644 pkgs/flutter_http_example/ios/Runner/Base.lproj/LaunchScreen.storyboard create mode 100644 pkgs/flutter_http_example/ios/Runner/Base.lproj/Main.storyboard create mode 100644 pkgs/flutter_http_example/ios/Runner/Info.plist create mode 100644 pkgs/flutter_http_example/ios/Runner/Runner-Bridging-Header.h create mode 100644 pkgs/flutter_http_example/ios/RunnerTests/RunnerTests.swift create mode 100644 pkgs/flutter_http_example/lib/book.dart create mode 100644 pkgs/flutter_http_example/lib/http_client_factory.dart create mode 100644 pkgs/flutter_http_example/lib/http_client_factory_web.dart create mode 100644 pkgs/flutter_http_example/lib/main.dart create mode 100644 pkgs/flutter_http_example/linux/.gitignore create mode 100644 pkgs/flutter_http_example/linux/CMakeLists.txt create mode 100644 pkgs/flutter_http_example/linux/flutter/CMakeLists.txt create mode 100644 pkgs/flutter_http_example/linux/flutter/generated_plugin_registrant.cc create mode 100644 pkgs/flutter_http_example/linux/flutter/generated_plugin_registrant.h create mode 100644 pkgs/flutter_http_example/linux/flutter/generated_plugins.cmake create mode 100644 pkgs/flutter_http_example/linux/main.cc create mode 100644 pkgs/flutter_http_example/linux/my_application.cc create mode 100644 pkgs/flutter_http_example/linux/my_application.h create mode 100644 pkgs/flutter_http_example/macos/.gitignore create mode 100644 pkgs/flutter_http_example/macos/Flutter/Flutter-Debug.xcconfig create mode 100644 pkgs/flutter_http_example/macos/Flutter/Flutter-Release.xcconfig create mode 100644 pkgs/flutter_http_example/macos/Flutter/GeneratedPluginRegistrant.swift create mode 100644 pkgs/flutter_http_example/macos/Runner.xcodeproj/project.pbxproj create mode 100644 pkgs/flutter_http_example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 pkgs/flutter_http_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme create mode 100644 pkgs/flutter_http_example/macos/Runner.xcworkspace/contents.xcworkspacedata create mode 100644 pkgs/flutter_http_example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 pkgs/flutter_http_example/macos/Runner/AppDelegate.swift create mode 100644 pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png create mode 100644 pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png create mode 100644 pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png create mode 100644 pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png create mode 100644 pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png create mode 100644 pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png create mode 100644 pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png create mode 100644 pkgs/flutter_http_example/macos/Runner/Base.lproj/MainMenu.xib create mode 100644 pkgs/flutter_http_example/macos/Runner/Configs/AppInfo.xcconfig create mode 100644 pkgs/flutter_http_example/macos/Runner/Configs/Debug.xcconfig create mode 100644 pkgs/flutter_http_example/macos/Runner/Configs/Release.xcconfig create mode 100644 pkgs/flutter_http_example/macos/Runner/Configs/Warnings.xcconfig create mode 100644 pkgs/flutter_http_example/macos/Runner/DebugProfile.entitlements create mode 100644 pkgs/flutter_http_example/macos/Runner/Info.plist create mode 100644 pkgs/flutter_http_example/macos/Runner/MainFlutterWindow.swift create mode 100644 pkgs/flutter_http_example/macos/Runner/Release.entitlements create mode 100644 pkgs/flutter_http_example/macos/RunnerTests/RunnerTests.swift create mode 100644 pkgs/flutter_http_example/mono_pkg.yaml create mode 100644 pkgs/flutter_http_example/pubspec.yaml create mode 100644 pkgs/flutter_http_example/test/widget_test.dart create mode 100644 pkgs/flutter_http_example/web/favicon.png create mode 100644 pkgs/flutter_http_example/web/icons/Icon-192.png create mode 100644 pkgs/flutter_http_example/web/icons/Icon-512.png create mode 100644 pkgs/flutter_http_example/web/icons/Icon-maskable-192.png create mode 100644 pkgs/flutter_http_example/web/icons/Icon-maskable-512.png create mode 100644 pkgs/flutter_http_example/web/index.html create mode 100644 pkgs/flutter_http_example/web/manifest.json create mode 100644 pkgs/flutter_http_example/windows/.gitignore create mode 100644 pkgs/flutter_http_example/windows/CMakeLists.txt create mode 100644 pkgs/flutter_http_example/windows/flutter/CMakeLists.txt create mode 100644 pkgs/flutter_http_example/windows/flutter/generated_plugin_registrant.cc create mode 100644 pkgs/flutter_http_example/windows/flutter/generated_plugin_registrant.h create mode 100644 pkgs/flutter_http_example/windows/flutter/generated_plugins.cmake create mode 100644 pkgs/flutter_http_example/windows/runner/CMakeLists.txt create mode 100644 pkgs/flutter_http_example/windows/runner/Runner.rc create mode 100644 pkgs/flutter_http_example/windows/runner/flutter_window.cpp create mode 100644 pkgs/flutter_http_example/windows/runner/flutter_window.h create mode 100644 pkgs/flutter_http_example/windows/runner/main.cpp create mode 100644 pkgs/flutter_http_example/windows/runner/resource.h create mode 100644 pkgs/flutter_http_example/windows/runner/resources/app_icon.ico create mode 100644 pkgs/flutter_http_example/windows/runner/runner.exe.manifest create mode 100644 pkgs/flutter_http_example/windows/runner/utils.cpp create mode 100644 pkgs/flutter_http_example/windows/runner/utils.h create mode 100644 pkgs/flutter_http_example/windows/runner/win32_window.cpp create mode 100644 pkgs/flutter_http_example/windows/runner/win32_window.h diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index fc4da99ccd..35af1671df 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -40,14 +40,14 @@ jobs: - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyze_and_format; Dart 2.19.0; PKG: pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" + name: "analyze_and_format; linux; Dart 2.19.0; PKG: pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http_client_conformance_tests;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http_client_conformance_tests;commands:analyze_1" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http_client_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0 @@ -70,14 +70,14 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests job_003: - name: "analyze_and_format; Dart 3.0.0; PKGS: pkgs/http, pkgs/http_profile; `dart analyze --fatal-infos`" + name: "analyze_and_format; linux; Dart 3.0.0; PKGS: pkgs/http, pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile;commands:analyze_1" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 @@ -109,14 +109,14 @@ jobs: if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile job_004: - name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart analyze --fatal-infos`" + name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile;commands:analyze" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile;commands:analyze_1" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -157,7 +157,7 @@ jobs: if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile job_005: - name: "analyze_and_format; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart format --output=none --set-exit-if-changed .`" + name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -205,14 +205,74 @@ jobs: if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile job_006: - name: "unit_test; Dart 3.0.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" + name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:command" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:format" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example + os:ubuntu-latest;pub-cache-hosted;sdk:stable + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Flutter SDK + uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa + with: + channel: stable + - id: checkout + name: Checkout repository + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - id: pkgs_flutter_http_example_pub_upgrade + name: pkgs/flutter_http_example; flutter pub upgrade + run: flutter pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/flutter_http_example + - name: "pkgs/flutter_http_example; dart format --output=none --set-exit-if-changed ." + run: "dart format --output=none --set-exit-if-changed ." + if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/flutter_http_example + job_007: + name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter analyze --fatal-infos`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:analyze_0" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example + os:ubuntu-latest;pub-cache-hosted;sdk:stable + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Flutter SDK + uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa + with: + channel: stable + - id: checkout + name: Checkout repository + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - id: pkgs_flutter_http_example_pub_upgrade + name: pkgs/flutter_http_example; flutter pub upgrade + run: flutter pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/flutter_http_example + - name: "pkgs/flutter_http_example; flutter analyze --fatal-infos" + run: flutter analyze --fatal-infos + if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/flutter_http_example + job_008: + name: "unit_test; linux; Dart 3.0.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:command_1" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 @@ -240,15 +300,17 @@ jobs: - job_003 - job_004 - job_005 - job_007: - name: "unit_test; Dart 3.0.0; PKG: pkgs/http; `dart test --platform chrome`" + - job_006 + - job_007 + job_009: + name: "unit_test; linux; Dart 3.0.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:test_3" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 @@ -276,15 +338,17 @@ jobs: - job_003 - job_004 - job_005 - job_008: - name: "unit_test; Dart 3.0.0; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" + - job_006 + - job_007 + job_010: + name: "unit_test; linux; Dart 3.0.0; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile;commands:test_2" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 @@ -321,15 +385,17 @@ jobs: - job_003 - job_004 - job_005 - job_009: - name: "unit_test; Dart dev; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" + - job_006 + - job_007 + job_011: + name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:command" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:command_1" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -357,15 +423,17 @@ jobs: - job_003 - job_004 - job_005 - job_010: - name: "unit_test; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" + - job_006 + - job_007 + job_012: + name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_3" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -393,15 +461,17 @@ jobs: - job_003 - job_004 - job_005 - job_011: - name: "unit_test; Dart dev; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" + - job_006 + - job_007 + job_013: + name: "unit_test; linux; Dart dev; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_profile;commands:test_0" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_profile;commands:test_2" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:dev @@ -438,3 +508,147 @@ jobs: - job_003 - job_004 - job_005 + - job_006 + - job_007 + job_014: + name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test --platform chrome`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:test_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example + os:ubuntu-latest;pub-cache-hosted;sdk:stable + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Flutter SDK + uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa + with: + channel: stable + - id: checkout + name: Checkout repository + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - id: pkgs_flutter_http_example_pub_upgrade + name: pkgs/flutter_http_example; flutter pub upgrade + run: flutter pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/flutter_http_example + - name: "pkgs/flutter_http_example; flutter test --platform chrome" + run: flutter test --platform chrome + if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/flutter_http_example + needs: + - job_001 + - job_002 + - job_003 + - job_004 + - job_005 + - job_006 + - job_007 + job_015: + name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:command_0" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example + os:ubuntu-latest;pub-cache-hosted;sdk:stable + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Flutter SDK + uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa + with: + channel: stable + - id: checkout + name: Checkout repository + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - id: pkgs_flutter_http_example_pub_upgrade + name: pkgs/flutter_http_example; flutter pub upgrade + run: flutter pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/flutter_http_example + - name: pkgs/flutter_http_example; flutter test + run: flutter test + if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/flutter_http_example + needs: + - job_001 + - job_002 + - job_003 + - job_004 + - job_005 + - job_006 + - job_007 + job_016: + name: "unit_test; macos; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" + runs-on: macos-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + with: + path: "~/.pub-cache/hosted" + key: "os:macos-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:command_0" + restore-keys: | + os:macos-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example + os:macos-latest;pub-cache-hosted;sdk:stable + os:macos-latest;pub-cache-hosted + os:macos-latest + - name: Setup Flutter SDK + uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa + with: + channel: stable + - id: checkout + name: Checkout repository + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - id: pkgs_flutter_http_example_pub_upgrade + name: pkgs/flutter_http_example; flutter pub upgrade + run: flutter pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/flutter_http_example + - name: pkgs/flutter_http_example; flutter test + run: flutter test + if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/flutter_http_example + needs: + - job_001 + - job_002 + - job_003 + - job_004 + - job_005 + - job_006 + - job_007 + job_017: + name: "unit_test; windows; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" + runs-on: windows-latest + steps: + - name: Setup Flutter SDK + uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa + with: + channel: stable + - id: checkout + name: Checkout repository + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - id: pkgs_flutter_http_example_pub_upgrade + name: pkgs/flutter_http_example; flutter pub upgrade + run: flutter pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/flutter_http_example + - name: pkgs/flutter_http_example; flutter test + run: flutter test + if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/flutter_http_example + needs: + - job_001 + - job_002 + - job_003 + - job_004 + - job_005 + - job_006 + - job_007 diff --git a/README.md b/README.md index 5dd1036fe8..006404db61 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,4 @@ and the browser. | [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | A library that tests whether implementations of package:http's `Client` class behave as expected. | | | [cronet_http](pkgs/cronet_http/) | An Android Flutter plugin that provides access to the [Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) HTTP client. | [![pub package](https://img.shields.io/pub/v/cronet_http.svg)](https://pub.dev/packages/cronet_http) | | [cupertino_http](pkgs/cupertino_http/) | A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). | [![pub package](https://img.shields.io/pub/v/cupertino_http.svg)](https://pub.dev/packages/cupertino_http) | +| [flutter_http_example](pkgs/flutter_http_example/) | An Flutter app that demonstrates how to configure and use `package:http`. | — | diff --git a/pkgs/cronet_http/example/lib/book.dart b/pkgs/cronet_http/example/lib/book.dart index fe23ce7629..61a663b4d3 100644 --- a/pkgs/cronet_http/example/lib/book.dart +++ b/pkgs/cronet_http/example/lib/book.dart @@ -1,4 +1,4 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. @@ -12,20 +12,16 @@ class Book { static List listFromJson(Map json) { final books = []; - if (json['items'] is List) { - final items = (json['items'] as List).cast>(); - + if (json['items'] case final List items) { for (final item in items) { - if (item.containsKey('volumeInfo')) { - final volumeInfo = item['volumeInfo'] as Map; - if (volumeInfo['title'] is String && - volumeInfo['description'] is String && - volumeInfo['imageLinks'] is Map && - (volumeInfo['imageLinks'] as Map)['smallThumbnail'] is String) { - books.add(Book( - volumeInfo['title'] as String, - volumeInfo['description'] as String, - (volumeInfo['imageLinks'] as Map)['smallThumbnail'] as String)); + if (item case {'volumeInfo': final Map volumeInfo}) { + if (volumeInfo + case { + 'title': final String title, + 'description': final String description, + 'imageLinks': {'smallThumbnail': final String thumbnail} + }) { + books.add(Book(title, description, thumbnail)); } } } diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index f3d17ea3d4..61f11a7b01 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -43,6 +43,7 @@ class HomePage extends StatefulWidget { class _HomePageState extends State { List? _books; + String? _lastQuery; @override void initState() { @@ -65,6 +66,7 @@ class _HomePageState extends State { } void _runSearch(String query) async { + _lastQuery = query; if (query.isEmpty) { setState(() { _books = null; @@ -73,6 +75,9 @@ class _HomePageState extends State { } final books = await _findMatchingBooks(query); + // Avoid the situation where a slow-running query finishes late and + // replaces newer search results. + if (query != _lastQuery) return; setState(() { _books = books; }); @@ -127,7 +132,8 @@ class _BookListState extends State { leading: CachedNetworkImage( placeholder: (context, url) => const CircularProgressIndicator(), - imageUrl: widget.books[index].imageUrl), + imageUrl: + widget.books[index].imageUrl.replaceFirst('http', 'https')), title: Text(widget.books[index].title), subtitle: Text(widget.books[index].description), ), diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index b38ebb043b..568cef98df 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -4,7 +4,7 @@ description: Demonstrates how to use the cronet_http plugin. publish_to: 'none' environment: - sdk: ">=2.19.0 <3.0.0" + sdk: "^3.0.0" dependencies: cached_network_image: ^3.2.3 diff --git a/pkgs/cupertino_http/example/lib/book.dart b/pkgs/cupertino_http/example/lib/book.dart index fe23ce7629..f2a27fc460 100644 --- a/pkgs/cupertino_http/example/lib/book.dart +++ b/pkgs/cupertino_http/example/lib/book.dart @@ -12,20 +12,16 @@ class Book { static List listFromJson(Map json) { final books = []; - if (json['items'] is List) { - final items = (json['items'] as List).cast>(); - + if (json['items'] case final List items) { for (final item in items) { - if (item.containsKey('volumeInfo')) { - final volumeInfo = item['volumeInfo'] as Map; - if (volumeInfo['title'] is String && - volumeInfo['description'] is String && - volumeInfo['imageLinks'] is Map && - (volumeInfo['imageLinks'] as Map)['smallThumbnail'] is String) { - books.add(Book( - volumeInfo['title'] as String, - volumeInfo['description'] as String, - (volumeInfo['imageLinks'] as Map)['smallThumbnail'] as String)); + if (item case {'volumeInfo': final Map volumeInfo}) { + if (volumeInfo + case { + 'title': final String title, + 'description': final String description, + 'imageLinks': {'smallThumbnail': final String thumbnail} + }) { + books.add(Book(title, description, thumbnail)); } } } diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index 87c3940c98..edfceac92e 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -41,6 +41,7 @@ class HomePage extends StatefulWidget { class _HomePageState extends State { List? _books; + String? _lastQuery; @override void initState() { @@ -63,6 +64,7 @@ class _HomePageState extends State { } void _runSearch(String query) async { + _lastQuery = query; if (query.isEmpty) { setState(() { _books = null; @@ -71,6 +73,9 @@ class _HomePageState extends State { } final books = await _findMatchingBooks(query); + // Avoid the situation where a slow-running query finishes late and + // replaces newer search results. + if (query != _lastQuery) return; setState(() { _books = books; }); diff --git a/pkgs/flutter_http_example/.gitignore b/pkgs/flutter_http_example/.gitignore new file mode 100644 index 0000000000..24476c5d1e --- /dev/null +++ b/pkgs/flutter_http_example/.gitignore @@ -0,0 +1,44 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/pkgs/flutter_http_example/.metadata b/pkgs/flutter_http_example/.metadata new file mode 100644 index 0000000000..b41277dd87 --- /dev/null +++ b/pkgs/flutter_http_example/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "367f9ea16bfae1ca451b9cc27c1366870b187ae2" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + - platform: android + create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + - platform: ios + create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + - platform: linux + create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + - platform: macos + create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + - platform: web + create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + - platform: windows + create_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + base_revision: 367f9ea16bfae1ca451b9cc27c1366870b187ae2 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/pkgs/flutter_http_example/README.md b/pkgs/flutter_http_example/README.md new file mode 100644 index 0000000000..2c6cdfd025 --- /dev/null +++ b/pkgs/flutter_http_example/README.md @@ -0,0 +1,43 @@ +# flutter_http_example + +A Flutter sample app that illustrates how to configure and use +[`package:http`](https://pub.dev/packages/http). + +## Goals for this sample + +* Provide you with example code for using `package:http` in Flutter, + including: + + * configuration for multiple platforms. + * using `runWithClient` and `package:provider` to pass `Client`s through + an application. + * writing tests using `MockClient`. + +## The important bits + +### `http_client_factory.dart` + +This library used to create `package:http` `Client`s when the app is run inside +the Dart virtual machine, meaning all platforms except the web browser. + +### `http_client_factory_web.dart` + +This library used to create `package:http` `Client`s when the app is run inside +a web browser. + +Web configuration must be done in a seperate library because Dart code cannot +import `dart:ffi` or `dart:io` when run in a web browser. + +### `main.dart` + +This library demonstrates how to: + +* import `http_client_factory.dart` or `http_client_factory_web.dart`, + depending on whether we are targeting the web browser or not. +* share a `package:http` `Client` by using `runWithClient` and + `package:provider`. +* call `package:http` functions. + +### `widget_test.dart` + +This library demonstrates how to construct tests using `MockClient`. diff --git a/pkgs/flutter_http_example/android/.gitignore b/pkgs/flutter_http_example/android/.gitignore new file mode 100644 index 0000000000..6f568019d3 --- /dev/null +++ b/pkgs/flutter_http_example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/pkgs/flutter_http_example/android/app/build.gradle b/pkgs/flutter_http_example/android/app/build.gradle new file mode 100644 index 0000000000..1c15e4c768 --- /dev/null +++ b/pkgs/flutter_http_example/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "com.example.flutter_http_example" + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.flutter_http_example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/pkgs/flutter_http_example/android/app/src/debug/AndroidManifest.xml b/pkgs/flutter_http_example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000000..399f6981d5 --- /dev/null +++ b/pkgs/flutter_http_example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/pkgs/flutter_http_example/android/app/src/main/AndroidManifest.xml b/pkgs/flutter_http_example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..51f6e57536 --- /dev/null +++ b/pkgs/flutter_http_example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + diff --git a/pkgs/flutter_http_example/android/app/src/main/kotlin/com/example/flutter_http_example/MainActivity.kt b/pkgs/flutter_http_example/android/app/src/main/kotlin/com/example/flutter_http_example/MainActivity.kt new file mode 100644 index 0000000000..c8dbfa01f3 --- /dev/null +++ b/pkgs/flutter_http_example/android/app/src/main/kotlin/com/example/flutter_http_example/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.flutter_http_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/pkgs/flutter_http_example/android/app/src/main/res/drawable-v21/launch_background.xml b/pkgs/flutter_http_example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000000..f74085f3f6 --- /dev/null +++ b/pkgs/flutter_http_example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/pkgs/flutter_http_example/android/app/src/main/res/drawable/launch_background.xml b/pkgs/flutter_http_example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000000..304732f884 --- /dev/null +++ b/pkgs/flutter_http_example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/pkgs/flutter_http_example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/pkgs/flutter_http_example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/pkgs/flutter_http_example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/pkgs/flutter_http_example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/pkgs/flutter_http_example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/android/app/src/main/res/values-night/styles.xml b/pkgs/flutter_http_example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000000..06952be745 --- /dev/null +++ b/pkgs/flutter_http_example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/pkgs/flutter_http_example/android/app/src/main/res/values/styles.xml b/pkgs/flutter_http_example/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000..cb1ef88056 --- /dev/null +++ b/pkgs/flutter_http_example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/pkgs/flutter_http_example/android/app/src/profile/AndroidManifest.xml b/pkgs/flutter_http_example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000000..399f6981d5 --- /dev/null +++ b/pkgs/flutter_http_example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/pkgs/flutter_http_example/android/build.gradle b/pkgs/flutter_http_example/android/build.gradle new file mode 100644 index 0000000000..f7eb7f63ce --- /dev/null +++ b/pkgs/flutter_http_example/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.7.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.3.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/pkgs/flutter_http_example/android/gradle.properties b/pkgs/flutter_http_example/android/gradle.properties new file mode 100644 index 0000000000..94adc3a3f9 --- /dev/null +++ b/pkgs/flutter_http_example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/pkgs/flutter_http_example/android/gradle/wrapper/gradle-wrapper.properties b/pkgs/flutter_http_example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..3c472b99c6 --- /dev/null +++ b/pkgs/flutter_http_example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/pkgs/flutter_http_example/android/settings.gradle b/pkgs/flutter_http_example/android/settings.gradle new file mode 100644 index 0000000000..55c4ca8b10 --- /dev/null +++ b/pkgs/flutter_http_example/android/settings.gradle @@ -0,0 +1,20 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + plugins { + id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false + } +} + +include ":app" + +apply from: "${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/pkgs/flutter_http_example/ios/.gitignore b/pkgs/flutter_http_example/ios/.gitignore new file mode 100644 index 0000000000..7a7f9873ad --- /dev/null +++ b/pkgs/flutter_http_example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/pkgs/flutter_http_example/ios/Flutter/AppFrameworkInfo.plist b/pkgs/flutter_http_example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000000..9625e105df --- /dev/null +++ b/pkgs/flutter_http_example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 11.0 + + diff --git a/pkgs/flutter_http_example/ios/Flutter/Debug.xcconfig b/pkgs/flutter_http_example/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/pkgs/flutter_http_example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/pkgs/flutter_http_example/ios/Flutter/Release.xcconfig b/pkgs/flutter_http_example/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000000..592ceee85b --- /dev/null +++ b/pkgs/flutter_http_example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.pbxproj b/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..96ff3b4c1d --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,614 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807E294A63A400263BE5 /* Frameworks */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpExample; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/pkgs/flutter_http_example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/pkgs/flutter_http_example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..87131a09be --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/flutter_http_example/ios/Runner.xcworkspace/contents.xcworkspacedata b/pkgs/flutter_http_example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/pkgs/flutter_http_example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/pkgs/flutter_http_example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/pkgs/flutter_http_example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/pkgs/flutter_http_example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/pkgs/flutter_http_example/ios/Runner/AppDelegate.swift b/pkgs/flutter_http_example/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000000..70693e4a8c --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..d36b1fab2d --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..dc9ada4725e9b0ddb1deab583e5b5102493aa332 GIT binary patch literal 10932 zcmeHN2~<R zh`|8`A_PQ1nSu(UMFx?8j8PC!!VDphaL#`F42fd#7Vlc`zIE4n%Y~eiz4y1j|NDpi z?<@|pSJ-HM`qifhf@m%MamgwK83`XpBA<+azdF#2QsT{X@z0A9Bq>~TVErigKH1~P zRX-!h-f0NJ4Mh++{D}J+K>~~rq}d%o%+4dogzXp7RxX4C>Km5XEI|PAFDmo;DFm6G zzjVoB`@qW98Yl0Kvc-9w09^PrsobmG*Eju^=3f?0o-t$U)TL1B3;sZ^!++3&bGZ!o-*6w?;oOhf z=A+Qb$scV5!RbG+&2S}BQ6YH!FKb0``VVX~T$dzzeSZ$&9=X$3)_7Z{SspSYJ!lGE z7yig_41zpQ)%5dr4ff0rh$@ky3-JLRk&DK)NEIHecf9c*?Z1bUB4%pZjQ7hD!A0r-@NF(^WKdr(LXj|=UE7?gBYGgGQV zidf2`ZT@pzXf7}!NH4q(0IMcxsUGDih(0{kRSez&z?CFA0RVXsVFw3^u=^KMtt95q z43q$b*6#uQDLoiCAF_{RFc{!H^moH_cmll#Fc^KXi{9GDl{>%+3qyfOE5;Zq|6#Hb zp^#1G+z^AXfRKaa9HK;%b3Ux~U@q?xg<2DXP%6k!3E)PA<#4$ui8eDy5|9hA5&{?v z(-;*1%(1~-NTQ`Is1_MGdQ{+i*ccd96ab$R$T3=% zw_KuNF@vI!A>>Y_2pl9L{9h1-C6H8<)J4gKI6{WzGBi<@u3P6hNsXG=bRq5c+z;Gc3VUCe;LIIFDmQAGy+=mRyF++u=drBWV8-^>0yE9N&*05XHZpPlE zxu@?8(ZNy7rm?|<+UNe0Vs6&o?l`Pt>P&WaL~M&#Eh%`rg@Mbb)J&@DA-wheQ>hRV z<(XhigZAT z>=M;URcdCaiO3d^?H<^EiEMDV+7HsTiOhoaMX%P65E<(5xMPJKxf!0u>U~uVqnPN7T!X!o@_gs3Ct1 zlZ_$5QXP4{Aj645wG_SNT&6m|O6~Tsl$q?nK*)(`{J4b=(yb^nOATtF1_aS978$x3 zx>Q@s4i3~IT*+l{@dx~Hst21fR*+5}S1@cf>&8*uLw-0^zK(+OpW?cS-YG1QBZ5q! zgTAgivzoF#`cSz&HL>Ti!!v#?36I1*l^mkrx7Y|K6L#n!-~5=d3;K<;Zqi|gpNUn_ z_^GaQDEQ*jfzh;`j&KXb66fWEk1K7vxQIMQ_#Wu_%3 z4Oeb7FJ`8I>Px;^S?)}2+4D_83gHEq>8qSQY0PVP?o)zAv3K~;R$fnwTmI-=ZLK`= zTm+0h*e+Yfr(IlH3i7gUclNH^!MU>id$Jw>O?2i0Cila#v|twub21@e{S2v}8Z13( zNDrTXZVgris|qYm<0NU(tAPouG!QF4ZNpZPkX~{tVf8xY690JqY1NVdiTtW+NqyRP zZ&;T0ikb8V{wxmFhlLTQ&?OP7 z;(z*<+?J2~z*6asSe7h`$8~Se(@t(#%?BGLVs$p``;CyvcT?7Y!{tIPva$LxCQ&4W z6v#F*);|RXvI%qnoOY&i4S*EL&h%hP3O zLsrFZhv&Hu5tF$Lx!8(hs&?!Kx5&L(fdu}UI5d*wn~A`nPUhG&Rv z2#ixiJdhSF-K2tpVL=)5UkXRuPAFrEW}7mW=uAmtVQ&pGE-&az6@#-(Te^n*lrH^m@X-ftVcwO_#7{WI)5v(?>uC9GG{lcGXYJ~Q8q zbMFl7;t+kV;|;KkBW2!P_o%Czhw&Q(nXlxK9ak&6r5t_KH8#1Mr-*0}2h8R9XNkr zto5-b7P_auqTJb(TJlmJ9xreA=6d=d)CVbYP-r4$hDn5|TIhB>SReMfh&OVLkMk-T zYf%$taLF0OqYF?V{+6Xkn>iX@TuqQ?&cN6UjC9YF&%q{Ut3zv{U2)~$>-3;Dp)*(? zg*$mu8^i=-e#acaj*T$pNowo{xiGEk$%DusaQiS!KjJH96XZ-hXv+jk%ard#fu=@Q z$AM)YWvE^{%tDfK%nD49=PI|wYu}lYVbB#a7wtN^Nml@CE@{Gv7+jo{_V?I*jkdLD zJE|jfdrmVbkfS>rN*+`#l%ZUi5_bMS<>=MBDNlpiSb_tAF|Zy`K7kcp@|d?yaTmB^ zo?(vg;B$vxS|SszusORgDg-*Uitzdi{dUV+glA~R8V(?`3GZIl^egW{a919!j#>f` znL1o_^-b`}xnU0+~KIFLQ)$Q6#ym%)(GYC`^XM*{g zv3AM5$+TtDRs%`2TyR^$(hqE7Y1b&`Jd6dS6B#hDVbJlUXcG3y*439D8MrK!2D~6gn>UD4Imctb z+IvAt0iaW73Iq$K?4}H`7wq6YkTMm`tcktXgK0lKPmh=>h+l}Y+pDtvHnG>uqBA)l zAH6BV4F}v$(o$8Gfo*PB>IuaY1*^*`OTx4|hM8jZ?B6HY;F6p4{`OcZZ(us-RVwDx zUzJrCQlp@mz1ZFiSZ*$yX3c_#h9J;yBE$2g%xjmGF4ca z&yL`nGVs!Zxsh^j6i%$a*I3ZD2SoNT`{D%mU=LKaEwbN(_J5%i-6Va?@*>=3(dQy` zOv%$_9lcy9+(t>qohkuU4r_P=R^6ME+wFu&LA9tw9RA?azGhjrVJKy&8=*qZT5Dr8g--d+S8zAyJ$1HlW3Olryt`yE zFIph~Z6oF&o64rw{>lgZISC6p^CBer9C5G6yq%?8tC+)7*d+ib^?fU!JRFxynRLEZ zj;?PwtS}Ao#9whV@KEmwQgM0TVP{hs>dg(1*DiMUOKHdQGIqa0`yZnHk9mtbPfoLx zo;^V6pKUJ!5#n`w2D&381#5#_t}AlTGEgDz$^;u;-vxDN?^#5!zN9ngytY@oTv!nc zp1Xn8uR$1Z;7vY`-<*?DfPHB;x|GUi_fI9@I9SVRv1)qETbNU_8{5U|(>Du84qP#7 z*l9Y$SgA&wGbj>R1YeT9vYjZuC@|{rajTL0f%N@>3$DFU=`lSPl=Iv;EjuGjBa$Gw zHD-;%YOE@<-!7-Mn`0WuO3oWuL6tB2cpPw~Nvuj|KM@))ixuDK`9;jGMe2d)7gHin zS<>k@!x;!TJEc#HdL#RF(`|4W+H88d4V%zlh(7#{q2d0OQX9*FW^`^_<3r$kabWAB z$9BONo5}*(%kx zOXi-yM_cmB3>inPpI~)duvZykJ@^^aWzQ=eQ&STUa}2uT@lV&WoRzkUoE`rR0)`=l zFT%f|LA9fCw>`enm$p7W^E@U7RNBtsh{_-7vVz3DtB*y#*~(L9+x9*wn8VjWw|Q~q zKFsj1Yl>;}%MG3=PY`$g$_mnyhuV&~O~u~)968$0b2!Jkd;2MtAP#ZDYw9hmK_+M$ zb3pxyYC&|CuAbtiG8HZjj?MZJBFbt`ryf+c1dXFuC z0*ZQhBzNBd*}s6K_G}(|Z_9NDV162#y%WSNe|FTDDhx)K!c(mMJh@h87@8(^YdK$&d*^WQe8Z53 z(|@MRJ$Lk-&ii74MPIs80WsOFZ(NX23oR-?As+*aq6b?~62@fSVmM-_*cb1RzZ)`5$agEiL`-E9s7{GM2?(KNPgK1(+c*|-FKoy}X(D_b#etO|YR z(BGZ)0Ntfv-7R4GHoXp?l5g#*={S1{u-QzxCGng*oWr~@X-5f~RA14b8~B+pLKvr4 zfgL|7I>jlak9>D4=(i(cqYf7#318!OSR=^`xxvI!bBlS??`xxWeg?+|>MxaIdH1U~#1tHu zB{QMR?EGRmQ_l4p6YXJ{o(hh-7Tdm>TAX380TZZZyVkqHNzjUn*_|cb?T? zt;d2s-?B#Mc>T-gvBmQZx(y_cfkXZO~{N zT6rP7SD6g~n9QJ)8F*8uHxTLCAZ{l1Y&?6v)BOJZ)=R-pY=Y=&1}jE7fQ>USS}xP#exo57uND0i*rEk@$;nLvRB@u~s^dwRf?G?_enN@$t* zbL%JO=rV(3Ju8#GqUpeE3l_Wu1lN9Y{D4uaUe`g>zlj$1ER$6S6@{m1!~V|bYkhZA z%CvrDRTkHuajMU8;&RZ&itnC~iYLW4DVkP<$}>#&(`UO>!n)Po;Mt(SY8Yb`AS9lt znbX^i?Oe9r_o=?})IHKHoQGKXsps_SE{hwrg?6dMI|^+$CeC&z@*LuF+P`7LfZ*yr+KN8B4{Nzv<`A(wyR@!|gw{zB6Ha ziwPAYh)oJ(nlqSknu(8g9N&1hu0$vFK$W#mp%>X~AU1ay+EKWcFdif{% z#4!4aoVVJ;ULmkQf!ke2}3hqxLK>eq|-d7Ly7-J9zMpT`?dxo6HdfJA|t)?qPEVBDv z{y_b?4^|YA4%WW0VZd8C(ZgQzRI5(I^)=Ub`Y#MHc@nv0w-DaJAqsbEHDWG8Ia6ju zo-iyr*sq((gEwCC&^TYBWt4_@|81?=B-?#P6NMff(*^re zYqvDuO`K@`mjm_Jd;mW_tP`3$cS?R$jR1ZN09$YO%_iBqh5ftzSpMQQtxKFU=FYmP zeY^jph+g<4>YO;U^O>-NFLn~-RqlHvnZl2yd2A{Yc1G@Ga$d+Q&(f^tnPf+Z7serIU};17+2DU_f4Z z@GaPFut27d?!YiD+QP@)T=77cR9~MK@bd~pY%X(h%L={{OIb8IQmf-!xmZkm8A0Ga zQSWONI17_ru5wpHg3jI@i9D+_Y|pCqVuHJNdHUauTD=R$JcD2K_liQisqG$(sm=k9;L* z!L?*4B~ql7uioSX$zWJ?;q-SWXRFhz2Jt4%fOHA=Bwf|RzhwqdXGr78y$J)LR7&3T zE1WWz*>GPWKZ0%|@%6=fyx)5rzUpI;bCj>3RKzNG_1w$fIFCZ&UR0(7S?g}`&Pg$M zf`SLsz8wK82Vyj7;RyKmY{a8G{2BHG%w!^T|Njr!h9TO2LaP^_f22Q1=l$QiU84ao zHe_#{S6;qrC6w~7{y(hs-?-j?lbOfgH^E=XcSgnwW*eEz{_Z<_xN#0001NP)t-s|Ns9~ z#rXRE|M&d=0au&!`~QyF`q}dRnBDt}*!qXo`c{v z{Djr|@Adh0(D_%#_&mM$D6{kE_x{oE{l@J5@%H*?%=t~i_`ufYOPkAEn!pfkr2$fs z652Tz0001XNklqeeKN4RM4i{jKqmiC$?+xN>3Apn^ z0QfuZLym_5b<*QdmkHjHlj811{If)dl(Z2K0A+ekGtrFJb?g|wt#k#pV-#A~bK=OT ts8>{%cPtyC${m|1#B1A6#u!Q;umknL1chzTM$P~L002ovPDHLkV1lTfnu!1a literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..797d452e458972bab9d994556c8305db4c827017 GIT binary patch literal 406 zcmV;H0crk;P))>cdjpWt&rLJgVp-t?DREyuq1A%0Z4)6_WsQ7{nzjN zo!X zGXV)2i3kcZIL~_j>uIKPK_zib+3T+Nt3Mb&Br)s)UIaA}@p{wDda>7=Q|mGRp7pqY zkJ!7E{MNz$9nOwoVqpFb)}$IP24Wn2JJ=Cw(!`OXJBr45rP>>AQr$6c7slJWvbpNW z@KTwna6d?PP>hvXCcp=4F;=GR@R4E7{4VU^0p4F>v^#A|>07*qoM6N<$f*5nx ACIA2c literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..6ed2d933e1120817fe9182483a228007b18ab6ae GIT binary patch literal 450 zcmV;z0X_bSP)iGWQ_5NJQ_~rNh*z)}eT%KUb z`7gNk0#AwF^#0T0?hIa^`~Ck;!}#m+_uT050aTR(J!bU#|IzRL%^UsMS#KsYnTF*!YeDOytlP4VhV?b} z%rz_<=#CPc)tU1MZTq~*2=8~iZ!lSa<{9b@2Jl;?IEV8)=fG217*|@)CCYgFze-x? zIFODUIA>nWKpE+bn~n7;-89sa>#DR>TSlqWk*!2hSN6D~Qb#VqbP~4Fk&m`@1$JGr zXPIdeRE&b2Thd#{MtDK$px*d3-Wx``>!oimf%|A-&-q*6KAH)e$3|6JV%HX{Hig)k suLT-RhftRq8b9;(V=235Wa|I=027H2wCDra;{X5v07*qoM6N<$f;9x^2LJ#7 literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..4cd7b0099ca80c806f8fe495613e8d6c69460d76 GIT binary patch literal 282 zcmV+#0p(^bcu7P-R4C8Q z&e;xxFbF_Vrezo%_kH*OKhshZ6BFpG-Y1e10`QXJKbND7AMQ&cMj60B5TNObaZxYybcN07*qoM6N<$g3m;S%K!iX literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..fe730945a01f64a61e2235dbe3f45b08f7729182 GIT binary patch literal 462 zcmV;<0WtoGP)-}iV`2<;=$?g5M=KQbZ{F&YRNy7Nn@%_*5{gvDM0aKI4?ESmw z{NnZg)A0R`+4?NF_RZexyVB&^^ZvN!{I28tr{Vje;QNTz`dG&Jz0~Ek&f2;*Z7>B|cg}xYpxEFY+0YrKLF;^Q+-HreN0P{&i zK~zY`?b7ECf-n?@;d<&orQ*Q7KoR%4|C>{W^h6@&01>0SKS`dn{Q}GT%Qj_{PLZ_& zs`MFI#j-(>?bvdZ!8^xTwlY{qA)T4QLbY@j(!YJ7aXJervHy6HaG_2SB`6CC{He}f zHVw(fJWApwPq!6VY7r1w-Fs)@ox~N+q|w~e;JI~C4Vf^@d>Wvj=fl`^u9x9wd9 zR%3*Q+)t%S!MU_`id^@&Y{y7-r98lZX0?YrHlfmwb?#}^1b{8g&KzmkE(L>Z&)179 zp<)v6Y}pRl100G2FL_t(o!|l{-Q-VMg#&MKg7c{O0 z2wJImOS3Gy*Z2Qifdv~JYOp;v+U)a|nLoc7hNH;I$;lzDt$}rkaFw1mYK5_0Q(Sut zvbEloxON7$+HSOgC9Z8ltuC&0OSF!-mXv5caV>#bc3@hBPX@I$58-z}(ZZE!t-aOG zpjNkbau@>yEzH(5Yj4kZiMH32XI!4~gVXNnjAvRx;Sdg^`>2DpUEwoMhTs_st8pKG z(%SHyHdU&v%f36~uERh!bd`!T2dw;z6PrOTQ7Vt*#9F2uHlUVnb#ev_o^fh}Dzmq} zWtlk35}k=?xj28uO|5>>$yXadTUE@@IPpgH`gJ~Ro4>jd1IF|(+IX>8M4Ps{PNvmI zNj4D+XgN83gPt_Gm}`Ybv{;+&yu-C(Grdiahmo~BjG-l&mWM+{e5M1sm&=xduwgM9 z`8OEh`=F3r`^E{n_;%9weN{cf2%7=VzC@cYj+lg>+3|D|_1C@{hcU(DyQG_BvBWe? zvTv``=%b1zrol#=R`JB)>cdjpWt&rLJgVp-t?DREyuq1A%0Z4)6_WsQ7{nzjN zo!X zGXV)2i3kcZIL~_j>uIKPK_zib+3T+Nt3Mb&Br)s)UIaA}@p{wDda>7=Q|mGRp7pqY zkJ!7E{MNz$9nOwoVqpFb)}$IP24Wn2JJ=Cw(!`OXJBr45rP>>AQr$6c7slJWvbpNW z@KTwna6d?PP>hvXCcp=4F;=GR@R4E7{4VU^0p4F>v^#A|>07*qoM6N<$f*5nx ACIA2c literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..502f463a9bc882b461c96aadf492d1729e49e725 GIT binary patch literal 586 zcmV-Q0=4~#P)+}#`wDE{8-2Mebf5<{{PqV{TgVcv*r8?UZ3{-|G?_}T*&y;@cqf{ z{Q*~+qr%%p!1pS*_Uicl#q9lc(D`!D`LN62sNwq{oYw(Wmhk)k<@f$!$@ng~_5)Ru z0Z)trIA5^j{DIW^c+vT2%lW+2<(RtE2wR;4O@)Tm`Xr*?A(qYoM}7i5Yxw>D(&6ou zxz!_Xr~yNF+waPe00049Nkl*;a!v6h%{rlvIH#gW3s8p;bFr=l}mRqpW2h zw=OA%hdyL~z+UHOzl0eKhEr$YYOL-c-%Y<)=j?(bzDweB7{b+%_ypvm_cG{SvM=DK zhv{K@m>#Bw>2W$eUI#iU)Wdgs8Y3U+A$Gd&{+j)d)BmGKx+43U_!tik_YlN)>$7G! zhkE!s;%oku3;IwG3U^2kw?z+HM)jB{@zFhK8P#KMSytSthr+4!c(5c%+^UBn`0X*2 zy3(k600_CSZj?O$Qu%&$;|TGUJrptR(HzyIx>5E(2r{eA(<6t3e3I0B)7d6s7?Z5J zZ!rtKvA{MiEBm&KFtoifx>5P^Z=vl)95XJn()aS5%ad(s?4-=Tkis9IGu{`Fy8r+H07*qoM6N<$f20Z)wqMt%V?S?~D#06};F zA3KcL`Wb+>5ObvgQIG&ig8(;V04hz?@cqy3{mSh8o!|U|)cI!1_+!fWH@o*8vh^CU z^ws0;(c$gI+2~q^tO#GDHf@=;DncUw00J^eL_t(&-tE|HQ`%4vfZ;WsBqu-$0nu1R zq^Vj;p$clf^?twn|KHO+IGt^q#a3X?w9dXC@*yxhv&l}F322(8Y1&=P&I}~G@#h6; z1CV9ecD9ZEe87{{NtI*)_aJ<`kJa z?5=RBtFF50s;jQLFil-`)m2wrb=6h(&brpj%nG_U&ut~$?8Rokzxi8zJoWr#2dto5 zOX_URcc<1`Iky+jc;A%Vzx}1QU{2$|cKPom2Vf1{8m`vja4{F>HS?^Nc^rp}xo+Nh zxd}eOm`fm3@MQC1< zIk&aCjb~Yh%5+Yq0`)D;q{#-Uqlv*o+Oor zE!I71Z@ASH3grl8&P^L0WpavHoP|UX4e?!igT`4?AZk$hu*@%6WJ;zDOGlw7kj@ zY5!B-0ft0f?Lgb>C;$Ke07*qoM6N<$f~t1N9smFU literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0ec303439225b78712f49115768196d8d76f6790 GIT binary patch literal 862 zcmV-k1EKthP)20Z)wqMt%V?S?~D#06};F zA3KcL`Wb+>5ObvgQIG&ig8(;V04hz?@cqy3{mSh8o!|U|)cI!1_+!fWH@o*8vh^CU z^ws0;(c$gI+2~q^tO#GDHf@=;DncUw00J^eL_t(&-tE|HQ`%4vfZ;WsBqu-$0nu1R zq^Vj;p$clf^?twn|KHO+IGt^q#a3X?w9dXC@*yxhv&l}F322(8Y1&=P&I}~G@#h6; z1CV9ecD9ZEe87{{NtI*)_aJ<`kJa z?5=RBtFF50s;jQLFil-`)m2wrb=6h(&brpj%nG_U&ut~$?8Rokzxi8zJoWr#2dto5 zOX_URcc<1`Iky+jc;A%Vzx}1QU{2$|cKPom2Vf1{8m`vja4{F>HS?^Nc^rp}xo+Nh zxd}eOm`fm3@MQC1< zIk&aCjb~Yh%5+Yq0`)D;q{#-Uqlv*o+Oor zE!I71Z@ASH3grl8&P^L0WpavHoP|UX4e?!igT`4?AZk$hu*@%6WJ;zDOGlw7kj@ zY5!B-0ft0f?Lgb>C;$Ke07*qoM6N<$f~t1N9smFU literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..e9f5fea27c705180eb716271f41b582e76dcbd90 GIT binary patch literal 1674 zcmV;526g#~P){YQnis^a@{&-nmRmq)<&%Mztj67_#M}W?l>kYSliK<%xAp;0j{!}J0!o7b zE>q9${Lb$D&h7k=+4=!ek^n+`0zq>LL1O?lVyea53S5x`Nqqo2YyeuIrQrJj9XjOp z{;T5qbj3}&1vg1VK~#9!?b~^C5-}JC@Pyrv-6dSEqJqT}#j9#dJ@GzT@B8}x zU&J@bBI>f6w6en+CeI)3^kC*U?}X%OD8$Fd$H&LV$H&LV$H&LV#|K5~mLYf|VqzOc zkc7qL~0sOYuM{tG`rYEDV{DWY`Z8&)kW*hc2VkBuY+^Yx&92j&StN}Wp=LD zxoGxXw6f&8sB^u})h@b@z0RBeD`K7RMR9deyL(ZJu#39Z>rT)^>v}Khq8U-IbIvT> z?4pV9qGj=2)TNH3d)=De<+^w;>S7m_eFKTvzeaBeir45xY!^m!FmxnljbSS_3o=g( z->^wC9%qkR{kbGnW8MfFew_o9h3(r55Is`L$8KI@d+*%{=Nx+FXJ98L0PjFIu;rGnnfY zn1R5Qnp<{Jq0M1vX=X&F8gtLmcWv$1*M@4ZfF^9``()#hGTeKeP`1!iED ztNE(TN}M5}3Bbc*d=FIv`DNv&@|C6yYj{sSqUj5oo$#*0$7pu|Dd2TLI>t5%I zIa4Dvr(iayb+5x=j*Vum9&irk)xV1`t509lnPO0%skL8_1c#Xbamh(2@f?4yUI zhhuT5<#8RJhGz4%b$`PJwKPAudsm|at?u;*hGgnA zU1;9gnxVBC)wA(BsB`AW54N{|qmikJR*%x0c`{LGsSfa|NK61pYH(r-UQ4_JXd!Rsz)=k zL{GMc5{h138)fF5CzHEDM>+FqY)$pdN3}Ml+riTgJOLN0F*Vh?{9ESR{SVVg>*>=# zix;VJHPtvFFCRY$Ks*F;VX~%*r9F)W`PmPE9F!(&s#x07n2<}?S{(ygpXgX-&B&OM zONY&BRQ(#%0%jeQs?oJ4P!p*R98>qCy5p8w>_gpuh39NcOlp)(wOoz0sY-Qz55eB~ z7OC-fKBaD1sE3$l-6QgBJO!n?QOTza`!S_YK z_v-lm^7{VO^8Q@M_^8F)09Ki6%=s?2_5eupee(w1FB%aqSweusQ-T+CH0Xt{` zFjMvW{@C&TB)k25()nh~_yJ9coBRL(0oO@HK~z}7?bm5j;y@69;bvlHb2tf!$ReA~x{22wTq550 z?f?Hnw(;m3ip30;QzdV~7pi!wyMYhDtXW#cO7T>|f=bdFhu+F!zMZ2UFj;GUKX7tI z;hv3{q~!*pMj75WP_c}>6)IWvg5_yyg<9Op()eD1hWC19M@?_9_MHec{Z8n3FaF{8 z;u`Mw0ly(uE>*CgQYv{be6ab2LWhlaH1^iLIM{olnag$78^Fd}%dR7;JECQ+hmk|o z!u2&!3MqPfP5ChDSkFSH8F2WVOEf0(E_M(JL17G}Y+fg0_IuW%WQ zG(mG&u?|->YSdk0;8rc{yw2@2Z&GA}z{Wb91Ooz9VhA{b2DYE7RmG zjL}?eq#iX%3#k;JWMx_{^2nNax`xPhByFiDX+a7uTGU|otOvIAUy|dEKkXOm-`aWS z27pUzD{a)Ct<6p{{3)+lq@i`t@%>-wT4r?*S}k)58e09WZYP0{{R3FC5Sl00039P)t-s|Ns9~ z#rP?<_5oL$Q^olD{r_0T`27C={r>*`|Nj71npVa5OTzc(_WfbW_({R{p56NV{r*M2 z_xt?)2V0#0NsfV0u>{42ctGP(8vQj-Btk1n|O0ZD=YLwd&R{Ko41Gr9H= zY@z@@bOAMB5Ltl$E>bJJ{>JP30ZxkmI%?eW{k`b?Wy<&gOo;dS`~CR$Vwb@XWtR|N zi~t=w02?-0&j0TD{>bb6sNwsK*!p?V`RMQUl(*DVjk-9Cx+-z1KXab|Ka2oXhX5f% z`$|e!000AhNklrxs)5QTeTVRiEmz~MKK1WAjCw(c-JK6eox;2O)?`? zTG`AHia671e^vgmp!llKp|=5sVHk#C7=~epA~VAf-~%aPC=%Qw01h8mnSZ|p?hz91 z7p83F3%LVu9;S$tSI$C^%^yud1dfTM_6p2|+5Ejp$bd`GDvbR|xit>i!ZD&F>@CJrPmu*UjD&?DfZs=$@e3FQA(vNiU+$A*%a} z?`XcG2jDxJ_ZQ#Md`H{4Lpf6QBDp81_KWZ6Tk#yCy1)32zO#3<7>b`eT7UyYH1eGz z;O(rH$=QR*L%%ZcBpc=eGua?N55nD^K(8<#gl2+pN_j~b2MHs4#mcLmv%DkspS-3< zpI1F=^9siI0s-;IN_IrA;5xm~3?3!StX}pUv0vkxMaqm+zxrg7X7(I&*N~&dEd0kD z-FRV|g=|QuUsuh>-xCI}vD2imzYIOIdcCVV=$Bz@*u0+Bs<|L^)32nN*=wu3n%Ynw z@1|eLG>!8ruU1pFXUfb`j>(=Gy~?Rn4QJ-c3%3T|(Frd!bI`9u&zAnyFYTqlG#&J7 zAkD(jpw|oZLNiA>;>hgp1KX7-wxC~31II47gc zHcehD6Uxlf%+M^^uN5Wc*G%^;>D5qT{>=uxUhX%WJu^Z*(_Wq9y}npFO{Hhb>s6<9 zNi0pHXWFaVZnb)1+RS&F)xOv6&aeILcI)`k#0YE+?e)5&#r7J#c`3Z7x!LpTc01dx zrdC3{Z;joZ^KN&))zB_i)I9fWedoN>Zl-6_Iz+^G&*ak2jpF07*qoM6N<$f;w%0(f|Me literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0467bf12aa4d28f374bb26596605a46dcbb3e7c8 GIT binary patch literal 1418 zcmV;51$Fv~P)q zKfU)WzW*n(@|xWGCA9ScMt*e9`2kdxPQ&&>|-UCa7_51w+ zLUsW@ZzZSW0y$)Hp~e9%PvP|a03ks1`~K?q{u;6NC8*{AOqIUq{CL&;p56Lf$oQGq z^={4hPQv)y=I|4n+?>7Fim=dxt1 z2H+Dm+1+fh+IF>G0SjJMkQQre1x4|G*Z==(Ot&kCnUrL4I(rf(ucITwmuHf^hXiJT zkdTm&kdTm&kdTm&kdP`esgWG0BcWCVkVZ&2dUwN`cgM8QJb`Z7Z~e<&Yj2(}>Tmf` zm1{eLgw!b{bXkjWbF%dTkTZEJWyWOb##Lfw4EK2}<0d6%>AGS{po>WCOy&f$Tay_> z?NBlkpo@s-O;0V%Y_Xa-G#_O08q5LR*~F%&)}{}r&L%Sbs8AS4t7Y0NEx*{soY=0MZExqA5XHQkqi#4gW3 zqODM^iyZl;dvf)-bOXtOru(s)Uc7~BFx{w-FK;2{`VA?(g&@3z&bfLFyctOH!cVsF z7IL=fo-qBndRUm;kAdXR4e6>k-z|21AaN%ubeVrHl*<|s&Ax@W-t?LR(P-24A5=>a z*R9#QvjzF8n%@1Nw@?CG@6(%>+-0ASK~jEmCV|&a*7-GKT72W<(TbSjf)&Eme6nGE z>Gkj4Sq&2e+-G%|+NM8OOm5zVl9{Z8Dd8A5z3y8mZ=4Bv4%>as_{9cN#bm~;h>62( zdqY93Zy}v&c4n($Vv!UybR8ocs7#zbfX1IY-*w~)p}XyZ-SFC~4w>BvMVr`dFbelV{lLL0bx7@*ZZdebr3`sP;? zVImji)kG)(6Juv0lz@q`F!k1FE;CQ(D0iG$wchPbKZQELlsZ#~rt8#90Y_Xh&3U-< z{s<&cCV_1`^TD^ia9!*mQDq& zn2{r`j};V|uV%_wsP!zB?m%;FeaRe+X47K0e+KE!8C{gAWF8)lCd1u1%~|M!XNRvw zvtqy3iz0WSpWdhn6$hP8PaRBmp)q`#PCA`Vd#Tc$@f1tAcM>f_I@bC)hkI9|o(Iqv zo}Piadq!j76}004RBio<`)70k^`K1NK)q>w?p^C6J2ZC!+UppiK6&y3Kmbv&O!oYF z34$0Z;QO!JOY#!`qyGH<3Pd}Pt@q*A0V=3SVtWKRR8d8Z&@)3qLPA19LPA19LPEUC YUoZo%k(ykuW&i*H07*qoM6N<$f+CH{y8r+H literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000000..0bedcf2fd4 --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..9da19eacad3b03bb08bbddbbf4ac48dd78b3d838 GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0vp^j3CUx0wlM}@Gt=>Zci7-kcv6Uzs@r-FtIZ-&5|)J Q1PU{Fy85}Sb4q9e0B4a5jsO4v literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000000..89c2725b70 --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/pkgs/flutter_http_example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/pkgs/flutter_http_example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..f2e259c7c9 --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/flutter_http_example/ios/Runner/Base.lproj/Main.storyboard b/pkgs/flutter_http_example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..f3c28516fb --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/flutter_http_example/ios/Runner/Info.plist b/pkgs/flutter_http_example/ios/Runner/Info.plist new file mode 100644 index 0000000000..e9064474b7 --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Flutter Http Example + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + flutter_http_example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/pkgs/flutter_http_example/ios/Runner/Runner-Bridging-Header.h b/pkgs/flutter_http_example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000000..308a2a560b --- /dev/null +++ b/pkgs/flutter_http_example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/pkgs/flutter_http_example/ios/RunnerTests/RunnerTests.swift b/pkgs/flutter_http_example/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000000..86a7c3b1b6 --- /dev/null +++ b/pkgs/flutter_http_example/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/pkgs/flutter_http_example/lib/book.dart b/pkgs/flutter_http_example/lib/book.dart new file mode 100644 index 0000000000..f2a27fc460 --- /dev/null +++ b/pkgs/flutter_http_example/lib/book.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +class Book { + String title; + String description; + String imageUrl; + + Book(this.title, this.description, this.imageUrl); + + static List listFromJson(Map json) { + final books = []; + + if (json['items'] case final List items) { + for (final item in items) { + if (item case {'volumeInfo': final Map volumeInfo}) { + if (volumeInfo + case { + 'title': final String title, + 'description': final String description, + 'imageLinks': {'smallThumbnail': final String thumbnail} + }) { + books.add(Book(title, description, thumbnail)); + } + } + } + } + + return books; + } +} diff --git a/pkgs/flutter_http_example/lib/http_client_factory.dart b/pkgs/flutter_http_example/lib/http_client_factory.dart new file mode 100644 index 0000000000..cb36597c23 --- /dev/null +++ b/pkgs/flutter_http_example/lib/http_client_factory.dart @@ -0,0 +1,19 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. 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:cronet_http/cronet_http.dart'; +import 'package:cupertino_http/cupertino_http.dart'; +import 'package:http/http.dart'; + +Client httpClient() { + if (Platform.isAndroid) { + return CronetClient.defaultCronetEngine(); + } + if (Platform.isIOS || Platform.isMacOS) { + return CupertinoClient.defaultSessionConfiguration(); + } + return Client(); // Return the default client. +} diff --git a/pkgs/flutter_http_example/lib/http_client_factory_web.dart b/pkgs/flutter_http_example/lib/http_client_factory_web.dart new file mode 100644 index 0000000000..52a758fe77 --- /dev/null +++ b/pkgs/flutter_http_example/lib/http_client_factory_web.dart @@ -0,0 +1,8 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. 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:fetch_client/fetch_client.dart'; +import 'package:http/http.dart'; + +Client httpClient() => FetchClient(mode: RequestMode.cors); diff --git a/pkgs/flutter_http_example/lib/main.dart b/pkgs/flutter_http_example/lib/main.dart new file mode 100644 index 0000000000..70f003c84c --- /dev/null +++ b/pkgs/flutter_http_example/lib/main.dart @@ -0,0 +1,154 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:convert'; + +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:http/http.dart'; +import 'package:provider/provider.dart'; + +import 'book.dart'; +import 'http_client_factory.dart' + if (dart.library.html) 'http_client_factory_web.dart' as http_factory; + +void main() { + // `runWithClient` is used to control which `package:http` `Client` is used + // when the `Client` constructor is called. This method allows you to choose + // the `Client` even when the package that you are using does not offer + // explicit parameterization. + // + // However, `runWithClient` does not work with Flutter tests. See + // https://github.com/flutter/flutter/issues/96939. + // + // Use `package:provider` and `runWithClient` together so that tests and + // unparameterized `Client` usages both work. + runWithClient( + () => runApp(Provider( + create: (_) => http_factory.httpClient(), + child: const BookSearchApp(), + dispose: (_, client) => client.close())), + http_factory.httpClient); +} + +class BookSearchApp extends StatelessWidget { + const BookSearchApp({super.key}); + + @override + Widget build(BuildContext context) => const MaterialApp( + // Remove the debug banner. + debugShowCheckedModeBanner: false, + title: 'Book Search', + home: HomePage(), + ); +} + +class HomePage extends StatefulWidget { + const HomePage({super.key}); + + @override + State createState() => _HomePageState(); +} + +class _HomePageState extends State { + List? _books; + String? _lastQuery; + late Client _client; + + @override + void initState() { + super.initState(); + _client = context.read(); + } + + // Get the list of books matching `query`. + // The `get` call will automatically use the `client` configurated in `main`. + Future> _findMatchingBooks(String query) async { + final response = await _client.get( + Uri.https( + 'www.googleapis.com', + '/books/v1/volumes', + {'q': query, 'maxResults': '20', 'printType': 'books'}, + ), + ); + + final json = jsonDecode(utf8.decode(response.bodyBytes)) as Map; + return Book.listFromJson(json); + } + + void _runSearch(String query) async { + _lastQuery = query; + if (query.isEmpty) { + setState(() { + _books = null; + }); + return; + } + + final books = await _findMatchingBooks(query); + // Avoid the situation where a slow-running query finishes late and + // replaces newer search results. + if (query != _lastQuery) return; + setState(() { + _books = books; + }); + } + + @override + Widget build(BuildContext context) { + final searchResult = _books == null + ? const Text('Please enter a query', style: TextStyle(fontSize: 24)) + : _books!.isNotEmpty + ? BookList(_books!) + : const Text('No results found', style: TextStyle(fontSize: 24)); + + return Scaffold( + appBar: AppBar(title: const Text('Book Search')), + body: Padding( + padding: const EdgeInsets.all(10), + child: Column( + children: [ + const SizedBox(height: 20), + TextField( + onChanged: _runSearch, + decoration: const InputDecoration( + labelText: 'Search', + suffixIcon: Icon(Icons.search), + ), + ), + const SizedBox(height: 20), + Expanded(child: searchResult), + ], + ), + ), + ); + } +} + +class BookList extends StatefulWidget { + final List books; + const BookList(this.books, {super.key}); + + @override + State createState() => _BookListState(); +} + +class _BookListState extends State { + @override + Widget build(BuildContext context) => ListView.builder( + itemCount: widget.books.length, + itemBuilder: (context, index) => Card( + key: ValueKey(widget.books[index].title), + child: ListTile( + leading: CachedNetworkImage( + placeholder: (context, url) => + const CircularProgressIndicator(), + imageUrl: + widget.books[index].imageUrl.replaceFirst('http', 'https')), + title: Text(widget.books[index].title), + subtitle: Text(widget.books[index].description), + ), + ), + ); +} diff --git a/pkgs/flutter_http_example/linux/.gitignore b/pkgs/flutter_http_example/linux/.gitignore new file mode 100644 index 0000000000..d3896c9844 --- /dev/null +++ b/pkgs/flutter_http_example/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/pkgs/flutter_http_example/linux/CMakeLists.txt b/pkgs/flutter_http_example/linux/CMakeLists.txt new file mode 100644 index 0000000000..c9b5dd6ca9 --- /dev/null +++ b/pkgs/flutter_http_example/linux/CMakeLists.txt @@ -0,0 +1,139 @@ +# 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 "flutter_http_example") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.flutter_http_example") + +# 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" +) + + +# 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/pkgs/flutter_http_example/linux/flutter/CMakeLists.txt b/pkgs/flutter_http_example/linux/flutter/CMakeLists.txt new file mode 100644 index 0000000000..d5bd01648a --- /dev/null +++ b/pkgs/flutter_http_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/pkgs/flutter_http_example/linux/flutter/generated_plugin_registrant.cc b/pkgs/flutter_http_example/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000000..e71a16d23d --- /dev/null +++ b/pkgs/flutter_http_example/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void fl_register_plugins(FlPluginRegistry* registry) { +} diff --git a/pkgs/flutter_http_example/linux/flutter/generated_plugin_registrant.h b/pkgs/flutter_http_example/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000000..e0f0a47bc0 --- /dev/null +++ b/pkgs/flutter_http_example/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/pkgs/flutter_http_example/linux/flutter/generated_plugins.cmake b/pkgs/flutter_http_example/linux/flutter/generated_plugins.cmake new file mode 100644 index 0000000000..2e1de87a7e --- /dev/null +++ b/pkgs/flutter_http_example/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/pkgs/flutter_http_example/linux/main.cc b/pkgs/flutter_http_example/linux/main.cc new file mode 100644 index 0000000000..e7c5c54370 --- /dev/null +++ b/pkgs/flutter_http_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/pkgs/flutter_http_example/linux/my_application.cc b/pkgs/flutter_http_example/linux/my_application.cc new file mode 100644 index 0000000000..19681d123c --- /dev/null +++ b/pkgs/flutter_http_example/linux/my_application.cc @@ -0,0 +1,104 @@ +#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, "flutter_http_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, "flutter_http_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 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_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/pkgs/flutter_http_example/linux/my_application.h b/pkgs/flutter_http_example/linux/my_application.h new file mode 100644 index 0000000000..72271d5e41 --- /dev/null +++ b/pkgs/flutter_http_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/pkgs/flutter_http_example/macos/.gitignore b/pkgs/flutter_http_example/macos/.gitignore new file mode 100644 index 0000000000..746adbb6b9 --- /dev/null +++ b/pkgs/flutter_http_example/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/pkgs/flutter_http_example/macos/Flutter/Flutter-Debug.xcconfig b/pkgs/flutter_http_example/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000000..c2efd0b608 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/pkgs/flutter_http_example/macos/Flutter/Flutter-Release.xcconfig b/pkgs/flutter_http_example/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000000..c2efd0b608 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/pkgs/flutter_http_example/macos/Flutter/GeneratedPluginRegistrant.swift b/pkgs/flutter_http_example/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000000..cccf817a52 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,10 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { +} diff --git a/pkgs/flutter_http_example/macos/Runner.xcodeproj/project.pbxproj b/pkgs/flutter_http_example/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..7ec768d2e6 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,695 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C80D7294CF71000263BE5 /* RunnerTests.swift */; }; + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC10EC2044A3C60003C045; + remoteInfo = Runner; + }; + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* flutter_http_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "flutter_http_example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 331C80D2294CF70F00263BE5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C80D6294CF71000263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C80D7294CF71000263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 331C80D6294CF71000263BE5 /* RunnerTests */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* flutter_http_example.app */, + 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C80D4294CF70F00263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C80D1294CF70F00263BE5 /* Sources */, + 331C80D2294CF70F00263BE5 /* Frameworks */, + 331C80D3294CF70F00263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C80DA294CF71000263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C80D5294CF71000263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* flutter_http_example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1430; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C80D4294CF70F00263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 33CC10EC2044A3C60003C045; + }; + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 331C80D4294CF70F00263BE5 /* RunnerTests */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C80D3294CF70F00263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C80D1294CF70F00263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C80D8294CF71000263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C80DA294CF71000263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC10EC2044A3C60003C045 /* Runner */; + targetProxy = 331C80D9294CF71000263BE5 /* PBXContainerItemProxy */; + }; + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 331C80DB294CF71000263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/flutter_http_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/flutter_http_example"; + }; + name = Debug; + }; + 331C80DC294CF71000263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/flutter_http_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/flutter_http_example"; + }; + name = Release; + }; + 331C80DD294CF71000263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpExample.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/flutter_http_example.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/flutter_http_example"; + }; + name = Profile; + }; + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C80DB294CF71000263BE5 /* Debug */, + 331C80DC294CF71000263BE5 /* Release */, + 331C80DD294CF71000263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/pkgs/flutter_http_example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/pkgs/flutter_http_example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/pkgs/flutter_http_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/pkgs/flutter_http_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..109fe9a3cc --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/flutter_http_example/macos/Runner.xcworkspace/contents.xcworkspacedata b/pkgs/flutter_http_example/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/pkgs/flutter_http_example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/pkgs/flutter_http_example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/pkgs/flutter_http_example/macos/Runner/AppDelegate.swift b/pkgs/flutter_http_example/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000000..d53ef64377 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..a2ec33f19f --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000000000000000000000000000000000000..82b6f9d9a33e198f5747104729e1fcef999772a5 GIT binary patch literal 102994 zcmeEugo5nb1G~3xi~y`}h6XHx5j$(L*3|5S2UfkG$|UCNI>}4f?MfqZ+HW-sRW5RKHEm z^unW*Xx{AH_X3Xdvb%C(Bh6POqg==@d9j=5*}oEny_IS;M3==J`P0R!eD6s~N<36C z*%-OGYqd0AdWClO!Z!}Y1@@RkfeiQ$Ib_ z&fk%T;K9h`{`cX3Hu#?({4WgtmkR!u3ICS~|NqH^fdNz>51-9)OF{|bRLy*RBv#&1 z3Oi_gk=Y5;>`KbHf~w!`u}!&O%ou*Jzf|Sf?J&*f*K8cftMOKswn6|nb1*|!;qSrlw= zr-@X;zGRKs&T$y8ENnFU@_Z~puu(4~Ir)>rbYp{zxcF*!EPS6{(&J}qYpWeqrPWW< zfaApz%<-=KqxrqLLFeV3w0-a0rEaz9&vv^0ZfU%gt9xJ8?=byvNSb%3hF^X_n7`(fMA;C&~( zM$cQvQ|g9X)1AqFvbp^B{JEX$o;4iPi?+v(!wYrN{L}l%e#5y{j+1NMiT-8=2VrCP zmFX9=IZyAYA5c2!QO96Ea-6;v6*$#ZKM-`%JCJtrA3d~6h{u+5oaTaGE)q2b+HvdZ zvHlY&9H&QJ5|uG@wDt1h99>DdHy5hsx)bN`&G@BpxAHh$17yWDyw_jQhhjSqZ=e_k z_|r3=_|`q~uA47y;hv=6-o6z~)gO}ZM9AqDJsR$KCHKH;QIULT)(d;oKTSPDJ}Jx~G#w-(^r<{GcBC*~4bNjfwHBumoPbU}M)O za6Hc2ik)2w37Yyg!YiMq<>Aov?F2l}wTe+>h^YXcK=aesey^i)QC_p~S zp%-lS5%)I29WfywP(r4@UZ@XmTkqo51zV$|U|~Lcap##PBJ}w2b4*kt7x6`agP34^ z5fzu_8rrH+)2u*CPcr6I`gL^cI`R2WUkLDE5*PX)eJU@H3HL$~o_y8oMRoQ0WF9w| z6^HZDKKRDG2g;r8Z4bn+iJNFV(CG;K-j2>aj229gl_C6n12Jh$$h!}KVhn>*f>KcH z;^8s3t(ccVZ5<{>ZJK@Z`hn_jL{bP8Yn(XkwfRm?GlEHy=T($8Z1Mq**IM`zxN9>-yXTjfB18m_$E^JEaYn>pj`V?n#Xu;Z}#$- zw0Vw;T*&9TK$tKI7nBk9NkHzL++dZ^;<|F6KBYh2+XP-b;u`Wy{~79b%IBZa3h*3^ zF&BKfQ@Ej{7ku_#W#mNJEYYp=)bRMUXhLy2+SPMfGn;oBsiG_6KNL8{p1DjuB$UZB zA)a~BkL)7?LJXlCc}bB~j9>4s7tlnRHC5|wnycQPF_jLl!Avs2C3^lWOlHH&v`nGd zf&U!fn!JcZWha`Pl-B3XEe;(ks^`=Z5R zWyQR0u|do2`K3ec=YmWGt5Bwbu|uBW;6D8}J3{Uep7_>L6b4%(d=V4m#(I=gkn4HT zYni3cnn>@F@Wr<hFAY3Y~dW+3bte;70;G?kTn4Aw5nZ^s5|47 z4$rCHCW%9qa4)4vE%^QPMGf!ET!^LutY$G zqdT(ub5T5b+wi+OrV}z3msoy<4)`IPdHsHJggmog0K*pFYMhH!oZcgc5a)WmL?;TPSrerTVPp<#s+imF3v#!FuBNNa`#6 z!GdTCF|IIpz#(eV^mrYKThA4Bnv&vQet@%v9kuRu3EHx1-2-it@E`%9#u`)HRN#M? z7aJ{wzKczn#w^`OZ>Jb898^Xxq)0zd{3Tu7+{-sge-rQ z&0PME&wIo6W&@F|%Z8@@N3)@a_ntJ#+g{pUP7i?~3FirqU`rdf8joMG^ld?(9b7Iv z>TJgBg#)(FcW)h!_if#cWBh}f+V08GKyg|$P#KTS&%=!+0a%}O${0$i)kn9@G!}En zv)_>s?glPiLbbx)xk(lD-QbY(OP3;MSXM5E*P&_`Zks2@46n|-h$Y2L7B)iH{GAAq19h5-y0q>d^oy^y+soJu9lXxAe%jcm?=pDLFEG2kla40e!5a}mpe zdL=WlZ=@U6{>g%5a+y-lx)01V-x;wh%F{=qy#XFEAqcd+m}_!lQ)-9iiOL%&G??t| z?&NSdaLqdPdbQs%y0?uIIHY7rw1EDxtQ=DU!i{)Dkn~c$LG5{rAUYM1j5*G@oVn9~ zizz{XH(nbw%f|wI=4rw^6mNIahQpB)OQy10^}ACdLPFc2@ldVi|v@1nWLND?)53O5|fg`RZW&XpF&s3@c-R?aad!$WoH6u0B|}zt)L($E^@U- zO#^fxu9}Zw7Xl~nG1FVM6DZSR0*t!4IyUeTrnp@?)Z)*!fhd3)&s(O+3D^#m#bAem zpf#*aiG_0S^ofpm@9O7j`VfLU0+{$x!u^}3!zp=XST0N@DZTp!7LEVJgqB1g{psNr za0uVmh3_9qah14@M_pi~vAZ#jc*&aSm$hCNDsuQ-zPe&*Ii#2=2gP+DP4=DY z_Y0lUsyE6yaV9)K)!oI6+*4|spx2at*30CAx~6-5kfJzQ`fN8$!lz%hz^J6GY?mVH zbYR^JZ(Pmj6@vy-&!`$5soyy-NqB^8cCT40&R@|6s@m+ZxPs=Bu77-+Os7+bsz4nA3DrJ8#{f98ZMaj-+BD;M+Jk?pgFcZIb}m9N z{ct9T)Kye&2>l^39O4Q2@b%sY?u#&O9PO4@t0c$NUXG}(DZJ<;_oe2~e==3Z1+`Zo zFrS3ns-c}ZognVBHbg#e+1JhC(Yq7==rSJQ8J~}%94(O#_-zJKwnBXihl#hUd9B_>+T& z7eHHPRC?5ONaUiCF7w|{J`bCWS7Q&xw-Sa={j-f)n5+I=9s;E#fBQB$`DDh<^mGiF zu-m_k+)dkBvBO(VMe2O4r^sf3;sk9K!xgXJU>|t9Vm8Ty;fl5pZzw z9j|}ZD}6}t;20^qrS?YVPuPRS<39d^y0#O1o_1P{tN0?OX!lc-ICcHI@2#$cY}_CY zev|xdFcRTQ_H)1fJ7S0*SpPs8e{d+9lR~IZ^~dKx!oxz?=Dp!fD`H=LH{EeC8C&z-zK$e=!5z8NL=4zx2{hl<5z*hEmO=b-7(k5H`bA~5gT30Sjy`@-_C zKM}^so9Ti1B;DovHByJkTK87cfbF16sk-G>`Q4-txyMkyQS$d}??|Aytz^;0GxvOs zPgH>h>K+`!HABVT{sYgzy3CF5ftv6hI-NRfgu613d|d1cg^jh+SK7WHWaDX~hlIJ3 z>%WxKT0|Db1N-a4r1oPKtF--^YbP=8Nw5CNt_ZnR{N(PXI>Cm$eqi@_IRmJ9#)~ZHK_UQ8mi}w^`+4$OihUGVz!kW^qxnCFo)-RIDbA&k-Y=+*xYv5y4^VQ9S)4W5Pe?_RjAX6lS6Nz#!Hry=+PKx2|o_H_3M`}Dq{Bl_PbP(qel~P@=m}VGW*pK96 zI@fVag{DZHi}>3}<(Hv<7cVfWiaVLWr@WWxk5}GDEbB<+Aj;(c>;p1qmyAIj+R!`@#jf$ zy4`q23L-72Zs4j?W+9lQD;CYIULt%;O3jPWg2a%Zs!5OW>5h1y{Qof!p&QxNt5=T( zd5fy&7=hyq;J8%86YBOdc$BbIFxJx>dUyTh`L z-oKa=OhRK9UPVRWS`o2x53bAv+py)o)kNL6 z9W1Dlk-g6Ht@-Z^#6%`9S9`909^EMj?9R^4IxssCY-hYzei^TLq7Cj>z$AJyaU5=z zl!xiWvz0U8kY$etrcp8mL;sYqGZD!Hs-U2N{A|^oEKA482v1T%cs%G@X9M?%lX)p$ zZoC7iYTPe8yxY0Jne|s)fCRe1mU=Vb1J_&WcIyP|x4$;VSVNC`M+e#oOA`#h>pyU6 z?7FeVpk`Hsu`~T3i<_4<5fu?RkhM;@LjKo6nX>pa%8dSdgPO9~Jze;5r>Tb1Xqh5q z&SEdTXevV@PT~!O6z|oypTk7Qq+BNF5IQ(8s18c=^0@sc8Gi|3e>VKCsaZ?6=rrck zl@oF5Bd0zH?@15PxSJIRroK4Wa?1o;An;p0#%ZJ^tI=(>AJ2OY0GP$E_3(+Zz4$AQ zW)QWl<4toIJ5TeF&gNXs>_rl}glkeG#GYbHHOv-G!%dJNoIKxn)FK$5&2Zv*AFic! z@2?sY&I*PSfZ8bU#c9fdIJQa_cQijnj39-+hS@+~e*5W3bj%A}%p9N@>*tCGOk+cF zlcSzI6j%Q|2e>QG3A<86w?cx6sBtLNWF6_YR?~C)IC6_10SNoZUHrCpp6f^*+*b8` zlx4ToZZuI0XW1W)24)92S)y0QZa);^NRTX6@gh8@P?^=#2dV9s4)Q@K+gnc{6|C}& zDLHr7nDOLrsH)L@Zy{C_2UrYdZ4V{|{c8&dRG;wY`u>w%$*p>PO_}3`Y21pk?8Wtq zGwIXTulf7AO2FkPyyh2TZXM1DJv>hI`}x`OzQI*MBc#=}jaua&czSkI2!s^rOci|V zFkp*Vbiz5vWa9HPFXMi=BV&n3?1?%8#1jq?p^3wAL`jgcF)7F4l<(H^!i=l-(OTDE zxf2p71^WRIExLf?ig0FRO$h~aA23s#L zuZPLkm>mDwBeIu*C7@n@_$oSDmdWY7*wI%aL73t~`Yu7YwE-hxAATmOi0dmB9|D5a zLsR7OQcA0`vN9m0L|5?qZ|jU+cx3_-K2!K$zDbJ$UinQy<9nd5ImWW5n^&=Gg>Gsh zY0u?m1e^c~Ug39M{{5q2L~ROq#c{eG8Oy#5h_q=#AJj2Yops|1C^nv0D1=fBOdfAG z%>=vl*+_w`&M7{qE#$xJJp_t>bSh7Mpc(RAvli9kk3{KgG5K@a-Ue{IbU{`umXrR3ra5Y7xiX42+Q%N&-0#`ae_ z#$Y6Wa++OPEDw@96Zz##PFo9sADepQe|hUy!Zzc2C(L`k9&=a8XFr+!hIS>D2{pdGP1SzwyaGLiH3j--P>U#TWw90t8{8Bt%m7Upspl#=*hS zhy|(XL6HOqBW}Og^tLX7 z+`b^L{O&oqjwbxDDTg2B;Yh2(fW>%S5Pg8^u1p*EFb z`(fbUM0`afawYt%VBfD&b3MNJ39~Ldc@SAuzsMiN%E}5{uUUBc7hc1IUE~t-Y9h@e7PC|sv$xGx=hZiMXNJxz5V(np%6u{n24iWX#!8t#>Ob$in<>dw96H)oGdTHnU zSM+BPss*5)Wz@+FkooMxxXZP1{2Nz7a6BB~-A_(c&OiM)UUNoa@J8FGxtr$)`9;|O z(Q?lq1Q+!E`}d?KemgC!{nB1JJ!B>6J@XGQp9NeQvtbM2n7F%v|IS=XWPVZY(>oq$ zf=}8O_x`KOxZoGnp=y24x}k6?gl_0dTF!M!T`={`Ii{GnT1jrG9gPh)R=RZG8lIR| z{ZJ6`x8n|y+lZuy${fuEDTAf`OP!tGySLXD}ATJO5UoZv|Xo3%7O~L63+kw}v)Ci=&tWx3bQJfL@5O18CbPlkR^IcKA zy1=^Vl-K-QBP?9^R`@;czcUw;Enbbyk@vJQB>BZ4?;DM%BUf^eZE+sOy>a){qCY6Y znYy;KGpch-zf=5|p#SoAV+ie8M5(Xg-{FoLx-wZC9IutT!(9rJ8}=!$!h%!J+vE2e z(sURwqCC35v?1>C1L)swfA^sr16{yj7-zbT6Rf26-JoEt%U?+|rQ zeBuGohE?@*!zR9)1P|3>KmJSgK*fOt>N>j}LJB`>o(G#Dduvx7@DY7};W7K;Yj|8O zGF<+gTuoIKe7Rf+LQG3-V1L^|E;F*}bQ-{kuHq}| ze_NwA7~US19sAZ)@a`g*zkl*ykv2v3tPrb4Og2#?k6Lc7@1I~+ew48N&03hW^1Cx+ zfk5Lr4-n=#HYg<7ka5i>2A@ZeJ60gl)IDX!!p zzfXZQ?GrT>JEKl7$SH!otzK6=0dIlqN)c23YLB&Krf9v-{@V8p+-e2`ujFR!^M%*; ze_7(Jh$QgoqwB!HbX=S+^wqO15O_TQ0-qX8f-|&SOuo3ZE{{9Jw5{}>MhY}|GBhO& zv48s_B=9aYQfa;d>~1Z$y^oUUaDer>7ve5+Gf?rIG4GZ!hRKERlRNgg_C{W_!3tsI2TWbX8f~MY)1Q`6Wj&JJ~*;ay_0@e zzx+mE-pu8{cEcVfBqsnm=jFU?H}xj@%CAx#NO>3 z_re3Rq%d1Y7VkKy{=S73&p;4^Praw6Y59VCP6M?!Kt7{v#DG#tz?E)`K95gH_mEvb z%$<~_mQ$ad?~&T=O0i0?`YSp?E3Dj?V>n+uTRHAXn`l!pH9Mr}^D1d@mkf+;(tV45 zH_yfs^kOGLXlN*0GU;O&{=awxd?&`{JPRr$z<1HcAO2K`K}92$wC}ky&>;L?#!(`w z68avZGvb728!vgw>;8Z8I@mLtI`?^u6R>sK4E7%=y)jpmE$fH!Dj*~(dy~-2A5Cm{ zl{1AZw`jaDmfvaB?jvKwz!GC}@-Dz|bFm1OaPw(ia#?>vF7Y5oh{NVbyD~cHB1KFn z9C@f~X*Wk3>sQH9#D~rLPslAd26@AzMh=_NkH_yTNXx6-AdbAb z{Ul89YPHslD?xAGzOlQ*aMYUl6#efCT~WI zOvyiewT=~l1W(_2cEd(8rDywOwjM-7P9!8GCL-1<9KXXO=6%!9=W++*l1L~gRSxLVd8K=A7&t52ql=J&BMQu{fa6y zXO_e>d?4X)xp2V8e3xIQGbq@+vo#&n>-_WreTTW0Yr?|YRPP43cDYACMQ(3t6(?_k zfgDOAU^-pew_f5U#WxRXB30wcfDS3;k~t@b@w^GG&<5n$Ku?tT(%bQH(@UHQGN)N|nfC~7?(etU`}XB)$>KY;s=bYGY#kD%i9fz= z2nN9l?UPMKYwn9bX*^xX8Y@%LNPFU>s#Ea1DaP%bSioqRWi9JS28suTdJycYQ+tW7 zrQ@@=13`HS*dVKaVgcem-45+buD{B;mUbY$YYULhxK)T{S?EB<8^YTP$}DA{(&)@S zS#<8S96y9K2!lG^VW-+CkfXJIH;Vo6wh)N}!08bM$I7KEW{F6tqEQ?H@(U zAqfi%KCe}2NUXALo;UN&k$rU0BLNC$24T_mcNY(a@lxR`kqNQ0z%8m>`&1ro40HX} z{{3YQ;2F9JnVTvDY<4)x+88i@MtXE6TBd7POk&QfKU-F&*C`isS(T_Q@}K)=zW#K@ zbXpcAkTT-T5k}Wj$dMZl7=GvlcCMt}U`#Oon1QdPq%>9J$rKTY8#OmlnNWBYwafhx zqFnym@okL#Xw>4SeRFejBnZzY$jbO)e^&&sHBgMP%Ygfi!9_3hp17=AwLBNFTimf0 zw6BHNXw19Jg_Ud6`5n#gMpqe%9!QB^_7wAYv8nrW94A{*t8XZu0UT&`ZHfkd(F{Px zD&NbRJP#RX<=+sEeGs2`9_*J2OlECpR;4uJie-d__m*(aaGE}HIo+3P{my@;a~9Y$ zHBXVJ83#&@o6{M+pE9^lI<4meLLFN_3rwgR4IRyp)~OF0n+#ORrcJ2_On9-78bWbG zuCO0esc*n1X3@p1?lN{qWS?l7J$^jbpeel{w~51*0CM+q9@9X=>%MF(ce~om(}?td zjkUmdUR@LOn-~6LX#=@a%rvj&>DFEoQscOvvC@&ZB5jVZ-;XzAshwx$;Qf@U41W=q zOSSjQGQV8Qi3*4DngNMIM&Cxm7z*-K`~Bl(TcEUxjQ1c=?)?wF8W1g;bAR%sM#LK( z_Op?=P%)Z+J!>vpN`By0$?B~Out%P}kCriDq@}In&fa_ZyKV+nLM0E?hfxuu%ciUz z>yAk}OydbWNl7{)#112j&qmw;*Uj&B;>|;Qwfc?5wIYIHH}s6Mve@5c5r+y)jK9i( z_}@uC(98g)==AGkVN?4>o@w=7x9qhW^ zB(b5%%4cHSV?3M?k&^py)j*LK16T^Ef4tb05-h-tyrjt$5!oo4spEfXFK7r_Gfv7#x$bsR7T zs;dqxzUg9v&GjsQGKTP*=B(;)be2aN+6>IUz+Hhw-n>^|`^xu*xvjGPaDoFh2W4-n z@Wji{5Y$m>@Vt7TE_QVQN4*vcfWv5VY-dT0SV=l=8LAEq1go*f zkjukaDV=3kMAX6GAf0QOQHwP^{Z^=#Lc)sh`QB)Ftl&31jABvq?8!3bt7#8vxB z53M{4{GR4Hl~;W3r}PgXSNOt477cO62Yj(HcK&30zsmWpvAplCtpp&mC{`2Ue*Bwu zF&UX1;w%`Bs1u%RtGPFl=&sHu@Q1nT`z={;5^c^^S~^?2-?<|F9RT*KQmfgF!7=wD@hytxbD;=9L6PZrK*1<4HMObNWehA62DtTy)q5H|57 z9dePuC!1;0MMRRl!S@VJ8qG=v^~aEU+}2Qx``h1LII!y{crP2ky*R;Cb;g|r<#ryo zju#s4dE?5CTIZKc*O4^3qWflsQ(voX>(*_JP7>Q&$%zCAIBTtKC^JUi@&l6u&t0hXMXjz_y!;r@?k|OU9aD%938^TZ>V? zqJmom_6dz4DBb4Cgs_Ef@}F%+cRCR%UMa9pi<-KHN;t#O@cA%(LO1Rb=h?5jiTs93 zPLR78p+3t>z4|j=<>2i4b`ketv}9Ax#B0)hn7@bFl;rDfP8p7u9XcEb!5*PLKB(s7wQC2kzI^@ae)|DhNDmSy1bOLid%iIap@24A(q2XI!z_hkl-$1T10 z+KKugG4-}@u8(P^S3PW4x>an;XWEF-R^gB{`t8EiP{ZtAzoZ!JRuMRS__-Gg#Qa3{<;l__CgsF+nfmFNi}p z>rV!Y6B@cC>1up)KvaEQiAvQF!D>GCb+WZsGHjDeWFz?WVAHP65aIA8u6j6H35XNYlyy8>;cWe3ekr};b;$9)0G`zsc9LNsQ&D?hvuHRpBxH)r-1t9|Stc*u<}Ol&2N+wPMom}d15_TA=Aprp zjN-X3*Af$7cDWMWp##kOH|t;c2Pa9Ml4-)o~+7P;&q8teF-l}(Jt zTGKOQqJTeT!L4d}Qw~O0aanA$Vn9Rocp-MO4l*HK)t%hcp@3k0%&_*wwpKD6ThM)R z8k}&7?)YS1ZYKMiy?mn>VXiuzX7$Ixf7EW8+C4K^)m&eLYl%#T=MC;YPvD&w#$MMf zQ=>`@rh&&r!@X&v%ZlLF42L_c=5dSU^uymKVB>5O?AouR3vGv@ei%Z|GX5v1GK2R* zi!!}?+-8>J$JH^fPu@)E6(}9$d&9-j51T^n-e0Ze%Q^)lxuex$IL^XJ&K2oi`wG}QVGk2a7vC4X?+o^z zsCK*7`EUfSuQA*K@Plsi;)2GrayQOG9OYF82Hc@6aNN5ulqs1Of-(iZQdBI^U5of^ zZg2g=Xtad7$hfYu6l~KDQ}EU;oIj(3nO#u9PDz=eO3(iax7OCmgT2p_7&^3q zg7aQ;Vpng*)kb6=sd5?%j5Dm|HczSChMo8HHq_L8R;BR5<~DVyU$8*Tk5}g0eW5x7 z%d)JFZ{(Y<#OTKLBA1fwLM*fH7Q~7Sc2Ne;mVWqt-*o<;| z^1@vo_KTYaMnO$7fbLL+qh#R$9bvnpJ$RAqG+z8h|} z3F5iwG*(sCn9Qbyg@t0&G}3fE0jGq3J!JmG2K&$urx^$z95) z7h?;4vE4W=v)uZ*Eg3M^6f~|0&T)2D;f+L_?M*21-I1pnK(pT$5l#QNlT`SidYw~o z{`)G)Asv#cue)Ax1RNWiRUQ(tQ(bzd-f2U4xlJK+)ZWBxdq#fp=A>+Qc%-tl(c)`t z$e2Ng;Rjvnbu7((;v4LF9Y1?0el9hi!g>G{^37{ z`^s-03Z5jlnD%#Mix19zkU_OS|86^_x4<0(*YbPN}mi-$L?Z4K(M|2&VV*n*ZYN_UqI?eKZi3!b)i z%n3dzUPMc-dc|q}TzvPy!VqsEWCZL(-eURDRG4+;Eu!LugSSI4Fq$Ji$Dp08`pfP_C5Yx~`YKcywlMG;$F z)R5!kVml_Wv6MSpeXjG#g?kJ0t_MEgbXlUN3k|JJ%N>|2xn8yN>>4qxh!?dGI}s|Y zDTKd^JCrRSN+%w%D_uf=Tj6wIV$c*g8D96jb^Kc#>5Fe-XxKC@!pIJw0^zu;`_yeb zhUEm-G*C=F+jW%cP(**b61fTmPn2WllBr4SWNdKe*P8VabZsh0-R|?DO=0x`4_QY) zR7sthW^*BofW7{Sak&S1JdiG?e=SfL24Y#w_)xrBVhGB-13q$>mFU|wd9Xqe-o3{6 zSn@@1@&^)M$rxb>UmFuC+pkio#T;mSnroMVZJ%nZ!uImi?%KsIX#@JU2VY(`kGb1A z7+1MEG)wd@)m^R|a2rXeviv$!emwcY(O|M*xV!9%tBzarBOG<4%gI9SW;Um_gth4=gznYzOFd)y8e+3APCkL)i-OI`;@7-mCJgE`js(M} z;~ZcW{{FMVVO)W>VZ}ILouF#lWGb%Couu}TI4kubUUclW@jEn6B_^v!Ym*(T*4HF9 zWhNKi8%sS~viSdBtnrq!-Dc5(G^XmR>DFx8jhWvR%*8!m*b*R8e1+`7{%FACAK`7 zzdy8TmBh?FVZ0vtw6npnWwM~XjF2fNvV#ZlGG z?FxHkXHN>JqrBYoPo$)zNC7|XrQfcqmEXWud~{j?La6@kbHG@W{xsa~l1=%eLly8B z4gCIH05&Y;6O2uFSopNqP|<$ml$N40^ikxw0`o<~ywS1(qKqQN!@?Ykl|bE4M?P+e zo$^Vs_+x)iuw?^>>`$&lOQOUkZ5>+OLnRA)FqgpDjW&q*WAe(_mAT6IKS9;iZBl8M z<@=Y%zcQUaSBdrs27bVK`c$)h6A1GYPS$y(FLRD5Yl8E3j0KyH08#8qLrsc_qlws; znMV%Zq8k+&T2kf%6ZO^2=AE9>?a587g%-={X}IS~P*I(NeCF9_9&`)|ok0iiIun zo+^odT0&Z4k;rn7I1v87=z!zKU(%gfB$(1mrRYeO$sbqM22Kq68z9wgdg8HBxp>_< zn9o%`f?sVO=IN#5jSX&CGODWlZfQ9A)njK2O{JutYwRZ?n0G_p&*uwpE`Md$iQxrd zoQfF^b8Ou)+3BO_3_K5y*~?<(BF@1l+@?Z6;^;U>qlB)cdro;rxOS1M{Az$s^9o5sXDCg8yD<=(pKI*0e zLk>@lo#&s0)^*Q+G)g}C0IErqfa9VbL*Qe=OT@&+N8m|GJF7jd83vY#SsuEv2s{Q> z>IpoubNs>D_5?|kXGAPgF@mb_9<%hjU;S0C8idI)a=F#lPLuQJ^7OnjJlH_Sks9JD zMl1td%YsWq3YWhc;E$H1<0P$YbSTqs`JKY%(}svsifz|h8BHguL82dBl+z0^YvWk8 zGy;7Z0v5_FJ2A$P0wIr)lD?cPR%cz>kde!=W%Ta^ih+Dh4UKdf7ip?rBz@%y2&>`6 zM#q{JXvW9ZlaSk1oD!n}kSmcDa2v6T^Y-dy+#fW^y>eS8_%<7tWXUp8U@s$^{JFfKMjDAvR z$YmVB;n3ofl!ro9RNT!TpQpcycXCR}$9k5>IPWDXEenQ58os?_weccrT+Bh5sLoiH zZ_7~%t(vT)ZTEO= zb0}@KaD{&IyK_sd8b$`Qz3%UA`nSo zn``!BdCeN!#^G;lK@G2ron*0jQhbdw)%m$2;}le@z~PSLnU-z@tL)^(p%P>OO^*Ff zNRR9oQ`W+x^+EU+3BpluwK77|B3=8QyT|$V;02bn_LF&3LhLA<#}{{)jE)}CiW%VEU~9)SW+=F%7U-iYlQ&q!#N zwI2{(h|Pi&<8_fqvT*}FLN^0CxN}#|3I9G_xmVg$gbn2ZdhbmGk7Q5Q2Tm*ox8NMo zv`iaZW|ZEOMyQga5fts?&T-eCCC9pS0mj7v0SDkD=*^MxurP@89v&Z#3q{FM!a_nr zb?KzMv`BBFOew>4!ft@A&(v-kWXny-j#egKef|#!+3>26Qq0 zv!~8ev4G`7Qk>V1TaMT-&ziqoY3IJp8_S*%^1j73D|=9&;tDZH^!LYFMmME4*Wj(S zRt~Q{aLb_O;wi4u&=}OYuj}Lw*j$@z*3>4&W{)O-oi@9NqdoU!=U%d|se&h?^$Ip# z)BY+(1+cwJz!yy4%l(aLC;T!~Ci>yAtXJb~b*yr&v7f{YCU8P|N1v~H`xmGsG)g)y z4%mv=cPd`s7a*#OR7f0lpD$ueP>w8qXj0J&*7xX+U!uat5QNk>zwU$0acn5p=$88L=jn_QCSYkTV;1~(yUem#0gB`FeqY98sf=>^@ z_MCdvylv~WL%y_%y_FE1)j;{Szj1+K7Lr_y=V+U zk6Tr;>XEqlEom~QGL!a+wOf(@ZWoxE<$^qHYl*H1a~kk^BLPn785%nQb$o;Cuz0h& za9LMx^bKEbPS%e8NM33Jr|1T|ELC(iE!FUci38xW_Y7kdHid#2ie+XZhP;2!Z;ZAM zB_cXKm)VrPK!SK|PY00Phwrpd+x0_Aa;}cDQvWKrwnQrqz##_gvHX2ja?#_{f#;bz`i>C^^ zTLDy;6@HZ~XQi7rph!mz9k!m;KchA)uMd`RK4WLK7)5Rl48m#l>b(#`WPsl<0j z-sFkSF6>Nk|LKnHtZ`W_NnxZP62&w)S(aBmmjMDKzF%G;3Y?FUbo?>b5;0j8Lhtc4 zr*8d5Y9>g@FFZaViw7c16VsHcy0u7M%6>cG1=s=Dtx?xMJSKIu9b6GU8$uSzf43Y3 zYq|U+IWfH;SM~*N1v`KJo!|yfLxTFS?oHsr3qvzeVndVV^%BWmW6re_S!2;g<|Oao z+N`m#*i!)R%i1~NO-xo{qpwL0ZrL7hli;S z3L0lQ_z}z`fdK39Mg~Zd*%mBdD;&5EXa~@H(!###L`ycr7gW`f)KRuqyHL3|uyy3h zSS^td#E&Knc$?dXs*{EnPYOp^-vjAc-h4z#XkbG&REC7;0>z^^Z}i8MxGKerEY z>l?(wReOlXEsNE5!DO&ZWyxY)gG#FSZs%fXuzA~XIAPVp-%yb2XLSV{1nH6{)5opg z(dZKckn}Q4Li-e=eUDs1Psg~5zdn1>ql(*(nn6)iD*OcVkwmKL(A{fix(JhcVB&}V zVt*Xb!{gzvV}dc446>(D=SzfCu7KB`oMjv6kPzSv&B>>HLSJP|wN`H;>oRw*tl#N) z*zZ-xwM7D*AIsBfgqOjY1Mp9aq$kRa^dZU_xw~KxP;|q(m+@e+YSn~`wEJzM|Ippb zzb@%;hB7iH4op9SqmX?j!KP2chsb79(mFossBO-Zj8~L}9L%R%Bw<`^X>hjkCY5SG z7lY!8I2mB#z)1o;*3U$G)3o0A&{0}#B;(zPd2`OF`Gt~8;0Re8nIseU z_yzlf$l+*-wT~_-cYk$^wTJ@~7i@u(CZs9FVkJCru<*yK8&>g+t*!JqCN6RH%8S-P zxH8+Cy#W?!;r?cLMC(^BtAt#xPNnwboI*xWw#T|IW^@3|q&QYY6Ehxoh@^URylR|T zne-Y6ugE^7p5bkRDWIh)?JH5V^ub82l-LuVjDr7UT^g`q4dB&mBFRWGL_C?hoeL(% zo}ocH5t7|1Mda}T!^{Qt9vmA2ep4)dQSZO>?Eq8}qRp&ZJ?-`Tnw+MG(eDswP(L*X3ahC2Ad0_wD^ff9hfzb%Jd`IXx5 zae@NMzBXJDwJS?7_%!TB^E$N8pvhOHDK$7YiOelTY`6KX8hK6YyT$tk*adwN>s^Kp zwM3wGVPhwKU*Yq-*BCs}l`l#Tej(NQ>jg*S0TN%D+GcF<14Ms6J`*yMY;W<-mMN&-K>((+P}+t+#0KPGrzjP zJ~)=Bcz%-K!L5ozIWqO(LM)l_9lVOc4*S65&DKM#TqsiWNG{(EZQw!bc>qLW`=>p-gVJ;T~aN2D_- z{>SZC=_F+%hNmH6ub%Ykih0&YWB!%sd%W5 zHC2%QMP~xJgt4>%bU>%6&uaDtSD?;Usm}ari0^fcMhi_)JZgb1g5j zFl4`FQ*%ROfYI}e7RIq^&^a>jZF23{WB`T>+VIxj%~A-|m=J7Va9FxXV^%UwccSZd zuWINc-g|d6G5;95*%{e;9S(=%yngpfy+7ao|M7S|Jb0-4+^_q-uIqVS&ufU880UDH*>(c)#lt2j zzvIEN>>$Y(PeALC-D?5JfH_j+O-KWGR)TKunsRYKLgk7eu4C{iF^hqSz-bx5^{z0h ze2+u>Iq0J4?)jIo)}V!!m)%)B;a;UfoJ>VRQ*22+ncpe9f4L``?v9PH&;5j{WF?S_C>Lq>nkChZB zjF8(*v0c(lU^ZI-)_uGZnnVRosrO4`YinzI-RSS-YwjYh3M`ch#(QMNw*)~Et7Qpy z{d<3$4FUAKILq9cCZpjvKG#yD%-juhMj>7xIO&;c>_7qJ%Ae8Z^m)g!taK#YOW3B0 zKKSMOd?~G4h}lrZbtPk)n*iOC1~mDhASGZ@N{G|dF|Q^@1ljhe=>;wusA&NvY*w%~ zl+R6B^1yZiF)YN>0ms%}qz-^U-HVyiN3R9k1q4)XgDj#qY4CE0)52%evvrrOc898^ z*^)XFR?W%g0@?|6Mxo1ZBp%(XNv_RD-<#b^?-Fs+NL^EUW=iV|+Vy*F%;rBz~pN7%-698U-VMfGEVnmEz7fL1p)-5sLT zL;Iz>FCLM$p$c}g^tbkGK1G$IALq1Gd|We@&TtW!?4C7x4l*=4oF&&sr0Hu`x<5!m zhX&&Iyjr?AkNXU_5P_b^Q3U9sy#f6ZF@2C96$>1k*E-E%DjwvA{VL0PdU~suN~DZo zm{T!>sRdp`Ldpp9olrH@(J$QyGq!?#o1bUo=XP2OEuT3`XzI>s^0P{manUaE4pI%! zclQq;lbT;nx7v3tR9U)G39h?ryrxzd0xq4KX7nO?piJZbzT_CU&O=T(Vt;>jm?MgC z2vUL#*`UcMsx%w#vvjdamHhmN!(y-hr~byCA-*iCD};#l+bq;gkwQ0oN=AyOf@8ow>Pj<*A~2*dyjK}eYdN);%!t1 z6Y=|cuEv-|5BhA?n2Db@4s%y~(%Wse4&JXw=HiO48%c6LB~Z0SL1(k^9y?ax%oj~l zf7(`iAYLdPRq*ztFC z7VtAb@s{as%&Y;&WnyYl+6Wm$ru*u!MKIg_@01od-iQft0rMjIj8e7P9eKvFnx_X5 zd%pDg-|8<>T2Jdqw>AII+fe?CgP+fL(m0&U??QL8YzSjV{SFi^vW~;wN@or_(q<0Y zRt~L}#JRcHOvm$CB)T1;;7U>m%)QYBLTR)KTARw%zoDxgssu5#v{UEVIa<>{8dtkm zXgbCGp$tfue+}#SD-PgiNT{Zu^YA9;4BnM(wZ9-biRo_7pN}=aaimjYgC=;9@g%6< zxol5sT_$<8{LiJ6{l1+sV)Z_QdbsfEAEMw!5*zz6)Yop?T0DMtR_~wfta)E6_G@k# zZRP11D}$ir<`IQ`<(kGfAS?O-DzCyuzBq6dxGTNNTK?r^?zT30mLY!kQ=o~Hv*k^w zvq!LBjW=zzIi%UF@?!g9vt1CqdwV(-2LYy2=E@Z?B}JDyVkluHtzGsWuI1W5svX~K z&?UJ45$R7g>&}SFnLnmw09R2tUgmr_w6mM9C}8GvQX>nL&5R#xBqnp~Se(I>R42`T zqZe9p6G(VzNB3QD><8+y%{e%6)sZDRXTR|MI zM#eZmao-~_`N|>Yf;a;7yvd_auTG#B?Vz5D1AHx=zpVUFe7*hME z+>KH5h1In8hsVhrstc>y0Q!FHR)hzgl+*Q&5hU9BVJlNGRkXiS&06eOBV^dz3;4d5 zeYX%$62dNOprZV$px~#h1RH?_E%oD6y;J;pF%~y8M)8pQ0olYKj6 zE+hd|7oY3ot=j9ZZ))^CCPADL6Jw%)F@A{*coMApcA$7fZ{T@3;WOQ352F~q6`Mgi z$RI6$8)a`Aaxy<8Bc;{wlDA%*%(msBh*xy$L-cBJvQ8hj#FCyT^%+Phw1~PaqyDou^JR0rxDkSrmAdjeYDFDZ`E z)G3>XtpaSPDlydd$RGHg;#4|4{aP5c_Om z2u5xgnhnA)K%8iU==}AxPxZCYC)lyOlj9as#`5hZ=<6<&DB%i_XCnt5=pjh?iusH$ z>)E`@HNZcAG&RW3Ys@`Ci{;8PNzE-ZsPw$~Wa!cP$ye+X6;9ceE}ah+3VY7Mx}#0x zbqYa}eO*FceiY2jNS&2cH9Y}(;U<^^cWC5Ob&)dZedvZA9HewU3R;gRQ)}hUdf+~Q zS_^4ds*W1T#bxS?%RH&<739q*n<6o|mV;*|1s>ly-Biu<2*{!!0#{_234&9byvn0* z5=>{95Zfb{(?h_Jk#ocR$FZ78O*UTOxld~0UF!kyGM|nH%B*qf)Jy}N!uT9NGeM19 z-@=&Y0yGGo_dw!FD>juk%P$6$qJkj}TwLBoefi;N-$9LAeV|)|-ET&culW9Sb_pc_ zp{cXI0>I0Jm_i$nSvGnYeLSSj{ccVS2wyL&0x~&5v;3Itc82 z5lIAkfn~wcY-bQB$G!ufWt%qO;P%&2B_R5UKwYxMemIaFm)qF1rA zc>gEihb=jBtsXCi0T%J37s&kt*3$s7|6)L(%UiY)6axuk{6RWIS8^+u;)6!R?Sgap z9|6<0bx~AgVi|*;zL@2x>Pbt2Bz*uv4x-`{F)XatTs`S>unZ#P^ZiyjpfL_q2z^fqgR-fbOcG=Y$q>ozkw1T6dH8-)&ww+z?E0 zR|rV(9bi6zpX3Ub>PrPK!{X>e$C66qCXAeFm)Y+lX8n2Olt7PNs*1^si)j!QmFV#t z0P2fyf$N^!dyTot&`Ew5{i5u<8D`8U`qs(KqaWq5iOF3x2!-z65-|HsyYz(MAKZ?< zCpQR;E)wn%s|&q(LVm0Ab>gdmCFJeKwVTnv@Js%!At;I=A>h=l=p^&<4;Boc{$@h< z38v`3&2wJtka@M}GS%9!+SpJ}sdtoYzMevVbnH+d_eMxN@~~ zZq@k)7V5f8u!yAX2qF3qjS7g%n$JuGrMhQF!&S^7(%Y{rP*w2FWj(v_J{+Hg*}wdWOd~pHQ19&n3RWeljK9W%sz&Y3Tm3 zR`>6YR54%qBHGa)2xbs`9cs_EsNHxsfraEgZ)?vrtooeA0sPKJK7an){ngtV@{SBa zkO6ORr1_Xqp+`a0e}sC*_y(|RKS13ikmHp3C^XkE@&wjbGWrt^INg^9lDz#B;bHiW zkK4{|cg08b!yHFSgPca5)vF&gqCgeu+c82%&FeM^Bb}GUxLy-zo)}N;#U?sJ2?G2BNe*9u_7kE5JeY!it=f`A_4gV3} z`M!HXZy#gN-wS!HvHRqpCHUmjiM;rVvpkC!voImG%OFVN3k(QG@X%e``VJSJ@Z7tb z*Onlf>z^D+&$0!4`IE$;2-NSO9HQWd+UFW(r;4hh;(j^p4H-~6OE!HQp^96v?{9Zt z;@!ZcccV%C2s6FMP#qvo4kG6C04A>XILt>JW}%0oE&HM5f6 zYLD!;My>CW+j<~=Wzev{aYtx2ZNw|ptTFV(4;9`6Tmbz6K1)fv4qPXa2mtoPt&c?P zhmO+*o8uP3ykL6E$il00@TDf6tOW7fmo?Oz_6GU^+5J=c22bWyuH#aNj!tT-^IHrJ zu{aqTYw@q;&$xDE*_kl50Jb*dp`(-^p={z}`rqECTi~3 z>0~A7L6X)=L5p#~$V}gxazgGT7$3`?a)zen>?TvAuQ+KAIAJ-s_v}O6@`h9n-sZk> z`3{IJeb2qu9w=P*@q>iC`5wea`KxCxrx{>(4{5P+!cPg|pn~;n@DiZ0Y>;k5mnKeS z!LIfT4{Lgd=MeysR5YiQKCeNhUQ;Os1kAymg6R!u?j%LF z4orCszIq_n52ulpes{(QN|zirdtBsc{9^Z72Ycb2ht?G^opkT_#|4$wa9`)8k3ilU z%ntAi`nakS1r10;#k^{-ZGOD&Z2|k=p40hRh5D7(&JG#Cty|ECOvwsSHkkSa)36$4 z?;v#%@D(=Raw(HP5s>#4Bm?f~n1@ebH}2tv#7-0l-i^H#H{PC|F@xeNS+Yw{F-&wH z07)bj8MaE6`|6NoqKM~`4%X> zKFl&7g1$Z3HB>lxn$J`P`6GSb6CE6_^NA1V%=*`5O!zP$a7Vq)IwJAki~XBLf=4TF zPYSL}>4nOGZ`fyHChq)jy-f{PKFp6$plHB2=;|>%Z^%)ecVue(*mf>EH_uO^+_zm? zJATFa9SF~tFwR#&0xO{LLf~@}s_xvCPU8TwIJgBs%FFzjm`u?1699RTui;O$rrR{# z1^MqMl5&6)G%@_k*$U5Kxq84!AdtbZ!@8FslBML}<`(Jr zenXrC6bFJP=R^FMBg7P?Pww-!a%G@kJH_zezKvuWU0>m1uyy}#Vf<$>u?Vzo3}@O% z1JR`B?~Tx2)Oa|{DQ_)y9=oY%haj!80GNHw3~qazgU-{|q+Bl~H94J!a%8UR?XsZ@ z0*ZyQugyru`V9b(0OrJOKISfi89bSVR zQy<+i_1XY}4>|D%X_`IKZUPz6=TDb)t1mC9eg(Z=tv zq@|r37AQM6A%H%GaH3szv1L^ku~H%5_V*fv$UvHl*yN4iaqWa69T2G8J2f3kxc7UE zOia@p0YNu_q-IbT%RwOi*|V|&)e5B-u>4=&n@`|WzH}BK4?33IPpXJg%`b=dr_`hU z8JibW_3&#uIN_#D&hX<)x(__jUT&lIH$!txEC@cXv$7yB&Rgu){M`9a`*PH} zRcU)pMWI2O?x;?hzR{WdzKt^;_pVGJAKKd)F$h;q=Vw$MP1XSd<;Mu;EU5ffyKIg+ z&n-Nb?h-ERN7(fix`htopPIba?0Gd^y(4EHvfF_KU<4RpN0PgVxt%7Yo99X*Pe|zR z?ytK&5qaZ$0KSS$3ZNS$$k}y(2(rCl=cuYZg{9L?KVgs~{?5adxS))Upm?LDo||`H zV)$`FF3icFmxcQshXX*1k*w3O+NjBR-AuE70=UYM*7>t|I-oix=bzDwp2*RoIwBp@r&vZukG; zyi-2zdyWJ3+E?{%?>e2Ivk`fAn&Ho(KhGSVE4C-zxM-!j01b~mTr>J|5={PrZHOgO zw@ND3=z(J7D>&C7aw{zT>GHhL2BmUX0GLt^=31RRPSnjoUO9LYzh_yegyPoAKhAQE z>#~O27dR4&LdQiak6={9_{LN}Z>;kyVYKH^d^*!`JVSXJlx#&r4>VnP$zb{XoTb=> zZsLvh>keP3fkLTIDdpf-@(ADfq4=@X=&n>dyU0%dwD{zsjCWc;r`-e~X$Q3NTz_TJ zOXG|LMQQIjGXY3o5tBm9>k6y<6XNO<=9H@IXF;63rzsC=-VuS*$E{|L_i;lZmHOD< zY92;>4spdeRn4L6pY4oUKZG<~+8U-q7ZvNOtW0i*6Q?H`9#U3M*k#4J;ek(MwF02x zUo1wgq9o6XG#W^mxl>pAD)Ll-V5BNsdVQ&+QS0+K+?H-gIBJ-ccB1=M_hxB6qcf`C zJ?!q!J4`kLhAMry4&a_0}up{CFevcjBl|N(uDM^N5#@&-nQt2>z*U}eJGi}m5f}l|IRVj-Q;a>wcLpK5RRWJ> zysdd$)Nv0tS?b~bw1=gvz3L_ZAIdDDPj)y|bp1;LE`!av!rODs-tlc}J#?erTgXRX z$@ph%*~_wr^bQYHM7<7=Q=45v|Hk7T=mDpW@OwRy3A_v`ou@JX5h!VI*e((v*5Aq3 zVYfB4<&^Dq5%^?~)NcojqK`(VXP$`#w+&VhQOn%;4pCkz;NEH6-FPHTQ+7I&JE1+Ozq-g43AEZV>ceQ^9PCx zZG@OlEF~!Lq@5dttlr%+gNjRyMwJdJU(6W_KpuVnd{3Yle(-p#6erIRc${l&qx$HA z89&sp=rT7MJ=DuTL1<5{)wtUfpPA|Gr6Q2T*=%2RFm@jyo@`@^*{5{lFPgv>84|pv z%y{|cVNz&`9C*cUely>-PRL)lHVErAKPO!NQ3<&l5(>Vp(MuJnrOf^4qpIa!o3D7( z1bjn#Vv$#or|s7Hct5D@%;@48mM%ISY7>7@ft8f?q~{s)@BqGiupoK1BAg?PyaDQ1 z`YT8{0Vz{zBwJ={I4)#ny{RP{K1dqzAaQN_aaFC%Z>OZ|^VhhautjDavGtsQwx@WH zr|1UKk^+X~S*RjCY_HN!=Jx>b6J8`Q(l4y|mc<6jnkHVng^Wk(A13-;AhawATsmmE#H%|8h}f1frs2x@Fwa_|ea+$tdG2Pz{7 z!ox^w^>^Cv4e{Xo7EQ7bxCe8U+LZG<_e$RnR?p3t?s^1Mb!ieB z#@45r*PTc_yjh#P=O8Zogo+>1#|a2nJvhOjIqKK1U&6P)O%5s~M;99O<|Y9zomWTL z666lK^QW`)cXV_^Y05yQZH3IRCW%25BHAM$c0>w`x!jh^15Zp6xYb!LoQ zr+RukTw0X2mxN%K0%=8|JHiaA3pg5+GMfze%9o5^#upx0M?G9$+P^DTx7~qq9$Qoi zV$o)yy zuUq>3c{_q+HA5OhdN*@*RkxRuD>Bi{Ttv_hyaaB;XhB%mJ2Cb{yL;{Zu@l{N?!GKE7es6_9J{9 zO(tmc0ra2;@oC%SS-8|D=omQ$-Dj>S)Utkthh{ovD3I%k}HoranSepC_yco2Q8 zY{tAuPIhD{X`KbhQIr%!t+GeH%L%q&p z3P%<-S0YY2Emjc~Gb?!su85}h_qdu5XN2XJUM}X1k^!GbwuUPT(b$Ez#LkG6KEWQB z7R&IF4srHe$g2R-SB;inW9T{@+W+~wi7VQd?}7||zi!&V^~o0kM^aby7YE_-B63^d zf_uo8#&C77HBautt_YH%v6!Q>H?}(0@4pv>cM6_7dHJ)5JdyV0Phi!)vz}dv{*n;t zf(+#Hdr=f8DbJqbMez)(n>@QT+amJ7g&w6vZ-vG^H1v~aZqG~u!1D(O+jVAG0EQ*aIsr*bsBdbD`)i^FNJ z&B@yxqPFCRGT#}@dmu-{0vp47xk(`xNM6E=7QZ5{tg6}#zFrd8Pb_bFg7XP{FsYP8 zbvWqG6#jfg*4gvY9!gJxJ3l2UjP}+#QMB(*(?Y&Q4PO`EknE&Cb~Yb@lCbk;-KY)n zzbjS~W5KZ3FV%y>S#$9Sqi$FIBCw`GfPDP|G=|y32VV-g@a1D&@%_oAbB@cAUx#aZ zlAPTJ{iz#Qda8(aNZE&0q+8r3&z_Ln)b=5a%U|OEcc3h1f&8?{b8ErEbilrun}mh3 z$1o^$-XzIiH|iGoJA`w`o|?w3m*NX|sd$`Mt+f*!hyJvQ2fS*&!SYn^On-M|pHGlu z4SC5bM7f6BAkUhGuN*w`97LLkbCx=p@K5RL2p>YpDtf{WTD|d3ucb6iVZ-*DRtoEA zCC5(x)&e=giR_id>5bE^l%Mxx>0@FskpCD4oq@%-Fg$8IcdRwkfn;DsjoX(v;mt3d z_4Mnf#Ft4x!bY!7Hz?RRMq9;5FzugD(sbt4up~6j?-or+ch~y_PqrM2hhTToJjR_~ z)E1idgt7EW>G*9%Q^K;o_#uFjX!V2pwfpgi>}J&p_^QlZki!@#dkvR`p?bckC`J*g z=%3PkFT3HAX2Q+dShHUbb1?ZcK8U7oaufLTCB#1W{=~k0Jabgv>q|H+GU=f-y|{p4 zwN|AE+YbCgx=7vlXE?@gkXW9PaqbO#GB=4$o0FkNT#EI?aLVd2(qnPK$Yh%YD%v(mdwn}bgsxyIBI^)tY?&G zi^2JfClZ@4b{xFjyTY?D61w@*ez2@5rWLpG#34id?>>oPg{`4F-l`7Lg@D@Hc}On} zx%BO4MsLYosLGACJ-d?ifZ35r^t*}wde>AAWO*J-X%jvD+gL9`u`r=kP zyeJ%FqqKfz8e_3K(M1RmB?gIYi{W7Z<THP2ihue0mbpu5n(x_l|e1tw(q!#m5lmef6ktqIb${ zV+ee#XRU}_dDDUiV@opHZ@EbQ<9qIZJMDsZDkW0^t3#j`S)G#>N^ZBs8k+FJhAfu< z%u!$%dyP3*_+jUvCf-%{x#MyDAK?#iPfE<(@Q0H7;a125eD%I(+!x1f;Sy`e<9>nm zQH4czZDQmW7^n>jL)@P@aAuAF$;I7JZE5a8~AJI5CNDqyf$gjloKR7C?OPt9yeH}n5 zNF8Vhmd%1O>T4EZD&0%Dt7YWNImmEV{7QF(dy!>q5k>Kh&Xy8hcBMUvVV~Xn8O&%{ z&q=JCYw#KlwM8%cu-rNadu(P~i3bM<_a{3!J*;vZhR6dln6#eW0^0kN)Vv3!bqM`w z{@j*eyzz=743dgFPY`Cx3|>ata;;_hQ3RJd+kU}~p~aphRx`03B>g4*~f%hUV+#D9rYRbsGD?jkB^$3XcgB|3N1L& zrmk9&Dg450mAd=Q_p?gIy5Zx7vRL?*rpNq76_rysFo)z)tp0B;7lSb9G5wX1vC9Lc z5Q8tb-alolVNWFsxO_=12o}X(>@Mwz1mkYh1##(qQwN=7VKz?61kay8A9(94Ky(4V zq6qd2+4a20Z0QRrmp6C?4;%U?@MatfXnkj&U6bP_&2Ny}BF%4{QhNx*Tabik9Y-~Z z@0WV6XD}aI(%pN}oW$X~Qo_R#+1$@J8(31?zM`#e`#(0f<-AZ^={^NgH#lc?oi(Mu zMk|#KR^Q;V@?&(sh5)D;-fu)rx%gXZ1&5)MR+Mhssy+W>V%S|PRNyTAd}74<(#J>H zR(1BfM%eIv0+ngHH6(i`?-%_4!6PpK*0X)79SX0X$`lv_q>9(E2kkkP;?c@rW2E^Q zs<;`9dg|lDMNECFrD3jTM^Mn-C$44}9d9Kc z#>*k&e#25;D^%82^1d@Yt{Y91MbEu0C}-;HR4+IaCeZ`l?)Q8M2~&E^FvJ?EBJJ(% zz1>tCW-E~FB}DI}z#+fUo+=kQME^=eH>^%V8w)dh*ugPFdhMUi3R2Cg}Zak4!k_8YW(JcR-)hY8C zXja}R7@%Q0&IzQTk@M|)2ViZDNCDRLNI)*lH%SDa^2TG4;%jE4n`8`aQAA$0SPH2@ z)2eWZuP26+uGq+m8F0fZn)X^|bNe z#f{qYZS!(CdBdM$N2(JH_a^b#R2=>yVf%JI_ieRFB{w&|o9txwMrVxv+n78*aXFGb z>Rkj2yq-ED<)A46T9CL^$iPynv`FoEhUM10@J+UZ@+*@_gyboQ>HY9CiwTUo7OM=w zd~$N)1@6U8H#Zu(wGLa_(Esx%h@*pmm5Y9OX@CY`3kPYPQx@z8yAgtm(+agDU%4?c zy8pR4SYbu8vY?JX6HgVq7|f=?w(%`m-C+a@E{euXo>XrGmkmFGzktI*rj*8D z)O|CHKXEzH{~iS+6)%ybRD|JRQ6j<+u_+=SgnJP%K+4$st+~XCVcAjI9e5`RYq$n{ zzy!X9Nv7>T4}}BZpSj9G9|(4ei-}Du<_IZw+CB`?fd$w^;=j8?vlp(#JOWiHaXJjB0Q00RHJ@sG6N#y^H7t^&V} z;VrDI4?75G$q5W9mV=J2iP24NHJy&d|HWHva>FaS#3AO?+ohh1__FMx;?`f{HG3v0 ztiO^Wanb>U4m9eLhoc_2B(ca@YdnHMB*~aYO+AE(&qh@?WukLbf_y z>*3?Xt-lxr?#}y%kTv+l8;!q?Hq8XSU+1E8x~o@9$)zO2z9K#(t`vPDri`mKhv|sh z{KREcy`#pnV>cTT7dm7M9B@9qJRt3lfo(C`CNkIq@>|2<(yn!AmVN?ST zbX_`JjtWa3&N*U{K7FYX8})*D#2@KBae` zhKS~s!r%SrXdhCsv~sF}7?ocyS?afya6%rDBu6g^b2j#TOGp^1zrMR}|70Z>CeYq- z1o|-=FBKlu{@;pm@QQJ_^!&hzi;0Z_Ho){x3O1KQ#TYk=rAt9`YKC0Y^}8GWIN{QW znYJyVTrmNvl!L=YS1G8BAxGmMUPi+Q7yb0XfG`l+L1NQVSbe^BICYrD;^(rke{jWCEZOtVv3xFze!=Z&(7}!)EcN;v0Dbit?RJ6bOr;N$ z=nk8}H<kCEE+IK3z<+3mkn4q!O7TMWpKShWWWM)X*)m6k%3luF6c>zOsFccvfLWf zH+mNkh!H@vR#~oe=ek}W3!71z$Dlj0c(%S|sJr>rvw!x;oCek+8f8s!U{DmfHcNpO z9>(IKOMfJwv?ey`V2ysSx2Npeh_x#bMh)Ngdj$al;5~R7Ac5R2?*f{hI|?{*$0qU- zY$6}ME%OGh^zA^z9zJUs-?a4ni8cw_{cYED*8x{bWg!Fn9)n;E9@B+t;#k}-2_j@# zg#b%R(5_SJAOtfgFCBZc`n<&z6)%nOIu@*yo!a% zpLg#36KBN$01W{b;qWN`Tp(T#jh%;Zp_zpS64lvBVY2B#UK)p`B4Oo)IO3Z&D6<3S zfF?ZdeNEnzE{}#gyuv)>;z6V{!#bx)` zY;hL*f(WVD*D9A4$WbRKF2vf;MoZVdhfWbWhr{+Db5@M^A4wrFReuWWimA4qp`GgoL2`W4WPUL5A=y3Y3P z%G?8lLUhqo@wJW8VDT`j&%YY7xh51NpVYlsrk_i4J|pLO(}(b8_>%U2M`$iVRDc-n zQiOdJbroQ%*vhN{!{pL~N|cfGooK_jTJCA3g_qs4c#6a&_{&$OoSQr_+-O^mKP=Fu zGObEx`7Qyu{nHTGNj(XSX*NPtAILL(0%8Jh)dQh+rtra({;{W2=f4W?Qr3qHi*G6B zOEj7%nw^sPy^@05$lOCjAI)?%B%&#cZ~nC|=g1r!9W@C8T0iUc%T*ne z)&u$n>Ue3FN|hv+VtA+WW)odO-sdtDcHfJ7s&|YCPfWaVHpTGN46V7Lx@feE#Od%0XwiZy40plD%{xl+K04*se zw@X4&*si2Z_0+FU&1AstR)7!Th(fdaOlsWh`d!y=+3m!QC$Zlkg8gnz!}_B7`+wSz z&kD?6{zPnE3uo~Tv8mLP%RaNt2hcCJBq=0T>%MW~Q@Tpt2pPP1?KcywH>in5@ zx+5;xu-ltFfo5vLU;2>r$-KCHjwGR&1XZ0YNyrXXAUK!FLM_7mV&^;;X^*YH(FLRr z`0Jjg7wiq2bisa`CG%o9i)o1`uG?oFjU_Zrv1S^ipz$G-lc^X@~6*)#%nn+RbgksJfl{w=k31(q>7a!PCMp5YY{+Neh~mo zG-3dd!0cy`F!nWR?=9f_KP$X?Lz&cLGm_ohy-|u!VhS1HG~e7~xKpYOh=GmiiU;nu zrZ5tWfan3kp-q_vO)}vY6a$19Q6UL0r znJ+iSHN-&w@vDEZ0V%~?(XBr|jz&vrBNLOngULxtH(Rp&U*rMY42n;05F11xh?k;n_DX2$4|vWIkXnbwfC z=ReH=(O~a;VEgVO?>qsP*#eOC9Y<_9Yt<6X}X{PyF7UXIA$f)>NR5P&4G_Ygq(9TwwQH*P>Rq>3T4I+t2X(b5ogXBAfNf!xiF#Gilm zp2h{&D4k!SkKz-SBa%F-ZoVN$7GX2o=(>vkE^j)BDSGXw?^%RS9F)d_4}PN+6MlI8*Uk7a28CZ)Gp*EK)`n5i z){aq=0SFSO-;sw$nAvJU-$S-cW?RSc7kjEBvWDr1zxb1J7i;!i+3PQwb=)www?7TZ zE~~u)vO>#55eLZW;)F(f0KFf8@$p)~llV{nO7K_Nq-+S^h%QV_CnXLi)p*Pq&`s!d zK2msiR;Hk_rO8`kqe_jfTmmv|$MMo0ll}mI)PO4!ikVd(ZThhi&4ZwK?tD-}noj}v zBJ?jH-%VS|=t)HuTk?J1XaDUjd_5p1kPZi6y#F6$lLeRQbj4hsr=hX z4tXkX2d5DeLMcAYTeYm|u(XvG5JpW}hcOs4#s8g#ihK%@hVz|kL=nfiBqJ{*E*WhC zht3mi$P3a(O5JiDq$Syu9p^HY&9~<#H89D8 zJm84@%TaL_BZ+qy8+T3_pG7Q%z80hnjN;j>S=&WZWF48PDD%55lVuC0%#r5(+S;WH zS7!HEzmn~)Ih`gE`faPRjPe^t%g=F ztpGVW=Cj5ZkpghCf~`ar0+j@A=?3(j@7*pq?|9)n*B4EQTA1xj<+|(Y72?m7F%&&& zdO44owDBPT(8~RO=dT-K4#Ja@^4_0v$O3kn73p6$s?mCmVDUZ+Xl@QcpR6R3B$=am z%>`r9r2Z79Q#RNK?>~lwk^nQlR=Hr-ji$Ss3ltbmB)x@0{VzHL-rxVO(++@Yr@Iu2 zTEX)_9sVM>cX$|xuqz~Y8F-(n;KLAfi*63M7mh&gsPR>N0pd9h!0bm%nA?Lr zS#iEmG|wQd^BSDMk0k?G>S-uE$vtKEF8Dq}%vLD07zK4RLoS?%F1^oZZI$0W->7Z# z?v&|a`u#UD=_>i~`kzBGaPj!mYX5g?3RC4$5EV*j0sV)>H#+$G6!ci=6`)85LWR=FCp-NUff`;2zG9nU6F~ z;3ZyE*>*LvUgae+uMf}aV}V*?DCM>{o31+Sx~6+sz;TI(VmIpDrN3z+BUj`oGGgLP z>h9~MP}Pw#YwzfGP8wSkz`V#}--6}7S9yZvb{;SX?6PM_KuYpbi~*=teZr-ga2QqIz{QrEyZ@>eN*qmy;N@FCBbRNEeeoTmQyrX;+ zCkaJ&vOIbc^2BD6_H+Mrcl?Nt7O{xz9R_L0ZPV_u!sz+TKbXmhK)0QWoe-_HwtKJ@@7=L+ z+K8hhf=4vbdg3GqGN<;v-SMIzvX=Z`WUa_91Yf89^#`G(f-Eq>odB^p-Eqx}ENk#&MxJ+%~Ad2-*`1LNT>2INPw?*V3&kE;tt?rQyBw? zI+xJD04GTz1$7~KMnfpkPRW>f%n|0YCML@ODe`10;^DXX-|Hb*IE%_Vi#Pn9@#ufA z_8NY*1U%VseqYrSm?%>F@`laz+f?+2cIE4Jg6 z_VTcx|DSEA`g!R%RS$2dSRM|9VQClsW-G<~=j5T`pTbu-x6O`R z98b;}`rPM(2={YiytrqX+uh65f?%XiPp`;4CcMT*E*dQJ+if9^D>c_Dk8A(cE<#r=&!& z_`Z01=&MEE+2@yr!|#El=yM}v>i=?w^2E_FLPy(*4A9XmCNy>cBWdx3U>1RylsItO z4V8T$z3W-qqq*H`@}lYpfh=>C!tieKhoMGUi)EpWDr;yIL&fy};Y&l|)f^QE*k~4C zH>y`Iu%#S)z)YUqWO%el*Z)ME#p{1_8-^~6UF;kBTW zMQ!eXQuzkR#}j{qb(y9^Y!X7&T}}-4$%4w@w=;w+>Z%uifR9OoQ>P?0d9xpcwa>7kTv2U zT-F?3`Q`7xOR!gS@j>7In>_h){j#@@(ynYh;nB~}+N6qO(JO1xA z@59Pxc#&I~I64slNR?#hB-4XE>EFU@lUB*D)tu%uEa))B#eJ@ZOX0hIulfnDQz-y8 z`CX@(O%_VC{Ogh&ot``jlDL%R!f>-8yq~oLGxBO?+tQb5%k@a9zTs!+=NOwSVH-cR zqFo^jHeXDA_!rx$NzdP;>{-j5w3QUrR<;}=u2|FBJ;D#v{SK@Z6mjeV7_kFmWt95$ zeGaF{IU?U>?W`jzrG_9=9}yN*LKyzz))PLE+)_jc#4Rd$yFGol;NIk(qO1$5VXR)+ zxF7%f4=Q!NzR>DVXUB&nUT&>Nyf+5QRF+Z`X-bB*7=`|Go5D1&h~ zflKLw??kpiRm0h3|1GvySC2^#kcFz^5{79KKlq@`(leBa=_4CgV9sSHr{RIJ^KwR_ zY??M}-x^=MD+9`v@I3jue=OCn0kxno#6i>b(XKk_XTp_LpI}X*UA<#* zsgvq@yKTe_dTh>q1aeae@8yur08S(Q^8kXkP_ty48V$pX#y9)FQa~E7P7}GP_CbCm zc2dQxTeW(-~Y6}im24*XOC8ySfH*HMEnW3 z4CXp8iK(Nk<^D$g0kUW`8PXn2kdcDk-H@P0?G8?|YVlIFb?a>QunCx%B9TzsqQQ~HD!UO7zq^V!v9jho_FUob&Hxi ztU1nNOK)a!gkb-K4V^QVX05*>-^i|{b`hhvQLyj`E1vAnj0fbqqO%r z6Q;X1x0dL~GqMv%8QindZ4CZ%7pYQW~ z9)I*#Gjref-q(4Z*E#1c&rE0-_(4;_M(V7rgH_7H;ps1s%GBmU z{4a|X##j#XUF2n({v?ZUUAP5k>+)^F)7n-npbV3jAlY8V3*W=fwroDS$c&r$>8aH` zH+irV{RG3^F3oW2&E%5hXgMH9>$WlqX76Cm+iFmFC-DToTa`AcuN9S!SB+BT-IA#3P)JW1m~Cuwjs`Ep(wDXE4oYmt*aU z!Naz^lM}B)JFp7ejro7MU9#cI>wUoi{lylR2~s)3M!6a=_W~ITXCPd@U9W)qA5(mdOf zd3PntGPJyRX<9cgX?(9~TZB5FdEHW~gkJXY51}?s4ZT_VEdwOwD{T2E-B>oC8|_ZwsPNj=-q(-kwy%xX2K0~H z{*+W`-)V`7@c#Iuaef=?RR2O&x>W0A^xSwh5MsjTz(DVG-EoD@asu<>72A_h<39_# zawWVU<9t{r*e^u-5Q#SUI6dV#p$NYEGyiowT>>d*or=Ps!H$-3={bB|An$GPkP5F1 zTnu=ktmF|6E*>ZQvk^~DX(k!N`tiLut*?3FZhs$NUEa4ccDw66-~P;x+0b|<!ZN7Z%A`>2tN#CdoG>((QR~IV_Gj^Yh%!HdA~4C3jOXaqb6Ou z21T~Wmi9F6(_K0@KR@JDTh3-4mv2=T7&ML<+$4;b9SAtv*Uu`0>;VVZHB{4?aIl3J zL(rMfk?1V@l)fy{J5DhVlj&cWKJCcrpOAad(7mC6#%|Sn$VwMjtx6RDx1zbQ|Ngg8N&B56DGhu;dYg$Z{=YmCNn+?ceDclp65c_RnKs4*vefnhudSlrCy6-96vSB4_sFAj# zftzECwmNEOtED^NUt{ZDjT7^g>k1w<=af>+0)%NA;IPq6qx&ya7+QAu=pk8t>KTm` zEBj9J*2t|-(h)xc>Us*jHs)w9qmA>8@u21UqzKk*Ei#0kCeW6o z-2Q+Tvt25IUkb}-_LgD1_FUJ!U8@8OC^9(~Kd*0#zr*8IQkD)6Keb(XFai5*DYf~` z@U?-{)9X&BTf!^&@^rjmvea#9OE~m(D>qfM?CFT9Q4RxqhO0sA7S)=--^*Q=kNh7Y zq%2mu_d_#23d`+v`Ol263CZ<;D%D8Njj6L4T`S*^{!lPL@pXSm>2;~Da- zBX97TS{}exvSva@J5FJVCM$j4WDQuME`vTw>PWS0!;J7R+Kq zVUy6%#n5f7EV(}J#FhDpts;>=d6ow!yhJj8j>MJ@Wr_?x30buuutIG97L1A*QFT$c ziC5rBS;#qj=~yP-yWm-p(?llTwDuhS^f&<(9vA9@UhMH2-Fe_YAG$NvK6X{!mvPK~ zuEA&PA}meylmaIbbJXDOzuIn8cJNCV{tUA<$Vb?57JyAM`*GpEfMmFq>)6$E(9e1@W`l|R%-&}38#bl~levA#fx2wiBk^)mPj?<=S&|gv zQO)4*91$n08@W%2b|QxEiO0KxABAZC{^4BX^6r>Jm?{!`ZId9jjz<%pl(G5l));*`UU3KfnuXSDj2aP>{ zRIB$9pm7lj3*Xg)c1eG!cb+XGt&#?7yJ@C)(Ik)^OZ5><4u$VLCqZ#q2NMCt5 z6$|VN(RWM;5!JV?-h<JkEZ(SZF zC(6J+>A6Am9H7OlOFq6S62-2&z^Np=#xXsOq0WUKr zY_+Ob|CQd1*!Hirj5rn*=_bM5_zKmq6lG zn*&_=x%?ATxZ8ZTzd%biKY_qyNC#ZQ1vX+vc48N>aJXEjs{Y*3Op`Q7-oz8jyAh>d zNt_qvn`>q9aO~7xm{z`ree%lJ3YHCyC`q`-jUVCn*&NIml!uuMNm|~u3#AV?6kC+B z?qrT?xu2^mobSlzb&m(8jttB^je0mx;TT8}`_w(F11IKz83NLj@OmYDpCU^u?fD{) z&=$ptwVw#uohPb2_PrFX;X^I=MVXPDpqTuYhRa>f-=wy$y3)40-;#EUDYB1~V9t%$ z^^<7Zbs0{eB93Pcy)96%XsAi2^k`Gmnypd-&x4v9rAq<>a(pG|J#+Q>E$FvMLmy7T z5_06W=*ASUyPRfgCeiPIe{b47Hjqpb`9Xyl@$6*ntH@SV^bgH&Fk3L9L=6VQb)Uqa z33u#>ecDo&bK(h1WqSH)b_Th#Tvk&%$NXC@_pg5f-Ma#7q;&0QgtsFO~`V&{1b zbSP*X)jgLtd@9XdZ#2_BX4{X~pS8okF7c1xUhEV9>PZco>W-qz7YMD`+kCGULdK|^ zE7VwQ-at{%&fv`a+b&h`TjzxsyQX05UB~a0cuU-}{*%jR48J+yGWyl3Kdz5}U>;lE zgkba*yI5>xqIPz*Y!-P$#_mhHB!0Fpnv{$k-$xxjLAc`XdmHd1k$V@2QlblfJPrly z*~-4HVCq+?9vha>&I6aRGyq2VUon^L1a)g`-Xm*@bl2|hi2b|UmVYW|b+Gy?!aS-p z86a}Jep6Mf>>}n^*Oca@Xz}kxh)Y&pX$^CFAmi#$YVf57X^}uQD!IQSN&int=D> zJ>_|au3Be?hmPKK)1^JQ(O29eTf`>-x^jF2xYK6j_9d_qFkWHIan5=7EmDvZoQWz5 zZGb<{szHc9Nf@om)K_<=FuLR<&?5RKo3LONFQZ@?dyjemAe4$yDrnD zglU#XYo6|~L+YpF#?deK6S{8A*Ou;9G`cdC4S0U74EW18bc5~4>)<*}?Z!1Y)j;Ot zosEP!pc$O^wud(={WG%hY07IE^SwS-fGbvpP?;l8>H$;}urY2JF$u#$q}E*ZG%fR# z`p{xslcvG)kBS~B*^z6zVT@e}imYcz_8PRzM4GS52#ms5Jg9z~ME+uke`(Tq1w3_6 zxUa{HerS7!Wq&y(<9yyN@P^PrQT+6ij_qW3^Q)I53iIFCJE?MVyGLID!f?QHUi1tq z0)RNIMGO$2>S%3MlBc09l!6_(ECxXTU>$KjWdZX^3R~@3!SB zah5Za2$63;#y!Y}(wg1#shMePQTzfQfXyJ-Tf`R05KYcyvo8UW9-IWGWnzxR6Vj8_la;*-z5vWuwUe7@sKr#Tr51d z2PWn5h@|?QU3>k=s{pZ9+(}oye zc*95N_iLmtmu}H-t$smi49Y&ovX}@mKYt2*?C-i3Lh4*#q5YDg1Mh`j9ovRDf9&& zp_UMQh`|pC!|=}1uWoMK5RAjdTg3pXPCsYmRkWW}^m&)u-*c_st~gcss(`haA)xVw zAf=;s>$`Gq_`A}^MjY_BnCjktBNHY1*gzh(i0BFZ{Vg^F?Pbf`8_clvdZ)5(J4EWzAP}Ba5zX=S(2{gDugTQ3`%!q`h7kYSnwC`zEWeuFlODKiityMaM9u{Z%E@@y1jmZA#ⅅ8MglG&ER{i5lN315cO?EdHNLrg? zgxkP+ytd)OMWe7QvTf8yj4;V=?m172!BEt@6*TPUT4m3)yir}esnIodFGatGnsSfJ z**;;yw=1VCb2J|A7cBz-F5QFOQh2JDQFLarE>;4ZMzQ$s^)fOscIVv2-o{?ct3~Zv zy{0zU>3`+-PluS|ADraI9n~=3#Tvfx{pDr^5i$^-h5tL*CV@AeQFLxv4Y<$xI{9y< zZ}li*WIQ+XS!IK;?IVD0)C?pNBA(DMxqozMy1L#j+ba1Cd+2w&{^d-OEWSSHmNH>9 z%1Ldo(}5*>a8rjQF&@%Ka`-M|HM+m<^E#bJtVg&YM}uMb7UVJ|OVQI-zt-*BqQ zG&mq`Bn7EY;;+b%Obs9i{gC^%>kUz`{Qnc=ps7ra_UxEP$!?f&|5fHnU(rr?7?)D z$3m9e{&;Zu6yfa1ixTr;80IP7KLgkKCbgv1%f_weZK6b7tY+AS%fyjf6dR(wQa9TD zYG9`#!N4DqpMim|{uViKVf0B+Vmsr7p)Y+;*T~-2HFr!IOedrpiXXz+BDppd5BTf3 ztsg4U?0wR?9@~`iV*nwGmtYFGnq`X< zf?G%=o!t50?gk^qN#J(~!sxi=_yeg?Vio04*w<2iBT+NYX>V#CFuQGLsX^u8dPIkP zPraQK?ro`rqA4t7yUbGYk;pw6Z})Bv=!l-a5^R5Ra^TjoXI?=Qdup)rtyhwo<(c9_ zF>6P%-6Aqxb8gf?wY1z!4*hagIch)&A4treifFk=E9v@kRXyMm?V*~^LEu%Y%0u(| z52VvVF?P^D<|fG)_au(!iqo~1<5eF$Sc5?)*$4P3MAlSircZ|F+9T66-$)0VUD6>e zl2zlSl_QQ?>ULUA~H?QbWazYeh61%B!!u;c(cs`;J|l z=7?q+vo^T#kzddr>C;VZ5h*;De8^F2y{iA#9|(|5@zYh4^FZ-3r)xej=GghMN3K2Y z=(xE`TM%V8UHc4`6Cdhz4%i0OY^%DSguLUXQ?Y3LP+5x3jyN)-UDVhEC}AI5wImt; zHY|*=UW}^bS3va-@L$-fJz2P2LbCl)XybkY)p%2MjPJd-FzkdyWW~NBC@NlPJkz{v z+6k6#nif`E>>KCGaP34oY*c#nBFm#G8a0^px1S6mm6Cs+d}E8{J;DX=NEHb|{fZm0 z@Ors@ebTgbf^Jg&DzVS|h&Or)56$+;%&sh0)`&6VkS@QxQ=#6WxF5g+FWSr7Lp9uF zV#rc`yLe?f*u6oZoi3WpOkKFf^>lHb2GC6t!)dyGaQbK7&BNZ7oyP)hUX1Y(LdW-I z6LI2$i%+g!zsjT(5l}5ROLb)8`9kkldbklcq6tfLSrAyh#s(C1U2Sz9`h3#T9eX#Hryi1AU^!uv*&6I~qdM_B7-@`~8#O^jN&t7+S zTKI6;T$1@`Kky-;;$rU1*TdY;cUyg$JXalGc&3-Rh zJ&7kx=}~4lEx*%NUJA??g8eIeavDIDC7hTvojgRIT$=MlpU}ff0BTTTvjsZ0=wR)8 z?{xmc((XLburb0!&SA&fc%%46KU0e&QkA%_?9ZrZU%9Wt{*5DCUbqIBR%T#Ksp?)3 z%qL(XlnM!>F!=q@jE>x_P?EU=J!{G!BQq3k#mvFR%lJO2EU2M8egD?0r!2s*lL2Y} zdrmy`XvEarM&qTUz4c@>Zn}39Xi2h?n#)r3C4wosel_RUiL8$t;FSuga{9}-%FuOU z!R9L$Q!njtyY!^070-)|#E8My)w*~4k#hi%Y77)c5zfs6o(0zaj~nla0Vt&7bUqfD zrZmH~A50GOvk73qiyfXX6R9x3Qh)K=>#g^^D65<$5wbZjtrtWxfG4w1f<2CzsKj@e zvdsQ$$f6N=-%GJk~N7G(+-29R)Cbz8SIn_u|(VYVSAnlWZhPp8z6qm5=hvS$Y zULkbE?8HQ}vkwD!V*wW7BDBOGc|75qLVkyIWo~3<#nAT6?H_YSsvS+%l_X$}aUj7o z>A9&3f2i-`__#MiM#|ORNbK!HZ|N&jKNL<-pFkqAwuMJi=(jlv5zAN6EW`ex#;d^Z z<;gldpFcVD&mpfJ1d7><79BnCn~z8U*4qo0-{i@1$CCaw+<$T{29l1S2A|8n9ccx0!1Pyf;)aGWQ15lwEEyU35_Y zQS8y~9j9ZiByE-#BV7eknm>ba75<_d1^*% zB_xp#q`bpV1f9o6C(vbhN((A-K+f#~3EJtjWVhRm+g$1$f2scX!eZkfa%EIZd2ZVG z6sbBo@~`iwZQC4rH9w84rlHjd!|fHc9~12Il&?-FldyN50A`jzt~?_4`OWmc$qkgI zD_@7^L@cwg4WdL(sWrBYmkH;OjZGE^0*^iWZM3HBfYNw(hxh5>k@MH>AerLNqUg*Og9LiYmTgPw zX9IiqU)s?_obULF(#f~YeK#6P>;21x+cJ$KTL}|$xeG?i`zO;dAk0{Uj6GhT-p-=f zP2NJUcRJ{fZy=bbsN1Jk3q}(!&|Fkt_~GYdcBd7^JIt)Q!!7L8`3@so@|GM9b(D$+ zlD&69JhPnT>;xlr(W#x`JJvf*DPX(4^OQ%1{t@)Lkw5nc5zLVmRt|s+v zn(25v*1Z(c8RP@=3l_c6j{{=M$=*aO^ zPMUbbEKO7m2Q$4Xn>GIdwm#P_P4`or_w0+J+joK&qIP#uEiCo&RdOaP_7Z;PvfMh@ zsXUTn>ppdoEINmmq5T1BO&57*?QNLolW-8iz-jv7VAIgoV&o<<-vbD)--SD%FFOLd z>T$u+V>)4Dl6?A24xd1vgm}MovrQjf-@YH7cIk6tP^eq-xYFymnoSxcw}{lsbCP1g zE_sX|c_nq(+INR3iq+Oj^TwkjhbdOo}FmpPS2*#NGxNgl98|H0M*lu)Cu0TrA|*t=i`KIqoUl(Q7jN zb6!H-rO*!&_>-t)vG5jG>WR6z#O9O&IvA-4ho9g;as~hSnt!oF5 z6w(4pxz|WpO?HO<>sC_OB4MW)l`-E9DZJ$!=ytzO}fWXwnP>`8yWm5tYw`b1KDdg zp@oD;g===H+sj+^v6DCpEu7R?fh7>@pz>f74V5&#PvBN+95?28`mIdGR@f*L@j2%% z%;Rz5R>l#1U zYCS_5_)zUjgq#0SdO#)xEfYJ)JrHLXfe8^GK3F*CA(Y)jsSPJ{j&Ae!SeWN%Ev727 zxdd3Y0n^OBOtBSKdglEBL)i5=NdKfqK=1n~6LX`ja;#Tr!II$AAH{Z#sp%`rwNGT5 zvHT%(LJB+kD{5N}7c_Rk6}@tikIeq%@MqxX%$P!(238YD(H<_d;xxo*oMiv^1io>g zt5z&6`}cjci90q2r0hutQXr!UA~|4e*u=k81D(Cp7n{4LVCa+u0%-8Uha+sqI#Om~ z!&)KN(#Zone^~&@Ja{|l?X64Dxk)q>tLRv{=0|t$`Kdaj z#{AJr>{_BtpS|XEgTVJ4WMvBRk-(mk@ZYGdY1VwI z81;z(MBGV|2j*Cj%dvl8?b2{{B#e0B7&7wfv+>g`R2^Ai5C_WUx|CnTrHm+RFGXrt zs<~zBtk@?Niu%|o6IEL+y60Q>zJlv``ePCa07C%*O~lj?74|}&A0!uA)3V7ST8b_- z6CBP1;x+S@xTzgOY2#s%@=bhZ@i@BwmS)neQG&=9KUtRf^K=MvjC5JnqLqykCE_P0 zjf#V4SdH2#%2EuDb!>FLHK7j;nd6VLW|$3gJuegpEl3DZ`BpJU$<}}A(rW?<6OB@9 zKP9G3An?T5BztrLdlximA;{>Tr7GAeSU=^<*y;%RHj+7;v+tonyh(8d;Izn}2{oz& zW)fsZ9gHYpI?B|uekS3zHUue3mI zb7?0+&Zm>Kq(F>~%VYEn)0b32I3~O^?Wx-HI|Zu?1-OA2yfyJ;gWygLOeU;)vRm3u z5J4vDIQYztnEm=QauX2(WJO{yzI0HUFl+oO&isMf!Yh2pu@p}65)|0EdWRbg(@J6qo5_Els>#|_2a1p0&y&UP z8x#Z69q=d663NPPi>DHx3|QhJl5Ka$Cfqbvl*oRLYYXiH>g8*vriy!0XgmT~&jh3l z+!|~l=oCj<*PD>1EY*#+^a{rVk3T(66rJ^DxGt|~XTNnJf$vix1v1qdYu+d@Jn~bh z!7`a`y+IEcS#O*fSzA;I`e_T~XYzpW7alC%&?1nr);tSkNwO&J`JnX+7X1Q8fRh_d zx%)Xh_YjI3hwTCmGUeq_Z@H#ovkk_b(`osa$`aNmt`9A#t&<^jvuf z1E1DrW(%7PpAOQGwURz@luEW9-)L!`Jy*aC*4mcD?Si~mb=3Kn#M#1il9%`C0wkZ` zbpJ-qEPaOE5Y5iv_z%Wr{y4jh#U+o^KtP{pPCq-Qf&!=Uu)cEE(Iu9`uT#oHwHj+w z_R=kr7vmr~{^5sxXkj|WzNhAlXkW^oB4V)BZ{({~4ylOcM#O>DR)ZhD;RWwmf|(}y zDn)>%iwCE=*82>zP0db>I4jN#uxcYWod+<;#RtdMGPDpQW;riE;3cu``1toL|FaWa zK)MVA%ogXt3q55(Q&q+sjOG`?h=UJE9P;8i#gI*#f}@JbV(DuGEkee;La*9{p&Z?;~lE!&-kUFCtoDHY*MS zzj+S$L9+aTs(F^4ufZe6>SBg;m@>0&+kEZMFmD*~p~sx?rx=!>Ge;KYw<33y#*&77 zFZI`YE(Iz?+tH;Fq;y=MaSqT{Ayh*HFv0(z{_?Q+7@nE%p?S8%X6c!+y;!0NLXwJV8Co_}R3*7>n+oMsQpv8}8ZS-P@(Rg|gmxZHzf=nMOUAAY}AZGfWVzZjE@4$=7xkIrs8BE%606aVU%kxz_04ipig51k& z(>c9rJL2q%xvU%Zj#GR9C9)HLCR;#zQBB@x;e_9$ayn(JmSg_*0G?+wOF?&iu@}S{ zt$;TPf*Lj$3=d<}Q3o!Hq@3~lFxoiCyeEt}o3fihIn{x2s1)e2@3##&GYDq~YO|!q zUs0P-zy)+ohl-VQ`bhvUpC{-d$lkpML_M%Kl6@#_@A}w{jWCDsPa#cSbWA#C4Sf|*C*&Z{ zz?hOU7Cc`?>H$WGqITA2P~fYudnQHxB8^;0ZFKC;19F#~n_2P@{cE{Czq-#K5L_8| zc3aOEwq4%zL5>YU_mc9fc-p~{fBTWUkxTiZvxt9FOqC{s#TBp(#dWc+{Ee{dZ#B!g zHnaOJ8;KO1G;QU2ciodE+#Z$Wuz*Hc6NRO!AUMi|gov=>=cwcZeL&`>Jfn!35hV1J z;B2@0!bIR853w%T*m6)gQ?DPnQ)o6EtKaN3L;o?*q<83d&lG&U=A|6hcT?f0)4h6{ zGIZ0|!}-?*n{zr}-}cC}qWxEN%g60+{my)o^57{QEn(tSrmD7o)|r0+HVpQPopFu; z0<S}pW8W2vXzSxEqGD+qePj^x?R$e2LO&*ewsLo{+_Z)Wl|Z1K47j zsKoNRlX)h2z^ls_>IZ0!2X5t&irUs%RAO$Dr>0o$-D+$!Kb9puSgpoWza1jnX6(eG zTg-U z6|kf1atI!_>#@|=d01Ro@Rg)BD?mY3XBsG7U9%lmq>4;Gf&2k3_oyEOdEN&X6Hl5K zCz^hyt67G;IE&@w1n~%ji_{sob_ssP#Ke|qd!Xx?J&+|2K=^`WfwZ-zt|sklFouxC zXZeDgluD2a?Zd3e{MtE$gQfAY9eO@KLX;@8N`(?1-m`?AWp!a8bA%UN>QTntIcJX zvbY+C-GD&F?>E?jo$xhyKa@ps9$Dnwq>&)GB=W~2V3m)k;GNR$JoPRk%#f3#hgVdZ zhW3?cSQ*((Fog26jiEeNvum-6ID-fbfJ?q1ZU#)dgnJ^FCm`+sdP?g;d4VD$3XKx{ zs|Y4ePJp|93fpu)RL+#lIN9Ormd;<_5|oN!k5CENnpO>{60X;DN>vgHCX$QZYtgrj z*1{bEA1LKi8#U%oa!4W-4G+458~`5O4S1&tuyv>%H9DjLip7cC~RRS@HvdJ<|c z$TxEL=)r)XTfTgVxaG!gtZhLL`$#=gz1X=j|I@n~eHDUCW39r=o_ml@B z0cDx$5;3OA2l)&41kiKY^z7sO_U%1=)Ka4gV(P#(<^ z_zhThw=}tRG|2|1m4EP|p{Swfq#eNzDdi&QcVWwP+7920UQB*DpO0(tZHvLVMIGJl zdZ5;2J%a!N1lzxFwAkq05DPUg2*6SxcLRsSNI6dLiK0&JRuYAqwL}Z!YVJ$?mdnDF z82)J_t=jbY&le6Hq$Qs}@AOZGpB1}$Ah#i;&SzD1QQNwi6&1ddUf7UG0*@kX?E zDCbHypPZ9+H~KnDwBeOXZ-W-Y80wpoGB*A) z_;26Z`#s0tKrf~QBi2rl2=>;CS1w)rcD3-sB!8NI*1iQo59PJ>OLnqeV4iK7`RBi^ zFW{*6;nlD&cSunmU3v4JKj|K4xeN(q>H%;SsY8yDdw5BJ75q8>Ov)&D5OPZ`XiRHl z;)mAA0Woy6f!xCK(9H2rq?qzp83liZAIpBPl-dQ&$2=&H?Im~%g;vnIw1I+8q|kr! z36&^9}CMmR(U2rf|j12oG=vb%Ypsq8u9Kq}U*ANX*)9uK}fAi8;V_7Z;0_4*iydDxN-? zv?qJ=T*{MzL~-xUv{_Kh_q9#F{8gPV!yPUUS8pEq*=}2-#1d=sC_|U-rX~F0 zBLawgCWy#?#ax{~DAnDvh^`}wyUO`ioMK~jgh%L7^}#h?beSyvQ_g>+`2`}`-1h7# zg*?qJdm=53hwN8~B=^|LPmYtOVrQ(W{sNm4uofq=4P@dUA%$onWbw_m-KWia&n9iv zi)!9#OJ#^}eg8tE{wSb9(c0D^PS1 z9EBS5*ypSiVRS_G0v?$hyoZOS7hFWlp4qbYkf9Y&{%OzhsIdHskLptn96@k6@^K@U zszd8POehITDK+AyW#JKpnWY;ju#MC$JjB1Y*~(E6N%{p#kO+bVxG3X<34n3fW=k{A zCZt|KP%x^GQ9%mU)KE0{LA=vaZvRQbxSlK~eAkwWo2Z<{j5eS5NVTMe`m%re8%~7K zZLtU&b~YDN%~uA9wPf>x2=PI=MA6_oVe>Ek$s5&&Z=8vvF5EODP4Av(b|dlNgF1O8 zy83W0WRdzjz2iNA~t1piEqlyU&`$yZtqR`6X_PmuP>W+D|8iH;FQ zN{JuU#Tz9mV=4R_IewROL1|mK^`lLat#LcIBfggzM(iO$pQT*-c_ z94^LUWw#5B9~sp2W1p`c)Y(xfR<{O^9n4E6vDDw{#-R4UMBKo{>Hqlqn*a9rl_>+0 zS5MwJC~nCC`1X%VCyWFsiDX;bfAJQAUkU#105f_s5U-8rqO}n8fA1{b>Fr6Q|Ea(V z5B11Lo^ooWF?`^{-U#?iatokWI-e$632frzY?Yzzx(xJc@LFM4A~-eg!u|tl{)8Nx ztZLXsSC*68g%9TFu(f&J9nmc^9hgyy#uUOMJFCaifSaDcyQ&6=8e9=t zIFEAQ{EK{|73{($!a4=!wj4ABcQrUQp#+gGM?wEUp(w@+Fzi{!lt}|3`PM%&d-seeR zB$}BrFGD3R10CE>Hsb>;PrP}pd` zaY4}6+Wu(`#uAV+E5SV7VIT7ES#b(U0%%DgN1}USJH>)mm;CHPv>}B18&0F~Kj@1= z&^Jyo+z-E)GRT4U*7$8wJO1OibWg0Jw>C$%Ge|=YwV@Y1(4fR>cV#6aGtRoF@I`*w_V4;)V231NzNqb6g@jdpjmjv*<2j02yU$F8ZS$fTvCC`%|Yn#x< zXUnP&b!GLpOY-TY3d?<-Hhxom_LM9`JC9LEX2{t1P-Nj%nG+0Vq)vQwvO^}coPH-> zAo8w#s>Je^Yy*#PlK=XDxpVS~pFe-j#jN-(As&LRewOf(kN-aKF(H+s*{*!0xrlZw zchJu@XAvQWX7DI1E8?F}Wc8m46eT+C<0eXVB+Z^(g=Kl@FG-cn@u$suj)1V2(KNg_ zh29ws6&6(q~+sOAoHY^o86A<#n*?Pg2)cK$+y;cY$hJLq4)4V84=j+3ShSr##Tk5kgmxB zkW+8A1GtceEx~^Ebhwm36U?oA)h)!mt=eg0QE$D1QsLNZ_T3NH?=B&0j~#298!6iv zhc0|-{46*3`Rx&nKSXnf1&w-Rs>#PGAGuY@cBTU-j|Fxbn3z49S#6KBaP^Lx*AOXxIibr z!1ysMi(&kr!1wwQB5w`BDH2~>T4bI`T1}A2RM0zd7ikC&kuBRsB`Z2@J!Udm{AmSN zrr0k6_qCZL**=)xRW`MFu(OY=OT;3G8eF~ z2mmkXZ9X(sjuKmq+_<=LSjphB$~R1o^Yb=rO!j!(4ErIox^x55o{pXSE9X$!76^*$ zoKhlAX6y%n^U=C~@!vIlEgXQGD@>oOU=_(aXF-Sjas*$AKESfRzxQ8#3yOj|y0OCU z>6Z-0%LCcjla&7I+CXm&caKp@@jQ!5M`(_{CL=@4#JJ}cHeZw>^b6fpv269LSV?gV5Q{kk?4;;y9RIsy5vk%DIRiL(9xe1aA@4!VX zDh2}xgUd5X?6nji%&7-%QuyKSYA-Z{PwJijUQ}In+EJl|x@dF1P<5bPa5W3&&?^h$ zZCo8LepKo0a(Fsln*cHL;D(gu9MMkoiM0*n31u)jHqX5x^F95tnI&^}^yKx3YwEm@ zo8?EZ710ykx@19{=yz5IXb8w4yjdveWb{IVL6Z(Cs>!a_0X^1E27o!4e&b43+J*u2Gb(59k2uK0goLwhO{ujLS ziI9LA9`&x~Y$6JNX!aEXR``}LUI}Gr#=<^wBHmg%v<)zRWDVtq)kT$-P7iU1R)2XZ zi~bYhV@EZ`@prgK(cs{>2jn$pxg$<|KjJ7%26Km>%KcXh^bU@y@V_Lf@=j1x%R4{v zOcQn{I}!2W<~08FOVnoV>zOTH=+>v9!jFo|q)ucqIe!N4{U5_G`>>*sVD{8I~4FqyU8imZ**-Gy`~Xd z4w35GMf%7^i65HdX{Iz|f2Kg193#KhPIeR)-=eYx3Z!%RM=JjwLrdk^B#6rg!ym2w zPbFqYyO4>W_Z6PonAwiu7?!h=x%sR-T+_*xZOGh2wWhWr%}%2^$$ zQvACIB~pi=m|`hXIMvoq`TOCx=J_D2>pi6$NPy3&8#vy|oX)=kM0Z}$BR$r0G}MzOk-OqG+VmZtOZoj6x4(tLh|5h) zBv64Y{DPHsy&_H(5_l(&Y}FhVvr9m_*_Q~Zy-}V9+VmGnvndEjYW4qt4K~N&Y&6g| zfpz*V=A#^mVmuOAz)(KVI<%v5NY0%Goy!{9&o41upsPWk(yFuRP|A4q6NMnX%V~MT zi_Rb-Bno2kI+j0Cw`@ydy{e%ARS#Z%b6I%_yfo_ZKXr4BLVoHzBKJ^ZG z-2>2IzU)55@9C|?_P$ew^-7zEiAKG1XAi{!3h%1m#9s%^pGy6S9wKFYY4<$djeoJP z{GI}Vd%idY$4_fh(7NXm7#;cC!DS&-{tGr!Qze{^%bUx2jgG@-kMta^q-EwrKB}d8 z{%FT>rFk_bzW<{lc%eYlrsiYTZXGgzD1&lmRyp+c1O=0=zAX=KV62bx-a~JP{cPF4 zU$-XT#(9&T>l@bMu3nSr{)%-5lV+0t&bxip4DVJ~vlL$J2P6X~ zd{FS8vm{Lhrieul*7&(AgPuXhjpGila%6_?-+k#b)cdk#M1jB*nE>G6NGOr+Ek{`= z9b%S1`$`=g0CC$>0$Db;l_szReLYVmce*(()9%Zz1`*fNXhI*oRlerWHarD(v^W^c zuc1Vuw6Gbp7ZsoRH>QGt#&lv;5G~Ovt$%7VFd*-rN2>UjbOWBFGNGO`bru7CFB4tn zL`^?69Lj_g_TA&`9`dSI8s|)K|QM0 zybvV7!>xDY|6c6y;Q}qs`){1+WQu_5Dgd8Qe|q}}bxjH+joQQtqs1IVZn6{e7T{ia zF|=^xa%eWO%(x<7j*QZbcU_;aVaVP!arexOLOtoSNt*hvsRL%}%)jPetSich(`b-^ zMZ$PM9%s@%*jPVz0Z^W*cK_>G4f}+eEVX`HOaHg#!B`<4v;x}zDLMR*M27`kNfp!! zOfdt(>k-g>7jf^{Se@3$8<+;R*cYtw+wD_Z8Pl~!JDCUEPq{Ea*!J9`%ihyNJZ30i zmfve}S5<$Uso}_?SuI$ks|{-ddGLu9WR9`^9)Kdi@Vs;x#SY-xp}wHPU0|vEA7234 z@BN1z7OF=OOQtPF$4twn3!HTVlUVD_)ubMM7PEPoiC6lQgL2q9PK4~e8v-OuH%lie z?NgBLkIdPMG$QBq(>r^AOHB`|*1#*!2Z? zuU8H|FD`OBRu^(R?Z-Vhr0j;FLpS~a34KREnd}B=EYHS*>Hm+f%tgJt!4J8Q`qn^4 z9F=tO#JRJ}tzA`vx$nZ)O%wC?Uiv0+_nz}5Lj4ki*&=K&*#U`=rv z`Q@Q{+IhAj@6lrNK2B=8Yln!O2%zomfRehFT~;!O@(@Xy|1Jlw*uOB-M$#6K^)QBm z_7%#QVUDPwnW{iOV-grMQQU|3{=BQMh}c5(yMGdoQf*)k9-B zMQ(^GdJh+y)>qJprknS!%WxqM>HlHOP#7UVdy>%PW$!l72J`n-p7j(DBKoGxXWh(Y z>BFDZl|7knU_jg_SSbvFk8)39%2)Hu5W0}HKlh>EaqvFoXI&56Yy)3) zQkE4X^P0QnPn?iUUVHJZXzPp`s5uv?pG{K9IgGoHvcmlBxubi|iF7n{)mhenIcxGs zgr0OpQy#Y#u=5lOyiECfE_Sn?Fj1LyoRKcbTgX{p<T*v!CGkPc)pcA2D=4Ekp0Gb*wpy7S88C%Ywsbr?MI(3UdsCM?XJ1X%*hNjB)XqZ*W(qDdtSb z<3XN74ARXL3=c^bfW~F%NM^5*Zx92>Wq`&M625p~j$8mYwLbk%Kf)jbn#<2z$%vP5 zy#b>-tF-S2_AB4;R^K&^-1LJrUmi@9rB^FLF)-k&YHK8P+k@RCJ1qSTZ@=kHxA3l$ zmK_ZG)l6(nmCR1a8|;QF-B5e_ELnjJ1$m-;4UXX?WytF_wz7#&AjwZYTMVieLbq@R z3t-q|G4^BB#EpNu4uyfDebB+-uu_$9>y-dzB30Y9F=R zrW-Heqnj*InPTWHgR9v^R7~hokldh&h8=HDhMW(EFfim1*{)5Lc1-+eBVkK-2!u=N zuZKABgJs3I--NbjE;>Undg6uK`^U>AQ6V zhc!RhYgvrmeGNsftr+(C<_MtuV$`5RZTf#5r=DR?gWG->#})#=(td%C3`oO+2B7im zUqY}&a_QNTn?s+?=mNXiREN%x_=(H)L|DtYPY>SR3pQfBOel7G_jR_{!9`dSj8Up-`JgcB;=Oor)U=_EVjF3C5{Sqh8cq=~bRjoBpoc$kJCgtTyZGSpQ4= zYi$6b$-dGmuTDF&@amhV?cU05g(AZV&v2$4m&j_~GZk;&keSO(@LRESRZ&p`dV*6w z2$em~p*8yM6j;SYorw`M5K2mluJq7P5Yn$VtZj8DEs2Zk=O@4T&Q}>~f31Z{uk}`E z{Dp{KObh1kk~~MfLUod72{Pk6G@T$_0_N??lOrdR=Z;VV#m0l)&@hz{Z?)@sgImi-&i1@95g53rON83v!yVPDHRU*Mzc4yZ(-Fr z{8{WXmIJf7jeswk$;6s~Qac6QyM3W&`}m#gRt=rr95A+Ad&wSAgvXZ|F))rBJVJ5W1CsjN`QaOzct2ocq#0!v zmj#075)C!3oS>&N;aHS@<+c>RHL)8j^p)k(8#7$LEx!1g_1^02!4_qA=;uhKW=+ix zGX%+vBMiRiF^^jm{mdO(?GdWJ#unO#_F^7mhT8)s(z_WlwFyJ#Xh)k5+RG2f;LC*K**1dr`#}~6A=0B=I&V;%zDA1)d@G!X#Rng)7G*2k8Kg447r0ox> z5NK`d(H-afBwo9feDOUi>;BbPsu!2|=@g=3j*PY}@YrOb+SX6?#Yb2xaaK!?>SX1J z_!VsB`2n1=wwSftkydm!39|-1?c%Epx?TO<(#GO~I&{f4+)XwRk<7RQ1~5>QcKH|D z?!}j1ueO0Lk;FZ{k4FA_(S`Ot0w~tl&m0duID*f6RY#bkw||o;kZ# zISYNTb|{~|X$m$Q-Jv#uxyw)eM0gIv`V#wOAp&Vv@>X4_tSZ&L#juM@$S9 zx_X_tLh<_^-F;LAQ09s@sPb%PMTrcw*HUV0P=RYSlM&AXEOI&&R&YCm_S<7DRBx^L zA^R^iwW+LMk(r*$Pq-fKU5X@=mQ=`ErO30H@@&qqnI7zJcrbSh+H<V ze&7Uli0xj@WrW#&-9%*FP~kPYF_YYM_hs5~|ExMynQ%qvq`leRB6W0yhC@pCb8>_P zlf=F~WMv_u*-DV=UaVu#2rlzK{q8D95VwZrfV?gj@rSNWXFvktUq)V5+YrlxwX302ae(;aG4e>L-M@3J+-f3IT{b9l!kg*2M zC1+ND9}6m^()LE87Mt+^Q|)!y#suc&v26C=0W88%a{?)E8Yvo@kM&KNMaOst#|-_CbUTm}WS@-c>nRb;&z^ zYr)+IE$1=jov(CZ%3uR+`~NI>1&Gs6W(jaamjcN$a`2!*nO}l|b%?)Q%%UWzw>A`C zR@px(P*7j$TK?jbv*%x)e^|jcLsv}aF(Z0=7(%Oa7+1wY>{B>d+i&ZA$}k(qgZPZY z;VkW~8eWnU&HPIAbco?&tc2O1$6=7n{u|^Y*nXoac{o1W-6aXfy~KlNbJfLoq~6;+ zDYmnv--Fhqrl+UV#k@_(1=gWNtqhyVKN=9CZ-{Ohi>e=~bm4IKbhM%%W zW8oXE!rGpV7Wt(_^4nndH1_imheaWzDi|I})9ZVZ9>pN+P%dVc5wG`Ze*4`@rjn1^ z`ln(;vPBHQUb}y8S>=8q__r7g+=z$>!pReVB0@XKchAvyGjLQs-u>+w%`frV4FeIG zj=7n~hGrwx*&5aHy(7X$bDZ7YhcP%(*>G^lAYMK;qG~V8Jz@b7oNg;IA1z$9@TbzW z;@I51@Ekef#qbxnG$Y8Z%bm~ibZ=4#%yKr%#b)CDrfKN`ujIY?tA4h9)i~dZ4E;ZM znvb$n2)zn$Wx&zlW%mJZDh28ox$@%`w3i7YFepXUChw}$UXKI=-TM51`M#FH=tdr*mQ!c=aB1296Lu>iTTKZWss0f z5~ihdImPN$aTle_AdbYC^31}_^EK|9R&l#%3hbx;8vJ+Gp^tm{9JDILu*1PW!rh^Dn9p<)h#Sl4kKM%nm<+!ESSk* zC;lLNT$fgr-!+{aBsSx$41b}yy6o>r3F#1&iv3cfY2N<+`0qJ+>=&Qxs}JOEkD?^l-F5i`t5+zNuvJf z3Fh4$mNqiFXL-aq4U4K@Ae$fq-TDT`rvrx;gqx96w^*@s=mcthCaIyPe(w)6kI{EqV10tcShHU9eeAPs)s?6#vrq}>y3FeTJu$Udha+z zs7}rmA@yR(L&>35sNjQqrw}o^)UitMU!5g6nnG)(tgst!^`FKJEzI1(d@j_w@;^hr zgYxlIRYjho4U$bhczfq&YySCqCE(5_d>l(4tk1v9!V7PB%Vx{QO=G2NC@c1%3rEzw zN<6i?h;CJX>h)kn49Sr)g#Em6km6ESP`1qc5C3ZHizN>r>V-fSS=X1nT{+Thh@kC! z(H=PlqDt7V6gOYezXUK-dretz!1?IUD6&eL2b!4=9h+HUO&DYZKMM>|YhlEEg?q?S z^XT4$2Fd|zT=x3U#L1|F;-#`to-Y6hiYkWdO=rRC)meY72pIfl`3zEGDU8($iWR^K zI$nq80aSJII<;#W5Pj>^_T&013BJ*O89Uoq z5>;Paa^E}xar^r=!pexg&OTM8wluk4R~Ru=)Hgk`Y#i_$jk{jc8hx}?(dW*X!l4vs z6_%$s#duJJFmaFc-5#>v6Yea=I~)s_pXGS>Tkz?s+WS}>Qp<9MappMLXpkXpSM~SmH6u)`Z5>o02kJs;w@KhdiZ3}29y*xr|6tMo zBHzGic+b+dTd!xOJ;p{Rguh^corJ;K?R6daayQKm+0rf7|AXg0qs!R9eS7t4{G=fs z1$=?kK1Ih=gEkI>@jgXDWHZt*C7FUEWs|u^pE3Z``^K|1KEC^sbN*4nQUfRc_AyE0 zn)?RrGjgPkzfE~_s!rDB!fDsV+*|kEX4+DyS#8%!cshn;s8svwBXSsDGX2ZRa0={* z=`p1F{zD17*Rk>Uk_cw3t5j=9-d6$}MoM~z{v{t^M!g75-+o8_XkP@CZWUQ2z!^26 zCNOu~hgrrK)y>bgqb{`Q_1^zrG4;cGarP!nb4E~(ZKWc`LVeEq;IewVneLp^ZU2+% z95PgN*M5v7Q;ZlGvM#`&u2NdHm%&gZ{bZM5wBCp&?HeZhwU87wyT_z!n4z+1?=RvXZ^72d*%+R1s1$KbAFtR|= zw;MEq=O7pMIKpFwKH6$OOszJAf<_Z<1)36cB>D>|Z6$gJL~jH`n3MMou$#Si%rDAu z4pSkJspG|^CJ86vg6kkfXsA_`8@8iOryOe!Qhn8SV6}mPlof3=WJRVqAr_b;e->`Z zMR(p|K|$L0^6;u~USxg#B6-ZNc%E1dv*^P=|2k*^NOBni#G%9Y?##{=)8KZwh85OL zSBG9|gb|hdmY^gn(ziY&O5#@I?W)W;361Yb^VQNpz0A7&^(7HRAsUvw#)fvhocvja zLxV65J0_$>&cVRctJFsn^qLos^tG`+B0_gQ{NeOwKt-!C^gGFufdtPT*Vi>l#X1|V z2XxsAcixN)Ekq=a##_^=k_^BFH5_zpvPDRP>u6+3$}i&b zy0@FdzAHw?i9OqnlTts_w5D@Nd#eM)KKEuN#m{|AJyscxa}(eA?z4&4yvXo{OBS65 z-?gW;<+;+ntM}U_yTmHm6*2zj0Imj<&ZgE9Wj|gfsXhrVH-c0p$7HXnR8bxDYOi z=_r3FA~u`L&2;Vir8}P3)k|@c?sK1U@&iWo{HEXcoy>6wQSuJ+b4l%aTBuigs&k@Y<2c=S3Ef?p zH>ki4yDuXdo_eu>X1{E$g(Q-u#zVXN^&%70guoizo7x(kQ0OZ}H$O9UB}(FaX8Ct1 zFpx~}EbHf2r6V;x=@8GH$C2|6*?K~?LrtMYd^bw*WYXhA z_))@RMH;nZedW3+qfWbv<|_#BYOxX^rhbN+!za)|!|8K*LRs(R$O*2SDM{g9k7e{u zN4VIdi}e#0&h?sBxu$>Yy%)j(k1V2fuhp8r!}gfF@b;F?U`6}YnnMh1&sSU&lR^?# zu!61+lGsuFEfDraX3+$QZibCbKzc{75G^T7@WZSQ)j5898G1AOXB*H*TSd`f<`IK# zm1%&t?i|2Z-a&r!pJehzg@!awNp)R)aa?q_SqGrxE5u+T#f?K2;GAHV?O&>!W@Q*k)7=g2vDW+7K zbyY9i{|nOF*SbMYoRQSAbSH2y$bE5(@d6xKxcF#@TE~X#3o=;`0sc!RupdRmQsML? z&>SCwS{FOpSr+@6Uuz3m`hj}(^g`Jz|6?({!%WVJn$H|ugxW+x-GEA?J&U^ugj3Nb z;65~)W<}iH2PJ@st8LtLfSOLXYgj=9<;?ih7rq$bXW9J#!B8!Wu6#U`A$wlcoC*&` z_9Js~7%m79#+edeT&P`@_Ng@e&5J+pqpx%31tAF71)pcz~-yJ>P5yX(nuM4;bUHDa8E(~~l{j~JeCGkX>nHJDpgSf&bTHEf)qw8{Q~CBPEVen|MW2P3vmf`8X9-g|>>ddp zcgfjbl~(?3Wa*NzQH>4nsM$3}Ul>pX1xC0oF3TZXe7=V!9!n?WgvH|R zpbruczmB%z=zkZ>=1R|gXwGThLELqD5KCUhtiRGT*JwKIvzbzV%ZU!e!VcNHSSX3> zObH|oohc8nvQZ2}q??C}@>!fe3gH+HF@4(qWqi>;ag~md#D;cl8&gQb^?2a@5cikT z=7r78@&5gV3Ggc9f=<<8v~yz`NcEGvbX1V_`IL(&+Z>LB zM~$ok2qXzod@1$TEl*U~H$V5g$er{Uj^($sWb7Nr{gsIbE(`$LRGECTOraXiU%=uq z0zvpi1S%)RxTjzoVcR4#10)fs()4Mtsa@e?9j)Bk!LsYyXIZga2q7d%`vQE!V@<1Y zmkpH3LeXJNO9f7l>F84g;huc=4nk(UnU}RLZmYk2TtB#lv34K(?8~gyx-mN%g=U44 zOPdr_!j-;IEbe|l9-buuKEy^Q9MLjSKG$S6dz)!U_32{1)N}L)3+COmlg=nY1@od$ zJ<0z-B%sisAR1yh>z-RfQQb6M4i-d#vxvb~f69M{JLPZv1JSCh1$gQ*LxOF-tH9!k zbQ0ZW)S7)qCSF|=2`q_A3}OHBNBueZwTTz^ar~gz#2KA74&&D)KHt~m4F_nK<^*7_ z!!pN@xiGkq%>1N(rNxw$zu-=1t*IpAy$ z4~dD0w%9;E?(greVWZ3(o9ux`elM>Rek#0 zO=#-(4p5B+wFzlEU7^k{3EdL6sIp|K*>xrriI`}E8ze|z-$YpN`^_teL_7P`%e>IN z7tNiH619P+0Q1hBR|W#POOta)1|LkIRtgz zMJ9VOxXN#o)mlXS=u%`Q>~PBuKEmOWsIuQRp{y%!ty{fEyL0gV)$LQeL#pqX3L@SR zJ2Gb^E9+KVd?;joVOXlGie3?z6>(>u(i!(qGz(W( ze~^xj&IRF<98ypEis{Y_FoHn%C0bW(XeF#Lj=2WUEBqKNPPFppEH?_a3}-h906X}C zSYKcZFU`Om5YlWhh@ogzCn3NvuM~F9jOX|xe-X*!YL+#ceh_tJoHXz`aTnvSrOAZ| zOtdGz?QdT!oAJr3(XL2G(p%2X4{xEohU&vd_zQ(U%ihHOlKPWnb$&YYhx48?|R++>`5?sxvM?!;ru|9 zZ#nwuTK^S%ce<+ggdJBE&fRrXN7O!{nu`%q`M{2Ef_+IRad2cf01P9pST9AOK>y75c!9}~)Et^6$`&Nm{wzWcm4c0j9DF!xJTpGrMp3esI4D_iiDe`sswXSu{dQZE_`^A11 z?Z@Hw=65mVu^%X`>;$mciK}XiZ{xw7I_!t)S00^JuxdCXhIRO~S*lPS(S^je`DH4E zxbKNs8RL`N?gCQ@YSOU=>0FE#Ku#DRO7JA&fu-X8b;3!^#{=7`WsDXUxfUsE(FKSQ z&=N`A7IwLq%+vt(F;z+T=uZNl=@K4|E%p{p^o5(BGjsE|WOR`%8+XgGW8xJTFJc4L zVY#L`OdnSM{HyS$fX1)3_JuNNH1aDsDqi>CzCT5=kY5zV<~29bX)c^I8R5n&ymHkx zj(QC4t#mDK;2xi8O%V;C{HqDQeM64=b4@sa*N_K0a&ro4+8LY6cFHz< ze|!g}zF|tDrP=`+U7KwKl20gdW1%!iN>1=uxA|NZJ2peruBOj?RBPb~8G;s6xIi6- z?_odhafsxoxiBf zwZZ)c*)FLc0#wE~bXw0TPBYl+h9hs|DYr_B4LR_YL@S1hQs=p zNEh%_fUvWZCbJtaF#kP5=(O#{8|g&Kmz1&8{@Lufw^DhtvKx955~aqxi2C=)Z-!Kd z+m-u+#^U4(HYn6a1w652kO0bYBt&goyx(n?MR^kI+{Q?0Y{G~W2) z0dS3fuJ?SU(6ZDp=kUley%PK}K_;YQyK|U|?7t9SHiyIfpT4a_kUVIhH4PSaj@3mo z`z}|mHhx1Pq?@(3vTBb5HTXuFAzFZEt0D-fw_kd=XvwIUh3VXTm{wbDA~cESd5cI1 zd>6=&AvG3yu+)`9oxmfrDQ(1fzv(_0l?bp{a364dXLRRBI8kBv!KsL;brY)#E3`o{ z3TlWUsS0{Voci?6MejccG9x_KiqN>So*1{25r6BSl9jUyR}1TgXBLL7Pr6Wv~Nu47;fbiU7TbL}>qmtl36YSZ() zVf@nqW(As~#`@bIC+AxSw!O5Pocf&rYaCFm?Jd?XR)p#@{!|5^Ws@wd855)mI^8y{ zws+VvGXW6%xoj@JkGb=~%oJ~7m6+uhOv?bH+jJJ~eFgp+}~*^C+3>R-MY!IZQoabCh( zN(T+z@Oyc^C)WqQESmh{d!!T8zS(!wX=R#hEKxMXy(eg zZ+Cwm1a%?;RH$h2_ws|nRjn8ZY!>3gn+6Ep4xT|AeFox7!rac2Lw?jsz}JqPE?5JG zok0}q1P;cuzs%Yrze|&d$oTr<`Lx{fbq2OV=!3v-ODq(n?|WxuhtmwJBIoW^^FB+D z-?Ok9HBKc5@)L(W&vmI{prL?4^OE9TR)bELS=<>*w%&aKjzi*@;5#P3moG@dm{Eke zhE#Is;&=o|{2GWai}7LYEI+gmc^Kj4K7w7n)+9godg?yB2?xs}pF1<*!Sv?D~Uvbkgs9xx9s#6zBv9l@ox>d#H6eqw^KZO;Vg}h!q zI33^$4}yF*q+q{DsJsa(SsV!YQ#zi^IF9MQV6i{SiN4dWWCi%YQ+hNc1r!^+<(YnB zG62-D`M3w3Q2;@X{S`n`{QO>migDpz0FK`->sYDOESs6u>-~<}_XN_6><2g7U#XC{ z$#Ig;n{_yEMnlvx-lP*;ts#DHV0r8j518>~33?Ak#jocW>uk>6V||p7{4rov#RS9c zdPD6r`qF1om9r!zS4Jk1>7fn#GCnmD=JIt1Na`X)=*LP7R!3XATgk`;&U*P<(0d z9p<0T&eYqQ9jot39FxpfuPSPYlfQ$s-*;+c1KL+cHIVcG5`H~^Ryu1Hk7%Nf$TCwR!SzG31@NHpm`mcp8v!wyWM49TjTxASJ-8JP*MTHLC}hF==PUOh8kaaXeGFGd<|e29vSDaS ztPeu&zv0^wN}Hahi`$pcDs~FVt2F;K!q}q*Y@{7i#stWfU`u2La4aerBKhV`^zG~j zJWvtZpcHIP7x*tfLSQcng6D(`HVp4=LWp_0Xt=2wEHjK)!DSz_Z?5J@>awRyk?azj zU-kdSs~cp))*pfJ_q7u`IsCq8F|OShB~D56S(Mwwlt?{yURE7#eI&WcpVq(@9Fd~g zeUiD!a4w51Nj(YzLnau+O3MDub|?loF0=<#jLztAM>PruE7yNDD0L}y=Ayuc?^?Ni zf~%GK=iEhn2}xKp7GonJx!JpDmDsco$|$XtRdUDwbM9$9s7x9-of2nKNj~?b@UOKz z9{`=Irz^ba-c&1vSQxSh;I2`cKc8-4)aCy%#bam;3_8vSJ-jw`_}lyukEC~z00EbC zI*dU3F21A)dSZr{qA5QF+{a%D`h#?8o%M?)*hWxuqnQD(TpcmfNq&UN$BmB)0!r8) zxno@Q?$_D&*4(rW6b+?-Y^5|*P`DHmJ%pI<6*yP)o}2^?>d7P#bd2j=vvx2mfLW@R zQLD`%buR*}nzNYNf%68w-D$7%v|=bXg1mYrdZy~}(@RRZ-U+Gx=nmCjVxr5Ag# zLw3R29-MHJl|`mRxj#sv@EfyR#-q>BE-XFEENbV$#dWM?!VjU8~kKZsd@G=HPrI{HiqN&j<92*-3$^M*;n@rG*i! zvi#?j;lc5w>@+r!6*CVUrN9as=S3?(ZBT979$5R#ZpPm?2VjIyQcEFp9orGR>f;G? zK<~FiYY6ow-&}|v7k?+03TC++so$)2~rN``u z>N%j$AbNQLX_!evzG8abf=15260vIXdz7K^a$YS)iw{@x5<|Rr#ii|ov=LJ{eu>dZYe_ip$ZuzvRu1dpjQK1BvP zH~m#t=2_wy>9+YkdNF-z` zQ*#7=^r%R*pIi2AI`>n9>(QJVE1k8?Ilav<)NUjW^O$}^yZZ{_Uwn!4Fq1`aslX;Y zj`XDIm`E1sz|wShA=?a@ZGKDSMU#Z3$E!1nZ)g^Eg3ZDoSN6@RXrGVCHvMIauS7d> zuJltXf9)LdTWdF!n%-iA9b#2$W#i??K)zYho^((ZqluvhAr@{H{diy0%@-~VW zKYC|2Ma)2^=skdLT@ZVqJfiCDqS@~qIGexL(BKy6Aw9ch0hoHN&E+m3*uka9+AIh3gTWdSe~W({-&^oFw`!j7$DcsF$7`pO?kRMK<9h=SV?cmyJIe`$4|zoI(6u9#qY9zM?#zNe^!Dl2>Z^dH`>`wSY# ztU;V*+g0R0DH6EnJA$U{QL&T~&s{`smeC2I-5mzv=v$l@iF;yN0hMibU=CG^e>J;+9k`Si9PzLaj$>}QKI6lWmO_o+_( zmhxA*0|-Na`+*J1qEMIXZf9rb#;pcOw>EDeDjb!|GumQ2!1ac;YqU|X;F@l1_lemzTN0J|U zFJF(kO21aHg)*KfuKT=BA{VDkOvlx(b{f|A9D69_BHUm#S$F>~`Mt@GesjLp3;reY zP~q>6Tt;`XkjqV?i7lqPbWGh`y<7dq<}pDHl-dDA4QG6`QDq)+vq_&HfW!}P6Cp4d zt>Qnli5ri*I1ILEOGD~3Y!@2^Jmcy1xDXmKolC?at}_6;neEfca0rLHT}NLpoUYh` zDbCtfZnYN&>}m-(F{5d1=)bBuZ?OcP`GmsQV@kn%JMJUIep`Avon#8=ATpEo-@hg& z12f-)R=HCD%pUjvbWa|P!}u)=wInpZG*LHKrZDMeC>Qils^IyY)x;kDRs4c3!DDOG zAptSsf#1X>kSli|Qka@S)6O4un-2aKL?bcV;$*>KSxHovjrfZ^-+c#>;(42yj71K| zzRyFiLrwv$rPcNA{mtv=o(*JDA0kS93>OE0D{KMJzLk$cc_5dCLWnJcFJd6_>BpE< z?aW9;^!;arQcIjloW&YL+~MkNO&a>N=pmhg>{SM<@`a&VeUA`ay*P@R$_+WS2%r?_ zs&Z%c`>ie+%!I=Lz>$9$7a`-`hoc&*dl60^whsaQ;~9~@JYn1Oc_bmgVVyAzUOYgZ z#j{`#D_YZ)(wa5;qzR#zo4a|-ANJjBB90r4Iun3*BkMxw_Ti>SjhktsmR|BPCLt>9 zZ_3eQjweI*-8+HNt)$9^s|+10w@sU!PY{`#BnF!ULS=#{k0Zr5`yOS?p8PfWbKT`6 z@T+PeRJ4`fj5t8bMs)0>o9|C>mBTlfQ*nFG#Rri-Q7}E}+eaz`LmO!`Y_pHkoAruu z`&!5VNnA3IG$}Pz)V&pt&AF!$E{J-;or3vWv3&Sl&9KzG+ae73Zf}=aP*SCI1{?0T z9SAC)W(?DSKOkcmW$(K5Bl?c@(5#>J#j@eq#ctX~$TIjkl>Wrfv%Ey+bl1Z-v?NxJ zwZ9!ae-MsHPUx&_W22?9$mCE%&~lzVG?hDXM%~gXGk+Q!Jf0BspkMWxy;^!n<6JIrSYjv z6F%~$8)0^qbUho9Sdf97b_n({$;|XH9-RHrohHuPcro@03KEPFejN&q?&nJFoIQY; zSI#uL6>2^^yOR!51OLO65xGas55dPG;3=uQ35ZYW04#+~byXQf^7Vq`G z zKpxF`G*X(YOz2^@7i#D+s-~A1E;3&x%%qL5hkiy^JhYjJ74{hvVmAx*6BH`M`!qGC zO9pjEsR)A-n1`6KLACSL%FS_Kcm+?4*z-V?WAZPs?RkzoijIr~I+oh1^~T`q^dCFvG$Gbd8AnTYBjLKYUmayaQz#S1le7Q^Hyr#;X&h*1wDpm+gZC!rSKom zq|+o&UGpeXtlQ1;?@JukKG!8PGS1Io0z6O}ZeL&DsON^I0K+>Mxv#ohK+;ByAZ`Eb z2orY{j0Pa3edA(#-pJA0AaJ6h& z81Gl(pd#j~mrizktoid14K5ig7u8FvZmLLP%l@dl05IprCyqDB?mA2fc*6UB+49lb zZ8`V9epdo=OeZoiY%zw-w`8DNwTORV_>>3T{r)1-YsGSo0E2s>tix9OBqKFBjg#}G z`pgkCblKMYs!Z)r^(qT_c+}gLhR|gnq!1~Qr|~kt&2@_yswx{i$KEn`8J1W8BGljl zr@GEG#W(s#AKKyuqLp+cl1C}7%`m#-!$15XF{M(M*-fD%+i#mFbP35jlgN3{8#A-dmj&OQtG)!031jTwGMal=&YtPfq2AUWekP9J-JT(p099!L`+yen$ zVH1?kRrhV7(mGKkm_jPP_U@Xd;x=ppk}4WY0Rbr> z0MJM_;$GGxL*P68y%KBqHntF{>X&<{aeI4m6+{TQ%~Zp}v%Pujr)zg5mV;cFKqeA- zQm5`#Sd{B6Rc*4PS-rO(vf>YEdXmOK?>K@`L5}|9q}#t_IE%g+U<-1qw3mr5&v;2A zCQ}BEn9_u;;>n5N#dP0RhCF-_UplC+U(i~Zjh>U5+b8%@p3HK(R*IMQwE!uritb}< zF)AK2?+0@-aE3LYkg`B*&N&m~JWB9>(Z>`aqRwgioU)0w{U1K4?>-#i|ZfhNa9hV)2)(%ch zJMH1twoeZWwkE@I!dz$ma+;9GeACv>Ncupl@+gBSeU_uzfj!$+h&@EACkZG_vwLGA z(?^;rcJu1$5H~xI@6lHIYC-$+b&hF1p`AoAOKqw{t0Fu#X`OGt$)7Q!nmJ=&)xjq@ zHoxT4pcYKSPT5(4yzIuQ^S*N2NJpR4v0?rB-^JuaXNLis?E(l>Jo8mUw(gsFLLOy? zEszHWGaCn|lw$LSwoj{G7Uq(zK0W^VVWu#ms8BMRlF2z%-g`fOXmndgC(na8fc)s` zz$GAoxP+l|+T_S4$r1sLwkV77ew1Gug*`|HiE*?FGLm1q; z^p0A0eqqbmk3?|!CB9DBN1Zof6d7+ zJSn!`VD~tVaqy<*Mw^8dM5v3Bvj2VdVFb=)U3L2eDM3@>n(P z?Rr_=I17+r4fE{>1LBQG0&o97nef67n-aNnVP<{dd6*B!Q344 zZbsAof&jw+;CLeK2d87t9s~YZ5?6Qwf&{NPEBN+)LbjOcZRXNcR&h)x`TtdpI+b!>$E~h0o1L*2OddpR9!Gw~-E^Cj(7i69S<66ak$)AYMv|xG+;uR(`;h zGIV3}?+Qxdjz)s;s}jHY{JPmeo@-tN$H@hxaV@)}K?y~ts~E6H(F|SlsN5oH8g7*h zGiC!8c1doE3U|D}Vul1yPmXuCk*hmyU4MG2ml#V0+(G5I+`L_=3cD$%$I=@*8m-LU-!fn&-sZO1%ls63+w}AiAK`Jv z>`q~ztr&&(gCkFpci+*1Ekdv*MhBCzGfPBj9dM|YEjZk(tWBuz4?MGeq+*)t>Q=z6UXF_w z{QDUT4^JQ8J%hW;d2xGB>Fl4Y-bRT!ttP2GE5jYoI1e(eVK0&V5W+>zludt=nf|UN zi1IV;MK$Fy%$yw<oGeW?JIGjmfGLH$Y;l|T0p1V!N*Jvu zHSAG0WpwPip0vm7%VRq8$2O2>P5b!WBfTz*6dZ4Wd6O9Y(8A;nOuG((y?F`ac_u2( z#~17CoTK)1G<~~Z4jXlout{e&nZbDHyHf(=a?OtaJ(2Q(!g#)Ugw-QQ?A?mN#yN%T zBtJ`sA6Lpg`k>Pi8a7GssiY$eG0Be8LCoQL{GDqi-;j0pLmT!Z)szldvbN7GVcu*S zzb1rEq|M)1qa7rM*I8!<#w7FnQ?{v^? z0`MlS3+`#ZB5$DT4+`7e-Hlp_2G0`*F@STbRJ|!tk3cC~1T%NR-p4s=sTT+RqsMjF zyrp-Jv?CD4Y3N&Zb1gr=%`MFR8;|r)uxQ6*X{OpEhQ~+tu}^n8Wijiy`pSMw0uKNi zSNX^Z1y;WirM0o_x%zft0U2GcLm_2BS`b{Z>g|9VOVr%QF*R?pTpiJsEbj4jLVAyd zTA;x15=f~b0^(e*Vo;Tn;WTJSxpI9LmL($Lxob<^S!k7mGhnnVNnAC*g!$ms0#Q|q zs=25I0<>fUw_&+KU`}5P9wlmjRWdMYh%Np6n?AAHQ;JzG?s(Z9UR`pNh79Nzk~DF+ zX~jy>>f-2bl?drlM8 z3NfIQnrT@pLmv+QA6efWPv!sqe;mh3_RcOj5>Ya;4hhN13dtx*_TJ-=kX_kZQDkPz zIw}#e_dK%au@1*L&iUP^cfH?zf1iK)tHv=t|>-9mMT!;;Vg|svSzWkN7q#t$c4N$Q;tl3EYwef_4q>GO<#I89VhY;`X*hz$n*GZ%f+;uViG z?uLlxD1OIeid}0r9%Ssoc7@vJjZIsZlU9zvYpjhYiOrzD5sq3OC zpf-X;Nb!DLpxqX^zDIK%=46-Z3%i-bac`RIBS5*wcw5Pu>G|kF>TQP$dGRYh#1hwD z{|cbbTOKL>Gb1-;X6?vWLC+KJ_^Ij?KzJ7eZ?^8XNgoYU9^z&>d zsIjX*uOK`#Wu!`>L@y!=XpQcW+mBaRjm|XrB@etLdr}Ob57e7EkE;7a*t7=M#XFL6 za;KHHk-rBNTjp-gS^;ehKNv>K>+_jPQ45J%4><1HyKJ?;T9#~k_23?xD}B&@Wp{%H z($hU+nWR?g!9dsJkgVz(J_Yrdns+m~9V_gQ7Sb`&F4wZZ!k}##j$>O{4{?avCbCZfyW zO$)m7LE=P?$CXHDU_RUD+sYwT;nKI7 zSs_XTv!BuxpJ!7(b~uYfsgzt~mj5(vf2r~`LHwpePs!o2A3zEr@#sxo8HEe8>V||d zBiz0@e&6}p*}!6jsm}I0bN9Mc2(c#jg@;Nu6!Kv&4&P8-UcQ-00WJIO%4OuUn;^jU z;I3r=T3KQtiMQ7&x32eVtB`mCe)9ws^7u%2P`B%Xc}=Qc&O^{FmS^{~Rho}^s`B+H z=1_T);9LRK?{$Vx22!5m)Er8aoPOA8&{7fyt`t@~Vw%gtx~+g3qs8LFR%(2Uny28A6dFYnNQgcUa>Sq=%alFh&8#@1o_qgwve* zVFimnUtL{4aHP6s?FB%bu2SP=e*VGqXC8iuZ-JOc{5%Lx0g|VvyWkdh&FD^Gkc!0N zhoolXvp6GC8wj?Y+V;r*EN+<1ac`-+!8Mqb@Nz)=OqV?4gxhR^t7*+^+AfxxVt(n{ z+fkk|-xSGqmkZa@Q%`;;r`-Z|? z0fR6b@l%pTwK*@xY+(MwBUwf^z+F*~piC64BWTrz}-HS1-XF-IA%?Zs_#F8 zcmUuEZ6Of>YIJOe$&{V;3vIBw7|jSGPeS6cvTMdj96Y~pI-z7InGW;(DhFqaiTTO9@KWvQi9__j0btLZ9 zAa~-Po%^sDFfme4@Yiq}r`BgnYK2eTwCjg9_zC4V{{&_GTm-!qHGVR6JXDjw;}GzF z6lXA{xo1+tQM{9vwb1&sRXPdGDHbEMbnwh}t+%tvcw5p4J4r#hEpDl=A{;Mjc%0)T zsG}v<$^HhdcE)5IJ^iBWK{7?Zn)vb%c!5eIj4 zbT}CGO*u)Od@^LuIC@_2{=AP2-O99NglFudj{!T}0e8wtTQcB@F9QW6$J!0Ye`T+U zXDx84b$!hD#4YzSyZLy~!IIZuFa3%eU zG4eg5?}sZ6Yj29P^-PcXG*8%VzLL$0!oL?c(!oQ+G!kORsa+lsf5YER>PX83R4LgF zgPNQJ#Bo#)MXU%J9k?RWD;c>|as5b5p>xAwau=X5XbERX`_ZHB8_XSNDe`s?n(e>) zGF$G%n6o+W{6A-@4hsIK0*J%jpB#Y*G^B48eQD(CDZR5oBl-P=)r7fH^PLf?!aK6V zwkIM35?l*I6p@;^H}JIDNs-fF*IFN?k?kj(M)QKM%%?dSkf1d$Nly2z(>)oq8z}0H zH?Qa{x&36#W@y04!9zx@x7un@ob$&)V8#f~0n1|jF0kFs4aZ{ND1~QjWHToIY5)LY zrgKDCj@dFCx&-w$QMi=CqD*=`$NqC~2k366pPXl#>Y7A=iQD}f`)+B-pS@LIW_M?9 zlBS_)(vGz!L$#P`?<3Hvonw@B1uJ244y)M?0)z0-hq++sJ0GZ+{oiiH;lFi&wy(C! z0Bv9z^M;`4@)USP)7dhg@K5K&U&|7&-@I0Sk>I+ZH75_xEn>qh9qmc%aA@NEKBsVBgUuK zC=b{w-0oU|)~tAVI zyJ3BAB}%rsjz7qZ?x_XCWe6!_u-{e_3u68Asso0IvwKdxq1lN#%4w>J zi>}P;$JZ>58(ZAjsmSJl6BWUTe`0eGEf3f_yS#H6vx;UJWO7CCK!{)4C}`C$j5gNj|k znb$4QRurEE3tPEe!JzG-a0DmvXePO zSD#Q-qOAjTMm|=aBSnvwHoEbgyVIz@J$hT*legak-hhb}e#%cm2$nR2 zV9A{kc)WT$np=5coPQIskbGMO@Fn2NxPv$@SJZdG6}jV;+%(cH+*RFQ(+DjsJlman zy`D(yN?8MCtjWD3w}Q|jQccb$}BDW%M$zZZnri2+5ls)@@(wQD`jt_GpTKL_^CO&SSCcHbfMX#JXYFI^*947 zPh&S-G=l*C@`E5CU1$m7ao(Q&oSmY7)ZZ#5_fEyYzLsFJwJ%GfErFeRN@7lUbUrL| z$6;gQSNsI91LJvT+$Zb0>g<4g8T{B!U05lfKmoSRH^pB^^8sJ3{8PzVq0NeypMF5k zU3qOqksdq{>AUjm3O~dZx^vS6C$ldgCWszl?xd8-sJ;-kPnISB*-f=L*8XggOx$?u zg%B-QovSjBbj}%sShZv~r?`*6PiiQW;nee<-=+y4}S#}q_BgXIJoSOf$YbE7vXt4;Np zrKzZf6Ny0aES8(-cqmnIGMg&ieYWryBZ0VTB=4<*@auP4NdIk&q(Mt(OLPm|Yl za!0OpC9sA#tk>OsaCSx0;!$5r6naw ztzLBo>#LKaxxsO=yWe%yGilL`A|6E#TK! z+1VRQlo*D?(k0-mlRM+`OMT8kVB*-%ZGv}Aj1u^j!wu*~>L<-T+u?6sX!3C}lQte- zk(6_=iwXsQ0JbRvJDwMnk!c99w~s~uD_4vMB=m~-ft-*|z~$*g4g;pgG~Ap1m@@Fx zWS)8IKSN6`^vVQ8hv^Oc+O(Rt7!U%wVsGP+Y6fyS%GG+v+dIdVfCXPzAV~~li+3m5 ztFQmbE)(#2#Oi@k$1#zUS6ijD_yYsa{+BHZAw+^zAEI3bc(h0qm?|pNf?oS}Km#OG zrOfCKn_-CVO;}DXu|5YE#d8I2o>}vUxYlv&>=+I28WY>a1;uI)HUM_IvpF;Ln4ROT zf!=1rpKihNFUo=R@sD-pT!EOm%%ncl43f;aem^;|A#s3`b6vjeAzO!M-gwc`-Kj~{ zBX)tq64*kJl#TrgW4o%hTY3x$P01nD6a6s2#MmwM$vyX5PU|YngU*wXGK*?f?#Eg$~^OWW3I@of-=XVuu-b%A1Z|nqY_2 z;~jD&=QnB#WGU>;RwFq(I< z34K1fCMwf9F}G%k(&?~2EY&)W*-_z0ReS$;7+I1)zz`)M zpAF{5ZHLPMJhYU z;GE*@hM1NM{G{L94dL$!Y-h6A9K9W=I6AYb`Y=v{(tpyLQz^^Aibea(q()R*TU|-m zozpyr!|-BZ_Dn+$*2|vq2Y@ghHo!-`WjVtU-bab(SJp2*2i-}$UP9^qnF_OIFS~-< zYj^VS!)Wu}vn6!LDIt!HJ1SU-@ce>z8f4cT4R9V@O^Xg9)4`VpjsXm*~@%l^Ux;Rf#Zck`BNXu0Y(!C zj%Z}UAmD00nsOS%Uull)dU(fZgJ$bo>3Oa`8h~Wt)EM?v(ndlTS1p0|E9Pg>=&>58 zghD~%R;YpqZAw;F;M(lx5b_wkVbnd+ER+6A-SYj^1XUgNGn0I~ES|f|5emjyPIW)S z0z8i6)BZt&h(qQxih4HbFYa6~jyeKbc_`QEdLD@9SBGButjw|b^l*oQjDk<7Nig08IK zb`ATVGzK%LP+>9aFM0hr8t+m`uNr?h&8o3Rp$T&ql||K}7GgobFhCViaDH~+F#yC- zt>7T3&_PZ*feTKTyd6vlF~JmEA1f+*>CCE4ex}5N^$4o)YuxX&3T$P0(IS!+kan^J z_p>v#1J8bWELml|S02YAQe-&yVew+kipZr~H-I@yc$=8#rZ-8L<_nDx&Qv3dJDwUX z!)@=h1`~R2M{$J8bM^1O&Gy2oxe1T;K?NA{iv_eYuhpLyc3%xu%z`dVc}Z}%cHGHQ<7P!Q|e?dwnSpL!AUf!B^!?#^Q#W!Ry+7ofwPZ1mZq z(Id0{htmX1W?2cAYWZo_lOtT#+Us-nlP$=CGK|Ri4x0Xh>(|iN9y1 z=9y26A4Y}ViRi9Fxzm{>J`YM>GX1D|$4BY9xJrY{oY2~Z&};B{Zq9Pp!pox`8e#0C z-h~@fohA74(#ws!{7kIe4v6XUX<)9bd)g66Bz%^Y4p0~OF+rY;l$v&7T<3~4y!bv> zR$r#LblZcVgy2lq!ff+>yuR4qCcljQa03x|dTcG7`CHcxh#POtGKt6ymNd_0qF7Wf zBj_KC8{jl!zZ>0neDp19n3sD?HC=|WM3!}cK4zCnu6Uoj*hbV1<#F2BD)@A~y%@VXx+u}Hcn=_s-({PxzmMZ^xJ1SV zoZMY*FarYvO_@z8Lr2ep)%HgIL7rhYa~#X&&V8oYSw zA4m{3{hw1Vb~~26K^xro&e7i9eg^SqK0i}kG3z(!_~E?sjJlSWIWXJqKiHAWTG*SpPcCMD`kEc1gx`R^YkYWz zEN4vEIkj@&e4tC!(_~x`-K$w6CU%X7U2Y z)Y}T5stEyoSsB{H{+xfST3tov~6@lO}2gx#N(rHXiOAHT!dp6FiV8V)B4{L_P_% zmX0rPa^-{1xG6|#uEGo+!v)QAOjRe|jg2ICcXU!|Cr+LMbLHlhJ)ErR*P9*z$NLlt zmYjAUbljq004ZyOco?HJovV7M*Wb2nF8vT2D;3kGi%F)6Kr#TVW>}zTHnUQxoGmD0CY9J`|d%8@}n;_co2q zWr98`R_c@PQbMi}x3bWo4XZj{it6qYj+o*XvNoS4>rF;7WNn;vA*|A!3H}Wh-uk@n z*hV0S+XnX;K;BOoz?&*9_{NnM25s4^^QUt|>R!()^Z6#G3OmL{CU^-IG_M7_a~B+& zCrV;ouC1ljbK(K=ygqAE_-}ewnH2&&t0enS7}I4i0wJgNvCf|P$`|DHku`K`HfDa2=n@DCg8MRi_)vpMR2Mxy4PE2Qe! zD||kNXy=0WeU(43v%md9Hg9Zu#CP%d%C67gk_#pfXs8lf>M=betm(}0fdDKq0{26# z_c?J!Cgo-~*=wswLXkR|W8d+rDdV00`22Ouv=_Hod9bmB!=D$I4r@7DZX7e+0tO!9 zR{0d}A6^K#yRx@ykotO4(WUJsmFvN)d-o-wZ(wcDSUS`8jO-JSAMa4y@MK4fDP`(P zzxQ2})ofiauWKj9{Rm$Yw^?g=?`oO(Vf|T^I+-A+o1#F`>tn59d=FtgVJAV=y;G&` z0GMvtEeil5;e$Ln8-41(UeMl2kYLk%vPl?0+Egg_;g)494o5FsvdeZKP;&&fjw7o{ z|B+e%Z|)8Ts?=>@p|hr!nYXgV=ZjI4Cp#$E>+g^6r7Nd3<>-t=G%B5IyZUI{e{49G zqnIXEB=M@5Ndf1J#l5YWcLG=A4ufF8S{z5Kz-uM?Ni{{%mr);=l0=473h#cIc{K3> zZ-VUw_Ng5^HgWQhs5tQU@qv-YBej9`R$a^|lknX<*+sSVXue8M0#EPBJ6_Liwl*8l z_zoD#!l%WIXJZ$jm?|zUu0LdeP&8IW*(|39&QzKGnem$6--u{ZGtHt#Hro*h)?lu zXGKo-4Hv1WP*VLj;uA6UwGSV*6ro%PRbwR{@tXoCOb=OFTB4ru-|Id!rP5Y6LF*-D zy|t0qDSVPo$ffyoj#CIZV?l3VsPRYye$F^xxv~Z78_fwlCWbwW!nYCR2nx0_+@tg3C_UDMVa2Br=X3hfP}^Cp4Yg=#OK}K zKYVY`V9jEKD!UrCbSX6Xym2T-cg}!n;?;o{mM|zWj0P@D|FO-rQ zKt#ApEh#AX%_f%9!G6`I*K=bSnMIhQ%W5&BOMntzVr*eS;WR;FgM)+k`#+Vze*z&V zkU^I-R|!Nwy<~>eeQ~hJqa2|DdpX15kD=6U73Du;T|VarycBP^n#IZeIJ&H3S9#@oec~poZELqX$DAc>XZyuIqd^GK0Jq~0kI=d zA7gMo8%zmkEdnqMh)tkp?V0I;Tm3`>aU3^~dXw zlhdd3=iygnUgYu#GRhxln}4D?Gokczq?T;RjCk0=fUHy18$lt!-q!%sNxee7No^+N$9d?Es*``)0UJ4SC&FNY0pf z_MlbGdUy$|F}YDvJ9GTCkZbsNKj3DL5;=BGBx8xI;n)=A0d0j6MP7Mi6MQdk@Tux2Qy`oI_&*%EQ0bE?|R>P$rDhcFa8O?JIK zPOpFDa?-L*+Q7RrCg#y5z$l0d>n@+OYo3g>-Z*x&`Jj5|=*UOYaJer6;FAbdtt0O? zrFGUE?!XeUG}G8wMgeTs%+r;3uUU;Nq5EuU{h-g&UOBKhdS`;J=m!~xn*ztv_p@dD zR)tR!P=~5kX)FRsx9)uyuu?0dh%Ht7`PTM@e#Cq!z2ts;O;L)tQ1ipDiWqbGz@o_p z^D=UKR#`S7HAt4vQtD(_SeWyj_av~#tJKlb9>-s5Ykuzx_E1ZNl4)~f=zG$*;-y=T z2ozmFva9az<{2&63fQ?(Q8{IPx@t1LuFcxP-LXVctWh3AwazVTt2)w^*Zn-#eB`bD zSHoAusjOBK5(>uQPGj=ijdOH3jqG?(<5#C{*JQ?Lt~@zow=Ii4Al$Vr!#+Cf-gx)A z`_h(>b@7?*6bYM8%628gGW^rwWoG$mK_eCk`}B&llStfwHf12*{5spmTeNH$4{gCY z@Yuwr*k@%m;T<60bw9z6^WpWi@Bu^qe-g;YAzI+VjgsuZaGA=^G*I{KLy@rIjSpWb zFQNsCp2T;S$VaJtZ<(waRu8y7^X;>YhsWp zM)mKgCeE@K;J4vQSV z&-(Gl5AJCp>K*2-`U|4i;u3p8xo6(isu-38>cY zml1Eo&FBBKJpour?}q&nggpFiGM%m+YX`ng8P+uRnJiMyWcv*_AZ8KAB$w;rfmN8C z<-2EB6TqZO>A~P{*<);wYqZgxQS8E*syOXvGkGxF@s(scud0uv?T)fQ z(DGrwM7lvpitUG~6!*}kZUpBn9PuP`5^nMK@($xI^0Q~axP5qU>L~uF{R_<9&m z({}$$WuD1y-QzMVb3jLPk`~bDJNkw(Dv-6cKUb4uzD= z-w?i0NZ2K}AbT}Zi^uOZ32xmSxJw+6(3j%a!~Tdy-@RxVx6YUw2|V6JX+mSJNclfl zF~SD#eo+lnB=ZpHLl{)E+`sI^-V1Vn!6#Ml_W4aH*Pe(++sNI`M=5L3?X1z0;CJeE zJiX5Mp6JH*=R9W0t(1@>>1y=lP^F=yJil6JxU~I}EpTsBx?rJ5LbCbQ zuLBmmX1MO&!E}khx=+#hCesIB53`IWwqyFtR{AUv7vJ{Q^dn1S0@*^UOmRwctFy&> zd={(J@avBzmu$MbyamRMt_$kfHY<*v)%%&nY4hUDH=$k)$8LHlUG0G3Kv#T~-vQjw z)hXbsNIg?~b-jRw)ir5Q(gfwM+Zk+0haf z+4ER%>T8RnKAoJ-(s&tu&-iZ@A?^J|d z6md=9C4am*v2r=aa&a?~37bc($n#wQ<8UGXL+!RtrRXGSj-2INJ#+3J=}e6nOC}G8 zN~lvCS@rxoq7w$CLg-wx!%V%ymw>~xhUw4cADX*$A}D~{21F$!Y61aHwpdL!QcrsN zl~$s5kk%7HWHkZ43%mOcwlk3RcbKGQ*}K(Fxput)rpE0zH0vY(EyY=blQZ`odG#hD z)~{&r6XkSE(^csqsaMm>2c%xsT2&g_Nab1bTY%fIoNHatDY@C@Ei~v@19|F?szU6SWRS)uDXqNY!48RlAb;S*ijqus; zp;bteR835>3BXML2CewOM<^q3M*ubU`}gnI-oS&(vf=GF|JJB-inGOH_dc1xb|iqR zWgrcNy?1*8)vAlAaiBE%K3Q>5Ygy-#Wf$>FqL|Kvgb&6H?iQC*Z|PN)xZJhH#d#=a z@s9O0oea6Lg}submzNZ{iZ*_okZ$6G*h5YO!dE=7c4=YA9g$y%1xjkVl#|1DShEjM zH3(sS?uRfB3mhW5Wrm} zrY>KpBxM&CC;s5Ie_{o}upN{vdb8x<_$5iiQN49`z`+Zz`&E`yLAim;X&}$HAfKmT zkO2Dgdno95mWMH~h2c4);H=MigT8hyzl|4g;dU7F;p^X>w!fa0zf{^rf?>~ z0w{=F_R}ru{g5i@&xwC%R-!-1x|(k6pSb5_)$f`zyErIvSCs{z`iVvU4x_znFKti!!av6BkRX_=+kEc;*`_rla zB`g4ruCJGT3XVTTrlh3Yj>1>PNIy?sV%Yo*=qaBIOY87_?P04yx6TV?_{~K? zOHEo3|2EA2JAMPYZM!H<{|!s-$r>l5{19icxV`Wf-{<0I>{v&H4FZaCy$B6Ludz{v zRH!!HV#JGP?5(L!Zp#}NlOODgWqjO+yo~+LasPYxH+ht2KjdfCFQr(oovP3?vkFK^5FvPJ4^LD=DpYQi4tUXuY1;erJaBQ79 zHcp(>mKvoD+)bq5SX9siR>(%CL??*D>Snn%p}NfGO4(RY^puLI+j$Pw)NZLb5bKo{s|0L~ z-A3R~;QHMg0bHSgESOM&N&@oF4|8gkPF-nVM=sQ;d}wcS{{!iW-)yQ``D6t#xlh(O zRF0Z@O>0uMz9g)u{P))ptV5lH2(gC8I5i(FDRG5Gp1bgBydKgxJy5gBfK(#D7NzZU zatG}S^z#KL*Do5=K*F7hk(`mbdgI1XoM!8*-};#UzNtEG@Nki#`7)GfV;VlfW^)=` zBaAjK5>gx@wf_D!B!2C6xBK^K4%x|+#?P@5N7tlfWo6xWJD~Wz^cnPfFF($Ixt4!j z9%x^1$on56XZB0Irm^kw-*rd1YVO;(*LbB21@7OPJspo%WO676#~oUMws(zP#+shG+$ns0IC3W z_{kYU>N5<_6=j>*0d}r-?8U+--eXfy2M+opoYL|=I932TMp=&k#tzJ^72OtRJ8BVOvTYPh;@EE=LJLeOk`y?d|Dd9%fWlhON^LnB^6x0LyZqz@imyogJ`$C@Lr9Z4o)ZQz>NCavG$$@e2#r3 z4I=}I5KgV>wl)~_Ja7gLQGju0c1{h%cV&6c`doWWv$>q*=ZLc8J{hBiKXNK?zx2Nr zz!pph;BLU2OaZTv>Pzj(VpSp2&OWNCF<~>NgL!nezhxEgj;&2 zl>z@V#>sykFCnFL?|(j)J3SFr|FFa`n@KbhC2pZB7 z#3>qIn&~mG_Vki=p8_x&CFeD4V7MvgJlk^G7H;(apFxr+7Gc0+1KfI6$@aeF+d7DJ~_-A|H=0?Da#&^Cqb=!=fVz>giW5nw=jWQBS%L^t1EZ@ zCm9;qlG{($@0W3T&l17ownc5pWhfM8Mwn-fLtb7H|IYl)8@QikEc_Le+s60x?&B*m z5kObB5{BD}gGr7l84~vP{N)C~3V;xhBWd%=^j0&KBw3T3-HU`;hqWA3OWW~<8nl-M zfYn-BI0_?g`3$_;&Exw<(G{QM|8)Kq28x9NF-F$>r@_BO)t^T*i-U1bX01<)zC_uE zR@8qEQQ#cm$YbXIUPVO?z7KI$pw@r=-V{V@>dC9Hn==1QBVy_b;#*jR+&f*$AwCl?o&G?2Uk4=*Ej zFK^Yvw*HTO9n!XRBWe++o3)4O!OC9PC=_l_<$M(W8(Akk`zv5?nJifb^rH3N?Hhio zo$=nNmSEz_QFHj|XF!vQEcdqPyZz_4|M_GBH)k)KA9XGRlTJD;3*y1c#?ZWkeaQM* z^`Bf04#Z)ARgrE4rMmlk8E5F=NpaW8xKNd3)-orW$m+kh(W12jQbQ7oi z)=#qbmhkplt}u`FC0sV9sdnb5$E!zX_xlA{4wW&j0*DCm`=1;Sh_sB1xiH@C89Z93;8d)EUk=lPNIZ`o3H`Vd+Ig`=CV}#?PAXvzWk{x96fn z0(rYh<>?PJ>Hd8v@c8=*vm+)>P1k@i2>yMaKw2nihLV6Z;wcdc*E2{8=xNh(FkEe3 zq_pc;ISw&}`?lqKx<4vIa67!xu|P}G$c3MDyg?u^InS?uM6Zzys0QM9ChW>g-ypzA zkOUSfvhTTWq{_>TJ{+kpgwX{@>P5ptiJ1NTO5)8 z8BiLUY_!*AJ$V386^TicK@z0qOPWP#Ea5?}!$_&fQ zOcRKuR^tLX*&CM(ahYftiNg!a=uU|He)2nU2(~iX@Yo|foZp906;o=d%aK09YEW7_ z-yX*;XE#z@?zZ&fQ?2fYX!T8@-$(K5Jo+AkyOM+(944x4B%2NR&avFFJY^9_br5UtzSX5@gmYYm@ z@S$jtqFn18bXQr0IYhQ=+2~ZDB_DRW3d=*B+3q`-*1P$i!GVIG(AMp=vBQ#^_mNxp z(;4Iz#_~&9jZ}}7oW?R;_x8&h?b0N326NJq4~>W^TeI^!o4=G5G{|9ff|`NN5+?ns zL@IWva(*@PXPmVGQ#rgIOY*nnoqNDDy$hd2uMT>wBgzg>YT&BV2U{k1ah1(1j_v0` z@o;6~SUGW=!+j!oa9ko_2^G75?VolPmWk=Pb-h{k=phZga( z88Rp7QzbHkpYG!aug9e^DF63Bi|1#CeAW^CpakO9DTT!p$yhuT8Aq10^cl2O@Zl-2RXr`+zCPj#_FqXs}W2{Qvn2Y{BmNsG45? zB{BF_rVgT$u0 zE8o6|@C>uOK1Ba}!V zx!M$9J1B7#_JSs90cKlucib?T&HqQpLE9YV1?v{gh2NWKEt9FX8;3DePnCL5Z=k)Flp=?-i$<5H4zc z`?2ZZ+p~Y8FYr;m3Vn2(u5Z`Av6#S}zkpQpZ|vNP0DY^I-oa$HXzg+ajQC7%wldRN zfOAL!UwFtuphqqR41v|3He4cQF5;UU9M~lti-k<HSTs^#>-Tf|C2&~#m%6WZAy1jz!Q_-IbpZP z8ht8}UG13lz+N-7+01+RlE)6OT^3px7fn@1|_b7^{bhPet}< z_)77(<^>8-qQ2X(n4faVhm@T0@Z{5HFSWs~EDXtV@7IAMbVUP6;v8^%l3PZ#wOZ-* z*Vk4lRj6OYpAZ_$*`t|tYKmLar&&{5{d+5cst)rQTn`n8>Xi+0zXc6YbTPMgzewFg z23F=+`8=FXXF6b*CDVN$v3|6iy;TSFSYh$qrbhKDcT^U9l zj}3g#zty{k*>s8S+>t|cng#3@Rz`z}njy{*?90mV6_Mkvv=iL9pb0ttHf$7;TxkX1 z-klTGb`2~-Mxx6~+{b-KiFd3XG`p?+6-0PMorB#Q@TY_CH5)En#5WrmHqj;@Fvi1A zeGpO@wuYIPOgRY&02e-U+j7!$LZ#5mS72R3MJS^gfheL5`kQV_n{8}KXaj)V%4b~As zFrQ7yZal}~{ELX@8c#V?2LlM@)g(|;VvcBjEuTJ=`WkOem{DL!+7Lr!U;F!mGm_^~ z+V^T?%bz+8noq9{ybcq16Gzd^fS2`skac)@6|;8X8l6Q19epZ@l^3@1ES!x2XLNA4 z_FI8#x5sq7hXVr83D;_5$sU!*Ye}zyx1wMC?Q{DSgrUx#fM?_Fj@{syA2x2yL^J{S zPPLkQ#O+9E9a^H*USdriL6rGHDt$B!vu~t7^)@_e=(<|SVd!MenX48AP(Z$4WoC9_ zeN;I;hEAr{ZvB^gK*1AWfI~5H0a{Y#2UBjn9`7;3JDrI5leeufemoZol*pDlVTSHP z3#8@6kxsJwUFg9(;)>Xm!{nsFC<7}Xwv_?o=eP)$>vvvj>yw z=YS7{pIOg(u@mJ%G0G^TM@L6>l)?_{_e`(yLxmX%h*D zMJS13@e!}HFR{?GNtq;%=4#zUgfFP^$g|Ax1<`vC&qIPbwGNo}3>ZM?=Evk6r|J&S zi$UD-za)A$kcqu)8)1mG z{FI*zS4{wM6S3;RP-!$0&8!6*;>|%T%HJxZt}cmap#~4vD0Pkx22gBbPo~=2iEMFa zSN<~qRz>jf54?e)>3%j;Gc6C1_YO0C|CDQDt7+bE({$0($tizZ)xn2L?@6_ zR3$`yiwH?E%X*^k*^oQ=z!1GA|E&fXHPR=rIEGq4%0=SGvror2Y%k#d`aPmx5@~7a zdkmPa1d-<`6M%& zp9rn|?C(5SRowEcasXoE$)s`=GvJk9wPt|2VX31T2F}6x3#(&IMqZND*a1muBh9?X zX_HSLo?$y$a;qFx^U1W|YAd%)Gaf|AEHqZ*{PW96FF*&nO-@c?c6t5=K_z@2f$8<^ zY}d|9NRviy7sF$61>@bV$B3*VeDg4DX3qScxVTL~5Go^T?}aG+th- z2`EduJx~ZcSssR;yX%oW&ze|$TF?;>HGHp~Eq?$w&SAD?d#s$$|4F@l*T7}X$7>}7 zRvPwxrPaLO5X-qYiQ7{P^4Ui2GDbq&DJ3Yu`)8zfMi1{>HEq`+uR1bJ4x!#n0D6_M8Zs_# z3mc%u30aK|avL-!XI&?{^%v4OXUr4OzaL*|-HV&M5GPx)SUqYMWw@Ex;%DHx^&FOD zncjYHD@AiYbGx1O(rsKW>Eg}cid)6bqA}!r!G{?x#)c?^k+q_uv%Xh3ha^A^{%wnpRPY({1LqK{NQy>!UjUc8f7x2` zgyLiGpsKlFO75ee2#drn3Glyna)PvUP}e(t6P z(8^W6g23+fzT5gZQQ^L-Yg#^P;QK8FTZAe)*|CKS6(I>8a2aoN+XEkYf2jAF!Zi3! zjS($tF@bu(ypeC>`IZtF;jz`F6A-Y7ZUQBuZxp&q4zHb9cc*!1`T3p9xL9`nWhNVr z!2lf=fCA>;1E&E|yfmrHqB#XnUCu28b*4#eZ{lLL(42#`ui?BO&uZj|d_Fh!Bw8g$ zn@2uezsJz@^XM(T{!CEw+EyG*eaF`FuTN%C zOZg)khBpDobCl(3ud$bhr>EdmuQ^l^Cic|y2m>LM+gsZGYKUAeJE5YUX9}j^JDoojv<}Cm&t+agmp?JE0%d#fo}m_cYogpjn5&egilTvDFz-Df}1i zB4)bXfn$dqb!cCa13DdCgMNehaa&${n5Mw&bxeKfNmHq%e{T_H@WB!H3QgFK2gNpB zP<;xkez-y-Lr(0^P^G!YH~WLut`0=mPXbVN64iv6Nd`s=eUQ;?V((+QU0&B4SF3*{Pm$AVrq;v&)c>VLy_UCe45VEsI@ZWM2TaB# zRU6XaLx0^H=0)Z!$rIu`3*s{Z!W7pU@6aHvX*vUuzME+!B5H}k_gFD)3=f;nI zi1|B!@iO%p;L{!JSEI~vyUByf_{HY=;RuAK##-h!06XFwxYi?xl}oWStJ*P{OcVe~ z_v(y8!+BaLQB`(D(XrL0ReKMn$R)8mU2@$q$Pq; zbZq-$IkP4V(`m}e<)cwnZLrjiA-X0@VY~Gi5-PKX20#Eag!JOw1br%7Rr}`(v@d!u zCo@&wE1SwM=zt~$K!eJ**9GAv!}Cogn9(d0X~BwPkU4gaWh?WVRcE3N?C%_R_D)Vw z(YmJTJ_0~fhItqHPqoIFGQYE2!~?aSRa{vjcDWhy5>oT zGOMFTWfL`aLx-!QL(9r?~D6y9Uhq=af8z!rqg#p zXk%gE-;=@G>MUv7p@P#ni@zP*$YQwA0Dlc21`%pV;p!_F@xI(^eA5&SZ{rU?^Wj}! z6Y%C^eMYilc_~MAwqV`h=I0;WA)MqJ^$IvyJ-O0)*RuLYjTL1TWd|(NbhIZ;nOop( z`4bc=fsxaeI@zc!vvYFFetFRKSMjef2_#oIzzPIxZ4oB0sxKOzX4Wltz#G@LD2Qr5 zm9o~xF;EU*_!O`}IigC{sU%1^$$B@>Fa_H0*>*1Amc^7tnKxcPpr8zZTme`6(0@J| zXfBE;0)lcuv%tqq05V8P2B^)Nhq~qdR|1KCfe>(GeuFaNc)T~zvma>o)FZv;sVD@D zynx%jpd8m<{zI zz44BQcmN85TNhy2plu`Nt$b;sKELSBpW)my@*ZnL{lFaD|7-8c-;zw*wh@(1yH+~o zQd6mwOU~P(B4CS|mX=v+F44&NRvMbQpcpDmU!|BhndzGgrsa}~;RGs*v>~aLX|A9$ zxrCyC3y6ZiciVh3@BH@t1LJY%FM8{e94DY4JQ} zYS0fcOC|N!{@iq*a@H$Qe9ONriBWJrhLhC?o5K2)!=~i)0hGh-mMd~RkqdIGCB(fU zy5*IvHssJ&gxudt>g(3w2{)axskJ_#h96qTc~<{c!`n^f zg+SOfdm8=UI!4%}d%RkXd}yWU1H66h)eDTsQr!qkcZE^zbI#F$k(dn7l7z}@YSv1+ zIcEYw{HJjfg()x7R@zQ&o;LdJ2vi6Fkl?OHM-Ga!%w}co(6=I5LZ>n{9pr~6!z|S$ zq_VfE7##n|{H(t$wPI-D`~L#((@V(MZ>p6Eb8k%4{lIGT;hZ9cg%~HhcbDCd%0RbM zs?uZG1wSL{Z0f+NzDiO?w9~XT^dWptKJ@M~0(@5*az*ZgabU465JN9eFY7vD8Wdz_ zlAIonnlivB;uDXov3sIgoKx2>G6a;@?v0qg;r`RnZ{4wMw2%}(e*c8k`R7sNT@>H} zfUU~mHR~8!4rJTHVlT=v3wz2kx&95Nz?@Tj8)s5E}t{|AFA=d_Y zOTqb{ATx>U``k~NJ2hYk3r#Gn1}|1Xj}jq!9%;{k(?9!WZt1z#{OATvapC-}#$LWi zi2R>~v0v6A<|?Eg)Ye#VyRyr7RJ$N4vFEFfmb1jHF(yZN^rc!ULDen>KWu(D9Z5!P ze(qg(G2HmSqyi2B&W`vo@N=3l?+dXbWn-`1LrY1^_mSilpKLLxQp}@s?=Tqw6Do5Pui*IhPZtaT|GAE&MF$;(4s9Bt5f+vbITElRv3( ze&@3GgY%ltiz;PZXq||TeA+sP9bc(#*G<2ck&zF3W?0$Bxit`EwvZb7jke;810>h3 zb}}!oS_xUbJ^$_PWrSlJ-;v4qq!@|L9uM#ALcMu|+|fni+AqPpu+CtjBrs#Y1jKVU zEc6L$d!2l-MgMi5&7?{Dfxj)qn;mIZudn7I6V$88%05A!PtCQTGSxXKMGh;qXa|fE zJBUmhM!}@e#A?s%bajm+=Ka1WxHZWaj;k#XT{T#;bH9c5zA8txVHEz(EeE*PP9eD9 z<2|evdxmVLj_n@`lp>6@ zy_ZTczm54_lGjPwPaq$dF1HdIks&Mp;%bge$QZnnp${}#&Z3)z95ei@b9;c=kJpY- z$G#RZbgyTi3&d4=3%+gXOSp|g^~^%K1id>re4gTka;7m@WA}bFo`GUbT8-n19VVdO}IkuW(H_iil_S}@$xy(Q*fCcNaD60 zxqsWK5lESLWnKgy^ci@da#k9^aW5)oLzbFxlUVBA&UM~79PF7=rW@Ot`>9(Gju3N{A4%EK0dPuz{=J_LUv|Pe^*x3eq_ExMNjB3?{$+xH^_Y z;e5pH)*~Lo@y=;b=P$Iqp9KR|j(>D-kaI4WeI&&HPFRtbZBMiQ^PwE`pF$Z7#(@UF zP2~&InXDTNx3`4)H2mD8yHl{Jk(|C(VA2vwY}3IRqo*qy9HvN7a!$$hlZqjmb6tZy zp1fLd^be5LmcI`_d3@@A`jLDS!b0qXVvP%y>+DfL86Ie=*TZ)PL??Lk^F};4=dwv; zPRBV>*)f&NE0vtjYHw@vs9l(Dk*g-}ARSciwv!f)E361d_9y<;9b7)PBw$3dh`AZi zAY4)BVh3t>;gR=s)nZW3PT_3bOLDK)eTZT^*m%P!HdC!FvK=Z=_iA>Bg!`SsC|P3u zz+oMr^PUcTebccFK>bqp475+?5RUC{Y7klp^p=Q;ZM+c8Zq6wBtH*5c=QHlp7wZS%6AszeebN>>_2^H7uuK@g%1{vF}DT>U{h`}c+u5ubXcFMH)fZ6-l z!y=qVN>jqgj)3T!mALcM;1!8}PDcMCU6<9?l#euNff${zE=b0d%;TcPFfw`y>zjLg#_WgnwatH|t}Y&WrR32m5W_AWNa`OqIc{ zW{_mX(Ck1psRCgMhJ*hXhcAG1ocb_kuY)%9rlYzq8h$K;X}=5m+8CYpJ4Yw6zLi%S zpu}dkAc_hVv>NfWy9eLsQ-6OzoBl{WAkRi|U;anmJ5dFwz(C9~-A(!Vfw z(E!S5ua;@}(q5GrIc6|PAOSPg{il$s$UBI}tk5xuP-VedGyZd}xqXvWvU_`{;Cf0> z5fN79T(#iq-q$RLb(of0ZA0lfepj^!a2-6 zv{v^7r2J*xmj&XVgZ>Wd=RqwGGe1`-Svll~bz(-y7*N1ooU5J*aY@&5ea5ss6n(a? z`N9l?w~=^1g2wLDVRD5ovqLc^Z#YRDFR+QYV4emH*fzOpzer3>Pudh??f``be>dD3 z)xB}1O6bZpnt=j(m92Fxq0dz89n>B05xx10QDL-YDz&e>h_u@9+RG)Pv4{2IYNiMy z8auH}j+fW*;q%Ymtbq+KI_r4gxGUeYJ>hq~vbe!N3%NntH+Dyh7I70!cu(qE_`Vp; z07NvH4Q2s#9;mKj;>umoviK|H+#CbgGq`D+QxI*$r6&D`yf%-M^{H;6gi4*j3?c9c z8$}NK?0I4%b?c`p2;SvL3*xY`0fe_KIZqPm`M%{DCrPUt{bS|zlhbHBNlUe7zcK}E z$L2zIl+z#Z!thJW!}{G&JAC@Pg`H(}GLM_m;uV}C9Yt(vF+F0Dy7{`k zY&v=ZZf?8^qSD>~2iP#{qQK632aMplZye6Q3X>dctS@JHSz2)zJaqXvFEZlr>9$oY z^&9^4pN`1EJcEw_wi@P{zJqQX470?WZTB*5Y7F!3#xJO^z|Gw@)bFoY5#daTP5OgI zcbKI$Ok(|9g_%#If*$3ga=U0_n%|#}eWwyeW~(19Te+!xF*(rd=LU(nM15;<7Z&oA zrqIw#r7}&_qgCdvS7+!|3?8w7JNRtHQ$~8Yyw(xC+n=- z7SQBo3+)tbg2NJn^=lukNOCkiEsgt~4tCrZ{aSnrHRMk@_?1^whFrEn3mT1NSC9B&c-(JrWu@FUhSNf+(>-_%kX#@LYnzq`^M#XX}(*!_LZCY za24(5Y$WH^=;GY^#0c{Y4{_!GPvm_bd#&6ypUpfwu%|+=UEe^Q+oe$7cXnyF@O67L3%SKO#rdayD^4^vH2hG{w%vp|_*jKf4 z=jb?40UP4S+Mi~(Uz(^cvgVB+r+Rt|;wnFRYcz(i=&Q14Ok=V-tTPw4%v&;ZrxI#w z6&rvLjj#yzBr5~N*7o09CkIE=>EWwo`ceL*@Y=504RB*xY#SY{)p3Gvn9zBL_FCN0 zl^axu8p~su8HpiDNi{%5ojAv1{0?t7*mflF9&Y_x4#)X(jyLl~c+s6*I1G7{zBI;tH*_ z94)o##4$cU4ohj~e#C^E><)3E`d;ftdwTQZpDmp)9)n5^+h%BE?)8LI2A`L!zjTBL zPYE&+#0&jDFc&4Tg}VC}E@4ZGyWbiK2dvn6Mpu!cQT_^6!RG!7)fE>V>?PNFm?vc5 z>A8gcW=5Xm2#LEW_;XgMQ$=Y-#lc|zs2}}2ny_4Kb%D@Vrtu6rOmUe!ph7;;L`XHi zXcDHc;OYbIk44?|A9-=Ml{Xap)^{jb5$Kl?v`CIT`bDXV*x{h+UARtzOd}#US>a%X zOdU`5^_P@lkQxB*B<&RQB?FgJOH2-~rMnXf_{5%~s&OlUM^i30FeOM{`XOXs)3_BU zEAyNr%bz8RJ=Cvw8y=)3p z`K|i!j$l~LqQ)kabHK}7WeyB$x*({t#cQWf98qh&X{R*Y--9)~g)?XCL>&z;v9#hY zTFY?DV&1fPE&*z}6Ki`Y5#(-eVYB;OzZjPSDnN%ArA8D>wODpQT4Jt}ah556JE+G_! z_P0uQ!qDhR94VdpAqajIOl4~>oTaQ8H5yXaTZUOb%cRAkWYV?KSNlTqgSM=Wgf)JP zz=?Q5f5zPEVO!NbOCbqEwP^Ff_O_`gdm67#U{Mp^_bKcq2IoO%zcJb(M5z`cjv1Ck z+!awNRhwjj6CQqu+xC#{UWo^3+h?6ymzq3r?3JV}<|u_9x=MWAm`1AqAnOsJ*@)^4 zr|`FkZlg{Cd!#Chmhn=_ZQe;~-DTUOv>)Tbmh0{z_42vWa|vNUO% z_5KA1xNHBgw0zjUH|s5xg$b4k z@Koa#-AFizrr6h2#$k*41tm7_jp$yL4X*DZcklq!u+>9E0WnhcOFPn7Vh^ao@~tno z@RwY)*+8&|Hpdq)`a=L*Teuw;_B@u;o!a!YaOO@bs-?*gqpm?nRkXl~mKFfF z+OVzE%RlC`M5-+KM_GXZ@9b;=2C(sq+R&Ko_RzZ%5P~kDieK3yzV4BN*{$E%KY;4k z)s?*vacHYN~u+?SoI`e@S2!9Co!cdvz;@N@{yj`0-9^8osR(V7PR-O&gM)x3owqs5oJpIwc zgY`#VzjI$V>YYDrIr8D;0JK<10@ycefw z;;oV(!gUR*xBg%xTl-#d>u(5}#jFrLKo}q0b{IuuZhuO7n++ zo@9)d#`(AT$mbW5g;c;&z>1_2Nk%;L?TIhfeK%PYp>5N<5wdihxw4-qvVsN6t@bol zDFgi~t`B&ZU3ek!#fXVE5Ao$7AwI+@amT_m2SclwQE{cLcv3kwhokq+!S%>Fe_*(Z z75)vhq@YqZqa~Hf$0S?T@nr_%mV%*aT${~4)6|(P@Bq_Q!VC4tZa`7?ra`4?oV+wSr2`TVSUmKS_>V@3%0*S#!+L=3f@oF=4k9U9xv0p1;Fx&}V;X2J~h zcz^}G3|;s8JyEFR*LB*fPUm+?f+ofnBQ5uK%NrwA+RV_~h<6-mw_wU?NGRI!zNTh% z&>ty6x8&gW75gdW)?p->&%?{*brS|k@b|(>&<^nyO55Pi_q*eK)=J*Uunw2cw--p%E!VXuDa? ztZ$HPKJ6$Sh7!UrpxVBLFSnpZOw$(ftvg!Nk1LVfL+FL(u zh1Abu(oCSmgqQ2IrE;Zz2f2DAD%T4XO6tU&)2IB}vV3{^xpz1MYFEPy_09RP2QvmA zIqw<(UaCnCs!mFX$+3sjnV*(O5)y`jW!*wzF-l^K`Bxgap+0Ej z@c^nf{Ic`6I5#9bcE7fwiiP8JZ9dr3FsD~SBiW_`8{UgFt*{$@qj#E)90JYra>Zs3 z$sCTuzOye2GdTO;4@;wgJK@!ij-|c--insluCR}{#q=D6Xz#nL6;`rkc*UzLTR%Y{ zN2YK;Zcz4YY=+|(0_?E=#~3U@I1fIyRiBF zIeWj=id+b|L;kSMs>NMfeB^(={IdrC;NYJy_$L+olL`OdOqgH0OpSa?FTRhwb<|%A Pe7HEdAEg|=c=LY&YVNkY literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000000000000000000000000000000000000..13b35eba55c6dabc3aac36f33d859266c18fa0d0 GIT binary patch literal 5680 zcmaiYXH?Tqu=Xz`p-L#B_gI#0we$cm_HcmYFP$?wjD#BaCN4mzC5#`>w9y6=ThxrYZc0WPXprg zYjB`UsV}0=eUtY$(P6YW}npdd;%9pi?zS3k-nqCob zSX_AQEf|=wYT3r?f!*Yt)ar^;l3Sro{z(7deUBPd2~(SzZ-s@0r&~Km2S?8r##9-< z)2UOSVaHqq6}%sA9Ww;V2LG=PnNAh6mA2iWOuV7T_lRDR z&N8-eN=U)-T|;wo^Wv=34wtV0g}sAAe}`Ph@~!|<;z7*K8(qkX0}o=!(+N*UWrkEja*$_H6mhK1u{P!AC39} z|3+Z(mAOq#XRYS)TLoHv<)d%$$I@+x+2)V{@o~~J-!YUI-Q9%!Ldi4Op&Lw&B>jj* zwAgC#Y>gbIqv!d|J5f!$dbCXoq(l3GR(S>(rtZ~Z*agXMMKN!@mWT_vmCbSd3dUUm z4M&+gz?@^#RRGal%G3dDvj7C5QTb@9+!MG+>0dcjtZEB45c+qx*c?)d<%htn1o!#1 zpIGonh>P1LHu3s)fGFF-qS}AXjW|M*2Xjkh7(~r(lN=o#mBD9?jt74=Rz85I4Nfx_ z7Z)q?!};>IUjMNM6ee2Thq7))a>My?iWFxQ&}WvsFP5LP+iGz+QiYek+K1`bZiTV- zHHYng?ct@Uw5!gquJ(tEv1wTrRR7cemI>aSzLI^$PxW`wL_zt@RSfZ1M3c2sbebM* ze0=;sy^!90gL~YKISz*x;*^~hcCoO&CRD)zjT(A2b_uRue=QXFe5|!cf0z1m!iwv5GUnLw9Dr*Ux z)3Lc!J@Ei;&&yxGpf2kn@2wJ2?t6~obUg;?tBiD#uo$SkFIasu+^~h33W~`r82rSa ztyE;ehFjC2hjpJ-e__EH&z?!~>UBb=&%DS>NT)1O3Isn-!SElBV2!~m6v0$vx^a<@ISutdTk1@?;i z<8w#b-%|a#?e5(n@7>M|v<<0Kpg?BiHYMRe!3Z{wYc2hN{2`6(;q`9BtXIhVq6t~KMH~J0~XtUuT06hL8c1BYZWhN zk4F2I;|za*R{ToHH2L?MfRAm5(i1Ijw;f+0&J}pZ=A0;A4M`|10ZskA!a4VibFKn^ zdVH4OlsFV{R}vFlD~aA4xxSCTTMW@Gws4bFWI@xume%smAnuJ0b91QIF?ZV!%VSRJ zO7FmG!swKO{xuH{DYZ^##gGrXsUwYfD0dxXX3>QmD&`mSi;k)YvEQX?UyfIjQeIm! z0ME3gmQ`qRZ;{qYOWt}$-mW*>D~SPZKOgP)T-Sg%d;cw^#$>3A9I(%#vsTRQe%moT zU`geRJ16l>FV^HKX1GG7fR9AT((jaVb~E|0(c-WYQscVl(z?W!rJp`etF$dBXP|EG z=WXbcZ8mI)WBN>3<@%4eD597FD5nlZajwh8(c$lum>yP)F}=(D5g1-WVZRc)(!E3} z-6jy(x$OZOwE=~{EQS(Tp`yV2&t;KBpG*XWX!yG+>tc4aoxbXi7u@O*8WWFOxUjcq z^uV_|*818$+@_{|d~VOP{NcNi+FpJ9)aA2So<7sB%j`$Prje&auIiTBb{oD7q~3g0 z>QNIwcz(V-y{Ona?L&=JaV5`o71nIsWUMA~HOdCs10H+Irew#Kr(2cn>orG2J!jvP zqcVX0OiF}c<)+5&p}a>_Uuv)L_j}nqnJ5a?RPBNi8k$R~zpZ33AA4=xJ@Z($s3pG9 zkURJY5ZI=cZGRt_;`hs$kE@B0FrRx(6K{`i1^*TY;Vn?|IAv9|NrN*KnJqO|8$e1& zb?OgMV&q5|w7PNlHLHF) zB+AK#?EtCgCvwvZ6*u|TDhJcCO+%I^@Td8CR}+nz;OZ*4Dn?mSi97m*CXXc=};!P`B?}X`F-B5v-%ACa8fo0W++j&ztmqK z;&A)cT4ob9&MxpQU41agyMU8jFq~RzXOAsy>}hBQdFVL%aTn~M>5t9go2j$i9=(rZ zADmVj;Qntcr3NIPPTggpUxL_z#5~C!Gk2Rk^3jSiDqsbpOXf^f&|h^jT4|l2ehPat zb$<*B+x^qO8Po2+DAmrQ$Zqc`1%?gp*mDk>ERf6I|42^tjR6>}4`F_Mo^N(~Spjcg z_uY$}zui*PuDJjrpP0Pd+x^5ds3TG#f?57dFL{auS_W8|G*o}gcnsKYjS6*t8VI<) zcjqTzW(Hk*t-Qhq`Xe+x%}sxXRerScbPGv8hlJ;CnU-!Nl=# zR=iTFf9`EItr9iAlAGi}i&~nJ-&+)Y| zMZigh{LXe)uR+4D_Yb+1?I93mHQ5{pId2Fq%DBr7`?ipi;CT!Q&|EO3gH~7g?8>~l zT@%*5BbetH)~%TrAF1!-!=)`FIS{^EVA4WlXYtEy^|@y@yr!C~gX+cp2;|O4x1_Ol z4fPOE^nj(}KPQasY#U{m)}TZt1C5O}vz`A|1J!-D)bR%^+=J-yJsQXDzFiqb+PT0! zIaDWWU(AfOKlSBMS};3xBN*1F2j1-_=%o($ETm8@oR_NvtMDVIv_k zlnNBiHU&h8425{MCa=`vb2YP5KM7**!{1O>5Khzu+5OVGY;V=Vl+24fOE;tMfujoF z0M``}MNnTg3f%Uy6hZi$#g%PUA_-W>uVCYpE*1j>U8cYP6m(>KAVCmbsDf39Lqv0^ zt}V6FWjOU@AbruB7MH2XqtnwiXS2scgjVMH&aF~AIduh#^aT1>*V>-st8%=Kk*{bL zzbQcK(l2~)*A8gvfX=RPsNnjfkRZ@3DZ*ff5rmx{@iYJV+a@&++}ZW+za2fU>&(4y`6wgMpQGG5Ah(9oGcJ^P(H< zvYn5JE$2B`Z7F6ihy>_49!6}(-)oZ(zryIXt=*a$bpIw^k?>RJ2 zQYr>-D#T`2ZWDU$pM89Cl+C<;J!EzHwn(NNnWpYFqDDZ_*FZ{9KQRcSrl5T>dj+eA zi|okW;6)6LR5zebZJtZ%6Gx8^=2d9>_670!8Qm$wd+?zc4RAfV!ZZ$jV0qrv(D`db zm_T*KGCh3CJGb(*X6nXzh!h9@BZ-NO8py|wG8Qv^N*g?kouH4%QkPU~Vizh-D3<@% zGomx%q42B7B}?MVdv1DFb!axQ73AUxqr!yTyFlp%Z1IAgG49usqaEbI_RnbweR;Xs zpJq7GKL_iqi8Md?f>cR?^0CA+Uk(#mTlGdZbuC*$PrdB$+EGiW**=$A3X&^lM^K2s zzwc3LtEs5|ho z2>U(-GL`}eNgL-nv3h7E<*<>C%O^=mmmX0`jQb6$mP7jUKaY4je&dCG{x$`0=_s$+ zSpgn!8f~ya&U@c%{HyrmiW2&Wzc#Sw@+14sCpTWReYpF9EQ|7vF*g|sqG3hx67g}9 zwUj5QP2Q-(KxovRtL|-62_QsHLD4Mu&qS|iDp%!rs(~ah8FcrGb?Uv^Qub5ZT_kn%I^U2rxo1DDpmN@8uejxik`DK2~IDi1d?%~pR7i#KTS zA78XRx<(RYO0_uKnw~vBKi9zX8VnjZEi?vD?YAw}y+)wIjIVg&5(=%rjx3xQ_vGCy z*&$A+bT#9%ZjI;0w(k$|*x{I1c!ECMus|TEA#QE%#&LxfGvijl7Ih!B2 z6((F_gwkV;+oSKrtr&pX&fKo3s3`TG@ye+k3Ov)<#J|p8?vKh@<$YE@YIU1~@7{f+ zydTna#zv?)6&s=1gqH<-piG>E6XW8ZI7&b@-+Yk0Oan_CW!~Q2R{QvMm8_W1IV8<+ zQTyy=(Wf*qcQubRK)$B;QF}Y>V6d_NM#=-ydM?%EPo$Q+jkf}*UrzR?Nsf?~pzIj$ z<$wN;7c!WDZ(G_7N@YgZ``l;_eAd3+;omNjlpfn;0(B7L)^;;1SsI6Le+c^ULe;O@ zl+Z@OOAr4$a;=I~R0w4jO`*PKBp?3K+uJ+Tu8^%i<_~bU!p%so z^sjol^slR`W@jiqn!M~eClIIl+`A5%lGT{z^mRbpv}~AyO%R*jmG_Wrng{B9TwIuS z0!@fsM~!57K1l0%{yy(#no}roy#r!?0wm~HT!vLDfEBs9x#`9yCKgufm0MjVRfZ=f z4*ZRc2Lgr(P+j2zQE_JzYmP0*;trl7{*N341Cq}%^M^VC3gKG-hY zmPT>ECyrhIoFhnMB^qpdbiuI}pk{qPbK^}0?Rf7^{98+95zNq6!RuV_zAe&nDk0;f zez~oXlE5%ve^TmBEt*x_X#fs(-En$jXr-R4sb$b~`nS=iOy|OVrph(U&cVS!IhmZ~ zKIRA9X%Wp1J=vTvHZ~SDe_JXOe9*fa zgEPf;gD^|qE=dl>Qkx3(80#SE7oxXQ(n4qQ#by{uppSKoDbaq`U+fRqk0BwI>IXV3 zD#K%ASkzd7u>@|pA=)Z>rQr@dLH}*r7r0ng zxa^eME+l*s7{5TNu!+bD{Pp@2)v%g6^>yj{XP&mShhg9GszNu4ITW=XCIUp2Xro&1 zg_D=J3r)6hp$8+94?D$Yn2@Kp-3LDsci)<-H!wCeQt$e9Jk)K86hvV^*Nj-Ea*o;G zsuhRw$H{$o>8qByz1V!(yV{p_0X?Kmy%g#1oSmlHsw;FQ%j9S#}ha zm0Nx09@jmOtP8Q+onN^BAgd8QI^(y!n;-APUpo5WVdmp8!`yKTlF>cqn>ag`4;o>i zl!M0G-(S*fm6VjYy}J}0nX7nJ$h`|b&KuW4d&W5IhbR;-)*9Y0(Jj|@j`$xoPQ=Cl literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000000000000000000000000000000000000..0a3f5fa40fb3d1e0710331a48de5d256da3f275d GIT binary patch literal 520 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|Tv8)E(|mmy zw18|52FCVG1{RPKAeI7R1_tH@j10^`nh_+nfC(-uuz(rC1}QWNE&K#jR^;j87-Auq zoUlN^K{r-Q+XN;zI ze|?*NFmgt#V#GwrSWaz^2G&@SBmck6ZcIFMww~vE<1E?M2#KUn1CzsB6D2+0SuRV@ zV2kK5HvIGB{HX-hQzs0*AB%5$9RJ@a;)Ahq#p$GSP91^&hi#6sg*;a~dt}4AclK>h z_3MoPRQ{i;==;*1S-mY<(JFzhAxMI&<61&m$J0NDHdJ3tYx~j0%M-uN6Zl8~_0DOkGXc0001@sz3l12C6Xg{AT~( zm6w64BA|AX`Ve)YY-glyudNN>MAfkXz-T7`_`fEolM;0T0BA)(02-OaW z0*cW7Z~ec94o8&g0D$N>b!COu{=m}^%oXZ4?T8ZyPZuGGBPBA7pbQMoV5HYhiT?%! zcae~`(QAN4&}-=#2f5fkn!SWGWmSeCISBcS=1-U|MEoKq=k?_x3apK>9((R zuu$9X?^8?@(a{qMS%J8SJPq))v}Q-ZyDm6Gbie0m92=`YlwnQPQP1kGSm(N2UJ3P6 z^{p-u)SSCTW~c1rw;cM)-uL2{->wCn2{#%;AtCQ!m%AakVs1K#v@(*-6QavyY&v&*wO_rCJXJuq$c$7ZjsW+pJo-$L^@!7X04CvaOpPyfw|FKvu;e(&Iw>Tbg zL}#8e^?X%TReXTt>gsBByt0kSU20oQx*~P=4`&tcZ7N6t-6LiK{LxX*p6}9c<0Pu^ zLx1w_P4P2V>bX=`F%v$#{sUDdF|;rbI{p#ZW`00Bgh(eB(nOIhy8W9T>3aQ=k8Z9% zB+TusFABF~J?N~fAd}1Rme=@4+1=M{^P`~se7}e3;mY0!%#MJf!XSrUC{0uZqMAd7%q zQY#$A>q}noIB4g54Ue)x>ofVm3DKBbUmS4Z-bm7KdKsUixva)1*&z5rgAG2gxG+_x zqT-KNY4g7eM!?>==;uD9Y4iI(Hu$pl8!LrK_Zb}5nv(XKW{9R144E!cFf36p{i|8pRL~p`_^iNo z{mf7y`#hejw#^#7oKPlN_Td{psNpNnM?{7{R-ICBtYxk>?3}OTH_8WkfaTLw)ZRTfxjW+0>gMe zpKg~`Bc$Y>^VX;ks^J0oKhB#6Ukt{oQhN+o2FKGZx}~j`cQB%vVsMFnm~R_1Y&Ml? zwFfb~d|dW~UktY@?zkau>Owe zRroi(<)c4Ux&wJfY=3I=vg)uh;sL(IYY9r$WK1$F;jYqq1>xT{LCkIMb3t2jN8d`9 z=4(v-z7vHucc_fjkpS}mGC{ND+J-hc_0Ix4kT^~{-2n|;Jmn|Xf9wGudDk7bi*?^+ z7fku8z*mbkGm&xf&lmu#=b5mp{X(AwtLTf!N`7FmOmX=4xwbD=fEo8CaB1d1=$|)+ z+Dlf^GzGOdlqTO8EwO?8;r+b;gkaF^$;+#~2_YYVH!hD6r;PaWdm#V=BJ1gH9ZK_9 zrAiIC-)z)hRq6i5+$JVmR!m4P>3yJ%lH)O&wtCyum3A*})*fHODD2nq!1@M>t@Za+ zH6{(Vf>_7!I-APmpsGLYpl7jww@s5hHOj5LCQXh)YAp+y{gG(0UMm(Ur z3o3n36oFwCkn+H*GZ-c6$Y!5r3z*@z0`NrB2C^q#LkOuooUM8Oek2KBk}o1PU8&2L z4iNkb5CqJWs58aR394iCU^ImDqV;q_Pp?pl=RB2372(Io^GA^+oKguO1(x$0<7w3z z)j{vnqEB679Rz4i4t;8|&Zg77UrklxY9@GDq(ZphH6=sW`;@uIt5B?7Oi?A0-BL}(#1&R;>2aFdq+E{jsvpNHjLx2t{@g1}c~DQcPNmVmy| zNMO@ewD^+T!|!DCOf}s9dLJU}(KZy@Jc&2Nq3^;vHTs}Hgcp`cw&gd7#N}nAFe3cM1TF%vKbKSffd&~FG9y$gLyr{#to)nxz5cCASEzQ}gz8O)phtHuKOW6p z@EQF(R>j%~P63Wfosrz8p(F=D|Mff~chUGn(<=CQbSiZ{t!e zeDU-pPsLgtc#d`3PYr$i*AaT!zF#23htIG&?QfcUk+@k$LZI}v+js|yuGmE!PvAV3 ztzh90rK-0L6P}s?1QH`Ot@ilbgMBzWIs zIs6K<_NL$O4lwR%zH4oJ+}JJp-bL6~%k&p)NGDMNZX7)0kni&%^sH|T?A)`z z=adV?!qnWx^B$|LD3BaA(G=ePL1+}8iu^SnnD;VE1@VLHMVdSN9$d)R(Wk{JEOp(P zm3LtAL$b^*JsQ0W&eLaoYag~=fRRdI>#FaELCO7L>zXe6w*nxN$Iy*Q*ftHUX0+N- zU>{D_;RRVPbQ?U+$^%{lhOMKyE5>$?U1aEPist+r)b47_LehJGTu>TcgZe&J{ z{q&D{^Ps~z7|zj~rpoh2I_{gAYNoCIJmio3B}$!5vTF*h$Q*vFj~qbo%bJCCRy509 zHTdDh_HYH8Zb9`}D5;;J9fkWOQi%Y$B1!b9+ESj+B@dtAztlY2O3NE<6HFiqOF&p_ zW-K`KiY@RPSY-p9Q99}Hcd05DT79_pfb{BV7r~?9pWh=;mcKBLTen%THFPo2NN~Nf zriOtFnqx}rtO|A6k!r6 zf-z?y-UD{dT0kT9FJ`-oWuPHbo+3wBS(}?2ql(+e@VTExmfnB*liCb zmeI+v5*+W_L;&kQN^ChW{jE0Mw#0Tfs}`9bk3&7UjxP^Ke(%eJu2{VnW?tu7Iqecm zB5|=-QdzK$=h50~{X3*w4%o1FS_u(dG2s&427$lJ?6bkLet}yYXCy)u_Io1&g^c#( z-$yYmSpxz{>BL;~c+~sxJIe1$7eZI_9t`eB^Pr0)5CuA}w;;7#RvPq|H6!byRzIJG ziQ7a4y_vhj(AL`8PhIm9edCv|%TX#f50lt8+&V+D4<}IA@S@#f4xId80oH$!_!q?@ zFRGGg2mTv&@76P7aTI{)Hu%>3QS_d)pQ%g8BYi58K~m-Ov^7r8BhX7YC1D3vwz&N8{?H*_U7DI?CI)+et?q|eGu>42NJ?K4SY zD?kc>h@%4IqNYuQ8m10+8xr2HYg2qFNdJl=Tmp&ybF>1>pqVfa%SsV*BY$d6<@iJA ziyvKnZ(~F9xQNokBgMci#pnZ}Igh0@S~cYcU_2Jfuf|d3tuH?ZSSYBfM(Y3-JBsC|S9c;# zyIMkPxgrq};0T09pjj#X?W^TFCMf1-9P{)g88;NDI+S4DXe>7d3Mb~i-h&S|Jy{J< zq3736$bH?@{!amD!1Ys-X)9V=#Z={fzsjVYMX5BG6%}tkzwC#1nQLj1y1f#}8**4Y zAvDZHw8)N)8~oWC88CgzbwOrL9HFbk4}h85^ptuu7A+uc#$f^9`EWv1Vr{5+@~@Uv z#B<;-nt;)!k|fRIg;2DZ(A2M2aC65kOIov|?Mhi1Sl7YOU4c$T(DoRQIGY`ycfkn% zViHzL;E*A{`&L?GP06Foa38+QNGA zw3+Wqs(@q+H{XLJbwZzE(omw%9~LPZfYB|NF5%j%E5kr_xE0u;i?IOIchn~VjeDZ) zAqsqhP0vu2&Tbz3IgJvMpKbThC-@=nk)!|?MIPP>MggZg{cUcKsP8|N#cG5 zUXMXxcXBF9`p>09IR?x$Ry3;q@x*%}G#lnB1}r#!WL88I@uvm}X98cZ8KO&cqT1p> z+gT=IxPsq%n4GWgh-Bk8E4!~`r@t>DaQKsjDqYc&h$p~TCh8_Mck5UB84u6Jl@kUZCU9BA-S!*bf>ZotFX9?a_^y%)yH~rsAz0M5#^Di80_tgoKw(egN z`)#(MqAI&A84J#Z<|4`Co8`iY+Cv&iboMJ^f9ROUK0Lm$;-T*c;TCTED_0|qfhlcS zv;BD*$Zko#nWPL}2K8T-?4}p{u)4xon!v_(yVW8VMpxg4Kh^J6WM{IlD{s?%XRT8P|yCU`R&6gwB~ zg}{At!iWCzOH37!ytcPeC`(({ovP7M5Y@bYYMZ}P2Z3=Y_hT)4DRk}wfeIo%q*M9UvXYJq!-@Ly79m5aLD{hf@BzQB>FdQ4mw z6$@vzSKF^Gnzc9vbccii)==~9H#KW<6)Uy1wb~auBn6s`ct!ZEos`WK8e2%<00b%# zY9Nvnmj@V^K(a_38dw-S*;G-(i(ETuIwyirs?$FFW@|66a38k+a%GLmucL%Wc8qk3 z?h_4!?4Y-xt)ry)>J`SuY**fuq2>u+)VZ+_1Egzctb*xJ6+7q`K$^f~r|!i?(07CD zH!)C_uerf-AHNa?6Y61D_MjGu*|wcO+ZMOo4q2bWpvjEWK9yASk%)QhwZS%N2_F4& z16D18>e%Q1mZb`R;vW{+IUoKE`y3(7p zplg5cBB)dtf^SdLd4n60oWie|(ZjgZa6L*VKq02Aij+?Qfr#1z#fwh92aV-HGd^_w zsucG24j8b|pk>BO7k8dS86>f-jBP^Sa}SF{YNn=^NU9mLOdKcAstv&GV>r zLxKHPkFxpvE8^r@MSF6UA}cG`#yFL8;kA7ccH9D=BGBtW2;H>C`FjnF^P}(G{wU;G z!LXLCbPfsGeLCQ{Ep$^~)@?v`q(uI`CxBY44osPcq@(rR-633!qa zsyb>?v%@X+e|Mg`+kRL*(;X>^BNZz{_kw5+K;w?#pReiw7eU8_Z^hhJ&fj80XQkuU z39?-z)6Fy$I`bEiMheS(iB6uLmiMd1i)cbK*9iPpl+h4x9ch7x- z1h4H;W_G?|)i`z??KNJVwgfuAM=7&Apd3vm#AT8uzQZ!NII}}@!j)eIfn53h{NmN7 zAKG6SnKP%^k&R~m5#@_4B@V?hYyHkm>0SQ@PPiw*@Tp@UhP-?w@jW?nxXuCipMW=L zH*5l*d@+jXm0tIMP_ec6Jcy6$w(gKK@xBX8@%oPaSyG;13qkFb*LuVx3{AgIyy&n3 z@R2_DcEn|75_?-v5_o~%xEt~ONB>M~tpL!nOVBLPN&e5bn5>+7o0?Nm|EGJ5 zmUbF{u|Qn?cu5}n4@9}g(G1JxtzkKv(tqwm_?1`?YSVA2IS4WI+*(2D*wh&6MIEhw z+B+2U<&E&|YA=3>?^i6)@n1&&;WGHF-pqi_sN&^C9xoxME5UgorQ_hh1__zzR#zVC zOQt4q6>ME^iPJ37*(kg4^=EFqyKH@6HEHXy79oLj{vFqZGY?sVjk!BX^h$SFJlJnv z5uw~2jLpA)|0=tp>qG*tuLru?-u`khGG2)o{+iDx&nC}eWj3^zx|T`xn5SuR;Aw8U z`p&>dJw`F17@J8YAuW4=;leBE%qagVTG5SZdh&d)(#ZhowZ|cvWvGMMrfVsbg>_~! z19fRz8CSJdrD|Rl)w!uznBF&2-dg{>y4l+6(L(vzbLA0Bk&`=;oQQ>(M8G=3kto_) zP8HD*n4?MySO2YrG6fwSrVmnesW+D&fxjfEmp=tPd?RKLZJcH&K(-S+x)2~QZ$c(> zru?MND7_HPZJVF%wX(49H)+~!7*!I8w72v&{b={#l9yz+S_aVPc_So%iF8>$XD1q1 zFtucO=rBj0Ctmi0{njN8l@}!LX}@dwl>3yMxZ;7 z0Ff2oh8L)YuaAGOuZ5`-p%Z4H@H$;_XRJQ|&(MhO78E|nyFa158gAxG^SP(vGi^+< zChY}o(_=ci3Wta#|K6MVljNe0T$%Q5ylx-v`R)r8;3+VUpp-)7T`-Y&{Zk z*)1*2MW+_eOJtF5tCMDV`}jg-R(_IzeE9|MBKl;a7&(pCLz}5<Zf+)T7bgNUQ_!gZtMlw=8doE}#W+`Xp~1DlE=d5SPT?ymu!r4z%&#A-@x^=QfvDkfx5-jz+h zoZ1OK)2|}_+UI)i9%8sJ9X<7AA?g&_Wd7g#rttHZE;J*7!e5B^zdb%jBj&dUDg4&B zMMYrJ$Z%t!5z6=pMGuO-VF~2dwjoXY+kvR>`N7UYfIBMZGP|C7*O=tU z2Tg_xi#Q3S=1|=WRfZD;HT<1D?GMR%5kI^KWwGrC@P2@R>mDT^3qsmbBiJc21kip~ zZp<7;^w{R;JqZ)C4z-^wL=&dBYj9WJBh&rd^A^n@07qM$c+kGv^f+~mU5_*|eePF| z3wDo-qaoRjmIw<2DjMTG4$HP{z54_te_{W^gu8$r=q0JgowzgQPct2JNtWPUsjF8R zvit&V8$(;7a_m%%9TqPkCXYUp&k*MRcwr*24>hR! z$4c#E=PVE=P4MLTUBM z7#*RDe0}=B)(3cvNpOmWa*eH#2HR?NVqXdJ=hq);MGD07JIQQ7Y0#iD!$C+mk7x&B zMwkS@H%>|fmSu#+ zI!}Sb(%o29Vkp_Th>&&!k7O>Ba#Om~B_J{pT7BHHd8(Ede(l`7O#`_}19hr_?~JP9 z`q(`<)y>%)x;O7)#-wfCP{?llFMoH!)ZomgsOYFvZ1DxrlYhkWRw#E-#Qf*z@Y-EQ z1~?_=c@M4DO@8AzZ2hKvw8CgitzI9yFd&N1-{|vP#4IqYb*#S0e3hrjsEGlnc4xwk z4o!0rxpUt8j&`mJ8?+P8G{m^jbk)bo_UPM+ifW*y-A*et`#_Ja_3nYyRa9fAG1Xr5 z>#AM_@PY|*u)DGRWJihZvgEh#{*joJN28uN7;i5{kJ*Gb-TERfN{ERe_~$Es~NJCpdKLRvdj4658uYYx{ng7I<6j~w@p%F<7a(Ssib|j z51;=Py(Nu*#hnLx@w&8X%=jrADn3TW>kplnb zYbFIWWVQXN7%Cwn6KnR)kYePEBmvM45I)UJb$)ninpdYg3a5N6pm_7Q+9>!_^xy?k za8@tJ@OOs-pRAAfT>Nc2x=>sZUs2!9Dwa%TTmDggH4fq(x^MW>mcRyJINlAqK$YQCMgR8`>6=Sg$ zFnJZsA8xUBXIN3i70Q%8px@yQPMgVP=>xcPI38jNJK<=6hC={a07+n@R|$bnhB)X$ z(Zc%tadp70vBTnW{OUIjTMe38F}JIH$#A}PB&RosPyFZMD}q}5W%$rh>5#U;m`z2K zc(&WRxx7DQLM-+--^w*EWAIS%bi>h587qkwu|H=hma3T^bGD&Z!`u(RKLeNZ&pI=q$|HOcji(0P1QC!YkAp*u z3%S$kumxR}jU<@6`;*-9=5-&LYRA<~uFrwO3U0k*4|xUTp4ZY7;Zbjx|uw&BWU$zK(w55pWa~#=f$c zNDW0O68N!xCy>G}(CX=;8hJLxAKn@Aj(dbZxO8a$+L$jK8$N-h@4$i8)WqD_%Snh4 zR?{O%k}>lr>w$b$g=VP8mckcCrjnp>uQl5F_6dPM8FWRqs}h`DpfCv20uZhyY~tr8 zkAYW4#yM;*je)n=EAb(q@5BWD8b1_--m$Q-3wbh1hM{8ihq7UUQfg@)l06}y+#=$( z$x>oVYJ47zAC^>HLRE-!HitjUixP6!R98WU+h>zct7g4eD;Mj#FL*a!VW!v-@b(Jv zj@@xM5noCp5%Vk3vY{tyI#oyDV7<$`KG`tktVyC&0DqxA#>V;-3oH%NW|Q&=UQ&zU zXNIT67J4D%5R1k#bW0F}TD`hlW7b)-=-%X4;UxQ*u4bK$mTAp%y&-(?{sXF%e_VH6 zTkt(X)SSN|;8q@8XX6qfR;*$r#HbIrvOj*-5ND8RCrcw4u8D$LXm5zlj@E5<3S0R# z??=E$p{tOk96$SloZ~ARe5`J=dB|Nj?u|zy2r(-*(q^@YwZiTF@QzQyPx_l=IDKa) zqD@0?IHJqSqZ_5`)81?4^~`yiGh6>7?|dKa8!e|}5@&qV!Iu9<@G?E}Vx9EzomB3t zEbMEm$TKGwkHDpirp;FZD#6P5qIlQJ8}rf;lHoz#h4TFFPYmS3+8(13_Mx2`?^=8S z|0)0&dQLJTU6{b%*yrpQe#OKKCrL8}YKw+<#|m`SkgeoN69TzIBQOl_Yg)W*w?NW) z*WxhEp$zQBBazJSE6ygu@O^!@Fr46j=|K`Mmb~xbggw7<)BuC@cT@Bwb^k?o-A zKX^9AyqR?zBtW5UA#siILztgOp?r4qgC`9jYJG_fxlsVSugGprremg-W(K0{O!Nw-DN%=FYCyfYA3&p*K>+|Q}s4rx#CQK zNj^U;sLM#q8}#|PeC$p&jAjqMu(lkp-_50Y&n=qF9`a3`Pr9f;b`-~YZ+Bb0r~c+V z*JJ&|^T{}IHkwjNAaM^V*IQ;rk^hnnA@~?YL}7~^St}XfHf6OMMCd9!vhk#gRA*{L zp?&63axj|Si%^NW05#87zpU_>QpFNb+I00v@cHwvdBn+Un)n2Egdt~LcWOeBW4Okm zD$-e~RD+W|UB;KQ;a7GOU&%p*efGu2$@wR74+&iP8|6#_fmnh^WcJLs)rtz{46);F z4v0OL{ZP9550>2%FE(;SbM*#sqMl*UXOb>ch`fJ|(*bOZ9=EB1+V4fkQ)hjsm3-u^Pk-4ji_uDDHdD>84tER!MvbH`*tG zzvbhBR@}Yd`azQGavooV=<WbvWLlO#x`hyO34mKcxrGv=`{ssnP=0Be5#1B;Co9 zh{TR>tjW2Ny$ZxJpYeg57#0`GP#jxDCU0!H15nL@@G*HLQcRdcsUO3sO9xvtmUcc{F*>FQZcZ5bgwaS^k-j5mmt zI7Z{Xnoml|A(&_{imAjK!kf5>g(oDqDI4C{;Bv162k8sFNr;!qPa2LPh>=1n z=^_9)TsLDvTqK7&*Vfm5k;VXjBW^qN3Tl&}K=X5)oXJs$z3gk0_+7`mJvz{pK|FVs zHw!k&7xVjvY;|(Py<;J{)b#Yjj*LZO7x|~pO4^MJ2LqK3X;Irb%nf}L|gck zE#55_BNsy6m+W{e zo!P59DDo*s@VIi+S|v93PwY6d?CE=S&!JLXwE9{i)DMO*_X90;n2*mPDrL%{iqN!?%-_95J^L z=l<*{em(6|h7DR4+4G3Wr;4*}yrBkbe3}=p7sOW1xj!EZVKSMSd;QPw>uhKK z#>MlS@RB@-`ULv|#zI5GytO{=zp*R__uK~R6&p$q{Y{iNkg61yAgB8C^oy&``{~FK z8hE}H&nIihSozKrOONe5Hu?0Zy04U#0$fB7C6y~?8{or}KNvP)an=QP&W80mj&8WL zEZQF&*FhoMMG6tOjeiCIV;T{I>jhi9hiUwz?bkX3NS-k5eWKy)Mo_orMEg4sV6R6X&i-Q%JG;Esl+kLpn@Bsls9O|i9z`tKB^~1D5)RIBB&J<6T@a4$pUvh$IR$%ubH)joi z!7>ON0DPwx=>0DA>Bb^c?L8N0BBrMl#oDB+GOXJh;Y&6I)#GRy$W5xK%a;KS8BrER zX)M>Rdoc*bqP*L9DDA3lF%U8Yzb6RyIsW@}IKq^i7v&{LeIc=*ZHIbO68x=d=+0T( zev=DT9f|x!IWZNTB#N7}V4;9#V$%Wo0%g>*!MdLOEU>My0^gni9ocID{$g9ytD!gy zKRWT`DVN(lcYjR|(}f0?zgBa3SwunLfAhx><%u0uFkrdyqlh8_g zDKt#R6rA2(Vm2LW_>3lBNYKG_F{TEnnKWGGC15y&OebIRhFL4TeMR*v9i0wPoK#H< zu4){s4K&K)K(9~jgGm;H7lS7y_RYfS;&!Oj5*eqbvEcW^a*i67nevzOZxN6F+K~A%TYEtsAVsR z@J=1hc#Dgs7J2^FL|qV&#WBFQyDtEQ2kPO7m2`)WFhqAob)Y>@{crkil6w9VoA?M6 zADGq*#-hyEVhDG5MQj677XmcWY1_-UO40QEP&+D)rZoYv^1B_^w7zAvWGw&pQyCyx zD|ga$w!ODOxxGf_Qq%V9Z7Q2pFiUOIK818AGeZ-~*R zI1O|SSc=3Z?#61Rd|AXx2)K|F@Z1@x!hBBMhAqiU)J=U|Y)T$h3D?ZPPQgkSosnN! zIqw-t$0fqsOlgw3TlHJF*t$Q@bg$9}A3X=cS@-yU3_vNG_!#9}7=q7!LZ?-%U26W4 z$d>_}*s1>Ac%3uFR;tnl*fNlylJ)}r2^Q3&@+is3BIv<}x>-^_ng;jhdaM}6Sg3?p z0jS|b%QyScy3OQ(V*~l~bK>VC{9@FMuW_JUZO?y(V?LKWD6(MXzh}M3r3{7b4eB(#`(q1m{>Be%_<9jw8HO!x#yF6vez$c#kR+}s zZO-_;25Sxngd(}){zv?ccbLqRAlo;yog>4LH&uZUK1n>x?u49C)Y&2evH5Zgt~666 z_2_z|H5AO5Iqxv_Bn~*y1qzRPcob<+Otod5Xd2&z=C;u+F}zBB@b^UdGdUz|s!H}M zXG%KiLzn3G?FZgdY&3pV$nSeY?ZbU^jhLz9!t0K?ep}EFNqR1@E!f*n>x*!uO*~JF zW9UXWrVgbX1n#76_;&0S7z}(5n-bqnII}_iDsNqfmye@)kRk`w~1 z6j4h4BxcPe6}v)xGm%=z2#tB#^KwbgMTl2I*$9eY|EWAHFc3tO48Xo5rW z5oHD!G4kb?MdrOHV=A+8ThlIqL8Uu+7{G@ zb)cGBm|S^Eh5= z^E^SZ=yeC;6nNCdztw&TdnIz}^Of@Ke*@vjt)0g>Y!4AJvWiL~e7+9#Ibhe)> ziNwh>gWZL@FlWc)wzihocz+%+@*euwXhW%Hb>l7tf8aJe5_ZSH1w-uG|B;9qpcBP0 zM`r1Hu#htOl)4Cl1c7oY^t0e4Jh$-I(}M5kzWqh{F=g&IM#JiC`NDSd@BCKX#y<P@Gwl$3a3w z6<(b|K(X5FIR22M)sy$4jY*F4tT{?wZRI+KkZFb<@j@_C316lu1hq2hA|1wCmR+S@ zRN)YNNE{}i_H`_h&VUT5=Y(lN%m?%QX;6$*1P}K-PcPx>*S55v)qZ@r&Vcic-sjkm z! z=nfW&X`}iAqa_H$H%z3Tyz5&P3%+;93_0b;zxLs)t#B|up}JyV$W4~`8E@+BHQ+!y zuIo-jW!~)MN$2eHwyx-{fyGjAWJ(l8TZtUp?wZWBZ%}krT{f*^fqUh+ywHifw)_F> zp76_kj_B&zFmv$FsPm|L7%x-j!WP>_P6dHnUTv!9ZWrrmAUteBa`rT7$2ixO;ga8U z3!91micm}{!Btk+I%pMgcKs?H4`i+=w0@Ws-CS&n^=2hFTQ#QeOmSz6ttIkzmh^`A zYPq)G1l3h(E$mkyr{mvz*MP`x+PULBn%CDhltKkNo6Uqg!vJ#DA@BIYr9TQ`18Un2 zv$}BYzOQuay9}w(?JV63F$H6WmlYPPpH=R|CPb%C@BCv|&Q|&IcW7*LX?Q%epS z`=CPx{1HnJ9_46^=0VmNb>8JvMw-@&+V8SDLRYsa>hZXEeRbtf5eJ>0@Ds47zIY{N z42EOP9J8G@MXXdeiPx#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91AfN*P1ONa40RR91AOHXW0IY^$^8f$?lu1NER9Fe^SItioK@|V(ZWmgL zZT;XwPgVuWM>O%^|Dc$VK;n&?9!&g5)aVsG8cjs5UbtxVVnQNOV~7Mrg3+jnU;rhE z6fhW6P)R>_eXrXo-RW*y6RQ_qcb^s1wTu$TwriZ`=JUws>vRi}5x}MW1MR#7p|gIWJlaLK;~xaN}b< z<-@=RX-%1mt`^O0o^~2=CD7pJ<<$Rp-oUL-7PuG>do^5W_Mk#unlP}6I@6NPxY`Q} zuXJF}!0l)vwPNAW;@5DjPRj?*rZxl zwn;A(cFV!xe^CUu+6SrN?xe#mz?&%N9QHf~=KyK%DoB8HKC)=w=3E?1Bqj9RMJs3U z5am3Uv`@+{jgqO^f}Lx_Jp~CoP3N4AMZr~4&d)T`R?`(M{W5WWJV^z~2B|-oih@h^ zD#DuzGbl(P5>()u*YGo*Och=oRr~3P1wOlKqI)udc$|)(bacG5>~p(y>?{JD7nQf_ z*`T^YL06-O>T(s$bi5v~_fWMfnE7Vn%2*tqV|?~m;wSJEVGkNMD>+xCu#um(7}0so zSEu7?_=Q64Q5D+fz~T=Rr=G_!L*P|(-iOK*@X8r{-?oBlnxMNNgCVCN9Y~ocu+?XA zjjovJ9F1W$Nf!{AEv%W~8oahwM}4Ruc+SLs>_I_*uBxdcn1gQ^2F8a*vGjgAXYyh? zWCE@c5R=tbD(F4nL9NS?$PN1V_2*WR?gjv3)4MQeizuH`;sqrhgykEzj z593&TGlm3h`sIXy_U<7(dpRXGgp0TB{>s?}D{fwLe>IV~exweOfH!qM@CV5kib!YA z6O0gvJi_0J8IdEvyP#;PtqP*=;$iI2t(xG2YI-e!)~kaUn~b{6(&n zp)?iJ`z2)Xh%sCV@BkU`XL%_|FnCA?cVv@h*-FOZhY5erbGh)%Q!Av#fJM3Csc_g zC2I6x%$)80`Tkz#KRA!h1FzY`?0es3t!rKDT5EjPe6B=BLPr7s0GW!if;Ip^!AmGW zL;$`Vdre+|FA!I4r6)keFvAx3M#1`}ijBHDzy)3t0gwjl|qC2YB`SSxFKHr(oY#H$)x{L$LL zBdLKTlsOrmb>T0wd=&6l3+_Te>1!j0OU8%b%N342^opKmT)gni(wV($s(>V-fUv@0p8!f`=>PxC|9=nu ze{ToBBj8b<{PLfXV$h8YPgA~E!_sF9bl;QOF{o6t&JdsX?}rW!_&d`#wlB6T_h;Xf zl{4Tz5>qjF4kZgjO7ZiLPRz_~U@k5%?=30+nxEh9?s78gZ07YHB`FV`4%hlQlMJe@J`+e(qzy+h(9yY^ckv_* zb_E6o4p)ZaWfraIoB2)U7_@l(J0O%jm+Or>8}zSSTkM$ASG^w3F|I? z$+eHt7T~04(_WfKh27zqS$6* zzyy-ZyqvSIZ0!kkSvHknm_P*{5TKLQs8S6M=ONuKAUJWtpxbL#2(_huvY(v~Y%%#~ zYgsq$JbLLprKkV)32`liIT$KKEqs$iYxjFlHiRNvBhxbDg*3@Qefw4UM$>i${R5uB zhvTgmqQsKA{vrKN;TSJU2$f9q=y{$oH{<)woSeV>fkIz6D8@KB zf4M%v%f5U2?<8B(xn}xV+gWP?t&oiapJhJbfa;agtz-YM7=hrSuxl8lAc3GgFna#7 zNjX7;`d?oD`#AK+fQ=ZXqfIZFEk{ApzjJF0=yO~Yj{7oQfXl+6v!wNnoqwEvrs81a zGC?yXeSD2NV!ejp{LdZGEtd1TJ)3g{P6j#2jLR`cpo;YX}~_gU&Gd<+~SUJVh+$7S%`zLy^QqndN<_9 zrLwnXrLvW+ew9zX2)5qw7)zIYawgMrh`{_|(nx%u-ur1B7YcLp&WFa24gAuw~& zKJD3~^`Vp_SR$WGGBaMnttT)#fCc^+P$@UHIyBu+TRJWbcw4`CYL@SVGh!X&y%!x~ zaO*m-bTadEcEL6V6*{>irB8qT5Tqd54TC4`h`PVcd^AM6^Qf=GS->x%N70SY-u?qr>o2*OV7LQ=j)pQGv%4~z zz?X;qv*l$QSNjOuQZ>&WZs2^@G^Qas`T8iM{b19dS>DaXX~=jd4B2u`P;B}JjRBi# z_a@&Z5ev1-VphmKlZEZZd2-Lsw!+1S60YwW6@>+NQ=E5PZ+OUEXjgUaXL-E0fo(E* zsjQ{s>n33o#VZm0e%H{`KJi@2ghl8g>a~`?mFjw+$zlt|VJhSU@Y%0TWs>cnD&61fW4e0vFSaXZa4-c}U{4QR8U z;GV3^@(?Dk5uc@RT|+5C8-24->1snH6-?(nwXSnPcLn#X_}y3XS)MI_?zQ$ZAuyg+ z-pjqsw}|hg{$~f0FzmmbZzFC0He_*Vx|_uLc!Ffeb8#+@m#Z^AYcWcZF(^Os8&Z4g zG)y{$_pgrv#=_rV^D|Y<_b@ICleUv>c<0HzJDOsgJb#Rd-Vt@+EBDPyq7dUM9O{Yp zuGUrO?ma2wpuJuwl1M=*+tb|qx7Doj?!F-3Z>Dq_ihFP=d@_JO;vF{iu-6MWYn#=2 zRX6W=`Q`q-+q@Db|6_a1#8B|#%hskH82lS|9`im0UOJn?N#S;Y0$%xZw3*jR(1h5s z?-7D1tnIafviko>q6$UyqVDq1o@cwyCb*})l~x<@s$5D6N=-Uo1yc49p)xMzxwnuZ zHt!(hu-Ek;Fv4MyNTgbW%rPF*dB=;@r3YnrlFV{#-*gKS_qA(G-~TAlZ@Ti~Yxw;k za1EYyX_Up|`rpbZ0&Iv#$;eC|c0r4XGaQ-1mw@M_4p3vKIIpKs49a8Ns#ni)G314Z z8$Ei?AhiT5dQGWUYdCS|IC7r z=-8ol>V?u!n%F*J^^PZ(ONT&$Ph;r6X;pj|03HlDY6r~0g~X#zuzVU%a&!fs_f|m?qYvg^Z{y?9Qh7Rn?T*F%7lUtA6U&={HzhYEzA`knx1VH> z{tqv?p@I(&ObD5L4|YJV$QM>Nh-X3cx{I&!$FoPC_2iIEJfPk-$;4wz>adRu@n`_y z_R6aN|MDHdK;+IJmyw(hMoDCFCQ(6?hCAG5&7p{y->0Uckv# zvooVuu04$+pqof777ftk<#42@KQ((5DPcSMQyzGOJ{e9H$a9<2Qi_oHjl{#=FUL9d z+~0^2`tcvmp0hENwfHR`Ce|<1S@p;MNGInXCtHnrDPXCKmMTZQ{HVm_cZ>@?Wa6}O zHsJc7wE)mc@1OR2DWY%ZIPK1J2p6XDO$ar`$RXkbW}=@rFZ(t85AS>>U0!yt9f49^ zA9@pc0P#k;>+o5bJfx0t)Lq#v4`OcQn~av__dZ-RYOYu}F#pdsl31C^+Qgro}$q~5A<*c|kypzd} ziYGZ~?}5o`S5lw^B{O@laad9M_DuJle- z*9C7o=CJh#QL=V^sFlJ0c?BaB#4bV^T(DS6&Ne&DBM_3E$S^S13qC$7_Z?GYXTpR@wqr70wu$7+qvf-SEUa5mdHvFbu^7ew!Z1a^ zo}xKOuT*gtGws-a{Tx}{#(>G~Y_h&5P@Q8&p!{*s37^QX_Ibx<6XU*AtDOIvk|^{~ zPlS}&DM5$Ffyu-T&0|KS;Wnaqw{9DB&B3}vcO14wn;)O_e@2*9B&0I_ zZz{}CMxx`hv-XouY>^$Y@J(_INeM>lIQI@I>dBAqq1)}?Xmx(qRuX^i4IV%=MF306 z9g)i*79pP%_7Ex?m6ag-4Tlm=Z;?DQDyC-NpUIb#_^~V_tsL<~5<&;Gf2N+p?(msn zzUD~g>OoW@O}y0@Z;RN)wjam`CipmT&O7a|YljZqU=U86 zedayEdY)2F#BJ6xvmW8K&ffdS*0!%N<%RB!2~PAT4AD*$W7yzHbX#Eja9%3aD+Ah2 zf#T;XJW-GMxpE=d4Y>}jE=#U`IqgSoWcuvgaWQ9j1CKzG zDkoMDDT)B;Byl3R2PtC`ip=yGybfzmVNEx{xi_1|Cbqj>=FxQc{g`xj6fIfy`D8fA z##!-H_e6o0>6Su&$H2kQTujtbtyNFeKc}2=|4IfLTnye#@$Au7Kv4)dnA;-fz@D_8 z)>irG$)dkBY~zX zC!ZXLy*L3xr6cb70QqfN#Q>lFIc<>}>la4@3%7#>a1$PU&O^&VszpxLC%*!m-cO{B z-Y}rQr4$84(hvy#R69H{H zJ*O#uJh)TF6fbXy;fZkk%X=CjsTK}o5N1a`d7kgYYZLPxsHx%9*_XN8VWXEkVJZ%A z1A+5(B;0^{T4aPYr8%i@i32h)_)|q?9vws)r+=5u)1YNftF5mknwfd*%jXA2TeP}Z zQ!m?xJ3?9LpPM?_A3$hQ1QxNbR&}^m z!F999s?p^ak#C4NM_x2p9FoXWJ$>r?lJ)2bG)sX{gExgLA2s5RwHV!h6!C~d_H||J z>9{E{mEv{Z1z~65Vix@dqM4ZqiU|!)eWX$mwS5mLSufxbpBqqS!jShq1bmwCR6 z4uBri7ezMeS6ycaXPVu(i2up$L; zjpMtB`k~WaNrdgM_R=e#SN?Oa*u%nQy01?()h4A(jyfeNfx;5o+kX?maO4#1A^L}0 zYNyIh@QVXIFiS0*tE}2SWTrWNP3pH}1Vz1;E{@JbbgDFM-_Mky^7gH}LEhl~Ve5PexgbIyZ(IN%PqcaV@*_`ZFb=`EjspSz%5m2E34BVT)d=LGyHVz@-e%9Ova*{5@RD;7=Ebkc2GP%pIP^P7KzKapnh`UpH?@h z$RBpD*{b?vhohOKf-JG3?A|AX|2pQ?(>dwIbWhZ38GbTm4AImRNdv_&<99ySX;kJ| zo|5YgbHZC#HYgjBZrvGAT4NZYbp}qkVSa;C-LGsR26Co+i_HM&{awuO9l)Ml{G8zD zs$M8R`r+>PT#Rg!J(K6T4xHq7+tscU(}N$HY;Yz*cUObX7J7h0#u)S7b~t^Oj}TBF zuzsugnst;F#^1jm>22*AC$heublWtaQyM6RuaquFd8V#hJ60Z3j7@bAs&?dD#*>H0SJaDwp%U~27>zdtn+ z|8sZzklZy$%S|+^ie&P6++>zbrq&?+{Yy11Y>@_ce@vU4ZulS@6yziG6;iu3Iu`M= zf3rcWG<+3F`K|*(`0mE<$89F@jSq;j=W#E>(R}2drCB7D*0-|D;S;(;TwzIJkGs|q z2qH{m_zZ+el`b;Bv-#bQ>}*VPYC|7`rgBFf2oivXS^>v<&HHTypvd4|-zn|=h=TG{ z05TH2+{T%EnADO>3i|CB zCu60#qk`}GW{n4l-E$VrqgZGbI zbQW690KgZt4U3F^5@bdO1!xu~p@7Y~*_FfWg2CdvED5P5#w#V46LH`<&V0{t&Ml~4 zHNi7lIa+#i+^Z6EnxO7KJQw)wD)4~&S-Ki8)3=jpqxmx6c&zU&<&h%*c$I(5{1HZT zc9WE}ijcWJiVa^Q^xC|WX0habl89qycOyeViIbi(LFsEY_8a|+X^+%Qv+W4vzj>`y zpuRnjc-eHNkvXvI_f{=*FX=OKQzT?bck#2*qoKTHmDe>CDb&3AngA1O)1b}QJ1Tun z_<@yVEM>qG7664Pa@dzL@;DEh`#?yM+M|_fQS<7yv|i*pw)|Z8)9IR+QB7N3v3K(wv4OY*TXnH&X0nQB}?|h2XQeGL^q~N7N zDFa@x0E(UyN7k9g%IFq7Sf+EAfE#K%%#`)!90_)Dmy3Bll&e1vHQyPA87TaF(xbqMpDntVp?;8*$87STop$!EAnGhZ?>mqPJ(X zFsr336p3P{PpZCGn&^LP(JjnBbl_3P3Kcq+m}xVFMVr1zdCPJMDIV_ki#c=vvTwbU z*gKtfic&{<5ozL6Vfpx>o2Tts?3fkhWnJD&^$&+Mh5WGGyO7fG@6WDE`tEe(8<;+q z@Ld~g08XDzF8xtmpIj`#q^(Ty{Hq>t*v`pedHnuj(0%L(%sjkwp%s}wMd!a<*L~9T z9MM@s)Km~ogxlqEhIw5(lc46gCPsSosUFsgGDr8H{mj%OzJz{N#;bQ;KkV+ZWA1(9 zu0PXzyh+C<4OBYQ0v3z~Lr;=C@qmt8===Ov2lJ1=DeLfq*#jgT{YQCuwz?j{&3o_6 zsqp2Z_q-YWJg?C6=!Or|b@(zxTlg$ng2eUQzuC<+o)k<6^9ju_Z*#x+oioZ5T8Z_L zz9^A1h2eFS0O5muq8;LuDKwOv4A9pxmOjgb6L*i!-(0`Ie^d5Fsgspon%X|7 zC{RRXEmYn!5zP9XjG*{pLa)!2;PJB2<-tH@R7+E1cRo=Wz_5Ko8h8bB$QU%t9#vol zAoq?C$~~AsYC|AQQ)>>7BJ@{Cal)ZpqE=gjT+Juf!RD-;U0mbV1ED5PbvFD6M=qj1 zZ{QERT5@(&LQ~1X9xSf&@%r|3`S#ZCE=sWD`D4YQZ`MR`G&s>lN{y2+HqCfvgcw3E z-}Kp(dfGG?V|97kAHQX+OcKCZS`Q%}HD6u*e$~Ki&Vx53&FC!x94xJd4F2l^qQeFO z?&JdmgrdVjroKNJx64C!H&Vncr^w zzR#XI}Dn&o8jB~_YlVM^+#0W(G1LZH5K^|uYT@KSR z^Y5>^*Bc45E1({~EJB(t@4n9gb-eT#s@@7)J^^<_VV`Pm!h7av8XH6^5zO zOcQBhTGr;|MbRsgxCW69w{bl4EW#A~);L?d4*y#j8Ne=Z@fmJP0k4{_cQ~KA|Y#_#BuUiYx8y*za3_6Y}c=GSe7(2|KAfhdzud!Zq&}j)=o4 z7R|&&oX7~e@~HmyOOsCCwy`AR+deNjZ3bf6ijI_*tKP*_5JP3;0d;L_p(c>W1b%sG zJ*$wcO$ng^aW0E(5ldckV9unU7}OB7s?Wx(761?1^&8tA5y0_(ieV>(x-e@}1`lWC z-YH~G$D>#ud!SxK2_Iw{K%92=+{4yb-_XC>ji&j7)1ofp(OGa4jjF;Hd*`6YQL+Jf zffg+6CPc8F@EDPN{Kn96yip;?g@)qgkPo^nVKFqY?8!=h$G$V=<>%5J&iVjwR!7H0 z$@QL|_Q81I;Bnq8-5JyNRv$Y>`sWl{qhq>u+X|)@cMlsG!{*lu?*H`Tp|!uv z9oEPU1jUEj@ueBr}%Y)7Luyi)REaJV>eQ{+uy4uh0ep0){t;OU8D*RZ& zE-Z-&=BrWQLAD^A&qut&4{ZfhqK1ZQB0fACP)=zgx(0(o-`U62EzTkBkG@mXqbjXm z>w`HNeQM?Is&4xq@BB(K;wv5nI6EXas)XXAkUuf}5uSrZLYxRCQPefn-1^#OCd4aO zzF=dQ*CREEyWf@n6h7(uXLNgJIwGp#Xrsj6S<^bzQ7N0B0N{XlT;`=m9Olg<>KL}9 zlp>EKTx-h|%d1Ncqa=wnQEuE;sIO-f#%Bs?g4}&xS?$9MG?n$isHky0caj za8W+B^ERK#&h?(x)7LLpOqApV5F>sqB`sntV%SV>Q1;ax67qs+WcssfFeF3Xk=e4^ zjR2^(%K1oBq%0%Rf!y&WT;lu2Co(rHi|r1_uW)n{<7fGc-c=ft7Z0Q}r4W$o$@tQF#i?jDBwZ8h+=SC}3?anUp3mtRVv9l#H?-UD;HjTF zQ*>|}e=6gDrgI9p%c&4iMUkQa4zziS$bO&i#DI$Wu$7dz7-}XLk%!US^XUIFf2obO zFCTjVEtkvYSKWB;<0C;_B{HHs~ax_48^Cml*mjfBC5*7^HJZiLDir(3k&BerVIZF8zF;0q80eX8c zPN4tc+Dc5DqEAq$Y3B3R&XPZ=AQfFMXv#!RQnGecJONe0H;+!f^h5x0wS<+%;D}MpUbTNUBA}S2n&U59-_5HKr{L^jPsV8B^%NaH|tUr)mq=qCBv_- ziZ1xUp(ZzxUYTCF@C}To;u60?RIfTGS?#JnB8S8@j`TKPkAa)$My+6ziGaBcA@){d z91)%+v2_ba7gNecdj^8*I4#<11l!{XKl6s0zkXfJPxhP+@b+5ev{a>p*W-3*25c&} zmCf{g9mPWVQ$?Sp*4V|lT@~>RR)9iNdN^7KT@>*MU3&v^3e?=NTbG9!h6C|9zO097 zN{Qs6YwR-5$)~ z`b~qs`a1Dbx8P>%V=1XGjBptMf%P~sl1qbHVm1HYpY|-Z^Dar8^HqjIw}xaeRlsYa zJ_@Apy-??`gxPmb`m`0`z`#G7*_C}qiSZe~l2z65tE~IwMw$1|-u&t|z-8SxliH00 zlh1#kuqB56s+E&PWQ7Nz17?c}pN+A@-c^xLqh(j;mS|?>(Pf7(?qd z5q@jkc^nA&!K-}-1P=Ry0yyze0W!+h^iW}7jzC1{?|rEFFWbE^Yu7Y}t?jmP-D$f+ zmqFT7nTl0HL|4jwGm7w@a>9 zKD)V~+g~ysmei$OT5}%$&LK8?ib|8aY|>W3;P+0B;=oD=?1rg+PxKcP(d;OEzq1CKA&y#boc51P^ZJPPS)z5 zAZ)dd2$glGQXFj$`XBBJyl2y-aoBA8121JC9&~|_nY>nkmW>TLi%mWdn-^Jks-Jv| zSR*wij;A3Fcy8KsDjQ15?Z9oOj|Qw2;jgJiq>dxG(2I2RE- z$As!#zSFIskebqU2bnoM^N<4VWD2#>!;saPSsY8OaCCQqkCMdje$C?Sp%V}f2~tG5 z0whMYk6tcaABwu*x)ak@n4sMElGPX1_lmv@bgdI2jPdD|2-<~Jf`L`@>Lj7{<-uLQ zE3S_#3e10q-ra=vaDQ42QUY^@edh>tnTtpBiiDVUk5+Po@%RmuTntOlE29I4MeJI?;`7;{3e4Qst#i-RH6s;>e(Sc+ubF2_gwf5Qi%P!aa89fx6^{~A*&B4Q zKTF|Kx^NkiWx=RDhe<{PWXMQ;2)=SC=yZC&mh?T&CvFVz?5cW~ritRjG2?I0Av_cI z)=s!@MXpXbarYm>Kj0wOxl=eFMgSMc?62U#2gM^li@wKPK9^;;0_h7B>F>0>I3P`{ zr^ygPYp~WVm?Qbp6O3*O2)(`y)x>%ZXtztz zMAcwKDr=TCMY!S-MJ8|2MJCVNUBI0BkJV6?(!~W!_dC{TS=eh}t#X+2D>Kp&)ZN~q zvg!ogxUXu^y(P*;Q+y_rDoGeSCYxkaGPldDDx)k;ocJvvGO#1YKoQLHUf2h_pjm&1 zqh&!_KFH03FcJvSdfgUYMp=5EpigZ*8}7N_W%Ms^WSQ4hH`9>3061OEcxmf~TcYn5_oHtscWn zo5!ayj<_fZ)vHu3!A!7M;4y1QIr8YGy$P2qDD_4+T8^=^dB6uNsz|D>p~4pF3Nrb6 zcpRK*($<~JUqOya#M1=#IhOZ zG)W+rJS-x(6EoVz)P zsSo>JtnChdj9^);su%SkFG~_7JPM zEDz3gk2T7Y%x>1tWyia|op(ilEzvAujW?Xwlw>J6d7yEi8E zv30riR|a_MM%ZZX&n!qm0{2agq(s?x9E@=*tyT$nND+{Djpm7Rsy!+c$j+wqMwTOF zZL8BQ|I`<^bGW)5apO{lh(Asqen?_U`$_n0-Ob~Yd%^89oEe%9yGumQ_8Be+l2k+n zCxT%s?bMpv|AdWP7M1LQwLm|x+igA~;+iK-*+tClF&ueX_V}>=4gvZ01xpubQWXD_ zi?Un>&3=$fu)dgk-Z;0Ll}HK5_YM->l^Czrd0^cJ))(DwL2g3aZuza7ga9^|mT_70 z))}A}r1#-(9cxtn<9jGRwOB4hb9kK@YCgjfOM-90I$8@l=H^`K$cyhe2mTM|FY9vW znH~h)I<_aa#V1xmhk?Ng@$Jw-s%a!$BI4Us+Df+?J&gKAF-M`v}j`OWKP3>6`X`tEmhe#y*(Xm$_^Ybbs=%;L7h zp7q^C*qM}Krqsinq|WolR99>_!GL#Z71Hhz|IwQQv<>Ds09B?Je(lhI1(FInO8mc} zl$RyKCUmfku+Cd^8s0|t+e}5g7M{ZPJQH=UB3(~U&(w#Bz#@DTDHy>_UaS~AtN>4O zJ-I#U@R($fgupHebcpuEBX`SZ>kN!rW$#9>s{^3`86ZRQRtYTY)hiFm_9wU3c`SC8 z-5M%g)h}3Pt|wyj#F%}pGC@VL`9&>9P+_UbudCkS%y2w&*o})hBplrB*@Z?gel5q+ z%|*59(sR9GMk3xME}wd%&k?7~J)OL`rK#4d-haC7uaU8-L@?$K6(r<0e<;y83rK&` z3Q!1rD9WkcB8WBQ|WT|$u^lkr0UL4WH4EQTJyk@5gzHb18cOte4w zS`fLv8q;PvAZyY;*Go3Qw1~5#gP0D0ERla6M6#{; zr1l?bR}Nh+OC7)4bfAs(0ZD(axaw6j9v`^jh5>*Eo&$dAnt?c|Y*ckEORIiJXfGcM zEo`bmIq6rJm`XhkXR-^3d8^RTK2;nmVetHfUNugJG(4XLOu>HJA;0EWb~?&|0abr6 zxqVp@p=b3MN^|~?djPe!=eex(u!x>RYFAj|*T$cTi*Sd3Bme7Pri1tkK9N`KtRmXf zZYNBNtik97ct1R^vamQBfo9ZUR@k*LhIg8OR9d_{iv#t)LQV91^5}K5u{eyxwOFoU zHMVq$C>tfa@uNDW^_>EmO~WYQd(@!nKmAvSSIb&hPO|}g-3985t?|R&WZXvxS}Kt2i^eRe>WHb_;-K5cM4=@AN1>E&1c$k!w4O*oscx(f=<1K6l#8Exi)U(ZiZ zdr#YTP6?m1e1dOKysUjQ^>-MR={OuD00g6+(a^cvcmn#A_%Fh3Of%(qP5nvjS1=(> z|Ld8{u%(J}%2SY~+$4pjy{()5HN2MYUjg1X9umxOMFFPdM+IwOVEs4Z(olynvT%G) zt9|#VR}%O2@f6=+6uvbZv{3U)l;C{tuc zZ{K$rut=eS%3_~fQv^@$HV6#9)K9>|0qD$EV2$G^XUNBLM|5-ZmFF!KV)$4l^KVj@ zZ4fI}Knv*K%zPqK77}B-h_V{66VrmoZP2>@^euu8Rc}#qwRwt5uEBWcJJE5*5rT2t zA4Jpx`QQ~1Sh_n_a9x%Il!t1&B~J6p54zxAJx`REov${jeuL8h8x-z=?qwMAmPK5i z_*ES)BW(NZluu#Bmn1-NUKQip_X&_WzJy~J`WYxEJQ&Gu7DD< z&F9urE;}8S{x4{yB zaq~1Zrz%8)<`prSQv$eu5@1RY2WLu=waPTrn`WK%;G5(jt^FeM;gOdvXQjYhax~_> z{bS_`;t#$RYMu-;_Dd&o+LD<5Afg6v{NK?0d8dD5ohAN?QoocETBj?y{MB)jQ%UQ}#t3j&iL!qr@#6JEajR3@^k5wgLfI9S9dT2^f`2wd z%I#Q*@Ctk@w=(u)@QC}yBvUP&fFRR-uYKJ){Wp3&$s(o~W7OzgsUIPx0|ph2L1(r*_Pa@T@mcH^JxBjh09#fgo|W#gG7}|)k&uD1iZxb0 z@|Y)W79SKj9sS&EhmTD;uI#)FE6VwQ*YAr&foK$RI5H8_ripb$^=;U%gWbrrk4!5P zXDcyscEZoSH~n6VJu8$^6LE6)>+=o#Q-~*jmob^@191+Ot1w454e3)WMliLtY6~^w zW|n#R@~{5K#P+(w+XC%(+UcOrk|yzkEes=!qW%imu6>zjdb!B#`efaliKtN}_c!Jp zfyZa`n+Nx8;*AquvMT2;c8fnYszdDA*0(R`bsof1W<#O{v%O!1IO4WZe=>XBu_D%d zOwWDaEtX%@B>4V%f1+dKqcXT>m2!|&?}(GK8e&R=&w?V`*Vj)sCetWp9lr@@{xe6a zE)JL&;p}OnOO}Nw?vFyoccXT*z*?r}E8{uPtd;4<(hmX;d$rqJhEF}I+kD+m(ke;J z7Cm$W*CSdcD=RYEBhedg>tuT{PHqwCdDP*NkHv4rvQTXkzEn*Mb0oJz&+WfWIOS4@ zzpPJ|e%a-PIwOaOC7uQcHQ-q(SE(e@fj+7oC@34wzaBNaP;cw&gm{Z8yYX?V(lIv5 zKbg*zo1m5aGA4^lwJ|bAU=j3*d8S{vp!~fLFcK8s6%Ng55_qW_d*3R%e=34aDZPfD z&Le39j|ahp6E7B0*9OVdeMNrTErFatiE+=Z!XZ^tv0y%zZKXRTBuPyP&C{5(H?t)S zKV24_-TKpOmCPzU&by8R1Q5HY^@IDoeDA9MbgizgQ*F1Er~HVmvSU>vx}pZVQ&tr| zOtZl8vfY2#L<)gZ=ba&wG~EI*Vd?}lRMCf+!b5CDz$8~be-HKMo5omk$w7p4`Mym*IR8WiTz4^kKcUo^8Hkcsu14u z`Pkg`#-Y^A%CqJ0O@UF|caAulf68@(zhqp~YjzInh7qSN7Ov%Aj(Qz%{3zW|xubJ- ztNE_u_MO7Q_585r;xD?e=Er}@U1G@BKW5v$UM((eByhH2p!^g9W}99OD8VV@7d{#H zv)Eam+^K(5>-Ot~U!R$Um3prQmM)7DyK=iM%vy>BRX4#aH7*oCMmz07YB(EL!^%F7?CA#>zXqiYDhS;e?LYPTf(bte6B ztrfvDXYG*T;ExK-w?Knt{jNv)>KMk*sM^ngZ-WiUN;=0Ev^GIDMs=AyLg2V@3R z7ugNc45;4!RPxvzoT}3NCMeK$7j#q3r_xV(@t@OPRyoKBzHJ#IepkDsm$EJRxL)A* zf{_GQYttu^OXr$jHQn}zs$Eh|s|Z!r?Yi+bS-bi+PE*lH zo|6ztu6$r_?|B~S#m>imI!kQP9`6X426uHRri!wGcK;J;`%sFM(D#*Le~W*t2uH`Q z(HEO9-c_`mhA@4QhbW+tgtt9Pzx=_*3Kh~TB$SKmU4yx-Ay&)n%PZPKg#rD4H{%Ke zdMY@rf5EAFfqtrf?Vmk&N(_d-<=bvfOdPrYwY*;5%j@O6@O#Qj7LJTk-x3LN+dEKy+X z>~U8j3Ql`exr1jR>+S4nEy+4c2f{-Q!3_9)yY758tLGg7k^=nt<6h$YE$ltA+13S<}uOg#XHe6 zZHKdNsAnMQ_RIuB;mdoZ%RWpandzLR-BnjN2j@lkBbBd+?i ze*!5mC}!Qj(Q!rTu`KrRRqp22c=hF6<^v&iCDB`n7mHl;vdclcer%;{;=kA(PwdGG zdX#BWoC!leBC4);^J^tPkPbIe<)~nYb6R3u{HvC!NOQa?DC^Q`|_@ zcz;rk`a!4rSLAS>_=b@g?Yab4%=J3Cc7pRv8?_rHMl_aK*HSPU%0pG2Fyhef_biA!aW|-(( z*RIdG&Lmk(=(nk28Q1k1Oa$8Oa-phG%Mc6dT3>JIylcMMIc{&FsBYBD^n@#~>C?HG z*1&FpYVvXOU@~r2(BUa+KZv;tZ15#RewooEM0LFb>guQN;Z0EBFMFMZ=-m$a3;gVD z)2EBD4+*=6ZF?+)P`z@DOT;azK0Q4p4>NfwDR#Pd;no|{q_qB!zk1O8QojE;>zhPu z1Q=1z^0MYHo1*``H3ex|bW-Zy==5J4fE2;g6sq6YcXMYK5i|S^9(OSw#v!3^!EB<% zZF~J~CleS`V-peStyf*I%1^R88D;+8{{qN6-t!@gTARDg^w2`uSzFZbPQ!)q^oC}m zPo8VOQxq2BaIN`pAVFGu8!{p3}(+iZ`f4ck2ygVpEZMQW38nLpj3NQx+&sAkb8`}P3- zc>N*k6AG?r}bfO6_vccTuKX+*- z7W4Q#2``P0jIHYs)F>uG#AM#I6W2)!Nu2nD5{CRV_PmkDS2ditmbd#pggqEgAo%5oC?|CP zGa0CV)wA*ko!xC7pZYkqo{10CN_e00FX5SjWkI3?@XG}}bze!(&+k2$C-C`6temSk z_YyYpB^wh3woo`B zrMSTd4T?(X-jh`FeO76C(3xsOm9s2BP_b%ospg^!#*2*o9N;tf4(X9$qc_d(()yz5 zDk@1}u_Xd+86vy5RBs?LQCuYKCGPS;E4uFOi@V%1JTK&|eRf~lp$AV#;*#O}iRI2=i3rFL8{ zA^ptDZ0l6k-mq=hUJ0x$Y@J>UNfz~I5l63H(`~*v;qX`Z{zwsQQD-!wp0D&hyB8&Z z7$R07gIKGJ^%AvQ{4KM0edM39iFRx=P^6`!<1(s0t|JbB2tXs_B_IH9#ajH0C=-n+ z`nz`fKMBKLlf?2AC+|83M+0rqR%uhNGD;uKA6jOjp7YDe^4%0fRB<^bcjlS2KF~F; zu09wh1x0&4pG&76M;x8$u`b134t=dEPBn6PV|X29<#T4F1mxGF*HOgiWU8tN@cguI z_F@o+XL7FJztR63wC|j4x_DANzcX94r7Iz-O2x$({&qd*mdLG=-Rv)uZ}UlMR+F&q zU}=lkfb0p1>1Ho){o$@}mSKIV;h*$AND7~Dl)QzpFBlSM99Kx+F7GsVK5xcR? z_4Q(Z%cgk8ST}U;;=!LwyZVu^S$>B-Waeik%wzcKTIqeX=0FP(TGQ=nxi=dsS5BYF zl@?}NT!Y!Iyos^@v7XWXA{_bV~1lxz7gC?xuXxy0_?GaN!AhRRM5>)^t%&ODd;@HN5L{MD3 zc>i2keQZVm#?NrDwbfd}_<*5^U&w0zv~n-y8=GGN-!=_`FU^cM8oVCWRFxw?BM^YD zi=Vxz4q|jwPTg+?q7_XI)-S@gQkh>w0ZUB}a{^ z_i;`Y(~fvpI!vmW*A^|P7(6+@C4UeL2WATf{P1?H5rk`5{TL zcf!CgP6Mi{MvjZS)rfo7JLDZK7M7ANd$3`{j9baD*7{#Zu-33fOYUzjvtKzR2)_T1I1s7fe&z|=)QkX;=`zX8!Byw-veM#yr;|wjO^II>!B*B z0+w%;0(=*G3V@88t!}~zx)&do(uF=073Yeh*fEhZb3Vn>t!m(9p~Y_FdV3IgR)9eT z)~e9xpI%2deTWyHlXA(7srrfc_`7ACm!R>SoIgkuF8 z!wkOhrixFy9y@)GdxAntd!!7@=L_tFD2T5OdSUO)I%yj02le`qeQ=yKq$g^h)NG;# za(0J@#VBi^5YI|QI=rq{KlxwGabZJ0dKmfWDROkcM}lUN$@DV`K7fU?8CP2H23QPi zG?YF*=Vn=kTK*#Y_{AQN&oLju|0#E=fx%YVh>S{puu&K$b;BN*jIo@VYhqPiJPzzM>#kxoy0vW9i;ne2_BIG0zyRFp<3M(iY(%*M_>q0ulV2K}Tg zkG{EWKS{i%4DUuHi%DVKy%e+Q!~Uf`>>F6NgD{{I8~nO4!VgOvtFOc7(O)X`|7n*f zxBa4CJ-v9fUUH+`7sPVvpM_C*udZ@OTGTzx56QM5y~OlrZc&w9=)B?nmd@keRn+^= zvm~4sa5987LFDnU{(N|N zJAR8H@}p1fC+H(yTI4n#%~TbImMpuqYn9cQ<0QQ%=PzZItLkC*ef9WJUvfITKWh#D zc#__8`4am9%#NslIUw+<82#SR8AYG|woLfBg#!-&dqq}@P>|I0%lbdy0lSMmNe+}o zj0zZuFr6Wb?Y{Qy-S=|r`bdrDmhnmvkRnkdn`YCleU>Q$=je}LGhh>_QAj6aa_0Oc z%Swsmui;IRx7bN*=AAS@5yW&Y2hy;3&|HAiA8}!HT6!Z!RVn~MZg`RmI6&%#tBZDx zfD+y@Z~NWlk*4l13vmt3AK2wP!fQlnBbECL>?p)F?T)<`w&QN>cP_V>r7UTcsTaaP zTOb$f!P@zf$6>890NVKbIkG8rE?9!Y97sMSZjfF?A zYR8lp`LMoz~O?iaZN;gcX;LC-%Ia*R%A&SLx!YIf29?P+=XAAojK8!^OU*@?R&DK!#G_lsn!#;S375uZ&B0HH1|BO0R90$U>qs zSvHv>H~mAgNCcjo-e+;RjY6B9NCbQrZ|BHjTkehaU<9CSkdd>Vl*ifA2LNOP&R2Qdy3k3-TQ+ zbq=#vI43x`s=%~cGyN&y4Y!FxhwgDe@i6uv8^BLL&3z*SO=D0aLjih?gY4-9uWp5or)H+v~w6n5X#F-I52z=Z_p4JB(;M| zeaVFhuR2|3UD2MzVc~^nSoD2(dD#uL_1PdnIxeA{V5n`#3xf1Zx@4lw(DsQ&H$h zw#%3O<1173hjg2_nhKi!d1ej=h7y`hVjCNB6|HTnx>SWuCE-kgTnfT+YGX4_Lun({ zDv2`>d3vrS)tTf7ps_vvh!Cx^e1BFuWnEAh0(7fkNk|-3oU|iRWdsC6U)?Raft~HN z;^$U}vZK5O8|LV$>6X5T(uYkblv{zwPxnQBh(BQ5tA~J!vGiAMYP^_ki~pkIxDfOZ zUJDwq%O~WueeV6%uN<54&u*c&E4y431cklBNrb06zGOOy4XNT~JS-q(s6@)F@ovbe ze`fial(O4(-su%6@@1+V0MsdLLMyE8;)nou(7}czU(5ASaZYDT(kUZ0L(&g$nF^n9 z9-Pi`ZZLX&)^*M6As4_2Mmc9S7OT)F8KkL2NJ)KJcnCuWU=Wy402A&45#Q9Id~BBH z0cY*xlv!uXzKrXLH!xQu(OtJvEj|0-DmRj1vjFz{c*I4$Pe(+_V|^b~S!0xm{8lq= zZv)@NlcyL3Xdz+*|L137F7y6L-2VsrKw=q^S>F6i%<{Fr8zk06$Ay-(!L$fY@7mcng!2}L0t zgi|KxfB63Xtk_Q8#ZPipQ@!zgjdpEIbK_?q17Hoi4Eiyun$hrc>T(7pOLVLQE=lgGwA+A308p& z7@=09(|$>eLy5gLe{*|3b(M;1n;C^~v?o88jYib48eR4$QGsBFzd}3QuwO^_XE(=B zq+hMi0UFC|dB{LCwch7;zYT=NK})O%sgi0k#yV;My@24^B1+CuZmYOh0^b)5Ba_)) zC%i#_Iev&nsu%I|1N5=MVc#PrlunKAs&hY|3s5;@}`>sB>}gzxuB zB=2vrRyB3uiyW(hkDUNe1@&(b`;>ZvGgw|@s{zVC#_`HXIN_^J@Etb zA7A+F?ot37T{<-vTy8h&b3e+WKHE1oh;pUQrN4yRRrx?mT_9jRa2i4l1fUnLW^Cbl z!I1>VzyFe?VELWWhM?@?t-YPZkD-Qjo@bC2(o#ZtZmr{KZsdFWItV`rs$gp{724@C zL8K5}E0+DHcWcL^{BGei4>@J-3%a#$y6;I}=upc};-NDv-z#kPX26ylOpH)Ov1uU{ zkLj6oiH6l_s+B~_z;|Jc2oi?naS7#3H63~~lWj4rUnd=fCnKdkik<@R&kch9q##G{ z4u!%=rlM~Yp3jk*t8}1B`Sv6<%Z^}~1e@aq zg|JQ`QO2pSjAm-g*?IrNc$^~sIrNBo2$m|Sxanr?Mfs>2@Auu49 zGXlsS<9XS1&8h(dD*Hl&5HBDG!^pJ*lkau_Ur+7`7z;rcs$hT4we?3bT=7Fe<>{5( z2m2(c+hUz2BTHM8dCe*Z3XX&Av;b~a=$6EF>&^E8%nyxO@m_n!q&XD^A{SRjRZQ0L~qDeC=j&0$j6=LNIz@`ni^>ch|sv}^6 zlm>?28yPl@WmDPR?Y-A9X{U9Dv_IsbXJnzKCjkRksLOg#42uG2mE_acbTQ4)J|1V>%U@K(FP3AYhL0U zdeOCPN1qLv!|#c=p!_+%VNV(GHt`RuLRV^vz<5tt-r)yOK**kUWPspVAf|}ZL{LS= z@k(@@!P&W!>wwe`x{+GrFSWhHov7hu?{KuuT%kl#WO@*WX$i_@retlhQBj++SVNCx z5$78LxP>Z=^aJ)D280r_jj=zFfMJFXCIe^B{~V@d1rl_F(qo&AB4bC-vYL>x2jSKX zpuTG-6kgp3e^T&+dtV*i6a~)v@n?n*MffN59y}<0djUX zt27R+SE#hp8bzc#;rk$jw3r4)Q@eI$*`_)=Pvge8@8|8>H3X)<9YX6cXa=ii#Le;(qKm@%0-7$>2ShnYc`j#zJ7gu_FE^?uAkL|H)UIH#gPu^40!6^J=^ zr`}iwa^!4tzW~vOMZAaKF>*8A{^8m$i(VK)>?=#l`xrVe>wseSvM_aF zATNkY>kM_P3?1kE`uIq#mvr-wuTgUH0N<&JhF=(E9%^NS*HLm!4GZ4_XI zL=R5tlG5Mk_1rPfg)sk^llFuKPMPBhuU|L5q#yP_mzxp1o&pAzi-X31sgFpIHn@($ z_>=`AB5(8tP6p2zS5VEvH5J$M` z_much3>S7t3Yo`Yx!>83-hW9LYzDKP?mKdkD#QAK8*M((sx{eBQdrR<^3ZhFP81+& zBnJMUefQyNBji~$5d88Wfw1Lv59aJN9t2!pABLg;ewJ#LXL-10;QcJl+Y4Mtngb)k6JZlCf)3uD_u)J3sYyN;NN5hNbg$%W!i-GK%e&!Us)2IExWSss$YG(hm3kJ-h%yD z>8q^n$+4I(_y_mbT{du4P%h1j3oSpjhY97{+IZ`aA4ug!vNJ6*p?<2H(2w+GD3j$I z1TUXGyNzdf>_yB3grP~FZUs<2Quw;eEi*7s(-MiIkQ%@J^+WGdQvYSUN+TRiD-xto zJ=OUU+kxGYc!HCLNbCvR4lGTp~#L;DFzGd-#gJe*xf(P3hDQz|y)?b9mwU3WUVnpcqXM<@w%r-k*Wr^gzAv)8T^sqA=Ye z!7qy&exJmAcAt~CwS#@yNmjr8*T*!A6w4~E*ibaLRs0CFo(;R3=ODhDt6zWNodmo0 zXx&bT$6&+5c>a|WJ)F4G-^GjY0H#*tY=UNyYr_q5fsrcjk(c^~e*7Lf`!Jd`)p412 zn|^*hV= zFI4UbwA%X@smDd$cQOiMC%jfitTxTb+#`9`G=2rJDfK!E=5ra|So>lc{X1$~w28i+ z4p&cTGwZ#5VueiXS9O8#;RR$yg7tL9!^)Sz&pZYIzlSh}0}V{LxL$Cu%B4U5_}k}- zm~|CsD<076x@<>m=6w6N?WaThIBP`!u{-;WF)xc=2otx*lwf|5+MkdJePjh(B z9SH+%cHGCMAXNxB{_3^otDWdsV7Ob6n{0 z+&!(;iaHOX__5z_$Qk{%xYV%Ig@7iokGBwR`3642ZP#H#v9QGbWl8<|MS*=@qO@Uj z6+SZ_v9`1paUe5tFN~v(b#J3a_Lx0+;r9giZIx-A5TxdbG>xi#AZ5_z1V}B^n)sxT zz49}eK7EWb6wR!6-qQOrHQHkUvshvq%=G2d&@(#XM*Am1;WbnJ{X_!a{ZkphD$^TQ z=Iskb&}=lBm(RHiwJoGg`*NiQ6#RB$T#LF+>#ef;Jne&MxKPX!#r`&TVEFsp2jnNx>dClzpcPy&G&13a_<0qaR3i+k212~hoQ z8nMk{JP-t04I{GW5gUBqcJW-jSMrlw}>p)ptx?WKuCUV77taMiV zHok9V=6yv+Uts@fMY&A}amC=!Yj}eL@=e%XJ#%?agkt1jWF+10{(E9mHLDa>Ll7Vj zG=3cp%ljIB-6pC}6&`xJ*6WCP|IlglLWJ^?yviI8Ve)?V_i4%n;olzny62_`-|IGi z^=}p_O>Z8M;c4|RExu70E7ePW(HWVS&E$+LL6xSQgB`QfMQJ|4pCTFowA39p5P-|$ zUtM_H2HnP8_RoS~Vwk(FhbG zH41licj%=0a;Ln2STFBvU}Ne&O&%8bYKj!h1FA#sNM`232fX|U3QPp#3C?mN2;hE9 z;)!@5ixSPl<89^7gwhHc2YAX1KJK$#*3`KOMIQ253q7-*RJ5k)zp9GBO|Ga~X*^}US5oN@aG&waHV%vi~r{t^`ptTxb zL}q1W8S7*>7oWwvgV4uFLZ(@k`R*=LO_|Gu`prs~!WQXj-NLIa^2(7IHg>BG^N zc|i{-^=&Cek9dkJFQys|sjG9i>LLz|;yCv{^1i%c*h>8zF91kLvS9HBQi~ZU!JL`B zK8N+U0fr1*6??Ium)AF!6tc1eGhXIYL6IRT7rmKp7+>?%5Pa6zC5)KY$ycF0ZJ`G5nEQDG100U-jLkH8^UE4g6wq?sg%pP=-$&G#bcN`^?w3a6 z((s$6eRKcSEIslW-kk5Qi|5Mg-(xdLF}PxxVh$PuO}#aR6pW1kV4Af!Bqh*btXNNZ z>-4(IUl+L4dw+3LcpGut=qB45O+W)Q5?*zZ2A6rJcg`qkSvWA!j^r2mqKuCm6`Py? z@^T#Ux04HemPGd!Hs7NkZdVn1}8_j`o?)*OKZGS!`ff)gF zG?v-lj$wWNWCcw2Mg2o18D~1?3_b0XzdiKBNkYSDpcv@&kp0POmweJE2ZkIQ3B!a! zIgIoE+Xv?;34kyo^QYjZk+tEqZvq^#QG(OzX4~X+KtsoQoddTWUR(yo8R+ObEF1j<-syWOb>)JQ&Zbdu(sctU%Mt zW&YR0{ttY2TTXYZ?~WNU&cES1Z2q(7SrWDh``!J(JM+Nk$!hu&Y;(7E`ZNKTe0w+% zJc?Qnw2B+%UR}0;cB0Rufa(7-3FF}?629@LgTiEC&2uyL6NxexOp?AKT^aAx3gi(W zao>r>MPw0eQ3>IV02uLsC@>yK_epX6GRg4{NEL2wPPF9=*L2RV3yyK8DhuEK>rmmV z`&Q~#c`lgR&93TdOCja|ewOXmPNRh7!&dMT(1ett#iDr8HZW~VqWW@7fe9B6;7S+? zbC`d4@MEau&mKlOPKd>*10q0c{~^baw6!a*w^sY#0Xim{oOsiXiDOhbG&kl3c$$n1 zMRrD83&QucDSEcV*7LIp8VTA@F<%qe+_c`L;6on(>SjAU^}5c9!BCffT>$VQhe=)z z8(=Ej{5>jhmjB3{xDfj2R@VmHQ!CqjlO4KnuOmvHy3K#po$yp_V;p_MKjh1`(rzj6 zHW956k1yvntz{_g?Xbs`avK(IjlTnsu%htO;D7 z?J#x^EzuvVn&NA=!MEj7cwe5A-Z$Zk2LBZH$~%E* zf`((xH0?`}hs|HA%mtwfOEsZJxxrennkTYcwP#FKO5%Lpc^JXhSpV|ZH$Wr;`}`_( zIP==gd3LYyVtwD|*ZJGi{7~x8{=^bGVqu0RJ`n_BZH9+}kz%-4ZRsImi@rx%=ZEKs zcPnUXo6hbJV>fH;@1|bAHIe0ijYI*&kdT|HkDS$9No9 zCHo=*HWb~U+Dtzxr+Esao}6@|;Pf+E$ay0$kQp#s{wlw+7aIKbMdf`OqhoG*;Tco0 zjrP}VQG#Y2cJuqoJg&5({)S(BA}q9T1lGeWRyu=Je|)I!6a+aj!IP^1({)ZYe&x6w zt3a)Dq^TB+A7CdB0-}#z2Ur$W&h3YVw8==!xONy$uQmDWh-@15iEOt!q2m&?ZLA|w z8loSb(0}7y6Xu0?M5Uf4>VZGluB`wMf2oh;m)ghxVda>3m}4%V)r^0nVQ5V6f3>*) z0&VN!N0~GC^P}vj$`EDMZEmVV;N&RISY2C;$0;2(<{Lt&PKzqRByQdiEHGAbwtbS zPj`Da5%U6k1oEtVzI}QNw;!hT6F+~|@=c@$C4NtO@=xgP?|5MyZAyuCzcvq4rdAv@C06%gZ`9%I);R6UGiGJobfux+<0DLS&|MSG4UH z_~o{^^9>ixMg~mY!-@Fai{xaE4^;qy9iZN15Gbn5ZqHWf>Jc5Rv6(#n8`1NcCsdmG zab*dSXVPaE?)wCalD;$ivF%@nB#7D`@YG04p6ed9m}4iJW|pfVMLE<-c{=-8$e?cH zUdU#mCj4gb zZKA^b9p*9S(}8@tw~1RNPHr7tQr;P+-)D8|sq=*o)G%RGqt> zzP5yf`pVxb)I51D_G~Xp^GNK zVI6sAX)a9s)e{8N3?35YA6aQTXuyszK3ah~CemzA&CII#8F&F#KN41~8I^&_%}6MCNb{W87qAF`zj_Y^szhb> z3p3}KbOxotY|(lD=;)`fYE_*{S}x;f^SW#)SU&5X#o|-R|trpa|L5PS5aa0 zTHw8%SDSVtU4?vyrhnq+^@dgFS)|(y{~(4j%3UEiO-rBM9%`)8(dh33pMLiuurNY# z#10AsQ7%*0Cu_DSAU}P;X(JwA64~Q_^R%d_zSm^6Aux?Pn70PM>9EvLeOX z&w9c)pGmcL22;MO3C_B>=NC0RJpMp8?#ZUf=GWRvy z6RHq3B}=MGVg?9@iKFBpsvnkVh3{Vpp=`CcD=u~@ql{my|6?3ssi3mCOPnjI&E}VC zc@X+Yl>;;DNo0W0`0th!X{?luDhOC{E8N=?!w}K1{V=)+1={m(f`Oc|N=07>}3;z{-(A zm{JL=j?Sro5iecmE2-pWlRf(r%|HEQ7kgwQ9+kt=NBhtQI7OwcZ#3%$Uf%^r2nhjY zoQ08MfC%_X{O9~WcirMZMhn#z^ux4Erx-tf-6bHD)9eH&^L>^jvAd^9A^DCDs?0;k zkm7LE*KjP6`2d17MrQaaLqd_Rka}J$csvUec#hw78<=s(hyR>065~YCVCA9+#Q+; za(*L0IEw!r5P|@-;x33L$Lv9 zcuN8YG&g{<(SeJG18~(b!5yywSqQiLAX0;---;}mF5&b4lg|T?LwKREa{9YX_-zL@ZE?Zqi@HxK^2KO1>0LATu{te=T zprmHtY)bDVfxI1S}KBE7V zznP7KQ8HekWU#W6mw`dr-boV}pMQR==&5=Q5T=_q091jfc;R*jX#&=MQ%~@E@9^?`$v48ks<>(fI(F6L(5ppKy|$HWng*bKOb(4|cMUB&z$#ob#XV z5-mg)gmFIybZf=znm3ZPyUO^GJfxt0kmHjaTZ|sthsxXw&}Y)fOUSg=JhRSR^UjZ- zhqqb}Wsyw4zdnj6@#BAJa#-PdI4_dgafFXh85DsEQ_cT+5)XpZq$fZlBA_9UsE9r6 zEFec5?uqN@QhJ^IzwZrwl-5J`CmVPv{(YDTqEqWR^dI;5hXc~cxP%B3v&~s0`Ct89 z@S`i~a^c%V^N81dDT*ItFS*&IN;@O$EgzX0e7x&}TD=!zS}hTpezBLS>mdX(5< z)8DEI(-o_D)c-UX@dA1MuJ*yc>Hf4|`*B2S_O>w*-tbUwtiu`;W(Ud{HTty@(&x(T(F&;M zJ=?H>6`B7nf-90e8V`WSVp|0oEKB-P2M{}4ZDawzvM&a!y>`Y#jCsD%T_l``@ah(I2nJs~Q|%uSKu@k!m~*8B*IoA{*TgtF<(5sHCGG;n@NE%~Xt(G$^&<87u;}Na zx-8cq0g`uA(&RBFo=-4Y1GUZ<``Zw{xL4jfHkZw~%~wvtGueszcXt)_QwH8g!; z%s&3kSa~R$dO$-%L-)c@_hi7&>{6L_M>OZFkUQu;{sL_bUMStNrt{{&O(Wn~*zPOk zB>dnfszb29NSTf2pqIs68k|p-UrSrxgLHqi?3N-UFa!LHy9n1)=s>`yS+J{MEzS@ zNlfGtpma7kG&LR3JE@wB%rFA*h~~KitlO=IP)ZjN6dQLM6qsry zHkB#cyNh#n`)}bCrN1My*;k)^@>e4gJ`LJK?2)Pwp?4Tl4)4FA0(tvY+#1jOUM)xw zlMz4x-f@g^+yKUN`?Vu)|AwujArnM~Pa@y*Q9S8eS(u{-S%(Z5=R~pRl5ZGDjdqH% zC8rW&{##wOpU_oTIG4WXMk4&%2t1;lWcW5&!yxmOT*!hBcKyTqEcNoO+R2;Q?Yj+W z1-Y4?59fijz4(MIDwGe4-baYf08UCs;r|YefD-Md2ST;=cxwpgW=tR76-dQVAhn^= zG9Wk5lQk%jIR@KNU!UMp6@BfU;r+;y4VQ)D2!Il9HX%yW-9nOzV+m$YKzVaO`B8S7t z$!S2Mz`xw>V(RjE`0>bQp<0y&h~Y=M#jpy!#=dE>`=e_AjSZq6u!Dy1xJf~-7|0F! zPR9|n`e_7D2DIV2H(CESQ}hA>U>n|6`%z?YKEA~)BOVY%y=jPV zT=44R!L?J)736X#csn|lfBJ)o8ixaZclguWgrGO<`TN2FMfO}7;5}d+BlK0yTSH3* z4!=;5rOh85&2|x=46hkNaz?)U8&=bcfh=N_#8BNpZ2v$aVBo;sk^*X`v;4-LU;D>! zM*h12MxXIQy)SfAqE4;jY)wgnppazZkdNNVVF;(PLf^qK$FgY9+VFyBKE7UC|f z`R|?&egV11K3s$rJ6!GvoeW=jV*!-e(wA;x(2=d0E_e_%0x--0o8#~m^H1%AH5Z^B zn!TNPn927*bvaf0pt}zhK0o^V@WlGwwKo(*nQ|Q~4_;>~-8y20`HP>@UJa)3nEnGG z5Hwhs|FcmFG16ZVNb5hL`2Gc1{zWIMM{_OiKewV!hCi}U!VuE?s9wU-QbZ!)+Y^tS zGzp5OSi5iq6hmEr$w}&9DFgoB+i*`q`8TBi^MVS{SKEb8Aw%@K7@XCo(De2A`6%mf&a2#~y1N)+kJLD$1HCP!22)(U}xo2|j?WRzt(11j8Z_*v;P$R+Ug*Gy3VxV4K; zGGUGabnW*`Z}~`ydXL-l9e=GC$pY#z|63vy>E*m=$=j}iWP{sRTh0%H54`t>2xYH% zsk+M&u&pNgMCM@3e)Xc?jBWX-TIR_cQ1Z!RW7!B zBjZX=+^3}?SE)B+$EP+0oi1Fp5blDT?*}nsP>filqXH{ms zxU<$hetC`u)Wi+x|EKL-`y^#aQX+sDYIa{M;V%LqLrOk~lR>u0Q!+pyQSU4zY`?E^ z|5@)C)w6G_=i5YYC5SE_u(7hDNYr}uKT|@DSqF%S++lTIbIk^$a>{~0IH8KNFEy%+ zW#$&!ynpgNJh>6uR~?2c)ZMW+h0OKu231(7L_vETPaR+(P)Zy%0~yGm>E9?@@x!Jy z3PYgS}Q@b}x}E#F27@F+j}0=&Ql4gES&f8acMrPAVlVs9$97`FR))R5wI zc&}KFI1UIewh>3PkhnB7u zS3AT8_*|nexznG|Z*DU0c!K@jsI4J)5#DyNi#|e#`l1Vv1`1)*NVcy0LZ``aL0n8B zecupJ(rhq3u8bW0NIRhKYq$v1li+jp*4hfAd&wxYDE8vn1TQ7S@bTM|I2Ob z8vMOIxA7&_j{AKmD+O@EyXT`|dElt0pED^@IV0m)RPBUs*5jW60>>w1!@_G3aBKzG z_f(KfAPBk}-jQtR*Sroq!*3rbQ_m27e+YdzQjUb<_*k8vc_C)y!@cj5E>NxUhPu&g z@Z2<~esU`)ih+4opWe+K7sbN9n*9@n>#@n3*o z?xoROgDuvhq>jJ;Ve{6i<3roQNfgo5^4Q4(|GNExO2Dr7GjgA2zWuKp_K)K0R(6lv z!l$!zW-+T6mb3gQaAFviTQi{|*t%>{(mhTdy+y;Re4qT@kccy#{b z&zWy~kLO@>*WPj2k#H)|7L&gAJ37DmHQAme#@m;(Y8Nu^`D5vf8sZFW#+lA2!HK=( zJ)#hO6JD*`o~&c*&46d}g=Qj@SsoB5ikC z^1V8E+&<-OzuS_C`p5<<(A6fB`LXT(!kV^0_~hL6PpW4={l%|#xgdh?5EIk~lu8{D z2hiyhv3Yxij_#$Wu>P@7SYsl`-~3;}Ktx{34_NL^Kwin&=?!HDv3elQDbcU*qyYpN z(#yw~f1vFGK-t%CC-qa-4FYHbA^h>bag-I&*qaxwn?Qv|idE$<>1H|Gr6JtUu(he2$eg!N z@HTF@dG1)*y;4fxe)4_ZkpaBHH9hXp9p4|gLrRQyuevRd@gSS}JhRnWqrvm|U@>qM z=yl7RQROTKwQtzP3!zUF)_6Ld#NGA6v~2{J9Dd`h6{%+XsU#qGLh%`fB1Hc?wfayK zN`H4BpDp)npVQuu$DVW1qsBS&AJ2eP%6Qw>;k{)Z$8%HL=Q4(a$Ng2_vHw&vA!1L+9zc8vaX2GtqJ{L-;gvF0IR$em zMQ8@{Qp3+3Quk)TJ$?I<8KmwzD*7#(q<@Mc`dchngW}cRG14(Z6K7{T|LhFXwhqUQ;BET;cYqPcAcMgt6M$V9$(?jHo@Sud$an$U&5F zZ1QNh^ztt)E*d#Ij;<43oSKKnd+WNr$_r}+s_O_x6DZSB10*5Q{ourqq>mTl| zx4y^(cy+9;t@R=*j>3_dmm_m)$k$#937V(sllby&5)Xex^UD-|m|q<(jEd#@DV(of zAd7sSdmS*zUDqJ9|K%O2J2OfdUiK{{b{PCy)pi<;hp~7v1CQj&4-10 zgO<3dqhYH1#-Fa}Q{pjql5>>P6gZH21zLfxZ4$SK4T@7b!|`nWF9b*84Bq8&Eht;9 z*P72x&NUCZ7*@B$`FtE=hz5b}S`|c6Ey+j@D1ZibjJaRlR;{cxAWv z?Nqa>QqV*H-*zzaPvpLMHt~nl(x6?vrPpR?zn7~wow?oj*1TKmx4j71>$hvtC$DLD zUrz0^tiP0792U&dxJxNv@r}Elsjn^aSLUu=9#mD{&9n8|ayIL$!H3s>%KEvbchBFW z%cd?VU83mGF#Dar9*s~w&AnmQRQIOvR+uWsuZ?+|a=TzApXO@q^(r%8=}iv#wCnFq z=K9}JbqU@k99Q%j-}NNk+qLCP)jXfmOO|)@?mHcnynd6({mJisP1_}u7k)|eYHXWK z63eQ)E$ufFi!3CWUY2gw%e>omCv}qEX66aH-k&35f9`Q@Us|NPetVqe8=dX*VxJdn ze`q7b=Dn(UA(2sf&g)cOmQFhNJ#<-aMELJZbA#@to>25@kbW<)&!X01 z%NMJt>1ST)tyX)h@?`DxhbgCHr>S4wv}WC&Nw-!{+Z7$2D}74QAcXTvip=M0%Tp_N zor=k`)t|ra^ySr-+(|R9mB(E=`MX#y(wSw)$!iymzB;^c*>%&^*7HxTnRga=soSZT zdDl+9s;r!v8hk6POtzBaig4pRp7eWF(<8gufvNHPu6xs-=e{;mnHzJyGKE+8L0j}; z@%8-e^UCL5HhMiR>sD3Rve&yVZ#{Q1*CO8c+qSr^Z#CN;)(X5>tGG5yUw3<+CfhaL z%bP;hZ?jvgJU67BWyiy74_)6r)_nSxttxn0`0?HE^5(uydHVgP+HE$V?Lv)Leti43 zWA|;f-RqX``95>)^P-fw!Vi{3KNsII-*5f){gdxqd%gVdB1sOBNe=nEW%;i~g_P8J w!5uhoe-Jcg1nPN%MiEAtgE$;km@@t6ukO)1^!cY^83Pb_y85}Sb4q9e0FIsP9{>OV literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/pkgs/flutter_http_example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000000000000000000000000000000000000..2f1632cfddf3d9dade342351e627a0a75609fb46 GIT binary patch literal 2218 zcmV;b2vzrqP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91K%fHv1ONa40RR91KmY&$07g+lumAuE6iGxuRCodHTWf3-RTMruyW6Fu zQYeUM04eX6D5c0FCjKKPrco1(K`<0SL=crI{PC3-^hZU0kQie$gh-5!7z6SH6Q0J% zqot*`H1q{R5fHFYS}dje@;kG=v$L0(yY0?wY2%*c?A&{2?!D*x?m71{of2gv!$5|C z3>qG_BW}7K_yUcT3A5C6QD<+{aq?x;MAUyAiJn#Jv8_zZtQ{P zTRzbL3U9!qVuZzS$xKU10KiW~Bgdcv1-!uAhQxf3a7q+dU6lj?yoO4Lq4TUN4}h{N z*fIM=SS8|C2$(T>w$`t@3Tka!(r!7W`x z-isCVgQD^mG-MJ;XtJuK3V{Vy72GQ83KRWsHU?e*wrhKk=ApIYeDqLi;JI1e zuvv}5^Dc=k7F7?nm3nIw$NVmU-+R>> zyqOR$-2SDpJ}Pt;^RkJytDVXNTsu|mI1`~G7yw`EJR?VkGfNdqK9^^8P`JdtTV&tX4CNcV4 z&N06nZa??Fw1AgQOUSE2AmPE@WO(Fvo`%m`cDgiv(fAeRA%3AGXUbsGw{7Q`cY;1BI#ac3iN$$Hw z0LT0;xc%=q)me?Y*$xI@GRAw?+}>=9D+KTk??-HJ4=A>`V&vKFS75@MKdSF1JTq{S zc1!^8?YA|t+uKigaq!sT;Z!&0F2=k7F0PIU;F$leJLaw2UI6FL^w}OG&!;+b%ya1c z1n+6-inU<0VM-Y_s5iTElq)ThyF?StVcebpGI znw#+zLx2@ah{$_2jn+@}(zJZ{+}_N9BM;z)0yr|gF-4=Iyu@hI*Lk=-A8f#bAzc9f z`Kd6K--x@t04swJVC3JK1cHY-Hq+=|PN-VO;?^_C#;coU6TDP7Bt`;{JTG;!+jj(` zw5cLQ-(Cz-Tlb`A^w7|R56Ce;Wmr0)$KWOUZ6ai0PhzPeHwdl0H(etP zUV`va_i0s-4#DkNM8lUlqI7>YQLf)(lz9Q3Uw`)nc(z3{m5ZE77Ul$V%m)E}3&8L0 z-XaU|eB~Is08eORPk;=<>!1w)Kf}FOVS2l&9~A+@R#koFJ$Czd%Y(ENTV&A~U(IPI z;UY+gf+&6ioZ=roly<0Yst8ck>(M=S?B-ys3mLdM&)ex!hbt+ol|T6CTS+Sc0jv(& z7ijdvFwBq;0a{%3GGwkDKTeG`b+lyj0jjS1OMkYnepCdoosNY`*zmBIo*981BU%%U z@~$z0V`OVtIbEx5pa|Tct|Lg#ZQf5OYMUMRD>Wdxm5SAqV2}3!ceE-M2 z@O~lQ0OiKQp}o9I;?uxCgYVV?FH|?Riri*U$Zi_`V2eiA>l zdSm6;SEm6#T+SpcE8Ro_f2AwxzI z44hfe^WE3!h@W3RDyA_H440cpmYkv*)6m1XazTqw%=E5Xv7^@^^T7Q2wxr+Z2kVYr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/flutter_http_example/macos/Runner/Configs/AppInfo.xcconfig b/pkgs/flutter_http_example/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000000..fa03c5ae28 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = flutter_http_example + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpExample + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. diff --git a/pkgs/flutter_http_example/macos/Runner/Configs/Debug.xcconfig b/pkgs/flutter_http_example/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000000..36b0fd9464 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/pkgs/flutter_http_example/macos/Runner/Configs/Release.xcconfig b/pkgs/flutter_http_example/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000000..dff4f49561 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/pkgs/flutter_http_example/macos/Runner/Configs/Warnings.xcconfig b/pkgs/flutter_http_example/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000000..42bcbf4780 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/pkgs/flutter_http_example/macos/Runner/DebugProfile.entitlements b/pkgs/flutter_http_example/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000000..08c3ab17cc --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,14 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + com.apple.security.network.client + + + diff --git a/pkgs/flutter_http_example/macos/Runner/Info.plist b/pkgs/flutter_http_example/macos/Runner/Info.plist new file mode 100644 index 0000000000..4789daa6a4 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/pkgs/flutter_http_example/macos/Runner/MainFlutterWindow.swift b/pkgs/flutter_http_example/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000000..3cc05eb234 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/pkgs/flutter_http_example/macos/Runner/Release.entitlements b/pkgs/flutter_http_example/macos/Runner/Release.entitlements new file mode 100644 index 0000000000..ee95ab7e58 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Runner/Release.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.network.client + + + diff --git a/pkgs/flutter_http_example/macos/RunnerTests/RunnerTests.swift b/pkgs/flutter_http_example/macos/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000000..5418c9f539 --- /dev/null +++ b/pkgs/flutter_http_example/macos/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import FlutterMacOS +import Cocoa +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/pkgs/flutter_http_example/mono_pkg.yaml b/pkgs/flutter_http_example/mono_pkg.yaml new file mode 100644 index 0000000000..8d8070e17c --- /dev/null +++ b/pkgs/flutter_http_example/mono_pkg.yaml @@ -0,0 +1,14 @@ +sdk: + - stable + +stages: + - analyze_and_format: + - analyze: --fatal-infos + - format: + - unit_test: + - test: + os: + - macos + - windows + - test: --platform chrome + - command: flutter test diff --git a/pkgs/flutter_http_example/pubspec.yaml b/pkgs/flutter_http_example/pubspec.yaml new file mode 100644 index 0000000000..6f3d1ba729 --- /dev/null +++ b/pkgs/flutter_http_example/pubspec.yaml @@ -0,0 +1,32 @@ +name: flutter_http_example +description: Demonstrates how to use package:http in a Flutter app. + +publish_to: 'none' + +version: 1.0.0 + +environment: + sdk: ^3.0.0 + flutter: '>=3.10.0' + +dependencies: + cached_network_image: ^3.2.3 + cronet_http: ^0.4.1 + cupertino_http: ^1.1.0 + cupertino_icons: ^1.0.2 + fetch_client: ^1.0.2 + flutter: + sdk: flutter + http: ^0.13.5 + provider: ^6.0.5 + +dev_dependencies: + dart_flutter_team_lints: ^1.0.0 + flutter_test: + sdk: flutter + integration_test: + sdk: flutter + test: ^1.21.1 + +flutter: + uses-material-design: true diff --git a/pkgs/flutter_http_example/test/widget_test.dart b/pkgs/flutter_http_example/test/widget_test.dart new file mode 100644 index 0000000000..9e0af25b97 --- /dev/null +++ b/pkgs/flutter_http_example/test/widget_test.dart @@ -0,0 +1,64 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. 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:flutter/material.dart'; +import 'package:flutter_http_example/main.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:http/http.dart'; +import 'package:http/testing.dart'; +import 'package:provider/provider.dart'; + +const _singleBookResponse = ''' +{ + "items": [ + { + "volumeInfo": { + "title": "Flutter Cookbook", + "description": "Write, test, and publish your web, desktop...", + "imageLinks": { + "smallThumbnail": "http://books.google.com/books/content?id=gcnAEAAAQBAJ&printsec=frontcover&img=1&zoom=5&edge=curl&source=gbs_api" + } + } + } + ] +} +'''; + +void main() { + Widget app(Client client) => Provider( + create: (_) => client, + child: const BookSearchApp(), + dispose: (_, client) => client.close()); + + testWidgets('test initial load', (WidgetTester tester) async { + final mockClient = MockClient( + (request) async => throw StateError('unexpected HTTP request')); + + await tester.pumpWidget(app(mockClient)); + + expect(find.text('Please enter a query'), findsOneWidget); + }); + + testWidgets('test search with one result', (WidgetTester tester) async { + final mockClient = MockClient((request) async { + if (request.url.path != '/books/v1/volumes' && + request.url.queryParameters['q'] != 'Flutter') { + return Response('', 404); + } + return Response(_singleBookResponse, 200); + }); + + await tester.pumpWidget(app(mockClient)); + await tester.enterText(find.byType(TextField), 'Flutter'); + await tester.pump(); + + // The book title. + expect(find.text('Flutter Cookbook'), findsOneWidget); + // The book description. + expect( + find.text('Write, test, and publish your web, desktop...', + skipOffstage: false), + findsOneWidget); + }); +} diff --git a/pkgs/flutter_http_example/web/favicon.png b/pkgs/flutter_http_example/web/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..8aaa46ac1ae21512746f852a42ba87e4165dfdd1 GIT binary patch literal 917 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|I14-?iy0X7 zltGxWVyS%@P(fs7NJL45ua8x7ey(0(N`6wRUPW#JP&EUCO@$SZnVVXYs8ErclUHn2 zVXFjIVFhG^g!Ppaz)DK8ZIvQ?0~DO|i&7O#^-S~(l1AfjnEK zjFOT9D}DX)@^Za$W4-*MbbUihOG|wNBYh(yU7!lx;>x^|#0uTKVr7USFmqf|i<65o z3raHc^AtelCMM;Vme?vOfh>Xph&xL%(-1c06+^uR^q@XSM&D4+Kp$>4P^%3{)XKjo zGZknv$b36P8?Z_gF{nK@`XI}Z90TzwSQO}0J1!f2c(B=V`5aP@1P1a|PZ!4!3&Gl8 zTYqUsf!gYFyJnXpu0!n&N*SYAX-%d(5gVjrHJWqXQshj@!Zm{!01WsQrH~9=kTxW#6SvuapgMqt>$=j#%eyGrQzr zP{L-3gsMA^$I1&gsBAEL+vxi1*Igl=8#8`5?A-T5=z-sk46WA1IUT)AIZHx1rdUrf zVJrJn<74DDw`j)Ki#gt}mIT-Q`XRa2-jQXQoI%w`nb|XblvzK${ZzlV)m-XcwC(od z71_OEC5Bt9GEXosOXaPTYOia#R4ID2TiU~`zVMl08TV_C%DnU4^+HE>9(CE4D6?Fz oujB08i7adh9xk7*FX66dWH6F5TM;?E2b5PlUHx3vIVCg!0Dx9vYXATM literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/web/icons/Icon-192.png b/pkgs/flutter_http_example/web/icons/Icon-192.png new file mode 100644 index 0000000000000000000000000000000000000000..b749bfef07473333cf1dd31e9eed89862a5d52aa GIT binary patch literal 5292 zcmZ`-2T+sGz6~)*FVZ`aW+(v>MIm&M-g^@e2u-B-DoB?qO+b1Tq<5uCCv>ESfRum& zp%X;f!~1{tzL__3=gjVJ=j=J>+nMj%ncXj1Q(b|Ckbw{Y0FWpt%4y%$uD=Z*c-x~o zE;IoE;xa#7Ll5nj-e4CuXB&G*IM~D21rCP$*xLXAK8rIMCSHuSu%bL&S3)8YI~vyp@KBu9Ph7R_pvKQ@xv>NQ`dZp(u{Z8K3yOB zn7-AR+d2JkW)KiGx0hosml;+eCXp6+w%@STjFY*CJ?udJ64&{BCbuebcuH;}(($@@ znNlgBA@ZXB)mcl9nbX#F!f_5Z=W>0kh|UVWnf!At4V*LQP%*gPdCXd6P@J4Td;!Ur z<2ZLmwr(NG`u#gDEMP19UcSzRTL@HsK+PnIXbVBT@oHm53DZr?~V(0{rsalAfwgo zEh=GviaqkF;}F_5-yA!1u3!gxaR&Mj)hLuj5Q-N-@Lra{%<4ONja8pycD90&>yMB` zchhd>0CsH`^|&TstH-8+R`CfoWqmTTF_0?zDOY`E`b)cVi!$4xA@oO;SyOjJyP^_j zx^@Gdf+w|FW@DMdOi8=4+LJl$#@R&&=UM`)G!y%6ZzQLoSL%*KE8IO0~&5XYR9 z&N)?goEiWA(YoRfT{06&D6Yuu@Qt&XVbuW@COb;>SP9~aRc+z`m`80pB2o%`#{xD@ zI3RAlukL5L>px6b?QW1Ac_0>ew%NM!XB2(H+1Y3AJC?C?O`GGs`331Nd4ZvG~bMo{lh~GeL zSL|tT*fF-HXxXYtfu5z+T5Mx9OdP7J4g%@oeC2FaWO1D{=NvL|DNZ}GO?O3`+H*SI z=grGv=7dL{+oY0eJFGO!Qe(e2F?CHW(i!!XkGo2tUvsQ)I9ev`H&=;`N%Z{L zO?vV%rDv$y(@1Yj@xfr7Kzr<~0{^T8wM80xf7IGQF_S-2c0)0D6b0~yD7BsCy+(zL z#N~%&e4iAwi4F$&dI7x6cE|B{f@lY5epaDh=2-(4N05VO~A zQT3hanGy_&p+7Fb^I#ewGsjyCEUmSCaP6JDB*=_()FgQ(-pZ28-{qx~2foO4%pM9e z*_63RT8XjgiaWY|*xydf;8MKLd{HnfZ2kM%iq}fstImB-K6A79B~YoPVa@tYN@T_$ zea+9)<%?=Fl!kd(Y!G(-o}ko28hg2!MR-o5BEa_72uj7Mrc&{lRh3u2%Y=Xk9^-qa zBPWaD=2qcuJ&@Tf6ue&)4_V*45=zWk@Z}Q?f5)*z)-+E|-yC4fs5CE6L_PH3=zI8p z*Z3!it{1e5_^(sF*v=0{`U9C741&lub89gdhKp|Y8CeC{_{wYK-LSbp{h)b~9^j!s z7e?Y{Z3pZv0J)(VL=g>l;<}xk=T*O5YR|hg0eg4u98f2IrA-MY+StQIuK-(*J6TRR z|IM(%uI~?`wsfyO6Tgmsy1b3a)j6M&-jgUjVg+mP*oTKdHg?5E`!r`7AE_#?Fc)&a z08KCq>Gc=ne{PCbRvs6gVW|tKdcE1#7C4e`M|j$C5EYZ~Y=jUtc zj`+?p4ba3uy7><7wIokM79jPza``{Lx0)zGWg;FW1^NKY+GpEi=rHJ+fVRGfXO zPHV52k?jxei_!YYAw1HIz}y8ZMwdZqU%ESwMn7~t zdI5%B;U7RF=jzRz^NuY9nM)&<%M>x>0(e$GpU9th%rHiZsIT>_qp%V~ILlyt^V`=d z!1+DX@ah?RnB$X!0xpTA0}lN@9V-ePx>wQ?-xrJr^qDlw?#O(RsXeAvM%}rg0NT#t z!CsT;-vB=B87ShG`GwO;OEbeL;a}LIu=&@9cb~Rsx(ZPNQ!NT7H{@j0e(DiLea>QD zPmpe90gEKHEZ8oQ@6%E7k-Ptn#z)b9NbD@_GTxEhbS+}Bb74WUaRy{w;E|MgDAvHw zL)ycgM7mB?XVh^OzbC?LKFMotw3r@i&VdUV%^Efdib)3@soX%vWCbnOyt@Y4swW925@bt45y0HY3YI~BnnzZYrinFy;L?2D3BAL`UQ zEj))+f>H7~g8*VuWQ83EtGcx`hun$QvuurSMg3l4IP8Fe`#C|N6mbYJ=n;+}EQm;< z!!N=5j1aAr_uEnnzrEV%_E|JpTb#1p1*}5!Ce!R@d$EtMR~%9# zd;h8=QGT)KMW2IKu_fA_>p_und#-;Q)p%%l0XZOXQicfX8M~7?8}@U^ihu;mizj)t zgV7wk%n-UOb z#!P5q?Ex+*Kx@*p`o$q8FWL*E^$&1*!gpv?Za$YO~{BHeGY*5%4HXUKa_A~~^d z=E*gf6&+LFF^`j4$T~dR)%{I)T?>@Ma?D!gi9I^HqvjPc3-v~=qpX1Mne@*rzT&Xw zQ9DXsSV@PqpEJO-g4A&L{F&;K6W60D!_vs?Vx!?w27XbEuJJP&);)^+VF1nHqHBWu z^>kI$M9yfOY8~|hZ9WB!q-9u&mKhEcRjlf2nm_@s;0D#c|@ED7NZE% zzR;>P5B{o4fzlfsn3CkBK&`OSb-YNrqx@N#4CK!>bQ(V(D#9|l!e9(%sz~PYk@8zt zPN9oK78&-IL_F zhsk1$6p;GqFbtB^ZHHP+cjMvA0(LqlskbdYE_rda>gvQLTiqOQ1~*7lg%z*&p`Ry& zRcG^DbbPj_jOKHTr8uk^15Boj6>hA2S-QY(W-6!FIq8h$<>MI>PYYRenQDBamO#Fv zAH5&ImqKBDn0v5kb|8i0wFhUBJTpT!rB-`zK)^SNnRmLraZcPYK7b{I@+}wXVdW-{Ps17qdRA3JatEd?rPV z4@}(DAMf5EqXCr4-B+~H1P#;t@O}B)tIJ(W6$LrK&0plTmnPpb1TKn3?f?Kk``?D+ zQ!MFqOX7JbsXfQrz`-M@hq7xlfNz;_B{^wbpG8des56x(Q)H)5eLeDwCrVR}hzr~= zM{yXR6IM?kXxauLza#@#u?Y|o;904HCqF<8yT~~c-xyRc0-vxofnxG^(x%>bj5r}N zyFT+xnn-?B`ohA>{+ZZQem=*Xpqz{=j8i2TAC#x-m;;mo{{sLB_z(UoAqD=A#*juZ zCv=J~i*O8;F}A^Wf#+zx;~3B{57xtoxC&j^ie^?**T`WT2OPRtC`xj~+3Kprn=rVM zVJ|h5ux%S{dO}!mq93}P+h36mZ5aZg1-?vhL$ke1d52qIiXSE(llCr5i=QUS?LIjc zV$4q=-)aaR4wsrQv}^shL5u%6;`uiSEs<1nG^?$kl$^6DL z43CjY`M*p}ew}}3rXc7Xck@k41jx}c;NgEIhKZ*jsBRZUP-x2cm;F1<5$jefl|ppO zmZd%%?gMJ^g9=RZ^#8Mf5aWNVhjAS^|DQO+q$)oeob_&ZLFL(zur$)); zU19yRm)z<4&4-M}7!9+^Wl}Uk?`S$#V2%pQ*SIH5KI-mn%i;Z7-)m$mN9CnI$G7?# zo`zVrUwoSL&_dJ92YhX5TKqaRkfPgC4=Q&=K+;_aDs&OU0&{WFH}kKX6uNQC6%oUH z2DZa1s3%Vtk|bglbxep-w)PbFG!J17`<$g8lVhqD2w;Z0zGsh-r zxZ13G$G<48leNqR!DCVt9)@}(zMI5w6Wo=N zpP1*3DI;~h2WDWgcKn*f!+ORD)f$DZFwgKBafEZmeXQMAsq9sxP9A)7zOYnkHT9JU zRA`umgmP9d6=PHmFIgx=0$(sjb>+0CHG)K@cPG{IxaJ&Ueo8)0RWgV9+gO7+Bl1(F z7!BslJ2MP*PWJ;x)QXbR$6jEr5q3 z(3}F@YO_P1NyTdEXRLU6fp?9V2-S=E+YaeLL{Y)W%6`k7$(EW8EZSA*(+;e5@jgD^I zaJQ2|oCM1n!A&-8`;#RDcZyk*+RPkn_r8?Ak@agHiSp*qFNX)&i21HE?yuZ;-C<3C zwJGd1lx5UzViP7sZJ&|LqH*mryb}y|%AOw+v)yc`qM)03qyyrqhX?ub`Cjwx2PrR! z)_z>5*!*$x1=Qa-0uE7jy0z`>|Ni#X+uV|%_81F7)b+nf%iz=`fF4g5UfHS_?PHbr zB;0$bK@=di?f`dS(j{l3-tSCfp~zUuva+=EWxJcRfp(<$@vd(GigM&~vaYZ0c#BTs z3ijkxMl=vw5AS&DcXQ%eeKt!uKvh2l3W?&3=dBHU=Gz?O!40S&&~ei2vg**c$o;i89~6DVns zG>9a*`k5)NI9|?W!@9>rzJ;9EJ=YlJTx1r1BA?H`LWijk(rTax9(OAu;q4_wTj-yj z1%W4GW&K4T=uEGb+E!>W0SD_C0RR91 literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/web/icons/Icon-512.png b/pkgs/flutter_http_example/web/icons/Icon-512.png new file mode 100644 index 0000000000000000000000000000000000000000..88cfd48dff1169879ba46840804b412fe02fefd6 GIT binary patch literal 8252 zcmd5=2T+s!lYZ%-(h(2@5fr2dC?F^$C=i-}R6$UX8af(!je;W5yC_|HmujSgN*6?W z3knF*TL1$|?oD*=zPbBVex*RUIKsL<(&Rj9%^UD2IK3W?2j>D?eWQgvS-HLymHo9%~|N2Q{~j za?*X-{b9JRowv_*Mh|;*-kPFn>PI;r<#kFaxFqbn?aq|PduQg=2Q;~Qc}#z)_T%x9 zE|0!a70`58wjREmAH38H1)#gof)U3g9FZ^ zF7&-0^Hy{4XHWLoC*hOG(dg~2g6&?-wqcpf{ z&3=o8vw7lMi22jCG9RQbv8H}`+}9^zSk`nlR8?Z&G2dlDy$4#+WOlg;VHqzuE=fM@ z?OI6HEJH4&tA?FVG}9>jAnq_^tlw8NbjNhfqk2rQr?h(F&WiKy03Sn=-;ZJRh~JrD zbt)zLbnabttEZ>zUiu`N*u4sfQaLE8-WDn@tHp50uD(^r-}UsUUu)`!Rl1PozAc!a z?uj|2QDQ%oV-jxUJmJycySBINSKdX{kDYRS=+`HgR2GO19fg&lZKyBFbbXhQV~v~L za^U944F1_GtuFXtvDdDNDvp<`fqy);>Vw=ncy!NB85Tw{&sT5&Ox%-p%8fTS;OzlRBwErvO+ROe?{%q-Zge=%Up|D4L#>4K@Ke=x%?*^_^P*KD zgXueMiS63!sEw@fNLB-i^F|@Oib+S4bcy{eu&e}Xvb^(mA!=U=Xr3||IpV~3K zQWzEsUeX_qBe6fky#M zzOJm5b+l;~>=sdp%i}}0h zO?B?i*W;Ndn02Y0GUUPxERG`3Bjtj!NroLoYtyVdLtl?SE*CYpf4|_${ku2s`*_)k zN=a}V8_2R5QANlxsq!1BkT6$4>9=-Ix4As@FSS;1q^#TXPrBsw>hJ}$jZ{kUHoP+H zvoYiR39gX}2OHIBYCa~6ERRPJ#V}RIIZakUmuIoLF*{sO8rAUEB9|+A#C|@kw5>u0 zBd=F!4I)Be8ycH*)X1-VPiZ+Ts8_GB;YW&ZFFUo|Sw|x~ZajLsp+_3gv((Q#N>?Jz zFBf`~p_#^${zhPIIJY~yo!7$-xi2LK%3&RkFg}Ax)3+dFCjGgKv^1;lUzQlPo^E{K zmCnrwJ)NuSaJEmueEPO@(_6h3f5mFffhkU9r8A8(JC5eOkux{gPmx_$Uv&|hyj)gN zd>JP8l2U&81@1Hc>#*su2xd{)T`Yw< zN$dSLUN}dfx)Fu`NcY}TuZ)SdviT{JHaiYgP4~@`x{&h*Hd>c3K_To9BnQi@;tuoL z%PYQo&{|IsM)_>BrF1oB~+`2_uZQ48z9!)mtUR zdfKE+b*w8cPu;F6RYJiYyV;PRBbThqHBEu_(U{(gGtjM}Zi$pL8Whx}<JwE3RM0F8x7%!!s)UJVq|TVd#hf1zVLya$;mYp(^oZQ2>=ZXU1c$}f zm|7kfk>=4KoQoQ!2&SOW5|JP1)%#55C$M(u4%SP~tHa&M+=;YsW=v(Old9L3(j)`u z2?#fK&1vtS?G6aOt@E`gZ9*qCmyvc>Ma@Q8^I4y~f3gs7*d=ATlP>1S zyF=k&6p2;7dn^8?+!wZO5r~B+;@KXFEn^&C=6ma1J7Au6y29iMIxd7#iW%=iUzq&C=$aPLa^Q zncia$@TIy6UT@69=nbty5epP>*fVW@5qbUcb2~Gg75dNd{COFLdiz3}kODn^U*=@E z0*$7u7Rl2u)=%fk4m8EK1ctR!6%Ve`e!O20L$0LkM#f+)n9h^dn{n`T*^~d+l*Qlx z$;JC0P9+en2Wlxjwq#z^a6pdnD6fJM!GV7_%8%c)kc5LZs_G^qvw)&J#6WSp< zmsd~1-(GrgjC56Pdf6#!dt^y8Rg}!#UXf)W%~PeU+kU`FeSZHk)%sFv++#Dujk-~m zFHvVJC}UBn2jN& zs!@nZ?e(iyZPNo`p1i#~wsv9l@#Z|ag3JR>0#u1iW9M1RK1iF6-RbJ4KYg?B`dET9 zyR~DjZ>%_vWYm*Z9_+^~hJ_|SNTzBKx=U0l9 z9x(J96b{`R)UVQ$I`wTJ@$_}`)_DyUNOso6=WOmQKI1e`oyYy1C&%AQU<0-`(ow)1 zT}gYdwWdm4wW6|K)LcfMe&psE0XGhMy&xS`@vLi|1#Za{D6l@#D!?nW87wcscUZgELT{Cz**^;Zb~7 z(~WFRO`~!WvyZAW-8v!6n&j*PLm9NlN}BuUN}@E^TX*4Or#dMMF?V9KBeLSiLO4?B zcE3WNIa-H{ThrlCoN=XjOGk1dT=xwwrmt<1a)mrRzg{35`@C!T?&_;Q4Ce=5=>z^*zE_c(0*vWo2_#TD<2)pLXV$FlwP}Ik74IdDQU@yhkCr5h zn5aa>B7PWy5NQ!vf7@p_qtC*{dZ8zLS;JetPkHi>IvPjtJ#ThGQD|Lq#@vE2xdl%`x4A8xOln}BiQ92Po zW;0%A?I5CQ_O`@Ad=`2BLPPbBuPUp@Hb%a_OOI}y{Rwa<#h z5^6M}s7VzE)2&I*33pA>e71d78QpF>sNK;?lj^Kl#wU7G++`N_oL4QPd-iPqBhhs| z(uVM}$ItF-onXuuXO}o$t)emBO3Hjfyil@*+GF;9j?`&67GBM;TGkLHi>@)rkS4Nj zAEk;u)`jc4C$qN6WV2dVd#q}2X6nKt&X*}I@jP%Srs%%DS92lpDY^K*Sx4`l;aql$ zt*-V{U&$DM>pdO?%jt$t=vg5|p+Rw?SPaLW zB6nvZ69$ne4Z(s$3=Rf&RX8L9PWMV*S0@R zuIk&ba#s6sxVZ51^4Kon46X^9`?DC9mEhWB3f+o4#2EXFqy0(UTc>GU| zGCJmI|Dn-dX#7|_6(fT)>&YQ0H&&JX3cTvAq(a@ydM4>5Njnuere{J8p;3?1az60* z$1E7Yyxt^ytULeokgDnRVKQw9vzHg1>X@@jM$n$HBlveIrKP5-GJq%iWH#odVwV6cF^kKX(@#%%uQVb>#T6L^mC@)%SMd4DF? zVky!~ge27>cpUP1Vi}Z32lbLV+CQy+T5Wdmva6Fg^lKb!zrg|HPU=5Qu}k;4GVH+x z%;&pN1LOce0w@9i1Mo-Y|7|z}fbch@BPp2{&R-5{GLoeu8@limQmFF zaJRR|^;kW_nw~0V^ zfTnR!Ni*;-%oSHG1yItARs~uxra|O?YJxBzLjpeE-=~TO3Dn`JL5Gz;F~O1u3|FE- zvK2Vve`ylc`a}G`gpHg58Cqc9fMoy1L}7x7T>%~b&irrNMo?np3`q;d3d;zTK>nrK zOjPS{@&74-fA7j)8uT9~*g23uGnxwIVj9HorzUX#s0pcp2?GH6i}~+kv9fWChtPa_ z@T3m+$0pbjdQw7jcnHn;Pi85hk_u2-1^}c)LNvjdam8K-XJ+KgKQ%!?2n_!#{$H|| zLO=%;hRo6EDmnOBKCL9Cg~ETU##@u^W_5joZ%Et%X_n##%JDOcsO=0VL|Lkk!VdRJ z^|~2pB@PUspT?NOeO?=0Vb+fAGc!j%Ufn-cB`s2A~W{Zj{`wqWq_-w0wr@6VrM zbzni@8c>WS!7c&|ZR$cQ;`niRw{4kG#e z70e!uX8VmP23SuJ*)#(&R=;SxGAvq|&>geL&!5Z7@0Z(No*W561n#u$Uc`f9pD70# z=sKOSK|bF~#khTTn)B28h^a1{;>EaRnHj~>i=Fnr3+Fa4 z`^+O5_itS#7kPd20rq66_wH`%?HNzWk@XFK0n;Z@Cx{kx==2L22zWH$Yg?7 zvDj|u{{+NR3JvUH({;b*$b(U5U z7(lF!1bz2%06+|-v(D?2KgwNw7( zJB#Tz+ZRi&U$i?f34m7>uTzO#+E5cbaiQ&L}UxyOQq~afbNB4EI{E04ZWg53w0A{O%qo=lF8d zf~ktGvIgf-a~zQoWf>loF7pOodrd0a2|BzwwPDV}ShauTK8*fmF6NRbO>Iw9zZU}u zw8Ya}?seBnEGQDmH#XpUUkj}N49tP<2jYwTFp!P+&Fd(%Z#yo80|5@zN(D{_pNow*&4%ql zW~&yp@scb-+Qj-EmErY+Tu=dUmf@*BoXY2&oKT8U?8?s1d}4a`Aq>7SV800m$FE~? zjmz(LY+Xx9sDX$;vU`xgw*jLw7dWOnWWCO8o|;}f>cu0Q&`0I{YudMn;P;L3R-uz# zfns_mZED_IakFBPP2r_S8XM$X)@O-xVKi4`7373Jkd5{2$M#%cRhWer3M(vr{S6>h zj{givZJ3(`yFL@``(afn&~iNx@B1|-qfYiZu?-_&Z8+R~v`d6R-}EX9IVXWO-!hL5 z*k6T#^2zAXdardU3Ao~I)4DGdAv2bx{4nOK`20rJo>rmk3S2ZDu}))8Z1m}CKigf0 z3L`3Y`{huj`xj9@`$xTZzZc3je?n^yG<8sw$`Y%}9mUsjUR%T!?k^(q)6FH6Af^b6 zlPg~IEwg0y;`t9y;#D+uz!oE4VP&Je!<#q*F?m5L5?J3i@!0J6q#eu z!RRU`-)HeqGi_UJZ(n~|PSNsv+Wgl{P-TvaUQ9j?ZCtvb^37U$sFpBrkT{7Jpd?HpIvj2!}RIq zH{9~+gErN2+}J`>Jvng2hwM`=PLNkc7pkjblKW|+Fk9rc)G1R>Ww>RC=r-|!m-u7( zc(a$9NG}w#PjWNMS~)o=i~WA&4L(YIW25@AL9+H9!?3Y}sv#MOdY{bb9j>p`{?O(P zIvb`n?_(gP2w3P#&91JX*md+bBEr%xUHMVqfB;(f?OPtMnAZ#rm5q5mh;a2f_si2_ z3oXWB?{NF(JtkAn6F(O{z@b76OIqMC$&oJ_&S|YbFJ*)3qVX_uNf5b8(!vGX19hsG z(OP>RmZp29KH9Ge2kKjKigUmOe^K_!UXP`von)PR8Qz$%=EmOB9xS(ZxE_tnyzo}7 z=6~$~9k0M~v}`w={AeqF?_)9q{m8K#6M{a&(;u;O41j)I$^T?lx5(zlebpY@NT&#N zR+1bB)-1-xj}R8uwqwf=iP1GbxBjneCC%UrSdSxK1vM^i9;bUkS#iRZw2H>rS<2<$ zNT3|sDH>{tXb=zq7XZi*K?#Zsa1h1{h5!Tq_YbKFm_*=A5-<~j63he;4`77!|LBlo zR^~tR3yxcU=gDFbshyF6>o0bdp$qmHS7D}m3;^QZq9kBBU|9$N-~oU?G5;jyFR7>z hN`IR97YZXIo@y!QgFWddJ3|0`sjFx!m))><{BI=FK%f8s literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/web/icons/Icon-maskable-192.png b/pkgs/flutter_http_example/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9b4d76e525556d5d89141648c724331630325d GIT binary patch literal 5594 zcmdT|`#%%j|KDb2V@0DPm$^(Lx5}lO%Yv(=e*7hl@QqKS50#~#^IQPxBmuh|i9sXnt4ch@VT0F7% zMtrs@KWIOo+QV@lSs66A>2pz6-`9Jk=0vv&u?)^F@HZ)-6HT=B7LF;rdj zskUyBfbojcX#CS>WrIWo9D=DIwcXM8=I5D{SGf$~=gh-$LwY?*)cD%38%sCc?5OsX z-XfkyL-1`VavZ?>(pI-xp-kYq=1hsnyP^TLb%0vKRSo^~r{x?ISLY1i7KjSp z*0h&jG(Rkkq2+G_6eS>n&6>&Xk+ngOMcYrk<8KrukQHzfx675^^s$~<@d$9X{VBbg z2Fd4Z%g`!-P}d#`?B4#S-9x*eNlOVRnDrn#jY@~$jfQ-~3Od;A;x-BI1BEDdvr`pI z#D)d)!2_`GiZOUu1crb!hqH=ezs0qk<_xDm_Kkw?r*?0C3|Io6>$!kyDl;eH=aqg$B zsH_|ZD?jP2dc=)|L>DZmGyYKa06~5?C2Lc0#D%62p(YS;%_DRCB1k(+eLGXVMe+=4 zkKiJ%!N6^mxqM=wq`0+yoE#VHF%R<{mMamR9o_1JH8jfnJ?NPLs$9U!9!dq8 z0B{dI2!M|sYGH&9TAY34OlpIsQ4i5bnbG>?cWwat1I13|r|_inLE?FS@Hxdxn_YZN z3jfUO*X9Q@?HZ>Q{W0z60!bbGh557XIKu1?)u|cf%go`pwo}CD=0tau-}t@R2OrSH zQzZr%JfYa`>2!g??76=GJ$%ECbQh7Q2wLRp9QoyiRHP7VE^>JHm>9EqR3<$Y=Z1K^SHuwxCy-5@z3 zVM{XNNm}yM*pRdLKp??+_2&!bp#`=(Lh1vR{~j%n;cJv~9lXeMv)@}Odta)RnK|6* zC+IVSWumLo%{6bLDpn)Gz>6r&;Qs0^+Sz_yx_KNz9Dlt^ax`4>;EWrIT#(lJ_40<= z750fHZ7hI{}%%5`;lwkI4<_FJw@!U^vW;igL0k+mK)-j zYuCK#mCDK3F|SC}tC2>m$ZCqNB7ac-0UFBJ|8RxmG@4a4qdjvMzzS&h9pQmu^x&*= zGvapd1#K%Da&)8f?<9WN`2H^qpd@{7In6DNM&916TRqtF4;3`R|Nhwbw=(4|^Io@T zIjoR?tB8d*sO>PX4vaIHF|W;WVl6L1JvSmStgnRQq zTX4(>1f^5QOAH{=18Q2Vc1JI{V=yOr7yZJf4Vpfo zeHXdhBe{PyY;)yF;=ycMW@Kb>t;yE>;f79~AlJ8k`xWucCxJfsXf2P72bAavWL1G#W z;o%kdH(mYCM{$~yw4({KatNGim49O2HY6O07$B`*K7}MvgI=4x=SKdKVb8C$eJseA$tmSFOztFd*3W`J`yIB_~}k%Sd_bPBK8LxH)?8#jM{^%J_0|L z!gFI|68)G}ex5`Xh{5pB%GtlJ{Z5em*e0sH+sU1UVl7<5%Bq+YrHWL7?X?3LBi1R@_)F-_OqI1Zv`L zb6^Lq#H^2@d_(Z4E6xA9Z4o3kvf78ZDz!5W1#Mp|E;rvJz&4qj2pXVxKB8Vg0}ek%4erou@QM&2t7Cn5GwYqy%{>jI z)4;3SAgqVi#b{kqX#$Mt6L8NhZYgonb7>+r#BHje)bvaZ2c0nAvrN3gez+dNXaV;A zmyR0z@9h4@6~rJik-=2M-T+d`t&@YWhsoP_XP-NsVO}wmo!nR~QVWU?nVlQjNfgcTzE-PkfIX5G z1?&MwaeuzhF=u)X%Vpg_e@>d2yZwxl6-r3OMqDn8_6m^4z3zG##cK0Fsgq8fcvmhu z{73jseR%X%$85H^jRAcrhd&k!i^xL9FrS7qw2$&gwAS8AfAk#g_E_tP;x66fS`Mn@SNVrcn_N;EQm z`Mt3Z%rw%hDqTH-s~6SrIL$hIPKL5^7ejkLTBr46;pHTQDdoErS(B>``t;+1+M zvU&Se9@T_BeK;A^p|n^krIR+6rH~BjvRIugf`&EuX9u69`9C?9ANVL8l(rY6#mu^i z=*5Q)-%o*tWl`#b8p*ZH0I}hn#gV%|jt6V_JanDGuekR*-wF`u;amTCpGG|1;4A5$ zYbHF{?G1vv5;8Ph5%kEW)t|am2_4ik!`7q{ymfHoe^Z99c|$;FAL+NbxE-_zheYbV z3hb0`uZGTsgA5TG(X|GVDSJyJxsyR7V5PS_WSnYgwc_D60m7u*x4b2D79r5UgtL18 zcCHWk+K6N1Pg2c;0#r-)XpwGX?|Iv)^CLWqwF=a}fXUSM?n6E;cCeW5ER^om#{)Jr zJR81pkK?VoFm@N-s%hd7@hBS0xuCD0-UDVLDDkl7Ck=BAj*^ps`393}AJ+Ruq@fl9 z%R(&?5Nc3lnEKGaYMLmRzKXow1+Gh|O-LG7XiNxkG^uyv zpAtLINwMK}IWK65hOw&O>~EJ}x@lDBtB`yKeV1%GtY4PzT%@~wa1VgZn7QRwc7C)_ zpEF~upeDRg_<#w=dLQ)E?AzXUQpbKXYxkp>;c@aOr6A|dHA?KaZkL0svwB^U#zmx0 zzW4^&G!w7YeRxt<9;d@8H=u(j{6+Uj5AuTluvZZD4b+#+6Rp?(yJ`BC9EW9!b&KdPvzJYe5l7 zMJ9aC@S;sA0{F0XyVY{}FzW0Vh)0mPf_BX82E+CD&)wf2!x@{RO~XBYu80TONl3e+ zA7W$ra6LcDW_j4s-`3tI^VhG*sa5lLc+V6ONf=hO@q4|p`CinYqk1Ko*MbZ6_M05k zSwSwkvu;`|I*_Vl=zPd|dVD0lh&Ha)CSJJvV{AEdF{^Kn_Yfsd!{Pc1GNgw}(^~%)jk5~0L~ms|Rez1fiK~s5t(p1ci5Gq$JC#^JrXf?8 z-Y-Zi_Hvi>oBzV8DSRG!7dm|%IlZg3^0{5~;>)8-+Nk&EhAd(}s^7%MuU}lphNW9Q zT)DPo(ob{tB7_?u;4-qGDo!sh&7gHaJfkh43QwL|bbFVi@+oy;i;M zM&CP^v~lx1U`pi9PmSr&Mc<%HAq0DGH?Ft95)WY`P?~7O z`O^Nr{Py9M#Ls4Y7OM?e%Y*Mvrme%=DwQaye^Qut_1pOMrg^!5u(f9p(D%MR%1K>% zRGw%=dYvw@)o}Fw@tOtPjz`45mfpn;OT&V(;z75J*<$52{sB65$gDjwX3Xa!x_wE- z!#RpwHM#WrO*|~f7z}(}o7US(+0FYLM}6de>gQdtPazXz?OcNv4R^oYLJ_BQOd_l172oSK$6!1r@g+B@0ofJ4*{>_AIxfe-#xp>(1 z@Y3Nfd>fmqvjL;?+DmZk*KsfXJf<%~(gcLwEez%>1c6XSboURUh&k=B)MS>6kw9bY z{7vdev7;A}5fy*ZE23DS{J?8at~xwVk`pEwP5^k?XMQ7u64;KmFJ#POzdG#np~F&H ze-BUh@g54)dsS%nkBb}+GuUEKU~pHcYIg4vSo$J(J|U36bs0Use+3A&IMcR%6@jv$ z=+QI+@wW@?iu}Hpyzlvj-EYeop{f65GX0O%>w#0t|V z1-svWk`hU~m`|O$kw5?Yn5UhI%9P-<45A(v0ld1n+%Ziq&TVpBcV9n}L9Tus-TI)f zd_(g+nYCDR@+wYNQm1GwxhUN4tGMLCzDzPqY$~`l<47{+l<{FZ$L6(>J)|}!bi<)| zE35dl{a2)&leQ@LlDxLQOfUDS`;+ZQ4ozrleQwaR-K|@9T{#hB5Z^t#8 zC-d_G;B4;F#8A2EBL58s$zF-=SCr`P#z zNCTnHF&|X@q>SkAoYu>&s9v@zCpv9lLSH-UZzfhJh`EZA{X#%nqw@@aW^vPcfQrlPs(qQxmC|4tp^&sHy!H!2FH5eC{M@g;ElWNzlb-+ zxpfc0m4<}L){4|RZ>KReag2j%Ot_UKkgpJN!7Y_y3;Ssz{9 z!K3isRtaFtQII5^6}cm9RZd5nTp9psk&u1C(BY`(_tolBwzV_@0F*m%3G%Y?2utyS zY`xM0iDRT)yTyYukFeGQ&W@ReM+ADG1xu@ruq&^GK35`+2r}b^V!m1(VgH|QhIPDE X>c!)3PgKfL&lX^$Z>Cpu&6)6jvi^Z! literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/web/icons/Icon-maskable-512.png b/pkgs/flutter_http_example/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000000000000000000000000000000000000..d69c56691fbdb0b7efa65097c7cc1edac12a6d3e GIT binary patch literal 20998 zcmeFZ_gj-)&^4Nb2tlbLMU<{!p(#yjqEe+=0IA_oih%ScH9@5#MNp&}Y#;;(h=A0@ zh7{>lT2MkSQ344eAvrhici!td|HJuyvJm#Y_w1Q9Yu3!26dNlO-oxUDK_C#XnW^Co z5C{VN6#{~B0)K2j7}*1Xq(Nqemv23A-6&=ZpEijkVnSwVGqLv40?n0=p;k3-U5e5+ z+z3>aS`u9DS=!wg8ROu?X4TFoW6CFLL&{GzoVT)ldhLekLM|+j3tIxRd|*5=c{=s&*vfPdBr(Fyj(v@%eQj1Soy7m4^@VRl1~@-PV7y+c!xz$8436WBn$t{=}mEdK#k`aystimGgI{(IBx$!pAwFoE9Y`^t^;> zKAD)C(Dl^s%`?q5$P|fZf8Xymrtu^Pv(7D`rn>Z-w$Ahs!z9!94WNVxrJuXfHAaxg zC6s@|Z1$7R$(!#t%Jb{{s6(Y?NoQXDYq)!}X@jKPhe`{9KQ@sAU8y-5`xt?S9$jKH zoi}6m5PcG*^{kjvt+kwPpyQzVg4o)a>;LK`aaN2x4@itBD3Aq?yWTM20VRn1rrd+2 zKO=P0rMjEGq_UqpMa`~7B|p?xAN1SCoCp}QxAv8O`jLJ5CVh@umR%c%i^)6!o+~`F zaalSTQcl5iwOLC&H)efzd{8(88mo`GI(56T<(&p7>Qd^;R1hn1Y~jN~tApaL8>##U zd65bo8)79CplWxr#z4!6HvLz&N7_5AN#x;kLG?zQ(#p|lj<8VUlKY=Aw!ATqeL-VG z42gA!^cMNPj>(`ZMEbCrnkg*QTsn*u(nQPWI9pA{MQ=IsPTzd7q5E#7+z>Ch=fx$~ z;J|?(5jTo5UWGvsJa(Sx0?S#56+8SD!I^tftyeh_{5_31l6&Hywtn`bbqYDqGZXI( zCG7hBgvksX2ak8+)hB4jnxlO@A32C_RM&g&qDSb~3kM&)@A_j1*oTO@nicGUyv+%^ z=vB)4(q!ykzT==Z)3*3{atJ5}2PV*?Uw+HhN&+RvKvZL3p9E?gHjv{6zM!A|z|UHK z-r6jeLxbGn0D@q5aBzlco|nG2tr}N@m;CJX(4#Cn&p&sLKwzLFx1A5izu?X_X4x8r@K*d~7>t1~ zDW1Mv5O&WOxbzFC`DQ6yNJ(^u9vJdj$fl2dq`!Yba_0^vQHXV)vqv1gssZYzBct!j zHr9>ydtM8wIs}HI4=E}qAkv|BPWzh3^_yLH(|kdb?x56^BlDC)diWyPd*|f!`^12_U>TD^^94OCN0lVv~Sgvs94ecpE^}VY$w`qr_>Ue zTfH~;C<3H<0dS5Rkf_f@1x$Gms}gK#&k()IC0zb^QbR!YLoll)c$Agfi6MKI0dP_L z=Uou&u~~^2onea2%XZ@>`0x^L8CK6=I{ge;|HXMj)-@o~h&O{CuuwBX8pVqjJ*o}5 z#8&oF_p=uSo~8vn?R0!AMWvcbZmsrj{ZswRt(aEdbi~;HeVqIe)-6*1L%5u$Gbs}| zjFh?KL&U(rC2izSGtwP5FnsR@6$-1toz?RvLD^k~h9NfZgzHE7m!!7s6(;)RKo2z} zB$Ci@h({l?arO+vF;s35h=|WpefaOtKVx>l399}EsX@Oe3>>4MPy%h&^3N_`UTAHJ zI$u(|TYC~E4)|JwkWW3F!Tib=NzjHs5ii2uj0^m|Qlh-2VnB#+X~RZ|`SA*}}&8j9IDv?F;(Y^1=Z0?wWz;ikB zewU>MAXDi~O7a~?jx1x=&8GcR-fTp>{2Q`7#BE#N6D@FCp`?ht-<1|y(NArxE_WIu zP+GuG=Qq>SHWtS2M>34xwEw^uvo4|9)4s|Ac=ud?nHQ>ax@LvBqusFcjH0}{T3ZPQ zLO1l<@B_d-(IS682}5KA&qT1+{3jxKolW+1zL4inqBS-D>BohA!K5++41tM@ z@xe<-qz27}LnV#5lk&iC40M||JRmZ*A##K3+!j93eouU8@q-`W0r%7N`V$cR&JV;iX(@cS{#*5Q>~4BEDA)EikLSP@>Oo&Bt1Z~&0d5)COI%3$cLB_M?dK# z{yv2OqW!al-#AEs&QFd;WL5zCcp)JmCKJEdNsJlL9K@MnPegK23?G|O%v`@N{rIRa zi^7a}WBCD77@VQ-z_v{ZdRsWYrYgC$<^gRQwMCi6);%R~uIi31OMS}=gUTE(GKmCI z$zM>mytL{uNN+a&S38^ez(UT=iSw=l2f+a4)DyCA1Cs_N-r?Q@$3KTYosY!;pzQ0k zzh1G|kWCJjc(oZVBji@kN%)UBw(s{KaYGy=i{g3{)Z+&H8t2`^IuLLKWT6lL<-C(! zSF9K4xd-|VO;4}$s?Z7J_dYqD#Mt)WCDnsR{Kpjq275uUq6`v0y*!PHyS(}Zmv)_{>Vose9-$h8P0|y;YG)Bo}$(3Z%+Gs0RBmFiW!^5tBmDK-g zfe5%B*27ib+7|A*Fx5e)2%kIxh7xWoc3pZcXS2zik!63lAG1;sC1ja>BqH7D zODdi5lKW$$AFvxgC-l-)!c+9@YMC7a`w?G(P#MeEQ5xID#<}W$3bSmJ`8V*x2^3qz zVe<^^_8GHqYGF$nIQm0Xq2kAgYtm#UC1A(=&85w;rmg#v906 zT;RyMgbMpYOmS&S9c38^40oUp?!}#_84`aEVw;T;r%gTZkWeU;;FwM@0y0adt{-OK z(vGnPSlR=Nv2OUN!2=xazlnHPM9EWxXg2EKf0kI{iQb#FoP>xCB<)QY>OAM$Dcdbm zU6dU|%Mo(~avBYSjRc13@|s>axhrPl@Sr81{RSZUdz4(=|82XEbV*JAX6Lfbgqgz584lYgi0 z2-E{0XCVON$wHfvaLs;=dqhQJ&6aLn$D#0i(FkAVrXG9LGm3pSTf&f~RQb6|1_;W> z?n-;&hrq*~L=(;u#jS`*Yvh@3hU-33y_Kv1nxqrsf>pHVF&|OKkoC)4DWK%I!yq?P z=vXo8*_1iEWo8xCa{HJ4tzxOmqS0&$q+>LroMKI*V-rxhOc%3Y!)Y|N6p4PLE>Yek>Y(^KRECg8<|%g*nQib_Yc#A5q8Io z6Ig&V>k|~>B6KE%h4reAo*DfOH)_01tE0nWOxX0*YTJgyw7moaI^7gW*WBAeiLbD?FV9GSB zPv3`SX*^GRBM;zledO`!EbdBO_J@fEy)B{-XUTVQv}Qf~PSDpK9+@I`7G7|>Dgbbu z_7sX9%spVo$%qwRwgzq7!_N;#Td08m5HV#?^dF-EV1o)Q=Oa+rs2xH#g;ykLbwtCh znUnA^dW!XjspJ;otq$yV@I^s9Up(5k7rqhQd@OLMyyxVLj_+$#Vc*}Usevp^I(^vH zmDgHc0VMme|K&X?9&lkN{yq_(If)O`oUPW8X}1R5pSVBpfJe0t{sPA(F#`eONTh_) zxeLqHMfJX#?P(@6w4CqRE@Eiza; z;^5)Kk=^5)KDvd9Q<`=sJU8rjjxPmtWMTmzcH={o$U)j=QBuHarp?=}c??!`3d=H$nrJMyr3L-& zA#m?t(NqLM?I3mGgWA_C+0}BWy3-Gj7bR+d+U?n*mN$%5P`ugrB{PeV>jDUn;eVc- zzeMB1mI4?fVJatrNyq|+zn=!AiN~<}eoM#4uSx^K?Iw>P2*r=k`$<3kT00BE_1c(02MRz4(Hq`L^M&xt!pV2 zn+#U3@j~PUR>xIy+P>51iPayk-mqIK_5rlQMSe5&tDkKJk_$i(X&;K(11YGpEc-K= zq4Ln%^j>Zi_+Ae9eYEq_<`D+ddb8_aY!N;)(&EHFAk@Ekg&41ABmOXfWTo)Z&KotA zh*jgDGFYQ^y=m)<_LCWB+v48DTJw*5dwMm_YP0*_{@HANValf?kV-Ic3xsC}#x2h8 z`q5}d8IRmqWk%gR)s~M}(Qas5+`np^jW^oEd-pzERRPMXj$kS17g?H#4^trtKtq;C?;c ztd|%|WP2w2Nzg@)^V}!Gv++QF2!@FP9~DFVISRW6S?eP{H;;8EH;{>X_}NGj^0cg@ z!2@A>-CTcoN02^r6@c~^QUa={0xwK0v4i-tQ9wQq^=q*-{;zJ{Qe%7Qd!&X2>rV@4 z&wznCz*63_vw4>ZF8~%QCM?=vfzW0r_4O^>UA@otm_!N%mH)!ERy&b!n3*E*@?9d^ zu}s^By@FAhG(%?xgJMuMzuJw2&@$-oK>n z=UF}rt%vuaP9fzIFCYN-1&b#r^Cl6RDFIWsEsM|ROf`E?O(cy{BPO2Ie~kT+^kI^i zp>Kbc@C?}3vy-$ZFVX#-cx)Xj&G^ibX{pWggtr(%^?HeQL@Z( zM-430g<{>vT*)jK4aY9(a{lSy{8vxLbP~n1MXwM527ne#SHCC^F_2@o`>c>>KCq9c(4c$VSyMl*y3Nq1s+!DF| z^?d9PipQN(mw^j~{wJ^VOXDCaL$UtwwTpyv8IAwGOg<|NSghkAR1GSNLZ1JwdGJYm zP}t<=5=sNNUEjc=g(y)1n5)ynX(_$1-uGuDR*6Y^Wgg(LT)Jp><5X|}bt z_qMa&QP?l_n+iVS>v%s2Li_;AIeC=Ca^v1jX4*gvB$?H?2%ndnqOaK5-J%7a} zIF{qYa&NfVY}(fmS0OmXA70{znljBOiv5Yod!vFU{D~*3B3Ka{P8?^ zfhlF6o7aNT$qi8(w<}OPw5fqA7HUje*r*Oa(YV%*l0|9FP9KW@U&{VSW{&b0?@y)M zs%4k1Ax;TGYuZ9l;vP5@?3oQsp3)rjBeBvQQ>^B;z5pc=(yHhHtq6|0m(h4envn_j787fizY@V`o(!SSyE7vlMT zbo=Z1c=atz*G!kwzGB;*uPL$Ei|EbZLh8o+1BUMOpnU(uX&OG1MV@|!&HOOeU#t^x zr9=w2ow!SsTuJWT7%Wmt14U_M*3XiWBWHxqCVZI0_g0`}*^&yEG9RK9fHK8e+S^m? zfCNn$JTswUVbiC#>|=wS{t>-MI1aYPLtzO5y|LJ9nm>L6*wpr_m!)A2Fb1RceX&*|5|MwrvOk4+!0p99B9AgP*9D{Yt|x=X}O% zgIG$MrTB=n-!q%ROT|SzH#A$Xm;|ym)0>1KR}Yl0hr-KO&qMrV+0Ej3d@?FcgZ+B3 ztEk16g#2)@x=(ko8k7^Tq$*5pfZHC@O@}`SmzT1(V@x&NkZNM2F#Q-Go7-uf_zKC( zB(lHZ=3@dHaCOf6C!6i8rDL%~XM@rVTJbZL09?ht@r^Z_6x}}atLjvH^4Vk#Ibf(^LiBJFqorm?A=lE zzFmwvp4bT@Nv2V>YQT92X;t9<2s|Ru5#w?wCvlhcHLcsq0TaFLKy(?nzezJ>CECqj zggrI~Hd4LudM(m{L@ezfnpELsRFVFw>fx;CqZtie`$BXRn#Ns%AdoE$-Pf~{9A8rV zf7FbgpKmVzmvn-z(g+&+-ID=v`;6=)itq8oM*+Uz**SMm_{%eP_c0{<%1JGiZS19o z@Gj7$Se~0lsu}w!%;L%~mIAO;AY-2i`9A*ZfFs=X!LTd6nWOZ7BZH2M{l2*I>Xu)0 z`<=;ObglnXcVk!T>e$H?El}ra0WmPZ$YAN0#$?|1v26^(quQre8;k20*dpd4N{i=b zuN=y}_ew9SlE~R{2+Rh^7%PA1H5X(p8%0TpJ=cqa$65XL)$#ign-y!qij3;2>j}I; ziO@O|aYfn&up5F`YtjGw68rD3{OSGNYmBnl?zdwY$=RFsegTZ=kkzRQ`r7ZjQP!H( zp4>)&zf<*N!tI00xzm-ME_a{_I!TbDCr;8E;kCH4LlL-tqLxDuBn-+xgPk37S&S2^ z2QZumkIimwz!c@!r0)j3*(jPIs*V!iLTRl0Cpt_UVNUgGZzdvs0(-yUghJfKr7;=h zD~y?OJ-bWJg;VdZ^r@vlDoeGV&8^--!t1AsIMZ5S440HCVr%uk- z2wV>!W1WCvFB~p$P$$_}|H5>uBeAe>`N1FI8AxM|pq%oNs;ED8x+tb44E) zTj{^fbh@eLi%5AqT?;d>Es5D*Fi{Bpk)q$^iF!!U`r2hHAO_?#!aYmf>G+jHsES4W zgpTKY59d?hsb~F0WE&dUp6lPt;Pm zcbTUqRryw^%{ViNW%Z(o8}dd00H(H-MmQmOiTq{}_rnwOr*Ybo7*}3W-qBT!#s0Ie z-s<1rvvJx_W;ViUD`04%1pra*Yw0BcGe)fDKUK8aF#BwBwMPU;9`!6E(~!043?SZx z13K%z@$$#2%2ovVlgFIPp7Q6(vO)ud)=*%ZSucL2Dh~K4B|%q4KnSpj#n@(0B})!9 z8p*hY@5)NDn^&Pmo;|!>erSYg`LkO?0FB@PLqRvc>4IsUM5O&>rRv|IBRxi(RX(gJ ztQ2;??L~&Mv;aVr5Q@(?y^DGo%pO^~zijld41aA0KKsy_6FeHIn?fNHP-z>$OoWer zjZ5hFQTy*-f7KENRiCE$ZOp4|+Wah|2=n@|W=o}bFM}Y@0e62+_|#fND5cwa3;P{^pEzlJbF1Yq^}>=wy8^^^$I2M_MH(4Dw{F6hm+vrWV5!q;oX z;tTNhz5`-V={ew|bD$?qcF^WPR{L(E%~XG8eJx(DoGzt2G{l8r!QPJ>kpHeOvCv#w zr=SSwMDaUX^*~v%6K%O~i)<^6`{go>a3IdfZ8hFmz&;Y@P%ZygShQZ2DSHd`m5AR= zx$wWU06;GYwXOf(%MFyj{8rPFXD};JCe85Bdp4$YJ2$TzZ7Gr#+SwCvBI1o$QP0(c zy`P51FEBV2HTisM3bHqpmECT@H!Y2-bv2*SoSPoO?wLe{M#zDTy@ujAZ!Izzky~3k zRA1RQIIoC*Mej1PH!sUgtkR0VCNMX(_!b65mo66iM*KQ7xT8t2eev$v#&YdUXKwGm z7okYAqYF&bveHeu6M5p9xheRCTiU8PFeb1_Rht0VVSbm%|1cOVobc8mvqcw!RjrMRM#~=7xibH&Fa5Imc|lZ{eC|R__)OrFg4@X_ ze+kk*_sDNG5^ELmHnZ7Ue?)#6!O)#Nv*Dl2mr#2)w{#i-;}0*_h4A%HidnmclH#;Q zmQbq+P4DS%3}PpPm7K_K3d2s#k~x+PlTul7+kIKol0@`YN1NG=+&PYTS->AdzPv!> zQvzT=)9se*Jr1Yq+C{wbK82gAX`NkbXFZ)4==j4t51{|-v!!$H8@WKA={d>CWRW+g z*`L>9rRucS`vbXu0rzA1#AQ(W?6)}1+oJSF=80Kf_2r~Qm-EJ6bbB3k`80rCv(0d` zvCf3;L2ovYG_TES%6vSuoKfIHC6w;V31!oqHM8-I8AFzcd^+_86!EcCOX|Ta9k1!s z_Vh(EGIIsI3fb&dF$9V8v(sTBC%!#<&KIGF;R+;MyC0~}$gC}}= zR`DbUVc&Bx`lYykFZ4{R{xRaUQkWCGCQlEc;!mf=+nOk$RUg*7 z;kP7CVLEc$CA7@6VFpsp3_t~m)W0aPxjsA3e5U%SfY{tp5BV5jH-5n?YX7*+U+Zs%LGR>U- z!x4Y_|4{gx?ZPJobISy991O znrmrC3otC;#4^&Rg_iK}XH(XX+eUHN0@Oe06hJk}F?`$)KmH^eWz@@N%wEc)%>?Ft z#9QAroDeyfztQ5Qe{m*#R#T%-h*&XvSEn@N$hYRTCMXS|EPwzF3IIysD2waj`vQD{ zv_#^Pgr?s~I*NE=acf@dWVRNWTr(GN0wrL)Z2=`Dr>}&ZDNX|+^Anl{Di%v1Id$_p zK5_H5`RDjJx`BW7hc85|> zHMMsWJ4KTMRHGu+vy*kBEMjz*^K8VtU=bXJYdhdZ-?jTXa$&n)C?QQIZ7ln$qbGlr zS*TYE+ppOrI@AoPP=VI-OXm}FzgXRL)OPvR$a_=SsC<3Jb+>5makX|U!}3lx4tX&L z^C<{9TggZNoeX!P1jX_K5HkEVnQ#s2&c#umzV6s2U-Q;({l+j^?hi7JnQ7&&*oOy9 z(|0asVTWUCiCnjcOnB2pN0DpuTglKq;&SFOQ3pUdye*eT<2()7WKbXp1qq9=bhMWlF-7BHT|i3TEIT77AcjD(v=I207wi-=vyiw5mxgPdTVUC z&h^FEUrXwWs9en2C{ywZp;nvS(Mb$8sBEh-*_d-OEm%~p1b2EpcwUdf<~zmJmaSTO zSX&&GGCEz-M^)G$fBvLC2q@wM$;n4jp+mt0MJFLuJ%c`tSp8$xuP|G81GEd2ci$|M z4XmH{5$j?rqDWoL4vs!}W&!?!rtj=6WKJcE>)?NVske(p;|#>vL|M_$as=mi-n-()a*OU3Okmk0wC<9y7t^D(er-&jEEak2!NnDiOQ99Wx8{S8}=Ng!e0tzj*#T)+%7;aM$ z&H}|o|J1p{IK0Q7JggAwipvHvko6>Epmh4RFRUr}$*2K4dz85o7|3#Bec9SQ4Y*;> zXWjT~f+d)dp_J`sV*!w>B%)#GI_;USp7?0810&3S=WntGZ)+tzhZ+!|=XlQ&@G@~3 z-dw@I1>9n1{+!x^Hz|xC+P#Ab`E@=vY?3%Bc!Po~e&&&)Qp85!I|U<-fCXy*wMa&t zgDk!l;gk;$taOCV$&60z+}_$ykz=Ea*)wJQ3-M|p*EK(cvtIre0Pta~(95J7zoxBN zS(yE^3?>88AL0Wfuou$BM{lR1hkrRibz=+I9ccwd`ZC*{NNqL)3pCcw^ygMmrG^Yp zn5f}Xf>%gncC=Yq96;rnfp4FQL#{!Y*->e82rHgY4Zwy{`JH}b9*qr^VA{%~Z}jtp z_t$PlS6}5{NtTqXHN?uI8ut8rOaD#F1C^ls73S=b_yI#iZDOGz3#^L@YheGd>L;<( z)U=iYj;`{>VDNzIxcjbTk-X3keXR8Xbc`A$o5# zKGSk-7YcoBYuAFFSCjGi;7b<;n-*`USs)IX z=0q6WZ=L!)PkYtZE-6)azhXV|+?IVGTOmMCHjhkBjfy@k1>?yFO3u!)@cl{fFAXnRYsWk)kpT?X{_$J=|?g@Q}+kFw|%n!;Zo}|HE@j=SFMvT8v`6Y zNO;tXN^036nOB2%=KzxB?n~NQ1K8IO*UE{;Xy;N^ZNI#P+hRZOaHATz9(=)w=QwV# z`z3+P>9b?l-@$@P3<;w@O1BdKh+H;jo#_%rr!ute{|YX4g5}n?O7Mq^01S5;+lABE+7`&_?mR_z7k|Ja#8h{!~j)| zbBX;*fsbUak_!kXU%HfJ2J+G7;inu#uRjMb|8a){=^))y236LDZ$$q3LRlat1D)%7K0!q5hT5V1j3qHc7MG9 z_)Q=yQ>rs>3%l=vu$#VVd$&IgO}Za#?aN!xY>-<3PhzS&q!N<=1Q7VJBfHjug^4|) z*fW^;%3}P7X#W3d;tUs3;`O&>;NKZBMR8au6>7?QriJ@gBaorz-+`pUWOP73DJL=M z(33uT6Gz@Sv40F6bN|H=lpcO z^AJl}&=TIjdevuDQ!w0K*6oZ2JBOhb31q!XDArFyKpz!I$p4|;c}@^bX{>AXdt7Bm zaLTk?c%h@%xq02reu~;t@$bv`b3i(P=g}~ywgSFpM;}b$zAD+=I!7`V~}ARB(Wx0C(EAq@?GuxOL9X+ffbkn3+Op0*80TqmpAq~EXmv%cq36celXmRz z%0(!oMp&2?`W)ALA&#|fu)MFp{V~~zIIixOxY^YtO5^FSox8v$#d0*{qk0Z)pNTt0QVZ^$`4vImEB>;Lo2!7K05TpY-sl#sWBz_W-aDIV`Ksabi zvpa#93Svo!70W*Ydh)Qzm{0?CU`y;T^ITg-J9nfWeZ-sbw)G@W?$Eomf%Bg2frfh5 zRm1{|E0+(4zXy){$}uC3%Y-mSA2-^I>Tw|gQx|7TDli_hB>``)Q^aZ`LJC2V3U$SABP}T)%}9g2pF9dT}aC~!rFFgkl1J$ z`^z{Arn3On-m%}r}TGF8KQe*OjSJ=T|caa_E;v89A{t@$yT^(G9=N9F?^kT*#s3qhJq!IH5|AhnqFd z0B&^gm3w;YbMNUKU>naBAO@fbz zqw=n!@--}o5;k6DvTW9pw)IJVz;X}ncbPVrmH>4x);8cx;q3UyiML1PWp%bxSiS|^ zC5!kc4qw%NSOGQ*Kcd#&$30=lDvs#*4W4q0u8E02U)7d=!W7+NouEyuF1dyH$D@G& zaFaxo9Ex|ZXA5y{eZT*i*dP~INSMAi@mvEX@q5i<&o&#sM}Df?Og8n8Ku4vOux=T% zeuw~z1hR}ZNwTn8KsQHKLwe2>p^K`YWUJEdVEl|mO21Bov!D0D$qPoOv=vJJ`)|%_ z>l%`eexY7t{BlVKP!`a^U@nM?#9OC*t76My_E_<16vCz1x_#82qj2PkWiMWgF8bM9 z(1t4VdHcJ;B~;Q%x01k_gQ0>u2*OjuEWNOGX#4}+N?Gb5;+NQMqp}Puqw2HnkYuKA zzKFWGHc&K>gwVgI1Sc9OT1s6fq=>$gZU!!xsilA$fF`kLdGoX*^t}ao@+^WBpk>`8 z4v_~gK|c2rCq#DZ+H)$3v~Hoi=)=1D==e3P zpKrRQ+>O^cyTuWJ%2}__0Z9SM_z9rptd*;-9uC1tDw4+A!=+K%8~M&+Zk#13hY$Y$ zo-8$*8dD5@}XDi19RjK6T^J~DIXbF5w&l?JLHMrf0 zLv0{7*G!==o|B%$V!a=EtVHdMwXLtmO~vl}P6;S(R2Q>*kTJK~!}gloxj)m|_LYK{ zl(f1cB=EON&wVFwK?MGn^nWuh@f95SHatPs(jcwSY#Dnl1@_gkOJ5=f`%s$ZHljRH0 z+c%lrb=Gi&N&1>^L_}#m>=U=(oT^vTA&3!xXNyqi$pdW1BDJ#^{h|2tZc{t^vag3& zAD7*8C`chNF|27itjBUo^CCDyEpJLX3&u+(L;YeeMwnXEoyN(ytoEabcl$lSgx~Ltatn}b$@j_yyMrBb03)shJE*$;Mw=;mZd&8e>IzE+4WIoH zCSZE7WthNUL$|Y#m!Hn?x7V1CK}V`KwW2D$-7&ODy5Cj;!_tTOOo1Mm%(RUt)#$@3 zhurA)t<7qik%%1Et+N1?R#hdBB#LdQ7{%-C zn$(`5e0eFh(#c*hvF>WT*07fk$N_631?W>kfjySN8^XC9diiOd#s?4tybICF;wBjp zIPzilX3{j%4u7blhq)tnaOBZ_`h_JqHXuI7SuIlNTgBk9{HIS&3|SEPfrvcE<@}E` zKk$y*nzsqZ{J{uWW9;#n=de&&h>m#A#q)#zRonr(?mDOYU&h&aQWD;?Z(22wY?t$U3qo`?{+amA$^TkxL+Ex2dh`q7iR&TPd0Ymwzo#b? zP$#t=elB5?k$#uE$K>C$YZbYUX_JgnXA`oF_Ifz4H7LEOW~{Gww&3s=wH4+j8*TU| zSX%LtJWqhr-xGNSe{;(16kxnak6RnZ{0qZ^kJI5X*It_YuynSpi(^-}Lolr{)#z_~ zw!(J-8%7Ybo^c3(mED`Xz8xecP35a6M8HarxRn%+NJBE;dw>>Y2T&;jzRd4FSDO3T zt*y+zXCtZQ0bP0yf6HRpD|WmzP;DR^-g^}{z~0x~z4j8m zucTe%k&S9Nt-?Jb^gYW1w6!Y3AUZ0Jcq;pJ)Exz%7k+mUOm6%ApjjSmflfKwBo6`B zhNb@$NHTJ>guaj9S{@DX)!6)b-Shav=DNKWy(V00k(D!v?PAR0f0vDNq*#mYmUp6> z76KxbFDw5U{{qx{BRj(>?|C`82ICKbfLxoldov-M?4Xl+3;I4GzLHyPOzYw7{WQST zPNYcx5onA%MAO9??41Po*1zW(Y%Zzn06-lUp{s<3!_9vv9HBjT02On0Hf$}NP;wF) zP<`2p3}A^~1YbvOh{ePMx$!JGUPX-tbBzp3mDZMY;}h;sQ->!p97GA)9a|tF(Gh{1$xk7 zUw?ELkT({Xw!KIr);kTRb1b|UL`r2_`a+&UFVCdJ)1T#fdh;71EQl9790Br0m_`$x z9|ZANuchFci8GNZ{XbP=+uXSJRe(;V5laQz$u18#?X*9}x7cIEbnr%<=1cX3EIu7$ zhHW6pe5M(&qEtsqRa>?)*{O;OJT+YUhG5{km|YI7I@JL_3Hwao9aXneiSA~a* z|Lp@c-oMNyeAEuUz{F?kuou3x#C*gU?lon!RC1s37gW^0Frc`lqQWH&(J4NoZg3m8 z;Lin#8Q+cFPD7MCzj}#|ws7b@?D9Q4dVjS4dpco=4yX5SSH=A@U@yqPdp@?g?qeia zH=Tt_9)G=6C2QIPsi-QipnK(mc0xXIN;j$WLf@n8eYvMk;*H-Q4tK%(3$CN}NGgO8n}fD~+>?<3UzvsrMf*J~%i;VKQHbF%TPalFi=#sgj)(P#SM^0Q=Tr>4kJVw8X3iWsP|e8tj}NjlMdWp z@2+M4HQu~3!=bZpjh;;DIDk&X}=c8~kn)FWWH z2KL1w^rA5&1@@^X%MjZ7;u(kH=YhH2pJPFQe=hn>tZd5RC5cfGYis8s9PKaxi*}-s6*W zRA^PwR=y^5Z){!(4D9-KC;0~;b*ploznFOaU`bJ_7U?qAi#mTo!&rIECRL$_y@yI27x2?W+zqDBD5~KCVYKFZLK+>ABC(Kj zeAll)KMgIlAG`r^rS{loBrGLtzhHY8$)<_S<(Dpkr(Ym@@vnQ&rS@FC*>2@XCH}M+an74WcRDcoQ+a3@A z9tYhl5$z7bMdTvD2r&jztBuo37?*k~wcU9GK2-)MTFS-lux-mIRYUuGUCI~V$?s#< z?1qAWb(?ZLm(N>%S%y10COdaq_Tm5c^%ooIxpR=`3e4C|@O5wY+eLik&XVi5oT7oe zmxH)Jd*5eo@!7t`x8!K=-+zJ-Sz)B_V$)s1pW~CDU$=q^&ABvf6S|?TOMB-RIm@CoFg>mjIQE)?+A1_3s6zmFU_oW&BqyMz1mY*IcP_2knjq5 zqw~JK(cVsmzc7*EvTT2rvpeqhg)W=%TOZ^>f`rD4|7Z5fq*2D^lpCttIg#ictgqZ$P@ru6P#f$x#KfnfTZj~LG6U_d-kE~`;kU_X)`H5so@?C zWmb!7x|xk@0L~0JFall*@ltyiL^)@3m4MqC7(7H0sH!WidId1#f#6R{Q&A!XzO1IAcIx;$k66dumt6lpUw@nL2MvqJ5^kbOVZ<^2jt5-njy|2@`07}0w z;M%I1$FCoLy`8xp8Tk)bFr;7aJeQ9KK6p=O$U0-&JYYy8woV*>b+FB?xLX`=pirYM z5K$BA(u)+jR{?O2r$c_Qvl?M{=Ar{yQ!UVsVn4k@0!b?_lA;dVz9uaQUgBH8Oz(Sb zrEs;&Ey>_ex8&!N{PmQjp+-Hlh|OA&wvDai#GpU=^-B70V0*LF=^bi+Nhe_o|azZ%~ZZ1$}LTmWt4aoB1 zPgccm$EwYU+jrdBaQFxQfn5gd(gM`Y*Ro1n&Zi?j=(>T3kmf94vdhf?AuS8>$Va#P zGL5F+VHpxdsCUa}+RqavXCobI-@B;WJbMphpK2%6t=XvKWWE|ruvREgM+|V=i6;;O zx$g=7^`$XWn0fu!gF=Xe9cMB8Z_SelD>&o&{1XFS`|nInK3BXlaeD*rc;R-#osyIS zWv&>~^TLIyBB6oDX+#>3<_0+2C4u2zK^wmHXXDD9_)kmLYJ!0SzM|%G9{pi)`X$uf zW}|%%#LgyK7m(4{V&?x_0KEDq56tk|0YNY~B(Sr|>WVz-pO3A##}$JCT}5P7DY+@W z#gJv>pA5>$|E3WO2tV7G^SuymB?tY`ooKcN3!vaQMnBNk-WATF{-$#}FyzgtJ8M^; zUK6KWSG)}6**+rZ&?o@PK3??uN{Q)#+bDP9i1W&j)oaU5d0bIWJ_9T5ac!qc?x66Q z$KUSZ`nYY94qfN_dpTFr8OW~A?}LD;Yty-BA)-be5Z3S#t2Io%q+cAbnGj1t$|qFR z9o?8B7OA^KjCYL=-!p}w(dkC^G6Nd%_I=1))PC0w5}ZZGJxfK)jP4Fwa@b-SYBw?% zdz9B-<`*B2dOn(N;mcTm%Do)rIvfXRNFX&1h`?>Rzuj~Wx)$p13nrDlS8-jwq@e@n zNIj_|8or==8~1h*Ih?w*8K7rYkGlwlTWAwLKc5}~dfz3y`kM&^Q|@C%1VAp_$wnw6zG~W4O+^ z>i?NY?oXf^Puc~+fDM$VgRNBpOZj{2cMP~gCqWAX4 z7>%$ux8@a&_B(pt``KSt;r+sR-$N;jdpY>|pyvPiN)9ohd*>mVST3wMo)){`B(&eX z1?zZJ-4u9NZ|~j1rdZYq4R$?swf}<6(#ex%7r{kh%U@kT)&kWuAszS%oJts=*OcL9 zaZwK<5DZw%1IFHXgFplP6JiL^dk8+SgM$D?8X+gE4172hXh!WeqIO>}$I9?Nry$*S zQ#f)RuH{P7RwA3v9f<-w>{PSzom;>(i&^l{E0(&Xp4A-*q-@{W1oE3K;1zb{&n28dSC2$N+6auXe0}e4b z)KLJ?5c*>@9K#I^)W;uU_Z`enquTUxr>mNq z1{0_puF-M7j${rs!dxxo3EelGodF1TvjV;Zpo;s{5f1pyCuRp=HDZ?s#IA4f?h|-p zGd|Mq^4hDa@Bh!c4ZE?O&x&XZ_ptZGYK4$9F4~{%R!}G1leCBx`dtNUS|K zL-7J5s4W@%mhXg1!}a4PD%!t&Qn%f_oquRajn3@C*)`o&K9o7V6DwzVMEhjVdDJ1fjhr#@=lp#@4EBqi=CCQ>73>R(>QKPNM&_Jpe5G`n4wegeC`FYEPJ{|vwS>$-`fuRSp3927qOv|NC3T3G-0 zA{K`|+tQy1yqE$ShWt8ny&5~)%ITb@^+x$w0)f&om;P8B)@}=Wzy59BwUfZ1vqw87 za2lB8J(&*l#(V}Id8SyQ0C(2amzkz3EqG&Ed0Jq1)$|&>4_|NIe=5|n=3?siFV0fI z{As5DLW^gs|B-b4C;Hd(SM-S~GQhzb>HgF2|2Usww0nL^;x@1eaB)=+Clj+$fF@H( z-fqP??~QMT$KI-#m;QC*&6vkp&8699G3)Bq0*kFZXINw=b9OVaed(3(3kS|IZ)CM? zJdnW&%t8MveBuK21uiYj)_a{Fnw0OErMzMN?d$QoPwkhOwcP&p+t>P)4tHlYw-pPN z^oJ=uc$Sl>pv@fZH~ZqxSvdhF@F1s=oZawpr^-#l{IIOGG=T%QXjtwPhIg-F@k@uIlr?J->Ia zpEUQ*=4g|XYn4Gez&aHr*;t$u3oODPmc2Ku)2Og|xjc%w;q!Zz+zY)*3{7V8bK4;& zYV82FZ+8?v)`J|G1w4I0fWdKg|2b#iaazCv;|?(W-q}$o&Y}Q5d@BRk^jL7#{kbCK zSgkyu;=DV+or2)AxCBgq-nj5=@n^`%T#V+xBGEkW4lCqrE)LMv#f;AvD__cQ@Eg3`~x| zW+h9mofSXCq5|M)9|ez(#X?-sxB%Go8};sJ?2abp(Y!lyi>k)|{M*Z$c{e1-K4ky` MPgg&ebxsLQ025IeI{*Lx literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/web/index.html b/pkgs/flutter_http_example/web/index.html new file mode 100644 index 0000000000..b0f056a01e --- /dev/null +++ b/pkgs/flutter_http_example/web/index.html @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + flutter_http_example + + + + + + + + + + diff --git a/pkgs/flutter_http_example/web/manifest.json b/pkgs/flutter_http_example/web/manifest.json new file mode 100644 index 0000000000..900ad68eb2 --- /dev/null +++ b/pkgs/flutter_http_example/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "flutter_http_example", + "short_name": "flutter_http_example", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/pkgs/flutter_http_example/windows/.gitignore b/pkgs/flutter_http_example/windows/.gitignore new file mode 100644 index 0000000000..d492d0d98c --- /dev/null +++ b/pkgs/flutter_http_example/windows/.gitignore @@ -0,0 +1,17 @@ +flutter/ephemeral/ + +# Visual Studio user-specific files. +*.suo +*.user +*.userosscache +*.sln.docstates + +# Visual Studio build-related files. +x64/ +x86/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ diff --git a/pkgs/flutter_http_example/windows/CMakeLists.txt b/pkgs/flutter_http_example/windows/CMakeLists.txt new file mode 100644 index 0000000000..434abaa0c1 --- /dev/null +++ b/pkgs/flutter_http_example/windows/CMakeLists.txt @@ -0,0 +1,102 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.14) +project(flutter_http_example 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 "flutter_http_example") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(VERSION 3.14...3.25) + +# Define build configuration option. +get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(IS_MULTICONFIG) + set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" + CACHE STRING "" FORCE) +else() + 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() +endif() +# Define settings for the Profile build mode. +set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") +set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") +set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") +set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") + +# Use Unicode for all projects. +add_definitions(-DUNICODE -D_UNICODE) + +# 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_17) + target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") + target_compile_options(${TARGET} PRIVATE /EHsc) + target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") + target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# Support files are copied into place next to the executable, so that it can +# run in place. This is done instead of making a separate bundle (as on Linux) +# so that building and running from within Visual Studio will work. +set(BUILD_BUNDLE_DIR "$") +# Make the "install" step default, as it's required to run. +set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") + +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) + +if(PLUGIN_BUNDLED_LIBRARIES) + install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +# 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. +install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + CONFIGURATIONS Profile;Release + COMPONENT Runtime) diff --git a/pkgs/flutter_http_example/windows/flutter/CMakeLists.txt b/pkgs/flutter_http_example/windows/flutter/CMakeLists.txt new file mode 100644 index 0000000000..930d2071a3 --- /dev/null +++ b/pkgs/flutter_http_example/windows/flutter/CMakeLists.txt @@ -0,0 +1,104 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.14) + +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. +set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") + +# === Flutter Library === +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") + +# 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/windows/app.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "flutter_export.h" + "flutter_windows.h" + "flutter_messenger.h" + "flutter_plugin_registrar.h" + "flutter_texture_registrar.h" +) +list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") +add_dependencies(flutter flutter_assemble) + +# === Wrapper === +list(APPEND CPP_WRAPPER_SOURCES_CORE + "core_implementations.cc" + "standard_codec.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_PLUGIN + "plugin_registrar.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_APP + "flutter_engine.cc" + "flutter_view_controller.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") + +# Wrapper sources needed for a plugin. +add_library(flutter_wrapper_plugin STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} +) +apply_standard_settings(flutter_wrapper_plugin) +set_target_properties(flutter_wrapper_plugin PROPERTIES + POSITION_INDEPENDENT_CODE ON) +set_target_properties(flutter_wrapper_plugin PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) +target_include_directories(flutter_wrapper_plugin PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_plugin flutter_assemble) + +# Wrapper sources needed for the runner. +add_library(flutter_wrapper_app STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_APP} +) +apply_standard_settings(flutter_wrapper_app) +target_link_libraries(flutter_wrapper_app PUBLIC flutter) +target_include_directories(flutter_wrapper_app PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_app 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. +set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") +set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} + ${PHONY_OUTPUT} + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" + windows-x64 $ + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} +) diff --git a/pkgs/flutter_http_example/windows/flutter/generated_plugin_registrant.cc b/pkgs/flutter_http_example/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000000..8b6d4680af --- /dev/null +++ b/pkgs/flutter_http_example/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void RegisterPlugins(flutter::PluginRegistry* registry) { +} diff --git a/pkgs/flutter_http_example/windows/flutter/generated_plugin_registrant.h b/pkgs/flutter_http_example/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000000..dc139d85a9 --- /dev/null +++ b/pkgs/flutter_http_example/windows/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void RegisterPlugins(flutter::PluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/pkgs/flutter_http_example/windows/flutter/generated_plugins.cmake b/pkgs/flutter_http_example/windows/flutter/generated_plugins.cmake new file mode 100644 index 0000000000..b93c4c30c1 --- /dev/null +++ b/pkgs/flutter_http_example/windows/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}/windows 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}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/pkgs/flutter_http_example/windows/runner/CMakeLists.txt b/pkgs/flutter_http_example/windows/runner/CMakeLists.txt new file mode 100644 index 0000000000..394917c053 --- /dev/null +++ b/pkgs/flutter_http_example/windows/runner/CMakeLists.txt @@ -0,0 +1,40 @@ +cmake_minimum_required(VERSION 3.14) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, 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} WIN32 + "flutter_window.cpp" + "main.cpp" + "utils.cpp" + "win32_window.cpp" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" + "Runner.rc" + "runner.exe.manifest" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the build version. +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") + +# Disable Windows macros that collide with C++ standard library functions. +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") + +# Add dependency libraries and include directories. Add any application-specific +# dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) +target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/pkgs/flutter_http_example/windows/runner/Runner.rc b/pkgs/flutter_http_example/windows/runner/Runner.rc new file mode 100644 index 0000000000..62d99f8b07 --- /dev/null +++ b/pkgs/flutter_http_example/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#pragma code_page(65001) +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "resources\\app_icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD +#else +#define VERSION_AS_NUMBER 1,0,0,0 +#endif + +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "com.example" "\0" + VALUE "FileDescription", "flutter_http_example" "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "flutter_http_example" "\0" + VALUE "LegalCopyright", "Copyright (C) 2023 com.example. All rights reserved." "\0" + VALUE "OriginalFilename", "flutter_http_example.exe" "\0" + VALUE "ProductName", "flutter_http_example" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/pkgs/flutter_http_example/windows/runner/flutter_window.cpp b/pkgs/flutter_http_example/windows/runner/flutter_window.cpp new file mode 100644 index 0000000000..955ee3038f --- /dev/null +++ b/pkgs/flutter_http_example/windows/runner/flutter_window.cpp @@ -0,0 +1,71 @@ +#include "flutter_window.h" + +#include + +#include "flutter/generated_plugin_registrant.h" + +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} + +FlutterWindow::~FlutterWindow() {} + +bool FlutterWindow::OnCreate() { + if (!Win32Window::OnCreate()) { + return false; + } + + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique( + frame.right - frame.left, frame.bottom - frame.top, project_); + // Ensure that basic setup of the controller was successful. + if (!flutter_controller_->engine() || !flutter_controller_->view()) { + return false; + } + RegisterPlugins(flutter_controller_->engine()); + SetChildContent(flutter_controller_->view()->GetNativeWindow()); + + flutter_controller_->engine()->SetNextFrameCallback([&]() { + this->Show(); + }); + + // Flutter can complete the first frame before the "show window" callback is + // registered. The following call ensures a frame is pending to ensure the + // window is shown. It is a no-op if the first frame hasn't completed yet. + flutter_controller_->ForceRedraw(); + + return true; +} + +void FlutterWindow::OnDestroy() { + if (flutter_controller_) { + flutter_controller_ = nullptr; + } + + Win32Window::OnDestroy(); +} + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/pkgs/flutter_http_example/windows/runner/flutter_window.h b/pkgs/flutter_http_example/windows/runner/flutter_window.h new file mode 100644 index 0000000000..6da0652f05 --- /dev/null +++ b/pkgs/flutter_http_example/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ + +#include +#include + +#include + +#include "win32_window.h" + +// A window that does nothing but host a Flutter view. +class FlutterWindow : public Win32Window { + public: + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); + virtual ~FlutterWindow(); + + protected: + // Win32Window: + bool OnCreate() override; + void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; + + private: + // The project to run. + flutter::DartProject project_; + + // The Flutter instance hosted by this window. + std::unique_ptr flutter_controller_; +}; + +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/pkgs/flutter_http_example/windows/runner/main.cpp b/pkgs/flutter_http_example/windows/runner/main.cpp new file mode 100644 index 0000000000..9924ed3777 --- /dev/null +++ b/pkgs/flutter_http_example/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +#include "flutter_window.h" +#include "utils.h" + +int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, + _In_ wchar_t *command_line, _In_ int show_command) { + // Attach to console when present (e.g., 'flutter run') or create a + // new console when running with a debugger. + if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { + CreateAndAttachConsole(); + } + + // Initialize COM, so that it is available for use in the library and/or + // plugins. + ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + + flutter::DartProject project(L"data"); + + std::vector command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(1280, 720); + if (!window.Create(L"flutter_http_example", origin, size)) { + return EXIT_FAILURE; + } + window.SetQuitOnClose(true); + + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + + ::CoUninitialize(); + return EXIT_SUCCESS; +} diff --git a/pkgs/flutter_http_example/windows/runner/resource.h b/pkgs/flutter_http_example/windows/runner/resource.h new file mode 100644 index 0000000000..66a65d1e4a --- /dev/null +++ b/pkgs/flutter_http_example/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Runner.rc +// +#define IDI_APP_ICON 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/pkgs/flutter_http_example/windows/runner/resources/app_icon.ico b/pkgs/flutter_http_example/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..c04e20caf6370ebb9253ad831cc31de4a9c965f6 GIT binary patch literal 33772 zcmeHQc|26z|35SKE&G-*mXah&B~fFkXr)DEO&hIfqby^T&>|8^_Ub8Vp#`BLl3lbZ zvPO!8k!2X>cg~Elr=IVxo~J*a`+9wR=A83c-k-DFd(XM&UI1VKCqM@V;DDtJ09WB} zRaHKiW(GT00brH|0EeTeKVbpbGZg?nK6-j827q-+NFM34gXjqWxJ*a#{b_apGN<-L_m3#8Z26atkEn& ze87Bvv^6vVmM+p+cQ~{u%=NJF>#(d;8{7Q{^rWKWNtf14H}>#&y7$lqmY6xmZryI& z($uy?c5-+cPnt2%)R&(KIWEXww>Cnz{OUpT>W$CbO$h1= z#4BPMkFG1Y)x}Ui+WXr?Z!w!t_hjRq8qTaWpu}FH{MsHlU{>;08goVLm{V<&`itk~ zE_Ys=D(hjiy+5=?=$HGii=Y5)jMe9|wWoD_K07(}edAxh`~LBorOJ!Cf@f{_gNCC| z%{*04ViE!#>@hc1t5bb+NO>ncf@@Dv01K!NxH$3Eg1%)|wLyMDF8^d44lV!_Sr}iEWefOaL z8f?ud3Q%Sen39u|%00W<#!E=-RpGa+H8}{ulxVl4mwpjaU+%2pzmi{3HM)%8vb*~-M9rPUAfGCSos8GUXp02|o~0BTV2l#`>>aFV&_P$ejS;nGwSVP8 zMbOaG7<7eKD>c12VdGH;?2@q7535sa7MN*L@&!m?L`ASG%boY7(&L5imY#EQ$KrBB z4@_tfP5m50(T--qv1BJcD&aiH#b-QC>8#7Fx@3yXlonJI#aEIi=8&ChiVpc#N=5le zM*?rDIdcpawoc5kizv$GEjnveyrp3sY>+5_R5;>`>erS%JolimF=A^EIsAK zsPoVyyUHCgf0aYr&alx`<)eb6Be$m&`JYSuBu=p8j%QlNNp$-5C{b4#RubPb|CAIS zGE=9OFLP7?Hgc{?k45)84biT0k&-C6C%Q}aI~q<(7BL`C#<6HyxaR%!dFx7*o^laG z=!GBF^cwK$IA(sn9y6>60Rw{mYRYkp%$jH z*xQM~+bp)G$_RhtFPYx2HTsWk80+p(uqv9@I9)y{b$7NK53rYL$ezbmRjdXS?V}fj zWxX_feWoLFNm3MG7pMUuFPs$qrQWO9!l2B(SIuy2}S|lHNbHzoE+M2|Zxhjq9+Ws8c{*}x^VAib7SbxJ*Q3EnY5lgI9 z=U^f3IW6T=TWaVj+2N%K3<%Un;CF(wUp`TC&Y|ZjyFu6co^uqDDB#EP?DV5v_dw~E zIRK*BoY9y-G_ToU2V_XCX4nJ32~`czdjT!zwme zGgJ0nOk3U4@IE5JwtM}pwimLjk{ln^*4HMU%Fl4~n(cnsLB}Ja-jUM>xIB%aY;Nq8 z)Fp8dv1tkqKanv<68o@cN|%thj$+f;zGSO7H#b+eMAV8xH$hLggtt?O?;oYEgbq@= zV(u9bbd12^%;?nyk6&$GPI%|+<_mEpJGNfl*`!KV;VfmZWw{n{rnZ51?}FDh8we_L z8OI9nE31skDqJ5Oa_ybn7|5@ui>aC`s34p4ZEu6-s!%{uU45$Zd1=p$^^dZBh zu<*pDDPLW+c>iWO$&Z_*{VSQKg7=YEpS3PssPn1U!lSm6eZIho*{@&20e4Y_lRklKDTUCKI%o4Pc<|G^Xgu$J^Q|B87U;`c1zGwf^-zH*VQ^x+i^OUWE0yd z;{FJq)2w!%`x7yg@>uGFFf-XJl4H`YtUG%0slGKOlXV`q?RP>AEWg#x!b{0RicxGhS!3$p7 zij;{gm!_u@D4$Ox%>>bPtLJ> zwKtYz?T_DR1jN>DkkfGU^<#6sGz|~p*I{y`aZ>^Di#TC|Z!7j_O1=Wo8thuit?WxR zh9_S>kw^{V^|g}HRUF=dcq>?q(pHxw!8rx4dC6vbQVmIhmICF#zU!HkHpQ>9S%Uo( zMw{eC+`&pb=GZRou|3;Po1}m46H6NGd$t<2mQh}kaK-WFfmj_66_17BX0|j-E2fe3Jat}ijpc53 zJV$$;PC<5aW`{*^Z6e5##^`Ed#a0nwJDT#Qq~^e8^JTA=z^Kl>La|(UQ!bI@#ge{Dzz@61p-I)kc2?ZxFt^QQ}f%ldLjO*GPj(5)V9IyuUakJX=~GnTgZ4$5!3E=V#t`yOG4U z(gphZB6u2zsj=qNFLYShhg$}lNpO`P9xOSnO*$@@UdMYES*{jJVj|9z-}F^riksLK zbsU+4-{281P9e2UjY6tse^&a)WM1MFw;p#_dHhWI7p&U*9TR0zKdVuQed%6{otTsq z$f~S!;wg#Bd9kez=Br{m|66Wv z#g1xMup<0)H;c2ZO6su_ii&m8j&+jJz4iKnGZ&wxoQX|5a>v&_e#6WA!MB_4asTxLRGQCC5cI(em z%$ZfeqP>!*q5kU>a+BO&ln=4Jm>Ef(QE8o&RgLkk%2}4Tf}U%IFP&uS7}&|Q-)`5< z+e>;s#4cJ-z%&-^&!xsYx777Wt(wZY9(3(avmr|gRe4cD+a8&!LY`1^T?7x{E<=kdY9NYw>A;FtTvQ=Y&1M%lyZPl$ss1oY^Sl8we}n}Aob#6 zl4jERwnt9BlSoWb@3HxYgga(752Vu6Y)k4yk9u~Kw>cA5&LHcrvn1Y-HoIuFWg~}4 zEw4bR`mXZQIyOAzo)FYqg?$5W<;^+XX%Uz61{-L6@eP|lLH%|w?g=rFc;OvEW;^qh z&iYXGhVt(G-q<+_j}CTbPS_=K>RKN0&;dubh0NxJyDOHFF;<1k!{k#7b{|Qok9hac z;gHz}6>H6C6RnB`Tt#oaSrX0p-j-oRJ;_WvS-qS--P*8}V943RT6kou-G=A+7QPGQ z!ze^UGxtW3FC0$|(lY9^L!Lx^?Q8cny(rR`es5U;-xBhphF%_WNu|aO<+e9%6LuZq zt(0PoagJG<%hyuf;te}n+qIl_Ej;czWdc{LX^pS>77s9t*2b4s5dvP_!L^3cwlc)E!(!kGrg~FescVT zZCLeua3f4;d;Tk4iXzt}g}O@nlK3?_o91_~@UMIl?@77Qc$IAlLE95#Z=TES>2E%z zxUKpK{_HvGF;5%Q7n&vA?`{%8ohlYT_?(3A$cZSi)MvIJygXD}TS-3UwyUxGLGiJP znblO~G|*uA^|ac8E-w#}uBtg|s_~s&t>-g0X%zIZ@;o_wNMr_;{KDg^O=rg`fhDZu zFp(VKd1Edj%F zWHPl+)FGj%J1BO3bOHVfH^3d1F{)*PL&sRX`~(-Zy3&9UQX)Z;c51tvaI2E*E7!)q zcz|{vpK7bjxix(k&6=OEIBJC!9lTkUbgg?4-yE{9+pFS)$Ar@vrIf`D0Bnsed(Cf? zObt2CJ>BKOl>q8PyFO6w)+6Iz`LW%T5^R`U_NIW0r1dWv6OY=TVF?N=EfA(k(~7VBW(S;Tu5m4Lg8emDG-(mOSSs=M9Q&N8jc^Y4&9RqIsk(yO_P(mcCr}rCs%1MW1VBrn=0-oQN(Xj!k%iKV zb%ricBF3G4S1;+8lzg5PbZ|$Se$)I=PwiK=cDpHYdov2QO1_a-*dL4KUi|g&oh>(* zq$<`dQ^fat`+VW?m)?_KLn&mp^-@d=&7yGDt<=XwZZC=1scwxO2^RRI7n@g-1o8ps z)&+et_~)vr8aIF1VY1Qrq~Xe``KJrQSnAZ{CSq3yP;V*JC;mmCT6oRLSs7=GA?@6g zUooM}@tKtx(^|aKK8vbaHlUQqwE0}>j&~YlN3H#vKGm@u)xxS?n9XrOWUfCRa< z`20Fld2f&;gg7zpo{Adh+mqNntMc-D$N^yWZAZRI+u1T1zWHPxk{+?vcS1D>08>@6 zLhE@`gt1Y9mAK6Z4p|u(5I%EkfU7rKFSM=E4?VG9tI;a*@?6!ey{lzN5=Y-!$WFSe z&2dtO>^0@V4WRc#L&P%R(?@KfSblMS+N+?xUN$u3K4Ys%OmEh+tq}fnU}i>6YHM?< zlnL2gl~sF!j!Y4E;j3eIU-lfa`RsOL*Tt<%EFC0gPzoHfNWAfKFIKZN8}w~(Yi~=q z>=VNLO2|CjkxP}RkutxjV#4fWYR1KNrPYq5ha9Wl+u>ipsk*I(HS@iLnmGH9MFlTU zaFZ*KSR0px>o+pL7BbhB2EC1%PJ{67_ z#kY&#O4@P=OV#-79y_W>Gv2dxL*@G7%LksNSqgId9v;2xJ zrh8uR!F-eU$NMx@S*+sk=C~Dxr9Qn7TfWnTupuHKuQ$;gGiBcU>GF5sWx(~4IP3`f zWE;YFO*?jGwYh%C3X<>RKHC-DZ!*r;cIr}GLOno^3U4tFSSoJp%oHPiSa%nh=Zgn% z14+8v@ygy0>UgEN1bczD6wK45%M>psM)y^)IfG*>3ItX|TzV*0i%@>L(VN!zdKb8S?Qf7BhjNpziA zR}?={-eu>9JDcl*R=OP9B8N$IcCETXah9SUDhr{yrld{G;PnCWRsPD7!eOOFBTWUQ=LrA_~)mFf&!zJX!Oc-_=kT<}m|K52 z)M=G#;p;Rdb@~h5D{q^K;^fX-m5V}L%!wVC2iZ1uu401Ll}#rocTeK|7FAeBRhNdQ zCc2d^aQnQp=MpOmak60N$OgS}a;p(l9CL`o4r(e-nN}mQ?M&isv-P&d$!8|1D1I(3-z!wi zTgoo)*Mv`gC?~bm?S|@}I|m-E2yqPEvYybiD5azInexpK8?9q*$9Yy9-t%5jU8~ym zgZDx>!@ujQ=|HJnwp^wv-FdD{RtzO9SnyfB{mH_(c!jHL*$>0o-(h(eqe*ZwF6Lvu z{7rkk%PEqaA>o+f{H02tzZ@TWy&su?VNw43! z-X+rN`6llvpUms3ZiSt)JMeztB~>9{J8SPmYs&qohxdYFi!ra8KR$35Zp9oR)eFC4 zE;P31#3V)n`w$fZ|4X-|%MX`xZDM~gJyl2W;O$H25*=+1S#%|53>|LyH za@yh+;325%Gq3;J&a)?%7X%t@WXcWL*BaaR*7UEZad4I8iDt7^R_Fd`XeUo256;sAo2F!HcIQKk;h})QxEsPE5BcKc7WyerTchgKmrfRX z!x#H_%cL#B9TWAqkA4I$R^8{%do3Y*&(;WFmJ zU7Dih{t1<{($VtJRl9|&EB?|cJ)xse!;}>6mSO$o5XIx@V|AA8ZcoD88ZM?C*;{|f zZVmf94_l1OmaICt`2sTyG!$^UeTHx9YuUP!omj(r|7zpm5475|yXI=rR>>fteLI+| z)MoiGho0oEt=*J(;?VY0QzwCqw@cVm?d7Y!z0A@u#H?sCJ*ecvyhj& z-F77lO;SH^dmf?L>3i>?Z*U}Em4ZYV_CjgfvzYsRZ+1B!Uo6H6mbS<-FFL`ytqvb& zE7+)2ahv-~dz(Hs+f})z{*4|{)b=2!RZK;PWwOnO=hG7xG`JU5>bAvUbdYd_CjvtHBHgtGdlO+s^9ca^Bv3`t@VRX2_AD$Ckg36OcQRF zXD6QtGfHdw*hx~V(MV-;;ZZF#dJ-piEF+s27z4X1qi5$!o~xBnvf=uopcn7ftfsZc zy@(PuOk`4GL_n(H9(E2)VUjqRCk9kR?w)v@xO6Jm_Mx})&WGEl=GS0#)0FAq^J*o! zAClhvoTsNP*-b~rN{8Yym3g{01}Ep^^Omf=SKqvN?{Q*C4HNNAcrowIa^mf+3PRy! z*_G-|3i8a;+q;iP@~Of_$(vtFkB8yOyWt2*K)vAn9El>=D;A$CEx6b*XF@4y_6M+2 zpeW`RHoI_p(B{%(&jTHI->hmNmZjHUj<@;7w0mx3&koy!2$@cfX{sN19Y}euYJFn& z1?)+?HCkD0MRI$~uB2UWri})0bru_B;klFdwsLc!ne4YUE;t41JqfG# zZJq6%vbsdx!wYeE<~?>o4V`A3?lN%MnKQ`z=uUivQN^vzJ|C;sdQ37Qn?;lpzg})y z)_2~rUdH}zNwX;Tp0tJ78+&I=IwOQ-fl30R79O8@?Ub8IIA(6I`yHn%lARVL`%b8+ z4$8D-|MZZWxc_)vu6@VZN!HsI$*2NOV&uMxBNzIbRgy%ob_ zhwEH{J9r$!dEix9XM7n&c{S(h>nGm?el;gaX0@|QnzFD@bne`el^CO$yXC?BDJ|Qg z+y$GRoR`?ST1z^e*>;!IS@5Ovb7*RlN>BV_UC!7E_F;N#ky%1J{+iixp(dUJj93aK zzHNN>R-oN7>kykHClPnoPTIj7zc6KM(Pnlb(|s??)SMb)4!sMHU^-ntJwY5Big7xv zb1Ew`Xj;|D2kzGja*C$eS44(d&RMU~c_Y14V9_TLTz0J#uHlsx`S6{nhsA0dWZ#cG zJ?`fO50E>*X4TQLv#nl%3GOk*UkAgt=IY+u0LNXqeln3Z zv$~&Li`ZJOKkFuS)dJRA>)b_Da%Q~axwA_8zNK{BH{#}#m}zGcuckz}riDE-z_Ms> zR8-EqAMcfyGJCtvTpaUVQtajhUS%c@Yj}&6Zz;-M7MZzqv3kA7{SuW$oW#=0az2wQ zg-WG@Vb4|D`pl~Il54N7Hmsauc_ne-a!o5#j3WaBBh@Wuefb!QJIOn5;d)%A#s+5% zuD$H=VNux9bE-}1&bcYGZ+>1Fo;3Z@e&zX^n!?JK*adSbONm$XW9z;Q^L>9U!}Toj2WdafJ%oL#h|yWWwyAGxzfrAWdDTtaKl zK4`5tDpPg5>z$MNv=X0LZ0d6l%D{(D8oT@+w0?ce$DZ6pv>{1&Ok67Ix1 zH}3=IEhPJEhItCC8E=`T`N5(k?G=B4+xzZ?<4!~ ze~z6Wk9!CHTI(0rLJ4{JU?E-puc;xusR?>G?;4vt;q~iI9=kDL=z0Rr%O$vU`30X$ zDZRFyZ`(omOy@u|i6h;wtJlP;+}$|Ak|k2dea7n?U1*$T!sXqqOjq^NxLPMmk~&qI zYg0W?yK8T(6+Ea+$YyspKK?kP$+B`~t3^Pib_`!6xCs32!i@pqXfFV6PmBIR<-QW= zN8L{pt0Vap0x`Gzn#E@zh@H)0FfVfA_Iu4fjYZ+umO1LXIbVc$pY+E234u)ttcrl$ z>s92z4vT%n6cMb>=XT6;l0+9e(|CZG)$@C7t7Z7Ez@a)h)!hyuV&B5K%%)P5?Lk|C zZZSVzdXp{@OXSP0hoU-gF8s8Um(#xzjP2Vem zec#-^JqTa&Y#QJ>-FBxd7tf`XB6e^JPUgagB8iBSEps;92KG`!#mvVcPQ5yNC-GEG zTiHEDYfH+0O15}r^+ z#jxj=@x8iNHWALe!P3R67TwmhItn**0JwnzSV2O&KE8KcT+0hWH^OPD1pwiuyx=b@ zNf5Jh0{9X)8;~Es)$t@%(3!OnbY+`@?i{mGX7Yy}8T_*0a6g;kaFPq;*=px5EhO{Cp%1kI<0?*|h8v!6WnO3cCJRF2-CRrU3JiLJnj@6;L)!0kWYAc_}F{2P))3HmCrz zQ&N&gE70;`!6*eJ4^1IR{f6j4(-l&X!tjHxkbHA^Zhrnhr9g{exN|xrS`5Pq=#Xf& zG%P=#ra-TyVFfgW%cZo5OSIwFL9WtXAlFOa+ubmI5t*3=g#Y zF%;70p5;{ZeFL}&}yOY1N1*Q;*<(kTB!7vM$QokF)yr2FlIU@$Ph58$Bz z0J?xQG=MlS4L6jA22eS42g|9*9pX@$#*sUeM(z+t?hr@r5J&D1rx}2pW&m*_`VDCW zUYY@v-;bAO0HqoAgbbiGGC<=ryf96}3pouhy3XJrX+!!u*O_>Si38V{uJmQ&USptX zKp#l(?>%^7;2%h(q@YWS#9;a!JhKlkR#Vd)ERILlgu!Hr@jA@V;sk4BJ-H#p*4EqC zDGjC*tl=@3Oi6)Bn^QwFpul18fpkbpg0+peH$xyPBqb%`$OUhPKyWb32o7clB*9Z< zN=i~NLjavrLtwgJ01bufP+>p-jR2I95|TpmKpQL2!oV>g(4RvS2pK4*ou%m(h6r3A zX#s&`9LU1ZG&;{CkOK!4fLDTnBys`M!vuz>Q&9OZ0hGQl!~!jSDg|~s*w52opC{sB ze|Cf2luD(*G13LcOAGA!s2FjSK8&IE5#W%J25w!vM0^VyQM!t)inj&RTiJ!wXzFgz z3^IqzB7I0L$llljsGq})thBy9UOyjtFO_*hYM_sgcMk>44jeH0V1FDyELc{S1F-;A zS;T^k^~4biG&V*Irq}O;e}j$$+E_#G?HKIn05iP3j|87TkGK~SqG!-KBg5+mN(aLm z8ybhIM`%C19UX$H$KY6JgXbY$0AT%rEpHC;u`rQ$Y=rxUdsc5*Kvc8jaYaO$^)cI6){P6K0r)I6DY4Wr4&B zLQUBraey#0HV|&c4v7PVo3n$zHj99(TZO^3?Ly%C4nYvJTL9eLBLHsM3WKKD>5!B` zQ=BsR3aR6PD(Fa>327E2HAu5TM~Wusc!)>~(gM)+3~m;92Jd;FnSib=M5d6;;5{%R zb4V7DEJ0V!CP-F*oU?gkc>ksUtAYP&V4ND5J>J2^jt*vcFflQWCrB&fLdT%O59PVJ zhid#toR=FNgD!q3&r8#wEBr`!wzvQu5zX?Q>nlSJ4i@WC*CN*-xU66F^V5crWevQ9gsq$I@z1o(a=k7LL~ z7m_~`o;_Ozha1$8Q}{WBehvAlO4EL60y5}8GDrZ< zXh&F}71JbW2A~8KfEWj&UWV#4+Z4p`b{uAj4&WC zha`}X@3~+Iz^WRlOHU&KngK>#j}+_o@LdBC1H-`gT+krWX3-;!)6?{FBp~%20a}FL zFP9%Emqcwa#(`=G>BBZ0qZDQhmZKJg_g8<=bBFKWr!dyg(YkpE+|R*SGpDVU!+VlU zFC54^DLv}`qa%49T>nNiA9Q7Ips#!Xx90tCU2gvK`(F+GPcL=J^>No{)~we#o@&mUb6c$ zCc*<|NJBk-#+{j9xkQ&ujB zI~`#kN~7W!f*-}wkG~Ld!JqZ@tK}eeSnsS5J1fMFXm|`LJx&}5`@dK3W^7#Wnm+_P zBZkp&j1fa2Y=eIjJ0}gh85jt43kaIXXv?xmo@eHrka!Z|vQv12HN#+!I5E z`(fbuW>gFiJL|uXJ!vKt#z3e3HlVdboH7;e#i3(2<)Fg-I@BR!qY#eof3MFZ&*Y@l zI|KJf&ge@p2Dq09Vu$$Qxb7!}{m-iRk@!)%KL)txi3;~Z4Pb}u@GsW;ELiWeG9V51 znX#}B&4Y2E7-H=OpNE@q{%hFLxwIpBF2t{vPREa8_{linXT;#1vMRWjOzLOP$-hf( z>=?$0;~~PnkqY;~K{EM6Vo-T(0K{A0}VUGmu*hR z{tw3hvBN%N3G3Yw`X5Te+F{J`(3w1s3-+1EbnFQKcrgrX1Jqvs@ADGe%M0s$EbK$$ zK)=y=upBc6SjGYAACCcI=Y*6Fi8_jgwZlLxD26fnQfJmb8^gHRN5(TemhX@0e=vr> zg`W}6U>x6VhoA3DqsGGD9uL1DhB3!OXO=k}59TqD@(0Nb{)Ut_luTioK_>7wjc!5C zIr@w}b`Fez3)0wQfKl&bae7;PcTA7%?f2xucM0G)wt_KO!Ewx>F~;=BI0j=Fb4>pp zv}0R^xM4eti~+^+gE$6b81p(kwzuDti(-K9bc|?+pJEl@H+jSYuxZQV8rl8 zjp@M{#%qItIUFN~KcO9Hed*`$5A-2~pAo~K&<-Q+`9`$CK>rzqAI4w~$F%vs9s{~x zg4BP%Gy*@m?;D6=SRX?888Q6peF@_4Z->8wAH~Cn!R$|Hhq2cIzFYqT_+cDourHbY z0qroxJnrZ4Gh+Ay+F`_c%+KRT>y3qw{)89?=hJ@=KO=@ep)aBJ$c!JHfBMJpsP*3G za7|)VJJ8B;4?n{~ldJF7%jmb`-ftIvNd~ekoufG(`K(3=LNc;HBY& z(lp#q8XAD#cIf}k49zX_i`*fO+#!zKA&%T3j@%)R+#yag067CU%yUEe47>wzGU8^` z1EXFT^@I!{J!F8!X?S6ph8J=gUi5tl93*W>7}_uR<2N2~e}FaG?}KPyugQ=-OGEZs z!GBoyYY+H*ANn4?Z)X4l+7H%`17i5~zRlRIX?t)6_eu=g2Q`3WBhxSUeea+M-S?RL zX9oBGKn%a!H+*hx4d2(I!gsi+@SQK%<{X22M~2tMulJoa)0*+z9=-YO+;DFEm5eE1U9b^B(Z}2^9!Qk`!A$wUE z7$Ar5?NRg2&G!AZqnmE64eh^Anss3i!{}%6@Et+4rr!=}!SBF8eZ2*J3ujCWbl;3; z48H~goPSv(8X61fKKdpP!Z7$88NL^Z?j`!^*I?-P4X^pMxyWz~@$(UeAcTSDd(`vO z{~rc;9|GfMJcApU3k}22a!&)k4{CU!e_ny^Y3cO;tOvOMKEyWz!vG(Kp*;hB?d|R3`2X~=5a6#^o5@qn?J-bI8Ppip{-yG z!k|VcGsq!jF~}7DMr49Wap-s&>o=U^T0!Lcy}!(bhtYsPQy z4|EJe{12QL#=c(suQ89Mhw9<`bui%nx7Nep`C&*M3~vMEACmcRYYRGtANq$F%zh&V zc)cEVeHz*Z1N)L7k-(k3np#{GcDh2Q@ya0YHl*n7fl*ZPAsbU-a94MYYtA#&!c`xGIaV;yzsmrjfieTEtqB_WgZp2*NplHx=$O{M~2#i_vJ{ps-NgK zQsxKK_CBM2PP_je+Xft`(vYfXXgIUr{=PA=7a8`2EHk)Ym2QKIforz# tySWtj{oF3N9@_;i*Fv5S)9x^z=nlWP>jpp-9)52ZmLVA=i*%6g{{fxOO~wEK literal 0 HcmV?d00001 diff --git a/pkgs/flutter_http_example/windows/runner/runner.exe.manifest b/pkgs/flutter_http_example/windows/runner/runner.exe.manifest new file mode 100644 index 0000000000..a42ea7687c --- /dev/null +++ b/pkgs/flutter_http_example/windows/runner/runner.exe.manifest @@ -0,0 +1,20 @@ + + + + + PerMonitorV2 + + + + + + + + + + + + + + + diff --git a/pkgs/flutter_http_example/windows/runner/utils.cpp b/pkgs/flutter_http_example/windows/runner/utils.cpp new file mode 100644 index 0000000000..b2b08734db --- /dev/null +++ b/pkgs/flutter_http_example/windows/runner/utils.cpp @@ -0,0 +1,65 @@ +#include "utils.h" + +#include +#include +#include +#include + +#include + +void CreateAndAttachConsole() { + if (::AllocConsole()) { + FILE *unused; + if (freopen_s(&unused, "CONOUT$", "w", stdout)) { + _dup2(_fileno(stdout), 1); + } + if (freopen_s(&unused, "CONOUT$", "w", stderr)) { + _dup2(_fileno(stdout), 2); + } + std::ios::sync_with_stdio(); + FlutterDesktopResyncOutputStreams(); + } +} + +std::vector GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector(); + } + + std::vector command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, nullptr, 0, nullptr, nullptr) + -1; // remove the trailing null character + int input_length = (int)wcslen(utf16_string); + std::string utf8_string; + if (target_length <= 0 || target_length > utf8_string.max_size()) { + return utf8_string; + } + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + input_length, utf8_string.data(), target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/pkgs/flutter_http_example/windows/runner/utils.h b/pkgs/flutter_http_example/windows/runner/utils.h new file mode 100644 index 0000000000..3879d54755 --- /dev/null +++ b/pkgs/flutter_http_example/windows/runner/utils.h @@ -0,0 +1,19 @@ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include +#include + +// Creates a console for the process, and redirects stdout and stderr to +// it for both the runner and the Flutter library. +void CreateAndAttachConsole(); + +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector, +// encoded in UTF-8. Returns an empty std::vector on failure. +std::vector GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/pkgs/flutter_http_example/windows/runner/win32_window.cpp b/pkgs/flutter_http_example/windows/runner/win32_window.cpp new file mode 100644 index 0000000000..60608d0fe5 --- /dev/null +++ b/pkgs/flutter_http_example/windows/runner/win32_window.cpp @@ -0,0 +1,288 @@ +#include "win32_window.h" + +#include +#include + +#include "resource.h" + +namespace { + +/// Window attribute that enables dark mode window decorations. +/// +/// Redefined in case the developer's machine has a Windows SDK older than +/// version 10.0.22000.0. +/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute +#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE +#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 +#endif + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +/// Registry key for app theme preference. +/// +/// A value of 0 indicates apps should use dark mode. A non-zero or missing +/// value indicates apps should use light mode. +constexpr const wchar_t kGetPreferredBrightnessRegKey[] = + L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; +constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; + +// The number of Win32Window objects that currently exist. +static int g_active_window_count = 0; + +using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); + +// Scale helper to convert logical scaler values to physical using passed in +// scale factor +int Scale(int source, double scale_factor) { + return static_cast(source * scale_factor); +} + +// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. +// This API is only needed for PerMonitor V1 awareness mode. +void EnableFullDpiSupportIfAvailable(HWND hwnd) { + HMODULE user32_module = LoadLibraryA("User32.dll"); + if (!user32_module) { + return; + } + auto enable_non_client_dpi_scaling = + reinterpret_cast( + GetProcAddress(user32_module, "EnableNonClientDpiScaling")); + if (enable_non_client_dpi_scaling != nullptr) { + enable_non_client_dpi_scaling(hwnd); + } + FreeLibrary(user32_module); +} + +} // namespace + +// Manages the Win32Window's window class registration. +class WindowClassRegistrar { + public: + ~WindowClassRegistrar() = default; + + // Returns the singleton registrar instance. + static WindowClassRegistrar* GetInstance() { + if (!instance_) { + instance_ = new WindowClassRegistrar(); + } + return instance_; + } + + // Returns the name of the window class, registering the class if it hasn't + // previously been registered. + const wchar_t* GetWindowClass(); + + // Unregisters the window class. Should only be called if there are no + // instances of the window. + void UnregisterWindowClass(); + + private: + WindowClassRegistrar() = default; + + static WindowClassRegistrar* instance_; + + bool class_registered_ = false; +}; + +WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; + +const wchar_t* WindowClassRegistrar::GetWindowClass() { + if (!class_registered_) { + WNDCLASS window_class{}; + window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); + window_class.lpszClassName = kWindowClassName; + window_class.style = CS_HREDRAW | CS_VREDRAW; + window_class.cbClsExtra = 0; + window_class.cbWndExtra = 0; + window_class.hInstance = GetModuleHandle(nullptr); + window_class.hIcon = + LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + window_class.hbrBackground = 0; + window_class.lpszMenuName = nullptr; + window_class.lpfnWndProc = Win32Window::WndProc; + RegisterClass(&window_class); + class_registered_ = true; + } + return kWindowClassName; +} + +void WindowClassRegistrar::UnregisterWindowClass() { + UnregisterClass(kWindowClassName, nullptr); + class_registered_ = false; +} + +Win32Window::Win32Window() { + ++g_active_window_count; +} + +Win32Window::~Win32Window() { + --g_active_window_count; + Destroy(); +} + +bool Win32Window::Create(const std::wstring& title, + const Point& origin, + const Size& size) { + Destroy(); + + const wchar_t* window_class = + WindowClassRegistrar::GetInstance()->GetWindowClass(); + + const POINT target_point = {static_cast(origin.x), + static_cast(origin.y)}; + HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); + UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); + double scale_factor = dpi / 96.0; + + HWND window = CreateWindow( + window_class, title.c_str(), WS_OVERLAPPEDWINDOW, + Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), + Scale(size.width, scale_factor), Scale(size.height, scale_factor), + nullptr, nullptr, GetModuleHandle(nullptr), this); + + if (!window) { + return false; + } + + UpdateTheme(window); + + return OnCreate(); +} + +bool Win32Window::Show() { + return ShowWindow(window_handle_, SW_SHOWNORMAL); +} + +// static +LRESULT CALLBACK Win32Window::WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + if (message == WM_NCCREATE) { + auto window_struct = reinterpret_cast(lparam); + SetWindowLongPtr(window, GWLP_USERDATA, + reinterpret_cast(window_struct->lpCreateParams)); + + auto that = static_cast(window_struct->lpCreateParams); + EnableFullDpiSupportIfAvailable(window); + that->window_handle_ = window; + } else if (Win32Window* that = GetThisFromHandle(window)) { + return that->MessageHandler(window, message, wparam, lparam); + } + + return DefWindowProc(window, message, wparam, lparam); +} + +LRESULT +Win32Window::MessageHandler(HWND hwnd, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + switch (message) { + case WM_DESTROY: + window_handle_ = nullptr; + Destroy(); + if (quit_on_close_) { + PostQuitMessage(0); + } + return 0; + + case WM_DPICHANGED: { + auto newRectSize = reinterpret_cast(lparam); + LONG newWidth = newRectSize->right - newRectSize->left; + LONG newHeight = newRectSize->bottom - newRectSize->top; + + SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, + newHeight, SWP_NOZORDER | SWP_NOACTIVATE); + + return 0; + } + case WM_SIZE: { + RECT rect = GetClientArea(); + if (child_content_ != nullptr) { + // Size and position the child window. + MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, + rect.bottom - rect.top, TRUE); + } + return 0; + } + + case WM_ACTIVATE: + if (child_content_ != nullptr) { + SetFocus(child_content_); + } + return 0; + + case WM_DWMCOLORIZATIONCOLORCHANGED: + UpdateTheme(hwnd); + return 0; + } + + return DefWindowProc(window_handle_, message, wparam, lparam); +} + +void Win32Window::Destroy() { + OnDestroy(); + + if (window_handle_) { + DestroyWindow(window_handle_); + window_handle_ = nullptr; + } + if (g_active_window_count == 0) { + WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); + } +} + +Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { + return reinterpret_cast( + GetWindowLongPtr(window, GWLP_USERDATA)); +} + +void Win32Window::SetChildContent(HWND content) { + child_content_ = content; + SetParent(content, window_handle_); + RECT frame = GetClientArea(); + + MoveWindow(content, frame.left, frame.top, frame.right - frame.left, + frame.bottom - frame.top, true); + + SetFocus(child_content_); +} + +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + +HWND Win32Window::GetHandle() { + return window_handle_; +} + +void Win32Window::SetQuitOnClose(bool quit_on_close) { + quit_on_close_ = quit_on_close; +} + +bool Win32Window::OnCreate() { + // No-op; provided for subclasses. + return true; +} + +void Win32Window::OnDestroy() { + // No-op; provided for subclasses. +} + +void Win32Window::UpdateTheme(HWND const window) { + DWORD light_mode; + DWORD light_mode_size = sizeof(light_mode); + LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, + kGetPreferredBrightnessRegValue, + RRF_RT_REG_DWORD, nullptr, &light_mode, + &light_mode_size); + + if (result == ERROR_SUCCESS) { + BOOL enable_dark_mode = light_mode == 0; + DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, + &enable_dark_mode, sizeof(enable_dark_mode)); + } +} diff --git a/pkgs/flutter_http_example/windows/runner/win32_window.h b/pkgs/flutter_http_example/windows/runner/win32_window.h new file mode 100644 index 0000000000..e901dde684 --- /dev/null +++ b/pkgs/flutter_http_example/windows/runner/win32_window.h @@ -0,0 +1,102 @@ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ + +#include + +#include +#include +#include + +// A class abstraction for a high DPI-aware Win32 Window. Intended to be +// inherited from by classes that wish to specialize with custom +// rendering and input handling +class Win32Window { + public: + struct Point { + unsigned int x; + unsigned int y; + Point(unsigned int x, unsigned int y) : x(x), y(y) {} + }; + + struct Size { + unsigned int width; + unsigned int height; + Size(unsigned int width, unsigned int height) + : width(width), height(height) {} + }; + + Win32Window(); + virtual ~Win32Window(); + + // Creates a win32 window with |title| that is positioned and sized using + // |origin| and |size|. New windows are created on the default monitor. Window + // sizes are specified to the OS in physical pixels, hence to ensure a + // consistent size this function will scale the inputted width and height as + // as appropriate for the default monitor. The window is invisible until + // |Show| is called. Returns true if the window was created successfully. + bool Create(const std::wstring& title, const Point& origin, const Size& size); + + // Show the current window. Returns true if the window was successfully shown. + bool Show(); + + // Release OS resources associated with window. + void Destroy(); + + // Inserts |content| into the window tree. + void SetChildContent(HWND content); + + // Returns the backing Window handle to enable clients to set icon and other + // window properties. Returns nullptr if the window has been destroyed. + HWND GetHandle(); + + // If true, closing this window will quit the application. + void SetQuitOnClose(bool quit_on_close); + + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + + protected: + // Processes and route salient window messages for mouse handling, + // size change and DPI. Delegates handling of these to member overloads that + // inheriting classes can handle. + virtual LRESULT MessageHandler(HWND window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Called when CreateAndShow is called, allowing subclass window-related + // setup. Subclasses should return false if setup fails. + virtual bool OnCreate(); + + // Called when Destroy is called. + virtual void OnDestroy(); + + private: + friend class WindowClassRegistrar; + + // OS callback called by message pump. Handles the WM_NCCREATE message which + // is passed when the non-client area is being created and enables automatic + // non-client DPI scaling so that the non-client area automatically + // responds to changes in DPI. All other messages are handled by + // MessageHandler. + static LRESULT CALLBACK WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Retrieves a class instance pointer for |window| + static Win32Window* GetThisFromHandle(HWND const window) noexcept; + + // Update the window frame's theme to match the system theme. + static void UpdateTheme(HWND const window); + + bool quit_on_close_ = false; + + // window handle for top level window. + HWND window_handle_ = nullptr; + + // window handle for hosted content. + HWND child_content_ = nullptr; +}; + +#endif // RUNNER_WIN32_WINDOW_H_ diff --git a/tool/ci.sh b/tool/ci.sh index f9acff8cb0..26395d208a 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -67,11 +67,19 @@ for PKG in ${PKGS}; do echo echo -e "\033[1mPKG: ${PKG}; TASK: ${TASK}\033[22m" case ${TASK} in - analyze) + analyze_0) + echo 'flutter analyze --fatal-infos' + flutter analyze --fatal-infos || EXIT_CODE=$? + ;; + analyze_1) echo 'dart analyze --fatal-infos' dart analyze --fatal-infos || EXIT_CODE=$? ;; - command) + command_0) + echo 'flutter test' + flutter test || EXIT_CODE=$? + ;; + command_1) echo 'dart run --define=no_default_http_client=true test/no_default_http_client_test.dart' dart run --define=no_default_http_client=true test/no_default_http_client_test.dart || EXIT_CODE=$? ;; @@ -79,11 +87,15 @@ for PKG in ${PKGS}; do echo 'dart format --output=none --set-exit-if-changed .' dart format --output=none --set-exit-if-changed . || EXIT_CODE=$? ;; - test_0) + test_1) + echo 'flutter test --platform chrome' + flutter test --platform chrome || EXIT_CODE=$? + ;; + test_2) echo 'dart test --platform vm' dart test --platform vm || EXIT_CODE=$? ;; - test_1) + test_3) echo 'dart test --platform chrome' dart test --platform chrome || EXIT_CODE=$? ;; From caa6556b81b5965635df0f092e5e5a60f06a08f9 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 9 Nov 2023 12:47:43 -0800 Subject: [PATCH 280/448] Require a package:jni version without known buffer overflows (#1044) --- pkgs/cronet_http/CHANGELOG.md | 4 ++++ pkgs/cronet_http/pubspec.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 2947efb663..83e27012b2 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.2 + +* Require `package:jni >= 0.7.2` to remove a potential buffer overflow. + ## 0.4.1 * Require `package:jni >= 0.7.1` so that depending on `package:cronet_http` diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 451df156a8..82390c8d52 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.4.1 +version: 0.4.2 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter http: '>=0.13.4 <2.0.0' - jni: ^0.7.1 + jni: ^0.7.2 dev_dependencies: dart_flutter_team_lints: ^1.0.0 From 96cf9e27d01dc8d4d4a34adcfc3127cfb17f7f66 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 21 Nov 2023 13:57:04 -0800 Subject: [PATCH 281/448] [http] use pkg:web, require Dart 3.2 (#1049) Now supports wasm --- .github/workflows/dart.yml | 159 ++++++++++++++++++-------- pkgs/http/CHANGELOG.md | 2 + pkgs/http/lib/src/browser_client.dart | 50 ++++++-- pkgs/http/lib/src/client.dart | 2 +- pkgs/http/lib/src/client_stub.dart | 2 +- pkgs/http/pubspec.yaml | 5 +- pkgs/http/test/html/utils.dart | 2 +- tool/ci.sh | 18 ++- 8 files changed, 166 insertions(+), 74 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 35af1671df..b800c00d58 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.6.0 +# Created with package:mono_repo v6.6.1 name: Dart CI on: push: @@ -36,7 +36,7 @@ jobs: name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - name: mono_repo self validate - run: dart pub global activate mono_repo 6.6.0 + run: dart pub global activate mono_repo 6.6.1 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: @@ -70,16 +70,16 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests job_003: - name: "analyze_and_format; linux; Dart 3.0.0; PKGS: pkgs/http, pkgs/http_profile; `dart analyze --fatal-infos`" + name: "analyze_and_format; linux; Dart 3.0.0; PKG: pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -90,15 +90,6 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - id: pkgs_http_pub_upgrade - name: pkgs/http; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http - - name: "pkgs/http; dart analyze --fatal-infos" - run: dart analyze --fatal-infos - if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http - id: pkgs_http_profile_pub_upgrade name: pkgs/http_profile; dart pub upgrade run: dart pub upgrade @@ -109,6 +100,36 @@ jobs: if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile job_004: + name: "analyze_and_format; linux; Dart 3.2.0; PKG: pkgs/http; `dart analyze --fatal-infos`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http;commands:analyze_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0 + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + with: + sdk: "3.2.0" + - id: checkout + name: Checkout repository + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + - name: "pkgs/http; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + job_005: name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -156,7 +177,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_005: + job_006: name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -204,7 +225,7 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_006: + job_007: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -234,7 +255,7 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_007: + job_008: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -264,17 +285,17 @@ jobs: run: flutter analyze --fatal-infos if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_008: - name: "unit_test; linux; Dart 3.0.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" + job_009: + name: "unit_test; linux; Dart 3.0.0; PKG: pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:command_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile;commands:test_2" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -285,6 +306,45 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - id: pkgs_http_profile_pub_upgrade + name: pkgs/http_profile; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_profile + - name: "pkgs/http_profile; dart test --platform vm" + run: dart test --platform vm + if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_profile + needs: + - job_001 + - job_002 + - job_003 + - job_004 + - job_005 + - job_006 + - job_007 + - job_008 + job_010: + name: "unit_test; linux; Dart 3.2.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http;commands:command_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0 + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + with: + sdk: "3.2.0" + - id: checkout + name: Checkout repository + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -302,24 +362,25 @@ jobs: - job_005 - job_006 - job_007 - job_009: - name: "unit_test; linux; Dart 3.0.0; PKG: pkgs/http; `dart test --platform chrome`" + - job_008 + job_011: + name: "unit_test; linux; Dart 3.2.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http;commands:test_3" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http;commands:test_3" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: - sdk: "3.0.0" + sdk: "3.2.0" - id: checkout name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 @@ -340,24 +401,25 @@ jobs: - job_005 - job_006 - job_007 - job_010: - name: "unit_test; linux; Dart 3.0.0; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" + - job_008 + job_012: + name: "unit_test; linux; Dart 3.2.0; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile;commands:test_2" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http;commands:test_2" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http-pkgs/http_profile - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: - sdk: "3.0.0" + sdk: "3.2.0" - id: checkout name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 @@ -370,15 +432,6 @@ jobs: run: dart test --platform vm if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http - - id: pkgs_http_profile_pub_upgrade - name: pkgs/http_profile; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http_profile - - name: "pkgs/http_profile; dart test --platform vm" - run: dart test --platform vm - if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http_profile needs: - job_001 - job_002 @@ -387,7 +440,8 @@ jobs: - job_005 - job_006 - job_007 - job_011: + - job_008 + job_013: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -425,7 +479,8 @@ jobs: - job_005 - job_006 - job_007 - job_012: + - job_008 + job_014: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -463,7 +518,8 @@ jobs: - job_005 - job_006 - job_007 - job_013: + - job_008 + job_015: name: "unit_test; linux; Dart dev; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -510,7 +566,8 @@ jobs: - job_005 - job_006 - job_007 - job_014: + - job_008 + job_016: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test --platform chrome`" runs-on: ubuntu-latest steps: @@ -548,7 +605,8 @@ jobs: - job_005 - job_006 - job_007 - job_015: + - job_008 + job_017: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: ubuntu-latest steps: @@ -586,7 +644,8 @@ jobs: - job_005 - job_006 - job_007 - job_016: + - job_008 + job_018: name: "unit_test; macos; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: macos-latest steps: @@ -624,7 +683,8 @@ jobs: - job_005 - job_006 - job_007 - job_017: + - job_008 + job_019: name: "unit_test; windows; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: windows-latest steps: @@ -652,3 +712,4 @@ jobs: - job_005 - job_006 - job_007 + - job_008 diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 6d39b104df..1fb4c223b4 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -3,6 +3,8 @@ * `BrowserClient` throws `ClientException` when the `'Content-Length'` header is invalid. * `IOClient` trims trailing whitespace on header values. +* Require Dart 3.2 +* Browser: support Wasm by using `package:web`. ## 1.1.0 diff --git a/pkgs/http/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart index 9345be0ce1..84f79e0538 100644 --- a/pkgs/http/lib/src/browser_client.dart +++ b/pkgs/http/lib/src/browser_client.dart @@ -3,9 +3,11 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; -import 'dart:html'; +import 'dart:js_interop'; import 'dart:typed_data'; +import 'package:web/helpers.dart'; + import 'base_client.dart'; import 'base_request.dart'; import 'byte_stream.dart'; @@ -37,7 +39,7 @@ class BrowserClient extends BaseClient { /// The currently active XHRs. /// /// These are aborted if the client is closed. - final _xhrs = {}; + final _xhrs = {}; /// Whether to send credentials such as cookies or authorization headers for /// cross-site requests. @@ -55,19 +57,22 @@ class BrowserClient extends BaseClient { 'HTTP request failed. Client is already closed.', request.url); } var bytes = await request.finalize().toBytes(); - var xhr = HttpRequest(); + var xhr = XMLHttpRequest(); _xhrs.add(xhr); xhr - ..open(request.method, '${request.url}', async: true) + ..open(request.method, '${request.url}', true) ..responseType = 'arraybuffer' ..withCredentials = withCredentials; - request.headers.forEach(xhr.setRequestHeader); + for (var header in request.headers.entries) { + xhr.setRequestHeader(header.key, header.value); + } var completer = Completer(); unawaited(xhr.onLoad.first.then((_) { - if (xhr.responseHeaders['content-length'] case final contentLengthHeader? - when !_digitRegex.hasMatch(contentLengthHeader)) { + if (xhr.responseHeaders['content-length'] case final contentLengthHeader + when contentLengthHeader != null && + !_digitRegex.hasMatch(contentLengthHeader)) { completer.completeError(ClientException( 'Invalid content-length header [$contentLengthHeader].', request.url, @@ -76,7 +81,7 @@ class BrowserClient extends BaseClient { } var body = (xhr.response as ByteBuffer).asUint8List(); completer.complete(StreamedResponse( - ByteStream.fromBytes(body), xhr.status!, + ByteStream.fromBytes(body), xhr.status, contentLength: body.length, request: request, headers: xhr.responseHeaders, @@ -91,7 +96,7 @@ class BrowserClient extends BaseClient { StackTrace.current); })); - xhr.send(bytes); + xhr.send(bytes.toJS); try { return await completer.future; @@ -112,3 +117,30 @@ class BrowserClient extends BaseClient { _xhrs.clear(); } } + +extension on XMLHttpRequest { + Map get responseHeaders { + // from Closure's goog.net.Xhrio.getResponseHeaders. + var headers = {}; + var headersString = getAllResponseHeaders(); + var headersList = headersString.split('\r\n'); + for (var header in headersList) { + if (header.isEmpty) { + continue; + } + + var splitIdx = header.indexOf(': '); + if (splitIdx == -1) { + continue; + } + var key = header.substring(0, splitIdx).toLowerCase(); + var value = header.substring(splitIdx + 2); + if (headers.containsKey(key)) { + headers[key] = '${headers[key]}, $value'; + } else { + headers[key] = value; + } + } + return headers; + } +} diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index 9bceb887f4..85d933a85a 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -12,7 +12,7 @@ import '../http.dart' as http; import 'base_client.dart'; import 'base_request.dart'; import 'client_stub.dart' - if (dart.library.html) 'browser_client.dart' + if (dart.library.js_interop) 'browser_client.dart' if (dart.library.io) 'io_client.dart'; import 'exception.dart'; import 'response.dart'; diff --git a/pkgs/http/lib/src/client_stub.dart b/pkgs/http/lib/src/client_stub.dart index 1a34d50d7e..6384fd0a3f 100644 --- a/pkgs/http/lib/src/client_stub.dart +++ b/pkgs/http/lib/src/client_stub.dart @@ -6,4 +6,4 @@ import 'base_client.dart'; /// Implemented in `browser_client.dart` and `io_client.dart`. BaseClient createClient() => throw UnsupportedError( - 'Cannot create a client without dart:html or dart:io.'); + 'Cannot create a client without dart:js_interop or dart:io.'); diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index ec23e2d608..3df7a30df4 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,15 +1,16 @@ name: http -version: 1.1.1-wip +version: 1.1.1 description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http environment: - sdk: ^3.0.0 + sdk: ^3.2.0 dependencies: async: ^2.5.0 http_parser: ^4.0.0 meta: ^1.3.0 + web: ^0.4.0 dev_dependencies: dart_flutter_team_lints: ^1.0.0 diff --git a/pkgs/http/test/html/utils.dart b/pkgs/http/test/html/utils.dart index abe5808a99..501c621256 100644 --- a/pkgs/http/test/html/utils.dart +++ b/pkgs/http/test/html/utils.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:html'; +import 'package:web/helpers.dart'; export '../utils.dart'; diff --git a/tool/ci.sh b/tool/ci.sh index 26395d208a..44ea987b60 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,9 +1,10 @@ #!/bin/bash -# Created with package:mono_repo v6.6.0 +# Created with package:mono_repo v6.6.1 # Support built in commands on windows out of the box. + # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". +# then "flutter pub" is called instead of "dart pub". # This assumes that the Flutter SDK has been installed in a previous step. function pub() { if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then @@ -12,18 +13,13 @@ function pub() { command dart pub "$@" fi } -# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". -# This assumes that the Flutter SDK has been installed in a previous step. + function format() { - if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then - command flutter format "$@" - else - command dart format "$@" - fi + command dart format "$@" } + # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". +# then "flutter analyze" is called instead of "dart analyze". # This assumes that the Flutter SDK has been installed in a previous step. function analyze() { if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then From d3081f5508d5c74af45bcdb6be9b05bfc1b7a751 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 21 Nov 2023 14:19:12 -0800 Subject: [PATCH 282/448] [http] Fix type cast for dart2wasm (#1050) --- pkgs/http/lib/src/browser_client.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/http/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart index 84f79e0538..10d8e0cdba 100644 --- a/pkgs/http/lib/src/browser_client.dart +++ b/pkgs/http/lib/src/browser_client.dart @@ -4,7 +4,6 @@ import 'dart:async'; import 'dart:js_interop'; -import 'dart:typed_data'; import 'package:web/helpers.dart'; @@ -79,7 +78,7 @@ class BrowserClient extends BaseClient { )); return; } - var body = (xhr.response as ByteBuffer).asUint8List(); + var body = (xhr.response as JSArrayBuffer).toDart.asUint8List(); completer.complete(StreamedResponse( ByteStream.fromBytes(body), xhr.status, contentLength: body.length, From fe916b57a6e7766bb776559e817069f07de89c80 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 21 Nov 2023 14:55:15 -0800 Subject: [PATCH 283/448] Update platform-specific imports for wasm (#1051) Fix some docs --- pkgs/flutter_http_example/lib/main.dart | 2 +- pkgs/http/lib/src/browser_client.dart | 4 ++-- pkgs/http/lib/src/client.dart | 3 ++- pkgs/http_client_conformance_tests/lib/src/close_tests.dart | 2 +- .../lib/src/compressed_response_body_tests.dart | 2 +- pkgs/http_client_conformance_tests/lib/src/isolate_test.dart | 4 ++-- .../lib/src/multiple_clients_tests.dart | 2 +- .../http_client_conformance_tests/lib/src/redirect_tests.dart | 2 +- .../lib/src/request_body_streamed_tests.dart | 2 +- .../lib/src/request_body_tests.dart | 2 +- .../lib/src/request_headers_tests.dart | 2 +- .../lib/src/response_body_streamed_test.dart | 2 +- .../lib/src/response_body_tests.dart | 2 +- .../lib/src/response_headers_tests.dart | 2 +- .../lib/src/response_status_line_tests.dart | 2 +- .../lib/src/server_errors_test.dart | 2 +- 16 files changed, 19 insertions(+), 18 deletions(-) diff --git a/pkgs/flutter_http_example/lib/main.dart b/pkgs/flutter_http_example/lib/main.dart index 70f003c84c..406b9e6b71 100644 --- a/pkgs/flutter_http_example/lib/main.dart +++ b/pkgs/flutter_http_example/lib/main.dart @@ -11,7 +11,7 @@ import 'package:provider/provider.dart'; import 'book.dart'; import 'http_client_factory.dart' - if (dart.library.html) 'http_client_factory_web.dart' as http_factory; + if (dart.library.js_interop) 'http_client_factory_web.dart' as http_factory; void main() { // `runWithClient` is used to control which `package:http` `Client` is used diff --git a/pkgs/http/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart index 10d8e0cdba..80db8b1291 100644 --- a/pkgs/http/lib/src/browser_client.dart +++ b/pkgs/http/lib/src/browser_client.dart @@ -26,8 +26,8 @@ BaseClient createClient() { return BrowserClient(); } -/// A `dart:html`-based HTTP client that runs in the browser and is backed by -/// XMLHttpRequests. +/// A `package:web`-based HTTP client that runs in the browser and is backed by +/// [XMLHttpRequest]. /// /// This client inherits some of the limitations of XMLHttpRequest. It ignores /// the [BaseRequest.contentLength], [BaseRequest.persistentConnection], diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index 85d933a85a..7429ca8824 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -37,7 +37,8 @@ abstract interface class Client { /// Creates a new platform appropriate client. /// /// Creates an `IOClient` if `dart:io` is available and a `BrowserClient` if - /// `dart:html` is available, otherwise it will throw an unsupported error. + /// `dart:js_interop` is available, otherwise it will throw an unsupported + /// error. factory Client() => zoneClient ?? createClient(); /// Sends an HTTP HEAD request with the given headers to the given URL. diff --git a/pkgs/http_client_conformance_tests/lib/src/close_tests.dart b/pkgs/http_client_conformance_tests/lib/src/close_tests.dart index 040b338bf6..8194130bcc 100644 --- a/pkgs/http_client_conformance_tests/lib/src/close_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/close_tests.dart @@ -8,7 +8,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'request_body_server_vm.dart' - if (dart.library.html) 'request_body_server_web.dart'; + if (dart.library.js_interop) 'request_body_server_web.dart'; /// Tests that the [Client] correctly implements [Client.close]. void testClose(Client Function() clientFactory) { diff --git a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_tests.dart index 3ce871bc21..2395aaf494 100644 --- a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_tests.dart @@ -8,7 +8,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'compressed_response_body_server_vm.dart' - if (dart.library.html) 'compressed_response_body_server_web.dart'; + if (dart.library.js_interop) 'compressed_response_body_server_web.dart'; /// Tests that the [Client] correctly implements HTTP responses with compressed /// bodies. diff --git a/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart b/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart index b4ac8b2393..6b296a2df0 100644 --- a/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart @@ -2,7 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:isolate' if (dart.library.html) 'dummy_isolate.dart'; +import 'dart:isolate' if (dart.library.js_interop) 'dummy_isolate.dart'; import 'package:async/async.dart'; import 'package:http/http.dart'; @@ -10,7 +10,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'request_body_server_vm.dart' - if (dart.library.html) 'request_body_server_web.dart'; + if (dart.library.js_interop) 'request_body_server_web.dart'; Future _testPost(Client Function() clientFactory, String host) async { await Isolate.run( diff --git a/pkgs/http_client_conformance_tests/lib/src/multiple_clients_tests.dart b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_tests.dart index be9c4d9722..8f8dc813a2 100644 --- a/pkgs/http_client_conformance_tests/lib/src/multiple_clients_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_tests.dart @@ -8,7 +8,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'multiple_clients_server_vm.dart' - if (dart.library.html) 'multiple_clients_server_web.dart'; + if (dart.library.js_interop) 'multiple_clients_server_web.dart'; /// Tests that the [Client] works correctly if there are many used /// simultaneously. diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart index e21a5c2d4a..600becc0fe 100644 --- a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart @@ -8,7 +8,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'redirect_server_vm.dart' - if (dart.library.html) 'redirect_server_web.dart'; + if (dart.library.js_interop) 'redirect_server_web.dart'; /// Tests that the [Client] correctly implements HTTP redirect logic. /// diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart index 560858dc3c..8c0c658e11 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart @@ -11,7 +11,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'request_body_streamed_server_vm.dart' - if (dart.library.html) 'request_body_streamed_server_web.dart'; + if (dart.library.js_interop) 'request_body_streamed_server_web.dart'; /// Tests that the [Client] correctly implements streamed request body /// uploading. diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart index e211da5755..2f13fa7fd5 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart @@ -10,7 +10,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'request_body_server_vm.dart' - if (dart.library.html) 'request_body_server_web.dart'; + if (dart.library.js_interop) 'request_body_server_web.dart'; class _Plus2Decoder extends Converter, String> { @override diff --git a/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart index 8adf98c9c7..a6943871a8 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart @@ -8,7 +8,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'request_headers_server_vm.dart' - if (dart.library.html) 'request_headers_server_web.dart'; + if (dart.library.js_interop) 'request_headers_server_web.dart'; /// Tests that the [Client] correctly sends headers in the request. void testRequestHeaders(Client client) async { diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart index 28686fa553..b8afa3deb1 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart @@ -10,7 +10,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'response_body_streamed_server_vm.dart' - if (dart.library.html) 'response_body_streamed_server_web.dart'; + if (dart.library.js_interop) 'response_body_streamed_server_web.dart'; /// Tests that the [Client] correctly implements HTTP responses with bodies of /// unbounded size. diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart index 91ee549736..ba833f4a1b 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart @@ -8,7 +8,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'response_body_server_vm.dart' - if (dart.library.html) 'response_body_server_web.dart'; + if (dart.library.js_interop) 'response_body_server_web.dart'; /// Tests that the [Client] correctly implements HTTP responses with bodies. /// diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart index 4f920428ae..6a3647b196 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart @@ -8,7 +8,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'response_headers_server_vm.dart' - if (dart.library.html) 'response_headers_server_web.dart'; + if (dart.library.js_interop) 'response_headers_server_web.dart'; /// Tests that the [Client] correctly processes response headers. void testResponseHeaders(Client client) async { diff --git a/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart index b618fa099c..12fb29c13a 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart @@ -8,7 +8,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'response_status_line_server_vm.dart' - if (dart.library.html) 'response_status_line_server_web.dart'; + if (dart.library.js_interop) 'response_status_line_server_web.dart'; /// Tests that the [Client] correctly processes the response status line (e.g. /// 'HTTP/1.1 200 OK\r\n'). diff --git a/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart b/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart index 65de499e56..0e45bc59b9 100644 --- a/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart @@ -8,7 +8,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'server_errors_server_vm.dart' - if (dart.library.html) 'server_errors_server_web.dart'; + if (dart.library.js_interop) 'server_errors_server_web.dart'; /// Tests that the [Client] correctly handles server errors. void testServerErrors(Client client, {bool redirectAlwaysAllowed = false}) { From 141eeecd5fd14b44ff1fce8b216aa2165b9d9110 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 22 Nov 2023 12:47:19 -0800 Subject: [PATCH 284/448] Update lints to latest, etc (#1048) Updated min SDK on http_client_conformance_tests Bumped pkg:http version on some examples --- .github/workflows/dart.yml | 74 ++++++------------- analysis_options.yaml | 5 -- pkgs/cronet_http/CHANGELOG.md | 2 + pkgs/cronet_http/example/pubspec.yaml | 6 +- pkgs/cronet_http/pubspec.yaml | 4 +- pkgs/cupertino_http/CHANGELOG.md | 2 + .../example/integration_test/client_test.dart | 3 +- pkgs/cupertino_http/example/pubspec.yaml | 4 +- pkgs/cupertino_http/pubspec.yaml | 4 +- pkgs/flutter_http_example/pubspec.yaml | 4 +- pkgs/http/CHANGELOG.md | 2 + pkgs/http/pubspec.yaml | 4 +- .../pubspec.yaml | 6 +- pkgs/java_http/pubspec.yaml | 3 +- 14 files changed, 46 insertions(+), 77 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index b800c00d58..baebff25d7 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -40,23 +40,23 @@ jobs: - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyze_and_format; linux; Dart 2.19.0; PKG: pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" + name: "analyze_and_format; linux; Dart 3.0.0; PKGS: pkgs/http_client_conformance_tests, pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http_client_conformance_tests;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_client_conformance_tests-pkgs/http_profile;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0;packages:pkgs/http_client_conformance_tests - os:ubuntu-latest;pub-cache-hosted;sdk:2.19.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_client_conformance_tests-pkgs/http_profile + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: - sdk: "2.19.0" + sdk: "3.0.0" - id: checkout name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 @@ -69,27 +69,6 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests - job_003: - name: "analyze_and_format; linux; Dart 3.0.0; PKG: pkgs/http_profile; `dart analyze --fatal-infos`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile;commands:analyze_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d - with: - sdk: "3.0.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - id: pkgs_http_profile_pub_upgrade name: pkgs/http_profile; dart pub upgrade run: dart pub upgrade @@ -99,7 +78,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_004: + job_003: name: "analyze_and_format; linux; Dart 3.2.0; PKG: pkgs/http; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -129,7 +108,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http - job_005: + job_004: name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -177,7 +156,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_006: + job_005: name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -225,7 +204,7 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_007: + job_006: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -255,7 +234,7 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_008: + job_007: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -285,7 +264,7 @@ jobs: run: flutter analyze --fatal-infos if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_009: + job_008: name: "unit_test; linux; Dart 3.0.0; PKG: pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -323,8 +302,7 @@ jobs: - job_005 - job_006 - job_007 - - job_008 - job_010: + job_009: name: "unit_test; linux; Dart 3.2.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -362,8 +340,7 @@ jobs: - job_005 - job_006 - job_007 - - job_008 - job_011: + job_010: name: "unit_test; linux; Dart 3.2.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -401,8 +378,7 @@ jobs: - job_005 - job_006 - job_007 - - job_008 - job_012: + job_011: name: "unit_test; linux; Dart 3.2.0; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -440,8 +416,7 @@ jobs: - job_005 - job_006 - job_007 - - job_008 - job_013: + job_012: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -479,8 +454,7 @@ jobs: - job_005 - job_006 - job_007 - - job_008 - job_014: + job_013: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -518,8 +492,7 @@ jobs: - job_005 - job_006 - job_007 - - job_008 - job_015: + job_014: name: "unit_test; linux; Dart dev; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -566,8 +539,7 @@ jobs: - job_005 - job_006 - job_007 - - job_008 - job_016: + job_015: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test --platform chrome`" runs-on: ubuntu-latest steps: @@ -605,8 +577,7 @@ jobs: - job_005 - job_006 - job_007 - - job_008 - job_017: + job_016: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: ubuntu-latest steps: @@ -644,8 +615,7 @@ jobs: - job_005 - job_006 - job_007 - - job_008 - job_018: + job_017: name: "unit_test; macos; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: macos-latest steps: @@ -683,8 +653,7 @@ jobs: - job_005 - job_006 - job_007 - - job_008 - job_019: + job_018: name: "unit_test; windows; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: windows-latest steps: @@ -712,4 +681,3 @@ jobs: - job_005 - job_006 - job_007 - - job_008 diff --git a/analysis_options.yaml b/analysis_options.yaml index 7d741bd4f1..e536739953 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -14,15 +14,10 @@ linter: - avoid_returning_this - avoid_unused_constructor_parameters - cascade_invocations - - comment_references - join_return_with_assignment - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - - prefer_const_constructors - prefer_const_declarations - prefer_expression_function_bodies - - prefer_relative_imports - - test_types_in_equals - use_string_buffers - - use_super_parameters diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 83e27012b2..7eecd298e0 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,5 @@ +## 0.4.3-wip + ## 0.4.2 * Require `package:jni >= 0.7.2` to remove a potential buffer overflow. diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index 568cef98df..5bb80276a6 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -4,7 +4,7 @@ description: Demonstrates how to use the cronet_http plugin. publish_to: 'none' environment: - sdk: "^3.0.0" + sdk: ^3.0.0 dependencies: cached_network_image: ^3.2.3 @@ -13,10 +13,10 @@ dependencies: cupertino_icons: ^1.0.2 flutter: sdk: flutter - http: ^0.13.5 + http: ^1.0.0 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 flutter_test: sdk: flutter http_client_conformance_tests: diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 82390c8d52..7858392c27 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.4.2 +version: 0.4.3-wip repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: @@ -15,7 +15,7 @@ dependencies: jni: ^0.7.2 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 jnigen: ^0.7.0 xml: ^6.1.0 yaml_edit: ^2.0.3 diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 3a69c498dc..48d990e185 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.1.1-wip + ## 1.1.0 * Add websocket support to `cupertino_api`. diff --git a/pkgs/cupertino_http/example/integration_test/client_test.dart b/pkgs/cupertino_http/example/integration_test/client_test.dart index 9247783a09..1becd5c049 100644 --- a/pkgs/cupertino_http/example/integration_test/client_test.dart +++ b/pkgs/cupertino_http/example/integration_test/client_test.dart @@ -2,6 +2,7 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'dart:async'; import 'dart:io'; import 'dart:typed_data'; @@ -45,7 +46,7 @@ void testClient(Client client) { } final request = StreamedRequest('POST', uri); request.sink.add(data); - request.sink.close(); + unawaited(request.sink.close()); await client.send(request); expect(serverHash, sha1.convert(data).bytes); }); diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index be727312a2..bae184b71c 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -16,12 +16,12 @@ dependencies: cupertino_icons: ^1.0.2 flutter: sdk: flutter - http: ^0.13.5 + http: ^1.0.0 dev_dependencies: convert: ^3.1.1 crypto: ^3.0.3 - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 ffi: ^2.0.1 flutter_test: sdk: flutter diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 9d639a8450..9b7e1f828a 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -2,7 +2,7 @@ name: cupertino_http description: > A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 1.1.0 +version: 1.1.1-wip repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: @@ -17,7 +17,7 @@ dependencies: http: '>=0.13.4 <2.0.0' dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 ffigen: ^9.0.1 flutter: diff --git a/pkgs/flutter_http_example/pubspec.yaml b/pkgs/flutter_http_example/pubspec.yaml index 6f3d1ba729..f2cf6c19f0 100644 --- a/pkgs/flutter_http_example/pubspec.yaml +++ b/pkgs/flutter_http_example/pubspec.yaml @@ -17,11 +17,11 @@ dependencies: fetch_client: ^1.0.2 flutter: sdk: flutter - http: ^0.13.5 + http: ^1.0.0 provider: ^6.0.5 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 flutter_test: sdk: flutter integration_test: diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 1fb4c223b4..ca3084fa44 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.1.2-wip + ## 1.1.1 * `BrowserClient` throws `ClientException` when the `'Content-Length'` header diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 3df7a30df4..ebe381620f 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.1.1 +version: 1.1.2-wip description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http @@ -13,7 +13,7 @@ dependencies: web: ^0.4.0 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 fake_async: ^1.2.0 http_client_conformance_tests: path: ../http_client_conformance_tests/ diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index 42640597ce..de5ffb61b9 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -6,14 +6,14 @@ publish_to: none repository: https://github.com/dart-lang/http/tree/master/pkgs/http_client_conformance_tests environment: - sdk: '>=2.19.0 <3.0.0' + sdk: ^3.0.0 dependencies: async: ^2.8.2 dart_style: ^2.2.3 - http: '>=0.13.4 <2.0.0' + http: ^1.0.0 stream_channel: ^2.1.1 test: ^1.21.2 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 diff --git a/pkgs/java_http/pubspec.yaml b/pkgs/java_http/pubspec.yaml index ecba4f13e6..a0e100dcfd 100644 --- a/pkgs/java_http/pubspec.yaml +++ b/pkgs/java_http/pubspec.yaml @@ -14,9 +14,8 @@ dependencies: path: ^1.8.0 dev_dependencies: - dart_flutter_team_lints: ^1.0.0 + dart_flutter_team_lints: ^2.0.0 http_client_conformance_tests: path: ../http_client_conformance_tests/ jnigen: ^0.5.0 - lints: ^2.0.0 test: ^1.21.0 From 42864863c0f48078318c49f808da04193f8662b0 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 27 Nov 2023 09:24:54 -0800 Subject: [PATCH 285/448] [http] Allow pkg:web v0.3.0 (#1055) See https://github.com/dart-lang/http/issues/1052 Prepare to release pkg:http v1.1.2 --- pkgs/http/CHANGELOG.md | 4 +++- pkgs/http/pubspec.yaml | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index ca3084fa44..9bbbb05a2d 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,4 +1,6 @@ -## 1.1.2-wip +## 1.1.2 + +* Allow `web: '>=0.3.0 <0.5.0'`. ## 1.1.1 diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index ebe381620f..118292fa13 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.1.2-wip +version: 1.1.2 description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http @@ -10,7 +10,7 @@ dependencies: async: ^2.5.0 http_parser: ^4.0.0 meta: ^1.3.0 - web: ^0.4.0 + web: '>=0.3.0 <0.5.0' dev_dependencies: dart_flutter_team_lints: ^2.0.0 From 70062a9b43053b76819f6eaa873a0f32e40bba0c Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 29 Nov 2023 15:50:37 -0800 Subject: [PATCH 286/448] Fix a bug where cronet_http sends incorrect HTTP request methods (#1058) --- pkgs/cronet_http/CHANGELOG.md | 3 +- pkgs/cronet_http/lib/src/cronet_client.dart | 2 +- .../http/test/io/client_conformance_test.dart | 3 +- .../lib/http_client_conformance_tests.dart | 19 ++-- .../lib/src/request_methods_server.dart | 41 +++++++++ .../lib/src/request_methods_server_vm.dart | 12 +++ .../lib/src/request_methods_server_web.dart | 9 ++ .../lib/src/request_methods_tests.dart | 88 +++++++++++++++++++ 8 files changed, 168 insertions(+), 9 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_methods_server.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_methods_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_methods_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_methods_tests.dart diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 7eecd298e0..59ef74fe62 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,8 +1,7 @@ -## 0.4.3-wip - ## 0.4.2 * Require `package:jni >= 0.7.2` to remove a potential buffer overflow. +* Fix a bug where incorrect HTTP request methods were sent. ## 0.4.1 diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index c4d0d19006..272b602b3d 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -317,7 +317,7 @@ class CronetClient extends BaseClient { jb.UrlRequestCallbackProxy.new1( _urlRequestCallbacks(request, responseCompleter)), _executor, - ); + )..setHttpMethod(request.method.toJString()); var headers = request.headers; if (body.isNotEmpty && diff --git a/pkgs/http/test/io/client_conformance_test.dart b/pkgs/http/test/io/client_conformance_test.dart index 5d8f7f598d..20bf39f281 100644 --- a/pkgs/http/test/io/client_conformance_test.dart +++ b/pkgs/http/test/io/client_conformance_test.dart @@ -10,5 +10,6 @@ import 'package:http_client_conformance_tests/http_client_conformance_tests.dart import 'package:test/test.dart'; void main() { - testAll(IOClient.new); + testAll(IOClient.new, preservesMethodCase: false // https://dartbug.com/54187 + ); } diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index 3d003193e9..bd83c02abb 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -12,6 +12,7 @@ import 'src/redirect_tests.dart'; import 'src/request_body_streamed_tests.dart'; import 'src/request_body_tests.dart'; import 'src/request_headers_tests.dart'; +import 'src/request_methods_tests.dart'; import 'src/response_body_streamed_test.dart'; import 'src/response_body_tests.dart'; import 'src/response_headers_tests.dart'; @@ -27,6 +28,7 @@ export 'src/redirect_tests.dart' show testRedirect; export 'src/request_body_streamed_tests.dart' show testRequestBodyStreamed; export 'src/request_body_tests.dart' show testRequestBody; export 'src/request_headers_tests.dart' show testRequestHeaders; +export 'src/request_methods_tests.dart' show testRequestMethods; export 'src/response_body_streamed_test.dart' show testResponseBodyStreamed; export 'src/response_body_tests.dart' show testResponseBody; export 'src/response_headers_tests.dart' show testResponseHeaders; @@ -49,14 +51,20 @@ export 'src/server_errors_test.dart' show testServerErrors; /// If [canWorkInIsolates] is `false` then tests that require that the [Client] /// work in Isolates other than the main isolate will be skipped. /// +/// If [preservesMethodCase] is `false` then tests that assume that the +/// [Client] preserves custom request method casing will be skipped. +/// /// The tests are run against a series of HTTP servers that are started by the /// tests. If the tests are run in the browser, then the test servers are /// started in another process. Otherwise, the test servers are run in-process. -void testAll(Client Function() clientFactory, - {bool canStreamRequestBody = true, - bool canStreamResponseBody = true, - bool redirectAlwaysAllowed = false, - bool canWorkInIsolates = true}) { +void testAll( + Client Function() clientFactory, { + bool canStreamRequestBody = true, + bool canStreamResponseBody = true, + bool redirectAlwaysAllowed = false, + bool canWorkInIsolates = true, + bool preservesMethodCase = false, +}) { testRequestBody(clientFactory()); testRequestBodyStreamed(clientFactory(), canStreamRequestBody: canStreamRequestBody); @@ -65,6 +73,7 @@ void testAll(Client Function() clientFactory, testResponseBodyStreamed(clientFactory(), canStreamResponseBody: canStreamResponseBody); testRequestHeaders(clientFactory()); + testRequestMethods(clientFactory(), preservesMethodCase: preservesMethodCase); testResponseHeaders(clientFactory()); testResponseStatusLine(clientFactory()); testRedirect(clientFactory(), redirectAlwaysAllowed: redirectAlwaysAllowed); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_methods_server.dart b/pkgs/http_client_conformance_tests/lib/src/request_methods_server.dart new file mode 100644 index 0000000000..bf05ec08e2 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_methods_server.dart @@ -0,0 +1,41 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that captures the request headers. +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// On Request Received: +/// - send the received request method (e.g. GET) as a String +/// When Receive Anything: +/// - exit +void hybridMain(StreamChannel channel) async { + late HttpServer server; + + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + request.response.headers.set('Access-Control-Allow-Origin', '*'); + if (request.method == 'OPTIONS') { + // Handle a CORS preflight request: + // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests + request.response.headers + ..set('Access-Control-Allow-Methods', '*') + ..set('Access-Control-Allow-Headers', '*'); + } else { + channel.sink.add(request.method); + } + unawaited(request.response.close()); + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_methods_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/request_methods_server_vm.dart new file mode 100644 index 0000000000..6ce6627f4c --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_methods_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'request_methods_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_methods_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/request_methods_server_web.dart new file mode 100644 index 0000000000..8cddf5a175 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_methods_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/request_methods_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_methods_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_methods_tests.dart new file mode 100644 index 0000000000..ec11387f3d --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_methods_tests.dart @@ -0,0 +1,88 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +import 'request_methods_server_vm.dart' + if (dart.library.html) 'request_methods_server_web.dart'; + +/// Tests that the [Client] correctly sends HTTP request methods +/// (e.g. GET, HEAD). +/// +/// If [preservesMethodCase] is `false` then tests that assume that the +/// [Client] preserves custom request method casing will be skipped. +void testRequestMethods(Client client, + {bool preservesMethodCase = true}) async { + group('request methods', () { + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.next}'; + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + + test('custom method - not case preserving', () async { + await client.send(Request( + 'CuStOm', + Uri.http(host, ''), + )); + final method = await httpServerQueue.next as String; + expect('CUSTOM', method.toUpperCase()); + }); + + test('custom method case preserving', () async { + await client.send(Request( + 'CuStOm', + Uri.http(host, ''), + )); + final method = await httpServerQueue.next as String; + expect('CuStOm', method); + }, + skip: preservesMethodCase + ? false + : 'does not preserve HTTP request method case'); + + test('delete', () async { + await client.delete(Uri.http(host, '')); + final method = await httpServerQueue.next as String; + expect('DELETE', method); + }); + + test('get', () async { + await client.get(Uri.http(host, '')); + final method = await httpServerQueue.next as String; + expect('GET', method); + }); + test('head', () async { + await client.head(Uri.http(host, '')); + final method = await httpServerQueue.next as String; + expect('HEAD', method); + }); + + test('patch', () async { + await client.patch(Uri.http(host, '')); + final method = await httpServerQueue.next as String; + expect('PATCH', method); + }); + + test('post', () async { + await client.post(Uri.http(host, '')); + final method = await httpServerQueue.next as String; + expect('POST', method); + }); + + test('put', () async { + await client.put(Uri.http(host, '')); + final method = await httpServerQueue.next as String; + expect('PUT', method); + }); + }); +} From 8d0bf7f6a2fa9d2a7f15320adf06ed3cf277df05 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 30 Nov 2023 10:23:24 -0800 Subject: [PATCH 287/448] Update pubspec.yaml to 0.4.2 (#1059) --- pkgs/cronet_http/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 7858392c27..b7c417de09 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http description: > An Android Flutter plugin that provides access to the Cronet HTTP client. -version: 0.4.3-wip +version: 0.4.2 repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: From 839ce1250972d1b386ba514cc84b60ac2aa74182 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Thu, 30 Nov 2023 11:20:23 -0800 Subject: [PATCH 288/448] misc cleanup of yaml files (#1061) --- .github/labeler.yml | 4 ++-- pkgs/cronet_http/pubspec.yaml | 5 ++--- pkgs/cupertino_http/pubspec.yaml | 4 ++-- pkgs/flutter_http_example/pubspec.yaml | 3 +-- pkgs/http_client_conformance_tests/pubspec.yaml | 3 ++- pkgs/http_profile/pubspec.yaml | 7 ++++--- pkgs/java_http/pubspec.yaml | 4 +++- 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 7ac52cec78..b49eaf2cc5 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,6 +1,6 @@ -# Configuration for .github/workflows/pull_request_label.yml. +# Configuration for .github/workflows/pull_request_label.yml. -'infra': +'type-infra': - '.github/**' 'package:cronet_http': diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index b7c417de09..602a1bbfd5 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,7 +1,7 @@ name: cronet_http -description: > - An Android Flutter plugin that provides access to the Cronet HTTP client. version: 0.4.2 +description: >- + An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: @@ -25,4 +25,3 @@ flutter: platforms: android: ffiPlugin: true - diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 9b7e1f828a..824a581b8a 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,8 +1,8 @@ name: cupertino_http -description: > +version: 1.1.1-wip +description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. -version: 1.1.1-wip repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: diff --git a/pkgs/flutter_http_example/pubspec.yaml b/pkgs/flutter_http_example/pubspec.yaml index f2cf6c19f0..0331490003 100644 --- a/pkgs/flutter_http_example/pubspec.yaml +++ b/pkgs/flutter_http_example/pubspec.yaml @@ -1,10 +1,9 @@ name: flutter_http_example +version: 1.0.0 description: Demonstrates how to use package:http in a Flutter app. publish_to: 'none' -version: 1.0.0 - environment: sdk: ^3.0.0 flutter: '>=3.10.0' diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index de5ffb61b9..520f1311b0 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -2,9 +2,10 @@ name: http_client_conformance_tests description: >- A library that tests whether implementations of package:http's `Client` class behave as expected. -publish_to: none repository: https://github.com/dart-lang/http/tree/master/pkgs/http_client_conformance_tests +publish_to: none + environment: sdk: ^3.0.0 diff --git a/pkgs/http_profile/pubspec.yaml b/pkgs/http_profile/pubspec.yaml index 9e3b69e12f..1b5891e2c1 100644 --- a/pkgs/http_profile/pubspec.yaml +++ b/pkgs/http_profile/pubspec.yaml @@ -1,10 +1,11 @@ name: http_profile description: >- - A library used by HTTP client authors to integrate with the DevTools - Network tab. -publish_to: none + A library used by HTTP client authors to integrate with the DevTools Network + tab. repository: https://github.com/dart-lang/http/tree/master/pkgs/http_profile +publish_to: none + environment: sdk: ^3.0.0 diff --git a/pkgs/java_http/pubspec.yaml b/pkgs/java_http/pubspec.yaml index a0e100dcfd..c04429a993 100644 --- a/pkgs/java_http/pubspec.yaml +++ b/pkgs/java_http/pubspec.yaml @@ -1,7 +1,9 @@ name: java_http -description: A Dart package for making HTTP requests using java.net.HttpURLConnection. version: 0.0.1 +description: >- + A Dart package for making HTTP requests using java.net.HttpURLConnection. repository: https://github.com/dart-lang/http/tree/master/pkgs/java_http + publish_to: none environment: From eebcd07d9f2900bbbab05da8b9a27353a29abc9c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Dec 2023 03:33:35 +0000 Subject: [PATCH 289/448] Bump actions/setup-java from 3 to 4 (#1065) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4.
Commits
  • 387ac29 Upgrade Node to v20 (#558)
  • 9eda6b5 feat: implement cache-dependency-path option to control caching dependency (#...
  • 78078da Update @​actions/cache dependency and documentation (#549)
  • 5caaba6 add support for microsoft openjdk 21.0.0 (#546)
  • See full diff in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-java&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/cronet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 94fcf1ca87..7bc1a4f089 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -49,7 +49,7 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 + - uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '17' From be0da79ff8102c8edff5fe4a3d5ea8cc6be01991 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 1 Dec 2023 18:22:11 -0800 Subject: [PATCH 290/448] [http_client_conformance_tests] Updates to support wasm compilation (#1064) With wasm, the hybrid logic decodes JSON numbers as double This fix adds in a helper to make sure we get `int` when desired See https://github.com/dart-lang/http/issues/1066 --- .../bin/generate_server_wrappers.dart | 15 +++++++++++---- .../lib/src/close_tests.dart | 2 +- .../src/compressed_response_body_server_vm.dart | 2 ++ .../src/compressed_response_body_server_web.dart | 2 ++ .../lib/src/compressed_response_body_tests.dart | 2 +- .../lib/src/isolate_test.dart | 2 +- .../lib/src/multiple_clients_server_vm.dart | 2 ++ .../lib/src/multiple_clients_server_web.dart | 2 ++ .../lib/src/multiple_clients_tests.dart | 2 +- .../lib/src/redirect_server_vm.dart | 2 ++ .../lib/src/redirect_server_web.dart | 2 ++ .../lib/src/redirect_tests.dart | 2 +- .../lib/src/request_body_server_vm.dart | 2 ++ .../lib/src/request_body_server_web.dart | 2 ++ .../lib/src/request_body_streamed_server_vm.dart | 2 ++ .../lib/src/request_body_streamed_server_web.dart | 2 ++ .../lib/src/request_body_streamed_tests.dart | 2 +- .../lib/src/request_body_tests.dart | 2 +- .../lib/src/request_headers_server_vm.dart | 2 ++ .../lib/src/request_headers_server_web.dart | 2 ++ .../lib/src/request_headers_tests.dart | 2 +- .../lib/src/request_methods_server_vm.dart | 2 ++ .../lib/src/request_methods_server_web.dart | 2 ++ .../lib/src/request_methods_tests.dart | 4 ++-- .../lib/src/response_body_server_vm.dart | 2 ++ .../lib/src/response_body_server_web.dart | 2 ++ .../lib/src/response_body_streamed_server_vm.dart | 2 ++ .../src/response_body_streamed_server_web.dart | 2 ++ .../lib/src/response_body_streamed_test.dart | 2 +- .../lib/src/response_body_tests.dart | 2 +- .../lib/src/response_headers_server_vm.dart | 2 ++ .../lib/src/response_headers_server_web.dart | 2 ++ .../lib/src/response_headers_tests.dart | 2 +- .../lib/src/response_status_line_server_vm.dart | 2 ++ .../lib/src/response_status_line_server_web.dart | 2 ++ .../lib/src/response_status_line_tests.dart | 2 +- .../lib/src/server_errors_server_vm.dart | 2 ++ .../lib/src/server_errors_server_web.dart | 2 ++ .../lib/src/server_errors_test.dart | 2 +- .../lib/src/server_queue_helpers.dart | 10 ++++++++++ 40 files changed, 84 insertions(+), 19 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/server_queue_helpers.dart diff --git a/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart b/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart index 74f9d00df9..6e86737c41 100644 --- a/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart +++ b/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart @@ -10,12 +10,17 @@ import 'dart:io'; import 'package:dart_style/dart_style.dart'; -const vm = '''// Generated by generate_server_wrappers.dart. Do not edit. +const _export = '''export 'server_queue_helpers.dart' + show StreamQueueOfNullableObjectExtension;'''; + +const _vm = '''// Generated by generate_server_wrappers.dart. Do not edit. import 'package:stream_channel/stream_channel.dart'; import ''; +$_export + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); @@ -24,11 +29,13 @@ Future> startServer() async { } '''; -const web = '''// Generated by generate_server_wrappers.dart. Do not edit. +const _web = '''// Generated by generate_server_wrappers.dart. Do not edit. import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +$_export + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', @@ -41,11 +48,11 @@ void main() async { files.where((file) => file.path.endsWith('_server.dart')).forEach((file) { final vmPath = file.path.replaceAll('_server.dart', '_server_vm.dart'); - File(vmPath).writeAsStringSync(formatter.format(vm.replaceAll( + File(vmPath).writeAsStringSync(formatter.format(_vm.replaceAll( '', file.uri.pathSegments.last))); final webPath = file.path.replaceAll('_server.dart', '_server_web.dart'); - File(webPath).writeAsStringSync(formatter.format(web.replaceAll( + File(webPath).writeAsStringSync(formatter.format(_web.replaceAll( '', file.uri.pathSegments.last))); }); } diff --git a/pkgs/http_client_conformance_tests/lib/src/close_tests.dart b/pkgs/http_client_conformance_tests/lib/src/close_tests.dart index 8194130bcc..39324ad7c6 100644 --- a/pkgs/http_client_conformance_tests/lib/src/close_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/close_tests.dart @@ -20,7 +20,7 @@ void testClose(Client Function() clientFactory) { setUpAll(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); tearDownAll(() => httpServerChannel.sink.add(null)); diff --git a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_vm.dart index 2bb2c1629d..a5ae1e0529 100644 --- a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_vm.dart +++ b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_vm.dart @@ -4,6 +4,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'compressed_response_body_server.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); diff --git a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_web.dart index f8807993d3..7b1d1a6368 100644 --- a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_web.dart +++ b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server_web.dart @@ -3,6 +3,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', diff --git a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_tests.dart index 2395aaf494..538b3ba4de 100644 --- a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_tests.dart @@ -32,7 +32,7 @@ void testCompressedResponseBody(Client client) async { setUpAll(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); tearDownAll(() => httpServerChannel.sink.add(null)); diff --git a/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart b/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart index 6b296a2df0..1723ab549c 100644 --- a/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart @@ -31,7 +31,7 @@ void testIsolate(Client Function() clientFactory, setUpAll(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); tearDownAll(() => httpServerChannel.sink.add(null)); diff --git a/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_vm.dart index c689212035..f00f4baffc 100644 --- a/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_vm.dart +++ b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_vm.dart @@ -4,6 +4,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'multiple_clients_server.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); diff --git a/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_web.dart index 91cfc76aef..3f71aa75cb 100644 --- a/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_web.dart +++ b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_server_web.dart @@ -3,6 +3,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', diff --git a/pkgs/http_client_conformance_tests/lib/src/multiple_clients_tests.dart b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_tests.dart index 8f8dc813a2..ad40d4a1a9 100644 --- a/pkgs/http_client_conformance_tests/lib/src/multiple_clients_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/multiple_clients_tests.dart @@ -21,7 +21,7 @@ void testMultipleClients(Client Function() clientFactory) async { setUpAll(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); tearDownAll(() => httpServerChannel.sink.add(null)); diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_server_vm.dart index 7f9cf8c182..4a9450a1f5 100644 --- a/pkgs/http_client_conformance_tests/lib/src/redirect_server_vm.dart +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_server_vm.dart @@ -4,6 +4,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'redirect_server.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_server_web.dart index 0fbe8a3877..a5fb0f2880 100644 --- a/pkgs/http_client_conformance_tests/lib/src/redirect_server_web.dart +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_server_web.dart @@ -3,6 +3,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart index 600becc0fe..47a77a7dbf 100644 --- a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart @@ -23,7 +23,7 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { setUpAll(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); tearDownAll(() => httpServerChannel.sink.add(null)); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_server_vm.dart index 2260766216..d2e1e4a185 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_server_vm.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_server_vm.dart @@ -4,6 +4,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'request_body_server.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_server_web.dart index 250bd52668..6b6ab0076a 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_server_web.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_server_web.dart @@ -3,6 +3,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_vm.dart index 9f58119bf2..c343d68309 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_vm.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_vm.dart @@ -4,6 +4,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'request_body_streamed_server.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_web.dart index 97e8fbc689..41477eef4d 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_web.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_server_web.dart @@ -3,6 +3,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart index 8c0c658e11..0f43505f53 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_streamed_tests.dart @@ -29,7 +29,7 @@ void testRequestBodyStreamed(Client client, setUp(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); tearDown(() => httpServerChannel.sink.add(null)); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart index 2f13fa7fd5..fe12dd4646 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart @@ -47,7 +47,7 @@ void testRequestBody(Client client) { setUp(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); tearDown(() => httpServerChannel.sink.add(null)); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_headers_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/request_headers_server_vm.dart index 44e65659e9..dc930dc528 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_headers_server_vm.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_headers_server_vm.dart @@ -4,6 +4,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'request_headers_server.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_headers_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/request_headers_server_web.dart index 62e8d9e410..a15b69b75e 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_headers_server_web.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_headers_server_web.dart @@ -3,6 +3,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', diff --git a/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart index a6943871a8..24d94d801a 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_headers_tests.dart @@ -20,7 +20,7 @@ void testRequestHeaders(Client client) async { setUpAll(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); tearDownAll(() => httpServerChannel.sink.add(null)); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_methods_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/request_methods_server_vm.dart index 6ce6627f4c..fa25735917 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_methods_server_vm.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_methods_server_vm.dart @@ -4,6 +4,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'request_methods_server.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_methods_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/request_methods_server_web.dart index 8cddf5a175..f9c924e217 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_methods_server_web.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_methods_server_web.dart @@ -3,6 +3,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', diff --git a/pkgs/http_client_conformance_tests/lib/src/request_methods_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_methods_tests.dart index ec11387f3d..802f57eb84 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_methods_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_methods_tests.dart @@ -8,7 +8,7 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; import 'request_methods_server_vm.dart' - if (dart.library.html) 'request_methods_server_web.dart'; + if (dart.library.js_interop) 'request_methods_server_web.dart'; /// Tests that the [Client] correctly sends HTTP request methods /// (e.g. GET, HEAD). @@ -25,7 +25,7 @@ void testRequestMethods(Client client, setUpAll(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); tearDownAll(() => httpServerChannel.sink.add(null)); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_server_vm.dart index f88e065c8f..a12b6fb446 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_server_vm.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_server_vm.dart @@ -4,6 +4,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'response_body_server.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_server_web.dart index 94bdaa90b0..4d23a48a50 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_server_web.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_server_web.dart @@ -3,6 +3,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_vm.dart index 01d84a1475..4e4eaff730 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_vm.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_vm.dart @@ -4,6 +4,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'response_body_streamed_server.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_web.dart index a9ce00b415..e04ebd622b 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_web.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_server_web.dart @@ -3,6 +3,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart index b8afa3deb1..f355d6c8de 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_streamed_test.dart @@ -28,7 +28,7 @@ void testResponseBodyStreamed(Client client, setUpAll(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); tearDownAll(() => httpServerChannel.sink.add(null)); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart index ba833f4a1b..34c29f66ae 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_body_tests.dart @@ -26,7 +26,7 @@ void testResponseBody(Client client, setUpAll(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); tearDownAll(() => httpServerChannel.sink.add(null)); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_server_vm.dart index b7d4a01a3d..c99a021d1a 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_headers_server_vm.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_server_vm.dart @@ -4,6 +4,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'response_headers_server.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_server_web.dart index 8ee938a36f..0e6dabd17a 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_headers_server_web.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_server_web.dart @@ -3,6 +3,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart index 6a3647b196..84f0fb67f8 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart @@ -20,7 +20,7 @@ void testResponseHeaders(Client client) async { setUp(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); test('single header', () async { diff --git a/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_vm.dart index ff2ea84f02..053bd111a9 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_vm.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_vm.dart @@ -4,6 +4,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'response_status_line_server.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_web.dart index f1ebbcbd3a..d70a325a50 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_web.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_server_web.dart @@ -3,6 +3,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', diff --git a/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart index 12fb29c13a..6eb70c518b 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_status_line_tests.dart @@ -23,7 +23,7 @@ void testResponseStatusLine(Client client) async { setUp(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); test('complete', () async { diff --git a/pkgs/http_client_conformance_tests/lib/src/server_errors_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/server_errors_server_vm.dart index 257adcfa61..e5aa09fa60 100644 --- a/pkgs/http_client_conformance_tests/lib/src/server_errors_server_vm.dart +++ b/pkgs/http_client_conformance_tests/lib/src/server_errors_server_vm.dart @@ -4,6 +4,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'server_errors_server.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server in the same process. Future> startServer() async { final controller = StreamChannelController(sync: true); diff --git a/pkgs/http_client_conformance_tests/lib/src/server_errors_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/server_errors_server_web.dart index cc763e389f..9614f3601d 100644 --- a/pkgs/http_client_conformance_tests/lib/src/server_errors_server_web.dart +++ b/pkgs/http_client_conformance_tests/lib/src/server_errors_server_web.dart @@ -3,6 +3,8 @@ import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + /// Starts the redirect test HTTP server out-of-process. Future> startServer() async => spawnHybridUri(Uri( scheme: 'package', diff --git a/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart b/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart index 0e45bc59b9..1a83696853 100644 --- a/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/server_errors_test.dart @@ -20,7 +20,7 @@ void testServerErrors(Client client, {bool redirectAlwaysAllowed = false}) { setUpAll(() async { httpServerChannel = await startServer(); httpServerQueue = StreamQueue(httpServerChannel.stream); - host = 'localhost:${await httpServerQueue.next}'; + host = 'localhost:${await httpServerQueue.nextAsInt}'; }); tearDownAll(() => httpServerChannel.sink.add(null)); diff --git a/pkgs/http_client_conformance_tests/lib/src/server_queue_helpers.dart b/pkgs/http_client_conformance_tests/lib/src/server_queue_helpers.dart new file mode 100644 index 0000000000..df87ddd177 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/server_queue_helpers.dart @@ -0,0 +1,10 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; + +extension StreamQueueOfNullableObjectExtension on StreamQueue { + /// When run under dart2wasm, JSON numbers are always returned as [double]. + Future get nextAsInt async => ((await next) as num).toInt(); +} From 042c01dfe2ab8c2b3dc539c6ebb03c86061c0d37 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 4 Dec 2023 13:40:28 -0800 Subject: [PATCH 291/448] Document how to use replacement `Client` implementations (#1063) --- pkgs/http/README.md | 180 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 178 insertions(+), 2 deletions(-) diff --git a/pkgs/http/README.md b/pkgs/http/README.md index c889f2b54a..689e8fbe4e 100644 --- a/pkgs/http/README.md +++ b/pkgs/http/README.md @@ -4,8 +4,8 @@ A composable, Future-based library for making HTTP requests. This package contains a set of high-level functions and classes that make it -easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, -and the browser. +easy to consume HTTP resources. It's multi-platform (mobile, desktop, and +browser) and supports multiple implementations. ## Using @@ -23,6 +23,11 @@ print('Response body: ${response.body}'); print(await http.read(Uri.https('example.com', 'foobar.txt'))); ``` +> [!NOTE] +> Flutter applications may require +> [additional configuration](https://docs.flutter.dev/data-and-backend/networking#platform-notes) +> to make HTTP requests. + If you're making multiple requests to the same server, you can keep open a persistent connection by using a [Client][] rather than making one-off requests. If you do this, make sure to close the client when you're done: @@ -41,6 +46,12 @@ try { } ``` +> [!TIP] +> For detailed background information and practical usage examples, see: +> - [Dart Development: Fetch data from the internet](https://dart.dev/tutorials/server/fetch-data) +> - [Flutter Cookbook: Fetch data from the internet](https://docs.flutter.dev/cookbook/networking/fetch-data) +> - [The Flutter HTTP example application][flutterhttpexample] + You can also exert more fine-grained control over your requests and responses by creating [Request][] or [StreamedRequest][] objects yourself and passing them to [Client.send][]. @@ -100,3 +111,168 @@ and increases the delay by 1.5x each time. All of this can be customized using the [`RetryClient()`][new RetryClient] constructor. [new RetryClient]: https://pub.dev/documentation/http/latest/retry/RetryClient/RetryClient.html + +## Choosing an implementation + +There are multiple implementations of the `package:http` [`Client`][client] interface. By default, `package:http` uses [`BrowserClient`][browserclient] on the web and [`IOClient`][ioclient] on all other platforms. You an choose a different [`Client`][client] implementation based on the needs of your application. + +You can change implementations without changing your application code, except +for a few lines of [configuration](#2-configure-the-http-client). + +Some well supported implementations are: + +| Implementation | Supported Platforms | SDK | Caching | HTTP3/QUIC | Platform Native | +| -------------- | ------------------- | ----| ------- | ---------- | --------------- | +| `package:http` — [`IOClient`][ioclient] | Android, iOS, Linux, macOS, Windows | Dart, Flutter | ❌ | ❌ | ❌ | +| `package:http` — [`BrowserClient`][browserclient] | Web | Flutter | ― | ✅︎ | ✅︎ | Dart, Flutter | +| [`package:cupertino_http`][cupertinohttp] — [`CupertinoClient`][cupertinoclient] | iOS, macOS | Flutter | ✅︎ | ✅︎ | ✅︎ | +| [`package:cronet_http`][cronethttp] — [`CronetClient`][cronetclient] | Android | Flutter | ✅︎ | ✅︎ | ― | +| [`package:fetch_client`][fetch] — [`FetchClient`][fetchclient] | Web | Dart, Flutter | ✅︎ | ✅︎ | ✅︎ | + +> [!TIP] +> If you are writing a Dart package or Flutter pluggin that uses +> `package:http`, you should not depend on a particular [`Client`][client] +> implementation. Let the application author decide what implementation is +> best for their project. You can make that easier by accepting an explicit +> [`Client`][client] argument. For example: +> +> ```dart +> Future fetchAlbum({Client? client}) async { +> client ??= Client(); +> ... +> } +> ``` + +## Configuration + +To use a HTTP client implementation other than the default, you must: +1. Add the HTTP client as a dependency. +2. Configure the HTTP client. +3. Connect the HTTP client to the code that uses it. + +### 1. Add the HTTP client as a dependency. + +To add a package compatible with the Dart SDK to your project, use `dart pub add`. + +For example: + +```terminal +# Replace "fetch_client" with the package that you want to use. +dart pub add fetch_client +``` + +To add a package that requires the Flutter SDK, use `flutter pub add`. + +For example: + +```terminal +# Replace "cupertino_http" with the package that you want to use. +flutter pub add cupertino_http +``` + +### 2. Configure the HTTP client. + +Different `package:http` [`Client`][client] implementations may require +different configuration options. + +Add a function that returns a correctly configured [`Client`][client]. You can +return a different [`Client`][client] on different platforms. + +For example: + +```dart +Client httpClient() { + if (Platform.isAndroid) { + final engine = CronetEngine.build( + cacheMode: CacheMode.memory, + cacheMaxSize: 1000000); + return CronetClient.fromCronetEngine(engine); + } + if (Platform.isIOS || Platform.isMacOS) { + final config = URLSessionConfiguration.ephemeralSessionConfiguration() + ..cache = URLCache.withCapacity(memoryCapacity: 1000000); + return CupertinoClient.fromSessionConfiguration(config); + } + return IOClient(); +} +``` + +> [!TIP] +> [The Flutter HTTP example application][flutterhttpexample] demonstrates +> configuration best practices. + +#### Supporting browser and native + +If your application can be run in the browser and natively, you must put your +browser and native configurations in seperate files and import the correct file +based on the platform. + +For example: + +```dart +// -- http_client_factory.dart +Client httpClient() { + if (Platform.isAndroid) { + return CronetClient.defaultCronetEngine(); + } + if (Platform.isIOS || Platform.isMacOS) { + return CupertinoClient.defaultSessionConfiguration(); + } + return IOClient(); +} +``` + +```dart +// -- http_client_factory_web.dart +Client httpClient() => FetchClient(); +``` + +```dart +// -- main.dart +import 'http_client_factory.dart' + if (dart.library.js_interop) 'http_client_factory_web.dart' + +// The correct `httpClient` will be available. +``` + +### 3. Connect the HTTP client to the code that uses it. + +The best way to pass [`Client`][client] to the places that use it is +explicitly through arguments. + +For example: + +```dart +void main() { + final client = httpClient(); + fetchAlbum(client, ...); +} +``` + +In Flutter, you can use a one of many +[state mangement approaches][flutterstatemanagement]. + +If you depend on code that uses top-level functions (e.g. `http.post`) or +calls the [`Client()`][clientconstructor] constructor, then you can use +[`runWithClient`](runwithclient) to ensure that the correct +[`Client`][client] is used. + +> [!TIP] +> [The Flutter HTTP example application][flutterhttpexample] demonstrates +> how to make the configured [`Client`][client] available using +> [`package:provider`][provider] and [`runWithClient`](runwithclient). + +[browserclient]: https://pub.dev/documentation/http/latest/browser_client/BrowserClient-class.html +[client]: https://pub.dev/documentation/http/latest/http/Client-class.html +[clientconstructor]: https://pub.dev/documentation/http/latest/http/Client/Client.html +[cupertinohttp]: https://pub.dev/packages/cupertino_http +[cupertinoclient]: https://pub.dev/documentation/cupertino_http/latest/cupertino_http/CupertinoClient-class.html +[cronethttp]: https://pub.dev/packages/cronet_http +[cronetclient]: https://pub.dev/documentation/cronet_http/latest/cronet_http/CronetClient-class.html +[fetch]: https://pub.dev/packages/fetch_client +[fetchclient]: https://pub.dev/documentation/fetch_client/latest/fetch_client/FetchClient-class.html +[flutterhttpexample]: https://github.com/dart-lang/http/tree/master/pkgs/flutter_http_example +[ioclient]: https://pub.dev/documentation/http/latest/io_client/IOClient-class.html +[flutterstatemanagement]: https://docs.flutter.dev/data-and-backend/state-mgmt/options +[provider]: https://pub.dev/packages/provider +[runwithclient]: https://pub.dev/documentation/http/latest/http/runWithClient.html From 60191b254729582ec1d7d429d37f4970b3fda745 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 4 Dec 2023 14:26:00 -0800 Subject: [PATCH 292/448] Add support for setting headers for all requests (#1060) --- pkgs/cupertino_http/CHANGELOG.md | 5 ++- .../url_session_configuration_test.dart | 44 +++++++++++++++++++ pkgs/cupertino_http/example/lib/main.dart | 5 ++- .../cupertino_http/lib/src/cupertino_api.dart | 27 ++++++++++++ pkgs/cupertino_http/pubspec.yaml | 2 +- 5 files changed, 80 insertions(+), 3 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 48d990e185..47e25cb590 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,4 +1,7 @@ -## 1.1.1-wip +## 1.2.0-wip + +* Add support for setting additional http headers in + `URLSessionConfiguration`. ## 1.1.0 diff --git a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart index 85386bcd90..ab117c37d0 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart @@ -2,10 +2,38 @@ // for details. All rights reserved. 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:cupertino_http/cupertino_http.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; +/// Make a HTTP request using the given configuration and return the headers +/// received by the server. +Future>> sentHeaders( + URLSessionConfiguration config) async { + final session = URLSession.sessionWithConfiguration(config); + final headers = >{}; + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + request.headers.forEach((k, v) => headers[k] = v); + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.write('Hello World'); + await request.response.close(); + }); + + final task = session.dataTaskWithRequest(URLRequest.fromUrl( + Uri(scheme: 'http', host: 'localhost', port: server.port))) + ..resume(); + while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + await pumpEventQueue(); + } + + await server.close(); + return headers; +} + void testProperties(URLSessionConfiguration config) { group('properties', () { test('allowsCellularAccess', () { @@ -32,6 +60,22 @@ void testProperties(URLSessionConfiguration config) { config.discretionary = false; expect(config.discretionary, false); }); + test('httpAdditionalHeaders', () async { + expect(config.httpAdditionalHeaders, isNull); + + config.httpAdditionalHeaders = { + 'User-Agent': 'My Client', + 'MyHeader': 'myvalue' + }; + expect(config.httpAdditionalHeaders, + {'User-Agent': 'My Client', 'MyHeader': 'myvalue'}); + final headers = await sentHeaders(config); + expect(headers, containsPair('user-agent', ['My Client'])); + expect(headers, containsPair('myheader', ['myvalue'])); + + config.httpAdditionalHeaders = null; + expect(config.httpAdditionalHeaders, isNull); + }); test('httpCookieAcceptPolicy', () { config.httpCookieAcceptPolicy = HTTPCookieAcceptPolicy.httpCookieAcceptPolicyAlways; diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index edfceac92e..32c2b08980 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -15,7 +15,10 @@ import 'book.dart'; void main() { var clientFactory = Client.new; // The default Client. if (Platform.isIOS || Platform.isMacOS) { - clientFactory = CupertinoClient.defaultSessionConfiguration.call; + final config = URLSessionConfiguration.ephemeralSessionConfiguration() + ..cache = URLCache.withCapacity(memoryCapacity: 2 * 1024 * 1024) + ..httpAdditionalHeaders = {'User-Agent': 'Book Agent'}; + clientFactory = () => CupertinoClient.fromSessionConfiguration(config); } runWithClient(() => runApp(const BookSearchApp()), clientFactory); } diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 01c4853b1c..5cebd7ed42 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -344,6 +344,32 @@ class URLSessionConfiguration bool get discretionary => _nsObject.discretionary; set discretionary(bool value) => _nsObject.discretionary = value; + /// Additional headers to send with each request. + /// + /// Note that the getter for this field returns a **copy** of the headers. + /// + /// See [NSURLSessionConfiguration.HTTPAdditionalHeaders](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411532-httpadditionalheaders) + Map? get httpAdditionalHeaders { + if (_nsObject.HTTPAdditionalHeaders case var additionalHeaders?) { + final headers = ncb.NSDictionary.castFrom(additionalHeaders); + return stringDictToMap(headers); + } + return null; + } + + set httpAdditionalHeaders(Map? headers) { + if (headers == null) { + _nsObject.HTTPAdditionalHeaders = null; + return; + } + final d = ncb.NSMutableDictionary.alloc(linkedLibs).init(); + headers.forEach((key, value) { + d.setObject_forKey_( + value.toNSString(linkedLibs), key.toNSString(linkedLibs)); + }); + _nsObject.HTTPAdditionalHeaders = d; + } + /// What policy to use when deciding whether to accept cookies. /// /// See [NSURLSessionConfiguration.HTTPCookieAcceptPolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408933-httpcookieacceptpolicy). @@ -441,6 +467,7 @@ class URLSessionConfiguration 'allowsConstrainedNetworkAccess=$allowsConstrainedNetworkAccess ' 'allowsExpensiveNetworkAccess=$allowsExpensiveNetworkAccess ' 'discretionary=$discretionary ' + 'httpAdditionalHeaders=$httpAdditionalHeaders ' 'httpCookieAcceptPolicy=$httpCookieAcceptPolicy ' 'httpShouldSetCookies=$httpShouldSetCookies ' 'httpMaximumConnectionsPerHost=$httpMaximumConnectionsPerHost ' diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 824a581b8a..81905aa87e 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 1.1.1-wip +version: 1.2.0-wip description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. From e888d9fdc43132232d585320dcbf45d298771c1d Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 4 Dec 2023 15:24:33 -0800 Subject: [PATCH 293/448] Add documentation for "no_default_http_client" (#1068) --- pkgs/http/README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/http/README.md b/pkgs/http/README.md index 689e8fbe4e..8ce106d43e 100644 --- a/pkgs/http/README.md +++ b/pkgs/http/README.md @@ -255,7 +255,17 @@ In Flutter, you can use a one of many If you depend on code that uses top-level functions (e.g. `http.post`) or calls the [`Client()`][clientconstructor] constructor, then you can use [`runWithClient`](runwithclient) to ensure that the correct -[`Client`][client] is used. +`Client` is used. + +You can ensure that only the `Client` that you have explicitly configured is +used by defining `no_default_http_client=true` in the environment. This will +also allow the default `Client` implementation to be removed, resulting in +a reduced application size. + +```terminal +$ flutter build appbundle --dart-define=no_default_http_client=true ... +$ dart compile exe --define=no_default_http_client=true ... +``` > [!TIP] > [The Flutter HTTP example application][flutterhttpexample] demonstrates From 78f12751ed69b6090e44b9b1bac4415bb88cd9d7 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 4 Dec 2023 15:34:53 -0800 Subject: [PATCH 294/448] Test persistentConnection with large request bodies (#984) --- .../lib/src/request_body_tests.dart | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart index fe12dd4646..901f7f7ed5 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart @@ -260,6 +260,47 @@ void testRequestBody(Client client) { expect(serverReceivedBody.codeUnits, []); }); + test('client.send() with persistentConnection', () async { + // Do five requests to verify that the connection persistance logic is + // correct. + for (var i = 0; i < 5; ++i) { + final request = Request('POST', Uri.http(host, '')) + ..headers['Content-Type'] = 'text/plain; charset=utf-8' + ..persistentConnection = true + ..body = 'Hello World $i'; + + final response = await client.send(request); + expect(response.statusCode, 200); + + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next as String; + + expect(serverReceivedContentType, ['text/plain; charset=utf-8']); + expect(serverReceivedBody, 'Hello World $i'); + } + }); + + test('client.send() with persistentConnection and body >64K', () async { + // 64KiB is special for the HTTP network API: + // https://fetch.spec.whatwg.org/#http-network-or-cache-fetch + // See https://github.com/dart-lang/http/issues/977 + final body = ''.padLeft(64 * 1024, 'XYZ'); + + final request = Request('POST', Uri.http(host, '')) + ..headers['Content-Type'] = 'text/plain; charset=utf-8' + ..persistentConnection = true + ..body = body; + + final response = await client.send(request); + expect(response.statusCode, 200); + + final serverReceivedContentType = await httpServerQueue.next; + final serverReceivedBody = await httpServerQueue.next as String; + + expect(serverReceivedContentType, ['text/plain; charset=utf-8']); + expect(serverReceivedBody, body); + }); + test('client.send() GET with non-empty stream', () async { final request = StreamedRequest('GET', Uri.http(host, '')); request.headers['Content-Type'] = 'image/png'; From 98731e05f7fa114fcaa19c8458579b3744a717a1 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 4 Dec 2023 16:30:31 -0800 Subject: [PATCH 295/448] Document that runWithClient must be called for every isolate (#1069) --- pkgs/http/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/http/README.md b/pkgs/http/README.md index 8ce106d43e..157a52f678 100644 --- a/pkgs/http/README.md +++ b/pkgs/http/README.md @@ -255,7 +255,9 @@ In Flutter, you can use a one of many If you depend on code that uses top-level functions (e.g. `http.post`) or calls the [`Client()`][clientconstructor] constructor, then you can use [`runWithClient`](runwithclient) to ensure that the correct -`Client` is used. +`Client` is used. When an [Isolate][isolate] is spawned, it does not inherit +any variables from the calling Zone, so `runWithClient` needs to be used in +each Isolate that uses `package:http`. You can ensure that only the `Client` that you have explicitly configured is used by defining `no_default_http_client=true` in the environment. This will @@ -283,6 +285,7 @@ $ dart compile exe --define=no_default_http_client=true ... [fetchclient]: https://pub.dev/documentation/fetch_client/latest/fetch_client/FetchClient-class.html [flutterhttpexample]: https://github.com/dart-lang/http/tree/master/pkgs/flutter_http_example [ioclient]: https://pub.dev/documentation/http/latest/io_client/IOClient-class.html +[isolate]: https://dart.dev/language/concurrency#how-isolates-work [flutterstatemanagement]: https://docs.flutter.dev/data-and-backend/state-mgmt/options [provider]: https://pub.dev/packages/provider [runwithclient]: https://pub.dev/documentation/http/latest/http/runWithClient.html From baf4886a13f37d48f4db7c3e52182f33072ed518 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 7 Dec 2023 14:13:56 -0800 Subject: [PATCH 296/448] Provide an example of configuring IOClient with an HttpClient. (#1074) --- pkgs/http/lib/src/io_client.dart | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/http/lib/src/io_client.dart b/pkgs/http/lib/src/io_client.dart index 247cc8cad6..db66b028c4 100644 --- a/pkgs/http/lib/src/io_client.dart +++ b/pkgs/http/lib/src/io_client.dart @@ -72,6 +72,18 @@ class IOClient extends BaseClient { /// The underlying `dart:io` HTTP client. HttpClient? _inner; + /// Create a new `dart:io`-based HTTP [Client]. + /// + /// If [inner] is provided then it can be used to provide configuration + /// options for the client. + /// + /// For example: + /// ```dart + /// final httpClient = HttpClient() + /// ..userAgent = 'Book Agent' + /// ..idleTimeout = const Duration(seconds: 5); + /// final client = IOClient(httpClient); + /// ``` IOClient([HttpClient? inner]) : _inner = inner ?? HttpClient(); /// Sends an HTTP request and asynchronously returns the response. From 6c9893affe8219fdf542731b9450af9e36a5343f Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 12 Dec 2023 10:12:34 -0800 Subject: [PATCH 297/448] Fix a bug where BrowserClient was listed as requiring Flutter (#1077) --- pkgs/http/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/http/README.md b/pkgs/http/README.md index 157a52f678..642c238035 100644 --- a/pkgs/http/README.md +++ b/pkgs/http/README.md @@ -124,7 +124,7 @@ Some well supported implementations are: | Implementation | Supported Platforms | SDK | Caching | HTTP3/QUIC | Platform Native | | -------------- | ------------------- | ----| ------- | ---------- | --------------- | | `package:http` — [`IOClient`][ioclient] | Android, iOS, Linux, macOS, Windows | Dart, Flutter | ❌ | ❌ | ❌ | -| `package:http` — [`BrowserClient`][browserclient] | Web | Flutter | ― | ✅︎ | ✅︎ | Dart, Flutter | +| `package:http` — [`BrowserClient`][browserclient] | Web | Dart, Flutter | ― | ✅︎ | ✅︎ | Dart, Flutter | | [`package:cupertino_http`][cupertinohttp] — [`CupertinoClient`][cupertinoclient] | iOS, macOS | Flutter | ✅︎ | ✅︎ | ✅︎ | | [`package:cronet_http`][cronethttp] — [`CronetClient`][cronetclient] | Android | Flutter | ✅︎ | ✅︎ | ― | | [`package:fetch_client`][fetch] — [`FetchClient`][fetchclient] | Web | Dart, Flutter | ✅︎ | ✅︎ | ✅︎ | From f2a13b1b513d678ca0d5308fa8c2c5909b522053 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 14 Dec 2023 09:07:03 -0800 Subject: [PATCH 298/448] Run web tests with wasm with dev Dart sdk (#1078) --- .github/workflows/dart.yml | 44 +++++++++++++++++++++++++++++++++++--- pkgs/http/mono_pkg.yaml | 2 ++ tool/ci.sh | 4 ++++ 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index baebff25d7..3cb8d19d33 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -540,6 +540,44 @@ jobs: - job_006 - job_007 job_015: + name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_4" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + with: + sdk: dev + - id: checkout + name: Checkout repository + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + - name: "pkgs/http; dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm" + run: "dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm" + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + needs: + - job_001 + - job_002 + - job_003 + - job_004 + - job_005 + - job_006 + - job_007 + job_016: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test --platform chrome`" runs-on: ubuntu-latest steps: @@ -577,7 +615,7 @@ jobs: - job_005 - job_006 - job_007 - job_016: + job_017: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: ubuntu-latest steps: @@ -615,7 +653,7 @@ jobs: - job_005 - job_006 - job_007 - job_017: + job_018: name: "unit_test; macos; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: macos-latest steps: @@ -653,7 +691,7 @@ jobs: - job_005 - job_006 - job_007 - job_018: + job_019: name: "unit_test; windows; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: windows-latest steps: diff --git a/pkgs/http/mono_pkg.yaml b/pkgs/http/mono_pkg.yaml index 0e2f9d8aa7..06f79d9816 100644 --- a/pkgs/http/mono_pkg.yaml +++ b/pkgs/http/mono_pkg.yaml @@ -18,3 +18,5 @@ stages: - command: dart run --define=no_default_http_client=true test/no_default_http_client_test.dart os: - linux + - test: --test-randomize-ordering-seed=random -p chrome -c dart2wasm + sdk: dev diff --git a/tool/ci.sh b/tool/ci.sh index 44ea987b60..d4cc8d2ee6 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -95,6 +95,10 @@ for PKG in ${PKGS}; do echo 'dart test --platform chrome' dart test --platform chrome || EXIT_CODE=$? ;; + test_4) + echo 'dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm' + dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm || EXIT_CODE=$? + ;; *) echo -e "\033[31mUnknown TASK '${TASK}' - TERMINATING JOB\033[0m" exit 64 From 514197e4231d888b2bb9b7161df1e4c6237edf9b Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 15 Dec 2023 15:25:53 -0800 Subject: [PATCH 299/448] Add a fake response for PNG images (#1081) --- pkgs/http/CHANGELOG.md | 4 ++++ pkgs/http/lib/src/mock_client.dart | 18 ++++++++++++++++++ pkgs/http/pubspec.yaml | 2 +- pkgs/http/test/mock_client_test.dart | 22 ++++++++++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 9bbbb05a2d..7b8dec4fdd 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.1.3-wip + +* Add `MockClient.pngResponse`, which makes it easier to fake image responses. + ## 1.1.2 * Allow `web: '>=0.3.0 <0.5.0'`. diff --git a/pkgs/http/lib/src/mock_client.dart b/pkgs/http/lib/src/mock_client.dart index bf2df40ee7..52f108a577 100644 --- a/pkgs/http/lib/src/mock_client.dart +++ b/pkgs/http/lib/src/mock_client.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'dart:convert'; + import 'base_client.dart'; import 'base_request.dart'; import 'byte_stream.dart'; @@ -10,6 +12,11 @@ import 'response.dart'; import 'streamed_request.dart'; import 'streamed_response.dart'; +final _pngImageData = base64Decode( + 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDw' + 'AEhQGAhKmMIQAAAABJRU5ErkJggg==', +); + // TODO(nweiz): once Dart has some sort of Rack- or WSGI-like standard for // server APIs, MockClient should conform to it. @@ -69,6 +76,17 @@ class MockClient extends BaseClient { var bodyStream = request.finalize(); return await _handler(request, bodyStream); } + + /// Return a response containing a PNG image. + static Response pngResponse({BaseRequest? request}) { + final headers = { + 'content-type': 'image/png', + 'content-length': '${_pngImageData.length}' + }; + + return Response.bytes(_pngImageData, 200, + request: request, headers: headers, reasonPhrase: 'OK'); + } } /// A handler function that receives [StreamedRequest]s and sends diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 118292fa13..1645f96048 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.1.2 +version: 1.1.3-wip description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http diff --git a/pkgs/http/test/mock_client_test.dart b/pkgs/http/test/mock_client_test.dart index db561c51d6..625285cb33 100644 --- a/pkgs/http/test/mock_client_test.dart +++ b/pkgs/http/test/mock_client_test.dart @@ -5,6 +5,7 @@ import 'dart:convert'; import 'package:http/http.dart' as http; +import 'package:http/src/request.dart'; import 'package:http/testing.dart'; import 'package:test/test.dart'; @@ -43,4 +44,25 @@ void main() { expect(await client.read(Uri.http('example.com', '/foo')), equals('you did it')); }); + + test('pngResponse with default options', () { + final response = MockClient.pngResponse(); + expect(response.statusCode, 200); + expect(response.bodyBytes.take(8), + [137, 80, 78, 71, 13, 10, 26, 10] // PNG header + ); + expect(response.request, null); + expect(response.headers, containsPair('content-type', 'image/png')); + }); + + test('pngResponse with request', () { + final request = Request('GET', Uri.https('example.com')); + final response = MockClient.pngResponse(request: request); + expect(response.statusCode, 200); + expect(response.bodyBytes.take(8), + [137, 80, 78, 71, 13, 10, 26, 10] // PNG header + ); + expect(response.request, request); + expect(response.headers, containsPair('content-type', 'image/png')); + }); } From cbc93d188bc6a27eee58cdad6071d42633a6c8ac Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 18 Dec 2023 16:40:19 -0800 Subject: [PATCH 300/448] Prepare to publish cupertino 1.2.0 (#1080) --- pkgs/cupertino_http/CHANGELOG.md | 2 +- pkgs/cupertino_http/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 47e25cb590..d768f7a5c7 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.2.0-wip +## 1.2.0 * Add support for setting additional http headers in `URLSessionConfiguration`. diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 81905aa87e..0a97bdd25d 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 1.2.0-wip +version: 1.2.0 description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. From e895825f6a0b29a777ad87bf6ab968732a099bad Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 22 Dec 2023 03:37:12 +0800 Subject: [PATCH 301/448] [cronet_http] Enables CI for `cronet_http_embedded` (#1070) --- .github/workflows/cronet.yml | 51 +++++++++---------- pkgs/cronet_http/android/build.gradle | 11 ++-- .../example/android/app/build.gradle | 2 +- .../android/app/src/debug/AndroidManifest.xml | 2 +- .../android/app/src/main/AndroidManifest.xml | 2 +- .../plugins/GeneratedPluginRegistrant.java | 22 +++++--- .../cronet_http_example/MainActivity.kt | 2 +- .../app/src/profile/AndroidManifest.xml | 2 +- pkgs/cronet_http/example/android/build.gradle | 6 +-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../tool/prepare_for_embedded.dart | 42 +++++++++++++-- 11 files changed, 96 insertions(+), 48 deletions(-) rename pkgs/cronet_http/example/android/app/src/main/kotlin/{com/example => io/flutter}/cronet_http_example/MainActivity.kt (70%) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 7bc1a4f089..37e38d5415 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -6,10 +6,12 @@ on: - main - master paths: + - '.github/workflows/**' - 'pkgs/cronet_http/**' - 'pkgs/http_client_conformance_tests/**' pull_request: paths: + - '.github/workflows/**' - 'pkgs/cronet_http/**' - 'pkgs/http_client_conformance_tests/**' schedule: @@ -19,48 +21,45 @@ env: PUB_ENVIRONMENT: bot.github jobs: - analyze: - name: Lint and static analysis - runs-on: ubuntu-latest - defaults: - run: - working-directory: pkgs/cronet_http + verify: + name: Format & Analyze & Test + runs-on: macos-latest + strategy: + matrix: + package: ['cronet_http', 'cronet_http_embedded'] steps: - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' - uses: subosito/flutter-action@v2 with: - # TODO: Change to 'stable' when a release version of flutter - # pins version 1.21.1 or later of 'package:test' - channel: 'master' + channel: 'stable' + - name: Make cronet_http_embedded copy + if: ${{ matrix.package == 'cronet_http_embedded' }} + run: | + cp -r pkgs/cronet_http pkgs/cronet_http_embedded + cd pkgs/cronet_http_embedded + flutter pub get && dart tool/prepare_for_embedded.dart - id: install name: Install dependencies + working-directory: 'pkgs/${{ matrix.package }}' run: flutter pub get - name: Check formatting + working-directory: 'pkgs/${{ matrix.package }}' run: dart format --output=none --set-exit-if-changed . if: always() && steps.install.outcome == 'success' - name: Analyze code + working-directory: 'pkgs/${{ matrix.package }}' run: flutter analyze --fatal-infos if: always() && steps.install.outcome == 'success' - - test: - # Test package:cupertino_http use flutter integration tests. - needs: analyze - name: "Build and test" - runs-on: macos-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: 'zulu' - java-version: '17' - - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - name: Run tests uses: reactivecircus/android-emulator-runner@v2 + if: always() && steps.install.outcome == 'success' with: api-level: 28 - target: playstore + target: ${{ matrix.package == 'cronet_http_embedded' && 'default' || 'playstore' }} arch: x86_64 profile: pixel - script: cd ./pkgs/cronet_http/example && flutter test --timeout=1200s integration_test/ + script: cd 'pkgs/${{ matrix.package }}/example' && flutter test --timeout=1200s integration_test/ diff --git a/pkgs/cronet_http/android/build.gradle b/pkgs/cronet_http/android/build.gradle index 3a91d8a295..164d96e104 100644 --- a/pkgs/cronet_http/android/build.gradle +++ b/pkgs/cronet_http/android/build.gradle @@ -2,14 +2,14 @@ group 'io.flutter.plugins.cronet_http' version '1.0-SNAPSHOT' buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -25,6 +25,11 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { + // Conditional for compatibility with AGP <4.2. + if (project.android.hasProperty("namespace")) { + namespace 'io.flutter.plugins.cronet_http' + } + compileSdkVersion 31 compileOptions { @@ -41,7 +46,7 @@ android { } defaultConfig { - minSdkVersion 16 + minSdkVersion 19 } defaultConfig { diff --git a/pkgs/cronet_http/example/android/app/build.gradle b/pkgs/cronet_http/example/android/app/build.gradle index 88b33564c3..02e4b7551e 100644 --- a/pkgs/cronet_http/example/android/app/build.gradle +++ b/pkgs/cronet_http/example/android/app/build.gradle @@ -46,7 +46,7 @@ android { applicationId "io.flutter.cronet_http_example" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion flutter.minSdkVersion + minSdkVersion 21 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/pkgs/cronet_http/example/android/app/src/debug/AndroidManifest.xml b/pkgs/cronet_http/example/android/app/src/debug/AndroidManifest.xml index b17be9f3cb..6170951031 100644 --- a/pkgs/cronet_http/example/android/app/src/debug/AndroidManifest.xml +++ b/pkgs/cronet_http/example/android/app/src/debug/AndroidManifest.xml @@ -1,4 +1,4 @@ + package="io.flutter.cronet_http_example"> diff --git a/pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml b/pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml index e8d5f3f208..254760d3ed 100644 --- a/pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml +++ b/pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="io.flutter.cronet_http_example"> + package="io.flutter.cronet_http_example"> diff --git a/pkgs/cronet_http/example/android/build.gradle b/pkgs/cronet_http/example/android/build.gradle index 83ae220041..954fa1cd5c 100644 --- a/pkgs/cronet_http/example/android/build.gradle +++ b/pkgs/cronet_http/example/android/build.gradle @@ -1,12 +1,12 @@ buildscript { - ext.kotlin_version = '1.6.10' + ext.kotlin_version = '1.7.21' repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties b/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties index cc5527d781..cfe88f6904 100644 --- a/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip diff --git a/pkgs/cronet_http/tool/prepare_for_embedded.dart b/pkgs/cronet_http/tool/prepare_for_embedded.dart index e0f99d7a23..2093c670b1 100644 --- a/pkgs/cronet_http/tool/prepare_for_embedded.dart +++ b/pkgs/cronet_http/tool/prepare_for_embedded.dart @@ -40,7 +40,9 @@ final _cronetVersionUri = Uri.https( 'android/maven2/org/chromium/net/group-index.xml', ); -void main() async { +/// Runs `prepare_for_embedded.dart publish` for publishing, +/// or only the Android dependency will be modified. +void main(List args) async { if (Directory.current.path.endsWith('tool')) { _packageDirectory = Directory.current.parent; } else { @@ -51,6 +53,8 @@ void main() async { updateCronetDependency(latestVersion); updatePubSpec(); updateReadme(); + updateImports(); + updateEntryPoint(); } Future _getLatestCronetVersion() async { @@ -69,7 +73,7 @@ Future _getLatestCronetVersion() async { return versions.last; } -/// Update android/build.gradle +/// Update android/build.gradle. void updateCronetDependency(String latestVersion) { final fBuildGradle = File('${_packageDirectory.path}/android/build.gradle'); final gradleContent = fBuildGradle.readAsStringSync(); @@ -88,18 +92,48 @@ void updateCronetDependency(String latestVersion) { fBuildGradle.writeAsStringSync(newGradleContent); } -/// Update pubspec.yaml +/// Update pubspec.yaml and example/pubspec.yaml. void updatePubSpec() { + print('Updating pubspec.yaml'); final fPubspec = File('${_packageDirectory.path}/pubspec.yaml'); final yamlEditor = YamlEditor(fPubspec.readAsStringSync()) ..update(['name'], _packageName) ..update(['description'], _packageDescription); fPubspec.writeAsStringSync(yamlEditor.toString()); + print('Updating example/pubspec.yaml'); + final examplePubspec = File('${_packageDirectory.path}/example/pubspec.yaml'); + final replaced = examplePubspec + .readAsStringSync() + .replaceAll('cronet_http:', 'cronet_http_embedded:'); + examplePubspec.writeAsStringSync(replaced); } -/// Move README_EMBEDDED.md to replace README.md +/// Move README_EMBEDDED.md to replace README.md. void updateReadme() { + print('Updating README.md from README_EMBEDDED.md'); File('${_packageDirectory.path}/README.md').deleteSync(); File('${_packageDirectory.path}/README_EMBEDDED.md') .renameSync('${_packageDirectory.path}/README.md'); } + +void updateImports() { + print('Updating imports in Dart files'); + for (final file in _packageDirectory.listSync(recursive: true)) { + if (file is File && file.path.endsWith('.dart')) { + final updatedSource = file.readAsStringSync().replaceAll( + 'package:cronet_http/cronet_http.dart', + 'package:cronet_http_embedded/cronet_http_embedded.dart', + ); + file.writeAsStringSync(updatedSource); + } + } +} + +void updateEntryPoint() { + print('Renaming cronet_http.dart to cronet_http_embedded.dart'); + File( + '${_packageDirectory.path}/lib/cronet_http.dart', + ).renameSync( + '${_packageDirectory.path}/lib/cronet_http_embedded.dart', + ); +} From 9ae9c170f2d60cc3565f3cb9dd307b50744dd706 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 21 Dec 2023 15:09:00 -0800 Subject: [PATCH 302/448] cronet_http: require android API level 28 (#1088) --- .github/workflows/cronet.yml | 11 +++++++---- pkgs/cronet_http/android/build.gradle | 6 +++++- pkgs/cronet_http/example/android/app/build.gradle | 6 +++++- pkgs/cronet_http/tool/prepare_for_embedded.dart | 9 +++++---- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 37e38d5415..0976a756ff 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -6,12 +6,12 @@ on: - main - master paths: - - '.github/workflows/**' + - '.github/workflows/cronet.yaml' - 'pkgs/cronet_http/**' - 'pkgs/http_client_conformance_tests/**' pull_request: paths: - - '.github/workflows/**' + - '.github/workflows/cronet.yaml' - 'pkgs/cronet_http/**' - 'pkgs/http_client_conformance_tests/**' schedule: @@ -58,8 +58,11 @@ jobs: uses: reactivecircus/android-emulator-runner@v2 if: always() && steps.install.outcome == 'success' with: + # api-level/minSdkVersion should be help in sync in: + # - .github/workflows/cronet.yml + # - pkgs/cronet_http/android/build.gradle + # - pkgs/cronet_http/example/android/app/build.gradle api-level: 28 - target: ${{ matrix.package == 'cronet_http_embedded' && 'default' || 'playstore' }} - arch: x86_64 + target: ${{ matrix.package == 'cronet_http_embedded' && 'google_apis' || 'playstore' }} profile: pixel script: cd 'pkgs/${{ matrix.package }}/example' && flutter test --timeout=1200s integration_test/ diff --git a/pkgs/cronet_http/android/build.gradle b/pkgs/cronet_http/android/build.gradle index 164d96e104..96bb197c73 100644 --- a/pkgs/cronet_http/android/build.gradle +++ b/pkgs/cronet_http/android/build.gradle @@ -46,7 +46,11 @@ android { } defaultConfig { - minSdkVersion 19 + // api-level/minSdkVersion should be help in sync in: + // - .github/workflows/cronet.yml + // - pkgs/cronet_http/android/build.gradle + // - pkgs/cronet_http/example/android/app/build.gradle + minSdkVersion 28 } defaultConfig { diff --git a/pkgs/cronet_http/example/android/app/build.gradle b/pkgs/cronet_http/example/android/app/build.gradle index 02e4b7551e..1f7cd94749 100644 --- a/pkgs/cronet_http/example/android/app/build.gradle +++ b/pkgs/cronet_http/example/android/app/build.gradle @@ -46,7 +46,11 @@ android { applicationId "io.flutter.cronet_http_example" // You can update the following values to match your application needs. // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion 21 + // api-level/minSdkVersion should be help in sync in: + // - .github/workflows/cronet.yml + // - pkgs/cronet_http/android/build.gradle + // - pkgs/cronet_http/example/android/app/build.gradle + minSdkVersion 28 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName diff --git a/pkgs/cronet_http/tool/prepare_for_embedded.dart b/pkgs/cronet_http/tool/prepare_for_embedded.dart index 2093c670b1..3442bc6843 100644 --- a/pkgs/cronet_http/tool/prepare_for_embedded.dart +++ b/pkgs/cronet_http/tool/prepare_for_embedded.dart @@ -13,6 +13,9 @@ /// 1. Modifying the Gradle build file to reference the embedded Cronet. /// 2. Modifying the *name* and *description* in `pubspec.yaml`. /// 3. Replacing `README.md` with `README_EMBEDDED.md`. +/// 4. Change the name of `cronet_http.dart` to `cronet_http_embedded.dart`. +/// 5. Update all the imports from `package:cronet_http/cronet_http.dart` to +/// `package:cronet_http_embedded/cronet_http_embedded.dart` /// /// After running this script, `flutter pub publish` /// can be run to update package:cronet_http_embedded. @@ -40,8 +43,6 @@ final _cronetVersionUri = Uri.https( 'android/maven2/org/chromium/net/group-index.xml', ); -/// Runs `prepare_for_embedded.dart publish` for publishing, -/// or only the Android dependency will be modified. void main(List args) async { if (Directory.current.path.endsWith('tool')) { _packageDirectory = Directory.current.parent; @@ -53,8 +54,8 @@ void main(List args) async { updateCronetDependency(latestVersion); updatePubSpec(); updateReadme(); + updateLibraryName(); updateImports(); - updateEntryPoint(); } Future _getLatestCronetVersion() async { @@ -129,7 +130,7 @@ void updateImports() { } } -void updateEntryPoint() { +void updateLibraryName() { print('Renaming cronet_http.dart to cronet_http_embedded.dart'); File( '${_packageDirectory.path}/lib/cronet_http.dart', From 8d1cf721837846d7eca32398d63aba014c435702 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 21 Dec 2023 15:12:31 -0800 Subject: [PATCH 303/448] Prepare to publish `package:cronet_http` as 1.0.0 (#1087) --- pkgs/cronet_http/CHANGELOG.md | 4 ++ pkgs/cronet_http/README.md | 80 ++++++++++++++++++++++++----------- pkgs/cronet_http/pubspec.yaml | 2 +- 3 files changed, 60 insertions(+), 26 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 59ef74fe62..cf1fcbc208 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.0 + +* No functional changes. + ## 0.4.2 * Require `package:jni >= 0.7.2` to remove a potential buffer overflow. diff --git a/pkgs/cronet_http/README.md b/pkgs/cronet_http/README.md index 0238eb6d63..49acf3390d 100644 --- a/pkgs/cronet_http/README.md +++ b/pkgs/cronet_http/README.md @@ -1,31 +1,61 @@ +[![pub package](https://img.shields.io/pub/v/cronet_http.svg)](https://pub.dev/packages/cronet_http) +[![package publisher](https://img.shields.io/pub/publisher/cronet_http.svg)](https://pub.dev/packages/cronet_http/publisher) + An Android Flutter plugin that provides access to the -[Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) +[Cronet][] HTTP client. Cronet is available as part of -[Google Play Services](https://developers.google.com/android/guides/overview). +[Google Play Services][]. -This package depends on -[Google Play Services](https://developers.google.com/android/guides/overview) -for its Cronet implementation. +This package depends on [Google Play Services][] for its [Cronet][] +implementation. [`package:cronet_http_embedded`](https://pub.dev/packages/cronet_http_embedded) -is functionally identical to this package but embeds Cronet directly instead -of relying on -[Google Play Services](https://developers.google.com/android/guides/overview). - -## Status: Experimental - -**NOTE**: This package is currently experimental and published under the -[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to -solicit feedback. - -For packages in the labs.dart.dev publisher we generally plan to either graduate -the package into a supported publisher (dart.dev, tools.dart.dev) after a period -of feedback and iteration, or discontinue the package. These packages have a -much higher expected rate of API and breaking changes. - -Your feedback is valuable and will help us evolve this package. -For general feedback and suggestions please comment in the -[feedback issue](https://github.com/dart-lang/http/issues/764). -For bugs, please file an issue in the -[bug tracker](https://github.com/dart-lang/http/issues). +is functionally identical to this package but embeds [Cronet][] directly +instead of relying on [Google Play Services][]. + +## Motivation + +Using [Cronet][], rather than the socket-based [dart:io HttpClient][] +implemententation, has several advantages: + +1. It automatically supports Android platform features such as HTTP proxies. +2. It supports configurable caching. +3. It supports more HTTP features such as HTTP/3. + +## Using + +The easiest way to use this library is via the the high-level interface +defined by [package:http Client][]. + +This approach allows the same HTTP code to be used on all platforms, while +still allowing platform-specific setup. + +```dart +import 'package:cronet_http/cronet_http.dart'; +import 'package:http/http.dart'; +import 'package:http/io_client.dart'; + +void main() async { + late Client httpClient; + if (Platform.isAndroid) { + final engine = CronetEngine.build( + cacheMode: CacheMode.memory, + cacheMaxSize: 2 * 1024 * 1024, + userAgent: 'Book Agent'); + httpClient = CronetClient.fromCronetEngine(engine); + } else { + httpClient = IOClient(HttpClient()..userAgent = 'Book Agent'); + } + + final response = await client.get(Uri.https( + 'www.googleapis.com', + '/books/v1/volumes', + {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'})); +} +``` + +[Cronet]: https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary +[dart:io HttpClient]: https://api.dart.dev/stable/dart-io/HttpClient-class.html +[Google Play Services]: https://developers.google.com/android/guides/overview +[package:http Client]: https://pub.dev/documentation/http/latest/http/Client-class.html diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 602a1bbfd5..5f4229ebf8 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 0.4.2 +version: 1.0.0 description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http From d4de3271cf3852734c6d020011d7a7da9972feb5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 03:46:35 +0000 Subject: [PATCH 304/448] Bump actions/labeler from 4.3.0 to 5.0.0 (#1096) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/labeler](https://github.com/actions/labeler) from 4.3.0 to 5.0.0.
Release notes

Sourced from actions/labeler's releases.

v5.0.0

What's Changed

This release contains the following breaking changes:

  1. The ability to apply labels based on the names of base and/or head branches was added (#186 and #54). The match object for changed files was expanded with new combinations in order to make it more intuitive and flexible (#423 and #101). As a result, the configuration file structure was significantly redesigned and is not compatible with the structure of the previous version. Please read the action documentation to find out how to adapt your configuration files for use with the new action version.

  2. The bug related to the sync-labels input was fixed (#112). Now the input value is read correctly.

  3. By default, dot input is set to true. Now, paths starting with a dot (e.g. .github) are matched by default.

  4. Version 5 of this action updated the runtime to Node.js 20. All scripts are now run with Node.js 20 instead of Node.js 16 and are affected by any breaking changes between Node.js 16 and 20.

For more information, please read the action documentation.

New Contributors

Full Changelog: https://github.com/actions/labeler/compare/v4...v5.0.0

v5.0.0-beta.1

What's Changed

In scope of this beta release, the structure of the configuration file (.github/labeler.yml) was changed from

LabelName:
- any:
  - changed-files: ['list', 'of', 'globs']
  - base-branch: ['list', 'of', 'regexps']
  - head-branch: ['list', 'of', 'regexps']
- all:
  - changed-files: ['list', 'of', 'globs']
  - base-branch: ['list', 'of', 'regexps']
  - head-branch: ['list', 'of', 'regexps']

to

LabelName:
- any:
  - changed-files:
    - AnyGlobToAnyFile: ['list', 'of', 'globs']
    - AnyGlobToAllFiles: ['list', 'of', 'globs']
    - AllGlobsToAnyFile: ['list', 'of', 'globs']
    - AllGlobsToAllFiles: ['list', 'of', 'globs']
  - base-branch: ['list', 'of', 'regexps']
  - head-branch: ['list', 'of', 'regexps']
- all:
  - changed-files:
    - AnyGlobToAnyFile: ['list', 'of', 'globs']
    - AnyGlobToAllFiles: ['list', 'of', 'globs']
    - AllGlobsToAnyFile: ['list', 'of', 'globs']
</tr></table>

... (truncated)

Commits
  • 8558fd7 Merge pull request #709 from actions/v5.0.0-beta
  • 000ca75 Merge pull request #700 from MaksimZhukov/apply-suggestions-and-update-docume...
  • cb66c2f Update dist
  • 9181355 Apply suggestions for the beta vesrion and update the documentation
  • efe4c1c Merge pull request #699 from MaksimZhukov/update-node-runtime-and-dependencies
  • c0957ad Run Prettier
  • 8dc8d18 Update Node.js version in reusable workflows
  • d0d0bbe Update documentation
  • 1375c42 5.0.0
  • ab7411e Change version of Node.js runtime to node20
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/labeler&package-manager=github_actions&previous-version=4.3.0&new-version=5.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/pull_request_label.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request_label.yml b/.github/workflows/pull_request_label.yml index 9933aad40d..54e3df537c 100644 --- a/.github/workflows/pull_request_label.yml +++ b/.github/workflows/pull_request_label.yml @@ -16,7 +16,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 + - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true From e12c7992b89e7b13f2b3c5317b3368d19abf09b8 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 3 Jan 2024 10:26:39 +0100 Subject: [PATCH 305/448] Fix `labeler.yml` (#1099) --- .github/labeler.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index b49eaf2cc5..6d477b3173 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,16 +1,21 @@ # Configuration for .github/workflows/pull_request_label.yml. 'type-infra': - - '.github/**' + - changed-files: + - any-glob-to-any-file: '.github/**' 'package:cronet_http': - - 'pkgs/cronet_http/**' + - changed-files: + - any-glob-to-any-file: 'pkgs/cronet_http/**' 'package:cupertino_http': - - 'pkgs/cupertino_http/**' + - changed-files: + - any-glob-to-any-file: 'pkgs/cupertino_http/**' 'package:http': - - 'pkgs/http/**' + - changed-files: + - any-glob-to-any-file: 'pkgs/http/**' 'package:http_client_conformance_tests': - - 'pkgs/http_client_conformance_tests/**' + - changed-files: + - any-glob-to-any-file: 'pkgs/http_client_conformance_tests/**' \ No newline at end of file From 539c3dd2a51fbd8416d129b1a7ecab76ea79472f Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 4 Jan 2024 10:24:33 -0800 Subject: [PATCH 306/448] Remove the "play-services-cronet" dependency in the example app when building `package:cronet_http_embedded` (#1103) --- .../tool/prepare_for_embedded.dart | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/pkgs/cronet_http/tool/prepare_for_embedded.dart b/pkgs/cronet_http/tool/prepare_for_embedded.dart index 3442bc6843..aef0865ae8 100644 --- a/pkgs/cronet_http/tool/prepare_for_embedded.dart +++ b/pkgs/cronet_http/tool/prepare_for_embedded.dart @@ -42,6 +42,14 @@ final _cronetVersionUri = Uri.https( 'dl.google.com', 'android/maven2/org/chromium/net/group-index.xml', ); +// Finds the Google Play Services Cronet dependency line. For example: +// ' implementation "com.google.android.gms:play-services-cronet:18.0.1"' +final implementationRegExp = RegExp( + '^\\s*implementation [\'"]' + '$_gmsDependencyName' + ':\\d+.\\d+.\\d+[\'"]', + multiLine: true, +); void main(List args) async { if (Directory.current.path.endsWith('tool')) { @@ -51,7 +59,8 @@ void main(List args) async { } final latestVersion = await _getLatestCronetVersion(); - updateCronetDependency(latestVersion); + updateBuildGradle(latestVersion); + updateExampleBuildGradle(); updatePubSpec(); updateReadme(); updateLibraryName(); @@ -75,22 +84,30 @@ Future _getLatestCronetVersion() async { } /// Update android/build.gradle. -void updateCronetDependency(String latestVersion) { - final fBuildGradle = File('${_packageDirectory.path}/android/build.gradle'); - final gradleContent = fBuildGradle.readAsStringSync(); - final implementationRegExp = RegExp( - '^\\s*implementation [\'"]' - '$_gmsDependencyName' - ':\\d+.\\d+.\\d+[\'"]', - multiLine: true, - ); +void updateBuildGradle(String latestVersion) { + final buildGradle = File('${_packageDirectory.path}/android/build.gradle'); + final gradleContent = buildGradle.readAsStringSync(); final newImplementation = '$_embeddedDependencyName:$latestVersion'; - print('Patching $newImplementation'); + print('Updating ${buildGradle.path}: adding $newImplementation'); final newGradleContent = gradleContent.replaceAll( implementationRegExp, ' implementation "$newImplementation"', ); - fBuildGradle.writeAsStringSync(newGradleContent); + buildGradle.writeAsStringSync(newGradleContent); +} + +/// Remove the cronet reference from ./example/android/app/build.gradle. +void updateExampleBuildGradle() { + final buildGradle = + File('${_packageDirectory.path}/example/android/app/build.gradle'); + final gradleContent = buildGradle.readAsStringSync(); + + print('Updating ${buildGradle.path}: removing cronet reference'); + final newGradleContent = gradleContent.replaceAll( + implementationRegExp, + ' // NOTE: removed in package:cronet_http_embedded', + ); + buildGradle.writeAsStringSync(newGradleContent); } /// Update pubspec.yaml and example/pubspec.yaml. From 9735ef3e6b8ffabb2daedcbfd711b7a6f6fa88f0 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 8 Jan 2024 10:50:38 -0800 Subject: [PATCH 307/448] Use `package:http_image_provider` in all `Client` implementation examples (#1089) --- .github/workflows/cronet.yml | 2 +- pkgs/cronet_http/CHANGELOG.md | 4 ++ pkgs/cronet_http/README.md | 2 +- pkgs/cronet_http/example/lib/book.dart | 4 +- pkgs/cronet_http/example/lib/main.dart | 35 ++++++++---- pkgs/cronet_http/example/pubspec.yaml | 3 +- pkgs/cronet_http/pubspec.yaml | 2 +- pkgs/cupertino_http/CHANGELOG.md | 4 ++ pkgs/cupertino_http/README.md | 57 ++++++------------- pkgs/cupertino_http/example/lib/book.dart | 4 +- pkgs/cupertino_http/example/lib/main.dart | 31 ++++++---- pkgs/cupertino_http/example/pubspec.yaml | 3 +- pkgs/cupertino_http/pubspec.yaml | 2 +- pkgs/flutter_http_example/README.md | 8 +-- pkgs/flutter_http_example/lib/book.dart | 4 +- .../lib/http_client_factory.dart | 16 +++++- pkgs/flutter_http_example/lib/main.dart | 31 +++------- pkgs/flutter_http_example/pubspec.yaml | 6 +- .../test/widget_test.dart | 20 +++++-- pkgs/http/README.md | 3 +- 20 files changed, 126 insertions(+), 115 deletions(-) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 0976a756ff..8e114a0055 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -39,7 +39,7 @@ jobs: - name: Make cronet_http_embedded copy if: ${{ matrix.package == 'cronet_http_embedded' }} run: | - cp -r pkgs/cronet_http pkgs/cronet_http_embedded + mv pkgs/cronet_http pkgs/cronet_http_embedded cd pkgs/cronet_http_embedded flutter pub get && dart tool/prepare_for_embedded.dart - id: install diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index cf1fcbc208..6cc73ab31d 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.1-wip + +* Use `package:http_image_provider` in the example application. + ## 1.0.0 * No functional changes. diff --git a/pkgs/cronet_http/README.md b/pkgs/cronet_http/README.md index 49acf3390d..47ebd8bac1 100644 --- a/pkgs/cronet_http/README.md +++ b/pkgs/cronet_http/README.md @@ -37,7 +37,7 @@ import 'package:http/http.dart'; import 'package:http/io_client.dart'; void main() async { - late Client httpClient; + final Client httpClient; if (Platform.isAndroid) { final engine = CronetEngine.build( cacheMode: CacheMode.memory, diff --git a/pkgs/cronet_http/example/lib/book.dart b/pkgs/cronet_http/example/lib/book.dart index 61a663b4d3..584ae9a361 100644 --- a/pkgs/cronet_http/example/lib/book.dart +++ b/pkgs/cronet_http/example/lib/book.dart @@ -5,7 +5,7 @@ class Book { String title; String description; - String imageUrl; + Uri imageUrl; Book(this.title, this.description, this.imageUrl); @@ -21,7 +21,7 @@ class Book { 'description': final String description, 'imageLinks': {'smallThumbnail': final String thumbnail} }) { - books.add(Book(title, description, thumbnail)); + books.add(Book(title, description, Uri.parse(thumbnail))); } } } diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 61f11a7b01..6e1bad22c4 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -5,21 +5,31 @@ import 'dart:convert'; import 'dart:io'; -import 'package:cached_network_image/cached_network_image.dart'; import 'package:cronet_http/cronet_http.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; +import 'package:http/io_client.dart'; +import 'package:http_image_provider/http_image_provider.dart'; +import 'package:provider/provider.dart'; import 'book.dart'; void main() { - var clientFactory = Client.new; // Constructs the default client. + final Client httpClient; if (Platform.isAndroid) { final engine = CronetEngine.build( - cacheMode: CacheMode.memory, userAgent: 'Book Agent'); - clientFactory = () => CronetClient.fromCronetEngine(engine); + cacheMode: CacheMode.memory, + cacheMaxSize: 2 * 1024 * 1024, + userAgent: 'Book Agent'); + httpClient = CronetClient.fromCronetEngine(engine); + } else { + httpClient = IOClient(HttpClient()..userAgent = 'Book Agent'); } - runWithClient(() => runApp(const BookSearchApp()), clientFactory); + + runApp(Provider( + create: (_) => httpClient, + child: const BookSearchApp(), + dispose: (_, client) => client.close())); } class BookSearchApp extends StatelessWidget { @@ -44,20 +54,22 @@ class HomePage extends StatefulWidget { class _HomePageState extends State { List? _books; String? _lastQuery; + late Client _client; @override void initState() { super.initState(); + _client = context.read(); } // Get the list of books matching `query`. // The `get` call will automatically use the `client` configurated in `main`. Future> _findMatchingBooks(String query) async { - final response = await get( + final response = await _client.get( Uri.https( 'www.googleapis.com', '/books/v1/volumes', - {'q': query, 'maxResults': '40', 'printType': 'books'}, + {'q': query, 'maxResults': '20', 'printType': 'books'}, ), ); @@ -129,11 +141,10 @@ class _BookListState extends State { itemBuilder: (context, index) => Card( key: ValueKey(widget.books[index].title), child: ListTile( - leading: CachedNetworkImage( - placeholder: (context, url) => - const CircularProgressIndicator(), - imageUrl: - widget.books[index].imageUrl.replaceFirst('http', 'https')), + leading: Image( + image: HttpImage( + widget.books[index].imageUrl.replace(scheme: 'https'), + client: context.read())), title: Text(widget.books[index].title), subtitle: Text(widget.books[index].description), ), diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index 5bb80276a6..904b1e5ade 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -7,13 +7,14 @@ environment: sdk: ^3.0.0 dependencies: - cached_network_image: ^3.2.3 cronet_http: path: ../ cupertino_icons: ^1.0.2 flutter: sdk: flutter http: ^1.0.0 + http_image_provider: ^0.0.2 + provider: ^6.1.1 dev_dependencies: dart_flutter_team_lints: ^2.0.0 diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 5f4229ebf8..c9e0e4d0a0 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 1.0.0 +version: 1.0.1-wip description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index d768f7a5c7..395bb8b3b7 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.2.1-wip + +* Use `package:http_image_provider` in the example application. + ## 1.2.0 * Add support for setting additional http headers in diff --git a/pkgs/cupertino_http/README.md b/pkgs/cupertino_http/README.md index 83514dcc40..77c1d79244 100644 --- a/pkgs/cupertino_http/README.md +++ b/pkgs/cupertino_http/README.md @@ -24,49 +24,25 @@ This approach allows the same HTTP code to be used on all platforms, while still allowing platform-specific setup. ```dart -late Client client; -if (Platform.isIOS) { - final config = URLSessionConfiguration.ephemeralSessionConfiguration() - ..allowsCellularAccess = false - ..allowsConstrainedNetworkAccess = false - ..allowsExpensiveNetworkAccess = false; - client = CupertinoClient.fromSessionConfiguration(config); -} else { - client = IOClient(); // Uses an HTTP client based on dart:io -} - -final response = await client.get(Uri.https( - 'www.googleapis.com', - '/books/v1/volumes', - {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'})); -``` - -[package:http runWithClient][] can be used to configure the -[package:http Client][] for the entire application. - -```dart -void main() { - late Client client; - if (Platform.isIOS) { - client = CupertinoClient.defaultSessionConfiguration(); +import 'package:cupertino_http/cupertino_http.dart'; +import 'package:http/http.dart'; +import 'package:http/io_client.dart'; + +void main() async { + final Client httpClient; + if (Platform.isIOS || Platform.isMacOS) { + final config = URLSessionConfiguration.ephemeralSessionConfiguration() + ..cache = URLCache.withCapacity(memoryCapacity: 2 * 1024 * 1024) + ..httpAdditionalHeaders = {'User-Agent': 'Book Agent'}; + httpClient = CupertinoClient.fromSessionConfiguration(config); } else { - client = IOClient(); + httpClient = IOClient(HttpClient()..userAgent = 'Book Agent'); } - runWithClient(() => runApp(const MyApp()), () => client); -} - -... - -class MainPageState extends State { - void someMethod() { - // Will use the Client configured in main. - final response = await get(Uri.https( - 'www.googleapis.com', - '/books/v1/volumes', - {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'})); - } - ... + final response = await client.get(Uri.https( + 'www.googleapis.com', + '/books/v1/volumes', + {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'})); } ``` @@ -88,6 +64,5 @@ task.resume(); ``` [package:http Client]: https://pub.dev/documentation/http/latest/http/Client-class.html -[package:http runWithClient]: https://pub.dev/documentation/http/latest/http/runWithClient.html [Foundation URL Loading System]: https://developer.apple.com/documentation/foundation/url_loading_system [dart:io HttpClient]: https://api.dart.dev/stable/dart-io/HttpClient-class.html diff --git a/pkgs/cupertino_http/example/lib/book.dart b/pkgs/cupertino_http/example/lib/book.dart index f2a27fc460..b47ca9e67e 100644 --- a/pkgs/cupertino_http/example/lib/book.dart +++ b/pkgs/cupertino_http/example/lib/book.dart @@ -5,7 +5,7 @@ class Book { String title; String description; - String imageUrl; + Uri imageUrl; Book(this.title, this.description, this.imageUrl); @@ -21,7 +21,7 @@ class Book { 'description': final String description, 'imageLinks': {'smallThumbnail': final String thumbnail} }) { - books.add(Book(title, description, thumbnail)); + books.add(Book(title, description, Uri.parse(thumbnail))); } } } diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index 32c2b08980..092300a64c 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -5,22 +5,30 @@ import 'dart:convert'; import 'dart:io'; -import 'package:cached_network_image/cached_network_image.dart'; import 'package:cupertino_http/cupertino_http.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; +import 'package:http/io_client.dart'; +import 'package:http_image_provider/http_image_provider.dart'; +import 'package:provider/provider.dart'; import 'book.dart'; void main() { - var clientFactory = Client.new; // The default Client. + final Client httpClient; if (Platform.isIOS || Platform.isMacOS) { final config = URLSessionConfiguration.ephemeralSessionConfiguration() ..cache = URLCache.withCapacity(memoryCapacity: 2 * 1024 * 1024) ..httpAdditionalHeaders = {'User-Agent': 'Book Agent'}; - clientFactory = () => CupertinoClient.fromSessionConfiguration(config); + httpClient = CupertinoClient.fromSessionConfiguration(config); + } else { + httpClient = IOClient(HttpClient()..userAgent = 'Book Agent'); } - runWithClient(() => runApp(const BookSearchApp()), clientFactory); + + runApp(Provider( + create: (_) => httpClient, + child: const BookSearchApp(), + dispose: (_, client) => client.close())); } class BookSearchApp extends StatelessWidget { @@ -45,20 +53,22 @@ class HomePage extends StatefulWidget { class _HomePageState extends State { List? _books; String? _lastQuery; + late Client _client; @override void initState() { super.initState(); + _client = context.read(); } // Get the list of books matching `query`. // The `get` call will automatically use the `client` configurated in `main`. Future> _findMatchingBooks(String query) async { - final response = await get( + final response = await _client.get( Uri.https( 'www.googleapis.com', '/books/v1/volumes', - {'q': query, 'maxResults': '40', 'printType': 'books'}, + {'q': query, 'maxResults': '20', 'printType': 'books'}, ), ); @@ -130,11 +140,10 @@ class _BookListState extends State { itemBuilder: (context, index) => Card( key: ValueKey(widget.books[index].title), child: ListTile( - leading: CachedNetworkImage( - placeholder: (context, url) => - const CircularProgressIndicator(), - imageUrl: - widget.books[index].imageUrl.replaceFirst('http', 'https')), + leading: Image( + image: HttpImage( + widget.books[index].imageUrl.replace(scheme: 'https'), + client: context.read())), title: Text(widget.books[index].title), subtitle: Text(widget.books[index].description), ), diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index bae184b71c..08048579ae 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -10,13 +10,14 @@ environment: flutter: '>=3.10.0' dependencies: - cached_network_image: ^3.2.3 cupertino_http: path: ../ cupertino_icons: ^1.0.2 flutter: sdk: flutter http: ^1.0.0 + http_image_provider: ^0.0.2 + provider: ^6.1.1 dev_dependencies: convert: ^3.1.1 diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 0a97bdd25d..e9a2bbfdb2 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 1.2.0 +version: 1.2.1-wip description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. diff --git a/pkgs/flutter_http_example/README.md b/pkgs/flutter_http_example/README.md index 2c6cdfd025..1a9cf9dd8a 100644 --- a/pkgs/flutter_http_example/README.md +++ b/pkgs/flutter_http_example/README.md @@ -9,8 +9,7 @@ A Flutter sample app that illustrates how to configure and use including: * configuration for multiple platforms. - * using `runWithClient` and `package:provider` to pass `Client`s through - an application. + * using `package:provider` to pass `Client`s through an application. * writing tests using `MockClient`. ## The important bits @@ -34,9 +33,8 @@ This library demonstrates how to: * import `http_client_factory.dart` or `http_client_factory_web.dart`, depending on whether we are targeting the web browser or not. -* share a `package:http` `Client` by using `runWithClient` and - `package:provider`. -* call `package:http` functions. +* share a `package:http` `Client` by using `package:provider`. +* call `package:http` `Client` methods. ### `widget_test.dart` diff --git a/pkgs/flutter_http_example/lib/book.dart b/pkgs/flutter_http_example/lib/book.dart index f2a27fc460..b47ca9e67e 100644 --- a/pkgs/flutter_http_example/lib/book.dart +++ b/pkgs/flutter_http_example/lib/book.dart @@ -5,7 +5,7 @@ class Book { String title; String description; - String imageUrl; + Uri imageUrl; Book(this.title, this.description, this.imageUrl); @@ -21,7 +21,7 @@ class Book { 'description': final String description, 'imageLinks': {'smallThumbnail': final String thumbnail} }) { - books.add(Book(title, description, thumbnail)); + books.add(Book(title, description, Uri.parse(thumbnail))); } } } diff --git a/pkgs/flutter_http_example/lib/http_client_factory.dart b/pkgs/flutter_http_example/lib/http_client_factory.dart index cb36597c23..6e6ddc040b 100644 --- a/pkgs/flutter_http_example/lib/http_client_factory.dart +++ b/pkgs/flutter_http_example/lib/http_client_factory.dart @@ -7,13 +7,23 @@ import 'dart:io'; import 'package:cronet_http/cronet_http.dart'; import 'package:cupertino_http/cupertino_http.dart'; import 'package:http/http.dart'; +import 'package:http/io_client.dart'; + +const _maxCacheSize = 2 * 1024 * 1024; Client httpClient() { if (Platform.isAndroid) { - return CronetClient.defaultCronetEngine(); + final engine = CronetEngine.build( + cacheMode: CacheMode.memory, + cacheMaxSize: _maxCacheSize, + userAgent: 'Book Agent'); + return CronetClient.fromCronetEngine(engine); } if (Platform.isIOS || Platform.isMacOS) { - return CupertinoClient.defaultSessionConfiguration(); + final config = URLSessionConfiguration.ephemeralSessionConfiguration() + ..cache = URLCache.withCapacity(memoryCapacity: _maxCacheSize) + ..httpAdditionalHeaders = {'User-Agent': 'Book Agent'}; + return CupertinoClient.fromSessionConfiguration(config); } - return Client(); // Return the default client. + return IOClient(HttpClient()..userAgent = 'Book Agent'); } diff --git a/pkgs/flutter_http_example/lib/main.dart b/pkgs/flutter_http_example/lib/main.dart index 406b9e6b71..548c3dee0a 100644 --- a/pkgs/flutter_http_example/lib/main.dart +++ b/pkgs/flutter_http_example/lib/main.dart @@ -4,9 +4,9 @@ import 'dart:convert'; -import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; +import 'package:http_image_provider/http_image_provider.dart'; import 'package:provider/provider.dart'; import 'book.dart'; @@ -14,22 +14,10 @@ import 'http_client_factory.dart' if (dart.library.js_interop) 'http_client_factory_web.dart' as http_factory; void main() { - // `runWithClient` is used to control which `package:http` `Client` is used - // when the `Client` constructor is called. This method allows you to choose - // the `Client` even when the package that you are using does not offer - // explicit parameterization. - // - // However, `runWithClient` does not work with Flutter tests. See - // https://github.com/flutter/flutter/issues/96939. - // - // Use `package:provider` and `runWithClient` together so that tests and - // unparameterized `Client` usages both work. - runWithClient( - () => runApp(Provider( - create: (_) => http_factory.httpClient(), - child: const BookSearchApp(), - dispose: (_, client) => client.close())), - http_factory.httpClient); + runApp(Provider( + create: (_) => http_factory.httpClient(), + child: const BookSearchApp(), + dispose: (_, client) => client.close())); } class BookSearchApp extends StatelessWidget { @@ -141,11 +129,10 @@ class _BookListState extends State { itemBuilder: (context, index) => Card( key: ValueKey(widget.books[index].title), child: ListTile( - leading: CachedNetworkImage( - placeholder: (context, url) => - const CircularProgressIndicator(), - imageUrl: - widget.books[index].imageUrl.replaceFirst('http', 'https')), + leading: Image( + image: HttpImage( + widget.books[index].imageUrl.replace(scheme: 'https'), + client: context.read())), title: Text(widget.books[index].title), subtitle: Text(widget.books[index].description), ), diff --git a/pkgs/flutter_http_example/pubspec.yaml b/pkgs/flutter_http_example/pubspec.yaml index 0331490003..7d0f0892ce 100644 --- a/pkgs/flutter_http_example/pubspec.yaml +++ b/pkgs/flutter_http_example/pubspec.yaml @@ -9,14 +9,14 @@ environment: flutter: '>=3.10.0' dependencies: - cached_network_image: ^3.2.3 - cronet_http: ^0.4.1 - cupertino_http: ^1.1.0 + cronet_http: ^1.0.0 + cupertino_http: ^1.2.0 cupertino_icons: ^1.0.2 fetch_client: ^1.0.2 flutter: sdk: flutter http: ^1.0.0 + http_image_provider: ^0.0.2 provider: ^6.0.5 dev_dependencies: diff --git a/pkgs/flutter_http_example/test/widget_test.dart b/pkgs/flutter_http_example/test/widget_test.dart index 9e0af25b97..f890a1bb11 100644 --- a/pkgs/flutter_http_example/test/widget_test.dart +++ b/pkgs/flutter_http_example/test/widget_test.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'dart:convert'; + import 'package:flutter/material.dart'; import 'package:flutter_http_example/main.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -17,7 +19,7 @@ const _singleBookResponse = ''' "title": "Flutter Cookbook", "description": "Write, test, and publish your web, desktop...", "imageLinks": { - "smallThumbnail": "http://books.google.com/books/content?id=gcnAEAAAQBAJ&printsec=frontcover&img=1&zoom=5&edge=curl&source=gbs_api" + "smallThumbnail": "http://thumbnailurl/" } } } @@ -25,6 +27,11 @@ const _singleBookResponse = ''' } '''; +final _dummyPngImage = base64Decode( + 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmM' + 'IQAAAABJRU5ErkJggg==', +); + void main() { Widget app(Client client) => Provider( create: (_) => client, @@ -42,11 +49,14 @@ void main() { testWidgets('test search with one result', (WidgetTester tester) async { final mockClient = MockClient((request) async { - if (request.url.path != '/books/v1/volumes' && - request.url.queryParameters['q'] != 'Flutter') { - return Response('', 404); + if (request.url.path == '/books/v1/volumes' && + request.url.queryParameters['q'] == 'Flutter') { + return Response(_singleBookResponse, 200); + } else if (request.url == Uri.https('thumbnailurl', '/')) { + return Response.bytes(_dummyPngImage, 200, + headers: const {'Content-Type': 'image/png'}); } - return Response(_singleBookResponse, 200); + return Response('', 404); }); await tester.pumpWidget(app(mockClient)); diff --git a/pkgs/http/README.md b/pkgs/http/README.md index 642c238035..85ec2911df 100644 --- a/pkgs/http/README.md +++ b/pkgs/http/README.md @@ -272,7 +272,7 @@ $ dart compile exe --define=no_default_http_client=true ... > [!TIP] > [The Flutter HTTP example application][flutterhttpexample] demonstrates > how to make the configured [`Client`][client] available using -> [`package:provider`][provider] and [`runWithClient`](runwithclient). +> [`package:provider`][provider] and [`package:http_image_provider`][http_image_provider]. [browserclient]: https://pub.dev/documentation/http/latest/browser_client/BrowserClient-class.html [client]: https://pub.dev/documentation/http/latest/http/Client-class.html @@ -284,6 +284,7 @@ $ dart compile exe --define=no_default_http_client=true ... [fetch]: https://pub.dev/packages/fetch_client [fetchclient]: https://pub.dev/documentation/fetch_client/latest/fetch_client/FetchClient-class.html [flutterhttpexample]: https://github.com/dart-lang/http/tree/master/pkgs/flutter_http_example +[http_image_provider]: https://pub.dev/documentation/http_image_provider [ioclient]: https://pub.dev/documentation/http/latest/io_client/IOClient-class.html [isolate]: https://dart.dev/language/concurrency#how-isolates-work [flutterstatemanagement]: https://docs.flutter.dev/data-and-backend/state-mgmt/options From 05f4a7fb3788b4e18da8ef8ac3a6ba9dd29dea18 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 12 Jan 2024 00:06:37 +0800 Subject: [PATCH 308/448] =?UTF-8?q?[cronet=5Fhttp]=20=E2=AC=87=EF=B8=8F=20?= =?UTF-8?q?Downgrade=20`minSdkVersion`=20to=2021=20(#1104)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cronet.yml | 5 +++-- pkgs/cronet_http/CHANGELOG.md | 1 + pkgs/cronet_http/android/build.gradle | 3 +-- .../example/android/app/build.gradle | 8 ++++---- .../tool/prepare_for_embedded.dart | 19 ++++++++++++------- 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 8e114a0055..74571fb904 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -62,7 +62,8 @@ jobs: # - .github/workflows/cronet.yml # - pkgs/cronet_http/android/build.gradle # - pkgs/cronet_http/example/android/app/build.gradle - api-level: 28 - target: ${{ matrix.package == 'cronet_http_embedded' && 'google_apis' || 'playstore' }} + api-level: 21 + arch: x86_64 + target: ${{ matrix.package == 'cronet_http_embedded' && 'default' || 'google_apis' }} profile: pixel script: cd 'pkgs/${{ matrix.package }}/example' && flutter test --timeout=1200s integration_test/ diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 6cc73ab31d..fa461d5284 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,6 +1,7 @@ ## 1.0.1-wip * Use `package:http_image_provider` in the example application. +* Support Android API 21+. ## 1.0.0 diff --git a/pkgs/cronet_http/android/build.gradle b/pkgs/cronet_http/android/build.gradle index 96bb197c73..af945d9d8b 100644 --- a/pkgs/cronet_http/android/build.gradle +++ b/pkgs/cronet_http/android/build.gradle @@ -50,7 +50,7 @@ android { // - .github/workflows/cronet.yml // - pkgs/cronet_http/android/build.gradle // - pkgs/cronet_http/example/android/app/build.gradle - minSdkVersion 28 + minSdkVersion 21 } defaultConfig { @@ -65,6 +65,5 @@ android { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "com.google.android.gms:play-services-cronet:18.0.1" } diff --git a/pkgs/cronet_http/example/android/app/build.gradle b/pkgs/cronet_http/example/android/app/build.gradle index 1f7cd94749..dfd74270c3 100644 --- a/pkgs/cronet_http/example/android/app/build.gradle +++ b/pkgs/cronet_http/example/android/app/build.gradle @@ -44,13 +44,11 @@ android { defaultConfig { applicationId "io.flutter.cronet_http_example" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. // api-level/minSdkVersion should be help in sync in: // - .github/workflows/cronet.yml // - pkgs/cronet_http/android/build.gradle // - pkgs/cronet_http/example/android/app/build.gradle - minSdkVersion 28 + minSdkVersion 21 targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName @@ -70,7 +68,9 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + // TODO(#1112): org.jetbrains.kotlin:kotlin-bom artifact purpose is to align kotlin stdlib and related code versions. + // This should be removed when https://github.com/flutter/flutter/issues/125062 is fixed. + implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0")) // ""com.google.android.gms:play-services-cronet" is only present so that // `jnigen` will work. Applications should not include this line. implementation "com.google.android.gms:play-services-cronet:18.0.1" diff --git a/pkgs/cronet_http/tool/prepare_for_embedded.dart b/pkgs/cronet_http/tool/prepare_for_embedded.dart index aef0865ae8..16a2c0baef 100644 --- a/pkgs/cronet_http/tool/prepare_for_embedded.dart +++ b/pkgs/cronet_http/tool/prepare_for_embedded.dart @@ -29,6 +29,7 @@ import 'package:http/http.dart' as http; import 'package:xml/xml.dart'; import 'package:yaml_edit/yaml_edit.dart'; +late final String _scriptName; late final Directory _packageDirectory; const _gmsDependencyName = 'com.google.android.gms:play-services-cronet'; @@ -52,12 +53,14 @@ final implementationRegExp = RegExp( ); void main(List args) async { - if (Directory.current.path.endsWith('tool')) { - _packageDirectory = Directory.current.parent; - } else { - _packageDirectory = Directory.current; - } - + final script = Platform.script.toFilePath(); + _scriptName = script.split(Platform.pathSeparator).last; + _packageDirectory = Directory( + Uri.directory( + '${script.replaceAll(_scriptName, '')}' + '..${Platform.pathSeparator}', + ).toFilePath(), + ); final latestVersion = await _getLatestCronetVersion(); updateBuildGradle(latestVersion); updateExampleBuildGradle(); @@ -137,7 +140,9 @@ void updateReadme() { void updateImports() { print('Updating imports in Dart files'); for (final file in _packageDirectory.listSync(recursive: true)) { - if (file is File && file.path.endsWith('.dart')) { + if (file is File && + file.path.endsWith('.dart') && + !file.path.contains(_scriptName)) { final updatedSource = file.readAsStringSync().replaceAll( 'package:cronet_http/cronet_http.dart', 'package:cronet_http_embedded/cronet_http_embedded.dart', From 2ecc538175d6685b24796306d7d2e3876a90f2b4 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 12 Jan 2024 09:18:45 -0800 Subject: [PATCH 309/448] Add tests for sending "cookie" and receiving "set-cookie" headers (#1113) --- .../example/integration_test/client_test.dart | 2 + .../client_conformance_test.dart | 14 ++- .../http/test/io/client_conformance_test.dart | 7 +- .../lib/http_client_conformance_tests.dart | 16 ++++ .../lib/src/request_cookies_server.dart | 55 +++++++++++ .../lib/src/request_cookies_server_vm.dart | 14 +++ .../lib/src/request_cookies_server_web.dart | 11 +++ .../lib/src/request_cookies_test.dart | 56 +++++++++++ .../lib/src/response_cookies_server.dart | 44 +++++++++ .../lib/src/response_cookies_server_vm.dart | 14 +++ .../lib/src/response_cookies_server_web.dart | 11 +++ .../lib/src/response_cookies_test.dart | 92 +++++++++++++++++++ 12 files changed, 331 insertions(+), 5 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_cookies_server.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_cookies_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_cookies_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/request_cookies_test.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_cookies_server.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_cookies_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_cookies_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/response_cookies_test.dart diff --git a/pkgs/cronet_http/example/integration_test/client_test.dart b/pkgs/cronet_http/example/integration_test/client_test.dart index cc6b80edfc..f126f84fc3 100644 --- a/pkgs/cronet_http/example/integration_test/client_test.dart +++ b/pkgs/cronet_http/example/integration_test/client_test.dart @@ -13,6 +13,8 @@ Future testConformance() async { () => testAll( CronetClient.defaultCronetEngine, canStreamRequestBody: false, + canReceiveSetCookieHeaders: true, + canSendCookieHeaders: true, )); group('from cronet engine', () { diff --git a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart index a0823bf71d..3007123a98 100644 --- a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart +++ b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart @@ -11,11 +11,19 @@ void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); group('defaultSessionConfiguration', () { - testAll(CupertinoClient.defaultSessionConfiguration); + testAll( + CupertinoClient.defaultSessionConfiguration, + canReceiveSetCookieHeaders: true, + canSendCookieHeaders: true, + ); }); group('fromSessionConfiguration', () { final config = URLSessionConfiguration.ephemeralSessionConfiguration(); - testAll(() => CupertinoClient.fromSessionConfiguration(config), - canWorkInIsolates: false); + testAll( + () => CupertinoClient.fromSessionConfiguration(config), + canWorkInIsolates: false, + canReceiveSetCookieHeaders: true, + canSendCookieHeaders: true, + ); }); } diff --git a/pkgs/http/test/io/client_conformance_test.dart b/pkgs/http/test/io/client_conformance_test.dart index 20bf39f281..65368e57a0 100644 --- a/pkgs/http/test/io/client_conformance_test.dart +++ b/pkgs/http/test/io/client_conformance_test.dart @@ -10,6 +10,9 @@ import 'package:http_client_conformance_tests/http_client_conformance_tests.dart import 'package:test/test.dart'; void main() { - testAll(IOClient.new, preservesMethodCase: false // https://dartbug.com/54187 - ); + testAll( + IOClient.new, preservesMethodCase: false, // https://dartbug.com/54187 + canReceiveSetCookieHeaders: true, + canSendCookieHeaders: true, + ); } diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index bd83c02abb..07903b5246 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -11,10 +11,12 @@ import 'src/multiple_clients_tests.dart'; import 'src/redirect_tests.dart'; import 'src/request_body_streamed_tests.dart'; import 'src/request_body_tests.dart'; +import 'src/request_cookies_test.dart'; import 'src/request_headers_tests.dart'; import 'src/request_methods_tests.dart'; import 'src/response_body_streamed_test.dart'; import 'src/response_body_tests.dart'; +import 'src/response_cookies_test.dart'; import 'src/response_headers_tests.dart'; import 'src/response_status_line_tests.dart'; import 'src/server_errors_test.dart'; @@ -27,10 +29,12 @@ export 'src/multiple_clients_tests.dart' show testMultipleClients; export 'src/redirect_tests.dart' show testRedirect; export 'src/request_body_streamed_tests.dart' show testRequestBodyStreamed; export 'src/request_body_tests.dart' show testRequestBody; +export 'src/request_cookies_test.dart' show testRequestCookies; export 'src/request_headers_tests.dart' show testRequestHeaders; export 'src/request_methods_tests.dart' show testRequestMethods; export 'src/response_body_streamed_test.dart' show testResponseBodyStreamed; export 'src/response_body_tests.dart' show testResponseBody; +export 'src/response_cookies_test.dart' show testResponseCookies; export 'src/response_headers_tests.dart' show testResponseHeaders; export 'src/response_status_line_tests.dart' show testResponseStatusLine; export 'src/server_errors_test.dart' show testServerErrors; @@ -54,6 +58,12 @@ export 'src/server_errors_test.dart' show testServerErrors; /// If [preservesMethodCase] is `false` then tests that assume that the /// [Client] preserves custom request method casing will be skipped. /// +/// If [canSendCookieHeaders] is `false` then tests that require that "cookie" +/// headers be sent by the client will not be run. +/// +/// If [canReceiveSetCookieHeaders] is `false` then tests that require that +/// "set-cookie" headers be received by the client will not be run. +/// /// The tests are run against a series of HTTP servers that are started by the /// tests. If the tests are run in the browser, then the test servers are /// started in another process. Otherwise, the test servers are run in-process. @@ -64,6 +74,8 @@ void testAll( bool redirectAlwaysAllowed = false, bool canWorkInIsolates = true, bool preservesMethodCase = false, + bool canSendCookieHeaders = false, + bool canReceiveSetCookieHeaders = false, }) { testRequestBody(clientFactory()); testRequestBodyStreamed(clientFactory(), @@ -82,4 +94,8 @@ void testAll( testMultipleClients(clientFactory); testClose(clientFactory); testIsolate(clientFactory, canWorkInIsolates: canWorkInIsolates); + testRequestCookies(clientFactory(), + canSendCookieHeaders: canSendCookieHeaders); + testResponseCookies(clientFactory(), + canReceiveSetCookieHeaders: canReceiveSetCookieHeaders); } diff --git a/pkgs/http_client_conformance_tests/lib/src/request_cookies_server.dart b/pkgs/http_client_conformance_tests/lib/src/request_cookies_server.dart new file mode 100644 index 0000000000..44653a7cd5 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_cookies_server.dart @@ -0,0 +1,55 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that captures "cookie" headers. +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// On Request Received: +/// - send a list of header lines starting with "cookie:" +/// When Receive Anything: +/// - exit +void hybridMain(StreamChannel channel) async { + late ServerSocket server; + + server = (await ServerSocket.bind('localhost', 0)) + ..listen((Socket socket) async { + final request = utf8.decoder.bind(socket).transform(const LineSplitter()); + + final cookies = []; + request.listen((line) { + if (line.toLowerCase().startsWith('cookie:')) { + cookies.add(line); + } + + if (line.isEmpty) { + // A blank line indicates the end of the headers. + channel.sink.add(cookies); + } + }); + + socket.writeAll( + [ + 'HTTP/1.1 200 OK', + 'Access-Control-Allow-Origin: *', + 'Content-Length: 0', + '\r\n', // Add \r\n at the end of this header section. + ], + '\r\n', // Separate each field by \r\n. + ); + await socket.close(); + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_cookies_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/request_cookies_server_vm.dart new file mode 100644 index 0000000000..1f30e5f871 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_cookies_server_vm.dart @@ -0,0 +1,14 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'request_cookies_server.dart'; + +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/request_cookies_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/request_cookies_server_web.dart new file mode 100644 index 0000000000..31d961b047 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_cookies_server_web.dart @@ -0,0 +1,11 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/request_cookies_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/request_cookies_test.dart b/pkgs/http_client_conformance_tests/lib/src/request_cookies_test.dart new file mode 100644 index 0000000000..a4eb78cf56 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/request_cookies_test.dart @@ -0,0 +1,56 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +import 'request_cookies_server_vm.dart' + if (dart.library.js_interop) 'request_cookies_server_web.dart'; + +// The an HTTP header into [name, value]. +final headerSplitter = RegExp(':[ \t]+'); + +/// Tests that the [Client] correctly sends "cookie" headers in the request. +/// +/// If [canSendCookieHeaders] is `false` then tests that require that "cookie" +/// headers be sent by the client will not be run. +void testRequestCookies(Client client, + {bool canSendCookieHeaders = false}) async { + group('request cookies', () { + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.nextAsInt}'; + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + + test('one cookie', () async { + await client + .get(Uri.http(host, ''), headers: {'cookie': 'SID=298zf09hf012fh2'}); + + final cookies = (await httpServerQueue.next as List).cast(); + expect(cookies, hasLength(1)); + final [header, value] = cookies[0].split(headerSplitter); + expect(header.toLowerCase(), 'cookie'); + expect(value, 'SID=298zf09hf012fh2'); + }, skip: canSendCookieHeaders ? false : 'cannot send cookie headers'); + + test('multiple cookies semicolon separated', () async { + await client.get(Uri.http(host, ''), + headers: {'cookie': 'SID=298zf09hf012fh2; lang=en-US'}); + + final cookies = (await httpServerQueue.next as List).cast(); + expect(cookies, hasLength(1)); + final [header, value] = cookies[0].split(headerSplitter); + expect(header.toLowerCase(), 'cookie'); + expect(value, 'SID=298zf09hf012fh2; lang=en-US'); + }, skip: canSendCookieHeaders ? false : 'cannot send cookie headers'); + }); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_cookies_server.dart b/pkgs/http_client_conformance_tests/lib/src/response_cookies_server.dart new file mode 100644 index 0000000000..392e22832d --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_cookies_server.dart @@ -0,0 +1,44 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:async/async.dart'; +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that returns a custom status line. +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// On Request Received: +/// - load response status line from channel +/// - exit +void hybridMain(StreamChannel channel) async { + late HttpServer server; + final clientQueue = StreamQueue(channel.stream); + + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + final socket = await request.response.detachSocket(writeHeaders: false); + + final headers = (await clientQueue.next) as List; + socket.writeAll( + [ + 'HTTP/1.1 200 OK', + 'Access-Control-Allow-Origin: *', + 'Content-Length: 0', + ...headers, + '\r\n', // Add \r\n at the end of this header section. + ], + '\r\n', // Separate each field by \r\n. + ); + await socket.close(); + unawaited(server.close()); + }); + + channel.sink.add(server.port); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_cookies_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/response_cookies_server_vm.dart new file mode 100644 index 0000000000..2edbb4581f --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_cookies_server_vm.dart @@ -0,0 +1,14 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'response_cookies_server.dart'; + +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/response_cookies_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/response_cookies_server_web.dart new file mode 100644 index 0000000000..cb8e384ed4 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_cookies_server_web.dart @@ -0,0 +1,11 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/response_cookies_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_cookies_test.dart b/pkgs/http_client_conformance_tests/lib/src/response_cookies_test.dart new file mode 100644 index 0000000000..f8e154d611 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/response_cookies_test.dart @@ -0,0 +1,92 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +import 'response_cookies_server_vm.dart' + if (dart.library.js_interop) 'response_cookies_server_web.dart'; + +/// Tests that the [Client] correctly receives "set-cookie-headers" +/// +/// If [canReceiveSetCookieHeaders] is `false` then tests that require that +/// "set-cookie" headers be received by the client will not be run. +void testResponseCookies(Client client, + {required bool canReceiveSetCookieHeaders}) async { + group('response cookies', () { + late String host; + late StreamChannel httpServerChannel; + late StreamQueue httpServerQueue; + + setUp(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.nextAsInt}'; + }); + + test('single session cookie', () async { + httpServerChannel.sink.add(['Set-Cookie: SID=1231AB3']); + final response = await client.get(Uri.http(host, '')); + + expect(response.headers['set-cookie'], 'SID=1231AB3'); + }, + skip: canReceiveSetCookieHeaders + ? false + : 'cannot receive set-cookie headers'); + + test('multiple session cookies', () async { + // RFC-2616 4.2 says: + // "The field value MAY be preceded by any amount of LWS, though a single + // SP is preferred." and + // "The field-content does not include any leading or trailing LWS ..." + httpServerChannel.sink + .add(['Set-Cookie: SID=1231AB3', 'Set-Cookie: lang=en_US']); + final response = await client.get(Uri.http(host, '')); + + expect( + response.headers['set-cookie'], + matches(r'SID=1231AB3' + r'[ \t]*,[ \t]*' + r'lang=en_US')); + }, + skip: canReceiveSetCookieHeaders + ? false + : 'cannot receive set-cookie headers'); + + test('permanent cookie with expires', () async { + httpServerChannel.sink + .add(['Set-Cookie: id=a3fWa; Expires=Wed, 10 Jan 2024 07:28:00 GMT']); + final response = await client.get(Uri.http(host, '')); + + expect(response.headers['set-cookie'], + 'id=a3fWa; Expires=Wed, 10 Jan 2024 07:28:00 GMT'); + }, + skip: canReceiveSetCookieHeaders + ? false + : 'cannot receive set-cookie headers'); + + test('multiple permanent cookies with expires', () async { + // RFC-2616 4.2 says: + // "The field value MAY be preceded by any amount of LWS, though a single + // SP is preferred." and + // "The field-content does not include any leading or trailing LWS ..." + httpServerChannel.sink.add([ + 'Set-Cookie: id=a3fWa; Expires=Wed, 10 Jan 2024 07:28:00 GMT', + 'Set-Cookie: id=2fasd; Expires=Wed, 21 Oct 2025 07:28:00 GMT' + ]); + final response = await client.get(Uri.http(host, '')); + + expect( + response.headers['set-cookie'], + matches(r'id=a3fWa; Expires=Wed, 10 Jan 2024 07:28:00 GMT' + r'[ \t]*,[ \t]*' + r'id=2fasd; Expires=Wed, 21 Oct 2025 07:28:00 GMT')); + }, + skip: canReceiveSetCookieHeaders + ? false + : 'cannot receive set-cookie headers'); + }); +} From 9d5a719151869c5e0bcc9cfd17add7f89f1746f9 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 12 Jan 2024 13:25:50 -0800 Subject: [PATCH 310/448] Add the ability to get response headers as a `Map>` (#1114) --- pkgs/http/CHANGELOG.md | 4 +- pkgs/http/lib/http.dart | 2 +- pkgs/http/lib/src/base_response.dart | 69 +++++++++++++++++++++++++++- pkgs/http/pubspec.yaml | 2 +- pkgs/http/test/response_test.dart | 69 ++++++++++++++++++++++++++++ 5 files changed, 142 insertions(+), 4 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 7b8dec4fdd..90eb36aa6b 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,6 +1,8 @@ -## 1.1.3-wip +## 1.2.0-wip * Add `MockClient.pngResponse`, which makes it easier to fake image responses. +* Add the ability to get headers as a `Map` to + `BaseResponse`. ## 1.1.2 diff --git a/pkgs/http/lib/http.dart b/pkgs/http/lib/http.dart index 62004240c7..bd039c8519 100644 --- a/pkgs/http/lib/http.dart +++ b/pkgs/http/lib/http.dart @@ -16,7 +16,7 @@ import 'src/streamed_request.dart'; export 'src/base_client.dart'; export 'src/base_request.dart'; -export 'src/base_response.dart'; +export 'src/base_response.dart' show BaseResponse, HeadersWithSplitValues; export 'src/byte_stream.dart'; export 'src/client.dart' hide zoneClient; export 'src/exception.dart'; diff --git a/pkgs/http/lib/src/base_response.dart b/pkgs/http/lib/src/base_response.dart index ed95f6cdb2..e1796e1b36 100644 --- a/pkgs/http/lib/src/base_response.dart +++ b/pkgs/http/lib/src/base_response.dart @@ -43,10 +43,12 @@ abstract class BaseResponse { /// // values = ['Apple', 'Banana', 'Grape'] /// ``` /// + /// To retrieve the header values as a `List`, use + /// [HeadersWithSplitValues.headersSplitValues]. + /// /// If a header value contains whitespace then that whitespace may be replaced /// by a single space. Leading and trailing whitespace in header values are /// always removed. - // TODO(nweiz): make this a HttpHeaders object. final Map headers; final bool isRedirect; @@ -68,3 +70,68 @@ abstract class BaseResponse { } } } + +/// "token" as defined in RFC 2616, 2.2 +/// See https://datatracker.ietf.org/doc/html/rfc2616#section-2.2 +const _tokenChars = r"!#$%&'*+\-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`" + 'abcdefghijklmnopqrstuvwxyz|~'; + +/// Splits comma-seperated header values. +var _headerSplitter = RegExp(r'[ \t]*,[ \t]*'); + +/// Splits comma-seperated "Set-Cookie" header values. +/// +/// Set-Cookie strings can contain commas. In particular, the following +/// productions defined in RFC-6265, section 4.1.1: +/// - e.g. "Expires=Sun, 06 Nov 1994 08:49:37 GMT" +/// - e.g. "Path=somepath," +/// - e.g. "AnyString,Really," +/// +/// Some values are ambiguous e.g. +/// "Set-Cookie: lang=en; Path=/foo/" +/// "Set-Cookie: SID=x23" +/// and: +/// "Set-Cookie: lang=en; Path=/foo/,SID=x23" +/// would both be result in `response.headers` => "lang=en; Path=/foo/,SID=x23" +/// +/// The idea behind this regex is that ",=" is more likely to +/// start a new then be part of or . +/// +/// See https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1 +var _setCookieSplitter = RegExp(r'[ \t]*,[ \t]*(?=[' + _tokenChars + r']+=)'); + +extension HeadersWithSplitValues on BaseResponse { + /// The HTTP headers returned by the server. + /// + /// The header names are converted to lowercase and stored with their + /// associated header values. + /// + /// Cookies can be parsed using the dart:io `Cookie` class: + /// + /// ```dart + /// import "dart:io"; + /// import "package:http/http.dart"; + /// + /// void main() async { + /// final response = await Client().get(Uri.https('example.com', '/')); + /// final cookies = [ + /// for (var value i + /// in response.headersSplitValues['set-cookie'] ?? []) + /// Cookie.fromSetCookieValue(value) + /// ]; + Map> get headersSplitValues { + var headersWithFieldLists = >{}; + headers.forEach((key, value) { + if (!value.contains(',')) { + headersWithFieldLists[key] = [value]; + } else { + if (key == 'set-cookie') { + headersWithFieldLists[key] = value.split(_setCookieSplitter); + } else { + headersWithFieldLists[key] = value.split(_headerSplitter); + } + } + }); + return headersWithFieldLists; + } +} diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 1645f96048..31746fcb2d 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.1.3-wip +version: 1.2.0-wip description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http diff --git a/pkgs/http/test/response_test.dart b/pkgs/http/test/response_test.dart index 38061c1ef4..1bd9fd8e38 100644 --- a/pkgs/http/test/response_test.dart +++ b/pkgs/http/test/response_test.dart @@ -70,4 +70,73 @@ void main() { expect(response.bodyBytes, equals([104, 101, 108, 108, 111])); }); }); + + group('.headersSplitValues', () { + test('no headers', () async { + var response = http.Response('Hello, world!', 200); + expect(response.headersSplitValues, const >{}); + }); + + test('one header', () async { + var response = + http.Response('Hello, world!', 200, headers: {'fruit': 'apple'}); + expect(response.headersSplitValues, const { + 'fruit': ['apple'] + }); + }); + + test('two headers', () async { + var response = http.Response('Hello, world!', 200, + headers: {'fruit': 'apple,banana'}); + expect(response.headersSplitValues, const { + 'fruit': ['apple', 'banana'] + }); + }); + + test('two headers with lots of spaces', () async { + var response = http.Response('Hello, world!', 200, + headers: {'fruit': 'apple \t , \tbanana'}); + expect(response.headersSplitValues, const { + 'fruit': ['apple', 'banana'] + }); + }); + + test('one set-cookie', () async { + var response = http.Response('Hello, world!', 200, headers: { + 'set-cookie': 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT' + }); + expect(response.headersSplitValues, const { + 'set-cookie': ['id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT'] + }); + }); + + test('two set-cookie, with comma in expires', () async { + var response = http.Response('Hello, world!', 200, headers: { + // ignore: missing_whitespace_between_adjacent_strings + 'set-cookie': 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT,' + 'sessionId=e8bb43229de9; Domain=foo.example.com' + }); + expect(response.headersSplitValues, const { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }); + }); + + test('two set-cookie, with lots of commas', () async { + var response = http.Response('Hello, world!', 200, headers: { + 'set-cookie': + // ignore: missing_whitespace_between_adjacent_strings + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO,' + 'sessionId=e8bb43229de9; Domain=foo.example.com' + }); + expect(response.headersSplitValues, const { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }); + }); + }); } From bc7fa360107fa5e6f2c1a67a56c5faccde9441b9 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 12 Jan 2024 17:30:14 -0800 Subject: [PATCH 311/448] Add a contributing guide (#1115) --- CONTRIBUTING.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ README.md | 5 +++++ 2 files changed, 52 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..32c6edd91f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,47 @@ +# Contributing :heart: + +Want to contribute? Great! First, read this page (including the small print at +the end). + +### Before you contribute + +Before we can use your code, you must sign the +[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) +(CLA), which you can do online. The CLA is necessary mainly because you own the +copyright to your changes, even after your contribution becomes part of our +codebase, so we need your permission to use and distribute your code. We also +need to be sure of various other things—for instance that you'll tell us if you +know that your code infringes on other people's patents. You don't have to sign +the CLA until after you've submitted your code for review and a member has +approved it, but you must do it before we can put your code into our codebase. + +Before you start working on a larger contribution, you should get in touch with +us first through the issue tracker with your idea so that we can help out and +possibly guide you. Coordinating up front makes it much easier to avoid +frustration later on. + +### Code reviews + +All submissions, including submissions by project members, require review. + +### File headers + +All files in the project must start with the following header. + +```dart +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. +``` + +### The small print + +Contributions made by corporations are covered by a different agreement than the +one above, the +[Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate). + +## A word about conduct + +We pledge to maintain an open and welcoming environment :hugs:. +For details, see our +[code of conduct](https://dart.dev/community/code-of-conduct). diff --git a/README.md b/README.md index 006404db61..2ce0382dd2 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,8 @@ and the browser. | [cronet_http](pkgs/cronet_http/) | An Android Flutter plugin that provides access to the [Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) HTTP client. | [![pub package](https://img.shields.io/pub/v/cronet_http.svg)](https://pub.dev/packages/cronet_http) | | [cupertino_http](pkgs/cupertino_http/) | A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). | [![pub package](https://img.shields.io/pub/v/cupertino_http.svg)](https://pub.dev/packages/cupertino_http) | | [flutter_http_example](pkgs/flutter_http_example/) | An Flutter app that demonstrates how to configure and use `package:http`. | — | + +## Contributing + +If you'd like to contribute to any of these packages, see the +[Contributing Guide](CONTRIBUTING.md). From 30ddbf8863149cda60856e66353e056896df573a Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 16 Jan 2024 14:44:32 -0800 Subject: [PATCH 312/448] Add `BaseResponseWithUrl.url` (#1109) --- pkgs/http/CHANGELOG.md | 3 ++- pkgs/http/lib/http.dart | 5 ++-- pkgs/http/lib/src/base_request.dart | 26 +++++++++++++----- pkgs/http/lib/src/base_response.dart | 34 ++++++++++++++++++++++++ pkgs/http/lib/src/browser_client.dart | 5 +++- pkgs/http/lib/src/io_client.dart | 22 ++++++++++++++- pkgs/http/lib/src/streamed_response.dart | 17 ++++++++++++ pkgs/http/pubspec.yaml | 2 +- pkgs/http/test/io/request_test.dart | 9 ++++++- 9 files changed, 109 insertions(+), 14 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 90eb36aa6b..9421143702 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,6 +1,7 @@ -## 1.2.0-wip +## 1.2.0 * Add `MockClient.pngResponse`, which makes it easier to fake image responses. +* Added the ability to fetch the URL of the response through `BaseResponseWithUrl`. * Add the ability to get headers as a `Map` to `BaseResponse`. diff --git a/pkgs/http/lib/http.dart b/pkgs/http/lib/http.dart index bd039c8519..da35b23a87 100644 --- a/pkgs/http/lib/http.dart +++ b/pkgs/http/lib/http.dart @@ -16,7 +16,8 @@ import 'src/streamed_request.dart'; export 'src/base_client.dart'; export 'src/base_request.dart'; -export 'src/base_response.dart' show BaseResponse, HeadersWithSplitValues; +export 'src/base_response.dart' + show BaseResponse, BaseResponseWithUrl, HeadersWithSplitValues; export 'src/byte_stream.dart'; export 'src/client.dart' hide zoneClient; export 'src/exception.dart'; @@ -25,7 +26,7 @@ export 'src/multipart_request.dart'; export 'src/request.dart'; export 'src/response.dart'; export 'src/streamed_request.dart'; -export 'src/streamed_response.dart'; +export 'src/streamed_response.dart' show StreamedResponse; /// Sends an HTTP HEAD request with the given headers to the given URL. /// diff --git a/pkgs/http/lib/src/base_request.dart b/pkgs/http/lib/src/base_request.dart index 70a78695aa..4b165c7587 100644 --- a/pkgs/http/lib/src/base_request.dart +++ b/pkgs/http/lib/src/base_request.dart @@ -132,13 +132,25 @@ abstract class BaseRequest { try { var response = await client.send(this); var stream = onDone(response.stream, client.close); - return StreamedResponse(ByteStream(stream), response.statusCode, - contentLength: response.contentLength, - request: response.request, - headers: response.headers, - isRedirect: response.isRedirect, - persistentConnection: response.persistentConnection, - reasonPhrase: response.reasonPhrase); + + if (response case BaseResponseWithUrl(:final url)) { + return StreamedResponseV2(ByteStream(stream), response.statusCode, + contentLength: response.contentLength, + request: response.request, + headers: response.headers, + isRedirect: response.isRedirect, + url: url, + persistentConnection: response.persistentConnection, + reasonPhrase: response.reasonPhrase); + } else { + return StreamedResponse(ByteStream(stream), response.statusCode, + contentLength: response.contentLength, + request: response.request, + headers: response.headers, + isRedirect: response.isRedirect, + persistentConnection: response.persistentConnection, + reasonPhrase: response.reasonPhrase); + } } catch (_) { client.close(); rethrow; diff --git a/pkgs/http/lib/src/base_response.dart b/pkgs/http/lib/src/base_response.dart index e1796e1b36..0527461dbb 100644 --- a/pkgs/http/lib/src/base_response.dart +++ b/pkgs/http/lib/src/base_response.dart @@ -4,6 +4,9 @@ import 'base_client.dart'; import 'base_request.dart'; +import 'client.dart'; +import 'response.dart'; +import 'streamed_response.dart'; /// The base class for HTTP responses. /// @@ -71,6 +74,37 @@ abstract class BaseResponse { } } +/// A [BaseResponse] with a [url] field. +/// +/// [Client] methods that return a [BaseResponse] subclass, such as [Response] +/// or [StreamedResponse], **may** return a [BaseResponseWithUrl]. +/// +/// For example: +/// +/// ```dart +/// final client = Client(); +/// final response = client.get(Uri.https('example.com', '/')); +/// Uri? finalUri; +/// if (response case BaseResponseWithUrl(:final url)) { +/// finalUri = url; +/// } +/// // Do something with `finalUri`. +/// client.close(); +/// ``` +/// +/// [url] will be added to [BaseResponse] when `package:http` version 2 is +/// released and this mixin will be deprecated. +abstract interface class BaseResponseWithUrl implements BaseResponse { + /// The [Uri] of the response returned by the server. + /// + /// If no redirects were followed, [url] will be the same as the requested + /// [Uri]. + /// + /// If redirects were followed, [url] will be the [Uri] of the last redirect + /// that was followed. + abstract final Uri url; +} + /// "token" as defined in RFC 2616, 2.2 /// See https://datatracker.ietf.org/doc/html/rfc2616#section-2.2 const _tokenChars = r"!#$%&'*+\-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`" diff --git a/pkgs/http/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart index 80db8b1291..cbbada65f8 100644 --- a/pkgs/http/lib/src/browser_client.dart +++ b/pkgs/http/lib/src/browser_client.dart @@ -79,10 +79,13 @@ class BrowserClient extends BaseClient { return; } var body = (xhr.response as JSArrayBuffer).toDart.asUint8List(); - completer.complete(StreamedResponse( + var responseUrl = xhr.responseURL; + var url = responseUrl.isNotEmpty ? Uri.parse(responseUrl) : request.url; + completer.complete(StreamedResponseV2( ByteStream.fromBytes(body), xhr.status, contentLength: body.length, request: request, + url: url, headers: xhr.responseHeaders, reasonPhrase: xhr.statusText)); })); diff --git a/pkgs/http/lib/src/io_client.dart b/pkgs/http/lib/src/io_client.dart index db66b028c4..fe4834bb24 100644 --- a/pkgs/http/lib/src/io_client.dart +++ b/pkgs/http/lib/src/io_client.dart @@ -6,6 +6,7 @@ import 'dart:io'; import 'base_client.dart'; import 'base_request.dart'; +import 'base_response.dart'; import 'client.dart'; import 'exception.dart'; import 'io_streamed_response.dart'; @@ -46,6 +47,22 @@ class _ClientSocketException extends ClientException String toString() => 'ClientException with $cause, uri=$uri'; } +class _IOStreamedResponseV2 extends IOStreamedResponse + implements BaseResponseWithUrl { + @override + final Uri url; + + _IOStreamedResponseV2(super.stream, super.statusCode, + {required this.url, + super.contentLength, + super.request, + super.headers, + super.isRedirect, + super.persistentConnection, + super.reasonPhrase, + super.inner}); +} + /// A `dart:io`-based HTTP [Client]. /// /// If there is a socket-level failure when communicating with the server @@ -116,7 +133,7 @@ class IOClient extends BaseClient { headers[key] = values.map((value) => value.trimRight()).join(','); }); - return IOStreamedResponse( + return _IOStreamedResponseV2( response.handleError((Object error) { final httpException = error as HttpException; throw ClientException(httpException.message, httpException.uri); @@ -127,6 +144,9 @@ class IOClient extends BaseClient { request: request, headers: headers, isRedirect: response.isRedirect, + url: response.redirects.isNotEmpty + ? response.redirects.last.location + : request.url, persistentConnection: response.persistentConnection, reasonPhrase: response.reasonPhrase, inner: response); diff --git a/pkgs/http/lib/src/streamed_response.dart b/pkgs/http/lib/src/streamed_response.dart index 8cc0c76f75..44389d7061 100644 --- a/pkgs/http/lib/src/streamed_response.dart +++ b/pkgs/http/lib/src/streamed_response.dart @@ -26,3 +26,20 @@ class StreamedResponse extends BaseResponse { super.reasonPhrase}) : stream = toByteStream(stream); } + +/// This class is private to `package:http` and will be removed when +/// `package:http` v2 is released. +class StreamedResponseV2 extends StreamedResponse + implements BaseResponseWithUrl { + @override + final Uri url; + + StreamedResponseV2(super.stream, super.statusCode, + {required this.url, + super.contentLength, + super.request, + super.headers, + super.isRedirect, + super.persistentConnection, + super.reasonPhrase}); +} diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 31746fcb2d..a531a6373c 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.2.0-wip +version: 1.2.0 description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http diff --git a/pkgs/http/test/io/request_test.dart b/pkgs/http/test/io/request_test.dart index ac6b44c3fd..226781fbeb 100644 --- a/pkgs/http/test/io/request_test.dart +++ b/pkgs/http/test/io/request_test.dart @@ -46,15 +46,22 @@ void main() { final response = await request.send(); expect(response.statusCode, equals(302)); + expect( + response, + isA() + .having((r) => r.url, 'url', serverUrl.resolve('/redirect'))); }); test('with redirects', () async { final request = http.Request('GET', serverUrl.resolve('/redirect')); final response = await request.send(); - expect(response.statusCode, equals(200)); final bytesString = await response.stream.bytesToString(); expect(bytesString, parse(containsPair('path', '/'))); + expect( + response, + isA() + .having((r) => r.url, 'url', serverUrl.resolve('/'))); }); test('exceeding max redirects', () async { From 999ab77764a6941c795e7ad43f148bc2879444b2 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 17 Jan 2024 15:29:42 -0800 Subject: [PATCH 313/448] Support `BaseResponseWithUrl` in `package:cupertino_http` and `package:cronet_http` (#1110) --- .github/workflows/cupertino.yml | 2 +- .github/workflows/dart.yml | 30 +++++++++---------- pkgs/cronet_http/CHANGELOG.md | 3 +- pkgs/cronet_http/example/pubspec.yaml | 2 +- pkgs/cronet_http/lib/src/cronet_client.dart | 19 +++++++++++- pkgs/cronet_http/pubspec.yaml | 4 +-- pkgs/cupertino_http/CHANGELOG.md | 3 +- pkgs/cupertino_http/example/pubspec.yaml | 4 +-- .../lib/src/cupertino_client.dart | 20 ++++++++++++- pkgs/cupertino_http/pubspec.yaml | 8 ++--- .../lib/src/redirect_tests.dart | 23 ++++++++++++++ .../pubspec.yaml | 4 +-- 12 files changed, 91 insertions(+), 31 deletions(-) diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 6617635ce2..7194f9f518 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -57,7 +57,7 @@ jobs: matrix: # Test on the minimum supported flutter version and the latest # version. - flutter-version: ["3.10.0", "any"] + flutter-version: ["3.16.0", "any"] runs-on: macos-latest defaults: run: diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 3cb8d19d33..18ba166a5b 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -40,16 +40,16 @@ jobs: - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyze_and_format; linux; Dart 3.0.0; PKGS: pkgs/http_client_conformance_tests, pkgs/http_profile; `dart analyze --fatal-infos`" + name: "analyze_and_format; linux; Dart 3.0.0; PKG: pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_client_conformance_tests-pkgs/http_profile;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_client_conformance_tests-pkgs/http_profile + os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -60,15 +60,6 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - id: pkgs_http_client_conformance_tests_pub_upgrade - name: pkgs/http_client_conformance_tests; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http_client_conformance_tests - - name: "pkgs/http_client_conformance_tests; dart analyze --fatal-infos" - run: dart analyze --fatal-infos - if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http_client_conformance_tests - id: pkgs_http_profile_pub_upgrade name: pkgs/http_profile; dart pub upgrade run: dart pub upgrade @@ -79,16 +70,16 @@ jobs: if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile job_003: - name: "analyze_and_format; linux; Dart 3.2.0; PKG: pkgs/http; `dart analyze --fatal-infos`" + name: "analyze_and_format; linux; Dart 3.2.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http-pkgs/http_client_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -108,6 +99,15 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http + - id: pkgs_http_client_conformance_tests_pub_upgrade + name: pkgs/http_client_conformance_tests; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests + - name: "pkgs/http_client_conformance_tests; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_client_conformance_tests job_004: name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index fa461d5284..bc9255116c 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,7 +1,8 @@ -## 1.0.1-wip +## 1.1.0 * Use `package:http_image_provider` in the example application. * Support Android API 21+. +* Support `BaseResponseWithUrl`. ## 1.0.0 diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index 904b1e5ade..41c6611433 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -4,7 +4,7 @@ description: Demonstrates how to use the cronet_http plugin. publish_to: 'none' environment: - sdk: ^3.0.0 + sdk: ^3.2.0 dependencies: cronet_http: diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index 272b602b3d..3c2a4264d4 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -23,6 +23,21 @@ import 'jni/jni_bindings.dart' as jb; final _digitRegex = RegExp(r'^\d+$'); const _bufferSize = 10 * 1024; // The size of the Cronet read buffer. +/// This class can be removed when `package:http` v2 is released. +class _StreamedResponseWithUrl extends StreamedResponse + implements BaseResponseWithUrl { + @override + final Uri url; + + _StreamedResponseWithUrl(super.stream, super.statusCode, + {required this.url, + super.contentLength, + super.request, + super.headers, + super.isRedirect, + super.reasonPhrase}); +} + /// The type of caching to use when making HTTP requests. enum CacheMode { disabled, @@ -163,9 +178,11 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( case final contentLengthHeader?: contentLength = int.parse(contentLengthHeader); } - responseCompleter.complete(StreamedResponse( + responseCompleter.complete(_StreamedResponseWithUrl( responseStream!.stream, responseInfo.getHttpStatusCode(), + url: Uri.parse( + responseInfo.getUrl().toDartString(releaseOriginal: true)), contentLength: contentLength, reasonPhrase: responseInfo .getHttpStatusText() diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index c9e0e4d0a0..f1a642bbb3 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 1.0.1-wip +version: 1.1.0 description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http @@ -11,7 +11,7 @@ environment: dependencies: flutter: sdk: flutter - http: '>=0.13.4 <2.0.0' + http: ^1.2.0 jni: ^0.7.2 dev_dependencies: diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 395bb8b3b7..d077593629 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,6 +1,7 @@ -## 1.2.1-wip +## 1.3.0 * Use `package:http_image_provider` in the example application. +* Support `BaseResponseWithUrl`. ## 1.2.0 diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index 08048579ae..026cb8a39a 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -6,8 +6,8 @@ publish_to: 'none' version: 1.0.0+1 environment: - sdk: ^3.0.0 - flutter: '>=3.10.0' + sdk: ^3.2.0 + flutter: ^3.16.0 dependencies: cupertino_http: diff --git a/pkgs/cupertino_http/lib/src/cupertino_client.dart b/pkgs/cupertino_http/lib/src/cupertino_client.dart index a4c7715de5..b93dd5c29e 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_client.dart @@ -17,11 +17,27 @@ import 'cupertino_api.dart'; final _digitRegex = RegExp(r'^\d+$'); +/// This class can be removed when `package:http` v2 is released. +class _StreamedResponseWithUrl extends StreamedResponse + implements BaseResponseWithUrl { + @override + final Uri url; + + _StreamedResponseWithUrl(super.stream, super.statusCode, + {required this.url, + super.contentLength, + super.request, + super.headers, + super.isRedirect, + super.reasonPhrase}); +} + class _TaskTracker { final responseCompleter = Completer(); final BaseRequest request; final responseController = StreamController(); int numRedirects = 0; + Uri? lastUrl; // The last URL redirected to. _TaskTracker(this.request); @@ -180,6 +196,7 @@ class CupertinoClient extends BaseClient { ++taskTracker.numRedirects; if (taskTracker.request.followRedirects && taskTracker.numRedirects <= taskTracker.request.maxRedirects) { + taskTracker.lastUrl = request.url; return request; } return null; @@ -292,9 +309,10 @@ class CupertinoClient extends BaseClient { ); } - return StreamedResponse( + return _StreamedResponseWithUrl( taskTracker.responseController.stream, response.statusCode, + url: taskTracker.lastUrl ?? request.url, contentLength: response.expectedContentLength == -1 ? null : response.expectedContentLength, diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index e9a2bbfdb2..644bf1bf4d 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,20 +1,20 @@ name: cupertino_http -version: 1.2.1-wip +version: 1.3.0 description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: - sdk: ^3.0.0 - flutter: '>=3.10.0' # If changed, update test matrix. + sdk: ^3.2.0 + flutter: ^3.16.0 # If changed, update test matrix. dependencies: async: ^2.5.0 ffi: ^2.1.0 flutter: sdk: flutter - http: '>=0.13.4 <2.0.0' + http: ^1.2.0 dev_dependencies: dart_flutter_team_lints: ^2.0.0 diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart index 47a77a7dbf..a33d077705 100644 --- a/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_tests.dart @@ -27,12 +27,26 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { }); tearDownAll(() => httpServerChannel.sink.add(null)); + test('no redirect', () async { + final request = Request('GET', Uri.http(host, '/')) + ..followRedirects = false; + final response = await client.send(request); + expect(response.statusCode, 200); + expect(response.isRedirect, false); + if (response case BaseResponseWithUrl(url: final url)) { + expect(url, Uri.http(host, '/')); + } + }); + test('disallow redirect', () async { final request = Request('GET', Uri.http(host, '/1')) ..followRedirects = false; final response = await client.send(request); expect(response.statusCode, 302); expect(response.isRedirect, true); + if (response case BaseResponseWithUrl(url: final url)) { + expect(url, Uri.http(host, '/1')); + } }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : false); test('disallow redirect, 0 maxRedirects', () async { @@ -42,6 +56,9 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { final response = await client.send(request); expect(response.statusCode, 302); expect(response.isRedirect, true); + if (response case BaseResponseWithUrl(url: final url)) { + expect(url, Uri.http(host, '/1')); + } }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : false); test('allow redirect', () async { @@ -50,6 +67,9 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { final response = await client.send(request); expect(response.statusCode, 200); expect(response.isRedirect, false); + if (response case BaseResponseWithUrl(url: final url)) { + expect(url, Uri.http(host, '/')); + } }); test('allow redirect, 0 maxRedirects', () async { @@ -69,6 +89,9 @@ void testRedirect(Client client, {bool redirectAlwaysAllowed = false}) async { final response = await client.send(request); expect(response.statusCode, 200); expect(response.isRedirect, false); + if (response case BaseResponseWithUrl(url: final url)) { + expect(url, Uri.http(host, '/')); + } }, skip: redirectAlwaysAllowed ? 'redirects always allowed' : false); test('too many redirects', () async { diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index 520f1311b0..f904b2d0b3 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -7,12 +7,12 @@ repository: https://github.com/dart-lang/http/tree/master/pkgs/http_client_confo publish_to: none environment: - sdk: ^3.0.0 + sdk: ^3.2.0 dependencies: async: ^2.8.2 dart_style: ^2.2.3 - http: ^1.0.0 + http: ^1.2.0 stream_channel: ^2.1.1 test: ^1.21.2 From a5d9616526630760ae73b4fe80bcca99c0879018 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 29 Jan 2024 12:12:15 -0800 Subject: [PATCH 314/448] Use preferred flutter version constraints (#1119) --- pkgs/cupertino_http/example/pubspec.yaml | 2 +- pkgs/cupertino_http/pubspec.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index 026cb8a39a..8d61e62bed 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -7,7 +7,7 @@ version: 1.0.0+1 environment: sdk: ^3.2.0 - flutter: ^3.16.0 + flutter: '>=3.16.0' dependencies: cupertino_http: diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 644bf1bf4d..2a819e120b 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 1.3.0 +version: 1.3.1-wip description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. @@ -7,7 +7,7 @@ repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: sdk: ^3.2.0 - flutter: ^3.16.0 # If changed, update test matrix. + flutter: '>=3.16.0' # If changed, update test matrix. dependencies: async: ^2.5.0 From 5badad9d04091517af5566a32f9144ec017989e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 03:36:56 +0000 Subject: [PATCH 315/448] Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (#1124) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.0 to 1.6.2.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available in an environment variable, DART_HOME (#43).
  • Fixed an issue where cached downloads could lead to unzip issues on self-hosted runners (#35).

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.0&new-version=1.6.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/dart.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 18ba166a5b..b1cd309441 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -29,7 +29,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: stable - id: checkout @@ -54,7 +54,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: "3.0.0" - id: checkout @@ -84,7 +84,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: "3.2.0" - id: checkout @@ -123,7 +123,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout @@ -171,7 +171,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout @@ -279,7 +279,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: "3.0.0" - id: checkout @@ -317,7 +317,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: "3.2.0" - id: checkout @@ -355,7 +355,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: "3.2.0" - id: checkout @@ -393,7 +393,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: "3.2.0" - id: checkout @@ -431,7 +431,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout @@ -469,7 +469,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout @@ -507,7 +507,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout @@ -554,7 +554,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout From 1ba8c01c0d67a5b65fcea30810f53928f3fba469 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 03:39:19 +0000 Subject: [PATCH 316/448] Bump actions/cache from 3.3.2 to 4.0.0 (#1125) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/cache](https://github.com/actions/cache) from 3.3.2 to 4.0.0.
Release notes

Sourced from actions/cache's releases.

v4.0.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/cache/compare/v3...v4.0.0

v3.3.3

What's Changed

New Contributors

Full Changelog: https://github.com/actions/cache/compare/v3...v3.3.3

Changelog

Sourced from actions/cache's changelog.

Releases

3.0.0

  • Updated minimum runner version support from node 12 -> node 16

3.0.1

  • Added support for caching from GHES 3.5.
  • Fixed download issue for files > 2GB during restore.

3.0.2

  • Added support for dynamic cache size cap on GHES.

3.0.3

  • Fixed avoiding empty cache save when no files are available for caching. (issue)

3.0.4

  • Fixed tar creation error while trying to create tar with path as ~/ home folder on ubuntu-latest. (issue)

3.0.5

  • Removed error handling by consuming actions/cache 3.0 toolkit, Now cache server error handling will be done by toolkit. (PR)

3.0.6

  • Fixed #809 - zstd -d: no such file or directory error
  • Fixed #833 - cache doesn't work with github workspace directory

3.0.7

  • Fixed #810 - download stuck issue. A new timeout is introduced in the download process to abort the download if it gets stuck and doesn't finish within an hour.

3.0.8

  • Fix zstd not working for windows on gnu tar in issues #888 and #891.
  • Allowing users to provide a custom timeout as input for aborting download of a cache segment using an environment variable SEGMENT_DOWNLOAD_TIMEOUT_MINS. Default is 60 minutes.

3.0.9

  • Enhanced the warning message for cache unavailablity in case of GHES.

3.0.10

  • Fix a bug with sorting inputs.
  • Update definition for restore-keys in README.md

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=3.3.2&new-version=4.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/dart.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index b1cd309441..2f70d2bd93 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile;commands:analyze_1" @@ -74,7 +74,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze_1" @@ -113,7 +113,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile;commands:analyze_1" @@ -161,7 +161,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile;commands:format" @@ -209,7 +209,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:format" @@ -239,7 +239,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:analyze_0" @@ -269,7 +269,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile;commands:test_2" @@ -307,7 +307,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http;commands:command_1" @@ -345,7 +345,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http;commands:test_3" @@ -383,7 +383,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http;commands:test_2" @@ -421,7 +421,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:command_1" @@ -459,7 +459,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_3" @@ -497,7 +497,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_profile;commands:test_2" @@ -544,7 +544,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_4" @@ -582,7 +582,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:test_1" @@ -620,7 +620,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:command_0" @@ -658,7 +658,7 @@ jobs: runs-on: macos-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" key: "os:macos-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:command_0" From 118585512d0dd2c53c6e7d370ea124144ea09bfa Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 15 Feb 2024 09:46:13 -0800 Subject: [PATCH 317/448] [http] Migrate to the latest pkg:web, require Dart 3.3 (#1132) --- .github/workflows/dart.yml | 117 +++++++++++++++++--------- pkgs/http/CHANGELOG.md | 5 ++ pkgs/http/lib/src/browser_client.dart | 2 +- pkgs/http/pubspec.yaml | 6 +- pkgs/http/test/html/utils.dart | 2 +- 5 files changed, 85 insertions(+), 47 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 2f70d2bd93..a170201240 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -70,16 +70,16 @@ jobs: if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile job_003: - name: "analyze_and_format; linux; Dart 3.2.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" + name: "analyze_and_format; linux; Dart 3.2.0; PKG: pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http-pkgs/http_client_conformance_tests;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http_client_conformance_tests;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http-pkgs/http_client_conformance_tests + os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http_client_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -90,15 +90,6 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - id: pkgs_http_pub_upgrade - name: pkgs/http; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http - - name: "pkgs/http; dart analyze --fatal-infos" - run: dart analyze --fatal-infos - if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http - id: pkgs_http_client_conformance_tests_pub_upgrade name: pkgs/http_client_conformance_tests; dart pub upgrade run: dart pub upgrade @@ -109,6 +100,36 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests job_004: + name: "analyze_and_format; linux; Dart 3.3.0; PKG: pkgs/http; `dart analyze --fatal-infos`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:analyze_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + with: + sdk: "3.3.0" + - id: checkout + name: Checkout repository + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + - name: "pkgs/http; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http + job_005: name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -156,7 +177,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_005: + job_006: name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -204,7 +225,7 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_006: + job_007: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -234,7 +255,7 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_007: + job_008: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -264,7 +285,7 @@ jobs: run: flutter analyze --fatal-infos if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_008: + job_009: name: "unit_test; linux; Dart 3.0.0; PKG: pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -302,24 +323,25 @@ jobs: - job_005 - job_006 - job_007 - job_009: - name: "unit_test; linux; Dart 3.2.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" + - job_008 + job_010: + name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http;commands:command_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:command_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: - sdk: "3.2.0" + sdk: "3.3.0" - id: checkout name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 @@ -340,24 +362,25 @@ jobs: - job_005 - job_006 - job_007 - job_010: - name: "unit_test; linux; Dart 3.2.0; PKG: pkgs/http; `dart test --platform chrome`" + - job_008 + job_011: + name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http;commands:test_3" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:test_3" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: - sdk: "3.2.0" + sdk: "3.3.0" - id: checkout name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 @@ -378,24 +401,25 @@ jobs: - job_005 - job_006 - job_007 - job_011: - name: "unit_test; linux; Dart 3.2.0; PKG: pkgs/http; `dart test --platform vm`" + - job_008 + job_012: + name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http;commands:test_2" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:test_2" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: - sdk: "3.2.0" + sdk: "3.3.0" - id: checkout name: Checkout repository uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 @@ -416,7 +440,8 @@ jobs: - job_005 - job_006 - job_007 - job_012: + - job_008 + job_013: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -454,7 +479,8 @@ jobs: - job_005 - job_006 - job_007 - job_013: + - job_008 + job_014: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -492,7 +518,8 @@ jobs: - job_005 - job_006 - job_007 - job_014: + - job_008 + job_015: name: "unit_test; linux; Dart dev; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -539,7 +566,8 @@ jobs: - job_005 - job_006 - job_007 - job_015: + - job_008 + job_016: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm`" runs-on: ubuntu-latest steps: @@ -577,7 +605,8 @@ jobs: - job_005 - job_006 - job_007 - job_016: + - job_008 + job_017: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test --platform chrome`" runs-on: ubuntu-latest steps: @@ -615,7 +644,8 @@ jobs: - job_005 - job_006 - job_007 - job_017: + - job_008 + job_018: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: ubuntu-latest steps: @@ -653,7 +683,8 @@ jobs: - job_005 - job_006 - job_007 - job_018: + - job_008 + job_019: name: "unit_test; macos; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: macos-latest steps: @@ -691,7 +722,8 @@ jobs: - job_005 - job_006 - job_007 - job_019: + - job_008 + job_020: name: "unit_test; windows; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: windows-latest steps: @@ -719,3 +751,4 @@ jobs: - job_005 - job_006 - job_007 + - job_008 diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 9421143702..86bc67821f 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.2.1 + +* Require Dart `^3.3` +* Require `package:web` `^0.5.0`. + ## 1.2.0 * Add `MockClient.pngResponse`, which makes it easier to fake image responses. diff --git a/pkgs/http/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart index cbbada65f8..07e232307f 100644 --- a/pkgs/http/lib/src/browser_client.dart +++ b/pkgs/http/lib/src/browser_client.dart @@ -5,7 +5,7 @@ import 'dart:async'; import 'dart:js_interop'; -import 'package:web/helpers.dart'; +import 'package:web/web.dart'; import 'base_client.dart'; import 'base_request.dart'; diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index a531a6373c..1874d5cc08 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,16 +1,16 @@ name: http -version: 1.2.0 +version: 1.2.1 description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http environment: - sdk: ^3.2.0 + sdk: ^3.3.0 dependencies: async: ^2.5.0 http_parser: ^4.0.0 meta: ^1.3.0 - web: '>=0.3.0 <0.5.0' + web: ^0.5.0 dev_dependencies: dart_flutter_team_lints: ^2.0.0 diff --git a/pkgs/http/test/html/utils.dart b/pkgs/http/test/html/utils.dart index 501c621256..11170e15d2 100644 --- a/pkgs/http/test/html/utils.dart +++ b/pkgs/http/test/html/utils.dart @@ -2,7 +2,7 @@ // for details. 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:web/helpers.dart'; +import 'package:web/web.dart'; export '../utils.dart'; From ee4e4295b8015f9c4e58916bf5f46d73e2558dac Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Thu, 15 Feb 2024 16:31:12 -0800 Subject: [PATCH 318/448] blast repo changes: auto-publish, github-actions, no-response (#1133) --- .github/workflows/cronet.yml | 8 ++--- .github/workflows/cupertino.yml | 10 +++--- .github/workflows/dart.yml | 52 +++++++++++++++---------------- .github/workflows/java.yml | 8 ++--- .github/workflows/no-response.yml | 37 ++++++++++++++++++++++ .github/workflows/publish.yaml | 17 ++++++++++ pkgs/cupertino_http/CHANGELOG.md | 2 ++ 7 files changed, 95 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/no-response.yml create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 74571fb904..1e9a81d5a5 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -28,12 +28,12 @@ jobs: matrix: package: ['cronet_http', 'cronet_http_embedded'] steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 with: distribution: 'zulu' java-version: '17' - - uses: subosito/flutter-action@v2 + - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: channel: 'stable' - name: Make cronet_http_embedded copy @@ -55,7 +55,7 @@ jobs: run: flutter analyze --fatal-infos if: always() && steps.install.outcome == 'success' - name: Run tests - uses: reactivecircus/android-emulator-runner@v2 + uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 if: always() && steps.install.outcome == 'success' with: # api-level/minSdkVersion should be help in sync in: diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 7194f9f518..ef2a8e8e91 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -28,8 +28,8 @@ jobs: run: working-directory: pkgs/cupertino_http steps: - - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: channel: 'stable' - id: install @@ -63,11 +63,11 @@ jobs: run: working-directory: pkgs/cupertino_http/example steps: - - uses: actions/checkout@v4 - - uses: futureware-tech/simulator-action@v3 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: futureware-tech/simulator-action@bfa03d93ec9de6dacb0c5553bbf8da8afc6c2ee9 with: model: 'iPhone 8' - - uses: subosito/flutter-action@v2 + - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: flutter-version: ${{ matrix.flutter-version }} channel: 'stable' diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index a170201240..3de19a3ec6 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -34,7 +34,7 @@ jobs: sdk: stable - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - name: mono_repo self validate run: dart pub global activate mono_repo 6.6.1 - name: mono_repo self validate @@ -59,7 +59,7 @@ jobs: sdk: "3.0.0" - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_profile_pub_upgrade name: pkgs/http_profile; dart pub upgrade run: dart pub upgrade @@ -89,7 +89,7 @@ jobs: sdk: "3.2.0" - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_client_conformance_tests_pub_upgrade name: pkgs/http_client_conformance_tests; dart pub upgrade run: dart pub upgrade @@ -119,7 +119,7 @@ jobs: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -149,7 +149,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -197,7 +197,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -240,12 +240,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa + uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -270,12 +270,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa + uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -305,7 +305,7 @@ jobs: sdk: "3.0.0" - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_profile_pub_upgrade name: pkgs/http_profile; dart pub upgrade run: dart pub upgrade @@ -344,7 +344,7 @@ jobs: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -383,7 +383,7 @@ jobs: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -422,7 +422,7 @@ jobs: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -461,7 +461,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -500,7 +500,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -539,7 +539,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -587,7 +587,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -621,12 +621,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa + uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -660,12 +660,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa + uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -699,12 +699,12 @@ jobs: os:macos-latest;pub-cache-hosted os:macos-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa + uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -728,12 +728,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Flutter SDK - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa + uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index ec1b9da029..ed3f93fd8e 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -29,8 +29,8 @@ jobs: run: working-directory: pkgs/java_http steps: - - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: channel: 'stable' @@ -55,8 +55,8 @@ jobs: working-directory: pkgs/java_http steps: - - uses: actions/checkout@v4 - - uses: subosito/flutter-action@v2 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: channel: 'stable' diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml new file mode 100644 index 0000000000..ab1ac49842 --- /dev/null +++ b/.github/workflows/no-response.yml @@ -0,0 +1,37 @@ +# A workflow to close issues where the author hasn't responded to a request for +# more information; see https://github.com/actions/stale. + +name: No Response + +# Run as a daily cron. +on: + schedule: + # Every day at 8am + - cron: '0 8 * * *' + +# All permissions not specified are set to 'none'. +permissions: + issues: write + pull-requests: write + +jobs: + no-response: + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'dart-lang' }} + steps: + - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e + with: + # Don't automatically mark inactive issues+PRs as stale. + days-before-stale: -1 + # Close needs-info issues and PRs after 14 days of inactivity. + days-before-close: 14 + stale-issue-label: "needs-info" + close-issue-message: > + Without additional information we're not able to resolve this issue. + Feel free to add more info or respond to any questions above and we + can reopen the case. Thanks for your contribution! + stale-pr-label: "needs-info" + close-pr-message: > + Without additional information we're not able to resolve this PR. + Feel free to add more info or respond to any questions above. + Thanks for your contribution! diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000000..f0cc574ccc --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,17 @@ +# A CI configuration to auto-publish pub packages. + +name: Publish + +on: + pull_request: + branches: [ master ] + push: + tags: [ '[A-z]+-v[0-9]+.[0-9]+.[0-9]+' ] + +jobs: + publish: + if: ${{ github.repository_owner == 'dart-lang' }} + uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main + permissions: + id-token: write # Required for authentication using OIDC + pull-requests: write # Required for writing the pull request note diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index d077593629..34a36c59a4 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.3.1-wip + ## 1.3.0 * Use `package:http_image_provider` in the example application. From 77c45bbffd6ca64ce79e3b3e7d7e6a0c00a11541 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 20 Feb 2024 12:56:50 -0800 Subject: [PATCH 319/448] Create a simple WebSocket interface (#1128) --- .github/workflows/dart.yml | 104 ++++++++++--- pkgs/web_socket/CHANGELOG.md | 3 + pkgs/web_socket/README.md | 2 + .../example/web_socket_example.dart | 3 + pkgs/web_socket/lib/src/web_socket.dart | 141 ++++++++++++++++++ pkgs/web_socket/lib/web_socket.dart | 4 + pkgs/web_socket/mono_pkg.yaml | 10 ++ pkgs/web_socket/pubspec.yaml | 11 ++ 8 files changed, 256 insertions(+), 22 deletions(-) create mode 100644 pkgs/web_socket/CHANGELOG.md create mode 100644 pkgs/web_socket/README.md create mode 100644 pkgs/web_socket/example/web_socket_example.dart create mode 100644 pkgs/web_socket/lib/src/web_socket.dart create mode 100644 pkgs/web_socket/lib/web_socket.dart create mode 100644 pkgs/web_socket/mono_pkg.yaml create mode 100644 pkgs/web_socket/pubspec.yaml diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 3de19a3ec6..22c1e5205c 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -100,6 +100,36 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests job_004: + name: "analyze_and_format; linux; Dart 3.2.6; PKG: pkgs/web_socket; `dart analyze --fatal-infos`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.6;packages:pkgs/web_socket;commands:analyze_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:3.2.6;packages:pkgs/web_socket + os:ubuntu-latest;pub-cache-hosted;sdk:3.2.6 + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + with: + sdk: "3.2.6" + - id: checkout + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - id: pkgs_web_socket_pub_upgrade + name: pkgs/web_socket; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/web_socket + - name: "pkgs/web_socket; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_web_socket_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/web_socket + job_005: name: "analyze_and_format; linux; Dart 3.3.0; PKG: pkgs/http; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -129,17 +159,17 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http - job_005: - name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart analyze --fatal-infos`" + job_006: + name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile, pkgs/web_socket; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -177,17 +207,26 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_006: - name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile; `dart format --output=none --set-exit-if-changed .`" + - id: pkgs_web_socket_pub_upgrade + name: pkgs/web_socket; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/web_socket + - name: "pkgs/web_socket; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_web_socket_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/web_socket + job_007: + name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile, pkgs/web_socket; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile;commands:format" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket;commands:format" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -225,7 +264,16 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_007: + - id: pkgs_web_socket_pub_upgrade + name: pkgs/web_socket; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/web_socket + - name: "pkgs/web_socket; dart format --output=none --set-exit-if-changed ." + run: "dart format --output=none --set-exit-if-changed ." + if: "always() && steps.pkgs_web_socket_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/web_socket + job_008: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -255,7 +303,7 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_008: + job_009: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -285,7 +333,7 @@ jobs: run: flutter analyze --fatal-infos if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_009: + job_010: name: "unit_test; linux; Dart 3.0.0; PKG: pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -324,7 +372,8 @@ jobs: - job_006 - job_007 - job_008 - job_010: + - job_009 + job_011: name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -363,7 +412,8 @@ jobs: - job_006 - job_007 - job_008 - job_011: + - job_009 + job_012: name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -402,7 +452,8 @@ jobs: - job_006 - job_007 - job_008 - job_012: + - job_009 + job_013: name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -441,7 +492,8 @@ jobs: - job_006 - job_007 - job_008 - job_013: + - job_009 + job_014: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -480,7 +532,8 @@ jobs: - job_006 - job_007 - job_008 - job_014: + - job_009 + job_015: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -519,7 +572,8 @@ jobs: - job_006 - job_007 - job_008 - job_015: + - job_009 + job_016: name: "unit_test; linux; Dart dev; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -567,7 +621,8 @@ jobs: - job_006 - job_007 - job_008 - job_016: + - job_009 + job_017: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm`" runs-on: ubuntu-latest steps: @@ -606,7 +661,8 @@ jobs: - job_006 - job_007 - job_008 - job_017: + - job_009 + job_018: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test --platform chrome`" runs-on: ubuntu-latest steps: @@ -645,7 +701,8 @@ jobs: - job_006 - job_007 - job_008 - job_018: + - job_009 + job_019: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: ubuntu-latest steps: @@ -684,7 +741,8 @@ jobs: - job_006 - job_007 - job_008 - job_019: + - job_009 + job_020: name: "unit_test; macos; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: macos-latest steps: @@ -723,7 +781,8 @@ jobs: - job_006 - job_007 - job_008 - job_020: + - job_009 + job_021: name: "unit_test; windows; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: windows-latest steps: @@ -752,3 +811,4 @@ jobs: - job_006 - job_007 - job_008 + - job_009 diff --git a/pkgs/web_socket/CHANGELOG.md b/pkgs/web_socket/CHANGELOG.md new file mode 100644 index 0000000000..3d138c0f6e --- /dev/null +++ b/pkgs/web_socket/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.1.0-wip + +- Abstract interface definition. diff --git a/pkgs/web_socket/README.md b/pkgs/web_socket/README.md new file mode 100644 index 0000000000..e43843ebc9 --- /dev/null +++ b/pkgs/web_socket/README.md @@ -0,0 +1,2 @@ +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. diff --git a/pkgs/web_socket/example/web_socket_example.dart b/pkgs/web_socket/example/web_socket_example.dart new file mode 100644 index 0000000000..6cb625c543 --- /dev/null +++ b/pkgs/web_socket/example/web_socket_example.dart @@ -0,0 +1,3 @@ +void main() { + // TODO: add an example. +} diff --git a/pkgs/web_socket/lib/src/web_socket.dart b/pkgs/web_socket/lib/src/web_socket.dart new file mode 100644 index 0000000000..ffc0a3844c --- /dev/null +++ b/pkgs/web_socket/lib/src/web_socket.dart @@ -0,0 +1,141 @@ +import 'dart:typed_data'; + +/// An event received from the peer through the [WebSocket]. +sealed class WebSocketEvent {} + +/// Text data received from the peer through the [WebSocket]. +/// +/// See [WebSocket.events]. +final class TextDataReceived extends WebSocketEvent { + final String text; + TextDataReceived(this.text); + + @override + bool operator ==(Object other) => + other is TextDataReceived && other.text == text; + + @override + int get hashCode => text.hashCode; +} + +/// Binary data received from the peer through the [WebSocket]. +/// +/// See [WebSocket.events]. +final class BinaryDataReceived extends WebSocketEvent { + final Uint8List data; + BinaryDataReceived(this.data); + + @override + bool operator ==(Object other) { + if (other is BinaryDataReceived && other.data.length == data.length) { + for (var i = 0; i < data.length; ++i) { + if (other.data[i] != data[i]) return false; + } + return true; + } + return false; + } + + @override + int get hashCode => data.hashCode; + + @override + String toString() => 'BinaryDataReceived($data)'; +} + +/// A close notification (Close frame) received from the peer through the +/// [WebSocket] or a failure indication. +/// +/// See [WebSocket.events]. +final class CloseReceived extends WebSocketEvent { + /// A numerical code indicating the reason why the WebSocket was closed. + /// + /// See [RFC-6455 7.4](https://www.rfc-editor.org/rfc/rfc6455.html#section-7.4) + /// for guidance on how to interpret these codes. + final int? code; + + /// A textual explanation of the reason why the WebSocket was closed. + /// + /// Will be empty if the peer did not specify a reason. + final String reason; + + CloseReceived([this.code, this.reason = '']); + + @override + bool operator ==(Object other) => + other is CloseReceived && other.code == code && other.reason == reason; + + @override + int get hashCode => [code, reason].hashCode; + + @override + String toString() => 'CloseReceived($code, $reason)'; +} + +class WebSocketException implements Exception { + final String message; + WebSocketException([this.message = '']); +} + +/// Thrown if [WebSocket.sendText], [WebSocket.sendBytes], or +/// [WebSocket.close] is called when the [WebSocket] is closed. +class WebSocketConnectionClosed extends WebSocketException { + WebSocketConnectionClosed([super.message = 'Connection Closed']); +} + +/// The interface for WebSocket connections. +/// +/// TODO: insert a usage example. +abstract interface class WebSocket { + /// Sends text data to the connected peer. + /// + /// Throws [WebSocketConnectionClosed] if the [WebSocket] is + /// closed (either through [close] or by the peer). + /// + /// Data sent through [sendText] will be silently discarded if the peer is + /// disconnected but the disconnect has not yet been detected. + void sendText(String s); + + /// Sends binary data to the connected peer. + /// + /// Throws [WebSocketConnectionClosed] if the [WebSocket] is + /// closed (either through [close] or by the peer). + /// + /// Data sent through [sendBytes] will be silently discarded if the peer is + /// disconnected but the disconnect has not yet been detected. + void sendBytes(Uint8List b); + + /// Closes the WebSocket connection and the [events] `Stream`. + /// + /// Sends a Close frame to the peer. If the optional [code] and [reason] + /// arguments are given, they will be included in the Close frame. If no + /// [code] is set then the peer will see a 1005 status code. If no [reason] + /// is set then the peer will not receive a reason string. + /// + /// Throws a [RangeError] if [code] is not in the range 3000-4999. + /// + /// Throws an [ArgumentError] if [reason] is longer than 123 bytes when + /// encoded as UTF-8 + /// + /// Throws [WebSocketConnectionClosed] if the connection is already + /// closed (including by the peer). + Future close([int? code, String? reason]); + + /// A [Stream] of [WebSocketEvent] received from the peer. + /// + /// Data received by the peer will be delivered as a [TextDataReceived] or + /// [BinaryDataReceived]. + /// + /// If a [CloseReceived] event is received then the [Stream] will be closed. A + /// [CloseReceived] event indicates either that: + /// + /// - A close frame was received from the peer. [CloseReceived.code] and + /// [CloseReceived.reason] will be set by the peer. + /// - A failure occured (e.g. the peer disconnected). [CloseReceived.code] and + /// [CloseReceived.reason] will be a failure code defined by + /// (RFC-6455)[https://www.rfc-editor.org/rfc/rfc6455.html#section-7.4.1] + /// (e.g. 1006). + /// + /// Errors will never appear in this [Stream]. + Stream get events; +} diff --git a/pkgs/web_socket/lib/web_socket.dart b/pkgs/web_socket/lib/web_socket.dart new file mode 100644 index 0000000000..b901ebc76a --- /dev/null +++ b/pkgs/web_socket/lib/web_socket.dart @@ -0,0 +1,4 @@ +/// TODO: write this doc string. +library; + +export 'src/web_socket.dart'; diff --git a/pkgs/web_socket/mono_pkg.yaml b/pkgs/web_socket/mono_pkg.yaml new file mode 100644 index 0000000000..16e4e7a5f3 --- /dev/null +++ b/pkgs/web_socket/mono_pkg.yaml @@ -0,0 +1,10 @@ +sdk: +- pubspec +- dev + +stages: +- analyze_and_format: + - analyze: --fatal-infos + - format: + sdk: + - dev diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml new file mode 100644 index 0000000000..237da791ea --- /dev/null +++ b/pkgs/web_socket/pubspec.yaml @@ -0,0 +1,11 @@ +name: web_socket +description: "TODO: enter a descirption here" +publish_to: none +repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket + +environment: + sdk: ^3.2.6 + +dev_dependencies: + dart_flutter_team_lints: ^2.0.0 + test: ^1.24.0 From fe5c72d58d91eb8e1e8339a83d1e743fed101707 Mon Sep 17 00:00:00 2001 From: Derek Xu Date: Wed, 21 Feb 2024 10:30:40 -0500 Subject: [PATCH 320/448] Populate package:http_profile (#1046) --- .github/workflows/dart.yml | 126 +++--- pkgs/http_profile/lib/http_profile.dart | 380 ++++++++++++++++- pkgs/http_profile/pubspec.yaml | 3 +- .../test/populating_profiles_test.dart | 386 ++++++++++++++++++ .../test/profiling_enabled_test.dart | 18 +- 5 files changed, 837 insertions(+), 76 deletions(-) create mode 100644 pkgs/http_profile/test/populating_profiles_test.dart diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 22c1e5205c..400bdd10df 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -40,36 +40,6 @@ jobs: - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyze_and_format; linux; Dart 3.0.0; PKG: pkgs/http_profile; `dart analyze --fatal-infos`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile;commands:analyze_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 - with: - sdk: "3.0.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - id: pkgs_http_profile_pub_upgrade - name: pkgs/http_profile; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http_profile - - name: "pkgs/http_profile; dart analyze --fatal-infos" - run: dart analyze --fatal-infos - if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http_profile - job_003: name: "analyze_and_format; linux; Dart 3.2.0; PKG: pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -99,7 +69,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests - job_004: + job_003: name: "analyze_and_format; linux; Dart 3.2.6; PKG: pkgs/web_socket; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -129,7 +99,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_web_socket_pub_upgrade.conclusion == 'success'" working-directory: pkgs/web_socket - job_005: + job_004: name: "analyze_and_format; linux; Dart 3.3.0; PKG: pkgs/http; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -159,6 +129,36 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http + job_005: + name: "analyze_and_format; linux; Dart 3.4.0-154.0.dev; PKG: pkgs/http_profile; `dart analyze --fatal-infos`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev;packages:pkgs/http_profile;commands:analyze_1" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev;packages:pkgs/http_profile + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + with: + sdk: "3.4.0-154.0.dev" + - id: checkout + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - id: pkgs_http_profile_pub_upgrade + name: pkgs/http_profile; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_profile + - name: "pkgs/http_profile; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_profile job_006: name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile, pkgs/web_socket; `dart analyze --fatal-infos`" runs-on: ubuntu-latest @@ -334,35 +334,35 @@ jobs: if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example job_010: - name: "unit_test; linux; Dart 3.0.0; PKG: pkgs/http_profile; `dart test --platform vm`" + name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile;commands:test_2" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:command_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/http_profile - os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: - sdk: "3.0.0" + sdk: "3.3.0" - id: checkout name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - id: pkgs_http_profile_pub_upgrade - name: pkgs/http_profile; dart pub upgrade + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http_profile - - name: "pkgs/http_profile; dart test --platform vm" - run: dart test --platform vm - if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http_profile + working-directory: pkgs/http + - name: "pkgs/http; dart run --define=no_default_http_client=true test/no_default_http_client_test.dart" + run: "dart run --define=no_default_http_client=true test/no_default_http_client_test.dart" + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http needs: - job_001 - job_002 @@ -374,14 +374,14 @@ jobs: - job_008 - job_009 job_011: - name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" + name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:command_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:test_3" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 @@ -399,8 +399,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: pkgs/http - - name: "pkgs/http; dart run --define=no_default_http_client=true test/no_default_http_client_test.dart" - run: "dart run --define=no_default_http_client=true test/no_default_http_client_test.dart" + - name: "pkgs/http; dart test --platform chrome" + run: dart test --platform chrome if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http needs: @@ -414,14 +414,14 @@ jobs: - job_008 - job_009 job_012: - name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart test --platform chrome`" + name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:test_3" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:test_2" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 @@ -439,8 +439,8 @@ jobs: run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" working-directory: pkgs/http - - name: "pkgs/http; dart test --platform chrome" - run: dart test --platform chrome + - name: "pkgs/http; dart test --platform vm" + run: dart test --platform vm if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http needs: @@ -454,35 +454,35 @@ jobs: - job_008 - job_009 job_013: - name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart test --platform vm`" + name: "unit_test; linux; Dart 3.4.0-154.0.dev; PKG: pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:test_2" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev;packages:pkgs/http_profile;commands:test_2" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev;packages:pkgs/http_profile + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: - sdk: "3.3.0" + sdk: "3.4.0-154.0.dev" - id: checkout name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - id: pkgs_http_pub_upgrade - name: pkgs/http; dart pub upgrade + - id: pkgs_http_profile_pub_upgrade + name: pkgs/http_profile; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http - - name: "pkgs/http; dart test --platform vm" + working-directory: pkgs/http_profile + - name: "pkgs/http_profile; dart test --platform vm" run: dart test --platform vm - if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http + if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_profile needs: - job_001 - job_002 diff --git a/pkgs/http_profile/lib/http_profile.dart b/pkgs/http_profile/lib/http_profile.dart index ea27665fb1..b0b7a87677 100644 --- a/pkgs/http_profile/lib/http_profile.dart +++ b/pkgs/http_profile/lib/http_profile.dart @@ -2,7 +2,274 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:io'; +import 'dart:async' show StreamController, StreamSink; +import 'dart:developer' show Service, addHttpClientProfilingData; +import 'dart:io' show HttpClient, HttpClientResponseCompressionState; +import 'dart:isolate' show Isolate; + +/// Describes an event related to an HTTP request. +final class HttpProfileRequestEvent { + final int _timestamp; + final String _name; + + HttpProfileRequestEvent({required DateTime timestamp, required String name}) + : _timestamp = timestamp.microsecondsSinceEpoch, + _name = name; + + Map _toJson() => { + 'timestamp': _timestamp, + 'event': _name, + }; +} + +/// Describes proxy authentication details associated with an HTTP request. +final class HttpProfileProxyData { + final String? _host; + final String? _username; + final bool? _isDirect; + final int? _port; + + HttpProfileProxyData({ + String? host, + String? username, + bool? isDirect, + int? port, + }) : _host = host, + _username = username, + _isDirect = isDirect, + _port = port; + + Map _toJson() => { + if (_host != null) 'host': _host, + if (_username != null) 'username': _username, + if (_isDirect != null) 'isDirect': _isDirect, + if (_port != null) 'port': _port, + }; +} + +/// Describes a redirect that an HTTP connection went through. +class HttpProfileRedirectData { + final int _statusCode; + final String _method; + final String _location; + + HttpProfileRedirectData({ + required int statusCode, + required String method, + required String location, + }) : _statusCode = statusCode, + _method = method, + _location = location; + + Map _toJson() => { + 'statusCode': _statusCode, + 'method': _method, + 'location': _location, + }; +} + +/// Describes details about an HTTP request. +final class HttpProfileRequestData { + final Map _data; + + final void Function() _updated; + + /// Information about the networking connection used in the HTTP request. + /// + /// This information is meant to be used for debugging. + /// + /// It can contain any arbitrary data as long as the values are of type + /// [String] or [int]. For example: + /// { 'localPort': 1285, 'remotePort': 443, 'connectionPoolId': '21x23' } + set connectionInfo(Map value) { + for (final v in value.values) { + if (!(v is String || v is int)) { + throw ArgumentError( + 'The values in connectionInfo must be of type String or int.', + ); + } + } + _data['connectionInfo'] = {...value}; + _updated(); + } + + /// The content length of the request, in bytes. + set contentLength(int value) { + _data['contentLength'] = value; + _updated(); + } + + /// The cookies presented to the server (in the 'cookie' header). + /// + /// Usage example: + /// + /// ```dart + /// profile.requestData.cookies = [ + /// 'sessionId=abc123', + /// 'csrftoken=def456', + /// ]; + /// ``` + set cookies(List value) { + _data['cookies'] = [...value]; + _updated(); + } + + /// The error associated with a failed request. + set error(String value) { + _data['error'] = value; + _updated(); + } + + /// Whether automatic redirect following was enabled for the request. + set followRedirects(bool value) { + _data['followRedirects'] = value; + _updated(); + } + + set headers(Map> value) { + _data['headers'] = {...value}; + _updated(); + } + + /// The maximum number of redirects allowed during the request. + set maxRedirects(int value) { + _data['maxRedirects'] = value; + _updated(); + } + + /// The requested persistent connection state. + set persistentConnection(bool value) { + _data['persistentConnection'] = value; + _updated(); + } + + /// Proxy authentication details for the request. + set proxyDetails(HttpProfileProxyData value) { + _data['proxyDetails'] = value._toJson(); + _updated(); + } + + const HttpProfileRequestData._( + this._data, + this._updated, + ); +} + +/// Describes details about a response to an HTTP request. +final class HttpProfileResponseData { + final Map _data; + + final void Function() _updated; + + /// Records a redirect that the connection went through. + void addRedirect(HttpProfileRedirectData redirect) { + (_data['redirects'] as List>).add(redirect._toJson()); + _updated(); + } + + /// The cookies set by the server (from the 'set-cookie' header). + /// + /// Usage example: + /// + /// ```dart + /// profile.responseData.cookies = [ + /// 'sessionId=abc123', + /// 'id=def456; Max-Age=2592000; Domain=example.com', + /// ]; + /// ``` + set cookies(List value) { + _data['cookies'] = [...value]; + _updated(); + } + + /// Information about the networking connection used in the HTTP response. + /// + /// This information is meant to be used for debugging. + /// + /// It can contain any arbitrary data as long as the values are of type + /// [String] or [int]. For example: + /// { 'localPort': 1285, 'remotePort': 443, 'connectionPoolId': '21x23' } + set connectionInfo(Map value) { + for (final v in value.values) { + if (!(v is String || v is int)) { + throw ArgumentError( + 'The values in connectionInfo must be of type String or int.', + ); + } + } + _data['connectionInfo'] = {...value}; + _updated(); + } + + set headers(Map> value) { + _data['headers'] = {...value}; + _updated(); + } + + // The compression state of the response. + // + // This specifies whether the response bytes were compressed when they were + // received across the wire and whether callers will receive compressed or + // uncompressed bytes when they listen to the response body byte stream. + set compressionState(HttpClientResponseCompressionState value) { + _data['compressionState'] = value.name; + _updated(); + } + + set reasonPhrase(String value) { + _data['reasonPhrase'] = value; + _updated(); + } + + /// Whether the status code was one of the normal redirect codes. + set isRedirect(bool value) { + _data['isRedirect'] = value; + _updated(); + } + + /// The persistent connection state returned by the server. + set persistentConnection(bool value) { + _data['persistentConnection'] = value; + _updated(); + } + + /// The content length of the response body, in bytes. + set contentLength(int value) { + _data['contentLength'] = value; + _updated(); + } + + set statusCode(int value) { + _data['statusCode'] = value; + _updated(); + } + + /// The time at which the initial response was received. + set startTime(DateTime value) { + _data['startTime'] = value.microsecondsSinceEpoch; + _updated(); + } + + /// The time at which the response was completed. Note that DevTools will not + /// consider the request to be complete until [endTime] is non-null. + set endTime(DateTime value) { + _data['endTime'] = value.microsecondsSinceEpoch; + _updated(); + } + + /// The error associated with a failed request. + set error(String value) { + _data['error'] = value; + _updated(); + } + + HttpProfileResponseData._( + this._data, + this._updated, + ) { + _data['redirects'] = >[]; + } +} /// A record of debugging information about an HTTP request. final class HttpClientRequestProfile { @@ -14,20 +281,113 @@ final class HttpClientRequestProfile { static set profilingEnabled(bool enabled) => HttpClient.enableTimelineLogging = enabled; - String? requestMethod; - String? requestUri; + final _data = {}; + + /// Records an event related to the request. + /// + /// Usage example: + /// + /// ```dart + /// profile.addEvent( + /// HttpProfileRequestEvent( + /// timestamp: DateTime.now(), + /// name: "Connection Established", + /// ), + /// ); + /// profile.addEvent( + /// HttpProfileRequestEvent( + /// timestamp: DateTime.now(), + /// name: "Remote Disconnected", + /// ), + /// ); + /// ``` + void addEvent(HttpProfileRequestEvent event) { + (_data['events'] as List>).add(event._toJson()); + _updated(); + } + + /// The time at which the request was completed. Note that DevTools will not + /// consider the request to be complete until [requestEndTimestamp] is + /// non-null. + set requestEndTimestamp(DateTime value) { + _data['requestEndTimestamp'] = value.microsecondsSinceEpoch; + _updated(); + } + + /// Details about the request. + late final HttpProfileRequestData requestData; + + final StreamController> _requestBody = + StreamController>(); + + /// The body of the request. + StreamSink> get requestBodySink { + _updated(); + return _requestBody.sink; + } + + /// Details about the response. + late final HttpProfileResponseData responseData; + + final StreamController> _responseBody = + StreamController>(); + + /// The body of the response. + StreamSink> get responseBodySink { + _updated(); + return _responseBody.sink; + } + + void _updated() => + _data['_lastUpdateTime'] = DateTime.now().microsecondsSinceEpoch; + + HttpClientRequestProfile._({ + required DateTime requestStartTimestamp, + required String requestMethod, + required String requestUri, + }) { + _data['isolateId'] = Service.getIsolateId(Isolate.current)!; + _data['requestStartTimestamp'] = + requestStartTimestamp.microsecondsSinceEpoch; + _data['requestMethod'] = requestMethod; + _data['requestUri'] = requestUri; + _data['events'] = >[]; + _data['requestData'] = {}; + requestData = HttpProfileRequestData._( + _data['requestData'] as Map, _updated); + _data['responseData'] = {}; + responseData = HttpProfileResponseData._( + _data['responseData'] as Map, _updated); + _data['_requestBodyStream'] = _requestBody.stream; + _data['_responseBodyStream'] = _responseBody.stream; + // This entry is needed to support the updatedSince parameter of + // ext.dart.io.getHttpProfile. + _data['_lastUpdateTime'] = DateTime.now().microsecondsSinceEpoch; + } + + /// If HTTP profiling is enabled, returns an [HttpClientRequestProfile], + /// otherwise returns `null`. + static HttpClientRequestProfile? profile({ + /// The time at which the request was initiated. + required DateTime requestStartTimestamp, - HttpClientRequestProfile._(); + /// The HTTP request method associated with the request. + required String requestMethod, - /// If HTTP profiling is enabled, returns - /// a [HttpClientRequestProfile] otherwise returns `null`. - static HttpClientRequestProfile? profile() { - // Always return `null` in product mode so that the - // profiling code can be tree shaken away. + /// The URI to which the request was sent. + required String requestUri, + }) { + // Always return `null` in product mode so that the profiling code can be + // tree shaken away. if (const bool.fromEnvironment('dart.vm.product') || !profilingEnabled) { return null; } - final requestProfile = HttpClientRequestProfile._(); + final requestProfile = HttpClientRequestProfile._( + requestStartTimestamp: requestStartTimestamp, + requestMethod: requestMethod, + requestUri: requestUri, + ); + addHttpClientProfilingData(requestProfile._data); return requestProfile; } } diff --git a/pkgs/http_profile/pubspec.yaml b/pkgs/http_profile/pubspec.yaml index 1b5891e2c1..93b55f296c 100644 --- a/pkgs/http_profile/pubspec.yaml +++ b/pkgs/http_profile/pubspec.yaml @@ -7,7 +7,8 @@ repository: https://github.com/dart-lang/http/tree/master/pkgs/http_profile publish_to: none environment: - sdk: ^3.0.0 + # TODO(derekxu16): Change the following constraint to ^3.4.0 before publishing this package. + sdk: ^3.4.0-154.0.dev dependencies: test: ^1.24.9 diff --git a/pkgs/http_profile/test/populating_profiles_test.dart b/pkgs/http_profile/test/populating_profiles_test.dart new file mode 100644 index 0000000000..a1cbbb4b30 --- /dev/null +++ b/pkgs/http_profile/test/populating_profiles_test.dart @@ -0,0 +1,386 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:developer' show Service, getHttpClientProfilingData; +import 'dart:io'; +import 'dart:isolate' show Isolate; + +import 'package:http_profile/http_profile.dart'; +import 'package:test/test.dart'; + +void main() { + late HttpClientRequestProfile profile; + late Map backingMap; + + setUp(() { + HttpClientRequestProfile.profilingEnabled = true; + + profile = HttpClientRequestProfile.profile( + requestStartTimestamp: DateTime.parse('2024-03-21'), + requestMethod: 'GET', + requestUri: 'https://www.example.com', + )!; + + final profileBackingMaps = getHttpClientProfilingData(); + expect(profileBackingMaps.length, isPositive); + backingMap = profileBackingMaps.lastOrNull!; + }); + + test( + 'mandatory fields are populated when an HttpClientRequestProfile is ' + 'constructed', () async { + expect(backingMap['id'], isNotNull); + expect(backingMap['isolateId'], Service.getIsolateId(Isolate.current)!); + expect( + backingMap['requestStartTimestamp'], + DateTime.parse('2024-03-21').microsecondsSinceEpoch, + ); + expect(backingMap['requestMethod'], 'GET'); + expect(backingMap['requestUri'], 'https://www.example.com'); + }); + + test('calling HttpClientRequestProfile.addEvent', () async { + final events = backingMap['events'] as List>; + expect(events, isEmpty); + + profile.addEvent(HttpProfileRequestEvent( + timestamp: DateTime.parse('2024-03-22'), + name: 'an event', + )); + + expect(events.length, 1); + final event = events.last; + expect( + event['timestamp'], + DateTime.parse('2024-03-22').microsecondsSinceEpoch, + ); + expect(event['event'], 'an event'); + }); + + test('populating HttpClientRequestProfile.requestEndTimestamp', () async { + expect(backingMap['requestEndTimestamp'], isNull); + + profile.requestEndTimestamp = DateTime.parse('2024-03-23'); + + expect( + backingMap['requestEndTimestamp'], + DateTime.parse('2024-03-23').microsecondsSinceEpoch, + ); + }); + + test('populating HttpClientRequestProfile.requestData.connectionInfo', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['connectionInfo'], isNull); + + profile.requestData.connectionInfo = { + 'localPort': 1285, + 'remotePort': 443, + 'connectionPoolId': '21x23' + }; + + final connectionInfo = + requestData['connectionInfo'] as Map; + expect(connectionInfo['localPort'], 1285); + expect(connectionInfo['remotePort'], 443); + expect(connectionInfo['connectionPoolId'], '21x23'); + }); + + test('populating HttpClientRequestProfile.requestData.contentLength', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['contentLength'], isNull); + + profile.requestData.contentLength = 1200; + + expect(requestData['contentLength'], 1200); + }); + + test('populating HttpClientRequestProfile.requestData.cookies', () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['cookies'], isNull); + + profile.requestData.cookies = [ + 'sessionId=abc123', + 'csrftoken=def456', + ]; + + final cookies = requestData['cookies'] as List; + expect(cookies.length, 2); + expect(cookies[0], 'sessionId=abc123'); + expect(cookies[1], 'csrftoken=def456'); + }); + + test('populating HttpClientRequestProfile.requestData.error', () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['error'], isNull); + + profile.requestData.error = 'failed'; + + expect(requestData['error'], 'failed'); + }); + + test('populating HttpClientRequestProfile.requestData.followRedirects', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['followRedirects'], isNull); + + profile.requestData.followRedirects = true; + + expect(requestData['followRedirects'], true); + }); + + test('populating HttpClientRequestProfile.requestData.headers', () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['headers'], isNull); + + profile.requestData.headers = { + 'content-length': ['0'], + }; + + final headers = requestData['headers'] as Map>; + expect(headers['content-length']!.length, 1); + expect(headers['content-length']![0], '0'); + }); + + test('populating HttpClientRequestProfile.requestData.maxRedirects', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['maxRedirects'], isNull); + + profile.requestData.maxRedirects = 5; + + expect(requestData['maxRedirects'], 5); + }); + + test('populating HttpClientRequestProfile.requestData.persistentConnection', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['persistentConnection'], isNull); + + profile.requestData.persistentConnection = true; + + expect(requestData['persistentConnection'], true); + }); + + test('populating HttpClientRequestProfile.requestData.proxyDetails', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['proxyDetails'], isNull); + + profile.requestData.proxyDetails = HttpProfileProxyData( + host: 'https://www.example.com', + username: 'abc123', + isDirect: true, + port: 4321, + ); + + final proxyDetails = requestData['proxyDetails'] as Map; + expect( + proxyDetails['host'], + 'https://www.example.com', + ); + expect(proxyDetails['username'], 'abc123'); + expect(proxyDetails['isDirect'], true); + expect(proxyDetails['port'], 4321); + }); + + test('calling HttpClientRequestProfile.responseData.addRedirect', () async { + final responseData = backingMap['responseData'] as Map; + final redirects = responseData['redirects'] as List>; + expect(redirects, isEmpty); + + profile.responseData.addRedirect(HttpProfileRedirectData( + statusCode: 301, + method: 'GET', + location: 'https://images.example.com/1', + )); + + expect(redirects.length, 1); + final redirect = redirects.last; + expect(redirect['statusCode'], 301); + expect(redirect['method'], 'GET'); + expect(redirect['location'], 'https://images.example.com/1'); + }); + + test('populating HttpClientRequestProfile.responseData.cookies', () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['cookies'], isNull); + + profile.responseData.cookies = [ + 'sessionId=abc123', + 'id=def456; Max-Age=2592000; Domain=example.com', + ]; + + final cookies = responseData['cookies'] as List; + expect(cookies.length, 2); + expect(cookies[0], 'sessionId=abc123'); + expect(cookies[1], 'id=def456; Max-Age=2592000; Domain=example.com'); + }); + + test('populating HttpClientRequestProfile.responseData.connectionInfo', + () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['connectionInfo'], isNull); + + profile.responseData.connectionInfo = { + 'localPort': 1285, + 'remotePort': 443, + 'connectionPoolId': '21x23' + }; + + final connectionInfo = + responseData['connectionInfo'] as Map; + expect(connectionInfo['localPort'], 1285); + expect(connectionInfo['remotePort'], 443); + expect(connectionInfo['connectionPoolId'], '21x23'); + }); + + test('populating HttpClientRequestProfile.responseData.headers', () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['headers'], isNull); + + profile.responseData.headers = { + 'connection': ['keep-alive'], + 'cache-control': ['max-age=43200'], + 'content-type': ['application/json', 'charset=utf-8'], + }; + + final headers = responseData['headers'] as Map>; + expect(headers['connection']!.length, 1); + expect(headers['connection']![0], 'keep-alive'); + expect(headers['cache-control']!.length, 1); + expect(headers['cache-control']![0], 'max-age=43200'); + expect(headers['content-type']!.length, 2); + expect(headers['content-type']![0], 'application/json'); + expect(headers['content-type']![1], 'charset=utf-8'); + }); + + test('populating HttpClientRequestProfile.responseData.compressionState', + () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['compressionState'], isNull); + + profile.responseData.compressionState = + HttpClientResponseCompressionState.decompressed; + + expect(responseData['compressionState'], 'decompressed'); + }); + + test('populating HttpClientRequestProfile.responseData.reasonPhrase', + () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['reasonPhrase'], isNull); + + profile.responseData.reasonPhrase = 'OK'; + + expect(responseData['reasonPhrase'], 'OK'); + }); + + test('populating HttpClientRequestProfile.responseData.isRedirect', () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['isRedirect'], isNull); + + profile.responseData.isRedirect = true; + + expect(responseData['isRedirect'], true); + }); + + test('populating HttpClientRequestProfile.responseData.persistentConnection', + () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['persistentConnection'], isNull); + + profile.responseData.persistentConnection = true; + + expect(responseData['persistentConnection'], true); + }); + + test('populating HttpClientRequestProfile.responseData.contentLength', + () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['contentLength'], isNull); + + profile.responseData.contentLength = 1200; + + expect(responseData['contentLength'], 1200); + }); + + test('populating HttpClientRequestProfile.responseData.statusCode', () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['statusCode'], isNull); + + profile.responseData.statusCode = 200; + + expect(responseData['statusCode'], 200); + }); + + test('populating HttpClientRequestProfile.responseData.startTime', () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['startTime'], isNull); + + profile.responseData.startTime = DateTime.parse('2024-03-21'); + + expect( + responseData['startTime'], + DateTime.parse('2024-03-21').microsecondsSinceEpoch, + ); + }); + + test('populating HttpClientRequestProfile.responseData.endTime', () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['endTime'], isNull); + + profile.responseData.endTime = DateTime.parse('2024-03-23'); + + expect( + responseData['endTime'], + DateTime.parse('2024-03-23').microsecondsSinceEpoch, + ); + }); + + test('populating HttpClientRequestProfile.responseData.error', () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['error'], isNull); + + profile.responseData.error = 'failed'; + + expect(responseData['error'], 'failed'); + }); + + test('using HttpClientRequestProfile.requestBodySink', () async { + final requestBodyStream = + backingMap['_requestBodyStream'] as Stream>; + + profile.requestBodySink.add([1, 2, 3]); + + await Future.wait([ + Future.sync( + () async => expect( + await requestBodyStream.expand((i) => i).toList(), + [1, 2, 3], + ), + ), + profile.requestBodySink.close(), + ]); + }); + + test('using HttpClientRequestProfile.responseBodySink', () async { + final requestBodyStream = + backingMap['_responseBodyStream'] as Stream>; + + profile.responseBodySink.add([1, 2, 3]); + + await Future.wait([ + Future.sync( + () async => expect( + await requestBodyStream.expand((i) => i).toList(), + [1, 2, 3], + ), + ), + profile.responseBodySink.close(), + ]); + }); +} diff --git a/pkgs/http_profile/test/profiling_enabled_test.dart b/pkgs/http_profile/test/profiling_enabled_test.dart index 6336da6ee4..3062c79719 100644 --- a/pkgs/http_profile/test/profiling_enabled_test.dart +++ b/pkgs/http_profile/test/profiling_enabled_test.dart @@ -11,12 +11,26 @@ void main() { test('profiling enabled', () async { HttpClientRequestProfile.profilingEnabled = true; expect(HttpClient.enableTimelineLogging, true); - expect(HttpClientRequestProfile.profile(), isNotNull); + expect( + HttpClientRequestProfile.profile( + requestStartTimestamp: DateTime.parse('2024-03-21'), + requestMethod: 'GET', + requestUri: 'https://www.example.com', + ), + isNotNull, + ); }); test('profiling disabled', () async { HttpClientRequestProfile.profilingEnabled = false; expect(HttpClient.enableTimelineLogging, false); - expect(HttpClientRequestProfile.profile(), isNull); + expect( + HttpClientRequestProfile.profile( + requestStartTimestamp: DateTime.parse('2024-03-21'), + requestMethod: 'GET', + requestUri: 'https://www.example.com', + ), + isNull, + ); }); } From 8e867a9b810e412520171032aff1a03d375d995a Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 22 Feb 2024 09:08:28 -0800 Subject: [PATCH 321/448] Make it possible for `CronetClient` to own the lifetime of an existing `CronetEngine` (#1137) --- pkgs/cronet_http/CHANGELOG.md | 5 +++ pkgs/cronet_http/README.md | 3 +- .../cronet_configuration_test.dart | 30 +++++++++++++++ pkgs/cronet_http/example/lib/main.dart | 2 +- pkgs/cronet_http/lib/src/cronet_client.dart | 38 +++++++++++++------ pkgs/cronet_http/pubspec.yaml | 2 +- 6 files changed, 65 insertions(+), 15 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index bc9255116c..f8b134047d 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.1.1 + +* Make it possible to construct `CronetClient` with custom a `CronetEngine` + while still allowing `CronetClient` to close the `CronetEngine`. + ## 1.1.0 * Use `package:http_image_provider` in the example application. diff --git a/pkgs/cronet_http/README.md b/pkgs/cronet_http/README.md index 47ebd8bac1..e53e54d19e 100644 --- a/pkgs/cronet_http/README.md +++ b/pkgs/cronet_http/README.md @@ -43,7 +43,7 @@ void main() async { cacheMode: CacheMode.memory, cacheMaxSize: 2 * 1024 * 1024, userAgent: 'Book Agent'); - httpClient = CronetClient.fromCronetEngine(engine); + httpClient = CronetClient.fromCronetEngine(engine, isOwned: true); } else { httpClient = IOClient(HttpClient()..userAgent = 'Book Agent'); } @@ -52,6 +52,7 @@ void main() async { 'www.googleapis.com', '/books/v1/volumes', {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'})); + httpClient.close(); } ``` diff --git a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart index f787ebc39a..63ce8eba0f 100644 --- a/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart +++ b/pkgs/cronet_http/example/integration_test/cronet_configuration_test.dart @@ -5,6 +5,7 @@ import 'dart:io'; import 'package:cronet_http/cronet_http.dart'; +import 'package:http/http.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; @@ -120,10 +121,39 @@ void testUserAgent() { }); } +void testEngineClose() { + group('engine close', () { + test('multiple close', () { + CronetEngine.build() + ..close() + ..close(); + }); + + test('request after close', () async { + final closedEngine = CronetEngine.build()..close(); + final client = CronetClient.fromCronetEngine(closedEngine); + await expectLater(() => client.get(Uri.https('example.com', '/')), + throwsA(isA())); + }); + + test('engine owned close', () { + final engine = CronetEngine.build(); + CronetClient.fromCronetEngine(engine, closeEngine: true).close(); + }); + + test('engine not owned close', () { + final engine = CronetEngine.build(); + CronetClient.fromCronetEngine(engine, closeEngine: false).close(); + engine.close(); + }); + }); +} + void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); testCache(); testInvalidConfigurations(); testUserAgent(); + testEngineClose(); } diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 6e1bad22c4..02c56d6581 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -21,7 +21,7 @@ void main() { cacheMode: CacheMode.memory, cacheMaxSize: 2 * 1024 * 1024, userAgent: 'Book Agent'); - httpClient = CronetClient.fromCronetEngine(engine); + httpClient = CronetClient.fromCronetEngine(engine, closeEngine: true); } else { httpClient = IOClient(HttpClient()..userAgent = 'Book Agent'); } diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index 3c2a4264d4..c9573826f3 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -49,6 +49,7 @@ enum CacheMode { /// An environment that can be used to make HTTP requests. class CronetEngine { late final jb.CronetEngine _engine; + bool _isClosed = false; CronetEngine._(this._engine); @@ -140,7 +141,12 @@ class CronetEngine { } void close() { - _engine.shutdown(); + if (!_isClosed) { + _engine + ..shutdown() + ..release(); + } + _isClosed = true; } } @@ -275,12 +281,10 @@ class CronetClient extends BaseClient { CronetEngine? _engine; bool _isClosed = false; - /// Indicates that [_engine] was constructed as an implementation detail for - /// this [CronetClient] (i.e. was not provided as a constructor argument) and - /// should be closed when this [CronetClient] is closed. - final bool _ownedEngine; + /// Indicates that [CronetClient] is responsible for closing [_engine]. + final bool _closeEngine; - CronetClient._(this._engine, this._ownedEngine) { + CronetClient._(this._engine, this._closeEngine) { Jni.initDLApi(); } @@ -288,8 +292,13 @@ class CronetClient extends BaseClient { factory CronetClient.defaultCronetEngine() => CronetClient._(null, true); /// A [CronetClient] configured with a [CronetEngine]. - factory CronetClient.fromCronetEngine(CronetEngine engine) => - CronetClient._(engine, false); + /// + /// If [closeEngine] is `true`, then [engine] will be closed when [close] is + /// called on this [CronetClient]. This can simplify lifetime management if + /// [engine] is only used in one [CronetClient]. + factory CronetClient.fromCronetEngine(CronetEngine engine, + {bool closeEngine = false}) => + CronetClient._(engine, closeEngine); /// A [CronetClient] configured with a [Future] containing a [CronetEngine]. /// @@ -309,7 +318,7 @@ class CronetClient extends BaseClient { /// ``` @override void close() { - if (!_isClosed && _ownedEngine) { + if (!_isClosed && _closeEngine) { _engine?.close(); } _isClosed = true; @@ -322,14 +331,19 @@ class CronetClient extends BaseClient { 'HTTP request failed. Client is already closed.', request.url); } - _engine ??= CronetEngine.build(); + final engine = _engine ?? CronetEngine.build(); + _engine = engine; + + if (engine._isClosed) { + throw ClientException( + 'HTTP request failed. CronetEngine is already closed.', request.url); + } final stream = request.finalize(); final body = await stream.toBytes(); final responseCompleter = Completer(); - final engine = _engine!._engine; - final builder = engine.newUrlRequestBuilder( + final builder = engine._engine.newUrlRequestBuilder( request.url.toString().toJString(), jb.UrlRequestCallbackProxy.new1( _urlRequestCallbacks(request, responseCompleter)), diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index f1a642bbb3..f3cb350ebe 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 1.1.0 +version: 1.1.1 description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http From 3c9145bd5cfe60a38d3f8ab1d2ae5f957b56bd35 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 23 Feb 2024 09:24:13 +0800 Subject: [PATCH 322/448] =?UTF-8?q?=F0=9F=91=B7=20Update=20configuration?= =?UTF-8?q?=20related=20files=20(#1091)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cronet.yml | 6 +- .github/workflows/cupertino.yml | 57 ++-- .github/workflows/java.yml | 31 +-- .gitignore | 4 + pkgs/cronet_http/cronet_http.iml | 4 +- .../example/android/.gitignore | 0 .../example/android/local.properties | 3 - pkgs/cupertino_http/cupertino_http.iml | 4 +- .../example/android/app/build.gradle | 70 ----- .../android/app/src/debug/AndroidManifest.xml | 4 - .../android/app/src/main/AndroidManifest.xml | 35 --- .../example/example/MainActivity.kt | 6 - .../res/drawable-v21/launch_background.xml | 12 - .../main/res/drawable/launch_background.xml | 12 - .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 544 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 442 -> 0 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 721 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 1031 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 1443 -> 0 bytes .../app/src/main/res/values-night/styles.xml | 18 -- .../app/src/main/res/values/styles.xml | 18 -- .../app/src/profile/AndroidManifest.xml | 4 - .../example/android/build.gradle | 31 --- .../example/android/gradle.properties | 3 - .../gradle/wrapper/gradle-wrapper.properties | 5 - .../example/android/settings.gradle | 11 - pkgs/cupertino_http/example/linux/.gitignore | 1 - .../example/linux/CMakeLists.txt | 138 ---------- .../example/linux/flutter/CMakeLists.txt | 88 ------- .../flutter/generated_plugin_registrant.cc | 11 - .../flutter/generated_plugin_registrant.h | 15 -- .../linux/flutter/generated_plugins.cmake | 23 -- pkgs/cupertino_http/example/linux/main.cc | 6 - .../example/linux/my_application.cc | 104 -------- .../example/linux/my_application.h | 18 -- .../cupertino_http/example/windows/.gitignore | 17 -- .../example/windows/CMakeLists.txt | 101 -------- .../example/windows/flutter/CMakeLists.txt | 104 -------- .../flutter/generated_plugin_registrant.cc | 11 - .../flutter/generated_plugin_registrant.h | 15 -- .../windows/flutter/generated_plugins.cmake | 23 -- .../example/windows/runner/CMakeLists.txt | 39 --- .../example/windows/runner/Runner.rc | 121 --------- .../example/windows/runner/flutter_window.cpp | 61 ----- .../example/windows/runner/flutter_window.h | 33 --- .../example/windows/runner/main.cpp | 43 --- .../example/windows/runner/resource.h | 16 -- .../windows/runner/resources/app_icon.ico | Bin 33772 -> 0 bytes .../windows/runner/runner.exe.manifest | 20 -- .../example/windows/runner/utils.cpp | 64 ----- .../example/windows/runner/utils.h | 19 -- .../example/windows/runner/win32_window.cpp | 245 ------------------ .../example/windows/runner/win32_window.h | 98 ------- 53 files changed, 36 insertions(+), 1736 deletions(-) rename pkgs/{cupertino_http => cronet_http}/example/android/.gitignore (100%) delete mode 100644 pkgs/cronet_http/example/android/local.properties delete mode 100644 pkgs/cupertino_http/example/android/app/build.gradle delete mode 100644 pkgs/cupertino_http/example/android/app/src/debug/AndroidManifest.xml delete mode 100644 pkgs/cupertino_http/example/android/app/src/main/AndroidManifest.xml delete mode 100644 pkgs/cupertino_http/example/android/app/src/main/kotlin/io/flutter/cupertino_http_example/example/example/MainActivity.kt delete mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/drawable-v21/launch_background.xml delete mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/drawable/launch_background.xml delete mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png delete mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png delete mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png delete mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png delete mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png delete mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/values-night/styles.xml delete mode 100644 pkgs/cupertino_http/example/android/app/src/main/res/values/styles.xml delete mode 100644 pkgs/cupertino_http/example/android/app/src/profile/AndroidManifest.xml delete mode 100644 pkgs/cupertino_http/example/android/build.gradle delete mode 100644 pkgs/cupertino_http/example/android/gradle.properties delete mode 100644 pkgs/cupertino_http/example/android/gradle/wrapper/gradle-wrapper.properties delete mode 100644 pkgs/cupertino_http/example/android/settings.gradle delete mode 100644 pkgs/cupertino_http/example/linux/.gitignore delete mode 100644 pkgs/cupertino_http/example/linux/CMakeLists.txt delete mode 100644 pkgs/cupertino_http/example/linux/flutter/CMakeLists.txt delete mode 100644 pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.cc delete mode 100644 pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.h delete mode 100644 pkgs/cupertino_http/example/linux/flutter/generated_plugins.cmake delete mode 100644 pkgs/cupertino_http/example/linux/main.cc delete mode 100644 pkgs/cupertino_http/example/linux/my_application.cc delete mode 100644 pkgs/cupertino_http/example/linux/my_application.h delete mode 100644 pkgs/cupertino_http/example/windows/.gitignore delete mode 100644 pkgs/cupertino_http/example/windows/CMakeLists.txt delete mode 100644 pkgs/cupertino_http/example/windows/flutter/CMakeLists.txt delete mode 100644 pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.cc delete mode 100644 pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.h delete mode 100644 pkgs/cupertino_http/example/windows/flutter/generated_plugins.cmake delete mode 100644 pkgs/cupertino_http/example/windows/runner/CMakeLists.txt delete mode 100644 pkgs/cupertino_http/example/windows/runner/Runner.rc delete mode 100644 pkgs/cupertino_http/example/windows/runner/flutter_window.cpp delete mode 100644 pkgs/cupertino_http/example/windows/runner/flutter_window.h delete mode 100644 pkgs/cupertino_http/example/windows/runner/main.cpp delete mode 100644 pkgs/cupertino_http/example/windows/runner/resource.h delete mode 100644 pkgs/cupertino_http/example/windows/runner/resources/app_icon.ico delete mode 100644 pkgs/cupertino_http/example/windows/runner/runner.exe.manifest delete mode 100644 pkgs/cupertino_http/example/windows/runner/utils.cpp delete mode 100644 pkgs/cupertino_http/example/windows/runner/utils.h delete mode 100644 pkgs/cupertino_http/example/windows/runner/win32_window.cpp delete mode 100644 pkgs/cupertino_http/example/windows/runner/win32_window.h diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 1e9a81d5a5..9cf9be4560 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -47,13 +47,13 @@ jobs: working-directory: 'pkgs/${{ matrix.package }}' run: flutter pub get - name: Check formatting + if: always() && steps.install.outcome == 'success' working-directory: 'pkgs/${{ matrix.package }}' run: dart format --output=none --set-exit-if-changed . - if: always() && steps.install.outcome == 'success' - name: Analyze code + if: always() && steps.install.outcome == 'success' working-directory: 'pkgs/${{ matrix.package }}' run: flutter analyze --fatal-infos - if: always() && steps.install.outcome == 'success' - name: Run tests uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 if: always() && steps.install.outcome == 'success' @@ -66,4 +66,4 @@ jobs: arch: x86_64 target: ${{ matrix.package == 'cronet_http_embedded' && 'default' || 'google_apis' }} profile: pixel - script: cd 'pkgs/${{ matrix.package }}/example' && flutter test --timeout=1200s integration_test/ + script: cd pkgs/${{ matrix.package }}/example && flutter test --timeout=1200s integration_test/ diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index ef2a8e8e91..f434431b44 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -6,14 +6,14 @@ on: - main - master paths: + - '.github/workflows/cupertino.yml' - 'pkgs/cupertino_http/**' - 'pkgs/http_client_conformance_tests/**' - - '.github/workflows/cupertino.yml' pull_request: paths: + - '.github/workflows/cupertino.yml' - 'pkgs/cupertino_http/**' - 'pkgs/http_client_conformance_tests/**' - - '.github/workflows/cupertino.yml' schedule: - cron: "0 0 * * 0" @@ -21,16 +21,22 @@ env: PUB_ENVIRONMENT: bot.github jobs: - analyze: - name: Lint and static analysis - runs-on: ubuntu-latest + verify: + name: Format & Analyze & Test + runs-on: macos-latest defaults: run: working-directory: pkgs/cupertino_http + strategy: + matrix: + # Test on the minimum supported flutter version and the latest + # version. + flutter-version: ["3.16.0", "any"] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: + flutter-version: ${{ matrix.flutter-version }} channel: 'stable' - id: install name: Install dependencies @@ -40,48 +46,19 @@ jobs: # This approach is simpler than using `find` and excluding that file # because `dart format` also excludes other file e.g. ones in # directories start with '.'. - run: > - mv lib/src/native_cupertino_bindings.dart lib/src/native_cupertino_bindings.tmp && - dart format --output=none --set-exit-if-changed . && + run: | + mv lib/src/native_cupertino_bindings.dart lib/src/native_cupertino_bindings.tmp + dart format --output=none --set-exit-if-changed . mv lib/src/native_cupertino_bindings.tmp lib/src/native_cupertino_bindings.dart if: always() && steps.install.outcome == 'success' - name: Analyze code run: flutter analyze --fatal-infos if: always() && steps.install.outcome == 'success' - - test: - # Test package:cupertino_http use flutter integration tests. - needs: analyze - name: "Build and test" - strategy: - matrix: - # Test on the minimum supported flutter version and the latest - # version. - flutter-version: ["3.16.0", "any"] - runs-on: macos-latest - defaults: - run: - working-directory: pkgs/cupertino_http/example - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: futureware-tech/simulator-action@bfa03d93ec9de6dacb0c5553bbf8da8afc6c2ee9 with: model: 'iPhone 8' - - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 - with: - flutter-version: ${{ matrix.flutter-version }} - channel: 'stable' - name: Run tests - # TODO: Remove the retries when - # https://github.com/flutter/flutter/issues/121231 is fixed. - # See https://github.com/dart-lang/http/issues/938 for context. run: | - for i in {1..6} - do - flutter test integration_test/main.dart && break - if [ $i -eq 6 ] - then - exit 1 - fi - echo "Retry $i" - done + cd example + flutter pub get + flutter test --timeout=1200s integration_test/ diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index ed3f93fd8e..fd0afc9639 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -6,14 +6,14 @@ on: - main - master paths: - - 'pkgs/java_http/**' - - 'pkgs/http_client_conformance_tests/**' - '.github/workflows/java.yml' + - 'pkgs/http_client_conformance_tests/**' + - 'pkgs/java_http/**' pull_request: paths: - - 'pkgs/java_http/**' - - 'pkgs/http_client_conformance_tests/**' - '.github/workflows/java.yml' + - 'pkgs/http_client_conformance_tests/**' + - 'pkgs/java_http/**' schedule: # Runs every Sunday at midnight (00:00 UTC). - cron: "0 0 * * 0" @@ -22,8 +22,8 @@ env: PUB_ENVIRONMENT: bot.github jobs: - analyze: - name: Lint and static analysis + verify: + name: Format & Analyze & Test runs-on: ubuntu-latest defaults: run: @@ -33,35 +33,16 @@ jobs: - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: channel: 'stable' - - id: install name: Install dependencies run: dart pub get - - name: Check formatting run: dart format --output=none --set-exit-if-changed . if: always() && steps.install.outcome == 'success' - - name: Analyze code run: dart analyze --fatal-infos if: always() && steps.install.outcome == 'success' - - test: - needs: analyze - name: Build and test - runs-on: ubuntu-latest - defaults: - run: - working-directory: pkgs/java_http - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 - with: - channel: 'stable' - - name: Build jni dynamic libraries run: dart run jni:setup - - name: Run tests run: dart test diff --git a/.gitignore b/.gitignore index ac98e87d12..b1696ff164 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,8 @@ +.idea/ +.vscode/ + # Don’t commit the following directories created by pub. .dart_tool .packages pubspec.lock +pubspec_overrides.yaml diff --git a/pkgs/cronet_http/cronet_http.iml b/pkgs/cronet_http/cronet_http.iml index 39cce21274..bbb426a757 100644 --- a/pkgs/cronet_http/cronet_http.iml +++ b/pkgs/cronet_http/cronet_http.iml @@ -3,6 +3,7 @@ + @@ -10,10 +11,11 @@ + - + \ No newline at end of file diff --git a/pkgs/cupertino_http/example/android/.gitignore b/pkgs/cronet_http/example/android/.gitignore similarity index 100% rename from pkgs/cupertino_http/example/android/.gitignore rename to pkgs/cronet_http/example/android/.gitignore diff --git a/pkgs/cronet_http/example/android/local.properties b/pkgs/cronet_http/example/android/local.properties deleted file mode 100644 index 57eb8bd2fe..0000000000 --- a/pkgs/cronet_http/example/android/local.properties +++ /dev/null @@ -1,3 +0,0 @@ -sdk.dir=/Users/bquinlan/Library/Android/sdk -flutter.sdk=/Users/bquinlan/flutter -flutter.buildMode=debug \ No newline at end of file diff --git a/pkgs/cupertino_http/cupertino_http.iml b/pkgs/cupertino_http/cupertino_http.iml index 39cce21274..bbb426a757 100644 --- a/pkgs/cupertino_http/cupertino_http.iml +++ b/pkgs/cupertino_http/cupertino_http.iml @@ -3,6 +3,7 @@ + @@ -10,10 +11,11 @@ + - + \ No newline at end of file diff --git a/pkgs/cupertino_http/example/android/app/build.gradle b/pkgs/cupertino_http/example/android/app/build.gradle deleted file mode 100644 index b79cc2113a..0000000000 --- a/pkgs/cupertino_http/example/android/app/build.gradle +++ /dev/null @@ -1,70 +0,0 @@ -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - -android { - compileSdkVersion flutter.compileSdkVersion - ndkVersion flutter.ndkVersion - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' - } - - defaultConfig { - applicationId "io.flutter.cupertino_http_example" - // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug - } - } -} - -flutter { - source '../..' -} - -dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" -} diff --git a/pkgs/cupertino_http/example/android/app/src/debug/AndroidManifest.xml b/pkgs/cupertino_http/example/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 0a221468cf..0000000000 --- a/pkgs/cupertino_http/example/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/pkgs/cupertino_http/example/android/app/src/main/AndroidManifest.xml b/pkgs/cupertino_http/example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 40a97bbb68..0000000000 --- a/pkgs/cupertino_http/example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/pkgs/cupertino_http/example/android/app/src/main/kotlin/io/flutter/cupertino_http_example/example/example/MainActivity.kt b/pkgs/cupertino_http/example/android/app/src/main/kotlin/io/flutter/cupertino_http_example/example/example/MainActivity.kt deleted file mode 100644 index 6b4a18a127..0000000000 --- a/pkgs/cupertino_http/example/android/app/src/main/kotlin/io/flutter/cupertino_http_example/example/example/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package io.flutter.cupertino_http_example - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/drawable-v21/launch_background.xml b/pkgs/cupertino_http/example/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f3f6..0000000000 --- a/pkgs/cupertino_http/example/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/drawable/launch_background.xml b/pkgs/cupertino_http/example/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f884..0000000000 --- a/pkgs/cupertino_http/example/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7b0906d62b1847e87f15cdcacf6a4f29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79bb8a35cc66c3c1fd44f5a5526c1b78be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34e7a88e3f88bea192c3a370d44689c3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/pkgs/cupertino_http/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eebdb28e45604e46eeda8dd24651419bc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/values-night/styles.xml b/pkgs/cupertino_http/example/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 06952be745..0000000000 --- a/pkgs/cupertino_http/example/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/pkgs/cupertino_http/example/android/app/src/main/res/values/styles.xml b/pkgs/cupertino_http/example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index cb1ef88056..0000000000 --- a/pkgs/cupertino_http/example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/pkgs/cupertino_http/example/android/app/src/profile/AndroidManifest.xml b/pkgs/cupertino_http/example/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 0a221468cf..0000000000 --- a/pkgs/cupertino_http/example/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/pkgs/cupertino_http/example/android/build.gradle b/pkgs/cupertino_http/example/android/build.gradle deleted file mode 100644 index 58a8c74b14..0000000000 --- a/pkgs/cupertino_http/example/android/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -buildscript { - ext.kotlin_version = '1.7.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.2.0' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = '../build' -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(':app') -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/pkgs/cupertino_http/example/android/gradle.properties b/pkgs/cupertino_http/example/android/gradle.properties deleted file mode 100644 index 94adc3a3f9..0000000000 --- a/pkgs/cupertino_http/example/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx1536M -android.useAndroidX=true -android.enableJetifier=true diff --git a/pkgs/cupertino_http/example/android/gradle/wrapper/gradle-wrapper.properties b/pkgs/cupertino_http/example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 3c472b99c6..0000000000 --- a/pkgs/cupertino_http/example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/pkgs/cupertino_http/example/android/settings.gradle b/pkgs/cupertino_http/example/android/settings.gradle deleted file mode 100644 index 44e62bcf06..0000000000 --- a/pkgs/cupertino_http/example/android/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -include ':app' - -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() - -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } - -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/pkgs/cupertino_http/example/linux/.gitignore b/pkgs/cupertino_http/example/linux/.gitignore deleted file mode 100644 index d3896c9844..0000000000 --- a/pkgs/cupertino_http/example/linux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -flutter/ephemeral diff --git a/pkgs/cupertino_http/example/linux/CMakeLists.txt b/pkgs/cupertino_http/example/linux/CMakeLists.txt deleted file mode 100644 index 74c66dd446..0000000000 --- a/pkgs/cupertino_http/example/linux/CMakeLists.txt +++ /dev/null @@ -1,138 +0,0 @@ -# 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 "example") -# The unique GTK application identifier for this application. See: -# https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.example.example") - -# 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" -) - -# 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/pkgs/cupertino_http/example/linux/flutter/CMakeLists.txt b/pkgs/cupertino_http/example/linux/flutter/CMakeLists.txt deleted file mode 100644 index d5bd01648a..0000000000 --- a/pkgs/cupertino_http/example/linux/flutter/CMakeLists.txt +++ /dev/null @@ -1,88 +0,0 @@ -# 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/pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.cc b/pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.cc deleted file mode 100644 index e71a16d23d..0000000000 --- a/pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,11 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - - -void fl_register_plugins(FlPluginRegistry* registry) { -} diff --git a/pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.h b/pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.h deleted file mode 100644 index e0f0a47bc0..0000000000 --- a/pkgs/cupertino_http/example/linux/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void fl_register_plugins(FlPluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/pkgs/cupertino_http/example/linux/flutter/generated_plugins.cmake b/pkgs/cupertino_http/example/linux/flutter/generated_plugins.cmake deleted file mode 100644 index 2e1de87a7e..0000000000 --- a/pkgs/cupertino_http/example/linux/flutter/generated_plugins.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# -# 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/pkgs/cupertino_http/example/linux/main.cc b/pkgs/cupertino_http/example/linux/main.cc deleted file mode 100644 index e7c5c54370..0000000000 --- a/pkgs/cupertino_http/example/linux/main.cc +++ /dev/null @@ -1,6 +0,0 @@ -#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/pkgs/cupertino_http/example/linux/my_application.cc b/pkgs/cupertino_http/example/linux/my_application.cc deleted file mode 100644 index 0ba8f43096..0000000000 --- a/pkgs/cupertino_http/example/linux/my_application.cc +++ /dev/null @@ -1,104 +0,0 @@ -#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, "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, "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 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_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/pkgs/cupertino_http/example/linux/my_application.h b/pkgs/cupertino_http/example/linux/my_application.h deleted file mode 100644 index 72271d5e41..0000000000 --- a/pkgs/cupertino_http/example/linux/my_application.h +++ /dev/null @@ -1,18 +0,0 @@ -#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/pkgs/cupertino_http/example/windows/.gitignore b/pkgs/cupertino_http/example/windows/.gitignore deleted file mode 100644 index d492d0d98c..0000000000 --- a/pkgs/cupertino_http/example/windows/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -flutter/ephemeral/ - -# Visual Studio user-specific files. -*.suo -*.user -*.userosscache -*.sln.docstates - -# Visual Studio build-related files. -x64/ -x86/ - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ diff --git a/pkgs/cupertino_http/example/windows/CMakeLists.txt b/pkgs/cupertino_http/example/windows/CMakeLists.txt deleted file mode 100644 index c0270746b1..0000000000 --- a/pkgs/cupertino_http/example/windows/CMakeLists.txt +++ /dev/null @@ -1,101 +0,0 @@ -# Project-level configuration. -cmake_minimum_required(VERSION 3.14) -project(example 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 "example") - -# Explicitly opt in to modern CMake behaviors to avoid warnings with recent -# versions of CMake. -cmake_policy(SET CMP0063 NEW) - -# Define build configuration option. -get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) -if(IS_MULTICONFIG) - set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" - CACHE STRING "" FORCE) -else() - 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() -endif() -# Define settings for the Profile build mode. -set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") -set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") -set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") -set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") - -# Use Unicode for all projects. -add_definitions(-DUNICODE -D_UNICODE) - -# 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_17) - target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") - target_compile_options(${TARGET} PRIVATE /EHsc) - target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") - target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") -endfunction() - -# Flutter library and tool build rules. -set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") -add_subdirectory(${FLUTTER_MANAGED_DIR}) - -# Application build; see runner/CMakeLists.txt. -add_subdirectory("runner") - -# Generated plugin build rules, which manage building the plugins and adding -# them to the application. -include(flutter/generated_plugins.cmake) - - -# === Installation === -# Support files are copied into place next to the executable, so that it can -# run in place. This is done instead of making a separate bundle (as on Linux) -# so that building and running from within Visual Studio will work. -set(BUILD_BUNDLE_DIR "$") -# Make the "install" step default, as it's required to run. -set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) -if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) -endif() - -set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") -set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") - -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) - -if(PLUGIN_BUNDLED_LIBRARIES) - install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" - DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" - COMPONENT Runtime) -endif() - -# 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. -install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" - CONFIGURATIONS Profile;Release - COMPONENT Runtime) diff --git a/pkgs/cupertino_http/example/windows/flutter/CMakeLists.txt b/pkgs/cupertino_http/example/windows/flutter/CMakeLists.txt deleted file mode 100644 index 930d2071a3..0000000000 --- a/pkgs/cupertino_http/example/windows/flutter/CMakeLists.txt +++ /dev/null @@ -1,104 +0,0 @@ -# This file controls Flutter-level build steps. It should not be edited. -cmake_minimum_required(VERSION 3.14) - -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. -set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") - -# === Flutter Library === -set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") - -# 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/windows/app.so" PARENT_SCOPE) - -list(APPEND FLUTTER_LIBRARY_HEADERS - "flutter_export.h" - "flutter_windows.h" - "flutter_messenger.h" - "flutter_plugin_registrar.h" - "flutter_texture_registrar.h" -) -list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") -add_library(flutter INTERFACE) -target_include_directories(flutter INTERFACE - "${EPHEMERAL_DIR}" -) -target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") -add_dependencies(flutter flutter_assemble) - -# === Wrapper === -list(APPEND CPP_WRAPPER_SOURCES_CORE - "core_implementations.cc" - "standard_codec.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_PLUGIN - "plugin_registrar.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") -list(APPEND CPP_WRAPPER_SOURCES_APP - "flutter_engine.cc" - "flutter_view_controller.cc" -) -list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") - -# Wrapper sources needed for a plugin. -add_library(flutter_wrapper_plugin STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} -) -apply_standard_settings(flutter_wrapper_plugin) -set_target_properties(flutter_wrapper_plugin PROPERTIES - POSITION_INDEPENDENT_CODE ON) -set_target_properties(flutter_wrapper_plugin PROPERTIES - CXX_VISIBILITY_PRESET hidden) -target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) -target_include_directories(flutter_wrapper_plugin PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_plugin flutter_assemble) - -# Wrapper sources needed for the runner. -add_library(flutter_wrapper_app STATIC - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_APP} -) -apply_standard_settings(flutter_wrapper_app) -target_link_libraries(flutter_wrapper_app PUBLIC flutter) -target_include_directories(flutter_wrapper_app PUBLIC - "${WRAPPER_ROOT}/include" -) -add_dependencies(flutter_wrapper_app 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. -set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") -set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) -add_custom_command( - OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} - ${PHONY_OUTPUT} - COMMAND ${CMAKE_COMMAND} -E env - ${FLUTTER_TOOL_ENVIRONMENT} - "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ - VERBATIM -) -add_custom_target(flutter_assemble DEPENDS - "${FLUTTER_LIBRARY}" - ${FLUTTER_LIBRARY_HEADERS} - ${CPP_WRAPPER_SOURCES_CORE} - ${CPP_WRAPPER_SOURCES_PLUGIN} - ${CPP_WRAPPER_SOURCES_APP} -) diff --git a/pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.cc b/pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.cc deleted file mode 100644 index 8b6d4680af..0000000000 --- a/pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.cc +++ /dev/null @@ -1,11 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#include "generated_plugin_registrant.h" - - -void RegisterPlugins(flutter::PluginRegistry* registry) { -} diff --git a/pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.h b/pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.h deleted file mode 100644 index dc139d85a9..0000000000 --- a/pkgs/cupertino_http/example/windows/flutter/generated_plugin_registrant.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// Generated file. Do not edit. -// - -// clang-format off - -#ifndef GENERATED_PLUGIN_REGISTRANT_ -#define GENERATED_PLUGIN_REGISTRANT_ - -#include - -// Registers Flutter plugins. -void RegisterPlugins(flutter::PluginRegistry* registry); - -#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/pkgs/cupertino_http/example/windows/flutter/generated_plugins.cmake b/pkgs/cupertino_http/example/windows/flutter/generated_plugins.cmake deleted file mode 100644 index b93c4c30c1..0000000000 --- a/pkgs/cupertino_http/example/windows/flutter/generated_plugins.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# -# 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}/windows 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}/windows plugins/${ffi_plugin}) - list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) -endforeach(ffi_plugin) diff --git a/pkgs/cupertino_http/example/windows/runner/CMakeLists.txt b/pkgs/cupertino_http/example/windows/runner/CMakeLists.txt deleted file mode 100644 index 17411a8ab8..0000000000 --- a/pkgs/cupertino_http/example/windows/runner/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(runner LANGUAGES CXX) - -# Define the application target. To change its name, change BINARY_NAME in the -# top-level CMakeLists.txt, 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} WIN32 - "flutter_window.cpp" - "main.cpp" - "utils.cpp" - "win32_window.cpp" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" - "Runner.rc" - "runner.exe.manifest" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add preprocessor definitions for the build version. -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") -target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") - -# Disable Windows macros that collide with C++ standard library functions. -target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") - -# Add dependency libraries and include directories. Add any application-specific -# dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) -target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") - -# Run the Flutter tool portions of the build. This must not be removed. -add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/pkgs/cupertino_http/example/windows/runner/Runner.rc b/pkgs/cupertino_http/example/windows/runner/Runner.rc deleted file mode 100644 index a552e51aa5..0000000000 --- a/pkgs/cupertino_http/example/windows/runner/Runner.rc +++ /dev/null @@ -1,121 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#pragma code_page(65001) -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_APP_ICON ICON "resources\\app_icon.ico" - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) -#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD -#else -#define VERSION_AS_NUMBER 1,0,0,0 -#endif - -#if defined(FLUTTER_VERSION) -#define VERSION_AS_STRING FLUTTER_VERSION -#else -#define VERSION_AS_STRING "1.0.0" -#endif - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION_AS_NUMBER - PRODUCTVERSION VERSION_AS_NUMBER - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_APP - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", "com.example" "\0" - VALUE "FileDescription", "example" "\0" - VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "example" "\0" - VALUE "LegalCopyright", "Copyright (C) 2022 The Dart project authors. All rights reserved." "\0" - VALUE "OriginalFilename", "example.exe" "\0" - VALUE "ProductName", "example" "\0" - VALUE "ProductVersion", VERSION_AS_STRING "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1252 - END -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED diff --git a/pkgs/cupertino_http/example/windows/runner/flutter_window.cpp b/pkgs/cupertino_http/example/windows/runner/flutter_window.cpp deleted file mode 100644 index b43b9095ea..0000000000 --- a/pkgs/cupertino_http/example/windows/runner/flutter_window.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "flutter_window.h" - -#include - -#include "flutter/generated_plugin_registrant.h" - -FlutterWindow::FlutterWindow(const flutter::DartProject& project) - : project_(project) {} - -FlutterWindow::~FlutterWindow() {} - -bool FlutterWindow::OnCreate() { - if (!Win32Window::OnCreate()) { - return false; - } - - RECT frame = GetClientArea(); - - // The size here must match the window dimensions to avoid unnecessary surface - // creation / destruction in the startup path. - flutter_controller_ = std::make_unique( - frame.right - frame.left, frame.bottom - frame.top, project_); - // Ensure that basic setup of the controller was successful. - if (!flutter_controller_->engine() || !flutter_controller_->view()) { - return false; - } - RegisterPlugins(flutter_controller_->engine()); - SetChildContent(flutter_controller_->view()->GetNativeWindow()); - return true; -} - -void FlutterWindow::OnDestroy() { - if (flutter_controller_) { - flutter_controller_ = nullptr; - } - - Win32Window::OnDestroy(); -} - -LRESULT -FlutterWindow::MessageHandler(HWND hwnd, UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - // Give Flutter, including plugins, an opportunity to handle window messages. - if (flutter_controller_) { - std::optional result = - flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, - lparam); - if (result) { - return *result; - } - } - - switch (message) { - case WM_FONTCHANGE: - flutter_controller_->engine()->ReloadSystemFonts(); - break; - } - - return Win32Window::MessageHandler(hwnd, message, wparam, lparam); -} diff --git a/pkgs/cupertino_http/example/windows/runner/flutter_window.h b/pkgs/cupertino_http/example/windows/runner/flutter_window.h deleted file mode 100644 index 6da0652f05..0000000000 --- a/pkgs/cupertino_http/example/windows/runner/flutter_window.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef RUNNER_FLUTTER_WINDOW_H_ -#define RUNNER_FLUTTER_WINDOW_H_ - -#include -#include - -#include - -#include "win32_window.h" - -// A window that does nothing but host a Flutter view. -class FlutterWindow : public Win32Window { - public: - // Creates a new FlutterWindow hosting a Flutter view running |project|. - explicit FlutterWindow(const flutter::DartProject& project); - virtual ~FlutterWindow(); - - protected: - // Win32Window: - bool OnCreate() override; - void OnDestroy() override; - LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, - LPARAM const lparam) noexcept override; - - private: - // The project to run. - flutter::DartProject project_; - - // The Flutter instance hosted by this window. - std::unique_ptr flutter_controller_; -}; - -#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/pkgs/cupertino_http/example/windows/runner/main.cpp b/pkgs/cupertino_http/example/windows/runner/main.cpp deleted file mode 100644 index bcb57b0e2a..0000000000 --- a/pkgs/cupertino_http/example/windows/runner/main.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include - -#include "flutter_window.h" -#include "utils.h" - -int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, - _In_ wchar_t *command_line, _In_ int show_command) { - // Attach to console when present (e.g., 'flutter run') or create a - // new console when running with a debugger. - if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { - CreateAndAttachConsole(); - } - - // Initialize COM, so that it is available for use in the library and/or - // plugins. - ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); - - flutter::DartProject project(L"data"); - - std::vector command_line_arguments = - GetCommandLineArguments(); - - project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); - - FlutterWindow window(project); - Win32Window::Point origin(10, 10); - Win32Window::Size size(1280, 720); - if (!window.CreateAndShow(L"example", origin, size)) { - return EXIT_FAILURE; - } - window.SetQuitOnClose(true); - - ::MSG msg; - while (::GetMessage(&msg, nullptr, 0, 0)) { - ::TranslateMessage(&msg); - ::DispatchMessage(&msg); - } - - ::CoUninitialize(); - return EXIT_SUCCESS; -} diff --git a/pkgs/cupertino_http/example/windows/runner/resource.h b/pkgs/cupertino_http/example/windows/runner/resource.h deleted file mode 100644 index 66a65d1e4a..0000000000 --- a/pkgs/cupertino_http/example/windows/runner/resource.h +++ /dev/null @@ -1,16 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by Runner.rc -// -#define IDI_APP_ICON 101 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 102 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1001 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/pkgs/cupertino_http/example/windows/runner/resources/app_icon.ico b/pkgs/cupertino_http/example/windows/runner/resources/app_icon.ico deleted file mode 100644 index c04e20caf6370ebb9253ad831cc31de4a9c965f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 33772 zcmeHQc|26z|35SKE&G-*mXah&B~fFkXr)DEO&hIfqby^T&>|8^_Ub8Vp#`BLl3lbZ zvPO!8k!2X>cg~Elr=IVxo~J*a`+9wR=A83c-k-DFd(XM&UI1VKCqM@V;DDtJ09WB} zRaHKiW(GT00brH|0EeTeKVbpbGZg?nK6-j827q-+NFM34gXjqWxJ*a#{b_apGN<-L_m3#8Z26atkEn& ze87Bvv^6vVmM+p+cQ~{u%=NJF>#(d;8{7Q{^rWKWNtf14H}>#&y7$lqmY6xmZryI& z($uy?c5-+cPnt2%)R&(KIWEXww>Cnz{OUpT>W$CbO$h1= z#4BPMkFG1Y)x}Ui+WXr?Z!w!t_hjRq8qTaWpu}FH{MsHlU{>;08goVLm{V<&`itk~ zE_Ys=D(hjiy+5=?=$HGii=Y5)jMe9|wWoD_K07(}edAxh`~LBorOJ!Cf@f{_gNCC| z%{*04ViE!#>@hc1t5bb+NO>ncf@@Dv01K!NxH$3Eg1%)|wLyMDF8^d44lV!_Sr}iEWefOaL z8f?ud3Q%Sen39u|%00W<#!E=-RpGa+H8}{ulxVl4mwpjaU+%2pzmi{3HM)%8vb*~-M9rPUAfGCSos8GUXp02|o~0BTV2l#`>>aFV&_P$ejS;nGwSVP8 zMbOaG7<7eKD>c12VdGH;?2@q7535sa7MN*L@&!m?L`ASG%boY7(&L5imY#EQ$KrBB z4@_tfP5m50(T--qv1BJcD&aiH#b-QC>8#7Fx@3yXlonJI#aEIi=8&ChiVpc#N=5le zM*?rDIdcpawoc5kizv$GEjnveyrp3sY>+5_R5;>`>erS%JolimF=A^EIsAK zsPoVyyUHCgf0aYr&alx`<)eb6Be$m&`JYSuBu=p8j%QlNNp$-5C{b4#RubPb|CAIS zGE=9OFLP7?Hgc{?k45)84biT0k&-C6C%Q}aI~q<(7BL`C#<6HyxaR%!dFx7*o^laG z=!GBF^cwK$IA(sn9y6>60Rw{mYRYkp%$jH z*xQM~+bp)G$_RhtFPYx2HTsWk80+p(uqv9@I9)y{b$7NK53rYL$ezbmRjdXS?V}fj zWxX_feWoLFNm3MG7pMUuFPs$qrQWO9!l2B(SIuy2}S|lHNbHzoE+M2|Zxhjq9+Ws8c{*}x^VAib7SbxJ*Q3EnY5lgI9 z=U^f3IW6T=TWaVj+2N%K3<%Un;CF(wUp`TC&Y|ZjyFu6co^uqDDB#EP?DV5v_dw~E zIRK*BoY9y-G_ToU2V_XCX4nJ32~`czdjT!zwme zGgJ0nOk3U4@IE5JwtM}pwimLjk{ln^*4HMU%Fl4~n(cnsLB}Ja-jUM>xIB%aY;Nq8 z)Fp8dv1tkqKanv<68o@cN|%thj$+f;zGSO7H#b+eMAV8xH$hLggtt?O?;oYEgbq@= zV(u9bbd12^%;?nyk6&$GPI%|+<_mEpJGNfl*`!KV;VfmZWw{n{rnZ51?}FDh8we_L z8OI9nE31skDqJ5Oa_ybn7|5@ui>aC`s34p4ZEu6-s!%{uU45$Zd1=p$^^dZBh zu<*pDDPLW+c>iWO$&Z_*{VSQKg7=YEpS3PssPn1U!lSm6eZIho*{@&20e4Y_lRklKDTUCKI%o4Pc<|G^Xgu$J^Q|B87U;`c1zGwf^-zH*VQ^x+i^OUWE0yd z;{FJq)2w!%`x7yg@>uGFFf-XJl4H`YtUG%0slGKOlXV`q?RP>AEWg#x!b{0RicxGhS!3$p7 zij;{gm!_u@D4$Ox%>>bPtLJ> zwKtYz?T_DR1jN>DkkfGU^<#6sGz|~p*I{y`aZ>^Di#TC|Z!7j_O1=Wo8thuit?WxR zh9_S>kw^{V^|g}HRUF=dcq>?q(pHxw!8rx4dC6vbQVmIhmICF#zU!HkHpQ>9S%Uo( zMw{eC+`&pb=GZRou|3;Po1}m46H6NGd$t<2mQh}kaK-WFfmj_66_17BX0|j-E2fe3Jat}ijpc53 zJV$$;PC<5aW`{*^Z6e5##^`Ed#a0nwJDT#Qq~^e8^JTA=z^Kl>La|(UQ!bI@#ge{Dzz@61p-I)kc2?ZxFt^QQ}f%ldLjO*GPj(5)V9IyuUakJX=~GnTgZ4$5!3E=V#t`yOG4U z(gphZB6u2zsj=qNFLYShhg$}lNpO`P9xOSnO*$@@UdMYES*{jJVj|9z-}F^riksLK zbsU+4-{281P9e2UjY6tse^&a)WM1MFw;p#_dHhWI7p&U*9TR0zKdVuQed%6{otTsq z$f~S!;wg#Bd9kez=Br{m|66Wv z#g1xMup<0)H;c2ZO6su_ii&m8j&+jJz4iKnGZ&wxoQX|5a>v&_e#6WA!MB_4asTxLRGQCC5cI(em z%$ZfeqP>!*q5kU>a+BO&ln=4Jm>Ef(QE8o&RgLkk%2}4Tf}U%IFP&uS7}&|Q-)`5< z+e>;s#4cJ-z%&-^&!xsYx777Wt(wZY9(3(avmr|gRe4cD+a8&!LY`1^T?7x{E<=kdY9NYw>A;FtTvQ=Y&1M%lyZPl$ss1oY^Sl8we}n}Aob#6 zl4jERwnt9BlSoWb@3HxYgga(752Vu6Y)k4yk9u~Kw>cA5&LHcrvn1Y-HoIuFWg~}4 zEw4bR`mXZQIyOAzo)FYqg?$5W<;^+XX%Uz61{-L6@eP|lLH%|w?g=rFc;OvEW;^qh z&iYXGhVt(G-q<+_j}CTbPS_=K>RKN0&;dubh0NxJyDOHFF;<1k!{k#7b{|Qok9hac z;gHz}6>H6C6RnB`Tt#oaSrX0p-j-oRJ;_WvS-qS--P*8}V943RT6kou-G=A+7QPGQ z!ze^UGxtW3FC0$|(lY9^L!Lx^?Q8cny(rR`es5U;-xBhphF%_WNu|aO<+e9%6LuZq zt(0PoagJG<%hyuf;te}n+qIl_Ej;czWdc{LX^pS>77s9t*2b4s5dvP_!L^3cwlc)E!(!kGrg~FescVT zZCLeua3f4;d;Tk4iXzt}g}O@nlK3?_o91_~@UMIl?@77Qc$IAlLE95#Z=TES>2E%z zxUKpK{_HvGF;5%Q7n&vA?`{%8ohlYT_?(3A$cZSi)MvIJygXD}TS-3UwyUxGLGiJP znblO~G|*uA^|ac8E-w#}uBtg|s_~s&t>-g0X%zIZ@;o_wNMr_;{KDg^O=rg`fhDZu zFp(VKd1Edj%F zWHPl+)FGj%J1BO3bOHVfH^3d1F{)*PL&sRX`~(-Zy3&9UQX)Z;c51tvaI2E*E7!)q zcz|{vpK7bjxix(k&6=OEIBJC!9lTkUbgg?4-yE{9+pFS)$Ar@vrIf`D0Bnsed(Cf? zObt2CJ>BKOl>q8PyFO6w)+6Iz`LW%T5^R`U_NIW0r1dWv6OY=TVF?N=EfA(k(~7VBW(S;Tu5m4Lg8emDG-(mOSSs=M9Q&N8jc^Y4&9RqIsk(yO_P(mcCr}rCs%1MW1VBrn=0-oQN(Xj!k%iKV zb%ricBF3G4S1;+8lzg5PbZ|$Se$)I=PwiK=cDpHYdov2QO1_a-*dL4KUi|g&oh>(* zq$<`dQ^fat`+VW?m)?_KLn&mp^-@d=&7yGDt<=XwZZC=1scwxO2^RRI7n@g-1o8ps z)&+et_~)vr8aIF1VY1Qrq~Xe``KJrQSnAZ{CSq3yP;V*JC;mmCT6oRLSs7=GA?@6g zUooM}@tKtx(^|aKK8vbaHlUQqwE0}>j&~YlN3H#vKGm@u)xxS?n9XrOWUfCRa< z`20Fld2f&;gg7zpo{Adh+mqNntMc-D$N^yWZAZRI+u1T1zWHPxk{+?vcS1D>08>@6 zLhE@`gt1Y9mAK6Z4p|u(5I%EkfU7rKFSM=E4?VG9tI;a*@?6!ey{lzN5=Y-!$WFSe z&2dtO>^0@V4WRc#L&P%R(?@KfSblMS+N+?xUN$u3K4Ys%OmEh+tq}fnU}i>6YHM?< zlnL2gl~sF!j!Y4E;j3eIU-lfa`RsOL*Tt<%EFC0gPzoHfNWAfKFIKZN8}w~(Yi~=q z>=VNLO2|CjkxP}RkutxjV#4fWYR1KNrPYq5ha9Wl+u>ipsk*I(HS@iLnmGH9MFlTU zaFZ*KSR0px>o+pL7BbhB2EC1%PJ{67_ z#kY&#O4@P=OV#-79y_W>Gv2dxL*@G7%LksNSqgId9v;2xJ zrh8uR!F-eU$NMx@S*+sk=C~Dxr9Qn7TfWnTupuHKuQ$;gGiBcU>GF5sWx(~4IP3`f zWE;YFO*?jGwYh%C3X<>RKHC-DZ!*r;cIr}GLOno^3U4tFSSoJp%oHPiSa%nh=Zgn% z14+8v@ygy0>UgEN1bczD6wK45%M>psM)y^)IfG*>3ItX|TzV*0i%@>L(VN!zdKb8S?Qf7BhjNpziA zR}?={-eu>9JDcl*R=OP9B8N$IcCETXah9SUDhr{yrld{G;PnCWRsPD7!eOOFBTWUQ=LrA_~)mFf&!zJX!Oc-_=kT<}m|K52 z)M=G#;p;Rdb@~h5D{q^K;^fX-m5V}L%!wVC2iZ1uu401Ll}#rocTeK|7FAeBRhNdQ zCc2d^aQnQp=MpOmak60N$OgS}a;p(l9CL`o4r(e-nN}mQ?M&isv-P&d$!8|1D1I(3-z!wi zTgoo)*Mv`gC?~bm?S|@}I|m-E2yqPEvYybiD5azInexpK8?9q*$9Yy9-t%5jU8~ym zgZDx>!@ujQ=|HJnwp^wv-FdD{RtzO9SnyfB{mH_(c!jHL*$>0o-(h(eqe*ZwF6Lvu z{7rkk%PEqaA>o+f{H02tzZ@TWy&su?VNw43! z-X+rN`6llvpUms3ZiSt)JMeztB~>9{J8SPmYs&qohxdYFi!ra8KR$35Zp9oR)eFC4 zE;P31#3V)n`w$fZ|4X-|%MX`xZDM~gJyl2W;O$H25*=+1S#%|53>|LyH za@yh+;325%Gq3;J&a)?%7X%t@WXcWL*BaaR*7UEZad4I8iDt7^R_Fd`XeUo256;sAo2F!HcIQKk;h})QxEsPE5BcKc7WyerTchgKmrfRX z!x#H_%cL#B9TWAqkA4I$R^8{%do3Y*&(;WFmJ zU7Dih{t1<{($VtJRl9|&EB?|cJ)xse!;}>6mSO$o5XIx@V|AA8ZcoD88ZM?C*;{|f zZVmf94_l1OmaICt`2sTyG!$^UeTHx9YuUP!omj(r|7zpm5475|yXI=rR>>fteLI+| z)MoiGho0oEt=*J(;?VY0QzwCqw@cVm?d7Y!z0A@u#H?sCJ*ecvyhj& z-F77lO;SH^dmf?L>3i>?Z*U}Em4ZYV_CjgfvzYsRZ+1B!Uo6H6mbS<-FFL`ytqvb& zE7+)2ahv-~dz(Hs+f})z{*4|{)b=2!RZK;PWwOnO=hG7xG`JU5>bAvUbdYd_CjvtHBHgtGdlO+s^9ca^Bv3`t@VRX2_AD$Ckg36OcQRF zXD6QtGfHdw*hx~V(MV-;;ZZF#dJ-piEF+s27z4X1qi5$!o~xBnvf=uopcn7ftfsZc zy@(PuOk`4GL_n(H9(E2)VUjqRCk9kR?w)v@xO6Jm_Mx})&WGEl=GS0#)0FAq^J*o! zAClhvoTsNP*-b~rN{8Yym3g{01}Ep^^Omf=SKqvN?{Q*C4HNNAcrowIa^mf+3PRy! z*_G-|3i8a;+q;iP@~Of_$(vtFkB8yOyWt2*K)vAn9El>=D;A$CEx6b*XF@4y_6M+2 zpeW`RHoI_p(B{%(&jTHI->hmNmZjHUj<@;7w0mx3&koy!2$@cfX{sN19Y}euYJFn& z1?)+?HCkD0MRI$~uB2UWri})0bru_B;klFdwsLc!ne4YUE;t41JqfG# zZJq6%vbsdx!wYeE<~?>o4V`A3?lN%MnKQ`z=uUivQN^vzJ|C;sdQ37Qn?;lpzg})y z)_2~rUdH}zNwX;Tp0tJ78+&I=IwOQ-fl30R79O8@?Ub8IIA(6I`yHn%lARVL`%b8+ z4$8D-|MZZWxc_)vu6@VZN!HsI$*2NOV&uMxBNzIbRgy%ob_ zhwEH{J9r$!dEix9XM7n&c{S(h>nGm?el;gaX0@|QnzFD@bne`el^CO$yXC?BDJ|Qg z+y$GRoR`?ST1z^e*>;!IS@5Ovb7*RlN>BV_UC!7E_F;N#ky%1J{+iixp(dUJj93aK zzHNN>R-oN7>kykHClPnoPTIj7zc6KM(Pnlb(|s??)SMb)4!sMHU^-ntJwY5Big7xv zb1Ew`Xj;|D2kzGja*C$eS44(d&RMU~c_Y14V9_TLTz0J#uHlsx`S6{nhsA0dWZ#cG zJ?`fO50E>*X4TQLv#nl%3GOk*UkAgt=IY+u0LNXqeln3Z zv$~&Li`ZJOKkFuS)dJRA>)b_Da%Q~axwA_8zNK{BH{#}#m}zGcuckz}riDE-z_Ms> zR8-EqAMcfyGJCtvTpaUVQtajhUS%c@Yj}&6Zz;-M7MZzqv3kA7{SuW$oW#=0az2wQ zg-WG@Vb4|D`pl~Il54N7Hmsauc_ne-a!o5#j3WaBBh@Wuefb!QJIOn5;d)%A#s+5% zuD$H=VNux9bE-}1&bcYGZ+>1Fo;3Z@e&zX^n!?JK*adSbONm$XW9z;Q^L>9U!}Toj2WdafJ%oL#h|yWWwyAGxzfrAWdDTtaKl zK4`5tDpPg5>z$MNv=X0LZ0d6l%D{(D8oT@+w0?ce$DZ6pv>{1&Ok67Ix1 zH}3=IEhPJEhItCC8E=`T`N5(k?G=B4+xzZ?<4!~ ze~z6Wk9!CHTI(0rLJ4{JU?E-puc;xusR?>G?;4vt;q~iI9=kDL=z0Rr%O$vU`30X$ zDZRFyZ`(omOy@u|i6h;wtJlP;+}$|Ak|k2dea7n?U1*$T!sXqqOjq^NxLPMmk~&qI zYg0W?yK8T(6+Ea+$YyspKK?kP$+B`~t3^Pib_`!6xCs32!i@pqXfFV6PmBIR<-QW= zN8L{pt0Vap0x`Gzn#E@zh@H)0FfVfA_Iu4fjYZ+umO1LXIbVc$pY+E234u)ttcrl$ z>s92z4vT%n6cMb>=XT6;l0+9e(|CZG)$@C7t7Z7Ez@a)h)!hyuV&B5K%%)P5?Lk|C zZZSVzdXp{@OXSP0hoU-gF8s8Um(#xzjP2Vem zec#-^JqTa&Y#QJ>-FBxd7tf`XB6e^JPUgagB8iBSEps;92KG`!#mvVcPQ5yNC-GEG zTiHEDYfH+0O15}r^+ z#jxj=@x8iNHWALe!P3R67TwmhItn**0JwnzSV2O&KE8KcT+0hWH^OPD1pwiuyx=b@ zNf5Jh0{9X)8;~Es)$t@%(3!OnbY+`@?i{mGX7Yy}8T_*0a6g;kaFPq;*=px5EhO{Cp%1kI<0?*|h8v!6WnO3cCJRF2-CRrU3JiLJnj@6;L)!0kWYAc_}F{2P))3HmCrz zQ&N&gE70;`!6*eJ4^1IR{f6j4(-l&X!tjHxkbHA^Zhrnhr9g{exN|xrS`5Pq=#Xf& zG%P=#ra-TyVFfgW%cZo5OSIwFL9WtXAlFOa+ubmI5t*3=g#Y zF%;70p5;{ZeFL}&}yOY1N1*Q;*<(kTB!7vM$QokF)yr2FlIU@$Ph58$Bz z0J?xQG=MlS4L6jA22eS42g|9*9pX@$#*sUeM(z+t?hr@r5J&D1rx}2pW&m*_`VDCW zUYY@v-;bAO0HqoAgbbiGGC<=ryf96}3pouhy3XJrX+!!u*O_>Si38V{uJmQ&USptX zKp#l(?>%^7;2%h(q@YWS#9;a!JhKlkR#Vd)ERILlgu!Hr@jA@V;sk4BJ-H#p*4EqC zDGjC*tl=@3Oi6)Bn^QwFpul18fpkbpg0+peH$xyPBqb%`$OUhPKyWb32o7clB*9Z< zN=i~NLjavrLtwgJ01bufP+>p-jR2I95|TpmKpQL2!oV>g(4RvS2pK4*ou%m(h6r3A zX#s&`9LU1ZG&;{CkOK!4fLDTnBys`M!vuz>Q&9OZ0hGQl!~!jSDg|~s*w52opC{sB ze|Cf2luD(*G13LcOAGA!s2FjSK8&IE5#W%J25w!vM0^VyQM!t)inj&RTiJ!wXzFgz z3^IqzB7I0L$llljsGq})thBy9UOyjtFO_*hYM_sgcMk>44jeH0V1FDyELc{S1F-;A zS;T^k^~4biG&V*Irq}O;e}j$$+E_#G?HKIn05iP3j|87TkGK~SqG!-KBg5+mN(aLm z8ybhIM`%C19UX$H$KY6JgXbY$0AT%rEpHC;u`rQ$Y=rxUdsc5*Kvc8jaYaO$^)cI6){P6K0r)I6DY4Wr4&B zLQUBraey#0HV|&c4v7PVo3n$zHj99(TZO^3?Ly%C4nYvJTL9eLBLHsM3WKKD>5!B` zQ=BsR3aR6PD(Fa>327E2HAu5TM~Wusc!)>~(gM)+3~m;92Jd;FnSib=M5d6;;5{%R zb4V7DEJ0V!CP-F*oU?gkc>ksUtAYP&V4ND5J>J2^jt*vcFflQWCrB&fLdT%O59PVJ zhid#toR=FNgD!q3&r8#wEBr`!wzvQu5zX?Q>nlSJ4i@WC*CN*-xU66F^V5crWevQ9gsq$I@z1o(a=k7LL~ z7m_~`o;_Ozha1$8Q}{WBehvAlO4EL60y5}8GDrZ< zXh&F}71JbW2A~8KfEWj&UWV#4+Z4p`b{uAj4&WC zha`}X@3~+Iz^WRlOHU&KngK>#j}+_o@LdBC1H-`gT+krWX3-;!)6?{FBp~%20a}FL zFP9%Emqcwa#(`=G>BBZ0qZDQhmZKJg_g8<=bBFKWr!dyg(YkpE+|R*SGpDVU!+VlU zFC54^DLv}`qa%49T>nNiA9Q7Ips#!Xx90tCU2gvK`(F+GPcL=J^>No{)~we#o@&mUb6c$ zCc*<|NJBk-#+{j9xkQ&ujB zI~`#kN~7W!f*-}wkG~Ld!JqZ@tK}eeSnsS5J1fMFXm|`LJx&}5`@dK3W^7#Wnm+_P zBZkp&j1fa2Y=eIjJ0}gh85jt43kaIXXv?xmo@eHrka!Z|vQv12HN#+!I5E z`(fbuW>gFiJL|uXJ!vKt#z3e3HlVdboH7;e#i3(2<)Fg-I@BR!qY#eof3MFZ&*Y@l zI|KJf&ge@p2Dq09Vu$$Qxb7!}{m-iRk@!)%KL)txi3;~Z4Pb}u@GsW;ELiWeG9V51 znX#}B&4Y2E7-H=OpNE@q{%hFLxwIpBF2t{vPREa8_{linXT;#1vMRWjOzLOP$-hf( z>=?$0;~~PnkqY;~K{EM6Vo-T(0K{A0}VUGmu*hR z{tw3hvBN%N3G3Yw`X5Te+F{J`(3w1s3-+1EbnFQKcrgrX1Jqvs@ADGe%M0s$EbK$$ zK)=y=upBc6SjGYAACCcI=Y*6Fi8_jgwZlLxD26fnQfJmb8^gHRN5(TemhX@0e=vr> zg`W}6U>x6VhoA3DqsGGD9uL1DhB3!OXO=k}59TqD@(0Nb{)Ut_luTioK_>7wjc!5C zIr@w}b`Fez3)0wQfKl&bae7;PcTA7%?f2xucM0G)wt_KO!Ewx>F~;=BI0j=Fb4>pp zv}0R^xM4eti~+^+gE$6b81p(kwzuDti(-K9bc|?+pJEl@H+jSYuxZQV8rl8 zjp@M{#%qItIUFN~KcO9Hed*`$5A-2~pAo~K&<-Q+`9`$CK>rzqAI4w~$F%vs9s{~x zg4BP%Gy*@m?;D6=SRX?888Q6peF@_4Z->8wAH~Cn!R$|Hhq2cIzFYqT_+cDourHbY z0qroxJnrZ4Gh+Ay+F`_c%+KRT>y3qw{)89?=hJ@=KO=@ep)aBJ$c!JHfBMJpsP*3G za7|)VJJ8B;4?n{~ldJF7%jmb`-ftIvNd~ekoufG(`K(3=LNc;HBY& z(lp#q8XAD#cIf}k49zX_i`*fO+#!zKA&%T3j@%)R+#yag067CU%yUEe47>wzGU8^` z1EXFT^@I!{J!F8!X?S6ph8J=gUi5tl93*W>7}_uR<2N2~e}FaG?}KPyugQ=-OGEZs z!GBoyYY+H*ANn4?Z)X4l+7H%`17i5~zRlRIX?t)6_eu=g2Q`3WBhxSUeea+M-S?RL zX9oBGKn%a!H+*hx4d2(I!gsi+@SQK%<{X22M~2tMulJoa)0*+z9=-YO+;DFEm5eE1U9b^B(Z}2^9!Qk`!A$wUE z7$Ar5?NRg2&G!AZqnmE64eh^Anss3i!{}%6@Et+4rr!=}!SBF8eZ2*J3ujCWbl;3; z48H~goPSv(8X61fKKdpP!Z7$88NL^Z?j`!^*I?-P4X^pMxyWz~@$(UeAcTSDd(`vO z{~rc;9|GfMJcApU3k}22a!&)k4{CU!e_ny^Y3cO;tOvOMKEyWz!vG(Kp*;hB?d|R3`2X~=5a6#^o5@qn?J-bI8Ppip{-yG z!k|VcGsq!jF~}7DMr49Wap-s&>o=U^T0!Lcy}!(bhtYsPQy z4|EJe{12QL#=c(suQ89Mhw9<`bui%nx7Nep`C&*M3~vMEACmcRYYRGtANq$F%zh&V zc)cEVeHz*Z1N)L7k-(k3np#{GcDh2Q@ya0YHl*n7fl*ZPAsbU-a94MYYtA#&!c`xGIaV;yzsmrjfieTEtqB_WgZp2*NplHx=$O{M~2#i_vJ{ps-NgK zQsxKK_CBM2PP_je+Xft`(vYfXXgIUr{=PA=7a8`2EHk)Ym2QKIforz# tySWtj{oF3N9@_;i*Fv5S)9x^z=nlWP>jpp-9)52ZmLVA=i*%6g{{fxOO~wEK diff --git a/pkgs/cupertino_http/example/windows/runner/runner.exe.manifest b/pkgs/cupertino_http/example/windows/runner/runner.exe.manifest deleted file mode 100644 index a42ea7687c..0000000000 --- a/pkgs/cupertino_http/example/windows/runner/runner.exe.manifest +++ /dev/null @@ -1,20 +0,0 @@ - - - - - PerMonitorV2 - - - - - - - - - - - - - - - diff --git a/pkgs/cupertino_http/example/windows/runner/utils.cpp b/pkgs/cupertino_http/example/windows/runner/utils.cpp deleted file mode 100644 index f5bf9fa0f5..0000000000 --- a/pkgs/cupertino_http/example/windows/runner/utils.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "utils.h" - -#include -#include -#include -#include - -#include - -void CreateAndAttachConsole() { - if (::AllocConsole()) { - FILE *unused; - if (freopen_s(&unused, "CONOUT$", "w", stdout)) { - _dup2(_fileno(stdout), 1); - } - if (freopen_s(&unused, "CONOUT$", "w", stderr)) { - _dup2(_fileno(stdout), 2); - } - std::ios::sync_with_stdio(); - FlutterDesktopResyncOutputStreams(); - } -} - -std::vector GetCommandLineArguments() { - // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. - int argc; - wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); - if (argv == nullptr) { - return std::vector(); - } - - std::vector command_line_arguments; - - // Skip the first argument as it's the binary name. - for (int i = 1; i < argc; i++) { - command_line_arguments.push_back(Utf8FromUtf16(argv[i])); - } - - ::LocalFree(argv); - - return command_line_arguments; -} - -std::string Utf8FromUtf16(const wchar_t* utf16_string) { - if (utf16_string == nullptr) { - return std::string(); - } - int target_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, nullptr, 0, nullptr, nullptr); - std::string utf8_string; - if (target_length == 0 || target_length > utf8_string.max_size()) { - return utf8_string; - } - utf8_string.resize(target_length); - int converted_length = ::WideCharToMultiByte( - CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, - -1, utf8_string.data(), - target_length, nullptr, nullptr); - if (converted_length == 0) { - return std::string(); - } - return utf8_string; -} diff --git a/pkgs/cupertino_http/example/windows/runner/utils.h b/pkgs/cupertino_http/example/windows/runner/utils.h deleted file mode 100644 index 3879d54755..0000000000 --- a/pkgs/cupertino_http/example/windows/runner/utils.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef RUNNER_UTILS_H_ -#define RUNNER_UTILS_H_ - -#include -#include - -// Creates a console for the process, and redirects stdout and stderr to -// it for both the runner and the Flutter library. -void CreateAndAttachConsole(); - -// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string -// encoded in UTF-8. Returns an empty std::string on failure. -std::string Utf8FromUtf16(const wchar_t* utf16_string); - -// Gets the command line arguments passed in as a std::vector, -// encoded in UTF-8. Returns an empty std::vector on failure. -std::vector GetCommandLineArguments(); - -#endif // RUNNER_UTILS_H_ diff --git a/pkgs/cupertino_http/example/windows/runner/win32_window.cpp b/pkgs/cupertino_http/example/windows/runner/win32_window.cpp deleted file mode 100644 index 30b08cc8c9..0000000000 --- a/pkgs/cupertino_http/example/windows/runner/win32_window.cpp +++ /dev/null @@ -1,245 +0,0 @@ -#include "win32_window.h" - -#include - -#include "resource.h" - -namespace { - -constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; - -// The number of Win32Window objects that currently exist. -static int g_active_window_count = 0; - -using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); - -// Scale helper to convert logical scaler values to physical using passed in -// scale factor -int Scale(int source, double scale_factor) { - return static_cast(source * scale_factor); -} - -// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. -// This API is only needed for PerMonitor V1 awareness mode. -void EnableFullDpiSupportIfAvailable(HWND hwnd) { - HMODULE user32_module = LoadLibraryA("User32.dll"); - if (!user32_module) { - return; - } - auto enable_non_client_dpi_scaling = - reinterpret_cast( - GetProcAddress(user32_module, "EnableNonClientDpiScaling")); - if (enable_non_client_dpi_scaling != nullptr) { - enable_non_client_dpi_scaling(hwnd); - } - FreeLibrary(user32_module); -} - -} // namespace - -// Manages the Win32Window's window class registration. -class WindowClassRegistrar { - public: - ~WindowClassRegistrar() = default; - - // Returns the singleton registar instance. - static WindowClassRegistrar* GetInstance() { - if (!instance_) { - instance_ = new WindowClassRegistrar(); - } - return instance_; - } - - // Returns the name of the window class, registering the class if it hasn't - // previously been registered. - const wchar_t* GetWindowClass(); - - // Unregisters the window class. Should only be called if there are no - // instances of the window. - void UnregisterWindowClass(); - - private: - WindowClassRegistrar() = default; - - static WindowClassRegistrar* instance_; - - bool class_registered_ = false; -}; - -WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; - -const wchar_t* WindowClassRegistrar::GetWindowClass() { - if (!class_registered_) { - WNDCLASS window_class{}; - window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); - window_class.lpszClassName = kWindowClassName; - window_class.style = CS_HREDRAW | CS_VREDRAW; - window_class.cbClsExtra = 0; - window_class.cbWndExtra = 0; - window_class.hInstance = GetModuleHandle(nullptr); - window_class.hIcon = - LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); - window_class.hbrBackground = 0; - window_class.lpszMenuName = nullptr; - window_class.lpfnWndProc = Win32Window::WndProc; - RegisterClass(&window_class); - class_registered_ = true; - } - return kWindowClassName; -} - -void WindowClassRegistrar::UnregisterWindowClass() { - UnregisterClass(kWindowClassName, nullptr); - class_registered_ = false; -} - -Win32Window::Win32Window() { - ++g_active_window_count; -} - -Win32Window::~Win32Window() { - --g_active_window_count; - Destroy(); -} - -bool Win32Window::CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size) { - Destroy(); - - const wchar_t* window_class = - WindowClassRegistrar::GetInstance()->GetWindowClass(); - - const POINT target_point = {static_cast(origin.x), - static_cast(origin.y)}; - HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); - UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); - double scale_factor = dpi / 96.0; - - HWND window = CreateWindow( - window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, - Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), - Scale(size.width, scale_factor), Scale(size.height, scale_factor), - nullptr, nullptr, GetModuleHandle(nullptr), this); - - if (!window) { - return false; - } - - return OnCreate(); -} - -// static -LRESULT CALLBACK Win32Window::WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - if (message == WM_NCCREATE) { - auto window_struct = reinterpret_cast(lparam); - SetWindowLongPtr(window, GWLP_USERDATA, - reinterpret_cast(window_struct->lpCreateParams)); - - auto that = static_cast(window_struct->lpCreateParams); - EnableFullDpiSupportIfAvailable(window); - that->window_handle_ = window; - } else if (Win32Window* that = GetThisFromHandle(window)) { - return that->MessageHandler(window, message, wparam, lparam); - } - - return DefWindowProc(window, message, wparam, lparam); -} - -LRESULT -Win32Window::MessageHandler(HWND hwnd, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept { - switch (message) { - case WM_DESTROY: - window_handle_ = nullptr; - Destroy(); - if (quit_on_close_) { - PostQuitMessage(0); - } - return 0; - - case WM_DPICHANGED: { - auto newRectSize = reinterpret_cast(lparam); - LONG newWidth = newRectSize->right - newRectSize->left; - LONG newHeight = newRectSize->bottom - newRectSize->top; - - SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, - newHeight, SWP_NOZORDER | SWP_NOACTIVATE); - - return 0; - } - case WM_SIZE: { - RECT rect = GetClientArea(); - if (child_content_ != nullptr) { - // Size and position the child window. - MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, - rect.bottom - rect.top, TRUE); - } - return 0; - } - - case WM_ACTIVATE: - if (child_content_ != nullptr) { - SetFocus(child_content_); - } - return 0; - } - - return DefWindowProc(window_handle_, message, wparam, lparam); -} - -void Win32Window::Destroy() { - OnDestroy(); - - if (window_handle_) { - DestroyWindow(window_handle_); - window_handle_ = nullptr; - } - if (g_active_window_count == 0) { - WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); - } -} - -Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { - return reinterpret_cast( - GetWindowLongPtr(window, GWLP_USERDATA)); -} - -void Win32Window::SetChildContent(HWND content) { - child_content_ = content; - SetParent(content, window_handle_); - RECT frame = GetClientArea(); - - MoveWindow(content, frame.left, frame.top, frame.right - frame.left, - frame.bottom - frame.top, true); - - SetFocus(child_content_); -} - -RECT Win32Window::GetClientArea() { - RECT frame; - GetClientRect(window_handle_, &frame); - return frame; -} - -HWND Win32Window::GetHandle() { - return window_handle_; -} - -void Win32Window::SetQuitOnClose(bool quit_on_close) { - quit_on_close_ = quit_on_close; -} - -bool Win32Window::OnCreate() { - // No-op; provided for subclasses. - return true; -} - -void Win32Window::OnDestroy() { - // No-op; provided for subclasses. -} diff --git a/pkgs/cupertino_http/example/windows/runner/win32_window.h b/pkgs/cupertino_http/example/windows/runner/win32_window.h deleted file mode 100644 index 17ba431125..0000000000 --- a/pkgs/cupertino_http/example/windows/runner/win32_window.h +++ /dev/null @@ -1,98 +0,0 @@ -#ifndef RUNNER_WIN32_WINDOW_H_ -#define RUNNER_WIN32_WINDOW_H_ - -#include - -#include -#include -#include - -// A class abstraction for a high DPI-aware Win32 Window. Intended to be -// inherited from by classes that wish to specialize with custom -// rendering and input handling -class Win32Window { - public: - struct Point { - unsigned int x; - unsigned int y; - Point(unsigned int x, unsigned int y) : x(x), y(y) {} - }; - - struct Size { - unsigned int width; - unsigned int height; - Size(unsigned int width, unsigned int height) - : width(width), height(height) {} - }; - - Win32Window(); - virtual ~Win32Window(); - - // Creates and shows a win32 window with |title| and position and size using - // |origin| and |size|. New windows are created on the default monitor. Window - // sizes are specified to the OS in physical pixels, hence to ensure a - // consistent size to will treat the width height passed in to this function - // as logical pixels and scale to appropriate for the default monitor. Returns - // true if the window was created successfully. - bool CreateAndShow(const std::wstring& title, - const Point& origin, - const Size& size); - - // Release OS resources associated with window. - void Destroy(); - - // Inserts |content| into the window tree. - void SetChildContent(HWND content); - - // Returns the backing Window handle to enable clients to set icon and other - // window properties. Returns nullptr if the window has been destroyed. - HWND GetHandle(); - - // If true, closing this window will quit the application. - void SetQuitOnClose(bool quit_on_close); - - // Return a RECT representing the bounds of the current client area. - RECT GetClientArea(); - - protected: - // Processes and route salient window messages for mouse handling, - // size change and DPI. Delegates handling of these to member overloads that - // inheriting classes can handle. - virtual LRESULT MessageHandler(HWND window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Called when CreateAndShow is called, allowing subclass window-related - // setup. Subclasses should return false if setup fails. - virtual bool OnCreate(); - - // Called when Destroy is called. - virtual void OnDestroy(); - - private: - friend class WindowClassRegistrar; - - // OS callback called by message pump. Handles the WM_NCCREATE message which - // is passed when the non-client area is being created and enables automatic - // non-client DPI scaling so that the non-client area automatically - // responsponds to changes in DPI. All other messages are handled by - // MessageHandler. - static LRESULT CALLBACK WndProc(HWND const window, - UINT const message, - WPARAM const wparam, - LPARAM const lparam) noexcept; - - // Retrieves a class instance pointer for |window| - static Win32Window* GetThisFromHandle(HWND const window) noexcept; - - bool quit_on_close_ = false; - - // window handle for top level window. - HWND window_handle_ = nullptr; - - // window handle for hosted content. - HWND child_content_ = nullptr; -}; - -#endif // RUNNER_WIN32_WINDOW_H_ From 03efa848ffc62c97a76038ff579cde9a360b0a8f Mon Sep 17 00:00:00 2001 From: Alex Li Date: Sat, 24 Feb 2024 05:11:43 +0800 Subject: [PATCH 323/448] =?UTF-8?q?[cronet=5Fhttp]=20=F0=9F=8F=97=EF=B8=8F?= =?UTF-8?q?=20Use=20dart-define=20to=20determine=20dependency=20(#1111)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cronet.yml | 18 +- pkgs/cronet_http/CHANGELOG.md | 4 + pkgs/cronet_http/README.md | 55 ++++-- pkgs/cronet_http/README_EMBEDDED.md | 12 -- pkgs/cronet_http/android/build.gradle | 17 +- pkgs/cronet_http/pubspec.yaml | 2 +- .../tool/prepare_for_embedded.dart | 162 ------------------ 7 files changed, 65 insertions(+), 205 deletions(-) delete mode 100644 pkgs/cronet_http/README_EMBEDDED.md delete mode 100644 pkgs/cronet_http/tool/prepare_for_embedded.dart diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 9cf9be4560..63e7b7d253 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -26,7 +26,10 @@ jobs: runs-on: macos-latest strategy: matrix: - package: ['cronet_http', 'cronet_http_embedded'] + cronetHttpNoPlay: ['false', 'true'] + defaults: + run: + working-directory: pkgs/cronet_http steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 @@ -36,23 +39,14 @@ jobs: - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 with: channel: 'stable' - - name: Make cronet_http_embedded copy - if: ${{ matrix.package == 'cronet_http_embedded' }} - run: | - mv pkgs/cronet_http pkgs/cronet_http_embedded - cd pkgs/cronet_http_embedded - flutter pub get && dart tool/prepare_for_embedded.dart - id: install name: Install dependencies - working-directory: 'pkgs/${{ matrix.package }}' run: flutter pub get - name: Check formatting if: always() && steps.install.outcome == 'success' - working-directory: 'pkgs/${{ matrix.package }}' run: dart format --output=none --set-exit-if-changed . - name: Analyze code if: always() && steps.install.outcome == 'success' - working-directory: 'pkgs/${{ matrix.package }}' run: flutter analyze --fatal-infos - name: Run tests uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 @@ -64,6 +58,6 @@ jobs: # - pkgs/cronet_http/example/android/app/build.gradle api-level: 21 arch: x86_64 - target: ${{ matrix.package == 'cronet_http_embedded' && 'default' || 'google_apis' }} + target: ${{ matrix.cronetHttpNoPlay == 'true' && 'default' || 'google_apis' }} profile: pixel - script: cd pkgs/${{ matrix.package }}/example && flutter test --timeout=1200s integration_test/ + script: cd pkgs/cronet_http/example && flutter test --dart-define=cronetHttpNoPlay=${{ matrix.cronetHttpNoPlay }} --timeout=1200s integration_test/ diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index f8b134047d..30979ca249 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.2.0-wip + +* Support the Cronet embedding dependency with `--dart-define=cronetHttpNoPlay=true`. + ## 1.1.1 * Make it possible to construct `CronetClient` with custom a `CronetEngine` diff --git a/pkgs/cronet_http/README.md b/pkgs/cronet_http/README.md index e53e54d19e..e1ff6d2f15 100644 --- a/pkgs/cronet_http/README.md +++ b/pkgs/cronet_http/README.md @@ -2,22 +2,20 @@ [![package publisher](https://img.shields.io/pub/publisher/cronet_http.svg)](https://pub.dev/packages/cronet_http/publisher) An Android Flutter plugin that provides access to the -[Cronet][] -HTTP client. +[Cronet][] HTTP client. -Cronet is available as part of -[Google Play Services][]. +Cronet is available as part of [Google Play Services][] +and as [a standalone embedded library][]. -This package depends on [Google Play Services][] for its [Cronet][] -implementation. -[`package:cronet_http_embedded`](https://pub.dev/packages/cronet_http_embedded) -is functionally identical to this package but embeds [Cronet][] directly -instead of relying on [Google Play Services][]. +This package depends on [Google Play Services][] +for its [Cronet][] implementation. +To use the embedded version of [Cronet][] without [Google Play Services][], +see [Use embedded Cronet](#use-embedded-cronet). ## Motivation -Using [Cronet][], rather than the socket-based [dart:io HttpClient][] -implemententation, has several advantages: +Using [Cronet][], rather than the socket-based +[dart:io HttpClient][] implementation, has several advantages: 1. It automatically supports Android platform features such as HTTP proxies. 2. It supports configurable caching. @@ -40,23 +38,46 @@ void main() async { final Client httpClient; if (Platform.isAndroid) { final engine = CronetEngine.build( - cacheMode: CacheMode.memory, - cacheMaxSize: 2 * 1024 * 1024, - userAgent: 'Book Agent'); + cacheMode: CacheMode.memory, + cacheMaxSize: 2 * 1024 * 1024, + userAgent: 'Book Agent', + ); httpClient = CronetClient.fromCronetEngine(engine, isOwned: true); } else { httpClient = IOClient(HttpClient()..userAgent = 'Book Agent'); } - final response = await client.get(Uri.https( + final response = await client.get( + Uri.https( 'www.googleapis.com', '/books/v1/volumes', - {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'})); + {'q': 'HTTP', 'maxResults': '40', 'printType': 'books'}, + ), + ); httpClient.close(); } ``` +### Use embedded Cronet + +If you want your application to work without [Google Play Services][], +you can instead depend on the `org.chromium.net:cronet-embedded` package +by using `dart-define` to set `cronetHttpNoPlay` is set to `true`. + +For example: + +``` +flutter run --dart-define=cronetHttpNoPlay=true +``` + +To use the embedded version in `flutter test`: + +``` +flutter test --dart-define=cronetHttpNoPlay=true +``` + [Cronet]: https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary -[dart:io HttpClient]: https://api.dart.dev/stable/dart-io/HttpClient-class.html [Google Play Services]: https://developers.google.com/android/guides/overview +[a standalone embedded library]: https://mvnrepository.com/artifact/org.chromium.net/cronet-embedded +[dart:io HttpClient]: https://api.dart.dev/stable/dart-io/HttpClient-class.html [package:http Client]: https://pub.dev/documentation/http/latest/http/Client-class.html diff --git a/pkgs/cronet_http/README_EMBEDDED.md b/pkgs/cronet_http/README_EMBEDDED.md deleted file mode 100644 index ebc84ded77..0000000000 --- a/pkgs/cronet_http/README_EMBEDDED.md +++ /dev/null @@ -1,12 +0,0 @@ -An Android Flutter plugin that provides access to the -[Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) -HTTP client. - -This package is identical to [`package:cronet_http`](https://pub.dev/packages/cronet_http) -except that it embeds -[Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) -rather than using the version included with -[Google Play Services](https://developers.google.com/android/guides/overview). -This increases the uncompressed size of the application by approximately 8MB. - -See more details about cronet_http at: https://pub.dev/packages/cronet_http. diff --git a/pkgs/cronet_http/android/build.gradle b/pkgs/cronet_http/android/build.gradle index af945d9d8b..b11c74b8a8 100644 --- a/pkgs/cronet_http/android/build.gradle +++ b/pkgs/cronet_http/android/build.gradle @@ -21,6 +21,17 @@ rootProject.allprojects { } } +def dartDefines = [ + cronetHttpNoPlay: 'false' +] +if (project.hasProperty('dart-defines')) { + def defines = project.property('dart-defines').split(',').collectEntries { entry -> + def pair = new String(entry.decodeBase64(), 'UTF-8').split('=') + [(pair.first()): pair.last()] + } + dartDefines = dartDefines + defines +} + apply plugin: 'com.android.library' apply plugin: 'kotlin-android' @@ -65,5 +76,9 @@ android { } dependencies { - implementation "com.google.android.gms:play-services-cronet:18.0.1" + if (dartDefines.cronetHttpNoPlay == 'true') { + implementation 'org.chromium.net:cronet-embedded:113.5672.61' + } else { + implementation "com.google.android.gms:play-services-cronet:18.0.1" + } } diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index f3cb350ebe..d398f32560 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 1.1.1 +version: 1.2.0-wip description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http diff --git a/pkgs/cronet_http/tool/prepare_for_embedded.dart b/pkgs/cronet_http/tool/prepare_for_embedded.dart deleted file mode 100644 index 16a2c0baef..0000000000 --- a/pkgs/cronet_http/tool/prepare_for_embedded.dart +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -/// The cronet_http directory is used to produce two packages: -/// - `cronet_http`, which uses the Google Play Services version of Cronet. -/// - `cronet_http_embedded`, which embeds Cronet. -/// -/// The default configuration of this code is to use the -/// Google Play Services version of Cronet. -/// -/// The script transforms the configuration into one that embeds Cronet by: -/// 1. Modifying the Gradle build file to reference the embedded Cronet. -/// 2. Modifying the *name* and *description* in `pubspec.yaml`. -/// 3. Replacing `README.md` with `README_EMBEDDED.md`. -/// 4. Change the name of `cronet_http.dart` to `cronet_http_embedded.dart`. -/// 5. Update all the imports from `package:cronet_http/cronet_http.dart` to -/// `package:cronet_http_embedded/cronet_http_embedded.dart` -/// -/// After running this script, `flutter pub publish` -/// can be run to update package:cronet_http_embedded. -/// -/// NOTE: This script modifies the above files in place. -library; - -import 'dart:io'; - -import 'package:http/http.dart' as http; -import 'package:xml/xml.dart'; -import 'package:yaml_edit/yaml_edit.dart'; - -late final String _scriptName; -late final Directory _packageDirectory; - -const _gmsDependencyName = 'com.google.android.gms:play-services-cronet'; -const _embeddedDependencyName = 'org.chromium.net:cronet-embedded'; -const _packageName = 'cronet_http_embedded'; -const _packageDescription = 'An Android Flutter plugin that ' - 'provides access to the Cronet HTTP client. ' - 'Identical to package:cronet_http except that it embeds Cronet ' - 'rather than relying on Google Play Services.'; -final _cronetVersionUri = Uri.https( - 'dl.google.com', - 'android/maven2/org/chromium/net/group-index.xml', -); -// Finds the Google Play Services Cronet dependency line. For example: -// ' implementation "com.google.android.gms:play-services-cronet:18.0.1"' -final implementationRegExp = RegExp( - '^\\s*implementation [\'"]' - '$_gmsDependencyName' - ':\\d+.\\d+.\\d+[\'"]', - multiLine: true, -); - -void main(List args) async { - final script = Platform.script.toFilePath(); - _scriptName = script.split(Platform.pathSeparator).last; - _packageDirectory = Directory( - Uri.directory( - '${script.replaceAll(_scriptName, '')}' - '..${Platform.pathSeparator}', - ).toFilePath(), - ); - final latestVersion = await _getLatestCronetVersion(); - updateBuildGradle(latestVersion); - updateExampleBuildGradle(); - updatePubSpec(); - updateReadme(); - updateLibraryName(); - updateImports(); -} - -Future _getLatestCronetVersion() async { - final response = await http.get(_cronetVersionUri); - final parsedXml = XmlDocument.parse(response.body); - final embeddedNode = parsedXml.children - .singleWhere((e) => e is XmlElement) - .children - .singleWhere((e) => e is XmlElement && e.name.local == 'cronet-embedded'); - final stableVersionReg = RegExp(r'^\d+.\d+.\d+$'); - final versions = embeddedNode.attributes - .singleWhere((e) => e.name.local == 'versions') - .value - .split(',') - .where((e) => stableVersionReg.stringMatch(e) == e); - return versions.last; -} - -/// Update android/build.gradle. -void updateBuildGradle(String latestVersion) { - final buildGradle = File('${_packageDirectory.path}/android/build.gradle'); - final gradleContent = buildGradle.readAsStringSync(); - final newImplementation = '$_embeddedDependencyName:$latestVersion'; - print('Updating ${buildGradle.path}: adding $newImplementation'); - final newGradleContent = gradleContent.replaceAll( - implementationRegExp, - ' implementation "$newImplementation"', - ); - buildGradle.writeAsStringSync(newGradleContent); -} - -/// Remove the cronet reference from ./example/android/app/build.gradle. -void updateExampleBuildGradle() { - final buildGradle = - File('${_packageDirectory.path}/example/android/app/build.gradle'); - final gradleContent = buildGradle.readAsStringSync(); - - print('Updating ${buildGradle.path}: removing cronet reference'); - final newGradleContent = gradleContent.replaceAll( - implementationRegExp, - ' // NOTE: removed in package:cronet_http_embedded', - ); - buildGradle.writeAsStringSync(newGradleContent); -} - -/// Update pubspec.yaml and example/pubspec.yaml. -void updatePubSpec() { - print('Updating pubspec.yaml'); - final fPubspec = File('${_packageDirectory.path}/pubspec.yaml'); - final yamlEditor = YamlEditor(fPubspec.readAsStringSync()) - ..update(['name'], _packageName) - ..update(['description'], _packageDescription); - fPubspec.writeAsStringSync(yamlEditor.toString()); - print('Updating example/pubspec.yaml'); - final examplePubspec = File('${_packageDirectory.path}/example/pubspec.yaml'); - final replaced = examplePubspec - .readAsStringSync() - .replaceAll('cronet_http:', 'cronet_http_embedded:'); - examplePubspec.writeAsStringSync(replaced); -} - -/// Move README_EMBEDDED.md to replace README.md. -void updateReadme() { - print('Updating README.md from README_EMBEDDED.md'); - File('${_packageDirectory.path}/README.md').deleteSync(); - File('${_packageDirectory.path}/README_EMBEDDED.md') - .renameSync('${_packageDirectory.path}/README.md'); -} - -void updateImports() { - print('Updating imports in Dart files'); - for (final file in _packageDirectory.listSync(recursive: true)) { - if (file is File && - file.path.endsWith('.dart') && - !file.path.contains(_scriptName)) { - final updatedSource = file.readAsStringSync().replaceAll( - 'package:cronet_http/cronet_http.dart', - 'package:cronet_http_embedded/cronet_http_embedded.dart', - ); - file.writeAsStringSync(updatedSource); - } - } -} - -void updateLibraryName() { - print('Renaming cronet_http.dart to cronet_http_embedded.dart'); - File( - '${_packageDirectory.path}/lib/cronet_http.dart', - ).renameSync( - '${_packageDirectory.path}/lib/cronet_http_embedded.dart', - ); -} From 7ab9d560e22eb66c28155b5402220dd7f2cd404c Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 28 Feb 2024 16:30:02 -0800 Subject: [PATCH 324/448] Fix incorrect documentation that used the old `isOwned` name (#1140) --- pkgs/cronet_http/CHANGELOG.md | 2 ++ pkgs/cronet_http/README.md | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 30979ca249..28d41376b4 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,6 +1,8 @@ ## 1.2.0-wip * Support the Cronet embedding dependency with `--dart-define=cronetHttpNoPlay=true`. +* Fix a bug in the documentation where `isOwned` is used rather than + `closeEngine`. ## 1.1.1 diff --git a/pkgs/cronet_http/README.md b/pkgs/cronet_http/README.md index e1ff6d2f15..321897aa21 100644 --- a/pkgs/cronet_http/README.md +++ b/pkgs/cronet_http/README.md @@ -38,11 +38,10 @@ void main() async { final Client httpClient; if (Platform.isAndroid) { final engine = CronetEngine.build( - cacheMode: CacheMode.memory, - cacheMaxSize: 2 * 1024 * 1024, - userAgent: 'Book Agent', - ); - httpClient = CronetClient.fromCronetEngine(engine, isOwned: true); + cacheMode: CacheMode.memory, + cacheMaxSize: 2 * 1024 * 1024, + userAgent: 'Book Agent'); + httpClient = CronetClient.fromCronetEngine(engine, closeEngine: true); } else { httpClient = IOClient(HttpClient()..userAgent = 'Book Agent'); } From 3f59d398eae4ca91d63649d4204982e5ddb72253 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 28 Feb 2024 16:35:34 -0800 Subject: [PATCH 325/448] Add a dart:io WebSocket implementation (#1139) --- .github/workflows/dart.yml | 128 +++++++++--------- pkgs/web_socket/README.md | 48 ++++++- .../example/web_socket_example.dart | 42 +++++- pkgs/web_socket/lib/io_web_socket.dart | 1 + pkgs/web_socket/lib/src/io_web_socket.dart | 91 +++++++++++++ pkgs/web_socket/lib/src/web_socket.dart | 23 +++- pkgs/web_socket/lib/web_socket.dart | 3 - pkgs/web_socket/pubspec.yaml | 7 +- .../test/io_web_socket_conformance_test.dart | 14 ++ .../.gitattributes | 2 + pkgs/web_socket_conformance_tests/LICENSE | 27 ++++ pkgs/web_socket_conformance_tests/README.md | 35 +++++ .../bin/generate_server_wrappers.dart | 51 +++++++ .../example/client_test.dart | 29 ++++ .../lib/src/close_local_server.dart | 33 +++++ .../lib/src/close_local_server_vm.dart | 12 ++ .../lib/src/close_local_server_web.dart | 9 ++ .../lib/src/close_local_tests.dart | 106 +++++++++++++++ .../lib/src/close_remote_server.dart | 31 +++++ .../lib/src/close_remote_server_vm.dart | 12 ++ .../lib/src/close_remote_server_web.dart | 9 ++ .../lib/src/close_remote_tests.dart | 57 ++++++++ .../src/disconnect_after_upgrade_server.dart | 36 +++++ .../disconnect_after_upgrade_server_vm.dart | 12 ++ .../disconnect_after_upgrade_server_web.dart | 10 ++ .../src/disconnect_after_upgrade_tests.dart | 41 ++++++ .../lib/src/echo_server.dart | 22 +++ .../lib/src/echo_server_vm.dart | 12 ++ .../lib/src/echo_server_web.dart | 9 ++ .../lib/src/no_upgrade_server.dart | 22 +++ .../lib/src/no_upgrade_server_vm.dart | 12 ++ .../lib/src/no_upgrade_server_web.dart | 9 ++ .../lib/src/no_upgrade_tests.dart | 35 +++++ .../lib/src/payload_transfer_tests.dart | 102 ++++++++++++++ .../lib/src/peer_protocol_errors_server.dart | 37 +++++ .../src/peer_protocol_errors_server_vm.dart | 12 ++ .../src/peer_protocol_errors_server_web.dart | 9 ++ .../lib/src/peer_protocol_errors_tests.dart | 52 +++++++ .../lib/web_socket_conformance_tests.dart | 23 ++++ .../mono_pkg.yaml | 10 ++ .../web_socket_conformance_tests/pubspec.yaml | 22 +++ 41 files changed, 1180 insertions(+), 77 deletions(-) create mode 100644 pkgs/web_socket/lib/io_web_socket.dart create mode 100644 pkgs/web_socket/lib/src/io_web_socket.dart create mode 100644 pkgs/web_socket/test/io_web_socket_conformance_test.dart create mode 100644 pkgs/web_socket_conformance_tests/.gitattributes create mode 100644 pkgs/web_socket_conformance_tests/LICENSE create mode 100644 pkgs/web_socket_conformance_tests/README.md create mode 100644 pkgs/web_socket_conformance_tests/bin/generate_server_wrappers.dart create mode 100644 pkgs/web_socket_conformance_tests/example/client_test.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/close_local_server.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/close_local_server_vm.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/close_local_server_web.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/close_remote_server.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/close_remote_server_vm.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/close_remote_server_web.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/close_remote_tests.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server_vm.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server_web.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_tests.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/echo_server.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/echo_server_vm.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/echo_server_web.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server_vm.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server_web.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/no_upgrade_tests.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/payload_transfer_tests.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server_vm.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server_web.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_tests.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/web_socket_conformance_tests.dart create mode 100644 pkgs/web_socket_conformance_tests/mono_pkg.yaml create mode 100644 pkgs/web_socket_conformance_tests/pubspec.yaml diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 400bdd10df..0f53da75a6 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -70,26 +70,35 @@ jobs: if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests job_003: - name: "analyze_and_format; linux; Dart 3.2.6; PKG: pkgs/web_socket; `dart analyze --fatal-infos`" + name: "analyze_and_format; linux; Dart 3.3.0; PKGS: pkgs/http, pkgs/web_socket, pkgs/web_socket_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.6;packages:pkgs/web_socket;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.2.6;packages:pkgs/web_socket - os:ubuntu-latest;pub-cache-hosted;sdk:3.2.6 + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http-pkgs/web_socket-pkgs/web_socket_conformance_tests + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: - sdk: "3.2.6" + sdk: "3.3.0" - id: checkout name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + - name: "pkgs/http; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -99,37 +108,16 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_web_socket_pub_upgrade.conclusion == 'success'" working-directory: pkgs/web_socket - job_004: - name: "analyze_and_format; linux; Dart 3.3.0; PKG: pkgs/http; `dart analyze --fatal-infos`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:analyze_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 - with: - sdk: "3.3.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - id: pkgs_http_pub_upgrade - name: pkgs/http; dart pub upgrade + - id: pkgs_web_socket_conformance_tests_pub_upgrade + name: pkgs/web_socket_conformance_tests; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http - - name: "pkgs/http; dart analyze --fatal-infos" + working-directory: pkgs/web_socket_conformance_tests + - name: "pkgs/web_socket_conformance_tests; dart analyze --fatal-infos" run: dart analyze --fatal-infos - if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http - job_005: + if: "always() && steps.pkgs_web_socket_conformance_tests_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/web_socket_conformance_tests + job_004: name: "analyze_and_format; linux; Dart 3.4.0-154.0.dev; PKG: pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -159,17 +147,17 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_profile - job_006: - name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile, pkgs/web_socket; `dart analyze --fatal-infos`" + job_005: + name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile, pkgs/web_socket, pkgs/web_socket_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -216,17 +204,26 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_web_socket_pub_upgrade.conclusion == 'success'" working-directory: pkgs/web_socket - job_007: - name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile, pkgs/web_socket; `dart format --output=none --set-exit-if-changed .`" + - id: pkgs_web_socket_conformance_tests_pub_upgrade + name: pkgs/web_socket_conformance_tests; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/web_socket_conformance_tests + - name: "pkgs/web_socket_conformance_tests; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_web_socket_conformance_tests_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/web_socket_conformance_tests + job_006: + name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile, pkgs/web_socket, pkgs/web_socket_conformance_tests; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket;commands:format" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:format" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest @@ -273,7 +270,16 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_web_socket_pub_upgrade.conclusion == 'success'" working-directory: pkgs/web_socket - job_008: + - id: pkgs_web_socket_conformance_tests_pub_upgrade + name: pkgs/web_socket_conformance_tests; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/web_socket_conformance_tests + - name: "pkgs/web_socket_conformance_tests; dart format --output=none --set-exit-if-changed ." + run: "dart format --output=none --set-exit-if-changed ." + if: "always() && steps.pkgs_web_socket_conformance_tests_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/web_socket_conformance_tests + job_007: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -303,7 +309,7 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_009: + job_008: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -333,7 +339,7 @@ jobs: run: flutter analyze --fatal-infos if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_010: + job_009: name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -372,8 +378,7 @@ jobs: - job_006 - job_007 - job_008 - - job_009 - job_011: + job_010: name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -412,8 +417,7 @@ jobs: - job_006 - job_007 - job_008 - - job_009 - job_012: + job_011: name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -452,8 +456,7 @@ jobs: - job_006 - job_007 - job_008 - - job_009 - job_013: + job_012: name: "unit_test; linux; Dart 3.4.0-154.0.dev; PKG: pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -492,8 +495,7 @@ jobs: - job_006 - job_007 - job_008 - - job_009 - job_014: + job_013: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -532,8 +534,7 @@ jobs: - job_006 - job_007 - job_008 - - job_009 - job_015: + job_014: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -572,8 +573,7 @@ jobs: - job_006 - job_007 - job_008 - - job_009 - job_016: + job_015: name: "unit_test; linux; Dart dev; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -621,8 +621,7 @@ jobs: - job_006 - job_007 - job_008 - - job_009 - job_017: + job_016: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm`" runs-on: ubuntu-latest steps: @@ -661,8 +660,7 @@ jobs: - job_006 - job_007 - job_008 - - job_009 - job_018: + job_017: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test --platform chrome`" runs-on: ubuntu-latest steps: @@ -701,8 +699,7 @@ jobs: - job_006 - job_007 - job_008 - - job_009 - job_019: + job_018: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: ubuntu-latest steps: @@ -741,8 +738,7 @@ jobs: - job_006 - job_007 - job_008 - - job_009 - job_020: + job_019: name: "unit_test; macos; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: macos-latest steps: @@ -781,8 +777,7 @@ jobs: - job_006 - job_007 - job_008 - - job_009 - job_021: + job_020: name: "unit_test; windows; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: windows-latest steps: @@ -811,4 +806,3 @@ jobs: - job_006 - job_007 - job_008 - - job_009 diff --git a/pkgs/web_socket/README.md b/pkgs/web_socket/README.md index e43843ebc9..3e9c2d0146 100644 --- a/pkgs/web_socket/README.md +++ b/pkgs/web_socket/README.md @@ -1,2 +1,46 @@ -TODO: Put a short description of the package here that helps potential users -know whether this package might be useful for them. +[![pub package](https://img.shields.io/pub/v/web_socket.svg)](https://pub.dev/packages/web_socket) +[![package publisher](https://img.shields.io/pub/publisher/web_socket.svg)](https://pub.dev/packages/web_socket/publisher) + +Any easy-to-use library for communicating with WebSockets that has multiple +implementations. + +## Using + +```dart +import 'package:web_socket/io_web_socket.dart'; +import 'package:web_socket/web_socket.dart'; + +void main() async { + final socket = + await IOWebSocket.connect(Uri.parse('wss://ws.postman-echo.com/raw')); + + socket.events.listen((e) async { + switch (e) { + case TextDataReceived(text: final text): + print('Received Text: $text'); + await socket.close(); + case BinaryDataReceived(data: final data): + print('Received Binary: $data'); + case CloseReceived(code: final code, reason: final reason): + print('Connection to server closed: $code [$reason]'); + } + }); + + socket.sendText('Hello Dart WebSockets! 🎉'); +} +``` + +## Status: experimental + +**NOTE**: This package is currently experimental and published under the +[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to +solicit feedback. + +For packages in the labs.dart.dev publisher we generally plan to either graduate +the package into a supported publisher (dart.dev, tools.dart.dev) after a period +of feedback and iteration, or discontinue the package. These packages have a +much higher expected rate of API and breaking changes. + +Your feedback is valuable and will help us evolve this package. For general +feedback, suggestions, and comments, please file an issue in the +[bug tracker](https://github.com/dart-lang/http/issues). diff --git a/pkgs/web_socket/example/web_socket_example.dart b/pkgs/web_socket/example/web_socket_example.dart index 6cb625c543..27ab4569c1 100644 --- a/pkgs/web_socket/example/web_socket_example.dart +++ b/pkgs/web_socket/example/web_socket_example.dart @@ -1,3 +1,41 @@ -void main() { - // TODO: add an example. +import 'dart:convert'; +import 'dart:io'; + +import 'package:web_socket/io_web_socket.dart'; +import 'package:web_socket/web_socket.dart'; + +const requestId = 305; + +/// Prints the US dollar value of Bitcoins continuously. +void main() async { + // Whitebit public WebSocket API documentation: + // https://docs.whitebit.com/public/websocket/ + final socket = + await IOWebSocket.connect(Uri.parse('wss://api.whitebit.com/ws')); + + socket.events.listen((e) { + switch (e) { + case TextDataReceived(text: final text): + final json = jsonDecode(text) as Map; + if (json['id'] == requestId) { + if (json['error'] != null) { + stderr.writeln('Failure: ${json['error']}'); + socket.close(); + } + } else { + final params = (json['params'] as List).cast>(); + print('₿1 = USD\$${params[0][2]}'); + } + case BinaryDataReceived(): + stderr.writeln('Unexpected binary response from server'); + socket.close(); + case CloseReceived(): + stderr.writeln('Connection to server closed'); + } + }); + socket.sendText(jsonEncode({ + 'id': requestId, + 'method': 'candles_subscribe', + 'params': ['BTC_USD', 5] + })); } diff --git a/pkgs/web_socket/lib/io_web_socket.dart b/pkgs/web_socket/lib/io_web_socket.dart new file mode 100644 index 0000000000..eaea4f06dc --- /dev/null +++ b/pkgs/web_socket/lib/io_web_socket.dart @@ -0,0 +1 @@ +export 'src/io_web_socket.dart' show IOWebSocket; diff --git a/pkgs/web_socket/lib/src/io_web_socket.dart b/pkgs/web_socket/lib/src/io_web_socket.dart new file mode 100644 index 0000000000..4141aaff4a --- /dev/null +++ b/pkgs/web_socket/lib/src/io_web_socket.dart @@ -0,0 +1,91 @@ +import 'dart:async'; +import 'dart:convert'; +import 'dart:io' as io; +import 'dart:typed_data'; + +import '../web_socket.dart'; + +/// A `dart-io`-based [WebSocket] implementation. +class IOWebSocket implements WebSocket { + final io.WebSocket _webSocket; + final _events = StreamController(); + + static Future connect(Uri uri) async { + try { + final webSocket = await io.WebSocket.connect(uri.toString()); + return IOWebSocket._(webSocket); + } on io.WebSocketException catch (e) { + throw WebSocketException(e.message); + } + } + + IOWebSocket._(this._webSocket) { + _webSocket.listen( + (event) { + switch (event) { + case String e: + _events.add(TextDataReceived(e)); + case List e: + _events.add(BinaryDataReceived(Uint8List.fromList(e))); + } + }, + onError: (Object e, StackTrace st) { + final wse = switch (e) { + io.WebSocketException(message: final message) => + WebSocketException(message), + _ => WebSocketException(e.toString()), + }; + _events.addError(wse, st); + }, + onDone: () { + if (!_events.isClosed) { + _events + ..add(CloseReceived( + _webSocket.closeCode, _webSocket.closeReason ?? '')) + ..close(); + } + }, + ); + } + + @override + void sendBytes(Uint8List b) { + if (_events.isClosed) { + throw StateError('WebSocket is closed'); + } + _webSocket.add(b); + } + + @override + void sendText(String s) { + if (_events.isClosed) { + throw StateError('WebSocket is closed'); + } + _webSocket.add(s); + } + + @override + Future close([int? code, String? reason]) async { + if (_events.isClosed) { + throw StateError('WebSocket is closed'); + } + + if (code != null) { + RangeError.checkValueInInterval(code, 3000, 4999, 'code'); + } + if (reason != null && utf8.encode(reason).length > 123) { + throw ArgumentError.value(reason, 'reason', + 'reason must be <= 123 bytes long when encoded as UTF-8'); + } + + unawaited(_events.close()); + try { + await _webSocket.close(code, reason); + } on io.WebSocketException catch (e) { + throw WebSocketException(e.message); + } + } + + @override + Stream get events => _events.stream; +} diff --git a/pkgs/web_socket/lib/src/web_socket.dart b/pkgs/web_socket/lib/src/web_socket.dart index ffc0a3844c..4109c37960 100644 --- a/pkgs/web_socket/lib/src/web_socket.dart +++ b/pkgs/web_socket/lib/src/web_socket.dart @@ -85,7 +85,28 @@ class WebSocketConnectionClosed extends WebSocketException { /// The interface for WebSocket connections. /// -/// TODO: insert a usage example. +/// ```dart +/// import 'package:web_socket/io_web_socket.dart'; +/// import 'package:web_socket/src/web_socket.dart'; +/// +/// void main() async { +/// final socket = +/// await IOWebSocket.connect(Uri.parse('wss://ws.postman-echo.com/raw')); +/// +/// socket.events.listen((e) async { +/// switch (e) { +/// case TextDataReceived(text: final text): +/// print('Received Text: $text'); +/// await socket.close(); +/// case BinaryDataReceived(data: final data): +/// print('Received Binary: $data'); +/// case CloseReceived(code: final code, reason: final reason): +/// print('Connection to server closed: $code [$reason]'); +/// } +/// }); +/// +/// socket.sendText('Hello Dart WebSockets! 🎉'); +/// } abstract interface class WebSocket { /// Sends text data to the connected peer. /// diff --git a/pkgs/web_socket/lib/web_socket.dart b/pkgs/web_socket/lib/web_socket.dart index b901ebc76a..b08a48fd61 100644 --- a/pkgs/web_socket/lib/web_socket.dart +++ b/pkgs/web_socket/lib/web_socket.dart @@ -1,4 +1 @@ -/// TODO: write this doc string. -library; - export 'src/web_socket.dart'; diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml index 237da791ea..6ebe7bbed5 100644 --- a/pkgs/web_socket/pubspec.yaml +++ b/pkgs/web_socket/pubspec.yaml @@ -1,11 +1,14 @@ name: web_socket description: "TODO: enter a descirption here" -publish_to: none repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket +publish_to: none + environment: - sdk: ^3.2.6 + sdk: ^3.3.0 dev_dependencies: dart_flutter_team_lints: ^2.0.0 test: ^1.24.0 + web_socket_conformance_tests: + path: ../web_socket_conformance_tests/ diff --git a/pkgs/web_socket/test/io_web_socket_conformance_test.dart b/pkgs/web_socket/test/io_web_socket_conformance_test.dart new file mode 100644 index 0000000000..9b3728ddd2 --- /dev/null +++ b/pkgs/web_socket/test/io_web_socket_conformance_test.dart @@ -0,0 +1,14 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +library; + +import 'package:test/test.dart'; +import 'package:web_socket/io_web_socket.dart'; +import 'package:web_socket_conformance_tests/web_socket_conformance_tests.dart'; + +void main() { + testAll((uri, {protocols}) => IOWebSocket.connect(uri)); +} diff --git a/pkgs/web_socket_conformance_tests/.gitattributes b/pkgs/web_socket_conformance_tests/.gitattributes new file mode 100644 index 0000000000..104d0ecaf9 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/.gitattributes @@ -0,0 +1,2 @@ +lib/src/*_server_vm.dart linguist-generated=true +lib/src/*_server_web.dart linguist-generated=true diff --git a/pkgs/web_socket_conformance_tests/LICENSE b/pkgs/web_socket_conformance_tests/LICENSE new file mode 100644 index 0000000000..e5b2b46dcf --- /dev/null +++ b/pkgs/web_socket_conformance_tests/LICENSE @@ -0,0 +1,27 @@ +Copyright 2024, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pkgs/web_socket_conformance_tests/README.md b/pkgs/web_socket_conformance_tests/README.md new file mode 100644 index 0000000000..50b514cd32 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/README.md @@ -0,0 +1,35 @@ +[![pub package](https://img.shields.io/pub/v/web_socket_conformance_tests.svg)](https://pub.dev/packages/web_socket_conformance_tests) + +A library that tests whether implementations of `package:web_socket` +`WebSocket` behave as expected. + +This package is intended to be used in the tests of packages that implement +`package:web_socket` `Socket`. + +The tests work by starting a series of test servers and running the provided +`package:web_socket` `WebSocket` against them. + +## Usage + +`package:web_socket_conformance_tests` is meant to be used in the tests suite +of a `package:web_socket` `WebSocket` like: + +```dart +import 'package:web_socket/web_socket.dart'; +import 'package:test/test.dart'; + +import 'package:web_socket_conformance_tests/web_socket_conformance_tests.dart'; + +class MyWebSocket implements WebSocket { + // Your implementation here. +} + +void main() { + group('WebSocket conformance tests', () { + testAll(MyWebSocket()); + }); +} +``` + +**Note**: This package does not have it's own tests, instead it is +exercised by the tests in `package:web_socket`. diff --git a/pkgs/web_socket_conformance_tests/bin/generate_server_wrappers.dart b/pkgs/web_socket_conformance_tests/bin/generate_server_wrappers.dart new file mode 100644 index 0000000000..c9787b6495 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/bin/generate_server_wrappers.dart @@ -0,0 +1,51 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// Generates the '*_server_vm.dart' and '*_server_web.dart' support files. +library; + +import 'dart:core'; +import 'dart:io'; + +import 'package:dart_style/dart_style.dart'; + +const vm = '''// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import ''; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} +'''; + +const web = '''// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'web_socket_conformance_tests/src/')); +'''; + +void main() async { + final files = await Directory('lib/src').list().toList(); + final formatter = DartFormatter(); + + files.where((file) => file.path.endsWith('_server.dart')).forEach((file) { + final vmPath = file.path.replaceAll('_server.dart', '_server_vm.dart'); + File(vmPath).writeAsStringSync(formatter.format(vm.replaceAll( + '', file.uri.pathSegments.last))); + + final webPath = file.path.replaceAll('_server.dart', '_server_web.dart'); + File(webPath).writeAsStringSync(formatter.format(web.replaceAll( + '', file.uri.pathSegments.last))); + }); +} diff --git a/pkgs/web_socket_conformance_tests/example/client_test.dart b/pkgs/web_socket_conformance_tests/example/client_test.dart new file mode 100644 index 0000000000..ec3d01c17a --- /dev/null +++ b/pkgs/web_socket_conformance_tests/example/client_test.dart @@ -0,0 +1,29 @@ +import 'dart:typed_data'; + +import 'package:test/test.dart'; +import 'package:web_socket/web_socket.dart'; +import 'package:web_socket_conformance_tests/web_socket_conformance_tests.dart'; + +class MyWebSocketImplementation implements WebSocket { + static Future connect(Uri uri, + {Iterable? protocols}) async => + MyWebSocketImplementation(); + + @override + Future close([int? code, String? reason]) => throw UnimplementedError(); + + @override + Stream get events => throw UnimplementedError(); + + @override + void sendBytes(Uint8List b) => throw UnimplementedError(); + + @override + void sendText(String s) => throw UnimplementedError(); +} + +void main() { + group('client conformance tests', () { + testAll(MyWebSocketImplementation.connect); + }); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/close_local_server.dart b/pkgs/web_socket_conformance_tests/lib/src/close_local_server.dart new file mode 100644 index 0000000000..8991de3cc8 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/close_local_server.dart @@ -0,0 +1,33 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an WebSocket server that waits for the peer to send a Close frame. +void hybridMain(StreamChannel channel) async { + late HttpServer server; + + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + final webSocket = await WebSocketTransformer.upgrade( + request, + ); + + webSocket.listen((event) { + channel.sink.add(event); + }, onDone: () { + webSocket.close(4123, 'server closed the connection'); + channel.sink.add(webSocket.closeCode); + channel.sink.add(webSocket.closeReason); + }); + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/close_local_server_vm.dart b/pkgs/web_socket_conformance_tests/lib/src/close_local_server_vm.dart new file mode 100644 index 0000000000..c0d0652326 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/close_local_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'close_local_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/close_local_server_web.dart b/pkgs/web_socket_conformance_tests/lib/src/close_local_server_web.dart new file mode 100644 index 0000000000..f7bb3810a6 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/close_local_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'web_socket_conformance_tests/src/close_local_server.dart')); diff --git a/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart new file mode 100644 index 0000000000..2fe27bb040 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart @@ -0,0 +1,106 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; +import 'package:web_socket/web_socket.dart'; + +import 'close_local_server_vm.dart' + if (dart.library.html) 'close_local_server_web.dart'; + +/// Tests that the [WebSocket] can correctly close the connection to the peer. +void testCloseLocal( + Future Function(Uri uri, {Iterable? protocols}) + channelFactory) { + group('local close', () { + late Uri uri; + late StreamChannel httpServerChannel; + late StreamQueue httpServerQueue; + + setUp(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + uri = Uri.parse('ws://localhost:${await httpServerQueue.next}'); + }); + tearDown(() async { + httpServerChannel.sink.add(null); + }); + + test('reserved close code', () async { + final channel = await channelFactory(uri); + await expectLater(() => channel.close(1004), throwsA(isA())); + }); + + test('too long close reason', () async { + final channel = await channelFactory(uri); + await expectLater(() => channel.close(3000, 'a'.padLeft(124)), + throwsA(isA())); + }); + + test('close', () async { + final channel = await channelFactory(uri); + + await channel.close(); + final closeCode = await httpServerQueue.next as int?; + final closeReason = await httpServerQueue.next as String?; + + expect(closeCode, 1005); + expect(closeReason, ''); + expect(await channel.events.isEmpty, true); + }); + + test('with code 3000', () async { + final channel = await channelFactory(uri); + + await channel.close(3000); + final closeCode = await httpServerQueue.next as int?; + final closeReason = await httpServerQueue.next as String?; + + expect(closeCode, 3000); + expect(closeReason, ''); + expect(await channel.events.isEmpty, true); + }); + + test('with code 4999', () async { + final channel = await channelFactory(uri); + + await channel.close(4999); + final closeCode = await httpServerQueue.next as int?; + final closeReason = await httpServerQueue.next as String?; + + expect(closeCode, 4999); + expect(closeReason, ''); + expect(await channel.events.isEmpty, true); + }); + + test('with code and reason', () async { + final channel = await channelFactory(uri); + + await channel.close(3000, 'Client initiated closure'); + final closeCode = await httpServerQueue.next as int?; + final closeReason = await httpServerQueue.next as String?; + + expect(closeCode, 3000); + expect(closeReason, 'Client initiated closure'); + expect(await channel.events.isEmpty, true); + }); + + test('close after close', () async { + final channel = await channelFactory(uri); + + await channel.close(3000, 'Client initiated closure'); + + await expectLater( + () async => await channel.close(3001, 'Client initiated closure'), + throwsStateError); + final closeCode = await httpServerQueue.next as int?; + final closeReason = await httpServerQueue.next as String?; + + expect(closeCode, 3000); + expect(closeReason, 'Client initiated closure'); + expect(await channel.events.isEmpty, true); + }); + }); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/close_remote_server.dart b/pkgs/web_socket_conformance_tests/lib/src/close_remote_server.dart new file mode 100644 index 0000000000..9bbf84ed48 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/close_remote_server.dart @@ -0,0 +1,31 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an WebSocket server that sends a Close frame after receiving any +/// data. +void hybridMain(StreamChannel channel) async { + late HttpServer server; + + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + final webSocket = await WebSocketTransformer.upgrade( + request, + ); + + webSocket.listen((event) { + channel.sink.add(event); + webSocket.close(4123, 'server closed the connection'); + }); + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/close_remote_server_vm.dart b/pkgs/web_socket_conformance_tests/lib/src/close_remote_server_vm.dart new file mode 100644 index 0000000000..4cc6dba56e --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/close_remote_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'close_remote_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/close_remote_server_web.dart b/pkgs/web_socket_conformance_tests/lib/src/close_remote_server_web.dart new file mode 100644 index 0000000000..6e832bacac --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/close_remote_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'web_socket_conformance_tests/src/close_remote_server.dart')); diff --git a/pkgs/web_socket_conformance_tests/lib/src/close_remote_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/close_remote_tests.dart new file mode 100644 index 0000000000..647f74e27c --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/close_remote_tests.dart @@ -0,0 +1,57 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; +import 'package:web_socket/web_socket.dart'; + +import 'close_remote_server_vm.dart' + if (dart.library.html) 'close_remote_server_web.dart'; + +/// Tests that the [WebSocket] can correctly receive Close frames from the peer. +void testCloseRemote( + Future Function(Uri uri, {Iterable? protocols}) + channelFactory) { + group('remote close', () { + late Uri uri; + late StreamChannel httpServerChannel; + late StreamQueue httpServerQueue; + + setUp(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + uri = Uri.parse('ws://localhost:${await httpServerQueue.next}'); + }); + tearDown(() async { + httpServerChannel.sink.add(null); + }); + + test('with code and reason', () async { + final channel = await channelFactory(uri); + + channel.sendText('Please close'); + expect(await channel.events.toList(), + [CloseReceived(4123, 'server closed the connection')]); + }); + + test('send after close received', () async { + final channel = await channelFactory(uri); + + channel.sendText('Please close'); + expect(await channel.events.toList(), + [CloseReceived(4123, 'server closed the connection')]); + expect(() => channel.sendText('test'), throwsStateError); + }); + + test('close after close received', () async { + final channel = await channelFactory(uri); + + channel.sendText('Please close'); + expect(await channel.events.toList(), + [CloseReceived(4123, 'server closed the connection')]); + await expectLater(channel.close, throwsStateError); + }); + }); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server.dart b/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server.dart new file mode 100644 index 0000000000..965521c439 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server.dart @@ -0,0 +1,36 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; +import 'package:crypto/crypto.dart'; +import 'package:stream_channel/stream_channel.dart'; + +const _webSocketGuid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'; + +/// Starts an WebSocket server that disconnects after WebSocket upgrade. +void hybridMain(StreamChannel channel) async { + late final HttpServer server; + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + var key = request.headers.value('Sec-WebSocket-Key'); + var digest = sha1.convert('$key$_webSocketGuid'.codeUnits); + var accept = base64.encode(digest.bytes); + request.response + ..statusCode = HttpStatus.switchingProtocols + ..headers.add(HttpHeaders.connectionHeader, 'Upgrade') + ..headers.add(HttpHeaders.upgradeHeader, 'websocket') + ..headers.add('Sec-WebSocket-Accept', accept); + request.response.contentLength = 0; + final socket = await request.response.detachSocket(); + socket.destroy(); + }); + + channel.sink.add(server.port); + + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server_vm.dart b/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server_vm.dart new file mode 100644 index 0000000000..0bc7426239 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'disconnect_after_upgrade_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server_web.dart b/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server_web.dart new file mode 100644 index 0000000000..9e1a13771f --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_server_web.dart @@ -0,0 +1,10 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: + 'web_socket_conformance_tests/src/disconnect_after_upgrade_server.dart')); diff --git a/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_tests.dart new file mode 100644 index 0000000000..16ccd68fa8 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_tests.dart @@ -0,0 +1,41 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; +import 'package:web_socket/web_socket.dart'; + +import 'disconnect_after_upgrade_server_vm.dart' + if (dart.library.html) 'disconnect_after_upgrade_server_web.dart'; + +/// Tests that the [WebSocket] generates a correct [CloseReceived] event if +/// the peer disconnects after WebSocket upgrade. +void testDisconnectAfterUpgrade( + Future Function(Uri uri, {Iterable? protocols}) + channelFactory) { + group('disconnect', () { + late final Uri uri; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + uri = Uri.parse('ws://localhost:${await httpServerQueue.next}'); + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + + test('disconnect after upgrade', () async { + final channel = await channelFactory(uri); + channel.sendText('test'); + expect( + (await channel.events.single as CloseReceived).code, + anyOf([ + 1005, // closed no status + 1006, // closed abnormal + ])); + }); + }); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/echo_server.dart b/pkgs/web_socket_conformance_tests/lib/src/echo_server.dart new file mode 100644 index 0000000000..6728507a35 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/echo_server.dart @@ -0,0 +1,22 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an WebSocket server that echos the payload of the request. +void hybridMain(StreamChannel channel) async { + late HttpServer server; + + server = (await HttpServer.bind('localhost', 0)) + ..transform(WebSocketTransformer()) + .listen((WebSocket webSocket) => webSocket.listen(webSocket.add)); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/echo_server_vm.dart b/pkgs/web_socket_conformance_tests/lib/src/echo_server_vm.dart new file mode 100644 index 0000000000..a589cc0d1c --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/echo_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'echo_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/echo_server_web.dart b/pkgs/web_socket_conformance_tests/lib/src/echo_server_web.dart new file mode 100644 index 0000000000..b553554f69 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/echo_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'web_socket_conformance_tests/src/echo_server.dart')); diff --git a/pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server.dart b/pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server.dart new file mode 100644 index 0000000000..dec194186f --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server.dart @@ -0,0 +1,22 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an WebSocket server that closes the HTTP connection before WebSocket +/// upgrade. +void hybridMain(StreamChannel channel) async { + final server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + request.response.statusCode = 200; + await request.response.close(); + }); + channel.sink.add(server.port); + + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server_vm.dart b/pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server_vm.dart new file mode 100644 index 0000000000..7f8cd5cf5a --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'no_upgrade_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server_web.dart b/pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server_web.dart new file mode 100644 index 0000000000..97409bc34a --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/no_upgrade_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'web_socket_conformance_tests/src/no_upgrade_server.dart')); diff --git a/pkgs/web_socket_conformance_tests/lib/src/no_upgrade_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/no_upgrade_tests.dart new file mode 100644 index 0000000000..c06955c70d --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/no_upgrade_tests.dart @@ -0,0 +1,35 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; +import 'package:web_socket/web_socket.dart'; + +import 'no_upgrade_server_vm.dart' + if (dart.library.html) 'no_upgrade_server_web.dart'; + +/// Tests that the [WebSocket] generates the correct exception if the peer +/// closes the HTTP connection before WebSocket upgrade. +void testNoUpgrade( + Future Function(Uri uri, {Iterable? protocols}) + channelFactory) { + group('no upgrade', () { + late final Uri uri; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + uri = Uri.parse('ws://localhost:${await httpServerQueue.next}'); + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + + test('close before upgrade', () async { + await expectLater( + () => channelFactory(uri), throwsA(isA())); + }); + }); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/payload_transfer_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/payload_transfer_tests.dart new file mode 100644 index 0000000000..6b04b91bb5 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/payload_transfer_tests.dart @@ -0,0 +1,102 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:typed_data'; + +import 'package:async/async.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; +import 'package:web_socket/web_socket.dart'; + +import 'echo_server_vm.dart' if (dart.library.html) 'echo_server_web.dart'; + +/// Tests that the [WebSocket] can correctly transmit and receive text +/// and binary payloads. +void testPayloadTransfer( + Future Function(Uri uri, {Iterable? protocols}) + webSocketFactory) { + group('payload transfer', () { + late Uri uri; + late StreamChannel httpServerChannel; + late StreamQueue httpServerQueue; + late WebSocket webSocket; + + setUp(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + uri = Uri.parse('ws://localhost:${await httpServerQueue.next}'); + webSocket = await webSocketFactory(uri); + }); + tearDown(() async { + httpServerChannel.sink.add(null); + await webSocket.close(); + }); + + test('empty string request and response', () async { + webSocket.sendText(''); + expect(await webSocket.events.first, TextDataReceived('')); + }); + + test('empty binary request and response', () async { + webSocket.sendBytes(Uint8List(0)); + expect(await webSocket.events.first, BinaryDataReceived(Uint8List(0))); + }); + + test('string request and response', () async { + webSocket.sendText('Hello World!'); + expect(await webSocket.events.first, TextDataReceived('Hello World!')); + }); + + test('binary request and response', () async { + webSocket.sendBytes(Uint8List.fromList([1, 2, 3, 4, 5])); + expect(await webSocket.events.first, + BinaryDataReceived(Uint8List.fromList([1, 2, 3, 4, 5]))); + }); + + test('large string request and response', () async { + final data = 'Hello World!' * 10000; + + webSocket.sendText(data); + expect(await webSocket.events.first, TextDataReceived(data)); + }); + + test('large binary request and response', () async { + final data = Uint8List(1000000); + data + ..fillRange(0, data.length ~/ 10, 1) + ..fillRange(0, data.length ~/ 10, 2) + ..fillRange(0, data.length ~/ 10, 3) + ..fillRange(0, data.length ~/ 10, 4) + ..fillRange(0, data.length ~/ 10, 5) + ..fillRange(0, data.length ~/ 10, 6) + ..fillRange(0, data.length ~/ 10, 7) + ..fillRange(0, data.length ~/ 10, 8) + ..fillRange(0, data.length ~/ 10, 9) + ..fillRange(0, data.length ~/ 10, 10); + + webSocket.sendBytes(data); + expect(await webSocket.events.first, BinaryDataReceived(data)); + }); + + test('non-ascii string request and response', () async { + webSocket.sendText('🎨⛳🌈'); + expect(await webSocket.events.first, TextDataReceived('🎨⛳🌈')); + }); + + test('alternative string and binary request and response', () async { + webSocket + ..sendBytes(Uint8List.fromList([1])) + ..sendText('Hello!') + ..sendBytes(Uint8List.fromList([1, 2])) + ..sendText('Hello World!'); + + expect(await webSocket.events.take(4).toList(), [ + BinaryDataReceived(Uint8List.fromList([1])), + TextDataReceived('Hello!'), + BinaryDataReceived(Uint8List.fromList([1, 2])), + TextDataReceived('Hello World!') + ]); + }); + }); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server.dart b/pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server.dart new file mode 100644 index 0000000000..8760bb9a38 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server.dart @@ -0,0 +1,37 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; +import 'package:crypto/crypto.dart'; +import 'package:stream_channel/stream_channel.dart'; + +const _webSocketGuid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'; + +/// Starts an WebSocket server that sends invalid frames after completing the +/// WebSocket upgrade. +void hybridMain(StreamChannel channel) async { + late final HttpServer server; + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + var key = request.headers.value('Sec-WebSocket-Key'); + var digest = sha1.convert('$key$_webSocketGuid'.codeUnits); + var accept = base64.encode(digest.bytes); + request.response + ..statusCode = HttpStatus.switchingProtocols + ..headers.add(HttpHeaders.connectionHeader, 'Upgrade') + ..headers.add(HttpHeaders.upgradeHeader, 'websocket') + ..headers.add('Sec-WebSocket-Accept', accept); + request.response.contentLength = 0; + final socket = await request.response.detachSocket(); + socket.write('marry had a little lamb whose fleece was white as snow'); + }); + + channel.sink.add(server.port); + + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server_vm.dart b/pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server_vm.dart new file mode 100644 index 0000000000..4996e3b6c2 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'peer_protocol_errors_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server_web.dart b/pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server_web.dart new file mode 100644 index 0000000000..361b02c30f --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'web_socket_conformance_tests/src/peer_protocol_errors_server.dart')); diff --git a/pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_tests.dart new file mode 100644 index 0000000000..ba44f5122c --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/peer_protocol_errors_tests.dart @@ -0,0 +1,52 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; +import 'package:web_socket/web_socket.dart'; + +import 'peer_protocol_errors_server_vm.dart' + if (dart.library.html) 'peer_protocol_errors_server_web.dart'; + +/// Tests that the [WebSocket] can correctly handle incorrect WebSocket frames. +void testPeerProtocolErrors( + Future Function(Uri uri, {Iterable? protocols}) + channelFactory) { + group('peer protocol errors', () { + late final Uri uri; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + uri = Uri.parse('ws://localhost:${await httpServerQueue.next}'); + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + + test('bad data after upgrade', () async { + final channel = await channelFactory(uri); + expect( + (await channel.events.single as CloseReceived).code, + anyOf([ + 1002, // protocol error + 1005, // closed no status + 1006, // closed abnormal + ])); + }); + + test('bad data after upgrade with write', () async { + final channel = await channelFactory(uri); + channel.sendText('test'); + expect( + (await channel.events.single as CloseReceived).code, + anyOf([ + 1002, // protocol error + 1005, // closed no status + 1006, // closed abnormal + ])); + }); + }); +} diff --git a/pkgs/web_socket_conformance_tests/lib/web_socket_conformance_tests.dart b/pkgs/web_socket_conformance_tests/lib/web_socket_conformance_tests.dart new file mode 100644 index 0000000000..248fc3870a --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/web_socket_conformance_tests.dart @@ -0,0 +1,23 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:web_socket/web_socket.dart'; +import 'src/close_local_tests.dart'; +import 'src/close_remote_tests.dart'; +import 'src/disconnect_after_upgrade_tests.dart'; +import 'src/no_upgrade_tests.dart'; +import 'src/payload_transfer_tests.dart'; +import 'src/peer_protocol_errors_tests.dart'; + +/// Runs the entire test suite against the given [WebSocket]. +void testAll( + Future Function(Uri uri, {Iterable? protocols}) + webSocketFactory) { + testCloseLocal(webSocketFactory); + testCloseRemote(webSocketFactory); + testDisconnectAfterUpgrade(webSocketFactory); + testNoUpgrade(webSocketFactory); + testPayloadTransfer(webSocketFactory); + testPeerProtocolErrors(webSocketFactory); +} diff --git a/pkgs/web_socket_conformance_tests/mono_pkg.yaml b/pkgs/web_socket_conformance_tests/mono_pkg.yaml new file mode 100644 index 0000000000..16e4e7a5f3 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/mono_pkg.yaml @@ -0,0 +1,10 @@ +sdk: +- pubspec +- dev + +stages: +- analyze_and_format: + - analyze: --fatal-infos + - format: + sdk: + - dev diff --git a/pkgs/web_socket_conformance_tests/pubspec.yaml b/pkgs/web_socket_conformance_tests/pubspec.yaml new file mode 100644 index 0000000000..afb952f804 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/pubspec.yaml @@ -0,0 +1,22 @@ +name: web_socket_conformance_tests +description: >- + A library that tests whether implementations of `package:web_socket`'s + `WebSocket` class behave as expected. +repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket_conformance_tests + +publish_to: none + +environment: + sdk: ^3.3.0 + +dependencies: + async: ^2.11.0 + crypto: ^3.0.3 + dart_style: ^2.3.4 + stream_channel: ^2.1.2 + test: ^1.24.0 + web_socket: + path: ../web_socket + +dev_dependencies: + dart_flutter_team_lints: ^2.0.0 From bb6508df882fb0eac17adc59198b91c0c41d4a09 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 29 Feb 2024 08:51:18 -0800 Subject: [PATCH 326/448] API adjustments based on cupertino_http usage experience (#1141) * API adjustments based on cupertino_http usage experience * Update pkgs/http_profile/lib/http_profile.dart Co-authored-by: Derek Xu * Update pkgs/http_profile/lib/http_profile.dart Co-authored-by: Derek Xu * Update pkgs/http_profile/lib/http_profile.dart Co-authored-by: Derek Xu * Update pkgs/http_profile/lib/http_profile.dart Co-authored-by: Derek Xu * Update pkgs/http_profile/lib/http_profile.dart Co-authored-by: Derek Xu * Update pkgs/http_profile/lib/http_profile.dart Co-authored-by: Derek Xu * Update pkgs/http_profile/lib/http_profile.dart Co-authored-by: Derek Xu * Update pkgs/http_profile/lib/http_profile.dart Co-authored-by: Derek Xu * Unawaited --------- Co-authored-by: Derek Xu --- pkgs/http_profile/lib/http_profile.dart | 381 ++++++++++++------ pkgs/http_profile/test/close_test.dart | 115 ++++++ .../test/populating_profiles_test.dart | 153 ++++--- .../test/profiling_enabled_test.dart | 4 +- 4 files changed, 467 insertions(+), 186 deletions(-) create mode 100644 pkgs/http_profile/test/close_test.dart diff --git a/pkgs/http_profile/lib/http_profile.dart b/pkgs/http_profile/lib/http_profile.dart index b0b7a87677..768d161853 100644 --- a/pkgs/http_profile/lib/http_profile.dart +++ b/pkgs/http_profile/lib/http_profile.dart @@ -2,11 +2,59 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async' show StreamController, StreamSink; +import 'dart:async' show StreamController, StreamSink, unawaited; import 'dart:developer' show Service, addHttpClientProfilingData; import 'dart:io' show HttpClient, HttpClientResponseCompressionState; import 'dart:isolate' show Isolate; +/// "token" as defined in RFC 2616, 2.2 +/// See https://datatracker.ietf.org/doc/html/rfc2616#section-2.2 +const _tokenChars = r"!#$%&'*+\-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`" + 'abcdefghijklmnopqrstuvwxyz|~'; + +/// Splits comma-separated header values. +var _headerSplitter = RegExp(r'[ \t]*,[ \t]*'); + +/// Splits comma-separated "Set-Cookie" header values. +/// +/// Set-Cookie strings can contain commas. In particular, the following +/// productions defined in RFC-6265, section 4.1.1: +/// - e.g. "Expires=Sun, 06 Nov 1994 08:49:37 GMT" +/// - e.g. "Path=somepath," +/// - e.g. "AnyString,Really," +/// +/// Some values are ambiguous e.g. +/// "Set-Cookie: lang=en; Path=/foo/" +/// "Set-Cookie: SID=x23" +/// and: +/// "Set-Cookie: lang=en; Path=/foo/,SID=x23" +/// would both be result in `response.headers` => "lang=en; Path=/foo/,SID=x23" +/// +/// The idea behind this regex is that ",=" is more likely to +/// start a new then be part of or . +/// +/// See https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1 +var _setCookieSplitter = RegExp(r'[ \t]*,[ \t]*(?=[' + _tokenChars + r']+=)'); + +/// Splits comma-separated header values into a [List]. +/// +/// Copied from `package:http`. +Map> _splitHeaderValues(Map headers) { + var headersWithFieldLists = >{}; + headers.forEach((key, value) { + if (!value.contains(',')) { + headersWithFieldLists[key] = [value]; + } else { + if (key == 'set-cookie') { + headersWithFieldLists[key] = value.split(_setCookieSplitter); + } else { + headersWithFieldLists[key] = value.split(_headerSplitter); + } + } + }); + return headersWithFieldLists; +} + /// Describes an event related to an HTTP request. final class HttpProfileRequestEvent { final int _timestamp; @@ -71,9 +119,16 @@ class HttpProfileRedirectData { /// Describes details about an HTTP request. final class HttpProfileRequestData { final Map _data; - + final StreamController> _body = StreamController>(); + bool _isClosed = false; final void Function() _updated; + Map get _requestData => + _data['requestData'] as Map; + + /// The body of the request. + StreamSink> get bodySink => _body.sink; + /// Information about the networking connection used in the HTTP request. /// /// This information is meant to be used for debugging. @@ -82,6 +137,7 @@ final class HttpProfileRequestData { /// [String] or [int]. For example: /// { 'localPort': 1285, 'remotePort': 443, 'connectionPoolId': '21x23' } set connectionInfo(Map value) { + _checkAndUpdate(); for (final v in value.values) { if (!(v is String || v is int)) { throw ArgumentError( @@ -89,98 +145,146 @@ final class HttpProfileRequestData { ); } } - _data['connectionInfo'] = {...value}; - _updated(); + _requestData['connectionInfo'] = {...value}; } /// The content length of the request, in bytes. - set contentLength(int value) { - _data['contentLength'] = value; - _updated(); + set contentLength(int? value) { + _checkAndUpdate(); + if (value == null) { + _requestData.remove('contentLength'); + } else { + _requestData['contentLength'] = value; + } + } + + /// Whether automatic redirect following was enabled for the request. + set followRedirects(bool value) { + _checkAndUpdate(); + _requestData['followRedirects'] = value; } - /// The cookies presented to the server (in the 'cookie' header). + /// The request headers where duplicate headers are represented using a list + /// of values. /// - /// Usage example: + /// For example: /// /// ```dart - /// profile.requestData.cookies = [ - /// 'sessionId=abc123', - /// 'csrftoken=def456', - /// ]; + /// // Foo: Bar + /// // Foo: Baz + /// + /// profile?.requestData.headersListValues({'Foo', ['Bar', 'Baz']}); /// ``` - set cookies(List value) { - _data['cookies'] = [...value]; - _updated(); - } - - /// The error associated with a failed request. - set error(String value) { - _data['error'] = value; - _updated(); - } - - /// Whether automatic redirect following was enabled for the request. - set followRedirects(bool value) { - _data['followRedirects'] = value; - _updated(); + set headersListValues(Map>? value) { + _checkAndUpdate(); + if (value == null) { + _requestData.remove('headers'); + return; + } + _requestData['headers'] = {...value}; } - set headers(Map> value) { - _data['headers'] = {...value}; - _updated(); + /// The request headers where duplicate headers are represented using a + /// comma-separated list of values. + /// + /// For example: + /// + /// ```dart + /// // Foo: Bar + /// // Foo: Baz + /// + /// profile?.requestData.headersCommaValues({'Foo', 'Bar, Baz']}); + /// ``` + set headersCommaValues(Map? value) { + _checkAndUpdate(); + if (value == null) { + _requestData.remove('headers'); + return; + } + _requestData['headers'] = _splitHeaderValues(value); } /// The maximum number of redirects allowed during the request. set maxRedirects(int value) { - _data['maxRedirects'] = value; - _updated(); + _checkAndUpdate(); + _requestData['maxRedirects'] = value; } /// The requested persistent connection state. set persistentConnection(bool value) { - _data['persistentConnection'] = value; - _updated(); + _checkAndUpdate(); + _requestData['persistentConnection'] = value; } /// Proxy authentication details for the request. set proxyDetails(HttpProfileProxyData value) { - _data['proxyDetails'] = value._toJson(); - _updated(); + _checkAndUpdate(); + _requestData['proxyDetails'] = value._toJson(); } - const HttpProfileRequestData._( + HttpProfileRequestData._( this._data, this._updated, ); + + void _checkAndUpdate() { + if (_isClosed) { + throw StateError('HttpProfileResponseData has been closed, no further ' + 'updates are allowed'); + } + _updated(); + } + + /// Signal that the request, including the entire request body, has been + /// sent. + /// + /// [bodySink] will be closed and the fields of [HttpProfileRequestData] will + /// no longer be changeable. + /// + /// [endTime] is the time when the request was fully sent. It defaults to the + /// current time. + void close([DateTime? endTime]) { + _checkAndUpdate(); + _isClosed = true; + unawaited(bodySink.close()); + _data['requestEndTimestamp'] = + (endTime ?? DateTime.now()).microsecondsSinceEpoch; + } + + /// Signal that sending the request has failed with an error. + /// + /// [bodySink] will be closed and the fields of [HttpProfileRequestData] will + /// no longer be changeable. + /// + /// [value] is a textual description of the error e.g. 'host does not exist'. + /// + /// [endTime] is the time when the error occurred. It defaults to the current + /// time. + void closeWithError(String value, [DateTime? endTime]) { + _checkAndUpdate(); + _isClosed = true; + unawaited(bodySink.close()); + _requestData['error'] = value; + _data['requestEndTimestamp'] = + (endTime ?? DateTime.now()).microsecondsSinceEpoch; + } } /// Describes details about a response to an HTTP request. final class HttpProfileResponseData { + bool _isClosed = false; final Map _data; - final void Function() _updated; + final StreamController> _body = StreamController>(); /// Records a redirect that the connection went through. void addRedirect(HttpProfileRedirectData redirect) { + _checkAndUpdate(); (_data['redirects'] as List>).add(redirect._toJson()); - _updated(); } - /// The cookies set by the server (from the 'set-cookie' header). - /// - /// Usage example: - /// - /// ```dart - /// profile.responseData.cookies = [ - /// 'sessionId=abc123', - /// 'id=def456; Max-Age=2592000; Domain=example.com', - /// ]; - /// ``` - set cookies(List value) { - _data['cookies'] = [...value]; - _updated(); - } + /// The body of the response. + StreamSink> get bodySink => _body.sink; /// Information about the networking connection used in the HTTP response. /// @@ -190,6 +294,7 @@ final class HttpProfileResponseData { /// [String] or [int]. For example: /// { 'localPort': 1285, 'remotePort': 443, 'connectionPoolId': '21x23' } set connectionInfo(Map value) { + _checkAndUpdate(); for (final v in value.values) { if (!(v is String || v is int)) { throw ArgumentError( @@ -198,12 +303,46 @@ final class HttpProfileResponseData { } } _data['connectionInfo'] = {...value}; - _updated(); } - set headers(Map> value) { + /// The reponse headers where duplicate headers are represented using a list + /// of values. + /// + /// For example: + /// + /// ```dart + /// // Foo: Bar + /// // Foo: Baz + /// + /// profile?.requestData.headersListValues({'Foo', ['Bar', 'Baz']}); + /// ``` + set headersListValues(Map>? value) { + _checkAndUpdate(); + if (value == null) { + _data.remove('headers'); + return; + } _data['headers'] = {...value}; - _updated(); + } + + /// The response headers where duplicate headers are represented using a + /// comma-separated list of values. + /// + /// For example: + /// + /// ```dart + /// // Foo: Bar + /// // Foo: Baz + /// + /// profile?.responseData.headersCommaValues({'Foo', 'Bar, Baz']}); + /// ``` + set headersCommaValues(Map? value) { + _checkAndUpdate(); + if (value == null) { + _data.remove('headers'); + return; + } + _data['headers'] = _splitHeaderValues(value); } // The compression state of the response. @@ -212,55 +351,51 @@ final class HttpProfileResponseData { // received across the wire and whether callers will receive compressed or // uncompressed bytes when they listen to the response body byte stream. set compressionState(HttpClientResponseCompressionState value) { + _checkAndUpdate(); _data['compressionState'] = value.name; - _updated(); } - set reasonPhrase(String value) { - _data['reasonPhrase'] = value; - _updated(); + // The reason phrase associated with the response e.g. "OK". + set reasonPhrase(String? value) { + _checkAndUpdate(); + if (value == null) { + _data.remove('reasonPhrase'); + } else { + _data['reasonPhrase'] = value; + } } /// Whether the status code was one of the normal redirect codes. set isRedirect(bool value) { + _checkAndUpdate(); _data['isRedirect'] = value; - _updated(); } /// The persistent connection state returned by the server. set persistentConnection(bool value) { + _checkAndUpdate(); _data['persistentConnection'] = value; - _updated(); } /// The content length of the response body, in bytes. - set contentLength(int value) { - _data['contentLength'] = value; - _updated(); + set contentLength(int? value) { + _checkAndUpdate(); + if (value == null) { + _data.remove('contentLength'); + } else { + _data['contentLength'] = value; + } } set statusCode(int value) { + _checkAndUpdate(); _data['statusCode'] = value; - _updated(); } /// The time at which the initial response was received. set startTime(DateTime value) { + _checkAndUpdate(); _data['startTime'] = value.microsecondsSinceEpoch; - _updated(); - } - - /// The time at which the response was completed. Note that DevTools will not - /// consider the request to be complete until [endTime] is non-null. - set endTime(DateTime value) { - _data['endTime'] = value.microsecondsSinceEpoch; - _updated(); - } - - /// The error associated with a failed request. - set error(String value) { - _data['error'] = value; - _updated(); } HttpProfileResponseData._( @@ -269,6 +404,46 @@ final class HttpProfileResponseData { ) { _data['redirects'] = >[]; } + + void _checkAndUpdate() { + if (_isClosed) { + throw StateError('HttpProfileResponseData has been closed, no further ' + 'updates are allowed'); + } + _updated(); + } + + /// Signal that the response, including the entire response body, has been + /// received. + /// + /// [bodySink] will be closed and the fields of [HttpProfileResponseData] will + /// no longer be changeable. + /// + /// [endTime] is the time when the response was fully received. It defaults + /// to the current time. + void close([DateTime? endTime]) { + _checkAndUpdate(); + _isClosed = true; + unawaited(bodySink.close()); + _data['endTime'] = (endTime ?? DateTime.now()).microsecondsSinceEpoch; + } + + /// Signal that receiving the response has failed with an error. + /// + /// [bodySink] will be closed and the fields of [HttpProfileResponseData] will + /// no longer be changeable. + /// + /// [value] is a textual description of the error e.g. 'host does not exist'. + /// + /// [endTime] is the time when the error occurred. It defaults to the current + /// time. + void closeWithError(String value, [DateTime? endTime]) { + _checkAndUpdate(); + _isClosed = true; + unawaited(bodySink.close()); + _data['error'] = value; + _data['endTime'] = (endTime ?? DateTime.now()).microsecondsSinceEpoch; + } } /// A record of debugging information about an HTTP request. @@ -306,70 +481,42 @@ final class HttpClientRequestProfile { _updated(); } - /// The time at which the request was completed. Note that DevTools will not - /// consider the request to be complete until [requestEndTimestamp] is - /// non-null. - set requestEndTimestamp(DateTime value) { - _data['requestEndTimestamp'] = value.microsecondsSinceEpoch; - _updated(); - } - /// Details about the request. late final HttpProfileRequestData requestData; - final StreamController> _requestBody = - StreamController>(); - - /// The body of the request. - StreamSink> get requestBodySink { - _updated(); - return _requestBody.sink; - } - /// Details about the response. late final HttpProfileResponseData responseData; - final StreamController> _responseBody = - StreamController>(); - - /// The body of the response. - StreamSink> get responseBodySink { - _updated(); - return _responseBody.sink; - } - void _updated() => _data['_lastUpdateTime'] = DateTime.now().microsecondsSinceEpoch; HttpClientRequestProfile._({ - required DateTime requestStartTimestamp, + required DateTime requestStartTime, required String requestMethod, required String requestUri, }) { _data['isolateId'] = Service.getIsolateId(Isolate.current)!; - _data['requestStartTimestamp'] = - requestStartTimestamp.microsecondsSinceEpoch; + _data['requestStartTimestamp'] = requestStartTime.microsecondsSinceEpoch; _data['requestMethod'] = requestMethod; _data['requestUri'] = requestUri; _data['events'] = >[]; _data['requestData'] = {}; - requestData = HttpProfileRequestData._( - _data['requestData'] as Map, _updated); + requestData = HttpProfileRequestData._(_data, _updated); _data['responseData'] = {}; responseData = HttpProfileResponseData._( _data['responseData'] as Map, _updated); - _data['_requestBodyStream'] = _requestBody.stream; - _data['_responseBodyStream'] = _responseBody.stream; + _data['_requestBodyStream'] = requestData._body.stream; + _data['_responseBodyStream'] = responseData._body.stream; // This entry is needed to support the updatedSince parameter of // ext.dart.io.getHttpProfile. - _data['_lastUpdateTime'] = DateTime.now().microsecondsSinceEpoch; + _updated(); } /// If HTTP profiling is enabled, returns an [HttpClientRequestProfile], /// otherwise returns `null`. static HttpClientRequestProfile? profile({ /// The time at which the request was initiated. - required DateTime requestStartTimestamp, + required DateTime requestStartTime, /// The HTTP request method associated with the request. required String requestMethod, @@ -383,7 +530,7 @@ final class HttpClientRequestProfile { return null; } final requestProfile = HttpClientRequestProfile._( - requestStartTimestamp: requestStartTimestamp, + requestStartTime: requestStartTime, requestMethod: requestMethod, requestUri: requestUri, ); diff --git a/pkgs/http_profile/test/close_test.dart b/pkgs/http_profile/test/close_test.dart new file mode 100644 index 0000000000..8b468611b6 --- /dev/null +++ b/pkgs/http_profile/test/close_test.dart @@ -0,0 +1,115 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:developer' show getHttpClientProfilingData; + +import 'package:http_profile/http_profile.dart'; +import 'package:test/test.dart'; + +void main() { + late HttpClientRequestProfile profile; + late Map backingMap; + + setUp(() { + HttpClientRequestProfile.profilingEnabled = true; + + profile = HttpClientRequestProfile.profile( + requestStartTime: DateTime.parse('2024-03-21'), + requestMethod: 'GET', + requestUri: 'https://www.example.com', + )!; + + final profileBackingMaps = getHttpClientProfilingData(); + expect(profileBackingMaps.length, isPositive); + backingMap = profileBackingMaps.lastOrNull!; + }); + + group('requestData.close', () { + test('no arguments', () async { + expect(backingMap['requestEndTimestamp'], isNull); + profile.requestData.close(); + + expect( + backingMap['requestEndTimestamp'], + closeTo(DateTime.now().microsecondsSinceEpoch, + Duration.microsecondsPerSecond), + ); + }); + + test('with time', () async { + expect(backingMap['requestEndTimestamp'], isNull); + profile.requestData.close(DateTime.parse('2024-03-23')); + + expect( + backingMap['requestEndTimestamp'], + DateTime.parse('2024-03-23').microsecondsSinceEpoch, + ); + }); + + test('then write body', () async { + profile.requestData.close(); + + expect( + () => profile.requestData.bodySink.add([1, 2, 3]), + throwsStateError, + ); + }); + + test('then mutate', () async { + profile.requestData.close(); + + expect( + () => profile.requestData.contentLength = 5, + throwsStateError, + ); + }); + }); + + group('responseData.close', () { + late Map responseData; + + setUp(() { + responseData = backingMap['responseData'] as Map; + }); + + test('no arguments', () async { + expect(responseData['endTime'], isNull); + profile.responseData.close(); + + expect( + responseData['endTime'], + closeTo(DateTime.now().microsecondsSinceEpoch, + Duration.microsecondsPerSecond), + ); + }); + + test('with time', () async { + expect(responseData['endTime'], isNull); + profile.responseData.close(DateTime.parse('2024-03-23')); + + expect( + responseData['endTime'], + DateTime.parse('2024-03-23').microsecondsSinceEpoch, + ); + }); + + test('then write body', () async { + profile.responseData.close(); + + expect( + () => profile.responseData.bodySink.add([1, 2, 3]), + throwsStateError, + ); + }); + + test('then mutate', () async { + profile.responseData.close(); + + expect( + () => profile.responseData.contentLength = 5, + throwsStateError, + ); + }); + }); +} diff --git a/pkgs/http_profile/test/populating_profiles_test.dart b/pkgs/http_profile/test/populating_profiles_test.dart index a1cbbb4b30..63a92f1f25 100644 --- a/pkgs/http_profile/test/populating_profiles_test.dart +++ b/pkgs/http_profile/test/populating_profiles_test.dart @@ -18,7 +18,7 @@ void main() { HttpClientRequestProfile.profilingEnabled = true; profile = HttpClientRequestProfile.profile( - requestStartTimestamp: DateTime.parse('2024-03-21'), + requestStartTime: DateTime.parse('2024-03-21'), requestMethod: 'GET', requestUri: 'https://www.example.com', )!; @@ -61,8 +61,7 @@ void main() { test('populating HttpClientRequestProfile.requestEndTimestamp', () async { expect(backingMap['requestEndTimestamp'], isNull); - - profile.requestEndTimestamp = DateTime.parse('2024-03-23'); + profile.requestData.close(DateTime.parse('2024-03-23')); expect( backingMap['requestEndTimestamp'], @@ -98,26 +97,21 @@ void main() { expect(requestData['contentLength'], 1200); }); - test('populating HttpClientRequestProfile.requestData.cookies', () async { + test('HttpClientRequestProfile.requestData.contentLength = nil', () async { final requestData = backingMap['requestData'] as Map; - expect(requestData['cookies'], isNull); - profile.requestData.cookies = [ - 'sessionId=abc123', - 'csrftoken=def456', - ]; + profile.requestData.contentLength = 1200; + expect(requestData['contentLength'], 1200); - final cookies = requestData['cookies'] as List; - expect(cookies.length, 2); - expect(cookies[0], 'sessionId=abc123'); - expect(cookies[1], 'csrftoken=def456'); + profile.requestData.contentLength = null; + expect(requestData['contentLength'], isNull); }); test('populating HttpClientRequestProfile.requestData.error', () async { final requestData = backingMap['requestData'] as Map; expect(requestData['error'], isNull); - profile.requestData.error = 'failed'; + profile.requestData.closeWithError('failed'); expect(requestData['error'], 'failed'); }); @@ -132,17 +126,42 @@ void main() { expect(requestData['followRedirects'], true); }); - test('populating HttpClientRequestProfile.requestData.headers', () async { + test('populating HttpClientRequestProfile.requestData.headersListValues', + () async { final requestData = backingMap['requestData'] as Map; expect(requestData['headers'], isNull); - profile.requestData.headers = { + profile.requestData.headersListValues = { + 'fruit': ['apple', 'banana', 'grape'], 'content-length': ['0'], }; final headers = requestData['headers'] as Map>; - expect(headers['content-length']!.length, 1); - expect(headers['content-length']![0], '0'); + expect(headers, { + 'fruit': ['apple', 'banana', 'grape'], + 'content-length': ['0'], + }); + }); + + test('populating HttpClientRequestProfile.requestData.headersCommaValues', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['headers'], isNull); + + profile.requestData.headersCommaValues = { + 'set-cookie': + // ignore: missing_whitespace_between_adjacent_strings + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO,' + 'sessionId=e8bb43229de9; Domain=foo.example.com' + }; + + final headers = requestData['headers'] as Map>; + expect(headers, { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }); }); test('populating HttpClientRequestProfile.requestData.maxRedirects', @@ -205,21 +224,6 @@ void main() { expect(redirect['location'], 'https://images.example.com/1'); }); - test('populating HttpClientRequestProfile.responseData.cookies', () async { - final responseData = backingMap['responseData'] as Map; - expect(responseData['cookies'], isNull); - - profile.responseData.cookies = [ - 'sessionId=abc123', - 'id=def456; Max-Age=2592000; Domain=example.com', - ]; - - final cookies = responseData['cookies'] as List; - expect(cookies.length, 2); - expect(cookies[0], 'sessionId=abc123'); - expect(cookies[1], 'id=def456; Max-Age=2592000; Domain=example.com'); - }); - test('populating HttpClientRequestProfile.responseData.connectionInfo', () async { final responseData = backingMap['responseData'] as Map; @@ -238,24 +242,44 @@ void main() { expect(connectionInfo['connectionPoolId'], '21x23'); }); - test('populating HttpClientRequestProfile.responseData.headers', () async { + test('populating HttpClientRequestProfile.responseData.headersListValues', + () async { final responseData = backingMap['responseData'] as Map; expect(responseData['headers'], isNull); - profile.responseData.headers = { + profile.responseData.headersListValues = { 'connection': ['keep-alive'], 'cache-control': ['max-age=43200'], 'content-type': ['application/json', 'charset=utf-8'], }; final headers = responseData['headers'] as Map>; - expect(headers['connection']!.length, 1); - expect(headers['connection']![0], 'keep-alive'); - expect(headers['cache-control']!.length, 1); - expect(headers['cache-control']![0], 'max-age=43200'); - expect(headers['content-type']!.length, 2); - expect(headers['content-type']![0], 'application/json'); - expect(headers['content-type']![1], 'charset=utf-8'); + expect(headers, { + 'connection': ['keep-alive'], + 'cache-control': ['max-age=43200'], + 'content-type': ['application/json', 'charset=utf-8'], + }); + }); + + test('populating HttpClientRequestProfile.responseData.headersCommaValues', + () async { + final responseData = backingMap['responseData'] as Map; + expect(responseData['headers'], isNull); + + profile.responseData.headersCommaValues = { + 'set-cookie': + // ignore: missing_whitespace_between_adjacent_strings + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO,' + 'sessionId=e8bb43229de9; Domain=foo.example.com' + }; + + final headers = responseData['headers'] as Map>; + expect(headers, { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }); }); test('populating HttpClientRequestProfile.responseData.compressionState', @@ -308,6 +332,15 @@ void main() { expect(responseData['contentLength'], 1200); }); + test('HttpClientRequestProfile.responseData.contentLength = nil', () async { + final responseData = backingMap['responseData'] as Map; + profile.responseData.contentLength = 1200; + expect(responseData['contentLength'], 1200); + + profile.responseData.contentLength = null; + expect(responseData['contentLength'], isNull); + }); + test('populating HttpClientRequestProfile.responseData.statusCode', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['statusCode'], isNull); @@ -333,7 +366,7 @@ void main() { final responseData = backingMap['responseData'] as Map; expect(responseData['endTime'], isNull); - profile.responseData.endTime = DateTime.parse('2024-03-23'); + profile.responseData.close(DateTime.parse('2024-03-23')); expect( responseData['endTime'], @@ -345,7 +378,7 @@ void main() { final responseData = backingMap['responseData'] as Map; expect(responseData['error'], isNull); - profile.responseData.error = 'failed'; + profile.responseData.closeWithError('failed'); expect(responseData['error'], 'failed'); }); @@ -354,33 +387,19 @@ void main() { final requestBodyStream = backingMap['_requestBodyStream'] as Stream>; - profile.requestBodySink.add([1, 2, 3]); - - await Future.wait([ - Future.sync( - () async => expect( - await requestBodyStream.expand((i) => i).toList(), - [1, 2, 3], - ), - ), - profile.requestBodySink.close(), - ]); + profile.requestData.bodySink.add([1, 2, 3]); + profile.requestData.close(); + + expect(await requestBodyStream.expand((i) => i).toList(), [1, 2, 3]); }); test('using HttpClientRequestProfile.responseBodySink', () async { - final requestBodyStream = + final responseBodyStream = backingMap['_responseBodyStream'] as Stream>; - profile.responseBodySink.add([1, 2, 3]); - - await Future.wait([ - Future.sync( - () async => expect( - await requestBodyStream.expand((i) => i).toList(), - [1, 2, 3], - ), - ), - profile.responseBodySink.close(), - ]); + profile.responseData.bodySink.add([1, 2, 3]); + profile.responseData.close(); + + expect(await responseBodyStream.expand((i) => i).toList(), [1, 2, 3]); }); } diff --git a/pkgs/http_profile/test/profiling_enabled_test.dart b/pkgs/http_profile/test/profiling_enabled_test.dart index 3062c79719..7d9b63410f 100644 --- a/pkgs/http_profile/test/profiling_enabled_test.dart +++ b/pkgs/http_profile/test/profiling_enabled_test.dart @@ -13,7 +13,7 @@ void main() { expect(HttpClient.enableTimelineLogging, true); expect( HttpClientRequestProfile.profile( - requestStartTimestamp: DateTime.parse('2024-03-21'), + requestStartTime: DateTime.parse('2024-03-21'), requestMethod: 'GET', requestUri: 'https://www.example.com', ), @@ -26,7 +26,7 @@ void main() { expect(HttpClient.enableTimelineLogging, false); expect( HttpClientRequestProfile.profile( - requestStartTimestamp: DateTime.parse('2024-03-21'), + requestStartTime: DateTime.parse('2024-03-21'), requestMethod: 'GET', requestUri: 'https://www.example.com', ), From 1056f05974c70f25c982da770604b07150f1e463 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 29 Feb 2024 12:33:00 -0800 Subject: [PATCH 327/448] Split package:http_profile into multiple files (#1143) --- pkgs/http_profile/lib/http_profile.dart | 541 +----------------- .../lib/src/http_client_request_profile.dart | 113 ++++ pkgs/http_profile/lib/src/http_profile.dart | 14 + .../lib/src/http_profile_request_data.dart | 183 ++++++ .../lib/src/http_profile_response_data.dart | 202 +++++++ pkgs/http_profile/lib/src/utils.dart | 51 ++ .../http_client_request_profile_test.dart | 72 +++ .../test/http_profile_request_data_test.dart | 188 ++++++ ...t => http_profile_response_data_test.dart} | 181 +----- .../test/profiling_enabled_test.dart | 36 -- pkgs/http_profile/test/utils_test.dart | 74 +++ 11 files changed, 899 insertions(+), 756 deletions(-) create mode 100644 pkgs/http_profile/lib/src/http_client_request_profile.dart create mode 100644 pkgs/http_profile/lib/src/http_profile.dart create mode 100644 pkgs/http_profile/lib/src/http_profile_request_data.dart create mode 100644 pkgs/http_profile/lib/src/http_profile_response_data.dart create mode 100644 pkgs/http_profile/lib/src/utils.dart create mode 100644 pkgs/http_profile/test/http_client_request_profile_test.dart create mode 100644 pkgs/http_profile/test/http_profile_request_data_test.dart rename pkgs/http_profile/test/{populating_profiles_test.dart => http_profile_response_data_test.dart} (56%) delete mode 100644 pkgs/http_profile/test/profiling_enabled_test.dart create mode 100644 pkgs/http_profile/test/utils_test.dart diff --git a/pkgs/http_profile/lib/http_profile.dart b/pkgs/http_profile/lib/http_profile.dart index 768d161853..0a1c283f4d 100644 --- a/pkgs/http_profile/lib/http_profile.dart +++ b/pkgs/http_profile/lib/http_profile.dart @@ -1,540 +1 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'dart:async' show StreamController, StreamSink, unawaited; -import 'dart:developer' show Service, addHttpClientProfilingData; -import 'dart:io' show HttpClient, HttpClientResponseCompressionState; -import 'dart:isolate' show Isolate; - -/// "token" as defined in RFC 2616, 2.2 -/// See https://datatracker.ietf.org/doc/html/rfc2616#section-2.2 -const _tokenChars = r"!#$%&'*+\-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`" - 'abcdefghijklmnopqrstuvwxyz|~'; - -/// Splits comma-separated header values. -var _headerSplitter = RegExp(r'[ \t]*,[ \t]*'); - -/// Splits comma-separated "Set-Cookie" header values. -/// -/// Set-Cookie strings can contain commas. In particular, the following -/// productions defined in RFC-6265, section 4.1.1: -/// - e.g. "Expires=Sun, 06 Nov 1994 08:49:37 GMT" -/// - e.g. "Path=somepath," -/// - e.g. "AnyString,Really," -/// -/// Some values are ambiguous e.g. -/// "Set-Cookie: lang=en; Path=/foo/" -/// "Set-Cookie: SID=x23" -/// and: -/// "Set-Cookie: lang=en; Path=/foo/,SID=x23" -/// would both be result in `response.headers` => "lang=en; Path=/foo/,SID=x23" -/// -/// The idea behind this regex is that ",=" is more likely to -/// start a new then be part of or . -/// -/// See https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1 -var _setCookieSplitter = RegExp(r'[ \t]*,[ \t]*(?=[' + _tokenChars + r']+=)'); - -/// Splits comma-separated header values into a [List]. -/// -/// Copied from `package:http`. -Map> _splitHeaderValues(Map headers) { - var headersWithFieldLists = >{}; - headers.forEach((key, value) { - if (!value.contains(',')) { - headersWithFieldLists[key] = [value]; - } else { - if (key == 'set-cookie') { - headersWithFieldLists[key] = value.split(_setCookieSplitter); - } else { - headersWithFieldLists[key] = value.split(_headerSplitter); - } - } - }); - return headersWithFieldLists; -} - -/// Describes an event related to an HTTP request. -final class HttpProfileRequestEvent { - final int _timestamp; - final String _name; - - HttpProfileRequestEvent({required DateTime timestamp, required String name}) - : _timestamp = timestamp.microsecondsSinceEpoch, - _name = name; - - Map _toJson() => { - 'timestamp': _timestamp, - 'event': _name, - }; -} - -/// Describes proxy authentication details associated with an HTTP request. -final class HttpProfileProxyData { - final String? _host; - final String? _username; - final bool? _isDirect; - final int? _port; - - HttpProfileProxyData({ - String? host, - String? username, - bool? isDirect, - int? port, - }) : _host = host, - _username = username, - _isDirect = isDirect, - _port = port; - - Map _toJson() => { - if (_host != null) 'host': _host, - if (_username != null) 'username': _username, - if (_isDirect != null) 'isDirect': _isDirect, - if (_port != null) 'port': _port, - }; -} - -/// Describes a redirect that an HTTP connection went through. -class HttpProfileRedirectData { - final int _statusCode; - final String _method; - final String _location; - - HttpProfileRedirectData({ - required int statusCode, - required String method, - required String location, - }) : _statusCode = statusCode, - _method = method, - _location = location; - - Map _toJson() => { - 'statusCode': _statusCode, - 'method': _method, - 'location': _location, - }; -} - -/// Describes details about an HTTP request. -final class HttpProfileRequestData { - final Map _data; - final StreamController> _body = StreamController>(); - bool _isClosed = false; - final void Function() _updated; - - Map get _requestData => - _data['requestData'] as Map; - - /// The body of the request. - StreamSink> get bodySink => _body.sink; - - /// Information about the networking connection used in the HTTP request. - /// - /// This information is meant to be used for debugging. - /// - /// It can contain any arbitrary data as long as the values are of type - /// [String] or [int]. For example: - /// { 'localPort': 1285, 'remotePort': 443, 'connectionPoolId': '21x23' } - set connectionInfo(Map value) { - _checkAndUpdate(); - for (final v in value.values) { - if (!(v is String || v is int)) { - throw ArgumentError( - 'The values in connectionInfo must be of type String or int.', - ); - } - } - _requestData['connectionInfo'] = {...value}; - } - - /// The content length of the request, in bytes. - set contentLength(int? value) { - _checkAndUpdate(); - if (value == null) { - _requestData.remove('contentLength'); - } else { - _requestData['contentLength'] = value; - } - } - - /// Whether automatic redirect following was enabled for the request. - set followRedirects(bool value) { - _checkAndUpdate(); - _requestData['followRedirects'] = value; - } - - /// The request headers where duplicate headers are represented using a list - /// of values. - /// - /// For example: - /// - /// ```dart - /// // Foo: Bar - /// // Foo: Baz - /// - /// profile?.requestData.headersListValues({'Foo', ['Bar', 'Baz']}); - /// ``` - set headersListValues(Map>? value) { - _checkAndUpdate(); - if (value == null) { - _requestData.remove('headers'); - return; - } - _requestData['headers'] = {...value}; - } - - /// The request headers where duplicate headers are represented using a - /// comma-separated list of values. - /// - /// For example: - /// - /// ```dart - /// // Foo: Bar - /// // Foo: Baz - /// - /// profile?.requestData.headersCommaValues({'Foo', 'Bar, Baz']}); - /// ``` - set headersCommaValues(Map? value) { - _checkAndUpdate(); - if (value == null) { - _requestData.remove('headers'); - return; - } - _requestData['headers'] = _splitHeaderValues(value); - } - - /// The maximum number of redirects allowed during the request. - set maxRedirects(int value) { - _checkAndUpdate(); - _requestData['maxRedirects'] = value; - } - - /// The requested persistent connection state. - set persistentConnection(bool value) { - _checkAndUpdate(); - _requestData['persistentConnection'] = value; - } - - /// Proxy authentication details for the request. - set proxyDetails(HttpProfileProxyData value) { - _checkAndUpdate(); - _requestData['proxyDetails'] = value._toJson(); - } - - HttpProfileRequestData._( - this._data, - this._updated, - ); - - void _checkAndUpdate() { - if (_isClosed) { - throw StateError('HttpProfileResponseData has been closed, no further ' - 'updates are allowed'); - } - _updated(); - } - - /// Signal that the request, including the entire request body, has been - /// sent. - /// - /// [bodySink] will be closed and the fields of [HttpProfileRequestData] will - /// no longer be changeable. - /// - /// [endTime] is the time when the request was fully sent. It defaults to the - /// current time. - void close([DateTime? endTime]) { - _checkAndUpdate(); - _isClosed = true; - unawaited(bodySink.close()); - _data['requestEndTimestamp'] = - (endTime ?? DateTime.now()).microsecondsSinceEpoch; - } - - /// Signal that sending the request has failed with an error. - /// - /// [bodySink] will be closed and the fields of [HttpProfileRequestData] will - /// no longer be changeable. - /// - /// [value] is a textual description of the error e.g. 'host does not exist'. - /// - /// [endTime] is the time when the error occurred. It defaults to the current - /// time. - void closeWithError(String value, [DateTime? endTime]) { - _checkAndUpdate(); - _isClosed = true; - unawaited(bodySink.close()); - _requestData['error'] = value; - _data['requestEndTimestamp'] = - (endTime ?? DateTime.now()).microsecondsSinceEpoch; - } -} - -/// Describes details about a response to an HTTP request. -final class HttpProfileResponseData { - bool _isClosed = false; - final Map _data; - final void Function() _updated; - final StreamController> _body = StreamController>(); - - /// Records a redirect that the connection went through. - void addRedirect(HttpProfileRedirectData redirect) { - _checkAndUpdate(); - (_data['redirects'] as List>).add(redirect._toJson()); - } - - /// The body of the response. - StreamSink> get bodySink => _body.sink; - - /// Information about the networking connection used in the HTTP response. - /// - /// This information is meant to be used for debugging. - /// - /// It can contain any arbitrary data as long as the values are of type - /// [String] or [int]. For example: - /// { 'localPort': 1285, 'remotePort': 443, 'connectionPoolId': '21x23' } - set connectionInfo(Map value) { - _checkAndUpdate(); - for (final v in value.values) { - if (!(v is String || v is int)) { - throw ArgumentError( - 'The values in connectionInfo must be of type String or int.', - ); - } - } - _data['connectionInfo'] = {...value}; - } - - /// The reponse headers where duplicate headers are represented using a list - /// of values. - /// - /// For example: - /// - /// ```dart - /// // Foo: Bar - /// // Foo: Baz - /// - /// profile?.requestData.headersListValues({'Foo', ['Bar', 'Baz']}); - /// ``` - set headersListValues(Map>? value) { - _checkAndUpdate(); - if (value == null) { - _data.remove('headers'); - return; - } - _data['headers'] = {...value}; - } - - /// The response headers where duplicate headers are represented using a - /// comma-separated list of values. - /// - /// For example: - /// - /// ```dart - /// // Foo: Bar - /// // Foo: Baz - /// - /// profile?.responseData.headersCommaValues({'Foo', 'Bar, Baz']}); - /// ``` - set headersCommaValues(Map? value) { - _checkAndUpdate(); - if (value == null) { - _data.remove('headers'); - return; - } - _data['headers'] = _splitHeaderValues(value); - } - - // The compression state of the response. - // - // This specifies whether the response bytes were compressed when they were - // received across the wire and whether callers will receive compressed or - // uncompressed bytes when they listen to the response body byte stream. - set compressionState(HttpClientResponseCompressionState value) { - _checkAndUpdate(); - _data['compressionState'] = value.name; - } - - // The reason phrase associated with the response e.g. "OK". - set reasonPhrase(String? value) { - _checkAndUpdate(); - if (value == null) { - _data.remove('reasonPhrase'); - } else { - _data['reasonPhrase'] = value; - } - } - - /// Whether the status code was one of the normal redirect codes. - set isRedirect(bool value) { - _checkAndUpdate(); - _data['isRedirect'] = value; - } - - /// The persistent connection state returned by the server. - set persistentConnection(bool value) { - _checkAndUpdate(); - _data['persistentConnection'] = value; - } - - /// The content length of the response body, in bytes. - set contentLength(int? value) { - _checkAndUpdate(); - if (value == null) { - _data.remove('contentLength'); - } else { - _data['contentLength'] = value; - } - } - - set statusCode(int value) { - _checkAndUpdate(); - _data['statusCode'] = value; - } - - /// The time at which the initial response was received. - set startTime(DateTime value) { - _checkAndUpdate(); - _data['startTime'] = value.microsecondsSinceEpoch; - } - - HttpProfileResponseData._( - this._data, - this._updated, - ) { - _data['redirects'] = >[]; - } - - void _checkAndUpdate() { - if (_isClosed) { - throw StateError('HttpProfileResponseData has been closed, no further ' - 'updates are allowed'); - } - _updated(); - } - - /// Signal that the response, including the entire response body, has been - /// received. - /// - /// [bodySink] will be closed and the fields of [HttpProfileResponseData] will - /// no longer be changeable. - /// - /// [endTime] is the time when the response was fully received. It defaults - /// to the current time. - void close([DateTime? endTime]) { - _checkAndUpdate(); - _isClosed = true; - unawaited(bodySink.close()); - _data['endTime'] = (endTime ?? DateTime.now()).microsecondsSinceEpoch; - } - - /// Signal that receiving the response has failed with an error. - /// - /// [bodySink] will be closed and the fields of [HttpProfileResponseData] will - /// no longer be changeable. - /// - /// [value] is a textual description of the error e.g. 'host does not exist'. - /// - /// [endTime] is the time when the error occurred. It defaults to the current - /// time. - void closeWithError(String value, [DateTime? endTime]) { - _checkAndUpdate(); - _isClosed = true; - unawaited(bodySink.close()); - _data['error'] = value; - _data['endTime'] = (endTime ?? DateTime.now()).microsecondsSinceEpoch; - } -} - -/// A record of debugging information about an HTTP request. -final class HttpClientRequestProfile { - /// Whether HTTP profiling is enabled or not. - /// - /// The value can be changed programmatically or through the DevTools Network - /// UX. - static bool get profilingEnabled => HttpClient.enableTimelineLogging; - static set profilingEnabled(bool enabled) => - HttpClient.enableTimelineLogging = enabled; - - final _data = {}; - - /// Records an event related to the request. - /// - /// Usage example: - /// - /// ```dart - /// profile.addEvent( - /// HttpProfileRequestEvent( - /// timestamp: DateTime.now(), - /// name: "Connection Established", - /// ), - /// ); - /// profile.addEvent( - /// HttpProfileRequestEvent( - /// timestamp: DateTime.now(), - /// name: "Remote Disconnected", - /// ), - /// ); - /// ``` - void addEvent(HttpProfileRequestEvent event) { - (_data['events'] as List>).add(event._toJson()); - _updated(); - } - - /// Details about the request. - late final HttpProfileRequestData requestData; - - /// Details about the response. - late final HttpProfileResponseData responseData; - - void _updated() => - _data['_lastUpdateTime'] = DateTime.now().microsecondsSinceEpoch; - - HttpClientRequestProfile._({ - required DateTime requestStartTime, - required String requestMethod, - required String requestUri, - }) { - _data['isolateId'] = Service.getIsolateId(Isolate.current)!; - _data['requestStartTimestamp'] = requestStartTime.microsecondsSinceEpoch; - _data['requestMethod'] = requestMethod; - _data['requestUri'] = requestUri; - _data['events'] = >[]; - _data['requestData'] = {}; - requestData = HttpProfileRequestData._(_data, _updated); - _data['responseData'] = {}; - responseData = HttpProfileResponseData._( - _data['responseData'] as Map, _updated); - _data['_requestBodyStream'] = requestData._body.stream; - _data['_responseBodyStream'] = responseData._body.stream; - // This entry is needed to support the updatedSince parameter of - // ext.dart.io.getHttpProfile. - _updated(); - } - - /// If HTTP profiling is enabled, returns an [HttpClientRequestProfile], - /// otherwise returns `null`. - static HttpClientRequestProfile? profile({ - /// The time at which the request was initiated. - required DateTime requestStartTime, - - /// The HTTP request method associated with the request. - required String requestMethod, - - /// The URI to which the request was sent. - required String requestUri, - }) { - // Always return `null` in product mode so that the profiling code can be - // tree shaken away. - if (const bool.fromEnvironment('dart.vm.product') || !profilingEnabled) { - return null; - } - final requestProfile = HttpClientRequestProfile._( - requestStartTime: requestStartTime, - requestMethod: requestMethod, - requestUri: requestUri, - ); - addHttpClientProfilingData(requestProfile._data); - return requestProfile; - } -} +export 'src/http_profile.dart'; diff --git a/pkgs/http_profile/lib/src/http_client_request_profile.dart b/pkgs/http_profile/lib/src/http_client_request_profile.dart new file mode 100644 index 0000000000..ffa8ac5ebb --- /dev/null +++ b/pkgs/http_profile/lib/src/http_client_request_profile.dart @@ -0,0 +1,113 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +part of 'http_profile.dart'; + +/// Describes an event related to an HTTP request. +final class HttpProfileRequestEvent { + final int _timestamp; + final String _name; + + HttpProfileRequestEvent({required DateTime timestamp, required String name}) + : _timestamp = timestamp.microsecondsSinceEpoch, + _name = name; + + Map _toJson() => { + 'timestamp': _timestamp, + 'event': _name, + }; +} + +/// A record of debugging information about an HTTP request. +final class HttpClientRequestProfile { + /// Whether HTTP profiling is enabled or not. + /// + /// The value can be changed programmatically or through the DevTools Network + /// UX. + static bool get profilingEnabled => HttpClient.enableTimelineLogging; + static set profilingEnabled(bool enabled) => + HttpClient.enableTimelineLogging = enabled; + + final _data = {}; + + /// Records an event related to the request. + /// + /// Usage example: + /// + /// ```dart + /// profile.addEvent( + /// HttpProfileRequestEvent( + /// timestamp: DateTime.now(), + /// name: "Connection Established", + /// ), + /// ); + /// profile.addEvent( + /// HttpProfileRequestEvent( + /// timestamp: DateTime.now(), + /// name: "Remote Disconnected", + /// ), + /// ); + /// ``` + void addEvent(HttpProfileRequestEvent event) { + (_data['events'] as List>).add(event._toJson()); + _updated(); + } + + /// Details about the request. + late final HttpProfileRequestData requestData; + + /// Details about the response. + late final HttpProfileResponseData responseData; + + void _updated() => + _data['_lastUpdateTime'] = DateTime.now().microsecondsSinceEpoch; + + HttpClientRequestProfile._({ + required DateTime requestStartTime, + required String requestMethod, + required String requestUri, + }) { + _data['isolateId'] = Service.getIsolateId(Isolate.current)!; + _data['requestStartTimestamp'] = requestStartTime.microsecondsSinceEpoch; + _data['requestMethod'] = requestMethod; + _data['requestUri'] = requestUri; + _data['events'] = >[]; + _data['requestData'] = {}; + requestData = HttpProfileRequestData._(_data, _updated); + _data['responseData'] = {}; + responseData = HttpProfileResponseData._( + _data['responseData'] as Map, _updated); + _data['_requestBodyStream'] = requestData._body.stream; + _data['_responseBodyStream'] = responseData._body.stream; + // This entry is needed to support the updatedSince parameter of + // ext.dart.io.getHttpProfile. + _updated(); + } + + /// If HTTP profiling is enabled, returns an [HttpClientRequestProfile], + /// otherwise returns `null`. + static HttpClientRequestProfile? profile({ + /// The time at which the request was initiated. + required DateTime requestStartTime, + + /// The HTTP request method associated with the request. + required String requestMethod, + + /// The URI to which the request was sent. + required String requestUri, + }) { + // Always return `null` in product mode so that the profiling code can be + // tree shaken away. + if (const bool.fromEnvironment('dart.vm.product') || !profilingEnabled) { + return null; + } + final requestProfile = HttpClientRequestProfile._( + requestStartTime: requestStartTime, + requestMethod: requestMethod, + requestUri: requestUri, + ); + addHttpClientProfilingData(requestProfile._data); + return requestProfile; + } +} diff --git a/pkgs/http_profile/lib/src/http_profile.dart b/pkgs/http_profile/lib/src/http_profile.dart new file mode 100644 index 0000000000..bca3bfd310 --- /dev/null +++ b/pkgs/http_profile/lib/src/http_profile.dart @@ -0,0 +1,14 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:developer' show Service, addHttpClientProfilingData; +import 'dart:io' show HttpClient, HttpClientResponseCompressionState; +import 'dart:isolate' show Isolate; + +import 'utils.dart'; + +part 'http_client_request_profile.dart'; +part 'http_profile_request_data.dart'; +part 'http_profile_response_data.dart'; diff --git a/pkgs/http_profile/lib/src/http_profile_request_data.dart b/pkgs/http_profile/lib/src/http_profile_request_data.dart new file mode 100644 index 0000000000..6c5aeb19a9 --- /dev/null +++ b/pkgs/http_profile/lib/src/http_profile_request_data.dart @@ -0,0 +1,183 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +part of 'http_profile.dart'; + +final class HttpProfileProxyData { + final String? _host; + final String? _username; + final bool? _isDirect; + final int? _port; + + HttpProfileProxyData({ + String? host, + String? username, + bool? isDirect, + int? port, + }) : _host = host, + _username = username, + _isDirect = isDirect, + _port = port; + + Map _toJson() => { + if (_host != null) 'host': _host, + if (_username != null) 'username': _username, + if (_isDirect != null) 'isDirect': _isDirect, + if (_port != null) 'port': _port, + }; +} + +/// Describes details about an HTTP request. +final class HttpProfileRequestData { + final Map _data; + final StreamController> _body = StreamController>(); + bool _isClosed = false; + final void Function() _updated; + + Map get _requestData => + _data['requestData'] as Map; + + /// The body of the request. + StreamSink> get bodySink => _body.sink; + + /// Information about the networking connection used in the HTTP request. + /// + /// This information is meant to be used for debugging. + /// + /// It can contain any arbitrary data as long as the values are of type + /// [String] or [int]. For example: + /// { 'localPort': 1285, 'remotePort': 443, 'connectionPoolId': '21x23' } + set connectionInfo(Map value) { + _checkAndUpdate(); + for (final v in value.values) { + if (!(v is String || v is int)) { + throw ArgumentError( + 'The values in connectionInfo must be of type String or int.', + ); + } + } + _requestData['connectionInfo'] = {...value}; + } + + /// The content length of the request, in bytes. + set contentLength(int? value) { + _checkAndUpdate(); + if (value == null) { + _requestData.remove('contentLength'); + } else { + _requestData['contentLength'] = value; + } + } + + /// Whether automatic redirect following was enabled for the request. + set followRedirects(bool value) { + _checkAndUpdate(); + _requestData['followRedirects'] = value; + } + + /// The request headers where duplicate headers are represented using a list + /// of values. + /// + /// For example: + /// + /// ```dart + /// // Foo: Bar + /// // Foo: Baz + /// + /// profile?.requestData.headersListValues({'Foo', ['Bar', 'Baz']}); + /// ``` + set headersListValues(Map>? value) { + _checkAndUpdate(); + if (value == null) { + _requestData.remove('headers'); + return; + } + _requestData['headers'] = {...value}; + } + + /// The request headers where duplicate headers are represented using a + /// comma-separated list of values. + /// + /// For example: + /// + /// ```dart + /// // Foo: Bar + /// // Foo: Baz + /// + /// profile?.requestData.headersCommaValues({'Foo', 'Bar, Baz']}); + /// ``` + set headersCommaValues(Map? value) { + _checkAndUpdate(); + if (value == null) { + _requestData.remove('headers'); + return; + } + _requestData['headers'] = splitHeaderValues(value); + } + + /// The maximum number of redirects allowed during the request. + set maxRedirects(int value) { + _checkAndUpdate(); + _requestData['maxRedirects'] = value; + } + + /// The requested persistent connection state. + set persistentConnection(bool value) { + _checkAndUpdate(); + _requestData['persistentConnection'] = value; + } + + /// Proxy authentication details for the request. + set proxyDetails(HttpProfileProxyData value) { + _checkAndUpdate(); + _requestData['proxyDetails'] = value._toJson(); + } + + HttpProfileRequestData._( + this._data, + this._updated, + ); + + void _checkAndUpdate() { + if (_isClosed) { + throw StateError('HttpProfileResponseData has been closed, no further ' + 'updates are allowed'); + } + _updated(); + } + + /// Signal that the request, including the entire request body, has been + /// sent. + /// + /// [bodySink] will be closed and the fields of [HttpProfileRequestData] will + /// no longer be changeable. + /// + /// [endTime] is the time when the request was fully sent. It defaults to the + /// current time. + void close([DateTime? endTime]) { + _checkAndUpdate(); + _isClosed = true; + unawaited(bodySink.close()); + _data['requestEndTimestamp'] = + (endTime ?? DateTime.now()).microsecondsSinceEpoch; + } + + /// Signal that sending the request has failed with an error. + /// + /// [bodySink] will be closed and the fields of [HttpProfileRequestData] will + /// no longer be changeable. + /// + /// [value] is a textual description of the error e.g. 'host does not exist'. + /// + /// [endTime] is the time when the error occurred. It defaults to the current + /// time. + void closeWithError(String value, [DateTime? endTime]) { + _checkAndUpdate(); + _isClosed = true; + unawaited(bodySink.close()); + _requestData['error'] = value; + _data['requestEndTimestamp'] = + (endTime ?? DateTime.now()).microsecondsSinceEpoch; + } +} diff --git a/pkgs/http_profile/lib/src/http_profile_response_data.dart b/pkgs/http_profile/lib/src/http_profile_response_data.dart new file mode 100644 index 0000000000..ee0720cfa2 --- /dev/null +++ b/pkgs/http_profile/lib/src/http_profile_response_data.dart @@ -0,0 +1,202 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +part of 'http_profile.dart'; + +/// Describes a redirect that an HTTP connection went through. +class HttpProfileRedirectData { + final int _statusCode; + final String _method; + final String _location; + + HttpProfileRedirectData({ + required int statusCode, + required String method, + required String location, + }) : _statusCode = statusCode, + _method = method, + _location = location; + + Map _toJson() => { + 'statusCode': _statusCode, + 'method': _method, + 'location': _location, + }; +} + +/// Describes details about a response to an HTTP request. +final class HttpProfileResponseData { + bool _isClosed = false; + final Map _data; + final void Function() _updated; + final StreamController> _body = StreamController>(); + + /// Records a redirect that the connection went through. + void addRedirect(HttpProfileRedirectData redirect) { + _checkAndUpdate(); + (_data['redirects'] as List>).add(redirect._toJson()); + } + + /// The body of the response. + StreamSink> get bodySink => _body.sink; + + /// Information about the networking connection used in the HTTP response. + /// + /// This information is meant to be used for debugging. + /// + /// It can contain any arbitrary data as long as the values are of type + /// [String] or [int]. For example: + /// { 'localPort': 1285, 'remotePort': 443, 'connectionPoolId': '21x23' } + set connectionInfo(Map value) { + _checkAndUpdate(); + for (final v in value.values) { + if (!(v is String || v is int)) { + throw ArgumentError( + 'The values in connectionInfo must be of type String or int.', + ); + } + } + _data['connectionInfo'] = {...value}; + } + + /// The reponse headers where duplicate headers are represented using a list + /// of values. + /// + /// For example: + /// + /// ```dart + /// // Foo: Bar + /// // Foo: Baz + /// + /// profile?.requestData.headersListValues({'Foo', ['Bar', 'Baz']}); + /// ``` + set headersListValues(Map>? value) { + _checkAndUpdate(); + if (value == null) { + _data.remove('headers'); + return; + } + _data['headers'] = {...value}; + } + + /// The response headers where duplicate headers are represented using a + /// comma-separated list of values. + /// + /// For example: + /// + /// ```dart + /// // Foo: Bar + /// // Foo: Baz + /// + /// profile?.responseData.headersCommaValues({'Foo', 'Bar, Baz']}); + /// ``` + set headersCommaValues(Map? value) { + _checkAndUpdate(); + if (value == null) { + _data.remove('headers'); + return; + } + _data['headers'] = splitHeaderValues(value); + } + + // The compression state of the response. + // + // This specifies whether the response bytes were compressed when they were + // received across the wire and whether callers will receive compressed or + // uncompressed bytes when they listen to the response body byte stream. + set compressionState(HttpClientResponseCompressionState value) { + _checkAndUpdate(); + _data['compressionState'] = value.name; + } + + // The reason phrase associated with the response e.g. "OK". + set reasonPhrase(String? value) { + _checkAndUpdate(); + if (value == null) { + _data.remove('reasonPhrase'); + } else { + _data['reasonPhrase'] = value; + } + } + + /// Whether the status code was one of the normal redirect codes. + set isRedirect(bool value) { + _checkAndUpdate(); + _data['isRedirect'] = value; + } + + /// The persistent connection state returned by the server. + set persistentConnection(bool value) { + _checkAndUpdate(); + _data['persistentConnection'] = value; + } + + /// The content length of the response body, in bytes. + set contentLength(int? value) { + _checkAndUpdate(); + if (value == null) { + _data.remove('contentLength'); + } else { + _data['contentLength'] = value; + } + } + + set statusCode(int value) { + _checkAndUpdate(); + _data['statusCode'] = value; + } + + /// The time at which the initial response was received. + set startTime(DateTime value) { + _checkAndUpdate(); + _data['startTime'] = value.microsecondsSinceEpoch; + } + + HttpProfileResponseData._( + this._data, + this._updated, + ) { + _data['redirects'] = >[]; + } + + void _checkAndUpdate() { + if (_isClosed) { + throw StateError('HttpProfileResponseData has been closed, no further ' + 'updates are allowed'); + } + _updated(); + } + + /// Signal that the response, including the entire response body, has been + /// received. + /// + /// [bodySink] will be closed and the fields of [HttpProfileResponseData] will + /// no longer be changeable. + /// + /// [endTime] is the time when the response was fully received. It defaults + /// to the current time. + void close([DateTime? endTime]) { + _checkAndUpdate(); + _isClosed = true; + unawaited(bodySink.close()); + _data['endTime'] = (endTime ?? DateTime.now()).microsecondsSinceEpoch; + } + + /// Signal that receiving the response has failed with an error. + /// + /// [bodySink] will be closed and the fields of [HttpProfileResponseData] will + /// no longer be changeable. + /// + /// [value] is a textual description of the error e.g. 'host does not exist'. + /// + /// [endTime] is the time when the error occurred. It defaults to the current + /// time. + void closeWithError(String value, [DateTime? endTime]) { + _checkAndUpdate(); + _isClosed = true; + unawaited(bodySink.close()); + _data['error'] = value; + _data['endTime'] = (endTime ?? DateTime.now()).microsecondsSinceEpoch; + } +} diff --git a/pkgs/http_profile/lib/src/utils.dart b/pkgs/http_profile/lib/src/utils.dart new file mode 100644 index 0000000000..0225f87f39 --- /dev/null +++ b/pkgs/http_profile/lib/src/utils.dart @@ -0,0 +1,51 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// "token" as defined in RFC 2616, 2.2 +/// See https://datatracker.ietf.org/doc/html/rfc2616#section-2.2 +const _tokenChars = r"!#$%&'*+\-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`" + 'abcdefghijklmnopqrstuvwxyz|~'; + +/// Splits comma-separated header values. +var _headerSplitter = RegExp(r'[ \t]*,[ \t]*'); + +/// Splits comma-separated "Set-Cookie" header values. +/// +/// Set-Cookie strings can contain commas. In particular, the following +/// productions defined in RFC-6265, section 4.1.1: +/// - e.g. "Expires=Sun, 06 Nov 1994 08:49:37 GMT" +/// - e.g. "Path=somepath," +/// - e.g. "AnyString,Really," +/// +/// Some values are ambiguous e.g. +/// "Set-Cookie: lang=en; Path=/foo/" +/// "Set-Cookie: SID=x23" +/// and: +/// "Set-Cookie: lang=en; Path=/foo/,SID=x23" +/// would both be result in `response.headers` => "lang=en; Path=/foo/,SID=x23" +/// +/// The idea behind this regex is that ",=" is more likely to +/// start a new then be part of or . +/// +/// See https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1 +var _setCookieSplitter = RegExp(r'[ \t]*,[ \t]*(?=[' + _tokenChars + r']+=)'); + +/// Splits comma-separated header values into a [List]. +/// +/// Copied from `package:http`. +Map> splitHeaderValues(Map headers) { + var headersWithFieldLists = >{}; + headers.forEach((key, value) { + if (!value.contains(',')) { + headersWithFieldLists[key] = [value]; + } else { + if (key == 'set-cookie') { + headersWithFieldLists[key] = value.split(_setCookieSplitter); + } else { + headersWithFieldLists[key] = value.split(_headerSplitter); + } + } + }); + return headersWithFieldLists; +} diff --git a/pkgs/http_profile/test/http_client_request_profile_test.dart b/pkgs/http_profile/test/http_client_request_profile_test.dart new file mode 100644 index 0000000000..6776db8a29 --- /dev/null +++ b/pkgs/http_profile/test/http_client_request_profile_test.dart @@ -0,0 +1,72 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:developer'; +import 'dart:io'; + +import 'package:http_profile/src/http_profile.dart'; +import 'package:test/test.dart'; + +void main() { + late HttpClientRequestProfile profile; + late Map backingMap; + + setUp(() { + HttpClientRequestProfile.profilingEnabled = true; + + profile = HttpClientRequestProfile.profile( + requestStartTime: DateTime.parse('2024-03-21'), + requestMethod: 'GET', + requestUri: 'https://www.example.com', + )!; + + final profileBackingMaps = getHttpClientProfilingData(); + expect(profileBackingMaps.length, isPositive); + backingMap = profileBackingMaps.lastOrNull!; + }); + + test('profiling enabled', () async { + HttpClientRequestProfile.profilingEnabled = true; + expect(HttpClient.enableTimelineLogging, true); + expect( + HttpClientRequestProfile.profile( + requestStartTime: DateTime.parse('2024-03-21'), + requestMethod: 'GET', + requestUri: 'https://www.example.com', + ), + isNotNull, + ); + }); + + test('profiling disabled', () async { + HttpClientRequestProfile.profilingEnabled = false; + expect(HttpClient.enableTimelineLogging, false); + expect( + HttpClientRequestProfile.profile( + requestStartTime: DateTime.parse('2024-03-21'), + requestMethod: 'GET', + requestUri: 'https://www.example.com', + ), + isNull, + ); + }); + + test('calling HttpClientRequestProfile.addEvent', () async { + final events = backingMap['events'] as List>; + expect(events, isEmpty); + + profile.addEvent(HttpProfileRequestEvent( + timestamp: DateTime.parse('2024-03-22'), + name: 'an event', + )); + + expect(events.length, 1); + final event = events.last; + expect( + event['timestamp'], + DateTime.parse('2024-03-22').microsecondsSinceEpoch, + ); + expect(event['event'], 'an event'); + }); +} diff --git a/pkgs/http_profile/test/http_profile_request_data_test.dart b/pkgs/http_profile/test/http_profile_request_data_test.dart new file mode 100644 index 0000000000..4a0c13e9b4 --- /dev/null +++ b/pkgs/http_profile/test/http_profile_request_data_test.dart @@ -0,0 +1,188 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:developer' show Service, getHttpClientProfilingData; +import 'dart:isolate' show Isolate; + +import 'package:http_profile/http_profile.dart'; +import 'package:test/test.dart'; + +void main() { + late HttpClientRequestProfile profile; + late Map backingMap; + + setUp(() { + HttpClientRequestProfile.profilingEnabled = true; + + profile = HttpClientRequestProfile.profile( + requestStartTime: DateTime.parse('2024-03-21'), + requestMethod: 'GET', + requestUri: 'https://www.example.com', + )!; + + final profileBackingMaps = getHttpClientProfilingData(); + expect(profileBackingMaps.length, isPositive); + backingMap = profileBackingMaps.lastOrNull!; + }); + + test( + 'mandatory fields are populated when an HttpClientRequestProfile is ' + 'constructed', () async { + expect(backingMap['id'], isNotNull); + expect(backingMap['isolateId'], Service.getIsolateId(Isolate.current)!); + expect( + backingMap['requestStartTimestamp'], + DateTime.parse('2024-03-21').microsecondsSinceEpoch, + ); + expect(backingMap['requestMethod'], 'GET'); + expect(backingMap['requestUri'], 'https://www.example.com'); + }); + + test('populating HttpClientRequestProfile.requestEndTimestamp', () async { + expect(backingMap['requestEndTimestamp'], isNull); + profile.requestData.close(DateTime.parse('2024-03-23')); + + expect( + backingMap['requestEndTimestamp'], + DateTime.parse('2024-03-23').microsecondsSinceEpoch, + ); + }); + + test('populating HttpClientRequestProfile.requestData.connectionInfo', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['connectionInfo'], isNull); + + profile.requestData.connectionInfo = { + 'localPort': 1285, + 'remotePort': 443, + 'connectionPoolId': '21x23' + }; + + final connectionInfo = + requestData['connectionInfo'] as Map; + expect(connectionInfo['localPort'], 1285); + expect(connectionInfo['remotePort'], 443); + expect(connectionInfo['connectionPoolId'], '21x23'); + }); + + test('populating HttpClientRequestProfile.requestData.contentLength', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['contentLength'], isNull); + + profile.requestData.contentLength = 1200; + + expect(requestData['contentLength'], 1200); + }); + + test('HttpClientRequestProfile.requestData.contentLength = nil', () async { + final requestData = backingMap['requestData'] as Map; + + profile.requestData.contentLength = 1200; + expect(requestData['contentLength'], 1200); + + profile.requestData.contentLength = null; + expect(requestData['contentLength'], isNull); + }); + + test('populating HttpClientRequestProfile.requestData.error', () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['error'], isNull); + + profile.requestData.closeWithError('failed'); + + expect(requestData['error'], 'failed'); + }); + + test('populating HttpClientRequestProfile.requestData.followRedirects', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['followRedirects'], isNull); + + profile.requestData.followRedirects = true; + + expect(requestData['followRedirects'], true); + }); + + test('populating HttpClientRequestProfile.requestData.headersListValues', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['headers'], isNull); + + profile.requestData.headersListValues = { + 'fruit': ['apple', 'banana', 'grape'], + 'content-length': ['0'], + }; + + final headers = requestData['headers'] as Map>; + expect(headers, { + 'fruit': ['apple', 'banana', 'grape'], + 'content-length': ['0'], + }); + }); + + test('populating HttpClientRequestProfile.requestData.headersCommaValues', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['headers'], isNull); + + profile.requestData.headersCommaValues = { + 'set-cookie': + // ignore: missing_whitespace_between_adjacent_strings + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO,' + 'sessionId=e8bb43229de9; Domain=foo.example.com' + }; + + final headers = requestData['headers'] as Map>; + expect(headers, { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }); + }); + + test('populating HttpClientRequestProfile.requestData.maxRedirects', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['maxRedirects'], isNull); + + profile.requestData.maxRedirects = 5; + + expect(requestData['maxRedirects'], 5); + }); + + test('populating HttpClientRequestProfile.requestData.persistentConnection', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['persistentConnection'], isNull); + + profile.requestData.persistentConnection = true; + + expect(requestData['persistentConnection'], true); + }); + + test('populating HttpClientRequestProfile.requestData.proxyDetails', + () async { + final requestData = backingMap['requestData'] as Map; + expect(requestData['proxyDetails'], isNull); + + profile.requestData.proxyDetails = HttpProfileProxyData( + host: 'https://www.example.com', + username: 'abc123', + isDirect: true, + port: 4321, + ); + + final proxyDetails = requestData['proxyDetails'] as Map; + expect( + proxyDetails['host'], + 'https://www.example.com', + ); + expect(proxyDetails['username'], 'abc123'); + expect(proxyDetails['isDirect'], true); + expect(proxyDetails['port'], 4321); + }); +} diff --git a/pkgs/http_profile/test/populating_profiles_test.dart b/pkgs/http_profile/test/http_profile_response_data_test.dart similarity index 56% rename from pkgs/http_profile/test/populating_profiles_test.dart rename to pkgs/http_profile/test/http_profile_response_data_test.dart index 63a92f1f25..625c097664 100644 --- a/pkgs/http_profile/test/populating_profiles_test.dart +++ b/pkgs/http_profile/test/http_profile_response_data_test.dart @@ -3,9 +3,8 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; -import 'dart:developer' show Service, getHttpClientProfilingData; +import 'dart:developer' show getHttpClientProfilingData; import 'dart:io'; -import 'dart:isolate' show Isolate; import 'package:http_profile/http_profile.dart'; import 'package:test/test.dart'; @@ -28,184 +27,6 @@ void main() { backingMap = profileBackingMaps.lastOrNull!; }); - test( - 'mandatory fields are populated when an HttpClientRequestProfile is ' - 'constructed', () async { - expect(backingMap['id'], isNotNull); - expect(backingMap['isolateId'], Service.getIsolateId(Isolate.current)!); - expect( - backingMap['requestStartTimestamp'], - DateTime.parse('2024-03-21').microsecondsSinceEpoch, - ); - expect(backingMap['requestMethod'], 'GET'); - expect(backingMap['requestUri'], 'https://www.example.com'); - }); - - test('calling HttpClientRequestProfile.addEvent', () async { - final events = backingMap['events'] as List>; - expect(events, isEmpty); - - profile.addEvent(HttpProfileRequestEvent( - timestamp: DateTime.parse('2024-03-22'), - name: 'an event', - )); - - expect(events.length, 1); - final event = events.last; - expect( - event['timestamp'], - DateTime.parse('2024-03-22').microsecondsSinceEpoch, - ); - expect(event['event'], 'an event'); - }); - - test('populating HttpClientRequestProfile.requestEndTimestamp', () async { - expect(backingMap['requestEndTimestamp'], isNull); - profile.requestData.close(DateTime.parse('2024-03-23')); - - expect( - backingMap['requestEndTimestamp'], - DateTime.parse('2024-03-23').microsecondsSinceEpoch, - ); - }); - - test('populating HttpClientRequestProfile.requestData.connectionInfo', - () async { - final requestData = backingMap['requestData'] as Map; - expect(requestData['connectionInfo'], isNull); - - profile.requestData.connectionInfo = { - 'localPort': 1285, - 'remotePort': 443, - 'connectionPoolId': '21x23' - }; - - final connectionInfo = - requestData['connectionInfo'] as Map; - expect(connectionInfo['localPort'], 1285); - expect(connectionInfo['remotePort'], 443); - expect(connectionInfo['connectionPoolId'], '21x23'); - }); - - test('populating HttpClientRequestProfile.requestData.contentLength', - () async { - final requestData = backingMap['requestData'] as Map; - expect(requestData['contentLength'], isNull); - - profile.requestData.contentLength = 1200; - - expect(requestData['contentLength'], 1200); - }); - - test('HttpClientRequestProfile.requestData.contentLength = nil', () async { - final requestData = backingMap['requestData'] as Map; - - profile.requestData.contentLength = 1200; - expect(requestData['contentLength'], 1200); - - profile.requestData.contentLength = null; - expect(requestData['contentLength'], isNull); - }); - - test('populating HttpClientRequestProfile.requestData.error', () async { - final requestData = backingMap['requestData'] as Map; - expect(requestData['error'], isNull); - - profile.requestData.closeWithError('failed'); - - expect(requestData['error'], 'failed'); - }); - - test('populating HttpClientRequestProfile.requestData.followRedirects', - () async { - final requestData = backingMap['requestData'] as Map; - expect(requestData['followRedirects'], isNull); - - profile.requestData.followRedirects = true; - - expect(requestData['followRedirects'], true); - }); - - test('populating HttpClientRequestProfile.requestData.headersListValues', - () async { - final requestData = backingMap['requestData'] as Map; - expect(requestData['headers'], isNull); - - profile.requestData.headersListValues = { - 'fruit': ['apple', 'banana', 'grape'], - 'content-length': ['0'], - }; - - final headers = requestData['headers'] as Map>; - expect(headers, { - 'fruit': ['apple', 'banana', 'grape'], - 'content-length': ['0'], - }); - }); - - test('populating HttpClientRequestProfile.requestData.headersCommaValues', - () async { - final requestData = backingMap['requestData'] as Map; - expect(requestData['headers'], isNull); - - profile.requestData.headersCommaValues = { - 'set-cookie': - // ignore: missing_whitespace_between_adjacent_strings - 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO,' - 'sessionId=e8bb43229de9; Domain=foo.example.com' - }; - - final headers = requestData['headers'] as Map>; - expect(headers, { - 'set-cookie': [ - 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', - 'sessionId=e8bb43229de9; Domain=foo.example.com' - ] - }); - }); - - test('populating HttpClientRequestProfile.requestData.maxRedirects', - () async { - final requestData = backingMap['requestData'] as Map; - expect(requestData['maxRedirects'], isNull); - - profile.requestData.maxRedirects = 5; - - expect(requestData['maxRedirects'], 5); - }); - - test('populating HttpClientRequestProfile.requestData.persistentConnection', - () async { - final requestData = backingMap['requestData'] as Map; - expect(requestData['persistentConnection'], isNull); - - profile.requestData.persistentConnection = true; - - expect(requestData['persistentConnection'], true); - }); - - test('populating HttpClientRequestProfile.requestData.proxyDetails', - () async { - final requestData = backingMap['requestData'] as Map; - expect(requestData['proxyDetails'], isNull); - - profile.requestData.proxyDetails = HttpProfileProxyData( - host: 'https://www.example.com', - username: 'abc123', - isDirect: true, - port: 4321, - ); - - final proxyDetails = requestData['proxyDetails'] as Map; - expect( - proxyDetails['host'], - 'https://www.example.com', - ); - expect(proxyDetails['username'], 'abc123'); - expect(proxyDetails['isDirect'], true); - expect(proxyDetails['port'], 4321); - }); - test('calling HttpClientRequestProfile.responseData.addRedirect', () async { final responseData = backingMap['responseData'] as Map; final redirects = responseData['redirects'] as List>; diff --git a/pkgs/http_profile/test/profiling_enabled_test.dart b/pkgs/http_profile/test/profiling_enabled_test.dart deleted file mode 100644 index 7d9b63410f..0000000000 --- a/pkgs/http_profile/test/profiling_enabled_test.dart +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. 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:http_profile/http_profile.dart'; -import 'package:test/test.dart'; - -void main() { - test('profiling enabled', () async { - HttpClientRequestProfile.profilingEnabled = true; - expect(HttpClient.enableTimelineLogging, true); - expect( - HttpClientRequestProfile.profile( - requestStartTime: DateTime.parse('2024-03-21'), - requestMethod: 'GET', - requestUri: 'https://www.example.com', - ), - isNotNull, - ); - }); - - test('profiling disabled', () async { - HttpClientRequestProfile.profilingEnabled = false; - expect(HttpClient.enableTimelineLogging, false); - expect( - HttpClientRequestProfile.profile( - requestStartTime: DateTime.parse('2024-03-21'), - requestMethod: 'GET', - requestUri: 'https://www.example.com', - ), - isNull, - ); - }); -} diff --git a/pkgs/http_profile/test/utils_test.dart b/pkgs/http_profile/test/utils_test.dart new file mode 100644 index 0000000000..a15700ec8d --- /dev/null +++ b/pkgs/http_profile/test/utils_test.dart @@ -0,0 +1,74 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:http_profile/src/utils.dart'; +import 'package:test/test.dart'; + +void main() { + group('splitHeaderValues', () { + test('no headers', () async { + expect(splitHeaderValues({}), const >{}); + }); + + test('one header', () async { + expect(splitHeaderValues({'fruit': 'apple'}), const { + 'fruit': ['apple'] + }); + }); + + test('two header', () async { + expect(splitHeaderValues({'fruit': 'apple,banana'}), const { + 'fruit': ['apple', 'banana'] + }); + }); + + test('two headers with lots of spaces', () async { + expect(splitHeaderValues({'fruit': 'apple \t , \tbanana'}), const { + 'fruit': ['apple', 'banana'] + }); + }); + + test('one set-cookie', () async { + expect( + splitHeaderValues({ + 'set-cookie': 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT' + }), + { + 'set-cookie': ['id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT'] + }); + }); + + test('two set-cookie, with comma in expires', () async { + expect( + splitHeaderValues({ + // ignore: missing_whitespace_between_adjacent_strings + 'set-cookie': 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT,' + 'sessionId=e8bb43229de9; Domain=foo.example.com' + }), + { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }); + }); + + test('two set-cookie, with lots of commas', () async { + expect( + splitHeaderValues({ + // ignore: missing_whitespace_between_adjacent_strings + 'set-cookie': + // ignore: missing_whitespace_between_adjacent_strings + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO,' + 'sessionId=e8bb43229de9; Domain=foo.example.com' + }), + { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }); + }); + }); +} From 3e7f084fb641d4d262474db3d68eaa347446c9b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 03:35:55 +0000 Subject: [PATCH 328/448] Bump actions/setup-java from 4.0.0 to 4.1.0 (#1144) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4.0.0 to 4.1.0.
Release notes

Sourced from actions/setup-java's releases.

V4.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/setup-java/compare/v4...v4.1.0

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-java&package-manager=github_actions&previous-version=4.0.0&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/cronet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 63e7b7d253..ddbb1f6c6b 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -32,7 +32,7 @@ jobs: working-directory: pkgs/cronet_http steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 + - uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 with: distribution: 'zulu' java-version: '17' From d5b092679c697eaffeaac2437a8c2b500f1529ca Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 03:38:06 +0000 Subject: [PATCH 329/448] Bump actions/cache from 4.0.0 to 4.0.1 (#1145) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/cache](https://github.com/actions/cache) from 4.0.0 to 4.0.1.
Release notes

Sourced from actions/cache's releases.

v4.0.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/cache/compare/v4...v4.0.1

Changelog

Sourced from actions/cache's changelog.

Releases

4.0.1

  • Updated isGhes check

4.0.0

  • Updated minimum runner version support from node 12 -> node 20

3.3.3

  • Updates @​actions/cache to v3.2.3 to fix accidental mutated path arguments to getCacheVersion actions/toolkit#1378
  • Additional audit fixes of npm package(s)

3.3.2

  • Fixes bug with Azure SDK causing blob downloads to get stuck.

3.3.1

  • Reduced segment size to 128MB and segment timeout to 10 minutes to fail fast in case the cache download is stuck.

3.3.0

  • Added option to lookup cache without downloading it.

3.2.6

  • Fix zstd not being used after zstd version upgrade to 1.5.4 on hosted runners.

3.2.5

  • Added fix to prevent from setting MYSYS environment variable globally.

3.2.4

  • Added option to fail job on cache miss.

3.2.3

  • Support cross os caching on Windows as an opt-in feature.
  • Fix issue with symlink restoration on Windows for cross-os caches.

3.2.2

  • Reverted the changes made in 3.2.1 to use gnu tar and zstd by default on windows.

3.2.1

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=4.0.0&new-version=4.0.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/dart.yml | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 0f53da75a6..47b933047e 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http_client_conformance_tests;commands:analyze_1" @@ -74,7 +74,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:analyze_1" @@ -122,7 +122,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev;packages:pkgs/http_profile;commands:analyze_1" @@ -152,7 +152,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:analyze_1" @@ -218,7 +218,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:format" @@ -284,7 +284,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:format" @@ -314,7 +314,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:analyze_0" @@ -344,7 +344,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:command_1" @@ -383,7 +383,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:test_3" @@ -422,7 +422,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:test_2" @@ -461,7 +461,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev;packages:pkgs/http_profile;commands:test_2" @@ -500,7 +500,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:command_1" @@ -539,7 +539,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_3" @@ -578,7 +578,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_profile;commands:test_2" @@ -626,7 +626,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_4" @@ -665,7 +665,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:test_1" @@ -704,7 +704,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:command_0" @@ -743,7 +743,7 @@ jobs: runs-on: macos-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:macos-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:command_0" From 12a01ed394c4875db9e7eb98ac1a210a41b42905 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 4 Mar 2024 11:25:31 -0800 Subject: [PATCH 330/448] Implement WebSocket for the browser (#1142) --- .github/workflows/dart.yml | 172 +++++++++++++++++- pkgs/web_socket/lib/browser_web_socket.dart | 5 + pkgs/web_socket/lib/io_web_socket.dart | 4 + .../lib/src/browser_web_socket.dart | 128 +++++++++++++ pkgs/web_socket/lib/src/io_web_socket.dart | 17 +- pkgs/web_socket/lib/src/utils.dart | 20 ++ pkgs/web_socket/lib/src/web_socket.dart | 4 + pkgs/web_socket/lib/web_socket.dart | 4 + pkgs/web_socket/mono_pkg.yaml | 7 + pkgs/web_socket/pubspec.yaml | 2 + .../browser_web_socket_conformance_test.dart | 14 ++ .../src/disconnect_after_upgrade_tests.dart | 1 + tool/ci.sh | 8 + 13 files changed, 370 insertions(+), 16 deletions(-) create mode 100644 pkgs/web_socket/lib/browser_web_socket.dart create mode 100644 pkgs/web_socket/lib/src/browser_web_socket.dart create mode 100644 pkgs/web_socket/lib/src/utils.dart create mode 100644 pkgs/web_socket/test/browser_web_socket_conformance_test.dart diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 47b933047e..5f04f84ba7 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -457,6 +457,84 @@ jobs: - job_007 - job_008 job_012: + name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/web_socket; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2js`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/web_socket;commands:test_6" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/web_socket + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + with: + sdk: "3.3.0" + - id: checkout + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - id: pkgs_web_socket_pub_upgrade + name: pkgs/web_socket; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/web_socket + - name: "pkgs/web_socket; dart test --test-randomize-ordering-seed=random -p chrome -c dart2js" + run: "dart test --test-randomize-ordering-seed=random -p chrome -c dart2js" + if: "always() && steps.pkgs_web_socket_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/web_socket + needs: + - job_001 + - job_002 + - job_003 + - job_004 + - job_005 + - job_006 + - job_007 + - job_008 + job_013: + name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/web_socket; `dart test --test-randomize-ordering-seed=random -p vm`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/web_socket;commands:test_5" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/web_socket + os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + with: + sdk: "3.3.0" + - id: checkout + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - id: pkgs_web_socket_pub_upgrade + name: pkgs/web_socket; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/web_socket + - name: "pkgs/web_socket; dart test --test-randomize-ordering-seed=random -p vm" + run: "dart test --test-randomize-ordering-seed=random -p vm" + if: "always() && steps.pkgs_web_socket_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/web_socket + needs: + - job_001 + - job_002 + - job_003 + - job_004 + - job_005 + - job_006 + - job_007 + - job_008 + job_014: name: "unit_test; linux; Dart 3.4.0-154.0.dev; PKG: pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -495,7 +573,7 @@ jobs: - job_006 - job_007 - job_008 - job_013: + job_015: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -534,7 +612,7 @@ jobs: - job_006 - job_007 - job_008 - job_014: + job_016: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -573,7 +651,7 @@ jobs: - job_006 - job_007 - job_008 - job_015: + job_017: name: "unit_test; linux; Dart dev; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -621,7 +699,7 @@ jobs: - job_006 - job_007 - job_008 - job_016: + job_018: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm`" runs-on: ubuntu-latest steps: @@ -660,7 +738,85 @@ jobs: - job_006 - job_007 - job_008 - job_017: + job_019: + name: "unit_test; linux; Dart dev; PKG: pkgs/web_socket; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2js`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/web_socket;commands:test_6" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/web_socket + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + with: + sdk: dev + - id: checkout + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - id: pkgs_web_socket_pub_upgrade + name: pkgs/web_socket; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/web_socket + - name: "pkgs/web_socket; dart test --test-randomize-ordering-seed=random -p chrome -c dart2js" + run: "dart test --test-randomize-ordering-seed=random -p chrome -c dart2js" + if: "always() && steps.pkgs_web_socket_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/web_socket + needs: + - job_001 + - job_002 + - job_003 + - job_004 + - job_005 + - job_006 + - job_007 + - job_008 + job_020: + name: "unit_test; linux; Dart dev; PKG: pkgs/web_socket; `dart test --test-randomize-ordering-seed=random -p vm`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/web_socket;commands:test_5" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/web_socket + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + with: + sdk: dev + - id: checkout + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - id: pkgs_web_socket_pub_upgrade + name: pkgs/web_socket; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/web_socket + - name: "pkgs/web_socket; dart test --test-randomize-ordering-seed=random -p vm" + run: "dart test --test-randomize-ordering-seed=random -p vm" + if: "always() && steps.pkgs_web_socket_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/web_socket + needs: + - job_001 + - job_002 + - job_003 + - job_004 + - job_005 + - job_006 + - job_007 + - job_008 + job_021: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test --platform chrome`" runs-on: ubuntu-latest steps: @@ -699,7 +855,7 @@ jobs: - job_006 - job_007 - job_008 - job_018: + job_022: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: ubuntu-latest steps: @@ -738,7 +894,7 @@ jobs: - job_006 - job_007 - job_008 - job_019: + job_023: name: "unit_test; macos; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: macos-latest steps: @@ -777,7 +933,7 @@ jobs: - job_006 - job_007 - job_008 - job_020: + job_024: name: "unit_test; windows; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: windows-latest steps: diff --git a/pkgs/web_socket/lib/browser_web_socket.dart b/pkgs/web_socket/lib/browser_web_socket.dart new file mode 100644 index 0000000000..e418d3d827 --- /dev/null +++ b/pkgs/web_socket/lib/browser_web_socket.dart @@ -0,0 +1,5 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +export 'src/browser_web_socket.dart' show BrowserWebSocket; diff --git a/pkgs/web_socket/lib/io_web_socket.dart b/pkgs/web_socket/lib/io_web_socket.dart index eaea4f06dc..674dda11dc 100644 --- a/pkgs/web_socket/lib/io_web_socket.dart +++ b/pkgs/web_socket/lib/io_web_socket.dart @@ -1 +1,5 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + export 'src/io_web_socket.dart' show IOWebSocket; diff --git a/pkgs/web_socket/lib/src/browser_web_socket.dart b/pkgs/web_socket/lib/src/browser_web_socket.dart new file mode 100644 index 0000000000..eceb86c02c --- /dev/null +++ b/pkgs/web_socket/lib/src/browser_web_socket.dart @@ -0,0 +1,128 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:js_interop'; +import 'dart:typed_data'; + +import 'package:web/web.dart' as web; + +import '../web_socket.dart'; +import 'utils.dart'; + +/// A [WebSocket] using the browser WebSocket API. +/// +/// Usable when targeting the browser using either JavaScript or WASM. +class BrowserWebSocket implements WebSocket { + final web.WebSocket _webSocket; + final _events = StreamController(); + + static Future connect(Uri url) async { + final webSocket = web.WebSocket(url.toString())..binaryType = 'arraybuffer'; + final browserSocket = BrowserWebSocket._(webSocket); + final webSocketConnected = Completer(); + + if (webSocket.readyState == web.WebSocket.OPEN) { + webSocketConnected.complete(browserSocket); + } else { + if (webSocket.readyState == web.WebSocket.CLOSING || + webSocket.readyState == web.WebSocket.CLOSED) { + webSocketConnected.completeError(WebSocketException( + 'Unexpected WebSocket state: ${webSocket.readyState}, ' + 'expected CONNECTING (0) or OPEN (1)')); + } else { + // The socket API guarantees that only a single open event will be + // emitted. + unawaited(webSocket.onOpen.first.then((_) { + webSocketConnected.complete(browserSocket); + })); + } + } + + unawaited(webSocket.onError.first.then((e) { + // Unfortunately, the underlying WebSocket API doesn't expose any + // specific information about the error itself. + if (!webSocketConnected.isCompleted) { + final error = WebSocketException('Failed to connect WebSocket'); + webSocketConnected.completeError(error); + } else { + browserSocket._closed(1006, 'error'); + } + })); + + webSocket.onMessage.listen((e) { + if (browserSocket._events.isClosed) return; + + final eventData = e.data!; + late WebSocketEvent data; + if (eventData.typeofEquals('string')) { + data = TextDataReceived((eventData as JSString).toDart); + } else if (eventData.typeofEquals('object') && + (eventData as JSObject).instanceOfString('ArrayBuffer')) { + data = BinaryDataReceived( + (eventData as JSArrayBuffer).toDart.asUint8List()); + } else { + throw StateError('unexpected message type: ${eventData.runtimeType}'); + } + browserSocket._events.add(data); + }); + + unawaited(webSocket.onClose.first.then((event) { + if (!webSocketConnected.isCompleted) { + webSocketConnected.complete(browserSocket); + } + browserSocket._closed(event.code, event.reason); + })); + + return webSocketConnected.future; + } + + void _closed(int? code, String? reason) { + if (_events.isClosed) return; + _events.add(CloseReceived(code, reason ?? '')); + unawaited(_events.close()); + } + + BrowserWebSocket._(this._webSocket); + + @override + void sendBytes(Uint8List b) { + if (_events.isClosed) { + throw StateError('WebSocket is closed'); + } + // Silently discards the data if the connection is closed. + _webSocket.send(b.jsify()!); + } + + @override + void sendText(String s) { + if (_events.isClosed) { + throw StateError('WebSocket is closed'); + } + // Silently discards the data if the connection is closed. + _webSocket.send(s.jsify()!); + } + + @override + Future close([int? code, String? reason]) async { + if (_events.isClosed) { + throw StateError('WebSocket is closed'); + } + + checkCloseCode(code); + checkCloseReason(reason); + + unawaited(_events.close()); + if ((code, reason) case (final closeCode?, final closeReason?)) { + _webSocket.close(closeCode, closeReason); + } else if (code case final closeCode?) { + _webSocket.close(closeCode); + } else { + _webSocket.close(); + } + } + + @override + Stream get events => _events.stream; +} diff --git a/pkgs/web_socket/lib/src/io_web_socket.dart b/pkgs/web_socket/lib/src/io_web_socket.dart index 4141aaff4a..3b17ccdf58 100644 --- a/pkgs/web_socket/lib/src/io_web_socket.dart +++ b/pkgs/web_socket/lib/src/io_web_socket.dart @@ -1,11 +1,17 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + import 'dart:async'; -import 'dart:convert'; import 'dart:io' as io; import 'dart:typed_data'; import '../web_socket.dart'; +import 'utils.dart'; /// A `dart-io`-based [WebSocket] implementation. +/// +/// Usable when targeting native platforms. class IOWebSocket implements WebSocket { final io.WebSocket _webSocket; final _events = StreamController(); @@ -70,13 +76,8 @@ class IOWebSocket implements WebSocket { throw StateError('WebSocket is closed'); } - if (code != null) { - RangeError.checkValueInInterval(code, 3000, 4999, 'code'); - } - if (reason != null && utf8.encode(reason).length > 123) { - throw ArgumentError.value(reason, 'reason', - 'reason must be <= 123 bytes long when encoded as UTF-8'); - } + checkCloseCode(code); + checkCloseReason(reason); unawaited(_events.close()); try { diff --git a/pkgs/web_socket/lib/src/utils.dart b/pkgs/web_socket/lib/src/utils.dart new file mode 100644 index 0000000000..06a290f711 --- /dev/null +++ b/pkgs/web_socket/lib/src/utils.dart @@ -0,0 +1,20 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:convert'; + +/// Throw if the given close code is not valid. +void checkCloseCode(int? code) { + if (code != null) { + RangeError.checkValueInInterval(code, 3000, 4999, 'code'); + } +} + +/// Throw if the given close reason is not valid. +void checkCloseReason(String? reason) { + if (reason != null && utf8.encode(reason).length > 123) { + throw ArgumentError.value(reason, 'reason', + 'reason must be <= 123 bytes long when encoded as UTF-8'); + } +} diff --git a/pkgs/web_socket/lib/src/web_socket.dart b/pkgs/web_socket/lib/src/web_socket.dart index 4109c37960..dfd3486f00 100644 --- a/pkgs/web_socket/lib/src/web_socket.dart +++ b/pkgs/web_socket/lib/src/web_socket.dart @@ -1,3 +1,7 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + import 'dart:typed_data'; /// An event received from the peer through the [WebSocket]. diff --git a/pkgs/web_socket/lib/web_socket.dart b/pkgs/web_socket/lib/web_socket.dart index b08a48fd61..33c8fec00e 100644 --- a/pkgs/web_socket/lib/web_socket.dart +++ b/pkgs/web_socket/lib/web_socket.dart @@ -1 +1,5 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + export 'src/web_socket.dart'; diff --git a/pkgs/web_socket/mono_pkg.yaml b/pkgs/web_socket/mono_pkg.yaml index 16e4e7a5f3..13baee341e 100644 --- a/pkgs/web_socket/mono_pkg.yaml +++ b/pkgs/web_socket/mono_pkg.yaml @@ -8,3 +8,10 @@ stages: - format: sdk: - dev +- unit_test: + - test: --test-randomize-ordering-seed=random -p vm + os: + - linux + - test: --test-randomize-ordering-seed=random -p chrome -c dart2js + os: + - linux diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml index 6ebe7bbed5..f2ad2e24a5 100644 --- a/pkgs/web_socket/pubspec.yaml +++ b/pkgs/web_socket/pubspec.yaml @@ -12,3 +12,5 @@ dev_dependencies: test: ^1.24.0 web_socket_conformance_tests: path: ../web_socket_conformance_tests/ +dependencies: + web: ^0.5.0 diff --git a/pkgs/web_socket/test/browser_web_socket_conformance_test.dart b/pkgs/web_socket/test/browser_web_socket_conformance_test.dart new file mode 100644 index 0000000000..caddff137c --- /dev/null +++ b/pkgs/web_socket/test/browser_web_socket_conformance_test.dart @@ -0,0 +1,14 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('browser') +library; + +import 'package:test/test.dart'; +import 'package:web_socket/browser_web_socket.dart'; +import 'package:web_socket_conformance_tests/web_socket_conformance_tests.dart'; + +void main() { + testAll((uri, {protocols}) => BrowserWebSocket.connect(uri)); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_tests.dart index 16ccd68fa8..b5f52e9503 100644 --- a/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_tests.dart +++ b/pkgs/web_socket_conformance_tests/lib/src/disconnect_after_upgrade_tests.dart @@ -33,6 +33,7 @@ void testDisconnectAfterUpgrade( expect( (await channel.events.single as CloseReceived).code, anyOf([ + 1002, // protocol error 1005, // closed no status 1006, // closed abnormal ])); diff --git a/tool/ci.sh b/tool/ci.sh index d4cc8d2ee6..864885d1fe 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -99,6 +99,14 @@ for PKG in ${PKGS}; do echo 'dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm' dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm || EXIT_CODE=$? ;; + test_5) + echo 'dart test --test-randomize-ordering-seed=random -p vm' + dart test --test-randomize-ordering-seed=random -p vm || EXIT_CODE=$? + ;; + test_6) + echo 'dart test --test-randomize-ordering-seed=random -p chrome -c dart2js' + dart test --test-randomize-ordering-seed=random -p chrome -c dart2js || EXIT_CODE=$? + ;; *) echo -e "\033[31mUnknown TASK '${TASK}' - TERMINATING JOB\033[0m" exit 64 From 17b3105deb25cd59ac56b116efbeb26c400fe8fb Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 4 Mar 2024 15:45:11 -0800 Subject: [PATCH 331/448] Add a LICENSE file to package:web_socket (#1147) --- pkgs/web_socket/LICENSE | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pkgs/web_socket/LICENSE diff --git a/pkgs/web_socket/LICENSE b/pkgs/web_socket/LICENSE new file mode 100644 index 0000000000..e5b2b46dcf --- /dev/null +++ b/pkgs/web_socket/LICENSE @@ -0,0 +1,27 @@ +Copyright 2024, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From ae8f3a9d626628523c0dd3e091d9a340de60b63b Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 4 Mar 2024 16:53:16 -0800 Subject: [PATCH 332/448] Include a description and version number in web_socket pubspec (#1148) --- pkgs/web_socket/pubspec.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml index f2ad2e24a5..f3f89809e6 100644 --- a/pkgs/web_socket/pubspec.yaml +++ b/pkgs/web_socket/pubspec.yaml @@ -1,8 +1,9 @@ name: web_socket -description: "TODO: enter a descirption here" +description: >- + Any easy-to-use library for communicating with WebSockets + that has multiple implementations. repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket - -publish_to: none +version: 0.1.0-wip environment: sdk: ^3.3.0 From 673db5dc86dcdd0c836e03259fd886c064e7ae19 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 5 Mar 2024 14:42:28 -0800 Subject: [PATCH 333/448] Add `WebSocket.connect` as a cross-platform connection method (#1149) --- pkgs/web_socket/README.md | 3 +-- pkgs/web_socket/example/web_socket_example.dart | 3 +-- pkgs/web_socket/lib/src/browser_web_socket.dart | 5 ++++- pkgs/web_socket/lib/src/connect_stub.dart | 9 +++++++++ pkgs/web_socket/lib/src/io_web_socket.dart | 7 +++++-- pkgs/web_socket/lib/src/web_socket.dart | 10 ++++++++-- .../test/browser_web_socket_conformance_test.dart | 2 +- .../test/io_web_socket_conformance_test.dart | 2 +- pkgs/web_socket/test/websocket_test.dart | 10 ++++++++++ 9 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 pkgs/web_socket/lib/src/connect_stub.dart create mode 100644 pkgs/web_socket/test/websocket_test.dart diff --git a/pkgs/web_socket/README.md b/pkgs/web_socket/README.md index 3e9c2d0146..786d239891 100644 --- a/pkgs/web_socket/README.md +++ b/pkgs/web_socket/README.md @@ -7,12 +7,11 @@ implementations. ## Using ```dart -import 'package:web_socket/io_web_socket.dart'; import 'package:web_socket/web_socket.dart'; void main() async { final socket = - await IOWebSocket.connect(Uri.parse('wss://ws.postman-echo.com/raw')); + await WebSocket.connect(Uri.parse('wss://ws.postman-echo.com/raw')); socket.events.listen((e) async { switch (e) { diff --git a/pkgs/web_socket/example/web_socket_example.dart b/pkgs/web_socket/example/web_socket_example.dart index 27ab4569c1..423b2016ed 100644 --- a/pkgs/web_socket/example/web_socket_example.dart +++ b/pkgs/web_socket/example/web_socket_example.dart @@ -1,7 +1,6 @@ import 'dart:convert'; import 'dart:io'; -import 'package:web_socket/io_web_socket.dart'; import 'package:web_socket/web_socket.dart'; const requestId = 305; @@ -11,7 +10,7 @@ void main() async { // Whitebit public WebSocket API documentation: // https://docs.whitebit.com/public/websocket/ final socket = - await IOWebSocket.connect(Uri.parse('wss://api.whitebit.com/ws')); + await WebSocket.connect(Uri.parse('wss://api.whitebit.com/ws')); socket.events.listen((e) { switch (e) { diff --git a/pkgs/web_socket/lib/src/browser_web_socket.dart b/pkgs/web_socket/lib/src/browser_web_socket.dart index eceb86c02c..069f2781f0 100644 --- a/pkgs/web_socket/lib/src/browser_web_socket.dart +++ b/pkgs/web_socket/lib/src/browser_web_socket.dart @@ -18,7 +18,8 @@ class BrowserWebSocket implements WebSocket { final web.WebSocket _webSocket; final _events = StreamController(); - static Future connect(Uri url) async { + static Future connect(Uri url, + {Iterable? protocols}) async { final webSocket = web.WebSocket(url.toString())..binaryType = 'arraybuffer'; final browserSocket = BrowserWebSocket._(webSocket); final webSocketConnected = Completer(); @@ -126,3 +127,5 @@ class BrowserWebSocket implements WebSocket { @override Stream get events => _events.stream; } + +const connect = BrowserWebSocket.connect; diff --git a/pkgs/web_socket/lib/src/connect_stub.dart b/pkgs/web_socket/lib/src/connect_stub.dart new file mode 100644 index 0000000000..3a420deeec --- /dev/null +++ b/pkgs/web_socket/lib/src/connect_stub.dart @@ -0,0 +1,9 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import '../web_socket.dart'; + +Future connect(Uri url, {Iterable? protocols}) { + throw UnsupportedError('Cannot connect without dart:js_interop or dart:io.'); +} diff --git a/pkgs/web_socket/lib/src/io_web_socket.dart b/pkgs/web_socket/lib/src/io_web_socket.dart index 3b17ccdf58..b0bc3c7ea5 100644 --- a/pkgs/web_socket/lib/src/io_web_socket.dart +++ b/pkgs/web_socket/lib/src/io_web_socket.dart @@ -16,9 +16,10 @@ class IOWebSocket implements WebSocket { final io.WebSocket _webSocket; final _events = StreamController(); - static Future connect(Uri uri) async { + static Future connect(Uri url, + {Iterable? protocols}) async { try { - final webSocket = await io.WebSocket.connect(uri.toString()); + final webSocket = await io.WebSocket.connect(url.toString()); return IOWebSocket._(webSocket); } on io.WebSocketException catch (e) { throw WebSocketException(e.message); @@ -90,3 +91,5 @@ class IOWebSocket implements WebSocket { @override Stream get events => _events.stream; } + +const connect = IOWebSocket.connect; diff --git a/pkgs/web_socket/lib/src/web_socket.dart b/pkgs/web_socket/lib/src/web_socket.dart index dfd3486f00..945fc57aed 100644 --- a/pkgs/web_socket/lib/src/web_socket.dart +++ b/pkgs/web_socket/lib/src/web_socket.dart @@ -4,6 +4,10 @@ import 'dart:typed_data'; +import 'connect_stub.dart' + if (dart.library.js_interop) 'browser_web_socket.dart' + if (dart.library.io) 'io_web_socket.dart' as connector; + /// An event received from the peer through the [WebSocket]. sealed class WebSocketEvent {} @@ -90,12 +94,11 @@ class WebSocketConnectionClosed extends WebSocketException { /// The interface for WebSocket connections. /// /// ```dart -/// import 'package:web_socket/io_web_socket.dart'; /// import 'package:web_socket/src/web_socket.dart'; /// /// void main() async { /// final socket = -/// await IOWebSocket.connect(Uri.parse('wss://ws.postman-echo.com/raw')); +/// await WebSocket.connect(Uri.parse('wss://ws.postman-echo.com/raw')); /// /// socket.events.listen((e) async { /// switch (e) { @@ -112,6 +115,9 @@ class WebSocketConnectionClosed extends WebSocketException { /// socket.sendText('Hello Dart WebSockets! 🎉'); /// } abstract interface class WebSocket { + static Future connect(Uri url, {Iterable? protocols}) => + connector.connect(url, protocols: protocols); + /// Sends text data to the connected peer. /// /// Throws [WebSocketConnectionClosed] if the [WebSocket] is diff --git a/pkgs/web_socket/test/browser_web_socket_conformance_test.dart b/pkgs/web_socket/test/browser_web_socket_conformance_test.dart index caddff137c..2105a45508 100644 --- a/pkgs/web_socket/test/browser_web_socket_conformance_test.dart +++ b/pkgs/web_socket/test/browser_web_socket_conformance_test.dart @@ -10,5 +10,5 @@ import 'package:web_socket/browser_web_socket.dart'; import 'package:web_socket_conformance_tests/web_socket_conformance_tests.dart'; void main() { - testAll((uri, {protocols}) => BrowserWebSocket.connect(uri)); + testAll(BrowserWebSocket.connect); } diff --git a/pkgs/web_socket/test/io_web_socket_conformance_test.dart b/pkgs/web_socket/test/io_web_socket_conformance_test.dart index 9b3728ddd2..cc313a6a0d 100644 --- a/pkgs/web_socket/test/io_web_socket_conformance_test.dart +++ b/pkgs/web_socket/test/io_web_socket_conformance_test.dart @@ -10,5 +10,5 @@ import 'package:web_socket/io_web_socket.dart'; import 'package:web_socket_conformance_tests/web_socket_conformance_tests.dart'; void main() { - testAll((uri, {protocols}) => IOWebSocket.connect(uri)); + testAll(IOWebSocket.connect); } diff --git a/pkgs/web_socket/test/websocket_test.dart b/pkgs/web_socket/test/websocket_test.dart new file mode 100644 index 0000000000..859e4fe636 --- /dev/null +++ b/pkgs/web_socket/test/websocket_test.dart @@ -0,0 +1,10 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:web_socket/web_socket.dart'; +import 'package:web_socket_conformance_tests/web_socket_conformance_tests.dart'; + +void main() { + testAll(WebSocket.connect); +} From e0963c9baa78f9c64c6c43b105945c72d40c845f Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 6 Mar 2024 18:17:49 -0800 Subject: [PATCH 334/448] Add support for negotiating a subprotocol (#1150) --- pkgs/web_socket/CHANGELOG.md | 2 +- .../lib/src/browser_web_socket.dart | 19 ++++- pkgs/web_socket/lib/src/io_web_socket.dart | 32 ++++++++- pkgs/web_socket/lib/src/web_socket.dart | 15 ++++ .../example/client_test.dart | 3 + .../lib/src/connect_uri_tests.dart | 18 +++++ .../lib/src/protocol_server.dart | 47 +++++++++++++ .../lib/src/protocol_server_vm.dart | 12 ++++ .../lib/src/protocol_server_web.dart | 9 +++ .../lib/src/protocol_tests.dart | 70 +++++++++++++++++++ .../lib/web_socket_conformance_tests.dart | 4 ++ 11 files changed, 226 insertions(+), 5 deletions(-) create mode 100644 pkgs/web_socket_conformance_tests/lib/src/connect_uri_tests.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/protocol_server.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/protocol_server_vm.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/protocol_server_web.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/protocol_tests.dart diff --git a/pkgs/web_socket/CHANGELOG.md b/pkgs/web_socket/CHANGELOG.md index 3d138c0f6e..3bd731a51b 100644 --- a/pkgs/web_socket/CHANGELOG.md +++ b/pkgs/web_socket/CHANGELOG.md @@ -1,3 +1,3 @@ ## 0.1.0-wip -- Abstract interface definition. +- Basic functionality in place. diff --git a/pkgs/web_socket/lib/src/browser_web_socket.dart b/pkgs/web_socket/lib/src/browser_web_socket.dart index 069f2781f0..80135fdc3e 100644 --- a/pkgs/web_socket/lib/src/browser_web_socket.dart +++ b/pkgs/web_socket/lib/src/browser_web_socket.dart @@ -18,9 +18,23 @@ class BrowserWebSocket implements WebSocket { final web.WebSocket _webSocket; final _events = StreamController(); + /// Create a new WebSocket connection using the JavaScript WebSocket API. + /// + /// The URL supplied in [url] must use the scheme ws or wss. + /// + /// If provided, the [protocols] argument indicates that subprotocols that + /// the peer is able to select. See + /// [RFC-6455 1.9](https://datatracker.ietf.org/doc/html/rfc6455#section-1.9). static Future connect(Uri url, {Iterable? protocols}) async { - final webSocket = web.WebSocket(url.toString())..binaryType = 'arraybuffer'; + if (!url.isScheme('ws') && !url.isScheme('wss')) { + throw ArgumentError.value( + url, 'url', 'only ws: and wss: schemes are supported'); + } + + final webSocket = web.WebSocket(url.toString(), + protocols?.map((e) => e.toJS).toList().toJS ?? JSArray()) + ..binaryType = 'arraybuffer'; final browserSocket = BrowserWebSocket._(webSocket); final webSocketConnected = Completer(); @@ -126,6 +140,9 @@ class BrowserWebSocket implements WebSocket { @override Stream get events => _events.stream; + + @override + String get protocol => _webSocket.protocol; } const connect = BrowserWebSocket.connect; diff --git a/pkgs/web_socket/lib/src/io_web_socket.dart b/pkgs/web_socket/lib/src/io_web_socket.dart index b0bc3c7ea5..d44a33ecfa 100644 --- a/pkgs/web_socket/lib/src/io_web_socket.dart +++ b/pkgs/web_socket/lib/src/io_web_socket.dart @@ -6,8 +6,8 @@ import 'dart:async'; import 'dart:io' as io; import 'dart:typed_data'; -import '../web_socket.dart'; import 'utils.dart'; +import 'web_socket.dart'; /// A `dart-io`-based [WebSocket] implementation. /// @@ -16,14 +16,37 @@ class IOWebSocket implements WebSocket { final io.WebSocket _webSocket; final _events = StreamController(); + /// Create a new WebSocket connection using dart:io WebSocket. + /// + /// The URL supplied in [url] must use the scheme ws or wss. + /// + /// If provided, the [protocols] argument indicates that subprotocols that + /// the peer is able to select. See + /// [RFC-6455 1.9](https://datatracker.ietf.org/doc/html/rfc6455#section-1.9). static Future connect(Uri url, {Iterable? protocols}) async { + if (!url.isScheme('ws') && !url.isScheme('wss')) { + throw ArgumentError.value( + url, 'url', 'only ws: and wss: schemes are supported'); + } + + final io.WebSocket webSocket; try { - final webSocket = await io.WebSocket.connect(url.toString()); - return IOWebSocket._(webSocket); + webSocket = + await io.WebSocket.connect(url.toString(), protocols: protocols); } on io.WebSocketException catch (e) { throw WebSocketException(e.message); } + + if (webSocket.protocol != null && + !(protocols ?? []).contains(webSocket.protocol)) { + // dart:io WebSocket does not correctly validate the returned protocol. + // See https://github.com/dart-lang/sdk/issues/55106 + await webSocket.close(1002); // protocol error + throw WebSocketException( + 'unexpected protocol selected by peer: ${webSocket.protocol}'); + } + return IOWebSocket._(webSocket); } IOWebSocket._(this._webSocket) { @@ -90,6 +113,9 @@ class IOWebSocket implements WebSocket { @override Stream get events => _events.stream; + + @override + String get protocol => _webSocket.protocol ?? ''; } const connect = IOWebSocket.connect; diff --git a/pkgs/web_socket/lib/src/web_socket.dart b/pkgs/web_socket/lib/src/web_socket.dart index 945fc57aed..560a5eb04e 100644 --- a/pkgs/web_socket/lib/src/web_socket.dart +++ b/pkgs/web_socket/lib/src/web_socket.dart @@ -115,6 +115,13 @@ class WebSocketConnectionClosed extends WebSocketException { /// socket.sendText('Hello Dart WebSockets! 🎉'); /// } abstract interface class WebSocket { + /// Create a new WebSocket connection. + /// + /// The URL supplied in [url] must use the scheme ws or wss. + /// + /// If provided, the [protocols] argument indicates that subprotocols that + /// the peer is able to select. See + /// [RFC-6455 1.9](https://datatracker.ietf.org/doc/html/rfc6455#section-1.9). static Future connect(Uri url, {Iterable? protocols}) => connector.connect(url, protocols: protocols); @@ -169,4 +176,12 @@ abstract interface class WebSocket { /// /// Errors will never appear in this [Stream]. Stream get events; + + /// The WebSocket subprotocol negotiated with the peer. + /// + /// Will be the empty string if no subprotocol was negotiated. + /// + /// See + /// [RFC-6455 1.9](https://datatracker.ietf.org/doc/html/rfc6455#section-1.9). + String get protocol; } diff --git a/pkgs/web_socket_conformance_tests/example/client_test.dart b/pkgs/web_socket_conformance_tests/example/client_test.dart index ec3d01c17a..d08dad94c1 100644 --- a/pkgs/web_socket_conformance_tests/example/client_test.dart +++ b/pkgs/web_socket_conformance_tests/example/client_test.dart @@ -20,6 +20,9 @@ class MyWebSocketImplementation implements WebSocket { @override void sendText(String s) => throw UnimplementedError(); + + @override + String get protocol => throw UnimplementedError(); } void main() { diff --git a/pkgs/web_socket_conformance_tests/lib/src/connect_uri_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/connect_uri_tests.dart new file mode 100644 index 0000000000..0caa9e6f8c --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/connect_uri_tests.dart @@ -0,0 +1,18 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:test/test.dart'; +import 'package:web_socket/web_socket.dart'; + +/// Tests that the [WebSocket] rejects invalid connection URIs. +void testConnectUri( + Future Function(Uri uri, {Iterable? protocols}) + channelFactory) { + group('connect uri', () { + test('no protocol', () async { + await expectLater(() => channelFactory(Uri.https('www.example.com', '/')), + throwsA(isA())); + }); + }); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/protocol_server.dart b/pkgs/web_socket_conformance_tests/lib/src/protocol_server.dart new file mode 100644 index 0000000000..c0df5b6ea4 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/protocol_server.dart @@ -0,0 +1,47 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:crypto/crypto.dart'; +import 'package:stream_channel/stream_channel.dart'; + +const _webSocketGuid = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'; + +/// Starts an WebSocket server that responds with a scripted subprotocol. +void hybridMain(StreamChannel channel) async { + late final HttpServer server; + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + final serverProtocol = request.requestedUri.queryParameters['protocol']; + var key = request.headers.value('Sec-WebSocket-Key'); + var digest = sha1.convert('$key$_webSocketGuid'.codeUnits); + var accept = base64.encode(digest.bytes); + channel.sink.add(request.headers['Sec-WebSocket-Protocol']); + request.response + ..statusCode = HttpStatus.switchingProtocols + ..headers.add(HttpHeaders.connectionHeader, 'Upgrade') + ..headers.add(HttpHeaders.upgradeHeader, 'websocket') + ..headers.add('Sec-WebSocket-Accept', accept); + if (serverProtocol != null) { + request.response.headers.add('Sec-WebSocket-Protocol', serverProtocol); + } + request.response.contentLength = 0; + final socket = await request.response.detachSocket(); + final webSocket = WebSocket.fromUpgradedSocket(socket, + protocol: serverProtocol, serverSide: true); + webSocket.listen((e) async { + webSocket.add(e); + await webSocket.close(); + }); + }); + + channel.sink.add(server.port); + + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/protocol_server_vm.dart b/pkgs/web_socket_conformance_tests/lib/src/protocol_server_vm.dart new file mode 100644 index 0000000000..a31da9ec1e --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/protocol_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'protocol_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/protocol_server_web.dart b/pkgs/web_socket_conformance_tests/lib/src/protocol_server_web.dart new file mode 100644 index 0000000000..a752ed7ac2 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/protocol_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'web_socket_conformance_tests/src/protocol_server.dart')); diff --git a/pkgs/web_socket_conformance_tests/lib/src/protocol_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/protocol_tests.dart new file mode 100644 index 0000000000..4af977fb7c --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/protocol_tests.dart @@ -0,0 +1,70 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; +import 'package:web_socket/web_socket.dart'; + +import 'protocol_server_vm.dart' + if (dart.library.html) 'protocol_server_web.dart'; + +/// Tests that the [WebSocket] can correctly negotiate a subprotocol with the +/// peer. +/// +/// See +/// [RFC-6455 1.9](https://datatracker.ietf.org/doc/html/rfc6455#section-1.9). +void testProtocols( + Future Function(Uri uri, {Iterable? protocols}) + channelFactory) { + group('protocols', () { + late Uri uri; + late StreamChannel httpServerChannel; + late StreamQueue httpServerQueue; + + setUp(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + uri = Uri.parse('ws://localhost:${await httpServerQueue.next}'); + }); + tearDown(() => httpServerChannel.sink.add(null)); + + test('no protocol', () async { + final socket = await channelFactory(uri); + + expect(await httpServerQueue.next, null); + expect(socket.protocol, ''); + socket.sendText('Hello World!'); + }); + + test('single protocol', () async { + final socket = await channelFactory( + uri.replace(queryParameters: {'protocol': 'chat.example.com'}), + protocols: ['chat.example.com']); + + expect(await httpServerQueue.next, ['chat.example.com']); + expect(socket.protocol, 'chat.example.com'); + socket.sendText('Hello World!'); + }); + + test('mutiple protocols', () async { + final socket = await channelFactory( + uri.replace(queryParameters: {'protocol': 'text.example.com'}), + protocols: ['chat.example.com', 'text.example.com']); + + expect( + await httpServerQueue.next, ['chat.example.com, text.example.com']); + expect(socket.protocol, 'text.example.com'); + socket.sendText('Hello World!'); + }); + + test('protocol mismatch', () async { + await expectLater( + () => channelFactory( + uri.replace(queryParameters: {'protocol': 'example.example.com'}), + protocols: ['chat.example.com']), + throwsA(isA())); + }); + }); +} diff --git a/pkgs/web_socket_conformance_tests/lib/web_socket_conformance_tests.dart b/pkgs/web_socket_conformance_tests/lib/web_socket_conformance_tests.dart index 248fc3870a..9e6e011628 100644 --- a/pkgs/web_socket_conformance_tests/lib/web_socket_conformance_tests.dart +++ b/pkgs/web_socket_conformance_tests/lib/web_socket_conformance_tests.dart @@ -5,10 +5,12 @@ import 'package:web_socket/web_socket.dart'; import 'src/close_local_tests.dart'; import 'src/close_remote_tests.dart'; +import 'src/connect_uri_tests.dart'; import 'src/disconnect_after_upgrade_tests.dart'; import 'src/no_upgrade_tests.dart'; import 'src/payload_transfer_tests.dart'; import 'src/peer_protocol_errors_tests.dart'; +import 'src/protocol_tests.dart'; /// Runs the entire test suite against the given [WebSocket]. void testAll( @@ -16,8 +18,10 @@ void testAll( webSocketFactory) { testCloseLocal(webSocketFactory); testCloseRemote(webSocketFactory); + testConnectUri(webSocketFactory); testDisconnectAfterUpgrade(webSocketFactory); testNoUpgrade(webSocketFactory); testPayloadTransfer(webSocketFactory); testPeerProtocolErrors(webSocketFactory); + testProtocols(webSocketFactory); } From bbd28dcc6f5d9e0d1bcbbc999fb1b6c24d7b3e3c Mon Sep 17 00:00:00 2001 From: Derek Xu Date: Fri, 8 Mar 2024 15:20:41 -0500 Subject: [PATCH 335/448] [package:http_profile] Store request and response bodies in the backing map as lists instead of streams (#1154) This PR also adds getters that return the request and response bodies as lists of ints --- .../lib/src/http_client_request_profile.dart | 13 +++-- pkgs/http_profile/lib/src/http_profile.dart | 1 + .../lib/src/http_profile_request_data.dart | 14 +++-- .../lib/src/http_profile_response_data.dart | 58 +++++++++++-------- pkgs/http_profile/test/close_test.dart | 16 ++--- .../test/http_profile_request_data_test.dart | 16 ++++- .../test/http_profile_response_data_test.dart | 27 +++------ 7 files changed, 84 insertions(+), 61 deletions(-) diff --git a/pkgs/http_profile/lib/src/http_client_request_profile.dart b/pkgs/http_profile/lib/src/http_client_request_profile.dart index ffa8ac5ebb..1ce632cfd0 100644 --- a/pkgs/http_profile/lib/src/http_client_request_profile.dart +++ b/pkgs/http_profile/lib/src/http_client_request_profile.dart @@ -76,10 +76,15 @@ final class HttpClientRequestProfile { _data['requestData'] = {}; requestData = HttpProfileRequestData._(_data, _updated); _data['responseData'] = {}; - responseData = HttpProfileResponseData._( - _data['responseData'] as Map, _updated); - _data['_requestBodyStream'] = requestData._body.stream; - _data['_responseBodyStream'] = responseData._body.stream; + responseData = HttpProfileResponseData._(_data, _updated); + _data['requestBodyBytes'] = []; + requestData._body.stream.listen( + (final bytes) => (_data['requestBodyBytes'] as List).addAll(bytes), + ); + _data['responseBodyBytes'] = []; + responseData._body.stream.listen( + (final bytes) => (_data['responseBodyBytes'] as List).addAll(bytes), + ); // This entry is needed to support the updatedSince parameter of // ext.dart.io.getHttpProfile. _updated(); diff --git a/pkgs/http_profile/lib/src/http_profile.dart b/pkgs/http_profile/lib/src/http_profile.dart index bca3bfd310..3c208050b4 100644 --- a/pkgs/http_profile/lib/src/http_profile.dart +++ b/pkgs/http_profile/lib/src/http_profile.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; +import 'dart:collection' show UnmodifiableListView; import 'dart:developer' show Service, addHttpClientProfilingData; import 'dart:io' show HttpClient, HttpClientResponseCompressionState; import 'dart:isolate' show Isolate; diff --git a/pkgs/http_profile/lib/src/http_profile_request_data.dart b/pkgs/http_profile/lib/src/http_profile_request_data.dart index 6c5aeb19a9..2bcd1a7c6c 100644 --- a/pkgs/http_profile/lib/src/http_profile_request_data.dart +++ b/pkgs/http_profile/lib/src/http_profile_request_data.dart @@ -38,9 +38,13 @@ final class HttpProfileRequestData { Map get _requestData => _data['requestData'] as Map; - /// The body of the request. + /// A sink that can be used to record the body of the request. StreamSink> get bodySink => _body.sink; + /// The body of the request represented as an unmodifiable list of bytes. + List get bodyBytes => + UnmodifiableListView(_data['requestBodyBytes'] as List); + /// Information about the networking connection used in the HTTP request. /// /// This information is meant to be used for debugging. @@ -155,10 +159,10 @@ final class HttpProfileRequestData { /// /// [endTime] is the time when the request was fully sent. It defaults to the /// current time. - void close([DateTime? endTime]) { + Future close([DateTime? endTime]) async { _checkAndUpdate(); _isClosed = true; - unawaited(bodySink.close()); + await bodySink.close(); _data['requestEndTimestamp'] = (endTime ?? DateTime.now()).microsecondsSinceEpoch; } @@ -172,10 +176,10 @@ final class HttpProfileRequestData { /// /// [endTime] is the time when the error occurred. It defaults to the current /// time. - void closeWithError(String value, [DateTime? endTime]) { + Future closeWithError(String value, [DateTime? endTime]) async { _checkAndUpdate(); _isClosed = true; - unawaited(bodySink.close()); + await bodySink.close(); _requestData['error'] = value; _data['requestEndTimestamp'] = (endTime ?? DateTime.now()).microsecondsSinceEpoch; diff --git a/pkgs/http_profile/lib/src/http_profile_response_data.dart b/pkgs/http_profile/lib/src/http_profile_response_data.dart index ee0720cfa2..3a972b4f85 100644 --- a/pkgs/http_profile/lib/src/http_profile_response_data.dart +++ b/pkgs/http_profile/lib/src/http_profile_response_data.dart @@ -32,15 +32,23 @@ final class HttpProfileResponseData { final void Function() _updated; final StreamController> _body = StreamController>(); + Map get _responseData => + _data['responseData'] as Map; + /// Records a redirect that the connection went through. void addRedirect(HttpProfileRedirectData redirect) { _checkAndUpdate(); - (_data['redirects'] as List>).add(redirect._toJson()); + (_responseData['redirects'] as List>) + .add(redirect._toJson()); } - /// The body of the response. + /// A sink that can be used to record the body of the response. StreamSink> get bodySink => _body.sink; + /// The body of the response represented as an unmodifiable list of bytes. + List get bodyBytes => + UnmodifiableListView(_data['responseBodyBytes'] as List); + /// Information about the networking connection used in the HTTP response. /// /// This information is meant to be used for debugging. @@ -57,7 +65,7 @@ final class HttpProfileResponseData { ); } } - _data['connectionInfo'] = {...value}; + _responseData['connectionInfo'] = {...value}; } /// The reponse headers where duplicate headers are represented using a list @@ -74,10 +82,10 @@ final class HttpProfileResponseData { set headersListValues(Map>? value) { _checkAndUpdate(); if (value == null) { - _data.remove('headers'); + _responseData.remove('headers'); return; } - _data['headers'] = {...value}; + _responseData['headers'] = {...value}; } /// The response headers where duplicate headers are represented using a @@ -94,10 +102,10 @@ final class HttpProfileResponseData { set headersCommaValues(Map? value) { _checkAndUpdate(); if (value == null) { - _data.remove('headers'); + _responseData.remove('headers'); return; } - _data['headers'] = splitHeaderValues(value); + _responseData['headers'] = splitHeaderValues(value); } // The compression state of the response. @@ -107,57 +115,57 @@ final class HttpProfileResponseData { // uncompressed bytes when they listen to the response body byte stream. set compressionState(HttpClientResponseCompressionState value) { _checkAndUpdate(); - _data['compressionState'] = value.name; + _responseData['compressionState'] = value.name; } // The reason phrase associated with the response e.g. "OK". set reasonPhrase(String? value) { _checkAndUpdate(); if (value == null) { - _data.remove('reasonPhrase'); + _responseData.remove('reasonPhrase'); } else { - _data['reasonPhrase'] = value; + _responseData['reasonPhrase'] = value; } } /// Whether the status code was one of the normal redirect codes. set isRedirect(bool value) { _checkAndUpdate(); - _data['isRedirect'] = value; + _responseData['isRedirect'] = value; } /// The persistent connection state returned by the server. set persistentConnection(bool value) { _checkAndUpdate(); - _data['persistentConnection'] = value; + _responseData['persistentConnection'] = value; } /// The content length of the response body, in bytes. set contentLength(int? value) { _checkAndUpdate(); if (value == null) { - _data.remove('contentLength'); + _responseData.remove('contentLength'); } else { - _data['contentLength'] = value; + _responseData['contentLength'] = value; } } set statusCode(int value) { _checkAndUpdate(); - _data['statusCode'] = value; + _responseData['statusCode'] = value; } /// The time at which the initial response was received. set startTime(DateTime value) { _checkAndUpdate(); - _data['startTime'] = value.microsecondsSinceEpoch; + _responseData['startTime'] = value.microsecondsSinceEpoch; } HttpProfileResponseData._( this._data, this._updated, ) { - _data['redirects'] = >[]; + _responseData['redirects'] = >[]; } void _checkAndUpdate() { @@ -176,11 +184,12 @@ final class HttpProfileResponseData { /// /// [endTime] is the time when the response was fully received. It defaults /// to the current time. - void close([DateTime? endTime]) { + Future close([DateTime? endTime]) async { _checkAndUpdate(); _isClosed = true; - unawaited(bodySink.close()); - _data['endTime'] = (endTime ?? DateTime.now()).microsecondsSinceEpoch; + await bodySink.close(); + _responseData['endTime'] = + (endTime ?? DateTime.now()).microsecondsSinceEpoch; } /// Signal that receiving the response has failed with an error. @@ -192,11 +201,12 @@ final class HttpProfileResponseData { /// /// [endTime] is the time when the error occurred. It defaults to the current /// time. - void closeWithError(String value, [DateTime? endTime]) { + Future closeWithError(String value, [DateTime? endTime]) async { _checkAndUpdate(); _isClosed = true; - unawaited(bodySink.close()); - _data['error'] = value; - _data['endTime'] = (endTime ?? DateTime.now()).microsecondsSinceEpoch; + await bodySink.close(); + _responseData['error'] = value; + _responseData['endTime'] = + (endTime ?? DateTime.now()).microsecondsSinceEpoch; } } diff --git a/pkgs/http_profile/test/close_test.dart b/pkgs/http_profile/test/close_test.dart index 8b468611b6..ffa3579917 100644 --- a/pkgs/http_profile/test/close_test.dart +++ b/pkgs/http_profile/test/close_test.dart @@ -28,7 +28,7 @@ void main() { group('requestData.close', () { test('no arguments', () async { expect(backingMap['requestEndTimestamp'], isNull); - profile.requestData.close(); + await profile.requestData.close(); expect( backingMap['requestEndTimestamp'], @@ -39,7 +39,7 @@ void main() { test('with time', () async { expect(backingMap['requestEndTimestamp'], isNull); - profile.requestData.close(DateTime.parse('2024-03-23')); + await profile.requestData.close(DateTime.parse('2024-03-23')); expect( backingMap['requestEndTimestamp'], @@ -48,7 +48,7 @@ void main() { }); test('then write body', () async { - profile.requestData.close(); + await profile.requestData.close(); expect( () => profile.requestData.bodySink.add([1, 2, 3]), @@ -57,7 +57,7 @@ void main() { }); test('then mutate', () async { - profile.requestData.close(); + await profile.requestData.close(); expect( () => profile.requestData.contentLength = 5, @@ -75,7 +75,7 @@ void main() { test('no arguments', () async { expect(responseData['endTime'], isNull); - profile.responseData.close(); + await profile.responseData.close(); expect( responseData['endTime'], @@ -86,7 +86,7 @@ void main() { test('with time', () async { expect(responseData['endTime'], isNull); - profile.responseData.close(DateTime.parse('2024-03-23')); + await profile.responseData.close(DateTime.parse('2024-03-23')); expect( responseData['endTime'], @@ -95,7 +95,7 @@ void main() { }); test('then write body', () async { - profile.responseData.close(); + await profile.responseData.close(); expect( () => profile.responseData.bodySink.add([1, 2, 3]), @@ -104,7 +104,7 @@ void main() { }); test('then mutate', () async { - profile.responseData.close(); + await profile.responseData.close(); expect( () => profile.responseData.contentLength = 5, diff --git a/pkgs/http_profile/test/http_profile_request_data_test.dart b/pkgs/http_profile/test/http_profile_request_data_test.dart index 4a0c13e9b4..cbd6a20ec4 100644 --- a/pkgs/http_profile/test/http_profile_request_data_test.dart +++ b/pkgs/http_profile/test/http_profile_request_data_test.dart @@ -41,7 +41,7 @@ void main() { test('populating HttpClientRequestProfile.requestEndTimestamp', () async { expect(backingMap['requestEndTimestamp'], isNull); - profile.requestData.close(DateTime.parse('2024-03-23')); + await profile.requestData.close(DateTime.parse('2024-03-23')); expect( backingMap['requestEndTimestamp'], @@ -91,7 +91,7 @@ void main() { final requestData = backingMap['requestData'] as Map; expect(requestData['error'], isNull); - profile.requestData.closeWithError('failed'); + await profile.requestData.closeWithError('failed'); expect(requestData['error'], 'failed'); }); @@ -185,4 +185,16 @@ void main() { expect(proxyDetails['isDirect'], true); expect(proxyDetails['port'], 4321); }); + + test('using HttpClientRequestProfile.requestData.bodySink', () async { + final requestBodyBytes = backingMap['requestBodyBytes'] as List; + expect(requestBodyBytes, isEmpty); + expect(profile.requestData.bodyBytes, isEmpty); + + profile.requestData.bodySink.add([1, 2, 3]); + await profile.requestData.close(); + + expect(requestBodyBytes, [1, 2, 3]); + expect(profile.requestData.bodyBytes, [1, 2, 3]); + }); } diff --git a/pkgs/http_profile/test/http_profile_response_data_test.dart b/pkgs/http_profile/test/http_profile_response_data_test.dart index 625c097664..e24a758021 100644 --- a/pkgs/http_profile/test/http_profile_response_data_test.dart +++ b/pkgs/http_profile/test/http_profile_response_data_test.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:developer' show getHttpClientProfilingData; import 'dart:io'; @@ -187,7 +186,7 @@ void main() { final responseData = backingMap['responseData'] as Map; expect(responseData['endTime'], isNull); - profile.responseData.close(DateTime.parse('2024-03-23')); + await profile.responseData.close(DateTime.parse('2024-03-23')); expect( responseData['endTime'], @@ -199,28 +198,20 @@ void main() { final responseData = backingMap['responseData'] as Map; expect(responseData['error'], isNull); - profile.responseData.closeWithError('failed'); + await profile.responseData.closeWithError('failed'); expect(responseData['error'], 'failed'); }); - test('using HttpClientRequestProfile.requestBodySink', () async { - final requestBodyStream = - backingMap['_requestBodyStream'] as Stream>; - - profile.requestData.bodySink.add([1, 2, 3]); - profile.requestData.close(); - - expect(await requestBodyStream.expand((i) => i).toList(), [1, 2, 3]); - }); - - test('using HttpClientRequestProfile.responseBodySink', () async { - final responseBodyStream = - backingMap['_responseBodyStream'] as Stream>; + test('using HttpClientRequestProfile.responseData.bodySink', () async { + final responseBodyBytes = backingMap['responseBodyBytes'] as List; + expect(responseBodyBytes, isEmpty); + expect(profile.responseData.bodyBytes, isEmpty); profile.responseData.bodySink.add([1, 2, 3]); - profile.responseData.close(); + await profile.responseData.close(); - expect(await responseBodyStream.expand((i) => i).toList(), [1, 2, 3]); + expect(responseBodyBytes, [1, 2, 3]); + expect(profile.responseData.bodyBytes, [1, 2, 3]); }); } From 671b05b813adaad89f5771110caade412322bad7 Mon Sep 17 00:00:00 2001 From: Derek Xu Date: Mon, 11 Mar 2024 13:26:54 -0400 Subject: [PATCH 336/448] Add getters to classes (#1151) --- .../lib/src/http_client_request_profile.dart | 23 ++ pkgs/http_profile/lib/src/http_profile.dart | 2 +- .../lib/src/http_profile_request_data.dart | 142 +++++++-- .../lib/src/http_profile_response_data.dart | 150 ++++++++-- .../http_client_request_profile_test.dart | 20 +- .../test/http_profile_request_data_test.dart | 250 ++++++++++++++-- .../test/http_profile_response_data_test.dart | 277 ++++++++++++++++-- 7 files changed, 772 insertions(+), 92 deletions(-) diff --git a/pkgs/http_profile/lib/src/http_client_request_profile.dart b/pkgs/http_profile/lib/src/http_client_request_profile.dart index 1ce632cfd0..84db62f1a2 100644 --- a/pkgs/http_profile/lib/src/http_client_request_profile.dart +++ b/pkgs/http_profile/lib/src/http_client_request_profile.dart @@ -9,10 +9,21 @@ final class HttpProfileRequestEvent { final int _timestamp; final String _name; + DateTime get timestamp => DateTime.fromMicrosecondsSinceEpoch(_timestamp); + + String get name => _name; + HttpProfileRequestEvent({required DateTime timestamp, required String name}) : _timestamp = timestamp.microsecondsSinceEpoch, _name = name; + static HttpProfileRequestEvent _fromJson(Map json) => + HttpProfileRequestEvent( + timestamp: + DateTime.fromMicrosecondsSinceEpoch(json['timestamp'] as int), + name: json['event'] as String, + ); + Map _toJson() => { 'timestamp': _timestamp, 'event': _name, @@ -31,6 +42,12 @@ final class HttpClientRequestProfile { final _data = {}; + /// The HTTP request method associated with the request. + String get requestMethod => _data['requestMethod'] as String; + + /// The URI to which the request was sent. + String get requestUri => _data['requestUri'] as String; + /// Records an event related to the request. /// /// Usage example: @@ -54,6 +71,12 @@ final class HttpClientRequestProfile { _updated(); } + /// An unmodifiable list containing the events related to the request. + List get events => + UnmodifiableListView((_data['events'] as List>).map( + HttpProfileRequestEvent._fromJson, + )); + /// Details about the request. late final HttpProfileRequestData requestData; diff --git a/pkgs/http_profile/lib/src/http_profile.dart b/pkgs/http_profile/lib/src/http_profile.dart index 3c208050b4..488b68d683 100644 --- a/pkgs/http_profile/lib/src/http_profile.dart +++ b/pkgs/http_profile/lib/src/http_profile.dart @@ -3,7 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:async'; -import 'dart:collection' show UnmodifiableListView; +import 'dart:collection' show UnmodifiableListView, UnmodifiableMapView; import 'dart:developer' show Service, addHttpClientProfilingData; import 'dart:io' show HttpClient, HttpClientResponseCompressionState; import 'dart:isolate' show Isolate; diff --git a/pkgs/http_profile/lib/src/http_profile_request_data.dart b/pkgs/http_profile/lib/src/http_profile_request_data.dart index 2bcd1a7c6c..1463994c12 100644 --- a/pkgs/http_profile/lib/src/http_profile_request_data.dart +++ b/pkgs/http_profile/lib/src/http_profile_request_data.dart @@ -10,6 +10,14 @@ final class HttpProfileProxyData { final bool? _isDirect; final int? _port; + String? get host => _host; + + String? get username => _username; + + bool? get isDirect => _isDirect; + + int? get port => _port; + HttpProfileProxyData({ String? host, String? username, @@ -20,6 +28,14 @@ final class HttpProfileProxyData { _isDirect = isDirect, _port = port; + static HttpProfileProxyData _fromJson(Map json) => + HttpProfileProxyData( + host: json['host'] as String?, + username: json['username'] as String?, + isDirect: json['isDirect'] as bool?, + port: json['port'] as int?, + ); + Map _toJson() => { if (_host != null) 'host': _host, if (_username != null) 'username': _username, @@ -50,20 +66,43 @@ final class HttpProfileRequestData { /// This information is meant to be used for debugging. /// /// It can contain any arbitrary data as long as the values are of type - /// [String] or [int]. For example: - /// { 'localPort': 1285, 'remotePort': 443, 'connectionPoolId': '21x23' } - set connectionInfo(Map value) { + /// [String] or [int]. + /// + /// This field can only be modified by assigning a Map to it. That is: + /// ```dart + /// // Valid + /// profile?.requestData.connectionInfo = { + /// 'localPort': 1285, + /// 'remotePort': 443, + /// 'connectionPoolId': '21x23', + /// }; + /// + /// // Invalid + /// profile?.requestData.connectionInfo?['localPort'] = 1285; + /// ``` + set connectionInfo(Map? value) { _checkAndUpdate(); - for (final v in value.values) { - if (!(v is String || v is int)) { - throw ArgumentError( - 'The values in connectionInfo must be of type String or int.', - ); + if (value == null) { + _requestData.remove('connectionInfo'); + } else { + for (final v in value.values) { + if (!(v is String || v is int)) { + throw ArgumentError( + 'The values in connectionInfo must be of type String or int.', + ); + } } + _requestData['connectionInfo'] = {...value}; } - _requestData['connectionInfo'] = {...value}; } + Map? get connectionInfo => + _requestData['connectionInfo'] == null + ? null + : UnmodifiableMapView( + _requestData['connectionInfo'] as Map, + ); + /// The content length of the request, in bytes. set contentLength(int? value) { _checkAndUpdate(); @@ -74,12 +113,20 @@ final class HttpProfileRequestData { } } + int? get contentLength => _requestData['contentLength'] as int?; + /// Whether automatic redirect following was enabled for the request. - set followRedirects(bool value) { + set followRedirects(bool? value) { _checkAndUpdate(); - _requestData['followRedirects'] = value; + if (value == null) { + _requestData.remove('followRedirects'); + } else { + _requestData['followRedirects'] = value; + } } + bool? get followRedirects => _requestData['followRedirects'] as bool?; + /// The request headers where duplicate headers are represented using a list /// of values. /// @@ -89,7 +136,7 @@ final class HttpProfileRequestData { /// // Foo: Bar /// // Foo: Baz /// - /// profile?.requestData.headersListValues({'Foo', ['Bar', 'Baz']}); + /// profile?.requestData.headersListValues({'Foo': ['Bar', 'Baz']}); /// ``` set headersListValues(Map>? value) { _checkAndUpdate(); @@ -109,7 +156,7 @@ final class HttpProfileRequestData { /// // Foo: Bar /// // Foo: Baz /// - /// profile?.requestData.headersCommaValues({'Foo', 'Bar, Baz']}); + /// profile?.requestData.headersCommaValues({'Foo': 'Bar, Baz']}); /// ``` set headersCommaValues(Map? value) { _checkAndUpdate(); @@ -120,24 +167,81 @@ final class HttpProfileRequestData { _requestData['headers'] = splitHeaderValues(value); } + /// An unmodifiable map representing the request headers. Duplicate headers + /// are represented using a list of values. + /// + /// For example, the map + /// + /// ```dart + /// {'Foo': ['Bar', 'Baz']}); + /// ``` + /// + /// represents the headers + /// + /// Foo: Bar + /// Foo: Baz + Map>? get headers => _requestData['headers'] == null + ? null + : UnmodifiableMapView( + _requestData['headers'] as Map>); + /// The maximum number of redirects allowed during the request. - set maxRedirects(int value) { + set maxRedirects(int? value) { _checkAndUpdate(); - _requestData['maxRedirects'] = value; + if (value == null) { + _requestData.remove('maxRedirects'); + } else { + _requestData['maxRedirects'] = value; + } } + int? get maxRedirects => _requestData['maxRedirects'] as int?; + /// The requested persistent connection state. - set persistentConnection(bool value) { + set persistentConnection(bool? value) { _checkAndUpdate(); - _requestData['persistentConnection'] = value; + if (value == null) { + _requestData.remove('persistentConnection'); + } else { + _requestData['persistentConnection'] = value; + } } + bool? get persistentConnection => + _requestData['persistentConnection'] as bool?; + /// Proxy authentication details for the request. - set proxyDetails(HttpProfileProxyData value) { + set proxyDetails(HttpProfileProxyData? value) { _checkAndUpdate(); - _requestData['proxyDetails'] = value._toJson(); + if (value == null) { + _requestData.remove('proxyDetails'); + } else { + _requestData['proxyDetails'] = value._toJson(); + } } + HttpProfileProxyData? get proxyDetails => _requestData['proxyDetails'] == null + ? null + : HttpProfileProxyData._fromJson( + _requestData['proxyDetails'] as Map, + ); + + /// The time at which the request was initiated. + DateTime get startTime => DateTime.fromMicrosecondsSinceEpoch( + _data['requestStartTimestamp'] as int, + ); + + /// The time when the request was fully sent. + DateTime? get endTime => _data['requestEndTimestamp'] == null + ? null + : DateTime.fromMicrosecondsSinceEpoch( + _data['requestEndTimestamp'] as int, + ); + + /// The error that the request failed with. + String? get error => + _requestData['error'] == null ? null : _requestData['error'] as String; + HttpProfileRequestData._( this._data, this._updated, diff --git a/pkgs/http_profile/lib/src/http_profile_response_data.dart b/pkgs/http_profile/lib/src/http_profile_response_data.dart index 3a972b4f85..87c769c5e2 100644 --- a/pkgs/http_profile/lib/src/http_profile_response_data.dart +++ b/pkgs/http_profile/lib/src/http_profile_response_data.dart @@ -10,6 +10,12 @@ class HttpProfileRedirectData { final String _method; final String _location; + int get statusCode => _statusCode; + + String get method => _method; + + String get location => _location; + HttpProfileRedirectData({ required int statusCode, required String method, @@ -18,6 +24,13 @@ class HttpProfileRedirectData { _method = method, _location = location; + static HttpProfileRedirectData _fromJson(Map json) => + HttpProfileRedirectData( + statusCode: json['statusCode'] as int, + method: json['method'] as String, + location: json['location'] as String, + ); + Map _toJson() => { 'statusCode': _statusCode, 'method': _method, @@ -42,6 +55,12 @@ final class HttpProfileResponseData { .add(redirect._toJson()); } + /// An unmodifiable list containing the redirects that the connection went + /// through. + List get redirects => UnmodifiableListView( + (_responseData['redirects'] as List>) + .map(HttpProfileRedirectData._fromJson)); + /// A sink that can be used to record the body of the response. StreamSink> get bodySink => _body.sink; @@ -54,21 +73,40 @@ final class HttpProfileResponseData { /// This information is meant to be used for debugging. /// /// It can contain any arbitrary data as long as the values are of type - /// [String] or [int]. For example: - /// { 'localPort': 1285, 'remotePort': 443, 'connectionPoolId': '21x23' } - set connectionInfo(Map value) { + /// [String] or [int]. + /// + /// This field can only be modified by assigning a Map to it. That is: + /// ```dart + /// // Valid + /// profile?.responseData.connectionInfo = { + /// 'localPort': 1285, + /// 'remotePort': 443, + /// 'connectionPoolId': '21x23', + /// }; + /// + /// // Invalid + /// profile?.responseData.connectionInfo?['localPort'] = 1285; + /// ``` + set connectionInfo(Map? value) { _checkAndUpdate(); - for (final v in value.values) { - if (!(v is String || v is int)) { - throw ArgumentError( - 'The values in connectionInfo must be of type String or int.', - ); + if (value == null) { + _responseData.remove('connectionInfo'); + } else { + for (final v in value.values) { + if (!(v is String || v is int)) { + throw ArgumentError( + 'The values in connectionInfo must be of type String or int.', + ); + } } + _responseData['connectionInfo'] = {...value}; } - _responseData['connectionInfo'] = {...value}; } - /// The reponse headers where duplicate headers are represented using a list + Map? get connectionInfo => + _responseData['connectionInfo'] as Map?; + + /// The response headers where duplicate headers are represented using a list /// of values. /// /// For example: @@ -77,7 +115,7 @@ final class HttpProfileResponseData { /// // Foo: Bar /// // Foo: Baz /// - /// profile?.requestData.headersListValues({'Foo', ['Bar', 'Baz']}); + /// profile?.requestData.headersListValues({'Foo': ['Bar', 'Baz']}); /// ``` set headersListValues(Map>? value) { _checkAndUpdate(); @@ -97,7 +135,7 @@ final class HttpProfileResponseData { /// // Foo: Bar /// // Foo: Baz /// - /// profile?.responseData.headersCommaValues({'Foo', 'Bar, Baz']}); + /// profile?.responseData.headersCommaValues({'Foo': 'Bar, Baz']}); /// ``` set headersCommaValues(Map? value) { _checkAndUpdate(); @@ -108,16 +146,44 @@ final class HttpProfileResponseData { _responseData['headers'] = splitHeaderValues(value); } + /// An unmodifiable map representing the response headers. Duplicate headers + /// are represented using a list of values. + /// + /// For example, the map + /// + /// ```dart + /// {'Foo': ['Bar', 'Baz']}); + /// ``` + /// + /// represents the headers + /// + /// Foo: Bar + /// Foo: Baz + Map>? get headers => _responseData['headers'] == null + ? null + : UnmodifiableMapView( + _responseData['headers'] as Map>); + // The compression state of the response. // // This specifies whether the response bytes were compressed when they were // received across the wire and whether callers will receive compressed or // uncompressed bytes when they listen to the response body byte stream. - set compressionState(HttpClientResponseCompressionState value) { + set compressionState(HttpClientResponseCompressionState? value) { _checkAndUpdate(); - _responseData['compressionState'] = value.name; + if (value == null) { + _responseData.remove('compressionState'); + } else { + _responseData['compressionState'] = value.name; + } } + HttpClientResponseCompressionState? get compressionState => + _responseData['compressionState'] == null + ? null + : HttpClientResponseCompressionState.values + .firstWhere((v) => v.name == _responseData['compressionState']); + // The reason phrase associated with the response e.g. "OK". set reasonPhrase(String? value) { _checkAndUpdate(); @@ -128,18 +194,33 @@ final class HttpProfileResponseData { } } + String? get reasonPhrase => _responseData['reasonPhrase'] as String?; + /// Whether the status code was one of the normal redirect codes. - set isRedirect(bool value) { + set isRedirect(bool? value) { _checkAndUpdate(); - _responseData['isRedirect'] = value; + if (value == null) { + _responseData.remove('isRedirect'); + } else { + _responseData['isRedirect'] = value; + } } + bool? get isRedirect => _responseData['isRedirect'] as bool?; + /// The persistent connection state returned by the server. - set persistentConnection(bool value) { + set persistentConnection(bool? value) { _checkAndUpdate(); - _responseData['persistentConnection'] = value; + if (value == null) { + _responseData.remove('persistentConnection'); + } else { + _responseData['persistentConnection'] = value; + } } + bool? get persistentConnection => + _responseData['persistentConnection'] as bool?; + /// The content length of the response body, in bytes. set contentLength(int? value) { _checkAndUpdate(); @@ -150,17 +231,42 @@ final class HttpProfileResponseData { } } - set statusCode(int value) { + int? get contentLength => _responseData['contentLength'] as int?; + + set statusCode(int? value) { _checkAndUpdate(); - _responseData['statusCode'] = value; + if (value == null) { + _responseData.remove('statusCode'); + } else { + _responseData['statusCode'] = value; + } } + int? get statusCode => _responseData['statusCode'] as int?; + /// The time at which the initial response was received. - set startTime(DateTime value) { + set startTime(DateTime? value) { _checkAndUpdate(); - _responseData['startTime'] = value.microsecondsSinceEpoch; + if (value == null) { + _responseData.remove('startTime'); + } else { + _responseData['startTime'] = value.microsecondsSinceEpoch; + } } + DateTime? get startTime => _responseData['startTime'] == null + ? null + : DateTime.fromMicrosecondsSinceEpoch(_responseData['startTime'] as int); + + /// The time when the response was fully received. + DateTime? get endTime => _responseData['endTime'] == null + ? null + : DateTime.fromMicrosecondsSinceEpoch(_responseData['endTime'] as int); + + /// The error that the response failed with. + String? get error => + _responseData['error'] == null ? null : _responseData['error'] as String; + HttpProfileResponseData._( this._data, this._updated, diff --git a/pkgs/http_profile/test/http_client_request_profile_test.dart b/pkgs/http_profile/test/http_client_request_profile_test.dart index 6776db8a29..6c6a9e4884 100644 --- a/pkgs/http_profile/test/http_client_request_profile_test.dart +++ b/pkgs/http_profile/test/http_client_request_profile_test.dart @@ -53,20 +53,28 @@ void main() { }); test('calling HttpClientRequestProfile.addEvent', () async { - final events = backingMap['events'] as List>; - expect(events, isEmpty); + final eventsFromBackingMap = + backingMap['events'] as List>; + expect(eventsFromBackingMap, isEmpty); + + expect(profile.events, isEmpty); profile.addEvent(HttpProfileRequestEvent( timestamp: DateTime.parse('2024-03-22'), name: 'an event', )); - expect(events.length, 1); - final event = events.last; + expect(eventsFromBackingMap.length, 1); + final eventFromBackingMap = eventsFromBackingMap.last; expect( - event['timestamp'], + eventFromBackingMap['timestamp'], DateTime.parse('2024-03-22').microsecondsSinceEpoch, ); - expect(event['event'], 'an event'); + expect(eventFromBackingMap['event'], 'an event'); + + expect(profile.events.length, 1); + final eventFromGetter = profile.events.first; + expect(eventFromGetter.timestamp, DateTime.parse('2024-03-22')); + expect(eventFromGetter.name, 'an event'); }); } diff --git a/pkgs/http_profile/test/http_profile_request_data_test.dart b/pkgs/http_profile/test/http_profile_request_data_test.dart index cbd6a20ec4..6723e81331 100644 --- a/pkgs/http_profile/test/http_profile_request_data_test.dart +++ b/pkgs/http_profile/test/http_profile_request_data_test.dart @@ -37,22 +37,51 @@ void main() { ); expect(backingMap['requestMethod'], 'GET'); expect(backingMap['requestUri'], 'https://www.example.com'); + + expect(profile.requestData.startTime, DateTime.parse('2024-03-21')); + expect(profile.requestMethod, 'GET'); + expect(profile.requestUri, 'https://www.example.com'); }); test('populating HttpClientRequestProfile.requestEndTimestamp', () async { expect(backingMap['requestEndTimestamp'], isNull); + expect(profile.requestData.endTime, isNull); + await profile.requestData.close(DateTime.parse('2024-03-23')); expect( backingMap['requestEndTimestamp'], DateTime.parse('2024-03-23').microsecondsSinceEpoch, ); + expect(profile.requestData.endTime, DateTime.parse('2024-03-23')); }); test('populating HttpClientRequestProfile.requestData.connectionInfo', () async { final requestData = backingMap['requestData'] as Map; expect(requestData['connectionInfo'], isNull); + expect(profile.requestData.connectionInfo, isNull); + + profile.requestData.connectionInfo = { + 'localPort': 1285, + 'remotePort': 443, + 'connectionPoolId': '21x23' + }; + + final connectionInfoFromBackingMap = + requestData['connectionInfo'] as Map; + expect(connectionInfoFromBackingMap['localPort'], 1285); + expect(connectionInfoFromBackingMap['remotePort'], 443); + expect(connectionInfoFromBackingMap['connectionPoolId'], '21x23'); + + final connectionInfoFromGetter = profile.requestData.connectionInfo!; + expect(connectionInfoFromGetter['localPort'], 1285); + expect(connectionInfoFromGetter['remotePort'], 443); + expect(connectionInfoFromGetter['connectionPoolId'], '21x23'); + }); + + test('HttpClientRequestProfile.requestData.connectionInfo = null', () async { + final requestData = backingMap['requestData'] as Map; profile.requestData.connectionInfo = { 'localPort': 1285, @@ -60,73 +89,142 @@ void main() { 'connectionPoolId': '21x23' }; - final connectionInfo = + final connectionInfoFromBackingMap = requestData['connectionInfo'] as Map; - expect(connectionInfo['localPort'], 1285); - expect(connectionInfo['remotePort'], 443); - expect(connectionInfo['connectionPoolId'], '21x23'); + expect(connectionInfoFromBackingMap['localPort'], 1285); + expect(connectionInfoFromBackingMap['remotePort'], 443); + expect(connectionInfoFromBackingMap['connectionPoolId'], '21x23'); + + final connectionInfoFromGetter = profile.requestData.connectionInfo!; + expect(connectionInfoFromGetter['localPort'], 1285); + expect(connectionInfoFromGetter['remotePort'], 443); + expect(connectionInfoFromGetter['connectionPoolId'], '21x23'); + + profile.requestData.connectionInfo = null; + + expect(requestData['connectionInfo'], isNull); + expect(profile.requestData.connectionInfo, isNull); }); test('populating HttpClientRequestProfile.requestData.contentLength', () async { final requestData = backingMap['requestData'] as Map; expect(requestData['contentLength'], isNull); + expect(profile.requestData.contentLength, isNull); profile.requestData.contentLength = 1200; expect(requestData['contentLength'], 1200); + expect(profile.requestData.contentLength, 1200); }); - test('HttpClientRequestProfile.requestData.contentLength = nil', () async { + test('HttpClientRequestProfile.requestData.contentLength = null', () async { final requestData = backingMap['requestData'] as Map; profile.requestData.contentLength = 1200; expect(requestData['contentLength'], 1200); + expect(profile.requestData.contentLength, 1200); profile.requestData.contentLength = null; expect(requestData['contentLength'], isNull); + expect(profile.requestData.contentLength, isNull); }); test('populating HttpClientRequestProfile.requestData.error', () async { final requestData = backingMap['requestData'] as Map; expect(requestData['error'], isNull); + expect(profile.requestData.error, isNull); await profile.requestData.closeWithError('failed'); expect(requestData['error'], 'failed'); + expect(profile.requestData.error, 'failed'); }); test('populating HttpClientRequestProfile.requestData.followRedirects', () async { final requestData = backingMap['requestData'] as Map; expect(requestData['followRedirects'], isNull); + expect(profile.requestData.followRedirects, isNull); profile.requestData.followRedirects = true; expect(requestData['followRedirects'], true); + expect(profile.requestData.followRedirects, true); + }); + + test('HttpClientRequestProfile.requestData.followRedirects = null', () async { + final requestData = backingMap['requestData'] as Map; + + profile.requestData.followRedirects = true; + expect(requestData['followRedirects'], true); + expect(profile.requestData.followRedirects, true); + + profile.requestData.followRedirects = null; + expect(requestData['followRedirects'], isNull); + expect(profile.requestData.followRedirects, isNull); }); test('populating HttpClientRequestProfile.requestData.headersListValues', () async { final requestData = backingMap['requestData'] as Map; expect(requestData['headers'], isNull); + expect(profile.requestData.headers, isNull); profile.requestData.headersListValues = { 'fruit': ['apple', 'banana', 'grape'], 'content-length': ['0'], }; - final headers = requestData['headers'] as Map>; - expect(headers, { + expect( + requestData['headers'], + { + 'fruit': ['apple', 'banana', 'grape'], + 'content-length': ['0'], + }, + ); + expect( + profile.requestData.headers, + { + 'fruit': ['apple', 'banana', 'grape'], + 'content-length': ['0'], + }, + ); + }); + + test('HttpClientRequestProfile.requestData.headersListValues = null', + () async { + final requestData = backingMap['requestData'] as Map; + + profile.requestData.headersListValues = { 'fruit': ['apple', 'banana', 'grape'], 'content-length': ['0'], - }); + }; + expect( + requestData['headers'], + { + 'fruit': ['apple', 'banana', 'grape'], + 'content-length': ['0'], + }, + ); + expect( + profile.requestData.headers, + { + 'fruit': ['apple', 'banana', 'grape'], + 'content-length': ['0'], + }, + ); + + profile.requestData.headersListValues = null; + expect(requestData['headers'], isNull); + expect(profile.requestData.headers, isNull); }); test('populating HttpClientRequestProfile.requestData.headersCommaValues', () async { final requestData = backingMap['requestData'] as Map; expect(requestData['headers'], isNull); + expect(profile.requestData.headers, isNull); profile.requestData.headersCommaValues = { 'set-cookie': @@ -135,39 +233,114 @@ void main() { 'sessionId=e8bb43229de9; Domain=foo.example.com' }; - final headers = requestData['headers'] as Map>; - expect(headers, { - 'set-cookie': [ - 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', - 'sessionId=e8bb43229de9; Domain=foo.example.com' - ] - }); + expect( + requestData['headers'], + { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }, + ); + expect( + profile.requestData.headers, + { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }, + ); + }); + + test('HttpClientRequestProfile.requestData.headersCommaValues = null', + () async { + final requestData = backingMap['requestData'] as Map; + + profile.requestData.headersCommaValues = { + 'set-cookie': + // ignore: missing_whitespace_between_adjacent_strings + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO,' + 'sessionId=e8bb43229de9; Domain=foo.example.com' + }; + expect( + requestData['headers'], + { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }, + ); + expect( + profile.requestData.headers, + { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }, + ); + + profile.requestData.headersCommaValues = null; + expect(requestData['headers'], isNull); + expect(profile.requestData.headers, isNull); }); test('populating HttpClientRequestProfile.requestData.maxRedirects', () async { final requestData = backingMap['requestData'] as Map; expect(requestData['maxRedirects'], isNull); + expect(profile.requestData.maxRedirects, isNull); profile.requestData.maxRedirects = 5; expect(requestData['maxRedirects'], 5); + expect(profile.requestData.maxRedirects, 5); + }); + + test('HttpClientRequestProfile.requestData.maxRedirects = null', () async { + final requestData = backingMap['requestData'] as Map; + + profile.requestData.maxRedirects = 5; + expect(requestData['maxRedirects'], 5); + expect(profile.requestData.maxRedirects, 5); + + profile.requestData.maxRedirects = null; + expect(requestData['maxRedirects'], isNull); + expect(profile.requestData.maxRedirects, isNull); }); test('populating HttpClientRequestProfile.requestData.persistentConnection', () async { final requestData = backingMap['requestData'] as Map; expect(requestData['persistentConnection'], isNull); + expect(profile.requestData.persistentConnection, isNull); profile.requestData.persistentConnection = true; expect(requestData['persistentConnection'], true); + expect(profile.requestData.persistentConnection, true); + }); + + test('HttpClientRequestProfile.requestData.persistentConnection = null', + () async { + final requestData = backingMap['requestData'] as Map; + + profile.requestData.persistentConnection = true; + expect(requestData['persistentConnection'], true); + expect(profile.requestData.persistentConnection, true); + + profile.requestData.persistentConnection = null; + expect(requestData['persistentConnection'], isNull); + expect(profile.requestData.persistentConnection, isNull); }); test('populating HttpClientRequestProfile.requestData.proxyDetails', () async { final requestData = backingMap['requestData'] as Map; expect(requestData['proxyDetails'], isNull); + expect(profile.requestData.proxyDetails, isNull); profile.requestData.proxyDetails = HttpProfileProxyData( host: 'https://www.example.com', @@ -176,14 +349,47 @@ void main() { port: 4321, ); - final proxyDetails = requestData['proxyDetails'] as Map; - expect( - proxyDetails['host'], - 'https://www.example.com', + final proxyDetailsFromBackingMap = + requestData['proxyDetails'] as Map; + expect(proxyDetailsFromBackingMap['host'], 'https://www.example.com'); + expect(proxyDetailsFromBackingMap['username'], 'abc123'); + expect(proxyDetailsFromBackingMap['isDirect'], true); + expect(proxyDetailsFromBackingMap['port'], 4321); + + final proxyDetailsFromGetter = profile.requestData.proxyDetails!; + expect(proxyDetailsFromGetter.host, 'https://www.example.com'); + expect(proxyDetailsFromGetter.username, 'abc123'); + expect(proxyDetailsFromGetter.isDirect, true); + expect(proxyDetailsFromGetter.port, 4321); + }); + + test('HttpClientRequestProfile.requestData.proxyDetails = null', () async { + final requestData = backingMap['requestData'] as Map; + + profile.requestData.proxyDetails = HttpProfileProxyData( + host: 'https://www.example.com', + username: 'abc123', + isDirect: true, + port: 4321, ); - expect(proxyDetails['username'], 'abc123'); - expect(proxyDetails['isDirect'], true); - expect(proxyDetails['port'], 4321); + + final proxyDetailsFromBackingMap = + requestData['proxyDetails'] as Map; + expect(proxyDetailsFromBackingMap['host'], 'https://www.example.com'); + expect(proxyDetailsFromBackingMap['username'], 'abc123'); + expect(proxyDetailsFromBackingMap['isDirect'], true); + expect(proxyDetailsFromBackingMap['port'], 4321); + + final proxyDetailsFromGetter = profile.requestData.proxyDetails!; + expect(proxyDetailsFromGetter.host, 'https://www.example.com'); + expect(proxyDetailsFromGetter.username, 'abc123'); + expect(proxyDetailsFromGetter.isDirect, true); + expect(proxyDetailsFromGetter.port, 4321); + + profile.requestData.proxyDetails = null; + + expect(requestData['proxyDetails'], isNull); + expect(profile.requestData.proxyDetails, isNull); }); test('using HttpClientRequestProfile.requestData.bodySink', () async { diff --git a/pkgs/http_profile/test/http_profile_response_data_test.dart b/pkgs/http_profile/test/http_profile_response_data_test.dart index e24a758021..f256971463 100644 --- a/pkgs/http_profile/test/http_profile_response_data_test.dart +++ b/pkgs/http_profile/test/http_profile_response_data_test.dart @@ -28,8 +28,10 @@ void main() { test('calling HttpClientRequestProfile.responseData.addRedirect', () async { final responseData = backingMap['responseData'] as Map; - final redirects = responseData['redirects'] as List>; - expect(redirects, isEmpty); + final redirectsFromBackingMap = + responseData['redirects'] as List>; + expect(redirectsFromBackingMap, isEmpty); + expect(profile.responseData.redirects, isEmpty); profile.responseData.addRedirect(HttpProfileRedirectData( statusCode: 301, @@ -37,17 +39,24 @@ void main() { location: 'https://images.example.com/1', )); - expect(redirects.length, 1); - final redirect = redirects.last; - expect(redirect['statusCode'], 301); - expect(redirect['method'], 'GET'); - expect(redirect['location'], 'https://images.example.com/1'); + expect(redirectsFromBackingMap.length, 1); + final redirectFromBackingMap = redirectsFromBackingMap.last; + expect(redirectFromBackingMap['statusCode'], 301); + expect(redirectFromBackingMap['method'], 'GET'); + expect(redirectFromBackingMap['location'], 'https://images.example.com/1'); + + expect(profile.responseData.redirects.length, 1); + final redirectFromGetter = profile.responseData.redirects.first; + expect(redirectFromGetter.statusCode, 301); + expect(redirectFromGetter.method, 'GET'); + expect(redirectFromGetter.location, 'https://images.example.com/1'); }); test('populating HttpClientRequestProfile.responseData.connectionInfo', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['connectionInfo'], isNull); + expect(profile.responseData.connectionInfo, isNull); profile.responseData.connectionInfo = { 'localPort': 1285, @@ -55,17 +64,49 @@ void main() { 'connectionPoolId': '21x23' }; - final connectionInfo = + final connectionInfoFromBackingMap = responseData['connectionInfo'] as Map; - expect(connectionInfo['localPort'], 1285); - expect(connectionInfo['remotePort'], 443); - expect(connectionInfo['connectionPoolId'], '21x23'); + expect(connectionInfoFromBackingMap['localPort'], 1285); + expect(connectionInfoFromBackingMap['remotePort'], 443); + expect(connectionInfoFromBackingMap['connectionPoolId'], '21x23'); + + final connectionInfoFromGetter = profile.responseData.connectionInfo!; + expect(connectionInfoFromGetter['localPort'], 1285); + expect(connectionInfoFromGetter['remotePort'], 443); + expect(connectionInfoFromGetter['connectionPoolId'], '21x23'); + }); + + test('HttpClientRequestProfile.responseData.connectionInfo = null', () async { + final responseData = backingMap['responseData'] as Map; + + profile.responseData.connectionInfo = { + 'localPort': 1285, + 'remotePort': 443, + 'connectionPoolId': '21x23' + }; + + final connectionInfoFromBackingMap = + responseData['connectionInfo'] as Map; + expect(connectionInfoFromBackingMap['localPort'], 1285); + expect(connectionInfoFromBackingMap['remotePort'], 443); + expect(connectionInfoFromBackingMap['connectionPoolId'], '21x23'); + + final connectionInfoFromGetter = profile.responseData.connectionInfo!; + expect(connectionInfoFromGetter['localPort'], 1285); + expect(connectionInfoFromGetter['remotePort'], 443); + expect(connectionInfoFromGetter['connectionPoolId'], '21x23'); + + profile.responseData.connectionInfo = null; + + expect(responseData['connectionInfo'], isNull); + expect(profile.responseData.connectionInfo, isNull); }); test('populating HttpClientRequestProfile.responseData.headersListValues', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['headers'], isNull); + expect(profile.responseData.headers, isNull); profile.responseData.headersListValues = { 'connection': ['keep-alive'], @@ -73,18 +114,91 @@ void main() { 'content-type': ['application/json', 'charset=utf-8'], }; - final headers = responseData['headers'] as Map>; - expect(headers, { + expect( + responseData['headers'], + { + 'connection': ['keep-alive'], + 'cache-control': ['max-age=43200'], + 'content-type': ['application/json', 'charset=utf-8'], + }, + ); + expect( + profile.responseData.headers, + { + 'connection': ['keep-alive'], + 'cache-control': ['max-age=43200'], + 'content-type': ['application/json', 'charset=utf-8'], + }, + ); + }); + + test('HttpClientRequestProfile.responseData.headersListValues = null', + () async { + final responseData = backingMap['responseData'] as Map; + + profile.responseData.headersListValues = { 'connection': ['keep-alive'], 'cache-control': ['max-age=43200'], 'content-type': ['application/json', 'charset=utf-8'], - }); + }; + expect( + responseData['headers'], + { + 'connection': ['keep-alive'], + 'cache-control': ['max-age=43200'], + 'content-type': ['application/json', 'charset=utf-8'], + }, + ); + expect( + profile.responseData.headers, + { + 'connection': ['keep-alive'], + 'cache-control': ['max-age=43200'], + 'content-type': ['application/json', 'charset=utf-8'], + }, + ); + + profile.responseData.headersListValues = null; + expect(responseData['headers'], isNull); + expect(profile.responseData.headers, isNull); }); test('populating HttpClientRequestProfile.responseData.headersCommaValues', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['headers'], isNull); + expect(profile.responseData.headers, isNull); + + profile.responseData.headersCommaValues = { + 'set-cookie': + // ignore: missing_whitespace_between_adjacent_strings + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO,' + 'sessionId=e8bb43229de9; Domain=foo.example.com' + }; + + expect( + responseData['headers'], + { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }, + ); + expect( + profile.responseData.headers, + { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }, + ); + }); + + test('HttpClientRequestProfile.responseData.headersCommaValues = null', + () async { + final responseData = backingMap['responseData'] as Map; profile.responseData.headersCommaValues = { 'set-cookie': @@ -92,87 +206,186 @@ void main() { 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO,' 'sessionId=e8bb43229de9; Domain=foo.example.com' }; + expect( + responseData['headers'], + { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }, + ); + expect( + profile.responseData.headers, + { + 'set-cookie': [ + 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', + 'sessionId=e8bb43229de9; Domain=foo.example.com' + ] + }, + ); - final headers = responseData['headers'] as Map>; - expect(headers, { - 'set-cookie': [ - 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT; Path=/,,HE,=L=LO', - 'sessionId=e8bb43229de9; Domain=foo.example.com' - ] - }); + profile.responseData.headersCommaValues = null; + expect(responseData['headers'], isNull); + expect(profile.responseData.headers, isNull); }); test('populating HttpClientRequestProfile.responseData.compressionState', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['compressionState'], isNull); + expect(profile.responseData.compressionState, isNull); profile.responseData.compressionState = HttpClientResponseCompressionState.decompressed; expect(responseData['compressionState'], 'decompressed'); + expect( + profile.responseData.compressionState, + HttpClientResponseCompressionState.decompressed, + ); + }); + + test('HttpClientRequestProfile.responseData.compressionState = null', + () async { + final responseData = backingMap['responseData'] as Map; + + profile.responseData.compressionState = + HttpClientResponseCompressionState.decompressed; + expect(responseData['compressionState'], 'decompressed'); + expect( + profile.responseData.compressionState, + HttpClientResponseCompressionState.decompressed, + ); + + profile.responseData.compressionState = null; + expect(responseData['compressionState'], isNull); + expect(profile.responseData.compressionState, isNull); }); test('populating HttpClientRequestProfile.responseData.reasonPhrase', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['reasonPhrase'], isNull); + expect(profile.responseData.reasonPhrase, isNull); profile.responseData.reasonPhrase = 'OK'; expect(responseData['reasonPhrase'], 'OK'); + expect(profile.responseData.reasonPhrase, 'OK'); + }); + + test('HttpClientRequestProfile.responseData.reasonPhrase = null', () async { + final responseData = backingMap['responseData'] as Map; + + profile.responseData.reasonPhrase = 'OK'; + expect(responseData['reasonPhrase'], 'OK'); + expect(profile.responseData.reasonPhrase, 'OK'); + + profile.responseData.reasonPhrase = null; + expect(responseData['reasonPhrase'], isNull); + expect(profile.responseData.reasonPhrase, isNull); }); test('populating HttpClientRequestProfile.responseData.isRedirect', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['isRedirect'], isNull); + expect(profile.responseData.isRedirect, isNull); profile.responseData.isRedirect = true; expect(responseData['isRedirect'], true); + expect(profile.responseData.isRedirect, true); + }); + + test('HttpClientRequestProfile.responseData.isRedirect = null', () async { + final responseData = backingMap['responseData'] as Map; + + profile.responseData.isRedirect = true; + expect(responseData['isRedirect'], true); + expect(profile.responseData.isRedirect, true); + + profile.responseData.isRedirect = null; + expect(responseData['isRedirect'], isNull); + expect(profile.responseData.isRedirect, isNull); }); test('populating HttpClientRequestProfile.responseData.persistentConnection', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['persistentConnection'], isNull); + expect(profile.responseData.persistentConnection, isNull); profile.responseData.persistentConnection = true; expect(responseData['persistentConnection'], true); + expect(profile.responseData.persistentConnection, true); + }); + + test('HttpClientRequestProfile.responseData.persistentConnection = null', + () async { + final responseData = backingMap['responseData'] as Map; + + profile.responseData.persistentConnection = true; + expect(responseData['persistentConnection'], true); + expect(profile.responseData.persistentConnection, true); + + profile.responseData.persistentConnection = null; + expect(responseData['persistentConnection'], isNull); + expect(profile.responseData.persistentConnection, isNull); }); test('populating HttpClientRequestProfile.responseData.contentLength', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['contentLength'], isNull); + expect(profile.responseData.contentLength, isNull); profile.responseData.contentLength = 1200; expect(responseData['contentLength'], 1200); + expect(profile.responseData.contentLength, 1200); }); - test('HttpClientRequestProfile.responseData.contentLength = nil', () async { + test('HttpClientRequestProfile.responseData.contentLength = null', () async { final responseData = backingMap['responseData'] as Map; + profile.responseData.contentLength = 1200; expect(responseData['contentLength'], 1200); + expect(profile.responseData.contentLength, 1200); profile.responseData.contentLength = null; expect(responseData['contentLength'], isNull); + expect(profile.responseData.contentLength, isNull); }); test('populating HttpClientRequestProfile.responseData.statusCode', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['statusCode'], isNull); + expect(profile.responseData.statusCode, isNull); profile.responseData.statusCode = 200; expect(responseData['statusCode'], 200); + expect(profile.responseData.statusCode, 200); + }); + + test('HttpClientRequestProfile.responseData.statusCode = null', () async { + final responseData = backingMap['responseData'] as Map; + + profile.responseData.statusCode = 200; + expect(responseData['statusCode'], 200); + expect(profile.responseData.statusCode, 200); + + profile.responseData.statusCode = null; + expect(responseData['statusCode'], isNull); + expect(profile.responseData.statusCode, isNull); }); test('populating HttpClientRequestProfile.responseData.startTime', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['startTime'], isNull); + expect(profile.responseData.startTime, isNull); profile.responseData.startTime = DateTime.parse('2024-03-21'); @@ -180,11 +393,28 @@ void main() { responseData['startTime'], DateTime.parse('2024-03-21').microsecondsSinceEpoch, ); + expect(profile.responseData.startTime, DateTime.parse('2024-03-21')); + }); + + test('HttpClientRequestProfile.responseData.startTime = null', () async { + final responseData = backingMap['responseData'] as Map; + + profile.responseData.startTime = DateTime.parse('2024-03-21'); + expect( + responseData['startTime'], + DateTime.parse('2024-03-21').microsecondsSinceEpoch, + ); + expect(profile.responseData.startTime, DateTime.parse('2024-03-21')); + + profile.responseData.startTime = null; + expect(responseData['startTime'], isNull); + expect(profile.responseData.startTime, isNull); }); test('populating HttpClientRequestProfile.responseData.endTime', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['endTime'], isNull); + expect(profile.responseData.endTime, isNull); await profile.responseData.close(DateTime.parse('2024-03-23')); @@ -192,15 +422,18 @@ void main() { responseData['endTime'], DateTime.parse('2024-03-23').microsecondsSinceEpoch, ); + expect(profile.responseData.endTime, DateTime.parse('2024-03-23')); }); test('populating HttpClientRequestProfile.responseData.error', () async { final responseData = backingMap['responseData'] as Map; expect(responseData['error'], isNull); + expect(profile.responseData.error, isNull); await profile.responseData.closeWithError('failed'); expect(responseData['error'], 'failed'); + expect(profile.responseData.error, 'failed'); }); test('using HttpClientRequestProfile.responseData.bodySink', () async { From f14d775d22b61e78cbd2169a0b7421607de8cb5b Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 19 Mar 2024 14:48:15 -0700 Subject: [PATCH 337/448] Add a WebSocket implementation to package:cupertino_http (#1153) --- .github/workflows/cupertino.yml | 4 +- .../example/integration_test/main.dart | 2 + .../example/integration_test/utils_test.dart | 31 ++- .../web_socket_conformance_test.dart | 22 ++ pkgs/cupertino_http/example/pubspec.yaml | 2 + pkgs/cupertino_http/lib/cupertino_http.dart | 1 + .../cupertino_http/lib/src/cupertino_api.dart | 37 +++- .../lib/src/cupertino_web_socket.dart | 204 ++++++++++++++++++ pkgs/cupertino_http/lib/src/utils.dart | 13 +- pkgs/cupertino_http/pubspec.yaml | 10 +- 10 files changed, 313 insertions(+), 13 deletions(-) create mode 100644 pkgs/cupertino_http/example/integration_test/web_socket_conformance_test.dart create mode 100644 pkgs/cupertino_http/lib/src/cupertino_web_socket.dart diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index f434431b44..1110e60e08 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -31,7 +31,7 @@ jobs: matrix: # Test on the minimum supported flutter version and the latest # version. - flutter-version: ["3.16.0", "any"] + flutter-version: ["3.19.0", "any"] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 @@ -61,4 +61,4 @@ jobs: run: | cd example flutter pub get - flutter test --timeout=1200s integration_test/ + flutter test --timeout=1200s integration_test/main.dart diff --git a/pkgs/cupertino_http/example/integration_test/main.dart b/pkgs/cupertino_http/example/integration_test/main.dart index 12128b5b9a..0d4d5e16d9 100644 --- a/pkgs/cupertino_http/example/integration_test/main.dart +++ b/pkgs/cupertino_http/example/integration_test/main.dart @@ -19,6 +19,7 @@ import 'url_session_delegate_test.dart' as url_session_delegate_test; import 'url_session_task_test.dart' as url_session_task_test; import 'url_session_test.dart' as url_session_test; import 'utils_test.dart' as utils_test; +import 'web_socket_conformance_test.dart' as web_socket_conformance_test; /// Execute all the tests in this directory. /// @@ -43,4 +44,5 @@ void main() { url_session_task_test.main(); url_session_test.main(); utils_test.main(); + web_socket_conformance_test.main(); } diff --git a/pkgs/cupertino_http/example/integration_test/utils_test.dart b/pkgs/cupertino_http/example/integration_test/utils_test.dart index 1bf1ca6f40..315282a6be 100644 --- a/pkgs/cupertino_http/example/integration_test/utils_test.dart +++ b/pkgs/cupertino_http/example/integration_test/utils_test.dart @@ -20,11 +20,11 @@ void main() { }); }); - group('stringDictToMap', () { + group('stringNSDictionaryToMap', () { test('empty input', () { final d = ncb.NSMutableDictionary.new1(linkedLibs); - expect(stringDictToMap(d), {}); + expect(stringNSDictionaryToMap(d), {}); }); test('single string input', () { @@ -32,7 +32,7 @@ void main() { ..setObject_forKey_( 'value'.toNSString(linkedLibs), 'key'.toNSString(linkedLibs)); - expect(stringDictToMap(d), {'key': 'value'}); + expect(stringNSDictionaryToMap(d), {'key': 'value'}); }); test('multiple string input', () { @@ -43,8 +43,31 @@ void main() { 'value2'.toNSString(linkedLibs), 'key2'.toNSString(linkedLibs)) ..setObject_forKey_( 'value3'.toNSString(linkedLibs), 'key3'.toNSString(linkedLibs)); - expect(stringDictToMap(d), + expect(stringNSDictionaryToMap(d), {'key1': 'value1', 'key2': 'value2', 'key3': 'value3'}); }); }); + + group('stringIterableToNSArray', () { + test('empty input', () { + final array = stringIterableToNSArray([]); + expect(array.count, 0); + }); + + test('single string input', () { + final array = stringIterableToNSArray(['apple']); + expect(array.count, 1); + expect( + ncb.NSString.castFrom(array.objectAtIndex_(0)).toString(), 'apple'); + }); + + test('multiple string input', () { + final array = stringIterableToNSArray(['apple', 'banana']); + expect(array.count, 2); + expect( + ncb.NSString.castFrom(array.objectAtIndex_(0)).toString(), 'apple'); + expect( + ncb.NSString.castFrom(array.objectAtIndex_(1)).toString(), 'banana'); + }); + }); } diff --git a/pkgs/cupertino_http/example/integration_test/web_socket_conformance_test.dart b/pkgs/cupertino_http/example/integration_test/web_socket_conformance_test.dart new file mode 100644 index 0000000000..8dff3a2626 --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/web_socket_conformance_test.dart @@ -0,0 +1,22 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:cupertino_http/cupertino_http.dart'; +import 'package:test/test.dart'; +import 'package:web_socket_conformance_tests/web_socket_conformance_tests.dart'; + +void main() { + testAll(CupertinoWebSocket.connect); + + group('defaultSessionConfiguration', () { + testAll( + CupertinoWebSocket.connect, + ); + }); + group('fromSessionConfiguration', () { + final config = URLSessionConfiguration.ephemeralSessionConfiguration(); + testAll((uri, {protocols}) => + CupertinoWebSocket.connect(uri, protocols: protocols, config: config)); + }); +} diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index 8d61e62bed..f394051994 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -31,6 +31,8 @@ dev_dependencies: integration_test: sdk: flutter test: ^1.21.1 + web_socket_conformance_tests: + path: ../../web_socket_conformance_tests/ flutter: uses-material-design: true diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 243ac81436..68691b8ab4 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -88,3 +88,4 @@ import 'src/cupertino_client.dart'; export 'src/cupertino_api.dart'; export 'src/cupertino_client.dart'; +export 'src/cupertino_web_socket.dart'; diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 5cebd7ed42..780ddde0ec 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -352,7 +352,7 @@ class URLSessionConfiguration Map? get httpAdditionalHeaders { if (_nsObject.HTTPAdditionalHeaders case var additionalHeaders?) { final headers = ncb.NSDictionary.castFrom(additionalHeaders); - return stringDictToMap(headers); + return stringNSDictionaryToMap(headers); } return null; } @@ -628,7 +628,7 @@ class HTTPURLResponse extends URLResponse { Map get allHeaderFields { final headers = ncb.NSDictionary.castFrom(_httpUrlResponse.allHeaderFields!); - return stringDictToMap(headers); + return stringNSDictionaryToMap(headers); } @override @@ -992,7 +992,7 @@ class URLRequest extends _ObjectHolder { return null; } else { final headers = ncb.NSDictionary.castFrom(_nsObject.allHTTPHeaderFields!); - return stringDictToMap(headers); + return stringNSDictionaryToMap(headers); } } @@ -1584,4 +1584,35 @@ class URLSession extends _ObjectHolder { onWebSocketTaskClosed: _onWebSocketTaskClosed); return task; } + + /// Creates a [URLSessionWebSocketTask] that represents a connection to a + /// WebSocket endpoint. + /// + /// See [NSURLSession webSocketTaskWithURL:protocols:](https://developer.apple.com/documentation/foundation/nsurlsession/3181172-websockettaskwithurl) + URLSessionWebSocketTask webSocketTaskWithURL(Uri uri, + {Iterable? protocols}) { + if (_isBackground) { + throw UnsupportedError( + 'WebSocket tasks are not supported in background sessions'); + } + + final URLSessionWebSocketTask task; + if (protocols == null) { + task = URLSessionWebSocketTask._( + _nsObject.webSocketTaskWithURL_(uriToNSURL(uri))); + } else { + task = URLSessionWebSocketTask._( + _nsObject.webSocketTaskWithURL_protocols_( + uriToNSURL(uri), stringIterableToNSArray(protocols))); + } + _setupDelegation(_delegate, this, task, + onComplete: _onComplete, + onData: _onData, + onFinishedDownloading: _onFinishedDownloading, + onRedirect: _onRedirect, + onResponse: _onResponse, + onWebSocketTaskOpened: _onWebSocketTaskOpened, + onWebSocketTaskClosed: _onWebSocketTaskClosed); + return task; + } } diff --git a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart new file mode 100644 index 0000000000..94246744c2 --- /dev/null +++ b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart @@ -0,0 +1,204 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:web_socket/web_socket.dart'; + +import 'cupertino_api.dart'; + +/// An error occurred while connecting to the peer. +class ConnectionException extends WebSocketException { + final Error error; + + ConnectionException(super.message, this.error); + + @override + String toString() => 'CupertinoErrorWebSocketException: $message $error'; +} + +/// A [WebSocket] implemented using the +/// [NSURLSessionWebSocketTask API](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask). +class CupertinoWebSocket implements WebSocket { + /// Create a new WebSocket connection using the + /// [NSURLSessionWebSocketTask API](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask). + /// + /// The URL supplied in [url] must use the scheme ws or wss. + /// + /// If provided, the [protocols] argument indicates that subprotocols that + /// the peer is able to select. See + /// [RFC-6455 1.9](https://datatracker.ietf.org/doc/html/rfc6455#section-1.9). + static Future connect(Uri url, + {Iterable? protocols, URLSessionConfiguration? config}) async { + if (!url.isScheme('ws') && !url.isScheme('wss')) { + throw ArgumentError.value( + url, 'url', 'only ws: and wss: schemes are supported'); + } + + final readyCompleter = Completer(); + late CupertinoWebSocket webSocket; + + final session = URLSession.sessionWithConfiguration( + config ?? URLSessionConfiguration.defaultSessionConfiguration(), + // In a successful flow, the callbacks will be made in this order: + // onWebSocketTaskOpened(...) // Good connect. + // + // onWebSocketTaskClosed(...) // Optional: peer sent Close frame. + // onComplete(..., error=null) // Disconnected. + // + // In a failure to connect to the peer, the flow will be: + // onComplete(session, task, error=error): + // + // `onComplete` can also be called at any point if the peer is + // disconnected without Close frames being exchanged. + onWebSocketTaskOpened: (session, task, protocol) { + webSocket = CupertinoWebSocket._(task, protocol ?? ''); + readyCompleter.complete(webSocket); + }, onWebSocketTaskClosed: (session, task, closeCode, reason) { + assert(readyCompleter.isCompleted); + webSocket._connectionClosed(closeCode, reason); + }, onComplete: (session, task, error) { + if (!readyCompleter.isCompleted) { + // `onWebSocketTaskOpened should have been called and completed + // `readyCompleter`. So either there was a error creating the connection + // or a logic error. + if (error == null) { + throw AssertionError( + 'expected an error or "onWebSocketTaskOpened" to be called ' + 'first'); + } + readyCompleter.completeError( + ConnectionException('connection ended unexpectedly', error)); + } else { + // There are three possibilities here: + // 1. the peer sent a close Frame, `onWebSocketTaskClosed` was already + // called and `_connectionClosed` is a no-op. + // 2. we sent a close Frame (through `close()`) and `_connectionClosed` + // is a no-op. + // 3. an error occured (e.g. network failure) and `_connectionClosed` + // will signal that and close `event`. + webSocket._connectionClosed( + 1006, Data.fromList('abnormal close'.codeUnits)); + } + }); + + session.webSocketTaskWithURL(url, protocols: protocols).resume(); + return readyCompleter.future; + } + + final URLSessionWebSocketTask _task; + final String _protocol; + final _events = StreamController(); + + CupertinoWebSocket._(this._task, this._protocol) { + _scheduleReceive(); + } + + /// Handle an incoming message from the peer and schedule receiving the next + /// message. + void _handleMessage(URLSessionWebSocketMessage value) { + late WebSocketEvent event; + switch (value.type) { + case URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeString: + event = TextDataReceived(value.string!); + break; + case URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeData: + event = BinaryDataReceived(value.data!.bytes); + break; + } + _events.add(event); + _scheduleReceive(); + } + + void _scheduleReceive() { + unawaited(_task + .receiveMessage() + .then(_handleMessage, onError: _closeConnectionWithError)); + } + + /// Close the WebSocket connection due to an error and send the + /// [CloseReceived] event. + void _closeConnectionWithError(Object e) { + if (e is Error) { + if (e.domain == 'NSPOSIXErrorDomain' && e.code == 57) { + // Socket is not connected. + // onWebSocketTaskClosed/onComplete will be invoked and may indicate a + // close code. + return; + } + var (int code, String? reason) = switch ([e.domain, e.code]) { + ['NSPOSIXErrorDomain', 100] => (1002, e.localizedDescription), + _ => (1006, e.localizedDescription) + }; + _task.cancel(); + _connectionClosed( + code, reason == null ? null : Data.fromList(reason.codeUnits)); + } else { + throw StateError('unexpected error: $e'); + } + } + + void _connectionClosed(int? closeCode, Data? reason) { + if (!_events.isClosed) { + final closeReason = reason == null ? '' : utf8.decode(reason.bytes); + + _events + ..add(CloseReceived(closeCode, closeReason)) + ..close(); + } + } + + @override + void sendBytes(Uint8List b) { + if (_events.isClosed) { + throw StateError('WebSocket is closed'); + } + _task + .sendMessage(URLSessionWebSocketMessage.fromData(Data.fromList(b))) + .then((_) => _, onError: _closeConnectionWithError); + } + + @override + void sendText(String s) { + if (_events.isClosed) { + throw StateError('WebSocket is closed'); + } + _task + .sendMessage(URLSessionWebSocketMessage.fromString(s)) + .then((_) => _, onError: _closeConnectionWithError); + } + + @override + Future close([int? code, String? reason]) async { + if (_events.isClosed) { + throw StateError('WebSocket is closed'); + } + + if (code != null) { + RangeError.checkValueInInterval(code, 3000, 4999, 'code'); + } + if (reason != null && utf8.encode(reason).length > 123) { + throw ArgumentError.value(reason, 'reason', + 'reason must be <= 123 bytes long when encoded as UTF-8'); + } + + if (!_events.isClosed) { + unawaited(_events.close()); + if (code != null) { + reason = reason ?? ''; + _task.cancelWithCloseCode(code, Data.fromList(utf8.encode(reason))); + } else { + _task.cancel(); + } + } + } + + @override + Stream get events => _events.stream; + + @override + String get protocol => _protocol; +} diff --git a/pkgs/cupertino_http/lib/src/utils.dart b/pkgs/cupertino_http/lib/src/utils.dart index be23e5cdcb..02fc5489b1 100644 --- a/pkgs/cupertino_http/lib/src/utils.dart +++ b/pkgs/cupertino_http/lib/src/utils.dart @@ -59,7 +59,7 @@ String? toStringOrNull(ncb.NSString? s) { /// Converts a NSDictionary containing NSString keys and NSString values into /// an equivalent map. -Map stringDictToMap(ncb.NSDictionary d) { +Map stringNSDictionaryToMap(ncb.NSDictionary d) { // TODO(https://github.com/dart-lang/ffigen/issues/374): Make this // function type safe. Currently it will unconditionally cast both keys and // values to NSString with a likely crash down the line if that isn't their @@ -78,5 +78,16 @@ Map stringDictToMap(ncb.NSDictionary d) { return m; } +ncb.NSArray stringIterableToNSArray(Iterable strings) { + final array = + ncb.NSMutableArray.arrayWithCapacity_(linkedLibs, strings.length); + + var index = 0; + for (var s in strings) { + array.setObject_atIndexedSubscript_(s.toNSString(linkedLibs), index++); + } + return array; +} + ncb.NSURL uriToNSURL(Uri uri) => ncb.NSURL.URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs)); diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 2a819e120b..9d375981d0 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,13 +1,15 @@ name: cupertino_http -version: 1.3.1-wip +version: 1.4.0-wip +publish_to: none # Do not merge with this here! + description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: - sdk: ^3.2.0 - flutter: '>=3.16.0' # If changed, update test matrix. + sdk: ^3.3.0 + flutter: '>=3.19.0' # If changed, update test matrix. dependencies: async: ^2.5.0 @@ -15,6 +17,8 @@ dependencies: flutter: sdk: flutter http: ^1.2.0 + web_socket: + path: ../web_socket dev_dependencies: dart_flutter_team_lints: ^2.0.0 From ed417e864b030b5746aae2557cc947ff9a7c6ae7 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 19 Mar 2024 17:09:53 -0700 Subject: [PATCH 338/448] Release `package:web_socket` 0.1.0 (#1155) --- pkgs/web_socket/CHANGELOG.md | 2 +- pkgs/web_socket/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/web_socket/CHANGELOG.md b/pkgs/web_socket/CHANGELOG.md index 3bd731a51b..28b499a2f5 100644 --- a/pkgs/web_socket/CHANGELOG.md +++ b/pkgs/web_socket/CHANGELOG.md @@ -1,3 +1,3 @@ -## 0.1.0-wip +## 0.1.0 - Basic functionality in place. diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml index f3f89809e6..78ec62ed26 100644 --- a/pkgs/web_socket/pubspec.yaml +++ b/pkgs/web_socket/pubspec.yaml @@ -3,7 +3,7 @@ description: >- Any easy-to-use library for communicating with WebSockets that has multiple implementations. repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket -version: 0.1.0-wip +version: 0.1.0 environment: sdk: ^3.3.0 From 4ff554cbe08ffd792d277d45b5bb7939ac4e4813 Mon Sep 17 00:00:00 2001 From: Hossein Yousefi Date: Wed, 20 Mar 2024 17:32:40 +0100 Subject: [PATCH 339/448] [cronet_http] Upgrade jni to 0.7.3 (#1156) --- pkgs/cronet_http/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index d398f32560..bfb8a3b5f8 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter http: ^1.2.0 - jni: ^0.7.2 + jni: ^0.7.3 dev_dependencies: dart_flutter_team_lints: ^2.0.0 From ccb4f1e66f6dd770e9b8dff8a9297a803c9813af Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 20 Mar 2024 11:55:07 -0700 Subject: [PATCH 340/448] Prepare package:cronet_http 1.2 for release (#1157) --- pkgs/cronet_http/CHANGELOG.md | 4 +++- pkgs/cronet_http/pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 28d41376b4..1cc924894e 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,8 +1,10 @@ -## 1.2.0-wip +## 1.2.0 * Support the Cronet embedding dependency with `--dart-define=cronetHttpNoPlay=true`. * Fix a bug in the documentation where `isOwned` is used rather than `closeEngine`. +* Upgrade `package:jni` to 0.7.3 to fix a SIGSEGV caused by a null + pointer dereference. ## 1.1.1 diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index bfb8a3b5f8..69af73d277 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 1.2.0-wip +version: 1.2.0 description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http From 24695f045f4091012b9a066c5ee7d53e1811150f Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 22 Mar 2024 15:33:50 -0700 Subject: [PATCH 341/448] Ready cupertino_http for release with WebSocket support (#1158) --- pkgs/cupertino_http/CHANGELOG.md | 4 +++- pkgs/cupertino_http/lib/src/cupertino_web_socket.dart | 6 ++++++ pkgs/cupertino_http/pubspec.yaml | 7 ++----- pkgs/web_socket_conformance_tests/pubspec.yaml | 3 +-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 34a36c59a4..da5b0b5c07 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,4 +1,6 @@ -## 1.3.1-wip +## 1.4.0 + +* **Experimental** support for the `package:web_socket` `WebSocket` interface. ## 1.3.0 diff --git a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart index 94246744c2..c3d50ef508 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart @@ -22,6 +22,9 @@ class ConnectionException extends WebSocketException { /// A [WebSocket] implemented using the /// [NSURLSessionWebSocketTask API](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask). +/// +/// NOTE: the [WebSocket] interface is currently experimental and may change in +/// the future. class CupertinoWebSocket implements WebSocket { /// Create a new WebSocket connection using the /// [NSURLSessionWebSocketTask API](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask). @@ -31,6 +34,9 @@ class CupertinoWebSocket implements WebSocket { /// If provided, the [protocols] argument indicates that subprotocols that /// the peer is able to select. See /// [RFC-6455 1.9](https://datatracker.ietf.org/doc/html/rfc6455#section-1.9). + /// + /// NOTE: the [WebSocket] interface is currently experimental and may change + /// in the future. static Future connect(Uri url, {Iterable? protocols, URLSessionConfiguration? config}) async { if (!url.isScheme('ws') && !url.isScheme('wss')) { diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 9d375981d0..12cdf94e62 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,7 +1,5 @@ name: cupertino_http -version: 1.4.0-wip -publish_to: none # Do not merge with this here! - +version: 1.4.0 description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. @@ -17,8 +15,7 @@ dependencies: flutter: sdk: flutter http: ^1.2.0 - web_socket: - path: ../web_socket + web_socket: ^0.1.0 dev_dependencies: dart_flutter_team_lints: ^2.0.0 diff --git a/pkgs/web_socket_conformance_tests/pubspec.yaml b/pkgs/web_socket_conformance_tests/pubspec.yaml index afb952f804..2c7ffda0c2 100644 --- a/pkgs/web_socket_conformance_tests/pubspec.yaml +++ b/pkgs/web_socket_conformance_tests/pubspec.yaml @@ -15,8 +15,7 @@ dependencies: dart_style: ^2.3.4 stream_channel: ^2.1.2 test: ^1.24.0 - web_socket: - path: ../web_socket + web_socket: ^0.1.0 dev_dependencies: dart_flutter_team_lints: ^2.0.0 From d79cd91543980e2d9c2df683a0c1554aba5cd902 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 25 Mar 2024 08:28:50 -0700 Subject: [PATCH 342/448] cupertino_http: upgrade ffigen version (#1159) --- .github/workflows/cupertino.yml | 9 +- pkgs/cupertino_http/CHANGELOG.md | 4 + .../cupertino_http/lib/src/cupertino_api.dart | 40 +- .../lib/src/native_cupertino_bindings.dart | 26827 ++++++++++------ pkgs/cupertino_http/lib/src/utils.dart | 11 +- pkgs/cupertino_http/pubspec.yaml | 4 +- .../src/CUPHTTPClientDelegate.m | 6 +- .../src/CUPHTTPForwardedDelegate.h | 12 +- .../src/CUPHTTPForwardedDelegate.m | 2 +- 9 files changed, 16291 insertions(+), 10624 deletions(-) diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 1110e60e08..23041fbb36 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -42,14 +42,7 @@ jobs: name: Install dependencies run: flutter pub get - name: Check formatting - # Don't lint the generated file native_cupertino_bindings.dart - # This approach is simpler than using `find` and excluding that file - # because `dart format` also excludes other file e.g. ones in - # directories start with '.'. - run: | - mv lib/src/native_cupertino_bindings.dart lib/src/native_cupertino_bindings.tmp - dart format --output=none --set-exit-if-changed . - mv lib/src/native_cupertino_bindings.tmp lib/src/native_cupertino_bindings.dart + run: dart format --output=none --set-exit-if-changed . if: always() && steps.install.outcome == 'success' - name: Analyze code run: flutter analyze --fatal-infos diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index da5b0b5c07..b1872bdd03 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.4.1-wip + +* Upgrade to `package:ffigen` 11.0.0. + ## 1.4.0 * **Experimental** support for the `package:web_socket` `WebSocket` interface. diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 780ddde0ec..91e5198e19 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -184,8 +184,8 @@ class Error extends _ObjectHolder implements Exception { linkedLibs, linkedLibs.NSLocalizedDescriptionKey), ); } - final e = ncb.NSError.alloc(linkedLibs).initWithDomain_code_userInfo_( - domain.toNSString(linkedLibs).pointer, code, d); + final e = ncb.NSError.alloc(linkedLibs) + .initWithDomain_code_userInfo_(domain.toNSString(linkedLibs), code, d); return Error._(e); } @@ -201,8 +201,7 @@ class Error extends _ObjectHolder implements Exception { /// The error domain, for example `"NSPOSIXErrorDomain"`. /// /// See [NSError.domain](https://developer.apple.com/documentation/foundation/nserror/1413924-domain) - String get domain => - ncb.NSString.castFromPointer(linkedLibs, _nsObject.domain).toString(); + String get domain => _nsObject.domain.toString(); /// A description of the error in the current locale e.g. /// 'A server with the specified hostname could not be found.' @@ -244,7 +243,7 @@ class URLCache extends _ObjectHolder { /// See [NSURLCache.sharedURLCache](https://developer.apple.com/documentation/foundation/nsurlcache/1413377-sharedurlcache) static URLCache? get sharedURLCache { final sharedCache = ncb.NSURLCache.getSharedURLCache(linkedLibs); - return sharedCache == null ? null : URLCache._(sharedCache); + return URLCache._(sharedCache); } /// Create a new [URLCache] with the given memory and disk cache sizes. @@ -292,7 +291,7 @@ class URLSessionConfiguration URLSessionConfiguration._( ncb.NSURLSessionConfiguration.castFrom( ncb.NSURLSessionConfiguration.getDefaultSessionConfiguration( - linkedLibs)!), + linkedLibs)), isBackground: false); /// A session configuration that uses no persistent storage for caches, @@ -303,7 +302,7 @@ class URLSessionConfiguration URLSessionConfiguration._( ncb.NSURLSessionConfiguration.castFrom( ncb.NSURLSessionConfiguration.getEphemeralSessionConfiguration( - linkedLibs)!), + linkedLibs)), isBackground: false); /// Whether connections over a cellular network are allowed. @@ -552,7 +551,7 @@ class MutableData extends Data { /// A new empty [MutableData]. factory MutableData.empty() => - MutableData._(ncb.NSMutableData.dataWithCapacity_(linkedLibs, 0)); + MutableData._(ncb.NSMutableData.dataWithCapacity_(linkedLibs, 0)!); /// Appends the given data. /// @@ -626,8 +625,7 @@ class HTTPURLResponse extends URLResponse { /// /// See [HTTPURLResponse.allHeaderFields](https://developer.apple.com/documentation/foundation/nshttpurlresponse/1417930-allheaderfields) Map get allHeaderFields { - final headers = - ncb.NSDictionary.castFrom(_httpUrlResponse.allHeaderFields!); + final headers = ncb.NSDictionary.castFrom(_httpUrlResponse.allHeaderFields); return stringNSDictionaryToMap(headers); } @@ -918,8 +916,8 @@ class URLSessionWebSocketTask extends URLSessionTask { completionPort.close(); }); - helperLibs.CUPHTTPSendMessage(_urlSessionWebSocketTask.pointer, - message._nsObject.pointer, completionPort.sendPort.nativePort); + helperLibs.CUPHTTPSendMessage(_urlSessionWebSocketTask, message._nsObject, + completionPort.sendPort.nativePort); await completer.future; } @@ -956,7 +954,7 @@ class URLSessionWebSocketTask extends URLSessionTask { }); helperLibs.CUPHTTPReceiveMessage( - _urlSessionWebSocketTask.pointer, completionPort.sendPort.nativePort); + _urlSessionWebSocketTask, completionPort.sendPort.nativePort); return completer.future; } @@ -1066,7 +1064,7 @@ class MutableURLRequest extends URLRequest { /// See [NSMutableURLRequest.requestWithURL:](https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1414617-allhttpheaderfields) factory MutableURLRequest.fromUrl(Uri uri) { final url = ncb.NSURL - .URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs)); + .URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs))!; return MutableURLRequest._( ncb.NSMutableURLRequest.requestWithURL_(linkedLibs, url)); } @@ -1160,7 +1158,7 @@ void _setupDelegation( try { final request = URLRequest._( - ncb.NSURLRequest.castFrom(forwardedRedirect.request!)); + ncb.NSURLRequest.castFrom(forwardedRedirect.request)); if (onRedirect == null) { redirectRequest = request; @@ -1168,7 +1166,7 @@ void _setupDelegation( } try { final response = HTTPURLResponse._( - ncb.NSHTTPURLResponse.castFrom(forwardedRedirect.response!)); + ncb.NSHTTPURLResponse.castFrom(forwardedRedirect.response)); redirectRequest = onRedirect(session, task, response, request); } catch (e) { // TODO(https://github.com/dart-lang/ffigen/issues/386): Package @@ -1191,7 +1189,7 @@ void _setupDelegation( break; } final response = - URLResponse._exactURLResponseType(forwardedResponse.response!); + URLResponse._exactURLResponseType(forwardedResponse.response); try { disposition = onResponse(session, task, response); @@ -1213,8 +1211,8 @@ void _setupDelegation( break; } try { - onData(session, task, - Data._(ncb.NSData.castFrom(forwardedData.data!))); + onData( + session, task, Data._(ncb.NSData.castFrom(forwardedData.data))); } catch (e) { // TODO(https://github.com/dart-lang/ffigen/issues/386): Package // this exception as an `Error` and call the completion function @@ -1236,7 +1234,7 @@ void _setupDelegation( session, task as URLSessionDownloadTask, Uri.parse( - finishedDownloading.location!.absoluteString!.toString())); + finishedDownloading.location.absoluteString!.toString())); } catch (e) { // TODO(https://github.com/dart-lang/ffigen/issues/386): Package // this exception as an `Error` and call the completion function @@ -1474,7 +1472,7 @@ class URLSession extends _ObjectHolder { /// /// See [NSURLSession.configuration](https://developer.apple.com/documentation/foundation/nsurlsession/1411477-configuration) URLSessionConfiguration get configuration => URLSessionConfiguration._( - ncb.NSURLSessionConfiguration.castFrom(_nsObject.configuration!), + ncb.NSURLSessionConfiguration.castFrom(_nsObject.configuration), isBackground: _isBackground); /// A description of the session that may be useful for debugging. diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index 1d2383ef51..9c3b2c40b5 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -280,6 +280,264 @@ class NativeCupertinoHttp { set __mb_cur_max(int value) => ___mb_cur_max.value = value; + ffi.Pointer malloc_type_malloc( + int size, + int type_id, + ) { + return _malloc_type_malloc( + size, + type_id, + ); + } + + late final _malloc_type_mallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Size, malloc_type_id_t)>>('malloc_type_malloc'); + late final _malloc_type_malloc = _malloc_type_mallocPtr + .asFunction Function(int, int)>(); + + ffi.Pointer malloc_type_calloc( + int count, + int size, + int type_id, + ) { + return _malloc_type_calloc( + count, + size, + type_id, + ); + } + + late final _malloc_type_callocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Size, ffi.Size, malloc_type_id_t)>>('malloc_type_calloc'); + late final _malloc_type_calloc = _malloc_type_callocPtr + .asFunction Function(int, int, int)>(); + + void malloc_type_free( + ffi.Pointer ptr, + int type_id, + ) { + return _malloc_type_free( + ptr, + type_id, + ); + } + + late final _malloc_type_freePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, malloc_type_id_t)>>('malloc_type_free'); + late final _malloc_type_free = _malloc_type_freePtr + .asFunction, int)>(); + + ffi.Pointer malloc_type_realloc( + ffi.Pointer ptr, + int size, + int type_id, + ) { + return _malloc_type_realloc( + ptr, + size, + type_id, + ); + } + + late final _malloc_type_reallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + malloc_type_id_t)>>('malloc_type_realloc'); + late final _malloc_type_realloc = _malloc_type_reallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); + + ffi.Pointer malloc_type_valloc( + int size, + int type_id, + ) { + return _malloc_type_valloc( + size, + type_id, + ); + } + + late final _malloc_type_vallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Size, malloc_type_id_t)>>('malloc_type_valloc'); + late final _malloc_type_valloc = _malloc_type_vallocPtr + .asFunction Function(int, int)>(); + + ffi.Pointer malloc_type_aligned_alloc( + int alignment, + int size, + int type_id, + ) { + return _malloc_type_aligned_alloc( + alignment, + size, + type_id, + ); + } + + late final _malloc_type_aligned_allocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Size, ffi.Size, + malloc_type_id_t)>>('malloc_type_aligned_alloc'); + late final _malloc_type_aligned_alloc = _malloc_type_aligned_allocPtr + .asFunction Function(int, int, int)>(); + + int malloc_type_posix_memalign( + ffi.Pointer> memptr, + int alignment, + int size, + int type_id, + ) { + return _malloc_type_posix_memalign( + memptr, + alignment, + size, + type_id, + ); + } + + late final _malloc_type_posix_memalignPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer>, ffi.Size, + ffi.Size, malloc_type_id_t)>>('malloc_type_posix_memalign'); + late final _malloc_type_posix_memalign = + _malloc_type_posix_memalignPtr.asFunction< + int Function(ffi.Pointer>, int, int, int)>(); + + ffi.Pointer malloc_type_zone_malloc( + ffi.Pointer zone, + int size, + int type_id, + ) { + return _malloc_type_zone_malloc( + zone, + size, + type_id, + ); + } + + late final _malloc_type_zone_mallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + malloc_type_id_t)>>('malloc_type_zone_malloc'); + late final _malloc_type_zone_malloc = _malloc_type_zone_mallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); + + ffi.Pointer malloc_type_zone_calloc( + ffi.Pointer zone, + int count, + int size, + int type_id, + ) { + return _malloc_type_zone_calloc( + zone, + count, + size, + type_id, + ); + } + + late final _malloc_type_zone_callocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Size, malloc_type_id_t)>>('malloc_type_zone_calloc'); + late final _malloc_type_zone_calloc = _malloc_type_zone_callocPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, int, int)>(); + + void malloc_type_zone_free( + ffi.Pointer zone, + ffi.Pointer ptr, + int type_id, + ) { + return _malloc_type_zone_free( + zone, + ptr, + type_id, + ); + } + + late final _malloc_type_zone_freePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + malloc_type_id_t)>>('malloc_type_zone_free'); + late final _malloc_type_zone_free = _malloc_type_zone_freePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer malloc_type_zone_realloc( + ffi.Pointer zone, + ffi.Pointer ptr, + int size, + int type_id, + ) { + return _malloc_type_zone_realloc( + zone, + ptr, + size, + type_id, + ); + } + + late final _malloc_type_zone_reallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Size, + malloc_type_id_t)>>('malloc_type_zone_realloc'); + late final _malloc_type_zone_realloc = + _malloc_type_zone_reallocPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, int)>(); + + ffi.Pointer malloc_type_zone_valloc( + ffi.Pointer zone, + int size, + int type_id, + ) { + return _malloc_type_zone_valloc( + zone, + size, + type_id, + ); + } + + late final _malloc_type_zone_vallocPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + malloc_type_id_t)>>('malloc_type_zone_valloc'); + late final _malloc_type_zone_valloc = _malloc_type_zone_vallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); + + ffi.Pointer malloc_type_zone_memalign( + ffi.Pointer zone, + int alignment, + int size, + int type_id, + ) { + return _malloc_type_zone_memalign( + zone, + alignment, + size, + type_id, + ); + } + + late final _malloc_type_zone_memalignPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Size, malloc_type_id_t)>>('malloc_type_zone_memalign'); + late final _malloc_type_zone_memalign = + _malloc_type_zone_memalignPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, int, int)>(); + ffi.Pointer malloc( int __size, ) { @@ -305,9 +563,8 @@ class NativeCupertinoHttp { } late final _callocPtr = _lookup< - ffi - .NativeFunction Function(ffi.Size, ffi.Size)>>( - 'calloc'); + ffi.NativeFunction< + ffi.Pointer Function(ffi.Size, ffi.Size)>>('calloc'); late final _calloc = _callocPtr.asFunction Function(int, int)>(); @@ -367,9 +624,8 @@ class NativeCupertinoHttp { } late final _aligned_allocPtr = _lookup< - ffi - .NativeFunction Function(ffi.Size, ffi.Size)>>( - 'aligned_alloc'); + ffi.NativeFunction< + ffi.Pointer Function(ffi.Size, ffi.Size)>>('aligned_alloc'); late final _aligned_alloc = _aligned_allocPtr.asFunction Function(int, int)>(); @@ -626,9 +882,8 @@ class NativeCupertinoHttp { } late final _mblenPtr = _lookup< - ffi - .NativeFunction, ffi.Size)>>( - 'mblen'); + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size)>>('mblen'); late final _mblen = _mblenPtr.asFunction, int)>(); @@ -886,9 +1141,8 @@ class NativeCupertinoHttp { } late final _wctombPtr = _lookup< - ffi - .NativeFunction, ffi.WChar)>>( - 'wctomb'); + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.WChar)>>('wctomb'); late final _wctomb = _wctombPtr.asFunction, int)>(); @@ -956,9 +1210,8 @@ class NativeCupertinoHttp { } late final _erand48Ptr = _lookup< - ffi - .NativeFunction)>>( - 'erand48'); + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer)>>('erand48'); late final _erand48 = _erand48Ptr.asFunction)>(); @@ -1067,9 +1320,8 @@ class NativeCupertinoHttp { } late final _jrand48Ptr = _lookup< - ffi - .NativeFunction)>>( - 'jrand48'); + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer)>>('jrand48'); late final _jrand48 = _jrand48Ptr.asFunction)>(); @@ -1095,9 +1347,8 @@ class NativeCupertinoHttp { } late final _lcong48Ptr = _lookup< - ffi - .NativeFunction)>>( - 'lcong48'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer)>>('lcong48'); late final _lcong48 = _lcong48Ptr.asFunction)>(); @@ -1154,9 +1405,8 @@ class NativeCupertinoHttp { } late final _nrand48Ptr = _lookup< - ffi - .NativeFunction)>>( - 'nrand48'); + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer)>>('nrand48'); late final _nrand48 = _nrand48Ptr.asFunction)>(); @@ -1439,10 +1689,10 @@ class NativeCupertinoHttp { _arc4random_uniformPtr.asFunction(); int atexit_b( - ffi.Pointer<_ObjCBlock> arg0, + ObjCBlock_ffiVoid arg0, ) { return _atexit_b( - arg0, + arg0._id, ); } @@ -1516,14 +1766,14 @@ class NativeCupertinoHttp { ffi.Pointer __base, int __nel, int __width, - ffi.Pointer<_ObjCBlock> __compar, + ObjCBlock_ffiInt_ffiVoid_ffiVoid __compar, ) { return _bsearch_b( __key, __base, __nel, __width, - __compar, + __compar._id, ); } @@ -1796,9 +2046,8 @@ class NativeCupertinoHttp { } late final _getloadavgPtr = _lookup< - ffi - .NativeFunction, ffi.Int)>>( - 'getloadavg'); + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int)>>('getloadavg'); late final _getloadavg = _getloadavgPtr.asFunction, int)>(); @@ -1867,13 +2116,13 @@ class NativeCupertinoHttp { ffi.Pointer __base, int __nel, int __width, - ffi.Pointer<_ObjCBlock> __compar, + ObjCBlock_ffiInt_ffiVoid_ffiVoid __compar, ) { return _heapsort_b( __base, __nel, __width, - __compar, + __compar._id, ); } @@ -1925,13 +2174,13 @@ class NativeCupertinoHttp { ffi.Pointer __base, int __nel, int __width, - ffi.Pointer<_ObjCBlock> __compar, + ObjCBlock_ffiInt_ffiVoid_ffiVoid __compar, ) { return _mergesort_b( __base, __nel, __width, - __compar, + __compar._id, ); } @@ -1983,13 +2232,13 @@ class NativeCupertinoHttp { ffi.Pointer __base, int __nel, int __width, - ffi.Pointer<_ObjCBlock> __compar, + ObjCBlock_ffiInt_ffiVoid_ffiVoid __compar, ) { return _psort_b( __base, __nel, __width, - __compar, + __compar._id, ); } @@ -2049,13 +2298,13 @@ class NativeCupertinoHttp { ffi.Pointer __base, int __nel, int __width, - ffi.Pointer<_ObjCBlock> __compar, + ObjCBlock_ffiInt_ffiVoid_ffiVoid __compar, ) { return _qsort_b( __base, __nel, __width, - __compar, + __compar._id, ); } @@ -2321,10 +2570,10 @@ class NativeCupertinoHttp { .asFunction Function(ffi.Pointer)>(); ffi.Pointer object_getClassName( - ffi.Pointer obj, + NSObject? obj, ) { return _object_getClassName( - obj, + obj?._id ?? ffi.nullptr, ); } @@ -2336,10 +2585,10 @@ class NativeCupertinoHttp { .asFunction Function(ffi.Pointer)>(); ffi.Pointer object_getIndexedIvars( - ffi.Pointer obj, + NSObject? obj, ) { return _object_getIndexedIvars( - obj, + obj?._id ?? ffi.nullptr, ); } @@ -2378,12 +2627,21 @@ class NativeCupertinoHttp { late final _sel_getUid = _sel_getUidPtr .asFunction Function(ffi.Pointer)>(); - ffi.Pointer objc_retainedObject( + NSObject? objc_retainedObject( objc_objectptr_t obj, ) { return _objc_retainedObject( - obj, - ); + obj, + ).address == + 0 + ? null + : NSObject._( + _objc_retainedObject( + obj, + ), + this, + retain: true, + release: true); } late final _objc_retainedObjectPtr = _lookup< @@ -2393,12 +2651,21 @@ class NativeCupertinoHttp { late final _objc_retainedObject = _objc_retainedObjectPtr .asFunction Function(objc_objectptr_t)>(); - ffi.Pointer objc_unretainedObject( + NSObject? objc_unretainedObject( objc_objectptr_t obj, ) { return _objc_unretainedObject( - obj, - ); + obj, + ).address == + 0 + ? null + : NSObject._( + _objc_unretainedObject( + obj, + ), + this, + retain: true, + release: true); } late final _objc_unretainedObjectPtr = _lookup< @@ -2409,10 +2676,10 @@ class NativeCupertinoHttp { .asFunction Function(objc_objectptr_t)>(); objc_objectptr_t objc_unretainedPointer( - ffi.Pointer obj, + NSObject? obj, ) { return _objc_unretainedPointer( - obj, + obj?._id ?? ffi.nullptr, ); } @@ -3729,20 +3996,91 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_initWithString_1 = _registerName1("initWithString:"); + instancetype _objc_msgSend_49( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URLString, + ) { + return __objc_msgSend_49( + obj, + sel, + URLString, + ); + } + + late final __objc_msgSend_49Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_initWithString_relativeToURL_1 = _registerName1("initWithString:relativeToURL:"); + instancetype _objc_msgSend_50( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URLString, + ffi.Pointer baseURL, + ) { + return __objc_msgSend_50( + obj, + sel, + URLString, + baseURL, + ); + } + + late final __objc_msgSend_50Ptr = _lookup< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + late final _sel_URLWithString_1 = _registerName1("URLWithString:"); late final _sel_URLWithString_relativeToURL_1 = _registerName1("URLWithString:relativeToURL:"); + late final _sel_initWithString_encodingInvalidCharacters_1 = + _registerName1("initWithString:encodingInvalidCharacters:"); + instancetype _objc_msgSend_51( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer URLString, + bool encodingInvalidCharacters, + ) { + return __objc_msgSend_51( + obj, + sel, + URLString, + encodingInvalidCharacters, + ); + } + + late final __objc_msgSend_51Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + + late final _sel_URLWithString_encodingInvalidCharacters_1 = + _registerName1("URLWithString:encodingInvalidCharacters:"); late final _sel_initWithDataRepresentation_relativeToURL_1 = _registerName1("initWithDataRepresentation:relativeToURL:"); - instancetype _objc_msgSend_49( + instancetype _objc_msgSend_52( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, ffi.Pointer baseURL, ) { - return __objc_msgSend_49( + return __objc_msgSend_52( obj, sel, data, @@ -3750,26 +4088,26 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_49Ptr = _lookup< + late final __objc_msgSend_52Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< + late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_URLWithDataRepresentation_relativeToURL_1 = _registerName1("URLWithDataRepresentation:relativeToURL:"); - ffi.Pointer _objc_msgSend_50( + ffi.Pointer _objc_msgSend_53( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, ffi.Pointer baseURL, ) { - return __objc_msgSend_50( + return __objc_msgSend_53( obj, sel, data, @@ -3777,14 +4115,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_50Ptr = _lookup< + late final __objc_msgSend_53Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< + late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -3796,42 +4134,60 @@ class NativeCupertinoHttp { late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); - ffi.Pointer _objc_msgSend_51( + ffi.Pointer _objc_msgSend_54( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_51( + return __objc_msgSend_54( obj, sel, ); } - late final __objc_msgSend_51Ptr = _lookup< + late final __objc_msgSend_54Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< + late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_absoluteString1 = _registerName1("absoluteString"); + ffi.Pointer _objc_msgSend_55( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_55( + obj, + sel, + ); + } + + late final __objc_msgSend_55Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _sel_relativeString1 = _registerName1("relativeString"); late final _sel_baseURL1 = _registerName1("baseURL"); - ffi.Pointer _objc_msgSend_52( + ffi.Pointer _objc_msgSend_56( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_52( + return __objc_msgSend_56( obj, sel, ); } - late final __objc_msgSend_52Ptr = _lookup< + late final __objc_msgSend_56Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< + late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -3843,33 +4199,33 @@ class NativeCupertinoHttp { late final _class_NSValue1 = _getClass1("NSValue"); late final _sel_getValue_size_1 = _registerName1("getValue:size:"); late final _sel_objCType1 = _registerName1("objCType"); - ffi.Pointer _objc_msgSend_53( + ffi.Pointer _objc_msgSend_57( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_53( + return __objc_msgSend_57( obj, sel, ); } - late final __objc_msgSend_53Ptr = _lookup< + late final __objc_msgSend_57Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< + late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithBytes_objCType_1 = _registerName1("initWithBytes:objCType:"); - instancetype _objc_msgSend_54( + instancetype _objc_msgSend_58( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ffi.Pointer type, ) { - return __objc_msgSend_54( + return __objc_msgSend_58( obj, sel, value, @@ -3877,23 +4233,23 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_54Ptr = _lookup< + late final __objc_msgSend_58Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< + late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_valueWithBytes_objCType_1 = _registerName1("valueWithBytes:objCType:"); - ffi.Pointer _objc_msgSend_55( + ffi.Pointer _objc_msgSend_59( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ffi.Pointer type, ) { - return __objc_msgSend_55( + return __objc_msgSend_59( obj, sel, value, @@ -3901,14 +4257,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_55Ptr = _lookup< + late final __objc_msgSend_59Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< + late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -3918,406 +4274,424 @@ class NativeCupertinoHttp { late final _sel_value_withObjCType_1 = _registerName1("value:withObjCType:"); late final _sel_valueWithNonretainedObject_1 = _registerName1("valueWithNonretainedObject:"); - ffi.Pointer _objc_msgSend_56( + ffi.Pointer _objc_msgSend_60( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anObject, ) { - return __objc_msgSend_56( + return __objc_msgSend_60( obj, sel, anObject, ); } - late final __objc_msgSend_56Ptr = _lookup< + late final __objc_msgSend_60Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< + late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_nonretainedObjectValue1 = _registerName1("nonretainedObjectValue"); + ffi.Pointer _objc_msgSend_61( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_61( + obj, + sel, + ); + } + + late final __objc_msgSend_61Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _sel_valueWithPointer_1 = _registerName1("valueWithPointer:"); - ffi.Pointer _objc_msgSend_57( + ffi.Pointer _objc_msgSend_62( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer pointer, ) { - return __objc_msgSend_57( + return __objc_msgSend_62( obj, sel, pointer, ); } - late final __objc_msgSend_57Ptr = _lookup< + late final __objc_msgSend_62Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< + late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_pointerValue1 = _registerName1("pointerValue"); late final _sel_isEqualToValue_1 = _registerName1("isEqualToValue:"); - bool _objc_msgSend_58( + bool _objc_msgSend_63( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_58( + return __objc_msgSend_63( obj, sel, value, ); } - late final __objc_msgSend_58Ptr = _lookup< + late final __objc_msgSend_63Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< + late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_getValue_1 = _registerName1("getValue:"); - void _objc_msgSend_59( + void _objc_msgSend_64( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_59( + return __objc_msgSend_64( obj, sel, value, ); } - late final __objc_msgSend_59Ptr = _lookup< + late final __objc_msgSend_64Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< + late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); - ffi.Pointer _objc_msgSend_60( + ffi.Pointer _objc_msgSend_65( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ) { - return __objc_msgSend_60( + return __objc_msgSend_65( obj, sel, range, ); } - late final __objc_msgSend_60Ptr = _lookup< + late final __objc_msgSend_65Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< + late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSRange)>(); late final _sel_rangeValue1 = _registerName1("rangeValue"); - NSRange _objc_msgSend_61( + NSRange _objc_msgSend_66( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_61( + return __objc_msgSend_66( obj, sel, ); } - late final __objc_msgSend_61Ptr = _lookup< + late final __objc_msgSend_66Ptr = _lookup< ffi.NativeFunction< NSRange Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< + late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< NSRange Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithChar_1 = _registerName1("initWithChar:"); - ffi.Pointer _objc_msgSend_62( + ffi.Pointer _objc_msgSend_67( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_62( + return __objc_msgSend_67( obj, sel, value, ); } - late final __objc_msgSend_62Ptr = _lookup< + late final __objc_msgSend_67Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Char)>>('objc_msgSend'); - late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< + late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithUnsignedChar_1 = _registerName1("initWithUnsignedChar:"); - ffi.Pointer _objc_msgSend_63( + ffi.Pointer _objc_msgSend_68( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_63( + return __objc_msgSend_68( obj, sel, value, ); } - late final __objc_msgSend_63Ptr = _lookup< + late final __objc_msgSend_68Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); - late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< + late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithShort_1 = _registerName1("initWithShort:"); - ffi.Pointer _objc_msgSend_64( + ffi.Pointer _objc_msgSend_69( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_64( + return __objc_msgSend_69( obj, sel, value, ); } - late final __objc_msgSend_64Ptr = _lookup< + late final __objc_msgSend_69Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Short)>>('objc_msgSend'); - late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< + late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithUnsignedShort_1 = _registerName1("initWithUnsignedShort:"); - ffi.Pointer _objc_msgSend_65( + ffi.Pointer _objc_msgSend_70( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_65( + return __objc_msgSend_70( obj, sel, value, ); } - late final __objc_msgSend_65Ptr = _lookup< + late final __objc_msgSend_70Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); - late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< + late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithInt_1 = _registerName1("initWithInt:"); - ffi.Pointer _objc_msgSend_66( + ffi.Pointer _objc_msgSend_71( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_66( + return __objc_msgSend_71( obj, sel, value, ); } - late final __objc_msgSend_66Ptr = _lookup< + late final __objc_msgSend_71Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< + late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithUnsignedInt_1 = _registerName1("initWithUnsignedInt:"); - ffi.Pointer _objc_msgSend_67( + ffi.Pointer _objc_msgSend_72( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_67( + return __objc_msgSend_72( obj, sel, value, ); } - late final __objc_msgSend_67Ptr = _lookup< + late final __objc_msgSend_72Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< + late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithLong_1 = _registerName1("initWithLong:"); - ffi.Pointer _objc_msgSend_68( + ffi.Pointer _objc_msgSend_73( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_68( + return __objc_msgSend_73( obj, sel, value, ); } - late final __objc_msgSend_68Ptr = _lookup< + late final __objc_msgSend_73Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< + late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithUnsignedLong_1 = _registerName1("initWithUnsignedLong:"); - ffi.Pointer _objc_msgSend_69( + ffi.Pointer _objc_msgSend_74( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_69( + return __objc_msgSend_74( obj, sel, value, ); } - late final __objc_msgSend_69Ptr = _lookup< + late final __objc_msgSend_74Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< + late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); - ffi.Pointer _objc_msgSend_70( + ffi.Pointer _objc_msgSend_75( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_70( + return __objc_msgSend_75( obj, sel, value, ); } - late final __objc_msgSend_70Ptr = _lookup< + late final __objc_msgSend_75Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); - late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< + late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithUnsignedLongLong_1 = _registerName1("initWithUnsignedLongLong:"); - ffi.Pointer _objc_msgSend_71( + ffi.Pointer _objc_msgSend_76( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_71( + return __objc_msgSend_76( obj, sel, value, ); } - late final __objc_msgSend_71Ptr = _lookup< + late final __objc_msgSend_76Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); - late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< + late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); - ffi.Pointer _objc_msgSend_72( + ffi.Pointer _objc_msgSend_77( ffi.Pointer obj, ffi.Pointer sel, double value, ) { - return __objc_msgSend_72( + return __objc_msgSend_77( obj, sel, value, ); } - late final __objc_msgSend_72Ptr = _lookup< + late final __objc_msgSend_77Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< + late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, double)>(); late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); - ffi.Pointer _objc_msgSend_73( + ffi.Pointer _objc_msgSend_78( ffi.Pointer obj, ffi.Pointer sel, double value, ) { - return __objc_msgSend_73( + return __objc_msgSend_78( obj, sel, value, ); } - late final __objc_msgSend_73Ptr = _lookup< + late final __objc_msgSend_78Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< + late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, double)>(); late final _sel_initWithBool_1 = _registerName1("initWithBool:"); - ffi.Pointer _objc_msgSend_74( + ffi.Pointer _objc_msgSend_79( ffi.Pointer obj, ffi.Pointer sel, bool value, ) { - return __objc_msgSend_74( + return __objc_msgSend_79( obj, sel, value, ); } - late final __objc_msgSend_74Ptr = _lookup< + late final __objc_msgSend_79Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< + late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, bool)>(); @@ -4325,203 +4699,239 @@ class NativeCupertinoHttp { late final _sel_initWithUnsignedInteger_1 = _registerName1("initWithUnsignedInteger:"); late final _sel_charValue1 = _registerName1("charValue"); - int _objc_msgSend_75( + int _objc_msgSend_80( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_75( + return __objc_msgSend_80( obj, sel, ); } - late final __objc_msgSend_75Ptr = _lookup< + late final __objc_msgSend_80Ptr = _lookup< ffi.NativeFunction< ffi.Char Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< + late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); - int _objc_msgSend_76( + int _objc_msgSend_81( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_76( + return __objc_msgSend_81( obj, sel, ); } - late final __objc_msgSend_76Ptr = _lookup< + late final __objc_msgSend_81Ptr = _lookup< ffi.NativeFunction< ffi.UnsignedChar Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< + late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_shortValue1 = _registerName1("shortValue"); - int _objc_msgSend_77( + int _objc_msgSend_82( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_77( + return __objc_msgSend_82( obj, sel, ); } - late final __objc_msgSend_77Ptr = _lookup< + late final __objc_msgSend_82Ptr = _lookup< ffi.NativeFunction< ffi.Short Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< + late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); - int _objc_msgSend_78( + int _objc_msgSend_83( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_78( + return __objc_msgSend_83( obj, sel, ); } - late final __objc_msgSend_78Ptr = _lookup< + late final __objc_msgSend_83Ptr = _lookup< ffi.NativeFunction< ffi.UnsignedShort Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< + late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_intValue1 = _registerName1("intValue"); - int _objc_msgSend_79( + int _objc_msgSend_84( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_79( + return __objc_msgSend_84( obj, sel, ); } - late final __objc_msgSend_79Ptr = _lookup< + late final __objc_msgSend_84Ptr = _lookup< ffi.NativeFunction< ffi.Int Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< + late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); - int _objc_msgSend_80( + int _objc_msgSend_85( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_80( + return __objc_msgSend_85( obj, sel, ); } - late final __objc_msgSend_80Ptr = _lookup< + late final __objc_msgSend_85Ptr = _lookup< ffi.NativeFunction< ffi.UnsignedInt Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< + late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_longValue1 = _registerName1("longValue"); - int _objc_msgSend_81( + int _objc_msgSend_86( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_81( + return __objc_msgSend_86( obj, sel, ); } - late final __objc_msgSend_81Ptr = _lookup< + late final __objc_msgSend_86Ptr = _lookup< ffi.NativeFunction< ffi.Long Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< + late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); late final _sel_longLongValue1 = _registerName1("longLongValue"); - int _objc_msgSend_82( + int _objc_msgSend_87( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_82( + return __objc_msgSend_87( obj, sel, ); } - late final __objc_msgSend_82Ptr = _lookup< + late final __objc_msgSend_87Ptr = _lookup< ffi.NativeFunction< ffi.LongLong Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< + late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_unsignedLongLongValue1 = _registerName1("unsignedLongLongValue"); - int _objc_msgSend_83( + int _objc_msgSend_88( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_83( + return __objc_msgSend_88( obj, sel, ); } - late final __objc_msgSend_83Ptr = _lookup< + late final __objc_msgSend_88Ptr = _lookup< ffi.NativeFunction< ffi.UnsignedLongLong Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< + late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_floatValue1 = _registerName1("floatValue"); - double _objc_msgSend_84( + late final _objc_msgSend_useVariants1 = ffi.Abi.current() == ffi.Abi.iosX64 || + ffi.Abi.current() == ffi.Abi.macosX64; + double _objc_msgSend_89( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_84( + return __objc_msgSend_89( obj, sel, ); } - late final __objc_msgSend_84Ptr = _lookup< + late final __objc_msgSend_89Ptr = _lookup< ffi.NativeFunction< ffi.Float Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< + late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); + + double _objc_msgSend_89_fpret( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_89_fpret( + obj, + sel, + ); + } + + late final __objc_msgSend_89_fpretPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_89_fpret = __objc_msgSend_89_fpretPtr.asFunction< double Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_doubleValue1 = _registerName1("doubleValue"); - double _objc_msgSend_85( + double _objc_msgSend_90( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_85( + return __objc_msgSend_90( obj, sel, ); } - late final __objc_msgSend_85Ptr = _lookup< + late final __objc_msgSend_90Ptr = _lookup< ffi.NativeFunction< ffi.Double Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< + late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< + double Function(ffi.Pointer, ffi.Pointer)>(); + + double _objc_msgSend_90_fpret( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_90_fpret( + obj, + sel, + ); + } + + late final __objc_msgSend_90_fpretPtr = _lookup< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>('objc_msgSend_fpret'); + late final __objc_msgSend_90_fpret = __objc_msgSend_90_fpretPtr.asFunction< double Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_boolValue1 = _registerName1("boolValue"); @@ -4529,66 +4939,66 @@ class NativeCupertinoHttp { late final _sel_unsignedIntegerValue1 = _registerName1("unsignedIntegerValue"); late final _sel_stringValue1 = _registerName1("stringValue"); - int _objc_msgSend_86( + int _objc_msgSend_91( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherNumber, ) { - return __objc_msgSend_86( + return __objc_msgSend_91( obj, sel, otherNumber, ); } - late final __objc_msgSend_86Ptr = _lookup< + late final __objc_msgSend_91Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< + late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); - bool _objc_msgSend_87( + bool _objc_msgSend_92( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer number, ) { - return __objc_msgSend_87( + return __objc_msgSend_92( obj, sel, number, ); } - late final __objc_msgSend_87Ptr = _lookup< + late final __objc_msgSend_92Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< + late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_descriptionWithLocale_1 = _registerName1("descriptionWithLocale:"); - ffi.Pointer _objc_msgSend_88( + ffi.Pointer _objc_msgSend_93( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer locale, ) { - return __objc_msgSend_88( + return __objc_msgSend_93( obj, sel, locale, ); } - late final __objc_msgSend_88Ptr = _lookup< + late final __objc_msgSend_93Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< + late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -4614,21 +5024,21 @@ class NativeCupertinoHttp { late final _sel_numberWithUnsignedInteger_1 = _registerName1("numberWithUnsignedInteger:"); late final _sel_port1 = _registerName1("port"); - ffi.Pointer _objc_msgSend_89( + ffi.Pointer _objc_msgSend_94( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_89( + return __objc_msgSend_94( obj, sel, ); } - late final __objc_msgSend_89Ptr = _lookup< + late final __objc_msgSend_94Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< + late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -4642,13 +5052,13 @@ class NativeCupertinoHttp { late final _sel_hasDirectoryPath1 = _registerName1("hasDirectoryPath"); late final _sel_getFileSystemRepresentation_maxLength_1 = _registerName1("getFileSystemRepresentation:maxLength:"); - bool _objc_msgSend_90( + bool _objc_msgSend_95( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer buffer, int maxBufferLength, ) { - return __objc_msgSend_90( + return __objc_msgSend_95( obj, sel, buffer, @@ -4656,11 +5066,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_90Ptr = _lookup< + late final __objc_msgSend_95Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< + late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -4668,27 +5078,30 @@ class NativeCupertinoHttp { _registerName1("fileSystemRepresentation"); late final _sel_isFileURL1 = _registerName1("isFileURL"); late final _sel_standardizedURL1 = _registerName1("standardizedURL"); + late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); + late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); + late final _sel_filePathURL1 = _registerName1("filePathURL"); late final _class_NSError1 = _getClass1("NSError"); late final _class_NSDictionary1 = _getClass1("NSDictionary"); late final _sel_count1 = _registerName1("count"); late final _sel_objectForKey_1 = _registerName1("objectForKey:"); - ffi.Pointer _objc_msgSend_91( + ffi.Pointer _objc_msgSend_96( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aKey, ) { - return __objc_msgSend_91( + return __objc_msgSend_96( obj, sel, aKey, ); } - late final __objc_msgSend_91Ptr = _lookup< + late final __objc_msgSend_96Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< + late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -4696,34 +5109,34 @@ class NativeCupertinoHttp { late final _sel_nextObject1 = _registerName1("nextObject"); late final _sel_allObjects1 = _registerName1("allObjects"); late final _sel_keyEnumerator1 = _registerName1("keyEnumerator"); - ffi.Pointer _objc_msgSend_92( + ffi.Pointer _objc_msgSend_97( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_92( + return __objc_msgSend_97( obj, sel, ); } - late final __objc_msgSend_92Ptr = _lookup< + late final __objc_msgSend_97Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< + late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithObjects_forKeys_count_1 = _registerName1("initWithObjects:forKeys:count:"); - instancetype _objc_msgSend_93( + instancetype _objc_msgSend_98( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer> objects, ffi.Pointer> keys, int cnt, ) { - return __objc_msgSend_93( + return __objc_msgSend_98( obj, sel, objects, @@ -4732,7 +5145,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_93Ptr = _lookup< + late final __objc_msgSend_98Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -4740,7 +5153,7 @@ class NativeCupertinoHttp { ffi.Pointer>, ffi.Pointer>, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< + late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -4750,35 +5163,35 @@ class NativeCupertinoHttp { late final _class_NSArray1 = _getClass1("NSArray"); late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); - ffi.Pointer _objc_msgSend_94( + ffi.Pointer _objc_msgSend_99( ffi.Pointer obj, ffi.Pointer sel, int index, ) { - return __objc_msgSend_94( + return __objc_msgSend_99( obj, sel, index, ); } - late final __objc_msgSend_94Ptr = _lookup< + late final __objc_msgSend_99Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< + late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithObjects_count_1 = _registerName1("initWithObjects:count:"); - instancetype _objc_msgSend_95( + instancetype _objc_msgSend_100( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer> objects, int cnt, ) { - return __objc_msgSend_95( + return __objc_msgSend_100( obj, sel, objects, @@ -4786,93 +5199,93 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_95Ptr = _lookup< + late final __objc_msgSend_100Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer>, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< + late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer>, int)>(); late final _sel_arrayByAddingObject_1 = _registerName1("arrayByAddingObject:"); - ffi.Pointer _objc_msgSend_96( + ffi.Pointer _objc_msgSend_101( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anObject, ) { - return __objc_msgSend_96( + return __objc_msgSend_101( obj, sel, anObject, ); } - late final __objc_msgSend_96Ptr = _lookup< + late final __objc_msgSend_101Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< + late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_arrayByAddingObjectsFromArray_1 = _registerName1("arrayByAddingObjectsFromArray:"); - ffi.Pointer _objc_msgSend_97( + ffi.Pointer _objc_msgSend_102( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherArray, ) { - return __objc_msgSend_97( + return __objc_msgSend_102( obj, sel, otherArray, ); } - late final __objc_msgSend_97Ptr = _lookup< + late final __objc_msgSend_102Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< + late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_componentsJoinedByString_1 = _registerName1("componentsJoinedByString:"); - ffi.Pointer _objc_msgSend_98( + ffi.Pointer _objc_msgSend_103( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer separator, ) { - return __objc_msgSend_98( + return __objc_msgSend_103( obj, sel, separator, ); } - late final __objc_msgSend_98Ptr = _lookup< + late final __objc_msgSend_103Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< + late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_containsObject_1 = _registerName1("containsObject:"); late final _sel_descriptionWithLocale_indent_1 = _registerName1("descriptionWithLocale:indent:"); - ffi.Pointer _objc_msgSend_99( + ffi.Pointer _objc_msgSend_104( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer locale, int level, ) { - return __objc_msgSend_99( + return __objc_msgSend_104( obj, sel, locale, @@ -4880,47 +5293,47 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_99Ptr = _lookup< + late final __objc_msgSend_104Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< + late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_firstObjectCommonWithArray_1 = _registerName1("firstObjectCommonWithArray:"); - ffi.Pointer _objc_msgSend_100( + ffi.Pointer _objc_msgSend_105( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherArray, ) { - return __objc_msgSend_100( + return __objc_msgSend_105( obj, sel, otherArray, ); } - late final __objc_msgSend_100Ptr = _lookup< + late final __objc_msgSend_105Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< + late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); - void _objc_msgSend_101( + void _objc_msgSend_106( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer> objects, NSRange range, ) { - return __objc_msgSend_101( + return __objc_msgSend_106( obj, sel, objects, @@ -4928,44 +5341,44 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_101Ptr = _lookup< + late final __objc_msgSend_106Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer>, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< + late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer>, NSRange)>(); late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); - int _objc_msgSend_102( + int _objc_msgSend_107( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anObject, ) { - return __objc_msgSend_102( + return __objc_msgSend_107( obj, sel, anObject, ); } - late final __objc_msgSend_102Ptr = _lookup< + late final __objc_msgSend_107Ptr = _lookup< ffi.NativeFunction< NSUInteger Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< + late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_indexOfObject_inRange_1 = _registerName1("indexOfObject:inRange:"); - int _objc_msgSend_103( + int _objc_msgSend_108( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anObject, NSRange range, ) { - return __objc_msgSend_103( + return __objc_msgSend_108( obj, sel, anObject, @@ -4973,11 +5386,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_103Ptr = _lookup< + late final __objc_msgSend_108Ptr = _lookup< ffi.NativeFunction< NSUInteger Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< + late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSRange)>(); @@ -4986,23 +5399,23 @@ class NativeCupertinoHttp { late final _sel_indexOfObjectIdenticalTo_inRange_1 = _registerName1("indexOfObjectIdenticalTo:inRange:"); late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); - bool _objc_msgSend_104( + bool _objc_msgSend_109( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherArray, ) { - return __objc_msgSend_104( + return __objc_msgSend_109( obj, sel, otherArray, ); } - late final __objc_msgSend_104Ptr = _lookup< + late final __objc_msgSend_109Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< + late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -5014,7 +5427,7 @@ class NativeCupertinoHttp { late final _sel_sortedArrayHint1 = _registerName1("sortedArrayHint"); late final _sel_sortedArrayUsingFunction_context_1 = _registerName1("sortedArrayUsingFunction:context:"); - ffi.Pointer _objc_msgSend_105( + ffi.Pointer _objc_msgSend_110( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer< @@ -5024,7 +5437,7 @@ class NativeCupertinoHttp { comparator, ffi.Pointer context, ) { - return __objc_msgSend_105( + return __objc_msgSend_110( obj, sel, comparator, @@ -5032,7 +5445,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_105Ptr = _lookup< + late final __objc_msgSend_110Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -5042,7 +5455,7 @@ class NativeCupertinoHttp { NSInteger Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< + late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -5054,7 +5467,7 @@ class NativeCupertinoHttp { late final _sel_sortedArrayUsingFunction_context_hint_1 = _registerName1("sortedArrayUsingFunction:context:hint:"); - ffi.Pointer _objc_msgSend_106( + ffi.Pointer _objc_msgSend_111( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer< @@ -5065,7 +5478,7 @@ class NativeCupertinoHttp { ffi.Pointer context, ffi.Pointer hint, ) { - return __objc_msgSend_106( + return __objc_msgSend_111( obj, sel, comparator, @@ -5074,7 +5487,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_106Ptr = _lookup< + late final __objc_msgSend_111Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -5085,7 +5498,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer)>>, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< + late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -5098,55 +5511,55 @@ class NativeCupertinoHttp { late final _sel_sortedArrayUsingSelector_1 = _registerName1("sortedArrayUsingSelector:"); - ffi.Pointer _objc_msgSend_107( + ffi.Pointer _objc_msgSend_112( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer comparator, ) { - return __objc_msgSend_107( + return __objc_msgSend_112( obj, sel, comparator, ); } - late final __objc_msgSend_107Ptr = _lookup< + late final __objc_msgSend_112Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< + late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); - ffi.Pointer _objc_msgSend_108( + ffi.Pointer _objc_msgSend_113( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ) { - return __objc_msgSend_108( + return __objc_msgSend_113( obj, sel, range, ); } - late final __objc_msgSend_108Ptr = _lookup< + late final __objc_msgSend_113Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< + late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSRange)>(); late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); - bool _objc_msgSend_109( + bool _objc_msgSend_114( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer> error, ) { - return __objc_msgSend_109( + return __objc_msgSend_114( obj, sel, url, @@ -5154,14 +5567,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_109Ptr = _lookup< + late final __objc_msgSend_114Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< + late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); @@ -5169,13 +5582,13 @@ class NativeCupertinoHttp { _registerName1("makeObjectsPerformSelector:"); late final _sel_makeObjectsPerformSelector_withObject_1 = _registerName1("makeObjectsPerformSelector:withObject:"); - void _objc_msgSend_110( + void _objc_msgSend_115( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aSelector, ffi.Pointer argument, ) { - return __objc_msgSend_110( + return __objc_msgSend_115( obj, sel, aSelector, @@ -5183,11 +5596,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_110Ptr = _lookup< + late final __objc_msgSend_115Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< + late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -5196,68 +5609,68 @@ class NativeCupertinoHttp { late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); late final _sel_indexSetWithIndexesInRange_1 = _registerName1("indexSetWithIndexesInRange:"); - instancetype _objc_msgSend_111( + instancetype _objc_msgSend_116( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ) { - return __objc_msgSend_111( + return __objc_msgSend_116( obj, sel, range, ); } - late final __objc_msgSend_111Ptr = _lookup< + late final __objc_msgSend_116Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< + late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, NSRange)>(); late final _sel_initWithIndexesInRange_1 = _registerName1("initWithIndexesInRange:"); late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); - instancetype _objc_msgSend_112( + instancetype _objc_msgSend_117( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer indexSet, ) { - return __objc_msgSend_112( + return __objc_msgSend_117( obj, sel, indexSet, ); } - late final __objc_msgSend_112Ptr = _lookup< + late final __objc_msgSend_117Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< + late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); - bool _objc_msgSend_113( + bool _objc_msgSend_118( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer indexSet, ) { - return __objc_msgSend_113( + return __objc_msgSend_118( obj, sel, indexSet, ); } - late final __objc_msgSend_113Ptr = _lookup< + late final __objc_msgSend_118Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< + late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -5265,23 +5678,23 @@ class NativeCupertinoHttp { late final _sel_lastIndex1 = _registerName1("lastIndex"); late final _sel_indexGreaterThanIndex_1 = _registerName1("indexGreaterThanIndex:"); - int _objc_msgSend_114( + int _objc_msgSend_119( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_114( + return __objc_msgSend_119( obj, sel, value, ); } - late final __objc_msgSend_114Ptr = _lookup< + late final __objc_msgSend_119Ptr = _lookup< ffi.NativeFunction< NSUInteger Function(ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< + late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); @@ -5291,14 +5704,14 @@ class NativeCupertinoHttp { _registerName1("indexLessThanOrEqualToIndex:"); late final _sel_getIndexes_maxCount_inIndexRange_1 = _registerName1("getIndexes:maxCount:inIndexRange:"); - int _objc_msgSend_115( + int _objc_msgSend_120( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer indexBuffer, int bufferSize, NSRangePointer range, ) { - return __objc_msgSend_115( + return __objc_msgSend_120( obj, sel, indexBuffer, @@ -5307,7 +5720,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_115Ptr = _lookup< + late final __objc_msgSend_120Ptr = _lookup< ffi.NativeFunction< NSUInteger Function( ffi.Pointer, @@ -5315,70 +5728,70 @@ class NativeCupertinoHttp { ffi.Pointer, NSUInteger, NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< + late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, NSRangePointer)>(); late final _sel_countOfIndexesInRange_1 = _registerName1("countOfIndexesInRange:"); - int _objc_msgSend_116( + int _objc_msgSend_121( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ) { - return __objc_msgSend_116( + return __objc_msgSend_121( obj, sel, range, ); } - late final __objc_msgSend_116Ptr = _lookup< + late final __objc_msgSend_121Ptr = _lookup< ffi.NativeFunction< NSUInteger Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< + late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); late final _sel_containsIndex_1 = _registerName1("containsIndex:"); - bool _objc_msgSend_117( + bool _objc_msgSend_122( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_117( + return __objc_msgSend_122( obj, sel, value, ); } - late final __objc_msgSend_117Ptr = _lookup< + late final __objc_msgSend_122Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< + late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_containsIndexesInRange_1 = _registerName1("containsIndexesInRange:"); - bool _objc_msgSend_118( + bool _objc_msgSend_123( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ) { - return __objc_msgSend_118( + return __objc_msgSend_123( obj, sel, range, ); } - late final __objc_msgSend_118Ptr = _lookup< + late final __objc_msgSend_123Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< + late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); @@ -5386,35 +5799,35 @@ class NativeCupertinoHttp { _registerName1("intersectsIndexesInRange:"); late final _sel_enumerateIndexesUsingBlock_1 = _registerName1("enumerateIndexesUsingBlock:"); - void _objc_msgSend_119( + void _objc_msgSend_124( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_119( + return __objc_msgSend_124( obj, sel, block, ); } - late final __objc_msgSend_119Ptr = _lookup< + late final __objc_msgSend_124Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< + late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_enumerateIndexesWithOptions_usingBlock_1 = _registerName1("enumerateIndexesWithOptions:usingBlock:"); - void _objc_msgSend_120( + void _objc_msgSend_125( ffi.Pointer obj, ffi.Pointer sel, int opts, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_120( + return __objc_msgSend_125( obj, sel, opts, @@ -5422,24 +5835,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_120Ptr = _lookup< + late final __objc_msgSend_125Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< + late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_enumerateIndexesInRange_options_usingBlock_1 = _registerName1("enumerateIndexesInRange:options:usingBlock:"); - void _objc_msgSend_121( + void _objc_msgSend_126( ffi.Pointer obj, ffi.Pointer sel, NSRange range, int opts, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_121( + return __objc_msgSend_126( obj, sel, range, @@ -5448,44 +5861,44 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_121Ptr = _lookup< + late final __objc_msgSend_126Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< + late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); - int _objc_msgSend_122( + int _objc_msgSend_127( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_122( + return __objc_msgSend_127( obj, sel, predicate, ); } - late final __objc_msgSend_122Ptr = _lookup< + late final __objc_msgSend_127Ptr = _lookup< ffi.NativeFunction< NSUInteger Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< + late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_indexWithOptions_passingTest_1 = _registerName1("indexWithOptions:passingTest:"); - int _objc_msgSend_123( + int _objc_msgSend_128( ffi.Pointer obj, ffi.Pointer sel, int opts, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_123( + return __objc_msgSend_128( obj, sel, opts, @@ -5493,24 +5906,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_123Ptr = _lookup< + late final __objc_msgSend_128Ptr = _lookup< ffi.NativeFunction< NSUInteger Function(ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< + late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_indexInRange_options_passingTest_1 = _registerName1("indexInRange:options:passingTest:"); - int _objc_msgSend_124( + int _objc_msgSend_129( ffi.Pointer obj, ffi.Pointer sel, NSRange range, int opts, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_124( + return __objc_msgSend_129( obj, sel, range, @@ -5519,44 +5932,44 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_124Ptr = _lookup< + late final __objc_msgSend_129Ptr = _lookup< ffi.NativeFunction< NSUInteger Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< + late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); - ffi.Pointer _objc_msgSend_125( + ffi.Pointer _objc_msgSend_130( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_125( + return __objc_msgSend_130( obj, sel, predicate, ); } - late final __objc_msgSend_125Ptr = _lookup< + late final __objc_msgSend_130Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< + late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_indexesWithOptions_passingTest_1 = _registerName1("indexesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_126( + ffi.Pointer _objc_msgSend_131( ffi.Pointer obj, ffi.Pointer sel, int opts, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_126( + return __objc_msgSend_131( obj, sel, opts, @@ -5564,27 +5977,27 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_126Ptr = _lookup< + late final __objc_msgSend_131Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< + late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_indexesInRange_options_passingTest_1 = _registerName1("indexesInRange:options:passingTest:"); - ffi.Pointer _objc_msgSend_127( + ffi.Pointer _objc_msgSend_132( ffi.Pointer obj, ffi.Pointer sel, NSRange range, int opts, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_127( + return __objc_msgSend_132( obj, sel, range, @@ -5593,7 +6006,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_127Ptr = _lookup< + late final __objc_msgSend_132Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -5601,41 +6014,41 @@ class NativeCupertinoHttp { NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< + late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_enumerateRangesUsingBlock_1 = _registerName1("enumerateRangesUsingBlock:"); - void _objc_msgSend_128( + void _objc_msgSend_133( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_128( + return __objc_msgSend_133( obj, sel, block, ); } - late final __objc_msgSend_128Ptr = _lookup< + late final __objc_msgSend_133Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< + late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_enumerateRangesWithOptions_usingBlock_1 = _registerName1("enumerateRangesWithOptions:usingBlock:"); - void _objc_msgSend_129( + void _objc_msgSend_134( ffi.Pointer obj, ffi.Pointer sel, int opts, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_129( + return __objc_msgSend_134( obj, sel, opts, @@ -5643,24 +6056,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_129Ptr = _lookup< + late final __objc_msgSend_134Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< + late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_enumerateRangesInRange_options_usingBlock_1 = _registerName1("enumerateRangesInRange:options:usingBlock:"); - void _objc_msgSend_130( + void _objc_msgSend_135( ffi.Pointer obj, ffi.Pointer sel, NSRange range, int opts, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_130( + return __objc_msgSend_135( obj, sel, range, @@ -5669,32 +6082,32 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_130Ptr = _lookup< + late final __objc_msgSend_135Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< + late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); - ffi.Pointer _objc_msgSend_131( + ffi.Pointer _objc_msgSend_136( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer indexes, ) { - return __objc_msgSend_131( + return __objc_msgSend_136( obj, sel, indexes, ); } - late final __objc_msgSend_131Ptr = _lookup< + late final __objc_msgSend_136Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< + late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -5702,35 +6115,35 @@ class NativeCupertinoHttp { _registerName1("objectAtIndexedSubscript:"); late final _sel_enumerateObjectsUsingBlock_1 = _registerName1("enumerateObjectsUsingBlock:"); - void _objc_msgSend_132( + void _objc_msgSend_137( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_132( + return __objc_msgSend_137( obj, sel, block, ); } - late final __objc_msgSend_132Ptr = _lookup< + late final __objc_msgSend_137Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< + late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_enumerateObjectsWithOptions_usingBlock_1 = _registerName1("enumerateObjectsWithOptions:usingBlock:"); - void _objc_msgSend_133( + void _objc_msgSend_138( ffi.Pointer obj, ffi.Pointer sel, int opts, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_133( + return __objc_msgSend_138( obj, sel, opts, @@ -5738,24 +6151,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_133Ptr = _lookup< + late final __objc_msgSend_138Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< + late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_enumerateObjectsAtIndexes_options_usingBlock_1 = _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); - void _objc_msgSend_134( + void _objc_msgSend_139( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer s, int opts, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_134( + return __objc_msgSend_139( obj, sel, s, @@ -5764,7 +6177,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_134Ptr = _lookup< + late final __objc_msgSend_139Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -5772,41 +6185,41 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< + late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_indexOfObjectPassingTest_1 = _registerName1("indexOfObjectPassingTest:"); - int _objc_msgSend_135( + int _objc_msgSend_140( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_135( + return __objc_msgSend_140( obj, sel, predicate, ); } - late final __objc_msgSend_135Ptr = _lookup< + late final __objc_msgSend_140Ptr = _lookup< ffi.NativeFunction< NSUInteger Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< + late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_indexOfObjectWithOptions_passingTest_1 = _registerName1("indexOfObjectWithOptions:passingTest:"); - int _objc_msgSend_136( + int _objc_msgSend_141( ffi.Pointer obj, ffi.Pointer sel, int opts, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_136( + return __objc_msgSend_141( obj, sel, opts, @@ -5814,24 +6227,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_136Ptr = _lookup< + late final __objc_msgSend_141Ptr = _lookup< ffi.NativeFunction< NSUInteger Function(ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< + late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_indexOfObjectAtIndexes_options_passingTest_1 = _registerName1("indexOfObjectAtIndexes:options:passingTest:"); - int _objc_msgSend_137( + int _objc_msgSend_142( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer s, int opts, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_137( + return __objc_msgSend_142( obj, sel, s, @@ -5840,7 +6253,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_137Ptr = _lookup< + late final __objc_msgSend_142Ptr = _lookup< ffi.NativeFunction< NSUInteger Function( ffi.Pointer, @@ -5848,41 +6261,41 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< + late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_indexesOfObjectsPassingTest_1 = _registerName1("indexesOfObjectsPassingTest:"); - ffi.Pointer _objc_msgSend_138( + ffi.Pointer _objc_msgSend_143( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_138( + return __objc_msgSend_143( obj, sel, predicate, ); } - late final __objc_msgSend_138Ptr = _lookup< + late final __objc_msgSend_143Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< + late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_indexesOfObjectsWithOptions_passingTest_1 = _registerName1("indexesOfObjectsWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_139( + ffi.Pointer _objc_msgSend_144( ffi.Pointer obj, ffi.Pointer sel, int opts, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_139( + return __objc_msgSend_144( obj, sel, opts, @@ -5890,27 +6303,27 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_139Ptr = _lookup< + late final __objc_msgSend_144Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< + late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_indexesOfObjectsAtIndexes_options_passingTest_1 = _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); - ffi.Pointer _objc_msgSend_140( + ffi.Pointer _objc_msgSend_145( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer s, int opts, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_140( + return __objc_msgSend_145( obj, sel, s, @@ -5919,7 +6332,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_140Ptr = _lookup< + late final __objc_msgSend_145Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -5927,7 +6340,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< + late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -5937,35 +6350,35 @@ class NativeCupertinoHttp { late final _sel_sortedArrayUsingComparator_1 = _registerName1("sortedArrayUsingComparator:"); - ffi.Pointer _objc_msgSend_141( + ffi.Pointer _objc_msgSend_146( ffi.Pointer obj, ffi.Pointer sel, NSComparator cmptr, ) { - return __objc_msgSend_141( + return __objc_msgSend_146( obj, sel, cmptr, ); } - late final __objc_msgSend_141Ptr = _lookup< + late final __objc_msgSend_146Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< + late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSComparator)>(); late final _sel_sortedArrayWithOptions_usingComparator_1 = _registerName1("sortedArrayWithOptions:usingComparator:"); - ffi.Pointer _objc_msgSend_142( + ffi.Pointer _objc_msgSend_147( ffi.Pointer obj, ffi.Pointer sel, int opts, NSComparator cmptr, ) { - return __objc_msgSend_142( + return __objc_msgSend_147( obj, sel, opts, @@ -5973,17 +6386,17 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_142Ptr = _lookup< + late final __objc_msgSend_147Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Int32, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< + late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int, NSComparator)>(); late final _sel_indexOfObject_inSortedRange_options_usingComparator_1 = _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); - int _objc_msgSend_143( + int _objc_msgSend_148( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer obj1, @@ -5991,7 +6404,7 @@ class NativeCupertinoHttp { int opts, NSComparator cmp, ) { - return __objc_msgSend_143( + return __objc_msgSend_148( obj, sel, obj1, @@ -6001,7 +6414,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_143Ptr = _lookup< + late final __objc_msgSend_148Ptr = _lookup< ffi.NativeFunction< NSUInteger Function( ffi.Pointer, @@ -6010,27 +6423,67 @@ class NativeCupertinoHttp { NSRange, ffi.Int32, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< + late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSRange, int, NSComparator)>(); late final _sel_array1 = _registerName1("array"); late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); + instancetype _objc_msgSend_149( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer anObject, + ) { + return __objc_msgSend_149( + obj, + sel, + anObject, + ); + } + + late final __objc_msgSend_149Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_arrayWithObjects_count_1 = _registerName1("arrayWithObjects:count:"); late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); + instancetype _objc_msgSend_150( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer array, + ) { + return __objc_msgSend_150( + obj, + sel, + array, + ); + } + + late final __objc_msgSend_150Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); late final _sel_initWithArray_1 = _registerName1("initWithArray:"); late final _sel_initWithArray_copyItems_1 = _registerName1("initWithArray:copyItems:"); - instancetype _objc_msgSend_144( + instancetype _objc_msgSend_151( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer array, bool flag, ) { - return __objc_msgSend_144( + return __objc_msgSend_151( obj, sel, array, @@ -6038,23 +6491,23 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_144Ptr = _lookup< + late final __objc_msgSend_151Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< + late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_initWithContentsOfURL_error_1 = _registerName1("initWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_145( + ffi.Pointer _objc_msgSend_152( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer> error, ) { - return __objc_msgSend_145( + return __objc_msgSend_152( obj, sel, url, @@ -6062,14 +6515,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_145Ptr = _lookup< + late final __objc_msgSend_152Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< + late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -6084,7 +6537,7 @@ class NativeCupertinoHttp { late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1 = _registerName1( "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:"); - instancetype _objc_msgSend_146( + instancetype _objc_msgSend_153( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer inserts, @@ -6093,7 +6546,7 @@ class NativeCupertinoHttp { ffi.Pointer removedObjects, ffi.Pointer changes, ) { - return __objc_msgSend_146( + return __objc_msgSend_153( obj, sel, inserts, @@ -6104,7 +6557,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_146Ptr = _lookup< + late final __objc_msgSend_153Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -6114,7 +6567,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< + late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -6127,7 +6580,7 @@ class NativeCupertinoHttp { late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1 = _registerName1( "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:"); - instancetype _objc_msgSend_147( + instancetype _objc_msgSend_154( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer inserts, @@ -6135,7 +6588,7 @@ class NativeCupertinoHttp { ffi.Pointer removes, ffi.Pointer removedObjects, ) { - return __objc_msgSend_147( + return __objc_msgSend_154( obj, sel, inserts, @@ -6145,7 +6598,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_147Ptr = _lookup< + late final __objc_msgSend_154Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -6154,7 +6607,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< + late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -6170,14 +6623,14 @@ class NativeCupertinoHttp { _getClass1("NSOrderedCollectionChange"); late final _sel_changeWithObject_type_index_1 = _registerName1("changeWithObject:type:index:"); - ffi.Pointer _objc_msgSend_148( + ffi.Pointer _objc_msgSend_155( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anObject, int type, int index, ) { - return __objc_msgSend_148( + return __objc_msgSend_155( obj, sel, anObject, @@ -6186,7 +6639,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_148Ptr = _lookup< + late final __objc_msgSend_155Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -6194,13 +6647,13 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< + late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int)>(); late final _sel_changeWithObject_type_index_associatedIndex_1 = _registerName1("changeWithObject:type:index:associatedIndex:"); - ffi.Pointer _objc_msgSend_149( + ffi.Pointer _objc_msgSend_156( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anObject, @@ -6208,7 +6661,7 @@ class NativeCupertinoHttp { int index, int associatedIndex, ) { - return __objc_msgSend_149( + return __objc_msgSend_156( obj, sel, anObject, @@ -6218,7 +6671,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_149Ptr = _lookup< + late final __objc_msgSend_156Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -6227,41 +6680,41 @@ class NativeCupertinoHttp { ffi.Int32, NSUInteger, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< + late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int, int)>(); late final _sel_object1 = _registerName1("object"); late final _sel_changeType1 = _registerName1("changeType"); - int _objc_msgSend_150( + int _objc_msgSend_157( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_150( + return __objc_msgSend_157( obj, sel, ); } - late final __objc_msgSend_150Ptr = _lookup< + late final __objc_msgSend_157Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< + late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_index1 = _registerName1("index"); late final _sel_associatedIndex1 = _registerName1("associatedIndex"); late final _sel_initWithObject_type_index_1 = _registerName1("initWithObject:type:index:"); - instancetype _objc_msgSend_151( + instancetype _objc_msgSend_158( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anObject, int type, int index, ) { - return __objc_msgSend_151( + return __objc_msgSend_158( obj, sel, anObject, @@ -6270,17 +6723,17 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_151Ptr = _lookup< + late final __objc_msgSend_158Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< + late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int)>(); late final _sel_initWithObject_type_index_associatedIndex_1 = _registerName1("initWithObject:type:index:associatedIndex:"); - instancetype _objc_msgSend_152( + instancetype _objc_msgSend_159( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anObject, @@ -6288,7 +6741,7 @@ class NativeCupertinoHttp { int index, int associatedIndex, ) { - return __objc_msgSend_152( + return __objc_msgSend_159( obj, sel, anObject, @@ -6298,7 +6751,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_152Ptr = _lookup< + late final __objc_msgSend_159Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -6307,43 +6760,43 @@ class NativeCupertinoHttp { ffi.Int32, NSUInteger, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< + late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int, int)>(); late final _sel_differenceByTransformingChangesWithBlock_1 = _registerName1("differenceByTransformingChangesWithBlock:"); - ffi.Pointer _objc_msgSend_153( + ffi.Pointer _objc_msgSend_160( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_153( + return __objc_msgSend_160( obj, sel, block, ); } - late final __objc_msgSend_153Ptr = _lookup< + late final __objc_msgSend_160Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< + late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_inverseDifference1 = _registerName1("inverseDifference"); late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); - ffi.Pointer _objc_msgSend_154( + ffi.Pointer _objc_msgSend_161( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer other, int options, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_154( + return __objc_msgSend_161( obj, sel, other, @@ -6352,7 +6805,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_154Ptr = _lookup< + late final __objc_msgSend_161Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -6360,7 +6813,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< + late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -6370,13 +6823,13 @@ class NativeCupertinoHttp { late final _sel_differenceFromArray_withOptions_1 = _registerName1("differenceFromArray:withOptions:"); - ffi.Pointer _objc_msgSend_155( + ffi.Pointer _objc_msgSend_162( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer other, int options, ) { - return __objc_msgSend_155( + return __objc_msgSend_162( obj, sel, other, @@ -6384,123 +6837,123 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_155Ptr = _lookup< + late final __objc_msgSend_162Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< + late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_differenceFromArray_1 = _registerName1("differenceFromArray:"); - ffi.Pointer _objc_msgSend_156( + ffi.Pointer _objc_msgSend_163( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer other, ) { - return __objc_msgSend_156( + return __objc_msgSend_163( obj, sel, other, ); } - late final __objc_msgSend_156Ptr = _lookup< + late final __objc_msgSend_163Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< + late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_arrayByApplyingDifference_1 = _registerName1("arrayByApplyingDifference:"); - ffi.Pointer _objc_msgSend_157( + ffi.Pointer _objc_msgSend_164( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer difference, ) { - return __objc_msgSend_157( + return __objc_msgSend_164( obj, sel, difference, ); } - late final __objc_msgSend_157Ptr = _lookup< + late final __objc_msgSend_164Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< + late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_getObjects_1 = _registerName1("getObjects:"); - void _objc_msgSend_158( + void _objc_msgSend_165( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer> objects, ) { - return __objc_msgSend_158( + return __objc_msgSend_165( obj, sel, objects, ); } - late final __objc_msgSend_158Ptr = _lookup< + late final __objc_msgSend_165Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< + late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_arrayWithContentsOfFile_1 = _registerName1("arrayWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_159( + ffi.Pointer _objc_msgSend_166( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, ) { - return __objc_msgSend_159( + return __objc_msgSend_166( obj, sel, path, ); } - late final __objc_msgSend_159Ptr = _lookup< + late final __objc_msgSend_166Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< + late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_arrayWithContentsOfURL_1 = _registerName1("arrayWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_160( + ffi.Pointer _objc_msgSend_167( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_160( + return __objc_msgSend_167( obj, sel, url, ); } - late final __objc_msgSend_160Ptr = _lookup< + late final __objc_msgSend_167Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< + late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -6510,13 +6963,13 @@ class NativeCupertinoHttp { _registerName1("initWithContentsOfURL:"); late final _sel_writeToURL_atomically_1 = _registerName1("writeToURL:atomically:"); - bool _objc_msgSend_161( + bool _objc_msgSend_168( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, bool atomically, ) { - return __objc_msgSend_161( + return __objc_msgSend_168( obj, sel, url, @@ -6524,30 +6977,30 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_161Ptr = _lookup< + late final __objc_msgSend_168Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< + late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_allKeys1 = _registerName1("allKeys"); - ffi.Pointer _objc_msgSend_162( + ffi.Pointer _objc_msgSend_169( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_162( + return __objc_msgSend_169( obj, sel, ); } - late final __objc_msgSend_162Ptr = _lookup< + late final __objc_msgSend_169Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< + late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -6557,35 +7010,35 @@ class NativeCupertinoHttp { _registerName1("descriptionInStringsFileFormat"); late final _sel_isEqualToDictionary_1 = _registerName1("isEqualToDictionary:"); - bool _objc_msgSend_163( + bool _objc_msgSend_170( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherDictionary, ) { - return __objc_msgSend_163( + return __objc_msgSend_170( obj, sel, otherDictionary, ); } - late final __objc_msgSend_163Ptr = _lookup< + late final __objc_msgSend_170Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< + late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_objectsForKeys_notFoundMarker_1 = _registerName1("objectsForKeys:notFoundMarker:"); - ffi.Pointer _objc_msgSend_164( + ffi.Pointer _objc_msgSend_171( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer keys, ffi.Pointer marker, ) { - return __objc_msgSend_164( + return __objc_msgSend_171( obj, sel, keys, @@ -6593,14 +7046,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_164Ptr = _lookup< + late final __objc_msgSend_171Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< + late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -6611,14 +7064,14 @@ class NativeCupertinoHttp { _registerName1("keysSortedByValueUsingSelector:"); late final _sel_getObjects_andKeys_count_1 = _registerName1("getObjects:andKeys:count:"); - void _objc_msgSend_165( + void _objc_msgSend_172( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer> objects, ffi.Pointer> keys, int count, ) { - return __objc_msgSend_165( + return __objc_msgSend_172( obj, sel, objects, @@ -6627,7 +7080,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_165Ptr = _lookup< + late final __objc_msgSend_172Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -6635,7 +7088,7 @@ class NativeCupertinoHttp { ffi.Pointer>, ffi.Pointer>, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< + late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -6647,35 +7100,35 @@ class NativeCupertinoHttp { _registerName1("objectForKeyedSubscript:"); late final _sel_enumerateKeysAndObjectsUsingBlock_1 = _registerName1("enumerateKeysAndObjectsUsingBlock:"); - void _objc_msgSend_166( + void _objc_msgSend_173( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_166( + return __objc_msgSend_173( obj, sel, block, ); } - late final __objc_msgSend_166Ptr = _lookup< + late final __objc_msgSend_173Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< + late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); - void _objc_msgSend_167( + void _objc_msgSend_174( ffi.Pointer obj, ffi.Pointer sel, int opts, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_167( + return __objc_msgSend_174( obj, sel, opts, @@ -6683,11 +7136,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_167Ptr = _lookup< + late final __objc_msgSend_174Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< + late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); @@ -6697,35 +7150,35 @@ class NativeCupertinoHttp { _registerName1("keysSortedByValueWithOptions:usingComparator:"); late final _sel_keysOfEntriesPassingTest_1 = _registerName1("keysOfEntriesPassingTest:"); - ffi.Pointer _objc_msgSend_168( + ffi.Pointer _objc_msgSend_175( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_168( + return __objc_msgSend_175( obj, sel, predicate, ); } - late final __objc_msgSend_168Ptr = _lookup< + late final __objc_msgSend_175Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< + late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_keysOfEntriesWithOptions_passingTest_1 = _registerName1("keysOfEntriesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_169( + ffi.Pointer _objc_msgSend_176( ffi.Pointer obj, ffi.Pointer sel, int opts, ffi.Pointer<_ObjCBlock> predicate, ) { - return __objc_msgSend_169( + return __objc_msgSend_176( obj, sel, opts, @@ -6733,25 +7186,25 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_169Ptr = _lookup< + late final __objc_msgSend_176Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< + late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); - void _objc_msgSend_170( + void _objc_msgSend_177( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer> objects, ffi.Pointer> keys, ) { - return __objc_msgSend_170( + return __objc_msgSend_177( obj, sel, objects, @@ -6759,14 +7212,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_170Ptr = _lookup< + late final __objc_msgSend_177Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer>, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< + late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -6775,58 +7228,58 @@ class NativeCupertinoHttp { late final _sel_dictionaryWithContentsOfFile_1 = _registerName1("dictionaryWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_171( + ffi.Pointer _objc_msgSend_178( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, ) { - return __objc_msgSend_171( + return __objc_msgSend_178( obj, sel, path, ); } - late final __objc_msgSend_171Ptr = _lookup< + late final __objc_msgSend_178Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< + late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dictionaryWithContentsOfURL_1 = _registerName1("dictionaryWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_172( + ffi.Pointer _objc_msgSend_179( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_172( + return __objc_msgSend_179( obj, sel, url, ); } - late final __objc_msgSend_172Ptr = _lookup< + late final __objc_msgSend_179Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< + late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dictionary1 = _registerName1("dictionary"); late final _sel_dictionaryWithObject_forKey_1 = _registerName1("dictionaryWithObject:forKey:"); - instancetype _objc_msgSend_173( + instancetype _objc_msgSend_180( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer object, ffi.Pointer key, ) { - return __objc_msgSend_173( + return __objc_msgSend_180( obj, sel, object, @@ -6834,14 +7287,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_173Ptr = _lookup< + late final __objc_msgSend_180Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< + late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -6851,35 +7304,35 @@ class NativeCupertinoHttp { _registerName1("dictionaryWithObjectsAndKeys:"); late final _sel_dictionaryWithDictionary_1 = _registerName1("dictionaryWithDictionary:"); - instancetype _objc_msgSend_174( + instancetype _objc_msgSend_181( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer dict, ) { - return __objc_msgSend_174( + return __objc_msgSend_181( obj, sel, dict, ); } - late final __objc_msgSend_174Ptr = _lookup< + late final __objc_msgSend_181Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< + late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dictionaryWithObjects_forKeys_1 = _registerName1("dictionaryWithObjects:forKeys:"); - instancetype _objc_msgSend_175( + instancetype _objc_msgSend_182( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer objects, ffi.Pointer keys, ) { - return __objc_msgSend_175( + return __objc_msgSend_182( obj, sel, objects, @@ -6887,14 +7340,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_175Ptr = _lookup< + late final __objc_msgSend_182Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< + late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -6903,13 +7356,13 @@ class NativeCupertinoHttp { late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); late final _sel_initWithDictionary_copyItems_1 = _registerName1("initWithDictionary:copyItems:"); - instancetype _objc_msgSend_176( + instancetype _objc_msgSend_183( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherDictionary, bool flag, ) { - return __objc_msgSend_176( + return __objc_msgSend_183( obj, sel, otherDictionary, @@ -6917,23 +7370,23 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_176Ptr = _lookup< + late final __objc_msgSend_183Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< + late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_initWithObjects_forKeys_1 = _registerName1("initWithObjects:forKeys:"); - ffi.Pointer _objc_msgSend_177( + ffi.Pointer _objc_msgSend_184( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer> error, ) { - return __objc_msgSend_177( + return __objc_msgSend_184( obj, sel, url, @@ -6941,14 +7394,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_177Ptr = _lookup< + late final __objc_msgSend_184Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< + late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -6961,14 +7414,14 @@ class NativeCupertinoHttp { _registerName1("sharedKeySetForKeys:"); late final _sel_countByEnumeratingWithState_objects_count_1 = _registerName1("countByEnumeratingWithState:objects:count:"); - int _objc_msgSend_178( + int _objc_msgSend_185( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer state, ffi.Pointer> buffer, int len, ) { - return __objc_msgSend_178( + return __objc_msgSend_185( obj, sel, state, @@ -6977,7 +7430,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_178Ptr = _lookup< + late final __objc_msgSend_185Ptr = _lookup< ffi.NativeFunction< NSUInteger Function( ffi.Pointer, @@ -6985,7 +7438,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer>, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< + late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< int Function( ffi.Pointer, ffi.Pointer, @@ -6995,14 +7448,14 @@ class NativeCupertinoHttp { late final _sel_initWithDomain_code_userInfo_1 = _registerName1("initWithDomain:code:userInfo:"); - instancetype _objc_msgSend_179( + instancetype _objc_msgSend_186( ffi.Pointer obj, ffi.Pointer sel, NSErrorDomain domain, int code, ffi.Pointer dict, ) { - return __objc_msgSend_179( + return __objc_msgSend_186( obj, sel, domain, @@ -7011,7 +7464,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_179Ptr = _lookup< + late final __objc_msgSend_186Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -7019,7 +7472,7 @@ class NativeCupertinoHttp { NSErrorDomain, NSInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< + late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, NSErrorDomain, int, ffi.Pointer)>(); @@ -7028,21 +7481,21 @@ class NativeCupertinoHttp { late final _sel_domain1 = _registerName1("domain"); late final _sel_code1 = _registerName1("code"); late final _sel_userInfo1 = _registerName1("userInfo"); - ffi.Pointer _objc_msgSend_180( + ffi.Pointer _objc_msgSend_187( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_180( + return __objc_msgSend_187( obj, sel, ); } - late final __objc_msgSend_180Ptr = _lookup< + late final __objc_msgSend_187Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< + late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -7054,18 +7507,36 @@ class NativeCupertinoHttp { _registerName1("localizedRecoverySuggestion"); late final _sel_localizedRecoveryOptions1 = _registerName1("localizedRecoveryOptions"); + ffi.Pointer _objc_msgSend_188( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_188( + obj, + sel, + ); + } + + late final __objc_msgSend_188Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); late final _sel_helpAnchor1 = _registerName1("helpAnchor"); late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); late final _sel_setUserInfoValueProviderForDomain_provider_1 = _registerName1("setUserInfoValueProviderForDomain:provider:"); - void _objc_msgSend_181( + void _objc_msgSend_189( ffi.Pointer obj, ffi.Pointer sel, NSErrorDomain errorDomain, ffi.Pointer<_ObjCBlock> provider, ) { - return __objc_msgSend_181( + return __objc_msgSend_189( obj, sel, errorDomain, @@ -7073,24 +7544,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_181Ptr = _lookup< + late final __objc_msgSend_189Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSErrorDomain, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< + late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSErrorDomain, ffi.Pointer<_ObjCBlock>)>(); late final _sel_userInfoValueProviderForDomain_1 = _registerName1("userInfoValueProviderForDomain:"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_182( + ffi.Pointer<_ObjCBlock> _objc_msgSend_190( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer err, NSErrorUserInfoKey userInfoKey, NSErrorDomain errorDomain, ) { - return __objc_msgSend_182( + return __objc_msgSend_190( obj, sel, err, @@ -7099,7 +7570,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_182Ptr = _lookup< + late final __objc_msgSend_190Ptr = _lookup< ffi.NativeFunction< ffi.Pointer<_ObjCBlock> Function( ffi.Pointer, @@ -7107,7 +7578,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSErrorUserInfoKey, NSErrorDomain)>>('objc_msgSend'); - late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< + late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< ffi.Pointer<_ObjCBlock> Function( ffi.Pointer, ffi.Pointer, @@ -7115,41 +7586,16 @@ class NativeCupertinoHttp { NSErrorUserInfoKey, NSErrorDomain)>(); - late final _sel_checkResourceIsReachableAndReturnError_1 = - _registerName1("checkResourceIsReachableAndReturnError:"); - bool _objc_msgSend_183( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> error, - ) { - return __objc_msgSend_183( - obj, - sel, - error, - ); - } - - late final __objc_msgSend_183Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); - late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); - late final _sel_filePathURL1 = _registerName1("filePathURL"); late final _sel_getResourceValue_forKey_error_1 = _registerName1("getResourceValue:forKey:error:"); - bool _objc_msgSend_184( + bool _objc_msgSend_191( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer> value, NSURLResourceKey key, ffi.Pointer> error, ) { - return __objc_msgSend_184( + return __objc_msgSend_191( obj, sel, value, @@ -7158,7 +7604,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_184Ptr = _lookup< + late final __objc_msgSend_191Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -7166,7 +7612,7 @@ class NativeCupertinoHttp { ffi.Pointer>, NSURLResourceKey, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< + late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< bool Function( ffi.Pointer, ffi.Pointer, @@ -7176,13 +7622,13 @@ class NativeCupertinoHttp { late final _sel_resourceValuesForKeys_error_1 = _registerName1("resourceValuesForKeys:error:"); - ffi.Pointer _objc_msgSend_185( + ffi.Pointer _objc_msgSend_192( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer keys, ffi.Pointer> error, ) { - return __objc_msgSend_185( + return __objc_msgSend_192( obj, sel, keys, @@ -7190,14 +7636,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_185Ptr = _lookup< + late final __objc_msgSend_192Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< + late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -7206,14 +7652,14 @@ class NativeCupertinoHttp { late final _sel_setResourceValue_forKey_error_1 = _registerName1("setResourceValue:forKey:error:"); - bool _objc_msgSend_186( + bool _objc_msgSend_193( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, NSURLResourceKey key, ffi.Pointer> error, ) { - return __objc_msgSend_186( + return __objc_msgSend_193( obj, sel, value, @@ -7222,7 +7668,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_186Ptr = _lookup< + late final __objc_msgSend_193Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -7230,7 +7676,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSURLResourceKey, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< + late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< bool Function( ffi.Pointer, ffi.Pointer, @@ -7240,13 +7686,13 @@ class NativeCupertinoHttp { late final _sel_setResourceValues_error_1 = _registerName1("setResourceValues:error:"); - bool _objc_msgSend_187( + bool _objc_msgSend_194( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer keyedValues, ffi.Pointer> error, ) { - return __objc_msgSend_187( + return __objc_msgSend_194( obj, sel, keyedValues, @@ -7254,36 +7700,36 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_187Ptr = _lookup< + late final __objc_msgSend_194Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< + late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>(); late final _sel_removeCachedResourceValueForKey_1 = _registerName1("removeCachedResourceValueForKey:"); - void _objc_msgSend_188( + void _objc_msgSend_195( ffi.Pointer obj, ffi.Pointer sel, NSURLResourceKey key, ) { - return __objc_msgSend_188( + return __objc_msgSend_195( obj, sel, key, ); } - late final __objc_msgSend_188Ptr = _lookup< + late final __objc_msgSend_195Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSURLResourceKey)>>('objc_msgSend'); - late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< + late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, NSURLResourceKey)>(); @@ -7291,13 +7737,13 @@ class NativeCupertinoHttp { _registerName1("removeAllCachedResourceValues"); late final _sel_setTemporaryResourceValue_forKey_1 = _registerName1("setTemporaryResourceValue:forKey:"); - void _objc_msgSend_189( + void _objc_msgSend_196( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, NSURLResourceKey key, ) { - return __objc_msgSend_189( + return __objc_msgSend_196( obj, sel, value, @@ -7305,18 +7751,18 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_189Ptr = _lookup< + late final __objc_msgSend_196Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSURLResourceKey)>>('objc_msgSend'); - late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< + late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSURLResourceKey)>(); late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = _registerName1( "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); - ffi.Pointer _objc_msgSend_190( + ffi.Pointer _objc_msgSend_197( ffi.Pointer obj, ffi.Pointer sel, int options, @@ -7324,7 +7770,7 @@ class NativeCupertinoHttp { ffi.Pointer relativeURL, ffi.Pointer> error, ) { - return __objc_msgSend_190( + return __objc_msgSend_197( obj, sel, options, @@ -7334,7 +7780,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_190Ptr = _lookup< + late final __objc_msgSend_197Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -7343,7 +7789,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< + late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -7355,7 +7801,7 @@ class NativeCupertinoHttp { late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = _registerName1( "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - instancetype _objc_msgSend_191( + instancetype _objc_msgSend_198( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bookmarkData, @@ -7364,7 +7810,7 @@ class NativeCupertinoHttp { ffi.Pointer isStale, ffi.Pointer> error, ) { - return __objc_msgSend_191( + return __objc_msgSend_198( obj, sel, bookmarkData, @@ -7375,7 +7821,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_191Ptr = _lookup< + late final __objc_msgSend_198Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -7385,7 +7831,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< + late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -7400,13 +7846,13 @@ class NativeCupertinoHttp { "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); late final _sel_resourceValuesForKeys_fromBookmarkData_1 = _registerName1("resourceValuesForKeys:fromBookmarkData:"); - ffi.Pointer _objc_msgSend_192( + ffi.Pointer _objc_msgSend_199( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer keys, ffi.Pointer bookmarkData, ) { - return __objc_msgSend_192( + return __objc_msgSend_199( obj, sel, keys, @@ -7414,14 +7860,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_192Ptr = _lookup< + late final __objc_msgSend_199Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< + late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -7430,7 +7876,7 @@ class NativeCupertinoHttp { late final _sel_writeBookmarkData_toURL_options_error_1 = _registerName1("writeBookmarkData:toURL:options:error:"); - bool _objc_msgSend_193( + bool _objc_msgSend_200( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bookmarkData, @@ -7438,7 +7884,7 @@ class NativeCupertinoHttp { int options, ffi.Pointer> error, ) { - return __objc_msgSend_193( + return __objc_msgSend_200( obj, sel, bookmarkData, @@ -7448,7 +7894,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_193Ptr = _lookup< + late final __objc_msgSend_200Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -7457,7 +7903,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSURLBookmarkFileCreationOptions, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< + late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< bool Function( ffi.Pointer, ffi.Pointer, @@ -7468,13 +7914,13 @@ class NativeCupertinoHttp { late final _sel_bookmarkDataWithContentsOfURL_error_1 = _registerName1("bookmarkDataWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_194( + ffi.Pointer _objc_msgSend_201( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bookmarkFileURL, ffi.Pointer> error, ) { - return __objc_msgSend_194( + return __objc_msgSend_201( obj, sel, bookmarkFileURL, @@ -7482,14 +7928,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_194Ptr = _lookup< + late final __objc_msgSend_201Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< + late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -7498,14 +7944,14 @@ class NativeCupertinoHttp { late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = _registerName1("URLByResolvingAliasFileAtURL:options:error:"); - instancetype _objc_msgSend_195( + instancetype _objc_msgSend_202( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, int options, ffi.Pointer> error, ) { - return __objc_msgSend_195( + return __objc_msgSend_202( obj, sel, url, @@ -7514,7 +7960,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_195Ptr = _lookup< + late final __objc_msgSend_202Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -7522,7 +7968,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< + late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -7540,25 +7986,45 @@ class NativeCupertinoHttp { _registerName1("promisedItemResourceValuesForKeys:error:"); late final _sel_checkPromisedItemIsReachableAndReturnError_1 = _registerName1("checkPromisedItemIsReachableAndReturnError:"); + bool _objc_msgSend_203( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer> error, + ) { + return __objc_msgSend_203( + obj, + sel, + error, + ); + } + + late final __objc_msgSend_203Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('objc_msgSend'); + late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); + late final _sel_fileURLWithPathComponents_1 = _registerName1("fileURLWithPathComponents:"); - ffi.Pointer _objc_msgSend_196( + ffi.Pointer _objc_msgSend_204( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer components, ) { - return __objc_msgSend_196( + return __objc_msgSend_204( obj, sel, components, ); } - late final __objc_msgSend_196Ptr = _lookup< + late final __objc_msgSend_204Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< + late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -7567,49 +8033,96 @@ class NativeCupertinoHttp { late final _sel_pathExtension1 = _registerName1("pathExtension"); late final _sel_URLByAppendingPathComponent_1 = _registerName1("URLByAppendingPathComponent:"); + ffi.Pointer _objc_msgSend_205( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer pathComponent, + ) { + return __objc_msgSend_205( + obj, + sel, + pathComponent, + ); + } + + late final __objc_msgSend_205Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + late final _sel_URLByAppendingPathComponent_isDirectory_1 = _registerName1("URLByAppendingPathComponent:isDirectory:"); + ffi.Pointer _objc_msgSend_206( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer pathComponent, + bool isDirectory, + ) { + return __objc_msgSend_206( + obj, + sel, + pathComponent, + isDirectory, + ); + } + + late final __objc_msgSend_206Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, bool)>(); + late final _sel_URLByDeletingLastPathComponent1 = _registerName1("URLByDeletingLastPathComponent"); late final _sel_URLByAppendingPathExtension_1 = _registerName1("URLByAppendingPathExtension:"); late final _sel_URLByDeletingPathExtension1 = _registerName1("URLByDeletingPathExtension"); + late final _sel_checkResourceIsReachableAndReturnError_1 = + _registerName1("checkResourceIsReachableAndReturnError:"); late final _sel_URLByStandardizingPath1 = _registerName1("URLByStandardizingPath"); late final _sel_URLByResolvingSymlinksInPath1 = _registerName1("URLByResolvingSymlinksInPath"); late final _sel_resourceDataUsingCache_1 = _registerName1("resourceDataUsingCache:"); - ffi.Pointer _objc_msgSend_197( + ffi.Pointer _objc_msgSend_207( ffi.Pointer obj, ffi.Pointer sel, bool shouldUseCache, ) { - return __objc_msgSend_197( + return __objc_msgSend_207( obj, sel, shouldUseCache, ); } - late final __objc_msgSend_197Ptr = _lookup< + late final __objc_msgSend_207Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< + late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_loadResourceDataNotifyingClient_usingCache_1 = _registerName1("loadResourceDataNotifyingClient:usingCache:"); - void _objc_msgSend_198( + void _objc_msgSend_208( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer client, bool shouldUseCache, ) { - return __objc_msgSend_198( + return __objc_msgSend_208( obj, sel, client, @@ -7617,24 +8130,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_198Ptr = _lookup< + late final __objc_msgSend_208Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< + late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); late final _sel_setResourceData_1 = _registerName1("setResourceData:"); late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); - bool _objc_msgSend_199( + bool _objc_msgSend_209( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer property, ffi.Pointer propertyKey, ) { - return __objc_msgSend_199( + return __objc_msgSend_209( obj, sel, property, @@ -7642,78 +8155,78 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_199Ptr = _lookup< + late final __objc_msgSend_209Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< + late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); late final _sel_registerURLHandleClass_1 = _registerName1("registerURLHandleClass:"); - void _objc_msgSend_200( + void _objc_msgSend_210( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anURLHandleSubclass, ) { - return __objc_msgSend_200( + return __objc_msgSend_210( obj, sel, anURLHandleSubclass, ); } - late final __objc_msgSend_200Ptr = _lookup< + late final __objc_msgSend_210Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< + late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_URLHandleClassForURL_1 = _registerName1("URLHandleClassForURL:"); - ffi.Pointer _objc_msgSend_201( + ffi.Pointer _objc_msgSend_211( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anURL, ) { - return __objc_msgSend_201( + return __objc_msgSend_211( obj, sel, anURL, ); } - late final __objc_msgSend_201Ptr = _lookup< + late final __objc_msgSend_211Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< + late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_status1 = _registerName1("status"); - int _objc_msgSend_202( + int _objc_msgSend_212( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_202( + return __objc_msgSend_212( obj, sel, ); } - late final __objc_msgSend_202Ptr = _lookup< + late final __objc_msgSend_212Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< + late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_failureReason1 = _registerName1("failureReason"); @@ -7732,13 +8245,13 @@ class NativeCupertinoHttp { _registerName1("backgroundLoadDidFailWithReason:"); late final _sel_didLoadBytes_loadComplete_1 = _registerName1("didLoadBytes:loadComplete:"); - void _objc_msgSend_203( + void _objc_msgSend_213( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer newBytes, bool yorn, ) { - return __objc_msgSend_203( + return __objc_msgSend_213( obj, sel, newBytes, @@ -7746,64 +8259,64 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_203Ptr = _lookup< + late final __objc_msgSend_213Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< + late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); - bool _objc_msgSend_204( + bool _objc_msgSend_214( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anURL, ) { - return __objc_msgSend_204( + return __objc_msgSend_214( obj, sel, anURL, ); } - late final __objc_msgSend_204Ptr = _lookup< + late final __objc_msgSend_214Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< + late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); - ffi.Pointer _objc_msgSend_205( + ffi.Pointer _objc_msgSend_215( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anURL, ) { - return __objc_msgSend_205( + return __objc_msgSend_215( obj, sel, anURL, ); } - late final __objc_msgSend_205Ptr = _lookup< + late final __objc_msgSend_215Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< + late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); - ffi.Pointer _objc_msgSend_206( + ffi.Pointer _objc_msgSend_216( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anURL, bool willCache, ) { - return __objc_msgSend_206( + return __objc_msgSend_216( obj, sel, anURL, @@ -7811,14 +8324,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_206Ptr = _lookup< + late final __objc_msgSend_216Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< + late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); @@ -7833,36 +8346,36 @@ class NativeCupertinoHttp { late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); late final _sel_URLHandleUsingCache_1 = _registerName1("URLHandleUsingCache:"); - ffi.Pointer _objc_msgSend_207( + ffi.Pointer _objc_msgSend_217( ffi.Pointer obj, ffi.Pointer sel, bool shouldUseCache, ) { - return __objc_msgSend_207( + return __objc_msgSend_217( obj, sel, shouldUseCache, ); } - late final __objc_msgSend_207Ptr = _lookup< + late final __objc_msgSend_217Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< + late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_writeToFile_options_error_1 = _registerName1("writeToFile:options:error:"); - bool _objc_msgSend_208( + bool _objc_msgSend_218( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, int writeOptionsMask, ffi.Pointer> errorPtr, ) { - return __objc_msgSend_208( + return __objc_msgSend_218( obj, sel, path, @@ -7871,7 +8384,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_208Ptr = _lookup< + late final __objc_msgSend_218Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -7879,7 +8392,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< + late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< bool Function( ffi.Pointer, ffi.Pointer, @@ -7889,14 +8402,14 @@ class NativeCupertinoHttp { late final _sel_writeToURL_options_error_1 = _registerName1("writeToURL:options:error:"); - bool _objc_msgSend_209( + bool _objc_msgSend_219( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, int writeOptionsMask, ffi.Pointer> errorPtr, ) { - return __objc_msgSend_209( + return __objc_msgSend_219( obj, sel, url, @@ -7905,7 +8418,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_209Ptr = _lookup< + late final __objc_msgSend_219Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -7913,7 +8426,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< + late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< bool Function( ffi.Pointer, ffi.Pointer, @@ -7923,14 +8436,14 @@ class NativeCupertinoHttp { late final _sel_rangeOfData_options_range_1 = _registerName1("rangeOfData:options:range:"); - NSRange _objc_msgSend_210( + NSRange _objc_msgSend_220( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer dataToFind, int mask, NSRange searchRange, ) { - return __objc_msgSend_210( + return __objc_msgSend_220( obj, sel, dataToFind, @@ -7939,46 +8452,46 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_210Ptr = _lookup< + late final __objc_msgSend_220Ptr = _lookup< ffi.NativeFunction< NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< + late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, NSRange)>(); late final _sel_enumerateByteRangesUsingBlock_1 = _registerName1("enumerateByteRangesUsingBlock:"); - void _objc_msgSend_211( + void _objc_msgSend_221( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_211( + return __objc_msgSend_221( obj, sel, block, ); } - late final __objc_msgSend_211Ptr = _lookup< + late final __objc_msgSend_221Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< + late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_data1 = _registerName1("data"); late final _sel_dataWithBytes_length_1 = _registerName1("dataWithBytes:length:"); - instancetype _objc_msgSend_212( + instancetype _objc_msgSend_222( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bytes, int length, ) { - return __objc_msgSend_212( + return __objc_msgSend_222( obj, sel, bytes, @@ -7986,11 +8499,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_212Ptr = _lookup< + late final __objc_msgSend_222Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< + late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -7998,14 +8511,14 @@ class NativeCupertinoHttp { _registerName1("dataWithBytesNoCopy:length:"); late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_213( + instancetype _objc_msgSend_223( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bytes, int length, bool b, ) { - return __objc_msgSend_213( + return __objc_msgSend_223( obj, sel, bytes, @@ -8014,24 +8527,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_213Ptr = _lookup< + late final __objc_msgSend_223Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< + late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, bool)>(); late final _sel_dataWithContentsOfFile_options_error_1 = _registerName1("dataWithContentsOfFile:options:error:"); - instancetype _objc_msgSend_214( + instancetype _objc_msgSend_224( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, int readOptionsMask, ffi.Pointer> errorPtr, ) { - return __objc_msgSend_214( + return __objc_msgSend_224( obj, sel, path, @@ -8040,7 +8553,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_214Ptr = _lookup< + late final __objc_msgSend_224Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -8048,7 +8561,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< + late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -8058,14 +8571,14 @@ class NativeCupertinoHttp { late final _sel_dataWithContentsOfURL_options_error_1 = _registerName1("dataWithContentsOfURL:options:error:"); - instancetype _objc_msgSend_215( + instancetype _objc_msgSend_225( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, int readOptionsMask, ffi.Pointer> errorPtr, ) { - return __objc_msgSend_215( + return __objc_msgSend_225( obj, sel, url, @@ -8074,7 +8587,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_215Ptr = _lookup< + late final __objc_msgSend_225Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -8082,7 +8595,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< + late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -8094,6 +8607,26 @@ class NativeCupertinoHttp { _registerName1("dataWithContentsOfFile:"); late final _sel_dataWithContentsOfURL_1 = _registerName1("dataWithContentsOfURL:"); + instancetype _objc_msgSend_226( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + ) { + return __objc_msgSend_226( + obj, + sel, + url, + ); + } + + late final __objc_msgSend_226Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_initWithBytes_length_1 = _registerName1("initWithBytes:length:"); late final _sel_initWithBytesNoCopy_length_1 = @@ -8102,14 +8635,14 @@ class NativeCupertinoHttp { _registerName1("initWithBytesNoCopy:length:freeWhenDone:"); late final _sel_initWithBytesNoCopy_length_deallocator_1 = _registerName1("initWithBytesNoCopy:length:deallocator:"); - instancetype _objc_msgSend_216( + instancetype _objc_msgSend_227( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bytes, int length, ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_216( + return __objc_msgSend_227( obj, sel, bytes, @@ -8118,7 +8651,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_216Ptr = _lookup< + late final __objc_msgSend_227Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -8126,7 +8659,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSUInteger, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< + late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); @@ -8135,36 +8668,36 @@ class NativeCupertinoHttp { late final _sel_initWithContentsOfURL_options_error_1 = _registerName1("initWithContentsOfURL:options:error:"); late final _sel_initWithData_1 = _registerName1("initWithData:"); - instancetype _objc_msgSend_217( + instancetype _objc_msgSend_228( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, ) { - return __objc_msgSend_217( + return __objc_msgSend_228( obj, sel, data, ); } - late final __objc_msgSend_217Ptr = _lookup< + late final __objc_msgSend_228Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< + late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dataWithData_1 = _registerName1("dataWithData:"); late final _sel_initWithBase64EncodedString_options_1 = _registerName1("initWithBase64EncodedString:options:"); - instancetype _objc_msgSend_218( + instancetype _objc_msgSend_229( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer base64String, int options, ) { - return __objc_msgSend_218( + return __objc_msgSend_229( obj, sel, base64String, @@ -8172,45 +8705,45 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_218Ptr = _lookup< + late final __objc_msgSend_229Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< + late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_base64EncodedStringWithOptions_1 = _registerName1("base64EncodedStringWithOptions:"); - ffi.Pointer _objc_msgSend_219( + ffi.Pointer _objc_msgSend_230( ffi.Pointer obj, ffi.Pointer sel, int options, ) { - return __objc_msgSend_219( + return __objc_msgSend_230( obj, sel, options, ); } - late final __objc_msgSend_219Ptr = _lookup< + late final __objc_msgSend_230Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< + late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithBase64EncodedData_options_1 = _registerName1("initWithBase64EncodedData:options:"); - instancetype _objc_msgSend_220( + instancetype _objc_msgSend_231( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer base64Data, int options, ) { - return __objc_msgSend_220( + return __objc_msgSend_231( obj, sel, base64Data, @@ -8218,45 +8751,45 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_220Ptr = _lookup< + late final __objc_msgSend_231Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< + late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_base64EncodedDataWithOptions_1 = _registerName1("base64EncodedDataWithOptions:"); - ffi.Pointer _objc_msgSend_221( + ffi.Pointer _objc_msgSend_232( ffi.Pointer obj, ffi.Pointer sel, int options, ) { - return __objc_msgSend_221( + return __objc_msgSend_232( obj, sel, options, ); } - late final __objc_msgSend_221Ptr = _lookup< + late final __objc_msgSend_232Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< + late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_decompressedDataUsingAlgorithm_error_1 = _registerName1("decompressedDataUsingAlgorithm:error:"); - instancetype _objc_msgSend_222( + instancetype _objc_msgSend_233( ffi.Pointer obj, ffi.Pointer sel, int algorithm, ffi.Pointer> error, ) { - return __objc_msgSend_222( + return __objc_msgSend_233( obj, sel, algorithm, @@ -8264,14 +8797,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_222Ptr = _lookup< + late final __objc_msgSend_233Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< + late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer>)>(); @@ -8287,46 +8820,86 @@ class NativeCupertinoHttp { late final _sel_base64Encoding1 = _registerName1("base64Encoding"); late final _sel_characterSetWithBitmapRepresentation_1 = _registerName1("characterSetWithBitmapRepresentation:"); - ffi.Pointer _objc_msgSend_223( + ffi.Pointer _objc_msgSend_234( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, ) { - return __objc_msgSend_223( + return __objc_msgSend_234( obj, sel, data, ); } - late final __objc_msgSend_223Ptr = _lookup< + late final __objc_msgSend_234Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< + late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_characterSetWithContentsOfFile_1 = _registerName1("characterSetWithContentsOfFile:"); + ffi.Pointer _objc_msgSend_235( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer fName, + ) { + return __objc_msgSend_235( + obj, + sel, + fName, + ); + } + + late final __objc_msgSend_235Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + instancetype _objc_msgSend_236( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer coder, + ) { + return __objc_msgSend_236( + obj, + sel, + coder, + ); + } + + late final __objc_msgSend_236Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); - bool _objc_msgSend_224( + bool _objc_msgSend_237( ffi.Pointer obj, ffi.Pointer sel, int aCharacter, ) { - return __objc_msgSend_224( + return __objc_msgSend_237( obj, sel, aCharacter, ); } - late final __objc_msgSend_224Ptr = _lookup< + late final __objc_msgSend_237Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, unichar)>>('objc_msgSend'); - late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< + late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_bitmapRepresentation1 = @@ -8334,64 +8907,64 @@ class NativeCupertinoHttp { late final _sel_invertedSet1 = _registerName1("invertedSet"); late final _sel_longCharacterIsMember_1 = _registerName1("longCharacterIsMember:"); - bool _objc_msgSend_225( + bool _objc_msgSend_238( ffi.Pointer obj, ffi.Pointer sel, int theLongChar, ) { - return __objc_msgSend_225( + return __objc_msgSend_238( obj, sel, theLongChar, ); } - late final __objc_msgSend_225Ptr = _lookup< + late final __objc_msgSend_238Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, UTF32Char)>>('objc_msgSend'); - late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< + late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); - bool _objc_msgSend_226( + bool _objc_msgSend_239( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer theOtherSet, ) { - return __objc_msgSend_226( + return __objc_msgSend_239( obj, sel, theOtherSet, ); } - late final __objc_msgSend_226Ptr = _lookup< + late final __objc_msgSend_239Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< + late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); - bool _objc_msgSend_227( + bool _objc_msgSend_240( ffi.Pointer obj, ffi.Pointer sel, int thePlane, ) { - return __objc_msgSend_227( + return __objc_msgSend_240( obj, sel, thePlane, ); } - late final __objc_msgSend_227Ptr = _lookup< + late final __objc_msgSend_240Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Uint8)>>('objc_msgSend'); - late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< + late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_URLUserAllowedCharacterSet1 = @@ -8408,35 +8981,35 @@ class NativeCupertinoHttp { _registerName1("URLFragmentAllowedCharacterSet"); late final _sel_rangeOfCharacterFromSet_1 = _registerName1("rangeOfCharacterFromSet:"); - NSRange _objc_msgSend_228( + NSRange _objc_msgSend_241( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchSet, ) { - return __objc_msgSend_228( + return __objc_msgSend_241( obj, sel, searchSet, ); } - late final __objc_msgSend_228Ptr = _lookup< + late final __objc_msgSend_241Ptr = _lookup< ffi.NativeFunction< NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< + late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_rangeOfCharacterFromSet_options_1 = _registerName1("rangeOfCharacterFromSet:options:"); - NSRange _objc_msgSend_229( + NSRange _objc_msgSend_242( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchSet, int mask, ) { - return __objc_msgSend_229( + return __objc_msgSend_242( obj, sel, searchSet, @@ -8444,24 +9017,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_229Ptr = _lookup< + late final __objc_msgSend_242Ptr = _lookup< ffi.NativeFunction< NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< + late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_rangeOfCharacterFromSet_options_range_1 = _registerName1("rangeOfCharacterFromSet:options:range:"); - NSRange _objc_msgSend_230( + NSRange _objc_msgSend_243( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer searchSet, int mask, NSRange rangeOfReceiverToSearch, ) { - return __objc_msgSend_230( + return __objc_msgSend_243( obj, sel, searchSet, @@ -8470,54 +9043,54 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_230Ptr = _lookup< + late final __objc_msgSend_243Ptr = _lookup< ffi.NativeFunction< NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< + late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< NSRange Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, NSRange)>(); late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); - NSRange _objc_msgSend_231( + NSRange _objc_msgSend_244( ffi.Pointer obj, ffi.Pointer sel, int index, ) { - return __objc_msgSend_231( + return __objc_msgSend_244( obj, sel, index, ); } - late final __objc_msgSend_231Ptr = _lookup< + late final __objc_msgSend_244Ptr = _lookup< ffi.NativeFunction< NSRange Function(ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< + late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_rangeOfComposedCharacterSequencesForRange_1 = _registerName1("rangeOfComposedCharacterSequencesForRange:"); - NSRange _objc_msgSend_232( + NSRange _objc_msgSend_245( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ) { - return __objc_msgSend_232( + return __objc_msgSend_245( obj, sel, range, ); } - late final __objc_msgSend_232Ptr = _lookup< + late final __objc_msgSend_245Ptr = _lookup< ffi.NativeFunction< NSRange Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< + late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< NSRange Function( ffi.Pointer, ffi.Pointer, NSRange)>(); @@ -8536,23 +9109,23 @@ class NativeCupertinoHttp { _registerName1("localizedCapitalizedString"); late final _sel_uppercaseStringWithLocale_1 = _registerName1("uppercaseStringWithLocale:"); - ffi.Pointer _objc_msgSend_233( + ffi.Pointer _objc_msgSend_246( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer locale, ) { - return __objc_msgSend_233( + return __objc_msgSend_246( obj, sel, locale, ); } - late final __objc_msgSend_233Ptr = _lookup< + late final __objc_msgSend_246Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< + late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -8562,7 +9135,7 @@ class NativeCupertinoHttp { _registerName1("capitalizedStringWithLocale:"); late final _sel_getLineStart_end_contentsEnd_forRange_1 = _registerName1("getLineStart:end:contentsEnd:forRange:"); - void _objc_msgSend_234( + void _objc_msgSend_247( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer startPtr, @@ -8570,7 +9143,7 @@ class NativeCupertinoHttp { ffi.Pointer contentsEndPtr, NSRange range, ) { - return __objc_msgSend_234( + return __objc_msgSend_247( obj, sel, startPtr, @@ -8580,7 +9153,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_234Ptr = _lookup< + late final __objc_msgSend_247Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -8589,7 +9162,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< + late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -8605,14 +9178,14 @@ class NativeCupertinoHttp { _registerName1("paragraphRangeForRange:"); late final _sel_enumerateSubstringsInRange_options_usingBlock_1 = _registerName1("enumerateSubstringsInRange:options:usingBlock:"); - void _objc_msgSend_235( + void _objc_msgSend_248( ffi.Pointer obj, ffi.Pointer sel, NSRange range, int opts, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_235( + return __objc_msgSend_248( obj, sel, range, @@ -8621,33 +9194,33 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_235Ptr = _lookup< + late final __objc_msgSend_248Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< + late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_enumerateLinesUsingBlock_1 = _registerName1("enumerateLinesUsingBlock:"); - void _objc_msgSend_236( + void _objc_msgSend_249( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_236( + return __objc_msgSend_249( obj, sel, block, ); } - late final __objc_msgSend_236Ptr = _lookup< + late final __objc_msgSend_249Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< + late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); @@ -8656,13 +9229,13 @@ class NativeCupertinoHttp { late final _sel_smallestEncoding1 = _registerName1("smallestEncoding"); late final _sel_dataUsingEncoding_allowLossyConversion_1 = _registerName1("dataUsingEncoding:allowLossyConversion:"); - ffi.Pointer _objc_msgSend_237( + ffi.Pointer _objc_msgSend_250( ffi.Pointer obj, ffi.Pointer sel, int encoding, bool lossy, ) { - return __objc_msgSend_237( + return __objc_msgSend_250( obj, sel, encoding, @@ -8670,35 +9243,35 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_237Ptr = _lookup< + late final __objc_msgSend_250Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSStringEncoding, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< + late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int, bool)>(); late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); - ffi.Pointer _objc_msgSend_238( + ffi.Pointer _objc_msgSend_251( ffi.Pointer obj, ffi.Pointer sel, int encoding, ) { - return __objc_msgSend_238( + return __objc_msgSend_251( obj, sel, encoding, ); } - late final __objc_msgSend_238Ptr = _lookup< + late final __objc_msgSend_251Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< + late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -8706,36 +9279,36 @@ class NativeCupertinoHttp { _registerName1("canBeConvertedToEncoding:"); late final _sel_cStringUsingEncoding_1 = _registerName1("cStringUsingEncoding:"); - ffi.Pointer _objc_msgSend_239( + ffi.Pointer _objc_msgSend_252( ffi.Pointer obj, ffi.Pointer sel, int encoding, ) { - return __objc_msgSend_239( + return __objc_msgSend_252( obj, sel, encoding, ); } - late final __objc_msgSend_239Ptr = _lookup< + late final __objc_msgSend_252Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< + late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); late final _sel_getCString_maxLength_encoding_1 = _registerName1("getCString:maxLength:encoding:"); - bool _objc_msgSend_240( + bool _objc_msgSend_253( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer buffer, int maxBufferCount, int encoding, ) { - return __objc_msgSend_240( + return __objc_msgSend_253( obj, sel, buffer, @@ -8744,7 +9317,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_240Ptr = _lookup< + late final __objc_msgSend_253Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -8752,14 +9325,14 @@ class NativeCupertinoHttp { ffi.Pointer, NSUInteger, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< + late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int)>(); late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1 = _registerName1( "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); - bool _objc_msgSend_241( + bool _objc_msgSend_254( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer buffer, @@ -8770,7 +9343,7 @@ class NativeCupertinoHttp { NSRange range, NSRangePointer leftover, ) { - return __objc_msgSend_241( + return __objc_msgSend_254( obj, sel, buffer, @@ -8783,7 +9356,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_241Ptr = _lookup< + late final __objc_msgSend_254Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -8795,7 +9368,7 @@ class NativeCupertinoHttp { ffi.Int32, NSRange, NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< + late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< bool Function( ffi.Pointer, ffi.Pointer, @@ -8813,21 +9386,21 @@ class NativeCupertinoHttp { _registerName1("lengthOfBytesUsingEncoding:"); late final _sel_availableStringEncodings1 = _registerName1("availableStringEncodings"); - ffi.Pointer _objc_msgSend_242( + ffi.Pointer _objc_msgSend_255( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_242( + return __objc_msgSend_255( obj, sel, ); } - late final __objc_msgSend_242Ptr = _lookup< + late final __objc_msgSend_255Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< + late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -8845,60 +9418,80 @@ class NativeCupertinoHttp { _registerName1("precomposedStringWithCompatibilityMapping"); late final _sel_componentsSeparatedByString_1 = _registerName1("componentsSeparatedByString:"); + ffi.Pointer _objc_msgSend_256( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer separator, + ) { + return __objc_msgSend_256( + obj, + sel, + separator, + ); + } + + late final __objc_msgSend_256Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + late final _sel_componentsSeparatedByCharactersInSet_1 = _registerName1("componentsSeparatedByCharactersInSet:"); - ffi.Pointer _objc_msgSend_243( + ffi.Pointer _objc_msgSend_257( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer separator, ) { - return __objc_msgSend_243( + return __objc_msgSend_257( obj, sel, separator, ); } - late final __objc_msgSend_243Ptr = _lookup< + late final __objc_msgSend_257Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< + late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_stringByTrimmingCharactersInSet_1 = _registerName1("stringByTrimmingCharactersInSet:"); - ffi.Pointer _objc_msgSend_244( + ffi.Pointer _objc_msgSend_258( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer set1, ) { - return __objc_msgSend_244( + return __objc_msgSend_258( obj, sel, set1, ); } - late final __objc_msgSend_244Ptr = _lookup< + late final __objc_msgSend_258Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< + late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_stringByPaddingToLength_withString_startingAtIndex_1 = _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); - ffi.Pointer _objc_msgSend_245( + ffi.Pointer _objc_msgSend_259( ffi.Pointer obj, ffi.Pointer sel, int newLength, ffi.Pointer padString, int padIndex, ) { - return __objc_msgSend_245( + return __objc_msgSend_259( obj, sel, newLength, @@ -8907,7 +9500,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_245Ptr = _lookup< + late final __objc_msgSend_259Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -8915,19 +9508,19 @@ class NativeCupertinoHttp { NSUInteger, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< + late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer, int)>(); late final _sel_stringByFoldingWithOptions_locale_1 = _registerName1("stringByFoldingWithOptions:locale:"); - ffi.Pointer _objc_msgSend_246( + ffi.Pointer _objc_msgSend_260( ffi.Pointer obj, ffi.Pointer sel, int options, ffi.Pointer locale, ) { - return __objc_msgSend_246( + return __objc_msgSend_260( obj, sel, options, @@ -8935,21 +9528,21 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_246Ptr = _lookup< + late final __objc_msgSend_260Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< + late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_1 = _registerName1( "stringByReplacingOccurrencesOfString:withString:options:range:"); - ffi.Pointer _objc_msgSend_247( + ffi.Pointer _objc_msgSend_261( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer target, @@ -8957,7 +9550,7 @@ class NativeCupertinoHttp { int options, NSRange searchRange, ) { - return __objc_msgSend_247( + return __objc_msgSend_261( obj, sel, target, @@ -8967,7 +9560,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_247Ptr = _lookup< + late final __objc_msgSend_261Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -8976,7 +9569,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< + late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -8987,13 +9580,13 @@ class NativeCupertinoHttp { late final _sel_stringByReplacingOccurrencesOfString_withString_1 = _registerName1("stringByReplacingOccurrencesOfString:withString:"); - ffi.Pointer _objc_msgSend_248( + ffi.Pointer _objc_msgSend_262( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer target, ffi.Pointer replacement, ) { - return __objc_msgSend_248( + return __objc_msgSend_262( obj, sel, target, @@ -9001,14 +9594,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_248Ptr = _lookup< + late final __objc_msgSend_262Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< + late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -9017,13 +9610,13 @@ class NativeCupertinoHttp { late final _sel_stringByReplacingCharactersInRange_withString_1 = _registerName1("stringByReplacingCharactersInRange:withString:"); - ffi.Pointer _objc_msgSend_249( + ffi.Pointer _objc_msgSend_263( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ffi.Pointer replacement, ) { - return __objc_msgSend_249( + return __objc_msgSend_263( obj, sel, range, @@ -9031,26 +9624,26 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_249Ptr = _lookup< + late final __objc_msgSend_263Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< + late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>(); late final _sel_stringByApplyingTransform_reverse_1 = _registerName1("stringByApplyingTransform:reverse:"); - ffi.Pointer _objc_msgSend_250( + ffi.Pointer _objc_msgSend_264( ffi.Pointer obj, ffi.Pointer sel, NSStringTransform transform, bool reverse, ) { - return __objc_msgSend_250( + return __objc_msgSend_264( obj, sel, transform, @@ -9058,20 +9651,20 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_250Ptr = _lookup< + late final __objc_msgSend_264Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSStringTransform, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< + late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSStringTransform, bool)>(); late final _sel_writeToURL_atomically_encoding_error_1 = _registerName1("writeToURL:atomically:encoding:error:"); - bool _objc_msgSend_251( + bool _objc_msgSend_265( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, @@ -9079,7 +9672,7 @@ class NativeCupertinoHttp { int enc, ffi.Pointer> error, ) { - return __objc_msgSend_251( + return __objc_msgSend_265( obj, sel, url, @@ -9089,7 +9682,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_251Ptr = _lookup< + late final __objc_msgSend_265Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -9098,7 +9691,7 @@ class NativeCupertinoHttp { ffi.Bool, NSStringEncoding, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< + late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< bool Function( ffi.Pointer, ffi.Pointer, @@ -9109,7 +9702,7 @@ class NativeCupertinoHttp { late final _sel_writeToFile_atomically_encoding_error_1 = _registerName1("writeToFile:atomically:encoding:error:"); - bool _objc_msgSend_252( + bool _objc_msgSend_266( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, @@ -9117,7 +9710,7 @@ class NativeCupertinoHttp { int enc, ffi.Pointer> error, ) { - return __objc_msgSend_252( + return __objc_msgSend_266( obj, sel, path, @@ -9127,7 +9720,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_252Ptr = _lookup< + late final __objc_msgSend_266Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -9136,7 +9729,7 @@ class NativeCupertinoHttp { ffi.Bool, NSStringEncoding, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< + late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< bool Function( ffi.Pointer, ffi.Pointer, @@ -9147,14 +9740,14 @@ class NativeCupertinoHttp { late final _sel_initWithCharactersNoCopy_length_freeWhenDone_1 = _registerName1("initWithCharactersNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_253( + instancetype _objc_msgSend_267( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer characters, int length, bool freeBuffer, ) { - return __objc_msgSend_253( + return __objc_msgSend_267( obj, sel, characters, @@ -9163,24 +9756,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_253Ptr = _lookup< + late final __objc_msgSend_267Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< + late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, bool)>(); late final _sel_initWithCharactersNoCopy_length_deallocator_1 = _registerName1("initWithCharactersNoCopy:length:deallocator:"); - instancetype _objc_msgSend_254( + instancetype _objc_msgSend_268( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer chars, int len, ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_254( + return __objc_msgSend_268( obj, sel, chars, @@ -9189,7 +9782,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_254Ptr = _lookup< + late final __objc_msgSend_268Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9197,19 +9790,19 @@ class NativeCupertinoHttp { ffi.Pointer, NSUInteger, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< + late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_initWithCharacters_length_1 = _registerName1("initWithCharacters:length:"); - instancetype _objc_msgSend_255( + instancetype _objc_msgSend_269( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer characters, int length, ) { - return __objc_msgSend_255( + return __objc_msgSend_269( obj, sel, characters, @@ -9217,45 +9810,45 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_255Ptr = _lookup< + late final __objc_msgSend_269Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< + late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); - instancetype _objc_msgSend_256( + instancetype _objc_msgSend_270( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer nullTerminatedCString, ) { - return __objc_msgSend_256( + return __objc_msgSend_270( obj, sel, nullTerminatedCString, ); } - late final __objc_msgSend_256Ptr = _lookup< + late final __objc_msgSend_270Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< + late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithFormat_1 = _registerName1("initWithFormat:"); late final _sel_initWithFormat_arguments_1 = _registerName1("initWithFormat:arguments:"); - instancetype _objc_msgSend_257( + instancetype _objc_msgSend_271( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer format, va_list argList, ) { - return __objc_msgSend_257( + return __objc_msgSend_271( obj, sel, format, @@ -9263,23 +9856,23 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_257Ptr = _lookup< + late final __objc_msgSend_271Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, va_list)>>('objc_msgSend'); - late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< + late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, va_list)>(); late final _sel_initWithFormat_locale_1 = _registerName1("initWithFormat:locale:"); - instancetype _objc_msgSend_258( + instancetype _objc_msgSend_272( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer format, ffi.Pointer locale, ) { - return __objc_msgSend_258( + return __objc_msgSend_272( obj, sel, format, @@ -9287,27 +9880,27 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_258Ptr = _lookup< + late final __objc_msgSend_272Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< + late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithFormat_locale_arguments_1 = _registerName1("initWithFormat:locale:arguments:"); - instancetype _objc_msgSend_259( + instancetype _objc_msgSend_273( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer format, ffi.Pointer locale, va_list argList, ) { - return __objc_msgSend_259( + return __objc_msgSend_273( obj, sel, format, @@ -9316,7 +9909,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_259Ptr = _lookup< + late final __objc_msgSend_273Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9324,20 +9917,20 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, va_list)>>('objc_msgSend'); - late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< + late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, va_list)>(); late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_1 = _registerName1("initWithValidatedFormat:validFormatSpecifiers:error:"); - instancetype _objc_msgSend_260( + instancetype _objc_msgSend_274( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer format, ffi.Pointer validFormatSpecifiers, ffi.Pointer> error, ) { - return __objc_msgSend_260( + return __objc_msgSend_274( obj, sel, format, @@ -9346,7 +9939,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_260Ptr = _lookup< + late final __objc_msgSend_274Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9354,7 +9947,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< + late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -9365,7 +9958,7 @@ class NativeCupertinoHttp { late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1 = _registerName1( "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); - instancetype _objc_msgSend_261( + instancetype _objc_msgSend_275( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer format, @@ -9373,7 +9966,7 @@ class NativeCupertinoHttp { ffi.Pointer locale, ffi.Pointer> error, ) { - return __objc_msgSend_261( + return __objc_msgSend_275( obj, sel, format, @@ -9383,7 +9976,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_261Ptr = _lookup< + late final __objc_msgSend_275Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9392,7 +9985,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< + late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -9404,7 +9997,7 @@ class NativeCupertinoHttp { late final _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1 = _registerName1( "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); - instancetype _objc_msgSend_262( + instancetype _objc_msgSend_276( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer format, @@ -9412,7 +10005,7 @@ class NativeCupertinoHttp { va_list argList, ffi.Pointer> error, ) { - return __objc_msgSend_262( + return __objc_msgSend_276( obj, sel, format, @@ -9422,7 +10015,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_262Ptr = _lookup< + late final __objc_msgSend_276Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9431,7 +10024,7 @@ class NativeCupertinoHttp { ffi.Pointer, va_list, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< + late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -9443,7 +10036,7 @@ class NativeCupertinoHttp { late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1 = _registerName1( "initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:"); - instancetype _objc_msgSend_263( + instancetype _objc_msgSend_277( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer format, @@ -9452,7 +10045,7 @@ class NativeCupertinoHttp { va_list argList, ffi.Pointer> error, ) { - return __objc_msgSend_263( + return __objc_msgSend_277( obj, sel, format, @@ -9463,7 +10056,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_263Ptr = _lookup< + late final __objc_msgSend_277Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9473,7 +10066,7 @@ class NativeCupertinoHttp { ffi.Pointer, va_list, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< + late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -9485,13 +10078,13 @@ class NativeCupertinoHttp { late final _sel_initWithData_encoding_1 = _registerName1("initWithData:encoding:"); - instancetype _objc_msgSend_264( + instancetype _objc_msgSend_278( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, int encoding, ) { - return __objc_msgSend_264( + return __objc_msgSend_278( obj, sel, data, @@ -9499,24 +10092,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_264Ptr = _lookup< + late final __objc_msgSend_278Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< + late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithBytes_length_encoding_1 = _registerName1("initWithBytes:length:encoding:"); - instancetype _objc_msgSend_265( + instancetype _objc_msgSend_279( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bytes, int len, int encoding, ) { - return __objc_msgSend_265( + return __objc_msgSend_279( obj, sel, bytes, @@ -9525,7 +10118,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_265Ptr = _lookup< + late final __objc_msgSend_279Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9533,13 +10126,13 @@ class NativeCupertinoHttp { ffi.Pointer, NSUInteger, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< + late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int)>(); late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); - instancetype _objc_msgSend_266( + instancetype _objc_msgSend_280( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bytes, @@ -9547,7 +10140,7 @@ class NativeCupertinoHttp { int encoding, bool freeBuffer, ) { - return __objc_msgSend_266( + return __objc_msgSend_280( obj, sel, bytes, @@ -9557,7 +10150,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_266Ptr = _lookup< + late final __objc_msgSend_280Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9566,13 +10159,13 @@ class NativeCupertinoHttp { NSUInteger, NSStringEncoding, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< + late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int, bool)>(); late final _sel_initWithBytesNoCopy_length_encoding_deallocator_1 = _registerName1("initWithBytesNoCopy:length:encoding:deallocator:"); - instancetype _objc_msgSend_267( + instancetype _objc_msgSend_281( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bytes, @@ -9580,7 +10173,7 @@ class NativeCupertinoHttp { int encoding, ffi.Pointer<_ObjCBlock> deallocator, ) { - return __objc_msgSend_267( + return __objc_msgSend_281( obj, sel, bytes, @@ -9590,7 +10183,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_267Ptr = _lookup< + late final __objc_msgSend_281Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9599,7 +10192,7 @@ class NativeCupertinoHttp { NSUInteger, NSStringEncoding, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< + late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); @@ -9619,13 +10212,13 @@ class NativeCupertinoHttp { "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); late final _sel_initWithCString_encoding_1 = _registerName1("initWithCString:encoding:"); - instancetype _objc_msgSend_268( + instancetype _objc_msgSend_282( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer nullTerminatedCString, int encoding, ) { - return __objc_msgSend_268( + return __objc_msgSend_282( obj, sel, nullTerminatedCString, @@ -9633,11 +10226,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_268Ptr = _lookup< + late final __objc_msgSend_282Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< + late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -9645,14 +10238,14 @@ class NativeCupertinoHttp { _registerName1("stringWithCString:encoding:"); late final _sel_initWithContentsOfURL_encoding_error_1 = _registerName1("initWithContentsOfURL:encoding:error:"); - instancetype _objc_msgSend_269( + instancetype _objc_msgSend_283( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, int enc, ffi.Pointer> error, ) { - return __objc_msgSend_269( + return __objc_msgSend_283( obj, sel, url, @@ -9661,7 +10254,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_269Ptr = _lookup< + late final __objc_msgSend_283Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9669,7 +10262,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSStringEncoding, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< + late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -9679,14 +10272,14 @@ class NativeCupertinoHttp { late final _sel_initWithContentsOfFile_encoding_error_1 = _registerName1("initWithContentsOfFile:encoding:error:"); - instancetype _objc_msgSend_270( + instancetype _objc_msgSend_284( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, int enc, ffi.Pointer> error, ) { - return __objc_msgSend_270( + return __objc_msgSend_284( obj, sel, path, @@ -9695,7 +10288,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_270Ptr = _lookup< + late final __objc_msgSend_284Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9703,7 +10296,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSStringEncoding, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< + late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -9717,14 +10310,14 @@ class NativeCupertinoHttp { _registerName1("stringWithContentsOfFile:encoding:error:"); late final _sel_initWithContentsOfURL_usedEncoding_error_1 = _registerName1("initWithContentsOfURL:usedEncoding:error:"); - instancetype _objc_msgSend_271( + instancetype _objc_msgSend_285( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer enc, ffi.Pointer> error, ) { - return __objc_msgSend_271( + return __objc_msgSend_285( obj, sel, url, @@ -9733,7 +10326,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_271Ptr = _lookup< + late final __objc_msgSend_285Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9741,7 +10334,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< + late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -9751,14 +10344,14 @@ class NativeCupertinoHttp { late final _sel_initWithContentsOfFile_usedEncoding_error_1 = _registerName1("initWithContentsOfFile:usedEncoding:error:"); - instancetype _objc_msgSend_272( + instancetype _objc_msgSend_286( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, ffi.Pointer enc, ffi.Pointer> error, ) { - return __objc_msgSend_272( + return __objc_msgSend_286( obj, sel, path, @@ -9767,7 +10360,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_272Ptr = _lookup< + late final __objc_msgSend_286Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -9775,7 +10368,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< + late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -9790,7 +10383,7 @@ class NativeCupertinoHttp { late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1 = _registerName1( "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); - int _objc_msgSend_273( + int _objc_msgSend_287( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, @@ -9798,7 +10391,7 @@ class NativeCupertinoHttp { ffi.Pointer> string, ffi.Pointer usedLossyConversion, ) { - return __objc_msgSend_273( + return __objc_msgSend_287( obj, sel, data, @@ -9808,7 +10401,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_273Ptr = _lookup< + late final __objc_msgSend_287Ptr = _lookup< ffi.NativeFunction< NSStringEncoding Function( ffi.Pointer, @@ -9817,7 +10410,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer>, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< + late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< int Function( ffi.Pointer, ffi.Pointer, @@ -9829,39 +10422,57 @@ class NativeCupertinoHttp { late final _sel_propertyList1 = _registerName1("propertyList"); late final _sel_propertyListFromStringsFileFormat1 = _registerName1("propertyListFromStringsFileFormat"); + ffi.Pointer _objc_msgSend_288( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_288( + obj, + sel, + ); + } + + late final __objc_msgSend_288Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _sel_cString1 = _registerName1("cString"); late final _sel_lossyCString1 = _registerName1("lossyCString"); late final _sel_cStringLength1 = _registerName1("cStringLength"); late final _sel_getCString_1 = _registerName1("getCString:"); - void _objc_msgSend_274( + void _objc_msgSend_289( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bytes, ) { - return __objc_msgSend_274( + return __objc_msgSend_289( obj, sel, bytes, ); } - late final __objc_msgSend_274Ptr = _lookup< + late final __objc_msgSend_289Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< + late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_getCString_maxLength_1 = _registerName1("getCString:maxLength:"); - void _objc_msgSend_275( + void _objc_msgSend_290( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bytes, int maxLength, ) { - return __objc_msgSend_275( + return __objc_msgSend_290( obj, sel, bytes, @@ -9869,17 +10480,17 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_275Ptr = _lookup< + late final __objc_msgSend_290Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< + late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_getCString_maxLength_range_remainingRange_1 = _registerName1("getCString:maxLength:range:remainingRange:"); - void _objc_msgSend_276( + void _objc_msgSend_291( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bytes, @@ -9887,7 +10498,7 @@ class NativeCupertinoHttp { NSRange aRange, NSRangePointer leftoverRange, ) { - return __objc_msgSend_276( + return __objc_msgSend_291( obj, sel, bytes, @@ -9897,7 +10508,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_276Ptr = _lookup< + late final __objc_msgSend_291Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -9906,7 +10517,7 @@ class NativeCupertinoHttp { NSUInteger, NSRange, NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< + late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, NSRange, NSRangePointer)>(); @@ -9916,14 +10527,14 @@ class NativeCupertinoHttp { _registerName1("stringWithContentsOfURL:"); late final _sel_initWithCStringNoCopy_length_freeWhenDone_1 = _registerName1("initWithCStringNoCopy:length:freeWhenDone:"); - ffi.Pointer _objc_msgSend_277( + ffi.Pointer _objc_msgSend_292( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer bytes, int length, bool freeBuffer, ) { - return __objc_msgSend_277( + return __objc_msgSend_292( obj, sel, bytes, @@ -9932,7 +10543,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_277Ptr = _lookup< + late final __objc_msgSend_292Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -9940,7 +10551,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< + late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, bool)>(); @@ -9951,54 +10562,94 @@ class NativeCupertinoHttp { _registerName1("stringWithCString:length:"); late final _sel_stringWithCString_1 = _registerName1("stringWithCString:"); late final _sel_getCharacters_1 = _registerName1("getCharacters:"); - void _objc_msgSend_278( + void _objc_msgSend_293( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer buffer, ) { - return __objc_msgSend_278( + return __objc_msgSend_293( obj, sel, buffer, ); } - late final __objc_msgSend_278Ptr = _lookup< + late final __objc_msgSend_293Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< + late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); + ffi.Pointer _objc_msgSend_294( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer allowedCharacters, + ) { + return __objc_msgSend_294( + obj, + sel, + allowedCharacters, + ); + } + + late final __objc_msgSend_294Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + late final _sel_stringByRemovingPercentEncoding1 = _registerName1("stringByRemovingPercentEncoding"); late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = _registerName1("stringByAddingPercentEscapesUsingEncoding:"); + ffi.Pointer _objc_msgSend_295( + ffi.Pointer obj, + ffi.Pointer sel, + int enc, + ) { + return __objc_msgSend_295( + obj, + sel, + enc, + ); + } + + late final __objc_msgSend_295Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); + late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); late final _sel_debugDescription1 = _registerName1("debugDescription"); late final _sel_version1 = _registerName1("version"); late final _sel_setVersion_1 = _registerName1("setVersion:"); - void _objc_msgSend_279( + void _objc_msgSend_296( ffi.Pointer obj, ffi.Pointer sel, int aVersion, ) { - return __objc_msgSend_279( + return __objc_msgSend_296( obj, sel, aVersion, ); } - late final __objc_msgSend_279Ptr = _lookup< + late final __objc_msgSend_296Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< + late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_classForCoder1 = _registerName1("classForCoder"); @@ -10011,13 +10662,13 @@ class NativeCupertinoHttp { _registerName1("autoContentAccessingProxy"); late final _sel_URL_resourceDataDidBecomeAvailable_1 = _registerName1("URL:resourceDataDidBecomeAvailable:"); - void _objc_msgSend_280( + void _objc_msgSend_297( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer sender, ffi.Pointer newBytes, ) { - return __objc_msgSend_280( + return __objc_msgSend_297( obj, sel, sender, @@ -10025,36 +10676,36 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_280Ptr = _lookup< + late final __objc_msgSend_297Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< + late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_URLResourceDidFinishLoading_1 = _registerName1("URLResourceDidFinishLoading:"); - void _objc_msgSend_281( + void _objc_msgSend_298( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer sender, ) { - return __objc_msgSend_281( + return __objc_msgSend_298( obj, sel, sender, ); } - late final __objc_msgSend_281Ptr = _lookup< + late final __objc_msgSend_298Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< + late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -10062,13 +10713,13 @@ class NativeCupertinoHttp { _registerName1("URLResourceDidCancelLoading:"); late final _sel_URL_resourceDidFailLoadingWithReason_1 = _registerName1("URL:resourceDidFailLoadingWithReason:"); - void _objc_msgSend_282( + void _objc_msgSend_299( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer sender, ffi.Pointer reason, ) { - return __objc_msgSend_282( + return __objc_msgSend_299( obj, sel, sender, @@ -10076,21 +10727,21 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_282Ptr = _lookup< + late final __objc_msgSend_299Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< + late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = _registerName1( "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); - void _objc_msgSend_283( + void _objc_msgSend_300( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer error, @@ -10099,7 +10750,7 @@ class NativeCupertinoHttp { ffi.Pointer didRecoverSelector, ffi.Pointer contextInfo, ) { - return __objc_msgSend_283( + return __objc_msgSend_300( obj, sel, error, @@ -10110,7 +10761,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_283Ptr = _lookup< + late final __objc_msgSend_300Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -10120,7 +10771,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< + late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -10132,13 +10783,13 @@ class NativeCupertinoHttp { late final _sel_attemptRecoveryFromError_optionIndex_1 = _registerName1("attemptRecoveryFromError:optionIndex:"); - bool _objc_msgSend_284( + bool _objc_msgSend_301( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer error, int recoveryOptionIndex, ) { - return __objc_msgSend_284( + return __objc_msgSend_301( obj, sel, error, @@ -10146,11 +10797,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_284Ptr = _lookup< + late final __objc_msgSend_301Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< + late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -10162,12 +10813,16 @@ class NativeCupertinoHttp { set NSFoundationVersionNumber(double value) => _NSFoundationVersionNumber.value = value; - ffi.Pointer NSStringFromSelector( + NSString NSStringFromSelector( ffi.Pointer aSelector, ) { - return _NSStringFromSelector( - aSelector, - ); + return NSString._( + _NSStringFromSelector( + aSelector, + ), + this, + retain: true, + release: true); } late final _NSStringFromSelectorPtr = _lookup< @@ -10178,10 +10833,10 @@ class NativeCupertinoHttp { ffi.Pointer Function(ffi.Pointer)>(); ffi.Pointer NSSelectorFromString( - ffi.Pointer aSelectorName, + NSString aSelectorName, ) { return _NSSelectorFromString( - aSelectorName, + aSelectorName._id, ); } @@ -10192,12 +10847,16 @@ class NativeCupertinoHttp { late final _NSSelectorFromString = _NSSelectorFromStringPtr.asFunction< ffi.Pointer Function(ffi.Pointer)>(); - ffi.Pointer NSStringFromClass( - ffi.Pointer aClass, + NSString NSStringFromClass( + NSObject aClass, ) { - return _NSStringFromClass( - aClass, - ); + return NSString._( + _NSStringFromClass( + aClass._id, + ), + this, + retain: true, + release: true); } late final _NSStringFromClassPtr = _lookup< @@ -10207,12 +10866,21 @@ class NativeCupertinoHttp { late final _NSStringFromClass = _NSStringFromClassPtr.asFunction< ffi.Pointer Function(ffi.Pointer)>(); - ffi.Pointer NSClassFromString( - ffi.Pointer aClassName, + NSObject? NSClassFromString( + NSString aClassName, ) { return _NSClassFromString( - aClassName, - ); + aClassName._id, + ).address == + 0 + ? null + : NSObject._( + _NSClassFromString( + aClassName._id, + ), + this, + retain: true, + release: true); } late final _NSClassFromStringPtr = _lookup< @@ -10222,12 +10890,16 @@ class NativeCupertinoHttp { late final _NSClassFromString = _NSClassFromStringPtr.asFunction< ffi.Pointer Function(ffi.Pointer)>(); - ffi.Pointer NSStringFromProtocol( - ffi.Pointer proto, + NSString NSStringFromProtocol( + Protocol proto, ) { - return _NSStringFromProtocol( - proto, - ); + return NSString._( + _NSStringFromProtocol( + proto._id, + ), + this, + retain: true, + release: true); } late final _NSStringFromProtocolPtr = _lookup< @@ -10237,12 +10909,21 @@ class NativeCupertinoHttp { late final _NSStringFromProtocol = _NSStringFromProtocolPtr.asFunction< ffi.Pointer Function(ffi.Pointer)>(); - ffi.Pointer NSProtocolFromString( - ffi.Pointer namestr, + Protocol? NSProtocolFromString( + NSString namestr, ) { return _NSProtocolFromString( - namestr, - ); + namestr._id, + ).address == + 0 + ? null + : Protocol._( + _NSProtocolFromString( + namestr._id, + ), + this, + retain: true, + release: true); } late final _NSProtocolFromStringPtr = _lookup< @@ -10275,10 +10956,10 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer)>(); void NSLog( - ffi.Pointer format, + NSString format, ) { return _NSLog( - format, + format._id, ); } @@ -10289,19 +10970,18 @@ class NativeCupertinoHttp { _NSLogPtr.asFunction)>(); void NSLogv( - ffi.Pointer format, + NSString format, va_list args, ) { return _NSLogv( - format, + format._id, args, ); } late final _NSLogvPtr = _lookup< - ffi - .NativeFunction, va_list)>>( - 'NSLogv'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, va_list)>>('NSLogv'); late final _NSLogv = _NSLogvPtr.asFunction, va_list)>(); @@ -10310,8 +10990,6 @@ class NativeCupertinoHttp { int get NSNotFound => _NSNotFound.value; - set NSNotFound(int value) => _NSNotFound.value = value; - ffi.Pointer _Block_copy1( ffi.Pointer aBlock, ) { @@ -10469,8 +11147,6 @@ class NativeCupertinoHttp { int get kCFNotFound => _kCFNotFound.value; - set kCFNotFound(int value) => _kCFNotFound.value = value; - CFRange __CFRangeMake( int loc, int len, @@ -10500,56 +11176,37 @@ class NativeCupertinoHttp { CFNullRef get kCFNull => _kCFNull.value; - set kCFNull(CFNullRef value) => _kCFNull.value = value; - late final ffi.Pointer _kCFAllocatorDefault = _lookup('kCFAllocatorDefault'); CFAllocatorRef get kCFAllocatorDefault => _kCFAllocatorDefault.value; - set kCFAllocatorDefault(CFAllocatorRef value) => - _kCFAllocatorDefault.value = value; - late final ffi.Pointer _kCFAllocatorSystemDefault = _lookup('kCFAllocatorSystemDefault'); CFAllocatorRef get kCFAllocatorSystemDefault => _kCFAllocatorSystemDefault.value; - set kCFAllocatorSystemDefault(CFAllocatorRef value) => - _kCFAllocatorSystemDefault.value = value; - late final ffi.Pointer _kCFAllocatorMalloc = _lookup('kCFAllocatorMalloc'); CFAllocatorRef get kCFAllocatorMalloc => _kCFAllocatorMalloc.value; - set kCFAllocatorMalloc(CFAllocatorRef value) => - _kCFAllocatorMalloc.value = value; - late final ffi.Pointer _kCFAllocatorMallocZone = _lookup('kCFAllocatorMallocZone'); CFAllocatorRef get kCFAllocatorMallocZone => _kCFAllocatorMallocZone.value; - set kCFAllocatorMallocZone(CFAllocatorRef value) => - _kCFAllocatorMallocZone.value = value; - late final ffi.Pointer _kCFAllocatorNull = _lookup('kCFAllocatorNull'); CFAllocatorRef get kCFAllocatorNull => _kCFAllocatorNull.value; - set kCFAllocatorNull(CFAllocatorRef value) => _kCFAllocatorNull.value = value; - late final ffi.Pointer _kCFAllocatorUseContext = _lookup('kCFAllocatorUseContext'); CFAllocatorRef get kCFAllocatorUseContext => _kCFAllocatorUseContext.value; - set kCFAllocatorUseContext(CFAllocatorRef value) => - _kCFAllocatorUseContext.value = value; - int CFAllocatorGetTypeID() { return _CFAllocatorGetTypeID(); } @@ -10891,11 +11548,11 @@ class NativeCupertinoHttp { void NSSetZoneName( ffi.Pointer zone, - ffi.Pointer name, + NSString name, ) { return _NSSetZoneName( zone, - name, + name._id, ); } @@ -10906,12 +11563,16 @@ class NativeCupertinoHttp { late final _NSSetZoneName = _NSSetZoneNamePtr.asFunction< void Function(ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSZoneName( + NSString NSZoneName( ffi.Pointer zone, ) { - return _NSZoneName( - zone, - ); + return NSString._( + _NSZoneName( + zone, + ), + this, + retain: true, + release: true); } late final _NSZoneNamePtr = _lookup< @@ -11148,16 +11809,20 @@ class NativeCupertinoHttp { late final _NSRealMemoryAvailable = _NSRealMemoryAvailablePtr.asFunction(); - ffi.Pointer NSAllocateObject( - ffi.Pointer aClass, - int extraBytes, + NSObject NSAllocateObject( + NSObject aClass, + DartNSUInteger extraBytes, ffi.Pointer zone, ) { - return _NSAllocateObject( - aClass, - extraBytes, - zone, - ); + return NSObject._( + _NSAllocateObject( + aClass._id, + extraBytes, + zone, + ), + this, + retain: true, + release: true); } late final _NSAllocateObjectPtr = _lookup< @@ -11169,10 +11834,10 @@ class NativeCupertinoHttp { ffi.Pointer, int, ffi.Pointer)>(); void NSDeallocateObject( - ffi.Pointer object, + NSObject object, ) { return _NSDeallocateObject( - object, + object._id, ); } @@ -11182,16 +11847,20 @@ class NativeCupertinoHttp { late final _NSDeallocateObject = _NSDeallocateObjectPtr.asFunction< void Function(ffi.Pointer)>(); - ffi.Pointer NSCopyObject( - ffi.Pointer object, - int extraBytes, + NSObject NSCopyObject( + NSObject object, + DartNSUInteger extraBytes, ffi.Pointer zone, ) { - return _NSCopyObject( - object, - extraBytes, - zone, - ); + return NSObject._( + _NSCopyObject( + object._id, + extraBytes, + zone, + ), + this, + retain: true, + release: true); } late final _NSCopyObjectPtr = _lookup< @@ -11203,11 +11872,11 @@ class NativeCupertinoHttp { ffi.Pointer, int, ffi.Pointer)>(); bool NSShouldRetainWithZone( - ffi.Pointer anObject, + NSObject anObject, ffi.Pointer requestedZone, ) { return _NSShouldRetainWithZone( - anObject, + anObject._id, requestedZone, ); } @@ -11220,10 +11889,10 @@ class NativeCupertinoHttp { bool Function(ffi.Pointer, ffi.Pointer)>(); void NSIncrementExtraRefCount( - ffi.Pointer object, + NSObject object, ) { return _NSIncrementExtraRefCount( - object, + object._id, ); } @@ -11234,10 +11903,10 @@ class NativeCupertinoHttp { .asFunction)>(); bool NSDecrementExtraRefCountWasZero( - ffi.Pointer object, + NSObject object, ) { return _NSDecrementExtraRefCountWasZero( - object, + object._id, ); } @@ -11248,11 +11917,11 @@ class NativeCupertinoHttp { _NSDecrementExtraRefCountWasZeroPtr.asFunction< bool Function(ffi.Pointer)>(); - int NSExtraRefCount( - ffi.Pointer object, + DartNSUInteger NSExtraRefCount( + NSObject object, ) { return _NSExtraRefCount( - object, + object._id, ); } @@ -11294,12 +11963,16 @@ class NativeCupertinoHttp { late final _NSIntersectionRange = _NSIntersectionRangePtr.asFunction(); - ffi.Pointer NSStringFromRange( + NSString NSStringFromRange( NSRange range, ) { - return _NSStringFromRange( - range, - ); + return NSString._( + _NSStringFromRange( + range, + ), + this, + retain: true, + release: true); } late final _NSStringFromRangePtr = @@ -11309,10 +11982,10 @@ class NativeCupertinoHttp { ffi.Pointer Function(NSRange)>(); NSRange NSRangeFromString( - ffi.Pointer aString, + NSString aString, ) { return _NSRangeFromString( - aString, + aString._id, ); } @@ -11324,80 +11997,80 @@ class NativeCupertinoHttp { late final _class_NSMutableIndexSet1 = _getClass1("NSMutableIndexSet"); late final _sel_addIndexes_1 = _registerName1("addIndexes:"); - void _objc_msgSend_285( + void _objc_msgSend_302( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer indexSet, ) { - return __objc_msgSend_285( + return __objc_msgSend_302( obj, sel, indexSet, ); } - late final __objc_msgSend_285Ptr = _lookup< + late final __objc_msgSend_302Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< + late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removeIndexes_1 = _registerName1("removeIndexes:"); late final _sel_removeAllIndexes1 = _registerName1("removeAllIndexes"); late final _sel_addIndex_1 = _registerName1("addIndex:"); - void _objc_msgSend_286( + void _objc_msgSend_303( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_286( + return __objc_msgSend_303( obj, sel, value, ); } - late final __objc_msgSend_286Ptr = _lookup< + late final __objc_msgSend_303Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< + late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_removeIndex_1 = _registerName1("removeIndex:"); late final _sel_addIndexesInRange_1 = _registerName1("addIndexesInRange:"); - void _objc_msgSend_287( + void _objc_msgSend_304( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ) { - return __objc_msgSend_287( + return __objc_msgSend_304( obj, sel, range, ); } - late final __objc_msgSend_287Ptr = _lookup< + late final __objc_msgSend_304Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< + late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange)>(); late final _sel_removeIndexesInRange_1 = _registerName1("removeIndexesInRange:"); late final _sel_shiftIndexesStartingAtIndex_by_1 = _registerName1("shiftIndexesStartingAtIndex:by:"); - void _objc_msgSend_288( + void _objc_msgSend_305( ffi.Pointer obj, ffi.Pointer sel, int index, int delta, ) { - return __objc_msgSend_288( + return __objc_msgSend_305( obj, sel, index, @@ -11405,24 +12078,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_288Ptr = _lookup< + late final __objc_msgSend_305Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSUInteger, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< + late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, int)>(); late final _class_NSMutableArray1 = _getClass1("NSMutableArray"); late final _sel_addObject_1 = _registerName1("addObject:"); late final _sel_insertObject_atIndex_1 = _registerName1("insertObject:atIndex:"); - void _objc_msgSend_289( + void _objc_msgSend_306( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anObject, int index, ) { - return __objc_msgSend_289( + return __objc_msgSend_306( obj, sel, anObject, @@ -11430,11 +12103,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_289Ptr = _lookup< + late final __objc_msgSend_306Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< + late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -11443,13 +12116,13 @@ class NativeCupertinoHttp { _registerName1("removeObjectAtIndex:"); late final _sel_replaceObjectAtIndex_withObject_1 = _registerName1("replaceObjectAtIndex:withObject:"); - void _objc_msgSend_290( + void _objc_msgSend_307( ffi.Pointer obj, ffi.Pointer sel, int index, ffi.Pointer anObject, ) { - return __objc_msgSend_290( + return __objc_msgSend_307( obj, sel, index, @@ -11457,46 +12130,46 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_290Ptr = _lookup< + late final __objc_msgSend_307Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSUInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< + late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); late final _sel_addObjectsFromArray_1 = _registerName1("addObjectsFromArray:"); - void _objc_msgSend_291( + void _objc_msgSend_308( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherArray, ) { - return __objc_msgSend_291( + return __objc_msgSend_308( obj, sel, otherArray, ); } - late final __objc_msgSend_291Ptr = _lookup< + late final __objc_msgSend_308Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< + late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); - void _objc_msgSend_292( + void _objc_msgSend_309( ffi.Pointer obj, ffi.Pointer sel, int idx1, int idx2, ) { - return __objc_msgSend_292( + return __objc_msgSend_309( obj, sel, idx1, @@ -11504,23 +12177,23 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_292Ptr = _lookup< + late final __objc_msgSend_309Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSUInteger, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< + late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, int)>(); late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); late final _sel_removeObject_inRange_1 = _registerName1("removeObject:inRange:"); - void _objc_msgSend_293( + void _objc_msgSend_310( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anObject, NSRange range, ) { - return __objc_msgSend_293( + return __objc_msgSend_310( obj, sel, anObject, @@ -11528,11 +12201,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_293Ptr = _lookup< + late final __objc_msgSend_310Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< + late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSRange)>(); @@ -11543,13 +12216,13 @@ class NativeCupertinoHttp { _registerName1("removeObjectIdenticalTo:"); late final _sel_removeObjectsFromIndices_numIndices_1 = _registerName1("removeObjectsFromIndices:numIndices:"); - void _objc_msgSend_294( + void _objc_msgSend_311( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer indices, int cnt, ) { - return __objc_msgSend_294( + return __objc_msgSend_311( obj, sel, indices, @@ -11557,11 +12230,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_294Ptr = _lookup< + late final __objc_msgSend_311Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< + late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -11571,14 +12244,14 @@ class NativeCupertinoHttp { _registerName1("removeObjectsInRange:"); late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); - void _objc_msgSend_295( + void _objc_msgSend_312( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ffi.Pointer otherArray, NSRange otherRange, ) { - return __objc_msgSend_295( + return __objc_msgSend_312( obj, sel, range, @@ -11587,23 +12260,23 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_295Ptr = _lookup< + late final __objc_msgSend_312Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< + late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer, NSRange)>(); late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = _registerName1("replaceObjectsInRange:withObjectsFromArray:"); - void _objc_msgSend_296( + void _objc_msgSend_313( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ffi.Pointer otherArray, ) { - return __objc_msgSend_296( + return __objc_msgSend_313( obj, sel, range, @@ -11611,18 +12284,18 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_296Ptr = _lookup< + late final __objc_msgSend_313Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< + late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>(); late final _sel_setArray_1 = _registerName1("setArray:"); late final _sel_sortUsingFunction_context_1 = _registerName1("sortUsingFunction:context:"); - void _objc_msgSend_297( + void _objc_msgSend_314( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer< @@ -11632,7 +12305,7 @@ class NativeCupertinoHttp { compare, ffi.Pointer context, ) { - return __objc_msgSend_297( + return __objc_msgSend_314( obj, sel, compare, @@ -11640,7 +12313,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_297Ptr = _lookup< + late final __objc_msgSend_314Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -11650,7 +12323,7 @@ class NativeCupertinoHttp { NSInteger Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< + late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -11663,13 +12336,13 @@ class NativeCupertinoHttp { late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); late final _sel_insertObjects_atIndexes_1 = _registerName1("insertObjects:atIndexes:"); - void _objc_msgSend_298( + void _objc_msgSend_315( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer objects, ffi.Pointer indexes, ) { - return __objc_msgSend_298( + return __objc_msgSend_315( obj, sel, objects, @@ -11677,14 +12350,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_298Ptr = _lookup< + late final __objc_msgSend_315Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< + late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -11692,13 +12365,13 @@ class NativeCupertinoHttp { _registerName1("removeObjectsAtIndexes:"); late final _sel_replaceObjectsAtIndexes_withObjects_1 = _registerName1("replaceObjectsAtIndexes:withObjects:"); - void _objc_msgSend_299( + void _objc_msgSend_316( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer indexes, ffi.Pointer objects, ) { - return __objc_msgSend_299( + return __objc_msgSend_316( obj, sel, indexes, @@ -11706,14 +12379,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_299Ptr = _lookup< + late final __objc_msgSend_316Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< + late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -11721,35 +12394,35 @@ class NativeCupertinoHttp { _registerName1("setObject:atIndexedSubscript:"); late final _sel_sortUsingComparator_1 = _registerName1("sortUsingComparator:"); - void _objc_msgSend_300( + void _objc_msgSend_317( ffi.Pointer obj, ffi.Pointer sel, NSComparator cmptr, ) { - return __objc_msgSend_300( + return __objc_msgSend_317( obj, sel, cmptr, ); } - late final __objc_msgSend_300Ptr = _lookup< + late final __objc_msgSend_317Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< + late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, NSComparator)>(); late final _sel_sortWithOptions_usingComparator_1 = _registerName1("sortWithOptions:usingComparator:"); - void _objc_msgSend_301( + void _objc_msgSend_318( ffi.Pointer obj, ffi.Pointer sel, int opts, NSComparator cmptr, ) { - return __objc_msgSend_301( + return __objc_msgSend_318( obj, sel, opts, @@ -11757,130 +12430,130 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_301Ptr = _lookup< + late final __objc_msgSend_318Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< + late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, int, NSComparator)>(); late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); - ffi.Pointer _objc_msgSend_302( + ffi.Pointer _objc_msgSend_319( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, ) { - return __objc_msgSend_302( + return __objc_msgSend_319( obj, sel, path, ); } - late final __objc_msgSend_302Ptr = _lookup< + late final __objc_msgSend_319Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< + late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_303( + ffi.Pointer _objc_msgSend_320( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_303( + return __objc_msgSend_320( obj, sel, url, ); } - late final __objc_msgSend_303Ptr = _lookup< + late final __objc_msgSend_320Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< + late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_applyDifference_1 = _registerName1("applyDifference:"); - void _objc_msgSend_304( + void _objc_msgSend_321( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer difference, ) { - return __objc_msgSend_304( + return __objc_msgSend_321( obj, sel, difference, ); } - late final __objc_msgSend_304Ptr = _lookup< + late final __objc_msgSend_321Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< + late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _class_NSMutableData1 = _getClass1("NSMutableData"); late final _sel_mutableBytes1 = _registerName1("mutableBytes"); late final _sel_setLength_1 = _registerName1("setLength:"); - void _objc_msgSend_305( + void _objc_msgSend_322( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_305( + return __objc_msgSend_322( obj, sel, value, ); } - late final __objc_msgSend_305Ptr = _lookup< + late final __objc_msgSend_322Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< + late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); late final _sel_appendData_1 = _registerName1("appendData:"); - void _objc_msgSend_306( + void _objc_msgSend_323( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer other, ) { - return __objc_msgSend_306( + return __objc_msgSend_323( obj, sel, other, ); } - late final __objc_msgSend_306Ptr = _lookup< + late final __objc_msgSend_323Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< + late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); late final _sel_replaceBytesInRange_withBytes_1 = _registerName1("replaceBytesInRange:withBytes:"); - void _objc_msgSend_307( + void _objc_msgSend_324( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ffi.Pointer bytes, ) { - return __objc_msgSend_307( + return __objc_msgSend_324( obj, sel, range, @@ -11888,11 +12561,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_307Ptr = _lookup< + late final __objc_msgSend_324Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< + late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>(); @@ -11900,14 +12573,14 @@ class NativeCupertinoHttp { late final _sel_setData_1 = _registerName1("setData:"); late final _sel_replaceBytesInRange_withBytes_length_1 = _registerName1("replaceBytesInRange:withBytes:length:"); - void _objc_msgSend_308( + void _objc_msgSend_325( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ffi.Pointer replacementBytes, int replacementLength, ) { - return __objc_msgSend_308( + return __objc_msgSend_325( obj, sel, range, @@ -11916,26 +12589,46 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_308Ptr = _lookup< + late final __objc_msgSend_325Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< + late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer, int)>(); late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); + instancetype _objc_msgSend_326( + ffi.Pointer obj, + ffi.Pointer sel, + int aNumItems, + ) { + return __objc_msgSend_326( + obj, + sel, + aNumItems, + ); + } + + late final __objc_msgSend_326Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('objc_msgSend'); + late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer, int)>(); + late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); late final _sel_initWithLength_1 = _registerName1("initWithLength:"); late final _sel_decompressUsingAlgorithm_error_1 = _registerName1("decompressUsingAlgorithm:error:"); - bool _objc_msgSend_309( + bool _objc_msgSend_327( ffi.Pointer obj, ffi.Pointer sel, int algorithm, ffi.Pointer> error, ) { - return __objc_msgSend_309( + return __objc_msgSend_327( obj, sel, algorithm, @@ -11943,14 +12636,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_309Ptr = _lookup< + late final __objc_msgSend_327Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< + late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer>)>(); @@ -11960,13 +12653,13 @@ class NativeCupertinoHttp { late final _class_NSMutableDictionary1 = _getClass1("NSMutableDictionary"); late final _sel_removeObjectForKey_1 = _registerName1("removeObjectForKey:"); late final _sel_setObject_forKey_1 = _registerName1("setObject:forKey:"); - void _objc_msgSend_310( + void _objc_msgSend_328( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anObject, ffi.Pointer aKey, ) { - return __objc_msgSend_310( + return __objc_msgSend_328( obj, sel, anObject, @@ -11974,36 +12667,36 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_310Ptr = _lookup< + late final __objc_msgSend_328Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< + late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_addEntriesFromDictionary_1 = _registerName1("addEntriesFromDictionary:"); - void _objc_msgSend_311( + void _objc_msgSend_329( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherDictionary, ) { - return __objc_msgSend_311( + return __objc_msgSend_329( obj, sel, otherDictionary, ); } - late final __objc_msgSend_311Ptr = _lookup< + late final __objc_msgSend_329Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< + late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -12012,67 +12705,92 @@ class NativeCupertinoHttp { late final _sel_setDictionary_1 = _registerName1("setDictionary:"); late final _sel_setObject_forKeyedSubscript_1 = _registerName1("setObject:forKeyedSubscript:"); + void _objc_msgSend_330( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer obj1, + ffi.Pointer key, + ) { + return __objc_msgSend_330( + obj, + sel, + obj1, + key, + ); + } + + late final __objc_msgSend_330Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + late final _sel_dictionaryWithCapacity_1 = _registerName1("dictionaryWithCapacity:"); - ffi.Pointer _objc_msgSend_312( + ffi.Pointer _objc_msgSend_331( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer path, ) { - return __objc_msgSend_312( + return __objc_msgSend_331( obj, sel, path, ); } - late final __objc_msgSend_312Ptr = _lookup< + late final __objc_msgSend_331Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< + late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_313( + ffi.Pointer _objc_msgSend_332( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_313( + return __objc_msgSend_332( obj, sel, url, ); } - late final __objc_msgSend_313Ptr = _lookup< + late final __objc_msgSend_332Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< + late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dictionaryWithSharedKeySet_1 = _registerName1("dictionaryWithSharedKeySet:"); - ffi.Pointer _objc_msgSend_314( + ffi.Pointer _objc_msgSend_333( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer keyset, ) { - return __objc_msgSend_314( + return __objc_msgSend_333( obj, sel, keyset, ); } - late final __objc_msgSend_314Ptr = _lookup< + late final __objc_msgSend_333Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< + late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -12081,7 +12799,7 @@ class NativeCupertinoHttp { late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = _registerName1( "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); - instancetype _objc_msgSend_315( + instancetype _objc_msgSend_334( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer URL, @@ -12089,7 +12807,7 @@ class NativeCupertinoHttp { int length, ffi.Pointer name, ) { - return __objc_msgSend_315( + return __objc_msgSend_334( obj, sel, URL, @@ -12099,7 +12817,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_315Ptr = _lookup< + late final __objc_msgSend_334Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -12108,7 +12826,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< + late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -12125,13 +12843,13 @@ class NativeCupertinoHttp { late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); late final _sel_initWithResponse_data_1 = _registerName1("initWithResponse:data:"); - instancetype _objc_msgSend_316( + instancetype _objc_msgSend_335( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer response, ffi.Pointer data, ) { - return __objc_msgSend_316( + return __objc_msgSend_335( obj, sel, response, @@ -12139,20 +12857,20 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_316Ptr = _lookup< + late final __objc_msgSend_335Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< + late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithResponse_data_userInfo_storagePolicy_1 = _registerName1("initWithResponse:data:userInfo:storagePolicy:"); - instancetype _objc_msgSend_317( + instancetype _objc_msgSend_336( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer response, @@ -12160,7 +12878,7 @@ class NativeCupertinoHttp { ffi.Pointer userInfo, int storagePolicy, ) { - return __objc_msgSend_317( + return __objc_msgSend_336( obj, sel, response, @@ -12170,7 +12888,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_317Ptr = _lookup< + late final __objc_msgSend_336Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -12179,7 +12897,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< + late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -12189,93 +12907,93 @@ class NativeCupertinoHttp { int)>(); late final _sel_response1 = _registerName1("response"); - ffi.Pointer _objc_msgSend_318( + ffi.Pointer _objc_msgSend_337( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_318( + return __objc_msgSend_337( obj, sel, ); } - late final __objc_msgSend_318Ptr = _lookup< + late final __objc_msgSend_337Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< + late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_storagePolicy1 = _registerName1("storagePolicy"); - int _objc_msgSend_319( + int _objc_msgSend_338( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_319( + return __objc_msgSend_338( obj, sel, ); } - late final __objc_msgSend_319Ptr = _lookup< + late final __objc_msgSend_338Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< + late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _class_NSURLCache1 = _getClass1("NSURLCache"); late final _sel_sharedURLCache1 = _registerName1("sharedURLCache"); - ffi.Pointer _objc_msgSend_320( + ffi.Pointer _objc_msgSend_339( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_320( + return __objc_msgSend_339( obj, sel, ); } - late final __objc_msgSend_320Ptr = _lookup< + late final __objc_msgSend_339Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< + late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setSharedURLCache_1 = _registerName1("setSharedURLCache:"); - void _objc_msgSend_321( + void _objc_msgSend_340( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_321( + return __objc_msgSend_340( obj, sel, value, ); } - late final __objc_msgSend_321Ptr = _lookup< + late final __objc_msgSend_340Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< + late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_1 = _registerName1("initWithMemoryCapacity:diskCapacity:diskPath:"); - instancetype _objc_msgSend_322( + instancetype _objc_msgSend_341( ffi.Pointer obj, ffi.Pointer sel, int memoryCapacity, int diskCapacity, ffi.Pointer path, ) { - return __objc_msgSend_322( + return __objc_msgSend_341( obj, sel, memoryCapacity, @@ -12284,7 +13002,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_322Ptr = _lookup< + late final __objc_msgSend_341Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -12292,20 +13010,20 @@ class NativeCupertinoHttp { NSUInteger, NSUInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< + late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer)>(); late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_1 = _registerName1("initWithMemoryCapacity:diskCapacity:directoryURL:"); - instancetype _objc_msgSend_323( + instancetype _objc_msgSend_342( ffi.Pointer obj, ffi.Pointer sel, int memoryCapacity, int diskCapacity, ffi.Pointer directoryURL, ) { - return __objc_msgSend_323( + return __objc_msgSend_342( obj, sel, memoryCapacity, @@ -12314,7 +13032,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_323Ptr = _lookup< + late final __objc_msgSend_342Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -12322,7 +13040,7 @@ class NativeCupertinoHttp { NSUInteger, NSUInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< + late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer)>(); @@ -12332,14 +13050,14 @@ class NativeCupertinoHttp { _registerName1("supportsSecureCoding"); late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); - instancetype _objc_msgSend_324( + instancetype _objc_msgSend_343( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer URL, int cachePolicy, double timeoutInterval, ) { - return __objc_msgSend_324( + return __objc_msgSend_343( obj, sel, URL, @@ -12348,7 +13066,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_324Ptr = _lookup< + late final __objc_msgSend_343Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -12356,7 +13074,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< + late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, double)>(); @@ -12364,41 +13082,41 @@ class NativeCupertinoHttp { late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = _registerName1("initWithURL:cachePolicy:timeoutInterval:"); late final _sel_cachePolicy1 = _registerName1("cachePolicy"); - int _objc_msgSend_325( + int _objc_msgSend_344( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_325( + return __objc_msgSend_344( obj, sel, ); } - late final __objc_msgSend_325Ptr = _lookup< + late final __objc_msgSend_344Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< + late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); late final _sel_networkServiceType1 = _registerName1("networkServiceType"); - int _objc_msgSend_326( + int _objc_msgSend_345( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_326( + return __objc_msgSend_345( obj, sel, ); } - late final __objc_msgSend_326Ptr = _lookup< + late final __objc_msgSend_345Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< + late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_allowsCellularAccess1 = @@ -12409,21 +13127,21 @@ class NativeCupertinoHttp { _registerName1("allowsConstrainedNetworkAccess"); late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); late final _sel_attribution1 = _registerName1("attribution"); - int _objc_msgSend_327( + int _objc_msgSend_346( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_327( + return __objc_msgSend_346( obj, sel, ); } - late final __objc_msgSend_327Ptr = _lookup< + late final __objc_msgSend_346Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< + late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_requiresDNSSECValidation1 = @@ -12432,43 +13150,103 @@ class NativeCupertinoHttp { late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); late final _sel_valueForHTTPHeaderField_1 = _registerName1("valueForHTTPHeaderField:"); + ffi.Pointer _objc_msgSend_347( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer field, + ) { + return __objc_msgSend_347( + obj, + sel, + field, + ); + } + + late final __objc_msgSend_347Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + late final _sel_HTTPBody1 = _registerName1("HTTPBody"); + ffi.Pointer _objc_msgSend_348( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_348( + obj, + sel, + ); + } + + late final __objc_msgSend_348Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _class_NSInputStream1 = _getClass1("NSInputStream"); late final _class_NSStream1 = _getClass1("NSStream"); late final _sel_open1 = _registerName1("open"); late final _sel_close1 = _registerName1("close"); late final _sel_delegate1 = _registerName1("delegate"); late final _sel_setDelegate_1 = _registerName1("setDelegate:"); - void _objc_msgSend_328( + void _objc_msgSend_349( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_328( + return __objc_msgSend_349( obj, sel, value, ); } - late final __objc_msgSend_328Ptr = _lookup< + late final __objc_msgSend_349Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< + late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + bool _objc_msgSend_350( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer property, + NSStreamPropertyKey key, + ) { + return __objc_msgSend_350( + obj, + sel, + property, + key, + ); + } + + late final __objc_msgSend_350Ptr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSStreamPropertyKey)>>('objc_msgSend'); + late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, NSStreamPropertyKey)>(); + late final _class_NSRunLoop1 = _getClass1("NSRunLoop"); late final _sel_scheduleInRunLoop_forMode_1 = _registerName1("scheduleInRunLoop:forMode:"); - void _objc_msgSend_329( + void _objc_msgSend_351( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aRunLoop, NSRunLoopMode mode, ) { - return __objc_msgSend_329( + return __objc_msgSend_351( obj, sel, aRunLoop, @@ -12476,62 +13254,62 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_329Ptr = _lookup< + late final __objc_msgSend_351Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSRunLoopMode)>>('objc_msgSend'); - late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< + late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSRunLoopMode)>(); late final _sel_removeFromRunLoop_forMode_1 = _registerName1("removeFromRunLoop:forMode:"); late final _sel_streamStatus1 = _registerName1("streamStatus"); - int _objc_msgSend_330( + int _objc_msgSend_352( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_330( + return __objc_msgSend_352( obj, sel, ); } - late final __objc_msgSend_330Ptr = _lookup< + late final __objc_msgSend_352Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< + late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_streamError1 = _registerName1("streamError"); - ffi.Pointer _objc_msgSend_331( + ffi.Pointer _objc_msgSend_353( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_331( + return __objc_msgSend_353( obj, sel, ); } - late final __objc_msgSend_331Ptr = _lookup< + late final __objc_msgSend_353Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< + late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _class_NSOutputStream1 = _getClass1("NSOutputStream"); late final _sel_write_maxLength_1 = _registerName1("write:maxLength:"); - int _objc_msgSend_332( + int _objc_msgSend_354( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer buffer, int len, ) { - return __objc_msgSend_332( + return __objc_msgSend_354( obj, sel, buffer, @@ -12539,11 +13317,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_332Ptr = _lookup< + late final __objc_msgSend_354Ptr = _lookup< ffi.NativeFunction< NSInteger Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< + late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -12551,13 +13329,13 @@ class NativeCupertinoHttp { late final _sel_initToMemory1 = _registerName1("initToMemory"); late final _sel_initToBuffer_capacity_1 = _registerName1("initToBuffer:capacity:"); - instancetype _objc_msgSend_333( + instancetype _objc_msgSend_355( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer buffer, int capacity, ) { - return __objc_msgSend_333( + return __objc_msgSend_355( obj, sel, buffer, @@ -12565,15 +13343,37 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_333Ptr = _lookup< + late final __objc_msgSend_355Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< + late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_initWithURL_append_1 = _registerName1("initWithURL:append:"); + instancetype _objc_msgSend_356( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer url, + bool shouldAppend, + ) { + return __objc_msgSend_356( + obj, + sel, + url, + shouldAppend, + ); + } + + late final __objc_msgSend_356Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Bool)>>('objc_msgSend'); + late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, bool)>(); + late final _sel_initToFileAtPath_append_1 = _registerName1("initToFileAtPath:append:"); late final _sel_outputStreamToMemory1 = @@ -12586,7 +13386,7 @@ class NativeCupertinoHttp { _registerName1("outputStreamWithURL:append:"); late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_1 = _registerName1("getStreamsToHostWithName:port:inputStream:outputStream:"); - void _objc_msgSend_334( + void _objc_msgSend_357( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer hostname, @@ -12594,7 +13394,7 @@ class NativeCupertinoHttp { ffi.Pointer> inputStream, ffi.Pointer> outputStream, ) { - return __objc_msgSend_334( + return __objc_msgSend_357( obj, sel, hostname, @@ -12604,7 +13404,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_334Ptr = _lookup< + late final __objc_msgSend_357Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -12613,7 +13413,7 @@ class NativeCupertinoHttp { NSInteger, ffi.Pointer>, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< + late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -12625,7 +13425,7 @@ class NativeCupertinoHttp { late final _class_NSHost1 = _getClass1("NSHost"); late final _sel_getStreamsToHost_port_inputStream_outputStream_1 = _registerName1("getStreamsToHost:port:inputStream:outputStream:"); - void _objc_msgSend_335( + void _objc_msgSend_358( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer host, @@ -12633,7 +13433,7 @@ class NativeCupertinoHttp { ffi.Pointer> inputStream, ffi.Pointer> outputStream, ) { - return __objc_msgSend_335( + return __objc_msgSend_358( obj, sel, host, @@ -12643,7 +13443,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_335Ptr = _lookup< + late final __objc_msgSend_358Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -12652,7 +13452,7 @@ class NativeCupertinoHttp { NSInteger, ffi.Pointer>, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< + late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -12663,14 +13463,14 @@ class NativeCupertinoHttp { late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1 = _registerName1("getBoundStreamsWithBufferSize:inputStream:outputStream:"); - void _objc_msgSend_336( + void _objc_msgSend_359( ffi.Pointer obj, ffi.Pointer sel, int bufferSize, ffi.Pointer> inputStream, ffi.Pointer> outputStream, ) { - return __objc_msgSend_336( + return __objc_msgSend_359( obj, sel, bufferSize, @@ -12679,7 +13479,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_336Ptr = _lookup< + late final __objc_msgSend_359Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -12687,7 +13487,7 @@ class NativeCupertinoHttp { NSUInteger, ffi.Pointer>, ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< + late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -12697,13 +13497,13 @@ class NativeCupertinoHttp { late final _sel_read_maxLength_1 = _registerName1("read:maxLength:"); late final _sel_getBuffer_length_1 = _registerName1("getBuffer:length:"); - bool _objc_msgSend_337( + bool _objc_msgSend_360( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer> buffer, ffi.Pointer len, ) { - return __objc_msgSend_337( + return __objc_msgSend_360( obj, sel, buffer, @@ -12711,14 +13511,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_337Ptr = _lookup< + late final __objc_msgSend_360Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer>, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< + late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer>, ffi.Pointer)>(); @@ -12726,25 +13526,45 @@ class NativeCupertinoHttp { late final _sel_initWithFileAtPath_1 = _registerName1("initWithFileAtPath:"); late final _sel_inputStreamWithData_1 = _registerName1("inputStreamWithData:"); + instancetype _objc_msgSend_361( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer data, + ) { + return __objc_msgSend_361( + obj, + sel, + data, + ); + } + + late final __objc_msgSend_361Ptr = _lookup< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< + instancetype Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_inputStreamWithFileAtPath_1 = _registerName1("inputStreamWithFileAtPath:"); late final _sel_inputStreamWithURL_1 = _registerName1("inputStreamWithURL:"); late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); - ffi.Pointer _objc_msgSend_338( + ffi.Pointer _objc_msgSend_362( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_338( + return __objc_msgSend_362( obj, sel, ); } - late final __objc_msgSend_338Ptr = _lookup< + late final __objc_msgSend_362Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< + late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -12754,35 +13574,35 @@ class NativeCupertinoHttp { _registerName1("HTTPShouldUsePipelining"); late final _sel_cachedResponseForRequest_1 = _registerName1("cachedResponseForRequest:"); - ffi.Pointer _objc_msgSend_339( + ffi.Pointer _objc_msgSend_363( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_339( + return __objc_msgSend_363( obj, sel, request, ); } - late final __objc_msgSend_339Ptr = _lookup< + late final __objc_msgSend_363Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< + late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_storeCachedResponse_forRequest_1 = _registerName1("storeCachedResponse:forRequest:"); - void _objc_msgSend_340( + void _objc_msgSend_364( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer cachedResponse, ffi.Pointer request, ) { - return __objc_msgSend_340( + return __objc_msgSend_364( obj, sel, cachedResponse, @@ -12790,36 +13610,36 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_340Ptr = _lookup< + late final __objc_msgSend_364Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< + late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removeCachedResponseForRequest_1 = _registerName1("removeCachedResponseForRequest:"); - void _objc_msgSend_341( + void _objc_msgSend_365( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_341( + return __objc_msgSend_365( obj, sel, request, ); } - late final __objc_msgSend_341Ptr = _lookup< + late final __objc_msgSend_365Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< + late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -12830,45 +13650,45 @@ class NativeCupertinoHttp { _registerName1("timeIntervalSinceReferenceDate"); late final _sel_initWithTimeIntervalSinceReferenceDate_1 = _registerName1("initWithTimeIntervalSinceReferenceDate:"); - instancetype _objc_msgSend_342( + instancetype _objc_msgSend_366( ffi.Pointer obj, ffi.Pointer sel, double ti, ) { - return __objc_msgSend_342( + return __objc_msgSend_366( obj, sel, ti, ); } - late final __objc_msgSend_342Ptr = _lookup< + late final __objc_msgSend_366Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< + late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, double)>(); late final _sel_timeIntervalSinceDate_1 = _registerName1("timeIntervalSinceDate:"); - double _objc_msgSend_343( + double _objc_msgSend_367( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anotherDate, ) { - return __objc_msgSend_343( + return __objc_msgSend_367( obj, sel, anotherDate, ); } - late final __objc_msgSend_343Ptr = _lookup< + late final __objc_msgSend_367Ptr = _lookup< ffi.NativeFunction< NSTimeInterval Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< + late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -12880,65 +13700,65 @@ class NativeCupertinoHttp { late final _sel_dateByAddingTimeInterval_1 = _registerName1("dateByAddingTimeInterval:"); late final _sel_earlierDate_1 = _registerName1("earlierDate:"); - ffi.Pointer _objc_msgSend_344( + ffi.Pointer _objc_msgSend_368( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer anotherDate, ) { - return __objc_msgSend_344( + return __objc_msgSend_368( obj, sel, anotherDate, ); } - late final __objc_msgSend_344Ptr = _lookup< + late final __objc_msgSend_368Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< + late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_laterDate_1 = _registerName1("laterDate:"); - int _objc_msgSend_345( + int _objc_msgSend_369( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer other, ) { - return __objc_msgSend_345( + return __objc_msgSend_369( obj, sel, other, ); } - late final __objc_msgSend_345Ptr = _lookup< + late final __objc_msgSend_369Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< + late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); - bool _objc_msgSend_346( + bool _objc_msgSend_370( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherDate, ) { - return __objc_msgSend_346( + return __objc_msgSend_370( obj, sel, otherDate, ); } - late final __objc_msgSend_346Ptr = _lookup< + late final __objc_msgSend_370Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< + late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -12951,13 +13771,13 @@ class NativeCupertinoHttp { _registerName1("dateWithTimeIntervalSince1970:"); late final _sel_dateWithTimeInterval_sinceDate_1 = _registerName1("dateWithTimeInterval:sinceDate:"); - instancetype _objc_msgSend_347( + instancetype _objc_msgSend_371( ffi.Pointer obj, ffi.Pointer sel, double secsToBeAdded, ffi.Pointer date, ) { - return __objc_msgSend_347( + return __objc_msgSend_371( obj, sel, secsToBeAdded, @@ -12965,30 +13785,30 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_347Ptr = _lookup< + late final __objc_msgSend_371Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, NSTimeInterval, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< + late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, double, ffi.Pointer)>(); late final _sel_distantFuture1 = _registerName1("distantFuture"); - ffi.Pointer _objc_msgSend_348( + ffi.Pointer _objc_msgSend_372( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_348( + return __objc_msgSend_372( obj, sel, ); } - late final __objc_msgSend_348Ptr = _lookup< + late final __objc_msgSend_372Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< + late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -13002,23 +13822,23 @@ class NativeCupertinoHttp { _registerName1("initWithTimeInterval:sinceDate:"); late final _sel_removeCachedResponsesSinceDate_1 = _registerName1("removeCachedResponsesSinceDate:"); - void _objc_msgSend_349( + void _objc_msgSend_373( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer date, ) { - return __objc_msgSend_349( + return __objc_msgSend_373( obj, sel, date, ); } - late final __objc_msgSend_349Ptr = _lookup< + late final __objc_msgSend_373Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< + late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -13032,64 +13852,82 @@ class NativeCupertinoHttp { late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); late final _sel_originalRequest1 = _registerName1("originalRequest"); - ffi.Pointer _objc_msgSend_350( + ffi.Pointer _objc_msgSend_374( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_350( + return __objc_msgSend_374( obj, sel, ); } - late final __objc_msgSend_350Ptr = _lookup< + late final __objc_msgSend_374Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< + late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_currentRequest1 = _registerName1("currentRequest"); + ffi.Pointer _objc_msgSend_375( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_375( + obj, + sel, + ); + } + + late final __objc_msgSend_375Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _class_NSProgress1 = _getClass1("NSProgress"); late final _sel_currentProgress1 = _registerName1("currentProgress"); - ffi.Pointer _objc_msgSend_351( + ffi.Pointer _objc_msgSend_376( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_351( + return __objc_msgSend_376( obj, sel, ); } - late final __objc_msgSend_351Ptr = _lookup< + late final __objc_msgSend_376Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< + late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_progressWithTotalUnitCount_1 = _registerName1("progressWithTotalUnitCount:"); - ffi.Pointer _objc_msgSend_352( + ffi.Pointer _objc_msgSend_377( ffi.Pointer obj, ffi.Pointer sel, int unitCount, ) { - return __objc_msgSend_352( + return __objc_msgSend_377( obj, sel, unitCount, ); } - late final __objc_msgSend_352Ptr = _lookup< + late final __objc_msgSend_377Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< + late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -13097,14 +13935,14 @@ class NativeCupertinoHttp { _registerName1("discreteProgressWithTotalUnitCount:"); late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); - ffi.Pointer _objc_msgSend_353( + ffi.Pointer _objc_msgSend_378( ffi.Pointer obj, ffi.Pointer sel, int unitCount, ffi.Pointer parent, int portionOfParentTotalUnitCount, ) { - return __objc_msgSend_353( + return __objc_msgSend_378( obj, sel, unitCount, @@ -13113,7 +13951,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_353Ptr = _lookup< + late final __objc_msgSend_378Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -13121,19 +13959,19 @@ class NativeCupertinoHttp { ffi.Int64, ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< + late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer, int)>(); late final _sel_initWithParent_userInfo_1 = _registerName1("initWithParent:userInfo:"); - instancetype _objc_msgSend_354( + instancetype _objc_msgSend_379( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer parentProgressOrNil, ffi.Pointer userInfoOrNil, ) { - return __objc_msgSend_354( + return __objc_msgSend_379( obj, sel, parentProgressOrNil, @@ -13141,47 +13979,47 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_354Ptr = _lookup< + late final __objc_msgSend_379Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< + late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_becomeCurrentWithPendingUnitCount_1 = _registerName1("becomeCurrentWithPendingUnitCount:"); - void _objc_msgSend_355( + void _objc_msgSend_380( ffi.Pointer obj, ffi.Pointer sel, int unitCount, ) { - return __objc_msgSend_355( + return __objc_msgSend_380( obj, sel, unitCount, ); } - late final __objc_msgSend_355Ptr = _lookup< + late final __objc_msgSend_380Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< + late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); - void _objc_msgSend_356( + void _objc_msgSend_381( ffi.Pointer obj, ffi.Pointer sel, int unitCount, ffi.Pointer<_ObjCBlock> work, ) { - return __objc_msgSend_356( + return __objc_msgSend_381( obj, sel, unitCount, @@ -13189,24 +14027,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_356Ptr = _lookup< + late final __objc_msgSend_381Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< + late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_resignCurrent1 = _registerName1("resignCurrent"); late final _sel_addChild_withPendingUnitCount_1 = _registerName1("addChild:withPendingUnitCount:"); - void _objc_msgSend_357( + void _objc_msgSend_382( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer child, int inUnitCount, ) { - return __objc_msgSend_357( + return __objc_msgSend_382( obj, sel, child, @@ -13214,50 +14052,50 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_357Ptr = _lookup< + late final __objc_msgSend_382Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< + late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); - int _objc_msgSend_358( + int _objc_msgSend_383( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_358( + return __objc_msgSend_383( obj, sel, ); } - late final __objc_msgSend_358Ptr = _lookup< + late final __objc_msgSend_383Ptr = _lookup< ffi.NativeFunction< ffi.Int64 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< + late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); - void _objc_msgSend_359( + void _objc_msgSend_384( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_359( + return __objc_msgSend_384( obj, sel, value, ); } - late final __objc_msgSend_359Ptr = _lookup< + late final __objc_msgSend_384Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< + late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); @@ -13265,23 +14103,23 @@ class NativeCupertinoHttp { _registerName1("setCompletedUnitCount:"); late final _sel_setLocalizedDescription_1 = _registerName1("setLocalizedDescription:"); - void _objc_msgSend_360( + void _objc_msgSend_385( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_360( + return __objc_msgSend_385( obj, sel, value, ); } - late final __objc_msgSend_360Ptr = _lookup< + late final __objc_msgSend_385Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< + late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -13291,23 +14129,23 @@ class NativeCupertinoHttp { _registerName1("setLocalizedAdditionalDescription:"); late final _sel_isCancellable1 = _registerName1("isCancellable"); late final _sel_setCancellable_1 = _registerName1("setCancellable:"); - void _objc_msgSend_361( + void _objc_msgSend_386( ffi.Pointer obj, ffi.Pointer sel, bool value, ) { - return __objc_msgSend_361( + return __objc_msgSend_386( obj, sel, value, ); } - late final __objc_msgSend_361Ptr = _lookup< + late final __objc_msgSend_386Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< + late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_isPausable1 = _registerName1("isPausable"); @@ -13315,43 +14153,43 @@ class NativeCupertinoHttp { late final _sel_isCancelled1 = _registerName1("isCancelled"); late final _sel_isPaused1 = _registerName1("isPaused"); late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_362( + ffi.Pointer<_ObjCBlock> _objc_msgSend_387( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_362( + return __objc_msgSend_387( obj, sel, ); } - late final __objc_msgSend_362Ptr = _lookup< + late final __objc_msgSend_387Ptr = _lookup< ffi.NativeFunction< ffi.Pointer<_ObjCBlock> Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< + late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< ffi.Pointer<_ObjCBlock> Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setCancellationHandler_1 = _registerName1("setCancellationHandler:"); - void _objc_msgSend_363( + void _objc_msgSend_388( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> value, ) { - return __objc_msgSend_363( + return __objc_msgSend_388( obj, sel, value, ); } - late final __objc_msgSend_363Ptr = _lookup< + late final __objc_msgSend_388Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< + late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); @@ -13373,23 +14211,23 @@ class NativeCupertinoHttp { _registerName1("estimatedTimeRemaining"); late final _sel_setEstimatedTimeRemaining_1 = _registerName1("setEstimatedTimeRemaining:"); - void _objc_msgSend_364( + void _objc_msgSend_389( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_364( + return __objc_msgSend_389( obj, sel, value, ); } - late final __objc_msgSend_364Ptr = _lookup< + late final __objc_msgSend_389Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< + late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -13400,23 +14238,23 @@ class NativeCupertinoHttp { _registerName1("setFileOperationKind:"); late final _sel_fileURL1 = _registerName1("fileURL"); late final _sel_setFileURL_1 = _registerName1("setFileURL:"); - void _objc_msgSend_365( + void _objc_msgSend_390( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_365( + return __objc_msgSend_390( obj, sel, value, ); } - late final __objc_msgSend_365Ptr = _lookup< + late final __objc_msgSend_390Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< + late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -13429,13 +14267,13 @@ class NativeCupertinoHttp { late final _sel_unpublish1 = _registerName1("unpublish"); late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = _registerName1("addSubscriberForFileURL:withPublishingHandler:"); - ffi.Pointer _objc_msgSend_366( + ffi.Pointer _objc_msgSend_391( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, NSProgressPublishingHandler publishingHandler, ) { - return __objc_msgSend_366( + return __objc_msgSend_391( obj, sel, url, @@ -13443,14 +14281,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_366Ptr = _lookup< + late final __objc_msgSend_391Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSProgressPublishingHandler)>>('objc_msgSend'); - late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< + late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -13460,26 +14298,62 @@ class NativeCupertinoHttp { late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); late final _sel_isOld1 = _registerName1("isOld"); late final _sel_progress1 = _registerName1("progress"); + ffi.Pointer _objc_msgSend_392( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_392( + obj, + sel, + ); + } + + late final __objc_msgSend_392Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); + ffi.Pointer _objc_msgSend_393( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_393( + obj, + sel, + ); + } + + late final __objc_msgSend_393Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _sel_setEarliestBeginDate_1 = _registerName1("setEarliestBeginDate:"); - void _objc_msgSend_367( + void _objc_msgSend_394( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_367( + return __objc_msgSend_394( obj, sel, value, ); } - late final __objc_msgSend_367Ptr = _lookup< + late final __objc_msgSend_394Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< + late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -13500,45 +14374,65 @@ class NativeCupertinoHttp { _registerName1("countOfBytesExpectedToReceive"); late final _sel_taskDescription1 = _registerName1("taskDescription"); late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); + void _objc_msgSend_395( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_395( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_395Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_state1 = _registerName1("state"); - int _objc_msgSend_368( + int _objc_msgSend_396( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_368( + return __objc_msgSend_396( obj, sel, ); } - late final __objc_msgSend_368Ptr = _lookup< + late final __objc_msgSend_396Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< + late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_error1 = _registerName1("error"); late final _sel_suspend1 = _registerName1("suspend"); late final _sel_priority1 = _registerName1("priority"); late final _sel_setPriority_1 = _registerName1("setPriority:"); - void _objc_msgSend_369( + void _objc_msgSend_397( ffi.Pointer obj, ffi.Pointer sel, double value, ) { - return __objc_msgSend_369( + return __objc_msgSend_397( obj, sel, value, ); } - late final __objc_msgSend_369Ptr = _lookup< + late final __objc_msgSend_397Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< + late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, double)>(); late final _sel_prefersIncrementalDelivery1 = @@ -13547,13 +14441,13 @@ class NativeCupertinoHttp { _registerName1("setPrefersIncrementalDelivery:"); late final _sel_storeCachedResponse_forDataTask_1 = _registerName1("storeCachedResponse:forDataTask:"); - void _objc_msgSend_370( + void _objc_msgSend_398( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer cachedResponse, ffi.Pointer dataTask, ) { - return __objc_msgSend_370( + return __objc_msgSend_398( obj, sel, cachedResponse, @@ -13561,26 +14455,26 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_370Ptr = _lookup< + late final __objc_msgSend_398Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< + late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_getCachedResponseForDataTask_completionHandler_1 = _registerName1("getCachedResponseForDataTask:completionHandler:"); - void _objc_msgSend_371( + void _objc_msgSend_399( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer dataTask, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_371( + return __objc_msgSend_399( obj, sel, dataTask, @@ -13588,36 +14482,36 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_371Ptr = _lookup< + late final __objc_msgSend_399Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< + late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_removeCachedResponseForDataTask_1 = _registerName1("removeCachedResponseForDataTask:"); - void _objc_msgSend_372( + void _objc_msgSend_400( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer dataTask, ) { - return __objc_msgSend_372( + return __objc_msgSend_400( obj, sel, dataTask, ); } - late final __objc_msgSend_372Ptr = _lookup< + late final __objc_msgSend_400Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< + late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -13625,14 +14519,14 @@ class NativeCupertinoHttp { late final _sel_name1 = _registerName1("name"); late final _sel_initWithName_object_userInfo_1 = _registerName1("initWithName:object:userInfo:"); - instancetype _objc_msgSend_373( + instancetype _objc_msgSend_401( ffi.Pointer obj, ffi.Pointer sel, NSNotificationName name, ffi.Pointer object, ffi.Pointer userInfo, ) { - return __objc_msgSend_373( + return __objc_msgSend_401( obj, sel, name, @@ -13641,7 +14535,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_373Ptr = _lookup< + late final __objc_msgSend_401Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -13649,7 +14543,7 @@ class NativeCupertinoHttp { NSNotificationName, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< + late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -13663,27 +14557,27 @@ class NativeCupertinoHttp { _registerName1("notificationWithName:object:userInfo:"); late final _class_NSNotificationCenter1 = _getClass1("NSNotificationCenter"); late final _sel_defaultCenter1 = _registerName1("defaultCenter"); - ffi.Pointer _objc_msgSend_374( + ffi.Pointer _objc_msgSend_402( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_374( + return __objc_msgSend_402( obj, sel, ); } - late final __objc_msgSend_374Ptr = _lookup< + late final __objc_msgSend_402Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< + late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_addObserver_selector_name_object_1 = _registerName1("addObserver:selector:name:object:"); - void _objc_msgSend_375( + void _objc_msgSend_403( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer observer, @@ -13691,7 +14585,7 @@ class NativeCupertinoHttp { NSNotificationName aName, ffi.Pointer anObject, ) { - return __objc_msgSend_375( + return __objc_msgSend_403( obj, sel, observer, @@ -13701,7 +14595,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_375Ptr = _lookup< + late final __objc_msgSend_403Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -13710,7 +14604,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSNotificationName, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< + late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -13720,35 +14614,35 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_postNotification_1 = _registerName1("postNotification:"); - void _objc_msgSend_376( + void _objc_msgSend_404( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer notification, ) { - return __objc_msgSend_376( + return __objc_msgSend_404( obj, sel, notification, ); } - late final __objc_msgSend_376Ptr = _lookup< + late final __objc_msgSend_404Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< + late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_postNotificationName_object_1 = _registerName1("postNotificationName:object:"); - void _objc_msgSend_377( + void _objc_msgSend_405( ffi.Pointer obj, ffi.Pointer sel, NSNotificationName aName, ffi.Pointer anObject, ) { - return __objc_msgSend_377( + return __objc_msgSend_405( obj, sel, aName, @@ -13756,24 +14650,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_377Ptr = _lookup< + late final __objc_msgSend_405Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSNotificationName, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< + late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSNotificationName, ffi.Pointer)>(); late final _sel_postNotificationName_object_userInfo_1 = _registerName1("postNotificationName:object:userInfo:"); - void _objc_msgSend_378( + void _objc_msgSend_406( ffi.Pointer obj, ffi.Pointer sel, NSNotificationName aName, ffi.Pointer anObject, ffi.Pointer aUserInfo, ) { - return __objc_msgSend_378( + return __objc_msgSend_406( obj, sel, aName, @@ -13782,7 +14676,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_378Ptr = _lookup< + late final __objc_msgSend_406Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -13790,7 +14684,7 @@ class NativeCupertinoHttp { NSNotificationName, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< + late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -13801,14 +14695,14 @@ class NativeCupertinoHttp { late final _sel_removeObserver_1 = _registerName1("removeObserver:"); late final _sel_removeObserver_name_object_1 = _registerName1("removeObserver:name:object:"); - void _objc_msgSend_379( + void _objc_msgSend_407( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer observer, NSNotificationName aName, ffi.Pointer anObject, ) { - return __objc_msgSend_379( + return __objc_msgSend_407( obj, sel, observer, @@ -13817,7 +14711,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_379Ptr = _lookup< + late final __objc_msgSend_407Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -13825,7 +14719,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSNotificationName, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< + late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -13842,64 +14736,64 @@ class NativeCupertinoHttp { late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); late final _sel_isReady1 = _registerName1("isReady"); late final _sel_addDependency_1 = _registerName1("addDependency:"); - void _objc_msgSend_380( + void _objc_msgSend_408( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer op, ) { - return __objc_msgSend_380( + return __objc_msgSend_408( obj, sel, op, ); } - late final __objc_msgSend_380Ptr = _lookup< + late final __objc_msgSend_408Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< + late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_removeDependency_1 = _registerName1("removeDependency:"); late final _sel_dependencies1 = _registerName1("dependencies"); late final _sel_queuePriority1 = _registerName1("queuePriority"); - int _objc_msgSend_381( + int _objc_msgSend_409( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_381( + return __objc_msgSend_409( obj, sel, ); } - late final __objc_msgSend_381Ptr = _lookup< + late final __objc_msgSend_409Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< + late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); - void _objc_msgSend_382( + void _objc_msgSend_410( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_382( + return __objc_msgSend_410( obj, sel, value, ); } - late final __objc_msgSend_382Ptr = _lookup< + late final __objc_msgSend_410Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< + late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_completionBlock1 = _registerName1("completionBlock"); @@ -13907,75 +14801,75 @@ class NativeCupertinoHttp { late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); late final _sel_threadPriority1 = _registerName1("threadPriority"); late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); - void _objc_msgSend_383( + void _objc_msgSend_411( ffi.Pointer obj, ffi.Pointer sel, double value, ) { - return __objc_msgSend_383( + return __objc_msgSend_411( obj, sel, value, ); } - late final __objc_msgSend_383Ptr = _lookup< + late final __objc_msgSend_411Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< + late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, double)>(); late final _sel_qualityOfService1 = _registerName1("qualityOfService"); - int _objc_msgSend_384( + int _objc_msgSend_412( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_384( + return __objc_msgSend_412( obj, sel, ); } - late final __objc_msgSend_384Ptr = _lookup< + late final __objc_msgSend_412Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< + late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setQualityOfService_1 = _registerName1("setQualityOfService:"); - void _objc_msgSend_385( + void _objc_msgSend_413( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_385( + return __objc_msgSend_413( obj, sel, value, ); } - late final __objc_msgSend_385Ptr = _lookup< + late final __objc_msgSend_413Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< + late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_setName_1 = _registerName1("setName:"); late final _sel_addOperation_1 = _registerName1("addOperation:"); late final _sel_addOperations_waitUntilFinished_1 = _registerName1("addOperations:waitUntilFinished:"); - void _objc_msgSend_386( + void _objc_msgSend_414( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer ops, bool wait, ) { - return __objc_msgSend_386( + return __objc_msgSend_414( obj, sel, ops, @@ -13983,33 +14877,33 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_386Ptr = _lookup< + late final __objc_msgSend_414Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< + late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, bool)>(); late final _sel_addOperationWithBlock_1 = _registerName1("addOperationWithBlock:"); - void _objc_msgSend_387( + void _objc_msgSend_415( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_387( + return __objc_msgSend_415( obj, sel, block, ); } - late final __objc_msgSend_387Ptr = _lookup< + late final __objc_msgSend_415Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< + late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); @@ -14018,64 +14912,64 @@ class NativeCupertinoHttp { _registerName1("maxConcurrentOperationCount"); late final _sel_setMaxConcurrentOperationCount_1 = _registerName1("setMaxConcurrentOperationCount:"); - void _objc_msgSend_388( + void _objc_msgSend_416( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_388( + return __objc_msgSend_416( obj, sel, value, ); } - late final __objc_msgSend_388Ptr = _lookup< + late final __objc_msgSend_416Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< + late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_isSuspended1 = _registerName1("isSuspended"); late final _sel_setSuspended_1 = _registerName1("setSuspended:"); late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); - dispatch_queue_t _objc_msgSend_389( + dispatch_queue_t _objc_msgSend_417( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_389( + return __objc_msgSend_417( obj, sel, ); } - late final __objc_msgSend_389Ptr = _lookup< + late final __objc_msgSend_417Ptr = _lookup< ffi.NativeFunction< dispatch_queue_t Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< + late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< dispatch_queue_t Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); - void _objc_msgSend_390( + void _objc_msgSend_418( ffi.Pointer obj, ffi.Pointer sel, dispatch_queue_t value, ) { - return __objc_msgSend_390( + return __objc_msgSend_418( obj, sel, value, ); } - late final __objc_msgSend_390Ptr = _lookup< + late final __objc_msgSend_418Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, dispatch_queue_t)>>('objc_msgSend'); - late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< + late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); @@ -14083,30 +14977,48 @@ class NativeCupertinoHttp { late final _sel_waitUntilAllOperationsAreFinished1 = _registerName1("waitUntilAllOperationsAreFinished"); late final _sel_currentQueue1 = _registerName1("currentQueue"); - ffi.Pointer _objc_msgSend_391( + ffi.Pointer _objc_msgSend_419( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_391( + return __objc_msgSend_419( obj, sel, ); } - late final __objc_msgSend_391Ptr = _lookup< + late final __objc_msgSend_419Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< + late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_mainQueue1 = _registerName1("mainQueue"); + ffi.Pointer _objc_msgSend_420( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_420( + obj, + sel, + ); + } + + late final __objc_msgSend_420Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _sel_operations1 = _registerName1("operations"); late final _sel_operationCount1 = _registerName1("operationCount"); late final _sel_addObserverForName_object_queue_usingBlock_1 = _registerName1("addObserverForName:object:queue:usingBlock:"); - ffi.Pointer _objc_msgSend_392( + ffi.Pointer _objc_msgSend_421( ffi.Pointer obj, ffi.Pointer sel, NSNotificationName name, @@ -14114,7 +15026,7 @@ class NativeCupertinoHttp { ffi.Pointer queue, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_392( + return __objc_msgSend_421( obj, sel, name, @@ -14124,7 +15036,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_392Ptr = _lookup< + late final __objc_msgSend_421Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -14133,7 +15045,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< + late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -14155,46 +15067,46 @@ class NativeCupertinoHttp { late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); late final _sel_setURL_1 = _registerName1("setURL:"); late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); - void _objc_msgSend_393( + void _objc_msgSend_422( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_393( + return __objc_msgSend_422( obj, sel, value, ); } - late final __objc_msgSend_393Ptr = _lookup< + late final __objc_msgSend_422Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< + late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); late final _sel_setNetworkServiceType_1 = _registerName1("setNetworkServiceType:"); - void _objc_msgSend_394( + void _objc_msgSend_423( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_394( + return __objc_msgSend_423( obj, sel, value, ); } - late final __objc_msgSend_394Ptr = _lookup< + late final __objc_msgSend_423Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< + late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_setAllowsCellularAccess_1 = @@ -14206,23 +15118,23 @@ class NativeCupertinoHttp { late final _sel_setAssumesHTTP3Capable_1 = _registerName1("setAssumesHTTP3Capable:"); late final _sel_setAttribution_1 = _registerName1("setAttribution:"); - void _objc_msgSend_395( + void _objc_msgSend_424( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_395( + return __objc_msgSend_424( obj, sel, value, ); } - late final __objc_msgSend_395Ptr = _lookup< + late final __objc_msgSend_424Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< + late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_setRequiresDNSSECValidation_1 = @@ -14230,35 +15142,35 @@ class NativeCupertinoHttp { late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); late final _sel_setAllHTTPHeaderFields_1 = _registerName1("setAllHTTPHeaderFields:"); - void _objc_msgSend_396( + void _objc_msgSend_425( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_396( + return __objc_msgSend_425( obj, sel, value, ); } - late final __objc_msgSend_396Ptr = _lookup< + late final __objc_msgSend_425Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< + late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setValue_forHTTPHeaderField_1 = _registerName1("setValue:forHTTPHeaderField:"); - void _objc_msgSend_397( + void _objc_msgSend_426( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ffi.Pointer field, ) { - return __objc_msgSend_397( + return __objc_msgSend_426( obj, sel, value, @@ -14266,58 +15178,83 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_397Ptr = _lookup< + late final __objc_msgSend_426Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< + late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_addValue_forHTTPHeaderField_1 = _registerName1("addValue:forHTTPHeaderField:"); + void _objc_msgSend_427( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ffi.Pointer field, + ) { + return __objc_msgSend_427( + obj, + sel, + value, + field, + ); + } + + late final __objc_msgSend_427Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); - void _objc_msgSend_398( + void _objc_msgSend_428( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_398( + return __objc_msgSend_428( obj, sel, value, ); } - late final __objc_msgSend_398Ptr = _lookup< + late final __objc_msgSend_428Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< + late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); - void _objc_msgSend_399( + void _objc_msgSend_429( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_399( + return __objc_msgSend_429( obj, sel, value, ); } - late final __objc_msgSend_399Ptr = _lookup< + late final __objc_msgSend_429Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< + late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -14328,66 +15265,66 @@ class NativeCupertinoHttp { late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); late final _sel_sharedHTTPCookieStorage1 = _registerName1("sharedHTTPCookieStorage"); - ffi.Pointer _objc_msgSend_400( + ffi.Pointer _objc_msgSend_430( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_400( + return __objc_msgSend_430( obj, sel, ); } - late final __objc_msgSend_400Ptr = _lookup< + late final __objc_msgSend_430Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< + late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); - ffi.Pointer _objc_msgSend_401( + ffi.Pointer _objc_msgSend_431( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer identifier, ) { - return __objc_msgSend_401( + return __objc_msgSend_431( obj, sel, identifier, ); } - late final __objc_msgSend_401Ptr = _lookup< + late final __objc_msgSend_431Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< + late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_cookies1 = _registerName1("cookies"); late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); late final _sel_setCookie_1 = _registerName1("setCookie:"); - void _objc_msgSend_402( + void _objc_msgSend_432( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer cookie, ) { - return __objc_msgSend_402( + return __objc_msgSend_432( obj, sel, cookie, ); } - late final __objc_msgSend_402Ptr = _lookup< + late final __objc_msgSend_432Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< + late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -14397,14 +15334,14 @@ class NativeCupertinoHttp { late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); late final _sel_setCookies_forURL_mainDocumentURL_1 = _registerName1("setCookies:forURL:mainDocumentURL:"); - void _objc_msgSend_403( + void _objc_msgSend_433( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer cookies, ffi.Pointer URL, ffi.Pointer mainDocumentURL, ) { - return __objc_msgSend_403( + return __objc_msgSend_433( obj, sel, cookies, @@ -14413,7 +15350,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_403Ptr = _lookup< + late final __objc_msgSend_433Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -14421,7 +15358,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< + late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -14430,55 +15367,55 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); - int _objc_msgSend_404( + int _objc_msgSend_434( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_404( + return __objc_msgSend_434( obj, sel, ); } - late final __objc_msgSend_404Ptr = _lookup< + late final __objc_msgSend_434Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< + late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setCookieAcceptPolicy_1 = _registerName1("setCookieAcceptPolicy:"); - void _objc_msgSend_405( + void _objc_msgSend_435( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_405( + return __objc_msgSend_435( obj, sel, value, ); } - late final __objc_msgSend_405Ptr = _lookup< + late final __objc_msgSend_435Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< + late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_sortedCookiesUsingDescriptors_1 = _registerName1("sortedCookiesUsingDescriptors:"); late final _sel_storeCookies_forTask_1 = _registerName1("storeCookies:forTask:"); - void _objc_msgSend_406( + void _objc_msgSend_436( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer cookies, ffi.Pointer task, ) { - return __objc_msgSend_406( + return __objc_msgSend_436( obj, sel, cookies, @@ -14486,26 +15423,26 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_406Ptr = _lookup< + late final __objc_msgSend_436Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< + late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_getCookiesForTask_completionHandler_1 = _registerName1("getCookiesForTask:completionHandler:"); - void _objc_msgSend_407( + void _objc_msgSend_437( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer task, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_407( + return __objc_msgSend_437( obj, sel, task, @@ -14513,14 +15450,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_407Ptr = _lookup< + late final __objc_msgSend_437Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< + late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); @@ -15155,7 +16092,6 @@ class NativeCupertinoHttp { late final _CFArrayAppendArray = _CFArrayAppendArrayPtr.asFunction< void Function(CFMutableArrayRef, CFArrayRef, CFRange)>(); - late final _class_OS_object1 = _getClass1("OS_object"); ffi.Pointer os_retain( ffi.Pointer object, ) { @@ -15999,9 +16935,8 @@ class NativeCupertinoHttp { } late final _frexpfPtr = _lookup< - ffi - .NativeFunction)>>( - 'frexpf'); + ffi.NativeFunction< + ffi.Float Function(ffi.Float, ffi.Pointer)>>('frexpf'); late final _frexpf = _frexpfPtr.asFunction)>(); @@ -16869,9 +17804,8 @@ class NativeCupertinoHttp { } late final _fmafPtr = _lookup< - ffi - .NativeFunction>( - 'fmaf'); + ffi.NativeFunction< + ffi.Float Function(ffi.Float, ffi.Float, ffi.Float)>>('fmaf'); late final _fmaf = _fmafPtr.asFunction(); @@ -16989,62 +17923,6 @@ class NativeCupertinoHttp { _lookup>('__tanpi'); late final ___tanpi = ___tanpiPtr.asFunction(); - __float2 __sincosf_stret( - double arg0, - ) { - return ___sincosf_stret( - arg0, - ); - } - - late final ___sincosf_stretPtr = - _lookup>( - '__sincosf_stret'); - late final ___sincosf_stret = - ___sincosf_stretPtr.asFunction<__float2 Function(double)>(); - - __double2 __sincos_stret( - double arg0, - ) { - return ___sincos_stret( - arg0, - ); - } - - late final ___sincos_stretPtr = - _lookup>( - '__sincos_stret'); - late final ___sincos_stret = - ___sincos_stretPtr.asFunction<__double2 Function(double)>(); - - __float2 __sincospif_stret( - double arg0, - ) { - return ___sincospif_stret( - arg0, - ); - } - - late final ___sincospif_stretPtr = - _lookup>( - '__sincospif_stret'); - late final ___sincospif_stret = - ___sincospif_stretPtr.asFunction<__float2 Function(double)>(); - - __double2 __sincospi_stret( - double arg0, - ) { - return ___sincospi_stret( - arg0, - ); - } - - late final ___sincospi_stretPtr = - _lookup>( - '__sincospi_stret'); - late final ___sincospi_stret = - ___sincospi_stretPtr.asFunction<__double2 Function(double)>(); - double j0( double arg0, ) { @@ -17628,8 +18506,7 @@ class NativeCupertinoHttp { late final _psignalPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.UnsignedInt, ffi.Pointer)>>('psignal'); + ffi.Void Function(ffi.Int, ffi.Pointer)>>('psignal'); late final _psignal = _psignalPtr.asFunction)>(); @@ -18671,9 +19548,8 @@ class NativeCupertinoHttp { } late final _fseekoPtr = _lookup< - ffi - .NativeFunction, off_t, ffi.Int)>>( - 'fseeko'); + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, off_t, ffi.Int)>>('fseeko'); late final _fseeko = _fseekoPtr.asFunction, int, int)>(); @@ -18903,8 +19779,6 @@ class NativeCupertinoHttp { int get sys_nerr => _sys_nerr.value; - set sys_nerr(int value) => _sys_nerr.value = value; - late final ffi.Pointer>> _sys_errlist = _lookup>>('sys_errlist'); @@ -19743,9 +20617,8 @@ class NativeCupertinoHttp { } late final _strnlenPtr = _lookup< - ffi - .NativeFunction, ffi.Size)>>( - 'strnlen'); + ffi.NativeFunction< + ffi.Size Function(ffi.Pointer, ffi.Size)>>('strnlen'); late final _strnlen = _strnlenPtr.asFunction, int)>(); @@ -19950,9 +20823,8 @@ class NativeCupertinoHttp { } late final _strmodePtr = _lookup< - ffi - .NativeFunction)>>( - 'strmode'); + ffi.NativeFunction< + ffi.Void Function(ffi.Int, ffi.Pointer)>>('strmode'); late final _strmode = _strmodePtr.asFunction)>(); @@ -20080,9 +20952,8 @@ class NativeCupertinoHttp { } late final _bzeroPtr = _lookup< - ffi - .NativeFunction, ffi.Size)>>( - 'bzero'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Size)>>('bzero'); late final _bzero = _bzeroPtr.asFunction, int)>(); @@ -20285,9 +21156,8 @@ class NativeCupertinoHttp { } late final _ctimePtr = _lookup< - ffi - .NativeFunction Function(ffi.Pointer)>>( - 'ctime'); + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('ctime'); late final _ctime = _ctimePtr .asFunction Function(ffi.Pointer)>(); @@ -20577,9 +21447,8 @@ class NativeCupertinoHttp { } late final _clock_getresPtr = _lookup< - ffi - .NativeFunction)>>( - 'clock_getres'); + ffi.NativeFunction< + ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_getres'); late final _clock_getres = _clock_getresPtr.asFunction)>(); @@ -20594,9 +21463,8 @@ class NativeCupertinoHttp { } late final _clock_gettimePtr = _lookup< - ffi - .NativeFunction)>>( - 'clock_gettime'); + ffi.NativeFunction< + ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_gettime'); late final _clock_gettime = _clock_gettimePtr.asFunction)>(); @@ -20625,9 +21493,8 @@ class NativeCupertinoHttp { } late final _clock_settimePtr = _lookup< - ffi - .NativeFunction)>>( - 'clock_settime'); + ffi.NativeFunction< + ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_settime'); late final _clock_settime = _clock_settimePtr.asFunction)>(); @@ -22500,160 +23367,104 @@ class NativeCupertinoHttp { CFNotificationName get kCFLocaleCurrentLocaleDidChangeNotification => _kCFLocaleCurrentLocaleDidChangeNotification.value; - set kCFLocaleCurrentLocaleDidChangeNotification(CFNotificationName value) => - _kCFLocaleCurrentLocaleDidChangeNotification.value = value; - late final ffi.Pointer _kCFLocaleIdentifier = _lookup('kCFLocaleIdentifier'); CFLocaleKey get kCFLocaleIdentifier => _kCFLocaleIdentifier.value; - set kCFLocaleIdentifier(CFLocaleKey value) => - _kCFLocaleIdentifier.value = value; - late final ffi.Pointer _kCFLocaleLanguageCode = _lookup('kCFLocaleLanguageCode'); CFLocaleKey get kCFLocaleLanguageCode => _kCFLocaleLanguageCode.value; - set kCFLocaleLanguageCode(CFLocaleKey value) => - _kCFLocaleLanguageCode.value = value; - late final ffi.Pointer _kCFLocaleCountryCode = _lookup('kCFLocaleCountryCode'); CFLocaleKey get kCFLocaleCountryCode => _kCFLocaleCountryCode.value; - set kCFLocaleCountryCode(CFLocaleKey value) => - _kCFLocaleCountryCode.value = value; - late final ffi.Pointer _kCFLocaleScriptCode = _lookup('kCFLocaleScriptCode'); CFLocaleKey get kCFLocaleScriptCode => _kCFLocaleScriptCode.value; - set kCFLocaleScriptCode(CFLocaleKey value) => - _kCFLocaleScriptCode.value = value; - late final ffi.Pointer _kCFLocaleVariantCode = _lookup('kCFLocaleVariantCode'); CFLocaleKey get kCFLocaleVariantCode => _kCFLocaleVariantCode.value; - set kCFLocaleVariantCode(CFLocaleKey value) => - _kCFLocaleVariantCode.value = value; - late final ffi.Pointer _kCFLocaleExemplarCharacterSet = _lookup('kCFLocaleExemplarCharacterSet'); CFLocaleKey get kCFLocaleExemplarCharacterSet => _kCFLocaleExemplarCharacterSet.value; - set kCFLocaleExemplarCharacterSet(CFLocaleKey value) => - _kCFLocaleExemplarCharacterSet.value = value; - late final ffi.Pointer _kCFLocaleCalendarIdentifier = _lookup('kCFLocaleCalendarIdentifier'); CFLocaleKey get kCFLocaleCalendarIdentifier => _kCFLocaleCalendarIdentifier.value; - set kCFLocaleCalendarIdentifier(CFLocaleKey value) => - _kCFLocaleCalendarIdentifier.value = value; - late final ffi.Pointer _kCFLocaleCalendar = _lookup('kCFLocaleCalendar'); CFLocaleKey get kCFLocaleCalendar => _kCFLocaleCalendar.value; - set kCFLocaleCalendar(CFLocaleKey value) => _kCFLocaleCalendar.value = value; - late final ffi.Pointer _kCFLocaleCollationIdentifier = _lookup('kCFLocaleCollationIdentifier'); CFLocaleKey get kCFLocaleCollationIdentifier => _kCFLocaleCollationIdentifier.value; - set kCFLocaleCollationIdentifier(CFLocaleKey value) => - _kCFLocaleCollationIdentifier.value = value; - late final ffi.Pointer _kCFLocaleUsesMetricSystem = _lookup('kCFLocaleUsesMetricSystem'); CFLocaleKey get kCFLocaleUsesMetricSystem => _kCFLocaleUsesMetricSystem.value; - set kCFLocaleUsesMetricSystem(CFLocaleKey value) => - _kCFLocaleUsesMetricSystem.value = value; - late final ffi.Pointer _kCFLocaleMeasurementSystem = _lookup('kCFLocaleMeasurementSystem'); CFLocaleKey get kCFLocaleMeasurementSystem => _kCFLocaleMeasurementSystem.value; - set kCFLocaleMeasurementSystem(CFLocaleKey value) => - _kCFLocaleMeasurementSystem.value = value; - late final ffi.Pointer _kCFLocaleDecimalSeparator = _lookup('kCFLocaleDecimalSeparator'); CFLocaleKey get kCFLocaleDecimalSeparator => _kCFLocaleDecimalSeparator.value; - set kCFLocaleDecimalSeparator(CFLocaleKey value) => - _kCFLocaleDecimalSeparator.value = value; - late final ffi.Pointer _kCFLocaleGroupingSeparator = _lookup('kCFLocaleGroupingSeparator'); CFLocaleKey get kCFLocaleGroupingSeparator => _kCFLocaleGroupingSeparator.value; - set kCFLocaleGroupingSeparator(CFLocaleKey value) => - _kCFLocaleGroupingSeparator.value = value; - late final ffi.Pointer _kCFLocaleCurrencySymbol = _lookup('kCFLocaleCurrencySymbol'); CFLocaleKey get kCFLocaleCurrencySymbol => _kCFLocaleCurrencySymbol.value; - set kCFLocaleCurrencySymbol(CFLocaleKey value) => - _kCFLocaleCurrencySymbol.value = value; - late final ffi.Pointer _kCFLocaleCurrencyCode = _lookup('kCFLocaleCurrencyCode'); CFLocaleKey get kCFLocaleCurrencyCode => _kCFLocaleCurrencyCode.value; - set kCFLocaleCurrencyCode(CFLocaleKey value) => - _kCFLocaleCurrencyCode.value = value; - late final ffi.Pointer _kCFLocaleCollatorIdentifier = _lookup('kCFLocaleCollatorIdentifier'); CFLocaleKey get kCFLocaleCollatorIdentifier => _kCFLocaleCollatorIdentifier.value; - set kCFLocaleCollatorIdentifier(CFLocaleKey value) => - _kCFLocaleCollatorIdentifier.value = value; - late final ffi.Pointer _kCFLocaleQuotationBeginDelimiterKey = _lookup('kCFLocaleQuotationBeginDelimiterKey'); CFLocaleKey get kCFLocaleQuotationBeginDelimiterKey => _kCFLocaleQuotationBeginDelimiterKey.value; - set kCFLocaleQuotationBeginDelimiterKey(CFLocaleKey value) => - _kCFLocaleQuotationBeginDelimiterKey.value = value; - late final ffi.Pointer _kCFLocaleQuotationEndDelimiterKey = _lookup('kCFLocaleQuotationEndDelimiterKey'); CFLocaleKey get kCFLocaleQuotationEndDelimiterKey => _kCFLocaleQuotationEndDelimiterKey.value; - set kCFLocaleQuotationEndDelimiterKey(CFLocaleKey value) => - _kCFLocaleQuotationEndDelimiterKey.value = value; - late final ffi.Pointer _kCFLocaleAlternateQuotationBeginDelimiterKey = _lookup('kCFLocaleAlternateQuotationBeginDelimiterKey'); @@ -22661,9 +23472,6 @@ class NativeCupertinoHttp { CFLocaleKey get kCFLocaleAlternateQuotationBeginDelimiterKey => _kCFLocaleAlternateQuotationBeginDelimiterKey.value; - set kCFLocaleAlternateQuotationBeginDelimiterKey(CFLocaleKey value) => - _kCFLocaleAlternateQuotationBeginDelimiterKey.value = value; - late final ffi.Pointer _kCFLocaleAlternateQuotationEndDelimiterKey = _lookup('kCFLocaleAlternateQuotationEndDelimiterKey'); @@ -22671,117 +23479,75 @@ class NativeCupertinoHttp { CFLocaleKey get kCFLocaleAlternateQuotationEndDelimiterKey => _kCFLocaleAlternateQuotationEndDelimiterKey.value; - set kCFLocaleAlternateQuotationEndDelimiterKey(CFLocaleKey value) => - _kCFLocaleAlternateQuotationEndDelimiterKey.value = value; - late final ffi.Pointer _kCFGregorianCalendar = _lookup('kCFGregorianCalendar'); CFCalendarIdentifier get kCFGregorianCalendar => _kCFGregorianCalendar.value; - set kCFGregorianCalendar(CFCalendarIdentifier value) => - _kCFGregorianCalendar.value = value; - late final ffi.Pointer _kCFBuddhistCalendar = _lookup('kCFBuddhistCalendar'); CFCalendarIdentifier get kCFBuddhistCalendar => _kCFBuddhistCalendar.value; - set kCFBuddhistCalendar(CFCalendarIdentifier value) => - _kCFBuddhistCalendar.value = value; - late final ffi.Pointer _kCFChineseCalendar = _lookup('kCFChineseCalendar'); CFCalendarIdentifier get kCFChineseCalendar => _kCFChineseCalendar.value; - set kCFChineseCalendar(CFCalendarIdentifier value) => - _kCFChineseCalendar.value = value; - late final ffi.Pointer _kCFHebrewCalendar = _lookup('kCFHebrewCalendar'); CFCalendarIdentifier get kCFHebrewCalendar => _kCFHebrewCalendar.value; - set kCFHebrewCalendar(CFCalendarIdentifier value) => - _kCFHebrewCalendar.value = value; - late final ffi.Pointer _kCFIslamicCalendar = _lookup('kCFIslamicCalendar'); CFCalendarIdentifier get kCFIslamicCalendar => _kCFIslamicCalendar.value; - set kCFIslamicCalendar(CFCalendarIdentifier value) => - _kCFIslamicCalendar.value = value; - late final ffi.Pointer _kCFIslamicCivilCalendar = _lookup('kCFIslamicCivilCalendar'); CFCalendarIdentifier get kCFIslamicCivilCalendar => _kCFIslamicCivilCalendar.value; - set kCFIslamicCivilCalendar(CFCalendarIdentifier value) => - _kCFIslamicCivilCalendar.value = value; - late final ffi.Pointer _kCFJapaneseCalendar = _lookup('kCFJapaneseCalendar'); CFCalendarIdentifier get kCFJapaneseCalendar => _kCFJapaneseCalendar.value; - set kCFJapaneseCalendar(CFCalendarIdentifier value) => - _kCFJapaneseCalendar.value = value; - late final ffi.Pointer _kCFRepublicOfChinaCalendar = _lookup('kCFRepublicOfChinaCalendar'); CFCalendarIdentifier get kCFRepublicOfChinaCalendar => _kCFRepublicOfChinaCalendar.value; - set kCFRepublicOfChinaCalendar(CFCalendarIdentifier value) => - _kCFRepublicOfChinaCalendar.value = value; - late final ffi.Pointer _kCFPersianCalendar = _lookup('kCFPersianCalendar'); CFCalendarIdentifier get kCFPersianCalendar => _kCFPersianCalendar.value; - set kCFPersianCalendar(CFCalendarIdentifier value) => - _kCFPersianCalendar.value = value; - late final ffi.Pointer _kCFIndianCalendar = _lookup('kCFIndianCalendar'); CFCalendarIdentifier get kCFIndianCalendar => _kCFIndianCalendar.value; - set kCFIndianCalendar(CFCalendarIdentifier value) => - _kCFIndianCalendar.value = value; - late final ffi.Pointer _kCFISO8601Calendar = _lookup('kCFISO8601Calendar'); CFCalendarIdentifier get kCFISO8601Calendar => _kCFISO8601Calendar.value; - set kCFISO8601Calendar(CFCalendarIdentifier value) => - _kCFISO8601Calendar.value = value; - late final ffi.Pointer _kCFIslamicTabularCalendar = _lookup('kCFIslamicTabularCalendar'); CFCalendarIdentifier get kCFIslamicTabularCalendar => _kCFIslamicTabularCalendar.value; - set kCFIslamicTabularCalendar(CFCalendarIdentifier value) => - _kCFIslamicTabularCalendar.value = value; - late final ffi.Pointer _kCFIslamicUmmAlQuraCalendar = _lookup('kCFIslamicUmmAlQuraCalendar'); CFCalendarIdentifier get kCFIslamicUmmAlQuraCalendar => _kCFIslamicUmmAlQuraCalendar.value; - set kCFIslamicUmmAlQuraCalendar(CFCalendarIdentifier value) => - _kCFIslamicUmmAlQuraCalendar.value = value; - double CFAbsoluteTimeGetCurrent() { return _CFAbsoluteTimeGetCurrent(); } @@ -22798,18 +23564,12 @@ class NativeCupertinoHttp { double get kCFAbsoluteTimeIntervalSince1970 => _kCFAbsoluteTimeIntervalSince1970.value; - set kCFAbsoluteTimeIntervalSince1970(double value) => - _kCFAbsoluteTimeIntervalSince1970.value = value; - late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1904 = _lookup('kCFAbsoluteTimeIntervalSince1904'); double get kCFAbsoluteTimeIntervalSince1904 => _kCFAbsoluteTimeIntervalSince1904.value; - set kCFAbsoluteTimeIntervalSince1904(double value) => - _kCFAbsoluteTimeIntervalSince1904.value = value; - int CFDateGetTypeID() { return _CFDateGetTypeID(); } @@ -22830,9 +23590,8 @@ class NativeCupertinoHttp { } late final _CFDateCreatePtr = _lookup< - ffi - .NativeFunction>( - 'CFDateCreate'); + ffi.NativeFunction< + CFDateRef Function(CFAllocatorRef, CFAbsoluteTime)>>('CFDateCreate'); late final _CFDateCreate = _CFDateCreatePtr.asFunction(); @@ -23672,101 +24431,66 @@ class NativeCupertinoHttp { CFErrorDomain get kCFErrorDomainPOSIX => _kCFErrorDomainPOSIX.value; - set kCFErrorDomainPOSIX(CFErrorDomain value) => - _kCFErrorDomainPOSIX.value = value; - late final ffi.Pointer _kCFErrorDomainOSStatus = _lookup('kCFErrorDomainOSStatus'); CFErrorDomain get kCFErrorDomainOSStatus => _kCFErrorDomainOSStatus.value; - set kCFErrorDomainOSStatus(CFErrorDomain value) => - _kCFErrorDomainOSStatus.value = value; - late final ffi.Pointer _kCFErrorDomainMach = _lookup('kCFErrorDomainMach'); CFErrorDomain get kCFErrorDomainMach => _kCFErrorDomainMach.value; - set kCFErrorDomainMach(CFErrorDomain value) => - _kCFErrorDomainMach.value = value; - late final ffi.Pointer _kCFErrorDomainCocoa = _lookup('kCFErrorDomainCocoa'); CFErrorDomain get kCFErrorDomainCocoa => _kCFErrorDomainCocoa.value; - set kCFErrorDomainCocoa(CFErrorDomain value) => - _kCFErrorDomainCocoa.value = value; - late final ffi.Pointer _kCFErrorLocalizedDescriptionKey = _lookup('kCFErrorLocalizedDescriptionKey'); CFStringRef get kCFErrorLocalizedDescriptionKey => _kCFErrorLocalizedDescriptionKey.value; - set kCFErrorLocalizedDescriptionKey(CFStringRef value) => - _kCFErrorLocalizedDescriptionKey.value = value; - late final ffi.Pointer _kCFErrorLocalizedFailureKey = _lookup('kCFErrorLocalizedFailureKey'); CFStringRef get kCFErrorLocalizedFailureKey => _kCFErrorLocalizedFailureKey.value; - set kCFErrorLocalizedFailureKey(CFStringRef value) => - _kCFErrorLocalizedFailureKey.value = value; - late final ffi.Pointer _kCFErrorLocalizedFailureReasonKey = _lookup('kCFErrorLocalizedFailureReasonKey'); CFStringRef get kCFErrorLocalizedFailureReasonKey => _kCFErrorLocalizedFailureReasonKey.value; - set kCFErrorLocalizedFailureReasonKey(CFStringRef value) => - _kCFErrorLocalizedFailureReasonKey.value = value; - late final ffi.Pointer _kCFErrorLocalizedRecoverySuggestionKey = _lookup('kCFErrorLocalizedRecoverySuggestionKey'); CFStringRef get kCFErrorLocalizedRecoverySuggestionKey => _kCFErrorLocalizedRecoverySuggestionKey.value; - set kCFErrorLocalizedRecoverySuggestionKey(CFStringRef value) => - _kCFErrorLocalizedRecoverySuggestionKey.value = value; - late final ffi.Pointer _kCFErrorDescriptionKey = _lookup('kCFErrorDescriptionKey'); CFStringRef get kCFErrorDescriptionKey => _kCFErrorDescriptionKey.value; - set kCFErrorDescriptionKey(CFStringRef value) => - _kCFErrorDescriptionKey.value = value; - late final ffi.Pointer _kCFErrorUnderlyingErrorKey = _lookup('kCFErrorUnderlyingErrorKey'); CFStringRef get kCFErrorUnderlyingErrorKey => _kCFErrorUnderlyingErrorKey.value; - set kCFErrorUnderlyingErrorKey(CFStringRef value) => - _kCFErrorUnderlyingErrorKey.value = value; - late final ffi.Pointer _kCFErrorURLKey = _lookup('kCFErrorURLKey'); CFStringRef get kCFErrorURLKey => _kCFErrorURLKey.value; - set kCFErrorURLKey(CFStringRef value) => _kCFErrorURLKey.value = value; - late final ffi.Pointer _kCFErrorFilePathKey = _lookup('kCFErrorFilePathKey'); CFStringRef get kCFErrorFilePathKey => _kCFErrorFilePathKey.value; - set kCFErrorFilePathKey(CFStringRef value) => - _kCFErrorFilePathKey.value = value; - CFErrorRef CFErrorCreate( CFAllocatorRef allocator, CFErrorDomain domain, @@ -25304,9 +26028,8 @@ class NativeCupertinoHttp { } late final _CFStringTrimPtr = _lookup< - ffi - .NativeFunction>( - 'CFStringTrim'); + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFStringRef)>>('CFStringTrim'); late final _CFStringTrim = _CFStringTrimPtr.asFunction< void Function(CFMutableStringRef, CFStringRef)>(); @@ -25438,143 +26161,95 @@ class NativeCupertinoHttp { CFStringRef get kCFStringTransformStripCombiningMarks => _kCFStringTransformStripCombiningMarks.value; - set kCFStringTransformStripCombiningMarks(CFStringRef value) => - _kCFStringTransformStripCombiningMarks.value = value; - late final ffi.Pointer _kCFStringTransformToLatin = _lookup('kCFStringTransformToLatin'); CFStringRef get kCFStringTransformToLatin => _kCFStringTransformToLatin.value; - set kCFStringTransformToLatin(CFStringRef value) => - _kCFStringTransformToLatin.value = value; - late final ffi.Pointer _kCFStringTransformFullwidthHalfwidth = _lookup('kCFStringTransformFullwidthHalfwidth'); CFStringRef get kCFStringTransformFullwidthHalfwidth => _kCFStringTransformFullwidthHalfwidth.value; - set kCFStringTransformFullwidthHalfwidth(CFStringRef value) => - _kCFStringTransformFullwidthHalfwidth.value = value; - late final ffi.Pointer _kCFStringTransformLatinKatakana = _lookup('kCFStringTransformLatinKatakana'); CFStringRef get kCFStringTransformLatinKatakana => _kCFStringTransformLatinKatakana.value; - set kCFStringTransformLatinKatakana(CFStringRef value) => - _kCFStringTransformLatinKatakana.value = value; - late final ffi.Pointer _kCFStringTransformLatinHiragana = _lookup('kCFStringTransformLatinHiragana'); CFStringRef get kCFStringTransformLatinHiragana => _kCFStringTransformLatinHiragana.value; - set kCFStringTransformLatinHiragana(CFStringRef value) => - _kCFStringTransformLatinHiragana.value = value; - late final ffi.Pointer _kCFStringTransformHiraganaKatakana = _lookup('kCFStringTransformHiraganaKatakana'); CFStringRef get kCFStringTransformHiraganaKatakana => _kCFStringTransformHiraganaKatakana.value; - set kCFStringTransformHiraganaKatakana(CFStringRef value) => - _kCFStringTransformHiraganaKatakana.value = value; - late final ffi.Pointer _kCFStringTransformMandarinLatin = _lookup('kCFStringTransformMandarinLatin'); CFStringRef get kCFStringTransformMandarinLatin => _kCFStringTransformMandarinLatin.value; - set kCFStringTransformMandarinLatin(CFStringRef value) => - _kCFStringTransformMandarinLatin.value = value; - late final ffi.Pointer _kCFStringTransformLatinHangul = _lookup('kCFStringTransformLatinHangul'); CFStringRef get kCFStringTransformLatinHangul => _kCFStringTransformLatinHangul.value; - set kCFStringTransformLatinHangul(CFStringRef value) => - _kCFStringTransformLatinHangul.value = value; - late final ffi.Pointer _kCFStringTransformLatinArabic = _lookup('kCFStringTransformLatinArabic'); CFStringRef get kCFStringTransformLatinArabic => _kCFStringTransformLatinArabic.value; - set kCFStringTransformLatinArabic(CFStringRef value) => - _kCFStringTransformLatinArabic.value = value; - late final ffi.Pointer _kCFStringTransformLatinHebrew = _lookup('kCFStringTransformLatinHebrew'); CFStringRef get kCFStringTransformLatinHebrew => _kCFStringTransformLatinHebrew.value; - set kCFStringTransformLatinHebrew(CFStringRef value) => - _kCFStringTransformLatinHebrew.value = value; - late final ffi.Pointer _kCFStringTransformLatinThai = _lookup('kCFStringTransformLatinThai'); CFStringRef get kCFStringTransformLatinThai => _kCFStringTransformLatinThai.value; - set kCFStringTransformLatinThai(CFStringRef value) => - _kCFStringTransformLatinThai.value = value; - late final ffi.Pointer _kCFStringTransformLatinCyrillic = _lookup('kCFStringTransformLatinCyrillic'); CFStringRef get kCFStringTransformLatinCyrillic => _kCFStringTransformLatinCyrillic.value; - set kCFStringTransformLatinCyrillic(CFStringRef value) => - _kCFStringTransformLatinCyrillic.value = value; - late final ffi.Pointer _kCFStringTransformLatinGreek = _lookup('kCFStringTransformLatinGreek'); CFStringRef get kCFStringTransformLatinGreek => _kCFStringTransformLatinGreek.value; - set kCFStringTransformLatinGreek(CFStringRef value) => - _kCFStringTransformLatinGreek.value = value; - late final ffi.Pointer _kCFStringTransformToXMLHex = _lookup('kCFStringTransformToXMLHex'); CFStringRef get kCFStringTransformToXMLHex => _kCFStringTransformToXMLHex.value; - set kCFStringTransformToXMLHex(CFStringRef value) => - _kCFStringTransformToXMLHex.value = value; - late final ffi.Pointer _kCFStringTransformToUnicodeName = _lookup('kCFStringTransformToUnicodeName'); CFStringRef get kCFStringTransformToUnicodeName => _kCFStringTransformToUnicodeName.value; - set kCFStringTransformToUnicodeName(CFStringRef value) => - _kCFStringTransformToUnicodeName.value = value; - late final ffi.Pointer _kCFStringTransformStripDiacritics = _lookup('kCFStringTransformStripDiacritics'); CFStringRef get kCFStringTransformStripDiacritics => _kCFStringTransformStripDiacritics.value; - set kCFStringTransformStripDiacritics(CFStringRef value) => - _kCFStringTransformStripDiacritics.value = value; - int CFStringIsEncodingAvailable( int encoding, ) { @@ -26044,10 +26719,6 @@ class NativeCupertinoHttp { CFNotificationName get kCFTimeZoneSystemTimeZoneDidChangeNotification => _kCFTimeZoneSystemTimeZoneDidChangeNotification.value; - set kCFTimeZoneSystemTimeZoneDidChangeNotification( - CFNotificationName value) => - _kCFTimeZoneSystemTimeZoneDidChangeNotification.value = value; - int CFCalendarGetTypeID() { return _CFCalendarGetTypeID(); } @@ -26696,36 +27367,24 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterIsLenient => _kCFDateFormatterIsLenient.value; - set kCFDateFormatterIsLenient(CFDateFormatterKey value) => - _kCFDateFormatterIsLenient.value = value; - late final ffi.Pointer _kCFDateFormatterTimeZone = _lookup('kCFDateFormatterTimeZone'); CFDateFormatterKey get kCFDateFormatterTimeZone => _kCFDateFormatterTimeZone.value; - set kCFDateFormatterTimeZone(CFDateFormatterKey value) => - _kCFDateFormatterTimeZone.value = value; - late final ffi.Pointer _kCFDateFormatterCalendarName = _lookup('kCFDateFormatterCalendarName'); CFDateFormatterKey get kCFDateFormatterCalendarName => _kCFDateFormatterCalendarName.value; - set kCFDateFormatterCalendarName(CFDateFormatterKey value) => - _kCFDateFormatterCalendarName.value = value; - late final ffi.Pointer _kCFDateFormatterDefaultFormat = _lookup('kCFDateFormatterDefaultFormat'); CFDateFormatterKey get kCFDateFormatterDefaultFormat => _kCFDateFormatterDefaultFormat.value; - set kCFDateFormatterDefaultFormat(CFDateFormatterKey value) => - _kCFDateFormatterDefaultFormat.value = value; - late final ffi.Pointer _kCFDateFormatterTwoDigitStartDate = _lookup('kCFDateFormatterTwoDigitStartDate'); @@ -26733,45 +27392,30 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterTwoDigitStartDate => _kCFDateFormatterTwoDigitStartDate.value; - set kCFDateFormatterTwoDigitStartDate(CFDateFormatterKey value) => - _kCFDateFormatterTwoDigitStartDate.value = value; - late final ffi.Pointer _kCFDateFormatterDefaultDate = _lookup('kCFDateFormatterDefaultDate'); CFDateFormatterKey get kCFDateFormatterDefaultDate => _kCFDateFormatterDefaultDate.value; - set kCFDateFormatterDefaultDate(CFDateFormatterKey value) => - _kCFDateFormatterDefaultDate.value = value; - late final ffi.Pointer _kCFDateFormatterCalendar = _lookup('kCFDateFormatterCalendar'); CFDateFormatterKey get kCFDateFormatterCalendar => _kCFDateFormatterCalendar.value; - set kCFDateFormatterCalendar(CFDateFormatterKey value) => - _kCFDateFormatterCalendar.value = value; - late final ffi.Pointer _kCFDateFormatterEraSymbols = _lookup('kCFDateFormatterEraSymbols'); CFDateFormatterKey get kCFDateFormatterEraSymbols => _kCFDateFormatterEraSymbols.value; - set kCFDateFormatterEraSymbols(CFDateFormatterKey value) => - _kCFDateFormatterEraSymbols.value = value; - late final ffi.Pointer _kCFDateFormatterMonthSymbols = _lookup('kCFDateFormatterMonthSymbols'); CFDateFormatterKey get kCFDateFormatterMonthSymbols => _kCFDateFormatterMonthSymbols.value; - set kCFDateFormatterMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterMonthSymbols.value = value; - late final ffi.Pointer _kCFDateFormatterShortMonthSymbols = _lookup('kCFDateFormatterShortMonthSymbols'); @@ -26779,18 +27423,12 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterShortMonthSymbols => _kCFDateFormatterShortMonthSymbols.value; - set kCFDateFormatterShortMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortMonthSymbols.value = value; - late final ffi.Pointer _kCFDateFormatterWeekdaySymbols = _lookup('kCFDateFormatterWeekdaySymbols'); CFDateFormatterKey get kCFDateFormatterWeekdaySymbols => _kCFDateFormatterWeekdaySymbols.value; - set kCFDateFormatterWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterWeekdaySymbols.value = value; - late final ffi.Pointer _kCFDateFormatterShortWeekdaySymbols = _lookup('kCFDateFormatterShortWeekdaySymbols'); @@ -26798,36 +27436,24 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterShortWeekdaySymbols => _kCFDateFormatterShortWeekdaySymbols.value; - set kCFDateFormatterShortWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortWeekdaySymbols.value = value; - late final ffi.Pointer _kCFDateFormatterAMSymbol = _lookup('kCFDateFormatterAMSymbol'); CFDateFormatterKey get kCFDateFormatterAMSymbol => _kCFDateFormatterAMSymbol.value; - set kCFDateFormatterAMSymbol(CFDateFormatterKey value) => - _kCFDateFormatterAMSymbol.value = value; - late final ffi.Pointer _kCFDateFormatterPMSymbol = _lookup('kCFDateFormatterPMSymbol'); CFDateFormatterKey get kCFDateFormatterPMSymbol => _kCFDateFormatterPMSymbol.value; - set kCFDateFormatterPMSymbol(CFDateFormatterKey value) => - _kCFDateFormatterPMSymbol.value = value; - late final ffi.Pointer _kCFDateFormatterLongEraSymbols = _lookup('kCFDateFormatterLongEraSymbols'); CFDateFormatterKey get kCFDateFormatterLongEraSymbols => _kCFDateFormatterLongEraSymbols.value; - set kCFDateFormatterLongEraSymbols(CFDateFormatterKey value) => - _kCFDateFormatterLongEraSymbols.value = value; - late final ffi.Pointer _kCFDateFormatterVeryShortMonthSymbols = _lookup('kCFDateFormatterVeryShortMonthSymbols'); @@ -26835,9 +27461,6 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterVeryShortMonthSymbols => _kCFDateFormatterVeryShortMonthSymbols.value; - set kCFDateFormatterVeryShortMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterVeryShortMonthSymbols.value = value; - late final ffi.Pointer _kCFDateFormatterStandaloneMonthSymbols = _lookup('kCFDateFormatterStandaloneMonthSymbols'); @@ -26845,9 +27468,6 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterStandaloneMonthSymbols => _kCFDateFormatterStandaloneMonthSymbols.value; - set kCFDateFormatterStandaloneMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterStandaloneMonthSymbols.value = value; - late final ffi.Pointer _kCFDateFormatterShortStandaloneMonthSymbols = _lookup( @@ -26856,9 +27476,6 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterShortStandaloneMonthSymbols => _kCFDateFormatterShortStandaloneMonthSymbols.value; - set kCFDateFormatterShortStandaloneMonthSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortStandaloneMonthSymbols.value = value; - late final ffi.Pointer _kCFDateFormatterVeryShortStandaloneMonthSymbols = _lookup( @@ -26867,10 +27484,6 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneMonthSymbols => _kCFDateFormatterVeryShortStandaloneMonthSymbols.value; - set kCFDateFormatterVeryShortStandaloneMonthSymbols( - CFDateFormatterKey value) => - _kCFDateFormatterVeryShortStandaloneMonthSymbols.value = value; - late final ffi.Pointer _kCFDateFormatterVeryShortWeekdaySymbols = _lookup('kCFDateFormatterVeryShortWeekdaySymbols'); @@ -26878,9 +27491,6 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterVeryShortWeekdaySymbols => _kCFDateFormatterVeryShortWeekdaySymbols.value; - set kCFDateFormatterVeryShortWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterVeryShortWeekdaySymbols.value = value; - late final ffi.Pointer _kCFDateFormatterStandaloneWeekdaySymbols = _lookup('kCFDateFormatterStandaloneWeekdaySymbols'); @@ -26888,9 +27498,6 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterStandaloneWeekdaySymbols => _kCFDateFormatterStandaloneWeekdaySymbols.value; - set kCFDateFormatterStandaloneWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterStandaloneWeekdaySymbols.value = value; - late final ffi.Pointer _kCFDateFormatterShortStandaloneWeekdaySymbols = _lookup( @@ -26899,9 +27506,6 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterShortStandaloneWeekdaySymbols => _kCFDateFormatterShortStandaloneWeekdaySymbols.value; - set kCFDateFormatterShortStandaloneWeekdaySymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortStandaloneWeekdaySymbols.value = value; - late final ffi.Pointer _kCFDateFormatterVeryShortStandaloneWeekdaySymbols = _lookup( @@ -26910,19 +27514,12 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneWeekdaySymbols => _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value; - set kCFDateFormatterVeryShortStandaloneWeekdaySymbols( - CFDateFormatterKey value) => - _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value = value; - late final ffi.Pointer _kCFDateFormatterQuarterSymbols = _lookup('kCFDateFormatterQuarterSymbols'); CFDateFormatterKey get kCFDateFormatterQuarterSymbols => _kCFDateFormatterQuarterSymbols.value; - set kCFDateFormatterQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterQuarterSymbols.value = value; - late final ffi.Pointer _kCFDateFormatterShortQuarterSymbols = _lookup('kCFDateFormatterShortQuarterSymbols'); @@ -26930,9 +27527,6 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterShortQuarterSymbols => _kCFDateFormatterShortQuarterSymbols.value; - set kCFDateFormatterShortQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortQuarterSymbols.value = value; - late final ffi.Pointer _kCFDateFormatterStandaloneQuarterSymbols = _lookup('kCFDateFormatterStandaloneQuarterSymbols'); @@ -26940,9 +27534,6 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterStandaloneQuarterSymbols => _kCFDateFormatterStandaloneQuarterSymbols.value; - set kCFDateFormatterStandaloneQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterStandaloneQuarterSymbols.value = value; - late final ffi.Pointer _kCFDateFormatterShortStandaloneQuarterSymbols = _lookup( @@ -26951,9 +27542,6 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterShortStandaloneQuarterSymbols => _kCFDateFormatterShortStandaloneQuarterSymbols.value; - set kCFDateFormatterShortStandaloneQuarterSymbols(CFDateFormatterKey value) => - _kCFDateFormatterShortStandaloneQuarterSymbols.value = value; - late final ffi.Pointer _kCFDateFormatterGregorianStartDate = _lookup('kCFDateFormatterGregorianStartDate'); @@ -26961,9 +27549,6 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterGregorianStartDate => _kCFDateFormatterGregorianStartDate.value; - set kCFDateFormatterGregorianStartDate(CFDateFormatterKey value) => - _kCFDateFormatterGregorianStartDate.value = value; - late final ffi.Pointer _kCFDateFormatterDoesRelativeDateFormattingKey = _lookup( @@ -26972,23 +27557,16 @@ class NativeCupertinoHttp { CFDateFormatterKey get kCFDateFormatterDoesRelativeDateFormattingKey => _kCFDateFormatterDoesRelativeDateFormattingKey.value; - set kCFDateFormatterDoesRelativeDateFormattingKey(CFDateFormatterKey value) => - _kCFDateFormatterDoesRelativeDateFormattingKey.value = value; - late final ffi.Pointer _kCFBooleanTrue = _lookup('kCFBooleanTrue'); CFBooleanRef get kCFBooleanTrue => _kCFBooleanTrue.value; - set kCFBooleanTrue(CFBooleanRef value) => _kCFBooleanTrue.value = value; - late final ffi.Pointer _kCFBooleanFalse = _lookup('kCFBooleanFalse'); CFBooleanRef get kCFBooleanFalse => _kCFBooleanFalse.value; - set kCFBooleanFalse(CFBooleanRef value) => _kCFBooleanFalse.value = value; - int CFBooleanGetTypeID() { return _CFBooleanGetTypeID(); } @@ -27017,24 +27595,16 @@ class NativeCupertinoHttp { CFNumberRef get kCFNumberPositiveInfinity => _kCFNumberPositiveInfinity.value; - set kCFNumberPositiveInfinity(CFNumberRef value) => - _kCFNumberPositiveInfinity.value = value; - late final ffi.Pointer _kCFNumberNegativeInfinity = _lookup('kCFNumberNegativeInfinity'); CFNumberRef get kCFNumberNegativeInfinity => _kCFNumberNegativeInfinity.value; - set kCFNumberNegativeInfinity(CFNumberRef value) => - _kCFNumberNegativeInfinity.value = value; - late final ffi.Pointer _kCFNumberNaN = _lookup('kCFNumberNaN'); CFNumberRef get kCFNumberNaN => _kCFNumberNaN.value; - set kCFNumberNaN(CFNumberRef value) => _kCFNumberNaN.value = value; - int CFNumberGetTypeID() { return _CFNumberGetTypeID(); } @@ -27379,9 +27949,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterCurrencyCode => _kCFNumberFormatterCurrencyCode.value; - set kCFNumberFormatterCurrencyCode(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencyCode.value = value; - late final ffi.Pointer _kCFNumberFormatterDecimalSeparator = _lookup('kCFNumberFormatterDecimalSeparator'); @@ -27389,9 +27956,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterDecimalSeparator => _kCFNumberFormatterDecimalSeparator.value; - set kCFNumberFormatterDecimalSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterDecimalSeparator.value = value; - late final ffi.Pointer _kCFNumberFormatterCurrencyDecimalSeparator = _lookup( @@ -27400,9 +27964,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterCurrencyDecimalSeparator => _kCFNumberFormatterCurrencyDecimalSeparator.value; - set kCFNumberFormatterCurrencyDecimalSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencyDecimalSeparator.value = value; - late final ffi.Pointer _kCFNumberFormatterAlwaysShowDecimalSeparator = _lookup( @@ -27411,10 +27972,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterAlwaysShowDecimalSeparator => _kCFNumberFormatterAlwaysShowDecimalSeparator.value; - set kCFNumberFormatterAlwaysShowDecimalSeparator( - CFNumberFormatterKey value) => - _kCFNumberFormatterAlwaysShowDecimalSeparator.value = value; - late final ffi.Pointer _kCFNumberFormatterGroupingSeparator = _lookup('kCFNumberFormatterGroupingSeparator'); @@ -27422,9 +27979,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterGroupingSeparator => _kCFNumberFormatterGroupingSeparator.value; - set kCFNumberFormatterGroupingSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterGroupingSeparator.value = value; - late final ffi.Pointer _kCFNumberFormatterUseGroupingSeparator = _lookup('kCFNumberFormatterUseGroupingSeparator'); @@ -27432,9 +27986,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterUseGroupingSeparator => _kCFNumberFormatterUseGroupingSeparator.value; - set kCFNumberFormatterUseGroupingSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterUseGroupingSeparator.value = value; - late final ffi.Pointer _kCFNumberFormatterPercentSymbol = _lookup('kCFNumberFormatterPercentSymbol'); @@ -27442,27 +27993,18 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterPercentSymbol => _kCFNumberFormatterPercentSymbol.value; - set kCFNumberFormatterPercentSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterPercentSymbol.value = value; - late final ffi.Pointer _kCFNumberFormatterZeroSymbol = _lookup('kCFNumberFormatterZeroSymbol'); CFNumberFormatterKey get kCFNumberFormatterZeroSymbol => _kCFNumberFormatterZeroSymbol.value; - set kCFNumberFormatterZeroSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterZeroSymbol.value = value; - late final ffi.Pointer _kCFNumberFormatterNaNSymbol = _lookup('kCFNumberFormatterNaNSymbol'); CFNumberFormatterKey get kCFNumberFormatterNaNSymbol => _kCFNumberFormatterNaNSymbol.value; - set kCFNumberFormatterNaNSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterNaNSymbol.value = value; - late final ffi.Pointer _kCFNumberFormatterInfinitySymbol = _lookup('kCFNumberFormatterInfinitySymbol'); @@ -27470,27 +28012,18 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterInfinitySymbol => _kCFNumberFormatterInfinitySymbol.value; - set kCFNumberFormatterInfinitySymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterInfinitySymbol.value = value; - late final ffi.Pointer _kCFNumberFormatterMinusSign = _lookup('kCFNumberFormatterMinusSign'); CFNumberFormatterKey get kCFNumberFormatterMinusSign => _kCFNumberFormatterMinusSign.value; - set kCFNumberFormatterMinusSign(CFNumberFormatterKey value) => - _kCFNumberFormatterMinusSign.value = value; - late final ffi.Pointer _kCFNumberFormatterPlusSign = _lookup('kCFNumberFormatterPlusSign'); CFNumberFormatterKey get kCFNumberFormatterPlusSign => _kCFNumberFormatterPlusSign.value; - set kCFNumberFormatterPlusSign(CFNumberFormatterKey value) => - _kCFNumberFormatterPlusSign.value = value; - late final ffi.Pointer _kCFNumberFormatterCurrencySymbol = _lookup('kCFNumberFormatterCurrencySymbol'); @@ -27498,9 +28031,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterCurrencySymbol => _kCFNumberFormatterCurrencySymbol.value; - set kCFNumberFormatterCurrencySymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencySymbol.value = value; - late final ffi.Pointer _kCFNumberFormatterExponentSymbol = _lookup('kCFNumberFormatterExponentSymbol'); @@ -27508,9 +28038,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterExponentSymbol => _kCFNumberFormatterExponentSymbol.value; - set kCFNumberFormatterExponentSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterExponentSymbol.value = value; - late final ffi.Pointer _kCFNumberFormatterMinIntegerDigits = _lookup('kCFNumberFormatterMinIntegerDigits'); @@ -27518,9 +28045,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterMinIntegerDigits => _kCFNumberFormatterMinIntegerDigits.value; - set kCFNumberFormatterMinIntegerDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMinIntegerDigits.value = value; - late final ffi.Pointer _kCFNumberFormatterMaxIntegerDigits = _lookup('kCFNumberFormatterMaxIntegerDigits'); @@ -27528,9 +28052,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterMaxIntegerDigits => _kCFNumberFormatterMaxIntegerDigits.value; - set kCFNumberFormatterMaxIntegerDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMaxIntegerDigits.value = value; - late final ffi.Pointer _kCFNumberFormatterMinFractionDigits = _lookup('kCFNumberFormatterMinFractionDigits'); @@ -27538,9 +28059,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterMinFractionDigits => _kCFNumberFormatterMinFractionDigits.value; - set kCFNumberFormatterMinFractionDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMinFractionDigits.value = value; - late final ffi.Pointer _kCFNumberFormatterMaxFractionDigits = _lookup('kCFNumberFormatterMaxFractionDigits'); @@ -27548,18 +28066,12 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterMaxFractionDigits => _kCFNumberFormatterMaxFractionDigits.value; - set kCFNumberFormatterMaxFractionDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMaxFractionDigits.value = value; - late final ffi.Pointer _kCFNumberFormatterGroupingSize = _lookup('kCFNumberFormatterGroupingSize'); CFNumberFormatterKey get kCFNumberFormatterGroupingSize => _kCFNumberFormatterGroupingSize.value; - set kCFNumberFormatterGroupingSize(CFNumberFormatterKey value) => - _kCFNumberFormatterGroupingSize.value = value; - late final ffi.Pointer _kCFNumberFormatterSecondaryGroupingSize = _lookup('kCFNumberFormatterSecondaryGroupingSize'); @@ -27567,18 +28079,12 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterSecondaryGroupingSize => _kCFNumberFormatterSecondaryGroupingSize.value; - set kCFNumberFormatterSecondaryGroupingSize(CFNumberFormatterKey value) => - _kCFNumberFormatterSecondaryGroupingSize.value = value; - late final ffi.Pointer _kCFNumberFormatterRoundingMode = _lookup('kCFNumberFormatterRoundingMode'); CFNumberFormatterKey get kCFNumberFormatterRoundingMode => _kCFNumberFormatterRoundingMode.value; - set kCFNumberFormatterRoundingMode(CFNumberFormatterKey value) => - _kCFNumberFormatterRoundingMode.value = value; - late final ffi.Pointer _kCFNumberFormatterRoundingIncrement = _lookup('kCFNumberFormatterRoundingIncrement'); @@ -27586,18 +28092,12 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterRoundingIncrement => _kCFNumberFormatterRoundingIncrement.value; - set kCFNumberFormatterRoundingIncrement(CFNumberFormatterKey value) => - _kCFNumberFormatterRoundingIncrement.value = value; - late final ffi.Pointer _kCFNumberFormatterFormatWidth = _lookup('kCFNumberFormatterFormatWidth'); CFNumberFormatterKey get kCFNumberFormatterFormatWidth => _kCFNumberFormatterFormatWidth.value; - set kCFNumberFormatterFormatWidth(CFNumberFormatterKey value) => - _kCFNumberFormatterFormatWidth.value = value; - late final ffi.Pointer _kCFNumberFormatterPaddingPosition = _lookup('kCFNumberFormatterPaddingPosition'); @@ -27605,9 +28105,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterPaddingPosition => _kCFNumberFormatterPaddingPosition.value; - set kCFNumberFormatterPaddingPosition(CFNumberFormatterKey value) => - _kCFNumberFormatterPaddingPosition.value = value; - late final ffi.Pointer _kCFNumberFormatterPaddingCharacter = _lookup('kCFNumberFormatterPaddingCharacter'); @@ -27615,9 +28112,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterPaddingCharacter => _kCFNumberFormatterPaddingCharacter.value; - set kCFNumberFormatterPaddingCharacter(CFNumberFormatterKey value) => - _kCFNumberFormatterPaddingCharacter.value = value; - late final ffi.Pointer _kCFNumberFormatterDefaultFormat = _lookup('kCFNumberFormatterDefaultFormat'); @@ -27625,18 +28119,12 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterDefaultFormat => _kCFNumberFormatterDefaultFormat.value; - set kCFNumberFormatterDefaultFormat(CFNumberFormatterKey value) => - _kCFNumberFormatterDefaultFormat.value = value; - late final ffi.Pointer _kCFNumberFormatterMultiplier = _lookup('kCFNumberFormatterMultiplier'); CFNumberFormatterKey get kCFNumberFormatterMultiplier => _kCFNumberFormatterMultiplier.value; - set kCFNumberFormatterMultiplier(CFNumberFormatterKey value) => - _kCFNumberFormatterMultiplier.value = value; - late final ffi.Pointer _kCFNumberFormatterPositivePrefix = _lookup('kCFNumberFormatterPositivePrefix'); @@ -27644,9 +28132,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterPositivePrefix => _kCFNumberFormatterPositivePrefix.value; - set kCFNumberFormatterPositivePrefix(CFNumberFormatterKey value) => - _kCFNumberFormatterPositivePrefix.value = value; - late final ffi.Pointer _kCFNumberFormatterPositiveSuffix = _lookup('kCFNumberFormatterPositiveSuffix'); @@ -27654,9 +28139,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterPositiveSuffix => _kCFNumberFormatterPositiveSuffix.value; - set kCFNumberFormatterPositiveSuffix(CFNumberFormatterKey value) => - _kCFNumberFormatterPositiveSuffix.value = value; - late final ffi.Pointer _kCFNumberFormatterNegativePrefix = _lookup('kCFNumberFormatterNegativePrefix'); @@ -27664,9 +28146,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterNegativePrefix => _kCFNumberFormatterNegativePrefix.value; - set kCFNumberFormatterNegativePrefix(CFNumberFormatterKey value) => - _kCFNumberFormatterNegativePrefix.value = value; - late final ffi.Pointer _kCFNumberFormatterNegativeSuffix = _lookup('kCFNumberFormatterNegativeSuffix'); @@ -27674,9 +28153,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterNegativeSuffix => _kCFNumberFormatterNegativeSuffix.value; - set kCFNumberFormatterNegativeSuffix(CFNumberFormatterKey value) => - _kCFNumberFormatterNegativeSuffix.value = value; - late final ffi.Pointer _kCFNumberFormatterPerMillSymbol = _lookup('kCFNumberFormatterPerMillSymbol'); @@ -27684,9 +28160,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterPerMillSymbol => _kCFNumberFormatterPerMillSymbol.value; - set kCFNumberFormatterPerMillSymbol(CFNumberFormatterKey value) => - _kCFNumberFormatterPerMillSymbol.value = value; - late final ffi.Pointer _kCFNumberFormatterInternationalCurrencySymbol = _lookup( @@ -27695,10 +28168,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterInternationalCurrencySymbol => _kCFNumberFormatterInternationalCurrencySymbol.value; - set kCFNumberFormatterInternationalCurrencySymbol( - CFNumberFormatterKey value) => - _kCFNumberFormatterInternationalCurrencySymbol.value = value; - late final ffi.Pointer _kCFNumberFormatterCurrencyGroupingSeparator = _lookup( @@ -27707,18 +28176,12 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterCurrencyGroupingSeparator => _kCFNumberFormatterCurrencyGroupingSeparator.value; - set kCFNumberFormatterCurrencyGroupingSeparator(CFNumberFormatterKey value) => - _kCFNumberFormatterCurrencyGroupingSeparator.value = value; - late final ffi.Pointer _kCFNumberFormatterIsLenient = _lookup('kCFNumberFormatterIsLenient'); CFNumberFormatterKey get kCFNumberFormatterIsLenient => _kCFNumberFormatterIsLenient.value; - set kCFNumberFormatterIsLenient(CFNumberFormatterKey value) => - _kCFNumberFormatterIsLenient.value = value; - late final ffi.Pointer _kCFNumberFormatterUseSignificantDigits = _lookup('kCFNumberFormatterUseSignificantDigits'); @@ -27726,9 +28189,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterUseSignificantDigits => _kCFNumberFormatterUseSignificantDigits.value; - set kCFNumberFormatterUseSignificantDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterUseSignificantDigits.value = value; - late final ffi.Pointer _kCFNumberFormatterMinSignificantDigits = _lookup('kCFNumberFormatterMinSignificantDigits'); @@ -27736,9 +28196,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterMinSignificantDigits => _kCFNumberFormatterMinSignificantDigits.value; - set kCFNumberFormatterMinSignificantDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMinSignificantDigits.value = value; - late final ffi.Pointer _kCFNumberFormatterMaxSignificantDigits = _lookup('kCFNumberFormatterMaxSignificantDigits'); @@ -27746,9 +28203,6 @@ class NativeCupertinoHttp { CFNumberFormatterKey get kCFNumberFormatterMaxSignificantDigits => _kCFNumberFormatterMaxSignificantDigits.value; - set kCFNumberFormatterMaxSignificantDigits(CFNumberFormatterKey value) => - _kCFNumberFormatterMaxSignificantDigits.value = value; - int CFNumberFormatterGetDecimalInfoForCurrencyCode( CFStringRef currencyCode, ffi.Pointer defaultFractionDigits, @@ -28989,9 +29443,6 @@ class NativeCupertinoHttp { CFStringRef get kCFURLKeysOfUnsetValuesKey => _kCFURLKeysOfUnsetValuesKey.value; - set kCFURLKeysOfUnsetValuesKey(CFStringRef value) => - _kCFURLKeysOfUnsetValuesKey.value = value; - void CFURLClearResourcePropertyCacheForKey( CFURLRef url, CFStringRef key, @@ -29065,560 +29516,366 @@ class NativeCupertinoHttp { CFStringRef get kCFURLNameKey => _kCFURLNameKey.value; - set kCFURLNameKey(CFStringRef value) => _kCFURLNameKey.value = value; - late final ffi.Pointer _kCFURLLocalizedNameKey = _lookup('kCFURLLocalizedNameKey'); CFStringRef get kCFURLLocalizedNameKey => _kCFURLLocalizedNameKey.value; - set kCFURLLocalizedNameKey(CFStringRef value) => - _kCFURLLocalizedNameKey.value = value; - late final ffi.Pointer _kCFURLIsRegularFileKey = _lookup('kCFURLIsRegularFileKey'); CFStringRef get kCFURLIsRegularFileKey => _kCFURLIsRegularFileKey.value; - set kCFURLIsRegularFileKey(CFStringRef value) => - _kCFURLIsRegularFileKey.value = value; - late final ffi.Pointer _kCFURLIsDirectoryKey = _lookup('kCFURLIsDirectoryKey'); CFStringRef get kCFURLIsDirectoryKey => _kCFURLIsDirectoryKey.value; - set kCFURLIsDirectoryKey(CFStringRef value) => - _kCFURLIsDirectoryKey.value = value; - late final ffi.Pointer _kCFURLIsSymbolicLinkKey = _lookup('kCFURLIsSymbolicLinkKey'); CFStringRef get kCFURLIsSymbolicLinkKey => _kCFURLIsSymbolicLinkKey.value; - set kCFURLIsSymbolicLinkKey(CFStringRef value) => - _kCFURLIsSymbolicLinkKey.value = value; - late final ffi.Pointer _kCFURLIsVolumeKey = _lookup('kCFURLIsVolumeKey'); CFStringRef get kCFURLIsVolumeKey => _kCFURLIsVolumeKey.value; - set kCFURLIsVolumeKey(CFStringRef value) => _kCFURLIsVolumeKey.value = value; - late final ffi.Pointer _kCFURLIsPackageKey = _lookup('kCFURLIsPackageKey'); CFStringRef get kCFURLIsPackageKey => _kCFURLIsPackageKey.value; - set kCFURLIsPackageKey(CFStringRef value) => - _kCFURLIsPackageKey.value = value; - late final ffi.Pointer _kCFURLIsApplicationKey = _lookup('kCFURLIsApplicationKey'); CFStringRef get kCFURLIsApplicationKey => _kCFURLIsApplicationKey.value; - set kCFURLIsApplicationKey(CFStringRef value) => - _kCFURLIsApplicationKey.value = value; - late final ffi.Pointer _kCFURLApplicationIsScriptableKey = _lookup('kCFURLApplicationIsScriptableKey'); CFStringRef get kCFURLApplicationIsScriptableKey => _kCFURLApplicationIsScriptableKey.value; - set kCFURLApplicationIsScriptableKey(CFStringRef value) => - _kCFURLApplicationIsScriptableKey.value = value; - late final ffi.Pointer _kCFURLIsSystemImmutableKey = _lookup('kCFURLIsSystemImmutableKey'); CFStringRef get kCFURLIsSystemImmutableKey => _kCFURLIsSystemImmutableKey.value; - set kCFURLIsSystemImmutableKey(CFStringRef value) => - _kCFURLIsSystemImmutableKey.value = value; - late final ffi.Pointer _kCFURLIsUserImmutableKey = _lookup('kCFURLIsUserImmutableKey'); CFStringRef get kCFURLIsUserImmutableKey => _kCFURLIsUserImmutableKey.value; - set kCFURLIsUserImmutableKey(CFStringRef value) => - _kCFURLIsUserImmutableKey.value = value; - late final ffi.Pointer _kCFURLIsHiddenKey = _lookup('kCFURLIsHiddenKey'); CFStringRef get kCFURLIsHiddenKey => _kCFURLIsHiddenKey.value; - set kCFURLIsHiddenKey(CFStringRef value) => _kCFURLIsHiddenKey.value = value; - late final ffi.Pointer _kCFURLHasHiddenExtensionKey = _lookup('kCFURLHasHiddenExtensionKey'); CFStringRef get kCFURLHasHiddenExtensionKey => _kCFURLHasHiddenExtensionKey.value; - set kCFURLHasHiddenExtensionKey(CFStringRef value) => - _kCFURLHasHiddenExtensionKey.value = value; - late final ffi.Pointer _kCFURLCreationDateKey = _lookup('kCFURLCreationDateKey'); CFStringRef get kCFURLCreationDateKey => _kCFURLCreationDateKey.value; - set kCFURLCreationDateKey(CFStringRef value) => - _kCFURLCreationDateKey.value = value; - late final ffi.Pointer _kCFURLContentAccessDateKey = _lookup('kCFURLContentAccessDateKey'); CFStringRef get kCFURLContentAccessDateKey => _kCFURLContentAccessDateKey.value; - set kCFURLContentAccessDateKey(CFStringRef value) => - _kCFURLContentAccessDateKey.value = value; - late final ffi.Pointer _kCFURLContentModificationDateKey = _lookup('kCFURLContentModificationDateKey'); CFStringRef get kCFURLContentModificationDateKey => _kCFURLContentModificationDateKey.value; - set kCFURLContentModificationDateKey(CFStringRef value) => - _kCFURLContentModificationDateKey.value = value; - late final ffi.Pointer _kCFURLAttributeModificationDateKey = _lookup('kCFURLAttributeModificationDateKey'); CFStringRef get kCFURLAttributeModificationDateKey => _kCFURLAttributeModificationDateKey.value; - set kCFURLAttributeModificationDateKey(CFStringRef value) => - _kCFURLAttributeModificationDateKey.value = value; - late final ffi.Pointer _kCFURLFileIdentifierKey = _lookup('kCFURLFileIdentifierKey'); CFStringRef get kCFURLFileIdentifierKey => _kCFURLFileIdentifierKey.value; - set kCFURLFileIdentifierKey(CFStringRef value) => - _kCFURLFileIdentifierKey.value = value; - late final ffi.Pointer _kCFURLFileContentIdentifierKey = _lookup('kCFURLFileContentIdentifierKey'); CFStringRef get kCFURLFileContentIdentifierKey => _kCFURLFileContentIdentifierKey.value; - set kCFURLFileContentIdentifierKey(CFStringRef value) => - _kCFURLFileContentIdentifierKey.value = value; - late final ffi.Pointer _kCFURLMayShareFileContentKey = _lookup('kCFURLMayShareFileContentKey'); CFStringRef get kCFURLMayShareFileContentKey => _kCFURLMayShareFileContentKey.value; - set kCFURLMayShareFileContentKey(CFStringRef value) => - _kCFURLMayShareFileContentKey.value = value; - late final ffi.Pointer _kCFURLMayHaveExtendedAttributesKey = _lookup('kCFURLMayHaveExtendedAttributesKey'); CFStringRef get kCFURLMayHaveExtendedAttributesKey => _kCFURLMayHaveExtendedAttributesKey.value; - set kCFURLMayHaveExtendedAttributesKey(CFStringRef value) => - _kCFURLMayHaveExtendedAttributesKey.value = value; - late final ffi.Pointer _kCFURLIsPurgeableKey = _lookup('kCFURLIsPurgeableKey'); CFStringRef get kCFURLIsPurgeableKey => _kCFURLIsPurgeableKey.value; - set kCFURLIsPurgeableKey(CFStringRef value) => - _kCFURLIsPurgeableKey.value = value; - late final ffi.Pointer _kCFURLIsSparseKey = _lookup('kCFURLIsSparseKey'); CFStringRef get kCFURLIsSparseKey => _kCFURLIsSparseKey.value; - set kCFURLIsSparseKey(CFStringRef value) => _kCFURLIsSparseKey.value = value; - late final ffi.Pointer _kCFURLLinkCountKey = _lookup('kCFURLLinkCountKey'); CFStringRef get kCFURLLinkCountKey => _kCFURLLinkCountKey.value; - set kCFURLLinkCountKey(CFStringRef value) => - _kCFURLLinkCountKey.value = value; - late final ffi.Pointer _kCFURLParentDirectoryURLKey = _lookup('kCFURLParentDirectoryURLKey'); CFStringRef get kCFURLParentDirectoryURLKey => _kCFURLParentDirectoryURLKey.value; - set kCFURLParentDirectoryURLKey(CFStringRef value) => - _kCFURLParentDirectoryURLKey.value = value; - late final ffi.Pointer _kCFURLVolumeURLKey = _lookup('kCFURLVolumeURLKey'); CFStringRef get kCFURLVolumeURLKey => _kCFURLVolumeURLKey.value; - set kCFURLVolumeURLKey(CFStringRef value) => - _kCFURLVolumeURLKey.value = value; - late final ffi.Pointer _kCFURLTypeIdentifierKey = _lookup('kCFURLTypeIdentifierKey'); CFStringRef get kCFURLTypeIdentifierKey => _kCFURLTypeIdentifierKey.value; - set kCFURLTypeIdentifierKey(CFStringRef value) => - _kCFURLTypeIdentifierKey.value = value; - late final ffi.Pointer _kCFURLLocalizedTypeDescriptionKey = _lookup('kCFURLLocalizedTypeDescriptionKey'); CFStringRef get kCFURLLocalizedTypeDescriptionKey => _kCFURLLocalizedTypeDescriptionKey.value; - set kCFURLLocalizedTypeDescriptionKey(CFStringRef value) => - _kCFURLLocalizedTypeDescriptionKey.value = value; - late final ffi.Pointer _kCFURLLabelNumberKey = _lookup('kCFURLLabelNumberKey'); CFStringRef get kCFURLLabelNumberKey => _kCFURLLabelNumberKey.value; - set kCFURLLabelNumberKey(CFStringRef value) => - _kCFURLLabelNumberKey.value = value; - late final ffi.Pointer _kCFURLLabelColorKey = _lookup('kCFURLLabelColorKey'); CFStringRef get kCFURLLabelColorKey => _kCFURLLabelColorKey.value; - set kCFURLLabelColorKey(CFStringRef value) => - _kCFURLLabelColorKey.value = value; - late final ffi.Pointer _kCFURLLocalizedLabelKey = _lookup('kCFURLLocalizedLabelKey'); CFStringRef get kCFURLLocalizedLabelKey => _kCFURLLocalizedLabelKey.value; - set kCFURLLocalizedLabelKey(CFStringRef value) => - _kCFURLLocalizedLabelKey.value = value; - late final ffi.Pointer _kCFURLEffectiveIconKey = _lookup('kCFURLEffectiveIconKey'); CFStringRef get kCFURLEffectiveIconKey => _kCFURLEffectiveIconKey.value; - set kCFURLEffectiveIconKey(CFStringRef value) => - _kCFURLEffectiveIconKey.value = value; - late final ffi.Pointer _kCFURLCustomIconKey = _lookup('kCFURLCustomIconKey'); CFStringRef get kCFURLCustomIconKey => _kCFURLCustomIconKey.value; - set kCFURLCustomIconKey(CFStringRef value) => - _kCFURLCustomIconKey.value = value; - late final ffi.Pointer _kCFURLFileResourceIdentifierKey = _lookup('kCFURLFileResourceIdentifierKey'); CFStringRef get kCFURLFileResourceIdentifierKey => _kCFURLFileResourceIdentifierKey.value; - set kCFURLFileResourceIdentifierKey(CFStringRef value) => - _kCFURLFileResourceIdentifierKey.value = value; - late final ffi.Pointer _kCFURLVolumeIdentifierKey = _lookup('kCFURLVolumeIdentifierKey'); CFStringRef get kCFURLVolumeIdentifierKey => _kCFURLVolumeIdentifierKey.value; - set kCFURLVolumeIdentifierKey(CFStringRef value) => - _kCFURLVolumeIdentifierKey.value = value; - late final ffi.Pointer _kCFURLPreferredIOBlockSizeKey = _lookup('kCFURLPreferredIOBlockSizeKey'); CFStringRef get kCFURLPreferredIOBlockSizeKey => _kCFURLPreferredIOBlockSizeKey.value; - set kCFURLPreferredIOBlockSizeKey(CFStringRef value) => - _kCFURLPreferredIOBlockSizeKey.value = value; - late final ffi.Pointer _kCFURLIsReadableKey = _lookup('kCFURLIsReadableKey'); CFStringRef get kCFURLIsReadableKey => _kCFURLIsReadableKey.value; - set kCFURLIsReadableKey(CFStringRef value) => - _kCFURLIsReadableKey.value = value; - late final ffi.Pointer _kCFURLIsWritableKey = _lookup('kCFURLIsWritableKey'); CFStringRef get kCFURLIsWritableKey => _kCFURLIsWritableKey.value; - set kCFURLIsWritableKey(CFStringRef value) => - _kCFURLIsWritableKey.value = value; - late final ffi.Pointer _kCFURLIsExecutableKey = _lookup('kCFURLIsExecutableKey'); CFStringRef get kCFURLIsExecutableKey => _kCFURLIsExecutableKey.value; - set kCFURLIsExecutableKey(CFStringRef value) => - _kCFURLIsExecutableKey.value = value; - late final ffi.Pointer _kCFURLFileSecurityKey = _lookup('kCFURLFileSecurityKey'); CFStringRef get kCFURLFileSecurityKey => _kCFURLFileSecurityKey.value; - set kCFURLFileSecurityKey(CFStringRef value) => - _kCFURLFileSecurityKey.value = value; - late final ffi.Pointer _kCFURLIsExcludedFromBackupKey = _lookup('kCFURLIsExcludedFromBackupKey'); CFStringRef get kCFURLIsExcludedFromBackupKey => _kCFURLIsExcludedFromBackupKey.value; - set kCFURLIsExcludedFromBackupKey(CFStringRef value) => - _kCFURLIsExcludedFromBackupKey.value = value; - late final ffi.Pointer _kCFURLTagNamesKey = _lookup('kCFURLTagNamesKey'); CFStringRef get kCFURLTagNamesKey => _kCFURLTagNamesKey.value; - set kCFURLTagNamesKey(CFStringRef value) => _kCFURLTagNamesKey.value = value; - late final ffi.Pointer _kCFURLPathKey = _lookup('kCFURLPathKey'); CFStringRef get kCFURLPathKey => _kCFURLPathKey.value; - set kCFURLPathKey(CFStringRef value) => _kCFURLPathKey.value = value; - late final ffi.Pointer _kCFURLCanonicalPathKey = _lookup('kCFURLCanonicalPathKey'); CFStringRef get kCFURLCanonicalPathKey => _kCFURLCanonicalPathKey.value; - set kCFURLCanonicalPathKey(CFStringRef value) => - _kCFURLCanonicalPathKey.value = value; - late final ffi.Pointer _kCFURLIsMountTriggerKey = _lookup('kCFURLIsMountTriggerKey'); CFStringRef get kCFURLIsMountTriggerKey => _kCFURLIsMountTriggerKey.value; - set kCFURLIsMountTriggerKey(CFStringRef value) => - _kCFURLIsMountTriggerKey.value = value; - late final ffi.Pointer _kCFURLGenerationIdentifierKey = _lookup('kCFURLGenerationIdentifierKey'); CFStringRef get kCFURLGenerationIdentifierKey => _kCFURLGenerationIdentifierKey.value; - set kCFURLGenerationIdentifierKey(CFStringRef value) => - _kCFURLGenerationIdentifierKey.value = value; - late final ffi.Pointer _kCFURLDocumentIdentifierKey = _lookup('kCFURLDocumentIdentifierKey'); CFStringRef get kCFURLDocumentIdentifierKey => _kCFURLDocumentIdentifierKey.value; - set kCFURLDocumentIdentifierKey(CFStringRef value) => - _kCFURLDocumentIdentifierKey.value = value; - late final ffi.Pointer _kCFURLAddedToDirectoryDateKey = _lookup('kCFURLAddedToDirectoryDateKey'); CFStringRef get kCFURLAddedToDirectoryDateKey => _kCFURLAddedToDirectoryDateKey.value; - set kCFURLAddedToDirectoryDateKey(CFStringRef value) => - _kCFURLAddedToDirectoryDateKey.value = value; - late final ffi.Pointer _kCFURLQuarantinePropertiesKey = _lookup('kCFURLQuarantinePropertiesKey'); CFStringRef get kCFURLQuarantinePropertiesKey => _kCFURLQuarantinePropertiesKey.value; - set kCFURLQuarantinePropertiesKey(CFStringRef value) => - _kCFURLQuarantinePropertiesKey.value = value; - late final ffi.Pointer _kCFURLFileResourceTypeKey = _lookup('kCFURLFileResourceTypeKey'); CFStringRef get kCFURLFileResourceTypeKey => _kCFURLFileResourceTypeKey.value; - set kCFURLFileResourceTypeKey(CFStringRef value) => - _kCFURLFileResourceTypeKey.value = value; - late final ffi.Pointer _kCFURLFileResourceTypeNamedPipe = _lookup('kCFURLFileResourceTypeNamedPipe'); CFStringRef get kCFURLFileResourceTypeNamedPipe => _kCFURLFileResourceTypeNamedPipe.value; - set kCFURLFileResourceTypeNamedPipe(CFStringRef value) => - _kCFURLFileResourceTypeNamedPipe.value = value; - late final ffi.Pointer _kCFURLFileResourceTypeCharacterSpecial = _lookup('kCFURLFileResourceTypeCharacterSpecial'); CFStringRef get kCFURLFileResourceTypeCharacterSpecial => _kCFURLFileResourceTypeCharacterSpecial.value; - set kCFURLFileResourceTypeCharacterSpecial(CFStringRef value) => - _kCFURLFileResourceTypeCharacterSpecial.value = value; - late final ffi.Pointer _kCFURLFileResourceTypeDirectory = _lookup('kCFURLFileResourceTypeDirectory'); CFStringRef get kCFURLFileResourceTypeDirectory => _kCFURLFileResourceTypeDirectory.value; - set kCFURLFileResourceTypeDirectory(CFStringRef value) => - _kCFURLFileResourceTypeDirectory.value = value; - late final ffi.Pointer _kCFURLFileResourceTypeBlockSpecial = _lookup('kCFURLFileResourceTypeBlockSpecial'); CFStringRef get kCFURLFileResourceTypeBlockSpecial => _kCFURLFileResourceTypeBlockSpecial.value; - set kCFURLFileResourceTypeBlockSpecial(CFStringRef value) => - _kCFURLFileResourceTypeBlockSpecial.value = value; - late final ffi.Pointer _kCFURLFileResourceTypeRegular = _lookup('kCFURLFileResourceTypeRegular'); CFStringRef get kCFURLFileResourceTypeRegular => _kCFURLFileResourceTypeRegular.value; - set kCFURLFileResourceTypeRegular(CFStringRef value) => - _kCFURLFileResourceTypeRegular.value = value; - late final ffi.Pointer _kCFURLFileResourceTypeSymbolicLink = _lookup('kCFURLFileResourceTypeSymbolicLink'); CFStringRef get kCFURLFileResourceTypeSymbolicLink => _kCFURLFileResourceTypeSymbolicLink.value; - set kCFURLFileResourceTypeSymbolicLink(CFStringRef value) => - _kCFURLFileResourceTypeSymbolicLink.value = value; - late final ffi.Pointer _kCFURLFileResourceTypeSocket = _lookup('kCFURLFileResourceTypeSocket'); CFStringRef get kCFURLFileResourceTypeSocket => _kCFURLFileResourceTypeSocket.value; - set kCFURLFileResourceTypeSocket(CFStringRef value) => - _kCFURLFileResourceTypeSocket.value = value; - late final ffi.Pointer _kCFURLFileResourceTypeUnknown = _lookup('kCFURLFileResourceTypeUnknown'); CFStringRef get kCFURLFileResourceTypeUnknown => _kCFURLFileResourceTypeUnknown.value; - set kCFURLFileResourceTypeUnknown(CFStringRef value) => - _kCFURLFileResourceTypeUnknown.value = value; - late final ffi.Pointer _kCFURLFileSizeKey = _lookup('kCFURLFileSizeKey'); CFStringRef get kCFURLFileSizeKey => _kCFURLFileSizeKey.value; - set kCFURLFileSizeKey(CFStringRef value) => _kCFURLFileSizeKey.value = value; - late final ffi.Pointer _kCFURLFileAllocatedSizeKey = _lookup('kCFURLFileAllocatedSizeKey'); CFStringRef get kCFURLFileAllocatedSizeKey => _kCFURLFileAllocatedSizeKey.value; - set kCFURLFileAllocatedSizeKey(CFStringRef value) => - _kCFURLFileAllocatedSizeKey.value = value; - late final ffi.Pointer _kCFURLTotalFileSizeKey = _lookup('kCFURLTotalFileSizeKey'); CFStringRef get kCFURLTotalFileSizeKey => _kCFURLTotalFileSizeKey.value; - set kCFURLTotalFileSizeKey(CFStringRef value) => - _kCFURLTotalFileSizeKey.value = value; - late final ffi.Pointer _kCFURLTotalFileAllocatedSizeKey = _lookup('kCFURLTotalFileAllocatedSizeKey'); CFStringRef get kCFURLTotalFileAllocatedSizeKey => _kCFURLTotalFileAllocatedSizeKey.value; - set kCFURLTotalFileAllocatedSizeKey(CFStringRef value) => - _kCFURLTotalFileAllocatedSizeKey.value = value; - late final ffi.Pointer _kCFURLIsAliasFileKey = _lookup('kCFURLIsAliasFileKey'); CFStringRef get kCFURLIsAliasFileKey => _kCFURLIsAliasFileKey.value; - set kCFURLIsAliasFileKey(CFStringRef value) => - _kCFURLIsAliasFileKey.value = value; - late final ffi.Pointer _kCFURLFileProtectionKey = _lookup('kCFURLFileProtectionKey'); CFStringRef get kCFURLFileProtectionKey => _kCFURLFileProtectionKey.value; - set kCFURLFileProtectionKey(CFStringRef value) => - _kCFURLFileProtectionKey.value = value; - late final ffi.Pointer _kCFURLFileProtectionNone = _lookup('kCFURLFileProtectionNone'); CFStringRef get kCFURLFileProtectionNone => _kCFURLFileProtectionNone.value; - set kCFURLFileProtectionNone(CFStringRef value) => - _kCFURLFileProtectionNone.value = value; - late final ffi.Pointer _kCFURLFileProtectionComplete = _lookup('kCFURLFileProtectionComplete'); CFStringRef get kCFURLFileProtectionComplete => _kCFURLFileProtectionComplete.value; - set kCFURLFileProtectionComplete(CFStringRef value) => - _kCFURLFileProtectionComplete.value = value; - late final ffi.Pointer _kCFURLFileProtectionCompleteUnlessOpen = _lookup('kCFURLFileProtectionCompleteUnlessOpen'); CFStringRef get kCFURLFileProtectionCompleteUnlessOpen => _kCFURLFileProtectionCompleteUnlessOpen.value; - set kCFURLFileProtectionCompleteUnlessOpen(CFStringRef value) => - _kCFURLFileProtectionCompleteUnlessOpen.value = value; - late final ffi.Pointer _kCFURLFileProtectionCompleteUntilFirstUserAuthentication = _lookup( @@ -29627,9 +29884,18 @@ class NativeCupertinoHttp { CFStringRef get kCFURLFileProtectionCompleteUntilFirstUserAuthentication => _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value; - set kCFURLFileProtectionCompleteUntilFirstUserAuthentication( - CFStringRef value) => - _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; + late final ffi.Pointer + _kCFURLFileProtectionCompleteWhenUserInactive = + _lookup('kCFURLFileProtectionCompleteWhenUserInactive'); + + CFStringRef get kCFURLFileProtectionCompleteWhenUserInactive => + _kCFURLFileProtectionCompleteWhenUserInactive.value; + + late final ffi.Pointer _kCFURLDirectoryEntryCountKey = + _lookup('kCFURLDirectoryEntryCountKey'); + + CFStringRef get kCFURLDirectoryEntryCountKey => + _kCFURLDirectoryEntryCountKey.value; late final ffi.Pointer _kCFURLVolumeLocalizedFormatDescriptionKey = @@ -29638,27 +29904,18 @@ class NativeCupertinoHttp { CFStringRef get kCFURLVolumeLocalizedFormatDescriptionKey => _kCFURLVolumeLocalizedFormatDescriptionKey.value; - set kCFURLVolumeLocalizedFormatDescriptionKey(CFStringRef value) => - _kCFURLVolumeLocalizedFormatDescriptionKey.value = value; - late final ffi.Pointer _kCFURLVolumeTotalCapacityKey = _lookup('kCFURLVolumeTotalCapacityKey'); CFStringRef get kCFURLVolumeTotalCapacityKey => _kCFURLVolumeTotalCapacityKey.value; - set kCFURLVolumeTotalCapacityKey(CFStringRef value) => - _kCFURLVolumeTotalCapacityKey.value = value; - late final ffi.Pointer _kCFURLVolumeAvailableCapacityKey = _lookup('kCFURLVolumeAvailableCapacityKey'); CFStringRef get kCFURLVolumeAvailableCapacityKey => _kCFURLVolumeAvailableCapacityKey.value; - set kCFURLVolumeAvailableCapacityKey(CFStringRef value) => - _kCFURLVolumeAvailableCapacityKey.value = value; - late final ffi.Pointer _kCFURLVolumeAvailableCapacityForImportantUsageKey = _lookup('kCFURLVolumeAvailableCapacityForImportantUsageKey'); @@ -29666,9 +29923,6 @@ class NativeCupertinoHttp { CFStringRef get kCFURLVolumeAvailableCapacityForImportantUsageKey => _kCFURLVolumeAvailableCapacityForImportantUsageKey.value; - set kCFURLVolumeAvailableCapacityForImportantUsageKey(CFStringRef value) => - _kCFURLVolumeAvailableCapacityForImportantUsageKey.value = value; - late final ffi.Pointer _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey = _lookup( @@ -29677,82 +29931,54 @@ class NativeCupertinoHttp { CFStringRef get kCFURLVolumeAvailableCapacityForOpportunisticUsageKey => _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value; - set kCFURLVolumeAvailableCapacityForOpportunisticUsageKey( - CFStringRef value) => - _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; - late final ffi.Pointer _kCFURLVolumeResourceCountKey = _lookup('kCFURLVolumeResourceCountKey'); CFStringRef get kCFURLVolumeResourceCountKey => _kCFURLVolumeResourceCountKey.value; - set kCFURLVolumeResourceCountKey(CFStringRef value) => - _kCFURLVolumeResourceCountKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsPersistentIDsKey = _lookup('kCFURLVolumeSupportsPersistentIDsKey'); CFStringRef get kCFURLVolumeSupportsPersistentIDsKey => _kCFURLVolumeSupportsPersistentIDsKey.value; - set kCFURLVolumeSupportsPersistentIDsKey(CFStringRef value) => - _kCFURLVolumeSupportsPersistentIDsKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsSymbolicLinksKey = _lookup('kCFURLVolumeSupportsSymbolicLinksKey'); CFStringRef get kCFURLVolumeSupportsSymbolicLinksKey => _kCFURLVolumeSupportsSymbolicLinksKey.value; - set kCFURLVolumeSupportsSymbolicLinksKey(CFStringRef value) => - _kCFURLVolumeSupportsSymbolicLinksKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsHardLinksKey = _lookup('kCFURLVolumeSupportsHardLinksKey'); CFStringRef get kCFURLVolumeSupportsHardLinksKey => _kCFURLVolumeSupportsHardLinksKey.value; - set kCFURLVolumeSupportsHardLinksKey(CFStringRef value) => - _kCFURLVolumeSupportsHardLinksKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsJournalingKey = _lookup('kCFURLVolumeSupportsJournalingKey'); CFStringRef get kCFURLVolumeSupportsJournalingKey => _kCFURLVolumeSupportsJournalingKey.value; - set kCFURLVolumeSupportsJournalingKey(CFStringRef value) => - _kCFURLVolumeSupportsJournalingKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsJournalingKey = _lookup('kCFURLVolumeIsJournalingKey'); CFStringRef get kCFURLVolumeIsJournalingKey => _kCFURLVolumeIsJournalingKey.value; - set kCFURLVolumeIsJournalingKey(CFStringRef value) => - _kCFURLVolumeIsJournalingKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsSparseFilesKey = _lookup('kCFURLVolumeSupportsSparseFilesKey'); CFStringRef get kCFURLVolumeSupportsSparseFilesKey => _kCFURLVolumeSupportsSparseFilesKey.value; - set kCFURLVolumeSupportsSparseFilesKey(CFStringRef value) => - _kCFURLVolumeSupportsSparseFilesKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsZeroRunsKey = _lookup('kCFURLVolumeSupportsZeroRunsKey'); CFStringRef get kCFURLVolumeSupportsZeroRunsKey => _kCFURLVolumeSupportsZeroRunsKey.value; - set kCFURLVolumeSupportsZeroRunsKey(CFStringRef value) => - _kCFURLVolumeSupportsZeroRunsKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsCaseSensitiveNamesKey = _lookup('kCFURLVolumeSupportsCaseSensitiveNamesKey'); @@ -29760,9 +29986,6 @@ class NativeCupertinoHttp { CFStringRef get kCFURLVolumeSupportsCaseSensitiveNamesKey => _kCFURLVolumeSupportsCaseSensitiveNamesKey.value; - set kCFURLVolumeSupportsCaseSensitiveNamesKey(CFStringRef value) => - _kCFURLVolumeSupportsCaseSensitiveNamesKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsCasePreservedNamesKey = _lookup('kCFURLVolumeSupportsCasePreservedNamesKey'); @@ -29770,9 +29993,6 @@ class NativeCupertinoHttp { CFStringRef get kCFURLVolumeSupportsCasePreservedNamesKey => _kCFURLVolumeSupportsCasePreservedNamesKey.value; - set kCFURLVolumeSupportsCasePreservedNamesKey(CFStringRef value) => - _kCFURLVolumeSupportsCasePreservedNamesKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsRootDirectoryDatesKey = _lookup('kCFURLVolumeSupportsRootDirectoryDatesKey'); @@ -29780,27 +30000,18 @@ class NativeCupertinoHttp { CFStringRef get kCFURLVolumeSupportsRootDirectoryDatesKey => _kCFURLVolumeSupportsRootDirectoryDatesKey.value; - set kCFURLVolumeSupportsRootDirectoryDatesKey(CFStringRef value) => - _kCFURLVolumeSupportsRootDirectoryDatesKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsVolumeSizesKey = _lookup('kCFURLVolumeSupportsVolumeSizesKey'); CFStringRef get kCFURLVolumeSupportsVolumeSizesKey => _kCFURLVolumeSupportsVolumeSizesKey.value; - set kCFURLVolumeSupportsVolumeSizesKey(CFStringRef value) => - _kCFURLVolumeSupportsVolumeSizesKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsRenamingKey = _lookup('kCFURLVolumeSupportsRenamingKey'); CFStringRef get kCFURLVolumeSupportsRenamingKey => _kCFURLVolumeSupportsRenamingKey.value; - set kCFURLVolumeSupportsRenamingKey(CFStringRef value) => - _kCFURLVolumeSupportsRenamingKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsAdvisoryFileLockingKey = _lookup('kCFURLVolumeSupportsAdvisoryFileLockingKey'); @@ -29808,175 +30019,115 @@ class NativeCupertinoHttp { CFStringRef get kCFURLVolumeSupportsAdvisoryFileLockingKey => _kCFURLVolumeSupportsAdvisoryFileLockingKey.value; - set kCFURLVolumeSupportsAdvisoryFileLockingKey(CFStringRef value) => - _kCFURLVolumeSupportsAdvisoryFileLockingKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsExtendedSecurityKey = _lookup('kCFURLVolumeSupportsExtendedSecurityKey'); CFStringRef get kCFURLVolumeSupportsExtendedSecurityKey => _kCFURLVolumeSupportsExtendedSecurityKey.value; - set kCFURLVolumeSupportsExtendedSecurityKey(CFStringRef value) => - _kCFURLVolumeSupportsExtendedSecurityKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsBrowsableKey = _lookup('kCFURLVolumeIsBrowsableKey'); CFStringRef get kCFURLVolumeIsBrowsableKey => _kCFURLVolumeIsBrowsableKey.value; - set kCFURLVolumeIsBrowsableKey(CFStringRef value) => - _kCFURLVolumeIsBrowsableKey.value = value; - late final ffi.Pointer _kCFURLVolumeMaximumFileSizeKey = _lookup('kCFURLVolumeMaximumFileSizeKey'); CFStringRef get kCFURLVolumeMaximumFileSizeKey => _kCFURLVolumeMaximumFileSizeKey.value; - set kCFURLVolumeMaximumFileSizeKey(CFStringRef value) => - _kCFURLVolumeMaximumFileSizeKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsEjectableKey = _lookup('kCFURLVolumeIsEjectableKey'); CFStringRef get kCFURLVolumeIsEjectableKey => _kCFURLVolumeIsEjectableKey.value; - set kCFURLVolumeIsEjectableKey(CFStringRef value) => - _kCFURLVolumeIsEjectableKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsRemovableKey = _lookup('kCFURLVolumeIsRemovableKey'); CFStringRef get kCFURLVolumeIsRemovableKey => _kCFURLVolumeIsRemovableKey.value; - set kCFURLVolumeIsRemovableKey(CFStringRef value) => - _kCFURLVolumeIsRemovableKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsInternalKey = _lookup('kCFURLVolumeIsInternalKey'); CFStringRef get kCFURLVolumeIsInternalKey => _kCFURLVolumeIsInternalKey.value; - set kCFURLVolumeIsInternalKey(CFStringRef value) => - _kCFURLVolumeIsInternalKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsAutomountedKey = _lookup('kCFURLVolumeIsAutomountedKey'); CFStringRef get kCFURLVolumeIsAutomountedKey => _kCFURLVolumeIsAutomountedKey.value; - set kCFURLVolumeIsAutomountedKey(CFStringRef value) => - _kCFURLVolumeIsAutomountedKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsLocalKey = _lookup('kCFURLVolumeIsLocalKey'); CFStringRef get kCFURLVolumeIsLocalKey => _kCFURLVolumeIsLocalKey.value; - set kCFURLVolumeIsLocalKey(CFStringRef value) => - _kCFURLVolumeIsLocalKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsReadOnlyKey = _lookup('kCFURLVolumeIsReadOnlyKey'); CFStringRef get kCFURLVolumeIsReadOnlyKey => _kCFURLVolumeIsReadOnlyKey.value; - set kCFURLVolumeIsReadOnlyKey(CFStringRef value) => - _kCFURLVolumeIsReadOnlyKey.value = value; - late final ffi.Pointer _kCFURLVolumeCreationDateKey = _lookup('kCFURLVolumeCreationDateKey'); CFStringRef get kCFURLVolumeCreationDateKey => _kCFURLVolumeCreationDateKey.value; - set kCFURLVolumeCreationDateKey(CFStringRef value) => - _kCFURLVolumeCreationDateKey.value = value; - late final ffi.Pointer _kCFURLVolumeURLForRemountingKey = _lookup('kCFURLVolumeURLForRemountingKey'); CFStringRef get kCFURLVolumeURLForRemountingKey => _kCFURLVolumeURLForRemountingKey.value; - set kCFURLVolumeURLForRemountingKey(CFStringRef value) => - _kCFURLVolumeURLForRemountingKey.value = value; - late final ffi.Pointer _kCFURLVolumeUUIDStringKey = _lookup('kCFURLVolumeUUIDStringKey'); CFStringRef get kCFURLVolumeUUIDStringKey => _kCFURLVolumeUUIDStringKey.value; - set kCFURLVolumeUUIDStringKey(CFStringRef value) => - _kCFURLVolumeUUIDStringKey.value = value; - late final ffi.Pointer _kCFURLVolumeNameKey = _lookup('kCFURLVolumeNameKey'); CFStringRef get kCFURLVolumeNameKey => _kCFURLVolumeNameKey.value; - set kCFURLVolumeNameKey(CFStringRef value) => - _kCFURLVolumeNameKey.value = value; - late final ffi.Pointer _kCFURLVolumeLocalizedNameKey = _lookup('kCFURLVolumeLocalizedNameKey'); CFStringRef get kCFURLVolumeLocalizedNameKey => _kCFURLVolumeLocalizedNameKey.value; - set kCFURLVolumeLocalizedNameKey(CFStringRef value) => - _kCFURLVolumeLocalizedNameKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsEncryptedKey = _lookup('kCFURLVolumeIsEncryptedKey'); CFStringRef get kCFURLVolumeIsEncryptedKey => _kCFURLVolumeIsEncryptedKey.value; - set kCFURLVolumeIsEncryptedKey(CFStringRef value) => - _kCFURLVolumeIsEncryptedKey.value = value; - late final ffi.Pointer _kCFURLVolumeIsRootFileSystemKey = _lookup('kCFURLVolumeIsRootFileSystemKey'); CFStringRef get kCFURLVolumeIsRootFileSystemKey => _kCFURLVolumeIsRootFileSystemKey.value; - set kCFURLVolumeIsRootFileSystemKey(CFStringRef value) => - _kCFURLVolumeIsRootFileSystemKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsCompressionKey = _lookup('kCFURLVolumeSupportsCompressionKey'); CFStringRef get kCFURLVolumeSupportsCompressionKey => _kCFURLVolumeSupportsCompressionKey.value; - set kCFURLVolumeSupportsCompressionKey(CFStringRef value) => - _kCFURLVolumeSupportsCompressionKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsFileCloningKey = _lookup('kCFURLVolumeSupportsFileCloningKey'); CFStringRef get kCFURLVolumeSupportsFileCloningKey => _kCFURLVolumeSupportsFileCloningKey.value; - set kCFURLVolumeSupportsFileCloningKey(CFStringRef value) => - _kCFURLVolumeSupportsFileCloningKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsSwapRenamingKey = _lookup('kCFURLVolumeSupportsSwapRenamingKey'); CFStringRef get kCFURLVolumeSupportsSwapRenamingKey => _kCFURLVolumeSupportsSwapRenamingKey.value; - set kCFURLVolumeSupportsSwapRenamingKey(CFStringRef value) => - _kCFURLVolumeSupportsSwapRenamingKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsExclusiveRenamingKey = _lookup('kCFURLVolumeSupportsExclusiveRenamingKey'); @@ -29984,18 +30135,12 @@ class NativeCupertinoHttp { CFStringRef get kCFURLVolumeSupportsExclusiveRenamingKey => _kCFURLVolumeSupportsExclusiveRenamingKey.value; - set kCFURLVolumeSupportsExclusiveRenamingKey(CFStringRef value) => - _kCFURLVolumeSupportsExclusiveRenamingKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsImmutableFilesKey = _lookup('kCFURLVolumeSupportsImmutableFilesKey'); CFStringRef get kCFURLVolumeSupportsImmutableFilesKey => _kCFURLVolumeSupportsImmutableFilesKey.value; - set kCFURLVolumeSupportsImmutableFilesKey(CFStringRef value) => - _kCFURLVolumeSupportsImmutableFilesKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsAccessPermissionsKey = _lookup('kCFURLVolumeSupportsAccessPermissionsKey'); @@ -30003,51 +30148,33 @@ class NativeCupertinoHttp { CFStringRef get kCFURLVolumeSupportsAccessPermissionsKey => _kCFURLVolumeSupportsAccessPermissionsKey.value; - set kCFURLVolumeSupportsAccessPermissionsKey(CFStringRef value) => - _kCFURLVolumeSupportsAccessPermissionsKey.value = value; - late final ffi.Pointer _kCFURLVolumeSupportsFileProtectionKey = _lookup('kCFURLVolumeSupportsFileProtectionKey'); CFStringRef get kCFURLVolumeSupportsFileProtectionKey => _kCFURLVolumeSupportsFileProtectionKey.value; - set kCFURLVolumeSupportsFileProtectionKey(CFStringRef value) => - _kCFURLVolumeSupportsFileProtectionKey.value = value; - late final ffi.Pointer _kCFURLVolumeTypeNameKey = _lookup('kCFURLVolumeTypeNameKey'); CFStringRef get kCFURLVolumeTypeNameKey => _kCFURLVolumeTypeNameKey.value; - set kCFURLVolumeTypeNameKey(CFStringRef value) => - _kCFURLVolumeTypeNameKey.value = value; - late final ffi.Pointer _kCFURLVolumeSubtypeKey = _lookup('kCFURLVolumeSubtypeKey'); CFStringRef get kCFURLVolumeSubtypeKey => _kCFURLVolumeSubtypeKey.value; - set kCFURLVolumeSubtypeKey(CFStringRef value) => - _kCFURLVolumeSubtypeKey.value = value; - late final ffi.Pointer _kCFURLVolumeMountFromLocationKey = _lookup('kCFURLVolumeMountFromLocationKey'); CFStringRef get kCFURLVolumeMountFromLocationKey => _kCFURLVolumeMountFromLocationKey.value; - set kCFURLVolumeMountFromLocationKey(CFStringRef value) => - _kCFURLVolumeMountFromLocationKey.value = value; - late final ffi.Pointer _kCFURLIsUbiquitousItemKey = _lookup('kCFURLIsUbiquitousItemKey'); CFStringRef get kCFURLIsUbiquitousItemKey => _kCFURLIsUbiquitousItemKey.value; - set kCFURLIsUbiquitousItemKey(CFStringRef value) => - _kCFURLIsUbiquitousItemKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemHasUnresolvedConflictsKey = _lookup('kCFURLUbiquitousItemHasUnresolvedConflictsKey'); @@ -30055,45 +30182,30 @@ class NativeCupertinoHttp { CFStringRef get kCFURLUbiquitousItemHasUnresolvedConflictsKey => _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value; - set kCFURLUbiquitousItemHasUnresolvedConflictsKey(CFStringRef value) => - _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadedKey = _lookup('kCFURLUbiquitousItemIsDownloadedKey'); CFStringRef get kCFURLUbiquitousItemIsDownloadedKey => _kCFURLUbiquitousItemIsDownloadedKey.value; - set kCFURLUbiquitousItemIsDownloadedKey(CFStringRef value) => - _kCFURLUbiquitousItemIsDownloadedKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadingKey = _lookup('kCFURLUbiquitousItemIsDownloadingKey'); CFStringRef get kCFURLUbiquitousItemIsDownloadingKey => _kCFURLUbiquitousItemIsDownloadingKey.value; - set kCFURLUbiquitousItemIsDownloadingKey(CFStringRef value) => - _kCFURLUbiquitousItemIsDownloadingKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemIsUploadedKey = _lookup('kCFURLUbiquitousItemIsUploadedKey'); CFStringRef get kCFURLUbiquitousItemIsUploadedKey => _kCFURLUbiquitousItemIsUploadedKey.value; - set kCFURLUbiquitousItemIsUploadedKey(CFStringRef value) => - _kCFURLUbiquitousItemIsUploadedKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemIsUploadingKey = _lookup('kCFURLUbiquitousItemIsUploadingKey'); CFStringRef get kCFURLUbiquitousItemIsUploadingKey => _kCFURLUbiquitousItemIsUploadingKey.value; - set kCFURLUbiquitousItemIsUploadingKey(CFStringRef value) => - _kCFURLUbiquitousItemIsUploadingKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemPercentDownloadedKey = _lookup('kCFURLUbiquitousItemPercentDownloadedKey'); @@ -30101,18 +30213,12 @@ class NativeCupertinoHttp { CFStringRef get kCFURLUbiquitousItemPercentDownloadedKey => _kCFURLUbiquitousItemPercentDownloadedKey.value; - set kCFURLUbiquitousItemPercentDownloadedKey(CFStringRef value) => - _kCFURLUbiquitousItemPercentDownloadedKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemPercentUploadedKey = _lookup('kCFURLUbiquitousItemPercentUploadedKey'); CFStringRef get kCFURLUbiquitousItemPercentUploadedKey => _kCFURLUbiquitousItemPercentUploadedKey.value; - set kCFURLUbiquitousItemPercentUploadedKey(CFStringRef value) => - _kCFURLUbiquitousItemPercentUploadedKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemDownloadingStatusKey = _lookup('kCFURLUbiquitousItemDownloadingStatusKey'); @@ -30120,27 +30226,18 @@ class NativeCupertinoHttp { CFStringRef get kCFURLUbiquitousItemDownloadingStatusKey => _kCFURLUbiquitousItemDownloadingStatusKey.value; - set kCFURLUbiquitousItemDownloadingStatusKey(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemDownloadingErrorKey = _lookup('kCFURLUbiquitousItemDownloadingErrorKey'); CFStringRef get kCFURLUbiquitousItemDownloadingErrorKey => _kCFURLUbiquitousItemDownloadingErrorKey.value; - set kCFURLUbiquitousItemDownloadingErrorKey(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingErrorKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemUploadingErrorKey = _lookup('kCFURLUbiquitousItemUploadingErrorKey'); CFStringRef get kCFURLUbiquitousItemUploadingErrorKey => _kCFURLUbiquitousItemUploadingErrorKey.value; - set kCFURLUbiquitousItemUploadingErrorKey(CFStringRef value) => - _kCFURLUbiquitousItemUploadingErrorKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemIsExcludedFromSyncKey = _lookup('kCFURLUbiquitousItemIsExcludedFromSyncKey'); @@ -30148,9 +30245,6 @@ class NativeCupertinoHttp { CFStringRef get kCFURLUbiquitousItemIsExcludedFromSyncKey => _kCFURLUbiquitousItemIsExcludedFromSyncKey.value; - set kCFURLUbiquitousItemIsExcludedFromSyncKey(CFStringRef value) => - _kCFURLUbiquitousItemIsExcludedFromSyncKey.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemDownloadingStatusNotDownloaded = _lookup( @@ -30159,9 +30253,6 @@ class NativeCupertinoHttp { CFStringRef get kCFURLUbiquitousItemDownloadingStatusNotDownloaded => _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value; - set kCFURLUbiquitousItemDownloadingStatusNotDownloaded(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemDownloadingStatusDownloaded = _lookup('kCFURLUbiquitousItemDownloadingStatusDownloaded'); @@ -30169,9 +30260,6 @@ class NativeCupertinoHttp { CFStringRef get kCFURLUbiquitousItemDownloadingStatusDownloaded => _kCFURLUbiquitousItemDownloadingStatusDownloaded.value; - set kCFURLUbiquitousItemDownloadingStatusDownloaded(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusDownloaded.value = value; - late final ffi.Pointer _kCFURLUbiquitousItemDownloadingStatusCurrent = _lookup('kCFURLUbiquitousItemDownloadingStatusCurrent'); @@ -30179,9 +30267,6 @@ class NativeCupertinoHttp { CFStringRef get kCFURLUbiquitousItemDownloadingStatusCurrent => _kCFURLUbiquitousItemDownloadingStatusCurrent.value; - set kCFURLUbiquitousItemDownloadingStatusCurrent(CFStringRef value) => - _kCFURLUbiquitousItemDownloadingStatusCurrent.value = value; - CFDataRef CFURLCreateBookmarkData( CFAllocatorRef allocator, CFURLRef url, @@ -30381,17 +30466,11 @@ class NativeCupertinoHttp { CFRunLoopMode get kCFRunLoopDefaultMode => _kCFRunLoopDefaultMode.value; - set kCFRunLoopDefaultMode(CFRunLoopMode value) => - _kCFRunLoopDefaultMode.value = value; - late final ffi.Pointer _kCFRunLoopCommonModes = _lookup('kCFRunLoopCommonModes'); CFRunLoopMode get kCFRunLoopCommonModes => _kCFRunLoopCommonModes.value; - set kCFRunLoopCommonModes(CFRunLoopMode value) => - _kCFRunLoopCommonModes.value = value; - int CFRunLoopGetTypeID() { return _CFRunLoopGetTypeID(); } @@ -30553,12 +30632,12 @@ class NativeCupertinoHttp { void CFRunLoopPerformBlock( CFRunLoopRef rl, CFTypeRef mode, - ffi.Pointer<_ObjCBlock> block, + ObjCBlock_ffiVoid block, ) { return _CFRunLoopPerformBlock( rl, mode, - block, + block._id, ); } @@ -30891,17 +30970,17 @@ class NativeCupertinoHttp { CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler( CFAllocatorRef allocator, - int activities, - int repeats, - int order, - ffi.Pointer<_ObjCBlock> block, + DartCFOptionFlags activities, + DartBoolean repeats, + DartCFIndex order, + ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity block, ) { return _CFRunLoopObserverCreateWithHandler( allocator, activities, repeats, order, - block, + block._id, ); } @@ -31055,11 +31134,11 @@ class NativeCupertinoHttp { CFRunLoopTimerRef CFRunLoopTimerCreateWithHandler( CFAllocatorRef allocator, - double fireDate, - double interval, - int flags, - int order, - ffi.Pointer<_ObjCBlock> block, + DartCFTimeInterval fireDate, + DartCFTimeInterval interval, + DartCFOptionFlags flags, + DartCFIndex order, + ObjCBlock_ffiVoid_CFRunLoopTimerRef block, ) { return _CFRunLoopTimerCreateWithHandler( allocator, @@ -31067,7 +31146,7 @@ class NativeCupertinoHttp { interval, flags, order, - block, + block._id, ); } @@ -31749,54 +31828,36 @@ class NativeCupertinoHttp { CFStringRef get kCFSocketCommandKey => _kCFSocketCommandKey.value; - set kCFSocketCommandKey(CFStringRef value) => - _kCFSocketCommandKey.value = value; - late final ffi.Pointer _kCFSocketNameKey = _lookup('kCFSocketNameKey'); CFStringRef get kCFSocketNameKey => _kCFSocketNameKey.value; - set kCFSocketNameKey(CFStringRef value) => _kCFSocketNameKey.value = value; - late final ffi.Pointer _kCFSocketValueKey = _lookup('kCFSocketValueKey'); CFStringRef get kCFSocketValueKey => _kCFSocketValueKey.value; - set kCFSocketValueKey(CFStringRef value) => _kCFSocketValueKey.value = value; - late final ffi.Pointer _kCFSocketResultKey = _lookup('kCFSocketResultKey'); CFStringRef get kCFSocketResultKey => _kCFSocketResultKey.value; - set kCFSocketResultKey(CFStringRef value) => - _kCFSocketResultKey.value = value; - late final ffi.Pointer _kCFSocketErrorKey = _lookup('kCFSocketErrorKey'); CFStringRef get kCFSocketErrorKey => _kCFSocketErrorKey.value; - set kCFSocketErrorKey(CFStringRef value) => _kCFSocketErrorKey.value = value; - late final ffi.Pointer _kCFSocketRegisterCommand = _lookup('kCFSocketRegisterCommand'); CFStringRef get kCFSocketRegisterCommand => _kCFSocketRegisterCommand.value; - set kCFSocketRegisterCommand(CFStringRef value) => - _kCFSocketRegisterCommand.value = value; - late final ffi.Pointer _kCFSocketRetrieveCommand = _lookup('kCFSocketRetrieveCommand'); CFStringRef get kCFSocketRetrieveCommand => _kCFSocketRetrieveCommand.value; - set kCFSocketRetrieveCommand(CFStringRef value) => - _kCFSocketRetrieveCommand.value = value; - int getattrlistbulk( int arg0, ffi.Pointer arg1, @@ -32426,9 +32487,8 @@ class NativeCupertinoHttp { } late final _pathconfPtr = _lookup< - ffi - .NativeFunction, ffi.Int)>>( - 'pathconf'); + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, ffi.Int)>>('pathconf'); late final _pathconf = _pathconfPtr.asFunction, int)>(); @@ -32769,9 +32829,8 @@ class NativeCupertinoHttp { } late final _encryptPtr = _lookup< - ffi - .NativeFunction, ffi.Int)>>( - 'encrypt'); + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int)>>('encrypt'); late final _encrypt = _encryptPtr.asFunction, int)>(); @@ -33098,9 +33157,8 @@ class NativeCupertinoHttp { } late final _getlogin_rPtr = _lookup< - ffi - .NativeFunction, ffi.Size)>>( - 'getlogin_r'); + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size)>>('getlogin_r'); late final _getlogin_r = _getlogin_rPtr.asFunction, int)>(); @@ -33132,9 +33190,8 @@ class NativeCupertinoHttp { } late final _gethostnamePtr = _lookup< - ffi - .NativeFunction, ffi.Size)>>( - 'gethostname'); + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size)>>('gethostname'); late final _gethostname = _gethostnamePtr.asFunction, int)>(); @@ -34766,7 +34823,6 @@ class NativeCupertinoHttp { late final _filesec_unset_property = _filesec_unset_propertyPtr.asFunction(); - late final _class_OS_os_workgroup1 = _getClass1("OS_os_workgroup"); int os_workgroup_copy_port( os_workgroup_t wg, ffi.Pointer mach_port_out, @@ -34943,8 +34999,6 @@ class NativeCupertinoHttp { _os_workgroup_max_parallel_threadsPtr .asFunction(); - late final _class_OS_os_workgroup_interval1 = - _getClass1("OS_os_workgroup_interval"); int os_workgroup_interval_start( os_workgroup_interval_t wg, int start, @@ -35008,8 +35062,6 @@ class NativeCupertinoHttp { int Function( os_workgroup_interval_t, os_workgroup_interval_data_t)>(); - late final _class_OS_os_workgroup_parallel1 = - _getClass1("OS_os_workgroup_parallel"); os_workgroup_parallel_t os_workgroup_parallel_create( ffi.Pointer name, os_workgroup_attr_t attr, @@ -35237,12 +35289,12 @@ class NativeCupertinoHttp { void dispatch_notify( ffi.Pointer object, dispatch_object_t queue, - dispatch_block_t notification_block, + Dartdispatch_block_t notification_block, ) { return _dispatch_notify( object, queue, - notification_block, + notification_block._id, ); } @@ -35320,11 +35372,11 @@ class NativeCupertinoHttp { void dispatch_async( dispatch_queue_t queue, - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_async( queue, - block, + block._id, ); } @@ -35357,11 +35409,11 @@ class NativeCupertinoHttp { void dispatch_sync( dispatch_queue_t queue, - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_sync( queue, - block, + block._id, ); } @@ -35394,11 +35446,11 @@ class NativeCupertinoHttp { void dispatch_async_and_wait( dispatch_queue_t queue, - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_async_and_wait( queue, - block, + block._id, ); } @@ -35433,12 +35485,12 @@ class NativeCupertinoHttp { void dispatch_apply( int iterations, dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> block, + ObjCBlock_ffiVoid_ffiSize block, ) { return _dispatch_apply( iterations, queue, - block, + block._id, ); } @@ -35679,14 +35731,14 @@ class NativeCupertinoHttp { late final _dispatch_main = _dispatch_mainPtr.asFunction(); void dispatch_after( - int when, + Dartdispatch_time_t when, dispatch_queue_t queue, - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_after( when, queue, - block, + block._id, ); } @@ -35721,11 +35773,11 @@ class NativeCupertinoHttp { void dispatch_barrier_async( dispatch_queue_t queue, - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_barrier_async( queue, - block, + block._id, ); } @@ -35759,11 +35811,11 @@ class NativeCupertinoHttp { void dispatch_barrier_sync( dispatch_queue_t queue, - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_barrier_sync( queue, - block, + block._id, ); } @@ -35796,11 +35848,11 @@ class NativeCupertinoHttp { void dispatch_barrier_async_and_wait( dispatch_queue_t queue, - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_barrier_async_and_wait( queue, - block, + block._id, ); } @@ -35935,14 +35987,18 @@ class NativeCupertinoHttp { late final _dispatch_assert_queue_not = _dispatch_assert_queue_notPtr .asFunction(); - dispatch_block_t dispatch_block_create( + Dartdispatch_block_t dispatch_block_create( int flags, - dispatch_block_t block, + Dartdispatch_block_t block, ) { - return _dispatch_block_create( - flags, - block, - ); + return ObjCBlock_ffiVoid._( + _dispatch_block_create( + flags, + block._id, + ), + this, + retain: false, + release: true); } late final _dispatch_block_createPtr = _lookup< @@ -35952,18 +36008,22 @@ class NativeCupertinoHttp { late final _dispatch_block_create = _dispatch_block_createPtr .asFunction(); - dispatch_block_t dispatch_block_create_with_qos_class( + Dartdispatch_block_t dispatch_block_create_with_qos_class( int flags, int qos_class, int relative_priority, - dispatch_block_t block, + Dartdispatch_block_t block, ) { - return _dispatch_block_create_with_qos_class( - flags, - qos_class, - relative_priority, - block, - ); + return ObjCBlock_ffiVoid._( + _dispatch_block_create_with_qos_class( + flags, + qos_class, + relative_priority, + block._id, + ), + this, + retain: false, + release: true); } late final _dispatch_block_create_with_qos_classPtr = _lookup< @@ -35976,11 +36036,11 @@ class NativeCupertinoHttp { void dispatch_block_perform( int flags, - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_block_perform( flags, - block, + block._id, ); } @@ -35991,11 +36051,11 @@ class NativeCupertinoHttp { .asFunction(); int dispatch_block_wait( - dispatch_block_t block, - int timeout, + Dartdispatch_block_t block, + Dartdispatch_time_t timeout, ) { return _dispatch_block_wait( - block, + block._id, timeout, ); } @@ -36008,14 +36068,14 @@ class NativeCupertinoHttp { _dispatch_block_waitPtr.asFunction(); void dispatch_block_notify( - dispatch_block_t block, + Dartdispatch_block_t block, dispatch_queue_t queue, - dispatch_block_t notification_block, + Dartdispatch_block_t notification_block, ) { return _dispatch_block_notify( - block, + block._id, queue, - notification_block, + notification_block._id, ); } @@ -36027,10 +36087,10 @@ class NativeCupertinoHttp { void Function(dispatch_block_t, dispatch_queue_t, dispatch_block_t)>(); void dispatch_block_cancel( - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_block_cancel( - block, + block._id, ); } @@ -36041,10 +36101,10 @@ class NativeCupertinoHttp { _dispatch_block_cancelPtr.asFunction(); int dispatch_block_testcancel( - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_block_testcancel( - block, + block._id, ); } @@ -36255,11 +36315,11 @@ class NativeCupertinoHttp { void dispatch_source_set_event_handler( dispatch_source_t source, - dispatch_block_t handler, + Dartdispatch_block_t handler, ) { return _dispatch_source_set_event_handler( source, - handler, + handler._id, ); } @@ -36291,11 +36351,11 @@ class NativeCupertinoHttp { void dispatch_source_set_cancel_handler( dispatch_source_t source, - dispatch_block_t handler, + Dartdispatch_block_t handler, ) { return _dispatch_source_set_cancel_handler( source, - handler, + handler._id, ); } @@ -36435,11 +36495,11 @@ class NativeCupertinoHttp { void dispatch_source_set_registration_handler( dispatch_source_t source, - dispatch_block_t handler, + Dartdispatch_block_t handler, ) { return _dispatch_source_set_registration_handler( source, - handler, + handler._id, ); } @@ -36482,12 +36542,12 @@ class NativeCupertinoHttp { void dispatch_group_async( dispatch_group_t group, dispatch_queue_t queue, - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_group_async( group, queue, - block, + block._id, ); } @@ -36543,12 +36603,12 @@ class NativeCupertinoHttp { void dispatch_group_notify( dispatch_group_t group, dispatch_queue_t queue, - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_group_notify( group, queue, - block, + block._id, ); } @@ -36659,11 +36719,11 @@ class NativeCupertinoHttp { void dispatch_once( ffi.Pointer predicate, - dispatch_block_t block, + Dartdispatch_block_t block, ) { return _dispatch_once( predicate, - block, + block._id, ); } @@ -36722,13 +36782,13 @@ class NativeCupertinoHttp { ffi.Pointer buffer, int size, dispatch_queue_t queue, - dispatch_block_t destructor, + Dartdispatch_block_t destructor, ) { return _dispatch_data_create( buffer, size, queue, - destructor, + destructor._id, ); } @@ -36815,11 +36875,11 @@ class NativeCupertinoHttp { bool dispatch_data_apply( dispatch_data_t data, - dispatch_data_applier_t applier, + Dartdispatch_data_applier_t applier, ) { return _dispatch_data_apply( data, - applier, + applier._id, ); } @@ -36852,16 +36912,16 @@ class NativeCupertinoHttp { dispatch_data_t, int, ffi.Pointer)>(); void dispatch_read( - int fd, + Dartdispatch_fd_t fd, int length, dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> handler, + ObjCBlock_ffiVoid_dispatchdatat_ffiInt handler, ) { return _dispatch_read( fd, length, queue, - handler, + handler._id, ); } @@ -36873,16 +36933,16 @@ class NativeCupertinoHttp { void Function(int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); void dispatch_write( - int fd, + Dartdispatch_fd_t fd, dispatch_data_t data, dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> handler, + ObjCBlock_ffiVoid_dispatchdatat_ffiInt handler, ) { return _dispatch_write( fd, data, queue, - handler, + handler._id, ); } @@ -36895,16 +36955,16 @@ class NativeCupertinoHttp { int, dispatch_data_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); dispatch_io_t dispatch_io_create( - int type, - int fd, + Dartdispatch_io_type_t type, + Dartdispatch_fd_t fd, dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> cleanup_handler, + ObjCBlock_ffiVoid_ffiInt cleanup_handler, ) { return _dispatch_io_create( type, fd, queue, - cleanup_handler, + cleanup_handler._id, ); } @@ -36920,12 +36980,12 @@ class NativeCupertinoHttp { int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); dispatch_io_t dispatch_io_create_with_path( - int type, + Dartdispatch_io_type_t type, ffi.Pointer path, int oflag, - int mode, + Dart__uint16_t mode, dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> cleanup_handler, + ObjCBlock_ffiVoid_ffiInt cleanup_handler, ) { return _dispatch_io_create_with_path( type, @@ -36933,7 +36993,7 @@ class NativeCupertinoHttp { oflag, mode, queue, - cleanup_handler, + cleanup_handler._id, ); } @@ -36952,16 +37012,16 @@ class NativeCupertinoHttp { dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); dispatch_io_t dispatch_io_create_with_io( - int type, + Dartdispatch_io_type_t type, dispatch_io_t io, dispatch_queue_t queue, - ffi.Pointer<_ObjCBlock> cleanup_handler, + ObjCBlock_ffiVoid_ffiInt cleanup_handler, ) { return _dispatch_io_create_with_io( type, io, queue, - cleanup_handler, + cleanup_handler._id, ); } @@ -36979,17 +37039,17 @@ class NativeCupertinoHttp { void dispatch_io_read( dispatch_io_t channel, - int offset, + Dart__int64_t offset, int length, dispatch_queue_t queue, - dispatch_io_handler_t io_handler, + Dartdispatch_io_handler_t io_handler, ) { return _dispatch_io_read( channel, offset, length, queue, - io_handler, + io_handler._id, ); } @@ -37003,17 +37063,17 @@ class NativeCupertinoHttp { void dispatch_io_write( dispatch_io_t channel, - int offset, + Dart__int64_t offset, dispatch_data_t data, dispatch_queue_t queue, - dispatch_io_handler_t io_handler, + Dartdispatch_io_handler_t io_handler, ) { return _dispatch_io_write( channel, offset, data, queue, - io_handler, + io_handler._id, ); } @@ -37044,11 +37104,11 @@ class NativeCupertinoHttp { void dispatch_io_barrier( dispatch_io_t channel, - dispatch_block_t barrier, + Dartdispatch_block_t barrier, ) { return _dispatch_io_barrier( channel, - barrier, + barrier._id, ); } @@ -37216,9 +37276,6 @@ class NativeCupertinoHttp { CFStreamPropertyKey get kCFStreamPropertyDataWritten => _kCFStreamPropertyDataWritten.value; - set kCFStreamPropertyDataWritten(CFStreamPropertyKey value) => - _kCFStreamPropertyDataWritten.value = value; - CFReadStreamRef CFReadStreamCreateWithBytesNoCopy( CFAllocatorRef alloc, ffi.Pointer bytes, @@ -37345,9 +37402,6 @@ class NativeCupertinoHttp { CFStreamPropertyKey get kCFStreamPropertyAppendToFile => _kCFStreamPropertyAppendToFile.value; - set kCFStreamPropertyAppendToFile(CFStreamPropertyKey value) => - _kCFStreamPropertyAppendToFile.value = value; - late final ffi.Pointer _kCFStreamPropertyFileCurrentOffset = _lookup('kCFStreamPropertyFileCurrentOffset'); @@ -37355,9 +37409,6 @@ class NativeCupertinoHttp { CFStreamPropertyKey get kCFStreamPropertyFileCurrentOffset => _kCFStreamPropertyFileCurrentOffset.value; - set kCFStreamPropertyFileCurrentOffset(CFStreamPropertyKey value) => - _kCFStreamPropertyFileCurrentOffset.value = value; - late final ffi.Pointer _kCFStreamPropertySocketNativeHandle = _lookup('kCFStreamPropertySocketNativeHandle'); @@ -37365,9 +37416,6 @@ class NativeCupertinoHttp { CFStreamPropertyKey get kCFStreamPropertySocketNativeHandle => _kCFStreamPropertySocketNativeHandle.value; - set kCFStreamPropertySocketNativeHandle(CFStreamPropertyKey value) => - _kCFStreamPropertySocketNativeHandle.value = value; - late final ffi.Pointer _kCFStreamPropertySocketRemoteHostName = _lookup('kCFStreamPropertySocketRemoteHostName'); @@ -37375,9 +37423,6 @@ class NativeCupertinoHttp { CFStreamPropertyKey get kCFStreamPropertySocketRemoteHostName => _kCFStreamPropertySocketRemoteHostName.value; - set kCFStreamPropertySocketRemoteHostName(CFStreamPropertyKey value) => - _kCFStreamPropertySocketRemoteHostName.value = value; - late final ffi.Pointer _kCFStreamPropertySocketRemotePortNumber = _lookup('kCFStreamPropertySocketRemotePortNumber'); @@ -37385,17 +37430,11 @@ class NativeCupertinoHttp { CFStreamPropertyKey get kCFStreamPropertySocketRemotePortNumber => _kCFStreamPropertySocketRemotePortNumber.value; - set kCFStreamPropertySocketRemotePortNumber(CFStreamPropertyKey value) => - _kCFStreamPropertySocketRemotePortNumber.value = value; - late final ffi.Pointer _kCFStreamErrorDomainSOCKS = _lookup('kCFStreamErrorDomainSOCKS'); int get kCFStreamErrorDomainSOCKS => _kCFStreamErrorDomainSOCKS.value; - set kCFStreamErrorDomainSOCKS(int value) => - _kCFStreamErrorDomainSOCKS.value = value; - late final ffi.Pointer _kCFStreamPropertySOCKSProxy = _lookup('kCFStreamPropertySOCKSProxy'); @@ -37473,9 +37512,6 @@ class NativeCupertinoHttp { int get kCFStreamErrorDomainSSL => _kCFStreamErrorDomainSSL.value; - set kCFStreamErrorDomainSSL(int value) => - _kCFStreamErrorDomainSSL.value = value; - late final ffi.Pointer _kCFStreamPropertySocketSecurityLevel = _lookup('kCFStreamPropertySocketSecurityLevel'); @@ -39037,64 +39073,43 @@ class NativeCupertinoHttp { CFStringRef get kCFURLFileExists => _kCFURLFileExists.value; - set kCFURLFileExists(CFStringRef value) => _kCFURLFileExists.value = value; - late final ffi.Pointer _kCFURLFileDirectoryContents = _lookup('kCFURLFileDirectoryContents'); CFStringRef get kCFURLFileDirectoryContents => _kCFURLFileDirectoryContents.value; - set kCFURLFileDirectoryContents(CFStringRef value) => - _kCFURLFileDirectoryContents.value = value; - late final ffi.Pointer _kCFURLFileLength = _lookup('kCFURLFileLength'); CFStringRef get kCFURLFileLength => _kCFURLFileLength.value; - set kCFURLFileLength(CFStringRef value) => _kCFURLFileLength.value = value; - late final ffi.Pointer _kCFURLFileLastModificationTime = _lookup('kCFURLFileLastModificationTime'); CFStringRef get kCFURLFileLastModificationTime => _kCFURLFileLastModificationTime.value; - set kCFURLFileLastModificationTime(CFStringRef value) => - _kCFURLFileLastModificationTime.value = value; - late final ffi.Pointer _kCFURLFilePOSIXMode = _lookup('kCFURLFilePOSIXMode'); CFStringRef get kCFURLFilePOSIXMode => _kCFURLFilePOSIXMode.value; - set kCFURLFilePOSIXMode(CFStringRef value) => - _kCFURLFilePOSIXMode.value = value; - late final ffi.Pointer _kCFURLFileOwnerID = _lookup('kCFURLFileOwnerID'); CFStringRef get kCFURLFileOwnerID => _kCFURLFileOwnerID.value; - set kCFURLFileOwnerID(CFStringRef value) => _kCFURLFileOwnerID.value = value; - late final ffi.Pointer _kCFURLHTTPStatusCode = _lookup('kCFURLHTTPStatusCode'); CFStringRef get kCFURLHTTPStatusCode => _kCFURLHTTPStatusCode.value; - set kCFURLHTTPStatusCode(CFStringRef value) => - _kCFURLHTTPStatusCode.value = value; - late final ffi.Pointer _kCFURLHTTPStatusLine = _lookup('kCFURLHTTPStatusLine'); CFStringRef get kCFURLHTTPStatusLine => _kCFURLHTTPStatusLine.value; - set kCFURLHTTPStatusLine(CFStringRef value) => - _kCFURLHTTPStatusLine.value = value; - int CFUUIDGetTypeID() { return _CFUUIDGetTypeID(); } @@ -39325,57 +39340,37 @@ class NativeCupertinoHttp { CFStringRef get kCFBundleInfoDictionaryVersionKey => _kCFBundleInfoDictionaryVersionKey.value; - set kCFBundleInfoDictionaryVersionKey(CFStringRef value) => - _kCFBundleInfoDictionaryVersionKey.value = value; - late final ffi.Pointer _kCFBundleExecutableKey = _lookup('kCFBundleExecutableKey'); CFStringRef get kCFBundleExecutableKey => _kCFBundleExecutableKey.value; - set kCFBundleExecutableKey(CFStringRef value) => - _kCFBundleExecutableKey.value = value; - late final ffi.Pointer _kCFBundleIdentifierKey = _lookup('kCFBundleIdentifierKey'); CFStringRef get kCFBundleIdentifierKey => _kCFBundleIdentifierKey.value; - set kCFBundleIdentifierKey(CFStringRef value) => - _kCFBundleIdentifierKey.value = value; - late final ffi.Pointer _kCFBundleVersionKey = _lookup('kCFBundleVersionKey'); CFStringRef get kCFBundleVersionKey => _kCFBundleVersionKey.value; - set kCFBundleVersionKey(CFStringRef value) => - _kCFBundleVersionKey.value = value; - late final ffi.Pointer _kCFBundleDevelopmentRegionKey = _lookup('kCFBundleDevelopmentRegionKey'); CFStringRef get kCFBundleDevelopmentRegionKey => _kCFBundleDevelopmentRegionKey.value; - set kCFBundleDevelopmentRegionKey(CFStringRef value) => - _kCFBundleDevelopmentRegionKey.value = value; - late final ffi.Pointer _kCFBundleNameKey = _lookup('kCFBundleNameKey'); CFStringRef get kCFBundleNameKey => _kCFBundleNameKey.value; - set kCFBundleNameKey(CFStringRef value) => _kCFBundleNameKey.value = value; - late final ffi.Pointer _kCFBundleLocalizationsKey = _lookup('kCFBundleLocalizationsKey'); CFStringRef get kCFBundleLocalizationsKey => _kCFBundleLocalizationsKey.value; - set kCFBundleLocalizationsKey(CFStringRef value) => - _kCFBundleLocalizationsKey.value = value; - CFBundleRef CFBundleGetMainBundle() { return _CFBundleGetMainBundle(); } @@ -40519,42 +40514,28 @@ class NativeCupertinoHttp { CFStringRef get kCFPlugInDynamicRegistrationKey => _kCFPlugInDynamicRegistrationKey.value; - set kCFPlugInDynamicRegistrationKey(CFStringRef value) => - _kCFPlugInDynamicRegistrationKey.value = value; - late final ffi.Pointer _kCFPlugInDynamicRegisterFunctionKey = _lookup('kCFPlugInDynamicRegisterFunctionKey'); CFStringRef get kCFPlugInDynamicRegisterFunctionKey => _kCFPlugInDynamicRegisterFunctionKey.value; - set kCFPlugInDynamicRegisterFunctionKey(CFStringRef value) => - _kCFPlugInDynamicRegisterFunctionKey.value = value; - late final ffi.Pointer _kCFPlugInUnloadFunctionKey = _lookup('kCFPlugInUnloadFunctionKey'); CFStringRef get kCFPlugInUnloadFunctionKey => _kCFPlugInUnloadFunctionKey.value; - set kCFPlugInUnloadFunctionKey(CFStringRef value) => - _kCFPlugInUnloadFunctionKey.value = value; - late final ffi.Pointer _kCFPlugInFactoriesKey = _lookup('kCFPlugInFactoriesKey'); CFStringRef get kCFPlugInFactoriesKey => _kCFPlugInFactoriesKey.value; - set kCFPlugInFactoriesKey(CFStringRef value) => - _kCFPlugInFactoriesKey.value = value; - late final ffi.Pointer _kCFPlugInTypesKey = _lookup('kCFPlugInTypesKey'); CFStringRef get kCFPlugInTypesKey => _kCFPlugInTypesKey.value; - set kCFPlugInTypesKey(CFStringRef value) => _kCFPlugInTypesKey.value = value; - int CFPlugInGetTypeID() { return _CFPlugInGetTypeID(); } @@ -43169,45 +43150,30 @@ class NativeCupertinoHttp { CFStringRef get kCFUserNotificationIconURLKey => _kCFUserNotificationIconURLKey.value; - set kCFUserNotificationIconURLKey(CFStringRef value) => - _kCFUserNotificationIconURLKey.value = value; - late final ffi.Pointer _kCFUserNotificationSoundURLKey = _lookup('kCFUserNotificationSoundURLKey'); CFStringRef get kCFUserNotificationSoundURLKey => _kCFUserNotificationSoundURLKey.value; - set kCFUserNotificationSoundURLKey(CFStringRef value) => - _kCFUserNotificationSoundURLKey.value = value; - late final ffi.Pointer _kCFUserNotificationLocalizationURLKey = _lookup('kCFUserNotificationLocalizationURLKey'); CFStringRef get kCFUserNotificationLocalizationURLKey => _kCFUserNotificationLocalizationURLKey.value; - set kCFUserNotificationLocalizationURLKey(CFStringRef value) => - _kCFUserNotificationLocalizationURLKey.value = value; - late final ffi.Pointer _kCFUserNotificationAlertHeaderKey = _lookup('kCFUserNotificationAlertHeaderKey'); CFStringRef get kCFUserNotificationAlertHeaderKey => _kCFUserNotificationAlertHeaderKey.value; - set kCFUserNotificationAlertHeaderKey(CFStringRef value) => - _kCFUserNotificationAlertHeaderKey.value = value; - late final ffi.Pointer _kCFUserNotificationAlertMessageKey = _lookup('kCFUserNotificationAlertMessageKey'); CFStringRef get kCFUserNotificationAlertMessageKey => _kCFUserNotificationAlertMessageKey.value; - set kCFUserNotificationAlertMessageKey(CFStringRef value) => - _kCFUserNotificationAlertMessageKey.value = value; - late final ffi.Pointer _kCFUserNotificationDefaultButtonTitleKey = _lookup('kCFUserNotificationDefaultButtonTitleKey'); @@ -43215,9 +43181,6 @@ class NativeCupertinoHttp { CFStringRef get kCFUserNotificationDefaultButtonTitleKey => _kCFUserNotificationDefaultButtonTitleKey.value; - set kCFUserNotificationDefaultButtonTitleKey(CFStringRef value) => - _kCFUserNotificationDefaultButtonTitleKey.value = value; - late final ffi.Pointer _kCFUserNotificationAlternateButtonTitleKey = _lookup('kCFUserNotificationAlternateButtonTitleKey'); @@ -43225,18 +43188,12 @@ class NativeCupertinoHttp { CFStringRef get kCFUserNotificationAlternateButtonTitleKey => _kCFUserNotificationAlternateButtonTitleKey.value; - set kCFUserNotificationAlternateButtonTitleKey(CFStringRef value) => - _kCFUserNotificationAlternateButtonTitleKey.value = value; - late final ffi.Pointer _kCFUserNotificationOtherButtonTitleKey = _lookup('kCFUserNotificationOtherButtonTitleKey'); CFStringRef get kCFUserNotificationOtherButtonTitleKey => _kCFUserNotificationOtherButtonTitleKey.value; - set kCFUserNotificationOtherButtonTitleKey(CFStringRef value) => - _kCFUserNotificationOtherButtonTitleKey.value = value; - late final ffi.Pointer _kCFUserNotificationProgressIndicatorValueKey = _lookup('kCFUserNotificationProgressIndicatorValueKey'); @@ -43244,72 +43201,48 @@ class NativeCupertinoHttp { CFStringRef get kCFUserNotificationProgressIndicatorValueKey => _kCFUserNotificationProgressIndicatorValueKey.value; - set kCFUserNotificationProgressIndicatorValueKey(CFStringRef value) => - _kCFUserNotificationProgressIndicatorValueKey.value = value; - late final ffi.Pointer _kCFUserNotificationPopUpTitlesKey = _lookup('kCFUserNotificationPopUpTitlesKey'); CFStringRef get kCFUserNotificationPopUpTitlesKey => _kCFUserNotificationPopUpTitlesKey.value; - set kCFUserNotificationPopUpTitlesKey(CFStringRef value) => - _kCFUserNotificationPopUpTitlesKey.value = value; - late final ffi.Pointer _kCFUserNotificationTextFieldTitlesKey = _lookup('kCFUserNotificationTextFieldTitlesKey'); CFStringRef get kCFUserNotificationTextFieldTitlesKey => _kCFUserNotificationTextFieldTitlesKey.value; - set kCFUserNotificationTextFieldTitlesKey(CFStringRef value) => - _kCFUserNotificationTextFieldTitlesKey.value = value; - late final ffi.Pointer _kCFUserNotificationCheckBoxTitlesKey = _lookup('kCFUserNotificationCheckBoxTitlesKey'); CFStringRef get kCFUserNotificationCheckBoxTitlesKey => _kCFUserNotificationCheckBoxTitlesKey.value; - set kCFUserNotificationCheckBoxTitlesKey(CFStringRef value) => - _kCFUserNotificationCheckBoxTitlesKey.value = value; - late final ffi.Pointer _kCFUserNotificationTextFieldValuesKey = _lookup('kCFUserNotificationTextFieldValuesKey'); CFStringRef get kCFUserNotificationTextFieldValuesKey => _kCFUserNotificationTextFieldValuesKey.value; - set kCFUserNotificationTextFieldValuesKey(CFStringRef value) => - _kCFUserNotificationTextFieldValuesKey.value = value; - late final ffi.Pointer _kCFUserNotificationPopUpSelectionKey = _lookup('kCFUserNotificationPopUpSelectionKey'); CFStringRef get kCFUserNotificationPopUpSelectionKey => _kCFUserNotificationPopUpSelectionKey.value; - set kCFUserNotificationPopUpSelectionKey(CFStringRef value) => - _kCFUserNotificationPopUpSelectionKey.value = value; - late final ffi.Pointer _kCFUserNotificationAlertTopMostKey = _lookup('kCFUserNotificationAlertTopMostKey'); CFStringRef get kCFUserNotificationAlertTopMostKey => _kCFUserNotificationAlertTopMostKey.value; - set kCFUserNotificationAlertTopMostKey(CFStringRef value) => - _kCFUserNotificationAlertTopMostKey.value = value; - late final ffi.Pointer _kCFUserNotificationKeyboardTypesKey = _lookup('kCFUserNotificationKeyboardTypesKey'); CFStringRef get kCFUserNotificationKeyboardTypesKey => _kCFUserNotificationKeyboardTypesKey.value; - set kCFUserNotificationKeyboardTypesKey(CFStringRef value) => - _kCFUserNotificationKeyboardTypesKey.value = value; - int CFXMLNodeGetTypeID() { return _CFXMLNodeGetTypeID(); } @@ -43821,32 +43754,117 @@ class NativeCupertinoHttp { CFStringRef get kCFXMLTreeErrorDescription => _kCFXMLTreeErrorDescription.value; - set kCFXMLTreeErrorDescription(CFStringRef value) => - _kCFXMLTreeErrorDescription.value = value; - late final ffi.Pointer _kCFXMLTreeErrorLineNumber = _lookup('kCFXMLTreeErrorLineNumber'); CFStringRef get kCFXMLTreeErrorLineNumber => _kCFXMLTreeErrorLineNumber.value; - set kCFXMLTreeErrorLineNumber(CFStringRef value) => - _kCFXMLTreeErrorLineNumber.value = value; - late final ffi.Pointer _kCFXMLTreeErrorLocation = _lookup('kCFXMLTreeErrorLocation'); CFStringRef get kCFXMLTreeErrorLocation => _kCFXMLTreeErrorLocation.value; - set kCFXMLTreeErrorLocation(CFStringRef value) => - _kCFXMLTreeErrorLocation.value = value; - late final ffi.Pointer _kCFXMLTreeErrorStatusCode = _lookup('kCFXMLTreeErrorStatusCode'); CFStringRef get kCFXMLTreeErrorStatusCode => _kCFXMLTreeErrorStatusCode.value; - set kCFXMLTreeErrorStatusCode(CFStringRef value) => - _kCFXMLTreeErrorStatusCode.value = value; + late final ffi.Pointer _gGuidCssm = + _lookup('gGuidCssm'); + + CSSM_GUID get gGuidCssm => _gGuidCssm.ref; + + late final ffi.Pointer _gGuidAppleFileDL = + _lookup('gGuidAppleFileDL'); + + CSSM_GUID get gGuidAppleFileDL => _gGuidAppleFileDL.ref; + + late final ffi.Pointer _gGuidAppleCSP = + _lookup('gGuidAppleCSP'); + + CSSM_GUID get gGuidAppleCSP => _gGuidAppleCSP.ref; + + late final ffi.Pointer _gGuidAppleCSPDL = + _lookup('gGuidAppleCSPDL'); + + CSSM_GUID get gGuidAppleCSPDL => _gGuidAppleCSPDL.ref; + + late final ffi.Pointer _gGuidAppleX509CL = + _lookup('gGuidAppleX509CL'); + + CSSM_GUID get gGuidAppleX509CL => _gGuidAppleX509CL.ref; + + late final ffi.Pointer _gGuidAppleX509TP = + _lookup('gGuidAppleX509TP'); + + CSSM_GUID get gGuidAppleX509TP => _gGuidAppleX509TP.ref; + + late final ffi.Pointer _gGuidAppleLDAPDL = + _lookup('gGuidAppleLDAPDL'); + + CSSM_GUID get gGuidAppleLDAPDL => _gGuidAppleLDAPDL.ref; + + late final ffi.Pointer _gGuidAppleDotMacTP = + _lookup('gGuidAppleDotMacTP'); + + CSSM_GUID get gGuidAppleDotMacTP => _gGuidAppleDotMacTP.ref; + + late final ffi.Pointer _gGuidAppleSdCSPDL = + _lookup('gGuidAppleSdCSPDL'); + + CSSM_GUID get gGuidAppleSdCSPDL => _gGuidAppleSdCSPDL.ref; + + late final ffi.Pointer _gGuidAppleDotMacDL = + _lookup('gGuidAppleDotMacDL'); + + CSSM_GUID get gGuidAppleDotMacDL => _gGuidAppleDotMacDL.ref; + + void cssmPerror( + ffi.Pointer how, + int error, + ) { + return _cssmPerror( + how, + error, + ); + } + + late final _cssmPerrorPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, CSSM_RETURN)>>('cssmPerror'); + late final _cssmPerror = + _cssmPerrorPtr.asFunction, int)>(); + + bool cssmOidToAlg( + ffi.Pointer oid, + ffi.Pointer alg, + ) { + return _cssmOidToAlg( + oid, + alg, + ); + } + + late final _cssmOidToAlgPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>('cssmOidToAlg'); + late final _cssmOidToAlg = _cssmOidToAlgPtr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer cssmAlgToOid( + int algId, + ) { + return _cssmAlgToOid( + algId, + ); + } + + late final _cssmAlgToOidPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(CSSM_ALGORITHMS)>>('cssmAlgToOid'); + late final _cssmAlgToOid = + _cssmAlgToOidPtr.asFunction Function(int)>(); late final ffi.Pointer _kSecPropertyTypeTitle = _lookup('kSecPropertyTypeTitle'); @@ -44129,15 +44147,15 @@ class NativeCupertinoHttp { late final _SecTrustEvaluate = _SecTrustEvaluatePtr.asFunction< int Function(SecTrustRef, ffi.Pointer)>(); - int SecTrustEvaluateAsync( + DartSInt32 SecTrustEvaluateAsync( SecTrustRef trust, dispatch_queue_t queue, - SecTrustCallback result, + DartSecTrustCallback result, ) { return _SecTrustEvaluateAsync( trust, queue, - result, + result._id, ); } @@ -44165,15 +44183,15 @@ class NativeCupertinoHttp { late final _SecTrustEvaluateWithError = _SecTrustEvaluateWithErrorPtr .asFunction)>(); - int SecTrustEvaluateAsyncWithError( + DartSInt32 SecTrustEvaluateAsyncWithError( SecTrustRef trust, dispatch_queue_t queue, - SecTrustWithErrorCallback result, + DartSecTrustWithErrorCallback result, ) { return _SecTrustEvaluateAsyncWithError( trust, queue, - result, + result._id, ); } @@ -44366,104 +44384,6 @@ class NativeCupertinoHttp { late final _SecTrustCopyCertificateChain = _SecTrustCopyCertificateChainPtr .asFunction(); - late final ffi.Pointer _gGuidCssm = - _lookup('gGuidCssm'); - - CSSM_GUID get gGuidCssm => _gGuidCssm.ref; - - late final ffi.Pointer _gGuidAppleFileDL = - _lookup('gGuidAppleFileDL'); - - CSSM_GUID get gGuidAppleFileDL => _gGuidAppleFileDL.ref; - - late final ffi.Pointer _gGuidAppleCSP = - _lookup('gGuidAppleCSP'); - - CSSM_GUID get gGuidAppleCSP => _gGuidAppleCSP.ref; - - late final ffi.Pointer _gGuidAppleCSPDL = - _lookup('gGuidAppleCSPDL'); - - CSSM_GUID get gGuidAppleCSPDL => _gGuidAppleCSPDL.ref; - - late final ffi.Pointer _gGuidAppleX509CL = - _lookup('gGuidAppleX509CL'); - - CSSM_GUID get gGuidAppleX509CL => _gGuidAppleX509CL.ref; - - late final ffi.Pointer _gGuidAppleX509TP = - _lookup('gGuidAppleX509TP'); - - CSSM_GUID get gGuidAppleX509TP => _gGuidAppleX509TP.ref; - - late final ffi.Pointer _gGuidAppleLDAPDL = - _lookup('gGuidAppleLDAPDL'); - - CSSM_GUID get gGuidAppleLDAPDL => _gGuidAppleLDAPDL.ref; - - late final ffi.Pointer _gGuidAppleDotMacTP = - _lookup('gGuidAppleDotMacTP'); - - CSSM_GUID get gGuidAppleDotMacTP => _gGuidAppleDotMacTP.ref; - - late final ffi.Pointer _gGuidAppleSdCSPDL = - _lookup('gGuidAppleSdCSPDL'); - - CSSM_GUID get gGuidAppleSdCSPDL => _gGuidAppleSdCSPDL.ref; - - late final ffi.Pointer _gGuidAppleDotMacDL = - _lookup('gGuidAppleDotMacDL'); - - CSSM_GUID get gGuidAppleDotMacDL => _gGuidAppleDotMacDL.ref; - - void cssmPerror( - ffi.Pointer how, - int error, - ) { - return _cssmPerror( - how, - error, - ); - } - - late final _cssmPerrorPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, CSSM_RETURN)>>('cssmPerror'); - late final _cssmPerror = - _cssmPerrorPtr.asFunction, int)>(); - - bool cssmOidToAlg( - ffi.Pointer oid, - ffi.Pointer alg, - ) { - return _cssmOidToAlg( - oid, - alg, - ); - } - - late final _cssmOidToAlgPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer)>>('cssmOidToAlg'); - late final _cssmOidToAlg = _cssmOidToAlgPtr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer cssmAlgToOid( - int algId, - ) { - return _cssmAlgToOid( - algId, - ); - } - - late final _cssmAlgToOidPtr = _lookup< - ffi - .NativeFunction Function(CSSM_ALGORITHMS)>>( - 'cssmAlgToOid'); - late final _cssmAlgToOid = - _cssmAlgToOidPtr.asFunction Function(int)>(); - int SecTrustSetOptions( SecTrustRef trustRef, int options, @@ -45496,11 +45416,11 @@ class NativeCupertinoHttp { bool sec_identity_access_certificates( sec_identity_t identity, - ffi.Pointer<_ObjCBlock> handler, + ObjCBlock_ffiVoid_seccertificatet handler, ) { return _sec_identity_access_certificates( identity, - handler, + handler._id, ); } @@ -45678,11 +45598,11 @@ class NativeCupertinoHttp { bool sec_protocol_metadata_access_peer_certificate_chain( sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + ObjCBlock_ffiVoid_seccertificatet handler, ) { return _sec_protocol_metadata_access_peer_certificate_chain( metadata, - handler, + handler._id, ); } @@ -45697,11 +45617,11 @@ class NativeCupertinoHttp { bool sec_protocol_metadata_access_ocsp_response( sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + ObjCBlock_ffiVoid_dispatchdatat handler, ) { return _sec_protocol_metadata_access_ocsp_response( metadata, - handler, + handler._id, ); } @@ -45716,11 +45636,11 @@ class NativeCupertinoHttp { bool sec_protocol_metadata_access_supported_signature_algorithms( sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + ObjCBlock_ffiVoid_Uint16 handler, ) { return _sec_protocol_metadata_access_supported_signature_algorithms( metadata, - handler, + handler._id, ); } @@ -45738,11 +45658,11 @@ class NativeCupertinoHttp { bool sec_protocol_metadata_access_distinguished_names( sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + ObjCBlock_ffiVoid_dispatchdatat handler, ) { return _sec_protocol_metadata_access_distinguished_names( metadata, - handler, + handler._id, ); } @@ -45757,11 +45677,11 @@ class NativeCupertinoHttp { bool sec_protocol_metadata_access_pre_shared_keys( sec_protocol_metadata_t metadata, - ffi.Pointer<_ObjCBlock> handler, + ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat handler, ) { return _sec_protocol_metadata_access_pre_shared_keys( metadata, - handler, + handler._id, ); } @@ -46239,12 +46159,12 @@ class NativeCupertinoHttp { void sec_protocol_options_set_pre_shared_key_selection_block( sec_protocol_options_t options, - sec_protocol_pre_shared_key_selection_t psk_selection_block, + Dartsec_protocol_pre_shared_key_selection_t psk_selection_block, dispatch_queue_t psk_selection_queue, ) { return _sec_protocol_options_set_pre_shared_key_selection_block( options, - psk_selection_block, + psk_selection_block._id, psk_selection_queue, ); } @@ -46465,12 +46385,12 @@ class NativeCupertinoHttp { void sec_protocol_options_set_key_update_block( sec_protocol_options_t options, - sec_protocol_key_update_t key_update_block, + Dartsec_protocol_key_update_t key_update_block, dispatch_queue_t key_update_queue, ) { return _sec_protocol_options_set_key_update_block( options, - key_update_block, + key_update_block._id, key_update_queue, ); } @@ -46486,12 +46406,12 @@ class NativeCupertinoHttp { void sec_protocol_options_set_challenge_block( sec_protocol_options_t options, - sec_protocol_challenge_t challenge_block, + Dartsec_protocol_challenge_t challenge_block, dispatch_queue_t challenge_queue, ) { return _sec_protocol_options_set_challenge_block( options, - challenge_block, + challenge_block._id, challenge_queue, ); } @@ -46507,12 +46427,12 @@ class NativeCupertinoHttp { void sec_protocol_options_set_verify_block( sec_protocol_options_t options, - sec_protocol_verify_t verify_block, + Dartsec_protocol_verify_t verify_block, dispatch_queue_t verify_block_queue, ) { return _sec_protocol_options_set_verify_block( options, - verify_block, + verify_block._id, verify_block_queue, ); } @@ -47883,26 +47803,23 @@ class NativeCupertinoHttp { int get NSURLSessionTransferSizeUnknown => _NSURLSessionTransferSizeUnknown.value; - set NSURLSessionTransferSizeUnknown(int value) => - _NSURLSessionTransferSizeUnknown.value = value; - late final _class_NSURLSession1 = _getClass1("NSURLSession"); late final _sel_sharedSession1 = _registerName1("sharedSession"); - ffi.Pointer _objc_msgSend_408( + ffi.Pointer _objc_msgSend_438( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_408( + return __objc_msgSend_438( obj, sel, ); } - late final __objc_msgSend_408Ptr = _lookup< + late final __objc_msgSend_438Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< + late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -47910,21 +47827,21 @@ class NativeCupertinoHttp { _getClass1("NSURLSessionConfiguration"); late final _sel_defaultSessionConfiguration1 = _registerName1("defaultSessionConfiguration"); - ffi.Pointer _objc_msgSend_409( + ffi.Pointer _objc_msgSend_439( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_409( + return __objc_msgSend_439( obj, sel, ); } - late final __objc_msgSend_409Ptr = _lookup< + late final __objc_msgSend_439Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< + late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -47932,23 +47849,23 @@ class NativeCupertinoHttp { _registerName1("ephemeralSessionConfiguration"); late final _sel_backgroundSessionConfigurationWithIdentifier_1 = _registerName1("backgroundSessionConfigurationWithIdentifier:"); - ffi.Pointer _objc_msgSend_410( + ffi.Pointer _objc_msgSend_440( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer identifier, ) { - return __objc_msgSend_410( + return __objc_msgSend_440( obj, sel, identifier, ); } - late final __objc_msgSend_410Ptr = _lookup< + late final __objc_msgSend_440Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< + late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -47984,42 +47901,42 @@ class NativeCupertinoHttp { _registerName1("setConnectionProxyDictionary:"); late final _sel_TLSMinimumSupportedProtocol1 = _registerName1("TLSMinimumSupportedProtocol"); - int _objc_msgSend_411( + int _objc_msgSend_441( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_411( + return __objc_msgSend_441( obj, sel, ); } - late final __objc_msgSend_411Ptr = _lookup< + late final __objc_msgSend_441Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< + late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setTLSMinimumSupportedProtocol_1 = _registerName1("setTLSMinimumSupportedProtocol:"); - void _objc_msgSend_412( + void _objc_msgSend_442( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_412( + return __objc_msgSend_442( obj, sel, value, ); } - late final __objc_msgSend_412Ptr = _lookup< + late final __objc_msgSend_442Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< + late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_TLSMaximumSupportedProtocol1 = @@ -48028,42 +47945,42 @@ class NativeCupertinoHttp { _registerName1("setTLSMaximumSupportedProtocol:"); late final _sel_TLSMinimumSupportedProtocolVersion1 = _registerName1("TLSMinimumSupportedProtocolVersion"); - int _objc_msgSend_413( + int _objc_msgSend_443( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_413( + return __objc_msgSend_443( obj, sel, ); } - late final __objc_msgSend_413Ptr = _lookup< + late final __objc_msgSend_443Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< + late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setTLSMinimumSupportedProtocolVersion_1 = _registerName1("setTLSMinimumSupportedProtocolVersion:"); - void _objc_msgSend_414( + void _objc_msgSend_444( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_414( + return __objc_msgSend_444( obj, sel, value, ); } - late final __objc_msgSend_414Ptr = _lookup< + late final __objc_msgSend_444Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< + late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_TLSMaximumSupportedProtocolVersion1 = @@ -48087,25 +48004,43 @@ class NativeCupertinoHttp { late final _sel_setHTTPMaximumConnectionsPerHost_1 = _registerName1("setHTTPMaximumConnectionsPerHost:"); late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); + ffi.Pointer _objc_msgSend_445( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_445( + obj, + sel, + ); + } + + late final __objc_msgSend_445Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _sel_setHTTPCookieStorage_1 = _registerName1("setHTTPCookieStorage:"); - void _objc_msgSend_415( + void _objc_msgSend_446( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_415( + return __objc_msgSend_446( obj, sel, value, ); } - late final __objc_msgSend_415Ptr = _lookup< + late final __objc_msgSend_446Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< + late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -48113,148 +48048,186 @@ class NativeCupertinoHttp { _getClass1("NSURLCredentialStorage"); late final _sel_URLCredentialStorage1 = _registerName1("URLCredentialStorage"); - ffi.Pointer _objc_msgSend_416( + ffi.Pointer _objc_msgSend_447( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_416( + return __objc_msgSend_447( obj, sel, ); } - late final __objc_msgSend_416Ptr = _lookup< + late final __objc_msgSend_447Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< + late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setURLCredentialStorage_1 = _registerName1("setURLCredentialStorage:"); - void _objc_msgSend_417( + void _objc_msgSend_448( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_417( + return __objc_msgSend_448( obj, sel, value, ); } - late final __objc_msgSend_417Ptr = _lookup< + late final __objc_msgSend_448Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< + late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_URLCache1 = _registerName1("URLCache"); + ffi.Pointer _objc_msgSend_449( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_449( + obj, + sel, + ); + } + + late final __objc_msgSend_449Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _sel_setURLCache_1 = _registerName1("setURLCache:"); + void _objc_msgSend_450( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer value, + ) { + return __objc_msgSend_450( + obj, + sel, + value, + ); + } + + late final __objc_msgSend_450Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + late final _sel_shouldUseExtendedBackgroundIdleMode1 = _registerName1("shouldUseExtendedBackgroundIdleMode"); late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = _registerName1("setShouldUseExtendedBackgroundIdleMode:"); late final _sel_protocolClasses1 = _registerName1("protocolClasses"); late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); - void _objc_msgSend_418( + void _objc_msgSend_451( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer value, ) { - return __objc_msgSend_418( + return __objc_msgSend_451( obj, sel, value, ); } - late final __objc_msgSend_418Ptr = _lookup< + late final __objc_msgSend_451Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< + late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_multipathServiceType1 = _registerName1("multipathServiceType"); - int _objc_msgSend_419( + int _objc_msgSend_452( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_419( + return __objc_msgSend_452( obj, sel, ); } - late final __objc_msgSend_419Ptr = _lookup< + late final __objc_msgSend_452Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< + late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_setMultipathServiceType_1 = _registerName1("setMultipathServiceType:"); - void _objc_msgSend_420( + void _objc_msgSend_453( ffi.Pointer obj, ffi.Pointer sel, int value, ) { - return __objc_msgSend_420( + return __objc_msgSend_453( obj, sel, value, ); } - late final __objc_msgSend_420Ptr = _lookup< + late final __objc_msgSend_453Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< + late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_backgroundSessionConfiguration_1 = _registerName1("backgroundSessionConfiguration:"); late final _sel_sessionWithConfiguration_1 = _registerName1("sessionWithConfiguration:"); - ffi.Pointer _objc_msgSend_421( + ffi.Pointer _objc_msgSend_454( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer configuration, ) { - return __objc_msgSend_421( + return __objc_msgSend_454( obj, sel, configuration, ); } - late final __objc_msgSend_421Ptr = _lookup< + late final __objc_msgSend_454Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< + late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); - ffi.Pointer _objc_msgSend_422( + ffi.Pointer _objc_msgSend_455( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer configuration, ffi.Pointer delegate, ffi.Pointer queue, ) { - return __objc_msgSend_422( + return __objc_msgSend_455( obj, sel, configuration, @@ -48263,7 +48236,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_422Ptr = _lookup< + late final __objc_msgSend_455Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -48271,7 +48244,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< + late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48293,102 +48266,124 @@ class NativeCupertinoHttp { _registerName1("flushWithCompletionHandler:"); late final _sel_getTasksWithCompletionHandler_1 = _registerName1("getTasksWithCompletionHandler:"); - void _objc_msgSend_423( + void _objc_msgSend_456( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_423( + return __objc_msgSend_456( obj, sel, completionHandler, ); } - late final __objc_msgSend_423Ptr = _lookup< + late final __objc_msgSend_456Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< + late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_getAllTasksWithCompletionHandler_1 = _registerName1("getAllTasksWithCompletionHandler:"); - void _objc_msgSend_424( + void _objc_msgSend_457( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_424( + return __objc_msgSend_457( obj, sel, completionHandler, ); } - late final __objc_msgSend_424Ptr = _lookup< + late final __objc_msgSend_457Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< + late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_dataTaskWithRequest_1 = _registerName1("dataTaskWithRequest:"); - ffi.Pointer _objc_msgSend_425( + ffi.Pointer _objc_msgSend_458( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_425( + return __objc_msgSend_458( obj, sel, request, ); } - late final __objc_msgSend_425Ptr = _lookup< + late final __objc_msgSend_458Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< + late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); - ffi.Pointer _objc_msgSend_426( + ffi.Pointer _objc_msgSend_459( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_426( + return __objc_msgSend_459( obj, sel, url, ); } - late final __objc_msgSend_426Ptr = _lookup< + late final __objc_msgSend_459Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< + late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _class_NSURLSessionUploadTask1 = _getClass1("NSURLSessionUploadTask"); + late final _sel_cancelByProducingResumeData_1 = + _registerName1("cancelByProducingResumeData:"); + void _objc_msgSend_460( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_460( + obj, + sel, + completionHandler, + ); + } + + late final __objc_msgSend_460Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + late final _sel_uploadTaskWithRequest_fromFile_1 = _registerName1("uploadTaskWithRequest:fromFile:"); - ffi.Pointer _objc_msgSend_427( + ffi.Pointer _objc_msgSend_461( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer fileURL, ) { - return __objc_msgSend_427( + return __objc_msgSend_461( obj, sel, request, @@ -48396,14 +48391,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_427Ptr = _lookup< + late final __objc_msgSend_461Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< + late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48412,13 +48407,13 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithRequest_fromData_1 = _registerName1("uploadTaskWithRequest:fromData:"); - ffi.Pointer _objc_msgSend_428( + ffi.Pointer _objc_msgSend_462( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer bodyData, ) { - return __objc_msgSend_428( + return __objc_msgSend_462( obj, sel, request, @@ -48426,129 +48421,129 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_428Ptr = _lookup< + late final __objc_msgSend_462Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< + late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _sel_uploadTaskWithStreamedRequest_1 = - _registerName1("uploadTaskWithStreamedRequest:"); - ffi.Pointer _objc_msgSend_429( + late final _sel_uploadTaskWithResumeData_1 = + _registerName1("uploadTaskWithResumeData:"); + ffi.Pointer _objc_msgSend_463( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer request, + ffi.Pointer resumeData, ) { - return __objc_msgSend_429( + return __objc_msgSend_463( obj, sel, - request, + resumeData, ); } - late final __objc_msgSend_429Ptr = _lookup< + late final __objc_msgSend_463Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< + late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final _class_NSURLSessionDownloadTask1 = - _getClass1("NSURLSessionDownloadTask"); - late final _sel_cancelByProducingResumeData_1 = - _registerName1("cancelByProducingResumeData:"); - void _objc_msgSend_430( + late final _sel_uploadTaskWithStreamedRequest_1 = + _registerName1("uploadTaskWithStreamedRequest:"); + ffi.Pointer _objc_msgSend_464( ffi.Pointer obj, ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, + ffi.Pointer request, ) { - return __objc_msgSend_430( + return __objc_msgSend_464( obj, sel, - completionHandler, + request, ); } - late final __objc_msgSend_430Ptr = _lookup< + late final __objc_msgSend_464Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + late final _class_NSURLSessionDownloadTask1 = + _getClass1("NSURLSessionDownloadTask"); late final _sel_downloadTaskWithRequest_1 = _registerName1("downloadTaskWithRequest:"); - ffi.Pointer _objc_msgSend_431( + ffi.Pointer _objc_msgSend_465( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_431( + return __objc_msgSend_465( obj, sel, request, ); } - late final __objc_msgSend_431Ptr = _lookup< + late final __objc_msgSend_465Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< + late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_downloadTaskWithURL_1 = _registerName1("downloadTaskWithURL:"); - ffi.Pointer _objc_msgSend_432( + ffi.Pointer _objc_msgSend_466( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_432( + return __objc_msgSend_466( obj, sel, url, ); } - late final __objc_msgSend_432Ptr = _lookup< + late final __objc_msgSend_466Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< + late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_downloadTaskWithResumeData_1 = _registerName1("downloadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_433( + ffi.Pointer _objc_msgSend_467( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer resumeData, ) { - return __objc_msgSend_433( + return __objc_msgSend_467( obj, sel, resumeData, ); } - late final __objc_msgSend_433Ptr = _lookup< + late final __objc_msgSend_467Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< + late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -48557,7 +48552,7 @@ class NativeCupertinoHttp { late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = _registerName1( "readDataOfMinLength:maxLength:timeout:completionHandler:"); - void _objc_msgSend_434( + void _objc_msgSend_468( ffi.Pointer obj, ffi.Pointer sel, int minBytes, @@ -48565,7 +48560,7 @@ class NativeCupertinoHttp { double timeout, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_434( + return __objc_msgSend_468( obj, sel, minBytes, @@ -48575,7 +48570,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_434Ptr = _lookup< + late final __objc_msgSend_468Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48584,20 +48579,20 @@ class NativeCupertinoHttp { NSUInteger, NSTimeInterval, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< + late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, int, double, ffi.Pointer<_ObjCBlock>)>(); late final _sel_writeData_timeout_completionHandler_1 = _registerName1("writeData:timeout:completionHandler:"); - void _objc_msgSend_435( + void _objc_msgSend_469( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, double timeout, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_435( + return __objc_msgSend_469( obj, sel, data, @@ -48606,7 +48601,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_435Ptr = _lookup< + late final __objc_msgSend_469Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -48614,7 +48609,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSTimeInterval, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< + late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); @@ -48627,13 +48622,13 @@ class NativeCupertinoHttp { _registerName1("stopSecureConnection"); late final _sel_streamTaskWithHostName_port_1 = _registerName1("streamTaskWithHostName:port:"); - ffi.Pointer _objc_msgSend_436( + ffi.Pointer _objc_msgSend_470( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer hostname, int port, ) { - return __objc_msgSend_436( + return __objc_msgSend_470( obj, sel, hostname, @@ -48641,37 +48636,37 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_436Ptr = _lookup< + late final __objc_msgSend_470Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< + late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _class_NSNetService1 = _getClass1("NSNetService"); late final _sel_streamTaskWithNetService_1 = _registerName1("streamTaskWithNetService:"); - ffi.Pointer _objc_msgSend_437( + ffi.Pointer _objc_msgSend_471( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer service, ) { - return __objc_msgSend_437( + return __objc_msgSend_471( obj, sel, service, ); } - late final __objc_msgSend_437Ptr = _lookup< + late final __objc_msgSend_471Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< + late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -48680,32 +48675,32 @@ class NativeCupertinoHttp { late final _class_NSURLSessionWebSocketMessage1 = _getClass1("NSURLSessionWebSocketMessage"); late final _sel_type1 = _registerName1("type"); - int _objc_msgSend_438( + int _objc_msgSend_472( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_438( + return __objc_msgSend_472( obj, sel, ); } - late final __objc_msgSend_438Ptr = _lookup< + late final __objc_msgSend_472Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< + late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_sendMessage_completionHandler_1 = _registerName1("sendMessage:completionHandler:"); - void _objc_msgSend_439( + void _objc_msgSend_473( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer message, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_439( + return __objc_msgSend_473( obj, sel, message, @@ -48713,70 +48708,70 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_439Ptr = _lookup< + late final __objc_msgSend_473Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< + late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_receiveMessageWithCompletionHandler_1 = _registerName1("receiveMessageWithCompletionHandler:"); - void _objc_msgSend_440( + void _objc_msgSend_474( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_440( + return __objc_msgSend_474( obj, sel, completionHandler, ); } - late final __objc_msgSend_440Ptr = _lookup< + late final __objc_msgSend_474Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< + late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_sendPingWithPongReceiveHandler_1 = _registerName1("sendPingWithPongReceiveHandler:"); - void _objc_msgSend_441( + void _objc_msgSend_475( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> pongReceiveHandler, ) { - return __objc_msgSend_441( + return __objc_msgSend_475( obj, sel, pongReceiveHandler, ); } - late final __objc_msgSend_441Ptr = _lookup< + late final __objc_msgSend_475Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< + late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); late final _sel_cancelWithCloseCode_reason_1 = _registerName1("cancelWithCloseCode:reason:"); - void _objc_msgSend_442( + void _objc_msgSend_476( ffi.Pointer obj, ffi.Pointer sel, int closeCode, ffi.Pointer reason, ) { - return __objc_msgSend_442( + return __objc_msgSend_476( obj, sel, closeCode, @@ -48784,11 +48779,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_442Ptr = _lookup< + late final __objc_msgSend_476Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< + late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int, ffi.Pointer)>(); @@ -48796,55 +48791,55 @@ class NativeCupertinoHttp { late final _sel_setMaximumMessageSize_1 = _registerName1("setMaximumMessageSize:"); late final _sel_closeCode1 = _registerName1("closeCode"); - int _objc_msgSend_443( + int _objc_msgSend_477( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_443( + return __objc_msgSend_477( obj, sel, ); } - late final __objc_msgSend_443Ptr = _lookup< + late final __objc_msgSend_477Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< + late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_closeReason1 = _registerName1("closeReason"); late final _sel_webSocketTaskWithURL_1 = _registerName1("webSocketTaskWithURL:"); - ffi.Pointer _objc_msgSend_444( + ffi.Pointer _objc_msgSend_478( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ) { - return __objc_msgSend_444( + return __objc_msgSend_478( obj, sel, url, ); } - late final __objc_msgSend_444Ptr = _lookup< + late final __objc_msgSend_478Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< + late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_webSocketTaskWithURL_protocols_1 = _registerName1("webSocketTaskWithURL:protocols:"); - ffi.Pointer _objc_msgSend_445( + ffi.Pointer _objc_msgSend_479( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer protocols, ) { - return __objc_msgSend_445( + return __objc_msgSend_479( obj, sel, url, @@ -48852,14 +48847,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_445Ptr = _lookup< + late final __objc_msgSend_479Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< + late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48868,35 +48863,35 @@ class NativeCupertinoHttp { late final _sel_webSocketTaskWithRequest_1 = _registerName1("webSocketTaskWithRequest:"); - ffi.Pointer _objc_msgSend_446( + ffi.Pointer _objc_msgSend_480( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ) { - return __objc_msgSend_446( + return __objc_msgSend_480( obj, sel, request, ); } - late final __objc_msgSend_446Ptr = _lookup< + late final __objc_msgSend_480Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< + late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_dataTaskWithRequest_completionHandler_1 = _registerName1("dataTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_447( + ffi.Pointer _objc_msgSend_481( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_447( + return __objc_msgSend_481( obj, sel, request, @@ -48904,14 +48899,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_447Ptr = _lookup< + late final __objc_msgSend_481Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< + late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48920,13 +48915,13 @@ class NativeCupertinoHttp { late final _sel_dataTaskWithURL_completionHandler_1 = _registerName1("dataTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_448( + ffi.Pointer _objc_msgSend_482( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_448( + return __objc_msgSend_482( obj, sel, url, @@ -48934,14 +48929,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_448Ptr = _lookup< + late final __objc_msgSend_482Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< + late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48950,14 +48945,14 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); - ffi.Pointer _objc_msgSend_449( + ffi.Pointer _objc_msgSend_483( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer fileURL, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_449( + return __objc_msgSend_483( obj, sel, request, @@ -48966,7 +48961,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_449Ptr = _lookup< + late final __objc_msgSend_483Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -48974,7 +48969,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< + late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -48984,14 +48979,14 @@ class NativeCupertinoHttp { late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); - ffi.Pointer _objc_msgSend_450( + ffi.Pointer _objc_msgSend_484( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer bodyData, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_450( + return __objc_msgSend_484( obj, sel, request, @@ -49000,7 +48995,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_450Ptr = _lookup< + late final __objc_msgSend_484Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -49008,7 +49003,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< + late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -49016,15 +49011,45 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + late final _sel_uploadTaskWithResumeData_completionHandler_1 = + _registerName1("uploadTaskWithResumeData:completionHandler:"); + ffi.Pointer _objc_msgSend_485( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer resumeData, + ffi.Pointer<_ObjCBlock> completionHandler, + ) { + return __objc_msgSend_485( + obj, + sel, + resumeData, + completionHandler, + ); + } + + late final __objc_msgSend_485Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); + late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_ObjCBlock>)>(); + late final _sel_downloadTaskWithRequest_completionHandler_1 = _registerName1("downloadTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_451( + ffi.Pointer _objc_msgSend_486( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer request, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_451( + return __objc_msgSend_486( obj, sel, request, @@ -49032,14 +49057,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_451Ptr = _lookup< + late final __objc_msgSend_486Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< + late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -49048,13 +49073,13 @@ class NativeCupertinoHttp { late final _sel_downloadTaskWithURL_completionHandler_1 = _registerName1("downloadTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_452( + ffi.Pointer _objc_msgSend_487( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_452( + return __objc_msgSend_487( obj, sel, url, @@ -49062,14 +49087,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_452Ptr = _lookup< + late final __objc_msgSend_487Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< + late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -49078,13 +49103,13 @@ class NativeCupertinoHttp { late final _sel_downloadTaskWithResumeData_completionHandler_1 = _registerName1("downloadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_453( + ffi.Pointer _objc_msgSend_488( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer resumeData, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_453( + return __objc_msgSend_488( obj, sel, resumeData, @@ -49092,14 +49117,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_453Ptr = _lookup< + late final __objc_msgSend_488Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< + late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -49112,26 +49137,17 @@ class NativeCupertinoHttp { double get NSURLSessionTaskPriorityDefault => _NSURLSessionTaskPriorityDefault.value; - set NSURLSessionTaskPriorityDefault(double value) => - _NSURLSessionTaskPriorityDefault.value = value; - late final ffi.Pointer _NSURLSessionTaskPriorityLow = _lookup('NSURLSessionTaskPriorityLow'); double get NSURLSessionTaskPriorityLow => _NSURLSessionTaskPriorityLow.value; - set NSURLSessionTaskPriorityLow(double value) => - _NSURLSessionTaskPriorityLow.value = value; - late final ffi.Pointer _NSURLSessionTaskPriorityHigh = _lookup('NSURLSessionTaskPriorityHigh'); double get NSURLSessionTaskPriorityHigh => _NSURLSessionTaskPriorityHigh.value; - set NSURLSessionTaskPriorityHigh(double value) => - _NSURLSessionTaskPriorityHigh.value = value; - /// Key in the userInfo dictionary of an NSError received during a failed download. late final ffi.Pointer> _NSURLSessionDownloadTaskResumeData = @@ -49143,9 +49159,38 @@ class NativeCupertinoHttp { set NSURLSessionDownloadTaskResumeData(ffi.Pointer value) => _NSURLSessionDownloadTaskResumeData.value = value; + /// Key in the userInfo dictionary of an NSError received during a failed upload. + late final ffi.Pointer> + _NSURLSessionUploadTaskResumeData = + _lookup>('NSURLSessionUploadTaskResumeData'); + + ffi.Pointer get NSURLSessionUploadTaskResumeData => + _NSURLSessionUploadTaskResumeData.value; + + set NSURLSessionUploadTaskResumeData(ffi.Pointer value) => + _NSURLSessionUploadTaskResumeData.value = value; + late final _class_NSURLSessionTaskTransactionMetrics1 = _getClass1("NSURLSessionTaskTransactionMetrics"); late final _sel_request1 = _registerName1("request"); + ffi.Pointer _objc_msgSend_489( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_489( + obj, + sel, + ); + } + + late final __objc_msgSend_489Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _sel_fetchStartDate1 = _registerName1("fetchStartDate"); late final _sel_domainLookupStartDate1 = _registerName1("domainLookupStartDate"); @@ -49164,21 +49209,21 @@ class NativeCupertinoHttp { late final _sel_isProxyConnection1 = _registerName1("isProxyConnection"); late final _sel_isReusedConnection1 = _registerName1("isReusedConnection"); late final _sel_resourceFetchType1 = _registerName1("resourceFetchType"); - int _objc_msgSend_454( + int _objc_msgSend_490( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_454( + return __objc_msgSend_490( obj, sel, ); } - late final __objc_msgSend_454Ptr = _lookup< + late final __objc_msgSend_490Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< + late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _sel_countOfRequestHeaderBytesSent1 = @@ -49207,21 +49252,21 @@ class NativeCupertinoHttp { late final _sel_isMultipath1 = _registerName1("isMultipath"); late final _sel_domainResolutionProtocol1 = _registerName1("domainResolutionProtocol"); - int _objc_msgSend_455( + int _objc_msgSend_491( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_455( + return __objc_msgSend_491( obj, sel, ); } - late final __objc_msgSend_455Ptr = _lookup< + late final __objc_msgSend_491Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< + late final __objc_msgSend_491 = __objc_msgSend_491Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _class_NSURLSessionTaskMetrics1 = @@ -49229,21 +49274,21 @@ class NativeCupertinoHttp { late final _sel_transactionMetrics1 = _registerName1("transactionMetrics"); late final _class_NSDateInterval1 = _getClass1("NSDateInterval"); late final _sel_taskInterval1 = _registerName1("taskInterval"); - ffi.Pointer _objc_msgSend_456( + ffi.Pointer _objc_msgSend_492( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_456( + return __objc_msgSend_492( obj, sel, ); } - late final __objc_msgSend_456Ptr = _lookup< + late final __objc_msgSend_492Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< + late final __objc_msgSend_492 = __objc_msgSend_492Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -49252,14 +49297,14 @@ class NativeCupertinoHttp { late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = _registerName1( "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); - void _objc_msgSend_457( + void _objc_msgSend_493( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, int visibility, ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_457( + return __objc_msgSend_493( obj, sel, typeIdentifier, @@ -49268,7 +49313,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_457Ptr = _lookup< + late final __objc_msgSend_493Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -49276,14 +49321,14 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< + late final __objc_msgSend_493 = __objc_msgSend_493Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = _registerName1( "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); - void _objc_msgSend_458( + void _objc_msgSend_494( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, @@ -49291,7 +49336,7 @@ class NativeCupertinoHttp { int visibility, ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_458( + return __objc_msgSend_494( obj, sel, typeIdentifier, @@ -49301,7 +49346,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_458Ptr = _lookup< + late final __objc_msgSend_494Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -49310,7 +49355,7 @@ class NativeCupertinoHttp { ffi.Int32, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< + late final __objc_msgSend_494 = __objc_msgSend_494Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); @@ -49318,23 +49363,23 @@ class NativeCupertinoHttp { _registerName1("registeredTypeIdentifiers"); late final _sel_registeredTypeIdentifiersWithFileOptions_1 = _registerName1("registeredTypeIdentifiersWithFileOptions:"); - ffi.Pointer _objc_msgSend_459( + ffi.Pointer _objc_msgSend_495( ffi.Pointer obj, ffi.Pointer sel, int fileOptions, ) { - return __objc_msgSend_459( + return __objc_msgSend_495( obj, sel, fileOptions, ); } - late final __objc_msgSend_459Ptr = _lookup< + late final __objc_msgSend_495Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< + late final __objc_msgSend_495 = __objc_msgSend_495Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -49343,13 +49388,13 @@ class NativeCupertinoHttp { late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = _registerName1( "hasRepresentationConformingToTypeIdentifier:fileOptions:"); - bool _objc_msgSend_460( + bool _objc_msgSend_496( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, int fileOptions, ) { - return __objc_msgSend_460( + return __objc_msgSend_496( obj, sel, typeIdentifier, @@ -49357,24 +49402,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_460Ptr = _lookup< + late final __objc_msgSend_496Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< + late final __objc_msgSend_496 = __objc_msgSend_496Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = _registerName1( "loadDataRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_461( + ffi.Pointer _objc_msgSend_497( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_461( + return __objc_msgSend_497( obj, sel, typeIdentifier, @@ -49382,14 +49427,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_461Ptr = _lookup< + late final __objc_msgSend_497Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< + late final __objc_msgSend_497 = __objc_msgSend_497Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -49399,13 +49444,13 @@ class NativeCupertinoHttp { late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = _registerName1( "loadFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_462( + ffi.Pointer _objc_msgSend_498( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_462( + return __objc_msgSend_498( obj, sel, typeIdentifier, @@ -49413,14 +49458,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_462Ptr = _lookup< + late final __objc_msgSend_498Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< + late final __objc_msgSend_498 = __objc_msgSend_498Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -49430,13 +49475,13 @@ class NativeCupertinoHttp { late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = _registerName1( "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_463( + ffi.Pointer _objc_msgSend_499( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_463( + return __objc_msgSend_499( obj, sel, typeIdentifier, @@ -49444,14 +49489,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_463Ptr = _lookup< + late final __objc_msgSend_499Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< + late final __objc_msgSend_499 = __objc_msgSend_499Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -49463,13 +49508,13 @@ class NativeCupertinoHttp { late final _sel_initWithObject_1 = _registerName1("initWithObject:"); late final _sel_registerObject_visibility_1 = _registerName1("registerObject:visibility:"); - void _objc_msgSend_464( + void _objc_msgSend_500( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer object, int visibility, ) { - return __objc_msgSend_464( + return __objc_msgSend_500( obj, sel, object, @@ -49477,24 +49522,24 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_464Ptr = _lookup< + late final __objc_msgSend_500Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< + late final __objc_msgSend_500 = __objc_msgSend_500Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); late final _sel_registerObjectOfClass_visibility_loadHandler_1 = _registerName1("registerObjectOfClass:visibility:loadHandler:"); - void _objc_msgSend_465( + void _objc_msgSend_501( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aClass, int visibility, ffi.Pointer<_ObjCBlock> loadHandler, ) { - return __objc_msgSend_465( + return __objc_msgSend_501( obj, sel, aClass, @@ -49503,7 +49548,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_465Ptr = _lookup< + late final __objc_msgSend_501Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -49511,7 +49556,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< + late final __objc_msgSend_501 = __objc_msgSend_501Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); @@ -49519,13 +49564,13 @@ class NativeCupertinoHttp { _registerName1("canLoadObjectOfClass:"); late final _sel_loadObjectOfClass_completionHandler_1 = _registerName1("loadObjectOfClass:completionHandler:"); - ffi.Pointer _objc_msgSend_466( + ffi.Pointer _objc_msgSend_502( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aClass, ffi.Pointer<_ObjCBlock> completionHandler, ) { - return __objc_msgSend_466( + return __objc_msgSend_502( obj, sel, aClass, @@ -49533,14 +49578,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_466Ptr = _lookup< + late final __objc_msgSend_502Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< + late final __objc_msgSend_502 = __objc_msgSend_502Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -49549,13 +49594,13 @@ class NativeCupertinoHttp { late final _sel_initWithItem_typeIdentifier_1 = _registerName1("initWithItem:typeIdentifier:"); - instancetype _objc_msgSend_467( + instancetype _objc_msgSend_503( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer item, ffi.Pointer typeIdentifier, ) { - return __objc_msgSend_467( + return __objc_msgSend_503( obj, sel, item, @@ -49563,26 +49608,26 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_467Ptr = _lookup< + late final __objc_msgSend_503Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< + late final __objc_msgSend_503 = __objc_msgSend_503Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_registerItemForTypeIdentifier_loadHandler_1 = _registerName1("registerItemForTypeIdentifier:loadHandler:"); - void _objc_msgSend_468( + void _objc_msgSend_504( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, NSItemProviderLoadHandler loadHandler, ) { - return __objc_msgSend_468( + return __objc_msgSend_504( obj, sel, typeIdentifier, @@ -49590,27 +49635,27 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_468Ptr = _lookup< + late final __objc_msgSend_504Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< + late final __objc_msgSend_504 = __objc_msgSend_504Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>(); late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); - void _objc_msgSend_469( + void _objc_msgSend_505( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer typeIdentifier, ffi.Pointer options, NSItemProviderCompletionHandler completionHandler, ) { - return __objc_msgSend_469( + return __objc_msgSend_505( obj, sel, typeIdentifier, @@ -49619,7 +49664,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_469Ptr = _lookup< + late final __objc_msgSend_505Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -49627,7 +49672,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< + late final __objc_msgSend_505 = __objc_msgSend_505Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -49636,55 +49681,55 @@ class NativeCupertinoHttp { NSItemProviderCompletionHandler)>(); late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); - NSItemProviderLoadHandler _objc_msgSend_470( + NSItemProviderLoadHandler _objc_msgSend_506( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_470( + return __objc_msgSend_506( obj, sel, ); } - late final __objc_msgSend_470Ptr = _lookup< + late final __objc_msgSend_506Ptr = _lookup< ffi.NativeFunction< NSItemProviderLoadHandler Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< + late final __objc_msgSend_506 = __objc_msgSend_506Ptr.asFunction< NSItemProviderLoadHandler Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setPreviewImageHandler_1 = _registerName1("setPreviewImageHandler:"); - void _objc_msgSend_471( + void _objc_msgSend_507( ffi.Pointer obj, ffi.Pointer sel, NSItemProviderLoadHandler value, ) { - return __objc_msgSend_471( + return __objc_msgSend_507( obj, sel, value, ); } - late final __objc_msgSend_471Ptr = _lookup< + late final __objc_msgSend_507Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< + late final __objc_msgSend_507 = __objc_msgSend_507Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSItemProviderLoadHandler)>(); late final _sel_loadPreviewImageWithOptions_completionHandler_1 = _registerName1("loadPreviewImageWithOptions:completionHandler:"); - void _objc_msgSend_472( + void _objc_msgSend_508( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer options, NSItemProviderCompletionHandler completionHandler, ) { - return __objc_msgSend_472( + return __objc_msgSend_508( obj, sel, options, @@ -49692,14 +49737,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_472Ptr = _lookup< + late final __objc_msgSend_508Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< + late final __objc_msgSend_508 = __objc_msgSend_508Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSItemProviderCompletionHandler)>(); @@ -49986,13 +50031,13 @@ class NativeCupertinoHttp { late final _class_NSMutableString1 = _getClass1("NSMutableString"); late final _sel_replaceCharactersInRange_withString_1 = _registerName1("replaceCharactersInRange:withString:"); - void _objc_msgSend_473( + void _objc_msgSend_509( ffi.Pointer obj, ffi.Pointer sel, NSRange range, ffi.Pointer aString, ) { - return __objc_msgSend_473( + return __objc_msgSend_509( obj, sel, range, @@ -50000,23 +50045,23 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_473Ptr = _lookup< + late final __objc_msgSend_509Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< + late final __objc_msgSend_509 = __objc_msgSend_509Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSRange, ffi.Pointer)>(); late final _sel_insertString_atIndex_1 = _registerName1("insertString:atIndex:"); - void _objc_msgSend_474( + void _objc_msgSend_510( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aString, int loc, ) { - return __objc_msgSend_474( + return __objc_msgSend_510( obj, sel, aString, @@ -50024,11 +50069,11 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_474Ptr = _lookup< + late final __objc_msgSend_510Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< + late final __objc_msgSend_510 = __objc_msgSend_510Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, int)>(); @@ -50039,7 +50084,7 @@ class NativeCupertinoHttp { late final _sel_setString_1 = _registerName1("setString:"); late final _sel_replaceOccurrencesOfString_withString_options_range_1 = _registerName1("replaceOccurrencesOfString:withString:options:range:"); - int _objc_msgSend_475( + int _objc_msgSend_511( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer target, @@ -50047,7 +50092,7 @@ class NativeCupertinoHttp { int options, NSRange searchRange, ) { - return __objc_msgSend_475( + return __objc_msgSend_511( obj, sel, target, @@ -50057,7 +50102,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_475Ptr = _lookup< + late final __objc_msgSend_511Ptr = _lookup< ffi.NativeFunction< NSUInteger Function( ffi.Pointer, @@ -50066,13 +50111,13 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< + late final __objc_msgSend_511 = __objc_msgSend_511Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, int, NSRange)>(); late final _sel_applyTransform_reverse_range_updatedRange_1 = _registerName1("applyTransform:reverse:range:updatedRange:"); - bool _objc_msgSend_476( + bool _objc_msgSend_512( ffi.Pointer obj, ffi.Pointer sel, NSStringTransform transform, @@ -50080,7 +50125,7 @@ class NativeCupertinoHttp { NSRange range, NSRangePointer resultingRange, ) { - return __objc_msgSend_476( + return __objc_msgSend_512( obj, sel, transform, @@ -50090,7 +50135,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_476Ptr = _lookup< + late final __objc_msgSend_512Ptr = _lookup< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, @@ -50099,27 +50144,27 @@ class NativeCupertinoHttp { ffi.Bool, NSRange, NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< + late final __objc_msgSend_512 = __objc_msgSend_512Ptr.asFunction< bool Function(ffi.Pointer, ffi.Pointer, NSStringTransform, bool, NSRange, NSRangePointer)>(); - ffi.Pointer _objc_msgSend_477( + ffi.Pointer _objc_msgSend_513( ffi.Pointer obj, ffi.Pointer sel, int capacity, ) { - return __objc_msgSend_477( + return __objc_msgSend_513( obj, sel, capacity, ); } - late final __objc_msgSend_477Ptr = _lookup< + late final __objc_msgSend_513Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< + late final __objc_msgSend_513 = __objc_msgSend_513Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -50155,86 +50200,106 @@ class NativeCupertinoHttp { _registerName1("removeCharactersInString:"); late final _sel_formUnionWithCharacterSet_1 = _registerName1("formUnionWithCharacterSet:"); - void _objc_msgSend_478( + void _objc_msgSend_514( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer otherSet, ) { - return __objc_msgSend_478( + return __objc_msgSend_514( obj, sel, otherSet, ); } - late final __objc_msgSend_478Ptr = _lookup< + late final __objc_msgSend_514Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< + late final __objc_msgSend_514 = __objc_msgSend_514Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_formIntersectionWithCharacterSet_1 = _registerName1("formIntersectionWithCharacterSet:"); late final _sel_invert1 = _registerName1("invert"); - ffi.Pointer _objc_msgSend_479( + ffi.Pointer _objc_msgSend_515( ffi.Pointer obj, ffi.Pointer sel, NSRange aRange, ) { - return __objc_msgSend_479( + return __objc_msgSend_515( obj, sel, aRange, ); } - late final __objc_msgSend_479Ptr = _lookup< + late final __objc_msgSend_515Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< + late final __objc_msgSend_515 = __objc_msgSend_515Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, NSRange)>(); - ffi.Pointer _objc_msgSend_480( + ffi.Pointer _objc_msgSend_516( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer aString, ) { - return __objc_msgSend_480( + return __objc_msgSend_516( obj, sel, aString, ); } - late final __objc_msgSend_480Ptr = _lookup< + late final __objc_msgSend_516Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< + late final __objc_msgSend_516 = __objc_msgSend_516Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _objc_msgSend_481( + ffi.Pointer _objc_msgSend_517( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, ) { - return __objc_msgSend_481( + return __objc_msgSend_517( obj, sel, data, ); } - late final __objc_msgSend_481Ptr = _lookup< + late final __objc_msgSend_517Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< + late final __objc_msgSend_517 = __objc_msgSend_517Ptr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_518( + ffi.Pointer obj, + ffi.Pointer sel, + ffi.Pointer fName, + ) { + return __objc_msgSend_518( + obj, + sel, + fName, + ); + } + + late final __objc_msgSend_518Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_518 = __objc_msgSend_518Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -50244,9 +50309,6 @@ class NativeCupertinoHttp { ffi.Pointer get NSHTTPPropertyStatusCodeKey => _NSHTTPPropertyStatusCodeKey.value; - set NSHTTPPropertyStatusCodeKey(ffi.Pointer value) => - _NSHTTPPropertyStatusCodeKey.value = value; - late final ffi.Pointer> _NSHTTPPropertyStatusReasonKey = _lookup>('NSHTTPPropertyStatusReasonKey'); @@ -50254,9 +50316,6 @@ class NativeCupertinoHttp { ffi.Pointer get NSHTTPPropertyStatusReasonKey => _NSHTTPPropertyStatusReasonKey.value; - set NSHTTPPropertyStatusReasonKey(ffi.Pointer value) => - _NSHTTPPropertyStatusReasonKey.value = value; - late final ffi.Pointer> _NSHTTPPropertyServerHTTPVersionKey = _lookup>('NSHTTPPropertyServerHTTPVersionKey'); @@ -50264,9 +50323,6 @@ class NativeCupertinoHttp { ffi.Pointer get NSHTTPPropertyServerHTTPVersionKey => _NSHTTPPropertyServerHTTPVersionKey.value; - set NSHTTPPropertyServerHTTPVersionKey(ffi.Pointer value) => - _NSHTTPPropertyServerHTTPVersionKey.value = value; - late final ffi.Pointer> _NSHTTPPropertyRedirectionHeadersKey = _lookup>('NSHTTPPropertyRedirectionHeadersKey'); @@ -50274,9 +50330,6 @@ class NativeCupertinoHttp { ffi.Pointer get NSHTTPPropertyRedirectionHeadersKey => _NSHTTPPropertyRedirectionHeadersKey.value; - set NSHTTPPropertyRedirectionHeadersKey(ffi.Pointer value) => - _NSHTTPPropertyRedirectionHeadersKey.value = value; - late final ffi.Pointer> _NSHTTPPropertyErrorPageDataKey = _lookup>('NSHTTPPropertyErrorPageDataKey'); @@ -50284,27 +50337,18 @@ class NativeCupertinoHttp { ffi.Pointer get NSHTTPPropertyErrorPageDataKey => _NSHTTPPropertyErrorPageDataKey.value; - set NSHTTPPropertyErrorPageDataKey(ffi.Pointer value) => - _NSHTTPPropertyErrorPageDataKey.value = value; - late final ffi.Pointer> _NSHTTPPropertyHTTPProxy = _lookup>('NSHTTPPropertyHTTPProxy'); ffi.Pointer get NSHTTPPropertyHTTPProxy => _NSHTTPPropertyHTTPProxy.value; - set NSHTTPPropertyHTTPProxy(ffi.Pointer value) => - _NSHTTPPropertyHTTPProxy.value = value; - late final ffi.Pointer> _NSFTPPropertyUserLoginKey = _lookup>('NSFTPPropertyUserLoginKey'); ffi.Pointer get NSFTPPropertyUserLoginKey => _NSFTPPropertyUserLoginKey.value; - set NSFTPPropertyUserLoginKey(ffi.Pointer value) => - _NSFTPPropertyUserLoginKey.value = value; - late final ffi.Pointer> _NSFTPPropertyUserPasswordKey = _lookup>('NSFTPPropertyUserPasswordKey'); @@ -50312,9 +50356,6 @@ class NativeCupertinoHttp { ffi.Pointer get NSFTPPropertyUserPasswordKey => _NSFTPPropertyUserPasswordKey.value; - set NSFTPPropertyUserPasswordKey(ffi.Pointer value) => - _NSFTPPropertyUserPasswordKey.value = value; - late final ffi.Pointer> _NSFTPPropertyActiveTransferModeKey = _lookup>('NSFTPPropertyActiveTransferModeKey'); @@ -50322,27 +50363,18 @@ class NativeCupertinoHttp { ffi.Pointer get NSFTPPropertyActiveTransferModeKey => _NSFTPPropertyActiveTransferModeKey.value; - set NSFTPPropertyActiveTransferModeKey(ffi.Pointer value) => - _NSFTPPropertyActiveTransferModeKey.value = value; - late final ffi.Pointer> _NSFTPPropertyFileOffsetKey = _lookup>('NSFTPPropertyFileOffsetKey'); ffi.Pointer get NSFTPPropertyFileOffsetKey => _NSFTPPropertyFileOffsetKey.value; - set NSFTPPropertyFileOffsetKey(ffi.Pointer value) => - _NSFTPPropertyFileOffsetKey.value = value; - late final ffi.Pointer> _NSFTPPropertyFTPProxy = _lookup>('NSFTPPropertyFTPProxy'); ffi.Pointer get NSFTPPropertyFTPProxy => _NSFTPPropertyFTPProxy.value; - set NSFTPPropertyFTPProxy(ffi.Pointer value) => - _NSFTPPropertyFTPProxy.value = value; - /// A string constant for the "file" URL scheme. If you are using this to compare to a URL's scheme to see if it is a file URL, you should instead use the NSURL fileURL property -- the fileURL property is much faster. late final ffi.Pointer> _NSURLFileScheme = _lookup>('NSURLFileScheme'); @@ -51049,6 +51081,29 @@ class NativeCupertinoHttp { NSURLFileProtectionType value) => _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; + /// The file is stored in an encrypted format on disk and cannot be accessed until after first unlock after the device has booted. After this first unlock, your app can access the file even while the device is locked until access expiry. Access is renewed once the user unlocks the device again. + late final ffi.Pointer + _NSURLFileProtectionCompleteWhenUserInactive = + _lookup( + 'NSURLFileProtectionCompleteWhenUserInactive'); + + NSURLFileProtectionType get NSURLFileProtectionCompleteWhenUserInactive => + _NSURLFileProtectionCompleteWhenUserInactive.value; + + set NSURLFileProtectionCompleteWhenUserInactive( + NSURLFileProtectionType value) => + _NSURLFileProtectionCompleteWhenUserInactive.value = value; + + /// Returns the count of file system objects contained in the directory. This is a count of objects actually stored in the file system, so excludes virtual items like "." and "..". The property is useful for quickly identifying an empty directory for backup and syncing. If the URL is not a directory or the file system cannot cheaply compute the value, `nil` is returned. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLDirectoryEntryCountKey = + _lookup('NSURLDirectoryEntryCountKey'); + + NSURLResourceKey get NSURLDirectoryEntryCountKey => + _NSURLDirectoryEntryCountKey.value; + + set NSURLDirectoryEntryCountKey(NSURLResourceKey value) => + _NSURLDirectoryEntryCountKey.value = value; + /// The user-visible volume format (Read-only, value type NSString) late final ffi.Pointer _NSURLVolumeLocalizedFormatDescriptionKey = @@ -51820,13 +51875,13 @@ class NativeCupertinoHttp { late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); - instancetype _objc_msgSend_482( + instancetype _objc_msgSend_519( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer name, ffi.Pointer value, ) { - return __objc_msgSend_482( + return __objc_msgSend_519( obj, sel, name, @@ -51834,14 +51889,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_482Ptr = _lookup< + late final __objc_msgSend_519Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< + late final __objc_msgSend_519 = __objc_msgSend_519Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -51855,24 +51910,26 @@ class NativeCupertinoHttp { _registerName1("componentsWithURL:resolvingAgainstBaseURL:"); late final _sel_componentsWithString_1 = _registerName1("componentsWithString:"); + late final _sel_componentsWithString_encodingInvalidCharacters_1 = + _registerName1("componentsWithString:encodingInvalidCharacters:"); late final _sel_URLRelativeToURL_1 = _registerName1("URLRelativeToURL:"); - ffi.Pointer _objc_msgSend_483( + ffi.Pointer _objc_msgSend_520( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer baseURL, ) { - return __objc_msgSend_483( + return __objc_msgSend_520( obj, sel, baseURL, ); } - late final __objc_msgSend_483Ptr = _lookup< + late final __objc_msgSend_520Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< + late final __objc_msgSend_520 = __objc_msgSend_520Ptr.asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -51924,7 +51981,7 @@ class NativeCupertinoHttp { late final _class_NSHTTPURLResponse1 = _getClass1("NSHTTPURLResponse"); late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_1 = _registerName1("initWithURL:statusCode:HTTPVersion:headerFields:"); - instancetype _objc_msgSend_484( + instancetype _objc_msgSend_521( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer url, @@ -51932,7 +51989,7 @@ class NativeCupertinoHttp { ffi.Pointer HTTPVersion, ffi.Pointer headerFields, ) { - return __objc_msgSend_484( + return __objc_msgSend_521( obj, sel, url, @@ -51942,7 +51999,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_484Ptr = _lookup< + late final __objc_msgSend_521Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -51951,7 +52008,7 @@ class NativeCupertinoHttp { NSInteger, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< + late final __objc_msgSend_521 = __objc_msgSend_521Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -51964,23 +52021,23 @@ class NativeCupertinoHttp { late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); late final _sel_localizedStringForStatusCode_1 = _registerName1("localizedStringForStatusCode:"); - ffi.Pointer _objc_msgSend_485( + ffi.Pointer _objc_msgSend_522( ffi.Pointer obj, ffi.Pointer sel, int statusCode, ) { - return __objc_msgSend_485( + return __objc_msgSend_522( obj, sel, statusCode, ); } - late final __objc_msgSend_485Ptr = _lookup< + late final __objc_msgSend_522Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< + late final __objc_msgSend_522 = __objc_msgSend_522Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -52115,14 +52172,14 @@ class NativeCupertinoHttp { late final _class_NSException1 = _getClass1("NSException"); late final _sel_exceptionWithName_reason_userInfo_1 = _registerName1("exceptionWithName:reason:userInfo:"); - ffi.Pointer _objc_msgSend_486( + ffi.Pointer _objc_msgSend_523( ffi.Pointer obj, ffi.Pointer sel, NSExceptionName name, ffi.Pointer reason, ffi.Pointer userInfo, ) { - return __objc_msgSend_486( + return __objc_msgSend_523( obj, sel, name, @@ -52131,7 +52188,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_486Ptr = _lookup< + late final __objc_msgSend_523Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -52139,7 +52196,7 @@ class NativeCupertinoHttp { NSExceptionName, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< + late final __objc_msgSend_523 = __objc_msgSend_523Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -52149,14 +52206,14 @@ class NativeCupertinoHttp { late final _sel_initWithName_reason_userInfo_1 = _registerName1("initWithName:reason:userInfo:"); - instancetype _objc_msgSend_487( + instancetype _objc_msgSend_524( ffi.Pointer obj, ffi.Pointer sel, NSExceptionName aName, ffi.Pointer aReason, ffi.Pointer aUserInfo, ) { - return __objc_msgSend_487( + return __objc_msgSend_524( obj, sel, aName, @@ -52165,7 +52222,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_487Ptr = _lookup< + late final __objc_msgSend_524Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -52173,7 +52230,7 @@ class NativeCupertinoHttp { NSExceptionName, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< + late final __objc_msgSend_524 = __objc_msgSend_524Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, NSExceptionName, ffi.Pointer, ffi.Pointer)>(); @@ -52185,14 +52242,14 @@ class NativeCupertinoHttp { late final _sel_raise_format_1 = _registerName1("raise:format:"); late final _sel_raise_format_arguments_1 = _registerName1("raise:format:arguments:"); - void _objc_msgSend_488( + void _objc_msgSend_525( ffi.Pointer obj, ffi.Pointer sel, NSExceptionName name, ffi.Pointer format, va_list argList, ) { - return __objc_msgSend_488( + return __objc_msgSend_525( obj, sel, name, @@ -52201,7 +52258,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_488Ptr = _lookup< + late final __objc_msgSend_525Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -52209,7 +52266,7 @@ class NativeCupertinoHttp { NSExceptionName, ffi.Pointer, va_list)>>('objc_msgSend'); - late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< + late final __objc_msgSend_525 = __objc_msgSend_525Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, NSExceptionName, ffi.Pointer, va_list)>(); @@ -52250,28 +52307,28 @@ class NativeCupertinoHttp { late final _class_NSAssertionHandler1 = _getClass1("NSAssertionHandler"); late final _sel_currentHandler1 = _registerName1("currentHandler"); - ffi.Pointer _objc_msgSend_489( + ffi.Pointer _objc_msgSend_526( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_489( + return __objc_msgSend_526( obj, sel, ); } - late final __objc_msgSend_489Ptr = _lookup< + late final __objc_msgSend_526Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< + late final __objc_msgSend_526 = __objc_msgSend_526Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_handleFailureInMethod_object_file_lineNumber_description_1 = _registerName1( "handleFailureInMethod:object:file:lineNumber:description:"); - void _objc_msgSend_490( + void _objc_msgSend_527( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer selector, @@ -52280,7 +52337,7 @@ class NativeCupertinoHttp { int line, ffi.Pointer format, ) { - return __objc_msgSend_490( + return __objc_msgSend_527( obj, sel, selector, @@ -52291,7 +52348,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_490Ptr = _lookup< + late final __objc_msgSend_527Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -52301,7 +52358,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< + late final __objc_msgSend_527 = __objc_msgSend_527Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -52313,7 +52370,7 @@ class NativeCupertinoHttp { late final _sel_handleFailureInFunction_file_lineNumber_description_1 = _registerName1("handleFailureInFunction:file:lineNumber:description:"); - void _objc_msgSend_491( + void _objc_msgSend_528( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer functionName, @@ -52321,7 +52378,7 @@ class NativeCupertinoHttp { int line, ffi.Pointer format, ) { - return __objc_msgSend_491( + return __objc_msgSend_528( obj, sel, functionName, @@ -52331,7 +52388,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_491Ptr = _lookup< + late final __objc_msgSend_528Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, @@ -52340,7 +52397,7 @@ class NativeCupertinoHttp { ffi.Pointer, NSInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_491 = __objc_msgSend_491Ptr.asFunction< + late final __objc_msgSend_528 = __objc_msgSend_528Ptr.asFunction< void Function( ffi.Pointer, ffi.Pointer, @@ -52352,23 +52409,23 @@ class NativeCupertinoHttp { late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); late final _sel_blockOperationWithBlock_1 = _registerName1("blockOperationWithBlock:"); - instancetype _objc_msgSend_492( + instancetype _objc_msgSend_529( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer<_ObjCBlock> block, ) { - return __objc_msgSend_492( + return __objc_msgSend_529( obj, sel, block, ); } - late final __objc_msgSend_492Ptr = _lookup< + late final __objc_msgSend_529Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_492 = __objc_msgSend_492Ptr.asFunction< + late final __objc_msgSend_529 = __objc_msgSend_529Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); @@ -52378,14 +52435,14 @@ class NativeCupertinoHttp { _getClass1("NSInvocationOperation"); late final _sel_initWithTarget_selector_object_1 = _registerName1("initWithTarget:selector:object:"); - instancetype _objc_msgSend_493( + instancetype _objc_msgSend_530( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer target, ffi.Pointer sel1, ffi.Pointer arg, ) { - return __objc_msgSend_493( + return __objc_msgSend_530( obj, sel, target, @@ -52394,7 +52451,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_493Ptr = _lookup< + late final __objc_msgSend_530Ptr = _lookup< ffi.NativeFunction< instancetype Function( ffi.Pointer, @@ -52402,7 +52459,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_493 = __objc_msgSend_493Ptr.asFunction< + late final __objc_msgSend_530 = __objc_msgSend_530Ptr.asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, @@ -52411,42 +52468,42 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); - instancetype _objc_msgSend_494( + instancetype _objc_msgSend_531( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer inv, ) { - return __objc_msgSend_494( + return __objc_msgSend_531( obj, sel, inv, ); } - late final __objc_msgSend_494Ptr = _lookup< + late final __objc_msgSend_531Ptr = _lookup< ffi.NativeFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_494 = __objc_msgSend_494Ptr.asFunction< + late final __objc_msgSend_531 = __objc_msgSend_531Ptr.asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_invocation1 = _registerName1("invocation"); - ffi.Pointer _objc_msgSend_495( + ffi.Pointer _objc_msgSend_532( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_495( + return __objc_msgSend_532( obj, sel, ); } - late final __objc_msgSend_495Ptr = _lookup< + late final __objc_msgSend_532Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_495 = __objc_msgSend_495Ptr.asFunction< + late final __objc_msgSend_532 = __objc_msgSend_532Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -52478,9 +52535,6 @@ class NativeCupertinoHttp { int get NSOperationQueueDefaultMaxConcurrentOperationCount => _NSOperationQueueDefaultMaxConcurrentOperationCount.value; - set NSOperationQueueDefaultMaxConcurrentOperationCount(int value) => - _NSOperationQueueDefaultMaxConcurrentOperationCount.value = value; - /// Predefined domain for errors from most AppKit and Foundation APIs. late final ffi.Pointer _NSCocoaErrorDomain = _lookup('NSCocoaErrorDomain'); @@ -58886,23 +58940,23 @@ class NativeCupertinoHttp { late final _class_CUPHTTPTaskConfiguration1 = _getClass1("CUPHTTPTaskConfiguration"); late final _sel_initWithPort_1 = _registerName1("initWithPort:"); - ffi.Pointer _objc_msgSend_496( + ffi.Pointer _objc_msgSend_533( ffi.Pointer obj, ffi.Pointer sel, int sendPort, ) { - return __objc_msgSend_496( + return __objc_msgSend_533( obj, sel, sendPort, ); } - late final __objc_msgSend_496Ptr = _lookup< + late final __objc_msgSend_533Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, Dart_Port)>>('objc_msgSend'); - late final __objc_msgSend_496 = __objc_msgSend_496Ptr.asFunction< + late final __objc_msgSend_533 = __objc_msgSend_533Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int)>(); @@ -58911,13 +58965,13 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPClientDelegate"); late final _sel_registerTask_withConfiguration_1 = _registerName1("registerTask:withConfiguration:"); - void _objc_msgSend_497( + void _objc_msgSend_534( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer task, ffi.Pointer config, ) { - return __objc_msgSend_497( + return __objc_msgSend_534( obj, sel, task, @@ -58925,14 +58979,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_497Ptr = _lookup< + late final __objc_msgSend_534Ptr = _lookup< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_497 = __objc_msgSend_497Ptr.asFunction< + late final __objc_msgSend_534 = __objc_msgSend_534Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); @@ -58940,13 +58994,13 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedDelegate"); late final _sel_initWithSession_task_1 = _registerName1("initWithSession:task:"); - ffi.Pointer _objc_msgSend_498( + ffi.Pointer _objc_msgSend_535( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ) { - return __objc_msgSend_498( + return __objc_msgSend_535( obj, sel, session, @@ -58954,14 +59008,14 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_498Ptr = _lookup< + late final __objc_msgSend_535Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_498 = __objc_msgSend_498Ptr.asFunction< + late final __objc_msgSend_535 = __objc_msgSend_535Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -58971,41 +59025,41 @@ class NativeCupertinoHttp { late final _sel_finish1 = _registerName1("finish"); late final _sel_session1 = _registerName1("session"); late final _sel_task1 = _registerName1("task"); - ffi.Pointer _objc_msgSend_499( + ffi.Pointer _objc_msgSend_536( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_499( + return __objc_msgSend_536( obj, sel, ); } - late final __objc_msgSend_499Ptr = _lookup< + late final __objc_msgSend_536Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_499 = __objc_msgSend_499Ptr.asFunction< + late final __objc_msgSend_536 = __objc_msgSend_536Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _class_NSLock1 = _getClass1("NSLock"); late final _sel_lock1 = _registerName1("lock"); - ffi.Pointer _objc_msgSend_500( + ffi.Pointer _objc_msgSend_537( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_500( + return __objc_msgSend_537( obj, sel, ); } - late final __objc_msgSend_500Ptr = _lookup< + late final __objc_msgSend_537Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_500 = __objc_msgSend_500Ptr.asFunction< + late final __objc_msgSend_537 = __objc_msgSend_537Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -59013,7 +59067,7 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedRedirect"); late final _sel_initWithSession_task_response_request_1 = _registerName1("initWithSession:task:response:request:"); - ffi.Pointer _objc_msgSend_501( + ffi.Pointer _objc_msgSend_538( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, @@ -59021,7 +59075,7 @@ class NativeCupertinoHttp { ffi.Pointer response, ffi.Pointer request, ) { - return __objc_msgSend_501( + return __objc_msgSend_538( obj, sel, session, @@ -59031,7 +59085,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_501Ptr = _lookup< + late final __objc_msgSend_538Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -59040,7 +59094,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_501 = __objc_msgSend_501Ptr.asFunction< + late final __objc_msgSend_538 = __objc_msgSend_538Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -59050,21 +59104,41 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); - ffi.Pointer _objc_msgSend_502( + void _objc_msgSend_539( ffi.Pointer obj, ffi.Pointer sel, + ffi.Pointer request, ) { - return __objc_msgSend_502( + return __objc_msgSend_539( obj, sel, + request, ); } - late final __objc_msgSend_502Ptr = _lookup< + late final __objc_msgSend_539Ptr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_539 = __objc_msgSend_539Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + ffi.Pointer _objc_msgSend_540( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_540( + obj, + sel, + ); + } + + late final __objc_msgSend_540Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_502 = __objc_msgSend_502Ptr.asFunction< + late final __objc_msgSend_540 = __objc_msgSend_540Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); @@ -59073,14 +59147,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedResponse"); late final _sel_initWithSession_task_response_1 = _registerName1("initWithSession:task:response:"); - ffi.Pointer _objc_msgSend_503( + ffi.Pointer _objc_msgSend_541( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ffi.Pointer response, ) { - return __objc_msgSend_503( + return __objc_msgSend_541( obj, sel, session, @@ -59089,7 +59163,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_503Ptr = _lookup< + late final __objc_msgSend_541Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -59097,7 +59171,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_503 = __objc_msgSend_503Ptr.asFunction< + late final __objc_msgSend_541 = __objc_msgSend_541Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -59107,54 +59181,54 @@ class NativeCupertinoHttp { late final _sel_finishWithDisposition_1 = _registerName1("finishWithDisposition:"); - void _objc_msgSend_504( + void _objc_msgSend_542( ffi.Pointer obj, ffi.Pointer sel, int disposition, ) { - return __objc_msgSend_504( + return __objc_msgSend_542( obj, sel, disposition, ); } - late final __objc_msgSend_504Ptr = _lookup< + late final __objc_msgSend_542Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_504 = __objc_msgSend_504Ptr.asFunction< + late final __objc_msgSend_542 = __objc_msgSend_542Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); late final _sel_disposition1 = _registerName1("disposition"); - int _objc_msgSend_505( + int _objc_msgSend_543( ffi.Pointer obj, ffi.Pointer sel, ) { - return __objc_msgSend_505( + return __objc_msgSend_543( obj, sel, ); } - late final __objc_msgSend_505Ptr = _lookup< + late final __objc_msgSend_543Ptr = _lookup< ffi.NativeFunction< ffi.Int32 Function( ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_505 = __objc_msgSend_505Ptr.asFunction< + late final __objc_msgSend_543 = __objc_msgSend_543Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer)>(); late final _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); late final _sel_initWithSession_task_data_1 = _registerName1("initWithSession:task:data:"); - ffi.Pointer _objc_msgSend_506( + ffi.Pointer _objc_msgSend_544( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ffi.Pointer data, ) { - return __objc_msgSend_506( + return __objc_msgSend_544( obj, sel, session, @@ -59163,7 +59237,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_506Ptr = _lookup< + late final __objc_msgSend_544Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -59171,7 +59245,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_506 = __objc_msgSend_506Ptr.asFunction< + late final __objc_msgSend_544 = __objc_msgSend_544Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -59183,14 +59257,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedComplete"); late final _sel_initWithSession_task_error_1 = _registerName1("initWithSession:task:error:"); - ffi.Pointer _objc_msgSend_507( + ffi.Pointer _objc_msgSend_545( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer task, ffi.Pointer error, ) { - return __objc_msgSend_507( + return __objc_msgSend_545( obj, sel, session, @@ -59199,7 +59273,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_507Ptr = _lookup< + late final __objc_msgSend_545Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -59207,7 +59281,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_507 = __objc_msgSend_507Ptr.asFunction< + late final __objc_msgSend_545 = __objc_msgSend_545Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -59219,14 +59293,14 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedFinishedDownloading"); late final _sel_initWithSession_downloadTask_url_1 = _registerName1("initWithSession:downloadTask:url:"); - ffi.Pointer _objc_msgSend_508( + ffi.Pointer _objc_msgSend_546( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer downloadTask, ffi.Pointer location, ) { - return __objc_msgSend_508( + return __objc_msgSend_546( obj, sel, session, @@ -59235,7 +59309,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_508Ptr = _lookup< + late final __objc_msgSend_546Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -59243,7 +59317,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_508 = __objc_msgSend_508Ptr.asFunction< + late final __objc_msgSend_546 = __objc_msgSend_546Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -59252,18 +59326,36 @@ class NativeCupertinoHttp { ffi.Pointer)>(); late final _sel_location1 = _registerName1("location"); + ffi.Pointer _objc_msgSend_547( + ffi.Pointer obj, + ffi.Pointer sel, + ) { + return __objc_msgSend_547( + obj, + sel, + ); + } + + late final __objc_msgSend_547Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); + late final __objc_msgSend_547 = __objc_msgSend_547Ptr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + late final _class_CUPHTTPForwardedWebSocketOpened1 = _getClass1("CUPHTTPForwardedWebSocketOpened"); late final _sel_initWithSession_webSocketTask_didOpenWithProtocol_1 = _registerName1("initWithSession:webSocketTask:didOpenWithProtocol:"); - ffi.Pointer _objc_msgSend_509( + ffi.Pointer _objc_msgSend_548( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, ffi.Pointer webSocketTask, ffi.Pointer protocol, ) { - return __objc_msgSend_509( + return __objc_msgSend_548( obj, sel, session, @@ -59272,7 +59364,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_509Ptr = _lookup< + late final __objc_msgSend_548Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -59280,7 +59372,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_509 = __objc_msgSend_509Ptr.asFunction< + late final __objc_msgSend_548 = __objc_msgSend_548Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -59293,7 +59385,7 @@ class NativeCupertinoHttp { _getClass1("CUPHTTPForwardedWebSocketClosed"); late final _sel_initWithSession_webSocketTask_code_reason_1 = _registerName1("initWithSession:webSocketTask:code:reason:"); - ffi.Pointer _objc_msgSend_510( + ffi.Pointer _objc_msgSend_549( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer session, @@ -59301,7 +59393,7 @@ class NativeCupertinoHttp { int closeCode, ffi.Pointer reason, ) { - return __objc_msgSend_510( + return __objc_msgSend_549( obj, sel, session, @@ -59311,7 +59403,7 @@ class NativeCupertinoHttp { ); } - late final __objc_msgSend_510Ptr = _lookup< + late final __objc_msgSend_549Ptr = _lookup< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, @@ -59320,7 +59412,7 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_510 = __objc_msgSend_510Ptr.asFunction< + late final __objc_msgSend_549 = __objc_msgSend_549Ptr.asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, @@ -59331,10 +59423,10 @@ class NativeCupertinoHttp { /// Creates a `Dart_CObject` containing the given `NSObject` pointer as an int. Dart_CObject NSObjectToCObject( - ffi.Pointer n, + NSObject n, ) { return _NSObjectToCObject( - n, + n._id, ); } @@ -59347,13 +59439,13 @@ class NativeCupertinoHttp { /// Executes [NSURLSessionWebSocketTask sendMessage:completionHandler:] and /// sends the results of the completion handler to the given `Dart_Port`. void CUPHTTPSendMessage( - ffi.Pointer task, - ffi.Pointer message, - int sendPort, + NSURLSessionWebSocketTask task, + NSURLSessionWebSocketMessage message, + DartDart_Port sendPort, ) { return _CUPHTTPSendMessage( - task, - message, + task._id, + message._id, sendPort, ); } @@ -59368,11 +59460,11 @@ class NativeCupertinoHttp { /// Executes [NSURLSessionWebSocketTask receiveMessageWithCompletionHandler:] /// and sends the results of the completion handler to the given `Dart_Port`. void CUPHTTPReceiveMessage( - ffi.Pointer task, - int sendPort, + NSURLSessionWebSocketTask task, + DartDart_Port sendPort, ) { return _CUPHTTPReceiveMessage( - task, + task._id, sendPort, ); } @@ -59631,45 +59723,45 @@ class NativeCupertinoHttp { late final _class_CUPHTTPStreamToNSInputStreamAdapter1 = _getClass1("CUPHTTPStreamToNSInputStreamAdapter"); late final _sel_addData_1 = _registerName1("addData:"); - int _objc_msgSend_511( + int _objc_msgSend_550( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer data, ) { - return __objc_msgSend_511( + return __objc_msgSend_550( obj, sel, data, ); } - late final __objc_msgSend_511Ptr = _lookup< + late final __objc_msgSend_550Ptr = _lookup< ffi.NativeFunction< NSUInteger Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_511 = __objc_msgSend_511Ptr.asFunction< + late final __objc_msgSend_550 = __objc_msgSend_550Ptr.asFunction< int Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); late final _sel_setDone1 = _registerName1("setDone"); late final _sel_setError_1 = _registerName1("setError:"); - void _objc_msgSend_512( + void _objc_msgSend_551( ffi.Pointer obj, ffi.Pointer sel, ffi.Pointer error, ) { - return __objc_msgSend_512( + return __objc_msgSend_551( obj, sel, error, ); } - late final __objc_msgSend_512Ptr = _lookup< + late final __objc_msgSend_551Ptr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_512 = __objc_msgSend_512Ptr.asFunction< + late final __objc_msgSend_551 = __objc_msgSend_551Ptr.asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); } @@ -59784,6 +59876,7 @@ final class __darwin_arm_exception_state extends ffi.Struct { } typedef __uint32_t = ffi.UnsignedInt; +typedef Dart__uint32_t = int; final class __darwin_arm_exception_state64 extends ffi.Struct { @__uint64_t() @@ -59797,6 +59890,7 @@ final class __darwin_arm_exception_state64 extends ffi.Struct { } typedef __uint64_t = ffi.UnsignedLongLong; +typedef Dart__uint64_t = int; final class __darwin_arm_thread_state extends ffi.Struct { @ffi.Array.multi([13]) @@ -59929,6 +60023,7 @@ final class __darwin_sigaltstack extends ffi.Struct { } typedef __darwin_size_t = ffi.UnsignedLong; +typedef Dart__darwin_size_t = int; final class __darwin_ucontext extends ffi.Struct { @ffi.Int() @@ -60007,6 +60102,7 @@ final class __siginfo extends ffi.Struct { typedef pid_t = __darwin_pid_t; typedef __darwin_pid_t = __int32_t; typedef __int32_t = ffi.Int; +typedef Dart__int32_t = int; typedef uid_t = __darwin_uid_t; typedef __darwin_uid_t = __uint32_t; @@ -60076,6 +60172,7 @@ final class timeval extends ffi.Struct { } typedef __darwin_time_t = ffi.Long; +typedef Dart__darwin_time_t = int; typedef __darwin_suseconds_t = __int32_t; final class rusage extends ffi.Struct { @@ -60781,6 +60878,13 @@ final class lldiv_t extends ffi.Struct { external int rem; } +typedef malloc_type_id_t = ffi.UnsignedLongLong; +typedef Dartmalloc_type_id_t = int; + +final class _malloc_zone_t extends ffi.Opaque {} + +typedef malloc_zone_t = _malloc_zone_t; + class _ObjCBlockBase implements ffi.Finalizable { final ffi.Pointer<_ObjCBlock> _id; final NativeCupertinoHttp _lib; @@ -60820,61 +60924,101 @@ class _ObjCBlockBase implements ffi.Finalizable { /// Return a pointer to this object. ffi.Pointer<_ObjCBlock> get pointer => _id; -} -void _ObjCBlock_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block) { - return block.ref.target - .cast>() - .asFunction()(); + ffi.Pointer<_ObjCBlock> _retainAndReturnId() { + _lib._Block_copy(_id.cast()); + return _id; + } } -final _ObjCBlock_closureRegistry = {}; -int _ObjCBlock_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_registerClosure(Function fn) { - final id = ++_ObjCBlock_closureRegistryIndex; - _ObjCBlock_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, +) => + block.ref.target + .cast>() + .asFunction()(); +final _ObjCBlock_ffiVoid_closureRegistry = {}; +int _ObjCBlock_ffiVoid_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_registerClosure(void Function() fn) { + final id = ++_ObjCBlock_ffiVoid_closureRegistryIndex; + _ObjCBlock_ffiVoid_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_closureTrampoline(ffi.Pointer<_ObjCBlock> block) { - return _ObjCBlock_closureRegistry[block.ref.target.address]!(); -} +void _ObjCBlock_ffiVoid_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, +) => + _ObjCBlock_ffiVoid_closureRegistry[block.ref.target.address]!(); -class ObjCBlock extends _ObjCBlockBase { - ObjCBlock._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid extends _ObjCBlockBase { + ObjCBlock_ffiVoid._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock.fromFunctionPointer(NativeCupertinoHttp lib, + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid.fromFunctionPointer(NativeCupertinoHttp lib, ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( - _ObjCBlock_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_ffiVoid_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock.fromFunction(NativeCupertinoHttp lib, void Function() fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid.fromFunction(NativeCupertinoHttp lib, void Function() fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>( - _ObjCBlock_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_ffiVoid_closureTrampoline) .cast(), - _ObjCBlock_registerClosure(fn)), + _ObjCBlock_ffiVoid_registerClosure(() => fn())), lib); static ffi.Pointer? _dartFuncTrampoline; - void call() { - return _id.ref.invoke - .cast< - ffi - .NativeFunction block)>>() - .asFunction block)>()(_id); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid.listener(NativeCupertinoHttp lib, void Function() fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>)>.listener( + _ObjCBlock_ffiVoid_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_registerClosure(() => fn())), + lib); + static ffi.NativeCallable)>? + _dartFuncListenerTrampoline; + + void call() => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() + .asFunction)>()( + _id, + ); } final class _ObjCBlockDesc extends ffi.Struct { @@ -60907,37 +61051,47 @@ final class _ObjCBlock extends ffi.Struct { external ffi.Pointer target; } -int _ObjCBlock1_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} - -final _ObjCBlock1_closureRegistry = {}; -int _ObjCBlock1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock1_registerClosure(Function fn) { - final id = ++_ObjCBlock1_closureRegistryIndex; - _ObjCBlock1_closureRegistry[id] = fn; +int _ObjCBlock_ffiInt_ffiVoid_ffiVoid_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiInt_ffiVoid_ffiVoid_registerClosure( + int Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureRegistryIndex; + _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -int _ObjCBlock1_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock1_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +int _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock1 extends _ObjCBlockBase { - ObjCBlock1._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiInt_ffiVoid_ffiVoid extends _ObjCBlockBase { + ObjCBlock_ffiInt_ffiVoid_ffiVoid._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock1.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiInt_ffiVoid_ffiVoid.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -60947,43 +61101,43 @@ class ObjCBlock1 extends _ObjCBlockBase { : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock1_fnPtrTrampoline, 0) + ffi.Int Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiInt_ffiVoid_ffiVoid_fnPtrTrampoline, 0) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock1.fromFunction(NativeCupertinoHttp lib, - int Function(ffi.Pointer arg0, ffi.Pointer arg1) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiInt_ffiVoid_ffiVoid.fromFunction(NativeCupertinoHttp lib, + int Function(ffi.Pointer, ffi.Pointer) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock1_closureTrampoline, 0) + ffi.Int Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureTrampoline, 0) .cast(), - _ObjCBlock1_registerClosure(fn)), + _ObjCBlock_ffiInt_ffiVoid_ffiVoid_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, arg1))), lib); static ffi.Pointer? _dartFuncTrampoline; - int call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + + int call(ffi.Pointer arg0, ffi.Pointer arg1) => _id + .ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()(_id, arg0, arg1); } typedef dev_t = __darwin_dev_t; @@ -60991,6 +61145,7 @@ typedef __darwin_dev_t = __int32_t; typedef mode_t = __darwin_mode_t; typedef __darwin_mode_t = __uint16_t; typedef __uint16_t = ffi.UnsignedShort; +typedef Dart__uint16_t = int; final class fd_set extends ffi.Struct { @ffi.Array.multi([32]) @@ -61007,8 +61162,6 @@ final class ObjCObject extends ffi.Opaque {} final class objc_selector extends ffi.Opaque {} -final class _malloc_zone_t extends ffi.Opaque {} - final class ObjCSel extends ffi.Opaque {} typedef objc_objectptr_t = ffi.Pointer; @@ -61054,6 +61207,11 @@ class _ObjCWrapper implements ffi.Finalizable { /// Return a pointer to this object. ffi.Pointer get pointer => _id; + + ffi.Pointer _retainAndReturnId() { + _lib._objc_retain(_id.cast()); + return _id; + } } class NSObject extends _ObjCWrapper { @@ -61080,11 +61238,11 @@ class NSObject extends _ObjCWrapper { } static void load(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); + _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); } static void initialize(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); + _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); } NSObject init() { @@ -61110,11 +61268,11 @@ class NSObject extends _ObjCWrapper { } void dealloc() { - return _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); + _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); } void finalize() { - return _lib._objc_msgSend_1(_id, _lib._sel_finalize1); + _lib._objc_msgSend_1(_id, _lib._sel_finalize1); } NSObject copy() { @@ -61147,10 +61305,9 @@ class NSObject extends _ObjCWrapper { _lib._sel_instancesRespondToSelector_1, aSelector); } - static bool conformsToProtocol_( - NativeCupertinoHttp _lib, Protocol? protocol) { - return _lib._objc_msgSend_5(_lib._class_NSObject1, - _lib._sel_conformsToProtocol_1, protocol?._id ?? ffi.nullptr); + static bool conformsToProtocol_(NativeCupertinoHttp _lib, Protocol protocol) { + return _lib._objc_msgSend_5( + _lib._class_NSObject1, _lib._sel_conformsToProtocol_1, protocol._id); } IMP methodForSelector_(ffi.Pointer aSelector) { @@ -61164,8 +61321,7 @@ class NSObject extends _ObjCWrapper { } void doesNotRecognizeSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_7( - _id, _lib._sel_doesNotRecognizeSelector_1, aSelector); + _lib._objc_msgSend_7(_id, _lib._sel_doesNotRecognizeSelector_1, aSelector); } NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { @@ -61174,9 +61330,8 @@ class NSObject extends _ObjCWrapper { return NSObject._(_ret, _lib, retain: true, release: true); } - void forwardInvocation_(NSInvocation? anInvocation) { - return _lib._objc_msgSend_9( - _id, _lib._sel_forwardInvocation_1, anInvocation?._id ?? ffi.nullptr); + void forwardInvocation_(NSInvocation anInvocation) { + _lib._objc_msgSend_9(_id, _lib._sel_forwardInvocation_1, anInvocation._id); } NSMethodSignature methodSignatureForSelector_( @@ -61218,7 +61373,7 @@ class NSObject extends _ObjCWrapper { _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); } - static int hash(NativeCupertinoHttp _lib) { + static DartNSUInteger hash(NativeCupertinoHttp _lib) { return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); } @@ -61245,12 +61400,12 @@ class NSObject extends _ObjCWrapper { return NSString._(_ret, _lib, retain: true, release: true); } - static int version(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_81(_lib._class_NSObject1, _lib._sel_version1); + static DartNSInteger version(NativeCupertinoHttp _lib) { + return _lib._objc_msgSend_86(_lib._class_NSObject1, _lib._sel_version1); } - static void setVersion_(NativeCupertinoHttp _lib, int aVersion) { - return _lib._objc_msgSend_279( + static void setVersion_(NativeCupertinoHttp _lib, DartNSInteger aVersion) { + _lib._objc_msgSend_296( _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); } @@ -61259,20 +61414,24 @@ class NSObject extends _ObjCWrapper { return NSObject._(_ret, _lib, retain: true, release: true); } - NSObject replacementObjectForCoder_(NSCoder? coder) { + NSObject? replacementObjectForCoder_(NSCoder coder) { final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_replacementObjectForCoder_1, coder?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + _id, _lib._sel_replacementObjectForCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - NSObject awakeAfterUsingCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_awakeAfterUsingCoder_1, coder?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: false, release: true); + NSObject? awakeAfterUsingCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_awakeAfterUsingCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: false, release: true); } static void poseAsClass_(NativeCupertinoHttp _lib, NSObject aClass) { - return _lib._objc_msgSend_200( + _lib._objc_msgSend_210( _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); } @@ -61282,30 +61441,27 @@ class NSObject extends _ObjCWrapper { return NSObject._(_ret, _lib, retain: true, release: true); } - void URL_resourceDataDidBecomeAvailable_(NSURL? sender, NSData? newBytes) { - return _lib._objc_msgSend_280( - _id, - _lib._sel_URL_resourceDataDidBecomeAvailable_1, - sender?._id ?? ffi.nullptr, - newBytes?._id ?? ffi.nullptr); + void URL_resourceDataDidBecomeAvailable_(NSURL sender, NSData newBytes) { + _lib._objc_msgSend_297(_id, _lib._sel_URL_resourceDataDidBecomeAvailable_1, + sender._id, newBytes._id); } - void URLResourceDidFinishLoading_(NSURL? sender) { - return _lib._objc_msgSend_281(_id, _lib._sel_URLResourceDidFinishLoading_1, - sender?._id ?? ffi.nullptr); + void URLResourceDidFinishLoading_(NSURL sender) { + _lib._objc_msgSend_298( + _id, _lib._sel_URLResourceDidFinishLoading_1, sender._id); } - void URLResourceDidCancelLoading_(NSURL? sender) { - return _lib._objc_msgSend_281(_id, _lib._sel_URLResourceDidCancelLoading_1, - sender?._id ?? ffi.nullptr); + void URLResourceDidCancelLoading_(NSURL sender) { + _lib._objc_msgSend_298( + _id, _lib._sel_URLResourceDidCancelLoading_1, sender._id); } - void URL_resourceDidFailLoadingWithReason_(NSURL? sender, NSString? reason) { - return _lib._objc_msgSend_282( + void URL_resourceDidFailLoadingWithReason_(NSURL sender, NSString reason) { + _lib._objc_msgSend_299( _id, _lib._sel_URL_resourceDidFailLoadingWithReason_1, - sender?._id ?? ffi.nullptr, - reason?._id ?? ffi.nullptr); + sender._id, + reason._id); } /// Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: @@ -61315,33 +61471,34 @@ class NSObject extends _ObjCWrapper { /// The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. void attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( - NSError? error, - int recoveryOptionIndex, - NSObject delegate, + NSError error, + DartNSUInteger recoveryOptionIndex, + NSObject? delegate, ffi.Pointer didRecoverSelector, ffi.Pointer contextInfo) { - return _lib._objc_msgSend_283( + _lib._objc_msgSend_300( _id, _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, - error?._id ?? ffi.nullptr, + error._id, recoveryOptionIndex, - delegate._id, + delegate?._id ?? ffi.nullptr, didRecoverSelector, contextInfo); } /// Given that an error alert has been presented applicaton-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and return YES if error recovery was completely successful, NO otherwise. The recovery option index is an index into the error's array of localized recovery options. bool attemptRecoveryFromError_optionIndex_( - NSError? error, int recoveryOptionIndex) { - return _lib._objc_msgSend_284( + NSError error, DartNSUInteger recoveryOptionIndex) { + return _lib._objc_msgSend_301( _id, _lib._sel_attemptRecoveryFromError_optionIndex_1, - error?._id ?? ffi.nullptr, + error._id, recoveryOptionIndex); } } typedef instancetype = ffi.Pointer; +typedef Dartinstancetype = NSObject; class Protocol extends _ObjCWrapper { Protocol._(ffi.Pointer id, NativeCupertinoHttp lib, @@ -61367,7 +61524,9 @@ class Protocol extends _ObjCWrapper { } } -typedef IMP = ffi.Pointer>; +typedef IMP = ffi.Pointer>; +typedef IMPFunction = ffi.Void Function(); +typedef DartIMPFunction = void Function(); class NSInvocation extends _ObjCWrapper { NSInvocation._(ffi.Pointer id, NativeCupertinoHttp lib, @@ -61419,6 +61578,7 @@ class NSMethodSignature extends _ObjCWrapper { } typedef NSUInteger = ffi.UnsignedLong; +typedef DartNSUInteger = int; class NSString extends NSObject { NSString._(ffi.Pointer id, NativeCupertinoHttp lib, @@ -61454,14 +61614,14 @@ class NSString extends NSObject { String toString() { final data = dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); - return data.bytes.cast().toDartString(length: length); + return data!.bytes.cast().toDartString(length: length); } - int get length { + DartNSUInteger get length { return _lib._objc_msgSend_12(_id, _lib._sel_length1); } - int characterAtIndex_(int index) { + Dartunichar characterAtIndex_(DartNSUInteger index) { return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); } @@ -61471,19 +61631,21 @@ class NSString extends NSObject { return NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + NSString? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString substringFromIndex_(int from) { + NSString substringFromIndex_(DartNSUInteger from) { final _ret = _lib._objc_msgSend_15(_id, _lib._sel_substringFromIndex_1, from); return NSString._(_ret, _lib, retain: true, release: true); } - NSString substringToIndex_(int to) { + NSString substringToIndex_(DartNSUInteger to) { final _ret = _lib._objc_msgSend_15(_id, _lib._sel_substringToIndex_1, to); return NSString._(_ret, _lib, retain: true, release: true); } @@ -61495,256 +61657,230 @@ class NSString extends NSObject { } void getCharacters_range_(ffi.Pointer buffer, NSRange range) { - return _lib._objc_msgSend_17( - _id, _lib._sel_getCharacters_range_1, buffer, range); + _lib._objc_msgSend_17(_id, _lib._sel_getCharacters_range_1, buffer, range); } - int compare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_compare_1, string?._id ?? ffi.nullptr); + int compare_(NSString string) { + return _lib._objc_msgSend_18(_id, _lib._sel_compare_1, string._id); } - int compare_options_(NSString? string, int mask) { + int compare_options_(NSString string, int mask) { return _lib._objc_msgSend_19( - _id, _lib._sel_compare_options_1, string?._id ?? ffi.nullptr, mask); + _id, _lib._sel_compare_options_1, string._id, mask); } int compare_options_range_( - NSString? string, int mask, NSRange rangeOfReceiverToCompare) { + NSString string, int mask, NSRange rangeOfReceiverToCompare) { return _lib._objc_msgSend_20(_id, _lib._sel_compare_options_range_1, - string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare); + string._id, mask, rangeOfReceiverToCompare); } - int compare_options_range_locale_(NSString? string, int mask, - NSRange rangeOfReceiverToCompare, NSObject locale) { + int compare_options_range_locale_(NSString string, int mask, + NSRange rangeOfReceiverToCompare, NSObject? locale) { return _lib._objc_msgSend_21(_id, _lib._sel_compare_options_range_locale_1, - string?._id ?? ffi.nullptr, mask, rangeOfReceiverToCompare, locale._id); + string._id, mask, rangeOfReceiverToCompare, locale?._id ?? ffi.nullptr); } - int caseInsensitiveCompare_(NSString? string) { + int caseInsensitiveCompare_(NSString string) { return _lib._objc_msgSend_18( - _id, _lib._sel_caseInsensitiveCompare_1, string?._id ?? ffi.nullptr); + _id, _lib._sel_caseInsensitiveCompare_1, string._id); } - int localizedCompare_(NSString? string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_localizedCompare_1, string?._id ?? ffi.nullptr); + int localizedCompare_(NSString string) { + return _lib._objc_msgSend_18(_id, _lib._sel_localizedCompare_1, string._id); } - int localizedCaseInsensitiveCompare_(NSString? string) { + int localizedCaseInsensitiveCompare_(NSString string) { return _lib._objc_msgSend_18( - _id, - _lib._sel_localizedCaseInsensitiveCompare_1, - string?._id ?? ffi.nullptr); + _id, _lib._sel_localizedCaseInsensitiveCompare_1, string._id); } - int localizedStandardCompare_(NSString? string) { + int localizedStandardCompare_(NSString string) { return _lib._objc_msgSend_18( - _id, _lib._sel_localizedStandardCompare_1, string?._id ?? ffi.nullptr); + _id, _lib._sel_localizedStandardCompare_1, string._id); } - bool isEqualToString_(NSString? aString) { - return _lib._objc_msgSend_22( - _id, _lib._sel_isEqualToString_1, aString?._id ?? ffi.nullptr); + bool isEqualToString_(NSString aString) { + return _lib._objc_msgSend_22(_id, _lib._sel_isEqualToString_1, aString._id); } - bool hasPrefix_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_hasPrefix_1, str?._id ?? ffi.nullptr); + bool hasPrefix_(NSString str) { + return _lib._objc_msgSend_22(_id, _lib._sel_hasPrefix_1, str._id); } - bool hasSuffix_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_hasSuffix_1, str?._id ?? ffi.nullptr); + bool hasSuffix_(NSString str) { + return _lib._objc_msgSend_22(_id, _lib._sel_hasSuffix_1, str._id); } - NSString commonPrefixWithString_options_(NSString? str, int mask) { + NSString commonPrefixWithString_options_(NSString str, int mask) { final _ret = _lib._objc_msgSend_23( - _id, - _lib._sel_commonPrefixWithString_options_1, - str?._id ?? ffi.nullptr, - mask); + _id, _lib._sel_commonPrefixWithString_options_1, str._id, mask); return NSString._(_ret, _lib, retain: true, release: true); } - bool containsString_(NSString? str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_containsString_1, str?._id ?? ffi.nullptr); + bool containsString_(NSString str) { + return _lib._objc_msgSend_22(_id, _lib._sel_containsString_1, str._id); } - bool localizedCaseInsensitiveContainsString_(NSString? str) { + bool localizedCaseInsensitiveContainsString_(NSString str) { return _lib._objc_msgSend_22( - _id, - _lib._sel_localizedCaseInsensitiveContainsString_1, - str?._id ?? ffi.nullptr); + _id, _lib._sel_localizedCaseInsensitiveContainsString_1, str._id); } - bool localizedStandardContainsString_(NSString? str) { - return _lib._objc_msgSend_22(_id, - _lib._sel_localizedStandardContainsString_1, str?._id ?? ffi.nullptr); + bool localizedStandardContainsString_(NSString str) { + return _lib._objc_msgSend_22( + _id, _lib._sel_localizedStandardContainsString_1, str._id); } - NSRange localizedStandardRangeOfString_(NSString? str) { - return _lib._objc_msgSend_24(_id, - _lib._sel_localizedStandardRangeOfString_1, str?._id ?? ffi.nullptr); + NSRange localizedStandardRangeOfString_(NSString str) { + return _lib._objc_msgSend_24( + _id, _lib._sel_localizedStandardRangeOfString_1, str._id); } - NSRange rangeOfString_(NSString? searchString) { + NSRange rangeOfString_(NSString searchString) { return _lib._objc_msgSend_24( - _id, _lib._sel_rangeOfString_1, searchString?._id ?? ffi.nullptr); + _id, _lib._sel_rangeOfString_1, searchString._id); } - NSRange rangeOfString_options_(NSString? searchString, int mask) { - return _lib._objc_msgSend_25(_id, _lib._sel_rangeOfString_options_1, - searchString?._id ?? ffi.nullptr, mask); + NSRange rangeOfString_options_(NSString searchString, int mask) { + return _lib._objc_msgSend_25( + _id, _lib._sel_rangeOfString_options_1, searchString._id, mask); } NSRange rangeOfString_options_range_( - NSString? searchString, int mask, NSRange rangeOfReceiverToSearch) { + NSString searchString, int mask, NSRange rangeOfReceiverToSearch) { return _lib._objc_msgSend_26(_id, _lib._sel_rangeOfString_options_range_1, - searchString?._id ?? ffi.nullptr, mask, rangeOfReceiverToSearch); + searchString._id, mask, rangeOfReceiverToSearch); } - NSRange rangeOfString_options_range_locale_(NSString? searchString, int mask, + NSRange rangeOfString_options_range_locale_(NSString searchString, int mask, NSRange rangeOfReceiverToSearch, NSLocale? locale) { return _lib._objc_msgSend_27( _id, _lib._sel_rangeOfString_options_range_locale_1, - searchString?._id ?? ffi.nullptr, + searchString._id, mask, rangeOfReceiverToSearch, locale?._id ?? ffi.nullptr); } - NSRange rangeOfCharacterFromSet_(NSCharacterSet? searchSet) { - return _lib._objc_msgSend_228(_id, _lib._sel_rangeOfCharacterFromSet_1, - searchSet?._id ?? ffi.nullptr); + NSRange rangeOfCharacterFromSet_(NSCharacterSet searchSet) { + return _lib._objc_msgSend_241( + _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id); } - NSRange rangeOfCharacterFromSet_options_( - NSCharacterSet? searchSet, int mask) { - return _lib._objc_msgSend_229( - _id, - _lib._sel_rangeOfCharacterFromSet_options_1, - searchSet?._id ?? ffi.nullptr, - mask); + NSRange rangeOfCharacterFromSet_options_(NSCharacterSet searchSet, int mask) { + return _lib._objc_msgSend_242( + _id, _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask); } NSRange rangeOfCharacterFromSet_options_range_( - NSCharacterSet? searchSet, int mask, NSRange rangeOfReceiverToSearch) { - return _lib._objc_msgSend_230( + NSCharacterSet searchSet, int mask, NSRange rangeOfReceiverToSearch) { + return _lib._objc_msgSend_243( _id, _lib._sel_rangeOfCharacterFromSet_options_range_1, - searchSet?._id ?? ffi.nullptr, + searchSet._id, mask, rangeOfReceiverToSearch); } - NSRange rangeOfComposedCharacterSequenceAtIndex_(int index) { - return _lib._objc_msgSend_231( + NSRange rangeOfComposedCharacterSequenceAtIndex_(DartNSUInteger index) { + return _lib._objc_msgSend_244( _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); } NSRange rangeOfComposedCharacterSequencesForRange_(NSRange range) { - return _lib._objc_msgSend_232( + return _lib._objc_msgSend_245( _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); } - NSString stringByAppendingString_(NSString? aString) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_stringByAppendingString_1, aString?._id ?? ffi.nullptr); + NSString stringByAppendingString_(NSString aString) { + final _ret = _lib._objc_msgSend_103( + _id, _lib._sel_stringByAppendingString_1, aString._id); return NSString._(_ret, _lib, retain: true, release: true); } - NSString stringByAppendingFormat_(NSString? format) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_stringByAppendingFormat_1, format?._id ?? ffi.nullptr); + NSString stringByAppendingFormat_(NSString format) { + final _ret = _lib._objc_msgSend_103( + _id, _lib._sel_stringByAppendingFormat_1, format._id); return NSString._(_ret, _lib, retain: true, release: true); } double get doubleValue { - return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_doubleValue1) + : _lib._objc_msgSend_90(_id, _lib._sel_doubleValue1); } double get floatValue { - return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_89_fpret(_id, _lib._sel_floatValue1) + : _lib._objc_msgSend_89(_id, _lib._sel_floatValue1); } int get intValue { - return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); + return _lib._objc_msgSend_84(_id, _lib._sel_intValue1); } - int get integerValue { - return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); + DartNSInteger get integerValue { + return _lib._objc_msgSend_86(_id, _lib._sel_integerValue1); } int get longLongValue { - return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); + return _lib._objc_msgSend_87(_id, _lib._sel_longLongValue1); } bool get boolValue { return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); } - NSString? get uppercaseString { + NSString get uppercaseString { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_uppercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString? get lowercaseString { + NSString get lowercaseString { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lowercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString? get capitalizedString { + NSString get capitalizedString { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_capitalizedString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString? get localizedUppercaseString { + NSString get localizedUppercaseString { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedUppercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString? get localizedLowercaseString { + NSString get localizedLowercaseString { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedLowercaseString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString? get localizedCapitalizedString { + NSString get localizedCapitalizedString { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedCapitalizedString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } NSString uppercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_233( + final _ret = _lib._objc_msgSend_246( _id, _lib._sel_uppercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); return NSString._(_ret, _lib, retain: true, release: true); } NSString lowercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_233( + final _ret = _lib._objc_msgSend_246( _id, _lib._sel_lowercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); return NSString._(_ret, _lib, retain: true, release: true); } NSString capitalizedStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_233(_id, + final _ret = _lib._objc_msgSend_246(_id, _lib._sel_capitalizedStringWithLocale_1, locale?._id ?? ffi.nullptr); return NSString._(_ret, _lib, retain: true, release: true); } @@ -61754,7 +61890,7 @@ class NSString extends NSObject { ffi.Pointer lineEndPtr, ffi.Pointer contentsEndPtr, NSRange range) { - return _lib._objc_msgSend_234( + _lib._objc_msgSend_247( _id, _lib._sel_getLineStart_end_contentsEnd_forRange_1, startPtr, @@ -61764,7 +61900,7 @@ class NSString extends NSObject { } NSRange lineRangeForRange_(NSRange range) { - return _lib._objc_msgSend_232(_id, _lib._sel_lineRangeForRange_1, range); + return _lib._objc_msgSend_245(_id, _lib._sel_lineRangeForRange_1, range); } void getParagraphStart_end_contentsEnd_forRange_( @@ -61772,7 +61908,7 @@ class NSString extends NSObject { ffi.Pointer parEndPtr, ffi.Pointer contentsEndPtr, NSRange range) { - return _lib._objc_msgSend_234( + _lib._objc_msgSend_247( _id, _lib._sel_getParagraphStart_end_contentsEnd_forRange_1, startPtr, @@ -61782,13 +61918,13 @@ class NSString extends NSObject { } NSRange paragraphRangeForRange_(NSRange range) { - return _lib._objc_msgSend_232( + return _lib._objc_msgSend_245( _id, _lib._sel_paragraphRangeForRange_1, range); } - void enumerateSubstringsInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock15 block) { - return _lib._objc_msgSend_235( + void enumerateSubstringsInRange_options_usingBlock_(NSRange range, int opts, + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { + _lib._objc_msgSend_248( _id, _lib._sel_enumerateSubstringsInRange_options_usingBlock_1, range, @@ -61796,48 +61932,53 @@ class NSString extends NSObject { block._id); } - void enumerateLinesUsingBlock_(ObjCBlock16 block) { - return _lib._objc_msgSend_236( + void enumerateLinesUsingBlock_(ObjCBlock_ffiVoid_NSString_bool block) { + _lib._objc_msgSend_249( _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); } ffi.Pointer get UTF8String { - return _lib._objc_msgSend_53(_id, _lib._sel_UTF8String1); + return _lib._objc_msgSend_57(_id, _lib._sel_UTF8String1); } - int get fastestEncoding { + DartNSUInteger get fastestEncoding { return _lib._objc_msgSend_12(_id, _lib._sel_fastestEncoding1); } - int get smallestEncoding { + DartNSUInteger get smallestEncoding { return _lib._objc_msgSend_12(_id, _lib._sel_smallestEncoding1); } - NSData dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { - final _ret = _lib._objc_msgSend_237(_id, + NSData? dataUsingEncoding_allowLossyConversion_( + DartNSUInteger encoding, bool lossy) { + final _ret = _lib._objc_msgSend_250(_id, _lib._sel_dataUsingEncoding_allowLossyConversion_1, encoding, lossy); - return NSData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - NSData dataUsingEncoding_(int encoding) { + NSData? dataUsingEncoding_(DartNSUInteger encoding) { final _ret = - _lib._objc_msgSend_238(_id, _lib._sel_dataUsingEncoding_1, encoding); - return NSData._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_251(_id, _lib._sel_dataUsingEncoding_1, encoding); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - bool canBeConvertedToEncoding_(int encoding) { - return _lib._objc_msgSend_117( + bool canBeConvertedToEncoding_(DartNSUInteger encoding) { + return _lib._objc_msgSend_122( _id, _lib._sel_canBeConvertedToEncoding_1, encoding); } - ffi.Pointer cStringUsingEncoding_(int encoding) { - return _lib._objc_msgSend_239( + ffi.Pointer cStringUsingEncoding_(DartNSUInteger encoding) { + return _lib._objc_msgSend_252( _id, _lib._sel_cStringUsingEncoding_1, encoding); } - bool getCString_maxLength_encoding_( - ffi.Pointer buffer, int maxBufferCount, int encoding) { - return _lib._objc_msgSend_240( + bool getCString_maxLength_encoding_(ffi.Pointer buffer, + DartNSUInteger maxBufferCount, DartNSUInteger encoding) { + return _lib._objc_msgSend_253( _id, _lib._sel_getCString_maxLength_encoding_1, buffer, @@ -61847,13 +61988,13 @@ class NSString extends NSObject { bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( ffi.Pointer buffer, - int maxBufferCount, + DartNSUInteger maxBufferCount, ffi.Pointer usedBufferCount, - int encoding, + DartNSUInteger encoding, int options, NSRange range, NSRangePointer leftover) { - return _lib._objc_msgSend_241( + return _lib._objc_msgSend_254( _id, _lib._sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1, buffer, @@ -61865,99 +62006,89 @@ class NSString extends NSObject { leftover); } - int maximumLengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_114( + DartNSUInteger maximumLengthOfBytesUsingEncoding_(DartNSUInteger enc) { + return _lib._objc_msgSend_119( _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); } - int lengthOfBytesUsingEncoding_(int enc) { - return _lib._objc_msgSend_114( + DartNSUInteger lengthOfBytesUsingEncoding_(DartNSUInteger enc) { + return _lib._objc_msgSend_119( _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); } static ffi.Pointer getAvailableStringEncodings( NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( + return _lib._objc_msgSend_255( _lib._class_NSString1, _lib._sel_availableStringEncodings1); } static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { + NativeCupertinoHttp _lib, DartNSUInteger encoding) { final _ret = _lib._objc_msgSend_15(_lib._class_NSString1, _lib._sel_localizedNameOfStringEncoding_1, encoding); return NSString._(_ret, _lib, retain: true, release: true); } - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + static DartNSUInteger getDefaultCStringEncoding(NativeCupertinoHttp _lib) { return _lib._objc_msgSend_12( _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); } - NSString? get decomposedStringWithCanonicalMapping { + NSString get decomposedStringWithCanonicalMapping { final _ret = _lib._objc_msgSend_32( _id, _lib._sel_decomposedStringWithCanonicalMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString? get precomposedStringWithCanonicalMapping { + NSString get precomposedStringWithCanonicalMapping { final _ret = _lib._objc_msgSend_32( _id, _lib._sel_precomposedStringWithCanonicalMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString? get decomposedStringWithCompatibilityMapping { + NSString get decomposedStringWithCompatibilityMapping { final _ret = _lib._objc_msgSend_32( _id, _lib._sel_decomposedStringWithCompatibilityMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString? get precomposedStringWithCompatibilityMapping { + NSString get precomposedStringWithCompatibilityMapping { final _ret = _lib._objc_msgSend_32( _id, _lib._sel_precomposedStringWithCompatibilityMapping1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSArray componentsSeparatedByString_(NSString? separator) { - final _ret = _lib._objc_msgSend_159(_id, - _lib._sel_componentsSeparatedByString_1, separator?._id ?? ffi.nullptr); + NSArray componentsSeparatedByString_(NSString separator) { + final _ret = _lib._objc_msgSend_256( + _id, _lib._sel_componentsSeparatedByString_1, separator._id); return NSArray._(_ret, _lib, retain: true, release: true); } - NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet? separator) { - final _ret = _lib._objc_msgSend_243( - _id, - _lib._sel_componentsSeparatedByCharactersInSet_1, - separator?._id ?? ffi.nullptr); + NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet separator) { + final _ret = _lib._objc_msgSend_257( + _id, _lib._sel_componentsSeparatedByCharactersInSet_1, separator._id); return NSArray._(_ret, _lib, retain: true, release: true); } - NSString stringByTrimmingCharactersInSet_(NSCharacterSet? set) { - final _ret = _lib._objc_msgSend_244(_id, - _lib._sel_stringByTrimmingCharactersInSet_1, set?._id ?? ffi.nullptr); + NSString stringByTrimmingCharactersInSet_(NSCharacterSet set) { + final _ret = _lib._objc_msgSend_258( + _id, _lib._sel_stringByTrimmingCharactersInSet_1, set._id); return NSString._(_ret, _lib, retain: true, release: true); } NSString stringByPaddingToLength_withString_startingAtIndex_( - int newLength, NSString? padString, int padIndex) { - final _ret = _lib._objc_msgSend_245( + DartNSUInteger newLength, NSString padString, DartNSUInteger padIndex) { + final _ret = _lib._objc_msgSend_259( _id, _lib._sel_stringByPaddingToLength_withString_startingAtIndex_1, newLength, - padString?._id ?? ffi.nullptr, + padString._id, padIndex); return NSString._(_ret, _lib, retain: true, release: true); } NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { - final _ret = _lib._objc_msgSend_246( + final _ret = _lib._objc_msgSend_260( _id, _lib._sel_stringByFoldingWithOptions_locale_1, options, @@ -61966,86 +62097,83 @@ class NSString extends NSObject { } NSString stringByReplacingOccurrencesOfString_withString_options_range_( - NSString? target, - NSString? replacement, - int options, - NSRange searchRange) { - final _ret = _lib._objc_msgSend_247( + NSString target, NSString replacement, int options, NSRange searchRange) { + final _ret = _lib._objc_msgSend_261( _id, _lib._sel_stringByReplacingOccurrencesOfString_withString_options_range_1, - target?._id ?? ffi.nullptr, - replacement?._id ?? ffi.nullptr, + target._id, + replacement._id, options, searchRange); return NSString._(_ret, _lib, retain: true, release: true); } NSString stringByReplacingOccurrencesOfString_withString_( - NSString? target, NSString? replacement) { - final _ret = _lib._objc_msgSend_248( + NSString target, NSString replacement) { + final _ret = _lib._objc_msgSend_262( _id, _lib._sel_stringByReplacingOccurrencesOfString_withString_1, - target?._id ?? ffi.nullptr, - replacement?._id ?? ffi.nullptr); + target._id, + replacement._id); return NSString._(_ret, _lib, retain: true, release: true); } NSString stringByReplacingCharactersInRange_withString_( - NSRange range, NSString? replacement) { - final _ret = _lib._objc_msgSend_249( + NSRange range, NSString replacement) { + final _ret = _lib._objc_msgSend_263( _id, _lib._sel_stringByReplacingCharactersInRange_withString_1, range, - replacement?._id ?? ffi.nullptr); + replacement._id); return NSString._(_ret, _lib, retain: true, release: true); } - NSString stringByApplyingTransform_reverse_( - NSStringTransform transform, bool reverse) { - final _ret = _lib._objc_msgSend_250( - _id, _lib._sel_stringByApplyingTransform_reverse_1, transform, reverse); - return NSString._(_ret, _lib, retain: true, release: true); + NSString? stringByApplyingTransform_reverse_( + DartNSStringTransform transform, bool reverse) { + final _ret = _lib._objc_msgSend_264(_id, + _lib._sel_stringByApplyingTransform_reverse_1, transform._id, reverse); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - bool writeToURL_atomically_encoding_error_(NSURL? url, bool useAuxiliaryFile, - int enc, ffi.Pointer> error) { - return _lib._objc_msgSend_251( + bool writeToURL_atomically_encoding_error_(NSURL url, bool useAuxiliaryFile, + DartNSUInteger enc, ffi.Pointer> error) { + return _lib._objc_msgSend_265( _id, _lib._sel_writeToURL_atomically_encoding_error_1, - url?._id ?? ffi.nullptr, + url._id, useAuxiliaryFile, enc, error); } bool writeToFile_atomically_encoding_error_( - NSString? path, + NSString path, bool useAuxiliaryFile, - int enc, + DartNSUInteger enc, ffi.Pointer> error) { - return _lib._objc_msgSend_252( + return _lib._objc_msgSend_266( _id, _lib._sel_writeToFile_atomically_encoding_error_1, - path?._id ?? ffi.nullptr, + path._id, useAuxiliaryFile, enc, error); } - NSString? get description { + NSString get description { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - int get hash { + DartNSUInteger get hash { return _lib._objc_msgSend_12(_id, _lib._sel_hash1); } NSString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_253( + ffi.Pointer characters, DartNSUInteger length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_267( _id, _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, characters, @@ -62055,166 +62183,186 @@ class NSString extends NSObject { } NSString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, int len, ObjCBlock17 deallocator) { - final _ret = _lib._objc_msgSend_254( + ffi.Pointer chars, + DartNSUInteger len, + ObjCBlock_ffiVoid_unichar_NSUInteger? deallocator) { + final _ret = _lib._objc_msgSend_268( _id, _lib._sel_initWithCharactersNoCopy_length_deallocator_1, chars, len, - deallocator._id); + deallocator?._id ?? ffi.nullptr); return NSString._(_ret, _lib, retain: false, release: true); } NSString initWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255( + ffi.Pointer characters, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_269( _id, _lib._sel_initWithCharacters_length_1, characters, length); return NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithUTF8String_(ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256( + NSString? initWithUTF8String_(ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_270( _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithString_(NSString? aString) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, aString?._id ?? ffi.nullptr); + NSString initWithString_(NSString aString) { + final _ret = + _lib._objc_msgSend_42(_id, _lib._sel_initWithString_1, aString._id); return NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithFormat_(NSString? format) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithFormat_1, format?._id ?? ffi.nullptr); + NSString initWithFormat_(NSString format) { + final _ret = + _lib._objc_msgSend_42(_id, _lib._sel_initWithFormat_1, format._id); return NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithFormat_arguments_(NSString? format, va_list argList) { - final _ret = _lib._objc_msgSend_257( - _id, - _lib._sel_initWithFormat_arguments_1, - format?._id ?? ffi.nullptr, - argList); + NSString initWithFormat_arguments_(NSString format, va_list argList) { + final _ret = _lib._objc_msgSend_271( + _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); return NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithFormat_locale_(NSString? format, NSObject locale) { - final _ret = _lib._objc_msgSend_258(_id, _lib._sel_initWithFormat_locale_1, - format?._id ?? ffi.nullptr, locale._id); + NSString initWithFormat_locale_(NSString format, NSObject? locale) { + final _ret = _lib._objc_msgSend_272(_id, _lib._sel_initWithFormat_locale_1, + format._id, locale?._id ?? ffi.nullptr); return NSString._(_ret, _lib, retain: true, release: true); } NSString initWithFormat_locale_arguments_( - NSString? format, NSObject locale, va_list argList) { - final _ret = _lib._objc_msgSend_259( + NSString format, NSObject? locale, va_list argList) { + final _ret = _lib._objc_msgSend_273( _id, _lib._sel_initWithFormat_locale_arguments_1, - format?._id ?? ffi.nullptr, - locale._id, + format._id, + locale?._id ?? ffi.nullptr, argList); return NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithValidatedFormat_validFormatSpecifiers_error_( - NSString? format, - NSString? validFormatSpecifiers, + NSString? initWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( + final _ret = _lib._objc_msgSend_274( _id, _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, + format._id, + validFormatSpecifiers._id, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString? format, - NSString? validFormatSpecifiers, - NSObject locale, + NSString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_261( + final _ret = _lib._objc_msgSend_275( _id, _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - locale._id, + format._id, + validFormatSpecifiers._id, + locale?._id ?? ffi.nullptr, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString? format, - NSString? validFormatSpecifiers, + NSString? initWithValidatedFormat_validFormatSpecifiers_arguments_error_( + NSString format, + NSString validFormatSpecifiers, va_list argList, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_262( + final _ret = _lib._objc_msgSend_276( _id, _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, + format._id, + validFormatSpecifiers._id, argList, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString + NSString? initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString? format, - NSString? validFormatSpecifiers, - NSObject locale, + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, va_list argList, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_263( + final _ret = _lib._objc_msgSend_277( _id, _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, - locale._id, + format._id, + validFormatSpecifiers._id, + locale?._id ?? ffi.nullptr, argList, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithData_encoding_(NSData? data, int encoding) { - final _ret = _lib._objc_msgSend_264(_id, _lib._sel_initWithData_encoding_1, - data?._id ?? ffi.nullptr, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + NSString? initWithData_encoding_(NSData data, DartNSUInteger encoding) { + final _ret = _lib._objc_msgSend_278( + _id, _lib._sel_initWithData_encoding_1, data._id, encoding); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithBytes_length_encoding_( - ffi.Pointer bytes, int len, int encoding) { - final _ret = _lib._objc_msgSend_265( + NSString? initWithBytes_length_encoding_(ffi.Pointer bytes, + DartNSUInteger len, DartNSUInteger encoding) { + final _ret = _lib._objc_msgSend_279( _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _lib._objc_msgSend_266( + NSString? initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, + DartNSUInteger len, + DartNSUInteger encoding, + bool freeBuffer) { + final _ret = _lib._objc_msgSend_280( _id, _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, bytes, len, encoding, freeBuffer); - return NSString._(_ret, _lib, retain: false, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: false, release: true); } - NSString initWithBytesNoCopy_length_encoding_deallocator_( + NSString? initWithBytesNoCopy_length_encoding_deallocator_( ffi.Pointer bytes, - int len, - int encoding, - ObjCBlock14 deallocator) { - final _ret = _lib._objc_msgSend_267( + DartNSUInteger len, + DartNSUInteger encoding, + ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { + final _ret = _lib._objc_msgSend_281( _id, _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, bytes, len, encoding, - deallocator._id); - return NSString._(_ret, _lib, retain: false, release: true); + deallocator?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: false, release: true); } static NSString string(NativeCupertinoHttp _lib) { @@ -62222,199 +62370,219 @@ class NSString extends NSObject { return NSString._(_ret, _lib, retain: true, release: true); } - static NSString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + static NSString stringWithString_(NativeCupertinoHttp _lib, NSString string) { + final _ret = _lib._objc_msgSend_42( + _lib._class_NSString1, _lib._sel_stringWithString_1, string._id); return NSString._(_ret, _lib, retain: true, release: true); } - static NSString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSString1, + static NSString stringWithCharacters_length_(NativeCupertinoHttp _lib, + ffi.Pointer characters, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_269(_lib._class_NSString1, _lib._sel_stringWithCharacters_length_1, characters, length); return NSString._(_ret, _lib, retain: true, release: true); } - static NSString stringWithUTF8String_( + static NSString? stringWithUTF8String_( NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSString1, + final _ret = _lib._objc_msgSend_270(_lib._class_NSString1, _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + static NSString stringWithFormat_(NativeCupertinoHttp _lib, NSString format) { + final _ret = _lib._objc_msgSend_42( + _lib._class_NSString1, _lib._sel_stringWithFormat_1, format._id); return NSString._(_ret, _lib, retain: true, release: true); } static NSString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { + NativeCupertinoHttp _lib, NSString format) { final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + _lib._sel_localizedStringWithFormat_1, format._id); return NSString._(_ret, _lib, retain: true, release: true); } - static NSString stringWithValidatedFormat_validFormatSpecifiers_error_( + static NSString? stringWithValidatedFormat_validFormatSpecifiers_error_( NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, + NSString format, + NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( + final _ret = _lib._objc_msgSend_274( _lib._class_NSString1, _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, + format._id, + validFormatSpecifiers._id, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSString + static NSString? localizedStringWithValidatedFormat_validFormatSpecifiers_error_( NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, + NSString format, + NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( + final _ret = _lib._objc_msgSend_274( _lib._class_NSString1, _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, + format._id, + validFormatSpecifiers._id, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _lib._objc_msgSend_268(_id, + NSString? initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, DartNSUInteger encoding) { + final _ret = _lib._objc_msgSend_282(_id, _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSString1, + static NSString? stringWithCString_encoding_(NativeCupertinoHttp _lib, + ffi.Pointer cString, DartNSUInteger enc) { + final _ret = _lib._objc_msgSend_282(_lib._class_NSString1, _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithContentsOfURL_encoding_error_( - NSURL? url, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_269( - _id, - _lib._sel_initWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, - enc, - error); - return NSString._(_ret, _lib, retain: true, release: true); + NSString? initWithContentsOfURL_encoding_error_(NSURL url, DartNSUInteger enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_283(_id, + _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithContentsOfFile_encoding_error_( - NSString? path, int enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_270( + NSString? initWithContentsOfFile_encoding_error_(NSString path, + DartNSUInteger enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_284( _id, _lib._sel_initWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, + path._id, enc, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSString stringWithContentsOfURL_encoding_error_( + static NSString? stringWithContentsOfURL_encoding_error_( NativeCupertinoHttp _lib, - NSURL? url, - int enc, + NSURL url, + DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_269( + final _ret = _lib._objc_msgSend_283( _lib._class_NSString1, _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, + url._id, enc, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSString stringWithContentsOfFile_encoding_error_( + static NSString? stringWithContentsOfFile_encoding_error_( NativeCupertinoHttp _lib, - NSString? path, - int enc, + NSString path, + DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_270( + final _ret = _lib._objc_msgSend_284( _lib._class_NSString1, _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, + path._id, enc, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithContentsOfURL_usedEncoding_error_( - NSURL? url, + NSString? initWithContentsOfURL_usedEncoding_error_( + NSURL url, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_271( + final _ret = _lib._objc_msgSend_285( _id, _lib._sel_initWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, + url._id, enc, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString initWithContentsOfFile_usedEncoding_error_( - NSString? path, + NSString? initWithContentsOfFile_usedEncoding_error_( + NSString path, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_272( + final _ret = _lib._objc_msgSend_286( _id, _lib._sel_initWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, + path._id, enc, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSString stringWithContentsOfURL_usedEncoding_error_( + static NSString? stringWithContentsOfURL_usedEncoding_error_( NativeCupertinoHttp _lib, - NSURL? url, + NSURL url, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_271( + final _ret = _lib._objc_msgSend_285( _lib._class_NSString1, _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, + url._id, enc, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static NSString stringWithContentsOfFile_usedEncoding_error_( + static NSString? stringWithContentsOfFile_usedEncoding_error_( NativeCupertinoHttp _lib, - NSString? path, + NSString path, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_272( + final _ret = _lib._objc_msgSend_286( _lib._class_NSString1, _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, + path._id, enc, error); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - static int + static DartNSUInteger stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( NativeCupertinoHttp _lib, - NSData? data, + NSData data, NSDictionary? opts, ffi.Pointer> string, ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_273( + return _lib._objc_msgSend_287( _lib._class_NSString1, _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, + data._id, opts?._id ?? ffi.nullptr, string, usedLossyConversion); @@ -62425,36 +62593,39 @@ class NSString extends NSObject { return NSObject._(_ret, _lib, retain: true, release: true); } - NSDictionary propertyListFromStringsFileFormat() { - final _ret = _lib._objc_msgSend_180( + NSDictionary? propertyListFromStringsFileFormat() { + final _ret = _lib._objc_msgSend_288( _id, _lib._sel_propertyListFromStringsFileFormat1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } ffi.Pointer cString() { - return _lib._objc_msgSend_53(_id, _lib._sel_cString1); + return _lib._objc_msgSend_57(_id, _lib._sel_cString1); } ffi.Pointer lossyCString() { - return _lib._objc_msgSend_53(_id, _lib._sel_lossyCString1); + return _lib._objc_msgSend_57(_id, _lib._sel_lossyCString1); } - int cStringLength() { + DartNSUInteger cStringLength() { return _lib._objc_msgSend_12(_id, _lib._sel_cStringLength1); } void getCString_(ffi.Pointer bytes) { - return _lib._objc_msgSend_274(_id, _lib._sel_getCString_1, bytes); + _lib._objc_msgSend_289(_id, _lib._sel_getCString_1, bytes); } - void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { - return _lib._objc_msgSend_275( + void getCString_maxLength_( + ffi.Pointer bytes, DartNSUInteger maxLength) { + _lib._objc_msgSend_290( _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); } void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, - int maxLength, NSRange aRange, NSRangePointer leftoverRange) { - return _lib._objc_msgSend_276( + DartNSUInteger maxLength, NSRange aRange, NSRangePointer leftoverRange) { + _lib._objc_msgSend_291( _id, _lib._sel_getCString_maxLength_range_remainingRange_1, bytes, @@ -62463,112 +62634,137 @@ class NSString extends NSObject { leftoverRange); } - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37( + _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); } - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _lib._objc_msgSend_168( + _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); } - NSObject initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_49( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - NSObject initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_226(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSObject? stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_49( + _lib._class_NSString1, _lib._sel_stringWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSObject? stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_226( + _lib._class_NSString1, _lib._sel_stringWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - NSObject initWithCStringNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_277( + NSObject? initWithCStringNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, DartNSUInteger length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_292( _id, _lib._sel_initWithCStringNoCopy_length_freeWhenDone_1, bytes, length, freeBuffer); - return NSObject._(_ret, _lib, retain: false, release: true); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: false, release: true); } - NSObject initWithCString_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_268( + NSObject? initWithCString_length_( + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_282( _id, _lib._sel_initWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - NSObject initWithCString_(ffi.Pointer bytes) { + NSObject? initWithCString_(ffi.Pointer bytes) { final _ret = - _lib._objc_msgSend_256(_id, _lib._sel_initWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_270(_id, _lib._sel_initWithCString_1, bytes); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSString1, + static NSObject? stringWithCString_length_(NativeCupertinoHttp _lib, + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_282(_lib._class_NSString1, _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithCString_( + static NSObject? stringWithCString_( NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( + final _ret = _lib._objc_msgSend_270( _lib._class_NSString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } void getCharacters_(ffi.Pointer buffer) { - return _lib._objc_msgSend_278(_id, _lib._sel_getCharacters_1, buffer); + _lib._objc_msgSend_293(_id, _lib._sel_getCharacters_1, buffer); } /// Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode a URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. - NSString stringByAddingPercentEncodingWithAllowedCharacters_( - NSCharacterSet? allowedCharacters) { - final _ret = _lib._objc_msgSend_244( + NSString? stringByAddingPercentEncodingWithAllowedCharacters_( + NSCharacterSet allowedCharacters) { + final _ret = _lib._objc_msgSend_294( _id, _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, - allowedCharacters?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + allowedCharacters._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } /// Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. NSString? get stringByRemovingPercentEncoding { final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_stringByRemovingPercentEncoding1); + _lib._objc_msgSend_55(_id, _lib._sel_stringByRemovingPercentEncoding1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } - NSString stringByAddingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_15( + NSString? stringByAddingPercentEscapesUsingEncoding_(DartNSUInteger enc) { + final _ret = _lib._objc_msgSend_295( _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } - NSString stringByReplacingPercentEscapesUsingEncoding_(int enc) { - final _ret = _lib._objc_msgSend_15( + NSString? stringByReplacingPercentEscapesUsingEncoding_(DartNSUInteger enc) { + final _ret = _lib._objc_msgSend_295( _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); - return NSString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } static NSString new1(NativeCupertinoHttp _lib) { @@ -62576,6 +62772,13 @@ class NSString extends NSObject { return NSString._(_ret, _lib, retain: false, release: true); } + static NSString allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSString1, _lib._sel_allocWithZone_1, zone); + return NSString._(_ret, _lib, retain: false, release: true); + } + static NSString alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); return NSString._(_ret, _lib, retain: false, release: true); @@ -62587,6 +62790,7 @@ extension StringToNSString on String { } typedef unichar = ffi.UnsignedShort; +typedef Dartunichar = int; class NSCoder extends _ObjCWrapper { NSCoder._(ffi.Pointer id, NativeCupertinoHttp lib, @@ -62687,128 +62891,98 @@ class NSCharacterSet extends NSObject { obj._lib._class_NSCharacterSet1); } - static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getControlCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( + static NSCharacterSet getWhitespaceAndNewlineCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSCharacterSet1, _lib._sel_whitespaceAndNewlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getLetterCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getLowercaseLetterCharacterSet( + static NSCharacterSet getLowercaseLetterCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getUppercaseLetterCharacterSet( + static NSCharacterSet getUppercaseLetterCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getNonBaseCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getDecomposableCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getIllegalCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getPunctuationCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getCapitalizedLetterCharacterSet( + static NSCharacterSet getCapitalizedLetterCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getSymbolCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getNewlineCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: false, release: true); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); } static NSCharacterSet characterSetWithRange_( @@ -62819,127 +62993,115 @@ class NSCharacterSet extends NSObject { } static NSCharacterSet characterSetWithCharactersInString_( - NativeCupertinoHttp _lib, NSString? aString) { - final _ret = _lib._objc_msgSend_30( - _lib._class_NSCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, - aString?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSString aString) { + final _ret = _lib._objc_msgSend_30(_lib._class_NSCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, aString._id); return NSCharacterSet._(_ret, _lib, retain: true, release: true); } static NSCharacterSet characterSetWithBitmapRepresentation_( - NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_223( - _lib._class_NSCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, - data?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSData data) { + final _ret = _lib._objc_msgSend_234(_lib._class_NSCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, data._id); return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet characterSetWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? fName) { - final _ret = _lib._objc_msgSend_30(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + static NSCharacterSet? characterSetWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString fName) { + final _ret = _lib._objc_msgSend_235(_lib._class_NSCharacterSet1, + _lib._sel_characterSetWithContentsOfFile_1, fName._id); + return _ret.address == 0 + ? null + : NSCharacterSet._(_ret, _lib, retain: true, release: true); } - NSCharacterSet initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + NSCharacterSet initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_236(_id, _lib._sel_initWithCoder_1, coder._id); return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - bool characterIsMember_(int aCharacter) { - return _lib._objc_msgSend_224( + bool characterIsMember_(Dartunichar aCharacter) { + return _lib._objc_msgSend_237( _id, _lib._sel_characterIsMember_1, aCharacter); } - NSData? get bitmapRepresentation { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_bitmapRepresentation1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + NSData get bitmapRepresentation { + final _ret = _lib._objc_msgSend_54(_id, _lib._sel_bitmapRepresentation1); + return NSData._(_ret, _lib, retain: true, release: true); } - NSCharacterSet? get invertedSet { + NSCharacterSet get invertedSet { final _ret = _lib._objc_msgSend_28(_id, _lib._sel_invertedSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - bool longCharacterIsMember_(int theLongChar) { - return _lib._objc_msgSend_225( + bool longCharacterIsMember_(DartUInt32 theLongChar) { + return _lib._objc_msgSend_238( _id, _lib._sel_longCharacterIsMember_1, theLongChar); } - bool isSupersetOfSet_(NSCharacterSet? theOtherSet) { - return _lib._objc_msgSend_226( - _id, _lib._sel_isSupersetOfSet_1, theOtherSet?._id ?? ffi.nullptr); + bool isSupersetOfSet_(NSCharacterSet theOtherSet) { + return _lib._objc_msgSend_239( + _id, _lib._sel_isSupersetOfSet_1, theOtherSet._id); } bool hasMemberInPlane_(int thePlane) { - return _lib._objc_msgSend_227(_id, _lib._sel_hasMemberInPlane_1, thePlane); + return _lib._objc_msgSend_240(_id, _lib._sel_hasMemberInPlane_1, thePlane); } /// Returns a character set containing the characters allowed in a URL's user subcomponent. - static NSCharacterSet? getURLUserAllowedCharacterSet( + static NSCharacterSet getURLUserAllowedCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } /// Returns a character set containing the characters allowed in a URL's password subcomponent. - static NSCharacterSet? getURLPasswordAllowedCharacterSet( + static NSCharacterSet getURLPasswordAllowedCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } /// Returns a character set containing the characters allowed in a URL's host subcomponent. - static NSCharacterSet? getURLHostAllowedCharacterSet( + static NSCharacterSet getURLHostAllowedCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } /// Returns a character set containing the characters allowed in a URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - static NSCharacterSet? getURLPathAllowedCharacterSet( + static NSCharacterSet getURLPathAllowedCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } /// Returns a character set containing the characters allowed in a URL's query component. - static NSCharacterSet? getURLQueryAllowedCharacterSet( + static NSCharacterSet getURLQueryAllowedCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } /// Returns a character set containing the characters allowed in a URL's fragment component. - static NSCharacterSet? getURLFragmentAllowedCharacterSet( + static NSCharacterSet getURLFragmentAllowedCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSCharacterSet init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } static NSCharacterSet new1(NativeCupertinoHttp _lib) { @@ -62948,6 +63110,13 @@ class NSCharacterSet extends NSObject { return NSCharacterSet._(_ret, _lib, retain: false, release: true); } + static NSCharacterSet allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSCharacterSet1, _lib._sel_allocWithZone_1, zone); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); + } + static NSCharacterSet alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); @@ -62978,7 +63147,7 @@ class NSData extends NSObject { obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); } - int get length { + DartNSUInteger get length { return _lib._objc_msgSend_12(_id, _lib._sel_length1); } @@ -62989,26 +63158,21 @@ class NSData extends NSObject { return _lib._objc_msgSend_31(_id, _lib._sel_bytes1); } - NSString? get description { + NSString get description { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - void getBytes_length_(ffi.Pointer buffer, int length) { - return _lib._objc_msgSend_33( - _id, _lib._sel_getBytes_length_1, buffer, length); + void getBytes_length_(ffi.Pointer buffer, DartNSUInteger length) { + _lib._objc_msgSend_33(_id, _lib._sel_getBytes_length_1, buffer, length); } void getBytes_range_(ffi.Pointer buffer, NSRange range) { - return _lib._objc_msgSend_34( - _id, _lib._sel_getBytes_range_1, buffer, range); + _lib._objc_msgSend_34(_id, _lib._sel_getBytes_range_1, buffer, range); } - bool isEqualToData_(NSData? other) { - return _lib._objc_msgSend_35( - _id, _lib._sel_isEqualToData_1, other?._id ?? ffi.nullptr); + bool isEqualToData_(NSData other) { + return _lib._objc_msgSend_35(_id, _lib._sel_isEqualToData_1, other._id); } NSData subdataWithRange_(NSRange range) { @@ -63017,38 +63181,39 @@ class NSData extends NSObject { return NSData._(_ret, _lib, retain: true, release: true); } - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37( + _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); } /// the atomically flag is ignored if the url is not of a type the supports atomic writes - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _lib._objc_msgSend_168( + _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); } - bool writeToFile_options_error_(NSString? path, int writeOptionsMask, + bool writeToFile_options_error_(NSString path, int writeOptionsMask, ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_208(_id, _lib._sel_writeToFile_options_error_1, - path?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); + return _lib._objc_msgSend_218(_id, _lib._sel_writeToFile_options_error_1, + path._id, writeOptionsMask, errorPtr); } - bool writeToURL_options_error_(NSURL? url, int writeOptionsMask, + bool writeToURL_options_error_(NSURL url, int writeOptionsMask, ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_209(_id, _lib._sel_writeToURL_options_error_1, - url?._id ?? ffi.nullptr, writeOptionsMask, errorPtr); + return _lib._objc_msgSend_219(_id, _lib._sel_writeToURL_options_error_1, + url._id, writeOptionsMask, errorPtr); } NSRange rangeOfData_options_range_( - NSData? dataToFind, int mask, NSRange searchRange) { - return _lib._objc_msgSend_210(_id, _lib._sel_rangeOfData_options_range_1, - dataToFind?._id ?? ffi.nullptr, mask, searchRange); + NSData dataToFind, int mask, NSRange searchRange) { + return _lib._objc_msgSend_220(_id, _lib._sel_rangeOfData_options_range_1, + dataToFind._id, mask, searchRange); } /// 'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES. - void enumerateByteRangesUsingBlock_(ObjCBlock13 block) { - return _lib._objc_msgSend_211( + void enumerateByteRangesUsingBlock_( + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool block) { + _lib._objc_msgSend_221( _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._id); } @@ -63057,16 +63222,16 @@ class NSData extends NSObject { return NSData._(_ret, _lib, retain: true, release: true); } - static NSData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212( + static NSData dataWithBytes_length_(NativeCupertinoHttp _lib, + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_222( _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); return NSData._(_ret, _lib, retain: true, release: true); } - static NSData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSData1, + static NSData dataWithBytesNoCopy_length_(NativeCupertinoHttp _lib, + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_222(_lib._class_NSData1, _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); return NSData._(_ret, _lib, retain: false, release: true); } @@ -63074,202 +63239,233 @@ class NSData extends NSObject { static NSData dataWithBytesNoCopy_length_freeWhenDone_( NativeCupertinoHttp _lib, ffi.Pointer bytes, - int length, + DartNSUInteger length, bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSData1, + final _ret = _lib._objc_msgSend_223(_lib._class_NSData1, _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); return NSData._(_ret, _lib, retain: false, release: true); } - static NSData dataWithContentsOfFile_options_error_( + static NSData? dataWithContentsOfFile_options_error_( NativeCupertinoHttp _lib, - NSString? path, + NSString path, int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( + final _ret = _lib._objc_msgSend_224( _lib._class_NSData1, _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, + path._id, readOptionsMask, errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - static NSData dataWithContentsOfURL_options_error_( + static NSData? dataWithContentsOfURL_options_error_( NativeCupertinoHttp _lib, - NSURL? url, + NSURL url, int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( + final _ret = _lib._objc_msgSend_225( _lib._class_NSData1, _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, + url._id, readOptionsMask, errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - static NSData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + static NSData? dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_49( + _lib._class_NSData1, _lib._sel_dataWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - static NSData dataWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + static NSData? dataWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_226( + _lib._class_NSData1, _lib._sel_dataWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - NSData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212( + NSData initWithBytes_length_( + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_222( _id, _lib._sel_initWithBytes_length_1, bytes, length); return NSData._(_ret, _lib, retain: true, release: true); } - NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212( + NSData initWithBytesNoCopy_length_( + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_222( _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); return NSData._(_ret, _lib, retain: false, release: true); } NSData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _lib._objc_msgSend_213(_id, + ffi.Pointer bytes, DartNSUInteger length, bool b) { + final _ret = _lib._objc_msgSend_223(_id, _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); return NSData._(_ret, _lib, retain: false, release: true); } NSData initWithBytesNoCopy_length_deallocator_( - ffi.Pointer bytes, int length, ObjCBlock14 deallocator) { - final _ret = _lib._objc_msgSend_216( + ffi.Pointer bytes, + DartNSUInteger length, + ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { + final _ret = _lib._objc_msgSend_227( _id, _lib._sel_initWithBytesNoCopy_length_deallocator_1, bytes, length, - deallocator._id); + deallocator?._id ?? ffi.nullptr); return NSData._(_ret, _lib, retain: false, release: true); } - NSData initWithContentsOfFile_options_error_(NSString? path, + NSData? initWithContentsOfFile_options_error_(NSString path, int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( + final _ret = _lib._objc_msgSend_224( _id, _lib._sel_initWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, + path._id, readOptionsMask, errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - NSData initWithContentsOfURL_options_error_(NSURL? url, int readOptionsMask, + NSData? initWithContentsOfURL_options_error_(NSURL url, int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( + final _ret = _lib._objc_msgSend_225( _id, _lib._sel_initWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, + url._id, readOptionsMask, errorPtr); - return NSData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - NSData initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + NSData? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_49( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - NSData initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: true, release: true); + NSData? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_226(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - NSData initWithData_(NSData? data) { - final _ret = _lib._objc_msgSend_217( - _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + NSData initWithData_(NSData data) { + final _ret = + _lib._objc_msgSend_228(_id, _lib._sel_initWithData_1, data._id); return NSData._(_ret, _lib, retain: true, release: true); } - static NSData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + static NSData dataWithData_(NativeCupertinoHttp _lib, NSData data) { + final _ret = _lib._objc_msgSend_228( + _lib._class_NSData1, _lib._sel_dataWithData_1, data._id); return NSData._(_ret, _lib, retain: true, release: true); } /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. - NSData initWithBase64EncodedString_options_( - NSString? base64String, int options) { - final _ret = _lib._objc_msgSend_218( + NSData? initWithBase64EncodedString_options_( + NSString base64String, int options) { + final _ret = _lib._objc_msgSend_229( _id, _lib._sel_initWithBase64EncodedString_options_1, - base64String?._id ?? ffi.nullptr, + base64String._id, options); - return NSData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } /// Create a Base-64 encoded NSString from the receiver's contents using the given options. NSString base64EncodedStringWithOptions_(int options) { - final _ret = _lib._objc_msgSend_219( + final _ret = _lib._objc_msgSend_230( _id, _lib._sel_base64EncodedStringWithOptions_1, options); return NSString._(_ret, _lib, retain: true, release: true); } /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. - NSData initWithBase64EncodedData_options_(NSData? base64Data, int options) { - final _ret = _lib._objc_msgSend_220( - _id, - _lib._sel_initWithBase64EncodedData_options_1, - base64Data?._id ?? ffi.nullptr, - options); - return NSData._(_ret, _lib, retain: true, release: true); + NSData? initWithBase64EncodedData_options_(NSData base64Data, int options) { + final _ret = _lib._objc_msgSend_231(_id, + _lib._sel_initWithBase64EncodedData_options_1, base64Data._id, options); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } /// Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options. NSData base64EncodedDataWithOptions_(int options) { - final _ret = _lib._objc_msgSend_221( + final _ret = _lib._objc_msgSend_232( _id, _lib._sel_base64EncodedDataWithOptions_1, options); return NSData._(_ret, _lib, retain: true, release: true); } /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. - NSData decompressedDataUsingAlgorithm_error_( + NSData? decompressedDataUsingAlgorithm_error_( int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_222(_id, + final _ret = _lib._objc_msgSend_233(_id, _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); - return NSData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } - NSData compressedDataUsingAlgorithm_error_( + NSData? compressedDataUsingAlgorithm_error_( int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_222( + final _ret = _lib._objc_msgSend_233( _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); - return NSData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } void getBytes_(ffi.Pointer buffer) { - return _lib._objc_msgSend_59(_id, _lib._sel_getBytes_1, buffer); + _lib._objc_msgSend_64(_id, _lib._sel_getBytes_1, buffer); } - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSObject? dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_49(_lib._class_NSData1, + _lib._sel_dataWithContentsOfMappedFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - NSObject initWithContentsOfMappedFile_(NSString? path) { - final _ret = _lib._objc_msgSend_42(_id, - _lib._sel_initWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? initWithContentsOfMappedFile_(NSString path) { + final _ret = _lib._objc_msgSend_49( + _id, _lib._sel_initWithContentsOfMappedFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } /// These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0. - NSObject initWithBase64Encoding_(NSString? base64String) { - final _ret = _lib._objc_msgSend_42(_id, _lib._sel_initWithBase64Encoding_1, - base64String?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? initWithBase64Encoding_(NSString base64String) { + final _ret = _lib._objc_msgSend_49( + _id, _lib._sel_initWithBase64Encoding_1, base64String._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } NSString base64Encoding() { @@ -63277,11 +63473,24 @@ class NSData extends NSObject { return NSString._(_ret, _lib, retain: true, release: true); } + @override + NSData init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSData._(_ret, _lib, retain: true, release: true); + } + static NSData new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); return NSData._(_ret, _lib, retain: false, release: true); } + static NSData allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSData1, _lib._sel_allocWithZone_1, zone); + return NSData._(_ret, _lib, retain: false, release: true); + } + static NSData alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); return NSData._(_ret, _lib, retain: false, release: true); @@ -63312,62 +63521,61 @@ class NSURL extends NSObject { } /// this call percent-encodes both the host and path, so this cannot be used to set a username/password or port in the hostname part or with a IPv6 '[...]' type address. NSURLComponents handles IPv6 addresses correctly. - NSURL initWithScheme_host_path_( - NSString? scheme, NSString? host, NSString? path) { + NSURL? initWithScheme_host_path_( + NSString scheme, NSString? host, NSString path) { final _ret = _lib._objc_msgSend_38( _id, _lib._sel_initWithScheme_host_path_1, - scheme?._id ?? ffi.nullptr, + scheme._id, host?._id ?? ffi.nullptr, - path?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + path._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } /// Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL. NSURL initFileURLWithPath_isDirectory_relativeToURL_( - NSString? path, bool isDir, NSURL? baseURL) { + NSString path, bool isDir, NSURL? baseURL) { final _ret = _lib._objc_msgSend_39( _id, _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, - path?._id ?? ffi.nullptr, + path._id, isDir, baseURL?._id ?? ffi.nullptr); return NSURL._(_ret, _lib, retain: true, release: true); } /// Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. - NSURL initFileURLWithPath_relativeToURL_(NSString? path, NSURL? baseURL) { + NSURL initFileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { final _ret = _lib._objc_msgSend_40( _id, _lib._sel_initFileURLWithPath_relativeToURL_1, - path?._id ?? ffi.nullptr, + path._id, baseURL?._id ?? ffi.nullptr); return NSURL._(_ret, _lib, retain: true, release: true); } - NSURL initFileURLWithPath_isDirectory_(NSString? path, bool isDir) { + NSURL initFileURLWithPath_isDirectory_(NSString path, bool isDir) { final _ret = _lib._objc_msgSend_41( - _id, - _lib._sel_initFileURLWithPath_isDirectory_1, - path?._id ?? ffi.nullptr, - isDir); + _id, _lib._sel_initFileURLWithPath_isDirectory_1, path._id, isDir); return NSURL._(_ret, _lib, retain: true, release: true); } /// Better to use initFileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. - NSURL initFileURLWithPath_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initFileURLWithPath_1, path?._id ?? ffi.nullptr); + NSURL initFileURLWithPath_(NSString path) { + final _ret = + _lib._objc_msgSend_42(_id, _lib._sel_initFileURLWithPath_1, path._id); return NSURL._(_ret, _lib, retain: true, release: true); } /// Initializes and returns a newly created file NSURL referencing the local file or directory at path, relative to a base URL. static NSURL fileURLWithPath_isDirectory_relativeToURL_( - NativeCupertinoHttp _lib, NSString? path, bool isDir, NSURL? baseURL) { + NativeCupertinoHttp _lib, NSString path, bool isDir, NSURL? baseURL) { final _ret = _lib._objc_msgSend_43( _lib._class_NSURL1, _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, - path?._id ?? ffi.nullptr, + path._id, isDir, baseURL?._id ?? ffi.nullptr); return NSURL._(_ret, _lib, retain: true, release: true); @@ -63375,29 +63583,26 @@ class NSURL extends NSObject { /// Better to use fileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. static NSURL fileURLWithPath_relativeToURL_( - NativeCupertinoHttp _lib, NSString? path, NSURL? baseURL) { + NativeCupertinoHttp _lib, NSString path, NSURL? baseURL) { final _ret = _lib._objc_msgSend_44( _lib._class_NSURL1, _lib._sel_fileURLWithPath_relativeToURL_1, - path?._id ?? ffi.nullptr, + path._id, baseURL?._id ?? ffi.nullptr); return NSURL._(_ret, _lib, retain: true, release: true); } static NSURL fileURLWithPath_isDirectory_( - NativeCupertinoHttp _lib, NSString? path, bool isDir) { - final _ret = _lib._objc_msgSend_45( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_1, - path?._id ?? ffi.nullptr, - isDir); + NativeCupertinoHttp _lib, NSString path, bool isDir) { + final _ret = _lib._objc_msgSend_45(_lib._class_NSURL1, + _lib._sel_fileURLWithPath_isDirectory_1, path._id, isDir); return NSURL._(_ret, _lib, retain: true, release: true); } /// Better to use fileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. - static NSURL fileURLWithPath_(NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_46(_lib._class_NSURL1, - _lib._sel_fileURLWithPath_1, path?._id ?? ffi.nullptr); + static NSURL fileURLWithPath_(NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_46( + _lib._class_NSURL1, _lib._sel_fileURLWithPath_1, path._id); return NSURL._(_ret, _lib, retain: true, release: true); } @@ -63429,107 +63634,152 @@ class NSURL extends NSObject { } /// These methods expect their string arguments to contain any percent escape codes that are necessary. It is an error for URLString to be nil. - NSURL initWithString_(NSString? URLString) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + NSURL? initWithString_(NSString URLString) { + final _ret = + _lib._objc_msgSend_49(_id, _lib._sel_initWithString_1, URLString._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - NSURL initWithString_relativeToURL_(NSString? URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_40( + NSURL? initWithString_relativeToURL_(NSString URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_50( _id, _lib._sel_initWithString_relativeToURL_1, - URLString?._id ?? ffi.nullptr, + URLString._id, baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - static NSURL URLWithString_(NativeCupertinoHttp _lib, NSString? URLString) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSURL1, - _lib._sel_URLWithString_1, URLString?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + static NSURL? URLWithString_(NativeCupertinoHttp _lib, NSString URLString) { + final _ret = _lib._objc_msgSend_49( + _lib._class_NSURL1, _lib._sel_URLWithString_1, URLString._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - static NSURL URLWithString_relativeToURL_( - NativeCupertinoHttp _lib, NSString? URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_40( + static NSURL? URLWithString_relativeToURL_( + NativeCupertinoHttp _lib, NSString URLString, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_50( _lib._class_NSURL1, _lib._sel_URLWithString_relativeToURL_1, - URLString?._id ?? ffi.nullptr, + URLString._id, baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes an `NSURL` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters. + /// If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned. + /// If `encodingInvalidCharacters` is true, `NSURL` will try to encode the string to create a valid URL. + /// If the URL string is still invalid after encoding, `nil` is returned. + /// + /// - Parameter URLString: The URL string. + /// - Parameter encodingInvalidCharacters: True if `NSURL` should try to encode an invalid URL string, false otherwise. + /// - Returns: An `NSURL` instance for a valid URL, or `nil` if the URL is invalid. + NSURL? initWithString_encodingInvalidCharacters_( + NSString URLString, bool encodingInvalidCharacters) { + final _ret = _lib._objc_msgSend_51( + _id, + _lib._sel_initWithString_encodingInvalidCharacters_1, + URLString._id, + encodingInvalidCharacters); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created `NSURL` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters. + /// If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned. + /// If `encodingInvalidCharacters` is true, `NSURL` will try to encode the string to create a valid URL. + /// If the URL string is still invalid after encoding, `nil` is returned. + /// + /// - Parameter URLString: The URL string. + /// - Parameter encodingInvalidCharacters: True if `NSURL` should try to encode an invalid URL string, false otherwise. + /// - Returns: An `NSURL` instance for a valid URL, or `nil` if the URL is invalid. + static NSURL? URLWithString_encodingInvalidCharacters_( + NativeCupertinoHttp _lib, + NSString URLString, + bool encodingInvalidCharacters) { + final _ret = _lib._objc_msgSend_51( + _lib._class_NSURL1, + _lib._sel_URLWithString_encodingInvalidCharacters_1, + URLString._id, + encodingInvalidCharacters); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } /// Initializes a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - NSURL initWithDataRepresentation_relativeToURL_( - NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_49( + NSURL initWithDataRepresentation_relativeToURL_(NSData data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_52( _id, _lib._sel_initWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, + data._id, baseURL?._id ?? ffi.nullptr); return NSURL._(_ret, _lib, retain: true, release: true); } /// Initializes and returns a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. static NSURL URLWithDataRepresentation_relativeToURL_( - NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_50( + NativeCupertinoHttp _lib, NSData data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_53( _lib._class_NSURL1, _lib._sel_URLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, + data._id, baseURL?._id ?? ffi.nullptr); return NSURL._(_ret, _lib, retain: true, release: true); } /// Initializes a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( - NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_49( + NSData data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_52( _id, _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, + data._id, baseURL?._id ?? ffi.nullptr); return NSURL._(_ret, _lib, retain: true, release: true); } /// Initializes and returns a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. static NSURL absoluteURLWithDataRepresentation_relativeToURL_( - NativeCupertinoHttp _lib, NSData? data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_50( + NativeCupertinoHttp _lib, NSData data, NSURL? baseURL) { + final _ret = _lib._objc_msgSend_53( _lib._class_NSURL1, _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, - data?._id ?? ffi.nullptr, + data._id, baseURL?._id ?? ffi.nullptr); return NSURL._(_ret, _lib, retain: true, release: true); } /// Returns the data representation of the URL's relativeString. If the URL was initialized with -initWithData:relativeToURL:, the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with NSUTF8StringEncoding. - NSData? get dataRepresentation { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_dataRepresentation1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + NSData get dataRepresentation { + final _ret = _lib._objc_msgSend_54(_id, _lib._sel_dataRepresentation1); + return NSData._(_ret, _lib, retain: true, release: true); } NSString? get absoluteString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_absoluteString1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_absoluteString1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } /// The relative portion of a URL. If baseURL is nil, or if the receiver is itself absolute, this is the same as absoluteString - NSString? get relativeString { + NSString get relativeString { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativeString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } /// may be nil. NSURL? get baseURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_baseURL1); + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_baseURL1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); @@ -63537,7 +63787,7 @@ class NSURL extends NSObject { /// if the receiver is itself absolute, this will return self. NSURL? get absoluteURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_absoluteURL1); + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_absoluteURL1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); @@ -63545,14 +63795,14 @@ class NSURL extends NSObject { /// Any URL is composed of these two basic pieces. The full URL would be the concatenation of [myURL scheme], ':', [myURL resourceSpecifier] NSString? get scheme { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_scheme1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } NSString? get resourceSpecifier { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_resourceSpecifier1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_resourceSpecifier1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -63560,56 +63810,56 @@ class NSURL extends NSObject { /// If the URL conforms to rfc 1808 (the most common form of URL), the following accessors will return the various components; otherwise they return nil. The litmus test for conformance is as recommended in RFC 1808 - whether the first two characters of resourceSpecifier is @"//". In all cases, they return the component's value after resolving the receiver against its base URL. NSString? get host { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_host1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } NSNumber? get port { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_port1); return _ret.address == 0 ? null : NSNumber._(_ret, _lib, retain: true, release: true); } NSString? get user { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_user1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } NSString? get password { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_password1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } NSString? get path { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_path1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } NSString? get fragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_fragment1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } NSString? get parameterString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_parameterString1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_parameterString1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } NSString? get query { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_query1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -63617,7 +63867,7 @@ class NSURL extends NSObject { /// The same as path if baseURL is nil NSString? get relativePath { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativePath1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_relativePath1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -63630,8 +63880,8 @@ class NSURL extends NSObject { /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. bool getFileSystemRepresentation_maxLength_( - ffi.Pointer buffer, int maxBufferLength) { - return _lib._objc_msgSend_90( + ffi.Pointer buffer, DartNSUInteger maxBufferLength) { + return _lib._objc_msgSend_95( _id, _lib._sel_getFileSystemRepresentation_maxLength_1, buffer, @@ -63640,7 +63890,7 @@ class NSURL extends NSObject { /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. The returned C string will be automatically freed just as a returned object would be released; your code should copy the representation or use getFileSystemRepresentation:maxLength: if it needs to store the representation outside of the autorelease context in which the representation is created. ffi.Pointer get fileSystemRepresentation { - return _lib._objc_msgSend_53(_id, _lib._sel_fileSystemRepresentation1); + return _lib._objc_msgSend_57(_id, _lib._sel_fileSystemRepresentation1); } /// Whether the scheme is file:; if [myURL isFileURL] is YES, then [myURL path] is suitable for input into NSFileManager or NSPathUtilities. @@ -63649,33 +63899,28 @@ class NSURL extends NSObject { } NSURL? get standardizedURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_standardizedURL1); + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_standardizedURL1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); } - /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. - bool checkResourceIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_183( - _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); - } - /// Returns whether the URL is a file reference URL. Symbol is present in iOS 4, but performs no operation. bool isFileReferenceURL() { return _lib._objc_msgSend_11(_id, _lib._sel_isFileReferenceURL1); } /// Returns a file reference URL that refers to the same resource as a specified file URL. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:). Symbol is present in iOS 4, but performs no operation. - NSURL fileReferenceURL() { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileReferenceURL1); - return NSURL._(_ret, _lib, retain: true, release: true); + NSURL? fileReferenceURL() { + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_fileReferenceURL1); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } /// Returns a file path URL that refers to the same resource as a specified URL. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. Symbol is present in iOS 4, but performs no operation. NSURL? get filePathURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_filePathURL1); + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_filePathURL1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); @@ -63684,173 +63929,188 @@ class NSURL extends NSObject { /// Returns the resource value identified by a given resource key. This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this method returns YES and value is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. bool getResourceValue_forKey_error_( ffi.Pointer> value, - NSURLResourceKey key, + DartNSURLResourceKey key, ffi.Pointer> error) { - return _lib._objc_msgSend_184( - _id, _lib._sel_getResourceValue_forKey_error_1, value, key, error); + return _lib._objc_msgSend_191( + _id, _lib._sel_getResourceValue_forKey_error_1, value, key._id, error); } /// Returns the resource values identified by specified array of resource keys. This method first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this method returns NULL, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - NSDictionary resourceValuesForKeys_error_( - NSArray? keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_185( - _id, - _lib._sel_resourceValuesForKeys_error_1, - keys?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSDictionary? resourceValuesForKeys_error_( + NSArray keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_192( + _id, _lib._sel_resourceValuesForKeys_error_1, keys._id, error); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } /// Sets the resource value identified by a given resource key. This method writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool setResourceValue_forKey_error_(NSObject value, NSURLResourceKey key, + bool setResourceValue_forKey_error_(NSObject? value, DartNSURLResourceKey key, ffi.Pointer> error) { - return _lib._objc_msgSend_186( - _id, _lib._sel_setResourceValue_forKey_error_1, value._id, key, error); + return _lib._objc_msgSend_193( + _id, + _lib._sel_setResourceValue_forKey_error_1, + value?._id ?? ffi.nullptr, + key._id, + error); } /// Sets any number of resource values of a URL's resource. This method writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to this method or to -setResourceValue:forKey:error: to guarantee the order. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. bool setResourceValues_error_( - NSDictionary? keyedValues, ffi.Pointer> error) { - return _lib._objc_msgSend_187(_id, _lib._sel_setResourceValues_error_1, - keyedValues?._id ?? ffi.nullptr, error); + NSDictionary keyedValues, ffi.Pointer> error) { + return _lib._objc_msgSend_194( + _id, _lib._sel_setResourceValues_error_1, keyedValues._id, error); } /// Removes the cached resource value identified by a given resource value key from the URL object. Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources. - void removeCachedResourceValueForKey_(NSURLResourceKey key) { - return _lib._objc_msgSend_188( - _id, _lib._sel_removeCachedResourceValueForKey_1, key); + void removeCachedResourceValueForKey_(DartNSURLResourceKey key) { + _lib._objc_msgSend_195( + _id, _lib._sel_removeCachedResourceValueForKey_1, key._id); } /// Removes all cached resource values and all temporary resource values from the URL object. This method is currently applicable only to URLs for file system resources. void removeAllCachedResourceValues() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); + _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); } - /// NS_SWIFT_SENDABLE - void setTemporaryResourceValue_forKey_(NSObject value, NSURLResourceKey key) { - return _lib._objc_msgSend_189( - _id, _lib._sel_setTemporaryResourceValue_forKey_1, value._id, key); + /// Sets a temporary resource value on the URL object. Temporary resource values are for client use. Temporary resource values exist only in memory and are never written to the resource's backing store. Once set, a temporary resource value can be copied from the URL object with -getResourceValue:forKey:error: or -resourceValuesForKeys:error:. To remove a temporary resource value from the URL object, use -removeCachedResourceValueForKey:. Care should be taken to ensure the key that identifies a temporary resource value is unique and does not conflict with system defined keys (using reverse domain name notation in your temporary resource value keys is recommended). This method is currently applicable only to URLs for file system resources. + void setTemporaryResourceValue_forKey_( + NSObject? value, DartNSURLResourceKey key) { + _lib._objc_msgSend_196(_id, _lib._sel_setTemporaryResourceValue_forKey_1, + value?._id ?? ffi.nullptr, key._id); } /// Returns bookmark data for the URL, created with specified options and resource values. If this method returns nil, the optional error is populated. - NSData + NSData? bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( int options, NSArray? keys, NSURL? relativeURL, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_190( + final _ret = _lib._objc_msgSend_197( _id, _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, options, keys?._id ?? ffi.nullptr, relativeURL?._id ?? ffi.nullptr, error); - return NSData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } /// Initializes a newly created NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. - NSURL + NSURL? initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NSData? bookmarkData, + NSData bookmarkData, int options, NSURL? relativeURL, ffi.Pointer isStale, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_191( + final _ret = _lib._objc_msgSend_198( _id, _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData?._id ?? ffi.nullptr, + bookmarkData._id, options, relativeURL?._id ?? ffi.nullptr, isStale, error); - return NSURL._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } /// Creates and Initializes an NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. - static NSURL + static NSURL? URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( NativeCupertinoHttp _lib, - NSData? bookmarkData, + NSData bookmarkData, int options, NSURL? relativeURL, ffi.Pointer isStale, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_191( + final _ret = _lib._objc_msgSend_198( _lib._class_NSURL1, _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData?._id ?? ffi.nullptr, + bookmarkData._id, options, relativeURL?._id ?? ffi.nullptr, isStale, error); - return NSURL._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } /// Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available in the bookmark data. - static NSDictionary resourceValuesForKeys_fromBookmarkData_( - NativeCupertinoHttp _lib, NSArray? keys, NSData? bookmarkData) { - final _ret = _lib._objc_msgSend_192( + static NSDictionary? resourceValuesForKeys_fromBookmarkData_( + NativeCupertinoHttp _lib, NSArray keys, NSData bookmarkData) { + final _ret = _lib._objc_msgSend_199( _lib._class_NSURL1, _lib._sel_resourceValuesForKeys_fromBookmarkData_1, - keys?._id ?? ffi.nullptr, - bookmarkData?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + keys._id, + bookmarkData._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } /// Creates an alias file on disk at a specified location with specified bookmark data. bookmarkData must have been created with the NSURLBookmarkCreationSuitableForBookmarkFile option. bookmarkFileURL must either refer to an existing file (which will be overwritten), or to location in an existing directory. If this method returns NO, the optional error is populated. static bool writeBookmarkData_toURL_options_error_( NativeCupertinoHttp _lib, - NSData? bookmarkData, - NSURL? bookmarkFileURL, - int options, + NSData bookmarkData, + NSURL bookmarkFileURL, + DartNSUInteger options, ffi.Pointer> error) { - return _lib._objc_msgSend_193( + return _lib._objc_msgSend_200( _lib._class_NSURL1, _lib._sel_writeBookmarkData_toURL_options_error_1, - bookmarkData?._id ?? ffi.nullptr, - bookmarkFileURL?._id ?? ffi.nullptr, + bookmarkData._id, + bookmarkFileURL._id, options, error); } /// Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. If bookmarkFileURL refers to an alias file created prior to OS X v10.6 that contains Alias Manager information but no bookmark data, this method synthesizes bookmark data for the file. If this method returns nil, the optional error is populated. - static NSData bookmarkDataWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? bookmarkFileURL, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_194( + static NSData? bookmarkDataWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL bookmarkFileURL, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_201( _lib._class_NSURL1, _lib._sel_bookmarkDataWithContentsOfURL_error_1, - bookmarkFileURL?._id ?? ffi.nullptr, + bookmarkFileURL._id, error); - return NSData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } /// Creates and initializes a NSURL that refers to the location specified by resolving the alias file at url. If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, the NSURL returned is the same as url argument. This method fails and returns nil if the url argument is unreachable, or if the original file or directory could not be located or is not reachable, or if the original file or directory is on a volume that could not be located or mounted. If this method fails, the optional error is populated. The NSURLBookmarkResolutionWithSecurityScope option is not supported by this method. - static NSURL URLByResolvingAliasFileAtURL_options_error_( + static NSURL? URLByResolvingAliasFileAtURL_options_error_( NativeCupertinoHttp _lib, - NSURL? url, + NSURL url, int options, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_195( + final _ret = _lib._objc_msgSend_202( _lib._class_NSURL1, _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, - url?._id ?? ffi.nullptr, + url._id, options, error); - return NSURL._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - /// Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. When access to this resource is no longer needed the client must call stopAccessingSecurityScopedResource. Each call to startAccessingSecurityScopedResource must be balanced with a call to stopAccessingSecurityScopedResource (Note: this is not reference counted). + /// Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. Each call to startAccessingSecurityScopedResource that returns YES must be balanced with a call to stopAccessingSecurityScopedResource when access to this resource is no longer needed by the client. Calls to start and stop accessing the resource are reference counted and may be nested, which allows the pair of calls to be logically scoped. bool startAccessingSecurityScopedResource() { return _lib._objc_msgSend_11( _id, _lib._sel_startAccessingSecurityScopedResource1); } - /// Revokes the access granted to the url by a prior successful call to startAccessingSecurityScopedResource. + /// Removes one "accessing" reference to the security scope. When all references are removed, it revokes the access granted to the url by the initial prior successful call to startAccessingSecurityScopedResource. void stopAccessingSecurityScopedResource() { - return _lib._objc_msgSend_1( - _id, _lib._sel_stopAccessingSecurityScopedResource1); + _lib._objc_msgSend_1(_id, _lib._sel_stopAccessingSecurityScopedResource1); } /// Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: @@ -63865,106 +64125,115 @@ class NSURL extends NSObject { /// Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. bool getPromisedItemResourceValue_forKey_error_( ffi.Pointer> value, - NSURLResourceKey key, + DartNSURLResourceKey key, ffi.Pointer> error) { - return _lib._objc_msgSend_184( + return _lib._objc_msgSend_191( _id, _lib._sel_getPromisedItemResourceValue_forKey_error_1, value, - key, + key._id, error); } - NSDictionary promisedItemResourceValuesForKeys_error_( - NSArray? keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_185( - _id, - _lib._sel_promisedItemResourceValuesForKeys_error_1, - keys?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSDictionary? promisedItemResourceValuesForKeys_error_( + NSArray keys, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_192(_id, + _lib._sel_promisedItemResourceValuesForKeys_error_1, keys._id, error); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } bool checkPromisedItemIsReachableAndReturnError_( ffi.Pointer> error) { - return _lib._objc_msgSend_183( + return _lib._objc_msgSend_203( _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); } /// The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. - static NSURL fileURLWithPathComponents_( - NativeCupertinoHttp _lib, NSArray? components) { - final _ret = _lib._objc_msgSend_196(_lib._class_NSURL1, - _lib._sel_fileURLWithPathComponents_1, components?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + static NSURL? fileURLWithPathComponents_( + NativeCupertinoHttp _lib, NSArray components) { + final _ret = _lib._objc_msgSend_204(_lib._class_NSURL1, + _lib._sel_fileURLWithPathComponents_1, components._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } NSArray? get pathComponents { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_pathComponents1); + final _ret = _lib._objc_msgSend_188(_id, _lib._sel_pathComponents1); return _ret.address == 0 ? null : NSArray._(_ret, _lib, retain: true, release: true); } NSString? get lastPathComponent { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lastPathComponent1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_lastPathComponent1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } NSString? get pathExtension { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_pathExtension1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_pathExtension1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } - NSURL URLByAppendingPathComponent_(NSString? pathComponent) { - final _ret = _lib._objc_msgSend_46( - _id, - _lib._sel_URLByAppendingPathComponent_1, - pathComponent?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + NSURL? URLByAppendingPathComponent_(NSString pathComponent) { + final _ret = _lib._objc_msgSend_205( + _id, _lib._sel_URLByAppendingPathComponent_1, pathComponent._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } - NSURL URLByAppendingPathComponent_isDirectory_( - NSString? pathComponent, bool isDirectory) { - final _ret = _lib._objc_msgSend_45( + NSURL? URLByAppendingPathComponent_isDirectory_( + NSString pathComponent, bool isDirectory) { + final _ret = _lib._objc_msgSend_206( _id, _lib._sel_URLByAppendingPathComponent_isDirectory_1, - pathComponent?._id ?? ffi.nullptr, + pathComponent._id, isDirectory); - return NSURL._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } NSURL? get URLByDeletingLastPathComponent { final _ret = - _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingLastPathComponent1); + _lib._objc_msgSend_56(_id, _lib._sel_URLByDeletingLastPathComponent1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); } - NSURL URLByAppendingPathExtension_(NSString? pathExtension) { - final _ret = _lib._objc_msgSend_46( - _id, - _lib._sel_URLByAppendingPathExtension_1, - pathExtension?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + NSURL? URLByAppendingPathExtension_(NSString pathExtension) { + final _ret = _lib._objc_msgSend_205( + _id, _lib._sel_URLByAppendingPathExtension_1, pathExtension._id); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } NSURL? get URLByDeletingPathExtension { final _ret = - _lib._objc_msgSend_52(_id, _lib._sel_URLByDeletingPathExtension1); + _lib._objc_msgSend_56(_id, _lib._sel_URLByDeletingPathExtension1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); } - /// The following methods work only on `file:` scheme URLs; for non-`file:` scheme URLs, these methods return the URL unchanged. + /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. + bool checkResourceIsReachableAndReturnError_( + ffi.Pointer> error) { + return _lib._objc_msgSend_203( + _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); + } + NSURL? get URLByStandardizingPath { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URLByStandardizingPath1); + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_URLByStandardizingPath1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); @@ -63972,51 +64241,62 @@ class NSURL extends NSObject { NSURL? get URLByResolvingSymlinksInPath { final _ret = - _lib._objc_msgSend_52(_id, _lib._sel_URLByResolvingSymlinksInPath1); + _lib._objc_msgSend_56(_id, _lib._sel_URLByResolvingSymlinksInPath1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); } /// Blocks to load the data if necessary. If shouldUseCache is YES, then if an equivalent URL has already been loaded and cached, its resource data will be returned immediately. If shouldUseCache is NO, a new load will be started - NSData resourceDataUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_197( + NSData? resourceDataUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_207( _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); - return NSData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSData._(_ret, _lib, retain: true, release: true); } /// Starts an asynchronous load of the data, registering delegate to receive notification. Only one such background load can proceed at a time. void loadResourceDataNotifyingClient_usingCache_( NSObject client, bool shouldUseCache) { - return _lib._objc_msgSend_198( + _lib._objc_msgSend_208( _id, _lib._sel_loadResourceDataNotifyingClient_usingCache_1, client._id, shouldUseCache); } - NSObject propertyForKey_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? propertyForKey_(NSString propertyKey) { + final _ret = + _lib._objc_msgSend_49(_id, _lib._sel_propertyForKey_1, propertyKey._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } /// These attempt to write the given arguments for the resource specified by the URL; they return success or failure - bool setResourceData_(NSData? data) { - return _lib._objc_msgSend_35( - _id, _lib._sel_setResourceData_1, data?._id ?? ffi.nullptr); + bool setResourceData_(NSData data) { + return _lib._objc_msgSend_35(_id, _lib._sel_setResourceData_1, data._id); } - bool setProperty_forKey_(NSObject property, NSString? propertyKey) { - return _lib._objc_msgSend_199(_id, _lib._sel_setProperty_forKey_1, - property._id, propertyKey?._id ?? ffi.nullptr); + bool setProperty_forKey_(NSObject property, NSString propertyKey) { + return _lib._objc_msgSend_209( + _id, _lib._sel_setProperty_forKey_1, property._id, propertyKey._id); } /// Sophisticated clients will want to ask for this, then message the handle directly. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded - NSURLHandle URLHandleUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_207( + NSURLHandle? URLHandleUsingCache_(bool shouldUseCache) { + final _ret = _lib._objc_msgSend_217( _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); - return NSURLHandle._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURLHandle._(_ret, _lib, retain: true, release: true); + } + + @override + NSURL init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURL._(_ret, _lib, retain: true, release: true); } static NSURL new1(NativeCupertinoHttp _lib) { @@ -64024,6 +64304,13 @@ class NSURL extends NSObject { return NSURL._(_ret, _lib, retain: false, release: true); } + static NSURL allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURL1, _lib._sel_allocWithZone_1, zone); + return NSURL._(_ret, _lib, retain: false, release: true); + } + static NSURL alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); return NSURL._(_ret, _lib, retain: false, release: true); @@ -64054,120 +64341,122 @@ class NSNumber extends NSValue { } @override - NSNumber initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSNumber._(_ret, _lib, retain: true, release: true); + NSNumber? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithChar_(int value) { - final _ret = _lib._objc_msgSend_62(_id, _lib._sel_initWithChar_1, value); + final _ret = _lib._objc_msgSend_67(_id, _lib._sel_initWithChar_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithUnsignedChar_(int value) { final _ret = - _lib._objc_msgSend_63(_id, _lib._sel_initWithUnsignedChar_1, value); + _lib._objc_msgSend_68(_id, _lib._sel_initWithUnsignedChar_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithShort_(int value) { - final _ret = _lib._objc_msgSend_64(_id, _lib._sel_initWithShort_1, value); + final _ret = _lib._objc_msgSend_69(_id, _lib._sel_initWithShort_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithUnsignedShort_(int value) { final _ret = - _lib._objc_msgSend_65(_id, _lib._sel_initWithUnsignedShort_1, value); + _lib._objc_msgSend_70(_id, _lib._sel_initWithUnsignedShort_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithInt_(int value) { - final _ret = _lib._objc_msgSend_66(_id, _lib._sel_initWithInt_1, value); + final _ret = _lib._objc_msgSend_71(_id, _lib._sel_initWithInt_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithUnsignedInt_(int value) { final _ret = - _lib._objc_msgSend_67(_id, _lib._sel_initWithUnsignedInt_1, value); + _lib._objc_msgSend_72(_id, _lib._sel_initWithUnsignedInt_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithLong_(int value) { - final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithLong_1, value); + final _ret = _lib._objc_msgSend_73(_id, _lib._sel_initWithLong_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithUnsignedLong_(int value) { final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedLong_1, value); + _lib._objc_msgSend_74(_id, _lib._sel_initWithUnsignedLong_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithLongLong_(int value) { final _ret = - _lib._objc_msgSend_70(_id, _lib._sel_initWithLongLong_1, value); + _lib._objc_msgSend_75(_id, _lib._sel_initWithLongLong_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithUnsignedLongLong_(int value) { final _ret = - _lib._objc_msgSend_71(_id, _lib._sel_initWithUnsignedLongLong_1, value); + _lib._objc_msgSend_76(_id, _lib._sel_initWithUnsignedLongLong_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithFloat_(double value) { - final _ret = _lib._objc_msgSend_72(_id, _lib._sel_initWithFloat_1, value); + final _ret = _lib._objc_msgSend_77(_id, _lib._sel_initWithFloat_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithDouble_(double value) { - final _ret = _lib._objc_msgSend_73(_id, _lib._sel_initWithDouble_1, value); + final _ret = _lib._objc_msgSend_78(_id, _lib._sel_initWithDouble_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } NSNumber initWithBool_(bool value) { - final _ret = _lib._objc_msgSend_74(_id, _lib._sel_initWithBool_1, value); + final _ret = _lib._objc_msgSend_79(_id, _lib._sel_initWithBool_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } - NSNumber initWithInteger_(int value) { - final _ret = _lib._objc_msgSend_68(_id, _lib._sel_initWithInteger_1, value); + NSNumber initWithInteger_(DartNSInteger value) { + final _ret = _lib._objc_msgSend_73(_id, _lib._sel_initWithInteger_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } - NSNumber initWithUnsignedInteger_(int value) { + NSNumber initWithUnsignedInteger_(DartNSUInteger value) { final _ret = - _lib._objc_msgSend_69(_id, _lib._sel_initWithUnsignedInteger_1, value); + _lib._objc_msgSend_74(_id, _lib._sel_initWithUnsignedInteger_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } int get charValue { - return _lib._objc_msgSend_75(_id, _lib._sel_charValue1); + return _lib._objc_msgSend_80(_id, _lib._sel_charValue1); } int get unsignedCharValue { - return _lib._objc_msgSend_76(_id, _lib._sel_unsignedCharValue1); + return _lib._objc_msgSend_81(_id, _lib._sel_unsignedCharValue1); } int get shortValue { - return _lib._objc_msgSend_77(_id, _lib._sel_shortValue1); + return _lib._objc_msgSend_82(_id, _lib._sel_shortValue1); } int get unsignedShortValue { - return _lib._objc_msgSend_78(_id, _lib._sel_unsignedShortValue1); + return _lib._objc_msgSend_83(_id, _lib._sel_unsignedShortValue1); } int get intValue { - return _lib._objc_msgSend_79(_id, _lib._sel_intValue1); + return _lib._objc_msgSend_84(_id, _lib._sel_intValue1); } int get unsignedIntValue { - return _lib._objc_msgSend_80(_id, _lib._sel_unsignedIntValue1); + return _lib._objc_msgSend_85(_id, _lib._sel_unsignedIntValue1); } int get longValue { - return _lib._objc_msgSend_81(_id, _lib._sel_longValue1); + return _lib._objc_msgSend_86(_id, _lib._sel_longValue1); } int get unsignedLongValue { @@ -64175,188 +64464,210 @@ class NSNumber extends NSValue { } int get longLongValue { - return _lib._objc_msgSend_82(_id, _lib._sel_longLongValue1); + return _lib._objc_msgSend_87(_id, _lib._sel_longLongValue1); } int get unsignedLongLongValue { - return _lib._objc_msgSend_83(_id, _lib._sel_unsignedLongLongValue1); + return _lib._objc_msgSend_88(_id, _lib._sel_unsignedLongLongValue1); } double get floatValue { - return _lib._objc_msgSend_84(_id, _lib._sel_floatValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_89_fpret(_id, _lib._sel_floatValue1) + : _lib._objc_msgSend_89(_id, _lib._sel_floatValue1); } double get doubleValue { - return _lib._objc_msgSend_85(_id, _lib._sel_doubleValue1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_doubleValue1) + : _lib._objc_msgSend_90(_id, _lib._sel_doubleValue1); } bool get boolValue { return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); } - int get integerValue { - return _lib._objc_msgSend_81(_id, _lib._sel_integerValue1); + DartNSInteger get integerValue { + return _lib._objc_msgSend_86(_id, _lib._sel_integerValue1); } - int get unsignedIntegerValue { + DartNSUInteger get unsignedIntegerValue { return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); } - NSString? get stringValue { + NSString get stringValue { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_stringValue1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - int compare_(NSNumber? otherNumber) { - return _lib._objc_msgSend_86( - _id, _lib._sel_compare_1, otherNumber?._id ?? ffi.nullptr); + int compare_(NSNumber otherNumber) { + return _lib._objc_msgSend_91(_id, _lib._sel_compare_1, otherNumber._id); } - bool isEqualToNumber_(NSNumber? number) { - return _lib._objc_msgSend_87( - _id, _lib._sel_isEqualToNumber_1, number?._id ?? ffi.nullptr); + bool isEqualToNumber_(NSNumber number) { + return _lib._objc_msgSend_92(_id, _lib._sel_isEqualToNumber_1, number._id); } - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _lib._objc_msgSend_93( + _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); return NSString._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithChar_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_62( + final _ret = _lib._objc_msgSend_67( _lib._class_NSNumber1, _lib._sel_numberWithChar_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithUnsignedChar_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_63( + final _ret = _lib._objc_msgSend_68( _lib._class_NSNumber1, _lib._sel_numberWithUnsignedChar_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithShort_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_64( + final _ret = _lib._objc_msgSend_69( _lib._class_NSNumber1, _lib._sel_numberWithShort_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithUnsignedShort_( NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_65( + final _ret = _lib._objc_msgSend_70( _lib._class_NSNumber1, _lib._sel_numberWithUnsignedShort_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithInt_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_66( + final _ret = _lib._objc_msgSend_71( _lib._class_NSNumber1, _lib._sel_numberWithInt_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithUnsignedInt_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_67( + final _ret = _lib._objc_msgSend_72( _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInt_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_68( + final _ret = _lib._objc_msgSend_73( _lib._class_NSNumber1, _lib._sel_numberWithLong_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithUnsignedLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_69( + final _ret = _lib._objc_msgSend_74( _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLong_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithLongLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_70( + final _ret = _lib._objc_msgSend_75( _lib._class_NSNumber1, _lib._sel_numberWithLongLong_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithUnsignedLongLong_( NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_71( + final _ret = _lib._objc_msgSend_76( _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLongLong_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithFloat_(NativeCupertinoHttp _lib, double value) { - final _ret = _lib._objc_msgSend_72( + final _ret = _lib._objc_msgSend_77( _lib._class_NSNumber1, _lib._sel_numberWithFloat_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithDouble_(NativeCupertinoHttp _lib, double value) { - final _ret = _lib._objc_msgSend_73( + final _ret = _lib._objc_msgSend_78( _lib._class_NSNumber1, _lib._sel_numberWithDouble_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithBool_(NativeCupertinoHttp _lib, bool value) { - final _ret = _lib._objc_msgSend_74( + final _ret = _lib._objc_msgSend_79( _lib._class_NSNumber1, _lib._sel_numberWithBool_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } - static NSNumber numberWithInteger_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_68( + static NSNumber numberWithInteger_( + NativeCupertinoHttp _lib, DartNSInteger value) { + final _ret = _lib._objc_msgSend_73( _lib._class_NSNumber1, _lib._sel_numberWithInteger_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } static NSNumber numberWithUnsignedInteger_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_69( + NativeCupertinoHttp _lib, DartNSUInteger value) { + final _ret = _lib._objc_msgSend_74( _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInteger_1, value); return NSNumber._(_ret, _lib, retain: true, release: true); } + @override + NSNumber initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _lib._objc_msgSend_58( + _id, _lib._sel_initWithBytes_objCType_1, value, type); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55(_lib._class_NSNumber1, + final _ret = _lib._objc_msgSend_59(_lib._class_NSNumber1, _lib._sel_valueWithBytes_objCType_1, value, type); return NSValue._(_ret, _lib, retain: true, release: true); } static NSValue value_withObjCType_(NativeCupertinoHttp _lib, ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55( + final _ret = _lib._objc_msgSend_59( _lib._class_NSNumber1, _lib._sel_value_withObjCType_1, value, type); return NSValue._(_ret, _lib, retain: true, release: true); } static NSValue valueWithNonretainedObject_( - NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_56(_lib._class_NSNumber1, - _lib._sel_valueWithNonretainedObject_1, anObject._id); + NativeCupertinoHttp _lib, NSObject? anObject) { + final _ret = _lib._objc_msgSend_60(_lib._class_NSNumber1, + _lib._sel_valueWithNonretainedObject_1, anObject?._id ?? ffi.nullptr); return NSValue._(_ret, _lib, retain: true, release: true); } static NSValue valueWithPointer_( NativeCupertinoHttp _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_57( + final _ret = _lib._objc_msgSend_62( _lib._class_NSNumber1, _lib._sel_valueWithPointer_1, pointer); return NSValue._(_ret, _lib, retain: true, release: true); } static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_60( + final _ret = _lib._objc_msgSend_65( _lib._class_NSNumber1, _lib._sel_valueWithRange_1, range); return NSValue._(_ret, _lib, retain: true, release: true); } + @override + NSNumber init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSNumber._(_ret, _lib, retain: true, release: true); + } + static NSNumber new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); return NSNumber._(_ret, _lib, retain: false, release: true); } + static NSNumber allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSNumber1, _lib._sel_allocWithZone_1, zone); + return NSNumber._(_ret, _lib, retain: false, release: true); + } + static NSNumber alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); return NSNumber._(_ret, _lib, retain: false, release: true); @@ -64386,56 +64697,60 @@ class NSValue extends NSObject { obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); } - void getValue_size_(ffi.Pointer value, int size) { - return _lib._objc_msgSend_33(_id, _lib._sel_getValue_size_1, value, size); + void getValue_size_(ffi.Pointer value, DartNSUInteger size) { + _lib._objc_msgSend_33(_id, _lib._sel_getValue_size_1, value, size); } ffi.Pointer get objCType { - return _lib._objc_msgSend_53(_id, _lib._sel_objCType1); + return _lib._objc_msgSend_57(_id, _lib._sel_objCType1); } NSValue initWithBytes_objCType_( ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_54( + final _ret = _lib._objc_msgSend_58( _id, _lib._sel_initWithBytes_objCType_1, value, type); return NSValue._(_ret, _lib, retain: true, release: true); } - NSValue initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSValue._(_ret, _lib, retain: true, release: true); + NSValue? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSValue._(_ret, _lib, retain: true, release: true); } static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55( + final _ret = _lib._objc_msgSend_59( _lib._class_NSValue1, _lib._sel_valueWithBytes_objCType_1, value, type); return NSValue._(_ret, _lib, retain: true, release: true); } static NSValue value_withObjCType_(NativeCupertinoHttp _lib, ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_55( + final _ret = _lib._objc_msgSend_59( _lib._class_NSValue1, _lib._sel_value_withObjCType_1, value, type); return NSValue._(_ret, _lib, retain: true, release: true); } static NSValue valueWithNonretainedObject_( - NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_56(_lib._class_NSValue1, - _lib._sel_valueWithNonretainedObject_1, anObject._id); + NativeCupertinoHttp _lib, NSObject? anObject) { + final _ret = _lib._objc_msgSend_60(_lib._class_NSValue1, + _lib._sel_valueWithNonretainedObject_1, anObject?._id ?? ffi.nullptr); return NSValue._(_ret, _lib, retain: true, release: true); } - NSObject get nonretainedObjectValue { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nonretainedObjectValue1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? get nonretainedObjectValue { + final _ret = _lib._objc_msgSend_61(_id, _lib._sel_nonretainedObjectValue1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } static NSValue valueWithPointer_( NativeCupertinoHttp _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_57( + final _ret = _lib._objc_msgSend_62( _lib._class_NSValue1, _lib._sel_valueWithPointer_1, pointer); return NSValue._(_ret, _lib, retain: true, release: true); } @@ -64444,23 +64759,28 @@ class NSValue extends NSObject { return _lib._objc_msgSend_31(_id, _lib._sel_pointerValue1); } - bool isEqualToValue_(NSValue? value) { - return _lib._objc_msgSend_58( - _id, _lib._sel_isEqualToValue_1, value?._id ?? ffi.nullptr); + bool isEqualToValue_(NSValue value) { + return _lib._objc_msgSend_63(_id, _lib._sel_isEqualToValue_1, value._id); } void getValue_(ffi.Pointer value) { - return _lib._objc_msgSend_59(_id, _lib._sel_getValue_1, value); + _lib._objc_msgSend_64(_id, _lib._sel_getValue_1, value); } static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_60( + final _ret = _lib._objc_msgSend_65( _lib._class_NSValue1, _lib._sel_valueWithRange_1, range); return NSValue._(_ret, _lib, retain: true, release: true); } NSRange get rangeValue { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeValue1); + return _lib._objc_msgSend_66(_id, _lib._sel_rangeValue1); + } + + @override + NSValue init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSValue._(_ret, _lib, retain: true, release: true); } static NSValue new1(NativeCupertinoHttp _lib) { @@ -64468,6 +64788,13 @@ class NSValue extends NSObject { return NSValue._(_ret, _lib, retain: false, release: true); } + static NSValue allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSValue1, _lib._sel_allocWithZone_1, zone); + return NSValue._(_ret, _lib, retain: false, release: true); + } + static NSValue alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); return NSValue._(_ret, _lib, retain: false, release: true); @@ -64475,6 +64802,9 @@ class NSValue extends NSObject { } typedef NSInteger = ffi.Long; +typedef DartNSInteger = int; +typedef NSURLResourceKey = ffi.Pointer; +typedef DartNSURLResourceKey = NSString; class NSError extends NSObject { NSError._(ffi.Pointer id, NativeCupertinoHttp lib, @@ -64501,42 +64831,41 @@ class NSError extends NSObject { /// Domain cannot be nil; dict may be nil if no userInfo desired. NSError initWithDomain_code_userInfo_( - NSErrorDomain domain, int code, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_179( + DartNSErrorDomain domain, DartNSInteger code, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_186( _id, _lib._sel_initWithDomain_code_userInfo_1, - domain, + domain._id, code, dict?._id ?? ffi.nullptr); return NSError._(_ret, _lib, retain: true, release: true); } static NSError errorWithDomain_code_userInfo_(NativeCupertinoHttp _lib, - NSErrorDomain domain, int code, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_179( + DartNSErrorDomain domain, DartNSInteger code, NSDictionary? dict) { + final _ret = _lib._objc_msgSend_186( _lib._class_NSError1, _lib._sel_errorWithDomain_code_userInfo_1, - domain, + domain._id, code, dict?._id ?? ffi.nullptr); return NSError._(_ret, _lib, retain: true, release: true); } /// These define the error. Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts. Codes are domain-specific. - NSErrorDomain get domain { - return _lib._objc_msgSend_32(_id, _lib._sel_domain1); + DartNSErrorDomain get domain { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_domain1); + return NSString._(_ret, _lib, retain: true, release: true); } - int get code { - return _lib._objc_msgSend_81(_id, _lib._sel_code1); + DartNSInteger get code { + return _lib._objc_msgSend_86(_id, _lib._sel_code1); } /// Additional info which may be used to describe the error further. Examples of keys that might be included in here are "Line Number", "Failed URL", etc. Embedding other errors in here can also be used as a way to communicate underlying reasons for failures; for instance "File System Error" embedded in the userInfo of an NSError returned from a higher level document object. If the embedded error information is itself NSError, the standard key NSUnderlyingErrorKey can be used. - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + NSDictionary get userInfo { + final _ret = _lib._objc_msgSend_187(_id, _lib._sel_userInfo1); + return NSDictionary._(_ret, _lib, retain: true, release: true); } /// The primary user-presentable message for the error, for instance for NSFileReadNoPermissionError: "The file "File Name" couldn't be opened because you don't have permission to view it.". This message should ideally indicate what failed and why it failed. This value either comes from NSLocalizedDescriptionKey, or NSLocalizedFailureErrorKey+NSLocalizedFailureReasonErrorKey, or NSLocalizedFailureErrorKey. The steps this takes to construct the description include: @@ -64546,16 +64875,14 @@ class NSError extends NSObject { /// 4. Fetch NSLocalizedFailureErrorKey from userInfoValueProvider. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. /// 5. Look for NSLocalizedFailureReasonErrorKey in userInfo or from userInfoValueProvider; combine with generic "Operation failed" message. /// 6. Last resort localized but barely-presentable string manufactured from domain and code. The result is never nil. - NSString? get localizedDescription { + NSString get localizedDescription { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } /// Return a complete sentence which describes why the operation failed. For instance, for NSFileReadNoPermissionError: "You don't have permission.". In many cases this will be just the "because" part of the error message (but as a complete sentence, which makes localization easier). Default implementation of this picks up the value of NSLocalizedFailureReasonErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. NSString? get localizedFailureReason { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedFailureReason1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_localizedFailureReason1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -64564,7 +64891,7 @@ class NSError extends NSObject { /// Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel. For instance, for NSFileReadNoPermissionError: "To view or change permissions, select the item in the Finder and choose File > Get Info.". Default implementation of this picks up the value of NSLocalizedRecoverySuggestionErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. NSString? get localizedRecoverySuggestion { final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedRecoverySuggestion1); + _lib._objc_msgSend_55(_id, _lib._sel_localizedRecoverySuggestion1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -64573,32 +64900,32 @@ class NSError extends NSObject { /// Return titles of buttons that are appropriate for displaying in an alert. These should match the string provided as a part of localizedRecoverySuggestion. The first string would be the title of the right-most and default button, the second one next to it, and so on. If used in an alert the corresponding default return values are NSAlertFirstButtonReturn + n. Default implementation of this picks up the value of NSLocalizedRecoveryOptionsErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. nil return usually implies no special suggestion, which would imply a single "OK" button. NSArray? get localizedRecoveryOptions { final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_localizedRecoveryOptions1); + _lib._objc_msgSend_188(_id, _lib._sel_localizedRecoveryOptions1); return _ret.address == 0 ? null : NSArray._(_ret, _lib, retain: true, release: true); } /// Return an object that conforms to the NSErrorRecoveryAttempting informal protocol. The recovery attempter must be an object that can correctly interpret an index into the array returned by localizedRecoveryOptions. The default implementation of this picks up the value of NSRecoveryAttempterErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. - NSObject get recoveryAttempter { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_recoveryAttempter1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? get recoveryAttempter { + final _ret = _lib._objc_msgSend_61(_id, _lib._sel_recoveryAttempter1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } /// Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user. This is done automatically by +[NSAlert alertWithError:], which the presentError: variants in NSApplication go through. The default implementation of this picks up the value of the NSHelpAnchorErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. NSString? get helpAnchor { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_helpAnchor1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_helpAnchor1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } /// Return a list of underlying errors, if any. It includes the values of both NSUnderlyingErrorKey and NSMultipleUnderlyingErrorsKey. If there are no underlying errors, returns an empty array. - NSArray? get underlyingErrors { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_underlyingErrors1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + NSArray get underlyingErrors { + final _ret = _lib._objc_msgSend_169(_id, _lib._sel_underlyingErrors1); + return NSArray._(_ret, _lib, retain: true, release: true); } /// Specify a block which will be called from the implementations of localizedDescription, localizedFailureReason, localizedRecoverySuggestion, localizedRecoveryOptions, recoveryAttempter, helpAnchor, and debugDescription when the underlying value for these is not present in the userInfo dictionary of NSError instances with the specified domain. The provider will be called with the userInfo key corresponding to the queried property: For instance, NSLocalizedDescriptionKey for localizedDescription. The provider should return nil for any keys it is not able to provide and, very importantly, any keys it does not recognize (since we may extend the list of keys in future releases). @@ -64612,24 +64939,34 @@ class NSError extends NSObject { /// If an appropriate result for the requested key cannot be provided, return nil rather than choosing to manufacture a generic fallback response such as "Operation could not be completed, error 42." NSError will take care of the fallback cases. static void setUserInfoValueProviderForDomain_provider_( NativeCupertinoHttp _lib, - NSErrorDomain errorDomain, - ObjCBlock12 provider) { - return _lib._objc_msgSend_181( + DartNSErrorDomain errorDomain, + ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey? provider) { + _lib._objc_msgSend_189( _lib._class_NSError1, _lib._sel_setUserInfoValueProviderForDomain_provider_1, - errorDomain, - provider._id); + errorDomain._id, + provider?._id ?? ffi.nullptr); } - static ObjCBlock12 userInfoValueProviderForDomain_(NativeCupertinoHttp _lib, - NSError? err, NSErrorUserInfoKey userInfoKey, NSErrorDomain errorDomain) { - final _ret = _lib._objc_msgSend_182( + static ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey? + userInfoValueProviderForDomain_(NativeCupertinoHttp _lib, NSError err, + DartNSErrorUserInfoKey userInfoKey, DartNSErrorDomain errorDomain) { + final _ret = _lib._objc_msgSend_190( _lib._class_NSError1, _lib._sel_userInfoValueProviderForDomain_1, - err?._id ?? ffi.nullptr, - userInfoKey, - errorDomain); - return ObjCBlock12._(_ret, _lib); + err._id, + userInfoKey._id, + errorDomain._id); + return _ret.address == 0 + ? null + : ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey._(_ret, _lib, + retain: true, release: true); + } + + @override + NSError init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSError._(_ret, _lib, retain: true, release: true); } static NSError new1(NativeCupertinoHttp _lib) { @@ -64637,6 +64974,13 @@ class NSError extends NSObject { return NSError._(_ret, _lib, retain: false, release: true); } + static NSError allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSError1, _lib._sel_allocWithZone_1, zone); + return NSError._(_ret, _lib, retain: false, release: true); + } + static NSError alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); return NSError._(_ret, _lib, retain: false, release: true); @@ -64644,6 +64988,7 @@ class NSError extends NSObject { } typedef NSErrorDomain = ffi.Pointer; +typedef DartNSErrorDomain = NSString; /// Immutable Dictionary class NSDictionary extends NSObject { @@ -64669,17 +65014,19 @@ class NSDictionary extends NSObject { obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); } - int get count { + DartNSUInteger get count { return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - NSObject objectForKey_(NSObject aKey) { - final _ret = _lib._objc_msgSend_91(_id, _lib._sel_objectForKey_1, aKey._id); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? objectForKey_(NSObject aKey) { + final _ret = _lib._objc_msgSend_96(_id, _lib._sel_objectForKey_1, aKey._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } NSEnumerator keyEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_keyEnumerator1); + final _ret = _lib._objc_msgSend_97(_id, _lib._sel_keyEnumerator1); return NSEnumerator._(_ret, _lib, retain: true, release: true); } @@ -64692,146 +65039,148 @@ class NSDictionary extends NSObject { NSDictionary initWithObjects_forKeys_count_( ffi.Pointer> objects, ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_93( + DartNSUInteger cnt) { + final _ret = _lib._objc_msgSend_98( _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); return NSDictionary._(_ret, _lib, retain: true, release: true); } - NSDictionary initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSArray? get allKeys { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allKeys1); + NSDictionary? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : NSDictionary._(_ret, _lib, retain: true, release: true); + } + + NSArray get allKeys { + final _ret = _lib._objc_msgSend_169(_id, _lib._sel_allKeys1); + return NSArray._(_ret, _lib, retain: true, release: true); } NSArray allKeysForObject_(NSObject anObject) { final _ret = - _lib._objc_msgSend_96(_id, _lib._sel_allKeysForObject_1, anObject._id); + _lib._objc_msgSend_101(_id, _lib._sel_allKeysForObject_1, anObject._id); return NSArray._(_ret, _lib, retain: true, release: true); } - NSArray? get allValues { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_allValues1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + NSArray get allValues { + final _ret = _lib._objc_msgSend_169(_id, _lib._sel_allValues1); + return NSArray._(_ret, _lib, retain: true, release: true); } - NSString? get description { + NSString get description { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString? get descriptionInStringsFileFormat { + NSString get descriptionInStringsFileFormat { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_descriptionInStringsFileFormat1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _lib._objc_msgSend_93( + _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); return NSString._(_ret, _lib, retain: true, release: true); } - NSString descriptionWithLocale_indent_(NSObject locale, int level) { - final _ret = _lib._objc_msgSend_99( - _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); + NSString descriptionWithLocale_indent_( + NSObject? locale, DartNSUInteger level) { + final _ret = _lib._objc_msgSend_104( + _id, + _lib._sel_descriptionWithLocale_indent_1, + locale?._id ?? ffi.nullptr, + level); return NSString._(_ret, _lib, retain: true, release: true); } - bool isEqualToDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_163(_id, _lib._sel_isEqualToDictionary_1, - otherDictionary?._id ?? ffi.nullptr); + bool isEqualToDictionary_(NSDictionary otherDictionary) { + return _lib._objc_msgSend_170( + _id, _lib._sel_isEqualToDictionary_1, otherDictionary._id); } NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); + final _ret = _lib._objc_msgSend_97(_id, _lib._sel_objectEnumerator1); return NSEnumerator._(_ret, _lib, retain: true, release: true); } - NSArray objectsForKeys_notFoundMarker_(NSArray? keys, NSObject marker) { - final _ret = _lib._objc_msgSend_164( - _id, - _lib._sel_objectsForKeys_notFoundMarker_1, - keys?._id ?? ffi.nullptr, - marker._id); + NSArray objectsForKeys_notFoundMarker_(NSArray keys, NSObject marker) { + final _ret = _lib._objc_msgSend_171( + _id, _lib._sel_objectsForKeys_notFoundMarker_1, keys._id, marker._id); return NSArray._(_ret, _lib, retain: true, release: true); } /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. bool writeToURL_error_( - NSURL? url, ffi.Pointer> error) { - return _lib._objc_msgSend_109( - _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); + NSURL url, ffi.Pointer> error) { + return _lib._objc_msgSend_114( + _id, _lib._sel_writeToURL_error_1, url._id, error); } NSArray keysSortedByValueUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_107( + final _ret = _lib._objc_msgSend_112( _id, _lib._sel_keysSortedByValueUsingSelector_1, comparator); return NSArray._(_ret, _lib, retain: true, release: true); } /// count refers to the number of elements in the dictionary void getObjects_andKeys_count_(ffi.Pointer> objects, - ffi.Pointer> keys, int count) { - return _lib._objc_msgSend_165( + ffi.Pointer> keys, DartNSUInteger count) { + _lib._objc_msgSend_172( _id, _lib._sel_getObjects_andKeys_count_1, objects, keys, count); } - NSObject objectForKeyedSubscript_(NSObject key) { - final _ret = _lib._objc_msgSend_91( + NSObject? objectForKeyedSubscript_(NSObject key) { + final _ret = _lib._objc_msgSend_96( _id, _lib._sel_objectForKeyedSubscript_1, key._id); - return NSObject._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - void enumerateKeysAndObjectsUsingBlock_(ObjCBlock10 block) { - return _lib._objc_msgSend_166( + void enumerateKeysAndObjectsUsingBlock_( + ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool block) { + _lib._objc_msgSend_173( _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); } void enumerateKeysAndObjectsWithOptions_usingBlock_( - int opts, ObjCBlock10 block) { - return _lib._objc_msgSend_167( + int opts, ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool block) { + _lib._objc_msgSend_174( _id, _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, opts, block._id); } - NSArray keysSortedByValueUsingComparator_(NSComparator cmptr) { - final _ret = _lib._objc_msgSend_141( - _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr); + NSArray keysSortedByValueUsingComparator_(DartNSComparator cmptr) { + final _ret = _lib._objc_msgSend_146( + _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr._id); return NSArray._(_ret, _lib, retain: true, release: true); } NSArray keysSortedByValueWithOptions_usingComparator_( - int opts, NSComparator cmptr) { - final _ret = _lib._objc_msgSend_142(_id, - _lib._sel_keysSortedByValueWithOptions_usingComparator_1, opts, cmptr); + int opts, DartNSComparator cmptr) { + final _ret = _lib._objc_msgSend_147( + _id, + _lib._sel_keysSortedByValueWithOptions_usingComparator_1, + opts, + cmptr._id); return NSArray._(_ret, _lib, retain: true, release: true); } - NSObject keysOfEntriesPassingTest_(ObjCBlock11 predicate) { - final _ret = _lib._objc_msgSend_168( + NSObject keysOfEntriesPassingTest_( + ObjCBlock_bool_ObjCObject_ObjCObject_bool predicate) { + final _ret = _lib._objc_msgSend_175( _id, _lib._sel_keysOfEntriesPassingTest_1, predicate._id); return NSObject._(_ret, _lib, retain: true, release: true); } NSObject keysOfEntriesWithOptions_passingTest_( - int opts, ObjCBlock11 predicate) { - final _ret = _lib._objc_msgSend_169(_id, + int opts, ObjCBlock_bool_ObjCObject_ObjCObject_bool predicate) { + final _ret = _lib._objc_msgSend_176(_id, _lib._sel_keysOfEntriesWithOptions_passingTest_1, opts, predicate._id); return NSObject._(_ret, _lib, retain: true, release: true); } @@ -64839,46 +65188,53 @@ class NSDictionary extends NSObject { /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:andKeys:count: void getObjects_andKeys_(ffi.Pointer> objects, ffi.Pointer> keys) { - return _lib._objc_msgSend_170( - _id, _lib._sel_getObjects_andKeys_1, objects, keys); + _lib._objc_msgSend_177(_id, _lib._sel_getObjects_andKeys_1, objects, keys); } /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. - static NSDictionary dictionaryWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_171(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSDictionary? dictionaryWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_178(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - static NSDictionary dictionaryWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_172(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + static NSDictionary? dictionaryWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_179(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - NSDictionary initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_171( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSDictionary? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_178( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - NSDictionary initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_172( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSDictionary? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_179(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37( + _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); } /// the atomically flag is ignored if url of a type that cannot be written atomically. - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _lib._objc_msgSend_168( + _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); } static NSDictionary dictionary(NativeCupertinoHttp _lib) { @@ -64889,7 +65245,7 @@ class NSDictionary extends NSObject { static NSDictionary dictionaryWithObject_forKey_( NativeCupertinoHttp _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_173(_lib._class_NSDictionary1, + final _ret = _lib._objc_msgSend_180(_lib._class_NSDictionary1, _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); return NSDictionary._(_ret, _lib, retain: true, release: true); } @@ -64898,89 +65254,78 @@ class NSDictionary extends NSObject { NativeCupertinoHttp _lib, ffi.Pointer> objects, ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_93(_lib._class_NSDictionary1, + DartNSUInteger cnt) { + final _ret = _lib._objc_msgSend_98(_lib._class_NSDictionary1, _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); return NSDictionary._(_ret, _lib, retain: true, release: true); } static NSDictionary dictionaryWithObjectsAndKeys_( NativeCupertinoHttp _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_91(_lib._class_NSDictionary1, + final _ret = _lib._objc_msgSend_149(_lib._class_NSDictionary1, _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); return NSDictionary._(_ret, _lib, retain: true, release: true); } static NSDictionary dictionaryWithDictionary_( - NativeCupertinoHttp _lib, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_174(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSDictionary dict) { + final _ret = _lib._objc_msgSend_181(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict._id); return NSDictionary._(_ret, _lib, retain: true, release: true); } static NSDictionary dictionaryWithObjects_forKeys_( - NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_175( - _lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSArray objects, NSArray keys) { + final _ret = _lib._objc_msgSend_182(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, objects._id, keys._id); return NSDictionary._(_ret, _lib, retain: true, release: true); } NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _lib._objc_msgSend_91( + final _ret = _lib._objc_msgSend_149( _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); return NSDictionary._(_ret, _lib, retain: true, release: true); } - NSDictionary initWithDictionary_(NSDictionary? otherDictionary) { - final _ret = _lib._objc_msgSend_174(_id, _lib._sel_initWithDictionary_1, - otherDictionary?._id ?? ffi.nullptr); + NSDictionary initWithDictionary_(NSDictionary otherDictionary) { + final _ret = _lib._objc_msgSend_181( + _id, _lib._sel_initWithDictionary_1, otherDictionary._id); return NSDictionary._(_ret, _lib, retain: true, release: true); } NSDictionary initWithDictionary_copyItems_( - NSDictionary? otherDictionary, bool flag) { - final _ret = _lib._objc_msgSend_176( - _id, - _lib._sel_initWithDictionary_copyItems_1, - otherDictionary?._id ?? ffi.nullptr, - flag); + NSDictionary otherDictionary, bool flag) { + final _ret = _lib._objc_msgSend_183(_id, + _lib._sel_initWithDictionary_copyItems_1, otherDictionary._id, flag); return NSDictionary._(_ret, _lib, retain: false, release: true); } - NSDictionary initWithObjects_forKeys_(NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_175( - _id, - _lib._sel_initWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); + NSDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { + final _ret = _lib._objc_msgSend_182( + _id, _lib._sel_initWithObjects_forKeys_1, objects._id, keys._id); return NSDictionary._(_ret, _lib, retain: true, release: true); } /// Reads dictionary stored in NSPropertyList format from the specified url. - NSDictionary initWithContentsOfURL_error_( - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_177( - _id, - _lib._sel_initWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); + NSDictionary? initWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_184( + _id, _lib._sel_initWithContentsOfURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } /// Reads dictionary stored in NSPropertyList format from the specified url. - static NSDictionary dictionaryWithContentsOfURL_error_( + static NSDictionary? dictionaryWithContentsOfURL_error_( NativeCupertinoHttp _lib, - NSURL? url, + NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_177( - _lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); + final _ret = _lib._objc_msgSend_184(_lib._class_NSDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. @@ -64990,18 +65335,17 @@ class NSDictionary extends NSObject { /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. - static NSObject sharedKeySetForKeys_( - NativeCupertinoHttp _lib, NSArray? keys) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSDictionary1, - _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); + static NSObject sharedKeySetForKeys_(NativeCupertinoHttp _lib, NSArray keys) { + final _ret = _lib._objc_msgSend_150( + _lib._class_NSDictionary1, _lib._sel_sharedKeySetForKeys_1, keys._id); return NSObject._(_ret, _lib, retain: true, release: true); } - int countByEnumeratingWithState_objects_count_( + DartNSUInteger countByEnumeratingWithState_objects_count_( ffi.Pointer state, ffi.Pointer> buffer, - int len) { - return _lib._objc_msgSend_178( + DartNSUInteger len) { + return _lib._objc_msgSend_185( _id, _lib._sel_countByEnumeratingWithState_objects_count_1, state, @@ -65015,6 +65359,13 @@ class NSDictionary extends NSObject { return NSDictionary._(_ret, _lib, retain: false, release: true); } + static NSDictionary allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSDictionary1, _lib._sel_allocWithZone_1, zone); + return NSDictionary._(_ret, _lib, retain: false, release: true); + } + static NSDictionary alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); @@ -65045,24 +65396,37 @@ class NSEnumerator extends NSObject { obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSEnumerator1); } - NSObject nextObject() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_nextObject1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? get allObjects { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); + NSObject? nextObject() { + final _ret = _lib._objc_msgSend_61(_id, _lib._sel_nextObject1); return _ret.address == 0 ? null : NSObject._(_ret, _lib, retain: true, release: true); } + NSObject get allObjects { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); + return NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + NSEnumerator init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSEnumerator._(_ret, _lib, retain: true, release: true); + } + static NSEnumerator new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); return NSEnumerator._(_ret, _lib, retain: false, release: true); } + static NSEnumerator allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSEnumerator1, _lib._sel_allocWithZone_1, zone); + return NSEnumerator._(_ret, _lib, retain: false, release: true); + } + static NSEnumerator alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); @@ -65094,12 +65458,12 @@ class NSArray extends NSObject { obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); } - int get count { + DartNSUInteger get count { return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - NSObject objectAtIndex_(int index) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndex_1, index); + NSObject objectAtIndex_(DartNSUInteger index) { + final _ret = _lib._objc_msgSend_99(_id, _lib._sel_objectAtIndex_1, index); return NSObject._(_ret, _lib, retain: true, release: true); } @@ -65110,35 +65474,35 @@ class NSArray extends NSObject { } NSArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_95( + ffi.Pointer> objects, DartNSUInteger cnt) { + final _ret = _lib._objc_msgSend_100( _id, _lib._sel_initWithObjects_count_1, objects, cnt); return NSArray._(_ret, _lib, retain: true, release: true); } - NSArray initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSArray? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } NSArray arrayByAddingObject_(NSObject anObject) { - final _ret = _lib._objc_msgSend_96( + final _ret = _lib._objc_msgSend_101( _id, _lib._sel_arrayByAddingObject_1, anObject._id); return NSArray._(_ret, _lib, retain: true, release: true); } - NSArray arrayByAddingObjectsFromArray_(NSArray? otherArray) { - final _ret = _lib._objc_msgSend_97( - _id, - _lib._sel_arrayByAddingObjectsFromArray_1, - otherArray?._id ?? ffi.nullptr); + NSArray arrayByAddingObjectsFromArray_(NSArray otherArray) { + final _ret = _lib._objc_msgSend_102( + _id, _lib._sel_arrayByAddingObjectsFromArray_1, otherArray._id); return NSArray._(_ret, _lib, retain: true, release: true); } - NSString componentsJoinedByString_(NSString? separator) { - final _ret = _lib._objc_msgSend_98(_id, - _lib._sel_componentsJoinedByString_1, separator?._id ?? ffi.nullptr); + NSString componentsJoinedByString_(NSString separator) { + final _ret = _lib._objc_msgSend_103( + _id, _lib._sel_componentsJoinedByString_1, separator._id); return NSString._(_ret, _lib, retain: true, release: true); } @@ -65146,86 +65510,92 @@ class NSArray extends NSObject { return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); } - NSString? get description { + NSString get description { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _lib._objc_msgSend_93( + _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); return NSString._(_ret, _lib, retain: true, release: true); } - NSString descriptionWithLocale_indent_(NSObject locale, int level) { - final _ret = _lib._objc_msgSend_99( - _id, _lib._sel_descriptionWithLocale_indent_1, locale._id, level); + NSString descriptionWithLocale_indent_( + NSObject? locale, DartNSUInteger level) { + final _ret = _lib._objc_msgSend_104( + _id, + _lib._sel_descriptionWithLocale_indent_1, + locale?._id ?? ffi.nullptr, + level); return NSString._(_ret, _lib, retain: true, release: true); } - NSObject firstObjectCommonWithArray_(NSArray? otherArray) { - final _ret = _lib._objc_msgSend_100(_id, - _lib._sel_firstObjectCommonWithArray_1, otherArray?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? firstObjectCommonWithArray_(NSArray otherArray) { + final _ret = _lib._objc_msgSend_105( + _id, _lib._sel_firstObjectCommonWithArray_1, otherArray._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } void getObjects_range_( ffi.Pointer> objects, NSRange range) { - return _lib._objc_msgSend_101( - _id, _lib._sel_getObjects_range_1, objects, range); + _lib._objc_msgSend_106(_id, _lib._sel_getObjects_range_1, objects, range); } - int indexOfObject_(NSObject anObject) { - return _lib._objc_msgSend_102(_id, _lib._sel_indexOfObject_1, anObject._id); + DartNSUInteger indexOfObject_(NSObject anObject) { + return _lib._objc_msgSend_107(_id, _lib._sel_indexOfObject_1, anObject._id); } - int indexOfObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_103( + DartNSUInteger indexOfObject_inRange_(NSObject anObject, NSRange range) { + return _lib._objc_msgSend_108( _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); } - int indexOfObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_102( + DartNSUInteger indexOfObjectIdenticalTo_(NSObject anObject) { + return _lib._objc_msgSend_107( _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); } - int indexOfObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_103( + DartNSUInteger indexOfObjectIdenticalTo_inRange_( + NSObject anObject, NSRange range) { + return _lib._objc_msgSend_108( _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); } - bool isEqualToArray_(NSArray? otherArray) { - return _lib._objc_msgSend_104( - _id, _lib._sel_isEqualToArray_1, otherArray?._id ?? ffi.nullptr); + bool isEqualToArray_(NSArray otherArray) { + return _lib._objc_msgSend_109( + _id, _lib._sel_isEqualToArray_1, otherArray._id); } - NSObject get firstObject { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_firstObject1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? get firstObject { + final _ret = _lib._objc_msgSend_61(_id, _lib._sel_firstObject1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - NSObject get lastObject { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_lastObject1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? get lastObject { + final _ret = _lib._objc_msgSend_61(_id, _lib._sel_lastObject1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_objectEnumerator1); + final _ret = _lib._objc_msgSend_97(_id, _lib._sel_objectEnumerator1); return NSEnumerator._(_ret, _lib, retain: true, release: true); } NSEnumerator reverseObjectEnumerator() { - final _ret = _lib._objc_msgSend_92(_id, _lib._sel_reverseObjectEnumerator1); + final _ret = _lib._objc_msgSend_97(_id, _lib._sel_reverseObjectEnumerator1); return NSEnumerator._(_ret, _lib, retain: true, release: true); } - NSData? get sortedArrayHint { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_sortedArrayHint1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + NSData get sortedArrayHint { + final _ret = _lib._objc_msgSend_54(_id, _lib._sel_sortedArrayHint1); + return NSData._(_ret, _lib, retain: true, release: true); } NSArray sortedArrayUsingFunction_context_( @@ -65235,7 +65605,7 @@ class NSArray extends NSObject { ffi.Pointer, ffi.Pointer)>> comparator, ffi.Pointer context) { - final _ret = _lib._objc_msgSend_105( + final _ret = _lib._objc_msgSend_110( _id, _lib._sel_sortedArrayUsingFunction_context_1, comparator, context); return NSArray._(_ret, _lib, retain: true, release: true); } @@ -65248,7 +65618,7 @@ class NSArray extends NSObject { comparator, ffi.Pointer context, NSData? hint) { - final _ret = _lib._objc_msgSend_106( + final _ret = _lib._objc_msgSend_111( _id, _lib._sel_sortedArrayUsingFunction_context_hint_1, comparator, @@ -65258,99 +65628,104 @@ class NSArray extends NSObject { } NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_107( + final _ret = _lib._objc_msgSend_112( _id, _lib._sel_sortedArrayUsingSelector_1, comparator); return NSArray._(_ret, _lib, retain: true, release: true); } NSArray subarrayWithRange_(NSRange range) { final _ret = - _lib._objc_msgSend_108(_id, _lib._sel_subarrayWithRange_1, range); + _lib._objc_msgSend_113(_id, _lib._sel_subarrayWithRange_1, range); return NSArray._(_ret, _lib, retain: true, release: true); } /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. bool writeToURL_error_( - NSURL? url, ffi.Pointer> error) { - return _lib._objc_msgSend_109( - _id, _lib._sel_writeToURL_error_1, url?._id ?? ffi.nullptr, error); + NSURL url, ffi.Pointer> error) { + return _lib._objc_msgSend_114( + _id, _lib._sel_writeToURL_error_1, url._id, error); } void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_7( + _lib._objc_msgSend_7( _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); } void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject argument) { - return _lib._objc_msgSend_110( + ffi.Pointer aSelector, NSObject? argument) { + _lib._objc_msgSend_115( _id, _lib._sel_makeObjectsPerformSelector_withObject_1, aSelector, - argument._id); + argument?._id ?? ffi.nullptr); } - NSArray objectsAtIndexes_(NSIndexSet? indexes) { - final _ret = _lib._objc_msgSend_131( - _id, _lib._sel_objectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + NSArray objectsAtIndexes_(NSIndexSet indexes) { + final _ret = + _lib._objc_msgSend_136(_id, _lib._sel_objectsAtIndexes_1, indexes._id); return NSArray._(_ret, _lib, retain: true, release: true); } - NSObject objectAtIndexedSubscript_(int idx) { + NSObject objectAtIndexedSubscript_(DartNSUInteger idx) { final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_objectAtIndexedSubscript_1, idx); + _lib._objc_msgSend_99(_id, _lib._sel_objectAtIndexedSubscript_1, idx); return NSObject._(_ret, _lib, retain: true, release: true); } - void enumerateObjectsUsingBlock_(ObjCBlock5 block) { - return _lib._objc_msgSend_132( + void enumerateObjectsUsingBlock_( + ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool block) { + _lib._objc_msgSend_137( _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); } - void enumerateObjectsWithOptions_usingBlock_(int opts, ObjCBlock5 block) { - return _lib._objc_msgSend_133(_id, + void enumerateObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool block) { + _lib._objc_msgSend_138(_id, _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); } - void enumerateObjectsAtIndexes_options_usingBlock_( - NSIndexSet? s, int opts, ObjCBlock5 block) { - return _lib._objc_msgSend_134( + void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, + ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool block) { + _lib._objc_msgSend_139( _id, _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, - s?._id ?? ffi.nullptr, + s._id, opts, block._id); } - int indexOfObjectPassingTest_(ObjCBlock6 predicate) { - return _lib._objc_msgSend_135( + DartNSUInteger indexOfObjectPassingTest_( + ObjCBlock_bool_ObjCObject_NSUInteger_bool predicate) { + return _lib._objc_msgSend_140( _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); } - int indexOfObjectWithOptions_passingTest_(int opts, ObjCBlock6 predicate) { - return _lib._objc_msgSend_136(_id, + DartNSUInteger indexOfObjectWithOptions_passingTest_( + int opts, ObjCBlock_bool_ObjCObject_NSUInteger_bool predicate) { + return _lib._objc_msgSend_141(_id, _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); } - int indexOfObjectAtIndexes_options_passingTest_( - NSIndexSet? s, int opts, ObjCBlock6 predicate) { - return _lib._objc_msgSend_137( + DartNSUInteger indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, + int opts, ObjCBlock_bool_ObjCObject_NSUInteger_bool predicate) { + return _lib._objc_msgSend_142( _id, _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, - s?._id ?? ffi.nullptr, + s._id, opts, predicate._id); } - NSIndexSet indexesOfObjectsPassingTest_(ObjCBlock6 predicate) { - final _ret = _lib._objc_msgSend_138( + NSIndexSet indexesOfObjectsPassingTest_( + ObjCBlock_bool_ObjCObject_NSUInteger_bool predicate) { + final _ret = _lib._objc_msgSend_143( _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); return NSIndexSet._(_ret, _lib, retain: true, release: true); } NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock6 predicate) { - final _ret = _lib._objc_msgSend_139( + int opts, ObjCBlock_bool_ObjCObject_NSUInteger_bool predicate) { + final _ret = _lib._objc_msgSend_144( _id, _lib._sel_indexesOfObjectsWithOptions_passingTest_1, opts, @@ -65358,40 +65733,40 @@ class NSArray extends NSObject { return NSIndexSet._(_ret, _lib, retain: true, release: true); } - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( - NSIndexSet? s, int opts, ObjCBlock6 predicate) { - final _ret = _lib._objc_msgSend_140( + NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, + int opts, ObjCBlock_bool_ObjCObject_NSUInteger_bool predicate) { + final _ret = _lib._objc_msgSend_145( _id, _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, - s?._id ?? ffi.nullptr, + s._id, opts, predicate._id); return NSIndexSet._(_ret, _lib, retain: true, release: true); } - NSArray sortedArrayUsingComparator_(NSComparator cmptr) { - final _ret = _lib._objc_msgSend_141( - _id, _lib._sel_sortedArrayUsingComparator_1, cmptr); + NSArray sortedArrayUsingComparator_(DartNSComparator cmptr) { + final _ret = _lib._objc_msgSend_146( + _id, _lib._sel_sortedArrayUsingComparator_1, cmptr._id); return NSArray._(_ret, _lib, retain: true, release: true); } NSArray sortedArrayWithOptions_usingComparator_( - int opts, NSComparator cmptr) { - final _ret = _lib._objc_msgSend_142( - _id, _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr); + int opts, DartNSComparator cmptr) { + final _ret = _lib._objc_msgSend_147(_id, + _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr._id); return NSArray._(_ret, _lib, retain: true, release: true); } /// binary search - int indexOfObject_inSortedRange_options_usingComparator_( - NSObject obj, NSRange r, int opts, NSComparator cmp) { - return _lib._objc_msgSend_143( + DartNSUInteger indexOfObject_inSortedRange_options_usingComparator_( + NSObject obj, NSRange r, int opts, DartNSComparator cmp) { + return _lib._objc_msgSend_148( _id, _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, obj._id, r, opts, - cmp); + cmp._id); } static NSArray array(NativeCupertinoHttp _lib) { @@ -65400,78 +65775,76 @@ class NSArray extends NSObject { } static NSArray arrayWithObject_(NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_91( + final _ret = _lib._objc_msgSend_149( _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); return NSArray._(_ret, _lib, retain: true, release: true); } static NSArray arrayWithObjects_count_(NativeCupertinoHttp _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_95( + ffi.Pointer> objects, DartNSUInteger cnt) { + final _ret = _lib._objc_msgSend_100( _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); return NSArray._(_ret, _lib, retain: true, release: true); } static NSArray arrayWithObjects_( NativeCupertinoHttp _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_91( + final _ret = _lib._objc_msgSend_149( _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); return NSArray._(_ret, _lib, retain: true, release: true); } - static NSArray arrayWithArray_(NativeCupertinoHttp _lib, NSArray? array) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSArray1, - _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); + static NSArray arrayWithArray_(NativeCupertinoHttp _lib, NSArray array) { + final _ret = _lib._objc_msgSend_150( + _lib._class_NSArray1, _lib._sel_arrayWithArray_1, array._id); return NSArray._(_ret, _lib, retain: true, release: true); } NSArray initWithObjects_(NSObject firstObj) { final _ret = - _lib._objc_msgSend_91(_id, _lib._sel_initWithObjects_1, firstObj._id); + _lib._objc_msgSend_149(_id, _lib._sel_initWithObjects_1, firstObj._id); return NSArray._(_ret, _lib, retain: true, release: true); } - NSArray initWithArray_(NSArray? array) { - final _ret = _lib._objc_msgSend_100( - _id, _lib._sel_initWithArray_1, array?._id ?? ffi.nullptr); + NSArray initWithArray_(NSArray array) { + final _ret = + _lib._objc_msgSend_150(_id, _lib._sel_initWithArray_1, array._id); return NSArray._(_ret, _lib, retain: true, release: true); } - NSArray initWithArray_copyItems_(NSArray? array, bool flag) { - final _ret = _lib._objc_msgSend_144(_id, - _lib._sel_initWithArray_copyItems_1, array?._id ?? ffi.nullptr, flag); + NSArray initWithArray_copyItems_(NSArray array, bool flag) { + final _ret = _lib._objc_msgSend_151( + _id, _lib._sel_initWithArray_copyItems_1, array._id, flag); return NSArray._(_ret, _lib, retain: false, release: true); } /// Reads array stored in NSPropertyList format from the specified url. - NSArray initWithContentsOfURL_error_( - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_145( - _id, - _lib._sel_initWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); + NSArray? initWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_152( + _id, _lib._sel_initWithContentsOfURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } /// Reads array stored in NSPropertyList format from the specified url. - static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_145( - _lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSArray? arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_152(_lib._class_NSArray1, + _lib._sel_arrayWithContentsOfURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } NSOrderedCollectionDifference - differenceFromArray_withOptions_usingEquivalenceTest_( - NSArray? other, int options, ObjCBlock9 block) { - final _ret = _lib._objc_msgSend_154( + differenceFromArray_withOptions_usingEquivalenceTest_(NSArray other, + int options, ObjCBlock_bool_ObjCObject_ObjCObject block) { + final _ret = _lib._objc_msgSend_161( _id, _lib._sel_differenceFromArray_withOptions_usingEquivalenceTest_1, - other?._id ?? ffi.nullptr, + other._id, options, block._id); return NSOrderedCollectionDifference._(_ret, _lib, @@ -65479,70 +65852,77 @@ class NSArray extends NSObject { } NSOrderedCollectionDifference differenceFromArray_withOptions_( - NSArray? other, int options) { - final _ret = _lib._objc_msgSend_155( - _id, - _lib._sel_differenceFromArray_withOptions_1, - other?._id ?? ffi.nullptr, - options); + NSArray other, int options) { + final _ret = _lib._objc_msgSend_162( + _id, _lib._sel_differenceFromArray_withOptions_1, other._id, options); return NSOrderedCollectionDifference._(_ret, _lib, retain: true, release: true); } /// Uses isEqual: to determine the difference between the parameter and the receiver - NSOrderedCollectionDifference differenceFromArray_(NSArray? other) { - final _ret = _lib._objc_msgSend_156( - _id, _lib._sel_differenceFromArray_1, other?._id ?? ffi.nullptr); + NSOrderedCollectionDifference differenceFromArray_(NSArray other) { + final _ret = + _lib._objc_msgSend_163(_id, _lib._sel_differenceFromArray_1, other._id); return NSOrderedCollectionDifference._(_ret, _lib, retain: true, release: true); } - NSArray arrayByApplyingDifference_( - NSOrderedCollectionDifference? difference) { - final _ret = _lib._objc_msgSend_157(_id, - _lib._sel_arrayByApplyingDifference_1, difference?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSArray? arrayByApplyingDifference_( + NSOrderedCollectionDifference difference) { + final _ret = _lib._objc_msgSend_164( + _id, _lib._sel_arrayByApplyingDifference_1, difference._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead. void getObjects_(ffi.Pointer> objects) { - return _lib._objc_msgSend_158(_id, _lib._sel_getObjects_1, objects); + _lib._objc_msgSend_165(_id, _lib._sel_getObjects_1, objects); } /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. - static NSArray arrayWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_159(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSArray? arrayWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_166( + _lib._class_NSArray1, _lib._sel_arrayWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - static NSArray arrayWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_160(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSArray? arrayWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_167( + _lib._class_NSArray1, _lib._sel_arrayWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - NSArray initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_159( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSArray? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_166( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - NSArray initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSArray? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_167(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } - bool writeToFile_atomically_(NSString? path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37(_id, _lib._sel_writeToFile_atomically_1, - path?._id ?? ffi.nullptr, useAuxiliaryFile); + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _lib._objc_msgSend_37( + _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); } - bool writeToURL_atomically_(NSURL? url, bool atomically) { - return _lib._objc_msgSend_161(_id, _lib._sel_writeToURL_atomically_1, - url?._id ?? ffi.nullptr, atomically); + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _lib._objc_msgSend_168( + _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); } static NSArray new1(NativeCupertinoHttp _lib) { @@ -65550,6 +65930,13 @@ class NSArray extends NSObject { return NSArray._(_ret, _lib, retain: false, release: true); } + static NSArray allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSArray1, _lib._sel_allocWithZone_1, zone); + return NSArray._(_ret, _lib, retain: false, release: true); + } + static NSArray alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); return NSArray._(_ret, _lib, retain: false, release: true); @@ -65585,75 +65972,78 @@ class NSIndexSet extends NSObject { return NSIndexSet._(_ret, _lib, retain: true, release: true); } - static NSIndexSet indexSetWithIndex_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_94( + static NSIndexSet indexSetWithIndex_( + NativeCupertinoHttp _lib, DartNSUInteger value) { + final _ret = _lib._objc_msgSend_99( _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); return NSIndexSet._(_ret, _lib, retain: true, release: true); } static NSIndexSet indexSetWithIndexesInRange_( NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_111( + final _ret = _lib._objc_msgSend_116( _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); return NSIndexSet._(_ret, _lib, retain: true, release: true); } NSIndexSet initWithIndexesInRange_(NSRange range) { final _ret = - _lib._objc_msgSend_111(_id, _lib._sel_initWithIndexesInRange_1, range); + _lib._objc_msgSend_116(_id, _lib._sel_initWithIndexesInRange_1, range); return NSIndexSet._(_ret, _lib, retain: true, release: true); } - NSIndexSet initWithIndexSet_(NSIndexSet? indexSet) { - final _ret = _lib._objc_msgSend_112( - _id, _lib._sel_initWithIndexSet_1, indexSet?._id ?? ffi.nullptr); + NSIndexSet initWithIndexSet_(NSIndexSet indexSet) { + final _ret = + _lib._objc_msgSend_117(_id, _lib._sel_initWithIndexSet_1, indexSet._id); return NSIndexSet._(_ret, _lib, retain: true, release: true); } - NSIndexSet initWithIndex_(int value) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithIndex_1, value); + NSIndexSet initWithIndex_(DartNSUInteger value) { + final _ret = _lib._objc_msgSend_99(_id, _lib._sel_initWithIndex_1, value); return NSIndexSet._(_ret, _lib, retain: true, release: true); } - bool isEqualToIndexSet_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_113( - _id, _lib._sel_isEqualToIndexSet_1, indexSet?._id ?? ffi.nullptr); + bool isEqualToIndexSet_(NSIndexSet indexSet) { + return _lib._objc_msgSend_118( + _id, _lib._sel_isEqualToIndexSet_1, indexSet._id); } - int get count { + DartNSUInteger get count { return _lib._objc_msgSend_12(_id, _lib._sel_count1); } - int get firstIndex { + DartNSUInteger get firstIndex { return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); } - int get lastIndex { + DartNSUInteger get lastIndex { return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); } - int indexGreaterThanIndex_(int value) { - return _lib._objc_msgSend_114( + DartNSUInteger indexGreaterThanIndex_(DartNSUInteger value) { + return _lib._objc_msgSend_119( _id, _lib._sel_indexGreaterThanIndex_1, value); } - int indexLessThanIndex_(int value) { - return _lib._objc_msgSend_114(_id, _lib._sel_indexLessThanIndex_1, value); + DartNSUInteger indexLessThanIndex_(DartNSUInteger value) { + return _lib._objc_msgSend_119(_id, _lib._sel_indexLessThanIndex_1, value); } - int indexGreaterThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_114( + DartNSUInteger indexGreaterThanOrEqualToIndex_(DartNSUInteger value) { + return _lib._objc_msgSend_119( _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); } - int indexLessThanOrEqualToIndex_(int value) { - return _lib._objc_msgSend_114( + DartNSUInteger indexLessThanOrEqualToIndex_(DartNSUInteger value) { + return _lib._objc_msgSend_119( _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); } - int getIndexes_maxCount_inIndexRange_(ffi.Pointer indexBuffer, - int bufferSize, NSRangePointer range) { - return _lib._objc_msgSend_115( + DartNSUInteger getIndexes_maxCount_inIndexRange_( + ffi.Pointer indexBuffer, + DartNSUInteger bufferSize, + NSRangePointer range) { + return _lib._objc_msgSend_120( _id, _lib._sel_getIndexes_maxCount_inIndexRange_1, indexBuffer, @@ -65661,43 +66051,44 @@ class NSIndexSet extends NSObject { range); } - int countOfIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_116( + DartNSUInteger countOfIndexesInRange_(NSRange range) { + return _lib._objc_msgSend_121( _id, _lib._sel_countOfIndexesInRange_1, range); } - bool containsIndex_(int value) { - return _lib._objc_msgSend_117(_id, _lib._sel_containsIndex_1, value); + bool containsIndex_(DartNSUInteger value) { + return _lib._objc_msgSend_122(_id, _lib._sel_containsIndex_1, value); } bool containsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_118( + return _lib._objc_msgSend_123( _id, _lib._sel_containsIndexesInRange_1, range); } - bool containsIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_113( - _id, _lib._sel_containsIndexes_1, indexSet?._id ?? ffi.nullptr); + bool containsIndexes_(NSIndexSet indexSet) { + return _lib._objc_msgSend_118( + _id, _lib._sel_containsIndexes_1, indexSet._id); } bool intersectsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_118( + return _lib._objc_msgSend_123( _id, _lib._sel_intersectsIndexesInRange_1, range); } - void enumerateIndexesUsingBlock_(ObjCBlock2 block) { - return _lib._objc_msgSend_119( + void enumerateIndexesUsingBlock_(ObjCBlock_ffiVoid_NSUInteger_bool block) { + _lib._objc_msgSend_124( _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); } - void enumerateIndexesWithOptions_usingBlock_(int opts, ObjCBlock2 block) { - return _lib._objc_msgSend_120(_id, + void enumerateIndexesWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_NSUInteger_bool block) { + _lib._objc_msgSend_125(_id, _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); } void enumerateIndexesInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock2 block) { - return _lib._objc_msgSend_121( + NSRange range, int opts, ObjCBlock_ffiVoid_NSUInteger_bool block) { + _lib._objc_msgSend_126( _id, _lib._sel_enumerateIndexesInRange_options_usingBlock_1, range, @@ -65705,19 +66096,20 @@ class NSIndexSet extends NSObject { block._id); } - int indexPassingTest_(ObjCBlock3 predicate) { - return _lib._objc_msgSend_122( + DartNSUInteger indexPassingTest_(ObjCBlock_bool_NSUInteger_bool predicate) { + return _lib._objc_msgSend_127( _id, _lib._sel_indexPassingTest_1, predicate._id); } - int indexWithOptions_passingTest_(int opts, ObjCBlock3 predicate) { - return _lib._objc_msgSend_123( + DartNSUInteger indexWithOptions_passingTest_( + int opts, ObjCBlock_bool_NSUInteger_bool predicate) { + return _lib._objc_msgSend_128( _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); } - int indexInRange_options_passingTest_( - NSRange range, int opts, ObjCBlock3 predicate) { - return _lib._objc_msgSend_124( + DartNSUInteger indexInRange_options_passingTest_( + NSRange range, int opts, ObjCBlock_bool_NSUInteger_bool predicate) { + return _lib._objc_msgSend_129( _id, _lib._sel_indexInRange_options_passingTest_1, range, @@ -65725,21 +66117,22 @@ class NSIndexSet extends NSObject { predicate._id); } - NSIndexSet indexesPassingTest_(ObjCBlock3 predicate) { - final _ret = _lib._objc_msgSend_125( + NSIndexSet indexesPassingTest_(ObjCBlock_bool_NSUInteger_bool predicate) { + final _ret = _lib._objc_msgSend_130( _id, _lib._sel_indexesPassingTest_1, predicate._id); return NSIndexSet._(_ret, _lib, retain: true, release: true); } - NSIndexSet indexesWithOptions_passingTest_(int opts, ObjCBlock3 predicate) { - final _ret = _lib._objc_msgSend_126( + NSIndexSet indexesWithOptions_passingTest_( + int opts, ObjCBlock_bool_NSUInteger_bool predicate) { + final _ret = _lib._objc_msgSend_131( _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._id); return NSIndexSet._(_ret, _lib, retain: true, release: true); } NSIndexSet indexesInRange_options_passingTest_( - NSRange range, int opts, ObjCBlock3 predicate) { - final _ret = _lib._objc_msgSend_127( + NSRange range, int opts, ObjCBlock_bool_NSUInteger_bool predicate) { + final _ret = _lib._objc_msgSend_132( _id, _lib._sel_indexesInRange_options_passingTest_1, range, @@ -65748,19 +66141,20 @@ class NSIndexSet extends NSObject { return NSIndexSet._(_ret, _lib, retain: true, release: true); } - void enumerateRangesUsingBlock_(ObjCBlock4 block) { - return _lib._objc_msgSend_128( + void enumerateRangesUsingBlock_(ObjCBlock_ffiVoid_NSRange_bool block) { + _lib._objc_msgSend_133( _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); } - void enumerateRangesWithOptions_usingBlock_(int opts, ObjCBlock4 block) { - return _lib._objc_msgSend_129(_id, + void enumerateRangesWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_NSRange_bool block) { + _lib._objc_msgSend_134(_id, _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); } void enumerateRangesInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock4 block) { - return _lib._objc_msgSend_130( + NSRange range, int opts, ObjCBlock_ffiVoid_NSRange_bool block) { + _lib._objc_msgSend_135( _id, _lib._sel_enumerateRangesInRange_options_usingBlock_1, range, @@ -65768,11 +66162,24 @@ class NSIndexSet extends NSObject { block._id); } + @override + NSIndexSet init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSIndexSet._(_ret, _lib, retain: true, release: true); + } + static NSIndexSet new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); return NSIndexSet._(_ret, _lib, retain: false, release: true); } + static NSIndexSet allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSIndexSet1, _lib._sel_allocWithZone_1, zone); + return NSIndexSet._(_ret, _lib, retain: false, release: true); + } + static NSIndexSet alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); @@ -65781,35 +66188,41 @@ class NSIndexSet extends NSObject { } typedef NSRangePointer = ffi.Pointer; -void _ObjCBlock2_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); -} - -final _ObjCBlock2_closureRegistry = {}; -int _ObjCBlock2_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock2_registerClosure(Function fn) { - final id = ++_ObjCBlock2_closureRegistryIndex; - _ObjCBlock2_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_NSUInteger_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSUInteger_bool_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSUInteger_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSUInteger_bool_registerClosure( + void Function(int, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSUInteger_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSUInteger_bool_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock2_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return _ObjCBlock2_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_NSUInteger_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSUInteger_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock2 extends _ObjCBlockBase { - ObjCBlock2._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSUInteger_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSUInteger_bool._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock2.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSUInteger_bool.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -65819,142 +66232,198 @@ class ObjCBlock2 extends _ObjCBlockBase { : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock2_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + NSUInteger, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSUInteger_bool_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock2.fromFunction(NativeCupertinoHttp lib, - void Function(int arg0, ffi.Pointer arg1) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSUInteger_bool.fromFunction(NativeCupertinoHttp lib, + void Function(DartNSUInteger, ffi.Pointer) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock2_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + NSUInteger, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSUInteger_bool_closureTrampoline) .cast(), - _ObjCBlock2_registerClosure(fn)), + _ObjCBlock_ffiVoid_NSUInteger_bool_registerClosure( + (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, int arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } -} -abstract class NSEnumerationOptions { - static const int NSEnumerationConcurrent = 1; - static const int NSEnumerationReverse = 2; -} + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSUInteger_bool.listener(NativeCupertinoHttp lib, + void Function(DartNSUInteger, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + NSUInteger, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSUInteger_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSUInteger_bool_registerClosure( + (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, NSUInteger, ffi.Pointer)>? + _dartFuncListenerTrampoline; -bool _ObjCBlock3_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return block.ref.target + void call(DartNSUInteger arg0, ffi.Pointer arg1) => _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Bool Function(NSUInteger arg0, ffi.Pointer arg1)>>() + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSUInteger arg0, + ffi.Pointer arg1)>>() .asFunction< - bool Function(int arg0, ffi.Pointer arg1)>()(arg0, arg1); + void Function(ffi.Pointer<_ObjCBlock>, int, + ffi.Pointer)>()(_id, arg0, arg1); } -final _ObjCBlock3_closureRegistry = {}; -int _ObjCBlock3_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock3_registerClosure(Function fn) { - final id = ++_ObjCBlock3_closureRegistryIndex; - _ObjCBlock3_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; } -bool _ObjCBlock3_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) { - return _ObjCBlock3_closureRegistry[block.ref.target.address]!(arg0, arg1); +bool _ObjCBlock_bool_NSUInteger_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function( + NSUInteger arg0, ffi.Pointer arg1)>>() + .asFunction)>()(arg0, arg1); +final _ObjCBlock_bool_NSUInteger_bool_closureRegistry = + )>{}; +int _ObjCBlock_bool_NSUInteger_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_NSUInteger_bool_registerClosure( + bool Function(int, ffi.Pointer) fn) { + final id = ++_ObjCBlock_bool_NSUInteger_bool_closureRegistryIndex; + _ObjCBlock_bool_NSUInteger_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class ObjCBlock3 extends _ObjCBlockBase { - ObjCBlock3._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +bool _ObjCBlock_bool_NSUInteger_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => + _ObjCBlock_bool_NSUInteger_bool_closureRegistry[block.ref.target.address]!( + arg0, arg1); + +class ObjCBlock_bool_NSUInteger_bool extends _ObjCBlockBase { + ObjCBlock_bool_NSUInteger_bool._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock3.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_NSUInteger_bool.fromFunctionPointer( NativeCupertinoHttp lib, - ffi.Pointer arg1)>> + ffi.Pointer< + ffi + .NativeFunction< + ffi.Bool Function(NSUInteger arg0, + ffi.Pointer arg1)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock3_fnPtrTrampoline, false) + ffi.Bool Function(ffi.Pointer<_ObjCBlock>, + NSUInteger, ffi.Pointer)>( + _ObjCBlock_bool_NSUInteger_bool_fnPtrTrampoline, false) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock3.fromFunction(NativeCupertinoHttp lib, - bool Function(int arg0, ffi.Pointer arg1) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_NSUInteger_bool.fromFunction(NativeCupertinoHttp lib, + bool Function(DartNSUInteger, ffi.Pointer) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>( - _ObjCBlock3_closureTrampoline, false) + ffi.Bool Function(ffi.Pointer<_ObjCBlock>, + NSUInteger, ffi.Pointer)>( + _ObjCBlock_bool_NSUInteger_bool_closureTrampoline, + false) .cast(), - _ObjCBlock3_registerClosure(fn)), + _ObjCBlock_bool_NSUInteger_bool_registerClosure( + (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), lib); static ffi.Pointer? _dartFuncTrampoline; - bool call(int arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, - NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock> block, int arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } -} -void _ObjCBlock4_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { - return block.ref.target + bool call(DartNSUInteger arg0, ffi.Pointer arg1) => _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>>() + ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, NSUInteger arg0, + ffi.Pointer arg1)>>() .asFunction< - void Function( - NSRange arg0, ffi.Pointer arg1)>()(arg0, arg1); + bool Function(ffi.Pointer<_ObjCBlock>, int, + ffi.Pointer)>()(_id, arg0, arg1); } -final _ObjCBlock4_closureRegistry = {}; -int _ObjCBlock4_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock4_registerClosure(Function fn) { - final id = ++_ObjCBlock4_closureRegistryIndex; - _ObjCBlock4_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + NSRange arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(NSRange, ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( + void Function(NSRange, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock4_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, NSRange arg0, ffi.Pointer arg1) { - return _ObjCBlock4_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + NSRange arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[block.ref.target.address]!( + arg0, arg1); -class ObjCBlock4 extends _ObjCBlockBase { - ObjCBlock4._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSRange_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSRange_bool._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock4.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSRange_bool.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -65963,71 +66432,118 @@ class ObjCBlock4 extends _ObjCBlockBase { : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSRange arg0, ffi.Pointer arg1)>( - _ObjCBlock4_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock4.fromFunction(NativeCupertinoHttp lib, - void Function(NSRange arg0, ffi.Pointer arg1) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSRange_bool.fromFunction( + NativeCupertinoHttp lib, void Function(NSRange, ffi.Pointer) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - NSRange arg0, ffi.Pointer arg1)>( - _ObjCBlock4_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) .cast(), - _ObjCBlock4_registerClosure(fn)), + _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( + (NSRange arg0, ffi.Pointer arg1) => + fn(arg0, arg1))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(NSRange arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } -} -void _ObjCBlock5_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return block.ref.target + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSRange_bool.listener( + NativeCupertinoHttp lib, void Function(NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( + (NSRange arg0, ffi.Pointer arg1) => + fn(arg0, arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, NSRange, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSRange arg0, ffi.Pointer arg1) => _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1, - ffi.Pointer arg2)>>() + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, + ffi.Pointer arg1)>>() .asFunction< - void Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); + void Function(ffi.Pointer<_ObjCBlock>, NSRange, + ffi.Pointer)>()(_id, arg0, arg1); } -final _ObjCBlock5_closureRegistry = {}; -int _ObjCBlock5_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock5_registerClosure(Function fn) { - final id = ++_ObjCBlock5_closureRegistryIndex; - _ObjCBlock5_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_registerClosure( + void Function(ffi.Pointer, int, ffi.Pointer) fn) { + final id = + ++_ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock5_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _ObjCBlock5_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +void _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock5 extends _ObjCBlockBase { - ObjCBlock5._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock5.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -66038,86 +66554,131 @@ class ObjCBlock5 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock5_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock5.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool.fromFunction( NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) - fn) + void Function(NSObject, DartNSUInteger, ffi.Pointer) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock5_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureTrampoline) .cast(), - _ObjCBlock5_registerClosure(fn)), + _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _id.ref.invoke + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool.listener(NativeCupertinoHttp lib, + void Function(NSObject, DartNSUInteger, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_registerClosure( + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(NSObject._(arg0, lib, retain: true, release: true), + arg1, arg2))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + NSUInteger, ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject arg0, DartNSUInteger arg1, ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + int, ffi.Pointer)>()(_id, arg0._id, arg1, arg2); +} + +bool _ObjCBlock_bool_ObjCObject_NSUInteger_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, + ffi.Bool Function(ffi.Pointer arg0, NSUInteger arg1, ffi.Pointer arg2)>>() .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } -} - -bool _ObjCBlock6_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} - -final _ObjCBlock6_closureRegistry = {}; -int _ObjCBlock6_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock6_registerClosure(Function fn) { - final id = ++_ObjCBlock6_closureRegistryIndex; - _ObjCBlock6_closureRegistry[id] = fn; + bool Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_ObjCObject_NSUInteger_bool_registerClosure( + bool Function(ffi.Pointer, int, ffi.Pointer) fn) { + final id = ++_ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureRegistryIndex; + _ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -bool _ObjCBlock6_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _ObjCBlock6_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +bool _ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock6 extends _ObjCBlockBase { - ObjCBlock6._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_bool_ObjCObject_NSUInteger_bool extends _ObjCBlockBase { + ObjCBlock_bool_ObjCObject_NSUInteger_bool._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock6.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_NSUInteger_bool.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -66128,86 +66689,103 @@ class ObjCBlock6 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock6_fnPtrTrampoline, false) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_NSUInteger_bool_fnPtrTrampoline, + false) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock6.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_NSUInteger_bool.fromFunction( NativeCupertinoHttp lib, - bool Function(ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) - fn) + bool Function(NSObject, DartNSUInteger, ffi.Pointer) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock6_closureTrampoline, false) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureTrampoline, false) .cast(), - _ObjCBlock6_registerClosure(fn)), + _ObjCBlock_bool_ObjCObject_NSUInteger_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), lib); static ffi.Pointer? _dartFuncTrampoline; - bool call( - ffi.Pointer arg0, int arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } -} -typedef NSComparator = ffi.Pointer<_ObjCBlock>; -int _ObjCBlock7_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); + bool call(NSObject arg0, DartNSUInteger arg1, ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + int, ffi.Pointer)>()(_id, arg0._id, arg1, arg2); } -final _ObjCBlock7_closureRegistry = {}; -int _ObjCBlock7_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock7_registerClosure(Function fn) { - final id = ++_ObjCBlock7_closureRegistryIndex; - _ObjCBlock7_closureRegistry[id] = fn; +typedef NSComparator = ffi.Pointer<_ObjCBlock>; +typedef DartNSComparator = ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject; +int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_registerClosure( + int Function(ffi.Pointer, ffi.Pointer) fn) { + final id = + ++_ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistryIndex; + _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -int _ObjCBlock7_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock7_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock7 extends _ObjCBlockBase { - ObjCBlock7._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject + extends _ObjCBlockBase { + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock7.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -66218,46 +66796,46 @@ class ObjCBlock7 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock7_fnPtrTrampoline, 0) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_fnPtrTrampoline, + 0) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock7.fromFunction( - NativeCupertinoHttp lib, - int Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject.fromFunction( + NativeCupertinoHttp lib, int Function(NSObject, NSObject) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock7_closureTrampoline, 0) + ffi.Int32 Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureTrampoline, 0) .cast(), - _ObjCBlock7_registerClosure(fn)), + _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + NSObject._(arg0, lib, retain: true, release: true), + NSObject._(arg1, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - int call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + + int call(NSObject arg0, NSObject arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1._id); } abstract class NSSortOptions { @@ -66298,61 +66876,57 @@ class NSOrderedCollectionDifference extends NSObject { obj._lib._class_NSOrderedCollectionDifference1); } - NSOrderedCollectionDifference initWithChanges_(NSObject? changes) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_initWithChanges_1, changes?._id ?? ffi.nullptr); + NSOrderedCollectionDifference initWithChanges_(NSObject changes) { + final _ret = + _lib._objc_msgSend_149(_id, _lib._sel_initWithChanges_1, changes._id); return NSOrderedCollectionDifference._(_ret, _lib, retain: true, release: true); } NSOrderedCollectionDifference initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_( - NSIndexSet? inserts, + NSIndexSet inserts, NSObject? insertedObjects, - NSIndexSet? removes, + NSIndexSet removes, NSObject? removedObjects, - NSObject? changes) { - final _ret = _lib._objc_msgSend_146( + NSObject changes) { + final _ret = _lib._objc_msgSend_153( _id, _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1, - inserts?._id ?? ffi.nullptr, + inserts._id, insertedObjects?._id ?? ffi.nullptr, - removes?._id ?? ffi.nullptr, + removes._id, removedObjects?._id ?? ffi.nullptr, - changes?._id ?? ffi.nullptr); + changes._id); return NSOrderedCollectionDifference._(_ret, _lib, retain: true, release: true); } NSOrderedCollectionDifference initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_( - NSIndexSet? inserts, + NSIndexSet inserts, NSObject? insertedObjects, - NSIndexSet? removes, + NSIndexSet removes, NSObject? removedObjects) { - final _ret = _lib._objc_msgSend_147( + final _ret = _lib._objc_msgSend_154( _id, _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1, - inserts?._id ?? ffi.nullptr, + inserts._id, insertedObjects?._id ?? ffi.nullptr, - removes?._id ?? ffi.nullptr, + removes._id, removedObjects?._id ?? ffi.nullptr); return NSOrderedCollectionDifference._(_ret, _lib, retain: true, release: true); } - NSObject? get insertions { + NSObject get insertions { final _ret = _lib._objc_msgSend_2(_id, _lib._sel_insertions1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + return NSObject._(_ret, _lib, retain: true, release: true); } - NSObject? get removals { + NSObject get removals { final _ret = _lib._objc_msgSend_2(_id, _lib._sel_removals1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + return NSObject._(_ret, _lib, retain: true, release: true); } bool get hasChanges { @@ -66360,8 +66934,8 @@ class NSOrderedCollectionDifference extends NSObject { } NSOrderedCollectionDifference differenceByTransformingChangesWithBlock_( - ObjCBlock8 block) { - final _ret = _lib._objc_msgSend_153( + ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange block) { + final _ret = _lib._objc_msgSend_160( _id, _lib._sel_differenceByTransformingChangesWithBlock_1, block._id); return NSOrderedCollectionDifference._(_ret, _lib, retain: true, release: true); @@ -66373,6 +66947,13 @@ class NSOrderedCollectionDifference extends NSObject { retain: true, release: true); } + @override + NSOrderedCollectionDifference init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: true, release: true); + } + static NSOrderedCollectionDifference new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSOrderedCollectionDifference1, _lib._sel_new1); @@ -66380,6 +66961,16 @@ class NSOrderedCollectionDifference extends NSObject { retain: false, release: true); } + static NSOrderedCollectionDifference allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSOrderedCollectionDifference1, + _lib._sel_allocWithZone_1, + zone); + return NSOrderedCollectionDifference._(_ret, _lib, + retain: false, release: true); + } + static NSOrderedCollectionDifference alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSOrderedCollectionDifference1, _lib._sel_alloc1); @@ -66388,36 +66979,50 @@ class NSOrderedCollectionDifference extends NSObject { } } -ffi.Pointer _ObjCBlock8_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>()(arg0); -} - -final _ObjCBlock8_closureRegistry = {}; -int _ObjCBlock8_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock8_registerClosure(Function fn) { - final id = ++_ObjCBlock8_closureRegistryIndex; - _ObjCBlock8_closureRegistry[id] = fn; +ffi.Pointer + _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer)>()(arg0); +final _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureRegistry = + Function(ffi.Pointer)>{}; +int _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_registerClosure( + ffi.Pointer Function(ffi.Pointer) fn) { + final id = + ++_ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureRegistryIndex; + _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureRegistry[ + id] = fn; return ffi.Pointer.fromAddress(id); } -ffi.Pointer _ObjCBlock8_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock8_closureRegistry[block.ref.target.address]!(arg0); -} +ffi.Pointer + _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureRegistry[ + block.ref.target.address]!(arg0); -class ObjCBlock8 extends _ObjCBlockBase { - ObjCBlock8._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange + extends _ObjCBlockBase { + ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock8.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -66428,38 +67033,51 @@ class ObjCBlock8 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock8_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock8.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange.fromFunction( + NativeCupertinoHttp lib, + NSOrderedCollectionChange Function(NSOrderedCollectionChange) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock8_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureTrampoline) .cast(), - _ObjCBlock8_registerClosure(fn)), + _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_registerClosure( + (ffi.Pointer arg0) => + fn(NSOrderedCollectionChange._(arg0, lib, retain: true, release: true)) + ._retainAndReturnId())), lib); static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } + + NSOrderedCollectionChange call(NSOrderedCollectionChange arg0) => + NSOrderedCollectionChange._( + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0._id), + _lib, + retain: false, + release: true); } class NSOrderedCollectionChange extends NSObject { @@ -66489,42 +67107,51 @@ class NSOrderedCollectionChange extends NSObject { } static NSOrderedCollectionChange changeWithObject_type_index_( - NativeCupertinoHttp _lib, NSObject anObject, int type, int index) { - final _ret = _lib._objc_msgSend_148(_lib._class_NSOrderedCollectionChange1, - _lib._sel_changeWithObject_type_index_1, anObject._id, type, index); + NativeCupertinoHttp _lib, + NSObject? anObject, + int type, + DartNSUInteger index) { + final _ret = _lib._objc_msgSend_155( + _lib._class_NSOrderedCollectionChange1, + _lib._sel_changeWithObject_type_index_1, + anObject?._id ?? ffi.nullptr, + type, + index); return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); } static NSOrderedCollectionChange changeWithObject_type_index_associatedIndex_( NativeCupertinoHttp _lib, - NSObject anObject, + NSObject? anObject, int type, - int index, - int associatedIndex) { - final _ret = _lib._objc_msgSend_149( + DartNSUInteger index, + DartNSUInteger associatedIndex) { + final _ret = _lib._objc_msgSend_156( _lib._class_NSOrderedCollectionChange1, _lib._sel_changeWithObject_type_index_associatedIndex_1, - anObject._id, + anObject?._id ?? ffi.nullptr, type, index, associatedIndex); return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); } - NSObject get object { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? get object { + final _ret = _lib._objc_msgSend_61(_id, _lib._sel_object1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } int get changeType { - return _lib._objc_msgSend_150(_id, _lib._sel_changeType1); + return _lib._objc_msgSend_157(_id, _lib._sel_changeType1); } - int get index { + DartNSUInteger get index { return _lib._objc_msgSend_12(_id, _lib._sel_index1); } - int get associatedIndex { + DartNSUInteger get associatedIndex { return _lib._objc_msgSend_12(_id, _lib._sel_associatedIndex1); } @@ -66535,18 +67162,25 @@ class NSOrderedCollectionChange extends NSObject { } NSOrderedCollectionChange initWithObject_type_index_( - NSObject anObject, int type, int index) { - final _ret = _lib._objc_msgSend_151( - _id, _lib._sel_initWithObject_type_index_1, anObject._id, type, index); + NSObject? anObject, int type, DartNSUInteger index) { + final _ret = _lib._objc_msgSend_158( + _id, + _lib._sel_initWithObject_type_index_1, + anObject?._id ?? ffi.nullptr, + type, + index); return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); } NSOrderedCollectionChange initWithObject_type_index_associatedIndex_( - NSObject anObject, int type, int index, int associatedIndex) { - final _ret = _lib._objc_msgSend_152( + NSObject? anObject, + int type, + DartNSUInteger index, + DartNSUInteger associatedIndex) { + final _ret = _lib._objc_msgSend_159( _id, _lib._sel_initWithObject_type_index_associatedIndex_1, - anObject._id, + anObject?._id ?? ffi.nullptr, type, index, associatedIndex); @@ -66560,6 +67194,14 @@ class NSOrderedCollectionChange extends NSObject { retain: false, release: true); } + static NSOrderedCollectionChange allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3(_lib._class_NSOrderedCollectionChange1, + _lib._sel_allocWithZone_1, zone); + return NSOrderedCollectionChange._(_ret, _lib, + retain: false, release: true); + } + static NSOrderedCollectionChange alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSOrderedCollectionChange1, _lib._sel_alloc1); @@ -66581,37 +67223,47 @@ abstract class NSOrderedCollectionDifferenceCalculationOptions { static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; } -bool _ObjCBlock9_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} - -final _ObjCBlock9_closureRegistry = {}; -int _ObjCBlock9_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock9_registerClosure(Function fn) { - final id = ++_ObjCBlock9_closureRegistryIndex; - _ObjCBlock9_closureRegistry[id] = fn; +bool _ObjCBlock_bool_ObjCObject_ObjCObject_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_ObjCObject_ObjCObject_registerClosure( + bool Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistryIndex; + _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -bool _ObjCBlock9_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock9_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +bool _ObjCBlock_bool_ObjCObject_ObjCObject_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock9 extends _ObjCBlockBase { - ObjCBlock9._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_bool_ObjCObject_ObjCObject extends _ObjCBlockBase { + ObjCBlock_bool_ObjCObject_ObjCObject._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock9.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_ObjCObject.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -66622,88 +67274,101 @@ class ObjCBlock9 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock9_fnPtrTrampoline, false) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_ObjCObject_fnPtrTrampoline, + false) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock9.fromFunction( - NativeCupertinoHttp lib, - bool Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_ObjCObject.fromFunction( + NativeCupertinoHttp lib, bool Function(NSObject, NSObject) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock9_closureTrampoline, false) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_ObjCObject_closureTrampoline, + false) .cast(), - _ObjCBlock9_registerClosure(fn)), + _ObjCBlock_bool_ObjCObject_ObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSObject._(arg0, lib, retain: true, release: true), NSObject._(arg1, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - bool call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } -} -void _ObjCBlock10_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target + bool call(NSObject arg0, NSObject arg1) => _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1, ffi.Pointer arg2)>>() + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); + bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1._id); } -final _ObjCBlock10_closureRegistry = {}; -int _ObjCBlock10_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock10_registerClosure(Function fn) { - final id = ++_ObjCBlock10_closureRegistryIndex; - _ObjCBlock10_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock10_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock10_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +void _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock10 extends _ObjCBlockBase { - ObjCBlock10._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock10.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -66716,154 +67381,208 @@ class ObjCBlock10 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock10_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock10.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.fromFunction( NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) + void Function(NSObject, NSObject, ffi.Pointer) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock10_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline) .cast(), - _ObjCBlock10_registerClosure(fn)), + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + NSObject._(arg0, lib, retain: true, release: true), + NSObject._(arg1, lib, retain: true, release: true), + arg2))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.listener(NativeCupertinoHttp lib, + void Function(NSObject, NSObject, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => + fn( + NSObject._(arg0, lib, retain: true, release: true), + NSObject._(arg1, lib, retain: true, release: true), + arg2))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2); +} + +bool _ObjCBlock_bool_ObjCObject_ObjCObject_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, + ffi.Bool Function( ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } -} - -bool _ObjCBlock11_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1, ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} - -final _ObjCBlock11_closureRegistry = {}; -int _ObjCBlock11_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock11_registerClosure(Function fn) { - final id = ++_ObjCBlock11_closureRegistryIndex; - _ObjCBlock11_closureRegistry[id] = fn; + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_ObjCObject_ObjCObject_bool_registerClosure( + bool Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer) + fn) { + final id = ++_ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistryIndex; + _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -bool _ObjCBlock11_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock11_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +bool _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock11 extends _ObjCBlockBase { - ObjCBlock11._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_bool_ObjCObject_ObjCObject_bool extends _ObjCBlockBase { + ObjCBlock_bool_ObjCObject_ObjCObject_bool._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock11.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_ObjCObject_bool.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< - ffi - .NativeFunction< + ffi.NativeFunction< ffi.Bool Function( ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock11_fnPtrTrampoline, false) - .cast(), - ptr.cast()), + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_ObjCObject_bool_fnPtrTrampoline, + false) + .cast(), + ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock11.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ObjCObject_ObjCObject_bool.fromFunction( NativeCupertinoHttp lib, - bool Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) + bool Function(NSObject, NSObject, ffi.Pointer) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock11_closureTrampoline, false) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureTrampoline, false) .cast(), - _ObjCBlock11_registerClosure(fn)), + _ObjCBlock_bool_ObjCObject_ObjCObject_bool_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(NSObject._(arg0, lib, retain: true, release: true), NSObject._(arg1, lib, retain: true, release: true), arg2))), lib); static ffi.Pointer? _dartFuncTrampoline; - bool call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + + bool call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2); } final class NSFastEnumerationState extends ffi.Struct { @@ -66878,41 +67597,55 @@ final class NSFastEnumerationState extends ffi.Struct { external ffi.Array extra; } -ffi.Pointer _ObjCBlock12_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>()(arg0, arg1); -} - -final _ObjCBlock12_closureRegistry = {}; -int _ObjCBlock12_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock12_registerClosure(Function fn) { - final id = ++_ObjCBlock12_closureRegistryIndex; - _ObjCBlock12_closureRegistry[id] = fn; +ffi.Pointer + _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, NSErrorUserInfoKey)>()(arg0, arg1); +final _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureRegistry = Function( + ffi.Pointer, NSErrorUserInfoKey)>{}; +int _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_registerClosure( + ffi.Pointer Function( + ffi.Pointer, NSErrorUserInfoKey) + fn) { + final id = + ++_ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureRegistryIndex; + _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -ffi.Pointer _ObjCBlock12_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) { - return _ObjCBlock12_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +ffi.Pointer + _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1) => + _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock12 extends _ObjCBlockBase { - ObjCBlock12._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey extends _ObjCBlockBase { + ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock12.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -66923,50 +67656,63 @@ class ObjCBlock12 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>( - _ObjCBlock12_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSErrorUserInfoKey)>( + _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock12.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey.fromFunction( NativeCupertinoHttp lib, - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1) - fn) + NSObject? Function(NSError, DartNSErrorUserInfoKey) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>( - _ObjCBlock12_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSErrorUserInfoKey)>( + _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureTrampoline) .cast(), - _ObjCBlock12_registerClosure(fn)), + _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_registerClosure( + (ffi.Pointer arg0, NSErrorUserInfoKey arg1) => + fn(NSError._(arg0, lib, retain: true, release: true), NSString._(arg1, lib, retain: true, release: true)) + ?._retainAndReturnId() ?? + ffi.nullptr)), lib); static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call( - ffi.Pointer arg0, NSErrorUserInfoKey arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>()(_id, arg0, arg1); - } + + NSObject? call(NSError arg0, DartNSErrorUserInfoKey arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSErrorUserInfoKey arg1)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, NSErrorUserInfoKey)>() + (_id, arg0._id, arg1._id) + .address == + 0 + ? null + : NSObject._( + _id.ref.invoke + .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, NSErrorUserInfoKey)>()(_id, arg0._id, arg1._id), + _lib, + retain: false, + release: true); } typedef NSErrorUserInfoKey = ffi.Pointer; -typedef NSURLResourceKey = ffi.Pointer; +typedef DartNSErrorUserInfoKey = NSString; /// Working with Bookmarks and alias (bookmark) files abstract class NSURLBookmarkCreationOptions { @@ -67031,19 +67777,18 @@ class NSURLHandle extends NSObject { static void registerURLHandleClass_( NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { - return _lib._objc_msgSend_200(_lib._class_NSURLHandle1, + _lib._objc_msgSend_210(_lib._class_NSURLHandle1, _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); } - static NSObject URLHandleClassForURL_( - NativeCupertinoHttp _lib, NSURL? anURL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSURLHandle1, - _lib._sel_URLHandleClassForURL_1, anURL?._id ?? ffi.nullptr); + static NSObject URLHandleClassForURL_(NativeCupertinoHttp _lib, NSURL anURL) { + final _ret = _lib._objc_msgSend_211( + _lib._class_NSURLHandle1, _lib._sel_URLHandleClassForURL_1, anURL._id); return NSObject._(_ret, _lib, retain: true, release: true); } int status() { - return _lib._objc_msgSend_202(_id, _lib._sel_status1); + return _lib._objc_msgSend_212(_id, _lib._sel_status1); } NSString failureReason() { @@ -67051,105 +67796,106 @@ class NSURLHandle extends NSObject { return NSString._(_ret, _lib, retain: true, release: true); } - void addClient_(NSObject? client) { - return _lib._objc_msgSend_200( - _id, _lib._sel_addClient_1, client?._id ?? ffi.nullptr); + void addClient_(NSObject client) { + _lib._objc_msgSend_210(_id, _lib._sel_addClient_1, client._id); } - void removeClient_(NSObject? client) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeClient_1, client?._id ?? ffi.nullptr); + void removeClient_(NSObject client) { + _lib._objc_msgSend_210(_id, _lib._sel_removeClient_1, client._id); } void loadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); + _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); } void cancelLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); + _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); } NSData resourceData() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_resourceData1); + final _ret = _lib._objc_msgSend_54(_id, _lib._sel_resourceData1); return NSData._(_ret, _lib, retain: true, release: true); } NSData availableResourceData() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_availableResourceData1); + final _ret = _lib._objc_msgSend_54(_id, _lib._sel_availableResourceData1); return NSData._(_ret, _lib, retain: true, release: true); } int expectedResourceDataSize() { - return _lib._objc_msgSend_82(_id, _lib._sel_expectedResourceDataSize1); + return _lib._objc_msgSend_87(_id, _lib._sel_expectedResourceDataSize1); } void flushCachedData() { - return _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); + _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); } - void backgroundLoadDidFailWithReason_(NSString? reason) { - return _lib._objc_msgSend_188( - _id, - _lib._sel_backgroundLoadDidFailWithReason_1, - reason?._id ?? ffi.nullptr); + void backgroundLoadDidFailWithReason_(NSString reason) { + _lib._objc_msgSend_195( + _id, _lib._sel_backgroundLoadDidFailWithReason_1, reason._id); } - void didLoadBytes_loadComplete_(NSData? newBytes, bool yorn) { - return _lib._objc_msgSend_203(_id, _lib._sel_didLoadBytes_loadComplete_1, - newBytes?._id ?? ffi.nullptr, yorn); + void didLoadBytes_loadComplete_(NSData newBytes, bool yorn) { + _lib._objc_msgSend_213( + _id, _lib._sel_didLoadBytes_loadComplete_1, newBytes._id, yorn); } - static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL? anURL) { - return _lib._objc_msgSend_204(_lib._class_NSURLHandle1, - _lib._sel_canInitWithURL_1, anURL?._id ?? ffi.nullptr); + static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL anURL) { + return _lib._objc_msgSend_214( + _lib._class_NSURLHandle1, _lib._sel_canInitWithURL_1, anURL._id); } static NSURLHandle cachedHandleForURL_( - NativeCupertinoHttp _lib, NSURL? anURL) { - final _ret = _lib._objc_msgSend_205(_lib._class_NSURLHandle1, - _lib._sel_cachedHandleForURL_1, anURL?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSURL anURL) { + final _ret = _lib._objc_msgSend_215( + _lib._class_NSURLHandle1, _lib._sel_cachedHandleForURL_1, anURL._id); return NSURLHandle._(_ret, _lib, retain: true, release: true); } - NSObject initWithURL_cached_(NSURL? anURL, bool willCache) { - final _ret = _lib._objc_msgSend_206(_id, _lib._sel_initWithURL_cached_1, - anURL?._id ?? ffi.nullptr, willCache); + NSObject initWithURL_cached_(NSURL anURL, bool willCache) { + final _ret = _lib._objc_msgSend_216( + _id, _lib._sel_initWithURL_cached_1, anURL._id, willCache); return NSObject._(_ret, _lib, retain: true, release: true); } - NSObject propertyForKey_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_propertyForKey_1, propertyKey?._id ?? ffi.nullptr); + NSObject propertyForKey_(NSString propertyKey) { + final _ret = + _lib._objc_msgSend_42(_id, _lib._sel_propertyForKey_1, propertyKey._id); return NSObject._(_ret, _lib, retain: true, release: true); } - NSObject propertyForKeyIfAvailable_(NSString? propertyKey) { - final _ret = _lib._objc_msgSend_42(_id, - _lib._sel_propertyForKeyIfAvailable_1, propertyKey?._id ?? ffi.nullptr); + NSObject propertyForKeyIfAvailable_(NSString propertyKey) { + final _ret = _lib._objc_msgSend_42( + _id, _lib._sel_propertyForKeyIfAvailable_1, propertyKey._id); return NSObject._(_ret, _lib, retain: true, release: true); } - bool writeProperty_forKey_(NSObject propertyValue, NSString? propertyKey) { - return _lib._objc_msgSend_199(_id, _lib._sel_writeProperty_forKey_1, - propertyValue._id, propertyKey?._id ?? ffi.nullptr); + bool writeProperty_forKey_(NSObject propertyValue, NSString propertyKey) { + return _lib._objc_msgSend_209(_id, _lib._sel_writeProperty_forKey_1, + propertyValue._id, propertyKey._id); } - bool writeData_(NSData? data) { - return _lib._objc_msgSend_35( - _id, _lib._sel_writeData_1, data?._id ?? ffi.nullptr); + bool writeData_(NSData data) { + return _lib._objc_msgSend_35(_id, _lib._sel_writeData_1, data._id); } NSData loadInForeground() { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_loadInForeground1); + final _ret = _lib._objc_msgSend_54(_id, _lib._sel_loadInForeground1); return NSData._(_ret, _lib, retain: true, release: true); } void beginLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); + _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); } void endLoadInBackground() { - return _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); + _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); + } + + @override + NSURLHandle init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLHandle._(_ret, _lib, retain: true, release: true); } static NSURLHandle new1(NativeCupertinoHttp _lib) { @@ -67157,6 +67903,13 @@ class NSURLHandle extends NSObject { return NSURLHandle._(_ret, _lib, retain: false, release: true); } + static NSURLHandle allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLHandle1, _lib._sel_allocWithZone_1, zone); + return NSURLHandle._(_ret, _lib, retain: false, release: true); + } + static NSURLHandle alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); @@ -67183,6 +67936,8 @@ abstract class NSDataWritingOptions { static const int NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = 1073741824; + static const int NSDataWritingFileProtectionCompleteWhenUserInactive = + 1342177280; static const int NSDataWritingFileProtectionMask = 4026531840; /// Deprecated name for NSDataWritingAtomic @@ -67195,38 +67950,49 @@ abstract class NSDataSearchOptions { static const int NSDataSearchAnchored = 2; } -void _ObjCBlock13_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} - -final _ObjCBlock13_closureRegistry = {}; -int _ObjCBlock13_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock13_registerClosure(Function fn) { - final id = ++_ObjCBlock13_closureRegistryIndex; - _ObjCBlock13_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, NSRange, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry = , NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( + void Function(ffi.Pointer, NSRange, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock13_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return _ObjCBlock13_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock13 extends _ObjCBlockBase { - ObjCBlock13._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock13.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -67234,55 +68000,88 @@ class ObjCBlock13 extends _ObjCBlockBase { ffi.Pointer arg2)>> ptr) : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>( - _ObjCBlock13_fnPtrTrampoline) - .cast(), - ptr.cast()), + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock13.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) - fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunction(NativeCupertinoHttp lib, + void Function(ffi.Pointer, NSRange, ffi.Pointer) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>( - _ObjCBlock13_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) .cast(), - _ObjCBlock13_registerClosure(fn)), + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( + (ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2) => + fn(arg0, arg1, arg2))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, NSRange arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.listener(NativeCupertinoHttp lib, + void Function(ffi.Pointer, NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( + (ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2) => + fn(arg0, arg1, arg2))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(ffi.Pointer arg0, NSRange arg1, + ffi.Pointer arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + NSRange, ffi.Pointer)>()(_id, arg0, arg1, arg2); } /// Read/Write Options @@ -67306,35 +68105,41 @@ abstract class NSDataReadingOptions { static const int NSUncachedRead = 2; } -void _ObjCBlock14_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); -} - -final _ObjCBlock14_closureRegistry = {}; -int _ObjCBlock14_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock14_registerClosure(Function fn) { - final id = ++_ObjCBlock14_closureRegistryIndex; - _ObjCBlock14_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction, int)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureRegistry = + , int)>{}; +int _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_registerClosure( + void Function(ffi.Pointer, int) fn) { + final id = ++_ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock14_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return _ObjCBlock14_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock14 extends _ObjCBlockBase { - ObjCBlock14._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_ffiVoid_NSUInteger extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ffiVoid_NSUInteger._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock14.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_NSUInteger.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -67344,39 +68149,69 @@ class ObjCBlock14 extends _ObjCBlockBase { : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock14_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer, NSUInteger)>( + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock14.fromFunction(NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, int arg1) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_NSUInteger.fromFunction(NativeCupertinoHttp lib, + void Function(ffi.Pointer, DartNSUInteger) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock14_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer, NSUInteger)>( + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureTrampoline) .cast(), - _ObjCBlock14_registerClosure(fn)), + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_registerClosure( + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiVoid_NSUInteger.listener(NativeCupertinoHttp lib, + void Function(ffi.Pointer, DartNSUInteger) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer, NSUInteger)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_registerClosure( + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Pointer, NSUInteger)>? + _dartFuncListenerTrampoline; + + void call(ffi.Pointer arg0, DartNSUInteger arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + int)>()(_id, arg0, arg1); } abstract class NSDataBase64DecodingOptions { @@ -67415,6 +68250,7 @@ abstract class NSDataCompressionAlgorithm { typedef UTF32Char = UInt32; typedef UInt32 = ffi.UnsignedInt; +typedef DartUInt32 = int; abstract class NSStringEnumerationOptions { static const int NSStringEnumerationByLines = 0; @@ -67429,49 +68265,56 @@ abstract class NSStringEnumerationOptions { static const int NSStringEnumerationLocalized = 1024; } -void _ObjCBlock15_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - NSRange arg2, ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>()(arg0, arg1, arg2, arg3); -} - -final _ObjCBlock15_closureRegistry = {}; -int _ObjCBlock15_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock15_registerClosure(Function fn) { - final id = ++_ObjCBlock15_closureRegistryIndex; - _ObjCBlock15_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, NSRange arg1, + NSRange arg2, ffi.Pointer arg3)>>() + .asFunction< + void Function(ffi.Pointer, NSRange, NSRange, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +final _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry = , NSRange, NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( + void Function(ffi.Pointer, NSRange, NSRange, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock15_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3) { - return _ObjCBlock15_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2, arg3); -} +void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) => + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2, arg3); -class ObjCBlock15 extends _ObjCBlockBase { - ObjCBlock15._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock15.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -67482,89 +68325,143 @@ class ObjCBlock15 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>( - _ObjCBlock15_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock15.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunction( NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, NSRange arg1, NSRange arg2, - ffi.Pointer arg3) - fn) + void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>( - _ObjCBlock15_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) .cast(), - _ObjCBlock15_registerClosure(fn)), + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( + (ffi.Pointer arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) => + fn(arg0.address == 0 ? null : NSString._(arg0, lib, retain: true, release: true), arg1, arg2, arg3))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, NSRange arg1, NSRange arg2, - ffi.Pointer arg3) { - return _id.ref.invoke + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.listener( + NativeCupertinoHttp lib, + void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( + (ffi.Pointer arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) => + fn(arg0.address == 0 ? null : NSString._(arg0, lib, retain: true, release: true), arg1, arg2, arg3))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSString? arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1, arg2, arg3); +} + +void _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>>() + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() .asFunction< void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>()(_id, arg0, arg1, arg2, arg3); - } -} - -void _ObjCBlock16_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} - -final _ObjCBlock16_closureRegistry = {}; -int _ObjCBlock16_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock16_registerClosure(Function fn) { - final id = ++_ObjCBlock16_closureRegistryIndex; - _ObjCBlock16_closureRegistry[id] = fn; + ffi.Pointer, ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSString_bool_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSString_bool_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock16_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock16_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[block.ref.target.address]!( + arg0, arg1); -class ObjCBlock16 extends _ObjCBlockBase { - ObjCBlock16._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSString_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSString_bool._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock16.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_bool.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -67575,46 +68472,78 @@ class ObjCBlock16 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock16_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock16.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_bool.fromFunction(NativeCupertinoHttp lib, + void Function(NSString, ffi.Pointer) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock16_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) .cast(), - _ObjCBlock16_registerClosure(fn)), + _ObjCBlock_ffiVoid_NSString_bool_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSString._(arg0, lib, retain: true, release: true), + arg1))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSString_bool.listener(NativeCupertinoHttp lib, + void Function(NSString, ffi.Pointer) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSString_bool_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(NSString._(arg0, lib, retain: true, release: true), + arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSString arg0, ffi.Pointer arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1); } typedef NSStringEncoding = NSUInteger; @@ -67625,35 +68554,42 @@ abstract class NSStringEncodingConversionOptions { } typedef NSStringTransform = ffi.Pointer; -void _ObjCBlock17_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, int arg1)>()(arg0, arg1); -} - -final _ObjCBlock17_closureRegistry = {}; -int _ObjCBlock17_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock17_registerClosure(Function fn) { - final id = ++_ObjCBlock17_closureRegistryIndex; - _ObjCBlock17_closureRegistry[id] = fn; +typedef DartNSStringTransform = NSString; +void _ObjCBlock_ffiVoid_unichar_NSUInteger_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction, int)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_unichar_NSUInteger_closureRegistry = + , int)>{}; +int _ObjCBlock_ffiVoid_unichar_NSUInteger_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_unichar_NSUInteger_registerClosure( + void Function(ffi.Pointer, int) fn) { + final id = ++_ObjCBlock_ffiVoid_unichar_NSUInteger_closureRegistryIndex; + _ObjCBlock_ffiVoid_unichar_NSUInteger_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock17_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) { - return _ObjCBlock17_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_unichar_NSUInteger_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => + _ObjCBlock_ffiVoid_unichar_NSUInteger_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock17 extends _ObjCBlockBase { - ObjCBlock17._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_unichar_NSUInteger extends _ObjCBlockBase { + ObjCBlock_ffiVoid_unichar_NSUInteger._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock17.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_unichar_NSUInteger.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -67663,39 +68599,69 @@ class ObjCBlock17 extends _ObjCBlockBase { : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock17_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer, NSUInteger)>( + _ObjCBlock_ffiVoid_unichar_NSUInteger_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock17.fromFunction(NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, int arg1) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_unichar_NSUInteger.fromFunction(NativeCupertinoHttp lib, + void Function(ffi.Pointer, DartNSUInteger) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1)>(_ObjCBlock17_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer, NSUInteger)>( + _ObjCBlock_ffiVoid_unichar_NSUInteger_closureTrampoline) .cast(), - _ObjCBlock17_registerClosure(fn)), + _ObjCBlock_ffiVoid_unichar_NSUInteger_registerClosure( + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, int arg1)>()(_id, arg0, arg1); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_unichar_NSUInteger.listener(NativeCupertinoHttp lib, + void Function(ffi.Pointer, DartNSUInteger) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer, NSUInteger)>.listener( + _ObjCBlock_ffiVoid_unichar_NSUInteger_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_unichar_NSUInteger_registerClosure( + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Pointer, NSUInteger)>? + _dartFuncListenerTrampoline; + + void call(ffi.Pointer arg0, DartNSUInteger arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + int)>()(_id, arg0, arg1); } typedef va_list = __builtin_va_list; @@ -67710,6 +68676,7 @@ abstract class NSQualityOfService { } abstract class ptrauth_key { + static const int ptrauth_key_none = -1; static const int ptrauth_key_asia = 0; static const int ptrauth_key_asib = 1; static const int ptrauth_key_asda = 2; @@ -67741,6 +68708,7 @@ final class wide extends ffi.Struct { } typedef SInt32 = ffi.Int; +typedef DartSInt32 = int; @ffi.Packed(2) final class UnsignedWide extends ffi.Struct { @@ -67760,7 +68728,9 @@ final class Float80 extends ffi.Struct { } typedef SInt16 = ffi.Short; +typedef DartSInt16 = int; typedef UInt16 = ffi.UnsignedShort; +typedef DartUInt16 = int; final class Float96 extends ffi.Struct { @ffi.Array.multi([2]) @@ -67780,6 +68750,7 @@ final class Float32Point extends ffi.Struct { } typedef Float32 = ffi.Float; +typedef DartFloat32 = double; @ffi.Packed(2) final class ProcessSerialNumber extends ffi.Struct { @@ -67869,6 +68840,7 @@ final class NumVersion extends ffi.Struct { } typedef UInt8 = ffi.UnsignedChar; +typedef DartUInt8 = int; final class NumVersionVariant extends ffi.Union { external NumVersion parts; @@ -67901,6 +68873,7 @@ abstract class CFComparisonResult { } typedef CFIndex = ffi.Long; +typedef DartCFIndex = int; final class CFRange extends ffi.Struct { @CFIndex() @@ -67913,6 +68886,7 @@ final class CFRange extends ffi.Struct { final class __CFNull extends ffi.Opaque {} typedef CFTypeID = ffi.UnsignedLong; +typedef DartCFTypeID = int; typedef CFNullRef = ffi.Pointer<__CFNull>; final class __CFAllocator extends ffi.Opaque {} @@ -67940,34 +68914,60 @@ final class CFAllocatorContext extends ffi.Struct { external CFAllocatorPreferredSizeCallBack preferredSize; } -typedef CFAllocatorRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>>; -typedef CFAllocatorReleaseCallBack = ffi - .Pointer info)>>; -typedef CFAllocatorCopyDescriptionCallBack = ffi.Pointer< - ffi.NativeFunction info)>>; +typedef CFAllocatorRetainCallBack + = ffi.Pointer>; +typedef CFAllocatorRetainCallBackFunction = ffi.Pointer Function( + ffi.Pointer info); +typedef CFAllocatorReleaseCallBack + = ffi.Pointer>; +typedef CFAllocatorReleaseCallBackFunction = ffi.Void Function( + ffi.Pointer info); +typedef DartCFAllocatorReleaseCallBackFunction = void Function( + ffi.Pointer info); +typedef CFAllocatorCopyDescriptionCallBack = ffi + .Pointer>; +typedef CFAllocatorCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer info); typedef CFStringRef = ffi.Pointer<__CFString>; -typedef CFAllocatorAllocateCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFIndex allocSize, CFOptionFlags hint, - ffi.Pointer info)>>; +typedef CFAllocatorAllocateCallBack + = ffi.Pointer>; +typedef CFAllocatorAllocateCallBackFunction = ffi.Pointer Function( + CFIndex allocSize, CFOptionFlags hint, ffi.Pointer info); +typedef DartCFAllocatorAllocateCallBackFunction + = ffi.Pointer Function(DartCFIndex allocSize, + DartCFOptionFlags hint, ffi.Pointer info); typedef CFOptionFlags = ffi.UnsignedLong; -typedef CFAllocatorReallocateCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer ptr, - CFIndex newsize, CFOptionFlags hint, ffi.Pointer info)>>; -typedef CFAllocatorDeallocateCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer ptr, ffi.Pointer info)>>; -typedef CFAllocatorPreferredSizeCallBack = ffi.Pointer< - ffi.NativeFunction< - CFIndex Function( - CFIndex size, CFOptionFlags hint, ffi.Pointer info)>>; +typedef DartCFOptionFlags = int; +typedef CFAllocatorReallocateCallBack + = ffi.Pointer>; +typedef CFAllocatorReallocateCallBackFunction = ffi.Pointer Function( + ffi.Pointer ptr, + CFIndex newsize, + CFOptionFlags hint, + ffi.Pointer info); +typedef DartCFAllocatorReallocateCallBackFunction + = ffi.Pointer Function( + ffi.Pointer ptr, + DartCFIndex newsize, + DartCFOptionFlags hint, + ffi.Pointer info); +typedef CFAllocatorDeallocateCallBack + = ffi.Pointer>; +typedef CFAllocatorDeallocateCallBackFunction = ffi.Void Function( + ffi.Pointer ptr, ffi.Pointer info); +typedef DartCFAllocatorDeallocateCallBackFunction = void Function( + ffi.Pointer ptr, ffi.Pointer info); +typedef CFAllocatorPreferredSizeCallBack + = ffi.Pointer>; +typedef CFAllocatorPreferredSizeCallBackFunction = CFIndex Function( + CFIndex size, CFOptionFlags hint, ffi.Pointer info); +typedef DartCFAllocatorPreferredSizeCallBackFunction = DartCFIndex Function( + DartCFIndex size, DartCFOptionFlags hint, ffi.Pointer info); typedef CFTypeRef = ffi.Pointer; typedef Boolean = ffi.UnsignedChar; +typedef DartBoolean = int; typedef CFHashCode = ffi.UnsignedLong; +typedef DartCFHashCode = int; typedef NSZone = _NSZone; class NSMutableIndexSet extends NSIndexSet { @@ -67994,38 +68994,37 @@ class NSMutableIndexSet extends NSIndexSet { obj._lib._class_NSMutableIndexSet1); } - void addIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_285( - _id, _lib._sel_addIndexes_1, indexSet?._id ?? ffi.nullptr); + void addIndexes_(NSIndexSet indexSet) { + _lib._objc_msgSend_302(_id, _lib._sel_addIndexes_1, indexSet._id); } - void removeIndexes_(NSIndexSet? indexSet) { - return _lib._objc_msgSend_285( - _id, _lib._sel_removeIndexes_1, indexSet?._id ?? ffi.nullptr); + void removeIndexes_(NSIndexSet indexSet) { + _lib._objc_msgSend_302(_id, _lib._sel_removeIndexes_1, indexSet._id); } void removeAllIndexes() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllIndexes1); + _lib._objc_msgSend_1(_id, _lib._sel_removeAllIndexes1); } - void addIndex_(int value) { - return _lib._objc_msgSend_286(_id, _lib._sel_addIndex_1, value); + void addIndex_(DartNSUInteger value) { + _lib._objc_msgSend_303(_id, _lib._sel_addIndex_1, value); } - void removeIndex_(int value) { - return _lib._objc_msgSend_286(_id, _lib._sel_removeIndex_1, value); + void removeIndex_(DartNSUInteger value) { + _lib._objc_msgSend_303(_id, _lib._sel_removeIndex_1, value); } void addIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_287(_id, _lib._sel_addIndexesInRange_1, range); + _lib._objc_msgSend_304(_id, _lib._sel_addIndexesInRange_1, range); } void removeIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_287(_id, _lib._sel_removeIndexesInRange_1, range); + _lib._objc_msgSend_304(_id, _lib._sel_removeIndexesInRange_1, range); } - void shiftIndexesStartingAtIndex_by_(int index, int delta) { - return _lib._objc_msgSend_288( + void shiftIndexesStartingAtIndex_by_( + DartNSUInteger index, DartNSInteger delta) { + _lib._objc_msgSend_305( _id, _lib._sel_shiftIndexesStartingAtIndex_by_1, index, delta); } @@ -68036,25 +69035,58 @@ class NSMutableIndexSet extends NSIndexSet { } static NSMutableIndexSet indexSetWithIndex_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_94( + NativeCupertinoHttp _lib, DartNSUInteger value) { + final _ret = _lib._objc_msgSend_99( _lib._class_NSMutableIndexSet1, _lib._sel_indexSetWithIndex_1, value); return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); } static NSMutableIndexSet indexSetWithIndexesInRange_( NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_111(_lib._class_NSMutableIndexSet1, + final _ret = _lib._objc_msgSend_116(_lib._class_NSMutableIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); } + @override + NSMutableIndexSet initWithIndexesInRange_(NSRange range) { + final _ret = + _lib._objc_msgSend_116(_id, _lib._sel_initWithIndexesInRange_1, range); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableIndexSet initWithIndexSet_(NSIndexSet indexSet) { + final _ret = + _lib._objc_msgSend_117(_id, _lib._sel_initWithIndexSet_1, indexSet._id); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableIndexSet initWithIndex_(DartNSUInteger value) { + final _ret = _lib._objc_msgSend_99(_id, _lib._sel_initWithIndex_1, value); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableIndexSet init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); + } + static NSMutableIndexSet new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_new1); return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); } + static NSMutableIndexSet allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableIndexSet1, _lib._sel_allocWithZone_1, zone); + return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); + } + static NSMutableIndexSet alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_alloc1); @@ -68087,24 +69119,25 @@ class NSMutableArray extends NSArray { } void addObject_(NSObject anObject) { - return _lib._objc_msgSend_200(_id, _lib._sel_addObject_1, anObject._id); + _lib._objc_msgSend_210(_id, _lib._sel_addObject_1, anObject._id); } - void insertObject_atIndex_(NSObject anObject, int index) { - return _lib._objc_msgSend_289( + void insertObject_atIndex_(NSObject anObject, DartNSUInteger index) { + _lib._objc_msgSend_306( _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); } void removeLastObject() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); + _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); } - void removeObjectAtIndex_(int index) { - return _lib._objc_msgSend_286(_id, _lib._sel_removeObjectAtIndex_1, index); + void removeObjectAtIndex_(DartNSUInteger index) { + _lib._objc_msgSend_303(_id, _lib._sel_removeObjectAtIndex_1, index); } - void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { - return _lib._objc_msgSend_290( + void replaceObjectAtIndex_withObject_( + DartNSUInteger index, NSObject anObject) { + _lib._objc_msgSend_307( _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); } @@ -68114,89 +69147,91 @@ class NSMutableArray extends NSArray { return NSMutableArray._(_ret, _lib, retain: true, release: true); } - NSMutableArray initWithCapacity_(int numItems) { + NSMutableArray initWithCapacity_(DartNSUInteger numItems) { final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); + _lib._objc_msgSend_99(_id, _lib._sel_initWithCapacity_1, numItems); return NSMutableArray._(_ret, _lib, retain: true, release: true); } @override - NSMutableArray initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + NSMutableArray? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSMutableArray._(_ret, _lib, retain: true, release: true); } - void addObjectsFromArray_(NSArray? otherArray) { - return _lib._objc_msgSend_291( - _id, _lib._sel_addObjectsFromArray_1, otherArray?._id ?? ffi.nullptr); + void addObjectsFromArray_(NSArray otherArray) { + _lib._objc_msgSend_308( + _id, _lib._sel_addObjectsFromArray_1, otherArray._id); } - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - return _lib._objc_msgSend_292( + void exchangeObjectAtIndex_withObjectAtIndex_( + DartNSUInteger idx1, DartNSUInteger idx2) { + _lib._objc_msgSend_309( _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); } void removeAllObjects() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); } void removeObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_293( + _lib._objc_msgSend_310( _id, _lib._sel_removeObject_inRange_1, anObject._id, range); } void removeObject_(NSObject anObject) { - return _lib._objc_msgSend_200(_id, _lib._sel_removeObject_1, anObject._id); + _lib._objc_msgSend_210(_id, _lib._sel_removeObject_1, anObject._id); } void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_293( + _lib._objc_msgSend_310( _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); } void removeObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_200( + _lib._objc_msgSend_210( _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); } void removeObjectsFromIndices_numIndices_( - ffi.Pointer indices, int cnt) { - return _lib._objc_msgSend_294( + ffi.Pointer indices, DartNSUInteger cnt) { + _lib._objc_msgSend_311( _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); } - void removeObjectsInArray_(NSArray? otherArray) { - return _lib._objc_msgSend_291( - _id, _lib._sel_removeObjectsInArray_1, otherArray?._id ?? ffi.nullptr); + void removeObjectsInArray_(NSArray otherArray) { + _lib._objc_msgSend_308( + _id, _lib._sel_removeObjectsInArray_1, otherArray._id); } void removeObjectsInRange_(NSRange range) { - return _lib._objc_msgSend_287(_id, _lib._sel_removeObjectsInRange_1, range); + _lib._objc_msgSend_304(_id, _lib._sel_removeObjectsInRange_1, range); } void replaceObjectsInRange_withObjectsFromArray_range_( - NSRange range, NSArray? otherArray, NSRange otherRange) { - return _lib._objc_msgSend_295( + NSRange range, NSArray otherArray, NSRange otherRange) { + _lib._objc_msgSend_312( _id, _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, range, - otherArray?._id ?? ffi.nullptr, + otherArray._id, otherRange); } void replaceObjectsInRange_withObjectsFromArray_( - NSRange range, NSArray? otherArray) { - return _lib._objc_msgSend_296( + NSRange range, NSArray otherArray) { + _lib._objc_msgSend_313( _id, _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, range, - otherArray?._id ?? ffi.nullptr); + otherArray._id); } - void setArray_(NSArray? otherArray) { - return _lib._objc_msgSend_291( - _id, _lib._sel_setArray_1, otherArray?._id ?? ffi.nullptr); + void setArray_(NSArray otherArray) { + _lib._objc_msgSend_308(_id, _lib._sel_setArray_1, otherArray._id); } void sortUsingFunction_context_( @@ -68206,83 +69241,95 @@ class NSMutableArray extends NSArray { ffi.Pointer, ffi.Pointer)>> compare, ffi.Pointer context) { - return _lib._objc_msgSend_297( + _lib._objc_msgSend_314( _id, _lib._sel_sortUsingFunction_context_1, compare, context); } void sortUsingSelector_(ffi.Pointer comparator) { - return _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); + _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); } - void insertObjects_atIndexes_(NSArray? objects, NSIndexSet? indexes) { - return _lib._objc_msgSend_298(_id, _lib._sel_insertObjects_atIndexes_1, - objects?._id ?? ffi.nullptr, indexes?._id ?? ffi.nullptr); + void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { + _lib._objc_msgSend_315( + _id, _lib._sel_insertObjects_atIndexes_1, objects._id, indexes._id); } - void removeObjectsAtIndexes_(NSIndexSet? indexes) { - return _lib._objc_msgSend_285( - _id, _lib._sel_removeObjectsAtIndexes_1, indexes?._id ?? ffi.nullptr); + void removeObjectsAtIndexes_(NSIndexSet indexes) { + _lib._objc_msgSend_302( + _id, _lib._sel_removeObjectsAtIndexes_1, indexes._id); } void replaceObjectsAtIndexes_withObjects_( - NSIndexSet? indexes, NSArray? objects) { - return _lib._objc_msgSend_299( - _id, - _lib._sel_replaceObjectsAtIndexes_withObjects_1, - indexes?._id ?? ffi.nullptr, - objects?._id ?? ffi.nullptr); + NSIndexSet indexes, NSArray objects) { + _lib._objc_msgSend_316(_id, _lib._sel_replaceObjectsAtIndexes_withObjects_1, + indexes._id, objects._id); } - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - return _lib._objc_msgSend_289( + void setObject_atIndexedSubscript_(NSObject obj, DartNSUInteger idx) { + _lib._objc_msgSend_306( _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); } - void sortUsingComparator_(NSComparator cmptr) { - return _lib._objc_msgSend_300(_id, _lib._sel_sortUsingComparator_1, cmptr); + void sortUsingComparator_(DartNSComparator cmptr) { + _lib._objc_msgSend_317(_id, _lib._sel_sortUsingComparator_1, cmptr._id); } - void sortWithOptions_usingComparator_(int opts, NSComparator cmptr) { - return _lib._objc_msgSend_301( - _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr); + void sortWithOptions_usingComparator_(int opts, DartNSComparator cmptr) { + _lib._objc_msgSend_318( + _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr._id); } static NSMutableArray arrayWithCapacity_( - NativeCupertinoHttp _lib, int numItems) { - final _ret = _lib._objc_msgSend_94( + NativeCupertinoHttp _lib, DartNSUInteger numItems) { + final _ret = _lib._objc_msgSend_99( _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); return NSMutableArray._(_ret, _lib, retain: true, release: true); } - static NSMutableArray arrayWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_302(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + static NSMutableArray? arrayWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_319(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSMutableArray._(_ret, _lib, retain: true, release: true); } - static NSMutableArray arrayWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_303(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + static NSMutableArray? arrayWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_320(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSMutableArray._(_ret, _lib, retain: true, release: true); } - NSMutableArray initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_302( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + NSMutableArray? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_319( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSMutableArray._(_ret, _lib, retain: true, release: true); } - NSMutableArray initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_303( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableArray._(_ret, _lib, retain: true, release: true); + NSMutableArray? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_320(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSMutableArray._(_ret, _lib, retain: true, release: true); } - void applyDifference_(NSOrderedCollectionDifference? difference) { - return _lib._objc_msgSend_304( - _id, _lib._sel_applyDifference_1, difference?._id ?? ffi.nullptr); + void applyDifference_(NSOrderedCollectionDifference difference) { + _lib._objc_msgSend_321(_id, _lib._sel_applyDifference_1, difference._id); + } + + @override + NSMutableArray initWithObjects_count_( + ffi.Pointer> objects, DartNSUInteger cnt) { + final _ret = _lib._objc_msgSend_100( + _id, _lib._sel_initWithObjects_count_1, objects, cnt); + return NSMutableArray._(_ret, _lib, retain: true, release: true); } static NSMutableArray array(NativeCupertinoHttp _lib) { @@ -68293,41 +69340,61 @@ class NSMutableArray extends NSArray { static NSMutableArray arrayWithObject_( NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_91( + final _ret = _lib._objc_msgSend_149( _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); return NSMutableArray._(_ret, _lib, retain: true, release: true); } static NSMutableArray arrayWithObjects_count_(NativeCupertinoHttp _lib, - ffi.Pointer> objects, int cnt) { - final _ret = _lib._objc_msgSend_95(_lib._class_NSMutableArray1, + ffi.Pointer> objects, DartNSUInteger cnt) { + final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); return NSMutableArray._(_ret, _lib, retain: true, release: true); } static NSMutableArray arrayWithObjects_( NativeCupertinoHttp _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableArray1, + final _ret = _lib._objc_msgSend_149(_lib._class_NSMutableArray1, _lib._sel_arrayWithObjects_1, firstObj._id); return NSMutableArray._(_ret, _lib, retain: true, release: true); } static NSMutableArray arrayWithArray_( - NativeCupertinoHttp _lib, NSArray? array) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableArray1, - _lib._sel_arrayWithArray_1, array?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSArray array) { + final _ret = _lib._objc_msgSend_150( + _lib._class_NSMutableArray1, _lib._sel_arrayWithArray_1, array._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableArray initWithObjects_(NSObject firstObj) { + final _ret = + _lib._objc_msgSend_149(_id, _lib._sel_initWithObjects_1, firstObj._id); + return NSMutableArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableArray initWithArray_(NSArray array) { + final _ret = + _lib._objc_msgSend_150(_id, _lib._sel_initWithArray_1, array._id); return NSMutableArray._(_ret, _lib, retain: true, release: true); } + @override + NSMutableArray initWithArray_copyItems_(NSArray array, bool flag) { + final _ret = _lib._objc_msgSend_151( + _id, _lib._sel_initWithArray_copyItems_1, array._id, flag); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } + /// Reads array stored in NSPropertyList format from the specified url. - static NSArray arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL? url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_145( - _lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSArray._(_ret, _lib, retain: true, release: true); + static NSArray? arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, + NSURL url, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_152(_lib._class_NSMutableArray1, + _lib._sel_arrayWithContentsOfURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } static NSMutableArray new1(NativeCupertinoHttp _lib) { @@ -68336,6 +69403,13 @@ class NSMutableArray extends NSArray { return NSMutableArray._(_ret, _lib, retain: false, release: true); } + static NSMutableArray allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableArray1, _lib._sel_allocWithZone_1, zone); + return NSMutableArray._(_ret, _lib, retain: false, release: true); + } + static NSMutableArray alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); @@ -68372,47 +69446,45 @@ class NSMutableData extends NSData { } @override - int get length { + DartNSUInteger get length { return _lib._objc_msgSend_12(_id, _lib._sel_length1); } - set length(int value) { - _lib._objc_msgSend_305(_id, _lib._sel_setLength_1, value); + set length(DartNSUInteger value) { + return _lib._objc_msgSend_322(_id, _lib._sel_setLength_1, value); } - void appendBytes_length_(ffi.Pointer bytes, int length) { - return _lib._objc_msgSend_33( - _id, _lib._sel_appendBytes_length_1, bytes, length); + void appendBytes_length_(ffi.Pointer bytes, DartNSUInteger length) { + _lib._objc_msgSend_33(_id, _lib._sel_appendBytes_length_1, bytes, length); } - void appendData_(NSData? other) { - return _lib._objc_msgSend_306( - _id, _lib._sel_appendData_1, other?._id ?? ffi.nullptr); + void appendData_(NSData other) { + _lib._objc_msgSend_323(_id, _lib._sel_appendData_1, other._id); } - void increaseLengthBy_(int extraLength) { - return _lib._objc_msgSend_286( - _id, _lib._sel_increaseLengthBy_1, extraLength); + void increaseLengthBy_(DartNSUInteger extraLength) { + _lib._objc_msgSend_303(_id, _lib._sel_increaseLengthBy_1, extraLength); } void replaceBytesInRange_withBytes_( NSRange range, ffi.Pointer bytes) { - return _lib._objc_msgSend_307( + _lib._objc_msgSend_324( _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); } void resetBytesInRange_(NSRange range) { - return _lib._objc_msgSend_287(_id, _lib._sel_resetBytesInRange_1, range); + _lib._objc_msgSend_304(_id, _lib._sel_resetBytesInRange_1, range); } - void setData_(NSData? data) { - return _lib._objc_msgSend_306( - _id, _lib._sel_setData_1, data?._id ?? ffi.nullptr); + void setData_(NSData data) { + _lib._objc_msgSend_323(_id, _lib._sel_setData_1, data._id); } - void replaceBytesInRange_withBytes_length_(NSRange range, - ffi.Pointer replacementBytes, int replacementLength) { - return _lib._objc_msgSend_308( + void replaceBytesInRange_withBytes_length_( + NSRange range, + ffi.Pointer replacementBytes, + DartNSUInteger replacementLength) { + _lib._objc_msgSend_325( _id, _lib._sel_replaceBytesInRange_withBytes_length_1, range, @@ -68420,40 +69492,50 @@ class NSMutableData extends NSData { replacementLength); } - static NSMutableData dataWithCapacity_( - NativeCupertinoHttp _lib, int aNumItems) { - final _ret = _lib._objc_msgSend_94( + static NSMutableData? dataWithCapacity_( + NativeCupertinoHttp _lib, DartNSUInteger aNumItems) { + final _ret = _lib._objc_msgSend_326( _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return NSMutableData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithLength_(NativeCupertinoHttp _lib, int length) { - final _ret = _lib._objc_msgSend_94( + static NSMutableData? dataWithLength_( + NativeCupertinoHttp _lib, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_326( _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); } - NSMutableData initWithCapacity_(int capacity) { + NSMutableData? initWithCapacity_(DartNSUInteger capacity) { final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableData._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_326(_id, _lib._sel_initWithCapacity_1, capacity); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); } - NSMutableData initWithLength_(int length) { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_initWithLength_1, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); + NSMutableData? initWithLength_(DartNSUInteger length) { + final _ret = + _lib._objc_msgSend_326(_id, _lib._sel_initWithLength_1, length); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); } /// These methods compress or decompress the receiver's contents in-place using the specified algorithm. If the operation is not successful, these methods leave the receiver unchanged.. bool decompressUsingAlgorithm_error_( int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_309( + return _lib._objc_msgSend_327( _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); } bool compressUsingAlgorithm_error_( int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_309( + return _lib._objc_msgSend_327( _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); } @@ -68463,16 +69545,16 @@ class NSMutableData extends NSData { return NSMutableData._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, + static NSMutableData dataWithBytes_length_(NativeCupertinoHttp _lib, + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_222(_lib._class_NSMutableData1, _lib._sel_dataWithBytes_length_1, bytes, length); return NSMutableData._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSMutableData1, + static NSMutableData dataWithBytesNoCopy_length_(NativeCupertinoHttp _lib, + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_222(_lib._class_NSMutableData1, _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); return NSMutableData._(_ret, _lib, retain: false, release: true); } @@ -68480,66 +69562,219 @@ class NSMutableData extends NSData { static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( NativeCupertinoHttp _lib, ffi.Pointer bytes, - int length, + DartNSUInteger length, bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSMutableData1, + final _ret = _lib._objc_msgSend_223(_lib._class_NSMutableData1, _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); return NSMutableData._(_ret, _lib, retain: false, release: true); } - static NSMutableData dataWithContentsOfFile_options_error_( + static NSMutableData? dataWithContentsOfFile_options_error_( NativeCupertinoHttp _lib, - NSString? path, + NSString path, int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( + final _ret = _lib._objc_msgSend_224( _lib._class_NSMutableData1, _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, + path._id, readOptionsMask, errorPtr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithContentsOfURL_options_error_( + static NSMutableData? dataWithContentsOfURL_options_error_( NativeCupertinoHttp _lib, - NSURL? url, + NSURL url, int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( + final _ret = _lib._objc_msgSend_225( _lib._class_NSMutableData1, _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, + url._id, readOptionsMask, errorPtr); - return NSMutableData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData? dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_49(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSMutableData? dataWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_226( + _lib._class_NSMutableData1, _lib._sel_dataWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + @override + NSMutableData initWithBytes_length_( + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_222( + _id, _lib._sel_initWithBytes_length_1, bytes, length); return NSMutableData._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + @override + NSMutableData initWithBytesNoCopy_length_( + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_222( + _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, DartNSUInteger length, bool b) { + final _ret = _lib._objc_msgSend_223(_id, + _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableData initWithBytesNoCopy_length_deallocator_( + ffi.Pointer bytes, + DartNSUInteger length, + ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { + final _ret = _lib._objc_msgSend_227( + _id, + _lib._sel_initWithBytesNoCopy_length_deallocator_1, + bytes, + length, + deallocator?._id ?? ffi.nullptr); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableData? initWithContentsOfFile_options_error_(NSString path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_224( + _id, + _lib._sel_initWithContentsOfFile_options_error_1, + path._id, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData? initWithContentsOfURL_options_error_(NSURL url, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_225( + _id, + _lib._sel_initWithContentsOfURL_options_error_1, + url._id, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_49( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_226(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData initWithData_(NSData data) { + final _ret = + _lib._objc_msgSend_228(_id, _lib._sel_initWithData_1, data._id); return NSMutableData._(_ret, _lib, retain: true, release: true); } - static NSMutableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSMutableData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + static NSMutableData dataWithData_(NativeCupertinoHttp _lib, NSData data) { + final _ret = _lib._objc_msgSend_228( + _lib._class_NSMutableData1, _lib._sel_dataWithData_1, data._id); return NSMutableData._(_ret, _lib, retain: true, release: true); } - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. + @override + NSMutableData? initWithBase64EncodedString_options_( + NSString base64String, int options) { + final _ret = _lib._objc_msgSend_229( + _id, + _lib._sel_initWithBase64EncodedString_options_1, + base64String._id, + options); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. + @override + NSMutableData? initWithBase64EncodedData_options_( + NSData base64Data, int options) { + final _ret = _lib._objc_msgSend_231(_id, + _lib._sel_initWithBase64EncodedData_options_1, base64Data._id, options); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. + @override + NSMutableData? decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_233(_id, + _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData? compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_233( + _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); + return _ret.address == 0 + ? null + : NSMutableData._(_ret, _lib, retain: true, release: true); + } + + static NSObject? dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_49(_lib._class_NSMutableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableData init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableData._(_ret, _lib, retain: true, release: true); } static NSMutableData new1(NativeCupertinoHttp _lib) { @@ -68548,6 +69783,13 @@ class NSMutableData extends NSData { return NSMutableData._(_ret, _lib, retain: false, release: true); } + static NSMutableData allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableData1, _lib._sel_allocWithZone_1, zone); + return NSMutableData._(_ret, _lib, retain: false, release: true); + } + static NSMutableData alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); @@ -68580,17 +69822,40 @@ class NSPurgeableData extends NSMutableData { obj._lib._class_NSPurgeableData1); } - static NSPurgeableData dataWithCapacity_( - NativeCupertinoHttp _lib, int aNumItems) { - final _ret = _lib._objc_msgSend_94( + static NSPurgeableData? dataWithCapacity_( + NativeCupertinoHttp _lib, DartNSUInteger aNumItems) { + final _ret = _lib._objc_msgSend_326( _lib._class_NSPurgeableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithLength_(NativeCupertinoHttp _lib, int length) { - final _ret = _lib._objc_msgSend_94( + static NSPurgeableData? dataWithLength_( + NativeCupertinoHttp _lib, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_326( _lib._class_NSPurgeableData1, _lib._sel_dataWithLength_1, length); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSPurgeableData? initWithCapacity_(DartNSUInteger capacity) { + final _ret = + _lib._objc_msgSend_326(_id, _lib._sel_initWithCapacity_1, capacity); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSPurgeableData? initWithLength_(DartNSUInteger length) { + final _ret = + _lib._objc_msgSend_326(_id, _lib._sel_initWithLength_1, length); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); } static NSPurgeableData data(NativeCupertinoHttp _lib) { @@ -68599,16 +69864,16 @@ class NSPurgeableData extends NSMutableData { return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithBytes_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, + static NSPurgeableData dataWithBytes_length_(NativeCupertinoHttp _lib, + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_222(_lib._class_NSPurgeableData1, _lib._sel_dataWithBytes_length_1, bytes, length); return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithBytesNoCopy_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_212(_lib._class_NSPurgeableData1, + static NSPurgeableData dataWithBytesNoCopy_length_(NativeCupertinoHttp _lib, + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_222(_lib._class_NSPurgeableData1, _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); return NSPurgeableData._(_ret, _lib, retain: false, release: true); } @@ -68616,66 +69881,219 @@ class NSPurgeableData extends NSMutableData { static NSPurgeableData dataWithBytesNoCopy_length_freeWhenDone_( NativeCupertinoHttp _lib, ffi.Pointer bytes, - int length, + DartNSUInteger length, bool b) { - final _ret = _lib._objc_msgSend_213(_lib._class_NSPurgeableData1, + final _ret = _lib._objc_msgSend_223(_lib._class_NSPurgeableData1, _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); return NSPurgeableData._(_ret, _lib, retain: false, release: true); } - static NSPurgeableData dataWithContentsOfFile_options_error_( + static NSPurgeableData? dataWithContentsOfFile_options_error_( NativeCupertinoHttp _lib, - NSString? path, + NSString path, int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_214( + final _ret = _lib._objc_msgSend_224( _lib._class_NSPurgeableData1, _lib._sel_dataWithContentsOfFile_options_error_1, - path?._id ?? ffi.nullptr, + path._id, readOptionsMask, errorPtr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithContentsOfURL_options_error_( + static NSPurgeableData? dataWithContentsOfURL_options_error_( NativeCupertinoHttp _lib, - NSURL? url, + NSURL url, int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_215( + final _ret = _lib._objc_msgSend_225( _lib._class_NSPurgeableData1, _lib._sel_dataWithContentsOfURL_options_error_1, - url?._id ?? ffi.nullptr, + url._id, readOptionsMask, errorPtr); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData? dataWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_49(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSPurgeableData? dataWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_226(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfFile_1, path?._id ?? ffi.nullptr); + @override + NSPurgeableData initWithBytes_length_( + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_222( + _id, _lib._sel_initWithBytes_length_1, bytes, length); return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfURL_1, url?._id ?? ffi.nullptr); + @override + NSPurgeableData initWithBytesNoCopy_length_( + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_222( + _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } + + @override + NSPurgeableData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, DartNSUInteger length, bool b) { + final _ret = _lib._objc_msgSend_223(_id, + _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } + + @override + NSPurgeableData initWithBytesNoCopy_length_deallocator_( + ffi.Pointer bytes, + DartNSUInteger length, + ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { + final _ret = _lib._objc_msgSend_227( + _id, + _lib._sel_initWithBytesNoCopy_length_deallocator_1, + bytes, + length, + deallocator?._id ?? ffi.nullptr); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } + + @override + NSPurgeableData? initWithContentsOfFile_options_error_(NSString path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_224( + _id, + _lib._sel_initWithContentsOfFile_options_error_1, + path._id, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSPurgeableData? initWithContentsOfURL_options_error_(NSURL url, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _lib._objc_msgSend_225( + _id, + _lib._sel_initWithContentsOfURL_options_error_1, + url._id, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSPurgeableData? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_49( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSPurgeableData? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_226(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSPurgeableData initWithData_(NSData data) { + final _ret = + _lib._objc_msgSend_228(_id, _lib._sel_initWithData_1, data._id); return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - static NSPurgeableData dataWithData_(NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSPurgeableData1, - _lib._sel_dataWithData_1, data?._id ?? ffi.nullptr); + static NSPurgeableData dataWithData_(NativeCupertinoHttp _lib, NSData data) { + final _ret = _lib._objc_msgSend_228( + _lib._class_NSPurgeableData1, _lib._sel_dataWithData_1, data._id); return NSPurgeableData._(_ret, _lib, retain: true, release: true); } - static NSObject dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. + @override + NSPurgeableData? initWithBase64EncodedString_options_( + NSString base64String, int options) { + final _ret = _lib._objc_msgSend_229( + _id, + _lib._sel_initWithBase64EncodedString_options_1, + base64String._id, + options); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. + @override + NSPurgeableData? initWithBase64EncodedData_options_( + NSData base64Data, int options) { + final _ret = _lib._objc_msgSend_231(_id, + _lib._sel_initWithBase64EncodedData_options_1, base64Data._id, options); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. + @override + NSPurgeableData? decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_233(_id, + _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + @override + NSPurgeableData? compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_233( + _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); + return _ret.address == 0 + ? null + : NSPurgeableData._(_ret, _lib, retain: true, release: true); + } + + static NSObject? dataWithContentsOfMappedFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_49(_lib._class_NSPurgeableData1, + _lib._sel_dataWithContentsOfMappedFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); + } + + @override + NSPurgeableData init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSPurgeableData._(_ret, _lib, retain: true, release: true); } static NSPurgeableData new1(NativeCupertinoHttp _lib) { @@ -68684,6 +70102,13 @@ class NSPurgeableData extends NSMutableData { return NSPurgeableData._(_ret, _lib, retain: false, release: true); } + static NSPurgeableData allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSPurgeableData1, _lib._sel_allocWithZone_1, zone); + return NSPurgeableData._(_ret, _lib, retain: false, release: true); + } + static NSPurgeableData alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_alloc1); @@ -68717,12 +70142,11 @@ class NSMutableDictionary extends NSDictionary { } void removeObjectForKey_(NSObject aKey) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObjectForKey_1, aKey._id); + _lib._objc_msgSend_210(_id, _lib._sel_removeObjectForKey_1, aKey._id); } void setObject_forKey_(NSObject anObject, NSObject aKey) { - return _lib._objc_msgSend_310( + _lib._objc_msgSend_328( _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); } @@ -68732,74 +70156,82 @@ class NSMutableDictionary extends NSDictionary { return NSMutableDictionary._(_ret, _lib, retain: true, release: true); } - NSMutableDictionary initWithCapacity_(int numItems) { + NSMutableDictionary initWithCapacity_(DartNSUInteger numItems) { final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_initWithCapacity_1, numItems); + _lib._objc_msgSend_99(_id, _lib._sel_initWithCapacity_1, numItems); return NSMutableDictionary._(_ret, _lib, retain: true, release: true); } @override - NSMutableDictionary initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSMutableDictionary? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSMutableDictionary._(_ret, _lib, retain: true, release: true); } - void addEntriesFromDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_311(_id, _lib._sel_addEntriesFromDictionary_1, - otherDictionary?._id ?? ffi.nullptr); + void addEntriesFromDictionary_(NSDictionary otherDictionary) { + _lib._objc_msgSend_329( + _id, _lib._sel_addEntriesFromDictionary_1, otherDictionary._id); } void removeAllObjects() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); + _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); } - void removeObjectsForKeys_(NSArray? keyArray) { - return _lib._objc_msgSend_291( - _id, _lib._sel_removeObjectsForKeys_1, keyArray?._id ?? ffi.nullptr); + void removeObjectsForKeys_(NSArray keyArray) { + _lib._objc_msgSend_308(_id, _lib._sel_removeObjectsForKeys_1, keyArray._id); } - void setDictionary_(NSDictionary? otherDictionary) { - return _lib._objc_msgSend_311( - _id, _lib._sel_setDictionary_1, otherDictionary?._id ?? ffi.nullptr); + void setDictionary_(NSDictionary otherDictionary) { + _lib._objc_msgSend_329(_id, _lib._sel_setDictionary_1, otherDictionary._id); } - void setObject_forKeyedSubscript_(NSObject obj, NSObject key) { - return _lib._objc_msgSend_310( - _id, _lib._sel_setObject_forKeyedSubscript_1, obj._id, key._id); + void setObject_forKeyedSubscript_(NSObject? obj, NSObject key) { + _lib._objc_msgSend_330(_id, _lib._sel_setObject_forKeyedSubscript_1, + obj?._id ?? ffi.nullptr, key._id); } static NSMutableDictionary dictionaryWithCapacity_( - NativeCupertinoHttp _lib, int numItems) { - final _ret = _lib._objc_msgSend_94(_lib._class_NSMutableDictionary1, + NativeCupertinoHttp _lib, DartNSUInteger numItems) { + final _ret = _lib._objc_msgSend_99(_lib._class_NSMutableDictionary1, _lib._sel_dictionaryWithCapacity_1, numItems); return NSMutableDictionary._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_312(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + static NSMutableDictionary? dictionaryWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_331(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSMutableDictionary._(_ret, _lib, retain: true, release: true); } - static NSMutableDictionary dictionaryWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_313(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + static NSMutableDictionary? dictionaryWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_332(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSMutableDictionary._(_ret, _lib, retain: true, release: true); } - NSMutableDictionary initWithContentsOfFile_(NSString? path) { - final _ret = _lib._objc_msgSend_312( - _id, _lib._sel_initWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSMutableDictionary? initWithContentsOfFile_(NSString path) { + final _ret = _lib._objc_msgSend_331( + _id, _lib._sel_initWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSMutableDictionary._(_ret, _lib, retain: true, release: true); } - NSMutableDictionary initWithContentsOfURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_313( - _id, _lib._sel_initWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + NSMutableDictionary? initWithContentsOfURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_332(_id, _lib._sel_initWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSMutableDictionary._(_ret, _lib, retain: true, release: true); } /// Create a mutable dictionary which is optimized for dealing with a known set of keys. @@ -68809,11 +70241,21 @@ class NSMutableDictionary extends NSDictionary { /// If keyset is not an object returned by +sharedKeySetForKeys:, an exception is thrown. static NSMutableDictionary dictionaryWithSharedKeySet_( NativeCupertinoHttp _lib, NSObject keyset) { - final _ret = _lib._objc_msgSend_314(_lib._class_NSMutableDictionary1, + final _ret = _lib._objc_msgSend_333(_lib._class_NSMutableDictionary1, _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); return NSMutableDictionary._(_ret, _lib, retain: true, release: true); } + @override + NSMutableDictionary initWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + DartNSUInteger cnt) { + final _ret = _lib._objc_msgSend_98( + _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + static NSMutableDictionary dictionary(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); @@ -68822,7 +70264,7 @@ class NSMutableDictionary extends NSDictionary { static NSMutableDictionary dictionaryWithObject_forKey_( NativeCupertinoHttp _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_173(_lib._class_NSMutableDictionary1, + final _ret = _lib._objc_msgSend_180(_lib._class_NSMutableDictionary1, _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); return NSMutableDictionary._(_ret, _lib, retain: true, release: true); } @@ -68831,47 +70273,72 @@ class NSMutableDictionary extends NSDictionary { NativeCupertinoHttp _lib, ffi.Pointer> objects, ffi.Pointer> keys, - int cnt) { - final _ret = _lib._objc_msgSend_93(_lib._class_NSMutableDictionary1, + DartNSUInteger cnt) { + final _ret = _lib._objc_msgSend_98(_lib._class_NSMutableDictionary1, _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); return NSMutableDictionary._(_ret, _lib, retain: true, release: true); } static NSMutableDictionary dictionaryWithObjectsAndKeys_( NativeCupertinoHttp _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_91(_lib._class_NSMutableDictionary1, + final _ret = _lib._objc_msgSend_149(_lib._class_NSMutableDictionary1, _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); return NSMutableDictionary._(_ret, _lib, retain: true, release: true); } static NSMutableDictionary dictionaryWithDictionary_( - NativeCupertinoHttp _lib, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_174(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSDictionary dict) { + final _ret = _lib._objc_msgSend_181(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithDictionary_1, dict._id); return NSMutableDictionary._(_ret, _lib, retain: true, release: true); } static NSMutableDictionary dictionaryWithObjects_forKeys_( - NativeCupertinoHttp _lib, NSArray? objects, NSArray? keys) { - final _ret = _lib._objc_msgSend_175( - _lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, - objects?._id ?? ffi.nullptr, - keys?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSArray objects, NSArray keys) { + final _ret = _lib._objc_msgSend_182(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithObjects_forKeys_1, objects._id, keys._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableDictionary initWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _lib._objc_msgSend_149( + _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableDictionary initWithDictionary_(NSDictionary otherDictionary) { + final _ret = _lib._objc_msgSend_181( + _id, _lib._sel_initWithDictionary_1, otherDictionary._id); + return NSMutableDictionary._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableDictionary initWithDictionary_copyItems_( + NSDictionary otherDictionary, bool flag) { + final _ret = _lib._objc_msgSend_183(_id, + _lib._sel_initWithDictionary_copyItems_1, otherDictionary._id, flag); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { + final _ret = _lib._objc_msgSend_182( + _id, _lib._sel_initWithObjects_forKeys_1, objects._id, keys._id); return NSMutableDictionary._(_ret, _lib, retain: true, release: true); } /// Reads dictionary stored in NSPropertyList format from the specified url. - static NSDictionary dictionaryWithContentsOfURL_error_( + static NSDictionary? dictionaryWithContentsOfURL_error_( NativeCupertinoHttp _lib, - NSURL? url, + NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_177( - _lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, - url?._id ?? ffi.nullptr, - error); - return NSDictionary._(_ret, _lib, retain: true, release: true); + final _ret = _lib._objc_msgSend_184(_lib._class_NSMutableDictionary1, + _lib._sel_dictionaryWithContentsOfURL_error_1, url._id, error); + return _ret.address == 0 + ? null + : NSDictionary._(_ret, _lib, retain: true, release: true); } /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. @@ -68881,10 +70348,9 @@ class NSMutableDictionary extends NSDictionary { /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. - static NSObject sharedKeySetForKeys_( - NativeCupertinoHttp _lib, NSArray? keys) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableDictionary1, - _lib._sel_sharedKeySetForKeys_1, keys?._id ?? ffi.nullptr); + static NSObject sharedKeySetForKeys_(NativeCupertinoHttp _lib, NSArray keys) { + final _ret = _lib._objc_msgSend_150(_lib._class_NSMutableDictionary1, + _lib._sel_sharedKeySetForKeys_1, keys._id); return NSObject._(_ret, _lib, retain: true, release: true); } @@ -68894,6 +70360,13 @@ class NSMutableDictionary extends NSDictionary { return NSMutableDictionary._(_ret, _lib, retain: false, release: true); } + static NSMutableDictionary allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableDictionary1, _lib._sel_allocWithZone_1, zone); + return NSMutableDictionary._(_ret, _lib, retain: false, release: true); + } + static NSMutableDictionary alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSMutableDictionary1, _lib._sel_alloc1); @@ -68966,9 +70439,9 @@ class NSCachedURLResponse extends NSObject { /// corresponding to the given response. /// @result an initialized NSCachedURLResponse. NSCachedURLResponse initWithResponse_data_( - NSURLResponse? response, NSData? data) { - final _ret = _lib._objc_msgSend_316(_id, _lib._sel_initWithResponse_data_1, - response?._id ?? ffi.nullptr, data?._id ?? ffi.nullptr); + NSURLResponse response, NSData data) { + final _ret = _lib._objc_msgSend_335( + _id, _lib._sel_initWithResponse_data_1, response._id, data._id); return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); } @@ -68984,15 +70457,15 @@ class NSCachedURLResponse extends NSObject { /// @param storagePolicy an NSURLCacheStoragePolicy constant. /// @result an initialized NSCachedURLResponse. NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( - NSURLResponse? response, - NSData? data, + NSURLResponse response, + NSData data, NSDictionary? userInfo, int storagePolicy) { - final _ret = _lib._objc_msgSend_317( + final _ret = _lib._objc_msgSend_336( _id, _lib._sel_initWithResponse_data_userInfo_storagePolicy_1, - response?._id ?? ffi.nullptr, - data?._id ?? ffi.nullptr, + response._id, + data._id, userInfo?._id ?? ffi.nullptr, storagePolicy); return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); @@ -69001,28 +70474,24 @@ class NSCachedURLResponse extends NSObject { /// ! /// @abstract Returns the response wrapped by this instance. /// @result The response wrapped by this instance. - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_318(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); + NSURLResponse get response { + final _ret = _lib._objc_msgSend_337(_id, _lib._sel_response1); + return NSURLResponse._(_ret, _lib, retain: true, release: true); } /// ! /// @abstract Returns the data of the receiver. /// @result The data of the receiver. - NSData? get data { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + NSData get data { + final _ret = _lib._objc_msgSend_54(_id, _lib._sel_data1); + return NSData._(_ret, _lib, retain: true, release: true); } /// ! /// @abstract Returns the userInfo dictionary of the receiver. /// @result The userInfo dictionary of the receiver. NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + final _ret = _lib._objc_msgSend_288(_id, _lib._sel_userInfo1); return _ret.address == 0 ? null : NSDictionary._(_ret, _lib, retain: true, release: true); @@ -69032,7 +70501,13 @@ class NSCachedURLResponse extends NSObject { /// @abstract Returns the NSURLCacheStoragePolicy constant of the receiver. /// @result The NSURLCacheStoragePolicy constant of the receiver. int get storagePolicy { - return _lib._objc_msgSend_319(_id, _lib._sel_storagePolicy1); + return _lib._objc_msgSend_338(_id, _lib._sel_storagePolicy1); + } + + @override + NSCachedURLResponse init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); } static NSCachedURLResponse new1(NativeCupertinoHttp _lib) { @@ -69041,6 +70516,13 @@ class NSCachedURLResponse extends NSObject { return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); } + static NSCachedURLResponse allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSCachedURLResponse1, _lib._sel_allocWithZone_1, zone); + return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); + } + static NSCachedURLResponse alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSCachedURLResponse1, _lib._sel_alloc1); @@ -69081,11 +70563,11 @@ class NSURLResponse extends NSObject { /// @result The initialized NSURLResponse. /// @discussion This is the designated initializer for NSURLResponse. NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - NSURL? URL, NSString? MIMEType, int length, NSString? name) { - final _ret = _lib._objc_msgSend_315( + NSURL URL, NSString? MIMEType, DartNSInteger length, NSString? name) { + final _ret = _lib._objc_msgSend_334( _id, _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, - URL?._id ?? ffi.nullptr, + URL._id, MIMEType?._id ?? ffi.nullptr, length, name?._id ?? ffi.nullptr); @@ -69096,7 +70578,7 @@ class NSURLResponse extends NSObject { /// @abstract Returns the URL of the receiver. /// @result The URL of the receiver. NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_URL1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); @@ -69112,7 +70594,7 @@ class NSURLResponse extends NSObject { /// be made if the origin source did not report any such information. /// @result The MIME type of the receiver. NSString? get MIMEType { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_MIMEType1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_MIMEType1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -69130,7 +70612,7 @@ class NSURLResponse extends NSObject { /// there is no expectation that can be arrived at regarding expected /// content length. int get expectedContentLength { - return _lib._objc_msgSend_82(_id, _lib._sel_expectedContentLength1); + return _lib._objc_msgSend_87(_id, _lib._sel_expectedContentLength1); } /// ! @@ -69143,7 +70625,7 @@ class NSURLResponse extends NSObject { /// @result The name of the text encoding of the receiver, or nil if no /// text encoding was specified. NSString? get textEncodingName { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_textEncodingName1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_textEncodingName1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -69160,18 +70642,31 @@ class NSURLResponse extends NSObject { /// This method always returns a valid filename. /// @result A suggested filename to use if saving the resource to disk. NSString? get suggestedFilename { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedFilename1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_suggestedFilename1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } + @override + NSURLResponse init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLResponse._(_ret, _lib, retain: true, release: true); + } + static NSURLResponse new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); return NSURLResponse._(_ret, _lib, retain: false, release: true); } + static NSURLResponse allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLResponse1, _lib._sel_allocWithZone_1, zone); + return NSURLResponse._(_ret, _lib, retain: false, release: true); + } + static NSURLResponse alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); @@ -69226,12 +70721,10 @@ class NSURLCache extends NSObject { /// shared URL cache. This is to prevent storing cache data from /// becoming unexpectedly unretrievable. /// @result the shared NSURLCache instance. - static NSURLCache? getSharedURLCache(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_320( + static NSURLCache getSharedURLCache(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_339( _lib._class_NSURLCache1, _lib._sel_sharedURLCache1); - return _ret.address == 0 - ? null - : NSURLCache._(_ret, _lib, retain: true, release: true); + return NSURLCache._(_ret, _lib, retain: true, release: true); } /// ! @@ -69258,9 +70751,9 @@ class NSURLCache extends NSObject { /// shared URL cache. This is to prevent storing cache data from /// becoming unexpectedly unretrievable. /// @result the shared NSURLCache instance. - static void setSharedURLCache(NativeCupertinoHttp _lib, NSURLCache? value) { - _lib._objc_msgSend_321(_lib._class_NSURLCache1, - _lib._sel_setSharedURLCache_1, value?._id ?? ffi.nullptr); + static void setSharedURLCache(NativeCupertinoHttp _lib, NSURLCache value) { + return _lib._objc_msgSend_340( + _lib._class_NSURLCache1, _lib._sel_setSharedURLCache_1, value._id); } /// ! @@ -69277,8 +70770,10 @@ class NSURLCache extends NSObject { /// @result an initialized NSURLCache, with the given capacity, backed /// by disk. NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( - int memoryCapacity, int diskCapacity, NSString? path) { - final _ret = _lib._objc_msgSend_322( + DartNSUInteger memoryCapacity, + DartNSUInteger diskCapacity, + NSString? path) { + final _ret = _lib._objc_msgSend_341( _id, _lib._sel_initWithMemoryCapacity_diskCapacity_diskPath_1, memoryCapacity, @@ -69295,8 +70790,10 @@ class NSURLCache extends NSObject { /// @param directoryURL the path to a directory on disk where the cache data is stored. Or nil for default directory. /// @result an initialized NSURLCache, with the given capacity, optionally backed by disk. NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( - int memoryCapacity, int diskCapacity, NSURL? directoryURL) { - final _ret = _lib._objc_msgSend_323( + DartNSUInteger memoryCapacity, + DartNSUInteger diskCapacity, + NSURL? directoryURL) { + final _ret = _lib._objc_msgSend_342( _id, _lib._sel_initWithMemoryCapacity_diskCapacity_directoryURL_1, memoryCapacity, @@ -69315,10 +70812,12 @@ class NSURLCache extends NSObject { /// @result The NSCachedURLResponse stored in the cache with the given /// request, or nil if there is no NSCachedURLResponse stored with the /// given request. - NSCachedURLResponse cachedResponseForRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_339( - _id, _lib._sel_cachedResponseForRequest_1, request?._id ?? ffi.nullptr); - return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); + NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { + final _ret = _lib._objc_msgSend_363( + _id, _lib._sel_cachedResponseForRequest_1, request._id); + return _ret.address == 0 + ? null + : NSCachedURLResponse._(_ret, _lib, retain: true, release: true); } /// ! @@ -69328,12 +70827,9 @@ class NSURLCache extends NSObject { /// @param cachedResponse The cached response to store. /// @param request the NSURLRequest to use as a key for the storage. void storeCachedResponse_forRequest_( - NSCachedURLResponse? cachedResponse, NSURLRequest? request) { - return _lib._objc_msgSend_340( - _id, - _lib._sel_storeCachedResponse_forRequest_1, - cachedResponse?._id ?? ffi.nullptr, - request?._id ?? ffi.nullptr); + NSCachedURLResponse cachedResponse, NSURLRequest request) { + _lib._objc_msgSend_364(_id, _lib._sel_storeCachedResponse_forRequest_1, + cachedResponse._id, request._id); } /// ! @@ -69343,11 +70839,9 @@ class NSURLCache extends NSObject { /// @discussion No action is taken if there is no NSCachedURLResponse /// stored with the given request. /// @param request the NSURLRequest to use as a key for the lookup. - void removeCachedResponseForRequest_(NSURLRequest? request) { - return _lib._objc_msgSend_341( - _id, - _lib._sel_removeCachedResponseForRequest_1, - request?._id ?? ffi.nullptr); + void removeCachedResponseForRequest_(NSURLRequest request) { + _lib._objc_msgSend_365( + _id, _lib._sel_removeCachedResponseForRequest_1, request._id); } /// ! @@ -69355,22 +70849,22 @@ class NSURLCache extends NSObject { /// @abstract Clears the given cache, removing all NSCachedURLResponse /// objects that it stores. void removeAllCachedResponses() { - return _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResponses1); + _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResponses1); } /// ! /// @method removeCachedResponsesSince: /// @abstract Clears the given cache of any cached responses since the provided date. - void removeCachedResponsesSinceDate_(NSDate? date) { - return _lib._objc_msgSend_349(_id, - _lib._sel_removeCachedResponsesSinceDate_1, date?._id ?? ffi.nullptr); + void removeCachedResponsesSinceDate_(NSDate date) { + _lib._objc_msgSend_373( + _id, _lib._sel_removeCachedResponsesSinceDate_1, date._id); } /// ! /// @abstract In-memory capacity of the receiver. /// @discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary. /// @result The in-memory capacity, measured in bytes, for the receiver. - int get memoryCapacity { + DartNSUInteger get memoryCapacity { return _lib._objc_msgSend_12(_id, _lib._sel_memoryCapacity1); } @@ -69378,22 +70872,22 @@ class NSURLCache extends NSObject { /// @abstract In-memory capacity of the receiver. /// @discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary. /// @result The in-memory capacity, measured in bytes, for the receiver. - set memoryCapacity(int value) { - _lib._objc_msgSend_305(_id, _lib._sel_setMemoryCapacity_1, value); + set memoryCapacity(DartNSUInteger value) { + return _lib._objc_msgSend_322(_id, _lib._sel_setMemoryCapacity_1, value); } /// ! /// @abstract The on-disk capacity of the receiver. /// @discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary. - int get diskCapacity { + DartNSUInteger get diskCapacity { return _lib._objc_msgSend_12(_id, _lib._sel_diskCapacity1); } /// ! /// @abstract The on-disk capacity of the receiver. /// @discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary. - set diskCapacity(int value) { - _lib._objc_msgSend_305(_id, _lib._sel_setDiskCapacity_1, value); + set diskCapacity(DartNSUInteger value) { + return _lib._objc_msgSend_322(_id, _lib._sel_setDiskCapacity_1, value); } /// ! @@ -69402,7 +70896,7 @@ class NSURLCache extends NSObject { /// @discussion This size, measured in bytes, indicates the current /// usage of the in-memory cache. /// @result the current usage of the in-memory cache of the receiver. - int get currentMemoryUsage { + DartNSUInteger get currentMemoryUsage { return _lib._objc_msgSend_12(_id, _lib._sel_currentMemoryUsage1); } @@ -69412,33 +70906,35 @@ class NSURLCache extends NSObject { /// @discussion This size, measured in bytes, indicates the current /// usage of the on-disk cache. /// @result the current usage of the on-disk cache of the receiver. - int get currentDiskUsage { + DartNSUInteger get currentDiskUsage { return _lib._objc_msgSend_12(_id, _lib._sel_currentDiskUsage1); } void storeCachedResponse_forDataTask_( - NSCachedURLResponse? cachedResponse, NSURLSessionDataTask? dataTask) { - return _lib._objc_msgSend_370( - _id, - _lib._sel_storeCachedResponse_forDataTask_1, - cachedResponse?._id ?? ffi.nullptr, - dataTask?._id ?? ffi.nullptr); + NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { + _lib._objc_msgSend_398(_id, _lib._sel_storeCachedResponse_forDataTask_1, + cachedResponse._id, dataTask._id); } void getCachedResponseForDataTask_completionHandler_( - NSURLSessionDataTask? dataTask, ObjCBlock19 completionHandler) { - return _lib._objc_msgSend_371( + NSURLSessionDataTask dataTask, + ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { + _lib._objc_msgSend_399( _id, _lib._sel_getCachedResponseForDataTask_completionHandler_1, - dataTask?._id ?? ffi.nullptr, + dataTask._id, completionHandler._id); } - void removeCachedResponseForDataTask_(NSURLSessionDataTask? dataTask) { - return _lib._objc_msgSend_372( - _id, - _lib._sel_removeCachedResponseForDataTask_1, - dataTask?._id ?? ffi.nullptr); + void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { + _lib._objc_msgSend_400( + _id, _lib._sel_removeCachedResponseForDataTask_1, dataTask._id); + } + + @override + NSURLCache init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLCache._(_ret, _lib, retain: true, release: true); } static NSURLCache new1(NativeCupertinoHttp _lib) { @@ -69446,6 +70942,13 @@ class NSURLCache extends NSObject { return NSURLCache._(_ret, _lib, retain: false, release: true); } + static NSURLCache allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLCache1, _lib._sel_allocWithZone_1, zone); + return NSURLCache._(_ret, _lib, retain: false, release: true); + } + static NSURLCache alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_alloc1); @@ -69485,9 +70988,9 @@ class NSURLRequest extends NSObject { /// seconds). /// @param URL The URL for the request. /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL? URL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSURLRequest1, - _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL URL) { + final _ret = _lib._objc_msgSend_211( + _lib._class_NSURLRequest1, _lib._sel_requestWithURL_1, URL._id); return NSURLRequest._(_ret, _lib, retain: true, release: true); } @@ -69512,13 +71015,13 @@ class NSURLRequest extends NSObject { /// @result A newly-created and autoreleased NSURLRequest instance. static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( NativeCupertinoHttp _lib, - NSURL? URL, + NSURL URL, int cachePolicy, - double timeoutInterval) { - final _ret = _lib._objc_msgSend_324( + DartNSTimeInterval timeoutInterval) { + final _ret = _lib._objc_msgSend_343( _lib._class_NSURLRequest1, _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, + URL._id, cachePolicy, timeoutInterval); return NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -69532,9 +71035,8 @@ class NSURLRequest extends NSObject { /// seconds). /// @param URL The URL for the request. /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_(NSURL? URL) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithURL_1, URL?._id ?? ffi.nullptr); + NSURLRequest initWithURL_(NSURL URL) { + final _ret = _lib._objc_msgSend_211(_id, _lib._sel_initWithURL_1, URL._id); return NSURLRequest._(_ret, _lib, retain: true, release: true); } @@ -69551,11 +71053,11 @@ class NSURLRequest extends NSObject { /// timeout intervals. /// @result An initialized NSURLRequest. NSURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL? URL, int cachePolicy, double timeoutInterval) { - final _ret = _lib._objc_msgSend_324( + NSURL URL, int cachePolicy, DartNSTimeInterval timeoutInterval) { + final _ret = _lib._objc_msgSend_343( _id, _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, + URL._id, cachePolicy, timeoutInterval); return NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -69565,7 +71067,7 @@ class NSURLRequest extends NSObject { /// @abstract Returns the URL of the receiver. /// @result The URL of the receiver. NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_URL1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); @@ -69575,7 +71077,7 @@ class NSURLRequest extends NSObject { /// @abstract Returns the cache policy of the receiver. /// @result The cache policy of the receiver. int get cachePolicy { - return _lib._objc_msgSend_325(_id, _lib._sel_cachePolicy1); + return _lib._objc_msgSend_344(_id, _lib._sel_cachePolicy1); } /// ! @@ -69591,8 +71093,10 @@ class NSURLRequest extends NSObject { /// is considered to have timed out. This timeout interval is measured /// in seconds. /// @result The timeout interval of the receiver. - double get timeoutInterval { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); + DartNSTimeInterval get timeoutInterval { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_timeoutInterval1) + : _lib._objc_msgSend_90(_id, _lib._sel_timeoutInterval1); } /// ! @@ -69603,7 +71107,7 @@ class NSURLRequest extends NSObject { /// See setMainDocumentURL: /// @result The main document URL. NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_mainDocumentURL1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); @@ -69615,7 +71119,7 @@ class NSURLRequest extends NSObject { /// not explicitly set a networkServiceType (using the setNetworkServiceType method). /// @result The NSURLRequestNetworkServiceType associated with this request. int get networkServiceType { - return _lib._objc_msgSend_326(_id, _lib._sel_networkServiceType1); + return _lib._objc_msgSend_345(_id, _lib._sel_networkServiceType1); } /// ! @@ -69661,7 +71165,7 @@ class NSURLRequest extends NSObject { /// have not explicitly set an attribution. /// @result The NSURLRequestAttribution associated with this request. int get attribution { - return _lib._objc_msgSend_327(_id, _lib._sel_attribution1); + return _lib._objc_msgSend_346(_id, _lib._sel_attribution1); } /// ! @@ -69676,7 +71180,7 @@ class NSURLRequest extends NSObject { /// @abstract Returns the HTTP request method of the receiver. /// @result the HTTP request method of the receiver. NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_HTTPMethod1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -69688,7 +71192,7 @@ class NSURLRequest extends NSObject { /// @result a dictionary containing all the HTTP header fields of the /// receiver. NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); + final _ret = _lib._objc_msgSend_288(_id, _lib._sel_allHTTPHeaderFields1); return _ret.address == 0 ? null : NSDictionary._(_ret, _lib, retain: true, release: true); @@ -69703,10 +71207,12 @@ class NSURLRequest extends NSObject { /// (case-insensitive). /// @result the value associated with the given header field, or nil if /// there is no value associated with the given header field. - NSString valueForHTTPHeaderField_(NSString? field) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + NSString? valueForHTTPHeaderField_(NSString field) { + final _ret = _lib._objc_msgSend_347( + _id, _lib._sel_valueForHTTPHeaderField_1, field._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } /// ! @@ -69715,7 +71221,7 @@ class NSURLRequest extends NSObject { /// in done in an HTTP POST request. /// @result The request body data of the receiver. NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_HTTPBody1); return _ret.address == 0 ? null : NSData._(_ret, _lib, retain: true, release: true); @@ -69732,7 +71238,7 @@ class NSURLRequest extends NSObject { /// NSCoding protocol /// @result The request body stream of the receiver. NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_338(_id, _lib._sel_HTTPBodyStream1); + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_HTTPBodyStream1); return _ret.address == 0 ? null : NSInputStream._(_ret, _lib, retain: true, release: true); @@ -69758,12 +71264,25 @@ class NSURLRequest extends NSObject { return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); } + @override + NSURLRequest init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + static NSURLRequest new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); return NSURLRequest._(_ret, _lib, retain: false, release: true); } + static NSURLRequest allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLRequest1, _lib._sel_allocWithZone_1, zone); + return NSURLRequest._(_ret, _lib, retain: false, release: true); + } + static NSURLRequest alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); @@ -69828,6 +71347,7 @@ abstract class NSURLRequestCachePolicy { } typedef NSTimeInterval = ffi.Double; +typedef DartNSTimeInterval = double; /// ! /// @enum NSURLRequestNetworkServiceType @@ -69926,13 +71446,14 @@ class NSInputStream extends NSStream { obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); } - int read_maxLength_(ffi.Pointer buffer, int len) { - return _lib._objc_msgSend_332(_id, _lib._sel_read_maxLength_1, buffer, len); + DartNSInteger read_maxLength_( + ffi.Pointer buffer, DartNSUInteger len) { + return _lib._objc_msgSend_354(_id, _lib._sel_read_maxLength_1, buffer, len); } bool getBuffer_length_( ffi.Pointer> buffer, ffi.Pointer len) { - return _lib._objc_msgSend_337( + return _lib._objc_msgSend_360( _id, _lib._sel_getBuffer_length_1, buffer, len); } @@ -69940,55 +71461,64 @@ class NSInputStream extends NSStream { return _lib._objc_msgSend_11(_id, _lib._sel_hasBytesAvailable1); } - NSInputStream initWithData_(NSData? data) { - final _ret = _lib._objc_msgSend_217( - _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + NSInputStream initWithData_(NSData data) { + final _ret = + _lib._objc_msgSend_228(_id, _lib._sel_initWithData_1, data._id); return NSInputStream._(_ret, _lib, retain: true, release: true); } - NSInputStream initWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithURL_1, url?._id ?? ffi.nullptr); - return NSInputStream._(_ret, _lib, retain: true, release: true); + NSInputStream? initWithURL_(NSURL url) { + final _ret = _lib._objc_msgSend_226(_id, _lib._sel_initWithURL_1, url._id); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); } - NSInputStream initWithFileAtPath_(NSString? path) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithFileAtPath_1, path?._id ?? ffi.nullptr); - return NSInputStream._(_ret, _lib, retain: true, release: true); + NSInputStream? initWithFileAtPath_(NSString path) { + final _ret = + _lib._objc_msgSend_49(_id, _lib._sel_initWithFileAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); } - static NSInputStream inputStreamWithData_( - NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217(_lib._class_NSInputStream1, - _lib._sel_inputStreamWithData_1, data?._id ?? ffi.nullptr); - return NSInputStream._(_ret, _lib, retain: true, release: true); + static NSInputStream? inputStreamWithData_( + NativeCupertinoHttp _lib, NSData data) { + final _ret = _lib._objc_msgSend_361( + _lib._class_NSInputStream1, _lib._sel_inputStreamWithData_1, data._id); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); } - static NSInputStream inputStreamWithFileAtPath_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSInputStream1, - _lib._sel_inputStreamWithFileAtPath_1, path?._id ?? ffi.nullptr); - return NSInputStream._(_ret, _lib, retain: true, release: true); + static NSInputStream? inputStreamWithFileAtPath_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_49(_lib._class_NSInputStream1, + _lib._sel_inputStreamWithFileAtPath_1, path._id); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); } - static NSInputStream inputStreamWithURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSInputStream1, - _lib._sel_inputStreamWithURL_1, url?._id ?? ffi.nullptr); - return NSInputStream._(_ret, _lib, retain: true, release: true); + static NSInputStream? inputStreamWithURL_( + NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_226( + _lib._class_NSInputStream1, _lib._sel_inputStreamWithURL_1, url._id); + return _ret.address == 0 + ? null + : NSInputStream._(_ret, _lib, retain: true, release: true); } static void getStreamsToHostWithName_port_inputStream_outputStream_( NativeCupertinoHttp _lib, - NSString? hostname, - int port, + NSString hostname, + DartNSInteger port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_334( + _lib._objc_msgSend_357( _lib._class_NSInputStream1, _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname?._id ?? ffi.nullptr, + hostname._id, port, inputStream, outputStream); @@ -69996,14 +71526,14 @@ class NSInputStream extends NSStream { static void getStreamsToHost_port_inputStream_outputStream_( NativeCupertinoHttp _lib, - NSHost? host, - int port, + NSHost host, + DartNSInteger port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_335( + _lib._objc_msgSend_358( _lib._class_NSInputStream1, _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host?._id ?? ffi.nullptr, + host._id, port, inputStream, outputStream); @@ -70011,10 +71541,10 @@ class NSInputStream extends NSStream { static void getBoundStreamsWithBufferSize_inputStream_outputStream_( NativeCupertinoHttp _lib, - int bufferSize, + DartNSUInteger bufferSize, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_336( + _lib._objc_msgSend_359( _lib._class_NSInputStream1, _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, bufferSize, @@ -70022,12 +71552,25 @@ class NSInputStream extends NSStream { outputStream); } + @override + NSInputStream init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSInputStream._(_ret, _lib, retain: true, release: true); + } + static NSInputStream new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_new1); return NSInputStream._(_ret, _lib, retain: false, release: true); } + static NSInputStream allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSInputStream1, _lib._sel_allocWithZone_1, zone); + return NSInputStream._(_ret, _lib, retain: false, release: true); + } + static NSInputStream alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_alloc1); @@ -70059,51 +71602,54 @@ class NSStream extends NSObject { } void open() { - return _lib._objc_msgSend_1(_id, _lib._sel_open1); + _lib._objc_msgSend_1(_id, _lib._sel_open1); } void close() { - return _lib._objc_msgSend_1(_id, _lib._sel_close1); + _lib._objc_msgSend_1(_id, _lib._sel_close1); } NSObject? get delegate { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); + final _ret = _lib._objc_msgSend_61(_id, _lib._sel_delegate1); return _ret.address == 0 ? null : NSObject._(_ret, _lib, retain: true, release: true); } set delegate(NSObject? value) { - _lib._objc_msgSend_328( + return _lib._objc_msgSend_349( _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); } - NSObject propertyForKey_(NSStreamPropertyKey key) { - final _ret = _lib._objc_msgSend_42(_id, _lib._sel_propertyForKey_1, key); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? propertyForKey_(DartNSStreamPropertyKey key) { + final _ret = + _lib._objc_msgSend_49(_id, _lib._sel_propertyForKey_1, key._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - bool setProperty_forKey_(NSObject property, NSStreamPropertyKey key) { - return _lib._objc_msgSend_199( - _id, _lib._sel_setProperty_forKey_1, property._id, key); + bool setProperty_forKey_(NSObject? property, DartNSStreamPropertyKey key) { + return _lib._objc_msgSend_350(_id, _lib._sel_setProperty_forKey_1, + property?._id ?? ffi.nullptr, key._id); } - void scheduleInRunLoop_forMode_(NSRunLoop? aRunLoop, NSRunLoopMode mode) { - return _lib._objc_msgSend_329(_id, _lib._sel_scheduleInRunLoop_forMode_1, - aRunLoop?._id ?? ffi.nullptr, mode); + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, DartNSRunLoopMode mode) { + _lib._objc_msgSend_351( + _id, _lib._sel_scheduleInRunLoop_forMode_1, aRunLoop._id, mode._id); } - void removeFromRunLoop_forMode_(NSRunLoop? aRunLoop, NSRunLoopMode mode) { - return _lib._objc_msgSend_329(_id, _lib._sel_removeFromRunLoop_forMode_1, - aRunLoop?._id ?? ffi.nullptr, mode); + void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, DartNSRunLoopMode mode) { + _lib._objc_msgSend_351( + _id, _lib._sel_removeFromRunLoop_forMode_1, aRunLoop._id, mode._id); } int get streamStatus { - return _lib._objc_msgSend_330(_id, _lib._sel_streamStatus1); + return _lib._objc_msgSend_352(_id, _lib._sel_streamStatus1); } NSError? get streamError { - final _ret = _lib._objc_msgSend_331(_id, _lib._sel_streamError1); + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_streamError1); return _ret.address == 0 ? null : NSError._(_ret, _lib, retain: true, release: true); @@ -70111,14 +71657,14 @@ class NSStream extends NSObject { static void getStreamsToHostWithName_port_inputStream_outputStream_( NativeCupertinoHttp _lib, - NSString? hostname, - int port, + NSString hostname, + DartNSInteger port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_334( + _lib._objc_msgSend_357( _lib._class_NSStream1, _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname?._id ?? ffi.nullptr, + hostname._id, port, inputStream, outputStream); @@ -70126,14 +71672,14 @@ class NSStream extends NSObject { static void getStreamsToHost_port_inputStream_outputStream_( NativeCupertinoHttp _lib, - NSHost? host, - int port, + NSHost host, + DartNSInteger port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_335( + _lib._objc_msgSend_358( _lib._class_NSStream1, _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host?._id ?? ffi.nullptr, + host._id, port, inputStream, outputStream); @@ -70141,10 +71687,10 @@ class NSStream extends NSObject { static void getBoundStreamsWithBufferSize_inputStream_outputStream_( NativeCupertinoHttp _lib, - int bufferSize, + DartNSUInteger bufferSize, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_336( + _lib._objc_msgSend_359( _lib._class_NSStream1, _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, bufferSize, @@ -70152,11 +71698,24 @@ class NSStream extends NSObject { outputStream); } + @override + NSStream init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSStream._(_ret, _lib, retain: true, release: true); + } + static NSStream new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_new1); return NSStream._(_ret, _lib, retain: false, release: true); } + static NSStream allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSStream1, _lib._sel_allocWithZone_1, zone); + return NSStream._(_ret, _lib, retain: false, release: true); + } + static NSStream alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_alloc1); return NSStream._(_ret, _lib, retain: false, release: true); @@ -70164,6 +71723,7 @@ class NSStream extends NSObject { } typedef NSStreamPropertyKey = ffi.Pointer; +typedef DartNSStreamPropertyKey = NSString; class NSRunLoop extends _ObjCWrapper { NSRunLoop._(ffi.Pointer id, NativeCupertinoHttp lib, @@ -70190,6 +71750,7 @@ class NSRunLoop extends _ObjCWrapper { } typedef NSRunLoopMode = ffi.Pointer; +typedef DartNSRunLoopMode = NSString; abstract class NSStreamStatus { static const int NSStreamStatusNotOpen = 0; @@ -70225,8 +71786,9 @@ class NSOutputStream extends NSStream { obj._lib._class_NSOutputStream1); } - int write_maxLength_(ffi.Pointer buffer, int len) { - return _lib._objc_msgSend_332( + DartNSInteger write_maxLength_( + ffi.Pointer buffer, DartNSUInteger len) { + return _lib._objc_msgSend_354( _id, _lib._sel_write_maxLength_1, buffer, len); } @@ -70240,22 +71802,26 @@ class NSOutputStream extends NSStream { } NSOutputStream initToBuffer_capacity_( - ffi.Pointer buffer, int capacity) { - final _ret = _lib._objc_msgSend_333( + ffi.Pointer buffer, DartNSUInteger capacity) { + final _ret = _lib._objc_msgSend_355( _id, _lib._sel_initToBuffer_capacity_1, buffer, capacity); return NSOutputStream._(_ret, _lib, retain: true, release: true); } - NSOutputStream initWithURL_append_(NSURL? url, bool shouldAppend) { - final _ret = _lib._objc_msgSend_206(_id, _lib._sel_initWithURL_append_1, - url?._id ?? ffi.nullptr, shouldAppend); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + NSOutputStream? initWithURL_append_(NSURL url, bool shouldAppend) { + final _ret = _lib._objc_msgSend_356( + _id, _lib._sel_initWithURL_append_1, url._id, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream._(_ret, _lib, retain: true, release: true); } - NSOutputStream initToFileAtPath_append_(NSString? path, bool shouldAppend) { - final _ret = _lib._objc_msgSend_41(_id, _lib._sel_initToFileAtPath_append_1, - path?._id ?? ffi.nullptr, shouldAppend); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + NSOutputStream? initToFileAtPath_append_(NSString path, bool shouldAppend) { + final _ret = _lib._objc_msgSend_51( + _id, _lib._sel_initToFileAtPath_append_1, path._id, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream._(_ret, _lib, retain: true, release: true); } static NSOutputStream outputStreamToMemory(NativeCupertinoHttp _lib) { @@ -70264,43 +71830,39 @@ class NSOutputStream extends NSStream { return NSOutputStream._(_ret, _lib, retain: true, release: true); } - static NSOutputStream outputStreamToBuffer_capacity_( - NativeCupertinoHttp _lib, ffi.Pointer buffer, int capacity) { - final _ret = _lib._objc_msgSend_333(_lib._class_NSOutputStream1, + static NSOutputStream outputStreamToBuffer_capacity_(NativeCupertinoHttp _lib, + ffi.Pointer buffer, DartNSUInteger capacity) { + final _ret = _lib._objc_msgSend_355(_lib._class_NSOutputStream1, _lib._sel_outputStreamToBuffer_capacity_1, buffer, capacity); return NSOutputStream._(_ret, _lib, retain: true, release: true); } static NSOutputStream outputStreamToFileAtPath_append_( - NativeCupertinoHttp _lib, NSString? path, bool shouldAppend) { - final _ret = _lib._objc_msgSend_41( - _lib._class_NSOutputStream1, - _lib._sel_outputStreamToFileAtPath_append_1, - path?._id ?? ffi.nullptr, - shouldAppend); + NativeCupertinoHttp _lib, NSString path, bool shouldAppend) { + final _ret = _lib._objc_msgSend_41(_lib._class_NSOutputStream1, + _lib._sel_outputStreamToFileAtPath_append_1, path._id, shouldAppend); return NSOutputStream._(_ret, _lib, retain: true, release: true); } - static NSOutputStream outputStreamWithURL_append_( - NativeCupertinoHttp _lib, NSURL? url, bool shouldAppend) { - final _ret = _lib._objc_msgSend_206( - _lib._class_NSOutputStream1, - _lib._sel_outputStreamWithURL_append_1, - url?._id ?? ffi.nullptr, - shouldAppend); - return NSOutputStream._(_ret, _lib, retain: true, release: true); + static NSOutputStream? outputStreamWithURL_append_( + NativeCupertinoHttp _lib, NSURL url, bool shouldAppend) { + final _ret = _lib._objc_msgSend_356(_lib._class_NSOutputStream1, + _lib._sel_outputStreamWithURL_append_1, url._id, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream._(_ret, _lib, retain: true, release: true); } static void getStreamsToHostWithName_port_inputStream_outputStream_( NativeCupertinoHttp _lib, - NSString? hostname, - int port, + NSString hostname, + DartNSInteger port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_334( + _lib._objc_msgSend_357( _lib._class_NSOutputStream1, _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname?._id ?? ffi.nullptr, + hostname._id, port, inputStream, outputStream); @@ -70308,14 +71870,14 @@ class NSOutputStream extends NSStream { static void getStreamsToHost_port_inputStream_outputStream_( NativeCupertinoHttp _lib, - NSHost? host, - int port, + NSHost host, + DartNSInteger port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_335( + _lib._objc_msgSend_358( _lib._class_NSOutputStream1, _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host?._id ?? ffi.nullptr, + host._id, port, inputStream, outputStream); @@ -70323,10 +71885,10 @@ class NSOutputStream extends NSStream { static void getBoundStreamsWithBufferSize_inputStream_outputStream_( NativeCupertinoHttp _lib, - int bufferSize, + DartNSUInteger bufferSize, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_336( + _lib._objc_msgSend_359( _lib._class_NSOutputStream1, _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, bufferSize, @@ -70334,12 +71896,25 @@ class NSOutputStream extends NSStream { outputStream); } + @override + NSOutputStream init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSOutputStream._(_ret, _lib, retain: true, release: true); + } + static NSOutputStream new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_new1); return NSOutputStream._(_ret, _lib, retain: false, release: true); } + static NSOutputStream allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSOutputStream1, _lib._sel_allocWithZone_1, zone); + return NSOutputStream._(_ret, _lib, retain: false, release: true); + } + static NSOutputStream alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_alloc1); @@ -70394,9 +71969,11 @@ class NSDate extends NSObject { obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); } - double get timeIntervalSinceReferenceDate { - return _lib._objc_msgSend_85( - _id, _lib._sel_timeIntervalSinceReferenceDate1); + DartNSTimeInterval get timeIntervalSinceReferenceDate { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_90_fpret( + _id, _lib._sel_timeIntervalSinceReferenceDate1) + : _lib._objc_msgSend_90(_id, _lib._sel_timeIntervalSinceReferenceDate1); } @override @@ -70405,75 +71982,78 @@ class NSDate extends NSObject { return NSDate._(_ret, _lib, retain: true, release: true); } - NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _lib._objc_msgSend_342( + NSDate initWithTimeIntervalSinceReferenceDate_(DartNSTimeInterval ti) { + final _ret = _lib._objc_msgSend_366( _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); return NSDate._(_ret, _lib, retain: true, release: true); } - NSDate initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSDate._(_ret, _lib, retain: true, release: true); + NSDate? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSDate._(_ret, _lib, retain: true, release: true); } - double timeIntervalSinceDate_(NSDate? anotherDate) { - return _lib._objc_msgSend_343(_id, _lib._sel_timeIntervalSinceDate_1, - anotherDate?._id ?? ffi.nullptr); + DartNSTimeInterval timeIntervalSinceDate_(NSDate anotherDate) { + return _lib._objc_msgSend_367( + _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id); } - double get timeIntervalSinceNow { - return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSinceNow1); + DartNSTimeInterval get timeIntervalSinceNow { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_timeIntervalSinceNow1) + : _lib._objc_msgSend_90(_id, _lib._sel_timeIntervalSinceNow1); } - double get timeIntervalSince1970 { - return _lib._objc_msgSend_85(_id, _lib._sel_timeIntervalSince19701); + DartNSTimeInterval get timeIntervalSince1970 { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_timeIntervalSince19701) + : _lib._objc_msgSend_90(_id, _lib._sel_timeIntervalSince19701); } - NSObject addTimeInterval_(double seconds) { + NSObject addTimeInterval_(DartNSTimeInterval seconds) { final _ret = - _lib._objc_msgSend_342(_id, _lib._sel_addTimeInterval_1, seconds); + _lib._objc_msgSend_366(_id, _lib._sel_addTimeInterval_1, seconds); return NSObject._(_ret, _lib, retain: true, release: true); } - NSDate dateByAddingTimeInterval_(double ti) { + NSDate dateByAddingTimeInterval_(DartNSTimeInterval ti) { final _ret = - _lib._objc_msgSend_342(_id, _lib._sel_dateByAddingTimeInterval_1, ti); + _lib._objc_msgSend_366(_id, _lib._sel_dateByAddingTimeInterval_1, ti); return NSDate._(_ret, _lib, retain: true, release: true); } - NSDate earlierDate_(NSDate? anotherDate) { - final _ret = _lib._objc_msgSend_344( - _id, _lib._sel_earlierDate_1, anotherDate?._id ?? ffi.nullptr); + NSDate earlierDate_(NSDate anotherDate) { + final _ret = + _lib._objc_msgSend_368(_id, _lib._sel_earlierDate_1, anotherDate._id); return NSDate._(_ret, _lib, retain: true, release: true); } - NSDate laterDate_(NSDate? anotherDate) { - final _ret = _lib._objc_msgSend_344( - _id, _lib._sel_laterDate_1, anotherDate?._id ?? ffi.nullptr); + NSDate laterDate_(NSDate anotherDate) { + final _ret = + _lib._objc_msgSend_368(_id, _lib._sel_laterDate_1, anotherDate._id); return NSDate._(_ret, _lib, retain: true, release: true); } - int compare_(NSDate? other) { - return _lib._objc_msgSend_345( - _id, _lib._sel_compare_1, other?._id ?? ffi.nullptr); + int compare_(NSDate other) { + return _lib._objc_msgSend_369(_id, _lib._sel_compare_1, other._id); } - bool isEqualToDate_(NSDate? otherDate) { - return _lib._objc_msgSend_346( - _id, _lib._sel_isEqualToDate_1, otherDate?._id ?? ffi.nullptr); + bool isEqualToDate_(NSDate otherDate) { + return _lib._objc_msgSend_370( + _id, _lib._sel_isEqualToDate_1, otherDate._id); } - NSString? get description { + NSString get description { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - NSString descriptionWithLocale_(NSObject locale) { - final _ret = _lib._objc_msgSend_88( - _id, _lib._sel_descriptionWithLocale_1, locale._id); + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _lib._objc_msgSend_93( + _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); return NSString._(_ret, _lib, retain: true, release: true); } @@ -70483,77 +72063,66 @@ class NSDate extends NSObject { } static NSDate dateWithTimeIntervalSinceNow_( - NativeCupertinoHttp _lib, double secs) { - final _ret = _lib._objc_msgSend_342( + NativeCupertinoHttp _lib, DartNSTimeInterval secs) { + final _ret = _lib._objc_msgSend_366( _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); return NSDate._(_ret, _lib, retain: true, release: true); } static NSDate dateWithTimeIntervalSinceReferenceDate_( - NativeCupertinoHttp _lib, double ti) { - final _ret = _lib._objc_msgSend_342(_lib._class_NSDate1, + NativeCupertinoHttp _lib, DartNSTimeInterval ti) { + final _ret = _lib._objc_msgSend_366(_lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); return NSDate._(_ret, _lib, retain: true, release: true); } static NSDate dateWithTimeIntervalSince1970_( - NativeCupertinoHttp _lib, double secs) { - final _ret = _lib._objc_msgSend_342( + NativeCupertinoHttp _lib, DartNSTimeInterval secs) { + final _ret = _lib._objc_msgSend_366( _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); return NSDate._(_ret, _lib, retain: true, release: true); } static NSDate dateWithTimeInterval_sinceDate_( - NativeCupertinoHttp _lib, double secsToBeAdded, NSDate? date) { - final _ret = _lib._objc_msgSend_347( - _lib._class_NSDate1, - _lib._sel_dateWithTimeInterval_sinceDate_1, - secsToBeAdded, - date?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, DartNSTimeInterval secsToBeAdded, NSDate date) { + final _ret = _lib._objc_msgSend_371(_lib._class_NSDate1, + _lib._sel_dateWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); return NSDate._(_ret, _lib, retain: true, release: true); } - static NSDate? getDistantFuture(NativeCupertinoHttp _lib) { + static NSDate getDistantFuture(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_348(_lib._class_NSDate1, _lib._sel_distantFuture1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_372(_lib._class_NSDate1, _lib._sel_distantFuture1); + return NSDate._(_ret, _lib, retain: true, release: true); } - static NSDate? getDistantPast(NativeCupertinoHttp _lib) { + static NSDate getDistantPast(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_348(_lib._class_NSDate1, _lib._sel_distantPast1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_372(_lib._class_NSDate1, _lib._sel_distantPast1); + return NSDate._(_ret, _lib, retain: true, release: true); } - static NSDate? getNow(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_348(_lib._class_NSDate1, _lib._sel_now1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + static NSDate getNow(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_372(_lib._class_NSDate1, _lib._sel_now1); + return NSDate._(_ret, _lib, retain: true, release: true); } - NSDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _lib._objc_msgSend_342( + NSDate initWithTimeIntervalSinceNow_(DartNSTimeInterval secs) { + final _ret = _lib._objc_msgSend_366( _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); return NSDate._(_ret, _lib, retain: true, release: true); } - NSDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _lib._objc_msgSend_342( + NSDate initWithTimeIntervalSince1970_(DartNSTimeInterval secs) { + final _ret = _lib._objc_msgSend_366( _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); return NSDate._(_ret, _lib, retain: true, release: true); } - NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate? date) { - final _ret = _lib._objc_msgSend_347( - _id, - _lib._sel_initWithTimeInterval_sinceDate_1, - secsToBeAdded, - date?._id ?? ffi.nullptr); + NSDate initWithTimeInterval_sinceDate_( + DartNSTimeInterval secsToBeAdded, NSDate date) { + final _ret = _lib._objc_msgSend_371(_id, + _lib._sel_initWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); return NSDate._(_ret, _lib, retain: true, release: true); } @@ -70562,6 +72131,13 @@ class NSDate extends NSObject { return NSDate._(_ret, _lib, retain: false, release: true); } + static NSDate allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSDate1, _lib._sel_allocWithZone_1, zone); + return NSDate._(_ret, _lib, retain: false, release: true); + } + static NSDate alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); return NSDate._(_ret, _lib, retain: false, release: true); @@ -70604,6 +72180,13 @@ class NSURLSessionDataTask extends NSURLSessionTask { return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); } + static NSURLSessionDataTask allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSessionDataTask1, _lib._sel_allocWithZone_1, zone); + return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); + } + static NSURLSessionDataTask alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); @@ -70638,13 +72221,13 @@ class NSURLSessionTask extends NSObject { } /// an identifier for this task, assigned by and unique to the owning session - int get taskIdentifier { + DartNSUInteger get taskIdentifier { return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); } /// may be nil if this is a stream task NSURLRequest? get originalRequest { - final _ret = _lib._objc_msgSend_350(_id, _lib._sel_originalRequest1); + final _ret = _lib._objc_msgSend_374(_id, _lib._sel_originalRequest1); return _ret.address == 0 ? null : NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -70652,7 +72235,7 @@ class NSURLSessionTask extends NSObject { /// may differ from originalRequest due to http server redirection NSURLRequest? get currentRequest { - final _ret = _lib._objc_msgSend_350(_id, _lib._sel_currentRequest1); + final _ret = _lib._objc_msgSend_374(_id, _lib._sel_currentRequest1); return _ret.address == 0 ? null : NSURLRequest._(_ret, _lib, retain: true, release: true); @@ -70660,7 +72243,7 @@ class NSURLSessionTask extends NSObject { /// may be nil if no response has been received NSURLResponse? get response { - final _ret = _lib._objc_msgSend_318(_id, _lib._sel_response1); + final _ret = _lib._objc_msgSend_375(_id, _lib._sel_response1); return _ret.address == 0 ? null : NSURLResponse._(_ret, _lib, retain: true, release: true); @@ -70674,7 +72257,7 @@ class NSURLSessionTask extends NSObject { /// Delegate is strongly referenced until the task completes, after which it is /// reset to `nil`. NSObject? get delegate { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); + final _ret = _lib._objc_msgSend_61(_id, _lib._sel_delegate1); return _ret.address == 0 ? null : NSObject._(_ret, _lib, retain: true, release: true); @@ -70688,17 +72271,15 @@ class NSURLSessionTask extends NSObject { /// Delegate is strongly referenced until the task completes, after which it is /// reset to `nil`. set delegate(NSObject? value) { - _lib._objc_msgSend_328( + return _lib._objc_msgSend_349( _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); } /// NSProgress object which represents the task progress. /// It can be used for task progress tracking. - NSProgress? get progress { - final _ret = _lib._objc_msgSend_351(_id, _lib._sel_progress1); - return _ret.address == 0 - ? null - : NSProgress._(_ret, _lib, retain: true, release: true); + NSProgress get progress { + final _ret = _lib._objc_msgSend_392(_id, _lib._sel_progress1); + return NSProgress._(_ret, _lib, retain: true, release: true); } /// Start the network load for this task no earlier than the specified date. If @@ -70707,7 +72288,7 @@ class NSURLSessionTask extends NSObject { /// Only applies to tasks created from background NSURLSession instances; has no /// effect for tasks created from other session types. NSDate? get earliestBeginDate { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_earliestBeginDate1); + final _ret = _lib._objc_msgSend_393(_id, _lib._sel_earliestBeginDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -70719,7 +72300,7 @@ class NSURLSessionTask extends NSObject { /// Only applies to tasks created from background NSURLSession instances; has no /// effect for tasks created from other session types. set earliestBeginDate(NSDate? value) { - _lib._objc_msgSend_367( + return _lib._objc_msgSend_394( _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); } @@ -70727,7 +72308,7 @@ class NSURLSessionTask extends NSObject { /// be sent and received by this task. These values are used by system scheduling /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. int get countOfBytesClientExpectsToSend { - return _lib._objc_msgSend_358( + return _lib._objc_msgSend_383( _id, _lib._sel_countOfBytesClientExpectsToSend1); } @@ -70735,45 +72316,45 @@ class NSURLSessionTask extends NSObject { /// be sent and received by this task. These values are used by system scheduling /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. set countOfBytesClientExpectsToSend(int value) { - _lib._objc_msgSend_359( + return _lib._objc_msgSend_384( _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); } int get countOfBytesClientExpectsToReceive { - return _lib._objc_msgSend_358( + return _lib._objc_msgSend_383( _id, _lib._sel_countOfBytesClientExpectsToReceive1); } set countOfBytesClientExpectsToReceive(int value) { - _lib._objc_msgSend_359( + return _lib._objc_msgSend_384( _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); } /// number of body bytes already sent int get countOfBytesSent { - return _lib._objc_msgSend_358(_id, _lib._sel_countOfBytesSent1); + return _lib._objc_msgSend_383(_id, _lib._sel_countOfBytesSent1); } /// number of body bytes already received int get countOfBytesReceived { - return _lib._objc_msgSend_358(_id, _lib._sel_countOfBytesReceived1); + return _lib._objc_msgSend_383(_id, _lib._sel_countOfBytesReceived1); } /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request int get countOfBytesExpectedToSend { - return _lib._objc_msgSend_358(_id, _lib._sel_countOfBytesExpectedToSend1); + return _lib._objc_msgSend_383(_id, _lib._sel_countOfBytesExpectedToSend1); } /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. int get countOfBytesExpectedToReceive { - return _lib._objc_msgSend_358( + return _lib._objc_msgSend_383( _id, _lib._sel_countOfBytesExpectedToReceive1); } /// The taskDescription property is available for the developer to /// provide a descriptive label for the task. NSString? get taskDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_taskDescription1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_taskDescription1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -70782,7 +72363,7 @@ class NSURLSessionTask extends NSObject { /// The taskDescription property is available for the developer to /// provide a descriptive label for the task. set taskDescription(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); } @@ -70792,18 +72373,18 @@ class NSURLSessionTask extends NSObject { /// cases, the task may signal other work before it acknowledges the /// cancelation. -cancel may be sent to a task that has been suspended. void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + _lib._objc_msgSend_1(_id, _lib._sel_cancel1); } /// The current state of the task within the session. int get state { - return _lib._objc_msgSend_368(_id, _lib._sel_state1); + return _lib._objc_msgSend_396(_id, _lib._sel_state1); } /// The error, if any, delivered via -URLSession:task:didCompleteWithError: /// This property will be nil in the event that no error occurred. NSError? get error { - final _ret = _lib._objc_msgSend_331(_id, _lib._sel_error1); + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_error1); return _ret.address == 0 ? null : NSError._(_ret, _lib, retain: true, release: true); @@ -70817,11 +72398,11 @@ class NSURLSessionTask extends NSObject { /// will be disabled while a task is suspended. -suspend and -resume are /// nestable. void suspend() { - return _lib._objc_msgSend_1(_id, _lib._sel_suspend1); + _lib._objc_msgSend_1(_id, _lib._sel_suspend1); } void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + _lib._objc_msgSend_1(_id, _lib._sel_resume1); } /// Sets a scaling factor for the priority of the task. The scaling factor is a @@ -70838,7 +72419,9 @@ class NSURLSessionTask extends NSObject { /// priority levels are provided: NSURLSessionTaskPriorityLow and /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. double get priority { - return _lib._objc_msgSend_84(_id, _lib._sel_priority1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_89_fpret(_id, _lib._sel_priority1) + : _lib._objc_msgSend_89(_id, _lib._sel_priority1); } /// Sets a scaling factor for the priority of the task. The scaling factor is a @@ -70855,7 +72438,7 @@ class NSURLSessionTask extends NSObject { /// priority levels are provided: NSURLSessionTaskPriorityLow and /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. set priority(double value) { - _lib._objc_msgSend_369(_id, _lib._sel_setPriority_1, value); + return _lib._objc_msgSend_397(_id, _lib._sel_setPriority_1, value); } /// Provides a hint indicating if incremental delivery of a partial response body @@ -70879,7 +72462,7 @@ class NSURLSessionTask extends NSObject { /// Defaults to true unless this task is created with completion-handler based /// convenience methods, or if it is a download task. set prefersIncrementalDelivery(bool value) { - _lib._objc_msgSend_361( + return _lib._objc_msgSend_386( _id, _lib._sel_setPrefersIncrementalDelivery_1, value); } @@ -70895,6 +72478,13 @@ class NSURLSessionTask extends NSObject { return NSURLSessionTask._(_ret, _lib, retain: false, release: true); } + static NSURLSessionTask allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSessionTask1, _lib._sel_allocWithZone_1, zone); + return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + } + static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); @@ -70925,22 +72515,24 @@ class NSProgress extends NSObject { obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); } - static NSProgress currentProgress(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_351( + static NSProgress? currentProgress(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_376( _lib._class_NSProgress1, _lib._sel_currentProgress1); - return NSProgress._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSProgress._(_ret, _lib, retain: true, release: true); } static NSProgress progressWithTotalUnitCount_( NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_352(_lib._class_NSProgress1, + final _ret = _lib._objc_msgSend_377(_lib._class_NSProgress1, _lib._sel_progressWithTotalUnitCount_1, unitCount); return NSProgress._(_ret, _lib, retain: true, release: true); } static NSProgress discreteProgressWithTotalUnitCount_( NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_352(_lib._class_NSProgress1, + final _ret = _lib._objc_msgSend_377(_lib._class_NSProgress1, _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); return NSProgress._(_ret, _lib, retain: true, release: true); } @@ -70948,20 +72540,20 @@ class NSProgress extends NSObject { static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( NativeCupertinoHttp _lib, int unitCount, - NSProgress? parent, + NSProgress parent, int portionOfParentTotalUnitCount) { - final _ret = _lib._objc_msgSend_353( + final _ret = _lib._objc_msgSend_378( _lib._class_NSProgress1, _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, unitCount, - parent?._id ?? ffi.nullptr, + parent._id, portionOfParentTotalUnitCount); return NSProgress._(_ret, _lib, retain: true, release: true); } NSProgress initWithParent_userInfo_( NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { - final _ret = _lib._objc_msgSend_354( + final _ret = _lib._objc_msgSend_379( _id, _lib._sel_initWithParent_userInfo_1, parentProgressOrNil?._id ?? ffi.nullptr, @@ -70970,13 +72562,13 @@ class NSProgress extends NSObject { } void becomeCurrentWithPendingUnitCount_(int unitCount) { - return _lib._objc_msgSend_355( + _lib._objc_msgSend_380( _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); } void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock work) { - return _lib._objc_msgSend_356( + int unitCount, ObjCBlock_ffiVoid work) { + _lib._objc_msgSend_381( _id, _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, unitCount, @@ -70984,56 +72576,50 @@ class NSProgress extends NSObject { } void resignCurrent() { - return _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); } - void addChild_withPendingUnitCount_(NSProgress? child, int inUnitCount) { - return _lib._objc_msgSend_357( - _id, - _lib._sel_addChild_withPendingUnitCount_1, - child?._id ?? ffi.nullptr, - inUnitCount); + void addChild_withPendingUnitCount_(NSProgress child, int inUnitCount) { + _lib._objc_msgSend_382( + _id, _lib._sel_addChild_withPendingUnitCount_1, child._id, inUnitCount); } int get totalUnitCount { - return _lib._objc_msgSend_358(_id, _lib._sel_totalUnitCount1); + return _lib._objc_msgSend_383(_id, _lib._sel_totalUnitCount1); } set totalUnitCount(int value) { - _lib._objc_msgSend_359(_id, _lib._sel_setTotalUnitCount_1, value); + return _lib._objc_msgSend_384(_id, _lib._sel_setTotalUnitCount_1, value); } int get completedUnitCount { - return _lib._objc_msgSend_358(_id, _lib._sel_completedUnitCount1); + return _lib._objc_msgSend_383(_id, _lib._sel_completedUnitCount1); } set completedUnitCount(int value) { - _lib._objc_msgSend_359(_id, _lib._sel_setCompletedUnitCount_1, value); + return _lib._objc_msgSend_384( + _id, _lib._sel_setCompletedUnitCount_1, value); } - NSString? get localizedDescription { + NSString get localizedDescription { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - set localizedDescription(NSString? value) { - _lib._objc_msgSend_360( - _id, _lib._sel_setLocalizedDescription_1, value?._id ?? ffi.nullptr); + set localizedDescription(NSString value) { + return _lib._objc_msgSend_385( + _id, _lib._sel_setLocalizedDescription_1, value._id); } - NSString? get localizedAdditionalDescription { + NSString get localizedAdditionalDescription { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedAdditionalDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } - set localizedAdditionalDescription(NSString? value) { - _lib._objc_msgSend_360(_id, _lib._sel_setLocalizedAdditionalDescription_1, - value?._id ?? ffi.nullptr); + set localizedAdditionalDescription(NSString value) { + return _lib._objc_msgSend_385( + _id, _lib._sel_setLocalizedAdditionalDescription_1, value._id); } bool get cancellable { @@ -71041,7 +72627,7 @@ class NSProgress extends NSObject { } set cancellable(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setCancellable_1, value); + return _lib._objc_msgSend_386(_id, _lib._sel_setCancellable_1, value); } bool get pausable { @@ -71049,7 +72635,7 @@ class NSProgress extends NSObject { } set pausable(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setPausable_1, value); + return _lib._objc_msgSend_386(_id, _lib._sel_setPausable_1, value); } bool get cancelled { @@ -71060,37 +72646,46 @@ class NSProgress extends NSObject { return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); } - ObjCBlock get cancellationHandler { - final _ret = _lib._objc_msgSend_362(_id, _lib._sel_cancellationHandler1); - return ObjCBlock._(_ret, _lib); + ObjCBlock_ffiVoid? get cancellationHandler { + final _ret = _lib._objc_msgSend_387(_id, _lib._sel_cancellationHandler1); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); } - set cancellationHandler(ObjCBlock value) { - _lib._objc_msgSend_363(_id, _lib._sel_setCancellationHandler_1, value._id); + set cancellationHandler(ObjCBlock_ffiVoid? value) { + return _lib._objc_msgSend_388( + _id, _lib._sel_setCancellationHandler_1, value?._id ?? ffi.nullptr); } - ObjCBlock get pausingHandler { - final _ret = _lib._objc_msgSend_362(_id, _lib._sel_pausingHandler1); - return ObjCBlock._(_ret, _lib); + ObjCBlock_ffiVoid? get pausingHandler { + final _ret = _lib._objc_msgSend_387(_id, _lib._sel_pausingHandler1); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); } - set pausingHandler(ObjCBlock value) { - _lib._objc_msgSend_363(_id, _lib._sel_setPausingHandler_1, value._id); + set pausingHandler(ObjCBlock_ffiVoid? value) { + return _lib._objc_msgSend_388( + _id, _lib._sel_setPausingHandler_1, value?._id ?? ffi.nullptr); } - ObjCBlock get resumingHandler { - final _ret = _lib._objc_msgSend_362(_id, _lib._sel_resumingHandler1); - return ObjCBlock._(_ret, _lib); + ObjCBlock_ffiVoid? get resumingHandler { + final _ret = _lib._objc_msgSend_387(_id, _lib._sel_resumingHandler1); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); } - set resumingHandler(ObjCBlock value) { - _lib._objc_msgSend_363(_id, _lib._sel_setResumingHandler_1, value._id); + set resumingHandler(ObjCBlock_ffiVoid? value) { + return _lib._objc_msgSend_388( + _id, _lib._sel_setResumingHandler_1, value?._id ?? ffi.nullptr); } void setUserInfoObject_forKey_( - NSObject objectOrNil, NSProgressUserInfoKey key) { - return _lib._objc_msgSend_189( - _id, _lib._sel_setUserInfoObject_forKey_1, objectOrNil._id, key); + NSObject? objectOrNil, DartNSProgressUserInfoKey key) { + _lib._objc_msgSend_196(_id, _lib._sel_setUserInfoObject_forKey_1, + objectOrNil?._id ?? ffi.nullptr, key._id); } bool get indeterminate { @@ -71098,7 +72693,9 @@ class NSProgress extends NSObject { } double get fractionCompleted { - return _lib._objc_msgSend_85(_id, _lib._sel_fractionCompleted1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_fractionCompleted1) + : _lib._objc_msgSend_90(_id, _lib._sel_fractionCompleted1); } bool get finished { @@ -71106,122 +72703,123 @@ class NSProgress extends NSObject { } void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + _lib._objc_msgSend_1(_id, _lib._sel_cancel1); } void pause() { - return _lib._objc_msgSend_1(_id, _lib._sel_pause1); + _lib._objc_msgSend_1(_id, _lib._sel_pause1); } void resume() { - return _lib._objc_msgSend_1(_id, _lib._sel_resume1); + _lib._objc_msgSend_1(_id, _lib._sel_resume1); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + NSDictionary get userInfo { + final _ret = _lib._objc_msgSend_187(_id, _lib._sel_userInfo1); + return NSDictionary._(_ret, _lib, retain: true, release: true); } - NSProgressKind get kind { - return _lib._objc_msgSend_32(_id, _lib._sel_kind1); + DartNSProgressKind get kind { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_kind1); + return NSString._(_ret, _lib, retain: true, release: true); } - set kind(NSProgressKind value) { - _lib._objc_msgSend_360(_id, _lib._sel_setKind_1, value); + set kind(DartNSProgressKind value) { + return _lib._objc_msgSend_385(_id, _lib._sel_setKind_1, value._id); } NSNumber? get estimatedTimeRemaining { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_estimatedTimeRemaining1); + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_estimatedTimeRemaining1); return _ret.address == 0 ? null : NSNumber._(_ret, _lib, retain: true, release: true); } set estimatedTimeRemaining(NSNumber? value) { - _lib._objc_msgSend_364( + return _lib._objc_msgSend_389( _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); } NSNumber? get throughput { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_throughput1); + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_throughput1); return _ret.address == 0 ? null : NSNumber._(_ret, _lib, retain: true, release: true); } set throughput(NSNumber? value) { - _lib._objc_msgSend_364( + return _lib._objc_msgSend_389( _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); } - NSProgressFileOperationKind get fileOperationKind { - return _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); + DartNSProgressFileOperationKind get fileOperationKind { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); + return NSString._(_ret, _lib, retain: true, release: true); } - set fileOperationKind(NSProgressFileOperationKind value) { - _lib._objc_msgSend_360(_id, _lib._sel_setFileOperationKind_1, value); + set fileOperationKind(DartNSProgressFileOperationKind value) { + return _lib._objc_msgSend_385( + _id, _lib._sel_setFileOperationKind_1, value._id); } NSURL? get fileURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_fileURL1); + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_fileURL1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); } set fileURL(NSURL? value) { - _lib._objc_msgSend_365( + return _lib._objc_msgSend_390( _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); } NSNumber? get fileTotalCount { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileTotalCount1); + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_fileTotalCount1); return _ret.address == 0 ? null : NSNumber._(_ret, _lib, retain: true, release: true); } set fileTotalCount(NSNumber? value) { - _lib._objc_msgSend_364( + return _lib._objc_msgSend_389( _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); } NSNumber? get fileCompletedCount { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_fileCompletedCount1); + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_fileCompletedCount1); return _ret.address == 0 ? null : NSNumber._(_ret, _lib, retain: true, release: true); } set fileCompletedCount(NSNumber? value) { - _lib._objc_msgSend_364( + return _lib._objc_msgSend_389( _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); } void publish() { - return _lib._objc_msgSend_1(_id, _lib._sel_publish1); + _lib._objc_msgSend_1(_id, _lib._sel_publish1); } void unpublish() { - return _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); + _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); } static NSObject addSubscriberForFileURL_withPublishingHandler_( NativeCupertinoHttp _lib, - NSURL? url, - NSProgressPublishingHandler publishingHandler) { - final _ret = _lib._objc_msgSend_366( + NSURL url, + DartNSProgressPublishingHandler publishingHandler) { + final _ret = _lib._objc_msgSend_391( _lib._class_NSProgress1, _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, - url?._id ?? ffi.nullptr, - publishingHandler); + url._id, + publishingHandler._id); return NSObject._(_ret, _lib, retain: true, release: true); } static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { - return _lib._objc_msgSend_200( + _lib._objc_msgSend_210( _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); } @@ -71229,11 +72827,24 @@ class NSProgress extends NSObject { return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); } + @override + NSProgress init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSProgress._(_ret, _lib, retain: true, release: true); + } + static NSProgress new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); return NSProgress._(_ret, _lib, retain: false, release: true); } + static NSProgress allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSProgress1, _lib._sel_allocWithZone_1, zone); + return NSProgress._(_ret, _lib, retain: false, release: true); + } + static NSProgress alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); @@ -71242,40 +72853,57 @@ class NSProgress extends NSObject { } typedef NSProgressUserInfoKey = ffi.Pointer; +typedef DartNSProgressUserInfoKey = NSString; typedef NSProgressKind = ffi.Pointer; +typedef DartNSProgressKind = NSString; typedef NSProgressFileOperationKind = ffi.Pointer; +typedef DartNSProgressFileOperationKind = NSString; typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; -NSProgressUnpublishingHandler _ObjCBlock18_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>()(arg0); -} - -final _ObjCBlock18_closureRegistry = {}; -int _ObjCBlock18_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock18_registerClosure(Function fn) { - final id = ++_ObjCBlock18_closureRegistryIndex; - _ObjCBlock18_closureRegistry[id] = fn; +typedef DartNSProgressPublishingHandler + = ObjCBlock_NSProgressUnpublishingHandler_NSProgress; +NSProgressUnpublishingHandler + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer)>()(arg0); +final _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureRegistry = + )>{}; +int _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_registerClosure( + NSProgressUnpublishingHandler Function(ffi.Pointer) fn) { + final id = + ++_ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureRegistryIndex; + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -NSProgressUnpublishingHandler _ObjCBlock18_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock18_closureRegistry[block.ref.target.address]!(arg0); -} +NSProgressUnpublishingHandler + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureRegistry[ + block.ref.target.address]!(arg0); -class ObjCBlock18 extends _ObjCBlockBase { - ObjCBlock18._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_NSProgressUnpublishingHandler_NSProgress + extends _ObjCBlockBase { + ObjCBlock_NSProgressUnpublishingHandler_NSProgress._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock18.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgressUnpublishingHandler_NSProgress.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -71286,43 +72914,56 @@ class ObjCBlock18 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock18_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock18.fromFunction(NativeCupertinoHttp lib, - NSProgressUnpublishingHandler Function(ffi.Pointer arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgressUnpublishingHandler_NSProgress.fromFunction( + NativeCupertinoHttp lib, + DartNSProgressUnpublishingHandler Function(NSProgress) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock18_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureTrampoline) .cast(), - _ObjCBlock18_registerClosure(fn)), + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_registerClosure( + (ffi.Pointer arg0) => + fn(NSProgress._(arg0, lib, retain: true, release: true)) + ._retainAndReturnId())), lib); static ffi.Pointer? _dartFuncTrampoline; - NSProgressUnpublishingHandler call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } + + DartNSProgressUnpublishingHandler call(NSProgress arg0) => + ObjCBlock_ffiVoid._( + _id.ref.invoke + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0._id), + _lib, + retain: false, + release: true); } typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; +typedef DartNSProgressUnpublishingHandler = ObjCBlock_ffiVoid; abstract class NSURLSessionTaskState { /// The task is currently being serviced by the session @@ -71336,72 +72977,115 @@ abstract class NSURLSessionTaskState { static const int NSURLSessionTaskStateCompleted = 3; } -void _ObjCBlock19_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} - -final _ObjCBlock19_closureRegistry = {}; -int _ObjCBlock19_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock19_registerClosure(Function fn) { - final id = ++_ObjCBlock19_closureRegistryIndex; - _ObjCBlock19_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock19_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock19_closureRegistry[block.ref.target.address]!(arg0); -} +void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[ + block.ref.target.address]!(arg0); -class ObjCBlock19 extends _ObjCBlockBase { - ObjCBlock19._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSCachedURLResponse extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSCachedURLResponse._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock19.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunctionPointer( NativeCupertinoHttp lib, - ffi.Pointer< + ffi + .Pointer< ffi .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock19_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock19.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunction( + NativeCupertinoHttp lib, void Function(NSCachedURLResponse?) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock19_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) .cast(), - _ObjCBlock19_registerClosure(fn)), + _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse._(arg0, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSCachedURLResponse.listener( + NativeCupertinoHttp lib, void Function(NSCachedURLResponse?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSCachedURLResponse? arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); } class NSNotification extends NSObject { @@ -71427,56 +73111,64 @@ class NSNotification extends NSObject { obj._lib._class_NSNotification1); } - NSNotificationName get name { - return _lib._objc_msgSend_32(_id, _lib._sel_name1); + DartNSNotificationName get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return NSString._(_ret, _lib, retain: true, release: true); } - NSObject get object { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_object1); - return NSObject._(_ret, _lib, retain: true, release: true); + NSObject? get object { + final _ret = _lib._objc_msgSend_61(_id, _lib._sel_object1); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + final _ret = _lib._objc_msgSend_288(_id, _lib._sel_userInfo1); return _ret.address == 0 ? null : NSDictionary._(_ret, _lib, retain: true, release: true); } NSNotification initWithName_object_userInfo_( - NSNotificationName name, NSObject object, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_373( + DartNSNotificationName name, NSObject? object, NSDictionary? userInfo) { + final _ret = _lib._objc_msgSend_401( _id, _lib._sel_initWithName_object_userInfo_1, - name, - object._id, + name._id, + object?._id ?? ffi.nullptr, userInfo?._id ?? ffi.nullptr); return NSNotification._(_ret, _lib, retain: true, release: true); } - NSNotification initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + NSNotification? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSNotification._(_ret, _lib, retain: true, release: true); } - static NSNotification notificationWithName_object_( - NativeCupertinoHttp _lib, NSNotificationName aName, NSObject anObject) { - final _ret = _lib._objc_msgSend_258(_lib._class_NSNotification1, - _lib._sel_notificationWithName_object_1, aName, anObject._id); + static NSNotification notificationWithName_object_(NativeCupertinoHttp _lib, + DartNSNotificationName aName, NSObject? anObject) { + final _ret = _lib._objc_msgSend_272( + _lib._class_NSNotification1, + _lib._sel_notificationWithName_object_1, + aName._id, + anObject?._id ?? ffi.nullptr); return NSNotification._(_ret, _lib, retain: true, release: true); } static NSNotification notificationWithName_object_userInfo_( NativeCupertinoHttp _lib, - NSNotificationName aName, - NSObject anObject, + DartNSNotificationName aName, + NSObject? anObject, NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_373( + final _ret = _lib._objc_msgSend_401( _lib._class_NSNotification1, _lib._sel_notificationWithName_object_userInfo_1, - aName, - anObject._id, + aName._id, + anObject?._id ?? ffi.nullptr, aUserInfo?._id ?? ffi.nullptr); return NSNotification._(_ret, _lib, retain: true, release: true); } @@ -71493,6 +73185,13 @@ class NSNotification extends NSObject { return NSNotification._(_ret, _lib, retain: false, release: true); } + static NSNotification allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSNotification1, _lib._sel_allocWithZone_1, zone); + return NSNotification._(_ret, _lib, retain: false, release: true); + } + static NSNotification alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); @@ -71501,6 +73200,7 @@ class NSNotification extends NSObject { } typedef NSNotificationName = ffi.Pointer; +typedef DartNSNotificationName = NSString; class NSNotificationCenter extends NSObject { NSNotificationCenter._(ffi.Pointer id, NativeCupertinoHttp lib, @@ -71526,78 +73226,85 @@ class NSNotificationCenter extends NSObject { obj._lib._class_NSNotificationCenter1); } - static NSNotificationCenter? getDefaultCenter(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_374( + static NSNotificationCenter getDefaultCenter(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_402( _lib._class_NSNotificationCenter1, _lib._sel_defaultCenter1); - return _ret.address == 0 - ? null - : NSNotificationCenter._(_ret, _lib, retain: true, release: true); + return NSNotificationCenter._(_ret, _lib, retain: true, release: true); } void addObserver_selector_name_object_( NSObject observer, ffi.Pointer aSelector, - NSNotificationName aName, - NSObject anObject) { - return _lib._objc_msgSend_375( - _id, - _lib._sel_addObserver_selector_name_object_1, - observer._id, - aSelector, - aName, - anObject._id); + DartNSNotificationName aName, + NSObject? anObject) { + _lib._objc_msgSend_403(_id, _lib._sel_addObserver_selector_name_object_1, + observer._id, aSelector, aName._id, anObject?._id ?? ffi.nullptr); } - void postNotification_(NSNotification? notification) { - return _lib._objc_msgSend_376( - _id, _lib._sel_postNotification_1, notification?._id ?? ffi.nullptr); + void postNotification_(NSNotification notification) { + _lib._objc_msgSend_404(_id, _lib._sel_postNotification_1, notification._id); } void postNotificationName_object_( - NSNotificationName aName, NSObject anObject) { - return _lib._objc_msgSend_377( - _id, _lib._sel_postNotificationName_object_1, aName, anObject._id); + DartNSNotificationName aName, NSObject? anObject) { + _lib._objc_msgSend_405(_id, _lib._sel_postNotificationName_object_1, + aName._id, anObject?._id ?? ffi.nullptr); } - void postNotificationName_object_userInfo_( - NSNotificationName aName, NSObject anObject, NSDictionary? aUserInfo) { - return _lib._objc_msgSend_378( + void postNotificationName_object_userInfo_(DartNSNotificationName aName, + NSObject? anObject, NSDictionary? aUserInfo) { + _lib._objc_msgSend_406( _id, _lib._sel_postNotificationName_object_userInfo_1, - aName, - anObject._id, + aName._id, + anObject?._id ?? ffi.nullptr, aUserInfo?._id ?? ffi.nullptr); } void removeObserver_(NSObject observer) { - return _lib._objc_msgSend_200( - _id, _lib._sel_removeObserver_1, observer._id); + _lib._objc_msgSend_210(_id, _lib._sel_removeObserver_1, observer._id); } void removeObserver_name_object_( - NSObject observer, NSNotificationName aName, NSObject anObject) { - return _lib._objc_msgSend_379(_id, _lib._sel_removeObserver_name_object_1, - observer._id, aName, anObject._id); + NSObject observer, DartNSNotificationName aName, NSObject? anObject) { + _lib._objc_msgSend_407(_id, _lib._sel_removeObserver_name_object_1, + observer._id, aName._id, anObject?._id ?? ffi.nullptr); } - NSObject addObserverForName_object_queue_usingBlock_(NSNotificationName name, - NSObject obj, NSOperationQueue? queue, ObjCBlock20 block) { - final _ret = _lib._objc_msgSend_392( + NSObject addObserverForName_object_queue_usingBlock_( + DartNSNotificationName name, + NSObject? obj, + NSOperationQueue? queue, + ObjCBlock_ffiVoid_NSNotification block) { + final _ret = _lib._objc_msgSend_421( _id, _lib._sel_addObserverForName_object_queue_usingBlock_1, - name, - obj._id, + name._id, + obj?._id ?? ffi.nullptr, queue?._id ?? ffi.nullptr, block._id); return NSObject._(_ret, _lib, retain: true, release: true); } + @override + NSNotificationCenter init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSNotificationCenter._(_ret, _lib, retain: true, release: true); + } + static NSNotificationCenter new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSNotificationCenter1, _lib._sel_new1); return NSNotificationCenter._(_ret, _lib, retain: false, release: true); } + static NSNotificationCenter allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSNotificationCenter1, _lib._sel_allocWithZone_1, zone); + return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + } + static NSNotificationCenter alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSNotificationCenter1, _lib._sel_alloc1); @@ -71645,29 +73352,22 @@ class NSOperationQueue extends NSObject { /// @example /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; /// queue.progress.totalUnitCount = 10; - NSProgress? get progress { - final _ret = _lib._objc_msgSend_351(_id, _lib._sel_progress1); - return _ret.address == 0 - ? null - : NSProgress._(_ret, _lib, retain: true, release: true); + NSProgress get progress { + final _ret = _lib._objc_msgSend_392(_id, _lib._sel_progress1); + return NSProgress._(_ret, _lib, retain: true, release: true); } - void addOperation_(NSOperation? op) { - return _lib._objc_msgSend_380( - _id, _lib._sel_addOperation_1, op?._id ?? ffi.nullptr); + void addOperation_(NSOperation op) { + _lib._objc_msgSend_408(_id, _lib._sel_addOperation_1, op._id); } - void addOperations_waitUntilFinished_(NSArray? ops, bool wait) { - return _lib._objc_msgSend_386( - _id, - _lib._sel_addOperations_waitUntilFinished_1, - ops?._id ?? ffi.nullptr, - wait); + void addOperations_waitUntilFinished_(NSArray ops, bool wait) { + _lib._objc_msgSend_414( + _id, _lib._sel_addOperations_waitUntilFinished_1, ops._id, wait); } - void addOperationWithBlock_(ObjCBlock block) { - return _lib._objc_msgSend_387( - _id, _lib._sel_addOperationWithBlock_1, block._id); + void addOperationWithBlock_(ObjCBlock_ffiVoid block) { + _lib._objc_msgSend_415(_id, _lib._sel_addOperationWithBlock_1, block._id); } /// @method addBarrierBlock: @@ -71675,17 +73375,16 @@ class NSOperationQueue extends NSObject { /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the /// `dispatch_barrier_async` function. - void addBarrierBlock_(ObjCBlock barrier) { - return _lib._objc_msgSend_387( - _id, _lib._sel_addBarrierBlock_1, barrier._id); + void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { + _lib._objc_msgSend_415(_id, _lib._sel_addBarrierBlock_1, barrier._id); } - int get maxConcurrentOperationCount { - return _lib._objc_msgSend_81(_id, _lib._sel_maxConcurrentOperationCount1); + DartNSInteger get maxConcurrentOperationCount { + return _lib._objc_msgSend_86(_id, _lib._sel_maxConcurrentOperationCount1); } - set maxConcurrentOperationCount(int value) { - _lib._objc_msgSend_388( + set maxConcurrentOperationCount(DartNSInteger value) { + return _lib._objc_msgSend_416( _id, _lib._sel_setMaxConcurrentOperationCount_1, value); } @@ -71694,81 +73393,90 @@ class NSOperationQueue extends NSObject { } set suspended(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setSuspended_1, value); + return _lib._objc_msgSend_386(_id, _lib._sel_setSuspended_1, value); } NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_name1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set name(NSString? value) { - _lib._objc_msgSend_360(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + return _lib._objc_msgSend_395( + _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); } int get qualityOfService { - return _lib._objc_msgSend_384(_id, _lib._sel_qualityOfService1); + return _lib._objc_msgSend_412(_id, _lib._sel_qualityOfService1); } set qualityOfService(int value) { - _lib._objc_msgSend_385(_id, _lib._sel_setQualityOfService_1, value); + return _lib._objc_msgSend_413(_id, _lib._sel_setQualityOfService_1, value); } /// actually retain dispatch_queue_t get underlyingQueue { - return _lib._objc_msgSend_389(_id, _lib._sel_underlyingQueue1); + return _lib._objc_msgSend_417(_id, _lib._sel_underlyingQueue1); } /// actually retain set underlyingQueue(dispatch_queue_t value) { - _lib._objc_msgSend_390(_id, _lib._sel_setUnderlyingQueue_1, value); + return _lib._objc_msgSend_418(_id, _lib._sel_setUnderlyingQueue_1, value); } void cancelAllOperations() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); } void waitUntilAllOperationsAreFinished() { - return _lib._objc_msgSend_1( - _id, _lib._sel_waitUntilAllOperationsAreFinished1); + _lib._objc_msgSend_1(_id, _lib._sel_waitUntilAllOperationsAreFinished1); } static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_391( + final _ret = _lib._objc_msgSend_419( _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); return _ret.address == 0 ? null : NSOperationQueue._(_ret, _lib, retain: true, release: true); } - static NSOperationQueue? getMainQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_391( + static NSOperationQueue getMainQueue(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_420( _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); + return NSOperationQueue._(_ret, _lib, retain: true, release: true); } /// These two functions are inherently a race condition and should be avoided if possible - NSArray? get operations { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_operations1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + NSArray get operations { + final _ret = _lib._objc_msgSend_169(_id, _lib._sel_operations1); + return NSArray._(_ret, _lib, retain: true, release: true); } - int get operationCount { + DartNSUInteger get operationCount { return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); } + @override + NSOperationQueue init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSOperationQueue._(_ret, _lib, retain: true, release: true); + } + static NSOperationQueue new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); return NSOperationQueue._(_ret, _lib, retain: false, release: true); } + static NSOperationQueue allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSOperationQueue1, _lib._sel_allocWithZone_1, zone); + return NSOperationQueue._(_ret, _lib, retain: false, release: true); + } + static NSOperationQueue alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); @@ -71800,11 +73508,11 @@ class NSOperation extends NSObject { } void start() { - return _lib._objc_msgSend_1(_id, _lib._sel_start1); + _lib._objc_msgSend_1(_id, _lib._sel_start1); } void main() { - return _lib._objc_msgSend_1(_id, _lib._sel_main1); + _lib._objc_msgSend_1(_id, _lib._sel_main1); } bool get cancelled { @@ -71812,7 +73520,7 @@ class NSOperation extends NSObject { } void cancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + _lib._objc_msgSend_1(_id, _lib._sel_cancel1); } bool get executing { @@ -71836,69 +73544,77 @@ class NSOperation extends NSObject { return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); } - void addDependency_(NSOperation? op) { - return _lib._objc_msgSend_380( - _id, _lib._sel_addDependency_1, op?._id ?? ffi.nullptr); + void addDependency_(NSOperation op) { + _lib._objc_msgSend_408(_id, _lib._sel_addDependency_1, op._id); } - void removeDependency_(NSOperation? op) { - return _lib._objc_msgSend_380( - _id, _lib._sel_removeDependency_1, op?._id ?? ffi.nullptr); + void removeDependency_(NSOperation op) { + _lib._objc_msgSend_408(_id, _lib._sel_removeDependency_1, op._id); } - NSArray? get dependencies { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_dependencies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + NSArray get dependencies { + final _ret = _lib._objc_msgSend_169(_id, _lib._sel_dependencies1); + return NSArray._(_ret, _lib, retain: true, release: true); } int get queuePriority { - return _lib._objc_msgSend_381(_id, _lib._sel_queuePriority1); + return _lib._objc_msgSend_409(_id, _lib._sel_queuePriority1); } set queuePriority(int value) { - _lib._objc_msgSend_382(_id, _lib._sel_setQueuePriority_1, value); + return _lib._objc_msgSend_410(_id, _lib._sel_setQueuePriority_1, value); } - ObjCBlock get completionBlock { - final _ret = _lib._objc_msgSend_362(_id, _lib._sel_completionBlock1); - return ObjCBlock._(_ret, _lib); + ObjCBlock_ffiVoid? get completionBlock { + final _ret = _lib._objc_msgSend_387(_id, _lib._sel_completionBlock1); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); } - set completionBlock(ObjCBlock value) { - _lib._objc_msgSend_363(_id, _lib._sel_setCompletionBlock_1, value._id); + set completionBlock(ObjCBlock_ffiVoid? value) { + return _lib._objc_msgSend_388( + _id, _lib._sel_setCompletionBlock_1, value?._id ?? ffi.nullptr); } void waitUntilFinished() { - return _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); + _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); } double get threadPriority { - return _lib._objc_msgSend_85(_id, _lib._sel_threadPriority1); + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_threadPriority1) + : _lib._objc_msgSend_90(_id, _lib._sel_threadPriority1); } set threadPriority(double value) { - _lib._objc_msgSend_383(_id, _lib._sel_setThreadPriority_1, value); + return _lib._objc_msgSend_411(_id, _lib._sel_setThreadPriority_1, value); } int get qualityOfService { - return _lib._objc_msgSend_384(_id, _lib._sel_qualityOfService1); + return _lib._objc_msgSend_412(_id, _lib._sel_qualityOfService1); } set qualityOfService(int value) { - _lib._objc_msgSend_385(_id, _lib._sel_setQualityOfService_1, value); + return _lib._objc_msgSend_413(_id, _lib._sel_setQualityOfService_1, value); } NSString? get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_name1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set name(NSString? value) { - _lib._objc_msgSend_360(_id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + return _lib._objc_msgSend_395( + _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); + } + + @override + NSOperation init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSOperation._(_ret, _lib, retain: true, release: true); } static NSOperation new1(NativeCupertinoHttp _lib) { @@ -71906,6 +73622,13 @@ class NSOperation extends NSObject { return NSOperation._(_ret, _lib, retain: false, release: true); } + static NSOperation allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSOperation1, _lib._sel_allocWithZone_1, zone); + return NSOperation._(_ret, _lib, retain: false, release: true); + } + static NSOperation alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); @@ -71921,34 +73644,44 @@ abstract class NSOperationQueuePriority { static const int NSOperationQueuePriorityVeryHigh = 8; } -typedef dispatch_queue_t = ffi.Pointer; -void _ObjCBlock20_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} +typedef dispatch_queue_t = ffi.Pointer; + +final class dispatch_queue_s extends ffi.Opaque {} -final _ObjCBlock20_closureRegistry = {}; -int _ObjCBlock20_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock20_registerClosure(Function fn) { - final id = ++_ObjCBlock20_closureRegistryIndex; - _ObjCBlock20_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_NSNotification_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSNotification_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSNotification_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSNotification_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSNotification_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSNotification_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock20_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock20_closureRegistry[block.ref.target.address]!(arg0); -} +void _ObjCBlock_ffiVoid_NSNotification_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSNotification_closureRegistry[ + block.ref.target.address]!(arg0); -class ObjCBlock20 extends _ObjCBlockBase { - ObjCBlock20._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSNotification extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSNotification._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock20.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSNotification.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi @@ -71957,37 +73690,72 @@ class ObjCBlock20 extends _ObjCBlockBase { : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock20_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSNotification_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock20.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSNotification.fromFunction( + NativeCupertinoHttp lib, void Function(NSNotification) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock20_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSNotification_closureTrampoline) .cast(), - _ObjCBlock20_registerClosure(fn)), + _ObjCBlock_ffiVoid_NSNotification_registerClosure((ffi + .Pointer + arg0) => + fn(NSNotification._(arg0, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSNotification.listener( + NativeCupertinoHttp lib, void Function(NSNotification) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSNotification_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSNotification_registerClosure( + (ffi.Pointer arg0) => fn(NSNotification._( + arg0, lib, + retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSNotification arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0._id); } /// ! @@ -72046,7 +73814,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @abstract The URL of the receiver. @override NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_URL1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); @@ -72055,20 +73823,21 @@ class NSMutableURLRequest extends NSURLRequest { /// ! /// @abstract The URL of the receiver. set URL(NSURL? value) { - _lib._objc_msgSend_365(_id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); + return _lib._objc_msgSend_390( + _id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); } /// ! /// @abstract The cache policy of the receiver. @override int get cachePolicy { - return _lib._objc_msgSend_325(_id, _lib._sel_cachePolicy1); + return _lib._objc_msgSend_344(_id, _lib._sel_cachePolicy1); } /// ! /// @abstract The cache policy of the receiver. set cachePolicy(int value) { - _lib._objc_msgSend_393(_id, _lib._sel_setCachePolicy_1, value); + return _lib._objc_msgSend_422(_id, _lib._sel_setCachePolicy_1, value); } /// ! @@ -72084,8 +73853,10 @@ class NSMutableURLRequest extends NSURLRequest { /// is considered to have timed out. This timeout interval is measured /// in seconds. @override - double get timeoutInterval { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutInterval1); + DartNSTimeInterval get timeoutInterval { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_timeoutInterval1) + : _lib._objc_msgSend_90(_id, _lib._sel_timeoutInterval1); } /// ! @@ -72100,8 +73871,8 @@ class NSMutableURLRequest extends NSURLRequest { /// becomes greater than or equal to the timeout interval, the request /// is considered to have timed out. This timeout interval is measured /// in seconds. - set timeoutInterval(double value) { - _lib._objc_msgSend_383(_id, _lib._sel_setTimeoutInterval_1, value); + set timeoutInterval(DartNSTimeInterval value) { + return _lib._objc_msgSend_411(_id, _lib._sel_setTimeoutInterval_1, value); } /// ! @@ -72115,7 +73886,7 @@ class NSMutableURLRequest extends NSURLRequest { /// in the future. @override NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_mainDocumentURL1); + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_mainDocumentURL1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); @@ -72131,7 +73902,7 @@ class NSMutableURLRequest extends NSURLRequest { /// as a sub-resource of a user-specified URL, and possibly other things /// in the future. set mainDocumentURL(NSURL? value) { - _lib._objc_msgSend_365( + return _lib._objc_msgSend_390( _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); } @@ -72141,7 +73912,7 @@ class NSMutableURLRequest extends NSURLRequest { /// of the request. Most clients should not need to use this method. @override int get networkServiceType { - return _lib._objc_msgSend_326(_id, _lib._sel_networkServiceType1); + return _lib._objc_msgSend_345(_id, _lib._sel_networkServiceType1); } /// ! @@ -72149,7 +73920,8 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion This method is used to provide the network layers with a hint as to the purpose /// of the request. Most clients should not need to use this method. set networkServiceType(int value) { - _lib._objc_msgSend_394(_id, _lib._sel_setNetworkServiceType_1, value); + return _lib._objc_msgSend_423( + _id, _lib._sel_setNetworkServiceType_1, value); } /// ! @@ -72168,7 +73940,8 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion NO if the receiver should not be allowed to use the built in /// cellular radios to satisfy the request, YES otherwise. The default is YES. set allowsCellularAccess(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setAllowsCellularAccess_1, value); + return _lib._objc_msgSend_386( + _id, _lib._sel_setAllowsCellularAccess_1, value); } /// ! @@ -72187,7 +73960,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to /// satisfy the request, YES otherwise. set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_361( + return _lib._objc_msgSend_386( _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); } @@ -72208,7 +73981,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to /// satisfy the request, YES otherwise. set allowsConstrainedNetworkAccess(bool value) { - _lib._objc_msgSend_361( + return _lib._objc_msgSend_386( _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); } @@ -72228,7 +74001,8 @@ class NSMutableURLRequest extends NSURLRequest { /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. /// The default may be YES in a future OS update. set assumesHTTP3Capable(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setAssumesHTTP3Capable_1, value); + return _lib._objc_msgSend_386( + _id, _lib._sel_setAssumesHTTP3Capable_1, value); } /// ! @@ -72237,7 +74011,7 @@ class NSMutableURLRequest extends NSURLRequest { /// user. Defaults to NSURLRequestAttributionDeveloper. @override int get attribution { - return _lib._objc_msgSend_327(_id, _lib._sel_attribution1); + return _lib._objc_msgSend_346(_id, _lib._sel_attribution1); } /// ! @@ -72245,7 +74019,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the /// user. Defaults to NSURLRequestAttributionDeveloper. set attribution(int value) { - _lib._objc_msgSend_395(_id, _lib._sel_setAttribution_1, value); + return _lib._objc_msgSend_424(_id, _lib._sel_setAttribution_1, value); } /// ! @@ -72262,24 +74036,21 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, /// No otherwise. Defaults to NO. set requiresDNSSECValidation(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setRequiresDNSSECValidation_1, value); + return _lib._objc_msgSend_386( + _id, _lib._sel_setRequiresDNSSECValidation_1, value); } /// ! /// @abstract Sets the HTTP request method of the receiver. - @override - NSString? get HTTPMethod { + NSString get HTTPMethod { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } /// ! /// @abstract Sets the HTTP request method of the receiver. - set HTTPMethod(NSString? value) { - _lib._objc_msgSend_360( - _id, _lib._sel_setHTTPMethod_1, value?._id ?? ffi.nullptr); + set HTTPMethod(NSString value) { + return _lib._objc_msgSend_385(_id, _lib._sel_setHTTPMethod_1, value._id); } /// ! @@ -72294,7 +74065,7 @@ class NSMutableURLRequest extends NSURLRequest { /// message, the key-value pair is skipped. @override NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHTTPHeaderFields1); + final _ret = _lib._objc_msgSend_288(_id, _lib._sel_allHTTPHeaderFields1); return _ret.address == 0 ? null : NSDictionary._(_ret, _lib, retain: true, release: true); @@ -72311,7 +74082,7 @@ class NSMutableURLRequest extends NSURLRequest { /// the key or value for a key-value pair answers NO when sent this /// message, the key-value pair is skipped. set allHTTPHeaderFields(NSDictionary? value) { - _lib._objc_msgSend_396( + return _lib._objc_msgSend_425( _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); } @@ -72324,9 +74095,9 @@ class NSMutableURLRequest extends NSURLRequest { /// case-insensitive. /// @param value the header field value. /// @param field the header field name (case-insensitive). - void setValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_397(_id, _lib._sel_setValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + void setValue_forHTTPHeaderField_(NSString? value, NSString field) { + _lib._objc_msgSend_426(_id, _lib._sel_setValue_forHTTPHeaderField_1, + value?._id ?? ffi.nullptr, field._id); } /// ! @@ -72342,9 +74113,9 @@ class NSMutableURLRequest extends NSURLRequest { /// header field names are case-insensitive. /// @param value the header field value. /// @param field the header field name (case-insensitive). - void addValue_forHTTPHeaderField_(NSString? value, NSString? field) { - return _lib._objc_msgSend_397(_id, _lib._sel_addValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field?._id ?? ffi.nullptr); + void addValue_forHTTPHeaderField_(NSString value, NSString field) { + _lib._objc_msgSend_427( + _id, _lib._sel_addValue_forHTTPHeaderField_1, value._id, field._id); } /// ! @@ -72353,7 +74124,7 @@ class NSMutableURLRequest extends NSURLRequest { /// in done in an HTTP POST request. @override NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_HTTPBody1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_HTTPBody1); return _ret.address == 0 ? null : NSData._(_ret, _lib, retain: true, release: true); @@ -72364,7 +74135,7 @@ class NSMutableURLRequest extends NSURLRequest { /// @discussion This data is sent as the message body of the request, as /// in done in an HTTP POST request. set HTTPBody(NSData? value) { - _lib._objc_msgSend_398( + return _lib._objc_msgSend_428( _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); } @@ -72377,7 +74148,7 @@ class NSMutableURLRequest extends NSURLRequest { /// - setting one will clear the other. @override NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_338(_id, _lib._sel_HTTPBodyStream1); + final _ret = _lib._objc_msgSend_362(_id, _lib._sel_HTTPBodyStream1); return _ret.address == 0 ? null : NSInputStream._(_ret, _lib, retain: true, release: true); @@ -72391,7 +74162,7 @@ class NSMutableURLRequest extends NSURLRequest { /// and the body data (set by setHTTPBody:, above) are mutually exclusive /// - setting one will clear the other. set HTTPBodyStream(NSInputStream? value) { - _lib._objc_msgSend_399( + return _lib._objc_msgSend_429( _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); } @@ -72415,7 +74186,8 @@ class NSMutableURLRequest extends NSURLRequest { /// stored to the cookie manager by default. /// NOTE: In releases prior to 10.3, this value is ignored set HTTPShouldHandleCookies(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setHTTPShouldHandleCookies_1, value); + return _lib._objc_msgSend_386( + _id, _lib._sel_setHTTPShouldHandleCookies_1, value); } /// ! @@ -72454,7 +74226,8 @@ class NSMutableURLRequest extends NSURLRequest { /// pipelining (disconnecting, sending resources misordered, omitting part of /// a resource, etc.). set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + return _lib._objc_msgSend_386( + _id, _lib._sel_setHTTPShouldUsePipelining_1, value); } /// ! @@ -72467,9 +74240,9 @@ class NSMutableURLRequest extends NSURLRequest { /// @param URL The URL for the request. /// @result A newly-created and autoreleased NSURLRequest instance. static NSMutableURLRequest requestWithURL_( - NativeCupertinoHttp _lib, NSURL? URL) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableURLRequest1, - _lib._sel_requestWithURL_1, URL?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSURL URL) { + final _ret = _lib._objc_msgSend_211( + _lib._class_NSMutableURLRequest1, _lib._sel_requestWithURL_1, URL._id); return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); } @@ -72494,24 +74267,75 @@ class NSMutableURLRequest extends NSURLRequest { /// @result A newly-created and autoreleased NSURLRequest instance. static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( NativeCupertinoHttp _lib, - NSURL? URL, + NSURL URL, int cachePolicy, - double timeoutInterval) { - final _ret = _lib._objc_msgSend_324( + DartNSTimeInterval timeoutInterval) { + final _ret = _lib._objc_msgSend_343( _lib._class_NSMutableURLRequest1, _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL?._id ?? ffi.nullptr, + URL._id, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result An initialized NSURLRequest. + @override + NSMutableURLRequest initWithURL_(NSURL URL) { + final _ret = _lib._objc_msgSend_211(_id, _lib._sel_initWithURL_1, URL._id); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } + + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL and + /// cache policy. + /// @discussion This is the designated initializer for the + /// NSURLRequest class. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result An initialized NSURLRequest. + @override + NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_( + NSURL URL, int cachePolicy, DartNSTimeInterval timeoutInterval) { + final _ret = _lib._objc_msgSend_343( + _id, + _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, + URL._id, cachePolicy, timeoutInterval); return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); } + @override + NSMutableURLRequest init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + } + static NSMutableURLRequest new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); } + static NSMutableURLRequest allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableURLRequest1, _lib._sel_allocWithZone_1, zone); + return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + } + static NSMutableURLRequest alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); @@ -72549,90 +74373,89 @@ class NSHTTPCookieStorage extends NSObject { obj._lib._class_NSHTTPCookieStorage1); } - static NSHTTPCookieStorage? getSharedHTTPCookieStorage( + static NSHTTPCookieStorage getSharedHTTPCookieStorage( NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_400( + final _ret = _lib._objc_msgSend_430( _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); } static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_401( + NativeCupertinoHttp _lib, NSString identifier) { + final _ret = _lib._objc_msgSend_431( _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, - identifier?._id ?? ffi.nullptr); + identifier._id); return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); } NSArray? get cookies { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_cookies1); + final _ret = _lib._objc_msgSend_188(_id, _lib._sel_cookies1); return _ret.address == 0 ? null : NSArray._(_ret, _lib, retain: true, release: true); } - void setCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_402( - _id, _lib._sel_setCookie_1, cookie?._id ?? ffi.nullptr); + void setCookie_(NSHTTPCookie cookie) { + _lib._objc_msgSend_432(_id, _lib._sel_setCookie_1, cookie._id); } - void deleteCookie_(NSHTTPCookie? cookie) { - return _lib._objc_msgSend_402( - _id, _lib._sel_deleteCookie_1, cookie?._id ?? ffi.nullptr); + void deleteCookie_(NSHTTPCookie cookie) { + _lib._objc_msgSend_432(_id, _lib._sel_deleteCookie_1, cookie._id); } - void removeCookiesSinceDate_(NSDate? date) { - return _lib._objc_msgSend_349( - _id, _lib._sel_removeCookiesSinceDate_1, date?._id ?? ffi.nullptr); + void removeCookiesSinceDate_(NSDate date) { + _lib._objc_msgSend_373(_id, _lib._sel_removeCookiesSinceDate_1, date._id); } - NSArray cookiesForURL_(NSURL? URL) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_cookiesForURL_1, URL?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); + NSArray? cookiesForURL_(NSURL URL) { + final _ret = + _lib._objc_msgSend_167(_id, _lib._sel_cookiesForURL_1, URL._id); + return _ret.address == 0 + ? null + : NSArray._(_ret, _lib, retain: true, release: true); } void setCookies_forURL_mainDocumentURL_( - NSArray? cookies, NSURL? URL, NSURL? mainDocumentURL) { - return _lib._objc_msgSend_403( + NSArray cookies, NSURL? URL, NSURL? mainDocumentURL) { + _lib._objc_msgSend_433( _id, _lib._sel_setCookies_forURL_mainDocumentURL_1, - cookies?._id ?? ffi.nullptr, + cookies._id, URL?._id ?? ffi.nullptr, mainDocumentURL?._id ?? ffi.nullptr); } int get cookieAcceptPolicy { - return _lib._objc_msgSend_404(_id, _lib._sel_cookieAcceptPolicy1); + return _lib._objc_msgSend_434(_id, _lib._sel_cookieAcceptPolicy1); } set cookieAcceptPolicy(int value) { - _lib._objc_msgSend_405(_id, _lib._sel_setCookieAcceptPolicy_1, value); + return _lib._objc_msgSend_435( + _id, _lib._sel_setCookieAcceptPolicy_1, value); } - NSArray sortedCookiesUsingDescriptors_(NSArray? sortOrder) { - final _ret = _lib._objc_msgSend_97( - _id, - _lib._sel_sortedCookiesUsingDescriptors_1, - sortOrder?._id ?? ffi.nullptr); + NSArray sortedCookiesUsingDescriptors_(NSArray sortOrder) { + final _ret = _lib._objc_msgSend_102( + _id, _lib._sel_sortedCookiesUsingDescriptors_1, sortOrder._id); return NSArray._(_ret, _lib, retain: true, release: true); } - void storeCookies_forTask_(NSArray? cookies, NSURLSessionTask? task) { - return _lib._objc_msgSend_406(_id, _lib._sel_storeCookies_forTask_1, - cookies?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); + void storeCookies_forTask_(NSArray cookies, NSURLSessionTask task) { + _lib._objc_msgSend_436( + _id, _lib._sel_storeCookies_forTask_1, cookies._id, task._id); } void getCookiesForTask_completionHandler_( - NSURLSessionTask? task, ObjCBlock21 completionHandler) { - return _lib._objc_msgSend_407( - _id, - _lib._sel_getCookiesForTask_completionHandler_1, - task?._id ?? ffi.nullptr, - completionHandler._id); + NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { + _lib._objc_msgSend_437(_id, _lib._sel_getCookiesForTask_completionHandler_1, + task._id, completionHandler._id); + } + + @override + NSHTTPCookieStorage init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); } static NSHTTPCookieStorage new1(NativeCupertinoHttp _lib) { @@ -72641,6 +74464,13 @@ class NSHTTPCookieStorage extends NSObject { return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); } + static NSHTTPCookieStorage allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSHTTPCookieStorage1, _lib._sel_allocWithZone_1, zone); + return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + } + static NSHTTPCookieStorage alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); @@ -72672,33 +74502,39 @@ class NSHTTPCookie extends _ObjCWrapper { } } -void _ObjCBlock21_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} - -final _ObjCBlock21_closureRegistry = {}; -int _ObjCBlock21_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock21_registerClosure(Function fn) { - final id = ++_ObjCBlock21_closureRegistryIndex; - _ObjCBlock21_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSArray_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSArray_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock21_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock21_closureRegistry[block.ref.target.address]!(arg0); -} +void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSArray_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock21 extends _ObjCBlockBase { - ObjCBlock21._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSArray extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSArray._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock21.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi @@ -72707,37 +74543,72 @@ class ObjCBlock21 extends _ObjCBlockBase { : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock21_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock21.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray.fromFunction( + NativeCupertinoHttp lib, void Function(NSArray?) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock21_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) .cast(), - _ObjCBlock21_registerClosure(fn)), + _ObjCBlock_ffiVoid_NSArray_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSArray._(arg0, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSArray.listener( + NativeCupertinoHttp lib, void Function(NSArray?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSArray._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSArray? arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); } final class CFArrayCallBacks extends ffi.Struct { @@ -72753,73 +74624,49 @@ final class CFArrayCallBacks extends ffi.Struct { external CFArrayEqualCallBack equal; } -typedef CFArrayRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef allocator, ffi.Pointer value)>>; -typedef CFArrayReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef allocator, ffi.Pointer value)>>; -typedef CFArrayCopyDescriptionCallBack = ffi.Pointer< - ffi.NativeFunction value)>>; -typedef CFArrayEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function( - ffi.Pointer value1, ffi.Pointer value2)>>; +typedef CFArrayRetainCallBack + = ffi.Pointer>; +typedef CFArrayRetainCallBackFunction = ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFArrayReleaseCallBack + = ffi.Pointer>; +typedef CFArrayReleaseCallBackFunction = ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef DartCFArrayReleaseCallBackFunction = void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFArrayCopyDescriptionCallBack + = ffi.Pointer>; +typedef CFArrayCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer value); +typedef CFArrayEqualCallBack + = ffi.Pointer>; +typedef CFArrayEqualCallBackFunction = Boolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef DartCFArrayEqualCallBackFunction = DartBoolean Function( + ffi.Pointer value1, ffi.Pointer value2); final class __CFArray extends ffi.Opaque {} typedef CFArrayRef = ffi.Pointer<__CFArray>; typedef CFMutableArrayRef = ffi.Pointer<__CFArray>; -typedef CFArrayApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer value, ffi.Pointer context)>>; -typedef CFComparatorFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer val1, - ffi.Pointer val2, ffi.Pointer context)>>; - -class OS_object extends NSObject { - OS_object._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [OS_object] that points to the same underlying object as [other]. - static OS_object castFrom(T other) { - return OS_object._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [OS_object] that wraps the given raw object pointer. - static OS_object castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return OS_object._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [OS_object]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_OS_object1); - } - - @override - OS_object init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_object._(_ret, _lib, retain: true, release: true); - } - - static OS_object new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_new1); - return OS_object._(_ret, _lib, retain: false, release: true); - } - - static OS_object alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_OS_object1, _lib._sel_alloc1); - return OS_object._(_ret, _lib, retain: false, release: true); - } -} +typedef CFArrayApplierFunction + = ffi.Pointer>; +typedef CFArrayApplierFunctionFunction = ffi.Void Function( + ffi.Pointer value, ffi.Pointer context); +typedef DartCFArrayApplierFunctionFunction = void Function( + ffi.Pointer value, ffi.Pointer context); +typedef CFComparatorFunction + = ffi.Pointer>; +typedef CFComparatorFunctionFunction = ffi.Int32 Function( + ffi.Pointer val1, + ffi.Pointer val2, + ffi.Pointer context); +typedef DartCFComparatorFunctionFunction = int Function( + ffi.Pointer val1, + ffi.Pointer val2, + ffi.Pointer context); + +final class sec_object extends ffi.Opaque {} final class __SecCertificate extends ffi.Opaque {} @@ -72892,6 +74739,7 @@ final class _RuneEntry extends ffi.Struct { typedef __darwin_rune_t = __darwin_wchar_t; typedef __darwin_wchar_t = ffi.Int; +typedef Dart__darwin_wchar_t = int; final class _RuneRange extends ffi.Struct { @ffi.Int() @@ -72955,6 +74803,7 @@ final class _RuneLocale extends ffi.Struct { } typedef __darwin_ct_rune_t = ffi.Int; +typedef Dart__darwin_ct_rune_t = int; final class lconv extends ffi.Struct { external ffi.Pointer decimal_point; @@ -73020,22 +74869,6 @@ final class lconv extends ffi.Struct { external int int_n_sign_posn; } -final class __float2 extends ffi.Struct { - @ffi.Float() - external double __sinval; - - @ffi.Float() - external double __cosval; -} - -final class __double2 extends ffi.Struct { - @ffi.Double() - external double __sinval; - - @ffi.Double() - external double __cosval; -} - final class exception extends ffi.Struct { @ffi.Int() external int type; @@ -73130,12 +74963,16 @@ final class __sFILE extends ffi.Struct { typedef fpos_t = __darwin_off_t; typedef __darwin_off_t = __int64_t; typedef __int64_t = ffi.LongLong; +typedef Dart__int64_t = int; typedef FILE = __sFILE; typedef off_t = __darwin_off_t; typedef ssize_t = __darwin_ssize_t; typedef __darwin_ssize_t = ffi.Long; +typedef Dart__darwin_ssize_t = int; typedef errno_t = ffi.Int; +typedef Darterrno_t = int; typedef rsize_t = ffi.UnsignedLong; +typedef Dartrsize_t = int; final class timespec extends ffi.Struct { @__darwin_time_t() @@ -73181,6 +75018,7 @@ final class tm extends ffi.Struct { typedef clock_t = __darwin_clock_t; typedef __darwin_clock_t = ffi.UnsignedLong; +typedef Dart__darwin_clock_t = int; typedef time_t = __darwin_time_t; abstract class clockid_t { @@ -73195,6 +75033,7 @@ abstract class clockid_t { } typedef intmax_t = ffi.Long; +typedef Dartintmax_t = int; final class imaxdiv_t extends ffi.Struct { @intmax_t() @@ -73205,6 +75044,7 @@ final class imaxdiv_t extends ffi.Struct { } typedef uintmax_t = ffi.UnsignedLong; +typedef Dartuintmax_t = int; final class CFBagCallBacks extends ffi.Struct { @CFIndex() @@ -73221,31 +75061,43 @@ final class CFBagCallBacks extends ffi.Struct { external CFBagHashCallBack hash; } -typedef CFBagRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef allocator, ffi.Pointer value)>>; -typedef CFBagReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef allocator, ffi.Pointer value)>>; -typedef CFBagCopyDescriptionCallBack = ffi.Pointer< - ffi.NativeFunction value)>>; -typedef CFBagEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function( - ffi.Pointer value1, ffi.Pointer value2)>>; -typedef CFBagHashCallBack = ffi.Pointer< - ffi.NativeFunction value)>>; +typedef CFBagRetainCallBack + = ffi.Pointer>; +typedef CFBagRetainCallBackFunction = ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFBagReleaseCallBack + = ffi.Pointer>; +typedef CFBagReleaseCallBackFunction = ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef DartCFBagReleaseCallBackFunction = void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFBagCopyDescriptionCallBack + = ffi.Pointer>; +typedef CFBagCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer value); +typedef CFBagEqualCallBack + = ffi.Pointer>; +typedef CFBagEqualCallBackFunction = Boolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef DartCFBagEqualCallBackFunction = DartBoolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef CFBagHashCallBack + = ffi.Pointer>; +typedef CFBagHashCallBackFunction = CFHashCode Function( + ffi.Pointer value); +typedef DartCFBagHashCallBackFunction = DartCFHashCode Function( + ffi.Pointer value); final class __CFBag extends ffi.Opaque {} typedef CFBagRef = ffi.Pointer<__CFBag>; typedef CFMutableBagRef = ffi.Pointer<__CFBag>; -typedef CFBagApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer value, ffi.Pointer context)>>; +typedef CFBagApplierFunction + = ffi.Pointer>; +typedef CFBagApplierFunctionFunction = ffi.Void Function( + ffi.Pointer value, ffi.Pointer context); +typedef DartCFBagApplierFunctionFunction = void Function( + ffi.Pointer value, ffi.Pointer context); final class CFBinaryHeapCompareContext extends ffi.Struct { @CFIndex() @@ -73295,10 +75147,12 @@ final class CFBinaryHeapCallBacks extends ffi.Struct { final class __CFBinaryHeap extends ffi.Opaque {} typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; -typedef CFBinaryHeapApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer val, ffi.Pointer context)>>; +typedef CFBinaryHeapApplierFunction + = ffi.Pointer>; +typedef CFBinaryHeapApplierFunctionFunction = ffi.Void Function( + ffi.Pointer val, ffi.Pointer context); +typedef DartCFBinaryHeapApplierFunctionFunction = void Function( + ffi.Pointer val, ffi.Pointer context); final class __CFBitVector extends ffi.Opaque {} @@ -73337,22 +75191,32 @@ final class CFDictionaryKeyCallBacks extends ffi.Struct { external CFDictionaryHashCallBack hash; } -typedef CFDictionaryRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef allocator, ffi.Pointer value)>>; -typedef CFDictionaryReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef allocator, ffi.Pointer value)>>; -typedef CFDictionaryCopyDescriptionCallBack = ffi.Pointer< - ffi.NativeFunction value)>>; -typedef CFDictionaryEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function( - ffi.Pointer value1, ffi.Pointer value2)>>; -typedef CFDictionaryHashCallBack = ffi.Pointer< - ffi.NativeFunction value)>>; +typedef CFDictionaryRetainCallBack + = ffi.Pointer>; +typedef CFDictionaryRetainCallBackFunction = ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFDictionaryReleaseCallBack + = ffi.Pointer>; +typedef CFDictionaryReleaseCallBackFunction = ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef DartCFDictionaryReleaseCallBackFunction = void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFDictionaryCopyDescriptionCallBack = ffi + .Pointer>; +typedef CFDictionaryCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer value); +typedef CFDictionaryEqualCallBack + = ffi.Pointer>; +typedef CFDictionaryEqualCallBackFunction = Boolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef DartCFDictionaryEqualCallBackFunction = DartBoolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef CFDictionaryHashCallBack + = ffi.Pointer>; +typedef CFDictionaryHashCallBackFunction = CFHashCode Function( + ffi.Pointer value); +typedef DartCFDictionaryHashCallBackFunction = DartCFHashCode Function( + ffi.Pointer value); final class CFDictionaryValueCallBacks extends ffi.Struct { @CFIndex() @@ -73371,10 +75235,16 @@ final class __CFDictionary extends ffi.Opaque {} typedef CFDictionaryRef = ffi.Pointer<__CFDictionary>; typedef CFMutableDictionaryRef = ffi.Pointer<__CFDictionary>; -typedef CFDictionaryApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer key, - ffi.Pointer value, ffi.Pointer context)>>; +typedef CFDictionaryApplierFunction + = ffi.Pointer>; +typedef CFDictionaryApplierFunctionFunction = ffi.Void Function( + ffi.Pointer key, + ffi.Pointer value, + ffi.Pointer context); +typedef DartCFDictionaryApplierFunctionFunction = void Function( + ffi.Pointer key, + ffi.Pointer value, + ffi.Pointer context); final class __CFNotificationCenter extends ffi.Opaque {} @@ -73386,14 +75256,20 @@ abstract class CFNotificationSuspensionBehavior { } typedef CFNotificationCenterRef = ffi.Pointer<__CFNotificationCenter>; -typedef CFNotificationCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFNotificationCenterRef center, - ffi.Pointer observer, - CFNotificationName name, - ffi.Pointer object, - CFDictionaryRef userInfo)>>; +typedef CFNotificationCallback + = ffi.Pointer>; +typedef CFNotificationCallbackFunction = ffi.Void Function( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo); +typedef DartCFNotificationCallbackFunction = void Function( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo); typedef CFNotificationName = CFStringRef; final class __CFLocale extends ffi.Opaque {} @@ -73415,6 +75291,7 @@ typedef CFLocaleKey = CFStringRef; typedef CFCalendarIdentifier = CFStringRef; typedef CFAbsoluteTime = CFTimeInterval; typedef CFTimeInterval = ffi.Double; +typedef DartCFTimeInterval = double; final class __CFDate extends ffi.Opaque {} @@ -73443,6 +75320,7 @@ final class CFGregorianDate extends ffi.Struct { } typedef SInt8 = ffi.SignedChar; +typedef DartSInt8 = int; final class CFGregorianUnits extends ffi.Struct { @SInt32() @@ -73614,6 +75492,7 @@ final class CGPoint extends ffi.Struct { } typedef CGFloat = ffi.Double; +typedef DartCGFloat = double; final class CGSize extends ffi.Struct { @CGFloat() @@ -73861,10 +75740,12 @@ final class mach_port_status extends ffi.Struct { typedef mach_port_rights_t = natural_t; typedef natural_t = __darwin_natural_t; typedef __darwin_natural_t = ffi.UnsignedInt; +typedef Dart__darwin_natural_t = int; typedef mach_port_seqno_t = natural_t; typedef mach_port_mscount_t = natural_t; typedef mach_port_msgcount_t = natural_t; typedef boolean_t = ffi.Int; +typedef Dartboolean_t = int; final class mach_port_limits extends ffi.Struct { @mach_port_msgcount_t() @@ -73931,6 +75812,7 @@ abstract class mach_port_guard_exception_codes { static const int kGUARD_EXC_INVALID_OPTIONS = 3; static const int kGUARD_EXC_SET_CONTEXT = 4; static const int kGUARD_EXC_THREAD_SET_STATE = 5; + static const int kGUARD_EXC_EXCEPTION_BEHAVIOR_ENFORCE = 6; static const int kGUARD_EXC_UNGUARDED = 8; static const int kGUARD_EXC_INCORRECT_GUARD = 16; static const int kGUARD_EXC_IMMOVABLE = 32; @@ -74088,39 +75970,53 @@ final class CFRunLoopObserverContext extends ffi.Struct { copyDescription; } -typedef CFRunLoopObserverCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopObserverRef observer, ffi.Int32 activity, - ffi.Pointer info)>>; -void _ObjCBlock22_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() - .asFunction< - void Function(CFRunLoopObserverRef arg0, int arg1)>()(arg0, arg1); -} - -final _ObjCBlock22_closureRegistry = {}; -int _ObjCBlock22_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock22_registerClosure(Function fn) { - final id = ++_ObjCBlock22_closureRegistryIndex; - _ObjCBlock22_closureRegistry[id] = fn; +typedef CFRunLoopObserverCallBack + = ffi.Pointer>; +typedef CFRunLoopObserverCallBackFunction = ffi.Void Function( + CFRunLoopObserverRef observer, + ffi.Int32 activity, + ffi.Pointer info); +typedef DartCFRunLoopObserverCallBackFunction = void Function( + CFRunLoopObserverRef observer, int activity, ffi.Pointer info); +void _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() + .asFunction()(arg0, arg1); +final _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_registerClosure( + void Function(CFRunLoopObserverRef, int) fn) { + final id = + ++_ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureRegistryIndex; + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureRegistry[ + id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock22_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) { - return _ObjCBlock22_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) => + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock22 extends _ObjCBlockBase { - ObjCBlock22._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity + extends _ObjCBlockBase { + ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock22.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -74129,39 +76025,69 @@ class ObjCBlock22 extends _ObjCBlockBase { : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, - ffi.Int32 arg1)>(_ObjCBlock22_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + CFRunLoopObserverRef, ffi.Int32)>( + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock22.fromFunction(NativeCupertinoHttp lib, - void Function(CFRunLoopObserverRef arg0, int arg1) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity.fromFunction( + NativeCupertinoHttp lib, void Function(CFRunLoopObserverRef, int) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, - ffi.Int32 arg1)>(_ObjCBlock22_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + CFRunLoopObserverRef, ffi.Int32)>( + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureTrampoline) .cast(), - _ObjCBlock22_registerClosure(fn)), + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_registerClosure( + (CFRunLoopObserverRef arg0, int arg1) => fn(arg0, arg1))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(CFRunLoopObserverRef arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, int arg1)>()(_id, arg0, arg1); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity.listener( + NativeCupertinoHttp lib, void Function(CFRunLoopObserverRef, int) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + CFRunLoopObserverRef, ffi.Int32)>.listener( + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_registerClosure( + (CFRunLoopObserverRef arg0, int arg1) => fn(arg0, arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, CFRunLoopObserverRef, ffi.Int32)>? + _dartFuncListenerTrampoline; + + void call(CFRunLoopObserverRef arg0, int arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, CFRunLoopObserverRef, + int)>()(_id, arg0, arg1); } final class CFRunLoopTimerContext extends ffi.Struct { @@ -74183,73 +76109,112 @@ final class CFRunLoopTimerContext extends ffi.Struct { copyDescription; } -typedef CFRunLoopTimerCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFRunLoopTimerRef timer, ffi.Pointer info)>>; -void _ObjCBlock23_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); -} - -final _ObjCBlock23_closureRegistry = {}; -int _ObjCBlock23_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock23_registerClosure(Function fn) { - final id = ++_ObjCBlock23_closureRegistryIndex; - _ObjCBlock23_closureRegistry[id] = fn; +typedef CFRunLoopTimerCallBack + = ffi.Pointer>; +typedef CFRunLoopTimerCallBackFunction = ffi.Void Function( + CFRunLoopTimerRef timer, ffi.Pointer info); +typedef DartCFRunLoopTimerCallBackFunction = void Function( + CFRunLoopTimerRef timer, ffi.Pointer info); +void _ObjCBlock_ffiVoid_CFRunLoopTimerRef_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +final _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_CFRunLoopTimerRef_registerClosure( + void Function(CFRunLoopTimerRef) fn) { + final id = ++_ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureRegistryIndex; + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock23_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) { - return _ObjCBlock23_closureRegistry[block.ref.target.address]!(arg0); -} +void _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) => + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureRegistry[ + block.ref.target.address]!(arg0); -class ObjCBlock23 extends _ObjCBlockBase { - ObjCBlock23._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_CFRunLoopTimerRef extends _ObjCBlockBase { + ObjCBlock_ffiVoid_CFRunLoopTimerRef._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock23.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_CFRunLoopTimerRef.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopTimerRef arg0)>( - _ObjCBlock23_fnPtrTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, CFRunLoopTimerRef)>( + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock23.fromFunction( - NativeCupertinoHttp lib, void Function(CFRunLoopTimerRef arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_CFRunLoopTimerRef.fromFunction( + NativeCupertinoHttp lib, void Function(CFRunLoopTimerRef) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopTimerRef arg0)>( - _ObjCBlock23_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, CFRunLoopTimerRef)>( + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureTrampoline) .cast(), - _ObjCBlock23_registerClosure(fn)), + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_registerClosure( + (CFRunLoopTimerRef arg0) => fn(arg0))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(CFRunLoopTimerRef arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopTimerRef arg0)>()(_id, arg0); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_CFRunLoopTimerRef.listener( + NativeCupertinoHttp lib, void Function(CFRunLoopTimerRef) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + CFRunLoopTimerRef)>.listener( + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_registerClosure( + (CFRunLoopTimerRef arg0) => fn(arg0))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, CFRunLoopTimerRef)>? + _dartFuncListenerTrampoline; + + void call(CFRunLoopTimerRef arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, CFRunLoopTimerRef)>()(_id, arg0); } final class __CFSocket extends ffi.Opaque {} @@ -74302,11 +76267,18 @@ final class CFSocketContext extends ffi.Struct { } typedef CFSocketRef = ffi.Pointer<__CFSocket>; -typedef CFSocketCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFSocketRef s, ffi.Int32 type, CFDataRef address, - ffi.Pointer data, ffi.Pointer info)>>; +typedef CFSocketCallBack + = ffi.Pointer>; +typedef CFSocketCallBackFunction = ffi.Void Function( + CFSocketRef s, + ffi.Int32 type, + CFDataRef address, + ffi.Pointer data, + ffi.Pointer info); +typedef DartCFSocketCallBackFunction = void Function(CFSocketRef s, int type, + CFDataRef address, ffi.Pointer data, ffi.Pointer info); typedef CFSocketNativeHandle = ffi.Int; +typedef DartCFSocketNativeHandle = int; final class accessx_descriptor extends ffi.Struct { @ffi.UnsignedInt() @@ -74466,6 +76438,17 @@ final class fspecread extends ffi.Struct { external int fsr_length; } +final class fattributiontag extends ffi.Struct { + @ffi.UnsignedInt() + external int ft_flags; + + @ffi.UnsignedLongLong() + external int ft_hash; + + @ffi.Array.multi([255]) + external ffi.Array ft_attribution_name; +} + @ffi.Packed(4) final class log2phys extends ffi.Struct { @ffi.UnsignedInt() @@ -74521,156 +76504,28 @@ final class os_workgroup_join_token_opaque_s extends ffi.Struct { external ffi.Array opaque; } -class OS_os_workgroup extends OS_object { - OS_os_workgroup._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [OS_os_workgroup] that points to the same underlying object as [other]. - static OS_os_workgroup castFrom(T other) { - return OS_os_workgroup._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [OS_os_workgroup] that wraps the given raw object pointer. - static OS_os_workgroup castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return OS_os_workgroup._(other, lib, retain: retain, release: release); - } +final class os_workgroup_s extends ffi.Opaque {} - /// Returns whether [obj] is an instance of [OS_os_workgroup]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_OS_os_workgroup1); - } - - @override - OS_os_workgroup init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_os_workgroup._(_ret, _lib, retain: true, release: true); - } - - static OS_os_workgroup new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_OS_os_workgroup1, _lib._sel_new1); - return OS_os_workgroup._(_ret, _lib, retain: false, release: true); - } - - static OS_os_workgroup alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_OS_os_workgroup1, _lib._sel_alloc1); - return OS_os_workgroup._(_ret, _lib, retain: false, release: true); - } -} - -typedef os_workgroup_t = ffi.Pointer; +typedef os_workgroup_t = ffi.Pointer; typedef os_workgroup_join_token_t = ffi.Pointer; -typedef os_workgroup_working_arena_destructor_t - = ffi.Pointer)>>; +typedef os_workgroup_working_arena_destructor_t = ffi.Pointer< + ffi.NativeFunction>; +typedef os_workgroup_working_arena_destructor_tFunction = ffi.Void Function( + ffi.Pointer); +typedef Dartos_workgroup_working_arena_destructor_tFunction = void Function( + ffi.Pointer); typedef os_workgroup_index = ffi.Uint32; +typedef Dartos_workgroup_index = int; final class os_workgroup_max_parallel_threads_attr_s extends ffi.Opaque {} typedef os_workgroup_mpt_attr_t = ffi.Pointer; - -class OS_os_workgroup_interval extends OS_os_workgroup { - OS_os_workgroup_interval._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [OS_os_workgroup_interval] that points to the same underlying object as [other]. - static OS_os_workgroup_interval castFrom(T other) { - return OS_os_workgroup_interval._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [OS_os_workgroup_interval] that wraps the given raw object pointer. - static OS_os_workgroup_interval castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return OS_os_workgroup_interval._(other, lib, - retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [OS_os_workgroup_interval]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_OS_os_workgroup_interval1); - } - - @override - OS_os_workgroup_interval init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_os_workgroup_interval._(_ret, _lib, retain: true, release: true); - } - - static OS_os_workgroup_interval new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_OS_os_workgroup_interval1, _lib._sel_new1); - return OS_os_workgroup_interval._(_ret, _lib, retain: false, release: true); - } - - static OS_os_workgroup_interval alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_OS_os_workgroup_interval1, _lib._sel_alloc1); - return OS_os_workgroup_interval._(_ret, _lib, retain: false, release: true); - } -} - -typedef os_workgroup_interval_t = ffi.Pointer; +typedef os_workgroup_interval_t = os_workgroup_t; typedef os_workgroup_interval_data_t = ffi.Pointer; - -class OS_os_workgroup_parallel extends OS_os_workgroup { - OS_os_workgroup_parallel._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [OS_os_workgroup_parallel] that points to the same underlying object as [other]. - static OS_os_workgroup_parallel castFrom(T other) { - return OS_os_workgroup_parallel._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [OS_os_workgroup_parallel] that wraps the given raw object pointer. - static OS_os_workgroup_parallel castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return OS_os_workgroup_parallel._(other, lib, - retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [OS_os_workgroup_parallel]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_OS_os_workgroup_parallel1); - } - - @override - OS_os_workgroup_parallel init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return OS_os_workgroup_parallel._(_ret, _lib, retain: true, release: true); - } - - static OS_os_workgroup_parallel new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_OS_os_workgroup_parallel1, _lib._sel_new1); - return OS_os_workgroup_parallel._(_ret, _lib, retain: false, release: true); - } - - static OS_os_workgroup_parallel alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_OS_os_workgroup_parallel1, _lib._sel_alloc1); - return OS_os_workgroup_parallel._(_ret, _lib, retain: false, release: true); - } -} - -typedef os_workgroup_parallel_t = ffi.Pointer; +typedef os_workgroup_parallel_t = os_workgroup_t; typedef os_workgroup_attr_t = ffi.Pointer; final class time_value extends ffi.Struct { @@ -74682,6 +76537,7 @@ final class time_value extends ffi.Struct { } typedef integer_t = ffi.Int; +typedef Dartinteger_t = int; final class mach_timespec extends ffi.Struct { @ffi.UnsignedInt() @@ -74692,7 +76548,9 @@ final class mach_timespec extends ffi.Struct { } typedef clock_res_t = ffi.Int; +typedef Dartclock_res_t = int; typedef dispatch_time_t = ffi.Uint64; +typedef Dartdispatch_time_t = int; abstract class qos_class_t { static const int QOS_CLASS_USER_INTERACTIVE = 33; @@ -74703,75 +76561,158 @@ abstract class qos_class_t { static const int QOS_CLASS_UNSPECIFIED = 0; } -typedef dispatch_object_t = ffi.Pointer; -typedef dispatch_function_t - = ffi.Pointer)>>; -typedef dispatch_block_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock24_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); +final class dispatch_object_t extends ffi.Union { + external ffi.Pointer<_os_object_s> _os_obj; + + external ffi.Pointer _do; + + external ffi.Pointer _dq; + + external ffi.Pointer _dqa; + + external ffi.Pointer _dg; + + external ffi.Pointer _ds; + + external ffi.Pointer _dch; + + external ffi.Pointer _dm; + + external ffi.Pointer _dmsg; + + external ffi.Pointer _dsema; + + external ffi.Pointer _ddata; + + external ffi.Pointer _dchannel; } -final _ObjCBlock24_closureRegistry = {}; -int _ObjCBlock24_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock24_registerClosure(Function fn) { - final id = ++_ObjCBlock24_closureRegistryIndex; - _ObjCBlock24_closureRegistry[id] = fn; +final class _os_object_s extends ffi.Opaque {} + +final class dispatch_object_s extends ffi.Opaque {} + +final class dispatch_queue_attr_s extends ffi.Opaque {} + +final class dispatch_group_s extends ffi.Opaque {} + +final class dispatch_source_s extends ffi.Opaque {} + +final class dispatch_channel_s extends ffi.Opaque {} + +final class dispatch_mach_s extends ffi.Opaque {} + +final class dispatch_mach_msg_s extends ffi.Opaque {} + +final class dispatch_semaphore_s extends ffi.Opaque {} + +final class dispatch_data_s extends ffi.Opaque {} + +final class dispatch_io_s extends ffi.Opaque {} + +typedef dispatch_function_t + = ffi.Pointer>; +typedef dispatch_function_tFunction = ffi.Void Function(ffi.Pointer); +typedef Dartdispatch_function_tFunction = void Function(ffi.Pointer); +typedef dispatch_block_t = ffi.Pointer<_ObjCBlock>; +typedef Dartdispatch_block_t = ObjCBlock_ffiVoid; +void _ObjCBlock_ffiVoid_ffiSize_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +final _ObjCBlock_ffiVoid_ffiSize_closureRegistry = {}; +int _ObjCBlock_ffiVoid_ffiSize_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ffiSize_registerClosure( + void Function(int) fn) { + final id = ++_ObjCBlock_ffiVoid_ffiSize_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiSize_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock24_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock24_closureRegistry[block.ref.target.address]!(arg0); -} +void _ObjCBlock_ffiVoid_ffiSize_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0) => + _ObjCBlock_ffiVoid_ffiSize_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock24 extends _ObjCBlockBase { - ObjCBlock24._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_ffiSize extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ffiSize._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock24.fromFunctionPointer(NativeCupertinoHttp lib, + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiSize.fromFunctionPointer(NativeCupertinoHttp lib, ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Size arg0)>(_ObjCBlock24_fnPtrTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Size)>( + _ObjCBlock_ffiVoid_ffiSize_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock24.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiSize.fromFunction( + NativeCupertinoHttp lib, void Function(int) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Size arg0)>(_ObjCBlock24_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Size)>( + _ObjCBlock_ffiVoid_ffiSize_closureTrampoline) .cast(), - _ObjCBlock24_registerClosure(fn)), + _ObjCBlock_ffiVoid_ffiSize_registerClosure( + (int arg0) => fn(arg0))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Size arg0)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); - } -} -final class dispatch_queue_s extends ffi.Opaque {} - -typedef dispatch_queue_global_t = ffi.Pointer; + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiSize.listener( + NativeCupertinoHttp lib, void Function(int) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Size)>.listener( + _ObjCBlock_ffiVoid_ffiSize_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiSize_registerClosure( + (int arg0) => fn(arg0))), + lib); + static ffi + .NativeCallable, ffi.Size)>? + _dartFuncListenerTrampoline; -final class dispatch_queue_attr_s extends ffi.Opaque {} + void call(int arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Size arg0)>>() + .asFunction, int)>()(_id, arg0); +} -typedef dispatch_queue_attr_t = ffi.Pointer; +typedef dispatch_queue_global_t = dispatch_queue_t; +typedef dispatch_queue_attr_t = ffi.Pointer; abstract class dispatch_autorelease_frequency_t { static const int DISPATCH_AUTORELEASE_FREQUENCY_INHERIT = 0; @@ -74840,6 +76781,7 @@ final class mach_msg_header_t extends ffi.Struct { } typedef mach_msg_bits_t = ffi.UnsignedInt; +typedef Dartmach_msg_bits_t = int; typedef mach_msg_id_t = integer_t; final class mach_msg_base_t extends ffi.Struct { @@ -74857,7 +76799,9 @@ final class mach_msg_trailer_t extends ffi.Struct { } typedef mach_msg_trailer_type_t = ffi.UnsignedInt; +typedef Dartmach_msg_trailer_type_t = int; typedef mach_msg_trailer_size_t = ffi.UnsignedInt; +typedef Dartmach_msg_trailer_size_t = int; final class mach_msg_seqno_trailer_t extends ffi.Struct { @mach_msg_trailer_type_t() @@ -74929,6 +76873,7 @@ final class mach_msg_context_trailer_t extends ffi.Struct { typedef mach_port_context_t = vm_offset_t; typedef vm_offset_t = ffi.UintPtr; +typedef Dartvm_offset_t = int; final class msg_labels_t extends ffi.Struct { @mach_port_name_t() @@ -74960,6 +76905,7 @@ final class mach_msg_mac_trailer_t extends ffi.Struct { } typedef mach_msg_filter_id = ffi.Int; +typedef Dartmach_msg_filter_id = int; final class mach_msg_empty_send_t extends ffi.Struct { external mach_msg_header_t header; @@ -74979,53 +76925,72 @@ final class mach_msg_empty_t extends ffi.Union { typedef mach_msg_return_t = kern_return_t; typedef kern_return_t = ffi.Int; +typedef Dartkern_return_t = int; typedef mach_msg_option_t = integer_t; typedef mach_msg_timeout_t = natural_t; final class dispatch_source_type_s extends ffi.Opaque {} -typedef dispatch_source_t = ffi.Pointer; +typedef dispatch_source_t = ffi.Pointer; typedef dispatch_source_type_t = ffi.Pointer; -typedef dispatch_group_t = ffi.Pointer; -typedef dispatch_semaphore_t = ffi.Pointer; +typedef dispatch_group_t = ffi.Pointer; +typedef dispatch_semaphore_t = ffi.Pointer; typedef dispatch_once_t = ffi.IntPtr; - -final class dispatch_data_s extends ffi.Opaque {} - -typedef dispatch_data_t = ffi.Pointer; +typedef Dartdispatch_once_t = int; +typedef dispatch_data_t = ffi.Pointer; typedef dispatch_data_applier_t = ffi.Pointer<_ObjCBlock>; -bool _ObjCBlock25_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, - ffi.Pointer arg2, ffi.Size arg3)>>() - .asFunction< - bool Function(dispatch_data_t arg0, int arg1, - ffi.Pointer arg2, int arg3)>()(arg0, arg1, arg2, arg3); -} - -final _ObjCBlock25_closureRegistry = {}; -int _ObjCBlock25_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock25_registerClosure(Function fn) { - final id = ++_ObjCBlock25_closureRegistryIndex; - _ObjCBlock25_closureRegistry[id] = fn; +typedef Dartdispatch_data_applier_t + = ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize; +bool _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + int arg1, + ffi.Pointer arg2, + int arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, + ffi.Pointer arg2, ffi.Size arg3)>>() + .asFunction< + bool Function(dispatch_data_t, int, ffi.Pointer, + int)>()(arg0, arg1, arg2, arg3); +final _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureRegistry = + , int)>{}; +int _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_registerClosure( + bool Function(dispatch_data_t, int, ffi.Pointer, int) fn) { + final id = + ++_ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureRegistryIndex; + _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureRegistry[id] = + fn; return ffi.Pointer.fromAddress(id); } -bool _ObjCBlock25_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { - return _ObjCBlock25_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2, arg3); -} - -class ObjCBlock25 extends _ObjCBlockBase { - ObjCBlock25._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +bool _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + int arg1, + ffi.Pointer arg2, + int arg3) => + _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2, arg3); + +class ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize + extends _ObjCBlockBase { + ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock25.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -75035,87 +77000,97 @@ class ObjCBlock25 extends _ObjCBlockBase { : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Size arg1, - ffi.Pointer arg2, - ffi.Size arg3)>(_ObjCBlock25_fnPtrTrampoline, false) + ffi.Bool Function( + ffi.Pointer<_ObjCBlock>, + dispatch_data_t, + ffi.Size, + ffi.Pointer, + ffi.Size)>( + _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_fnPtrTrampoline, + false) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock25.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize.fromFunction( NativeCupertinoHttp lib, - bool Function(dispatch_data_t arg0, int arg1, ffi.Pointer arg2, - int arg3) - fn) + bool Function(dispatch_data_t, int, ffi.Pointer, int) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Size arg1, - ffi.Pointer arg2, - ffi.Size arg3)>( - _ObjCBlock25_closureTrampoline, false) + ffi.Pointer<_ObjCBlock>, + dispatch_data_t, + ffi.Size, + ffi.Pointer, + ffi.Size)>( + _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureTrampoline, false) .cast(), - _ObjCBlock25_registerClosure(fn)), + _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_registerClosure( + (dispatch_data_t arg0, int arg1, ffi.Pointer arg2, + int arg3) => + fn(arg0, arg1, arg2, arg3))), lib); static ffi.Pointer? _dartFuncTrampoline; - bool call( - dispatch_data_t arg0, int arg1, ffi.Pointer arg2, int arg3) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Size arg1, - ffi.Pointer arg2, - ffi.Size arg3)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - int arg1, - ffi.Pointer arg2, - int arg3)>()(_id, arg0, arg1, arg2, arg3); - } -} -typedef dispatch_fd_t = ffi.Int; -void _ObjCBlock26_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>>() - .asFunction()(arg0, arg1); + bool call(dispatch_data_t arg0, int arg1, ffi.Pointer arg2, + int arg3) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + ffi.Size arg1, + ffi.Pointer arg2, + ffi.Size arg3)>>() + .asFunction< + bool Function(ffi.Pointer<_ObjCBlock>, dispatch_data_t, int, + ffi.Pointer, int)>()(_id, arg0, arg1, arg2, arg3); } -final _ObjCBlock26_closureRegistry = {}; -int _ObjCBlock26_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock26_registerClosure(Function fn) { - final id = ++_ObjCBlock26_closureRegistryIndex; - _ObjCBlock26_closureRegistry[id] = fn; +typedef dispatch_fd_t = ffi.Int; +typedef Dartdispatch_fd_t = int; +void _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>>() + .asFunction()(arg0, arg1); +final _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_registerClosure( + void Function(dispatch_data_t, int) fn) { + final id = ++_ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureRegistryIndex; + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock26_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) { - return _ObjCBlock26_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) => + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock26 extends _ObjCBlockBase { - ObjCBlock26._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_dispatchdatat_ffiInt extends _ObjCBlockBase { + ObjCBlock_ffiVoid_dispatchdatat_ffiInt._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock26.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_dispatchdatat_ffiInt.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -75124,183 +77099,294 @@ class ObjCBlock26 extends _ObjCBlockBase { : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Int arg1)>(_ObjCBlock26_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + dispatch_data_t, ffi.Int)>( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock26.fromFunction( - NativeCupertinoHttp lib, void Function(dispatch_data_t arg0, int arg1) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_dispatchdatat_ffiInt.fromFunction( + NativeCupertinoHttp lib, void Function(dispatch_data_t, int) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Int arg1)>(_ObjCBlock26_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + dispatch_data_t, ffi.Int)>( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureTrampoline) .cast(), - _ObjCBlock26_registerClosure(fn)), + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_registerClosure( + (dispatch_data_t arg0, int arg1) => fn(arg0, arg1))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(dispatch_data_t arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, ffi.Int arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, - int arg1)>()(_id, arg0, arg1); - } -} -typedef dispatch_io_t = ffi.Pointer; -typedef dispatch_io_type_t = ffi.UnsignedLong; -void _ObjCBlock27_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_dispatchdatat_ffiInt.listener( + NativeCupertinoHttp lib, void Function(dispatch_data_t, int) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + dispatch_data_t, ffi.Int)>.listener( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_registerClosure( + (dispatch_data_t arg0, int arg1) => fn(arg0, arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, dispatch_data_t, ffi.Int)>? + _dartFuncListenerTrampoline; + + void call(dispatch_data_t arg0, int arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, ffi.Int arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, dispatch_data_t, int)>()( + _id, arg0, arg1); } -final _ObjCBlock27_closureRegistry = {}; -int _ObjCBlock27_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock27_registerClosure(Function fn) { - final id = ++_ObjCBlock27_closureRegistryIndex; - _ObjCBlock27_closureRegistry[id] = fn; +typedef dispatch_io_t = ffi.Pointer; +typedef dispatch_io_type_t = ffi.UnsignedLong; +typedef Dartdispatch_io_type_t = int; +void _ObjCBlock_ffiVoid_ffiInt_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +final _ObjCBlock_ffiVoid_ffiInt_closureRegistry = {}; +int _ObjCBlock_ffiVoid_ffiInt_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ffiInt_registerClosure( + void Function(int) fn) { + final id = ++_ObjCBlock_ffiVoid_ffiInt_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiInt_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock27_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock27_closureRegistry[block.ref.target.address]!(arg0); -} +void _ObjCBlock_ffiVoid_ffiInt_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0) => + _ObjCBlock_ffiVoid_ffiInt_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock27 extends _ObjCBlockBase { - ObjCBlock27._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_ffiInt extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ffiInt._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock27.fromFunctionPointer(NativeCupertinoHttp lib, + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiInt.fromFunctionPointer(NativeCupertinoHttp lib, ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Int arg0)>(_ObjCBlock27_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Int)>(_ObjCBlock_ffiVoid_ffiInt_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock27.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiInt.fromFunction( + NativeCupertinoHttp lib, void Function(int) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Int arg0)>(_ObjCBlock27_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Int)>( + _ObjCBlock_ffiVoid_ffiInt_closureTrampoline) .cast(), - _ObjCBlock27_registerClosure(fn)), + _ObjCBlock_ffiVoid_ffiInt_registerClosure( + (int arg0) => fn(arg0))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Int arg0)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); - } -} -typedef dispatch_io_handler_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock28_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { - return block.ref.target + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiInt.listener( + NativeCupertinoHttp lib, void Function(int) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Int)>.listener( + _ObjCBlock_ffiVoid_ffiInt_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiInt_registerClosure( + (int arg0) => fn(arg0))), + lib); + static ffi + .NativeCallable, ffi.Int)>? + _dartFuncListenerTrampoline; + + void call(int arg0) => _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() - .asFunction< - void Function( - bool arg0, dispatch_data_t arg1, int arg2)>()(arg0, arg1, arg2); + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Int arg0)>>() + .asFunction, int)>()(_id, arg0); } -final _ObjCBlock28_closureRegistry = {}; -int _ObjCBlock28_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock28_registerClosure(Function fn) { - final id = ++_ObjCBlock28_closureRegistryIndex; - _ObjCBlock28_closureRegistry[id] = fn; +typedef dispatch_io_handler_t = ffi.Pointer<_ObjCBlock>; +typedef Dartdispatch_io_handler_t = ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt; +void _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + bool arg0, + dispatch_data_t arg1, + int arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() + .asFunction()( + arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_registerClosure( + void Function(bool, dispatch_data_t, int) fn) { + final id = + ++_ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureRegistryIndex; + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock28_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0, dispatch_data_t arg1, int arg2) { - return _ObjCBlock28_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +void _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + bool arg0, + dispatch_data_t arg1, + int arg2) => + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock28 extends _ObjCBlockBase { - ObjCBlock28._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt extends _ObjCBlockBase { + ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock28.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Bool arg0, dispatch_data_t arg1, - ffi.Int arg2)>> + ffi.Void Function( + ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0, - dispatch_data_t arg1, - ffi.Int arg2)>(_ObjCBlock28_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Bool, + dispatch_data_t, ffi.Int)>( + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock28.fromFunction(NativeCupertinoHttp lib, - void Function(bool arg0, dispatch_data_t arg1, int arg2) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt.fromFunction( + NativeCupertinoHttp lib, void Function(bool, dispatch_data_t, int) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0, - dispatch_data_t arg1, - ffi.Int arg2)>(_ObjCBlock28_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Bool, + dispatch_data_t, ffi.Int)>( + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureTrampoline) .cast(), - _ObjCBlock28_registerClosure(fn)), + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_registerClosure( + (bool arg0, dispatch_data_t arg1, int arg2) => + fn(arg0, arg1, arg2))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(bool arg0, dispatch_data_t arg1, int arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0, - dispatch_data_t arg1, ffi.Int arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, bool arg0, - dispatch_data_t arg1, int arg2)>()(_id, arg0, arg1, arg2); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt.listener( + NativeCupertinoHttp lib, void Function(bool, dispatch_data_t, int) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Bool, + dispatch_data_t, ffi.Int)>.listener( + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_registerClosure( + (bool arg0, dispatch_data_t arg1, int arg2) => + fn(arg0, arg1, arg2))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Bool, dispatch_data_t, ffi.Int)>? + _dartFuncListenerTrampoline; + + void call(bool arg0, dispatch_data_t arg1, int arg2) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0, + dispatch_data_t arg1, ffi.Int arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, bool, dispatch_data_t, + int)>()(_id, arg0, arg1, arg2); } typedef dispatch_io_close_flags_t = ffi.UnsignedLong; +typedef Dartdispatch_io_close_flags_t = int; typedef dispatch_io_interval_flags_t = ffi.UnsignedLong; -typedef dispatch_workloop_t = ffi.Pointer; +typedef Dartdispatch_io_interval_flags_t = int; +typedef dispatch_workloop_t = dispatch_queue_t; final class CFStreamError extends ffi.Struct { @CFIndex() @@ -75356,14 +77442,24 @@ final class __CFWriteStream extends ffi.Opaque {} typedef CFStreamPropertyKey = CFStringRef; typedef CFReadStreamRef = ffi.Pointer<__CFReadStream>; typedef CFWriteStreamRef = ffi.Pointer<__CFWriteStream>; -typedef CFReadStreamClientCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef stream, ffi.Int32 type, - ffi.Pointer clientCallBackInfo)>>; -typedef CFWriteStreamClientCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef stream, ffi.Int32 type, - ffi.Pointer clientCallBackInfo)>>; +typedef CFReadStreamClientCallBack + = ffi.Pointer>; +typedef CFReadStreamClientCallBackFunction = ffi.Void Function( + CFReadStreamRef stream, + ffi.Int32 type, + ffi.Pointer clientCallBackInfo); +typedef DartCFReadStreamClientCallBackFunction = void Function( + CFReadStreamRef stream, int type, ffi.Pointer clientCallBackInfo); +typedef CFWriteStreamClientCallBack + = ffi.Pointer>; +typedef CFWriteStreamClientCallBackFunction = ffi.Void Function( + CFWriteStreamRef stream, + ffi.Int32 type, + ffi.Pointer clientCallBackInfo); +typedef DartCFWriteStreamClientCallBackFunction = void Function( + CFWriteStreamRef stream, + int type, + ffi.Pointer clientCallBackInfo); abstract class CFStreamErrorDomain { static const int kCFStreamErrorDomainCustom = -1; @@ -75398,31 +77494,43 @@ final class CFSetCallBacks extends ffi.Struct { external CFSetHashCallBack hash; } -typedef CFSetRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef allocator, ffi.Pointer value)>>; -typedef CFSetReleaseCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef allocator, ffi.Pointer value)>>; -typedef CFSetCopyDescriptionCallBack = ffi.Pointer< - ffi.NativeFunction value)>>; -typedef CFSetEqualCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function( - ffi.Pointer value1, ffi.Pointer value2)>>; -typedef CFSetHashCallBack = ffi.Pointer< - ffi.NativeFunction value)>>; +typedef CFSetRetainCallBack + = ffi.Pointer>; +typedef CFSetRetainCallBackFunction = ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFSetReleaseCallBack + = ffi.Pointer>; +typedef CFSetReleaseCallBackFunction = ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef DartCFSetReleaseCallBackFunction = void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFSetCopyDescriptionCallBack + = ffi.Pointer>; +typedef CFSetCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer value); +typedef CFSetEqualCallBack + = ffi.Pointer>; +typedef CFSetEqualCallBackFunction = Boolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef DartCFSetEqualCallBackFunction = DartBoolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef CFSetHashCallBack + = ffi.Pointer>; +typedef CFSetHashCallBackFunction = CFHashCode Function( + ffi.Pointer value); +typedef DartCFSetHashCallBackFunction = DartCFHashCode Function( + ffi.Pointer value); final class __CFSet extends ffi.Opaque {} typedef CFSetRef = ffi.Pointer<__CFSet>; typedef CFMutableSetRef = ffi.Pointer<__CFSet>; -typedef CFSetApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer value, ffi.Pointer context)>>; +typedef CFSetApplierFunction + = ffi.Pointer>; +typedef CFSetApplierFunctionFunction = ffi.Void Function( + ffi.Pointer value, ffi.Pointer context); +typedef DartCFSetApplierFunctionFunction = void Function( + ffi.Pointer value, ffi.Pointer context); abstract class CFStringEncodings { static const int kCFStringEncodingMacJapanese = 1; @@ -75569,21 +77677,30 @@ final class CFTreeContext extends ffi.Struct { external CFTreeCopyDescriptionCallBack copyDescription; } -typedef CFTreeRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>>; -typedef CFTreeReleaseCallBack = ffi - .Pointer info)>>; -typedef CFTreeCopyDescriptionCallBack = ffi.Pointer< - ffi.NativeFunction info)>>; +typedef CFTreeRetainCallBack + = ffi.Pointer>; +typedef CFTreeRetainCallBackFunction = ffi.Pointer Function( + ffi.Pointer info); +typedef CFTreeReleaseCallBack + = ffi.Pointer>; +typedef CFTreeReleaseCallBackFunction = ffi.Void Function( + ffi.Pointer info); +typedef DartCFTreeReleaseCallBackFunction = void Function( + ffi.Pointer info); +typedef CFTreeCopyDescriptionCallBack + = ffi.Pointer>; +typedef CFTreeCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer info); final class __CFTree extends ffi.Opaque {} typedef CFTreeRef = ffi.Pointer<__CFTree>; -typedef CFTreeApplierFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer value, ffi.Pointer context)>>; +typedef CFTreeApplierFunction + = ffi.Pointer>; +typedef CFTreeApplierFunctionFunction = ffi.Void Function( + ffi.Pointer value, ffi.Pointer context); +typedef DartCFTreeApplierFunctionFunction = void Function( + ffi.Pointer value, ffi.Pointer context); abstract class CFURLError { static const int kCFURLUnknownError = -10; @@ -75657,6 +77774,7 @@ typedef CFBundleRef = ffi.Pointer<__CFBundle>; typedef cpu_type_t = integer_t; typedef CFPlugInRef = ffi.Pointer<__CFBundle>; typedef CFBundleRefNum = ffi.Int; +typedef DartCFBundleRefNum = int; final class __CFMessagePort extends ffi.Opaque {} @@ -75680,29 +77798,48 @@ final class CFMessagePortContext extends ffi.Struct { } typedef CFMessagePortRef = ffi.Pointer<__CFMessagePort>; -typedef CFMessagePortCallBack = ffi.Pointer< - ffi.NativeFunction< - CFDataRef Function(CFMessagePortRef local, SInt32 msgid, CFDataRef data, - ffi.Pointer info)>>; -typedef CFMessagePortInvalidationCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFMessagePortRef ms, ffi.Pointer info)>>; -typedef CFPlugInFactoryFunction = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef allocator, CFUUIDRef typeUUID)>>; +typedef CFMessagePortCallBack + = ffi.Pointer>; +typedef CFMessagePortCallBackFunction = CFDataRef Function( + CFMessagePortRef local, + SInt32 msgid, + CFDataRef data, + ffi.Pointer info); +typedef DartCFMessagePortCallBackFunction = CFDataRef Function( + CFMessagePortRef local, + DartSInt32 msgid, + CFDataRef data, + ffi.Pointer info); +typedef CFMessagePortInvalidationCallBack = ffi + .Pointer>; +typedef CFMessagePortInvalidationCallBackFunction = ffi.Void Function( + CFMessagePortRef ms, ffi.Pointer info); +typedef DartCFMessagePortInvalidationCallBackFunction = void Function( + CFMessagePortRef ms, ffi.Pointer info); +typedef CFPlugInFactoryFunction + = ffi.Pointer>; +typedef CFPlugInFactoryFunctionFunction = ffi.Pointer Function( + CFAllocatorRef allocator, CFUUIDRef typeUUID); final class __CFPlugInInstance extends ffi.Opaque {} typedef CFPlugInInstanceRef = ffi.Pointer<__CFPlugInInstance>; typedef CFPlugInInstanceDeallocateInstanceDataFunction = ffi.Pointer< - ffi.NativeFunction instanceData)>>; -typedef CFPlugInInstanceGetInterfaceFunction = ffi.Pointer< - ffi.NativeFunction< - Boolean Function( - CFPlugInInstanceRef instance, - CFStringRef interfaceName, - ffi.Pointer> ftbl)>>; + ffi.NativeFunction>; +typedef CFPlugInInstanceDeallocateInstanceDataFunctionFunction = ffi.Void + Function(ffi.Pointer instanceData); +typedef DartCFPlugInInstanceDeallocateInstanceDataFunctionFunction = void + Function(ffi.Pointer instanceData); +typedef CFPlugInInstanceGetInterfaceFunction = ffi + .Pointer>; +typedef CFPlugInInstanceGetInterfaceFunctionFunction = Boolean Function( + CFPlugInInstanceRef instance, + CFStringRef interfaceName, + ffi.Pointer> ftbl); +typedef DartCFPlugInInstanceGetInterfaceFunctionFunction = DartBoolean Function( + CFPlugInInstanceRef instance, + CFStringRef interfaceName, + ffi.Pointer> ftbl); final class __CFMachPort extends ffi.Opaque {} @@ -75726,13 +77863,18 @@ final class CFMachPortContext extends ffi.Struct { } typedef CFMachPortRef = ffi.Pointer<__CFMachPort>; -typedef CFMachPortCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFMachPortRef port, ffi.Pointer msg, - CFIndex size, ffi.Pointer info)>>; -typedef CFMachPortInvalidationCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFMachPortRef port, ffi.Pointer info)>>; +typedef CFMachPortCallBack + = ffi.Pointer>; +typedef CFMachPortCallBackFunction = ffi.Void Function(CFMachPortRef port, + ffi.Pointer msg, CFIndex size, ffi.Pointer info); +typedef DartCFMachPortCallBackFunction = void Function(CFMachPortRef port, + ffi.Pointer msg, DartCFIndex size, ffi.Pointer info); +typedef CFMachPortInvalidationCallBack + = ffi.Pointer>; +typedef CFMachPortInvalidationCallBackFunction = ffi.Void Function( + CFMachPortRef port, ffi.Pointer info); +typedef DartCFMachPortInvalidationCallBackFunction = void Function( + CFMachPortRef port, ffi.Pointer info); final class __CFAttributedString extends ffi.Opaque {} @@ -75785,7 +77927,9 @@ final class ntsid_t extends ffi.Struct { } typedef u_int8_t = ffi.UnsignedChar; +typedef Dartu_int8_t = int; typedef u_int32_t = ffi.UnsignedInt; +typedef Dartu_int32_t = int; final class kauth_identity_extlookup extends ffi.Struct { @u_int32_t() @@ -75843,6 +77987,7 @@ final class kauth_identity_extlookup extends ffi.Struct { } typedef u_int64_t = ffi.UnsignedLongLong; +typedef Dartu_int64_t = int; final class kauth_cache_sizes extends ffi.Struct { @u_int32_t() @@ -76003,18 +78148,27 @@ final class CFFileDescriptorContext extends ffi.Struct { typedef CFFileDescriptorRef = ffi.Pointer<__CFFileDescriptor>; typedef CFFileDescriptorNativeDescriptor = ffi.Int; -typedef CFFileDescriptorCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFFileDescriptorRef f, CFOptionFlags callBackTypes, - ffi.Pointer info)>>; +typedef DartCFFileDescriptorNativeDescriptor = int; +typedef CFFileDescriptorCallBack + = ffi.Pointer>; +typedef CFFileDescriptorCallBackFunction = ffi.Void Function( + CFFileDescriptorRef f, + CFOptionFlags callBackTypes, + ffi.Pointer info); +typedef DartCFFileDescriptorCallBackFunction = void Function( + CFFileDescriptorRef f, + DartCFOptionFlags callBackTypes, + ffi.Pointer info); final class __CFUserNotification extends ffi.Opaque {} typedef CFUserNotificationRef = ffi.Pointer<__CFUserNotification>; -typedef CFUserNotificationCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFUserNotificationRef userNotification, - CFOptionFlags responseFlags)>>; +typedef CFUserNotificationCallBack + = ffi.Pointer>; +typedef CFUserNotificationCallBackFunction = ffi.Void Function( + CFUserNotificationRef userNotification, CFOptionFlags responseFlags); +typedef DartCFUserNotificationCallBackFunction = void Function( + CFUserNotificationRef userNotification, DartCFOptionFlags responseFlags); final class __CFXMLNode extends ffi.Opaque {} @@ -76168,27 +78322,46 @@ final class CFXMLParserCallBacks extends ffi.Struct { external CFXMLParserHandleErrorCallBack handleError; } -typedef CFXMLParserCreateXMLStructureCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(CFXMLParserRef parser, - CFXMLNodeRef nodeDesc, ffi.Pointer info)>>; +typedef CFXMLParserCreateXMLStructureCallBack = ffi + .Pointer>; +typedef CFXMLParserCreateXMLStructureCallBackFunction + = ffi.Pointer Function(CFXMLParserRef parser, + CFXMLNodeRef nodeDesc, ffi.Pointer info); typedef CFXMLParserRef = ffi.Pointer<__CFXMLParser>; -typedef CFXMLParserAddChildCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFXMLParserRef parser, ffi.Pointer parent, - ffi.Pointer child, ffi.Pointer info)>>; -typedef CFXMLParserEndXMLStructureCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFXMLParserRef parser, ffi.Pointer xmlType, - ffi.Pointer info)>>; +typedef CFXMLParserAddChildCallBack + = ffi.Pointer>; +typedef CFXMLParserAddChildCallBackFunction = ffi.Void Function( + CFXMLParserRef parser, + ffi.Pointer parent, + ffi.Pointer child, + ffi.Pointer info); +typedef DartCFXMLParserAddChildCallBackFunction = void Function( + CFXMLParserRef parser, + ffi.Pointer parent, + ffi.Pointer child, + ffi.Pointer info); +typedef CFXMLParserEndXMLStructureCallBack = ffi + .Pointer>; +typedef CFXMLParserEndXMLStructureCallBackFunction = ffi.Void Function( + CFXMLParserRef parser, + ffi.Pointer xmlType, + ffi.Pointer info); +typedef DartCFXMLParserEndXMLStructureCallBackFunction = void Function( + CFXMLParserRef parser, + ffi.Pointer xmlType, + ffi.Pointer info); typedef CFXMLParserResolveExternalEntityCallBack = ffi.Pointer< - ffi.NativeFunction< - CFDataRef Function(CFXMLParserRef parser, - ffi.Pointer extID, ffi.Pointer info)>>; -typedef CFXMLParserHandleErrorCallBack = ffi.Pointer< - ffi.NativeFunction< - Boolean Function(CFXMLParserRef parser, ffi.Int32 error, - ffi.Pointer info)>>; + ffi.NativeFunction>; +typedef CFXMLParserResolveExternalEntityCallBackFunction = CFDataRef Function( + CFXMLParserRef parser, + ffi.Pointer extID, + ffi.Pointer info); +typedef CFXMLParserHandleErrorCallBack + = ffi.Pointer>; +typedef CFXMLParserHandleErrorCallBackFunction = Boolean Function( + CFXMLParserRef parser, ffi.Int32 error, ffi.Pointer info); +typedef DartCFXMLParserHandleErrorCallBackFunction = DartBoolean Function( + CFXMLParserRef parser, int error, ffi.Pointer info); final class CFXMLParserContext extends ffi.Struct { @CFIndex() @@ -76203,182 +78376,20 @@ final class CFXMLParserContext extends ffi.Struct { external CFXMLParserCopyDescriptionCallBack copyDescription; } -typedef CFXMLParserRetainCallBack = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>>; -typedef CFXMLParserReleaseCallBack = ffi - .Pointer info)>>; -typedef CFXMLParserCopyDescriptionCallBack = ffi.Pointer< - ffi.NativeFunction info)>>; - -abstract class SecTrustResultType { - static const int kSecTrustResultInvalid = 0; - static const int kSecTrustResultProceed = 1; - static const int kSecTrustResultConfirm = 2; - static const int kSecTrustResultDeny = 3; - static const int kSecTrustResultUnspecified = 4; - static const int kSecTrustResultRecoverableTrustFailure = 5; - static const int kSecTrustResultFatalTrustFailure = 6; - static const int kSecTrustResultOtherError = 7; -} - -final class __SecTrust extends ffi.Opaque {} - -typedef SecTrustRef = ffi.Pointer<__SecTrust>; -typedef SecTrustCallback = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock29_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>>() - .asFunction()(arg0, arg1); -} - -final _ObjCBlock29_closureRegistry = {}; -int _ObjCBlock29_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock29_registerClosure(Function fn) { - final id = ++_ObjCBlock29_closureRegistryIndex; - _ObjCBlock29_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock29_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) { - return _ObjCBlock29_closureRegistry[block.ref.target.address]!(arg0, arg1); -} - -class ObjCBlock29 extends _ObjCBlockBase { - ObjCBlock29._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock29.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>> - ptr) - : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - ffi.Int32 arg1)>(_ObjCBlock29_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock29.fromFunction( - NativeCupertinoHttp lib, void Function(SecTrustRef arg0, int arg1) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - ffi.Int32 arg1)>(_ObjCBlock29_closureTrampoline) - .cast(), - _ObjCBlock29_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(SecTrustRef arg0, int arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, ffi.Int32 arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, - int arg1)>()(_id, arg0, arg1); - } -} - -typedef SecTrustWithErrorCallback = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock30_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, bool arg1, CFErrorRef arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() - .asFunction< - void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2)>()( - arg0, arg1, arg2); -} - -final _ObjCBlock30_closureRegistry = {}; -int _ObjCBlock30_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock30_registerClosure(Function fn) { - final id = ++_ObjCBlock30_closureRegistryIndex; - _ObjCBlock30_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock30_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, bool arg1, CFErrorRef arg2) { - return _ObjCBlock30_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} - -class ObjCBlock30 extends _ObjCBlockBase { - ObjCBlock30._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock30.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - ffi.Bool arg1, - CFErrorRef arg2)>(_ObjCBlock30_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock30.fromFunction(NativeCupertinoHttp lib, - void Function(SecTrustRef arg0, bool arg1, CFErrorRef arg2) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - ffi.Bool arg1, - CFErrorRef arg2)>(_ObjCBlock30_closureTrampoline) - .cast(), - _ObjCBlock30_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(SecTrustRef arg0, bool arg1, CFErrorRef arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, - bool arg1, CFErrorRef arg2)>()(_id, arg0, arg1, arg2); - } -} - -typedef SecKeyRef = ffi.Pointer<__SecKey>; -typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; +typedef CFXMLParserRetainCallBack + = ffi.Pointer>; +typedef CFXMLParserRetainCallBackFunction = ffi.Pointer Function( + ffi.Pointer info); +typedef CFXMLParserReleaseCallBack + = ffi.Pointer>; +typedef CFXMLParserReleaseCallBackFunction = ffi.Void Function( + ffi.Pointer info); +typedef DartCFXMLParserReleaseCallBackFunction = void Function( + ffi.Pointer info); +typedef CFXMLParserCopyDescriptionCallBack = ffi + .Pointer>; +typedef CFXMLParserCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer info); final class cssm_data extends ffi.Struct { @ffi.Size() @@ -76430,8 +78441,11 @@ final class cssm_guid extends ffi.Struct { } typedef uint32 = ffi.Uint32; +typedef Dartuint32 = int; typedef uint16 = ffi.Uint16; +typedef Dartuint16 = int; typedef uint8 = ffi.Uint8; +typedef Dartuint8 = int; final class cssm_version extends ffi.Struct { @uint32() @@ -76475,12 +78489,14 @@ final class cssm_crypto_data extends ffi.Struct { external ffi.Pointer CallerCtx; } -typedef CSSM_CALLBACK = ffi.Pointer< - ffi.NativeFunction< - CSSM_RETURN Function( - CSSM_DATA_PTR OutData, ffi.Pointer CallerCtx)>>; +typedef CSSM_CALLBACK = ffi.Pointer>; +typedef CSSM_CALLBACKFunction = CSSM_RETURN Function( + CSSM_DATA_PTR OutData, ffi.Pointer CallerCtx); +typedef DartCSSM_CALLBACKFunction = Dartsint32 Function( + CSSM_DATA_PTR OutData, ffi.Pointer CallerCtx); typedef CSSM_RETURN = sint32; typedef sint32 = ffi.Int32; +typedef Dartsint32 = int; typedef CSSM_DATA_PTR = ffi.Pointer; final class cssm_list_element extends ffi.Struct { @@ -76571,23 +78587,32 @@ final class cssm_memory_funcs extends ffi.Struct { external ffi.Pointer AllocRef; } -typedef CSSM_MALLOC = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CSSM_SIZE size, ffi.Pointer allocref)>>; +typedef CSSM_MALLOC = ffi.Pointer>; +typedef CSSM_MALLOCFunction = ffi.Pointer Function( + CSSM_SIZE size, ffi.Pointer allocref); +typedef DartCSSM_MALLOCFunction = ffi.Pointer Function( + DartCSSM_SIZE size, ffi.Pointer allocref); typedef CSSM_SIZE = ffi.Size; -typedef CSSM_FREE = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer memblock, ffi.Pointer allocref)>>; -typedef CSSM_REALLOC = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer memblock, - CSSM_SIZE size, ffi.Pointer allocref)>>; -typedef CSSM_CALLOC = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - uint32 num, CSSM_SIZE size, ffi.Pointer allocref)>>; +typedef DartCSSM_SIZE = int; +typedef CSSM_FREE = ffi.Pointer>; +typedef CSSM_FREEFunction = ffi.Void Function( + ffi.Pointer memblock, ffi.Pointer allocref); +typedef DartCSSM_FREEFunction = void Function( + ffi.Pointer memblock, ffi.Pointer allocref); +typedef CSSM_REALLOC = ffi.Pointer>; +typedef CSSM_REALLOCFunction = ffi.Pointer Function( + ffi.Pointer memblock, + CSSM_SIZE size, + ffi.Pointer allocref); +typedef DartCSSM_REALLOCFunction = ffi.Pointer Function( + ffi.Pointer memblock, + DartCSSM_SIZE size, + ffi.Pointer allocref); +typedef CSSM_CALLOC = ffi.Pointer>; +typedef CSSM_CALLOCFunction = ffi.Pointer Function( + uint32 num, CSSM_SIZE size, ffi.Pointer allocref); +typedef DartCSSM_CALLOCFunction = ffi.Pointer Function( + Dartuint32 num, DartCSSM_SIZE size, ffi.Pointer allocref); final class cssm_encoded_cert extends ffi.Struct { @CSSM_CERT_TYPE() @@ -76670,6 +78695,7 @@ typedef CSSM_TP_HANDLE = CSSM_MODULE_HANDLE; typedef CSSM_MODULE_HANDLE = CSSM_HANDLE; typedef CSSM_HANDLE = CSSM_INTPTR; typedef CSSM_INTPTR = ffi.IntPtr; +typedef DartCSSM_INTPTR = int; typedef CSSM_CL_HANDLE = CSSM_MODULE_HANDLE; typedef CSSM_CERTGROUP = cssm_certgroup; @@ -76688,13 +78714,18 @@ final class cssm_access_credentials extends ffi.Struct { typedef CSSM_BASE_CERTS = cssm_base_certs; typedef CSSM_SAMPLEGROUP = cssm_samplegroup; -typedef CSSM_CHALLENGE_CALLBACK = ffi.Pointer< - ffi.NativeFunction< - CSSM_RETURN Function( - ffi.Pointer Challenge, - CSSM_SAMPLEGROUP_PTR Response, - ffi.Pointer CallerCtx, - ffi.Pointer MemFuncs)>>; +typedef CSSM_CHALLENGE_CALLBACK + = ffi.Pointer>; +typedef CSSM_CHALLENGE_CALLBACKFunction = CSSM_RETURN Function( + ffi.Pointer Challenge, + CSSM_SAMPLEGROUP_PTR Response, + ffi.Pointer CallerCtx, + ffi.Pointer MemFuncs); +typedef DartCSSM_CHALLENGE_CALLBACKFunction = Dartsint32 Function( + ffi.Pointer Challenge, + CSSM_SAMPLEGROUP_PTR Response, + ffi.Pointer CallerCtx, + ffi.Pointer MemFuncs); typedef CSSM_SAMPLEGROUP_PTR = ffi.Pointer; typedef CSSM_MEMORY_FUNCS = cssm_memory_funcs; @@ -76746,13 +78777,18 @@ final class cssm_acl_entry_input extends ffi.Struct { } typedef CSSM_ACL_ENTRY_PROTOTYPE = cssm_acl_entry_prototype; -typedef CSSM_ACL_SUBJECT_CALLBACK = ffi.Pointer< - ffi.NativeFunction< - CSSM_RETURN Function( - ffi.Pointer SubjectRequest, - CSSM_LIST_PTR SubjectResponse, - ffi.Pointer CallerContext, - ffi.Pointer MemFuncs)>>; +typedef CSSM_ACL_SUBJECT_CALLBACK + = ffi.Pointer>; +typedef CSSM_ACL_SUBJECT_CALLBACKFunction = CSSM_RETURN Function( + ffi.Pointer SubjectRequest, + CSSM_LIST_PTR SubjectResponse, + ffi.Pointer CallerContext, + ffi.Pointer MemFuncs); +typedef DartCSSM_ACL_SUBJECT_CALLBACKFunction = Dartsint32 Function( + ffi.Pointer SubjectRequest, + CSSM_LIST_PTR SubjectResponse, + ffi.Pointer CallerContext, + ffi.Pointer MemFuncs); typedef CSSM_LIST_PTR = ffi.Pointer; final class cssm_resource_control_context extends ffi.Struct { @@ -76792,7 +78828,10 @@ final class cssm_func_name_addr extends ffi.Struct { external CSSM_PROC_ADDR Address; } -typedef CSSM_PROC_ADDR = ffi.Pointer>; +typedef CSSM_PROC_ADDR + = ffi.Pointer>; +typedef CSSM_PROC_ADDRFunction = ffi.Void Function(); +typedef DartCSSM_PROC_ADDRFunction = void Function(); final class cssm_date extends ffi.Struct { @ffi.Array.multi([4]) @@ -77111,10 +79150,16 @@ final class cssm_tp_callerauth_context extends ffi.Struct { typedef CSSM_TP_POLICYINFO = cssm_tp_policyinfo; typedef CSSM_TIMESTRING = ffi.Pointer; typedef CSSM_TP_STOP_ON = uint32; -typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACK = ffi.Pointer< - ffi.NativeFunction< - CSSM_RETURN Function(CSSM_MODULE_HANDLE ModuleHandle, - ffi.Pointer CallerCtx, CSSM_DATA_PTR VerifiedCert)>>; +typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACK = ffi + .Pointer>; +typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACKFunction = CSSM_RETURN Function( + CSSM_MODULE_HANDLE ModuleHandle, + ffi.Pointer CallerCtx, + CSSM_DATA_PTR VerifiedCert); +typedef DartCSSM_TP_VERIFICATION_RESULTS_CALLBACKFunction = Dartsint32 Function( + DartCSSM_INTPTR ModuleHandle, + ffi.Pointer CallerCtx, + CSSM_DATA_PTR VerifiedCert); typedef CSSM_DL_DB_LIST_PTR = ffi.Pointer; final class cssm_encoded_crl extends ffi.Struct { @@ -77400,6 +79445,7 @@ final class cssm_tp_certreclaim_output extends ffi.Struct { typedef CSSM_TP_CERTRECLAIM_STATUS = uint32; typedef CSSM_LONG_HANDLE = uint64; typedef uint64 = ffi.Uint64; +typedef Dartuint64 = int; final class cssm_tp_crlissue_input extends ffi.Struct { @CSSM_CL_HANDLE() @@ -78456,6 +80502,256 @@ final class CSSM_APPLE_CL_CSR_REQUEST extends ffi.Struct { external ffi.Pointer challengeString; } +abstract class SecTrustResultType { + static const int kSecTrustResultInvalid = 0; + static const int kSecTrustResultProceed = 1; + static const int kSecTrustResultConfirm = 2; + static const int kSecTrustResultDeny = 3; + static const int kSecTrustResultUnspecified = 4; + static const int kSecTrustResultRecoverableTrustFailure = 5; + static const int kSecTrustResultFatalTrustFailure = 6; + static const int kSecTrustResultOtherError = 7; +} + +final class __SecTrust extends ffi.Opaque {} + +typedef SecTrustRef = ffi.Pointer<__SecTrust>; +typedef SecTrustCallback = ffi.Pointer<_ObjCBlock>; +typedef DartSecTrustCallback = ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType; +void _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>>() + .asFunction()(arg0, arg1); +final _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_registerClosure( + void Function(SecTrustRef, int) fn) { + final id = + ++_ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureRegistryIndex; + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) => + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType extends _ObjCBlockBase { + ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + SecTrustRef, ffi.Int32)>( + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType.fromFunction( + NativeCupertinoHttp lib, void Function(SecTrustRef, int) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + SecTrustRef, ffi.Int32)>( + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_registerClosure( + (SecTrustRef arg0, int arg1) => fn(arg0, arg1))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType.listener( + NativeCupertinoHttp lib, void Function(SecTrustRef, int) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + SecTrustRef, ffi.Int32)>.listener( + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_registerClosure( + (SecTrustRef arg0, int arg1) => fn(arg0, arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, SecTrustRef, ffi.Int32)>? + _dartFuncListenerTrampoline; + + void call(SecTrustRef arg0, int arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, + ffi.Int32 arg1)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, SecTrustRef, int)>()(_id, arg0, arg1); +} + +typedef SecTrustWithErrorCallback = ffi.Pointer<_ObjCBlock>; +typedef DartSecTrustWithErrorCallback + = ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef; +void _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + bool arg1, + CFErrorRef arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() + .asFunction()( + arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_registerClosure( + void Function(SecTrustRef, bool, CFErrorRef) fn) { + final id = + ++_ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureRegistryIndex; + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + SecTrustRef arg0, + bool arg1, + CFErrorRef arg2) => + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef extends _ObjCBlockBase { + ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + SecTrustRef, ffi.Bool, CFErrorRef)>( + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef.fromFunction( + NativeCupertinoHttp lib, void Function(SecTrustRef, bool, CFErrorRef) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + SecTrustRef, ffi.Bool, CFErrorRef)>( + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_registerClosure( + (SecTrustRef arg0, bool arg1, CFErrorRef arg2) => + fn(arg0, arg1, arg2))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef.listener( + NativeCupertinoHttp lib, void Function(SecTrustRef, bool, CFErrorRef) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + SecTrustRef, ffi.Bool, CFErrorRef)>.listener( + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_registerClosure( + (SecTrustRef arg0, bool arg1, CFErrorRef arg2) => + fn(arg0, arg1, arg2))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, SecTrustRef, ffi.Bool, CFErrorRef)>? + _dartFuncListenerTrampoline; + + void call(SecTrustRef arg0, bool arg1, CFErrorRef arg2) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, + ffi.Bool arg1, CFErrorRef arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, SecTrustRef, bool, + CFErrorRef)>()(_id, arg0, arg1, arg2); +} + +typedef SecKeyRef = ffi.Pointer<__SecKey>; +typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; + abstract class SecTrustOptionFlags { static const int kSecTrustOptionAllowExpired = 1; static const int kSecTrustOptionLeafIsCA = 2; @@ -78496,6 +80792,12 @@ abstract class SSLCiphersuiteGroup { static const int kSSLCiphersuiteGroupATSCompatibility = 4; } +final class sec_trust extends ffi.Opaque {} + +final class sec_identity extends ffi.Opaque {} + +final class sec_certificate extends ffi.Opaque {} + abstract class tls_protocol_version_t { static const int tls_protocol_version_TLSv10 = 769; static const int tls_protocol_version_TLSv11 = 770; @@ -78560,649 +80862,1249 @@ abstract class SSLProtocol { static const int kSSLProtocolAll = 6; } -typedef sec_trust_t = ffi.Pointer; -typedef sec_identity_t = ffi.Pointer; -void _ObjCBlock31_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); -} - -final _ObjCBlock31_closureRegistry = {}; -int _ObjCBlock31_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock31_registerClosure(Function fn) { - final id = ++_ObjCBlock31_closureRegistryIndex; - _ObjCBlock31_closureRegistry[id] = fn; +typedef sec_trust_t = ffi.Pointer; +typedef sec_identity_t = ffi.Pointer; +void _ObjCBlock_ffiVoid_seccertificatet_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +final _ObjCBlock_ffiVoid_seccertificatet_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_seccertificatet_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_seccertificatet_registerClosure( + void Function(sec_certificate_t) fn) { + final id = ++_ObjCBlock_ffiVoid_seccertificatet_closureRegistryIndex; + _ObjCBlock_ffiVoid_seccertificatet_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock31_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) { - return _ObjCBlock31_closureRegistry[block.ref.target.address]!(arg0); -} +void _ObjCBlock_ffiVoid_seccertificatet_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) => + _ObjCBlock_ffiVoid_seccertificatet_closureRegistry[ + block.ref.target.address]!(arg0); -class ObjCBlock31 extends _ObjCBlockBase { - ObjCBlock31._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_seccertificatet extends _ObjCBlockBase { + ObjCBlock_ffiVoid_seccertificatet._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock31.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_seccertificatet.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - sec_certificate_t arg0)>( - _ObjCBlock31_fnPtrTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, sec_certificate_t)>( + _ObjCBlock_ffiVoid_seccertificatet_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock31.fromFunction( - NativeCupertinoHttp lib, void Function(sec_certificate_t arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_seccertificatet.fromFunction( + NativeCupertinoHttp lib, void Function(sec_certificate_t) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - sec_certificate_t arg0)>( - _ObjCBlock31_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, sec_certificate_t)>( + _ObjCBlock_ffiVoid_seccertificatet_closureTrampoline) .cast(), - _ObjCBlock31_registerClosure(fn)), + _ObjCBlock_ffiVoid_seccertificatet_registerClosure( + (sec_certificate_t arg0) => fn(arg0))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(sec_certificate_t arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - sec_certificate_t arg0)>()(_id, arg0); - } -} -typedef sec_certificate_t = ffi.Pointer; -typedef sec_protocol_metadata_t = ffi.Pointer; -typedef SSLCipherSuite = ffi.Uint16; -void _ObjCBlock32_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_seccertificatet.listener( + NativeCupertinoHttp lib, void Function(sec_certificate_t) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + sec_certificate_t)>.listener( + _ObjCBlock_ffiVoid_seccertificatet_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_seccertificatet_registerClosure( + (sec_certificate_t arg0) => fn(arg0))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, sec_certificate_t)>? + _dartFuncListenerTrampoline; + + void call(sec_certificate_t arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, sec_certificate_t)>()(_id, arg0); } -final _ObjCBlock32_closureRegistry = {}; -int _ObjCBlock32_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock32_registerClosure(Function fn) { - final id = ++_ObjCBlock32_closureRegistryIndex; - _ObjCBlock32_closureRegistry[id] = fn; +typedef sec_certificate_t = ffi.Pointer; + +final class sec_protocol_metadata extends ffi.Opaque {} + +typedef sec_protocol_metadata_t = ffi.Pointer; +typedef SSLCipherSuite = ffi.Uint16; +typedef DartSSLCipherSuite = int; +void _ObjCBlock_ffiVoid_dispatchdatat_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +final _ObjCBlock_ffiVoid_dispatchdatat_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_dispatchdatat_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_dispatchdatat_registerClosure( + void Function(dispatch_data_t) fn) { + final id = ++_ObjCBlock_ffiVoid_dispatchdatat_closureRegistryIndex; + _ObjCBlock_ffiVoid_dispatchdatat_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock32_closureTrampoline(ffi.Pointer<_ObjCBlock> block, int arg0) { - return _ObjCBlock32_closureRegistry[block.ref.target.address]!(arg0); -} +void _ObjCBlock_ffiVoid_dispatchdatat_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0) => + _ObjCBlock_ffiVoid_dispatchdatat_closureRegistry[block.ref.target.address]!( + arg0); -class ObjCBlock32 extends _ObjCBlockBase { - ObjCBlock32._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_dispatchdatat extends _ObjCBlockBase { + ObjCBlock_ffiVoid_dispatchdatat._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock32.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_dispatchdatat.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer> + ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Uint16 arg0)>(_ObjCBlock32_fnPtrTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, dispatch_data_t)>( + _ObjCBlock_ffiVoid_dispatchdatat_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock32.fromFunction(NativeCupertinoHttp lib, void Function(int arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_dispatchdatat.fromFunction( + NativeCupertinoHttp lib, void Function(dispatch_data_t) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Uint16 arg0)>(_ObjCBlock32_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, dispatch_data_t)>( + _ObjCBlock_ffiVoid_dispatchdatat_closureTrampoline) .cast(), - _ObjCBlock32_registerClosure(fn)), + _ObjCBlock_ffiVoid_dispatchdatat_registerClosure( + (dispatch_data_t arg0) => fn(arg0))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(int arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Uint16 arg0)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, int arg0)>()(_id, arg0); - } -} -void _ObjCBlock33_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { - return block.ref.target + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_dispatchdatat.listener( + NativeCupertinoHttp lib, void Function(dispatch_data_t) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + dispatch_data_t)>.listener( + _ObjCBlock_ffiVoid_dispatchdatat_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_dispatchdatat_registerClosure( + (dispatch_data_t arg0) => fn(arg0))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, dispatch_data_t)>? + _dartFuncListenerTrampoline; + + void call(dispatch_data_t arg0) => _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, dispatch_data_t arg1)>>() + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0)>>() .asFunction< - void Function( - dispatch_data_t arg0, dispatch_data_t arg1)>()(arg0, arg1); -} - -final _ObjCBlock33_closureRegistry = {}; -int _ObjCBlock33_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock33_registerClosure(Function fn) { - final id = ++_ObjCBlock33_closureRegistryIndex; - _ObjCBlock33_closureRegistry[id] = fn; + void Function(ffi.Pointer<_ObjCBlock>, dispatch_data_t)>()(_id, arg0); +} + +void _ObjCBlock_ffiVoid_Uint16_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +final _ObjCBlock_ffiVoid_Uint16_closureRegistry = {}; +int _ObjCBlock_ffiVoid_Uint16_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_Uint16_registerClosure( + void Function(int) fn) { + final id = ++_ObjCBlock_ffiVoid_Uint16_closureRegistryIndex; + _ObjCBlock_ffiVoid_Uint16_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock33_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, dispatch_data_t arg1) { - return _ObjCBlock33_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_Uint16_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, int arg0) => + _ObjCBlock_ffiVoid_Uint16_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock33 extends _ObjCBlockBase { - ObjCBlock33._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_Uint16 extends _ObjCBlockBase { + ObjCBlock_ffiVoid_Uint16._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock33.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - dispatch_data_t arg0, dispatch_data_t arg1)>> - ptr) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_Uint16.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - dispatch_data_t arg1)>(_ObjCBlock33_fnPtrTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Uint16)>( + _ObjCBlock_ffiVoid_Uint16_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock33.fromFunction(NativeCupertinoHttp lib, - void Function(dispatch_data_t arg0, dispatch_data_t arg1) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_Uint16.fromFunction( + NativeCupertinoHttp lib, void Function(int) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, dispatch_data_t arg1)>( - _ObjCBlock33_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Uint16)>( + _ObjCBlock_ffiVoid_Uint16_closureTrampoline) .cast(), - _ObjCBlock33_registerClosure(fn)), + _ObjCBlock_ffiVoid_Uint16_registerClosure( + (int arg0) => fn(arg0))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(dispatch_data_t arg0, dispatch_data_t arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, dispatch_data_t arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, - dispatch_data_t arg1)>()(_id, arg0, arg1); - } -} -typedef sec_protocol_options_t = ffi.Pointer; -typedef sec_protocol_pre_shared_key_selection_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock34_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>>() - .asFunction< - void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>()( - arg0, arg1, arg2); -} + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_Uint16.listener( + NativeCupertinoHttp lib, void Function(int) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Uint16)>.listener( + _ObjCBlock_ffiVoid_Uint16_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_Uint16_registerClosure( + (int arg0) => fn(arg0))), + lib); + static ffi + .NativeCallable, ffi.Uint16)>? + _dartFuncListenerTrampoline; -final _ObjCBlock34_closureRegistry = {}; -int _ObjCBlock34_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock34_registerClosure(Function fn) { - final id = ++_ObjCBlock34_closureRegistryIndex; - _ObjCBlock34_closureRegistry[id] = fn; + void call(int arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Uint16 arg0)>>() + .asFunction, int)>()(_id, arg0); +} + +void _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + dispatch_data_t arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + dispatch_data_t arg0, dispatch_data_t arg1)>>() + .asFunction()( + arg0, arg1); +final _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_registerClosure( + void Function(dispatch_data_t, dispatch_data_t) fn) { + final id = + ++_ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureRegistryIndex; + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock34_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) { - return _ObjCBlock34_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +void _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, + dispatch_data_t arg1) => + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock34 extends _ObjCBlockBase { - ObjCBlock34._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat extends _ObjCBlockBase { + ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock34.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< ffi.Void Function( - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>> + dispatch_data_t arg0, dispatch_data_t arg1)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>(_ObjCBlock34_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + dispatch_data_t, dispatch_data_t)>( + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock34.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat.fromFunction( NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) - fn) + void Function(dispatch_data_t, dispatch_data_t) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>(_ObjCBlock34_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + dispatch_data_t, dispatch_data_t)>( + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureTrampoline) .cast(), - _ObjCBlock34_registerClosure(fn)), + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_registerClosure( + (dispatch_data_t arg0, dispatch_data_t arg1) => + fn(arg0, arg1))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(sec_protocol_metadata_t arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>()(_id, arg0, arg1, arg2); - } -} -typedef sec_protocol_pre_shared_key_selection_complete_t - = ffi.Pointer<_ObjCBlock>; -typedef sec_protocol_key_update_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock35_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { - return block.ref.target + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat.listener( + NativeCupertinoHttp lib, + void Function(dispatch_data_t, dispatch_data_t) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + dispatch_data_t, dispatch_data_t)>.listener( + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_registerClosure( + (dispatch_data_t arg0, dispatch_data_t arg1) => + fn(arg0, arg1))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, dispatch_data_t, dispatch_data_t)>? + _dartFuncListenerTrampoline; + + void call(dispatch_data_t arg0, dispatch_data_t arg1) => _id.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>>() + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + dispatch_data_t arg0, dispatch_data_t arg1)>>() .asFunction< - void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>()(arg0, arg1); + void Function(ffi.Pointer<_ObjCBlock>, dispatch_data_t, + dispatch_data_t)>()(_id, arg0, arg1); } -final _ObjCBlock35_closureRegistry = {}; -int _ObjCBlock35_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock35_registerClosure(Function fn) { - final id = ++_ObjCBlock35_closureRegistryIndex; - _ObjCBlock35_closureRegistry[id] = fn; +final class sec_protocol_options extends ffi.Opaque {} + +typedef sec_protocol_options_t = ffi.Pointer; +typedef sec_protocol_pre_shared_key_selection_t = ffi.Pointer<_ObjCBlock>; +typedef Dartsec_protocol_pre_shared_key_selection_t + = ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet; +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>>() + .asFunction< + void Function(sec_protocol_metadata_t, dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t)>()( + arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_registerClosure( + void Function(sec_protocol_metadata_t, dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t) + fn) { + final id = + ++_ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureRegistryIndex; + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureRegistry[ + id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock35_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { - return _ObjCBlock35_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) => + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock35 extends _ObjCBlockBase { - ObjCBlock35._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet + extends _ObjCBlockBase { + ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock35.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>> + ffi.Void Function( + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>( - _ObjCBlock35_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + sec_protocol_metadata_t, + dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock35.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet.fromFunction( NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1) + void Function(sec_protocol_metadata_t, dispatch_data_t, + Dartsec_protocol_pre_shared_key_selection_complete_t) fn) : this._( lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>( - _ObjCBlock35_closureTrampoline) - .cast(), - _ObjCBlock35_registerClosure(fn)), + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, sec_protocol_metadata_t, dispatch_data_t, sec_protocol_pre_shared_key_selection_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_registerClosure( + (sec_protocol_metadata_t arg0, dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) => + fn(arg0, arg1, ObjCBlock_ffiVoid_dispatchdatat._(arg2, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call( - sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>()(_id, arg0, arg1); - } -} -typedef sec_protocol_key_update_complete_t = ffi.Pointer<_ObjCBlock>; -typedef sec_protocol_challenge_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock36_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>>() - .asFunction< - void Function(sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>()(arg0, arg1); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet.listener( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t, dispatch_data_t, + Dartsec_protocol_pre_shared_key_selection_complete_t) + fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, sec_protocol_metadata_t, dispatch_data_t, sec_protocol_pre_shared_key_selection_complete_t)>.listener( + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_registerClosure( + (sec_protocol_metadata_t arg0, dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) => + fn(arg0, arg1, ObjCBlock_ffiVoid_dispatchdatat._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + sec_protocol_metadata_t, + dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t)>? + _dartFuncListenerTrampoline; + + void + call(sec_protocol_metadata_t arg0, dispatch_data_t arg1, + Dartsec_protocol_pre_shared_key_selection_complete_t arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, + sec_protocol_metadata_t, + dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t)>()( + _id, arg0, arg1, arg2._id); } -final _ObjCBlock36_closureRegistry = {}; -int _ObjCBlock36_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock36_registerClosure(Function fn) { - final id = ++_ObjCBlock36_closureRegistryIndex; - _ObjCBlock36_closureRegistry[id] = fn; +typedef sec_protocol_pre_shared_key_selection_complete_t + = ffi.Pointer<_ObjCBlock>; +typedef Dartsec_protocol_pre_shared_key_selection_complete_t + = ObjCBlock_ffiVoid_dispatchdatat; +typedef sec_protocol_key_update_t = ffi.Pointer<_ObjCBlock>; +typedef Dartsec_protocol_key_update_t + = ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet; +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>>() + .asFunction< + void Function(sec_protocol_metadata_t, + sec_protocol_key_update_complete_t)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_registerClosure( + void Function( + sec_protocol_metadata_t, sec_protocol_key_update_complete_t) + fn) { + final id = + ++_ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureRegistryIndex; + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureRegistry[ + id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock36_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { - return _ObjCBlock36_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1) => + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock36 extends _ObjCBlockBase { - ObjCBlock36._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet + extends _ObjCBlockBase { + ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock36.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>> + sec_protocol_key_update_complete_t arg1)>> ptr) : this._( - lib - ._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>( - _ObjCBlock36_fnPtrTrampoline) - .cast(), - ptr.cast()), + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + sec_protocol_metadata_t, + sec_protocol_key_update_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_fnPtrTrampoline) + .cast(), + ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock36.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet.fromFunction( NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) + void Function( + sec_protocol_metadata_t, Dartsec_protocol_key_update_complete_t) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>( - _ObjCBlock36_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + sec_protocol_metadata_t, + sec_protocol_key_update_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureTrampoline) .cast(), - _ObjCBlock36_registerClosure(fn)), + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_registerClosure( + (sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) => + fn(arg0, ObjCBlock_ffiVoid._(arg1, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call( - sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>()(_id, arg0, arg1); - } -} -typedef sec_protocol_challenge_complete_t = ffi.Pointer<_ObjCBlock>; -typedef sec_protocol_verify_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock37_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>>() - .asFunction< - void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>()(arg0, arg1, arg2); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet.listener( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t, Dartsec_protocol_key_update_complete_t) + fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + sec_protocol_metadata_t, + sec_protocol_key_update_complete_t)>.listener( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_registerClosure( + (sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) => + fn(arg0, ObjCBlock_ffiVoid._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, sec_protocol_metadata_t, + sec_protocol_key_update_complete_t)>? _dartFuncListenerTrampoline; + + void call(sec_protocol_metadata_t arg0, + Dartsec_protocol_key_update_complete_t arg1) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, sec_protocol_metadata_t, + sec_protocol_key_update_complete_t)>()(_id, arg0, arg1._id); } -final _ObjCBlock37_closureRegistry = {}; -int _ObjCBlock37_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock37_registerClosure(Function fn) { - final id = ++_ObjCBlock37_closureRegistryIndex; - _ObjCBlock37_closureRegistry[id] = fn; +typedef sec_protocol_key_update_complete_t = ffi.Pointer<_ObjCBlock>; +typedef Dartsec_protocol_key_update_complete_t = ObjCBlock_ffiVoid; +typedef sec_protocol_challenge_t = ffi.Pointer<_ObjCBlock>; +typedef Dartsec_protocol_challenge_t + = ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet; +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>>() + .asFunction< + void Function(sec_protocol_metadata_t, + sec_protocol_challenge_complete_t)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_registerClosure( + void Function( + sec_protocol_metadata_t, sec_protocol_challenge_complete_t) + fn) { + final id = + ++_ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureRegistryIndex; + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureRegistry[ + id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock37_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) { - return _ObjCBlock37_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +void _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1) => + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock37 extends _ObjCBlockBase { - ObjCBlock37._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet + extends _ObjCBlockBase { + ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock37.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< - ffi - .NativeFunction< + ffi.NativeFunction< ffi.Void Function(sec_protocol_metadata_t arg0, - sec_trust_t arg1, sec_protocol_verify_complete_t arg2)>> + sec_protocol_challenge_complete_t arg1)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>( - _ObjCBlock37_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + sec_protocol_metadata_t, + sec_protocol_challenge_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock37.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet.fromFunction( NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) + void Function( + sec_protocol_metadata_t, Dartsec_protocol_challenge_complete_t) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>( - _ObjCBlock37_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + sec_protocol_metadata_t, + sec_protocol_challenge_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureTrampoline) .cast(), - _ObjCBlock37_registerClosure(fn)), + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_registerClosure( + (sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) => + fn(arg0, ObjCBlock_ffiVoid_secidentityt._(arg1, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>()(_id, arg0, arg1, arg2); - } -} -typedef sec_protocol_verify_complete_t = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock38_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { - return block.ref.target - .cast>() - .asFunction()(arg0); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet.listener( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t, Dartsec_protocol_challenge_complete_t) + fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, sec_protocol_metadata_t, sec_protocol_challenge_complete_t)>.listener( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_registerClosure( + (sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) => + fn(arg0, ObjCBlock_ffiVoid_secidentityt._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, sec_protocol_metadata_t, + sec_protocol_challenge_complete_t)>? _dartFuncListenerTrampoline; + + void call(sec_protocol_metadata_t arg0, + Dartsec_protocol_challenge_complete_t arg1) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, sec_protocol_metadata_t, + sec_protocol_challenge_complete_t)>()(_id, arg0, arg1._id); } -final _ObjCBlock38_closureRegistry = {}; -int _ObjCBlock38_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock38_registerClosure(Function fn) { - final id = ++_ObjCBlock38_closureRegistryIndex; - _ObjCBlock38_closureRegistry[id] = fn; +typedef sec_protocol_challenge_complete_t = ffi.Pointer<_ObjCBlock>; +typedef Dartsec_protocol_challenge_complete_t = ObjCBlock_ffiVoid_secidentityt; +void _ObjCBlock_ffiVoid_secidentityt_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, sec_identity_t arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +final _ObjCBlock_ffiVoid_secidentityt_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_secidentityt_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_secidentityt_registerClosure( + void Function(sec_identity_t) fn) { + final id = ++_ObjCBlock_ffiVoid_secidentityt_closureRegistryIndex; + _ObjCBlock_ffiVoid_secidentityt_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock38_closureTrampoline(ffi.Pointer<_ObjCBlock> block, bool arg0) { - return _ObjCBlock38_closureRegistry[block.ref.target.address]!(arg0); -} +void _ObjCBlock_ffiVoid_secidentityt_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, sec_identity_t arg0) => + _ObjCBlock_ffiVoid_secidentityt_closureRegistry[block.ref.target.address]!( + arg0); -class ObjCBlock38 extends _ObjCBlockBase { - ObjCBlock38._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_secidentityt extends _ObjCBlockBase { + ObjCBlock_ffiVoid_secidentityt._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock38.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_secidentityt.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer> + ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0)>(_ObjCBlock38_fnPtrTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, sec_identity_t)>( + _ObjCBlock_ffiVoid_secidentityt_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock38.fromFunction(NativeCupertinoHttp lib, void Function(bool arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_secidentityt.fromFunction( + NativeCupertinoHttp lib, void Function(sec_identity_t) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Bool arg0)>(_ObjCBlock38_closureTrampoline) + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, sec_identity_t)>( + _ObjCBlock_ffiVoid_secidentityt_closureTrampoline) .cast(), - _ObjCBlock38_registerClosure(fn)), + _ObjCBlock_ffiVoid_secidentityt_registerClosure( + (sec_identity_t arg0) => fn(arg0))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(bool arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, bool arg0)>()(_id, arg0); - } -} -final class SSLContext extends ffi.Opaque {} + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_secidentityt.listener( + NativeCupertinoHttp lib, void Function(sec_identity_t) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + sec_identity_t)>.listener( + _ObjCBlock_ffiVoid_secidentityt_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_secidentityt_registerClosure( + (sec_identity_t arg0) => fn(arg0))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, sec_identity_t)>? + _dartFuncListenerTrampoline; -abstract class SSLSessionOption { - static const int kSSLSessionOptionBreakOnServerAuth = 0; - static const int kSSLSessionOptionBreakOnCertRequested = 1; + void call(sec_identity_t arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, sec_identity_t arg0)>>() + .asFunction, sec_identity_t)>()( + _id, arg0); +} + +typedef sec_protocol_verify_t = ffi.Pointer<_ObjCBlock>; +typedef Dartsec_protocol_verify_t + = ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet; +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>>() + .asFunction< + void Function(sec_protocol_metadata_t, sec_trust_t, + sec_protocol_verify_complete_t)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureRegistry = + {}; +int _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_registerClosure( + void Function(sec_protocol_metadata_t, sec_trust_t, + sec_protocol_verify_complete_t) + fn) { + final id = + ++_ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureRegistryIndex; + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureRegistry[ + id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) => + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet + extends _ObjCBlockBase { + ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_trust_t arg1, sec_protocol_verify_complete_t arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + sec_protocol_metadata_t, + sec_trust_t, + sec_protocol_verify_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet.fromFunction( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t, sec_trust_t, Dartsec_protocol_verify_complete_t) + fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + sec_protocol_metadata_t, + sec_trust_t, + sec_protocol_verify_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_registerClosure( + (sec_protocol_metadata_t arg0, sec_trust_t arg1, sec_protocol_verify_complete_t arg2) => + fn(arg0, arg1, ObjCBlock_ffiVoid_bool._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet.listener( + NativeCupertinoHttp lib, + void Function(sec_protocol_metadata_t, sec_trust_t, + Dartsec_protocol_verify_complete_t) + fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, sec_protocol_metadata_t, sec_trust_t, sec_protocol_verify_complete_t)>.listener( + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_registerClosure( + (sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) => + fn(arg0, arg1, ObjCBlock_ffiVoid_bool._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + sec_protocol_metadata_t, + sec_trust_t, + sec_protocol_verify_complete_t)>? _dartFuncListenerTrampoline; + + void call(sec_protocol_metadata_t arg0, sec_trust_t arg1, + Dartsec_protocol_verify_complete_t arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, + sec_protocol_metadata_t, + sec_trust_t, + sec_protocol_verify_complete_t)>()(_id, arg0, arg1, arg2._id); +} + +typedef sec_protocol_verify_complete_t = ffi.Pointer<_ObjCBlock>; +typedef Dartsec_protocol_verify_complete_t = ObjCBlock_ffiVoid_bool; +void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, bool arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +final _ObjCBlock_ffiVoid_bool_closureRegistry = {}; +int _ObjCBlock_ffiVoid_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_bool_registerClosure( + void Function(bool) fn) { + final id = ++_ObjCBlock_ffiVoid_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_bool_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, bool arg0) => + _ObjCBlock_ffiVoid_bool_closureRegistry[block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_bool extends _ObjCBlockBase { + ObjCBlock_ffiVoid_bool._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool.fromFunctionPointer(NativeCupertinoHttp lib, + ffi.Pointer> ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool.fromFunction( + NativeCupertinoHttp lib, void Function(bool) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Bool)>( + _ObjCBlock_ffiVoid_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_bool_registerClosure( + (bool arg0) => fn(arg0))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_bool.listener( + NativeCupertinoHttp lib, void Function(bool) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Bool)>.listener( + _ObjCBlock_ffiVoid_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_bool_registerClosure( + (bool arg0) => fn(arg0))), + lib); + static ffi + .NativeCallable, ffi.Bool)>? + _dartFuncListenerTrampoline; + + void call(bool arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0)>>() + .asFunction, bool)>()(_id, arg0); +} + +final class SSLContext extends ffi.Opaque {} + +abstract class SSLSessionOption { + static const int kSSLSessionOptionBreakOnServerAuth = 0; + static const int kSSLSessionOptionBreakOnCertRequested = 1; static const int kSSLSessionOptionBreakOnClientAuth = 2; static const int kSSLSessionOptionFalseStart = 3; static const int kSSLSessionOptionSendOneByteRecord = 4; @@ -79239,15 +82141,21 @@ abstract class SSLConnectionType { } typedef SSLContextRef = ffi.Pointer; -typedef SSLReadFunc = ffi.Pointer< - ffi.NativeFunction< - OSStatus Function(SSLConnectionRef connection, - ffi.Pointer data, ffi.Pointer dataLength)>>; +typedef SSLReadFunc = ffi.Pointer>; +typedef SSLReadFuncFunction = OSStatus Function(SSLConnectionRef connection, + ffi.Pointer data, ffi.Pointer dataLength); +typedef DartSSLReadFuncFunction = DartSInt32 Function( + SSLConnectionRef connection, + ffi.Pointer data, + ffi.Pointer dataLength); typedef SSLConnectionRef = ffi.Pointer; -typedef SSLWriteFunc = ffi.Pointer< - ffi.NativeFunction< - OSStatus Function(SSLConnectionRef connection, - ffi.Pointer data, ffi.Pointer dataLength)>>; +typedef SSLWriteFunc = ffi.Pointer>; +typedef SSLWriteFuncFunction = OSStatus Function(SSLConnectionRef connection, + ffi.Pointer data, ffi.Pointer dataLength); +typedef DartSSLWriteFuncFunction = DartSInt32 Function( + SSLConnectionRef connection, + ffi.Pointer data, + ffi.Pointer dataLength); abstract class SSLAuthenticate { static const int kNeverAuthenticate = 0; @@ -79339,12 +82247,10 @@ class NSURLSession extends NSObject { /// The shared session uses the currently set global NSURLCache, /// NSHTTPCookieStorage and NSURLCredentialStorage objects. - static NSURLSession? getSharedSession(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_408( + static NSURLSession getSharedSession(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_438( _lib._class_NSURLSession1, _lib._sel_sharedSession1); - return _ret.address == 0 - ? null - : NSURLSession._(_ret, _lib, retain: true, release: true); + return NSURLSession._(_ret, _lib, retain: true, release: true); } /// Customization of NSURLSession occurs during creation of a new session. @@ -79353,53 +82259,47 @@ class NSURLSession extends NSObject { /// If you do specify a delegate, the delegate will be retained until after /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. static NSURLSession sessionWithConfiguration_( - NativeCupertinoHttp _lib, NSURLSessionConfiguration? configuration) { - final _ret = _lib._objc_msgSend_421( - _lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_1, - configuration?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSURLSessionConfiguration configuration) { + final _ret = _lib._objc_msgSend_454(_lib._class_NSURLSession1, + _lib._sel_sessionWithConfiguration_1, configuration._id); return NSURLSession._(_ret, _lib, retain: true, release: true); } static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( NativeCupertinoHttp _lib, - NSURLSessionConfiguration? configuration, + NSURLSessionConfiguration configuration, NSObject? delegate, NSOperationQueue? queue) { - final _ret = _lib._objc_msgSend_422( + final _ret = _lib._objc_msgSend_455( _lib._class_NSURLSession1, _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, - configuration?._id ?? ffi.nullptr, + configuration._id, delegate?._id ?? ffi.nullptr, queue?._id ?? ffi.nullptr); return NSURLSession._(_ret, _lib, retain: true, release: true); } - NSOperationQueue? get delegateQueue { - final _ret = _lib._objc_msgSend_391(_id, _lib._sel_delegateQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); + NSOperationQueue get delegateQueue { + final _ret = _lib._objc_msgSend_420(_id, _lib._sel_delegateQueue1); + return NSOperationQueue._(_ret, _lib, retain: true, release: true); } NSObject? get delegate { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_delegate1); + final _ret = _lib._objc_msgSend_61(_id, _lib._sel_delegate1); return _ret.address == 0 ? null : NSObject._(_ret, _lib, retain: true, release: true); } - NSURLSessionConfiguration? get configuration { - final _ret = _lib._objc_msgSend_409(_id, _lib._sel_configuration1); - return _ret.address == 0 - ? null - : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + NSURLSessionConfiguration get configuration { + final _ret = _lib._objc_msgSend_439(_id, _lib._sel_configuration1); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } /// The sessionDescription property is available for the developer to /// provide a descriptive label for the session. NSString? get sessionDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_sessionDescription1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_sessionDescription1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -79408,7 +82308,7 @@ class NSURLSession extends NSObject { /// The sessionDescription property is available for the developer to /// provide a descriptive label for the session. set sessionDescription(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); } @@ -79424,7 +82324,7 @@ class NSURLSession extends NSObject { /// session with the same identifier until URLSession:didBecomeInvalidWithError: has /// been issued. void finishTasksAndInvalidate() { - return _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); + _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); } /// -invalidateAndCancel acts as -finishTasksAndInvalidate, but issues @@ -79432,120 +82332,127 @@ class NSURLSession extends NSObject { /// cancellation is subject to the state of the task, and some tasks may /// have already have completed at the time they are sent -cancel. void invalidateAndCancel() { - return _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); + _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); } /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue. - void resetWithCompletionHandler_(ObjCBlock completionHandler) { - return _lib._objc_msgSend_387( + void resetWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { + _lib._objc_msgSend_415( _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); } /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue. - void flushWithCompletionHandler_(ObjCBlock completionHandler) { - return _lib._objc_msgSend_387( + void flushWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { + _lib._objc_msgSend_415( _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); } /// invokes completionHandler with outstanding data, upload and download tasks. - void getTasksWithCompletionHandler_(ObjCBlock39 completionHandler) { - return _lib._objc_msgSend_423( + void getTasksWithCompletionHandler_( + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray completionHandler) { + _lib._objc_msgSend_456( _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); } /// invokes completionHandler with all outstanding tasks. - void getAllTasksWithCompletionHandler_(ObjCBlock21 completionHandler) { - return _lib._objc_msgSend_424(_id, - _lib._sel_getAllTasksWithCompletionHandler_1, completionHandler._id); + void getAllTasksWithCompletionHandler_( + ObjCBlock_ffiVoid_NSArray1 completionHandler) { + _lib._objc_msgSend_457(_id, _lib._sel_getAllTasksWithCompletionHandler_1, + completionHandler._id); } /// Creates a data task with the given request. The request may have a body stream. - NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_425( - _id, _lib._sel_dataTaskWithRequest_1, request?._id ?? ffi.nullptr); + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { + final _ret = _lib._objc_msgSend_458( + _id, _lib._sel_dataTaskWithRequest_1, request._id); return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } /// Creates a data task to retrieve the contents of the given URL. - NSURLSessionDataTask dataTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_426( - _id, _lib._sel_dataTaskWithURL_1, url?._id ?? ffi.nullptr); + NSURLSessionDataTask dataTaskWithURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_459(_id, _lib._sel_dataTaskWithURL_1, url._id); return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( - NSURLRequest? request, NSURL? fileURL) { - final _ret = _lib._objc_msgSend_427( - _id, - _lib._sel_uploadTaskWithRequest_fromFile_1, - request?._id ?? ffi.nullptr, - fileURL?._id ?? ffi.nullptr); + NSURLRequest request, NSURL fileURL) { + final _ret = _lib._objc_msgSend_461(_id, + _lib._sel_uploadTaskWithRequest_fromFile_1, request._id, fileURL._id); return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } /// Creates an upload task with the given request. The body of the request is provided from the bodyData. NSURLSessionUploadTask uploadTaskWithRequest_fromData_( - NSURLRequest? request, NSData? bodyData) { - final _ret = _lib._objc_msgSend_428( - _id, - _lib._sel_uploadTaskWithRequest_fromData_1, - request?._id ?? ffi.nullptr, - bodyData?._id ?? ffi.nullptr); + NSURLRequest request, NSData bodyData) { + final _ret = _lib._objc_msgSend_462(_id, + _lib._sel_uploadTaskWithRequest_fromData_1, request._id, bodyData._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + + /// Creates an upload task from a resume data blob. Requires the server to support the latest resumable uploads + /// Internet-Draft from the HTTP Working Group, found at + /// https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/ + /// If resuming from an upload file, the file must still exist and be unmodified. If the upload cannot be successfully + /// resumed, URLSession:task:didCompleteWithError: will be called. + /// + /// - Parameter resumeData: Resume data blob from an incomplete upload, such as data returned by the cancelByProducingResumeData: method. + /// - Returns: A new session upload task, or nil if the resumeData is invalid. + NSURLSessionUploadTask uploadTaskWithResumeData_(NSData resumeData) { + final _ret = _lib._objc_msgSend_463( + _id, _lib._sel_uploadTaskWithResumeData_1, resumeData._id); return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. - NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_429(_id, - _lib._sel_uploadTaskWithStreamedRequest_1, request?._id ?? ffi.nullptr); + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { + final _ret = _lib._objc_msgSend_464( + _id, _lib._sel_uploadTaskWithStreamedRequest_1, request._id); return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } /// Creates a download task with the given request. - NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_431( - _id, _lib._sel_downloadTaskWithRequest_1, request?._id ?? ffi.nullptr); + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { + final _ret = _lib._objc_msgSend_465( + _id, _lib._sel_downloadTaskWithRequest_1, request._id); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } /// Creates a download task to download the contents of the given URL. - NSURLSessionDownloadTask downloadTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_432( - _id, _lib._sel_downloadTaskWithURL_1, url?._id ?? ffi.nullptr); + NSURLSessionDownloadTask downloadTaskWithURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_466(_id, _lib._sel_downloadTaskWithURL_1, url._id); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. - NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData? resumeData) { - final _ret = _lib._objc_msgSend_433(_id, - _lib._sel_downloadTaskWithResumeData_1, resumeData?._id ?? ffi.nullptr); + NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData resumeData) { + final _ret = _lib._objc_msgSend_467( + _id, _lib._sel_downloadTaskWithResumeData_1, resumeData._id); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } /// Creates a bidirectional stream task to a given host and port. NSURLSessionStreamTask streamTaskWithHostName_port_( - NSString? hostname, int port) { - final _ret = _lib._objc_msgSend_436( - _id, - _lib._sel_streamTaskWithHostName_port_1, - hostname?._id ?? ffi.nullptr, - port); + NSString hostname, DartNSInteger port) { + final _ret = _lib._objc_msgSend_470( + _id, _lib._sel_streamTaskWithHostName_port_1, hostname._id, port); return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); } /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. /// The NSNetService will be resolved before any IO completes. - NSURLSessionStreamTask streamTaskWithNetService_(NSNetService? service) { - final _ret = _lib._objc_msgSend_437( - _id, _lib._sel_streamTaskWithNetService_1, service?._id ?? ffi.nullptr); + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { + final _ret = _lib._objc_msgSend_471( + _id, _lib._sel_streamTaskWithNetService_1, service._id); return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); } /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. - NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL? url) { - final _ret = _lib._objc_msgSend_444( - _id, _lib._sel_webSocketTaskWithURL_1, url?._id ?? ffi.nullptr); + NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL url) { + final _ret = + _lib._objc_msgSend_478(_id, _lib._sel_webSocketTaskWithURL_1, url._id); return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } @@ -79553,21 +82460,18 @@ class NSURLSession extends NSObject { /// negotiate a preferred protocol with the server /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( - NSURL? url, NSArray? protocols) { - final _ret = _lib._objc_msgSend_445( - _id, - _lib._sel_webSocketTaskWithURL_protocols_1, - url?._id ?? ffi.nullptr, - protocols?._id ?? ffi.nullptr); + NSURL url, NSArray protocols) { + final _ret = _lib._objc_msgSend_479(_id, + _lib._sel_webSocketTaskWithURL_protocols_1, url._id, protocols._id); return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } /// Creates a WebSocket task given the request. The request properties can be modified and will be used by the task during the HTTP handshake phase. /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. - NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest? request) { - final _ret = _lib._objc_msgSend_446( - _id, _lib._sel_webSocketTaskWithRequest_1, request?._id ?? ffi.nullptr); + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { + final _ret = _lib._objc_msgSend_480( + _id, _lib._sel_webSocketTaskWithRequest_1, request._id); return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); } @@ -79590,82 +82494,113 @@ class NSURLSession extends NSObject { /// see . The delegate, if any, will still be /// called for authentication challenges. NSURLSessionDataTask dataTaskWithRequest_completionHandler_( - NSURLRequest? request, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_447( + NSURLRequest request, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_481( _id, _lib._sel_dataTaskWithRequest_completionHandler_1, - request?._id ?? ffi.nullptr, + request._id, completionHandler._id); return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } - NSURLSessionDataTask dataTaskWithURL_completionHandler_( - NSURL? url, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_448( + NSURLSessionDataTask dataTaskWithURL_completionHandler_(NSURL url, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_482( _id, _lib._sel_dataTaskWithURL_completionHandler_1, - url?._id ?? ffi.nullptr, + url._id, completionHandler._id); return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); } /// upload convenience method. NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( - NSURLRequest? request, NSURL? fileURL, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_449( + NSURLRequest request, + NSURL fileURL, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_483( _id, _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, - request?._id ?? ffi.nullptr, - fileURL?._id ?? ffi.nullptr, + request._id, + fileURL._id, completionHandler._id); return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( - NSURLRequest? request, NSData? bodyData, ObjCBlock44 completionHandler) { - final _ret = _lib._objc_msgSend_450( + NSURLRequest request, + NSData? bodyData, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_484( _id, _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, - request?._id ?? ffi.nullptr, + request._id, bodyData?._id ?? ffi.nullptr, completionHandler._id); return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); } + /// Creates a URLSessionUploadTask from a resume data blob. If resuming from an upload + /// file, the file must still exist and be unmodified. + /// + /// - Parameter resumeData: Resume data blob from an incomplete upload, such as data returned by the cancelByProducingResumeData: method. + /// - Parameter completionHandler: The completion handler to call when the load request is complete. + /// - Returns: A new session upload task, or nil if the resumeData is invalid. + NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( + NSData resumeData, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_485( + _id, + _lib._sel_uploadTaskWithResumeData_completionHandler_1, + resumeData._id, + completionHandler._id); + return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); + } + /// download task convenience methods. When a download successfully /// completes, the NSURL will point to a file that must be read or /// copied during the invocation of the completion routine. The file /// will be removed automatically. NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( - NSURLRequest? request, ObjCBlock45 completionHandler) { - final _ret = _lib._objc_msgSend_451( + NSURLRequest request, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_486( _id, _lib._sel_downloadTaskWithRequest_completionHandler_1, - request?._id ?? ffi.nullptr, + request._id, completionHandler._id); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } - NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( - NSURL? url, ObjCBlock45 completionHandler) { - final _ret = _lib._objc_msgSend_452( + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_(NSURL url, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_487( _id, _lib._sel_downloadTaskWithURL_completionHandler_1, - url?._id ?? ffi.nullptr, + url._id, completionHandler._id); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( - NSData? resumeData, ObjCBlock45 completionHandler) { - final _ret = _lib._objc_msgSend_453( + NSData resumeData, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _lib._objc_msgSend_488( _id, _lib._sel_downloadTaskWithResumeData_completionHandler_1, - resumeData?._id ?? ffi.nullptr, + resumeData._id, completionHandler._id); return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); } + static NSURLSession allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSession1, _lib._sel_allocWithZone_1, zone); + return NSURLSession._(_ret, _lib, retain: false, release: true); + } + static NSURLSession alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_alloc1); @@ -79711,37 +82646,33 @@ class NSURLSessionConfiguration extends NSObject { obj._lib._class_NSURLSessionConfiguration1); } - static NSURLSessionConfiguration? getDefaultSessionConfiguration( + static NSURLSessionConfiguration getDefaultSessionConfiguration( NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_409(_lib._class_NSURLSessionConfiguration1, + final _ret = _lib._objc_msgSend_439(_lib._class_NSURLSessionConfiguration1, _lib._sel_defaultSessionConfiguration1); - return _ret.address == 0 - ? null - : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } - static NSURLSessionConfiguration? getEphemeralSessionConfiguration( + static NSURLSessionConfiguration getEphemeralSessionConfiguration( NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_409(_lib._class_NSURLSessionConfiguration1, + final _ret = _lib._objc_msgSend_439(_lib._class_NSURLSessionConfiguration1, _lib._sel_ephemeralSessionConfiguration1); - return _ret.address == 0 - ? null - : NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); + return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } static NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_410( + NativeCupertinoHttp _lib, NSString identifier) { + final _ret = _lib._objc_msgSend_440( _lib._class_NSURLSessionConfiguration1, _lib._sel_backgroundSessionConfigurationWithIdentifier_1, - identifier?._id ?? ffi.nullptr); + identifier._id); return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } /// identifier for the background session configuration NSString? get identifier { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_identifier1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_identifier1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -79749,44 +82680,51 @@ class NSURLSessionConfiguration extends NSObject { /// default cache policy for requests int get requestCachePolicy { - return _lib._objc_msgSend_325(_id, _lib._sel_requestCachePolicy1); + return _lib._objc_msgSend_344(_id, _lib._sel_requestCachePolicy1); } /// default cache policy for requests set requestCachePolicy(int value) { - _lib._objc_msgSend_393(_id, _lib._sel_setRequestCachePolicy_1, value); + return _lib._objc_msgSend_422( + _id, _lib._sel_setRequestCachePolicy_1, value); } /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. - double get timeoutIntervalForRequest { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForRequest1); + DartNSTimeInterval get timeoutIntervalForRequest { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_timeoutIntervalForRequest1) + : _lib._objc_msgSend_90(_id, _lib._sel_timeoutIntervalForRequest1); } /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. - set timeoutIntervalForRequest(double value) { - _lib._objc_msgSend_383( + set timeoutIntervalForRequest(DartNSTimeInterval value) { + return _lib._objc_msgSend_411( _id, _lib._sel_setTimeoutIntervalForRequest_1, value); } /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. - double get timeoutIntervalForResource { - return _lib._objc_msgSend_85(_id, _lib._sel_timeoutIntervalForResource1); + DartNSTimeInterval get timeoutIntervalForResource { + return _lib._objc_msgSend_useVariants1 + ? _lib._objc_msgSend_90_fpret( + _id, _lib._sel_timeoutIntervalForResource1) + : _lib._objc_msgSend_90(_id, _lib._sel_timeoutIntervalForResource1); } /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. - set timeoutIntervalForResource(double value) { - _lib._objc_msgSend_383( + set timeoutIntervalForResource(DartNSTimeInterval value) { + return _lib._objc_msgSend_411( _id, _lib._sel_setTimeoutIntervalForResource_1, value); } /// type of service for requests. int get networkServiceType { - return _lib._objc_msgSend_326(_id, _lib._sel_networkServiceType1); + return _lib._objc_msgSend_345(_id, _lib._sel_networkServiceType1); } /// type of service for requests. set networkServiceType(int value) { - _lib._objc_msgSend_394(_id, _lib._sel_setNetworkServiceType_1, value); + return _lib._objc_msgSend_423( + _id, _lib._sel_setNetworkServiceType_1, value); } /// allow request to route over cellular. @@ -79796,7 +82734,8 @@ class NSURLSessionConfiguration extends NSObject { /// allow request to route over cellular. set allowsCellularAccess(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setAllowsCellularAccess_1, value); + return _lib._objc_msgSend_386( + _id, _lib._sel_setAllowsCellularAccess_1, value); } /// allow request to route over expensive networks. Defaults to YES. @@ -79806,7 +82745,7 @@ class NSURLSessionConfiguration extends NSObject { /// allow request to route over expensive networks. Defaults to YES. set allowsExpensiveNetworkAccess(bool value) { - _lib._objc_msgSend_361( + return _lib._objc_msgSend_386( _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); } @@ -79818,7 +82757,7 @@ class NSURLSessionConfiguration extends NSObject { /// allow request to route over networks in constrained mode. Defaults to YES. set allowsConstrainedNetworkAccess(bool value) { - _lib._objc_msgSend_361( + return _lib._objc_msgSend_386( _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); } @@ -79829,7 +82768,8 @@ class NSURLSessionConfiguration extends NSObject { /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. set requiresDNSSECValidation(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setRequiresDNSSECValidation_1, value); + return _lib._objc_msgSend_386( + _id, _lib._sel_setRequiresDNSSECValidation_1, value); } /// Causes tasks to wait for network connectivity to become available, rather @@ -79861,7 +82801,8 @@ class NSURLSessionConfiguration extends NSObject { /// Default value is NO. Ignored by background sessions, as background sessions /// always wait for connectivity. set waitsForConnectivity(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setWaitsForConnectivity_1, value); + return _lib._objc_msgSend_386( + _id, _lib._sel_setWaitsForConnectivity_1, value); } /// allows background tasks to be scheduled at the discretion of the system for optimal performance. @@ -79871,7 +82812,7 @@ class NSURLSessionConfiguration extends NSObject { /// allows background tasks to be scheduled at the discretion of the system for optimal performance. set discretionary(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setDiscretionary_1, value); + return _lib._objc_msgSend_386(_id, _lib._sel_setDiscretionary_1, value); } /// The identifier of the shared data container into which files in background sessions should be downloaded. @@ -79879,7 +82820,7 @@ class NSURLSessionConfiguration extends NSObject { /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. NSString? get sharedContainerIdentifier { final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_sharedContainerIdentifier1); + _lib._objc_msgSend_55(_id, _lib._sel_sharedContainerIdentifier1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -79889,7 +82830,7 @@ class NSURLSessionConfiguration extends NSObject { /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. set sharedContainerIdentifier(NSString? value) { - _lib._objc_msgSend_360(_id, _lib._sel_setSharedContainerIdentifier_1, + return _lib._objc_msgSend_395(_id, _lib._sel_setSharedContainerIdentifier_1, value?._id ?? ffi.nullptr); } @@ -79908,13 +82849,14 @@ class NSURLSessionConfiguration extends NSObject { /// /// NOTE: macOS apps based on AppKit do not support background launch. set sessionSendsLaunchEvents(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setSessionSendsLaunchEvents_1, value); + return _lib._objc_msgSend_386( + _id, _lib._sel_setSessionSendsLaunchEvents_1, value); } /// The proxy dictionary, as described by NSDictionary? get connectionProxyDictionary { final _ret = - _lib._objc_msgSend_180(_id, _lib._sel_connectionProxyDictionary1); + _lib._objc_msgSend_288(_id, _lib._sel_connectionProxyDictionary1); return _ret.address == 0 ? null : NSDictionary._(_ret, _lib, retain: true, release: true); @@ -79922,53 +82864,53 @@ class NSURLSessionConfiguration extends NSObject { /// The proxy dictionary, as described by set connectionProxyDictionary(NSDictionary? value) { - _lib._objc_msgSend_396(_id, _lib._sel_setConnectionProxyDictionary_1, + return _lib._objc_msgSend_425(_id, _lib._sel_setConnectionProxyDictionary_1, value?._id ?? ffi.nullptr); } /// The minimum allowable versions of the TLS protocol, from int get TLSMinimumSupportedProtocol { - return _lib._objc_msgSend_411(_id, _lib._sel_TLSMinimumSupportedProtocol1); + return _lib._objc_msgSend_441(_id, _lib._sel_TLSMinimumSupportedProtocol1); } /// The minimum allowable versions of the TLS protocol, from set TLSMinimumSupportedProtocol(int value) { - _lib._objc_msgSend_412( + return _lib._objc_msgSend_442( _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); } /// The maximum allowable versions of the TLS protocol, from int get TLSMaximumSupportedProtocol { - return _lib._objc_msgSend_411(_id, _lib._sel_TLSMaximumSupportedProtocol1); + return _lib._objc_msgSend_441(_id, _lib._sel_TLSMaximumSupportedProtocol1); } /// The maximum allowable versions of the TLS protocol, from set TLSMaximumSupportedProtocol(int value) { - _lib._objc_msgSend_412( + return _lib._objc_msgSend_442( _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); } /// The minimum allowable versions of the TLS protocol, from int get TLSMinimumSupportedProtocolVersion { - return _lib._objc_msgSend_413( + return _lib._objc_msgSend_443( _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); } /// The minimum allowable versions of the TLS protocol, from set TLSMinimumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_414( + return _lib._objc_msgSend_444( _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); } /// The maximum allowable versions of the TLS protocol, from int get TLSMaximumSupportedProtocolVersion { - return _lib._objc_msgSend_413( + return _lib._objc_msgSend_443( _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); } /// The maximum allowable versions of the TLS protocol, from set TLSMaximumSupportedProtocolVersion(int value) { - _lib._objc_msgSend_414( + return _lib._objc_msgSend_444( _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); } @@ -79979,7 +82921,8 @@ class NSURLSessionConfiguration extends NSObject { /// Allow the use of HTTP pipelining set HTTPShouldUsePipelining(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setHTTPShouldUsePipelining_1, value); + return _lib._objc_msgSend_386( + _id, _lib._sel_setHTTPShouldUsePipelining_1, value); } /// Allow the session to set cookies on requests @@ -79989,23 +82932,25 @@ class NSURLSessionConfiguration extends NSObject { /// Allow the session to set cookies on requests set HTTPShouldSetCookies(bool value) { - _lib._objc_msgSend_361(_id, _lib._sel_setHTTPShouldSetCookies_1, value); + return _lib._objc_msgSend_386( + _id, _lib._sel_setHTTPShouldSetCookies_1, value); } /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. int get HTTPCookieAcceptPolicy { - return _lib._objc_msgSend_404(_id, _lib._sel_HTTPCookieAcceptPolicy1); + return _lib._objc_msgSend_434(_id, _lib._sel_HTTPCookieAcceptPolicy1); } /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. set HTTPCookieAcceptPolicy(int value) { - _lib._objc_msgSend_405(_id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); + return _lib._objc_msgSend_435( + _id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); } /// Specifies additional headers which will be set on outgoing requests. /// Note that these headers are added to the request only if not already present. NSDictionary? get HTTPAdditionalHeaders { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_HTTPAdditionalHeaders1); + final _ret = _lib._objc_msgSend_288(_id, _lib._sel_HTTPAdditionalHeaders1); return _ret.address == 0 ? null : NSDictionary._(_ret, _lib, retain: true, release: true); @@ -80014,24 +82959,24 @@ class NSURLSessionConfiguration extends NSObject { /// Specifies additional headers which will be set on outgoing requests. /// Note that these headers are added to the request only if not already present. set HTTPAdditionalHeaders(NSDictionary? value) { - _lib._objc_msgSend_396( + return _lib._objc_msgSend_425( _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); } /// The maximum number of simultaneous persistent connections per host - int get HTTPMaximumConnectionsPerHost { - return _lib._objc_msgSend_81(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); + DartNSInteger get HTTPMaximumConnectionsPerHost { + return _lib._objc_msgSend_86(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); } /// The maximum number of simultaneous persistent connections per host - set HTTPMaximumConnectionsPerHost(int value) { - _lib._objc_msgSend_388( + set HTTPMaximumConnectionsPerHost(DartNSInteger value) { + return _lib._objc_msgSend_416( _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); } /// The cookie storage object to use, or nil to indicate that no cookies should be handled NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _lib._objc_msgSend_400(_id, _lib._sel_HTTPCookieStorage1); + final _ret = _lib._objc_msgSend_445(_id, _lib._sel_HTTPCookieStorage1); return _ret.address == 0 ? null : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); @@ -80039,13 +82984,13 @@ class NSURLSessionConfiguration extends NSObject { /// The cookie storage object to use, or nil to indicate that no cookies should be handled set HTTPCookieStorage(NSHTTPCookieStorage? value) { - _lib._objc_msgSend_415( + return _lib._objc_msgSend_446( _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); } /// The credential storage object, or nil to indicate that no credential storage is to be used NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _lib._objc_msgSend_416(_id, _lib._sel_URLCredentialStorage1); + final _ret = _lib._objc_msgSend_447(_id, _lib._sel_URLCredentialStorage1); return _ret.address == 0 ? null : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); @@ -80053,13 +82998,13 @@ class NSURLSessionConfiguration extends NSObject { /// The credential storage object, or nil to indicate that no credential storage is to be used set URLCredentialStorage(NSURLCredentialStorage? value) { - _lib._objc_msgSend_417( + return _lib._objc_msgSend_448( _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); } /// The URL resource cache, or nil to indicate that no caching is to be performed NSURLCache? get URLCache { - final _ret = _lib._objc_msgSend_320(_id, _lib._sel_URLCache1); + final _ret = _lib._objc_msgSend_449(_id, _lib._sel_URLCache1); return _ret.address == 0 ? null : NSURLCache._(_ret, _lib, retain: true, release: true); @@ -80067,7 +83012,7 @@ class NSURLSessionConfiguration extends NSObject { /// The URL resource cache, or nil to indicate that no caching is to be performed set URLCache(NSURLCache? value) { - _lib._objc_msgSend_321( + return _lib._objc_msgSend_450( _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); } @@ -80081,7 +83026,7 @@ class NSURLSessionConfiguration extends NSObject { /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) set shouldUseExtendedBackgroundIdleMode(bool value) { - _lib._objc_msgSend_361( + return _lib._objc_msgSend_386( _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); } @@ -80094,7 +83039,7 @@ class NSURLSessionConfiguration extends NSObject { /// Custom NSURLProtocol subclasses are not available to background /// sessions. NSArray? get protocolClasses { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_protocolClasses1); + final _ret = _lib._objc_msgSend_188(_id, _lib._sel_protocolClasses1); return _ret.address == 0 ? null : NSArray._(_ret, _lib, retain: true, release: true); @@ -80109,18 +83054,19 @@ class NSURLSessionConfiguration extends NSObject { /// Custom NSURLProtocol subclasses are not available to background /// sessions. set protocolClasses(NSArray? value) { - _lib._objc_msgSend_418( + return _lib._objc_msgSend_451( _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); } /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone int get multipathServiceType { - return _lib._objc_msgSend_419(_id, _lib._sel_multipathServiceType1); + return _lib._objc_msgSend_452(_id, _lib._sel_multipathServiceType1); } /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone set multipathServiceType(int value) { - _lib._objc_msgSend_420(_id, _lib._sel_setMultipathServiceType_1, value); + return _lib._objc_msgSend_453( + _id, _lib._sel_setMultipathServiceType_1, value); } @override @@ -80137,14 +83083,20 @@ class NSURLSessionConfiguration extends NSObject { } static NSURLSessionConfiguration backgroundSessionConfiguration_( - NativeCupertinoHttp _lib, NSString? identifier) { - final _ret = _lib._objc_msgSend_410( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfiguration_1, - identifier?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSString identifier) { + final _ret = _lib._objc_msgSend_440(_lib._class_NSURLSessionConfiguration1, + _lib._sel_backgroundSessionConfiguration_1, identifier._id); return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); } + static NSURLSessionConfiguration allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionConfiguration1, + _lib._sel_allocWithZone_1, zone); + return NSURLSessionConfiguration._(_ret, _lib, + retain: false, release: true); + } + static NSURLSessionConfiguration alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); @@ -80215,106 +83167,258 @@ abstract class NSURLSessionMultipathServiceType { static const int NSURLSessionMultipathServiceTypeAggregate = 3; } -void _ObjCBlock39_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunction(NativeCupertinoHttp lib, void Function(NSArray, NSArray, NSArray) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + NSArray._(arg0, lib, retain: true, release: true), + NSArray._(arg1, lib, retain: true, release: true), + NSArray._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.listener(NativeCupertinoHttp lib, void Function(NSArray, NSArray, NSArray) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + NSArray._(arg0, lib, retain: true, release: true), + NSArray._(arg1, lib, retain: true, release: true), + NSArray._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSArray arg0, NSArray arg1, NSArray arg2) => _id.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() .asFunction< void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2._id); } -final _ObjCBlock39_closureRegistry = {}; -int _ObjCBlock39_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock39_registerClosure(Function fn) { - final id = ++_ObjCBlock39_closureRegistryIndex; - _ObjCBlock39_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSArray1_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray1_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock39_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock39_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSArray1_closureRegistry[block.ref.target.address]!( + arg0); -class ObjCBlock39 extends _ObjCBlockBase { - ObjCBlock39._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSArray1 extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSArray1._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock39.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray1.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock39_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock39.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSArray1.fromFunction( + NativeCupertinoHttp lib, void Function(NSArray) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock39_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) .cast(), - _ObjCBlock39_registerClosure(fn)), + _ObjCBlock_ffiVoid_NSArray1_registerClosure( + (ffi.Pointer arg0) => + fn(NSArray._(arg0, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSArray1.listener( + NativeCupertinoHttp lib, void Function(NSArray) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray1_registerClosure( + (ffi.Pointer arg0) => + fn(NSArray._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSArray arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0._id); } /// An NSURLSessionUploadTask does not currently provide any additional @@ -80358,6 +83462,25 @@ class NSURLSessionUploadTask extends NSURLSessionDataTask { return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); } + /// Cancels an upload and calls the completion handler with resume data for later use. + /// resumeData will be nil if the server does not support the latest resumable uploads + /// Internet-Draft from the HTTP Working Group, found at + /// https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/ + /// + /// - Parameter completionHandler: The completion handler to call when the upload has been successfully canceled. + void cancelByProducingResumeData_( + ObjCBlock_ffiVoid_NSData completionHandler) { + _lib._objc_msgSend_460( + _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); + } + + static NSURLSessionUploadTask allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSessionUploadTask1, _lib._sel_allocWithZone_1, zone); + return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); + } + static NSURLSessionUploadTask alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSURLSessionUploadTask1, _lib._sel_alloc1); @@ -80365,6 +83488,115 @@ class NSURLSessionUploadTask extends NSURLSessionDataTask { } } +void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSData_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSData_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSData_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSData_closureRegistry[block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSData extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSData._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi + .NativeFunction arg0)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData.fromFunction( + NativeCupertinoHttp lib, void Function(NSData?) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSData._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData.listener( + NativeCupertinoHttp lib, void Function(NSData?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSData._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSData? arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); +} + /// NSURLSessionDownloadTask is a task that represents a download to /// local storage. class NSURLSessionDownloadTask extends NSURLSessionTask { @@ -80399,8 +83631,9 @@ class NSURLSessionDownloadTask extends NSURLSessionTask { /// with -downloadTaskWithResumeData: to attempt to resume the download. /// If resume data cannot be created, the completion handler will be /// called with nil resumeData. - void cancelByProducingResumeData_(ObjCBlock40 completionHandler) { - return _lib._objc_msgSend_430( + void cancelByProducingResumeData_( + ObjCBlock_ffiVoid_NSData completionHandler) { + _lib._objc_msgSend_460( _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); } @@ -80416,6 +83649,13 @@ class NSURLSessionDownloadTask extends NSURLSessionTask { return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); } + static NSURLSessionDownloadTask allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSessionDownloadTask1, _lib._sel_allocWithZone_1, zone); + return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); + } + static NSURLSessionDownloadTask alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSURLSessionDownloadTask1, _lib._sel_alloc1); @@ -80423,74 +83663,6 @@ class NSURLSessionDownloadTask extends NSURLSessionTask { } } -void _ObjCBlock40_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); -} - -final _ObjCBlock40_closureRegistry = {}; -int _ObjCBlock40_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock40_registerClosure(Function fn) { - final id = ++_ObjCBlock40_closureRegistryIndex; - _ObjCBlock40_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock40_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock40_closureRegistry[block.ref.target.address]!(arg0); -} - -class ObjCBlock40 extends _ObjCBlockBase { - ObjCBlock40._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); - - /// Creates a block from a C function pointer. - ObjCBlock40.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock40_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - ObjCBlock40.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock40_closureTrampoline) - .cast(), - _ObjCBlock40_registerClosure(fn)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } -} - /// An NSURLSessionStreamTask provides an interface to perform reads /// and writes to a TCP/IP stream created via NSURLSession. This task /// may be explicitly created from an NSURLSession, or created as a @@ -80540,9 +83712,12 @@ class NSURLSessionStreamTask extends NSURLSessionTask { /// handler on the sessions delegate queue with the data or an error. /// If an error occurs, any outstanding reads will also fail, and new /// read requests will error out immediately. - void readDataOfMinLength_maxLength_timeout_completionHandler_(int minBytes, - int maxBytes, double timeout, ObjCBlock41 completionHandler) { - return _lib._objc_msgSend_434( + void readDataOfMinLength_maxLength_timeout_completionHandler_( + DartNSUInteger minBytes, + DartNSUInteger maxBytes, + DartNSTimeInterval timeout, + ObjCBlock_ffiVoid_NSData_bool_NSError completionHandler) { + _lib._objc_msgSend_468( _id, _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, minBytes, @@ -80556,14 +83731,10 @@ class NSURLSessionStreamTask extends NSURLSessionTask { /// occur. Note that invocation of the completion handler does not /// guarantee that the remote side has received all the bytes, only /// that they have been written to the kernel. - void writeData_timeout_completionHandler_( - NSData? data, double timeout, ObjCBlock42 completionHandler) { - return _lib._objc_msgSend_435( - _id, - _lib._sel_writeData_timeout_completionHandler_1, - data?._id ?? ffi.nullptr, - timeout, - completionHandler._id); + void writeData_timeout_completionHandler_(NSData data, + DartNSTimeInterval timeout, ObjCBlock_ffiVoid_NSError completionHandler) { + _lib._objc_msgSend_469(_id, _lib._sel_writeData_timeout_completionHandler_1, + data._id, timeout, completionHandler._id); } /// -captureStreams completes any already enqueued reads @@ -80573,7 +83744,7 @@ class NSURLSessionStreamTask extends NSURLSessionTask { /// considered completed and will not receive any more delegate /// messages. void captureStreams() { - return _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); + _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); } /// Enqueue a request to close the write end of the underlying socket. @@ -80582,21 +83753,21 @@ class NSURLSessionStreamTask extends NSURLSessionTask { /// back to the client, so best practice is to continue reading from /// the server until you receive EOF. void closeWrite() { - return _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); + _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); } /// Enqueue a request to close the read side of the underlying socket. /// All outstanding IO will complete before the read side is closed. /// You may continue writing to the server. void closeRead() { - return _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); + _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); } /// Begin encrypted handshake. The handshake begins after all pending /// IO has completed. TLS authentication callbacks are sent to the /// session's -URLSession:task:didReceiveChallenge:completionHandler: void startSecureConnection() { - return _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); + _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); } /// Cleanly close a secure connection after all pending secure IO has @@ -80604,7 +83775,7 @@ class NSURLSessionStreamTask extends NSURLSessionTask { /// /// @warning This API is non-functional. void stopSecureConnection() { - return _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); + _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); } @override @@ -80619,6 +83790,13 @@ class NSURLSessionStreamTask extends NSURLSessionTask { return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); } + static NSURLSessionStreamTask allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSessionStreamTask1, _lib._sel_allocWithZone_1, zone); + return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); + } + static NSURLSessionStreamTask alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); @@ -80626,38 +83804,49 @@ class NSURLSessionStreamTask extends NSURLSessionTask { } } -void _ObjCBlock41_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} - -final _ObjCBlock41_closureRegistry = {}; -int _ObjCBlock41_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock41_registerClosure(Function fn) { - final id = ++_ObjCBlock41_closureRegistryIndex; - _ObjCBlock41_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + void Function(ffi.Pointer, bool, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock41_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _ObjCBlock41_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock41 extends _ObjCBlockBase { - ObjCBlock41._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSData_bool_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSData_bool_NSError._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock41.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -80668,81 +83857,117 @@ class ObjCBlock41 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock41_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock41.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) - fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunction( + NativeCupertinoHttp lib, void Function(NSData, bool, NSError?) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock41_closureTrampoline) + ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Bool, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) .cast(), - _ObjCBlock41_registerClosure(fn)), + _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( + NSData._(arg0, lib, retain: true, release: true), + arg1, + arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } -} -void _ObjCBlock42_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction arg0)>()(arg0); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData_bool_NSError.listener( + NativeCupertinoHttp lib, void Function(NSData, bool, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn(NSData._(arg0, lib, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSData arg0, bool arg1, NSError? arg2) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + bool, ffi.Pointer)>()( + _id, arg0._id, arg1, arg2?._id ?? ffi.nullptr); } -final _ObjCBlock42_closureRegistry = {}; -int _ObjCBlock42_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock42_registerClosure(Function fn) { - final id = ++_ObjCBlock42_closureRegistryIndex; - _ObjCBlock42_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSError_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSError_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock42_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) { - return _ObjCBlock42_closureRegistry[block.ref.target.address]!(arg0); -} +void _ObjCBlock_ffiVoid_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSError_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock42 extends _ObjCBlockBase { - ObjCBlock42._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSError._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock42.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSError.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi @@ -80751,37 +83976,72 @@ class ObjCBlock42 extends _ObjCBlockBase { : this._( lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock42_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock42.fromFunction( - NativeCupertinoHttp lib, void Function(ffi.Pointer arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSError.fromFunction( + NativeCupertinoHttp lib, void Function(NSError?) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>( - _ObjCBlock42_closureTrampoline) + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) .cast(), - _ObjCBlock42_registerClosure(fn)), + _ObjCBlock_ffiVoid_NSError_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSError._(arg0, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>()(_id, arg0); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSError.listener( + NativeCupertinoHttp lib, void Function(NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSError_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSError._(arg0, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSError? arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, + ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); } class NSNetService extends _ObjCWrapper { @@ -80846,57 +84106,58 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { /// Note that invocation of the completion handler does not /// guarantee that the remote side has received all the bytes, only /// that they have been written to the kernel. - void sendMessage_completionHandler_( - NSURLSessionWebSocketMessage? message, ObjCBlock42 completionHandler) { - return _lib._objc_msgSend_439( - _id, - _lib._sel_sendMessage_completionHandler_1, - message?._id ?? ffi.nullptr, - completionHandler._id); + void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, + ObjCBlock_ffiVoid_NSError completionHandler) { + _lib._objc_msgSend_473(_id, _lib._sel_sendMessage_completionHandler_1, + message._id, completionHandler._id); } /// Reads a WebSocket message once all the frames of the message are available. /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out /// and all outstanding work will also fail resulting in the end of the task. - void receiveMessageWithCompletionHandler_(ObjCBlock43 completionHandler) { - return _lib._objc_msgSend_440(_id, - _lib._sel_receiveMessageWithCompletionHandler_1, completionHandler._id); + void receiveMessageWithCompletionHandler_( + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError + completionHandler) { + _lib._objc_msgSend_474(_id, _lib._sel_receiveMessageWithCompletionHandler_1, + completionHandler._id); } /// Sends a ping frame from the client side. The pongReceiveHandler is invoked when the client /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. - void sendPingWithPongReceiveHandler_(ObjCBlock42 pongReceiveHandler) { - return _lib._objc_msgSend_441(_id, - _lib._sel_sendPingWithPongReceiveHandler_1, pongReceiveHandler._id); + void sendPingWithPongReceiveHandler_( + ObjCBlock_ffiVoid_NSError pongReceiveHandler) { + _lib._objc_msgSend_475(_id, _lib._sel_sendPingWithPongReceiveHandler_1, + pongReceiveHandler._id); } /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { - return _lib._objc_msgSend_442(_id, _lib._sel_cancelWithCloseCode_reason_1, + _lib._objc_msgSend_476(_id, _lib._sel_cancelWithCloseCode_reason_1, closeCode, reason?._id ?? ffi.nullptr); } /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached - int get maximumMessageSize { - return _lib._objc_msgSend_81(_id, _lib._sel_maximumMessageSize1); + DartNSInteger get maximumMessageSize { + return _lib._objc_msgSend_86(_id, _lib._sel_maximumMessageSize1); } /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached - set maximumMessageSize(int value) { - _lib._objc_msgSend_388(_id, _lib._sel_setMaximumMessageSize_1, value); + set maximumMessageSize(DartNSInteger value) { + return _lib._objc_msgSend_416( + _id, _lib._sel_setMaximumMessageSize_1, value); } /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid int get closeCode { - return _lib._objc_msgSend_443(_id, _lib._sel_closeCode1); + return _lib._objc_msgSend_477(_id, _lib._sel_closeCode1); } /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running NSData? get closeReason { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_closeReason1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_closeReason1); return _ret.address == 0 ? null : NSData._(_ret, _lib, retain: true, release: true); @@ -80915,6 +84176,14 @@ class NSURLSessionWebSocketTask extends NSURLSessionTask { retain: false, release: true); } + static NSURLSessionWebSocketTask allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionWebSocketTask1, + _lib._sel_allocWithZone_1, zone); + return NSURLSessionWebSocketTask._(_ret, _lib, + retain: false, release: true); + } + static NSURLSessionWebSocketTask alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSURLSessionWebSocketTask1, _lib._sel_alloc1); @@ -80954,34 +84223,34 @@ class NSURLSessionWebSocketMessage extends NSObject { } /// Create a message with data type - NSURLSessionWebSocketMessage initWithData_(NSData? data) { - final _ret = _lib._objc_msgSend_217( - _id, _lib._sel_initWithData_1, data?._id ?? ffi.nullptr); + NSURLSessionWebSocketMessage initWithData_(NSData data) { + final _ret = + _lib._objc_msgSend_228(_id, _lib._sel_initWithData_1, data._id); return NSURLSessionWebSocketMessage._(_ret, _lib, retain: true, release: true); } /// Create a message with string type - NSURLSessionWebSocketMessage initWithString_(NSString? string) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, string?._id ?? ffi.nullptr); + NSURLSessionWebSocketMessage initWithString_(NSString string) { + final _ret = + _lib._objc_msgSend_42(_id, _lib._sel_initWithString_1, string._id); return NSURLSessionWebSocketMessage._(_ret, _lib, retain: true, release: true); } int get type { - return _lib._objc_msgSend_438(_id, _lib._sel_type1); + return _lib._objc_msgSend_472(_id, _lib._sel_type1); } NSData? get data { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_data1); return _ret.address == 0 ? null : NSData._(_ret, _lib, retain: true, release: true); } NSString? get string { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_string1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -81001,6 +84270,14 @@ class NSURLSessionWebSocketMessage extends NSObject { retain: false, release: true); } + static NSURLSessionWebSocketMessage allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionWebSocketMessage1, + _lib._sel_allocWithZone_1, zone); + return NSURLSessionWebSocketMessage._(_ret, _lib, + retain: false, release: true); + } + static NSURLSessionWebSocketMessage alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_alloc1); @@ -81014,37 +84291,52 @@ abstract class NSURLSessionWebSocketMessageType { static const int NSURLSessionWebSocketMessageTypeString = 1; } -void _ObjCBlock43_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} - -final _ObjCBlock43_closureRegistry = {}; -int _ObjCBlock43_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock43_registerClosure(Function fn) { - final id = ++_ObjCBlock43_closureRegistryIndex; - _ObjCBlock43_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[id] = + fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock43_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock43_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock43 extends _ObjCBlockBase { - ObjCBlock43._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError + extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock43.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -81055,46 +84347,84 @@ class ObjCBlock43 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock43_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock43.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunction( NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) + void Function(NSURLSessionWebSocketMessage?, NSError?) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock43_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) .cast(), - _ObjCBlock43_registerClosure(fn)), + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 ? null : NSURLSessionWebSocketMessage._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.listener( + NativeCupertinoHttp lib, + void Function(NSURLSessionWebSocketMessage?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURLSessionWebSocketMessage._(arg0, lib, + retain: true, release: true), + arg1.address == 0 + ? null + : NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURLSessionWebSocketMessage? arg0, NSError? arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); } /// The WebSocket close codes follow the close codes given in the RFC @@ -81115,48 +84445,56 @@ abstract class NSURLSessionWebSocketCloseCode { static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; } -void _ObjCBlock44_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} - -final _ObjCBlock44_closureRegistry = {}; -int _ObjCBlock44_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock44_registerClosure(Function fn) { - final id = ++_ObjCBlock44_closureRegistryIndex; - _ObjCBlock44_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock44_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock44_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock44 extends _ObjCBlockBase { - ObjCBlock44._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock44.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -81169,96 +84507,148 @@ class ObjCBlock44 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock44_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock44.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunction( NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) + void Function(NSData?, NSURLResponse?, NSError?) fn) : this._( lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock44_closureTrampoline) - .cast(), - _ObjCBlock44_registerClosure(fn)), + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSData._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse._(arg1, lib, retain: true, release: true), + arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.listener( + NativeCupertinoHttp lib, + void Function(NSData?, NSURLResponse?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure((ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSData._(arg0, lib, retain: true, release: true), + arg1.address == 0 + ? null + : NSURLResponse._(arg1, lib, retain: true, release: true), + arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSData? arg0, NSURLResponse? arg1, NSError? arg2) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + _id, + arg0?._id ?? ffi.nullptr, + arg1?._id ?? ffi.nullptr, + arg2?._id ?? ffi.nullptr); +} + +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>() .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } -} - -void _ObjCBlock45_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} - -final _ObjCBlock45_closureRegistry = {}; -int _ObjCBlock45_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock45_registerClosure(Function fn) { - final id = ++_ObjCBlock45_closureRegistryIndex; - _ObjCBlock45_closureRegistry[id] = fn; + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock45_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock45_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock45 extends _ObjCBlockBase { - ObjCBlock45._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock45.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -81271,52 +84661,96 @@ class ObjCBlock45 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock45_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock45.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunction( NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) - fn) + void Function(NSURL?, NSURLResponse?, NSError?) fn) : this._( lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock45_closureTrampoline) - .cast(), - _ObjCBlock45_registerClosure(fn)), + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSURL._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse._(arg1, lib, retain: true, release: true), + arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.listener( + NativeCupertinoHttp lib, + void Function(NSURL?, NSURLResponse?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure((ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSURL._(arg0, lib, retain: true, release: true), + arg1.address == 0 + ? null + : NSURLResponse._(arg1, lib, retain: true, release: true), + arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURL? arg0, NSURLResponse? arg1, NSError? arg2) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + _id, + arg0?._id ?? ffi.nullptr, + arg1?._id ?? ffi.nullptr, + arg2?._id ?? ffi.nullptr); } /// Disposition options for various delegate messages @@ -81419,16 +84853,14 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { } /// Represents the transaction request. - NSURLRequest? get request { - final _ret = _lib._objc_msgSend_350(_id, _lib._sel_request1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); + NSURLRequest get request { + final _ret = _lib._objc_msgSend_489(_id, _lib._sel_request1); + return NSURLRequest._(_ret, _lib, retain: true, release: true); } /// Represents the transaction response. Can be nil if error occurred and no response was generated. NSURLResponse? get response { - final _ret = _lib._objc_msgSend_318(_id, _lib._sel_response1); + final _ret = _lib._objc_msgSend_375(_id, _lib._sel_response1); return _ret.address == 0 ? null : NSURLResponse._(_ret, _lib, retain: true, release: true); @@ -81445,7 +84877,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// secureConnectionStartDate /// secureConnectionEndDate NSDate? get fetchStartDate { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_fetchStartDate1); + final _ret = _lib._objc_msgSend_393(_id, _lib._sel_fetchStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -81453,7 +84885,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// domainLookupStartDate returns the time immediately before the user agent started the name lookup for the resource. NSDate? get domainLookupStartDate { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_domainLookupStartDate1); + final _ret = _lib._objc_msgSend_393(_id, _lib._sel_domainLookupStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -81461,7 +84893,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// domainLookupEndDate returns the time after the name lookup was completed. NSDate? get domainLookupEndDate { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_domainLookupEndDate1); + final _ret = _lib._objc_msgSend_393(_id, _lib._sel_domainLookupEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -81471,7 +84903,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// For example, this would correspond to the time immediately before the user agent started trying to establish the TCP connection. NSDate? get connectStartDate { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_connectStartDate1); + final _ret = _lib._objc_msgSend_393(_id, _lib._sel_connectStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -81484,7 +84916,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// If an encrypted connection was not used, this attribute is set to nil. NSDate? get secureConnectionStartDate { final _ret = - _lib._objc_msgSend_348(_id, _lib._sel_secureConnectionStartDate1); + _lib._objc_msgSend_393(_id, _lib._sel_secureConnectionStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -81495,7 +84927,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// If an encrypted connection was not used, this attribute is set to nil. NSDate? get secureConnectionEndDate { final _ret = - _lib._objc_msgSend_348(_id, _lib._sel_secureConnectionEndDate1); + _lib._objc_msgSend_393(_id, _lib._sel_secureConnectionEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -81503,7 +84935,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// connectEndDate is the time immediately after the user agent finished establishing the connection to the server, including completion of security-related and other handshakes. NSDate? get connectEndDate { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_connectEndDate1); + final _ret = _lib._objc_msgSend_393(_id, _lib._sel_connectEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -81513,7 +84945,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// For example, this would correspond to the time immediately before the user agent sent an HTTP GET request. NSDate? get requestStartDate { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_requestStartDate1); + final _ret = _lib._objc_msgSend_393(_id, _lib._sel_requestStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -81523,7 +84955,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// For example, this would correspond to the time immediately after the user agent finished sending the last byte of the request. NSDate? get requestEndDate { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_requestEndDate1); + final _ret = _lib._objc_msgSend_393(_id, _lib._sel_requestEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -81533,7 +84965,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// For example, this would correspond to the time immediately after the user agent received the first byte of an HTTP response. NSDate? get responseStartDate { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_responseStartDate1); + final _ret = _lib._objc_msgSend_393(_id, _lib._sel_responseStartDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -81541,7 +84973,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// responseEndDate is the time immediately after the user agent received the last byte of the resource. NSDate? get responseEndDate { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_responseEndDate1); + final _ret = _lib._objc_msgSend_393(_id, _lib._sel_responseEndDate1); return _ret.address == 0 ? null : NSDate._(_ret, _lib, retain: true, release: true); @@ -81557,7 +84989,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// If HTTP/1.1 were used to the proxy, and the tunneled connection was HTTP/2, then h2 would be returned. /// If HTTP/1.1 were used to the proxy, and there were no tunnel, then http/1.1 would be returned. NSString? get networkProtocolName { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_networkProtocolName1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_networkProtocolName1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -81575,43 +85007,43 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// Indicates whether the resource was loaded, pushed or retrieved from the local cache. int get resourceFetchType { - return _lib._objc_msgSend_454(_id, _lib._sel_resourceFetchType1); + return _lib._objc_msgSend_490(_id, _lib._sel_resourceFetchType1); } /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. int get countOfRequestHeaderBytesSent { - return _lib._objc_msgSend_358( + return _lib._objc_msgSend_383( _id, _lib._sel_countOfRequestHeaderBytesSent1); } /// countOfRequestBodyBytesSent is the number of bytes transferred for request body. /// It includes protocol-specific framing, transfer encoding, and content encoding. int get countOfRequestBodyBytesSent { - return _lib._objc_msgSend_358(_id, _lib._sel_countOfRequestBodyBytesSent1); + return _lib._objc_msgSend_383(_id, _lib._sel_countOfRequestBodyBytesSent1); } /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. int get countOfRequestBodyBytesBeforeEncoding { - return _lib._objc_msgSend_358( + return _lib._objc_msgSend_383( _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); } /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. int get countOfResponseHeaderBytesReceived { - return _lib._objc_msgSend_358( + return _lib._objc_msgSend_383( _id, _lib._sel_countOfResponseHeaderBytesReceived1); } /// countOfResponseBodyBytesReceived is the number of bytes transferred for response header. /// It includes protocol-specific framing, transfer encoding, and content encoding. int get countOfResponseBodyBytesReceived { - return _lib._objc_msgSend_358( + return _lib._objc_msgSend_383( _id, _lib._sel_countOfResponseBodyBytesReceived1); } /// countOfResponseBodyBytesAfterDecoding is the size of data delivered to your delegate or completion handler. int get countOfResponseBodyBytesAfterDecoding { - return _lib._objc_msgSend_358( + return _lib._objc_msgSend_383( _id, _lib._sel_countOfResponseBodyBytesAfterDecoding1); } @@ -81621,7 +85053,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// If a connection was not used, this attribute is set to nil. NSString? get localAddress { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localAddress1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_localAddress1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -81633,7 +85065,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// If a connection was not used, this attribute is set to nil. NSNumber? get localPort { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_localPort1); + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_localPort1); return _ret.address == 0 ? null : NSNumber._(_ret, _lib, retain: true, release: true); @@ -81645,7 +85077,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// If a connection was not used, this attribute is set to nil. NSString? get remoteAddress { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_remoteAddress1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_remoteAddress1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -81657,7 +85089,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// /// If a connection was not used, this attribute is set to nil. NSNumber? get remotePort { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_remotePort1); + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_remotePort1); return _ret.address == 0 ? null : NSNumber._(_ret, _lib, retain: true, release: true); @@ -81671,7 +85103,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// If an encrypted connection was not used, this attribute is set to nil. NSNumber? get negotiatedTLSProtocolVersion { final _ret = - _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSProtocolVersion1); + _lib._objc_msgSend_94(_id, _lib._sel_negotiatedTLSProtocolVersion1); return _ret.address == 0 ? null : NSNumber._(_ret, _lib, retain: true, release: true); @@ -81685,7 +85117,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// If an encrypted connection was not used, this attribute is set to nil. NSNumber? get negotiatedTLSCipherSuite { final _ret = - _lib._objc_msgSend_89(_id, _lib._sel_negotiatedTLSCipherSuite1); + _lib._objc_msgSend_94(_id, _lib._sel_negotiatedTLSCipherSuite1); return _ret.address == 0 ? null : NSNumber._(_ret, _lib, retain: true, release: true); @@ -81713,7 +85145,7 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { /// DNS protocol used for domain resolution. int get domainResolutionProtocol { - return _lib._objc_msgSend_455(_id, _lib._sel_domainResolutionProtocol1); + return _lib._objc_msgSend_491(_id, _lib._sel_domainResolutionProtocol1); } @override @@ -81730,6 +85162,16 @@ class NSURLSessionTaskTransactionMetrics extends NSObject { retain: false, release: true); } + static NSURLSessionTaskTransactionMetrics allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSessionTaskTransactionMetrics1, + _lib._sel_allocWithZone_1, + zone); + return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + retain: false, release: true); + } + static NSURLSessionTaskTransactionMetrics alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_alloc1); @@ -81764,25 +85206,21 @@ class NSURLSessionTaskMetrics extends NSObject { } /// transactionMetrics array contains the metrics collected for every request/response transaction created during the task execution. - NSArray? get transactionMetrics { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_transactionMetrics1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + NSArray get transactionMetrics { + final _ret = _lib._objc_msgSend_169(_id, _lib._sel_transactionMetrics1); + return NSArray._(_ret, _lib, retain: true, release: true); } /// Interval from the task creation time to the task completion time. /// Task creation time is the time when the task was instantiated. /// Task completion time is the time when the task is about to change its internal state to completed. - NSDateInterval? get taskInterval { - final _ret = _lib._objc_msgSend_456(_id, _lib._sel_taskInterval1); - return _ret.address == 0 - ? null - : NSDateInterval._(_ret, _lib, retain: true, release: true); + NSDateInterval get taskInterval { + final _ret = _lib._objc_msgSend_492(_id, _lib._sel_taskInterval1); + return NSDateInterval._(_ret, _lib, retain: true, release: true); } /// redirectCount is the number of redirects that were recorded. - int get redirectCount { + DartNSUInteger get redirectCount { return _lib._objc_msgSend_12(_id, _lib._sel_redirectCount1); } @@ -81798,6 +85236,13 @@ class NSURLSessionTaskMetrics extends NSObject { return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); } + static NSURLSessionTaskMetrics allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLSessionTaskMetrics1, _lib._sel_allocWithZone_1, zone); + return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); + } + static NSURLSessionTaskMetrics alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSURLSessionTaskMetrics1, _lib._sel_alloc1); @@ -81870,141 +85315,144 @@ class NSItemProvider extends NSObject { } void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( - NSString? typeIdentifier, int visibility, ObjCBlock46 loadHandler) { - return _lib._objc_msgSend_457( + NSString typeIdentifier, + int visibility, + ObjCBlock_NSProgress_ffiVoidNSDataNSError loadHandler) { + _lib._objc_msgSend_493( _id, _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, - typeIdentifier?._id ?? ffi.nullptr, + typeIdentifier._id, visibility, loadHandler._id); } void registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( - NSString? typeIdentifier, + NSString typeIdentifier, int fileOptions, int visibility, - ObjCBlock48 loadHandler) { - return _lib._objc_msgSend_458( + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError loadHandler) { + _lib._objc_msgSend_494( _id, _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, - typeIdentifier?._id ?? ffi.nullptr, + typeIdentifier._id, fileOptions, visibility, loadHandler._id); } - NSArray? get registeredTypeIdentifiers { + NSArray get registeredTypeIdentifiers { final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_registeredTypeIdentifiers1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_169(_id, _lib._sel_registeredTypeIdentifiers1); + return NSArray._(_ret, _lib, retain: true, release: true); } NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { - final _ret = _lib._objc_msgSend_459( + final _ret = _lib._objc_msgSend_495( _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); return NSArray._(_ret, _lib, retain: true, release: true); } - bool hasItemConformingToTypeIdentifier_(NSString? typeIdentifier) { + bool hasItemConformingToTypeIdentifier_(NSString typeIdentifier) { return _lib._objc_msgSend_22( - _id, - _lib._sel_hasItemConformingToTypeIdentifier_1, - typeIdentifier?._id ?? ffi.nullptr); + _id, _lib._sel_hasItemConformingToTypeIdentifier_1, typeIdentifier._id); } bool hasRepresentationConformingToTypeIdentifier_fileOptions_( - NSString? typeIdentifier, int fileOptions) { - return _lib._objc_msgSend_460( + NSString typeIdentifier, int fileOptions) { + return _lib._objc_msgSend_496( _id, _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, - typeIdentifier?._id ?? ffi.nullptr, + typeIdentifier._id, fileOptions); } NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( - NSString? typeIdentifier, ObjCBlock47 completionHandler) { - final _ret = _lib._objc_msgSend_461( + NSString typeIdentifier, + ObjCBlock_ffiVoid_NSData_NSError completionHandler) { + final _ret = _lib._objc_msgSend_497( _id, _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier?._id ?? ffi.nullptr, + typeIdentifier._id, completionHandler._id); return NSProgress._(_ret, _lib, retain: true, release: true); } NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( - NSString? typeIdentifier, ObjCBlock50 completionHandler) { - final _ret = _lib._objc_msgSend_462( + NSString typeIdentifier, + ObjCBlock_ffiVoid_NSURL_NSError completionHandler) { + final _ret = _lib._objc_msgSend_498( _id, _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier?._id ?? ffi.nullptr, + typeIdentifier._id, completionHandler._id); return NSProgress._(_ret, _lib, retain: true, release: true); } NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( - NSString? typeIdentifier, ObjCBlock49 completionHandler) { - final _ret = _lib._objc_msgSend_463( + NSString typeIdentifier, + ObjCBlock_ffiVoid_NSURL_bool_NSError completionHandler) { + final _ret = _lib._objc_msgSend_499( _id, _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier?._id ?? ffi.nullptr, + typeIdentifier._id, completionHandler._id); return NSProgress._(_ret, _lib, retain: true, release: true); } NSString? get suggestedName { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_suggestedName1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_suggestedName1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set suggestedName(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); } - NSItemProvider initWithObject_(NSObject? object) { - final _ret = _lib._objc_msgSend_91( - _id, _lib._sel_initWithObject_1, object?._id ?? ffi.nullptr); + NSItemProvider initWithObject_(NSObject object) { + final _ret = + _lib._objc_msgSend_149(_id, _lib._sel_initWithObject_1, object._id); return NSItemProvider._(_ret, _lib, retain: true, release: true); } - void registerObject_visibility_(NSObject? object, int visibility) { - return _lib._objc_msgSend_464(_id, _lib._sel_registerObject_visibility_1, - object?._id ?? ffi.nullptr, visibility); + void registerObject_visibility_(NSObject object, int visibility) { + _lib._objc_msgSend_500( + _id, _lib._sel_registerObject_visibility_1, object._id, visibility); } void registerObjectOfClass_visibility_loadHandler_( - NSObject? aClass, int visibility, ObjCBlock51 loadHandler) { - return _lib._objc_msgSend_465( + NSObject aClass, + int visibility, + ObjCBlock_NSProgress_ffiVoidObjCObjectNSError loadHandler) { + _lib._objc_msgSend_501( _id, _lib._sel_registerObjectOfClass_visibility_loadHandler_1, - aClass?._id ?? ffi.nullptr, + aClass._id, visibility, loadHandler._id); } - bool canLoadObjectOfClass_(NSObject? aClass) { + bool canLoadObjectOfClass_(NSObject aClass) { return _lib._objc_msgSend_0( - _id, _lib._sel_canLoadObjectOfClass_1, aClass?._id ?? ffi.nullptr); + _id, _lib._sel_canLoadObjectOfClass_1, aClass._id); } NSProgress loadObjectOfClass_completionHandler_( - NSObject? aClass, ObjCBlock52 completionHandler) { - final _ret = _lib._objc_msgSend_466( + NSObject aClass, ObjCBlock_ffiVoid_ObjCObject_NSError completionHandler) { + final _ret = _lib._objc_msgSend_502( _id, _lib._sel_loadObjectOfClass_completionHandler_1, - aClass?._id ?? ffi.nullptr, + aClass._id, completionHandler._id); return NSProgress._(_ret, _lib, retain: true, release: true); } NSItemProvider initWithItem_typeIdentifier_( NSObject? item, NSString? typeIdentifier) { - final _ret = _lib._objc_msgSend_467( + final _ret = _lib._objc_msgSend_503( _id, _lib._sel_initWithItem_typeIdentifier_1, item?._id ?? ffi.nullptr, @@ -82012,48 +85460,53 @@ class NSItemProvider extends NSObject { return NSItemProvider._(_ret, _lib, retain: true, release: true); } - NSItemProvider initWithContentsOfURL_(NSURL? fileURL) { - final _ret = _lib._objc_msgSend_201( - _id, _lib._sel_initWithContentsOfURL_1, fileURL?._id ?? ffi.nullptr); - return NSItemProvider._(_ret, _lib, retain: true, release: true); + NSItemProvider? initWithContentsOfURL_(NSURL fileURL) { + final _ret = _lib._objc_msgSend_226( + _id, _lib._sel_initWithContentsOfURL_1, fileURL._id); + return _ret.address == 0 + ? null + : NSItemProvider._(_ret, _lib, retain: true, release: true); } void registerItemForTypeIdentifier_loadHandler_( - NSString? typeIdentifier, NSItemProviderLoadHandler loadHandler) { - return _lib._objc_msgSend_468( + NSString typeIdentifier, DartNSItemProviderLoadHandler loadHandler) { + _lib._objc_msgSend_504( _id, _lib._sel_registerItemForTypeIdentifier_loadHandler_1, - typeIdentifier?._id ?? ffi.nullptr, - loadHandler); + typeIdentifier._id, + loadHandler._id); } void loadItemForTypeIdentifier_options_completionHandler_( - NSString? typeIdentifier, + NSString typeIdentifier, NSDictionary? options, - NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_469( + DartNSItemProviderCompletionHandler completionHandler) { + _lib._objc_msgSend_505( _id, _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, - typeIdentifier?._id ?? ffi.nullptr, + typeIdentifier._id, options?._id ?? ffi.nullptr, - completionHandler); + completionHandler._id); } - NSItemProviderLoadHandler get previewImageHandler { - return _lib._objc_msgSend_470(_id, _lib._sel_previewImageHandler1); + DartNSItemProviderLoadHandler get previewImageHandler { + final _ret = _lib._objc_msgSend_506(_id, _lib._sel_previewImageHandler1); + return ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary + ._(_ret, _lib, retain: true, release: true); } - set previewImageHandler(NSItemProviderLoadHandler value) { - _lib._objc_msgSend_471(_id, _lib._sel_setPreviewImageHandler_1, value); + set previewImageHandler(DartNSItemProviderLoadHandler value) { + return _lib._objc_msgSend_507( + _id, _lib._sel_setPreviewImageHandler_1, value._id); } - void loadPreviewImageWithOptions_completionHandler_(NSDictionary? options, - NSItemProviderCompletionHandler completionHandler) { - return _lib._objc_msgSend_472( + void loadPreviewImageWithOptions_completionHandler_(NSDictionary options, + DartNSItemProviderCompletionHandler completionHandler) { + _lib._objc_msgSend_508( _id, _lib._sel_loadPreviewImageWithOptions_completionHandler_1, - options?._id ?? ffi.nullptr, - completionHandler); + options._id, + completionHandler._id); } static NSItemProvider new1(NativeCupertinoHttp _lib) { @@ -82062,6 +85515,13 @@ class NSItemProvider extends NSObject { return NSItemProvider._(_ret, _lib, retain: false, release: true); } + static NSItemProvider allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSItemProvider1, _lib._sel_allocWithZone_1, zone); + return NSItemProvider._(_ret, _lib, retain: false, release: true); + } + static NSItemProvider alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_alloc1); @@ -82069,36 +85529,45 @@ class NSItemProvider extends NSObject { } } -ffi.Pointer _ObjCBlock46_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>()(arg0); -} - -final _ObjCBlock46_closureRegistry = {}; -int _ObjCBlock46_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock46_registerClosure(Function fn) { - final id = ++_ObjCBlock46_closureRegistryIndex; - _ObjCBlock46_closureRegistry[id] = fn; +ffi.Pointer< + ObjCObject> _ObjCBlock_NSProgress_ffiVoidNSDataNSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer<_ObjCBlock>)>()(arg0); +final _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry = + Function(ffi.Pointer<_ObjCBlock>)>{}; +int _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure( + ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { + final id = ++_ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex; + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -ffi.Pointer _ObjCBlock46_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock46_closureRegistry[block.ref.target.address]!(arg0); -} +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[ + block.ref.target.address]!(arg0); -class ObjCBlock46 extends _ObjCBlockBase { - ObjCBlock46._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_NSProgress_ffiVoidNSDataNSError extends _ObjCBlockBase { + ObjCBlock_NSProgress_ffiVoidNSDataNSError._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock46.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidNSDataNSError.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -82109,71 +85578,99 @@ class ObjCBlock46 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock46_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock46.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidNSDataNSError.fromFunction( + NativeCupertinoHttp lib, + NSProgress? Function(ObjCBlock_ffiVoid_NSData_NSError) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock46_closureTrampoline) + ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline) .cast(), - _ObjCBlock46_registerClosure(fn)), + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure((ffi + .Pointer<_ObjCBlock> + arg0) => + fn(ObjCBlock_ffiVoid_NSData_NSError._(arg0, lib, retain: true, release: true)) + ?._retainAndReturnId() ?? + ffi.nullptr)), lib); static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { - return _id.ref.invoke + + NSProgress? call(ObjCBlock_ffiVoid_NSData_NSError arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() + (_id, arg0._id) + .address == + 0 + ? null + : NSProgress._( + _id.ref.invoke + .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), + _lib, + retain: false, + release: true); +} + +void _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); - } -} - -void _ObjCBlock47_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} - -final _ObjCBlock47_closureRegistry = {}; -int _ObjCBlock47_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock47_registerClosure(Function fn) { - final id = ++_ObjCBlock47_closureRegistryIndex; - _ObjCBlock47_closureRegistry[id] = fn; + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock47_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock47_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock47 extends _ObjCBlockBase { - ObjCBlock47._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSData_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSData_NSError._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock47.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_NSError.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -82184,78 +85681,126 @@ class ObjCBlock47 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock47_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock47.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_NSError.fromFunction( + NativeCupertinoHttp lib, void Function(NSData?, NSError?) fn) : this._( lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock47_closureTrampoline) - .cast(), - _ObjCBlock47_registerClosure(fn)), + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSData._(arg0, lib, retain: true, release: true), + arg1.address == 0 + ? null + : NSError._(arg1, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } -} -ffi.Pointer _ObjCBlock48_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>()(arg0); -} + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSData_NSError.listener( + NativeCupertinoHttp lib, void Function(NSData?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSData._(arg0, lib, retain: true, release: true), + arg1.address == 0 + ? null + : NSError._(arg1, lib, + retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; -final _ObjCBlock48_closureRegistry = {}; -int _ObjCBlock48_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock48_registerClosure(Function fn) { - final id = ++_ObjCBlock48_closureRegistryIndex; - _ObjCBlock48_closureRegistry[id] = fn; + void call(NSData? arg0, NSError? arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock>)>()(arg0); +final _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry = + Function(ffi.Pointer<_ObjCBlock>)>{}; +int _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( + ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { + final id = + ++_ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex; + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -ffi.Pointer _ObjCBlock48_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock48_closureRegistry[block.ref.target.address]!(arg0); -} +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[ + block.ref.target.address]!(arg0); -class ObjCBlock48 extends _ObjCBlockBase { - ObjCBlock48._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError extends _ObjCBlockBase { + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock48.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -82266,72 +85811,101 @@ class ObjCBlock48 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock48_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock48.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunction( + NativeCupertinoHttp lib, + NSProgress? Function(ObjCBlock_ffiVoid_NSURL_bool_NSError) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock48_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline) .cast(), - _ObjCBlock48_registerClosure(fn)), + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( + (ffi.Pointer<_ObjCBlock> arg0) => + fn(ObjCBlock_ffiVoid_NSURL_bool_NSError._(arg0, lib, retain: true, release: true)) + ?._retainAndReturnId() ?? + ffi.nullptr)), lib); static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { - return _id.ref.invoke + + NSProgress? call(ObjCBlock_ffiVoid_NSURL_bool_NSError arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() + (_id, arg0._id) + .address == + 0 + ? null + : NSProgress._( + _id.ref.invoke + .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), + _lib, + retain: false, + release: true); +} + +void _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + block.ref.target .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() + ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, + ffi.Pointer arg2)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); - } -} - -void _ObjCBlock49_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); -} - -final _ObjCBlock49_closureRegistry = {}; -int _ObjCBlock49_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock49_registerClosure(Function fn) { - final id = ++_ObjCBlock49_closureRegistryIndex; - _ObjCBlock49_closureRegistry[id] = fn; + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( + void Function(ffi.Pointer, bool, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock49_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _ObjCBlock49_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +void _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock49 extends _ObjCBlockBase { - ObjCBlock49._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSURL_bool_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSURL_bool_NSError._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock49.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -82342,85 +85916,129 @@ class ObjCBlock49 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock49_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock49.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) - fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunction( + NativeCupertinoHttp lib, void Function(NSURL?, bool, NSError?) fn) : this._( lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>( - _ObjCBlock49_closureTrampoline) - .cast(), - _ObjCBlock49_registerClosure(fn)), + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Bool, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( + arg0.address == 0 + ? null + : NSURL._(arg0, lib, retain: true, release: true), + arg1, + arg2.address == 0 + ? null + : NSError._(arg2, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call( - ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } -} -void _ObjCBlock50_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURL_bool_NSError.listener( + NativeCupertinoHttp lib, void Function(NSURL?, bool, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Bool, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( + arg0.address == 0 + ? null + : NSURL._(arg0, lib, retain: true, release: true), + arg1, + arg2.address == 0 + ? null + : NSError._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURL? arg0, bool arg1, NSError? arg2) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + bool, ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1, arg2?._id ?? ffi.nullptr); } -final _ObjCBlock50_closureRegistry = {}; -int _ObjCBlock50_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock50_registerClosure(Function fn) { - final id = ++_ObjCBlock50_closureRegistryIndex; - _ObjCBlock50_closureRegistry[id] = fn; +void _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock50_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock50_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[block.ref.target.address]!( + arg0, arg1); -class ObjCBlock50 extends _ObjCBlockBase { - ObjCBlock50._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSURL_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSURL_NSError._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock50.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_NSError.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -82431,78 +86049,126 @@ class ObjCBlock50 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock50_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock50.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURL_NSError.fromFunction( + NativeCupertinoHttp lib, void Function(NSURL?, NSError?) fn) : this._( lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock50_closureTrampoline) - .cast(), - _ObjCBlock50_registerClosure(fn)), + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURL._(arg0, lib, retain: true, release: true), + arg1.address == 0 + ? null + : NSError._(arg1, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } -} -ffi.Pointer _ObjCBlock51_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>()(arg0); -} + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURL_NSError.listener( + NativeCupertinoHttp lib, void Function(NSURL?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURL._(arg0, lib, retain: true, release: true), + arg1.address == 0 + ? null + : NSError._(arg1, lib, + retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; -final _ObjCBlock51_closureRegistry = {}; -int _ObjCBlock51_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock51_registerClosure(Function fn) { - final id = ++_ObjCBlock51_closureRegistryIndex; - _ObjCBlock51_closureRegistry[id] = fn; + void call(NSURL? arg0, NSError? arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock>)>()(arg0); +final _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry = + Function(ffi.Pointer<_ObjCBlock>)>{}; +int _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_registerClosure( + ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { + final id = + ++_ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistryIndex; + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -ffi.Pointer _ObjCBlock51_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) { - return _ObjCBlock51_closureRegistry[block.ref.target.address]!(arg0); -} +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry[ + block.ref.target.address]!(arg0); -class ObjCBlock51 extends _ObjCBlockBase { - ObjCBlock51._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_NSProgress_ffiVoidObjCObjectNSError extends _ObjCBlockBase { + ObjCBlock_NSProgress_ffiVoidObjCObjectNSError._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock51.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidObjCObjectNSError.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -82513,71 +86179,99 @@ class ObjCBlock51 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock51_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock51.fromFunction(NativeCupertinoHttp lib, - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> arg0) fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_NSProgress_ffiVoidObjCObjectNSError.fromFunction( + NativeCupertinoHttp lib, + NSProgress? Function(ObjCBlock_ffiVoid_ObjCObject_NSError) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>( - _ObjCBlock51_closureTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer<_ObjCBlock>)>( + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureTrampoline) .cast(), - _ObjCBlock51_registerClosure(fn)), + _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_registerClosure( + (ffi.Pointer<_ObjCBlock> arg0) => + fn(ObjCBlock_ffiVoid_ObjCObject_NSError._(arg0, lib, retain: true, release: true)) + ?._retainAndReturnId() ?? + ffi.nullptr)), lib); static ffi.Pointer? _dartFuncTrampoline; - ffi.Pointer call(ffi.Pointer<_ObjCBlock> arg0) { - return _id.ref.invoke + + NSProgress? call(ObjCBlock_ffiVoid_ObjCObject_NSError arg0) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() + (_id, arg0._id) + .address == + 0 + ? null + : NSProgress._( + _id.ref.invoke + .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() + .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), + _lib, + retain: false, + release: true); +} + +void _ObjCBlock_ffiVoid_ObjCObject_NSError_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>()(_id, arg0); - } -} - -void _ObjCBlock52_fnPtrTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>()(arg0, arg1); -} - -final _ObjCBlock52_closureRegistry = {}; -int _ObjCBlock52_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock52_registerClosure(Function fn) { - final id = ++_ObjCBlock52_closureRegistryIndex; - _ObjCBlock52_closureRegistry[id] = fn; + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock52_closureTrampoline(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1) { - return _ObjCBlock52_closureRegistry[block.ref.target.address]!(arg0, arg1); -} +void _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock52 extends _ObjCBlockBase { - ObjCBlock52._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_ObjCObject_NSError extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ObjCObject_NSError._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock52.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_NSError.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -82588,91 +86282,142 @@ class ObjCBlock52 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock52_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_NSError_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock52.fromFunction( - NativeCupertinoHttp lib, - void Function(ffi.Pointer arg0, ffi.Pointer arg1) - fn) + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_NSError.fromFunction( + NativeCupertinoHttp lib, void Function(NSObject?, NSError?) fn) : this._( lib._newBlock1( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock52_closureTrampoline) + ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline) .cast(), - _ObjCBlock52_registerClosure(fn)), + _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), + arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(ffi.Pointer arg0, ffi.Pointer arg1) { - return _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>()(_id, arg0, arg1); - } -} -typedef NSItemProviderLoadHandler = ffi.Pointer<_ObjCBlock>; -void _ObjCBlock53_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(arg0, arg1, arg2); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ObjCObject_NSError.listener( + NativeCupertinoHttp lib, void Function(NSObject?, NSError?) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSObject._(arg0, lib, + retain: true, release: true), + arg1.address == 0 + ? null + : NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject? arg0, NSError? arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); } -final _ObjCBlock53_closureRegistry = {}; -int _ObjCBlock53_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock53_registerClosure(Function fn) { - final id = ++_ObjCBlock53_closureRegistryIndex; - _ObjCBlock53_closureRegistry[id] = fn; +typedef NSItemProviderLoadHandler = ffi.Pointer<_ObjCBlock>; +typedef DartNSItemProviderLoadHandler + = ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary; +void + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + NSItemProviderCompletionHandler, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureRegistry = + , + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_registerClosure( + void Function(NSItemProviderCompletionHandler, ffi.Pointer, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureRegistry[ + id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock53_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - return _ObjCBlock53_closureRegistry[block.ref.target.address]!( - arg0, arg1, arg2); -} +void _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock53 extends _ObjCBlockBase { - ObjCBlock53._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib) - : super._(id, lib, retain: false, release: true); +class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary + extends _ObjCBlockBase { + ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); /// Creates a block from a C function pointer. - ObjCBlock53.fromFunctionPointer( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary.fromFunctionPointer( NativeCupertinoHttp lib, ffi.Pointer< ffi.NativeFunction< @@ -82685,55 +86430,220 @@ class ObjCBlock53 extends _ObjCBlockBase { lib._newBlock1( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock53_fnPtrTrampoline) + ffi.Pointer<_ObjCBlock>, + NSItemProviderCompletionHandler, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_fnPtrTrampoline) .cast(), ptr.cast()), lib); static ffi.Pointer? _cFuncTrampoline; /// Creates a block from a Dart function. - ObjCBlock53.fromFunction( + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary.fromFunction( NativeCupertinoHttp lib, - void Function(NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, ffi.Pointer arg2) + void Function(DartNSItemProviderCompletionHandler, NSObject, NSDictionary) fn) : this._( lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>( - _ObjCBlock53_closureTrampoline) - .cast(), - _ObjCBlock53_registerClosure(fn)), + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, NSItemProviderCompletionHandler, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_registerClosure( + (NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + ObjCBlock_ffiVoid_ObjCObject_NSError1._(arg0, lib, retain: true, release: true), + NSObject._(arg1, lib, retain: true, release: true), + NSDictionary._(arg2, lib, retain: true, release: true)))), lib); static ffi.Pointer? _dartFuncTrampoline; - void call(NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, - ffi.Pointer arg2) { - return _id.ref.invoke + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary.listener( + NativeCupertinoHttp lib, + void Function(DartNSItemProviderCompletionHandler, NSObject, NSDictionary) + fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable, NSItemProviderCompletionHandler, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_registerClosure( + (NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + ObjCBlock_ffiVoid_ObjCObject_NSError1._(arg0, lib, retain: true, release: true), + NSObject._(arg1, lib, retain: true, release: true), + NSDictionary._(arg2, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + NSItemProviderCompletionHandler, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(DartNSItemProviderCompletionHandler arg0, NSObject arg1, + NSDictionary arg2) => + _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer<_ObjCBlock>, + NSItemProviderCompletionHandler, + ffi.Pointer, + ffi.Pointer)>()( + _id, arg0._id, arg1._id, arg2._id); +} + +typedef NSItemProviderCompletionHandler = ffi.Pointer<_ObjCBlock>; +typedef DartNSItemProviderCompletionHandler + = ObjCBlock_ffiVoid_ObjCObject_NSError1; +void _ObjCBlock_ffiVoid_ObjCObject_NSError1_fnPtrTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() .asFunction< - void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>()(_id, arg0, arg1, arg2); - } + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistryIndex; + _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -typedef NSItemProviderCompletionHandler = ffi.Pointer<_ObjCBlock>; +void _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_ObjCObject_NSError1 extends _ObjCBlockBase { + ObjCBlock_ffiVoid_ObjCObject_NSError1._( + ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, + {bool retain = false, bool release = true}) + : super._(id, lib, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_NSError1.fromFunctionPointer( + NativeCupertinoHttp lib, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + lib._newBlock1( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_NSError1_fnPtrTrampoline) + .cast(), + ptr.cast()), + lib); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ObjCObject_NSError1.fromFunction( + NativeCupertinoHttp lib, void Function(NSObject?, NSError) fn) + : this._( + lib._newBlock1( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), + NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ObjCObject_NSError1.listener( + NativeCupertinoHttp lib, void Function(NSObject?, NSError) fn) + : this._( + lib._newBlock1( + (_dartFuncListenerTrampoline ??= ffi + .NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSObject._(arg0, lib, retain: true, release: true), + NSError._(arg1, lib, retain: true, release: true)))), + lib); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject? arg0, NSError arg1) => _id.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, + ffi.Pointer)>()( + _id, arg0?._id ?? ffi.nullptr, arg1._id); +} abstract class NSItemProviderErrorCode { static const int NSItemProviderUnknownError = -1; @@ -82743,6 +86653,7 @@ abstract class NSItemProviderErrorCode { } typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; +typedef DartNSStringEncodingDetectionOptionsKey = NSString; class NSMutableString extends NSString { NSMutableString._(ffi.Pointer id, NativeCupertinoHttp lib, @@ -82768,92 +86679,317 @@ class NSMutableString extends NSString { obj._lib._class_NSMutableString1); } - void replaceCharactersInRange_withString_(NSRange range, NSString? aString) { - return _lib._objc_msgSend_473( - _id, - _lib._sel_replaceCharactersInRange_withString_1, - range, - aString?._id ?? ffi.nullptr); + void replaceCharactersInRange_withString_(NSRange range, NSString aString) { + _lib._objc_msgSend_509(_id, _lib._sel_replaceCharactersInRange_withString_1, + range, aString._id); } - void insertString_atIndex_(NSString? aString, int loc) { - return _lib._objc_msgSend_474(_id, _lib._sel_insertString_atIndex_1, - aString?._id ?? ffi.nullptr, loc); + void insertString_atIndex_(NSString aString, DartNSUInteger loc) { + _lib._objc_msgSend_510( + _id, _lib._sel_insertString_atIndex_1, aString._id, loc); } void deleteCharactersInRange_(NSRange range) { - return _lib._objc_msgSend_287( - _id, _lib._sel_deleteCharactersInRange_1, range); + _lib._objc_msgSend_304(_id, _lib._sel_deleteCharactersInRange_1, range); } - void appendString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_appendString_1, aString?._id ?? ffi.nullptr); + void appendString_(NSString aString) { + _lib._objc_msgSend_195(_id, _lib._sel_appendString_1, aString._id); } - void appendFormat_(NSString? format) { - return _lib._objc_msgSend_188( - _id, _lib._sel_appendFormat_1, format?._id ?? ffi.nullptr); + void appendFormat_(NSString format) { + _lib._objc_msgSend_195(_id, _lib._sel_appendFormat_1, format._id); } - void setString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_setString_1, aString?._id ?? ffi.nullptr); + void setString_(NSString aString) { + _lib._objc_msgSend_195(_id, _lib._sel_setString_1, aString._id); } - int replaceOccurrencesOfString_withString_options_range_(NSString? target, - NSString? replacement, int options, NSRange searchRange) { - return _lib._objc_msgSend_475( + DartNSUInteger replaceOccurrencesOfString_withString_options_range_( + NSString target, NSString replacement, int options, NSRange searchRange) { + return _lib._objc_msgSend_511( _id, _lib._sel_replaceOccurrencesOfString_withString_options_range_1, - target?._id ?? ffi.nullptr, - replacement?._id ?? ffi.nullptr, + target._id, + replacement._id, options, searchRange); } - bool applyTransform_reverse_range_updatedRange_(NSStringTransform transform, - bool reverse, NSRange range, NSRangePointer resultingRange) { - return _lib._objc_msgSend_476( + bool applyTransform_reverse_range_updatedRange_( + DartNSStringTransform transform, + bool reverse, + NSRange range, + NSRangePointer resultingRange) { + return _lib._objc_msgSend_512( _id, _lib._sel_applyTransform_reverse_range_updatedRange_1, - transform, + transform._id, reverse, range, resultingRange); } - NSMutableString initWithCapacity_(int capacity) { + NSMutableString initWithCapacity_(DartNSUInteger capacity) { final _ret = - _lib._objc_msgSend_477(_id, _lib._sel_initWithCapacity_1, capacity); + _lib._objc_msgSend_513(_id, _lib._sel_initWithCapacity_1, capacity); return NSMutableString._(_ret, _lib, retain: true, release: true); } static NSMutableString stringWithCapacity_( - NativeCupertinoHttp _lib, int capacity) { - final _ret = _lib._objc_msgSend_477( + NativeCupertinoHttp _lib, DartNSUInteger capacity) { + final _ret = _lib._objc_msgSend_513( _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); return NSMutableString._(_ret, _lib, retain: true, release: true); } + @override + NSMutableString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + static ffi.Pointer getAvailableStringEncodings( NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( + return _lib._objc_msgSend_255( _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); } static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { + NativeCupertinoHttp _lib, DartNSUInteger encoding) { final _ret = _lib._objc_msgSend_15(_lib._class_NSMutableString1, _lib._sel_localizedNameOfStringEncoding_1, encoding); return NSString._(_ret, _lib, retain: true, release: true); } - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + static DartNSUInteger getDefaultCStringEncoding(NativeCupertinoHttp _lib) { return _lib._objc_msgSend_12( _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); } + @override + NSMutableString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, DartNSUInteger length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_267( + _id, + _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, + characters, + length, + freeBuffer); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, + DartNSUInteger len, + ObjCBlock_ffiVoid_unichar_NSUInteger? deallocator) { + final _ret = _lib._objc_msgSend_268( + _id, + _lib._sel_initWithCharactersNoCopy_length_deallocator_1, + chars, + len, + deallocator?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableString initWithCharacters_length_( + ffi.Pointer characters, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_269( + _id, _lib._sel_initWithCharacters_length_1, characters, length); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithUTF8String_( + ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_270( + _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString initWithString_(NSString aString) { + final _ret = + _lib._objc_msgSend_42(_id, _lib._sel_initWithString_1, aString._id); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_(NSString format) { + final _ret = + _lib._objc_msgSend_42(_id, _lib._sel_initWithFormat_1, format._id); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_arguments_(NSString format, va_list argList) { + final _ret = _lib._objc_msgSend_271( + _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_locale_(NSString format, NSObject? locale) { + final _ret = _lib._objc_msgSend_272(_id, _lib._sel_initWithFormat_locale_1, + format._id, locale?._id ?? ffi.nullptr); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_locale_arguments_( + NSString format, NSObject? locale, va_list argList) { + final _ret = _lib._objc_msgSend_273( + _id, + _lib._sel_initWithFormat_locale_arguments_1, + format._id, + locale?._id ?? ffi.nullptr, + argList); + return NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_274( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, + format._id, + validFormatSpecifiers._id, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_275( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, + format._id, + validFormatSpecifiers._id, + locale?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? + initWithValidatedFormat_validFormatSpecifiers_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + va_list argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_276( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, + format._id, + validFormatSpecifiers._id, + argList, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? + initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + va_list argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_277( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, + format._id, + validFormatSpecifiers._id, + locale?._id ?? ffi.nullptr, + argList, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithData_encoding_( + NSData data, DartNSUInteger encoding) { + final _ret = _lib._objc_msgSend_278( + _id, _lib._sel_initWithData_encoding_1, data._id, encoding); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithBytes_length_encoding_(ffi.Pointer bytes, + DartNSUInteger len, DartNSUInteger encoding) { + final _ret = _lib._objc_msgSend_279( + _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, + DartNSUInteger len, + DartNSUInteger encoding, + bool freeBuffer) { + final _ret = _lib._objc_msgSend_280( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, + bytes, + len, + encoding, + freeBuffer); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: false, release: true); + } + + @override + NSMutableString? initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + DartNSUInteger len, + DartNSUInteger encoding, + ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { + final _ret = _lib._objc_msgSend_281( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, + bytes, + len, + encoding, + deallocator?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: false, release: true); + } + static NSMutableString string(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_string1); @@ -82861,174 +86997,265 @@ class NSMutableString extends NSString { } static NSMutableString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSString string) { + final _ret = _lib._objc_msgSend_42( + _lib._class_NSMutableString1, _lib._sel_stringWithString_1, string._id); return NSMutableString._(_ret, _lib, retain: true, release: true); } - static NSMutableString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSMutableString1, + static NSMutableString stringWithCharacters_length_(NativeCupertinoHttp _lib, + ffi.Pointer characters, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_269(_lib._class_NSMutableString1, _lib._sel_stringWithCharacters_length_1, characters, length); return NSMutableString._(_ret, _lib, retain: true, release: true); } - static NSMutableString stringWithUTF8String_( + static NSMutableString? stringWithUTF8String_( NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSMutableString1, + final _ret = _lib._objc_msgSend_270(_lib._class_NSMutableString1, _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSMutableString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); } static NSMutableString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSString format) { + final _ret = _lib._objc_msgSend_42( + _lib._class_NSMutableString1, _lib._sel_stringWithFormat_1, format._id); return NSMutableString._(_ret, _lib, retain: true, release: true); } static NSMutableString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { + NativeCupertinoHttp _lib, NSString format) { final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + _lib._sel_localizedStringWithFormat_1, format._id); return NSMutableString._(_ret, _lib, retain: true, release: true); } - static NSMutableString stringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( + static NSMutableString? + stringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_274( _lib._class_NSMutableString1, _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, + format._id, + validFormatSpecifiers._id, error); - return NSMutableString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); } - static NSMutableString + static NSMutableString? localizedStringWithValidatedFormat_validFormatSpecifiers_error_( NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, + NSString format, + NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( + final _ret = _lib._objc_msgSend_274( _lib._class_NSMutableString1, _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, + format._id, + validFormatSpecifiers._id, error); - return NSMutableString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); } - static NSMutableString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSMutableString1, + @override + NSMutableString? initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, DartNSUInteger encoding) { + final _ret = _lib._objc_msgSend_282(_id, + _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString? stringWithCString_encoding_(NativeCupertinoHttp _lib, + ffi.Pointer cString, DartNSUInteger enc) { + final _ret = _lib._objc_msgSend_282(_lib._class_NSMutableString1, _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSMutableString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfURL_encoding_error_(NSURL url, + DartNSUInteger enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_283(_id, + _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfFile_encoding_error_(NSString path, + DartNSUInteger enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_284( + _id, + _lib._sel_initWithContentsOfFile_encoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); } - static NSMutableString stringWithContentsOfURL_encoding_error_( + static NSMutableString? stringWithContentsOfURL_encoding_error_( NativeCupertinoHttp _lib, - NSURL? url, - int enc, + NSURL url, + DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_269( + final _ret = _lib._objc_msgSend_283( _lib._class_NSMutableString1, _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, + url._id, enc, error); - return NSMutableString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); } - static NSMutableString stringWithContentsOfFile_encoding_error_( + static NSMutableString? stringWithContentsOfFile_encoding_error_( NativeCupertinoHttp _lib, - NSString? path, - int enc, + NSString path, + DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_270( + final _ret = _lib._objc_msgSend_284( _lib._class_NSMutableString1, _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, + path._id, enc, error); - return NSMutableString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); } - static NSMutableString stringWithContentsOfURL_usedEncoding_error_( + @override + NSMutableString? initWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_285( + _id, + _lib._sel_initWithContentsOfURL_usedEncoding_error_1, + url._id, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_286( + _id, + _lib._sel_initWithContentsOfFile_usedEncoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfURL_usedEncoding_error_( NativeCupertinoHttp _lib, - NSURL? url, + NSURL url, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_271( + final _ret = _lib._objc_msgSend_285( _lib._class_NSMutableString1, _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, + url._id, enc, error); - return NSMutableString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); } - static NSMutableString stringWithContentsOfFile_usedEncoding_error_( + static NSMutableString? stringWithContentsOfFile_usedEncoding_error_( NativeCupertinoHttp _lib, - NSString? path, + NSString path, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_272( + final _ret = _lib._objc_msgSend_286( _lib._class_NSMutableString1, _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, + path._id, enc, error); - return NSMutableString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSMutableString._(_ret, _lib, retain: true, release: true); } - static int + static DartNSUInteger stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( NativeCupertinoHttp _lib, - NSData? data, + NSData data, NSDictionary? opts, ffi.Pointer> string, ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_273( + return _lib._objc_msgSend_287( _lib._class_NSMutableString1, _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, + data._id, opts?._id ?? ffi.nullptr, string, usedLossyConversion); } - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSObject? stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_49(_lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSObject? stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_226(_lib._class_NSMutableString1, + _lib._sel_stringWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSMutableString1, + static NSObject? stringWithCString_length_(NativeCupertinoHttp _lib, + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_282(_lib._class_NSMutableString1, _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithCString_( + static NSObject? stringWithCString_( NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( + final _ret = _lib._objc_msgSend_270( _lib._class_NSMutableString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } static NSMutableString new1(NativeCupertinoHttp _lib) { @@ -83037,6 +87264,13 @@ class NSMutableString extends NSString { return NSMutableString._(_ret, _lib, retain: false, release: true); } + static NSMutableString allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableString1, _lib._sel_allocWithZone_1, zone); + return NSMutableString._(_ret, _lib, retain: false, release: true); + } + static NSMutableString alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_alloc1); @@ -83045,6 +87279,7 @@ class NSMutableString extends NSString { } typedef NSExceptionName = ffi.Pointer; +typedef DartNSExceptionName = NSString; class NSSimpleCString extends NSString { NSSimpleCString._(ffi.Pointer id, NativeCupertinoHttp lib, @@ -83070,24 +87305,253 @@ class NSSimpleCString extends NSString { obj._lib._class_NSSimpleCString1); } + @override + NSSimpleCString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + static ffi.Pointer getAvailableStringEncodings( NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( + return _lib._objc_msgSend_255( _lib._class_NSSimpleCString1, _lib._sel_availableStringEncodings1); } static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { + NativeCupertinoHttp _lib, DartNSUInteger encoding) { final _ret = _lib._objc_msgSend_15(_lib._class_NSSimpleCString1, _lib._sel_localizedNameOfStringEncoding_1, encoding); return NSString._(_ret, _lib, retain: true, release: true); } - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + static DartNSUInteger getDefaultCStringEncoding(NativeCupertinoHttp _lib) { return _lib._objc_msgSend_12( _lib._class_NSSimpleCString1, _lib._sel_defaultCStringEncoding1); } + @override + NSSimpleCString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, DartNSUInteger length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_267( + _id, + _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, + characters, + length, + freeBuffer); + return NSSimpleCString._(_ret, _lib, retain: false, release: true); + } + + @override + NSSimpleCString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, + DartNSUInteger len, + ObjCBlock_ffiVoid_unichar_NSUInteger? deallocator) { + final _ret = _lib._objc_msgSend_268( + _id, + _lib._sel_initWithCharactersNoCopy_length_deallocator_1, + chars, + len, + deallocator?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: false, release: true); + } + + @override + NSSimpleCString initWithCharacters_length_( + ffi.Pointer characters, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_269( + _id, _lib._sel_initWithCharacters_length_1, characters, length); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString? initWithUTF8String_( + ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_270( + _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString initWithString_(NSString aString) { + final _ret = + _lib._objc_msgSend_42(_id, _lib._sel_initWithString_1, aString._id); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString initWithFormat_(NSString format) { + final _ret = + _lib._objc_msgSend_42(_id, _lib._sel_initWithFormat_1, format._id); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString initWithFormat_arguments_(NSString format, va_list argList) { + final _ret = _lib._objc_msgSend_271( + _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString initWithFormat_locale_(NSString format, NSObject? locale) { + final _ret = _lib._objc_msgSend_272(_id, _lib._sel_initWithFormat_locale_1, + format._id, locale?._id ?? ffi.nullptr); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString initWithFormat_locale_arguments_( + NSString format, NSObject? locale, va_list argList) { + final _ret = _lib._objc_msgSend_273( + _id, + _lib._sel_initWithFormat_locale_arguments_1, + format._id, + locale?._id ?? ffi.nullptr, + argList); + return NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString? initWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_274( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, + format._id, + validFormatSpecifiers._id, + error); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_275( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, + format._id, + validFormatSpecifiers._id, + locale?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString? + initWithValidatedFormat_validFormatSpecifiers_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + va_list argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_276( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, + format._id, + validFormatSpecifiers._id, + argList, + error); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString? + initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + va_list argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_277( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, + format._id, + validFormatSpecifiers._id, + locale?._id ?? ffi.nullptr, + argList, + error); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString? initWithData_encoding_( + NSData data, DartNSUInteger encoding) { + final _ret = _lib._objc_msgSend_278( + _id, _lib._sel_initWithData_encoding_1, data._id, encoding); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString? initWithBytes_length_encoding_(ffi.Pointer bytes, + DartNSUInteger len, DartNSUInteger encoding) { + final _ret = _lib._objc_msgSend_279( + _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString? initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, + DartNSUInteger len, + DartNSUInteger encoding, + bool freeBuffer) { + final _ret = _lib._objc_msgSend_280( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, + bytes, + len, + encoding, + freeBuffer); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: false, release: true); + } + + @override + NSSimpleCString? initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + DartNSUInteger len, + DartNSUInteger encoding, + ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { + final _ret = _lib._objc_msgSend_281( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, + bytes, + len, + encoding, + deallocator?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: false, release: true); + } + static NSSimpleCString string(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_string1); @@ -83095,174 +87559,265 @@ class NSSimpleCString extends NSString { } static NSSimpleCString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSString string) { + final _ret = _lib._objc_msgSend_42( + _lib._class_NSSimpleCString1, _lib._sel_stringWithString_1, string._id); return NSSimpleCString._(_ret, _lib, retain: true, release: true); } - static NSSimpleCString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSSimpleCString1, + static NSSimpleCString stringWithCharacters_length_(NativeCupertinoHttp _lib, + ffi.Pointer characters, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_269(_lib._class_NSSimpleCString1, _lib._sel_stringWithCharacters_length_1, characters, length); return NSSimpleCString._(_ret, _lib, retain: true, release: true); } - static NSSimpleCString stringWithUTF8String_( + static NSSimpleCString? stringWithUTF8String_( NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSSimpleCString1, + final _ret = _lib._objc_msgSend_270(_lib._class_NSSimpleCString1, _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); } static NSSimpleCString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSString format) { + final _ret = _lib._objc_msgSend_42( + _lib._class_NSSimpleCString1, _lib._sel_stringWithFormat_1, format._id); return NSSimpleCString._(_ret, _lib, retain: true, release: true); } static NSSimpleCString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { + NativeCupertinoHttp _lib, NSString format) { final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + _lib._sel_localizedStringWithFormat_1, format._id); return NSSimpleCString._(_ret, _lib, retain: true, release: true); } - static NSSimpleCString stringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( + static NSSimpleCString? + stringWithValidatedFormat_validFormatSpecifiers_error_( + NativeCupertinoHttp _lib, + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_274( _lib._class_NSSimpleCString1, _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, + format._id, + validFormatSpecifiers._id, error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); } - static NSSimpleCString + static NSSimpleCString? localizedStringWithValidatedFormat_validFormatSpecifiers_error_( NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, + NSString format, + NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( + final _ret = _lib._objc_msgSend_274( _lib._class_NSSimpleCString1, _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, + format._id, + validFormatSpecifiers._id, error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); } - static NSSimpleCString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSSimpleCString1, + @override + NSSimpleCString? initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, DartNSUInteger encoding) { + final _ret = _lib._objc_msgSend_282(_id, + _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString? stringWithCString_encoding_(NativeCupertinoHttp _lib, + ffi.Pointer cString, DartNSUInteger enc) { + final _ret = _lib._objc_msgSend_282(_lib._class_NSSimpleCString1, _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); } - static NSSimpleCString stringWithContentsOfURL_encoding_error_( + @override + NSSimpleCString? initWithContentsOfURL_encoding_error_(NSURL url, + DartNSUInteger enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_283(_id, + _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString? initWithContentsOfFile_encoding_error_(NSString path, + DartNSUInteger enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_284( + _id, + _lib._sel_initWithContentsOfFile_encoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString? stringWithContentsOfURL_encoding_error_( NativeCupertinoHttp _lib, - NSURL? url, - int enc, + NSURL url, + DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_269( + final _ret = _lib._objc_msgSend_283( _lib._class_NSSimpleCString1, _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, + url._id, enc, error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); } - static NSSimpleCString stringWithContentsOfFile_encoding_error_( + static NSSimpleCString? stringWithContentsOfFile_encoding_error_( NativeCupertinoHttp _lib, - NSString? path, - int enc, + NSString path, + DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_270( + final _ret = _lib._objc_msgSend_284( _lib._class_NSSimpleCString1, _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, + path._id, enc, error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); } - static NSSimpleCString stringWithContentsOfURL_usedEncoding_error_( + @override + NSSimpleCString? initWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_285( + _id, + _lib._sel_initWithContentsOfURL_usedEncoding_error_1, + url._id, + enc, + error); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + @override + NSSimpleCString? initWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_286( + _id, + _lib._sel_initWithContentsOfFile_usedEncoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); + } + + static NSSimpleCString? stringWithContentsOfURL_usedEncoding_error_( NativeCupertinoHttp _lib, - NSURL? url, + NSURL url, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_271( + final _ret = _lib._objc_msgSend_285( _lib._class_NSSimpleCString1, _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, + url._id, enc, error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); } - static NSSimpleCString stringWithContentsOfFile_usedEncoding_error_( + static NSSimpleCString? stringWithContentsOfFile_usedEncoding_error_( NativeCupertinoHttp _lib, - NSString? path, + NSString path, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_272( + final _ret = _lib._objc_msgSend_286( _lib._class_NSSimpleCString1, _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, + path._id, enc, error); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSSimpleCString._(_ret, _lib, retain: true, release: true); } - static int + static DartNSUInteger stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( NativeCupertinoHttp _lib, - NSData? data, + NSData data, NSDictionary? opts, ffi.Pointer> string, ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_273( + return _lib._objc_msgSend_287( _lib._class_NSSimpleCString1, _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, + data._id, opts?._id ?? ffi.nullptr, string, usedLossyConversion); } - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSObject? stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_49(_lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSObject? stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_226(_lib._class_NSSimpleCString1, + _lib._sel_stringWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSSimpleCString1, + static NSObject? stringWithCString_length_(NativeCupertinoHttp _lib, + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_282(_lib._class_NSSimpleCString1, _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithCString_( + static NSObject? stringWithCString_( NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( + final _ret = _lib._objc_msgSend_270( _lib._class_NSSimpleCString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } static NSSimpleCString new1(NativeCupertinoHttp _lib) { @@ -83271,6 +87826,13 @@ class NSSimpleCString extends NSString { return NSSimpleCString._(_ret, _lib, retain: false, release: true); } + static NSSimpleCString allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSSimpleCString1, _lib._sel_allocWithZone_1, zone); + return NSSimpleCString._(_ret, _lib, retain: false, release: true); + } + static NSSimpleCString alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_alloc1); @@ -83302,24 +87864,253 @@ class NSConstantString extends NSSimpleCString { obj._lib._class_NSConstantString1); } + @override + NSConstantString init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + static ffi.Pointer getAvailableStringEncodings( NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_242( + return _lib._objc_msgSend_255( _lib._class_NSConstantString1, _lib._sel_availableStringEncodings1); } static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, int encoding) { + NativeCupertinoHttp _lib, DartNSUInteger encoding) { final _ret = _lib._objc_msgSend_15(_lib._class_NSConstantString1, _lib._sel_localizedNameOfStringEncoding_1, encoding); return NSString._(_ret, _lib, retain: true, release: true); } - static int getDefaultCStringEncoding(NativeCupertinoHttp _lib) { + static DartNSUInteger getDefaultCStringEncoding(NativeCupertinoHttp _lib) { return _lib._objc_msgSend_12( _lib._class_NSConstantString1, _lib._sel_defaultCStringEncoding1); } + @override + NSConstantString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, DartNSUInteger length, bool freeBuffer) { + final _ret = _lib._objc_msgSend_267( + _id, + _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, + characters, + length, + freeBuffer); + return NSConstantString._(_ret, _lib, retain: false, release: true); + } + + @override + NSConstantString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, + DartNSUInteger len, + ObjCBlock_ffiVoid_unichar_NSUInteger? deallocator) { + final _ret = _lib._objc_msgSend_268( + _id, + _lib._sel_initWithCharactersNoCopy_length_deallocator_1, + chars, + len, + deallocator?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: false, release: true); + } + + @override + NSConstantString initWithCharacters_length_( + ffi.Pointer characters, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_269( + _id, _lib._sel_initWithCharacters_length_1, characters, length); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString? initWithUTF8String_( + ffi.Pointer nullTerminatedCString) { + final _ret = _lib._objc_msgSend_270( + _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString initWithString_(NSString aString) { + final _ret = + _lib._objc_msgSend_42(_id, _lib._sel_initWithString_1, aString._id); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString initWithFormat_(NSString format) { + final _ret = + _lib._objc_msgSend_42(_id, _lib._sel_initWithFormat_1, format._id); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString initWithFormat_arguments_(NSString format, va_list argList) { + final _ret = _lib._objc_msgSend_271( + _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString initWithFormat_locale_(NSString format, NSObject? locale) { + final _ret = _lib._objc_msgSend_272(_id, _lib._sel_initWithFormat_locale_1, + format._id, locale?._id ?? ffi.nullptr); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString initWithFormat_locale_arguments_( + NSString format, NSObject? locale, va_list argList) { + final _ret = _lib._objc_msgSend_273( + _id, + _lib._sel_initWithFormat_locale_arguments_1, + format._id, + locale?._id ?? ffi.nullptr, + argList); + return NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString? initWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_274( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, + format._id, + validFormatSpecifiers._id, + error); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_275( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, + format._id, + validFormatSpecifiers._id, + locale?._id ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString? + initWithValidatedFormat_validFormatSpecifiers_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + va_list argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_276( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, + format._id, + validFormatSpecifiers._id, + argList, + error); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString? + initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + va_list argList, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_277( + _id, + _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, + format._id, + validFormatSpecifiers._id, + locale?._id ?? ffi.nullptr, + argList, + error); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString? initWithData_encoding_( + NSData data, DartNSUInteger encoding) { + final _ret = _lib._objc_msgSend_278( + _id, _lib._sel_initWithData_encoding_1, data._id, encoding); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString? initWithBytes_length_encoding_(ffi.Pointer bytes, + DartNSUInteger len, DartNSUInteger encoding) { + final _ret = _lib._objc_msgSend_279( + _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString? initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, + DartNSUInteger len, + DartNSUInteger encoding, + bool freeBuffer) { + final _ret = _lib._objc_msgSend_280( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, + bytes, + len, + encoding, + freeBuffer); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: false, release: true); + } + + @override + NSConstantString? initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + DartNSUInteger len, + DartNSUInteger encoding, + ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { + final _ret = _lib._objc_msgSend_281( + _id, + _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, + bytes, + len, + encoding, + deallocator?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: false, release: true); + } + static NSConstantString string(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_string1); @@ -83327,175 +88118,265 @@ class NSConstantString extends NSSimpleCString { } static NSConstantString stringWithString_( - NativeCupertinoHttp _lib, NSString? string) { + NativeCupertinoHttp _lib, NSString string) { final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithString_1, string?._id ?? ffi.nullptr); + _lib._sel_stringWithString_1, string._id); return NSConstantString._(_ret, _lib, retain: true, release: true); } - static NSConstantString stringWithCharacters_length_( - NativeCupertinoHttp _lib, ffi.Pointer characters, int length) { - final _ret = _lib._objc_msgSend_255(_lib._class_NSConstantString1, + static NSConstantString stringWithCharacters_length_(NativeCupertinoHttp _lib, + ffi.Pointer characters, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_269(_lib._class_NSConstantString1, _lib._sel_stringWithCharacters_length_1, characters, length); return NSConstantString._(_ret, _lib, retain: true, release: true); } - static NSConstantString stringWithUTF8String_( + static NSConstantString? stringWithUTF8String_( NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_256(_lib._class_NSConstantString1, + final _ret = _lib._objc_msgSend_270(_lib._class_NSConstantString1, _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return NSConstantString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); } static NSConstantString stringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { + NativeCupertinoHttp _lib, NSString format) { final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithFormat_1, format?._id ?? ffi.nullptr); + _lib._sel_stringWithFormat_1, format._id); return NSConstantString._(_ret, _lib, retain: true, release: true); } static NSConstantString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString? format) { + NativeCupertinoHttp _lib, NSString format) { final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_localizedStringWithFormat_1, format?._id ?? ffi.nullptr); + _lib._sel_localizedStringWithFormat_1, format._id); return NSConstantString._(_ret, _lib, retain: true, release: true); } - static NSConstantString + static NSConstantString? stringWithValidatedFormat_validFormatSpecifiers_error_( NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, + NSString format, + NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( + final _ret = _lib._objc_msgSend_274( _lib._class_NSConstantString1, _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, + format._id, + validFormatSpecifiers._id, error); - return NSConstantString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); } - static NSConstantString + static NSConstantString? localizedStringWithValidatedFormat_validFormatSpecifiers_error_( NativeCupertinoHttp _lib, - NSString? format, - NSString? validFormatSpecifiers, + NSString format, + NSString validFormatSpecifiers, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_260( + final _ret = _lib._objc_msgSend_274( _lib._class_NSConstantString1, _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format?._id ?? ffi.nullptr, - validFormatSpecifiers?._id ?? ffi.nullptr, + format._id, + validFormatSpecifiers._id, error); - return NSConstantString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString? initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, DartNSUInteger encoding) { + final _ret = _lib._objc_msgSend_282(_id, + _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); } - static NSConstantString stringWithCString_encoding_( - NativeCupertinoHttp _lib, ffi.Pointer cString, int enc) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSConstantString1, + static NSConstantString? stringWithCString_encoding_(NativeCupertinoHttp _lib, + ffi.Pointer cString, DartNSUInteger enc) { + final _ret = _lib._objc_msgSend_282(_lib._class_NSConstantString1, _lib._sel_stringWithCString_encoding_1, cString, enc); - return NSConstantString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); } - static NSConstantString stringWithContentsOfURL_encoding_error_( + @override + NSConstantString? initWithContentsOfURL_encoding_error_(NSURL url, + DartNSUInteger enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_283(_id, + _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString? initWithContentsOfFile_encoding_error_(NSString path, + DartNSUInteger enc, ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_284( + _id, + _lib._sel_initWithContentsOfFile_encoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString? stringWithContentsOfURL_encoding_error_( NativeCupertinoHttp _lib, - NSURL? url, - int enc, + NSURL url, + DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_269( + final _ret = _lib._objc_msgSend_283( _lib._class_NSConstantString1, _lib._sel_stringWithContentsOfURL_encoding_error_1, - url?._id ?? ffi.nullptr, + url._id, enc, error); - return NSConstantString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); } - static NSConstantString stringWithContentsOfFile_encoding_error_( + static NSConstantString? stringWithContentsOfFile_encoding_error_( NativeCupertinoHttp _lib, - NSString? path, - int enc, + NSString path, + DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_270( + final _ret = _lib._objc_msgSend_284( _lib._class_NSConstantString1, _lib._sel_stringWithContentsOfFile_encoding_error_1, - path?._id ?? ffi.nullptr, + path._id, enc, error); - return NSConstantString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); } - static NSConstantString stringWithContentsOfURL_usedEncoding_error_( + @override + NSConstantString? initWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_285( + _id, + _lib._sel_initWithContentsOfURL_usedEncoding_error_1, + url._id, + enc, + error); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + + @override + NSConstantString? initWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _lib._objc_msgSend_286( + _id, + _lib._sel_initWithContentsOfFile_usedEncoding_error_1, + path._id, + enc, + error); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); + } + + static NSConstantString? stringWithContentsOfURL_usedEncoding_error_( NativeCupertinoHttp _lib, - NSURL? url, + NSURL url, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_271( + final _ret = _lib._objc_msgSend_285( _lib._class_NSConstantString1, _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url?._id ?? ffi.nullptr, + url._id, enc, error); - return NSConstantString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); } - static NSConstantString stringWithContentsOfFile_usedEncoding_error_( + static NSConstantString? stringWithContentsOfFile_usedEncoding_error_( NativeCupertinoHttp _lib, - NSString? path, + NSString path, ffi.Pointer enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_272( + final _ret = _lib._objc_msgSend_286( _lib._class_NSConstantString1, _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path?._id ?? ffi.nullptr, + path._id, enc, error); - return NSConstantString._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSConstantString._(_ret, _lib, retain: true, release: true); } - static int + static DartNSUInteger stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( NativeCupertinoHttp _lib, - NSData? data, + NSData data, NSDictionary? opts, ffi.Pointer> string, ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_273( + return _lib._objc_msgSend_287( _lib._class_NSConstantString1, _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data?._id ?? ffi.nullptr, + data._id, opts?._id ?? ffi.nullptr, string, usedLossyConversion); } - static NSObject stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_1, path?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSObject? stringWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_49(_lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfFile_1, path._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201(_lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_1, url?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + static NSObject? stringWithContentsOfURL_( + NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_226(_lib._class_NSConstantString1, + _lib._sel_stringWithContentsOfURL_1, url._id); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithCString_length_( - NativeCupertinoHttp _lib, ffi.Pointer bytes, int length) { - final _ret = _lib._objc_msgSend_268(_lib._class_NSConstantString1, + static NSObject? stringWithCString_length_(NativeCupertinoHttp _lib, + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _lib._objc_msgSend_282(_lib._class_NSConstantString1, _lib._sel_stringWithCString_length_1, bytes, length); - return NSObject._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } - static NSObject stringWithCString_( + static NSObject? stringWithCString_( NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_256( + final _ret = _lib._objc_msgSend_270( _lib._class_NSConstantString1, _lib._sel_stringWithCString_1, bytes); - return NSObject._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSObject._(_ret, _lib, retain: true, release: true); } static NSConstantString new1(NativeCupertinoHttp _lib) { @@ -83504,6 +88385,13 @@ class NSConstantString extends NSSimpleCString { return NSConstantString._(_ret, _lib, retain: false, release: true); } + static NSConstantString allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSConstantString1, _lib._sel_allocWithZone_1, zone); + return NSConstantString._(_ret, _lib, retain: false, release: true); + } + static NSConstantString alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_alloc1); @@ -83537,255 +88425,219 @@ class NSMutableCharacterSet extends NSCharacterSet { } void addCharactersInRange_(NSRange aRange) { - return _lib._objc_msgSend_287( - _id, _lib._sel_addCharactersInRange_1, aRange); + _lib._objc_msgSend_304(_id, _lib._sel_addCharactersInRange_1, aRange); } void removeCharactersInRange_(NSRange aRange) { - return _lib._objc_msgSend_287( - _id, _lib._sel_removeCharactersInRange_1, aRange); + _lib._objc_msgSend_304(_id, _lib._sel_removeCharactersInRange_1, aRange); } - void addCharactersInString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_addCharactersInString_1, aString?._id ?? ffi.nullptr); + void addCharactersInString_(NSString aString) { + _lib._objc_msgSend_195(_id, _lib._sel_addCharactersInString_1, aString._id); } - void removeCharactersInString_(NSString? aString) { - return _lib._objc_msgSend_188( - _id, _lib._sel_removeCharactersInString_1, aString?._id ?? ffi.nullptr); + void removeCharactersInString_(NSString aString) { + _lib._objc_msgSend_195( + _id, _lib._sel_removeCharactersInString_1, aString._id); } - void formUnionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_478(_id, _lib._sel_formUnionWithCharacterSet_1, - otherSet?._id ?? ffi.nullptr); + void formUnionWithCharacterSet_(NSCharacterSet otherSet) { + _lib._objc_msgSend_514( + _id, _lib._sel_formUnionWithCharacterSet_1, otherSet._id); } - void formIntersectionWithCharacterSet_(NSCharacterSet? otherSet) { - return _lib._objc_msgSend_478( - _id, - _lib._sel_formIntersectionWithCharacterSet_1, - otherSet?._id ?? ffi.nullptr); + void formIntersectionWithCharacterSet_(NSCharacterSet otherSet) { + _lib._objc_msgSend_514( + _id, _lib._sel_formIntersectionWithCharacterSet_1, otherSet._id); } void invert() { - return _lib._objc_msgSend_1(_id, _lib._sel_invert1); + _lib._objc_msgSend_1(_id, _lib._sel_invert1); } - static NSCharacterSet? getControlCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getControlCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSMutableCharacterSet1, _lib._sel_controlCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSMutableCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getWhitespaceAndNewlineCharacterSet( + static NSCharacterSet getWhitespaceAndNewlineCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_whitespaceAndNewlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_decimalDigitCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getLetterCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getLetterCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSMutableCharacterSet1, _lib._sel_letterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getLowercaseLetterCharacterSet( + static NSCharacterSet getLowercaseLetterCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getUppercaseLetterCharacterSet( + static NSCharacterSet getUppercaseLetterCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getNonBaseCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getNonBaseCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSMutableCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_alphanumericCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getDecomposableCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getDecomposableCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_decomposableCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getIllegalCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getIllegalCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSMutableCharacterSet1, _lib._sel_illegalCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getPunctuationCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getPunctuationCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSMutableCharacterSet1, _lib._sel_punctuationCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getCapitalizedLetterCharacterSet( + static NSCharacterSet getCapitalizedLetterCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getSymbolCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getSymbolCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSMutableCharacterSet1, _lib._sel_symbolCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSCharacterSet? getNewlineCharacterSet(NativeCupertinoHttp _lib) { + static NSCharacterSet getNewlineCharacterSet(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28( _lib._class_NSMutableCharacterSet1, _lib._sel_newlineCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: false, release: true); + return NSCharacterSet._(_ret, _lib, retain: false, release: true); } static NSMutableCharacterSet characterSetWithRange_( NativeCupertinoHttp _lib, NSRange aRange) { - final _ret = _lib._objc_msgSend_479(_lib._class_NSMutableCharacterSet1, + final _ret = _lib._objc_msgSend_515(_lib._class_NSMutableCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); } static NSMutableCharacterSet characterSetWithCharactersInString_( - NativeCupertinoHttp _lib, NSString? aString) { - final _ret = _lib._objc_msgSend_480( - _lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, - aString?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSString aString) { + final _ret = _lib._objc_msgSend_516(_lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithCharactersInString_1, aString._id); return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); } static NSMutableCharacterSet characterSetWithBitmapRepresentation_( - NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_481( - _lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, - data?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, NSData data) { + final _ret = _lib._objc_msgSend_517(_lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithBitmapRepresentation_1, data._id); return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); } - static NSMutableCharacterSet characterSetWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString? fName) { - final _ret = _lib._objc_msgSend_480(_lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName?._id ?? ffi.nullptr); + static NSMutableCharacterSet? characterSetWithContentsOfFile_( + NativeCupertinoHttp _lib, NSString fName) { + final _ret = _lib._objc_msgSend_518(_lib._class_NSMutableCharacterSet1, + _lib._sel_characterSetWithContentsOfFile_1, fName._id); + return _ret.address == 0 + ? null + : NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableCharacterSet initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_236(_id, _lib._sel_initWithCoder_1, coder._id); return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); } /// Returns a character set containing the characters allowed in a URL's user subcomponent. - static NSCharacterSet? getURLUserAllowedCharacterSet( + static NSCharacterSet getURLUserAllowedCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } /// Returns a character set containing the characters allowed in a URL's password subcomponent. - static NSCharacterSet? getURLPasswordAllowedCharacterSet( + static NSCharacterSet getURLPasswordAllowedCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } /// Returns a character set containing the characters allowed in a URL's host subcomponent. - static NSCharacterSet? getURLHostAllowedCharacterSet( + static NSCharacterSet getURLHostAllowedCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } /// Returns a character set containing the characters allowed in a URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - static NSCharacterSet? getURLPathAllowedCharacterSet( + static NSCharacterSet getURLPathAllowedCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } /// Returns a character set containing the characters allowed in a URL's query component. - static NSCharacterSet? getURLQueryAllowedCharacterSet( + static NSCharacterSet getURLQueryAllowedCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); } /// Returns a character set containing the characters allowed in a URL's fragment component. - static NSCharacterSet? getURLFragmentAllowedCharacterSet( + static NSCharacterSet getURLFragmentAllowedCharacterSet( NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); + return NSCharacterSet._(_ret, _lib, retain: true, release: true); + } + + @override + NSMutableCharacterSet init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); } static NSMutableCharacterSet new1(NativeCupertinoHttp _lib) { @@ -83794,6 +88646,13 @@ class NSMutableCharacterSet extends NSCharacterSet { return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); } + static NSMutableCharacterSet allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSMutableCharacterSet1, _lib._sel_allocWithZone_1, zone); + return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); + } + static NSMutableCharacterSet alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSMutableCharacterSet1, _lib._sel_alloc1); @@ -83802,11 +88661,17 @@ class NSMutableCharacterSet extends NSCharacterSet { } typedef NSURLFileResourceType = ffi.Pointer; +typedef DartNSURLFileResourceType = NSString; typedef NSURLThumbnailDictionaryItem = ffi.Pointer; +typedef DartNSURLThumbnailDictionaryItem = NSString; typedef NSURLFileProtectionType = ffi.Pointer; +typedef DartNSURLFileProtectionType = NSString; typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; +typedef DartNSURLUbiquitousItemDownloadingStatus = NSString; typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; +typedef DartNSURLUbiquitousSharedItemRole = NSString; typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; +typedef DartNSURLUbiquitousSharedItemPermissions = NSString; /// NSURLQueryItem encapsulates a single query name-value pair. The name and value strings of a query name-value pair are not percent encoded. For use with the NSURLComponents queryItems property. class NSURLQueryItem extends NSObject { @@ -83832,42 +88697,53 @@ class NSURLQueryItem extends NSObject { obj._lib._class_NSURLQueryItem1); } - NSURLQueryItem initWithName_value_(NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_482(_id, _lib._sel_initWithName_value_1, - name?._id ?? ffi.nullptr, value?._id ?? ffi.nullptr); + NSURLQueryItem initWithName_value_(NSString name, NSString? value) { + final _ret = _lib._objc_msgSend_519(_id, _lib._sel_initWithName_value_1, + name._id, value?._id ?? ffi.nullptr); return NSURLQueryItem._(_ret, _lib, retain: true, release: true); } static NSURLQueryItem queryItemWithName_value_( - NativeCupertinoHttp _lib, NSString? name, NSString? value) { - final _ret = _lib._objc_msgSend_482( + NativeCupertinoHttp _lib, NSString name, NSString? value) { + final _ret = _lib._objc_msgSend_519( _lib._class_NSURLQueryItem1, _lib._sel_queryItemWithName_value_1, - name?._id ?? ffi.nullptr, + name._id, value?._id ?? ffi.nullptr); return NSURLQueryItem._(_ret, _lib, retain: true, release: true); } - NSString? get name { + NSString get name { final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + return NSString._(_ret, _lib, retain: true, release: true); } NSString? get value { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_value1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_value1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } + @override + NSURLQueryItem init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + } + static NSURLQueryItem new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_new1); return NSURLQueryItem._(_ret, _lib, retain: false, release: true); } + static NSURLQueryItem allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLQueryItem1, _lib._sel_allocWithZone_1, zone); + return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + } + static NSURLQueryItem alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_alloc1); @@ -83907,60 +88783,109 @@ class NSURLComponents extends NSObject { } /// Initialize a NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. - NSURLComponents initWithURL_resolvingAgainstBaseURL_( - NSURL? url, bool resolve) { - final _ret = _lib._objc_msgSend_206( - _id, - _lib._sel_initWithURL_resolvingAgainstBaseURL_1, - url?._id ?? ffi.nullptr, - resolve); - return NSURLComponents._(_ret, _lib, retain: true, release: true); + NSURLComponents? initWithURL_resolvingAgainstBaseURL_( + NSURL url, bool resolve) { + final _ret = _lib._objc_msgSend_356( + _id, _lib._sel_initWithURL_resolvingAgainstBaseURL_1, url._id, resolve); + return _ret.address == 0 + ? null + : NSURLComponents._(_ret, _lib, retain: true, release: true); } /// Initializes and returns a newly created NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. - static NSURLComponents componentsWithURL_resolvingAgainstBaseURL_( - NativeCupertinoHttp _lib, NSURL? url, bool resolve) { - final _ret = _lib._objc_msgSend_206( + static NSURLComponents? componentsWithURL_resolvingAgainstBaseURL_( + NativeCupertinoHttp _lib, NSURL url, bool resolve) { + final _ret = _lib._objc_msgSend_356( _lib._class_NSURLComponents1, _lib._sel_componentsWithURL_resolvingAgainstBaseURL_1, - url?._id ?? ffi.nullptr, + url._id, resolve); - return NSURLComponents._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURLComponents._(_ret, _lib, retain: true, release: true); } /// Initialize a NSURLComponents with a URL string. If the URLString is malformed, nil is returned. - NSURLComponents initWithString_(NSString? URLString) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_initWithString_1, URLString?._id ?? ffi.nullptr); - return NSURLComponents._(_ret, _lib, retain: true, release: true); + NSURLComponents? initWithString_(NSString URLString) { + final _ret = + _lib._objc_msgSend_49(_id, _lib._sel_initWithString_1, URLString._id); + return _ret.address == 0 + ? null + : NSURLComponents._(_ret, _lib, retain: true, release: true); } /// Initializes and returns a newly created NSURLComponents with a URL string. If the URLString is malformed, nil is returned. - static NSURLComponents componentsWithString_( - NativeCupertinoHttp _lib, NSString? URLString) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSURLComponents1, - _lib._sel_componentsWithString_1, URLString?._id ?? ffi.nullptr); - return NSURLComponents._(_ret, _lib, retain: true, release: true); + static NSURLComponents? componentsWithString_( + NativeCupertinoHttp _lib, NSString URLString) { + final _ret = _lib._objc_msgSend_49(_lib._class_NSURLComponents1, + _lib._sel_componentsWithString_1, URLString._id); + return _ret.address == 0 + ? null + : NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initializes an `NSURLComponents` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters. + /// If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned. + /// If `encodingInvalidCharacters` is true, `NSURLComponents` will try to encode the string to create a valid URL. + /// If the URL string is still invalid after encoding, `nil` is returned. + /// + /// - Parameter URLString: The URL string. + /// - Parameter encodingInvalidCharacters: True if `NSURLComponents` should try to encode an invalid URL string, false otherwise. + /// - Returns: An `NSURLComponents` instance for a valid URL, or `nil` if the URL is invalid. + NSURLComponents? initWithString_encodingInvalidCharacters_( + NSString URLString, bool encodingInvalidCharacters) { + final _ret = _lib._objc_msgSend_51( + _id, + _lib._sel_initWithString_encodingInvalidCharacters_1, + URLString._id, + encodingInvalidCharacters); + return _ret.address == 0 + ? null + : NSURLComponents._(_ret, _lib, retain: true, release: true); + } + + /// Initializes and returns a newly created `NSURLComponents` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters. + /// If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned. + /// If `encodingInvalidCharacters` is true, `NSURLComponents` will try to encode the string to create a valid URL. + /// If the URL string is still invalid after encoding, nil is returned. + /// + /// - Parameter URLString: The URL string. + /// - Parameter encodingInvalidCharacters: True if `NSURLComponents` should try to encode an invalid URL string, false otherwise. + /// - Returns: An `NSURLComponents` instance for a valid URL, or `nil` if the URL is invalid. + static NSURLComponents? componentsWithString_encodingInvalidCharacters_( + NativeCupertinoHttp _lib, + NSString URLString, + bool encodingInvalidCharacters) { + final _ret = _lib._objc_msgSend_51( + _lib._class_NSURLComponents1, + _lib._sel_componentsWithString_encodingInvalidCharacters_1, + URLString._id, + encodingInvalidCharacters); + return _ret.address == 0 + ? null + : NSURLComponents._(_ret, _lib, retain: true, release: true); } /// Returns a URL created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. NSURL? get URL { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_URL1); + final _ret = _lib._objc_msgSend_56(_id, _lib._sel_URL1); return _ret.address == 0 ? null : NSURL._(_ret, _lib, retain: true, release: true); } /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSURL URLRelativeToURL_(NSURL? baseURL) { - final _ret = _lib._objc_msgSend_483( + NSURL? URLRelativeToURL_(NSURL? baseURL) { + final _ret = _lib._objc_msgSend_520( _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSURL._(_ret, _lib, retain: true, release: true); } /// Returns a URL string created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. NSString? get string { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_string1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_string1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -83968,7 +88893,7 @@ class NSURLComponents extends NSObject { /// Attempting to set the scheme with an invalid scheme string will cause an exception. NSString? get scheme { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_scheme1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_scheme1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -83976,47 +88901,49 @@ class NSURLComponents extends NSObject { /// Attempting to set the scheme with an invalid scheme string will cause an exception. set scheme(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); } NSString? get user { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_user1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_user1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set user(NSString? value) { - _lib._objc_msgSend_360(_id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); + return _lib._objc_msgSend_395( + _id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); } NSString? get password { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_password1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_password1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set password(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); } NSString? get host { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_host1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_host1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set host(NSString? value) { - _lib._objc_msgSend_360(_id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); + return _lib._objc_msgSend_395( + _id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); } /// Attempting to set a negative port number will cause an exception. NSNumber? get port { - final _ret = _lib._objc_msgSend_89(_id, _lib._sel_port1); + final _ret = _lib._objc_msgSend_94(_id, _lib._sel_port1); return _ret.address == 0 ? null : NSNumber._(_ret, _lib, retain: true, release: true); @@ -84024,47 +88951,49 @@ class NSURLComponents extends NSObject { /// Attempting to set a negative port number will cause an exception. set port(NSNumber? value) { - _lib._objc_msgSend_364(_id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); + return _lib._objc_msgSend_389( + _id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); } NSString? get path { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_path1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_path1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set path(NSString? value) { - _lib._objc_msgSend_360(_id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); + return _lib._objc_msgSend_395( + _id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); } NSString? get query { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_query1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_query1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set query(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); } NSString? get fragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fragment1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_fragment1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set fragment(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); } /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). NSString? get percentEncodedUser { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedUser1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_percentEncodedUser1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); @@ -84072,113 +89001,113 @@ class NSURLComponents extends NSObject { /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). set percentEncodedUser(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); } NSString? get percentEncodedPassword { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPassword1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_percentEncodedPassword1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set percentEncodedPassword(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); } NSString? get percentEncodedHost { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedHost1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_percentEncodedHost1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set percentEncodedHost(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); } NSString? get percentEncodedPath { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedPath1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_percentEncodedPath1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set percentEncodedPath(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); } NSString? get percentEncodedQuery { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedQuery1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_percentEncodedQuery1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set percentEncodedQuery(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); } NSString? get percentEncodedFragment { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_percentEncodedFragment1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_percentEncodedFragment1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set percentEncodedFragment(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); } NSString? get encodedHost { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_encodedHost1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_encodedHost1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } set encodedHost(NSString? value) { - _lib._objc_msgSend_360( + return _lib._objc_msgSend_395( _id, _lib._sel_setEncodedHost_1, value?._id ?? ffi.nullptr); } /// These properties return the character range of a component in the URL string returned by -[NSURLComponents string]. If the component does not exist in the NSURLComponents object, {NSNotFound, 0} is returned. Note: Zero length components are legal. For example, the URL string "scheme://:@/?#" has a zero length user, password, host, query and fragment; the URL strings "scheme:" and "" both have a zero length path. NSRange get rangeOfScheme { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfScheme1); + return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfScheme1); } NSRange get rangeOfUser { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfUser1); + return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfUser1); } NSRange get rangeOfPassword { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPassword1); + return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfPassword1); } NSRange get rangeOfHost { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfHost1); + return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfHost1); } NSRange get rangeOfPort { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPort1); + return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfPort1); } NSRange get rangeOfPath { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfPath1); + return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfPath1); } NSRange get rangeOfQuery { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfQuery1); + return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfQuery1); } NSRange get rangeOfFragment { - return _lib._objc_msgSend_61(_id, _lib._sel_rangeOfFragment1); + return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfFragment1); } /// The query component as an array of NSURLQueryItems for this NSURLComponents. @@ -84193,7 +89122,7 @@ class NSURLComponents extends NSObject { /// /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. NSArray? get queryItems { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_queryItems1); + final _ret = _lib._objc_msgSend_188(_id, _lib._sel_queryItems1); return _ret.address == 0 ? null : NSArray._(_ret, _lib, retain: true, release: true); @@ -84211,7 +89140,7 @@ class NSURLComponents extends NSObject { /// /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. set queryItems(NSArray? value) { - _lib._objc_msgSend_418( + return _lib._objc_msgSend_451( _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); } @@ -84220,7 +89149,7 @@ class NSURLComponents extends NSObject { /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. NSArray? get percentEncodedQueryItems { final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_percentEncodedQueryItems1); + _lib._objc_msgSend_188(_id, _lib._sel_percentEncodedQueryItems1); return _ret.address == 0 ? null : NSArray._(_ret, _lib, retain: true, release: true); @@ -84230,7 +89159,7 @@ class NSURLComponents extends NSObject { /// /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. set percentEncodedQueryItems(NSArray? value) { - _lib._objc_msgSend_418(_id, _lib._sel_setPercentEncodedQueryItems_1, + return _lib._objc_msgSend_451(_id, _lib._sel_setPercentEncodedQueryItems_1, value?._id ?? ffi.nullptr); } @@ -84240,6 +89169,13 @@ class NSURLComponents extends NSObject { return NSURLComponents._(_ret, _lib, retain: false, release: true); } + static NSURLComponents allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSURLComponents1, _lib._sel_allocWithZone_1, zone); + return NSURLComponents._(_ret, _lib, retain: false, release: true); + } + static NSURLComponents alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_alloc1); @@ -84271,9 +89207,17 @@ class NSFileSecurity extends NSObject { obj._lib._class_NSFileSecurity1); } - NSFileSecurity initWithCoder_(NSCoder? coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_initWithCoder_1, coder?._id ?? ffi.nullptr); + NSFileSecurity? initWithCoder_(NSCoder coder) { + final _ret = + _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + return _ret.address == 0 + ? null + : NSFileSecurity._(_ret, _lib, retain: true, release: true); + } + + @override + NSFileSecurity init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); return NSFileSecurity._(_ret, _lib, retain: true, release: true); } @@ -84283,6 +89227,13 @@ class NSFileSecurity extends NSObject { return NSFileSecurity._(_ret, _lib, retain: false, release: true); } + static NSFileSecurity allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSFileSecurity1, _lib._sel_allocWithZone_1, zone); + return NSFileSecurity._(_ret, _lib, retain: false, release: true); + } + static NSFileSecurity alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_alloc1); @@ -84330,23 +89281,28 @@ class NSHTTPURLResponse extends NSURLResponse { /// @param headerFields A dictionary representing the header keys and values of the server response. /// @result the instance of the object, or NULL if an error occurred during initialization. /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. - NSHTTPURLResponse initWithURL_statusCode_HTTPVersion_headerFields_(NSURL? url, - int statusCode, NSString? HTTPVersion, NSDictionary? headerFields) { - final _ret = _lib._objc_msgSend_484( + NSHTTPURLResponse? initWithURL_statusCode_HTTPVersion_headerFields_( + NSURL url, + DartNSInteger statusCode, + NSString? HTTPVersion, + NSDictionary? headerFields) { + final _ret = _lib._objc_msgSend_521( _id, _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, - url?._id ?? ffi.nullptr, + url._id, statusCode, HTTPVersion?._id ?? ffi.nullptr, headerFields?._id ?? ffi.nullptr); - return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + return _ret.address == 0 + ? null + : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); } /// ! /// @abstract Returns the HTTP status code of the receiver. /// @result The HTTP status code of the receiver. - int get statusCode { - return _lib._objc_msgSend_81(_id, _lib._sel_statusCode1); + DartNSInteger get statusCode { + return _lib._objc_msgSend_86(_id, _lib._sel_statusCode1); } /// ! @@ -84358,11 +89314,9 @@ class NSHTTPURLResponse extends NSURLResponse { /// sophisticated or special-purpose HTTP clients. /// @result A dictionary containing all the HTTP header fields of the /// receiver. - NSDictionary? get allHeaderFields { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_allHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + NSDictionary get allHeaderFields { + final _ret = _lib._objc_msgSend_187(_id, _lib._sel_allHeaderFields1); + return NSDictionary._(_ret, _lib, retain: true, release: true); } /// ! @@ -84374,10 +89328,12 @@ class NSHTTPURLResponse extends NSURLResponse { /// (case-insensitive). /// @result the value associated with the given header field, or nil if /// there is no value associated with the given header field. - NSString valueForHTTPHeaderField_(NSString? field) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_valueForHTTPHeaderField_1, field?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); + NSString? valueForHTTPHeaderField_(NSString field) { + final _ret = _lib._objc_msgSend_347( + _id, _lib._sel_valueForHTTPHeaderField_1, field._id); + return _ret.address == 0 + ? null + : NSString._(_ret, _lib, retain: true, release: true); } /// ! @@ -84387,18 +89343,54 @@ class NSHTTPURLResponse extends NSURLResponse { /// @param statusCode the status code to use to produce a localized string. /// @result A localized string corresponding to the given status code. static NSString localizedStringForStatusCode_( - NativeCupertinoHttp _lib, int statusCode) { - final _ret = _lib._objc_msgSend_485(_lib._class_NSHTTPURLResponse1, + NativeCupertinoHttp _lib, DartNSInteger statusCode) { + final _ret = _lib._objc_msgSend_522(_lib._class_NSHTTPURLResponse1, _lib._sel_localizedStringForStatusCode_1, statusCode); return NSString._(_ret, _lib, retain: true, release: true); } + /// ! + /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: + /// @abstract Initialize an NSURLResponse with the provided values. + /// @param URL the URL + /// @param MIMEType the MIME content type of the response + /// @param length the expected content length of the associated data + /// @param name the name of the text encoding for the associated data, if applicable, else nil + /// @result The initialized NSURLResponse. + /// @discussion This is the designated initializer for NSURLResponse. + @override + NSHTTPURLResponse + initWithURL_MIMEType_expectedContentLength_textEncodingName_( + NSURL URL, NSString? MIMEType, DartNSInteger length, NSString? name) { + final _ret = _lib._objc_msgSend_334( + _id, + _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, + URL._id, + MIMEType?._id ?? ffi.nullptr, + length, + name?._id ?? ffi.nullptr); + return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + } + + @override + NSHTTPURLResponse init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + } + static NSHTTPURLResponse new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_new1); return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); } + static NSHTTPURLResponse allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSHTTPURLResponse1, _lib._sel_allocWithZone_1, zone); + return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); + } + static NSHTTPURLResponse alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_alloc1); @@ -84431,80 +89423,79 @@ class NSException extends NSObject { static NSException exceptionWithName_reason_userInfo_( NativeCupertinoHttp _lib, - NSExceptionName name, + DartNSExceptionName name, NSString? reason, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_486( + final _ret = _lib._objc_msgSend_523( _lib._class_NSException1, _lib._sel_exceptionWithName_reason_userInfo_1, - name, + name._id, reason?._id ?? ffi.nullptr, userInfo?._id ?? ffi.nullptr); return NSException._(_ret, _lib, retain: true, release: true); } NSException initWithName_reason_userInfo_( - NSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_487( + DartNSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { + final _ret = _lib._objc_msgSend_524( _id, _lib._sel_initWithName_reason_userInfo_1, - aName, + aName._id, aReason?._id ?? ffi.nullptr, aUserInfo?._id ?? ffi.nullptr); return NSException._(_ret, _lib, retain: true, release: true); } - NSExceptionName get name { - return _lib._objc_msgSend_32(_id, _lib._sel_name1); + DartNSExceptionName get name { + final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); + return NSString._(_ret, _lib, retain: true, release: true); } NSString? get reason { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_reason1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_reason1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_180(_id, _lib._sel_userInfo1); + final _ret = _lib._objc_msgSend_288(_id, _lib._sel_userInfo1); return _ret.address == 0 ? null : NSDictionary._(_ret, _lib, retain: true, release: true); } - NSArray? get callStackReturnAddresses { + NSArray get callStackReturnAddresses { final _ret = - _lib._objc_msgSend_162(_id, _lib._sel_callStackReturnAddresses1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + _lib._objc_msgSend_169(_id, _lib._sel_callStackReturnAddresses1); + return NSArray._(_ret, _lib, retain: true, release: true); } - NSArray? get callStackSymbols { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_callStackSymbols1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + NSArray get callStackSymbols { + final _ret = _lib._objc_msgSend_169(_id, _lib._sel_callStackSymbols1); + return NSArray._(_ret, _lib, retain: true, release: true); } void raise() { - return _lib._objc_msgSend_1(_id, _lib._sel_raise1); + _lib._objc_msgSend_1(_id, _lib._sel_raise1); } static void raise_format_( - NativeCupertinoHttp _lib, NSExceptionName name, NSString? format) { - return _lib._objc_msgSend_397(_lib._class_NSException1, - _lib._sel_raise_format_1, name, format?._id ?? ffi.nullptr); + NativeCupertinoHttp _lib, DartNSExceptionName name, NSString format) { + _lib._objc_msgSend_427(_lib._class_NSException1, _lib._sel_raise_format_1, + name._id, format._id); } static void raise_format_arguments_(NativeCupertinoHttp _lib, - NSExceptionName name, NSString? format, va_list argList) { - return _lib._objc_msgSend_488( - _lib._class_NSException1, - _lib._sel_raise_format_arguments_1, - name, - format?._id ?? ffi.nullptr, - argList); + DartNSExceptionName name, NSString format, va_list argList) { + _lib._objc_msgSend_525(_lib._class_NSException1, + _lib._sel_raise_format_arguments_1, name._id, format._id, argList); + } + + @override + NSException init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSException._(_ret, _lib, retain: true, release: true); } static NSException new1(NativeCupertinoHttp _lib) { @@ -84512,6 +89503,13 @@ class NSException extends NSObject { return NSException._(_ret, _lib, retain: false, release: true); } + static NSException allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSException1, _lib._sel_allocWithZone_1, zone); + return NSException._(_ret, _lib, retain: false, release: true); + } + static NSException alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); @@ -84546,47 +89544,61 @@ class NSAssertionHandler extends NSObject { obj._lib._class_NSAssertionHandler1); } - static NSAssertionHandler? getCurrentHandler(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_489( + static NSAssertionHandler getCurrentHandler(NativeCupertinoHttp _lib) { + final _ret = _lib._objc_msgSend_526( _lib._class_NSAssertionHandler1, _lib._sel_currentHandler1); - return _ret.address == 0 - ? null - : NSAssertionHandler._(_ret, _lib, retain: true, release: true); + return NSAssertionHandler._(_ret, _lib, retain: true, release: true); } void handleFailureInMethod_object_file_lineNumber_description_( ffi.Pointer selector, NSObject object, - NSString? fileName, - int line, + NSString fileName, + DartNSInteger line, NSString? format) { - return _lib._objc_msgSend_490( + _lib._objc_msgSend_527( _id, _lib._sel_handleFailureInMethod_object_file_lineNumber_description_1, selector, object._id, - fileName?._id ?? ffi.nullptr, + fileName._id, line, format?._id ?? ffi.nullptr); } void handleFailureInFunction_file_lineNumber_description_( - NSString? functionName, NSString? fileName, int line, NSString? format) { - return _lib._objc_msgSend_491( + NSString functionName, + NSString fileName, + DartNSInteger line, + NSString? format) { + _lib._objc_msgSend_528( _id, _lib._sel_handleFailureInFunction_file_lineNumber_description_1, - functionName?._id ?? ffi.nullptr, - fileName?._id ?? ffi.nullptr, + functionName._id, + fileName._id, line, format?._id ?? ffi.nullptr); } + @override + NSAssertionHandler init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSAssertionHandler._(_ret, _lib, retain: true, release: true); + } + static NSAssertionHandler new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_new1); return NSAssertionHandler._(_ret, _lib, retain: false, release: true); } + static NSAssertionHandler allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSAssertionHandler1, _lib._sel_allocWithZone_1, zone); + return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + } + static NSAssertionHandler alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_alloc1); @@ -84619,22 +89631,25 @@ class NSBlockOperation extends NSOperation { } static NSBlockOperation blockOperationWithBlock_( - NativeCupertinoHttp _lib, ObjCBlock block) { - final _ret = _lib._objc_msgSend_492(_lib._class_NSBlockOperation1, + NativeCupertinoHttp _lib, ObjCBlock_ffiVoid block) { + final _ret = _lib._objc_msgSend_529(_lib._class_NSBlockOperation1, _lib._sel_blockOperationWithBlock_1, block._id); return NSBlockOperation._(_ret, _lib, retain: true, release: true); } - void addExecutionBlock_(ObjCBlock block) { - return _lib._objc_msgSend_387( - _id, _lib._sel_addExecutionBlock_1, block._id); + void addExecutionBlock_(ObjCBlock_ffiVoid block) { + _lib._objc_msgSend_415(_id, _lib._sel_addExecutionBlock_1, block._id); } - NSArray? get executionBlocks { - final _ret = _lib._objc_msgSend_162(_id, _lib._sel_executionBlocks1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + NSArray get executionBlocks { + final _ret = _lib._objc_msgSend_169(_id, _lib._sel_executionBlocks1); + return NSArray._(_ret, _lib, retain: true, release: true); + } + + @override + NSBlockOperation init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSBlockOperation._(_ret, _lib, retain: true, release: true); } static NSBlockOperation new1(NativeCupertinoHttp _lib) { @@ -84643,6 +89658,13 @@ class NSBlockOperation extends NSOperation { return NSBlockOperation._(_ret, _lib, retain: false, release: true); } + static NSBlockOperation allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSBlockOperation1, _lib._sel_allocWithZone_1, zone); + return NSBlockOperation._(_ret, _lib, retain: false, release: true); + } + static NSBlockOperation alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_alloc1); @@ -84675,29 +89697,41 @@ class NSInvocationOperation extends NSOperation { obj._lib._class_NSInvocationOperation1); } - NSInvocationOperation initWithTarget_selector_object_( - NSObject target, ffi.Pointer sel, NSObject arg) { - final _ret = _lib._objc_msgSend_493(_id, - _lib._sel_initWithTarget_selector_object_1, target._id, sel, arg._id); - return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + NSInvocationOperation? initWithTarget_selector_object_( + NSObject target, ffi.Pointer sel, NSObject? arg) { + final _ret = _lib._objc_msgSend_530( + _id, + _lib._sel_initWithTarget_selector_object_1, + target._id, + sel, + arg?._id ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSInvocationOperation._(_ret, _lib, retain: true, release: true); } - NSInvocationOperation initWithInvocation_(NSInvocation? inv) { - final _ret = _lib._objc_msgSend_494( - _id, _lib._sel_initWithInvocation_1, inv?._id ?? ffi.nullptr); + NSInvocationOperation initWithInvocation_(NSInvocation inv) { + final _ret = + _lib._objc_msgSend_531(_id, _lib._sel_initWithInvocation_1, inv._id); return NSInvocationOperation._(_ret, _lib, retain: true, release: true); } - NSInvocation? get invocation { - final _ret = _lib._objc_msgSend_495(_id, _lib._sel_invocation1); + NSInvocation get invocation { + final _ret = _lib._objc_msgSend_532(_id, _lib._sel_invocation1); + return NSInvocation._(_ret, _lib, retain: true, release: true); + } + + NSObject? get result { + final _ret = _lib._objc_msgSend_61(_id, _lib._sel_result1); return _ret.address == 0 ? null - : NSInvocation._(_ret, _lib, retain: true, release: true); + : NSObject._(_ret, _lib, retain: true, release: true); } - NSObject get result { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_result1); - return NSObject._(_ret, _lib, retain: true, release: true); + @override + NSInvocationOperation init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return NSInvocationOperation._(_ret, _lib, retain: true, release: true); } static NSInvocationOperation new1(NativeCupertinoHttp _lib) { @@ -84706,6 +89740,13 @@ class NSInvocationOperation extends NSOperation { return NSInvocationOperation._(_ret, _lib, retain: false, release: true); } + static NSInvocationOperation allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_NSInvocationOperation1, _lib._sel_allocWithZone_1, zone); + return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + } + static NSInvocationOperation alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_NSInvocationOperation1, _lib._sel_alloc1); @@ -84727,10 +89768,12 @@ typedef Dart_WeakPersistentHandle = ffi.Pointer<_Dart_WeakPersistentHandle>; /// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the /// version when changing this struct. -typedef Dart_HandleFinalizer = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer isolate_callback_data, - ffi.Pointer peer)>>; +typedef Dart_HandleFinalizer + = ffi.Pointer>; +typedef Dart_HandleFinalizerFunction = ffi.Void Function( + ffi.Pointer isolate_callback_data, ffi.Pointer peer); +typedef DartDart_HandleFinalizerFunction = void Function( + ffi.Pointer isolate_callback_data, ffi.Pointer peer); typedef Dart_FinalizableHandle = ffi.Pointer<_Dart_FinalizableHandle>; final class Dart_IsolateFlags extends ffi.Struct { @@ -84777,10 +89820,18 @@ final class Dart_CodeObserver extends ffi.Struct { /// lifecycle of a process. Clients of this function should record timestamps for /// these compilation events and when collecting PCs to disambiguate reused /// address ranges. -typedef Dart_OnNewCodeCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer observer, - ffi.Pointer name, ffi.UintPtr base, ffi.UintPtr size)>>; +typedef Dart_OnNewCodeCallback + = ffi.Pointer>; +typedef Dart_OnNewCodeCallbackFunction = ffi.Void Function( + ffi.Pointer observer, + ffi.Pointer name, + ffi.UintPtr base, + ffi.UintPtr size); +typedef DartDart_OnNewCodeCallbackFunction = void Function( + ffi.Pointer observer, + ffi.Pointer name, + int base, + int size); /// Describes how to initialize the VM. Used with Dart_Initialize. /// @@ -84893,16 +89944,16 @@ final class Dart_InitializeParams extends ffi.Struct { /// /// \return The embedder returns NULL if the creation and /// initialization was not successful and the isolate if successful. -typedef Dart_IsolateGroupCreateCallback = ffi.Pointer< - ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer script_uri, - ffi.Pointer main, - ffi.Pointer package_root, - ffi.Pointer package_config, - ffi.Pointer flags, - ffi.Pointer isolate_data, - ffi.Pointer> error)>>; +typedef Dart_IsolateGroupCreateCallback + = ffi.Pointer>; +typedef Dart_IsolateGroupCreateCallbackFunction = Dart_Isolate Function( + ffi.Pointer script_uri, + ffi.Pointer main, + ffi.Pointer package_root, + ffi.Pointer package_config, + ffi.Pointer flags, + ffi.Pointer isolate_data, + ffi.Pointer> error); /// An isolate is the unit of concurrency in Dart. Each isolate has /// its own memory and thread of control. No state is shared between @@ -84944,10 +89995,14 @@ typedef Dart_Isolate = ffi.Pointer<_Dart_Isolate>; /// /// \return The embedder returns true if the initialization was successful and /// false otherwise (in which case the VM will terminate the isolate). -typedef Dart_InitializeIsolateCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer> child_isolate_data, - ffi.Pointer> error)>>; +typedef Dart_InitializeIsolateCallback + = ffi.Pointer>; +typedef Dart_InitializeIsolateCallbackFunction = ffi.Bool Function( + ffi.Pointer> child_isolate_data, + ffi.Pointer> error); +typedef DartDart_InitializeIsolateCallbackFunction = bool Function( + ffi.Pointer> child_isolate_data, + ffi.Pointer> error); /// An isolate shutdown callback function. /// @@ -84962,10 +90017,14 @@ typedef Dart_InitializeIsolateCallback = ffi.Pointer< /// isolate group when it was created. /// \param isolate_data The same callback data which was passed to the isolate /// when it was created. -typedef Dart_IsolateShutdownCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data)>>; +typedef Dart_IsolateShutdownCallback + = ffi.Pointer>; +typedef Dart_IsolateShutdownCallbackFunction = ffi.Void Function( + ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data); +typedef DartDart_IsolateShutdownCallbackFunction = void Function( + ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data); /// An isolate cleanup callback function. /// @@ -84980,10 +90039,14 @@ typedef Dart_IsolateShutdownCallback = ffi.Pointer< /// isolate group when it was created. /// \param isolate_data The same callback data which was passed to the isolate /// when it was created. -typedef Dart_IsolateCleanupCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data)>>; +typedef Dart_IsolateCleanupCallback + = ffi.Pointer>; +typedef Dart_IsolateCleanupCallbackFunction = ffi.Void Function( + ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data); +typedef DartDart_IsolateCleanupCallbackFunction = void Function( + ffi.Pointer isolate_group_data, + ffi.Pointer isolate_data); /// An isolate group cleanup callback function. /// @@ -84995,9 +90058,12 @@ typedef Dart_IsolateCleanupCallback = ffi.Pointer< /// /// \param isolate_group_data The same callback data which was passed to the /// isolate group when it was created. -typedef Dart_IsolateGroupCleanupCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer isolate_group_data)>>; +typedef Dart_IsolateGroupCleanupCallback + = ffi.Pointer>; +typedef Dart_IsolateGroupCleanupCallbackFunction = ffi.Void Function( + ffi.Pointer isolate_group_data); +typedef DartDart_IsolateGroupCleanupCallbackFunction = void Function( + ffi.Pointer isolate_group_data); /// A thread death callback function. /// This callback, provided by the embedder, is called before a thread in the @@ -85005,7 +90071,9 @@ typedef Dart_IsolateGroupCleanupCallback = ffi.Pointer< /// This function could be used to dispose of native resources that /// are associated and attached to the thread, in order to avoid leaks. typedef Dart_ThreadExitCallback - = ffi.Pointer>; + = ffi.Pointer>; +typedef Dart_ThreadExitCallbackFunction = ffi.Void Function(); +typedef DartDart_ThreadExitCallbackFunction = void Function(); /// Callbacks provided by the embedder for file operations. If the /// embedder does not allow file operations these callbacks can be @@ -85031,25 +90099,42 @@ typedef Dart_ThreadExitCallback /// /// Dart_FileCloseCallback - Closes the opened file. /// \param stream Handle to the opened file. -typedef Dart_FileOpenCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer name, ffi.Bool write)>>; -typedef Dart_FileReadCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer> data, - ffi.Pointer file_length, - ffi.Pointer stream)>>; -typedef Dart_FileWriteCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer data, ffi.IntPtr length, - ffi.Pointer stream)>>; -typedef Dart_FileCloseCallback = ffi.Pointer< - ffi.NativeFunction stream)>>; -typedef Dart_EntropySource = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer buffer, ffi.IntPtr length)>>; +typedef Dart_FileOpenCallback + = ffi.Pointer>; +typedef Dart_FileOpenCallbackFunction = ffi.Pointer Function( + ffi.Pointer name, ffi.Bool write); +typedef DartDart_FileOpenCallbackFunction = ffi.Pointer Function( + ffi.Pointer name, bool write); +typedef Dart_FileReadCallback + = ffi.Pointer>; +typedef Dart_FileReadCallbackFunction = ffi.Void Function( + ffi.Pointer> data, + ffi.Pointer file_length, + ffi.Pointer stream); +typedef DartDart_FileReadCallbackFunction = void Function( + ffi.Pointer> data, + ffi.Pointer file_length, + ffi.Pointer stream); +typedef Dart_FileWriteCallback + = ffi.Pointer>; +typedef Dart_FileWriteCallbackFunction = ffi.Void Function( + ffi.Pointer data, + ffi.IntPtr length, + ffi.Pointer stream); +typedef DartDart_FileWriteCallbackFunction = void Function( + ffi.Pointer data, int length, ffi.Pointer stream); +typedef Dart_FileCloseCallback + = ffi.Pointer>; +typedef Dart_FileCloseCallbackFunction = ffi.Void Function( + ffi.Pointer stream); +typedef DartDart_FileCloseCallbackFunction = void Function( + ffi.Pointer stream); +typedef Dart_EntropySource + = ffi.Pointer>; +typedef Dart_EntropySourceFunction = ffi.Bool Function( + ffi.Pointer buffer, ffi.IntPtr length); +typedef DartDart_EntropySourceFunction = bool Function( + ffi.Pointer buffer, int length); /// Callback provided by the embedder that is used by the vmservice isolate /// to request the asset archive. The asset archive must be an uncompressed tar @@ -85060,7 +90145,9 @@ typedef Dart_EntropySource = ffi.Pointer< /// \return The embedder must return a handle to a Uint8List containing an /// uncompressed tar archive or null. typedef Dart_GetVMServiceAssetsArchive - = ffi.Pointer>; + = ffi.Pointer>; +typedef Dart_GetVMServiceAssetsArchiveFunction = ffi.Handle Function(); +typedef DartDart_GetVMServiceAssetsArchiveFunction = Object Function(); typedef Dart_IsolateGroup = ffi.Pointer<_Dart_IsolateGroup>; /// A message notification callback. @@ -85069,11 +90156,16 @@ typedef Dart_IsolateGroup = ffi.Pointer<_Dart_IsolateGroup>; /// mechanism for the delivery of inter-isolate messages. It is the /// responsibility of the embedder to call Dart_HandleMessage to /// process the message. -typedef Dart_MessageNotifyCallback = ffi - .Pointer>; +typedef Dart_MessageNotifyCallback + = ffi.Pointer>; +typedef Dart_MessageNotifyCallbackFunction = ffi.Void Function( + Dart_Isolate dest_isolate); +typedef DartDart_MessageNotifyCallbackFunction = void Function( + Dart_Isolate dest_isolate); /// A port is used to send or receive inter-isolate messages typedef Dart_Port = ffi.Int64; +typedef DartDart_Port = int; abstract class Dart_CoreType_Id { static const int Dart_CoreType_Dynamic = 0; @@ -85145,7 +90237,9 @@ typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; /// \return A valid handle to a string if the name exists in the /// current environment or Dart_Null() if not. typedef Dart_EnvironmentCallback - = ffi.Pointer>; + = ffi.Pointer>; +typedef Dart_EnvironmentCallbackFunction = ffi.Handle Function(ffi.Handle name); +typedef DartDart_EnvironmentCallbackFunction = Object Function(Object name); /// Native entry resolution callback. /// @@ -85170,14 +90264,22 @@ typedef Dart_EnvironmentCallback /// for the native function. /// /// See Dart_SetNativeResolver. -typedef Dart_NativeEntryResolver = ffi.Pointer< - ffi.NativeFunction< - Dart_NativeFunction Function(ffi.Handle name, ffi.Int num_of_arguments, - ffi.Pointer auto_setup_scope)>>; +typedef Dart_NativeEntryResolver + = ffi.Pointer>; +typedef Dart_NativeEntryResolverFunction = Dart_NativeFunction Function( + ffi.Handle name, + ffi.Int num_of_arguments, + ffi.Pointer auto_setup_scope); +typedef DartDart_NativeEntryResolverFunction = Dart_NativeFunction Function( + Object name, int num_of_arguments, ffi.Pointer auto_setup_scope); /// A native function. -typedef Dart_NativeFunction = ffi.Pointer< - ffi.NativeFunction>; +typedef Dart_NativeFunction + = ffi.Pointer>; +typedef Dart_NativeFunctionFunction = ffi.Void Function( + Dart_NativeArguments arguments); +typedef DartDart_NativeFunctionFunction = void Function( + Dart_NativeArguments arguments); /// Native entry symbol lookup callback. /// @@ -85192,17 +90294,20 @@ typedef Dart_NativeFunction = ffi.Pointer< /// \return A const UTF-8 string containing the symbol name or NULL. /// /// See Dart_SetNativeResolver. -typedef Dart_NativeEntrySymbol = ffi.Pointer< - ffi - .NativeFunction Function(Dart_NativeFunction nf)>>; +typedef Dart_NativeEntrySymbol + = ffi.Pointer>; +typedef Dart_NativeEntrySymbolFunction = ffi.Pointer Function( + Dart_NativeFunction nf); /// FFI Native C function pointer resolver callback. /// /// See Dart_SetFfiNativeResolver. -typedef Dart_FfiNativeResolver = ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer name, ffi.UintPtr args_n)>>; +typedef Dart_FfiNativeResolver + = ffi.Pointer>; +typedef Dart_FfiNativeResolverFunction = ffi.Pointer Function( + ffi.Pointer name, ffi.UintPtr args_n); +typedef DartDart_FfiNativeResolverFunction = ffi.Pointer Function( + ffi.Pointer name, int args_n); /// ===================== /// Scripts and Libraries @@ -85243,10 +90348,12 @@ abstract class Dart_LibraryTag { /// files into one intermediate file hence we don't use the source/import or /// script tags. The return value should be an error or a TypedData containing /// the kernel bytes. -typedef Dart_LibraryTagHandler = ffi.Pointer< - ffi.NativeFunction< - ffi.Handle Function(ffi.Int32 tag, - ffi.Handle library_or_package_map_url, ffi.Handle url)>>; +typedef Dart_LibraryTagHandler + = ffi.Pointer>; +typedef Dart_LibraryTagHandlerFunction = ffi.Handle Function( + ffi.Int32 tag, ffi.Handle library_or_package_map_url, ffi.Handle url); +typedef DartDart_LibraryTagHandlerFunction = Object Function( + int tag, Object library_or_package_map_url, Object url); /// Handles deferred loading requests. When this handler is invoked, it should /// eventually load the deferred loading unit with the given id and call @@ -85260,8 +90367,12 @@ typedef Dart_LibraryTagHandler = ffi.Pointer< /// implementations, which must propogate any unwind errors from /// Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler /// should return a non-error such as `Dart_Null()`. -typedef Dart_DeferredLoadHandler = ffi.Pointer< - ffi.NativeFunction>; +typedef Dart_DeferredLoadHandler + = ffi.Pointer>; +typedef Dart_DeferredLoadHandlerFunction = ffi.Handle Function( + ffi.IntPtr loading_unit_id); +typedef DartDart_DeferredLoadHandlerFunction = Object Function( + int loading_unit_id); /// TODO(33433): Remove kernel service from the embedding API. abstract class Dart_KernelCompilationStatus { @@ -85300,19 +90411,34 @@ final class Dart_SourceFile extends ffi.Struct { external ffi.Pointer source; } -typedef Dart_StreamingWriteCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer callback_data, - ffi.Pointer buffer, ffi.IntPtr size)>>; -typedef Dart_CreateLoadingUnitCallback = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer callback_data, - ffi.IntPtr loading_unit_id, - ffi.Pointer> write_callback_data, - ffi.Pointer> write_debug_callback_data)>>; -typedef Dart_StreamingCloseCallback = ffi.Pointer< - ffi.NativeFunction callback_data)>>; +typedef Dart_StreamingWriteCallback + = ffi.Pointer>; +typedef Dart_StreamingWriteCallbackFunction = ffi.Void Function( + ffi.Pointer callback_data, + ffi.Pointer buffer, + ffi.IntPtr size); +typedef DartDart_StreamingWriteCallbackFunction = void Function( + ffi.Pointer callback_data, + ffi.Pointer buffer, + int size); +typedef Dart_CreateLoadingUnitCallback + = ffi.Pointer>; +typedef Dart_CreateLoadingUnitCallbackFunction = ffi.Void Function( + ffi.Pointer callback_data, + ffi.IntPtr loading_unit_id, + ffi.Pointer> write_callback_data, + ffi.Pointer> write_debug_callback_data); +typedef DartDart_CreateLoadingUnitCallbackFunction = void Function( + ffi.Pointer callback_data, + int loading_unit_id, + ffi.Pointer> write_callback_data, + ffi.Pointer> write_debug_callback_data); +typedef Dart_StreamingCloseCallback + = ffi.Pointer>; +typedef Dart_StreamingCloseCallbackFunction = ffi.Void Function( + ffi.Pointer callback_data); +typedef DartDart_StreamingCloseCallbackFunction = void Function( + ffi.Pointer callback_data); /// A Dart_CObject is used for representing Dart objects as native C /// data outside the Dart heap. These objects are totally detached from @@ -85449,14 +90575,18 @@ typedef Dart_CObject = _Dart_CObject; /// lifetime of the message data is controlled by the caller. All the /// data references from the message are allocated by the caller and /// will be reclaimed when returning to it. -typedef Dart_NativeMessageHandler = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - Dart_Port dest_port_id, ffi.Pointer message)>>; -typedef Dart_PostCObject_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - Dart_Port_DL port_id, ffi.Pointer message)>>; +typedef Dart_NativeMessageHandler + = ffi.Pointer>; +typedef Dart_NativeMessageHandlerFunction = ffi.Void Function( + Dart_Port dest_port_id, ffi.Pointer message); +typedef DartDart_NativeMessageHandlerFunction = void Function( + DartDart_Port dest_port_id, ffi.Pointer message); +typedef Dart_PostCObject_Type + = ffi.Pointer>; +typedef Dart_PostCObject_TypeFunction = ffi.Bool Function( + Dart_Port_DL port_id, ffi.Pointer message); +typedef DartDart_PostCObject_TypeFunction = bool Function( + DartDart_Port_DL port_id, ffi.Pointer message); /// ============================================================================ /// IMPORTANT! Never update these signatures without properly updating @@ -85470,100 +90600,212 @@ typedef Dart_PostCObject_Type = ffi.Pointer< /// are typechecked nominally in C/C++, so they are not copied, instead a /// comment is added to their definition. typedef Dart_Port_DL = ffi.Int64; -typedef Dart_PostInteger_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(Dart_Port_DL port_id, ffi.Int64 message)>>; -typedef Dart_NewNativePort_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_Port_DL Function( - ffi.Pointer name, - Dart_NativeMessageHandler_DL handler, - ffi.Bool handle_concurrently)>>; -typedef Dart_NativeMessageHandler_DL = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - Dart_Port_DL dest_port_id, ffi.Pointer message)>>; -typedef Dart_CloseNativePort_Type = ffi.Pointer< - ffi.NativeFunction>; +typedef DartDart_Port_DL = int; +typedef Dart_PostInteger_Type + = ffi.Pointer>; +typedef Dart_PostInteger_TypeFunction = ffi.Bool Function( + Dart_Port_DL port_id, ffi.Int64 message); +typedef DartDart_PostInteger_TypeFunction = bool Function( + DartDart_Port_DL port_id, int message); +typedef Dart_NewNativePort_Type + = ffi.Pointer>; +typedef Dart_NewNativePort_TypeFunction = Dart_Port_DL Function( + ffi.Pointer name, + Dart_NativeMessageHandler_DL handler, + ffi.Bool handle_concurrently); +typedef DartDart_NewNativePort_TypeFunction = DartDart_Port_DL Function( + ffi.Pointer name, + Dart_NativeMessageHandler_DL handler, + bool handle_concurrently); +typedef Dart_NativeMessageHandler_DL + = ffi.Pointer>; +typedef Dart_NativeMessageHandler_DLFunction = ffi.Void Function( + Dart_Port_DL dest_port_id, ffi.Pointer message); +typedef DartDart_NativeMessageHandler_DLFunction = void Function( + DartDart_Port_DL dest_port_id, ffi.Pointer message); +typedef Dart_CloseNativePort_Type + = ffi.Pointer>; +typedef Dart_CloseNativePort_TypeFunction = ffi.Bool Function( + Dart_Port_DL native_port_id); +typedef DartDart_CloseNativePort_TypeFunction = bool Function( + DartDart_Port_DL native_port_id); typedef Dart_IsError_Type - = ffi.Pointer>; + = ffi.Pointer>; +typedef Dart_IsError_TypeFunction = ffi.Bool Function(ffi.Handle handle); +typedef DartDart_IsError_TypeFunction = bool Function(Object handle); typedef Dart_IsApiError_Type - = ffi.Pointer>; -typedef Dart_IsUnhandledExceptionError_Type - = ffi.Pointer>; + = ffi.Pointer>; +typedef Dart_IsApiError_TypeFunction = ffi.Bool Function(ffi.Handle handle); +typedef DartDart_IsApiError_TypeFunction = bool Function(Object handle); +typedef Dart_IsUnhandledExceptionError_Type = ffi + .Pointer>; +typedef Dart_IsUnhandledExceptionError_TypeFunction = ffi.Bool Function( + ffi.Handle handle); +typedef DartDart_IsUnhandledExceptionError_TypeFunction = bool Function( + Object handle); typedef Dart_IsCompilationError_Type - = ffi.Pointer>; + = ffi.Pointer>; +typedef Dart_IsCompilationError_TypeFunction = ffi.Bool Function( + ffi.Handle handle); +typedef DartDart_IsCompilationError_TypeFunction = bool Function(Object handle); typedef Dart_IsFatalError_Type - = ffi.Pointer>; -typedef Dart_GetError_Type = ffi.Pointer< - ffi.NativeFunction Function(ffi.Handle handle)>>; + = ffi.Pointer>; +typedef Dart_IsFatalError_TypeFunction = ffi.Bool Function(ffi.Handle handle); +typedef DartDart_IsFatalError_TypeFunction = bool Function(Object handle); +typedef Dart_GetError_Type + = ffi.Pointer>; +typedef Dart_GetError_TypeFunction = ffi.Pointer Function( + ffi.Handle handle); +typedef DartDart_GetError_TypeFunction = ffi.Pointer Function( + Object handle); typedef Dart_ErrorHasException_Type - = ffi.Pointer>; + = ffi.Pointer>; +typedef Dart_ErrorHasException_TypeFunction = ffi.Bool Function( + ffi.Handle handle); +typedef DartDart_ErrorHasException_TypeFunction = bool Function(Object handle); typedef Dart_ErrorGetException_Type - = ffi.Pointer>; + = ffi.Pointer>; +typedef Dart_ErrorGetException_TypeFunction = ffi.Handle Function( + ffi.Handle handle); +typedef DartDart_ErrorGetException_TypeFunction = Object Function( + Object handle); typedef Dart_ErrorGetStackTrace_Type - = ffi.Pointer>; -typedef Dart_NewApiError_Type = ffi.Pointer< - ffi.NativeFunction error)>>; -typedef Dart_NewCompilationError_Type = ffi.Pointer< - ffi.NativeFunction error)>>; + = ffi.Pointer>; +typedef Dart_ErrorGetStackTrace_TypeFunction = ffi.Handle Function( + ffi.Handle handle); +typedef DartDart_ErrorGetStackTrace_TypeFunction = Object Function( + Object handle); +typedef Dart_NewApiError_Type + = ffi.Pointer>; +typedef Dart_NewApiError_TypeFunction = ffi.Handle Function( + ffi.Pointer error); +typedef DartDart_NewApiError_TypeFunction = Object Function( + ffi.Pointer error); +typedef Dart_NewCompilationError_Type + = ffi.Pointer>; +typedef Dart_NewCompilationError_TypeFunction = ffi.Handle Function( + ffi.Pointer error); +typedef DartDart_NewCompilationError_TypeFunction = Object Function( + ffi.Pointer error); typedef Dart_NewUnhandledExceptionError_Type = ffi - .Pointer>; + .Pointer>; +typedef Dart_NewUnhandledExceptionError_TypeFunction = ffi.Handle Function( + ffi.Handle exception); +typedef DartDart_NewUnhandledExceptionError_TypeFunction = Object Function( + Object exception); typedef Dart_PropagateError_Type - = ffi.Pointer>; + = ffi.Pointer>; +typedef Dart_PropagateError_TypeFunction = ffi.Void Function(ffi.Handle handle); +typedef DartDart_PropagateError_TypeFunction = void Function(Object handle); typedef Dart_HandleFromPersistent_Type - = ffi.Pointer>; -typedef Dart_HandleFromWeakPersistent_Type = ffi.Pointer< - ffi.NativeFunction>; + = ffi.Pointer>; +typedef Dart_HandleFromPersistent_TypeFunction = ffi.Handle Function( + ffi.Handle object); +typedef DartDart_HandleFromPersistent_TypeFunction = Object Function( + Object object); +typedef Dart_HandleFromWeakPersistent_Type = ffi + .Pointer>; +typedef Dart_HandleFromWeakPersistent_TypeFunction = ffi.Handle Function( + Dart_WeakPersistentHandle object); +typedef DartDart_HandleFromWeakPersistent_TypeFunction = Object Function( + Dart_WeakPersistentHandle object); typedef Dart_NewPersistentHandle_Type - = ffi.Pointer>; -typedef Dart_SetPersistentHandle_Type = ffi.Pointer< - ffi.NativeFunction>; + = ffi.Pointer>; +typedef Dart_NewPersistentHandle_TypeFunction = ffi.Handle Function( + ffi.Handle object); +typedef DartDart_NewPersistentHandle_TypeFunction = Object Function( + Object object); +typedef Dart_SetPersistentHandle_Type + = ffi.Pointer>; +typedef Dart_SetPersistentHandle_TypeFunction = ffi.Void Function( + ffi.Handle obj1, ffi.Handle obj2); +typedef DartDart_SetPersistentHandle_TypeFunction = void Function( + Object obj1, Object obj2); typedef Dart_DeletePersistentHandle_Type - = ffi.Pointer>; -typedef Dart_NewWeakPersistentHandle_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_WeakPersistentHandle Function( - ffi.Handle object, - ffi.Pointer peer, - ffi.IntPtr external_allocation_size, - Dart_HandleFinalizer callback)>>; -typedef Dart_DeleteWeakPersistentHandle_Type = ffi.Pointer< - ffi.NativeFunction>; -typedef Dart_UpdateExternalSize_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(Dart_WeakPersistentHandle object, - ffi.IntPtr external_allocation_size)>>; -typedef Dart_NewFinalizableHandle_Type = ffi.Pointer< - ffi.NativeFunction< - Dart_FinalizableHandle Function( - ffi.Handle object, - ffi.Pointer peer, - ffi.IntPtr external_allocation_size, - Dart_HandleFinalizer callback)>>; -typedef Dart_DeleteFinalizableHandle_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - Dart_FinalizableHandle object, ffi.Handle strong_ref_to_object)>>; + = ffi.Pointer>; +typedef Dart_DeletePersistentHandle_TypeFunction = ffi.Void Function( + ffi.Handle object); +typedef DartDart_DeletePersistentHandle_TypeFunction = void Function( + Object object); +typedef Dart_NewWeakPersistentHandle_Type = ffi + .Pointer>; +typedef Dart_NewWeakPersistentHandle_TypeFunction + = Dart_WeakPersistentHandle Function( + ffi.Handle object, + ffi.Pointer peer, + ffi.IntPtr external_allocation_size, + Dart_HandleFinalizer callback); +typedef DartDart_NewWeakPersistentHandle_TypeFunction + = Dart_WeakPersistentHandle Function( + Object object, + ffi.Pointer peer, + int external_allocation_size, + Dart_HandleFinalizer callback); +typedef Dart_DeleteWeakPersistentHandle_Type = ffi + .Pointer>; +typedef Dart_DeleteWeakPersistentHandle_TypeFunction = ffi.Void Function( + Dart_WeakPersistentHandle object); +typedef DartDart_DeleteWeakPersistentHandle_TypeFunction = void Function( + Dart_WeakPersistentHandle object); +typedef Dart_UpdateExternalSize_Type + = ffi.Pointer>; +typedef Dart_UpdateExternalSize_TypeFunction = ffi.Void Function( + Dart_WeakPersistentHandle object, ffi.IntPtr external_allocation_size); +typedef DartDart_UpdateExternalSize_TypeFunction = void Function( + Dart_WeakPersistentHandle object, int external_allocation_size); +typedef Dart_NewFinalizableHandle_Type + = ffi.Pointer>; +typedef Dart_NewFinalizableHandle_TypeFunction + = Dart_FinalizableHandle Function( + ffi.Handle object, + ffi.Pointer peer, + ffi.IntPtr external_allocation_size, + Dart_HandleFinalizer callback); +typedef DartDart_NewFinalizableHandle_TypeFunction + = Dart_FinalizableHandle Function(Object object, ffi.Pointer peer, + int external_allocation_size, Dart_HandleFinalizer callback); +typedef Dart_DeleteFinalizableHandle_Type = ffi + .Pointer>; +typedef Dart_DeleteFinalizableHandle_TypeFunction = ffi.Void Function( + Dart_FinalizableHandle object, ffi.Handle strong_ref_to_object); +typedef DartDart_DeleteFinalizableHandle_TypeFunction = void Function( + Dart_FinalizableHandle object, Object strong_ref_to_object); typedef Dart_UpdateFinalizableExternalSize_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - Dart_FinalizableHandle object, - ffi.Handle strong_ref_to_object, - ffi.IntPtr external_allocation_size)>>; -typedef Dart_Post_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(Dart_Port_DL port_id, ffi.Handle object)>>; -typedef Dart_NewSendPort_Type = ffi - .Pointer>; -typedef Dart_SendPortGetId_Type = ffi.Pointer< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle port, ffi.Pointer port_id)>>; + ffi.NativeFunction>; +typedef Dart_UpdateFinalizableExternalSize_TypeFunction = ffi.Void Function( + Dart_FinalizableHandle object, + ffi.Handle strong_ref_to_object, + ffi.IntPtr external_allocation_size); +typedef DartDart_UpdateFinalizableExternalSize_TypeFunction = void Function( + Dart_FinalizableHandle object, + Object strong_ref_to_object, + int external_allocation_size); +typedef Dart_Post_Type + = ffi.Pointer>; +typedef Dart_Post_TypeFunction = ffi.Bool Function( + Dart_Port_DL port_id, ffi.Handle object); +typedef DartDart_Post_TypeFunction = bool Function( + DartDart_Port_DL port_id, Object object); +typedef Dart_NewSendPort_Type + = ffi.Pointer>; +typedef Dart_NewSendPort_TypeFunction = ffi.Handle Function( + Dart_Port_DL port_id); +typedef DartDart_NewSendPort_TypeFunction = Object Function( + DartDart_Port_DL port_id); +typedef Dart_SendPortGetId_Type + = ffi.Pointer>; +typedef Dart_SendPortGetId_TypeFunction = ffi.Handle Function( + ffi.Handle port, ffi.Pointer port_id); +typedef DartDart_SendPortGetId_TypeFunction = Object Function( + Object port, ffi.Pointer port_id); typedef Dart_EnterScope_Type - = ffi.Pointer>; + = ffi.Pointer>; +typedef Dart_EnterScope_TypeFunction = ffi.Void Function(); +typedef DartDart_EnterScope_TypeFunction = void Function(); typedef Dart_ExitScope_Type - = ffi.Pointer>; + = ffi.Pointer>; +typedef Dart_ExitScope_TypeFunction = ffi.Void Function(); +typedef DartDart_ExitScope_TypeFunction = void Function(); /// The type of message being sent to a Dart port. See CUPHTTPClientDelegate. abstract class MessageType { @@ -85604,14 +90846,20 @@ class CUPHTTPTaskConfiguration extends NSObject { obj._lib._class_CUPHTTPTaskConfiguration1); } - NSObject initWithPort_(int sendPort) { + NSObject initWithPort_(DartDart_Port sendPort) { final _ret = - _lib._objc_msgSend_496(_id, _lib._sel_initWithPort_1, sendPort); + _lib._objc_msgSend_533(_id, _lib._sel_initWithPort_1, sendPort); return NSObject._(_ret, _lib, retain: true, release: true); } - int get sendPort { - return _lib._objc_msgSend_358(_id, _lib._sel_sendPort1); + DartDart_Port get sendPort { + return _lib._objc_msgSend_383(_id, _lib._sel_sendPort1); + } + + @override + CUPHTTPTaskConfiguration init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return CUPHTTPTaskConfiguration._(_ret, _lib, retain: true, release: true); } static CUPHTTPTaskConfiguration new1(NativeCupertinoHttp _lib) { @@ -85620,6 +90868,13 @@ class CUPHTTPTaskConfiguration extends NSObject { return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); } + static CUPHTTPTaskConfiguration allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_allocWithZone_1, zone); + return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); + } + static CUPHTTPTaskConfiguration alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_alloc1); @@ -85672,12 +90927,15 @@ class CUPHTTPClientDelegate extends NSObject { /// Instruct the delegate to forward events for the given task to the port /// specified in the configuration. void registerTask_withConfiguration_( - NSURLSessionTask? task, CUPHTTPTaskConfiguration? config) { - return _lib._objc_msgSend_497( - _id, - _lib._sel_registerTask_withConfiguration_1, - task?._id ?? ffi.nullptr, - config?._id ?? ffi.nullptr); + NSURLSessionTask task, CUPHTTPTaskConfiguration config) { + _lib._objc_msgSend_534( + _id, _lib._sel_registerTask_withConfiguration_1, task._id, config._id); + } + + @override + CUPHTTPClientDelegate init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return CUPHTTPClientDelegate._(_ret, _lib, retain: true, release: true); } static CUPHTTPClientDelegate new1(NativeCupertinoHttp _lib) { @@ -85686,6 +90944,13 @@ class CUPHTTPClientDelegate extends NSObject { return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); } + static CUPHTTPClientDelegate allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_CUPHTTPClientDelegate1, _lib._sel_allocWithZone_1, zone); + return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); + } + static CUPHTTPClientDelegate alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPClientDelegate1, _lib._sel_alloc1); @@ -85730,38 +90995,37 @@ class CUPHTTPForwardedDelegate extends NSObject { obj._lib._class_CUPHTTPForwardedDelegate1); } - NSObject initWithSession_task_( - NSURLSession? session, NSURLSessionTask? task) { - final _ret = _lib._objc_msgSend_498(_id, _lib._sel_initWithSession_task_1, - session?._id ?? ffi.nullptr, task?._id ?? ffi.nullptr); + NSObject initWithSession_task_(NSURLSession session, NSURLSessionTask task) { + final _ret = _lib._objc_msgSend_535( + _id, _lib._sel_initWithSession_task_1, session._id, task._id); return NSObject._(_ret, _lib, retain: true, release: true); } /// Indicates that the task should continue executing using the given request. void finish() { - return _lib._objc_msgSend_1(_id, _lib._sel_finish1); + _lib._objc_msgSend_1(_id, _lib._sel_finish1); } - NSURLSession? get session { - final _ret = _lib._objc_msgSend_408(_id, _lib._sel_session1); - return _ret.address == 0 - ? null - : NSURLSession._(_ret, _lib, retain: true, release: true); + NSURLSession get session { + final _ret = _lib._objc_msgSend_438(_id, _lib._sel_session1); + return NSURLSession._(_ret, _lib, retain: true, release: true); } - NSURLSessionTask? get task { - final _ret = _lib._objc_msgSend_499(_id, _lib._sel_task1); - return _ret.address == 0 - ? null - : NSURLSessionTask._(_ret, _lib, retain: true, release: true); + NSURLSessionTask get task { + final _ret = _lib._objc_msgSend_536(_id, _lib._sel_task1); + return NSURLSessionTask._(_ret, _lib, retain: true, release: true); } /// This property is meant to be used only by CUPHTTPClientDelegate. - NSLock? get lock { - final _ret = _lib._objc_msgSend_500(_id, _lib._sel_lock1); - return _ret.address == 0 - ? null - : NSLock._(_ret, _lib, retain: true, release: true); + NSLock get lock { + final _ret = _lib._objc_msgSend_537(_id, _lib._sel_lock1); + return NSLock._(_ret, _lib, retain: true, release: true); + } + + @override + CUPHTTPForwardedDelegate init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return CUPHTTPForwardedDelegate._(_ret, _lib, retain: true, release: true); } static CUPHTTPForwardedDelegate new1(NativeCupertinoHttp _lib) { @@ -85770,6 +91034,13 @@ class CUPHTTPForwardedDelegate extends NSObject { return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); } + static CUPHTTPForwardedDelegate allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_allocWithZone_1, zone); + return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); + } + static CUPHTTPForwardedDelegate alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_alloc1); @@ -85827,18 +91098,15 @@ class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { obj._lib._class_CUPHTTPForwardedRedirect1); } - NSObject initWithSession_task_response_request_( - NSURLSession? session, - NSURLSessionTask? task, - NSHTTPURLResponse? response, - NSURLRequest? request) { - final _ret = _lib._objc_msgSend_501( + NSObject initWithSession_task_response_request_(NSURLSession session, + NSURLSessionTask task, NSHTTPURLResponse response, NSURLRequest request) { + final _ret = _lib._objc_msgSend_538( _id, _lib._sel_initWithSession_task_response_request_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - response?._id ?? ffi.nullptr, - request?._id ?? ffi.nullptr); + session._id, + task._id, + response._id, + request._id); return NSObject._(_ret, _lib, retain: true, release: true); } @@ -85846,30 +91114,30 @@ class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { /// If the request is NIL then the redirect is not followed and the task is /// complete. void finishWithRequest_(NSURLRequest? request) { - return _lib._objc_msgSend_341( + _lib._objc_msgSend_539( _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); } - NSHTTPURLResponse? get response { - final _ret = _lib._objc_msgSend_502(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + NSHTTPURLResponse get response { + final _ret = _lib._objc_msgSend_540(_id, _lib._sel_response1); + return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); } - NSURLRequest? get request { - final _ret = _lib._objc_msgSend_350(_id, _lib._sel_request1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); + NSURLRequest get request { + final _ret = _lib._objc_msgSend_489(_id, _lib._sel_request1); + return NSURLRequest._(_ret, _lib, retain: true, release: true); } /// This property is meant to be used only by CUPHTTPClientDelegate. - NSURLRequest? get redirectRequest { - final _ret = _lib._objc_msgSend_350(_id, _lib._sel_redirectRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); + NSURLRequest get redirectRequest { + final _ret = _lib._objc_msgSend_489(_id, _lib._sel_redirectRequest1); + return NSURLRequest._(_ret, _lib, retain: true, release: true); + } + + @override + CUPHTTPForwardedRedirect init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return CUPHTTPForwardedRedirect._(_ret, _lib, retain: true, release: true); } static CUPHTTPForwardedRedirect new1(NativeCupertinoHttp _lib) { @@ -85878,6 +91146,13 @@ class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); } + static CUPHTTPForwardedRedirect allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_allocWithZone_1, zone); + return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); + } + static CUPHTTPForwardedRedirect alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_alloc1); @@ -85912,31 +91187,34 @@ class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { } NSObject initWithSession_task_response_( - NSURLSession? session, NSURLSessionTask? task, NSURLResponse? response) { - final _ret = _lib._objc_msgSend_503( + NSURLSession session, NSURLSessionTask task, NSURLResponse response) { + final _ret = _lib._objc_msgSend_541( _id, _lib._sel_initWithSession_task_response_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - response?._id ?? ffi.nullptr); + session._id, + task._id, + response._id); return NSObject._(_ret, _lib, retain: true, release: true); } void finishWithDisposition_(int disposition) { - return _lib._objc_msgSend_504( - _id, _lib._sel_finishWithDisposition_1, disposition); + _lib._objc_msgSend_542(_id, _lib._sel_finishWithDisposition_1, disposition); } - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_318(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); + NSURLResponse get response { + final _ret = _lib._objc_msgSend_337(_id, _lib._sel_response1); + return NSURLResponse._(_ret, _lib, retain: true, release: true); } /// This property is meant to be used only by CUPHTTPClientDelegate. int get disposition { - return _lib._objc_msgSend_505(_id, _lib._sel_disposition1); + return _lib._objc_msgSend_543(_id, _lib._sel_disposition1); + } + + @override + CUPHTTPForwardedResponse init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return CUPHTTPForwardedResponse._(_ret, _lib, retain: true, release: true); } static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { @@ -85945,6 +91223,13 @@ class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); } + static CUPHTTPForwardedResponse allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_CUPHTTPForwardedResponse1, _lib._sel_allocWithZone_1, zone); + return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + } + static CUPHTTPForwardedResponse alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPForwardedResponse1, _lib._sel_alloc1); @@ -85977,21 +91262,21 @@ class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { } NSObject initWithSession_task_data_( - NSURLSession? session, NSURLSessionTask? task, NSData? data) { - final _ret = _lib._objc_msgSend_506( - _id, - _lib._sel_initWithSession_task_data_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, - data?._id ?? ffi.nullptr); + NSURLSession session, NSURLSessionTask task, NSData data) { + final _ret = _lib._objc_msgSend_544(_id, + _lib._sel_initWithSession_task_data_1, session._id, task._id, data._id); return NSObject._(_ret, _lib, retain: true, release: true); } - NSData? get data { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_data1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + NSData get data { + final _ret = _lib._objc_msgSend_54(_id, _lib._sel_data1); + return NSData._(_ret, _lib, retain: true, release: true); + } + + @override + CUPHTTPForwardedData init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return CUPHTTPForwardedData._(_ret, _lib, retain: true, release: true); } static CUPHTTPForwardedData new1(NativeCupertinoHttp _lib) { @@ -86000,6 +91285,13 @@ class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); } + static CUPHTTPForwardedData allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_CUPHTTPForwardedData1, _lib._sel_allocWithZone_1, zone); + return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); + } + static CUPHTTPForwardedData alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPForwardedData1, _lib._sel_alloc1); @@ -86034,29 +91326,42 @@ class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { } NSObject initWithSession_task_error_( - NSURLSession? session, NSURLSessionTask? task, NSError? error) { - final _ret = _lib._objc_msgSend_507( + NSURLSession session, NSURLSessionTask task, NSError? error) { + final _ret = _lib._objc_msgSend_545( _id, _lib._sel_initWithSession_task_error_1, - session?._id ?? ffi.nullptr, - task?._id ?? ffi.nullptr, + session._id, + task._id, error?._id ?? ffi.nullptr); return NSObject._(_ret, _lib, retain: true, release: true); } NSError? get error { - final _ret = _lib._objc_msgSend_331(_id, _lib._sel_error1); + final _ret = _lib._objc_msgSend_353(_id, _lib._sel_error1); return _ret.address == 0 ? null : NSError._(_ret, _lib, retain: true, release: true); } + @override + CUPHTTPForwardedComplete init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return CUPHTTPForwardedComplete._(_ret, _lib, retain: true, release: true); + } + static CUPHTTPForwardedComplete new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPForwardedComplete1, _lib._sel_new1); return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); } + static CUPHTTPForwardedComplete allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_CUPHTTPForwardedComplete1, _lib._sel_allocWithZone_1, zone); + return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); + } + static CUPHTTPForwardedComplete alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPForwardedComplete1, _lib._sel_alloc1); @@ -86091,22 +91396,27 @@ class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { obj._lib._class_CUPHTTPForwardedFinishedDownloading1); } - NSObject initWithSession_downloadTask_url_(NSURLSession? session, - NSURLSessionDownloadTask? downloadTask, NSURL? location) { - final _ret = _lib._objc_msgSend_508( + NSObject initWithSession_downloadTask_url_(NSURLSession session, + NSURLSessionDownloadTask downloadTask, NSURL location) { + final _ret = _lib._objc_msgSend_546( _id, _lib._sel_initWithSession_downloadTask_url_1, - session?._id ?? ffi.nullptr, - downloadTask?._id ?? ffi.nullptr, - location?._id ?? ffi.nullptr); + session._id, + downloadTask._id, + location._id); return NSObject._(_ret, _lib, retain: true, release: true); } - NSURL? get location { - final _ret = _lib._objc_msgSend_52(_id, _lib._sel_location1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + NSURL get location { + final _ret = _lib._objc_msgSend_547(_id, _lib._sel_location1); + return NSURL._(_ret, _lib, retain: true, release: true); + } + + @override + CUPHTTPForwardedFinishedDownloading init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, + retain: true, release: true); } static CUPHTTPForwardedFinishedDownloading new1(NativeCupertinoHttp _lib) { @@ -86116,6 +91426,16 @@ class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { retain: false, release: true); } + static CUPHTTPForwardedFinishedDownloading allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_CUPHTTPForwardedFinishedDownloading1, + _lib._sel_allocWithZone_1, + zone); + return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, + retain: false, release: true); + } + static CUPHTTPForwardedFinishedDownloading alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_alloc1); @@ -86152,25 +91472,32 @@ class CUPHTTPForwardedWebSocketOpened extends CUPHTTPForwardedDelegate { } NSObject initWithSession_webSocketTask_didOpenWithProtocol_( - NSURLSession? session, - NSURLSessionWebSocketTask? webSocketTask, + NSURLSession session, + NSURLSessionWebSocketTask webSocketTask, NSString? protocol) { - final _ret = _lib._objc_msgSend_509( + final _ret = _lib._objc_msgSend_548( _id, _lib._sel_initWithSession_webSocketTask_didOpenWithProtocol_1, - session?._id ?? ffi.nullptr, - webSocketTask?._id ?? ffi.nullptr, + session._id, + webSocketTask._id, protocol?._id ?? ffi.nullptr); return NSObject._(_ret, _lib, retain: true, release: true); } NSString? get protocol { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_protocol1); + final _ret = _lib._objc_msgSend_55(_id, _lib._sel_protocol1); return _ret.address == 0 ? null : NSString._(_ret, _lib, retain: true, release: true); } + @override + CUPHTTPForwardedWebSocketOpened init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return CUPHTTPForwardedWebSocketOpened._(_ret, _lib, + retain: true, release: true); + } + static CUPHTTPForwardedWebSocketOpened new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPForwardedWebSocketOpened1, _lib._sel_new1); @@ -86178,6 +91505,16 @@ class CUPHTTPForwardedWebSocketOpened extends CUPHTTPForwardedDelegate { retain: false, release: true); } + static CUPHTTPForwardedWebSocketOpened allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_CUPHTTPForwardedWebSocketOpened1, + _lib._sel_allocWithZone_1, + zone); + return CUPHTTPForwardedWebSocketOpened._(_ret, _lib, + retain: false, release: true); + } + static CUPHTTPForwardedWebSocketOpened alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPForwardedWebSocketOpened1, _lib._sel_alloc1); @@ -86213,29 +91550,36 @@ class CUPHTTPForwardedWebSocketClosed extends CUPHTTPForwardedDelegate { obj._lib._class_CUPHTTPForwardedWebSocketClosed1); } - NSObject initWithSession_webSocketTask_code_reason_(NSURLSession? session, - NSURLSessionWebSocketTask? webSocketTask, int closeCode, NSData? reason) { - final _ret = _lib._objc_msgSend_510( + NSObject initWithSession_webSocketTask_code_reason_(NSURLSession session, + NSURLSessionWebSocketTask webSocketTask, int closeCode, NSData reason) { + final _ret = _lib._objc_msgSend_549( _id, _lib._sel_initWithSession_webSocketTask_code_reason_1, - session?._id ?? ffi.nullptr, - webSocketTask?._id ?? ffi.nullptr, + session._id, + webSocketTask._id, closeCode, - reason?._id ?? ffi.nullptr); + reason._id); return NSObject._(_ret, _lib, retain: true, release: true); } int get closeCode { - return _lib._objc_msgSend_443(_id, _lib._sel_closeCode1); + return _lib._objc_msgSend_477(_id, _lib._sel_closeCode1); } NSData? get reason { - final _ret = _lib._objc_msgSend_51(_id, _lib._sel_reason1); + final _ret = _lib._objc_msgSend_348(_id, _lib._sel_reason1); return _ret.address == 0 ? null : NSData._(_ret, _lib, retain: true, release: true); } + @override + CUPHTTPForwardedWebSocketClosed init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return CUPHTTPForwardedWebSocketClosed._(_ret, _lib, + retain: true, release: true); + } + static CUPHTTPForwardedWebSocketClosed new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPForwardedWebSocketClosed1, _lib._sel_new1); @@ -86243,6 +91587,16 @@ class CUPHTTPForwardedWebSocketClosed extends CUPHTTPForwardedDelegate { retain: false, release: true); } + static CUPHTTPForwardedWebSocketClosed allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_CUPHTTPForwardedWebSocketClosed1, + _lib._sel_allocWithZone_1, + zone); + return CUPHTTPForwardedWebSocketClosed._(_ret, _lib, + retain: false, release: true); + } + static CUPHTTPForwardedWebSocketClosed alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPForwardedWebSocketClosed1, _lib._sel_alloc1); @@ -86261,10 +91615,15 @@ abstract class NSStreamEvent { } typedef NSStreamSocketSecurityLevel = ffi.Pointer; +typedef DartNSStreamSocketSecurityLevel = NSString; typedef NSStreamSOCKSProxyConfiguration = ffi.Pointer; +typedef DartNSStreamSOCKSProxyConfiguration = NSString; typedef NSStreamSOCKSProxyVersion = ffi.Pointer; +typedef DartNSStreamSOCKSProxyVersion = NSString; typedef NSErrorDomain1 = ffi.Pointer; +typedef DartNSErrorDomain1 = NSString; typedef NSStreamNetworkServiceTypeValue = ffi.Pointer; +typedef DartNSStreamNetworkServiceTypeValue = NSString; /// A helper to convert a Dart Stream> into an Objective-C input stream. class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { @@ -86294,67 +91653,98 @@ class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { obj._lib._class_CUPHTTPStreamToNSInputStreamAdapter1); } - CUPHTTPStreamToNSInputStreamAdapter initWithPort_(int sendPort) { + CUPHTTPStreamToNSInputStreamAdapter initWithPort_(DartDart_Port sendPort) { final _ret = - _lib._objc_msgSend_496(_id, _lib._sel_initWithPort_1, sendPort); + _lib._objc_msgSend_533(_id, _lib._sel_initWithPort_1, sendPort); return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, retain: true, release: true); } - int addData_(NSData? data) { - return _lib._objc_msgSend_511( - _id, _lib._sel_addData_1, data?._id ?? ffi.nullptr); + DartNSUInteger addData_(NSData data) { + return _lib._objc_msgSend_550(_id, _lib._sel_addData_1, data._id); } void setDone() { - return _lib._objc_msgSend_1(_id, _lib._sel_setDone1); + _lib._objc_msgSend_1(_id, _lib._sel_setDone1); } - void setError_(NSError? error) { - return _lib._objc_msgSend_512( - _id, _lib._sel_setError_1, error?._id ?? ffi.nullptr); + void setError_(NSError error) { + _lib._objc_msgSend_551(_id, _lib._sel_setError_1, error._id); } - static CUPHTTPStreamToNSInputStreamAdapter inputStreamWithData_( - NativeCupertinoHttp _lib, NSData? data) { - final _ret = _lib._objc_msgSend_217( - _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, - _lib._sel_inputStreamWithData_1, - data?._id ?? ffi.nullptr); + @override + CUPHTTPStreamToNSInputStreamAdapter initWithData_(NSData data) { + final _ret = + _lib._objc_msgSend_228(_id, _lib._sel_initWithData_1, data._id); return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, retain: true, release: true); } - static CUPHTTPStreamToNSInputStreamAdapter inputStreamWithFileAtPath_( - NativeCupertinoHttp _lib, NSString? path) { - final _ret = _lib._objc_msgSend_42( + @override + CUPHTTPStreamToNSInputStreamAdapter? initWithURL_(NSURL url) { + final _ret = _lib._objc_msgSend_226(_id, _lib._sel_initWithURL_1, url._id); + return _ret.address == 0 + ? null + : CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: true, release: true); + } + + @override + CUPHTTPStreamToNSInputStreamAdapter? initWithFileAtPath_(NSString path) { + final _ret = + _lib._objc_msgSend_49(_id, _lib._sel_initWithFileAtPath_1, path._id); + return _ret.address == 0 + ? null + : CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: true, release: true); + } + + static CUPHTTPStreamToNSInputStreamAdapter? inputStreamWithData_( + NativeCupertinoHttp _lib, NSData data) { + final _ret = _lib._objc_msgSend_361( + _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, + _lib._sel_inputStreamWithData_1, + data._id); + return _ret.address == 0 + ? null + : CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: true, release: true); + } + + static CUPHTTPStreamToNSInputStreamAdapter? inputStreamWithFileAtPath_( + NativeCupertinoHttp _lib, NSString path) { + final _ret = _lib._objc_msgSend_49( _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_inputStreamWithFileAtPath_1, - path?._id ?? ffi.nullptr); - return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: true, release: true); + path._id); + return _ret.address == 0 + ? null + : CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: true, release: true); } - static CUPHTTPStreamToNSInputStreamAdapter inputStreamWithURL_( - NativeCupertinoHttp _lib, NSURL? url) { - final _ret = _lib._objc_msgSend_201( + static CUPHTTPStreamToNSInputStreamAdapter? inputStreamWithURL_( + NativeCupertinoHttp _lib, NSURL url) { + final _ret = _lib._objc_msgSend_226( _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_inputStreamWithURL_1, - url?._id ?? ffi.nullptr); - return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: true, release: true); + url._id); + return _ret.address == 0 + ? null + : CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: true, release: true); } static void getStreamsToHostWithName_port_inputStream_outputStream_( NativeCupertinoHttp _lib, - NSString? hostname, - int port, + NSString hostname, + DartNSInteger port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_334( + _lib._objc_msgSend_357( _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname?._id ?? ffi.nullptr, + hostname._id, port, inputStream, outputStream); @@ -86362,14 +91752,14 @@ class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { static void getStreamsToHost_port_inputStream_outputStream_( NativeCupertinoHttp _lib, - NSHost? host, - int port, + NSHost host, + DartNSInteger port, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_335( + _lib._objc_msgSend_358( _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host?._id ?? ffi.nullptr, + host._id, port, inputStream, outputStream); @@ -86377,10 +91767,10 @@ class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { static void getBoundStreamsWithBufferSize_inputStream_outputStream_( NativeCupertinoHttp _lib, - int bufferSize, + DartNSUInteger bufferSize, ffi.Pointer> inputStream, ffi.Pointer> outputStream) { - return _lib._objc_msgSend_336( + _lib._objc_msgSend_359( _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, bufferSize, @@ -86388,6 +91778,13 @@ class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { outputStream); } + @override + CUPHTTPStreamToNSInputStreamAdapter init() { + final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); + return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: true, release: true); + } + static CUPHTTPStreamToNSInputStreamAdapter new1(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_new1); @@ -86395,6 +91792,16 @@ class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { retain: false, release: true); } + static CUPHTTPStreamToNSInputStreamAdapter allocWithZone_( + NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { + final _ret = _lib._objc_msgSend_3( + _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, + _lib._sel_allocWithZone_1, + zone); + return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, + retain: false, release: true); + } + static CUPHTTPStreamToNSInputStreamAdapter alloc(NativeCupertinoHttp _lib) { final _ret = _lib._objc_msgSend_2( _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_alloc1); @@ -91113,90 +96520,22 @@ const int kNativeArgTypePos = 8; const int kNativeArgTypeSize = 8; -const int DYNAMIC_TARGETS_ENABLED = 0; - -const int TARGET_OS_MAC = 1; - -const int TARGET_OS_WIN32 = 0; - -const int TARGET_OS_WINDOWS = 0; - -const int TARGET_OS_UNIX = 0; - -const int TARGET_OS_LINUX = 0; - -const int TARGET_OS_OSX = 1; - -const int TARGET_OS_IPHONE = 0; - -const int TARGET_OS_IOS = 0; - -const int TARGET_OS_WATCH = 0; - -const int TARGET_OS_TV = 0; - -const int TARGET_OS_MACCATALYST = 0; - -const int TARGET_OS_UIKITFORMAC = 0; - -const int TARGET_OS_SIMULATOR = 0; - -const int TARGET_OS_EMBEDDED = 0; - -const int TARGET_OS_RTKIT = 0; - -const int TARGET_OS_DRIVERKIT = 0; - -const int TARGET_IPHONE_SIMULATOR = 0; - -const int TARGET_OS_NANO = 0; - -const int TARGET_ABI_USES_IOS_VALUES = 1; - -const int TARGET_CPU_PPC = 0; - -const int TARGET_CPU_PPC64 = 0; - -const int TARGET_CPU_68K = 0; - -const int TARGET_CPU_X86 = 0; - -const int TARGET_CPU_X86_64 = 0; - -const int TARGET_CPU_ARM = 0; - -const int TARGET_CPU_ARM64 = 1; - -const int TARGET_CPU_MIPS = 0; - -const int TARGET_CPU_SPARC = 0; - -const int TARGET_CPU_ALPHA = 0; - -const int TARGET_RT_MAC_CFM = 0; - -const int TARGET_RT_MAC_MACHO = 1; - -const int TARGET_RT_LITTLE_ENDIAN = 1; - -const int TARGET_RT_BIG_ENDIAN = 0; - -const int TARGET_RT_64_BIT = 1; - const int __API_TO_BE_DEPRECATED = 100000; const int __API_TO_BE_DEPRECATED_MACOS = 100000; const int __API_TO_BE_DEPRECATED_IOS = 100000; -const int __API_TO_BE_DEPRECATED_TVOS = 100000; +const int __API_TO_BE_DEPRECATED_MACCATALYST = 100000; const int __API_TO_BE_DEPRECATED_WATCHOS = 100000; -const int __API_TO_BE_DEPRECATED_MACCATALYST = 100000; +const int __API_TO_BE_DEPRECATED_TVOS = 100000; const int __API_TO_BE_DEPRECATED_DRIVERKIT = 100000; +const int __API_TO_BE_DEPRECATED_VISIONOS = 100000; + const int __MAC_10_0 = 1000; const int __MAC_10_1 = 1010; @@ -91253,6 +96592,8 @@ const int __MAC_10_14_1 = 101401; const int __MAC_10_14_4 = 101404; +const int __MAC_10_14_5 = 101405; + const int __MAC_10_14_6 = 101406; const int __MAC_10_15 = 101500; @@ -91283,6 +96624,14 @@ const int __MAC_12_2 = 120200; const int __MAC_12_3 = 120300; +const int __MAC_12_4 = 120400; + +const int __MAC_12_5 = 120500; + +const int __MAC_12_6 = 120600; + +const int __MAC_12_7 = 120700; + const int __MAC_13_0 = 130000; const int __MAC_13_1 = 130100; @@ -91291,6 +96640,18 @@ const int __MAC_13_2 = 130200; const int __MAC_13_3 = 130300; +const int __MAC_13_4 = 130400; + +const int __MAC_13_5 = 130500; + +const int __MAC_13_6 = 130600; + +const int __MAC_14_0 = 140000; + +const int __MAC_14_1 = 140100; + +const int __MAC_14_2 = 140200; + const int __IPHONE_2_0 = 20000; const int __IPHONE_2_1 = 20100; @@ -91395,6 +96756,8 @@ const int __IPHONE_14_3 = 140300; const int __IPHONE_14_5 = 140500; +const int __IPHONE_14_4 = 140400; + const int __IPHONE_14_6 = 140600; const int __IPHONE_14_7 = 140700; @@ -91411,6 +96774,10 @@ const int __IPHONE_15_3 = 150300; const int __IPHONE_15_4 = 150400; +const int __IPHONE_15_5 = 150500; + +const int __IPHONE_15_6 = 150600; + const int __IPHONE_16_0 = 160000; const int __IPHONE_16_1 = 160100; @@ -91421,81 +96788,17 @@ const int __IPHONE_16_3 = 160300; const int __IPHONE_16_4 = 160400; -const int __TVOS_9_0 = 90000; +const int __IPHONE_16_5 = 160500; -const int __TVOS_9_1 = 90100; +const int __IPHONE_16_6 = 160600; -const int __TVOS_9_2 = 90200; +const int __IPHONE_16_7 = 160700; -const int __TVOS_10_0 = 100000; +const int __IPHONE_17_0 = 170000; -const int __TVOS_10_0_1 = 100001; +const int __IPHONE_17_1 = 170100; -const int __TVOS_10_1 = 100100; - -const int __TVOS_10_2 = 100200; - -const int __TVOS_11_0 = 110000; - -const int __TVOS_11_1 = 110100; - -const int __TVOS_11_2 = 110200; - -const int __TVOS_11_3 = 110300; - -const int __TVOS_11_4 = 110400; - -const int __TVOS_12_0 = 120000; - -const int __TVOS_12_1 = 120100; - -const int __TVOS_12_2 = 120200; - -const int __TVOS_12_3 = 120300; - -const int __TVOS_12_4 = 120400; - -const int __TVOS_13_0 = 130000; - -const int __TVOS_13_2 = 130200; - -const int __TVOS_13_3 = 130300; - -const int __TVOS_13_4 = 130400; - -const int __TVOS_14_0 = 140000; - -const int __TVOS_14_1 = 140100; - -const int __TVOS_14_2 = 140200; - -const int __TVOS_14_3 = 140300; - -const int __TVOS_14_5 = 140500; - -const int __TVOS_14_6 = 140600; - -const int __TVOS_14_7 = 140700; - -const int __TVOS_15_0 = 150000; - -const int __TVOS_15_1 = 150100; - -const int __TVOS_15_2 = 150200; - -const int __TVOS_15_3 = 150300; - -const int __TVOS_15_4 = 150400; - -const int __TVOS_16_0 = 160000; - -const int __TVOS_16_1 = 160100; - -const int __TVOS_16_2 = 160200; - -const int __TVOS_16_3 = 160300; - -const int __TVOS_16_4 = 160400; +const int __IPHONE_17_2 = 170200; const int __WATCHOS_1_0 = 10000; @@ -91559,6 +96862,10 @@ const int __WATCHOS_8_4 = 80400; const int __WATCHOS_8_5 = 80500; +const int __WATCHOS_8_6 = 80600; + +const int __WATCHOS_8_7 = 80700; + const int __WATCHOS_9_0 = 90000; const int __WATCHOS_9_1 = 90100; @@ -91569,6 +96876,174 @@ const int __WATCHOS_9_3 = 90300; const int __WATCHOS_9_4 = 90400; +const int __WATCHOS_9_5 = 90500; + +const int __WATCHOS_9_6 = 90600; + +const int __WATCHOS_10_0 = 100000; + +const int __WATCHOS_10_1 = 100100; + +const int __WATCHOS_10_2 = 100200; + +const int __TVOS_9_0 = 90000; + +const int __TVOS_9_1 = 90100; + +const int __TVOS_9_2 = 90200; + +const int __TVOS_10_0 = 100000; + +const int __TVOS_10_0_1 = 100001; + +const int __TVOS_10_1 = 100100; + +const int __TVOS_10_2 = 100200; + +const int __TVOS_11_0 = 110000; + +const int __TVOS_11_1 = 110100; + +const int __TVOS_11_2 = 110200; + +const int __TVOS_11_3 = 110300; + +const int __TVOS_11_4 = 110400; + +const int __TVOS_12_0 = 120000; + +const int __TVOS_12_1 = 120100; + +const int __TVOS_12_2 = 120200; + +const int __TVOS_12_3 = 120300; + +const int __TVOS_12_4 = 120400; + +const int __TVOS_13_0 = 130000; + +const int __TVOS_13_2 = 130200; + +const int __TVOS_13_3 = 130300; + +const int __TVOS_13_4 = 130400; + +const int __TVOS_14_0 = 140000; + +const int __TVOS_14_1 = 140100; + +const int __TVOS_14_2 = 140200; + +const int __TVOS_14_3 = 140300; + +const int __TVOS_14_5 = 140500; + +const int __TVOS_14_6 = 140600; + +const int __TVOS_14_7 = 140700; + +const int __TVOS_15_0 = 150000; + +const int __TVOS_15_1 = 150100; + +const int __TVOS_15_2 = 150200; + +const int __TVOS_15_3 = 150300; + +const int __TVOS_15_4 = 150400; + +const int __TVOS_15_5 = 150500; + +const int __TVOS_15_6 = 150600; + +const int __TVOS_16_0 = 160000; + +const int __TVOS_16_1 = 160100; + +const int __TVOS_16_2 = 160200; + +const int __TVOS_16_3 = 160300; + +const int __TVOS_16_4 = 160400; + +const int __TVOS_16_5 = 160500; + +const int __TVOS_16_6 = 160600; + +const int __TVOS_17_0 = 170000; + +const int __TVOS_17_1 = 170100; + +const int __TVOS_17_2 = 170200; + +const int __BRIDGEOS_2_0 = 20000; + +const int __BRIDGEOS_3_0 = 30000; + +const int __BRIDGEOS_3_1 = 30100; + +const int __BRIDGEOS_3_4 = 30400; + +const int __BRIDGEOS_4_0 = 40000; + +const int __BRIDGEOS_4_1 = 40100; + +const int __BRIDGEOS_5_0 = 50000; + +const int __BRIDGEOS_5_1 = 50100; + +const int __BRIDGEOS_5_3 = 50300; + +const int __BRIDGEOS_6_0 = 60000; + +const int __BRIDGEOS_6_2 = 60200; + +const int __BRIDGEOS_6_4 = 60400; + +const int __BRIDGEOS_6_5 = 60500; + +const int __BRIDGEOS_6_6 = 60600; + +const int __BRIDGEOS_7_0 = 70000; + +const int __BRIDGEOS_7_1 = 70100; + +const int __BRIDGEOS_7_2 = 70200; + +const int __BRIDGEOS_7_3 = 70300; + +const int __BRIDGEOS_7_4 = 70400; + +const int __BRIDGEOS_7_6 = 70600; + +const int __BRIDGEOS_8_0 = 80000; + +const int __BRIDGEOS_8_1 = 80100; + +const int __BRIDGEOS_8_2 = 80200; + +const int __DRIVERKIT_19_0 = 190000; + +const int __DRIVERKIT_20_0 = 200000; + +const int __DRIVERKIT_21_0 = 210000; + +const int __DRIVERKIT_22_0 = 220000; + +const int __DRIVERKIT_22_4 = 220400; + +const int __DRIVERKIT_22_5 = 220500; + +const int __DRIVERKIT_22_6 = 220600; + +const int __DRIVERKIT_23_0 = 230000; + +const int __DRIVERKIT_23_1 = 230100; + +const int __DRIVERKIT_23_2 = 230200; + +const int __VISIONOS_1_0 = 10000; + const int MAC_OS_X_VERSION_10_0 = 1000; const int MAC_OS_X_VERSION_10_1 = 1010; @@ -91625,29 +97100,67 @@ const int MAC_OS_X_VERSION_10_14_1 = 101401; const int MAC_OS_X_VERSION_10_14_4 = 101404; +const int MAC_OS_X_VERSION_10_14_5 = 101405; + const int MAC_OS_X_VERSION_10_14_6 = 101406; const int MAC_OS_X_VERSION_10_15 = 101500; const int MAC_OS_X_VERSION_10_15_1 = 101501; +const int MAC_OS_X_VERSION_10_15_4 = 101504; + const int MAC_OS_X_VERSION_10_16 = 101600; const int MAC_OS_VERSION_11_0 = 110000; +const int MAC_OS_VERSION_11_1 = 110100; + +const int MAC_OS_VERSION_11_3 = 110300; + +const int MAC_OS_VERSION_11_4 = 110400; + +const int MAC_OS_VERSION_11_5 = 110500; + +const int MAC_OS_VERSION_11_6 = 110600; + const int MAC_OS_VERSION_12_0 = 120000; +const int MAC_OS_VERSION_12_1 = 120100; + +const int MAC_OS_VERSION_12_2 = 120200; + +const int MAC_OS_VERSION_12_3 = 120300; + +const int MAC_OS_VERSION_12_4 = 120400; + +const int MAC_OS_VERSION_12_5 = 120500; + +const int MAC_OS_VERSION_12_6 = 120600; + +const int MAC_OS_VERSION_12_7 = 120700; + const int MAC_OS_VERSION_13_0 = 130000; -const int __DRIVERKIT_19_0 = 190000; +const int MAC_OS_VERSION_13_1 = 130100; -const int __DRIVERKIT_20_0 = 200000; +const int MAC_OS_VERSION_13_2 = 130200; -const int __DRIVERKIT_21_0 = 210000; +const int MAC_OS_VERSION_13_3 = 130300; + +const int MAC_OS_VERSION_13_4 = 130400; -const int __MAC_OS_X_VERSION_MIN_REQUIRED = 130000; +const int MAC_OS_VERSION_13_5 = 130500; -const int __MAC_OS_X_VERSION_MAX_ALLOWED = 130300; +const int MAC_OS_VERSION_13_6 = 130600; + +const int MAC_OS_VERSION_14_0 = 140000; + +const int MAC_OS_VERSION_14_1 = 140100; + +const int MAC_OS_VERSION_14_2 = 140200; + +const int __MAC_OS_X_VERSION_MAX_ALLOWED = 140200; const int __ENABLE_LEGACY_MAC_AVAILABILITY = 1; @@ -92211,6 +97724,10 @@ const int IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT = 0; const int IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON = 1; +const int IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_DEFAULT = 0; + +const int IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_ON = 1; + const int WNOHANG = 1; const int WUNTRACED = 2; @@ -92259,6 +97776,78 @@ const int EXIT_SUCCESS = 0; const int RAND_MAX = 2147483647; +const int DYNAMIC_TARGETS_ENABLED = 0; + +const int TARGET_OS_WIN32 = 0; + +const int TARGET_OS_WINDOWS = 0; + +const int TARGET_OS_UNIX = 0; + +const int TARGET_OS_LINUX = 0; + +const int TARGET_OS_MAC = 1; + +const int TARGET_OS_OSX = 1; + +const int TARGET_OS_IPHONE = 0; + +const int TARGET_OS_IOS = 0; + +const int TARGET_OS_WATCH = 0; + +const int TARGET_OS_TV = 0; + +const int TARGET_OS_MACCATALYST = 0; + +const int TARGET_OS_VISION = 0; + +const int TARGET_OS_UIKITFORMAC = 0; + +const int TARGET_OS_SIMULATOR = 0; + +const int TARGET_OS_EMBEDDED = 0; + +const int TARGET_OS_RTKIT = 0; + +const int TARGET_OS_DRIVERKIT = 0; + +const int TARGET_IPHONE_SIMULATOR = 0; + +const int TARGET_OS_NANO = 0; + +const int TARGET_ABI_USES_IOS_VALUES = 1; + +const int TARGET_CPU_PPC = 0; + +const int TARGET_CPU_PPC64 = 0; + +const int TARGET_CPU_68K = 0; + +const int TARGET_CPU_X86 = 0; + +const int TARGET_CPU_X86_64 = 0; + +const int TARGET_CPU_ARM = 0; + +const int TARGET_CPU_ARM64 = 1; + +const int TARGET_CPU_MIPS = 0; + +const int TARGET_CPU_SPARC = 0; + +const int TARGET_CPU_ALPHA = 0; + +const int TARGET_RT_MAC_CFM = 0; + +const int TARGET_RT_MAC_MACHO = 1; + +const int TARGET_RT_LITTLE_ENDIAN = 1; + +const int TARGET_RT_BIG_ENDIAN = 0; + +const int TARGET_RT_64_BIT = 1; + const int __DARWIN_FD_SETSIZE = 1024; const int __DARWIN_NBBY = 8; @@ -92279,6 +97868,62 @@ const int false1 = 0; const int __GNUC_VA_LIST = 1; +const int __DARWIN_CLK_TCK = 100; + +const int MB_LEN_MAX = 6; + +const int CLK_TCK = 100; + +const int CHAR_BIT = 8; + +const int SCHAR_MAX = 127; + +const int SCHAR_MIN = -128; + +const int UCHAR_MAX = 255; + +const int CHAR_MAX = 127; + +const int CHAR_MIN = -128; + +const int USHRT_MAX = 65535; + +const int SHRT_MAX = 32767; + +const int SHRT_MIN = -32768; + +const int UINT_MAX = 4294967295; + +const int INT_MAX = 2147483647; + +const int INT_MIN = -2147483648; + +const int ULONG_MAX = -1; + +const int LONG_MAX = 9223372036854775807; + +const int LONG_MIN = -9223372036854775808; + +const int ULLONG_MAX = -1; + +const int LLONG_MAX = 9223372036854775807; + +const int LLONG_MIN = -9223372036854775808; + +const int LONG_BIT = 64; + +const int SSIZE_MAX = 9223372036854775807; + +const int WORD_BIT = 32; + +const int SIZE_T_MAX = -1; + +const int UQUAD_MAX = -1; + +const int QUAD_MAX = 9223372036854775807; + +const int QUAD_MIN = -9223372036854775808; + const int _POSIX_THREAD_KEYS_MAX = 128; const int API_TO_BE_DEPRECATED = 100000; @@ -92293,6 +97938,8 @@ const int API_TO_BE_DEPRECATED_WATCHOS = 100000; const int API_TO_BE_DEPRECATED_DRIVERKIT = 100000; +const int API_TO_BE_DEPRECATED_VISIONOS = 100000; + const int TRUE = 1; const int FALSE = 0; @@ -92313,6 +97960,10 @@ const int SEEK_CUR = 1; const int SEEK_END = 2; +const int SEEK_HOLE = 3; + +const int SEEK_DATA = 4; + const String __PRI_8_LENGTH_MODIFIER__ = 'hh'; const String __PRI_64_LENGTH_MODIFIER__ = 'll'; @@ -92731,6 +98382,8 @@ const int MACH_PORT_INFO_EXT = 7; const int MACH_PORT_GUARD_INFO = 8; +const int MACH_PORT_SERVICE_THROTTLED = 9; + const int MACH_PORT_LIMITS_INFO_COUNT = 1; const int MACH_PORT_RECEIVE_STATUS_COUNT = 10; @@ -92741,6 +98394,8 @@ const int MACH_PORT_INFO_EXT_COUNT = 17; const int MACH_PORT_GUARD_INFO_COUNT = 2; +const int MACH_PORT_SERVICE_THROTTLED_COUNT = 1; + const int MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN = 255; const int MACH_SERVICE_PORT_INFO_COUNT = 0; @@ -92775,6 +98430,8 @@ const int MPO_ENFORCE_REPLY_PORT_SEMANTICS = 8192; const int MPO_PROVISIONAL_REPLY_PORT = 16384; +const int MPO_PROVISIONAL_ID_PROT_OPTOUT = 32768; + const int GUARD_TYPE_MACH_PORT = 1; const int MAX_FATAL_kGUARD_EXC_CODE = 128; @@ -92849,10 +98506,6 @@ const int _CHOWN_OK = 2097152; const int _ACCESS_EXTENDED_MASK = 4193792; -const int SEEK_HOLE = 3; - -const int SEEK_DATA = 4; - const int L_SET = 0; const int L_INCR = 1; @@ -93623,6 +99276,14 @@ const int F_ADDFILESIGS_FOR_DYLD_SIM = 83; const int F_BARRIERFSYNC = 85; +const int F_OFD_SETLK = 90; + +const int F_OFD_SETLKW = 91; + +const int F_OFD_GETLK = 92; + +const int F_OFD_SETLKWTIMEOUT = 93; + const int F_ADDFILESIGS_RETURN = 97; const int F_CHECK_LV = 98; @@ -93647,6 +99308,8 @@ const int F_GETLEASE = 107; const int F_TRANSFEREXTENTS = 110; +const int F_ATTRIBUTION_TAG = 111; + const int FCNTL_FS_SPECIFIC_BASE = 65536; const int F_DUPFD_CLOEXEC = 67; @@ -93737,6 +99400,14 @@ const int LOCK_NB = 4; const int LOCK_UN = 8; +const int ATTRIBUTION_NAME_MAX = 255; + +const int F_CREATE_TAG = 1; + +const int F_DELETE_TAG = 2; + +const int F_QUERY_TAG = 4; + const int O_POPUP = 2147483648; const int O_ALERT = 536870912; @@ -93789,13 +99460,15 @@ const int TIME_ABSOLUTE = 0; const int TIME_RELATIVE = 1; +const int MSEC_PER_SEC = 1000; + const int DISPATCH_TIME_NOW = 0; const int DISPATCH_TIME_FOREVER = -1; const int QOS_MIN_RELATIVE_PRIORITY = -15; -const int DISPATCH_APPLY_AUTO_AVAILABLE = 1; +const int DISPATCH_APPLY_AUTO_AVAILABLE = 0; const int DISPATCH_QUEUE_PRIORITY_HIGH = 2; diff --git a/pkgs/cupertino_http/lib/src/utils.dart b/pkgs/cupertino_http/lib/src/utils.dart index 02fc5489b1..7bc87aa87c 100644 --- a/pkgs/cupertino_http/lib/src/utils.dart +++ b/pkgs/cupertino_http/lib/src/utils.dart @@ -66,12 +66,11 @@ Map stringNSDictionaryToMap(ncb.NSDictionary d) { // true types. final m = {}; - final keys = ncb.NSArray.castFrom(d.allKeys!); + final keys = ncb.NSArray.castFrom(d.allKeys); for (var i = 0; i < keys.count; ++i) { final nsKey = keys.objectAtIndex_(i); - final key = toStringOrNull(ncb.NSString.castFrom(nsKey))!; - final value = - toStringOrNull(ncb.NSString.castFrom(d.objectForKey_(nsKey)))!; + final key = ncb.NSString.castFrom(nsKey).toString(); + final value = ncb.NSString.castFrom(d.objectForKey_(nsKey)!).toString(); m[key] = value; } @@ -89,5 +88,5 @@ ncb.NSArray stringIterableToNSArray(Iterable strings) { return array; } -ncb.NSURL uriToNSURL(Uri uri) => - ncb.NSURL.URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs)); +ncb.NSURL uriToNSURL(Uri uri) => ncb.NSURL + .URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs))!; diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 12cdf94e62..7e9427bdec 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 1.4.0 +version: 1.4.1-wip description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. @@ -19,7 +19,7 @@ dependencies: dev_dependencies: dart_flutter_team_lints: ^2.0.0 - ffigen: ^9.0.1 + ffigen: ^11.0.0 flutter: plugin: diff --git a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m index b89b93c076..b0f2fb742c 100644 --- a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m +++ b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m @@ -185,7 +185,7 @@ - (void)URLSession:(NSURLSession *)session - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task -didCompleteWithError:(NSError *)error { +didCompleteWithError:(nullable NSError *)error { CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; NSAssert(config != nil, @"No configuration for task."); @@ -219,7 +219,7 @@ - (void)URLSession:(NSURLSession *)session - (void)URLSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)task -didOpenWithProtocol:(NSString *)protocol { +didOpenWithProtocol:(nullable NSString *)protocol { CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; NSAssert(config != nil, @"No configuration for task."); @@ -248,7 +248,7 @@ - (void)URLSession:(NSURLSession *)session - (void)URLSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)task didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode - reason:(NSData *)reason { + reason:(nullable NSData *)reason { CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; NSAssert(config != nil, @"No configuration for task."); diff --git a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h index 3cf0e827da..3e61ed494b 100644 --- a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h +++ b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h @@ -51,7 +51,7 @@ * If the request is NIL then the redirect is not followed and the task is * complete. */ -- (void) finishWithRequest:(NSURLRequest *) request; +- (void) finishWithRequest:(nullable NSURLRequest *) request; @property (readonly) NSHTTPURLResponse *response; @property (readonly) NSURLRequest *request; @@ -91,9 +91,9 @@ - (id) initWithSession:(NSURLSession *)session task:(NSURLSessionTask *) task - error:(NSError *)error; + error:(nullable NSError *)error; -@property (readonly) NSError* error; +@property (nullable, readonly) NSError* error; @end @@ -111,9 +111,9 @@ - (id) initWithSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask - didOpenWithProtocol:(NSString *)protocol; + didOpenWithProtocol:(nullable NSString *)protocol; -@property (readonly) NSString* protocol; +@property (nullable, readonly) NSString* protocol; @end @@ -125,6 +125,6 @@ reason:(NSData *)reason; @property (readonly) NSURLSessionWebSocketCloseCode closeCode; -@property (readonly) NSData* reason; +@property (nullable, readonly) NSData* reason; @end diff --git a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m index 03e413d5db..a9a401d5aa 100644 --- a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m +++ b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m @@ -53,7 +53,7 @@ - (void) dealloc { [super dealloc]; } -- (void) finishWithRequest:(NSURLRequest *) request { +- (void) finishWithRequest:(nullable NSURLRequest *) request { self->_redirectRequest = [request retain]; [super finish]; } From 3671640b0e3d6999a0eb57fcbfb42d7a07bfb3e7 Mon Sep 17 00:00:00 2001 From: Derek Xu Date: Wed, 27 Mar 2024 10:57:27 -0400 Subject: [PATCH 343/448] [package:http_profile] Make connectionInfo a top-level field of HttpClientRequestProfile (#1160) --- .../lib/src/http_client_request_profile.dart | 44 +++++++++++++ .../lib/src/http_profile_request_data.dart | 42 ------------- .../lib/src/http_profile_response_data.dart | 35 ----------- .../http_client_request_profile_test.dart | 62 +++++++++++++++++++ .../test/http_profile_request_data_test.dart | 50 --------------- .../test/http_profile_response_data_test.dart | 50 --------------- 6 files changed, 106 insertions(+), 177 deletions(-) diff --git a/pkgs/http_profile/lib/src/http_client_request_profile.dart b/pkgs/http_profile/lib/src/http_client_request_profile.dart index 84db62f1a2..3d2372ba01 100644 --- a/pkgs/http_profile/lib/src/http_client_request_profile.dart +++ b/pkgs/http_profile/lib/src/http_client_request_profile.dart @@ -77,6 +77,50 @@ final class HttpClientRequestProfile { HttpProfileRequestEvent._fromJson, )); + /// Information about the networking connection used. + /// + /// This information is meant to be used for debugging. + /// + /// It can contain any arbitrary data as long as the values are of type + /// [String] or [int]. + /// + /// This field can only be modified by assigning a Map to it. That is: + /// ```dart + /// // Valid + /// profile?.connectionInfo = { + /// 'localPort': 1285, + /// 'remotePort': 443, + /// 'connectionPoolId': '21x23', + /// }; + /// + /// // Invalid + /// profile?.connectionInfo?['localPort'] = 1285; + /// ``` + set connectionInfo(Map? value) { + _updated(); + if (value == null) { + requestData._requestData.remove('connectionInfo'); + responseData._responseData.remove('connectionInfo'); + } else { + for (final v in value.values) { + if (!(v is String || v is int)) { + throw ArgumentError( + 'The values in connectionInfo must be of type String or int.', + ); + } + } + requestData._requestData['connectionInfo'] = {...value}; + responseData._responseData['connectionInfo'] = {...value}; + } + } + + Map? get connectionInfo => + requestData._data['connectionInfo'] == null + ? null + : UnmodifiableMapView( + requestData._data['connectionInfo'] as Map, + ); + /// Details about the request. late final HttpProfileRequestData requestData; diff --git a/pkgs/http_profile/lib/src/http_profile_request_data.dart b/pkgs/http_profile/lib/src/http_profile_request_data.dart index 1463994c12..537643cc2c 100644 --- a/pkgs/http_profile/lib/src/http_profile_request_data.dart +++ b/pkgs/http_profile/lib/src/http_profile_request_data.dart @@ -61,48 +61,6 @@ final class HttpProfileRequestData { List get bodyBytes => UnmodifiableListView(_data['requestBodyBytes'] as List); - /// Information about the networking connection used in the HTTP request. - /// - /// This information is meant to be used for debugging. - /// - /// It can contain any arbitrary data as long as the values are of type - /// [String] or [int]. - /// - /// This field can only be modified by assigning a Map to it. That is: - /// ```dart - /// // Valid - /// profile?.requestData.connectionInfo = { - /// 'localPort': 1285, - /// 'remotePort': 443, - /// 'connectionPoolId': '21x23', - /// }; - /// - /// // Invalid - /// profile?.requestData.connectionInfo?['localPort'] = 1285; - /// ``` - set connectionInfo(Map? value) { - _checkAndUpdate(); - if (value == null) { - _requestData.remove('connectionInfo'); - } else { - for (final v in value.values) { - if (!(v is String || v is int)) { - throw ArgumentError( - 'The values in connectionInfo must be of type String or int.', - ); - } - } - _requestData['connectionInfo'] = {...value}; - } - } - - Map? get connectionInfo => - _requestData['connectionInfo'] == null - ? null - : UnmodifiableMapView( - _requestData['connectionInfo'] as Map, - ); - /// The content length of the request, in bytes. set contentLength(int? value) { _checkAndUpdate(); diff --git a/pkgs/http_profile/lib/src/http_profile_response_data.dart b/pkgs/http_profile/lib/src/http_profile_response_data.dart index 87c769c5e2..5eb452adcb 100644 --- a/pkgs/http_profile/lib/src/http_profile_response_data.dart +++ b/pkgs/http_profile/lib/src/http_profile_response_data.dart @@ -68,41 +68,6 @@ final class HttpProfileResponseData { List get bodyBytes => UnmodifiableListView(_data['responseBodyBytes'] as List); - /// Information about the networking connection used in the HTTP response. - /// - /// This information is meant to be used for debugging. - /// - /// It can contain any arbitrary data as long as the values are of type - /// [String] or [int]. - /// - /// This field can only be modified by assigning a Map to it. That is: - /// ```dart - /// // Valid - /// profile?.responseData.connectionInfo = { - /// 'localPort': 1285, - /// 'remotePort': 443, - /// 'connectionPoolId': '21x23', - /// }; - /// - /// // Invalid - /// profile?.responseData.connectionInfo?['localPort'] = 1285; - /// ``` - set connectionInfo(Map? value) { - _checkAndUpdate(); - if (value == null) { - _responseData.remove('connectionInfo'); - } else { - for (final v in value.values) { - if (!(v is String || v is int)) { - throw ArgumentError( - 'The values in connectionInfo must be of type String or int.', - ); - } - } - _responseData['connectionInfo'] = {...value}; - } - } - Map? get connectionInfo => _responseData['connectionInfo'] as Map?; diff --git a/pkgs/http_profile/test/http_client_request_profile_test.dart b/pkgs/http_profile/test/http_client_request_profile_test.dart index 6c6a9e4884..fdba3e3a6b 100644 --- a/pkgs/http_profile/test/http_client_request_profile_test.dart +++ b/pkgs/http_profile/test/http_client_request_profile_test.dart @@ -77,4 +77,66 @@ void main() { expect(eventFromGetter.timestamp, DateTime.parse('2024-03-22')); expect(eventFromGetter.name, 'an event'); }); + + test('populating HttpClientRequestProfile.connectionInfo', () async { + final requestData = backingMap['requestData'] as Map; + final responseData = backingMap['responseData'] as Map; + expect(requestData['connectionInfo'], isNull); + expect(responseData['connectionInfo'], isNull); + expect(profile.responseData.connectionInfo, isNull); + + profile.connectionInfo = { + 'localPort': 1285, + 'remotePort': 443, + 'connectionPoolId': '21x23' + }; + + final connectionInfoFromRequestData = + requestData['connectionInfo'] as Map; + final connectionInfoFromResponseData = + responseData['connectionInfo'] as Map; + expect(connectionInfoFromRequestData['localPort'], 1285); + expect(connectionInfoFromResponseData['localPort'], 1285); + expect(connectionInfoFromRequestData['remotePort'], 443); + expect(connectionInfoFromResponseData['remotePort'], 443); + expect(connectionInfoFromRequestData['connectionPoolId'], '21x23'); + expect(connectionInfoFromResponseData['connectionPoolId'], '21x23'); + + final connectionInfoFromGetter = profile.responseData.connectionInfo!; + expect(connectionInfoFromGetter['localPort'], 1285); + expect(connectionInfoFromGetter['remotePort'], 443); + expect(connectionInfoFromGetter['connectionPoolId'], '21x23'); + }); + + test('HttpClientRequestProfile.connectionInfo = null', () async { + profile.connectionInfo = { + 'localPort': 1285, + 'remotePort': 443, + 'connectionPoolId': '21x23' + }; + + final requestData = backingMap['requestData'] as Map; + final connectionInfoFromRequestData = + requestData['connectionInfo'] as Map; + final responseData = backingMap['responseData'] as Map; + final connectionInfoFromResponseData = + responseData['connectionInfo'] as Map; + expect(connectionInfoFromRequestData['localPort'], 1285); + expect(connectionInfoFromResponseData['localPort'], 1285); + expect(connectionInfoFromRequestData['remotePort'], 443); + expect(connectionInfoFromResponseData['remotePort'], 443); + expect(connectionInfoFromRequestData['connectionPoolId'], '21x23'); + expect(connectionInfoFromResponseData['connectionPoolId'], '21x23'); + + final connectionInfoFromGetter = profile.responseData.connectionInfo!; + expect(connectionInfoFromGetter['localPort'], 1285); + expect(connectionInfoFromGetter['remotePort'], 443); + expect(connectionInfoFromGetter['connectionPoolId'], '21x23'); + + profile.connectionInfo = null; + + expect(requestData['connectionInfo'], isNull); + expect(responseData['connectionInfo'], isNull); + expect(profile.responseData.connectionInfo, isNull); + }); } diff --git a/pkgs/http_profile/test/http_profile_request_data_test.dart b/pkgs/http_profile/test/http_profile_request_data_test.dart index 6723e81331..36c79a766f 100644 --- a/pkgs/http_profile/test/http_profile_request_data_test.dart +++ b/pkgs/http_profile/test/http_profile_request_data_test.dart @@ -56,56 +56,6 @@ void main() { expect(profile.requestData.endTime, DateTime.parse('2024-03-23')); }); - test('populating HttpClientRequestProfile.requestData.connectionInfo', - () async { - final requestData = backingMap['requestData'] as Map; - expect(requestData['connectionInfo'], isNull); - expect(profile.requestData.connectionInfo, isNull); - - profile.requestData.connectionInfo = { - 'localPort': 1285, - 'remotePort': 443, - 'connectionPoolId': '21x23' - }; - - final connectionInfoFromBackingMap = - requestData['connectionInfo'] as Map; - expect(connectionInfoFromBackingMap['localPort'], 1285); - expect(connectionInfoFromBackingMap['remotePort'], 443); - expect(connectionInfoFromBackingMap['connectionPoolId'], '21x23'); - - final connectionInfoFromGetter = profile.requestData.connectionInfo!; - expect(connectionInfoFromGetter['localPort'], 1285); - expect(connectionInfoFromGetter['remotePort'], 443); - expect(connectionInfoFromGetter['connectionPoolId'], '21x23'); - }); - - test('HttpClientRequestProfile.requestData.connectionInfo = null', () async { - final requestData = backingMap['requestData'] as Map; - - profile.requestData.connectionInfo = { - 'localPort': 1285, - 'remotePort': 443, - 'connectionPoolId': '21x23' - }; - - final connectionInfoFromBackingMap = - requestData['connectionInfo'] as Map; - expect(connectionInfoFromBackingMap['localPort'], 1285); - expect(connectionInfoFromBackingMap['remotePort'], 443); - expect(connectionInfoFromBackingMap['connectionPoolId'], '21x23'); - - final connectionInfoFromGetter = profile.requestData.connectionInfo!; - expect(connectionInfoFromGetter['localPort'], 1285); - expect(connectionInfoFromGetter['remotePort'], 443); - expect(connectionInfoFromGetter['connectionPoolId'], '21x23'); - - profile.requestData.connectionInfo = null; - - expect(requestData['connectionInfo'], isNull); - expect(profile.requestData.connectionInfo, isNull); - }); - test('populating HttpClientRequestProfile.requestData.contentLength', () async { final requestData = backingMap['requestData'] as Map; diff --git a/pkgs/http_profile/test/http_profile_response_data_test.dart b/pkgs/http_profile/test/http_profile_response_data_test.dart index f256971463..9b73cb7b38 100644 --- a/pkgs/http_profile/test/http_profile_response_data_test.dart +++ b/pkgs/http_profile/test/http_profile_response_data_test.dart @@ -52,56 +52,6 @@ void main() { expect(redirectFromGetter.location, 'https://images.example.com/1'); }); - test('populating HttpClientRequestProfile.responseData.connectionInfo', - () async { - final responseData = backingMap['responseData'] as Map; - expect(responseData['connectionInfo'], isNull); - expect(profile.responseData.connectionInfo, isNull); - - profile.responseData.connectionInfo = { - 'localPort': 1285, - 'remotePort': 443, - 'connectionPoolId': '21x23' - }; - - final connectionInfoFromBackingMap = - responseData['connectionInfo'] as Map; - expect(connectionInfoFromBackingMap['localPort'], 1285); - expect(connectionInfoFromBackingMap['remotePort'], 443); - expect(connectionInfoFromBackingMap['connectionPoolId'], '21x23'); - - final connectionInfoFromGetter = profile.responseData.connectionInfo!; - expect(connectionInfoFromGetter['localPort'], 1285); - expect(connectionInfoFromGetter['remotePort'], 443); - expect(connectionInfoFromGetter['connectionPoolId'], '21x23'); - }); - - test('HttpClientRequestProfile.responseData.connectionInfo = null', () async { - final responseData = backingMap['responseData'] as Map; - - profile.responseData.connectionInfo = { - 'localPort': 1285, - 'remotePort': 443, - 'connectionPoolId': '21x23' - }; - - final connectionInfoFromBackingMap = - responseData['connectionInfo'] as Map; - expect(connectionInfoFromBackingMap['localPort'], 1285); - expect(connectionInfoFromBackingMap['remotePort'], 443); - expect(connectionInfoFromBackingMap['connectionPoolId'], '21x23'); - - final connectionInfoFromGetter = profile.responseData.connectionInfo!; - expect(connectionInfoFromGetter['localPort'], 1285); - expect(connectionInfoFromGetter['remotePort'], 443); - expect(connectionInfoFromGetter['connectionPoolId'], '21x23'); - - profile.responseData.connectionInfo = null; - - expect(responseData['connectionInfo'], isNull); - expect(profile.responseData.connectionInfo, isNull); - }); - test('populating HttpClientRequestProfile.responseData.headersListValues', () async { final responseData = backingMap['responseData'] as Map; From b2a217a250d122ea6e9a49c77ad75805a17752e6 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 27 Mar 2024 13:32:15 -0700 Subject: [PATCH 344/448] Fix the connectionInfo getter (#1163) --- .../http_profile/lib/src/http_client_request_profile.dart | 5 +++-- pkgs/http_profile/lib/src/http_profile_response_data.dart | 3 --- .../test/http_client_request_profile_test.dart | 8 ++++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/http_profile/lib/src/http_client_request_profile.dart b/pkgs/http_profile/lib/src/http_client_request_profile.dart index 3d2372ba01..9b7b2157e3 100644 --- a/pkgs/http_profile/lib/src/http_client_request_profile.dart +++ b/pkgs/http_profile/lib/src/http_client_request_profile.dart @@ -115,10 +115,11 @@ final class HttpClientRequestProfile { } Map? get connectionInfo => - requestData._data['connectionInfo'] == null + requestData._requestData['connectionInfo'] == null ? null : UnmodifiableMapView( - requestData._data['connectionInfo'] as Map, + requestData._requestData['connectionInfo'] + as Map, ); /// Details about the request. diff --git a/pkgs/http_profile/lib/src/http_profile_response_data.dart b/pkgs/http_profile/lib/src/http_profile_response_data.dart index 5eb452adcb..8cf0f682d6 100644 --- a/pkgs/http_profile/lib/src/http_profile_response_data.dart +++ b/pkgs/http_profile/lib/src/http_profile_response_data.dart @@ -68,9 +68,6 @@ final class HttpProfileResponseData { List get bodyBytes => UnmodifiableListView(_data['responseBodyBytes'] as List); - Map? get connectionInfo => - _responseData['connectionInfo'] as Map?; - /// The response headers where duplicate headers are represented using a list /// of values. /// diff --git a/pkgs/http_profile/test/http_client_request_profile_test.dart b/pkgs/http_profile/test/http_client_request_profile_test.dart index fdba3e3a6b..7422bffc20 100644 --- a/pkgs/http_profile/test/http_client_request_profile_test.dart +++ b/pkgs/http_profile/test/http_client_request_profile_test.dart @@ -83,7 +83,7 @@ void main() { final responseData = backingMap['responseData'] as Map; expect(requestData['connectionInfo'], isNull); expect(responseData['connectionInfo'], isNull); - expect(profile.responseData.connectionInfo, isNull); + expect(profile.connectionInfo, isNull); profile.connectionInfo = { 'localPort': 1285, @@ -102,7 +102,7 @@ void main() { expect(connectionInfoFromRequestData['connectionPoolId'], '21x23'); expect(connectionInfoFromResponseData['connectionPoolId'], '21x23'); - final connectionInfoFromGetter = profile.responseData.connectionInfo!; + final connectionInfoFromGetter = profile.connectionInfo!; expect(connectionInfoFromGetter['localPort'], 1285); expect(connectionInfoFromGetter['remotePort'], 443); expect(connectionInfoFromGetter['connectionPoolId'], '21x23'); @@ -128,7 +128,7 @@ void main() { expect(connectionInfoFromRequestData['connectionPoolId'], '21x23'); expect(connectionInfoFromResponseData['connectionPoolId'], '21x23'); - final connectionInfoFromGetter = profile.responseData.connectionInfo!; + final connectionInfoFromGetter = profile.connectionInfo!; expect(connectionInfoFromGetter['localPort'], 1285); expect(connectionInfoFromGetter['remotePort'], 443); expect(connectionInfoFromGetter['connectionPoolId'], '21x23'); @@ -137,6 +137,6 @@ void main() { expect(requestData['connectionInfo'], isNull); expect(responseData['connectionInfo'], isNull); - expect(profile.responseData.connectionInfo, isNull); + expect(profile.connectionInfo, isNull); }); } From 506266641b044a4045a82fde9613a7f479ece697 Mon Sep 17 00:00:00 2001 From: Derek Xu Date: Wed, 27 Mar 2024 18:13:20 -0400 Subject: [PATCH 345/448] [package:http_profile] Expand README.md (#1162) --- pkgs/http_profile/README.md | 73 ++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 2 deletions(-) diff --git a/pkgs/http_profile/README.md b/pkgs/http_profile/README.md index 1ca1305b76..3b6511fe42 100644 --- a/pkgs/http_profile/README.md +++ b/pkgs/http_profile/README.md @@ -1,2 +1,71 @@ -An **experimental** package that allows HTTP clients outside of the Dart SDK -to integrate with the DevTools Network tab. +[![pub package](https://img.shields.io/pub/v/http_profile.svg)](https://pub.dev/packages/http_profile) +[![package publisher](https://img.shields.io/pub/publisher/http_profile.svg)](https://pub.dev/packages/http_profile/publisher) + +A package that allows HTTP clients outside of the Dart SDK to integrate with +the DevTools Network View. + +**NOTE:** This package is meant for developers *implementing* HTTP clients, not +developers *using* HTTP clients. + +## Using + +`HttpClientRequestProfile.profile` returns an `HttpClientRequestProfile` object +if HTTP profiling is enabled. Populating the fields of that object with +information about an HTTP request and about the response to that request will +make that information show up in the +[DevTools Network View](https://docs.flutter.dev/tools/devtools/network). + +```dart +import 'package:http_profile/http_profile.dart'; + +Future get(Uri uri) { + final profile = HttpClientRequestProfile.profile( + requestStartTime: DateTime.now(), + requestMethod: 'GET', + requestUri: uri.toString(), + ); + profile?.connectionInfo = { + 'localPort': 1285, + 'remotePort': 443, + 'connectionPoolId': '21x23', + }; + + profile.requestData.proxyDetails = HttpProfileProxyData( + host: 'https://www.example.com', + username: 'abc123', + isDirect: true, + port: 4321, + ); + + // Make the HTTP request and populate the response data. + + profile.responseData.headersListValues = { + 'connection': ['keep-alive'], + 'cache-control': ['max-age=43200'], + 'content-type': ['application/json', 'charset=utf-8'], + }; + + return responseString; +} +``` + +Refer to the source of +[`package:cupertino_http`](https://github.com/dart-lang/http/blob/master/pkgs/cupertino_http/lib/src/cupertino_client.dart) +to see a comprehensive example of how `package:http_profile` can be integrated +into an HTTP client. + +## Status: experimental + +**NOTE**: This package is currently experimental and published under the +[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to +solicit feedback. + +For packages in the labs.dart.dev publisher we generally plan to either graduate +the package into a supported publisher (dart.dev, tools.dart.dev) after a period +of feedback and iteration, or discontinue the package. These packages have a +much higher expected rate of API and breaking changes. + +Your feedback is valuable and will help us evolve this package. For general +feedback, suggestions, and comments, please file an issue in the +[bug tracker](https://github.com/dart-lang/http/issues). + From f65947e03886fe6663a81126d6460315a92a8700 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 28 Mar 2024 08:15:57 -0700 Subject: [PATCH 346/448] Ignore errors added to `bodySink`s (#1164) * Ignore errors added to `bodySink`s * Add functionality --- .../lib/src/http_client_request_profile.dart | 9 +++++---- pkgs/http_profile/lib/src/http_profile_request_data.dart | 3 +++ .../http_profile/lib/src/http_profile_response_data.dart | 3 +++ .../test/http_profile_request_data_test.dart | 6 ++++-- .../test/http_profile_response_data_test.dart | 6 ++++-- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/pkgs/http_profile/lib/src/http_client_request_profile.dart b/pkgs/http_profile/lib/src/http_client_request_profile.dart index 9b7b2157e3..c928735d44 100644 --- a/pkgs/http_profile/lib/src/http_client_request_profile.dart +++ b/pkgs/http_profile/lib/src/http_client_request_profile.dart @@ -147,12 +147,13 @@ final class HttpClientRequestProfile { responseData = HttpProfileResponseData._(_data, _updated); _data['requestBodyBytes'] = []; requestData._body.stream.listen( - (final bytes) => (_data['requestBodyBytes'] as List).addAll(bytes), - ); + (final bytes) => (_data['requestBodyBytes'] as List).addAll(bytes), + onError: (e) {}); _data['responseBodyBytes'] = []; responseData._body.stream.listen( - (final bytes) => (_data['responseBodyBytes'] as List).addAll(bytes), - ); + (final bytes) => + (_data['responseBodyBytes'] as List).addAll(bytes), + onError: (e) {}); // This entry is needed to support the updatedSince parameter of // ext.dart.io.getHttpProfile. _updated(); diff --git a/pkgs/http_profile/lib/src/http_profile_request_data.dart b/pkgs/http_profile/lib/src/http_profile_request_data.dart index 537643cc2c..60b1d8e8fe 100644 --- a/pkgs/http_profile/lib/src/http_profile_request_data.dart +++ b/pkgs/http_profile/lib/src/http_profile_request_data.dart @@ -55,6 +55,9 @@ final class HttpProfileRequestData { _data['requestData'] as Map; /// A sink that can be used to record the body of the request. + /// + /// Errors added to [bodySink] (for example with [StreamSink.addError]) are + /// ignored. StreamSink> get bodySink => _body.sink; /// The body of the request represented as an unmodifiable list of bytes. diff --git a/pkgs/http_profile/lib/src/http_profile_response_data.dart b/pkgs/http_profile/lib/src/http_profile_response_data.dart index 8cf0f682d6..920b97d601 100644 --- a/pkgs/http_profile/lib/src/http_profile_response_data.dart +++ b/pkgs/http_profile/lib/src/http_profile_response_data.dart @@ -62,6 +62,9 @@ final class HttpProfileResponseData { .map(HttpProfileRedirectData._fromJson)); /// A sink that can be used to record the body of the response. + /// + /// Errors added to [bodySink] (for example with [StreamSink.addError]) are + /// ignored. StreamSink> get bodySink => _body.sink; /// The body of the response represented as an unmodifiable list of bytes. diff --git a/pkgs/http_profile/test/http_profile_request_data_test.dart b/pkgs/http_profile/test/http_profile_request_data_test.dart index 36c79a766f..500cd95f52 100644 --- a/pkgs/http_profile/test/http_profile_request_data_test.dart +++ b/pkgs/http_profile/test/http_profile_request_data_test.dart @@ -348,9 +348,11 @@ void main() { expect(profile.requestData.bodyBytes, isEmpty); profile.requestData.bodySink.add([1, 2, 3]); + profile.requestData.bodySink.addError('this is an error'); + profile.requestData.bodySink.add([4, 5]); await profile.requestData.close(); - expect(requestBodyBytes, [1, 2, 3]); - expect(profile.requestData.bodyBytes, [1, 2, 3]); + expect(requestBodyBytes, [1, 2, 3, 4, 5]); + expect(profile.requestData.bodyBytes, [1, 2, 3, 4, 5]); }); } diff --git a/pkgs/http_profile/test/http_profile_response_data_test.dart b/pkgs/http_profile/test/http_profile_response_data_test.dart index 9b73cb7b38..a9bc9a827c 100644 --- a/pkgs/http_profile/test/http_profile_response_data_test.dart +++ b/pkgs/http_profile/test/http_profile_response_data_test.dart @@ -392,9 +392,11 @@ void main() { expect(profile.responseData.bodyBytes, isEmpty); profile.responseData.bodySink.add([1, 2, 3]); + profile.responseData.bodySink.addError('this is an error'); + profile.responseData.bodySink.add([4, 5]); await profile.responseData.close(); - expect(responseBodyBytes, [1, 2, 3]); - expect(profile.responseData.bodyBytes, [1, 2, 3]); + expect(responseBodyBytes, [1, 2, 3, 4, 5]); + expect(profile.responseData.bodyBytes, [1, 2, 3, 4, 5]); }); } From baf94804385a5331c98291ffd727035630526317 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 28 Mar 2024 13:01:58 -0700 Subject: [PATCH 347/448] Add eq, toString and hash methods to HttpProfileRedirectData (#1165) --- .../lib/src/http_profile_response_data.dart | 15 ++++++ .../test/http_profile_response_data_test.dart | 54 +++++++++++++++++-- 2 files changed, 64 insertions(+), 5 deletions(-) diff --git a/pkgs/http_profile/lib/src/http_profile_response_data.dart b/pkgs/http_profile/lib/src/http_profile_response_data.dart index 920b97d601..7aead9e068 100644 --- a/pkgs/http_profile/lib/src/http_profile_response_data.dart +++ b/pkgs/http_profile/lib/src/http_profile_response_data.dart @@ -36,6 +36,21 @@ class HttpProfileRedirectData { 'method': _method, 'location': _location, }; + + @override + bool operator ==(Object other) => + (other is HttpProfileRedirectData) && + (statusCode == other.statusCode && + method == other.method && + location == other.location); + + @override + int get hashCode => Object.hashAll([statusCode, method, location]); + + @override + String toString() => + 'HttpProfileRedirectData(statusCode: $statusCode, method: $method, ' + 'location: $location)'; } /// Describes details about a response to an HTTP request. diff --git a/pkgs/http_profile/test/http_profile_response_data_test.dart b/pkgs/http_profile/test/http_profile_response_data_test.dart index a9bc9a827c..646c3e6729 100644 --- a/pkgs/http_profile/test/http_profile_response_data_test.dart +++ b/pkgs/http_profile/test/http_profile_response_data_test.dart @@ -26,6 +26,48 @@ void main() { backingMap = profileBackingMaps.lastOrNull!; }); + group('HttpProfileRedirectData', () { + test('equal', () { + expect( + HttpProfileRedirectData( + statusCode: 302, method: 'GET', location: 'http://somewhere'), + HttpProfileRedirectData( + statusCode: 302, method: 'GET', location: 'http://somewhere')); + }); + + test('not equal', () { + expect( + HttpProfileRedirectData( + statusCode: 302, method: 'GET', location: 'http://somewhere'), + isNot(Object())); + expect( + HttpProfileRedirectData( + statusCode: 302, method: 'GET', location: 'http://somewhere'), + isNot(HttpProfileRedirectData( + statusCode: 303, method: 'GET', location: 'http://somewhere'))); + expect( + HttpProfileRedirectData( + statusCode: 302, method: 'GET', location: 'http://somewhere'), + isNot(HttpProfileRedirectData( + statusCode: 302, method: 'POST', location: 'http://somewhere'))); + expect( + HttpProfileRedirectData( + statusCode: 302, method: 'GET', location: 'http://somewhere'), + isNot(HttpProfileRedirectData( + statusCode: 302, method: 'GET', location: 'http://notthere'))); + }); + + test('hash', () { + expect( + HttpProfileRedirectData( + statusCode: 302, method: 'GET', location: 'http://somewhere') + .hashCode, + HttpProfileRedirectData( + statusCode: 302, method: 'GET', location: 'http://somewhere') + .hashCode); + }); + }); + test('calling HttpClientRequestProfile.responseData.addRedirect', () async { final responseData = backingMap['responseData'] as Map; final redirectsFromBackingMap = @@ -45,11 +87,13 @@ void main() { expect(redirectFromBackingMap['method'], 'GET'); expect(redirectFromBackingMap['location'], 'https://images.example.com/1'); - expect(profile.responseData.redirects.length, 1); - final redirectFromGetter = profile.responseData.redirects.first; - expect(redirectFromGetter.statusCode, 301); - expect(redirectFromGetter.method, 'GET'); - expect(redirectFromGetter.location, 'https://images.example.com/1'); + expect(profile.responseData.redirects, [ + HttpProfileRedirectData( + statusCode: 301, + method: 'GET', + location: 'https://images.example.com/1', + ) + ]); }); test('populating HttpClientRequestProfile.responseData.headersListValues', From 8a6f3ddb0c710f140ba6c3ac35a6a7c5b7d92439 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 28 Mar 2024 16:01:48 -0700 Subject: [PATCH 348/448] Make `test` a dev_dependency (#1166) --- pkgs/http_profile/pubspec.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/http_profile/pubspec.yaml b/pkgs/http_profile/pubspec.yaml index 93b55f296c..b86ddc200c 100644 --- a/pkgs/http_profile/pubspec.yaml +++ b/pkgs/http_profile/pubspec.yaml @@ -10,8 +10,6 @@ environment: # TODO(derekxu16): Change the following constraint to ^3.4.0 before publishing this package. sdk: ^3.4.0-154.0.dev -dependencies: - test: ^1.24.9 - dev_dependencies: dart_flutter_team_lints: ^2.1.1 + test: ^1.24.9 From 34b693c9967274571e8f85ade57c3ea4e1f8a893 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 03:49:57 +0000 Subject: [PATCH 349/448] Bump actions/cache from 4.0.1 to 4.0.2 (#1169) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/cache](https://github.com/actions/cache) from 4.0.1 to 4.0.2.
Release notes

Sourced from actions/cache's releases.

v4.0.2

What's Changed

Full Changelog: https://github.com/actions/cache/compare/v4.0.1...v4.0.2

Changelog

Sourced from actions/cache's changelog.

Releases

4.0.2

  • Fixed restore fail-on-cache-miss not working.

4.0.1

  • Updated isGhes check

4.0.0

  • Updated minimum runner version support from node 12 -> node 20

3.3.3

  • Updates @​actions/cache to v3.2.3 to fix accidental mutated path arguments to getCacheVersion actions/toolkit#1378
  • Additional audit fixes of npm package(s)

3.3.2

  • Fixes bug with Azure SDK causing blob downloads to get stuck.

3.3.1

  • Reduced segment size to 128MB and segment timeout to 10 minutes to fail fast in case the cache download is stuck.

3.3.0

  • Added option to lookup cache without downloading it.

3.2.6

  • Fix zstd not being used after zstd version upgrade to 1.5.4 on hosted runners.

3.2.5

  • Added fix to prevent from setting MYSYS environment variable globally.

3.2.4

  • Added option to fail job on cache miss.

3.2.3

  • Support cross os caching on Windows as an opt-in feature.
  • Fix issue with symlink restoration on Windows for cross-os caches.

3.2.2

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=4.0.1&new-version=4.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/dart.yml | 46 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 5f04f84ba7..93c1a1d0a5 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http_client_conformance_tests;commands:analyze_1" @@ -74,7 +74,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:analyze_1" @@ -122,7 +122,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev;packages:pkgs/http_profile;commands:analyze_1" @@ -152,7 +152,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:analyze_1" @@ -218,7 +218,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:format" @@ -284,7 +284,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:format" @@ -314,7 +314,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:analyze_0" @@ -344,7 +344,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:command_1" @@ -383,7 +383,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:test_3" @@ -422,7 +422,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:test_2" @@ -461,7 +461,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/web_socket;commands:test_6" @@ -500,7 +500,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/web_socket;commands:test_5" @@ -539,7 +539,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev;packages:pkgs/http_profile;commands:test_2" @@ -578,7 +578,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:command_1" @@ -617,7 +617,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_3" @@ -656,7 +656,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_profile;commands:test_2" @@ -704,7 +704,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_4" @@ -743,7 +743,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/web_socket;commands:test_6" @@ -782,7 +782,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/web_socket;commands:test_5" @@ -821,7 +821,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:test_1" @@ -860,7 +860,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:command_0" @@ -899,7 +899,7 @@ jobs: runs-on: macos-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" key: "os:macos-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:command_0" From d8a3a4f74c08ff2737bf19435c86afa7074a93d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 03:50:00 +0000 Subject: [PATCH 350/448] Bump actions/setup-java from 4.1.0 to 4.2.1 (#1171) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4.1.0 to 4.2.1.
Release notes

Sourced from actions/setup-java's releases.

v4.2.1

What's Changed

Full Changelog: https://github.com/actions/setup-java/compare/v4...v4.2.1

v4.2.0

What's Changed

New Contributors

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/setup-java&package-manager=github_actions&previous-version=4.1.0&new-version=4.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/cronet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index ddbb1f6c6b..4b079aeb02 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -32,7 +32,7 @@ jobs: working-directory: pkgs/cronet_http steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: actions/setup-java@9704b39bf258b59bc04b50fa2dd55e9ed76b47a8 + - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 with: distribution: 'zulu' java-version: '17' From c90aa196ca8d18f7605f72d5fc3fff62d176ed44 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 4 Apr 2024 08:29:59 -0700 Subject: [PATCH 351/448] Create a `package:web_socket` `WebSocket` from `dart:io` `WebSocket` (#1173) --- pkgs/web_socket/CHANGELOG.md | 5 +++ pkgs/web_socket/lib/src/io_web_socket.dart | 4 ++ pkgs/web_socket/pubspec.yaml | 2 +- pkgs/web_socket/test/io_web_socket_test.dart | 40 ++++++++++++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 pkgs/web_socket/test/io_web_socket_test.dart diff --git a/pkgs/web_socket/CHANGELOG.md b/pkgs/web_socket/CHANGELOG.md index 28b499a2f5..e0df6cbd19 100644 --- a/pkgs/web_socket/CHANGELOG.md +++ b/pkgs/web_socket/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.1.1 + +- Add the ability to create a `package:web_socket` `WebSocket` given a + `dart:io` `WebSocket`. + ## 0.1.0 - Basic functionality in place. diff --git a/pkgs/web_socket/lib/src/io_web_socket.dart b/pkgs/web_socket/lib/src/io_web_socket.dart index d44a33ecfa..5225c07bb9 100644 --- a/pkgs/web_socket/lib/src/io_web_socket.dart +++ b/pkgs/web_socket/lib/src/io_web_socket.dart @@ -49,6 +49,10 @@ class IOWebSocket implements WebSocket { return IOWebSocket._(webSocket); } + // Create an `IOWebSocket` from an existing `dart:io` `WebSocket`. + factory IOWebSocket.fromWebSocket(io.WebSocket webSocket) => + IOWebSocket._(webSocket); + IOWebSocket._(this._webSocket) { _webSocket.listen( (event) { diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml index 78ec62ed26..1c341f7329 100644 --- a/pkgs/web_socket/pubspec.yaml +++ b/pkgs/web_socket/pubspec.yaml @@ -3,7 +3,7 @@ description: >- Any easy-to-use library for communicating with WebSockets that has multiple implementations. repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket -version: 0.1.0 +version: 0.1.1 environment: sdk: ^3.3.0 diff --git a/pkgs/web_socket/test/io_web_socket_test.dart b/pkgs/web_socket/test/io_web_socket_test.dart new file mode 100644 index 0000000000..a0ee671ddd --- /dev/null +++ b/pkgs/web_socket/test/io_web_socket_test.dart @@ -0,0 +1,40 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +@TestOn('vm') +library; + +import 'dart:io' as io; + +import 'package:test/test.dart'; +import 'package:web_socket/io_web_socket.dart'; +import 'package:web_socket/web_socket.dart'; + +void main() { + group('fromWebSocket', () { + late final io.HttpServer server; + late io.HttpHeaders headers; + late Uri uri; + + setUp(() async { + server = (await io.HttpServer.bind('localhost', 0)) + ..listen((request) async { + headers = request.headers; + await io.WebSocketTransformer.upgrade(request) + .then((webSocket) => webSocket.listen(webSocket.add)); + }); + uri = Uri.parse('ws://localhost:${server.port}'); + }); + + test('custom headers', () async { + final ws = IOWebSocket.fromWebSocket(await io.WebSocket.connect( + uri.toString(), + headers: {'fruit': 'apple'})); + expect(headers['fruit'], ['apple']); + ws.sendText('Hello World!'); + expect(await ws.events.first, TextDataReceived('Hello World!')); + await ws.close(); + }); + }); +} From a0b881775554ed19648357fd74d3118ffa5a14e7 Mon Sep 17 00:00:00 2001 From: Hossein Yousefi Date: Wed, 10 Apr 2024 18:16:48 +0200 Subject: [PATCH 352/448] Upgrade jni and jnigen to 0.8.0 (#1176) --- pkgs/cronet_http/analysis_options.yaml | 1 + pkgs/cronet_http/jnigen.yaml | 3 - pkgs/cronet_http/lib/src/cronet_client.dart | 6 +- .../cronet_http/lib/src/jni/jni_bindings.dart | 2500 +++++++++-------- pkgs/cronet_http/pubspec.yaml | 4 +- 5 files changed, 1293 insertions(+), 1221 deletions(-) diff --git a/pkgs/cronet_http/analysis_options.yaml b/pkgs/cronet_http/analysis_options.yaml index c1356dedc6..0c386de022 100644 --- a/pkgs/cronet_http/analysis_options.yaml +++ b/pkgs/cronet_http/analysis_options.yaml @@ -2,5 +2,6 @@ include: ../../analysis_options.yaml analyzer: exclude: + - lib/src/jni/jni_bindings.dart - lib/src/messages.dart - pigeons/messages.dart diff --git a/pkgs/cronet_http/jnigen.yaml b/pkgs/cronet_http/jnigen.yaml index a16d38f48d..5229d09225 100644 --- a/pkgs/cronet_http/jnigen.yaml +++ b/pkgs/cronet_http/jnigen.yaml @@ -1,8 +1,5 @@ # Regenerate bindings with `dart run jnigen --config jnigen.yaml`. -summarizer: - backend: asm - android_sdk_config: add_gradle_deps: true android_example: 'example/' diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index c9573826f3..634a823f78 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -94,7 +94,7 @@ class CronetEngine { String? storagePath, String? userAgent}) { final builder = jb.CronetEngine_Builder( - JObject.fromRef(Jni.getCachedApplicationContext())); + JObject.fromReference(Jni.getCachedApplicationContext())); try { if (storagePath != null) { @@ -284,9 +284,7 @@ class CronetClient extends BaseClient { /// Indicates that [CronetClient] is responsible for closing [_engine]. final bool _closeEngine; - CronetClient._(this._engine, this._closeEngine) { - Jni.initDLApi(); - } + CronetClient._(this._engine, this._closeEngine); /// A [CronetClient] that will be initialized with a new [CronetEngine]. factory CronetClient.defaultCronetEngine() => CronetClient._(null, true); diff --git a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart index c8df6936f2..7dcf78d226 100644 --- a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart +++ b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart @@ -4,6 +4,7 @@ // ignore_for_file: camel_case_extensions // ignore_for_file: camel_case_types // ignore_for_file: constant_identifier_names +// ignore_for_file: doc_directive_unknown // ignore_for_file: file_names // ignore_for_file: lines_longer_than_80_chars // ignore_for_file: no_leading_underscores_for_local_identifiers @@ -16,10 +17,10 @@ // ignore_for_file: unused_local_variable // ignore_for_file: unused_shown_name -import 'dart:ffi' as ffi; -import 'dart:isolate' show ReceivePort; -import 'package:jni/internal_helpers_for_jnigen.dart'; -import 'package:jni/jni.dart' as jni; +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; /// from: io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { @@ -27,101 +28,97 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { late final jni.JObjType $type = type; - UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromRef( - super.ref, - ) : super.fromRef(); + UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); - static final _class = jni.Jni.findJClass( - r'io/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface'); + static final _class = jni.JClass.forName( + r"io/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface"); /// The type which includes information such as the signature of this class. static const type = $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType(); - static final _id_onRedirectReceived = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onRedirectReceived', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V'); + static final _id_onRedirectReceived = _class.instanceMethodId( + r"onRedirectReceived", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V", + ); /// from: public abstract void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string) void onRedirectReceived( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JString string, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, _id_onRedirectReceived, jni.JniCallType.voidType, [ - urlRequest.reference, - urlResponseInfo.reference, - string.reference - ]).check(); - - static final _id_onResponseStarted = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onResponseStarted', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + ) { + _id_onRedirectReceived(this, const jni.jvoidType(), [ + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + string.reference.pointer + ]); + } + + static final _id_onResponseStarted = _class.instanceMethodId( + r"onResponseStarted", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + ); /// from: public abstract void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onResponseStarted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_onResponseStarted, - jni.JniCallType.voidType, - [urlRequest.reference, urlResponseInfo.reference]).check(); - - static final _id_onReadCompleted = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onReadCompleted', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V'); + ) { + _id_onResponseStarted(this, const jni.jvoidType(), + [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + } + + static final _id_onReadCompleted = _class.instanceMethodId( + r"onReadCompleted", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V", + ); /// from: public abstract void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer) void onReadCompleted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JByteBuffer byteBuffer, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, _id_onReadCompleted, jni.JniCallType.voidType, [ - urlRequest.reference, - urlResponseInfo.reference, - byteBuffer.reference - ]).check(); - - static final _id_onSucceeded = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onSucceeded', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + ) { + _id_onReadCompleted(this, const jni.jvoidType(), [ + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + byteBuffer.reference.pointer + ]); + } + + static final _id_onSucceeded = _class.instanceMethodId( + r"onSucceeded", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + ); /// from: public abstract void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onSucceeded( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_onSucceeded, - jni.JniCallType.voidType, - [urlRequest.reference, urlResponseInfo.reference]).check(); - - static final _id_onFailed = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onFailed', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V'); + ) { + _id_onSucceeded(this, const jni.jvoidType(), + [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + } + + static final _id_onFailed = _class.instanceMethodId( + r"onFailed", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V", + ); /// from: public abstract void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException) void onFailed( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, CronetException cronetException, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, _id_onFailed, jni.JniCallType.voidType, [ - urlRequest.reference, - urlResponseInfo.reference, - cronetException.reference - ]).check(); + ) { + _id_onFailed(this, const jni.jvoidType(), [ + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + cronetException.reference.pointer + ]); + } /// Maps a specific port to the implemented interface. static final Map - _$invokeMethod( - port, - $MethodInvocation.fromAddresses( - 0, - descriptor.address, - args.address, - ), - ); + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } static final ffi.Pointer< ffi.NativeFunction< @@ -156,7 +154,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; if ($d == - r'onRedirectReceived(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V') { + r"onRedirectReceived(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V") { _$impls[$p]!.onRedirectReceived( $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), @@ -165,7 +163,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { return jni.nullptr; } if ($d == - r'onResponseStarted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V') { + r"onResponseStarted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V") { _$impls[$p]!.onResponseStarted( $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), @@ -173,7 +171,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { return jni.nullptr; } if ($d == - r'onReadCompleted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V') { + r"onReadCompleted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V") { _$impls[$p]!.onReadCompleted( $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), @@ -182,7 +180,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { return jni.nullptr; } if ($d == - r'onSucceeded(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V') { + r"onSucceeded(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V") { _$impls[$p]!.onSucceeded( $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), @@ -190,7 +188,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { return jni.nullptr; } if ($d == - r'onFailed(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V') { + r"onFailed(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V") { _$impls[$p]!.onFailed( $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), @@ -208,9 +206,10 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl $impl, ) { final $p = ReceivePort(); - final $x = UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromRef( + final $x = + UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromReference( ProtectedJniExtensions.newPortProxy( - r'io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface', + r"io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface", $p, _$invokePointer, ), @@ -231,7 +230,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { } } -abstract class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl { +abstract interface class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl { factory $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl({ required void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JString string) @@ -297,23 +296,28 @@ class _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl CronetException cronetException) _onFailed; void onRedirectReceived(UrlRequest urlRequest, - UrlResponseInfo urlResponseInfo, jni.JString string) => - _onRedirectReceived(urlRequest, urlResponseInfo, string); + UrlResponseInfo urlResponseInfo, jni.JString string) { + return _onRedirectReceived(urlRequest, urlResponseInfo, string); + } void onResponseStarted( - UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) => - _onResponseStarted(urlRequest, urlResponseInfo); + UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) { + return _onResponseStarted(urlRequest, urlResponseInfo); + } void onReadCompleted(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - jni.JByteBuffer byteBuffer) => - _onReadCompleted(urlRequest, urlResponseInfo, byteBuffer); + jni.JByteBuffer byteBuffer) { + return _onReadCompleted(urlRequest, urlResponseInfo, byteBuffer); + } - void onSucceeded(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) => - _onSucceeded(urlRequest, urlResponseInfo); + void onSucceeded(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) { + return _onSucceeded(urlRequest, urlResponseInfo); + } void onFailed(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - CronetException cronetException) => - _onFailed(urlRequest, urlResponseInfo, cronetException); + CronetException cronetException) { + return _onFailed(urlRequest, urlResponseInfo, cronetException); + } } final class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType @@ -322,12 +326,13 @@ final class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType @override String get signature => - r'Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;'; + r"Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;"; @override - UrlRequestCallbackProxy_UrlRequestCallbackInterface fromRef( - jni.JObjectPtr ref) => - UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromRef(ref); + UrlRequestCallbackProxy_UrlRequestCallbackInterface fromReference( + jni.JReference reference) => + UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromReference( + reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -340,10 +345,11 @@ final class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType ($UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == - $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType && - other is $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType; + bool operator ==(Object other) { + return other.runtimeType == + ($UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType) && + other is $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType; + } } /// from: io.flutter.plugins.cronet_http.UrlRequestCallbackProxy @@ -351,128 +357,122 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { @override late final jni.JObjType $type = type; - UrlRequestCallbackProxy.fromRef( - super.ref, - ) : super.fromRef(); + UrlRequestCallbackProxy.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); - static final _class = jni.Jni.findJClass( - r'io/flutter/plugins/cronet_http/UrlRequestCallbackProxy'); + static final _class = jni.JClass.forName( + r"io/flutter/plugins/cronet_http/UrlRequestCallbackProxy"); /// The type which includes information such as the signature of this class. static const type = $UrlRequestCallbackProxyType(); - static final _id_new1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'', - r'(Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;)V'); + static final _id_new1 = _class.constructorId( + r"(Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;)V", + ); /// from: public void (io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface urlRequestCallbackInterface) /// The returned object must be released after use, by calling the [release] method. factory UrlRequestCallbackProxy.new1( UrlRequestCallbackProxy_UrlRequestCallbackInterface urlRequestCallbackInterface, - ) => - UrlRequestCallbackProxy.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, - _id_new1, - [urlRequestCallbackInterface.reference]).object); + ) { + return UrlRequestCallbackProxy.fromReference(_id_new1(_class, referenceType, + [urlRequestCallbackInterface.reference.pointer])); + } - static final _id_getCallback = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'getCallback', - r'()Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;'); + static final _id_getCallback = _class.instanceMethodId( + r"getCallback", + r"()Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;", + ); /// from: public final io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface getCallback() /// The returned object must be released after use, by calling the [release] method. - UrlRequestCallbackProxy_UrlRequestCallbackInterface getCallback() => - const $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType().fromRef( - jni.Jni.accessors.callMethodWithArgs(reference, _id_getCallback, - jni.JniCallType.objectType, []).object); + UrlRequestCallbackProxy_UrlRequestCallbackInterface getCallback() { + return _id_getCallback(this, + const $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType(), []); + } - static final _id_onRedirectReceived = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onRedirectReceived', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V'); + static final _id_onRedirectReceived = _class.instanceMethodId( + r"onRedirectReceived", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V", + ); /// from: public void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string) void onRedirectReceived( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JString string, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, _id_onRedirectReceived, jni.JniCallType.voidType, [ - urlRequest.reference, - urlResponseInfo.reference, - string.reference - ]).check(); - - static final _id_onResponseStarted = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onResponseStarted', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + ) { + _id_onRedirectReceived(this, const jni.jvoidType(), [ + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + string.reference.pointer + ]); + } + + static final _id_onResponseStarted = _class.instanceMethodId( + r"onResponseStarted", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + ); /// from: public void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onResponseStarted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_onResponseStarted, - jni.JniCallType.voidType, - [urlRequest.reference, urlResponseInfo.reference]).check(); - - static final _id_onReadCompleted = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onReadCompleted', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V'); + ) { + _id_onResponseStarted(this, const jni.jvoidType(), + [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + } + + static final _id_onReadCompleted = _class.instanceMethodId( + r"onReadCompleted", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V", + ); /// from: public void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer) void onReadCompleted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JByteBuffer byteBuffer, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, _id_onReadCompleted, jni.JniCallType.voidType, [ - urlRequest.reference, - urlResponseInfo.reference, - byteBuffer.reference - ]).check(); - - static final _id_onSucceeded = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onSucceeded', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + ) { + _id_onReadCompleted(this, const jni.jvoidType(), [ + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + byteBuffer.reference.pointer + ]); + } + + static final _id_onSucceeded = _class.instanceMethodId( + r"onSucceeded", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + ); /// from: public void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onSucceeded( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_onSucceeded, - jni.JniCallType.voidType, - [urlRequest.reference, urlResponseInfo.reference]).check(); - - static final _id_onFailed = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onFailed', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V'); + ) { + _id_onSucceeded(this, const jni.jvoidType(), + [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + } + + static final _id_onFailed = _class.instanceMethodId( + r"onFailed", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V", + ); /// from: public void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException) void onFailed( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, CronetException cronetException, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, _id_onFailed, jni.JniCallType.voidType, [ - urlRequest.reference, - urlResponseInfo.reference, - cronetException.reference - ]).check(); + ) { + _id_onFailed(this, const jni.jvoidType(), [ + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + cronetException.reference.pointer + ]); + } } final class $UrlRequestCallbackProxyType @@ -481,11 +481,11 @@ final class $UrlRequestCallbackProxyType @override String get signature => - r'Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy;'; + r"Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy;"; @override - UrlRequestCallbackProxy fromRef(jni.JObjectPtr ref) => - UrlRequestCallbackProxy.fromRef(ref); + UrlRequestCallbackProxy fromReference(jni.JReference reference) => + UrlRequestCallbackProxy.fromReference(reference); @override jni.JObjType get superType => const $UrlRequest_CallbackType(); @@ -497,9 +497,10 @@ final class $UrlRequestCallbackProxyType int get hashCode => ($UrlRequestCallbackProxyType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $UrlRequestCallbackProxyType && - other is $UrlRequestCallbackProxyType; + bool operator ==(Object other) { + return other.runtimeType == ($UrlRequestCallbackProxyType) && + other is $UrlRequestCallbackProxyType; + } } /// from: java.net.URL @@ -507,16 +508,17 @@ class URL extends jni.JObject { @override late final jni.JObjType $type = type; - URL.fromRef( - super.ref, - ) : super.fromRef(); + URL.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); - static final _class = jni.Jni.findJClass(r'java/net/URL'); + static final _class = jni.JClass.forName(r"java/net/URL"); /// The type which includes information such as the signature of this class. static const type = $URLType(); - static final _id_new0 = jni.Jni.accessors.getMethodIDOf(_class.reference, - r'', r'(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V'); + static final _id_new0 = _class.constructorId( + r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V", + ); /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2) /// The returned object must be released after use, by calling the [release] method. @@ -525,17 +527,18 @@ class URL extends jni.JObject { jni.JString string1, int i, jni.JString string2, - ) => - URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_new0, [ - string.reference, - string1.reference, - jni.JValueInt(i), - string2.reference - ]).object); - - static final _id_new1 = jni.Jni.accessors.getMethodIDOf(_class.reference, - r'', r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V'); + ) { + return URL.fromReference(_id_new0(_class, referenceType, [ + string.reference.pointer, + string1.reference.pointer, + jni.JValueInt(i), + string2.reference.pointer + ])); + } + + static final _id_new1 = _class.constructorId( + r"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", + ); /// from: public void (java.lang.String string, java.lang.String string1, java.lang.String string2) /// The returned object must be released after use, by calling the [release] method. @@ -543,16 +546,17 @@ class URL extends jni.JObject { jni.JString string, jni.JString string1, jni.JString string2, - ) => - URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, - _id_new1, - [string.reference, string1.reference, string2.reference]).object); + ) { + return URL.fromReference(_id_new1(_class, referenceType, [ + string.reference.pointer, + string1.reference.pointer, + string2.reference.pointer + ])); + } - static final _id_new2 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'', - r'(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V'); + static final _id_new2 = _class.constructorId( + r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V", + ); /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2, java.net.URLStreamHandler uRLStreamHandler) /// The returned object must be released after use, by calling the [release] method. @@ -562,43 +566,46 @@ class URL extends jni.JObject { int i, jni.JString string2, jni.JObject uRLStreamHandler, - ) => - URL.fromRef( - jni.Jni.accessors.newObjectWithArgs(_class.reference, _id_new2, [ - string.reference, - string1.reference, - jni.JValueInt(i), - string2.reference, - uRLStreamHandler.reference - ]).object); - - static final _id_new3 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'', r'(Ljava/lang/String;)V'); + ) { + return URL.fromReference(_id_new2(_class, referenceType, [ + string.reference.pointer, + string1.reference.pointer, + jni.JValueInt(i), + string2.reference.pointer, + uRLStreamHandler.reference.pointer + ])); + } + + static final _id_new3 = _class.constructorId( + r"(Ljava/lang/String;)V", + ); /// from: public void (java.lang.String string) /// The returned object must be released after use, by calling the [release] method. factory URL.new3( jni.JString string, - ) => - URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_new3, [string.reference]).object); + ) { + return URL.fromReference( + _id_new3(_class, referenceType, [string.reference.pointer])); + } - static final _id_new4 = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'', r'(Ljava/net/URL;Ljava/lang/String;)V'); + static final _id_new4 = _class.constructorId( + r"(Ljava/net/URL;Ljava/lang/String;)V", + ); /// from: public void (java.net.URL uRL, java.lang.String string) /// The returned object must be released after use, by calling the [release] method. factory URL.new4( URL uRL, jni.JString string, - ) => - URL.fromRef(jni.Jni.accessors.newObjectWithArgs(_class.reference, - _id_new4, [uRL.reference, string.reference]).object); + ) { + return URL.fromReference(_id_new4(_class, referenceType, + [uRL.reference.pointer, string.reference.pointer])); + } - static final _id_new5 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'', - r'(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V'); + static final _id_new5 = _class.constructorId( + r"(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V", + ); /// from: public void (java.net.URL uRL, java.lang.String string, java.net.URLStreamHandler uRLStreamHandler) /// The returned object must be released after use, by calling the [release] method. @@ -606,240 +613,274 @@ class URL extends jni.JObject { URL uRL, jni.JString string, jni.JObject uRLStreamHandler, - ) => - URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_new5, [ - uRL.reference, - string.reference, - uRLStreamHandler.reference - ]).object); + ) { + return URL.fromReference(_id_new5(_class, referenceType, [ + uRL.reference.pointer, + string.reference.pointer, + uRLStreamHandler.reference.pointer + ])); + } - static final _id_getQuery = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getQuery', r'()Ljava/lang/String;'); + static final _id_getQuery = _class.instanceMethodId( + r"getQuery", + r"()Ljava/lang/String;", + ); /// from: public java.lang.String getQuery() /// The returned object must be released after use, by calling the [release] method. - jni.JString getQuery() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getQuery, jni.JniCallType.objectType, []).object); + jni.JString getQuery() { + return _id_getQuery(this, const jni.JStringType(), []); + } - static final _id_getPath = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getPath', r'()Ljava/lang/String;'); + static final _id_getPath = _class.instanceMethodId( + r"getPath", + r"()Ljava/lang/String;", + ); /// from: public java.lang.String getPath() /// The returned object must be released after use, by calling the [release] method. - jni.JString getPath() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getPath, jni.JniCallType.objectType, []).object); + jni.JString getPath() { + return _id_getPath(this, const jni.JStringType(), []); + } - static final _id_getUserInfo = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getUserInfo', r'()Ljava/lang/String;'); + static final _id_getUserInfo = _class.instanceMethodId( + r"getUserInfo", + r"()Ljava/lang/String;", + ); /// from: public java.lang.String getUserInfo() /// The returned object must be released after use, by calling the [release] method. - jni.JString getUserInfo() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getUserInfo, jni.JniCallType.objectType, []).object); + jni.JString getUserInfo() { + return _id_getUserInfo(this, const jni.JStringType(), []); + } - static final _id_getAuthority = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'getAuthority', r'()Ljava/lang/String;'); + static final _id_getAuthority = _class.instanceMethodId( + r"getAuthority", + r"()Ljava/lang/String;", + ); /// from: public java.lang.String getAuthority() /// The returned object must be released after use, by calling the [release] method. - jni.JString getAuthority() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getAuthority, jni.JniCallType.objectType, []).object); + jni.JString getAuthority() { + return _id_getAuthority(this, const jni.JStringType(), []); + } - static final _id_getPort = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'getPort', r'()I'); + static final _id_getPort = _class.instanceMethodId( + r"getPort", + r"()I", + ); /// from: public int getPort() - int getPort() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_getPort, jni.JniCallType.intType, []).integer; + int getPort() { + return _id_getPort(this, const jni.jintType(), []); + } - static final _id_getDefaultPort = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getDefaultPort', r'()I'); + static final _id_getDefaultPort = _class.instanceMethodId( + r"getDefaultPort", + r"()I", + ); /// from: public int getDefaultPort() - int getDefaultPort() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_getDefaultPort, jni.JniCallType.intType, []).integer; + int getDefaultPort() { + return _id_getDefaultPort(this, const jni.jintType(), []); + } - static final _id_getProtocol = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getProtocol', r'()Ljava/lang/String;'); + static final _id_getProtocol = _class.instanceMethodId( + r"getProtocol", + r"()Ljava/lang/String;", + ); /// from: public java.lang.String getProtocol() /// The returned object must be released after use, by calling the [release] method. - jni.JString getProtocol() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getProtocol, jni.JniCallType.objectType, []).object); + jni.JString getProtocol() { + return _id_getProtocol(this, const jni.JStringType(), []); + } - static final _id_getHost = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getHost', r'()Ljava/lang/String;'); + static final _id_getHost = _class.instanceMethodId( + r"getHost", + r"()Ljava/lang/String;", + ); /// from: public java.lang.String getHost() /// The returned object must be released after use, by calling the [release] method. - jni.JString getHost() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getHost, jni.JniCallType.objectType, []).object); + jni.JString getHost() { + return _id_getHost(this, const jni.JStringType(), []); + } - static final _id_getFile = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getFile', r'()Ljava/lang/String;'); + static final _id_getFile = _class.instanceMethodId( + r"getFile", + r"()Ljava/lang/String;", + ); /// from: public java.lang.String getFile() /// The returned object must be released after use, by calling the [release] method. - jni.JString getFile() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getFile, jni.JniCallType.objectType, []).object); + jni.JString getFile() { + return _id_getFile(this, const jni.JStringType(), []); + } - static final _id_getRef = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getRef', r'()Ljava/lang/String;'); + static final _id_getRef = _class.instanceMethodId( + r"getRef", + r"()Ljava/lang/String;", + ); /// from: public java.lang.String getRef() /// The returned object must be released after use, by calling the [release] method. - jni.JString getRef() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getRef, jni.JniCallType.objectType, []).object); + jni.JString getRef() { + return _id_getRef(this, const jni.JStringType(), []); + } - static final _id_equals1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'equals', r'(Ljava/lang/Object;)Z'); + static final _id_equals = _class.instanceMethodId( + r"equals", + r"(Ljava/lang/Object;)Z", + ); /// from: public boolean equals(java.lang.Object object) - bool equals1( + bool equals( jni.JObject object, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_equals1, - jni.JniCallType.booleanType, [object.reference]).boolean; + ) { + return _id_equals( + this, const jni.jbooleanType(), [object.reference.pointer]); + } - static final _id_hashCode1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'hashCode', r'()I'); + static final _id_hashCode1 = _class.instanceMethodId( + r"hashCode", + r"()I", + ); /// from: public int hashCode() - int hashCode1() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_hashCode1, jni.JniCallType.intType, []).integer; + int hashCode1() { + return _id_hashCode1(this, const jni.jintType(), []); + } - static final _id_sameFile = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'sameFile', r'(Ljava/net/URL;)Z'); + static final _id_sameFile = _class.instanceMethodId( + r"sameFile", + r"(Ljava/net/URL;)Z", + ); /// from: public boolean sameFile(java.net.URL uRL) bool sameFile( URL uRL, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_sameFile, - jni.JniCallType.booleanType, [uRL.reference]).boolean; + ) { + return _id_sameFile( + this, const jni.jbooleanType(), [uRL.reference.pointer]); + } - static final _id_toString1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'toString', r'()Ljava/lang/String;'); + static final _id_toString1 = _class.instanceMethodId( + r"toString", + r"()Ljava/lang/String;", + ); /// from: public java.lang.String toString() /// The returned object must be released after use, by calling the [release] method. - jni.JString toString1() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_toString1, jni.JniCallType.objectType, []).object); + jni.JString toString1() { + return _id_toString1(this, const jni.JStringType(), []); + } - static final _id_toExternalForm = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'toExternalForm', r'()Ljava/lang/String;'); + static final _id_toExternalForm = _class.instanceMethodId( + r"toExternalForm", + r"()Ljava/lang/String;", + ); /// from: public java.lang.String toExternalForm() /// The returned object must be released after use, by calling the [release] method. - jni.JString toExternalForm() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_toExternalForm, - jni.JniCallType.objectType, []).object); + jni.JString toExternalForm() { + return _id_toExternalForm(this, const jni.JStringType(), []); + } - static final _id_toURI = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'toURI', r'()Ljava/net/URI;'); + static final _id_toURI = _class.instanceMethodId( + r"toURI", + r"()Ljava/net/URI;", + ); /// from: public java.net.URI toURI() /// The returned object must be released after use, by calling the [release] method. - jni.JObject toURI() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_toURI, jni.JniCallType.objectType, []).object); + jni.JObject toURI() { + return _id_toURI(this, const jni.JObjectType(), []); + } - static final _id_openConnection = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'openConnection', r'()Ljava/net/URLConnection;'); + static final _id_openConnection = _class.instanceMethodId( + r"openConnection", + r"()Ljava/net/URLConnection;", + ); /// from: public java.net.URLConnection openConnection() /// The returned object must be released after use, by calling the [release] method. - jni.JObject openConnection() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_openConnection, - jni.JniCallType.objectType, []).object); + jni.JObject openConnection() { + return _id_openConnection(this, const jni.JObjectType(), []); + } - static final _id_openConnection1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'openConnection', - r'(Ljava/net/Proxy;)Ljava/net/URLConnection;'); + static final _id_openConnection1 = _class.instanceMethodId( + r"openConnection", + r"(Ljava/net/Proxy;)Ljava/net/URLConnection;", + ); /// from: public java.net.URLConnection openConnection(java.net.Proxy proxy) /// The returned object must be released after use, by calling the [release] method. jni.JObject openConnection1( jni.JObject proxy, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_openConnection1, - jni.JniCallType.objectType, - [proxy.reference]).object); + ) { + return _id_openConnection1( + this, const jni.JObjectType(), [proxy.reference.pointer]); + } - static final _id_openStream = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'openStream', r'()Ljava/io/InputStream;'); + static final _id_openStream = _class.instanceMethodId( + r"openStream", + r"()Ljava/io/InputStream;", + ); /// from: public java.io.InputStream openStream() /// The returned object must be released after use, by calling the [release] method. - jni.JObject openStream() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_openStream, jni.JniCallType.objectType, []).object); + jni.JObject openStream() { + return _id_openStream(this, const jni.JObjectType(), []); + } - static final _id_getContent = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getContent', r'()Ljava/lang/Object;'); + static final _id_getContent = _class.instanceMethodId( + r"getContent", + r"()Ljava/lang/Object;", + ); /// from: public java.lang.Object getContent() /// The returned object must be released after use, by calling the [release] method. - jni.JObject getContent() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getContent, jni.JniCallType.objectType, []).object); + jni.JObject getContent() { + return _id_getContent(this, const jni.JObjectType(), []); + } - static final _id_getContent1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'getContent', - r'([Ljava/lang/Class;)Ljava/lang/Object;'); + static final _id_getContent1 = _class.instanceMethodId( + r"getContent", + r"([Ljava/lang/Class;)Ljava/lang/Object;", + ); /// from: public java.lang.Object getContent(java.lang.Class[] classs) /// The returned object must be released after use, by calling the [release] method. jni.JObject getContent1( jni.JArray classs, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getContent1, - jni.JniCallType.objectType, - [classs.reference]).object); + ) { + return _id_getContent1( + this, const jni.JObjectType(), [classs.reference.pointer]); + } - static final _id_setURLStreamHandlerFactory = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r'setURLStreamHandlerFactory', - r'(Ljava/net/URLStreamHandlerFactory;)V'); + static final _id_setURLStreamHandlerFactory = _class.staticMethodId( + r"setURLStreamHandlerFactory", + r"(Ljava/net/URLStreamHandlerFactory;)V", + ); /// from: static public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory uRLStreamHandlerFactory) static void setURLStreamHandlerFactory( jni.JObject uRLStreamHandlerFactory, - ) => - jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setURLStreamHandlerFactory, - jni.JniCallType.voidType, - [uRLStreamHandlerFactory.reference]).check(); + ) { + _id_setURLStreamHandlerFactory(_class, const jni.jvoidType(), + [uRLStreamHandlerFactory.reference.pointer]); + } } final class $URLType extends jni.JObjType { const $URLType(); @override - String get signature => r'Ljava/net/URL;'; + String get signature => r"Ljava/net/URL;"; @override - URL fromRef(jni.JObjectPtr ref) => URL.fromRef(ref); + URL fromReference(jni.JReference reference) => URL.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -851,8 +892,9 @@ final class $URLType extends jni.JObjType { int get hashCode => ($URLType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $URLType && other is $URLType; + bool operator ==(Object other) { + return other.runtimeType == ($URLType) && other is $URLType; + } } /// from: java.util.concurrent.Executors @@ -860,249 +902,228 @@ class Executors extends jni.JObject { @override late final jni.JObjType $type = type; - Executors.fromRef( - super.ref, - ) : super.fromRef(); + Executors.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); - static final _class = jni.Jni.findJClass(r'java/util/concurrent/Executors'); + static final _class = jni.JClass.forName(r"java/util/concurrent/Executors"); /// The type which includes information such as the signature of this class. static const type = $ExecutorsType(); - static final _id_newFixedThreadPool = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'newFixedThreadPool', - r'(I)Ljava/util/concurrent/ExecutorService;'); + static final _id_newFixedThreadPool = _class.staticMethodId( + r"newFixedThreadPool", + r"(I)Ljava/util/concurrent/ExecutorService;", + ); /// from: static public java.util.concurrent.ExecutorService newFixedThreadPool(int i) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newFixedThreadPool( int i, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_newFixedThreadPool, - jni.JniCallType.objectType, [jni.JValueInt(i)]).object); + ) { + return _id_newFixedThreadPool( + _class, const jni.JObjectType(), [jni.JValueInt(i)]); + } - static final _id_newWorkStealingPool = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'newWorkStealingPool', - r'(I)Ljava/util/concurrent/ExecutorService;'); + static final _id_newWorkStealingPool = _class.staticMethodId( + r"newWorkStealingPool", + r"(I)Ljava/util/concurrent/ExecutorService;", + ); /// from: static public java.util.concurrent.ExecutorService newWorkStealingPool(int i) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newWorkStealingPool( int i, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_newWorkStealingPool, - jni.JniCallType.objectType, [jni.JValueInt(i)]).object); + ) { + return _id_newWorkStealingPool( + _class, const jni.JObjectType(), [jni.JValueInt(i)]); + } - static final _id_newWorkStealingPool1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'newWorkStealingPool', - r'()Ljava/util/concurrent/ExecutorService;'); + static final _id_newWorkStealingPool1 = _class.staticMethodId( + r"newWorkStealingPool", + r"()Ljava/util/concurrent/ExecutorService;", + ); /// from: static public java.util.concurrent.ExecutorService newWorkStealingPool() /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newWorkStealingPool1() => const jni.JObjectType().fromRef( - jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_newWorkStealingPool1, jni.JniCallType.objectType, []).object); + static jni.JObject newWorkStealingPool1() { + return _id_newWorkStealingPool1(_class, const jni.JObjectType(), []); + } - static final _id_newFixedThreadPool1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'newFixedThreadPool', - r'(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;'); + static final _id_newFixedThreadPool1 = _class.staticMethodId( + r"newFixedThreadPool", + r"(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;", + ); /// from: static public java.util.concurrent.ExecutorService newFixedThreadPool(int i, java.util.concurrent.ThreadFactory threadFactory) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newFixedThreadPool1( int i, jni.JObject threadFactory, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_newFixedThreadPool1, - jni.JniCallType.objectType, - [jni.JValueInt(i), threadFactory.reference]).object); - - static final _id_newSingleThreadExecutor = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r'newSingleThreadExecutor', - r'()Ljava/util/concurrent/ExecutorService;'); + ) { + return _id_newFixedThreadPool1(_class, const jni.JObjectType(), + [jni.JValueInt(i), threadFactory.reference.pointer]); + } + + static final _id_newSingleThreadExecutor = _class.staticMethodId( + r"newSingleThreadExecutor", + r"()Ljava/util/concurrent/ExecutorService;", + ); /// from: static public java.util.concurrent.ExecutorService newSingleThreadExecutor() /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newSingleThreadExecutor() => const jni.JObjectType() - .fromRef(jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_newSingleThreadExecutor, jni.JniCallType.objectType, []).object); + static jni.JObject newSingleThreadExecutor() { + return _id_newSingleThreadExecutor(_class, const jni.JObjectType(), []); + } - static final _id_newSingleThreadExecutor1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'newSingleThreadExecutor', - r'(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;'); + static final _id_newSingleThreadExecutor1 = _class.staticMethodId( + r"newSingleThreadExecutor", + r"(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;", + ); /// from: static public java.util.concurrent.ExecutorService newSingleThreadExecutor(java.util.concurrent.ThreadFactory threadFactory) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newSingleThreadExecutor1( jni.JObject threadFactory, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_newSingleThreadExecutor1, - jni.JniCallType.objectType, - [threadFactory.reference]).object); - - static final _id_newCachedThreadPool = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'newCachedThreadPool', - r'()Ljava/util/concurrent/ExecutorService;'); + ) { + return _id_newSingleThreadExecutor1( + _class, const jni.JObjectType(), [threadFactory.reference.pointer]); + } + + static final _id_newCachedThreadPool = _class.staticMethodId( + r"newCachedThreadPool", + r"()Ljava/util/concurrent/ExecutorService;", + ); /// from: static public java.util.concurrent.ExecutorService newCachedThreadPool() /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newCachedThreadPool() => const jni.JObjectType().fromRef( - jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_newCachedThreadPool, jni.JniCallType.objectType, []).object); + static jni.JObject newCachedThreadPool() { + return _id_newCachedThreadPool(_class, const jni.JObjectType(), []); + } - static final _id_newCachedThreadPool1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'newCachedThreadPool', - r'(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;'); + static final _id_newCachedThreadPool1 = _class.staticMethodId( + r"newCachedThreadPool", + r"(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;", + ); /// from: static public java.util.concurrent.ExecutorService newCachedThreadPool(java.util.concurrent.ThreadFactory threadFactory) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newCachedThreadPool1( jni.JObject threadFactory, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_newCachedThreadPool1, - jni.JniCallType.objectType, [threadFactory.reference]).object); + ) { + return _id_newCachedThreadPool1( + _class, const jni.JObjectType(), [threadFactory.reference.pointer]); + } - static final _id_newSingleThreadScheduledExecutor = jni.Jni.accessors - .getStaticMethodIDOf( - _class.reference, - r'newSingleThreadScheduledExecutor', - r'()Ljava/util/concurrent/ScheduledExecutorService;'); + static final _id_newSingleThreadScheduledExecutor = _class.staticMethodId( + r"newSingleThreadScheduledExecutor", + r"()Ljava/util/concurrent/ScheduledExecutorService;", + ); /// from: static public java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor() /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newSingleThreadScheduledExecutor() => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_newSingleThreadScheduledExecutor, - jni.JniCallType.objectType, []).object); + static jni.JObject newSingleThreadScheduledExecutor() { + return _id_newSingleThreadScheduledExecutor( + _class, const jni.JObjectType(), []); + } - static final _id_newSingleThreadScheduledExecutor1 = jni.Jni.accessors - .getStaticMethodIDOf( - _class.reference, - r'newSingleThreadScheduledExecutor', - r'(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;'); + static final _id_newSingleThreadScheduledExecutor1 = _class.staticMethodId( + r"newSingleThreadScheduledExecutor", + r"(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;", + ); /// from: static public java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory threadFactory) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newSingleThreadScheduledExecutor1( jni.JObject threadFactory, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_newSingleThreadScheduledExecutor1, - jni.JniCallType.objectType, - [threadFactory.reference]).object); - - static final _id_newScheduledThreadPool = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r'newScheduledThreadPool', - r'(I)Ljava/util/concurrent/ScheduledExecutorService;'); + ) { + return _id_newSingleThreadScheduledExecutor1( + _class, const jni.JObjectType(), [threadFactory.reference.pointer]); + } + + static final _id_newScheduledThreadPool = _class.staticMethodId( + r"newScheduledThreadPool", + r"(I)Ljava/util/concurrent/ScheduledExecutorService;", + ); /// from: static public java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int i) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newScheduledThreadPool( int i, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_newScheduledThreadPool, - jni.JniCallType.objectType, - [jni.JValueInt(i)]).object); - - static final _id_newScheduledThreadPool1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'newScheduledThreadPool', - r'(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;'); + ) { + return _id_newScheduledThreadPool( + _class, const jni.JObjectType(), [jni.JValueInt(i)]); + } + + static final _id_newScheduledThreadPool1 = _class.staticMethodId( + r"newScheduledThreadPool", + r"(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;", + ); /// from: static public java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int i, java.util.concurrent.ThreadFactory threadFactory) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newScheduledThreadPool1( int i, jni.JObject threadFactory, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_newScheduledThreadPool1, - jni.JniCallType.objectType, - [jni.JValueInt(i), threadFactory.reference]).object); - - static final _id_unconfigurableExecutorService = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r'unconfigurableExecutorService', - r'(Ljava/util/concurrent/ExecutorService;)Ljava/util/concurrent/ExecutorService;'); + ) { + return _id_newScheduledThreadPool1(_class, const jni.JObjectType(), + [jni.JValueInt(i), threadFactory.reference.pointer]); + } + + static final _id_unconfigurableExecutorService = _class.staticMethodId( + r"unconfigurableExecutorService", + r"(Ljava/util/concurrent/ExecutorService;)Ljava/util/concurrent/ExecutorService;", + ); /// from: static public java.util.concurrent.ExecutorService unconfigurableExecutorService(java.util.concurrent.ExecutorService executorService) /// The returned object must be released after use, by calling the [release] method. static jni.JObject unconfigurableExecutorService( jni.JObject executorService, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_unconfigurableExecutorService, - jni.JniCallType.objectType, - [executorService.reference]).object); - - static final _id_unconfigurableScheduledExecutorService = jni.Jni.accessors - .getStaticMethodIDOf( - _class.reference, - r'unconfigurableScheduledExecutorService', - r'(Ljava/util/concurrent/ScheduledExecutorService;)Ljava/util/concurrent/ScheduledExecutorService;'); + ) { + return _id_unconfigurableExecutorService( + _class, const jni.JObjectType(), [executorService.reference.pointer]); + } + + static final _id_unconfigurableScheduledExecutorService = + _class.staticMethodId( + r"unconfigurableScheduledExecutorService", + r"(Ljava/util/concurrent/ScheduledExecutorService;)Ljava/util/concurrent/ScheduledExecutorService;", + ); /// from: static public java.util.concurrent.ScheduledExecutorService unconfigurableScheduledExecutorService(java.util.concurrent.ScheduledExecutorService scheduledExecutorService) /// The returned object must be released after use, by calling the [release] method. static jni.JObject unconfigurableScheduledExecutorService( jni.JObject scheduledExecutorService, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_unconfigurableScheduledExecutorService, - jni.JniCallType.objectType, - [scheduledExecutorService.reference]).object); - - static final _id_defaultThreadFactory = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'defaultThreadFactory', - r'()Ljava/util/concurrent/ThreadFactory;'); + ) { + return _id_unconfigurableScheduledExecutorService(_class, + const jni.JObjectType(), [scheduledExecutorService.reference.pointer]); + } + + static final _id_defaultThreadFactory = _class.staticMethodId( + r"defaultThreadFactory", + r"()Ljava/util/concurrent/ThreadFactory;", + ); /// from: static public java.util.concurrent.ThreadFactory defaultThreadFactory() /// The returned object must be released after use, by calling the [release] method. - static jni.JObject defaultThreadFactory() => const jni.JObjectType().fromRef( - jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_defaultThreadFactory, jni.JniCallType.objectType, []).object); + static jni.JObject defaultThreadFactory() { + return _id_defaultThreadFactory(_class, const jni.JObjectType(), []); + } - static final _id_privilegedThreadFactory = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r'privilegedThreadFactory', - r'()Ljava/util/concurrent/ThreadFactory;'); + static final _id_privilegedThreadFactory = _class.staticMethodId( + r"privilegedThreadFactory", + r"()Ljava/util/concurrent/ThreadFactory;", + ); /// from: static public java.util.concurrent.ThreadFactory privilegedThreadFactory() /// The returned object must be released after use, by calling the [release] method. - static jni.JObject privilegedThreadFactory() => const jni.JObjectType() - .fromRef(jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_privilegedThreadFactory, jni.JniCallType.objectType, []).object); + static jni.JObject privilegedThreadFactory() { + return _id_privilegedThreadFactory(_class, const jni.JObjectType(), []); + } - static final _id_callable = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'callable', - r'(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Callable;'); + static final _id_callable = _class.staticMethodId( + r"callable", + r"(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Callable;", + ); /// from: static public java.util.concurrent.Callable callable(java.lang.Runnable runnable, T object) /// The returned object must be released after use, by calling the [release] method. @@ -1114,79 +1135,72 @@ class Executors extends jni.JObject { T ??= jni.lowestCommonSuperType([ object.$type, ]) as jni.JObjType<$T>; - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_callable, - jni.JniCallType.objectType, - [runnable.reference, object.reference]).object); + return _id_callable(_class, const jni.JObjectType(), + [runnable.reference.pointer, object.reference.pointer]); } - static final _id_callable1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'callable', - r'(Ljava/lang/Runnable;)Ljava/util/concurrent/Callable;'); + static final _id_callable1 = _class.staticMethodId( + r"callable", + r"(Ljava/lang/Runnable;)Ljava/util/concurrent/Callable;", + ); /// from: static public java.util.concurrent.Callable callable(java.lang.Runnable runnable) /// The returned object must be released after use, by calling the [release] method. static jni.JObject callable1( jni.JObject runnable, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_callable1, - jni.JniCallType.objectType, [runnable.reference]).object); + ) { + return _id_callable1( + _class, const jni.JObjectType(), [runnable.reference.pointer]); + } - static final _id_callable2 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'callable', - r'(Ljava/security/PrivilegedAction;)Ljava/util/concurrent/Callable;'); + static final _id_callable2 = _class.staticMethodId( + r"callable", + r"(Ljava/security/PrivilegedAction;)Ljava/util/concurrent/Callable;", + ); /// from: static public java.util.concurrent.Callable callable(java.security.PrivilegedAction privilegedAction) /// The returned object must be released after use, by calling the [release] method. static jni.JObject callable2( jni.JObject privilegedAction, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_callable2, - jni.JniCallType.objectType, [privilegedAction.reference]).object); + ) { + return _id_callable2( + _class, const jni.JObjectType(), [privilegedAction.reference.pointer]); + } - static final _id_callable3 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'callable', - r'(Ljava/security/PrivilegedExceptionAction;)Ljava/util/concurrent/Callable;'); + static final _id_callable3 = _class.staticMethodId( + r"callable", + r"(Ljava/security/PrivilegedExceptionAction;)Ljava/util/concurrent/Callable;", + ); /// from: static public java.util.concurrent.Callable callable(java.security.PrivilegedExceptionAction privilegedExceptionAction) /// The returned object must be released after use, by calling the [release] method. static jni.JObject callable3( jni.JObject privilegedExceptionAction, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_callable3, - jni.JniCallType.objectType, - [privilegedExceptionAction.reference]).object); - - static final _id_privilegedCallable = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'privilegedCallable', - r'(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;'); + ) { + return _id_callable3(_class, const jni.JObjectType(), + [privilegedExceptionAction.reference.pointer]); + } + + static final _id_privilegedCallable = _class.staticMethodId( + r"privilegedCallable", + r"(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;", + ); /// from: static public java.util.concurrent.Callable privilegedCallable(java.util.concurrent.Callable callable) /// The returned object must be released after use, by calling the [release] method. static jni.JObject privilegedCallable<$T extends jni.JObject>( jni.JObject callable, { required jni.JObjType<$T> T, - }) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_privilegedCallable, - jni.JniCallType.objectType, [callable.reference]).object); + }) { + return _id_privilegedCallable( + _class, const jni.JObjectType(), [callable.reference.pointer]); + } - static final _id_privilegedCallableUsingCurrentClassLoader = jni.Jni.accessors - .getStaticMethodIDOf( - _class.reference, - r'privilegedCallableUsingCurrentClassLoader', - r'(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;'); + static final _id_privilegedCallableUsingCurrentClassLoader = + _class.staticMethodId( + r"privilegedCallableUsingCurrentClassLoader", + r"(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;", + ); /// from: static public java.util.concurrent.Callable privilegedCallableUsingCurrentClassLoader(java.util.concurrent.Callable callable) /// The returned object must be released after use, by calling the [release] method. @@ -1194,23 +1208,21 @@ class Executors extends jni.JObject { privilegedCallableUsingCurrentClassLoader<$T extends jni.JObject>( jni.JObject callable, { required jni.JObjType<$T> T, - }) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_privilegedCallableUsingCurrentClassLoader, - jni.JniCallType.objectType, - [callable.reference]).object); + }) { + return _id_privilegedCallableUsingCurrentClassLoader( + _class, const jni.JObjectType(), [callable.reference.pointer]); + } } final class $ExecutorsType extends jni.JObjType { const $ExecutorsType(); @override - String get signature => r'Ljava/util/concurrent/Executors;'; + String get signature => r"Ljava/util/concurrent/Executors;"; @override - Executors fromRef(jni.JObjectPtr ref) => Executors.fromRef(ref); + Executors fromReference(jni.JReference reference) => + Executors.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -1222,8 +1234,9 @@ final class $ExecutorsType extends jni.JObjType { int get hashCode => ($ExecutorsType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $ExecutorsType && other is $ExecutorsType; + bool operator ==(Object other) { + return other.runtimeType == ($ExecutorsType) && other is $ExecutorsType; + } } /// from: org.chromium.net.CronetEngine$Builder$LibraryLoader @@ -1231,33 +1244,37 @@ class CronetEngine_Builder_LibraryLoader extends jni.JObject { @override late final jni.JObjType $type = type; - CronetEngine_Builder_LibraryLoader.fromRef( - super.ref, - ) : super.fromRef(); + CronetEngine_Builder_LibraryLoader.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); - static final _class = jni.Jni.findJClass( - r'org/chromium/net/CronetEngine$Builder$LibraryLoader'); + static final _class = jni.JClass.forName( + r"org/chromium/net/CronetEngine$Builder$LibraryLoader"); /// The type which includes information such as the signature of this class. static const type = $CronetEngine_Builder_LibraryLoaderType(); - static final _id_new0 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + static final _id_new0 = _class.constructorId( + r"()V", + ); /// from: public void () /// The returned object must be released after use, by calling the [release] method. - factory CronetEngine_Builder_LibraryLoader() => - CronetEngine_Builder_LibraryLoader.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_new0, []).object); + factory CronetEngine_Builder_LibraryLoader() { + return CronetEngine_Builder_LibraryLoader.fromReference( + _id_new0(_class, referenceType, [])); + } - static final _id_loadLibrary = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'loadLibrary', r'(Ljava/lang/String;)V'); + static final _id_loadLibrary = _class.instanceMethodId( + r"loadLibrary", + r"(Ljava/lang/String;)V", + ); /// from: public abstract void loadLibrary(java.lang.String string) void loadLibrary( jni.JString string, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_loadLibrary, - jni.JniCallType.voidType, [string.reference]).check(); + ) { + _id_loadLibrary(this, const jni.jvoidType(), [string.reference.pointer]); + } } final class $CronetEngine_Builder_LibraryLoaderType @@ -1266,11 +1283,11 @@ final class $CronetEngine_Builder_LibraryLoaderType @override String get signature => - r'Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;'; + r"Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;"; @override - CronetEngine_Builder_LibraryLoader fromRef(jni.JObjectPtr ref) => - CronetEngine_Builder_LibraryLoader.fromRef(ref); + CronetEngine_Builder_LibraryLoader fromReference(jni.JReference reference) => + CronetEngine_Builder_LibraryLoader.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -1282,9 +1299,10 @@ final class $CronetEngine_Builder_LibraryLoaderType int get hashCode => ($CronetEngine_Builder_LibraryLoaderType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $CronetEngine_Builder_LibraryLoaderType && - other is $CronetEngine_Builder_LibraryLoaderType; + bool operator ==(Object other) { + return other.runtimeType == ($CronetEngine_Builder_LibraryLoaderType) && + other is $CronetEngine_Builder_LibraryLoaderType; + } } /// from: org.chromium.net.CronetEngine$Builder @@ -1292,27 +1310,24 @@ class CronetEngine_Builder extends jni.JObject { @override late final jni.JObjType $type = type; - CronetEngine_Builder.fromRef( - super.ref, - ) : super.fromRef(); + CronetEngine_Builder.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); static final _class = - jni.Jni.findJClass(r'org/chromium/net/CronetEngine$Builder'); + jni.JClass.forName(r"org/chromium/net/CronetEngine$Builder"); /// The type which includes information such as the signature of this class. static const type = $CronetEngine_BuilderType(); - static final _id_mBuilderDelegate = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r'mBuilderDelegate', - r'Lorg/chromium/net/ICronetEngineBuilder;', + static final _id_mBuilderDelegate = _class.instanceFieldId( + r"mBuilderDelegate", + r"Lorg/chromium/net/ICronetEngineBuilder;", ); /// from: protected final org.chromium.net.ICronetEngineBuilder mBuilderDelegate /// The returned object must be released after use, by calling the [release] method. jni.JObject get mBuilderDelegate => - const jni.JObjectType().fromRef(jni.Jni.accessors - .getField(reference, _id_mBuilderDelegate, jni.JniCallType.objectType) - .object); + _id_mBuilderDelegate.get(this, const jni.JObjectType()); /// from: static public final int HTTP_CACHE_DISABLED static const HTTP_CACHE_DISABLED = 0; @@ -1325,157 +1340,158 @@ class CronetEngine_Builder extends jni.JObject { /// from: static public final int HTTP_CACHE_DISK static const HTTP_CACHE_DISK = 3; - - static final _id_new0 = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'', r'(Landroid/content/Context;)V'); + static final _id_new0 = _class.constructorId( + r"(Landroid/content/Context;)V", + ); /// from: public void (android.content.Context context) /// The returned object must be released after use, by calling the [release] method. factory CronetEngine_Builder( jni.JObject context, - ) => - CronetEngine_Builder.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_new0, [context.reference]).object); + ) { + return CronetEngine_Builder.fromReference( + _id_new0(_class, referenceType, [context.reference.pointer])); + } - static final _id_new1 = jni.Jni.accessors.getMethodIDOf(_class.reference, - r'', r'(Lorg/chromium/net/ICronetEngineBuilder;)V'); + static final _id_new1 = _class.constructorId( + r"(Lorg/chromium/net/ICronetEngineBuilder;)V", + ); /// from: public void (org.chromium.net.ICronetEngineBuilder iCronetEngineBuilder) /// The returned object must be released after use, by calling the [release] method. factory CronetEngine_Builder.new1( jni.JObject iCronetEngineBuilder, - ) => - CronetEngine_Builder.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_new1, [iCronetEngineBuilder.reference]).object); + ) { + return CronetEngine_Builder.fromReference(_id_new1( + _class, referenceType, [iCronetEngineBuilder.reference.pointer])); + } - static final _id_getDefaultUserAgent = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'getDefaultUserAgent', r'()Ljava/lang/String;'); + static final _id_getDefaultUserAgent = _class.instanceMethodId( + r"getDefaultUserAgent", + r"()Ljava/lang/String;", + ); /// from: public java.lang.String getDefaultUserAgent() /// The returned object must be released after use, by calling the [release] method. - jni.JString getDefaultUserAgent() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getDefaultUserAgent, - jni.JniCallType.objectType, []).object); + jni.JString getDefaultUserAgent() { + return _id_getDefaultUserAgent(this, const jni.JStringType(), []); + } - static final _id_setUserAgent = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setUserAgent', - r'(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;'); + static final _id_setUserAgent = _class.instanceMethodId( + r"setUserAgent", + r"(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;", + ); /// from: public org.chromium.net.CronetEngine$Builder setUserAgent(java.lang.String string) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder setUserAgent( jni.JString string, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setUserAgent, - jni.JniCallType.objectType, [string.reference]).object); + ) { + return _id_setUserAgent( + this, const $CronetEngine_BuilderType(), [string.reference.pointer]); + } - static final _id_setStoragePath = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setStoragePath', - r'(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;'); + static final _id_setStoragePath = _class.instanceMethodId( + r"setStoragePath", + r"(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;", + ); /// from: public org.chromium.net.CronetEngine$Builder setStoragePath(java.lang.String string) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder setStoragePath( jni.JString string, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setStoragePath, - jni.JniCallType.objectType, [string.reference]).object); + ) { + return _id_setStoragePath( + this, const $CronetEngine_BuilderType(), [string.reference.pointer]); + } - static final _id_setLibraryLoader = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setLibraryLoader', - r'(Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;)Lorg/chromium/net/CronetEngine$Builder;'); + static final _id_setLibraryLoader = _class.instanceMethodId( + r"setLibraryLoader", + r"(Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;)Lorg/chromium/net/CronetEngine$Builder;", + ); /// from: public org.chromium.net.CronetEngine$Builder setLibraryLoader(org.chromium.net.CronetEngine$Builder$LibraryLoader libraryLoader) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder setLibraryLoader( CronetEngine_Builder_LibraryLoader libraryLoader, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setLibraryLoader, - jni.JniCallType.objectType, [libraryLoader.reference]).object); + ) { + return _id_setLibraryLoader(this, const $CronetEngine_BuilderType(), + [libraryLoader.reference.pointer]); + } - static final _id_enableQuic = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'enableQuic', - r'(Z)Lorg/chromium/net/CronetEngine$Builder;'); + static final _id_enableQuic = _class.instanceMethodId( + r"enableQuic", + r"(Z)Lorg/chromium/net/CronetEngine$Builder;", + ); /// from: public org.chromium.net.CronetEngine$Builder enableQuic(boolean z) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableQuic( bool z, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_enableQuic, - jni.JniCallType.objectType, [z ? 1 : 0]).object); + ) { + return _id_enableQuic(this, const $CronetEngine_BuilderType(), [z ? 1 : 0]); + } - static final _id_enableHttp2 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'enableHttp2', - r'(Z)Lorg/chromium/net/CronetEngine$Builder;'); + static final _id_enableHttp2 = _class.instanceMethodId( + r"enableHttp2", + r"(Z)Lorg/chromium/net/CronetEngine$Builder;", + ); /// from: public org.chromium.net.CronetEngine$Builder enableHttp2(boolean z) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableHttp2( bool z, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_enableHttp2, - jni.JniCallType.objectType, [z ? 1 : 0]).object); + ) { + return _id_enableHttp2( + this, const $CronetEngine_BuilderType(), [z ? 1 : 0]); + } - static final _id_enableSdch = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'enableSdch', - r'(Z)Lorg/chromium/net/CronetEngine$Builder;'); + static final _id_enableSdch = _class.instanceMethodId( + r"enableSdch", + r"(Z)Lorg/chromium/net/CronetEngine$Builder;", + ); /// from: public org.chromium.net.CronetEngine$Builder enableSdch(boolean z) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableSdch( bool z, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_enableSdch, - jni.JniCallType.objectType, [z ? 1 : 0]).object); + ) { + return _id_enableSdch(this, const $CronetEngine_BuilderType(), [z ? 1 : 0]); + } - static final _id_enableBrotli = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'enableBrotli', - r'(Z)Lorg/chromium/net/CronetEngine$Builder;'); + static final _id_enableBrotli = _class.instanceMethodId( + r"enableBrotli", + r"(Z)Lorg/chromium/net/CronetEngine$Builder;", + ); /// from: public org.chromium.net.CronetEngine$Builder enableBrotli(boolean z) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableBrotli( bool z, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_enableBrotli, - jni.JniCallType.objectType, [z ? 1 : 0]).object); + ) { + return _id_enableBrotli( + this, const $CronetEngine_BuilderType(), [z ? 1 : 0]); + } - static final _id_enableHttpCache = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'enableHttpCache', - r'(IJ)Lorg/chromium/net/CronetEngine$Builder;'); + static final _id_enableHttpCache = _class.instanceMethodId( + r"enableHttpCache", + r"(IJ)Lorg/chromium/net/CronetEngine$Builder;", + ); /// from: public org.chromium.net.CronetEngine$Builder enableHttpCache(int i, long j) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableHttpCache( int i, int j, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_enableHttpCache, - jni.JniCallType.objectType, [jni.JValueInt(i), j]).object); + ) { + return _id_enableHttpCache( + this, const $CronetEngine_BuilderType(), [jni.JValueInt(i), j]); + } - static final _id_addQuicHint = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'addQuicHint', - r'(Ljava/lang/String;II)Lorg/chromium/net/CronetEngine$Builder;'); + static final _id_addQuicHint = _class.instanceMethodId( + r"addQuicHint", + r"(Ljava/lang/String;II)Lorg/chromium/net/CronetEngine$Builder;", + ); /// from: public org.chromium.net.CronetEngine$Builder addQuicHint(java.lang.String string, int i, int i1) /// The returned object must be released after use, by calling the [release] method. @@ -1483,18 +1499,15 @@ class CronetEngine_Builder extends jni.JObject { jni.JString string, int i, int i1, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs( - reference, - _id_addQuicHint, - jni.JniCallType.objectType, - [string.reference, jni.JValueInt(i), jni.JValueInt(i1)]).object); - - static final _id_addPublicKeyPins = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'addPublicKeyPins', - r'(Ljava/lang/String;Ljava/util/Set;ZLjava/util/Date;)Lorg/chromium/net/CronetEngine$Builder;'); + ) { + return _id_addQuicHint(this, const $CronetEngine_BuilderType(), + [string.reference.pointer, jni.JValueInt(i), jni.JValueInt(i1)]); + } + + static final _id_addPublicKeyPins = _class.instanceMethodId( + r"addPublicKeyPins", + r"(Ljava/lang/String;Ljava/util/Set;ZLjava/util/Date;)Lorg/chromium/net/CronetEngine$Builder;", + ); /// from: public org.chromium.net.CronetEngine$Builder addPublicKeyPins(java.lang.String string, java.util.Set set, boolean z, java.util.Date date) /// The returned object must be released after use, by calling the [release] method. @@ -1503,42 +1516,40 @@ class CronetEngine_Builder extends jni.JObject { jni.JSet> set0, bool z, jni.JObject date, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs( - reference, _id_addPublicKeyPins, jni.JniCallType.objectType, [ - string.reference, - set0.reference, - z ? 1 : 0, - date.reference - ]).object); + ) { + return _id_addPublicKeyPins(this, const $CronetEngine_BuilderType(), [ + string.reference.pointer, + set0.reference.pointer, + z ? 1 : 0, + date.reference.pointer + ]); + } static final _id_enablePublicKeyPinningBypassForLocalTrustAnchors = - jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'enablePublicKeyPinningBypassForLocalTrustAnchors', - r'(Z)Lorg/chromium/net/CronetEngine$Builder;'); + _class.instanceMethodId( + r"enablePublicKeyPinningBypassForLocalTrustAnchors", + r"(Z)Lorg/chromium/net/CronetEngine$Builder;", + ); /// from: public org.chromium.net.CronetEngine$Builder enablePublicKeyPinningBypassForLocalTrustAnchors(boolean z) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enablePublicKeyPinningBypassForLocalTrustAnchors( bool z, - ) => - const $CronetEngine_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs( - reference, - _id_enablePublicKeyPinningBypassForLocalTrustAnchors, - jni.JniCallType.objectType, - [z ? 1 : 0]).object); + ) { + return _id_enablePublicKeyPinningBypassForLocalTrustAnchors( + this, const $CronetEngine_BuilderType(), [z ? 1 : 0]); + } - static final _id_build = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'build', r'()Lorg/chromium/net/CronetEngine;'); + static final _id_build = _class.instanceMethodId( + r"build", + r"()Lorg/chromium/net/CronetEngine;", + ); /// from: public org.chromium.net.CronetEngine build() /// The returned object must be released after use, by calling the [release] method. - CronetEngine build() => - const $CronetEngineType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_build, jni.JniCallType.objectType, []).object); + CronetEngine build() { + return _id_build(this, const $CronetEngineType(), []); + } } final class $CronetEngine_BuilderType @@ -1546,11 +1557,11 @@ final class $CronetEngine_BuilderType const $CronetEngine_BuilderType(); @override - String get signature => r'Lorg/chromium/net/CronetEngine$Builder;'; + String get signature => r"Lorg/chromium/net/CronetEngine$Builder;"; @override - CronetEngine_Builder fromRef(jni.JObjectPtr ref) => - CronetEngine_Builder.fromRef(ref); + CronetEngine_Builder fromReference(jni.JReference reference) => + CronetEngine_Builder.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -1562,9 +1573,10 @@ final class $CronetEngine_BuilderType int get hashCode => ($CronetEngine_BuilderType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $CronetEngine_BuilderType && - other is $CronetEngine_BuilderType; + bool operator ==(Object other) { + return other.runtimeType == ($CronetEngine_BuilderType) && + other is $CronetEngine_BuilderType; + } } /// from: org.chromium.net.CronetEngine @@ -1572,100 +1584,110 @@ class CronetEngine extends jni.JObject { @override late final jni.JObjType $type = type; - CronetEngine.fromRef( - super.ref, - ) : super.fromRef(); + CronetEngine.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); - static final _class = jni.Jni.findJClass(r'org/chromium/net/CronetEngine'); + static final _class = jni.JClass.forName(r"org/chromium/net/CronetEngine"); /// The type which includes information such as the signature of this class. static const type = $CronetEngineType(); - static final _id_new0 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + static final _id_new0 = _class.constructorId( + r"()V", + ); /// from: public void () /// The returned object must be released after use, by calling the [release] method. - factory CronetEngine() => CronetEngine.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_new0, []).object); + factory CronetEngine() { + return CronetEngine.fromReference(_id_new0(_class, referenceType, [])); + } - static final _id_getVersionString = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'getVersionString', r'()Ljava/lang/String;'); + static final _id_getVersionString = _class.instanceMethodId( + r"getVersionString", + r"()Ljava/lang/String;", + ); /// from: public abstract java.lang.String getVersionString() /// The returned object must be released after use, by calling the [release] method. - jni.JString getVersionString() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getVersionString, - jni.JniCallType.objectType, []).object); + jni.JString getVersionString() { + return _id_getVersionString(this, const jni.JStringType(), []); + } - static final _id_shutdown = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'shutdown', r'()V'); + static final _id_shutdown = _class.instanceMethodId( + r"shutdown", + r"()V", + ); /// from: public abstract void shutdown() - void shutdown() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_shutdown, jni.JniCallType.voidType, []).check(); + void shutdown() { + _id_shutdown(this, const jni.jvoidType(), []); + } - static final _id_startNetLogToFile = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'startNetLogToFile', r'(Ljava/lang/String;Z)V'); + static final _id_startNetLogToFile = _class.instanceMethodId( + r"startNetLogToFile", + r"(Ljava/lang/String;Z)V", + ); /// from: public abstract void startNetLogToFile(java.lang.String string, boolean z) void startNetLogToFile( jni.JString string, bool z, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_startNetLogToFile, - jni.JniCallType.voidType, [string.reference, z ? 1 : 0]).check(); + ) { + _id_startNetLogToFile( + this, const jni.jvoidType(), [string.reference.pointer, z ? 1 : 0]); + } - static final _id_stopNetLog = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'stopNetLog', r'()V'); + static final _id_stopNetLog = _class.instanceMethodId( + r"stopNetLog", + r"()V", + ); /// from: public abstract void stopNetLog() - void stopNetLog() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_stopNetLog, jni.JniCallType.voidType, []).check(); + void stopNetLog() { + _id_stopNetLog(this, const jni.jvoidType(), []); + } - static final _id_getGlobalMetricsDeltas = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getGlobalMetricsDeltas', r'()[B'); + static final _id_getGlobalMetricsDeltas = _class.instanceMethodId( + r"getGlobalMetricsDeltas", + r"()[B", + ); /// from: public abstract byte[] getGlobalMetricsDeltas() /// The returned object must be released after use, by calling the [release] method. - jni.JArray getGlobalMetricsDeltas() => - const jni.JArrayType(jni.jbyteType()).fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_getGlobalMetricsDeltas, - jni.JniCallType.objectType, []).object); + jni.JArray getGlobalMetricsDeltas() { + return _id_getGlobalMetricsDeltas( + this, const jni.JArrayType(jni.jbyteType()), []); + } - static final _id_openConnection = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'openConnection', - r'(Ljava/net/URL;)Ljava/net/URLConnection;'); + static final _id_openConnection = _class.instanceMethodId( + r"openConnection", + r"(Ljava/net/URL;)Ljava/net/URLConnection;", + ); /// from: public abstract java.net.URLConnection openConnection(java.net.URL uRL) /// The returned object must be released after use, by calling the [release] method. jni.JObject openConnection( URL uRL, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_openConnection, - jni.JniCallType.objectType, - [uRL.reference]).object); + ) { + return _id_openConnection( + this, const jni.JObjectType(), [uRL.reference.pointer]); + } - static final _id_createURLStreamHandlerFactory = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'createURLStreamHandlerFactory', - r'()Ljava/net/URLStreamHandlerFactory;'); + static final _id_createURLStreamHandlerFactory = _class.instanceMethodId( + r"createURLStreamHandlerFactory", + r"()Ljava/net/URLStreamHandlerFactory;", + ); /// from: public abstract java.net.URLStreamHandlerFactory createURLStreamHandlerFactory() /// The returned object must be released after use, by calling the [release] method. - jni.JObject createURLStreamHandlerFactory() => - const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_createURLStreamHandlerFactory, - jni.JniCallType.objectType, []).object); + jni.JObject createURLStreamHandlerFactory() { + return _id_createURLStreamHandlerFactory(this, const jni.JObjectType(), []); + } - static final _id_newUrlRequestBuilder = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'newUrlRequestBuilder', - r'(Ljava/lang/String;Lorg/chromium/net/UrlRequest$Callback;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;'); + static final _id_newUrlRequestBuilder = _class.instanceMethodId( + r"newUrlRequestBuilder", + r"(Ljava/lang/String;Lorg/chromium/net/UrlRequest$Callback;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;", + ); /// from: public abstract org.chromium.net.UrlRequest$Builder newUrlRequestBuilder(java.lang.String string, org.chromium.net.UrlRequest$Callback callback, java.util.concurrent.Executor executor) /// The returned object must be released after use, by calling the [release] method. @@ -1673,24 +1695,24 @@ class CronetEngine extends jni.JObject { jni.JString string, UrlRequest_Callback callback, jni.JObject executor, - ) => - const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs( - reference, _id_newUrlRequestBuilder, jni.JniCallType.objectType, [ - string.reference, - callback.reference, - executor.reference - ]).object); + ) { + return _id_newUrlRequestBuilder(this, const $UrlRequest_BuilderType(), [ + string.reference.pointer, + callback.reference.pointer, + executor.reference.pointer + ]); + } } final class $CronetEngineType extends jni.JObjType { const $CronetEngineType(); @override - String get signature => r'Lorg/chromium/net/CronetEngine;'; + String get signature => r"Lorg/chromium/net/CronetEngine;"; @override - CronetEngine fromRef(jni.JObjectPtr ref) => CronetEngine.fromRef(ref); + CronetEngine fromReference(jni.JReference reference) => + CronetEngine.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -1702,8 +1724,10 @@ final class $CronetEngineType extends jni.JObjType { int get hashCode => ($CronetEngineType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $CronetEngineType && other is $CronetEngineType; + bool operator ==(Object other) { + return other.runtimeType == ($CronetEngineType) && + other is $CronetEngineType; + } } /// from: org.chromium.net.CronetException @@ -1711,37 +1735,38 @@ class CronetException extends jni.JObject { @override late final jni.JObjType $type = type; - CronetException.fromRef( - super.ref, - ) : super.fromRef(); + CronetException.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); - static final _class = jni.Jni.findJClass(r'org/chromium/net/CronetException'); + static final _class = jni.JClass.forName(r"org/chromium/net/CronetException"); /// The type which includes information such as the signature of this class. static const type = $CronetExceptionType(); - static final _id_new0 = jni.Jni.accessors.getMethodIDOf(_class.reference, - r'', r'(Ljava/lang/String;Ljava/lang/Throwable;)V'); + static final _id_new0 = _class.constructorId( + r"(Ljava/lang/String;Ljava/lang/Throwable;)V", + ); /// from: protected void (java.lang.String string, java.lang.Throwable throwable) /// The returned object must be released after use, by calling the [release] method. factory CronetException( jni.JString string, jni.JObject throwable, - ) => - CronetException.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, - _id_new0, - [string.reference, throwable.reference]).object); + ) { + return CronetException.fromReference(_id_new0(_class, referenceType, + [string.reference.pointer, throwable.reference.pointer])); + } } final class $CronetExceptionType extends jni.JObjType { const $CronetExceptionType(); @override - String get signature => r'Lorg/chromium/net/CronetException;'; + String get signature => r"Lorg/chromium/net/CronetException;"; @override - CronetException fromRef(jni.JObjectPtr ref) => CronetException.fromRef(ref); + CronetException fromReference(jni.JReference reference) => + CronetException.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -1753,9 +1778,10 @@ final class $CronetExceptionType extends jni.JObjType { int get hashCode => ($CronetExceptionType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $CronetExceptionType && - other is $CronetExceptionType; + bool operator ==(Object other) { + return other.runtimeType == ($CronetExceptionType) && + other is $CronetExceptionType; + } } /// from: org.chromium.net.UploadDataProviders @@ -1763,64 +1789,61 @@ class UploadDataProviders extends jni.JObject { @override late final jni.JObjType $type = type; - UploadDataProviders.fromRef( - super.ref, - ) : super.fromRef(); + UploadDataProviders.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); static final _class = - jni.Jni.findJClass(r'org/chromium/net/UploadDataProviders'); + jni.JClass.forName(r"org/chromium/net/UploadDataProviders"); /// The type which includes information such as the signature of this class. static const type = $UploadDataProvidersType(); - static final _id_create = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'create', - r'(Ljava/io/File;)Lorg/chromium/net/UploadDataProvider;'); + static final _id_create = _class.staticMethodId( + r"create", + r"(Ljava/io/File;)Lorg/chromium/net/UploadDataProvider;", + ); /// from: static public org.chromium.net.UploadDataProvider create(java.io.File file) /// The returned object must be released after use, by calling the [release] method. static jni.JObject create( jni.JObject file, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_create, - jni.JniCallType.objectType, [file.reference]).object); + ) { + return _id_create( + _class, const jni.JObjectType(), [file.reference.pointer]); + } - static final _id_create1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'create', - r'(Landroid/os/ParcelFileDescriptor;)Lorg/chromium/net/UploadDataProvider;'); + static final _id_create1 = _class.staticMethodId( + r"create", + r"(Landroid/os/ParcelFileDescriptor;)Lorg/chromium/net/UploadDataProvider;", + ); /// from: static public org.chromium.net.UploadDataProvider create(android.os.ParcelFileDescriptor parcelFileDescriptor) /// The returned object must be released after use, by calling the [release] method. static jni.JObject create1( jni.JObject parcelFileDescriptor, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_create1, - jni.JniCallType.objectType, - [parcelFileDescriptor.reference]).object); - - static final _id_create2 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'create', - r'(Ljava/nio/ByteBuffer;)Lorg/chromium/net/UploadDataProvider;'); + ) { + return _id_create1(_class, const jni.JObjectType(), + [parcelFileDescriptor.reference.pointer]); + } + + static final _id_create2 = _class.staticMethodId( + r"create", + r"(Ljava/nio/ByteBuffer;)Lorg/chromium/net/UploadDataProvider;", + ); /// from: static public org.chromium.net.UploadDataProvider create(java.nio.ByteBuffer byteBuffer) /// The returned object must be released after use, by calling the [release] method. static jni.JObject create2( jni.JByteBuffer byteBuffer, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_create2, - jni.JniCallType.objectType, [byteBuffer.reference]).object); + ) { + return _id_create2( + _class, const jni.JObjectType(), [byteBuffer.reference.pointer]); + } - static final _id_create3 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'create', - r'([BII)Lorg/chromium/net/UploadDataProvider;'); + static final _id_create3 = _class.staticMethodId( + r"create", + r"([BII)Lorg/chromium/net/UploadDataProvider;", + ); /// from: static public org.chromium.net.UploadDataProvider create(byte[] bs, int i, int i1) /// The returned object must be released after use, by calling the [release] method. @@ -1828,38 +1851,34 @@ class UploadDataProviders extends jni.JObject { jni.JArray bs, int i, int i1, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_create3, - jni.JniCallType.objectType, - [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).object); - - static final _id_create4 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r'create', - r'([B)Lorg/chromium/net/UploadDataProvider;'); + ) { + return _id_create3(_class, const jni.JObjectType(), + [bs.reference.pointer, jni.JValueInt(i), jni.JValueInt(i1)]); + } + + static final _id_create4 = _class.staticMethodId( + r"create", + r"([B)Lorg/chromium/net/UploadDataProvider;", + ); /// from: static public org.chromium.net.UploadDataProvider create(byte[] bs) /// The returned object must be released after use, by calling the [release] method. static jni.JObject create4( jni.JArray bs, - ) => - const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_create4, - jni.JniCallType.objectType, [bs.reference]).object); + ) { + return _id_create4(_class, const jni.JObjectType(), [bs.reference.pointer]); + } } final class $UploadDataProvidersType extends jni.JObjType { const $UploadDataProvidersType(); @override - String get signature => r'Lorg/chromium/net/UploadDataProviders;'; + String get signature => r"Lorg/chromium/net/UploadDataProviders;"; @override - UploadDataProviders fromRef(jni.JObjectPtr ref) => - UploadDataProviders.fromRef(ref); + UploadDataProviders fromReference(jni.JReference reference) => + UploadDataProviders.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -1871,9 +1890,10 @@ final class $UploadDataProvidersType extends jni.JObjType { int get hashCode => ($UploadDataProvidersType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $UploadDataProvidersType && - other is $UploadDataProvidersType; + bool operator ==(Object other) { + return other.runtimeType == ($UploadDataProvidersType) && + other is $UploadDataProvidersType; + } } /// from: org.chromium.net.UrlRequest$Builder @@ -1881,12 +1901,12 @@ class UrlRequest_Builder extends jni.JObject { @override late final jni.JObjType $type = type; - UrlRequest_Builder.fromRef( - super.ref, - ) : super.fromRef(); + UrlRequest_Builder.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); static final _class = - jni.Jni.findJClass(r'org/chromium/net/UrlRequest$Builder'); + jni.JClass.forName(r"org/chromium/net/UrlRequest$Builder"); /// The type which includes information such as the signature of this class. static const type = $UrlRequest_BuilderType(); @@ -1905,120 +1925,118 @@ class UrlRequest_Builder extends jni.JObject { /// from: static public final int REQUEST_PRIORITY_HIGHEST static const REQUEST_PRIORITY_HIGHEST = 4; - - static final _id_new0 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + static final _id_new0 = _class.constructorId( + r"()V", + ); /// from: public void () /// The returned object must be released after use, by calling the [release] method. - factory UrlRequest_Builder() => UrlRequest_Builder.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_new0, []).object); + factory UrlRequest_Builder() { + return UrlRequest_Builder.fromReference( + _id_new0(_class, referenceType, [])); + } - static final _id_setHttpMethod = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setHttpMethod', - r'(Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;'); + static final _id_setHttpMethod = _class.instanceMethodId( + r"setHttpMethod", + r"(Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;", + ); /// from: public abstract org.chromium.net.UrlRequest$Builder setHttpMethod(java.lang.String string) /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder setHttpMethod( jni.JString string, - ) => - const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setHttpMethod, - jni.JniCallType.objectType, [string.reference]).object); + ) { + return _id_setHttpMethod( + this, const $UrlRequest_BuilderType(), [string.reference.pointer]); + } - static final _id_addHeader = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'addHeader', - r'(Ljava/lang/String;Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;'); + static final _id_addHeader = _class.instanceMethodId( + r"addHeader", + r"(Ljava/lang/String;Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;", + ); /// from: public abstract org.chromium.net.UrlRequest$Builder addHeader(java.lang.String string, java.lang.String string1) /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder addHeader( jni.JString string, jni.JString string1, - ) => - const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs( - reference, - _id_addHeader, - jni.JniCallType.objectType, - [string.reference, string1.reference]).object); - - static final _id_disableCache = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'disableCache', - r'()Lorg/chromium/net/UrlRequest$Builder;'); + ) { + return _id_addHeader(this, const $UrlRequest_BuilderType(), + [string.reference.pointer, string1.reference.pointer]); + } + + static final _id_disableCache = _class.instanceMethodId( + r"disableCache", + r"()Lorg/chromium/net/UrlRequest$Builder;", + ); /// from: public abstract org.chromium.net.UrlRequest$Builder disableCache() /// The returned object must be released after use, by calling the [release] method. - UrlRequest_Builder disableCache() => const $UrlRequest_BuilderType().fromRef( - jni.Jni.accessors.callMethodWithArgs( - reference, _id_disableCache, jni.JniCallType.objectType, []).object); + UrlRequest_Builder disableCache() { + return _id_disableCache(this, const $UrlRequest_BuilderType(), []); + } - static final _id_setPriority = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setPriority', - r'(I)Lorg/chromium/net/UrlRequest$Builder;'); + static final _id_setPriority = _class.instanceMethodId( + r"setPriority", + r"(I)Lorg/chromium/net/UrlRequest$Builder;", + ); /// from: public abstract org.chromium.net.UrlRequest$Builder setPriority(int i) /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder setPriority( int i, - ) => - const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_setPriority, - jni.JniCallType.objectType, [jni.JValueInt(i)]).object); + ) { + return _id_setPriority( + this, const $UrlRequest_BuilderType(), [jni.JValueInt(i)]); + } - static final _id_setUploadDataProvider = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'setUploadDataProvider', - r'(Lorg/chromium/net/UploadDataProvider;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;'); + static final _id_setUploadDataProvider = _class.instanceMethodId( + r"setUploadDataProvider", + r"(Lorg/chromium/net/UploadDataProvider;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;", + ); /// from: public abstract org.chromium.net.UrlRequest$Builder setUploadDataProvider(org.chromium.net.UploadDataProvider uploadDataProvider, java.util.concurrent.Executor executor) /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder setUploadDataProvider( jni.JObject uploadDataProvider, jni.JObject executor, - ) => - const $UrlRequest_BuilderType().fromRef(jni.Jni.accessors - .callMethodWithArgs( - reference, - _id_setUploadDataProvider, - jni.JniCallType.objectType, - [uploadDataProvider.reference, executor.reference]).object); - - static final _id_allowDirectExecutor = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'allowDirectExecutor', - r'()Lorg/chromium/net/UrlRequest$Builder;'); + ) { + return _id_setUploadDataProvider(this, const $UrlRequest_BuilderType(), + [uploadDataProvider.reference.pointer, executor.reference.pointer]); + } + + static final _id_allowDirectExecutor = _class.instanceMethodId( + r"allowDirectExecutor", + r"()Lorg/chromium/net/UrlRequest$Builder;", + ); /// from: public abstract org.chromium.net.UrlRequest$Builder allowDirectExecutor() /// The returned object must be released after use, by calling the [release] method. - UrlRequest_Builder allowDirectExecutor() => const $UrlRequest_BuilderType() - .fromRef(jni.Jni.accessors.callMethodWithArgs(reference, - _id_allowDirectExecutor, jni.JniCallType.objectType, []).object); + UrlRequest_Builder allowDirectExecutor() { + return _id_allowDirectExecutor(this, const $UrlRequest_BuilderType(), []); + } - static final _id_build = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'build', r'()Lorg/chromium/net/UrlRequest;'); + static final _id_build = _class.instanceMethodId( + r"build", + r"()Lorg/chromium/net/UrlRequest;", + ); /// from: public abstract org.chromium.net.UrlRequest build() /// The returned object must be released after use, by calling the [release] method. - UrlRequest build() => - const $UrlRequestType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_build, jni.JniCallType.objectType, []).object); + UrlRequest build() { + return _id_build(this, const $UrlRequestType(), []); + } } final class $UrlRequest_BuilderType extends jni.JObjType { const $UrlRequest_BuilderType(); @override - String get signature => r'Lorg/chromium/net/UrlRequest$Builder;'; + String get signature => r"Lorg/chromium/net/UrlRequest$Builder;"; @override - UrlRequest_Builder fromRef(jni.JObjectPtr ref) => - UrlRequest_Builder.fromRef(ref); + UrlRequest_Builder fromReference(jni.JReference reference) => + UrlRequest_Builder.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -2030,9 +2048,10 @@ final class $UrlRequest_BuilderType extends jni.JObjType { int get hashCode => ($UrlRequest_BuilderType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $UrlRequest_BuilderType && - other is $UrlRequest_BuilderType; + bool operator ==(Object other) { + return other.runtimeType == ($UrlRequest_BuilderType) && + other is $UrlRequest_BuilderType; + } } /// from: org.chromium.net.UrlRequest$Callback @@ -2040,135 +2059,132 @@ class UrlRequest_Callback extends jni.JObject { @override late final jni.JObjType $type = type; - UrlRequest_Callback.fromRef( - super.ref, - ) : super.fromRef(); + UrlRequest_Callback.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); static final _class = - jni.Jni.findJClass(r'org/chromium/net/UrlRequest$Callback'); + jni.JClass.forName(r"org/chromium/net/UrlRequest$Callback"); /// The type which includes information such as the signature of this class. static const type = $UrlRequest_CallbackType(); - static final _id_new0 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + static final _id_new0 = _class.constructorId( + r"()V", + ); /// from: public void () /// The returned object must be released after use, by calling the [release] method. - factory UrlRequest_Callback() => UrlRequest_Callback.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_new0, []).object); + factory UrlRequest_Callback() { + return UrlRequest_Callback.fromReference( + _id_new0(_class, referenceType, [])); + } - static final _id_onRedirectReceived = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onRedirectReceived', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V'); + static final _id_onRedirectReceived = _class.instanceMethodId( + r"onRedirectReceived", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V", + ); /// from: public abstract void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string) void onRedirectReceived( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JString string, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, _id_onRedirectReceived, jni.JniCallType.voidType, [ - urlRequest.reference, - urlResponseInfo.reference, - string.reference - ]).check(); - - static final _id_onResponseStarted = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onResponseStarted', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + ) { + _id_onRedirectReceived(this, const jni.jvoidType(), [ + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + string.reference.pointer + ]); + } + + static final _id_onResponseStarted = _class.instanceMethodId( + r"onResponseStarted", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + ); /// from: public abstract void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onResponseStarted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_onResponseStarted, - jni.JniCallType.voidType, - [urlRequest.reference, urlResponseInfo.reference]).check(); - - static final _id_onReadCompleted = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onReadCompleted', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V'); + ) { + _id_onResponseStarted(this, const jni.jvoidType(), + [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + } + + static final _id_onReadCompleted = _class.instanceMethodId( + r"onReadCompleted", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V", + ); /// from: public abstract void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer) void onReadCompleted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JByteBuffer byteBuffer, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, _id_onReadCompleted, jni.JniCallType.voidType, [ - urlRequest.reference, - urlResponseInfo.reference, - byteBuffer.reference - ]).check(); - - static final _id_onSucceeded = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onSucceeded', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + ) { + _id_onReadCompleted(this, const jni.jvoidType(), [ + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + byteBuffer.reference.pointer + ]); + } + + static final _id_onSucceeded = _class.instanceMethodId( + r"onSucceeded", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + ); /// from: public abstract void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onSucceeded( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_onSucceeded, - jni.JniCallType.voidType, - [urlRequest.reference, urlResponseInfo.reference]).check(); - - static final _id_onFailed = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onFailed', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V'); + ) { + _id_onSucceeded(this, const jni.jvoidType(), + [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + } + + static final _id_onFailed = _class.instanceMethodId( + r"onFailed", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V", + ); /// from: public abstract void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException) void onFailed( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, CronetException cronetException, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, _id_onFailed, jni.JniCallType.voidType, [ - urlRequest.reference, - urlResponseInfo.reference, - cronetException.reference - ]).check(); - - static final _id_onCanceled = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r'onCanceled', - r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V'); + ) { + _id_onFailed(this, const jni.jvoidType(), [ + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + cronetException.reference.pointer + ]); + } + + static final _id_onCanceled = _class.instanceMethodId( + r"onCanceled", + r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + ); /// from: public void onCanceled(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onCanceled( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - ) => - jni.Jni.accessors.callMethodWithArgs( - reference, - _id_onCanceled, - jni.JniCallType.voidType, - [urlRequest.reference, urlResponseInfo.reference]).check(); + ) { + _id_onCanceled(this, const jni.jvoidType(), + [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + } } final class $UrlRequest_CallbackType extends jni.JObjType { const $UrlRequest_CallbackType(); @override - String get signature => r'Lorg/chromium/net/UrlRequest$Callback;'; + String get signature => r"Lorg/chromium/net/UrlRequest$Callback;"; @override - UrlRequest_Callback fromRef(jni.JObjectPtr ref) => - UrlRequest_Callback.fromRef(ref); + UrlRequest_Callback fromReference(jni.JReference reference) => + UrlRequest_Callback.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -2180,9 +2196,10 @@ final class $UrlRequest_CallbackType extends jni.JObjType { int get hashCode => ($UrlRequest_CallbackType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $UrlRequest_CallbackType && - other is $UrlRequest_CallbackType; + bool operator ==(Object other) { + return other.runtimeType == ($UrlRequest_CallbackType) && + other is $UrlRequest_CallbackType; + } } /// from: org.chromium.net.UrlRequest$Status @@ -2190,12 +2207,12 @@ class UrlRequest_Status extends jni.JObject { @override late final jni.JObjType $type = type; - UrlRequest_Status.fromRef( - super.ref, - ) : super.fromRef(); + UrlRequest_Status.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); static final _class = - jni.Jni.findJClass(r'org/chromium/net/UrlRequest$Status'); + jni.JClass.forName(r"org/chromium/net/UrlRequest$Status"); /// The type which includes information such as the signature of this class. static const type = $UrlRequest_StatusType(); @@ -2253,11 +2270,11 @@ final class $UrlRequest_StatusType extends jni.JObjType { const $UrlRequest_StatusType(); @override - String get signature => r'Lorg/chromium/net/UrlRequest$Status;'; + String get signature => r"Lorg/chromium/net/UrlRequest$Status;"; @override - UrlRequest_Status fromRef(jni.JObjectPtr ref) => - UrlRequest_Status.fromRef(ref); + UrlRequest_Status fromReference(jni.JReference reference) => + UrlRequest_Status.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -2269,9 +2286,10 @@ final class $UrlRequest_StatusType extends jni.JObjType { int get hashCode => ($UrlRequest_StatusType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $UrlRequest_StatusType && - other is $UrlRequest_StatusType; + bool operator ==(Object other) { + return other.runtimeType == ($UrlRequest_StatusType) && + other is $UrlRequest_StatusType; + } } /// from: org.chromium.net.UrlRequest$StatusListener @@ -2279,33 +2297,37 @@ class UrlRequest_StatusListener extends jni.JObject { @override late final jni.JObjType $type = type; - UrlRequest_StatusListener.fromRef( - super.ref, - ) : super.fromRef(); + UrlRequest_StatusListener.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); static final _class = - jni.Jni.findJClass(r'org/chromium/net/UrlRequest$StatusListener'); + jni.JClass.forName(r"org/chromium/net/UrlRequest$StatusListener"); /// The type which includes information such as the signature of this class. static const type = $UrlRequest_StatusListenerType(); - static final _id_new0 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + static final _id_new0 = _class.constructorId( + r"()V", + ); /// from: public void () /// The returned object must be released after use, by calling the [release] method. - factory UrlRequest_StatusListener() => - UrlRequest_StatusListener.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_new0, []).object); + factory UrlRequest_StatusListener() { + return UrlRequest_StatusListener.fromReference( + _id_new0(_class, referenceType, [])); + } - static final _id_onStatus = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'onStatus', r'(I)V'); + static final _id_onStatus = _class.instanceMethodId( + r"onStatus", + r"(I)V", + ); /// from: public abstract void onStatus(int i) void onStatus( int i, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_onStatus, - jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); + ) { + _id_onStatus(this, const jni.jvoidType(), [jni.JValueInt(i)]); + } } final class $UrlRequest_StatusListenerType @@ -2313,11 +2335,11 @@ final class $UrlRequest_StatusListenerType const $UrlRequest_StatusListenerType(); @override - String get signature => r'Lorg/chromium/net/UrlRequest$StatusListener;'; + String get signature => r"Lorg/chromium/net/UrlRequest$StatusListener;"; @override - UrlRequest_StatusListener fromRef(jni.JObjectPtr ref) => - UrlRequest_StatusListener.fromRef(ref); + UrlRequest_StatusListener fromReference(jni.JReference reference) => + UrlRequest_StatusListener.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -2329,9 +2351,10 @@ final class $UrlRequest_StatusListenerType int get hashCode => ($UrlRequest_StatusListenerType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $UrlRequest_StatusListenerType && - other is $UrlRequest_StatusListenerType; + bool operator ==(Object other) { + return other.runtimeType == ($UrlRequest_StatusListenerType) && + other is $UrlRequest_StatusListenerType; + } } /// from: org.chromium.net.UrlRequest @@ -2339,79 +2362,99 @@ class UrlRequest extends jni.JObject { @override late final jni.JObjType $type = type; - UrlRequest.fromRef( - super.ref, - ) : super.fromRef(); + UrlRequest.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); - static final _class = jni.Jni.findJClass(r'org/chromium/net/UrlRequest'); + static final _class = jni.JClass.forName(r"org/chromium/net/UrlRequest"); /// The type which includes information such as the signature of this class. static const type = $UrlRequestType(); - static final _id_new0 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + static final _id_new0 = _class.constructorId( + r"()V", + ); /// from: public void () /// The returned object must be released after use, by calling the [release] method. - factory UrlRequest() => UrlRequest.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_new0, []).object); + factory UrlRequest() { + return UrlRequest.fromReference(_id_new0(_class, referenceType, [])); + } - static final _id_start = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'start', r'()V'); + static final _id_start = _class.instanceMethodId( + r"start", + r"()V", + ); /// from: public abstract void start() - void start() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_start, jni.JniCallType.voidType, []).check(); + void start() { + _id_start(this, const jni.jvoidType(), []); + } - static final _id_followRedirect = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'followRedirect', r'()V'); + static final _id_followRedirect = _class.instanceMethodId( + r"followRedirect", + r"()V", + ); /// from: public abstract void followRedirect() - void followRedirect() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_followRedirect, jni.JniCallType.voidType, []).check(); + void followRedirect() { + _id_followRedirect(this, const jni.jvoidType(), []); + } - static final _id_read = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'read', r'(Ljava/nio/ByteBuffer;)V'); + static final _id_read = _class.instanceMethodId( + r"read", + r"(Ljava/nio/ByteBuffer;)V", + ); /// from: public abstract void read(java.nio.ByteBuffer byteBuffer) void read( jni.JByteBuffer byteBuffer, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_read, - jni.JniCallType.voidType, [byteBuffer.reference]).check(); + ) { + _id_read(this, const jni.jvoidType(), [byteBuffer.reference.pointer]); + } - static final _id_cancel = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'cancel', r'()V'); + static final _id_cancel = _class.instanceMethodId( + r"cancel", + r"()V", + ); /// from: public abstract void cancel() - void cancel() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_cancel, jni.JniCallType.voidType, []).check(); + void cancel() { + _id_cancel(this, const jni.jvoidType(), []); + } - static final _id_isDone = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'isDone', r'()Z'); + static final _id_isDone = _class.instanceMethodId( + r"isDone", + r"()Z", + ); /// from: public abstract boolean isDone() - bool isDone() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_isDone, jni.JniCallType.booleanType, []).boolean; + bool isDone() { + return _id_isDone(this, const jni.jbooleanType(), []); + } - static final _id_getStatus = jni.Jni.accessors.getMethodIDOf(_class.reference, - r'getStatus', r'(Lorg/chromium/net/UrlRequest$StatusListener;)V'); + static final _id_getStatus = _class.instanceMethodId( + r"getStatus", + r"(Lorg/chromium/net/UrlRequest$StatusListener;)V", + ); /// from: public abstract void getStatus(org.chromium.net.UrlRequest$StatusListener statusListener) void getStatus( UrlRequest_StatusListener statusListener, - ) => - jni.Jni.accessors.callMethodWithArgs(reference, _id_getStatus, - jni.JniCallType.voidType, [statusListener.reference]).check(); + ) { + _id_getStatus( + this, const jni.jvoidType(), [statusListener.reference.pointer]); + } } final class $UrlRequestType extends jni.JObjType { const $UrlRequestType(); @override - String get signature => r'Lorg/chromium/net/UrlRequest;'; + String get signature => r"Lorg/chromium/net/UrlRequest;"; @override - UrlRequest fromRef(jni.JObjectPtr ref) => UrlRequest.fromRef(ref); + UrlRequest fromReference(jni.JReference reference) => + UrlRequest.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -2423,8 +2466,9 @@ final class $UrlRequestType extends jni.JObjType { int get hashCode => ($UrlRequestType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $UrlRequestType && other is $UrlRequestType; + bool operator ==(Object other) { + return other.runtimeType == ($UrlRequestType) && other is $UrlRequestType; + } } /// from: org.chromium.net.UrlResponseInfo$HeaderBlock @@ -2432,42 +2476,50 @@ class UrlResponseInfo_HeaderBlock extends jni.JObject { @override late final jni.JObjType $type = type; - UrlResponseInfo_HeaderBlock.fromRef( - super.ref, - ) : super.fromRef(); + UrlResponseInfo_HeaderBlock.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); static final _class = - jni.Jni.findJClass(r'org/chromium/net/UrlResponseInfo$HeaderBlock'); + jni.JClass.forName(r"org/chromium/net/UrlResponseInfo$HeaderBlock"); /// The type which includes information such as the signature of this class. static const type = $UrlResponseInfo_HeaderBlockType(); - static final _id_new0 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + static final _id_new0 = _class.constructorId( + r"()V", + ); /// from: public void () /// The returned object must be released after use, by calling the [release] method. - factory UrlResponseInfo_HeaderBlock() => - UrlResponseInfo_HeaderBlock.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_new0, []).object); + factory UrlResponseInfo_HeaderBlock() { + return UrlResponseInfo_HeaderBlock.fromReference( + _id_new0(_class, referenceType, [])); + } - static final _id_getAsList = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getAsList', r'()Ljava/util/List;'); + static final _id_getAsList = _class.instanceMethodId( + r"getAsList", + r"()Ljava/util/List;", + ); /// from: public abstract java.util.List getAsList() /// The returned object must be released after use, by calling the [release] method. - jni.JList getAsList() => const jni.JListType(jni.JObjectType()) - .fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getAsList, jni.JniCallType.objectType, []).object); + jni.JList getAsList() { + return _id_getAsList(this, const jni.JListType(jni.JObjectType()), []); + } - static final _id_getAsMap = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getAsMap', r'()Ljava/util/Map;'); + static final _id_getAsMap = _class.instanceMethodId( + r"getAsMap", + r"()Ljava/util/Map;", + ); /// from: public abstract java.util.Map getAsMap() /// The returned object must be released after use, by calling the [release] method. - jni.JMap> getAsMap() => - const jni.JMapType(jni.JStringType(), jni.JListType(jni.JStringType())) - .fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getAsMap, jni.JniCallType.objectType, []).object); + jni.JMap> getAsMap() { + return _id_getAsMap( + this, + const jni.JMapType(jni.JStringType(), jni.JListType(jni.JStringType())), + []); + } } final class $UrlResponseInfo_HeaderBlockType @@ -2475,11 +2527,11 @@ final class $UrlResponseInfo_HeaderBlockType const $UrlResponseInfo_HeaderBlockType(); @override - String get signature => r'Lorg/chromium/net/UrlResponseInfo$HeaderBlock;'; + String get signature => r"Lorg/chromium/net/UrlResponseInfo$HeaderBlock;"; @override - UrlResponseInfo_HeaderBlock fromRef(jni.JObjectPtr ref) => - UrlResponseInfo_HeaderBlock.fromRef(ref); + UrlResponseInfo_HeaderBlock fromReference(jni.JReference reference) => + UrlResponseInfo_HeaderBlock.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -2491,9 +2543,10 @@ final class $UrlResponseInfo_HeaderBlockType int get hashCode => ($UrlResponseInfo_HeaderBlockType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $UrlResponseInfo_HeaderBlockType && - other is $UrlResponseInfo_HeaderBlockType; + bool operator ==(Object other) { + return other.runtimeType == ($UrlResponseInfo_HeaderBlockType) && + other is $UrlResponseInfo_HeaderBlockType; + } } /// from: org.chromium.net.UrlResponseInfo @@ -2501,123 +2554,145 @@ class UrlResponseInfo extends jni.JObject { @override late final jni.JObjType $type = type; - UrlResponseInfo.fromRef( - super.ref, - ) : super.fromRef(); + UrlResponseInfo.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); - static final _class = jni.Jni.findJClass(r'org/chromium/net/UrlResponseInfo'); + static final _class = jni.JClass.forName(r"org/chromium/net/UrlResponseInfo"); /// The type which includes information such as the signature of this class. static const type = $UrlResponseInfoType(); - static final _id_new0 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'', r'()V'); + static final _id_new0 = _class.constructorId( + r"()V", + ); /// from: public void () /// The returned object must be released after use, by calling the [release] method. - factory UrlResponseInfo() => UrlResponseInfo.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_new0, []).object); + factory UrlResponseInfo() { + return UrlResponseInfo.fromReference(_id_new0(_class, referenceType, [])); + } - static final _id_getUrl = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getUrl', r'()Ljava/lang/String;'); + static final _id_getUrl = _class.instanceMethodId( + r"getUrl", + r"()Ljava/lang/String;", + ); /// from: public abstract java.lang.String getUrl() /// The returned object must be released after use, by calling the [release] method. - jni.JString getUrl() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getUrl, jni.JniCallType.objectType, []).object); + jni.JString getUrl() { + return _id_getUrl(this, const jni.JStringType(), []); + } - static final _id_getUrlChain = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getUrlChain', r'()Ljava/util/List;'); + static final _id_getUrlChain = _class.instanceMethodId( + r"getUrlChain", + r"()Ljava/util/List;", + ); /// from: public abstract java.util.List getUrlChain() /// The returned object must be released after use, by calling the [release] method. - jni.JList getUrlChain() => const jni.JListType(jni.JStringType()) - .fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getUrlChain, jni.JniCallType.objectType, []).object); + jni.JList getUrlChain() { + return _id_getUrlChain(this, const jni.JListType(jni.JStringType()), []); + } - static final _id_getHttpStatusCode = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getHttpStatusCode', r'()I'); + static final _id_getHttpStatusCode = _class.instanceMethodId( + r"getHttpStatusCode", + r"()I", + ); /// from: public abstract int getHttpStatusCode() - int getHttpStatusCode() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_getHttpStatusCode, jni.JniCallType.intType, []).integer; + int getHttpStatusCode() { + return _id_getHttpStatusCode(this, const jni.jintType(), []); + } - static final _id_getHttpStatusText = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'getHttpStatusText', r'()Ljava/lang/String;'); + static final _id_getHttpStatusText = _class.instanceMethodId( + r"getHttpStatusText", + r"()Ljava/lang/String;", + ); /// from: public abstract java.lang.String getHttpStatusText() /// The returned object must be released after use, by calling the [release] method. - jni.JString getHttpStatusText() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHttpStatusText, - jni.JniCallType.objectType, []).object); + jni.JString getHttpStatusText() { + return _id_getHttpStatusText(this, const jni.JStringType(), []); + } - static final _id_getAllHeadersAsList = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'getAllHeadersAsList', r'()Ljava/util/List;'); + static final _id_getAllHeadersAsList = _class.instanceMethodId( + r"getAllHeadersAsList", + r"()Ljava/util/List;", + ); /// from: public abstract java.util.List getAllHeadersAsList() /// The returned object must be released after use, by calling the [release] method. - jni.JList getAllHeadersAsList() => - const jni.JListType(jni.JObjectType()).fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_getAllHeadersAsList, - jni.JniCallType.objectType, []).object); + jni.JList getAllHeadersAsList() { + return _id_getAllHeadersAsList( + this, const jni.JListType(jni.JObjectType()), []); + } - static final _id_getAllHeaders = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getAllHeaders', r'()Ljava/util/Map;'); + static final _id_getAllHeaders = _class.instanceMethodId( + r"getAllHeaders", + r"()Ljava/util/Map;", + ); /// from: public abstract java.util.Map getAllHeaders() /// The returned object must be released after use, by calling the [release] method. - jni.JMap> getAllHeaders() => - const jni.JMapType(jni.JStringType(), jni.JListType(jni.JStringType())) - .fromRef(jni.Jni.accessors.callMethodWithArgs(reference, - _id_getAllHeaders, jni.JniCallType.objectType, []).object); + jni.JMap> getAllHeaders() { + return _id_getAllHeaders( + this, + const jni.JMapType(jni.JStringType(), jni.JListType(jni.JStringType())), + []); + } - static final _id_wasCached = - jni.Jni.accessors.getMethodIDOf(_class.reference, r'wasCached', r'()Z'); + static final _id_wasCached = _class.instanceMethodId( + r"wasCached", + r"()Z", + ); /// from: public abstract boolean wasCached() - bool wasCached() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_wasCached, jni.JniCallType.booleanType, []).boolean; + bool wasCached() { + return _id_wasCached(this, const jni.jbooleanType(), []); + } - static final _id_getNegotiatedProtocol = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'getNegotiatedProtocol', r'()Ljava/lang/String;'); + static final _id_getNegotiatedProtocol = _class.instanceMethodId( + r"getNegotiatedProtocol", + r"()Ljava/lang/String;", + ); /// from: public abstract java.lang.String getNegotiatedProtocol() /// The returned object must be released after use, by calling the [release] method. - jni.JString getNegotiatedProtocol() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getNegotiatedProtocol, - jni.JniCallType.objectType, []).object); + jni.JString getNegotiatedProtocol() { + return _id_getNegotiatedProtocol(this, const jni.JStringType(), []); + } - static final _id_getProxyServer = jni.Jni.accessors.getMethodIDOf( - _class.reference, r'getProxyServer', r'()Ljava/lang/String;'); + static final _id_getProxyServer = _class.instanceMethodId( + r"getProxyServer", + r"()Ljava/lang/String;", + ); /// from: public abstract java.lang.String getProxyServer() /// The returned object must be released after use, by calling the [release] method. - jni.JString getProxyServer() => - const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getProxyServer, - jni.JniCallType.objectType, []).object); + jni.JString getProxyServer() { + return _id_getProxyServer(this, const jni.JStringType(), []); + } - static final _id_getReceivedByteCount = jni.Jni.accessors - .getMethodIDOf(_class.reference, r'getReceivedByteCount', r'()J'); + static final _id_getReceivedByteCount = _class.instanceMethodId( + r"getReceivedByteCount", + r"()J", + ); /// from: public abstract long getReceivedByteCount() - int getReceivedByteCount() => jni.Jni.accessors.callMethodWithArgs( - reference, _id_getReceivedByteCount, jni.JniCallType.longType, []).long; + int getReceivedByteCount() { + return _id_getReceivedByteCount(this, const jni.jlongType(), []); + } } final class $UrlResponseInfoType extends jni.JObjType { const $UrlResponseInfoType(); @override - String get signature => r'Lorg/chromium/net/UrlResponseInfo;'; + String get signature => r"Lorg/chromium/net/UrlResponseInfo;"; @override - UrlResponseInfo fromRef(jni.JObjectPtr ref) => UrlResponseInfo.fromRef(ref); + UrlResponseInfo fromReference(jni.JReference reference) => + UrlResponseInfo.fromReference(reference); @override jni.JObjType get superType => const jni.JObjectType(); @@ -2629,7 +2704,8 @@ final class $UrlResponseInfoType extends jni.JObjType { int get hashCode => ($UrlResponseInfoType).hashCode; @override - bool operator ==(Object other) => - other.runtimeType == $UrlResponseInfoType && - other is $UrlResponseInfoType; + bool operator ==(Object other) { + return other.runtimeType == ($UrlResponseInfoType) && + other is $UrlResponseInfoType; + } } diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 69af73d277..9619bca83c 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -12,11 +12,11 @@ dependencies: flutter: sdk: flutter http: ^1.2.0 - jni: ^0.7.3 + jni: ^0.8.0 dev_dependencies: dart_flutter_team_lints: ^2.0.0 - jnigen: ^0.7.0 + jnigen: ^0.8.0 xml: ^6.1.0 yaml_edit: ^2.0.3 From 6388f6c5a6b6764cb72cf8d4a476f8068d4d7ddd Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 16 Apr 2024 16:58:36 -0700 Subject: [PATCH 353/448] Fix a StateError in IOWebSocket (#1177) This occurs when data is received from the peer after the connection has been closed locally. --- pkgs/web_socket/CHANGELOG.md | 5 ++++ pkgs/web_socket/lib/src/io_web_socket.dart | 13 +++++----- pkgs/web_socket/pubspec.yaml | 2 +- .../lib/src/close_local_tests.dart | 25 +++++++++++++++++++ .../lib/src/continuously_writing_server.dart | 25 +++++++++++++++++++ .../src/continuously_writing_server_vm.dart | 12 +++++++++ .../src/continuously_writing_server_web.dart | 9 +++++++ 7 files changed, 84 insertions(+), 7 deletions(-) create mode 100644 pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server_vm.dart create mode 100644 pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server_web.dart diff --git a/pkgs/web_socket/CHANGELOG.md b/pkgs/web_socket/CHANGELOG.md index e0df6cbd19..55b26d3b7d 100644 --- a/pkgs/web_socket/CHANGELOG.md +++ b/pkgs/web_socket/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.1.2 + +- Fix a `StateError` in `IOWebSocket` when data is received from the peer + after the connection has been closed locally. + ## 0.1.1 - Add the ability to create a `package:web_socket` `WebSocket` given a diff --git a/pkgs/web_socket/lib/src/io_web_socket.dart b/pkgs/web_socket/lib/src/io_web_socket.dart index 5225c07bb9..8b82218bcf 100644 --- a/pkgs/web_socket/lib/src/io_web_socket.dart +++ b/pkgs/web_socket/lib/src/io_web_socket.dart @@ -56,6 +56,7 @@ class IOWebSocket implements WebSocket { IOWebSocket._(this._webSocket) { _webSocket.listen( (event) { + if (_events.isClosed) return; switch (event) { case String e: _events.add(TextDataReceived(e)); @@ -64,6 +65,7 @@ class IOWebSocket implements WebSocket { } }, onError: (Object e, StackTrace st) { + if (_events.isClosed) return; final wse = switch (e) { io.WebSocketException(message: final message) => WebSocketException(message), @@ -72,12 +74,11 @@ class IOWebSocket implements WebSocket { _events.addError(wse, st); }, onDone: () { - if (!_events.isClosed) { - _events - ..add(CloseReceived( - _webSocket.closeCode, _webSocket.closeReason ?? '')) - ..close(); - } + if (_events.isClosed) return; + _events + ..add( + CloseReceived(_webSocket.closeCode, _webSocket.closeReason ?? '')) + ..close(); }, ); } diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml index 1c341f7329..f468dcb379 100644 --- a/pkgs/web_socket/pubspec.yaml +++ b/pkgs/web_socket/pubspec.yaml @@ -3,7 +3,7 @@ description: >- Any easy-to-use library for communicating with WebSockets that has multiple implementations. repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket -version: 0.1.1 +version: 0.1.2 environment: sdk: ^3.3.0 diff --git a/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart index 2fe27bb040..cb496ed776 100644 --- a/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart +++ b/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart @@ -10,10 +10,35 @@ import 'package:web_socket/web_socket.dart'; import 'close_local_server_vm.dart' if (dart.library.html) 'close_local_server_web.dart'; +import 'continuously_writing_server_vm.dart' + if (dart.library.html) 'continuously_writing_server_web.dart' + as writing_server; + /// Tests that the [WebSocket] can correctly close the connection to the peer. void testCloseLocal( Future Function(Uri uri, {Iterable? protocols}) channelFactory) { + group('remote writing', () { + late Uri uri; + late StreamChannel httpServerChannel; + late StreamQueue httpServerQueue; + + setUp(() async { + httpServerChannel = await writing_server.startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + uri = Uri.parse('ws://localhost:${await httpServerQueue.next}'); + }); + tearDown(() async { + httpServerChannel.sink.add(null); + }); + + test('peer writes after close are ignored', () async { + final channel = await channelFactory(uri); + await channel.close(); + expect(await channel.events.isEmpty, true); + }); + }); + group('local close', () { late Uri uri; late StreamChannel httpServerChannel; diff --git a/pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server.dart b/pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server.dart new file mode 100644 index 0000000000..a082d96238 --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server.dart @@ -0,0 +1,25 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an WebSocket server that sends a lot of data to the peer. +void hybridMain(StreamChannel channel) async { + late HttpServer server; + + server = (await HttpServer.bind('localhost', 0)) + ..transform(WebSocketTransformer()).listen((WebSocket webSocket) { + for (var i = 0; i < 10000; ++i) { + webSocket.add('Hello World!'); + } + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server_vm.dart b/pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server_vm.dart new file mode 100644 index 0000000000..51246c2dcb --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server_vm.dart @@ -0,0 +1,12 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'continuously_writing_server.dart'; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server_web.dart b/pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server_web.dart new file mode 100644 index 0000000000..c28fe3f11c --- /dev/null +++ b/pkgs/web_socket_conformance_tests/lib/src/continuously_writing_server_web.dart @@ -0,0 +1,9 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'web_socket_conformance_tests/src/continuously_writing_server.dart')); From 328cde1465158a22b8169e0438606c0dd2d85a9a Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 25 Apr 2024 14:39:43 -0700 Subject: [PATCH 354/448] Make the cupertino_http workflow work after 'macos-latest' upgrade (#1182) --- .github/workflows/cupertino.yml | 5 +++-- pkgs/cupertino_http/CHANGELOG.md | 2 ++ pkgs/cupertino_http/ios/cupertino_http.podspec | 2 +- pkgs/cupertino_http/macos/cupertino_http.podspec | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 23041fbb36..21fb23bb44 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -49,9 +49,10 @@ jobs: if: always() && steps.install.outcome == 'success' - uses: futureware-tech/simulator-action@bfa03d93ec9de6dacb0c5553bbf8da8afc6c2ee9 with: - model: 'iPhone 8' + os: iOS + os_version: '>=12.0' - name: Run tests run: | cd example flutter pub get - flutter test --timeout=1200s integration_test/main.dart + flutter test integration_test/main.dart diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index b1872bdd03..16aa082e57 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,6 +1,8 @@ ## 1.4.1-wip * Upgrade to `package:ffigen` 11.0.0. +* Update minimum supported iOS/macOS versions to be in sync with the minimum + (best effort) supported for Flutter: iOS 12, macOS 10.14 ## 1.4.0 diff --git a/pkgs/cupertino_http/ios/cupertino_http.podspec b/pkgs/cupertino_http/ios/cupertino_http.podspec index 4b2639f4cc..4e2ce46f08 100644 --- a/pkgs/cupertino_http/ios/cupertino_http.podspec +++ b/pkgs/cupertino_http/ios/cupertino_http.podspec @@ -20,7 +20,7 @@ Pod::Spec.new do |s| s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.dependency 'Flutter' - s.platform = :ios, '9.0' + s.platform = :ios, '12.0' s.requires_arc = [] # Flutter.framework does not contain a i386 slice. diff --git a/pkgs/cupertino_http/macos/cupertino_http.podspec b/pkgs/cupertino_http/macos/cupertino_http.podspec index 1ed634045d..86b7201978 100644 --- a/pkgs/cupertino_http/macos/cupertino_http.podspec +++ b/pkgs/cupertino_http/macos/cupertino_http.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| s.dependency 'FlutterMacOS' s.requires_arc = [] - s.platform = :osx, '10.11' + s.platform = :osx, '10.14' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } s.swift_version = '5.0' end From 067dacb7b6718de4ae8c91d1ab8ebc53fba8ba56 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 25 Apr 2024 14:55:56 -0700 Subject: [PATCH 355/448] Use WebSocketConnectionClosed for operations after WebSocket close (#1180) --- pkgs/cupertino_http/CHANGELOG.md | 3 +++ .../lib/src/cupertino_web_socket.dart | 8 +++--- pkgs/web_socket/CHANGELOG.md | 6 +++++ .../lib/src/browser_web_socket.dart | 6 ++--- pkgs/web_socket/lib/src/io_web_socket.dart | 6 ++--- pkgs/web_socket/pubspec.yaml | 2 +- .../lib/src/close_local_tests.dart | 26 ++++++++++++++----- .../lib/src/close_remote_tests.dart | 20 +++++++++++--- 8 files changed, 58 insertions(+), 19 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 16aa082e57..1a254d5317 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,6 +1,9 @@ ## 1.4.1-wip * Upgrade to `package:ffigen` 11.0.0. +* Bring `WebSocket` behavior in line with the documentation by throwing + `WebSocketConnectionClosed` rather `StateError` when attempting to send + data to or close an already closed `CupertinoWebSocket`. * Update minimum supported iOS/macOS versions to be in sync with the minimum (best effort) supported for Flutter: iOS 12, macOS 10.14 diff --git a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart index c3d50ef508..564c0ba1b1 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart @@ -106,6 +106,8 @@ class CupertinoWebSocket implements WebSocket { /// Handle an incoming message from the peer and schedule receiving the next /// message. void _handleMessage(URLSessionWebSocketMessage value) { + if (_events.isClosed) return; + late WebSocketEvent event; switch (value.type) { case URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeString: @@ -160,7 +162,7 @@ class CupertinoWebSocket implements WebSocket { @override void sendBytes(Uint8List b) { if (_events.isClosed) { - throw StateError('WebSocket is closed'); + throw WebSocketConnectionClosed(); } _task .sendMessage(URLSessionWebSocketMessage.fromData(Data.fromList(b))) @@ -170,7 +172,7 @@ class CupertinoWebSocket implements WebSocket { @override void sendText(String s) { if (_events.isClosed) { - throw StateError('WebSocket is closed'); + throw WebSocketConnectionClosed(); } _task .sendMessage(URLSessionWebSocketMessage.fromString(s)) @@ -180,7 +182,7 @@ class CupertinoWebSocket implements WebSocket { @override Future close([int? code, String? reason]) async { if (_events.isClosed) { - throw StateError('WebSocket is closed'); + throw WebSocketConnectionClosed(); } if (code != null) { diff --git a/pkgs/web_socket/CHANGELOG.md b/pkgs/web_socket/CHANGELOG.md index 55b26d3b7d..2f2a07b25d 100644 --- a/pkgs/web_socket/CHANGELOG.md +++ b/pkgs/web_socket/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.1.3 + +- Bring the behavior in line with the documentation by throwing + `WebSocketConnectionClosed` rather `StateError` when attempting to send + data to or close an already closed `WebSocket`. + ## 0.1.2 - Fix a `StateError` in `IOWebSocket` when data is received from the peer diff --git a/pkgs/web_socket/lib/src/browser_web_socket.dart b/pkgs/web_socket/lib/src/browser_web_socket.dart index 80135fdc3e..fc66628b7a 100644 --- a/pkgs/web_socket/lib/src/browser_web_socket.dart +++ b/pkgs/web_socket/lib/src/browser_web_socket.dart @@ -104,7 +104,7 @@ class BrowserWebSocket implements WebSocket { @override void sendBytes(Uint8List b) { if (_events.isClosed) { - throw StateError('WebSocket is closed'); + throw WebSocketConnectionClosed(); } // Silently discards the data if the connection is closed. _webSocket.send(b.jsify()!); @@ -113,7 +113,7 @@ class BrowserWebSocket implements WebSocket { @override void sendText(String s) { if (_events.isClosed) { - throw StateError('WebSocket is closed'); + throw WebSocketConnectionClosed(); } // Silently discards the data if the connection is closed. _webSocket.send(s.jsify()!); @@ -122,7 +122,7 @@ class BrowserWebSocket implements WebSocket { @override Future close([int? code, String? reason]) async { if (_events.isClosed) { - throw StateError('WebSocket is closed'); + throw WebSocketConnectionClosed(); } checkCloseCode(code); diff --git a/pkgs/web_socket/lib/src/io_web_socket.dart b/pkgs/web_socket/lib/src/io_web_socket.dart index 8b82218bcf..7ea084bec3 100644 --- a/pkgs/web_socket/lib/src/io_web_socket.dart +++ b/pkgs/web_socket/lib/src/io_web_socket.dart @@ -86,7 +86,7 @@ class IOWebSocket implements WebSocket { @override void sendBytes(Uint8List b) { if (_events.isClosed) { - throw StateError('WebSocket is closed'); + throw WebSocketConnectionClosed(); } _webSocket.add(b); } @@ -94,7 +94,7 @@ class IOWebSocket implements WebSocket { @override void sendText(String s) { if (_events.isClosed) { - throw StateError('WebSocket is closed'); + throw WebSocketConnectionClosed(); } _webSocket.add(s); } @@ -102,7 +102,7 @@ class IOWebSocket implements WebSocket { @override Future close([int? code, String? reason]) async { if (_events.isClosed) { - throw StateError('WebSocket is closed'); + throw WebSocketConnectionClosed(); } checkCloseCode(code); diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml index f468dcb379..f9d95a75ff 100644 --- a/pkgs/web_socket/pubspec.yaml +++ b/pkgs/web_socket/pubspec.yaml @@ -3,7 +3,7 @@ description: >- Any easy-to-use library for communicating with WebSockets that has multiple implementations. repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket -version: 0.1.2 +version: 0.1.3 environment: sdk: ^3.3.0 diff --git a/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart index cb496ed776..5cf8e739f8 100644 --- a/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart +++ b/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'dart:typed_data'; + import 'package:async/async.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; @@ -119,13 +121,25 @@ void testCloseLocal( await expectLater( () async => await channel.close(3001, 'Client initiated closure'), - throwsStateError); - final closeCode = await httpServerQueue.next as int?; - final closeReason = await httpServerQueue.next as String?; + throwsA(isA())); + }); - expect(closeCode, 3000); - expect(closeReason, 'Client initiated closure'); - expect(await channel.events.isEmpty, true); + test('sendBytes after close', () async { + final channel = await channelFactory(uri); + + await channel.close(3000, 'Client initiated closure'); + + expect(() => channel.sendBytes(Uint8List(10)), + throwsA(isA())); + }); + + test('sendText after close', () async { + final channel = await channelFactory(uri); + + await channel.close(3000, 'Client initiated closure'); + + expect(() => channel.sendText('Hello World'), + throwsA(isA())); }); }); } diff --git a/pkgs/web_socket_conformance_tests/lib/src/close_remote_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/close_remote_tests.dart index 647f74e27c..b7b3e5956f 100644 --- a/pkgs/web_socket_conformance_tests/lib/src/close_remote_tests.dart +++ b/pkgs/web_socket_conformance_tests/lib/src/close_remote_tests.dart @@ -2,6 +2,8 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +import 'dart:typed_data'; + import 'package:async/async.dart'; import 'package:stream_channel/stream_channel.dart'; import 'package:test/test.dart'; @@ -36,13 +38,24 @@ void testCloseRemote( [CloseReceived(4123, 'server closed the connection')]); }); - test('send after close received', () async { + test('sendBytes after close received', () async { + final channel = await channelFactory(uri); + + channel.sendBytes(Uint8List(10)); + expect(await channel.events.toList(), + [CloseReceived(4123, 'server closed the connection')]); + expect(() => channel.sendText('test'), + throwsA(isA())); + }); + + test('sendText after close received', () async { final channel = await channelFactory(uri); channel.sendText('Please close'); expect(await channel.events.toList(), [CloseReceived(4123, 'server closed the connection')]); - expect(() => channel.sendText('test'), throwsStateError); + expect(() => channel.sendText('test'), + throwsA(isA())); }); test('close after close received', () async { @@ -51,7 +64,8 @@ void testCloseRemote( channel.sendText('Please close'); expect(await channel.events.toList(), [CloseReceived(4123, 'server closed the connection')]); - await expectLater(channel.close, throwsStateError); + await expectLater( + channel.close, throwsA(isA())); }); }); } From fe32309540b6e1ed539cd0e03dfca8278350505a Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 30 Apr 2024 15:50:47 -0700 Subject: [PATCH 356/448] Fix runWithClient link in README (#1184) Use `[]` to treat the content as a link reference label instead of `()` to treat it as a URL. --- pkgs/http/CHANGELOG.md | 2 ++ pkgs/http/README.md | 2 +- pkgs/http/pubspec.yaml | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 86bc67821f..33811fdcb5 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.2.2-wip + ## 1.2.1 * Require Dart `^3.3` diff --git a/pkgs/http/README.md b/pkgs/http/README.md index 85ec2911df..743805bdf8 100644 --- a/pkgs/http/README.md +++ b/pkgs/http/README.md @@ -254,7 +254,7 @@ In Flutter, you can use a one of many If you depend on code that uses top-level functions (e.g. `http.post`) or calls the [`Client()`][clientconstructor] constructor, then you can use -[`runWithClient`](runwithclient) to ensure that the correct +[`runWithClient`][runwithclient] to ensure that the correct `Client` is used. When an [Isolate][isolate] is spawned, it does not inherit any variables from the calling Zone, so `runWithClient` needs to be used in each Isolate that uses `package:http`. diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 1874d5cc08..887a92570f 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.2.1 +version: 1.2.2-wip description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http From 9b40e0b2cd1dc25d470f98c093c426d45828bf74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 03:29:30 +0000 Subject: [PATCH 357/448] Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (#1187) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.2 to 1.6.4.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.4

  • Rebuild JS code to include changes from v1.6.3

v1.6.3

Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.2&new-version=1.6.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/dart.yml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 93c1a1d0a5..30bd5b5055 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -29,7 +29,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: stable - id: checkout @@ -54,7 +54,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: "3.2.0" - id: checkout @@ -84,7 +84,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: "3.3.0" - id: checkout @@ -132,7 +132,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: "3.4.0-154.0.dev" - id: checkout @@ -162,7 +162,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: dev - id: checkout @@ -228,7 +228,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: dev - id: checkout @@ -354,7 +354,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: "3.3.0" - id: checkout @@ -393,7 +393,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: "3.3.0" - id: checkout @@ -432,7 +432,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: "3.3.0" - id: checkout @@ -471,7 +471,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: "3.3.0" - id: checkout @@ -510,7 +510,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: "3.3.0" - id: checkout @@ -549,7 +549,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: "3.4.0-154.0.dev" - id: checkout @@ -588,7 +588,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: dev - id: checkout @@ -627,7 +627,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: dev - id: checkout @@ -666,7 +666,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: dev - id: checkout @@ -714,7 +714,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: dev - id: checkout @@ -753,7 +753,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: dev - id: checkout @@ -792,7 +792,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: dev - id: checkout From 37670fb6f5f675193c574ae738f9a5b8b669fbe2 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 2 May 2024 15:26:57 -0700 Subject: [PATCH 358/448] Eagerly free resources on `CupertinoClient.close()` (#1191) --- pkgs/cupertino_http/CHANGELOG.md | 5 +++-- pkgs/cupertino_http/lib/src/cupertino_api.dart | 8 ++++++++ pkgs/cupertino_http/lib/src/cupertino_client.dart | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 1a254d5317..c34797872c 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -2,10 +2,11 @@ * Upgrade to `package:ffigen` 11.0.0. * Bring `WebSocket` behavior in line with the documentation by throwing - `WebSocketConnectionClosed` rather `StateError` when attempting to send + `WebSocketConnectionClosed` rather than `StateError` when attempting to send data to or close an already closed `CupertinoWebSocket`. * Update minimum supported iOS/macOS versions to be in sync with the minimum - (best effort) supported for Flutter: iOS 12, macOS 10.14 + (best effort) supported for Flutter: iOS 12, macOS 10.14. +* Eagerly free resources on `CupertinoClient.close()`. ## 1.4.0 diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 91e5198e19..00bf1d0d22 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -1613,4 +1613,12 @@ class URLSession extends _ObjectHolder { onWebSocketTaskClosed: _onWebSocketTaskClosed); return task; } + + /// Free resources related to this session after the last task completes. + /// Returns immediately. + /// + /// See [NSURLSession finishTasksAndInvalidate](https://developer.apple.com/documentation/foundation/nsurlsession/1407428-finishtasksandinvalidate) + void finishTasksAndInvalidate() { + _nsObject.finishTasksAndInvalidate(); + } } diff --git a/pkgs/cupertino_http/lib/src/cupertino_client.dart b/pkgs/cupertino_http/lib/src/cupertino_client.dart index b93dd5c29e..4cd0646946 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_client.dart @@ -228,6 +228,7 @@ class CupertinoClient extends BaseClient { @override void close() { + _urlSession?.finishTasksAndInvalidate(); _urlSession = null; } From 5741969380340b925c2744895374ec6c5df33342 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 6 May 2024 15:25:47 -0700 Subject: [PATCH 359/448] blast_repo fixes (#1194) dependabot --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 90dffc5097..7c3a9d9079 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,3 +9,7 @@ updates: interval: monthly labels: - autosubmit + groups: + github-actions: + patterns: + - "*" From 6ec378354c7dc55c4a969e693303f08b215a68fe Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 14 May 2024 08:11:41 -0700 Subject: [PATCH 360/448] Prepare http_profile for publish (#1197) --- .github/workflows/dart.yml | 20 ++++++++++---------- pkgs/http_profile/CHANGELOG.md | 4 ++-- pkgs/http_profile/pubspec.yaml | 8 +++----- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 30bd5b5055..a294017b2b 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -118,23 +118,23 @@ jobs: if: "always() && steps.pkgs_web_socket_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/web_socket_conformance_tests job_004: - name: "analyze_and_format; linux; Dart 3.4.0-154.0.dev; PKG: pkgs/http_profile; `dart analyze --fatal-infos`" + name: "analyze_and_format; linux; Dart 3.4.0; PKG: pkgs/http_profile; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev;packages:pkgs/http_profile;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http_profile;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev;packages:pkgs/http_profile - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http_profile + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: - sdk: "3.4.0-154.0.dev" + sdk: "3.4.0" - id: checkout name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 @@ -535,23 +535,23 @@ jobs: - job_007 - job_008 job_014: - name: "unit_test; linux; Dart 3.4.0-154.0.dev; PKG: pkgs/http_profile; `dart test --platform vm`" + name: "unit_test; linux; Dart 3.4.0; PKG: pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev;packages:pkgs/http_profile;commands:test_2" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http_profile;commands:test_2" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev;packages:pkgs/http_profile - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0-154.0.dev + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http_profile + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: - sdk: "3.4.0-154.0.dev" + sdk: "3.4.0" - id: checkout name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 diff --git a/pkgs/http_profile/CHANGELOG.md b/pkgs/http_profile/CHANGELOG.md index 8f2e70fcf2..b9455a4ed6 100644 --- a/pkgs/http_profile/CHANGELOG.md +++ b/pkgs/http_profile/CHANGELOG.md @@ -1,3 +1,3 @@ -## 0.0.1 +## 0.1.0 -* Skeleton class and test definitions. +* Initial **experimental** release. diff --git a/pkgs/http_profile/pubspec.yaml b/pkgs/http_profile/pubspec.yaml index b86ddc200c..b908d2c22d 100644 --- a/pkgs/http_profile/pubspec.yaml +++ b/pkgs/http_profile/pubspec.yaml @@ -1,14 +1,12 @@ name: http_profile description: >- A library used by HTTP client authors to integrate with the DevTools Network - tab. + View. repository: https://github.com/dart-lang/http/tree/master/pkgs/http_profile - -publish_to: none +version: 0.1.0 environment: - # TODO(derekxu16): Change the following constraint to ^3.4.0 before publishing this package. - sdk: ^3.4.0-154.0.dev + sdk: ^3.4.0 dev_dependencies: dart_flutter_team_lints: ^2.1.1 From 81839120c6acf693e4241a7ddfa846c9a59ffd95 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 15 May 2024 17:22:50 -0700 Subject: [PATCH 361/448] [cronet] Use the same host and Android emulator architecture. (#1201) --- .github/workflows/cronet.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 4b079aeb02..40b51469be 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -6,12 +6,12 @@ on: - main - master paths: - - '.github/workflows/cronet.yaml' + - '.github/workflows/cronet.yml' - 'pkgs/cronet_http/**' - 'pkgs/http_client_conformance_tests/**' pull_request: paths: - - '.github/workflows/cronet.yaml' + - '.github/workflows/cronet.yml' - 'pkgs/cronet_http/**' - 'pkgs/http_client_conformance_tests/**' schedule: @@ -23,7 +23,7 @@ env: jobs: verify: name: Format & Analyze & Test - runs-on: macos-latest + runs-on: ubuntu-latest strategy: matrix: cronetHttpNoPlay: ['false', 'true'] @@ -59,5 +59,4 @@ jobs: api-level: 21 arch: x86_64 target: ${{ matrix.cronetHttpNoPlay == 'true' && 'default' || 'google_apis' }} - profile: pixel script: cd pkgs/cronet_http/example && flutter test --dart-define=cronetHttpNoPlay=${{ matrix.cronetHttpNoPlay }} --timeout=1200s integration_test/ From b25b4ff8451e2e45eb9ba000591de0a1fd1c8cd4 Mon Sep 17 00:00:00 2001 From: Hossein Yousefi Date: Thu, 16 May 2024 22:58:40 +0200 Subject: [PATCH 362/448] [cronet_http] Upgrade jni to 0.9.2 and publish 1.2.1 (#1198) --- pkgs/cronet_http/CHANGELOG.md | 7 + pkgs/cronet_http/jnigen.yaml | 1 - .../cronet_http/lib/src/jni/jni_bindings.dart | 2401 +++++++++++++++-- pkgs/cronet_http/pubspec.yaml | 6 +- 4 files changed, 2152 insertions(+), 263 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 1cc924894e..a7dac11f08 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.2.1-wip + +* Upgrade `package:jni` to 0.9.2 to fix the build error in the latest versions + of Flutter. +* Upgrade `package:jnigen` to 0.9.1 and regenerate the bindings to improve the + efficiency of function calls. + ## 1.2.0 * Support the Cronet embedding dependency with `--dart-define=cronetHttpNoPlay=true`. diff --git a/pkgs/cronet_http/jnigen.yaml b/pkgs/cronet_http/jnigen.yaml index 5229d09225..9eabc42128 100644 --- a/pkgs/cronet_http/jnigen.yaml +++ b/pkgs/cronet_http/jnigen.yaml @@ -5,7 +5,6 @@ android_sdk_config: android_example: 'example/' output: - bindings_type: dart_only dart: path: 'lib/src/jni/jni_bindings.dart' structure: single_file diff --git a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart index 7dcf78d226..4db04a9c6a 100644 --- a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart +++ b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart @@ -16,6 +16,7 @@ // ignore_for_file: unused_import // ignore_for_file: unused_local_variable // ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters import "dart:isolate" show ReceivePort; import "dart:ffi" as ffi; @@ -43,17 +44,38 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V", ); + static final _onRedirectReceived = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public abstract void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string) void onRedirectReceived( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JString string, ) { - _id_onRedirectReceived(this, const jni.jvoidType(), [ - urlRequest.reference.pointer, - urlResponseInfo.reference.pointer, - string.reference.pointer - ]); + _onRedirectReceived( + reference.pointer, + _id_onRedirectReceived as jni.JMethodIDPtr, + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + string.reference.pointer) + .check(); } static final _id_onResponseStarted = _class.instanceMethodId( @@ -61,13 +83,31 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", ); + static final _onResponseStarted = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public abstract void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onResponseStarted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { - _id_onResponseStarted(this, const jni.jvoidType(), - [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + _onResponseStarted( + reference.pointer, + _id_onResponseStarted as jni.JMethodIDPtr, + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer) + .check(); } static final _id_onReadCompleted = _class.instanceMethodId( @@ -75,17 +115,38 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V", ); + static final _onReadCompleted = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public abstract void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer) void onReadCompleted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JByteBuffer byteBuffer, ) { - _id_onReadCompleted(this, const jni.jvoidType(), [ - urlRequest.reference.pointer, - urlResponseInfo.reference.pointer, - byteBuffer.reference.pointer - ]); + _onReadCompleted( + reference.pointer, + _id_onReadCompleted as jni.JMethodIDPtr, + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + byteBuffer.reference.pointer) + .check(); } static final _id_onSucceeded = _class.instanceMethodId( @@ -93,13 +154,28 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", ); + static final _onSucceeded = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public abstract void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onSucceeded( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { - _id_onSucceeded(this, const jni.jvoidType(), - [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + _onSucceeded(reference.pointer, _id_onSucceeded as jni.JMethodIDPtr, + urlRequest.reference.pointer, urlResponseInfo.reference.pointer) + .check(); } static final _id_onFailed = _class.instanceMethodId( @@ -107,17 +183,38 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V", ); + static final _onFailed = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public abstract void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException) void onFailed( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, CronetException cronetException, ) { - _id_onFailed(this, const jni.jvoidType(), [ - urlRequest.reference.pointer, - urlResponseInfo.reference.pointer, - cronetException.reference.pointer - ]); + _onFailed( + reference.pointer, + _id_onFailed as jni.JMethodIDPtr, + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + cronetException.reference.pointer) + .check(); } /// Maps a specific port to the implemented interface. @@ -370,14 +467,28 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r"(Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;)V", ); + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void (io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface urlRequestCallbackInterface) /// The returned object must be released after use, by calling the [release] method. factory UrlRequestCallbackProxy.new1( UrlRequestCallbackProxy_UrlRequestCallbackInterface urlRequestCallbackInterface, ) { - return UrlRequestCallbackProxy.fromReference(_id_new1(_class, referenceType, - [urlRequestCallbackInterface.reference.pointer])); + return UrlRequestCallbackProxy.fromReference(_new1( + _class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, + urlRequestCallbackInterface.reference.pointer) + .reference); } static final _id_getCallback = _class.instanceMethodId( @@ -385,11 +496,24 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r"()Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;", ); + static final _getCallback = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public final io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface getCallback() /// The returned object must be released after use, by calling the [release] method. UrlRequestCallbackProxy_UrlRequestCallbackInterface getCallback() { - return _id_getCallback(this, - const $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType(), []); + return _getCallback(reference.pointer, _id_getCallback as jni.JMethodIDPtr) + .object( + const $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType()); } static final _id_onRedirectReceived = _class.instanceMethodId( @@ -397,17 +521,38 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V", ); + static final _onRedirectReceived = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string) void onRedirectReceived( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JString string, ) { - _id_onRedirectReceived(this, const jni.jvoidType(), [ - urlRequest.reference.pointer, - urlResponseInfo.reference.pointer, - string.reference.pointer - ]); + _onRedirectReceived( + reference.pointer, + _id_onRedirectReceived as jni.JMethodIDPtr, + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + string.reference.pointer) + .check(); } static final _id_onResponseStarted = _class.instanceMethodId( @@ -415,13 +560,31 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", ); + static final _onResponseStarted = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onResponseStarted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { - _id_onResponseStarted(this, const jni.jvoidType(), - [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + _onResponseStarted( + reference.pointer, + _id_onResponseStarted as jni.JMethodIDPtr, + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer) + .check(); } static final _id_onReadCompleted = _class.instanceMethodId( @@ -429,17 +592,38 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V", ); + static final _onReadCompleted = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer) void onReadCompleted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JByteBuffer byteBuffer, ) { - _id_onReadCompleted(this, const jni.jvoidType(), [ - urlRequest.reference.pointer, - urlResponseInfo.reference.pointer, - byteBuffer.reference.pointer - ]); + _onReadCompleted( + reference.pointer, + _id_onReadCompleted as jni.JMethodIDPtr, + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + byteBuffer.reference.pointer) + .check(); } static final _id_onSucceeded = _class.instanceMethodId( @@ -447,13 +631,28 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", ); + static final _onSucceeded = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onSucceeded( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { - _id_onSucceeded(this, const jni.jvoidType(), - [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + _onSucceeded(reference.pointer, _id_onSucceeded as jni.JMethodIDPtr, + urlRequest.reference.pointer, urlResponseInfo.reference.pointer) + .check(); } static final _id_onFailed = _class.instanceMethodId( @@ -461,17 +660,38 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V", ); + static final _onFailed = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException) void onFailed( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, CronetException cronetException, ) { - _id_onFailed(this, const jni.jvoidType(), [ - urlRequest.reference.pointer, - urlResponseInfo.reference.pointer, - cronetException.reference.pointer - ]); + _onFailed( + reference.pointer, + _id_onFailed as jni.JMethodIDPtr, + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + cronetException.reference.pointer) + .check(); } } @@ -520,6 +740,27 @@ class URL extends jni.JObject { r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2) /// The returned object must be released after use, by calling the [release] method. factory URL( @@ -528,18 +769,39 @@ class URL extends jni.JObject { int i, jni.JString string2, ) { - return URL.fromReference(_id_new0(_class, referenceType, [ - string.reference.pointer, - string1.reference.pointer, - jni.JValueInt(i), - string2.reference.pointer - ])); + return URL.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + string.reference.pointer, + string1.reference.pointer, + i, + string2.reference.pointer) + .reference); } static final _id_new1 = _class.constructorId( r"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", ); + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public void (java.lang.String string, java.lang.String string1, java.lang.String string2) /// The returned object must be released after use, by calling the [release] method. factory URL.new1( @@ -547,17 +809,42 @@ class URL extends jni.JObject { jni.JString string1, jni.JString string2, ) { - return URL.fromReference(_id_new1(_class, referenceType, [ - string.reference.pointer, - string1.reference.pointer, - string2.reference.pointer - ])); + return URL.fromReference(_new1( + _class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, + string.reference.pointer, + string1.reference.pointer, + string2.reference.pointer) + .reference); } static final _id_new2 = _class.constructorId( r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V", ); + static final _new2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2, java.net.URLStreamHandler uRLStreamHandler) /// The returned object must be released after use, by calling the [release] method. factory URL.new2( @@ -567,46 +854,97 @@ class URL extends jni.JObject { jni.JString string2, jni.JObject uRLStreamHandler, ) { - return URL.fromReference(_id_new2(_class, referenceType, [ - string.reference.pointer, - string1.reference.pointer, - jni.JValueInt(i), - string2.reference.pointer, - uRLStreamHandler.reference.pointer - ])); + return URL.fromReference(_new2( + _class.reference.pointer, + _id_new2 as jni.JMethodIDPtr, + string.reference.pointer, + string1.reference.pointer, + i, + string2.reference.pointer, + uRLStreamHandler.reference.pointer) + .reference); } static final _id_new3 = _class.constructorId( r"(Ljava/lang/String;)V", ); + static final _new3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void (java.lang.String string) /// The returned object must be released after use, by calling the [release] method. factory URL.new3( jni.JString string, ) { - return URL.fromReference( - _id_new3(_class, referenceType, [string.reference.pointer])); + return URL.fromReference(_new3(_class.reference.pointer, + _id_new3 as jni.JMethodIDPtr, string.reference.pointer) + .reference); } static final _id_new4 = _class.constructorId( r"(Ljava/net/URL;Ljava/lang/String;)V", ); + static final _new4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public void (java.net.URL uRL, java.lang.String string) /// The returned object must be released after use, by calling the [release] method. factory URL.new4( URL uRL, jni.JString string, ) { - return URL.fromReference(_id_new4(_class, referenceType, - [uRL.reference.pointer, string.reference.pointer])); + return URL.fromReference(_new4( + _class.reference.pointer, + _id_new4 as jni.JMethodIDPtr, + uRL.reference.pointer, + string.reference.pointer) + .reference); } static final _id_new5 = _class.constructorId( r"(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V", ); + static final _new5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public void (java.net.URL uRL, java.lang.String string, java.net.URLStreamHandler uRLStreamHandler) /// The returned object must be released after use, by calling the [release] method. factory URL.new5( @@ -614,11 +952,13 @@ class URL extends jni.JObject { jni.JString string, jni.JObject uRLStreamHandler, ) { - return URL.fromReference(_id_new5(_class, referenceType, [ - uRL.reference.pointer, - string.reference.pointer, - uRLStreamHandler.reference.pointer - ])); + return URL.fromReference(_new5( + _class.reference.pointer, + _id_new5 as jni.JMethodIDPtr, + uRL.reference.pointer, + string.reference.pointer, + uRLStreamHandler.reference.pointer) + .reference); } static final _id_getQuery = _class.instanceMethodId( @@ -626,10 +966,23 @@ class URL extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getQuery = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getQuery() /// The returned object must be released after use, by calling the [release] method. jni.JString getQuery() { - return _id_getQuery(this, const jni.JStringType(), []); + return _getQuery(reference.pointer, _id_getQuery as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getPath = _class.instanceMethodId( @@ -637,10 +990,23 @@ class URL extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getPath = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getPath() /// The returned object must be released after use, by calling the [release] method. jni.JString getPath() { - return _id_getPath(this, const jni.JStringType(), []); + return _getPath(reference.pointer, _id_getPath as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getUserInfo = _class.instanceMethodId( @@ -648,10 +1014,23 @@ class URL extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getUserInfo = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getUserInfo() /// The returned object must be released after use, by calling the [release] method. jni.JString getUserInfo() { - return _id_getUserInfo(this, const jni.JStringType(), []); + return _getUserInfo(reference.pointer, _id_getUserInfo as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getAuthority = _class.instanceMethodId( @@ -659,10 +1038,24 @@ class URL extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getAuthority = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getAuthority() /// The returned object must be released after use, by calling the [release] method. jni.JString getAuthority() { - return _id_getAuthority(this, const jni.JStringType(), []); + return _getAuthority( + reference.pointer, _id_getAuthority as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getPort = _class.instanceMethodId( @@ -670,9 +1063,21 @@ class URL extends jni.JObject { r"()I", ); + static final _getPort = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int getPort() int getPort() { - return _id_getPort(this, const jni.jintType(), []); + return _getPort(reference.pointer, _id_getPort as jni.JMethodIDPtr).integer; } static final _id_getDefaultPort = _class.instanceMethodId( @@ -680,9 +1085,23 @@ class URL extends jni.JObject { r"()I", ); + static final _getDefaultPort = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int getDefaultPort() int getDefaultPort() { - return _id_getDefaultPort(this, const jni.jintType(), []); + return _getDefaultPort( + reference.pointer, _id_getDefaultPort as jni.JMethodIDPtr) + .integer; } static final _id_getProtocol = _class.instanceMethodId( @@ -690,10 +1109,23 @@ class URL extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getProtocol = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getProtocol() /// The returned object must be released after use, by calling the [release] method. jni.JString getProtocol() { - return _id_getProtocol(this, const jni.JStringType(), []); + return _getProtocol(reference.pointer, _id_getProtocol as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getHost = _class.instanceMethodId( @@ -701,10 +1133,23 @@ class URL extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getHost = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getHost() /// The returned object must be released after use, by calling the [release] method. jni.JString getHost() { - return _id_getHost(this, const jni.JStringType(), []); + return _getHost(reference.pointer, _id_getHost as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getFile = _class.instanceMethodId( @@ -712,10 +1157,23 @@ class URL extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getFile = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getFile() /// The returned object must be released after use, by calling the [release] method. jni.JString getFile() { - return _id_getFile(this, const jni.JStringType(), []); + return _getFile(reference.pointer, _id_getFile as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getRef = _class.instanceMethodId( @@ -723,10 +1181,23 @@ class URL extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getRef = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getRef() /// The returned object must be released after use, by calling the [release] method. jni.JString getRef() { - return _id_getRef(this, const jni.JStringType(), []); + return _getRef(reference.pointer, _id_getRef as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_equals = _class.instanceMethodId( @@ -734,12 +1205,24 @@ class URL extends jni.JObject { r"(Ljava/lang/Object;)Z", ); + static final _equals = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public boolean equals(java.lang.Object object) bool equals( jni.JObject object, ) { - return _id_equals( - this, const jni.jbooleanType(), [object.reference.pointer]); + return _equals(reference.pointer, _id_equals as jni.JMethodIDPtr, + object.reference.pointer) + .boolean; } static final _id_hashCode1 = _class.instanceMethodId( @@ -747,9 +1230,22 @@ class URL extends jni.JObject { r"()I", ); + static final _hashCode1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public int hashCode() int hashCode1() { - return _id_hashCode1(this, const jni.jintType(), []); + return _hashCode1(reference.pointer, _id_hashCode1 as jni.JMethodIDPtr) + .integer; } static final _id_sameFile = _class.instanceMethodId( @@ -757,12 +1253,24 @@ class URL extends jni.JObject { r"(Ljava/net/URL;)Z", ); + static final _sameFile = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public boolean sameFile(java.net.URL uRL) bool sameFile( URL uRL, ) { - return _id_sameFile( - this, const jni.jbooleanType(), [uRL.reference.pointer]); + return _sameFile(reference.pointer, _id_sameFile as jni.JMethodIDPtr, + uRL.reference.pointer) + .boolean; } static final _id_toString1 = _class.instanceMethodId( @@ -770,10 +1278,23 @@ class URL extends jni.JObject { r"()Ljava/lang/String;", ); + static final _toString1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String toString() /// The returned object must be released after use, by calling the [release] method. jni.JString toString1() { - return _id_toString1(this, const jni.JStringType(), []); + return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_toExternalForm = _class.instanceMethodId( @@ -781,10 +1302,24 @@ class URL extends jni.JObject { r"()Ljava/lang/String;", ); + static final _toExternalForm = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String toExternalForm() /// The returned object must be released after use, by calling the [release] method. jni.JString toExternalForm() { - return _id_toExternalForm(this, const jni.JStringType(), []); + return _toExternalForm( + reference.pointer, _id_toExternalForm as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_toURI = _class.instanceMethodId( @@ -792,10 +1327,23 @@ class URL extends jni.JObject { r"()Ljava/net/URI;", ); + static final _toURI = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.net.URI toURI() /// The returned object must be released after use, by calling the [release] method. jni.JObject toURI() { - return _id_toURI(this, const jni.JObjectType(), []); + return _toURI(reference.pointer, _id_toURI as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_openConnection = _class.instanceMethodId( @@ -803,10 +1351,24 @@ class URL extends jni.JObject { r"()Ljava/net/URLConnection;", ); + static final _openConnection = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.net.URLConnection openConnection() /// The returned object must be released after use, by calling the [release] method. jni.JObject openConnection() { - return _id_openConnection(this, const jni.JObjectType(), []); + return _openConnection( + reference.pointer, _id_openConnection as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_openConnection1 = _class.instanceMethodId( @@ -814,13 +1376,25 @@ class URL extends jni.JObject { r"(Ljava/net/Proxy;)Ljava/net/URLConnection;", ); + static final _openConnection1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public java.net.URLConnection openConnection(java.net.Proxy proxy) /// The returned object must be released after use, by calling the [release] method. jni.JObject openConnection1( jni.JObject proxy, ) { - return _id_openConnection1( - this, const jni.JObjectType(), [proxy.reference.pointer]); + return _openConnection1(reference.pointer, + _id_openConnection1 as jni.JMethodIDPtr, proxy.reference.pointer) + .object(const jni.JObjectType()); } static final _id_openStream = _class.instanceMethodId( @@ -828,10 +1402,23 @@ class URL extends jni.JObject { r"()Ljava/io/InputStream;", ); + static final _openStream = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.io.InputStream openStream() /// The returned object must be released after use, by calling the [release] method. jni.JObject openStream() { - return _id_openStream(this, const jni.JObjectType(), []); + return _openStream(reference.pointer, _id_openStream as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_getContent = _class.instanceMethodId( @@ -839,10 +1426,23 @@ class URL extends jni.JObject { r"()Ljava/lang/Object;", ); + static final _getContent = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.Object getContent() /// The returned object must be released after use, by calling the [release] method. jni.JObject getContent() { - return _id_getContent(this, const jni.JObjectType(), []); + return _getContent(reference.pointer, _id_getContent as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_getContent1 = _class.instanceMethodId( @@ -850,13 +1450,25 @@ class URL extends jni.JObject { r"([Ljava/lang/Class;)Ljava/lang/Object;", ); + static final _getContent1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public java.lang.Object getContent(java.lang.Class[] classs) /// The returned object must be released after use, by calling the [release] method. jni.JObject getContent1( jni.JArray classs, ) { - return _id_getContent1( - this, const jni.JObjectType(), [classs.reference.pointer]); + return _getContent1(reference.pointer, _id_getContent1 as jni.JMethodIDPtr, + classs.reference.pointer) + .object(const jni.JObjectType()); } static final _id_setURLStreamHandlerFactory = _class.staticMethodId( @@ -864,12 +1476,26 @@ class URL extends jni.JObject { r"(Ljava/net/URLStreamHandlerFactory;)V", ); + static final _setURLStreamHandlerFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory uRLStreamHandlerFactory) static void setURLStreamHandlerFactory( jni.JObject uRLStreamHandlerFactory, ) { - _id_setURLStreamHandlerFactory(_class, const jni.jvoidType(), - [uRLStreamHandlerFactory.reference.pointer]); + _setURLStreamHandlerFactory( + _class.reference.pointer, + _id_setURLStreamHandlerFactory as jni.JMethodIDPtr, + uRLStreamHandlerFactory.reference.pointer) + .check(); } } @@ -915,13 +1541,23 @@ class Executors extends jni.JObject { r"(I)Ljava/util/concurrent/ExecutorService;", ); + static final _newFixedThreadPool = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, + jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: static public java.util.concurrent.ExecutorService newFixedThreadPool(int i) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newFixedThreadPool( int i, ) { - return _id_newFixedThreadPool( - _class, const jni.JObjectType(), [jni.JValueInt(i)]); + return _newFixedThreadPool(_class.reference.pointer, + _id_newFixedThreadPool as jni.JMethodIDPtr, i) + .object(const jni.JObjectType()); } static final _id_newWorkStealingPool = _class.staticMethodId( @@ -929,13 +1565,23 @@ class Executors extends jni.JObject { r"(I)Ljava/util/concurrent/ExecutorService;", ); + static final _newWorkStealingPool = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, + jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: static public java.util.concurrent.ExecutorService newWorkStealingPool(int i) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newWorkStealingPool( int i, ) { - return _id_newWorkStealingPool( - _class, const jni.JObjectType(), [jni.JValueInt(i)]); + return _newWorkStealingPool(_class.reference.pointer, + _id_newWorkStealingPool as jni.JMethodIDPtr, i) + .object(const jni.JObjectType()); } static final _id_newWorkStealingPool1 = _class.staticMethodId( @@ -943,10 +1589,24 @@ class Executors extends jni.JObject { r"()Ljava/util/concurrent/ExecutorService;", ); + static final _newWorkStealingPool1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public java.util.concurrent.ExecutorService newWorkStealingPool() /// The returned object must be released after use, by calling the [release] method. static jni.JObject newWorkStealingPool1() { - return _id_newWorkStealingPool1(_class, const jni.JObjectType(), []); + return _newWorkStealingPool1(_class.reference.pointer, + _id_newWorkStealingPool1 as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_newFixedThreadPool1 = _class.staticMethodId( @@ -954,14 +1614,29 @@ class Executors extends jni.JObject { r"(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;", ); + static final _newFixedThreadPool1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + /// from: static public java.util.concurrent.ExecutorService newFixedThreadPool(int i, java.util.concurrent.ThreadFactory threadFactory) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newFixedThreadPool1( int i, jni.JObject threadFactory, ) { - return _id_newFixedThreadPool1(_class, const jni.JObjectType(), - [jni.JValueInt(i), threadFactory.reference.pointer]); + return _newFixedThreadPool1( + _class.reference.pointer, + _id_newFixedThreadPool1 as jni.JMethodIDPtr, + i, + threadFactory.reference.pointer) + .object(const jni.JObjectType()); } static final _id_newSingleThreadExecutor = _class.staticMethodId( @@ -969,10 +1644,24 @@ class Executors extends jni.JObject { r"()Ljava/util/concurrent/ExecutorService;", ); + static final _newSingleThreadExecutor = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public java.util.concurrent.ExecutorService newSingleThreadExecutor() /// The returned object must be released after use, by calling the [release] method. static jni.JObject newSingleThreadExecutor() { - return _id_newSingleThreadExecutor(_class, const jni.JObjectType(), []); + return _newSingleThreadExecutor(_class.reference.pointer, + _id_newSingleThreadExecutor as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_newSingleThreadExecutor1 = _class.staticMethodId( @@ -980,13 +1669,27 @@ class Executors extends jni.JObject { r"(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;", ); + static final _newSingleThreadExecutor1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public java.util.concurrent.ExecutorService newSingleThreadExecutor(java.util.concurrent.ThreadFactory threadFactory) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newSingleThreadExecutor1( jni.JObject threadFactory, ) { - return _id_newSingleThreadExecutor1( - _class, const jni.JObjectType(), [threadFactory.reference.pointer]); + return _newSingleThreadExecutor1( + _class.reference.pointer, + _id_newSingleThreadExecutor1 as jni.JMethodIDPtr, + threadFactory.reference.pointer) + .object(const jni.JObjectType()); } static final _id_newCachedThreadPool = _class.staticMethodId( @@ -994,10 +1697,24 @@ class Executors extends jni.JObject { r"()Ljava/util/concurrent/ExecutorService;", ); + static final _newCachedThreadPool = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public java.util.concurrent.ExecutorService newCachedThreadPool() /// The returned object must be released after use, by calling the [release] method. static jni.JObject newCachedThreadPool() { - return _id_newCachedThreadPool(_class, const jni.JObjectType(), []); + return _newCachedThreadPool(_class.reference.pointer, + _id_newCachedThreadPool as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_newCachedThreadPool1 = _class.staticMethodId( @@ -1005,13 +1722,27 @@ class Executors extends jni.JObject { r"(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;", ); + static final _newCachedThreadPool1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public java.util.concurrent.ExecutorService newCachedThreadPool(java.util.concurrent.ThreadFactory threadFactory) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newCachedThreadPool1( jni.JObject threadFactory, ) { - return _id_newCachedThreadPool1( - _class, const jni.JObjectType(), [threadFactory.reference.pointer]); + return _newCachedThreadPool1( + _class.reference.pointer, + _id_newCachedThreadPool1 as jni.JMethodIDPtr, + threadFactory.reference.pointer) + .object(const jni.JObjectType()); } static final _id_newSingleThreadScheduledExecutor = _class.staticMethodId( @@ -1019,11 +1750,25 @@ class Executors extends jni.JObject { r"()Ljava/util/concurrent/ScheduledExecutorService;", ); + static final _newSingleThreadScheduledExecutor = + ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor() /// The returned object must be released after use, by calling the [release] method. static jni.JObject newSingleThreadScheduledExecutor() { - return _id_newSingleThreadScheduledExecutor( - _class, const jni.JObjectType(), []); + return _newSingleThreadScheduledExecutor(_class.reference.pointer, + _id_newSingleThreadScheduledExecutor as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_newSingleThreadScheduledExecutor1 = _class.staticMethodId( @@ -1031,13 +1776,28 @@ class Executors extends jni.JObject { r"(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;", ); + static final _newSingleThreadScheduledExecutor1 = + ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory threadFactory) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newSingleThreadScheduledExecutor1( jni.JObject threadFactory, ) { - return _id_newSingleThreadScheduledExecutor1( - _class, const jni.JObjectType(), [threadFactory.reference.pointer]); + return _newSingleThreadScheduledExecutor1( + _class.reference.pointer, + _id_newSingleThreadScheduledExecutor1 as jni.JMethodIDPtr, + threadFactory.reference.pointer) + .object(const jni.JObjectType()); } static final _id_newScheduledThreadPool = _class.staticMethodId( @@ -1045,13 +1805,23 @@ class Executors extends jni.JObject { r"(I)Ljava/util/concurrent/ScheduledExecutorService;", ); + static final _newScheduledThreadPool = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, + jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: static public java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int i) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newScheduledThreadPool( int i, ) { - return _id_newScheduledThreadPool( - _class, const jni.JObjectType(), [jni.JValueInt(i)]); + return _newScheduledThreadPool(_class.reference.pointer, + _id_newScheduledThreadPool as jni.JMethodIDPtr, i) + .object(const jni.JObjectType()); } static final _id_newScheduledThreadPool1 = _class.staticMethodId( @@ -1059,14 +1829,29 @@ class Executors extends jni.JObject { r"(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;", ); + static final _newScheduledThreadPool1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + /// from: static public java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int i, java.util.concurrent.ThreadFactory threadFactory) /// The returned object must be released after use, by calling the [release] method. static jni.JObject newScheduledThreadPool1( int i, jni.JObject threadFactory, ) { - return _id_newScheduledThreadPool1(_class, const jni.JObjectType(), - [jni.JValueInt(i), threadFactory.reference.pointer]); + return _newScheduledThreadPool1( + _class.reference.pointer, + _id_newScheduledThreadPool1 as jni.JMethodIDPtr, + i, + threadFactory.reference.pointer) + .object(const jni.JObjectType()); } static final _id_unconfigurableExecutorService = _class.staticMethodId( @@ -1074,13 +1859,27 @@ class Executors extends jni.JObject { r"(Ljava/util/concurrent/ExecutorService;)Ljava/util/concurrent/ExecutorService;", ); + static final _unconfigurableExecutorService = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public java.util.concurrent.ExecutorService unconfigurableExecutorService(java.util.concurrent.ExecutorService executorService) /// The returned object must be released after use, by calling the [release] method. static jni.JObject unconfigurableExecutorService( jni.JObject executorService, ) { - return _id_unconfigurableExecutorService( - _class, const jni.JObjectType(), [executorService.reference.pointer]); + return _unconfigurableExecutorService( + _class.reference.pointer, + _id_unconfigurableExecutorService as jni.JMethodIDPtr, + executorService.reference.pointer) + .object(const jni.JObjectType()); } static final _id_unconfigurableScheduledExecutorService = @@ -1089,13 +1888,28 @@ class Executors extends jni.JObject { r"(Ljava/util/concurrent/ScheduledExecutorService;)Ljava/util/concurrent/ScheduledExecutorService;", ); + static final _unconfigurableScheduledExecutorService = + ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public java.util.concurrent.ScheduledExecutorService unconfigurableScheduledExecutorService(java.util.concurrent.ScheduledExecutorService scheduledExecutorService) /// The returned object must be released after use, by calling the [release] method. static jni.JObject unconfigurableScheduledExecutorService( jni.JObject scheduledExecutorService, ) { - return _id_unconfigurableScheduledExecutorService(_class, - const jni.JObjectType(), [scheduledExecutorService.reference.pointer]); + return _unconfigurableScheduledExecutorService( + _class.reference.pointer, + _id_unconfigurableScheduledExecutorService as jni.JMethodIDPtr, + scheduledExecutorService.reference.pointer) + .object(const jni.JObjectType()); } static final _id_defaultThreadFactory = _class.staticMethodId( @@ -1103,10 +1917,24 @@ class Executors extends jni.JObject { r"()Ljava/util/concurrent/ThreadFactory;", ); + static final _defaultThreadFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public java.util.concurrent.ThreadFactory defaultThreadFactory() /// The returned object must be released after use, by calling the [release] method. static jni.JObject defaultThreadFactory() { - return _id_defaultThreadFactory(_class, const jni.JObjectType(), []); + return _defaultThreadFactory(_class.reference.pointer, + _id_defaultThreadFactory as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_privilegedThreadFactory = _class.staticMethodId( @@ -1114,10 +1942,24 @@ class Executors extends jni.JObject { r"()Ljava/util/concurrent/ThreadFactory;", ); + static final _privilegedThreadFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: static public java.util.concurrent.ThreadFactory privilegedThreadFactory() /// The returned object must be released after use, by calling the [release] method. static jni.JObject privilegedThreadFactory() { - return _id_privilegedThreadFactory(_class, const jni.JObjectType(), []); + return _privilegedThreadFactory(_class.reference.pointer, + _id_privilegedThreadFactory as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_callable = _class.staticMethodId( @@ -1125,6 +1967,20 @@ class Executors extends jni.JObject { r"(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Callable;", ); + static final _callable = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: static public java.util.concurrent.Callable callable(java.lang.Runnable runnable, T object) /// The returned object must be released after use, by calling the [release] method. static jni.JObject callable<$T extends jni.JObject>( @@ -1135,8 +1991,9 @@ class Executors extends jni.JObject { T ??= jni.lowestCommonSuperType([ object.$type, ]) as jni.JObjType<$T>; - return _id_callable(_class, const jni.JObjectType(), - [runnable.reference.pointer, object.reference.pointer]); + return _callable(_class.reference.pointer, _id_callable as jni.JMethodIDPtr, + runnable.reference.pointer, object.reference.pointer) + .object(const jni.JObjectType()); } static final _id_callable1 = _class.staticMethodId( @@ -1144,13 +2001,25 @@ class Executors extends jni.JObject { r"(Ljava/lang/Runnable;)Ljava/util/concurrent/Callable;", ); + static final _callable1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public java.util.concurrent.Callable callable(java.lang.Runnable runnable) /// The returned object must be released after use, by calling the [release] method. static jni.JObject callable1( jni.JObject runnable, ) { - return _id_callable1( - _class, const jni.JObjectType(), [runnable.reference.pointer]); + return _callable1(_class.reference.pointer, + _id_callable1 as jni.JMethodIDPtr, runnable.reference.pointer) + .object(const jni.JObjectType()); } static final _id_callable2 = _class.staticMethodId( @@ -1158,13 +2027,27 @@ class Executors extends jni.JObject { r"(Ljava/security/PrivilegedAction;)Ljava/util/concurrent/Callable;", ); + static final _callable2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public java.util.concurrent.Callable callable(java.security.PrivilegedAction privilegedAction) /// The returned object must be released after use, by calling the [release] method. static jni.JObject callable2( jni.JObject privilegedAction, ) { - return _id_callable2( - _class, const jni.JObjectType(), [privilegedAction.reference.pointer]); + return _callable2( + _class.reference.pointer, + _id_callable2 as jni.JMethodIDPtr, + privilegedAction.reference.pointer) + .object(const jni.JObjectType()); } static final _id_callable3 = _class.staticMethodId( @@ -1172,13 +2055,27 @@ class Executors extends jni.JObject { r"(Ljava/security/PrivilegedExceptionAction;)Ljava/util/concurrent/Callable;", ); + static final _callable3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public java.util.concurrent.Callable callable(java.security.PrivilegedExceptionAction privilegedExceptionAction) /// The returned object must be released after use, by calling the [release] method. static jni.JObject callable3( jni.JObject privilegedExceptionAction, ) { - return _id_callable3(_class, const jni.JObjectType(), - [privilegedExceptionAction.reference.pointer]); + return _callable3( + _class.reference.pointer, + _id_callable3 as jni.JMethodIDPtr, + privilegedExceptionAction.reference.pointer) + .object(const jni.JObjectType()); } static final _id_privilegedCallable = _class.staticMethodId( @@ -1186,14 +2083,28 @@ class Executors extends jni.JObject { r"(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;", ); + static final _privilegedCallable = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public java.util.concurrent.Callable privilegedCallable(java.util.concurrent.Callable callable) /// The returned object must be released after use, by calling the [release] method. static jni.JObject privilegedCallable<$T extends jni.JObject>( jni.JObject callable, { required jni.JObjType<$T> T, }) { - return _id_privilegedCallable( - _class, const jni.JObjectType(), [callable.reference.pointer]); + return _privilegedCallable( + _class.reference.pointer, + _id_privilegedCallable as jni.JMethodIDPtr, + callable.reference.pointer) + .object(const jni.JObjectType()); } static final _id_privilegedCallableUsingCurrentClassLoader = @@ -1202,6 +2113,18 @@ class Executors extends jni.JObject { r"(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;", ); + static final _privilegedCallableUsingCurrentClassLoader = + ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public java.util.concurrent.Callable privilegedCallableUsingCurrentClassLoader(java.util.concurrent.Callable callable) /// The returned object must be released after use, by calling the [release] method. static jni.JObject @@ -1209,8 +2132,11 @@ class Executors extends jni.JObject { jni.JObject callable, { required jni.JObjType<$T> T, }) { - return _id_privilegedCallableUsingCurrentClassLoader( - _class, const jni.JObjectType(), [callable.reference.pointer]); + return _privilegedCallableUsingCurrentClassLoader( + _class.reference.pointer, + _id_privilegedCallableUsingCurrentClassLoader as jni.JMethodIDPtr, + callable.reference.pointer) + .object(const jni.JObjectType()); } } @@ -1257,11 +2183,24 @@ class CronetEngine_Builder_LibraryLoader extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory CronetEngine_Builder_LibraryLoader() { return CronetEngine_Builder_LibraryLoader.fromReference( - _id_new0(_class, referenceType, [])); + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_loadLibrary = _class.instanceMethodId( @@ -1269,11 +2208,24 @@ class CronetEngine_Builder_LibraryLoader extends jni.JObject { r"(Ljava/lang/String;)V", ); + static final _loadLibrary = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract void loadLibrary(java.lang.String string) void loadLibrary( jni.JString string, ) { - _id_loadLibrary(this, const jni.jvoidType(), [string.reference.pointer]); + _loadLibrary(reference.pointer, _id_loadLibrary as jni.JMethodIDPtr, + string.reference.pointer) + .check(); } } @@ -1344,26 +2296,52 @@ class CronetEngine_Builder extends jni.JObject { r"(Landroid/content/Context;)V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void (android.content.Context context) /// The returned object must be released after use, by calling the [release] method. factory CronetEngine_Builder( jni.JObject context, ) { - return CronetEngine_Builder.fromReference( - _id_new0(_class, referenceType, [context.reference.pointer])); + return CronetEngine_Builder.fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, context.reference.pointer) + .reference); } static final _id_new1 = _class.constructorId( r"(Lorg/chromium/net/ICronetEngineBuilder;)V", ); + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public void (org.chromium.net.ICronetEngineBuilder iCronetEngineBuilder) /// The returned object must be released after use, by calling the [release] method. factory CronetEngine_Builder.new1( jni.JObject iCronetEngineBuilder, ) { - return CronetEngine_Builder.fromReference(_id_new1( - _class, referenceType, [iCronetEngineBuilder.reference.pointer])); + return CronetEngine_Builder.fromReference(_new1( + _class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, + iCronetEngineBuilder.reference.pointer) + .reference); } static final _id_getDefaultUserAgent = _class.instanceMethodId( @@ -1371,10 +2349,24 @@ class CronetEngine_Builder extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getDefaultUserAgent = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public java.lang.String getDefaultUserAgent() /// The returned object must be released after use, by calling the [release] method. jni.JString getDefaultUserAgent() { - return _id_getDefaultUserAgent(this, const jni.JStringType(), []); + return _getDefaultUserAgent( + reference.pointer, _id_getDefaultUserAgent as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_setUserAgent = _class.instanceMethodId( @@ -1382,13 +2374,25 @@ class CronetEngine_Builder extends jni.JObject { r"(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;", ); + static final _setUserAgent = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public org.chromium.net.CronetEngine$Builder setUserAgent(java.lang.String string) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder setUserAgent( jni.JString string, ) { - return _id_setUserAgent( - this, const $CronetEngine_BuilderType(), [string.reference.pointer]); + return _setUserAgent(reference.pointer, + _id_setUserAgent as jni.JMethodIDPtr, string.reference.pointer) + .object(const $CronetEngine_BuilderType()); } static final _id_setStoragePath = _class.instanceMethodId( @@ -1396,13 +2400,25 @@ class CronetEngine_Builder extends jni.JObject { r"(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;", ); + static final _setStoragePath = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public org.chromium.net.CronetEngine$Builder setStoragePath(java.lang.String string) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder setStoragePath( jni.JString string, ) { - return _id_setStoragePath( - this, const $CronetEngine_BuilderType(), [string.reference.pointer]); + return _setStoragePath(reference.pointer, + _id_setStoragePath as jni.JMethodIDPtr, string.reference.pointer) + .object(const $CronetEngine_BuilderType()); } static final _id_setLibraryLoader = _class.instanceMethodId( @@ -1410,13 +2426,27 @@ class CronetEngine_Builder extends jni.JObject { r"(Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;)Lorg/chromium/net/CronetEngine$Builder;", ); + static final _setLibraryLoader = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public org.chromium.net.CronetEngine$Builder setLibraryLoader(org.chromium.net.CronetEngine$Builder$LibraryLoader libraryLoader) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder setLibraryLoader( CronetEngine_Builder_LibraryLoader libraryLoader, ) { - return _id_setLibraryLoader(this, const $CronetEngine_BuilderType(), - [libraryLoader.reference.pointer]); + return _setLibraryLoader( + reference.pointer, + _id_setLibraryLoader as jni.JMethodIDPtr, + libraryLoader.reference.pointer) + .object(const $CronetEngine_BuilderType()); } static final _id_enableQuic = _class.instanceMethodId( @@ -1424,12 +2454,22 @@ class CronetEngine_Builder extends jni.JObject { r"(Z)Lorg/chromium/net/CronetEngine$Builder;", ); + static final _enableQuic = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public org.chromium.net.CronetEngine$Builder enableQuic(boolean z) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableQuic( bool z, ) { - return _id_enableQuic(this, const $CronetEngine_BuilderType(), [z ? 1 : 0]); + return _enableQuic( + reference.pointer, _id_enableQuic as jni.JMethodIDPtr, z ? 1 : 0) + .object(const $CronetEngine_BuilderType()); } static final _id_enableHttp2 = _class.instanceMethodId( @@ -1437,13 +2477,22 @@ class CronetEngine_Builder extends jni.JObject { r"(Z)Lorg/chromium/net/CronetEngine$Builder;", ); + static final _enableHttp2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public org.chromium.net.CronetEngine$Builder enableHttp2(boolean z) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableHttp2( bool z, ) { - return _id_enableHttp2( - this, const $CronetEngine_BuilderType(), [z ? 1 : 0]); + return _enableHttp2( + reference.pointer, _id_enableHttp2 as jni.JMethodIDPtr, z ? 1 : 0) + .object(const $CronetEngine_BuilderType()); } static final _id_enableSdch = _class.instanceMethodId( @@ -1451,12 +2500,22 @@ class CronetEngine_Builder extends jni.JObject { r"(Z)Lorg/chromium/net/CronetEngine$Builder;", ); + static final _enableSdch = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public org.chromium.net.CronetEngine$Builder enableSdch(boolean z) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableSdch( bool z, ) { - return _id_enableSdch(this, const $CronetEngine_BuilderType(), [z ? 1 : 0]); + return _enableSdch( + reference.pointer, _id_enableSdch as jni.JMethodIDPtr, z ? 1 : 0) + .object(const $CronetEngine_BuilderType()); } static final _id_enableBrotli = _class.instanceMethodId( @@ -1464,13 +2523,22 @@ class CronetEngine_Builder extends jni.JObject { r"(Z)Lorg/chromium/net/CronetEngine$Builder;", ); + static final _enableBrotli = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public org.chromium.net.CronetEngine$Builder enableBrotli(boolean z) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableBrotli( bool z, ) { - return _id_enableBrotli( - this, const $CronetEngine_BuilderType(), [z ? 1 : 0]); + return _enableBrotli( + reference.pointer, _id_enableBrotli as jni.JMethodIDPtr, z ? 1 : 0) + .object(const $CronetEngine_BuilderType()); } static final _id_enableHttpCache = _class.instanceMethodId( @@ -1478,14 +2546,24 @@ class CronetEngine_Builder extends jni.JObject { r"(IJ)Lorg/chromium/net/CronetEngine$Builder;", ); + static final _enableHttpCache = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, + jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Int64)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int, int)>(); + /// from: public org.chromium.net.CronetEngine$Builder enableHttpCache(int i, long j) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableHttpCache( int i, int j, ) { - return _id_enableHttpCache( - this, const $CronetEngine_BuilderType(), [jni.JValueInt(i), j]); + return _enableHttpCache( + reference.pointer, _id_enableHttpCache as jni.JMethodIDPtr, i, j) + .object(const $CronetEngine_BuilderType()); } static final _id_addQuicHint = _class.instanceMethodId( @@ -1493,6 +2571,21 @@ class CronetEngine_Builder extends jni.JObject { r"(Ljava/lang/String;II)Lorg/chromium/net/CronetEngine$Builder;", ); + static final _addQuicHint = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); + /// from: public org.chromium.net.CronetEngine$Builder addQuicHint(java.lang.String string, int i, int i1) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder addQuicHint( @@ -1500,8 +2593,9 @@ class CronetEngine_Builder extends jni.JObject { int i, int i1, ) { - return _id_addQuicHint(this, const $CronetEngine_BuilderType(), - [string.reference.pointer, jni.JValueInt(i), jni.JValueInt(i1)]); + return _addQuicHint(reference.pointer, _id_addQuicHint as jni.JMethodIDPtr, + string.reference.pointer, i, i1) + .object(const $CronetEngine_BuilderType()); } static final _id_addPublicKeyPins = _class.instanceMethodId( @@ -1509,6 +2603,27 @@ class CronetEngine_Builder extends jni.JObject { r"(Ljava/lang/String;Ljava/util/Set;ZLjava/util/Date;)Lorg/chromium/net/CronetEngine$Builder;", ); + static final _addPublicKeyPins = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + /// from: public org.chromium.net.CronetEngine$Builder addPublicKeyPins(java.lang.String string, java.util.Set set, boolean z, java.util.Date date) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder addPublicKeyPins( @@ -1517,12 +2632,14 @@ class CronetEngine_Builder extends jni.JObject { bool z, jni.JObject date, ) { - return _id_addPublicKeyPins(this, const $CronetEngine_BuilderType(), [ - string.reference.pointer, - set0.reference.pointer, - z ? 1 : 0, - date.reference.pointer - ]); + return _addPublicKeyPins( + reference.pointer, + _id_addPublicKeyPins as jni.JMethodIDPtr, + string.reference.pointer, + set0.reference.pointer, + z ? 1 : 0, + date.reference.pointer) + .object(const $CronetEngine_BuilderType()); } static final _id_enablePublicKeyPinningBypassForLocalTrustAnchors = @@ -1531,13 +2648,28 @@ class CronetEngine_Builder extends jni.JObject { r"(Z)Lorg/chromium/net/CronetEngine$Builder;", ); + static final _enablePublicKeyPinningBypassForLocalTrustAnchors = + ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public org.chromium.net.CronetEngine$Builder enablePublicKeyPinningBypassForLocalTrustAnchors(boolean z) /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enablePublicKeyPinningBypassForLocalTrustAnchors( bool z, ) { - return _id_enablePublicKeyPinningBypassForLocalTrustAnchors( - this, const $CronetEngine_BuilderType(), [z ? 1 : 0]); + return _enablePublicKeyPinningBypassForLocalTrustAnchors( + reference.pointer, + _id_enablePublicKeyPinningBypassForLocalTrustAnchors + as jni.JMethodIDPtr, + z ? 1 : 0) + .object(const $CronetEngine_BuilderType()); } static final _id_build = _class.instanceMethodId( @@ -1545,10 +2677,23 @@ class CronetEngine_Builder extends jni.JObject { r"()Lorg/chromium/net/CronetEngine;", ); + static final _build = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public org.chromium.net.CronetEngine build() /// The returned object must be released after use, by calling the [release] method. CronetEngine build() { - return _id_build(this, const $CronetEngineType(), []); + return _build(reference.pointer, _id_build as jni.JMethodIDPtr) + .object(const $CronetEngineType()); } } @@ -1596,10 +2741,24 @@ class CronetEngine extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory CronetEngine() { - return CronetEngine.fromReference(_id_new0(_class, referenceType, [])); + return CronetEngine.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_getVersionString = _class.instanceMethodId( @@ -1607,10 +2766,24 @@ class CronetEngine extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getVersionString = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.lang.String getVersionString() /// The returned object must be released after use, by calling the [release] method. jni.JString getVersionString() { - return _id_getVersionString(this, const jni.JStringType(), []); + return _getVersionString( + reference.pointer, _id_getVersionString as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_shutdown = _class.instanceMethodId( @@ -1618,9 +2791,21 @@ class CronetEngine extends jni.JObject { r"()V", ); + static final _shutdown = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract void shutdown() void shutdown() { - _id_shutdown(this, const jni.jvoidType(), []); + _shutdown(reference.pointer, _id_shutdown as jni.JMethodIDPtr).check(); } static final _id_startNetLogToFile = _class.instanceMethodId( @@ -1628,13 +2813,28 @@ class CronetEngine extends jni.JObject { r"(Ljava/lang/String;Z)V", ); + static final _startNetLogToFile = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + /// from: public abstract void startNetLogToFile(java.lang.String string, boolean z) void startNetLogToFile( jni.JString string, bool z, ) { - _id_startNetLogToFile( - this, const jni.jvoidType(), [string.reference.pointer, z ? 1 : 0]); + _startNetLogToFile( + reference.pointer, + _id_startNetLogToFile as jni.JMethodIDPtr, + string.reference.pointer, + z ? 1 : 0) + .check(); } static final _id_stopNetLog = _class.instanceMethodId( @@ -1642,9 +2842,21 @@ class CronetEngine extends jni.JObject { r"()V", ); + static final _stopNetLog = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract void stopNetLog() void stopNetLog() { - _id_stopNetLog(this, const jni.jvoidType(), []); + _stopNetLog(reference.pointer, _id_stopNetLog as jni.JMethodIDPtr).check(); } static final _id_getGlobalMetricsDeltas = _class.instanceMethodId( @@ -1652,11 +2864,24 @@ class CronetEngine extends jni.JObject { r"()[B", ); + static final _getGlobalMetricsDeltas = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract byte[] getGlobalMetricsDeltas() /// The returned object must be released after use, by calling the [release] method. jni.JArray getGlobalMetricsDeltas() { - return _id_getGlobalMetricsDeltas( - this, const jni.JArrayType(jni.jbyteType()), []); + return _getGlobalMetricsDeltas( + reference.pointer, _id_getGlobalMetricsDeltas as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.jbyteType())); } static final _id_openConnection = _class.instanceMethodId( @@ -1664,13 +2889,25 @@ class CronetEngine extends jni.JObject { r"(Ljava/net/URL;)Ljava/net/URLConnection;", ); + static final _openConnection = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract java.net.URLConnection openConnection(java.net.URL uRL) /// The returned object must be released after use, by calling the [release] method. jni.JObject openConnection( URL uRL, ) { - return _id_openConnection( - this, const jni.JObjectType(), [uRL.reference.pointer]); + return _openConnection(reference.pointer, + _id_openConnection as jni.JMethodIDPtr, uRL.reference.pointer) + .object(const jni.JObjectType()); } static final _id_createURLStreamHandlerFactory = _class.instanceMethodId( @@ -1678,10 +2915,24 @@ class CronetEngine extends jni.JObject { r"()Ljava/net/URLStreamHandlerFactory;", ); + static final _createURLStreamHandlerFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.net.URLStreamHandlerFactory createURLStreamHandlerFactory() /// The returned object must be released after use, by calling the [release] method. jni.JObject createURLStreamHandlerFactory() { - return _id_createURLStreamHandlerFactory(this, const jni.JObjectType(), []); + return _createURLStreamHandlerFactory(reference.pointer, + _id_createURLStreamHandlerFactory as jni.JMethodIDPtr) + .object(const jni.JObjectType()); } static final _id_newUrlRequestBuilder = _class.instanceMethodId( @@ -1689,6 +2940,25 @@ class CronetEngine extends jni.JObject { r"(Ljava/lang/String;Lorg/chromium/net/UrlRequest$Callback;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;", ); + static final _newUrlRequestBuilder = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public abstract org.chromium.net.UrlRequest$Builder newUrlRequestBuilder(java.lang.String string, org.chromium.net.UrlRequest$Callback callback, java.util.concurrent.Executor executor) /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder newUrlRequestBuilder( @@ -1696,11 +2966,13 @@ class CronetEngine extends jni.JObject { UrlRequest_Callback callback, jni.JObject executor, ) { - return _id_newUrlRequestBuilder(this, const $UrlRequest_BuilderType(), [ - string.reference.pointer, - callback.reference.pointer, - executor.reference.pointer - ]); + return _newUrlRequestBuilder( + reference.pointer, + _id_newUrlRequestBuilder as jni.JMethodIDPtr, + string.reference.pointer, + callback.reference.pointer, + executor.reference.pointer) + .object(const $UrlRequest_BuilderType()); } } @@ -1747,14 +3019,32 @@ class CronetException extends jni.JObject { r"(Ljava/lang/String;Ljava/lang/Throwable;)V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: protected void (java.lang.String string, java.lang.Throwable throwable) /// The returned object must be released after use, by calling the [release] method. factory CronetException( jni.JString string, jni.JObject throwable, ) { - return CronetException.fromReference(_id_new0(_class, referenceType, - [string.reference.pointer, throwable.reference.pointer])); + return CronetException.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + string.reference.pointer, + throwable.reference.pointer) + .reference); } } @@ -1803,13 +3093,25 @@ class UploadDataProviders extends jni.JObject { r"(Ljava/io/File;)Lorg/chromium/net/UploadDataProvider;", ); + static final _create = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public org.chromium.net.UploadDataProvider create(java.io.File file) /// The returned object must be released after use, by calling the [release] method. static jni.JObject create( jni.JObject file, ) { - return _id_create( - _class, const jni.JObjectType(), [file.reference.pointer]); + return _create(_class.reference.pointer, _id_create as jni.JMethodIDPtr, + file.reference.pointer) + .object(const jni.JObjectType()); } static final _id_create1 = _class.staticMethodId( @@ -1817,13 +3119,25 @@ class UploadDataProviders extends jni.JObject { r"(Landroid/os/ParcelFileDescriptor;)Lorg/chromium/net/UploadDataProvider;", ); + static final _create1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public org.chromium.net.UploadDataProvider create(android.os.ParcelFileDescriptor parcelFileDescriptor) /// The returned object must be released after use, by calling the [release] method. static jni.JObject create1( jni.JObject parcelFileDescriptor, ) { - return _id_create1(_class, const jni.JObjectType(), - [parcelFileDescriptor.reference.pointer]); + return _create1(_class.reference.pointer, _id_create1 as jni.JMethodIDPtr, + parcelFileDescriptor.reference.pointer) + .object(const jni.JObjectType()); } static final _id_create2 = _class.staticMethodId( @@ -1831,13 +3145,25 @@ class UploadDataProviders extends jni.JObject { r"(Ljava/nio/ByteBuffer;)Lorg/chromium/net/UploadDataProvider;", ); + static final _create2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public org.chromium.net.UploadDataProvider create(java.nio.ByteBuffer byteBuffer) /// The returned object must be released after use, by calling the [release] method. static jni.JObject create2( jni.JByteBuffer byteBuffer, ) { - return _id_create2( - _class, const jni.JObjectType(), [byteBuffer.reference.pointer]); + return _create2(_class.reference.pointer, _id_create2 as jni.JMethodIDPtr, + byteBuffer.reference.pointer) + .object(const jni.JObjectType()); } static final _id_create3 = _class.staticMethodId( @@ -1845,6 +3171,21 @@ class UploadDataProviders extends jni.JObject { r"([BII)Lorg/chromium/net/UploadDataProvider;", ); + static final _create3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); + /// from: static public org.chromium.net.UploadDataProvider create(byte[] bs, int i, int i1) /// The returned object must be released after use, by calling the [release] method. static jni.JObject create3( @@ -1852,8 +3193,9 @@ class UploadDataProviders extends jni.JObject { int i, int i1, ) { - return _id_create3(_class, const jni.JObjectType(), - [bs.reference.pointer, jni.JValueInt(i), jni.JValueInt(i1)]); + return _create3(_class.reference.pointer, _id_create3 as jni.JMethodIDPtr, + bs.reference.pointer, i, i1) + .object(const jni.JObjectType()); } static final _id_create4 = _class.staticMethodId( @@ -1861,12 +3203,25 @@ class UploadDataProviders extends jni.JObject { r"([B)Lorg/chromium/net/UploadDataProvider;", ); + static final _create4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: static public org.chromium.net.UploadDataProvider create(byte[] bs) /// The returned object must be released after use, by calling the [release] method. static jni.JObject create4( jni.JArray bs, ) { - return _id_create4(_class, const jni.JObjectType(), [bs.reference.pointer]); + return _create4(_class.reference.pointer, _id_create4 as jni.JMethodIDPtr, + bs.reference.pointer) + .object(const jni.JObjectType()); } } @@ -1929,11 +3284,24 @@ class UrlRequest_Builder extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory UrlRequest_Builder() { return UrlRequest_Builder.fromReference( - _id_new0(_class, referenceType, [])); + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_setHttpMethod = _class.instanceMethodId( @@ -1941,13 +3309,25 @@ class UrlRequest_Builder extends jni.JObject { r"(Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;", ); + static final _setHttpMethod = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract org.chromium.net.UrlRequest$Builder setHttpMethod(java.lang.String string) /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder setHttpMethod( jni.JString string, ) { - return _id_setHttpMethod( - this, const $UrlRequest_BuilderType(), [string.reference.pointer]); + return _setHttpMethod(reference.pointer, + _id_setHttpMethod as jni.JMethodIDPtr, string.reference.pointer) + .object(const $UrlRequest_BuilderType()); } static final _id_addHeader = _class.instanceMethodId( @@ -1955,14 +3335,29 @@ class UrlRequest_Builder extends jni.JObject { r"(Ljava/lang/String;Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;", ); + static final _addHeader = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public abstract org.chromium.net.UrlRequest$Builder addHeader(java.lang.String string, java.lang.String string1) /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder addHeader( jni.JString string, jni.JString string1, ) { - return _id_addHeader(this, const $UrlRequest_BuilderType(), - [string.reference.pointer, string1.reference.pointer]); + return _addHeader(reference.pointer, _id_addHeader as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $UrlRequest_BuilderType()); } static final _id_disableCache = _class.instanceMethodId( @@ -1970,10 +3365,24 @@ class UrlRequest_Builder extends jni.JObject { r"()Lorg/chromium/net/UrlRequest$Builder;", ); + static final _disableCache = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract org.chromium.net.UrlRequest$Builder disableCache() /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder disableCache() { - return _id_disableCache(this, const $UrlRequest_BuilderType(), []); + return _disableCache( + reference.pointer, _id_disableCache as jni.JMethodIDPtr) + .object(const $UrlRequest_BuilderType()); } static final _id_setPriority = _class.instanceMethodId( @@ -1981,13 +3390,22 @@ class UrlRequest_Builder extends jni.JObject { r"(I)Lorg/chromium/net/UrlRequest$Builder;", ); + static final _setPriority = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public abstract org.chromium.net.UrlRequest$Builder setPriority(int i) /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder setPriority( int i, ) { - return _id_setPriority( - this, const $UrlRequest_BuilderType(), [jni.JValueInt(i)]); + return _setPriority( + reference.pointer, _id_setPriority as jni.JMethodIDPtr, i) + .object(const $UrlRequest_BuilderType()); } static final _id_setUploadDataProvider = _class.instanceMethodId( @@ -1995,14 +3413,32 @@ class UrlRequest_Builder extends jni.JObject { r"(Lorg/chromium/net/UploadDataProvider;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;", ); + static final _setUploadDataProvider = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public abstract org.chromium.net.UrlRequest$Builder setUploadDataProvider(org.chromium.net.UploadDataProvider uploadDataProvider, java.util.concurrent.Executor executor) /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder setUploadDataProvider( jni.JObject uploadDataProvider, jni.JObject executor, ) { - return _id_setUploadDataProvider(this, const $UrlRequest_BuilderType(), - [uploadDataProvider.reference.pointer, executor.reference.pointer]); + return _setUploadDataProvider( + reference.pointer, + _id_setUploadDataProvider as jni.JMethodIDPtr, + uploadDataProvider.reference.pointer, + executor.reference.pointer) + .object(const $UrlRequest_BuilderType()); } static final _id_allowDirectExecutor = _class.instanceMethodId( @@ -2010,10 +3446,24 @@ class UrlRequest_Builder extends jni.JObject { r"()Lorg/chromium/net/UrlRequest$Builder;", ); + static final _allowDirectExecutor = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract org.chromium.net.UrlRequest$Builder allowDirectExecutor() /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder allowDirectExecutor() { - return _id_allowDirectExecutor(this, const $UrlRequest_BuilderType(), []); + return _allowDirectExecutor( + reference.pointer, _id_allowDirectExecutor as jni.JMethodIDPtr) + .object(const $UrlRequest_BuilderType()); } static final _id_build = _class.instanceMethodId( @@ -2021,10 +3471,23 @@ class UrlRequest_Builder extends jni.JObject { r"()Lorg/chromium/net/UrlRequest;", ); + static final _build = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract org.chromium.net.UrlRequest build() /// The returned object must be released after use, by calling the [release] method. UrlRequest build() { - return _id_build(this, const $UrlRequestType(), []); + return _build(reference.pointer, _id_build as jni.JMethodIDPtr) + .object(const $UrlRequestType()); } } @@ -2072,11 +3535,24 @@ class UrlRequest_Callback extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory UrlRequest_Callback() { return UrlRequest_Callback.fromReference( - _id_new0(_class, referenceType, [])); + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_onRedirectReceived = _class.instanceMethodId( @@ -2084,17 +3560,38 @@ class UrlRequest_Callback extends jni.JObject { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V", ); + static final _onRedirectReceived = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public abstract void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string) void onRedirectReceived( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JString string, ) { - _id_onRedirectReceived(this, const jni.jvoidType(), [ - urlRequest.reference.pointer, - urlResponseInfo.reference.pointer, - string.reference.pointer - ]); + _onRedirectReceived( + reference.pointer, + _id_onRedirectReceived as jni.JMethodIDPtr, + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + string.reference.pointer) + .check(); } static final _id_onResponseStarted = _class.instanceMethodId( @@ -2102,13 +3599,31 @@ class UrlRequest_Callback extends jni.JObject { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", ); + static final _onResponseStarted = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public abstract void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onResponseStarted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { - _id_onResponseStarted(this, const jni.jvoidType(), - [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + _onResponseStarted( + reference.pointer, + _id_onResponseStarted as jni.JMethodIDPtr, + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer) + .check(); } static final _id_onReadCompleted = _class.instanceMethodId( @@ -2116,17 +3631,38 @@ class UrlRequest_Callback extends jni.JObject { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V", ); + static final _onReadCompleted = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public abstract void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer) void onReadCompleted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, jni.JByteBuffer byteBuffer, ) { - _id_onReadCompleted(this, const jni.jvoidType(), [ - urlRequest.reference.pointer, - urlResponseInfo.reference.pointer, - byteBuffer.reference.pointer - ]); + _onReadCompleted( + reference.pointer, + _id_onReadCompleted as jni.JMethodIDPtr, + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + byteBuffer.reference.pointer) + .check(); } static final _id_onSucceeded = _class.instanceMethodId( @@ -2134,13 +3670,28 @@ class UrlRequest_Callback extends jni.JObject { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", ); + static final _onSucceeded = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public abstract void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onSucceeded( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { - _id_onSucceeded(this, const jni.jvoidType(), - [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + _onSucceeded(reference.pointer, _id_onSucceeded as jni.JMethodIDPtr, + urlRequest.reference.pointer, urlResponseInfo.reference.pointer) + .check(); } static final _id_onFailed = _class.instanceMethodId( @@ -2148,17 +3699,38 @@ class UrlRequest_Callback extends jni.JObject { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V", ); + static final _onFailed = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + /// from: public abstract void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException) void onFailed( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, CronetException cronetException, ) { - _id_onFailed(this, const jni.jvoidType(), [ - urlRequest.reference.pointer, - urlResponseInfo.reference.pointer, - cronetException.reference.pointer - ]); + _onFailed( + reference.pointer, + _id_onFailed as jni.JMethodIDPtr, + urlRequest.reference.pointer, + urlResponseInfo.reference.pointer, + cronetException.reference.pointer) + .check(); } static final _id_onCanceled = _class.instanceMethodId( @@ -2166,13 +3738,28 @@ class UrlRequest_Callback extends jni.JObject { r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", ); + static final _onCanceled = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + /// from: public void onCanceled(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) void onCanceled( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { - _id_onCanceled(this, const jni.jvoidType(), - [urlRequest.reference.pointer, urlResponseInfo.reference.pointer]); + _onCanceled(reference.pointer, _id_onCanceled as jni.JMethodIDPtr, + urlRequest.reference.pointer, urlResponseInfo.reference.pointer) + .check(); } } @@ -2310,11 +3897,24 @@ class UrlRequest_StatusListener extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory UrlRequest_StatusListener() { return UrlRequest_StatusListener.fromReference( - _id_new0(_class, referenceType, [])); + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_onStatus = _class.instanceMethodId( @@ -2322,11 +3922,21 @@ class UrlRequest_StatusListener extends jni.JObject { r"(I)V", ); + static final _onStatus = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + /// from: public abstract void onStatus(int i) void onStatus( int i, ) { - _id_onStatus(this, const jni.jvoidType(), [jni.JValueInt(i)]); + _onStatus(reference.pointer, _id_onStatus as jni.JMethodIDPtr, i).check(); } } @@ -2374,10 +3984,24 @@ class UrlRequest extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory UrlRequest() { - return UrlRequest.fromReference(_id_new0(_class, referenceType, [])); + return UrlRequest.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_start = _class.instanceMethodId( @@ -2385,9 +4009,21 @@ class UrlRequest extends jni.JObject { r"()V", ); + static final _start = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract void start() void start() { - _id_start(this, const jni.jvoidType(), []); + _start(reference.pointer, _id_start as jni.JMethodIDPtr).check(); } static final _id_followRedirect = _class.instanceMethodId( @@ -2395,9 +4031,22 @@ class UrlRequest extends jni.JObject { r"()V", ); + static final _followRedirect = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract void followRedirect() void followRedirect() { - _id_followRedirect(this, const jni.jvoidType(), []); + _followRedirect(reference.pointer, _id_followRedirect as jni.JMethodIDPtr) + .check(); } static final _id_read = _class.instanceMethodId( @@ -2405,11 +4054,24 @@ class UrlRequest extends jni.JObject { r"(Ljava/nio/ByteBuffer;)V", ); + static final _read = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract void read(java.nio.ByteBuffer byteBuffer) void read( jni.JByteBuffer byteBuffer, ) { - _id_read(this, const jni.jvoidType(), [byteBuffer.reference.pointer]); + _read(reference.pointer, _id_read as jni.JMethodIDPtr, + byteBuffer.reference.pointer) + .check(); } static final _id_cancel = _class.instanceMethodId( @@ -2417,9 +4079,21 @@ class UrlRequest extends jni.JObject { r"()V", ); + static final _cancel = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract void cancel() void cancel() { - _id_cancel(this, const jni.jvoidType(), []); + _cancel(reference.pointer, _id_cancel as jni.JMethodIDPtr).check(); } static final _id_isDone = _class.instanceMethodId( @@ -2427,9 +4101,21 @@ class UrlRequest extends jni.JObject { r"()Z", ); + static final _isDone = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract boolean isDone() bool isDone() { - return _id_isDone(this, const jni.jbooleanType(), []); + return _isDone(reference.pointer, _id_isDone as jni.JMethodIDPtr).boolean; } static final _id_getStatus = _class.instanceMethodId( @@ -2437,12 +4123,24 @@ class UrlRequest extends jni.JObject { r"(Lorg/chromium/net/UrlRequest$StatusListener;)V", ); + static final _getStatus = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + /// from: public abstract void getStatus(org.chromium.net.UrlRequest$StatusListener statusListener) void getStatus( UrlRequest_StatusListener statusListener, ) { - _id_getStatus( - this, const jni.jvoidType(), [statusListener.reference.pointer]); + _getStatus(reference.pointer, _id_getStatus as jni.JMethodIDPtr, + statusListener.reference.pointer) + .check(); } } @@ -2489,11 +4187,24 @@ class UrlResponseInfo_HeaderBlock extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory UrlResponseInfo_HeaderBlock() { return UrlResponseInfo_HeaderBlock.fromReference( - _id_new0(_class, referenceType, [])); + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_getAsList = _class.instanceMethodId( @@ -2501,10 +4212,23 @@ class UrlResponseInfo_HeaderBlock extends jni.JObject { r"()Ljava/util/List;", ); + static final _getAsList = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.util.List getAsList() /// The returned object must be released after use, by calling the [release] method. jni.JList getAsList() { - return _id_getAsList(this, const jni.JListType(jni.JObjectType()), []); + return _getAsList(reference.pointer, _id_getAsList as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); } static final _id_getAsMap = _class.instanceMethodId( @@ -2512,13 +4236,24 @@ class UrlResponseInfo_HeaderBlock extends jni.JObject { r"()Ljava/util/Map;", ); + static final _getAsMap = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.util.Map getAsMap() /// The returned object must be released after use, by calling the [release] method. jni.JMap> getAsMap() { - return _id_getAsMap( - this, - const jni.JMapType(jni.JStringType(), jni.JListType(jni.JStringType())), - []); + return _getAsMap(reference.pointer, _id_getAsMap as jni.JMethodIDPtr) + .object(const jni.JMapType( + jni.JStringType(), jni.JListType(jni.JStringType()))); } } @@ -2566,10 +4301,24 @@ class UrlResponseInfo extends jni.JObject { r"()V", ); + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public void () /// The returned object must be released after use, by calling the [release] method. factory UrlResponseInfo() { - return UrlResponseInfo.fromReference(_id_new0(_class, referenceType, [])); + return UrlResponseInfo.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); } static final _id_getUrl = _class.instanceMethodId( @@ -2577,10 +4326,23 @@ class UrlResponseInfo extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getUrl = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.lang.String getUrl() /// The returned object must be released after use, by calling the [release] method. jni.JString getUrl() { - return _id_getUrl(this, const jni.JStringType(), []); + return _getUrl(reference.pointer, _id_getUrl as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getUrlChain = _class.instanceMethodId( @@ -2588,10 +4350,23 @@ class UrlResponseInfo extends jni.JObject { r"()Ljava/util/List;", ); + static final _getUrlChain = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.util.List getUrlChain() /// The returned object must be released after use, by calling the [release] method. jni.JList getUrlChain() { - return _id_getUrlChain(this, const jni.JListType(jni.JStringType()), []); + return _getUrlChain(reference.pointer, _id_getUrlChain as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JStringType())); } static final _id_getHttpStatusCode = _class.instanceMethodId( @@ -2599,9 +4374,23 @@ class UrlResponseInfo extends jni.JObject { r"()I", ); + static final _getHttpStatusCode = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract int getHttpStatusCode() int getHttpStatusCode() { - return _id_getHttpStatusCode(this, const jni.jintType(), []); + return _getHttpStatusCode( + reference.pointer, _id_getHttpStatusCode as jni.JMethodIDPtr) + .integer; } static final _id_getHttpStatusText = _class.instanceMethodId( @@ -2609,10 +4398,24 @@ class UrlResponseInfo extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getHttpStatusText = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.lang.String getHttpStatusText() /// The returned object must be released after use, by calling the [release] method. jni.JString getHttpStatusText() { - return _id_getHttpStatusText(this, const jni.JStringType(), []); + return _getHttpStatusText( + reference.pointer, _id_getHttpStatusText as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getAllHeadersAsList = _class.instanceMethodId( @@ -2620,11 +4423,24 @@ class UrlResponseInfo extends jni.JObject { r"()Ljava/util/List;", ); + static final _getAllHeadersAsList = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.util.List getAllHeadersAsList() /// The returned object must be released after use, by calling the [release] method. jni.JList getAllHeadersAsList() { - return _id_getAllHeadersAsList( - this, const jni.JListType(jni.JObjectType()), []); + return _getAllHeadersAsList( + reference.pointer, _id_getAllHeadersAsList as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); } static final _id_getAllHeaders = _class.instanceMethodId( @@ -2632,13 +4448,25 @@ class UrlResponseInfo extends jni.JObject { r"()Ljava/util/Map;", ); + static final _getAllHeaders = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.util.Map getAllHeaders() /// The returned object must be released after use, by calling the [release] method. jni.JMap> getAllHeaders() { - return _id_getAllHeaders( - this, - const jni.JMapType(jni.JStringType(), jni.JListType(jni.JStringType())), - []); + return _getAllHeaders( + reference.pointer, _id_getAllHeaders as jni.JMethodIDPtr) + .object(const jni.JMapType( + jni.JStringType(), jni.JListType(jni.JStringType()))); } static final _id_wasCached = _class.instanceMethodId( @@ -2646,9 +4474,22 @@ class UrlResponseInfo extends jni.JObject { r"()Z", ); + static final _wasCached = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract boolean wasCached() bool wasCached() { - return _id_wasCached(this, const jni.jbooleanType(), []); + return _wasCached(reference.pointer, _id_wasCached as jni.JMethodIDPtr) + .boolean; } static final _id_getNegotiatedProtocol = _class.instanceMethodId( @@ -2656,10 +4497,24 @@ class UrlResponseInfo extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getNegotiatedProtocol = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.lang.String getNegotiatedProtocol() /// The returned object must be released after use, by calling the [release] method. jni.JString getNegotiatedProtocol() { - return _id_getNegotiatedProtocol(this, const jni.JStringType(), []); + return _getNegotiatedProtocol( + reference.pointer, _id_getNegotiatedProtocol as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getProxyServer = _class.instanceMethodId( @@ -2667,10 +4522,24 @@ class UrlResponseInfo extends jni.JObject { r"()Ljava/lang/String;", ); + static final _getProxyServer = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract java.lang.String getProxyServer() /// The returned object must be released after use, by calling the [release] method. jni.JString getProxyServer() { - return _id_getProxyServer(this, const jni.JStringType(), []); + return _getProxyServer( + reference.pointer, _id_getProxyServer as jni.JMethodIDPtr) + .object(const jni.JStringType()); } static final _id_getReceivedByteCount = _class.instanceMethodId( @@ -2678,9 +4547,23 @@ class UrlResponseInfo extends jni.JObject { r"()J", ); + static final _getReceivedByteCount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + /// from: public abstract long getReceivedByteCount() int getReceivedByteCount() { - return _id_getReceivedByteCount(this, const jni.jlongType(), []); + return _getReceivedByteCount( + reference.pointer, _id_getReceivedByteCount as jni.JMethodIDPtr) + .long; } } diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 9619bca83c..261f1fb6d6 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 1.2.0 +version: 1.2.1-wip description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http @@ -12,11 +12,11 @@ dependencies: flutter: sdk: flutter http: ^1.2.0 - jni: ^0.8.0 + jni: ^0.9.2 dev_dependencies: dart_flutter_team_lints: ^2.0.0 - jnigen: ^0.8.0 + jnigen: ^0.9.1 xml: ^6.1.0 yaml_edit: ^2.0.3 From 453d8479b7a40eaec31ac7e4141cd0137d569f5b Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 17 May 2024 15:19:58 -0700 Subject: [PATCH 363/448] Get ready to publish cronet_http 1.2.1 (#1202) --- pkgs/cronet_http/CHANGELOG.md | 2 +- pkgs/cronet_http/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index a7dac11f08..188b3cd17e 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.2.1-wip +## 1.2.1 * Upgrade `package:jni` to 0.9.2 to fix the build error in the latest versions of Flutter. diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 261f1fb6d6..2e869381f9 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 1.2.1-wip +version: 1.2.1 description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http From 8b221fdec5d08ee7bc063fee0b19cec9ae87edb2 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 17 May 2024 15:41:46 -0700 Subject: [PATCH 364/448] Create a fake WebSocket implementation (#1200) * Create a fake WebSocket implementation * Better example * Update pkgs/web_socket/lib/testing.dart Co-authored-by: Nate Bosch --------- Co-authored-by: Nate Bosch --- pkgs/web_socket/CHANGELOG.md | 5 + pkgs/web_socket/lib/src/fake_web_socket.dart | 123 ++++++++++++++++++ pkgs/web_socket/lib/testing.dart | 1 + pkgs/web_socket/pubspec.yaml | 2 +- .../web_socket/test/fake_web_socket_test.dart | 59 +++++++++ 5 files changed, 189 insertions(+), 1 deletion(-) create mode 100644 pkgs/web_socket/lib/src/fake_web_socket.dart create mode 100644 pkgs/web_socket/lib/testing.dart create mode 100644 pkgs/web_socket/test/fake_web_socket_test.dart diff --git a/pkgs/web_socket/CHANGELOG.md b/pkgs/web_socket/CHANGELOG.md index 2f2a07b25d..9f6bbdbc56 100644 --- a/pkgs/web_socket/CHANGELOG.md +++ b/pkgs/web_socket/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.1.4 + +- Add a `fakes` function that returns a pair of `WebSocket`s useful in + testing. + ## 0.1.3 - Bring the behavior in line with the documentation by throwing diff --git a/pkgs/web_socket/lib/src/fake_web_socket.dart b/pkgs/web_socket/lib/src/fake_web_socket.dart new file mode 100644 index 0000000000..1e4d07198a --- /dev/null +++ b/pkgs/web_socket/lib/src/fake_web_socket.dart @@ -0,0 +1,123 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:typed_data'; + +import '../web_socket.dart'; +import 'utils.dart'; +import 'web_socket.dart'; + +class FakeWebSocket implements WebSocket { + late FakeWebSocket _other; + + final String _protocol; + final _events = StreamController(); + + FakeWebSocket(this._protocol); + + @override + Future close([int? code, String? reason]) async { + if (_events.isClosed) { + throw WebSocketConnectionClosed(); + } + + checkCloseCode(code); + checkCloseReason(reason); + + unawaited(_events.close()); + if (!_other._events.isClosed) { + _other._events.add(CloseReceived(code ?? 1005, reason ?? '')); + unawaited(_other._events.close()); + } + } + + @override + Stream get events => _events.stream; + + @override + String get protocol => _protocol; + + @override + void sendBytes(Uint8List b) { + if (_events.isClosed) { + throw WebSocketConnectionClosed(); + } + if (_other._events.isClosed) return; + _other._events.add(BinaryDataReceived(b)); + } + + @override + void sendText(String s) { + if (_events.isClosed) { + throw WebSocketConnectionClosed(); + } + if (_other._events.isClosed) return; + _other._events.add(TextDataReceived(s)); + } +} + +/// Create a pair of fake [WebSocket]s that are connected to each other. +/// +/// Sending a message on one [WebSocket] will result in that same message being +/// received by the other. +/// +/// This can be useful in constructing tests. +/// +/// For example: +/// +/// ```dart +/// import 'dart:async'; +/// +/// import 'package:test/test.dart'; +/// import 'package:web_socket/src/web_socket.dart'; +/// import 'package:web_socket/testing.dart'; +/// import 'package:web_socket/web_socket.dart'; +/// +/// Future fakeTimeServer(WebSocket webSocket, String time) async { +/// await webSocket.events.forEach((event) { +/// switch (event) { +/// case TextDataReceived(): +/// case BinaryDataReceived(): +/// webSocket.sendText(time); +/// case CloseReceived(): +/// } +/// }); +/// } +/// +/// Future getTime(WebSocket webSocket) async { +/// webSocket.sendText(''); +/// final time = switch (await webSocket.events.first) { +/// TextDataReceived(:final text) => DateTime.parse(text), +/// _ => throw Exception('unexpected response') +/// }; +/// await webSocket.close(); +/// return time; +/// } +/// +/// void main() async { +/// late WebSocket client; +/// late WebSocket server; +/// +/// setUp(() { +/// (client, server) = fakes(); +/// }); +/// +/// test('test valid time', () async { +/// unawaited(fakeTimeServer(server, '2024-05-15T01:18:10.456Z')); +/// expect( +/// await getTime(client), +/// DateTime.parse('2024-05-15T01:18:10.456Z')); +/// }); +/// } +/// ``` +(WebSocket, WebSocket) fakes({String protocol = ''}) { + final peer1 = FakeWebSocket(protocol); + final peer2 = FakeWebSocket(protocol); + + peer1._other = peer2; + peer2._other = peer1; + + return (peer1, peer2); +} diff --git a/pkgs/web_socket/lib/testing.dart b/pkgs/web_socket/lib/testing.dart new file mode 100644 index 0000000000..669bf1dfb3 --- /dev/null +++ b/pkgs/web_socket/lib/testing.dart @@ -0,0 +1 @@ +export 'src/fake_web_socket.dart' show fakes; diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml index f9d95a75ff..1a04f8adff 100644 --- a/pkgs/web_socket/pubspec.yaml +++ b/pkgs/web_socket/pubspec.yaml @@ -3,7 +3,7 @@ description: >- Any easy-to-use library for communicating with WebSockets that has multiple implementations. repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket -version: 0.1.3 +version: 0.1.4 environment: sdk: ^3.3.0 diff --git a/pkgs/web_socket/test/fake_web_socket_test.dart b/pkgs/web_socket/test/fake_web_socket_test.dart new file mode 100644 index 0000000000..d8fd559433 --- /dev/null +++ b/pkgs/web_socket/test/fake_web_socket_test.dart @@ -0,0 +1,59 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:web_socket/src/fake_web_socket.dart'; +import 'package:web_socket/web_socket.dart'; +import 'package:web_socket_conformance_tests/web_socket_conformance_tests.dart'; + +/// Forward data received from [from] to [to]. +void proxy(WebSocket from, WebSocket to) { + from.events.listen((event) { + try { + switch (event) { + case TextDataReceived(:final text): + to.sendText(text); + case BinaryDataReceived(:final data): + to.sendBytes(data); + case CloseReceived(:var code, :final reason): + if (code != null && (code < 3000 || code > 4999)) { + code = null; + } + to.close(code, reason); + } + } on WebSocketConnectionClosed { + // `to` may have been closed locally so ignore failures to forward the + // data. + } + }); +} + +/// Create a bidirectional proxy relationship between [a] and [b]. +/// +/// That means that events received by [a] will be forwarded to [b] and +/// vise-versa. +void bidirectionalProxy(WebSocket a, WebSocket b) { + proxy(a, b); + proxy(b, a); +} + +void main() { + // In order to use `testAll`, we need to provide a method that will connect + // to a real WebSocket server. + // + // The approach is to connect to the server with a real WebSocket and forward + // the data received by that data to one of the fakes. + // + // Like: + // + // 'hello' sendText('hello') TextDataReceived('hello') + // [Server] -> [realClient] -> [FakeServer] -> [fakeClient] + Future connect(Uri url, {Iterable? protocols}) async { + final realClient = await WebSocket.connect(url, protocols: protocols); + final (fakeServer, fakeClient) = fakes(protocol: realClient.protocol); + bidirectionalProxy(realClient, fakeServer); + return fakeClient; + } + + testAll(connect); +} From 959bcf6382d507d1161e817326f5f3cab1e75c7a Mon Sep 17 00:00:00 2001 From: Jonas Finnemann Jensen Date: Tue, 21 May 2024 12:31:33 +0200 Subject: [PATCH 365/448] Add `topics` to `pubspec.yaml` (#1199) --- pkgs/http/pubspec.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 887a92570f..fca33f8650 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -2,6 +2,9 @@ name: http version: 1.2.2-wip description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http +topics: + - http + - network environment: sdk: ^3.3.0 From 1163c98c6dc038de60d08f72542e89d4646e2efa Mon Sep 17 00:00:00 2001 From: Derek Xu Date: Wed, 22 May 2024 16:16:17 -0400 Subject: [PATCH 366/448] [package:http_profile] Update experimental status notice in README.md (#1206) --- pkgs/http_profile/README.md | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/pkgs/http_profile/README.md b/pkgs/http_profile/README.md index 3b6511fe42..2eb490e86e 100644 --- a/pkgs/http_profile/README.md +++ b/pkgs/http_profile/README.md @@ -54,16 +54,11 @@ Refer to the source of to see a comprehensive example of how `package:http_profile` can be integrated into an HTTP client. -## Status: experimental +## Status: pre-1.0 -**NOTE**: This package is currently experimental and published under the -[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to -solicit feedback. - -For packages in the labs.dart.dev publisher we generally plan to either graduate -the package into a supported publisher (dart.dev, tools.dart.dev) after a period -of feedback and iteration, or discontinue the package. These packages have a -much higher expected rate of API and breaking changes. +**NOTE**: We are in the process of collecting feedback and iterating on this +package, so new versions that include API and breaking changes may be published +frequently. Your feedback is valuable and will help us evolve this package. For general feedback, suggestions, and comments, please file an issue in the From eee7e55938b2da974358df792ecb7df4fee3a479 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 22 May 2024 18:22:40 -0700 Subject: [PATCH 367/448] Add explanation about why `package:web_socket` exists (#1207) --- pkgs/web_socket/README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/pkgs/web_socket/README.md b/pkgs/web_socket/README.md index 786d239891..1356d9c1e3 100644 --- a/pkgs/web_socket/README.md +++ b/pkgs/web_socket/README.md @@ -1,9 +1,31 @@ [![pub package](https://img.shields.io/pub/v/web_socket.svg)](https://pub.dev/packages/web_socket) [![package publisher](https://img.shields.io/pub/publisher/web_socket.svg)](https://pub.dev/packages/web_socket/publisher) -Any easy-to-use library for communicating with WebSockets that has multiple +Any easy-to-use library for communicating with +[WebSockets](https://en.wikipedia.org/wiki/WebSocket) that has multiple implementations. +## Why another WebSocket package? + +The goal of `package:web_socket` is to provide a simple, well-defined +[WebSockets](https://en.wikipedia.org/wiki/WebSocket) interface that has +consistent behavior across implementations. + +[`package:web_socket_channel`](https://pub.dev/documentation/web_socket_channel/) +is currently the most popular WebSocket package. It has +two implementations, one based on `package:web` and the other based on +`dart:io` `WebSocket`. But those implementations do not have consistent +behavior. + +[`WebSocket`](https://pub.dev/documentation/web_socket/latest/web_socket/WebSocket-class.html) +currently has three implementations (with more on the way) that +all pass the same set of +[conformance tests](https://github.com/dart-lang/http/tree/master/pkgs/web_socket_conformance_tests): + +* [`BrowserWebSocket`](https://pub.dev/documentation/web_socket/latest/browser_web_socket/BrowserWebSocket-class.html) +* [`CupertinoWebSocket`](https://pub.dev/documentation/cupertino_http/latest/cupertino_http/CupertinoWebSocket-class.html) +* [`IOWebSocket`](https://pub.dev/documentation/web_socket/latest/io_web_socket/IOWebSocket-class.html) + ## Using ```dart From b974f990e9af80715d001ffeb5a15ac60ff43df9 Mon Sep 17 00:00:00 2001 From: Sarah Zakarias Date: Thu, 23 May 2024 14:10:14 +0200 Subject: [PATCH 368/448] Update `topics` in package "http" (#1205) --- pkgs/http/pubspec.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index fca33f8650..b133164d81 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -2,9 +2,11 @@ name: http version: 1.2.2-wip description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http + topics: - http - network + - protocols environment: sdk: ^3.3.0 From 05fc4bc1832c1231fcb662f0fc7a3055d70d0d63 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 23 May 2024 09:34:00 -0700 Subject: [PATCH 369/448] Remove files that are covered by .gitignore (#1208) --- .../plugins/GeneratedPluginRegistrant.java | 39 ----- pkgs/cronet_http/example/android/gradlew | 160 ------------------ pkgs/cronet_http/example/android/gradlew.bat | 90 ---------- 3 files changed, 289 deletions(-) delete mode 100644 pkgs/cronet_http/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java delete mode 100755 pkgs/cronet_http/example/android/gradlew delete mode 100644 pkgs/cronet_http/example/android/gradlew.bat diff --git a/pkgs/cronet_http/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/pkgs/cronet_http/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java deleted file mode 100644 index 3772f022a0..0000000000 --- a/pkgs/cronet_http/example/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java +++ /dev/null @@ -1,39 +0,0 @@ -package io.flutter.plugins; - -import androidx.annotation.Keep; -import androidx.annotation.NonNull; -import io.flutter.Log; - -import io.flutter.embedding.engine.FlutterEngine; - -/** - * Generated file. Do not edit. - * This file is generated by the Flutter tool based on the - * plugins that support the Android platform. - */ -@Keep -public final class GeneratedPluginRegistrant { - private static final String TAG = "GeneratedPluginRegistrant"; - public static void registerWith(@NonNull FlutterEngine flutterEngine) { - try { - flutterEngine.getPlugins().add(new dev.flutter.plugins.integration_test.IntegrationTestPlugin()); - } catch (Exception e) { - Log.e(TAG, "Error registering plugin integration_test, dev.flutter.plugins.integration_test.IntegrationTestPlugin", e); - } - try { - flutterEngine.getPlugins().add(new com.github.dart_lang.jni.JniPlugin()); - } catch (Exception e) { - Log.e(TAG, "Error registering plugin jni, com.github.dart_lang.jni.JniPlugin", e); - } - try { - flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin()); - } catch (Exception e) { - Log.e(TAG, "Error registering plugin path_provider_android, io.flutter.plugins.pathprovider.PathProviderPlugin", e); - } - try { - flutterEngine.getPlugins().add(new com.tekartik.sqflite.SqflitePlugin()); - } catch (Exception e) { - Log.e(TAG, "Error registering plugin sqflite, com.tekartik.sqflite.SqflitePlugin", e); - } - } -} diff --git a/pkgs/cronet_http/example/android/gradlew b/pkgs/cronet_http/example/android/gradlew deleted file mode 100755 index 9d82f78915..0000000000 --- a/pkgs/cronet_http/example/android/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/pkgs/cronet_http/example/android/gradlew.bat b/pkgs/cronet_http/example/android/gradlew.bat deleted file mode 100644 index aec99730b4..0000000000 --- a/pkgs/cronet_http/example/android/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega From 811dbbea0015665c61db48a7a2f8f7b5c10bc083 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 23 May 2024 09:35:47 -0700 Subject: [PATCH 370/448] Integrated cupertino_http with package_http_profile (#1079) --- .github/workflows/cupertino.yml | 2 +- pkgs/cupertino_http/CHANGELOG.md | 4 +- .../client_conformance_test.dart | 32 +- .../integration_test/client_profile_test.dart | 335 ++++++++++++++++++ .../example/integration_test/main.dart | 2 + pkgs/cupertino_http/example/pubspec.yaml | 5 +- pkgs/cupertino_http/lib/cupertino_http.dart | 2 +- .../lib/src/cupertino_client.dart | 114 +++++- pkgs/cupertino_http/pubspec.yaml | 8 +- 9 files changed, 477 insertions(+), 27 deletions(-) create mode 100644 pkgs/cupertino_http/example/integration_test/client_profile_test.dart diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 21fb23bb44..b790193875 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -31,7 +31,7 @@ jobs: matrix: # Test on the minimum supported flutter version and the latest # version. - flutter-version: ["3.19.0", "any"] + flutter-version: ["3.22.0", "any"] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index c34797872c..090475c3d6 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,5 +1,7 @@ -## 1.4.1-wip +## 1.5.0 +* Add integration to the + [DevTools Network View](https://docs.flutter.dev/tools/devtools/network). * Upgrade to `package:ffigen` 11.0.0. * Bring `WebSocket` behavior in line with the documentation by throwing `WebSocketConnectionClosed` rather than `StateError` when attempting to send diff --git a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart index 3007123a98..7c936da464 100644 --- a/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart +++ b/pkgs/cupertino_http/example/integration_test/client_conformance_test.dart @@ -5,17 +5,39 @@ import 'package:cupertino_http/cupertino_http.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; +import 'package:http_profile/http_profile.dart'; import 'package:integration_test/integration_test.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); group('defaultSessionConfiguration', () { - testAll( - CupertinoClient.defaultSessionConfiguration, - canReceiveSetCookieHeaders: true, - canSendCookieHeaders: true, - ); + group('profile enabled', () { + final profile = HttpClientRequestProfile.profilingEnabled; + HttpClientRequestProfile.profilingEnabled = true; + try { + testAll( + CupertinoClient.defaultSessionConfiguration, + canReceiveSetCookieHeaders: true, + canSendCookieHeaders: true, + ); + } finally { + HttpClientRequestProfile.profilingEnabled = profile; + } + }); + group('profile disabled', () { + final profile = HttpClientRequestProfile.profilingEnabled; + HttpClientRequestProfile.profilingEnabled = false; + try { + testAll( + CupertinoClient.defaultSessionConfiguration, + canReceiveSetCookieHeaders: true, + canSendCookieHeaders: true, + ); + } finally { + HttpClientRequestProfile.profilingEnabled = profile; + } + }); }); group('fromSessionConfiguration', () { final config = URLSessionConfiguration.ephemeralSessionConfiguration(); diff --git a/pkgs/cupertino_http/example/integration_test/client_profile_test.dart b/pkgs/cupertino_http/example/integration_test/client_profile_test.dart new file mode 100644 index 0000000000..d823370618 --- /dev/null +++ b/pkgs/cupertino_http/example/integration_test/client_profile_test.dart @@ -0,0 +1,335 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:cupertino_http/src/cupertino_client.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:http/http.dart'; +import 'package:http_profile/http_profile.dart'; +import 'package:integration_test/integration_test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('profile', () { + final profilingEnabled = HttpClientRequestProfile.profilingEnabled; + + setUpAll(() { + HttpClientRequestProfile.profilingEnabled = true; + }); + + tearDownAll(() { + HttpClientRequestProfile.profilingEnabled = profilingEnabled; + }); + + group('non-streamed POST', () { + late HttpServer successServer; + late Uri successServerUri; + late HttpClientRequestProfile profile; + + setUpAll(() async { + successServer = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.headers.set('Content-Length', '11'); + request.response.write('Hello World'); + await request.response.close(); + }); + successServerUri = Uri.http('localhost:${successServer.port}'); + final client = CupertinoClientWithProfile.defaultSessionConfiguration(); + await client.post(successServerUri, + headers: {'Content-Type': 'text/plain'}, body: 'Hi'); + profile = client.profile!; + }); + tearDownAll(() { + successServer.close(); + }); + + test('profile attributes', () { + expect(profile.events, isEmpty); + expect(profile.requestMethod, 'POST'); + expect(profile.requestUri, successServerUri.toString()); + expect(profile.connectionInfo, + containsPair('package', 'package:cupertino_http')); + }); + + test('request attributes', () { + expect(profile.requestData.bodyBytes, 'Hi'.codeUnits); + expect(profile.requestData.contentLength, 2); + expect(profile.requestData.endTime, isNotNull); + expect(profile.requestData.error, isNull); + expect( + profile.requestData.headers, containsPair('Content-Length', ['2'])); + expect(profile.requestData.headers, + containsPair('Content-Type', ['text/plain; charset=utf-8'])); + expect(profile.requestData.persistentConnection, isNull); + expect(profile.requestData.proxyDetails, isNull); + expect(profile.requestData.startTime, isNotNull); + }); + + test('response attributes', () { + expect(profile.responseData.bodyBytes, 'Hello World'.codeUnits); + expect(profile.responseData.compressionState, isNull); + expect(profile.responseData.contentLength, 11); + expect(profile.responseData.endTime, isNotNull); + expect(profile.responseData.error, isNull); + expect(profile.responseData.headers, + containsPair('content-type', ['text/plain'])); + expect(profile.responseData.headers, + containsPair('content-length', ['11'])); + expect(profile.responseData.isRedirect, false); + expect(profile.responseData.persistentConnection, isNull); + expect(profile.responseData.reasonPhrase, 'OK'); + expect(profile.responseData.redirects, isEmpty); + expect(profile.responseData.startTime, isNotNull); + expect(profile.responseData.statusCode, 200); + }); + }); + + group('streaming POST request', () { + late HttpServer successServer; + late Uri successServerUri; + late HttpClientRequestProfile profile; + + setUpAll(() async { + successServer = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.headers.set('Content-Length', '11'); + request.response.write('Hello World'); + await request.response.close(); + }); + successServerUri = Uri.http('localhost:${successServer.port}'); + final client = CupertinoClientWithProfile.defaultSessionConfiguration(); + final request = StreamedRequest('POST', successServerUri); + final stream = () async* { + for (var i = 0; i < 1000; ++i) { + await Future.delayed(const Duration()); + // The request has started but not finished. + expect(client.profile!.requestData.startTime, isNotNull); + expect(client.profile!.requestData.endTime, isNull); + expect(client.profile!.responseData.startTime, isNull); + expect(client.profile!.responseData.endTime, isNull); + yield 'Hello'.codeUnits; + } + }(); + unawaited( + request.sink.addStream(stream).then((_) => request.sink.close())); + + await client.send(request); + profile = client.profile!; + }); + tearDownAll(() { + successServer.close(); + }); + + test('request attributes', () async { + expect(profile.requestData.bodyBytes, ('Hello' * 1000).codeUnits); + expect(profile.requestData.contentLength, isNull); + expect(profile.requestData.endTime, isNotNull); + expect(profile.requestData.startTime, isNotNull); + expect(profile.requestData.headers, isNot(contains('Content-Length'))); + }); + }); + + group('failed POST request', () { + late HttpClientRequestProfile profile; + + setUpAll(() async { + final client = CupertinoClientWithProfile.defaultSessionConfiguration(); + try { + await client.post(Uri.http('thisisnotahost'), + headers: {'Content-Type': 'text/plain'}, body: 'Hi'); + fail('expected exception'); + } on ClientException { + // Expected exception. + } + profile = client.profile!; + }); + + test('profile attributes', () { + expect(profile.events, isEmpty); + expect(profile.requestMethod, 'POST'); + expect(profile.requestUri, 'http://thisisnotahost'); + expect(profile.connectionInfo, + containsPair('package', 'package:cupertino_http')); + }); + + test('request attributes', () { + expect(profile.requestData.bodyBytes, 'Hi'.codeUnits); + expect(profile.requestData.contentLength, 2); + expect(profile.requestData.endTime, isNotNull); + expect(profile.requestData.error, startsWith('ClientException:')); + expect( + profile.requestData.headers, containsPair('Content-Length', ['2'])); + expect(profile.requestData.headers, + containsPair('Content-Type', ['text/plain; charset=utf-8'])); + expect(profile.requestData.persistentConnection, isNull); + expect(profile.requestData.proxyDetails, isNull); + expect(profile.requestData.startTime, isNotNull); + }); + + test('response attributes', () { + expect(profile.responseData.bodyBytes, isEmpty); + expect(profile.responseData.compressionState, isNull); + expect(profile.responseData.contentLength, isNull); + expect(profile.responseData.endTime, isNull); + expect(profile.responseData.error, isNull); + expect(profile.responseData.headers, isNull); + expect(profile.responseData.isRedirect, isNull); + expect(profile.responseData.persistentConnection, isNull); + expect(profile.responseData.reasonPhrase, isNull); + expect(profile.responseData.redirects, isEmpty); + expect(profile.responseData.startTime, isNull); + expect(profile.responseData.statusCode, isNull); + }); + }); + + group('failed POST response', () { + late HttpServer successServer; + late Uri successServerUri; + late HttpClientRequestProfile profile; + + setUpAll(() async { + successServer = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.headers.set('Content-Length', '11'); + final socket = await request.response.detachSocket(); + await socket.close(); + }); + successServerUri = Uri.http('localhost:${successServer.port}'); + final client = CupertinoClientWithProfile.defaultSessionConfiguration(); + + try { + await client.post(successServerUri, + headers: {'Content-Type': 'text/plain'}, body: 'Hi'); + fail('expected exception'); + } on ClientException { + // Expected exception. + } + profile = client.profile!; + }); + tearDownAll(() { + successServer.close(); + }); + + test('profile attributes', () { + expect(profile.events, isEmpty); + expect(profile.requestMethod, 'POST'); + expect(profile.requestUri, successServerUri.toString()); + expect(profile.connectionInfo, + containsPair('package', 'package:cupertino_http')); + }); + + test('request attributes', () { + expect(profile.requestData.bodyBytes, 'Hi'.codeUnits); + expect(profile.requestData.contentLength, 2); + expect(profile.requestData.endTime, isNotNull); + expect(profile.requestData.error, isNull); + expect( + profile.requestData.headers, containsPair('Content-Length', ['2'])); + expect(profile.requestData.headers, + containsPair('Content-Type', ['text/plain; charset=utf-8'])); + expect(profile.requestData.persistentConnection, isNull); + expect(profile.requestData.proxyDetails, isNull); + expect(profile.requestData.startTime, isNotNull); + }); + + test('response attributes', () { + expect(profile.responseData.bodyBytes, isEmpty); + expect(profile.responseData.compressionState, isNull); + expect(profile.responseData.contentLength, 11); + expect(profile.responseData.endTime, isNotNull); + expect(profile.responseData.error, startsWith('ClientException:')); + expect(profile.responseData.headers, + containsPair('content-type', ['text/plain'])); + expect(profile.responseData.headers, + containsPair('content-length', ['11'])); + expect(profile.responseData.isRedirect, false); + expect(profile.responseData.persistentConnection, isNull); + expect(profile.responseData.reasonPhrase, 'OK'); + expect(profile.responseData.redirects, isEmpty); + expect(profile.responseData.startTime, isNotNull); + expect(profile.responseData.statusCode, 200); + }); + }); + + group('redirects', () { + late HttpServer successServer; + late Uri successServerUri; + late HttpClientRequestProfile profile; + + setUpAll(() async { + successServer = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + if (request.requestedUri.pathSegments.isEmpty) { + unawaited(request.response.close()); + } else { + final n = int.parse(request.requestedUri.pathSegments.last); + final nextPath = n - 1 == 0 ? '' : '${n - 1}'; + unawaited(request.response + .redirect(successServerUri.replace(path: '/$nextPath'))); + } + }); + successServerUri = Uri.http('localhost:${successServer.port}'); + }); + tearDownAll(() { + successServer.close(); + }); + + test('no redirects', () async { + final client = CupertinoClientWithProfile.defaultSessionConfiguration(); + await client.get(successServerUri); + profile = client.profile!; + + expect(profile.responseData.redirects, isEmpty); + }); + + test('follow redirects', () async { + final client = CupertinoClientWithProfile.defaultSessionConfiguration(); + await client.send(Request('GET', successServerUri.replace(path: '/3')) + ..followRedirects = true + ..maxRedirects = 4); + profile = client.profile!; + + expect(profile.requestData.followRedirects, true); + expect(profile.requestData.maxRedirects, 4); + expect(profile.responseData.isRedirect, false); + + expect(profile.responseData.redirects, [ + HttpProfileRedirectData( + statusCode: 302, + method: 'GET', + location: successServerUri.replace(path: '/2').toString()), + HttpProfileRedirectData( + statusCode: 302, + method: 'GET', + location: successServerUri.replace(path: '/1').toString()), + HttpProfileRedirectData( + statusCode: 302, + method: 'GET', + location: successServerUri.replace(path: '/').toString(), + ) + ]); + }); + + test('no follow redirects', () async { + final client = CupertinoClientWithProfile.defaultSessionConfiguration(); + await client.send(Request('GET', successServerUri.replace(path: '/3')) + ..followRedirects = false); + profile = client.profile!; + + expect(profile.requestData.followRedirects, false); + expect(profile.responseData.isRedirect, true); + expect(profile.responseData.redirects, isEmpty); + }); + }); + }); +} diff --git a/pkgs/cupertino_http/example/integration_test/main.dart b/pkgs/cupertino_http/example/integration_test/main.dart index 0d4d5e16d9..a632b0c40a 100644 --- a/pkgs/cupertino_http/example/integration_test/main.dart +++ b/pkgs/cupertino_http/example/integration_test/main.dart @@ -5,6 +5,7 @@ import 'package:integration_test/integration_test.dart'; import 'client_conformance_test.dart' as client_conformance_test; +import 'client_profile_test.dart' as profile_test; import 'client_test.dart' as client_test; import 'data_test.dart' as data_test; import 'error_test.dart' as error_test; @@ -30,6 +31,7 @@ void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); client_conformance_test.main(); + profile_test.main(); client_test.main(); data_test.main(); error_test.main(); diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index f394051994..ba79752e48 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -6,8 +6,8 @@ publish_to: 'none' version: 1.0.0+1 environment: - sdk: ^3.2.0 - flutter: '>=3.16.0' + sdk: ^3.4.0 + flutter: '>=3.22.0' dependencies: cupertino_http: @@ -28,6 +28,7 @@ dev_dependencies: sdk: flutter http_client_conformance_tests: path: ../../http_client_conformance_tests/ + http_profile: ^0.1.0 integration_test: sdk: flutter test: ^1.21.1 diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 68691b8ab4..55d62d3c15 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -87,5 +87,5 @@ import 'package:http/http.dart'; import 'src/cupertino_client.dart'; export 'src/cupertino_api.dart'; -export 'src/cupertino_client.dart'; +export 'src/cupertino_client.dart' show CupertinoClient; export 'src/cupertino_web_socket.dart'; diff --git a/pkgs/cupertino_http/lib/src/cupertino_client.dart b/pkgs/cupertino_http/lib/src/cupertino_client.dart index 4cd0646946..e2ec0a04ff 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_client.dart @@ -12,6 +12,7 @@ import 'dart:typed_data'; import 'package:async/async.dart'; import 'package:http/http.dart'; +import 'package:http_profile/http_profile.dart'; import 'cupertino_api.dart'; @@ -36,10 +37,11 @@ class _TaskTracker { final responseCompleter = Completer(); final BaseRequest request; final responseController = StreamController(); + final HttpClientRequestProfile? profile; int numRedirects = 0; Uri? lastUrl; // The last URL redirected to. - _TaskTracker(this.request); + _TaskTracker(this.request, this.profile); void close() { responseController.close(); @@ -74,7 +76,7 @@ class CupertinoClient extends BaseClient { URLSession? _urlSession; - CupertinoClient._(URLSession urlSession) : _urlSession = urlSession; + CupertinoClient._(this._urlSession); String? _findReasonPhrase(int statusCode) { switch (statusCode) { @@ -168,18 +170,31 @@ class CupertinoClient extends BaseClient { static void _onComplete( URLSession session, URLSessionTask task, Error? error) { final taskTracker = _tracker(task); - if (error != null) { final exception = ClientException( error.localizedDescription ?? 'Unknown', taskTracker.request.url); + if (taskTracker.profile != null && + taskTracker.profile!.requestData.endTime == null) { + // Error occurred during the request. + taskTracker.profile!.requestData.closeWithError(exception.toString()); + } else { + // Error occurred during the response. + taskTracker.profile?.responseData.closeWithError(exception.toString()); + } if (taskTracker.responseCompleter.isCompleted) { taskTracker.responseController.addError(exception); } else { taskTracker.responseCompleter.completeError(exception); } - } else if (!taskTracker.responseCompleter.isCompleted) { - taskTracker.responseCompleter.completeError( - StateError('task completed without an error or response')); + } else { + assert(taskTracker.profile == null || + taskTracker.profile!.requestData.endTime != null); + + taskTracker.profile?.responseData.close(); + if (!taskTracker.responseCompleter.isCompleted) { + taskTracker.responseCompleter.completeError( + StateError('task completed without an error or response')); + } } taskTracker.close(); _tasks.remove(task); @@ -188,6 +203,7 @@ class CupertinoClient extends BaseClient { static void _onData(URLSession session, URLSessionTask task, Data data) { final taskTracker = _tracker(task); taskTracker.responseController.add(data.bytes); + taskTracker.profile?.responseData.bodySink.add(data.bytes); } static URLRequest? _onRedirect(URLSession session, URLSessionTask task, @@ -196,6 +212,10 @@ class CupertinoClient extends BaseClient { ++taskTracker.numRedirects; if (taskTracker.request.followRedirects && taskTracker.numRedirects <= taskTracker.request.maxRedirects) { + taskTracker.profile?.responseData.addRedirect(HttpProfileRedirectData( + statusCode: response.statusCode, + method: request.httpMethod, + location: request.url!.toString())); taskTracker.lastUrl = request.url; return request; } @@ -206,6 +226,8 @@ class CupertinoClient extends BaseClient { URLSession session, URLSessionTask task, URLResponse response) { final taskTracker = _tracker(task); taskTracker.responseCompleter.complete(response); + unawaited(taskTracker.profile?.requestData.close()); + return URLSessionResponseDisposition.urlSessionResponseAllow; } @@ -246,6 +268,12 @@ class CupertinoClient extends BaseClient { return (await queue.hasNext, queue.rest); } + HttpClientRequestProfile? _createProfile(BaseRequest request) => + HttpClientRequestProfile.profile( + requestStartTime: DateTime.now(), + requestMethod: request.method, + requestUri: request.url.toString()); + @override Future send(BaseRequest request) async { // The expected success case flow (without redirects) is: @@ -268,6 +296,25 @@ class CupertinoClient extends BaseClient { final stream = request.finalize(); + final profile = _createProfile(request); + profile?.connectionInfo = { + 'package': 'package:cupertino_http', + 'client': 'CupertinoClient', + 'configuration': _urlSession!.configuration.toString(), + }; + profile?.requestData + ?..contentLength = request.contentLength + ..followRedirects = request.followRedirects + ..headersCommaValues = request.headers + ..maxRedirects = request.maxRedirects; + + if (profile != null && request.contentLength != null) { + profile.requestData.headersListValues = { + 'Content-Length': ['${request.contentLength}'], + ...profile.requestData.headers! + }; + } + final urlRequest = MutableURLRequest.fromUrl(request.url) ..httpMethod = request.method; @@ -275,24 +322,32 @@ class CupertinoClient extends BaseClient { // Optimize the (typical) `Request` case since assigning to // `httpBodyStream` requires a lot of expensive setup and data passing. urlRequest.httpBody = Data.fromList(request.bodyBytes); + profile?.requestData.bodySink.add(request.bodyBytes); } else if (await _hasData(stream) case (true, final s)) { // If the request is supposed to be bodyless (e.g. GET requests) // then setting `httpBodyStream` will cause the request to fail - // even if the stream is empty. - urlRequest.httpBodyStream = s; + if (profile == null) { + urlRequest.httpBodyStream = s; + } else { + final splitter = StreamSplitter(s); + urlRequest.httpBodyStream = splitter.split(); + unawaited(profile.requestData.bodySink.addStream(splitter.split())); + } } // This will preserve Apple default headers - is that what we want? request.headers.forEach(urlRequest.setValueForHttpHeaderField); - final task = urlSession.dataTaskWithRequest(urlRequest); - final taskTracker = _TaskTracker(request); + final taskTracker = _TaskTracker(request, profile); _tasks[task] = taskTracker; task.resume(); final maxRedirects = request.followRedirects ? request.maxRedirects : 0; - final result = await taskTracker.responseCompleter.future; + late URLResponse result; + result = await taskTracker.responseCompleter.future; + final response = result as HTTPURLResponse; if (request.followRedirects && taskTracker.numRedirects > maxRedirects) { @@ -310,17 +365,48 @@ class CupertinoClient extends BaseClient { ); } + final contentLength = response.expectedContentLength == -1 + ? null + : response.expectedContentLength; + final isRedirect = !request.followRedirects && taskTracker.numRedirects > 0; + profile?.responseData + ?..contentLength = contentLength + ..headersCommaValues = responseHeaders + ..isRedirect = isRedirect + ..reasonPhrase = _findReasonPhrase(response.statusCode) + ..startTime = DateTime.now() + ..statusCode = response.statusCode; + return _StreamedResponseWithUrl( taskTracker.responseController.stream, response.statusCode, url: taskTracker.lastUrl ?? request.url, - contentLength: response.expectedContentLength == -1 - ? null - : response.expectedContentLength, + contentLength: contentLength, reasonPhrase: _findReasonPhrase(response.statusCode), request: request, - isRedirect: !request.followRedirects && taskTracker.numRedirects > 0, + isRedirect: isRedirect, headers: responseHeaders, ); } } + +/// A test-only class that makes the [HttpClientRequestProfile] data available. +class CupertinoClientWithProfile extends CupertinoClient { + HttpClientRequestProfile? profile; + + @override + HttpClientRequestProfile? _createProfile(BaseRequest request) => + profile = super._createProfile(request); + + CupertinoClientWithProfile._(super._urlSession) : super._(); + + factory CupertinoClientWithProfile.defaultSessionConfiguration() { + final config = URLSessionConfiguration.defaultSessionConfiguration(); + final session = URLSession.sessionWithConfiguration(config, + onComplete: CupertinoClient._onComplete, + onData: CupertinoClient._onData, + onRedirect: CupertinoClient._onRedirect, + onResponse: CupertinoClient._onResponse); + return CupertinoClientWithProfile._(session); + } +} diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 7e9427bdec..ac6bf5b059 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,13 +1,14 @@ name: cupertino_http -version: 1.4.1-wip +version: 1.5.0-wip description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http +publish_to: none environment: - sdk: ^3.3.0 - flutter: '>=3.19.0' # If changed, update test matrix. + sdk: ^3.4.0 + flutter: '>=3.22.0' # If changed, update test matrix. dependencies: async: ^2.5.0 @@ -15,6 +16,7 @@ dependencies: flutter: sdk: flutter http: ^1.2.0 + http_profile: ^0.1.0 web_socket: ^0.1.0 dev_dependencies: From e6d17d34c88587a758af4aefbd5754505ea2cb2c Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 23 May 2024 09:47:38 -0700 Subject: [PATCH 371/448] Integrate cronet_http with `package:http_profile` (#1167) --- pkgs/cronet_http/CHANGELOG.md | 5 + .../integration_test/client_profile_test.dart | 288 ++++++++++++++++++ .../example/integration_test/client_test.dart | 39 ++- pkgs/cronet_http/example/pubspec.yaml | 3 +- pkgs/cronet_http/lib/src/cronet_client.dart | 89 +++++- pkgs/cronet_http/pubspec.yaml | 7 +- 6 files changed, 415 insertions(+), 16 deletions(-) create mode 100644 pkgs/cronet_http/example/integration_test/client_profile_test.dart diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 188b3cd17e..fd2acca034 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.3.0 + +* Add integration to the + [DevTools Network View](https://docs.flutter.dev/tools/devtools/network). + ## 1.2.1 * Upgrade `package:jni` to 0.9.2 to fix the build error in the latest versions diff --git a/pkgs/cronet_http/example/integration_test/client_profile_test.dart b/pkgs/cronet_http/example/integration_test/client_profile_test.dart new file mode 100644 index 0000000000..3e17327ce8 --- /dev/null +++ b/pkgs/cronet_http/example/integration_test/client_profile_test.dart @@ -0,0 +1,288 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:cronet_http/src/cronet_client.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:http/http.dart'; +import 'package:http_profile/http_profile.dart'; +import 'package:integration_test/integration_test.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('profile', () { + final profilingEnabled = HttpClientRequestProfile.profilingEnabled; + + setUpAll(() { + HttpClientRequestProfile.profilingEnabled = true; + }); + + tearDownAll(() { + HttpClientRequestProfile.profilingEnabled = profilingEnabled; + }); + + group('POST', () { + late HttpServer successServer; + late Uri successServerUri; + late HttpClientRequestProfile profile; + + setUpAll(() async { + successServer = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.headers.set('Content-Length', '11'); + request.response.write('Hello World'); + await request.response.close(); + }); + successServerUri = Uri.http('localhost:${successServer.port}'); + final client = CronetClientWithProfile.defaultCronetEngine(); + await client.post(successServerUri, + headers: {'Content-Type': 'text/plain'}, body: 'Hi'); + profile = client.profile!; + }); + tearDownAll(() { + successServer.close(); + }); + + test('profile attributes', () { + expect(profile.events, isEmpty); + expect(profile.requestMethod, 'POST'); + expect(profile.requestUri, successServerUri.toString()); + expect(profile.connectionInfo, + containsPair('package', 'package:cronet_http')); + }); + + test('request attributes', () { + expect(profile.requestData.bodyBytes, 'Hi'.codeUnits); + expect(profile.requestData.contentLength, 2); + expect(profile.requestData.endTime, isNotNull); + expect(profile.requestData.error, isNull); + expect( + profile.requestData.headers, containsPair('Content-Length', ['2'])); + expect(profile.requestData.headers, + containsPair('Content-Type', ['text/plain; charset=utf-8'])); + expect(profile.requestData.persistentConnection, isNull); + expect(profile.requestData.proxyDetails, isNull); + expect(profile.requestData.startTime, isNotNull); + }); + + test('response attributes', () { + expect(profile.responseData.bodyBytes, 'Hello World'.codeUnits); + expect(profile.responseData.compressionState, isNull); + expect(profile.responseData.contentLength, 11); + expect(profile.responseData.endTime, isNotNull); + expect(profile.responseData.error, isNull); + expect(profile.responseData.headers, + containsPair('content-type', ['text/plain'])); + expect(profile.responseData.headers, + containsPair('content-length', ['11'])); + expect(profile.responseData.isRedirect, false); + expect(profile.responseData.persistentConnection, isNull); + expect(profile.responseData.reasonPhrase, 'OK'); + expect(profile.responseData.redirects, isEmpty); + expect(profile.responseData.startTime, isNotNull); + expect(profile.responseData.statusCode, 200); + }); + }); + + group('failed POST request', () { + late HttpClientRequestProfile profile; + + setUpAll(() async { + final client = CronetClientWithProfile.defaultCronetEngine(); + try { + await client.post(Uri.http('thisisnotahost'), + headers: {'Content-Type': 'text/plain'}, body: 'Hi'); + fail('expected exception'); + } on ClientException { + // Expected exception. + } + profile = client.profile!; + }); + + test('profile attributes', () { + expect(profile.events, isEmpty); + expect(profile.requestMethod, 'POST'); + expect(profile.requestUri, 'http://thisisnotahost'); + expect(profile.connectionInfo, + containsPair('package', 'package:cronet_http')); + }); + + test('request attributes', () { + expect(profile.requestData.bodyBytes, 'Hi'.codeUnits); + expect(profile.requestData.contentLength, 2); + expect(profile.requestData.endTime, isNotNull); + expect(profile.requestData.error, startsWith('ClientException:')); + expect( + profile.requestData.headers, containsPair('Content-Length', ['2'])); + expect(profile.requestData.headers, + containsPair('Content-Type', ['text/plain; charset=utf-8'])); + expect(profile.requestData.persistentConnection, isNull); + expect(profile.requestData.proxyDetails, isNull); + expect(profile.requestData.startTime, isNotNull); + }); + + test('response attributes', () { + expect(profile.responseData.bodyBytes, isEmpty); + expect(profile.responseData.compressionState, isNull); + expect(profile.responseData.contentLength, isNull); + expect(profile.responseData.endTime, isNull); + expect(profile.responseData.error, isNull); + expect(profile.responseData.headers, isNull); + expect(profile.responseData.isRedirect, isNull); + expect(profile.responseData.persistentConnection, isNull); + expect(profile.responseData.reasonPhrase, isNull); + expect(profile.responseData.redirects, isEmpty); + expect(profile.responseData.startTime, isNull); + expect(profile.responseData.statusCode, isNull); + }); + }); + + group('failed POST response', () { + late HttpServer successServer; + late Uri successServerUri; + late HttpClientRequestProfile profile; + + setUpAll(() async { + successServer = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.headers.set('Content-Length', '11'); + final socket = await request.response.detachSocket(); + await socket.close(); + }); + successServerUri = Uri.http('localhost:${successServer.port}'); + final client = CronetClientWithProfile.defaultCronetEngine(); + + try { + await client.post(successServerUri, + headers: {'Content-Type': 'text/plain'}, body: 'Hi'); + fail('expected exception'); + } on ClientException { + // Expected exception. + } + profile = client.profile!; + }); + tearDownAll(() { + successServer.close(); + }); + + test('profile attributes', () { + expect(profile.events, isEmpty); + expect(profile.requestMethod, 'POST'); + expect(profile.requestUri, successServerUri.toString()); + expect(profile.connectionInfo, + containsPair('package', 'package:cronet_http')); + }); + + test('request attributes', () { + expect(profile.requestData.bodyBytes, 'Hi'.codeUnits); + expect(profile.requestData.contentLength, 2); + expect(profile.requestData.endTime, isNotNull); + expect(profile.requestData.error, isNull); + expect( + profile.requestData.headers, containsPair('Content-Length', ['2'])); + expect(profile.requestData.headers, + containsPair('Content-Type', ['text/plain; charset=utf-8'])); + expect(profile.requestData.persistentConnection, isNull); + expect(profile.requestData.proxyDetails, isNull); + expect(profile.requestData.startTime, isNotNull); + }); + + test('response attributes', () { + expect(profile.responseData.bodyBytes, isEmpty); + expect(profile.responseData.compressionState, isNull); + expect(profile.responseData.contentLength, 11); + expect(profile.responseData.endTime, isNotNull); + expect(profile.responseData.error, startsWith('ClientException:')); + expect(profile.responseData.headers, + containsPair('content-type', ['text/plain'])); + expect(profile.responseData.headers, + containsPair('content-length', ['11'])); + expect(profile.responseData.isRedirect, false); + expect(profile.responseData.persistentConnection, isNull); + expect(profile.responseData.reasonPhrase, 'OK'); + expect(profile.responseData.redirects, isEmpty); + expect(profile.responseData.startTime, isNotNull); + expect(profile.responseData.statusCode, 200); + }); + }); + + group('redirects', () { + late HttpServer successServer; + late Uri successServerUri; + late HttpClientRequestProfile profile; + + setUpAll(() async { + successServer = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + if (request.requestedUri.pathSegments.isEmpty) { + unawaited(request.response.close()); + } else { + final n = int.parse(request.requestedUri.pathSegments.last); + final nextPath = n - 1 == 0 ? '' : '${n - 1}'; + unawaited(request.response + .redirect(successServerUri.replace(path: '/$nextPath'))); + } + }); + successServerUri = Uri.http('localhost:${successServer.port}'); + }); + tearDownAll(() { + successServer.close(); + }); + + test('no redirects', () async { + final client = CronetClientWithProfile.defaultCronetEngine(); + await client.get(successServerUri); + profile = client.profile!; + + expect(profile.responseData.redirects, isEmpty); + }); + + test('follow redirects', () async { + final client = CronetClientWithProfile.defaultCronetEngine(); + await client.send(Request('GET', successServerUri.replace(path: '/3')) + ..followRedirects = true + ..maxRedirects = 4); + profile = client.profile!; + + expect(profile.requestData.followRedirects, true); + expect(profile.requestData.maxRedirects, 4); + expect(profile.responseData.isRedirect, false); + + expect(profile.responseData.redirects, [ + HttpProfileRedirectData( + statusCode: 302, + method: 'GET', + location: successServerUri.replace(path: '/2').toString()), + HttpProfileRedirectData( + statusCode: 302, + method: 'GET', + location: successServerUri.replace(path: '/1').toString()), + HttpProfileRedirectData( + statusCode: 302, + method: 'GET', + location: successServerUri.replace(path: '/').toString(), + ) + ]); + }); + + test('no follow redirects', () async { + final client = CronetClientWithProfile.defaultCronetEngine(); + await client.send(Request('GET', successServerUri.replace(path: '/3')) + ..followRedirects = false); + profile = client.profile!; + + expect(profile.requestData.followRedirects, false); + expect(profile.responseData.isRedirect, true); + expect(profile.responseData.redirects, isEmpty); + }); + }); + }); +} diff --git a/pkgs/cronet_http/example/integration_test/client_test.dart b/pkgs/cronet_http/example/integration_test/client_test.dart index f126f84fc3..e2ea74912a 100644 --- a/pkgs/cronet_http/example/integration_test/client_test.dart +++ b/pkgs/cronet_http/example/integration_test/client_test.dart @@ -4,18 +4,41 @@ import 'package:cronet_http/cronet_http.dart'; import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; +import 'package:http_profile/http_profile.dart'; import 'package:integration_test/integration_test.dart'; import 'package:test/test.dart'; Future testConformance() async { - group( - 'default cronet engine', - () => testAll( - CronetClient.defaultCronetEngine, - canStreamRequestBody: false, - canReceiveSetCookieHeaders: true, - canSendCookieHeaders: true, - )); + group('default cronet engine', () { + group('profile enabled', () { + final profile = HttpClientRequestProfile.profilingEnabled; + HttpClientRequestProfile.profilingEnabled = true; + try { + testAll( + CronetClient.defaultCronetEngine, + canStreamRequestBody: false, + canReceiveSetCookieHeaders: true, + canSendCookieHeaders: true, + ); + } finally { + HttpClientRequestProfile.profilingEnabled = profile; + } + }); + group('profile disabled', () { + final profile = HttpClientRequestProfile.profilingEnabled; + HttpClientRequestProfile.profilingEnabled = false; + try { + testAll( + CronetClient.defaultCronetEngine, + canStreamRequestBody: false, + canReceiveSetCookieHeaders: true, + canSendCookieHeaders: true, + ); + } finally { + HttpClientRequestProfile.profilingEnabled = profile; + } + }); + }); group('from cronet engine', () { testAll( diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index 41c6611433..122e2833a3 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -4,7 +4,7 @@ description: Demonstrates how to use the cronet_http plugin. publish_to: 'none' environment: - sdk: ^3.2.0 + sdk: ^3.4.0 dependencies: cronet_http: @@ -22,6 +22,7 @@ dev_dependencies: sdk: flutter http_client_conformance_tests: path: ../../http_client_conformance_tests/ + http_profile: ^0.1.0 integration_test: sdk: flutter test: ^1.23.1 diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index 634a823f78..772f03b0e8 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -16,6 +16,7 @@ library; import 'dart:async'; import 'package:http/http.dart'; +import 'package:http_profile/http_profile.dart'; import 'package:jni/jni.dart'; import 'jni/jni_bindings.dart' as jb; @@ -157,7 +158,9 @@ Map _cronetToClientHeaders( value.join(','))); jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( - BaseRequest request, Completer responseCompleter) { + BaseRequest request, + Completer responseCompleter, + HttpClientRequestProfile? profile) { StreamController>? responseStream; JByteBuffer? jByteBuffer; var numRedirects = 0; @@ -198,10 +201,22 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( headers: responseHeaders, )); + profile?.requestData.close(); + profile?.responseData + ?..contentLength = contentLength + ..headersCommaValues = responseHeaders + ..isRedirect = false + ..reasonPhrase = + responseInfo.getHttpStatusText().toDartString(releaseOriginal: true) + ..startTime = DateTime.now() + ..statusCode = responseInfo.getHttpStatusCode(); jByteBuffer = JByteBuffer.allocateDirect(_bufferSize); urlRequest.read(jByteBuffer!); }, onRedirectReceived: (urlRequest, responseInfo, newLocationUrl) { + final responseHeaders = + _cronetToClientHeaders(responseInfo.getAllHeaders()); + if (!request.followRedirects) { urlRequest.cancel(); responseCompleter.complete(StreamedResponse( @@ -214,10 +229,27 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( request: request, isRedirect: true, headers: _cronetToClientHeaders(responseInfo.getAllHeaders()))); + + profile?.responseData + ?..headersCommaValues = responseHeaders + ..isRedirect = true + ..reasonPhrase = responseInfo + .getHttpStatusText() + .toDartString(releaseOriginal: true) + ..startTime = DateTime.now() + ..statusCode = responseInfo.getHttpStatusCode(); + return; } ++numRedirects; if (numRedirects <= request.maxRedirects) { + profile?.responseData.addRedirect(HttpProfileRedirectData( + statusCode: responseInfo.getHttpStatusCode(), + // This method is not correct for status codes 303 to 307. Cronet + // does not seem to have a way to get the method so we'd have to + // calculate it according to the rules in RFC-7231. + method: 'GET', + location: newLocationUrl.toDartString(releaseOriginal: true))); urlRequest.followRedirect(); } else { urlRequest.cancel(); @@ -227,8 +259,9 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( }, onReadCompleted: (urlRequest, responseInfo, byteBuffer) { byteBuffer.flip(); - responseStream! - .add(jByteBuffer!.asUint8List().sublist(0, byteBuffer.remaining)); + final data = jByteBuffer!.asUint8List().sublist(0, byteBuffer.remaining); + responseStream!.add(data); + profile?.responseData.bodySink.add(data); byteBuffer.clear(); urlRequest.read(byteBuffer); @@ -236,6 +269,7 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( onSucceeded: (urlRequest, responseInfo) { responseStream!.sink.close(); jByteBuffer?.release(); + profile?.responseData.close(); }, onFailed: (urlRequest, responseInfo, cronetException) { final error = ClientException( @@ -246,6 +280,14 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( responseStream!.addError(error); responseStream!.close(); } + + if (profile != null) { + if (profile.requestData.endTime == null) { + profile.requestData.closeWithError(error.toString()); + } else { + profile.responseData.closeWithError(error.toString()); + } + } jByteBuffer?.release(); }, )); @@ -322,6 +364,12 @@ class CronetClient extends BaseClient { _isClosed = true; } + HttpClientRequestProfile? _createProfile(BaseRequest request) => + HttpClientRequestProfile.profile( + requestStartTime: DateTime.now(), + requestMethod: request.method, + requestUri: request.url.toString()); + @override Future send(BaseRequest request) async { if (_isClosed) { @@ -337,14 +385,33 @@ class CronetClient extends BaseClient { 'HTTP request failed. CronetEngine is already closed.', request.url); } + final profile = _createProfile(request); + profile?.connectionInfo = { + 'package': 'package:cronet_http', + 'client': 'CronetHttp', + }; + profile?.requestData + ?..contentLength = request.contentLength + ..followRedirects = request.followRedirects + ..headersCommaValues = request.headers + ..maxRedirects = request.maxRedirects; + if (profile != null && request.contentLength != null) { + profile.requestData.headersListValues = { + 'Content-Length': ['${request.contentLength}'], + ...profile.requestData.headers! + }; + } + final stream = request.finalize(); final body = await stream.toBytes(); + profile?.requestData.bodySink.add(body); + final responseCompleter = Completer(); final builder = engine._engine.newUrlRequestBuilder( request.url.toString().toJString(), jb.UrlRequestCallbackProxy.new1( - _urlRequestCallbacks(request, responseCompleter)), + _urlRequestCallbacks(request, responseCompleter, profile)), _executor, )..setHttpMethod(request.method.toJString()); @@ -365,3 +432,17 @@ class CronetClient extends BaseClient { return responseCompleter.future; } } + +/// A test-only class that makes the [HttpClientRequestProfile] data available. +class CronetClientWithProfile extends CronetClient { + HttpClientRequestProfile? profile; + + @override + HttpClientRequestProfile? _createProfile(BaseRequest request) => + profile = super._createProfile(request); + + CronetClientWithProfile._(super._engine, super._closeEngine) : super._(); + + factory CronetClientWithProfile.defaultCronetEngine() => + CronetClientWithProfile._(null, true); +} diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 2e869381f9..4a3da88b00 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,17 +1,18 @@ name: cronet_http -version: 1.2.1 +version: 1.3.0 description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http environment: - sdk: ^3.0.0 - flutter: ">=3.0.0" + sdk: ^3.4.0 + flutter: '>=3.22.0' dependencies: flutter: sdk: flutter http: ^1.2.0 + http_profile: ^0.1.0 jni: ^0.9.2 dev_dependencies: From 60361ad3b212f4aebfaab13d6a83fbc37b3b5fbd Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 23 May 2024 12:15:49 -0700 Subject: [PATCH 372/448] Ready cupertino_http 1.5 for publish (#1210) --- pkgs/cupertino_http/pubspec.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index ac6bf5b059..f24fd50d87 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,10 +1,9 @@ name: cupertino_http -version: 1.5.0-wip +version: 1.5.0 description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http -publish_to: none environment: sdk: ^3.4.0 From fbc77d6b389c8ff5d521813ac2abe3179f5c00b7 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 23 May 2024 17:52:29 -0700 Subject: [PATCH 373/448] Allow `1000` as a WebSocket close code (#1211) Fixes https://github.com/dart-lang/http/issues/1203 --- pkgs/cupertino_http/CHANGELOG.md | 4 +++ .../lib/src/cupertino_web_socket.dart | 5 ++-- pkgs/cupertino_http/pubspec.yaml | 2 +- pkgs/web_socket/CHANGELOG.md | 4 +++ pkgs/web_socket/lib/src/utils.dart | 5 ++-- pkgs/web_socket/lib/src/web_socket.dart | 2 +- pkgs/web_socket/pubspec.yaml | 2 +- .../web_socket/test/fake_web_socket_test.dart | 2 +- .../lib/src/close_local_tests.dart | 29 +++++++++++++++++-- 9 files changed, 45 insertions(+), 10 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 090475c3d6..bbbcb68320 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.5.1-wip + +* Allow `1000` as a `code` argument in `CupertinoWebSocket.close`. + ## 1.5.0 * Add integration to the diff --git a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart index 564c0ba1b1..43095ff68f 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart @@ -185,8 +185,9 @@ class CupertinoWebSocket implements WebSocket { throw WebSocketConnectionClosed(); } - if (code != null) { - RangeError.checkValueInInterval(code, 3000, 4999, 'code'); + if (code != null && code != 1000 && !(code >= 3000 && code <= 4999)) { + throw ArgumentError('Invalid argument: $code, close code must be 1000 or ' + 'in the range 3000-4999'); } if (reason != null && utf8.encode(reason).length > 123) { throw ArgumentError.value(reason, 'reason', diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index f24fd50d87..44a1d9754f 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 1.5.0 +version: 1.5.1-wip description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. diff --git a/pkgs/web_socket/CHANGELOG.md b/pkgs/web_socket/CHANGELOG.md index 9f6bbdbc56..f97d71b7ca 100644 --- a/pkgs/web_socket/CHANGELOG.md +++ b/pkgs/web_socket/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.5 + +- Allow `1000` as a close code. + ## 0.1.4 - Add a `fakes` function that returns a pair of `WebSocket`s useful in diff --git a/pkgs/web_socket/lib/src/utils.dart b/pkgs/web_socket/lib/src/utils.dart index 06a290f711..7331840f62 100644 --- a/pkgs/web_socket/lib/src/utils.dart +++ b/pkgs/web_socket/lib/src/utils.dart @@ -6,8 +6,9 @@ import 'dart:convert'; /// Throw if the given close code is not valid. void checkCloseCode(int? code) { - if (code != null) { - RangeError.checkValueInInterval(code, 3000, 4999, 'code'); + if (code != null && code != 1000 && !(code >= 3000 && code <= 4999)) { + throw ArgumentError('Invalid argument: $code, close code must be 1000 or ' + 'in the range 3000-4999'); } } diff --git a/pkgs/web_socket/lib/src/web_socket.dart b/pkgs/web_socket/lib/src/web_socket.dart index 560a5eb04e..5e9d7ccd80 100644 --- a/pkgs/web_socket/lib/src/web_socket.dart +++ b/pkgs/web_socket/lib/src/web_socket.dart @@ -150,7 +150,7 @@ abstract interface class WebSocket { /// [code] is set then the peer will see a 1005 status code. If no [reason] /// is set then the peer will not receive a reason string. /// - /// Throws a [RangeError] if [code] is not in the range 3000-4999. + /// Throws an [ArgumentError] if [code] is not 1000 or in the range 3000-4999. /// /// Throws an [ArgumentError] if [reason] is longer than 123 bytes when /// encoded as UTF-8 diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml index 1a04f8adff..fdc7a7821c 100644 --- a/pkgs/web_socket/pubspec.yaml +++ b/pkgs/web_socket/pubspec.yaml @@ -3,7 +3,7 @@ description: >- Any easy-to-use library for communicating with WebSockets that has multiple implementations. repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket -version: 0.1.4 +version: 0.1.5 environment: sdk: ^3.3.0 diff --git a/pkgs/web_socket/test/fake_web_socket_test.dart b/pkgs/web_socket/test/fake_web_socket_test.dart index d8fd559433..3cef748cf8 100644 --- a/pkgs/web_socket/test/fake_web_socket_test.dart +++ b/pkgs/web_socket/test/fake_web_socket_test.dart @@ -16,7 +16,7 @@ void proxy(WebSocket from, WebSocket to) { case BinaryDataReceived(:final data): to.sendBytes(data); case CloseReceived(:var code, :final reason): - if (code != null && (code < 3000 || code > 4999)) { + if (code != null && code != 1000 && (code < 3000 || code > 4999)) { code = null; } to.close(code, reason); diff --git a/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart index 5cf8e739f8..cf39f95eb3 100644 --- a/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart +++ b/pkgs/web_socket_conformance_tests/lib/src/close_local_tests.dart @@ -55,9 +55,22 @@ void testCloseLocal( httpServerChannel.sink.add(null); }); - test('reserved close code', () async { + test('reserved close code: 1004', () async { final channel = await channelFactory(uri); - await expectLater(() => channel.close(1004), throwsA(isA())); + await expectLater( + () => channel.close(1004), throwsA(isA())); + }); + + test('reserved close code: 2999', () async { + final channel = await channelFactory(uri); + await expectLater( + () => channel.close(2999), throwsA(isA())); + }); + + test('reserved close code: 5000', () async { + final channel = await channelFactory(uri); + await expectLater( + () => channel.close(5000), throwsA(isA())); }); test('too long close reason', () async { @@ -78,6 +91,18 @@ void testCloseLocal( expect(await channel.events.isEmpty, true); }); + test('close with 1000', () async { + final channel = await channelFactory(uri); + + await channel.close(1000); + final closeCode = await httpServerQueue.next as int?; + final closeReason = await httpServerQueue.next as String?; + + expect(closeCode, 1000); + expect(closeReason, ''); + expect(await channel.events.isEmpty, true); + }); + test('with code 3000', () async { final channel = await channelFactory(uri); From d6f9fbce6148f56d5684e910ccff6c06320540ef Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 24 May 2024 10:24:29 +0800 Subject: [PATCH 374/448] [cronet_http] Apply relevant rules with the ProGuard (#1204) --- pkgs/cronet_http/CHANGELOG.md | 4 ++++ pkgs/cronet_http/android/consumer-rules.pro | 3 +++ pkgs/cronet_http/example/android/app/build.gradle | 1 + pkgs/cronet_http/pubspec.yaml | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index fd2acca034..25d0df3e37 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.3.1-wip + +* Add relevant rules with the ProGuard to avoid runtime exceptions. + ## 1.3.0 * Add integration to the diff --git a/pkgs/cronet_http/android/consumer-rules.pro b/pkgs/cronet_http/android/consumer-rules.pro index 00f4f3efe1..00a7e574f6 100644 --- a/pkgs/cronet_http/android/consumer-rules.pro +++ b/pkgs/cronet_http/android/consumer-rules.pro @@ -1 +1,4 @@ -keep class io.flutter.plugins.cronet_http.** { *; } +-keep class java.net.URL { *; } +-keep class java.util.concurrent.Executors { *; } +-keep class org.chromium.net.** { *; } diff --git a/pkgs/cronet_http/example/android/app/build.gradle b/pkgs/cronet_http/example/android/app/build.gradle index dfd74270c3..add4718db2 100644 --- a/pkgs/cronet_http/example/android/app/build.gradle +++ b/pkgs/cronet_http/example/android/app/build.gradle @@ -73,5 +73,6 @@ dependencies { implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0")) // ""com.google.android.gms:play-services-cronet" is only present so that // `jnigen` will work. Applications should not include this line. + // The version should be synced with `pkgs/cronet_http/android/build.gradle`. implementation "com.google.android.gms:play-services-cronet:18.0.1" } diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 4a3da88b00..8d7c5d2f61 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 1.3.0 +version: 1.3.1-wip description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http From c04dfecd50093ec30f1a8cfd864afa07ca328645 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 28 May 2024 13:12:54 -0700 Subject: [PATCH 375/448] Add a skeleton package:ok_http (#1212) --- .github/workflows/okhttp.yaml | 47 +++++++++ pkgs/ok_http/.gitignore | 29 ++++++ pkgs/ok_http/.metadata | 30 ++++++ pkgs/ok_http/CHANGELOG.md | 3 + pkgs/ok_http/LICENSE | 27 +++++ pkgs/ok_http/README.md | 22 ++++ pkgs/ok_http/analysis_options.yaml | 1 + pkgs/ok_http/android/.gitignore | 9 ++ pkgs/ok_http/android/build.gradle | 65 ++++++++++++ pkgs/ok_http/android/settings.gradle | 1 + .../android/src/main/AndroidManifest.xml | 3 + pkgs/ok_http/example/.gitignore | 43 ++++++++ pkgs/ok_http/example/README.md | 16 +++ pkgs/ok_http/example/analysis_options.yaml | 28 +++++ pkgs/ok_http/example/android/.gitignore | 13 +++ pkgs/ok_http/example/android/app/build.gradle | 58 +++++++++++ .../android/app/src/debug/AndroidManifest.xml | 7 ++ .../android/app/src/main/AndroidManifest.xml | 45 ++++++++ .../example/ok_http_example/MainActivity.kt | 5 + .../res/drawable-v21/launch_background.xml | 12 +++ .../main/res/drawable/launch_background.xml | 12 +++ .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values-night/styles.xml | 18 ++++ .../app/src/main/res/values/styles.xml | 18 ++++ .../app/src/profile/AndroidManifest.xml | 7 ++ pkgs/ok_http/example/android/build.gradle | 18 ++++ .../ok_http/example/android/gradle.properties | 3 + .../gradle/wrapper/gradle-wrapper.properties | 5 + pkgs/ok_http/example/android/settings.gradle | 25 +++++ pkgs/ok_http/example/lib/main.dart | 69 +++++++++++++ pkgs/ok_http/example/pubspec.yaml | 97 ++++++++++++++++++ pkgs/ok_http/lib/ok_http.dart | 3 + pkgs/ok_http/pubspec.yaml | 24 +++++ 37 files changed, 763 insertions(+) create mode 100644 .github/workflows/okhttp.yaml create mode 100644 pkgs/ok_http/.gitignore create mode 100644 pkgs/ok_http/.metadata create mode 100644 pkgs/ok_http/CHANGELOG.md create mode 100644 pkgs/ok_http/LICENSE create mode 100644 pkgs/ok_http/README.md create mode 100644 pkgs/ok_http/analysis_options.yaml create mode 100644 pkgs/ok_http/android/.gitignore create mode 100644 pkgs/ok_http/android/build.gradle create mode 100644 pkgs/ok_http/android/settings.gradle create mode 100644 pkgs/ok_http/android/src/main/AndroidManifest.xml create mode 100644 pkgs/ok_http/example/.gitignore create mode 100644 pkgs/ok_http/example/README.md create mode 100644 pkgs/ok_http/example/analysis_options.yaml create mode 100644 pkgs/ok_http/example/android/.gitignore create mode 100644 pkgs/ok_http/example/android/app/build.gradle create mode 100644 pkgs/ok_http/example/android/app/src/debug/AndroidManifest.xml create mode 100644 pkgs/ok_http/example/android/app/src/main/AndroidManifest.xml create mode 100644 pkgs/ok_http/example/android/app/src/main/kotlin/com/example/ok_http_example/MainActivity.kt create mode 100644 pkgs/ok_http/example/android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 pkgs/ok_http/example/android/app/src/main/res/drawable/launch_background.xml create mode 100644 pkgs/ok_http/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 pkgs/ok_http/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 pkgs/ok_http/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 pkgs/ok_http/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 pkgs/ok_http/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 pkgs/ok_http/example/android/app/src/main/res/values-night/styles.xml create mode 100644 pkgs/ok_http/example/android/app/src/main/res/values/styles.xml create mode 100644 pkgs/ok_http/example/android/app/src/profile/AndroidManifest.xml create mode 100644 pkgs/ok_http/example/android/build.gradle create mode 100644 pkgs/ok_http/example/android/gradle.properties create mode 100644 pkgs/ok_http/example/android/gradle/wrapper/gradle-wrapper.properties create mode 100644 pkgs/ok_http/example/android/settings.gradle create mode 100644 pkgs/ok_http/example/lib/main.dart create mode 100644 pkgs/ok_http/example/pubspec.yaml create mode 100644 pkgs/ok_http/lib/ok_http.dart create mode 100644 pkgs/ok_http/pubspec.yaml diff --git a/.github/workflows/okhttp.yaml b/.github/workflows/okhttp.yaml new file mode 100644 index 0000000000..9cf39b5538 --- /dev/null +++ b/.github/workflows/okhttp.yaml @@ -0,0 +1,47 @@ +name: package:ok_http CI + +on: + push: + branches: + - main + - master + paths: + - '.github/workflows/okhttp.yml' + - 'pkgs/ok_http/**' + - 'pkgs/http_client_conformance_tests/**' + pull_request: + paths: + - '.github/workflows/okhttp.yml' + - 'pkgs/ok_http/**' + - 'pkgs/http_client_conformance_tests/**' + schedule: + - cron: "0 0 * * 0" + +env: + PUB_ENVIRONMENT: bot.github + +jobs: + verify: + name: Format & Analyze & Test + runs-on: ubuntu-latest + defaults: + run: + working-directory: pkgs/ok_http + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 + with: + distribution: 'zulu' + java-version: '17' + - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + with: + channel: 'stable' + - id: install + name: Install dependencies + run: flutter pub get + - name: Check formatting + if: always() && steps.install.outcome == 'success' + run: dart format --output=none --set-exit-if-changed . + - name: Analyze code + if: always() && steps.install.outcome == 'success' + run: flutter analyze --fatal-infos diff --git a/pkgs/ok_http/.gitignore b/pkgs/ok_http/.gitignore new file mode 100644 index 0000000000..ac5aa9893e --- /dev/null +++ b/pkgs/ok_http/.gitignore @@ -0,0 +1,29 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +build/ diff --git a/pkgs/ok_http/.metadata b/pkgs/ok_http/.metadata new file mode 100644 index 0000000000..f72bdaaaf8 --- /dev/null +++ b/pkgs/ok_http/.metadata @@ -0,0 +1,30 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "a14f74ff3a1cbd521163c5f03d68113d50af93d3" + channel: "stable" + +project_type: plugin_ffi + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 + base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 + - platform: android + create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 + base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/pkgs/ok_http/CHANGELOG.md b/pkgs/ok_http/CHANGELOG.md new file mode 100644 index 0000000000..0cbc61001a --- /dev/null +++ b/pkgs/ok_http/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.1.0-wip + +* Initial release. diff --git a/pkgs/ok_http/LICENSE b/pkgs/ok_http/LICENSE new file mode 100644 index 0000000000..afd9a64bec --- /dev/null +++ b/pkgs/ok_http/LICENSE @@ -0,0 +1,27 @@ +Copyright 2014, the Dart project authors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/pkgs/ok_http/README.md b/pkgs/ok_http/README.md new file mode 100644 index 0000000000..cca48a3079 --- /dev/null +++ b/pkgs/ok_http/README.md @@ -0,0 +1,22 @@ +[![pub package](https://img.shields.io/pub/v/cronet_http.svg)](https://pub.dev/packages/ok_http) +[![package publisher](https://img.shields.io/pub/publisher/ok_http.svg)](https://pub.dev/packages/ok_http/publisher) + +An Android Flutter plugin that provides access to the +[OkHttp][] HTTP client. + +## Status: experimental + +**NOTE**: This package is currently experimental and published under the +[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to +solicit feedback. + +For packages in the labs.dart.dev publisher we generally plan to either graduate +the package into a supported publisher (dart.dev, tools.dart.dev) after a period +of feedback and iteration, or discontinue the package. These packages have a +much higher expected rate of API and breaking changes. + +Your feedback is valuable and will help us evolve this package. For general +feedback, suggestions, and comments, please file an issue in the +[bug tracker](https://github.com/dart-lang/http/issues). + +[OkHttp]: https://square.github.io/okhttp/ diff --git a/pkgs/ok_http/analysis_options.yaml b/pkgs/ok_http/analysis_options.yaml new file mode 100644 index 0000000000..f04c6cf0f3 --- /dev/null +++ b/pkgs/ok_http/analysis_options.yaml @@ -0,0 +1 @@ +include: ../../analysis_options.yaml diff --git a/pkgs/ok_http/android/.gitignore b/pkgs/ok_http/android/.gitignore new file mode 100644 index 0000000000..161bdcdaf8 --- /dev/null +++ b/pkgs/ok_http/android/.gitignore @@ -0,0 +1,9 @@ +*.iml +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +.cxx diff --git a/pkgs/ok_http/android/build.gradle b/pkgs/ok_http/android/build.gradle new file mode 100644 index 0000000000..53858758ae --- /dev/null +++ b/pkgs/ok_http/android/build.gradle @@ -0,0 +1,65 @@ +// The Android Gradle Plugin builds the native code with the Android NDK. + +group = "com.example.ok_http" +version = "1.0" + +buildscript { + repositories { + google() + mavenCentral() + } + + dependencies { + // The Android Gradle Plugin knows how to build native code with the NDK. + classpath("com.android.tools.build:gradle:7.3.0") + } +} + +rootProject.allprojects { + repositories { + google() + mavenCentral() + } +} + +apply plugin: "com.android.library" + +android { + if (project.android.hasProperty("namespace")) { + namespace = "com.example.ok_http" + } + + // Bumping the plugin compileSdk version requires all clients of this plugin + // to bump the version in their app. + compileSdk = 34 + + // Use the NDK version + // declared in /android/app/build.gradle file of the Flutter project. + // Replace it with a version number if this plugin requires a specific NDK version. + // (e.g. ndkVersion "23.1.7779620") + ndkVersion = android.ndkVersion + + // Invoke the shared CMake build with the Android Gradle Plugin. + externalNativeBuild { + cmake { + path = "../src/CMakeLists.txt" + + // The default CMake version for the Android Gradle Plugin is 3.10.2. + // https://developer.android.com/studio/projects/install-ndk#vanilla_cmake + // + // 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. + // version "3.10.2" + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + defaultConfig { + minSdk = 21 + } +} diff --git a/pkgs/ok_http/android/settings.gradle b/pkgs/ok_http/android/settings.gradle new file mode 100644 index 0000000000..64c0d94b15 --- /dev/null +++ b/pkgs/ok_http/android/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'ok_http' diff --git a/pkgs/ok_http/android/src/main/AndroidManifest.xml b/pkgs/ok_http/android/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..c4b185786e --- /dev/null +++ b/pkgs/ok_http/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/pkgs/ok_http/example/.gitignore b/pkgs/ok_http/example/.gitignore new file mode 100644 index 0000000000..29a3a5017f --- /dev/null +++ b/pkgs/ok_http/example/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/pkgs/ok_http/example/README.md b/pkgs/ok_http/example/README.md new file mode 100644 index 0000000000..44f9e18b82 --- /dev/null +++ b/pkgs/ok_http/example/README.md @@ -0,0 +1,16 @@ +# ok_http_example + +Demonstrates how to use the ok_http plugin. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/pkgs/ok_http/example/analysis_options.yaml b/pkgs/ok_http/example/analysis_options.yaml new file mode 100644 index 0000000000..0d2902135c --- /dev/null +++ b/pkgs/ok_http/example/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/pkgs/ok_http/example/android/.gitignore b/pkgs/ok_http/example/android/.gitignore new file mode 100644 index 0000000000..6f568019d3 --- /dev/null +++ b/pkgs/ok_http/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/pkgs/ok_http/example/android/app/build.gradle b/pkgs/ok_http/example/android/app/build.gradle new file mode 100644 index 0000000000..77ac8ef7fd --- /dev/null +++ b/pkgs/ok_http/example/android/app/build.gradle @@ -0,0 +1,58 @@ +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file("local.properties") +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader("UTF-8") { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty("flutter.versionCode") +if (flutterVersionCode == null) { + flutterVersionCode = "1" +} + +def flutterVersionName = localProperties.getProperty("flutter.versionName") +if (flutterVersionName == null) { + flutterVersionName = "1.0" +} + +android { + namespace = "com.example.ok_http_example" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.ok_http_example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutterVersionCode.toInteger() + versionName = flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.debug + } + } +} + +flutter { + source = "../.." +} diff --git a/pkgs/ok_http/example/android/app/src/debug/AndroidManifest.xml b/pkgs/ok_http/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000000..399f6981d5 --- /dev/null +++ b/pkgs/ok_http/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/pkgs/ok_http/example/android/app/src/main/AndroidManifest.xml b/pkgs/ok_http/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..800e9dfaed --- /dev/null +++ b/pkgs/ok_http/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/pkgs/ok_http/example/android/app/src/main/kotlin/com/example/ok_http_example/MainActivity.kt b/pkgs/ok_http/example/android/app/src/main/kotlin/com/example/ok_http_example/MainActivity.kt new file mode 100644 index 0000000000..7b47f2822b --- /dev/null +++ b/pkgs/ok_http/example/android/app/src/main/kotlin/com/example/ok_http_example/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.ok_http_example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/pkgs/ok_http/example/android/app/src/main/res/drawable-v21/launch_background.xml b/pkgs/ok_http/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000000..f74085f3f6 --- /dev/null +++ b/pkgs/ok_http/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/pkgs/ok_http/example/android/app/src/main/res/drawable/launch_background.xml b/pkgs/ok_http/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000000..304732f884 --- /dev/null +++ b/pkgs/ok_http/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/pkgs/ok_http/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/pkgs/ok_http/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 diff --git a/pkgs/ok_http/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/pkgs/ok_http/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 diff --git a/pkgs/ok_http/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/pkgs/ok_http/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 diff --git a/pkgs/ok_http/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/pkgs/ok_http/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/pkgs/ok_http/example/android/app/src/main/res/values-night/styles.xml b/pkgs/ok_http/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000000..06952be745 --- /dev/null +++ b/pkgs/ok_http/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/pkgs/ok_http/example/android/app/src/main/res/values/styles.xml b/pkgs/ok_http/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000..cb1ef88056 --- /dev/null +++ b/pkgs/ok_http/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/pkgs/ok_http/example/android/app/src/profile/AndroidManifest.xml b/pkgs/ok_http/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000000..399f6981d5 --- /dev/null +++ b/pkgs/ok_http/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/pkgs/ok_http/example/android/build.gradle b/pkgs/ok_http/example/android/build.gradle new file mode 100644 index 0000000000..d2ffbffa4c --- /dev/null +++ b/pkgs/ok_http/example/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = "../build" +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/pkgs/ok_http/example/android/gradle.properties b/pkgs/ok_http/example/android/gradle.properties new file mode 100644 index 0000000000..3b5b324f6e --- /dev/null +++ b/pkgs/ok_http/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/pkgs/ok_http/example/android/gradle/wrapper/gradle-wrapper.properties b/pkgs/ok_http/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..e1ca574ef0 --- /dev/null +++ b/pkgs/ok_http/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/pkgs/ok_http/example/android/settings.gradle b/pkgs/ok_http/example/android/settings.gradle new file mode 100644 index 0000000000..536165d35a --- /dev/null +++ b/pkgs/ok_http/example/android/settings.gradle @@ -0,0 +1,25 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} + +include ":app" diff --git a/pkgs/ok_http/example/lib/main.dart b/pkgs/ok_http/example/lib/main.dart new file mode 100644 index 0000000000..772d29afd0 --- /dev/null +++ b/pkgs/ok_http/example/lib/main.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'dart:async'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + late int sumResult; + late Future sumAsyncResult; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + const textStyle = TextStyle(fontSize: 25); + const spacerSmall = SizedBox(height: 10); + return MaterialApp( + home: Scaffold( + appBar: AppBar( + title: const Text('Native Packages'), + ), + body: SingleChildScrollView( + child: Container( + padding: const EdgeInsets.all(10), + child: Column( + children: [ + const Text( + '', + style: textStyle, + textAlign: TextAlign.center, + ), + spacerSmall, + Text( + 'sum(1, 2) = $sumResult', + style: textStyle, + textAlign: TextAlign.center, + ), + spacerSmall, + FutureBuilder( + future: sumAsyncResult, + builder: (BuildContext context, AsyncSnapshot value) { + final displayValue = + (value.hasData) ? value.data : 'loading'; + return Text( + 'await sumAsync(3, 4) = $displayValue', + style: textStyle, + textAlign: TextAlign.center, + ); + }, + ), + ], + ), + ), + ), + ), + ); + } +} diff --git a/pkgs/ok_http/example/pubspec.yaml b/pkgs/ok_http/example/pubspec.yaml new file mode 100644 index 0000000000..3cf6fc86a8 --- /dev/null +++ b/pkgs/ok_http/example/pubspec.yaml @@ -0,0 +1,97 @@ +name: ok_http_example +description: "Demonstrates how to use the ok_http plugin." +# The following line prevents the package from being accidentally published to +# pub.dev using `flutter pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. +version: 1.0.0+1 + +environment: + sdk: '>=3.4.1 <4.0.0' + +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. +dependencies: + flutter: + sdk: flutter + + ok_http: + # When depending on this package from a real application you should use: + # ok_http: ^x.y.z + # See https://dart.dev/tools/pub/dependencies#version-constraints + # The example app is bundled with the plugin so we use a path dependency on + # the parent directory to use the current plugin's version. + path: ../ + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + cupertino_icons: ^1.0.6 + +dev_dependencies: + flutter_test: + sdk: flutter + + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + flutter_lints: ^3.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + + # To add assets to your application, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/pkgs/ok_http/lib/ok_http.dart b/pkgs/ok_http/lib/ok_http.dart new file mode 100644 index 0000000000..4b81882abc --- /dev/null +++ b/pkgs/ok_http/lib/ok_http.dart @@ -0,0 +1,3 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. diff --git a/pkgs/ok_http/pubspec.yaml b/pkgs/ok_http/pubspec.yaml new file mode 100644 index 0000000000..2a7a21fc28 --- /dev/null +++ b/pkgs/ok_http/pubspec.yaml @@ -0,0 +1,24 @@ +name: ok_http +version: 0.1.0-wip +description: >- + An Android Flutter plugin that provides access to the OkHttp HTTP client. +repository: https://github.com/dart-lang/http/tree/master/pkgs/ok_http +publish_to: none + +environment: + sdk: ^3.4.0 + flutter: '>=3.22.0' + +dependencies: + flutter: + sdk: flutter + plugin_platform_interface: ^2.0.2 + +dev_dependencies: + dart_flutter_team_lints: ^2.0.0 + +flutter: + plugin: + platforms: + android: + ffiPlugin: true From 03678943bbda2991f9a57c248c0a601860e838b1 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 28 May 2024 13:53:09 -0700 Subject: [PATCH 376/448] Mark flutter .metadata files as generated (#1214) Removes one file with a comment indicating it should not be hand edited from the default view for github PR diffs. --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index f189cdde73..53b199cb75 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,3 @@ .github/workflows/dart.yml linguist-generated=true tool/ci.sh linguist-generated=true +pkgs/*/.metadata linguist-generated=true From 9c5cadca46581bbd6a7ef414f55557a4100d91df Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Sat, 1 Jun 2024 05:05:54 +0530 Subject: [PATCH 377/448] `ok_http`: Add BaseClient Implementation and make asynchronous requests. (#1215) --- .github/workflows/okhttp.yaml | 11 + pkgs/ok_http/.gitignore | 3 + pkgs/ok_http/CHANGELOG.md | 3 +- pkgs/ok_http/analysis_options.yaml | 4 + pkgs/ok_http/android/build.gradle | 19 +- .../android/app/src/main/AndroidManifest.xml | 3 +- pkgs/ok_http/example/android/settings.gradle | 2 +- .../example/integration_test/client_test.dart | 27 + pkgs/ok_http/example/lib/book.dart | 32 + pkgs/ok_http/example/lib/main.dart | 172 +- pkgs/ok_http/example/pubspec.yaml | 86 +- pkgs/ok_http/jnigen.yaml | 80 + pkgs/ok_http/lib/ok_http.dart | 52 + pkgs/ok_http/lib/src/ok_http_client.dart | 154 ++ .../lib/src/third_party/okhttp3/Call.dart | 609 +++++ .../lib/src/third_party/okhttp3/Callback.dart | 234 ++ .../lib/src/third_party/okhttp3/Headers.dart | 1043 ++++++++ .../src/third_party/okhttp3/OkHttpClient.dart | 2112 +++++++++++++++++ .../lib/src/third_party/okhttp3/Request.dart | 1005 ++++++++ .../src/third_party/okhttp3/RequestBody.dart | 1080 +++++++++ .../lib/src/third_party/okhttp3/Response.dart | 1256 ++++++++++ .../src/third_party/okhttp3/ResponseBody.dart | 995 ++++++++ .../lib/src/third_party/okhttp3/_package.dart | 8 + pkgs/ok_http/pubspec.yaml | 3 + 24 files changed, 8853 insertions(+), 140 deletions(-) create mode 100644 pkgs/ok_http/example/integration_test/client_test.dart create mode 100644 pkgs/ok_http/example/lib/book.dart create mode 100644 pkgs/ok_http/jnigen.yaml create mode 100644 pkgs/ok_http/lib/src/ok_http_client.dart create mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/Call.dart create mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/Callback.dart create mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/Headers.dart create mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/OkHttpClient.dart create mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/Request.dart create mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/RequestBody.dart create mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/Response.dart create mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/ResponseBody.dart create mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/_package.dart diff --git a/.github/workflows/okhttp.yaml b/.github/workflows/okhttp.yaml index 9cf39b5538..6670fd2f8d 100644 --- a/.github/workflows/okhttp.yaml +++ b/.github/workflows/okhttp.yaml @@ -45,3 +45,14 @@ jobs: - name: Analyze code if: always() && steps.install.outcome == 'success' run: flutter analyze --fatal-infos + - name: Run tests + uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 + if: always() && steps.install.outcome == 'success' + with: + # api-level/minSdkVersion should be help in sync in: + # - .github/workflows/ok.yml + # - pkgs/ok_http/android/build.gradle + # - pkgs/ok_http/example/android/app/build.gradle + api-level: 21 + arch: x86_64 + script: cd pkgs/ok_http/example && flutter test --timeout=120s integration_test/ diff --git a/pkgs/ok_http/.gitignore b/pkgs/ok_http/.gitignore index ac5aa9893e..2e58cc573d 100644 --- a/pkgs/ok_http/.gitignore +++ b/pkgs/ok_http/.gitignore @@ -27,3 +27,6 @@ migrate_working_dir/ **/doc/api/ .dart_tool/ build/ + +# Ignore the JAR files required to generate JNI Bindings +jar/ diff --git a/pkgs/ok_http/CHANGELOG.md b/pkgs/ok_http/CHANGELOG.md index 0cbc61001a..f1c3a8b5d6 100644 --- a/pkgs/ok_http/CHANGELOG.md +++ b/pkgs/ok_http/CHANGELOG.md @@ -1,3 +1,4 @@ ## 0.1.0-wip -* Initial release. +- Implementation of [`BaseClient`](https://pub.dev/documentation/http/latest/http/BaseClient-class.html) and `send()` method using [`enqueue()` API](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-call/enqueue.html) +- `ok_http` can now send asynchronous requests diff --git a/pkgs/ok_http/analysis_options.yaml b/pkgs/ok_http/analysis_options.yaml index f04c6cf0f3..0f04002ca9 100644 --- a/pkgs/ok_http/analysis_options.yaml +++ b/pkgs/ok_http/analysis_options.yaml @@ -1 +1,5 @@ include: ../../analysis_options.yaml + +analyzer: + exclude: + - lib/src/third_party/ diff --git a/pkgs/ok_http/android/build.gradle b/pkgs/ok_http/android/build.gradle index 53858758ae..c21dab37b0 100644 --- a/pkgs/ok_http/android/build.gradle +++ b/pkgs/ok_http/android/build.gradle @@ -39,21 +39,6 @@ android { // (e.g. ndkVersion "23.1.7779620") ndkVersion = android.ndkVersion - // Invoke the shared CMake build with the Android Gradle Plugin. - externalNativeBuild { - cmake { - path = "../src/CMakeLists.txt" - - // The default CMake version for the Android Gradle Plugin is 3.10.2. - // https://developer.android.com/studio/projects/install-ndk#vanilla_cmake - // - // 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. - // version "3.10.2" - } - } - compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 @@ -63,3 +48,7 @@ android { minSdk = 21 } } + +dependencies { + implementation('com.squareup.okhttp3:okhttp:4.12.0') +} diff --git a/pkgs/ok_http/example/android/app/src/main/AndroidManifest.xml b/pkgs/ok_http/example/android/app/src/main/AndroidManifest.xml index 800e9dfaed..8670e67f36 100644 --- a/pkgs/ok_http/example/android/app/src/main/AndroidManifest.xml +++ b/pkgs/ok_http/example/android/app/src/main/AndroidManifest.xml @@ -2,7 +2,8 @@ + android:icon="@mipmap/ic_launcher" + android:usesCleartextTraffic="true"> testConformance() async { + group('ok_http client', () { + testRequestBody(OkHttpClient()); + testResponseBody(OkHttpClient(), canStreamResponseBody: false); + testRequestHeaders(OkHttpClient()); + testRequestMethods(OkHttpClient(), preservesMethodCase: true); + testResponseStatusLine(OkHttpClient()); + testCompressedResponseBody(OkHttpClient()); + testIsolate(OkHttpClient.new); + testResponseCookies(OkHttpClient(), canReceiveSetCookieHeaders: true); + }); +} diff --git a/pkgs/ok_http/example/lib/book.dart b/pkgs/ok_http/example/lib/book.dart new file mode 100644 index 0000000000..4954d2509b --- /dev/null +++ b/pkgs/ok_http/example/lib/book.dart @@ -0,0 +1,32 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +class Book { + String title; + String description; + Uri imageUrl; + + Book(this.title, this.description, this.imageUrl); + + static List listFromJson(Map json) { + final books = []; + + if (json['items'] case final List items) { + for (final item in items) { + if (item case {'volumeInfo': final Map volumeInfo}) { + if (volumeInfo + case { + 'title': final String title, + 'description': final String description, + 'imageLinks': {'smallThumbnail': final String thumbnail} + }) { + books.add(Book(title, description, Uri.parse(thumbnail))); + } + } + } + } + + return books; + } +} diff --git a/pkgs/ok_http/example/lib/main.dart b/pkgs/ok_http/example/lib/main.dart index 772d29afd0..0fd1807ea0 100644 --- a/pkgs/ok_http/example/lib/main.dart +++ b/pkgs/ok_http/example/lib/main.dart @@ -1,69 +1,149 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:convert'; +import 'dart:io'; + import 'package:flutter/material.dart'; -import 'dart:async'; +import 'package:http/http.dart'; +import 'package:http/io_client.dart'; +import 'package:http_image_provider/http_image_provider.dart'; +import 'package:ok_http/ok_http.dart'; +import 'package:provider/provider.dart'; + +import 'book.dart'; void main() { - runApp(const MyApp()); + final Client httpClient; + if (Platform.isAndroid) { + httpClient = OkHttpClient(); + } else { + httpClient = IOClient(HttpClient()..userAgent = 'Book Agent'); + } + + runApp(Provider( + create: (_) => httpClient, + child: const BookSearchApp(), + dispose: (_, client) => client.close())); } -class MyApp extends StatefulWidget { - const MyApp({super.key}); +class BookSearchApp extends StatelessWidget { + const BookSearchApp({super.key}); @override - State createState() => _MyAppState(); + Widget build(BuildContext context) => const MaterialApp( + // Remove the debug banner. + debugShowCheckedModeBanner: false, + title: 'Book Search', + home: HomePage(), + ); } -class _MyAppState extends State { - late int sumResult; - late Future sumAsyncResult; +class HomePage extends StatefulWidget { + const HomePage({super.key}); + + @override + State createState() => _HomePageState(); +} + +class _HomePageState extends State { + List? _books; + String? _lastQuery; + late Client _client; @override void initState() { super.initState(); + _client = context.read(); + } + + // Get the list of books matching `query`. + // The `get` call will automatically use the `client` configured in `main`. + Future> _findMatchingBooks(String query) async { + final response = await _client.get( + Uri.https( + 'www.googleapis.com', + '/books/v1/volumes', + {'q': query, 'maxResults': '20', 'printType': 'books'}, + ), + ); + + final json = jsonDecode(utf8.decode(response.bodyBytes)) as Map; + return Book.listFromJson(json); + } + + void _runSearch(String query) async { + _lastQuery = query; + if (query.isEmpty) { + setState(() { + _books = null; + }); + return; + } + + final books = await _findMatchingBooks(query); + // Avoid the situation where a slow-running query finishes late and + // replaces newer search results. + if (query != _lastQuery) return; + setState(() { + _books = books; + }); } @override Widget build(BuildContext context) { - const textStyle = TextStyle(fontSize: 25); - const spacerSmall = SizedBox(height: 10); - return MaterialApp( - home: Scaffold( - appBar: AppBar( - title: const Text('Native Packages'), - ), - body: SingleChildScrollView( - child: Container( - padding: const EdgeInsets.all(10), - child: Column( - children: [ - const Text( - '', - style: textStyle, - textAlign: TextAlign.center, - ), - spacerSmall, - Text( - 'sum(1, 2) = $sumResult', - style: textStyle, - textAlign: TextAlign.center, - ), - spacerSmall, - FutureBuilder( - future: sumAsyncResult, - builder: (BuildContext context, AsyncSnapshot value) { - final displayValue = - (value.hasData) ? value.data : 'loading'; - return Text( - 'await sumAsync(3, 4) = $displayValue', - style: textStyle, - textAlign: TextAlign.center, - ); - }, - ), - ], + final searchResult = _books == null + ? const Text('Please enter a query', style: TextStyle(fontSize: 24)) + : _books!.isNotEmpty + ? BookList(_books!) + : const Text('No results found', style: TextStyle(fontSize: 24)); + + return Scaffold( + appBar: AppBar(title: const Text('Book Search')), + body: Padding( + padding: const EdgeInsets.all(10), + child: Column( + children: [ + const SizedBox(height: 20), + TextField( + onChanged: _runSearch, + decoration: const InputDecoration( + labelText: 'Search', + suffixIcon: Icon(Icons.search), + ), ), - ), + const SizedBox(height: 20), + Expanded(child: searchResult), + ], ), ), ); } } + +class BookList extends StatefulWidget { + final List books; + const BookList(this.books, {super.key}); + + @override + State createState() => _BookListState(); +} + +class _BookListState extends State { + @override + Widget build(BuildContext context) => ListView.builder( + itemCount: widget.books.length, + itemBuilder: (context, index) => Card( + key: ValueKey(widget.books[index].title), + child: ListTile( + leading: Image( + image: HttpImage( + widget.books[index].imageUrl.replace(scheme: 'https'), + client: context.read())), + title: Text(widget.books[index].title), + subtitle: Text(widget.books[index].description), + ), + ), + ); +} diff --git a/pkgs/ok_http/example/pubspec.yaml b/pkgs/ok_http/example/pubspec.yaml index 3cf6fc86a8..de52329b4b 100644 --- a/pkgs/ok_http/example/pubspec.yaml +++ b/pkgs/ok_http/example/pubspec.yaml @@ -1,97 +1,31 @@ name: ok_http_example description: "Demonstrates how to use the ok_http plugin." -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -# In Windows, build-name is used as the major, minor, and patch parts -# of the product and file versions while build-number is used as the build suffix. +publish_to: "none" version: 1.0.0+1 environment: - sdk: '>=3.4.1 <4.0.0' + sdk: ">=3.4.1 <4.0.0" -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter - ok_http: - # When depending on this package from a real application you should use: - # ok_http: ^x.y.z - # See https://dart.dev/tools/pub/dependencies#version-constraints - # The example app is bundled with the plugin so we use a path dependency on - # the parent directory to use the current plugin's version. path: ../ - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.6 + http: ^1.0.0 + http_image_provider: ^0.0.2 + provider: ^6.1.1 dev_dependencies: flutter_test: sdk: flutter - - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. flutter_lints: ^3.0.0 + http_client_conformance_tests: + path: ../../http_client_conformance_tests/ + integration_test: + sdk: flutter + test: ^1.23.1 -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages diff --git a/pkgs/ok_http/jnigen.yaml b/pkgs/ok_http/jnigen.yaml new file mode 100644 index 0000000000..b68eeb3020 --- /dev/null +++ b/pkgs/ok_http/jnigen.yaml @@ -0,0 +1,80 @@ +# To regenerate the JNI Bindings, download the OkHttp 4.12.0 JAR file from the Maven Repository +# and place them in 'jar/'. +# https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp/4.12.0 +# Then run the command: dart run jnigen --config jnigen.yaml + +summarizer: + backend: asm + +output: + dart: + path: "lib/src/third_party/" + +enable_experiment: + - "interface_implementation" + +classes: + - "okhttp3.Request" + - "okhttp3.RequestBody" + - "okhttp3.Response" + - "okhttp3.ResponseBody" + - "okhttp3.OkHttpClient" + - "okhttp3.Call" + - "okhttp3.Headers" + - "okhttp3.Callback" + +# Exclude the deprecated methods listed below +# They cause syntax errors during the `dart format` step of JNIGen. +exclude: + methods: + - "okhttp3.Request#-deprecated_url" + - "okhttp3.Request#-deprecated_method" + - "okhttp3.Request#-deprecated_headers" + - "okhttp3.Request#-deprecated_body" + - "okhttp3.Request#-deprecated_cacheControl" + - "okhttp3.Response#-deprecated_request" + - "okhttp3.Response#-deprecated_protocol" + - "okhttp3.Response#-deprecated_code" + - "okhttp3.Response#-deprecated_message" + - "okhttp3.Response#-deprecated_handshake" + - "okhttp3.Response#-deprecated_headers" + - "okhttp3.Response#-deprecated_body" + - "okhttp3.Response#-deprecated_networkResponse" + - "okhttp3.Response#-deprecated_priorResponse" + - "okhttp3.Response#-deprecated_cacheResponse" + - "okhttp3.Response#-deprecated_cacheControl" + - "okhttp3.Response#-deprecated_sentRequestAtMillis" + - "okhttp3.Response#-deprecated_receivedResponseAtMillis" + - "okhttp3.OkHttpClient#-deprecated_dispatcher" + - "okhttp3.OkHttpClient#-deprecated_connectionPool" + - "okhttp3.OkHttpClient#-deprecated_interceptors" + - "okhttp3.OkHttpClient#-deprecated_networkInterceptors" + - "okhttp3.OkHttpClient#-deprecated_eventListenerFactory" + - "okhttp3.OkHttpClient#-deprecated_retryOnConnectionFailure" + - "okhttp3.OkHttpClient#-deprecated_authenticator" + - "okhttp3.OkHttpClient#-deprecated_followRedirects" + - "okhttp3.OkHttpClient#-deprecated_followSslRedirects" + - "okhttp3.OkHttpClient#-deprecated_cookieJar" + - "okhttp3.OkHttpClient#-deprecated_cache" + - "okhttp3.OkHttpClient#-deprecated_dns" + - "okhttp3.OkHttpClient#-deprecated_proxy" + - "okhttp3.OkHttpClient#-deprecated_proxySelector" + - "okhttp3.OkHttpClient#-deprecated_proxyAuthenticator" + - "okhttp3.OkHttpClient#-deprecated_socketFactory" + - "okhttp3.OkHttpClient#-deprecated_sslSocketFactory" + - "okhttp3.OkHttpClient#-deprecated_connectionSpecs" + - "okhttp3.OkHttpClient#-deprecated_hostnameVerifier" + - "okhttp3.OkHttpClient#-deprecated_certificatePinner" + - "okhttp3.OkHttpClient#-deprecated_callTimeoutMillis" + - "okhttp3.OkHttpClient#-deprecated_connectTimeoutMillis" + - "okhttp3.OkHttpClient#-deprecated_readTimeoutMillis" + - "okhttp3.OkHttpClient#-deprecated_writeTimeoutMillis" + - "okhttp3.OkHttpClient#-deprecated_pingIntervalMillis" + - "okhttp3.OkHttpClient#-deprecated_protocols" + - 'okhttp3.OkHttpClient\$Builder#-addInterceptor' + - 'okhttp3.OkHttpClient\$Builder#-addNetworkInterceptor' + - 'okhttp3.Headers\$Companion#-deprecated_of' + - "okhttp3.Headers#-deprecated_size" + +class_path: + - "jar/okhttp-4.12.0.jar" diff --git a/pkgs/ok_http/lib/ok_http.dart b/pkgs/ok_http/lib/ok_http.dart index 4b81882abc..891ec98463 100644 --- a/pkgs/ok_http/lib/ok_http.dart +++ b/pkgs/ok_http/lib/ok_http.dart @@ -1,3 +1,55 @@ // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. + +/// An Android Flutter plugin that provides access to the +/// [OkHttp](https://square.github.io/okhttp/) HTTP client. +/// +/// ``` +/// import 'package:ok_http/ok_http.dart'; +/// +/// void main() async { +/// var client = OkHttpClient(); +/// final response = await client.get( +/// Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'})); +/// if (response.statusCode != 200) { +/// throw HttpException('bad response: ${response.statusCode}'); +/// } +/// +/// final decodedResponse = +/// jsonDecode(utf8.decode(response.bodyBytes)) as Map; +/// +/// final itemCount = decodedResponse['totalItems']; +/// print('Number of books about http: $itemCount.'); +/// for (var i = 0; i < min(itemCount, 10); ++i) { +/// print(decodedResponse['items'][i]['volumeInfo']['title']); +/// } +/// } +/// ``` +/// +/// [OkHttpClient] is an implementation of the `package:http` [Client], +/// which means that it can easily used conditionally based on the current +/// platform. +/// +/// ``` +/// void main() { +/// var clientFactory = Client.new; // Constructs the default client. +/// if (Platform.isAndroid) { +/// clientFactory = () { +/// return OkHttpClient(); +/// }; +/// } +/// runWithClient(() => runApp(const MyFlutterApp()), clientFactory); +/// } +/// ``` +/// +/// After the above setup, calling [Client] methods or any of the +/// `package:http` convenient functions (e.g. [get]) will result in +/// [OkHttpClient] being used on Android. +library; + +import 'package:http/http.dart'; + +import 'src/ok_http_client.dart'; + +export 'src/ok_http_client.dart'; diff --git a/pkgs/ok_http/lib/src/ok_http_client.dart b/pkgs/ok_http/lib/src/ok_http_client.dart new file mode 100644 index 0000000000..d3d1c8eb69 --- /dev/null +++ b/pkgs/ok_http/lib/src/ok_http_client.dart @@ -0,0 +1,154 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// An Android Flutter plugin that exposes the +/// [OkHttp](https://square.github.io/okhttp/) HTTP client. +/// +/// The platform interface must be initialized before using this plugin e.g. by +/// calling +/// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html) +/// or +/// [`runApp`](https://api.flutter.dev/flutter/widgets/runApp.html). +library; + +import 'dart:async'; +import 'dart:typed_data'; + +import 'package:http/http.dart'; +import 'package:jni/jni.dart'; + +import 'third_party/okhttp3/_package.dart' as bindings; + +/// An HTTP [Client] utilizing the [OkHttp](https://square.github.io/okhttp/) client. +/// +/// Example Usage: +/// ``` +/// void main() async { +/// var client = OkHttpClient(); +/// final response = await client.get( +/// Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'})); +/// if (response.statusCode != 200) { +/// throw HttpException('bad response: ${response.statusCode}'); +/// } +/// +/// final decodedResponse = +/// jsonDecode(utf8.decode(response.bodyBytes)) as Map; +/// +/// final itemCount = decodedResponse['totalItems']; +/// print('Number of books about http: $itemCount.'); +/// for (var i = 0; i < min(itemCount, 10); ++i) { +/// print(decodedResponse['items'][i]['volumeInfo']['title']); +/// } +/// } +/// ``` +class OkHttpClient extends BaseClient { + late bindings.OkHttpClient _client; + + OkHttpClient() { + _client = bindings.OkHttpClient.new1(); + } + + @override + Future send(BaseRequest request) async { + var requestUrl = request.url.toString(); + var requestHeaders = request.headers; + var requestMethod = request.method; + var requestBody = await request.finalize().toBytes(); + + final responseCompleter = Completer(); + + var reqBuilder = bindings.Request_Builder().url1(requestUrl.toJString()); + + requestHeaders.forEach((headerName, headerValue) { + reqBuilder.addHeader(headerName.toJString(), headerValue.toJString()); + }); + + // OkHttp doesn't allow a non-null RequestBody for GET and HEAD requests. + // So, we need to handle this case separately. + bindings.RequestBody okReqBody; + if (requestMethod != 'GET' && requestMethod != 'HEAD') { + okReqBody = bindings.RequestBody.create10(requestBody.toJArray()); + } else { + okReqBody = bindings.RequestBody.fromReference(jNullReference); + } + + reqBuilder.method( + requestMethod.toJString(), + okReqBody, + ); + + // `enqueue()` schedules the request to be executed in the future. + // https://square.github.io/okhttp/5.x/okhttp/okhttp3/-call/enqueue.html + _client + .newCall(reqBuilder.build()) + .enqueue(bindings.Callback.implement(bindings.$CallbackImpl( + onResponse: (bindings.Call call, bindings.Response response) { + var responseHeaders = {}; + + response.headers().toMultimap().forEach((key, value) { + responseHeaders[key.toDartString(releaseOriginal: true)] = + value.join(','); + }); + + int? contentLength; + if (responseHeaders.containsKey('content-length')) { + contentLength = int.tryParse(responseHeaders['content-length']!); + + // To be conformant with RFC 2616 14.13, we need to check if the + // content-length is a non-negative integer. + if (contentLength == null || contentLength < 0) { + responseCompleter.completeError(ClientException( + 'Invalid content-length header', request.url)); + return; + } + } + + // Exceptions while reading the response body such as + // `java.net.ProtocolException` & `java.net.SocketTimeoutException` + // crash the app if un-handled. + var responseBody = Uint8List.fromList([]); + try { + // Blocking call to read the response body. + responseBody = response.body().bytes().toUint8List(); + } catch (e) { + responseCompleter + .completeError(ClientException(e.toString(), request.url)); + return; + } + + responseCompleter.complete(StreamedResponse( + Stream.value(responseBody), + response.code(), + reasonPhrase: + response.message().toDartString(releaseOriginal: true), + headers: responseHeaders, + request: request, + contentLength: contentLength, + )); + }, + onFailure: (bindings.Call call, JObject ioException) { + responseCompleter.completeError( + ClientException(ioException.toString(), request.url)); + }, + ))); + + return responseCompleter.future; + } +} + +extension on Uint8List { + JArray toJArray() => + JArray(jbyte.type, length)..setRange(0, length, this); +} + +extension on JArray { + Uint8List toUint8List({int? length}) { + length ??= this.length; + final list = Uint8List(length); + for (var i = 0; i < length; i++) { + list[i] = this[i]; + } + return list; + } +} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/Call.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/Call.dart new file mode 100644 index 0000000000..68c52c2a83 --- /dev/null +++ b/pkgs/ok_http/lib/src/third_party/okhttp3/Call.dart @@ -0,0 +1,609 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +import "Request.dart" as request_; + +import "Response.dart" as response_; + +import "Callback.dart" as callback_; + +/// from: okhttp3.Call$Factory +class Call_Factory extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Call_Factory.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Call$Factory"); + + /// The type which includes information such as the signature of this class. + static const type = $Call_FactoryType(); + static final _id_newCall = _class.instanceMethodId( + r"newCall", + r"(Lokhttp3/Request;)Lokhttp3/Call;", + ); + + static final _newCall = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public abstract okhttp3.Call newCall(okhttp3.Request request) + /// The returned object must be released after use, by calling the [release] method. + Call newCall( + request_.Request request, + ) { + return _newCall(reference.pointer, _id_newCall as jni.JMethodIDPtr, + request.reference.pointer) + .object(const $CallType()); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r"newCall(Lokhttp3/Request;)Lokhttp3/Call;") { + final $r = _$impls[$p]!.newCall( + $a[0].castTo(const request_.$RequestType(), releaseOriginal: true), + ); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e.toString()); + } + return jni.nullptr; + } + + factory Call_Factory.implement( + $Call_FactoryImpl $impl, + ) { + final $p = ReceivePort(); + final $x = Call_Factory.fromReference( + ProtectedJniExtensions.newPortProxy( + r"okhttp3.Call$Factory", + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $Call_FactoryImpl { + factory $Call_FactoryImpl({ + required Call Function(request_.Request request) newCall, + }) = _$Call_FactoryImpl; + + Call newCall(request_.Request request); +} + +class _$Call_FactoryImpl implements $Call_FactoryImpl { + _$Call_FactoryImpl({ + required Call Function(request_.Request request) newCall, + }) : _newCall = newCall; + + final Call Function(request_.Request request) _newCall; + + Call newCall(request_.Request request) { + return _newCall(request); + } +} + +final class $Call_FactoryType extends jni.JObjType { + const $Call_FactoryType(); + + @override + String get signature => r"Lokhttp3/Call$Factory;"; + + @override + Call_Factory fromReference(jni.JReference reference) => + Call_Factory.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($Call_FactoryType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($Call_FactoryType) && + other is $Call_FactoryType; + } +} + +/// from: okhttp3.Call +class Call extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Call.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Call"); + + /// The type which includes information such as the signature of this class. + static const type = $CallType(); + static final _id_request = _class.instanceMethodId( + r"request", + r"()Lokhttp3/Request;", + ); + + static final _request = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okhttp3.Request request() + /// The returned object must be released after use, by calling the [release] method. + request_.Request request() { + return _request(reference.pointer, _id_request as jni.JMethodIDPtr) + .object(const request_.$RequestType()); + } + + static final _id_execute = _class.instanceMethodId( + r"execute", + r"()Lokhttp3/Response;", + ); + + static final _execute = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okhttp3.Response execute() + /// The returned object must be released after use, by calling the [release] method. + response_.Response execute() { + return _execute(reference.pointer, _id_execute as jni.JMethodIDPtr) + .object(const response_.$ResponseType()); + } + + static final _id_enqueue = _class.instanceMethodId( + r"enqueue", + r"(Lokhttp3/Callback;)V", + ); + + static final _enqueue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public abstract void enqueue(okhttp3.Callback callback) + void enqueue( + callback_.Callback callback, + ) { + _enqueue(reference.pointer, _id_enqueue as jni.JMethodIDPtr, + callback.reference.pointer) + .check(); + } + + static final _id_cancel = _class.instanceMethodId( + r"cancel", + r"()V", + ); + + static final _cancel = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract void cancel() + void cancel() { + _cancel(reference.pointer, _id_cancel as jni.JMethodIDPtr).check(); + } + + static final _id_isExecuted = _class.instanceMethodId( + r"isExecuted", + r"()Z", + ); + + static final _isExecuted = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract boolean isExecuted() + bool isExecuted() { + return _isExecuted(reference.pointer, _id_isExecuted as jni.JMethodIDPtr) + .boolean; + } + + static final _id_isCanceled = _class.instanceMethodId( + r"isCanceled", + r"()Z", + ); + + static final _isCanceled = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract boolean isCanceled() + bool isCanceled() { + return _isCanceled(reference.pointer, _id_isCanceled as jni.JMethodIDPtr) + .boolean; + } + + static final _id_timeout = _class.instanceMethodId( + r"timeout", + r"()Lokio/Timeout;", + ); + + static final _timeout = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okio.Timeout timeout() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject timeout() { + return _timeout(reference.pointer, _id_timeout as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_clone = _class.instanceMethodId( + r"clone", + r"()Lokhttp3/Call;", + ); + + static final _clone = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okhttp3.Call clone() + /// The returned object must be released after use, by calling the [release] method. + Call clone() { + return _clone(reference.pointer, _id_clone as jni.JMethodIDPtr) + .object(const $CallType()); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r"request()Lokhttp3/Request;") { + final $r = _$impls[$p]!.request(); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r"execute()Lokhttp3/Response;") { + final $r = _$impls[$p]!.execute(); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r"enqueue(Lokhttp3/Callback;)V") { + _$impls[$p]!.enqueue( + $a[0].castTo(const callback_.$CallbackType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == r"cancel()V") { + _$impls[$p]!.cancel(); + return jni.nullptr; + } + if ($d == r"isExecuted()Z") { + final $r = _$impls[$p]!.isExecuted(); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r"isCanceled()Z") { + final $r = _$impls[$p]!.isCanceled(); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r"timeout()Lokio/Timeout;") { + final $r = _$impls[$p]!.timeout(); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r"clone()Lokhttp3/Call;") { + final $r = _$impls[$p]!.clone(); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e.toString()); + } + return jni.nullptr; + } + + factory Call.implement( + $CallImpl $impl, + ) { + final $p = ReceivePort(); + final $x = Call.fromReference( + ProtectedJniExtensions.newPortProxy( + r"okhttp3.Call", + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $CallImpl { + factory $CallImpl({ + required request_.Request Function() request, + required response_.Response Function() execute, + required void Function(callback_.Callback callback) enqueue, + required void Function() cancel, + required bool Function() isExecuted, + required bool Function() isCanceled, + required jni.JObject Function() timeout, + required Call Function() clone, + }) = _$CallImpl; + + request_.Request request(); + response_.Response execute(); + void enqueue(callback_.Callback callback); + void cancel(); + bool isExecuted(); + bool isCanceled(); + jni.JObject timeout(); + Call clone(); +} + +class _$CallImpl implements $CallImpl { + _$CallImpl({ + required request_.Request Function() request, + required response_.Response Function() execute, + required void Function(callback_.Callback callback) enqueue, + required void Function() cancel, + required bool Function() isExecuted, + required bool Function() isCanceled, + required jni.JObject Function() timeout, + required Call Function() clone, + }) : _request = request, + _execute = execute, + _enqueue = enqueue, + _cancel = cancel, + _isExecuted = isExecuted, + _isCanceled = isCanceled, + _timeout = timeout, + _clone = clone; + + final request_.Request Function() _request; + final response_.Response Function() _execute; + final void Function(callback_.Callback callback) _enqueue; + final void Function() _cancel; + final bool Function() _isExecuted; + final bool Function() _isCanceled; + final jni.JObject Function() _timeout; + final Call Function() _clone; + + request_.Request request() { + return _request(); + } + + response_.Response execute() { + return _execute(); + } + + void enqueue(callback_.Callback callback) { + return _enqueue(callback); + } + + void cancel() { + return _cancel(); + } + + bool isExecuted() { + return _isExecuted(); + } + + bool isCanceled() { + return _isCanceled(); + } + + jni.JObject timeout() { + return _timeout(); + } + + Call clone() { + return _clone(); + } +} + +final class $CallType extends jni.JObjType { + const $CallType(); + + @override + String get signature => r"Lokhttp3/Call;"; + + @override + Call fromReference(jni.JReference reference) => Call.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($CallType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($CallType) && other is $CallType; + } +} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/Callback.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/Callback.dart new file mode 100644 index 0000000000..141720e578 --- /dev/null +++ b/pkgs/ok_http/lib/src/third_party/okhttp3/Callback.dart @@ -0,0 +1,234 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +import "Call.dart" as call_; + +import "Response.dart" as response_; + +/// from: okhttp3.Callback +class Callback extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Callback.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Callback"); + + /// The type which includes information such as the signature of this class. + static const type = $CallbackType(); + static final _id_onFailure = _class.instanceMethodId( + r"onFailure", + r"(Lokhttp3/Call;Ljava/io/IOException;)V", + ); + + static final _onFailure = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract void onFailure(okhttp3.Call call, java.io.IOException iOException) + void onFailure( + call_.Call call, + jni.JObject iOException, + ) { + _onFailure(reference.pointer, _id_onFailure as jni.JMethodIDPtr, + call.reference.pointer, iOException.reference.pointer) + .check(); + } + + static final _id_onResponse = _class.instanceMethodId( + r"onResponse", + r"(Lokhttp3/Call;Lokhttp3/Response;)V", + ); + + static final _onResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract void onResponse(okhttp3.Call call, okhttp3.Response response) + void onResponse( + call_.Call call, + response_.Response response, + ) { + _onResponse(reference.pointer, _id_onResponse as jni.JMethodIDPtr, + call.reference.pointer, response.reference.pointer) + .check(); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r"onFailure(Lokhttp3/Call;Ljava/io/IOException;)V") { + _$impls[$p]!.onFailure( + $a[0].castTo(const call_.$CallType(), releaseOriginal: true), + $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == r"onResponse(Lokhttp3/Call;Lokhttp3/Response;)V") { + _$impls[$p]!.onResponse( + $a[0].castTo(const call_.$CallType(), releaseOriginal: true), + $a[1].castTo(const response_.$ResponseType(), releaseOriginal: true), + ); + return jni.nullptr; + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e.toString()); + } + return jni.nullptr; + } + + factory Callback.implement( + $CallbackImpl $impl, + ) { + final $p = ReceivePort(); + final $x = Callback.fromReference( + ProtectedJniExtensions.newPortProxy( + r"okhttp3.Callback", + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $CallbackImpl { + factory $CallbackImpl({ + required void Function(call_.Call call, jni.JObject iOException) onFailure, + required void Function(call_.Call call, response_.Response response) + onResponse, + }) = _$CallbackImpl; + + void onFailure(call_.Call call, jni.JObject iOException); + void onResponse(call_.Call call, response_.Response response); +} + +class _$CallbackImpl implements $CallbackImpl { + _$CallbackImpl({ + required void Function(call_.Call call, jni.JObject iOException) onFailure, + required void Function(call_.Call call, response_.Response response) + onResponse, + }) : _onFailure = onFailure, + _onResponse = onResponse; + + final void Function(call_.Call call, jni.JObject iOException) _onFailure; + final void Function(call_.Call call, response_.Response response) _onResponse; + + void onFailure(call_.Call call, jni.JObject iOException) { + return _onFailure(call, iOException); + } + + void onResponse(call_.Call call, response_.Response response) { + return _onResponse(call, response); + } +} + +final class $CallbackType extends jni.JObjType { + const $CallbackType(); + + @override + String get signature => r"Lokhttp3/Callback;"; + + @override + Callback fromReference(jni.JReference reference) => + Callback.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($CallbackType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($CallbackType) && other is $CallbackType; + } +} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/Headers.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/Headers.dart new file mode 100644 index 0000000000..620b00b576 --- /dev/null +++ b/pkgs/ok_http/lib/src/third_party/okhttp3/Headers.dart @@ -0,0 +1,1043 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +/// from: okhttp3.Headers$Builder +class Headers_Builder extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Headers_Builder.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Headers$Builder"); + + /// The type which includes information such as the signature of this class. + static const type = $Headers_BuilderType(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory Headers_Builder() { + return Headers_Builder.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_add = _class.instanceMethodId( + r"add", + r"(Ljava/lang/String;)Lokhttp3/Headers$Builder;", + ); + + static final _add = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder add(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder add( + jni.JString string, + ) { + return _add(reference.pointer, _id_add as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_add1 = _class.instanceMethodId( + r"add", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", + ); + + static final _add1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder add(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder add1( + jni.JString string, + jni.JString string1, + ) { + return _add1(reference.pointer, _id_add1 as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_addUnsafeNonAscii = _class.instanceMethodId( + r"addUnsafeNonAscii", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", + ); + + static final _addUnsafeNonAscii = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder addUnsafeNonAscii(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder addUnsafeNonAscii( + jni.JString string, + jni.JString string1, + ) { + return _addUnsafeNonAscii( + reference.pointer, + _id_addUnsafeNonAscii as jni.JMethodIDPtr, + string.reference.pointer, + string1.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_addAll = _class.instanceMethodId( + r"addAll", + r"(Lokhttp3/Headers;)Lokhttp3/Headers$Builder;", + ); + + static final _addAll = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder addAll(okhttp3.Headers headers) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder addAll( + Headers headers, + ) { + return _addAll(reference.pointer, _id_addAll as jni.JMethodIDPtr, + headers.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_add2 = _class.instanceMethodId( + r"add", + r"(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;", + ); + + static final _add2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder add(java.lang.String string, java.util.Date date) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder add2( + jni.JString string, + jni.JObject date, + ) { + return _add2(reference.pointer, _id_add2 as jni.JMethodIDPtr, + string.reference.pointer, date.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_add3 = _class.instanceMethodId( + r"add", + r"(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;", + ); + + static final _add3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder add(java.lang.String string, java.time.Instant instant) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder add3( + jni.JString string, + jni.JObject instant, + ) { + return _add3(reference.pointer, _id_add3 as jni.JMethodIDPtr, + string.reference.pointer, instant.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_set0 = _class.instanceMethodId( + r"set", + r"(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;", + ); + + static final _set0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder set(java.lang.String string, java.util.Date date) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder set0( + jni.JString string, + jni.JObject date, + ) { + return _set0(reference.pointer, _id_set0 as jni.JMethodIDPtr, + string.reference.pointer, date.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_set1 = _class.instanceMethodId( + r"set", + r"(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;", + ); + + static final _set1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder set(java.lang.String string, java.time.Instant instant) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder set1( + jni.JString string, + jni.JObject instant, + ) { + return _set1(reference.pointer, _id_set1 as jni.JMethodIDPtr, + string.reference.pointer, instant.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_removeAll = _class.instanceMethodId( + r"removeAll", + r"(Ljava/lang/String;)Lokhttp3/Headers$Builder;", + ); + + static final _removeAll = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder removeAll(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder removeAll( + jni.JString string, + ) { + return _removeAll(reference.pointer, _id_removeAll as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_set2 = _class.instanceMethodId( + r"set", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", + ); + + static final _set2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder set(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder set2( + jni.JString string, + jni.JString string1, + ) { + return _set2(reference.pointer, _id_set2 as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_get0 = _class.instanceMethodId( + r"get", + r"(Ljava/lang/String;)Ljava/lang/String;", + ); + + static final _get0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.lang.String get(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JString get0( + jni.JString string, + ) { + return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JStringType()); + } + + static final _id_build = _class.instanceMethodId( + r"build", + r"()Lokhttp3/Headers;", + ); + + static final _build = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Headers build() + /// The returned object must be released after use, by calling the [release] method. + Headers build() { + return _build(reference.pointer, _id_build as jni.JMethodIDPtr) + .object(const $HeadersType()); + } +} + +final class $Headers_BuilderType extends jni.JObjType { + const $Headers_BuilderType(); + + @override + String get signature => r"Lokhttp3/Headers$Builder;"; + + @override + Headers_Builder fromReference(jni.JReference reference) => + Headers_Builder.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($Headers_BuilderType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($Headers_BuilderType) && + other is $Headers_BuilderType; + } +} + +/// from: okhttp3.Headers$Companion +class Headers_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Headers_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Headers$Companion"); + + /// The type which includes information such as the signature of this class. + static const type = $Headers_CompanionType(); + static final _id_of = _class.instanceMethodId( + r"of", + r"([Ljava/lang/String;)Lokhttp3/Headers;", + ); + + static final _of = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.Headers of(java.lang.String[] strings) + /// The returned object must be released after use, by calling the [release] method. + Headers of( + jni.JArray strings, + ) { + return _of(reference.pointer, _id_of as jni.JMethodIDPtr, + strings.reference.pointer) + .object(const $HeadersType()); + } + + static final _id_of1 = _class.instanceMethodId( + r"of", + r"(Ljava/util/Map;)Lokhttp3/Headers;", + ); + + static final _of1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.Headers of(java.util.Map map) + /// The returned object must be released after use, by calling the [release] method. + Headers of1( + jni.JMap map, + ) { + return _of1(reference.pointer, _id_of1 as jni.JMethodIDPtr, + map.reference.pointer) + .object(const $HeadersType()); + } + + static final _id_new0 = _class.constructorId( + r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory Headers_Companion( + jni.JObject defaultConstructorMarker, + ) { + return Headers_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $Headers_CompanionType extends jni.JObjType { + const $Headers_CompanionType(); + + @override + String get signature => r"Lokhttp3/Headers$Companion;"; + + @override + Headers_Companion fromReference(jni.JReference reference) => + Headers_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($Headers_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($Headers_CompanionType) && + other is $Headers_CompanionType; + } +} + +/// from: okhttp3.Headers +class Headers extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Headers.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Headers"); + + /// The type which includes information such as the signature of this class. + static const type = $HeadersType(); + static final _id_Companion = _class.staticFieldId( + r"Companion", + r"Lokhttp3/Headers$Companion;", + ); + + /// from: static public final okhttp3.Headers$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static Headers_Companion get Companion => + _id_Companion.get(_class, const $Headers_CompanionType()); + + static final _id_get0 = _class.instanceMethodId( + r"get", + r"(Ljava/lang/String;)Ljava/lang/String;", + ); + + static final _get0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.lang.String get(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JString get0( + jni.JString string, + ) { + return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JStringType()); + } + + static final _id_getDate = _class.instanceMethodId( + r"getDate", + r"(Ljava/lang/String;)Ljava/util/Date;", + ); + + static final _getDate = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.util.Date getDate(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JObject getDate( + jni.JString string, + ) { + return _getDate(reference.pointer, _id_getDate as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JObjectType()); + } + + static final _id_getInstant = _class.instanceMethodId( + r"getInstant", + r"(Ljava/lang/String;)Ljava/time/Instant;", + ); + + static final _getInstant = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.time.Instant getInstant(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JObject getInstant( + jni.JString string, + ) { + return _getInstant(reference.pointer, _id_getInstant as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JObjectType()); + } + + static final _id_size = _class.instanceMethodId( + r"size", + r"()I", + ); + + static final _size = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int size() + int size() { + return _size(reference.pointer, _id_size as jni.JMethodIDPtr).integer; + } + + static final _id_name = _class.instanceMethodId( + r"name", + r"(I)Ljava/lang/String;", + ); + + static final _name = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final java.lang.String name(int i) + /// The returned object must be released after use, by calling the [release] method. + jni.JString name( + int i, + ) { + return _name(reference.pointer, _id_name as jni.JMethodIDPtr, i) + .object(const jni.JStringType()); + } + + static final _id_value = _class.instanceMethodId( + r"value", + r"(I)Ljava/lang/String;", + ); + + static final _value = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final java.lang.String value(int i) + /// The returned object must be released after use, by calling the [release] method. + jni.JString value( + int i, + ) { + return _value(reference.pointer, _id_value as jni.JMethodIDPtr, i) + .object(const jni.JStringType()); + } + + static final _id_names = _class.instanceMethodId( + r"names", + r"()Ljava/util/Set;", + ); + + static final _names = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.Set names() + /// The returned object must be released after use, by calling the [release] method. + jni.JSet names() { + return _names(reference.pointer, _id_names as jni.JMethodIDPtr) + .object(const jni.JSetType(jni.JStringType())); + } + + static final _id_values = _class.instanceMethodId( + r"values", + r"(Ljava/lang/String;)Ljava/util/List;", + ); + + static final _values = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.util.List values(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JList values( + jni.JString string, + ) { + return _values(reference.pointer, _id_values as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JListType(jni.JStringType())); + } + + static final _id_byteCount = _class.instanceMethodId( + r"byteCount", + r"()J", + ); + + static final _byteCount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final long byteCount() + int byteCount() { + return _byteCount(reference.pointer, _id_byteCount as jni.JMethodIDPtr) + .long; + } + + static final _id_iterator = _class.instanceMethodId( + r"iterator", + r"()Ljava/util/Iterator;", + ); + + static final _iterator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.util.Iterator iterator() + /// The returned object must be released after use, by calling the [release] method. + jni.JIterator iterator() { + return _iterator(reference.pointer, _id_iterator as jni.JMethodIDPtr) + .object(const jni.JIteratorType(jni.JObjectType())); + } + + static final _id_newBuilder = _class.instanceMethodId( + r"newBuilder", + r"()Lokhttp3/Headers$Builder;", + ); + + static final _newBuilder = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Headers$Builder newBuilder() + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder newBuilder() { + return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) + .object(const $Headers_BuilderType()); + } + + static final _id_equals = _class.instanceMethodId( + r"equals", + r"(Ljava/lang/Object;)Z", + ); + + static final _equals = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public boolean equals(java.lang.Object object) + bool equals( + jni.JObject object, + ) { + return _equals(reference.pointer, _id_equals as jni.JMethodIDPtr, + object.reference.pointer) + .boolean; + } + + static final _id_hashCode1 = _class.instanceMethodId( + r"hashCode", + r"()I", + ); + + static final _hashCode1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public int hashCode() + int hashCode1() { + return _hashCode1(reference.pointer, _id_hashCode1 as jni.JMethodIDPtr) + .integer; + } + + static final _id_toString1 = _class.instanceMethodId( + r"toString", + r"()Ljava/lang/String;", + ); + + static final _toString1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String toString() + /// The returned object must be released after use, by calling the [release] method. + jni.JString toString1() { + return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_toMultimap = _class.instanceMethodId( + r"toMultimap", + r"()Ljava/util/Map;", + ); + + static final _toMultimap = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.Map toMultimap() + /// The returned object must be released after use, by calling the [release] method. + jni.JMap> toMultimap() { + return _toMultimap(reference.pointer, _id_toMultimap as jni.JMethodIDPtr) + .object(const jni.JMapType( + jni.JStringType(), jni.JListType(jni.JStringType()))); + } + + static final _id_of = _class.staticMethodId( + r"of", + r"([Ljava/lang/String;)Lokhttp3/Headers;", + ); + + static final _of = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okhttp3.Headers of(java.lang.String[] strings) + /// The returned object must be released after use, by calling the [release] method. + static Headers of( + jni.JArray strings, + ) { + return _of(_class.reference.pointer, _id_of as jni.JMethodIDPtr, + strings.reference.pointer) + .object(const $HeadersType()); + } + + static final _id_of1 = _class.staticMethodId( + r"of", + r"(Ljava/util/Map;)Lokhttp3/Headers;", + ); + + static final _of1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okhttp3.Headers of(java.util.Map map) + /// The returned object must be released after use, by calling the [release] method. + static Headers of1( + jni.JMap map, + ) { + return _of1(_class.reference.pointer, _id_of1 as jni.JMethodIDPtr, + map.reference.pointer) + .object(const $HeadersType()); + } + + static final _id_new0 = _class.constructorId( + r"([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public void (java.lang.String[] strings, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory Headers( + jni.JArray strings, + jni.JObject defaultConstructorMarker, + ) { + return Headers.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + strings.reference.pointer, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $HeadersType extends jni.JObjType { + const $HeadersType(); + + @override + String get signature => r"Lokhttp3/Headers;"; + + @override + Headers fromReference(jni.JReference reference) => + Headers.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($HeadersType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($HeadersType) && other is $HeadersType; + } +} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/OkHttpClient.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/OkHttpClient.dart new file mode 100644 index 0000000000..1a68b3b2e0 --- /dev/null +++ b/pkgs/ok_http/lib/src/third_party/okhttp3/OkHttpClient.dart @@ -0,0 +1,2112 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +import "Request.dart" as request_; + +import "Call.dart" as call_; + +/// from: okhttp3.OkHttpClient$Builder +class OkHttpClient_Builder extends jni.JObject { + @override + late final jni.JObjType $type = type; + + OkHttpClient_Builder.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient$Builder"); + + /// The type which includes information such as the signature of this class. + static const type = $OkHttpClient_BuilderType(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory OkHttpClient_Builder() { + return OkHttpClient_Builder.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_new1 = _class.constructorId( + r"(Lokhttp3/OkHttpClient;)V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (okhttp3.OkHttpClient okHttpClient) + /// The returned object must be released after use, by calling the [release] method. + factory OkHttpClient_Builder.new1( + OkHttpClient okHttpClient, + ) { + return OkHttpClient_Builder.fromReference(_new1(_class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, okHttpClient.reference.pointer) + .reference); + } + + static final _id_dispatcher = _class.instanceMethodId( + r"dispatcher", + r"(Lokhttp3/Dispatcher;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _dispatcher = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder dispatcher(okhttp3.Dispatcher dispatcher) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder dispatcher( + jni.JObject dispatcher, + ) { + return _dispatcher(reference.pointer, _id_dispatcher as jni.JMethodIDPtr, + dispatcher.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_connectionPool = _class.instanceMethodId( + r"connectionPool", + r"(Lokhttp3/ConnectionPool;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _connectionPool = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder connectionPool(okhttp3.ConnectionPool connectionPool) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder connectionPool( + jni.JObject connectionPool, + ) { + return _connectionPool( + reference.pointer, + _id_connectionPool as jni.JMethodIDPtr, + connectionPool.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_interceptors = _class.instanceMethodId( + r"interceptors", + r"()Ljava/util/List;", + ); + + static final _interceptors = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List interceptors() + /// The returned object must be released after use, by calling the [release] method. + jni.JList interceptors() { + return _interceptors( + reference.pointer, _id_interceptors as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_addInterceptor = _class.instanceMethodId( + r"addInterceptor", + r"(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _addInterceptor = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder addInterceptor(okhttp3.Interceptor interceptor) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder addInterceptor( + jni.JObject interceptor, + ) { + return _addInterceptor( + reference.pointer, + _id_addInterceptor as jni.JMethodIDPtr, + interceptor.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_networkInterceptors = _class.instanceMethodId( + r"networkInterceptors", + r"()Ljava/util/List;", + ); + + static final _networkInterceptors = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List networkInterceptors() + /// The returned object must be released after use, by calling the [release] method. + jni.JList networkInterceptors() { + return _networkInterceptors( + reference.pointer, _id_networkInterceptors as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_addNetworkInterceptor = _class.instanceMethodId( + r"addNetworkInterceptor", + r"(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _addNetworkInterceptor = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder addNetworkInterceptor(okhttp3.Interceptor interceptor) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder addNetworkInterceptor( + jni.JObject interceptor, + ) { + return _addNetworkInterceptor( + reference.pointer, + _id_addNetworkInterceptor as jni.JMethodIDPtr, + interceptor.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_eventListener = _class.instanceMethodId( + r"eventListener", + r"(Lokhttp3/EventListener;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _eventListener = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder eventListener(okhttp3.EventListener eventListener) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder eventListener( + jni.JObject eventListener, + ) { + return _eventListener( + reference.pointer, + _id_eventListener as jni.JMethodIDPtr, + eventListener.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_eventListenerFactory = _class.instanceMethodId( + r"eventListenerFactory", + r"(Lokhttp3/EventListener$Factory;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _eventListenerFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder eventListenerFactory(okhttp3.EventListener$Factory factory) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder eventListenerFactory( + jni.JObject factory0, + ) { + return _eventListenerFactory( + reference.pointer, + _id_eventListenerFactory as jni.JMethodIDPtr, + factory0.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_retryOnConnectionFailure = _class.instanceMethodId( + r"retryOnConnectionFailure", + r"(Z)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final okhttp3.OkHttpClient$Builder retryOnConnectionFailure(boolean z) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder retryOnConnectionFailure( + bool z, + ) { + return _retryOnConnectionFailure(reference.pointer, + _id_retryOnConnectionFailure as jni.JMethodIDPtr, z ? 1 : 0) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_authenticator = _class.instanceMethodId( + r"authenticator", + r"(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _authenticator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder authenticator(okhttp3.Authenticator authenticator) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder authenticator( + jni.JObject authenticator, + ) { + return _authenticator( + reference.pointer, + _id_authenticator as jni.JMethodIDPtr, + authenticator.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_followRedirects = _class.instanceMethodId( + r"followRedirects", + r"(Z)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _followRedirects = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final okhttp3.OkHttpClient$Builder followRedirects(boolean z) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder followRedirects( + bool z, + ) { + return _followRedirects(reference.pointer, + _id_followRedirects as jni.JMethodIDPtr, z ? 1 : 0) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_followSslRedirects = _class.instanceMethodId( + r"followSslRedirects", + r"(Z)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _followSslRedirects = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final okhttp3.OkHttpClient$Builder followSslRedirects(boolean z) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder followSslRedirects( + bool z, + ) { + return _followSslRedirects(reference.pointer, + _id_followSslRedirects as jni.JMethodIDPtr, z ? 1 : 0) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_cookieJar = _class.instanceMethodId( + r"cookieJar", + r"(Lokhttp3/CookieJar;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _cookieJar = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder cookieJar(okhttp3.CookieJar cookieJar) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder cookieJar( + jni.JObject cookieJar, + ) { + return _cookieJar(reference.pointer, _id_cookieJar as jni.JMethodIDPtr, + cookieJar.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_cache = _class.instanceMethodId( + r"cache", + r"(Lokhttp3/Cache;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _cache = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder cache(okhttp3.Cache cache) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder cache( + jni.JObject cache, + ) { + return _cache(reference.pointer, _id_cache as jni.JMethodIDPtr, + cache.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_dns = _class.instanceMethodId( + r"dns", + r"(Lokhttp3/Dns;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _dns = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder dns(okhttp3.Dns dns) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder dns( + jni.JObject dns, + ) { + return _dns(reference.pointer, _id_dns as jni.JMethodIDPtr, + dns.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_proxy = _class.instanceMethodId( + r"proxy", + r"(Ljava/net/Proxy;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _proxy = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder proxy(java.net.Proxy proxy) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder proxy( + jni.JObject proxy, + ) { + return _proxy(reference.pointer, _id_proxy as jni.JMethodIDPtr, + proxy.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_proxySelector = _class.instanceMethodId( + r"proxySelector", + r"(Ljava/net/ProxySelector;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _proxySelector = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder proxySelector(java.net.ProxySelector proxySelector) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder proxySelector( + jni.JObject proxySelector, + ) { + return _proxySelector( + reference.pointer, + _id_proxySelector as jni.JMethodIDPtr, + proxySelector.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_proxyAuthenticator = _class.instanceMethodId( + r"proxyAuthenticator", + r"(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _proxyAuthenticator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder proxyAuthenticator(okhttp3.Authenticator authenticator) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder proxyAuthenticator( + jni.JObject authenticator, + ) { + return _proxyAuthenticator( + reference.pointer, + _id_proxyAuthenticator as jni.JMethodIDPtr, + authenticator.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_socketFactory = _class.instanceMethodId( + r"socketFactory", + r"(Ljavax/net/SocketFactory;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _socketFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder socketFactory(javax.net.SocketFactory socketFactory) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder socketFactory( + jni.JObject socketFactory, + ) { + return _socketFactory( + reference.pointer, + _id_socketFactory as jni.JMethodIDPtr, + socketFactory.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_sslSocketFactory = _class.instanceMethodId( + r"sslSocketFactory", + r"(Ljavax/net/ssl/SSLSocketFactory;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _sslSocketFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder sslSocketFactory(javax.net.ssl.SSLSocketFactory sSLSocketFactory) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder sslSocketFactory( + jni.JObject sSLSocketFactory, + ) { + return _sslSocketFactory( + reference.pointer, + _id_sslSocketFactory as jni.JMethodIDPtr, + sSLSocketFactory.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_sslSocketFactory1 = _class.instanceMethodId( + r"sslSocketFactory", + r"(Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/X509TrustManager;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _sslSocketFactory1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder sslSocketFactory(javax.net.ssl.SSLSocketFactory sSLSocketFactory, javax.net.ssl.X509TrustManager x509TrustManager) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder sslSocketFactory1( + jni.JObject sSLSocketFactory, + jni.JObject x509TrustManager, + ) { + return _sslSocketFactory1( + reference.pointer, + _id_sslSocketFactory1 as jni.JMethodIDPtr, + sSLSocketFactory.reference.pointer, + x509TrustManager.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_connectionSpecs = _class.instanceMethodId( + r"connectionSpecs", + r"(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _connectionSpecs = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder connectionSpecs(java.util.List list) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder connectionSpecs( + jni.JList list, + ) { + return _connectionSpecs(reference.pointer, + _id_connectionSpecs as jni.JMethodIDPtr, list.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_protocols = _class.instanceMethodId( + r"protocols", + r"(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _protocols = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder protocols(java.util.List list) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder protocols( + jni.JList list, + ) { + return _protocols(reference.pointer, _id_protocols as jni.JMethodIDPtr, + list.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_hostnameVerifier = _class.instanceMethodId( + r"hostnameVerifier", + r"(Ljavax/net/ssl/HostnameVerifier;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _hostnameVerifier = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder hostnameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder hostnameVerifier( + jni.JObject hostnameVerifier, + ) { + return _hostnameVerifier( + reference.pointer, + _id_hostnameVerifier as jni.JMethodIDPtr, + hostnameVerifier.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_certificatePinner = _class.instanceMethodId( + r"certificatePinner", + r"(Lokhttp3/CertificatePinner;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _certificatePinner = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder certificatePinner(okhttp3.CertificatePinner certificatePinner) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder certificatePinner( + jni.JObject certificatePinner, + ) { + return _certificatePinner( + reference.pointer, + _id_certificatePinner as jni.JMethodIDPtr, + certificatePinner.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_callTimeout = _class.instanceMethodId( + r"callTimeout", + r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _callTimeout = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder callTimeout(long j, java.util.concurrent.TimeUnit timeUnit) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder callTimeout( + int j, + jni.JObject timeUnit, + ) { + return _callTimeout(reference.pointer, _id_callTimeout as jni.JMethodIDPtr, + j, timeUnit.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_callTimeout1 = _class.instanceMethodId( + r"callTimeout", + r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _callTimeout1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder callTimeout(java.time.Duration duration) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder callTimeout1( + jni.JObject duration, + ) { + return _callTimeout1(reference.pointer, + _id_callTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_connectTimeout = _class.instanceMethodId( + r"connectTimeout", + r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _connectTimeout = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder connectTimeout(long j, java.util.concurrent.TimeUnit timeUnit) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder connectTimeout( + int j, + jni.JObject timeUnit, + ) { + return _connectTimeout( + reference.pointer, + _id_connectTimeout as jni.JMethodIDPtr, + j, + timeUnit.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_connectTimeout1 = _class.instanceMethodId( + r"connectTimeout", + r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _connectTimeout1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder connectTimeout(java.time.Duration duration) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder connectTimeout1( + jni.JObject duration, + ) { + return _connectTimeout1(reference.pointer, + _id_connectTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_readTimeout = _class.instanceMethodId( + r"readTimeout", + r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _readTimeout = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder readTimeout(long j, java.util.concurrent.TimeUnit timeUnit) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder readTimeout( + int j, + jni.JObject timeUnit, + ) { + return _readTimeout(reference.pointer, _id_readTimeout as jni.JMethodIDPtr, + j, timeUnit.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_readTimeout1 = _class.instanceMethodId( + r"readTimeout", + r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _readTimeout1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder readTimeout(java.time.Duration duration) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder readTimeout1( + jni.JObject duration, + ) { + return _readTimeout1(reference.pointer, + _id_readTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_writeTimeout = _class.instanceMethodId( + r"writeTimeout", + r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _writeTimeout = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder writeTimeout(long j, java.util.concurrent.TimeUnit timeUnit) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder writeTimeout( + int j, + jni.JObject timeUnit, + ) { + return _writeTimeout(reference.pointer, + _id_writeTimeout as jni.JMethodIDPtr, j, timeUnit.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_writeTimeout1 = _class.instanceMethodId( + r"writeTimeout", + r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _writeTimeout1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder writeTimeout(java.time.Duration duration) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder writeTimeout1( + jni.JObject duration, + ) { + return _writeTimeout1(reference.pointer, + _id_writeTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_pingInterval = _class.instanceMethodId( + r"pingInterval", + r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _pingInterval = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder pingInterval(long j, java.util.concurrent.TimeUnit timeUnit) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder pingInterval( + int j, + jni.JObject timeUnit, + ) { + return _pingInterval(reference.pointer, + _id_pingInterval as jni.JMethodIDPtr, j, timeUnit.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_pingInterval1 = _class.instanceMethodId( + r"pingInterval", + r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _pingInterval1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder pingInterval(java.time.Duration duration) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder pingInterval1( + jni.JObject duration, + ) { + return _pingInterval1(reference.pointer, + _id_pingInterval1 as jni.JMethodIDPtr, duration.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_minWebSocketMessageToCompress = _class.instanceMethodId( + r"minWebSocketMessageToCompress", + r"(J)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _minWebSocketMessageToCompress = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final okhttp3.OkHttpClient$Builder minWebSocketMessageToCompress(long j) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder minWebSocketMessageToCompress( + int j, + ) { + return _minWebSocketMessageToCompress(reference.pointer, + _id_minWebSocketMessageToCompress as jni.JMethodIDPtr, j) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_build = _class.instanceMethodId( + r"build", + r"()Lokhttp3/OkHttpClient;", + ); + + static final _build = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.OkHttpClient build() + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient build() { + return _build(reference.pointer, _id_build as jni.JMethodIDPtr) + .object(const $OkHttpClientType()); + } +} + +final class $OkHttpClient_BuilderType + extends jni.JObjType { + const $OkHttpClient_BuilderType(); + + @override + String get signature => r"Lokhttp3/OkHttpClient$Builder;"; + + @override + OkHttpClient_Builder fromReference(jni.JReference reference) => + OkHttpClient_Builder.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($OkHttpClient_BuilderType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($OkHttpClient_BuilderType) && + other is $OkHttpClient_BuilderType; + } +} + +/// from: okhttp3.OkHttpClient$Companion +class OkHttpClient_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + OkHttpClient_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient$Companion"); + + /// The type which includes information such as the signature of this class. + static const type = $OkHttpClient_CompanionType(); + static final _id_new0 = _class.constructorId( + r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory OkHttpClient_Companion( + jni.JObject defaultConstructorMarker, + ) { + return OkHttpClient_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $OkHttpClient_CompanionType + extends jni.JObjType { + const $OkHttpClient_CompanionType(); + + @override + String get signature => r"Lokhttp3/OkHttpClient$Companion;"; + + @override + OkHttpClient_Companion fromReference(jni.JReference reference) => + OkHttpClient_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($OkHttpClient_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($OkHttpClient_CompanionType) && + other is $OkHttpClient_CompanionType; + } +} + +/// from: okhttp3.OkHttpClient +class OkHttpClient extends jni.JObject { + @override + late final jni.JObjType $type = type; + + OkHttpClient.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient"); + + /// The type which includes information such as the signature of this class. + static const type = $OkHttpClientType(); + static final _id_Companion = _class.staticFieldId( + r"Companion", + r"Lokhttp3/OkHttpClient$Companion;", + ); + + /// from: static public final okhttp3.OkHttpClient$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static OkHttpClient_Companion get Companion => + _id_Companion.get(_class, const $OkHttpClient_CompanionType()); + + static final _id_new0 = _class.constructorId( + r"(Lokhttp3/OkHttpClient$Builder;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (okhttp3.OkHttpClient$Builder builder) + /// The returned object must be released after use, by calling the [release] method. + factory OkHttpClient( + OkHttpClient_Builder builder, + ) { + return OkHttpClient.fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, builder.reference.pointer) + .reference); + } + + static final _id_dispatcher = _class.instanceMethodId( + r"dispatcher", + r"()Lokhttp3/Dispatcher;", + ); + + static final _dispatcher = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Dispatcher dispatcher() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject dispatcher() { + return _dispatcher(reference.pointer, _id_dispatcher as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_connectionPool = _class.instanceMethodId( + r"connectionPool", + r"()Lokhttp3/ConnectionPool;", + ); + + static final _connectionPool = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.ConnectionPool connectionPool() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject connectionPool() { + return _connectionPool( + reference.pointer, _id_connectionPool as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_interceptors = _class.instanceMethodId( + r"interceptors", + r"()Ljava/util/List;", + ); + + static final _interceptors = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List interceptors() + /// The returned object must be released after use, by calling the [release] method. + jni.JList interceptors() { + return _interceptors( + reference.pointer, _id_interceptors as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_networkInterceptors = _class.instanceMethodId( + r"networkInterceptors", + r"()Ljava/util/List;", + ); + + static final _networkInterceptors = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List networkInterceptors() + /// The returned object must be released after use, by calling the [release] method. + jni.JList networkInterceptors() { + return _networkInterceptors( + reference.pointer, _id_networkInterceptors as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_eventListenerFactory = _class.instanceMethodId( + r"eventListenerFactory", + r"()Lokhttp3/EventListener$Factory;", + ); + + static final _eventListenerFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.EventListener$Factory eventListenerFactory() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject eventListenerFactory() { + return _eventListenerFactory( + reference.pointer, _id_eventListenerFactory as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_retryOnConnectionFailure = _class.instanceMethodId( + r"retryOnConnectionFailure", + r"()Z", + ); + + static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean retryOnConnectionFailure() + bool retryOnConnectionFailure() { + return _retryOnConnectionFailure( + reference.pointer, _id_retryOnConnectionFailure as jni.JMethodIDPtr) + .boolean; + } + + static final _id_authenticator = _class.instanceMethodId( + r"authenticator", + r"()Lokhttp3/Authenticator;", + ); + + static final _authenticator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Authenticator authenticator() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject authenticator() { + return _authenticator( + reference.pointer, _id_authenticator as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_followRedirects = _class.instanceMethodId( + r"followRedirects", + r"()Z", + ); + + static final _followRedirects = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean followRedirects() + bool followRedirects() { + return _followRedirects( + reference.pointer, _id_followRedirects as jni.JMethodIDPtr) + .boolean; + } + + static final _id_followSslRedirects = _class.instanceMethodId( + r"followSslRedirects", + r"()Z", + ); + + static final _followSslRedirects = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean followSslRedirects() + bool followSslRedirects() { + return _followSslRedirects( + reference.pointer, _id_followSslRedirects as jni.JMethodIDPtr) + .boolean; + } + + static final _id_cookieJar = _class.instanceMethodId( + r"cookieJar", + r"()Lokhttp3/CookieJar;", + ); + + static final _cookieJar = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.CookieJar cookieJar() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject cookieJar() { + return _cookieJar(reference.pointer, _id_cookieJar as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_cache = _class.instanceMethodId( + r"cache", + r"()Lokhttp3/Cache;", + ); + + static final _cache = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Cache cache() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject cache() { + return _cache(reference.pointer, _id_cache as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_dns = _class.instanceMethodId( + r"dns", + r"()Lokhttp3/Dns;", + ); + + static final _dns = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Dns dns() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject dns() { + return _dns(reference.pointer, _id_dns as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_proxy = _class.instanceMethodId( + r"proxy", + r"()Ljava/net/Proxy;", + ); + + static final _proxy = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.net.Proxy proxy() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject proxy() { + return _proxy(reference.pointer, _id_proxy as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_proxySelector = _class.instanceMethodId( + r"proxySelector", + r"()Ljava/net/ProxySelector;", + ); + + static final _proxySelector = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.net.ProxySelector proxySelector() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject proxySelector() { + return _proxySelector( + reference.pointer, _id_proxySelector as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_proxyAuthenticator = _class.instanceMethodId( + r"proxyAuthenticator", + r"()Lokhttp3/Authenticator;", + ); + + static final _proxyAuthenticator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Authenticator proxyAuthenticator() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject proxyAuthenticator() { + return _proxyAuthenticator( + reference.pointer, _id_proxyAuthenticator as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_socketFactory = _class.instanceMethodId( + r"socketFactory", + r"()Ljavax/net/SocketFactory;", + ); + + static final _socketFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final javax.net.SocketFactory socketFactory() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject socketFactory() { + return _socketFactory( + reference.pointer, _id_socketFactory as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_sslSocketFactory = _class.instanceMethodId( + r"sslSocketFactory", + r"()Ljavax/net/ssl/SSLSocketFactory;", + ); + + static final _sslSocketFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final javax.net.ssl.SSLSocketFactory sslSocketFactory() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject sslSocketFactory() { + return _sslSocketFactory( + reference.pointer, _id_sslSocketFactory as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_x509TrustManager = _class.instanceMethodId( + r"x509TrustManager", + r"()Ljavax/net/ssl/X509TrustManager;", + ); + + static final _x509TrustManager = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final javax.net.ssl.X509TrustManager x509TrustManager() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject x509TrustManager() { + return _x509TrustManager( + reference.pointer, _id_x509TrustManager as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_connectionSpecs = _class.instanceMethodId( + r"connectionSpecs", + r"()Ljava/util/List;", + ); + + static final _connectionSpecs = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List connectionSpecs() + /// The returned object must be released after use, by calling the [release] method. + jni.JList connectionSpecs() { + return _connectionSpecs( + reference.pointer, _id_connectionSpecs as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_protocols = _class.instanceMethodId( + r"protocols", + r"()Ljava/util/List;", + ); + + static final _protocols = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List protocols() + /// The returned object must be released after use, by calling the [release] method. + jni.JList protocols() { + return _protocols(reference.pointer, _id_protocols as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_hostnameVerifier = _class.instanceMethodId( + r"hostnameVerifier", + r"()Ljavax/net/ssl/HostnameVerifier;", + ); + + static final _hostnameVerifier = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final javax.net.ssl.HostnameVerifier hostnameVerifier() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject hostnameVerifier() { + return _hostnameVerifier( + reference.pointer, _id_hostnameVerifier as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_certificatePinner = _class.instanceMethodId( + r"certificatePinner", + r"()Lokhttp3/CertificatePinner;", + ); + + static final _certificatePinner = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.CertificatePinner certificatePinner() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject certificatePinner() { + return _certificatePinner( + reference.pointer, _id_certificatePinner as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_certificateChainCleaner = _class.instanceMethodId( + r"certificateChainCleaner", + r"()Lokhttp3/internal/tls/CertificateChainCleaner;", + ); + + static final _certificateChainCleaner = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.internal.tls.CertificateChainCleaner certificateChainCleaner() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject certificateChainCleaner() { + return _certificateChainCleaner( + reference.pointer, _id_certificateChainCleaner as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_callTimeoutMillis = _class.instanceMethodId( + r"callTimeoutMillis", + r"()I", + ); + + static final _callTimeoutMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int callTimeoutMillis() + int callTimeoutMillis() { + return _callTimeoutMillis( + reference.pointer, _id_callTimeoutMillis as jni.JMethodIDPtr) + .integer; + } + + static final _id_connectTimeoutMillis = _class.instanceMethodId( + r"connectTimeoutMillis", + r"()I", + ); + + static final _connectTimeoutMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int connectTimeoutMillis() + int connectTimeoutMillis() { + return _connectTimeoutMillis( + reference.pointer, _id_connectTimeoutMillis as jni.JMethodIDPtr) + .integer; + } + + static final _id_readTimeoutMillis = _class.instanceMethodId( + r"readTimeoutMillis", + r"()I", + ); + + static final _readTimeoutMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int readTimeoutMillis() + int readTimeoutMillis() { + return _readTimeoutMillis( + reference.pointer, _id_readTimeoutMillis as jni.JMethodIDPtr) + .integer; + } + + static final _id_writeTimeoutMillis = _class.instanceMethodId( + r"writeTimeoutMillis", + r"()I", + ); + + static final _writeTimeoutMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int writeTimeoutMillis() + int writeTimeoutMillis() { + return _writeTimeoutMillis( + reference.pointer, _id_writeTimeoutMillis as jni.JMethodIDPtr) + .integer; + } + + static final _id_pingIntervalMillis = _class.instanceMethodId( + r"pingIntervalMillis", + r"()I", + ); + + static final _pingIntervalMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int pingIntervalMillis() + int pingIntervalMillis() { + return _pingIntervalMillis( + reference.pointer, _id_pingIntervalMillis as jni.JMethodIDPtr) + .integer; + } + + static final _id_minWebSocketMessageToCompress = _class.instanceMethodId( + r"minWebSocketMessageToCompress", + r"()J", + ); + + static final _minWebSocketMessageToCompress = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final long minWebSocketMessageToCompress() + int minWebSocketMessageToCompress() { + return _minWebSocketMessageToCompress(reference.pointer, + _id_minWebSocketMessageToCompress as jni.JMethodIDPtr) + .long; + } + + static final _id_getRouteDatabase = _class.instanceMethodId( + r"getRouteDatabase", + r"()Lokhttp3/internal/connection/RouteDatabase;", + ); + + static final _getRouteDatabase = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.internal.connection.RouteDatabase getRouteDatabase() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject getRouteDatabase() { + return _getRouteDatabase( + reference.pointer, _id_getRouteDatabase as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_new1 = _class.constructorId( + r"()V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory OkHttpClient.new1() { + return OkHttpClient.fromReference( + _new1(_class.reference.pointer, _id_new1 as jni.JMethodIDPtr) + .reference); + } + + static final _id_newCall = _class.instanceMethodId( + r"newCall", + r"(Lokhttp3/Request;)Lokhttp3/Call;", + ); + + static final _newCall = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Call newCall(okhttp3.Request request) + /// The returned object must be released after use, by calling the [release] method. + call_.Call newCall( + request_.Request request, + ) { + return _newCall(reference.pointer, _id_newCall as jni.JMethodIDPtr, + request.reference.pointer) + .object(const call_.$CallType()); + } + + static final _id_newWebSocket = _class.instanceMethodId( + r"newWebSocket", + r"(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;", + ); + + static final _newWebSocket = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.WebSocket newWebSocket(okhttp3.Request request, okhttp3.WebSocketListener webSocketListener) + /// The returned object must be released after use, by calling the [release] method. + jni.JObject newWebSocket( + request_.Request request, + jni.JObject webSocketListener, + ) { + return _newWebSocket( + reference.pointer, + _id_newWebSocket as jni.JMethodIDPtr, + request.reference.pointer, + webSocketListener.reference.pointer) + .object(const jni.JObjectType()); + } + + static final _id_newBuilder = _class.instanceMethodId( + r"newBuilder", + r"()Lokhttp3/OkHttpClient$Builder;", + ); + + static final _newBuilder = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okhttp3.OkHttpClient$Builder newBuilder() + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder newBuilder() { + return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_clone = _class.instanceMethodId( + r"clone", + r"()Ljava/lang/Object;", + ); + + static final _clone = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.Object clone() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject clone() { + return _clone(reference.pointer, _id_clone as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } +} + +final class $OkHttpClientType extends jni.JObjType { + const $OkHttpClientType(); + + @override + String get signature => r"Lokhttp3/OkHttpClient;"; + + @override + OkHttpClient fromReference(jni.JReference reference) => + OkHttpClient.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($OkHttpClientType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($OkHttpClientType) && + other is $OkHttpClientType; + } +} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/Request.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/Request.dart new file mode 100644 index 0000000000..6b7c28d82e --- /dev/null +++ b/pkgs/ok_http/lib/src/third_party/okhttp3/Request.dart @@ -0,0 +1,1005 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +import "Headers.dart" as headers_; + +import "RequestBody.dart" as requestbody_; + +/// from: okhttp3.Request$Builder +class Request_Builder extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Request_Builder.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Request$Builder"); + + /// The type which includes information such as the signature of this class. + static const type = $Request_BuilderType(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory Request_Builder() { + return Request_Builder.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_new1 = _class.constructorId( + r"(Lokhttp3/Request;)V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (okhttp3.Request request) + /// The returned object must be released after use, by calling the [release] method. + factory Request_Builder.new1( + Request request, + ) { + return Request_Builder.fromReference(_new1(_class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, request.reference.pointer) + .reference); + } + + static final _id_url = _class.instanceMethodId( + r"url", + r"(Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder;", + ); + + static final _url = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder url(okhttp3.HttpUrl httpUrl) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder url( + jni.JObject httpUrl, + ) { + return _url(reference.pointer, _id_url as jni.JMethodIDPtr, + httpUrl.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_url1 = _class.instanceMethodId( + r"url", + r"(Ljava/lang/String;)Lokhttp3/Request$Builder;", + ); + + static final _url1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder url(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder url1( + jni.JString string, + ) { + return _url1(reference.pointer, _id_url1 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_url2 = _class.instanceMethodId( + r"url", + r"(Ljava/net/URL;)Lokhttp3/Request$Builder;", + ); + + static final _url2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder url(java.net.URL uRL) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder url2( + jni.JObject uRL, + ) { + return _url2(reference.pointer, _id_url2 as jni.JMethodIDPtr, + uRL.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_header = _class.instanceMethodId( + r"header", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;", + ); + + static final _header = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder header(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder header( + jni.JString string, + jni.JString string1, + ) { + return _header(reference.pointer, _id_header as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_addHeader = _class.instanceMethodId( + r"addHeader", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;", + ); + + static final _addHeader = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder addHeader(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder addHeader( + jni.JString string, + jni.JString string1, + ) { + return _addHeader(reference.pointer, _id_addHeader as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_removeHeader = _class.instanceMethodId( + r"removeHeader", + r"(Ljava/lang/String;)Lokhttp3/Request$Builder;", + ); + + static final _removeHeader = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder removeHeader(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder removeHeader( + jni.JString string, + ) { + return _removeHeader(reference.pointer, + _id_removeHeader as jni.JMethodIDPtr, string.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_headers = _class.instanceMethodId( + r"headers", + r"(Lokhttp3/Headers;)Lokhttp3/Request$Builder;", + ); + + static final _headers = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder headers(okhttp3.Headers headers) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder headers( + headers_.Headers headers, + ) { + return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr, + headers.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_cacheControl = _class.instanceMethodId( + r"cacheControl", + r"(Lokhttp3/CacheControl;)Lokhttp3/Request$Builder;", + ); + + static final _cacheControl = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder cacheControl(okhttp3.CacheControl cacheControl) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder cacheControl( + jni.JObject cacheControl, + ) { + return _cacheControl( + reference.pointer, + _id_cacheControl as jni.JMethodIDPtr, + cacheControl.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_get0 = _class.instanceMethodId( + r"get", + r"()Lokhttp3/Request$Builder;", + ); + + static final _get0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okhttp3.Request$Builder get() + /// The returned object must be released after use, by calling the [release] method. + Request_Builder get0() { + return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr) + .object(const $Request_BuilderType()); + } + + static final _id_head = _class.instanceMethodId( + r"head", + r"()Lokhttp3/Request$Builder;", + ); + + static final _head = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okhttp3.Request$Builder head() + /// The returned object must be released after use, by calling the [release] method. + Request_Builder head() { + return _head(reference.pointer, _id_head as jni.JMethodIDPtr) + .object(const $Request_BuilderType()); + } + + static final _id_post = _class.instanceMethodId( + r"post", + r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + ); + + static final _post = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder post(okhttp3.RequestBody requestBody) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder post( + requestbody_.RequestBody requestBody, + ) { + return _post(reference.pointer, _id_post as jni.JMethodIDPtr, + requestBody.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_delete = _class.instanceMethodId( + r"delete", + r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + ); + + static final _delete = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder delete(okhttp3.RequestBody requestBody) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder delete( + requestbody_.RequestBody requestBody, + ) { + return _delete(reference.pointer, _id_delete as jni.JMethodIDPtr, + requestBody.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_put = _class.instanceMethodId( + r"put", + r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + ); + + static final _put = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder put(okhttp3.RequestBody requestBody) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder put( + requestbody_.RequestBody requestBody, + ) { + return _put(reference.pointer, _id_put as jni.JMethodIDPtr, + requestBody.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_patch = _class.instanceMethodId( + r"patch", + r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + ); + + static final _patch = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder patch(okhttp3.RequestBody requestBody) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder patch( + requestbody_.RequestBody requestBody, + ) { + return _patch(reference.pointer, _id_patch as jni.JMethodIDPtr, + requestBody.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_method = _class.instanceMethodId( + r"method", + r"(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + ); + + static final _method = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder method(java.lang.String string, okhttp3.RequestBody requestBody) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder method( + jni.JString string, + requestbody_.RequestBody requestBody, + ) { + return _method(reference.pointer, _id_method as jni.JMethodIDPtr, + string.reference.pointer, requestBody.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_tag = _class.instanceMethodId( + r"tag", + r"(Ljava/lang/Object;)Lokhttp3/Request$Builder;", + ); + + static final _tag = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder tag(java.lang.Object object) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder tag( + jni.JObject object, + ) { + return _tag(reference.pointer, _id_tag as jni.JMethodIDPtr, + object.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_tag1 = _class.instanceMethodId( + r"tag", + r"(Ljava/lang/Class;Ljava/lang/Object;)Lokhttp3/Request$Builder;", + ); + + static final _tag1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder tag(java.lang.Class class, T object) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder tag1<$T extends jni.JObject>( + jni.JObject class0, + $T object, { + jni.JObjType<$T>? T, + }) { + T ??= jni.lowestCommonSuperType([ + object.$type, + ]) as jni.JObjType<$T>; + return _tag1(reference.pointer, _id_tag1 as jni.JMethodIDPtr, + class0.reference.pointer, object.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_build = _class.instanceMethodId( + r"build", + r"()Lokhttp3/Request;", + ); + + static final _build = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okhttp3.Request build() + /// The returned object must be released after use, by calling the [release] method. + Request build() { + return _build(reference.pointer, _id_build as jni.JMethodIDPtr) + .object(const $RequestType()); + } + + static final _id_delete1 = _class.instanceMethodId( + r"delete", + r"()Lokhttp3/Request$Builder;", + ); + + static final _delete1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Request$Builder delete() + /// The returned object must be released after use, by calling the [release] method. + Request_Builder delete1() { + return _delete1(reference.pointer, _id_delete1 as jni.JMethodIDPtr) + .object(const $Request_BuilderType()); + } +} + +final class $Request_BuilderType extends jni.JObjType { + const $Request_BuilderType(); + + @override + String get signature => r"Lokhttp3/Request$Builder;"; + + @override + Request_Builder fromReference(jni.JReference reference) => + Request_Builder.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($Request_BuilderType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($Request_BuilderType) && + other is $Request_BuilderType; + } +} + +/// from: okhttp3.Request +class Request extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Request.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Request"); + + /// The type which includes information such as the signature of this class. + static const type = $RequestType(); + static final _id_new0 = _class.constructorId( + r"(Lokhttp3/HttpUrl;Ljava/lang/String;Lokhttp3/Headers;Lokhttp3/RequestBody;Ljava/util/Map;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + /// from: public void (okhttp3.HttpUrl httpUrl, java.lang.String string, okhttp3.Headers headers, okhttp3.RequestBody requestBody, java.util.Map map) + /// The returned object must be released after use, by calling the [release] method. + factory Request( + jni.JObject httpUrl, + jni.JString string, + headers_.Headers headers, + requestbody_.RequestBody requestBody, + jni.JMap map, + ) { + return Request.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + httpUrl.reference.pointer, + string.reference.pointer, + headers.reference.pointer, + requestBody.reference.pointer, + map.reference.pointer) + .reference); + } + + static final _id_url = _class.instanceMethodId( + r"url", + r"()Lokhttp3/HttpUrl;", + ); + + static final _url = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.HttpUrl url() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject url() { + return _url(reference.pointer, _id_url as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_method = _class.instanceMethodId( + r"method", + r"()Ljava/lang/String;", + ); + + static final _method = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.lang.String method() + /// The returned object must be released after use, by calling the [release] method. + jni.JString method() { + return _method(reference.pointer, _id_method as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_headers = _class.instanceMethodId( + r"headers", + r"()Lokhttp3/Headers;", + ); + + static final _headers = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Headers headers() + /// The returned object must be released after use, by calling the [release] method. + headers_.Headers headers() { + return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr) + .object(const headers_.$HeadersType()); + } + + static final _id_body = _class.instanceMethodId( + r"body", + r"()Lokhttp3/RequestBody;", + ); + + static final _body = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.RequestBody body() + /// The returned object must be released after use, by calling the [release] method. + requestbody_.RequestBody body() { + return _body(reference.pointer, _id_body as jni.JMethodIDPtr) + .object(const requestbody_.$RequestBodyType()); + } + + static final _id_isHttps = _class.instanceMethodId( + r"isHttps", + r"()Z", + ); + + static final _isHttps = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean isHttps() + bool isHttps() { + return _isHttps(reference.pointer, _id_isHttps as jni.JMethodIDPtr).boolean; + } + + static final _id_header = _class.instanceMethodId( + r"header", + r"(Ljava/lang/String;)Ljava/lang/String;", + ); + + static final _header = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.lang.String header(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JString header( + jni.JString string, + ) { + return _header(reference.pointer, _id_header as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JStringType()); + } + + static final _id_headers1 = _class.instanceMethodId( + r"headers", + r"(Ljava/lang/String;)Ljava/util/List;", + ); + + static final _headers1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.util.List headers(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JList headers1( + jni.JString string, + ) { + return _headers1(reference.pointer, _id_headers1 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JListType(jni.JStringType())); + } + + static final _id_tag = _class.instanceMethodId( + r"tag", + r"()Ljava/lang/Object;", + ); + + static final _tag = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.lang.Object tag() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject tag() { + return _tag(reference.pointer, _id_tag as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_tag1 = _class.instanceMethodId( + r"tag", + r"(Ljava/lang/Class;)Ljava/lang/Object;", + ); + + static final _tag1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final T tag(java.lang.Class class) + /// The returned object must be released after use, by calling the [release] method. + $T tag1<$T extends jni.JObject>( + jni.JObject class0, { + required jni.JObjType<$T> T, + }) { + return _tag1(reference.pointer, _id_tag1 as jni.JMethodIDPtr, + class0.reference.pointer) + .object(T); + } + + static final _id_newBuilder = _class.instanceMethodId( + r"newBuilder", + r"()Lokhttp3/Request$Builder;", + ); + + static final _newBuilder = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Request$Builder newBuilder() + /// The returned object must be released after use, by calling the [release] method. + Request_Builder newBuilder() { + return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) + .object(const $Request_BuilderType()); + } + + static final _id_cacheControl = _class.instanceMethodId( + r"cacheControl", + r"()Lokhttp3/CacheControl;", + ); + + static final _cacheControl = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.CacheControl cacheControl() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject cacheControl() { + return _cacheControl( + reference.pointer, _id_cacheControl as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_toString1 = _class.instanceMethodId( + r"toString", + r"()Ljava/lang/String;", + ); + + static final _toString1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String toString() + /// The returned object must be released after use, by calling the [release] method. + jni.JString toString1() { + return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } +} + +final class $RequestType extends jni.JObjType { + const $RequestType(); + + @override + String get signature => r"Lokhttp3/Request;"; + + @override + Request fromReference(jni.JReference reference) => + Request.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($RequestType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($RequestType) && other is $RequestType; + } +} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/RequestBody.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/RequestBody.dart new file mode 100644 index 0000000000..53108d95b8 --- /dev/null +++ b/pkgs/ok_http/lib/src/third_party/okhttp3/RequestBody.dart @@ -0,0 +1,1080 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +/// from: okhttp3.RequestBody$Companion +class RequestBody_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + RequestBody_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/RequestBody$Companion"); + + /// The type which includes information such as the signature of this class. + static const type = $RequestBody_CompanionType(); + static final _id_create = _class.instanceMethodId( + r"create", + r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(java.lang.String string, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create( + jni.JString string, + jni.JObject mediaType, + ) { + return _create(reference.pointer, _id_create as jni.JMethodIDPtr, + string.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create1 = _class.instanceMethodId( + r"create", + r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create1( + jni.JObject byteString, + jni.JObject mediaType, + ) { + return _create1(reference.pointer, _id_create1 as jni.JMethodIDPtr, + byteString.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create2 = _class.instanceMethodId( + r"create", + r"([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;", + ); + + static final _create2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int, int)>(); + + /// from: public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create2( + jni.JArray bs, + jni.JObject mediaType, + int i, + int i1, + ) { + return _create2(reference.pointer, _id_create2 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer, i, i1) + .object(const $RequestBodyType()); + } + + static final _id_create3 = _class.instanceMethodId( + r"create", + r"(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(java.io.File file, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create3( + jni.JObject file, + jni.JObject mediaType, + ) { + return _create3(reference.pointer, _id_create3 as jni.JMethodIDPtr, + file.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create4 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;", + ); + + static final _create4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create4( + jni.JObject mediaType, + jni.JString string, + ) { + return _create4(reference.pointer, _id_create4 as jni.JMethodIDPtr, + mediaType.reference.pointer, string.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create5 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;", + ); + + static final _create5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create5( + jni.JObject mediaType, + jni.JObject byteString, + ) { + return _create5(reference.pointer, _id_create5 as jni.JMethodIDPtr, + mediaType.reference.pointer, byteString.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create6 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;", + ); + + static final _create6 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int, int)>(); + + /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create6( + jni.JObject mediaType, + jni.JArray bs, + int i, + int i1, + ) { + return _create6(reference.pointer, _id_create6 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer, i, i1) + .object(const $RequestBodyType()); + } + + static final _id_create7 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;", + ); + + static final _create7 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.io.File file) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create7( + jni.JObject mediaType, + jni.JObject file, + ) { + return _create7(reference.pointer, _id_create7 as jni.JMethodIDPtr, + mediaType.reference.pointer, file.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create8 = _class.instanceMethodId( + r"create", + r"([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;", + ); + + static final _create8 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); + + /// from: public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create8( + jni.JArray bs, + jni.JObject mediaType, + int i, + ) { + return _create8(reference.pointer, _id_create8 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer, i) + .object(const $RequestBodyType()); + } + + static final _id_create9 = _class.instanceMethodId( + r"create", + r"([BLokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create9 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create9( + jni.JArray bs, + jni.JObject mediaType, + ) { + return _create9(reference.pointer, _id_create9 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create10 = _class.instanceMethodId( + r"create", + r"([B)Lokhttp3/RequestBody;", + ); + + static final _create10 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create10( + jni.JArray bs, + ) { + return _create10(reference.pointer, _id_create10 as jni.JMethodIDPtr, + bs.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create11 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;", + ); + + static final _create11 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); + + /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create11( + jni.JObject mediaType, + jni.JArray bs, + int i, + ) { + return _create11(reference.pointer, _id_create11 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer, i) + .object(const $RequestBodyType()); + } + + static final _id_create12 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;", + ); + + static final _create12 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create12( + jni.JObject mediaType, + jni.JArray bs, + ) { + return _create12(reference.pointer, _id_create12 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_new0 = _class.constructorId( + r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory RequestBody_Companion( + jni.JObject defaultConstructorMarker, + ) { + return RequestBody_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $RequestBody_CompanionType + extends jni.JObjType { + const $RequestBody_CompanionType(); + + @override + String get signature => r"Lokhttp3/RequestBody$Companion;"; + + @override + RequestBody_Companion fromReference(jni.JReference reference) => + RequestBody_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($RequestBody_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($RequestBody_CompanionType) && + other is $RequestBody_CompanionType; + } +} + +/// from: okhttp3.RequestBody +class RequestBody extends jni.JObject { + @override + late final jni.JObjType $type = type; + + RequestBody.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/RequestBody"); + + /// The type which includes information such as the signature of this class. + static const type = $RequestBodyType(); + static final _id_Companion = _class.staticFieldId( + r"Companion", + r"Lokhttp3/RequestBody$Companion;", + ); + + /// from: static public final okhttp3.RequestBody$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static RequestBody_Companion get Companion => + _id_Companion.get(_class, const $RequestBody_CompanionType()); + + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory RequestBody() { + return RequestBody.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_contentType = _class.instanceMethodId( + r"contentType", + r"()Lokhttp3/MediaType;", + ); + + static final _contentType = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okhttp3.MediaType contentType() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject contentType() { + return _contentType(reference.pointer, _id_contentType as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_contentLength = _class.instanceMethodId( + r"contentLength", + r"()J", + ); + + static final _contentLength = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public long contentLength() + int contentLength() { + return _contentLength( + reference.pointer, _id_contentLength as jni.JMethodIDPtr) + .long; + } + + static final _id_writeTo = _class.instanceMethodId( + r"writeTo", + r"(Lokio/BufferedSink;)V", + ); + + static final _writeTo = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public abstract void writeTo(okio.BufferedSink bufferedSink) + void writeTo( + jni.JObject bufferedSink, + ) { + _writeTo(reference.pointer, _id_writeTo as jni.JMethodIDPtr, + bufferedSink.reference.pointer) + .check(); + } + + static final _id_isDuplex = _class.instanceMethodId( + r"isDuplex", + r"()Z", + ); + + static final _isDuplex = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public boolean isDuplex() + bool isDuplex() { + return _isDuplex(reference.pointer, _id_isDuplex as jni.JMethodIDPtr) + .boolean; + } + + static final _id_isOneShot = _class.instanceMethodId( + r"isOneShot", + r"()Z", + ); + + static final _isOneShot = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public boolean isOneShot() + bool isOneShot() { + return _isOneShot(reference.pointer, _id_isOneShot as jni.JMethodIDPtr) + .boolean; + } + + static final _id_create = _class.staticMethodId( + r"create", + r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(java.lang.String string, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create( + jni.JString string, + jni.JObject mediaType, + ) { + return _create(_class.reference.pointer, _id_create as jni.JMethodIDPtr, + string.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create1 = _class.staticMethodId( + r"create", + r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create1( + jni.JObject byteString, + jni.JObject mediaType, + ) { + return _create1(_class.reference.pointer, _id_create1 as jni.JMethodIDPtr, + byteString.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create2 = _class.staticMethodId( + r"create", + r"([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;", + ); + + static final _create2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int, int)>(); + + /// from: static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create2( + jni.JArray bs, + jni.JObject mediaType, + int i, + int i1, + ) { + return _create2(_class.reference.pointer, _id_create2 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer, i, i1) + .object(const $RequestBodyType()); + } + + static final _id_create3 = _class.staticMethodId( + r"create", + r"(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(java.io.File file, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create3( + jni.JObject file, + jni.JObject mediaType, + ) { + return _create3(_class.reference.pointer, _id_create3 as jni.JMethodIDPtr, + file.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create4 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;", + ); + + static final _create4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create4( + jni.JObject mediaType, + jni.JString string, + ) { + return _create4(_class.reference.pointer, _id_create4 as jni.JMethodIDPtr, + mediaType.reference.pointer, string.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create5 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;", + ); + + static final _create5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create5( + jni.JObject mediaType, + jni.JObject byteString, + ) { + return _create5(_class.reference.pointer, _id_create5 as jni.JMethodIDPtr, + mediaType.reference.pointer, byteString.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create6 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;", + ); + + static final _create6 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int, int)>(); + + /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create6( + jni.JObject mediaType, + jni.JArray bs, + int i, + int i1, + ) { + return _create6(_class.reference.pointer, _id_create6 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer, i, i1) + .object(const $RequestBodyType()); + } + + static final _id_create7 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;", + ); + + static final _create7 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.io.File file) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create7( + jni.JObject mediaType, + jni.JObject file, + ) { + return _create7(_class.reference.pointer, _id_create7 as jni.JMethodIDPtr, + mediaType.reference.pointer, file.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create8 = _class.staticMethodId( + r"create", + r"([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;", + ); + + static final _create8 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); + + /// from: static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create8( + jni.JArray bs, + jni.JObject mediaType, + int i, + ) { + return _create8(_class.reference.pointer, _id_create8 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer, i) + .object(const $RequestBodyType()); + } + + static final _id_create9 = _class.staticMethodId( + r"create", + r"([BLokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create9 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create9( + jni.JArray bs, + jni.JObject mediaType, + ) { + return _create9(_class.reference.pointer, _id_create9 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create10 = _class.staticMethodId( + r"create", + r"([B)Lokhttp3/RequestBody;", + ); + + static final _create10 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create10( + jni.JArray bs, + ) { + return _create10(_class.reference.pointer, _id_create10 as jni.JMethodIDPtr, + bs.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create11 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;", + ); + + static final _create11 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); + + /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create11( + jni.JObject mediaType, + jni.JArray bs, + int i, + ) { + return _create11(_class.reference.pointer, _id_create11 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer, i) + .object(const $RequestBodyType()); + } + + static final _id_create12 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;", + ); + + static final _create12 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create12( + jni.JObject mediaType, + jni.JArray bs, + ) { + return _create12(_class.reference.pointer, _id_create12 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer) + .object(const $RequestBodyType()); + } +} + +final class $RequestBodyType extends jni.JObjType { + const $RequestBodyType(); + + @override + String get signature => r"Lokhttp3/RequestBody;"; + + @override + RequestBody fromReference(jni.JReference reference) => + RequestBody.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($RequestBodyType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($RequestBodyType) && other is $RequestBodyType; + } +} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/Response.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/Response.dart new file mode 100644 index 0000000000..49d50c9549 --- /dev/null +++ b/pkgs/ok_http/lib/src/third_party/okhttp3/Response.dart @@ -0,0 +1,1256 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +import "Request.dart" as request_; + +import "Headers.dart" as headers_; + +import "ResponseBody.dart" as responsebody_; + +/// from: okhttp3.Response$Builder +class Response_Builder extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Response_Builder.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Response$Builder"); + + /// The type which includes information such as the signature of this class. + static const type = $Response_BuilderType(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory Response_Builder() { + return Response_Builder.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_new1 = _class.constructorId( + r"(Lokhttp3/Response;)V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (okhttp3.Response response) + /// The returned object must be released after use, by calling the [release] method. + factory Response_Builder.new1( + Response response, + ) { + return Response_Builder.fromReference(_new1(_class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, response.reference.pointer) + .reference); + } + + static final _id_request = _class.instanceMethodId( + r"request", + r"(Lokhttp3/Request;)Lokhttp3/Response$Builder;", + ); + + static final _request = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder request(okhttp3.Request request) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder request( + request_.Request request, + ) { + return _request(reference.pointer, _id_request as jni.JMethodIDPtr, + request.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_protocol = _class.instanceMethodId( + r"protocol", + r"(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;", + ); + + static final _protocol = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder protocol(okhttp3.Protocol protocol) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder protocol( + jni.JObject protocol, + ) { + return _protocol(reference.pointer, _id_protocol as jni.JMethodIDPtr, + protocol.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_code = _class.instanceMethodId( + r"code", + r"(I)Lokhttp3/Response$Builder;", + ); + + static final _code = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public okhttp3.Response$Builder code(int i) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder code( + int i, + ) { + return _code(reference.pointer, _id_code as jni.JMethodIDPtr, i) + .object(const $Response_BuilderType()); + } + + static final _id_message = _class.instanceMethodId( + r"message", + r"(Ljava/lang/String;)Lokhttp3/Response$Builder;", + ); + + static final _message = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder message(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder message( + jni.JString string, + ) { + return _message(reference.pointer, _id_message as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_handshake = _class.instanceMethodId( + r"handshake", + r"(Lokhttp3/Handshake;)Lokhttp3/Response$Builder;", + ); + + static final _handshake = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder handshake(okhttp3.Handshake handshake) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder handshake( + jni.JObject handshake, + ) { + return _handshake(reference.pointer, _id_handshake as jni.JMethodIDPtr, + handshake.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_header = _class.instanceMethodId( + r"header", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;", + ); + + static final _header = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder header(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder header( + jni.JString string, + jni.JString string1, + ) { + return _header(reference.pointer, _id_header as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_addHeader = _class.instanceMethodId( + r"addHeader", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;", + ); + + static final _addHeader = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder addHeader(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder addHeader( + jni.JString string, + jni.JString string1, + ) { + return _addHeader(reference.pointer, _id_addHeader as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_removeHeader = _class.instanceMethodId( + r"removeHeader", + r"(Ljava/lang/String;)Lokhttp3/Response$Builder;", + ); + + static final _removeHeader = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder removeHeader(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder removeHeader( + jni.JString string, + ) { + return _removeHeader(reference.pointer, + _id_removeHeader as jni.JMethodIDPtr, string.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_headers = _class.instanceMethodId( + r"headers", + r"(Lokhttp3/Headers;)Lokhttp3/Response$Builder;", + ); + + static final _headers = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder headers(okhttp3.Headers headers) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder headers( + headers_.Headers headers, + ) { + return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr, + headers.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_body = _class.instanceMethodId( + r"body", + r"(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;", + ); + + static final _body = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder body(okhttp3.ResponseBody responseBody) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder body( + responsebody_.ResponseBody responseBody, + ) { + return _body(reference.pointer, _id_body as jni.JMethodIDPtr, + responseBody.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_networkResponse = _class.instanceMethodId( + r"networkResponse", + r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", + ); + + static final _networkResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder networkResponse(okhttp3.Response response) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder networkResponse( + Response response, + ) { + return _networkResponse(reference.pointer, + _id_networkResponse as jni.JMethodIDPtr, response.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_cacheResponse = _class.instanceMethodId( + r"cacheResponse", + r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", + ); + + static final _cacheResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder cacheResponse(okhttp3.Response response) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder cacheResponse( + Response response, + ) { + return _cacheResponse(reference.pointer, + _id_cacheResponse as jni.JMethodIDPtr, response.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_priorResponse = _class.instanceMethodId( + r"priorResponse", + r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", + ); + + static final _priorResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder priorResponse(okhttp3.Response response) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder priorResponse( + Response response, + ) { + return _priorResponse(reference.pointer, + _id_priorResponse as jni.JMethodIDPtr, response.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_sentRequestAtMillis = _class.instanceMethodId( + r"sentRequestAtMillis", + r"(J)Lokhttp3/Response$Builder;", + ); + + static final _sentRequestAtMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public okhttp3.Response$Builder sentRequestAtMillis(long j) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder sentRequestAtMillis( + int j, + ) { + return _sentRequestAtMillis( + reference.pointer, _id_sentRequestAtMillis as jni.JMethodIDPtr, j) + .object(const $Response_BuilderType()); + } + + static final _id_receivedResponseAtMillis = _class.instanceMethodId( + r"receivedResponseAtMillis", + r"(J)Lokhttp3/Response$Builder;", + ); + + static final _receivedResponseAtMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public okhttp3.Response$Builder receivedResponseAtMillis(long j) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder receivedResponseAtMillis( + int j, + ) { + return _receivedResponseAtMillis(reference.pointer, + _id_receivedResponseAtMillis as jni.JMethodIDPtr, j) + .object(const $Response_BuilderType()); + } + + static final _id_build = _class.instanceMethodId( + r"build", + r"()Lokhttp3/Response;", + ); + + static final _build = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okhttp3.Response build() + /// The returned object must be released after use, by calling the [release] method. + Response build() { + return _build(reference.pointer, _id_build as jni.JMethodIDPtr) + .object(const $ResponseType()); + } +} + +final class $Response_BuilderType extends jni.JObjType { + const $Response_BuilderType(); + + @override + String get signature => r"Lokhttp3/Response$Builder;"; + + @override + Response_Builder fromReference(jni.JReference reference) => + Response_Builder.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($Response_BuilderType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($Response_BuilderType) && + other is $Response_BuilderType; + } +} + +/// from: okhttp3.Response +class Response extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Response.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Response"); + + /// The type which includes information such as the signature of this class. + static const type = $ResponseType(); + static final _id_new0 = _class.constructorId( + r"(Lokhttp3/Request;Lokhttp3/Protocol;Ljava/lang/String;ILokhttp3/Handshake;Lokhttp3/Headers;Lokhttp3/ResponseBody;Lokhttp3/Response;Lokhttp3/Response;Lokhttp3/Response;JJLokhttp3/internal/connection/Exchange;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); + + /// from: public void (okhttp3.Request request, okhttp3.Protocol protocol, java.lang.String string, int i, okhttp3.Handshake handshake, okhttp3.Headers headers, okhttp3.ResponseBody responseBody, okhttp3.Response response, okhttp3.Response response1, okhttp3.Response response2, long j, long j1, okhttp3.internal.connection.Exchange exchange) + /// The returned object must be released after use, by calling the [release] method. + factory Response( + request_.Request request, + jni.JObject protocol, + jni.JString string, + int i, + jni.JObject handshake, + headers_.Headers headers, + responsebody_.ResponseBody responseBody, + Response response, + Response response1, + Response response2, + int j, + int j1, + jni.JObject exchange, + ) { + return Response.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + request.reference.pointer, + protocol.reference.pointer, + string.reference.pointer, + i, + handshake.reference.pointer, + headers.reference.pointer, + responseBody.reference.pointer, + response.reference.pointer, + response1.reference.pointer, + response2.reference.pointer, + j, + j1, + exchange.reference.pointer) + .reference); + } + + static final _id_request = _class.instanceMethodId( + r"request", + r"()Lokhttp3/Request;", + ); + + static final _request = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Request request() + /// The returned object must be released after use, by calling the [release] method. + request_.Request request() { + return _request(reference.pointer, _id_request as jni.JMethodIDPtr) + .object(const request_.$RequestType()); + } + + static final _id_protocol = _class.instanceMethodId( + r"protocol", + r"()Lokhttp3/Protocol;", + ); + + static final _protocol = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Protocol protocol() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject protocol() { + return _protocol(reference.pointer, _id_protocol as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_message = _class.instanceMethodId( + r"message", + r"()Ljava/lang/String;", + ); + + static final _message = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.lang.String message() + /// The returned object must be released after use, by calling the [release] method. + jni.JString message() { + return _message(reference.pointer, _id_message as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_code = _class.instanceMethodId( + r"code", + r"()I", + ); + + static final _code = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int code() + int code() { + return _code(reference.pointer, _id_code as jni.JMethodIDPtr).integer; + } + + static final _id_handshake = _class.instanceMethodId( + r"handshake", + r"()Lokhttp3/Handshake;", + ); + + static final _handshake = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Handshake handshake() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject handshake() { + return _handshake(reference.pointer, _id_handshake as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_headers = _class.instanceMethodId( + r"headers", + r"()Lokhttp3/Headers;", + ); + + static final _headers = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Headers headers() + /// The returned object must be released after use, by calling the [release] method. + headers_.Headers headers() { + return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr) + .object(const headers_.$HeadersType()); + } + + static final _id_body = _class.instanceMethodId( + r"body", + r"()Lokhttp3/ResponseBody;", + ); + + static final _body = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.ResponseBody body() + /// The returned object must be released after use, by calling the [release] method. + responsebody_.ResponseBody body() { + return _body(reference.pointer, _id_body as jni.JMethodIDPtr) + .object(const responsebody_.$ResponseBodyType()); + } + + static final _id_networkResponse = _class.instanceMethodId( + r"networkResponse", + r"()Lokhttp3/Response;", + ); + + static final _networkResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Response networkResponse() + /// The returned object must be released after use, by calling the [release] method. + Response networkResponse() { + return _networkResponse( + reference.pointer, _id_networkResponse as jni.JMethodIDPtr) + .object(const $ResponseType()); + } + + static final _id_cacheResponse = _class.instanceMethodId( + r"cacheResponse", + r"()Lokhttp3/Response;", + ); + + static final _cacheResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Response cacheResponse() + /// The returned object must be released after use, by calling the [release] method. + Response cacheResponse() { + return _cacheResponse( + reference.pointer, _id_cacheResponse as jni.JMethodIDPtr) + .object(const $ResponseType()); + } + + static final _id_priorResponse = _class.instanceMethodId( + r"priorResponse", + r"()Lokhttp3/Response;", + ); + + static final _priorResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Response priorResponse() + /// The returned object must be released after use, by calling the [release] method. + Response priorResponse() { + return _priorResponse( + reference.pointer, _id_priorResponse as jni.JMethodIDPtr) + .object(const $ResponseType()); + } + + static final _id_sentRequestAtMillis = _class.instanceMethodId( + r"sentRequestAtMillis", + r"()J", + ); + + static final _sentRequestAtMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final long sentRequestAtMillis() + int sentRequestAtMillis() { + return _sentRequestAtMillis( + reference.pointer, _id_sentRequestAtMillis as jni.JMethodIDPtr) + .long; + } + + static final _id_receivedResponseAtMillis = _class.instanceMethodId( + r"receivedResponseAtMillis", + r"()J", + ); + + static final _receivedResponseAtMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final long receivedResponseAtMillis() + int receivedResponseAtMillis() { + return _receivedResponseAtMillis( + reference.pointer, _id_receivedResponseAtMillis as jni.JMethodIDPtr) + .long; + } + + static final _id_exchange = _class.instanceMethodId( + r"exchange", + r"()Lokhttp3/internal/connection/Exchange;", + ); + + static final _exchange = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.internal.connection.Exchange exchange() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject exchange() { + return _exchange(reference.pointer, _id_exchange as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_isSuccessful = _class.instanceMethodId( + r"isSuccessful", + r"()Z", + ); + + static final _isSuccessful = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean isSuccessful() + bool isSuccessful() { + return _isSuccessful( + reference.pointer, _id_isSuccessful as jni.JMethodIDPtr) + .boolean; + } + + static final _id_headers1 = _class.instanceMethodId( + r"headers", + r"(Ljava/lang/String;)Ljava/util/List;", + ); + + static final _headers1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.util.List headers(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JList headers1( + jni.JString string, + ) { + return _headers1(reference.pointer, _id_headers1 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JListType(jni.JStringType())); + } + + static final _id_header = _class.instanceMethodId( + r"header", + r"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", + ); + + static final _header = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final java.lang.String header(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + jni.JString header( + jni.JString string, + jni.JString string1, + ) { + return _header(reference.pointer, _id_header as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const jni.JStringType()); + } + + static final _id_trailers = _class.instanceMethodId( + r"trailers", + r"()Lokhttp3/Headers;", + ); + + static final _trailers = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Headers trailers() + /// The returned object must be released after use, by calling the [release] method. + headers_.Headers trailers() { + return _trailers(reference.pointer, _id_trailers as jni.JMethodIDPtr) + .object(const headers_.$HeadersType()); + } + + static final _id_peekBody = _class.instanceMethodId( + r"peekBody", + r"(J)Lokhttp3/ResponseBody;", + ); + + static final _peekBody = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final okhttp3.ResponseBody peekBody(long j) + /// The returned object must be released after use, by calling the [release] method. + responsebody_.ResponseBody peekBody( + int j, + ) { + return _peekBody(reference.pointer, _id_peekBody as jni.JMethodIDPtr, j) + .object(const responsebody_.$ResponseBodyType()); + } + + static final _id_newBuilder = _class.instanceMethodId( + r"newBuilder", + r"()Lokhttp3/Response$Builder;", + ); + + static final _newBuilder = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Response$Builder newBuilder() + /// The returned object must be released after use, by calling the [release] method. + Response_Builder newBuilder() { + return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) + .object(const $Response_BuilderType()); + } + + static final _id_isRedirect = _class.instanceMethodId( + r"isRedirect", + r"()Z", + ); + + static final _isRedirect = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean isRedirect() + bool isRedirect() { + return _isRedirect(reference.pointer, _id_isRedirect as jni.JMethodIDPtr) + .boolean; + } + + static final _id_challenges = _class.instanceMethodId( + r"challenges", + r"()Ljava/util/List;", + ); + + static final _challenges = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List challenges() + /// The returned object must be released after use, by calling the [release] method. + jni.JList challenges() { + return _challenges(reference.pointer, _id_challenges as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_cacheControl = _class.instanceMethodId( + r"cacheControl", + r"()Lokhttp3/CacheControl;", + ); + + static final _cacheControl = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.CacheControl cacheControl() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject cacheControl() { + return _cacheControl( + reference.pointer, _id_cacheControl as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_close = _class.instanceMethodId( + r"close", + r"()V", + ); + + static final _close = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void close() + void close() { + _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); + } + + static final _id_toString1 = _class.instanceMethodId( + r"toString", + r"()Ljava/lang/String;", + ); + + static final _toString1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String toString() + /// The returned object must be released after use, by calling the [release] method. + jni.JString toString1() { + return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_header1 = _class.instanceMethodId( + r"header", + r"(Ljava/lang/String;)Ljava/lang/String;", + ); + + static final _header1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.lang.String header(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JString header1( + jni.JString string, + ) { + return _header1(reference.pointer, _id_header1 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JStringType()); + } +} + +final class $ResponseType extends jni.JObjType { + const $ResponseType(); + + @override + String get signature => r"Lokhttp3/Response;"; + + @override + Response fromReference(jni.JReference reference) => + Response.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ResponseType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ResponseType) && other is $ResponseType; + } +} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/ResponseBody.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/ResponseBody.dart new file mode 100644 index 0000000000..70514819d4 --- /dev/null +++ b/pkgs/ok_http/lib/src/third_party/okhttp3/ResponseBody.dart @@ -0,0 +1,995 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +/// from: okhttp3.ResponseBody$BomAwareReader +class ResponseBody_BomAwareReader extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ResponseBody_BomAwareReader.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r"okhttp3/ResponseBody$BomAwareReader"); + + /// The type which includes information such as the signature of this class. + static const type = $ResponseBody_BomAwareReaderType(); + static final _id_new0 = _class.constructorId( + r"(Lokio/BufferedSource;Ljava/nio/charset/Charset;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public void (okio.BufferedSource bufferedSource, java.nio.charset.Charset charset) + /// The returned object must be released after use, by calling the [release] method. + factory ResponseBody_BomAwareReader( + jni.JObject bufferedSource, + jni.JObject charset, + ) { + return ResponseBody_BomAwareReader.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + bufferedSource.reference.pointer, + charset.reference.pointer) + .reference); + } + + static final _id_read = _class.instanceMethodId( + r"read", + r"([CII)I", + ); + + static final _read = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); + + /// from: public int read(char[] cs, int i, int i1) + int read( + jni.JArray cs, + int i, + int i1, + ) { + return _read(reference.pointer, _id_read as jni.JMethodIDPtr, + cs.reference.pointer, i, i1) + .integer; + } + + static final _id_close = _class.instanceMethodId( + r"close", + r"()V", + ); + + static final _close = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void close() + void close() { + _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); + } +} + +final class $ResponseBody_BomAwareReaderType + extends jni.JObjType { + const $ResponseBody_BomAwareReaderType(); + + @override + String get signature => r"Lokhttp3/ResponseBody$BomAwareReader;"; + + @override + ResponseBody_BomAwareReader fromReference(jni.JReference reference) => + ResponseBody_BomAwareReader.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ResponseBody_BomAwareReaderType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ResponseBody_BomAwareReaderType) && + other is $ResponseBody_BomAwareReaderType; + } +} + +/// from: okhttp3.ResponseBody$Companion +class ResponseBody_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ResponseBody_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/ResponseBody$Companion"); + + /// The type which includes information such as the signature of this class. + static const type = $ResponseBody_CompanionType(); + static final _id_create = _class.instanceMethodId( + r"create", + r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + ); + + static final _create = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(java.lang.String string, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create( + jni.JString string, + jni.JObject mediaType, + ) { + return _create(reference.pointer, _id_create as jni.JMethodIDPtr, + string.reference.pointer, mediaType.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create1 = _class.instanceMethodId( + r"create", + r"([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;", + ); + + static final _create1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(byte[] bs, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create1( + jni.JArray bs, + jni.JObject mediaType, + ) { + return _create1(reference.pointer, _id_create1 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create2 = _class.instanceMethodId( + r"create", + r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + ); + + static final _create2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create2( + jni.JObject byteString, + jni.JObject mediaType, + ) { + return _create2(reference.pointer, _id_create2 as jni.JMethodIDPtr, + byteString.reference.pointer, mediaType.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create3 = _class.instanceMethodId( + r"create", + r"(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;", + ); + + static final _create3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); + + /// from: public final okhttp3.ResponseBody create(okio.BufferedSource bufferedSource, okhttp3.MediaType mediaType, long j) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create3( + jni.JObject bufferedSource, + jni.JObject mediaType, + int j, + ) { + return _create3(reference.pointer, _id_create3 as jni.JMethodIDPtr, + bufferedSource.reference.pointer, mediaType.reference.pointer, j) + .object(const $ResponseBodyType()); + } + + static final _id_create4 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;", + ); + + static final _create4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create4( + jni.JObject mediaType, + jni.JString string, + ) { + return _create4(reference.pointer, _id_create4 as jni.JMethodIDPtr, + mediaType.reference.pointer, string.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create5 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;", + ); + + static final _create5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create5( + jni.JObject mediaType, + jni.JArray bs, + ) { + return _create5(reference.pointer, _id_create5 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create6 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;", + ); + + static final _create6 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create6( + jni.JObject mediaType, + jni.JObject byteString, + ) { + return _create6(reference.pointer, _id_create6 as jni.JMethodIDPtr, + mediaType.reference.pointer, byteString.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create7 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;", + ); + + static final _create7 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, long j, okio.BufferedSource bufferedSource) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create7( + jni.JObject mediaType, + int j, + jni.JObject bufferedSource, + ) { + return _create7(reference.pointer, _id_create7 as jni.JMethodIDPtr, + mediaType.reference.pointer, j, bufferedSource.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_new0 = _class.constructorId( + r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory ResponseBody_Companion( + jni.JObject defaultConstructorMarker, + ) { + return ResponseBody_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $ResponseBody_CompanionType + extends jni.JObjType { + const $ResponseBody_CompanionType(); + + @override + String get signature => r"Lokhttp3/ResponseBody$Companion;"; + + @override + ResponseBody_Companion fromReference(jni.JReference reference) => + ResponseBody_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ResponseBody_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ResponseBody_CompanionType) && + other is $ResponseBody_CompanionType; + } +} + +/// from: okhttp3.ResponseBody +class ResponseBody extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ResponseBody.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/ResponseBody"); + + /// The type which includes information such as the signature of this class. + static const type = $ResponseBodyType(); + static final _id_Companion = _class.staticFieldId( + r"Companion", + r"Lokhttp3/ResponseBody$Companion;", + ); + + /// from: static public final okhttp3.ResponseBody$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody_Companion get Companion => + _id_Companion.get(_class, const $ResponseBody_CompanionType()); + + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory ResponseBody() { + return ResponseBody.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_contentType = _class.instanceMethodId( + r"contentType", + r"()Lokhttp3/MediaType;", + ); + + static final _contentType = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okhttp3.MediaType contentType() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject contentType() { + return _contentType(reference.pointer, _id_contentType as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_contentLength = _class.instanceMethodId( + r"contentLength", + r"()J", + ); + + static final _contentLength = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract long contentLength() + int contentLength() { + return _contentLength( + reference.pointer, _id_contentLength as jni.JMethodIDPtr) + .long; + } + + static final _id_byteStream = _class.instanceMethodId( + r"byteStream", + r"()Ljava/io/InputStream;", + ); + + static final _byteStream = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.io.InputStream byteStream() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject byteStream() { + return _byteStream(reference.pointer, _id_byteStream as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_source = _class.instanceMethodId( + r"source", + r"()Lokio/BufferedSource;", + ); + + static final _source = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okio.BufferedSource source() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject source() { + return _source(reference.pointer, _id_source as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_bytes = _class.instanceMethodId( + r"bytes", + r"()[B", + ); + + static final _bytes = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final byte[] bytes() + /// The returned object must be released after use, by calling the [release] method. + jni.JArray bytes() { + return _bytes(reference.pointer, _id_bytes as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.jbyteType())); + } + + static final _id_byteString = _class.instanceMethodId( + r"byteString", + r"()Lokio/ByteString;", + ); + + static final _byteString = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okio.ByteString byteString() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject byteString() { + return _byteString(reference.pointer, _id_byteString as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_charStream = _class.instanceMethodId( + r"charStream", + r"()Ljava/io/Reader;", + ); + + static final _charStream = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.io.Reader charStream() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject charStream() { + return _charStream(reference.pointer, _id_charStream as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_string = _class.instanceMethodId( + r"string", + r"()Ljava/lang/String;", + ); + + static final _string = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.lang.String string() + /// The returned object must be released after use, by calling the [release] method. + jni.JString string() { + return _string(reference.pointer, _id_string as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_close = _class.instanceMethodId( + r"close", + r"()V", + ); + + static final _close = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void close() + void close() { + _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); + } + + static final _id_create = _class.staticMethodId( + r"create", + r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + ); + + static final _create = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(java.lang.String string, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create( + jni.JString string, + jni.JObject mediaType, + ) { + return _create(_class.reference.pointer, _id_create as jni.JMethodIDPtr, + string.reference.pointer, mediaType.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create1 = _class.staticMethodId( + r"create", + r"([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;", + ); + + static final _create1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(byte[] bs, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create1( + jni.JArray bs, + jni.JObject mediaType, + ) { + return _create1(_class.reference.pointer, _id_create1 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create2 = _class.staticMethodId( + r"create", + r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + ); + + static final _create2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create2( + jni.JObject byteString, + jni.JObject mediaType, + ) { + return _create2(_class.reference.pointer, _id_create2 as jni.JMethodIDPtr, + byteString.reference.pointer, mediaType.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create3 = _class.staticMethodId( + r"create", + r"(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;", + ); + + static final _create3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); + + /// from: static public final okhttp3.ResponseBody create(okio.BufferedSource bufferedSource, okhttp3.MediaType mediaType, long j) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create3( + jni.JObject bufferedSource, + jni.JObject mediaType, + int j, + ) { + return _create3(_class.reference.pointer, _id_create3 as jni.JMethodIDPtr, + bufferedSource.reference.pointer, mediaType.reference.pointer, j) + .object(const $ResponseBodyType()); + } + + static final _id_create4 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;", + ); + + static final _create4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create4( + jni.JObject mediaType, + jni.JString string, + ) { + return _create4(_class.reference.pointer, _id_create4 as jni.JMethodIDPtr, + mediaType.reference.pointer, string.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create5 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;", + ); + + static final _create5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create5( + jni.JObject mediaType, + jni.JArray bs, + ) { + return _create5(_class.reference.pointer, _id_create5 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create6 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;", + ); + + static final _create6 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create6( + jni.JObject mediaType, + jni.JObject byteString, + ) { + return _create6(_class.reference.pointer, _id_create6 as jni.JMethodIDPtr, + mediaType.reference.pointer, byteString.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create7 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;", + ); + + static final _create7 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, long j, okio.BufferedSource bufferedSource) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create7( + jni.JObject mediaType, + int j, + jni.JObject bufferedSource, + ) { + return _create7(_class.reference.pointer, _id_create7 as jni.JMethodIDPtr, + mediaType.reference.pointer, j, bufferedSource.reference.pointer) + .object(const $ResponseBodyType()); + } +} + +final class $ResponseBodyType extends jni.JObjType { + const $ResponseBodyType(); + + @override + String get signature => r"Lokhttp3/ResponseBody;"; + + @override + ResponseBody fromReference(jni.JReference reference) => + ResponseBody.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ResponseBodyType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ResponseBodyType) && + other is $ResponseBodyType; + } +} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/_package.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/_package.dart new file mode 100644 index 0000000000..64124553ea --- /dev/null +++ b/pkgs/ok_http/lib/src/third_party/okhttp3/_package.dart @@ -0,0 +1,8 @@ +export "Request.dart"; +export "RequestBody.dart"; +export "Response.dart"; +export "ResponseBody.dart"; +export "OkHttpClient.dart"; +export "Call.dart"; +export "Headers.dart"; +export "Callback.dart"; diff --git a/pkgs/ok_http/pubspec.yaml b/pkgs/ok_http/pubspec.yaml index 2a7a21fc28..8b217d23d4 100644 --- a/pkgs/ok_http/pubspec.yaml +++ b/pkgs/ok_http/pubspec.yaml @@ -12,10 +12,13 @@ environment: dependencies: flutter: sdk: flutter + http: ^1.2.1 + jni: ^0.9.2 plugin_platform_interface: ^2.0.2 dev_dependencies: dart_flutter_team_lints: ^2.0.0 + jnigen: ^0.9.1 flutter: plugin: From 461a25955d15d38f7d551966e674514b799ccc9a Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Mon, 3 Jun 2024 21:06:20 +0530 Subject: [PATCH 378/448] pkgs/ok_http: Condense JNI Bindings to `single_file` structure, and add missing server errors test (#1221) --- pkgs/ok_http/analysis_options.yaml | 2 +- .../example/integration_test/client_test.dart | 1 + pkgs/ok_http/jnigen.yaml | 3 +- pkgs/ok_http/lib/src/jni/bindings.dart | 8140 +++++++++++++++++ pkgs/ok_http/lib/src/ok_http_client.dart | 2 +- .../lib/src/third_party/okhttp3/Call.dart | 609 -- .../lib/src/third_party/okhttp3/Callback.dart | 234 - .../lib/src/third_party/okhttp3/Headers.dart | 1043 --- .../src/third_party/okhttp3/OkHttpClient.dart | 2112 ----- .../lib/src/third_party/okhttp3/Request.dart | 1005 -- .../src/third_party/okhttp3/RequestBody.dart | 1080 --- .../lib/src/third_party/okhttp3/Response.dart | 1256 --- .../src/third_party/okhttp3/ResponseBody.dart | 995 -- .../lib/src/third_party/okhttp3/_package.dart | 8 - 14 files changed, 8145 insertions(+), 8345 deletions(-) create mode 100644 pkgs/ok_http/lib/src/jni/bindings.dart delete mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/Call.dart delete mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/Callback.dart delete mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/Headers.dart delete mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/OkHttpClient.dart delete mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/Request.dart delete mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/RequestBody.dart delete mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/Response.dart delete mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/ResponseBody.dart delete mode 100644 pkgs/ok_http/lib/src/third_party/okhttp3/_package.dart diff --git a/pkgs/ok_http/analysis_options.yaml b/pkgs/ok_http/analysis_options.yaml index 0f04002ca9..8de8919f97 100644 --- a/pkgs/ok_http/analysis_options.yaml +++ b/pkgs/ok_http/analysis_options.yaml @@ -2,4 +2,4 @@ include: ../../analysis_options.yaml analyzer: exclude: - - lib/src/third_party/ + - "lib/src/jni/bindings.dart" diff --git a/pkgs/ok_http/example/integration_test/client_test.dart b/pkgs/ok_http/example/integration_test/client_test.dart index 126abad830..2ff9a10399 100644 --- a/pkgs/ok_http/example/integration_test/client_test.dart +++ b/pkgs/ok_http/example/integration_test/client_test.dart @@ -21,6 +21,7 @@ Future testConformance() async { testRequestMethods(OkHttpClient(), preservesMethodCase: true); testResponseStatusLine(OkHttpClient()); testCompressedResponseBody(OkHttpClient()); + testServerErrors(OkHttpClient()); testIsolate(OkHttpClient.new); testResponseCookies(OkHttpClient(), canReceiveSetCookieHeaders: true); }); diff --git a/pkgs/ok_http/jnigen.yaml b/pkgs/ok_http/jnigen.yaml index b68eeb3020..6243a04bce 100644 --- a/pkgs/ok_http/jnigen.yaml +++ b/pkgs/ok_http/jnigen.yaml @@ -8,7 +8,8 @@ summarizer: output: dart: - path: "lib/src/third_party/" + path: "lib/src/jni/bindings.dart" + structure: single_file enable_experiment: - "interface_implementation" diff --git a/pkgs/ok_http/lib/src/jni/bindings.dart b/pkgs/ok_http/lib/src/jni/bindings.dart new file mode 100644 index 0000000000..64b23fd85e --- /dev/null +++ b/pkgs/ok_http/lib/src/jni/bindings.dart @@ -0,0 +1,8140 @@ +// Autogenerated by jnigen. DO NOT EDIT! + +// ignore_for_file: annotate_overrides +// ignore_for_file: camel_case_extensions +// ignore_for_file: camel_case_types +// ignore_for_file: constant_identifier_names +// ignore_for_file: doc_directive_unknown +// ignore_for_file: file_names +// ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_local_identifiers +// ignore_for_file: non_constant_identifier_names +// ignore_for_file: overridden_fields +// ignore_for_file: unnecessary_cast +// ignore_for_file: unused_element +// ignore_for_file: unused_field +// ignore_for_file: unused_import +// ignore_for_file: unused_local_variable +// ignore_for_file: unused_shown_name +// ignore_for_file: use_super_parameters + +import "dart:isolate" show ReceivePort; +import "dart:ffi" as ffi; +import "package:jni/internal_helpers_for_jnigen.dart"; +import "package:jni/jni.dart" as jni; + +/// from: okhttp3.Request$Builder +class Request_Builder extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Request_Builder.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Request$Builder"); + + /// The type which includes information such as the signature of this class. + static const type = $Request_BuilderType(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory Request_Builder() { + return Request_Builder.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_new1 = _class.constructorId( + r"(Lokhttp3/Request;)V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (okhttp3.Request request) + /// The returned object must be released after use, by calling the [release] method. + factory Request_Builder.new1( + Request request, + ) { + return Request_Builder.fromReference(_new1(_class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, request.reference.pointer) + .reference); + } + + static final _id_url = _class.instanceMethodId( + r"url", + r"(Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder;", + ); + + static final _url = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder url(okhttp3.HttpUrl httpUrl) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder url( + jni.JObject httpUrl, + ) { + return _url(reference.pointer, _id_url as jni.JMethodIDPtr, + httpUrl.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_url1 = _class.instanceMethodId( + r"url", + r"(Ljava/lang/String;)Lokhttp3/Request$Builder;", + ); + + static final _url1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder url(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder url1( + jni.JString string, + ) { + return _url1(reference.pointer, _id_url1 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_url2 = _class.instanceMethodId( + r"url", + r"(Ljava/net/URL;)Lokhttp3/Request$Builder;", + ); + + static final _url2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder url(java.net.URL uRL) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder url2( + jni.JObject uRL, + ) { + return _url2(reference.pointer, _id_url2 as jni.JMethodIDPtr, + uRL.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_header = _class.instanceMethodId( + r"header", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;", + ); + + static final _header = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder header(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder header( + jni.JString string, + jni.JString string1, + ) { + return _header(reference.pointer, _id_header as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_addHeader = _class.instanceMethodId( + r"addHeader", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;", + ); + + static final _addHeader = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder addHeader(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder addHeader( + jni.JString string, + jni.JString string1, + ) { + return _addHeader(reference.pointer, _id_addHeader as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_removeHeader = _class.instanceMethodId( + r"removeHeader", + r"(Ljava/lang/String;)Lokhttp3/Request$Builder;", + ); + + static final _removeHeader = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder removeHeader(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder removeHeader( + jni.JString string, + ) { + return _removeHeader(reference.pointer, + _id_removeHeader as jni.JMethodIDPtr, string.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_headers = _class.instanceMethodId( + r"headers", + r"(Lokhttp3/Headers;)Lokhttp3/Request$Builder;", + ); + + static final _headers = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder headers(okhttp3.Headers headers) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder headers( + Headers headers, + ) { + return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr, + headers.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_cacheControl = _class.instanceMethodId( + r"cacheControl", + r"(Lokhttp3/CacheControl;)Lokhttp3/Request$Builder;", + ); + + static final _cacheControl = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder cacheControl(okhttp3.CacheControl cacheControl) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder cacheControl( + jni.JObject cacheControl, + ) { + return _cacheControl( + reference.pointer, + _id_cacheControl as jni.JMethodIDPtr, + cacheControl.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_get0 = _class.instanceMethodId( + r"get", + r"()Lokhttp3/Request$Builder;", + ); + + static final _get0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okhttp3.Request$Builder get() + /// The returned object must be released after use, by calling the [release] method. + Request_Builder get0() { + return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr) + .object(const $Request_BuilderType()); + } + + static final _id_head = _class.instanceMethodId( + r"head", + r"()Lokhttp3/Request$Builder;", + ); + + static final _head = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okhttp3.Request$Builder head() + /// The returned object must be released after use, by calling the [release] method. + Request_Builder head() { + return _head(reference.pointer, _id_head as jni.JMethodIDPtr) + .object(const $Request_BuilderType()); + } + + static final _id_post = _class.instanceMethodId( + r"post", + r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + ); + + static final _post = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder post(okhttp3.RequestBody requestBody) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder post( + RequestBody requestBody, + ) { + return _post(reference.pointer, _id_post as jni.JMethodIDPtr, + requestBody.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_delete = _class.instanceMethodId( + r"delete", + r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + ); + + static final _delete = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder delete(okhttp3.RequestBody requestBody) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder delete( + RequestBody requestBody, + ) { + return _delete(reference.pointer, _id_delete as jni.JMethodIDPtr, + requestBody.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_put = _class.instanceMethodId( + r"put", + r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + ); + + static final _put = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder put(okhttp3.RequestBody requestBody) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder put( + RequestBody requestBody, + ) { + return _put(reference.pointer, _id_put as jni.JMethodIDPtr, + requestBody.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_patch = _class.instanceMethodId( + r"patch", + r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + ); + + static final _patch = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder patch(okhttp3.RequestBody requestBody) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder patch( + RequestBody requestBody, + ) { + return _patch(reference.pointer, _id_patch as jni.JMethodIDPtr, + requestBody.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_method = _class.instanceMethodId( + r"method", + r"(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + ); + + static final _method = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder method(java.lang.String string, okhttp3.RequestBody requestBody) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder method( + jni.JString string, + RequestBody requestBody, + ) { + return _method(reference.pointer, _id_method as jni.JMethodIDPtr, + string.reference.pointer, requestBody.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_tag = _class.instanceMethodId( + r"tag", + r"(Ljava/lang/Object;)Lokhttp3/Request$Builder;", + ); + + static final _tag = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder tag(java.lang.Object object) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder tag( + jni.JObject object, + ) { + return _tag(reference.pointer, _id_tag as jni.JMethodIDPtr, + object.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_tag1 = _class.instanceMethodId( + r"tag", + r"(Ljava/lang/Class;Ljava/lang/Object;)Lokhttp3/Request$Builder;", + ); + + static final _tag1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.Request$Builder tag(java.lang.Class class, T object) + /// The returned object must be released after use, by calling the [release] method. + Request_Builder tag1<$T extends jni.JObject>( + jni.JObject class0, + $T object, { + jni.JObjType<$T>? T, + }) { + T ??= jni.lowestCommonSuperType([ + object.$type, + ]) as jni.JObjType<$T>; + return _tag1(reference.pointer, _id_tag1 as jni.JMethodIDPtr, + class0.reference.pointer, object.reference.pointer) + .object(const $Request_BuilderType()); + } + + static final _id_build = _class.instanceMethodId( + r"build", + r"()Lokhttp3/Request;", + ); + + static final _build = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okhttp3.Request build() + /// The returned object must be released after use, by calling the [release] method. + Request build() { + return _build(reference.pointer, _id_build as jni.JMethodIDPtr) + .object(const $RequestType()); + } + + static final _id_delete1 = _class.instanceMethodId( + r"delete", + r"()Lokhttp3/Request$Builder;", + ); + + static final _delete1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Request$Builder delete() + /// The returned object must be released after use, by calling the [release] method. + Request_Builder delete1() { + return _delete1(reference.pointer, _id_delete1 as jni.JMethodIDPtr) + .object(const $Request_BuilderType()); + } +} + +final class $Request_BuilderType extends jni.JObjType { + const $Request_BuilderType(); + + @override + String get signature => r"Lokhttp3/Request$Builder;"; + + @override + Request_Builder fromReference(jni.JReference reference) => + Request_Builder.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($Request_BuilderType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($Request_BuilderType) && + other is $Request_BuilderType; + } +} + +/// from: okhttp3.Request +class Request extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Request.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Request"); + + /// The type which includes information such as the signature of this class. + static const type = $RequestType(); + static final _id_new0 = _class.constructorId( + r"(Lokhttp3/HttpUrl;Ljava/lang/String;Lokhttp3/Headers;Lokhttp3/RequestBody;Ljava/util/Map;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + /// from: public void (okhttp3.HttpUrl httpUrl, java.lang.String string, okhttp3.Headers headers, okhttp3.RequestBody requestBody, java.util.Map map) + /// The returned object must be released after use, by calling the [release] method. + factory Request( + jni.JObject httpUrl, + jni.JString string, + Headers headers, + RequestBody requestBody, + jni.JMap map, + ) { + return Request.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + httpUrl.reference.pointer, + string.reference.pointer, + headers.reference.pointer, + requestBody.reference.pointer, + map.reference.pointer) + .reference); + } + + static final _id_url = _class.instanceMethodId( + r"url", + r"()Lokhttp3/HttpUrl;", + ); + + static final _url = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.HttpUrl url() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject url() { + return _url(reference.pointer, _id_url as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_method = _class.instanceMethodId( + r"method", + r"()Ljava/lang/String;", + ); + + static final _method = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.lang.String method() + /// The returned object must be released after use, by calling the [release] method. + jni.JString method() { + return _method(reference.pointer, _id_method as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_headers = _class.instanceMethodId( + r"headers", + r"()Lokhttp3/Headers;", + ); + + static final _headers = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Headers headers() + /// The returned object must be released after use, by calling the [release] method. + Headers headers() { + return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr) + .object(const $HeadersType()); + } + + static final _id_body = _class.instanceMethodId( + r"body", + r"()Lokhttp3/RequestBody;", + ); + + static final _body = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.RequestBody body() + /// The returned object must be released after use, by calling the [release] method. + RequestBody body() { + return _body(reference.pointer, _id_body as jni.JMethodIDPtr) + .object(const $RequestBodyType()); + } + + static final _id_isHttps = _class.instanceMethodId( + r"isHttps", + r"()Z", + ); + + static final _isHttps = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean isHttps() + bool isHttps() { + return _isHttps(reference.pointer, _id_isHttps as jni.JMethodIDPtr).boolean; + } + + static final _id_header = _class.instanceMethodId( + r"header", + r"(Ljava/lang/String;)Ljava/lang/String;", + ); + + static final _header = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.lang.String header(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JString header( + jni.JString string, + ) { + return _header(reference.pointer, _id_header as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JStringType()); + } + + static final _id_headers1 = _class.instanceMethodId( + r"headers", + r"(Ljava/lang/String;)Ljava/util/List;", + ); + + static final _headers1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.util.List headers(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JList headers1( + jni.JString string, + ) { + return _headers1(reference.pointer, _id_headers1 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JListType(jni.JStringType())); + } + + static final _id_tag = _class.instanceMethodId( + r"tag", + r"()Ljava/lang/Object;", + ); + + static final _tag = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.lang.Object tag() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject tag() { + return _tag(reference.pointer, _id_tag as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_tag1 = _class.instanceMethodId( + r"tag", + r"(Ljava/lang/Class;)Ljava/lang/Object;", + ); + + static final _tag1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final T tag(java.lang.Class class) + /// The returned object must be released after use, by calling the [release] method. + $T tag1<$T extends jni.JObject>( + jni.JObject class0, { + required jni.JObjType<$T> T, + }) { + return _tag1(reference.pointer, _id_tag1 as jni.JMethodIDPtr, + class0.reference.pointer) + .object(T); + } + + static final _id_newBuilder = _class.instanceMethodId( + r"newBuilder", + r"()Lokhttp3/Request$Builder;", + ); + + static final _newBuilder = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Request$Builder newBuilder() + /// The returned object must be released after use, by calling the [release] method. + Request_Builder newBuilder() { + return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) + .object(const $Request_BuilderType()); + } + + static final _id_cacheControl = _class.instanceMethodId( + r"cacheControl", + r"()Lokhttp3/CacheControl;", + ); + + static final _cacheControl = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.CacheControl cacheControl() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject cacheControl() { + return _cacheControl( + reference.pointer, _id_cacheControl as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_toString1 = _class.instanceMethodId( + r"toString", + r"()Ljava/lang/String;", + ); + + static final _toString1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String toString() + /// The returned object must be released after use, by calling the [release] method. + jni.JString toString1() { + return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } +} + +final class $RequestType extends jni.JObjType { + const $RequestType(); + + @override + String get signature => r"Lokhttp3/Request;"; + + @override + Request fromReference(jni.JReference reference) => + Request.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($RequestType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($RequestType) && other is $RequestType; + } +} + +/// from: okhttp3.RequestBody$Companion +class RequestBody_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + RequestBody_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/RequestBody$Companion"); + + /// The type which includes information such as the signature of this class. + static const type = $RequestBody_CompanionType(); + static final _id_create = _class.instanceMethodId( + r"create", + r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(java.lang.String string, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create( + jni.JString string, + jni.JObject mediaType, + ) { + return _create(reference.pointer, _id_create as jni.JMethodIDPtr, + string.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create1 = _class.instanceMethodId( + r"create", + r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create1( + jni.JObject byteString, + jni.JObject mediaType, + ) { + return _create1(reference.pointer, _id_create1 as jni.JMethodIDPtr, + byteString.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create2 = _class.instanceMethodId( + r"create", + r"([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;", + ); + + static final _create2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int, int)>(); + + /// from: public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create2( + jni.JArray bs, + jni.JObject mediaType, + int i, + int i1, + ) { + return _create2(reference.pointer, _id_create2 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer, i, i1) + .object(const $RequestBodyType()); + } + + static final _id_create3 = _class.instanceMethodId( + r"create", + r"(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(java.io.File file, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create3( + jni.JObject file, + jni.JObject mediaType, + ) { + return _create3(reference.pointer, _id_create3 as jni.JMethodIDPtr, + file.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create4 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;", + ); + + static final _create4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create4( + jni.JObject mediaType, + jni.JString string, + ) { + return _create4(reference.pointer, _id_create4 as jni.JMethodIDPtr, + mediaType.reference.pointer, string.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create5 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;", + ); + + static final _create5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create5( + jni.JObject mediaType, + jni.JObject byteString, + ) { + return _create5(reference.pointer, _id_create5 as jni.JMethodIDPtr, + mediaType.reference.pointer, byteString.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create6 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;", + ); + + static final _create6 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int, int)>(); + + /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create6( + jni.JObject mediaType, + jni.JArray bs, + int i, + int i1, + ) { + return _create6(reference.pointer, _id_create6 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer, i, i1) + .object(const $RequestBodyType()); + } + + static final _id_create7 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;", + ); + + static final _create7 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.io.File file) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create7( + jni.JObject mediaType, + jni.JObject file, + ) { + return _create7(reference.pointer, _id_create7 as jni.JMethodIDPtr, + mediaType.reference.pointer, file.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create8 = _class.instanceMethodId( + r"create", + r"([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;", + ); + + static final _create8 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); + + /// from: public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create8( + jni.JArray bs, + jni.JObject mediaType, + int i, + ) { + return _create8(reference.pointer, _id_create8 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer, i) + .object(const $RequestBodyType()); + } + + static final _id_create9 = _class.instanceMethodId( + r"create", + r"([BLokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create9 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create9( + jni.JArray bs, + jni.JObject mediaType, + ) { + return _create9(reference.pointer, _id_create9 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create10 = _class.instanceMethodId( + r"create", + r"([B)Lokhttp3/RequestBody;", + ); + + static final _create10 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create10( + jni.JArray bs, + ) { + return _create10(reference.pointer, _id_create10 as jni.JMethodIDPtr, + bs.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create11 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;", + ); + + static final _create11 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); + + /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create11( + jni.JObject mediaType, + jni.JArray bs, + int i, + ) { + return _create11(reference.pointer, _id_create11 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer, i) + .object(const $RequestBodyType()); + } + + static final _id_create12 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;", + ); + + static final _create12 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + RequestBody create12( + jni.JObject mediaType, + jni.JArray bs, + ) { + return _create12(reference.pointer, _id_create12 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_new0 = _class.constructorId( + r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory RequestBody_Companion( + jni.JObject defaultConstructorMarker, + ) { + return RequestBody_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $RequestBody_CompanionType + extends jni.JObjType { + const $RequestBody_CompanionType(); + + @override + String get signature => r"Lokhttp3/RequestBody$Companion;"; + + @override + RequestBody_Companion fromReference(jni.JReference reference) => + RequestBody_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($RequestBody_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($RequestBody_CompanionType) && + other is $RequestBody_CompanionType; + } +} + +/// from: okhttp3.RequestBody +class RequestBody extends jni.JObject { + @override + late final jni.JObjType $type = type; + + RequestBody.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/RequestBody"); + + /// The type which includes information such as the signature of this class. + static const type = $RequestBodyType(); + static final _id_Companion = _class.staticFieldId( + r"Companion", + r"Lokhttp3/RequestBody$Companion;", + ); + + /// from: static public final okhttp3.RequestBody$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static RequestBody_Companion get Companion => + _id_Companion.get(_class, const $RequestBody_CompanionType()); + + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory RequestBody() { + return RequestBody.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_contentType = _class.instanceMethodId( + r"contentType", + r"()Lokhttp3/MediaType;", + ); + + static final _contentType = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okhttp3.MediaType contentType() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject contentType() { + return _contentType(reference.pointer, _id_contentType as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_contentLength = _class.instanceMethodId( + r"contentLength", + r"()J", + ); + + static final _contentLength = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public long contentLength() + int contentLength() { + return _contentLength( + reference.pointer, _id_contentLength as jni.JMethodIDPtr) + .long; + } + + static final _id_writeTo = _class.instanceMethodId( + r"writeTo", + r"(Lokio/BufferedSink;)V", + ); + + static final _writeTo = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public abstract void writeTo(okio.BufferedSink bufferedSink) + void writeTo( + jni.JObject bufferedSink, + ) { + _writeTo(reference.pointer, _id_writeTo as jni.JMethodIDPtr, + bufferedSink.reference.pointer) + .check(); + } + + static final _id_isDuplex = _class.instanceMethodId( + r"isDuplex", + r"()Z", + ); + + static final _isDuplex = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public boolean isDuplex() + bool isDuplex() { + return _isDuplex(reference.pointer, _id_isDuplex as jni.JMethodIDPtr) + .boolean; + } + + static final _id_isOneShot = _class.instanceMethodId( + r"isOneShot", + r"()Z", + ); + + static final _isOneShot = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public boolean isOneShot() + bool isOneShot() { + return _isOneShot(reference.pointer, _id_isOneShot as jni.JMethodIDPtr) + .boolean; + } + + static final _id_create = _class.staticMethodId( + r"create", + r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(java.lang.String string, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create( + jni.JString string, + jni.JObject mediaType, + ) { + return _create(_class.reference.pointer, _id_create as jni.JMethodIDPtr, + string.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create1 = _class.staticMethodId( + r"create", + r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create1( + jni.JObject byteString, + jni.JObject mediaType, + ) { + return _create1(_class.reference.pointer, _id_create1 as jni.JMethodIDPtr, + byteString.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create2 = _class.staticMethodId( + r"create", + r"([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;", + ); + + static final _create2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int, int)>(); + + /// from: static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create2( + jni.JArray bs, + jni.JObject mediaType, + int i, + int i1, + ) { + return _create2(_class.reference.pointer, _id_create2 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer, i, i1) + .object(const $RequestBodyType()); + } + + static final _id_create3 = _class.staticMethodId( + r"create", + r"(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(java.io.File file, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create3( + jni.JObject file, + jni.JObject mediaType, + ) { + return _create3(_class.reference.pointer, _id_create3 as jni.JMethodIDPtr, + file.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create4 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;", + ); + + static final _create4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create4( + jni.JObject mediaType, + jni.JString string, + ) { + return _create4(_class.reference.pointer, _id_create4 as jni.JMethodIDPtr, + mediaType.reference.pointer, string.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create5 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;", + ); + + static final _create5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create5( + jni.JObject mediaType, + jni.JObject byteString, + ) { + return _create5(_class.reference.pointer, _id_create5 as jni.JMethodIDPtr, + mediaType.reference.pointer, byteString.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create6 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;", + ); + + static final _create6 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int, int)>(); + + /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create6( + jni.JObject mediaType, + jni.JArray bs, + int i, + int i1, + ) { + return _create6(_class.reference.pointer, _id_create6 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer, i, i1) + .object(const $RequestBodyType()); + } + + static final _id_create7 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;", + ); + + static final _create7 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.io.File file) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create7( + jni.JObject mediaType, + jni.JObject file, + ) { + return _create7(_class.reference.pointer, _id_create7 as jni.JMethodIDPtr, + mediaType.reference.pointer, file.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create8 = _class.staticMethodId( + r"create", + r"([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;", + ); + + static final _create8 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); + + /// from: static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create8( + jni.JArray bs, + jni.JObject mediaType, + int i, + ) { + return _create8(_class.reference.pointer, _id_create8 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer, i) + .object(const $RequestBodyType()); + } + + static final _id_create9 = _class.staticMethodId( + r"create", + r"([BLokhttp3/MediaType;)Lokhttp3/RequestBody;", + ); + + static final _create9 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create9( + jni.JArray bs, + jni.JObject mediaType, + ) { + return _create9(_class.reference.pointer, _id_create9 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create10 = _class.staticMethodId( + r"create", + r"([B)Lokhttp3/RequestBody;", + ); + + static final _create10 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create10( + jni.JArray bs, + ) { + return _create10(_class.reference.pointer, _id_create10 as jni.JMethodIDPtr, + bs.reference.pointer) + .object(const $RequestBodyType()); + } + + static final _id_create11 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;", + ); + + static final _create11 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); + + /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create11( + jni.JObject mediaType, + jni.JArray bs, + int i, + ) { + return _create11(_class.reference.pointer, _id_create11 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer, i) + .object(const $RequestBodyType()); + } + + static final _id_create12 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;", + ); + + static final _create12 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + static RequestBody create12( + jni.JObject mediaType, + jni.JArray bs, + ) { + return _create12(_class.reference.pointer, _id_create12 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer) + .object(const $RequestBodyType()); + } +} + +final class $RequestBodyType extends jni.JObjType { + const $RequestBodyType(); + + @override + String get signature => r"Lokhttp3/RequestBody;"; + + @override + RequestBody fromReference(jni.JReference reference) => + RequestBody.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($RequestBodyType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($RequestBodyType) && other is $RequestBodyType; + } +} + +/// from: okhttp3.Response$Builder +class Response_Builder extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Response_Builder.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Response$Builder"); + + /// The type which includes information such as the signature of this class. + static const type = $Response_BuilderType(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory Response_Builder() { + return Response_Builder.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_new1 = _class.constructorId( + r"(Lokhttp3/Response;)V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (okhttp3.Response response) + /// The returned object must be released after use, by calling the [release] method. + factory Response_Builder.new1( + Response response, + ) { + return Response_Builder.fromReference(_new1(_class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, response.reference.pointer) + .reference); + } + + static final _id_request = _class.instanceMethodId( + r"request", + r"(Lokhttp3/Request;)Lokhttp3/Response$Builder;", + ); + + static final _request = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder request(okhttp3.Request request) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder request( + Request request, + ) { + return _request(reference.pointer, _id_request as jni.JMethodIDPtr, + request.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_protocol = _class.instanceMethodId( + r"protocol", + r"(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;", + ); + + static final _protocol = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder protocol(okhttp3.Protocol protocol) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder protocol( + jni.JObject protocol, + ) { + return _protocol(reference.pointer, _id_protocol as jni.JMethodIDPtr, + protocol.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_code = _class.instanceMethodId( + r"code", + r"(I)Lokhttp3/Response$Builder;", + ); + + static final _code = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public okhttp3.Response$Builder code(int i) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder code( + int i, + ) { + return _code(reference.pointer, _id_code as jni.JMethodIDPtr, i) + .object(const $Response_BuilderType()); + } + + static final _id_message = _class.instanceMethodId( + r"message", + r"(Ljava/lang/String;)Lokhttp3/Response$Builder;", + ); + + static final _message = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder message(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder message( + jni.JString string, + ) { + return _message(reference.pointer, _id_message as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_handshake = _class.instanceMethodId( + r"handshake", + r"(Lokhttp3/Handshake;)Lokhttp3/Response$Builder;", + ); + + static final _handshake = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder handshake(okhttp3.Handshake handshake) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder handshake( + jni.JObject handshake, + ) { + return _handshake(reference.pointer, _id_handshake as jni.JMethodIDPtr, + handshake.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_header = _class.instanceMethodId( + r"header", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;", + ); + + static final _header = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder header(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder header( + jni.JString string, + jni.JString string1, + ) { + return _header(reference.pointer, _id_header as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_addHeader = _class.instanceMethodId( + r"addHeader", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;", + ); + + static final _addHeader = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder addHeader(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder addHeader( + jni.JString string, + jni.JString string1, + ) { + return _addHeader(reference.pointer, _id_addHeader as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_removeHeader = _class.instanceMethodId( + r"removeHeader", + r"(Ljava/lang/String;)Lokhttp3/Response$Builder;", + ); + + static final _removeHeader = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder removeHeader(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder removeHeader( + jni.JString string, + ) { + return _removeHeader(reference.pointer, + _id_removeHeader as jni.JMethodIDPtr, string.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_headers = _class.instanceMethodId( + r"headers", + r"(Lokhttp3/Headers;)Lokhttp3/Response$Builder;", + ); + + static final _headers = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder headers(okhttp3.Headers headers) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder headers( + Headers headers, + ) { + return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr, + headers.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_body = _class.instanceMethodId( + r"body", + r"(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;", + ); + + static final _body = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder body(okhttp3.ResponseBody responseBody) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder body( + ResponseBody responseBody, + ) { + return _body(reference.pointer, _id_body as jni.JMethodIDPtr, + responseBody.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_networkResponse = _class.instanceMethodId( + r"networkResponse", + r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", + ); + + static final _networkResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder networkResponse(okhttp3.Response response) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder networkResponse( + Response response, + ) { + return _networkResponse(reference.pointer, + _id_networkResponse as jni.JMethodIDPtr, response.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_cacheResponse = _class.instanceMethodId( + r"cacheResponse", + r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", + ); + + static final _cacheResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder cacheResponse(okhttp3.Response response) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder cacheResponse( + Response response, + ) { + return _cacheResponse(reference.pointer, + _id_cacheResponse as jni.JMethodIDPtr, response.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_priorResponse = _class.instanceMethodId( + r"priorResponse", + r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", + ); + + static final _priorResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Response$Builder priorResponse(okhttp3.Response response) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder priorResponse( + Response response, + ) { + return _priorResponse(reference.pointer, + _id_priorResponse as jni.JMethodIDPtr, response.reference.pointer) + .object(const $Response_BuilderType()); + } + + static final _id_sentRequestAtMillis = _class.instanceMethodId( + r"sentRequestAtMillis", + r"(J)Lokhttp3/Response$Builder;", + ); + + static final _sentRequestAtMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public okhttp3.Response$Builder sentRequestAtMillis(long j) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder sentRequestAtMillis( + int j, + ) { + return _sentRequestAtMillis( + reference.pointer, _id_sentRequestAtMillis as jni.JMethodIDPtr, j) + .object(const $Response_BuilderType()); + } + + static final _id_receivedResponseAtMillis = _class.instanceMethodId( + r"receivedResponseAtMillis", + r"(J)Lokhttp3/Response$Builder;", + ); + + static final _receivedResponseAtMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public okhttp3.Response$Builder receivedResponseAtMillis(long j) + /// The returned object must be released after use, by calling the [release] method. + Response_Builder receivedResponseAtMillis( + int j, + ) { + return _receivedResponseAtMillis(reference.pointer, + _id_receivedResponseAtMillis as jni.JMethodIDPtr, j) + .object(const $Response_BuilderType()); + } + + static final _id_build = _class.instanceMethodId( + r"build", + r"()Lokhttp3/Response;", + ); + + static final _build = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okhttp3.Response build() + /// The returned object must be released after use, by calling the [release] method. + Response build() { + return _build(reference.pointer, _id_build as jni.JMethodIDPtr) + .object(const $ResponseType()); + } +} + +final class $Response_BuilderType extends jni.JObjType { + const $Response_BuilderType(); + + @override + String get signature => r"Lokhttp3/Response$Builder;"; + + @override + Response_Builder fromReference(jni.JReference reference) => + Response_Builder.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($Response_BuilderType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($Response_BuilderType) && + other is $Response_BuilderType; + } +} + +/// from: okhttp3.Response +class Response extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Response.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Response"); + + /// The type which includes information such as the signature of this class. + static const type = $ResponseType(); + static final _id_new0 = _class.constructorId( + r"(Lokhttp3/Request;Lokhttp3/Protocol;Ljava/lang/String;ILokhttp3/Handshake;Lokhttp3/Headers;Lokhttp3/ResponseBody;Lokhttp3/Response;Lokhttp3/Response;Lokhttp3/Response;JJLokhttp3/internal/connection/Exchange;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); + + /// from: public void (okhttp3.Request request, okhttp3.Protocol protocol, java.lang.String string, int i, okhttp3.Handshake handshake, okhttp3.Headers headers, okhttp3.ResponseBody responseBody, okhttp3.Response response, okhttp3.Response response1, okhttp3.Response response2, long j, long j1, okhttp3.internal.connection.Exchange exchange) + /// The returned object must be released after use, by calling the [release] method. + factory Response( + Request request, + jni.JObject protocol, + jni.JString string, + int i, + jni.JObject handshake, + Headers headers, + ResponseBody responseBody, + Response response, + Response response1, + Response response2, + int j, + int j1, + jni.JObject exchange, + ) { + return Response.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + request.reference.pointer, + protocol.reference.pointer, + string.reference.pointer, + i, + handshake.reference.pointer, + headers.reference.pointer, + responseBody.reference.pointer, + response.reference.pointer, + response1.reference.pointer, + response2.reference.pointer, + j, + j1, + exchange.reference.pointer) + .reference); + } + + static final _id_request = _class.instanceMethodId( + r"request", + r"()Lokhttp3/Request;", + ); + + static final _request = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Request request() + /// The returned object must be released after use, by calling the [release] method. + Request request() { + return _request(reference.pointer, _id_request as jni.JMethodIDPtr) + .object(const $RequestType()); + } + + static final _id_protocol = _class.instanceMethodId( + r"protocol", + r"()Lokhttp3/Protocol;", + ); + + static final _protocol = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Protocol protocol() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject protocol() { + return _protocol(reference.pointer, _id_protocol as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_message = _class.instanceMethodId( + r"message", + r"()Ljava/lang/String;", + ); + + static final _message = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.lang.String message() + /// The returned object must be released after use, by calling the [release] method. + jni.JString message() { + return _message(reference.pointer, _id_message as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_code = _class.instanceMethodId( + r"code", + r"()I", + ); + + static final _code = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int code() + int code() { + return _code(reference.pointer, _id_code as jni.JMethodIDPtr).integer; + } + + static final _id_handshake = _class.instanceMethodId( + r"handshake", + r"()Lokhttp3/Handshake;", + ); + + static final _handshake = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Handshake handshake() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject handshake() { + return _handshake(reference.pointer, _id_handshake as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_headers = _class.instanceMethodId( + r"headers", + r"()Lokhttp3/Headers;", + ); + + static final _headers = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Headers headers() + /// The returned object must be released after use, by calling the [release] method. + Headers headers() { + return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr) + .object(const $HeadersType()); + } + + static final _id_body = _class.instanceMethodId( + r"body", + r"()Lokhttp3/ResponseBody;", + ); + + static final _body = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.ResponseBody body() + /// The returned object must be released after use, by calling the [release] method. + ResponseBody body() { + return _body(reference.pointer, _id_body as jni.JMethodIDPtr) + .object(const $ResponseBodyType()); + } + + static final _id_networkResponse = _class.instanceMethodId( + r"networkResponse", + r"()Lokhttp3/Response;", + ); + + static final _networkResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Response networkResponse() + /// The returned object must be released after use, by calling the [release] method. + Response networkResponse() { + return _networkResponse( + reference.pointer, _id_networkResponse as jni.JMethodIDPtr) + .object(const $ResponseType()); + } + + static final _id_cacheResponse = _class.instanceMethodId( + r"cacheResponse", + r"()Lokhttp3/Response;", + ); + + static final _cacheResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Response cacheResponse() + /// The returned object must be released after use, by calling the [release] method. + Response cacheResponse() { + return _cacheResponse( + reference.pointer, _id_cacheResponse as jni.JMethodIDPtr) + .object(const $ResponseType()); + } + + static final _id_priorResponse = _class.instanceMethodId( + r"priorResponse", + r"()Lokhttp3/Response;", + ); + + static final _priorResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Response priorResponse() + /// The returned object must be released after use, by calling the [release] method. + Response priorResponse() { + return _priorResponse( + reference.pointer, _id_priorResponse as jni.JMethodIDPtr) + .object(const $ResponseType()); + } + + static final _id_sentRequestAtMillis = _class.instanceMethodId( + r"sentRequestAtMillis", + r"()J", + ); + + static final _sentRequestAtMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final long sentRequestAtMillis() + int sentRequestAtMillis() { + return _sentRequestAtMillis( + reference.pointer, _id_sentRequestAtMillis as jni.JMethodIDPtr) + .long; + } + + static final _id_receivedResponseAtMillis = _class.instanceMethodId( + r"receivedResponseAtMillis", + r"()J", + ); + + static final _receivedResponseAtMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final long receivedResponseAtMillis() + int receivedResponseAtMillis() { + return _receivedResponseAtMillis( + reference.pointer, _id_receivedResponseAtMillis as jni.JMethodIDPtr) + .long; + } + + static final _id_exchange = _class.instanceMethodId( + r"exchange", + r"()Lokhttp3/internal/connection/Exchange;", + ); + + static final _exchange = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.internal.connection.Exchange exchange() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject exchange() { + return _exchange(reference.pointer, _id_exchange as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_isSuccessful = _class.instanceMethodId( + r"isSuccessful", + r"()Z", + ); + + static final _isSuccessful = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean isSuccessful() + bool isSuccessful() { + return _isSuccessful( + reference.pointer, _id_isSuccessful as jni.JMethodIDPtr) + .boolean; + } + + static final _id_headers1 = _class.instanceMethodId( + r"headers", + r"(Ljava/lang/String;)Ljava/util/List;", + ); + + static final _headers1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.util.List headers(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JList headers1( + jni.JString string, + ) { + return _headers1(reference.pointer, _id_headers1 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JListType(jni.JStringType())); + } + + static final _id_header = _class.instanceMethodId( + r"header", + r"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", + ); + + static final _header = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final java.lang.String header(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + jni.JString header( + jni.JString string, + jni.JString string1, + ) { + return _header(reference.pointer, _id_header as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const jni.JStringType()); + } + + static final _id_trailers = _class.instanceMethodId( + r"trailers", + r"()Lokhttp3/Headers;", + ); + + static final _trailers = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Headers trailers() + /// The returned object must be released after use, by calling the [release] method. + Headers trailers() { + return _trailers(reference.pointer, _id_trailers as jni.JMethodIDPtr) + .object(const $HeadersType()); + } + + static final _id_peekBody = _class.instanceMethodId( + r"peekBody", + r"(J)Lokhttp3/ResponseBody;", + ); + + static final _peekBody = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final okhttp3.ResponseBody peekBody(long j) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody peekBody( + int j, + ) { + return _peekBody(reference.pointer, _id_peekBody as jni.JMethodIDPtr, j) + .object(const $ResponseBodyType()); + } + + static final _id_newBuilder = _class.instanceMethodId( + r"newBuilder", + r"()Lokhttp3/Response$Builder;", + ); + + static final _newBuilder = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Response$Builder newBuilder() + /// The returned object must be released after use, by calling the [release] method. + Response_Builder newBuilder() { + return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) + .object(const $Response_BuilderType()); + } + + static final _id_isRedirect = _class.instanceMethodId( + r"isRedirect", + r"()Z", + ); + + static final _isRedirect = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean isRedirect() + bool isRedirect() { + return _isRedirect(reference.pointer, _id_isRedirect as jni.JMethodIDPtr) + .boolean; + } + + static final _id_challenges = _class.instanceMethodId( + r"challenges", + r"()Ljava/util/List;", + ); + + static final _challenges = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List challenges() + /// The returned object must be released after use, by calling the [release] method. + jni.JList challenges() { + return _challenges(reference.pointer, _id_challenges as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_cacheControl = _class.instanceMethodId( + r"cacheControl", + r"()Lokhttp3/CacheControl;", + ); + + static final _cacheControl = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.CacheControl cacheControl() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject cacheControl() { + return _cacheControl( + reference.pointer, _id_cacheControl as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_close = _class.instanceMethodId( + r"close", + r"()V", + ); + + static final _close = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void close() + void close() { + _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); + } + + static final _id_toString1 = _class.instanceMethodId( + r"toString", + r"()Ljava/lang/String;", + ); + + static final _toString1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String toString() + /// The returned object must be released after use, by calling the [release] method. + jni.JString toString1() { + return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_header1 = _class.instanceMethodId( + r"header", + r"(Ljava/lang/String;)Ljava/lang/String;", + ); + + static final _header1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.lang.String header(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JString header1( + jni.JString string, + ) { + return _header1(reference.pointer, _id_header1 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JStringType()); + } +} + +final class $ResponseType extends jni.JObjType { + const $ResponseType(); + + @override + String get signature => r"Lokhttp3/Response;"; + + @override + Response fromReference(jni.JReference reference) => + Response.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ResponseType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ResponseType) && other is $ResponseType; + } +} + +/// from: okhttp3.ResponseBody$BomAwareReader +class ResponseBody_BomAwareReader extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ResponseBody_BomAwareReader.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r"okhttp3/ResponseBody$BomAwareReader"); + + /// The type which includes information such as the signature of this class. + static const type = $ResponseBody_BomAwareReaderType(); + static final _id_new0 = _class.constructorId( + r"(Lokio/BufferedSource;Ljava/nio/charset/Charset;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public void (okio.BufferedSource bufferedSource, java.nio.charset.Charset charset) + /// The returned object must be released after use, by calling the [release] method. + factory ResponseBody_BomAwareReader( + jni.JObject bufferedSource, + jni.JObject charset, + ) { + return ResponseBody_BomAwareReader.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + bufferedSource.reference.pointer, + charset.reference.pointer) + .reference); + } + + static final _id_read = _class.instanceMethodId( + r"read", + r"([CII)I", + ); + + static final _read = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); + + /// from: public int read(char[] cs, int i, int i1) + int read( + jni.JArray cs, + int i, + int i1, + ) { + return _read(reference.pointer, _id_read as jni.JMethodIDPtr, + cs.reference.pointer, i, i1) + .integer; + } + + static final _id_close = _class.instanceMethodId( + r"close", + r"()V", + ); + + static final _close = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void close() + void close() { + _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); + } +} + +final class $ResponseBody_BomAwareReaderType + extends jni.JObjType { + const $ResponseBody_BomAwareReaderType(); + + @override + String get signature => r"Lokhttp3/ResponseBody$BomAwareReader;"; + + @override + ResponseBody_BomAwareReader fromReference(jni.JReference reference) => + ResponseBody_BomAwareReader.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ResponseBody_BomAwareReaderType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ResponseBody_BomAwareReaderType) && + other is $ResponseBody_BomAwareReaderType; + } +} + +/// from: okhttp3.ResponseBody$Companion +class ResponseBody_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ResponseBody_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/ResponseBody$Companion"); + + /// The type which includes information such as the signature of this class. + static const type = $ResponseBody_CompanionType(); + static final _id_create = _class.instanceMethodId( + r"create", + r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + ); + + static final _create = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(java.lang.String string, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create( + jni.JString string, + jni.JObject mediaType, + ) { + return _create(reference.pointer, _id_create as jni.JMethodIDPtr, + string.reference.pointer, mediaType.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create1 = _class.instanceMethodId( + r"create", + r"([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;", + ); + + static final _create1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(byte[] bs, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create1( + jni.JArray bs, + jni.JObject mediaType, + ) { + return _create1(reference.pointer, _id_create1 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create2 = _class.instanceMethodId( + r"create", + r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + ); + + static final _create2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create2( + jni.JObject byteString, + jni.JObject mediaType, + ) { + return _create2(reference.pointer, _id_create2 as jni.JMethodIDPtr, + byteString.reference.pointer, mediaType.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create3 = _class.instanceMethodId( + r"create", + r"(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;", + ); + + static final _create3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); + + /// from: public final okhttp3.ResponseBody create(okio.BufferedSource bufferedSource, okhttp3.MediaType mediaType, long j) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create3( + jni.JObject bufferedSource, + jni.JObject mediaType, + int j, + ) { + return _create3(reference.pointer, _id_create3 as jni.JMethodIDPtr, + bufferedSource.reference.pointer, mediaType.reference.pointer, j) + .object(const $ResponseBodyType()); + } + + static final _id_create4 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;", + ); + + static final _create4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create4( + jni.JObject mediaType, + jni.JString string, + ) { + return _create4(reference.pointer, _id_create4 as jni.JMethodIDPtr, + mediaType.reference.pointer, string.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create5 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;", + ); + + static final _create5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create5( + jni.JObject mediaType, + jni.JArray bs, + ) { + return _create5(reference.pointer, _id_create5 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create6 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;", + ); + + static final _create6 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create6( + jni.JObject mediaType, + jni.JObject byteString, + ) { + return _create6(reference.pointer, _id_create6 as jni.JMethodIDPtr, + mediaType.reference.pointer, byteString.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create7 = _class.instanceMethodId( + r"create", + r"(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;", + ); + + static final _create7 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, ffi.Pointer)>(); + + /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, long j, okio.BufferedSource bufferedSource) + /// The returned object must be released after use, by calling the [release] method. + ResponseBody create7( + jni.JObject mediaType, + int j, + jni.JObject bufferedSource, + ) { + return _create7(reference.pointer, _id_create7 as jni.JMethodIDPtr, + mediaType.reference.pointer, j, bufferedSource.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_new0 = _class.constructorId( + r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory ResponseBody_Companion( + jni.JObject defaultConstructorMarker, + ) { + return ResponseBody_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $ResponseBody_CompanionType + extends jni.JObjType { + const $ResponseBody_CompanionType(); + + @override + String get signature => r"Lokhttp3/ResponseBody$Companion;"; + + @override + ResponseBody_Companion fromReference(jni.JReference reference) => + ResponseBody_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ResponseBody_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ResponseBody_CompanionType) && + other is $ResponseBody_CompanionType; + } +} + +/// from: okhttp3.ResponseBody +class ResponseBody extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ResponseBody.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/ResponseBody"); + + /// The type which includes information such as the signature of this class. + static const type = $ResponseBodyType(); + static final _id_Companion = _class.staticFieldId( + r"Companion", + r"Lokhttp3/ResponseBody$Companion;", + ); + + /// from: static public final okhttp3.ResponseBody$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody_Companion get Companion => + _id_Companion.get(_class, const $ResponseBody_CompanionType()); + + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory ResponseBody() { + return ResponseBody.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_contentType = _class.instanceMethodId( + r"contentType", + r"()Lokhttp3/MediaType;", + ); + + static final _contentType = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okhttp3.MediaType contentType() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject contentType() { + return _contentType(reference.pointer, _id_contentType as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_contentLength = _class.instanceMethodId( + r"contentLength", + r"()J", + ); + + static final _contentLength = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract long contentLength() + int contentLength() { + return _contentLength( + reference.pointer, _id_contentLength as jni.JMethodIDPtr) + .long; + } + + static final _id_byteStream = _class.instanceMethodId( + r"byteStream", + r"()Ljava/io/InputStream;", + ); + + static final _byteStream = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.io.InputStream byteStream() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject byteStream() { + return _byteStream(reference.pointer, _id_byteStream as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_source = _class.instanceMethodId( + r"source", + r"()Lokio/BufferedSource;", + ); + + static final _source = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okio.BufferedSource source() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject source() { + return _source(reference.pointer, _id_source as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_bytes = _class.instanceMethodId( + r"bytes", + r"()[B", + ); + + static final _bytes = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final byte[] bytes() + /// The returned object must be released after use, by calling the [release] method. + jni.JArray bytes() { + return _bytes(reference.pointer, _id_bytes as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.jbyteType())); + } + + static final _id_byteString = _class.instanceMethodId( + r"byteString", + r"()Lokio/ByteString;", + ); + + static final _byteString = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okio.ByteString byteString() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject byteString() { + return _byteString(reference.pointer, _id_byteString as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_charStream = _class.instanceMethodId( + r"charStream", + r"()Ljava/io/Reader;", + ); + + static final _charStream = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.io.Reader charStream() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject charStream() { + return _charStream(reference.pointer, _id_charStream as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_string = _class.instanceMethodId( + r"string", + r"()Ljava/lang/String;", + ); + + static final _string = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.lang.String string() + /// The returned object must be released after use, by calling the [release] method. + jni.JString string() { + return _string(reference.pointer, _id_string as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_close = _class.instanceMethodId( + r"close", + r"()V", + ); + + static final _close = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void close() + void close() { + _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); + } + + static final _id_create = _class.staticMethodId( + r"create", + r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + ); + + static final _create = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(java.lang.String string, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create( + jni.JString string, + jni.JObject mediaType, + ) { + return _create(_class.reference.pointer, _id_create as jni.JMethodIDPtr, + string.reference.pointer, mediaType.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create1 = _class.staticMethodId( + r"create", + r"([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;", + ); + + static final _create1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(byte[] bs, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create1( + jni.JArray bs, + jni.JObject mediaType, + ) { + return _create1(_class.reference.pointer, _id_create1 as jni.JMethodIDPtr, + bs.reference.pointer, mediaType.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create2 = _class.staticMethodId( + r"create", + r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + ); + + static final _create2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create2( + jni.JObject byteString, + jni.JObject mediaType, + ) { + return _create2(_class.reference.pointer, _id_create2 as jni.JMethodIDPtr, + byteString.reference.pointer, mediaType.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create3 = _class.staticMethodId( + r"create", + r"(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;", + ); + + static final _create3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Int64 + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer, int)>(); + + /// from: static public final okhttp3.ResponseBody create(okio.BufferedSource bufferedSource, okhttp3.MediaType mediaType, long j) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create3( + jni.JObject bufferedSource, + jni.JObject mediaType, + int j, + ) { + return _create3(_class.reference.pointer, _id_create3 as jni.JMethodIDPtr, + bufferedSource.reference.pointer, mediaType.reference.pointer, j) + .object(const $ResponseBodyType()); + } + + static final _id_create4 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;", + ); + + static final _create4 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create4( + jni.JObject mediaType, + jni.JString string, + ) { + return _create4(_class.reference.pointer, _id_create4 as jni.JMethodIDPtr, + mediaType.reference.pointer, string.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create5 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;", + ); + + static final _create5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create5( + jni.JObject mediaType, + jni.JArray bs, + ) { + return _create5(_class.reference.pointer, _id_create5 as jni.JMethodIDPtr, + mediaType.reference.pointer, bs.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create6 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;", + ); + + static final _create6 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create6( + jni.JObject mediaType, + jni.JObject byteString, + ) { + return _create6(_class.reference.pointer, _id_create6 as jni.JMethodIDPtr, + mediaType.reference.pointer, byteString.reference.pointer) + .object(const $ResponseBodyType()); + } + + static final _id_create7 = _class.staticMethodId( + r"create", + r"(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;", + ); + + static final _create7 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Pointer + )>)>>("globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, ffi.Pointer)>(); + + /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, long j, okio.BufferedSource bufferedSource) + /// The returned object must be released after use, by calling the [release] method. + static ResponseBody create7( + jni.JObject mediaType, + int j, + jni.JObject bufferedSource, + ) { + return _create7(_class.reference.pointer, _id_create7 as jni.JMethodIDPtr, + mediaType.reference.pointer, j, bufferedSource.reference.pointer) + .object(const $ResponseBodyType()); + } +} + +final class $ResponseBodyType extends jni.JObjType { + const $ResponseBodyType(); + + @override + String get signature => r"Lokhttp3/ResponseBody;"; + + @override + ResponseBody fromReference(jni.JReference reference) => + ResponseBody.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ResponseBodyType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ResponseBodyType) && + other is $ResponseBodyType; + } +} + +/// from: okhttp3.OkHttpClient$Builder +class OkHttpClient_Builder extends jni.JObject { + @override + late final jni.JObjType $type = type; + + OkHttpClient_Builder.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient$Builder"); + + /// The type which includes information such as the signature of this class. + static const type = $OkHttpClient_BuilderType(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory OkHttpClient_Builder() { + return OkHttpClient_Builder.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_new1 = _class.constructorId( + r"(Lokhttp3/OkHttpClient;)V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (okhttp3.OkHttpClient okHttpClient) + /// The returned object must be released after use, by calling the [release] method. + factory OkHttpClient_Builder.new1( + OkHttpClient okHttpClient, + ) { + return OkHttpClient_Builder.fromReference(_new1(_class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, okHttpClient.reference.pointer) + .reference); + } + + static final _id_dispatcher = _class.instanceMethodId( + r"dispatcher", + r"(Lokhttp3/Dispatcher;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _dispatcher = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder dispatcher(okhttp3.Dispatcher dispatcher) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder dispatcher( + jni.JObject dispatcher, + ) { + return _dispatcher(reference.pointer, _id_dispatcher as jni.JMethodIDPtr, + dispatcher.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_connectionPool = _class.instanceMethodId( + r"connectionPool", + r"(Lokhttp3/ConnectionPool;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _connectionPool = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder connectionPool(okhttp3.ConnectionPool connectionPool) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder connectionPool( + jni.JObject connectionPool, + ) { + return _connectionPool( + reference.pointer, + _id_connectionPool as jni.JMethodIDPtr, + connectionPool.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_interceptors = _class.instanceMethodId( + r"interceptors", + r"()Ljava/util/List;", + ); + + static final _interceptors = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List interceptors() + /// The returned object must be released after use, by calling the [release] method. + jni.JList interceptors() { + return _interceptors( + reference.pointer, _id_interceptors as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_addInterceptor = _class.instanceMethodId( + r"addInterceptor", + r"(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _addInterceptor = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder addInterceptor(okhttp3.Interceptor interceptor) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder addInterceptor( + jni.JObject interceptor, + ) { + return _addInterceptor( + reference.pointer, + _id_addInterceptor as jni.JMethodIDPtr, + interceptor.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_networkInterceptors = _class.instanceMethodId( + r"networkInterceptors", + r"()Ljava/util/List;", + ); + + static final _networkInterceptors = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List networkInterceptors() + /// The returned object must be released after use, by calling the [release] method. + jni.JList networkInterceptors() { + return _networkInterceptors( + reference.pointer, _id_networkInterceptors as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_addNetworkInterceptor = _class.instanceMethodId( + r"addNetworkInterceptor", + r"(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _addNetworkInterceptor = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder addNetworkInterceptor(okhttp3.Interceptor interceptor) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder addNetworkInterceptor( + jni.JObject interceptor, + ) { + return _addNetworkInterceptor( + reference.pointer, + _id_addNetworkInterceptor as jni.JMethodIDPtr, + interceptor.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_eventListener = _class.instanceMethodId( + r"eventListener", + r"(Lokhttp3/EventListener;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _eventListener = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder eventListener(okhttp3.EventListener eventListener) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder eventListener( + jni.JObject eventListener, + ) { + return _eventListener( + reference.pointer, + _id_eventListener as jni.JMethodIDPtr, + eventListener.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_eventListenerFactory = _class.instanceMethodId( + r"eventListenerFactory", + r"(Lokhttp3/EventListener$Factory;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _eventListenerFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder eventListenerFactory(okhttp3.EventListener$Factory factory) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder eventListenerFactory( + jni.JObject factory0, + ) { + return _eventListenerFactory( + reference.pointer, + _id_eventListenerFactory as jni.JMethodIDPtr, + factory0.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_retryOnConnectionFailure = _class.instanceMethodId( + r"retryOnConnectionFailure", + r"(Z)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final okhttp3.OkHttpClient$Builder retryOnConnectionFailure(boolean z) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder retryOnConnectionFailure( + bool z, + ) { + return _retryOnConnectionFailure(reference.pointer, + _id_retryOnConnectionFailure as jni.JMethodIDPtr, z ? 1 : 0) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_authenticator = _class.instanceMethodId( + r"authenticator", + r"(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _authenticator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder authenticator(okhttp3.Authenticator authenticator) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder authenticator( + jni.JObject authenticator, + ) { + return _authenticator( + reference.pointer, + _id_authenticator as jni.JMethodIDPtr, + authenticator.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_followRedirects = _class.instanceMethodId( + r"followRedirects", + r"(Z)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _followRedirects = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final okhttp3.OkHttpClient$Builder followRedirects(boolean z) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder followRedirects( + bool z, + ) { + return _followRedirects(reference.pointer, + _id_followRedirects as jni.JMethodIDPtr, z ? 1 : 0) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_followSslRedirects = _class.instanceMethodId( + r"followSslRedirects", + r"(Z)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _followSslRedirects = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final okhttp3.OkHttpClient$Builder followSslRedirects(boolean z) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder followSslRedirects( + bool z, + ) { + return _followSslRedirects(reference.pointer, + _id_followSslRedirects as jni.JMethodIDPtr, z ? 1 : 0) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_cookieJar = _class.instanceMethodId( + r"cookieJar", + r"(Lokhttp3/CookieJar;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _cookieJar = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder cookieJar(okhttp3.CookieJar cookieJar) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder cookieJar( + jni.JObject cookieJar, + ) { + return _cookieJar(reference.pointer, _id_cookieJar as jni.JMethodIDPtr, + cookieJar.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_cache = _class.instanceMethodId( + r"cache", + r"(Lokhttp3/Cache;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _cache = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder cache(okhttp3.Cache cache) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder cache( + jni.JObject cache, + ) { + return _cache(reference.pointer, _id_cache as jni.JMethodIDPtr, + cache.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_dns = _class.instanceMethodId( + r"dns", + r"(Lokhttp3/Dns;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _dns = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder dns(okhttp3.Dns dns) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder dns( + jni.JObject dns, + ) { + return _dns(reference.pointer, _id_dns as jni.JMethodIDPtr, + dns.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_proxy = _class.instanceMethodId( + r"proxy", + r"(Ljava/net/Proxy;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _proxy = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder proxy(java.net.Proxy proxy) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder proxy( + jni.JObject proxy, + ) { + return _proxy(reference.pointer, _id_proxy as jni.JMethodIDPtr, + proxy.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_proxySelector = _class.instanceMethodId( + r"proxySelector", + r"(Ljava/net/ProxySelector;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _proxySelector = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder proxySelector(java.net.ProxySelector proxySelector) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder proxySelector( + jni.JObject proxySelector, + ) { + return _proxySelector( + reference.pointer, + _id_proxySelector as jni.JMethodIDPtr, + proxySelector.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_proxyAuthenticator = _class.instanceMethodId( + r"proxyAuthenticator", + r"(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _proxyAuthenticator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder proxyAuthenticator(okhttp3.Authenticator authenticator) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder proxyAuthenticator( + jni.JObject authenticator, + ) { + return _proxyAuthenticator( + reference.pointer, + _id_proxyAuthenticator as jni.JMethodIDPtr, + authenticator.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_socketFactory = _class.instanceMethodId( + r"socketFactory", + r"(Ljavax/net/SocketFactory;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _socketFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder socketFactory(javax.net.SocketFactory socketFactory) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder socketFactory( + jni.JObject socketFactory, + ) { + return _socketFactory( + reference.pointer, + _id_socketFactory as jni.JMethodIDPtr, + socketFactory.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_sslSocketFactory = _class.instanceMethodId( + r"sslSocketFactory", + r"(Ljavax/net/ssl/SSLSocketFactory;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _sslSocketFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder sslSocketFactory(javax.net.ssl.SSLSocketFactory sSLSocketFactory) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder sslSocketFactory( + jni.JObject sSLSocketFactory, + ) { + return _sslSocketFactory( + reference.pointer, + _id_sslSocketFactory as jni.JMethodIDPtr, + sSLSocketFactory.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_sslSocketFactory1 = _class.instanceMethodId( + r"sslSocketFactory", + r"(Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/X509TrustManager;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _sslSocketFactory1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder sslSocketFactory(javax.net.ssl.SSLSocketFactory sSLSocketFactory, javax.net.ssl.X509TrustManager x509TrustManager) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder sslSocketFactory1( + jni.JObject sSLSocketFactory, + jni.JObject x509TrustManager, + ) { + return _sslSocketFactory1( + reference.pointer, + _id_sslSocketFactory1 as jni.JMethodIDPtr, + sSLSocketFactory.reference.pointer, + x509TrustManager.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_connectionSpecs = _class.instanceMethodId( + r"connectionSpecs", + r"(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _connectionSpecs = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder connectionSpecs(java.util.List list) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder connectionSpecs( + jni.JList list, + ) { + return _connectionSpecs(reference.pointer, + _id_connectionSpecs as jni.JMethodIDPtr, list.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_protocols = _class.instanceMethodId( + r"protocols", + r"(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _protocols = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder protocols(java.util.List list) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder protocols( + jni.JList list, + ) { + return _protocols(reference.pointer, _id_protocols as jni.JMethodIDPtr, + list.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_hostnameVerifier = _class.instanceMethodId( + r"hostnameVerifier", + r"(Ljavax/net/ssl/HostnameVerifier;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _hostnameVerifier = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder hostnameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder hostnameVerifier( + jni.JObject hostnameVerifier, + ) { + return _hostnameVerifier( + reference.pointer, + _id_hostnameVerifier as jni.JMethodIDPtr, + hostnameVerifier.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_certificatePinner = _class.instanceMethodId( + r"certificatePinner", + r"(Lokhttp3/CertificatePinner;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _certificatePinner = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder certificatePinner(okhttp3.CertificatePinner certificatePinner) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder certificatePinner( + jni.JObject certificatePinner, + ) { + return _certificatePinner( + reference.pointer, + _id_certificatePinner as jni.JMethodIDPtr, + certificatePinner.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_callTimeout = _class.instanceMethodId( + r"callTimeout", + r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _callTimeout = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder callTimeout(long j, java.util.concurrent.TimeUnit timeUnit) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder callTimeout( + int j, + jni.JObject timeUnit, + ) { + return _callTimeout(reference.pointer, _id_callTimeout as jni.JMethodIDPtr, + j, timeUnit.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_callTimeout1 = _class.instanceMethodId( + r"callTimeout", + r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _callTimeout1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder callTimeout(java.time.Duration duration) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder callTimeout1( + jni.JObject duration, + ) { + return _callTimeout1(reference.pointer, + _id_callTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_connectTimeout = _class.instanceMethodId( + r"connectTimeout", + r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _connectTimeout = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder connectTimeout(long j, java.util.concurrent.TimeUnit timeUnit) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder connectTimeout( + int j, + jni.JObject timeUnit, + ) { + return _connectTimeout( + reference.pointer, + _id_connectTimeout as jni.JMethodIDPtr, + j, + timeUnit.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_connectTimeout1 = _class.instanceMethodId( + r"connectTimeout", + r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _connectTimeout1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder connectTimeout(java.time.Duration duration) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder connectTimeout1( + jni.JObject duration, + ) { + return _connectTimeout1(reference.pointer, + _id_connectTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_readTimeout = _class.instanceMethodId( + r"readTimeout", + r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _readTimeout = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder readTimeout(long j, java.util.concurrent.TimeUnit timeUnit) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder readTimeout( + int j, + jni.JObject timeUnit, + ) { + return _readTimeout(reference.pointer, _id_readTimeout as jni.JMethodIDPtr, + j, timeUnit.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_readTimeout1 = _class.instanceMethodId( + r"readTimeout", + r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _readTimeout1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder readTimeout(java.time.Duration duration) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder readTimeout1( + jni.JObject duration, + ) { + return _readTimeout1(reference.pointer, + _id_readTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_writeTimeout = _class.instanceMethodId( + r"writeTimeout", + r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _writeTimeout = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder writeTimeout(long j, java.util.concurrent.TimeUnit timeUnit) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder writeTimeout( + int j, + jni.JObject timeUnit, + ) { + return _writeTimeout(reference.pointer, + _id_writeTimeout as jni.JMethodIDPtr, j, timeUnit.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_writeTimeout1 = _class.instanceMethodId( + r"writeTimeout", + r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _writeTimeout1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder writeTimeout(java.time.Duration duration) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder writeTimeout1( + jni.JObject duration, + ) { + return _writeTimeout1(reference.pointer, + _id_writeTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_pingInterval = _class.instanceMethodId( + r"pingInterval", + r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _pingInterval = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder pingInterval(long j, java.util.concurrent.TimeUnit timeUnit) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder pingInterval( + int j, + jni.JObject timeUnit, + ) { + return _pingInterval(reference.pointer, + _id_pingInterval as jni.JMethodIDPtr, j, timeUnit.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_pingInterval1 = _class.instanceMethodId( + r"pingInterval", + r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _pingInterval1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder pingInterval(java.time.Duration duration) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder pingInterval1( + jni.JObject duration, + ) { + return _pingInterval1(reference.pointer, + _id_pingInterval1 as jni.JMethodIDPtr, duration.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_minWebSocketMessageToCompress = _class.instanceMethodId( + r"minWebSocketMessageToCompress", + r"(J)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _minWebSocketMessageToCompress = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final okhttp3.OkHttpClient$Builder minWebSocketMessageToCompress(long j) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder minWebSocketMessageToCompress( + int j, + ) { + return _minWebSocketMessageToCompress(reference.pointer, + _id_minWebSocketMessageToCompress as jni.JMethodIDPtr, j) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_build = _class.instanceMethodId( + r"build", + r"()Lokhttp3/OkHttpClient;", + ); + + static final _build = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.OkHttpClient build() + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient build() { + return _build(reference.pointer, _id_build as jni.JMethodIDPtr) + .object(const $OkHttpClientType()); + } +} + +final class $OkHttpClient_BuilderType + extends jni.JObjType { + const $OkHttpClient_BuilderType(); + + @override + String get signature => r"Lokhttp3/OkHttpClient$Builder;"; + + @override + OkHttpClient_Builder fromReference(jni.JReference reference) => + OkHttpClient_Builder.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($OkHttpClient_BuilderType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($OkHttpClient_BuilderType) && + other is $OkHttpClient_BuilderType; + } +} + +/// from: okhttp3.OkHttpClient$Companion +class OkHttpClient_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + OkHttpClient_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient$Companion"); + + /// The type which includes information such as the signature of this class. + static const type = $OkHttpClient_CompanionType(); + static final _id_new0 = _class.constructorId( + r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory OkHttpClient_Companion( + jni.JObject defaultConstructorMarker, + ) { + return OkHttpClient_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $OkHttpClient_CompanionType + extends jni.JObjType { + const $OkHttpClient_CompanionType(); + + @override + String get signature => r"Lokhttp3/OkHttpClient$Companion;"; + + @override + OkHttpClient_Companion fromReference(jni.JReference reference) => + OkHttpClient_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($OkHttpClient_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($OkHttpClient_CompanionType) && + other is $OkHttpClient_CompanionType; + } +} + +/// from: okhttp3.OkHttpClient +class OkHttpClient extends jni.JObject { + @override + late final jni.JObjType $type = type; + + OkHttpClient.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient"); + + /// The type which includes information such as the signature of this class. + static const type = $OkHttpClientType(); + static final _id_Companion = _class.staticFieldId( + r"Companion", + r"Lokhttp3/OkHttpClient$Companion;", + ); + + /// from: static public final okhttp3.OkHttpClient$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static OkHttpClient_Companion get Companion => + _id_Companion.get(_class, const $OkHttpClient_CompanionType()); + + static final _id_new0 = _class.constructorId( + r"(Lokhttp3/OkHttpClient$Builder;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (okhttp3.OkHttpClient$Builder builder) + /// The returned object must be released after use, by calling the [release] method. + factory OkHttpClient( + OkHttpClient_Builder builder, + ) { + return OkHttpClient.fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, builder.reference.pointer) + .reference); + } + + static final _id_dispatcher = _class.instanceMethodId( + r"dispatcher", + r"()Lokhttp3/Dispatcher;", + ); + + static final _dispatcher = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Dispatcher dispatcher() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject dispatcher() { + return _dispatcher(reference.pointer, _id_dispatcher as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_connectionPool = _class.instanceMethodId( + r"connectionPool", + r"()Lokhttp3/ConnectionPool;", + ); + + static final _connectionPool = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.ConnectionPool connectionPool() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject connectionPool() { + return _connectionPool( + reference.pointer, _id_connectionPool as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_interceptors = _class.instanceMethodId( + r"interceptors", + r"()Ljava/util/List;", + ); + + static final _interceptors = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List interceptors() + /// The returned object must be released after use, by calling the [release] method. + jni.JList interceptors() { + return _interceptors( + reference.pointer, _id_interceptors as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_networkInterceptors = _class.instanceMethodId( + r"networkInterceptors", + r"()Ljava/util/List;", + ); + + static final _networkInterceptors = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List networkInterceptors() + /// The returned object must be released after use, by calling the [release] method. + jni.JList networkInterceptors() { + return _networkInterceptors( + reference.pointer, _id_networkInterceptors as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_eventListenerFactory = _class.instanceMethodId( + r"eventListenerFactory", + r"()Lokhttp3/EventListener$Factory;", + ); + + static final _eventListenerFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.EventListener$Factory eventListenerFactory() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject eventListenerFactory() { + return _eventListenerFactory( + reference.pointer, _id_eventListenerFactory as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_retryOnConnectionFailure = _class.instanceMethodId( + r"retryOnConnectionFailure", + r"()Z", + ); + + static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean retryOnConnectionFailure() + bool retryOnConnectionFailure() { + return _retryOnConnectionFailure( + reference.pointer, _id_retryOnConnectionFailure as jni.JMethodIDPtr) + .boolean; + } + + static final _id_authenticator = _class.instanceMethodId( + r"authenticator", + r"()Lokhttp3/Authenticator;", + ); + + static final _authenticator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Authenticator authenticator() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject authenticator() { + return _authenticator( + reference.pointer, _id_authenticator as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_followRedirects = _class.instanceMethodId( + r"followRedirects", + r"()Z", + ); + + static final _followRedirects = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean followRedirects() + bool followRedirects() { + return _followRedirects( + reference.pointer, _id_followRedirects as jni.JMethodIDPtr) + .boolean; + } + + static final _id_followSslRedirects = _class.instanceMethodId( + r"followSslRedirects", + r"()Z", + ); + + static final _followSslRedirects = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean followSslRedirects() + bool followSslRedirects() { + return _followSslRedirects( + reference.pointer, _id_followSslRedirects as jni.JMethodIDPtr) + .boolean; + } + + static final _id_cookieJar = _class.instanceMethodId( + r"cookieJar", + r"()Lokhttp3/CookieJar;", + ); + + static final _cookieJar = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.CookieJar cookieJar() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject cookieJar() { + return _cookieJar(reference.pointer, _id_cookieJar as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_cache = _class.instanceMethodId( + r"cache", + r"()Lokhttp3/Cache;", + ); + + static final _cache = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Cache cache() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject cache() { + return _cache(reference.pointer, _id_cache as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_dns = _class.instanceMethodId( + r"dns", + r"()Lokhttp3/Dns;", + ); + + static final _dns = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Dns dns() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject dns() { + return _dns(reference.pointer, _id_dns as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_proxy = _class.instanceMethodId( + r"proxy", + r"()Ljava/net/Proxy;", + ); + + static final _proxy = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.net.Proxy proxy() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject proxy() { + return _proxy(reference.pointer, _id_proxy as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_proxySelector = _class.instanceMethodId( + r"proxySelector", + r"()Ljava/net/ProxySelector;", + ); + + static final _proxySelector = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.net.ProxySelector proxySelector() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject proxySelector() { + return _proxySelector( + reference.pointer, _id_proxySelector as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_proxyAuthenticator = _class.instanceMethodId( + r"proxyAuthenticator", + r"()Lokhttp3/Authenticator;", + ); + + static final _proxyAuthenticator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Authenticator proxyAuthenticator() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject proxyAuthenticator() { + return _proxyAuthenticator( + reference.pointer, _id_proxyAuthenticator as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_socketFactory = _class.instanceMethodId( + r"socketFactory", + r"()Ljavax/net/SocketFactory;", + ); + + static final _socketFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final javax.net.SocketFactory socketFactory() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject socketFactory() { + return _socketFactory( + reference.pointer, _id_socketFactory as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_sslSocketFactory = _class.instanceMethodId( + r"sslSocketFactory", + r"()Ljavax/net/ssl/SSLSocketFactory;", + ); + + static final _sslSocketFactory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final javax.net.ssl.SSLSocketFactory sslSocketFactory() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject sslSocketFactory() { + return _sslSocketFactory( + reference.pointer, _id_sslSocketFactory as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_x509TrustManager = _class.instanceMethodId( + r"x509TrustManager", + r"()Ljavax/net/ssl/X509TrustManager;", + ); + + static final _x509TrustManager = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final javax.net.ssl.X509TrustManager x509TrustManager() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject x509TrustManager() { + return _x509TrustManager( + reference.pointer, _id_x509TrustManager as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_connectionSpecs = _class.instanceMethodId( + r"connectionSpecs", + r"()Ljava/util/List;", + ); + + static final _connectionSpecs = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List connectionSpecs() + /// The returned object must be released after use, by calling the [release] method. + jni.JList connectionSpecs() { + return _connectionSpecs( + reference.pointer, _id_connectionSpecs as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_protocols = _class.instanceMethodId( + r"protocols", + r"()Ljava/util/List;", + ); + + static final _protocols = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List protocols() + /// The returned object must be released after use, by calling the [release] method. + jni.JList protocols() { + return _protocols(reference.pointer, _id_protocols as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_hostnameVerifier = _class.instanceMethodId( + r"hostnameVerifier", + r"()Ljavax/net/ssl/HostnameVerifier;", + ); + + static final _hostnameVerifier = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final javax.net.ssl.HostnameVerifier hostnameVerifier() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject hostnameVerifier() { + return _hostnameVerifier( + reference.pointer, _id_hostnameVerifier as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_certificatePinner = _class.instanceMethodId( + r"certificatePinner", + r"()Lokhttp3/CertificatePinner;", + ); + + static final _certificatePinner = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.CertificatePinner certificatePinner() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject certificatePinner() { + return _certificatePinner( + reference.pointer, _id_certificatePinner as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_certificateChainCleaner = _class.instanceMethodId( + r"certificateChainCleaner", + r"()Lokhttp3/internal/tls/CertificateChainCleaner;", + ); + + static final _certificateChainCleaner = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.internal.tls.CertificateChainCleaner certificateChainCleaner() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject certificateChainCleaner() { + return _certificateChainCleaner( + reference.pointer, _id_certificateChainCleaner as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_callTimeoutMillis = _class.instanceMethodId( + r"callTimeoutMillis", + r"()I", + ); + + static final _callTimeoutMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int callTimeoutMillis() + int callTimeoutMillis() { + return _callTimeoutMillis( + reference.pointer, _id_callTimeoutMillis as jni.JMethodIDPtr) + .integer; + } + + static final _id_connectTimeoutMillis = _class.instanceMethodId( + r"connectTimeoutMillis", + r"()I", + ); + + static final _connectTimeoutMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int connectTimeoutMillis() + int connectTimeoutMillis() { + return _connectTimeoutMillis( + reference.pointer, _id_connectTimeoutMillis as jni.JMethodIDPtr) + .integer; + } + + static final _id_readTimeoutMillis = _class.instanceMethodId( + r"readTimeoutMillis", + r"()I", + ); + + static final _readTimeoutMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int readTimeoutMillis() + int readTimeoutMillis() { + return _readTimeoutMillis( + reference.pointer, _id_readTimeoutMillis as jni.JMethodIDPtr) + .integer; + } + + static final _id_writeTimeoutMillis = _class.instanceMethodId( + r"writeTimeoutMillis", + r"()I", + ); + + static final _writeTimeoutMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int writeTimeoutMillis() + int writeTimeoutMillis() { + return _writeTimeoutMillis( + reference.pointer, _id_writeTimeoutMillis as jni.JMethodIDPtr) + .integer; + } + + static final _id_pingIntervalMillis = _class.instanceMethodId( + r"pingIntervalMillis", + r"()I", + ); + + static final _pingIntervalMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int pingIntervalMillis() + int pingIntervalMillis() { + return _pingIntervalMillis( + reference.pointer, _id_pingIntervalMillis as jni.JMethodIDPtr) + .integer; + } + + static final _id_minWebSocketMessageToCompress = _class.instanceMethodId( + r"minWebSocketMessageToCompress", + r"()J", + ); + + static final _minWebSocketMessageToCompress = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final long minWebSocketMessageToCompress() + int minWebSocketMessageToCompress() { + return _minWebSocketMessageToCompress(reference.pointer, + _id_minWebSocketMessageToCompress as jni.JMethodIDPtr) + .long; + } + + static final _id_getRouteDatabase = _class.instanceMethodId( + r"getRouteDatabase", + r"()Lokhttp3/internal/connection/RouteDatabase;", + ); + + static final _getRouteDatabase = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.internal.connection.RouteDatabase getRouteDatabase() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject getRouteDatabase() { + return _getRouteDatabase( + reference.pointer, _id_getRouteDatabase as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_new1 = _class.constructorId( + r"()V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory OkHttpClient.new1() { + return OkHttpClient.fromReference( + _new1(_class.reference.pointer, _id_new1 as jni.JMethodIDPtr) + .reference); + } + + static final _id_newCall = _class.instanceMethodId( + r"newCall", + r"(Lokhttp3/Request;)Lokhttp3/Call;", + ); + + static final _newCall = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okhttp3.Call newCall(okhttp3.Request request) + /// The returned object must be released after use, by calling the [release] method. + Call newCall( + Request request, + ) { + return _newCall(reference.pointer, _id_newCall as jni.JMethodIDPtr, + request.reference.pointer) + .object(const $CallType()); + } + + static final _id_newWebSocket = _class.instanceMethodId( + r"newWebSocket", + r"(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;", + ); + + static final _newWebSocket = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public okhttp3.WebSocket newWebSocket(okhttp3.Request request, okhttp3.WebSocketListener webSocketListener) + /// The returned object must be released after use, by calling the [release] method. + jni.JObject newWebSocket( + Request request, + jni.JObject webSocketListener, + ) { + return _newWebSocket( + reference.pointer, + _id_newWebSocket as jni.JMethodIDPtr, + request.reference.pointer, + webSocketListener.reference.pointer) + .object(const jni.JObjectType()); + } + + static final _id_newBuilder = _class.instanceMethodId( + r"newBuilder", + r"()Lokhttp3/OkHttpClient$Builder;", + ); + + static final _newBuilder = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okhttp3.OkHttpClient$Builder newBuilder() + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder newBuilder() { + return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_clone = _class.instanceMethodId( + r"clone", + r"()Ljava/lang/Object;", + ); + + static final _clone = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.Object clone() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject clone() { + return _clone(reference.pointer, _id_clone as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } +} + +final class $OkHttpClientType extends jni.JObjType { + const $OkHttpClientType(); + + @override + String get signature => r"Lokhttp3/OkHttpClient;"; + + @override + OkHttpClient fromReference(jni.JReference reference) => + OkHttpClient.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($OkHttpClientType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($OkHttpClientType) && + other is $OkHttpClientType; + } +} + +/// from: okhttp3.Call$Factory +class Call_Factory extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Call_Factory.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Call$Factory"); + + /// The type which includes information such as the signature of this class. + static const type = $Call_FactoryType(); + static final _id_newCall = _class.instanceMethodId( + r"newCall", + r"(Lokhttp3/Request;)Lokhttp3/Call;", + ); + + static final _newCall = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public abstract okhttp3.Call newCall(okhttp3.Request request) + /// The returned object must be released after use, by calling the [release] method. + Call newCall( + Request request, + ) { + return _newCall(reference.pointer, _id_newCall as jni.JMethodIDPtr, + request.reference.pointer) + .object(const $CallType()); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r"newCall(Lokhttp3/Request;)Lokhttp3/Call;") { + final $r = _$impls[$p]!.newCall( + $a[0].castTo(const $RequestType(), releaseOriginal: true), + ); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e.toString()); + } + return jni.nullptr; + } + + factory Call_Factory.implement( + $Call_FactoryImpl $impl, + ) { + final $p = ReceivePort(); + final $x = Call_Factory.fromReference( + ProtectedJniExtensions.newPortProxy( + r"okhttp3.Call$Factory", + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $Call_FactoryImpl { + factory $Call_FactoryImpl({ + required Call Function(Request request) newCall, + }) = _$Call_FactoryImpl; + + Call newCall(Request request); +} + +class _$Call_FactoryImpl implements $Call_FactoryImpl { + _$Call_FactoryImpl({ + required Call Function(Request request) newCall, + }) : _newCall = newCall; + + final Call Function(Request request) _newCall; + + Call newCall(Request request) { + return _newCall(request); + } +} + +final class $Call_FactoryType extends jni.JObjType { + const $Call_FactoryType(); + + @override + String get signature => r"Lokhttp3/Call$Factory;"; + + @override + Call_Factory fromReference(jni.JReference reference) => + Call_Factory.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($Call_FactoryType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($Call_FactoryType) && + other is $Call_FactoryType; + } +} + +/// from: okhttp3.Call +class Call extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Call.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Call"); + + /// The type which includes information such as the signature of this class. + static const type = $CallType(); + static final _id_request = _class.instanceMethodId( + r"request", + r"()Lokhttp3/Request;", + ); + + static final _request = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okhttp3.Request request() + /// The returned object must be released after use, by calling the [release] method. + Request request() { + return _request(reference.pointer, _id_request as jni.JMethodIDPtr) + .object(const $RequestType()); + } + + static final _id_execute = _class.instanceMethodId( + r"execute", + r"()Lokhttp3/Response;", + ); + + static final _execute = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okhttp3.Response execute() + /// The returned object must be released after use, by calling the [release] method. + Response execute() { + return _execute(reference.pointer, _id_execute as jni.JMethodIDPtr) + .object(const $ResponseType()); + } + + static final _id_enqueue = _class.instanceMethodId( + r"enqueue", + r"(Lokhttp3/Callback;)V", + ); + + static final _enqueue = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public abstract void enqueue(okhttp3.Callback callback) + void enqueue( + Callback callback, + ) { + _enqueue(reference.pointer, _id_enqueue as jni.JMethodIDPtr, + callback.reference.pointer) + .check(); + } + + static final _id_cancel = _class.instanceMethodId( + r"cancel", + r"()V", + ); + + static final _cancel = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract void cancel() + void cancel() { + _cancel(reference.pointer, _id_cancel as jni.JMethodIDPtr).check(); + } + + static final _id_isExecuted = _class.instanceMethodId( + r"isExecuted", + r"()Z", + ); + + static final _isExecuted = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract boolean isExecuted() + bool isExecuted() { + return _isExecuted(reference.pointer, _id_isExecuted as jni.JMethodIDPtr) + .boolean; + } + + static final _id_isCanceled = _class.instanceMethodId( + r"isCanceled", + r"()Z", + ); + + static final _isCanceled = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract boolean isCanceled() + bool isCanceled() { + return _isCanceled(reference.pointer, _id_isCanceled as jni.JMethodIDPtr) + .boolean; + } + + static final _id_timeout = _class.instanceMethodId( + r"timeout", + r"()Lokio/Timeout;", + ); + + static final _timeout = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okio.Timeout timeout() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject timeout() { + return _timeout(reference.pointer, _id_timeout as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_clone = _class.instanceMethodId( + r"clone", + r"()Lokhttp3/Call;", + ); + + static final _clone = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okhttp3.Call clone() + /// The returned object must be released after use, by calling the [release] method. + Call clone() { + return _clone(reference.pointer, _id_clone as jni.JMethodIDPtr) + .object(const $CallType()); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r"request()Lokhttp3/Request;") { + final $r = _$impls[$p]!.request(); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r"execute()Lokhttp3/Response;") { + final $r = _$impls[$p]!.execute(); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r"enqueue(Lokhttp3/Callback;)V") { + _$impls[$p]!.enqueue( + $a[0].castTo(const $CallbackType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == r"cancel()V") { + _$impls[$p]!.cancel(); + return jni.nullptr; + } + if ($d == r"isExecuted()Z") { + final $r = _$impls[$p]!.isExecuted(); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r"isCanceled()Z") { + final $r = _$impls[$p]!.isCanceled(); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r"timeout()Lokio/Timeout;") { + final $r = _$impls[$p]!.timeout(); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r"clone()Lokhttp3/Call;") { + final $r = _$impls[$p]!.clone(); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e.toString()); + } + return jni.nullptr; + } + + factory Call.implement( + $CallImpl $impl, + ) { + final $p = ReceivePort(); + final $x = Call.fromReference( + ProtectedJniExtensions.newPortProxy( + r"okhttp3.Call", + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $CallImpl { + factory $CallImpl({ + required Request Function() request, + required Response Function() execute, + required void Function(Callback callback) enqueue, + required void Function() cancel, + required bool Function() isExecuted, + required bool Function() isCanceled, + required jni.JObject Function() timeout, + required Call Function() clone, + }) = _$CallImpl; + + Request request(); + Response execute(); + void enqueue(Callback callback); + void cancel(); + bool isExecuted(); + bool isCanceled(); + jni.JObject timeout(); + Call clone(); +} + +class _$CallImpl implements $CallImpl { + _$CallImpl({ + required Request Function() request, + required Response Function() execute, + required void Function(Callback callback) enqueue, + required void Function() cancel, + required bool Function() isExecuted, + required bool Function() isCanceled, + required jni.JObject Function() timeout, + required Call Function() clone, + }) : _request = request, + _execute = execute, + _enqueue = enqueue, + _cancel = cancel, + _isExecuted = isExecuted, + _isCanceled = isCanceled, + _timeout = timeout, + _clone = clone; + + final Request Function() _request; + final Response Function() _execute; + final void Function(Callback callback) _enqueue; + final void Function() _cancel; + final bool Function() _isExecuted; + final bool Function() _isCanceled; + final jni.JObject Function() _timeout; + final Call Function() _clone; + + Request request() { + return _request(); + } + + Response execute() { + return _execute(); + } + + void enqueue(Callback callback) { + return _enqueue(callback); + } + + void cancel() { + return _cancel(); + } + + bool isExecuted() { + return _isExecuted(); + } + + bool isCanceled() { + return _isCanceled(); + } + + jni.JObject timeout() { + return _timeout(); + } + + Call clone() { + return _clone(); + } +} + +final class $CallType extends jni.JObjType { + const $CallType(); + + @override + String get signature => r"Lokhttp3/Call;"; + + @override + Call fromReference(jni.JReference reference) => Call.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($CallType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($CallType) && other is $CallType; + } +} + +/// from: okhttp3.Headers$Builder +class Headers_Builder extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Headers_Builder.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Headers$Builder"); + + /// The type which includes information such as the signature of this class. + static const type = $Headers_BuilderType(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory Headers_Builder() { + return Headers_Builder.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_add = _class.instanceMethodId( + r"add", + r"(Ljava/lang/String;)Lokhttp3/Headers$Builder;", + ); + + static final _add = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder add(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder add( + jni.JString string, + ) { + return _add(reference.pointer, _id_add as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_add1 = _class.instanceMethodId( + r"add", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", + ); + + static final _add1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder add(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder add1( + jni.JString string, + jni.JString string1, + ) { + return _add1(reference.pointer, _id_add1 as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_addUnsafeNonAscii = _class.instanceMethodId( + r"addUnsafeNonAscii", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", + ); + + static final _addUnsafeNonAscii = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder addUnsafeNonAscii(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder addUnsafeNonAscii( + jni.JString string, + jni.JString string1, + ) { + return _addUnsafeNonAscii( + reference.pointer, + _id_addUnsafeNonAscii as jni.JMethodIDPtr, + string.reference.pointer, + string1.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_addAll = _class.instanceMethodId( + r"addAll", + r"(Lokhttp3/Headers;)Lokhttp3/Headers$Builder;", + ); + + static final _addAll = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder addAll(okhttp3.Headers headers) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder addAll( + Headers headers, + ) { + return _addAll(reference.pointer, _id_addAll as jni.JMethodIDPtr, + headers.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_add2 = _class.instanceMethodId( + r"add", + r"(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;", + ); + + static final _add2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder add(java.lang.String string, java.util.Date date) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder add2( + jni.JString string, + jni.JObject date, + ) { + return _add2(reference.pointer, _id_add2 as jni.JMethodIDPtr, + string.reference.pointer, date.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_add3 = _class.instanceMethodId( + r"add", + r"(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;", + ); + + static final _add3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder add(java.lang.String string, java.time.Instant instant) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder add3( + jni.JString string, + jni.JObject instant, + ) { + return _add3(reference.pointer, _id_add3 as jni.JMethodIDPtr, + string.reference.pointer, instant.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_set0 = _class.instanceMethodId( + r"set", + r"(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;", + ); + + static final _set0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder set(java.lang.String string, java.util.Date date) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder set0( + jni.JString string, + jni.JObject date, + ) { + return _set0(reference.pointer, _id_set0 as jni.JMethodIDPtr, + string.reference.pointer, date.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_set1 = _class.instanceMethodId( + r"set", + r"(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;", + ); + + static final _set1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder set(java.lang.String string, java.time.Instant instant) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder set1( + jni.JString string, + jni.JObject instant, + ) { + return _set1(reference.pointer, _id_set1 as jni.JMethodIDPtr, + string.reference.pointer, instant.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_removeAll = _class.instanceMethodId( + r"removeAll", + r"(Ljava/lang/String;)Lokhttp3/Headers$Builder;", + ); + + static final _removeAll = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder removeAll(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder removeAll( + jni.JString string, + ) { + return _removeAll(reference.pointer, _id_removeAll as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_set2 = _class.instanceMethodId( + r"set", + r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", + ); + + static final _set2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okhttp3.Headers$Builder set(java.lang.String string, java.lang.String string1) + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder set2( + jni.JString string, + jni.JString string1, + ) { + return _set2(reference.pointer, _id_set2 as jni.JMethodIDPtr, + string.reference.pointer, string1.reference.pointer) + .object(const $Headers_BuilderType()); + } + + static final _id_get0 = _class.instanceMethodId( + r"get", + r"(Ljava/lang/String;)Ljava/lang/String;", + ); + + static final _get0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.lang.String get(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JString get0( + jni.JString string, + ) { + return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JStringType()); + } + + static final _id_build = _class.instanceMethodId( + r"build", + r"()Lokhttp3/Headers;", + ); + + static final _build = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Headers build() + /// The returned object must be released after use, by calling the [release] method. + Headers build() { + return _build(reference.pointer, _id_build as jni.JMethodIDPtr) + .object(const $HeadersType()); + } +} + +final class $Headers_BuilderType extends jni.JObjType { + const $Headers_BuilderType(); + + @override + String get signature => r"Lokhttp3/Headers$Builder;"; + + @override + Headers_Builder fromReference(jni.JReference reference) => + Headers_Builder.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($Headers_BuilderType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($Headers_BuilderType) && + other is $Headers_BuilderType; + } +} + +/// from: okhttp3.Headers$Companion +class Headers_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Headers_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Headers$Companion"); + + /// The type which includes information such as the signature of this class. + static const type = $Headers_CompanionType(); + static final _id_of = _class.instanceMethodId( + r"of", + r"([Ljava/lang/String;)Lokhttp3/Headers;", + ); + + static final _of = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.Headers of(java.lang.String[] strings) + /// The returned object must be released after use, by calling the [release] method. + Headers of( + jni.JArray strings, + ) { + return _of(reference.pointer, _id_of as jni.JMethodIDPtr, + strings.reference.pointer) + .object(const $HeadersType()); + } + + static final _id_of1 = _class.instanceMethodId( + r"of", + r"(Ljava/util/Map;)Lokhttp3/Headers;", + ); + + static final _of1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.Headers of(java.util.Map map) + /// The returned object must be released after use, by calling the [release] method. + Headers of1( + jni.JMap map, + ) { + return _of1(reference.pointer, _id_of1 as jni.JMethodIDPtr, + map.reference.pointer) + .object(const $HeadersType()); + } + + static final _id_new0 = _class.constructorId( + r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory Headers_Companion( + jni.JObject defaultConstructorMarker, + ) { + return Headers_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $Headers_CompanionType extends jni.JObjType { + const $Headers_CompanionType(); + + @override + String get signature => r"Lokhttp3/Headers$Companion;"; + + @override + Headers_Companion fromReference(jni.JReference reference) => + Headers_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($Headers_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($Headers_CompanionType) && + other is $Headers_CompanionType; + } +} + +/// from: okhttp3.Headers +class Headers extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Headers.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Headers"); + + /// The type which includes information such as the signature of this class. + static const type = $HeadersType(); + static final _id_Companion = _class.staticFieldId( + r"Companion", + r"Lokhttp3/Headers$Companion;", + ); + + /// from: static public final okhttp3.Headers$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static Headers_Companion get Companion => + _id_Companion.get(_class, const $Headers_CompanionType()); + + static final _id_get0 = _class.instanceMethodId( + r"get", + r"(Ljava/lang/String;)Ljava/lang/String;", + ); + + static final _get0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.lang.String get(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JString get0( + jni.JString string, + ) { + return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JStringType()); + } + + static final _id_getDate = _class.instanceMethodId( + r"getDate", + r"(Ljava/lang/String;)Ljava/util/Date;", + ); + + static final _getDate = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.util.Date getDate(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JObject getDate( + jni.JString string, + ) { + return _getDate(reference.pointer, _id_getDate as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JObjectType()); + } + + static final _id_getInstant = _class.instanceMethodId( + r"getInstant", + r"(Ljava/lang/String;)Ljava/time/Instant;", + ); + + static final _getInstant = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.time.Instant getInstant(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JObject getInstant( + jni.JString string, + ) { + return _getInstant(reference.pointer, _id_getInstant as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JObjectType()); + } + + static final _id_size = _class.instanceMethodId( + r"size", + r"()I", + ); + + static final _size = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int size() + int size() { + return _size(reference.pointer, _id_size as jni.JMethodIDPtr).integer; + } + + static final _id_name = _class.instanceMethodId( + r"name", + r"(I)Ljava/lang/String;", + ); + + static final _name = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final java.lang.String name(int i) + /// The returned object must be released after use, by calling the [release] method. + jni.JString name( + int i, + ) { + return _name(reference.pointer, _id_name as jni.JMethodIDPtr, i) + .object(const jni.JStringType()); + } + + static final _id_value = _class.instanceMethodId( + r"value", + r"(I)Ljava/lang/String;", + ); + + static final _value = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final java.lang.String value(int i) + /// The returned object must be released after use, by calling the [release] method. + jni.JString value( + int i, + ) { + return _value(reference.pointer, _id_value as jni.JMethodIDPtr, i) + .object(const jni.JStringType()); + } + + static final _id_names = _class.instanceMethodId( + r"names", + r"()Ljava/util/Set;", + ); + + static final _names = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.Set names() + /// The returned object must be released after use, by calling the [release] method. + jni.JSet names() { + return _names(reference.pointer, _id_names as jni.JMethodIDPtr) + .object(const jni.JSetType(jni.JStringType())); + } + + static final _id_values = _class.instanceMethodId( + r"values", + r"(Ljava/lang/String;)Ljava/util/List;", + ); + + static final _values = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.util.List values(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + jni.JList values( + jni.JString string, + ) { + return _values(reference.pointer, _id_values as jni.JMethodIDPtr, + string.reference.pointer) + .object(const jni.JListType(jni.JStringType())); + } + + static final _id_byteCount = _class.instanceMethodId( + r"byteCount", + r"()J", + ); + + static final _byteCount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final long byteCount() + int byteCount() { + return _byteCount(reference.pointer, _id_byteCount as jni.JMethodIDPtr) + .long; + } + + static final _id_iterator = _class.instanceMethodId( + r"iterator", + r"()Ljava/util/Iterator;", + ); + + static final _iterator = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.util.Iterator iterator() + /// The returned object must be released after use, by calling the [release] method. + jni.JIterator iterator() { + return _iterator(reference.pointer, _id_iterator as jni.JMethodIDPtr) + .object(const jni.JIteratorType(jni.JObjectType())); + } + + static final _id_newBuilder = _class.instanceMethodId( + r"newBuilder", + r"()Lokhttp3/Headers$Builder;", + ); + + static final _newBuilder = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okhttp3.Headers$Builder newBuilder() + /// The returned object must be released after use, by calling the [release] method. + Headers_Builder newBuilder() { + return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) + .object(const $Headers_BuilderType()); + } + + static final _id_equals = _class.instanceMethodId( + r"equals", + r"(Ljava/lang/Object;)Z", + ); + + static final _equals = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public boolean equals(java.lang.Object object) + bool equals( + jni.JObject object, + ) { + return _equals(reference.pointer, _id_equals as jni.JMethodIDPtr, + object.reference.pointer) + .boolean; + } + + static final _id_hashCode1 = _class.instanceMethodId( + r"hashCode", + r"()I", + ); + + static final _hashCode1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public int hashCode() + int hashCode1() { + return _hashCode1(reference.pointer, _id_hashCode1 as jni.JMethodIDPtr) + .integer; + } + + static final _id_toString1 = _class.instanceMethodId( + r"toString", + r"()Ljava/lang/String;", + ); + + static final _toString1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String toString() + /// The returned object must be released after use, by calling the [release] method. + jni.JString toString1() { + return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_toMultimap = _class.instanceMethodId( + r"toMultimap", + r"()Ljava/util/Map;", + ); + + static final _toMultimap = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.Map toMultimap() + /// The returned object must be released after use, by calling the [release] method. + jni.JMap> toMultimap() { + return _toMultimap(reference.pointer, _id_toMultimap as jni.JMethodIDPtr) + .object(const jni.JMapType( + jni.JStringType(), jni.JListType(jni.JStringType()))); + } + + static final _id_of = _class.staticMethodId( + r"of", + r"([Ljava/lang/String;)Lokhttp3/Headers;", + ); + + static final _of = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okhttp3.Headers of(java.lang.String[] strings) + /// The returned object must be released after use, by calling the [release] method. + static Headers of( + jni.JArray strings, + ) { + return _of(_class.reference.pointer, _id_of as jni.JMethodIDPtr, + strings.reference.pointer) + .object(const $HeadersType()); + } + + static final _id_of1 = _class.staticMethodId( + r"of", + r"(Ljava/util/Map;)Lokhttp3/Headers;", + ); + + static final _of1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okhttp3.Headers of(java.util.Map map) + /// The returned object must be released after use, by calling the [release] method. + static Headers of1( + jni.JMap map, + ) { + return _of1(_class.reference.pointer, _id_of1 as jni.JMethodIDPtr, + map.reference.pointer) + .object(const $HeadersType()); + } + + static final _id_new0 = _class.constructorId( + r"([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public void (java.lang.String[] strings, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory Headers( + jni.JArray strings, + jni.JObject defaultConstructorMarker, + ) { + return Headers.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + strings.reference.pointer, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $HeadersType extends jni.JObjType { + const $HeadersType(); + + @override + String get signature => r"Lokhttp3/Headers;"; + + @override + Headers fromReference(jni.JReference reference) => + Headers.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($HeadersType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($HeadersType) && other is $HeadersType; + } +} + +/// from: okhttp3.Callback +class Callback extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Callback.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Callback"); + + /// The type which includes information such as the signature of this class. + static const type = $CallbackType(); + static final _id_onFailure = _class.instanceMethodId( + r"onFailure", + r"(Lokhttp3/Call;Ljava/io/IOException;)V", + ); + + static final _onFailure = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract void onFailure(okhttp3.Call call, java.io.IOException iOException) + void onFailure( + Call call, + jni.JObject iOException, + ) { + _onFailure(reference.pointer, _id_onFailure as jni.JMethodIDPtr, + call.reference.pointer, iOException.reference.pointer) + .check(); + } + + static final _id_onResponse = _class.instanceMethodId( + r"onResponse", + r"(Lokhttp3/Call;Lokhttp3/Response;)V", + ); + + static final _onResponse = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract void onResponse(okhttp3.Call call, okhttp3.Response response) + void onResponse( + Call call, + Response response, + ) { + _onResponse(reference.pointer, _id_onResponse as jni.JMethodIDPtr, + call.reference.pointer, response.reference.pointer) + .check(); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r"onFailure(Lokhttp3/Call;Ljava/io/IOException;)V") { + _$impls[$p]!.onFailure( + $a[0].castTo(const $CallType(), releaseOriginal: true), + $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == r"onResponse(Lokhttp3/Call;Lokhttp3/Response;)V") { + _$impls[$p]!.onResponse( + $a[0].castTo(const $CallType(), releaseOriginal: true), + $a[1].castTo(const $ResponseType(), releaseOriginal: true), + ); + return jni.nullptr; + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e.toString()); + } + return jni.nullptr; + } + + factory Callback.implement( + $CallbackImpl $impl, + ) { + final $p = ReceivePort(); + final $x = Callback.fromReference( + ProtectedJniExtensions.newPortProxy( + r"okhttp3.Callback", + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $CallbackImpl { + factory $CallbackImpl({ + required void Function(Call call, jni.JObject iOException) onFailure, + required void Function(Call call, Response response) onResponse, + }) = _$CallbackImpl; + + void onFailure(Call call, jni.JObject iOException); + void onResponse(Call call, Response response); +} + +class _$CallbackImpl implements $CallbackImpl { + _$CallbackImpl({ + required void Function(Call call, jni.JObject iOException) onFailure, + required void Function(Call call, Response response) onResponse, + }) : _onFailure = onFailure, + _onResponse = onResponse; + + final void Function(Call call, jni.JObject iOException) _onFailure; + final void Function(Call call, Response response) _onResponse; + + void onFailure(Call call, jni.JObject iOException) { + return _onFailure(call, iOException); + } + + void onResponse(Call call, Response response) { + return _onResponse(call, response); + } +} + +final class $CallbackType extends jni.JObjType { + const $CallbackType(); + + @override + String get signature => r"Lokhttp3/Callback;"; + + @override + Callback fromReference(jni.JReference reference) => + Callback.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($CallbackType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($CallbackType) && other is $CallbackType; + } +} diff --git a/pkgs/ok_http/lib/src/ok_http_client.dart b/pkgs/ok_http/lib/src/ok_http_client.dart index d3d1c8eb69..a26f4b518a 100644 --- a/pkgs/ok_http/lib/src/ok_http_client.dart +++ b/pkgs/ok_http/lib/src/ok_http_client.dart @@ -18,7 +18,7 @@ import 'dart:typed_data'; import 'package:http/http.dart'; import 'package:jni/jni.dart'; -import 'third_party/okhttp3/_package.dart' as bindings; +import 'jni/bindings.dart' as bindings; /// An HTTP [Client] utilizing the [OkHttp](https://square.github.io/okhttp/) client. /// diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/Call.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/Call.dart deleted file mode 100644 index 68c52c2a83..0000000000 --- a/pkgs/ok_http/lib/src/third_party/okhttp3/Call.dart +++ /dev/null @@ -1,609 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "Request.dart" as request_; - -import "Response.dart" as response_; - -import "Callback.dart" as callback_; - -/// from: okhttp3.Call$Factory -class Call_Factory extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Call_Factory.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/Call$Factory"); - - /// The type which includes information such as the signature of this class. - static const type = $Call_FactoryType(); - static final _id_newCall = _class.instanceMethodId( - r"newCall", - r"(Lokhttp3/Request;)Lokhttp3/Call;", - ); - - static final _newCall = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public abstract okhttp3.Call newCall(okhttp3.Request request) - /// The returned object must be released after use, by calling the [release] method. - Call newCall( - request_.Request request, - ) { - return _newCall(reference.pointer, _id_newCall as jni.JMethodIDPtr, - request.reference.pointer) - .object(const $CallType()); - } - - /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( - int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, - ) { - return _$invokeMethod( - port, - $MethodInvocation.fromAddresses( - 0, - descriptor.address, - args.address, - ), - ); - } - - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); - - static ffi.Pointer _$invokeMethod( - int $p, - $MethodInvocation $i, - ) { - try { - final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); - final $a = $i.args; - if ($d == r"newCall(Lokhttp3/Request;)Lokhttp3/Call;") { - final $r = _$impls[$p]!.newCall( - $a[0].castTo(const request_.$RequestType(), releaseOriginal: true), - ); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) - .reference - .toPointer(); - } - } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); - } - return jni.nullptr; - } - - factory Call_Factory.implement( - $Call_FactoryImpl $impl, - ) { - final $p = ReceivePort(); - final $x = Call_Factory.fromReference( - ProtectedJniExtensions.newPortProxy( - r"okhttp3.Call$Factory", - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { - if ($m == null) { - _$impls.remove($p.sendPort.nativePort); - $p.close(); - return; - } - final $i = $MethodInvocation.fromMessage($m as List); - final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); - }); - return $x; - } -} - -abstract interface class $Call_FactoryImpl { - factory $Call_FactoryImpl({ - required Call Function(request_.Request request) newCall, - }) = _$Call_FactoryImpl; - - Call newCall(request_.Request request); -} - -class _$Call_FactoryImpl implements $Call_FactoryImpl { - _$Call_FactoryImpl({ - required Call Function(request_.Request request) newCall, - }) : _newCall = newCall; - - final Call Function(request_.Request request) _newCall; - - Call newCall(request_.Request request) { - return _newCall(request); - } -} - -final class $Call_FactoryType extends jni.JObjType { - const $Call_FactoryType(); - - @override - String get signature => r"Lokhttp3/Call$Factory;"; - - @override - Call_Factory fromReference(jni.JReference reference) => - Call_Factory.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($Call_FactoryType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($Call_FactoryType) && - other is $Call_FactoryType; - } -} - -/// from: okhttp3.Call -class Call extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Call.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/Call"); - - /// The type which includes information such as the signature of this class. - static const type = $CallType(); - static final _id_request = _class.instanceMethodId( - r"request", - r"()Lokhttp3/Request;", - ); - - static final _request = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public abstract okhttp3.Request request() - /// The returned object must be released after use, by calling the [release] method. - request_.Request request() { - return _request(reference.pointer, _id_request as jni.JMethodIDPtr) - .object(const request_.$RequestType()); - } - - static final _id_execute = _class.instanceMethodId( - r"execute", - r"()Lokhttp3/Response;", - ); - - static final _execute = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public abstract okhttp3.Response execute() - /// The returned object must be released after use, by calling the [release] method. - response_.Response execute() { - return _execute(reference.pointer, _id_execute as jni.JMethodIDPtr) - .object(const response_.$ResponseType()); - } - - static final _id_enqueue = _class.instanceMethodId( - r"enqueue", - r"(Lokhttp3/Callback;)V", - ); - - static final _enqueue = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") - .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public abstract void enqueue(okhttp3.Callback callback) - void enqueue( - callback_.Callback callback, - ) { - _enqueue(reference.pointer, _id_enqueue as jni.JMethodIDPtr, - callback.reference.pointer) - .check(); - } - - static final _id_cancel = _class.instanceMethodId( - r"cancel", - r"()V", - ); - - static final _cancel = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") - .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public abstract void cancel() - void cancel() { - _cancel(reference.pointer, _id_cancel as jni.JMethodIDPtr).check(); - } - - static final _id_isExecuted = _class.instanceMethodId( - r"isExecuted", - r"()Z", - ); - - static final _isExecuted = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public abstract boolean isExecuted() - bool isExecuted() { - return _isExecuted(reference.pointer, _id_isExecuted as jni.JMethodIDPtr) - .boolean; - } - - static final _id_isCanceled = _class.instanceMethodId( - r"isCanceled", - r"()Z", - ); - - static final _isCanceled = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public abstract boolean isCanceled() - bool isCanceled() { - return _isCanceled(reference.pointer, _id_isCanceled as jni.JMethodIDPtr) - .boolean; - } - - static final _id_timeout = _class.instanceMethodId( - r"timeout", - r"()Lokio/Timeout;", - ); - - static final _timeout = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public abstract okio.Timeout timeout() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject timeout() { - return _timeout(reference.pointer, _id_timeout as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_clone = _class.instanceMethodId( - r"clone", - r"()Lokhttp3/Call;", - ); - - static final _clone = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public abstract okhttp3.Call clone() - /// The returned object must be released after use, by calling the [release] method. - Call clone() { - return _clone(reference.pointer, _id_clone as jni.JMethodIDPtr) - .object(const $CallType()); - } - - /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( - int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, - ) { - return _$invokeMethod( - port, - $MethodInvocation.fromAddresses( - 0, - descriptor.address, - args.address, - ), - ); - } - - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); - - static ffi.Pointer _$invokeMethod( - int $p, - $MethodInvocation $i, - ) { - try { - final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); - final $a = $i.args; - if ($d == r"request()Lokhttp3/Request;") { - final $r = _$impls[$p]!.request(); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) - .reference - .toPointer(); - } - if ($d == r"execute()Lokhttp3/Response;") { - final $r = _$impls[$p]!.execute(); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) - .reference - .toPointer(); - } - if ($d == r"enqueue(Lokhttp3/Callback;)V") { - _$impls[$p]!.enqueue( - $a[0].castTo(const callback_.$CallbackType(), releaseOriginal: true), - ); - return jni.nullptr; - } - if ($d == r"cancel()V") { - _$impls[$p]!.cancel(); - return jni.nullptr; - } - if ($d == r"isExecuted()Z") { - final $r = _$impls[$p]!.isExecuted(); - return jni.JBoolean($r).reference.toPointer(); - } - if ($d == r"isCanceled()Z") { - final $r = _$impls[$p]!.isCanceled(); - return jni.JBoolean($r).reference.toPointer(); - } - if ($d == r"timeout()Lokio/Timeout;") { - final $r = _$impls[$p]!.timeout(); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) - .reference - .toPointer(); - } - if ($d == r"clone()Lokhttp3/Call;") { - final $r = _$impls[$p]!.clone(); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) - .reference - .toPointer(); - } - } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); - } - return jni.nullptr; - } - - factory Call.implement( - $CallImpl $impl, - ) { - final $p = ReceivePort(); - final $x = Call.fromReference( - ProtectedJniExtensions.newPortProxy( - r"okhttp3.Call", - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { - if ($m == null) { - _$impls.remove($p.sendPort.nativePort); - $p.close(); - return; - } - final $i = $MethodInvocation.fromMessage($m as List); - final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); - }); - return $x; - } -} - -abstract interface class $CallImpl { - factory $CallImpl({ - required request_.Request Function() request, - required response_.Response Function() execute, - required void Function(callback_.Callback callback) enqueue, - required void Function() cancel, - required bool Function() isExecuted, - required bool Function() isCanceled, - required jni.JObject Function() timeout, - required Call Function() clone, - }) = _$CallImpl; - - request_.Request request(); - response_.Response execute(); - void enqueue(callback_.Callback callback); - void cancel(); - bool isExecuted(); - bool isCanceled(); - jni.JObject timeout(); - Call clone(); -} - -class _$CallImpl implements $CallImpl { - _$CallImpl({ - required request_.Request Function() request, - required response_.Response Function() execute, - required void Function(callback_.Callback callback) enqueue, - required void Function() cancel, - required bool Function() isExecuted, - required bool Function() isCanceled, - required jni.JObject Function() timeout, - required Call Function() clone, - }) : _request = request, - _execute = execute, - _enqueue = enqueue, - _cancel = cancel, - _isExecuted = isExecuted, - _isCanceled = isCanceled, - _timeout = timeout, - _clone = clone; - - final request_.Request Function() _request; - final response_.Response Function() _execute; - final void Function(callback_.Callback callback) _enqueue; - final void Function() _cancel; - final bool Function() _isExecuted; - final bool Function() _isCanceled; - final jni.JObject Function() _timeout; - final Call Function() _clone; - - request_.Request request() { - return _request(); - } - - response_.Response execute() { - return _execute(); - } - - void enqueue(callback_.Callback callback) { - return _enqueue(callback); - } - - void cancel() { - return _cancel(); - } - - bool isExecuted() { - return _isExecuted(); - } - - bool isCanceled() { - return _isCanceled(); - } - - jni.JObject timeout() { - return _timeout(); - } - - Call clone() { - return _clone(); - } -} - -final class $CallType extends jni.JObjType { - const $CallType(); - - @override - String get signature => r"Lokhttp3/Call;"; - - @override - Call fromReference(jni.JReference reference) => Call.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($CallType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($CallType) && other is $CallType; - } -} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/Callback.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/Callback.dart deleted file mode 100644 index 141720e578..0000000000 --- a/pkgs/ok_http/lib/src/third_party/okhttp3/Callback.dart +++ /dev/null @@ -1,234 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "Call.dart" as call_; - -import "Response.dart" as response_; - -/// from: okhttp3.Callback -class Callback extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Callback.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/Callback"); - - /// The type which includes information such as the signature of this class. - static const type = $CallbackType(); - static final _id_onFailure = _class.instanceMethodId( - r"onFailure", - r"(Lokhttp3/Call;Ljava/io/IOException;)V", - ); - - static final _onFailure = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") - .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public abstract void onFailure(okhttp3.Call call, java.io.IOException iOException) - void onFailure( - call_.Call call, - jni.JObject iOException, - ) { - _onFailure(reference.pointer, _id_onFailure as jni.JMethodIDPtr, - call.reference.pointer, iOException.reference.pointer) - .check(); - } - - static final _id_onResponse = _class.instanceMethodId( - r"onResponse", - r"(Lokhttp3/Call;Lokhttp3/Response;)V", - ); - - static final _onResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") - .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public abstract void onResponse(okhttp3.Call call, okhttp3.Response response) - void onResponse( - call_.Call call, - response_.Response response, - ) { - _onResponse(reference.pointer, _id_onResponse as jni.JMethodIDPtr, - call.reference.pointer, response.reference.pointer) - .check(); - } - - /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( - int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, - ) { - return _$invokeMethod( - port, - $MethodInvocation.fromAddresses( - 0, - descriptor.address, - args.address, - ), - ); - } - - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); - - static ffi.Pointer _$invokeMethod( - int $p, - $MethodInvocation $i, - ) { - try { - final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); - final $a = $i.args; - if ($d == r"onFailure(Lokhttp3/Call;Ljava/io/IOException;)V") { - _$impls[$p]!.onFailure( - $a[0].castTo(const call_.$CallType(), releaseOriginal: true), - $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), - ); - return jni.nullptr; - } - if ($d == r"onResponse(Lokhttp3/Call;Lokhttp3/Response;)V") { - _$impls[$p]!.onResponse( - $a[0].castTo(const call_.$CallType(), releaseOriginal: true), - $a[1].castTo(const response_.$ResponseType(), releaseOriginal: true), - ); - return jni.nullptr; - } - } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); - } - return jni.nullptr; - } - - factory Callback.implement( - $CallbackImpl $impl, - ) { - final $p = ReceivePort(); - final $x = Callback.fromReference( - ProtectedJniExtensions.newPortProxy( - r"okhttp3.Callback", - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { - if ($m == null) { - _$impls.remove($p.sendPort.nativePort); - $p.close(); - return; - } - final $i = $MethodInvocation.fromMessage($m as List); - final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); - }); - return $x; - } -} - -abstract interface class $CallbackImpl { - factory $CallbackImpl({ - required void Function(call_.Call call, jni.JObject iOException) onFailure, - required void Function(call_.Call call, response_.Response response) - onResponse, - }) = _$CallbackImpl; - - void onFailure(call_.Call call, jni.JObject iOException); - void onResponse(call_.Call call, response_.Response response); -} - -class _$CallbackImpl implements $CallbackImpl { - _$CallbackImpl({ - required void Function(call_.Call call, jni.JObject iOException) onFailure, - required void Function(call_.Call call, response_.Response response) - onResponse, - }) : _onFailure = onFailure, - _onResponse = onResponse; - - final void Function(call_.Call call, jni.JObject iOException) _onFailure; - final void Function(call_.Call call, response_.Response response) _onResponse; - - void onFailure(call_.Call call, jni.JObject iOException) { - return _onFailure(call, iOException); - } - - void onResponse(call_.Call call, response_.Response response) { - return _onResponse(call, response); - } -} - -final class $CallbackType extends jni.JObjType { - const $CallbackType(); - - @override - String get signature => r"Lokhttp3/Callback;"; - - @override - Callback fromReference(jni.JReference reference) => - Callback.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($CallbackType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($CallbackType) && other is $CallbackType; - } -} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/Headers.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/Headers.dart deleted file mode 100644 index 620b00b576..0000000000 --- a/pkgs/ok_http/lib/src/third_party/okhttp3/Headers.dart +++ /dev/null @@ -1,1043 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -/// from: okhttp3.Headers$Builder -class Headers_Builder extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Headers_Builder.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/Headers$Builder"); - - /// The type which includes information such as the signature of this class. - static const type = $Headers_BuilderType(); - static final _id_new0 = _class.constructorId( - r"()V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_NewObject") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory Headers_Builder() { - return Headers_Builder.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - - static final _id_add = _class.instanceMethodId( - r"add", - r"(Ljava/lang/String;)Lokhttp3/Headers$Builder;", - ); - - static final _add = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.Headers$Builder add(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - Headers_Builder add( - jni.JString string, - ) { - return _add(reference.pointer, _id_add as jni.JMethodIDPtr, - string.reference.pointer) - .object(const $Headers_BuilderType()); - } - - static final _id_add1 = _class.instanceMethodId( - r"add", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", - ); - - static final _add1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.Headers$Builder add(java.lang.String string, java.lang.String string1) - /// The returned object must be released after use, by calling the [release] method. - Headers_Builder add1( - jni.JString string, - jni.JString string1, - ) { - return _add1(reference.pointer, _id_add1 as jni.JMethodIDPtr, - string.reference.pointer, string1.reference.pointer) - .object(const $Headers_BuilderType()); - } - - static final _id_addUnsafeNonAscii = _class.instanceMethodId( - r"addUnsafeNonAscii", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", - ); - - static final _addUnsafeNonAscii = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.Headers$Builder addUnsafeNonAscii(java.lang.String string, java.lang.String string1) - /// The returned object must be released after use, by calling the [release] method. - Headers_Builder addUnsafeNonAscii( - jni.JString string, - jni.JString string1, - ) { - return _addUnsafeNonAscii( - reference.pointer, - _id_addUnsafeNonAscii as jni.JMethodIDPtr, - string.reference.pointer, - string1.reference.pointer) - .object(const $Headers_BuilderType()); - } - - static final _id_addAll = _class.instanceMethodId( - r"addAll", - r"(Lokhttp3/Headers;)Lokhttp3/Headers$Builder;", - ); - - static final _addAll = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.Headers$Builder addAll(okhttp3.Headers headers) - /// The returned object must be released after use, by calling the [release] method. - Headers_Builder addAll( - Headers headers, - ) { - return _addAll(reference.pointer, _id_addAll as jni.JMethodIDPtr, - headers.reference.pointer) - .object(const $Headers_BuilderType()); - } - - static final _id_add2 = _class.instanceMethodId( - r"add", - r"(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;", - ); - - static final _add2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.Headers$Builder add(java.lang.String string, java.util.Date date) - /// The returned object must be released after use, by calling the [release] method. - Headers_Builder add2( - jni.JString string, - jni.JObject date, - ) { - return _add2(reference.pointer, _id_add2 as jni.JMethodIDPtr, - string.reference.pointer, date.reference.pointer) - .object(const $Headers_BuilderType()); - } - - static final _id_add3 = _class.instanceMethodId( - r"add", - r"(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;", - ); - - static final _add3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.Headers$Builder add(java.lang.String string, java.time.Instant instant) - /// The returned object must be released after use, by calling the [release] method. - Headers_Builder add3( - jni.JString string, - jni.JObject instant, - ) { - return _add3(reference.pointer, _id_add3 as jni.JMethodIDPtr, - string.reference.pointer, instant.reference.pointer) - .object(const $Headers_BuilderType()); - } - - static final _id_set0 = _class.instanceMethodId( - r"set", - r"(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;", - ); - - static final _set0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.Headers$Builder set(java.lang.String string, java.util.Date date) - /// The returned object must be released after use, by calling the [release] method. - Headers_Builder set0( - jni.JString string, - jni.JObject date, - ) { - return _set0(reference.pointer, _id_set0 as jni.JMethodIDPtr, - string.reference.pointer, date.reference.pointer) - .object(const $Headers_BuilderType()); - } - - static final _id_set1 = _class.instanceMethodId( - r"set", - r"(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;", - ); - - static final _set1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.Headers$Builder set(java.lang.String string, java.time.Instant instant) - /// The returned object must be released after use, by calling the [release] method. - Headers_Builder set1( - jni.JString string, - jni.JObject instant, - ) { - return _set1(reference.pointer, _id_set1 as jni.JMethodIDPtr, - string.reference.pointer, instant.reference.pointer) - .object(const $Headers_BuilderType()); - } - - static final _id_removeAll = _class.instanceMethodId( - r"removeAll", - r"(Ljava/lang/String;)Lokhttp3/Headers$Builder;", - ); - - static final _removeAll = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.Headers$Builder removeAll(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - Headers_Builder removeAll( - jni.JString string, - ) { - return _removeAll(reference.pointer, _id_removeAll as jni.JMethodIDPtr, - string.reference.pointer) - .object(const $Headers_BuilderType()); - } - - static final _id_set2 = _class.instanceMethodId( - r"set", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", - ); - - static final _set2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.Headers$Builder set(java.lang.String string, java.lang.String string1) - /// The returned object must be released after use, by calling the [release] method. - Headers_Builder set2( - jni.JString string, - jni.JString string1, - ) { - return _set2(reference.pointer, _id_set2 as jni.JMethodIDPtr, - string.reference.pointer, string1.reference.pointer) - .object(const $Headers_BuilderType()); - } - - static final _id_get0 = _class.instanceMethodId( - r"get", - r"(Ljava/lang/String;)Ljava/lang/String;", - ); - - static final _get0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final java.lang.String get(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - jni.JString get0( - jni.JString string, - ) { - return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr, - string.reference.pointer) - .object(const jni.JStringType()); - } - - static final _id_build = _class.instanceMethodId( - r"build", - r"()Lokhttp3/Headers;", - ); - - static final _build = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Headers build() - /// The returned object must be released after use, by calling the [release] method. - Headers build() { - return _build(reference.pointer, _id_build as jni.JMethodIDPtr) - .object(const $HeadersType()); - } -} - -final class $Headers_BuilderType extends jni.JObjType { - const $Headers_BuilderType(); - - @override - String get signature => r"Lokhttp3/Headers$Builder;"; - - @override - Headers_Builder fromReference(jni.JReference reference) => - Headers_Builder.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($Headers_BuilderType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($Headers_BuilderType) && - other is $Headers_BuilderType; - } -} - -/// from: okhttp3.Headers$Companion -class Headers_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Headers_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/Headers$Companion"); - - /// The type which includes information such as the signature of this class. - static const type = $Headers_CompanionType(); - static final _id_of = _class.instanceMethodId( - r"of", - r"([Ljava/lang/String;)Lokhttp3/Headers;", - ); - - static final _of = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.Headers of(java.lang.String[] strings) - /// The returned object must be released after use, by calling the [release] method. - Headers of( - jni.JArray strings, - ) { - return _of(reference.pointer, _id_of as jni.JMethodIDPtr, - strings.reference.pointer) - .object(const $HeadersType()); - } - - static final _id_of1 = _class.instanceMethodId( - r"of", - r"(Ljava/util/Map;)Lokhttp3/Headers;", - ); - - static final _of1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.Headers of(java.util.Map map) - /// The returned object must be released after use, by calling the [release] method. - Headers of1( - jni.JMap map, - ) { - return _of1(reference.pointer, _id_of1 as jni.JMethodIDPtr, - map.reference.pointer) - .object(const $HeadersType()); - } - - static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) - /// The returned object must be released after use, by calling the [release] method. - factory Headers_Companion( - jni.JObject defaultConstructorMarker, - ) { - return Headers_Companion.fromReference(_new0( - _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, - defaultConstructorMarker.reference.pointer) - .reference); - } -} - -final class $Headers_CompanionType extends jni.JObjType { - const $Headers_CompanionType(); - - @override - String get signature => r"Lokhttp3/Headers$Companion;"; - - @override - Headers_Companion fromReference(jni.JReference reference) => - Headers_Companion.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($Headers_CompanionType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($Headers_CompanionType) && - other is $Headers_CompanionType; - } -} - -/// from: okhttp3.Headers -class Headers extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Headers.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/Headers"); - - /// The type which includes information such as the signature of this class. - static const type = $HeadersType(); - static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/Headers$Companion;", - ); - - /// from: static public final okhttp3.Headers$Companion Companion - /// The returned object must be released after use, by calling the [release] method. - static Headers_Companion get Companion => - _id_Companion.get(_class, const $Headers_CompanionType()); - - static final _id_get0 = _class.instanceMethodId( - r"get", - r"(Ljava/lang/String;)Ljava/lang/String;", - ); - - static final _get0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final java.lang.String get(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - jni.JString get0( - jni.JString string, - ) { - return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr, - string.reference.pointer) - .object(const jni.JStringType()); - } - - static final _id_getDate = _class.instanceMethodId( - r"getDate", - r"(Ljava/lang/String;)Ljava/util/Date;", - ); - - static final _getDate = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final java.util.Date getDate(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - jni.JObject getDate( - jni.JString string, - ) { - return _getDate(reference.pointer, _id_getDate as jni.JMethodIDPtr, - string.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _id_getInstant = _class.instanceMethodId( - r"getInstant", - r"(Ljava/lang/String;)Ljava/time/Instant;", - ); - - static final _getInstant = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final java.time.Instant getInstant(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - jni.JObject getInstant( - jni.JString string, - ) { - return _getInstant(reference.pointer, _id_getInstant as jni.JMethodIDPtr, - string.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _id_size = _class.instanceMethodId( - r"size", - r"()I", - ); - - static final _size = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final int size() - int size() { - return _size(reference.pointer, _id_size as jni.JMethodIDPtr).integer; - } - - static final _id_name = _class.instanceMethodId( - r"name", - r"(I)Ljava/lang/String;", - ); - - static final _name = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); - - /// from: public final java.lang.String name(int i) - /// The returned object must be released after use, by calling the [release] method. - jni.JString name( - int i, - ) { - return _name(reference.pointer, _id_name as jni.JMethodIDPtr, i) - .object(const jni.JStringType()); - } - - static final _id_value = _class.instanceMethodId( - r"value", - r"(I)Ljava/lang/String;", - ); - - static final _value = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); - - /// from: public final java.lang.String value(int i) - /// The returned object must be released after use, by calling the [release] method. - jni.JString value( - int i, - ) { - return _value(reference.pointer, _id_value as jni.JMethodIDPtr, i) - .object(const jni.JStringType()); - } - - static final _id_names = _class.instanceMethodId( - r"names", - r"()Ljava/util/Set;", - ); - - static final _names = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.util.Set names() - /// The returned object must be released after use, by calling the [release] method. - jni.JSet names() { - return _names(reference.pointer, _id_names as jni.JMethodIDPtr) - .object(const jni.JSetType(jni.JStringType())); - } - - static final _id_values = _class.instanceMethodId( - r"values", - r"(Ljava/lang/String;)Ljava/util/List;", - ); - - static final _values = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final java.util.List values(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - jni.JList values( - jni.JString string, - ) { - return _values(reference.pointer, _id_values as jni.JMethodIDPtr, - string.reference.pointer) - .object(const jni.JListType(jni.JStringType())); - } - - static final _id_byteCount = _class.instanceMethodId( - r"byteCount", - r"()J", - ); - - static final _byteCount = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final long byteCount() - int byteCount() { - return _byteCount(reference.pointer, _id_byteCount as jni.JMethodIDPtr) - .long; - } - - static final _id_iterator = _class.instanceMethodId( - r"iterator", - r"()Ljava/util/Iterator;", - ); - - static final _iterator = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public java.util.Iterator iterator() - /// The returned object must be released after use, by calling the [release] method. - jni.JIterator iterator() { - return _iterator(reference.pointer, _id_iterator as jni.JMethodIDPtr) - .object(const jni.JIteratorType(jni.JObjectType())); - } - - static final _id_newBuilder = _class.instanceMethodId( - r"newBuilder", - r"()Lokhttp3/Headers$Builder;", - ); - - static final _newBuilder = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Headers$Builder newBuilder() - /// The returned object must be released after use, by calling the [release] method. - Headers_Builder newBuilder() { - return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) - .object(const $Headers_BuilderType()); - } - - static final _id_equals = _class.instanceMethodId( - r"equals", - r"(Ljava/lang/Object;)Z", - ); - - static final _equals = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallBooleanMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public boolean equals(java.lang.Object object) - bool equals( - jni.JObject object, - ) { - return _equals(reference.pointer, _id_equals as jni.JMethodIDPtr, - object.reference.pointer) - .boolean; - } - - static final _id_hashCode1 = _class.instanceMethodId( - r"hashCode", - r"()I", - ); - - static final _hashCode1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public int hashCode() - int hashCode1() { - return _hashCode1(reference.pointer, _id_hashCode1 as jni.JMethodIDPtr) - .integer; - } - - static final _id_toString1 = _class.instanceMethodId( - r"toString", - r"()Ljava/lang/String;", - ); - - static final _toString1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public java.lang.String toString() - /// The returned object must be released after use, by calling the [release] method. - jni.JString toString1() { - return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) - .object(const jni.JStringType()); - } - - static final _id_toMultimap = _class.instanceMethodId( - r"toMultimap", - r"()Ljava/util/Map;", - ); - - static final _toMultimap = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.util.Map toMultimap() - /// The returned object must be released after use, by calling the [release] method. - jni.JMap> toMultimap() { - return _toMultimap(reference.pointer, _id_toMultimap as jni.JMethodIDPtr) - .object(const jni.JMapType( - jni.JStringType(), jni.JListType(jni.JStringType()))); - } - - static final _id_of = _class.staticMethodId( - r"of", - r"([Ljava/lang/String;)Lokhttp3/Headers;", - ); - - static final _of = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: static public final okhttp3.Headers of(java.lang.String[] strings) - /// The returned object must be released after use, by calling the [release] method. - static Headers of( - jni.JArray strings, - ) { - return _of(_class.reference.pointer, _id_of as jni.JMethodIDPtr, - strings.reference.pointer) - .object(const $HeadersType()); - } - - static final _id_of1 = _class.staticMethodId( - r"of", - r"(Ljava/util/Map;)Lokhttp3/Headers;", - ); - - static final _of1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: static public final okhttp3.Headers of(java.util.Map map) - /// The returned object must be released after use, by calling the [release] method. - static Headers of1( - jni.JMap map, - ) { - return _of1(_class.reference.pointer, _id_of1 as jni.JMethodIDPtr, - map.reference.pointer) - .object(const $HeadersType()); - } - - static final _id_new0 = _class.constructorId( - r"([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_NewObject") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void (java.lang.String[] strings, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) - /// The returned object must be released after use, by calling the [release] method. - factory Headers( - jni.JArray strings, - jni.JObject defaultConstructorMarker, - ) { - return Headers.fromReference(_new0( - _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, - strings.reference.pointer, - defaultConstructorMarker.reference.pointer) - .reference); - } -} - -final class $HeadersType extends jni.JObjType { - const $HeadersType(); - - @override - String get signature => r"Lokhttp3/Headers;"; - - @override - Headers fromReference(jni.JReference reference) => - Headers.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($HeadersType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($HeadersType) && other is $HeadersType; - } -} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/OkHttpClient.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/OkHttpClient.dart deleted file mode 100644 index 1a68b3b2e0..0000000000 --- a/pkgs/ok_http/lib/src/third_party/okhttp3/OkHttpClient.dart +++ /dev/null @@ -1,2112 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "Request.dart" as request_; - -import "Call.dart" as call_; - -/// from: okhttp3.OkHttpClient$Builder -class OkHttpClient_Builder extends jni.JObject { - @override - late final jni.JObjType $type = type; - - OkHttpClient_Builder.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient$Builder"); - - /// The type which includes information such as the signature of this class. - static const type = $OkHttpClient_BuilderType(); - static final _id_new0 = _class.constructorId( - r"()V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_NewObject") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory OkHttpClient_Builder() { - return OkHttpClient_Builder.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - - static final _id_new1 = _class.constructorId( - r"(Lokhttp3/OkHttpClient;)V", - ); - - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public void (okhttp3.OkHttpClient okHttpClient) - /// The returned object must be released after use, by calling the [release] method. - factory OkHttpClient_Builder.new1( - OkHttpClient okHttpClient, - ) { - return OkHttpClient_Builder.fromReference(_new1(_class.reference.pointer, - _id_new1 as jni.JMethodIDPtr, okHttpClient.reference.pointer) - .reference); - } - - static final _id_dispatcher = _class.instanceMethodId( - r"dispatcher", - r"(Lokhttp3/Dispatcher;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _dispatcher = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder dispatcher(okhttp3.Dispatcher dispatcher) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder dispatcher( - jni.JObject dispatcher, - ) { - return _dispatcher(reference.pointer, _id_dispatcher as jni.JMethodIDPtr, - dispatcher.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_connectionPool = _class.instanceMethodId( - r"connectionPool", - r"(Lokhttp3/ConnectionPool;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _connectionPool = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder connectionPool(okhttp3.ConnectionPool connectionPool) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder connectionPool( - jni.JObject connectionPool, - ) { - return _connectionPool( - reference.pointer, - _id_connectionPool as jni.JMethodIDPtr, - connectionPool.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_interceptors = _class.instanceMethodId( - r"interceptors", - r"()Ljava/util/List;", - ); - - static final _interceptors = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.util.List interceptors() - /// The returned object must be released after use, by calling the [release] method. - jni.JList interceptors() { - return _interceptors( - reference.pointer, _id_interceptors as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); - } - - static final _id_addInterceptor = _class.instanceMethodId( - r"addInterceptor", - r"(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _addInterceptor = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder addInterceptor(okhttp3.Interceptor interceptor) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder addInterceptor( - jni.JObject interceptor, - ) { - return _addInterceptor( - reference.pointer, - _id_addInterceptor as jni.JMethodIDPtr, - interceptor.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_networkInterceptors = _class.instanceMethodId( - r"networkInterceptors", - r"()Ljava/util/List;", - ); - - static final _networkInterceptors = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.util.List networkInterceptors() - /// The returned object must be released after use, by calling the [release] method. - jni.JList networkInterceptors() { - return _networkInterceptors( - reference.pointer, _id_networkInterceptors as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); - } - - static final _id_addNetworkInterceptor = _class.instanceMethodId( - r"addNetworkInterceptor", - r"(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _addNetworkInterceptor = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder addNetworkInterceptor(okhttp3.Interceptor interceptor) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder addNetworkInterceptor( - jni.JObject interceptor, - ) { - return _addNetworkInterceptor( - reference.pointer, - _id_addNetworkInterceptor as jni.JMethodIDPtr, - interceptor.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_eventListener = _class.instanceMethodId( - r"eventListener", - r"(Lokhttp3/EventListener;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _eventListener = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder eventListener(okhttp3.EventListener eventListener) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder eventListener( - jni.JObject eventListener, - ) { - return _eventListener( - reference.pointer, - _id_eventListener as jni.JMethodIDPtr, - eventListener.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_eventListenerFactory = _class.instanceMethodId( - r"eventListenerFactory", - r"(Lokhttp3/EventListener$Factory;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _eventListenerFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder eventListenerFactory(okhttp3.EventListener$Factory factory) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder eventListenerFactory( - jni.JObject factory0, - ) { - return _eventListenerFactory( - reference.pointer, - _id_eventListenerFactory as jni.JMethodIDPtr, - factory0.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_retryOnConnectionFailure = _class.instanceMethodId( - r"retryOnConnectionFailure", - r"(Z)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); - - /// from: public final okhttp3.OkHttpClient$Builder retryOnConnectionFailure(boolean z) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder retryOnConnectionFailure( - bool z, - ) { - return _retryOnConnectionFailure(reference.pointer, - _id_retryOnConnectionFailure as jni.JMethodIDPtr, z ? 1 : 0) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_authenticator = _class.instanceMethodId( - r"authenticator", - r"(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _authenticator = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder authenticator(okhttp3.Authenticator authenticator) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder authenticator( - jni.JObject authenticator, - ) { - return _authenticator( - reference.pointer, - _id_authenticator as jni.JMethodIDPtr, - authenticator.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_followRedirects = _class.instanceMethodId( - r"followRedirects", - r"(Z)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _followRedirects = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); - - /// from: public final okhttp3.OkHttpClient$Builder followRedirects(boolean z) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder followRedirects( - bool z, - ) { - return _followRedirects(reference.pointer, - _id_followRedirects as jni.JMethodIDPtr, z ? 1 : 0) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_followSslRedirects = _class.instanceMethodId( - r"followSslRedirects", - r"(Z)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _followSslRedirects = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); - - /// from: public final okhttp3.OkHttpClient$Builder followSslRedirects(boolean z) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder followSslRedirects( - bool z, - ) { - return _followSslRedirects(reference.pointer, - _id_followSslRedirects as jni.JMethodIDPtr, z ? 1 : 0) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_cookieJar = _class.instanceMethodId( - r"cookieJar", - r"(Lokhttp3/CookieJar;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _cookieJar = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder cookieJar(okhttp3.CookieJar cookieJar) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder cookieJar( - jni.JObject cookieJar, - ) { - return _cookieJar(reference.pointer, _id_cookieJar as jni.JMethodIDPtr, - cookieJar.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_cache = _class.instanceMethodId( - r"cache", - r"(Lokhttp3/Cache;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _cache = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder cache(okhttp3.Cache cache) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder cache( - jni.JObject cache, - ) { - return _cache(reference.pointer, _id_cache as jni.JMethodIDPtr, - cache.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_dns = _class.instanceMethodId( - r"dns", - r"(Lokhttp3/Dns;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _dns = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder dns(okhttp3.Dns dns) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder dns( - jni.JObject dns, - ) { - return _dns(reference.pointer, _id_dns as jni.JMethodIDPtr, - dns.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_proxy = _class.instanceMethodId( - r"proxy", - r"(Ljava/net/Proxy;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _proxy = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder proxy(java.net.Proxy proxy) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder proxy( - jni.JObject proxy, - ) { - return _proxy(reference.pointer, _id_proxy as jni.JMethodIDPtr, - proxy.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_proxySelector = _class.instanceMethodId( - r"proxySelector", - r"(Ljava/net/ProxySelector;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _proxySelector = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder proxySelector(java.net.ProxySelector proxySelector) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder proxySelector( - jni.JObject proxySelector, - ) { - return _proxySelector( - reference.pointer, - _id_proxySelector as jni.JMethodIDPtr, - proxySelector.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_proxyAuthenticator = _class.instanceMethodId( - r"proxyAuthenticator", - r"(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _proxyAuthenticator = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder proxyAuthenticator(okhttp3.Authenticator authenticator) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder proxyAuthenticator( - jni.JObject authenticator, - ) { - return _proxyAuthenticator( - reference.pointer, - _id_proxyAuthenticator as jni.JMethodIDPtr, - authenticator.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_socketFactory = _class.instanceMethodId( - r"socketFactory", - r"(Ljavax/net/SocketFactory;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _socketFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder socketFactory(javax.net.SocketFactory socketFactory) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder socketFactory( - jni.JObject socketFactory, - ) { - return _socketFactory( - reference.pointer, - _id_socketFactory as jni.JMethodIDPtr, - socketFactory.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_sslSocketFactory = _class.instanceMethodId( - r"sslSocketFactory", - r"(Ljavax/net/ssl/SSLSocketFactory;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _sslSocketFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder sslSocketFactory(javax.net.ssl.SSLSocketFactory sSLSocketFactory) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder sslSocketFactory( - jni.JObject sSLSocketFactory, - ) { - return _sslSocketFactory( - reference.pointer, - _id_sslSocketFactory as jni.JMethodIDPtr, - sSLSocketFactory.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_sslSocketFactory1 = _class.instanceMethodId( - r"sslSocketFactory", - r"(Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/X509TrustManager;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _sslSocketFactory1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder sslSocketFactory(javax.net.ssl.SSLSocketFactory sSLSocketFactory, javax.net.ssl.X509TrustManager x509TrustManager) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder sslSocketFactory1( - jni.JObject sSLSocketFactory, - jni.JObject x509TrustManager, - ) { - return _sslSocketFactory1( - reference.pointer, - _id_sslSocketFactory1 as jni.JMethodIDPtr, - sSLSocketFactory.reference.pointer, - x509TrustManager.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_connectionSpecs = _class.instanceMethodId( - r"connectionSpecs", - r"(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _connectionSpecs = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder connectionSpecs(java.util.List list) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder connectionSpecs( - jni.JList list, - ) { - return _connectionSpecs(reference.pointer, - _id_connectionSpecs as jni.JMethodIDPtr, list.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_protocols = _class.instanceMethodId( - r"protocols", - r"(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _protocols = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder protocols(java.util.List list) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder protocols( - jni.JList list, - ) { - return _protocols(reference.pointer, _id_protocols as jni.JMethodIDPtr, - list.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_hostnameVerifier = _class.instanceMethodId( - r"hostnameVerifier", - r"(Ljavax/net/ssl/HostnameVerifier;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _hostnameVerifier = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder hostnameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder hostnameVerifier( - jni.JObject hostnameVerifier, - ) { - return _hostnameVerifier( - reference.pointer, - _id_hostnameVerifier as jni.JMethodIDPtr, - hostnameVerifier.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_certificatePinner = _class.instanceMethodId( - r"certificatePinner", - r"(Lokhttp3/CertificatePinner;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _certificatePinner = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder certificatePinner(okhttp3.CertificatePinner certificatePinner) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder certificatePinner( - jni.JObject certificatePinner, - ) { - return _certificatePinner( - reference.pointer, - _id_certificatePinner as jni.JMethodIDPtr, - certificatePinner.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_callTimeout = _class.instanceMethodId( - r"callTimeout", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _callTimeout = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder callTimeout(long j, java.util.concurrent.TimeUnit timeUnit) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder callTimeout( - int j, - jni.JObject timeUnit, - ) { - return _callTimeout(reference.pointer, _id_callTimeout as jni.JMethodIDPtr, - j, timeUnit.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_callTimeout1 = _class.instanceMethodId( - r"callTimeout", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _callTimeout1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder callTimeout(java.time.Duration duration) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder callTimeout1( - jni.JObject duration, - ) { - return _callTimeout1(reference.pointer, - _id_callTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_connectTimeout = _class.instanceMethodId( - r"connectTimeout", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _connectTimeout = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder connectTimeout(long j, java.util.concurrent.TimeUnit timeUnit) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder connectTimeout( - int j, - jni.JObject timeUnit, - ) { - return _connectTimeout( - reference.pointer, - _id_connectTimeout as jni.JMethodIDPtr, - j, - timeUnit.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_connectTimeout1 = _class.instanceMethodId( - r"connectTimeout", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _connectTimeout1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder connectTimeout(java.time.Duration duration) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder connectTimeout1( - jni.JObject duration, - ) { - return _connectTimeout1(reference.pointer, - _id_connectTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_readTimeout = _class.instanceMethodId( - r"readTimeout", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _readTimeout = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder readTimeout(long j, java.util.concurrent.TimeUnit timeUnit) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder readTimeout( - int j, - jni.JObject timeUnit, - ) { - return _readTimeout(reference.pointer, _id_readTimeout as jni.JMethodIDPtr, - j, timeUnit.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_readTimeout1 = _class.instanceMethodId( - r"readTimeout", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _readTimeout1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder readTimeout(java.time.Duration duration) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder readTimeout1( - jni.JObject duration, - ) { - return _readTimeout1(reference.pointer, - _id_readTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_writeTimeout = _class.instanceMethodId( - r"writeTimeout", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _writeTimeout = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder writeTimeout(long j, java.util.concurrent.TimeUnit timeUnit) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder writeTimeout( - int j, - jni.JObject timeUnit, - ) { - return _writeTimeout(reference.pointer, - _id_writeTimeout as jni.JMethodIDPtr, j, timeUnit.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_writeTimeout1 = _class.instanceMethodId( - r"writeTimeout", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _writeTimeout1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder writeTimeout(java.time.Duration duration) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder writeTimeout1( - jni.JObject duration, - ) { - return _writeTimeout1(reference.pointer, - _id_writeTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_pingInterval = _class.instanceMethodId( - r"pingInterval", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _pingInterval = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder pingInterval(long j, java.util.concurrent.TimeUnit timeUnit) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder pingInterval( - int j, - jni.JObject timeUnit, - ) { - return _pingInterval(reference.pointer, - _id_pingInterval as jni.JMethodIDPtr, j, timeUnit.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_pingInterval1 = _class.instanceMethodId( - r"pingInterval", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _pingInterval1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.OkHttpClient$Builder pingInterval(java.time.Duration duration) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder pingInterval1( - jni.JObject duration, - ) { - return _pingInterval1(reference.pointer, - _id_pingInterval1 as jni.JMethodIDPtr, duration.reference.pointer) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_minWebSocketMessageToCompress = _class.instanceMethodId( - r"minWebSocketMessageToCompress", - r"(J)Lokhttp3/OkHttpClient$Builder;", - ); - - static final _minWebSocketMessageToCompress = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); - - /// from: public final okhttp3.OkHttpClient$Builder minWebSocketMessageToCompress(long j) - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder minWebSocketMessageToCompress( - int j, - ) { - return _minWebSocketMessageToCompress(reference.pointer, - _id_minWebSocketMessageToCompress as jni.JMethodIDPtr, j) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_build = _class.instanceMethodId( - r"build", - r"()Lokhttp3/OkHttpClient;", - ); - - static final _build = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.OkHttpClient build() - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient build() { - return _build(reference.pointer, _id_build as jni.JMethodIDPtr) - .object(const $OkHttpClientType()); - } -} - -final class $OkHttpClient_BuilderType - extends jni.JObjType { - const $OkHttpClient_BuilderType(); - - @override - String get signature => r"Lokhttp3/OkHttpClient$Builder;"; - - @override - OkHttpClient_Builder fromReference(jni.JReference reference) => - OkHttpClient_Builder.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($OkHttpClient_BuilderType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($OkHttpClient_BuilderType) && - other is $OkHttpClient_BuilderType; - } -} - -/// from: okhttp3.OkHttpClient$Companion -class OkHttpClient_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; - - OkHttpClient_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient$Companion"); - - /// The type which includes information such as the signature of this class. - static const type = $OkHttpClient_CompanionType(); - static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) - /// The returned object must be released after use, by calling the [release] method. - factory OkHttpClient_Companion( - jni.JObject defaultConstructorMarker, - ) { - return OkHttpClient_Companion.fromReference(_new0( - _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, - defaultConstructorMarker.reference.pointer) - .reference); - } -} - -final class $OkHttpClient_CompanionType - extends jni.JObjType { - const $OkHttpClient_CompanionType(); - - @override - String get signature => r"Lokhttp3/OkHttpClient$Companion;"; - - @override - OkHttpClient_Companion fromReference(jni.JReference reference) => - OkHttpClient_Companion.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($OkHttpClient_CompanionType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($OkHttpClient_CompanionType) && - other is $OkHttpClient_CompanionType; - } -} - -/// from: okhttp3.OkHttpClient -class OkHttpClient extends jni.JObject { - @override - late final jni.JObjType $type = type; - - OkHttpClient.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient"); - - /// The type which includes information such as the signature of this class. - static const type = $OkHttpClientType(); - static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/OkHttpClient$Companion;", - ); - - /// from: static public final okhttp3.OkHttpClient$Companion Companion - /// The returned object must be released after use, by calling the [release] method. - static OkHttpClient_Companion get Companion => - _id_Companion.get(_class, const $OkHttpClient_CompanionType()); - - static final _id_new0 = _class.constructorId( - r"(Lokhttp3/OkHttpClient$Builder;)V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public void (okhttp3.OkHttpClient$Builder builder) - /// The returned object must be released after use, by calling the [release] method. - factory OkHttpClient( - OkHttpClient_Builder builder, - ) { - return OkHttpClient.fromReference(_new0(_class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, builder.reference.pointer) - .reference); - } - - static final _id_dispatcher = _class.instanceMethodId( - r"dispatcher", - r"()Lokhttp3/Dispatcher;", - ); - - static final _dispatcher = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Dispatcher dispatcher() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject dispatcher() { - return _dispatcher(reference.pointer, _id_dispatcher as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_connectionPool = _class.instanceMethodId( - r"connectionPool", - r"()Lokhttp3/ConnectionPool;", - ); - - static final _connectionPool = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.ConnectionPool connectionPool() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject connectionPool() { - return _connectionPool( - reference.pointer, _id_connectionPool as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_interceptors = _class.instanceMethodId( - r"interceptors", - r"()Ljava/util/List;", - ); - - static final _interceptors = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.util.List interceptors() - /// The returned object must be released after use, by calling the [release] method. - jni.JList interceptors() { - return _interceptors( - reference.pointer, _id_interceptors as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); - } - - static final _id_networkInterceptors = _class.instanceMethodId( - r"networkInterceptors", - r"()Ljava/util/List;", - ); - - static final _networkInterceptors = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.util.List networkInterceptors() - /// The returned object must be released after use, by calling the [release] method. - jni.JList networkInterceptors() { - return _networkInterceptors( - reference.pointer, _id_networkInterceptors as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); - } - - static final _id_eventListenerFactory = _class.instanceMethodId( - r"eventListenerFactory", - r"()Lokhttp3/EventListener$Factory;", - ); - - static final _eventListenerFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.EventListener$Factory eventListenerFactory() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject eventListenerFactory() { - return _eventListenerFactory( - reference.pointer, _id_eventListenerFactory as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_retryOnConnectionFailure = _class.instanceMethodId( - r"retryOnConnectionFailure", - r"()Z", - ); - - static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final boolean retryOnConnectionFailure() - bool retryOnConnectionFailure() { - return _retryOnConnectionFailure( - reference.pointer, _id_retryOnConnectionFailure as jni.JMethodIDPtr) - .boolean; - } - - static final _id_authenticator = _class.instanceMethodId( - r"authenticator", - r"()Lokhttp3/Authenticator;", - ); - - static final _authenticator = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Authenticator authenticator() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject authenticator() { - return _authenticator( - reference.pointer, _id_authenticator as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_followRedirects = _class.instanceMethodId( - r"followRedirects", - r"()Z", - ); - - static final _followRedirects = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final boolean followRedirects() - bool followRedirects() { - return _followRedirects( - reference.pointer, _id_followRedirects as jni.JMethodIDPtr) - .boolean; - } - - static final _id_followSslRedirects = _class.instanceMethodId( - r"followSslRedirects", - r"()Z", - ); - - static final _followSslRedirects = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final boolean followSslRedirects() - bool followSslRedirects() { - return _followSslRedirects( - reference.pointer, _id_followSslRedirects as jni.JMethodIDPtr) - .boolean; - } - - static final _id_cookieJar = _class.instanceMethodId( - r"cookieJar", - r"()Lokhttp3/CookieJar;", - ); - - static final _cookieJar = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.CookieJar cookieJar() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject cookieJar() { - return _cookieJar(reference.pointer, _id_cookieJar as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_cache = _class.instanceMethodId( - r"cache", - r"()Lokhttp3/Cache;", - ); - - static final _cache = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Cache cache() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject cache() { - return _cache(reference.pointer, _id_cache as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_dns = _class.instanceMethodId( - r"dns", - r"()Lokhttp3/Dns;", - ); - - static final _dns = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Dns dns() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject dns() { - return _dns(reference.pointer, _id_dns as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_proxy = _class.instanceMethodId( - r"proxy", - r"()Ljava/net/Proxy;", - ); - - static final _proxy = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.net.Proxy proxy() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject proxy() { - return _proxy(reference.pointer, _id_proxy as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_proxySelector = _class.instanceMethodId( - r"proxySelector", - r"()Ljava/net/ProxySelector;", - ); - - static final _proxySelector = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.net.ProxySelector proxySelector() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject proxySelector() { - return _proxySelector( - reference.pointer, _id_proxySelector as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_proxyAuthenticator = _class.instanceMethodId( - r"proxyAuthenticator", - r"()Lokhttp3/Authenticator;", - ); - - static final _proxyAuthenticator = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Authenticator proxyAuthenticator() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject proxyAuthenticator() { - return _proxyAuthenticator( - reference.pointer, _id_proxyAuthenticator as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_socketFactory = _class.instanceMethodId( - r"socketFactory", - r"()Ljavax/net/SocketFactory;", - ); - - static final _socketFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final javax.net.SocketFactory socketFactory() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject socketFactory() { - return _socketFactory( - reference.pointer, _id_socketFactory as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_sslSocketFactory = _class.instanceMethodId( - r"sslSocketFactory", - r"()Ljavax/net/ssl/SSLSocketFactory;", - ); - - static final _sslSocketFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final javax.net.ssl.SSLSocketFactory sslSocketFactory() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject sslSocketFactory() { - return _sslSocketFactory( - reference.pointer, _id_sslSocketFactory as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_x509TrustManager = _class.instanceMethodId( - r"x509TrustManager", - r"()Ljavax/net/ssl/X509TrustManager;", - ); - - static final _x509TrustManager = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final javax.net.ssl.X509TrustManager x509TrustManager() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject x509TrustManager() { - return _x509TrustManager( - reference.pointer, _id_x509TrustManager as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_connectionSpecs = _class.instanceMethodId( - r"connectionSpecs", - r"()Ljava/util/List;", - ); - - static final _connectionSpecs = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.util.List connectionSpecs() - /// The returned object must be released after use, by calling the [release] method. - jni.JList connectionSpecs() { - return _connectionSpecs( - reference.pointer, _id_connectionSpecs as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); - } - - static final _id_protocols = _class.instanceMethodId( - r"protocols", - r"()Ljava/util/List;", - ); - - static final _protocols = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.util.List protocols() - /// The returned object must be released after use, by calling the [release] method. - jni.JList protocols() { - return _protocols(reference.pointer, _id_protocols as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); - } - - static final _id_hostnameVerifier = _class.instanceMethodId( - r"hostnameVerifier", - r"()Ljavax/net/ssl/HostnameVerifier;", - ); - - static final _hostnameVerifier = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final javax.net.ssl.HostnameVerifier hostnameVerifier() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject hostnameVerifier() { - return _hostnameVerifier( - reference.pointer, _id_hostnameVerifier as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_certificatePinner = _class.instanceMethodId( - r"certificatePinner", - r"()Lokhttp3/CertificatePinner;", - ); - - static final _certificatePinner = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.CertificatePinner certificatePinner() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject certificatePinner() { - return _certificatePinner( - reference.pointer, _id_certificatePinner as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_certificateChainCleaner = _class.instanceMethodId( - r"certificateChainCleaner", - r"()Lokhttp3/internal/tls/CertificateChainCleaner;", - ); - - static final _certificateChainCleaner = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.internal.tls.CertificateChainCleaner certificateChainCleaner() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject certificateChainCleaner() { - return _certificateChainCleaner( - reference.pointer, _id_certificateChainCleaner as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_callTimeoutMillis = _class.instanceMethodId( - r"callTimeoutMillis", - r"()I", - ); - - static final _callTimeoutMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final int callTimeoutMillis() - int callTimeoutMillis() { - return _callTimeoutMillis( - reference.pointer, _id_callTimeoutMillis as jni.JMethodIDPtr) - .integer; - } - - static final _id_connectTimeoutMillis = _class.instanceMethodId( - r"connectTimeoutMillis", - r"()I", - ); - - static final _connectTimeoutMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final int connectTimeoutMillis() - int connectTimeoutMillis() { - return _connectTimeoutMillis( - reference.pointer, _id_connectTimeoutMillis as jni.JMethodIDPtr) - .integer; - } - - static final _id_readTimeoutMillis = _class.instanceMethodId( - r"readTimeoutMillis", - r"()I", - ); - - static final _readTimeoutMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final int readTimeoutMillis() - int readTimeoutMillis() { - return _readTimeoutMillis( - reference.pointer, _id_readTimeoutMillis as jni.JMethodIDPtr) - .integer; - } - - static final _id_writeTimeoutMillis = _class.instanceMethodId( - r"writeTimeoutMillis", - r"()I", - ); - - static final _writeTimeoutMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final int writeTimeoutMillis() - int writeTimeoutMillis() { - return _writeTimeoutMillis( - reference.pointer, _id_writeTimeoutMillis as jni.JMethodIDPtr) - .integer; - } - - static final _id_pingIntervalMillis = _class.instanceMethodId( - r"pingIntervalMillis", - r"()I", - ); - - static final _pingIntervalMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final int pingIntervalMillis() - int pingIntervalMillis() { - return _pingIntervalMillis( - reference.pointer, _id_pingIntervalMillis as jni.JMethodIDPtr) - .integer; - } - - static final _id_minWebSocketMessageToCompress = _class.instanceMethodId( - r"minWebSocketMessageToCompress", - r"()J", - ); - - static final _minWebSocketMessageToCompress = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final long minWebSocketMessageToCompress() - int minWebSocketMessageToCompress() { - return _minWebSocketMessageToCompress(reference.pointer, - _id_minWebSocketMessageToCompress as jni.JMethodIDPtr) - .long; - } - - static final _id_getRouteDatabase = _class.instanceMethodId( - r"getRouteDatabase", - r"()Lokhttp3/internal/connection/RouteDatabase;", - ); - - static final _getRouteDatabase = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.internal.connection.RouteDatabase getRouteDatabase() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject getRouteDatabase() { - return _getRouteDatabase( - reference.pointer, _id_getRouteDatabase as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_new1 = _class.constructorId( - r"()V", - ); - - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_NewObject") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory OkHttpClient.new1() { - return OkHttpClient.fromReference( - _new1(_class.reference.pointer, _id_new1 as jni.JMethodIDPtr) - .reference); - } - - static final _id_newCall = _class.instanceMethodId( - r"newCall", - r"(Lokhttp3/Request;)Lokhttp3/Call;", - ); - - static final _newCall = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Call newCall(okhttp3.Request request) - /// The returned object must be released after use, by calling the [release] method. - call_.Call newCall( - request_.Request request, - ) { - return _newCall(reference.pointer, _id_newCall as jni.JMethodIDPtr, - request.reference.pointer) - .object(const call_.$CallType()); - } - - static final _id_newWebSocket = _class.instanceMethodId( - r"newWebSocket", - r"(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;", - ); - - static final _newWebSocket = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public okhttp3.WebSocket newWebSocket(okhttp3.Request request, okhttp3.WebSocketListener webSocketListener) - /// The returned object must be released after use, by calling the [release] method. - jni.JObject newWebSocket( - request_.Request request, - jni.JObject webSocketListener, - ) { - return _newWebSocket( - reference.pointer, - _id_newWebSocket as jni.JMethodIDPtr, - request.reference.pointer, - webSocketListener.reference.pointer) - .object(const jni.JObjectType()); - } - - static final _id_newBuilder = _class.instanceMethodId( - r"newBuilder", - r"()Lokhttp3/OkHttpClient$Builder;", - ); - - static final _newBuilder = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public okhttp3.OkHttpClient$Builder newBuilder() - /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder newBuilder() { - return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) - .object(const $OkHttpClient_BuilderType()); - } - - static final _id_clone = _class.instanceMethodId( - r"clone", - r"()Ljava/lang/Object;", - ); - - static final _clone = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public java.lang.Object clone() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject clone() { - return _clone(reference.pointer, _id_clone as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } -} - -final class $OkHttpClientType extends jni.JObjType { - const $OkHttpClientType(); - - @override - String get signature => r"Lokhttp3/OkHttpClient;"; - - @override - OkHttpClient fromReference(jni.JReference reference) => - OkHttpClient.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($OkHttpClientType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($OkHttpClientType) && - other is $OkHttpClientType; - } -} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/Request.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/Request.dart deleted file mode 100644 index 6b7c28d82e..0000000000 --- a/pkgs/ok_http/lib/src/third_party/okhttp3/Request.dart +++ /dev/null @@ -1,1005 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "Headers.dart" as headers_; - -import "RequestBody.dart" as requestbody_; - -/// from: okhttp3.Request$Builder -class Request_Builder extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Request_Builder.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/Request$Builder"); - - /// The type which includes information such as the signature of this class. - static const type = $Request_BuilderType(); - static final _id_new0 = _class.constructorId( - r"()V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_NewObject") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory Request_Builder() { - return Request_Builder.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - - static final _id_new1 = _class.constructorId( - r"(Lokhttp3/Request;)V", - ); - - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public void (okhttp3.Request request) - /// The returned object must be released after use, by calling the [release] method. - factory Request_Builder.new1( - Request request, - ) { - return Request_Builder.fromReference(_new1(_class.reference.pointer, - _id_new1 as jni.JMethodIDPtr, request.reference.pointer) - .reference); - } - - static final _id_url = _class.instanceMethodId( - r"url", - r"(Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder;", - ); - - static final _url = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder url(okhttp3.HttpUrl httpUrl) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder url( - jni.JObject httpUrl, - ) { - return _url(reference.pointer, _id_url as jni.JMethodIDPtr, - httpUrl.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_url1 = _class.instanceMethodId( - r"url", - r"(Ljava/lang/String;)Lokhttp3/Request$Builder;", - ); - - static final _url1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder url(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder url1( - jni.JString string, - ) { - return _url1(reference.pointer, _id_url1 as jni.JMethodIDPtr, - string.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_url2 = _class.instanceMethodId( - r"url", - r"(Ljava/net/URL;)Lokhttp3/Request$Builder;", - ); - - static final _url2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder url(java.net.URL uRL) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder url2( - jni.JObject uRL, - ) { - return _url2(reference.pointer, _id_url2 as jni.JMethodIDPtr, - uRL.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_header = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;", - ); - - static final _header = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder header(java.lang.String string, java.lang.String string1) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder header( - jni.JString string, - jni.JString string1, - ) { - return _header(reference.pointer, _id_header as jni.JMethodIDPtr, - string.reference.pointer, string1.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_addHeader = _class.instanceMethodId( - r"addHeader", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;", - ); - - static final _addHeader = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder addHeader(java.lang.String string, java.lang.String string1) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder addHeader( - jni.JString string, - jni.JString string1, - ) { - return _addHeader(reference.pointer, _id_addHeader as jni.JMethodIDPtr, - string.reference.pointer, string1.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_removeHeader = _class.instanceMethodId( - r"removeHeader", - r"(Ljava/lang/String;)Lokhttp3/Request$Builder;", - ); - - static final _removeHeader = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder removeHeader(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder removeHeader( - jni.JString string, - ) { - return _removeHeader(reference.pointer, - _id_removeHeader as jni.JMethodIDPtr, string.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_headers = _class.instanceMethodId( - r"headers", - r"(Lokhttp3/Headers;)Lokhttp3/Request$Builder;", - ); - - static final _headers = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder headers(okhttp3.Headers headers) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder headers( - headers_.Headers headers, - ) { - return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr, - headers.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_cacheControl = _class.instanceMethodId( - r"cacheControl", - r"(Lokhttp3/CacheControl;)Lokhttp3/Request$Builder;", - ); - - static final _cacheControl = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder cacheControl(okhttp3.CacheControl cacheControl) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder cacheControl( - jni.JObject cacheControl, - ) { - return _cacheControl( - reference.pointer, - _id_cacheControl as jni.JMethodIDPtr, - cacheControl.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_get0 = _class.instanceMethodId( - r"get", - r"()Lokhttp3/Request$Builder;", - ); - - static final _get0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public okhttp3.Request$Builder get() - /// The returned object must be released after use, by calling the [release] method. - Request_Builder get0() { - return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr) - .object(const $Request_BuilderType()); - } - - static final _id_head = _class.instanceMethodId( - r"head", - r"()Lokhttp3/Request$Builder;", - ); - - static final _head = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public okhttp3.Request$Builder head() - /// The returned object must be released after use, by calling the [release] method. - Request_Builder head() { - return _head(reference.pointer, _id_head as jni.JMethodIDPtr) - .object(const $Request_BuilderType()); - } - - static final _id_post = _class.instanceMethodId( - r"post", - r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", - ); - - static final _post = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder post(okhttp3.RequestBody requestBody) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder post( - requestbody_.RequestBody requestBody, - ) { - return _post(reference.pointer, _id_post as jni.JMethodIDPtr, - requestBody.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_delete = _class.instanceMethodId( - r"delete", - r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", - ); - - static final _delete = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder delete(okhttp3.RequestBody requestBody) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder delete( - requestbody_.RequestBody requestBody, - ) { - return _delete(reference.pointer, _id_delete as jni.JMethodIDPtr, - requestBody.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_put = _class.instanceMethodId( - r"put", - r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", - ); - - static final _put = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder put(okhttp3.RequestBody requestBody) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder put( - requestbody_.RequestBody requestBody, - ) { - return _put(reference.pointer, _id_put as jni.JMethodIDPtr, - requestBody.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_patch = _class.instanceMethodId( - r"patch", - r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", - ); - - static final _patch = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder patch(okhttp3.RequestBody requestBody) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder patch( - requestbody_.RequestBody requestBody, - ) { - return _patch(reference.pointer, _id_patch as jni.JMethodIDPtr, - requestBody.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_method = _class.instanceMethodId( - r"method", - r"(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", - ); - - static final _method = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder method(java.lang.String string, okhttp3.RequestBody requestBody) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder method( - jni.JString string, - requestbody_.RequestBody requestBody, - ) { - return _method(reference.pointer, _id_method as jni.JMethodIDPtr, - string.reference.pointer, requestBody.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_tag = _class.instanceMethodId( - r"tag", - r"(Ljava/lang/Object;)Lokhttp3/Request$Builder;", - ); - - static final _tag = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder tag(java.lang.Object object) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder tag( - jni.JObject object, - ) { - return _tag(reference.pointer, _id_tag as jni.JMethodIDPtr, - object.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_tag1 = _class.instanceMethodId( - r"tag", - r"(Ljava/lang/Class;Ljava/lang/Object;)Lokhttp3/Request$Builder;", - ); - - static final _tag1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public okhttp3.Request$Builder tag(java.lang.Class class, T object) - /// The returned object must be released after use, by calling the [release] method. - Request_Builder tag1<$T extends jni.JObject>( - jni.JObject class0, - $T object, { - jni.JObjType<$T>? T, - }) { - T ??= jni.lowestCommonSuperType([ - object.$type, - ]) as jni.JObjType<$T>; - return _tag1(reference.pointer, _id_tag1 as jni.JMethodIDPtr, - class0.reference.pointer, object.reference.pointer) - .object(const $Request_BuilderType()); - } - - static final _id_build = _class.instanceMethodId( - r"build", - r"()Lokhttp3/Request;", - ); - - static final _build = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public okhttp3.Request build() - /// The returned object must be released after use, by calling the [release] method. - Request build() { - return _build(reference.pointer, _id_build as jni.JMethodIDPtr) - .object(const $RequestType()); - } - - static final _id_delete1 = _class.instanceMethodId( - r"delete", - r"()Lokhttp3/Request$Builder;", - ); - - static final _delete1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Request$Builder delete() - /// The returned object must be released after use, by calling the [release] method. - Request_Builder delete1() { - return _delete1(reference.pointer, _id_delete1 as jni.JMethodIDPtr) - .object(const $Request_BuilderType()); - } -} - -final class $Request_BuilderType extends jni.JObjType { - const $Request_BuilderType(); - - @override - String get signature => r"Lokhttp3/Request$Builder;"; - - @override - Request_Builder fromReference(jni.JReference reference) => - Request_Builder.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($Request_BuilderType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($Request_BuilderType) && - other is $Request_BuilderType; - } -} - -/// from: okhttp3.Request -class Request extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Request.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/Request"); - - /// The type which includes information such as the signature of this class. - static const type = $RequestType(); - static final _id_new0 = _class.constructorId( - r"(Lokhttp3/HttpUrl;Ljava/lang/String;Lokhttp3/Headers;Lokhttp3/RequestBody;Ljava/util/Map;)V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_NewObject") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public void (okhttp3.HttpUrl httpUrl, java.lang.String string, okhttp3.Headers headers, okhttp3.RequestBody requestBody, java.util.Map map) - /// The returned object must be released after use, by calling the [release] method. - factory Request( - jni.JObject httpUrl, - jni.JString string, - headers_.Headers headers, - requestbody_.RequestBody requestBody, - jni.JMap map, - ) { - return Request.fromReference(_new0( - _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, - httpUrl.reference.pointer, - string.reference.pointer, - headers.reference.pointer, - requestBody.reference.pointer, - map.reference.pointer) - .reference); - } - - static final _id_url = _class.instanceMethodId( - r"url", - r"()Lokhttp3/HttpUrl;", - ); - - static final _url = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.HttpUrl url() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject url() { - return _url(reference.pointer, _id_url as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_method = _class.instanceMethodId( - r"method", - r"()Ljava/lang/String;", - ); - - static final _method = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.lang.String method() - /// The returned object must be released after use, by calling the [release] method. - jni.JString method() { - return _method(reference.pointer, _id_method as jni.JMethodIDPtr) - .object(const jni.JStringType()); - } - - static final _id_headers = _class.instanceMethodId( - r"headers", - r"()Lokhttp3/Headers;", - ); - - static final _headers = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Headers headers() - /// The returned object must be released after use, by calling the [release] method. - headers_.Headers headers() { - return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr) - .object(const headers_.$HeadersType()); - } - - static final _id_body = _class.instanceMethodId( - r"body", - r"()Lokhttp3/RequestBody;", - ); - - static final _body = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.RequestBody body() - /// The returned object must be released after use, by calling the [release] method. - requestbody_.RequestBody body() { - return _body(reference.pointer, _id_body as jni.JMethodIDPtr) - .object(const requestbody_.$RequestBodyType()); - } - - static final _id_isHttps = _class.instanceMethodId( - r"isHttps", - r"()Z", - ); - - static final _isHttps = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final boolean isHttps() - bool isHttps() { - return _isHttps(reference.pointer, _id_isHttps as jni.JMethodIDPtr).boolean; - } - - static final _id_header = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;)Ljava/lang/String;", - ); - - static final _header = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final java.lang.String header(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - jni.JString header( - jni.JString string, - ) { - return _header(reference.pointer, _id_header as jni.JMethodIDPtr, - string.reference.pointer) - .object(const jni.JStringType()); - } - - static final _id_headers1 = _class.instanceMethodId( - r"headers", - r"(Ljava/lang/String;)Ljava/util/List;", - ); - - static final _headers1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final java.util.List headers(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - jni.JList headers1( - jni.JString string, - ) { - return _headers1(reference.pointer, _id_headers1 as jni.JMethodIDPtr, - string.reference.pointer) - .object(const jni.JListType(jni.JStringType())); - } - - static final _id_tag = _class.instanceMethodId( - r"tag", - r"()Ljava/lang/Object;", - ); - - static final _tag = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.lang.Object tag() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject tag() { - return _tag(reference.pointer, _id_tag as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_tag1 = _class.instanceMethodId( - r"tag", - r"(Ljava/lang/Class;)Ljava/lang/Object;", - ); - - static final _tag1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final T tag(java.lang.Class class) - /// The returned object must be released after use, by calling the [release] method. - $T tag1<$T extends jni.JObject>( - jni.JObject class0, { - required jni.JObjType<$T> T, - }) { - return _tag1(reference.pointer, _id_tag1 as jni.JMethodIDPtr, - class0.reference.pointer) - .object(T); - } - - static final _id_newBuilder = _class.instanceMethodId( - r"newBuilder", - r"()Lokhttp3/Request$Builder;", - ); - - static final _newBuilder = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Request$Builder newBuilder() - /// The returned object must be released after use, by calling the [release] method. - Request_Builder newBuilder() { - return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) - .object(const $Request_BuilderType()); - } - - static final _id_cacheControl = _class.instanceMethodId( - r"cacheControl", - r"()Lokhttp3/CacheControl;", - ); - - static final _cacheControl = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.CacheControl cacheControl() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject cacheControl() { - return _cacheControl( - reference.pointer, _id_cacheControl as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_toString1 = _class.instanceMethodId( - r"toString", - r"()Ljava/lang/String;", - ); - - static final _toString1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public java.lang.String toString() - /// The returned object must be released after use, by calling the [release] method. - jni.JString toString1() { - return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) - .object(const jni.JStringType()); - } -} - -final class $RequestType extends jni.JObjType { - const $RequestType(); - - @override - String get signature => r"Lokhttp3/Request;"; - - @override - Request fromReference(jni.JReference reference) => - Request.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($RequestType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($RequestType) && other is $RequestType; - } -} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/RequestBody.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/RequestBody.dart deleted file mode 100644 index 53108d95b8..0000000000 --- a/pkgs/ok_http/lib/src/third_party/okhttp3/RequestBody.dart +++ /dev/null @@ -1,1080 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -/// from: okhttp3.RequestBody$Companion -class RequestBody_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; - - RequestBody_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/RequestBody$Companion"); - - /// The type which includes information such as the signature of this class. - static const type = $RequestBody_CompanionType(); - static final _id_create = _class.instanceMethodId( - r"create", - r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", - ); - - static final _create = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.RequestBody create(java.lang.String string, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create( - jni.JString string, - jni.JObject mediaType, - ) { - return _create(reference.pointer, _id_create as jni.JMethodIDPtr, - string.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create1 = _class.instanceMethodId( - r"create", - r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", - ); - - static final _create1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create1( - jni.JObject byteString, - jni.JObject mediaType, - ) { - return _create1(reference.pointer, _id_create1 as jni.JMethodIDPtr, - byteString.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create2 = _class.instanceMethodId( - r"create", - r"([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;", - ); - - static final _create2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64 - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int, int)>(); - - /// from: public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i, int i1) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create2( - jni.JArray bs, - jni.JObject mediaType, - int i, - int i1, - ) { - return _create2(reference.pointer, _id_create2 as jni.JMethodIDPtr, - bs.reference.pointer, mediaType.reference.pointer, i, i1) - .object(const $RequestBodyType()); - } - - static final _id_create3 = _class.instanceMethodId( - r"create", - r"(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", - ); - - static final _create3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.RequestBody create(java.io.File file, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create3( - jni.JObject file, - jni.JObject mediaType, - ) { - return _create3(reference.pointer, _id_create3 as jni.JMethodIDPtr, - file.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create4 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;", - ); - - static final _create4 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create4( - jni.JObject mediaType, - jni.JString string, - ) { - return _create4(reference.pointer, _id_create4 as jni.JMethodIDPtr, - mediaType.reference.pointer, string.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create5 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;", - ); - - static final _create5 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create5( - jni.JObject mediaType, - jni.JObject byteString, - ) { - return _create5(reference.pointer, _id_create5 as jni.JMethodIDPtr, - mediaType.reference.pointer, byteString.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create6 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;", - ); - - static final _create6 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64 - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int, int)>(); - - /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i, int i1) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create6( - jni.JObject mediaType, - jni.JArray bs, - int i, - int i1, - ) { - return _create6(reference.pointer, _id_create6 as jni.JMethodIDPtr, - mediaType.reference.pointer, bs.reference.pointer, i, i1) - .object(const $RequestBodyType()); - } - - static final _id_create7 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;", - ); - - static final _create7 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.io.File file) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create7( - jni.JObject mediaType, - jni.JObject file, - ) { - return _create7(reference.pointer, _id_create7 as jni.JMethodIDPtr, - mediaType.reference.pointer, file.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create8 = _class.instanceMethodId( - r"create", - r"([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;", - ); - - static final _create8 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer, - ffi.Int64 - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int)>(); - - /// from: public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create8( - jni.JArray bs, - jni.JObject mediaType, - int i, - ) { - return _create8(reference.pointer, _id_create8 as jni.JMethodIDPtr, - bs.reference.pointer, mediaType.reference.pointer, i) - .object(const $RequestBodyType()); - } - - static final _id_create9 = _class.instanceMethodId( - r"create", - r"([BLokhttp3/MediaType;)Lokhttp3/RequestBody;", - ); - - static final _create9 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create9( - jni.JArray bs, - jni.JObject mediaType, - ) { - return _create9(reference.pointer, _id_create9 as jni.JMethodIDPtr, - bs.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create10 = _class.instanceMethodId( - r"create", - r"([B)Lokhttp3/RequestBody;", - ); - - static final _create10 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final okhttp3.RequestBody create(byte[] bs) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create10( - jni.JArray bs, - ) { - return _create10(reference.pointer, _id_create10 as jni.JMethodIDPtr, - bs.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create11 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;", - ); - - static final _create11 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer, - ffi.Int64 - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int)>(); - - /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create11( - jni.JObject mediaType, - jni.JArray bs, - int i, - ) { - return _create11(reference.pointer, _id_create11 as jni.JMethodIDPtr, - mediaType.reference.pointer, bs.reference.pointer, i) - .object(const $RequestBodyType()); - } - - static final _id_create12 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;", - ); - - static final _create12 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs) - /// The returned object must be released after use, by calling the [release] method. - RequestBody create12( - jni.JObject mediaType, - jni.JArray bs, - ) { - return _create12(reference.pointer, _id_create12 as jni.JMethodIDPtr, - mediaType.reference.pointer, bs.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) - /// The returned object must be released after use, by calling the [release] method. - factory RequestBody_Companion( - jni.JObject defaultConstructorMarker, - ) { - return RequestBody_Companion.fromReference(_new0( - _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, - defaultConstructorMarker.reference.pointer) - .reference); - } -} - -final class $RequestBody_CompanionType - extends jni.JObjType { - const $RequestBody_CompanionType(); - - @override - String get signature => r"Lokhttp3/RequestBody$Companion;"; - - @override - RequestBody_Companion fromReference(jni.JReference reference) => - RequestBody_Companion.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($RequestBody_CompanionType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($RequestBody_CompanionType) && - other is $RequestBody_CompanionType; - } -} - -/// from: okhttp3.RequestBody -class RequestBody extends jni.JObject { - @override - late final jni.JObjType $type = type; - - RequestBody.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/RequestBody"); - - /// The type which includes information such as the signature of this class. - static const type = $RequestBodyType(); - static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/RequestBody$Companion;", - ); - - /// from: static public final okhttp3.RequestBody$Companion Companion - /// The returned object must be released after use, by calling the [release] method. - static RequestBody_Companion get Companion => - _id_Companion.get(_class, const $RequestBody_CompanionType()); - - static final _id_new0 = _class.constructorId( - r"()V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_NewObject") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory RequestBody() { - return RequestBody.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - - static final _id_contentType = _class.instanceMethodId( - r"contentType", - r"()Lokhttp3/MediaType;", - ); - - static final _contentType = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public abstract okhttp3.MediaType contentType() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject contentType() { - return _contentType(reference.pointer, _id_contentType as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_contentLength = _class.instanceMethodId( - r"contentLength", - r"()J", - ); - - static final _contentLength = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public long contentLength() - int contentLength() { - return _contentLength( - reference.pointer, _id_contentLength as jni.JMethodIDPtr) - .long; - } - - static final _id_writeTo = _class.instanceMethodId( - r"writeTo", - r"(Lokio/BufferedSink;)V", - ); - - static final _writeTo = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") - .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public abstract void writeTo(okio.BufferedSink bufferedSink) - void writeTo( - jni.JObject bufferedSink, - ) { - _writeTo(reference.pointer, _id_writeTo as jni.JMethodIDPtr, - bufferedSink.reference.pointer) - .check(); - } - - static final _id_isDuplex = _class.instanceMethodId( - r"isDuplex", - r"()Z", - ); - - static final _isDuplex = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public boolean isDuplex() - bool isDuplex() { - return _isDuplex(reference.pointer, _id_isDuplex as jni.JMethodIDPtr) - .boolean; - } - - static final _id_isOneShot = _class.instanceMethodId( - r"isOneShot", - r"()Z", - ); - - static final _isOneShot = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public boolean isOneShot() - bool isOneShot() { - return _isOneShot(reference.pointer, _id_isOneShot as jni.JMethodIDPtr) - .boolean; - } - - static final _id_create = _class.staticMethodId( - r"create", - r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", - ); - - static final _create = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.RequestBody create(java.lang.String string, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create( - jni.JString string, - jni.JObject mediaType, - ) { - return _create(_class.reference.pointer, _id_create as jni.JMethodIDPtr, - string.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create1 = _class.staticMethodId( - r"create", - r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", - ); - - static final _create1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create1( - jni.JObject byteString, - jni.JObject mediaType, - ) { - return _create1(_class.reference.pointer, _id_create1 as jni.JMethodIDPtr, - byteString.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create2 = _class.staticMethodId( - r"create", - r"([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;", - ); - - static final _create2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64 - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int, int)>(); - - /// from: static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i, int i1) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create2( - jni.JArray bs, - jni.JObject mediaType, - int i, - int i1, - ) { - return _create2(_class.reference.pointer, _id_create2 as jni.JMethodIDPtr, - bs.reference.pointer, mediaType.reference.pointer, i, i1) - .object(const $RequestBodyType()); - } - - static final _id_create3 = _class.staticMethodId( - r"create", - r"(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", - ); - - static final _create3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.RequestBody create(java.io.File file, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create3( - jni.JObject file, - jni.JObject mediaType, - ) { - return _create3(_class.reference.pointer, _id_create3 as jni.JMethodIDPtr, - file.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create4 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;", - ); - - static final _create4 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create4( - jni.JObject mediaType, - jni.JString string, - ) { - return _create4(_class.reference.pointer, _id_create4 as jni.JMethodIDPtr, - mediaType.reference.pointer, string.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create5 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;", - ); - - static final _create5 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create5( - jni.JObject mediaType, - jni.JObject byteString, - ) { - return _create5(_class.reference.pointer, _id_create5 as jni.JMethodIDPtr, - mediaType.reference.pointer, byteString.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create6 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;", - ); - - static final _create6 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64 - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int, int)>(); - - /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i, int i1) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create6( - jni.JObject mediaType, - jni.JArray bs, - int i, - int i1, - ) { - return _create6(_class.reference.pointer, _id_create6 as jni.JMethodIDPtr, - mediaType.reference.pointer, bs.reference.pointer, i, i1) - .object(const $RequestBodyType()); - } - - static final _id_create7 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;", - ); - - static final _create7 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.io.File file) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create7( - jni.JObject mediaType, - jni.JObject file, - ) { - return _create7(_class.reference.pointer, _id_create7 as jni.JMethodIDPtr, - mediaType.reference.pointer, file.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create8 = _class.staticMethodId( - r"create", - r"([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;", - ); - - static final _create8 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer, - ffi.Int64 - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int)>(); - - /// from: static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create8( - jni.JArray bs, - jni.JObject mediaType, - int i, - ) { - return _create8(_class.reference.pointer, _id_create8 as jni.JMethodIDPtr, - bs.reference.pointer, mediaType.reference.pointer, i) - .object(const $RequestBodyType()); - } - - static final _id_create9 = _class.staticMethodId( - r"create", - r"([BLokhttp3/MediaType;)Lokhttp3/RequestBody;", - ); - - static final _create9 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create9( - jni.JArray bs, - jni.JObject mediaType, - ) { - return _create9(_class.reference.pointer, _id_create9 as jni.JMethodIDPtr, - bs.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create10 = _class.staticMethodId( - r"create", - r"([B)Lokhttp3/RequestBody;", - ); - - static final _create10 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: static public final okhttp3.RequestBody create(byte[] bs) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create10( - jni.JArray bs, - ) { - return _create10(_class.reference.pointer, _id_create10 as jni.JMethodIDPtr, - bs.reference.pointer) - .object(const $RequestBodyType()); - } - - static final _id_create11 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;", - ); - - static final _create11 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer, - ffi.Int64 - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int)>(); - - /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create11( - jni.JObject mediaType, - jni.JArray bs, - int i, - ) { - return _create11(_class.reference.pointer, _id_create11 as jni.JMethodIDPtr, - mediaType.reference.pointer, bs.reference.pointer, i) - .object(const $RequestBodyType()); - } - - static final _id_create12 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;", - ); - - static final _create12 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs) - /// The returned object must be released after use, by calling the [release] method. - static RequestBody create12( - jni.JObject mediaType, - jni.JArray bs, - ) { - return _create12(_class.reference.pointer, _id_create12 as jni.JMethodIDPtr, - mediaType.reference.pointer, bs.reference.pointer) - .object(const $RequestBodyType()); - } -} - -final class $RequestBodyType extends jni.JObjType { - const $RequestBodyType(); - - @override - String get signature => r"Lokhttp3/RequestBody;"; - - @override - RequestBody fromReference(jni.JReference reference) => - RequestBody.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($RequestBodyType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($RequestBodyType) && other is $RequestBodyType; - } -} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/Response.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/Response.dart deleted file mode 100644 index 49d50c9549..0000000000 --- a/pkgs/ok_http/lib/src/third_party/okhttp3/Response.dart +++ /dev/null @@ -1,1256 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "Request.dart" as request_; - -import "Headers.dart" as headers_; - -import "ResponseBody.dart" as responsebody_; - -/// from: okhttp3.Response$Builder -class Response_Builder extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Response_Builder.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/Response$Builder"); - - /// The type which includes information such as the signature of this class. - static const type = $Response_BuilderType(); - static final _id_new0 = _class.constructorId( - r"()V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_NewObject") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory Response_Builder() { - return Response_Builder.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - - static final _id_new1 = _class.constructorId( - r"(Lokhttp3/Response;)V", - ); - - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public void (okhttp3.Response response) - /// The returned object must be released after use, by calling the [release] method. - factory Response_Builder.new1( - Response response, - ) { - return Response_Builder.fromReference(_new1(_class.reference.pointer, - _id_new1 as jni.JMethodIDPtr, response.reference.pointer) - .reference); - } - - static final _id_request = _class.instanceMethodId( - r"request", - r"(Lokhttp3/Request;)Lokhttp3/Response$Builder;", - ); - - static final _request = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Response$Builder request(okhttp3.Request request) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder request( - request_.Request request, - ) { - return _request(reference.pointer, _id_request as jni.JMethodIDPtr, - request.reference.pointer) - .object(const $Response_BuilderType()); - } - - static final _id_protocol = _class.instanceMethodId( - r"protocol", - r"(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;", - ); - - static final _protocol = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Response$Builder protocol(okhttp3.Protocol protocol) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder protocol( - jni.JObject protocol, - ) { - return _protocol(reference.pointer, _id_protocol as jni.JMethodIDPtr, - protocol.reference.pointer) - .object(const $Response_BuilderType()); - } - - static final _id_code = _class.instanceMethodId( - r"code", - r"(I)Lokhttp3/Response$Builder;", - ); - - static final _code = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); - - /// from: public okhttp3.Response$Builder code(int i) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder code( - int i, - ) { - return _code(reference.pointer, _id_code as jni.JMethodIDPtr, i) - .object(const $Response_BuilderType()); - } - - static final _id_message = _class.instanceMethodId( - r"message", - r"(Ljava/lang/String;)Lokhttp3/Response$Builder;", - ); - - static final _message = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Response$Builder message(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder message( - jni.JString string, - ) { - return _message(reference.pointer, _id_message as jni.JMethodIDPtr, - string.reference.pointer) - .object(const $Response_BuilderType()); - } - - static final _id_handshake = _class.instanceMethodId( - r"handshake", - r"(Lokhttp3/Handshake;)Lokhttp3/Response$Builder;", - ); - - static final _handshake = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Response$Builder handshake(okhttp3.Handshake handshake) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder handshake( - jni.JObject handshake, - ) { - return _handshake(reference.pointer, _id_handshake as jni.JMethodIDPtr, - handshake.reference.pointer) - .object(const $Response_BuilderType()); - } - - static final _id_header = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;", - ); - - static final _header = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public okhttp3.Response$Builder header(java.lang.String string, java.lang.String string1) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder header( - jni.JString string, - jni.JString string1, - ) { - return _header(reference.pointer, _id_header as jni.JMethodIDPtr, - string.reference.pointer, string1.reference.pointer) - .object(const $Response_BuilderType()); - } - - static final _id_addHeader = _class.instanceMethodId( - r"addHeader", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;", - ); - - static final _addHeader = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public okhttp3.Response$Builder addHeader(java.lang.String string, java.lang.String string1) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder addHeader( - jni.JString string, - jni.JString string1, - ) { - return _addHeader(reference.pointer, _id_addHeader as jni.JMethodIDPtr, - string.reference.pointer, string1.reference.pointer) - .object(const $Response_BuilderType()); - } - - static final _id_removeHeader = _class.instanceMethodId( - r"removeHeader", - r"(Ljava/lang/String;)Lokhttp3/Response$Builder;", - ); - - static final _removeHeader = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Response$Builder removeHeader(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder removeHeader( - jni.JString string, - ) { - return _removeHeader(reference.pointer, - _id_removeHeader as jni.JMethodIDPtr, string.reference.pointer) - .object(const $Response_BuilderType()); - } - - static final _id_headers = _class.instanceMethodId( - r"headers", - r"(Lokhttp3/Headers;)Lokhttp3/Response$Builder;", - ); - - static final _headers = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Response$Builder headers(okhttp3.Headers headers) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder headers( - headers_.Headers headers, - ) { - return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr, - headers.reference.pointer) - .object(const $Response_BuilderType()); - } - - static final _id_body = _class.instanceMethodId( - r"body", - r"(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;", - ); - - static final _body = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Response$Builder body(okhttp3.ResponseBody responseBody) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder body( - responsebody_.ResponseBody responseBody, - ) { - return _body(reference.pointer, _id_body as jni.JMethodIDPtr, - responseBody.reference.pointer) - .object(const $Response_BuilderType()); - } - - static final _id_networkResponse = _class.instanceMethodId( - r"networkResponse", - r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", - ); - - static final _networkResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Response$Builder networkResponse(okhttp3.Response response) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder networkResponse( - Response response, - ) { - return _networkResponse(reference.pointer, - _id_networkResponse as jni.JMethodIDPtr, response.reference.pointer) - .object(const $Response_BuilderType()); - } - - static final _id_cacheResponse = _class.instanceMethodId( - r"cacheResponse", - r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", - ); - - static final _cacheResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Response$Builder cacheResponse(okhttp3.Response response) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder cacheResponse( - Response response, - ) { - return _cacheResponse(reference.pointer, - _id_cacheResponse as jni.JMethodIDPtr, response.reference.pointer) - .object(const $Response_BuilderType()); - } - - static final _id_priorResponse = _class.instanceMethodId( - r"priorResponse", - r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", - ); - - static final _priorResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public okhttp3.Response$Builder priorResponse(okhttp3.Response response) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder priorResponse( - Response response, - ) { - return _priorResponse(reference.pointer, - _id_priorResponse as jni.JMethodIDPtr, response.reference.pointer) - .object(const $Response_BuilderType()); - } - - static final _id_sentRequestAtMillis = _class.instanceMethodId( - r"sentRequestAtMillis", - r"(J)Lokhttp3/Response$Builder;", - ); - - static final _sentRequestAtMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); - - /// from: public okhttp3.Response$Builder sentRequestAtMillis(long j) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder sentRequestAtMillis( - int j, - ) { - return _sentRequestAtMillis( - reference.pointer, _id_sentRequestAtMillis as jni.JMethodIDPtr, j) - .object(const $Response_BuilderType()); - } - - static final _id_receivedResponseAtMillis = _class.instanceMethodId( - r"receivedResponseAtMillis", - r"(J)Lokhttp3/Response$Builder;", - ); - - static final _receivedResponseAtMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); - - /// from: public okhttp3.Response$Builder receivedResponseAtMillis(long j) - /// The returned object must be released after use, by calling the [release] method. - Response_Builder receivedResponseAtMillis( - int j, - ) { - return _receivedResponseAtMillis(reference.pointer, - _id_receivedResponseAtMillis as jni.JMethodIDPtr, j) - .object(const $Response_BuilderType()); - } - - static final _id_build = _class.instanceMethodId( - r"build", - r"()Lokhttp3/Response;", - ); - - static final _build = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public okhttp3.Response build() - /// The returned object must be released after use, by calling the [release] method. - Response build() { - return _build(reference.pointer, _id_build as jni.JMethodIDPtr) - .object(const $ResponseType()); - } -} - -final class $Response_BuilderType extends jni.JObjType { - const $Response_BuilderType(); - - @override - String get signature => r"Lokhttp3/Response$Builder;"; - - @override - Response_Builder fromReference(jni.JReference reference) => - Response_Builder.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($Response_BuilderType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($Response_BuilderType) && - other is $Response_BuilderType; - } -} - -/// from: okhttp3.Response -class Response extends jni.JObject { - @override - late final jni.JObjType $type = type; - - Response.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/Response"); - - /// The type which includes information such as the signature of this class. - static const type = $ResponseType(); - static final _id_new0 = _class.constructorId( - r"(Lokhttp3/Request;Lokhttp3/Protocol;Ljava/lang/String;ILokhttp3/Handshake;Lokhttp3/Headers;Lokhttp3/ResponseBody;Lokhttp3/Response;Lokhttp3/Response;Lokhttp3/Response;JJLokhttp3/internal/connection/Exchange;)V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64, - ffi.Pointer - )>)>>("globalEnv_NewObject") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer)>(); - - /// from: public void (okhttp3.Request request, okhttp3.Protocol protocol, java.lang.String string, int i, okhttp3.Handshake handshake, okhttp3.Headers headers, okhttp3.ResponseBody responseBody, okhttp3.Response response, okhttp3.Response response1, okhttp3.Response response2, long j, long j1, okhttp3.internal.connection.Exchange exchange) - /// The returned object must be released after use, by calling the [release] method. - factory Response( - request_.Request request, - jni.JObject protocol, - jni.JString string, - int i, - jni.JObject handshake, - headers_.Headers headers, - responsebody_.ResponseBody responseBody, - Response response, - Response response1, - Response response2, - int j, - int j1, - jni.JObject exchange, - ) { - return Response.fromReference(_new0( - _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, - request.reference.pointer, - protocol.reference.pointer, - string.reference.pointer, - i, - handshake.reference.pointer, - headers.reference.pointer, - responseBody.reference.pointer, - response.reference.pointer, - response1.reference.pointer, - response2.reference.pointer, - j, - j1, - exchange.reference.pointer) - .reference); - } - - static final _id_request = _class.instanceMethodId( - r"request", - r"()Lokhttp3/Request;", - ); - - static final _request = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Request request() - /// The returned object must be released after use, by calling the [release] method. - request_.Request request() { - return _request(reference.pointer, _id_request as jni.JMethodIDPtr) - .object(const request_.$RequestType()); - } - - static final _id_protocol = _class.instanceMethodId( - r"protocol", - r"()Lokhttp3/Protocol;", - ); - - static final _protocol = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Protocol protocol() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject protocol() { - return _protocol(reference.pointer, _id_protocol as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_message = _class.instanceMethodId( - r"message", - r"()Ljava/lang/String;", - ); - - static final _message = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.lang.String message() - /// The returned object must be released after use, by calling the [release] method. - jni.JString message() { - return _message(reference.pointer, _id_message as jni.JMethodIDPtr) - .object(const jni.JStringType()); - } - - static final _id_code = _class.instanceMethodId( - r"code", - r"()I", - ); - - static final _code = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final int code() - int code() { - return _code(reference.pointer, _id_code as jni.JMethodIDPtr).integer; - } - - static final _id_handshake = _class.instanceMethodId( - r"handshake", - r"()Lokhttp3/Handshake;", - ); - - static final _handshake = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Handshake handshake() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject handshake() { - return _handshake(reference.pointer, _id_handshake as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_headers = _class.instanceMethodId( - r"headers", - r"()Lokhttp3/Headers;", - ); - - static final _headers = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Headers headers() - /// The returned object must be released after use, by calling the [release] method. - headers_.Headers headers() { - return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr) - .object(const headers_.$HeadersType()); - } - - static final _id_body = _class.instanceMethodId( - r"body", - r"()Lokhttp3/ResponseBody;", - ); - - static final _body = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.ResponseBody body() - /// The returned object must be released after use, by calling the [release] method. - responsebody_.ResponseBody body() { - return _body(reference.pointer, _id_body as jni.JMethodIDPtr) - .object(const responsebody_.$ResponseBodyType()); - } - - static final _id_networkResponse = _class.instanceMethodId( - r"networkResponse", - r"()Lokhttp3/Response;", - ); - - static final _networkResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Response networkResponse() - /// The returned object must be released after use, by calling the [release] method. - Response networkResponse() { - return _networkResponse( - reference.pointer, _id_networkResponse as jni.JMethodIDPtr) - .object(const $ResponseType()); - } - - static final _id_cacheResponse = _class.instanceMethodId( - r"cacheResponse", - r"()Lokhttp3/Response;", - ); - - static final _cacheResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Response cacheResponse() - /// The returned object must be released after use, by calling the [release] method. - Response cacheResponse() { - return _cacheResponse( - reference.pointer, _id_cacheResponse as jni.JMethodIDPtr) - .object(const $ResponseType()); - } - - static final _id_priorResponse = _class.instanceMethodId( - r"priorResponse", - r"()Lokhttp3/Response;", - ); - - static final _priorResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Response priorResponse() - /// The returned object must be released after use, by calling the [release] method. - Response priorResponse() { - return _priorResponse( - reference.pointer, _id_priorResponse as jni.JMethodIDPtr) - .object(const $ResponseType()); - } - - static final _id_sentRequestAtMillis = _class.instanceMethodId( - r"sentRequestAtMillis", - r"()J", - ); - - static final _sentRequestAtMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final long sentRequestAtMillis() - int sentRequestAtMillis() { - return _sentRequestAtMillis( - reference.pointer, _id_sentRequestAtMillis as jni.JMethodIDPtr) - .long; - } - - static final _id_receivedResponseAtMillis = _class.instanceMethodId( - r"receivedResponseAtMillis", - r"()J", - ); - - static final _receivedResponseAtMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final long receivedResponseAtMillis() - int receivedResponseAtMillis() { - return _receivedResponseAtMillis( - reference.pointer, _id_receivedResponseAtMillis as jni.JMethodIDPtr) - .long; - } - - static final _id_exchange = _class.instanceMethodId( - r"exchange", - r"()Lokhttp3/internal/connection/Exchange;", - ); - - static final _exchange = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.internal.connection.Exchange exchange() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject exchange() { - return _exchange(reference.pointer, _id_exchange as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_isSuccessful = _class.instanceMethodId( - r"isSuccessful", - r"()Z", - ); - - static final _isSuccessful = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final boolean isSuccessful() - bool isSuccessful() { - return _isSuccessful( - reference.pointer, _id_isSuccessful as jni.JMethodIDPtr) - .boolean; - } - - static final _id_headers1 = _class.instanceMethodId( - r"headers", - r"(Ljava/lang/String;)Ljava/util/List;", - ); - - static final _headers1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final java.util.List headers(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - jni.JList headers1( - jni.JString string, - ) { - return _headers1(reference.pointer, _id_headers1 as jni.JMethodIDPtr, - string.reference.pointer) - .object(const jni.JListType(jni.JStringType())); - } - - static final _id_header = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", - ); - - static final _header = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final java.lang.String header(java.lang.String string, java.lang.String string1) - /// The returned object must be released after use, by calling the [release] method. - jni.JString header( - jni.JString string, - jni.JString string1, - ) { - return _header(reference.pointer, _id_header as jni.JMethodIDPtr, - string.reference.pointer, string1.reference.pointer) - .object(const jni.JStringType()); - } - - static final _id_trailers = _class.instanceMethodId( - r"trailers", - r"()Lokhttp3/Headers;", - ); - - static final _trailers = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Headers trailers() - /// The returned object must be released after use, by calling the [release] method. - headers_.Headers trailers() { - return _trailers(reference.pointer, _id_trailers as jni.JMethodIDPtr) - .object(const headers_.$HeadersType()); - } - - static final _id_peekBody = _class.instanceMethodId( - r"peekBody", - r"(J)Lokhttp3/ResponseBody;", - ); - - static final _peekBody = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); - - /// from: public final okhttp3.ResponseBody peekBody(long j) - /// The returned object must be released after use, by calling the [release] method. - responsebody_.ResponseBody peekBody( - int j, - ) { - return _peekBody(reference.pointer, _id_peekBody as jni.JMethodIDPtr, j) - .object(const responsebody_.$ResponseBodyType()); - } - - static final _id_newBuilder = _class.instanceMethodId( - r"newBuilder", - r"()Lokhttp3/Response$Builder;", - ); - - static final _newBuilder = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.Response$Builder newBuilder() - /// The returned object must be released after use, by calling the [release] method. - Response_Builder newBuilder() { - return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) - .object(const $Response_BuilderType()); - } - - static final _id_isRedirect = _class.instanceMethodId( - r"isRedirect", - r"()Z", - ); - - static final _isRedirect = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final boolean isRedirect() - bool isRedirect() { - return _isRedirect(reference.pointer, _id_isRedirect as jni.JMethodIDPtr) - .boolean; - } - - static final _id_challenges = _class.instanceMethodId( - r"challenges", - r"()Ljava/util/List;", - ); - - static final _challenges = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.util.List challenges() - /// The returned object must be released after use, by calling the [release] method. - jni.JList challenges() { - return _challenges(reference.pointer, _id_challenges as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); - } - - static final _id_cacheControl = _class.instanceMethodId( - r"cacheControl", - r"()Lokhttp3/CacheControl;", - ); - - static final _cacheControl = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okhttp3.CacheControl cacheControl() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject cacheControl() { - return _cacheControl( - reference.pointer, _id_cacheControl as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_close = _class.instanceMethodId( - r"close", - r"()V", - ); - - static final _close = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") - .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void close() - void close() { - _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); - } - - static final _id_toString1 = _class.instanceMethodId( - r"toString", - r"()Ljava/lang/String;", - ); - - static final _toString1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public java.lang.String toString() - /// The returned object must be released after use, by calling the [release] method. - jni.JString toString1() { - return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) - .object(const jni.JStringType()); - } - - static final _id_header1 = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;)Ljava/lang/String;", - ); - - static final _header1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public final java.lang.String header(java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - jni.JString header1( - jni.JString string, - ) { - return _header1(reference.pointer, _id_header1 as jni.JMethodIDPtr, - string.reference.pointer) - .object(const jni.JStringType()); - } -} - -final class $ResponseType extends jni.JObjType { - const $ResponseType(); - - @override - String get signature => r"Lokhttp3/Response;"; - - @override - Response fromReference(jni.JReference reference) => - Response.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($ResponseType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($ResponseType) && other is $ResponseType; - } -} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/ResponseBody.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/ResponseBody.dart deleted file mode 100644 index 70514819d4..0000000000 --- a/pkgs/ok_http/lib/src/third_party/okhttp3/ResponseBody.dart +++ /dev/null @@ -1,995 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_local_variable -// ignore_for_file: unused_shown_name -// ignore_for_file: use_super_parameters - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -/// from: okhttp3.ResponseBody$BomAwareReader -class ResponseBody_BomAwareReader extends jni.JObject { - @override - late final jni.JObjType $type = type; - - ResponseBody_BomAwareReader.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = - jni.JClass.forName(r"okhttp3/ResponseBody$BomAwareReader"); - - /// The type which includes information such as the signature of this class. - static const type = $ResponseBody_BomAwareReaderType(); - static final _id_new0 = _class.constructorId( - r"(Lokio/BufferedSource;Ljava/nio/charset/Charset;)V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_NewObject") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public void (okio.BufferedSource bufferedSource, java.nio.charset.Charset charset) - /// The returned object must be released after use, by calling the [release] method. - factory ResponseBody_BomAwareReader( - jni.JObject bufferedSource, - jni.JObject charset, - ) { - return ResponseBody_BomAwareReader.fromReference(_new0( - _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, - bufferedSource.reference.pointer, - charset.reference.pointer) - .reference); - } - - static final _id_read = _class.instanceMethodId( - r"read", - r"([CII)I", - ); - - static final _read = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Int64, - ffi.Int64 - )>)>>("globalEnv_CallIntMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, int)>(); - - /// from: public int read(char[] cs, int i, int i1) - int read( - jni.JArray cs, - int i, - int i1, - ) { - return _read(reference.pointer, _id_read as jni.JMethodIDPtr, - cs.reference.pointer, i, i1) - .integer; - } - - static final _id_close = _class.instanceMethodId( - r"close", - r"()V", - ); - - static final _close = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") - .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void close() - void close() { - _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); - } -} - -final class $ResponseBody_BomAwareReaderType - extends jni.JObjType { - const $ResponseBody_BomAwareReaderType(); - - @override - String get signature => r"Lokhttp3/ResponseBody$BomAwareReader;"; - - @override - ResponseBody_BomAwareReader fromReference(jni.JReference reference) => - ResponseBody_BomAwareReader.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($ResponseBody_BomAwareReaderType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($ResponseBody_BomAwareReaderType) && - other is $ResponseBody_BomAwareReaderType; - } -} - -/// from: okhttp3.ResponseBody$Companion -class ResponseBody_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; - - ResponseBody_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/ResponseBody$Companion"); - - /// The type which includes information such as the signature of this class. - static const type = $ResponseBody_CompanionType(); - static final _id_create = _class.instanceMethodId( - r"create", - r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", - ); - - static final _create = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.ResponseBody create(java.lang.String string, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - ResponseBody create( - jni.JString string, - jni.JObject mediaType, - ) { - return _create(reference.pointer, _id_create as jni.JMethodIDPtr, - string.reference.pointer, mediaType.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_create1 = _class.instanceMethodId( - r"create", - r"([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;", - ); - - static final _create1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.ResponseBody create(byte[] bs, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - ResponseBody create1( - jni.JArray bs, - jni.JObject mediaType, - ) { - return _create1(reference.pointer, _id_create1 as jni.JMethodIDPtr, - bs.reference.pointer, mediaType.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_create2 = _class.instanceMethodId( - r"create", - r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", - ); - - static final _create2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - ResponseBody create2( - jni.JObject byteString, - jni.JObject mediaType, - ) { - return _create2(reference.pointer, _id_create2 as jni.JMethodIDPtr, - byteString.reference.pointer, mediaType.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_create3 = _class.instanceMethodId( - r"create", - r"(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;", - ); - - static final _create3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer, - ffi.Int64 - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int)>(); - - /// from: public final okhttp3.ResponseBody create(okio.BufferedSource bufferedSource, okhttp3.MediaType mediaType, long j) - /// The returned object must be released after use, by calling the [release] method. - ResponseBody create3( - jni.JObject bufferedSource, - jni.JObject mediaType, - int j, - ) { - return _create3(reference.pointer, _id_create3 as jni.JMethodIDPtr, - bufferedSource.reference.pointer, mediaType.reference.pointer, j) - .object(const $ResponseBodyType()); - } - - static final _id_create4 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;", - ); - - static final _create4 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - ResponseBody create4( - jni.JObject mediaType, - jni.JString string, - ) { - return _create4(reference.pointer, _id_create4 as jni.JMethodIDPtr, - mediaType.reference.pointer, string.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_create5 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;", - ); - - static final _create5 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, byte[] bs) - /// The returned object must be released after use, by calling the [release] method. - ResponseBody create5( - jni.JObject mediaType, - jni.JArray bs, - ) { - return _create5(reference.pointer, _id_create5 as jni.JMethodIDPtr, - mediaType.reference.pointer, bs.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_create6 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;", - ); - - static final _create6 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) - /// The returned object must be released after use, by calling the [release] method. - ResponseBody create6( - jni.JObject mediaType, - jni.JObject byteString, - ) { - return _create6(reference.pointer, _id_create6 as jni.JMethodIDPtr, - mediaType.reference.pointer, byteString.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_create7 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;", - ); - - static final _create7 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Int64, - ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, ffi.Pointer)>(); - - /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, long j, okio.BufferedSource bufferedSource) - /// The returned object must be released after use, by calling the [release] method. - ResponseBody create7( - jni.JObject mediaType, - int j, - jni.JObject bufferedSource, - ) { - return _create7(reference.pointer, _id_create7 as jni.JMethodIDPtr, - mediaType.reference.pointer, j, bufferedSource.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) - /// The returned object must be released after use, by calling the [release] method. - factory ResponseBody_Companion( - jni.JObject defaultConstructorMarker, - ) { - return ResponseBody_Companion.fromReference(_new0( - _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, - defaultConstructorMarker.reference.pointer) - .reference); - } -} - -final class $ResponseBody_CompanionType - extends jni.JObjType { - const $ResponseBody_CompanionType(); - - @override - String get signature => r"Lokhttp3/ResponseBody$Companion;"; - - @override - ResponseBody_Companion fromReference(jni.JReference reference) => - ResponseBody_Companion.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($ResponseBody_CompanionType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($ResponseBody_CompanionType) && - other is $ResponseBody_CompanionType; - } -} - -/// from: okhttp3.ResponseBody -class ResponseBody extends jni.JObject { - @override - late final jni.JObjType $type = type; - - ResponseBody.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); - - static final _class = jni.JClass.forName(r"okhttp3/ResponseBody"); - - /// The type which includes information such as the signature of this class. - static const type = $ResponseBodyType(); - static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/ResponseBody$Companion;", - ); - - /// from: static public final okhttp3.ResponseBody$Companion Companion - /// The returned object must be released after use, by calling the [release] method. - static ResponseBody_Companion get Companion => - _id_Companion.get(_class, const $ResponseBody_CompanionType()); - - static final _id_new0 = _class.constructorId( - r"()V", - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_NewObject") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory ResponseBody() { - return ResponseBody.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - - static final _id_contentType = _class.instanceMethodId( - r"contentType", - r"()Lokhttp3/MediaType;", - ); - - static final _contentType = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public abstract okhttp3.MediaType contentType() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject contentType() { - return _contentType(reference.pointer, _id_contentType as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_contentLength = _class.instanceMethodId( - r"contentLength", - r"()J", - ); - - static final _contentLength = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public abstract long contentLength() - int contentLength() { - return _contentLength( - reference.pointer, _id_contentLength as jni.JMethodIDPtr) - .long; - } - - static final _id_byteStream = _class.instanceMethodId( - r"byteStream", - r"()Ljava/io/InputStream;", - ); - - static final _byteStream = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.io.InputStream byteStream() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject byteStream() { - return _byteStream(reference.pointer, _id_byteStream as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_source = _class.instanceMethodId( - r"source", - r"()Lokio/BufferedSource;", - ); - - static final _source = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public abstract okio.BufferedSource source() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject source() { - return _source(reference.pointer, _id_source as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_bytes = _class.instanceMethodId( - r"bytes", - r"()[B", - ); - - static final _bytes = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final byte[] bytes() - /// The returned object must be released after use, by calling the [release] method. - jni.JArray bytes() { - return _bytes(reference.pointer, _id_bytes as jni.JMethodIDPtr) - .object(const jni.JArrayType(jni.jbyteType())); - } - - static final _id_byteString = _class.instanceMethodId( - r"byteString", - r"()Lokio/ByteString;", - ); - - static final _byteString = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final okio.ByteString byteString() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject byteString() { - return _byteString(reference.pointer, _id_byteString as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_charStream = _class.instanceMethodId( - r"charStream", - r"()Ljava/io/Reader;", - ); - - static final _charStream = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.io.Reader charStream() - /// The returned object must be released after use, by calling the [release] method. - jni.JObject charStream() { - return _charStream(reference.pointer, _id_charStream as jni.JMethodIDPtr) - .object(const jni.JObjectType()); - } - - static final _id_string = _class.instanceMethodId( - r"string", - r"()Ljava/lang/String;", - ); - - static final _string = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final java.lang.String string() - /// The returned object must be released after use, by calling the [release] method. - jni.JString string() { - return _string(reference.pointer, _id_string as jni.JMethodIDPtr) - .object(const jni.JStringType()); - } - - static final _id_close = _class.instanceMethodId( - r"close", - r"()V", - ); - - static final _close = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") - .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void close() - void close() { - _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); - } - - static final _id_create = _class.staticMethodId( - r"create", - r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", - ); - - static final _create = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.ResponseBody create(java.lang.String string, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create( - jni.JString string, - jni.JObject mediaType, - ) { - return _create(_class.reference.pointer, _id_create as jni.JMethodIDPtr, - string.reference.pointer, mediaType.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_create1 = _class.staticMethodId( - r"create", - r"([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;", - ); - - static final _create1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.ResponseBody create(byte[] bs, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create1( - jni.JArray bs, - jni.JObject mediaType, - ) { - return _create1(_class.reference.pointer, _id_create1 as jni.JMethodIDPtr, - bs.reference.pointer, mediaType.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_create2 = _class.staticMethodId( - r"create", - r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", - ); - - static final _create2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) - /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create2( - jni.JObject byteString, - jni.JObject mediaType, - ) { - return _create2(_class.reference.pointer, _id_create2 as jni.JMethodIDPtr, - byteString.reference.pointer, mediaType.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_create3 = _class.staticMethodId( - r"create", - r"(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;", - ); - - static final _create3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer, - ffi.Int64 - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int)>(); - - /// from: static public final okhttp3.ResponseBody create(okio.BufferedSource bufferedSource, okhttp3.MediaType mediaType, long j) - /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create3( - jni.JObject bufferedSource, - jni.JObject mediaType, - int j, - ) { - return _create3(_class.reference.pointer, _id_create3 as jni.JMethodIDPtr, - bufferedSource.reference.pointer, mediaType.reference.pointer, j) - .object(const $ResponseBodyType()); - } - - static final _id_create4 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;", - ); - - static final _create4 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, java.lang.String string) - /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create4( - jni.JObject mediaType, - jni.JString string, - ) { - return _create4(_class.reference.pointer, _id_create4 as jni.JMethodIDPtr, - mediaType.reference.pointer, string.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_create5 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;", - ); - - static final _create5 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, byte[] bs) - /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create5( - jni.JObject mediaType, - jni.JArray bs, - ) { - return _create5(_class.reference.pointer, _id_create5 as jni.JMethodIDPtr, - mediaType.reference.pointer, bs.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_create6 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;", - ); - - static final _create6 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) - /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create6( - jni.JObject mediaType, - jni.JObject byteString, - ) { - return _create6(_class.reference.pointer, _id_create6 as jni.JMethodIDPtr, - mediaType.reference.pointer, byteString.reference.pointer) - .object(const $ResponseBodyType()); - } - - static final _id_create7 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;", - ); - - static final _create7 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Int64, - ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, ffi.Pointer)>(); - - /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, long j, okio.BufferedSource bufferedSource) - /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create7( - jni.JObject mediaType, - int j, - jni.JObject bufferedSource, - ) { - return _create7(_class.reference.pointer, _id_create7 as jni.JMethodIDPtr, - mediaType.reference.pointer, j, bufferedSource.reference.pointer) - .object(const $ResponseBodyType()); - } -} - -final class $ResponseBodyType extends jni.JObjType { - const $ResponseBodyType(); - - @override - String get signature => r"Lokhttp3/ResponseBody;"; - - @override - ResponseBody fromReference(jni.JReference reference) => - ResponseBody.fromReference(reference); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($ResponseBodyType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($ResponseBodyType) && - other is $ResponseBodyType; - } -} diff --git a/pkgs/ok_http/lib/src/third_party/okhttp3/_package.dart b/pkgs/ok_http/lib/src/third_party/okhttp3/_package.dart deleted file mode 100644 index 64124553ea..0000000000 --- a/pkgs/ok_http/lib/src/third_party/okhttp3/_package.dart +++ /dev/null @@ -1,8 +0,0 @@ -export "Request.dart"; -export "RequestBody.dart"; -export "Response.dart"; -export "ResponseBody.dart"; -export "OkHttpClient.dart"; -export "Call.dart"; -export "Headers.dart"; -export "Callback.dart"; From 5d34305c4250ae5e4fc47a17634cb710268a43a0 Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Tue, 4 Jun 2024 00:22:58 +0530 Subject: [PATCH 379/448] pkgs/http_client_conformance_tests: add boolean flag `supportsFoldedHeaders` (#1222) --- .../lib/http_client_conformance_tests.dart | 7 ++++++- .../lib/src/response_headers_tests.dart | 7 +++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index 07903b5246..2d51c18f1b 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -64,6 +64,9 @@ export 'src/server_errors_test.dart' show testServerErrors; /// If [canReceiveSetCookieHeaders] is `false` then tests that require that /// "set-cookie" headers be received by the client will not be run. /// +/// If [supportsFoldedHeaders] is `false` then the tests that assume that the +/// [Client] can parse folded headers will be skipped. +/// /// The tests are run against a series of HTTP servers that are started by the /// tests. If the tests are run in the browser, then the test servers are /// started in another process. Otherwise, the test servers are run in-process. @@ -74,6 +77,7 @@ void testAll( bool redirectAlwaysAllowed = false, bool canWorkInIsolates = true, bool preservesMethodCase = false, + bool supportsFoldedHeaders = true, bool canSendCookieHeaders = false, bool canReceiveSetCookieHeaders = false, }) { @@ -86,7 +90,8 @@ void testAll( canStreamResponseBody: canStreamResponseBody); testRequestHeaders(clientFactory()); testRequestMethods(clientFactory(), preservesMethodCase: preservesMethodCase); - testResponseHeaders(clientFactory()); + testResponseHeaders(clientFactory(), + supportsFoldedHeaders: supportsFoldedHeaders); testResponseStatusLine(clientFactory()); testRedirect(clientFactory(), redirectAlwaysAllowed: redirectAlwaysAllowed); testServerErrors(clientFactory()); diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart index 84f0fb67f8..b0295fb6f7 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart @@ -11,7 +11,8 @@ import 'response_headers_server_vm.dart' if (dart.library.js_interop) 'response_headers_server_web.dart'; /// Tests that the [Client] correctly processes response headers. -void testResponseHeaders(Client client) async { +void testResponseHeaders(Client client, + {bool supportsFoldedHeaders = true}) async { group('server headers', () { late String host; late StreamChannel httpServerChannel; @@ -177,6 +178,8 @@ void testResponseHeaders(Client client) async { allOf(matches(RegExp(r'BAR {0,3}[ \t]? {0,7}[ \t]? {0,3}BAZ')), contains(' '))); }); - }); + }, + skip: + !supportsFoldedHeaders ? 'does not support folded headers' : false); }); } From 07ecbafdb455dd4b32f008ca3250b0c714031f19 Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Tue, 4 Jun 2024 05:13:51 +0530 Subject: [PATCH 380/448] pkgs/ok_http: Close the client (override `close()` from `BaseClient`) (#1224) --- .../example/integration_test/client_test.dart | 2 + pkgs/ok_http/jnigen.yaml | 5 + pkgs/ok_http/lib/src/jni/bindings.dart | 1317 ++++++++++++++++- pkgs/ok_http/lib/src/ok_http_client.dart | 34 + 4 files changed, 1349 insertions(+), 9 deletions(-) diff --git a/pkgs/ok_http/example/integration_test/client_test.dart b/pkgs/ok_http/example/integration_test/client_test.dart index 2ff9a10399..b888cf6bf4 100644 --- a/pkgs/ok_http/example/integration_test/client_test.dart +++ b/pkgs/ok_http/example/integration_test/client_test.dart @@ -19,9 +19,11 @@ Future testConformance() async { testResponseBody(OkHttpClient(), canStreamResponseBody: false); testRequestHeaders(OkHttpClient()); testRequestMethods(OkHttpClient(), preservesMethodCase: true); + testResponseHeaders(OkHttpClient(), supportsFoldedHeaders: false); testResponseStatusLine(OkHttpClient()); testCompressedResponseBody(OkHttpClient()); testServerErrors(OkHttpClient()); + testClose(OkHttpClient.new); testIsolate(OkHttpClient.new); testResponseCookies(OkHttpClient(), canReceiveSetCookieHeaders: true); }); diff --git a/pkgs/ok_http/jnigen.yaml b/pkgs/ok_http/jnigen.yaml index 6243a04bce..1d0d60d457 100644 --- a/pkgs/ok_http/jnigen.yaml +++ b/pkgs/ok_http/jnigen.yaml @@ -23,6 +23,9 @@ classes: - "okhttp3.Call" - "okhttp3.Headers" - "okhttp3.Callback" + - "okhttp3.ConnectionPool" + - "okhttp3.Dispatcher" + - "okhttp3.Cache" # Exclude the deprecated methods listed below # They cause syntax errors during the `dart format` step of JNIGen. @@ -76,6 +79,8 @@ exclude: - 'okhttp3.OkHttpClient\$Builder#-addNetworkInterceptor' - 'okhttp3.Headers\$Companion#-deprecated_of' - "okhttp3.Headers#-deprecated_size" + - "okhttp3.Dispatcher#-deprecated_executorService" + - "okhttp3.Cache#-deprecated_directory" class_path: - "jar/okhttp-4.12.0.jar" diff --git a/pkgs/ok_http/lib/src/jni/bindings.dart b/pkgs/ok_http/lib/src/jni/bindings.dart index 64b23fd85e..53945e6581 100644 --- a/pkgs/ok_http/lib/src/jni/bindings.dart +++ b/pkgs/ok_http/lib/src/jni/bindings.dart @@ -4334,7 +4334,7 @@ class OkHttpClient_Builder extends jni.JObject { /// from: public final okhttp3.OkHttpClient$Builder dispatcher(okhttp3.Dispatcher dispatcher) /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder dispatcher( - jni.JObject dispatcher, + Dispatcher dispatcher, ) { return _dispatcher(reference.pointer, _id_dispatcher as jni.JMethodIDPtr, dispatcher.reference.pointer) @@ -4360,7 +4360,7 @@ class OkHttpClient_Builder extends jni.JObject { /// from: public final okhttp3.OkHttpClient$Builder connectionPool(okhttp3.ConnectionPool connectionPool) /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder connectionPool( - jni.JObject connectionPool, + ConnectionPool connectionPool, ) { return _connectionPool( reference.pointer, @@ -4673,7 +4673,7 @@ class OkHttpClient_Builder extends jni.JObject { /// from: public final okhttp3.OkHttpClient$Builder cache(okhttp3.Cache cache) /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder cache( - jni.JObject cache, + Cache cache, ) { return _cache(reference.pointer, _id_cache as jni.JMethodIDPtr, cache.reference.pointer) @@ -5463,9 +5463,9 @@ class OkHttpClient extends jni.JObject { /// from: public final okhttp3.Dispatcher dispatcher() /// The returned object must be released after use, by calling the [release] method. - jni.JObject dispatcher() { + Dispatcher dispatcher() { return _dispatcher(reference.pointer, _id_dispatcher as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + .object(const $DispatcherType()); } static final _id_connectionPool = _class.instanceMethodId( @@ -5487,10 +5487,10 @@ class OkHttpClient extends jni.JObject { /// from: public final okhttp3.ConnectionPool connectionPool() /// The returned object must be released after use, by calling the [release] method. - jni.JObject connectionPool() { + ConnectionPool connectionPool() { return _connectionPool( reference.pointer, _id_connectionPool as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + .object(const $ConnectionPoolType()); } static final _id_interceptors = _class.instanceMethodId( @@ -5708,9 +5708,9 @@ class OkHttpClient extends jni.JObject { /// from: public final okhttp3.Cache cache() /// The returned object must be released after use, by calling the [release] method. - jni.JObject cache() { + Cache cache() { return _cache(reference.pointer, _id_cache as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + .object(const $CacheType()); } static final _id_dns = _class.instanceMethodId( @@ -8138,3 +8138,1302 @@ final class $CallbackType extends jni.JObjType { return other.runtimeType == ($CallbackType) && other is $CallbackType; } } + +/// from: okhttp3.ConnectionPool +class ConnectionPool extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ConnectionPool.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/ConnectionPool"); + + /// The type which includes information such as the signature of this class. + static const type = $ConnectionPoolType(); + static final _id_new0 = _class.constructorId( + r"(Lokhttp3/internal/connection/RealConnectionPool;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (okhttp3.internal.connection.RealConnectionPool realConnectionPool) + /// The returned object must be released after use, by calling the [release] method. + factory ConnectionPool( + jni.JObject realConnectionPool, + ) { + return ConnectionPool.fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, realConnectionPool.reference.pointer) + .reference); + } + + static final _id_new1 = _class.constructorId( + r"(IJLjava/util/concurrent/TimeUnit;)V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Int64, + ffi.Int64, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + int, ffi.Pointer)>(); + + /// from: public void (int i, long j, java.util.concurrent.TimeUnit timeUnit) + /// The returned object must be released after use, by calling the [release] method. + factory ConnectionPool.new1( + int i, + int j, + jni.JObject timeUnit, + ) { + return ConnectionPool.fromReference(_new1(_class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, i, j, timeUnit.reference.pointer) + .reference); + } + + static final _id_new2 = _class.constructorId( + r"()V", + ); + + static final _new2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory ConnectionPool.new2() { + return ConnectionPool.fromReference( + _new2(_class.reference.pointer, _id_new2 as jni.JMethodIDPtr) + .reference); + } + + static final _id_idleConnectionCount = _class.instanceMethodId( + r"idleConnectionCount", + r"()I", + ); + + static final _idleConnectionCount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int idleConnectionCount() + int idleConnectionCount() { + return _idleConnectionCount( + reference.pointer, _id_idleConnectionCount as jni.JMethodIDPtr) + .integer; + } + + static final _id_connectionCount = _class.instanceMethodId( + r"connectionCount", + r"()I", + ); + + static final _connectionCount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int connectionCount() + int connectionCount() { + return _connectionCount( + reference.pointer, _id_connectionCount as jni.JMethodIDPtr) + .integer; + } + + static final _id_evictAll = _class.instanceMethodId( + r"evictAll", + r"()V", + ); + + static final _evictAll = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final void evictAll() + void evictAll() { + _evictAll(reference.pointer, _id_evictAll as jni.JMethodIDPtr).check(); + } +} + +final class $ConnectionPoolType extends jni.JObjType { + const $ConnectionPoolType(); + + @override + String get signature => r"Lokhttp3/ConnectionPool;"; + + @override + ConnectionPool fromReference(jni.JReference reference) => + ConnectionPool.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ConnectionPoolType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ConnectionPoolType) && + other is $ConnectionPoolType; + } +} + +/// from: okhttp3.Dispatcher +class Dispatcher extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Dispatcher.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Dispatcher"); + + /// The type which includes information such as the signature of this class. + static const type = $DispatcherType(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory Dispatcher() { + return Dispatcher.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_getMaxRequests = _class.instanceMethodId( + r"getMaxRequests", + r"()I", + ); + + static final _getMaxRequests = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int getMaxRequests() + int getMaxRequests() { + return _getMaxRequests( + reference.pointer, _id_getMaxRequests as jni.JMethodIDPtr) + .integer; + } + + static final _id_setMaxRequests = _class.instanceMethodId( + r"setMaxRequests", + r"(I)V", + ); + + static final _setMaxRequests = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final void setMaxRequests(int i) + void setMaxRequests( + int i, + ) { + _setMaxRequests( + reference.pointer, _id_setMaxRequests as jni.JMethodIDPtr, i) + .check(); + } + + static final _id_getMaxRequestsPerHost = _class.instanceMethodId( + r"getMaxRequestsPerHost", + r"()I", + ); + + static final _getMaxRequestsPerHost = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int getMaxRequestsPerHost() + int getMaxRequestsPerHost() { + return _getMaxRequestsPerHost( + reference.pointer, _id_getMaxRequestsPerHost as jni.JMethodIDPtr) + .integer; + } + + static final _id_setMaxRequestsPerHost = _class.instanceMethodId( + r"setMaxRequestsPerHost", + r"(I)V", + ); + + static final _setMaxRequestsPerHost = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final void setMaxRequestsPerHost(int i) + void setMaxRequestsPerHost( + int i, + ) { + _setMaxRequestsPerHost( + reference.pointer, _id_setMaxRequestsPerHost as jni.JMethodIDPtr, i) + .check(); + } + + static final _id_getIdleCallback = _class.instanceMethodId( + r"getIdleCallback", + r"()Ljava/lang/Runnable;", + ); + + static final _getIdleCallback = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.lang.Runnable getIdleCallback() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject getIdleCallback() { + return _getIdleCallback( + reference.pointer, _id_getIdleCallback as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_setIdleCallback = _class.instanceMethodId( + r"setIdleCallback", + r"(Ljava/lang/Runnable;)V", + ); + + static final _setIdleCallback = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final void setIdleCallback(java.lang.Runnable runnable) + void setIdleCallback( + jni.JObject runnable, + ) { + _setIdleCallback(reference.pointer, _id_setIdleCallback as jni.JMethodIDPtr, + runnable.reference.pointer) + .check(); + } + + static final _id_executorService = _class.instanceMethodId( + r"executorService", + r"()Ljava/util/concurrent/ExecutorService;", + ); + + static final _executorService = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.concurrent.ExecutorService executorService() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject executorService() { + return _executorService( + reference.pointer, _id_executorService as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_new1 = _class.constructorId( + r"(Ljava/util/concurrent/ExecutorService;)V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (java.util.concurrent.ExecutorService executorService) + /// The returned object must be released after use, by calling the [release] method. + factory Dispatcher.new1( + jni.JObject executorService, + ) { + return Dispatcher.fromReference(_new1(_class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, executorService.reference.pointer) + .reference); + } + + static final _id_cancelAll = _class.instanceMethodId( + r"cancelAll", + r"()V", + ); + + static final _cancelAll = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final void cancelAll() + void cancelAll() { + _cancelAll(reference.pointer, _id_cancelAll as jni.JMethodIDPtr).check(); + } + + static final _id_queuedCalls = _class.instanceMethodId( + r"queuedCalls", + r"()Ljava/util/List;", + ); + + static final _queuedCalls = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List queuedCalls() + /// The returned object must be released after use, by calling the [release] method. + jni.JList queuedCalls() { + return _queuedCalls(reference.pointer, _id_queuedCalls as jni.JMethodIDPtr) + .object(const jni.JListType($CallType())); + } + + static final _id_runningCalls = _class.instanceMethodId( + r"runningCalls", + r"()Ljava/util/List;", + ); + + static final _runningCalls = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.List runningCalls() + /// The returned object must be released after use, by calling the [release] method. + jni.JList runningCalls() { + return _runningCalls( + reference.pointer, _id_runningCalls as jni.JMethodIDPtr) + .object(const jni.JListType($CallType())); + } + + static final _id_queuedCallsCount = _class.instanceMethodId( + r"queuedCallsCount", + r"()I", + ); + + static final _queuedCallsCount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int queuedCallsCount() + int queuedCallsCount() { + return _queuedCallsCount( + reference.pointer, _id_queuedCallsCount as jni.JMethodIDPtr) + .integer; + } + + static final _id_runningCallsCount = _class.instanceMethodId( + r"runningCallsCount", + r"()I", + ); + + static final _runningCallsCount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int runningCallsCount() + int runningCallsCount() { + return _runningCallsCount( + reference.pointer, _id_runningCallsCount as jni.JMethodIDPtr) + .integer; + } +} + +final class $DispatcherType extends jni.JObjType { + const $DispatcherType(); + + @override + String get signature => r"Lokhttp3/Dispatcher;"; + + @override + Dispatcher fromReference(jni.JReference reference) => + Dispatcher.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($DispatcherType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($DispatcherType) && other is $DispatcherType; + } +} + +/// from: okhttp3.Cache$Companion +class Cache_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Cache_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Cache$Companion"); + + /// The type which includes information such as the signature of this class. + static const type = $Cache_CompanionType(); + static final _id_key = _class.instanceMethodId( + r"key", + r"(Lokhttp3/HttpUrl;)Ljava/lang/String;", + ); + + static final _key = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final java.lang.String key(okhttp3.HttpUrl httpUrl) + /// The returned object must be released after use, by calling the [release] method. + jni.JString key( + jni.JObject httpUrl, + ) { + return _key(reference.pointer, _id_key as jni.JMethodIDPtr, + httpUrl.reference.pointer) + .object(const jni.JStringType()); + } + + static final _id_varyMatches = _class.instanceMethodId( + r"varyMatches", + r"(Lokhttp3/Response;Lokhttp3/Headers;Lokhttp3/Request;)Z", + ); + + static final _varyMatches = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + /// from: public final boolean varyMatches(okhttp3.Response response, okhttp3.Headers headers, okhttp3.Request request) + bool varyMatches( + Response response, + Headers headers, + Request request, + ) { + return _varyMatches( + reference.pointer, + _id_varyMatches as jni.JMethodIDPtr, + response.reference.pointer, + headers.reference.pointer, + request.reference.pointer) + .boolean; + } + + static final _id_hasVaryAll = _class.instanceMethodId( + r"hasVaryAll", + r"(Lokhttp3/Response;)Z", + ); + + static final _hasVaryAll = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final boolean hasVaryAll(okhttp3.Response response) + bool hasVaryAll( + Response response, + ) { + return _hasVaryAll(reference.pointer, _id_hasVaryAll as jni.JMethodIDPtr, + response.reference.pointer) + .boolean; + } + + static final _id_varyHeaders = _class.instanceMethodId( + r"varyHeaders", + r"(Lokhttp3/Response;)Lokhttp3/Headers;", + ); + + static final _varyHeaders = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.Headers varyHeaders(okhttp3.Response response) + /// The returned object must be released after use, by calling the [release] method. + Headers varyHeaders( + Response response, + ) { + return _varyHeaders(reference.pointer, _id_varyHeaders as jni.JMethodIDPtr, + response.reference.pointer) + .object(const $HeadersType()); + } + + static final _id_new0 = _class.constructorId( + r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory Cache_Companion( + jni.JObject defaultConstructorMarker, + ) { + return Cache_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $Cache_CompanionType extends jni.JObjType { + const $Cache_CompanionType(); + + @override + String get signature => r"Lokhttp3/Cache$Companion;"; + + @override + Cache_Companion fromReference(jni.JReference reference) => + Cache_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($Cache_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($Cache_CompanionType) && + other is $Cache_CompanionType; + } +} + +/// from: okhttp3.Cache$Entry$Companion +class Cache_Entry_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Cache_Entry_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Cache$Entry$Companion"); + + /// The type which includes information such as the signature of this class. + static const type = $Cache_Entry_CompanionType(); + static final _id_new0 = _class.constructorId( + r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory Cache_Entry_Companion( + jni.JObject defaultConstructorMarker, + ) { + return Cache_Entry_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $Cache_Entry_CompanionType + extends jni.JObjType { + const $Cache_Entry_CompanionType(); + + @override + String get signature => r"Lokhttp3/Cache$Entry$Companion;"; + + @override + Cache_Entry_Companion fromReference(jni.JReference reference) => + Cache_Entry_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($Cache_Entry_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($Cache_Entry_CompanionType) && + other is $Cache_Entry_CompanionType; + } +} + +/// from: okhttp3.Cache +class Cache extends jni.JObject { + @override + late final jni.JObjType $type = type; + + Cache.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"okhttp3/Cache"); + + /// The type which includes information such as the signature of this class. + static const type = $CacheType(); + static final _id_Companion = _class.staticFieldId( + r"Companion", + r"Lokhttp3/Cache$Companion;", + ); + + /// from: static public final okhttp3.Cache$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static Cache_Companion get Companion => + _id_Companion.get(_class, const $Cache_CompanionType()); + + static final _id_new0 = _class.constructorId( + r"(Ljava/io/File;JLokhttp3/internal/io/FileSystem;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Pointer + )>)>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, ffi.Pointer)>(); + + /// from: public void (java.io.File file, long j, okhttp3.internal.io.FileSystem fileSystem) + /// The returned object must be released after use, by calling the [release] method. + factory Cache( + jni.JObject file, + int j, + jni.JObject fileSystem, + ) { + return Cache.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + file.reference.pointer, + j, + fileSystem.reference.pointer) + .reference); + } + + static final _id_isClosed = _class.instanceMethodId( + r"isClosed", + r"()Z", + ); + + static final _isClosed = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallBooleanMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final boolean isClosed() + bool isClosed() { + return _isClosed(reference.pointer, _id_isClosed as jni.JMethodIDPtr) + .boolean; + } + + static final _id_new1 = _class.constructorId( + r"(Ljava/io/File;J)V", + ); + + static final _new1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public void (java.io.File file, long j) + /// The returned object must be released after use, by calling the [release] method. + factory Cache.new1( + jni.JObject file, + int j, + ) { + return Cache.fromReference(_new1(_class.reference.pointer, + _id_new1 as jni.JMethodIDPtr, file.reference.pointer, j) + .reference); + } + + static final _id_initialize = _class.instanceMethodId( + r"initialize", + r"()V", + ); + + static final _initialize = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final void initialize() + void initialize() { + _initialize(reference.pointer, _id_initialize as jni.JMethodIDPtr).check(); + } + + static final _id_delete = _class.instanceMethodId( + r"delete", + r"()V", + ); + + static final _delete = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final void delete() + void delete() { + _delete(reference.pointer, _id_delete as jni.JMethodIDPtr).check(); + } + + static final _id_evictAll = _class.instanceMethodId( + r"evictAll", + r"()V", + ); + + static final _evictAll = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final void evictAll() + void evictAll() { + _evictAll(reference.pointer, _id_evictAll as jni.JMethodIDPtr).check(); + } + + static final _id_urls = _class.instanceMethodId( + r"urls", + r"()Ljava/util/Iterator;", + ); + + static final _urls = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.util.Iterator urls() + /// The returned object must be released after use, by calling the [release] method. + jni.JIterator urls() { + return _urls(reference.pointer, _id_urls as jni.JMethodIDPtr) + .object(const jni.JIteratorType(jni.JStringType())); + } + + static final _id_writeAbortCount = _class.instanceMethodId( + r"writeAbortCount", + r"()I", + ); + + static final _writeAbortCount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int writeAbortCount() + int writeAbortCount() { + return _writeAbortCount( + reference.pointer, _id_writeAbortCount as jni.JMethodIDPtr) + .integer; + } + + static final _id_writeSuccessCount = _class.instanceMethodId( + r"writeSuccessCount", + r"()I", + ); + + static final _writeSuccessCount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int writeSuccessCount() + int writeSuccessCount() { + return _writeSuccessCount( + reference.pointer, _id_writeSuccessCount as jni.JMethodIDPtr) + .integer; + } + + static final _id_size = _class.instanceMethodId( + r"size", + r"()J", + ); + + static final _size = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final long size() + int size() { + return _size(reference.pointer, _id_size as jni.JMethodIDPtr).long; + } + + static final _id_maxSize = _class.instanceMethodId( + r"maxSize", + r"()J", + ); + + static final _maxSize = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallLongMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final long maxSize() + int maxSize() { + return _maxSize(reference.pointer, _id_maxSize as jni.JMethodIDPtr).long; + } + + static final _id_flush = _class.instanceMethodId( + r"flush", + r"()V", + ); + + static final _flush = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void flush() + void flush() { + _flush(reference.pointer, _id_flush as jni.JMethodIDPtr).check(); + } + + static final _id_close = _class.instanceMethodId( + r"close", + r"()V", + ); + + static final _close = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void close() + void close() { + _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); + } + + static final _id_directory = _class.instanceMethodId( + r"directory", + r"()Ljava/io/File;", + ); + + static final _directory = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final java.io.File directory() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject directory() { + return _directory(reference.pointer, _id_directory as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_networkCount = _class.instanceMethodId( + r"networkCount", + r"()I", + ); + + static final _networkCount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int networkCount() + int networkCount() { + return _networkCount( + reference.pointer, _id_networkCount as jni.JMethodIDPtr) + .integer; + } + + static final _id_hitCount = _class.instanceMethodId( + r"hitCount", + r"()I", + ); + + static final _hitCount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int hitCount() + int hitCount() { + return _hitCount(reference.pointer, _id_hitCount as jni.JMethodIDPtr) + .integer; + } + + static final _id_requestCount = _class.instanceMethodId( + r"requestCount", + r"()I", + ); + + static final _requestCount = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallIntMethod") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int requestCount() + int requestCount() { + return _requestCount( + reference.pointer, _id_requestCount as jni.JMethodIDPtr) + .integer; + } + + static final _id_key = _class.staticMethodId( + r"key", + r"(Lokhttp3/HttpUrl;)Ljava/lang/String;", + ); + + static final _key = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallStaticObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final java.lang.String key(okhttp3.HttpUrl httpUrl) + /// The returned object must be released after use, by calling the [release] method. + static jni.JString key( + jni.JObject httpUrl, + ) { + return _key(_class.reference.pointer, _id_key as jni.JMethodIDPtr, + httpUrl.reference.pointer) + .object(const jni.JStringType()); + } +} + +final class $CacheType extends jni.JObjType { + const $CacheType(); + + @override + String get signature => r"Lokhttp3/Cache;"; + + @override + Cache fromReference(jni.JReference reference) => + Cache.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($CacheType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($CacheType) && other is $CacheType; + } +} diff --git a/pkgs/ok_http/lib/src/ok_http_client.dart b/pkgs/ok_http/lib/src/ok_http_client.dart index a26f4b518a..c2d19b90b7 100644 --- a/pkgs/ok_http/lib/src/ok_http_client.dart +++ b/pkgs/ok_http/lib/src/ok_http_client.dart @@ -44,13 +44,47 @@ import 'jni/bindings.dart' as bindings; /// ``` class OkHttpClient extends BaseClient { late bindings.OkHttpClient _client; + bool _isClosed = false; OkHttpClient() { _client = bindings.OkHttpClient.new1(); } + @override + void close() { + if (!_isClosed) { + // Refer to OkHttp documentation for the shutdown procedure: + // https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/index.html#:~:text=Shutdown + + // Bindings for `java.util.concurrent.ExecutorService` are erroneous. + // https://github.com/dart-lang/native/issues/588 + // So, use the JClass API to call the `shutdown` method by its signature. + _client + .dispatcher() + .executorService() + .jClass + .instanceMethodId('shutdown', '()V'); + + // Remove all idle connections from the resource pool. + _client.connectionPool().evictAll(); + + // Close the cache and release the JNI reference to the client. + var cache = _client.cache(); + if (!cache.isNull) { + cache.close(); + } + _client.release(); + } + _isClosed = true; + } + @override Future send(BaseRequest request) async { + if (_isClosed) { + throw ClientException( + 'HTTP request failed. Client is already closed.', request.url); + } + var requestUrl = request.url.toString(); var requestHeaders = request.headers; var requestMethod = request.method; From 5673c2eb8e7c3d3e9d180ef05c473c073e9ed4b2 Mon Sep 17 00:00:00 2001 From: Hossein Yousefi Date: Wed, 5 Jun 2024 21:48:57 +0200 Subject: [PATCH 381/448] [cronet_http] Upgrade jnigen to 0.9.2 to close #1213 (#1225) --- pkgs/cronet_http/CHANGELOG.md | 1 + .../cronet_http/lib/src/jni/jni_bindings.dart | 42 +++++++++---------- pkgs/cronet_http/pubspec.yaml | 2 +- 3 files changed, 23 insertions(+), 22 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 25d0df3e37..20c7625a71 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,6 +1,7 @@ ## 1.3.1-wip * Add relevant rules with the ProGuard to avoid runtime exceptions. +* Upgrade `package:jnigen` to 0.9.2 to fix a bug for 32-bit architectures. ## 1.3.0 diff --git a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart index 4db04a9c6a..8dcf00b01e 100644 --- a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart +++ b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart @@ -749,7 +749,7 @@ class URL extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int64, + ffi.Int32, ffi.Pointer )>)>>("globalEnv_NewObject") .asFunction< @@ -831,7 +831,7 @@ class URL extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int64, + ffi.Int32, ffi.Pointer, ffi.Pointer )>)>>("globalEnv_NewObject") @@ -1544,7 +1544,7 @@ class Executors extends jni.JObject { static final _newFixedThreadPool = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, - jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64,)>)>>( + jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int32,)>)>>( "globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function( @@ -1568,7 +1568,7 @@ class Executors extends jni.JObject { static final _newWorkStealingPool = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, - jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64,)>)>>( + jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int32,)>)>>( "globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function( @@ -1619,7 +1619,7 @@ class Executors extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + ffi.VarArgs<(ffi.Int32, ffi.Pointer)>)>>( "globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, @@ -1808,7 +1808,7 @@ class Executors extends jni.JObject { static final _newScheduledThreadPool = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, - jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64,)>)>>( + jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int32,)>)>>( "globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function( @@ -1834,7 +1834,7 @@ class Executors extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + ffi.VarArgs<(ffi.Int32, ffi.Pointer)>)>>( "globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, @@ -2457,7 +2457,7 @@ class CronetEngine_Builder extends jni.JObject { static final _enableQuic = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2480,7 +2480,7 @@ class CronetEngine_Builder extends jni.JObject { static final _enableHttp2 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2503,7 +2503,7 @@ class CronetEngine_Builder extends jni.JObject { static final _enableSdch = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2526,7 +2526,7 @@ class CronetEngine_Builder extends jni.JObject { static final _enableBrotli = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2549,7 +2549,7 @@ class CronetEngine_Builder extends jni.JObject { static final _enableHttpCache = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, - jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Int64)>)>>( + jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int32, ffi.Int64)>)>>( "globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( @@ -2579,8 +2579,8 @@ class CronetEngine_Builder extends jni.JObject { ffi.VarArgs< ( ffi.Pointer, - ffi.Int64, - ffi.Int64 + ffi.Int32, + ffi.Int32 )>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, @@ -2612,7 +2612,7 @@ class CronetEngine_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int64, + ffi.Uint8, ffi.Pointer )>)>>("globalEnv_CallObjectMethod") .asFunction< @@ -2654,7 +2654,7 @@ class CronetEngine_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2818,7 +2818,7 @@ class CronetEngine extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + ffi.VarArgs<(ffi.Pointer, ffi.Uint8)>)>>( "globalEnv_CallVoidMethod") .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, @@ -3179,8 +3179,8 @@ class UploadDataProviders extends jni.JObject { ffi.VarArgs< ( ffi.Pointer, - ffi.Int64, - ffi.Int64 + ffi.Int32, + ffi.Int32 )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, @@ -3393,7 +3393,7 @@ class UrlRequest_Builder extends jni.JObject { static final _setPriority = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -3927,7 +3927,7 @@ class UrlRequest_StatusListener extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallVoidMethod") .asFunction< jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 8d7c5d2f61..d82e69a04b 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: dev_dependencies: dart_flutter_team_lints: ^2.0.0 - jnigen: ^0.9.1 + jnigen: ^0.9.2 xml: ^6.1.0 yaml_edit: ^2.0.3 From 1978701f8728d546566cae30a0bc7a6f09c11b7b Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 5 Jun 2024 13:46:04 -0700 Subject: [PATCH 382/448] Prepare to release cronet_http 1.3.1 (#1228) --- pkgs/cronet_http/CHANGELOG.md | 2 +- pkgs/cronet_http/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 20c7625a71..a5e1c3fce1 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.3.1-wip +## 1.3.1 * Add relevant rules with the ProGuard to avoid runtime exceptions. * Upgrade `package:jnigen` to 0.9.2 to fix a bug for 32-bit architectures. diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index d82e69a04b..49fefbaf23 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 1.3.1-wip +version: 1.3.1 description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http From 25077201caf7eaff3643b99b71d3a5f56c425271 Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Sat, 8 Jun 2024 02:13:59 +0530 Subject: [PATCH 383/448] fix inconsistent test server behavior (#1227) --- .../lib/src/request_cookies_server.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/http_client_conformance_tests/lib/src/request_cookies_server.dart b/pkgs/http_client_conformance_tests/lib/src/request_cookies_server.dart index 44653a7cd5..512fb5b1b4 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_cookies_server.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_cookies_server.dart @@ -25,7 +25,7 @@ void hybridMain(StreamChannel channel) async { final request = utf8.decoder.bind(socket).transform(const LineSplitter()); final cookies = []; - request.listen((line) { + await for (final line in request) { if (line.toLowerCase().startsWith('cookie:')) { cookies.add(line); } @@ -33,8 +33,9 @@ void hybridMain(StreamChannel channel) async { if (line.isEmpty) { // A blank line indicates the end of the headers. channel.sink.add(cookies); + break; } - }); + } socket.writeAll( [ From 32e8f22f99b27bb290e1d9d0a88646c6a9ffdc7f Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Tue, 11 Jun 2024 02:18:37 +0530 Subject: [PATCH 384/448] [ok_http]: Use the Android SDK to generate JNI bindings. (#1229) --- pkgs/ok_http/.gitignore | 3 --- pkgs/ok_http/android/build.gradle | 3 +++ pkgs/ok_http/example/android/app/build.gradle | 7 +++++++ pkgs/ok_http/jnigen.yaml | 12 +++++------- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/ok_http/.gitignore b/pkgs/ok_http/.gitignore index 2e58cc573d..ac5aa9893e 100644 --- a/pkgs/ok_http/.gitignore +++ b/pkgs/ok_http/.gitignore @@ -27,6 +27,3 @@ migrate_working_dir/ **/doc/api/ .dart_tool/ build/ - -# Ignore the JAR files required to generate JNI Bindings -jar/ diff --git a/pkgs/ok_http/android/build.gradle b/pkgs/ok_http/android/build.gradle index c21dab37b0..ea25148737 100644 --- a/pkgs/ok_http/android/build.gradle +++ b/pkgs/ok_http/android/build.gradle @@ -4,6 +4,8 @@ group = "com.example.ok_http" version = "1.0" buildscript { + // Required to support `okhttp:4.12.0`. + ext.kotlin_version = '1.9.23' repositories { google() mavenCentral() @@ -12,6 +14,7 @@ buildscript { dependencies { // The Android Gradle Plugin knows how to build native code with the NDK. classpath("com.android.tools.build:gradle:7.3.0") + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/pkgs/ok_http/example/android/app/build.gradle b/pkgs/ok_http/example/android/app/build.gradle index 77ac8ef7fd..b5f9467b2f 100644 --- a/pkgs/ok_http/example/android/app/build.gradle +++ b/pkgs/ok_http/example/android/app/build.gradle @@ -56,3 +56,10 @@ android { flutter { source = "../.." } + +dependencies { + // "com.squareup.okhttp3:okhttp:4.12.0" is only present so that + // `jnigen` will work. Applications should not include this line. + // The version should be synced with `pkgs/ok_http/android/build.gradle`. + implementation('com.squareup.okhttp3:okhttp:4.12.0') +} diff --git a/pkgs/ok_http/jnigen.yaml b/pkgs/ok_http/jnigen.yaml index 1d0d60d457..fbb5bdf776 100644 --- a/pkgs/ok_http/jnigen.yaml +++ b/pkgs/ok_http/jnigen.yaml @@ -1,7 +1,4 @@ -# To regenerate the JNI Bindings, download the OkHttp 4.12.0 JAR file from the Maven Repository -# and place them in 'jar/'. -# https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp/4.12.0 -# Then run the command: dart run jnigen --config jnigen.yaml +# Regenerate the JNI Bindings using: dart run jnigen --config jnigen.yaml summarizer: backend: asm @@ -11,6 +8,10 @@ output: path: "lib/src/jni/bindings.dart" structure: single_file +android_sdk_config: + add_gradle_deps: true + android_example: "example/" + enable_experiment: - "interface_implementation" @@ -81,6 +82,3 @@ exclude: - "okhttp3.Headers#-deprecated_size" - "okhttp3.Dispatcher#-deprecated_executorService" - "okhttp3.Cache#-deprecated_directory" - -class_path: - - "jar/okhttp-4.12.0.jar" From 05205f0fdc119464802c5604e87565ed8f33eb35 Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Wed, 12 Jun 2024 01:55:23 +0530 Subject: [PATCH 385/448] [pkgs/ok_http] Add functionality to accept and configure redirects. (#1230) --- pkgs/ok_http/android/build.gradle | 9 + .../example/ok_http/RedirectInterceptor.kt | 52 +++++ .../example/integration_test/client_test.dart | 2 + pkgs/ok_http/jnigen.yaml | 1 + pkgs/ok_http/lib/src/jni/bindings.dart | 181 ++++++++++++++++++ pkgs/ok_http/lib/src/ok_http_client.dart | 23 ++- 6 files changed, 267 insertions(+), 1 deletion(-) create mode 100644 pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/RedirectInterceptor.kt diff --git a/pkgs/ok_http/android/build.gradle b/pkgs/ok_http/android/build.gradle index ea25148737..c7de868f22 100644 --- a/pkgs/ok_http/android/build.gradle +++ b/pkgs/ok_http/android/build.gradle @@ -26,11 +26,20 @@ rootProject.allprojects { } apply plugin: "com.android.library" +apply plugin: 'kotlin-android' android { if (project.android.hasProperty("namespace")) { namespace = "com.example.ok_http" } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } // Bumping the plugin compileSdk version requires all clients of this plugin // to bump the version in their app. diff --git a/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/RedirectInterceptor.kt b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/RedirectInterceptor.kt new file mode 100644 index 0000000000..9f59e2fc3a --- /dev/null +++ b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/RedirectInterceptor.kt @@ -0,0 +1,52 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// To cause a request failure [with a suitable message] due to too many redirects, +// we need to throw an IOException. This cannot be done using Dart JNI bindings, +// which lead to a deadlock and eventually a `java.net.SocketTimeoutException`. +// https://github.com/dart-lang/native/issues/561 + +package com.example.ok_http + +import okhttp3.Interceptor +import okhttp3.OkHttpClient +import java.io.IOException + +class RedirectInterceptor { + companion object { + + /** + * Adds a redirect interceptor to the OkHttpClient.Builder + * + * @param clientBuilder The `OkHttpClient.Builder` to add the interceptor to + * @param maxRedirects The maximum number of redirects to follow + * @param followRedirects Whether to follow redirects + * + * @return OkHttpClient.Builder + */ + fun addRedirectInterceptor( + clientBuilder: OkHttpClient.Builder, maxRedirects: Int, followRedirects: Boolean + ): OkHttpClient.Builder { + return clientBuilder.addInterceptor(Interceptor { chain -> + var req = chain.request() + var response = chain.proceed(req) + var redirectCount = 0 + + while (response.isRedirect && followRedirects) { + if (redirectCount >= maxRedirects) { + throw IOException("Redirect limit exceeded") + } + + val location = response.header("location") ?: break + req = req.newBuilder().url(location).build() + response.close() + response = chain.proceed(req) + redirectCount++ + } + + response + }) + } + } +} diff --git a/pkgs/ok_http/example/integration_test/client_test.dart b/pkgs/ok_http/example/integration_test/client_test.dart index b888cf6bf4..83998f4f38 100644 --- a/pkgs/ok_http/example/integration_test/client_test.dart +++ b/pkgs/ok_http/example/integration_test/client_test.dart @@ -22,9 +22,11 @@ Future testConformance() async { testResponseHeaders(OkHttpClient(), supportsFoldedHeaders: false); testResponseStatusLine(OkHttpClient()); testCompressedResponseBody(OkHttpClient()); + testRedirect(OkHttpClient()); testServerErrors(OkHttpClient()); testClose(OkHttpClient.new); testIsolate(OkHttpClient.new); + testRequestCookies(OkHttpClient(), canSendCookieHeaders: true); testResponseCookies(OkHttpClient(), canReceiveSetCookieHeaders: true); }); } diff --git a/pkgs/ok_http/jnigen.yaml b/pkgs/ok_http/jnigen.yaml index fbb5bdf776..d0ebd3c547 100644 --- a/pkgs/ok_http/jnigen.yaml +++ b/pkgs/ok_http/jnigen.yaml @@ -27,6 +27,7 @@ classes: - "okhttp3.ConnectionPool" - "okhttp3.Dispatcher" - "okhttp3.Cache" + - "com.example.ok_http.RedirectInterceptor" # Exclude the deprecated methods listed below # They cause syntax errors during the `dart format` step of JNIGen. diff --git a/pkgs/ok_http/lib/src/jni/bindings.dart b/pkgs/ok_http/lib/src/jni/bindings.dart index 53945e6581..71116e07e7 100644 --- a/pkgs/ok_http/lib/src/jni/bindings.dart +++ b/pkgs/ok_http/lib/src/jni/bindings.dart @@ -9437,3 +9437,184 @@ final class $CacheType extends jni.JObjType { return other.runtimeType == ($CacheType) && other is $CacheType; } } + +/// from: com.example.ok_http.RedirectInterceptor$Companion +class RedirectInterceptor_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + RedirectInterceptor_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r"com/example/ok_http/RedirectInterceptor$Companion"); + + /// The type which includes information such as the signature of this class. + static const type = $RedirectInterceptor_CompanionType(); + static final _id_addRedirectInterceptor = _class.instanceMethodId( + r"addRedirectInterceptor", + r"(Lokhttp3/OkHttpClient$Builder;IZ)Lokhttp3/OkHttpClient$Builder;", + ); + + static final _addRedirectInterceptor = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Int64, + ffi.Int64 + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); + + /// from: public final okhttp3.OkHttpClient$Builder addRedirectInterceptor(okhttp3.OkHttpClient$Builder builder, int i, boolean z) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder addRedirectInterceptor( + OkHttpClient_Builder builder, + int i, + bool z, + ) { + return _addRedirectInterceptor( + reference.pointer, + _id_addRedirectInterceptor as jni.JMethodIDPtr, + builder.reference.pointer, + i, + z ? 1 : 0) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_new0 = _class.constructorId( + r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_NewObject") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory RedirectInterceptor_Companion( + jni.JObject defaultConstructorMarker, + ) { + return RedirectInterceptor_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $RedirectInterceptor_CompanionType + extends jni.JObjType { + const $RedirectInterceptor_CompanionType(); + + @override + String get signature => + r"Lcom/example/ok_http/RedirectInterceptor$Companion;"; + + @override + RedirectInterceptor_Companion fromReference(jni.JReference reference) => + RedirectInterceptor_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($RedirectInterceptor_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($RedirectInterceptor_CompanionType) && + other is $RedirectInterceptor_CompanionType; + } +} + +/// from: com.example.ok_http.RedirectInterceptor +class RedirectInterceptor extends jni.JObject { + @override + late final jni.JObjType $type = type; + + RedirectInterceptor.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r"com/example/ok_http/RedirectInterceptor"); + + /// The type which includes information such as the signature of this class. + static const type = $RedirectInterceptorType(); + static final _id_Companion = _class.staticFieldId( + r"Companion", + r"Lcom/example/ok_http/RedirectInterceptor$Companion;", + ); + + /// from: static public final com.example.ok_http.RedirectInterceptor$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static RedirectInterceptor_Companion get Companion => + _id_Companion.get(_class, const $RedirectInterceptor_CompanionType()); + + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory RedirectInterceptor() { + return RedirectInterceptor.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } +} + +final class $RedirectInterceptorType extends jni.JObjType { + const $RedirectInterceptorType(); + + @override + String get signature => r"Lcom/example/ok_http/RedirectInterceptor;"; + + @override + RedirectInterceptor fromReference(jni.JReference reference) => + RedirectInterceptor.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($RedirectInterceptorType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($RedirectInterceptorType) && + other is $RedirectInterceptorType; + } +} diff --git a/pkgs/ok_http/lib/src/ok_http_client.dart b/pkgs/ok_http/lib/src/ok_http_client.dart index c2d19b90b7..3479a236e5 100644 --- a/pkgs/ok_http/lib/src/ok_http_client.dart +++ b/pkgs/ok_http/lib/src/ok_http_client.dart @@ -89,6 +89,8 @@ class OkHttpClient extends BaseClient { var requestHeaders = request.headers; var requestMethod = request.method; var requestBody = await request.finalize().toBytes(); + var maxRedirects = request.maxRedirects; + var followRedirects = request.followRedirects; final responseCompleter = Completer(); @@ -112,9 +114,22 @@ class OkHttpClient extends BaseClient { okReqBody, ); + // To configure the client per-request, we create a new client with the + // builder associated with `_client`. + // They share the same connection pool and dispatcher. + // https://square.github.io/okhttp/recipes/#per-call-configuration-kt-java + // + // `followRedirects` is set to `false` to handle redirects manually. + // (Since OkHttp sets a hard limit of 20 redirects.) + // https://github.com/square/okhttp/blob/54238b4c713080c3fd32fb1a070fb5d6814c9a09/okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt#L350 + final reqConfiguredClient = bindings.RedirectInterceptor.Companion + .addRedirectInterceptor(_client.newBuilder().followRedirects(false), + maxRedirects, followRedirects) + .build(); + // `enqueue()` schedules the request to be executed in the future. // https://square.github.io/okhttp/5.x/okhttp/okhttp3/-call/enqueue.html - _client + reqConfiguredClient .newCall(reqBuilder.build()) .enqueue(bindings.Callback.implement(bindings.$CallbackImpl( onResponse: (bindings.Call call, bindings.Response response) { @@ -159,9 +174,15 @@ class OkHttpClient extends BaseClient { headers: responseHeaders, request: request, contentLength: contentLength, + isRedirect: response.isRedirect(), )); }, onFailure: (bindings.Call call, JObject ioException) { + if (ioException.toString().contains('Redirect limit exceeded')) { + responseCompleter.completeError( + ClientException('Redirect limit exceeded', request.url)); + return; + } responseCompleter.completeError( ClientException(ioException.toString(), request.url)); }, From 550b665e98a57eb80e0532276cc384de4f0369e8 Mon Sep 17 00:00:00 2001 From: David Wimmer Date: Tue, 11 Jun 2024 23:19:38 +0200 Subject: [PATCH 386/448] Update README.md (#1231) - typo in README.m #L117 --- pkgs/http/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/http/README.md b/pkgs/http/README.md index 743805bdf8..0fe9014619 100644 --- a/pkgs/http/README.md +++ b/pkgs/http/README.md @@ -114,7 +114,7 @@ the [`RetryClient()`][new RetryClient] constructor. ## Choosing an implementation -There are multiple implementations of the `package:http` [`Client`][client] interface. By default, `package:http` uses [`BrowserClient`][browserclient] on the web and [`IOClient`][ioclient] on all other platforms. You an choose a different [`Client`][client] implementation based on the needs of your application. +There are multiple implementations of the `package:http` [`Client`][client] interface. By default, `package:http` uses [`BrowserClient`][browserclient] on the web and [`IOClient`][ioclient] on all other platforms. You can choose a different [`Client`][client] implementation based on the needs of your application. You can change implementations without changing your application code, except for a few lines of [configuration](#2-configure-the-http-client). From 66792eef3ed49e350348a60579729f59649c5c97 Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Fri, 14 Jun 2024 05:25:21 +0530 Subject: [PATCH 387/448] pkgs/ok_http: Stream response bodies. (#1233) --- .../example/ok_http/AsyncInputStreamReader.kt | 63 ++++ .../example/integration_test/client_test.dart | 21 +- pkgs/ok_http/jnigen.yaml | 2 + pkgs/ok_http/lib/src/jni/bindings.dart | 349 ++++++++++++++++++ pkgs/ok_http/lib/src/ok_http_client.dart | 38 +- 5 files changed, 447 insertions(+), 26 deletions(-) create mode 100644 pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/AsyncInputStreamReader.kt diff --git a/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/AsyncInputStreamReader.kt b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/AsyncInputStreamReader.kt new file mode 100644 index 0000000000..b06b767a9d --- /dev/null +++ b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/AsyncInputStreamReader.kt @@ -0,0 +1,63 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +package com.example.ok_http + +import java.io.IOException +import java.io.InputStream +import java.util.concurrent.ExecutorService +import java.util.concurrent.Executors +import java.util.concurrent.Future + + +/** + * Callback interface utilized by the [AsyncInputStreamReader]. + */ +interface DataCallback { + fun onDataRead(data: ByteArray) + fun onFinished() + fun onError(e: IOException) +} + +/** + * Provides functions to read data from an InputStream asynchronously. + */ +class AsyncInputStreamReader { + private val executorService: ExecutorService = Executors.newSingleThreadExecutor() + + /** + * Reads data from an InputStream asynchronously using an executor service. + * + * @param inputStream The InputStream to read from + * @param callback The DataCallback to call when data is read, finished, or an error occurs + * + * @return Future<*> + */ + fun readAsync(inputStream: InputStream, callback: DataCallback): Future<*> { + return executorService.submit { + try { + val buffer = ByteArray(4096) + var bytesRead: Int + while (inputStream.read(buffer).also { bytesRead = it } != -1) { + val byteArray = buffer.copyOfRange(0, bytesRead) + callback.onDataRead(byteArray) + } + + } catch (e: IOException) { + callback.onError(e) + } finally { + try { + inputStream.close() + } catch (e: IOException) { + callback.onError(e) + } + callback.onFinished() + } + } + } + + fun shutdown() { + executorService.shutdown() + } +} diff --git a/pkgs/ok_http/example/integration_test/client_test.dart b/pkgs/ok_http/example/integration_test/client_test.dart index 83998f4f38..b167a8f329 100644 --- a/pkgs/ok_http/example/integration_test/client_test.dart +++ b/pkgs/ok_http/example/integration_test/client_test.dart @@ -15,18 +15,13 @@ void main() async { Future testConformance() async { group('ok_http client', () { - testRequestBody(OkHttpClient()); - testResponseBody(OkHttpClient(), canStreamResponseBody: false); - testRequestHeaders(OkHttpClient()); - testRequestMethods(OkHttpClient(), preservesMethodCase: true); - testResponseHeaders(OkHttpClient(), supportsFoldedHeaders: false); - testResponseStatusLine(OkHttpClient()); - testCompressedResponseBody(OkHttpClient()); - testRedirect(OkHttpClient()); - testServerErrors(OkHttpClient()); - testClose(OkHttpClient.new); - testIsolate(OkHttpClient.new); - testRequestCookies(OkHttpClient(), canSendCookieHeaders: true); - testResponseCookies(OkHttpClient(), canReceiveSetCookieHeaders: true); + testAll( + OkHttpClient.new, + canStreamRequestBody: false, + preservesMethodCase: true, + supportsFoldedHeaders: false, + canSendCookieHeaders: true, + canReceiveSetCookieHeaders: true, + ); }); } diff --git a/pkgs/ok_http/jnigen.yaml b/pkgs/ok_http/jnigen.yaml index d0ebd3c547..f4b43951ad 100644 --- a/pkgs/ok_http/jnigen.yaml +++ b/pkgs/ok_http/jnigen.yaml @@ -28,6 +28,8 @@ classes: - "okhttp3.Dispatcher" - "okhttp3.Cache" - "com.example.ok_http.RedirectInterceptor" + - "com.example.ok_http.AsyncInputStreamReader" + - "com.example.ok_http.DataCallback" # Exclude the deprecated methods listed below # They cause syntax errors during the `dart format` step of JNIGen. diff --git a/pkgs/ok_http/lib/src/jni/bindings.dart b/pkgs/ok_http/lib/src/jni/bindings.dart index 71116e07e7..8b76334e8c 100644 --- a/pkgs/ok_http/lib/src/jni/bindings.dart +++ b/pkgs/ok_http/lib/src/jni/bindings.dart @@ -9618,3 +9618,352 @@ final class $RedirectInterceptorType extends jni.JObjType { other is $RedirectInterceptorType; } } + +/// from: com.example.ok_http.AsyncInputStreamReader +class AsyncInputStreamReader extends jni.JObject { + @override + late final jni.JObjType $type = type; + + AsyncInputStreamReader.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r"com/example/ok_http/AsyncInputStreamReader"); + + /// The type which includes information such as the signature of this class. + static const type = $AsyncInputStreamReaderType(); + static final _id_new0 = _class.constructorId( + r"()V", + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_NewObject") + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory AsyncInputStreamReader() { + return AsyncInputStreamReader.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } + + static final _id_readAsync = _class.instanceMethodId( + r"readAsync", + r"(Ljava/io/InputStream;Lcom/example/ok_http/DataCallback;)Ljava/util/concurrent/Future;", + ); + + static final _readAsync = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallObjectMethod") + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final java.util.concurrent.Future readAsync(java.io.InputStream inputStream, com.example.ok_http.DataCallback dataCallback) + /// The returned object must be released after use, by calling the [release] method. + jni.JObject readAsync( + jni.JObject inputStream, + DataCallback dataCallback, + ) { + return _readAsync(reference.pointer, _id_readAsync as jni.JMethodIDPtr, + inputStream.reference.pointer, dataCallback.reference.pointer) + .object(const jni.JObjectType()); + } + + static final _id_shutdown = _class.instanceMethodId( + r"shutdown", + r"()V", + ); + + static final _shutdown = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final void shutdown() + void shutdown() { + _shutdown(reference.pointer, _id_shutdown as jni.JMethodIDPtr).check(); + } +} + +final class $AsyncInputStreamReaderType + extends jni.JObjType { + const $AsyncInputStreamReaderType(); + + @override + String get signature => r"Lcom/example/ok_http/AsyncInputStreamReader;"; + + @override + AsyncInputStreamReader fromReference(jni.JReference reference) => + AsyncInputStreamReader.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($AsyncInputStreamReaderType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($AsyncInputStreamReaderType) && + other is $AsyncInputStreamReaderType; + } +} + +/// from: com.example.ok_http.DataCallback +class DataCallback extends jni.JObject { + @override + late final jni.JObjType $type = type; + + DataCallback.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r"com/example/ok_http/DataCallback"); + + /// The type which includes information such as the signature of this class. + static const type = $DataCallbackType(); + static final _id_onDataRead = _class.instanceMethodId( + r"onDataRead", + r"([B)V", + ); + + static final _onDataRead = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public abstract void onDataRead(byte[] bs) + void onDataRead( + jni.JArray bs, + ) { + _onDataRead(reference.pointer, _id_onDataRead as jni.JMethodIDPtr, + bs.reference.pointer) + .check(); + } + + static final _id_onFinished = _class.instanceMethodId( + r"onFinished", + r"()V", + ); + + static final _onFinished = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract void onFinished() + void onFinished() { + _onFinished(reference.pointer, _id_onFinished as jni.JMethodIDPtr).check(); + } + + static final _id_onError = _class.instanceMethodId( + r"onError", + r"(Ljava/io/IOException;)V", + ); + + static final _onError = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + "globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public abstract void onError(java.io.IOException iOException) + void onError( + jni.JObject iOException, + ) { + _onError(reference.pointer, _id_onError as jni.JMethodIDPtr, + iOException.reference.pointer) + .check(); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r"onDataRead([B)V") { + _$impls[$p]!.onDataRead( + $a[0].castTo(const jni.JArrayType(jni.jbyteType()), + releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == r"onFinished()V") { + _$impls[$p]!.onFinished(); + return jni.nullptr; + } + if ($d == r"onError(Ljava/io/IOException;)V") { + _$impls[$p]!.onError( + $a[0].castTo(const jni.JObjectType(), releaseOriginal: true), + ); + return jni.nullptr; + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e.toString()); + } + return jni.nullptr; + } + + factory DataCallback.implement( + $DataCallbackImpl $impl, + ) { + final $p = ReceivePort(); + final $x = DataCallback.fromReference( + ProtectedJniExtensions.newPortProxy( + r"com.example.ok_http.DataCallback", + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $DataCallbackImpl { + factory $DataCallbackImpl({ + required void Function(jni.JArray bs) onDataRead, + required void Function() onFinished, + required void Function(jni.JObject iOException) onError, + }) = _$DataCallbackImpl; + + void onDataRead(jni.JArray bs); + void onFinished(); + void onError(jni.JObject iOException); +} + +class _$DataCallbackImpl implements $DataCallbackImpl { + _$DataCallbackImpl({ + required void Function(jni.JArray bs) onDataRead, + required void Function() onFinished, + required void Function(jni.JObject iOException) onError, + }) : _onDataRead = onDataRead, + _onFinished = onFinished, + _onError = onError; + + final void Function(jni.JArray bs) _onDataRead; + final void Function() _onFinished; + final void Function(jni.JObject iOException) _onError; + + void onDataRead(jni.JArray bs) { + return _onDataRead(bs); + } + + void onFinished() { + return _onFinished(); + } + + void onError(jni.JObject iOException) { + return _onError(iOException); + } +} + +final class $DataCallbackType extends jni.JObjType { + const $DataCallbackType(); + + @override + String get signature => r"Lcom/example/ok_http/DataCallback;"; + + @override + DataCallback fromReference(jni.JReference reference) => + DataCallback.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($DataCallbackType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($DataCallbackType) && + other is $DataCallbackType; + } +} diff --git a/pkgs/ok_http/lib/src/ok_http_client.dart b/pkgs/ok_http/lib/src/ok_http_client.dart index 3479a236e5..3ab3799d62 100644 --- a/pkgs/ok_http/lib/src/ok_http_client.dart +++ b/pkgs/ok_http/lib/src/ok_http_client.dart @@ -133,6 +133,9 @@ class OkHttpClient extends BaseClient { .newCall(reqBuilder.build()) .enqueue(bindings.Callback.implement(bindings.$CallbackImpl( onResponse: (bindings.Call call, bindings.Response response) { + var reader = bindings.AsyncInputStreamReader(); + var respBodyStreamController = StreamController>(); + var responseHeaders = {}; response.headers().toMultimap().forEach((key, value) { @@ -153,21 +156,30 @@ class OkHttpClient extends BaseClient { } } - // Exceptions while reading the response body such as - // `java.net.ProtocolException` & `java.net.SocketTimeoutException` - // crash the app if un-handled. - var responseBody = Uint8List.fromList([]); - try { - // Blocking call to read the response body. - responseBody = response.body().bytes().toUint8List(); - } catch (e) { - responseCompleter - .completeError(ClientException(e.toString(), request.url)); - return; - } + var responseBodyByteStream = response.body().byteStream(); + reader.readAsync( + responseBodyByteStream, + bindings.DataCallback.implement( + bindings.$DataCallbackImpl( + onDataRead: (JArray data) { + respBodyStreamController.sink.add(data.toUint8List()); + }, + onFinished: () async { + reader.shutdown(); + await respBodyStreamController.sink.close(); + }, + onError: (iOException) async { + respBodyStreamController.sink.addError( + ClientException(iOException.toString(), request.url)); + + reader.shutdown(); + await respBodyStreamController.sink.close(); + }, + ), + )); responseCompleter.complete(StreamedResponse( - Stream.value(responseBody), + respBodyStreamController.stream, response.code(), reasonPhrase: response.message().toDartString(releaseOriginal: true), From a9d50cc99d362f642985e8f34caf9eade718b335 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 24 Jun 2024 08:35:46 -0700 Subject: [PATCH 388/448] Add a note saying that we only create a single `Client`. (#1234) --- pkgs/flutter_http_example/lib/main.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/flutter_http_example/lib/main.dart b/pkgs/flutter_http_example/lib/main.dart index 548c3dee0a..afe8363029 100644 --- a/pkgs/flutter_http_example/lib/main.dart +++ b/pkgs/flutter_http_example/lib/main.dart @@ -15,6 +15,14 @@ import 'http_client_factory.dart' void main() { runApp(Provider( + // `Provider` calls its `create` argument once when a `Client` is + // first requested (through `BuildContext.read()`) and uses that + // same instance for all future requests. + // + // Reusing the same `Client` may: + // - reduce memory usage + // - allow caching of fetched URLs + // - allow connections to be persisted create: (_) => http_factory.httpClient(), child: const BookSearchApp(), dispose: (_, client) => client.close())); From 22b65a64d07cb1ee2c5c98fe0dd93ac786e9c272 Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Mon, 24 Jun 2024 23:15:06 +0530 Subject: [PATCH 389/448] pkgs/ok_http: DevTools Networking Support. (#1242) --- pkgs/ok_http/CHANGELOG.md | 3 +- .../example/ok_http/RedirectInterceptor.kt | 19 +- .../integration_test/client_profile_test.dart | 288 ++++++++++++++++++ .../example/integration_test/client_test.dart | 44 ++- pkgs/ok_http/example/pubspec.yaml | 1 + pkgs/ok_http/jnigen.yaml | 1 + pkgs/ok_http/lib/src/jni/bindings.dart | 231 ++++++++++++-- pkgs/ok_http/lib/src/ok_http_client.dart | 117 +++++-- pkgs/ok_http/pubspec.yaml | 3 +- 9 files changed, 649 insertions(+), 58 deletions(-) create mode 100644 pkgs/ok_http/example/integration_test/client_profile_test.dart diff --git a/pkgs/ok_http/CHANGELOG.md b/pkgs/ok_http/CHANGELOG.md index f1c3a8b5d6..433fc4ec44 100644 --- a/pkgs/ok_http/CHANGELOG.md +++ b/pkgs/ok_http/CHANGELOG.md @@ -1,4 +1,5 @@ ## 0.1.0-wip - Implementation of [`BaseClient`](https://pub.dev/documentation/http/latest/http/BaseClient-class.html) and `send()` method using [`enqueue()` API](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-call/enqueue.html) -- `ok_http` can now send asynchronous requests +- `ok_http` can now send asynchronous requests and stream response bodies. +- Add [DevTools Network View](https://docs.flutter.dev/tools/devtools/network) support. diff --git a/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/RedirectInterceptor.kt b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/RedirectInterceptor.kt index 9f59e2fc3a..1aac8ea3ae 100644 --- a/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/RedirectInterceptor.kt +++ b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/RedirectInterceptor.kt @@ -11,8 +11,19 @@ package com.example.ok_http import okhttp3.Interceptor import okhttp3.OkHttpClient +import okhttp3.Response import java.io.IOException +/** + * Callback interface utilized by the [RedirectInterceptor]. + * + * Allows Dart code to operate upon the intermediate redirect responses. + */ +interface RedirectReceivedCallback { + fun onRedirectReceived(response: Response, location: String) +} + + class RedirectInterceptor { companion object { @@ -26,7 +37,10 @@ class RedirectInterceptor { * @return OkHttpClient.Builder */ fun addRedirectInterceptor( - clientBuilder: OkHttpClient.Builder, maxRedirects: Int, followRedirects: Boolean + clientBuilder: OkHttpClient.Builder, + maxRedirects: Int, + followRedirects: Boolean, + redirectCallback: RedirectReceivedCallback, ): OkHttpClient.Builder { return clientBuilder.addInterceptor(Interceptor { chain -> var req = chain.request() @@ -39,6 +53,9 @@ class RedirectInterceptor { } val location = response.header("location") ?: break + + redirectCallback.onRedirectReceived(response, location) + req = req.newBuilder().url(location).build() response.close() response = chain.proceed(req) diff --git a/pkgs/ok_http/example/integration_test/client_profile_test.dart b/pkgs/ok_http/example/integration_test/client_profile_test.dart new file mode 100644 index 0000000000..44975dd4b7 --- /dev/null +++ b/pkgs/ok_http/example/integration_test/client_profile_test.dart @@ -0,0 +1,288 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:flutter_test/flutter_test.dart'; +import 'package:http/http.dart'; +import 'package:http_profile/http_profile.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:ok_http/ok_http.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + group('profile', () { + final profilingEnabled = HttpClientRequestProfile.profilingEnabled; + + setUpAll(() { + HttpClientRequestProfile.profilingEnabled = true; + }); + + tearDownAll(() { + HttpClientRequestProfile.profilingEnabled = profilingEnabled; + }); + + group('POST', () { + late HttpServer successServer; + late Uri successServerUri; + late HttpClientRequestProfile profile; + + setUpAll(() async { + successServer = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.headers.set('Content-Length', '11'); + request.response.write('Hello World'); + await request.response.close(); + }); + successServerUri = Uri.http('localhost:${successServer.port}'); + final client = OkHttpClientWithProfile(); + await client.post(successServerUri, + headers: {'Content-Type': 'text/plain'}, body: 'Hi'); + profile = client.profile!; + }); + tearDownAll(() { + successServer.close(); + }); + + test('profile attributes', () { + expect(profile.events, isEmpty); + expect(profile.requestMethod, 'POST'); + expect(profile.requestUri, successServerUri.toString()); + expect( + profile.connectionInfo, containsPair('package', 'package:ok_http')); + }); + + test('request attributes', () { + expect(profile.requestData.bodyBytes, 'Hi'.codeUnits); + expect(profile.requestData.contentLength, 2); + expect(profile.requestData.endTime, isNotNull); + expect(profile.requestData.error, isNull); + expect( + profile.requestData.headers, containsPair('Content-Length', ['2'])); + expect(profile.requestData.headers, + containsPair('Content-Type', ['text/plain; charset=utf-8'])); + expect(profile.requestData.persistentConnection, isNull); + expect(profile.requestData.proxyDetails, isNull); + expect(profile.requestData.startTime, isNotNull); + }); + + test('response attributes', () { + expect(profile.responseData.bodyBytes, 'Hello World'.codeUnits); + expect(profile.responseData.compressionState, isNull); + expect(profile.responseData.contentLength, 11); + expect(profile.responseData.endTime, isNotNull); + expect(profile.responseData.error, isNull); + expect(profile.responseData.headers, + containsPair('content-type', ['text/plain'])); + expect(profile.responseData.headers, + containsPair('content-length', ['11'])); + expect(profile.responseData.isRedirect, false); + expect(profile.responseData.persistentConnection, isNull); + expect(profile.responseData.reasonPhrase, 'OK'); + expect(profile.responseData.redirects, isEmpty); + expect(profile.responseData.startTime, isNotNull); + expect(profile.responseData.statusCode, 200); + }); + }); + + group('failed POST request', () { + late HttpClientRequestProfile profile; + + setUpAll(() async { + final client = OkHttpClientWithProfile(); + try { + await client.post(Uri.http('thisisnotahost'), + headers: {'Content-Type': 'text/plain'}, body: 'Hi'); + fail('expected exception'); + } on ClientException { + // Expected exception. + } + profile = client.profile!; + }); + + test('profile attributes', () { + expect(profile.events, isEmpty); + expect(profile.requestMethod, 'POST'); + expect(profile.requestUri, 'http://thisisnotahost'); + expect( + profile.connectionInfo, containsPair('package', 'package:ok_http')); + }); + + test('request attributes', () { + expect(profile.requestData.bodyBytes, 'Hi'.codeUnits); + expect(profile.requestData.contentLength, 2); + expect(profile.requestData.endTime, isNotNull); + expect(profile.requestData.error, startsWith('ClientException:')); + expect( + profile.requestData.headers, containsPair('Content-Length', ['2'])); + expect(profile.requestData.headers, + containsPair('Content-Type', ['text/plain; charset=utf-8'])); + expect(profile.requestData.persistentConnection, isNull); + expect(profile.requestData.proxyDetails, isNull); + expect(profile.requestData.startTime, isNotNull); + }); + + test('response attributes', () { + expect(profile.responseData.bodyBytes, isEmpty); + expect(profile.responseData.compressionState, isNull); + expect(profile.responseData.contentLength, isNull); + expect(profile.responseData.endTime, isNull); + expect(profile.responseData.error, isNull); + expect(profile.responseData.headers, isNull); + expect(profile.responseData.isRedirect, isNull); + expect(profile.responseData.persistentConnection, isNull); + expect(profile.responseData.reasonPhrase, isNull); + expect(profile.responseData.redirects, isEmpty); + expect(profile.responseData.startTime, isNull); + expect(profile.responseData.statusCode, isNull); + }); + }); + + group('failed POST response', () { + late HttpServer successServer; + late Uri successServerUri; + late HttpClientRequestProfile profile; + + setUpAll(() async { + successServer = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + await request.drain(); + request.response.headers.set('Content-Type', 'text/plain'); + request.response.headers.set('Content-Length', '11'); + final socket = await request.response.detachSocket(); + await socket.close(); + }); + successServerUri = Uri.http('localhost:${successServer.port}'); + final client = OkHttpClientWithProfile(); + + try { + await client.post(successServerUri, + headers: {'Content-Type': 'text/plain'}, body: 'Hi'); + fail('expected exception'); + } on ClientException { + // Expected exception. + } + profile = client.profile!; + }); + tearDownAll(() { + successServer.close(); + }); + + test('profile attributes', () { + expect(profile.events, isEmpty); + expect(profile.requestMethod, 'POST'); + expect(profile.requestUri, successServerUri.toString()); + expect( + profile.connectionInfo, containsPair('package', 'package:ok_http')); + }); + + test('request attributes', () { + expect(profile.requestData.bodyBytes, 'Hi'.codeUnits); + expect(profile.requestData.contentLength, 2); + expect(profile.requestData.endTime, isNotNull); + expect(profile.requestData.error, isNull); + expect( + profile.requestData.headers, containsPair('Content-Length', ['2'])); + expect(profile.requestData.headers, + containsPair('Content-Type', ['text/plain; charset=utf-8'])); + expect(profile.requestData.persistentConnection, isNull); + expect(profile.requestData.proxyDetails, isNull); + expect(profile.requestData.startTime, isNotNull); + }); + + test('response attributes', () { + expect(profile.responseData.bodyBytes, isEmpty); + expect(profile.responseData.compressionState, isNull); + expect(profile.responseData.contentLength, 11); + expect(profile.responseData.endTime, isNotNull); + expect(profile.responseData.error, startsWith('ClientException:')); + expect(profile.responseData.headers, + containsPair('content-type', ['text/plain'])); + expect(profile.responseData.headers, + containsPair('content-length', ['11'])); + expect(profile.responseData.isRedirect, false); + expect(profile.responseData.persistentConnection, isNull); + expect(profile.responseData.reasonPhrase, 'OK'); + expect(profile.responseData.redirects, isEmpty); + expect(profile.responseData.startTime, isNotNull); + expect(profile.responseData.statusCode, 200); + }); + }); + + group('redirects', () { + late HttpServer successServer; + late Uri successServerUri; + late HttpClientRequestProfile profile; + + setUpAll(() async { + successServer = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + if (request.requestedUri.pathSegments.isEmpty) { + unawaited(request.response.close()); + } else { + final n = int.parse(request.requestedUri.pathSegments.last); + final nextPath = n - 1 == 0 ? '' : '${n - 1}'; + unawaited(request.response + .redirect(successServerUri.replace(path: '/$nextPath'))); + } + }); + successServerUri = Uri.http('localhost:${successServer.port}'); + }); + tearDownAll(() { + successServer.close(); + }); + + test('no redirects', () async { + final client = OkHttpClientWithProfile(); + await client.get(successServerUri); + profile = client.profile!; + + expect(profile.responseData.redirects, isEmpty); + }); + + test('follow redirects', () async { + final client = OkHttpClientWithProfile(); + await client.send(Request('GET', successServerUri.replace(path: '/3')) + ..followRedirects = true + ..maxRedirects = 4); + profile = client.profile!; + + expect(profile.requestData.followRedirects, true); + expect(profile.requestData.maxRedirects, 4); + expect(profile.responseData.isRedirect, false); + + expect(profile.responseData.redirects, [ + HttpProfileRedirectData( + statusCode: 302, + method: 'GET', + location: successServerUri.replace(path: '/2').toString()), + HttpProfileRedirectData( + statusCode: 302, + method: 'GET', + location: successServerUri.replace(path: '/1').toString()), + HttpProfileRedirectData( + statusCode: 302, + method: 'GET', + location: successServerUri.replace(path: '/').toString(), + ) + ]); + }); + + test('no follow redirects', () async { + final client = OkHttpClientWithProfile(); + await client.send(Request('GET', successServerUri.replace(path: '/3')) + ..followRedirects = false); + profile = client.profile!; + + expect(profile.requestData.followRedirects, false); + expect(profile.responseData.isRedirect, true); + expect(profile.responseData.redirects, isEmpty); + }); + }); + }); +} diff --git a/pkgs/ok_http/example/integration_test/client_test.dart b/pkgs/ok_http/example/integration_test/client_test.dart index b167a8f329..a1d0e5d65b 100644 --- a/pkgs/ok_http/example/integration_test/client_test.dart +++ b/pkgs/ok_http/example/integration_test/client_test.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'package:http_client_conformance_tests/http_client_conformance_tests.dart'; +import 'package:http_profile/http_profile.dart'; import 'package:integration_test/integration_test.dart'; import 'package:ok_http/ok_http.dart'; import 'package:test/test.dart'; @@ -15,13 +16,40 @@ void main() async { Future testConformance() async { group('ok_http client', () { - testAll( - OkHttpClient.new, - canStreamRequestBody: false, - preservesMethodCase: true, - supportsFoldedHeaders: false, - canSendCookieHeaders: true, - canReceiveSetCookieHeaders: true, - ); + group('profile enabled', () { + final profile = HttpClientRequestProfile.profilingEnabled; + HttpClientRequestProfile.profilingEnabled = true; + + try { + testAll( + OkHttpClient.new, + canStreamRequestBody: false, + preservesMethodCase: true, + supportsFoldedHeaders: false, + canSendCookieHeaders: true, + canReceiveSetCookieHeaders: true, + ); + } finally { + HttpClientRequestProfile.profilingEnabled = profile; + } + }); + + group('profile disabled', () { + final profile = HttpClientRequestProfile.profilingEnabled; + HttpClientRequestProfile.profilingEnabled = false; + + try { + testAll( + OkHttpClient.new, + canStreamRequestBody: false, + preservesMethodCase: true, + supportsFoldedHeaders: false, + canSendCookieHeaders: true, + canReceiveSetCookieHeaders: true, + ); + } finally { + HttpClientRequestProfile.profilingEnabled = profile; + } + }); }); } diff --git a/pkgs/ok_http/example/pubspec.yaml b/pkgs/ok_http/example/pubspec.yaml index de52329b4b..d452975f20 100644 --- a/pkgs/ok_http/example/pubspec.yaml +++ b/pkgs/ok_http/example/pubspec.yaml @@ -23,6 +23,7 @@ dev_dependencies: flutter_lints: ^3.0.0 http_client_conformance_tests: path: ../../http_client_conformance_tests/ + http_profile: ^0.1.0 integration_test: sdk: flutter test: ^1.23.1 diff --git a/pkgs/ok_http/jnigen.yaml b/pkgs/ok_http/jnigen.yaml index f4b43951ad..c9f06d183a 100644 --- a/pkgs/ok_http/jnigen.yaml +++ b/pkgs/ok_http/jnigen.yaml @@ -27,6 +27,7 @@ classes: - "okhttp3.ConnectionPool" - "okhttp3.Dispatcher" - "okhttp3.Cache" + - "com.example.ok_http.RedirectReceivedCallback" - "com.example.ok_http.RedirectInterceptor" - "com.example.ok_http.AsyncInputStreamReader" - "com.example.ok_http.DataCallback" diff --git a/pkgs/ok_http/lib/src/jni/bindings.dart b/pkgs/ok_http/lib/src/jni/bindings.dart index 8b76334e8c..05ab7b830e 100644 --- a/pkgs/ok_http/lib/src/jni/bindings.dart +++ b/pkgs/ok_http/lib/src/jni/bindings.dart @@ -1087,8 +1087,8 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int64, - ffi.Int64 + ffi.Int32, + ffi.Int32 )>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, @@ -1211,8 +1211,8 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int64, - ffi.Int64 + ffi.Int32, + ffi.Int32 )>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, @@ -1275,7 +1275,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int64 + ffi.Int32 )>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, @@ -1363,7 +1363,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int64 + ffi.Int32 )>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, @@ -1706,8 +1706,8 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int64, - ffi.Int64 + ffi.Int32, + ffi.Int32 )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, @@ -1830,8 +1830,8 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int64, - ffi.Int64 + ffi.Int32, + ffi.Int32 )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, @@ -1894,7 +1894,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int64 + ffi.Int32 )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, @@ -1982,7 +1982,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int64 + ffi.Int32 )>)>>("globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, @@ -2178,7 +2178,7 @@ class Response_Builder extends jni.JObject { static final _code = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2584,7 +2584,7 @@ class Response extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int64, + ffi.Int32, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -3341,8 +3341,8 @@ class ResponseBody_BomAwareReader extends jni.JObject { ffi.VarArgs< ( ffi.Pointer, - ffi.Int64, - ffi.Int64 + ffi.Int32, + ffi.Int32 )>)>>("globalEnv_CallIntMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, @@ -4539,7 +4539,7 @@ class OkHttpClient_Builder extends jni.JObject { static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -4590,7 +4590,7 @@ class OkHttpClient_Builder extends jni.JObject { static final _followRedirects = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -4613,7 +4613,7 @@ class OkHttpClient_Builder extends jni.JObject { static final _followSslRedirects = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -7571,7 +7571,7 @@ class Headers extends jni.JObject { static final _name = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -7593,7 +7593,7 @@ class Headers extends jni.JObject { static final _value = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -8188,7 +8188,7 @@ class ConnectionPool extends jni.JObject { jni.JMethodIDPtr, ffi.VarArgs< ( - ffi.Int64, + ffi.Int32, ffi.Int64, ffi.Pointer )>)>>("globalEnv_NewObject") @@ -8400,7 +8400,7 @@ class Dispatcher extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallVoidMethod") .asFunction< jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -8448,7 +8448,7 @@ class Dispatcher extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallVoidMethod") + ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallVoidMethod") .asFunction< jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -9438,6 +9438,174 @@ final class $CacheType extends jni.JObjType { } } +/// from: com.example.ok_http.RedirectReceivedCallback +class RedirectReceivedCallback extends jni.JObject { + @override + late final jni.JObjType $type = type; + + RedirectReceivedCallback.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r"com/example/ok_http/RedirectReceivedCallback"); + + /// The type which includes information such as the signature of this class. + static const type = $RedirectReceivedCallbackType(); + static final _id_onRedirectReceived = _class.instanceMethodId( + r"onRedirectReceived", + r"(Lokhttp3/Response;Ljava/lang/String;)V", + ); + + static final _onRedirectReceived = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>("globalEnv_CallVoidMethod") + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract void onRedirectReceived(okhttp3.Response response, java.lang.String string) + void onRedirectReceived( + Response response, + jni.JString string, + ) { + _onRedirectReceived( + reference.pointer, + _id_onRedirectReceived as jni.JMethodIDPtr, + response.reference.pointer, + string.reference.pointer) + .check(); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r"onRedirectReceived(Lokhttp3/Response;Ljava/lang/String;)V") { + _$impls[$p]!.onRedirectReceived( + $a[0].castTo(const $ResponseType(), releaseOriginal: true), + $a[1].castTo(const jni.JStringType(), releaseOriginal: true), + ); + return jni.nullptr; + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e.toString()); + } + return jni.nullptr; + } + + factory RedirectReceivedCallback.implement( + $RedirectReceivedCallbackImpl $impl, + ) { + final $p = ReceivePort(); + final $x = RedirectReceivedCallback.fromReference( + ProtectedJniExtensions.newPortProxy( + r"com.example.ok_http.RedirectReceivedCallback", + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $RedirectReceivedCallbackImpl { + factory $RedirectReceivedCallbackImpl({ + required void Function(Response response, jni.JString string) + onRedirectReceived, + }) = _$RedirectReceivedCallbackImpl; + + void onRedirectReceived(Response response, jni.JString string); +} + +class _$RedirectReceivedCallbackImpl implements $RedirectReceivedCallbackImpl { + _$RedirectReceivedCallbackImpl({ + required void Function(Response response, jni.JString string) + onRedirectReceived, + }) : _onRedirectReceived = onRedirectReceived; + + final void Function(Response response, jni.JString string) + _onRedirectReceived; + + void onRedirectReceived(Response response, jni.JString string) { + return _onRedirectReceived(response, string); + } +} + +final class $RedirectReceivedCallbackType + extends jni.JObjType { + const $RedirectReceivedCallbackType(); + + @override + String get signature => r"Lcom/example/ok_http/RedirectReceivedCallback;"; + + @override + RedirectReceivedCallback fromReference(jni.JReference reference) => + RedirectReceivedCallback.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($RedirectReceivedCallbackType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($RedirectReceivedCallbackType) && + other is $RedirectReceivedCallbackType; + } +} + /// from: com.example.ok_http.RedirectInterceptor$Companion class RedirectInterceptor_Companion extends jni.JObject { @override @@ -9454,7 +9622,7 @@ class RedirectInterceptor_Companion extends jni.JObject { static const type = $RedirectInterceptor_CompanionType(); static final _id_addRedirectInterceptor = _class.instanceMethodId( r"addRedirectInterceptor", - r"(Lokhttp3/OkHttpClient$Builder;IZ)Lokhttp3/OkHttpClient$Builder;", + r"(Lokhttp3/OkHttpClient$Builder;IZLcom/example/ok_http/RedirectReceivedCallback;)Lokhttp3/OkHttpClient$Builder;", ); static final _addRedirectInterceptor = ProtectedJniExtensions.lookup< @@ -9465,26 +9633,29 @@ class RedirectInterceptor_Companion extends jni.JObject { ffi.VarArgs< ( ffi.Pointer, - ffi.Int64, - ffi.Int64 + ffi.Int32, + ffi.Uint8, + ffi.Pointer )>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, int)>(); + ffi.Pointer, int, int, ffi.Pointer)>(); - /// from: public final okhttp3.OkHttpClient$Builder addRedirectInterceptor(okhttp3.OkHttpClient$Builder builder, int i, boolean z) + /// from: public final okhttp3.OkHttpClient$Builder addRedirectInterceptor(okhttp3.OkHttpClient$Builder builder, int i, boolean z, com.example.ok_http.RedirectReceivedCallback redirectReceivedCallback) /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder addRedirectInterceptor( OkHttpClient_Builder builder, int i, bool z, + RedirectReceivedCallback redirectReceivedCallback, ) { return _addRedirectInterceptor( reference.pointer, _id_addRedirectInterceptor as jni.JMethodIDPtr, builder.reference.pointer, i, - z ? 1 : 0) + z ? 1 : 0, + redirectReceivedCallback.reference.pointer) .object(const $OkHttpClient_BuilderType()); } diff --git a/pkgs/ok_http/lib/src/ok_http_client.dart b/pkgs/ok_http/lib/src/ok_http_client.dart index 3ab3799d62..33b1bfd5eb 100644 --- a/pkgs/ok_http/lib/src/ok_http_client.dart +++ b/pkgs/ok_http/lib/src/ok_http_client.dart @@ -16,6 +16,7 @@ import 'dart:async'; import 'dart:typed_data'; import 'package:http/http.dart'; +import 'package:http_profile/http_profile.dart'; import 'package:jni/jni.dart'; import 'jni/bindings.dart' as bindings; @@ -78,6 +79,22 @@ class OkHttpClient extends BaseClient { _isClosed = true; } + HttpClientRequestProfile? _createProfile(BaseRequest request) => + HttpClientRequestProfile.profile( + requestStartTime: DateTime.now(), + requestMethod: request.method, + requestUri: request.url.toString()); + + void addProfileError(HttpClientRequestProfile? profile, Exception error) { + if (profile != null) { + if (profile.requestData.endTime == null) { + profile.requestData.closeWithError(error.toString()); + } else { + profile.responseData.closeWithError(error.toString()); + } + } + } + @override Future send(BaseRequest request) async { if (_isClosed) { @@ -85,6 +102,25 @@ class OkHttpClient extends BaseClient { 'HTTP request failed. Client is already closed.', request.url); } + final profile = _createProfile(request); + profile?.connectionInfo = { + 'package': 'package:ok_http', + 'client': 'OkHttpClient', + }; + + profile?.requestData + ?..contentLength = request.contentLength + ..followRedirects = request.followRedirects + ..headersCommaValues = request.headers + ..maxRedirects = request.maxRedirects; + + if (profile != null && request.contentLength != null) { + profile.requestData.headersListValues = { + 'Content-Length': ['${request.contentLength}'], + ...profile.requestData.headers! + }; + } + var requestUrl = request.url.toString(); var requestHeaders = request.headers; var requestMethod = request.method; @@ -92,6 +128,9 @@ class OkHttpClient extends BaseClient { var maxRedirects = request.maxRedirects; var followRedirects = request.followRedirects; + profile?.requestData.bodySink.add(requestBody); + var profileRespClosed = false; + final responseCompleter = Completer(); var reqBuilder = bindings.Request_Builder().url1(requestUrl.toJString()); @@ -123,9 +162,20 @@ class OkHttpClient extends BaseClient { // (Since OkHttp sets a hard limit of 20 redirects.) // https://github.com/square/okhttp/blob/54238b4c713080c3fd32fb1a070fb5d6814c9a09/okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt#L350 final reqConfiguredClient = bindings.RedirectInterceptor.Companion - .addRedirectInterceptor(_client.newBuilder().followRedirects(false), - maxRedirects, followRedirects) - .build(); + .addRedirectInterceptor( + _client.newBuilder().followRedirects(false), + maxRedirects, + followRedirects, bindings.RedirectReceivedCallback.implement( + bindings.$RedirectReceivedCallbackImpl( + onRedirectReceived: (response, newLocation) { + profile?.responseData.addRedirect(HttpProfileRedirectData( + statusCode: response.code(), + method: + response.request().method().toDartString(releaseOriginal: true), + location: newLocation.toDartString(releaseOriginal: true), + )); + }, + ))).build(); // `enqueue()` schedules the request to be executed in the future. // https://square.github.io/okhttp/5.x/okhttp/okhttp3/-call/enqueue.html @@ -161,19 +211,30 @@ class OkHttpClient extends BaseClient { responseBodyByteStream, bindings.DataCallback.implement( bindings.$DataCallbackImpl( - onDataRead: (JArray data) { - respBodyStreamController.sink.add(data.toUint8List()); + onDataRead: (JArray bytesRead) { + var data = bytesRead.toUint8List(); + + respBodyStreamController.sink.add(data); + profile?.responseData.bodySink.add(data); }, - onFinished: () async { + onFinished: () { reader.shutdown(); - await respBodyStreamController.sink.close(); + respBodyStreamController.sink.close(); + if (!profileRespClosed) { + profile?.responseData.close(); + profileRespClosed = true; + } }, - onError: (iOException) async { - respBodyStreamController.sink.addError( - ClientException(iOException.toString(), request.url)); + onError: (iOException) { + var exception = + ClientException(iOException.toString(), request.url); + + respBodyStreamController.sink.addError(exception); + addProfileError(profile, exception); + profileRespClosed = true; reader.shutdown(); - await respBodyStreamController.sink.close(); + respBodyStreamController.sink.close(); }, ), )); @@ -188,15 +249,26 @@ class OkHttpClient extends BaseClient { contentLength: contentLength, isRedirect: response.isRedirect(), )); + + profile?.requestData.close(); + profile?.responseData + ?..contentLength = contentLength + ..headersCommaValues = responseHeaders + ..isRedirect = response.isRedirect() + ..reasonPhrase = + response.message().toDartString(releaseOriginal: true) + ..startTime = DateTime.now() + ..statusCode = response.code(); }, onFailure: (bindings.Call call, JObject ioException) { - if (ioException.toString().contains('Redirect limit exceeded')) { - responseCompleter.completeError( - ClientException('Redirect limit exceeded', request.url)); - return; + var msg = ioException.toString(); + if (msg.contains('Redirect limit exceeded')) { + msg = 'Redirect limit exceeded'; } - responseCompleter.completeError( - ClientException(ioException.toString(), request.url)); + var exception = ClientException(msg, request.url); + responseCompleter.completeError(exception); + addProfileError(profile, exception); + profileRespClosed = true; }, ))); @@ -204,6 +276,17 @@ class OkHttpClient extends BaseClient { } } +/// A test-only class that makes the [HttpClientRequestProfile] data available. +class OkHttpClientWithProfile extends OkHttpClient { + HttpClientRequestProfile? profile; + + @override + HttpClientRequestProfile? _createProfile(BaseRequest request) => + profile = super._createProfile(request); + + OkHttpClientWithProfile() : super(); +} + extension on Uint8List { JArray toJArray() => JArray(jbyte.type, length)..setRange(0, length, this); diff --git a/pkgs/ok_http/pubspec.yaml b/pkgs/ok_http/pubspec.yaml index 8b217d23d4..2ea7a6a665 100644 --- a/pkgs/ok_http/pubspec.yaml +++ b/pkgs/ok_http/pubspec.yaml @@ -7,12 +7,13 @@ publish_to: none environment: sdk: ^3.4.0 - flutter: '>=3.22.0' + flutter: ">=3.22.0" dependencies: flutter: sdk: flutter http: ^1.2.1 + http_profile: ^0.1.0 jni: ^0.9.2 plugin_platform_interface: ^2.0.2 From cf6f902dd0fd089497086456af3ed5511f460935 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Mon, 24 Jun 2024 13:33:08 -0500 Subject: [PATCH 390/448] Fix some minor spelling and grammar mistakes (#1239) --- .../ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md | 2 +- pkgs/cronet_http/README.md | 2 +- pkgs/cronet_http/example/lib/main.dart | 2 +- pkgs/cupertino_http/README.md | 4 ++-- pkgs/cupertino_http/example/lib/main.dart | 2 +- pkgs/cupertino_http/lib/src/cupertino_web_socket.dart | 2 +- pkgs/flutter_http_example/README.md | 2 +- pkgs/flutter_http_example/lib/main.dart | 2 +- pkgs/http/README.md | 10 +++++----- pkgs/http/lib/src/response.dart | 2 +- pkgs/http_client_conformance_tests/README.md | 2 +- .../lib/src/isolate_test.dart | 2 +- .../lib/src/request_body_tests.dart | 2 +- pkgs/web_socket/lib/src/web_socket.dart | 2 +- pkgs/web_socket_conformance_tests/README.md | 2 +- .../lib/src/protocol_tests.dart | 2 +- 16 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md b/.github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md index 36877b515c..261f75e9ae 100644 --- a/.github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md +++ b/.github/ISSUE_TEMPLATE/2--package-http---i-found-a-bug.md @@ -12,4 +12,4 @@ Please describe the bug and how to reproduce it. Note that if the bug can also be reproduced when going through the interfaces provided by `dart:html` or `dart:io` directly the bug should be filed against the Dart SDK: https://github.com/dart-lang/sdk/issues -A failure to make an http request is more often a problem with the environment than with the client. +A failure to make an HTTP request is more often a problem with the environment than with the client. diff --git a/pkgs/cronet_http/README.md b/pkgs/cronet_http/README.md index 321897aa21..eca84103b0 100644 --- a/pkgs/cronet_http/README.md +++ b/pkgs/cronet_http/README.md @@ -23,7 +23,7 @@ Using [Cronet][], rather than the socket-based ## Using -The easiest way to use this library is via the the high-level interface +The easiest way to use this library is via the high-level interface defined by [package:http Client][]. This approach allows the same HTTP code to be used on all platforms, while diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 02c56d6581..1af8e9203f 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -63,7 +63,7 @@ class _HomePageState extends State { } // Get the list of books matching `query`. - // The `get` call will automatically use the `client` configurated in `main`. + // The `get` call will automatically use the `client` configured in `main`. Future> _findMatchingBooks(String query) async { final response = await _client.get( Uri.https( diff --git a/pkgs/cupertino_http/README.md b/pkgs/cupertino_http/README.md index 77c1d79244..ef5c9fff8c 100644 --- a/pkgs/cupertino_http/README.md +++ b/pkgs/cupertino_http/README.md @@ -7,7 +7,7 @@ A macOS/iOS Flutter plugin that provides access to the ## Motivation Using the [Foundation URL Loading System][], rather than the socket-based -[dart:io HttpClient][] implemententation, has several advantages: +[dart:io HttpClient][] implementation, has several advantages: 1. It automatically supports iOS/macOS platform features such VPNs and HTTP proxies. @@ -17,7 +17,7 @@ Using the [Foundation URL Loading System][], rather than the socket-based ## Using -The easiest way to use this library is via the the high-level interface +The easiest way to use this library is via the high-level interface defined by [package:http Client][]. This approach allows the same HTTP code to be used on all platforms, while diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index 092300a64c..24436ea052 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -62,7 +62,7 @@ class _HomePageState extends State { } // Get the list of books matching `query`. - // The `get` call will automatically use the `client` configurated in `main`. + // The `get` call will automatically use the `client` configured in `main`. Future> _findMatchingBooks(String query) async { final response = await _client.get( Uri.https( diff --git a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart index 43095ff68f..d9f78ae2dc 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart @@ -84,7 +84,7 @@ class CupertinoWebSocket implements WebSocket { // called and `_connectionClosed` is a no-op. // 2. we sent a close Frame (through `close()`) and `_connectionClosed` // is a no-op. - // 3. an error occured (e.g. network failure) and `_connectionClosed` + // 3. an error occurred (e.g. network failure) and `_connectionClosed` // will signal that and close `event`. webSocket._connectionClosed( 1006, Data.fromList('abnormal close'.codeUnits)); diff --git a/pkgs/flutter_http_example/README.md b/pkgs/flutter_http_example/README.md index 1a9cf9dd8a..0877bfb81e 100644 --- a/pkgs/flutter_http_example/README.md +++ b/pkgs/flutter_http_example/README.md @@ -24,7 +24,7 @@ the Dart virtual machine, meaning all platforms except the web browser. This library used to create `package:http` `Client`s when the app is run inside a web browser. -Web configuration must be done in a seperate library because Dart code cannot +Web configuration must be done in a separate library because Dart code cannot import `dart:ffi` or `dart:io` when run in a web browser. ### `main.dart` diff --git a/pkgs/flutter_http_example/lib/main.dart b/pkgs/flutter_http_example/lib/main.dart index afe8363029..13d8bc24d8 100644 --- a/pkgs/flutter_http_example/lib/main.dart +++ b/pkgs/flutter_http_example/lib/main.dart @@ -59,7 +59,7 @@ class _HomePageState extends State { } // Get the list of books matching `query`. - // The `get` call will automatically use the `client` configurated in `main`. + // The `get` call will automatically use the `client` configured in `main`. Future> _findMatchingBooks(String query) async { final response = await _client.get( Uri.https( diff --git a/pkgs/http/README.md b/pkgs/http/README.md index 0fe9014619..07c8208ec2 100644 --- a/pkgs/http/README.md +++ b/pkgs/http/README.md @@ -119,7 +119,7 @@ There are multiple implementations of the `package:http` [`Client`][client] inte You can change implementations without changing your application code, except for a few lines of [configuration](#2-configure-the-http-client). -Some well supported implementations are: +Some well-supported implementations are: | Implementation | Supported Platforms | SDK | Caching | HTTP3/QUIC | Platform Native | | -------------- | ------------------- | ----| ------- | ---------- | --------------- | @@ -130,7 +130,7 @@ Some well supported implementations are: | [`package:fetch_client`][fetch] — [`FetchClient`][fetchclient] | Web | Dart, Flutter | ✅︎ | ✅︎ | ✅︎ | > [!TIP] -> If you are writing a Dart package or Flutter pluggin that uses +> If you are writing a Dart package or Flutter plugin that uses > `package:http`, you should not depend on a particular [`Client`][client] > implementation. Let the application author decide what implementation is > best for their project. You can make that easier by accepting an explicit @@ -145,7 +145,7 @@ Some well supported implementations are: ## Configuration -To use a HTTP client implementation other than the default, you must: +To use an HTTP client implementation other than the default, you must: 1. Add the HTTP client as a dependency. 2. Configure the HTTP client. 3. Connect the HTTP client to the code that uses it. @@ -204,7 +204,7 @@ Client httpClient() { #### Supporting browser and native If your application can be run in the browser and natively, you must put your -browser and native configurations in seperate files and import the correct file +browser and native configurations in separate files and import the correct file based on the platform. For example: @@ -250,7 +250,7 @@ void main() { ``` In Flutter, you can use a one of many -[state mangement approaches][flutterstatemanagement]. +[state management approaches][flutterstatemanagement]. If you depend on code that uses top-level functions (e.g. `http.post`) or calls the [`Client()`][clientconstructor] constructor, then you can use diff --git a/pkgs/http/lib/src/response.dart b/pkgs/http/lib/src/response.dart index 1ba7c466cf..9d8cdb88f5 100644 --- a/pkgs/http/lib/src/response.dart +++ b/pkgs/http/lib/src/response.dart @@ -71,7 +71,7 @@ class Response extends BaseResponse { Encoding _encodingForHeaders(Map headers) => encodingForCharset(_contentTypeForHeaders(headers).parameters['charset']); -/// Returns the [MediaType] object for the given headers's content-type. +/// Returns the [MediaType] object for the given headers' content-type. /// /// Defaults to `application/octet-stream`. MediaType _contentTypeForHeaders(Map headers) { diff --git a/pkgs/http_client_conformance_tests/README.md b/pkgs/http_client_conformance_tests/README.md index 6502aaf1ea..631401f6f7 100644 --- a/pkgs/http_client_conformance_tests/README.md +++ b/pkgs/http_client_conformance_tests/README.md @@ -40,5 +40,5 @@ void main() { } ``` -**Note**: This package does not have it's own tests, instead it is +**Note**: This package does not have its own tests, instead it is exercised by the tests in `package:http`. diff --git a/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart b/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart index 1723ab549c..1f5559b69d 100644 --- a/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart +++ b/pkgs/http_client_conformance_tests/lib/src/isolate_test.dart @@ -17,7 +17,7 @@ Future _testPost(Client Function() clientFactory, String host) async { () => clientFactory().post(Uri.http(host, ''), body: 'Hello World!')); } -/// Tests that the [Client] is useable from Isolates other than the main +/// Tests that the [Client] is usable from Isolates other than the main /// isolate. /// /// If [canWorkInIsolates] is `false` then the tests will be skipped. diff --git a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart index 901f7f7ed5..98da3785a3 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_body_tests.dart @@ -261,7 +261,7 @@ void testRequestBody(Client client) { }); test('client.send() with persistentConnection', () async { - // Do five requests to verify that the connection persistance logic is + // Do five requests to verify that the connection persistence logic is // correct. for (var i = 0; i < 5; ++i) { final request = Request('POST', Uri.http(host, '')) diff --git a/pkgs/web_socket/lib/src/web_socket.dart b/pkgs/web_socket/lib/src/web_socket.dart index 5e9d7ccd80..9894f26a36 100644 --- a/pkgs/web_socket/lib/src/web_socket.dart +++ b/pkgs/web_socket/lib/src/web_socket.dart @@ -169,7 +169,7 @@ abstract interface class WebSocket { /// /// - A close frame was received from the peer. [CloseReceived.code] and /// [CloseReceived.reason] will be set by the peer. - /// - A failure occured (e.g. the peer disconnected). [CloseReceived.code] and + /// - A failure occurred (e.g. the peer disconnected). [CloseReceived.code] and /// [CloseReceived.reason] will be a failure code defined by /// (RFC-6455)[https://www.rfc-editor.org/rfc/rfc6455.html#section-7.4.1] /// (e.g. 1006). diff --git a/pkgs/web_socket_conformance_tests/README.md b/pkgs/web_socket_conformance_tests/README.md index 50b514cd32..deabae0c55 100644 --- a/pkgs/web_socket_conformance_tests/README.md +++ b/pkgs/web_socket_conformance_tests/README.md @@ -31,5 +31,5 @@ void main() { } ``` -**Note**: This package does not have it's own tests, instead it is +**Note**: This package does not have its own tests, instead it is exercised by the tests in `package:web_socket`. diff --git a/pkgs/web_socket_conformance_tests/lib/src/protocol_tests.dart b/pkgs/web_socket_conformance_tests/lib/src/protocol_tests.dart index 4af977fb7c..2d35f1c4a4 100644 --- a/pkgs/web_socket_conformance_tests/lib/src/protocol_tests.dart +++ b/pkgs/web_socket_conformance_tests/lib/src/protocol_tests.dart @@ -48,7 +48,7 @@ void testProtocols( socket.sendText('Hello World!'); }); - test('mutiple protocols', () async { + test('multiple protocols', () async { final socket = await channelFactory( uri.replace(queryParameters: {'protocol': 'text.example.com'}), protocols: ['chat.example.com', 'text.example.com']); From 5688101f44a91493af106e166c3385be0b084fc4 Mon Sep 17 00:00:00 2001 From: Parker Lougheed Date: Mon, 24 Jun 2024 13:55:28 -0500 Subject: [PATCH 391/448] Update various flutter.dev and dart.dev links (#1238) --- pkgs/cronet_http/example/android/.gitignore | 2 +- pkgs/cupertino_http/lib/cupertino_http.dart | 2 +- pkgs/flutter_http_example/android/.gitignore | 2 +- pkgs/flutter_http_example/android/app/build.gradle | 2 +- pkgs/ok_http/example/analysis_options.yaml | 2 +- pkgs/ok_http/example/android/.gitignore | 2 +- pkgs/ok_http/example/android/app/build.gradle | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/cronet_http/example/android/.gitignore b/pkgs/cronet_http/example/android/.gitignore index 6f568019d3..55afd919c6 100644 --- a/pkgs/cronet_http/example/android/.gitignore +++ b/pkgs/cronet_http/example/android/.gitignore @@ -7,7 +7,7 @@ gradle-wrapper.jar GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 55d62d3c15..8009d786cc 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -9,7 +9,7 @@ /// configuration on macOS) then the /// [`com.apple.security.network.client`](https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_network_client) /// entitlement is required to use `package:cupertino_http`. See -/// [Entitlements and the App Sandbox](https://docs.flutter.dev/platform-integration/macos/building#entitlements-and-the-app-sandbox). +/// [Entitlements and the App Sandbox](https://flutter.dev/to/macos-entitlements). /// /// # CupertinoClient /// diff --git a/pkgs/flutter_http_example/android/.gitignore b/pkgs/flutter_http_example/android/.gitignore index 6f568019d3..55afd919c6 100644 --- a/pkgs/flutter_http_example/android/.gitignore +++ b/pkgs/flutter_http_example/android/.gitignore @@ -7,7 +7,7 @@ gradle-wrapper.jar GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks diff --git a/pkgs/flutter_http_example/android/app/build.gradle b/pkgs/flutter_http_example/android/app/build.gradle index 1c15e4c768..a4eb5f2311 100644 --- a/pkgs/flutter_http_example/android/app/build.gradle +++ b/pkgs/flutter_http_example/android/app/build.gradle @@ -44,7 +44,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.flutter_http_example" // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + // For more information, see: https://flutter.dev/to/review-gradle-config. minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() diff --git a/pkgs/ok_http/example/analysis_options.yaml b/pkgs/ok_http/example/analysis_options.yaml index 0d2902135c..4b9d682f82 100644 --- a/pkgs/ok_http/example/analysis_options.yaml +++ b/pkgs/ok_http/example/analysis_options.yaml @@ -25,4 +25,4 @@ linter: # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule # Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options +# https://dart.dev/tools/analysis diff --git a/pkgs/ok_http/example/android/.gitignore b/pkgs/ok_http/example/android/.gitignore index 6f568019d3..55afd919c6 100644 --- a/pkgs/ok_http/example/android/.gitignore +++ b/pkgs/ok_http/example/android/.gitignore @@ -7,7 +7,7 @@ gradle-wrapper.jar GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks diff --git a/pkgs/ok_http/example/android/app/build.gradle b/pkgs/ok_http/example/android/app/build.gradle index b5f9467b2f..dd2e4267ae 100644 --- a/pkgs/ok_http/example/android/app/build.gradle +++ b/pkgs/ok_http/example/android/app/build.gradle @@ -37,7 +37,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId = "com.example.ok_http_example" // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + // For more information, see: https://flutter.dev/to/review-gradle-config. minSdk = flutter.minSdkVersion targetSdk = flutter.targetSdkVersion versionCode = flutterVersionCode.toInteger() From c0ceb705a1d53cc8134e7fda9f30aa5557d993ab Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 24 Jun 2024 13:04:03 -0700 Subject: [PATCH 392/448] Update lints (#1243) --- pkgs/cronet_http/example/pubspec.yaml | 2 +- pkgs/cronet_http/pubspec.yaml | 2 +- pkgs/cupertino_http/example/pubspec.yaml | 2 +- pkgs/cupertino_http/lib/src/cupertino_web_socket.dart | 4 ++-- pkgs/cupertino_http/pubspec.yaml | 2 +- pkgs/flutter_http_example/pubspec.yaml | 2 +- pkgs/http/lib/testing.dart | 2 +- pkgs/http/pubspec.yaml | 2 +- pkgs/http_client_conformance_tests/pubspec.yaml | 2 +- pkgs/java_http/pubspec.yaml | 2 +- pkgs/ok_http/pubspec.yaml | 2 +- pkgs/web_socket/pubspec.yaml | 2 +- pkgs/web_socket_conformance_tests/pubspec.yaml | 2 +- 13 files changed, 14 insertions(+), 14 deletions(-) diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index 122e2833a3..5d94a3944e 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: provider: ^6.1.1 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 flutter_test: sdk: flutter http_client_conformance_tests: diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 49fefbaf23..77a992f3b5 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: jni: ^0.9.2 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 jnigen: ^0.9.2 xml: ^6.1.0 yaml_edit: ^2.0.3 diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index ba79752e48..a57f39fd05 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -22,7 +22,7 @@ dependencies: dev_dependencies: convert: ^3.1.1 crypto: ^3.0.3 - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 ffi: ^2.0.1 flutter_test: sdk: flutter diff --git a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart index d9f78ae2dc..666c018835 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart @@ -166,7 +166,7 @@ class CupertinoWebSocket implements WebSocket { } _task .sendMessage(URLSessionWebSocketMessage.fromData(Data.fromList(b))) - .then((_) => _, onError: _closeConnectionWithError); + .then((value) => value, onError: _closeConnectionWithError); } @override @@ -176,7 +176,7 @@ class CupertinoWebSocket implements WebSocket { } _task .sendMessage(URLSessionWebSocketMessage.fromString(s)) - .then((_) => _, onError: _closeConnectionWithError); + .then((value) => value, onError: _closeConnectionWithError); } @override diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 44a1d9754f..e34117dc29 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -19,7 +19,7 @@ dependencies: web_socket: ^0.1.0 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 ffigen: ^11.0.0 flutter: diff --git a/pkgs/flutter_http_example/pubspec.yaml b/pkgs/flutter_http_example/pubspec.yaml index 7d0f0892ce..b3b3ef50f7 100644 --- a/pkgs/flutter_http_example/pubspec.yaml +++ b/pkgs/flutter_http_example/pubspec.yaml @@ -20,7 +20,7 @@ dependencies: provider: ^6.0.5 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 flutter_test: sdk: flutter integration_test: diff --git a/pkgs/http/lib/testing.dart b/pkgs/http/lib/testing.dart index 07b5381d6e..4ff7bf862e 100644 --- a/pkgs/http/lib/testing.dart +++ b/pkgs/http/lib/testing.dart @@ -22,7 +22,7 @@ /// 200, /// headers: {'content-type': 'application/json'}); /// }); -library http.testing; +library; import 'src/mock_client.dart'; diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index b133164d81..52352be343 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: web: ^0.5.0 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 fake_async: ^1.2.0 http_client_conformance_tests: path: ../http_client_conformance_tests/ diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index f904b2d0b3..c3861ffc15 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -17,4 +17,4 @@ dependencies: test: ^1.21.2 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 diff --git a/pkgs/java_http/pubspec.yaml b/pkgs/java_http/pubspec.yaml index c04429a993..129bc08e47 100644 --- a/pkgs/java_http/pubspec.yaml +++ b/pkgs/java_http/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: path: ^1.8.0 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 http_client_conformance_tests: path: ../http_client_conformance_tests/ jnigen: ^0.5.0 diff --git a/pkgs/ok_http/pubspec.yaml b/pkgs/ok_http/pubspec.yaml index 2ea7a6a665..68ff974261 100644 --- a/pkgs/ok_http/pubspec.yaml +++ b/pkgs/ok_http/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: plugin_platform_interface: ^2.0.2 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 jnigen: ^0.9.1 flutter: diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml index fdc7a7821c..cd7cf31fd9 100644 --- a/pkgs/web_socket/pubspec.yaml +++ b/pkgs/web_socket/pubspec.yaml @@ -9,7 +9,7 @@ environment: sdk: ^3.3.0 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 test: ^1.24.0 web_socket_conformance_tests: path: ../web_socket_conformance_tests/ diff --git a/pkgs/web_socket_conformance_tests/pubspec.yaml b/pkgs/web_socket_conformance_tests/pubspec.yaml index 2c7ffda0c2..84329c461e 100644 --- a/pkgs/web_socket_conformance_tests/pubspec.yaml +++ b/pkgs/web_socket_conformance_tests/pubspec.yaml @@ -18,4 +18,4 @@ dependencies: web_socket: ^0.1.0 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 From 73e7f08565a844389dfa509a4e4d020e0b3c3bad Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 24 Jun 2024 14:01:39 -0700 Subject: [PATCH 393/448] update lints (#1244) --- pkgs/http_profile/pubspec.yaml | 2 +- pkgs/ok_http/example/analysis_options.yaml | 2 +- pkgs/ok_http/example/pubspec.yaml | 8 ++++---- pkgs/web_socket/lib/src/web_socket.dart | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/http_profile/pubspec.yaml b/pkgs/http_profile/pubspec.yaml index b908d2c22d..d55dc32260 100644 --- a/pkgs/http_profile/pubspec.yaml +++ b/pkgs/http_profile/pubspec.yaml @@ -9,5 +9,5 @@ environment: sdk: ^3.4.0 dev_dependencies: - dart_flutter_team_lints: ^2.1.1 + dart_flutter_team_lints: ^3.0.0 test: ^1.24.9 diff --git a/pkgs/ok_http/example/analysis_options.yaml b/pkgs/ok_http/example/analysis_options.yaml index 4b9d682f82..454652ff22 100644 --- a/pkgs/ok_http/example/analysis_options.yaml +++ b/pkgs/ok_http/example/analysis_options.yaml @@ -7,7 +7,7 @@ # The following line activates a set of recommended lints for Flutter apps, # packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml +include: package:dart_flutter_team_lints/analysis_options.yaml linter: # The lint rules applied to this project can be customized in the diff --git a/pkgs/ok_http/example/pubspec.yaml b/pkgs/ok_http/example/pubspec.yaml index d452975f20..313cd2bbda 100644 --- a/pkgs/ok_http/example/pubspec.yaml +++ b/pkgs/ok_http/example/pubspec.yaml @@ -8,19 +8,19 @@ environment: sdk: ">=3.4.1 <4.0.0" dependencies: + cupertino_icons: ^1.0.6 flutter: sdk: flutter - ok_http: - path: ../ - cupertino_icons: ^1.0.6 http: ^1.0.0 http_image_provider: ^0.0.2 + ok_http: + path: ../ provider: ^6.1.1 dev_dependencies: + dart_flutter_team_lints: ^3.0.0 flutter_test: sdk: flutter - flutter_lints: ^3.0.0 http_client_conformance_tests: path: ../../http_client_conformance_tests/ http_profile: ^0.1.0 diff --git a/pkgs/web_socket/lib/src/web_socket.dart b/pkgs/web_socket/lib/src/web_socket.dart index 9894f26a36..255c6e6c6d 100644 --- a/pkgs/web_socket/lib/src/web_socket.dart +++ b/pkgs/web_socket/lib/src/web_socket.dart @@ -169,8 +169,8 @@ abstract interface class WebSocket { /// /// - A close frame was received from the peer. [CloseReceived.code] and /// [CloseReceived.reason] will be set by the peer. - /// - A failure occurred (e.g. the peer disconnected). [CloseReceived.code] and - /// [CloseReceived.reason] will be a failure code defined by + /// - A failure occurred (e.g. the peer disconnected). [CloseReceived.code] + /// and [CloseReceived.reason] will be a failure code defined by /// (RFC-6455)[https://www.rfc-editor.org/rfc/rfc6455.html#section-7.4.1] /// (e.g. 1006). /// From ca697dd0a4ffd7310dd5f7e894b532499177c1f5 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 24 Jun 2024 19:16:55 -0700 Subject: [PATCH 394/448] misc: add missing packages to root readme (#1245) --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 2ce0382dd2..5b5a6f5d40 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,9 @@ and the browser. | [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | A library that tests whether implementations of package:http's `Client` class behave as expected. | | | [cronet_http](pkgs/cronet_http/) | An Android Flutter plugin that provides access to the [Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) HTTP client. | [![pub package](https://img.shields.io/pub/v/cronet_http.svg)](https://pub.dev/packages/cronet_http) | | [cupertino_http](pkgs/cupertino_http/) | A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). | [![pub package](https://img.shields.io/pub/v/cupertino_http.svg)](https://pub.dev/packages/cupertino_http) | +| [http_profile](pkgs/http_profile/) | A library used by HTTP client authors to integrate with the DevTools Network View. | [![pub package](https://img.shields.io/pub/v/http_profile.svg)](https://pub.dev/packages/http_profile) | +| [web_socket_conformance_tests](pkgs/web_socket_conformance_tests/) | A library that tests whether implementations of `package:web_socket`'s `WebSocket` class behave as expected. | | +| [web_socket](pkgs/web_socket/) | Any easy-to-use library for communicating with WebSockets that has multiple implementations. | [![pub package](https://img.shields.io/pub/v/web_socket.svg)](https://pub.dev/packages/web_socket) | | [flutter_http_example](pkgs/flutter_http_example/) | An Flutter app that demonstrates how to configure and use `package:http`. | — | ## Contributing From 1c02bf5fd591803f380661621415502a74e7164d Mon Sep 17 00:00:00 2001 From: Hossein Yousefi Date: Tue, 25 Jun 2024 21:18:59 +0200 Subject: [PATCH 395/448] [cronet_http] Upgrade jni and jnigen to 0.9.3 (#1246) --- pkgs/cronet_http/CHANGELOG.md | 4 + .../cronet_http/lib/src/jni/jni_bindings.dart | 83 ++++++++----------- pkgs/cronet_http/pubspec.yaml | 6 +- 3 files changed, 43 insertions(+), 50 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index a5e1c3fce1..ca4c0451d0 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.3.2-wip + +* Upgrade `package:jni` and `package:0.9.3` to fix method calling bugs. + ## 1.3.1 * Add relevant rules with the ProGuard to avoid runtime exceptions. diff --git a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart index 8dcf00b01e..2613ec8823 100644 --- a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart +++ b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart @@ -294,7 +294,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { return jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); + return ProtectedJniExtensions.newDartException(e); } return jni.nullptr; } @@ -749,7 +749,7 @@ class URL extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32, + $Int32, ffi.Pointer )>)>>("globalEnv_NewObject") .asFunction< @@ -831,7 +831,7 @@ class URL extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32, + $Int32, ffi.Pointer, ffi.Pointer )>)>>("globalEnv_NewObject") @@ -1542,10 +1542,9 @@ class Executors extends jni.JObject { ); static final _newFixedThreadPool = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int32,)>)>>( - "globalEnv_CallStaticObjectMethod") + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<($Int32,)>)>>("globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -1566,10 +1565,9 @@ class Executors extends jni.JObject { ); static final _newWorkStealingPool = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int32,)>)>>( - "globalEnv_CallStaticObjectMethod") + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<($Int32,)>)>>("globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -1619,7 +1617,7 @@ class Executors extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32, ffi.Pointer)>)>>( + ffi.VarArgs<($Int32, ffi.Pointer)>)>>( "globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, @@ -1806,10 +1804,9 @@ class Executors extends jni.JObject { ); static final _newScheduledThreadPool = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int32,)>)>>( - "globalEnv_CallStaticObjectMethod") + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<($Int32,)>)>>("globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -1834,7 +1831,7 @@ class Executors extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32, ffi.Pointer)>)>>( + ffi.VarArgs<($Int32, ffi.Pointer)>)>>( "globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, @@ -2457,7 +2454,7 @@ class CronetEngine_Builder extends jni.JObject { static final _enableQuic = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2480,7 +2477,7 @@ class CronetEngine_Builder extends jni.JObject { static final _enableHttp2 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2503,7 +2500,7 @@ class CronetEngine_Builder extends jni.JObject { static final _enableSdch = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2526,7 +2523,7 @@ class CronetEngine_Builder extends jni.JObject { static final _enableBrotli = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2549,7 +2546,7 @@ class CronetEngine_Builder extends jni.JObject { static final _enableHttpCache = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, - jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int32, ffi.Int64)>)>>( + jni.JMethodIDPtr, ffi.VarArgs<($Int32, ffi.Int64)>)>>( "globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( @@ -2572,16 +2569,12 @@ class CronetEngine_Builder extends jni.JObject { ); static final _addQuicHint = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Int32, - ffi.Int32 - )>)>>("globalEnv_CallObjectMethod") + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( + "globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, int)>(); @@ -2612,7 +2605,7 @@ class CronetEngine_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Uint8, + $Int32, ffi.Pointer )>)>>("globalEnv_CallObjectMethod") .asFunction< @@ -2654,7 +2647,7 @@ class CronetEngine_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2818,7 +2811,7 @@ class CronetEngine extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, ffi.Uint8)>)>>( + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( "globalEnv_CallVoidMethod") .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, @@ -3172,16 +3165,12 @@ class UploadDataProviders extends jni.JObject { ); static final _create3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Int32, - ffi.Int32 - )>)>>("globalEnv_CallStaticObjectMethod") + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( + "globalEnv_CallStaticObjectMethod") .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, int)>(); @@ -3393,7 +3382,7 @@ class UrlRequest_Builder extends jni.JObject { static final _setPriority = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>("globalEnv_CallObjectMethod") .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -3927,7 +3916,7 @@ class UrlRequest_StatusListener extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallVoidMethod") + ffi.VarArgs<($Int32,)>)>>("globalEnv_CallVoidMethod") .asFunction< jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 77a992f3b5..24d4d50074 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 1.3.1 +version: 1.3.2-wip description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http @@ -13,11 +13,11 @@ dependencies: sdk: flutter http: ^1.2.0 http_profile: ^0.1.0 - jni: ^0.9.2 + jni: ^0.9.3 dev_dependencies: dart_flutter_team_lints: ^3.0.0 - jnigen: ^0.9.2 + jnigen: ^0.9.3 xml: ^6.1.0 yaml_edit: ^2.0.3 From 12bb635b3af0ddb4233ba8fae65a32fc2c2375c4 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 26 Jun 2024 16:05:55 -0700 Subject: [PATCH 396/448] [cupertino_http] Fix a bug where content-length was not set for multipart messages (#1247) --- pkgs/cupertino_http/CHANGELOG.md | 2 + .../lib/src/cupertino_client.dart | 12 +++-- .../test/html/client_conformance_test.dart | 3 +- .../lib/http_client_conformance_tests.dart | 8 +++ .../lib/src/multipart_server.dart | 48 +++++++++++++++++ .../lib/src/multipart_server_vm.dart | 14 +++++ .../lib/src/multipart_server_web.dart | 11 ++++ .../lib/src/multipart_tests.dart | 51 +++++++++++++++++++ 8 files changed, 143 insertions(+), 6 deletions(-) create mode 100644 pkgs/http_client_conformance_tests/lib/src/multipart_server.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/multipart_server_vm.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/multipart_server_web.dart create mode 100644 pkgs/http_client_conformance_tests/lib/src/multipart_tests.dart diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index bbbcb68320..0be851c2b6 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,6 +1,8 @@ ## 1.5.1-wip * Allow `1000` as a `code` argument in `CupertinoWebSocket.close`. +* Fix a bug where the `Content-Length` header would not be set under certain + circumstances. ## 1.5.0 diff --git a/pkgs/cupertino_http/lib/src/cupertino_client.dart b/pkgs/cupertino_http/lib/src/cupertino_client.dart index e2ec0a04ff..a525773316 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_client.dart @@ -308,16 +308,18 @@ class CupertinoClient extends BaseClient { ..headersCommaValues = request.headers ..maxRedirects = request.maxRedirects; - if (profile != null && request.contentLength != null) { - profile.requestData.headersListValues = { + final urlRequest = MutableURLRequest.fromUrl(request.url) + ..httpMethod = request.method; + + if (request.contentLength != null) { + profile?.requestData.headersListValues = { 'Content-Length': ['${request.contentLength}'], ...profile.requestData.headers! }; + urlRequest.setValueForHttpHeaderField( + 'Content-Length', '${request.contentLength}'); } - final urlRequest = MutableURLRequest.fromUrl(request.url) - ..httpMethod = request.method; - if (request is Request) { // Optimize the (typical) `Request` case since assigning to // `httpBodyStream` requires a lot of expensive setup and data passing. diff --git a/pkgs/http/test/html/client_conformance_test.dart b/pkgs/http/test/html/client_conformance_test.dart index b4f567dfa7..9505239564 100644 --- a/pkgs/http/test/html/client_conformance_test.dart +++ b/pkgs/http/test/html/client_conformance_test.dart @@ -14,5 +14,6 @@ void main() { redirectAlwaysAllowed: true, canStreamRequestBody: false, canStreamResponseBody: false, - canWorkInIsolates: false); + canWorkInIsolates: false, + supportsMultipartRequest: false); } diff --git a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart index 2d51c18f1b..1a43a6b144 100644 --- a/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/http_client_conformance_tests.dart @@ -7,6 +7,7 @@ import 'package:http/http.dart'; import 'src/close_tests.dart'; import 'src/compressed_response_body_tests.dart'; import 'src/isolate_test.dart'; +import 'src/multipart_tests.dart'; import 'src/multiple_clients_tests.dart'; import 'src/redirect_tests.dart'; import 'src/request_body_streamed_tests.dart'; @@ -25,6 +26,7 @@ export 'src/close_tests.dart' show testClose; export 'src/compressed_response_body_tests.dart' show testCompressedResponseBody; export 'src/isolate_test.dart' show testIsolate; +export 'src/multipart_tests.dart' show testMultipartRequests; export 'src/multiple_clients_tests.dart' show testMultipleClients; export 'src/redirect_tests.dart' show testRedirect; export 'src/request_body_streamed_tests.dart' show testRequestBodyStreamed; @@ -67,6 +69,9 @@ export 'src/server_errors_test.dart' show testServerErrors; /// If [supportsFoldedHeaders] is `false` then the tests that assume that the /// [Client] can parse folded headers will be skipped. /// +/// If [supportsMultipartRequest] is `false` then tests that assume that +/// multipart requests can be sent will be skipped. +/// /// The tests are run against a series of HTTP servers that are started by the /// tests. If the tests are run in the browser, then the test servers are /// started in another process. Otherwise, the test servers are run in-process. @@ -80,6 +85,7 @@ void testAll( bool supportsFoldedHeaders = true, bool canSendCookieHeaders = false, bool canReceiveSetCookieHeaders = false, + bool supportsMultipartRequest = true, }) { testRequestBody(clientFactory()); testRequestBodyStreamed(clientFactory(), @@ -97,6 +103,8 @@ void testAll( testServerErrors(clientFactory()); testCompressedResponseBody(clientFactory()); testMultipleClients(clientFactory); + testMultipartRequests(clientFactory(), + supportsMultipartRequest: supportsMultipartRequest); testClose(clientFactory); testIsolate(clientFactory, canWorkInIsolates: canWorkInIsolates); testRequestCookies(clientFactory(), diff --git a/pkgs/http_client_conformance_tests/lib/src/multipart_server.dart b/pkgs/http_client_conformance_tests/lib/src/multipart_server.dart new file mode 100644 index 0000000000..90e4d8b1a7 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/multipart_server.dart @@ -0,0 +1,48 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:stream_channel/stream_channel.dart'; + +/// Starts an HTTP server that captures the request headers and body. +/// +/// Channel protocol: +/// On Startup: +/// - send port +/// On Request Received: +/// - send the received headers and request body +/// When Receive Anything: +/// - exit +void hybridMain(StreamChannel channel) async { + late HttpServer server; + + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + request.response.headers.set('Access-Control-Allow-Origin', '*'); + if (request.method == 'OPTIONS') { + // Handle a CORS preflight request: + // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests + request.response.headers + ..set('Access-Control-Allow-Methods', '*') + ..set('Access-Control-Allow-Headers', '*'); + } else { + final headers = >{}; + request.headers.forEach((field, value) { + headers[field] = value; + }); + final body = + await const Utf8Decoder().bind(request).fold('', (x, y) => '$x$y'); + channel.sink.add((headers, body)); + } + unawaited(request.response.close()); + }); + + channel.sink.add(server.port); + await channel + .stream.first; // Any writes indicates that the server should exit. + unawaited(server.close()); +} diff --git a/pkgs/http_client_conformance_tests/lib/src/multipart_server_vm.dart b/pkgs/http_client_conformance_tests/lib/src/multipart_server_vm.dart new file mode 100644 index 0000000000..3168e6c036 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/multipart_server_vm.dart @@ -0,0 +1,14 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; + +import 'multipart_server.dart'; + +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + +/// Starts the redirect test HTTP server in the same process. +Future> startServer() async { + final controller = StreamChannelController(sync: true); + hybridMain(controller.foreign); + return controller.local; +} diff --git a/pkgs/http_client_conformance_tests/lib/src/multipart_server_web.dart b/pkgs/http_client_conformance_tests/lib/src/multipart_server_web.dart new file mode 100644 index 0000000000..8d8e88108a --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/multipart_server_web.dart @@ -0,0 +1,11 @@ +// Generated by generate_server_wrappers.dart. Do not edit. + +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +export 'server_queue_helpers.dart' show StreamQueueOfNullableObjectExtension; + +/// Starts the redirect test HTTP server out-of-process. +Future> startServer() async => spawnHybridUri(Uri( + scheme: 'package', + path: 'http_client_conformance_tests/src/multipart_server.dart')); diff --git a/pkgs/http_client_conformance_tests/lib/src/multipart_tests.dart b/pkgs/http_client_conformance_tests/lib/src/multipart_tests.dart new file mode 100644 index 0000000000..c9ecd90f82 --- /dev/null +++ b/pkgs/http_client_conformance_tests/lib/src/multipart_tests.dart @@ -0,0 +1,51 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:async/async.dart'; +import 'package:http/http.dart'; +import 'package:stream_channel/stream_channel.dart'; +import 'package:test/test.dart'; + +import 'multipart_server_vm.dart' + if (dart.library.js_interop) 'multipart_server_web.dart'; + +/// Tests that the [Client] correctly sends [MultipartRequest]. +/// +/// If [supportsMultipartRequest] is `false` then tests that assume that +/// multipart requests can be sent will be skipped. +void testMultipartRequests(Client client, + {required bool supportsMultipartRequest}) async { + group('multipart requests', () { + late final String host; + late final StreamChannel httpServerChannel; + late final StreamQueue httpServerQueue; + + setUpAll(() async { + httpServerChannel = await startServer(); + httpServerQueue = StreamQueue(httpServerChannel.stream); + host = 'localhost:${await httpServerQueue.nextAsInt}'; + }); + tearDownAll(() => httpServerChannel.sink.add(null)); + + test('attached file', () async { + final request = MultipartRequest('POST', Uri.http(host, '')); + + request.files.add(MultipartFile.fromString('file1', 'Hello World')); + + await client.send(request); + final (headers, body) = + await httpServerQueue.next as (Map>, String); + expect(headers['content-length']!.single, '${request.contentLength}'); + expect(headers['content-type']!.single, + startsWith('multipart/form-data; boundary=')); + expect(body, contains('''content-type: text/plain; charset=utf-8\r +content-disposition: form-data; name="file1"\r +\r +Hello World''')); + }); + }, + skip: supportsMultipartRequest + ? false + : 'does not support multipart requests'); +} From 958b489b3aeb381ef35d8b02046776af9d50063f Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 26 Jun 2024 17:43:35 -0700 Subject: [PATCH 397/448] Call out more limitations of runWithClient (#1248) Towards #828 Add a section in the `runWithClient` doc that mentions HTTP requests which _aren't_ affected by usage of this API - specifically requests made through the SDK core libraries, or through instantiating specific client implementations. --- pkgs/http/lib/src/client.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index 7429ca8824..85f0a4022a 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -198,6 +198,10 @@ Client? get zoneClient { /// and the convenience HTTP functions (e.g. [http.get]). If [clientFactory] /// returns `Client()` then the default [Client] is used. /// +/// Only fresh `Client` instances using the default constructor are impacted. +/// HTTP requests made using `dart:io` or `dart:html` APIs, +/// or using specifically instantiated client implementations, are not affected. +/// /// When used in the context of Flutter, [runWithClient] should be called before /// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html) /// because Flutter runs in whatever [Zone] was current at the time that the From 19e79cc25a9374cdaef1f49df0aba892cc91f40e Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 27 Jun 2024 14:13:03 -0700 Subject: [PATCH 398/448] Document that runWithClient should not be used with flutter (#1249) --- pkgs/http/lib/src/client.dart | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index 85f0a4022a..dace470a75 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -202,34 +202,26 @@ Client? get zoneClient { /// HTTP requests made using `dart:io` or `dart:html` APIs, /// or using specifically instantiated client implementations, are not affected. /// -/// When used in the context of Flutter, [runWithClient] should be called before -/// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html) -/// because Flutter runs in whatever [Zone] was current at the time that the -/// bindings were initialized. -/// -/// [`runApp`](https://api.flutter.dev/flutter/widgets/runApp.html) calls -/// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html) -/// so the easiest approach is to call that in [body]: -/// ``` -/// void main() { -/// var clientFactory = Client.new; // Constructs the default client. -/// if (Platform.isAndroid) { -/// clientFactory = MyAndroidHttpClient.new; -/// } -/// runWithClient(() => runApp(const MyApp()), clientFactory); -/// } -/// ``` -/// /// If [runWithClient] is used and the environment defines /// `no_default_http_client=true` then generated binaries may be smaller e.g. /// ```shell -/// $ flutter build appbundle --dart-define=no_default_http_client=true ... /// $ dart compile exe --define=no_default_http_client=true ... /// ``` /// /// If `no_default_http_client=true` is set then any call to the [Client] /// factory (i.e. `Client()`) outside of the [Zone] created by [runWithClient] /// will throw [StateError]. +/// +/// > [!IMPORTANT] +/// > Flutter does not guarantee that callbacks are executed in a particular +/// > [Zone]. +/// > +/// > Instead of using [runWithClient], Flutter developers can use a framework, +/// > such as [`package:provider`](https://pub.dev/packages/provider), to make +/// > a [Client] available throughout their applications. +/// > +/// > See the +/// > [Flutter Http Example](https://github.com/dart-lang/http/tree/master/pkgs/flutter_http_example). R runWithClient(R Function() body, Client Function() clientFactory, {ZoneSpecification? zoneSpecification}) => runZoned(body, From ca76d772f271ec3918d6ba1dfeb8a83f97be5909 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 28 Jun 2024 14:05:19 -0700 Subject: [PATCH 399/448] Make it more clear to using use runWithClient in the Dart SDK. (#1250) --- pkgs/http/README.md | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/pkgs/http/README.md b/pkgs/http/README.md index 07c8208ec2..7cc9f43fbb 100644 --- a/pkgs/http/README.md +++ b/pkgs/http/README.md @@ -249,15 +249,22 @@ void main() { } ``` -In Flutter, you can use a one of many +When using the Flutter SDK, you can use a one of many [state management approaches][flutterstatemanagement]. -If you depend on code that uses top-level functions (e.g. `http.post`) or -calls the [`Client()`][clientconstructor] constructor, then you can use -[`runWithClient`][runwithclient] to ensure that the correct -`Client` is used. When an [Isolate][isolate] is spawned, it does not inherit -any variables from the calling Zone, so `runWithClient` needs to be used in -each Isolate that uses `package:http`. +> [!TIP] +> [The Flutter HTTP example application][flutterhttpexample] demonstrates +> how to make the configured [`Client`][client] available using +> [`package:provider`][provider] and +> [`package:http_image_provider`][http_image_provider]. + +When using the Dart SDK, you can use [`runWithClient`][runwithclient] to +ensure that the correct [`Client`][client] is used when explicit argument +passing is not an option. For example, if you depend on code that uses +top-level functions (e.g. `http.post`) or calls the +[`Client()`][clientconstructor] constructor. When an [Isolate][isolate] is +spawned, it does not inherit any variables from the calling Zone, so +`runWithClient` needs to be used in each Isolate that uses `package:http`. You can ensure that only the `Client` that you have explicitly configured is used by defining `no_default_http_client=true` in the environment. This will @@ -269,11 +276,6 @@ $ flutter build appbundle --dart-define=no_default_http_client=true ... $ dart compile exe --define=no_default_http_client=true ... ``` -> [!TIP] -> [The Flutter HTTP example application][flutterhttpexample] demonstrates -> how to make the configured [`Client`][client] available using -> [`package:provider`][provider] and [`package:http_image_provider`][http_image_provider]. - [browserclient]: https://pub.dev/documentation/http/latest/browser_client/BrowserClient-class.html [client]: https://pub.dev/documentation/http/latest/http/Client-class.html [clientconstructor]: https://pub.dev/documentation/http/latest/http/Client/Client.html From d7e710488d8899b21824661e9c82b03dbb921ca3 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 1 Jul 2024 14:16:10 -0700 Subject: [PATCH 400/448] Add an section explaining the benefits of using `package:ok_http`. (#1252) --- pkgs/ok_http/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pkgs/ok_http/README.md b/pkgs/ok_http/README.md index cca48a3079..6c21d824e7 100644 --- a/pkgs/ok_http/README.md +++ b/pkgs/ok_http/README.md @@ -4,6 +4,25 @@ An Android Flutter plugin that provides access to the [OkHttp][] HTTP client. +## Why use `package:ok_http`? + +### 👍 Increased compatibility and reduced disk profile + +`package:ok_http` is smaller and works on more devices than other packages. + +This size of the [example application][] APK file using different packages: + +| Package | APK Size (MiB) | +|-|-| +| **`ok_http`** | **20.3** | +| [`cronet_http`](https://pub.dev/packages/cronet_http) [^1] | 20.6 | +| [`cronet_http` (embedded)](https://pub.dev/packages/cronet_http#use-embedded-cronet) [^2] | 34.4 | +| `dart:io` [^3] | 20.4 | + +[^1]: Requires [Google Play Services][], which are not available on all devices. +[^2]: Embeds the Cronet HTTP library. +[^3]: Accessed through [`IOClient`](https://pub.dev/documentation/http/latest/io_client/IOClient-class.html). + ## Status: experimental **NOTE**: This package is currently experimental and published under the @@ -19,4 +38,6 @@ Your feedback is valuable and will help us evolve this package. For general feedback, suggestions, and comments, please file an issue in the [bug tracker](https://github.com/dart-lang/http/issues). +[example application]: https://github.com/dart-lang/http/tree/master/pkgs/flutter_http_example [OkHttp]: https://square.github.io/okhttp/ +[Google Play Services]: https://developers.google.com/android/guides/overview From 9d2c050a0850c53c63c38b2d769c5efe31806700 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 10:46:54 -0700 Subject: [PATCH 401/448] Bump the github-actions group across 1 directory with 4 updates (#1251) Bumps the github-actions group with 4 updates in the / directory: [actions/checkout](https://github.com/actions/checkout), [subosito/flutter-action](https://github.com/subosito/flutter-action), [reactivecircus/android-emulator-runner](https://github.com/reactivecircus/android-emulator-runner) and [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart). Updates `actions/checkout` from 4.1.1 to 4.1.7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/b4ffde65f46336ab88eb53be808477a3936bae11...692973e3d937129bcbf40652eb9f2f61becf3332) Updates `subosito/flutter-action` from 2.12.0 to 2.16.0 - [Release notes](https://github.com/subosito/flutter-action/releases) - [Commits](https://github.com/subosito/flutter-action/compare/2783a3f08e1baf891508463f8c6653c258246225...44ac965b96f18d999802d4b807e3256d5a3f9fa1) Updates `reactivecircus/android-emulator-runner` from 2.30.1 to 2.31.0 - [Release notes](https://github.com/reactivecircus/android-emulator-runner/releases) - [Changelog](https://github.com/ReactiveCircus/android-emulator-runner/blob/main/CHANGELOG.md) - [Commits](https://github.com/reactivecircus/android-emulator-runner/compare/6b0df4b0efb23bb0ec63d881db79aefbc976e4b2...77986be26589807b8ebab3fde7bbf5c60dabec32) Updates `dart-lang/setup-dart` from 1.6.4 to 1.6.5 - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/f0ead981b4d9a35b37f30d36160575d60931ec30...0a8a0fc875eb934c15d08629302413c671d3f672) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions - dependency-name: subosito/flutter-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: reactivecircus/android-emulator-runner dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cronet.yml | 6 +-- .github/workflows/cupertino.yml | 4 +- .github/workflows/dart.yml | 96 ++++++++++++++++----------------- .github/workflows/java.yml | 4 +- .github/workflows/okhttp.yaml | 6 +-- 5 files changed, 58 insertions(+), 58 deletions(-) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 40b51469be..c6ca3e47be 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -31,12 +31,12 @@ jobs: run: working-directory: pkgs/cronet_http steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 with: distribution: 'zulu' java-version: '17' - - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' - id: install @@ -49,7 +49,7 @@ jobs: if: always() && steps.install.outcome == 'success' run: flutter analyze --fatal-infos - name: Run tests - uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 + uses: reactivecircus/android-emulator-runner@77986be26589807b8ebab3fde7bbf5c60dabec32 if: always() && steps.install.outcome == 'success' with: # api-level/minSdkVersion should be help in sync in: diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index b790193875..e701c73395 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -33,8 +33,8 @@ jobs: # version. flutter-version: ["3.22.0", "any"] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: flutter-version: ${{ matrix.flutter-version }} channel: 'stable' diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index a294017b2b..00a651ede0 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -29,12 +29,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: mono_repo self validate run: dart pub global activate mono_repo 6.6.1 - name: mono_repo self validate @@ -54,12 +54,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.2.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_client_conformance_tests_pub_upgrade name: pkgs/http_client_conformance_tests; dart pub upgrade run: dart pub upgrade @@ -84,12 +84,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -132,12 +132,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.4.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_profile_pub_upgrade name: pkgs/http_profile; dart pub upgrade run: dart pub upgrade @@ -162,12 +162,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -228,12 +228,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -294,12 +294,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -324,12 +324,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -354,12 +354,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -393,12 +393,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -432,12 +432,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -471,12 +471,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -510,12 +510,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.3.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -549,12 +549,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: "3.4.0" - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_profile_pub_upgrade name: pkgs/http_profile; dart pub upgrade run: dart pub upgrade @@ -588,12 +588,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -627,12 +627,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -666,12 +666,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -714,12 +714,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -753,12 +753,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -792,12 +792,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -831,12 +831,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -870,12 +870,12 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -909,12 +909,12 @@ jobs: os:macos-latest;pub-cache-hosted os:macos-latest - name: Setup Flutter SDK - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -938,12 +938,12 @@ jobs: runs-on: windows-latest steps: - name: Setup Flutter SDK - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index fd0afc9639..f9ae20d336 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -29,8 +29,8 @@ jobs: run: working-directory: pkgs/java_http steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' - id: install diff --git a/.github/workflows/okhttp.yaml b/.github/workflows/okhttp.yaml index 6670fd2f8d..e20a039ce9 100644 --- a/.github/workflows/okhttp.yaml +++ b/.github/workflows/okhttp.yaml @@ -28,12 +28,12 @@ jobs: run: working-directory: pkgs/ok_http steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 with: distribution: 'zulu' java-version: '17' - - uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225 + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: channel: 'stable' - id: install @@ -46,7 +46,7 @@ jobs: if: always() && steps.install.outcome == 'success' run: flutter analyze --fatal-infos - name: Run tests - uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 + uses: reactivecircus/android-emulator-runner@77986be26589807b8ebab3fde7bbf5c60dabec32 if: always() && steps.install.outcome == 'success' with: # api-level/minSdkVersion should be help in sync in: From bd5eb10877113eba530529eaadfceedca9623381 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 2 Jul 2024 11:18:29 -0700 Subject: [PATCH 402/448] Upgrade to http_image_provider: 0.0.3 (#1253) --- pkgs/cronet_http/example/lib/main.dart | 2 +- pkgs/cronet_http/example/pubspec.yaml | 2 +- pkgs/cupertino_http/example/lib/main.dart | 2 +- pkgs/cupertino_http/example/pubspec.yaml | 2 +- pkgs/flutter_http_example/lib/main.dart | 2 +- pkgs/flutter_http_example/pubspec.yaml | 2 +- pkgs/ok_http/example/lib/main.dart | 2 +- pkgs/ok_http/example/pubspec.yaml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 1af8e9203f..62990e337d 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -142,7 +142,7 @@ class _BookListState extends State { key: ValueKey(widget.books[index].title), child: ListTile( leading: Image( - image: HttpImage( + image: HttpImageProvider( widget.books[index].imageUrl.replace(scheme: 'https'), client: context.read())), title: Text(widget.books[index].title), diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index 5d94a3944e..a2ed4b03cb 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - http_image_provider: ^0.0.2 + http_image_provider: ^0.0.3 provider: ^6.1.1 dev_dependencies: diff --git a/pkgs/cupertino_http/example/lib/main.dart b/pkgs/cupertino_http/example/lib/main.dart index 24436ea052..78fcb9c8ad 100644 --- a/pkgs/cupertino_http/example/lib/main.dart +++ b/pkgs/cupertino_http/example/lib/main.dart @@ -141,7 +141,7 @@ class _BookListState extends State { key: ValueKey(widget.books[index].title), child: ListTile( leading: Image( - image: HttpImage( + image: HttpImageProvider( widget.books[index].imageUrl.replace(scheme: 'https'), client: context.read())), title: Text(widget.books[index].title), diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index a57f39fd05..b074234bff 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - http_image_provider: ^0.0.2 + http_image_provider: ^0.0.3 provider: ^6.1.1 dev_dependencies: diff --git a/pkgs/flutter_http_example/lib/main.dart b/pkgs/flutter_http_example/lib/main.dart index 13d8bc24d8..899105b227 100644 --- a/pkgs/flutter_http_example/lib/main.dart +++ b/pkgs/flutter_http_example/lib/main.dart @@ -138,7 +138,7 @@ class _BookListState extends State { key: ValueKey(widget.books[index].title), child: ListTile( leading: Image( - image: HttpImage( + image: HttpImageProvider( widget.books[index].imageUrl.replace(scheme: 'https'), client: context.read())), title: Text(widget.books[index].title), diff --git a/pkgs/flutter_http_example/pubspec.yaml b/pkgs/flutter_http_example/pubspec.yaml index b3b3ef50f7..272f50d854 100644 --- a/pkgs/flutter_http_example/pubspec.yaml +++ b/pkgs/flutter_http_example/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - http_image_provider: ^0.0.2 + http_image_provider: ^0.0.3 provider: ^6.0.5 dev_dependencies: diff --git a/pkgs/ok_http/example/lib/main.dart b/pkgs/ok_http/example/lib/main.dart index 0fd1807ea0..e8177895ec 100644 --- a/pkgs/ok_http/example/lib/main.dart +++ b/pkgs/ok_http/example/lib/main.dart @@ -138,7 +138,7 @@ class _BookListState extends State { key: ValueKey(widget.books[index].title), child: ListTile( leading: Image( - image: HttpImage( + image: HttpImageProvider( widget.books[index].imageUrl.replace(scheme: 'https'), client: context.read())), title: Text(widget.books[index].title), diff --git a/pkgs/ok_http/example/pubspec.yaml b/pkgs/ok_http/example/pubspec.yaml index 313cd2bbda..f7c9dc1ecb 100644 --- a/pkgs/ok_http/example/pubspec.yaml +++ b/pkgs/ok_http/example/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - http_image_provider: ^0.0.2 + http_image_provider: ^0.0.3 ok_http: path: ../ provider: ^6.1.1 From 480322401545cec142a6368464aefdc8e867ca9c Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 3 Jul 2024 17:16:38 -0700 Subject: [PATCH 403/448] Clarify when Client.close must be called (#1255) --- pkgs/http/lib/src/client.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index dace470a75..6de5698104 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -148,8 +148,11 @@ abstract interface class Client { /// Closes the client and cleans up any resources associated with it. /// - /// It's important to close each client when it's done being used; failing to - /// do so can cause the Dart process to hang. + /// Some clients maintain a pool of network connections that will not be + /// disconnected until the client is closed. This may cause programs using + /// using the Dart SDK (`dart run`, `dart test`, `dart compile`, etc.) to + /// not terminate until the client is closed. Programs run using the Flutter + /// SDK can still terminate even with an active connection pool. /// /// Once [close] is called, no other methods should be called. If [close] is /// called while other asynchronous methods are running, the behavior is From f20cec7981f0259d0847fc7f378cbb982a4761bb Mon Sep 17 00:00:00 2001 From: Hossein Yousefi Date: Thu, 11 Jul 2024 23:50:33 +0200 Subject: [PATCH 404/448] Upgrade jni and jnigen to 0.10.1 and 0.10.0 (#1261) --- pkgs/cronet_http/CHANGELOG.md | 4 +- .../cronet_http/lib/src/jni/jni_bindings.dart | 849 +++++++++--------- pkgs/cronet_http/pubspec.yaml | 4 +- 3 files changed, 432 insertions(+), 425 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index ca4c0451d0..fc2f44fe5a 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,6 +1,8 @@ ## 1.3.2-wip -* Upgrade `package:jni` and `package:0.9.3` to fix method calling bugs. +* Upgrade `package:jni` to 0.10.1 and `package:jnigen` to 0.10.0 to fix method + calling bugs and a + [debug mode issue](https://github.com/dart-lang/http/issues/1260). ## 1.3.1 diff --git a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart index 2613ec8823..44b83c9ddf 100644 --- a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart +++ b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart @@ -1,6 +1,7 @@ // Autogenerated by jnigen. DO NOT EDIT! // ignore_for_file: annotate_overrides +// ignore_for_file: argument_type_not_assignable // ignore_for_file: camel_case_extensions // ignore_for_file: camel_case_types // ignore_for_file: constant_identifier_names @@ -9,8 +10,11 @@ // ignore_for_file: lines_longer_than_80_chars // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: non_constant_identifier_names +// ignore_for_file: only_throw_errors // ignore_for_file: overridden_fields +// ignore_for_file: prefer_double_quotes // ignore_for_file: unnecessary_cast +// ignore_for_file: unnecessary_parenthesis // ignore_for_file: unused_element // ignore_for_file: unused_field // ignore_for_file: unused_import @@ -18,10 +22,11 @@ // ignore_for_file: unused_shown_name // ignore_for_file: use_super_parameters -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; +import 'dart:ffi' as ffi; +import 'dart:isolate' show ReceivePort; + +import 'package:jni/internal_helpers_for_jnigen.dart'; +import 'package:jni/jni.dart' as jni; /// from: io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { @@ -34,14 +39,14 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { ) : super.fromReference(reference); static final _class = jni.JClass.forName( - r"io/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface"); + r'io/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface'); /// The type which includes information such as the signature of this class. static const type = $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType(); static final _id_onRedirectReceived = _class.instanceMethodId( - r"onRedirectReceived", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V", + r'onRedirectReceived', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V', ); static final _onRedirectReceived = ProtectedJniExtensions.lookup< @@ -54,7 +59,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -79,8 +84,8 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { } static final _id_onResponseStarted = _class.instanceMethodId( - r"onResponseStarted", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + r'onResponseStarted', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); static final _onResponseStarted = ProtectedJniExtensions.lookup< @@ -92,7 +97,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -111,8 +116,8 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { } static final _id_onReadCompleted = _class.instanceMethodId( - r"onReadCompleted", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V", + r'onReadCompleted', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V', ); static final _onReadCompleted = ProtectedJniExtensions.lookup< @@ -125,7 +130,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -150,8 +155,8 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { } static final _id_onSucceeded = _class.instanceMethodId( - r"onSucceeded", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + r'onSucceeded', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); static final _onSucceeded = ProtectedJniExtensions.lookup< @@ -163,7 +168,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -179,8 +184,8 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { } static final _id_onFailed = _class.instanceMethodId( - r"onFailed", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V", + r'onFailed', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V', ); static final _onFailed = ProtectedJniExtensions.lookup< @@ -193,7 +198,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -251,7 +256,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; if ($d == - r"onRedirectReceived(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V") { + r'onRedirectReceived(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V') { _$impls[$p]!.onRedirectReceived( $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), @@ -260,7 +265,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { return jni.nullptr; } if ($d == - r"onResponseStarted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V") { + r'onResponseStarted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V') { _$impls[$p]!.onResponseStarted( $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), @@ -268,7 +273,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { return jni.nullptr; } if ($d == - r"onReadCompleted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V") { + r'onReadCompleted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V') { _$impls[$p]!.onReadCompleted( $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), @@ -277,7 +282,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { return jni.nullptr; } if ($d == - r"onSucceeded(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V") { + r'onSucceeded(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V') { _$impls[$p]!.onSucceeded( $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), @@ -285,7 +290,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { return jni.nullptr; } if ($d == - r"onFailed(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V") { + r'onFailed(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V') { _$impls[$p]!.onFailed( $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), @@ -306,7 +311,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { final $x = UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromReference( ProtectedJniExtensions.newPortProxy( - r"io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface", + r'io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface', $p, _$invokePointer, ), @@ -423,7 +428,7 @@ final class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType @override String get signature => - r"Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;"; + r'Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;'; @override UrlRequestCallbackProxy_UrlRequestCallbackInterface fromReference( @@ -459,12 +464,12 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { ) : super.fromReference(reference); static final _class = jni.JClass.forName( - r"io/flutter/plugins/cronet_http/UrlRequestCallbackProxy"); + r'io/flutter/plugins/cronet_http/UrlRequestCallbackProxy'); /// The type which includes information such as the signature of this class. static const type = $UrlRequestCallbackProxyType(); static final _id_new1 = _class.constructorId( - r"(Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;)V", + r'(Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -473,7 +478,7 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -492,8 +497,8 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { } static final _id_getCallback = _class.instanceMethodId( - r"getCallback", - r"()Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;", + r'getCallback', + r'()Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;', ); static final _getCallback = ProtectedJniExtensions.lookup< @@ -501,7 +506,7 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -517,8 +522,8 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { } static final _id_onRedirectReceived = _class.instanceMethodId( - r"onRedirectReceived", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V", + r'onRedirectReceived', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V', ); static final _onRedirectReceived = ProtectedJniExtensions.lookup< @@ -531,7 +536,7 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -556,8 +561,8 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { } static final _id_onResponseStarted = _class.instanceMethodId( - r"onResponseStarted", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + r'onResponseStarted', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); static final _onResponseStarted = ProtectedJniExtensions.lookup< @@ -569,7 +574,7 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -588,8 +593,8 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { } static final _id_onReadCompleted = _class.instanceMethodId( - r"onReadCompleted", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V", + r'onReadCompleted', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V', ); static final _onReadCompleted = ProtectedJniExtensions.lookup< @@ -602,7 +607,7 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -627,8 +632,8 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { } static final _id_onSucceeded = _class.instanceMethodId( - r"onSucceeded", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + r'onSucceeded', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); static final _onSucceeded = ProtectedJniExtensions.lookup< @@ -640,7 +645,7 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -656,8 +661,8 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { } static final _id_onFailed = _class.instanceMethodId( - r"onFailed", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V", + r'onFailed', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V', ); static final _onFailed = ProtectedJniExtensions.lookup< @@ -670,7 +675,7 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -701,7 +706,7 @@ final class $UrlRequestCallbackProxyType @override String get signature => - r"Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy;"; + r'Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy;'; @override UrlRequestCallbackProxy fromReference(jni.JReference reference) => @@ -732,12 +737,12 @@ class URL extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"java/net/URL"); + static final _class = jni.JClass.forName(r'java/net/URL'); /// The type which includes information such as the signature of this class. static const type = $URLType(); static final _id_new0 = _class.constructorId( - r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V", + r'(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -751,7 +756,7 @@ class URL extends jni.JObject { ffi.Pointer, $Int32, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -780,7 +785,7 @@ class URL extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", + r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -793,7 +798,7 @@ class URL extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -819,7 +824,7 @@ class URL extends jni.JObject { } static final _id_new2 = _class.constructorId( - r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V", + r'(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V', ); static final _new2 = ProtectedJniExtensions.lookup< @@ -834,7 +839,7 @@ class URL extends jni.JObject { $Int32, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -866,7 +871,7 @@ class URL extends jni.JObject { } static final _id_new3 = _class.constructorId( - r"(Ljava/lang/String;)V", + r'(Ljava/lang/String;)V', ); static final _new3 = ProtectedJniExtensions.lookup< @@ -875,7 +880,7 @@ class URL extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -891,7 +896,7 @@ class URL extends jni.JObject { } static final _id_new4 = _class.constructorId( - r"(Ljava/net/URL;Ljava/lang/String;)V", + r'(Ljava/net/URL;Ljava/lang/String;)V', ); static final _new4 = ProtectedJniExtensions.lookup< @@ -903,7 +908,7 @@ class URL extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -923,7 +928,7 @@ class URL extends jni.JObject { } static final _id_new5 = _class.constructorId( - r"(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V", + r'(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V', ); static final _new5 = ProtectedJniExtensions.lookup< @@ -936,7 +941,7 @@ class URL extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -962,8 +967,8 @@ class URL extends jni.JObject { } static final _id_getQuery = _class.instanceMethodId( - r"getQuery", - r"()Ljava/lang/String;", + r'getQuery', + r'()Ljava/lang/String;', ); static final _getQuery = ProtectedJniExtensions.lookup< @@ -971,7 +976,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -986,8 +991,8 @@ class URL extends jni.JObject { } static final _id_getPath = _class.instanceMethodId( - r"getPath", - r"()Ljava/lang/String;", + r'getPath', + r'()Ljava/lang/String;', ); static final _getPath = ProtectedJniExtensions.lookup< @@ -995,7 +1000,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1010,8 +1015,8 @@ class URL extends jni.JObject { } static final _id_getUserInfo = _class.instanceMethodId( - r"getUserInfo", - r"()Ljava/lang/String;", + r'getUserInfo', + r'()Ljava/lang/String;', ); static final _getUserInfo = ProtectedJniExtensions.lookup< @@ -1019,7 +1024,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1034,8 +1039,8 @@ class URL extends jni.JObject { } static final _id_getAuthority = _class.instanceMethodId( - r"getAuthority", - r"()Ljava/lang/String;", + r'getAuthority', + r'()Ljava/lang/String;', ); static final _getAuthority = ProtectedJniExtensions.lookup< @@ -1043,7 +1048,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1059,8 +1064,8 @@ class URL extends jni.JObject { } static final _id_getPort = _class.instanceMethodId( - r"getPort", - r"()I", + r'getPort', + r'()I', ); static final _getPort = ProtectedJniExtensions.lookup< @@ -1068,7 +1073,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1081,8 +1086,8 @@ class URL extends jni.JObject { } static final _id_getDefaultPort = _class.instanceMethodId( - r"getDefaultPort", - r"()I", + r'getDefaultPort', + r'()I', ); static final _getDefaultPort = ProtectedJniExtensions.lookup< @@ -1090,7 +1095,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1105,8 +1110,8 @@ class URL extends jni.JObject { } static final _id_getProtocol = _class.instanceMethodId( - r"getProtocol", - r"()Ljava/lang/String;", + r'getProtocol', + r'()Ljava/lang/String;', ); static final _getProtocol = ProtectedJniExtensions.lookup< @@ -1114,7 +1119,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1129,8 +1134,8 @@ class URL extends jni.JObject { } static final _id_getHost = _class.instanceMethodId( - r"getHost", - r"()Ljava/lang/String;", + r'getHost', + r'()Ljava/lang/String;', ); static final _getHost = ProtectedJniExtensions.lookup< @@ -1138,7 +1143,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1153,8 +1158,8 @@ class URL extends jni.JObject { } static final _id_getFile = _class.instanceMethodId( - r"getFile", - r"()Ljava/lang/String;", + r'getFile', + r'()Ljava/lang/String;', ); static final _getFile = ProtectedJniExtensions.lookup< @@ -1162,7 +1167,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1177,8 +1182,8 @@ class URL extends jni.JObject { } static final _id_getRef = _class.instanceMethodId( - r"getRef", - r"()Ljava/lang/String;", + r'getRef', + r'()Ljava/lang/String;', ); static final _getRef = ProtectedJniExtensions.lookup< @@ -1186,7 +1191,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1201,8 +1206,8 @@ class URL extends jni.JObject { } static final _id_equals = _class.instanceMethodId( - r"equals", - r"(Ljava/lang/Object;)Z", + r'equals', + r'(Ljava/lang/Object;)Z', ); static final _equals = ProtectedJniExtensions.lookup< @@ -1211,7 +1216,7 @@ class URL extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallBooleanMethod") + 'globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1226,8 +1231,8 @@ class URL extends jni.JObject { } static final _id_hashCode1 = _class.instanceMethodId( - r"hashCode", - r"()I", + r'hashCode', + r'()I', ); static final _hashCode1 = ProtectedJniExtensions.lookup< @@ -1235,7 +1240,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1249,8 +1254,8 @@ class URL extends jni.JObject { } static final _id_sameFile = _class.instanceMethodId( - r"sameFile", - r"(Ljava/net/URL;)Z", + r'sameFile', + r'(Ljava/net/URL;)Z', ); static final _sameFile = ProtectedJniExtensions.lookup< @@ -1259,7 +1264,7 @@ class URL extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallBooleanMethod") + 'globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1274,8 +1279,8 @@ class URL extends jni.JObject { } static final _id_toString1 = _class.instanceMethodId( - r"toString", - r"()Ljava/lang/String;", + r'toString', + r'()Ljava/lang/String;', ); static final _toString1 = ProtectedJniExtensions.lookup< @@ -1283,7 +1288,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1298,8 +1303,8 @@ class URL extends jni.JObject { } static final _id_toExternalForm = _class.instanceMethodId( - r"toExternalForm", - r"()Ljava/lang/String;", + r'toExternalForm', + r'()Ljava/lang/String;', ); static final _toExternalForm = ProtectedJniExtensions.lookup< @@ -1307,7 +1312,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1323,8 +1328,8 @@ class URL extends jni.JObject { } static final _id_toURI = _class.instanceMethodId( - r"toURI", - r"()Ljava/net/URI;", + r'toURI', + r'()Ljava/net/URI;', ); static final _toURI = ProtectedJniExtensions.lookup< @@ -1332,7 +1337,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1347,8 +1352,8 @@ class URL extends jni.JObject { } static final _id_openConnection = _class.instanceMethodId( - r"openConnection", - r"()Ljava/net/URLConnection;", + r'openConnection', + r'()Ljava/net/URLConnection;', ); static final _openConnection = ProtectedJniExtensions.lookup< @@ -1356,7 +1361,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1372,8 +1377,8 @@ class URL extends jni.JObject { } static final _id_openConnection1 = _class.instanceMethodId( - r"openConnection", - r"(Ljava/net/Proxy;)Ljava/net/URLConnection;", + r'openConnection', + r'(Ljava/net/Proxy;)Ljava/net/URLConnection;', ); static final _openConnection1 = ProtectedJniExtensions.lookup< @@ -1382,7 +1387,7 @@ class URL extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1398,8 +1403,8 @@ class URL extends jni.JObject { } static final _id_openStream = _class.instanceMethodId( - r"openStream", - r"()Ljava/io/InputStream;", + r'openStream', + r'()Ljava/io/InputStream;', ); static final _openStream = ProtectedJniExtensions.lookup< @@ -1407,7 +1412,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1422,8 +1427,8 @@ class URL extends jni.JObject { } static final _id_getContent = _class.instanceMethodId( - r"getContent", - r"()Ljava/lang/Object;", + r'getContent', + r'()Ljava/lang/Object;', ); static final _getContent = ProtectedJniExtensions.lookup< @@ -1431,7 +1436,7 @@ class URL extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1446,8 +1451,8 @@ class URL extends jni.JObject { } static final _id_getContent1 = _class.instanceMethodId( - r"getContent", - r"([Ljava/lang/Class;)Ljava/lang/Object;", + r'getContent', + r'([Ljava/lang/Class;)Ljava/lang/Object;', ); static final _getContent1 = ProtectedJniExtensions.lookup< @@ -1456,7 +1461,7 @@ class URL extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1472,8 +1477,8 @@ class URL extends jni.JObject { } static final _id_setURLStreamHandlerFactory = _class.staticMethodId( - r"setURLStreamHandlerFactory", - r"(Ljava/net/URLStreamHandlerFactory;)V", + r'setURLStreamHandlerFactory', + r'(Ljava/net/URLStreamHandlerFactory;)V', ); static final _setURLStreamHandlerFactory = ProtectedJniExtensions.lookup< @@ -1482,7 +1487,7 @@ class URL extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticVoidMethod") + 'globalEnv_CallStaticVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1503,7 +1508,7 @@ final class $URLType extends jni.JObjType { const $URLType(); @override - String get signature => r"Ljava/net/URL;"; + String get signature => r'Ljava/net/URL;'; @override URL fromReference(jni.JReference reference) => URL.fromReference(reference); @@ -1532,19 +1537,19 @@ class Executors extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"java/util/concurrent/Executors"); + static final _class = jni.JClass.forName(r'java/util/concurrent/Executors'); /// The type which includes information such as the signature of this class. static const type = $ExecutorsType(); static final _id_newFixedThreadPool = _class.staticMethodId( - r"newFixedThreadPool", - r"(I)Ljava/util/concurrent/ExecutorService;", + r'newFixedThreadPool', + r'(I)Ljava/util/concurrent/ExecutorService;', ); static final _newFixedThreadPool = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>("globalEnv_CallStaticObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -1560,14 +1565,14 @@ class Executors extends jni.JObject { } static final _id_newWorkStealingPool = _class.staticMethodId( - r"newWorkStealingPool", - r"(I)Ljava/util/concurrent/ExecutorService;", + r'newWorkStealingPool', + r'(I)Ljava/util/concurrent/ExecutorService;', ); static final _newWorkStealingPool = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>("globalEnv_CallStaticObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -1583,8 +1588,8 @@ class Executors extends jni.JObject { } static final _id_newWorkStealingPool1 = _class.staticMethodId( - r"newWorkStealingPool", - r"()Ljava/util/concurrent/ExecutorService;", + r'newWorkStealingPool', + r'()Ljava/util/concurrent/ExecutorService;', ); static final _newWorkStealingPool1 = ProtectedJniExtensions.lookup< @@ -1592,7 +1597,7 @@ class Executors extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallStaticObjectMethod") + )>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1608,8 +1613,8 @@ class Executors extends jni.JObject { } static final _id_newFixedThreadPool1 = _class.staticMethodId( - r"newFixedThreadPool", - r"(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;", + r'newFixedThreadPool', + r'(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;', ); static final _newFixedThreadPool1 = ProtectedJniExtensions.lookup< @@ -1618,7 +1623,7 @@ class Executors extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<($Int32, ffi.Pointer)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, ffi.Pointer)>(); @@ -1638,8 +1643,8 @@ class Executors extends jni.JObject { } static final _id_newSingleThreadExecutor = _class.staticMethodId( - r"newSingleThreadExecutor", - r"()Ljava/util/concurrent/ExecutorService;", + r'newSingleThreadExecutor', + r'()Ljava/util/concurrent/ExecutorService;', ); static final _newSingleThreadExecutor = ProtectedJniExtensions.lookup< @@ -1647,7 +1652,7 @@ class Executors extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallStaticObjectMethod") + )>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1663,8 +1668,8 @@ class Executors extends jni.JObject { } static final _id_newSingleThreadExecutor1 = _class.staticMethodId( - r"newSingleThreadExecutor", - r"(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;", + r'newSingleThreadExecutor', + r'(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;', ); static final _newSingleThreadExecutor1 = ProtectedJniExtensions.lookup< @@ -1673,7 +1678,7 @@ class Executors extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1691,8 +1696,8 @@ class Executors extends jni.JObject { } static final _id_newCachedThreadPool = _class.staticMethodId( - r"newCachedThreadPool", - r"()Ljava/util/concurrent/ExecutorService;", + r'newCachedThreadPool', + r'()Ljava/util/concurrent/ExecutorService;', ); static final _newCachedThreadPool = ProtectedJniExtensions.lookup< @@ -1700,7 +1705,7 @@ class Executors extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallStaticObjectMethod") + )>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1716,8 +1721,8 @@ class Executors extends jni.JObject { } static final _id_newCachedThreadPool1 = _class.staticMethodId( - r"newCachedThreadPool", - r"(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;", + r'newCachedThreadPool', + r'(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;', ); static final _newCachedThreadPool1 = ProtectedJniExtensions.lookup< @@ -1726,7 +1731,7 @@ class Executors extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1744,8 +1749,8 @@ class Executors extends jni.JObject { } static final _id_newSingleThreadScheduledExecutor = _class.staticMethodId( - r"newSingleThreadScheduledExecutor", - r"()Ljava/util/concurrent/ScheduledExecutorService;", + r'newSingleThreadScheduledExecutor', + r'()Ljava/util/concurrent/ScheduledExecutorService;', ); static final _newSingleThreadScheduledExecutor = @@ -1754,7 +1759,7 @@ class Executors extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallStaticObjectMethod") + )>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1770,8 +1775,8 @@ class Executors extends jni.JObject { } static final _id_newSingleThreadScheduledExecutor1 = _class.staticMethodId( - r"newSingleThreadScheduledExecutor", - r"(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;", + r'newSingleThreadScheduledExecutor', + r'(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;', ); static final _newSingleThreadScheduledExecutor1 = @@ -1781,7 +1786,7 @@ class Executors extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1799,14 +1804,14 @@ class Executors extends jni.JObject { } static final _id_newScheduledThreadPool = _class.staticMethodId( - r"newScheduledThreadPool", - r"(I)Ljava/util/concurrent/ScheduledExecutorService;", + r'newScheduledThreadPool', + r'(I)Ljava/util/concurrent/ScheduledExecutorService;', ); static final _newScheduledThreadPool = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>("globalEnv_CallStaticObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -1822,8 +1827,8 @@ class Executors extends jni.JObject { } static final _id_newScheduledThreadPool1 = _class.staticMethodId( - r"newScheduledThreadPool", - r"(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;", + r'newScheduledThreadPool', + r'(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;', ); static final _newScheduledThreadPool1 = ProtectedJniExtensions.lookup< @@ -1832,7 +1837,7 @@ class Executors extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<($Int32, ffi.Pointer)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, ffi.Pointer)>(); @@ -1852,8 +1857,8 @@ class Executors extends jni.JObject { } static final _id_unconfigurableExecutorService = _class.staticMethodId( - r"unconfigurableExecutorService", - r"(Ljava/util/concurrent/ExecutorService;)Ljava/util/concurrent/ExecutorService;", + r'unconfigurableExecutorService', + r'(Ljava/util/concurrent/ExecutorService;)Ljava/util/concurrent/ExecutorService;', ); static final _unconfigurableExecutorService = ProtectedJniExtensions.lookup< @@ -1862,7 +1867,7 @@ class Executors extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1881,8 +1886,8 @@ class Executors extends jni.JObject { static final _id_unconfigurableScheduledExecutorService = _class.staticMethodId( - r"unconfigurableScheduledExecutorService", - r"(Ljava/util/concurrent/ScheduledExecutorService;)Ljava/util/concurrent/ScheduledExecutorService;", + r'unconfigurableScheduledExecutorService', + r'(Ljava/util/concurrent/ScheduledExecutorService;)Ljava/util/concurrent/ScheduledExecutorService;', ); static final _unconfigurableScheduledExecutorService = @@ -1892,7 +1897,7 @@ class Executors extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1910,8 +1915,8 @@ class Executors extends jni.JObject { } static final _id_defaultThreadFactory = _class.staticMethodId( - r"defaultThreadFactory", - r"()Ljava/util/concurrent/ThreadFactory;", + r'defaultThreadFactory', + r'()Ljava/util/concurrent/ThreadFactory;', ); static final _defaultThreadFactory = ProtectedJniExtensions.lookup< @@ -1919,7 +1924,7 @@ class Executors extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallStaticObjectMethod") + )>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1935,8 +1940,8 @@ class Executors extends jni.JObject { } static final _id_privilegedThreadFactory = _class.staticMethodId( - r"privilegedThreadFactory", - r"()Ljava/util/concurrent/ThreadFactory;", + r'privilegedThreadFactory', + r'()Ljava/util/concurrent/ThreadFactory;', ); static final _privilegedThreadFactory = ProtectedJniExtensions.lookup< @@ -1944,7 +1949,7 @@ class Executors extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallStaticObjectMethod") + )>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1960,8 +1965,8 @@ class Executors extends jni.JObject { } static final _id_callable = _class.staticMethodId( - r"callable", - r"(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Callable;", + r'callable', + r'(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Callable;', ); static final _callable = ProtectedJniExtensions.lookup< @@ -1973,7 +1978,7 @@ class Executors extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1994,8 +1999,8 @@ class Executors extends jni.JObject { } static final _id_callable1 = _class.staticMethodId( - r"callable", - r"(Ljava/lang/Runnable;)Ljava/util/concurrent/Callable;", + r'callable', + r'(Ljava/lang/Runnable;)Ljava/util/concurrent/Callable;', ); static final _callable1 = ProtectedJniExtensions.lookup< @@ -2004,7 +2009,7 @@ class Executors extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2020,8 +2025,8 @@ class Executors extends jni.JObject { } static final _id_callable2 = _class.staticMethodId( - r"callable", - r"(Ljava/security/PrivilegedAction;)Ljava/util/concurrent/Callable;", + r'callable', + r'(Ljava/security/PrivilegedAction;)Ljava/util/concurrent/Callable;', ); static final _callable2 = ProtectedJniExtensions.lookup< @@ -2030,7 +2035,7 @@ class Executors extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2048,8 +2053,8 @@ class Executors extends jni.JObject { } static final _id_callable3 = _class.staticMethodId( - r"callable", - r"(Ljava/security/PrivilegedExceptionAction;)Ljava/util/concurrent/Callable;", + r'callable', + r'(Ljava/security/PrivilegedExceptionAction;)Ljava/util/concurrent/Callable;', ); static final _callable3 = ProtectedJniExtensions.lookup< @@ -2058,7 +2063,7 @@ class Executors extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2076,8 +2081,8 @@ class Executors extends jni.JObject { } static final _id_privilegedCallable = _class.staticMethodId( - r"privilegedCallable", - r"(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;", + r'privilegedCallable', + r'(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;', ); static final _privilegedCallable = ProtectedJniExtensions.lookup< @@ -2086,7 +2091,7 @@ class Executors extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2106,8 +2111,8 @@ class Executors extends jni.JObject { static final _id_privilegedCallableUsingCurrentClassLoader = _class.staticMethodId( - r"privilegedCallableUsingCurrentClassLoader", - r"(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;", + r'privilegedCallableUsingCurrentClassLoader', + r'(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;', ); static final _privilegedCallableUsingCurrentClassLoader = @@ -2117,7 +2122,7 @@ class Executors extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2141,7 +2146,7 @@ final class $ExecutorsType extends jni.JObjType { const $ExecutorsType(); @override - String get signature => r"Ljava/util/concurrent/Executors;"; + String get signature => r'Ljava/util/concurrent/Executors;'; @override Executors fromReference(jni.JReference reference) => @@ -2172,12 +2177,12 @@ class CronetEngine_Builder_LibraryLoader extends jni.JObject { ) : super.fromReference(reference); static final _class = jni.JClass.forName( - r"org/chromium/net/CronetEngine$Builder$LibraryLoader"); + r'org/chromium/net/CronetEngine$Builder$LibraryLoader'); /// The type which includes information such as the signature of this class. static const type = $CronetEngine_Builder_LibraryLoaderType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -2185,7 +2190,7 @@ class CronetEngine_Builder_LibraryLoader extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2201,8 +2206,8 @@ class CronetEngine_Builder_LibraryLoader extends jni.JObject { } static final _id_loadLibrary = _class.instanceMethodId( - r"loadLibrary", - r"(Ljava/lang/String;)V", + r'loadLibrary', + r'(Ljava/lang/String;)V', ); static final _loadLibrary = ProtectedJniExtensions.lookup< @@ -2211,7 +2216,7 @@ class CronetEngine_Builder_LibraryLoader extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2232,7 +2237,7 @@ final class $CronetEngine_Builder_LibraryLoaderType @override String get signature => - r"Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;"; + r'Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;'; @override CronetEngine_Builder_LibraryLoader fromReference(jni.JReference reference) => @@ -2264,13 +2269,13 @@ class CronetEngine_Builder extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"org/chromium/net/CronetEngine$Builder"); + jni.JClass.forName(r'org/chromium/net/CronetEngine$Builder'); /// The type which includes information such as the signature of this class. static const type = $CronetEngine_BuilderType(); static final _id_mBuilderDelegate = _class.instanceFieldId( - r"mBuilderDelegate", - r"Lorg/chromium/net/ICronetEngineBuilder;", + r'mBuilderDelegate', + r'Lorg/chromium/net/ICronetEngineBuilder;', ); /// from: protected final org.chromium.net.ICronetEngineBuilder mBuilderDelegate @@ -2290,7 +2295,7 @@ class CronetEngine_Builder extends jni.JObject { /// from: static public final int HTTP_CACHE_DISK static const HTTP_CACHE_DISK = 3; static final _id_new0 = _class.constructorId( - r"(Landroid/content/Context;)V", + r'(Landroid/content/Context;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -2299,7 +2304,7 @@ class CronetEngine_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2315,7 +2320,7 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"(Lorg/chromium/net/ICronetEngineBuilder;)V", + r'(Lorg/chromium/net/ICronetEngineBuilder;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -2324,7 +2329,7 @@ class CronetEngine_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2342,8 +2347,8 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_getDefaultUserAgent = _class.instanceMethodId( - r"getDefaultUserAgent", - r"()Ljava/lang/String;", + r'getDefaultUserAgent', + r'()Ljava/lang/String;', ); static final _getDefaultUserAgent = ProtectedJniExtensions.lookup< @@ -2351,7 +2356,7 @@ class CronetEngine_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2367,8 +2372,8 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_setUserAgent = _class.instanceMethodId( - r"setUserAgent", - r"(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;", + r'setUserAgent', + r'(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;', ); static final _setUserAgent = ProtectedJniExtensions.lookup< @@ -2377,7 +2382,7 @@ class CronetEngine_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2393,8 +2398,8 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_setStoragePath = _class.instanceMethodId( - r"setStoragePath", - r"(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;", + r'setStoragePath', + r'(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;', ); static final _setStoragePath = ProtectedJniExtensions.lookup< @@ -2403,7 +2408,7 @@ class CronetEngine_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2419,8 +2424,8 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_setLibraryLoader = _class.instanceMethodId( - r"setLibraryLoader", - r"(Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;)Lorg/chromium/net/CronetEngine$Builder;", + r'setLibraryLoader', + r'(Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;)Lorg/chromium/net/CronetEngine$Builder;', ); static final _setLibraryLoader = ProtectedJniExtensions.lookup< @@ -2429,7 +2434,7 @@ class CronetEngine_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2447,14 +2452,14 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_enableQuic = _class.instanceMethodId( - r"enableQuic", - r"(Z)Lorg/chromium/net/CronetEngine$Builder;", + r'enableQuic', + r'(Z)Lorg/chromium/net/CronetEngine$Builder;', ); static final _enableQuic = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2470,14 +2475,14 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_enableHttp2 = _class.instanceMethodId( - r"enableHttp2", - r"(Z)Lorg/chromium/net/CronetEngine$Builder;", + r'enableHttp2', + r'(Z)Lorg/chromium/net/CronetEngine$Builder;', ); static final _enableHttp2 = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2493,14 +2498,14 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_enableSdch = _class.instanceMethodId( - r"enableSdch", - r"(Z)Lorg/chromium/net/CronetEngine$Builder;", + r'enableSdch', + r'(Z)Lorg/chromium/net/CronetEngine$Builder;', ); static final _enableSdch = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2516,14 +2521,14 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_enableBrotli = _class.instanceMethodId( - r"enableBrotli", - r"(Z)Lorg/chromium/net/CronetEngine$Builder;", + r'enableBrotli', + r'(Z)Lorg/chromium/net/CronetEngine$Builder;', ); static final _enableBrotli = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2539,15 +2544,15 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_enableHttpCache = _class.instanceMethodId( - r"enableHttpCache", - r"(IJ)Lorg/chromium/net/CronetEngine$Builder;", + r'enableHttpCache', + r'(IJ)Lorg/chromium/net/CronetEngine$Builder;', ); static final _enableHttpCache = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<($Int32, ffi.Int64)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int, int)>(); @@ -2564,8 +2569,8 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_addQuicHint = _class.instanceMethodId( - r"addQuicHint", - r"(Ljava/lang/String;II)Lorg/chromium/net/CronetEngine$Builder;", + r'addQuicHint', + r'(Ljava/lang/String;II)Lorg/chromium/net/CronetEngine$Builder;', ); static final _addQuicHint = ProtectedJniExtensions.lookup< @@ -2574,7 +2579,7 @@ class CronetEngine_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, int)>(); @@ -2592,8 +2597,8 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_addPublicKeyPins = _class.instanceMethodId( - r"addPublicKeyPins", - r"(Ljava/lang/String;Ljava/util/Set;ZLjava/util/Date;)Lorg/chromium/net/CronetEngine$Builder;", + r'addPublicKeyPins', + r'(Ljava/lang/String;Ljava/util/Set;ZLjava/util/Date;)Lorg/chromium/net/CronetEngine$Builder;', ); static final _addPublicKeyPins = ProtectedJniExtensions.lookup< @@ -2607,7 +2612,7 @@ class CronetEngine_Builder extends jni.JObject { ffi.Pointer, $Int32, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2637,8 +2642,8 @@ class CronetEngine_Builder extends jni.JObject { static final _id_enablePublicKeyPinningBypassForLocalTrustAnchors = _class.instanceMethodId( - r"enablePublicKeyPinningBypassForLocalTrustAnchors", - r"(Z)Lorg/chromium/net/CronetEngine$Builder;", + r'enablePublicKeyPinningBypassForLocalTrustAnchors', + r'(Z)Lorg/chromium/net/CronetEngine$Builder;', ); static final _enablePublicKeyPinningBypassForLocalTrustAnchors = @@ -2647,7 +2652,7 @@ class CronetEngine_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2666,8 +2671,8 @@ class CronetEngine_Builder extends jni.JObject { } static final _id_build = _class.instanceMethodId( - r"build", - r"()Lorg/chromium/net/CronetEngine;", + r'build', + r'()Lorg/chromium/net/CronetEngine;', ); static final _build = ProtectedJniExtensions.lookup< @@ -2675,7 +2680,7 @@ class CronetEngine_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2695,7 +2700,7 @@ final class $CronetEngine_BuilderType const $CronetEngine_BuilderType(); @override - String get signature => r"Lorg/chromium/net/CronetEngine$Builder;"; + String get signature => r'Lorg/chromium/net/CronetEngine$Builder;'; @override CronetEngine_Builder fromReference(jni.JReference reference) => @@ -2726,12 +2731,12 @@ class CronetEngine extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"org/chromium/net/CronetEngine"); + static final _class = jni.JClass.forName(r'org/chromium/net/CronetEngine'); /// The type which includes information such as the signature of this class. static const type = $CronetEngineType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -2739,7 +2744,7 @@ class CronetEngine extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2755,8 +2760,8 @@ class CronetEngine extends jni.JObject { } static final _id_getVersionString = _class.instanceMethodId( - r"getVersionString", - r"()Ljava/lang/String;", + r'getVersionString', + r'()Ljava/lang/String;', ); static final _getVersionString = ProtectedJniExtensions.lookup< @@ -2764,7 +2769,7 @@ class CronetEngine extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2780,8 +2785,8 @@ class CronetEngine extends jni.JObject { } static final _id_shutdown = _class.instanceMethodId( - r"shutdown", - r"()V", + r'shutdown', + r'()V', ); static final _shutdown = ProtectedJniExtensions.lookup< @@ -2789,7 +2794,7 @@ class CronetEngine extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -2802,8 +2807,8 @@ class CronetEngine extends jni.JObject { } static final _id_startNetLogToFile = _class.instanceMethodId( - r"startNetLogToFile", - r"(Ljava/lang/String;Z)V", + r'startNetLogToFile', + r'(Ljava/lang/String;Z)V', ); static final _startNetLogToFile = ProtectedJniExtensions.lookup< @@ -2812,7 +2817,7 @@ class CronetEngine extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int)>(); @@ -2831,8 +2836,8 @@ class CronetEngine extends jni.JObject { } static final _id_stopNetLog = _class.instanceMethodId( - r"stopNetLog", - r"()V", + r'stopNetLog', + r'()V', ); static final _stopNetLog = ProtectedJniExtensions.lookup< @@ -2840,7 +2845,7 @@ class CronetEngine extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -2853,8 +2858,8 @@ class CronetEngine extends jni.JObject { } static final _id_getGlobalMetricsDeltas = _class.instanceMethodId( - r"getGlobalMetricsDeltas", - r"()[B", + r'getGlobalMetricsDeltas', + r'()[B', ); static final _getGlobalMetricsDeltas = ProtectedJniExtensions.lookup< @@ -2862,7 +2867,7 @@ class CronetEngine extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2878,8 +2883,8 @@ class CronetEngine extends jni.JObject { } static final _id_openConnection = _class.instanceMethodId( - r"openConnection", - r"(Ljava/net/URL;)Ljava/net/URLConnection;", + r'openConnection', + r'(Ljava/net/URL;)Ljava/net/URLConnection;', ); static final _openConnection = ProtectedJniExtensions.lookup< @@ -2888,7 +2893,7 @@ class CronetEngine extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2904,8 +2909,8 @@ class CronetEngine extends jni.JObject { } static final _id_createURLStreamHandlerFactory = _class.instanceMethodId( - r"createURLStreamHandlerFactory", - r"()Ljava/net/URLStreamHandlerFactory;", + r'createURLStreamHandlerFactory', + r'()Ljava/net/URLStreamHandlerFactory;', ); static final _createURLStreamHandlerFactory = ProtectedJniExtensions.lookup< @@ -2913,7 +2918,7 @@ class CronetEngine extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2929,8 +2934,8 @@ class CronetEngine extends jni.JObject { } static final _id_newUrlRequestBuilder = _class.instanceMethodId( - r"newUrlRequestBuilder", - r"(Ljava/lang/String;Lorg/chromium/net/UrlRequest$Callback;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;", + r'newUrlRequestBuilder', + r'(Ljava/lang/String;Lorg/chromium/net/UrlRequest$Callback;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;', ); static final _newUrlRequestBuilder = ProtectedJniExtensions.lookup< @@ -2943,7 +2948,7 @@ class CronetEngine extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2973,7 +2978,7 @@ final class $CronetEngineType extends jni.JObjType { const $CronetEngineType(); @override - String get signature => r"Lorg/chromium/net/CronetEngine;"; + String get signature => r'Lorg/chromium/net/CronetEngine;'; @override CronetEngine fromReference(jni.JReference reference) => @@ -3004,12 +3009,12 @@ class CronetException extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"org/chromium/net/CronetException"); + static final _class = jni.JClass.forName(r'org/chromium/net/CronetException'); /// The type which includes information such as the signature of this class. static const type = $CronetExceptionType(); static final _id_new0 = _class.constructorId( - r"(Ljava/lang/String;Ljava/lang/Throwable;)V", + r'(Ljava/lang/String;Ljava/lang/Throwable;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -3021,7 +3026,7 @@ class CronetException extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3045,7 +3050,7 @@ final class $CronetExceptionType extends jni.JObjType { const $CronetExceptionType(); @override - String get signature => r"Lorg/chromium/net/CronetException;"; + String get signature => r'Lorg/chromium/net/CronetException;'; @override CronetException fromReference(jni.JReference reference) => @@ -3077,13 +3082,13 @@ class UploadDataProviders extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"org/chromium/net/UploadDataProviders"); + jni.JClass.forName(r'org/chromium/net/UploadDataProviders'); /// The type which includes information such as the signature of this class. static const type = $UploadDataProvidersType(); static final _id_create = _class.staticMethodId( - r"create", - r"(Ljava/io/File;)Lorg/chromium/net/UploadDataProvider;", + r'create', + r'(Ljava/io/File;)Lorg/chromium/net/UploadDataProvider;', ); static final _create = ProtectedJniExtensions.lookup< @@ -3092,7 +3097,7 @@ class UploadDataProviders extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -3108,8 +3113,8 @@ class UploadDataProviders extends jni.JObject { } static final _id_create1 = _class.staticMethodId( - r"create", - r"(Landroid/os/ParcelFileDescriptor;)Lorg/chromium/net/UploadDataProvider;", + r'create', + r'(Landroid/os/ParcelFileDescriptor;)Lorg/chromium/net/UploadDataProvider;', ); static final _create1 = ProtectedJniExtensions.lookup< @@ -3118,7 +3123,7 @@ class UploadDataProviders extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -3134,8 +3139,8 @@ class UploadDataProviders extends jni.JObject { } static final _id_create2 = _class.staticMethodId( - r"create", - r"(Ljava/nio/ByteBuffer;)Lorg/chromium/net/UploadDataProvider;", + r'create', + r'(Ljava/nio/ByteBuffer;)Lorg/chromium/net/UploadDataProvider;', ); static final _create2 = ProtectedJniExtensions.lookup< @@ -3144,7 +3149,7 @@ class UploadDataProviders extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -3160,8 +3165,8 @@ class UploadDataProviders extends jni.JObject { } static final _id_create3 = _class.staticMethodId( - r"create", - r"([BII)Lorg/chromium/net/UploadDataProvider;", + r'create', + r'([BII)Lorg/chromium/net/UploadDataProvider;', ); static final _create3 = ProtectedJniExtensions.lookup< @@ -3170,7 +3175,7 @@ class UploadDataProviders extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, int)>(); @@ -3188,8 +3193,8 @@ class UploadDataProviders extends jni.JObject { } static final _id_create4 = _class.staticMethodId( - r"create", - r"([B)Lorg/chromium/net/UploadDataProvider;", + r'create', + r'([B)Lorg/chromium/net/UploadDataProvider;', ); static final _create4 = ProtectedJniExtensions.lookup< @@ -3198,7 +3203,7 @@ class UploadDataProviders extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -3218,7 +3223,7 @@ final class $UploadDataProvidersType extends jni.JObjType { const $UploadDataProvidersType(); @override - String get signature => r"Lorg/chromium/net/UploadDataProviders;"; + String get signature => r'Lorg/chromium/net/UploadDataProviders;'; @override UploadDataProviders fromReference(jni.JReference reference) => @@ -3250,7 +3255,7 @@ class UrlRequest_Builder extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"org/chromium/net/UrlRequest$Builder"); + jni.JClass.forName(r'org/chromium/net/UrlRequest$Builder'); /// The type which includes information such as the signature of this class. static const type = $UrlRequest_BuilderType(); @@ -3270,7 +3275,7 @@ class UrlRequest_Builder extends jni.JObject { /// from: static public final int REQUEST_PRIORITY_HIGHEST static const REQUEST_PRIORITY_HIGHEST = 4; static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -3278,7 +3283,7 @@ class UrlRequest_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3294,8 +3299,8 @@ class UrlRequest_Builder extends jni.JObject { } static final _id_setHttpMethod = _class.instanceMethodId( - r"setHttpMethod", - r"(Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;", + r'setHttpMethod', + r'(Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;', ); static final _setHttpMethod = ProtectedJniExtensions.lookup< @@ -3304,7 +3309,7 @@ class UrlRequest_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -3320,8 +3325,8 @@ class UrlRequest_Builder extends jni.JObject { } static final _id_addHeader = _class.instanceMethodId( - r"addHeader", - r"(Ljava/lang/String;Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;", + r'addHeader', + r'(Ljava/lang/String;Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;', ); static final _addHeader = ProtectedJniExtensions.lookup< @@ -3333,7 +3338,7 @@ class UrlRequest_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3350,8 +3355,8 @@ class UrlRequest_Builder extends jni.JObject { } static final _id_disableCache = _class.instanceMethodId( - r"disableCache", - r"()Lorg/chromium/net/UrlRequest$Builder;", + r'disableCache', + r'()Lorg/chromium/net/UrlRequest$Builder;', ); static final _disableCache = ProtectedJniExtensions.lookup< @@ -3359,7 +3364,7 @@ class UrlRequest_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3375,14 +3380,14 @@ class UrlRequest_Builder extends jni.JObject { } static final _id_setPriority = _class.instanceMethodId( - r"setPriority", - r"(I)Lorg/chromium/net/UrlRequest$Builder;", + r'setPriority', + r'(I)Lorg/chromium/net/UrlRequest$Builder;', ); static final _setPriority = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -3398,8 +3403,8 @@ class UrlRequest_Builder extends jni.JObject { } static final _id_setUploadDataProvider = _class.instanceMethodId( - r"setUploadDataProvider", - r"(Lorg/chromium/net/UploadDataProvider;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;", + r'setUploadDataProvider', + r'(Lorg/chromium/net/UploadDataProvider;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;', ); static final _setUploadDataProvider = ProtectedJniExtensions.lookup< @@ -3411,7 +3416,7 @@ class UrlRequest_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3431,8 +3436,8 @@ class UrlRequest_Builder extends jni.JObject { } static final _id_allowDirectExecutor = _class.instanceMethodId( - r"allowDirectExecutor", - r"()Lorg/chromium/net/UrlRequest$Builder;", + r'allowDirectExecutor', + r'()Lorg/chromium/net/UrlRequest$Builder;', ); static final _allowDirectExecutor = ProtectedJniExtensions.lookup< @@ -3440,7 +3445,7 @@ class UrlRequest_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3456,8 +3461,8 @@ class UrlRequest_Builder extends jni.JObject { } static final _id_build = _class.instanceMethodId( - r"build", - r"()Lorg/chromium/net/UrlRequest;", + r'build', + r'()Lorg/chromium/net/UrlRequest;', ); static final _build = ProtectedJniExtensions.lookup< @@ -3465,7 +3470,7 @@ class UrlRequest_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3484,7 +3489,7 @@ final class $UrlRequest_BuilderType extends jni.JObjType { const $UrlRequest_BuilderType(); @override - String get signature => r"Lorg/chromium/net/UrlRequest$Builder;"; + String get signature => r'Lorg/chromium/net/UrlRequest$Builder;'; @override UrlRequest_Builder fromReference(jni.JReference reference) => @@ -3516,12 +3521,12 @@ class UrlRequest_Callback extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"org/chromium/net/UrlRequest$Callback"); + jni.JClass.forName(r'org/chromium/net/UrlRequest$Callback'); /// The type which includes information such as the signature of this class. static const type = $UrlRequest_CallbackType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -3529,7 +3534,7 @@ class UrlRequest_Callback extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3545,8 +3550,8 @@ class UrlRequest_Callback extends jni.JObject { } static final _id_onRedirectReceived = _class.instanceMethodId( - r"onRedirectReceived", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V", + r'onRedirectReceived', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V', ); static final _onRedirectReceived = ProtectedJniExtensions.lookup< @@ -3559,7 +3564,7 @@ class UrlRequest_Callback extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -3584,8 +3589,8 @@ class UrlRequest_Callback extends jni.JObject { } static final _id_onResponseStarted = _class.instanceMethodId( - r"onResponseStarted", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + r'onResponseStarted', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); static final _onResponseStarted = ProtectedJniExtensions.lookup< @@ -3597,7 +3602,7 @@ class UrlRequest_Callback extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3616,8 +3621,8 @@ class UrlRequest_Callback extends jni.JObject { } static final _id_onReadCompleted = _class.instanceMethodId( - r"onReadCompleted", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V", + r'onReadCompleted', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V', ); static final _onReadCompleted = ProtectedJniExtensions.lookup< @@ -3630,7 +3635,7 @@ class UrlRequest_Callback extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -3655,8 +3660,8 @@ class UrlRequest_Callback extends jni.JObject { } static final _id_onSucceeded = _class.instanceMethodId( - r"onSucceeded", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + r'onSucceeded', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); static final _onSucceeded = ProtectedJniExtensions.lookup< @@ -3668,7 +3673,7 @@ class UrlRequest_Callback extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3684,8 +3689,8 @@ class UrlRequest_Callback extends jni.JObject { } static final _id_onFailed = _class.instanceMethodId( - r"onFailed", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V", + r'onFailed', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V', ); static final _onFailed = ProtectedJniExtensions.lookup< @@ -3698,7 +3703,7 @@ class UrlRequest_Callback extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -3723,8 +3728,8 @@ class UrlRequest_Callback extends jni.JObject { } static final _id_onCanceled = _class.instanceMethodId( - r"onCanceled", - r"(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V", + r'onCanceled', + r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); static final _onCanceled = ProtectedJniExtensions.lookup< @@ -3736,7 +3741,7 @@ class UrlRequest_Callback extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3756,7 +3761,7 @@ final class $UrlRequest_CallbackType extends jni.JObjType { const $UrlRequest_CallbackType(); @override - String get signature => r"Lorg/chromium/net/UrlRequest$Callback;"; + String get signature => r'Lorg/chromium/net/UrlRequest$Callback;'; @override UrlRequest_Callback fromReference(jni.JReference reference) => @@ -3788,7 +3793,7 @@ class UrlRequest_Status extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"org/chromium/net/UrlRequest$Status"); + jni.JClass.forName(r'org/chromium/net/UrlRequest$Status'); /// The type which includes information such as the signature of this class. static const type = $UrlRequest_StatusType(); @@ -3846,7 +3851,7 @@ final class $UrlRequest_StatusType extends jni.JObjType { const $UrlRequest_StatusType(); @override - String get signature => r"Lorg/chromium/net/UrlRequest$Status;"; + String get signature => r'Lorg/chromium/net/UrlRequest$Status;'; @override UrlRequest_Status fromReference(jni.JReference reference) => @@ -3878,12 +3883,12 @@ class UrlRequest_StatusListener extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"org/chromium/net/UrlRequest$StatusListener"); + jni.JClass.forName(r'org/chromium/net/UrlRequest$StatusListener'); /// The type which includes information such as the signature of this class. static const type = $UrlRequest_StatusListenerType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -3891,7 +3896,7 @@ class UrlRequest_StatusListener extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3907,8 +3912,8 @@ class UrlRequest_StatusListener extends jni.JObject { } static final _id_onStatus = _class.instanceMethodId( - r"onStatus", - r"(I)V", + r'onStatus', + r'(I)V', ); static final _onStatus = ProtectedJniExtensions.lookup< @@ -3916,7 +3921,7 @@ class UrlRequest_StatusListener extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>("globalEnv_CallVoidMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -3934,7 +3939,7 @@ final class $UrlRequest_StatusListenerType const $UrlRequest_StatusListenerType(); @override - String get signature => r"Lorg/chromium/net/UrlRequest$StatusListener;"; + String get signature => r'Lorg/chromium/net/UrlRequest$StatusListener;'; @override UrlRequest_StatusListener fromReference(jni.JReference reference) => @@ -3965,12 +3970,12 @@ class UrlRequest extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"org/chromium/net/UrlRequest"); + static final _class = jni.JClass.forName(r'org/chromium/net/UrlRequest'); /// The type which includes information such as the signature of this class. static const type = $UrlRequestType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -3978,7 +3983,7 @@ class UrlRequest extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3994,8 +3999,8 @@ class UrlRequest extends jni.JObject { } static final _id_start = _class.instanceMethodId( - r"start", - r"()V", + r'start', + r'()V', ); static final _start = ProtectedJniExtensions.lookup< @@ -4003,7 +4008,7 @@ class UrlRequest extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -4016,8 +4021,8 @@ class UrlRequest extends jni.JObject { } static final _id_followRedirect = _class.instanceMethodId( - r"followRedirect", - r"()V", + r'followRedirect', + r'()V', ); static final _followRedirect = ProtectedJniExtensions.lookup< @@ -4025,7 +4030,7 @@ class UrlRequest extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -4039,8 +4044,8 @@ class UrlRequest extends jni.JObject { } static final _id_read = _class.instanceMethodId( - r"read", - r"(Ljava/nio/ByteBuffer;)V", + r'read', + r'(Ljava/nio/ByteBuffer;)V', ); static final _read = ProtectedJniExtensions.lookup< @@ -4049,7 +4054,7 @@ class UrlRequest extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4064,8 +4069,8 @@ class UrlRequest extends jni.JObject { } static final _id_cancel = _class.instanceMethodId( - r"cancel", - r"()V", + r'cancel', + r'()V', ); static final _cancel = ProtectedJniExtensions.lookup< @@ -4073,7 +4078,7 @@ class UrlRequest extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -4086,8 +4091,8 @@ class UrlRequest extends jni.JObject { } static final _id_isDone = _class.instanceMethodId( - r"isDone", - r"()Z", + r'isDone', + r'()Z', ); static final _isDone = ProtectedJniExtensions.lookup< @@ -4095,7 +4100,7 @@ class UrlRequest extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4108,8 +4113,8 @@ class UrlRequest extends jni.JObject { } static final _id_getStatus = _class.instanceMethodId( - r"getStatus", - r"(Lorg/chromium/net/UrlRequest$StatusListener;)V", + r'getStatus', + r'(Lorg/chromium/net/UrlRequest$StatusListener;)V', ); static final _getStatus = ProtectedJniExtensions.lookup< @@ -4118,7 +4123,7 @@ class UrlRequest extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4137,7 +4142,7 @@ final class $UrlRequestType extends jni.JObjType { const $UrlRequestType(); @override - String get signature => r"Lorg/chromium/net/UrlRequest;"; + String get signature => r'Lorg/chromium/net/UrlRequest;'; @override UrlRequest fromReference(jni.JReference reference) => @@ -4168,12 +4173,12 @@ class UrlResponseInfo_HeaderBlock extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"org/chromium/net/UrlResponseInfo$HeaderBlock"); + jni.JClass.forName(r'org/chromium/net/UrlResponseInfo$HeaderBlock'); /// The type which includes information such as the signature of this class. static const type = $UrlResponseInfo_HeaderBlockType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -4181,7 +4186,7 @@ class UrlResponseInfo_HeaderBlock extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4197,8 +4202,8 @@ class UrlResponseInfo_HeaderBlock extends jni.JObject { } static final _id_getAsList = _class.instanceMethodId( - r"getAsList", - r"()Ljava/util/List;", + r'getAsList', + r'()Ljava/util/List;', ); static final _getAsList = ProtectedJniExtensions.lookup< @@ -4206,7 +4211,7 @@ class UrlResponseInfo_HeaderBlock extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4221,8 +4226,8 @@ class UrlResponseInfo_HeaderBlock extends jni.JObject { } static final _id_getAsMap = _class.instanceMethodId( - r"getAsMap", - r"()Ljava/util/Map;", + r'getAsMap', + r'()Ljava/util/Map;', ); static final _getAsMap = ProtectedJniExtensions.lookup< @@ -4230,7 +4235,7 @@ class UrlResponseInfo_HeaderBlock extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4251,7 +4256,7 @@ final class $UrlResponseInfo_HeaderBlockType const $UrlResponseInfo_HeaderBlockType(); @override - String get signature => r"Lorg/chromium/net/UrlResponseInfo$HeaderBlock;"; + String get signature => r'Lorg/chromium/net/UrlResponseInfo$HeaderBlock;'; @override UrlResponseInfo_HeaderBlock fromReference(jni.JReference reference) => @@ -4282,12 +4287,12 @@ class UrlResponseInfo extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"org/chromium/net/UrlResponseInfo"); + static final _class = jni.JClass.forName(r'org/chromium/net/UrlResponseInfo'); /// The type which includes information such as the signature of this class. static const type = $UrlResponseInfoType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -4295,7 +4300,7 @@ class UrlResponseInfo extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4311,8 +4316,8 @@ class UrlResponseInfo extends jni.JObject { } static final _id_getUrl = _class.instanceMethodId( - r"getUrl", - r"()Ljava/lang/String;", + r'getUrl', + r'()Ljava/lang/String;', ); static final _getUrl = ProtectedJniExtensions.lookup< @@ -4320,7 +4325,7 @@ class UrlResponseInfo extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4335,8 +4340,8 @@ class UrlResponseInfo extends jni.JObject { } static final _id_getUrlChain = _class.instanceMethodId( - r"getUrlChain", - r"()Ljava/util/List;", + r'getUrlChain', + r'()Ljava/util/List;', ); static final _getUrlChain = ProtectedJniExtensions.lookup< @@ -4344,7 +4349,7 @@ class UrlResponseInfo extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4359,8 +4364,8 @@ class UrlResponseInfo extends jni.JObject { } static final _id_getHttpStatusCode = _class.instanceMethodId( - r"getHttpStatusCode", - r"()I", + r'getHttpStatusCode', + r'()I', ); static final _getHttpStatusCode = ProtectedJniExtensions.lookup< @@ -4368,7 +4373,7 @@ class UrlResponseInfo extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4383,8 +4388,8 @@ class UrlResponseInfo extends jni.JObject { } static final _id_getHttpStatusText = _class.instanceMethodId( - r"getHttpStatusText", - r"()Ljava/lang/String;", + r'getHttpStatusText', + r'()Ljava/lang/String;', ); static final _getHttpStatusText = ProtectedJniExtensions.lookup< @@ -4392,7 +4397,7 @@ class UrlResponseInfo extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4408,8 +4413,8 @@ class UrlResponseInfo extends jni.JObject { } static final _id_getAllHeadersAsList = _class.instanceMethodId( - r"getAllHeadersAsList", - r"()Ljava/util/List;", + r'getAllHeadersAsList', + r'()Ljava/util/List;', ); static final _getAllHeadersAsList = ProtectedJniExtensions.lookup< @@ -4417,7 +4422,7 @@ class UrlResponseInfo extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4433,8 +4438,8 @@ class UrlResponseInfo extends jni.JObject { } static final _id_getAllHeaders = _class.instanceMethodId( - r"getAllHeaders", - r"()Ljava/util/Map;", + r'getAllHeaders', + r'()Ljava/util/Map;', ); static final _getAllHeaders = ProtectedJniExtensions.lookup< @@ -4442,7 +4447,7 @@ class UrlResponseInfo extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4459,8 +4464,8 @@ class UrlResponseInfo extends jni.JObject { } static final _id_wasCached = _class.instanceMethodId( - r"wasCached", - r"()Z", + r'wasCached', + r'()Z', ); static final _wasCached = ProtectedJniExtensions.lookup< @@ -4468,7 +4473,7 @@ class UrlResponseInfo extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4482,8 +4487,8 @@ class UrlResponseInfo extends jni.JObject { } static final _id_getNegotiatedProtocol = _class.instanceMethodId( - r"getNegotiatedProtocol", - r"()Ljava/lang/String;", + r'getNegotiatedProtocol', + r'()Ljava/lang/String;', ); static final _getNegotiatedProtocol = ProtectedJniExtensions.lookup< @@ -4491,7 +4496,7 @@ class UrlResponseInfo extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4507,8 +4512,8 @@ class UrlResponseInfo extends jni.JObject { } static final _id_getProxyServer = _class.instanceMethodId( - r"getProxyServer", - r"()Ljava/lang/String;", + r'getProxyServer', + r'()Ljava/lang/String;', ); static final _getProxyServer = ProtectedJniExtensions.lookup< @@ -4516,7 +4521,7 @@ class UrlResponseInfo extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4532,8 +4537,8 @@ class UrlResponseInfo extends jni.JObject { } static final _id_getReceivedByteCount = _class.instanceMethodId( - r"getReceivedByteCount", - r"()J", + r'getReceivedByteCount', + r'()J', ); static final _getReceivedByteCount = ProtectedJniExtensions.lookup< @@ -4541,7 +4546,7 @@ class UrlResponseInfo extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4560,7 +4565,7 @@ final class $UrlResponseInfoType extends jni.JObjType { const $UrlResponseInfoType(); @override - String get signature => r"Lorg/chromium/net/UrlResponseInfo;"; + String get signature => r'Lorg/chromium/net/UrlResponseInfo;'; @override UrlResponseInfo fromReference(jni.JReference reference) => diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 24d4d50074..68613e98f3 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -13,11 +13,11 @@ dependencies: sdk: flutter http: ^1.2.0 http_profile: ^0.1.0 - jni: ^0.9.3 + jni: ^0.10.1 dev_dependencies: dart_flutter_team_lints: ^3.0.0 - jnigen: ^0.9.3 + jnigen: ^0.10.0 xml: ^6.1.0 yaml_edit: ^2.0.3 From aefe82a0ecb3450940484f448619c7f216e691d6 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 11 Jul 2024 16:05:14 -0700 Subject: [PATCH 405/448] Prepare to publish cronet_http 1.3.2 (#1265) --- pkgs/cronet_http/CHANGELOG.md | 2 +- pkgs/cronet_http/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index fc2f44fe5a..0ce43fceb3 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.3.2-wip +## 1.3.2 * Upgrade `package:jni` to 0.10.1 and `package:jnigen` to 0.10.0 to fix method calling bugs and a diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 68613e98f3..19e5e8509f 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 1.3.2-wip +version: 1.3.2 description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http From 74cf9e35ef4803a7c880ff191101e1edd3862df3 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 11 Jul 2024 16:05:59 -0700 Subject: [PATCH 406/448] Document that widgets must be initialized before using the cronet_http (#1262) --- pkgs/cronet_http/example/lib/main.dart | 1 + pkgs/cronet_http/lib/cronet_http.dart | 57 ++++++++----------- pkgs/cronet_http/lib/src/cronet_client.dart | 33 ----------- .../lib/http_client_factory.dart | 2 + 4 files changed, 27 insertions(+), 66 deletions(-) diff --git a/pkgs/cronet_http/example/lib/main.dart b/pkgs/cronet_http/example/lib/main.dart index 62990e337d..37136a2afb 100644 --- a/pkgs/cronet_http/example/lib/main.dart +++ b/pkgs/cronet_http/example/lib/main.dart @@ -17,6 +17,7 @@ import 'book.dart'; void main() { final Client httpClient; if (Platform.isAndroid) { + WidgetsFlutterBinding.ensureInitialized(); final engine = CronetEngine.build( cacheMode: CacheMode.memory, cacheMaxSize: 2 * 1024 * 1024, diff --git a/pkgs/cronet_http/lib/cronet_http.dart b/pkgs/cronet_http/lib/cronet_http.dart index fe6499fc6d..53c9aca019 100644 --- a/pkgs/cronet_http/lib/cronet_http.dart +++ b/pkgs/cronet_http/lib/cronet_http.dart @@ -6,50 +6,41 @@ /// [Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) /// HTTP client. /// -/// ``` -/// import 'package:cronet_http/cronet_http.dart'; -/// -/// void main() async { -/// var client = CronetClient.defaultCronetEngine(); -/// final response = await client.get( -/// Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'})); -/// if (response.statusCode != 200) { -/// throw HttpException('bad response: ${response.statusCode}'); -/// } -/// -/// final decodedResponse = -/// jsonDecode(utf8.decode(response.bodyBytes)) as Map; -/// -/// final itemCount = decodedResponse['totalItems']; -/// print('Number of books about http: $itemCount.'); -/// for (var i = 0; i < min(itemCount, 10); ++i) { -/// print(decodedResponse['items'][i]['volumeInfo']['title']); -/// } -/// } -/// ``` +/// The platform interface must be initialized before using this plugin e.g. by +/// calling +/// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html) +/// or +/// [`runApp`](https://api.flutter.dev/flutter/widgets/runApp.html). /// /// [CronetClient] is an implementation of the `package:http` [Client], /// which means that it can easily used conditionally based on the current /// platform. /// /// ``` +/// import 'package:provider/provider.dart'; +/// /// void main() { -/// var clientFactory = Client.new; // Constructs the default client. +/// final Client httpClient; /// if (Platform.isAndroid) { -/// Future? engine; -/// clientFactory = () { -/// engine ??= CronetEngine.build( -/// cacheMode: CacheMode.memory, userAgent: 'MyAgent'); -/// return CronetClient.fromCronetEngineFuture(engine!); -/// }; +/// // `package:cronet_http` cannot be used until +/// // `WidgetsFlutterBinding.ensureInitialized()` or `runApp` is called. +/// WidgetsFlutterBinding.ensureInitialized(); +/// final engine = CronetEngine.build( +/// cacheMode: CacheMode.memory, +/// cacheMaxSize: 2 * 1024 * 1024, +/// userAgent: 'Book Agent'); +/// httpClient = CronetClient.fromCronetEngine(engine, closeEngine: true); +/// } else { +/// httpClient = IOClient(HttpClient()..userAgent = 'Book Agent'); +/// } +/// +/// runApp(Provider( +/// create: (_) => httpClient, +/// child: const BookSearchApp(), +/// dispose: (_, client) => client.close())); /// } -/// runWithClient(() => runApp(const MyFlutterApp()), clientFactory); /// } /// ``` -/// -/// After the above setup, calling [Client] methods or any of the -/// `package:http` convenient functions (e.g. [get]) will result in -/// [CronetClient] being used on Android. library; import 'package:http/http.dart'; diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index 772f03b0e8..f55617eeb1 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -2,17 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// An Android Flutter plugin that provides access to the -/// [Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) -/// HTTP client. -/// -/// The platform interface must be initialized before using this plugin e.g. by -/// calling -/// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html) -/// or -/// [`runApp`](https://api.flutter.dev/flutter/widgets/runApp.html). -library; - import 'dart:async'; import 'package:http/http.dart'; @@ -296,28 +285,6 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( /// A HTTP [Client] based on the /// [Cronet](https://developer.android.com/guide/topics/connectivity/cronet) /// network stack. -/// -/// For example: -/// ``` -/// void main() async { -/// var client = CronetClient.defaultCronetEngine(); -/// final response = await client.get( -/// Uri.https('www.googleapis.com', '/books/v1/volumes', {'q': '{http}'})); -/// if (response.statusCode != 200) { -/// throw HttpException('bad response: ${response.statusCode}'); -/// } -/// -/// final decodedResponse = -/// jsonDecode(utf8.decode(response.bodyBytes)) as Map; -/// -/// final itemCount = decodedResponse['totalItems']; -/// print('Number of books about http: $itemCount.'); -/// for (var i = 0; i < min(itemCount, 10); ++i) { -/// print(decodedResponse['items'][i]['volumeInfo']['title']); -/// } -/// } -/// ``` -/// class CronetClient extends BaseClient { static final _executor = jb.Executors.newCachedThreadPool(); CronetEngine? _engine; diff --git a/pkgs/flutter_http_example/lib/http_client_factory.dart b/pkgs/flutter_http_example/lib/http_client_factory.dart index 6e6ddc040b..51109e520c 100644 --- a/pkgs/flutter_http_example/lib/http_client_factory.dart +++ b/pkgs/flutter_http_example/lib/http_client_factory.dart @@ -6,6 +6,7 @@ import 'dart:io'; import 'package:cronet_http/cronet_http.dart'; import 'package:cupertino_http/cupertino_http.dart'; +import 'package:flutter/widgets.dart'; import 'package:http/http.dart'; import 'package:http/io_client.dart'; @@ -13,6 +14,7 @@ const _maxCacheSize = 2 * 1024 * 1024; Client httpClient() { if (Platform.isAndroid) { + WidgetsFlutterBinding.ensureInitialized(); final engine = CronetEngine.build( cacheMode: CacheMode.memory, cacheMaxSize: _maxCacheSize, From a86522ae94e02b2b0ea69a4a30dd7ffed2425d35 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 11 Jul 2024 16:06:12 -0700 Subject: [PATCH 407/448] Remove `runWithClient` Flutter example (#1263) --- pkgs/cupertino_http/lib/cupertino_http.dart | 21 ++++++++++++------- .../lib/src/cupertino_client.dart | 4 ---- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/cupertino_http/lib/cupertino_http.dart b/pkgs/cupertino_http/lib/cupertino_http.dart index 8009d786cc..b85a868b4e 100644 --- a/pkgs/cupertino_http/lib/cupertino_http.dart +++ b/pkgs/cupertino_http/lib/cupertino_http.dart @@ -44,17 +44,22 @@ /// /// ``` /// void main() { -/// var clientFactory = Client.new; // The default Client. +/// final Client httpClient; /// if (Platform.isIOS || Platform.isMacOS) { -/// clientFactory = CupertinoClient.defaultSessionConfiguration.call; +/// final config = URLSessionConfiguration.ephemeralSessionConfiguration() +/// ..cache = URLCache.withCapacity(memoryCapacity: 2 * 1024 * 1024) +/// ..httpAdditionalHeaders = {'User-Agent': 'Book Agent'}; +/// httpClient = CupertinoClient.fromSessionConfiguration(config); +/// } else { +/// httpClient = IOClient(HttpClient()..userAgent = 'Book Agent'); /// } -/// runWithClient(() => runApp(const MyFlutterApp()), clientFactory); -/// } -/// ``` /// -/// After the above setup, calling [Client] methods or any of the -/// `package:http` convenient functions (e.g. [get]) will result in -/// [CupertinoClient] being used on macOS and iOS. +/// runApp(Provider( +/// create: (_) => httpClient, +/// child: const BookSearchApp(), +/// dispose: (_, client) => client.close())); +/// } +/// ``` /// /// # NSURLSession API /// diff --git a/pkgs/cupertino_http/lib/src/cupertino_client.dart b/pkgs/cupertino_http/lib/src/cupertino_client.dart index a525773316..eefa1189f0 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_client.dart @@ -2,10 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -/// A [Client] implementation based on the -/// [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). -library; - import 'dart:async'; import 'dart:io'; import 'dart:typed_data'; From 9f9ea326e564e308a224bb8039a306d56c4014c1 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 11 Jul 2024 17:13:38 -0700 Subject: [PATCH 408/448] Prepare to publish cupertino_http 1.5.1 (#1264) --- pkgs/cupertino_http/CHANGELOG.md | 2 +- pkgs/cupertino_http/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 0be851c2b6..4cd4a5e8cd 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.5.1-wip +## 1.5.1 * Allow `1000` as a `code` argument in `CupertinoWebSocket.close`. * Fix a bug where the `Content-Length` header would not be set under certain diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index e34117dc29..94a9da8d8c 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 1.5.1-wip +version: 1.5.1 description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. From 8fe8312cc0573ac1c390a3af444aa0a722aa4ff9 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 12 Jul 2024 18:13:36 -0700 Subject: [PATCH 409/448] Add WebSocket usage examples to cupertino_http (#1266) --- pkgs/cupertino_http/README.md | 32 +++++++++++++++++-- .../lib/src/cupertino_web_socket.dart | 22 +++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/pkgs/cupertino_http/README.md b/pkgs/cupertino_http/README.md index ef5c9fff8c..0e12a6ef08 100644 --- a/pkgs/cupertino_http/README.md +++ b/pkgs/cupertino_http/README.md @@ -46,6 +46,31 @@ void main() async { } ``` +[CupertinoWebSocket][] provides a [package:web_socket][] [WebSocket][] +implementation. + +```dart +import 'package:cupertino_http/cupertino_http.dart'; +import 'package:web_socket/web_socket.dart'; + +void main() async { + final socket = await CupertinoWebSocket.connect( + Uri.parse('wss://ws.postman-echo.com/raw')); + + socket.events.listen((e) async { + switch (e) { + case TextDataReceived(text: final text): + print('Received Text: $text'); + await socket.close(); + case BinaryDataReceived(data: final data): + print('Received Binary: $data'); + case CloseReceived(code: final code, reason: final reason): + print('Connection to server closed: $code [$reason]'); + } + }); +} +``` + You can also use the [Foundation URL Loading System] API directly. ```dart @@ -63,6 +88,9 @@ final task = session.dataTaskWithCompletionHandler(URLRequest.fromUrl(url), task.resume(); ``` -[package:http Client]: https://pub.dev/documentation/http/latest/http/Client-class.html -[Foundation URL Loading System]: https://developer.apple.com/documentation/foundation/url_loading_system +[CupertinoWebSocket]: https://pub.dev/documentation/cupertino_http/latest/cupertino_http/CupertinoWebSocket-class.html [dart:io HttpClient]: https://api.dart.dev/stable/dart-io/HttpClient-class.html +[Foundation URL Loading System]: https://developer.apple.com/documentation/foundation/url_loading_system +[package:http Client]: https://pub.dev/documentation/http/latest/http/Client-class.html +[package:web_socket]: https://pub.dev/packages/web_socket +[WebSocket]: https://pub.dev/documentation/web_socket/latest/web_socket/WebSocket-class.html diff --git a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart index 666c018835..b374dd9907 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart @@ -25,6 +25,28 @@ class ConnectionException extends WebSocketException { /// /// NOTE: the [WebSocket] interface is currently experimental and may change in /// the future. +/// +/// ```dart +/// import 'package:cupertino_http/cupertino_http.dart'; +/// import 'package:web_socket/web_socket.dart'; +/// +/// void main() async { +/// final socket = await CupertinoWebSocket.connect( +/// Uri.parse('wss://ws.postman-echo.com/raw')); +/// +/// socket.events.listen((e) async { +/// switch (e) { +/// case TextDataReceived(text: final text): +/// print('Received Text: $text'); +/// await socket.close(); +/// case BinaryDataReceived(data: final data): +/// print('Received Binary: $data'); +/// case CloseReceived(code: final code, reason: final reason): +/// print('Connection to server closed: $code [$reason]'); +/// } +/// }); +/// } +/// ``` class CupertinoWebSocket implements WebSocket { /// Create a new WebSocket connection using the /// [NSURLSessionWebSocketTask API](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask). From d1714c6ffb17be6ff45a837c0293084d1c0ab512 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 16 Jul 2024 08:53:07 -0700 Subject: [PATCH 410/448] web_socket: allow latest pkg:web (#1269) --- pkgs/web_socket/CHANGELOG.md | 4 ++++ pkgs/web_socket/pubspec.yaml | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/web_socket/CHANGELOG.md b/pkgs/web_socket/CHANGELOG.md index f97d71b7ca..fd421d76ce 100644 --- a/pkgs/web_socket/CHANGELOG.md +++ b/pkgs/web_socket/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.6 + +- Allow `web: '>=0.5.0 <2.0.0'`. + ## 0.1.5 - Allow `1000` as a close code. diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml index cd7cf31fd9..9c0cab597f 100644 --- a/pkgs/web_socket/pubspec.yaml +++ b/pkgs/web_socket/pubspec.yaml @@ -3,15 +3,16 @@ description: >- Any easy-to-use library for communicating with WebSockets that has multiple implementations. repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket -version: 0.1.5 +version: 0.1.6 environment: sdk: ^3.3.0 +dependencies: + web: '>=0.5.0 <2.0.0' + dev_dependencies: dart_flutter_team_lints: ^3.0.0 test: ^1.24.0 web_socket_conformance_tests: path: ../web_socket_conformance_tests/ -dependencies: - web: ^0.5.0 From 46acacc416fd16618e523b15af6ec9a510d89888 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 16 Jul 2024 13:08:13 -0700 Subject: [PATCH 411/448] Bump pkg:web dependency (#1272) Use `show` on pkg:web so it's easier to see if usage changes Tighten constraints on dev dependencies --- pkgs/http/CHANGELOG.md | 4 +++- pkgs/http/lib/src/browser_client.dart | 2 +- pkgs/http/pubspec.yaml | 8 ++++---- pkgs/http/test/html/utils.dart | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 33811fdcb5..85dccd7313 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,4 +1,6 @@ -## 1.2.2-wip +## 1.2.2 + +* Require package `web: '>=0.5.0 <2.0.0'`. ## 1.2.1 diff --git a/pkgs/http/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart index 07e232307f..6ea112486b 100644 --- a/pkgs/http/lib/src/browser_client.dart +++ b/pkgs/http/lib/src/browser_client.dart @@ -5,7 +5,7 @@ import 'dart:async'; import 'dart:js_interop'; -import 'package:web/web.dart'; +import 'package:web/web.dart' show XHRGetters, XMLHttpRequest; import 'base_client.dart'; import 'base_request.dart'; diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 52352be343..7039e30838 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.2.2-wip +version: 1.2.2 description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http @@ -15,7 +15,7 @@ dependencies: async: ^2.5.0 http_parser: ^4.0.0 meta: ^1.3.0 - web: ^0.5.0 + web: '>=0.5.0 <2.0.0' dev_dependencies: dart_flutter_team_lints: ^3.0.0 @@ -23,5 +23,5 @@ dev_dependencies: http_client_conformance_tests: path: ../http_client_conformance_tests/ shelf: ^1.1.0 - stream_channel: ^2.1.0 - test: ^1.16.0 + stream_channel: ^2.1.1 + test: ^1.21.2 diff --git a/pkgs/http/test/html/utils.dart b/pkgs/http/test/html/utils.dart index 11170e15d2..3d92698a54 100644 --- a/pkgs/http/test/html/utils.dart +++ b/pkgs/http/test/html/utils.dart @@ -2,7 +2,7 @@ // for details. 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:web/web.dart'; +import 'package:web/web.dart' show window; export '../utils.dart'; From 5cfe93c803dd170a93b03ef99e8517dce96ac052 Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Thu, 18 Jul 2024 00:12:00 +0530 Subject: [PATCH 412/448] pkgs/ok_http: JNIgen fixes and added WebSocket support (#1257) * ok_http: upgrade jni and regenerate bindings * ok_http: jnigen fixes * generate bindings for okhttp websocket classes * add websocket dependency * create proxy and interceptor; generate bindings * first websocket impl * create an example section for websocket demo * add integration tests * add helper comments and docs to kotlin files * remove websocket example * rename 'WSInterceptor' to 'WebSocketInterceptor' * refer to deadlock issue in package: jni * bump up version from `0.1.0-wip` to `0.1.0` * increase step `test` timeout to 1200s to prevent workflow failures --- .github/workflows/okhttp.yaml | 2 +- pkgs/ok_http/CHANGELOG.md | 3 +- pkgs/ok_http/README.md | 34 +- pkgs/ok_http/analysis_options.yaml | 5 - .../example/ok_http/WebSocketInterceptor.kt | 33 + .../example/ok_http/WebSocketListenerProxy.kt | 51 + .../integration_test/web_socket_test.dart | 10 + pkgs/ok_http/example/pubspec.yaml | 3 + pkgs/ok_http/jnigen.yaml | 21 + pkgs/ok_http/lib/ok_http.dart | 5 +- pkgs/ok_http/lib/src/jni/bindings.dart | 5363 +++++++++++++---- pkgs/ok_http/lib/src/ok_http_client.dart | 19 +- pkgs/ok_http/lib/src/ok_http_web_socket.dart | 229 + pkgs/ok_http/pubspec.yaml | 7 +- 14 files changed, 4702 insertions(+), 1083 deletions(-) delete mode 100644 pkgs/ok_http/analysis_options.yaml create mode 100644 pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketInterceptor.kt create mode 100644 pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketListenerProxy.kt create mode 100644 pkgs/ok_http/example/integration_test/web_socket_test.dart create mode 100644 pkgs/ok_http/lib/src/ok_http_web_socket.dart diff --git a/.github/workflows/okhttp.yaml b/.github/workflows/okhttp.yaml index e20a039ce9..367bcf2732 100644 --- a/.github/workflows/okhttp.yaml +++ b/.github/workflows/okhttp.yaml @@ -55,4 +55,4 @@ jobs: # - pkgs/ok_http/example/android/app/build.gradle api-level: 21 arch: x86_64 - script: cd pkgs/ok_http/example && flutter test --timeout=120s integration_test/ + script: cd pkgs/ok_http/example && flutter test --timeout=1200s integration_test/ diff --git a/pkgs/ok_http/CHANGELOG.md b/pkgs/ok_http/CHANGELOG.md index 433fc4ec44..557f19db20 100644 --- a/pkgs/ok_http/CHANGELOG.md +++ b/pkgs/ok_http/CHANGELOG.md @@ -1,5 +1,6 @@ -## 0.1.0-wip +## 0.1.0 - Implementation of [`BaseClient`](https://pub.dev/documentation/http/latest/http/BaseClient-class.html) and `send()` method using [`enqueue()` API](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-call/enqueue.html) - `ok_http` can now send asynchronous requests and stream response bodies. - Add [DevTools Network View](https://docs.flutter.dev/tools/devtools/network) support. +- WebSockets support is now available in the `ok_http` package. Wraps around the OkHttp [WebSocket API](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html). diff --git a/pkgs/ok_http/README.md b/pkgs/ok_http/README.md index 6c21d824e7..513234815e 100644 --- a/pkgs/ok_http/README.md +++ b/pkgs/ok_http/README.md @@ -1,8 +1,8 @@ -[![pub package](https://img.shields.io/pub/v/cronet_http.svg)](https://pub.dev/packages/ok_http) +[![pub package](https://img.shields.io/pub/v/ok_http.svg)](https://pub.dev/packages/ok_http) [![package publisher](https://img.shields.io/pub/publisher/ok_http.svg)](https://pub.dev/packages/ok_http/publisher) An Android Flutter plugin that provides access to the -[OkHttp][] HTTP client. +[OkHttp][] HTTP client and the OkHttp [WebSocket][] API. ## Why use `package:ok_http`? @@ -23,6 +23,35 @@ This size of the [example application][] APK file using different packages: [^2]: Embeds the Cronet HTTP library. [^3]: Accessed through [`IOClient`](https://pub.dev/documentation/http/latest/io_client/IOClient-class.html). +### 🔌 Supports WebSockets out of the box + +`package:ok_http` wraps the OkHttp [WebSocket][] API which supports: + +- Configured System Proxy on Android +- HTTP/2 + +**Example Usage of `OkHttpWebSocket`:** + +```dart +import 'package:ok_http/ok_http.dart'; +import 'package:web_socket/web_socket.dart'; +void main() async { + final socket = await OkHttpWebSocket.connect( + Uri.parse('wss://ws.postman-echo.com/raw')); + socket.events.listen((e) async { + switch (e) { + case TextDataReceived(text: final text): + print('Received Text: $text'); + await socket.close(); + case BinaryDataReceived(data: final data): + print('Received Binary: $data'); + case CloseReceived(code: final code, reason: final reason): + print('Connection to server closed: $code [$reason]'); + } + }); +} +``` + ## Status: experimental **NOTE**: This package is currently experimental and published under the @@ -41,3 +70,4 @@ feedback, suggestions, and comments, please file an issue in the [example application]: https://github.com/dart-lang/http/tree/master/pkgs/flutter_http_example [OkHttp]: https://square.github.io/okhttp/ [Google Play Services]: https://developers.google.com/android/guides/overview +[WebSocket]: https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html diff --git a/pkgs/ok_http/analysis_options.yaml b/pkgs/ok_http/analysis_options.yaml deleted file mode 100644 index 8de8919f97..0000000000 --- a/pkgs/ok_http/analysis_options.yaml +++ /dev/null @@ -1,5 +0,0 @@ -include: ../../analysis_options.yaml - -analyzer: - exclude: - - "lib/src/jni/bindings.dart" diff --git a/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketInterceptor.kt b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketInterceptor.kt new file mode 100644 index 0000000000..da64591576 --- /dev/null +++ b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketInterceptor.kt @@ -0,0 +1,33 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +package com.example.ok_http + +import okhttp3.Interceptor +import okhttp3.OkHttpClient + +/** + * Usage of `chain.proceed(...)` via JNI Bindings leads to threading issues. This is a workaround + * to intercept the response before it is parsed by the WebSocketReader, to prevent response parsing errors. + * + * https://github.com/dart-lang/native/issues/1337 + */ +class WebSocketInterceptor { + companion object { + fun addWSInterceptor( + clientBuilder: OkHttpClient.Builder + ): OkHttpClient.Builder { + return clientBuilder.addInterceptor(Interceptor { chain -> + val request = chain.request() + val response = chain.proceed(request) + + response.newBuilder() + // Removing this header to ensure that OkHttp does not fail due to unexpected values. + .removeHeader("sec-websocket-extensions") + // Adding the header to ensure successful parsing of the response. + .addHeader("sec-websocket-extensions", "permessage-deflate").build() + }) + } + } +} diff --git a/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketListenerProxy.kt b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketListenerProxy.kt new file mode 100644 index 0000000000..e0366c78be --- /dev/null +++ b/pkgs/ok_http/android/src/main/kotlin/com/example/ok_http/WebSocketListenerProxy.kt @@ -0,0 +1,51 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +package com.example.ok_http + +import okhttp3.Response +import okhttp3.WebSocket +import okhttp3.WebSocketListener +import okio.ByteString + +/** + * `OkHttp` expects a subclass of the abstract class [`WebSocketListener`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket-listener/index.html) + * to be passed to the `newWebSocket` method. + * + * `package:jnigen` does not support the ability to subclass abstract Java classes in Dart + * (see https://github.com/dart-lang/jnigen/issues/348). + * + * This file provides an interface `WebSocketListener`, which can + * be implemented in Dart and a wrapper class `WebSocketListenerProxy`, which + * can be passed to the OkHttp API. + */ +class WebSocketListenerProxy(private val listener: WebSocketListener) : WebSocketListener() { + interface WebSocketListener { + fun onOpen(webSocket: WebSocket, response: Response) + fun onMessage(webSocket: WebSocket, text: String) + fun onMessage(webSocket: WebSocket, bytes: ByteString) + fun onClosing(webSocket: WebSocket, code: Int, reason: String) + fun onFailure(webSocket: WebSocket, t: Throwable, response: Response?) + } + + override fun onOpen(webSocket: WebSocket, response: Response) { + listener.onOpen(webSocket, response) + } + + override fun onMessage(webSocket: WebSocket, text: String) { + listener.onMessage(webSocket, text) + } + + override fun onMessage(webSocket: WebSocket, bytes: ByteString) { + listener.onMessage(webSocket, bytes) + } + + override fun onClosing(webSocket: WebSocket, code: Int, reason: String) { + listener.onClosing(webSocket, code, reason) + } + + override fun onFailure(webSocket: WebSocket, t: Throwable, response: Response?) { + listener.onFailure(webSocket, t, response) + } +} diff --git a/pkgs/ok_http/example/integration_test/web_socket_test.dart b/pkgs/ok_http/example/integration_test/web_socket_test.dart new file mode 100644 index 0000000000..8f1a9656f8 --- /dev/null +++ b/pkgs/ok_http/example/integration_test/web_socket_test.dart @@ -0,0 +1,10 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. 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:ok_http/ok_http.dart'; +import 'package:web_socket_conformance_tests/web_socket_conformance_tests.dart'; + +void main() { + testAll(OkHttpWebSocket.connect); +} diff --git a/pkgs/ok_http/example/pubspec.yaml b/pkgs/ok_http/example/pubspec.yaml index f7c9dc1ecb..8a394364fe 100644 --- a/pkgs/ok_http/example/pubspec.yaml +++ b/pkgs/ok_http/example/pubspec.yaml @@ -16,6 +16,7 @@ dependencies: ok_http: path: ../ provider: ^6.1.1 + web_socket: ^0.1.5 dev_dependencies: dart_flutter_team_lints: ^3.0.0 @@ -27,6 +28,8 @@ dev_dependencies: integration_test: sdk: flutter test: ^1.23.1 + web_socket_conformance_tests: + path: ../../web_socket_conformance_tests/ flutter: uses-material-design: true diff --git a/pkgs/ok_http/jnigen.yaml b/pkgs/ok_http/jnigen.yaml index c9f06d183a..7f63d6c2d9 100644 --- a/pkgs/ok_http/jnigen.yaml +++ b/pkgs/ok_http/jnigen.yaml @@ -26,11 +26,16 @@ classes: - "okhttp3.Callback" - "okhttp3.ConnectionPool" - "okhttp3.Dispatcher" + - "java.util.concurrent.ExecutorService" - "okhttp3.Cache" - "com.example.ok_http.RedirectReceivedCallback" - "com.example.ok_http.RedirectInterceptor" - "com.example.ok_http.AsyncInputStreamReader" - "com.example.ok_http.DataCallback" + - "okhttp3.WebSocket" + - "com.example.ok_http.WebSocketListenerProxy" + - "okio.ByteString" + - "com.example.ok_http.WebSocketInterceptor" # Exclude the deprecated methods listed below # They cause syntax errors during the `dart format` step of JNIGen. @@ -86,3 +91,19 @@ exclude: - "okhttp3.Headers#-deprecated_size" - "okhttp3.Dispatcher#-deprecated_executorService" - "okhttp3.Cache#-deprecated_directory" + - "java.util.concurrent.ExecutorService#invokeAll" + - "java.util.concurrent.ExecutorService#invokeAny" + - "java.util.concurrent.ExecutorService#submit" + - "okio.ByteString$Companion#-deprecated_getByte" + - "okio.ByteString$Companion#-deprecated_size" + - 'okio.ByteString\$Companion#-deprecated_decodeBase64' + - 'okio.ByteString\$Companion#-deprecated_decodeHex' + - 'okio.ByteString\$Companion#-deprecated_encodeString' + - 'okio.ByteString\$Companion#-deprecated_encodeUtf8' + - 'okio.ByteString\$Companion#-deprecated_of' + - 'okio.ByteString\$Companion#-deprecated_read' + - "okio.ByteString#-deprecated_getByte" + - "okio.ByteString#-deprecated_size" + +preamble: | + // ignore_for_file: prefer_expression_function_bodies diff --git a/pkgs/ok_http/lib/ok_http.dart b/pkgs/ok_http/lib/ok_http.dart index 891ec98463..75b43ae8a5 100644 --- a/pkgs/ok_http/lib/ok_http.dart +++ b/pkgs/ok_http/lib/ok_http.dart @@ -3,7 +3,9 @@ // BSD-style license that can be found in the LICENSE file. /// An Android Flutter plugin that provides access to the -/// [OkHttp](https://square.github.io/okhttp/) HTTP client. +/// [OkHttp](https://square.github.io/okhttp/) HTTP client, and the OkHttp +/// [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html) +/// API /// /// ``` /// import 'package:ok_http/ok_http.dart'; @@ -53,3 +55,4 @@ import 'package:http/http.dart'; import 'src/ok_http_client.dart'; export 'src/ok_http_client.dart'; +export 'src/ok_http_web_socket.dart'; diff --git a/pkgs/ok_http/lib/src/jni/bindings.dart b/pkgs/ok_http/lib/src/jni/bindings.dart index 05ab7b830e..66f0078d9a 100644 --- a/pkgs/ok_http/lib/src/jni/bindings.dart +++ b/pkgs/ok_http/lib/src/jni/bindings.dart @@ -1,6 +1,9 @@ +// ignore_for_file: prefer_expression_function_bodies + // Autogenerated by jnigen. DO NOT EDIT! // ignore_for_file: annotate_overrides +// ignore_for_file: argument_type_not_assignable // ignore_for_file: camel_case_extensions // ignore_for_file: camel_case_types // ignore_for_file: constant_identifier_names @@ -9,8 +12,11 @@ // ignore_for_file: lines_longer_than_80_chars // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: non_constant_identifier_names +// ignore_for_file: only_throw_errors // ignore_for_file: overridden_fields +// ignore_for_file: prefer_double_quotes // ignore_for_file: unnecessary_cast +// ignore_for_file: unnecessary_parenthesis // ignore_for_file: unused_element // ignore_for_file: unused_field // ignore_for_file: unused_import @@ -18,10 +24,11 @@ // ignore_for_file: unused_shown_name // ignore_for_file: use_super_parameters -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; +import 'dart:ffi' as ffi; +import 'dart:isolate' show ReceivePort; + +import 'package:jni/internal_helpers_for_jnigen.dart'; +import 'package:jni/jni.dart' as jni; /// from: okhttp3.Request$Builder class Request_Builder extends jni.JObject { @@ -32,12 +39,12 @@ class Request_Builder extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Request$Builder"); + static final _class = jni.JClass.forName(r'okhttp3/Request$Builder'); /// The type which includes information such as the signature of this class. static const type = $Request_BuilderType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -45,7 +52,7 @@ class Request_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -61,7 +68,7 @@ class Request_Builder extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"(Lokhttp3/Request;)V", + r'(Lokhttp3/Request;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -70,7 +77,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -86,8 +93,8 @@ class Request_Builder extends jni.JObject { } static final _id_url = _class.instanceMethodId( - r"url", - r"(Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder;", + r'url', + r'(Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder;', ); static final _url = ProtectedJniExtensions.lookup< @@ -96,7 +103,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -112,8 +119,8 @@ class Request_Builder extends jni.JObject { } static final _id_url1 = _class.instanceMethodId( - r"url", - r"(Ljava/lang/String;)Lokhttp3/Request$Builder;", + r'url', + r'(Ljava/lang/String;)Lokhttp3/Request$Builder;', ); static final _url1 = ProtectedJniExtensions.lookup< @@ -122,7 +129,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -138,8 +145,8 @@ class Request_Builder extends jni.JObject { } static final _id_url2 = _class.instanceMethodId( - r"url", - r"(Ljava/net/URL;)Lokhttp3/Request$Builder;", + r'url', + r'(Ljava/net/URL;)Lokhttp3/Request$Builder;', ); static final _url2 = ProtectedJniExtensions.lookup< @@ -148,7 +155,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -164,8 +171,8 @@ class Request_Builder extends jni.JObject { } static final _id_header = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;", + r'header', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;', ); static final _header = ProtectedJniExtensions.lookup< @@ -177,7 +184,7 @@ class Request_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -194,8 +201,8 @@ class Request_Builder extends jni.JObject { } static final _id_addHeader = _class.instanceMethodId( - r"addHeader", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;", + r'addHeader', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;', ); static final _addHeader = ProtectedJniExtensions.lookup< @@ -207,7 +214,7 @@ class Request_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -224,8 +231,8 @@ class Request_Builder extends jni.JObject { } static final _id_removeHeader = _class.instanceMethodId( - r"removeHeader", - r"(Ljava/lang/String;)Lokhttp3/Request$Builder;", + r'removeHeader', + r'(Ljava/lang/String;)Lokhttp3/Request$Builder;', ); static final _removeHeader = ProtectedJniExtensions.lookup< @@ -234,7 +241,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -250,8 +257,8 @@ class Request_Builder extends jni.JObject { } static final _id_headers = _class.instanceMethodId( - r"headers", - r"(Lokhttp3/Headers;)Lokhttp3/Request$Builder;", + r'headers', + r'(Lokhttp3/Headers;)Lokhttp3/Request$Builder;', ); static final _headers = ProtectedJniExtensions.lookup< @@ -260,7 +267,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -276,8 +283,8 @@ class Request_Builder extends jni.JObject { } static final _id_cacheControl = _class.instanceMethodId( - r"cacheControl", - r"(Lokhttp3/CacheControl;)Lokhttp3/Request$Builder;", + r'cacheControl', + r'(Lokhttp3/CacheControl;)Lokhttp3/Request$Builder;', ); static final _cacheControl = ProtectedJniExtensions.lookup< @@ -286,7 +293,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -304,8 +311,8 @@ class Request_Builder extends jni.JObject { } static final _id_get0 = _class.instanceMethodId( - r"get", - r"()Lokhttp3/Request$Builder;", + r'get', + r'()Lokhttp3/Request$Builder;', ); static final _get0 = ProtectedJniExtensions.lookup< @@ -313,7 +320,7 @@ class Request_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -328,8 +335,8 @@ class Request_Builder extends jni.JObject { } static final _id_head = _class.instanceMethodId( - r"head", - r"()Lokhttp3/Request$Builder;", + r'head', + r'()Lokhttp3/Request$Builder;', ); static final _head = ProtectedJniExtensions.lookup< @@ -337,7 +344,7 @@ class Request_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -352,8 +359,8 @@ class Request_Builder extends jni.JObject { } static final _id_post = _class.instanceMethodId( - r"post", - r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + r'post', + r'(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); static final _post = ProtectedJniExtensions.lookup< @@ -362,7 +369,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -378,8 +385,8 @@ class Request_Builder extends jni.JObject { } static final _id_delete = _class.instanceMethodId( - r"delete", - r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + r'delete', + r'(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); static final _delete = ProtectedJniExtensions.lookup< @@ -388,7 +395,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -404,8 +411,8 @@ class Request_Builder extends jni.JObject { } static final _id_put = _class.instanceMethodId( - r"put", - r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + r'put', + r'(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); static final _put = ProtectedJniExtensions.lookup< @@ -414,7 +421,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -430,8 +437,8 @@ class Request_Builder extends jni.JObject { } static final _id_patch = _class.instanceMethodId( - r"patch", - r"(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + r'patch', + r'(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); static final _patch = ProtectedJniExtensions.lookup< @@ -440,7 +447,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -456,8 +463,8 @@ class Request_Builder extends jni.JObject { } static final _id_method = _class.instanceMethodId( - r"method", - r"(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;", + r'method', + r'(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); static final _method = ProtectedJniExtensions.lookup< @@ -469,7 +476,7 @@ class Request_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -486,8 +493,8 @@ class Request_Builder extends jni.JObject { } static final _id_tag = _class.instanceMethodId( - r"tag", - r"(Ljava/lang/Object;)Lokhttp3/Request$Builder;", + r'tag', + r'(Ljava/lang/Object;)Lokhttp3/Request$Builder;', ); static final _tag = ProtectedJniExtensions.lookup< @@ -496,7 +503,7 @@ class Request_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -512,8 +519,8 @@ class Request_Builder extends jni.JObject { } static final _id_tag1 = _class.instanceMethodId( - r"tag", - r"(Ljava/lang/Class;Ljava/lang/Object;)Lokhttp3/Request$Builder;", + r'tag', + r'(Ljava/lang/Class;Ljava/lang/Object;)Lokhttp3/Request$Builder;', ); static final _tag1 = ProtectedJniExtensions.lookup< @@ -525,7 +532,7 @@ class Request_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -546,8 +553,8 @@ class Request_Builder extends jni.JObject { } static final _id_build = _class.instanceMethodId( - r"build", - r"()Lokhttp3/Request;", + r'build', + r'()Lokhttp3/Request;', ); static final _build = ProtectedJniExtensions.lookup< @@ -555,7 +562,7 @@ class Request_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -570,8 +577,8 @@ class Request_Builder extends jni.JObject { } static final _id_delete1 = _class.instanceMethodId( - r"delete", - r"()Lokhttp3/Request$Builder;", + r'delete', + r'()Lokhttp3/Request$Builder;', ); static final _delete1 = ProtectedJniExtensions.lookup< @@ -579,7 +586,7 @@ class Request_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -598,7 +605,7 @@ final class $Request_BuilderType extends jni.JObjType { const $Request_BuilderType(); @override - String get signature => r"Lokhttp3/Request$Builder;"; + String get signature => r'Lokhttp3/Request$Builder;'; @override Request_Builder fromReference(jni.JReference reference) => @@ -629,12 +636,12 @@ class Request extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Request"); + static final _class = jni.JClass.forName(r'okhttp3/Request'); /// The type which includes information such as the signature of this class. static const type = $RequestType(); static final _id_new0 = _class.constructorId( - r"(Lokhttp3/HttpUrl;Ljava/lang/String;Lokhttp3/Headers;Lokhttp3/RequestBody;Ljava/util/Map;)V", + r'(Lokhttp3/HttpUrl;Ljava/lang/String;Lokhttp3/Headers;Lokhttp3/RequestBody;Ljava/util/Map;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -649,7 +656,7 @@ class Request extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -681,8 +688,8 @@ class Request extends jni.JObject { } static final _id_url = _class.instanceMethodId( - r"url", - r"()Lokhttp3/HttpUrl;", + r'url', + r'()Lokhttp3/HttpUrl;', ); static final _url = ProtectedJniExtensions.lookup< @@ -690,7 +697,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -705,8 +712,8 @@ class Request extends jni.JObject { } static final _id_method = _class.instanceMethodId( - r"method", - r"()Ljava/lang/String;", + r'method', + r'()Ljava/lang/String;', ); static final _method = ProtectedJniExtensions.lookup< @@ -714,7 +721,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -729,8 +736,8 @@ class Request extends jni.JObject { } static final _id_headers = _class.instanceMethodId( - r"headers", - r"()Lokhttp3/Headers;", + r'headers', + r'()Lokhttp3/Headers;', ); static final _headers = ProtectedJniExtensions.lookup< @@ -738,7 +745,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -753,8 +760,8 @@ class Request extends jni.JObject { } static final _id_body = _class.instanceMethodId( - r"body", - r"()Lokhttp3/RequestBody;", + r'body', + r'()Lokhttp3/RequestBody;', ); static final _body = ProtectedJniExtensions.lookup< @@ -762,7 +769,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -777,8 +784,8 @@ class Request extends jni.JObject { } static final _id_isHttps = _class.instanceMethodId( - r"isHttps", - r"()Z", + r'isHttps', + r'()Z', ); static final _isHttps = ProtectedJniExtensions.lookup< @@ -786,7 +793,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -799,8 +806,8 @@ class Request extends jni.JObject { } static final _id_header = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;)Ljava/lang/String;", + r'header', + r'(Ljava/lang/String;)Ljava/lang/String;', ); static final _header = ProtectedJniExtensions.lookup< @@ -809,7 +816,7 @@ class Request extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -825,8 +832,8 @@ class Request extends jni.JObject { } static final _id_headers1 = _class.instanceMethodId( - r"headers", - r"(Ljava/lang/String;)Ljava/util/List;", + r'headers', + r'(Ljava/lang/String;)Ljava/util/List;', ); static final _headers1 = ProtectedJniExtensions.lookup< @@ -835,7 +842,7 @@ class Request extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -851,8 +858,8 @@ class Request extends jni.JObject { } static final _id_tag = _class.instanceMethodId( - r"tag", - r"()Ljava/lang/Object;", + r'tag', + r'()Ljava/lang/Object;', ); static final _tag = ProtectedJniExtensions.lookup< @@ -860,7 +867,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -875,8 +882,8 @@ class Request extends jni.JObject { } static final _id_tag1 = _class.instanceMethodId( - r"tag", - r"(Ljava/lang/Class;)Ljava/lang/Object;", + r'tag', + r'(Ljava/lang/Class;)Ljava/lang/Object;', ); static final _tag1 = ProtectedJniExtensions.lookup< @@ -885,7 +892,7 @@ class Request extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -902,8 +909,8 @@ class Request extends jni.JObject { } static final _id_newBuilder = _class.instanceMethodId( - r"newBuilder", - r"()Lokhttp3/Request$Builder;", + r'newBuilder', + r'()Lokhttp3/Request$Builder;', ); static final _newBuilder = ProtectedJniExtensions.lookup< @@ -911,7 +918,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -926,8 +933,8 @@ class Request extends jni.JObject { } static final _id_cacheControl = _class.instanceMethodId( - r"cacheControl", - r"()Lokhttp3/CacheControl;", + r'cacheControl', + r'()Lokhttp3/CacheControl;', ); static final _cacheControl = ProtectedJniExtensions.lookup< @@ -935,7 +942,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -951,8 +958,8 @@ class Request extends jni.JObject { } static final _id_toString1 = _class.instanceMethodId( - r"toString", - r"()Ljava/lang/String;", + r'toString', + r'()Ljava/lang/String;', ); static final _toString1 = ProtectedJniExtensions.lookup< @@ -960,7 +967,7 @@ class Request extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -979,7 +986,7 @@ final class $RequestType extends jni.JObjType { const $RequestType(); @override - String get signature => r"Lokhttp3/Request;"; + String get signature => r'Lokhttp3/Request;'; @override Request fromReference(jni.JReference reference) => @@ -1009,13 +1016,13 @@ class RequestBody_Companion extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/RequestBody$Companion"); + static final _class = jni.JClass.forName(r'okhttp3/RequestBody$Companion'); /// The type which includes information such as the signature of this class. static const type = $RequestBody_CompanionType(); static final _id_create = _class.instanceMethodId( - r"create", - r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create = ProtectedJniExtensions.lookup< @@ -1027,7 +1034,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1044,8 +1051,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create1 = _class.instanceMethodId( - r"create", - r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create1 = ProtectedJniExtensions.lookup< @@ -1057,7 +1064,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1065,7 +1072,7 @@ class RequestBody_Companion extends jni.JObject { /// from: public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) /// The returned object must be released after use, by calling the [release] method. RequestBody create1( - jni.JObject byteString, + ByteString byteString, jni.JObject mediaType, ) { return _create1(reference.pointer, _id_create1 as jni.JMethodIDPtr, @@ -1074,8 +1081,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create2 = _class.instanceMethodId( - r"create", - r"([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;", + r'create', + r'([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;', ); static final _create2 = ProtectedJniExtensions.lookup< @@ -1087,9 +1094,9 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32 - )>)>>("globalEnv_CallObjectMethod") + $Int32, + $Int32 + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int, int)>(); @@ -1108,8 +1115,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create3 = _class.instanceMethodId( - r"create", - r"(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create3 = ProtectedJniExtensions.lookup< @@ -1121,7 +1128,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1138,8 +1145,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create4 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;', ); static final _create4 = ProtectedJniExtensions.lookup< @@ -1151,7 +1158,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1168,8 +1175,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create5 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;', ); static final _create5 = ProtectedJniExtensions.lookup< @@ -1181,7 +1188,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1190,7 +1197,7 @@ class RequestBody_Companion extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. RequestBody create5( jni.JObject mediaType, - jni.JObject byteString, + ByteString byteString, ) { return _create5(reference.pointer, _id_create5 as jni.JMethodIDPtr, mediaType.reference.pointer, byteString.reference.pointer) @@ -1198,8 +1205,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create6 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;', ); static final _create6 = ProtectedJniExtensions.lookup< @@ -1211,9 +1218,9 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32 - )>)>>("globalEnv_CallObjectMethod") + $Int32, + $Int32 + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int, int)>(); @@ -1232,8 +1239,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create7 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;', ); static final _create7 = ProtectedJniExtensions.lookup< @@ -1245,7 +1252,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1262,8 +1269,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create8 = _class.instanceMethodId( - r"create", - r"([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;", + r'create', + r'([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;', ); static final _create8 = ProtectedJniExtensions.lookup< @@ -1275,8 +1282,8 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32 - )>)>>("globalEnv_CallObjectMethod") + $Int32 + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); @@ -1294,8 +1301,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create9 = _class.instanceMethodId( - r"create", - r"([BLokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'([BLokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create9 = ProtectedJniExtensions.lookup< @@ -1307,7 +1314,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1324,8 +1331,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create10 = _class.instanceMethodId( - r"create", - r"([B)Lokhttp3/RequestBody;", + r'create', + r'([B)Lokhttp3/RequestBody;', ); static final _create10 = ProtectedJniExtensions.lookup< @@ -1334,7 +1341,7 @@ class RequestBody_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1350,8 +1357,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create11 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;', ); static final _create11 = ProtectedJniExtensions.lookup< @@ -1363,8 +1370,8 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32 - )>)>>("globalEnv_CallObjectMethod") + $Int32 + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); @@ -1382,8 +1389,8 @@ class RequestBody_Companion extends jni.JObject { } static final _id_create12 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;', ); static final _create12 = ProtectedJniExtensions.lookup< @@ -1395,7 +1402,7 @@ class RequestBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1412,7 +1419,7 @@ class RequestBody_Companion extends jni.JObject { } static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -1421,7 +1428,7 @@ class RequestBody_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1444,7 +1451,7 @@ final class $RequestBody_CompanionType const $RequestBody_CompanionType(); @override - String get signature => r"Lokhttp3/RequestBody$Companion;"; + String get signature => r'Lokhttp3/RequestBody$Companion;'; @override RequestBody_Companion fromReference(jni.JReference reference) => @@ -1475,13 +1482,13 @@ class RequestBody extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/RequestBody"); + static final _class = jni.JClass.forName(r'okhttp3/RequestBody'); /// The type which includes information such as the signature of this class. static const type = $RequestBodyType(); static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/RequestBody$Companion;", + r'Companion', + r'Lokhttp3/RequestBody$Companion;', ); /// from: static public final okhttp3.RequestBody$Companion Companion @@ -1490,7 +1497,7 @@ class RequestBody extends jni.JObject { _id_Companion.get(_class, const $RequestBody_CompanionType()); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -1498,7 +1505,7 @@ class RequestBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1514,8 +1521,8 @@ class RequestBody extends jni.JObject { } static final _id_contentType = _class.instanceMethodId( - r"contentType", - r"()Lokhttp3/MediaType;", + r'contentType', + r'()Lokhttp3/MediaType;', ); static final _contentType = ProtectedJniExtensions.lookup< @@ -1523,7 +1530,7 @@ class RequestBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1538,8 +1545,8 @@ class RequestBody extends jni.JObject { } static final _id_contentLength = _class.instanceMethodId( - r"contentLength", - r"()J", + r'contentLength', + r'()J', ); static final _contentLength = ProtectedJniExtensions.lookup< @@ -1547,7 +1554,7 @@ class RequestBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1562,8 +1569,8 @@ class RequestBody extends jni.JObject { } static final _id_writeTo = _class.instanceMethodId( - r"writeTo", - r"(Lokio/BufferedSink;)V", + r'writeTo', + r'(Lokio/BufferedSink;)V', ); static final _writeTo = ProtectedJniExtensions.lookup< @@ -1572,7 +1579,7 @@ class RequestBody extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1587,8 +1594,8 @@ class RequestBody extends jni.JObject { } static final _id_isDuplex = _class.instanceMethodId( - r"isDuplex", - r"()Z", + r'isDuplex', + r'()Z', ); static final _isDuplex = ProtectedJniExtensions.lookup< @@ -1596,7 +1603,7 @@ class RequestBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1610,8 +1617,8 @@ class RequestBody extends jni.JObject { } static final _id_isOneShot = _class.instanceMethodId( - r"isOneShot", - r"()Z", + r'isOneShot', + r'()Z', ); static final _isOneShot = ProtectedJniExtensions.lookup< @@ -1619,7 +1626,7 @@ class RequestBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -1633,8 +1640,8 @@ class RequestBody extends jni.JObject { } static final _id_create = _class.staticMethodId( - r"create", - r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create = ProtectedJniExtensions.lookup< @@ -1646,7 +1653,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1663,8 +1670,8 @@ class RequestBody extends jni.JObject { } static final _id_create1 = _class.staticMethodId( - r"create", - r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create1 = ProtectedJniExtensions.lookup< @@ -1676,7 +1683,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1684,7 +1691,7 @@ class RequestBody extends jni.JObject { /// from: static public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) /// The returned object must be released after use, by calling the [release] method. static RequestBody create1( - jni.JObject byteString, + ByteString byteString, jni.JObject mediaType, ) { return _create1(_class.reference.pointer, _id_create1 as jni.JMethodIDPtr, @@ -1693,8 +1700,8 @@ class RequestBody extends jni.JObject { } static final _id_create2 = _class.staticMethodId( - r"create", - r"([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;", + r'create', + r'([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;', ); static final _create2 = ProtectedJniExtensions.lookup< @@ -1706,9 +1713,9 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32 - )>)>>("globalEnv_CallStaticObjectMethod") + $Int32, + $Int32 + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int, int)>(); @@ -1727,8 +1734,8 @@ class RequestBody extends jni.JObject { } static final _id_create3 = _class.staticMethodId( - r"create", - r"(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create3 = ProtectedJniExtensions.lookup< @@ -1740,7 +1747,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1757,8 +1764,8 @@ class RequestBody extends jni.JObject { } static final _id_create4 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;', ); static final _create4 = ProtectedJniExtensions.lookup< @@ -1770,7 +1777,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1787,8 +1794,8 @@ class RequestBody extends jni.JObject { } static final _id_create5 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;', ); static final _create5 = ProtectedJniExtensions.lookup< @@ -1800,7 +1807,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1809,7 +1816,7 @@ class RequestBody extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. static RequestBody create5( jni.JObject mediaType, - jni.JObject byteString, + ByteString byteString, ) { return _create5(_class.reference.pointer, _id_create5 as jni.JMethodIDPtr, mediaType.reference.pointer, byteString.reference.pointer) @@ -1817,8 +1824,8 @@ class RequestBody extends jni.JObject { } static final _id_create6 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;', ); static final _create6 = ProtectedJniExtensions.lookup< @@ -1830,9 +1837,9 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32 - )>)>>("globalEnv_CallStaticObjectMethod") + $Int32, + $Int32 + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int, int)>(); @@ -1851,8 +1858,8 @@ class RequestBody extends jni.JObject { } static final _id_create7 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;', ); static final _create7 = ProtectedJniExtensions.lookup< @@ -1864,7 +1871,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1881,8 +1888,8 @@ class RequestBody extends jni.JObject { } static final _id_create8 = _class.staticMethodId( - r"create", - r"([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;", + r'create', + r'([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;', ); static final _create8 = ProtectedJniExtensions.lookup< @@ -1894,8 +1901,8 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32 - )>)>>("globalEnv_CallStaticObjectMethod") + $Int32 + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); @@ -1913,8 +1920,8 @@ class RequestBody extends jni.JObject { } static final _id_create9 = _class.staticMethodId( - r"create", - r"([BLokhttp3/MediaType;)Lokhttp3/RequestBody;", + r'create', + r'([BLokhttp3/MediaType;)Lokhttp3/RequestBody;', ); static final _create9 = ProtectedJniExtensions.lookup< @@ -1926,7 +1933,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -1943,8 +1950,8 @@ class RequestBody extends jni.JObject { } static final _id_create10 = _class.staticMethodId( - r"create", - r"([B)Lokhttp3/RequestBody;", + r'create', + r'([B)Lokhttp3/RequestBody;', ); static final _create10 = ProtectedJniExtensions.lookup< @@ -1953,7 +1960,7 @@ class RequestBody extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -1969,8 +1976,8 @@ class RequestBody extends jni.JObject { } static final _id_create11 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;', ); static final _create11 = ProtectedJniExtensions.lookup< @@ -1982,8 +1989,8 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer, - ffi.Int32 - )>)>>("globalEnv_CallStaticObjectMethod") + $Int32 + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); @@ -2001,8 +2008,8 @@ class RequestBody extends jni.JObject { } static final _id_create12 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;", + r'create', + r'(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;', ); static final _create12 = ProtectedJniExtensions.lookup< @@ -2014,7 +2021,7 @@ class RequestBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -2035,7 +2042,7 @@ final class $RequestBodyType extends jni.JObjType { const $RequestBodyType(); @override - String get signature => r"Lokhttp3/RequestBody;"; + String get signature => r'Lokhttp3/RequestBody;'; @override RequestBody fromReference(jni.JReference reference) => @@ -2065,12 +2072,12 @@ class Response_Builder extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Response$Builder"); + static final _class = jni.JClass.forName(r'okhttp3/Response$Builder'); /// The type which includes information such as the signature of this class. static const type = $Response_BuilderType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -2078,7 +2085,7 @@ class Response_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2094,7 +2101,7 @@ class Response_Builder extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"(Lokhttp3/Response;)V", + r'(Lokhttp3/Response;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -2103,7 +2110,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2119,8 +2126,8 @@ class Response_Builder extends jni.JObject { } static final _id_request = _class.instanceMethodId( - r"request", - r"(Lokhttp3/Request;)Lokhttp3/Response$Builder;", + r'request', + r'(Lokhttp3/Request;)Lokhttp3/Response$Builder;', ); static final _request = ProtectedJniExtensions.lookup< @@ -2129,7 +2136,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2145,8 +2152,8 @@ class Response_Builder extends jni.JObject { } static final _id_protocol = _class.instanceMethodId( - r"protocol", - r"(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;", + r'protocol', + r'(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;', ); static final _protocol = ProtectedJniExtensions.lookup< @@ -2155,7 +2162,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2171,14 +2178,14 @@ class Response_Builder extends jni.JObject { } static final _id_code = _class.instanceMethodId( - r"code", - r"(I)Lokhttp3/Response$Builder;", + r'code', + r'(I)Lokhttp3/Response$Builder;', ); static final _code = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2193,8 +2200,8 @@ class Response_Builder extends jni.JObject { } static final _id_message = _class.instanceMethodId( - r"message", - r"(Ljava/lang/String;)Lokhttp3/Response$Builder;", + r'message', + r'(Ljava/lang/String;)Lokhttp3/Response$Builder;', ); static final _message = ProtectedJniExtensions.lookup< @@ -2203,7 +2210,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2219,8 +2226,8 @@ class Response_Builder extends jni.JObject { } static final _id_handshake = _class.instanceMethodId( - r"handshake", - r"(Lokhttp3/Handshake;)Lokhttp3/Response$Builder;", + r'handshake', + r'(Lokhttp3/Handshake;)Lokhttp3/Response$Builder;', ); static final _handshake = ProtectedJniExtensions.lookup< @@ -2229,7 +2236,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2245,8 +2252,8 @@ class Response_Builder extends jni.JObject { } static final _id_header = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;", + r'header', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;', ); static final _header = ProtectedJniExtensions.lookup< @@ -2258,7 +2265,7 @@ class Response_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -2275,8 +2282,8 @@ class Response_Builder extends jni.JObject { } static final _id_addHeader = _class.instanceMethodId( - r"addHeader", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;", + r'addHeader', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;', ); static final _addHeader = ProtectedJniExtensions.lookup< @@ -2288,7 +2295,7 @@ class Response_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -2305,8 +2312,8 @@ class Response_Builder extends jni.JObject { } static final _id_removeHeader = _class.instanceMethodId( - r"removeHeader", - r"(Ljava/lang/String;)Lokhttp3/Response$Builder;", + r'removeHeader', + r'(Ljava/lang/String;)Lokhttp3/Response$Builder;', ); static final _removeHeader = ProtectedJniExtensions.lookup< @@ -2315,7 +2322,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2331,8 +2338,8 @@ class Response_Builder extends jni.JObject { } static final _id_headers = _class.instanceMethodId( - r"headers", - r"(Lokhttp3/Headers;)Lokhttp3/Response$Builder;", + r'headers', + r'(Lokhttp3/Headers;)Lokhttp3/Response$Builder;', ); static final _headers = ProtectedJniExtensions.lookup< @@ -2341,7 +2348,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2357,8 +2364,8 @@ class Response_Builder extends jni.JObject { } static final _id_body = _class.instanceMethodId( - r"body", - r"(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;", + r'body', + r'(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;', ); static final _body = ProtectedJniExtensions.lookup< @@ -2367,7 +2374,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2383,8 +2390,8 @@ class Response_Builder extends jni.JObject { } static final _id_networkResponse = _class.instanceMethodId( - r"networkResponse", - r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", + r'networkResponse', + r'(Lokhttp3/Response;)Lokhttp3/Response$Builder;', ); static final _networkResponse = ProtectedJniExtensions.lookup< @@ -2393,7 +2400,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2409,8 +2416,8 @@ class Response_Builder extends jni.JObject { } static final _id_cacheResponse = _class.instanceMethodId( - r"cacheResponse", - r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", + r'cacheResponse', + r'(Lokhttp3/Response;)Lokhttp3/Response$Builder;', ); static final _cacheResponse = ProtectedJniExtensions.lookup< @@ -2419,7 +2426,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2435,8 +2442,8 @@ class Response_Builder extends jni.JObject { } static final _id_priorResponse = _class.instanceMethodId( - r"priorResponse", - r"(Lokhttp3/Response;)Lokhttp3/Response$Builder;", + r'priorResponse', + r'(Lokhttp3/Response;)Lokhttp3/Response$Builder;', ); static final _priorResponse = ProtectedJniExtensions.lookup< @@ -2445,7 +2452,7 @@ class Response_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -2461,14 +2468,14 @@ class Response_Builder extends jni.JObject { } static final _id_sentRequestAtMillis = _class.instanceMethodId( - r"sentRequestAtMillis", - r"(J)Lokhttp3/Response$Builder;", + r'sentRequestAtMillis', + r'(J)Lokhttp3/Response$Builder;', ); static final _sentRequestAtMillis = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2484,14 +2491,14 @@ class Response_Builder extends jni.JObject { } static final _id_receivedResponseAtMillis = _class.instanceMethodId( - r"receivedResponseAtMillis", - r"(J)Lokhttp3/Response$Builder;", + r'receivedResponseAtMillis', + r'(J)Lokhttp3/Response$Builder;', ); static final _receivedResponseAtMillis = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -2507,8 +2514,8 @@ class Response_Builder extends jni.JObject { } static final _id_build = _class.instanceMethodId( - r"build", - r"()Lokhttp3/Response;", + r'build', + r'()Lokhttp3/Response;', ); static final _build = ProtectedJniExtensions.lookup< @@ -2516,7 +2523,7 @@ class Response_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2535,7 +2542,7 @@ final class $Response_BuilderType extends jni.JObjType { const $Response_BuilderType(); @override - String get signature => r"Lokhttp3/Response$Builder;"; + String get signature => r'Lokhttp3/Response$Builder;'; @override Response_Builder fromReference(jni.JReference reference) => @@ -2566,12 +2573,12 @@ class Response extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Response"); + static final _class = jni.JClass.forName(r'okhttp3/Response'); /// The type which includes information such as the signature of this class. static const type = $ResponseType(); static final _id_new0 = _class.constructorId( - r"(Lokhttp3/Request;Lokhttp3/Protocol;Ljava/lang/String;ILokhttp3/Handshake;Lokhttp3/Headers;Lokhttp3/ResponseBody;Lokhttp3/Response;Lokhttp3/Response;Lokhttp3/Response;JJLokhttp3/internal/connection/Exchange;)V", + r'(Lokhttp3/Request;Lokhttp3/Protocol;Ljava/lang/String;ILokhttp3/Handshake;Lokhttp3/Headers;Lokhttp3/ResponseBody;Lokhttp3/Response;Lokhttp3/Response;Lokhttp3/Response;JJLokhttp3/internal/connection/Exchange;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -2584,7 +2591,7 @@ class Response extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, + $Int32, ffi.Pointer, ffi.Pointer, ffi.Pointer, @@ -2594,7 +2601,7 @@ class Response extends jni.JObject { ffi.Int64, ffi.Int64, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2650,8 +2657,8 @@ class Response extends jni.JObject { } static final _id_request = _class.instanceMethodId( - r"request", - r"()Lokhttp3/Request;", + r'request', + r'()Lokhttp3/Request;', ); static final _request = ProtectedJniExtensions.lookup< @@ -2659,7 +2666,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2674,8 +2681,8 @@ class Response extends jni.JObject { } static final _id_protocol = _class.instanceMethodId( - r"protocol", - r"()Lokhttp3/Protocol;", + r'protocol', + r'()Lokhttp3/Protocol;', ); static final _protocol = ProtectedJniExtensions.lookup< @@ -2683,7 +2690,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2698,8 +2705,8 @@ class Response extends jni.JObject { } static final _id_message = _class.instanceMethodId( - r"message", - r"()Ljava/lang/String;", + r'message', + r'()Ljava/lang/String;', ); static final _message = ProtectedJniExtensions.lookup< @@ -2707,7 +2714,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2722,8 +2729,8 @@ class Response extends jni.JObject { } static final _id_code = _class.instanceMethodId( - r"code", - r"()I", + r'code', + r'()I', ); static final _code = ProtectedJniExtensions.lookup< @@ -2731,7 +2738,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2744,8 +2751,8 @@ class Response extends jni.JObject { } static final _id_handshake = _class.instanceMethodId( - r"handshake", - r"()Lokhttp3/Handshake;", + r'handshake', + r'()Lokhttp3/Handshake;', ); static final _handshake = ProtectedJniExtensions.lookup< @@ -2753,7 +2760,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2768,8 +2775,8 @@ class Response extends jni.JObject { } static final _id_headers = _class.instanceMethodId( - r"headers", - r"()Lokhttp3/Headers;", + r'headers', + r'()Lokhttp3/Headers;', ); static final _headers = ProtectedJniExtensions.lookup< @@ -2777,7 +2784,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2792,8 +2799,8 @@ class Response extends jni.JObject { } static final _id_body = _class.instanceMethodId( - r"body", - r"()Lokhttp3/ResponseBody;", + r'body', + r'()Lokhttp3/ResponseBody;', ); static final _body = ProtectedJniExtensions.lookup< @@ -2801,7 +2808,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2816,8 +2823,8 @@ class Response extends jni.JObject { } static final _id_networkResponse = _class.instanceMethodId( - r"networkResponse", - r"()Lokhttp3/Response;", + r'networkResponse', + r'()Lokhttp3/Response;', ); static final _networkResponse = ProtectedJniExtensions.lookup< @@ -2825,7 +2832,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2841,8 +2848,8 @@ class Response extends jni.JObject { } static final _id_cacheResponse = _class.instanceMethodId( - r"cacheResponse", - r"()Lokhttp3/Response;", + r'cacheResponse', + r'()Lokhttp3/Response;', ); static final _cacheResponse = ProtectedJniExtensions.lookup< @@ -2850,7 +2857,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2866,8 +2873,8 @@ class Response extends jni.JObject { } static final _id_priorResponse = _class.instanceMethodId( - r"priorResponse", - r"()Lokhttp3/Response;", + r'priorResponse', + r'()Lokhttp3/Response;', ); static final _priorResponse = ProtectedJniExtensions.lookup< @@ -2875,7 +2882,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2891,8 +2898,8 @@ class Response extends jni.JObject { } static final _id_sentRequestAtMillis = _class.instanceMethodId( - r"sentRequestAtMillis", - r"()J", + r'sentRequestAtMillis', + r'()J', ); static final _sentRequestAtMillis = ProtectedJniExtensions.lookup< @@ -2900,7 +2907,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2915,8 +2922,8 @@ class Response extends jni.JObject { } static final _id_receivedResponseAtMillis = _class.instanceMethodId( - r"receivedResponseAtMillis", - r"()J", + r'receivedResponseAtMillis', + r'()J', ); static final _receivedResponseAtMillis = ProtectedJniExtensions.lookup< @@ -2924,7 +2931,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2939,8 +2946,8 @@ class Response extends jni.JObject { } static final _id_exchange = _class.instanceMethodId( - r"exchange", - r"()Lokhttp3/internal/connection/Exchange;", + r'exchange', + r'()Lokhttp3/internal/connection/Exchange;', ); static final _exchange = ProtectedJniExtensions.lookup< @@ -2948,7 +2955,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2963,8 +2970,8 @@ class Response extends jni.JObject { } static final _id_isSuccessful = _class.instanceMethodId( - r"isSuccessful", - r"()Z", + r'isSuccessful', + r'()Z', ); static final _isSuccessful = ProtectedJniExtensions.lookup< @@ -2972,7 +2979,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -2987,8 +2994,8 @@ class Response extends jni.JObject { } static final _id_headers1 = _class.instanceMethodId( - r"headers", - r"(Ljava/lang/String;)Ljava/util/List;", + r'headers', + r'(Ljava/lang/String;)Ljava/util/List;', ); static final _headers1 = ProtectedJniExtensions.lookup< @@ -2997,7 +3004,7 @@ class Response extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -3013,8 +3020,8 @@ class Response extends jni.JObject { } static final _id_header = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", + r'header', + r'(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;', ); static final _header = ProtectedJniExtensions.lookup< @@ -3026,7 +3033,7 @@ class Response extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3043,8 +3050,8 @@ class Response extends jni.JObject { } static final _id_trailers = _class.instanceMethodId( - r"trailers", - r"()Lokhttp3/Headers;", + r'trailers', + r'()Lokhttp3/Headers;', ); static final _trailers = ProtectedJniExtensions.lookup< @@ -3052,7 +3059,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3067,14 +3074,14 @@ class Response extends jni.JObject { } static final _id_peekBody = _class.instanceMethodId( - r"peekBody", - r"(J)Lokhttp3/ResponseBody;", + r'peekBody', + r'(J)Lokhttp3/ResponseBody;', ); static final _peekBody = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -3089,8 +3096,8 @@ class Response extends jni.JObject { } static final _id_newBuilder = _class.instanceMethodId( - r"newBuilder", - r"()Lokhttp3/Response$Builder;", + r'newBuilder', + r'()Lokhttp3/Response$Builder;', ); static final _newBuilder = ProtectedJniExtensions.lookup< @@ -3098,7 +3105,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3113,8 +3120,8 @@ class Response extends jni.JObject { } static final _id_isRedirect = _class.instanceMethodId( - r"isRedirect", - r"()Z", + r'isRedirect', + r'()Z', ); static final _isRedirect = ProtectedJniExtensions.lookup< @@ -3122,7 +3129,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3136,8 +3143,8 @@ class Response extends jni.JObject { } static final _id_challenges = _class.instanceMethodId( - r"challenges", - r"()Ljava/util/List;", + r'challenges', + r'()Ljava/util/List;', ); static final _challenges = ProtectedJniExtensions.lookup< @@ -3145,7 +3152,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3160,8 +3167,8 @@ class Response extends jni.JObject { } static final _id_cacheControl = _class.instanceMethodId( - r"cacheControl", - r"()Lokhttp3/CacheControl;", + r'cacheControl', + r'()Lokhttp3/CacheControl;', ); static final _cacheControl = ProtectedJniExtensions.lookup< @@ -3169,7 +3176,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3185,8 +3192,8 @@ class Response extends jni.JObject { } static final _id_close = _class.instanceMethodId( - r"close", - r"()V", + r'close', + r'()V', ); static final _close = ProtectedJniExtensions.lookup< @@ -3194,7 +3201,7 @@ class Response extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -3207,8 +3214,8 @@ class Response extends jni.JObject { } static final _id_toString1 = _class.instanceMethodId( - r"toString", - r"()Ljava/lang/String;", + r'toString', + r'()Ljava/lang/String;', ); static final _toString1 = ProtectedJniExtensions.lookup< @@ -3216,7 +3223,7 @@ class Response extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3231,8 +3238,8 @@ class Response extends jni.JObject { } static final _id_header1 = _class.instanceMethodId( - r"header", - r"(Ljava/lang/String;)Ljava/lang/String;", + r'header', + r'(Ljava/lang/String;)Ljava/lang/String;', ); static final _header1 = ProtectedJniExtensions.lookup< @@ -3241,7 +3248,7 @@ class Response extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -3261,7 +3268,7 @@ final class $ResponseType extends jni.JObjType { const $ResponseType(); @override - String get signature => r"Lokhttp3/Response;"; + String get signature => r'Lokhttp3/Response;'; @override Response fromReference(jni.JReference reference) => @@ -3292,12 +3299,12 @@ class ResponseBody_BomAwareReader extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"okhttp3/ResponseBody$BomAwareReader"); + jni.JClass.forName(r'okhttp3/ResponseBody$BomAwareReader'); /// The type which includes information such as the signature of this class. static const type = $ResponseBody_BomAwareReaderType(); static final _id_new0 = _class.constructorId( - r"(Lokio/BufferedSource;Ljava/nio/charset/Charset;)V", + r'(Lokio/BufferedSource;Ljava/nio/charset/Charset;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -3309,7 +3316,7 @@ class ResponseBody_BomAwareReader extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3329,21 +3336,17 @@ class ResponseBody_BomAwareReader extends jni.JObject { } static final _id_read = _class.instanceMethodId( - r"read", - r"([CII)I", + r'read', + r'([CII)I', ); static final _read = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Int32, - ffi.Int32 - )>)>>("globalEnv_CallIntMethod") + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( + 'globalEnv_CallIntMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, int)>(); @@ -3360,8 +3363,8 @@ class ResponseBody_BomAwareReader extends jni.JObject { } static final _id_close = _class.instanceMethodId( - r"close", - r"()V", + r'close', + r'()V', ); static final _close = ProtectedJniExtensions.lookup< @@ -3369,7 +3372,7 @@ class ResponseBody_BomAwareReader extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -3387,7 +3390,7 @@ final class $ResponseBody_BomAwareReaderType const $ResponseBody_BomAwareReaderType(); @override - String get signature => r"Lokhttp3/ResponseBody$BomAwareReader;"; + String get signature => r'Lokhttp3/ResponseBody$BomAwareReader;'; @override ResponseBody_BomAwareReader fromReference(jni.JReference reference) => @@ -3418,13 +3421,13 @@ class ResponseBody_Companion extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/ResponseBody$Companion"); + static final _class = jni.JClass.forName(r'okhttp3/ResponseBody$Companion'); /// The type which includes information such as the signature of this class. static const type = $ResponseBody_CompanionType(); static final _id_create = _class.instanceMethodId( - r"create", - r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + r'create', + r'(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); static final _create = ProtectedJniExtensions.lookup< @@ -3436,7 +3439,7 @@ class ResponseBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3453,8 +3456,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create1 = _class.instanceMethodId( - r"create", - r"([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;", + r'create', + r'([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); static final _create1 = ProtectedJniExtensions.lookup< @@ -3466,7 +3469,7 @@ class ResponseBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3483,8 +3486,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create2 = _class.instanceMethodId( - r"create", - r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); static final _create2 = ProtectedJniExtensions.lookup< @@ -3496,7 +3499,7 @@ class ResponseBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3504,7 +3507,7 @@ class ResponseBody_Companion extends jni.JObject { /// from: public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) /// The returned object must be released after use, by calling the [release] method. ResponseBody create2( - jni.JObject byteString, + ByteString byteString, jni.JObject mediaType, ) { return _create2(reference.pointer, _id_create2 as jni.JMethodIDPtr, @@ -3513,8 +3516,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create3 = _class.instanceMethodId( - r"create", - r"(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;", + r'create', + r'(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;', ); static final _create3 = ProtectedJniExtensions.lookup< @@ -3527,7 +3530,7 @@ class ResponseBody_Companion extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Int64 - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); @@ -3545,8 +3548,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create4 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;', ); static final _create4 = ProtectedJniExtensions.lookup< @@ -3558,7 +3561,7 @@ class ResponseBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3575,8 +3578,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create5 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;', ); static final _create5 = ProtectedJniExtensions.lookup< @@ -3588,7 +3591,7 @@ class ResponseBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3605,8 +3608,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create6 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;', ); static final _create6 = ProtectedJniExtensions.lookup< @@ -3618,7 +3621,7 @@ class ResponseBody_Companion extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -3627,7 +3630,7 @@ class ResponseBody_Companion extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. ResponseBody create6( jni.JObject mediaType, - jni.JObject byteString, + ByteString byteString, ) { return _create6(reference.pointer, _id_create6 as jni.JMethodIDPtr, mediaType.reference.pointer, byteString.reference.pointer) @@ -3635,8 +3638,8 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_create7 = _class.instanceMethodId( - r"create", - r"(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;', ); static final _create7 = ProtectedJniExtensions.lookup< @@ -3649,7 +3652,7 @@ class ResponseBody_Companion extends jni.JObject { ffi.Pointer, ffi.Int64, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, ffi.Pointer)>(); @@ -3667,7 +3670,7 @@ class ResponseBody_Companion extends jni.JObject { } static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -3676,7 +3679,7 @@ class ResponseBody_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -3699,7 +3702,7 @@ final class $ResponseBody_CompanionType const $ResponseBody_CompanionType(); @override - String get signature => r"Lokhttp3/ResponseBody$Companion;"; + String get signature => r'Lokhttp3/ResponseBody$Companion;'; @override ResponseBody_Companion fromReference(jni.JReference reference) => @@ -3730,13 +3733,13 @@ class ResponseBody extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/ResponseBody"); + static final _class = jni.JClass.forName(r'okhttp3/ResponseBody'); /// The type which includes information such as the signature of this class. static const type = $ResponseBodyType(); static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/ResponseBody$Companion;", + r'Companion', + r'Lokhttp3/ResponseBody$Companion;', ); /// from: static public final okhttp3.ResponseBody$Companion Companion @@ -3745,7 +3748,7 @@ class ResponseBody extends jni.JObject { _id_Companion.get(_class, const $ResponseBody_CompanionType()); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -3753,7 +3756,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3769,8 +3772,8 @@ class ResponseBody extends jni.JObject { } static final _id_contentType = _class.instanceMethodId( - r"contentType", - r"()Lokhttp3/MediaType;", + r'contentType', + r'()Lokhttp3/MediaType;', ); static final _contentType = ProtectedJniExtensions.lookup< @@ -3778,7 +3781,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3793,8 +3796,8 @@ class ResponseBody extends jni.JObject { } static final _id_contentLength = _class.instanceMethodId( - r"contentLength", - r"()J", + r'contentLength', + r'()J', ); static final _contentLength = ProtectedJniExtensions.lookup< @@ -3802,7 +3805,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3817,8 +3820,8 @@ class ResponseBody extends jni.JObject { } static final _id_byteStream = _class.instanceMethodId( - r"byteStream", - r"()Ljava/io/InputStream;", + r'byteStream', + r'()Ljava/io/InputStream;', ); static final _byteStream = ProtectedJniExtensions.lookup< @@ -3826,7 +3829,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3841,8 +3844,8 @@ class ResponseBody extends jni.JObject { } static final _id_source = _class.instanceMethodId( - r"source", - r"()Lokio/BufferedSource;", + r'source', + r'()Lokio/BufferedSource;', ); static final _source = ProtectedJniExtensions.lookup< @@ -3850,7 +3853,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3865,8 +3868,8 @@ class ResponseBody extends jni.JObject { } static final _id_bytes = _class.instanceMethodId( - r"bytes", - r"()[B", + r'bytes', + r'()[B', ); static final _bytes = ProtectedJniExtensions.lookup< @@ -3874,7 +3877,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3889,8 +3892,8 @@ class ResponseBody extends jni.JObject { } static final _id_byteString = _class.instanceMethodId( - r"byteString", - r"()Lokio/ByteString;", + r'byteString', + r'()Lokio/ByteString;', ); static final _byteString = ProtectedJniExtensions.lookup< @@ -3898,7 +3901,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3907,14 +3910,14 @@ class ResponseBody extends jni.JObject { /// from: public final okio.ByteString byteString() /// The returned object must be released after use, by calling the [release] method. - jni.JObject byteString() { + ByteString byteString() { return _byteString(reference.pointer, _id_byteString as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + .object(const $ByteStringType()); } static final _id_charStream = _class.instanceMethodId( - r"charStream", - r"()Ljava/io/Reader;", + r'charStream', + r'()Ljava/io/Reader;', ); static final _charStream = ProtectedJniExtensions.lookup< @@ -3922,7 +3925,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3937,8 +3940,8 @@ class ResponseBody extends jni.JObject { } static final _id_string = _class.instanceMethodId( - r"string", - r"()Ljava/lang/String;", + r'string', + r'()Ljava/lang/String;', ); static final _string = ProtectedJniExtensions.lookup< @@ -3946,7 +3949,7 @@ class ResponseBody extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -3961,8 +3964,8 @@ class ResponseBody extends jni.JObject { } static final _id_close = _class.instanceMethodId( - r"close", - r"()V", + r'close', + r'()V', ); static final _close = ProtectedJniExtensions.lookup< @@ -3970,7 +3973,7 @@ class ResponseBody extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -3983,8 +3986,8 @@ class ResponseBody extends jni.JObject { } static final _id_create = _class.staticMethodId( - r"create", - r"(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + r'create', + r'(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); static final _create = ProtectedJniExtensions.lookup< @@ -3996,7 +3999,7 @@ class ResponseBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4013,8 +4016,8 @@ class ResponseBody extends jni.JObject { } static final _id_create1 = _class.staticMethodId( - r"create", - r"([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;", + r'create', + r'([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); static final _create1 = ProtectedJniExtensions.lookup< @@ -4026,7 +4029,7 @@ class ResponseBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4043,8 +4046,8 @@ class ResponseBody extends jni.JObject { } static final _id_create2 = _class.staticMethodId( - r"create", - r"(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); static final _create2 = ProtectedJniExtensions.lookup< @@ -4056,7 +4059,7 @@ class ResponseBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4064,7 +4067,7 @@ class ResponseBody extends jni.JObject { /// from: static public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) /// The returned object must be released after use, by calling the [release] method. static ResponseBody create2( - jni.JObject byteString, + ByteString byteString, jni.JObject mediaType, ) { return _create2(_class.reference.pointer, _id_create2 as jni.JMethodIDPtr, @@ -4073,8 +4076,8 @@ class ResponseBody extends jni.JObject { } static final _id_create3 = _class.staticMethodId( - r"create", - r"(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;", + r'create', + r'(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;', ); static final _create3 = ProtectedJniExtensions.lookup< @@ -4087,7 +4090,7 @@ class ResponseBody extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Int64 - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer, int)>(); @@ -4105,8 +4108,8 @@ class ResponseBody extends jni.JObject { } static final _id_create4 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;', ); static final _create4 = ProtectedJniExtensions.lookup< @@ -4118,7 +4121,7 @@ class ResponseBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4135,8 +4138,8 @@ class ResponseBody extends jni.JObject { } static final _id_create5 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;', ); static final _create5 = ProtectedJniExtensions.lookup< @@ -4148,7 +4151,7 @@ class ResponseBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4165,8 +4168,8 @@ class ResponseBody extends jni.JObject { } static final _id_create6 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;', ); static final _create6 = ProtectedJniExtensions.lookup< @@ -4178,7 +4181,7 @@ class ResponseBody extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4187,7 +4190,7 @@ class ResponseBody extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. static ResponseBody create6( jni.JObject mediaType, - jni.JObject byteString, + ByteString byteString, ) { return _create6(_class.reference.pointer, _id_create6 as jni.JMethodIDPtr, mediaType.reference.pointer, byteString.reference.pointer) @@ -4195,8 +4198,8 @@ class ResponseBody extends jni.JObject { } static final _id_create7 = _class.staticMethodId( - r"create", - r"(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;", + r'create', + r'(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;', ); static final _create7 = ProtectedJniExtensions.lookup< @@ -4209,7 +4212,7 @@ class ResponseBody extends jni.JObject { ffi.Pointer, ffi.Int64, ffi.Pointer - )>)>>("globalEnv_CallStaticObjectMethod") + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, ffi.Pointer)>(); @@ -4231,7 +4234,7 @@ final class $ResponseBodyType extends jni.JObjType { const $ResponseBodyType(); @override - String get signature => r"Lokhttp3/ResponseBody;"; + String get signature => r'Lokhttp3/ResponseBody;'; @override ResponseBody fromReference(jni.JReference reference) => @@ -4262,12 +4265,12 @@ class OkHttpClient_Builder extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient$Builder"); + static final _class = jni.JClass.forName(r'okhttp3/OkHttpClient$Builder'); /// The type which includes information such as the signature of this class. static const type = $OkHttpClient_BuilderType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -4275,7 +4278,7 @@ class OkHttpClient_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4291,7 +4294,7 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"(Lokhttp3/OkHttpClient;)V", + r'(Lokhttp3/OkHttpClient;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -4300,7 +4303,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4316,8 +4319,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_dispatcher = _class.instanceMethodId( - r"dispatcher", - r"(Lokhttp3/Dispatcher;)Lokhttp3/OkHttpClient$Builder;", + r'dispatcher', + r'(Lokhttp3/Dispatcher;)Lokhttp3/OkHttpClient$Builder;', ); static final _dispatcher = ProtectedJniExtensions.lookup< @@ -4326,7 +4329,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4342,8 +4345,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_connectionPool = _class.instanceMethodId( - r"connectionPool", - r"(Lokhttp3/ConnectionPool;)Lokhttp3/OkHttpClient$Builder;", + r'connectionPool', + r'(Lokhttp3/ConnectionPool;)Lokhttp3/OkHttpClient$Builder;', ); static final _connectionPool = ProtectedJniExtensions.lookup< @@ -4352,7 +4355,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4370,8 +4373,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_interceptors = _class.instanceMethodId( - r"interceptors", - r"()Ljava/util/List;", + r'interceptors', + r'()Ljava/util/List;', ); static final _interceptors = ProtectedJniExtensions.lookup< @@ -4379,7 +4382,7 @@ class OkHttpClient_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4395,8 +4398,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_addInterceptor = _class.instanceMethodId( - r"addInterceptor", - r"(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;", + r'addInterceptor', + r'(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;', ); static final _addInterceptor = ProtectedJniExtensions.lookup< @@ -4405,7 +4408,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4423,8 +4426,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_networkInterceptors = _class.instanceMethodId( - r"networkInterceptors", - r"()Ljava/util/List;", + r'networkInterceptors', + r'()Ljava/util/List;', ); static final _networkInterceptors = ProtectedJniExtensions.lookup< @@ -4432,7 +4435,7 @@ class OkHttpClient_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -4448,8 +4451,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_addNetworkInterceptor = _class.instanceMethodId( - r"addNetworkInterceptor", - r"(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;", + r'addNetworkInterceptor', + r'(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;', ); static final _addNetworkInterceptor = ProtectedJniExtensions.lookup< @@ -4458,7 +4461,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4476,8 +4479,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_eventListener = _class.instanceMethodId( - r"eventListener", - r"(Lokhttp3/EventListener;)Lokhttp3/OkHttpClient$Builder;", + r'eventListener', + r'(Lokhttp3/EventListener;)Lokhttp3/OkHttpClient$Builder;', ); static final _eventListener = ProtectedJniExtensions.lookup< @@ -4486,7 +4489,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4504,8 +4507,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_eventListenerFactory = _class.instanceMethodId( - r"eventListenerFactory", - r"(Lokhttp3/EventListener$Factory;)Lokhttp3/OkHttpClient$Builder;", + r'eventListenerFactory', + r'(Lokhttp3/EventListener$Factory;)Lokhttp3/OkHttpClient$Builder;', ); static final _eventListenerFactory = ProtectedJniExtensions.lookup< @@ -4514,7 +4517,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4532,14 +4535,14 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_retryOnConnectionFailure = _class.instanceMethodId( - r"retryOnConnectionFailure", - r"(Z)Lokhttp3/OkHttpClient$Builder;", + r'retryOnConnectionFailure', + r'(Z)Lokhttp3/OkHttpClient$Builder;', ); static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -4555,8 +4558,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_authenticator = _class.instanceMethodId( - r"authenticator", - r"(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;", + r'authenticator', + r'(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;', ); static final _authenticator = ProtectedJniExtensions.lookup< @@ -4565,7 +4568,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4583,14 +4586,14 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_followRedirects = _class.instanceMethodId( - r"followRedirects", - r"(Z)Lokhttp3/OkHttpClient$Builder;", + r'followRedirects', + r'(Z)Lokhttp3/OkHttpClient$Builder;', ); static final _followRedirects = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -4606,14 +4609,14 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_followSslRedirects = _class.instanceMethodId( - r"followSslRedirects", - r"(Z)Lokhttp3/OkHttpClient$Builder;", + r'followSslRedirects', + r'(Z)Lokhttp3/OkHttpClient$Builder;', ); static final _followSslRedirects = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Uint8,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -4629,8 +4632,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_cookieJar = _class.instanceMethodId( - r"cookieJar", - r"(Lokhttp3/CookieJar;)Lokhttp3/OkHttpClient$Builder;", + r'cookieJar', + r'(Lokhttp3/CookieJar;)Lokhttp3/OkHttpClient$Builder;', ); static final _cookieJar = ProtectedJniExtensions.lookup< @@ -4639,7 +4642,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4655,8 +4658,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_cache = _class.instanceMethodId( - r"cache", - r"(Lokhttp3/Cache;)Lokhttp3/OkHttpClient$Builder;", + r'cache', + r'(Lokhttp3/Cache;)Lokhttp3/OkHttpClient$Builder;', ); static final _cache = ProtectedJniExtensions.lookup< @@ -4665,7 +4668,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4681,8 +4684,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_dns = _class.instanceMethodId( - r"dns", - r"(Lokhttp3/Dns;)Lokhttp3/OkHttpClient$Builder;", + r'dns', + r'(Lokhttp3/Dns;)Lokhttp3/OkHttpClient$Builder;', ); static final _dns = ProtectedJniExtensions.lookup< @@ -4691,7 +4694,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4707,8 +4710,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_proxy = _class.instanceMethodId( - r"proxy", - r"(Ljava/net/Proxy;)Lokhttp3/OkHttpClient$Builder;", + r'proxy', + r'(Ljava/net/Proxy;)Lokhttp3/OkHttpClient$Builder;', ); static final _proxy = ProtectedJniExtensions.lookup< @@ -4717,7 +4720,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4733,8 +4736,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_proxySelector = _class.instanceMethodId( - r"proxySelector", - r"(Ljava/net/ProxySelector;)Lokhttp3/OkHttpClient$Builder;", + r'proxySelector', + r'(Ljava/net/ProxySelector;)Lokhttp3/OkHttpClient$Builder;', ); static final _proxySelector = ProtectedJniExtensions.lookup< @@ -4743,7 +4746,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4761,8 +4764,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_proxyAuthenticator = _class.instanceMethodId( - r"proxyAuthenticator", - r"(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;", + r'proxyAuthenticator', + r'(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;', ); static final _proxyAuthenticator = ProtectedJniExtensions.lookup< @@ -4771,7 +4774,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4789,8 +4792,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_socketFactory = _class.instanceMethodId( - r"socketFactory", - r"(Ljavax/net/SocketFactory;)Lokhttp3/OkHttpClient$Builder;", + r'socketFactory', + r'(Ljavax/net/SocketFactory;)Lokhttp3/OkHttpClient$Builder;', ); static final _socketFactory = ProtectedJniExtensions.lookup< @@ -4799,7 +4802,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4817,8 +4820,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_sslSocketFactory = _class.instanceMethodId( - r"sslSocketFactory", - r"(Ljavax/net/ssl/SSLSocketFactory;)Lokhttp3/OkHttpClient$Builder;", + r'sslSocketFactory', + r'(Ljavax/net/ssl/SSLSocketFactory;)Lokhttp3/OkHttpClient$Builder;', ); static final _sslSocketFactory = ProtectedJniExtensions.lookup< @@ -4827,7 +4830,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4845,8 +4848,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_sslSocketFactory1 = _class.instanceMethodId( - r"sslSocketFactory", - r"(Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/X509TrustManager;)Lokhttp3/OkHttpClient$Builder;", + r'sslSocketFactory', + r'(Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/X509TrustManager;)Lokhttp3/OkHttpClient$Builder;', ); static final _sslSocketFactory1 = ProtectedJniExtensions.lookup< @@ -4858,7 +4861,7 @@ class OkHttpClient_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -4878,8 +4881,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_connectionSpecs = _class.instanceMethodId( - r"connectionSpecs", - r"(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;", + r'connectionSpecs', + r'(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;', ); static final _connectionSpecs = ProtectedJniExtensions.lookup< @@ -4888,7 +4891,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4904,8 +4907,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_protocols = _class.instanceMethodId( - r"protocols", - r"(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;", + r'protocols', + r'(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;', ); static final _protocols = ProtectedJniExtensions.lookup< @@ -4914,7 +4917,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4930,8 +4933,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_hostnameVerifier = _class.instanceMethodId( - r"hostnameVerifier", - r"(Ljavax/net/ssl/HostnameVerifier;)Lokhttp3/OkHttpClient$Builder;", + r'hostnameVerifier', + r'(Ljavax/net/ssl/HostnameVerifier;)Lokhttp3/OkHttpClient$Builder;', ); static final _hostnameVerifier = ProtectedJniExtensions.lookup< @@ -4940,7 +4943,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4958,8 +4961,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_certificatePinner = _class.instanceMethodId( - r"certificatePinner", - r"(Lokhttp3/CertificatePinner;)Lokhttp3/OkHttpClient$Builder;", + r'certificatePinner', + r'(Lokhttp3/CertificatePinner;)Lokhttp3/OkHttpClient$Builder;', ); static final _certificatePinner = ProtectedJniExtensions.lookup< @@ -4968,7 +4971,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -4986,8 +4989,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_callTimeout = _class.instanceMethodId( - r"callTimeout", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + r'callTimeout', + r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); static final _callTimeout = ProtectedJniExtensions.lookup< @@ -4996,7 +4999,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, ffi.Pointer)>(); @@ -5013,8 +5016,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_callTimeout1 = _class.instanceMethodId( - r"callTimeout", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + r'callTimeout', + r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); static final _callTimeout1 = ProtectedJniExtensions.lookup< @@ -5023,7 +5026,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5039,8 +5042,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_connectTimeout = _class.instanceMethodId( - r"connectTimeout", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + r'connectTimeout', + r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); static final _connectTimeout = ProtectedJniExtensions.lookup< @@ -5049,7 +5052,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, ffi.Pointer)>(); @@ -5069,8 +5072,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_connectTimeout1 = _class.instanceMethodId( - r"connectTimeout", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + r'connectTimeout', + r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); static final _connectTimeout1 = ProtectedJniExtensions.lookup< @@ -5079,7 +5082,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5095,8 +5098,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_readTimeout = _class.instanceMethodId( - r"readTimeout", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + r'readTimeout', + r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); static final _readTimeout = ProtectedJniExtensions.lookup< @@ -5105,7 +5108,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, ffi.Pointer)>(); @@ -5122,8 +5125,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_readTimeout1 = _class.instanceMethodId( - r"readTimeout", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + r'readTimeout', + r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); static final _readTimeout1 = ProtectedJniExtensions.lookup< @@ -5132,7 +5135,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5148,8 +5151,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_writeTimeout = _class.instanceMethodId( - r"writeTimeout", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + r'writeTimeout', + r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); static final _writeTimeout = ProtectedJniExtensions.lookup< @@ -5158,7 +5161,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, ffi.Pointer)>(); @@ -5175,8 +5178,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_writeTimeout1 = _class.instanceMethodId( - r"writeTimeout", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + r'writeTimeout', + r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); static final _writeTimeout1 = ProtectedJniExtensions.lookup< @@ -5185,7 +5188,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5201,8 +5204,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_pingInterval = _class.instanceMethodId( - r"pingInterval", - r"(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;", + r'pingInterval', + r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); static final _pingInterval = ProtectedJniExtensions.lookup< @@ -5211,7 +5214,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, ffi.Pointer)>(); @@ -5228,8 +5231,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_pingInterval1 = _class.instanceMethodId( - r"pingInterval", - r"(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;", + r'pingInterval', + r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); static final _pingInterval1 = ProtectedJniExtensions.lookup< @@ -5238,7 +5241,7 @@ class OkHttpClient_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5254,14 +5257,14 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_minWebSocketMessageToCompress = _class.instanceMethodId( - r"minWebSocketMessageToCompress", - r"(J)Lokhttp3/OkHttpClient$Builder;", + r'minWebSocketMessageToCompress', + r'(J)Lokhttp3/OkHttpClient$Builder;', ); static final _minWebSocketMessageToCompress = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -5277,8 +5280,8 @@ class OkHttpClient_Builder extends jni.JObject { } static final _id_build = _class.instanceMethodId( - r"build", - r"()Lokhttp3/OkHttpClient;", + r'build', + r'()Lokhttp3/OkHttpClient;', ); static final _build = ProtectedJniExtensions.lookup< @@ -5286,7 +5289,7 @@ class OkHttpClient_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5306,7 +5309,7 @@ final class $OkHttpClient_BuilderType const $OkHttpClient_BuilderType(); @override - String get signature => r"Lokhttp3/OkHttpClient$Builder;"; + String get signature => r'Lokhttp3/OkHttpClient$Builder;'; @override OkHttpClient_Builder fromReference(jni.JReference reference) => @@ -5337,12 +5340,12 @@ class OkHttpClient_Companion extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient$Companion"); + static final _class = jni.JClass.forName(r'okhttp3/OkHttpClient$Companion'); /// The type which includes information such as the signature of this class. static const type = $OkHttpClient_CompanionType(); static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -5351,7 +5354,7 @@ class OkHttpClient_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5374,7 +5377,7 @@ final class $OkHttpClient_CompanionType const $OkHttpClient_CompanionType(); @override - String get signature => r"Lokhttp3/OkHttpClient$Companion;"; + String get signature => r'Lokhttp3/OkHttpClient$Companion;'; @override OkHttpClient_Companion fromReference(jni.JReference reference) => @@ -5405,13 +5408,13 @@ class OkHttpClient extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/OkHttpClient"); + static final _class = jni.JClass.forName(r'okhttp3/OkHttpClient'); /// The type which includes information such as the signature of this class. static const type = $OkHttpClientType(); static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/OkHttpClient$Companion;", + r'Companion', + r'Lokhttp3/OkHttpClient$Companion;', ); /// from: static public final okhttp3.OkHttpClient$Companion Companion @@ -5420,7 +5423,7 @@ class OkHttpClient extends jni.JObject { _id_Companion.get(_class, const $OkHttpClient_CompanionType()); static final _id_new0 = _class.constructorId( - r"(Lokhttp3/OkHttpClient$Builder;)V", + r'(Lokhttp3/OkHttpClient$Builder;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -5429,7 +5432,7 @@ class OkHttpClient extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -5445,8 +5448,8 @@ class OkHttpClient extends jni.JObject { } static final _id_dispatcher = _class.instanceMethodId( - r"dispatcher", - r"()Lokhttp3/Dispatcher;", + r'dispatcher', + r'()Lokhttp3/Dispatcher;', ); static final _dispatcher = ProtectedJniExtensions.lookup< @@ -5454,7 +5457,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5469,8 +5472,8 @@ class OkHttpClient extends jni.JObject { } static final _id_connectionPool = _class.instanceMethodId( - r"connectionPool", - r"()Lokhttp3/ConnectionPool;", + r'connectionPool', + r'()Lokhttp3/ConnectionPool;', ); static final _connectionPool = ProtectedJniExtensions.lookup< @@ -5478,7 +5481,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5494,8 +5497,8 @@ class OkHttpClient extends jni.JObject { } static final _id_interceptors = _class.instanceMethodId( - r"interceptors", - r"()Ljava/util/List;", + r'interceptors', + r'()Ljava/util/List;', ); static final _interceptors = ProtectedJniExtensions.lookup< @@ -5503,7 +5506,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5519,8 +5522,8 @@ class OkHttpClient extends jni.JObject { } static final _id_networkInterceptors = _class.instanceMethodId( - r"networkInterceptors", - r"()Ljava/util/List;", + r'networkInterceptors', + r'()Ljava/util/List;', ); static final _networkInterceptors = ProtectedJniExtensions.lookup< @@ -5528,7 +5531,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5544,8 +5547,8 @@ class OkHttpClient extends jni.JObject { } static final _id_eventListenerFactory = _class.instanceMethodId( - r"eventListenerFactory", - r"()Lokhttp3/EventListener$Factory;", + r'eventListenerFactory', + r'()Lokhttp3/EventListener$Factory;', ); static final _eventListenerFactory = ProtectedJniExtensions.lookup< @@ -5553,7 +5556,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5569,8 +5572,8 @@ class OkHttpClient extends jni.JObject { } static final _id_retryOnConnectionFailure = _class.instanceMethodId( - r"retryOnConnectionFailure", - r"()Z", + r'retryOnConnectionFailure', + r'()Z', ); static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< @@ -5578,7 +5581,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5593,8 +5596,8 @@ class OkHttpClient extends jni.JObject { } static final _id_authenticator = _class.instanceMethodId( - r"authenticator", - r"()Lokhttp3/Authenticator;", + r'authenticator', + r'()Lokhttp3/Authenticator;', ); static final _authenticator = ProtectedJniExtensions.lookup< @@ -5602,7 +5605,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5618,8 +5621,8 @@ class OkHttpClient extends jni.JObject { } static final _id_followRedirects = _class.instanceMethodId( - r"followRedirects", - r"()Z", + r'followRedirects', + r'()Z', ); static final _followRedirects = ProtectedJniExtensions.lookup< @@ -5627,7 +5630,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5642,8 +5645,8 @@ class OkHttpClient extends jni.JObject { } static final _id_followSslRedirects = _class.instanceMethodId( - r"followSslRedirects", - r"()Z", + r'followSslRedirects', + r'()Z', ); static final _followSslRedirects = ProtectedJniExtensions.lookup< @@ -5651,7 +5654,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5666,8 +5669,8 @@ class OkHttpClient extends jni.JObject { } static final _id_cookieJar = _class.instanceMethodId( - r"cookieJar", - r"()Lokhttp3/CookieJar;", + r'cookieJar', + r'()Lokhttp3/CookieJar;', ); static final _cookieJar = ProtectedJniExtensions.lookup< @@ -5675,7 +5678,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5690,8 +5693,8 @@ class OkHttpClient extends jni.JObject { } static final _id_cache = _class.instanceMethodId( - r"cache", - r"()Lokhttp3/Cache;", + r'cache', + r'()Lokhttp3/Cache;', ); static final _cache = ProtectedJniExtensions.lookup< @@ -5699,7 +5702,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5714,8 +5717,8 @@ class OkHttpClient extends jni.JObject { } static final _id_dns = _class.instanceMethodId( - r"dns", - r"()Lokhttp3/Dns;", + r'dns', + r'()Lokhttp3/Dns;', ); static final _dns = ProtectedJniExtensions.lookup< @@ -5723,7 +5726,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5738,8 +5741,8 @@ class OkHttpClient extends jni.JObject { } static final _id_proxy = _class.instanceMethodId( - r"proxy", - r"()Ljava/net/Proxy;", + r'proxy', + r'()Ljava/net/Proxy;', ); static final _proxy = ProtectedJniExtensions.lookup< @@ -5747,7 +5750,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5762,8 +5765,8 @@ class OkHttpClient extends jni.JObject { } static final _id_proxySelector = _class.instanceMethodId( - r"proxySelector", - r"()Ljava/net/ProxySelector;", + r'proxySelector', + r'()Ljava/net/ProxySelector;', ); static final _proxySelector = ProtectedJniExtensions.lookup< @@ -5771,7 +5774,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5787,8 +5790,8 @@ class OkHttpClient extends jni.JObject { } static final _id_proxyAuthenticator = _class.instanceMethodId( - r"proxyAuthenticator", - r"()Lokhttp3/Authenticator;", + r'proxyAuthenticator', + r'()Lokhttp3/Authenticator;', ); static final _proxyAuthenticator = ProtectedJniExtensions.lookup< @@ -5796,7 +5799,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5812,8 +5815,8 @@ class OkHttpClient extends jni.JObject { } static final _id_socketFactory = _class.instanceMethodId( - r"socketFactory", - r"()Ljavax/net/SocketFactory;", + r'socketFactory', + r'()Ljavax/net/SocketFactory;', ); static final _socketFactory = ProtectedJniExtensions.lookup< @@ -5821,7 +5824,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5837,8 +5840,8 @@ class OkHttpClient extends jni.JObject { } static final _id_sslSocketFactory = _class.instanceMethodId( - r"sslSocketFactory", - r"()Ljavax/net/ssl/SSLSocketFactory;", + r'sslSocketFactory', + r'()Ljavax/net/ssl/SSLSocketFactory;', ); static final _sslSocketFactory = ProtectedJniExtensions.lookup< @@ -5846,7 +5849,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5862,8 +5865,8 @@ class OkHttpClient extends jni.JObject { } static final _id_x509TrustManager = _class.instanceMethodId( - r"x509TrustManager", - r"()Ljavax/net/ssl/X509TrustManager;", + r'x509TrustManager', + r'()Ljavax/net/ssl/X509TrustManager;', ); static final _x509TrustManager = ProtectedJniExtensions.lookup< @@ -5871,7 +5874,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5887,8 +5890,8 @@ class OkHttpClient extends jni.JObject { } static final _id_connectionSpecs = _class.instanceMethodId( - r"connectionSpecs", - r"()Ljava/util/List;", + r'connectionSpecs', + r'()Ljava/util/List;', ); static final _connectionSpecs = ProtectedJniExtensions.lookup< @@ -5896,7 +5899,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5912,8 +5915,8 @@ class OkHttpClient extends jni.JObject { } static final _id_protocols = _class.instanceMethodId( - r"protocols", - r"()Ljava/util/List;", + r'protocols', + r'()Ljava/util/List;', ); static final _protocols = ProtectedJniExtensions.lookup< @@ -5921,7 +5924,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5936,8 +5939,8 @@ class OkHttpClient extends jni.JObject { } static final _id_hostnameVerifier = _class.instanceMethodId( - r"hostnameVerifier", - r"()Ljavax/net/ssl/HostnameVerifier;", + r'hostnameVerifier', + r'()Ljavax/net/ssl/HostnameVerifier;', ); static final _hostnameVerifier = ProtectedJniExtensions.lookup< @@ -5945,7 +5948,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5961,8 +5964,8 @@ class OkHttpClient extends jni.JObject { } static final _id_certificatePinner = _class.instanceMethodId( - r"certificatePinner", - r"()Lokhttp3/CertificatePinner;", + r'certificatePinner', + r'()Lokhttp3/CertificatePinner;', ); static final _certificatePinner = ProtectedJniExtensions.lookup< @@ -5970,7 +5973,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -5986,8 +5989,8 @@ class OkHttpClient extends jni.JObject { } static final _id_certificateChainCleaner = _class.instanceMethodId( - r"certificateChainCleaner", - r"()Lokhttp3/internal/tls/CertificateChainCleaner;", + r'certificateChainCleaner', + r'()Lokhttp3/internal/tls/CertificateChainCleaner;', ); static final _certificateChainCleaner = ProtectedJniExtensions.lookup< @@ -5995,7 +5998,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6011,8 +6014,8 @@ class OkHttpClient extends jni.JObject { } static final _id_callTimeoutMillis = _class.instanceMethodId( - r"callTimeoutMillis", - r"()I", + r'callTimeoutMillis', + r'()I', ); static final _callTimeoutMillis = ProtectedJniExtensions.lookup< @@ -6020,7 +6023,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6035,8 +6038,8 @@ class OkHttpClient extends jni.JObject { } static final _id_connectTimeoutMillis = _class.instanceMethodId( - r"connectTimeoutMillis", - r"()I", + r'connectTimeoutMillis', + r'()I', ); static final _connectTimeoutMillis = ProtectedJniExtensions.lookup< @@ -6044,7 +6047,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6059,8 +6062,8 @@ class OkHttpClient extends jni.JObject { } static final _id_readTimeoutMillis = _class.instanceMethodId( - r"readTimeoutMillis", - r"()I", + r'readTimeoutMillis', + r'()I', ); static final _readTimeoutMillis = ProtectedJniExtensions.lookup< @@ -6068,7 +6071,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6083,8 +6086,8 @@ class OkHttpClient extends jni.JObject { } static final _id_writeTimeoutMillis = _class.instanceMethodId( - r"writeTimeoutMillis", - r"()I", + r'writeTimeoutMillis', + r'()I', ); static final _writeTimeoutMillis = ProtectedJniExtensions.lookup< @@ -6092,7 +6095,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6107,8 +6110,8 @@ class OkHttpClient extends jni.JObject { } static final _id_pingIntervalMillis = _class.instanceMethodId( - r"pingIntervalMillis", - r"()I", + r'pingIntervalMillis', + r'()I', ); static final _pingIntervalMillis = ProtectedJniExtensions.lookup< @@ -6116,7 +6119,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6131,8 +6134,8 @@ class OkHttpClient extends jni.JObject { } static final _id_minWebSocketMessageToCompress = _class.instanceMethodId( - r"minWebSocketMessageToCompress", - r"()J", + r'minWebSocketMessageToCompress', + r'()J', ); static final _minWebSocketMessageToCompress = ProtectedJniExtensions.lookup< @@ -6140,7 +6143,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6155,8 +6158,8 @@ class OkHttpClient extends jni.JObject { } static final _id_getRouteDatabase = _class.instanceMethodId( - r"getRouteDatabase", - r"()Lokhttp3/internal/connection/RouteDatabase;", + r'getRouteDatabase', + r'()Lokhttp3/internal/connection/RouteDatabase;', ); static final _getRouteDatabase = ProtectedJniExtensions.lookup< @@ -6164,7 +6167,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6180,7 +6183,7 @@ class OkHttpClient extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"()V", + r'()V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -6188,7 +6191,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6204,8 +6207,8 @@ class OkHttpClient extends jni.JObject { } static final _id_newCall = _class.instanceMethodId( - r"newCall", - r"(Lokhttp3/Request;)Lokhttp3/Call;", + r'newCall', + r'(Lokhttp3/Request;)Lokhttp3/Call;', ); static final _newCall = ProtectedJniExtensions.lookup< @@ -6214,7 +6217,7 @@ class OkHttpClient extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -6230,8 +6233,8 @@ class OkHttpClient extends jni.JObject { } static final _id_newWebSocket = _class.instanceMethodId( - r"newWebSocket", - r"(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;", + r'newWebSocket', + r'(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;', ); static final _newWebSocket = ProtectedJniExtensions.lookup< @@ -6243,14 +6246,14 @@ class OkHttpClient extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); /// from: public okhttp3.WebSocket newWebSocket(okhttp3.Request request, okhttp3.WebSocketListener webSocketListener) /// The returned object must be released after use, by calling the [release] method. - jni.JObject newWebSocket( + WebSocket newWebSocket( Request request, jni.JObject webSocketListener, ) { @@ -6259,12 +6262,12 @@ class OkHttpClient extends jni.JObject { _id_newWebSocket as jni.JMethodIDPtr, request.reference.pointer, webSocketListener.reference.pointer) - .object(const jni.JObjectType()); + .object(const $WebSocketType()); } static final _id_newBuilder = _class.instanceMethodId( - r"newBuilder", - r"()Lokhttp3/OkHttpClient$Builder;", + r'newBuilder', + r'()Lokhttp3/OkHttpClient$Builder;', ); static final _newBuilder = ProtectedJniExtensions.lookup< @@ -6272,7 +6275,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6287,8 +6290,8 @@ class OkHttpClient extends jni.JObject { } static final _id_clone = _class.instanceMethodId( - r"clone", - r"()Ljava/lang/Object;", + r'clone', + r'()Ljava/lang/Object;', ); static final _clone = ProtectedJniExtensions.lookup< @@ -6296,7 +6299,7 @@ class OkHttpClient extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6315,7 +6318,7 @@ final class $OkHttpClientType extends jni.JObjType { const $OkHttpClientType(); @override - String get signature => r"Lokhttp3/OkHttpClient;"; + String get signature => r'Lokhttp3/OkHttpClient;'; @override OkHttpClient fromReference(jni.JReference reference) => @@ -6346,13 +6349,13 @@ class Call_Factory extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Call$Factory"); + static final _class = jni.JClass.forName(r'okhttp3/Call$Factory'); /// The type which includes information such as the signature of this class. static const type = $Call_FactoryType(); static final _id_newCall = _class.instanceMethodId( - r"newCall", - r"(Lokhttp3/Request;)Lokhttp3/Call;", + r'newCall', + r'(Lokhttp3/Request;)Lokhttp3/Call;', ); static final _newCall = ProtectedJniExtensions.lookup< @@ -6361,7 +6364,7 @@ class Call_Factory extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -6408,7 +6411,7 @@ class Call_Factory extends jni.JObject { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; - if ($d == r"newCall(Lokhttp3/Request;)Lokhttp3/Call;") { + if ($d == r'newCall(Lokhttp3/Request;)Lokhttp3/Call;') { final $r = _$impls[$p]!.newCall( $a[0].castTo(const $RequestType(), releaseOriginal: true), ); @@ -6418,7 +6421,7 @@ class Call_Factory extends jni.JObject { .toPointer(); } } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); + return ProtectedJniExtensions.newDartException(e); } return jni.nullptr; } @@ -6429,7 +6432,7 @@ class Call_Factory extends jni.JObject { final $p = ReceivePort(); final $x = Call_Factory.fromReference( ProtectedJniExtensions.newPortProxy( - r"okhttp3.Call$Factory", + r'okhttp3.Call$Factory', $p, _$invokePointer, ), @@ -6474,7 +6477,7 @@ final class $Call_FactoryType extends jni.JObjType { const $Call_FactoryType(); @override - String get signature => r"Lokhttp3/Call$Factory;"; + String get signature => r'Lokhttp3/Call$Factory;'; @override Call_Factory fromReference(jni.JReference reference) => @@ -6505,13 +6508,13 @@ class Call extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Call"); + static final _class = jni.JClass.forName(r'okhttp3/Call'); /// The type which includes information such as the signature of this class. static const type = $CallType(); static final _id_request = _class.instanceMethodId( - r"request", - r"()Lokhttp3/Request;", + r'request', + r'()Lokhttp3/Request;', ); static final _request = ProtectedJniExtensions.lookup< @@ -6519,7 +6522,7 @@ class Call extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6534,8 +6537,8 @@ class Call extends jni.JObject { } static final _id_execute = _class.instanceMethodId( - r"execute", - r"()Lokhttp3/Response;", + r'execute', + r'()Lokhttp3/Response;', ); static final _execute = ProtectedJniExtensions.lookup< @@ -6543,7 +6546,7 @@ class Call extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6558,8 +6561,8 @@ class Call extends jni.JObject { } static final _id_enqueue = _class.instanceMethodId( - r"enqueue", - r"(Lokhttp3/Callback;)V", + r'enqueue', + r'(Lokhttp3/Callback;)V', ); static final _enqueue = ProtectedJniExtensions.lookup< @@ -6568,7 +6571,7 @@ class Call extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -6583,8 +6586,8 @@ class Call extends jni.JObject { } static final _id_cancel = _class.instanceMethodId( - r"cancel", - r"()V", + r'cancel', + r'()V', ); static final _cancel = ProtectedJniExtensions.lookup< @@ -6592,7 +6595,7 @@ class Call extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -6605,8 +6608,8 @@ class Call extends jni.JObject { } static final _id_isExecuted = _class.instanceMethodId( - r"isExecuted", - r"()Z", + r'isExecuted', + r'()Z', ); static final _isExecuted = ProtectedJniExtensions.lookup< @@ -6614,7 +6617,7 @@ class Call extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6628,8 +6631,8 @@ class Call extends jni.JObject { } static final _id_isCanceled = _class.instanceMethodId( - r"isCanceled", - r"()Z", + r'isCanceled', + r'()Z', ); static final _isCanceled = ProtectedJniExtensions.lookup< @@ -6637,7 +6640,7 @@ class Call extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6651,8 +6654,8 @@ class Call extends jni.JObject { } static final _id_timeout = _class.instanceMethodId( - r"timeout", - r"()Lokio/Timeout;", + r'timeout', + r'()Lokio/Timeout;', ); static final _timeout = ProtectedJniExtensions.lookup< @@ -6660,7 +6663,7 @@ class Call extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6675,8 +6678,8 @@ class Call extends jni.JObject { } static final _id_clone = _class.instanceMethodId( - r"clone", - r"()Lokhttp3/Call;", + r'clone', + r'()Lokhttp3/Call;', ); static final _clone = ProtectedJniExtensions.lookup< @@ -6684,7 +6687,7 @@ class Call extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6730,46 +6733,46 @@ class Call extends jni.JObject { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; - if ($d == r"request()Lokhttp3/Request;") { + if ($d == r'request()Lokhttp3/Request;') { final $r = _$impls[$p]!.request(); return ($r as jni.JObject) .castTo(const jni.JObjectType()) .reference .toPointer(); } - if ($d == r"execute()Lokhttp3/Response;") { + if ($d == r'execute()Lokhttp3/Response;') { final $r = _$impls[$p]!.execute(); return ($r as jni.JObject) .castTo(const jni.JObjectType()) .reference .toPointer(); } - if ($d == r"enqueue(Lokhttp3/Callback;)V") { + if ($d == r'enqueue(Lokhttp3/Callback;)V') { _$impls[$p]!.enqueue( $a[0].castTo(const $CallbackType(), releaseOriginal: true), ); return jni.nullptr; } - if ($d == r"cancel()V") { + if ($d == r'cancel()V') { _$impls[$p]!.cancel(); return jni.nullptr; } - if ($d == r"isExecuted()Z") { + if ($d == r'isExecuted()Z') { final $r = _$impls[$p]!.isExecuted(); return jni.JBoolean($r).reference.toPointer(); } - if ($d == r"isCanceled()Z") { + if ($d == r'isCanceled()Z') { final $r = _$impls[$p]!.isCanceled(); return jni.JBoolean($r).reference.toPointer(); } - if ($d == r"timeout()Lokio/Timeout;") { + if ($d == r'timeout()Lokio/Timeout;') { final $r = _$impls[$p]!.timeout(); return ($r as jni.JObject) .castTo(const jni.JObjectType()) .reference .toPointer(); } - if ($d == r"clone()Lokhttp3/Call;") { + if ($d == r'clone()Lokhttp3/Call;') { final $r = _$impls[$p]!.clone(); return ($r as jni.JObject) .castTo(const jni.JObjectType()) @@ -6777,7 +6780,7 @@ class Call extends jni.JObject { .toPointer(); } } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); + return ProtectedJniExtensions.newDartException(e); } return jni.nullptr; } @@ -6788,7 +6791,7 @@ class Call extends jni.JObject { final $p = ReceivePort(); final $x = Call.fromReference( ProtectedJniExtensions.newPortProxy( - r"okhttp3.Call", + r'okhttp3.Call', $p, _$invokePointer, ), @@ -6896,7 +6899,7 @@ final class $CallType extends jni.JObjType { const $CallType(); @override - String get signature => r"Lokhttp3/Call;"; + String get signature => r'Lokhttp3/Call;'; @override Call fromReference(jni.JReference reference) => Call.fromReference(reference); @@ -6925,12 +6928,12 @@ class Headers_Builder extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Headers$Builder"); + static final _class = jni.JClass.forName(r'okhttp3/Headers$Builder'); /// The type which includes information such as the signature of this class. static const type = $Headers_BuilderType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -6938,7 +6941,7 @@ class Headers_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -6954,8 +6957,8 @@ class Headers_Builder extends jni.JObject { } static final _id_add = _class.instanceMethodId( - r"add", - r"(Ljava/lang/String;)Lokhttp3/Headers$Builder;", + r'add', + r'(Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); static final _add = ProtectedJniExtensions.lookup< @@ -6964,7 +6967,7 @@ class Headers_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -6980,8 +6983,8 @@ class Headers_Builder extends jni.JObject { } static final _id_add1 = _class.instanceMethodId( - r"add", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", + r'add', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); static final _add1 = ProtectedJniExtensions.lookup< @@ -6993,7 +6996,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7010,8 +7013,8 @@ class Headers_Builder extends jni.JObject { } static final _id_addUnsafeNonAscii = _class.instanceMethodId( - r"addUnsafeNonAscii", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", + r'addUnsafeNonAscii', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); static final _addUnsafeNonAscii = ProtectedJniExtensions.lookup< @@ -7023,7 +7026,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7043,8 +7046,8 @@ class Headers_Builder extends jni.JObject { } static final _id_addAll = _class.instanceMethodId( - r"addAll", - r"(Lokhttp3/Headers;)Lokhttp3/Headers$Builder;", + r'addAll', + r'(Lokhttp3/Headers;)Lokhttp3/Headers$Builder;', ); static final _addAll = ProtectedJniExtensions.lookup< @@ -7053,7 +7056,7 @@ class Headers_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7069,8 +7072,8 @@ class Headers_Builder extends jni.JObject { } static final _id_add2 = _class.instanceMethodId( - r"add", - r"(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;", + r'add', + r'(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;', ); static final _add2 = ProtectedJniExtensions.lookup< @@ -7082,7 +7085,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7099,8 +7102,8 @@ class Headers_Builder extends jni.JObject { } static final _id_add3 = _class.instanceMethodId( - r"add", - r"(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;", + r'add', + r'(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;', ); static final _add3 = ProtectedJniExtensions.lookup< @@ -7112,7 +7115,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7129,8 +7132,8 @@ class Headers_Builder extends jni.JObject { } static final _id_set0 = _class.instanceMethodId( - r"set", - r"(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;", + r'set', + r'(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;', ); static final _set0 = ProtectedJniExtensions.lookup< @@ -7142,7 +7145,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7159,8 +7162,8 @@ class Headers_Builder extends jni.JObject { } static final _id_set1 = _class.instanceMethodId( - r"set", - r"(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;", + r'set', + r'(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;', ); static final _set1 = ProtectedJniExtensions.lookup< @@ -7172,7 +7175,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7189,8 +7192,8 @@ class Headers_Builder extends jni.JObject { } static final _id_removeAll = _class.instanceMethodId( - r"removeAll", - r"(Ljava/lang/String;)Lokhttp3/Headers$Builder;", + r'removeAll', + r'(Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); static final _removeAll = ProtectedJniExtensions.lookup< @@ -7199,7 +7202,7 @@ class Headers_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7215,8 +7218,8 @@ class Headers_Builder extends jni.JObject { } static final _id_set2 = _class.instanceMethodId( - r"set", - r"(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;", + r'set', + r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); static final _set2 = ProtectedJniExtensions.lookup< @@ -7228,7 +7231,7 @@ class Headers_Builder extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7245,8 +7248,8 @@ class Headers_Builder extends jni.JObject { } static final _id_get0 = _class.instanceMethodId( - r"get", - r"(Ljava/lang/String;)Ljava/lang/String;", + r'get', + r'(Ljava/lang/String;)Ljava/lang/String;', ); static final _get0 = ProtectedJniExtensions.lookup< @@ -7255,7 +7258,7 @@ class Headers_Builder extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7271,8 +7274,8 @@ class Headers_Builder extends jni.JObject { } static final _id_build = _class.instanceMethodId( - r"build", - r"()Lokhttp3/Headers;", + r'build', + r'()Lokhttp3/Headers;', ); static final _build = ProtectedJniExtensions.lookup< @@ -7280,7 +7283,7 @@ class Headers_Builder extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7299,7 +7302,7 @@ final class $Headers_BuilderType extends jni.JObjType { const $Headers_BuilderType(); @override - String get signature => r"Lokhttp3/Headers$Builder;"; + String get signature => r'Lokhttp3/Headers$Builder;'; @override Headers_Builder fromReference(jni.JReference reference) => @@ -7330,13 +7333,13 @@ class Headers_Companion extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Headers$Companion"); + static final _class = jni.JClass.forName(r'okhttp3/Headers$Companion'); /// The type which includes information such as the signature of this class. static const type = $Headers_CompanionType(); static final _id_of = _class.instanceMethodId( - r"of", - r"([Ljava/lang/String;)Lokhttp3/Headers;", + r'of', + r'([Ljava/lang/String;)Lokhttp3/Headers;', ); static final _of = ProtectedJniExtensions.lookup< @@ -7345,7 +7348,7 @@ class Headers_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7361,8 +7364,8 @@ class Headers_Companion extends jni.JObject { } static final _id_of1 = _class.instanceMethodId( - r"of", - r"(Ljava/util/Map;)Lokhttp3/Headers;", + r'of', + r'(Ljava/util/Map;)Lokhttp3/Headers;', ); static final _of1 = ProtectedJniExtensions.lookup< @@ -7371,7 +7374,7 @@ class Headers_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7387,7 +7390,7 @@ class Headers_Companion extends jni.JObject { } static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -7396,7 +7399,7 @@ class Headers_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7418,7 +7421,7 @@ final class $Headers_CompanionType extends jni.JObjType { const $Headers_CompanionType(); @override - String get signature => r"Lokhttp3/Headers$Companion;"; + String get signature => r'Lokhttp3/Headers$Companion;'; @override Headers_Companion fromReference(jni.JReference reference) => @@ -7449,13 +7452,13 @@ class Headers extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Headers"); + static final _class = jni.JClass.forName(r'okhttp3/Headers'); /// The type which includes information such as the signature of this class. static const type = $HeadersType(); static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/Headers$Companion;", + r'Companion', + r'Lokhttp3/Headers$Companion;', ); /// from: static public final okhttp3.Headers$Companion Companion @@ -7464,8 +7467,8 @@ class Headers extends jni.JObject { _id_Companion.get(_class, const $Headers_CompanionType()); static final _id_get0 = _class.instanceMethodId( - r"get", - r"(Ljava/lang/String;)Ljava/lang/String;", + r'get', + r'(Ljava/lang/String;)Ljava/lang/String;', ); static final _get0 = ProtectedJniExtensions.lookup< @@ -7474,7 +7477,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7490,8 +7493,8 @@ class Headers extends jni.JObject { } static final _id_getDate = _class.instanceMethodId( - r"getDate", - r"(Ljava/lang/String;)Ljava/util/Date;", + r'getDate', + r'(Ljava/lang/String;)Ljava/util/Date;', ); static final _getDate = ProtectedJniExtensions.lookup< @@ -7500,7 +7503,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7516,8 +7519,8 @@ class Headers extends jni.JObject { } static final _id_getInstant = _class.instanceMethodId( - r"getInstant", - r"(Ljava/lang/String;)Ljava/time/Instant;", + r'getInstant', + r'(Ljava/lang/String;)Ljava/time/Instant;', ); static final _getInstant = ProtectedJniExtensions.lookup< @@ -7526,7 +7529,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7542,8 +7545,8 @@ class Headers extends jni.JObject { } static final _id_size = _class.instanceMethodId( - r"size", - r"()I", + r'size', + r'()I', ); static final _size = ProtectedJniExtensions.lookup< @@ -7551,7 +7554,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7564,14 +7567,14 @@ class Headers extends jni.JObject { } static final _id_name = _class.instanceMethodId( - r"name", - r"(I)Ljava/lang/String;", + r'name', + r'(I)Ljava/lang/String;', ); static final _name = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -7586,14 +7589,14 @@ class Headers extends jni.JObject { } static final _id_value = _class.instanceMethodId( - r"value", - r"(I)Ljava/lang/String;", + r'value', + r'(I)Ljava/lang/String;', ); static final _value = ProtectedJniExtensions.lookup< ffi.NativeFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallObjectMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -7608,8 +7611,8 @@ class Headers extends jni.JObject { } static final _id_names = _class.instanceMethodId( - r"names", - r"()Ljava/util/Set;", + r'names', + r'()Ljava/util/Set;', ); static final _names = ProtectedJniExtensions.lookup< @@ -7617,7 +7620,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7632,8 +7635,8 @@ class Headers extends jni.JObject { } static final _id_values = _class.instanceMethodId( - r"values", - r"(Ljava/lang/String;)Ljava/util/List;", + r'values', + r'(Ljava/lang/String;)Ljava/util/List;', ); static final _values = ProtectedJniExtensions.lookup< @@ -7642,7 +7645,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7658,8 +7661,8 @@ class Headers extends jni.JObject { } static final _id_byteCount = _class.instanceMethodId( - r"byteCount", - r"()J", + r'byteCount', + r'()J', ); static final _byteCount = ProtectedJniExtensions.lookup< @@ -7667,7 +7670,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7681,8 +7684,8 @@ class Headers extends jni.JObject { } static final _id_iterator = _class.instanceMethodId( - r"iterator", - r"()Ljava/util/Iterator;", + r'iterator', + r'()Ljava/util/Iterator;', ); static final _iterator = ProtectedJniExtensions.lookup< @@ -7690,7 +7693,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7705,8 +7708,8 @@ class Headers extends jni.JObject { } static final _id_newBuilder = _class.instanceMethodId( - r"newBuilder", - r"()Lokhttp3/Headers$Builder;", + r'newBuilder', + r'()Lokhttp3/Headers$Builder;', ); static final _newBuilder = ProtectedJniExtensions.lookup< @@ -7714,7 +7717,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7729,8 +7732,8 @@ class Headers extends jni.JObject { } static final _id_equals = _class.instanceMethodId( - r"equals", - r"(Ljava/lang/Object;)Z", + r'equals', + r'(Ljava/lang/Object;)Z', ); static final _equals = ProtectedJniExtensions.lookup< @@ -7739,7 +7742,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallBooleanMethod") + 'globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7754,8 +7757,8 @@ class Headers extends jni.JObject { } static final _id_hashCode1 = _class.instanceMethodId( - r"hashCode", - r"()I", + r'hashCode', + r'()I', ); static final _hashCode1 = ProtectedJniExtensions.lookup< @@ -7763,7 +7766,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7777,8 +7780,8 @@ class Headers extends jni.JObject { } static final _id_toString1 = _class.instanceMethodId( - r"toString", - r"()Ljava/lang/String;", + r'toString', + r'()Ljava/lang/String;', ); static final _toString1 = ProtectedJniExtensions.lookup< @@ -7786,7 +7789,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7801,8 +7804,8 @@ class Headers extends jni.JObject { } static final _id_toMultimap = _class.instanceMethodId( - r"toMultimap", - r"()Ljava/util/Map;", + r'toMultimap', + r'()Ljava/util/Map;', ); static final _toMultimap = ProtectedJniExtensions.lookup< @@ -7810,7 +7813,7 @@ class Headers extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -7826,8 +7829,8 @@ class Headers extends jni.JObject { } static final _id_of = _class.staticMethodId( - r"of", - r"([Ljava/lang/String;)Lokhttp3/Headers;", + r'of', + r'([Ljava/lang/String;)Lokhttp3/Headers;', ); static final _of = ProtectedJniExtensions.lookup< @@ -7836,7 +7839,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7852,8 +7855,8 @@ class Headers extends jni.JObject { } static final _id_of1 = _class.staticMethodId( - r"of", - r"(Ljava/util/Map;)Lokhttp3/Headers;", + r'of', + r'(Ljava/util/Map;)Lokhttp3/Headers;', ); static final _of1 = ProtectedJniExtensions.lookup< @@ -7862,7 +7865,7 @@ class Headers extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -7878,7 +7881,7 @@ class Headers extends jni.JObject { } static final _id_new0 = _class.constructorId( - r"([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -7890,7 +7893,7 @@ class Headers extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7914,7 +7917,7 @@ final class $HeadersType extends jni.JObjType { const $HeadersType(); @override - String get signature => r"Lokhttp3/Headers;"; + String get signature => r'Lokhttp3/Headers;'; @override Headers fromReference(jni.JReference reference) => @@ -7944,13 +7947,13 @@ class Callback extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Callback"); + static final _class = jni.JClass.forName(r'okhttp3/Callback'); /// The type which includes information such as the signature of this class. static const type = $CallbackType(); static final _id_onFailure = _class.instanceMethodId( - r"onFailure", - r"(Lokhttp3/Call;Ljava/io/IOException;)V", + r'onFailure', + r'(Lokhttp3/Call;Ljava/io/IOException;)V', ); static final _onFailure = ProtectedJniExtensions.lookup< @@ -7962,7 +7965,7 @@ class Callback extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -7978,8 +7981,8 @@ class Callback extends jni.JObject { } static final _id_onResponse = _class.instanceMethodId( - r"onResponse", - r"(Lokhttp3/Call;Lokhttp3/Response;)V", + r'onResponse', + r'(Lokhttp3/Call;Lokhttp3/Response;)V', ); static final _onResponse = ProtectedJniExtensions.lookup< @@ -7991,7 +7994,7 @@ class Callback extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -8038,14 +8041,14 @@ class Callback extends jni.JObject { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; - if ($d == r"onFailure(Lokhttp3/Call;Ljava/io/IOException;)V") { + if ($d == r'onFailure(Lokhttp3/Call;Ljava/io/IOException;)V') { _$impls[$p]!.onFailure( $a[0].castTo(const $CallType(), releaseOriginal: true), $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), ); return jni.nullptr; } - if ($d == r"onResponse(Lokhttp3/Call;Lokhttp3/Response;)V") { + if ($d == r'onResponse(Lokhttp3/Call;Lokhttp3/Response;)V') { _$impls[$p]!.onResponse( $a[0].castTo(const $CallType(), releaseOriginal: true), $a[1].castTo(const $ResponseType(), releaseOriginal: true), @@ -8053,7 +8056,7 @@ class Callback extends jni.JObject { return jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); + return ProtectedJniExtensions.newDartException(e); } return jni.nullptr; } @@ -8064,7 +8067,7 @@ class Callback extends jni.JObject { final $p = ReceivePort(); final $x = Callback.fromReference( ProtectedJniExtensions.newPortProxy( - r"okhttp3.Callback", + r'okhttp3.Callback', $p, _$invokePointer, ), @@ -8118,7 +8121,7 @@ final class $CallbackType extends jni.JObjType { const $CallbackType(); @override - String get signature => r"Lokhttp3/Callback;"; + String get signature => r'Lokhttp3/Callback;'; @override Callback fromReference(jni.JReference reference) => @@ -8148,12 +8151,12 @@ class ConnectionPool extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/ConnectionPool"); + static final _class = jni.JClass.forName(r'okhttp3/ConnectionPool'); /// The type which includes information such as the signature of this class. static const type = $ConnectionPoolType(); static final _id_new0 = _class.constructorId( - r"(Lokhttp3/internal/connection/RealConnectionPool;)V", + r'(Lokhttp3/internal/connection/RealConnectionPool;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -8162,7 +8165,7 @@ class ConnectionPool extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8178,7 +8181,7 @@ class ConnectionPool extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"(IJLjava/util/concurrent/TimeUnit;)V", + r'(IJLjava/util/concurrent/TimeUnit;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -8188,10 +8191,10 @@ class ConnectionPool extends jni.JObject { jni.JMethodIDPtr, ffi.VarArgs< ( - ffi.Int32, + $Int32, ffi.Int64, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, int, ffi.Pointer)>(); @@ -8209,7 +8212,7 @@ class ConnectionPool extends jni.JObject { } static final _id_new2 = _class.constructorId( - r"()V", + r'()V', ); static final _new2 = ProtectedJniExtensions.lookup< @@ -8217,7 +8220,7 @@ class ConnectionPool extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8233,8 +8236,8 @@ class ConnectionPool extends jni.JObject { } static final _id_idleConnectionCount = _class.instanceMethodId( - r"idleConnectionCount", - r"()I", + r'idleConnectionCount', + r'()I', ); static final _idleConnectionCount = ProtectedJniExtensions.lookup< @@ -8242,7 +8245,7 @@ class ConnectionPool extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8257,8 +8260,8 @@ class ConnectionPool extends jni.JObject { } static final _id_connectionCount = _class.instanceMethodId( - r"connectionCount", - r"()I", + r'connectionCount', + r'()I', ); static final _connectionCount = ProtectedJniExtensions.lookup< @@ -8266,7 +8269,7 @@ class ConnectionPool extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8281,8 +8284,8 @@ class ConnectionPool extends jni.JObject { } static final _id_evictAll = _class.instanceMethodId( - r"evictAll", - r"()V", + r'evictAll', + r'()V', ); static final _evictAll = ProtectedJniExtensions.lookup< @@ -8290,7 +8293,7 @@ class ConnectionPool extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -8307,7 +8310,7 @@ final class $ConnectionPoolType extends jni.JObjType { const $ConnectionPoolType(); @override - String get signature => r"Lokhttp3/ConnectionPool;"; + String get signature => r'Lokhttp3/ConnectionPool;'; @override ConnectionPool fromReference(jni.JReference reference) => @@ -8338,12 +8341,12 @@ class Dispatcher extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Dispatcher"); + static final _class = jni.JClass.forName(r'okhttp3/Dispatcher'); /// The type which includes information such as the signature of this class. static const type = $DispatcherType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -8351,7 +8354,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8367,8 +8370,8 @@ class Dispatcher extends jni.JObject { } static final _id_getMaxRequests = _class.instanceMethodId( - r"getMaxRequests", - r"()I", + r'getMaxRequests', + r'()I', ); static final _getMaxRequests = ProtectedJniExtensions.lookup< @@ -8376,7 +8379,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8391,8 +8394,8 @@ class Dispatcher extends jni.JObject { } static final _id_setMaxRequests = _class.instanceMethodId( - r"setMaxRequests", - r"(I)V", + r'setMaxRequests', + r'(I)V', ); static final _setMaxRequests = ProtectedJniExtensions.lookup< @@ -8400,7 +8403,7 @@ class Dispatcher extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallVoidMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -8415,8 +8418,8 @@ class Dispatcher extends jni.JObject { } static final _id_getMaxRequestsPerHost = _class.instanceMethodId( - r"getMaxRequestsPerHost", - r"()I", + r'getMaxRequestsPerHost', + r'()I', ); static final _getMaxRequestsPerHost = ProtectedJniExtensions.lookup< @@ -8424,7 +8427,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8439,8 +8442,8 @@ class Dispatcher extends jni.JObject { } static final _id_setMaxRequestsPerHost = _class.instanceMethodId( - r"setMaxRequestsPerHost", - r"(I)V", + r'setMaxRequestsPerHost', + r'(I)V', ); static final _setMaxRequestsPerHost = ProtectedJniExtensions.lookup< @@ -8448,7 +8451,7 @@ class Dispatcher extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int32,)>)>>("globalEnv_CallVoidMethod") + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, int)>(); @@ -8463,8 +8466,8 @@ class Dispatcher extends jni.JObject { } static final _id_getIdleCallback = _class.instanceMethodId( - r"getIdleCallback", - r"()Ljava/lang/Runnable;", + r'getIdleCallback', + r'()Ljava/lang/Runnable;', ); static final _getIdleCallback = ProtectedJniExtensions.lookup< @@ -8472,7 +8475,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8488,8 +8491,8 @@ class Dispatcher extends jni.JObject { } static final _id_setIdleCallback = _class.instanceMethodId( - r"setIdleCallback", - r"(Ljava/lang/Runnable;)V", + r'setIdleCallback', + r'(Ljava/lang/Runnable;)V', ); static final _setIdleCallback = ProtectedJniExtensions.lookup< @@ -8498,7 +8501,7 @@ class Dispatcher extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8513,8 +8516,8 @@ class Dispatcher extends jni.JObject { } static final _id_executorService = _class.instanceMethodId( - r"executorService", - r"()Ljava/util/concurrent/ExecutorService;", + r'executorService', + r'()Ljava/util/concurrent/ExecutorService;', ); static final _executorService = ProtectedJniExtensions.lookup< @@ -8522,7 +8525,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8531,14 +8534,14 @@ class Dispatcher extends jni.JObject { /// from: public final java.util.concurrent.ExecutorService executorService() /// The returned object must be released after use, by calling the [release] method. - jni.JObject executorService() { + ExecutorService executorService() { return _executorService( reference.pointer, _id_executorService as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + .object(const $ExecutorServiceType()); } static final _id_new1 = _class.constructorId( - r"(Ljava/util/concurrent/ExecutorService;)V", + r'(Ljava/util/concurrent/ExecutorService;)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -8547,7 +8550,7 @@ class Dispatcher extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8555,7 +8558,7 @@ class Dispatcher extends jni.JObject { /// from: public void (java.util.concurrent.ExecutorService executorService) /// The returned object must be released after use, by calling the [release] method. factory Dispatcher.new1( - jni.JObject executorService, + ExecutorService executorService, ) { return Dispatcher.fromReference(_new1(_class.reference.pointer, _id_new1 as jni.JMethodIDPtr, executorService.reference.pointer) @@ -8563,8 +8566,8 @@ class Dispatcher extends jni.JObject { } static final _id_cancelAll = _class.instanceMethodId( - r"cancelAll", - r"()V", + r'cancelAll', + r'()V', ); static final _cancelAll = ProtectedJniExtensions.lookup< @@ -8572,7 +8575,7 @@ class Dispatcher extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -8585,8 +8588,8 @@ class Dispatcher extends jni.JObject { } static final _id_queuedCalls = _class.instanceMethodId( - r"queuedCalls", - r"()Ljava/util/List;", + r'queuedCalls', + r'()Ljava/util/List;', ); static final _queuedCalls = ProtectedJniExtensions.lookup< @@ -8594,7 +8597,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8609,8 +8612,8 @@ class Dispatcher extends jni.JObject { } static final _id_runningCalls = _class.instanceMethodId( - r"runningCalls", - r"()Ljava/util/List;", + r'runningCalls', + r'()Ljava/util/List;', ); static final _runningCalls = ProtectedJniExtensions.lookup< @@ -8618,7 +8621,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8634,8 +8637,8 @@ class Dispatcher extends jni.JObject { } static final _id_queuedCallsCount = _class.instanceMethodId( - r"queuedCallsCount", - r"()I", + r'queuedCallsCount', + r'()I', ); static final _queuedCallsCount = ProtectedJniExtensions.lookup< @@ -8643,7 +8646,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8658,8 +8661,8 @@ class Dispatcher extends jni.JObject { } static final _id_runningCallsCount = _class.instanceMethodId( - r"runningCallsCount", - r"()I", + r'runningCallsCount', + r'()I', ); static final _runningCallsCount = ProtectedJniExtensions.lookup< @@ -8667,7 +8670,7 @@ class Dispatcher extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8686,7 +8689,7 @@ final class $DispatcherType extends jni.JObjType { const $DispatcherType(); @override - String get signature => r"Lokhttp3/Dispatcher;"; + String get signature => r'Lokhttp3/Dispatcher;'; @override Dispatcher fromReference(jni.JReference reference) => @@ -8707,6 +8710,317 @@ final class $DispatcherType extends jni.JObjType { } } +/// from: java.util.concurrent.ExecutorService +class ExecutorService extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ExecutorService.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r'java/util/concurrent/ExecutorService'); + + /// The type which includes information such as the signature of this class. + static const type = $ExecutorServiceType(); + static final _id_shutdown = _class.instanceMethodId( + r'shutdown', + r'()V', + ); + + static final _shutdown = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract void shutdown() + void shutdown() { + _shutdown(reference.pointer, _id_shutdown as jni.JMethodIDPtr).check(); + } + + static final _id_shutdownNow = _class.instanceMethodId( + r'shutdownNow', + r'()Ljava/util/List;', + ); + + static final _shutdownNow = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract java.util.List shutdownNow() + /// The returned object must be released after use, by calling the [release] method. + jni.JList shutdownNow() { + return _shutdownNow(reference.pointer, _id_shutdownNow as jni.JMethodIDPtr) + .object(const jni.JListType(jni.JObjectType())); + } + + static final _id_isShutdown = _class.instanceMethodId( + r'isShutdown', + r'()Z', + ); + + static final _isShutdown = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract boolean isShutdown() + bool isShutdown() { + return _isShutdown(reference.pointer, _id_isShutdown as jni.JMethodIDPtr) + .boolean; + } + + static final _id_isTerminated = _class.instanceMethodId( + r'isTerminated', + r'()Z', + ); + + static final _isTerminated = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract boolean isTerminated() + bool isTerminated() { + return _isTerminated( + reference.pointer, _id_isTerminated as jni.JMethodIDPtr) + .boolean; + } + + static final _id_awaitTermination = _class.instanceMethodId( + r'awaitTermination', + r'(JLjava/util/concurrent/TimeUnit;)Z', + ); + + static final _awaitTermination = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public abstract boolean awaitTermination(long j, java.util.concurrent.TimeUnit timeUnit) + bool awaitTermination( + int j, + jni.JObject timeUnit, + ) { + return _awaitTermination( + reference.pointer, + _id_awaitTermination as jni.JMethodIDPtr, + j, + timeUnit.reference.pointer) + .boolean; + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'shutdown()V') { + _$impls[$p]!.shutdown(); + return jni.nullptr; + } + if ($d == r'shutdownNow()Ljava/util/List;') { + final $r = _$impls[$p]!.shutdownNow(); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'isShutdown()Z') { + final $r = _$impls[$p]!.isShutdown(); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r'isTerminated()Z') { + final $r = _$impls[$p]!.isTerminated(); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r'awaitTermination(JLjava/util/concurrent/TimeUnit;)Z') { + final $r = _$impls[$p]!.awaitTermination( + $a[0] + .castTo(const jni.JLongType(), releaseOriginal: true) + .longValue(releaseOriginal: true), + $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), + ); + return jni.JBoolean($r).reference.toPointer(); + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e); + } + return jni.nullptr; + } + + factory ExecutorService.implement( + $ExecutorServiceImpl $impl, + ) { + final $p = ReceivePort(); + final $x = ExecutorService.fromReference( + ProtectedJniExtensions.newPortProxy( + r'java.util.concurrent.ExecutorService', + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $ExecutorServiceImpl { + factory $ExecutorServiceImpl({ + required void Function() shutdown, + required jni.JList Function() shutdownNow, + required bool Function() isShutdown, + required bool Function() isTerminated, + required bool Function(int j, jni.JObject timeUnit) awaitTermination, + }) = _$ExecutorServiceImpl; + + void shutdown(); + jni.JList shutdownNow(); + bool isShutdown(); + bool isTerminated(); + bool awaitTermination(int j, jni.JObject timeUnit); +} + +class _$ExecutorServiceImpl implements $ExecutorServiceImpl { + _$ExecutorServiceImpl({ + required void Function() shutdown, + required jni.JList Function() shutdownNow, + required bool Function() isShutdown, + required bool Function() isTerminated, + required bool Function(int j, jni.JObject timeUnit) awaitTermination, + }) : _shutdown = shutdown, + _shutdownNow = shutdownNow, + _isShutdown = isShutdown, + _isTerminated = isTerminated, + _awaitTermination = awaitTermination; + + final void Function() _shutdown; + final jni.JList Function() _shutdownNow; + final bool Function() _isShutdown; + final bool Function() _isTerminated; + final bool Function(int j, jni.JObject timeUnit) _awaitTermination; + + void shutdown() { + return _shutdown(); + } + + jni.JList shutdownNow() { + return _shutdownNow(); + } + + bool isShutdown() { + return _isShutdown(); + } + + bool isTerminated() { + return _isTerminated(); + } + + bool awaitTermination(int j, jni.JObject timeUnit) { + return _awaitTermination(j, timeUnit); + } +} + +final class $ExecutorServiceType extends jni.JObjType { + const $ExecutorServiceType(); + + @override + String get signature => r'Ljava/util/concurrent/ExecutorService;'; + + @override + ExecutorService fromReference(jni.JReference reference) => + ExecutorService.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ExecutorServiceType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ExecutorServiceType) && + other is $ExecutorServiceType; + } +} + /// from: okhttp3.Cache$Companion class Cache_Companion extends jni.JObject { @override @@ -8716,13 +9030,13 @@ class Cache_Companion extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Cache$Companion"); + static final _class = jni.JClass.forName(r'okhttp3/Cache$Companion'); /// The type which includes information such as the signature of this class. static const type = $Cache_CompanionType(); static final _id_key = _class.instanceMethodId( - r"key", - r"(Lokhttp3/HttpUrl;)Ljava/lang/String;", + r'key', + r'(Lokhttp3/HttpUrl;)Ljava/lang/String;', ); static final _key = ProtectedJniExtensions.lookup< @@ -8731,7 +9045,7 @@ class Cache_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8747,8 +9061,8 @@ class Cache_Companion extends jni.JObject { } static final _id_varyMatches = _class.instanceMethodId( - r"varyMatches", - r"(Lokhttp3/Response;Lokhttp3/Headers;Lokhttp3/Request;)Z", + r'varyMatches', + r'(Lokhttp3/Response;Lokhttp3/Headers;Lokhttp3/Request;)Z', ); static final _varyMatches = ProtectedJniExtensions.lookup< @@ -8761,7 +9075,7 @@ class Cache_Companion extends jni.JObject { ffi.Pointer, ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallBooleanMethod") + )>)>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -8786,8 +9100,8 @@ class Cache_Companion extends jni.JObject { } static final _id_hasVaryAll = _class.instanceMethodId( - r"hasVaryAll", - r"(Lokhttp3/Response;)Z", + r'hasVaryAll', + r'(Lokhttp3/Response;)Z', ); static final _hasVaryAll = ProtectedJniExtensions.lookup< @@ -8796,7 +9110,7 @@ class Cache_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallBooleanMethod") + 'globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8811,8 +9125,8 @@ class Cache_Companion extends jni.JObject { } static final _id_varyHeaders = _class.instanceMethodId( - r"varyHeaders", - r"(Lokhttp3/Response;)Lokhttp3/Headers;", + r'varyHeaders', + r'(Lokhttp3/Response;)Lokhttp3/Headers;', ); static final _varyHeaders = ProtectedJniExtensions.lookup< @@ -8821,7 +9135,7 @@ class Cache_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallObjectMethod") + 'globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8837,7 +9151,7 @@ class Cache_Companion extends jni.JObject { } static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -8846,7 +9160,7 @@ class Cache_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8868,7 +9182,7 @@ final class $Cache_CompanionType extends jni.JObjType { const $Cache_CompanionType(); @override - String get signature => r"Lokhttp3/Cache$Companion;"; + String get signature => r'Lokhttp3/Cache$Companion;'; @override Cache_Companion fromReference(jni.JReference reference) => @@ -8899,12 +9213,12 @@ class Cache_Entry_Companion extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Cache$Entry$Companion"); + static final _class = jni.JClass.forName(r'okhttp3/Cache$Entry$Companion'); /// The type which includes information such as the signature of this class. static const type = $Cache_Entry_CompanionType(); static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -8913,7 +9227,7 @@ class Cache_Entry_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -8936,7 +9250,7 @@ final class $Cache_Entry_CompanionType const $Cache_Entry_CompanionType(); @override - String get signature => r"Lokhttp3/Cache$Entry$Companion;"; + String get signature => r'Lokhttp3/Cache$Entry$Companion;'; @override Cache_Entry_Companion fromReference(jni.JReference reference) => @@ -8967,13 +9281,13 @@ class Cache extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"okhttp3/Cache"); + static final _class = jni.JClass.forName(r'okhttp3/Cache'); /// The type which includes information such as the signature of this class. static const type = $CacheType(); static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lokhttp3/Cache$Companion;", + r'Companion', + r'Lokhttp3/Cache$Companion;', ); /// from: static public final okhttp3.Cache$Companion Companion @@ -8982,7 +9296,7 @@ class Cache extends jni.JObject { _id_Companion.get(_class, const $Cache_CompanionType()); static final _id_new0 = _class.constructorId( - r"(Ljava/io/File;JLokhttp3/internal/io/FileSystem;)V", + r'(Ljava/io/File;JLokhttp3/internal/io/FileSystem;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -8995,7 +9309,7 @@ class Cache extends jni.JObject { ffi.Pointer, ffi.Int64, ffi.Pointer - )>)>>("globalEnv_NewObject") + )>)>>('globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, ffi.Pointer)>(); @@ -9017,8 +9331,8 @@ class Cache extends jni.JObject { } static final _id_isClosed = _class.instanceMethodId( - r"isClosed", - r"()Z", + r'isClosed', + r'()Z', ); static final _isClosed = ProtectedJniExtensions.lookup< @@ -9026,7 +9340,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallBooleanMethod") + )>>('globalEnv_CallBooleanMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9040,7 +9354,7 @@ class Cache extends jni.JObject { } static final _id_new1 = _class.constructorId( - r"(Ljava/io/File;J)V", + r'(Ljava/io/File;J)V', ); static final _new1 = ProtectedJniExtensions.lookup< @@ -9049,7 +9363,7 @@ class Cache extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int)>(); @@ -9066,8 +9380,8 @@ class Cache extends jni.JObject { } static final _id_initialize = _class.instanceMethodId( - r"initialize", - r"()V", + r'initialize', + r'()V', ); static final _initialize = ProtectedJniExtensions.lookup< @@ -9075,7 +9389,7 @@ class Cache extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9088,8 +9402,8 @@ class Cache extends jni.JObject { } static final _id_delete = _class.instanceMethodId( - r"delete", - r"()V", + r'delete', + r'()V', ); static final _delete = ProtectedJniExtensions.lookup< @@ -9097,7 +9411,7 @@ class Cache extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9110,8 +9424,8 @@ class Cache extends jni.JObject { } static final _id_evictAll = _class.instanceMethodId( - r"evictAll", - r"()V", + r'evictAll', + r'()V', ); static final _evictAll = ProtectedJniExtensions.lookup< @@ -9119,7 +9433,7 @@ class Cache extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9132,8 +9446,8 @@ class Cache extends jni.JObject { } static final _id_urls = _class.instanceMethodId( - r"urls", - r"()Ljava/util/Iterator;", + r'urls', + r'()Ljava/util/Iterator;', ); static final _urls = ProtectedJniExtensions.lookup< @@ -9141,7 +9455,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9156,8 +9470,8 @@ class Cache extends jni.JObject { } static final _id_writeAbortCount = _class.instanceMethodId( - r"writeAbortCount", - r"()I", + r'writeAbortCount', + r'()I', ); static final _writeAbortCount = ProtectedJniExtensions.lookup< @@ -9165,7 +9479,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9180,8 +9494,8 @@ class Cache extends jni.JObject { } static final _id_writeSuccessCount = _class.instanceMethodId( - r"writeSuccessCount", - r"()I", + r'writeSuccessCount', + r'()I', ); static final _writeSuccessCount = ProtectedJniExtensions.lookup< @@ -9189,7 +9503,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9204,8 +9518,8 @@ class Cache extends jni.JObject { } static final _id_size = _class.instanceMethodId( - r"size", - r"()J", + r'size', + r'()J', ); static final _size = ProtectedJniExtensions.lookup< @@ -9213,7 +9527,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9226,8 +9540,8 @@ class Cache extends jni.JObject { } static final _id_maxSize = _class.instanceMethodId( - r"maxSize", - r"()J", + r'maxSize', + r'()J', ); static final _maxSize = ProtectedJniExtensions.lookup< @@ -9235,7 +9549,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallLongMethod") + )>>('globalEnv_CallLongMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9248,8 +9562,8 @@ class Cache extends jni.JObject { } static final _id_flush = _class.instanceMethodId( - r"flush", - r"()V", + r'flush', + r'()V', ); static final _flush = ProtectedJniExtensions.lookup< @@ -9257,7 +9571,7 @@ class Cache extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9270,8 +9584,8 @@ class Cache extends jni.JObject { } static final _id_close = _class.instanceMethodId( - r"close", - r"()V", + r'close', + r'()V', ); static final _close = ProtectedJniExtensions.lookup< @@ -9279,7 +9593,7 @@ class Cache extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9292,8 +9606,8 @@ class Cache extends jni.JObject { } static final _id_directory = _class.instanceMethodId( - r"directory", - r"()Ljava/io/File;", + r'directory', + r'()Ljava/io/File;', ); static final _directory = ProtectedJniExtensions.lookup< @@ -9301,7 +9615,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallObjectMethod") + )>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9316,8 +9630,8 @@ class Cache extends jni.JObject { } static final _id_networkCount = _class.instanceMethodId( - r"networkCount", - r"()I", + r'networkCount', + r'()I', ); static final _networkCount = ProtectedJniExtensions.lookup< @@ -9325,7 +9639,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9340,8 +9654,8 @@ class Cache extends jni.JObject { } static final _id_hitCount = _class.instanceMethodId( - r"hitCount", - r"()I", + r'hitCount', + r'()I', ); static final _hitCount = ProtectedJniExtensions.lookup< @@ -9349,7 +9663,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9363,8 +9677,8 @@ class Cache extends jni.JObject { } static final _id_requestCount = _class.instanceMethodId( - r"requestCount", - r"()I", + r'requestCount', + r'()I', ); static final _requestCount = ProtectedJniExtensions.lookup< @@ -9372,7 +9686,7 @@ class Cache extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallIntMethod") + )>>('globalEnv_CallIntMethod') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9387,8 +9701,8 @@ class Cache extends jni.JObject { } static final _id_key = _class.staticMethodId( - r"key", - r"(Lokhttp3/HttpUrl;)Ljava/lang/String;", + r'key', + r'(Lokhttp3/HttpUrl;)Ljava/lang/String;', ); static final _key = ProtectedJniExtensions.lookup< @@ -9397,7 +9711,7 @@ class Cache extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallStaticObjectMethod") + 'globalEnv_CallStaticObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -9417,7 +9731,7 @@ final class $CacheType extends jni.JObjType { const $CacheType(); @override - String get signature => r"Lokhttp3/Cache;"; + String get signature => r'Lokhttp3/Cache;'; @override Cache fromReference(jni.JReference reference) => @@ -9448,13 +9762,13 @@ class RedirectReceivedCallback extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"com/example/ok_http/RedirectReceivedCallback"); + jni.JClass.forName(r'com/example/ok_http/RedirectReceivedCallback'); /// The type which includes information such as the signature of this class. static const type = $RedirectReceivedCallbackType(); static final _id_onRedirectReceived = _class.instanceMethodId( - r"onRedirectReceived", - r"(Lokhttp3/Response;Ljava/lang/String;)V", + r'onRedirectReceived', + r'(Lokhttp3/Response;Ljava/lang/String;)V', ); static final _onRedirectReceived = ProtectedJniExtensions.lookup< @@ -9466,7 +9780,7 @@ class RedirectReceivedCallback extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallVoidMethod") + )>)>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -9516,7 +9830,7 @@ class RedirectReceivedCallback extends jni.JObject { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; - if ($d == r"onRedirectReceived(Lokhttp3/Response;Ljava/lang/String;)V") { + if ($d == r'onRedirectReceived(Lokhttp3/Response;Ljava/lang/String;)V') { _$impls[$p]!.onRedirectReceived( $a[0].castTo(const $ResponseType(), releaseOriginal: true), $a[1].castTo(const jni.JStringType(), releaseOriginal: true), @@ -9524,7 +9838,7 @@ class RedirectReceivedCallback extends jni.JObject { return jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); + return ProtectedJniExtensions.newDartException(e); } return jni.nullptr; } @@ -9535,7 +9849,7 @@ class RedirectReceivedCallback extends jni.JObject { final $p = ReceivePort(); final $x = RedirectReceivedCallback.fromReference( ProtectedJniExtensions.newPortProxy( - r"com.example.ok_http.RedirectReceivedCallback", + r'com.example.ok_http.RedirectReceivedCallback', $p, _$invokePointer, ), @@ -9584,7 +9898,7 @@ final class $RedirectReceivedCallbackType const $RedirectReceivedCallbackType(); @override - String get signature => r"Lcom/example/ok_http/RedirectReceivedCallback;"; + String get signature => r'Lcom/example/ok_http/RedirectReceivedCallback;'; @override RedirectReceivedCallback fromReference(jni.JReference reference) => @@ -9616,13 +9930,13 @@ class RedirectInterceptor_Companion extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"com/example/ok_http/RedirectInterceptor$Companion"); + jni.JClass.forName(r'com/example/ok_http/RedirectInterceptor$Companion'); /// The type which includes information such as the signature of this class. static const type = $RedirectInterceptor_CompanionType(); static final _id_addRedirectInterceptor = _class.instanceMethodId( - r"addRedirectInterceptor", - r"(Lokhttp3/OkHttpClient$Builder;IZLcom/example/ok_http/RedirectReceivedCallback;)Lokhttp3/OkHttpClient$Builder;", + r'addRedirectInterceptor', + r'(Lokhttp3/OkHttpClient$Builder;IZLcom/example/ok_http/RedirectReceivedCallback;)Lokhttp3/OkHttpClient$Builder;', ); static final _addRedirectInterceptor = ProtectedJniExtensions.lookup< @@ -9633,10 +9947,10 @@ class RedirectInterceptor_Companion extends jni.JObject { ffi.VarArgs< ( ffi.Pointer, - ffi.Int32, - ffi.Uint8, + $Int32, + $Int32, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, int, int, ffi.Pointer)>(); @@ -9660,7 +9974,7 @@ class RedirectInterceptor_Companion extends jni.JObject { } static final _id_new0 = _class.constructorId( - r"(Lkotlin/jvm/internal/DefaultConstructorMarker;)V", + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -9669,7 +9983,7 @@ class RedirectInterceptor_Companion extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_NewObject") + 'globalEnv_NewObject') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -9693,7 +10007,7 @@ final class $RedirectInterceptor_CompanionType @override String get signature => - r"Lcom/example/ok_http/RedirectInterceptor$Companion;"; + r'Lcom/example/ok_http/RedirectInterceptor$Companion;'; @override RedirectInterceptor_Companion fromReference(jni.JReference reference) => @@ -9725,13 +10039,13 @@ class RedirectInterceptor extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"com/example/ok_http/RedirectInterceptor"); + jni.JClass.forName(r'com/example/ok_http/RedirectInterceptor'); /// The type which includes information such as the signature of this class. static const type = $RedirectInterceptorType(); static final _id_Companion = _class.staticFieldId( - r"Companion", - r"Lcom/example/ok_http/RedirectInterceptor$Companion;", + r'Companion', + r'Lcom/example/ok_http/RedirectInterceptor$Companion;', ); /// from: static public final com.example.ok_http.RedirectInterceptor$Companion Companion @@ -9740,7 +10054,7 @@ class RedirectInterceptor extends jni.JObject { _id_Companion.get(_class, const $RedirectInterceptor_CompanionType()); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -9748,7 +10062,7 @@ class RedirectInterceptor extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9768,7 +10082,7 @@ final class $RedirectInterceptorType extends jni.JObjType { const $RedirectInterceptorType(); @override - String get signature => r"Lcom/example/ok_http/RedirectInterceptor;"; + String get signature => r'Lcom/example/ok_http/RedirectInterceptor;'; @override RedirectInterceptor fromReference(jni.JReference reference) => @@ -9800,12 +10114,12 @@ class AsyncInputStreamReader extends jni.JObject { ) : super.fromReference(reference); static final _class = - jni.JClass.forName(r"com/example/ok_http/AsyncInputStreamReader"); + jni.JClass.forName(r'com/example/ok_http/AsyncInputStreamReader'); /// The type which includes information such as the signature of this class. static const type = $AsyncInputStreamReaderType(); static final _id_new0 = _class.constructorId( - r"()V", + r'()V', ); static final _new0 = ProtectedJniExtensions.lookup< @@ -9813,7 +10127,7 @@ class AsyncInputStreamReader extends jni.JObject { jni.JniResult Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_NewObject") + )>>('globalEnv_NewObject') .asFunction< jni.JniResult Function( ffi.Pointer, @@ -9829,8 +10143,8 @@ class AsyncInputStreamReader extends jni.JObject { } static final _id_readAsync = _class.instanceMethodId( - r"readAsync", - r"(Ljava/io/InputStream;Lcom/example/ok_http/DataCallback;)Ljava/util/concurrent/Future;", + r'readAsync', + r'(Ljava/io/InputStream;Lcom/example/ok_http/DataCallback;)Ljava/util/concurrent/Future;', ); static final _readAsync = ProtectedJniExtensions.lookup< @@ -9842,7 +10156,7 @@ class AsyncInputStreamReader extends jni.JObject { ( ffi.Pointer, ffi.Pointer - )>)>>("globalEnv_CallObjectMethod") + )>)>>('globalEnv_CallObjectMethod') .asFunction< jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer, ffi.Pointer)>(); @@ -9859,8 +10173,8 @@ class AsyncInputStreamReader extends jni.JObject { } static final _id_shutdown = _class.instanceMethodId( - r"shutdown", - r"()V", + r'shutdown', + r'()V', ); static final _shutdown = ProtectedJniExtensions.lookup< @@ -9868,7 +10182,7 @@ class AsyncInputStreamReader extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9886,7 +10200,7 @@ final class $AsyncInputStreamReaderType const $AsyncInputStreamReaderType(); @override - String get signature => r"Lcom/example/ok_http/AsyncInputStreamReader;"; + String get signature => r'Lcom/example/ok_http/AsyncInputStreamReader;'; @override AsyncInputStreamReader fromReference(jni.JReference reference) => @@ -9917,13 +10231,13 @@ class DataCallback extends jni.JObject { jni.JReference reference, ) : super.fromReference(reference); - static final _class = jni.JClass.forName(r"com/example/ok_http/DataCallback"); + static final _class = jni.JClass.forName(r'com/example/ok_http/DataCallback'); /// The type which includes information such as the signature of this class. static const type = $DataCallbackType(); static final _id_onDataRead = _class.instanceMethodId( - r"onDataRead", - r"([B)V", + r'onDataRead', + r'([B)V', ); static final _onDataRead = ProtectedJniExtensions.lookup< @@ -9932,7 +10246,7 @@ class DataCallback extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -9947,8 +10261,8 @@ class DataCallback extends jni.JObject { } static final _id_onFinished = _class.instanceMethodId( - r"onFinished", - r"()V", + r'onFinished', + r'()V', ); static final _onFinished = ProtectedJniExtensions.lookup< @@ -9956,7 +10270,7 @@ class DataCallback extends jni.JObject { jni.JThrowablePtr Function( ffi.Pointer, jni.JMethodIDPtr, - )>>("globalEnv_CallVoidMethod") + )>>('globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function( ffi.Pointer, @@ -9969,8 +10283,8 @@ class DataCallback extends jni.JObject { } static final _id_onError = _class.instanceMethodId( - r"onError", - r"(Ljava/io/IOException;)V", + r'onError', + r'(Ljava/io/IOException;)V', ); static final _onError = ProtectedJniExtensions.lookup< @@ -9979,7 +10293,7 @@ class DataCallback extends jni.JObject { ffi.Pointer, jni.JMethodIDPtr, ffi.VarArgs<(ffi.Pointer,)>)>>( - "globalEnv_CallVoidMethod") + 'globalEnv_CallVoidMethod') .asFunction< jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, ffi.Pointer)>(); @@ -10025,25 +10339,25 @@ class DataCallback extends jni.JObject { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; - if ($d == r"onDataRead([B)V") { + if ($d == r'onDataRead([B)V') { _$impls[$p]!.onDataRead( $a[0].castTo(const jni.JArrayType(jni.jbyteType()), releaseOriginal: true), ); return jni.nullptr; } - if ($d == r"onFinished()V") { + if ($d == r'onFinished()V') { _$impls[$p]!.onFinished(); return jni.nullptr; } - if ($d == r"onError(Ljava/io/IOException;)V") { + if ($d == r'onError(Ljava/io/IOException;)V') { _$impls[$p]!.onError( $a[0].castTo(const jni.JObjectType(), releaseOriginal: true), ); return jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e.toString()); + return ProtectedJniExtensions.newDartException(e); } return jni.nullptr; } @@ -10054,7 +10368,7 @@ class DataCallback extends jni.JObject { final $p = ReceivePort(); final $x = DataCallback.fromReference( ProtectedJniExtensions.newPortProxy( - r"com.example.ok_http.DataCallback", + r'com.example.ok_http.DataCallback', $p, _$invokePointer, ), @@ -10117,7 +10431,7 @@ final class $DataCallbackType extends jni.JObjType { const $DataCallbackType(); @override - String get signature => r"Lcom/example/ok_http/DataCallback;"; + String get signature => r'Lcom/example/ok_http/DataCallback;'; @override DataCallback fromReference(jni.JReference reference) => @@ -10138,3 +10452,2944 @@ final class $DataCallbackType extends jni.JObjType { other is $DataCallbackType; } } + +/// from: okhttp3.WebSocket$Factory +class WebSocket_Factory extends jni.JObject { + @override + late final jni.JObjType $type = type; + + WebSocket_Factory.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r'okhttp3/WebSocket$Factory'); + + /// The type which includes information such as the signature of this class. + static const type = $WebSocket_FactoryType(); + static final _id_newWebSocket = _class.instanceMethodId( + r'newWebSocket', + r'(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;', + ); + + static final _newWebSocket = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract okhttp3.WebSocket newWebSocket(okhttp3.Request request, okhttp3.WebSocketListener webSocketListener) + /// The returned object must be released after use, by calling the [release] method. + WebSocket newWebSocket( + Request request, + jni.JObject webSocketListener, + ) { + return _newWebSocket( + reference.pointer, + _id_newWebSocket as jni.JMethodIDPtr, + request.reference.pointer, + webSocketListener.reference.pointer) + .object(const $WebSocketType()); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == + r'newWebSocket(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;') { + final $r = _$impls[$p]!.newWebSocket( + $a[0].castTo(const $RequestType(), releaseOriginal: true), + $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), + ); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e); + } + return jni.nullptr; + } + + factory WebSocket_Factory.implement( + $WebSocket_FactoryImpl $impl, + ) { + final $p = ReceivePort(); + final $x = WebSocket_Factory.fromReference( + ProtectedJniExtensions.newPortProxy( + r'okhttp3.WebSocket$Factory', + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $WebSocket_FactoryImpl { + factory $WebSocket_FactoryImpl({ + required WebSocket Function(Request request, jni.JObject webSocketListener) + newWebSocket, + }) = _$WebSocket_FactoryImpl; + + WebSocket newWebSocket(Request request, jni.JObject webSocketListener); +} + +class _$WebSocket_FactoryImpl implements $WebSocket_FactoryImpl { + _$WebSocket_FactoryImpl({ + required WebSocket Function(Request request, jni.JObject webSocketListener) + newWebSocket, + }) : _newWebSocket = newWebSocket; + + final WebSocket Function(Request request, jni.JObject webSocketListener) + _newWebSocket; + + WebSocket newWebSocket(Request request, jni.JObject webSocketListener) { + return _newWebSocket(request, webSocketListener); + } +} + +final class $WebSocket_FactoryType extends jni.JObjType { + const $WebSocket_FactoryType(); + + @override + String get signature => r'Lokhttp3/WebSocket$Factory;'; + + @override + WebSocket_Factory fromReference(jni.JReference reference) => + WebSocket_Factory.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($WebSocket_FactoryType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($WebSocket_FactoryType) && + other is $WebSocket_FactoryType; + } +} + +/// from: okhttp3.WebSocket +class WebSocket extends jni.JObject { + @override + late final jni.JObjType $type = type; + + WebSocket.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r'okhttp3/WebSocket'); + + /// The type which includes information such as the signature of this class. + static const type = $WebSocketType(); + static final _id_request = _class.instanceMethodId( + r'request', + r'()Lokhttp3/Request;', + ); + + static final _request = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract okhttp3.Request request() + /// The returned object must be released after use, by calling the [release] method. + Request request() { + return _request(reference.pointer, _id_request as jni.JMethodIDPtr) + .object(const $RequestType()); + } + + static final _id_queueSize = _class.instanceMethodId( + r'queueSize', + r'()J', + ); + + static final _queueSize = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallLongMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract long queueSize() + int queueSize() { + return _queueSize(reference.pointer, _id_queueSize as jni.JMethodIDPtr) + .long; + } + + static final _id_send = _class.instanceMethodId( + r'send', + r'(Ljava/lang/String;)Z', + ); + + static final _send = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public abstract boolean send(java.lang.String string) + bool send( + jni.JString string, + ) { + return _send(reference.pointer, _id_send as jni.JMethodIDPtr, + string.reference.pointer) + .boolean; + } + + static final _id_send1 = _class.instanceMethodId( + r'send', + r'(Lokio/ByteString;)Z', + ); + + static final _send1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public abstract boolean send(okio.ByteString byteString) + bool send1( + ByteString byteString, + ) { + return _send1(reference.pointer, _id_send1 as jni.JMethodIDPtr, + byteString.reference.pointer) + .boolean; + } + + static final _id_close = _class.instanceMethodId( + r'close', + r'(ILjava/lang/String;)Z', + ); + + static final _close = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<($Int32, ffi.Pointer)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public abstract boolean close(int i, java.lang.String string) + bool close( + int i, + jni.JString string, + ) { + return _close(reference.pointer, _id_close as jni.JMethodIDPtr, i, + string.reference.pointer) + .boolean; + } + + static final _id_cancel = _class.instanceMethodId( + r'cancel', + r'()V', + ); + + static final _cancel = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public abstract void cancel() + void cancel() { + _cancel(reference.pointer, _id_cancel as jni.JMethodIDPtr).check(); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'request()Lokhttp3/Request;') { + final $r = _$impls[$p]!.request(); + return ($r as jni.JObject) + .castTo(const jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'queueSize()J') { + final $r = _$impls[$p]!.queueSize(); + return jni.JLong($r).reference.toPointer(); + } + if ($d == r'send(Ljava/lang/String;)Z') { + final $r = _$impls[$p]!.send( + $a[0].castTo(const jni.JStringType(), releaseOriginal: true), + ); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r'send(Lokio/ByteString;)Z') { + final $r = _$impls[$p]!.send1( + $a[0].castTo(const $ByteStringType(), releaseOriginal: true), + ); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r'close(ILjava/lang/String;)Z') { + final $r = _$impls[$p]!.close( + $a[0] + .castTo(const jni.JIntegerType(), releaseOriginal: true) + .intValue(releaseOriginal: true), + $a[1].castTo(const jni.JStringType(), releaseOriginal: true), + ); + return jni.JBoolean($r).reference.toPointer(); + } + if ($d == r'cancel()V') { + _$impls[$p]!.cancel(); + return jni.nullptr; + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e); + } + return jni.nullptr; + } + + factory WebSocket.implement( + $WebSocketImpl $impl, + ) { + final $p = ReceivePort(); + final $x = WebSocket.fromReference( + ProtectedJniExtensions.newPortProxy( + r'okhttp3.WebSocket', + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $WebSocketImpl { + factory $WebSocketImpl({ + required Request Function() request, + required int Function() queueSize, + required bool Function(jni.JString string) send, + required bool Function(ByteString byteString) send1, + required bool Function(int i, jni.JString string) close, + required void Function() cancel, + }) = _$WebSocketImpl; + + Request request(); + int queueSize(); + bool send(jni.JString string); + bool send1(ByteString byteString); + bool close(int i, jni.JString string); + void cancel(); +} + +class _$WebSocketImpl implements $WebSocketImpl { + _$WebSocketImpl({ + required Request Function() request, + required int Function() queueSize, + required bool Function(jni.JString string) send, + required bool Function(ByteString byteString) send1, + required bool Function(int i, jni.JString string) close, + required void Function() cancel, + }) : _request = request, + _queueSize = queueSize, + _send = send, + _send1 = send1, + _close = close, + _cancel = cancel; + + final Request Function() _request; + final int Function() _queueSize; + final bool Function(jni.JString string) _send; + final bool Function(ByteString byteString) _send1; + final bool Function(int i, jni.JString string) _close; + final void Function() _cancel; + + Request request() { + return _request(); + } + + int queueSize() { + return _queueSize(); + } + + bool send(jni.JString string) { + return _send(string); + } + + bool send1(ByteString byteString) { + return _send1(byteString); + } + + bool close(int i, jni.JString string) { + return _close(i, string); + } + + void cancel() { + return _cancel(); + } +} + +final class $WebSocketType extends jni.JObjType { + const $WebSocketType(); + + @override + String get signature => r'Lokhttp3/WebSocket;'; + + @override + WebSocket fromReference(jni.JReference reference) => + WebSocket.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($WebSocketType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($WebSocketType) && other is $WebSocketType; + } +} + +/// from: com.example.ok_http.WebSocketListenerProxy$WebSocketListener +class WebSocketListenerProxy_WebSocketListener extends jni.JObject { + @override + late final jni.JObjType $type = + type; + + WebSocketListenerProxy_WebSocketListener.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName( + r'com/example/ok_http/WebSocketListenerProxy$WebSocketListener'); + + /// The type which includes information such as the signature of this class. + static const type = $WebSocketListenerProxy_WebSocketListenerType(); + static final _id_onOpen = _class.instanceMethodId( + r'onOpen', + r'(Lokhttp3/WebSocket;Lokhttp3/Response;)V', + ); + + static final _onOpen = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract void onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response) + void onOpen( + WebSocket webSocket, + Response response, + ) { + _onOpen(reference.pointer, _id_onOpen as jni.JMethodIDPtr, + webSocket.reference.pointer, response.reference.pointer) + .check(); + } + + static final _id_onMessage = _class.instanceMethodId( + r'onMessage', + r'(Lokhttp3/WebSocket;Ljava/lang/String;)V', + ); + + static final _onMessage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract void onMessage(okhttp3.WebSocket webSocket, java.lang.String string) + void onMessage( + WebSocket webSocket, + jni.JString string, + ) { + _onMessage(reference.pointer, _id_onMessage as jni.JMethodIDPtr, + webSocket.reference.pointer, string.reference.pointer) + .check(); + } + + static final _id_onMessage1 = _class.instanceMethodId( + r'onMessage', + r'(Lokhttp3/WebSocket;Lokio/ByteString;)V', + ); + + static final _onMessage1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public abstract void onMessage(okhttp3.WebSocket webSocket, okio.ByteString byteString) + void onMessage1( + WebSocket webSocket, + ByteString byteString, + ) { + _onMessage1(reference.pointer, _id_onMessage1 as jni.JMethodIDPtr, + webSocket.reference.pointer, byteString.reference.pointer) + .check(); + } + + static final _id_onClosing = _class.instanceMethodId( + r'onClosing', + r'(Lokhttp3/WebSocket;ILjava/lang/String;)V', + ); + + static final _onClosing = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + $Int32, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, ffi.Pointer)>(); + + /// from: public abstract void onClosing(okhttp3.WebSocket webSocket, int i, java.lang.String string) + void onClosing( + WebSocket webSocket, + int i, + jni.JString string, + ) { + _onClosing(reference.pointer, _id_onClosing as jni.JMethodIDPtr, + webSocket.reference.pointer, i, string.reference.pointer) + .check(); + } + + static final _id_onFailure = _class.instanceMethodId( + r'onFailure', + r'(Lokhttp3/WebSocket;Ljava/lang/Throwable;Lokhttp3/Response;)V', + ); + + static final _onFailure = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + /// from: public abstract void onFailure(okhttp3.WebSocket webSocket, java.lang.Throwable throwable, okhttp3.Response response) + void onFailure( + WebSocket webSocket, + jni.JObject throwable, + Response response, + ) { + _onFailure( + reference.pointer, + _id_onFailure as jni.JMethodIDPtr, + webSocket.reference.pointer, + throwable.reference.pointer, + response.reference.pointer) + .check(); + } + + /// Maps a specific port to the implemented interface. + static final Map _$impls = + {}; + ReceivePort? _$p; + + static jni.JObjectPtr _$invoke( + int port, + jni.JObjectPtr descriptor, + jni.JObjectPtr args, + ) { + return _$invokeMethod( + port, + $MethodInvocation.fromAddresses( + 0, + descriptor.address, + args.address, + ), + ); + } + + static final ffi.Pointer< + ffi.NativeFunction< + jni.JObjectPtr Function( + ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> + _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + + static ffi.Pointer _$invokeMethod( + int $p, + $MethodInvocation $i, + ) { + try { + final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); + final $a = $i.args; + if ($d == r'onOpen(Lokhttp3/WebSocket;Lokhttp3/Response;)V') { + _$impls[$p]!.onOpen( + $a[0].castTo(const $WebSocketType(), releaseOriginal: true), + $a[1].castTo(const $ResponseType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == r'onMessage(Lokhttp3/WebSocket;Ljava/lang/String;)V') { + _$impls[$p]!.onMessage( + $a[0].castTo(const $WebSocketType(), releaseOriginal: true), + $a[1].castTo(const jni.JStringType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == r'onMessage(Lokhttp3/WebSocket;Lokio/ByteString;)V') { + _$impls[$p]!.onMessage1( + $a[0].castTo(const $WebSocketType(), releaseOriginal: true), + $a[1].castTo(const $ByteStringType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == r'onClosing(Lokhttp3/WebSocket;ILjava/lang/String;)V') { + _$impls[$p]!.onClosing( + $a[0].castTo(const $WebSocketType(), releaseOriginal: true), + $a[1] + .castTo(const jni.JIntegerType(), releaseOriginal: true) + .intValue(releaseOriginal: true), + $a[2].castTo(const jni.JStringType(), releaseOriginal: true), + ); + return jni.nullptr; + } + if ($d == + r'onFailure(Lokhttp3/WebSocket;Ljava/lang/Throwable;Lokhttp3/Response;)V') { + _$impls[$p]!.onFailure( + $a[0].castTo(const $WebSocketType(), releaseOriginal: true), + $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), + $a[2].castTo(const $ResponseType(), releaseOriginal: true), + ); + return jni.nullptr; + } + } catch (e) { + return ProtectedJniExtensions.newDartException(e); + } + return jni.nullptr; + } + + factory WebSocketListenerProxy_WebSocketListener.implement( + $WebSocketListenerProxy_WebSocketListenerImpl $impl, + ) { + final $p = ReceivePort(); + final $x = WebSocketListenerProxy_WebSocketListener.fromReference( + ProtectedJniExtensions.newPortProxy( + r'com.example.ok_http.WebSocketListenerProxy$WebSocketListener', + $p, + _$invokePointer, + ), + ).._$p = $p; + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + $p.listen(($m) { + if ($m == null) { + _$impls.remove($p.sendPort.nativePort); + $p.close(); + return; + } + final $i = $MethodInvocation.fromMessage($m as List); + final $r = _$invokeMethod($p.sendPort.nativePort, $i); + ProtectedJniExtensions.returnResult($i.result, $r); + }); + return $x; + } +} + +abstract interface class $WebSocketListenerProxy_WebSocketListenerImpl { + factory $WebSocketListenerProxy_WebSocketListenerImpl({ + required void Function(WebSocket webSocket, Response response) onOpen, + required void Function(WebSocket webSocket, jni.JString string) onMessage, + required void Function(WebSocket webSocket, ByteString byteString) + onMessage1, + required void Function(WebSocket webSocket, int i, jni.JString string) + onClosing, + required void Function( + WebSocket webSocket, jni.JObject throwable, Response response) + onFailure, + }) = _$WebSocketListenerProxy_WebSocketListenerImpl; + + void onOpen(WebSocket webSocket, Response response); + void onMessage(WebSocket webSocket, jni.JString string); + void onMessage1(WebSocket webSocket, ByteString byteString); + void onClosing(WebSocket webSocket, int i, jni.JString string); + void onFailure(WebSocket webSocket, jni.JObject throwable, Response response); +} + +class _$WebSocketListenerProxy_WebSocketListenerImpl + implements $WebSocketListenerProxy_WebSocketListenerImpl { + _$WebSocketListenerProxy_WebSocketListenerImpl({ + required void Function(WebSocket webSocket, Response response) onOpen, + required void Function(WebSocket webSocket, jni.JString string) onMessage, + required void Function(WebSocket webSocket, ByteString byteString) + onMessage1, + required void Function(WebSocket webSocket, int i, jni.JString string) + onClosing, + required void Function( + WebSocket webSocket, jni.JObject throwable, Response response) + onFailure, + }) : _onOpen = onOpen, + _onMessage = onMessage, + _onMessage1 = onMessage1, + _onClosing = onClosing, + _onFailure = onFailure; + + final void Function(WebSocket webSocket, Response response) _onOpen; + final void Function(WebSocket webSocket, jni.JString string) _onMessage; + final void Function(WebSocket webSocket, ByteString byteString) _onMessage1; + final void Function(WebSocket webSocket, int i, jni.JString string) + _onClosing; + final void Function( + WebSocket webSocket, jni.JObject throwable, Response response) _onFailure; + + void onOpen(WebSocket webSocket, Response response) { + return _onOpen(webSocket, response); + } + + void onMessage(WebSocket webSocket, jni.JString string) { + return _onMessage(webSocket, string); + } + + void onMessage1(WebSocket webSocket, ByteString byteString) { + return _onMessage1(webSocket, byteString); + } + + void onClosing(WebSocket webSocket, int i, jni.JString string) { + return _onClosing(webSocket, i, string); + } + + void onFailure( + WebSocket webSocket, jni.JObject throwable, Response response) { + return _onFailure(webSocket, throwable, response); + } +} + +final class $WebSocketListenerProxy_WebSocketListenerType + extends jni.JObjType { + const $WebSocketListenerProxy_WebSocketListenerType(); + + @override + String get signature => + r'Lcom/example/ok_http/WebSocketListenerProxy$WebSocketListener;'; + + @override + WebSocketListenerProxy_WebSocketListener fromReference( + jni.JReference reference) => + WebSocketListenerProxy_WebSocketListener.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($WebSocketListenerProxy_WebSocketListenerType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == + ($WebSocketListenerProxy_WebSocketListenerType) && + other is $WebSocketListenerProxy_WebSocketListenerType; + } +} + +/// from: com.example.ok_http.WebSocketListenerProxy +class WebSocketListenerProxy extends jni.JObject { + @override + late final jni.JObjType $type = type; + + WebSocketListenerProxy.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r'com/example/ok_http/WebSocketListenerProxy'); + + /// The type which includes information such as the signature of this class. + static const type = $WebSocketListenerProxyType(); + static final _id_new0 = _class.constructorId( + r'(Lcom/example/ok_http/WebSocketListenerProxy$WebSocketListener;)V', + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (com.example.ok_http.WebSocketListenerProxy$WebSocketListener webSocketListener) + /// The returned object must be released after use, by calling the [release] method. + factory WebSocketListenerProxy( + WebSocketListenerProxy_WebSocketListener webSocketListener, + ) { + return WebSocketListenerProxy.fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, webSocketListener.reference.pointer) + .reference); + } + + static final _id_onOpen = _class.instanceMethodId( + r'onOpen', + r'(Lokhttp3/WebSocket;Lokhttp3/Response;)V', + ); + + static final _onOpen = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public void onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response) + void onOpen( + WebSocket webSocket, + Response response, + ) { + _onOpen(reference.pointer, _id_onOpen as jni.JMethodIDPtr, + webSocket.reference.pointer, response.reference.pointer) + .check(); + } + + static final _id_onMessage = _class.instanceMethodId( + r'onMessage', + r'(Lokhttp3/WebSocket;Ljava/lang/String;)V', + ); + + static final _onMessage = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public void onMessage(okhttp3.WebSocket webSocket, java.lang.String string) + void onMessage( + WebSocket webSocket, + jni.JString string, + ) { + _onMessage(reference.pointer, _id_onMessage as jni.JMethodIDPtr, + webSocket.reference.pointer, string.reference.pointer) + .check(); + } + + static final _id_onMessage1 = _class.instanceMethodId( + r'onMessage', + r'(Lokhttp3/WebSocket;Lokio/ByteString;)V', + ); + + static final _onMessage1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public void onMessage(okhttp3.WebSocket webSocket, okio.ByteString byteString) + void onMessage1( + WebSocket webSocket, + ByteString byteString, + ) { + _onMessage1(reference.pointer, _id_onMessage1 as jni.JMethodIDPtr, + webSocket.reference.pointer, byteString.reference.pointer) + .check(); + } + + static final _id_onClosing = _class.instanceMethodId( + r'onClosing', + r'(Lokhttp3/WebSocket;ILjava/lang/String;)V', + ); + + static final _onClosing = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + $Int32, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, ffi.Pointer)>(); + + /// from: public void onClosing(okhttp3.WebSocket webSocket, int i, java.lang.String string) + void onClosing( + WebSocket webSocket, + int i, + jni.JString string, + ) { + _onClosing(reference.pointer, _id_onClosing as jni.JMethodIDPtr, + webSocket.reference.pointer, i, string.reference.pointer) + .check(); + } + + static final _id_onFailure = _class.instanceMethodId( + r'onFailure', + r'(Lokhttp3/WebSocket;Ljava/lang/Throwable;Lokhttp3/Response;)V', + ); + + static final _onFailure = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + + /// from: public void onFailure(okhttp3.WebSocket webSocket, java.lang.Throwable throwable, okhttp3.Response response) + void onFailure( + WebSocket webSocket, + jni.JObject throwable, + Response response, + ) { + _onFailure( + reference.pointer, + _id_onFailure as jni.JMethodIDPtr, + webSocket.reference.pointer, + throwable.reference.pointer, + response.reference.pointer) + .check(); + } +} + +final class $WebSocketListenerProxyType + extends jni.JObjType { + const $WebSocketListenerProxyType(); + + @override + String get signature => r'Lcom/example/ok_http/WebSocketListenerProxy;'; + + @override + WebSocketListenerProxy fromReference(jni.JReference reference) => + WebSocketListenerProxy.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($WebSocketListenerProxyType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($WebSocketListenerProxyType) && + other is $WebSocketListenerProxyType; + } +} + +/// from: okio.ByteString$Companion +class ByteString_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ByteString_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r'okio/ByteString$Companion'); + + /// The type which includes information such as the signature of this class. + static const type = $ByteString_CompanionType(); + static final _id_of = _class.instanceMethodId( + r'of', + r'([B)Lokio/ByteString;', + ); + + static final _of = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okio.ByteString of(byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + ByteString of( + jni.JArray bs, + ) { + return _of( + reference.pointer, _id_of as jni.JMethodIDPtr, bs.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_of1 = _class.instanceMethodId( + r'of', + r'([BII)Lokio/ByteString;', + ); + + static final _of1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); + + /// from: public final okio.ByteString of(byte[] bs, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + ByteString of1( + jni.JArray bs, + int i, + int i1, + ) { + return _of1(reference.pointer, _id_of1 as jni.JMethodIDPtr, + bs.reference.pointer, i, i1) + .object(const $ByteStringType()); + } + + static final _id_of2 = _class.instanceMethodId( + r'of', + r'(Ljava/nio/ByteBuffer;)Lokio/ByteString;', + ); + + static final _of2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okio.ByteString of(java.nio.ByteBuffer byteBuffer) + /// The returned object must be released after use, by calling the [release] method. + ByteString of2( + jni.JByteBuffer byteBuffer, + ) { + return _of2(reference.pointer, _id_of2 as jni.JMethodIDPtr, + byteBuffer.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_encodeUtf8 = _class.instanceMethodId( + r'encodeUtf8', + r'(Ljava/lang/String;)Lokio/ByteString;', + ); + + static final _encodeUtf8 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okio.ByteString encodeUtf8(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + ByteString encodeUtf8( + jni.JString string, + ) { + return _encodeUtf8(reference.pointer, _id_encodeUtf8 as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_encodeString = _class.instanceMethodId( + r'encodeString', + r'(Ljava/lang/String;Ljava/nio/charset/Charset;)Lokio/ByteString;', + ); + + static final _encodeString = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: public final okio.ByteString encodeString(java.lang.String string, java.nio.charset.Charset charset) + /// The returned object must be released after use, by calling the [release] method. + ByteString encodeString( + jni.JString string, + jni.JObject charset, + ) { + return _encodeString( + reference.pointer, + _id_encodeString as jni.JMethodIDPtr, + string.reference.pointer, + charset.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_decodeBase64 = _class.instanceMethodId( + r'decodeBase64', + r'(Ljava/lang/String;)Lokio/ByteString;', + ); + + static final _decodeBase64 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okio.ByteString decodeBase64(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + ByteString decodeBase64( + jni.JString string, + ) { + return _decodeBase64(reference.pointer, + _id_decodeBase64 as jni.JMethodIDPtr, string.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_decodeHex = _class.instanceMethodId( + r'decodeHex', + r'(Ljava/lang/String;)Lokio/ByteString;', + ); + + static final _decodeHex = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okio.ByteString decodeHex(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + ByteString decodeHex( + jni.JString string, + ) { + return _decodeHex(reference.pointer, _id_decodeHex as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_read = _class.instanceMethodId( + r'read', + r'(Ljava/io/InputStream;I)Lokio/ByteString;', + ); + + static final _read = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public final okio.ByteString read(java.io.InputStream inputStream, int i) + /// The returned object must be released after use, by calling the [release] method. + ByteString read( + jni.JObject inputStream, + int i, + ) { + return _read(reference.pointer, _id_read as jni.JMethodIDPtr, + inputStream.reference.pointer, i) + .object(const $ByteStringType()); + } + + static final _id_new0 = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory ByteString_Companion( + jni.JObject defaultConstructorMarker, + ) { + return ByteString_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $ByteString_CompanionType + extends jni.JObjType { + const $ByteString_CompanionType(); + + @override + String get signature => r'Lokio/ByteString$Companion;'; + + @override + ByteString_Companion fromReference(jni.JReference reference) => + ByteString_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ByteString_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ByteString_CompanionType) && + other is $ByteString_CompanionType; + } +} + +/// from: okio.ByteString +class ByteString extends jni.JObject { + @override + late final jni.JObjType $type = type; + + ByteString.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r'okio/ByteString'); + + /// The type which includes information such as the signature of this class. + static const type = $ByteStringType(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'Lokio/ByteString$Companion;', + ); + + /// from: static public final okio.ByteString$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static ByteString_Companion get Companion => + _id_Companion.get(_class, const $ByteString_CompanionType()); + + static final _id_EMPTY = _class.staticFieldId( + r'EMPTY', + r'Lokio/ByteString;', + ); + + /// from: static public final okio.ByteString EMPTY + /// The returned object must be released after use, by calling the [release] method. + static ByteString get EMPTY => _id_EMPTY.get(_class, const $ByteStringType()); + + static final _id_new0 = _class.constructorId( + r'([B)V', + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + factory ByteString( + jni.JArray bs, + ) { + return ByteString.fromReference(_new0(_class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, bs.reference.pointer) + .reference); + } + + static final _id_utf8 = _class.instanceMethodId( + r'utf8', + r'()Ljava/lang/String;', + ); + + static final _utf8 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String utf8() + /// The returned object must be released after use, by calling the [release] method. + jni.JString utf8() { + return _utf8(reference.pointer, _id_utf8 as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_string = _class.instanceMethodId( + r'string', + r'(Ljava/nio/charset/Charset;)Ljava/lang/String;', + ); + + static final _string = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public java.lang.String string(java.nio.charset.Charset charset) + /// The returned object must be released after use, by calling the [release] method. + jni.JString string( + jni.JObject charset, + ) { + return _string(reference.pointer, _id_string as jni.JMethodIDPtr, + charset.reference.pointer) + .object(const jni.JStringType()); + } + + static final _id_base64 = _class.instanceMethodId( + r'base64', + r'()Ljava/lang/String;', + ); + + static final _base64 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String base64() + /// The returned object must be released after use, by calling the [release] method. + jni.JString base64() { + return _base64(reference.pointer, _id_base64 as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_md5 = _class.instanceMethodId( + r'md5', + r'()Lokio/ByteString;', + ); + + static final _md5 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okio.ByteString md5() + /// The returned object must be released after use, by calling the [release] method. + ByteString md5() { + return _md5(reference.pointer, _id_md5 as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_sha1 = _class.instanceMethodId( + r'sha1', + r'()Lokio/ByteString;', + ); + + static final _sha1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okio.ByteString sha1() + /// The returned object must be released after use, by calling the [release] method. + ByteString sha1() { + return _sha1(reference.pointer, _id_sha1 as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_sha256 = _class.instanceMethodId( + r'sha256', + r'()Lokio/ByteString;', + ); + + static final _sha256 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okio.ByteString sha256() + /// The returned object must be released after use, by calling the [release] method. + ByteString sha256() { + return _sha256(reference.pointer, _id_sha256 as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_sha512 = _class.instanceMethodId( + r'sha512', + r'()Lokio/ByteString;', + ); + + static final _sha512 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okio.ByteString sha512() + /// The returned object must be released after use, by calling the [release] method. + ByteString sha512() { + return _sha512(reference.pointer, _id_sha512 as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_hmacSha1 = _class.instanceMethodId( + r'hmacSha1', + r'(Lokio/ByteString;)Lokio/ByteString;', + ); + + static final _hmacSha1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okio.ByteString hmacSha1(okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + ByteString hmacSha1( + ByteString byteString, + ) { + return _hmacSha1(reference.pointer, _id_hmacSha1 as jni.JMethodIDPtr, + byteString.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_hmacSha256 = _class.instanceMethodId( + r'hmacSha256', + r'(Lokio/ByteString;)Lokio/ByteString;', + ); + + static final _hmacSha256 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okio.ByteString hmacSha256(okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + ByteString hmacSha256( + ByteString byteString, + ) { + return _hmacSha256(reference.pointer, _id_hmacSha256 as jni.JMethodIDPtr, + byteString.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_hmacSha512 = _class.instanceMethodId( + r'hmacSha512', + r'(Lokio/ByteString;)Lokio/ByteString;', + ); + + static final _hmacSha512 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public okio.ByteString hmacSha512(okio.ByteString byteString) + /// The returned object must be released after use, by calling the [release] method. + ByteString hmacSha512( + ByteString byteString, + ) { + return _hmacSha512(reference.pointer, _id_hmacSha512 as jni.JMethodIDPtr, + byteString.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_base64Url = _class.instanceMethodId( + r'base64Url', + r'()Ljava/lang/String;', + ); + + static final _base64Url = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String base64Url() + /// The returned object must be released after use, by calling the [release] method. + jni.JString base64Url() { + return _base64Url(reference.pointer, _id_base64Url as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_hex = _class.instanceMethodId( + r'hex', + r'()Ljava/lang/String;', + ); + + static final _hex = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String hex() + /// The returned object must be released after use, by calling the [release] method. + jni.JString hex() { + return _hex(reference.pointer, _id_hex as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_toAsciiLowercase = _class.instanceMethodId( + r'toAsciiLowercase', + r'()Lokio/ByteString;', + ); + + static final _toAsciiLowercase = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okio.ByteString toAsciiLowercase() + /// The returned object must be released after use, by calling the [release] method. + ByteString toAsciiLowercase() { + return _toAsciiLowercase( + reference.pointer, _id_toAsciiLowercase as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_toAsciiUppercase = _class.instanceMethodId( + r'toAsciiUppercase', + r'()Lokio/ByteString;', + ); + + static final _toAsciiUppercase = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public okio.ByteString toAsciiUppercase() + /// The returned object must be released after use, by calling the [release] method. + ByteString toAsciiUppercase() { + return _toAsciiUppercase( + reference.pointer, _id_toAsciiUppercase as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_substring = _class.instanceMethodId( + r'substring', + r'(II)Lokio/ByteString;', + ); + + static final _substring = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<($Int32, $Int32)>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int, int)>(); + + /// from: public okio.ByteString substring(int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + ByteString substring( + int i, + int i1, + ) { + return _substring( + reference.pointer, _id_substring as jni.JMethodIDPtr, i, i1) + .object(const $ByteStringType()); + } + + static final _id_getByte = _class.instanceMethodId( + r'getByte', + r'(I)B', + ); + + static final _getByte = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallByteMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final byte getByte(int i) + int getByte( + int i, + ) { + return _getByte(reference.pointer, _id_getByte as jni.JMethodIDPtr, i).byte; + } + + static final _id_size = _class.instanceMethodId( + r'size', + r'()I', + ); + + static final _size = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final int size() + int size() { + return _size(reference.pointer, _id_size as jni.JMethodIDPtr).integer; + } + + static final _id_toByteArray = _class.instanceMethodId( + r'toByteArray', + r'()[B', + ); + + static final _toByteArray = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public byte[] toByteArray() + /// The returned object must be released after use, by calling the [release] method. + jni.JArray toByteArray() { + return _toByteArray(reference.pointer, _id_toByteArray as jni.JMethodIDPtr) + .object(const jni.JArrayType(jni.jbyteType())); + } + + static final _id_asByteBuffer = _class.instanceMethodId( + r'asByteBuffer', + r'()Ljava/nio/ByteBuffer;', + ); + + static final _asByteBuffer = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.nio.ByteBuffer asByteBuffer() + /// The returned object must be released after use, by calling the [release] method. + jni.JByteBuffer asByteBuffer() { + return _asByteBuffer( + reference.pointer, _id_asByteBuffer as jni.JMethodIDPtr) + .object(const jni.JByteBufferType()); + } + + static final _id_write = _class.instanceMethodId( + r'write', + r'(Ljava/io/OutputStream;)V', + ); + + static final _write = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void write(java.io.OutputStream outputStream) + void write( + jni.JObject outputStream, + ) { + _write(reference.pointer, _id_write as jni.JMethodIDPtr, + outputStream.reference.pointer) + .check(); + } + + static final _id_rangeEquals = _class.instanceMethodId( + r'rangeEquals', + r'(ILokio/ByteString;II)Z', + ); + + static final _rangeEquals = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + $Int32, + ffi.Pointer, + $Int32, + $Int32 + )>)>>('globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer, int, int)>(); + + /// from: public boolean rangeEquals(int i, okio.ByteString byteString, int i1, int i2) + bool rangeEquals( + int i, + ByteString byteString, + int i1, + int i2, + ) { + return _rangeEquals(reference.pointer, _id_rangeEquals as jni.JMethodIDPtr, + i, byteString.reference.pointer, i1, i2) + .boolean; + } + + static final _id_rangeEquals1 = _class.instanceMethodId( + r'rangeEquals', + r'(I[BII)Z', + ); + + static final _rangeEquals1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + $Int32, + ffi.Pointer, + $Int32, + $Int32 + )>)>>('globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer, int, int)>(); + + /// from: public boolean rangeEquals(int i, byte[] bs, int i1, int i2) + bool rangeEquals1( + int i, + jni.JArray bs, + int i1, + int i2, + ) { + return _rangeEquals1( + reference.pointer, + _id_rangeEquals1 as jni.JMethodIDPtr, + i, + bs.reference.pointer, + i1, + i2) + .boolean; + } + + static final _id_copyInto = _class.instanceMethodId( + r'copyInto', + r'(I[BII)V', + ); + + static final _copyInto = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + $Int32, + ffi.Pointer, + $Int32, + $Int32 + )>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + int, ffi.Pointer, int, int)>(); + + /// from: public void copyInto(int i, byte[] bs, int i1, int i2) + void copyInto( + int i, + jni.JArray bs, + int i1, + int i2, + ) { + _copyInto(reference.pointer, _id_copyInto as jni.JMethodIDPtr, i, + bs.reference.pointer, i1, i2) + .check(); + } + + static final _id_startsWith = _class.instanceMethodId( + r'startsWith', + r'(Lokio/ByteString;)Z', + ); + + static final _startsWith = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final boolean startsWith(okio.ByteString byteString) + bool startsWith( + ByteString byteString, + ) { + return _startsWith(reference.pointer, _id_startsWith as jni.JMethodIDPtr, + byteString.reference.pointer) + .boolean; + } + + static final _id_startsWith1 = _class.instanceMethodId( + r'startsWith', + r'([B)Z', + ); + + static final _startsWith1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final boolean startsWith(byte[] bs) + bool startsWith1( + jni.JArray bs, + ) { + return _startsWith1(reference.pointer, _id_startsWith1 as jni.JMethodIDPtr, + bs.reference.pointer) + .boolean; + } + + static final _id_endsWith = _class.instanceMethodId( + r'endsWith', + r'(Lokio/ByteString;)Z', + ); + + static final _endsWith = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final boolean endsWith(okio.ByteString byteString) + bool endsWith( + ByteString byteString, + ) { + return _endsWith(reference.pointer, _id_endsWith as jni.JMethodIDPtr, + byteString.reference.pointer) + .boolean; + } + + static final _id_endsWith1 = _class.instanceMethodId( + r'endsWith', + r'([B)Z', + ); + + static final _endsWith1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final boolean endsWith(byte[] bs) + bool endsWith1( + jni.JArray bs, + ) { + return _endsWith1(reference.pointer, _id_endsWith1 as jni.JMethodIDPtr, + bs.reference.pointer) + .boolean; + } + + static final _id_indexOf = _class.instanceMethodId( + r'indexOf', + r'(Lokio/ByteString;I)I', + ); + + static final _indexOf = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public final int indexOf(okio.ByteString byteString, int i) + int indexOf( + ByteString byteString, + int i, + ) { + return _indexOf(reference.pointer, _id_indexOf as jni.JMethodIDPtr, + byteString.reference.pointer, i) + .integer; + } + + static final _id_indexOf1 = _class.instanceMethodId( + r'indexOf', + r'([BI)I', + ); + + static final _indexOf1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public int indexOf(byte[] bs, int i) + int indexOf1( + jni.JArray bs, + int i, + ) { + return _indexOf1(reference.pointer, _id_indexOf1 as jni.JMethodIDPtr, + bs.reference.pointer, i) + .integer; + } + + static final _id_lastIndexOf = _class.instanceMethodId( + r'lastIndexOf', + r'(Lokio/ByteString;I)I', + ); + + static final _lastIndexOf = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public final int lastIndexOf(okio.ByteString byteString, int i) + int lastIndexOf( + ByteString byteString, + int i, + ) { + return _lastIndexOf(reference.pointer, _id_lastIndexOf as jni.JMethodIDPtr, + byteString.reference.pointer, i) + .integer; + } + + static final _id_lastIndexOf1 = _class.instanceMethodId( + r'lastIndexOf', + r'([BI)I', + ); + + static final _lastIndexOf1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public int lastIndexOf(byte[] bs, int i) + int lastIndexOf1( + jni.JArray bs, + int i, + ) { + return _lastIndexOf1(reference.pointer, + _id_lastIndexOf1 as jni.JMethodIDPtr, bs.reference.pointer, i) + .integer; + } + + static final _id_equals = _class.instanceMethodId( + r'equals', + r'(Ljava/lang/Object;)Z', + ); + + static final _equals = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallBooleanMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public boolean equals(java.lang.Object object) + bool equals( + jni.JObject object, + ) { + return _equals(reference.pointer, _id_equals as jni.JMethodIDPtr, + object.reference.pointer) + .boolean; + } + + static final _id_hashCode1 = _class.instanceMethodId( + r'hashCode', + r'()I', + ); + + static final _hashCode1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public int hashCode() + int hashCode1() { + return _hashCode1(reference.pointer, _id_hashCode1 as jni.JMethodIDPtr) + .integer; + } + + static final _id_compareTo = _class.instanceMethodId( + r'compareTo', + r'(Lokio/ByteString;)I', + ); + + static final _compareTo = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public int compareTo(okio.ByteString byteString) + int compareTo( + ByteString byteString, + ) { + return _compareTo(reference.pointer, _id_compareTo as jni.JMethodIDPtr, + byteString.reference.pointer) + .integer; + } + + static final _id_toString1 = _class.instanceMethodId( + r'toString', + r'()Ljava/lang/String;', + ); + + static final _toString1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.lang.String toString() + /// The returned object must be released after use, by calling the [release] method. + jni.JString toString1() { + return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) + .object(const jni.JStringType()); + } + + static final _id_substring1 = _class.instanceMethodId( + r'substring', + r'(I)Lokio/ByteString;', + ); + + static final _substring1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public final okio.ByteString substring(int i) + /// The returned object must be released after use, by calling the [release] method. + ByteString substring1( + int i, + ) { + return _substring1(reference.pointer, _id_substring1 as jni.JMethodIDPtr, i) + .object(const $ByteStringType()); + } + + static final _id_substring2 = _class.instanceMethodId( + r'substring', + r'()Lokio/ByteString;', + ); + + static final _substring2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public final okio.ByteString substring() + /// The returned object must be released after use, by calling the [release] method. + ByteString substring2() { + return _substring2(reference.pointer, _id_substring2 as jni.JMethodIDPtr) + .object(const $ByteStringType()); + } + + static final _id_indexOf2 = _class.instanceMethodId( + r'indexOf', + r'(Lokio/ByteString;)I', + ); + + static final _indexOf2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final int indexOf(okio.ByteString byteString) + int indexOf2( + ByteString byteString, + ) { + return _indexOf2(reference.pointer, _id_indexOf2 as jni.JMethodIDPtr, + byteString.reference.pointer) + .integer; + } + + static final _id_indexOf3 = _class.instanceMethodId( + r'indexOf', + r'([B)I', + ); + + static final _indexOf3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final int indexOf(byte[] bs) + int indexOf3( + jni.JArray bs, + ) { + return _indexOf3(reference.pointer, _id_indexOf3 as jni.JMethodIDPtr, + bs.reference.pointer) + .integer; + } + + static final _id_lastIndexOf2 = _class.instanceMethodId( + r'lastIndexOf', + r'(Lokio/ByteString;)I', + ); + + static final _lastIndexOf2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final int lastIndexOf(okio.ByteString byteString) + int lastIndexOf2( + ByteString byteString, + ) { + return _lastIndexOf2(reference.pointer, + _id_lastIndexOf2 as jni.JMethodIDPtr, byteString.reference.pointer) + .integer; + } + + static final _id_lastIndexOf3 = _class.instanceMethodId( + r'lastIndexOf', + r'([B)I', + ); + + static final _lastIndexOf3 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final int lastIndexOf(byte[] bs) + int lastIndexOf3( + jni.JArray bs, + ) { + return _lastIndexOf3(reference.pointer, + _id_lastIndexOf3 as jni.JMethodIDPtr, bs.reference.pointer) + .integer; + } + + static final _id_of = _class.staticMethodId( + r'of', + r'([B)Lokio/ByteString;', + ); + + static final _of = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okio.ByteString of(byte[] bs) + /// The returned object must be released after use, by calling the [release] method. + static ByteString of( + jni.JArray bs, + ) { + return _of(_class.reference.pointer, _id_of as jni.JMethodIDPtr, + bs.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_of1 = _class.staticMethodId( + r'of', + r'([BII)Lokio/ByteString;', + ); + + static final _of1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int, int)>(); + + /// from: static public final okio.ByteString of(byte[] bs, int i, int i1) + /// The returned object must be released after use, by calling the [release] method. + static ByteString of1( + jni.JArray bs, + int i, + int i1, + ) { + return _of1(_class.reference.pointer, _id_of1 as jni.JMethodIDPtr, + bs.reference.pointer, i, i1) + .object(const $ByteStringType()); + } + + static final _id_of2 = _class.staticMethodId( + r'of', + r'(Ljava/nio/ByteBuffer;)Lokio/ByteString;', + ); + + static final _of2 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okio.ByteString of(java.nio.ByteBuffer byteBuffer) + /// The returned object must be released after use, by calling the [release] method. + static ByteString of2( + jni.JByteBuffer byteBuffer, + ) { + return _of2(_class.reference.pointer, _id_of2 as jni.JMethodIDPtr, + byteBuffer.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_encodeUtf8 = _class.staticMethodId( + r'encodeUtf8', + r'(Ljava/lang/String;)Lokio/ByteString;', + ); + + static final _encodeUtf8 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okio.ByteString encodeUtf8(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + static ByteString encodeUtf8( + jni.JString string, + ) { + return _encodeUtf8(_class.reference.pointer, + _id_encodeUtf8 as jni.JMethodIDPtr, string.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_encodeString = _class.staticMethodId( + r'encodeString', + r'(Ljava/lang/String;Ljava/nio/charset/Charset;)Lokio/ByteString;', + ); + + static final _encodeString = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs< + ( + ffi.Pointer, + ffi.Pointer + )>)>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, ffi.Pointer)>(); + + /// from: static public final okio.ByteString encodeString(java.lang.String string, java.nio.charset.Charset charset) + /// The returned object must be released after use, by calling the [release] method. + static ByteString encodeString( + jni.JString string, + jni.JObject charset, + ) { + return _encodeString( + _class.reference.pointer, + _id_encodeString as jni.JMethodIDPtr, + string.reference.pointer, + charset.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_decodeBase64 = _class.staticMethodId( + r'decodeBase64', + r'(Ljava/lang/String;)Lokio/ByteString;', + ); + + static final _decodeBase64 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okio.ByteString decodeBase64(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + static ByteString decodeBase64( + jni.JString string, + ) { + return _decodeBase64(_class.reference.pointer, + _id_decodeBase64 as jni.JMethodIDPtr, string.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_decodeHex = _class.staticMethodId( + r'decodeHex', + r'(Ljava/lang/String;)Lokio/ByteString;', + ); + + static final _decodeHex = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public final okio.ByteString decodeHex(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + static ByteString decodeHex( + jni.JString string, + ) { + return _decodeHex(_class.reference.pointer, + _id_decodeHex as jni.JMethodIDPtr, string.reference.pointer) + .object(const $ByteStringType()); + } + + static final _id_read = _class.staticMethodId( + r'read', + r'(Ljava/io/InputStream;I)Lokio/ByteString;', + ); + + static final _read = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: static public final okio.ByteString read(java.io.InputStream inputStream, int i) + /// The returned object must be released after use, by calling the [release] method. + static ByteString read( + jni.JObject inputStream, + int i, + ) { + return _read(_class.reference.pointer, _id_read as jni.JMethodIDPtr, + inputStream.reference.pointer, i) + .object(const $ByteStringType()); + } + + static final _id_compareTo1 = _class.instanceMethodId( + r'compareTo', + r'(Ljava/lang/Object;)I', + ); + + static final _compareTo1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallIntMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public int compareTo(java.lang.Object object) + int compareTo1( + jni.JObject object, + ) { + return _compareTo1(reference.pointer, _id_compareTo1 as jni.JMethodIDPtr, + object.reference.pointer) + .integer; + } +} + +final class $ByteStringType extends jni.JObjType { + const $ByteStringType(); + + @override + String get signature => r'Lokio/ByteString;'; + + @override + ByteString fromReference(jni.JReference reference) => + ByteString.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($ByteStringType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($ByteStringType) && other is $ByteStringType; + } +} + +/// from: com.example.ok_http.WebSocketInterceptor$Companion +class WebSocketInterceptor_Companion extends jni.JObject { + @override + late final jni.JObjType $type = type; + + WebSocketInterceptor_Companion.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r'com/example/ok_http/WebSocketInterceptor$Companion'); + + /// The type which includes information such as the signature of this class. + static const type = $WebSocketInterceptor_CompanionType(); + static final _id_addWSInterceptor = _class.instanceMethodId( + r'addWSInterceptor', + r'(Lokhttp3/OkHttpClient$Builder;)Lokhttp3/OkHttpClient$Builder;', + ); + + static final _addWSInterceptor = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public final okhttp3.OkHttpClient$Builder addWSInterceptor(okhttp3.OkHttpClient$Builder builder) + /// The returned object must be released after use, by calling the [release] method. + OkHttpClient_Builder addWSInterceptor( + OkHttpClient_Builder builder, + ) { + return _addWSInterceptor(reference.pointer, + _id_addWSInterceptor as jni.JMethodIDPtr, builder.reference.pointer) + .object(const $OkHttpClient_BuilderType()); + } + + static final _id_new0 = _class.constructorId( + r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_NewObject') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// The returned object must be released after use, by calling the [release] method. + factory WebSocketInterceptor_Companion( + jni.JObject defaultConstructorMarker, + ) { + return WebSocketInterceptor_Companion.fromReference(_new0( + _class.reference.pointer, + _id_new0 as jni.JMethodIDPtr, + defaultConstructorMarker.reference.pointer) + .reference); + } +} + +final class $WebSocketInterceptor_CompanionType + extends jni.JObjType { + const $WebSocketInterceptor_CompanionType(); + + @override + String get signature => + r'Lcom/example/ok_http/WebSocketInterceptor$Companion;'; + + @override + WebSocketInterceptor_Companion fromReference(jni.JReference reference) => + WebSocketInterceptor_Companion.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($WebSocketInterceptor_CompanionType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($WebSocketInterceptor_CompanionType) && + other is $WebSocketInterceptor_CompanionType; + } +} + +/// from: com.example.ok_http.WebSocketInterceptor +class WebSocketInterceptor extends jni.JObject { + @override + late final jni.JObjType $type = type; + + WebSocketInterceptor.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = + jni.JClass.forName(r'com/example/ok_http/WebSocketInterceptor'); + + /// The type which includes information such as the signature of this class. + static const type = $WebSocketInterceptorType(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'Lcom/example/ok_http/WebSocketInterceptor$Companion;', + ); + + /// from: static public final com.example.ok_http.WebSocketInterceptor$Companion Companion + /// The returned object must be released after use, by calling the [release] method. + static WebSocketInterceptor_Companion get Companion => + _id_Companion.get(_class, const $WebSocketInterceptor_CompanionType()); + + static final _id_new0 = _class.constructorId( + r'()V', + ); + + static final _new0 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_NewObject') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public void () + /// The returned object must be released after use, by calling the [release] method. + factory WebSocketInterceptor() { + return WebSocketInterceptor.fromReference( + _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + .reference); + } +} + +final class $WebSocketInterceptorType + extends jni.JObjType { + const $WebSocketInterceptorType(); + + @override + String get signature => r'Lcom/example/ok_http/WebSocketInterceptor;'; + + @override + WebSocketInterceptor fromReference(jni.JReference reference) => + WebSocketInterceptor.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($WebSocketInterceptorType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($WebSocketInterceptorType) && + other is $WebSocketInterceptorType; + } +} diff --git a/pkgs/ok_http/lib/src/ok_http_client.dart b/pkgs/ok_http/lib/src/ok_http_client.dart index 33b1bfd5eb..752dbaa41a 100644 --- a/pkgs/ok_http/lib/src/ok_http_client.dart +++ b/pkgs/ok_http/lib/src/ok_http_client.dart @@ -57,14 +57,7 @@ class OkHttpClient extends BaseClient { // Refer to OkHttp documentation for the shutdown procedure: // https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/index.html#:~:text=Shutdown - // Bindings for `java.util.concurrent.ExecutorService` are erroneous. - // https://github.com/dart-lang/native/issues/588 - // So, use the JClass API to call the `shutdown` method by its signature. - _client - .dispatcher() - .executorService() - .jClass - .instanceMethodId('shutdown', '()V'); + _client.dispatcher().executorService().shutdown(); // Remove all idle connections from the resource pool. _client.connectionPool().evictAll(); @@ -293,12 +286,6 @@ extension on Uint8List { } extension on JArray { - Uint8List toUint8List({int? length}) { - length ??= this.length; - final list = Uint8List(length); - for (var i = 0; i < length; i++) { - list[i] = this[i]; - } - return list; - } + Uint8List toUint8List({int? length}) => + getRange(0, length ?? this.length).buffer.asUint8List(); } diff --git a/pkgs/ok_http/lib/src/ok_http_web_socket.dart b/pkgs/ok_http/lib/src/ok_http_web_socket.dart new file mode 100644 index 0000000000..4136a62852 --- /dev/null +++ b/pkgs/ok_http/lib/src/ok_http_web_socket.dart @@ -0,0 +1,229 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:jni/jni.dart'; +import 'package:web_socket/web_socket.dart'; + +import 'jni/bindings.dart' as bindings; + +/// A [WebSocket] implemented using the OkHttp library's +/// [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html) +/// API. +/// +/// Example usage of [OkHttpWebSocket]: +/// ```dart +/// import 'package:ok_http/ok_http.dart'; +/// import 'package:web_socket/web_socket.dart'; +/// +/// void main() async { +/// final socket = await OkHttpWebSocket.connect( +/// Uri.parse('wss://ws.postman-echo.com/raw')); +/// +/// socket.events.listen((e) async { +/// switch (e) { +/// case TextDataReceived(text: final text): +/// print('Received Text: $text'); +/// await socket.close(); +/// case BinaryDataReceived(data: final data): +/// print('Received Binary: $data'); +/// case CloseReceived(code: final code, reason: final reason): +/// print('Connection to server closed: $code [$reason]'); +/// } +/// }); +/// } +/// ``` +class OkHttpWebSocket implements WebSocket { + late bindings.OkHttpClient _client; + late final bindings.WebSocket _webSocket; + final _events = StreamController(); + String? _protocol; + + /// Private constructor to prevent direct instantiation. + /// + /// Used by [connect] to create a new WebSocket connection, which requires a + /// [bindings.OkHttpClient] instance (see [_connect]), and cannot be accessed + /// statically. + OkHttpWebSocket._() { + // Add the WebSocketInterceptor to prevent response parsing errors. + _client = bindings.WebSocketInterceptor.Companion + .addWSInterceptor(bindings.OkHttpClient_Builder()) + .build(); + } + + /// Create a new WebSocket connection using `OkHttp`'s + /// [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html) + /// API. + /// + /// The URL supplied in [url] must use the scheme ws or wss. + /// + /// If provided, the [protocols] argument indicates the subprotocols that + /// the peer is able to select. See + /// [RFC-6455 1.9](https://datatracker.ietf.org/doc/html/rfc6455#section-1.9). + static Future connect(Uri url, + {Iterable? protocols}) async => + OkHttpWebSocket._()._connect(url, protocols); + + Future _connect(Uri url, Iterable? protocols) async { + if (!url.isScheme('ws') && !url.isScheme('wss')) { + throw ArgumentError.value( + url, 'url', 'only ws: and wss: schemes are supported'); + } + + final requestBuilder = + bindings.Request_Builder().url1(url.toString().toJString()); + + if (protocols != null) { + requestBuilder.addHeader('Sec-WebSocket-Protocol'.toJString(), + protocols.join(', ').toJString()); + } + + var openCompleter = Completer(); + + _client.newWebSocket( + requestBuilder.build(), + bindings.WebSocketListenerProxy( + bindings.WebSocketListenerProxy_WebSocketListener.implement( + bindings.$WebSocketListenerProxy_WebSocketListenerImpl( + onOpen: (webSocket, response) { + _webSocket = webSocket; + + var protocolHeader = + response.header1('sec-websocket-protocol'.toJString()); + if (!protocolHeader.isNull) { + _protocol = protocolHeader.toDartString(releaseOriginal: true); + if (!(protocols?.contains(_protocol) ?? true)) { + openCompleter + .completeError(WebSocketException('Protocol mismatch. ' + 'Expected one of $protocols, but received $_protocol')); + return; + } + } + + openCompleter.complete(this); + }, + onMessage: (bindings.WebSocket webSocket, JString string) { + if (_events.isClosed) return; + _events.add(TextDataReceived(string.toDartString())); + }, + onMessage1: + (bindings.WebSocket webSocket, bindings.ByteString byteString) { + if (_events.isClosed) return; + _events.add( + BinaryDataReceived(byteString.toByteArray().toUint8List())); + }, + onClosing: + (bindings.WebSocket webSocket, int i, JString string) async { + _okHttpClientClose(); + + if (_events.isClosed) return; + + _events.add(CloseReceived(i, string.toDartString())); + await _events.close(); + }, + onFailure: (bindings.WebSocket webSocket, JObject throwable, + bindings.Response response) { + if (_events.isClosed) return; + + var throwableString = throwable.toString(); + + // If the throwable is: + // - java.net.ProtocolException: Control frames must be final. + // - java.io.EOFException + // - java.net.SocketException: Socket closed + // Then the connection was closed abnormally. + if (throwableString.contains(RegExp( + r'(java\.net\.ProtocolException: Control frames must be final\.|java\.io\.EOFException|java\.net\.SocketException: Socket closed)'))) { + _events.add(CloseReceived(1006, 'abnormal close')); + unawaited(_events.close()); + return; + } + var error = WebSocketException( + 'Connection ended unexpectedly $throwableString'); + if (openCompleter.isCompleted) { + _events.addError(error); + return; + } + openCompleter.completeError(error); + }, + )))); + + return openCompleter.future; + } + + @override + Future close([int? code, String? reason]) async { + if (_events.isClosed) { + throw WebSocketConnectionClosed(); + } + + if (code != null && code != 1000 && !(code >= 3000 && code <= 4999)) { + throw ArgumentError('Invalid argument: $code, close code must be 1000 or ' + 'in the range 3000-4999'); + } + if (reason != null && utf8.encode(reason).length > 123) { + throw ArgumentError.value(reason, 'reason', + 'reason must be <= 123 bytes long when encoded as UTF-8'); + } + + unawaited(_events.close()); + + // When no code is provided, cause an abnormal closure to send 1005. + if (code == null) { + _webSocket.cancel(); + return; + } + + _webSocket.close( + code, reason?.toJString() ?? JString.fromReference(jNullReference)); + } + + @override + Stream get events => _events.stream; + + @override + String get protocol => _protocol ?? ''; + + @override + void sendBytes(Uint8List b) { + if (_events.isClosed) { + throw WebSocketConnectionClosed(); + } + _webSocket.send1(bindings.ByteString.of(b.toJArray())); + } + + @override + void sendText(String s) { + if (_events.isClosed) { + throw WebSocketConnectionClosed(); + } + _webSocket.send(s.toJString()); + } + + /// Closes the OkHttpClient using the recommended shutdown procedure. + /// + /// https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/index.html#:~:text=Shutdown + void _okHttpClientClose() { + _client.dispatcher().executorService().shutdown(); + _client.connectionPool().evictAll(); + var cache = _client.cache(); + if (!cache.isNull) { + cache.close(); + } + _client.release(); + } +} + +extension on Uint8List { + JArray toJArray() => + JArray(jbyte.type, length)..setRange(0, length, this); +} + +extension on JArray { + Uint8List toUint8List({int? length}) => + getRange(0, length ?? this.length).buffer.asUint8List(); +} diff --git a/pkgs/ok_http/pubspec.yaml b/pkgs/ok_http/pubspec.yaml index 68ff974261..f2b817dc8a 100644 --- a/pkgs/ok_http/pubspec.yaml +++ b/pkgs/ok_http/pubspec.yaml @@ -1,5 +1,5 @@ name: ok_http -version: 0.1.0-wip +version: 0.1.0 description: >- An Android Flutter plugin that provides access to the OkHttp HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/ok_http @@ -14,12 +14,13 @@ dependencies: sdk: flutter http: ^1.2.1 http_profile: ^0.1.0 - jni: ^0.9.2 + jni: ^0.10.1 plugin_platform_interface: ^2.0.2 + web_socket: ^0.1.5 dev_dependencies: dart_flutter_team_lints: ^3.0.0 - jnigen: ^0.9.1 + jnigen: ^0.10.0 flutter: plugin: From 89d5863dc8cad62497b82c2f3f24a4b68083b685 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 19 Jul 2024 10:17:34 -0700 Subject: [PATCH 413/448] Prepare to publish ok_http (#1274) Remove the `publish_to: none` pubspec config. --- pkgs/ok_http/pubspec.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/ok_http/pubspec.yaml b/pkgs/ok_http/pubspec.yaml index f2b817dc8a..121c6b314c 100644 --- a/pkgs/ok_http/pubspec.yaml +++ b/pkgs/ok_http/pubspec.yaml @@ -3,7 +3,6 @@ version: 0.1.0 description: >- An Android Flutter plugin that provides access to the OkHttp HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/ok_http -publish_to: none environment: sdk: ^3.4.0 From d0b1a770535bb6160ed1a564e028838e6d53766e Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Tue, 6 Aug 2024 01:49:07 +0530 Subject: [PATCH 414/448] [docs] Add ok_http entry to readme (#1285) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 5b5a6f5d40..d85e08c40e 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ and the browser. | [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | A library that tests whether implementations of package:http's `Client` class behave as expected. | | | [cronet_http](pkgs/cronet_http/) | An Android Flutter plugin that provides access to the [Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) HTTP client. | [![pub package](https://img.shields.io/pub/v/cronet_http.svg)](https://pub.dev/packages/cronet_http) | | [cupertino_http](pkgs/cupertino_http/) | A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). | [![pub package](https://img.shields.io/pub/v/cupertino_http.svg)](https://pub.dev/packages/cupertino_http) | +| [ok_http](pkgs/ok_http/) | An Android Flutter plugin that provides access to the [OkHttp](https://square.github.io/okhttp/) HTTP client and the OkHttp [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html) API. | [![pub package](https://img.shields.io/pub/v/ok_http.svg)](https://pub.dev/packages/ok_http) | | [http_profile](pkgs/http_profile/) | A library used by HTTP client authors to integrate with the DevTools Network View. | [![pub package](https://img.shields.io/pub/v/http_profile.svg)](https://pub.dev/packages/http_profile) | | [web_socket_conformance_tests](pkgs/web_socket_conformance_tests/) | A library that tests whether implementations of `package:web_socket`'s `WebSocket` class behave as expected. | | | [web_socket](pkgs/web_socket/) | Any easy-to-use library for communicating with WebSockets that has multiple implementations. | [![pub package](https://img.shields.io/pub/v/web_socket.svg)](https://pub.dev/packages/web_socket) | From b9ccf8156e331f7c381b81b39cf9435485d90300 Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Thu, 8 Aug 2024 00:09:24 +0530 Subject: [PATCH 415/448] [docs] sort pkg list in ascending order (#1287) --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d85e08c40e..14e6a7d6b0 100644 --- a/README.md +++ b/README.md @@ -10,15 +10,15 @@ and the browser. | Package | Description | Version | |---|---|---| -| [http](pkgs/http/) | A composable, multi-platform, Future-based API for HTTP requests. | [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) | -| [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | A library that tests whether implementations of package:http's `Client` class behave as expected. | | | [cronet_http](pkgs/cronet_http/) | An Android Flutter plugin that provides access to the [Cronet](https://developer.android.com/guide/topics/connectivity/cronet/reference/org/chromium/net/package-summary) HTTP client. | [![pub package](https://img.shields.io/pub/v/cronet_http.svg)](https://pub.dev/packages/cronet_http) | | [cupertino_http](pkgs/cupertino_http/) | A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). | [![pub package](https://img.shields.io/pub/v/cupertino_http.svg)](https://pub.dev/packages/cupertino_http) | -| [ok_http](pkgs/ok_http/) | An Android Flutter plugin that provides access to the [OkHttp](https://square.github.io/okhttp/) HTTP client and the OkHttp [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html) API. | [![pub package](https://img.shields.io/pub/v/ok_http.svg)](https://pub.dev/packages/ok_http) | +| [flutter_http_example](pkgs/flutter_http_example/) | An Flutter app that demonstrates how to configure and use `package:http`. | — | +| [http](pkgs/http/) | A composable, multi-platform, Future-based API for HTTP requests. | [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) | +| [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | A library that tests whether implementations of package:http's `Client` class behave as expected. | | | [http_profile](pkgs/http_profile/) | A library used by HTTP client authors to integrate with the DevTools Network View. | [![pub package](https://img.shields.io/pub/v/http_profile.svg)](https://pub.dev/packages/http_profile) | -| [web_socket_conformance_tests](pkgs/web_socket_conformance_tests/) | A library that tests whether implementations of `package:web_socket`'s `WebSocket` class behave as expected. | | +| [ok_http](pkgs/ok_http/) | An Android Flutter plugin that provides access to the [OkHttp](https://square.github.io/okhttp/) HTTP client and the OkHttp [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html) API. | [![pub package](https://img.shields.io/pub/v/ok_http.svg)](https://pub.dev/packages/ok_http) | | [web_socket](pkgs/web_socket/) | Any easy-to-use library for communicating with WebSockets that has multiple implementations. | [![pub package](https://img.shields.io/pub/v/web_socket.svg)](https://pub.dev/packages/web_socket) | -| [flutter_http_example](pkgs/flutter_http_example/) | An Flutter app that demonstrates how to configure and use `package:http`. | — | +| [web_socket_conformance_tests](pkgs/web_socket_conformance_tests/) | A library that tests whether implementations of `package:web_socket`'s `WebSocket` class behave as expected. | | ## Contributing From 354c527b184d562e79d2eb0a58e473ca19a4b743 Mon Sep 17 00:00:00 2001 From: Kate <26026535+provokateurin@users.noreply.github.com> Date: Wed, 7 Aug 2024 22:03:53 +0200 Subject: [PATCH 416/448] test(http_client_conformance_tests): Remove old skips (#1284) --- .../lib/src/response_headers_tests.dart | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart index b0295fb6f7..4ecb1444b4 100644 --- a/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/response_headers_tests.dart @@ -132,9 +132,7 @@ void testResponseHeaders(Client client, httpServerChannel.sink.add('content-length: \t 0 \t \r\n'); final response = await client.get(Uri.http(host, '')); expect(response.contentLength, 0); - }, - skip: 'Enable after https://github.com/dart-lang/sdk/issues/51532 ' - 'is fixed'); + }); test('non-integer', () async { httpServerChannel.sink.add('content-length: cat\r\n'); @@ -163,9 +161,7 @@ void testResponseHeaders(Client client, final response = await client.get(Uri.http(host, '')); expect(response.headers['foo'], 'BAR BAZ'); - }, - skip: 'Enable after https://github.com/dart-lang/sdk/issues/53185 ' - 'is fixed'); + }); test('extra whitespace', () async { httpServerChannel.sink.add('foo: BAR \t \r\n \t BAZ \t \r\n'); From 7d346e3a35c4fdbcc825a0f5e527c476e15b618d Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 13 Aug 2024 15:14:12 -0700 Subject: [PATCH 417/448] Fix "unintended_html_in_doc_comment" analysis errors (#1291) --- pkgs/http/CHANGELOG.md | 4 +++ pkgs/http/lib/http.dart | 30 +++++++++---------- pkgs/http/lib/src/base_response.dart | 11 +++---- pkgs/http/lib/src/client.dart | 28 ++++++++--------- pkgs/http/pubspec.yaml | 2 +- .../src/compressed_response_body_server.dart | 2 +- .../lib/src/redirect_server.dart | 2 +- .../lib/src/request_headers_server.dart | 2 +- pkgs/http_profile/CHANGELOG.md | 4 +++ pkgs/http_profile/lib/src/utils.dart | 11 +++---- pkgs/http_profile/pubspec.yaml | 2 +- 11 files changed, 54 insertions(+), 44 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 85dccd7313..18e71333b7 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.2.3-wip + +* Fixed unintended HTML tags in doc comments. + ## 1.2.2 * Require package `web: '>=0.5.0 <2.0.0'`. diff --git a/pkgs/http/lib/http.dart b/pkgs/http/lib/http.dart index da35b23a87..317a2c17f3 100644 --- a/pkgs/http/lib/http.dart +++ b/pkgs/http/lib/http.dart @@ -50,15 +50,15 @@ Future get(Uri url, {Map? headers}) => /// Sends an HTTP POST request with the given headers and body to the given URL. /// -/// [body] sets the body of the request. It can be a [String], a [List] or -/// a [Map]. If it's a String, it's encoded using [encoding] and -/// used as the body of the request. The content-type of the request will +/// [body] sets the body of the request. It can be a `String`, a `List` or +/// a `Map`. If it's a `String`, it's encoded using [encoding] +/// and used as the body of the request. The content-type of the request will /// default to "text/plain". /// -/// If [body] is a List, it's used as a list of bytes for the body of the +/// If [body] is a `List`, it's used as a list of bytes for the body of the /// request. /// -/// If [body] is a Map, it's encoded as form fields using [encoding]. The +/// If [body] is a `Map`, it's encoded as form fields using [encoding]. The /// content-type of the request will be set to /// `"application/x-www-form-urlencoded"`; this cannot be overridden. /// @@ -73,15 +73,15 @@ Future post(Uri url, /// Sends an HTTP PUT request with the given headers and body to the given URL. /// -/// [body] sets the body of the request. It can be a [String], a [List] or -/// a [Map]. If it's a String, it's encoded using [encoding] and -/// used as the body of the request. The content-type of the request will +/// [body] sets the body of the request. It can be a `String`, a `List` or +/// a `Map`. If it's a `String`, it's encoded using [encoding] +/// and used as the body of the request. The content-type of the request will /// default to "text/plain". /// -/// If [body] is a List, it's used as a list of bytes for the body of the +/// If [body] is a `List`, it's used as a list of bytes for the body of the /// request. /// -/// If [body] is a Map, it's encoded as form fields using [encoding]. The +/// If [body] is a `Map`, it's encoded as form fields using [encoding]. The /// content-type of the request will be set to /// `"application/x-www-form-urlencoded"`; this cannot be overridden. /// @@ -97,15 +97,15 @@ Future put(Uri url, /// Sends an HTTP PATCH request with the given headers and body to the given /// URL. /// -/// [body] sets the body of the request. It can be a [String], a [List] or -/// a [Map]. If it's a String, it's encoded using [encoding] and -/// used as the body of the request. The content-type of the request will +/// [body] sets the body of the request. It can be a `String`, a `List` or +/// a `Map`. If it's a `String`, it's encoded using [encoding] +/// and used as the body of the request. The content-type of the request will /// default to "text/plain". /// -/// If [body] is a List, it's used as a list of bytes for the body of the +/// If [body] is a `List`, it's used as a list of bytes for the body of the /// request. /// -/// If [body] is a Map, it's encoded as form fields using [encoding]. The +/// If [body] is a `Map`, it's encoded as form fields using [encoding]. The /// content-type of the request will be set to /// `"application/x-www-form-urlencoded"`; this cannot be overridden. /// diff --git a/pkgs/http/lib/src/base_response.dart b/pkgs/http/lib/src/base_response.dart index 0527461dbb..39934ceea9 100644 --- a/pkgs/http/lib/src/base_response.dart +++ b/pkgs/http/lib/src/base_response.dart @@ -117,9 +117,9 @@ var _headerSplitter = RegExp(r'[ \t]*,[ \t]*'); /// /// Set-Cookie strings can contain commas. In particular, the following /// productions defined in RFC-6265, section 4.1.1: -/// - e.g. "Expires=Sun, 06 Nov 1994 08:49:37 GMT" -/// - e.g. "Path=somepath," -/// - e.g. "AnyString,Really," +/// - `` e.g. "Expires=Sun, 06 Nov 1994 08:49:37 GMT" +/// - `` e.g. "Path=somepath," +/// - `` e.g. "AnyString,Really," /// /// Some values are ambiguous e.g. /// "Set-Cookie: lang=en; Path=/foo/" @@ -128,8 +128,9 @@ var _headerSplitter = RegExp(r'[ \t]*,[ \t]*'); /// "Set-Cookie: lang=en; Path=/foo/,SID=x23" /// would both be result in `response.headers` => "lang=en; Path=/foo/,SID=x23" /// -/// The idea behind this regex is that ",=" is more likely to -/// start a new then be part of or . +/// The idea behind this regex is that `,=` is more likely to +/// start a new `` than be part of `` or +/// ``. /// /// See https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1 var _setCookieSplitter = RegExp(r'[ \t]*,[ \t]*(?=[' + _tokenChars + r']+=)'); diff --git a/pkgs/http/lib/src/client.dart b/pkgs/http/lib/src/client.dart index 6de5698104..8ee554a241 100644 --- a/pkgs/http/lib/src/client.dart +++ b/pkgs/http/lib/src/client.dart @@ -54,17 +54,17 @@ abstract interface class Client { /// Sends an HTTP POST request with the given headers and body to the given /// URL. /// - /// [body] sets the body of the request. It can be a [String], a [List] - /// or a [Map]. + /// [body] sets the body of the request. It can be a `String`, a `List` + /// or a `Map`. /// - /// If [body] is a String, it's encoded using [encoding] and used as the body - /// of the request. The content-type of the request will default to + /// If [body] is a `String`, it's encoded using [encoding] and used as the + /// body of the request. The content-type of the request will default to /// "text/plain". /// - /// If [body] is a List, it's used as a list of bytes for the body of the + /// If [body] is a `List`, it's used as a list of bytes for the body of the /// request. /// - /// If [body] is a Map, it's encoded as form fields using [encoding]. The + /// If [body] is a `Map`, it's encoded as form fields using [encoding]. The /// content-type of the request will be set to /// `"application/x-www-form-urlencoded"`; this cannot be overridden. /// @@ -77,15 +77,15 @@ abstract interface class Client { /// Sends an HTTP PUT request with the given headers and body to the given /// URL. /// - /// [body] sets the body of the request. It can be a [String], a [List] - /// or a [Map]. If it's a String, it's encoded using + /// [body] sets the body of the request. It can be a `String`, a `List` + /// or a `Map`. If it's a `String`, it's encoded using /// [encoding] and used as the body of the request. The content-type of the /// request will default to "text/plain". /// - /// If [body] is a List, it's used as a list of bytes for the body of the + /// If [body] is a `List`, it's used as a list of bytes for the body of the /// request. /// - /// If [body] is a Map, it's encoded as form fields using [encoding]. The + /// If [body] is a `Map`, it's encoded as form fields using [encoding]. The /// content-type of the request will be set to /// `"application/x-www-form-urlencoded"`; this cannot be overridden. /// @@ -98,15 +98,15 @@ abstract interface class Client { /// Sends an HTTP PATCH request with the given headers and body to the given /// URL. /// - /// [body] sets the body of the request. It can be a [String], a [List] - /// or a [Map]. If it's a String, it's encoded using + /// [body] sets the body of the request. It can be a `String`, a `List` + /// or a `Map`. If it's a `String`, it's encoded using /// [encoding] and used as the body of the request. The content-type of the /// request will default to "text/plain". /// - /// If [body] is a List, it's used as a list of bytes for the body of the + /// If [body] is a `List`, it's used as a list of bytes for the body of the /// request. /// - /// If [body] is a Map, it's encoded as form fields using [encoding]. The + /// If [body] is a `Map`, it's encoded as form fields using [encoding]. The /// content-type of the request will be set to /// `"application/x-www-form-urlencoded"`; this cannot be overridden. /// diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 7039e30838..8c37cff9b1 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.2.2 +version: 1.2.3-wip description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http diff --git a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server.dart b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server.dart index 17f8897cc8..bb4b95d1e8 100644 --- a/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server.dart +++ b/pkgs/http_client_conformance_tests/lib/src/compressed_response_body_server.dart @@ -13,7 +13,7 @@ import 'package:stream_channel/stream_channel.dart'; /// On Startup: /// - send port /// On Request Received: -/// - send headers as Map> +/// - send headers as `Map>` /// When Receive Anything: /// - exit void hybridMain(StreamChannel channel) async { diff --git a/pkgs/http_client_conformance_tests/lib/src/redirect_server.dart b/pkgs/http_client_conformance_tests/lib/src/redirect_server.dart index cf1fafddb8..2813e32239 100644 --- a/pkgs/http_client_conformance_tests/lib/src/redirect_server.dart +++ b/pkgs/http_client_conformance_tests/lib/src/redirect_server.dart @@ -18,7 +18,7 @@ import 'package:stream_channel/stream_channel.dart'; /// ".../9" | ".../8" /// ... | ... /// ".../1" | "/" -/// "/" | <200 return> +/// "/" | <200 return> void hybridMain(StreamChannel channel) async { late HttpServer server; diff --git a/pkgs/http_client_conformance_tests/lib/src/request_headers_server.dart b/pkgs/http_client_conformance_tests/lib/src/request_headers_server.dart index c443ad0034..ad3fdfe0cc 100644 --- a/pkgs/http_client_conformance_tests/lib/src/request_headers_server.dart +++ b/pkgs/http_client_conformance_tests/lib/src/request_headers_server.dart @@ -13,7 +13,7 @@ import 'package:stream_channel/stream_channel.dart'; /// On Startup: /// - send port /// On Request Received: -/// - send headers as Map> +/// - send headers as `Map>` /// When Receive Anything: /// - exit void hybridMain(StreamChannel channel) async { diff --git a/pkgs/http_profile/CHANGELOG.md b/pkgs/http_profile/CHANGELOG.md index b9455a4ed6..fdcad42253 100644 --- a/pkgs/http_profile/CHANGELOG.md +++ b/pkgs/http_profile/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.1.1-wip + +* Fixed unintended HTML tags in doc comments. + ## 0.1.0 * Initial **experimental** release. diff --git a/pkgs/http_profile/lib/src/utils.dart b/pkgs/http_profile/lib/src/utils.dart index 0225f87f39..780bb446b8 100644 --- a/pkgs/http_profile/lib/src/utils.dart +++ b/pkgs/http_profile/lib/src/utils.dart @@ -14,9 +14,9 @@ var _headerSplitter = RegExp(r'[ \t]*,[ \t]*'); /// /// Set-Cookie strings can contain commas. In particular, the following /// productions defined in RFC-6265, section 4.1.1: -/// - e.g. "Expires=Sun, 06 Nov 1994 08:49:37 GMT" -/// - e.g. "Path=somepath," -/// - e.g. "AnyString,Really," +/// - `` e.g. "Expires=Sun, 06 Nov 1994 08:49:37 GMT" +/// - `` e.g. "Path=somepath," +/// - `` e.g. "AnyString,Really," /// /// Some values are ambiguous e.g. /// "Set-Cookie: lang=en; Path=/foo/" @@ -25,8 +25,9 @@ var _headerSplitter = RegExp(r'[ \t]*,[ \t]*'); /// "Set-Cookie: lang=en; Path=/foo/,SID=x23" /// would both be result in `response.headers` => "lang=en; Path=/foo/,SID=x23" /// -/// The idea behind this regex is that ",=" is more likely to -/// start a new then be part of or . +/// The idea behind this regex is that `,=` is more likely to +/// start a new `` than be part of `` or +/// ``. /// /// See https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1 var _setCookieSplitter = RegExp(r'[ \t]*,[ \t]*(?=[' + _tokenChars + r']+=)'); diff --git a/pkgs/http_profile/pubspec.yaml b/pkgs/http_profile/pubspec.yaml index d55dc32260..1184789c8a 100644 --- a/pkgs/http_profile/pubspec.yaml +++ b/pkgs/http_profile/pubspec.yaml @@ -3,7 +3,7 @@ description: >- A library used by HTTP client authors to integrate with the DevTools Network View. repository: https://github.com/dart-lang/http/tree/master/pkgs/http_profile -version: 0.1.0 +version: 0.1.1-wip environment: sdk: ^3.4.0 From da902636fc01604f534cd85b15612f0ff6e1ad19 Mon Sep 17 00:00:00 2001 From: Anikate De <40452578+Anikate-De@users.noreply.github.com> Date: Fri, 16 Aug 2024 05:45:00 +0530 Subject: [PATCH 418/448] pkgs/ok_http: OkHttpClientConfiguration and configurable timeouts. (#1289) --- pkgs/ok_http/CHANGELOG.md | 5 + .../client_configuration_test.dart | 98 ++++ pkgs/ok_http/jnigen.yaml | 1 + pkgs/ok_http/lib/src/jni/bindings.dart | 501 +++++++++++++++++- pkgs/ok_http/lib/src/ok_http_client.dart | 75 ++- pkgs/ok_http/pubspec.yaml | 2 +- 6 files changed, 658 insertions(+), 24 deletions(-) create mode 100644 pkgs/ok_http/example/integration_test/client_configuration_test.dart diff --git a/pkgs/ok_http/CHANGELOG.md b/pkgs/ok_http/CHANGELOG.md index 557f19db20..a6a2fd3f4e 100644 --- a/pkgs/ok_http/CHANGELOG.md +++ b/pkgs/ok_http/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.1.1-wip + +- `OkHttpClient` now receives an `OkHttpClientConfiguration` to configure the client on a per-call basis. +- `OkHttpClient` supports setting four types of timeouts: [`connectTimeout`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/-builder/connect-timeout.html), [`readTimeout`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/-builder/read-timeout.html), [`writeTimeout`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/-builder/write-timeout.html), and [`callTimeout`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/-builder/call-timeout.html), using the `OkHttpClientConfiguration`. + ## 0.1.0 - Implementation of [`BaseClient`](https://pub.dev/documentation/http/latest/http/BaseClient-class.html) and `send()` method using [`enqueue()` API](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-call/enqueue.html) diff --git a/pkgs/ok_http/example/integration_test/client_configuration_test.dart b/pkgs/ok_http/example/integration_test/client_configuration_test.dart new file mode 100644 index 0000000000..2cee14afb6 --- /dev/null +++ b/pkgs/ok_http/example/integration_test/client_configuration_test.dart @@ -0,0 +1,98 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. 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:http/http.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:ok_http/ok_http.dart'; +import 'package:test/test.dart'; + +void testTimeouts() { + group('timeouts', () { + group('call timeout', () { + late HttpServer server; + + setUp(() async { + server = (await HttpServer.bind('localhost', 0)) + ..listen((request) async { + // Add a delay of `n` seconds for URI `http://localhost:port/n` + final delay = int.parse(request.requestedUri.pathSegments.last); + await Future.delayed(Duration(seconds: delay)); + + await request.drain(); + await request.response.close(); + }); + }); + tearDown(() { + server.close(); + }); + + test('exceeded', () { + final client = OkHttpClient( + configuration: const OkHttpClientConfiguration( + callTimeout: Duration(milliseconds: 500), + ), + ); + expect( + () async { + await client.get(Uri.parse('http://localhost:${server.port}/1')); + }, + throwsA( + isA().having( + (exception) => exception.message, + 'message', + startsWith('java.io.InterruptedIOException'), + ), + ), + ); + }); + + test('not exceeded', () async { + final client = OkHttpClient( + configuration: const OkHttpClientConfiguration( + callTimeout: Duration(milliseconds: 1500), + ), + ); + final response = await client.send( + Request( + 'GET', + Uri.http('localhost:${server.port}', '1'), + ), + ); + + expect(response.statusCode, 200); + expect(response.contentLength, 0); + }); + + test('not set', () async { + final client = OkHttpClient(); + + expect( + () async { + await client.send( + Request( + 'GET', + Uri.http('localhost:${server.port}', '11'), + ), + ); + }, + throwsA( + isA().having( + (exception) => exception.message, + 'message', + startsWith('java.net.SocketTimeoutException'), + ), + ), + ); + }); + }); + }); +} + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + testTimeouts(); +} diff --git a/pkgs/ok_http/jnigen.yaml b/pkgs/ok_http/jnigen.yaml index 7f63d6c2d9..2e7f87a45a 100644 --- a/pkgs/ok_http/jnigen.yaml +++ b/pkgs/ok_http/jnigen.yaml @@ -36,6 +36,7 @@ classes: - "com.example.ok_http.WebSocketListenerProxy" - "okio.ByteString" - "com.example.ok_http.WebSocketInterceptor" + - "java.util.concurrent.TimeUnit" # Exclude the deprecated methods listed below # They cause syntax errors during the `dart format` step of JNIGen. diff --git a/pkgs/ok_http/lib/src/jni/bindings.dart b/pkgs/ok_http/lib/src/jni/bindings.dart index 66f0078d9a..608384389a 100644 --- a/pkgs/ok_http/lib/src/jni/bindings.dart +++ b/pkgs/ok_http/lib/src/jni/bindings.dart @@ -5008,7 +5008,7 @@ class OkHttpClient_Builder extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder callTimeout( int j, - jni.JObject timeUnit, + TimeUnit timeUnit, ) { return _callTimeout(reference.pointer, _id_callTimeout as jni.JMethodIDPtr, j, timeUnit.reference.pointer) @@ -5061,7 +5061,7 @@ class OkHttpClient_Builder extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder connectTimeout( int j, - jni.JObject timeUnit, + TimeUnit timeUnit, ) { return _connectTimeout( reference.pointer, @@ -5117,7 +5117,7 @@ class OkHttpClient_Builder extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder readTimeout( int j, - jni.JObject timeUnit, + TimeUnit timeUnit, ) { return _readTimeout(reference.pointer, _id_readTimeout as jni.JMethodIDPtr, j, timeUnit.reference.pointer) @@ -5170,7 +5170,7 @@ class OkHttpClient_Builder extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder writeTimeout( int j, - jni.JObject timeUnit, + TimeUnit timeUnit, ) { return _writeTimeout(reference.pointer, _id_writeTimeout as jni.JMethodIDPtr, j, timeUnit.reference.pointer) @@ -5223,7 +5223,7 @@ class OkHttpClient_Builder extends jni.JObject { /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder pingInterval( int j, - jni.JObject timeUnit, + TimeUnit timeUnit, ) { return _pingInterval(reference.pointer, _id_pingInterval as jni.JMethodIDPtr, j, timeUnit.reference.pointer) @@ -8204,7 +8204,7 @@ class ConnectionPool extends jni.JObject { factory ConnectionPool.new1( int i, int j, - jni.JObject timeUnit, + TimeUnit timeUnit, ) { return ConnectionPool.fromReference(_new1(_class.reference.pointer, _id_new1 as jni.JMethodIDPtr, i, j, timeUnit.reference.pointer) @@ -8836,7 +8836,7 @@ class ExecutorService extends jni.JObject { /// from: public abstract boolean awaitTermination(long j, java.util.concurrent.TimeUnit timeUnit) bool awaitTermination( int j, - jni.JObject timeUnit, + TimeUnit timeUnit, ) { return _awaitTermination( reference.pointer, @@ -8902,7 +8902,7 @@ class ExecutorService extends jni.JObject { $a[0] .castTo(const jni.JLongType(), releaseOriginal: true) .longValue(releaseOriginal: true), - $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), + $a[1].castTo(const $TimeUnitType(), releaseOriginal: true), ); return jni.JBoolean($r).reference.toPointer(); } @@ -8945,14 +8945,14 @@ abstract interface class $ExecutorServiceImpl { required jni.JList Function() shutdownNow, required bool Function() isShutdown, required bool Function() isTerminated, - required bool Function(int j, jni.JObject timeUnit) awaitTermination, + required bool Function(int j, TimeUnit timeUnit) awaitTermination, }) = _$ExecutorServiceImpl; void shutdown(); jni.JList shutdownNow(); bool isShutdown(); bool isTerminated(); - bool awaitTermination(int j, jni.JObject timeUnit); + bool awaitTermination(int j, TimeUnit timeUnit); } class _$ExecutorServiceImpl implements $ExecutorServiceImpl { @@ -8961,7 +8961,7 @@ class _$ExecutorServiceImpl implements $ExecutorServiceImpl { required jni.JList Function() shutdownNow, required bool Function() isShutdown, required bool Function() isTerminated, - required bool Function(int j, jni.JObject timeUnit) awaitTermination, + required bool Function(int j, TimeUnit timeUnit) awaitTermination, }) : _shutdown = shutdown, _shutdownNow = shutdownNow, _isShutdown = isShutdown, @@ -8972,7 +8972,7 @@ class _$ExecutorServiceImpl implements $ExecutorServiceImpl { final jni.JList Function() _shutdownNow; final bool Function() _isShutdown; final bool Function() _isTerminated; - final bool Function(int j, jni.JObject timeUnit) _awaitTermination; + final bool Function(int j, TimeUnit timeUnit) _awaitTermination; void shutdown() { return _shutdown(); @@ -8990,7 +8990,7 @@ class _$ExecutorServiceImpl implements $ExecutorServiceImpl { return _isTerminated(); } - bool awaitTermination(int j, jni.JObject timeUnit) { + bool awaitTermination(int j, TimeUnit timeUnit) { return _awaitTermination(j, timeUnit); } } @@ -13393,3 +13393,478 @@ final class $WebSocketInterceptorType other is $WebSocketInterceptorType; } } + +/// from: java.util.concurrent.TimeUnit +class TimeUnit extends jni.JObject { + @override + late final jni.JObjType $type = type; + + TimeUnit.fromReference( + jni.JReference reference, + ) : super.fromReference(reference); + + static final _class = jni.JClass.forName(r'java/util/concurrent/TimeUnit'); + + /// The type which includes information such as the signature of this class. + static const type = $TimeUnitType(); + static final _id_NANOSECONDS = _class.staticFieldId( + r'NANOSECONDS', + r'Ljava/util/concurrent/TimeUnit;', + ); + + /// from: static public final java.util.concurrent.TimeUnit NANOSECONDS + /// The returned object must be released after use, by calling the [release] method. + static TimeUnit get NANOSECONDS => + _id_NANOSECONDS.get(_class, const $TimeUnitType()); + + static final _id_MICROSECONDS = _class.staticFieldId( + r'MICROSECONDS', + r'Ljava/util/concurrent/TimeUnit;', + ); + + /// from: static public final java.util.concurrent.TimeUnit MICROSECONDS + /// The returned object must be released after use, by calling the [release] method. + static TimeUnit get MICROSECONDS => + _id_MICROSECONDS.get(_class, const $TimeUnitType()); + + static final _id_MILLISECONDS = _class.staticFieldId( + r'MILLISECONDS', + r'Ljava/util/concurrent/TimeUnit;', + ); + + /// from: static public final java.util.concurrent.TimeUnit MILLISECONDS + /// The returned object must be released after use, by calling the [release] method. + static TimeUnit get MILLISECONDS => + _id_MILLISECONDS.get(_class, const $TimeUnitType()); + + static final _id_SECONDS = _class.staticFieldId( + r'SECONDS', + r'Ljava/util/concurrent/TimeUnit;', + ); + + /// from: static public final java.util.concurrent.TimeUnit SECONDS + /// The returned object must be released after use, by calling the [release] method. + static TimeUnit get SECONDS => _id_SECONDS.get(_class, const $TimeUnitType()); + + static final _id_MINUTES = _class.staticFieldId( + r'MINUTES', + r'Ljava/util/concurrent/TimeUnit;', + ); + + /// from: static public final java.util.concurrent.TimeUnit MINUTES + /// The returned object must be released after use, by calling the [release] method. + static TimeUnit get MINUTES => _id_MINUTES.get(_class, const $TimeUnitType()); + + static final _id_HOURS = _class.staticFieldId( + r'HOURS', + r'Ljava/util/concurrent/TimeUnit;', + ); + + /// from: static public final java.util.concurrent.TimeUnit HOURS + /// The returned object must be released after use, by calling the [release] method. + static TimeUnit get HOURS => _id_HOURS.get(_class, const $TimeUnitType()); + + static final _id_DAYS = _class.staticFieldId( + r'DAYS', + r'Ljava/util/concurrent/TimeUnit;', + ); + + /// from: static public final java.util.concurrent.TimeUnit DAYS + /// The returned object must be released after use, by calling the [release] method. + static TimeUnit get DAYS => _id_DAYS.get(_class, const $TimeUnitType()); + + static final _id_values = _class.staticMethodId( + r'values', + r'()[Ljava/util/concurrent/TimeUnit;', + ); + + static final _values = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: static public java.util.concurrent.TimeUnit[] values() + /// The returned object must be released after use, by calling the [release] method. + static jni.JArray values() { + return _values(_class.reference.pointer, _id_values as jni.JMethodIDPtr) + .object(const jni.JArrayType($TimeUnitType())); + } + + static final _id_valueOf = _class.staticMethodId( + r'valueOf', + r'(Ljava/lang/String;)Ljava/util/concurrent/TimeUnit;', + ); + + static final _valueOf = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public java.util.concurrent.TimeUnit valueOf(java.lang.String string) + /// The returned object must be released after use, by calling the [release] method. + static TimeUnit valueOf( + jni.JString string, + ) { + return _valueOf(_class.reference.pointer, _id_valueOf as jni.JMethodIDPtr, + string.reference.pointer) + .object(const $TimeUnitType()); + } + + static final _id_convert = _class.instanceMethodId( + r'convert', + r'(JLjava/util/concurrent/TimeUnit;)J', + ); + + static final _convert = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + 'globalEnv_CallLongMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, + ffi.Pointer)>(); + + /// from: public long convert(long j, java.util.concurrent.TimeUnit timeUnit) + int convert( + int j, + TimeUnit timeUnit, + ) { + return _convert(reference.pointer, _id_convert as jni.JMethodIDPtr, j, + timeUnit.reference.pointer) + .long; + } + + static final _id_convert1 = _class.instanceMethodId( + r'convert', + r'(Ljava/time/Duration;)J', + ); + + static final _convert1 = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallLongMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: public long convert(java.time.Duration duration) + int convert1( + jni.JObject duration, + ) { + return _convert1(reference.pointer, _id_convert1 as jni.JMethodIDPtr, + duration.reference.pointer) + .long; + } + + static final _id_toNanos = _class.instanceMethodId( + r'toNanos', + r'(J)J', + ); + + static final _toNanos = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public long toNanos(long j) + int toNanos( + int j, + ) { + return _toNanos(reference.pointer, _id_toNanos as jni.JMethodIDPtr, j).long; + } + + static final _id_toMicros = _class.instanceMethodId( + r'toMicros', + r'(J)J', + ); + + static final _toMicros = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public long toMicros(long j) + int toMicros( + int j, + ) { + return _toMicros(reference.pointer, _id_toMicros as jni.JMethodIDPtr, j) + .long; + } + + static final _id_toMillis = _class.instanceMethodId( + r'toMillis', + r'(J)J', + ); + + static final _toMillis = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public long toMillis(long j) + int toMillis( + int j, + ) { + return _toMillis(reference.pointer, _id_toMillis as jni.JMethodIDPtr, j) + .long; + } + + static final _id_toSeconds = _class.instanceMethodId( + r'toSeconds', + r'(J)J', + ); + + static final _toSeconds = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public long toSeconds(long j) + int toSeconds( + int j, + ) { + return _toSeconds(reference.pointer, _id_toSeconds as jni.JMethodIDPtr, j) + .long; + } + + static final _id_toMinutes = _class.instanceMethodId( + r'toMinutes', + r'(J)J', + ); + + static final _toMinutes = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public long toMinutes(long j) + int toMinutes( + int j, + ) { + return _toMinutes(reference.pointer, _id_toMinutes as jni.JMethodIDPtr, j) + .long; + } + + static final _id_toHours = _class.instanceMethodId( + r'toHours', + r'(J)J', + ); + + static final _toHours = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public long toHours(long j) + int toHours( + int j, + ) { + return _toHours(reference.pointer, _id_toHours as jni.JMethodIDPtr, j).long; + } + + static final _id_toDays = _class.instanceMethodId( + r'toDays', + r'(J)J', + ); + + static final _toDays = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public long toDays(long j) + int toDays( + int j, + ) { + return _toDays(reference.pointer, _id_toDays as jni.JMethodIDPtr, j).long; + } + + static final _id_timedWait = _class.instanceMethodId( + r'timedWait', + r'(Ljava/lang/Object;J)V', + ); + + static final _timedWait = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public void timedWait(java.lang.Object object, long j) + void timedWait( + jni.JObject object, + int j, + ) { + _timedWait(reference.pointer, _id_timedWait as jni.JMethodIDPtr, + object.reference.pointer, j) + .check(); + } + + static final _id_timedJoin = _class.instanceMethodId( + r'timedJoin', + r'(Ljava/lang/Thread;J)V', + ); + + static final _timedJoin = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + 'globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer, int)>(); + + /// from: public void timedJoin(java.lang.Thread thread, long j) + void timedJoin( + jni.JObject thread, + int j, + ) { + _timedJoin(reference.pointer, _id_timedJoin as jni.JMethodIDPtr, + thread.reference.pointer, j) + .check(); + } + + static final _id_sleep = _class.instanceMethodId( + r'sleep', + r'(J)V', + ); + + static final _sleep = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JThrowablePtr Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallVoidMethod') + .asFunction< + jni.JThrowablePtr Function( + ffi.Pointer, jni.JMethodIDPtr, int)>(); + + /// from: public void sleep(long j) + void sleep( + int j, + ) { + _sleep(reference.pointer, _id_sleep as jni.JMethodIDPtr, j).check(); + } + + static final _id_toChronoUnit = _class.instanceMethodId( + r'toChronoUnit', + r'()Ljava/time/temporal/ChronoUnit;', + ); + + static final _toChronoUnit = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + )>(); + + /// from: public java.time.temporal.ChronoUnit toChronoUnit() + /// The returned object must be released after use, by calling the [release] method. + jni.JObject toChronoUnit() { + return _toChronoUnit( + reference.pointer, _id_toChronoUnit as jni.JMethodIDPtr) + .object(const jni.JObjectType()); + } + + static final _id_of = _class.staticMethodId( + r'of', + r'(Ljava/time/temporal/ChronoUnit;)Ljava/util/concurrent/TimeUnit;', + ); + + static final _of = ProtectedJniExtensions.lookup< + ffi.NativeFunction< + jni.JniResult Function( + ffi.Pointer, + jni.JMethodIDPtr, + ffi.VarArgs<(ffi.Pointer,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, + ffi.Pointer)>(); + + /// from: static public java.util.concurrent.TimeUnit of(java.time.temporal.ChronoUnit chronoUnit) + /// The returned object must be released after use, by calling the [release] method. + static TimeUnit of( + jni.JObject chronoUnit, + ) { + return _of(_class.reference.pointer, _id_of as jni.JMethodIDPtr, + chronoUnit.reference.pointer) + .object(const $TimeUnitType()); + } +} + +final class $TimeUnitType extends jni.JObjType { + const $TimeUnitType(); + + @override + String get signature => r'Ljava/util/concurrent/TimeUnit;'; + + @override + TimeUnit fromReference(jni.JReference reference) => + TimeUnit.fromReference(reference); + + @override + jni.JObjType get superType => const jni.JObjectType(); + + @override + final superCount = 1; + + @override + int get hashCode => ($TimeUnitType).hashCode; + + @override + bool operator ==(Object other) { + return other.runtimeType == ($TimeUnitType) && other is $TimeUnitType; + } +} diff --git a/pkgs/ok_http/lib/src/ok_http_client.dart b/pkgs/ok_http/lib/src/ok_http_client.dart index 752dbaa41a..27af5bf3d7 100644 --- a/pkgs/ok_http/lib/src/ok_http_client.dart +++ b/pkgs/ok_http/lib/src/ok_http_client.dart @@ -21,6 +21,43 @@ import 'package:jni/jni.dart'; import 'jni/bindings.dart' as bindings; +/// Configurations for the [OkHttpClient]. +class OkHttpClientConfiguration { + /// The maximum duration to wait for a call to complete. + /// + /// If a call does not finish within the specified time, it will throw a + /// [ClientException] with the message "java.io.InterruptedIOException...". + /// + /// [Duration.zero] indicates no timeout. + /// + /// See [OkHttpClient.Builder.callTimeout](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/-builder/call-timeout.html). + final Duration callTimeout; + + /// The maximum duration to wait while connecting a TCP Socket to the target + /// host. + /// + /// See [OkHttpClient.Builder.connectTimeout](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/-builder/connect-timeout.html). + final Duration connectTimeout; + + /// The maximum duration to wait for a TCP Socket and for individual read + /// IO operations. + /// + /// See [OkHttpClient.Builder.readTimeout](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/-builder/read-timeout.html). + final Duration readTimeout; + + /// The maximum duration to wait for individual write IO operations. + /// + /// See [OkHttpClient.Builder.writeTimeout](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/-builder/write-timeout.html). + final Duration writeTimeout; + + const OkHttpClientConfiguration({ + this.callTimeout = Duration.zero, + this.connectTimeout = const Duration(milliseconds: 10000), + this.readTimeout = const Duration(milliseconds: 10000), + this.writeTimeout = const Duration(milliseconds: 10000), + }); +} + /// An HTTP [Client] utilizing the [OkHttp](https://square.github.io/okhttp/) client. /// /// Example Usage: @@ -47,7 +84,14 @@ class OkHttpClient extends BaseClient { late bindings.OkHttpClient _client; bool _isClosed = false; - OkHttpClient() { + /// The configuration for this client, applied on a per-call basis. + /// It can be updated multiple times during the client's lifecycle. + OkHttpClientConfiguration configuration; + + /// Creates a new instance of [OkHttpClient] with the given [configuration]. + OkHttpClient({ + this.configuration = const OkHttpClientConfiguration(), + }) { _client = bindings.OkHttpClient.new1(); } @@ -160,15 +204,26 @@ class OkHttpClient extends BaseClient { maxRedirects, followRedirects, bindings.RedirectReceivedCallback.implement( bindings.$RedirectReceivedCallbackImpl( - onRedirectReceived: (response, newLocation) { - profile?.responseData.addRedirect(HttpProfileRedirectData( - statusCode: response.code(), - method: - response.request().method().toDartString(releaseOriginal: true), - location: newLocation.toDartString(releaseOriginal: true), - )); - }, - ))).build(); + onRedirectReceived: (response, newLocation) { + profile?.responseData.addRedirect(HttpProfileRedirectData( + statusCode: response.code(), + method: response + .request() + .method() + .toDartString(releaseOriginal: true), + location: newLocation.toDartString(releaseOriginal: true), + )); + }, + ))) + .callTimeout(configuration.callTimeout.inMilliseconds, + bindings.TimeUnit.MILLISECONDS) + .connectTimeout(configuration.connectTimeout.inMilliseconds, + bindings.TimeUnit.MILLISECONDS) + .readTimeout(configuration.readTimeout.inMilliseconds, + bindings.TimeUnit.MILLISECONDS) + .writeTimeout(configuration.writeTimeout.inMilliseconds, + bindings.TimeUnit.MILLISECONDS) + .build(); // `enqueue()` schedules the request to be executed in the future. // https://square.github.io/okhttp/5.x/okhttp/okhttp3/-call/enqueue.html diff --git a/pkgs/ok_http/pubspec.yaml b/pkgs/ok_http/pubspec.yaml index 121c6b314c..93759491e5 100644 --- a/pkgs/ok_http/pubspec.yaml +++ b/pkgs/ok_http/pubspec.yaml @@ -1,5 +1,5 @@ name: ok_http -version: 0.1.0 +version: 0.1.1-wip description: >- An Android Flutter plugin that provides access to the OkHttp HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/ok_http From 2087c9862ae82117548d391717d5fb3c010875f0 Mon Sep 17 00:00:00 2001 From: Moritz Date: Wed, 21 Aug 2024 10:19:32 +0200 Subject: [PATCH 419/448] Add PR Health workflow (#1296) * Add PR Health workflow * Run on master branch --- .github/workflows/health.yaml | 14 ++++++++++++++ .github/workflows/post_summaries.yaml | 17 +++++++++++++++++ .github/workflows/publish.yaml | 2 ++ 3 files changed, 33 insertions(+) create mode 100644 .github/workflows/health.yaml create mode 100644 .github/workflows/post_summaries.yaml diff --git a/.github/workflows/health.yaml b/.github/workflows/health.yaml new file mode 100644 index 0000000000..1c904405a2 --- /dev/null +++ b/.github/workflows/health.yaml @@ -0,0 +1,14 @@ +name: Health +on: + pull_request: + branches: [ master ] + types: [opened, synchronize, reopened, labeled, unlabeled] + +jobs: + health: + uses: dart-lang/ecosystem/.github/workflows/health.yaml@main + with: + ignore_license: "**.g.dart" + sdk: dev + permissions: + pull-requests: write diff --git a/.github/workflows/post_summaries.yaml b/.github/workflows/post_summaries.yaml new file mode 100644 index 0000000000..e082efe95a --- /dev/null +++ b/.github/workflows/post_summaries.yaml @@ -0,0 +1,17 @@ +name: Comment on the pull request + +on: + # Trigger this workflow after the Health workflow completes. This workflow will have permissions to + # do things like create comments on the PR, even if the original workflow couldn't. + workflow_run: + workflows: + - Health + - Publish + types: + - completed + +jobs: + upload: + uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main + permissions: + pull-requests: write diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index f0cc574ccc..151e5e4d16 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -12,6 +12,8 @@ jobs: publish: if: ${{ github.repository_owner == 'dart-lang' }} uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main + with: + write-comments: false permissions: id-token: write # Required for authentication using OIDC pull-requests: write # Required for writing the pull request note From 5c93d16f2d776b016ae57650730d62665652be10 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 28 Aug 2024 10:14:46 -0700 Subject: [PATCH 420/448] Add a reference to AdapterWebSocketChannel for WebSocketChannel users (#1297) --- pkgs/cupertino_http/CHANGELOG.md | 2 ++ pkgs/cupertino_http/lib/src/cupertino_web_socket.dart | 10 ++++++++-- pkgs/cupertino_http/pubspec.yaml | 2 +- pkgs/ok_http/lib/src/ok_http_web_socket.dart | 9 +++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 4cd4a5e8cd..4667f6ab1f 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.5.2-wip + ## 1.5.1 * Allow `1000` as a `code` argument in `CupertinoWebSocket.close`. diff --git a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart index b374dd9907..dc4d748c14 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart @@ -23,8 +23,9 @@ class ConnectionException extends WebSocketException { /// A [WebSocket] implemented using the /// [NSURLSessionWebSocketTask API](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask). /// -/// NOTE: the [WebSocket] interface is currently experimental and may change in -/// the future. +/// > [!NOTE] +/// > The [WebSocket] interface is currently experimental and may change in the +/// > future. /// /// ```dart /// import 'package:cupertino_http/cupertino_http.dart'; @@ -47,6 +48,11 @@ class ConnectionException extends WebSocketException { /// }); /// } /// ``` +/// +/// > [!TIP] +/// > [`AdapterWebSocketChannel`](https://pub.dev/documentation/web_socket_channel/latest/adapter_web_socket_channel/AdapterWebSocketChannel-class.html) +/// > can be used to adapt a [CupertinoWebSocket] into a +/// > [`WebSocketChannel`](https://pub.dev/documentation/web_socket_channel/latest/web_socket_channel/WebSocketChannel-class.html). class CupertinoWebSocket implements WebSocket { /// Create a new WebSocket connection using the /// [NSURLSessionWebSocketTask API](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask). diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 94a9da8d8c..6516790d10 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 1.5.1 +version: 1.5.2-wip description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. diff --git a/pkgs/ok_http/lib/src/ok_http_web_socket.dart b/pkgs/ok_http/lib/src/ok_http_web_socket.dart index 4136a62852..16ed95ed1a 100644 --- a/pkgs/ok_http/lib/src/ok_http_web_socket.dart +++ b/pkgs/ok_http/lib/src/ok_http_web_socket.dart @@ -15,6 +15,10 @@ import 'jni/bindings.dart' as bindings; /// [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html) /// API. /// +/// > [!NOTE] +/// > The [WebSocket] interface is currently experimental and may change in the +/// > future. +/// /// Example usage of [OkHttpWebSocket]: /// ```dart /// import 'package:ok_http/ok_http.dart'; @@ -37,6 +41,11 @@ import 'jni/bindings.dart' as bindings; /// }); /// } /// ``` +/// +/// > [!TIP] +/// > [`AdapterWebSocketChannel`](https://pub.dev/documentation/web_socket_channel/latest/adapter_web_socket_channel/AdapterWebSocketChannel-class.html) +/// > can be used to adapt a [OkHttpWebSocket] into a +/// > [`WebSocketChannel`](https://pub.dev/documentation/web_socket_channel/latest/web_socket_channel/WebSocketChannel-class.html). class OkHttpWebSocket implements WebSocket { late bindings.OkHttpClient _client; late final bindings.WebSocket _webSocket; From 380aead43ec15878dc8e7d77c409ccef31e0f829 Mon Sep 17 00:00:00 2001 From: Yaroslav Vorobev Date: Wed, 28 Aug 2024 20:18:08 +0300 Subject: [PATCH 421/448] fix(http_client_conformance_tests): multipart server (#1292) --- .../lib/src/multipart_server.dart | 9 +++++++-- .../lib/src/multipart_tests.dart | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/http_client_conformance_tests/lib/src/multipart_server.dart b/pkgs/http_client_conformance_tests/lib/src/multipart_server.dart index 90e4d8b1a7..3072090dec 100644 --- a/pkgs/http_client_conformance_tests/lib/src/multipart_server.dart +++ b/pkgs/http_client_conformance_tests/lib/src/multipart_server.dart @@ -23,12 +23,17 @@ void hybridMain(StreamChannel channel) async { server = (await HttpServer.bind('localhost', 0)) ..listen((request) async { request.response.headers.set('Access-Control-Allow-Origin', '*'); + request.response + ..contentLength = 0 + ..statusCode = HttpStatus.ok; + if (request.method == 'OPTIONS') { // Handle a CORS preflight request: // https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#preflighted_requests request.response.headers ..set('Access-Control-Allow-Methods', '*') ..set('Access-Control-Allow-Headers', '*'); + await request.response.close(); } else { final headers = >{}; request.headers.forEach((field, value) { @@ -36,9 +41,9 @@ void hybridMain(StreamChannel channel) async { }); final body = await const Utf8Decoder().bind(request).fold('', (x, y) => '$x$y'); - channel.sink.add((headers, body)); + await request.response.close(); + channel.sink.add([headers, body]); } - unawaited(request.response.close()); }); channel.sink.add(server.port); diff --git a/pkgs/http_client_conformance_tests/lib/src/multipart_tests.dart b/pkgs/http_client_conformance_tests/lib/src/multipart_tests.dart index c9ecd90f82..0277e30935 100644 --- a/pkgs/http_client_conformance_tests/lib/src/multipart_tests.dart +++ b/pkgs/http_client_conformance_tests/lib/src/multipart_tests.dart @@ -34,8 +34,9 @@ void testMultipartRequests(Client client, request.files.add(MultipartFile.fromString('file1', 'Hello World')); await client.send(request); - final (headers, body) = - await httpServerQueue.next as (Map>, String); + final serverRequest = await httpServerQueue.next as List; + final headers = (serverRequest[0] as Map).cast>(); + final body = serverRequest[1] as String; expect(headers['content-length']!.single, '${request.contentLength}'); expect(headers['content-type']!.single, startsWith('multipart/form-data; boundary=')); From fb4f82cecd519e1991431fe282e1bb8a39a0f103 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 28 Aug 2024 10:18:28 -0700 Subject: [PATCH 422/448] cupertino_http: Use `sharedDarwinSource` (#1290) --- .../Classes/CUPHTTPClientDelegate.m | 0 .../Classes/CUPHTTPCompletionHelper.m | 0 .../Classes/CUPHTTPForwardedDelegate.m | 0 .../CUPHTTPStreamToNSInputStreamAdapter.m | 0 .../{ios => darwin}/Classes/dart_api_dl.c | 0 .../{macos => darwin}/cupertino_http.podspec | 8 +++-- .../cupertino_http/ios/cupertino_http.podspec | 29 ------------------- .../macos/Classes/CUPHTTPClientDelegate.m | 1 - .../macos/Classes/CUPHTTPCompletionHelper.m | 1 - .../macos/Classes/CUPHTTPForwardedDelegate.m | 1 - .../CUPHTTPStreamToNSInputStreamAdapter.m | 1 - .../macos/Classes/dart_api_dl.c | 1 - pkgs/cupertino_http/pubspec.yaml | 2 ++ 13 files changed, 7 insertions(+), 37 deletions(-) rename pkgs/cupertino_http/{ios => darwin}/Classes/CUPHTTPClientDelegate.m (100%) rename pkgs/cupertino_http/{ios => darwin}/Classes/CUPHTTPCompletionHelper.m (100%) rename pkgs/cupertino_http/{ios => darwin}/Classes/CUPHTTPForwardedDelegate.m (100%) rename pkgs/cupertino_http/{ios => darwin}/Classes/CUPHTTPStreamToNSInputStreamAdapter.m (100%) rename pkgs/cupertino_http/{ios => darwin}/Classes/dart_api_dl.c (100%) rename pkgs/cupertino_http/{macos => darwin}/cupertino_http.podspec (86%) delete mode 100644 pkgs/cupertino_http/ios/cupertino_http.podspec delete mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPClientDelegate.m delete mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m delete mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPForwardedDelegate.m delete mode 100644 pkgs/cupertino_http/macos/Classes/CUPHTTPStreamToNSInputStreamAdapter.m delete mode 100644 pkgs/cupertino_http/macos/Classes/dart_api_dl.c diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/darwin/Classes/CUPHTTPClientDelegate.m similarity index 100% rename from pkgs/cupertino_http/ios/Classes/CUPHTTPClientDelegate.m rename to pkgs/cupertino_http/darwin/Classes/CUPHTTPClientDelegate.m diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/darwin/Classes/CUPHTTPCompletionHelper.m similarity index 100% rename from pkgs/cupertino_http/ios/Classes/CUPHTTPCompletionHelper.m rename to pkgs/cupertino_http/darwin/Classes/CUPHTTPCompletionHelper.m diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPForwardedDelegate.m b/pkgs/cupertino_http/darwin/Classes/CUPHTTPForwardedDelegate.m similarity index 100% rename from pkgs/cupertino_http/ios/Classes/CUPHTTPForwardedDelegate.m rename to pkgs/cupertino_http/darwin/Classes/CUPHTTPForwardedDelegate.m diff --git a/pkgs/cupertino_http/ios/Classes/CUPHTTPStreamToNSInputStreamAdapter.m b/pkgs/cupertino_http/darwin/Classes/CUPHTTPStreamToNSInputStreamAdapter.m similarity index 100% rename from pkgs/cupertino_http/ios/Classes/CUPHTTPStreamToNSInputStreamAdapter.m rename to pkgs/cupertino_http/darwin/Classes/CUPHTTPStreamToNSInputStreamAdapter.m diff --git a/pkgs/cupertino_http/ios/Classes/dart_api_dl.c b/pkgs/cupertino_http/darwin/Classes/dart_api_dl.c similarity index 100% rename from pkgs/cupertino_http/ios/Classes/dart_api_dl.c rename to pkgs/cupertino_http/darwin/Classes/dart_api_dl.c diff --git a/pkgs/cupertino_http/macos/cupertino_http.podspec b/pkgs/cupertino_http/darwin/cupertino_http.podspec similarity index 86% rename from pkgs/cupertino_http/macos/cupertino_http.podspec rename to pkgs/cupertino_http/darwin/cupertino_http.podspec index 86b7201978..c3e47bac03 100644 --- a/pkgs/cupertino_http/macos/cupertino_http.podspec +++ b/pkgs/cupertino_http/darwin/cupertino_http.podspec @@ -18,11 +18,13 @@ Pod::Spec.new do |s| # paths, so Classes contains a forwarder C file that relatively imports # `../src/*` so that the C sources can be shared among all target platforms. s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.dependency 'FlutterMacOS' + s.source_files = 'Classes/**/*' + s.ios.dependency 'Flutter' + s.osx.dependency 'FlutterMacOS' + s.ios.deployment_target = '12.0' + s.osx.deployment_target = '10.14' s.requires_arc = [] - s.platform = :osx, '10.14' s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } s.swift_version = '5.0' end diff --git a/pkgs/cupertino_http/ios/cupertino_http.podspec b/pkgs/cupertino_http/ios/cupertino_http.podspec deleted file mode 100644 index 4e2ce46f08..0000000000 --- a/pkgs/cupertino_http/ios/cupertino_http.podspec +++ /dev/null @@ -1,29 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html. -# Run `pod lib lint cupertino_http.podspec` to validate before publishing. -# -Pod::Spec.new do |s| - s.name = 'cupertino_http' - s.version = '0.0.1' - s.summary = 'Flutter Foundation URL Loading System' - s.description = <<-DESC - A Flutter plugin for accessing the Foundation URL Loading System. - DESC - s.homepage = 'https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http' - s.license = { :type => 'BSD', :file => '../LICENSE' } - s.author = { 'TODO' => 'use-valid-author' } - - # This will ensure the source files in Classes/ are included in the native - # builds of apps using this FFI plugin. Podspec does not support relative - # paths, so Classes contains a forwarder C file that relatively imports - # `../src/*` so that the C sources can be shared among all target platforms. - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.dependency 'Flutter' - s.platform = :ios, '12.0' - s.requires_arc = [] - - # Flutter.framework does not contain a i386 slice. - s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } - s.swift_version = '5.0' -end diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPClientDelegate.m deleted file mode 100644 index 5b375ca3b4..0000000000 --- a/pkgs/cupertino_http/macos/Classes/CUPHTTPClientDelegate.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPClientDelegate.m" diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m deleted file mode 100644 index b05d1fc717..0000000000 --- a/pkgs/cupertino_http/macos/Classes/CUPHTTPCompletionHelper.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPCompletionHelper.m" diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPForwardedDelegate.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPForwardedDelegate.m deleted file mode 100644 index 39c9e02729..0000000000 --- a/pkgs/cupertino_http/macos/Classes/CUPHTTPForwardedDelegate.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPForwardedDelegate.m" diff --git a/pkgs/cupertino_http/macos/Classes/CUPHTTPStreamToNSInputStreamAdapter.m b/pkgs/cupertino_http/macos/Classes/CUPHTTPStreamToNSInputStreamAdapter.m deleted file mode 100644 index 46eb84ba89..0000000000 --- a/pkgs/cupertino_http/macos/Classes/CUPHTTPStreamToNSInputStreamAdapter.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPStreamToNSInputStreamAdapter.m" diff --git a/pkgs/cupertino_http/macos/Classes/dart_api_dl.c b/pkgs/cupertino_http/macos/Classes/dart_api_dl.c deleted file mode 100644 index 023f80ab06..0000000000 --- a/pkgs/cupertino_http/macos/Classes/dart_api_dl.c +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/dart-sdk/include/dart_api_dl.c" diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 6516790d10..cff2546b3e 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -27,5 +27,7 @@ flutter: platforms: ios: ffiPlugin: true + sharedDarwinSource: true macos: ffiPlugin: true + sharedDarwinSource: true From c9696371eaf021ac1ba739f82f910562952d7fcb Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 28 Aug 2024 14:43:51 -0700 Subject: [PATCH 423/448] Convert a `java.lang.OutOfMemoryError` into a `ClientException` (#1299) --- pkgs/cronet_http/CHANGELOG.md | 5 +++++ pkgs/cronet_http/lib/src/cronet_client.dart | 16 +++++++++++++++- pkgs/cronet_http/pubspec.yaml | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 0ce43fceb3..14dcf79b65 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.3.3-wip + +* Throw `ClientException` if `CronetClient.send` runs out of Java heap while + allocating memory for the request body. + ## 1.3.2 * Upgrade `package:jni` to 0.10.1 and `package:jnigen` to 0.10.0 to fix method diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index f55617eeb1..440de8ae35 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -392,8 +392,22 @@ class CronetClient extends BaseClient { headers.forEach((k, v) => builder.addHeader(k.toJString(), v.toJString())); if (body.isNotEmpty) { + final JByteBuffer data; + try { + data = body.toJByteBuffer(); + } on JniException catch (e) { + // There are no unit tests for this code. You can verify this behavior + // manually by incrementally increasing the amount of body data in + // `CronetClient.post` until you get this exception. + if (e.message.contains('java.lang.OutOfMemoryError:')) { + throw ClientException( + 'Not enough memory for request body: ${e.message}', request.url); + } + rethrow; + } + builder.setUploadDataProvider( - jb.UploadDataProviders.create2(body.toJByteBuffer()), _executor); + jb.UploadDataProviders.create2(data), _executor); } builder.build().start(); return responseCompleter.future; diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index 19e5e8509f..ee14e309a9 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cronet_http -version: 1.3.2 +version: 1.3.3-wip description: >- An Android Flutter plugin that provides access to the Cronet HTTP client. repository: https://github.com/dart-lang/http/tree/master/pkgs/cronet_http From 94d3dd2aa95447d8a659994116de29e5091a1d8f Mon Sep 17 00:00:00 2001 From: Bob Nystrom Date: Wed, 25 Sep 2024 15:15:41 -0700 Subject: [PATCH 424/448] Migrate to the dart_style DartFormatter API. (#1307) Going forward, the formatter needs to know what language version it should use to parse input code. This updates the generator to pass in a version. (In this case, since it's just used for code generation, it unconditionally passes in the latest language version, which should be fine.) Fix #1304. --- .../bin/generate_server_wrappers.dart | 3 ++- pkgs/http_client_conformance_tests/pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart b/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart index 6e86737c41..52e9d766c3 100644 --- a/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart +++ b/pkgs/http_client_conformance_tests/bin/generate_server_wrappers.dart @@ -44,7 +44,8 @@ Future> startServer() async => spawnHybridUri(Uri( void main() async { final files = await Directory('lib/src').list().toList(); - final formatter = DartFormatter(); + final formatter = + DartFormatter(languageVersion: DartFormatter.latestLanguageVersion); files.where((file) => file.path.endsWith('_server.dart')).forEach((file) { final vmPath = file.path.replaceAll('_server.dart', '_server_vm.dart'); diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index c3861ffc15..ae2662b693 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -11,7 +11,7 @@ environment: dependencies: async: ^2.8.2 - dart_style: ^2.2.3 + dart_style: ^2.3.7 http: ^1.2.0 stream_channel: ^2.1.1 test: ^1.21.2 From 7dd7a4a1958e222ac1604495a20c3dffa5bf9387 Mon Sep 17 00:00:00 2001 From: Hossein Yousefi Date: Wed, 2 Oct 2024 14:38:52 +0200 Subject: [PATCH 425/448] [cronet_http] Upgrade jni and jnigen to 0.12.0 (#1311) --- pkgs/cronet_http/CHANGELOG.md | 1 + pkgs/cronet_http/android/build.gradle | 2 +- .../example/android/app/build.gradle | 1 + .../android/app/src/debug/AndroidManifest.xml | 3 +- .../android/app/src/main/AndroidManifest.xml | 3 +- .../app/src/profile/AndroidManifest.xml | 3 +- pkgs/cronet_http/example/android/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- pkgs/cronet_http/jnigen.yaml | 3 - pkgs/cronet_http/lib/src/cronet_client.dart | 6 +- .../cronet_http/lib/src/jni/jni_bindings.dart | 4620 +++++++++-------- pkgs/cronet_http/pubspec.yaml | 4 +- 12 files changed, 2335 insertions(+), 2315 deletions(-) diff --git a/pkgs/cronet_http/CHANGELOG.md b/pkgs/cronet_http/CHANGELOG.md index 14dcf79b65..2b565f3105 100644 --- a/pkgs/cronet_http/CHANGELOG.md +++ b/pkgs/cronet_http/CHANGELOG.md @@ -2,6 +2,7 @@ * Throw `ClientException` if `CronetClient.send` runs out of Java heap while allocating memory for the request body. +* Upgrade `package:jni` and `package:jnigen` to 0.12.0. ## 1.3.2 diff --git a/pkgs/cronet_http/android/build.gradle b/pkgs/cronet_http/android/build.gradle index b11c74b8a8..9f3250978f 100644 --- a/pkgs/cronet_http/android/build.gradle +++ b/pkgs/cronet_http/android/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/pkgs/cronet_http/example/android/app/build.gradle b/pkgs/cronet_http/example/android/app/build.gradle index add4718db2..feddb9ca9f 100644 --- a/pkgs/cronet_http/example/android/app/build.gradle +++ b/pkgs/cronet_http/example/android/app/build.gradle @@ -28,6 +28,7 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion + namespace 'io.flutter.cronet_http_example' compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/pkgs/cronet_http/example/android/app/src/debug/AndroidManifest.xml b/pkgs/cronet_http/example/android/app/src/debug/AndroidManifest.xml index 6170951031..bbd7ee7776 100644 --- a/pkgs/cronet_http/example/android/app/src/debug/AndroidManifest.xml +++ b/pkgs/cronet_http/example/android/app/src/debug/AndroidManifest.xml @@ -1,4 +1,3 @@ - + diff --git a/pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml b/pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml index 254760d3ed..47fa040c26 100644 --- a/pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml +++ b/pkgs/cronet_http/example/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + + diff --git a/pkgs/cronet_http/example/android/build.gradle b/pkgs/cronet_http/example/android/build.gradle index 954fa1cd5c..6dd9012781 100644 --- a/pkgs/cronet_http/example/android/build.gradle +++ b/pkgs/cronet_http/example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' + classpath 'com.android.tools.build:gradle:8.6.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties b/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties index cfe88f6904..7aeeb11c6e 100644 --- a/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/pkgs/cronet_http/example/android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip diff --git a/pkgs/cronet_http/jnigen.yaml b/pkgs/cronet_http/jnigen.yaml index 9eabc42128..2413c9f2b4 100644 --- a/pkgs/cronet_http/jnigen.yaml +++ b/pkgs/cronet_http/jnigen.yaml @@ -18,6 +18,3 @@ classes: - 'org.chromium.net.UploadDataProviders' - 'org.chromium.net.UrlRequest' - 'org.chromium.net.UrlResponseInfo' - -enable_experiment: - - 'interface_implementation' diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index 440de8ae35..8341e1caa5 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -157,7 +157,7 @@ jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface _urlRequestCallbacks( // The order of callbacks generated by Cronet is documented here: // https://developer.android.com/guide/topics/connectivity/cronet/lifecycle return jb.UrlRequestCallbackProxy_UrlRequestCallbackInterface.implement( - jb.$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl( + jb.$UrlRequestCallbackProxy_UrlRequestCallbackInterface( onResponseStarted: (urlRequest, responseInfo) { responseStream = StreamController(); final responseHeaders = @@ -377,7 +377,7 @@ class CronetClient extends BaseClient { final builder = engine._engine.newUrlRequestBuilder( request.url.toString().toJString(), - jb.UrlRequestCallbackProxy.new1( + jb.UrlRequestCallbackProxy( _urlRequestCallbacks(request, responseCompleter, profile)), _executor, )..setHttpMethod(request.method.toJString()); @@ -407,7 +407,7 @@ class CronetClient extends BaseClient { } builder.setUploadDataProvider( - jb.UploadDataProviders.create2(data), _executor); + jb.UploadDataProviders.create$2(data), _executor); } builder.build().start(); return responseCompleter.future; diff --git a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart index 44b83c9ddf..9f04460e60 100644 --- a/pkgs/cronet_http/lib/src/jni/jni_bindings.dart +++ b/pkgs/cronet_http/lib/src/jni/jni_bindings.dart @@ -7,12 +7,18 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: doc_directive_unknown // ignore_for_file: file_names +// ignore_for_file: inference_failure_on_untyped_parameter +// ignore_for_file: invalid_internal_annotation +// ignore_for_file: invalid_use_of_internal_member +// ignore_for_file: library_prefixes // ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_library_prefixes // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: non_constant_identifier_names // ignore_for_file: only_throw_errors // ignore_for_file: overridden_fields // ignore_for_file: prefer_double_quotes +// ignore_for_file: unintended_html_in_doc_comment // ignore_for_file: unnecessary_cast // ignore_for_file: unnecessary_parenthesis // ignore_for_file: unused_element @@ -22,61 +28,65 @@ // ignore_for_file: unused_shown_name // ignore_for_file: use_super_parameters -import 'dart:ffi' as ffi; -import 'dart:isolate' show ReceivePort; +import 'dart:core' show Object, String, bool, double, int; +import 'dart:core' as _$core; -import 'package:jni/internal_helpers_for_jnigen.dart'; -import 'package:jni/jni.dart' as jni; +import 'package:jni/_internal.dart' as _$jni; +import 'package:jni/jni.dart' as _$jni; -/// from: io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface -class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { - @override - late final jni.JObjType - $type = type; +/// from: `io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface` +class UrlRequestCallbackProxy_UrlRequestCallbackInterface + extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType + $type; + @_$jni.internal UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName( + static final _class = _$jni.JClass.forName( r'io/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface'); /// The type which includes information such as the signature of this class. static const type = - $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType(); + $UrlRequestCallbackProxy_UrlRequestCallbackInterface$Type(); static final _id_onRedirectReceived = _class.instanceMethodId( r'onRedirectReceived', r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V', ); - static final _onRedirectReceived = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onRedirectReceived = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public abstract void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string) + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string)` void onRedirectReceived( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - jni.JString string, + _$jni.JString string, ) { _onRedirectReceived( reference.pointer, - _id_onRedirectReceived as jni.JMethodIDPtr, + _id_onRedirectReceived as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer, string.reference.pointer) @@ -88,28 +98,31 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); - static final _onResponseStarted = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onResponseStarted = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + /// from: `public abstract void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo)` void onResponseStarted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { _onResponseStarted( reference.pointer, - _id_onResponseStarted as jni.JMethodIDPtr, + _id_onResponseStarted as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer) .check(); @@ -120,34 +133,34 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V', ); - static final _onReadCompleted = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onReadCompleted = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public abstract void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer) + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer)` void onReadCompleted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - jni.JByteBuffer byteBuffer, + _$jni.JByteBuffer byteBuffer, ) { _onReadCompleted( reference.pointer, - _id_onReadCompleted as jni.JMethodIDPtr, + _id_onReadCompleted as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer, byteBuffer.reference.pointer) @@ -159,26 +172,29 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); - static final _onSucceeded = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onSucceeded = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + /// from: `public abstract void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo)` void onSucceeded( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { - _onSucceeded(reference.pointer, _id_onSucceeded as jni.JMethodIDPtr, + _onSucceeded(reference.pointer, _id_onSucceeded as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer) .check(); } @@ -188,26 +204,26 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V', ); - static final _onFailed = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onFailed = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public abstract void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException) + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException)` void onFailed( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, @@ -215,7 +231,7 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { ) { _onFailed( reference.pointer, - _id_onFailed as jni.JMethodIDPtr, + _id_onFailed as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer, cronetException.reference.pointer) @@ -223,18 +239,17 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { } /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( + static final _$core + .Map + _$impls = {}; + static _$jni.JObjectPtr _$invoke( int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, ) { return _$invokeMethod( port, - $MethodInvocation.fromAddresses( + _$jni.MethodInvocation.fromAddresses( 0, descriptor.address, args.address, @@ -242,15 +257,15 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { ); } - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); - static ffi.Pointer _$invokeMethod( + static _$jni.Pointer<_$jni.Void> _$invokeMethod( int $p, - $MethodInvocation $i, + _$jni.MethodInvocation $i, ) { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); @@ -258,128 +273,162 @@ class UrlRequestCallbackProxy_UrlRequestCallbackInterface extends jni.JObject { if ($d == r'onRedirectReceived(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V') { _$impls[$p]!.onRedirectReceived( - $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), - $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), - $a[2].castTo(const jni.JStringType(), releaseOriginal: true), + $a[0].as(const $UrlRequest$Type(), releaseOriginal: true), + $a[1].as(const $UrlResponseInfo$Type(), releaseOriginal: true), + $a[2].as(const _$jni.JStringType(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'onResponseStarted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V') { _$impls[$p]!.onResponseStarted( - $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), - $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), + $a[0].as(const $UrlRequest$Type(), releaseOriginal: true), + $a[1].as(const $UrlResponseInfo$Type(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'onReadCompleted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V') { _$impls[$p]!.onReadCompleted( - $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), - $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), - $a[2].castTo(const jni.JByteBufferType(), releaseOriginal: true), + $a[0].as(const $UrlRequest$Type(), releaseOriginal: true), + $a[1].as(const $UrlResponseInfo$Type(), releaseOriginal: true), + $a[2].as(const _$jni.JByteBufferType(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'onSucceeded(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V') { _$impls[$p]!.onSucceeded( - $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), - $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), + $a[0].as(const $UrlRequest$Type(), releaseOriginal: true), + $a[1].as(const $UrlResponseInfo$Type(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'onFailed(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V') { _$impls[$p]!.onFailed( - $a[0].castTo(const $UrlRequestType(), releaseOriginal: true), - $a[1].castTo(const $UrlResponseInfoType(), releaseOriginal: true), - $a[2].castTo(const $CronetExceptionType(), releaseOriginal: true), + $a[0].as(const $UrlRequest$Type(), releaseOriginal: true), + $a[1].as(const $UrlResponseInfo$Type(), releaseOriginal: true), + $a[2].as(const $CronetException$Type(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e); + return _$jni.ProtectedJniExtensions.newDartException(e); } - return jni.nullptr; + return _$jni.nullptr; } - factory UrlRequestCallbackProxy_UrlRequestCallbackInterface.implement( - $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl $impl, + static void implementIn( + _$jni.JImplementer implementer, + $UrlRequestCallbackProxy_UrlRequestCallbackInterface $impl, ) { - final $p = ReceivePort(); - final $x = - UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromReference( - ProtectedJniExtensions.newPortProxy( - r'io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface', - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { if ($m == null) { _$impls.remove($p.sendPort.nativePort); $p.close(); return; } - final $i = $MethodInvocation.fromMessage($m as List); + final $i = _$jni.MethodInvocation.fromMessage($m); final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); }); - return $x; + implementer.add( + r'io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface', + $p, + _$invokePointer, + [ + if ($impl.onRedirectReceived$async) + r'onRedirectReceived(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V', + if ($impl.onResponseStarted$async) + r'onResponseStarted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', + if ($impl.onReadCompleted$async) + r'onReadCompleted(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V', + if ($impl.onSucceeded$async) + r'onSucceeded(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', + if ($impl.onFailed$async) + r'onFailed(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory UrlRequestCallbackProxy_UrlRequestCallbackInterface.implement( + $UrlRequestCallbackProxy_UrlRequestCallbackInterface $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromReference( + $i.implementReference(), + ); } } -abstract interface class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl { - factory $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl({ +abstract mixin class $UrlRequestCallbackProxy_UrlRequestCallbackInterface { + factory $UrlRequestCallbackProxy_UrlRequestCallbackInterface({ required void Function(UrlRequest urlRequest, - UrlResponseInfo urlResponseInfo, jni.JString string) + UrlResponseInfo urlResponseInfo, _$jni.JString string) onRedirectReceived, + bool onRedirectReceived$async, required void Function( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) onResponseStarted, + bool onResponseStarted$async, required void Function(UrlRequest urlRequest, - UrlResponseInfo urlResponseInfo, jni.JByteBuffer byteBuffer) + UrlResponseInfo urlResponseInfo, _$jni.JByteBuffer byteBuffer) onReadCompleted, + bool onReadCompleted$async, required void Function( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) onSucceeded, + bool onSucceeded$async, required void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, CronetException cronetException) onFailed, - }) = _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl; + bool onFailed$async, + }) = _$UrlRequestCallbackProxy_UrlRequestCallbackInterface; void onRedirectReceived(UrlRequest urlRequest, - UrlResponseInfo urlResponseInfo, jni.JString string); + UrlResponseInfo urlResponseInfo, _$jni.JString string); + bool get onRedirectReceived$async => false; void onResponseStarted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo); + bool get onResponseStarted$async => false; void onReadCompleted(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - jni.JByteBuffer byteBuffer); + _$jni.JByteBuffer byteBuffer); + bool get onReadCompleted$async => false; void onSucceeded(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo); + bool get onSucceeded$async => false; void onFailed(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, CronetException cronetException); + bool get onFailed$async => false; } -class _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl - implements $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl { - _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl({ +class _$UrlRequestCallbackProxy_UrlRequestCallbackInterface + implements $UrlRequestCallbackProxy_UrlRequestCallbackInterface { + _$UrlRequestCallbackProxy_UrlRequestCallbackInterface({ required void Function(UrlRequest urlRequest, - UrlResponseInfo urlResponseInfo, jni.JString string) + UrlResponseInfo urlResponseInfo, _$jni.JString string) onRedirectReceived, + this.onRedirectReceived$async = false, required void Function( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) onResponseStarted, + this.onResponseStarted$async = false, required void Function(UrlRequest urlRequest, - UrlResponseInfo urlResponseInfo, jni.JByteBuffer byteBuffer) + UrlResponseInfo urlResponseInfo, _$jni.JByteBuffer byteBuffer) onReadCompleted, + this.onReadCompleted$async = false, required void Function( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) onSucceeded, + this.onSucceeded$async = false, required void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, CronetException cronetException) onFailed, + this.onFailed$async = false, }) : _onRedirectReceived = onRedirectReceived, _onResponseStarted = onResponseStarted, _onReadCompleted = onReadCompleted, @@ -387,18 +436,23 @@ class _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl _onFailed = onFailed; final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - jni.JString string) _onRedirectReceived; + _$jni.JString string) _onRedirectReceived; + final bool onRedirectReceived$async; final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) _onResponseStarted; + final bool onResponseStarted$async; final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - jni.JByteBuffer byteBuffer) _onReadCompleted; + _$jni.JByteBuffer byteBuffer) _onReadCompleted; + final bool onReadCompleted$async; final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo) _onSucceeded; + final bool onSucceeded$async; final void Function(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, CronetException cronetException) _onFailed; + final bool onFailed$async; void onRedirectReceived(UrlRequest urlRequest, - UrlResponseInfo urlResponseInfo, jni.JString string) { + UrlResponseInfo urlResponseInfo, _$jni.JString string) { return _onRedirectReceived(urlRequest, urlResponseInfo, string); } @@ -408,7 +462,7 @@ class _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl } void onReadCompleted(UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - jni.JByteBuffer byteBuffer) { + _$jni.JByteBuffer byteBuffer) { return _onReadCompleted(urlRequest, urlResponseInfo, byteBuffer); } @@ -422,76 +476,85 @@ class _$UrlRequestCallbackProxy_UrlRequestCallbackInterfaceImpl } } -final class $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType - extends jni.JObjType { - const $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType(); +final class $UrlRequestCallbackProxy_UrlRequestCallbackInterface$Type + extends _$jni + .JObjType { + @_$jni.internal + const $UrlRequestCallbackProxy_UrlRequestCallbackInterface$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;'; - @override + @_$jni.internal + @_$core.override UrlRequestCallbackProxy_UrlRequestCallbackInterface fromReference( - jni.JReference reference) => + _$jni.JReference reference) => UrlRequestCallbackProxy_UrlRequestCallbackInterface.fromReference( reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override + @_$core.override int get hashCode => - ($UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType).hashCode; + ($UrlRequestCallbackProxy_UrlRequestCallbackInterface$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { return other.runtimeType == - ($UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType) && - other is $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType; + ($UrlRequestCallbackProxy_UrlRequestCallbackInterface$Type) && + other is $UrlRequestCallbackProxy_UrlRequestCallbackInterface$Type; } } -/// from: io.flutter.plugins.cronet_http.UrlRequestCallbackProxy +/// from: `io.flutter.plugins.cronet_http.UrlRequestCallbackProxy` class UrlRequestCallbackProxy extends UrlRequest_Callback { - @override - late final jni.JObjType $type = type; + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal UrlRequestCallbackProxy.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName( + static final _class = _$jni.JClass.forName( r'io/flutter/plugins/cronet_http/UrlRequestCallbackProxy'); /// The type which includes information such as the signature of this class. - static const type = $UrlRequestCallbackProxyType(); - static final _id_new1 = _class.constructorId( + static const type = $UrlRequestCallbackProxy$Type(); + static final _id_new$ = _class.constructorId( r'(Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;)V', ); - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface urlRequestCallbackInterface) + /// from: `public void (io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface urlRequestCallbackInterface)` /// The returned object must be released after use, by calling the [release] method. - factory UrlRequestCallbackProxy.new1( + factory UrlRequestCallbackProxy( UrlRequestCallbackProxy_UrlRequestCallbackInterface urlRequestCallbackInterface, ) { - return UrlRequestCallbackProxy.fromReference(_new1( + return UrlRequestCallbackProxy.fromReference(_new$( _class.reference.pointer, - _id_new1 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, urlRequestCallbackInterface.reference.pointer) .reference); } @@ -501,24 +564,25 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r'()Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy$UrlRequestCallbackInterface;', ); - static final _getCallback = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getCallback = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface getCallback() + /// from: `public final io.flutter.plugins.cronet_http.UrlRequestCallbackProxy$UrlRequestCallbackInterface getCallback()` /// The returned object must be released after use, by calling the [release] method. UrlRequestCallbackProxy_UrlRequestCallbackInterface getCallback() { - return _getCallback(reference.pointer, _id_getCallback as jni.JMethodIDPtr) + return _getCallback( + reference.pointer, _id_getCallback as _$jni.JMethodIDPtr) .object( - const $UrlRequestCallbackProxy_UrlRequestCallbackInterfaceType()); + const $UrlRequestCallbackProxy_UrlRequestCallbackInterface$Type()); } static final _id_onRedirectReceived = _class.instanceMethodId( @@ -526,34 +590,34 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V', ); - static final _onRedirectReceived = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onRedirectReceived = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string) + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string)` void onRedirectReceived( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - jni.JString string, + _$jni.JString string, ) { _onRedirectReceived( reference.pointer, - _id_onRedirectReceived as jni.JMethodIDPtr, + _id_onRedirectReceived as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer, string.reference.pointer) @@ -565,28 +629,31 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); - static final _onResponseStarted = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onResponseStarted = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + /// from: `public void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo)` void onResponseStarted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { _onResponseStarted( reference.pointer, - _id_onResponseStarted as jni.JMethodIDPtr, + _id_onResponseStarted as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer) .check(); @@ -597,34 +664,34 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V', ); - static final _onReadCompleted = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onReadCompleted = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer) + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer)` void onReadCompleted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - jni.JByteBuffer byteBuffer, + _$jni.JByteBuffer byteBuffer, ) { _onReadCompleted( reference.pointer, - _id_onReadCompleted as jni.JMethodIDPtr, + _id_onReadCompleted as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer, byteBuffer.reference.pointer) @@ -636,26 +703,29 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); - static final _onSucceeded = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onSucceeded = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + /// from: `public void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo)` void onSucceeded( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { - _onSucceeded(reference.pointer, _id_onSucceeded as jni.JMethodIDPtr, + _onSucceeded(reference.pointer, _id_onSucceeded as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer) .check(); } @@ -665,26 +735,26 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V', ); - static final _onFailed = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onFailed = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException) + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException)` void onFailed( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, @@ -692,7 +762,7 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { ) { _onFailed( reference.pointer, - _id_onFailed as jni.JMethodIDPtr, + _id_onFailed as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer, cronetException.reference.pointer) @@ -700,83 +770,91 @@ class UrlRequestCallbackProxy extends UrlRequest_Callback { } } -final class $UrlRequestCallbackProxyType - extends jni.JObjType { - const $UrlRequestCallbackProxyType(); +final class $UrlRequestCallbackProxy$Type + extends _$jni.JObjType { + @_$jni.internal + const $UrlRequestCallbackProxy$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lio/flutter/plugins/cronet_http/UrlRequestCallbackProxy;'; - @override - UrlRequestCallbackProxy fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + UrlRequestCallbackProxy fromReference(_$jni.JReference reference) => UrlRequestCallbackProxy.fromReference(reference); - @override - jni.JObjType get superType => const $UrlRequest_CallbackType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const $UrlRequest_Callback$Type(); - @override + @_$jni.internal + @_$core.override final superCount = 2; - @override - int get hashCode => ($UrlRequestCallbackProxyType).hashCode; + @_$core.override + int get hashCode => ($UrlRequestCallbackProxy$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($UrlRequestCallbackProxyType) && - other is $UrlRequestCallbackProxyType; + return other.runtimeType == ($UrlRequestCallbackProxy$Type) && + other is $UrlRequestCallbackProxy$Type; } } -/// from: java.net.URL -class URL extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `java.net.URL` +class URL extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal URL.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'java/net/URL'); + static final _class = _$jni.JClass.forName(r'java/net/URL'); /// The type which includes information such as the signature of this class. - static const type = $URLType(); - static final _id_new0 = _class.constructorId( + static const type = $URL$Type(); + static final _id_new$ = _class.constructorId( r'(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - $Int32, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, int, - ffi.Pointer)>(); + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2) + /// from: `public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2)` /// The returned object must be released after use, by calling the [release] method. factory URL( - jni.JString string, - jni.JString string1, + _$jni.JString string, + _$jni.JString string1, int i, - jni.JString string2, + _$jni.JString string2, ) { - return URL.fromReference(_new0( + return URL.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, string.reference.pointer, string1.reference.pointer, i, @@ -784,84 +862,84 @@ class URL extends jni.JObject { .reference); } - static final _id_new1 = _class.constructorId( + static final _id_new$1 = _class.constructorId( r'(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V', ); - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _new$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public void (java.lang.String string, java.lang.String string1, java.lang.String string2) + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (java.lang.String string, java.lang.String string1, java.lang.String string2)` /// The returned object must be released after use, by calling the [release] method. - factory URL.new1( - jni.JString string, - jni.JString string1, - jni.JString string2, + factory URL.new$1( + _$jni.JString string, + _$jni.JString string1, + _$jni.JString string2, ) { - return URL.fromReference(_new1( + return URL.fromReference(_new$1( _class.reference.pointer, - _id_new1 as jni.JMethodIDPtr, + _id_new$1 as _$jni.JMethodIDPtr, string.reference.pointer, string1.reference.pointer, string2.reference.pointer) .reference); } - static final _id_new2 = _class.constructorId( + static final _id_new$2 = _class.constructorId( r'(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V', ); - static final _new2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _new$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - $Int32, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, int, - ffi.Pointer, - ffi.Pointer)>(); + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2, java.net.URLStreamHandler uRLStreamHandler) + /// from: `public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2, java.net.URLStreamHandler uRLStreamHandler)` /// The returned object must be released after use, by calling the [release] method. - factory URL.new2( - jni.JString string, - jni.JString string1, + factory URL.new$2( + _$jni.JString string, + _$jni.JString string1, int i, - jni.JString string2, - jni.JObject uRLStreamHandler, + _$jni.JString string2, + _$jni.JObject uRLStreamHandler, ) { - return URL.fromReference(_new2( + return URL.fromReference(_new$2( _class.reference.pointer, - _id_new2 as jni.JMethodIDPtr, + _id_new$2 as _$jni.JMethodIDPtr, string.reference.pointer, string1.reference.pointer, i, @@ -870,96 +948,99 @@ class URL extends jni.JObject { .reference); } - static final _id_new3 = _class.constructorId( + static final _id_new$3 = _class.constructorId( r'(Ljava/lang/String;)V', ); - static final _new3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (java.lang.String string) + /// from: `public void (java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - factory URL.new3( - jni.JString string, + factory URL.new$3( + _$jni.JString string, ) { - return URL.fromReference(_new3(_class.reference.pointer, - _id_new3 as jni.JMethodIDPtr, string.reference.pointer) + return URL.fromReference(_new$3(_class.reference.pointer, + _id_new$3 as _$jni.JMethodIDPtr, string.reference.pointer) .reference); } - static final _id_new4 = _class.constructorId( + static final _id_new$4 = _class.constructorId( r'(Ljava/net/URL;Ljava/lang/String;)V', ); - static final _new4 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _new$4 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (java.net.URL uRL, java.lang.String string) + /// from: `public void (java.net.URL uRL, java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - factory URL.new4( + factory URL.new$4( URL uRL, - jni.JString string, + _$jni.JString string, ) { - return URL.fromReference(_new4( + return URL.fromReference(_new$4( _class.reference.pointer, - _id_new4 as jni.JMethodIDPtr, + _id_new$4 as _$jni.JMethodIDPtr, uRL.reference.pointer, string.reference.pointer) .reference); } - static final _id_new5 = _class.constructorId( + static final _id_new$5 = _class.constructorId( r'(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V', ); - static final _new5 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _new$5 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public void (java.net.URL uRL, java.lang.String string, java.net.URLStreamHandler uRLStreamHandler) + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public void (java.net.URL uRL, java.lang.String string, java.net.URLStreamHandler uRLStreamHandler)` /// The returned object must be released after use, by calling the [release] method. - factory URL.new5( + factory URL.new$5( URL uRL, - jni.JString string, - jni.JObject uRLStreamHandler, + _$jni.JString string, + _$jni.JObject uRLStreamHandler, ) { - return URL.fromReference(_new5( + return URL.fromReference(_new$5( _class.reference.pointer, - _id_new5 as jni.JMethodIDPtr, + _id_new$5 as _$jni.JMethodIDPtr, uRL.reference.pointer, string.reference.pointer, uRLStreamHandler.reference.pointer) @@ -971,23 +1052,23 @@ class URL extends jni.JObject { r'()Ljava/lang/String;', ); - static final _getQuery = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getQuery = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String getQuery() + /// from: `public java.lang.String getQuery()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getQuery() { - return _getQuery(reference.pointer, _id_getQuery as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString getQuery() { + return _getQuery(reference.pointer, _id_getQuery as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_getPath = _class.instanceMethodId( @@ -995,23 +1076,23 @@ class URL extends jni.JObject { r'()Ljava/lang/String;', ); - static final _getPath = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getPath = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String getPath() + /// from: `public java.lang.String getPath()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getPath() { - return _getPath(reference.pointer, _id_getPath as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString getPath() { + return _getPath(reference.pointer, _id_getPath as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_getUserInfo = _class.instanceMethodId( @@ -1019,23 +1100,24 @@ class URL extends jni.JObject { r'()Ljava/lang/String;', ); - static final _getUserInfo = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getUserInfo = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String getUserInfo() + /// from: `public java.lang.String getUserInfo()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getUserInfo() { - return _getUserInfo(reference.pointer, _id_getUserInfo as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString getUserInfo() { + return _getUserInfo( + reference.pointer, _id_getUserInfo as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_getAuthority = _class.instanceMethodId( @@ -1043,24 +1125,24 @@ class URL extends jni.JObject { r'()Ljava/lang/String;', ); - static final _getAuthority = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getAuthority = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String getAuthority() + /// from: `public java.lang.String getAuthority()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getAuthority() { + _$jni.JString getAuthority() { return _getAuthority( - reference.pointer, _id_getAuthority as jni.JMethodIDPtr) - .object(const jni.JStringType()); + reference.pointer, _id_getAuthority as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_getPort = _class.instanceMethodId( @@ -1068,21 +1150,22 @@ class URL extends jni.JObject { r'()I', ); - static final _getPort = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getPort = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public int getPort() + /// from: `public int getPort()` int getPort() { - return _getPort(reference.pointer, _id_getPort as jni.JMethodIDPtr).integer; + return _getPort(reference.pointer, _id_getPort as _$jni.JMethodIDPtr) + .integer; } static final _id_getDefaultPort = _class.instanceMethodId( @@ -1090,22 +1173,22 @@ class URL extends jni.JObject { r'()I', ); - static final _getDefaultPort = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getDefaultPort = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public int getDefaultPort() + /// from: `public int getDefaultPort()` int getDefaultPort() { return _getDefaultPort( - reference.pointer, _id_getDefaultPort as jni.JMethodIDPtr) + reference.pointer, _id_getDefaultPort as _$jni.JMethodIDPtr) .integer; } @@ -1114,23 +1197,24 @@ class URL extends jni.JObject { r'()Ljava/lang/String;', ); - static final _getProtocol = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getProtocol = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String getProtocol() + /// from: `public java.lang.String getProtocol()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getProtocol() { - return _getProtocol(reference.pointer, _id_getProtocol as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString getProtocol() { + return _getProtocol( + reference.pointer, _id_getProtocol as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_getHost = _class.instanceMethodId( @@ -1138,23 +1222,23 @@ class URL extends jni.JObject { r'()Ljava/lang/String;', ); - static final _getHost = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getHost = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String getHost() + /// from: `public java.lang.String getHost()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getHost() { - return _getHost(reference.pointer, _id_getHost as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString getHost() { + return _getHost(reference.pointer, _id_getHost as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_getFile = _class.instanceMethodId( @@ -1162,23 +1246,23 @@ class URL extends jni.JObject { r'()Ljava/lang/String;', ); - static final _getFile = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getFile = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String getFile() + /// from: `public java.lang.String getFile()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getFile() { - return _getFile(reference.pointer, _id_getFile as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString getFile() { + return _getFile(reference.pointer, _id_getFile as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_getRef = _class.instanceMethodId( @@ -1186,23 +1270,23 @@ class URL extends jni.JObject { r'()Ljava/lang/String;', ); - static final _getRef = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getRef = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String getRef() + /// from: `public java.lang.String getRef()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getRef() { - return _getRef(reference.pointer, _id_getRef as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString getRef() { + return _getRef(reference.pointer, _id_getRef as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_equals = _class.instanceMethodId( @@ -1210,46 +1294,46 @@ class URL extends jni.JObject { r'(Ljava/lang/Object;)Z', ); - static final _equals = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _equals = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public boolean equals(java.lang.Object object) + /// from: `public boolean equals(java.lang.Object object)` bool equals( - jni.JObject object, + _$jni.JObject object, ) { - return _equals(reference.pointer, _id_equals as jni.JMethodIDPtr, + return _equals(reference.pointer, _id_equals as _$jni.JMethodIDPtr, object.reference.pointer) .boolean; } - static final _id_hashCode1 = _class.instanceMethodId( + static final _id_hashCode$1 = _class.instanceMethodId( r'hashCode', r'()I', ); - static final _hashCode1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _hashCode$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public int hashCode() - int hashCode1() { - return _hashCode1(reference.pointer, _id_hashCode1 as jni.JMethodIDPtr) + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1 as _$jni.JMethodIDPtr) .integer; } @@ -1258,48 +1342,48 @@ class URL extends jni.JObject { r'(Ljava/net/URL;)Z', ); - static final _sameFile = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _sameFile = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public boolean sameFile(java.net.URL uRL) + /// from: `public boolean sameFile(java.net.URL uRL)` bool sameFile( URL uRL, ) { - return _sameFile(reference.pointer, _id_sameFile as jni.JMethodIDPtr, + return _sameFile(reference.pointer, _id_sameFile as _$jni.JMethodIDPtr, uRL.reference.pointer) .boolean; } - static final _id_toString1 = _class.instanceMethodId( + static final _id_toString$1 = _class.instanceMethodId( r'toString', r'()Ljava/lang/String;', ); - static final _toString1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _toString$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String toString() + /// from: `public java.lang.String toString()` /// The returned object must be released after use, by calling the [release] method. - jni.JString toString1() { - return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString toString$1() { + return _toString$1(reference.pointer, _id_toString$1 as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_toExternalForm = _class.instanceMethodId( @@ -1307,24 +1391,24 @@ class URL extends jni.JObject { r'()Ljava/lang/String;', ); - static final _toExternalForm = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _toExternalForm = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String toExternalForm() + /// from: `public java.lang.String toExternalForm()` /// The returned object must be released after use, by calling the [release] method. - jni.JString toExternalForm() { + _$jni.JString toExternalForm() { return _toExternalForm( - reference.pointer, _id_toExternalForm as jni.JMethodIDPtr) - .object(const jni.JStringType()); + reference.pointer, _id_toExternalForm as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_toURI = _class.instanceMethodId( @@ -1332,23 +1416,23 @@ class URL extends jni.JObject { r'()Ljava/net/URI;', ); - static final _toURI = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _toURI = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.net.URI toURI() + /// from: `public java.net.URI toURI()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject toURI() { - return _toURI(reference.pointer, _id_toURI as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject toURI() { + return _toURI(reference.pointer, _id_toURI as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_openConnection = _class.instanceMethodId( @@ -1356,50 +1440,50 @@ class URL extends jni.JObject { r'()Ljava/net/URLConnection;', ); - static final _openConnection = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _openConnection = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.net.URLConnection openConnection() + /// from: `public java.net.URLConnection openConnection()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject openConnection() { + _$jni.JObject openConnection() { return _openConnection( - reference.pointer, _id_openConnection as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_openConnection as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } - static final _id_openConnection1 = _class.instanceMethodId( + static final _id_openConnection$1 = _class.instanceMethodId( r'openConnection', r'(Ljava/net/Proxy;)Ljava/net/URLConnection;', ); - static final _openConnection1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _openConnection$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public java.net.URLConnection openConnection(java.net.Proxy proxy) + /// from: `public java.net.URLConnection openConnection(java.net.Proxy proxy)` /// The returned object must be released after use, by calling the [release] method. - jni.JObject openConnection1( - jni.JObject proxy, + _$jni.JObject openConnection$1( + _$jni.JObject proxy, ) { - return _openConnection1(reference.pointer, - _id_openConnection1 as jni.JMethodIDPtr, proxy.reference.pointer) - .object(const jni.JObjectType()); + return _openConnection$1(reference.pointer, + _id_openConnection$1 as _$jni.JMethodIDPtr, proxy.reference.pointer) + .object(const _$jni.JObjectType()); } static final _id_openStream = _class.instanceMethodId( @@ -1407,23 +1491,23 @@ class URL extends jni.JObject { r'()Ljava/io/InputStream;', ); - static final _openStream = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _openStream = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.io.InputStream openStream() + /// from: `public java.io.InputStream openStream()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject openStream() { - return _openStream(reference.pointer, _id_openStream as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject openStream() { + return _openStream(reference.pointer, _id_openStream as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_getContent = _class.instanceMethodId( @@ -1431,49 +1515,49 @@ class URL extends jni.JObject { r'()Ljava/lang/Object;', ); - static final _getContent = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getContent = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.Object getContent() + /// from: `public java.lang.Object getContent()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject getContent() { - return _getContent(reference.pointer, _id_getContent as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject getContent() { + return _getContent(reference.pointer, _id_getContent as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } - static final _id_getContent1 = _class.instanceMethodId( + static final _id_getContent$1 = _class.instanceMethodId( r'getContent', r'([Ljava/lang/Class;)Ljava/lang/Object;', ); - static final _getContent1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _getContent$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public java.lang.Object getContent(java.lang.Class[] classs) + /// from: `public java.lang.Object getContent(java.lang.Class[] classs)` /// The returned object must be released after use, by calling the [release] method. - jni.JObject getContent1( - jni.JArray classs, + _$jni.JObject getContent$1( + _$jni.JArray<_$jni.JObject> classs, ) { - return _getContent1(reference.pointer, _id_getContent1 as jni.JMethodIDPtr, - classs.reference.pointer) - .object(const jni.JObjectType()); + return _getContent$1(reference.pointer, + _id_getContent$1 as _$jni.JMethodIDPtr, classs.reference.pointer) + .object(const _$jni.JObjectType()); } static final _id_setURLStreamHandlerFactory = _class.staticMethodId( @@ -1481,87 +1565,97 @@ class URL extends jni.JObject { r'(Ljava/net/URLStreamHandlerFactory;)V', ); - static final _setURLStreamHandlerFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - 'globalEnv_CallStaticVoidMethod') - .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + static final _setURLStreamHandlerFactory = + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallStaticVoidMethod') + .asFunction< + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory uRLStreamHandlerFactory) + /// from: `static public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory uRLStreamHandlerFactory)` static void setURLStreamHandlerFactory( - jni.JObject uRLStreamHandlerFactory, + _$jni.JObject uRLStreamHandlerFactory, ) { _setURLStreamHandlerFactory( _class.reference.pointer, - _id_setURLStreamHandlerFactory as jni.JMethodIDPtr, + _id_setURLStreamHandlerFactory as _$jni.JMethodIDPtr, uRLStreamHandlerFactory.reference.pointer) .check(); } } -final class $URLType extends jni.JObjType { - const $URLType(); +final class $URL$Type extends _$jni.JObjType { + @_$jni.internal + const $URL$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Ljava/net/URL;'; - @override - URL fromReference(jni.JReference reference) => URL.fromReference(reference); + @_$jni.internal + @_$core.override + URL fromReference(_$jni.JReference reference) => URL.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($URLType).hashCode; + @_$core.override + int get hashCode => ($URL$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($URLType) && other is $URLType; + return other.runtimeType == ($URL$Type) && other is $URL$Type; } } -/// from: java.util.concurrent.Executors -class Executors extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `java.util.concurrent.Executors` +class Executors extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Executors.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'java/util/concurrent/Executors'); + static final _class = _$jni.JClass.forName(r'java/util/concurrent/Executors'); /// The type which includes information such as the signature of this class. - static const type = $ExecutorsType(); + static const type = $Executors$Type(); static final _id_newFixedThreadPool = _class.staticMethodId( r'newFixedThreadPool', r'(I)Ljava/util/concurrent/ExecutorService;', ); - static final _newFixedThreadPool = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallStaticObjectMethod') + static final _newFixedThreadPool = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.VarArgs<(_$jni.Int32,)>)>>( + 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: static public java.util.concurrent.ExecutorService newFixedThreadPool(int i) + /// from: `static public java.util.concurrent.ExecutorService newFixedThreadPool(int i)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newFixedThreadPool( + static _$jni.JObject newFixedThreadPool( int i, ) { return _newFixedThreadPool(_class.reference.pointer, - _id_newFixedThreadPool as jni.JMethodIDPtr, i) - .object(const jni.JObjectType()); + _id_newFixedThreadPool as _$jni.JMethodIDPtr, i) + .object(const _$jni.JObjectType()); } static final _id_newWorkStealingPool = _class.staticMethodId( @@ -1569,77 +1663,79 @@ class Executors extends jni.JObject { r'(I)Ljava/util/concurrent/ExecutorService;', ); - static final _newWorkStealingPool = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallStaticObjectMethod') + static final _newWorkStealingPool = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.VarArgs<(_$jni.Int32,)>)>>( + 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: static public java.util.concurrent.ExecutorService newWorkStealingPool(int i) + /// from: `static public java.util.concurrent.ExecutorService newWorkStealingPool(int i)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newWorkStealingPool( + static _$jni.JObject newWorkStealingPool( int i, ) { return _newWorkStealingPool(_class.reference.pointer, - _id_newWorkStealingPool as jni.JMethodIDPtr, i) - .object(const jni.JObjectType()); + _id_newWorkStealingPool as _$jni.JMethodIDPtr, i) + .object(const _$jni.JObjectType()); } - static final _id_newWorkStealingPool1 = _class.staticMethodId( + static final _id_newWorkStealingPool$1 = _class.staticMethodId( r'newWorkStealingPool', r'()Ljava/util/concurrent/ExecutorService;', ); - static final _newWorkStealingPool1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _newWorkStealingPool$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: static public java.util.concurrent.ExecutorService newWorkStealingPool() + /// from: `static public java.util.concurrent.ExecutorService newWorkStealingPool()` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newWorkStealingPool1() { - return _newWorkStealingPool1(_class.reference.pointer, - _id_newWorkStealingPool1 as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + static _$jni.JObject newWorkStealingPool$1() { + return _newWorkStealingPool$1(_class.reference.pointer, + _id_newWorkStealingPool$1 as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } - static final _id_newFixedThreadPool1 = _class.staticMethodId( + static final _id_newFixedThreadPool$1 = _class.staticMethodId( r'newFixedThreadPool', r'(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;', ); - static final _newFixedThreadPool1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<($Int32, ffi.Pointer)>)>>( + static final _newFixedThreadPool$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Int32, _$jni.Pointer<_$jni.Void>)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.ExecutorService newFixedThreadPool(int i, java.util.concurrent.ThreadFactory threadFactory) + /// from: `static public java.util.concurrent.ExecutorService newFixedThreadPool(int i, java.util.concurrent.ThreadFactory threadFactory)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newFixedThreadPool1( + static _$jni.JObject newFixedThreadPool$1( int i, - jni.JObject threadFactory, + _$jni.JObject threadFactory, ) { - return _newFixedThreadPool1( + return _newFixedThreadPool$1( _class.reference.pointer, - _id_newFixedThreadPool1 as jni.JMethodIDPtr, + _id_newFixedThreadPool$1 as _$jni.JMethodIDPtr, i, threadFactory.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } static final _id_newSingleThreadExecutor = _class.staticMethodId( @@ -1647,52 +1743,52 @@ class Executors extends jni.JObject { r'()Ljava/util/concurrent/ExecutorService;', ); - static final _newSingleThreadExecutor = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _newSingleThreadExecutor = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: static public java.util.concurrent.ExecutorService newSingleThreadExecutor() + /// from: `static public java.util.concurrent.ExecutorService newSingleThreadExecutor()` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newSingleThreadExecutor() { + static _$jni.JObject newSingleThreadExecutor() { return _newSingleThreadExecutor(_class.reference.pointer, - _id_newSingleThreadExecutor as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _id_newSingleThreadExecutor as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } - static final _id_newSingleThreadExecutor1 = _class.staticMethodId( + static final _id_newSingleThreadExecutor$1 = _class.staticMethodId( r'newSingleThreadExecutor', r'(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;', ); - static final _newSingleThreadExecutor1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _newSingleThreadExecutor$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.ExecutorService newSingleThreadExecutor(java.util.concurrent.ThreadFactory threadFactory) + /// from: `static public java.util.concurrent.ExecutorService newSingleThreadExecutor(java.util.concurrent.ThreadFactory threadFactory)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newSingleThreadExecutor1( - jni.JObject threadFactory, + static _$jni.JObject newSingleThreadExecutor$1( + _$jni.JObject threadFactory, ) { - return _newSingleThreadExecutor1( + return _newSingleThreadExecutor$1( _class.reference.pointer, - _id_newSingleThreadExecutor1 as jni.JMethodIDPtr, + _id_newSingleThreadExecutor$1 as _$jni.JMethodIDPtr, threadFactory.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } static final _id_newCachedThreadPool = _class.staticMethodId( @@ -1700,52 +1796,52 @@ class Executors extends jni.JObject { r'()Ljava/util/concurrent/ExecutorService;', ); - static final _newCachedThreadPool = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _newCachedThreadPool = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: static public java.util.concurrent.ExecutorService newCachedThreadPool() + /// from: `static public java.util.concurrent.ExecutorService newCachedThreadPool()` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newCachedThreadPool() { + static _$jni.JObject newCachedThreadPool() { return _newCachedThreadPool(_class.reference.pointer, - _id_newCachedThreadPool as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _id_newCachedThreadPool as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } - static final _id_newCachedThreadPool1 = _class.staticMethodId( + static final _id_newCachedThreadPool$1 = _class.staticMethodId( r'newCachedThreadPool', r'(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ExecutorService;', ); - static final _newCachedThreadPool1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _newCachedThreadPool$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.ExecutorService newCachedThreadPool(java.util.concurrent.ThreadFactory threadFactory) + /// from: `static public java.util.concurrent.ExecutorService newCachedThreadPool(java.util.concurrent.ThreadFactory threadFactory)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newCachedThreadPool1( - jni.JObject threadFactory, + static _$jni.JObject newCachedThreadPool$1( + _$jni.JObject threadFactory, ) { - return _newCachedThreadPool1( + return _newCachedThreadPool$1( _class.reference.pointer, - _id_newCachedThreadPool1 as jni.JMethodIDPtr, + _id_newCachedThreadPool$1 as _$jni.JMethodIDPtr, threadFactory.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } static final _id_newSingleThreadScheduledExecutor = _class.staticMethodId( @@ -1754,53 +1850,53 @@ class Executors extends jni.JObject { ); static final _newSingleThreadScheduledExecutor = - ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: static public java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor() + /// from: `static public java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor()` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newSingleThreadScheduledExecutor() { + static _$jni.JObject newSingleThreadScheduledExecutor() { return _newSingleThreadScheduledExecutor(_class.reference.pointer, - _id_newSingleThreadScheduledExecutor as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _id_newSingleThreadScheduledExecutor as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } - static final _id_newSingleThreadScheduledExecutor1 = _class.staticMethodId( + static final _id_newSingleThreadScheduledExecutor$1 = _class.staticMethodId( r'newSingleThreadScheduledExecutor', r'(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;', ); - static final _newSingleThreadScheduledExecutor1 = - ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _newSingleThreadScheduledExecutor$1 = + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory threadFactory) + /// from: `static public java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory threadFactory)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newSingleThreadScheduledExecutor1( - jni.JObject threadFactory, + static _$jni.JObject newSingleThreadScheduledExecutor$1( + _$jni.JObject threadFactory, ) { - return _newSingleThreadScheduledExecutor1( + return _newSingleThreadScheduledExecutor$1( _class.reference.pointer, - _id_newSingleThreadScheduledExecutor1 as jni.JMethodIDPtr, + _id_newSingleThreadScheduledExecutor$1 as _$jni.JMethodIDPtr, threadFactory.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } static final _id_newScheduledThreadPool = _class.staticMethodId( @@ -1808,52 +1904,54 @@ class Executors extends jni.JObject { r'(I)Ljava/util/concurrent/ScheduledExecutorService;', ); - static final _newScheduledThreadPool = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallStaticObjectMethod') + static final _newScheduledThreadPool = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.VarArgs<(_$jni.Int32,)>)>>( + 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: static public java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int i) + /// from: `static public java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int i)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newScheduledThreadPool( + static _$jni.JObject newScheduledThreadPool( int i, ) { return _newScheduledThreadPool(_class.reference.pointer, - _id_newScheduledThreadPool as jni.JMethodIDPtr, i) - .object(const jni.JObjectType()); + _id_newScheduledThreadPool as _$jni.JMethodIDPtr, i) + .object(const _$jni.JObjectType()); } - static final _id_newScheduledThreadPool1 = _class.staticMethodId( + static final _id_newScheduledThreadPool$1 = _class.staticMethodId( r'newScheduledThreadPool', r'(ILjava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;', ); - static final _newScheduledThreadPool1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<($Int32, ffi.Pointer)>)>>( + static final _newScheduledThreadPool$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Int32, _$jni.Pointer<_$jni.Void>)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int i, java.util.concurrent.ThreadFactory threadFactory) + /// from: `static public java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int i, java.util.concurrent.ThreadFactory threadFactory)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject newScheduledThreadPool1( + static _$jni.JObject newScheduledThreadPool$1( int i, - jni.JObject threadFactory, + _$jni.JObject threadFactory, ) { - return _newScheduledThreadPool1( + return _newScheduledThreadPool$1( _class.reference.pointer, - _id_newScheduledThreadPool1 as jni.JMethodIDPtr, + _id_newScheduledThreadPool$1 as _$jni.JMethodIDPtr, i, threadFactory.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } static final _id_unconfigurableExecutorService = _class.staticMethodId( @@ -1861,27 +1959,28 @@ class Executors extends jni.JObject { r'(Ljava/util/concurrent/ExecutorService;)Ljava/util/concurrent/ExecutorService;', ); - static final _unconfigurableExecutorService = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - 'globalEnv_CallStaticObjectMethod') - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + static final _unconfigurableExecutorService = + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallStaticObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.ExecutorService unconfigurableExecutorService(java.util.concurrent.ExecutorService executorService) + /// from: `static public java.util.concurrent.ExecutorService unconfigurableExecutorService(java.util.concurrent.ExecutorService executorService)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject unconfigurableExecutorService( - jni.JObject executorService, + static _$jni.JObject unconfigurableExecutorService( + _$jni.JObject executorService, ) { return _unconfigurableExecutorService( _class.reference.pointer, - _id_unconfigurableExecutorService as jni.JMethodIDPtr, + _id_unconfigurableExecutorService as _$jni.JMethodIDPtr, executorService.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } static final _id_unconfigurableScheduledExecutorService = @@ -1891,27 +1990,27 @@ class Executors extends jni.JObject { ); static final _unconfigurableScheduledExecutorService = - ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.ScheduledExecutorService unconfigurableScheduledExecutorService(java.util.concurrent.ScheduledExecutorService scheduledExecutorService) + /// from: `static public java.util.concurrent.ScheduledExecutorService unconfigurableScheduledExecutorService(java.util.concurrent.ScheduledExecutorService scheduledExecutorService)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject unconfigurableScheduledExecutorService( - jni.JObject scheduledExecutorService, + static _$jni.JObject unconfigurableScheduledExecutorService( + _$jni.JObject scheduledExecutorService, ) { return _unconfigurableScheduledExecutorService( _class.reference.pointer, - _id_unconfigurableScheduledExecutorService as jni.JMethodIDPtr, + _id_unconfigurableScheduledExecutorService as _$jni.JMethodIDPtr, scheduledExecutorService.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } static final _id_defaultThreadFactory = _class.staticMethodId( @@ -1919,24 +2018,24 @@ class Executors extends jni.JObject { r'()Ljava/util/concurrent/ThreadFactory;', ); - static final _defaultThreadFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _defaultThreadFactory = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: static public java.util.concurrent.ThreadFactory defaultThreadFactory() + /// from: `static public java.util.concurrent.ThreadFactory defaultThreadFactory()` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject defaultThreadFactory() { + static _$jni.JObject defaultThreadFactory() { return _defaultThreadFactory(_class.reference.pointer, - _id_defaultThreadFactory as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _id_defaultThreadFactory as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_privilegedThreadFactory = _class.staticMethodId( @@ -1944,24 +2043,24 @@ class Executors extends jni.JObject { r'()Ljava/util/concurrent/ThreadFactory;', ); - static final _privilegedThreadFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _privilegedThreadFactory = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: static public java.util.concurrent.ThreadFactory privilegedThreadFactory() + /// from: `static public java.util.concurrent.ThreadFactory privilegedThreadFactory()` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject privilegedThreadFactory() { + static _$jni.JObject privilegedThreadFactory() { return _privilegedThreadFactory(_class.reference.pointer, - _id_privilegedThreadFactory as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _id_privilegedThreadFactory as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_callable = _class.staticMethodId( @@ -1969,115 +2068,121 @@ class Executors extends jni.JObject { r'(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Callable;', ); - static final _callable = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _callable = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.Callable callable(java.lang.Runnable runnable, T object) + /// from: `static public java.util.concurrent.Callable callable(java.lang.Runnable runnable, T object)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject callable<$T extends jni.JObject>( - jni.JObject runnable, + static _$jni.JObject callable<$T extends _$jni.JObject>( + _$jni.JObject runnable, $T object, { - jni.JObjType<$T>? T, + _$jni.JObjType<$T>? T, }) { - T ??= jni.lowestCommonSuperType([ + T ??= _$jni.lowestCommonSuperType([ object.$type, - ]) as jni.JObjType<$T>; - return _callable(_class.reference.pointer, _id_callable as jni.JMethodIDPtr, - runnable.reference.pointer, object.reference.pointer) - .object(const jni.JObjectType()); + ]) as _$jni.JObjType<$T>; + return _callable( + _class.reference.pointer, + _id_callable as _$jni.JMethodIDPtr, + runnable.reference.pointer, + object.reference.pointer) + .object(const _$jni.JObjectType()); } - static final _id_callable1 = _class.staticMethodId( + static final _id_callable$1 = _class.staticMethodId( r'callable', r'(Ljava/lang/Runnable;)Ljava/util/concurrent/Callable;', ); - static final _callable1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _callable$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.Callable callable(java.lang.Runnable runnable) + /// from: `static public java.util.concurrent.Callable callable(java.lang.Runnable runnable)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject callable1( - jni.JObject runnable, + static _$jni.JObject callable$1( + _$jni.JObject runnable, ) { - return _callable1(_class.reference.pointer, - _id_callable1 as jni.JMethodIDPtr, runnable.reference.pointer) - .object(const jni.JObjectType()); + return _callable$1(_class.reference.pointer, + _id_callable$1 as _$jni.JMethodIDPtr, runnable.reference.pointer) + .object(const _$jni.JObjectType()); } - static final _id_callable2 = _class.staticMethodId( + static final _id_callable$2 = _class.staticMethodId( r'callable', r'(Ljava/security/PrivilegedAction;)Ljava/util/concurrent/Callable;', ); - static final _callable2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _callable$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.Callable callable(java.security.PrivilegedAction privilegedAction) + /// from: `static public java.util.concurrent.Callable callable(java.security.PrivilegedAction privilegedAction)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject callable2( - jni.JObject privilegedAction, + static _$jni.JObject callable$2( + _$jni.JObject privilegedAction, ) { - return _callable2( + return _callable$2( _class.reference.pointer, - _id_callable2 as jni.JMethodIDPtr, + _id_callable$2 as _$jni.JMethodIDPtr, privilegedAction.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } - static final _id_callable3 = _class.staticMethodId( + static final _id_callable$3 = _class.staticMethodId( r'callable', r'(Ljava/security/PrivilegedExceptionAction;)Ljava/util/concurrent/Callable;', ); - static final _callable3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _callable$3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.Callable callable(java.security.PrivilegedExceptionAction privilegedExceptionAction) + /// from: `static public java.util.concurrent.Callable callable(java.security.PrivilegedExceptionAction privilegedExceptionAction)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject callable3( - jni.JObject privilegedExceptionAction, + static _$jni.JObject callable$3( + _$jni.JObject privilegedExceptionAction, ) { - return _callable3( + return _callable$3( _class.reference.pointer, - _id_callable3 as jni.JMethodIDPtr, + _id_callable$3 as _$jni.JMethodIDPtr, privilegedExceptionAction.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } static final _id_privilegedCallable = _class.staticMethodId( @@ -2085,28 +2190,28 @@ class Executors extends jni.JObject { r'(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Callable;', ); - static final _privilegedCallable = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _privilegedCallable = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.Callable privilegedCallable(java.util.concurrent.Callable callable) + /// from: `static public java.util.concurrent.Callable privilegedCallable(java.util.concurrent.Callable callable)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject privilegedCallable<$T extends jni.JObject>( - jni.JObject callable, { - required jni.JObjType<$T> T, + static _$jni.JObject privilegedCallable<$T extends _$jni.JObject>( + _$jni.JObject callable, { + required _$jni.JObjType<$T> T, }) { return _privilegedCallable( _class.reference.pointer, - _id_privilegedCallable as jni.JMethodIDPtr, + _id_privilegedCallable as _$jni.JMethodIDPtr, callable.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } static final _id_privilegedCallableUsingCurrentClassLoader = @@ -2116,232 +2221,216 @@ class Executors extends jni.JObject { ); static final _privilegedCallableUsingCurrentClassLoader = - ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.Callable privilegedCallableUsingCurrentClassLoader(java.util.concurrent.Callable callable) + /// from: `static public java.util.concurrent.Callable privilegedCallableUsingCurrentClassLoader(java.util.concurrent.Callable callable)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject - privilegedCallableUsingCurrentClassLoader<$T extends jni.JObject>( - jni.JObject callable, { - required jni.JObjType<$T> T, + static _$jni.JObject + privilegedCallableUsingCurrentClassLoader<$T extends _$jni.JObject>( + _$jni.JObject callable, { + required _$jni.JObjType<$T> T, }) { return _privilegedCallableUsingCurrentClassLoader( _class.reference.pointer, - _id_privilegedCallableUsingCurrentClassLoader as jni.JMethodIDPtr, + _id_privilegedCallableUsingCurrentClassLoader as _$jni.JMethodIDPtr, callable.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } } -final class $ExecutorsType extends jni.JObjType { - const $ExecutorsType(); +final class $Executors$Type extends _$jni.JObjType { + @_$jni.internal + const $Executors$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Ljava/util/concurrent/Executors;'; - @override - Executors fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Executors fromReference(_$jni.JReference reference) => Executors.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($ExecutorsType).hashCode; + @_$core.override + int get hashCode => ($Executors$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($ExecutorsType) && other is $ExecutorsType; + return other.runtimeType == ($Executors$Type) && other is $Executors$Type; } } -/// from: org.chromium.net.CronetEngine$Builder$LibraryLoader -class CronetEngine_Builder_LibraryLoader extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `org.chromium.net.CronetEngine$Builder$LibraryLoader` +class CronetEngine_Builder_LibraryLoader extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal CronetEngine_Builder_LibraryLoader.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName( + static final _class = _$jni.JClass.forName( r'org/chromium/net/CronetEngine$Builder$LibraryLoader'); /// The type which includes information such as the signature of this class. - static const type = $CronetEngine_Builder_LibraryLoaderType(); - static final _id_new0 = _class.constructorId( - r'()V', - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>('globalEnv_NewObject') - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory CronetEngine_Builder_LibraryLoader() { - return CronetEngine_Builder_LibraryLoader.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - + static const type = $CronetEngine_Builder_LibraryLoader$Type(); static final _id_loadLibrary = _class.instanceMethodId( r'loadLibrary', r'(Ljava/lang/String;)V', ); - static final _loadLibrary = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _loadLibrary = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void loadLibrary(java.lang.String string) + /// from: `public abstract void loadLibrary(java.lang.String string)` void loadLibrary( - jni.JString string, + _$jni.JString string, ) { - _loadLibrary(reference.pointer, _id_loadLibrary as jni.JMethodIDPtr, + _loadLibrary(reference.pointer, _id_loadLibrary as _$jni.JMethodIDPtr, string.reference.pointer) .check(); } } -final class $CronetEngine_Builder_LibraryLoaderType - extends jni.JObjType { - const $CronetEngine_Builder_LibraryLoaderType(); +final class $CronetEngine_Builder_LibraryLoader$Type + extends _$jni.JObjType { + @_$jni.internal + const $CronetEngine_Builder_LibraryLoader$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;'; - @override - CronetEngine_Builder_LibraryLoader fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + CronetEngine_Builder_LibraryLoader fromReference( + _$jni.JReference reference) => CronetEngine_Builder_LibraryLoader.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($CronetEngine_Builder_LibraryLoaderType).hashCode; + @_$core.override + int get hashCode => ($CronetEngine_Builder_LibraryLoader$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($CronetEngine_Builder_LibraryLoaderType) && - other is $CronetEngine_Builder_LibraryLoaderType; + return other.runtimeType == ($CronetEngine_Builder_LibraryLoader$Type) && + other is $CronetEngine_Builder_LibraryLoader$Type; } } -/// from: org.chromium.net.CronetEngine$Builder -class CronetEngine_Builder extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `org.chromium.net.CronetEngine$Builder` +class CronetEngine_Builder extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal CronetEngine_Builder.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'org/chromium/net/CronetEngine$Builder'); + _$jni.JClass.forName(r'org/chromium/net/CronetEngine$Builder'); /// The type which includes information such as the signature of this class. - static const type = $CronetEngine_BuilderType(); - static final _id_mBuilderDelegate = _class.instanceFieldId( - r'mBuilderDelegate', - r'Lorg/chromium/net/ICronetEngineBuilder;', - ); + static const type = $CronetEngine_Builder$Type(); - /// from: protected final org.chromium.net.ICronetEngineBuilder mBuilderDelegate - /// The returned object must be released after use, by calling the [release] method. - jni.JObject get mBuilderDelegate => - _id_mBuilderDelegate.get(this, const jni.JObjectType()); - - /// from: static public final int HTTP_CACHE_DISABLED + /// from: `static public final int HTTP_CACHE_DISABLED` static const HTTP_CACHE_DISABLED = 0; - /// from: static public final int HTTP_CACHE_IN_MEMORY + /// from: `static public final int HTTP_CACHE_IN_MEMORY` static const HTTP_CACHE_IN_MEMORY = 1; - /// from: static public final int HTTP_CACHE_DISK_NO_HTTP + /// from: `static public final int HTTP_CACHE_DISK_NO_HTTP` static const HTTP_CACHE_DISK_NO_HTTP = 2; - /// from: static public final int HTTP_CACHE_DISK + /// from: `static public final int HTTP_CACHE_DISK` static const HTTP_CACHE_DISK = 3; - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'(Landroid/content/Context;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (android.content.Context context) + /// from: `public void (android.content.Context context)` /// The returned object must be released after use, by calling the [release] method. factory CronetEngine_Builder( - jni.JObject context, + _$jni.JObject context, ) { - return CronetEngine_Builder.fromReference(_new0(_class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, context.reference.pointer) + return CronetEngine_Builder.fromReference(_new$(_class.reference.pointer, + _id_new$ as _$jni.JMethodIDPtr, context.reference.pointer) .reference); } - static final _id_new1 = _class.constructorId( + static final _id_new$1 = _class.constructorId( r'(Lorg/chromium/net/ICronetEngineBuilder;)V', ); - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (org.chromium.net.ICronetEngineBuilder iCronetEngineBuilder) + /// from: `public void (org.chromium.net.ICronetEngineBuilder iCronetEngineBuilder)` /// The returned object must be released after use, by calling the [release] method. - factory CronetEngine_Builder.new1( - jni.JObject iCronetEngineBuilder, + factory CronetEngine_Builder.new$1( + _$jni.JObject iCronetEngineBuilder, ) { - return CronetEngine_Builder.fromReference(_new1( + return CronetEngine_Builder.fromReference(_new$1( _class.reference.pointer, - _id_new1 as jni.JMethodIDPtr, + _id_new$1 as _$jni.JMethodIDPtr, iCronetEngineBuilder.reference.pointer) .reference); } @@ -2351,24 +2440,24 @@ class CronetEngine_Builder extends jni.JObject { r'()Ljava/lang/String;', ); - static final _getDefaultUserAgent = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getDefaultUserAgent = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String getDefaultUserAgent() + /// from: `public java.lang.String getDefaultUserAgent()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getDefaultUserAgent() { + _$jni.JString getDefaultUserAgent() { return _getDefaultUserAgent( - reference.pointer, _id_getDefaultUserAgent as jni.JMethodIDPtr) - .object(const jni.JStringType()); + reference.pointer, _id_getDefaultUserAgent as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_setUserAgent = _class.instanceMethodId( @@ -2376,25 +2465,25 @@ class CronetEngine_Builder extends jni.JObject { r'(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;', ); - static final _setUserAgent = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _setUserAgent = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public org.chromium.net.CronetEngine$Builder setUserAgent(java.lang.String string) + /// from: `public org.chromium.net.CronetEngine$Builder setUserAgent(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder setUserAgent( - jni.JString string, + _$jni.JString string, ) { return _setUserAgent(reference.pointer, - _id_setUserAgent as jni.JMethodIDPtr, string.reference.pointer) - .object(const $CronetEngine_BuilderType()); + _id_setUserAgent as _$jni.JMethodIDPtr, string.reference.pointer) + .object(const $CronetEngine_Builder$Type()); } static final _id_setStoragePath = _class.instanceMethodId( @@ -2402,25 +2491,25 @@ class CronetEngine_Builder extends jni.JObject { r'(Ljava/lang/String;)Lorg/chromium/net/CronetEngine$Builder;', ); - static final _setStoragePath = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _setStoragePath = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public org.chromium.net.CronetEngine$Builder setStoragePath(java.lang.String string) + /// from: `public org.chromium.net.CronetEngine$Builder setStoragePath(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder setStoragePath( - jni.JString string, + _$jni.JString string, ) { return _setStoragePath(reference.pointer, - _id_setStoragePath as jni.JMethodIDPtr, string.reference.pointer) - .object(const $CronetEngine_BuilderType()); + _id_setStoragePath as _$jni.JMethodIDPtr, string.reference.pointer) + .object(const $CronetEngine_Builder$Type()); } static final _id_setLibraryLoader = _class.instanceMethodId( @@ -2428,27 +2517,27 @@ class CronetEngine_Builder extends jni.JObject { r'(Lorg/chromium/net/CronetEngine$Builder$LibraryLoader;)Lorg/chromium/net/CronetEngine$Builder;', ); - static final _setLibraryLoader = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _setLibraryLoader = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public org.chromium.net.CronetEngine$Builder setLibraryLoader(org.chromium.net.CronetEngine$Builder$LibraryLoader libraryLoader) + /// from: `public org.chromium.net.CronetEngine$Builder setLibraryLoader(org.chromium.net.CronetEngine$Builder$LibraryLoader libraryLoader)` /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder setLibraryLoader( CronetEngine_Builder_LibraryLoader libraryLoader, ) { return _setLibraryLoader( reference.pointer, - _id_setLibraryLoader as jni.JMethodIDPtr, + _id_setLibraryLoader as _$jni.JMethodIDPtr, libraryLoader.reference.pointer) - .object(const $CronetEngine_BuilderType()); + .object(const $CronetEngine_Builder$Type()); } static final _id_enableQuic = _class.instanceMethodId( @@ -2456,22 +2545,24 @@ class CronetEngine_Builder extends jni.JObject { r'(Z)Lorg/chromium/net/CronetEngine$Builder;', ); - static final _enableQuic = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + static final _enableQuic = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public org.chromium.net.CronetEngine$Builder enableQuic(boolean z) + /// from: `public org.chromium.net.CronetEngine$Builder enableQuic(boolean z)` /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableQuic( bool z, ) { return _enableQuic( - reference.pointer, _id_enableQuic as jni.JMethodIDPtr, z ? 1 : 0) - .object(const $CronetEngine_BuilderType()); + reference.pointer, _id_enableQuic as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(const $CronetEngine_Builder$Type()); } static final _id_enableHttp2 = _class.instanceMethodId( @@ -2479,22 +2570,24 @@ class CronetEngine_Builder extends jni.JObject { r'(Z)Lorg/chromium/net/CronetEngine$Builder;', ); - static final _enableHttp2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + static final _enableHttp2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public org.chromium.net.CronetEngine$Builder enableHttp2(boolean z) + /// from: `public org.chromium.net.CronetEngine$Builder enableHttp2(boolean z)` /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableHttp2( bool z, ) { return _enableHttp2( - reference.pointer, _id_enableHttp2 as jni.JMethodIDPtr, z ? 1 : 0) - .object(const $CronetEngine_BuilderType()); + reference.pointer, _id_enableHttp2 as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(const $CronetEngine_Builder$Type()); } static final _id_enableSdch = _class.instanceMethodId( @@ -2502,22 +2595,24 @@ class CronetEngine_Builder extends jni.JObject { r'(Z)Lorg/chromium/net/CronetEngine$Builder;', ); - static final _enableSdch = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + static final _enableSdch = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public org.chromium.net.CronetEngine$Builder enableSdch(boolean z) + /// from: `public org.chromium.net.CronetEngine$Builder enableSdch(boolean z)` /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableSdch( bool z, ) { return _enableSdch( - reference.pointer, _id_enableSdch as jni.JMethodIDPtr, z ? 1 : 0) - .object(const $CronetEngine_BuilderType()); + reference.pointer, _id_enableSdch as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(const $CronetEngine_Builder$Type()); } static final _id_enableBrotli = _class.instanceMethodId( @@ -2525,22 +2620,24 @@ class CronetEngine_Builder extends jni.JObject { r'(Z)Lorg/chromium/net/CronetEngine$Builder;', ); - static final _enableBrotli = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + static final _enableBrotli = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public org.chromium.net.CronetEngine$Builder enableBrotli(boolean z) + /// from: `public org.chromium.net.CronetEngine$Builder enableBrotli(boolean z)` /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableBrotli( bool z, ) { - return _enableBrotli( - reference.pointer, _id_enableBrotli as jni.JMethodIDPtr, z ? 1 : 0) - .object(const $CronetEngine_BuilderType()); + return _enableBrotli(reference.pointer, + _id_enableBrotli as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(const $CronetEngine_Builder$Type()); } static final _id_enableHttpCache = _class.instanceMethodId( @@ -2548,24 +2645,26 @@ class CronetEngine_Builder extends jni.JObject { r'(IJ)Lorg/chromium/net/CronetEngine$Builder;', ); - static final _enableHttpCache = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, - jni.JMethodIDPtr, ffi.VarArgs<($Int32, ffi.Int64)>)>>( + static final _enableHttpCache = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32, _$jni.Int64)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int, int)>(); - /// from: public org.chromium.net.CronetEngine$Builder enableHttpCache(int i, long j) + /// from: `public org.chromium.net.CronetEngine$Builder enableHttpCache(int i, long j)` /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enableHttpCache( int i, int j, ) { return _enableHttpCache( - reference.pointer, _id_enableHttpCache as jni.JMethodIDPtr, i, j) - .object(const $CronetEngine_BuilderType()); + reference.pointer, _id_enableHttpCache as _$jni.JMethodIDPtr, i, j) + .object(const $CronetEngine_Builder$Type()); } static final _id_addQuicHint = _class.instanceMethodId( @@ -2573,27 +2672,35 @@ class CronetEngine_Builder extends jni.JObject { r'(Ljava/lang/String;II)Lorg/chromium/net/CronetEngine$Builder;', ); - static final _addQuicHint = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( - 'globalEnv_CallObjectMethod') + static final _addQuicHint = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32 + )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int, int)>(); - /// from: public org.chromium.net.CronetEngine$Builder addQuicHint(java.lang.String string, int i, int i1) + /// from: `public org.chromium.net.CronetEngine$Builder addQuicHint(java.lang.String string, int i, int i1)` /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder addQuicHint( - jni.JString string, + _$jni.JString string, int i, int i1, ) { - return _addQuicHint(reference.pointer, _id_addQuicHint as jni.JMethodIDPtr, - string.reference.pointer, i, i1) - .object(const $CronetEngine_BuilderType()); + return _addQuicHint( + reference.pointer, + _id_addQuicHint as _$jni.JMethodIDPtr, + string.reference.pointer, + i, + i1) + .object(const $CronetEngine_Builder$Type()); } static final _id_addPublicKeyPins = _class.instanceMethodId( @@ -2601,43 +2708,43 @@ class CronetEngine_Builder extends jni.JObject { r'(Ljava/lang/String;Ljava/util/Set;ZLjava/util/Date;)Lorg/chromium/net/CronetEngine$Builder;', ); - static final _addPublicKeyPins = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _addPublicKeyPins = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - $Int32, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, int, - ffi.Pointer)>(); + _$jni.Pointer<_$jni.Void>)>(); - /// from: public org.chromium.net.CronetEngine$Builder addPublicKeyPins(java.lang.String string, java.util.Set set, boolean z, java.util.Date date) + /// from: `public org.chromium.net.CronetEngine$Builder addPublicKeyPins(java.lang.String string, java.util.Set set, boolean z, java.util.Date date)` /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder addPublicKeyPins( - jni.JString string, - jni.JSet> set0, + _$jni.JString string, + _$jni.JSet<_$jni.JArray<_$jni.jbyte>> set, bool z, - jni.JObject date, + _$jni.JObject date, ) { return _addPublicKeyPins( reference.pointer, - _id_addPublicKeyPins as jni.JMethodIDPtr, + _id_addPublicKeyPins as _$jni.JMethodIDPtr, string.reference.pointer, - set0.reference.pointer, + set.reference.pointer, z ? 1 : 0, date.reference.pointer) - .object(const $CronetEngine_BuilderType()); + .object(const $CronetEngine_Builder$Type()); } static final _id_enablePublicKeyPinningBypassForLocalTrustAnchors = @@ -2647,17 +2754,16 @@ class CronetEngine_Builder extends jni.JObject { ); static final _enablePublicKeyPinningBypassForLocalTrustAnchors = - ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.VarArgs<(_$jni.Int32,)>)>>( + 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public org.chromium.net.CronetEngine$Builder enablePublicKeyPinningBypassForLocalTrustAnchors(boolean z) + /// from: `public org.chromium.net.CronetEngine$Builder enablePublicKeyPinningBypassForLocalTrustAnchors(boolean z)` /// The returned object must be released after use, by calling the [release] method. CronetEngine_Builder enablePublicKeyPinningBypassForLocalTrustAnchors( bool z, @@ -2665,9 +2771,9 @@ class CronetEngine_Builder extends jni.JObject { return _enablePublicKeyPinningBypassForLocalTrustAnchors( reference.pointer, _id_enablePublicKeyPinningBypassForLocalTrustAnchors - as jni.JMethodIDPtr, + as _$jni.JMethodIDPtr, z ? 1 : 0) - .object(const $CronetEngine_BuilderType()); + .object(const $CronetEngine_Builder$Type()); } static final _id_build = _class.instanceMethodId( @@ -2675,113 +2781,97 @@ class CronetEngine_Builder extends jni.JObject { r'()Lorg/chromium/net/CronetEngine;', ); - static final _build = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _build = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public org.chromium.net.CronetEngine build() + /// from: `public org.chromium.net.CronetEngine build()` /// The returned object must be released after use, by calling the [release] method. CronetEngine build() { - return _build(reference.pointer, _id_build as jni.JMethodIDPtr) - .object(const $CronetEngineType()); + return _build(reference.pointer, _id_build as _$jni.JMethodIDPtr) + .object(const $CronetEngine$Type()); } } -final class $CronetEngine_BuilderType - extends jni.JObjType { - const $CronetEngine_BuilderType(); +final class $CronetEngine_Builder$Type + extends _$jni.JObjType { + @_$jni.internal + const $CronetEngine_Builder$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lorg/chromium/net/CronetEngine$Builder;'; - @override - CronetEngine_Builder fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + CronetEngine_Builder fromReference(_$jni.JReference reference) => CronetEngine_Builder.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($CronetEngine_BuilderType).hashCode; + @_$core.override + int get hashCode => ($CronetEngine_Builder$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($CronetEngine_BuilderType) && - other is $CronetEngine_BuilderType; + return other.runtimeType == ($CronetEngine_Builder$Type) && + other is $CronetEngine_Builder$Type; } } -/// from: org.chromium.net.CronetEngine -class CronetEngine extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `org.chromium.net.CronetEngine` +class CronetEngine extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal CronetEngine.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'org/chromium/net/CronetEngine'); + static final _class = _$jni.JClass.forName(r'org/chromium/net/CronetEngine'); /// The type which includes information such as the signature of this class. - static const type = $CronetEngineType(); - static final _id_new0 = _class.constructorId( - r'()V', - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>('globalEnv_NewObject') - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory CronetEngine() { - return CronetEngine.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - + static const type = $CronetEngine$Type(); static final _id_getVersionString = _class.instanceMethodId( r'getVersionString', r'()Ljava/lang/String;', ); - static final _getVersionString = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getVersionString = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract java.lang.String getVersionString() + /// from: `public abstract java.lang.String getVersionString()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getVersionString() { + _$jni.JString getVersionString() { return _getVersionString( - reference.pointer, _id_getVersionString as jni.JMethodIDPtr) - .object(const jni.JStringType()); + reference.pointer, _id_getVersionString as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_shutdown = _class.instanceMethodId( @@ -2789,21 +2879,21 @@ class CronetEngine extends jni.JObject { r'()V', ); - static final _shutdown = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _shutdown = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract void shutdown() + /// from: `public abstract void shutdown()` void shutdown() { - _shutdown(reference.pointer, _id_shutdown as jni.JMethodIDPtr).check(); + _shutdown(reference.pointer, _id_shutdown as _$jni.JMethodIDPtr).check(); } static final _id_startNetLogToFile = _class.instanceMethodId( @@ -2811,25 +2901,26 @@ class CronetEngine extends jni.JObject { r'(Ljava/lang/String;Z)V', ); - static final _startNetLogToFile = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + static final _startNetLogToFile = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Pointer<_$jni.Void>, _$jni.Int32)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int)>(); - /// from: public abstract void startNetLogToFile(java.lang.String string, boolean z) + /// from: `public abstract void startNetLogToFile(java.lang.String string, boolean z)` void startNetLogToFile( - jni.JString string, + _$jni.JString string, bool z, ) { _startNetLogToFile( reference.pointer, - _id_startNetLogToFile as jni.JMethodIDPtr, + _id_startNetLogToFile as _$jni.JMethodIDPtr, string.reference.pointer, z ? 1 : 0) .check(); @@ -2840,21 +2931,22 @@ class CronetEngine extends jni.JObject { r'()V', ); - static final _stopNetLog = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _stopNetLog = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract void stopNetLog() + /// from: `public abstract void stopNetLog()` void stopNetLog() { - _stopNetLog(reference.pointer, _id_stopNetLog as jni.JMethodIDPtr).check(); + _stopNetLog(reference.pointer, _id_stopNetLog as _$jni.JMethodIDPtr) + .check(); } static final _id_getGlobalMetricsDeltas = _class.instanceMethodId( @@ -2862,24 +2954,24 @@ class CronetEngine extends jni.JObject { r'()[B', ); - static final _getGlobalMetricsDeltas = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getGlobalMetricsDeltas = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract byte[] getGlobalMetricsDeltas() + /// from: `public abstract byte[] getGlobalMetricsDeltas()` /// The returned object must be released after use, by calling the [release] method. - jni.JArray getGlobalMetricsDeltas() { + _$jni.JArray<_$jni.jbyte> getGlobalMetricsDeltas() { return _getGlobalMetricsDeltas( - reference.pointer, _id_getGlobalMetricsDeltas as jni.JMethodIDPtr) - .object(const jni.JArrayType(jni.jbyteType())); + reference.pointer, _id_getGlobalMetricsDeltas as _$jni.JMethodIDPtr) + .object(const _$jni.JArrayType(_$jni.jbyteType())); } static final _id_openConnection = _class.instanceMethodId( @@ -2887,25 +2979,25 @@ class CronetEngine extends jni.JObject { r'(Ljava/net/URL;)Ljava/net/URLConnection;', ); - static final _openConnection = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _openConnection = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract java.net.URLConnection openConnection(java.net.URL uRL) + /// from: `public abstract java.net.URLConnection openConnection(java.net.URL uRL)` /// The returned object must be released after use, by calling the [release] method. - jni.JObject openConnection( + _$jni.JObject openConnection( URL uRL, ) { return _openConnection(reference.pointer, - _id_openConnection as jni.JMethodIDPtr, uRL.reference.pointer) - .object(const jni.JObjectType()); + _id_openConnection as _$jni.JMethodIDPtr, uRL.reference.pointer) + .object(const _$jni.JObjectType()); } static final _id_createURLStreamHandlerFactory = _class.instanceMethodId( @@ -2913,24 +3005,25 @@ class CronetEngine extends jni.JObject { r'()Ljava/net/URLStreamHandlerFactory;', ); - static final _createURLStreamHandlerFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>('globalEnv_CallObjectMethod') - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); + static final _createURLStreamHandlerFactory = + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); - /// from: public abstract java.net.URLStreamHandlerFactory createURLStreamHandlerFactory() + /// from: `public abstract java.net.URLStreamHandlerFactory createURLStreamHandlerFactory()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject createURLStreamHandlerFactory() { + _$jni.JObject createURLStreamHandlerFactory() { return _createURLStreamHandlerFactory(reference.pointer, - _id_createURLStreamHandlerFactory as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _id_createURLStreamHandlerFactory as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_newUrlRequestBuilder = _class.instanceMethodId( @@ -2938,390 +3031,367 @@ class CronetEngine extends jni.JObject { r'(Ljava/lang/String;Lorg/chromium/net/UrlRequest$Callback;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;', ); - static final _newUrlRequestBuilder = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _newUrlRequestBuilder = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public abstract org.chromium.net.UrlRequest$Builder newUrlRequestBuilder(java.lang.String string, org.chromium.net.UrlRequest$Callback callback, java.util.concurrent.Executor executor) + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract org.chromium.net.UrlRequest$Builder newUrlRequestBuilder(java.lang.String string, org.chromium.net.UrlRequest$Callback callback, java.util.concurrent.Executor executor)` /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder newUrlRequestBuilder( - jni.JString string, + _$jni.JString string, UrlRequest_Callback callback, - jni.JObject executor, + _$jni.JObject executor, ) { return _newUrlRequestBuilder( reference.pointer, - _id_newUrlRequestBuilder as jni.JMethodIDPtr, + _id_newUrlRequestBuilder as _$jni.JMethodIDPtr, string.reference.pointer, callback.reference.pointer, executor.reference.pointer) - .object(const $UrlRequest_BuilderType()); + .object(const $UrlRequest_Builder$Type()); } } -final class $CronetEngineType extends jni.JObjType { - const $CronetEngineType(); +final class $CronetEngine$Type extends _$jni.JObjType { + @_$jni.internal + const $CronetEngine$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lorg/chromium/net/CronetEngine;'; - @override - CronetEngine fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + CronetEngine fromReference(_$jni.JReference reference) => CronetEngine.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($CronetEngineType).hashCode; + @_$core.override + int get hashCode => ($CronetEngine$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($CronetEngineType) && - other is $CronetEngineType; + return other.runtimeType == ($CronetEngine$Type) && + other is $CronetEngine$Type; } } -/// from: org.chromium.net.CronetException -class CronetException extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `org.chromium.net.CronetException` +class CronetException extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal CronetException.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'org/chromium/net/CronetException'); + static final _class = + _$jni.JClass.forName(r'org/chromium/net/CronetException'); /// The type which includes information such as the signature of this class. - static const type = $CronetExceptionType(); - static final _id_new0 = _class.constructorId( - r'(Ljava/lang/String;Ljava/lang/Throwable;)V', - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< - ( - ffi.Pointer, - ffi.Pointer - )>)>>('globalEnv_NewObject') - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); - - /// from: protected void (java.lang.String string, java.lang.Throwable throwable) - /// The returned object must be released after use, by calling the [release] method. - factory CronetException( - jni.JString string, - jni.JObject throwable, - ) { - return CronetException.fromReference(_new0( - _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, - string.reference.pointer, - throwable.reference.pointer) - .reference); - } + static const type = $CronetException$Type(); } -final class $CronetExceptionType extends jni.JObjType { - const $CronetExceptionType(); +final class $CronetException$Type extends _$jni.JObjType { + @_$jni.internal + const $CronetException$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lorg/chromium/net/CronetException;'; - @override - CronetException fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + CronetException fromReference(_$jni.JReference reference) => CronetException.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($CronetExceptionType).hashCode; + @_$core.override + int get hashCode => ($CronetException$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($CronetExceptionType) && - other is $CronetExceptionType; + return other.runtimeType == ($CronetException$Type) && + other is $CronetException$Type; } } -/// from: org.chromium.net.UploadDataProviders -class UploadDataProviders extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `org.chromium.net.UploadDataProviders` +class UploadDataProviders extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal UploadDataProviders.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'org/chromium/net/UploadDataProviders'); + _$jni.JClass.forName(r'org/chromium/net/UploadDataProviders'); /// The type which includes information such as the signature of this class. - static const type = $UploadDataProvidersType(); + static const type = $UploadDataProviders$Type(); static final _id_create = _class.staticMethodId( r'create', r'(Ljava/io/File;)Lorg/chromium/net/UploadDataProvider;', ); - static final _create = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _create = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public org.chromium.net.UploadDataProvider create(java.io.File file) + /// from: `static public org.chromium.net.UploadDataProvider create(java.io.File file)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject create( - jni.JObject file, + static _$jni.JObject create( + _$jni.JObject file, ) { - return _create(_class.reference.pointer, _id_create as jni.JMethodIDPtr, + return _create(_class.reference.pointer, _id_create as _$jni.JMethodIDPtr, file.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } - static final _id_create1 = _class.staticMethodId( + static final _id_create$1 = _class.staticMethodId( r'create', r'(Landroid/os/ParcelFileDescriptor;)Lorg/chromium/net/UploadDataProvider;', ); - static final _create1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _create$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public org.chromium.net.UploadDataProvider create(android.os.ParcelFileDescriptor parcelFileDescriptor) + /// from: `static public org.chromium.net.UploadDataProvider create(android.os.ParcelFileDescriptor parcelFileDescriptor)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject create1( - jni.JObject parcelFileDescriptor, + static _$jni.JObject create$1( + _$jni.JObject parcelFileDescriptor, ) { - return _create1(_class.reference.pointer, _id_create1 as jni.JMethodIDPtr, + return _create$1( + _class.reference.pointer, + _id_create$1 as _$jni.JMethodIDPtr, parcelFileDescriptor.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } - static final _id_create2 = _class.staticMethodId( + static final _id_create$2 = _class.staticMethodId( r'create', r'(Ljava/nio/ByteBuffer;)Lorg/chromium/net/UploadDataProvider;', ); - static final _create2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _create$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public org.chromium.net.UploadDataProvider create(java.nio.ByteBuffer byteBuffer) + /// from: `static public org.chromium.net.UploadDataProvider create(java.nio.ByteBuffer byteBuffer)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject create2( - jni.JByteBuffer byteBuffer, + static _$jni.JObject create$2( + _$jni.JByteBuffer byteBuffer, ) { - return _create2(_class.reference.pointer, _id_create2 as jni.JMethodIDPtr, - byteBuffer.reference.pointer) - .object(const jni.JObjectType()); + return _create$2(_class.reference.pointer, + _id_create$2 as _$jni.JMethodIDPtr, byteBuffer.reference.pointer) + .object(const _$jni.JObjectType()); } - static final _id_create3 = _class.staticMethodId( + static final _id_create$3 = _class.staticMethodId( r'create', r'([BII)Lorg/chromium/net/UploadDataProvider;', ); - static final _create3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( - 'globalEnv_CallStaticObjectMethod') + static final _create$3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32 + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int, int)>(); - /// from: static public org.chromium.net.UploadDataProvider create(byte[] bs, int i, int i1) + /// from: `static public org.chromium.net.UploadDataProvider create(byte[] bs, int i, int i1)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject create3( - jni.JArray bs, + static _$jni.JObject create$3( + _$jni.JArray<_$jni.jbyte> bs, int i, int i1, ) { - return _create3(_class.reference.pointer, _id_create3 as jni.JMethodIDPtr, - bs.reference.pointer, i, i1) - .object(const jni.JObjectType()); + return _create$3(_class.reference.pointer, + _id_create$3 as _$jni.JMethodIDPtr, bs.reference.pointer, i, i1) + .object(const _$jni.JObjectType()); } - static final _id_create4 = _class.staticMethodId( + static final _id_create$4 = _class.staticMethodId( r'create', r'([B)Lorg/chromium/net/UploadDataProvider;', ); - static final _create4 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _create$4 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public org.chromium.net.UploadDataProvider create(byte[] bs) + /// from: `static public org.chromium.net.UploadDataProvider create(byte[] bs)` /// The returned object must be released after use, by calling the [release] method. - static jni.JObject create4( - jni.JArray bs, + static _$jni.JObject create$4( + _$jni.JArray<_$jni.jbyte> bs, ) { - return _create4(_class.reference.pointer, _id_create4 as jni.JMethodIDPtr, - bs.reference.pointer) - .object(const jni.JObjectType()); + return _create$4(_class.reference.pointer, + _id_create$4 as _$jni.JMethodIDPtr, bs.reference.pointer) + .object(const _$jni.JObjectType()); } } -final class $UploadDataProvidersType extends jni.JObjType { - const $UploadDataProvidersType(); +final class $UploadDataProviders$Type + extends _$jni.JObjType { + @_$jni.internal + const $UploadDataProviders$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lorg/chromium/net/UploadDataProviders;'; - @override - UploadDataProviders fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + UploadDataProviders fromReference(_$jni.JReference reference) => UploadDataProviders.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($UploadDataProvidersType).hashCode; + @_$core.override + int get hashCode => ($UploadDataProviders$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($UploadDataProvidersType) && - other is $UploadDataProvidersType; + return other.runtimeType == ($UploadDataProviders$Type) && + other is $UploadDataProviders$Type; } } -/// from: org.chromium.net.UrlRequest$Builder -class UrlRequest_Builder extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `org.chromium.net.UrlRequest$Builder` +class UrlRequest_Builder extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal UrlRequest_Builder.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'org/chromium/net/UrlRequest$Builder'); + _$jni.JClass.forName(r'org/chromium/net/UrlRequest$Builder'); /// The type which includes information such as the signature of this class. - static const type = $UrlRequest_BuilderType(); + static const type = $UrlRequest_Builder$Type(); - /// from: static public final int REQUEST_PRIORITY_IDLE + /// from: `static public final int REQUEST_PRIORITY_IDLE` static const REQUEST_PRIORITY_IDLE = 0; - /// from: static public final int REQUEST_PRIORITY_LOWEST + /// from: `static public final int REQUEST_PRIORITY_LOWEST` static const REQUEST_PRIORITY_LOWEST = 1; - /// from: static public final int REQUEST_PRIORITY_LOW + /// from: `static public final int REQUEST_PRIORITY_LOW` static const REQUEST_PRIORITY_LOW = 2; - /// from: static public final int REQUEST_PRIORITY_MEDIUM + /// from: `static public final int REQUEST_PRIORITY_MEDIUM` static const REQUEST_PRIORITY_MEDIUM = 3; - /// from: static public final int REQUEST_PRIORITY_HIGHEST + /// from: `static public final int REQUEST_PRIORITY_HIGHEST` static const REQUEST_PRIORITY_HIGHEST = 4; - static final _id_new0 = _class.constructorId( - r'()V', - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>('globalEnv_NewObject') - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory UrlRequest_Builder() { - return UrlRequest_Builder.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - static final _id_setHttpMethod = _class.instanceMethodId( r'setHttpMethod', r'(Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;', ); - static final _setHttpMethod = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _setHttpMethod = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract org.chromium.net.UrlRequest$Builder setHttpMethod(java.lang.String string) + /// from: `public abstract org.chromium.net.UrlRequest$Builder setHttpMethod(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder setHttpMethod( - jni.JString string, + _$jni.JString string, ) { return _setHttpMethod(reference.pointer, - _id_setHttpMethod as jni.JMethodIDPtr, string.reference.pointer) - .object(const $UrlRequest_BuilderType()); + _id_setHttpMethod as _$jni.JMethodIDPtr, string.reference.pointer) + .object(const $UrlRequest_Builder$Type()); } static final _id_addHeader = _class.instanceMethodId( @@ -3329,29 +3399,32 @@ class UrlRequest_Builder extends jni.JObject { r'(Ljava/lang/String;Ljava/lang/String;)Lorg/chromium/net/UrlRequest$Builder;', ); - static final _addHeader = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _addHeader = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract org.chromium.net.UrlRequest$Builder addHeader(java.lang.String string, java.lang.String string1) + /// from: `public abstract org.chromium.net.UrlRequest$Builder addHeader(java.lang.String string, java.lang.String string1)` /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder addHeader( - jni.JString string, - jni.JString string1, + _$jni.JString string, + _$jni.JString string1, ) { - return _addHeader(reference.pointer, _id_addHeader as jni.JMethodIDPtr, + return _addHeader(reference.pointer, _id_addHeader as _$jni.JMethodIDPtr, string.reference.pointer, string1.reference.pointer) - .object(const $UrlRequest_BuilderType()); + .object(const $UrlRequest_Builder$Type()); } static final _id_disableCache = _class.instanceMethodId( @@ -3359,24 +3432,24 @@ class UrlRequest_Builder extends jni.JObject { r'()Lorg/chromium/net/UrlRequest$Builder;', ); - static final _disableCache = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _disableCache = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract org.chromium.net.UrlRequest$Builder disableCache() + /// from: `public abstract org.chromium.net.UrlRequest$Builder disableCache()` /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder disableCache() { return _disableCache( - reference.pointer, _id_disableCache as jni.JMethodIDPtr) - .object(const $UrlRequest_BuilderType()); + reference.pointer, _id_disableCache as _$jni.JMethodIDPtr) + .object(const $UrlRequest_Builder$Type()); } static final _id_setPriority = _class.instanceMethodId( @@ -3384,22 +3457,24 @@ class UrlRequest_Builder extends jni.JObject { r'(I)Lorg/chromium/net/UrlRequest$Builder;', ); - static final _setPriority = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + static final _setPriority = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public abstract org.chromium.net.UrlRequest$Builder setPriority(int i) + /// from: `public abstract org.chromium.net.UrlRequest$Builder setPriority(int i)` /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder setPriority( int i, ) { return _setPriority( - reference.pointer, _id_setPriority as jni.JMethodIDPtr, i) - .object(const $UrlRequest_BuilderType()); + reference.pointer, _id_setPriority as _$jni.JMethodIDPtr, i) + .object(const $UrlRequest_Builder$Type()); } static final _id_setUploadDataProvider = _class.instanceMethodId( @@ -3407,32 +3482,35 @@ class UrlRequest_Builder extends jni.JObject { r'(Lorg/chromium/net/UploadDataProvider;Ljava/util/concurrent/Executor;)Lorg/chromium/net/UrlRequest$Builder;', ); - static final _setUploadDataProvider = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _setUploadDataProvider = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract org.chromium.net.UrlRequest$Builder setUploadDataProvider(org.chromium.net.UploadDataProvider uploadDataProvider, java.util.concurrent.Executor executor) + /// from: `public abstract org.chromium.net.UrlRequest$Builder setUploadDataProvider(org.chromium.net.UploadDataProvider uploadDataProvider, java.util.concurrent.Executor executor)` /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder setUploadDataProvider( - jni.JObject uploadDataProvider, - jni.JObject executor, + _$jni.JObject uploadDataProvider, + _$jni.JObject executor, ) { return _setUploadDataProvider( reference.pointer, - _id_setUploadDataProvider as jni.JMethodIDPtr, + _id_setUploadDataProvider as _$jni.JMethodIDPtr, uploadDataProvider.reference.pointer, executor.reference.pointer) - .object(const $UrlRequest_BuilderType()); + .object(const $UrlRequest_Builder$Type()); } static final _id_allowDirectExecutor = _class.instanceMethodId( @@ -3440,24 +3518,24 @@ class UrlRequest_Builder extends jni.JObject { r'()Lorg/chromium/net/UrlRequest$Builder;', ); - static final _allowDirectExecutor = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _allowDirectExecutor = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract org.chromium.net.UrlRequest$Builder allowDirectExecutor() + /// from: `public abstract org.chromium.net.UrlRequest$Builder allowDirectExecutor()` /// The returned object must be released after use, by calling the [release] method. UrlRequest_Builder allowDirectExecutor() { return _allowDirectExecutor( - reference.pointer, _id_allowDirectExecutor as jni.JMethodIDPtr) - .object(const $UrlRequest_BuilderType()); + reference.pointer, _id_allowDirectExecutor as _$jni.JMethodIDPtr) + .object(const $UrlRequest_Builder$Type()); } static final _id_build = _class.instanceMethodId( @@ -3465,123 +3543,108 @@ class UrlRequest_Builder extends jni.JObject { r'()Lorg/chromium/net/UrlRequest;', ); - static final _build = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _build = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract org.chromium.net.UrlRequest build() + /// from: `public abstract org.chromium.net.UrlRequest build()` /// The returned object must be released after use, by calling the [release] method. UrlRequest build() { - return _build(reference.pointer, _id_build as jni.JMethodIDPtr) - .object(const $UrlRequestType()); + return _build(reference.pointer, _id_build as _$jni.JMethodIDPtr) + .object(const $UrlRequest$Type()); } } -final class $UrlRequest_BuilderType extends jni.JObjType { - const $UrlRequest_BuilderType(); +final class $UrlRequest_Builder$Type + extends _$jni.JObjType { + @_$jni.internal + const $UrlRequest_Builder$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lorg/chromium/net/UrlRequest$Builder;'; - @override - UrlRequest_Builder fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + UrlRequest_Builder fromReference(_$jni.JReference reference) => UrlRequest_Builder.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($UrlRequest_BuilderType).hashCode; + @_$core.override + int get hashCode => ($UrlRequest_Builder$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($UrlRequest_BuilderType) && - other is $UrlRequest_BuilderType; + return other.runtimeType == ($UrlRequest_Builder$Type) && + other is $UrlRequest_Builder$Type; } } -/// from: org.chromium.net.UrlRequest$Callback -class UrlRequest_Callback extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `org.chromium.net.UrlRequest$Callback` +class UrlRequest_Callback extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal UrlRequest_Callback.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'org/chromium/net/UrlRequest$Callback'); + _$jni.JClass.forName(r'org/chromium/net/UrlRequest$Callback'); /// The type which includes information such as the signature of this class. - static const type = $UrlRequest_CallbackType(); - static final _id_new0 = _class.constructorId( - r'()V', - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>('globalEnv_NewObject') - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory UrlRequest_Callback() { - return UrlRequest_Callback.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - + static const type = $UrlRequest_Callback$Type(); static final _id_onRedirectReceived = _class.instanceMethodId( r'onRedirectReceived', r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/lang/String;)V', ); - static final _onRedirectReceived = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onRedirectReceived = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public abstract void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string) + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract void onRedirectReceived(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.lang.String string)` void onRedirectReceived( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - jni.JString string, + _$jni.JString string, ) { _onRedirectReceived( reference.pointer, - _id_onRedirectReceived as jni.JMethodIDPtr, + _id_onRedirectReceived as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer, string.reference.pointer) @@ -3593,28 +3656,31 @@ class UrlRequest_Callback extends jni.JObject { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); - static final _onResponseStarted = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onResponseStarted = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + /// from: `public abstract void onResponseStarted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo)` void onResponseStarted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { _onResponseStarted( reference.pointer, - _id_onResponseStarted as jni.JMethodIDPtr, + _id_onResponseStarted as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer) .check(); @@ -3625,34 +3691,34 @@ class UrlRequest_Callback extends jni.JObject { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Ljava/nio/ByteBuffer;)V', ); - static final _onReadCompleted = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onReadCompleted = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public abstract void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer) + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract void onReadCompleted(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, java.nio.ByteBuffer byteBuffer)` void onReadCompleted( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, - jni.JByteBuffer byteBuffer, + _$jni.JByteBuffer byteBuffer, ) { _onReadCompleted( reference.pointer, - _id_onReadCompleted as jni.JMethodIDPtr, + _id_onReadCompleted as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer, byteBuffer.reference.pointer) @@ -3664,26 +3730,29 @@ class UrlRequest_Callback extends jni.JObject { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); - static final _onSucceeded = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onSucceeded = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + /// from: `public abstract void onSucceeded(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo)` void onSucceeded( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { - _onSucceeded(reference.pointer, _id_onSucceeded as jni.JMethodIDPtr, + _onSucceeded(reference.pointer, _id_onSucceeded as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer) .check(); } @@ -3693,26 +3762,26 @@ class UrlRequest_Callback extends jni.JObject { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;Lorg/chromium/net/CronetException;)V', ); - static final _onFailed = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onFailed = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - /// from: public abstract void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException) + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract void onFailed(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo, org.chromium.net.CronetException cronetException)` void onFailed( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, @@ -3720,7 +3789,7 @@ class UrlRequest_Callback extends jni.JObject { ) { _onFailed( reference.pointer, - _id_onFailed as jni.JMethodIDPtr, + _id_onFailed as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer, cronetException.reference.pointer) @@ -3732,292 +3801,272 @@ class UrlRequest_Callback extends jni.JObject { r'(Lorg/chromium/net/UrlRequest;Lorg/chromium/net/UrlResponseInfo;)V', ); - static final _onCanceled = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onCanceled = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void onCanceled(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo) + /// from: `public void onCanceled(org.chromium.net.UrlRequest urlRequest, org.chromium.net.UrlResponseInfo urlResponseInfo)` void onCanceled( UrlRequest urlRequest, UrlResponseInfo urlResponseInfo, ) { - _onCanceled(reference.pointer, _id_onCanceled as jni.JMethodIDPtr, + _onCanceled(reference.pointer, _id_onCanceled as _$jni.JMethodIDPtr, urlRequest.reference.pointer, urlResponseInfo.reference.pointer) .check(); } } -final class $UrlRequest_CallbackType extends jni.JObjType { - const $UrlRequest_CallbackType(); +final class $UrlRequest_Callback$Type + extends _$jni.JObjType { + @_$jni.internal + const $UrlRequest_Callback$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lorg/chromium/net/UrlRequest$Callback;'; - @override - UrlRequest_Callback fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + UrlRequest_Callback fromReference(_$jni.JReference reference) => UrlRequest_Callback.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($UrlRequest_CallbackType).hashCode; + @_$core.override + int get hashCode => ($UrlRequest_Callback$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($UrlRequest_CallbackType) && - other is $UrlRequest_CallbackType; + return other.runtimeType == ($UrlRequest_Callback$Type) && + other is $UrlRequest_Callback$Type; } } -/// from: org.chromium.net.UrlRequest$Status -class UrlRequest_Status extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `org.chromium.net.UrlRequest$Status` +class UrlRequest_Status extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal UrlRequest_Status.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'org/chromium/net/UrlRequest$Status'); + _$jni.JClass.forName(r'org/chromium/net/UrlRequest$Status'); /// The type which includes information such as the signature of this class. - static const type = $UrlRequest_StatusType(); + static const type = $UrlRequest_Status$Type(); - /// from: static public final int INVALID + /// from: `static public final int INVALID` static const INVALID = -1; - /// from: static public final int IDLE + /// from: `static public final int IDLE` static const IDLE = 0; - /// from: static public final int WAITING_FOR_STALLED_SOCKET_POOL + /// from: `static public final int WAITING_FOR_STALLED_SOCKET_POOL` static const WAITING_FOR_STALLED_SOCKET_POOL = 1; - /// from: static public final int WAITING_FOR_AVAILABLE_SOCKET + /// from: `static public final int WAITING_FOR_AVAILABLE_SOCKET` static const WAITING_FOR_AVAILABLE_SOCKET = 2; - /// from: static public final int WAITING_FOR_DELEGATE + /// from: `static public final int WAITING_FOR_DELEGATE` static const WAITING_FOR_DELEGATE = 3; - /// from: static public final int WAITING_FOR_CACHE + /// from: `static public final int WAITING_FOR_CACHE` static const WAITING_FOR_CACHE = 4; - /// from: static public final int DOWNLOADING_PAC_FILE + /// from: `static public final int DOWNLOADING_PAC_FILE` static const DOWNLOADING_PAC_FILE = 5; - /// from: static public final int RESOLVING_PROXY_FOR_URL + /// from: `static public final int RESOLVING_PROXY_FOR_URL` static const RESOLVING_PROXY_FOR_URL = 6; - /// from: static public final int RESOLVING_HOST_IN_PAC_FILE + /// from: `static public final int RESOLVING_HOST_IN_PAC_FILE` static const RESOLVING_HOST_IN_PAC_FILE = 7; - /// from: static public final int ESTABLISHING_PROXY_TUNNEL + /// from: `static public final int ESTABLISHING_PROXY_TUNNEL` static const ESTABLISHING_PROXY_TUNNEL = 8; - /// from: static public final int RESOLVING_HOST + /// from: `static public final int RESOLVING_HOST` static const RESOLVING_HOST = 9; - /// from: static public final int CONNECTING + /// from: `static public final int CONNECTING` static const CONNECTING = 10; - /// from: static public final int SSL_HANDSHAKE + /// from: `static public final int SSL_HANDSHAKE` static const SSL_HANDSHAKE = 11; - /// from: static public final int SENDING_REQUEST + /// from: `static public final int SENDING_REQUEST` static const SENDING_REQUEST = 12; - /// from: static public final int WAITING_FOR_RESPONSE + /// from: `static public final int WAITING_FOR_RESPONSE` static const WAITING_FOR_RESPONSE = 13; - /// from: static public final int READING_RESPONSE + /// from: `static public final int READING_RESPONSE` static const READING_RESPONSE = 14; } -final class $UrlRequest_StatusType extends jni.JObjType { - const $UrlRequest_StatusType(); +final class $UrlRequest_Status$Type extends _$jni.JObjType { + @_$jni.internal + const $UrlRequest_Status$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lorg/chromium/net/UrlRequest$Status;'; - @override - UrlRequest_Status fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + UrlRequest_Status fromReference(_$jni.JReference reference) => UrlRequest_Status.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($UrlRequest_StatusType).hashCode; + @_$core.override + int get hashCode => ($UrlRequest_Status$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($UrlRequest_StatusType) && - other is $UrlRequest_StatusType; + return other.runtimeType == ($UrlRequest_Status$Type) && + other is $UrlRequest_Status$Type; } } -/// from: org.chromium.net.UrlRequest$StatusListener -class UrlRequest_StatusListener extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `org.chromium.net.UrlRequest$StatusListener` +class UrlRequest_StatusListener extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal UrlRequest_StatusListener.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'org/chromium/net/UrlRequest$StatusListener'); + _$jni.JClass.forName(r'org/chromium/net/UrlRequest$StatusListener'); /// The type which includes information such as the signature of this class. - static const type = $UrlRequest_StatusListenerType(); - static final _id_new0 = _class.constructorId( - r'()V', - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>('globalEnv_NewObject') - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory UrlRequest_StatusListener() { - return UrlRequest_StatusListener.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - + static const type = $UrlRequest_StatusListener$Type(); static final _id_onStatus = _class.instanceMethodId( r'onStatus', r'(I)V', ); - static final _onStatus = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallVoidMethod') + static final _onStatus = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public abstract void onStatus(int i) + /// from: `public abstract void onStatus(int i)` void onStatus( int i, ) { - _onStatus(reference.pointer, _id_onStatus as jni.JMethodIDPtr, i).check(); + _onStatus(reference.pointer, _id_onStatus as _$jni.JMethodIDPtr, i).check(); } } -final class $UrlRequest_StatusListenerType - extends jni.JObjType { - const $UrlRequest_StatusListenerType(); +final class $UrlRequest_StatusListener$Type + extends _$jni.JObjType { + @_$jni.internal + const $UrlRequest_StatusListener$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lorg/chromium/net/UrlRequest$StatusListener;'; - @override - UrlRequest_StatusListener fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + UrlRequest_StatusListener fromReference(_$jni.JReference reference) => UrlRequest_StatusListener.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($UrlRequest_StatusListenerType).hashCode; + @_$core.override + int get hashCode => ($UrlRequest_StatusListener$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($UrlRequest_StatusListenerType) && - other is $UrlRequest_StatusListenerType; + return other.runtimeType == ($UrlRequest_StatusListener$Type) && + other is $UrlRequest_StatusListener$Type; } } -/// from: org.chromium.net.UrlRequest -class UrlRequest extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `org.chromium.net.UrlRequest` +class UrlRequest extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal UrlRequest.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'org/chromium/net/UrlRequest'); + static final _class = _$jni.JClass.forName(r'org/chromium/net/UrlRequest'); /// The type which includes information such as the signature of this class. - static const type = $UrlRequestType(); - static final _id_new0 = _class.constructorId( - r'()V', - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>('globalEnv_NewObject') - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory UrlRequest() { - return UrlRequest.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - + static const type = $UrlRequest$Type(); static final _id_start = _class.instanceMethodId( r'start', r'()V', ); - static final _start = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _start = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract void start() + /// from: `public abstract void start()` void start() { - _start(reference.pointer, _id_start as jni.JMethodIDPtr).check(); + _start(reference.pointer, _id_start as _$jni.JMethodIDPtr).check(); } static final _id_followRedirect = _class.instanceMethodId( @@ -4025,21 +4074,21 @@ class UrlRequest extends jni.JObject { r'()V', ); - static final _followRedirect = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _followRedirect = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract void followRedirect() + /// from: `public abstract void followRedirect()` void followRedirect() { - _followRedirect(reference.pointer, _id_followRedirect as jni.JMethodIDPtr) + _followRedirect(reference.pointer, _id_followRedirect as _$jni.JMethodIDPtr) .check(); } @@ -4048,22 +4097,22 @@ class UrlRequest extends jni.JObject { r'(Ljava/nio/ByteBuffer;)V', ); - static final _read = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _read = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void read(java.nio.ByteBuffer byteBuffer) + /// from: `public abstract void read(java.nio.ByteBuffer byteBuffer)` void read( - jni.JByteBuffer byteBuffer, + _$jni.JByteBuffer byteBuffer, ) { - _read(reference.pointer, _id_read as jni.JMethodIDPtr, + _read(reference.pointer, _id_read as _$jni.JMethodIDPtr, byteBuffer.reference.pointer) .check(); } @@ -4073,21 +4122,21 @@ class UrlRequest extends jni.JObject { r'()V', ); - static final _cancel = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _cancel = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract void cancel() + /// from: `public abstract void cancel()` void cancel() { - _cancel(reference.pointer, _id_cancel as jni.JMethodIDPtr).check(); + _cancel(reference.pointer, _id_cancel as _$jni.JMethodIDPtr).check(); } static final _id_isDone = _class.instanceMethodId( @@ -4095,21 +4144,21 @@ class UrlRequest extends jni.JObject { r'()Z', ); - static final _isDone = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _isDone = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract boolean isDone() + /// from: `public abstract boolean isDone()` bool isDone() { - return _isDone(reference.pointer, _id_isDone as jni.JMethodIDPtr).boolean; + return _isDone(reference.pointer, _id_isDone as _$jni.JMethodIDPtr).boolean; } static final _id_getStatus = _class.instanceMethodId( @@ -4117,112 +4166,96 @@ class UrlRequest extends jni.JObject { r'(Lorg/chromium/net/UrlRequest$StatusListener;)V', ); - static final _getStatus = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _getStatus = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void getStatus(org.chromium.net.UrlRequest$StatusListener statusListener) + /// from: `public abstract void getStatus(org.chromium.net.UrlRequest$StatusListener statusListener)` void getStatus( UrlRequest_StatusListener statusListener, ) { - _getStatus(reference.pointer, _id_getStatus as jni.JMethodIDPtr, + _getStatus(reference.pointer, _id_getStatus as _$jni.JMethodIDPtr, statusListener.reference.pointer) .check(); } } -final class $UrlRequestType extends jni.JObjType { - const $UrlRequestType(); +final class $UrlRequest$Type extends _$jni.JObjType { + @_$jni.internal + const $UrlRequest$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lorg/chromium/net/UrlRequest;'; - @override - UrlRequest fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + UrlRequest fromReference(_$jni.JReference reference) => UrlRequest.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($UrlRequestType).hashCode; + @_$core.override + int get hashCode => ($UrlRequest$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($UrlRequestType) && other is $UrlRequestType; + return other.runtimeType == ($UrlRequest$Type) && other is $UrlRequest$Type; } } -/// from: org.chromium.net.UrlResponseInfo$HeaderBlock -class UrlResponseInfo_HeaderBlock extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `org.chromium.net.UrlResponseInfo$HeaderBlock` +class UrlResponseInfo_HeaderBlock extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal UrlResponseInfo_HeaderBlock.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'org/chromium/net/UrlResponseInfo$HeaderBlock'); + _$jni.JClass.forName(r'org/chromium/net/UrlResponseInfo$HeaderBlock'); /// The type which includes information such as the signature of this class. - static const type = $UrlResponseInfo_HeaderBlockType(); - static final _id_new0 = _class.constructorId( - r'()V', - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>('globalEnv_NewObject') - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory UrlResponseInfo_HeaderBlock() { - return UrlResponseInfo_HeaderBlock.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - + static const type = $UrlResponseInfo_HeaderBlock$Type(); static final _id_getAsList = _class.instanceMethodId( r'getAsList', r'()Ljava/util/List;', ); - static final _getAsList = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getAsList = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract java.util.List getAsList() + /// from: `public abstract java.util.List getAsList()` /// The returned object must be released after use, by calling the [release] method. - jni.JList getAsList() { - return _getAsList(reference.pointer, _id_getAsList as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); + _$jni.JList<_$jni.JObject> getAsList() { + return _getAsList(reference.pointer, _id_getAsList as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JObjectType())); } static final _id_getAsMap = _class.instanceMethodId( @@ -4230,113 +4263,98 @@ class UrlResponseInfo_HeaderBlock extends jni.JObject { r'()Ljava/util/Map;', ); - static final _getAsMap = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getAsMap = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract java.util.Map getAsMap() + /// from: `public abstract java.util.Map getAsMap()` /// The returned object must be released after use, by calling the [release] method. - jni.JMap> getAsMap() { - return _getAsMap(reference.pointer, _id_getAsMap as jni.JMethodIDPtr) - .object(const jni.JMapType( - jni.JStringType(), jni.JListType(jni.JStringType()))); + _$jni.JMap<_$jni.JString, _$jni.JList<_$jni.JString>> getAsMap() { + return _getAsMap(reference.pointer, _id_getAsMap as _$jni.JMethodIDPtr) + .object(const _$jni.JMapType( + _$jni.JStringType(), _$jni.JListType(_$jni.JStringType()))); } } -final class $UrlResponseInfo_HeaderBlockType - extends jni.JObjType { - const $UrlResponseInfo_HeaderBlockType(); +final class $UrlResponseInfo_HeaderBlock$Type + extends _$jni.JObjType { + @_$jni.internal + const $UrlResponseInfo_HeaderBlock$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lorg/chromium/net/UrlResponseInfo$HeaderBlock;'; - @override - UrlResponseInfo_HeaderBlock fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + UrlResponseInfo_HeaderBlock fromReference(_$jni.JReference reference) => UrlResponseInfo_HeaderBlock.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($UrlResponseInfo_HeaderBlockType).hashCode; + @_$core.override + int get hashCode => ($UrlResponseInfo_HeaderBlock$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($UrlResponseInfo_HeaderBlockType) && - other is $UrlResponseInfo_HeaderBlockType; + return other.runtimeType == ($UrlResponseInfo_HeaderBlock$Type) && + other is $UrlResponseInfo_HeaderBlock$Type; } } -/// from: org.chromium.net.UrlResponseInfo -class UrlResponseInfo extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `org.chromium.net.UrlResponseInfo` +class UrlResponseInfo extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal UrlResponseInfo.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'org/chromium/net/UrlResponseInfo'); + static final _class = + _$jni.JClass.forName(r'org/chromium/net/UrlResponseInfo'); /// The type which includes information such as the signature of this class. - static const type = $UrlResponseInfoType(); - static final _id_new0 = _class.constructorId( - r'()V', - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>('globalEnv_NewObject') - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory UrlResponseInfo() { - return UrlResponseInfo.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } - + static const type = $UrlResponseInfo$Type(); static final _id_getUrl = _class.instanceMethodId( r'getUrl', r'()Ljava/lang/String;', ); - static final _getUrl = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getUrl = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract java.lang.String getUrl() + /// from: `public abstract java.lang.String getUrl()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getUrl() { - return _getUrl(reference.pointer, _id_getUrl as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString getUrl() { + return _getUrl(reference.pointer, _id_getUrl as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_getUrlChain = _class.instanceMethodId( @@ -4344,23 +4362,24 @@ class UrlResponseInfo extends jni.JObject { r'()Ljava/util/List;', ); - static final _getUrlChain = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getUrlChain = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract java.util.List getUrlChain() + /// from: `public abstract java.util.List getUrlChain()` /// The returned object must be released after use, by calling the [release] method. - jni.JList getUrlChain() { - return _getUrlChain(reference.pointer, _id_getUrlChain as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JStringType())); + _$jni.JList<_$jni.JString> getUrlChain() { + return _getUrlChain( + reference.pointer, _id_getUrlChain as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JStringType())); } static final _id_getHttpStatusCode = _class.instanceMethodId( @@ -4368,22 +4387,22 @@ class UrlResponseInfo extends jni.JObject { r'()I', ); - static final _getHttpStatusCode = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getHttpStatusCode = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract int getHttpStatusCode() + /// from: `public abstract int getHttpStatusCode()` int getHttpStatusCode() { return _getHttpStatusCode( - reference.pointer, _id_getHttpStatusCode as jni.JMethodIDPtr) + reference.pointer, _id_getHttpStatusCode as _$jni.JMethodIDPtr) .integer; } @@ -4392,24 +4411,24 @@ class UrlResponseInfo extends jni.JObject { r'()Ljava/lang/String;', ); - static final _getHttpStatusText = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getHttpStatusText = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract java.lang.String getHttpStatusText() + /// from: `public abstract java.lang.String getHttpStatusText()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getHttpStatusText() { + _$jni.JString getHttpStatusText() { return _getHttpStatusText( - reference.pointer, _id_getHttpStatusText as jni.JMethodIDPtr) - .object(const jni.JStringType()); + reference.pointer, _id_getHttpStatusText as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_getAllHeadersAsList = _class.instanceMethodId( @@ -4417,24 +4436,24 @@ class UrlResponseInfo extends jni.JObject { r'()Ljava/util/List;', ); - static final _getAllHeadersAsList = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getAllHeadersAsList = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract java.util.List getAllHeadersAsList() + /// from: `public abstract java.util.List getAllHeadersAsList()` /// The returned object must be released after use, by calling the [release] method. - jni.JList getAllHeadersAsList() { + _$jni.JList<_$jni.JObject> getAllHeadersAsList() { return _getAllHeadersAsList( - reference.pointer, _id_getAllHeadersAsList as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); + reference.pointer, _id_getAllHeadersAsList as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JObjectType())); } static final _id_getAllHeaders = _class.instanceMethodId( @@ -4442,25 +4461,25 @@ class UrlResponseInfo extends jni.JObject { r'()Ljava/util/Map;', ); - static final _getAllHeaders = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getAllHeaders = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract java.util.Map getAllHeaders() + /// from: `public abstract java.util.Map getAllHeaders()` /// The returned object must be released after use, by calling the [release] method. - jni.JMap> getAllHeaders() { + _$jni.JMap<_$jni.JString, _$jni.JList<_$jni.JString>> getAllHeaders() { return _getAllHeaders( - reference.pointer, _id_getAllHeaders as jni.JMethodIDPtr) - .object(const jni.JMapType( - jni.JStringType(), jni.JListType(jni.JStringType()))); + reference.pointer, _id_getAllHeaders as _$jni.JMethodIDPtr) + .object(const _$jni.JMapType( + _$jni.JStringType(), _$jni.JListType(_$jni.JStringType()))); } static final _id_wasCached = _class.instanceMethodId( @@ -4468,21 +4487,21 @@ class UrlResponseInfo extends jni.JObject { r'()Z', ); - static final _wasCached = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _wasCached = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract boolean wasCached() + /// from: `public abstract boolean wasCached()` bool wasCached() { - return _wasCached(reference.pointer, _id_wasCached as jni.JMethodIDPtr) + return _wasCached(reference.pointer, _id_wasCached as _$jni.JMethodIDPtr) .boolean; } @@ -4491,24 +4510,24 @@ class UrlResponseInfo extends jni.JObject { r'()Ljava/lang/String;', ); - static final _getNegotiatedProtocol = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getNegotiatedProtocol = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract java.lang.String getNegotiatedProtocol() + /// from: `public abstract java.lang.String getNegotiatedProtocol()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getNegotiatedProtocol() { + _$jni.JString getNegotiatedProtocol() { return _getNegotiatedProtocol( - reference.pointer, _id_getNegotiatedProtocol as jni.JMethodIDPtr) - .object(const jni.JStringType()); + reference.pointer, _id_getNegotiatedProtocol as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_getProxyServer = _class.instanceMethodId( @@ -4516,24 +4535,24 @@ class UrlResponseInfo extends jni.JObject { r'()Ljava/lang/String;', ); - static final _getProxyServer = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getProxyServer = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract java.lang.String getProxyServer() + /// from: `public abstract java.lang.String getProxyServer()` /// The returned object must be released after use, by calling the [release] method. - jni.JString getProxyServer() { + _$jni.JString getProxyServer() { return _getProxyServer( - reference.pointer, _id_getProxyServer as jni.JMethodIDPtr) - .object(const jni.JStringType()); + reference.pointer, _id_getProxyServer as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_getReceivedByteCount = _class.instanceMethodId( @@ -4541,48 +4560,53 @@ class UrlResponseInfo extends jni.JObject { r'()J', ); - static final _getReceivedByteCount = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getReceivedByteCount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract long getReceivedByteCount() + /// from: `public abstract long getReceivedByteCount()` int getReceivedByteCount() { return _getReceivedByteCount( - reference.pointer, _id_getReceivedByteCount as jni.JMethodIDPtr) + reference.pointer, _id_getReceivedByteCount as _$jni.JMethodIDPtr) .long; } } -final class $UrlResponseInfoType extends jni.JObjType { - const $UrlResponseInfoType(); +final class $UrlResponseInfo$Type extends _$jni.JObjType { + @_$jni.internal + const $UrlResponseInfo$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lorg/chromium/net/UrlResponseInfo;'; - @override - UrlResponseInfo fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + UrlResponseInfo fromReference(_$jni.JReference reference) => UrlResponseInfo.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($UrlResponseInfoType).hashCode; + @_$core.override + int get hashCode => ($UrlResponseInfo$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($UrlResponseInfoType) && - other is $UrlResponseInfoType; + return other.runtimeType == ($UrlResponseInfo$Type) && + other is $UrlResponseInfo$Type; } } diff --git a/pkgs/cronet_http/pubspec.yaml b/pkgs/cronet_http/pubspec.yaml index ee14e309a9..10f5ac636c 100644 --- a/pkgs/cronet_http/pubspec.yaml +++ b/pkgs/cronet_http/pubspec.yaml @@ -13,11 +13,11 @@ dependencies: sdk: flutter http: ^1.2.0 http_profile: ^0.1.0 - jni: ^0.10.1 + jni: ^0.12.0 dev_dependencies: dart_flutter_team_lints: ^3.0.0 - jnigen: ^0.10.0 + jnigen: ^0.12.0 xml: ^6.1.0 yaml_edit: ^2.0.3 From c98fd6e31e90c812b6e692b0f08e5f1927367497 Mon Sep 17 00:00:00 2001 From: Bob Nystrom Date: Tue, 15 Oct 2024 15:35:02 -0700 Subject: [PATCH 426/448] Pass language version to DartFormatter(). (#1317) Looks like I missed one constructor call when I fixed the others in: https://github.com/dart-lang/http/pull/1307 --- .../bin/generate_server_wrappers.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/web_socket_conformance_tests/bin/generate_server_wrappers.dart b/pkgs/web_socket_conformance_tests/bin/generate_server_wrappers.dart index c9787b6495..546d795688 100644 --- a/pkgs/web_socket_conformance_tests/bin/generate_server_wrappers.dart +++ b/pkgs/web_socket_conformance_tests/bin/generate_server_wrappers.dart @@ -37,7 +37,8 @@ Future> startServer() async => spawnHybridUri(Uri( void main() async { final files = await Directory('lib/src').list().toList(); - final formatter = DartFormatter(); + final formatter = DartFormatter( + languageVersion: DartFormatter.latestLanguageVersion); files.where((file) => file.path.endsWith('_server.dart')).forEach((file) { final vmPath = file.path.replaceAll('_server.dart', '_server_vm.dart'); From 69089e3cf87375434c1fec7a1ed9c4dd415e1845 Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 17 Oct 2024 15:45:28 +0200 Subject: [PATCH 427/448] Add issue template and other fixes --- .github/ISSUE_TEMPLATE/http2.md | 5 +++++ pkgs/http2/CONTRIBUTING.md | 33 --------------------------------- pkgs/http2/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 34 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/http2.md delete mode 100644 pkgs/http2/CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/http2.md b/.github/ISSUE_TEMPLATE/http2.md new file mode 100644 index 0000000000..9c982e75a8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/http2.md @@ -0,0 +1,5 @@ +--- +name: "package:http2" +about: "Create a bug or file a feature request against package:http2." +labels: "package:http2" +--- \ No newline at end of file diff --git a/pkgs/http2/CONTRIBUTING.md b/pkgs/http2/CONTRIBUTING.md deleted file mode 100644 index 6f5e0ea67d..0000000000 --- a/pkgs/http2/CONTRIBUTING.md +++ /dev/null @@ -1,33 +0,0 @@ -Want to contribute? Great! First, read this page (including the small print at -the end). - -### Before you contribute -Before we can use your code, you must sign the -[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) -(CLA), which you can do online. The CLA is necessary mainly because you own the -copyright to your changes, even after your contribution becomes part of our -codebase, so we need your permission to use and distribute your code. We also -need to be sure of various other things—for instance that you'll tell us if you -know that your code infringes on other people's patents. You don't have to sign -the CLA until after you've submitted your code for review and a member has -approved it, but you must do it before we can put your code into our codebase. - -Before you start working on a larger contribution, you should get in touch with -us first through the issue tracker with your idea so that we can help out and -possibly guide you. Coordinating up front makes it much easier to avoid -frustration later on. - -### Code reviews -All submissions, including submissions by project members, require review. - -### File headers -All files in the project must start with the following header. - - // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file - // for details. All rights reserved. Use of this source code is governed by a - // BSD-style license that can be found in the LICENSE file. - -### The small print -Contributions made by corporations are covered by a different agreement than the -one above, the -[Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate). diff --git a/pkgs/http2/pubspec.yaml b/pkgs/http2/pubspec.yaml index ac0e139d3c..a28d1b1934 100644 --- a/pkgs/http2/pubspec.yaml +++ b/pkgs/http2/pubspec.yaml @@ -1,7 +1,7 @@ name: http2 version: 2.3.1-wip description: A HTTP/2 implementation in Dart. -repository: https://github.com/dart-lang/http2 +repository: https://github.com/dart-lang/http/tree/master/pkgs/http2 topics: - http From ad1153e6a31bb8c80d107575dd88fa51931dd561 Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 17 Oct 2024 15:51:38 +0200 Subject: [PATCH 428/448] Moving fixes --- .github/labeler.yml | 6 ++- .../workflows/http2.yaml | 12 ++++-- README.md | 1 + pkgs/http2/.github/dependabot.yaml | 14 ------- pkgs/http2/.github/workflows/health.yaml | 15 -------- pkgs/http2/.github/workflows/no-response.yml | 37 ------------------- .../.github/workflows/post_summaries.yaml | 17 --------- pkgs/http2/.github/workflows/publish.yaml | 17 --------- pkgs/http2/CHANGELOG.md | 3 +- pkgs/http2/README.md | 9 ----- pkgs/http2/pubspec.yaml | 2 +- 11 files changed, 18 insertions(+), 115 deletions(-) rename pkgs/http2/.github/workflows/test-package.yml => .github/workflows/http2.yaml (89%) delete mode 100644 pkgs/http2/.github/dependabot.yaml delete mode 100644 pkgs/http2/.github/workflows/health.yaml delete mode 100644 pkgs/http2/.github/workflows/no-response.yml delete mode 100644 pkgs/http2/.github/workflows/post_summaries.yaml delete mode 100644 pkgs/http2/.github/workflows/publish.yaml diff --git a/.github/labeler.yml b/.github/labeler.yml index 6d477b3173..1fc30162b4 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -16,6 +16,10 @@ - changed-files: - any-glob-to-any-file: 'pkgs/http/**' +'package:http2': + - changed-files: + - any-glob-to-any-file: 'pkgs/http2/**' + 'package:http_client_conformance_tests': - changed-files: - - any-glob-to-any-file: 'pkgs/http_client_conformance_tests/**' \ No newline at end of file + - any-glob-to-any-file: 'pkgs/http_client_conformance_tests/**' diff --git a/pkgs/http2/.github/workflows/test-package.yml b/.github/workflows/http2.yaml similarity index 89% rename from pkgs/http2/.github/workflows/test-package.yml rename to .github/workflows/http2.yaml index 9fd5c8a050..0d698dba2f 100644 --- a/pkgs/http2/.github/workflows/test-package.yml +++ b/.github/workflows/http2.yaml @@ -1,11 +1,17 @@ name: Dart CI on: - # Run on PRs and pushes to the default branch. push: - branches: [ master ] + branches: + - main + - master + paths: + - '.github/workflows/http2.yaml' + - 'pkgs/http2/**' pull_request: - branches: [ master ] + paths: + - '.github/workflows/http2.yaml' + - 'pkgs/http2/**' schedule: - cron: "0 0 * * 0" diff --git a/README.md b/README.md index 14e6a7d6b0..0c39b58811 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ and the browser. | [cupertino_http](pkgs/cupertino_http/) | A macOS/iOS Flutter plugin that provides access to the [Foundation URL Loading System](https://developer.apple.com/documentation/foundation/url_loading_system). | [![pub package](https://img.shields.io/pub/v/cupertino_http.svg)](https://pub.dev/packages/cupertino_http) | | [flutter_http_example](pkgs/flutter_http_example/) | An Flutter app that demonstrates how to configure and use `package:http`. | — | | [http](pkgs/http/) | A composable, multi-platform, Future-based API for HTTP requests. | [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) | +| [http2](pkgs/http2/) | A HTTP/2 implementation in Dart. | [![pub package](https://img.shields.io/pub/v/http2.svg)](https://pub.dev/packages/http2) | | [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | A library that tests whether implementations of package:http's `Client` class behave as expected. | | | [http_profile](pkgs/http_profile/) | A library used by HTTP client authors to integrate with the DevTools Network View. | [![pub package](https://img.shields.io/pub/v/http_profile.svg)](https://pub.dev/packages/http_profile) | | [ok_http](pkgs/ok_http/) | An Android Flutter plugin that provides access to the [OkHttp](https://square.github.io/okhttp/) HTTP client and the OkHttp [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html) API. | [![pub package](https://img.shields.io/pub/v/ok_http.svg)](https://pub.dev/packages/ok_http) | diff --git a/pkgs/http2/.github/dependabot.yaml b/pkgs/http2/.github/dependabot.yaml deleted file mode 100644 index bf6b38a4d8..0000000000 --- a/pkgs/http2/.github/dependabot.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Dependabot configuration file. -version: 2 - -updates: - - package-ecosystem: github-actions - directory: / - schedule: - interval: monthly - labels: - - autosubmit - groups: - github-actions: - patterns: - - "*" diff --git a/pkgs/http2/.github/workflows/health.yaml b/pkgs/http2/.github/workflows/health.yaml deleted file mode 100644 index 9f47a032f7..0000000000 --- a/pkgs/http2/.github/workflows/health.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: Health - -on: - pull_request: - branches: [ master ] - types: [opened, synchronize, reopened, labeled, unlabeled] - -jobs: - health: - uses: dart-lang/ecosystem/.github/workflows/health.yaml@main - with: - coverage_web: false - sdk: dev - permissions: - pull-requests: write diff --git a/pkgs/http2/.github/workflows/no-response.yml b/pkgs/http2/.github/workflows/no-response.yml deleted file mode 100644 index ab1ac49842..0000000000 --- a/pkgs/http2/.github/workflows/no-response.yml +++ /dev/null @@ -1,37 +0,0 @@ -# A workflow to close issues where the author hasn't responded to a request for -# more information; see https://github.com/actions/stale. - -name: No Response - -# Run as a daily cron. -on: - schedule: - # Every day at 8am - - cron: '0 8 * * *' - -# All permissions not specified are set to 'none'. -permissions: - issues: write - pull-requests: write - -jobs: - no-response: - runs-on: ubuntu-latest - if: ${{ github.repository_owner == 'dart-lang' }} - steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e - with: - # Don't automatically mark inactive issues+PRs as stale. - days-before-stale: -1 - # Close needs-info issues and PRs after 14 days of inactivity. - days-before-close: 14 - stale-issue-label: "needs-info" - close-issue-message: > - Without additional information we're not able to resolve this issue. - Feel free to add more info or respond to any questions above and we - can reopen the case. Thanks for your contribution! - stale-pr-label: "needs-info" - close-pr-message: > - Without additional information we're not able to resolve this PR. - Feel free to add more info or respond to any questions above. - Thanks for your contribution! diff --git a/pkgs/http2/.github/workflows/post_summaries.yaml b/pkgs/http2/.github/workflows/post_summaries.yaml deleted file mode 100644 index e082efe95a..0000000000 --- a/pkgs/http2/.github/workflows/post_summaries.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: Comment on the pull request - -on: - # Trigger this workflow after the Health workflow completes. This workflow will have permissions to - # do things like create comments on the PR, even if the original workflow couldn't. - workflow_run: - workflows: - - Health - - Publish - types: - - completed - -jobs: - upload: - uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main - permissions: - pull-requests: write diff --git a/pkgs/http2/.github/workflows/publish.yaml b/pkgs/http2/.github/workflows/publish.yaml deleted file mode 100644 index 27157a046a..0000000000 --- a/pkgs/http2/.github/workflows/publish.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# A CI configuration to auto-publish pub packages. - -name: Publish - -on: - pull_request: - branches: [ master ] - push: - tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ] - -jobs: - publish: - if: ${{ github.repository_owner == 'dart-lang' }} - uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main - permissions: - id-token: write # Required for authentication using OIDC - pull-requests: write # Required for writing the pull request note diff --git a/pkgs/http2/CHANGELOG.md b/pkgs/http2/CHANGELOG.md index 8248505f2b..6e482a92b3 100644 --- a/pkgs/http2/CHANGELOG.md +++ b/pkgs/http2/CHANGELOG.md @@ -1,7 +1,8 @@ -## 2.3.1-wip +## 2.3.1 - Require Dart 3.2 - Add topics to `pubspec.yaml` +- Move to `dart-lang/http` monorepo. ## 2.3.0 diff --git a/pkgs/http2/README.md b/pkgs/http2/README.md index 36a8aaa042..edb75c99d6 100644 --- a/pkgs/http2/README.md +++ b/pkgs/http2/README.md @@ -1,4 +1,3 @@ -[![Dart CI](https://github.com/dart-lang/http2/actions/workflows/test-package.yml/badge.svg)](https://github.com/dart-lang/http2/actions/workflows/test-package.yml) [![pub package](https://img.shields.io/pub/v/http2.svg)](https://pub.dev/packages/http2) [![package publisher](https://img.shields.io/pub/publisher/http2.svg)](https://pub.dev/packages/http2/publisher) @@ -54,11 +53,3 @@ Future main() async { An example with better error handling is available [here][example]. See the [API docs][api] for more details. - -## Features and bugs - -Please file feature requests and bugs at the [issue tracker][tracker]. - -[tracker]: https://github.com/dart-lang/http2/issues -[api]: https://pub.dev/documentation/http2/latest/ -[example]: https://github.com/dart-lang/http2/blob/master/example/display_headers.dart diff --git a/pkgs/http2/pubspec.yaml b/pkgs/http2/pubspec.yaml index a28d1b1934..7d9e6b851b 100644 --- a/pkgs/http2/pubspec.yaml +++ b/pkgs/http2/pubspec.yaml @@ -1,5 +1,5 @@ name: http2 -version: 2.3.1-wip +version: 2.3.1 description: A HTTP/2 implementation in Dart. repository: https://github.com/dart-lang/http/tree/master/pkgs/http2 From be3c92943abf570f835d859e8930b6827ddffd88 Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 17 Oct 2024 15:51:59 +0200 Subject: [PATCH 429/448] Rename wf --- .github/workflows/http2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/http2.yaml b/.github/workflows/http2.yaml index 0d698dba2f..70e3346b01 100644 --- a/.github/workflows/http2.yaml +++ b/.github/workflows/http2.yaml @@ -1,4 +1,4 @@ -name: Dart CI +name: package:http2 on: push: From 6a6ac34d159dd226d4977bb485b8c77152e7c414 Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 17 Oct 2024 15:54:30 +0200 Subject: [PATCH 430/448] Add issue template and other fixes --- .github/ISSUE_TEMPLATE/http_parser.md | 5 +++++ pkgs/http_parser/pubspec.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE/http_parser.md diff --git a/.github/ISSUE_TEMPLATE/http_parser.md b/.github/ISSUE_TEMPLATE/http_parser.md new file mode 100644 index 0000000000..cf34cdc533 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/http_parser.md @@ -0,0 +1,5 @@ +--- +name: "package:http_parser" +about: "Create a bug or file a feature request against package:http_parser." +labels: "package:http_parser" +--- \ No newline at end of file diff --git a/pkgs/http_parser/pubspec.yaml b/pkgs/http_parser/pubspec.yaml index 7bf5b8ba0c..ec3b050ac8 100644 --- a/pkgs/http_parser/pubspec.yaml +++ b/pkgs/http_parser/pubspec.yaml @@ -2,7 +2,7 @@ name: http_parser version: 4.1.0 description: >- A platform-independent package for parsing and serializing HTTP formats. -repository: https://github.com/dart-lang/http_parser +repository: https://github.com/dart-lang/http/tree/master/pkgs/http_parser environment: sdk: ^3.4.0 From f321f54bbd67055f920aa1ba3e3f3c32db25c8ca Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 17 Oct 2024 15:58:26 +0200 Subject: [PATCH 431/448] Moving fixes --- .github/labeler.yml | 6 ++- .../workflows/http_parser.yaml | 15 ++++++-- README.md | 1 + pkgs/http_parser/.github/dependabot.yaml | 14 ------- .../.github/workflows/no-response.yml | 37 ------------------- .../.github/workflows/publish.yaml | 17 --------- pkgs/http_parser/CHANGELOG.md | 4 ++ pkgs/http_parser/README.md | 1 - pkgs/http_parser/pubspec.yaml | 2 +- 9 files changed, 22 insertions(+), 75 deletions(-) rename pkgs/http_parser/.github/workflows/test-package.yml => .github/workflows/http_parser.yaml (87%) delete mode 100644 pkgs/http_parser/.github/dependabot.yaml delete mode 100644 pkgs/http_parser/.github/workflows/no-response.yml delete mode 100644 pkgs/http_parser/.github/workflows/publish.yaml diff --git a/.github/labeler.yml b/.github/labeler.yml index 6d477b3173..b1143c6f1a 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -16,6 +16,10 @@ - changed-files: - any-glob-to-any-file: 'pkgs/http/**' +'package:http_parser': + - changed-files: + - any-glob-to-any-file: 'pkgs/http_parser/**' + 'package:http_client_conformance_tests': - changed-files: - - any-glob-to-any-file: 'pkgs/http_client_conformance_tests/**' \ No newline at end of file + - any-glob-to-any-file: 'pkgs/http_client_conformance_tests/**' diff --git a/pkgs/http_parser/.github/workflows/test-package.yml b/.github/workflows/http_parser.yaml similarity index 87% rename from pkgs/http_parser/.github/workflows/test-package.yml rename to .github/workflows/http_parser.yaml index 5014c53186..7865ed200a 100644 --- a/pkgs/http_parser/.github/workflows/test-package.yml +++ b/.github/workflows/http_parser.yaml @@ -1,16 +1,23 @@ -name: Dart CI +name: package:http_parser on: - # Run on PRs and pushes to the default branch. push: - branches: [ master ] + branches: + - main + - master + paths: + - '.github/workflows/http_parser.yaml' + - 'pkgs/http_parser/**' pull_request: - branches: [ master ] + paths: + - '.github/workflows/http_parser.yaml' + - 'pkgs/http_parser/**' schedule: - cron: "0 0 * * 0" env: PUB_ENVIRONMENT: bot.github + permissions: read-all jobs: diff --git a/README.md b/README.md index 14e6a7d6b0..a5e5ad44d0 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ and the browser. | [flutter_http_example](pkgs/flutter_http_example/) | An Flutter app that demonstrates how to configure and use `package:http`. | — | | [http](pkgs/http/) | A composable, multi-platform, Future-based API for HTTP requests. | [![pub package](https://img.shields.io/pub/v/http.svg)](https://pub.dev/packages/http) | | [http_client_conformance_tests](pkgs/http_client_conformance_tests/) | A library that tests whether implementations of package:http's `Client` class behave as expected. | | +| [http_parser](pkgs/http_parser/) | A platform-independent package for parsing and serializing HTTP formats. | [![pub package](https://img.shields.io/pub/v/http_parser.svg)](https://pub.dev/packages/http_parser) | | [http_profile](pkgs/http_profile/) | A library used by HTTP client authors to integrate with the DevTools Network View. | [![pub package](https://img.shields.io/pub/v/http_profile.svg)](https://pub.dev/packages/http_profile) | | [ok_http](pkgs/ok_http/) | An Android Flutter plugin that provides access to the [OkHttp](https://square.github.io/okhttp/) HTTP client and the OkHttp [WebSocket](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-web-socket/index.html) API. | [![pub package](https://img.shields.io/pub/v/ok_http.svg)](https://pub.dev/packages/ok_http) | | [web_socket](pkgs/web_socket/) | Any easy-to-use library for communicating with WebSockets that has multiple implementations. | [![pub package](https://img.shields.io/pub/v/web_socket.svg)](https://pub.dev/packages/web_socket) | diff --git a/pkgs/http_parser/.github/dependabot.yaml b/pkgs/http_parser/.github/dependabot.yaml deleted file mode 100644 index bf6b38a4d8..0000000000 --- a/pkgs/http_parser/.github/dependabot.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Dependabot configuration file. -version: 2 - -updates: - - package-ecosystem: github-actions - directory: / - schedule: - interval: monthly - labels: - - autosubmit - groups: - github-actions: - patterns: - - "*" diff --git a/pkgs/http_parser/.github/workflows/no-response.yml b/pkgs/http_parser/.github/workflows/no-response.yml deleted file mode 100644 index ab1ac49842..0000000000 --- a/pkgs/http_parser/.github/workflows/no-response.yml +++ /dev/null @@ -1,37 +0,0 @@ -# A workflow to close issues where the author hasn't responded to a request for -# more information; see https://github.com/actions/stale. - -name: No Response - -# Run as a daily cron. -on: - schedule: - # Every day at 8am - - cron: '0 8 * * *' - -# All permissions not specified are set to 'none'. -permissions: - issues: write - pull-requests: write - -jobs: - no-response: - runs-on: ubuntu-latest - if: ${{ github.repository_owner == 'dart-lang' }} - steps: - - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e - with: - # Don't automatically mark inactive issues+PRs as stale. - days-before-stale: -1 - # Close needs-info issues and PRs after 14 days of inactivity. - days-before-close: 14 - stale-issue-label: "needs-info" - close-issue-message: > - Without additional information we're not able to resolve this issue. - Feel free to add more info or respond to any questions above and we - can reopen the case. Thanks for your contribution! - stale-pr-label: "needs-info" - close-pr-message: > - Without additional information we're not able to resolve this PR. - Feel free to add more info or respond to any questions above. - Thanks for your contribution! diff --git a/pkgs/http_parser/.github/workflows/publish.yaml b/pkgs/http_parser/.github/workflows/publish.yaml deleted file mode 100644 index 27157a046a..0000000000 --- a/pkgs/http_parser/.github/workflows/publish.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# A CI configuration to auto-publish pub packages. - -name: Publish - -on: - pull_request: - branches: [ master ] - push: - tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ] - -jobs: - publish: - if: ${{ github.repository_owner == 'dart-lang' }} - uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main - permissions: - id-token: write # Required for authentication using OIDC - pull-requests: write # Required for writing the pull request note diff --git a/pkgs/http_parser/CHANGELOG.md b/pkgs/http_parser/CHANGELOG.md index 3670ab8144..5c56cf7113 100644 --- a/pkgs/http_parser/CHANGELOG.md +++ b/pkgs/http_parser/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.1.1 + +* Move to `dart-lang/http` monorepo. + ## 4.1.0 * `CaseInsensitiveMap`: added constructor `fromEntries`. diff --git a/pkgs/http_parser/README.md b/pkgs/http_parser/README.md index 73f2f1cfe1..e9d330699b 100644 --- a/pkgs/http_parser/README.md +++ b/pkgs/http_parser/README.md @@ -1,4 +1,3 @@ -[![Build Status](https://github.com/dart-lang/http_parser/workflows/Dart%20CI/badge.svg)](https://github.com/dart-lang/http_parser/actions?query=workflow%3A"Dart+CI"+branch%3Amaster) [![Pub Package](https://img.shields.io/pub/v/http_parser.svg)](https://pub.dartlang.org/packages/http_parser) [![package publisher](https://img.shields.io/pub/publisher/http_parser.svg)](https://pub.dev/packages/http_parser/publisher) diff --git a/pkgs/http_parser/pubspec.yaml b/pkgs/http_parser/pubspec.yaml index ec3b050ac8..13888276f1 100644 --- a/pkgs/http_parser/pubspec.yaml +++ b/pkgs/http_parser/pubspec.yaml @@ -1,5 +1,5 @@ name: http_parser -version: 4.1.0 +version: 4.1.1 description: >- A platform-independent package for parsing and serializing HTTP formats. repository: https://github.com/dart-lang/http/tree/master/pkgs/http_parser From d9585fa2b59a5ac8acf6aae91ea7674af8eab55e Mon Sep 17 00:00:00 2001 From: Moritz Date: Fri, 18 Oct 2024 10:56:58 +0200 Subject: [PATCH 432/448] Fixes as per review --- .github/workflows/http_parser.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/http_parser.yaml b/.github/workflows/http_parser.yaml index 7865ed200a..b4dd271d31 100644 --- a/.github/workflows/http_parser.yaml +++ b/.github/workflows/http_parser.yaml @@ -3,7 +3,6 @@ name: package:http_parser on: push: branches: - - main - master paths: - '.github/workflows/http_parser.yaml' @@ -18,6 +17,10 @@ on: env: PUB_ENVIRONMENT: bot.github +defaults: + run: + working-directory: pkgs/http_parser/ + permissions: read-all jobs: From c46fe11ddd1cc9d20905ddf74d829fe1085d3b97 Mon Sep 17 00:00:00 2001 From: Moritz Date: Fri, 18 Oct 2024 10:57:56 +0200 Subject: [PATCH 433/448] Fixes as per review --- .github/workflows/http2.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/http2.yaml b/.github/workflows/http2.yaml index 70e3346b01..eb3dc28010 100644 --- a/.github/workflows/http2.yaml +++ b/.github/workflows/http2.yaml @@ -3,7 +3,6 @@ name: package:http2 on: push: branches: - - main - master paths: - '.github/workflows/http2.yaml' @@ -15,6 +14,10 @@ on: schedule: - cron: "0 0 * * 0" +defaults: + run: + working-directory: pkgs/http2/ + env: PUB_ENVIRONMENT: bot.github From 3f2ec5ade781284e91adaeebc6581d8fbeb99b71 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 23 Oct 2024 10:24:48 -0700 Subject: [PATCH 434/448] Replace Objective-C implemented delegates with Dart implementations (#1218) --- .github/workflows/cronet.yml | 6 + .github/workflows/cupertino.yml | 7 +- .github/workflows/dart.yml | 252 +- .gitignore | 115 +- pkgs/cupertino_http/.gitattributes | 4 +- pkgs/cupertino_http/CHANGELOG.md | 21 +- .../darwin/Classes/CUPHTTPClientDelegate.m | 1 - .../darwin/Classes/CUPHTTPCompletionHelper.m | 1 - .../darwin/Classes/CUPHTTPForwardedDelegate.m | 1 - .../CUPHTTPStreamToNSInputStreamAdapter.m | 1 - .../darwin/Classes/dart_api_dl.c | 1 - .../darwin/cupertino_http.podspec | 13 +- .../native_cupertino_bindings.m | 284 + .../Sources/cupertino_http/utils.h | 19 + .../Sources/cupertino_http/utils.m | 21 + pkgs/cupertino_http/example/.gitignore | 2 + .../example/integration_test/data_test.dart | 41 - .../example/integration_test/error_test.dart | 38 - .../http_url_response_test.dart | 3 +- .../example/integration_test/main.dart | 6 - .../integration_test/mutable_data_test.dart | 37 - .../mutable_url_request_test.dart | 14 +- .../integration_test/url_cache_test.dart | 2 + .../integration_test/url_request_test.dart | 9 +- .../integration_test/url_response_test.dart | 3 +- .../url_session_configuration_test.dart | 53 +- .../url_session_delegate_test.dart | 207 +- .../url_session_task_test.dart | 65 +- .../integration_test/url_session_test.dart | 75 +- .../example/integration_test/utils_test.dart | 50 +- .../ios/Flutter/AppFrameworkInfo.plist | 2 +- pkgs/cupertino_http/example/ios/Podfile | 3 +- pkgs/cupertino_http/example/ios/Podfile.lock | 21 +- .../ios/Runner.xcodeproj/project.pbxproj | 9 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../example/ios/Runner/AppDelegate.swift | 2 +- pkgs/cupertino_http/example/macos/Podfile | 2 +- .../cupertino_http/example/macos/Podfile.lock | 19 +- .../macos/Runner.xcodeproj/project.pbxproj | 8 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../example/macos/Runner/AppDelegate.swift | 6 +- pkgs/cupertino_http/example/pubspec.yaml | 1 + pkgs/cupertino_http/ffigen.yaml | 39 +- .../cupertino_http/lib/src/cupertino_api.dart | 1060 +- .../lib/src/cupertino_client.dart | 21 +- .../lib/src/cupertino_web_socket.dart | 37 +- .../lib/src/native_cupertino_bindings.dart | 136791 +++++++-------- pkgs/cupertino_http/lib/src/utils.dart | 70 +- pkgs/cupertino_http/pubspec.yaml | 5 +- .../src/CUPHTTPClientDelegate.h | 65 - .../src/CUPHTTPClientDelegate.m | 277 - .../src/CUPHTTPCompletionHelper.h | 31 - .../src/CUPHTTPCompletionHelper.m | 45 - .../src/CUPHTTPForwardedDelegate.h | 130 - .../src/CUPHTTPForwardedDelegate.m | 183 - .../src/CUPHTTPStreamToNSInputStreamAdapter.h | 23 - .../src/CUPHTTPStreamToNSInputStreamAdapter.m | 173 - .../src/dart-sdk/include/dart_api.h | 3909 - .../src/dart-sdk/include/dart_api_dl.c | 59 - .../src/dart-sdk/include/dart_api_dl.h | 150 - .../src/dart-sdk/include/dart_native_api.h | 197 - .../src/dart-sdk/include/dart_tools_api.h | 526 - .../src/dart-sdk/include/dart_version.h | 16 - .../include/internal/dart_api_dl_impl.h | 21 - pkgs/http/pubspec.yaml | 2 +- .../pubspec.yaml | 2 +- pkgs/web_socket/pubspec.yaml | 2 +- .../bin/generate_server_wrappers.dart | 4 +- .../web_socket_conformance_tests/pubspec.yaml | 4 +- tool/ci.sh | 2 +- 70 files changed, 62039 insertions(+), 83234 deletions(-) delete mode 100644 pkgs/cupertino_http/darwin/Classes/CUPHTTPClientDelegate.m delete mode 100644 pkgs/cupertino_http/darwin/Classes/CUPHTTPCompletionHelper.m delete mode 100644 pkgs/cupertino_http/darwin/Classes/CUPHTTPForwardedDelegate.m delete mode 100644 pkgs/cupertino_http/darwin/Classes/CUPHTTPStreamToNSInputStreamAdapter.m delete mode 100644 pkgs/cupertino_http/darwin/Classes/dart_api_dl.c create mode 100644 pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/native_cupertino_bindings.m create mode 100644 pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.h create mode 100644 pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m delete mode 100644 pkgs/cupertino_http/example/integration_test/data_test.dart delete mode 100644 pkgs/cupertino_http/example/integration_test/error_test.dart delete mode 100644 pkgs/cupertino_http/example/integration_test/mutable_data_test.dart delete mode 100644 pkgs/cupertino_http/src/CUPHTTPClientDelegate.h delete mode 100644 pkgs/cupertino_http/src/CUPHTTPClientDelegate.m delete mode 100644 pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h delete mode 100644 pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m delete mode 100644 pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h delete mode 100644 pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m delete mode 100644 pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.h delete mode 100644 pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.m delete mode 100644 pkgs/cupertino_http/src/dart-sdk/include/dart_api.h delete mode 100644 pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.c delete mode 100644 pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.h delete mode 100644 pkgs/cupertino_http/src/dart-sdk/include/dart_native_api.h delete mode 100644 pkgs/cupertino_http/src/dart-sdk/include/dart_tools_api.h delete mode 100644 pkgs/cupertino_http/src/dart-sdk/include/dart_version.h delete mode 100644 pkgs/cupertino_http/src/dart-sdk/include/internal/dart_api_dl_impl.h diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index c6ca3e47be..9b2a4cfcf6 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -24,13 +24,19 @@ jobs: verify: name: Format & Analyze & Test runs-on: ubuntu-latest + timeout-minutes: 20 strategy: + fail-fast: false matrix: cronetHttpNoPlay: ['false', 'true'] defaults: run: working-directory: pkgs/cronet_http steps: + - name: Delete unnecessary tools 🔧 + uses: jlumbroso/free-disk-space@v1.3.1 + with: + android: false # Don't remove Android tools - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 with: diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index e701c73395..68213aa069 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -28,10 +28,11 @@ jobs: run: working-directory: pkgs/cupertino_http strategy: + fail-fast: false matrix: # Test on the minimum supported flutter version and the latest # version. - flutter-version: ["3.22.0", "any"] + flutter-version: ["3.24.0", "any"] steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 @@ -50,9 +51,9 @@ jobs: - uses: futureware-tech/simulator-action@bfa03d93ec9de6dacb0c5553bbf8da8afc6c2ee9 with: os: iOS - os_version: '>=12.0' + os_version: '>=13.0' - name: Run tests run: | cd example flutter pub get - flutter test integration_test/main.dart + flutter test integration_test/main.dart --test-randomize-ordering-seed=random diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 00a651ede0..038e0cdfdc 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.6.1 +# Created with package:mono_repo v6.6.2 name: Dart CI on: push: @@ -36,30 +36,39 @@ jobs: name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - name: mono_repo self validate - run: dart pub global activate mono_repo 6.6.1 + run: dart pub global activate mono_repo 6.6.2 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: - name: "analyze_and_format; linux; Dart 3.2.0; PKG: pkgs/http_client_conformance_tests; `dart analyze --fatal-infos`" + name: "analyze_and_format; linux; Dart 3.4.0; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile, pkgs/web_socket, pkgs/web_socket_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http_client_conformance_tests;commands:analyze_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:analyze_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0;packages:pkgs/http_client_conformance_tests - os:ubuntu-latest;pub-cache-hosted;sdk:3.2.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.2.0" + sdk: "3.4.0" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - id: pkgs_http_pub_upgrade + name: pkgs/http; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http + - name: "pkgs/http; dart analyze --fatal-infos" + run: dart analyze --fatal-infos + if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http - id: pkgs_http_client_conformance_tests_pub_upgrade name: pkgs/http_client_conformance_tests; dart pub upgrade run: dart pub upgrade @@ -69,36 +78,15 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_http_client_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http_client_conformance_tests - job_003: - name: "analyze_and_format; linux; Dart 3.3.0; PKGS: pkgs/http, pkgs/web_socket, pkgs/web_socket_conformance_tests; `dart analyze --fatal-infos`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:analyze_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http-pkgs/web_socket-pkgs/web_socket_conformance_tests - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 - with: - sdk: "3.3.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - id: pkgs_http_pub_upgrade - name: pkgs/http; dart pub upgrade + - id: pkgs_http_profile_pub_upgrade + name: pkgs/http_profile; dart pub upgrade run: dart pub upgrade if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http - - name: "pkgs/http; dart analyze --fatal-infos" + working-directory: pkgs/http_profile + - name: "pkgs/http_profile; dart analyze --fatal-infos" run: dart analyze --fatal-infos - if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http + if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_profile - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -117,37 +105,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_web_socket_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/web_socket_conformance_tests - job_004: - name: "analyze_and_format; linux; Dart 3.4.0; PKG: pkgs/http_profile; `dart analyze --fatal-infos`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http_profile;commands:analyze_1" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http_profile - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 - with: - sdk: "3.4.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - id: pkgs_http_profile_pub_upgrade - name: pkgs/http_profile; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http_profile - - name: "pkgs/http_profile; dart analyze --fatal-infos" - run: dart analyze --fatal-infos - if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http_profile - job_005: + job_003: name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile, pkgs/web_socket, pkgs/web_socket_conformance_tests; `dart analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -213,7 +171,7 @@ jobs: run: dart analyze --fatal-infos if: "always() && steps.pkgs_web_socket_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/web_socket_conformance_tests - job_006: + job_004: name: "analyze_and_format; linux; Dart dev; PKGS: pkgs/http, pkgs/http_client_conformance_tests, pkgs/http_profile, pkgs/web_socket, pkgs/web_socket_conformance_tests; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -279,7 +237,7 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_web_socket_conformance_tests_pub_upgrade.conclusion == 'success'" working-directory: pkgs/web_socket_conformance_tests - job_007: + job_005: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `dart format --output=none --set-exit-if-changed .`" runs-on: ubuntu-latest steps: @@ -309,7 +267,7 @@ jobs: run: "dart format --output=none --set-exit-if-changed ." if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_008: + job_006: name: "analyze_and_format; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter analyze --fatal-infos`" runs-on: ubuntu-latest steps: @@ -339,24 +297,24 @@ jobs: run: flutter analyze --fatal-infos if: "always() && steps.pkgs_flutter_http_example_pub_upgrade.conclusion == 'success'" working-directory: pkgs/flutter_http_example - job_009: - name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" + job_007: + name: "unit_test; linux; Dart 3.4.0; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:command_1" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http;commands:command_1" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.3.0" + sdk: "3.4.0" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 @@ -376,26 +334,24 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_010: - name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart test --platform chrome`" + job_008: + name: "unit_test; linux; Dart 3.4.0; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:test_3" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http;commands:test_3" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.3.0" + sdk: "3.4.0" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 @@ -415,26 +371,24 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_011: - name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/http; `dart test --platform vm`" + job_009: + name: "unit_test; linux; Dart 3.4.0; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http;commands:test_2" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http-pkgs/http_profile;commands:test_2" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/http - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http-pkgs/http_profile + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.3.0" + sdk: "3.4.0" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 @@ -447,6 +401,15 @@ jobs: run: dart test --platform vm if: "always() && steps.pkgs_http_pub_upgrade.conclusion == 'success'" working-directory: pkgs/http + - id: pkgs_http_profile_pub_upgrade + name: pkgs/http_profile; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/http_profile + - name: "pkgs/http_profile; dart test --platform vm" + run: dart test --platform vm + if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/http_profile needs: - job_001 - job_002 @@ -454,26 +417,24 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_012: - name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/web_socket; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2js`" + job_010: + name: "unit_test; linux; Dart 3.4.0; PKG: pkgs/web_socket; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2js`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/web_socket;commands:test_6" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/web_socket;commands:test_6" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/web_socket - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/web_socket + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.3.0" + sdk: "3.4.0" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 @@ -493,26 +454,24 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_013: - name: "unit_test; linux; Dart 3.3.0; PKG: pkgs/web_socket; `dart test --test-randomize-ordering-seed=random -p vm`" + job_011: + name: "unit_test; linux; Dart 3.4.0; PKG: pkgs/web_socket; `dart test --test-randomize-ordering-seed=random -p vm`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/web_socket;commands:test_5" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/web_socket;commands:test_5" restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0;packages:pkgs/web_socket - os:ubuntu-latest;pub-cache-hosted;sdk:3.3.0 + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/web_socket + os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: - sdk: "3.3.0" + sdk: "3.4.0" - id: checkout name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 @@ -532,48 +491,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_014: - name: "unit_test; linux; Dart 3.4.0; PKG: pkgs/http_profile; `dart test --platform vm`" - runs-on: ubuntu-latest - steps: - - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 - with: - path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http_profile;commands:test_2" - restore-keys: | - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http_profile - os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0 - os:ubuntu-latest;pub-cache-hosted - os:ubuntu-latest - - name: Setup Dart SDK - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 - with: - sdk: "3.4.0" - - id: checkout - name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - id: pkgs_http_profile_pub_upgrade - name: pkgs/http_profile; dart pub upgrade - run: dart pub upgrade - if: "always() && steps.checkout.conclusion == 'success'" - working-directory: pkgs/http_profile - - name: "pkgs/http_profile; dart test --platform vm" - run: dart test --platform vm - if: "always() && steps.pkgs_http_profile_pub_upgrade.conclusion == 'success'" - working-directory: pkgs/http_profile - needs: - - job_001 - - job_002 - - job_003 - - job_004 - - job_005 - - job_006 - - job_007 - - job_008 - job_015: + job_012: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart run --define=no_default_http_client=true test/no_default_http_client_test.dart`" runs-on: ubuntu-latest steps: @@ -610,9 +528,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_016: + job_013: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --platform chrome`" runs-on: ubuntu-latest steps: @@ -649,9 +565,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_017: + job_014: name: "unit_test; linux; Dart dev; PKGS: pkgs/http, pkgs/http_profile; `dart test --platform vm`" runs-on: ubuntu-latest steps: @@ -697,9 +611,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_018: + job_015: name: "unit_test; linux; Dart dev; PKG: pkgs/http; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm`" runs-on: ubuntu-latest steps: @@ -736,9 +648,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_019: + job_016: name: "unit_test; linux; Dart dev; PKG: pkgs/web_socket; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2js`" runs-on: ubuntu-latest steps: @@ -775,9 +685,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_020: + job_017: name: "unit_test; linux; Dart dev; PKG: pkgs/web_socket; `dart test --test-randomize-ordering-seed=random -p vm`" runs-on: ubuntu-latest steps: @@ -814,9 +722,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_021: + job_018: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test --platform chrome`" runs-on: ubuntu-latest steps: @@ -853,9 +759,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_022: + job_019: name: "unit_test; linux; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: ubuntu-latest steps: @@ -892,9 +796,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_023: + job_020: name: "unit_test; macos; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: macos-latest steps: @@ -931,9 +833,7 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 - job_024: + job_021: name: "unit_test; windows; Flutter stable; PKG: pkgs/flutter_http_example; `flutter test`" runs-on: windows-latest steps: @@ -960,5 +860,3 @@ jobs: - job_004 - job_005 - job_006 - - job_007 - - job_008 diff --git a/.gitignore b/.gitignore index b1696ff164..828cb6ca3a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,119 @@ +# Adapted from https://github.com/flutter/flutter/blob/master/.gitignore + +# Miscellaneous +*.class +*.lock +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws .idea/ + +# Visual Studio Code related .vscode/ +.classpath +.project +.settings/ +.vscode/* -# Don’t commit the following directories created by pub. -.dart_tool +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +**/generated_plugin_registrant.dart .packages +.pub-preload-cache/ +.pub-cache/ +.pub/ +build/ +flutter_*.png +linked_*.ds +unlinked.ds +unlinked_spec.ds pubspec.lock pubspec_overrides.yaml + +# Android related +**/android/**/gradle-wrapper.jar +.gradle/ +**/android/captures/ +**/android/gradlew +**/android/gradlew.bat +**/android/local.properties +**/android/**/GeneratedPluginRegistrant.java +**/android/key.properties +*.jks + +# iOS/XCode related +**/ios/**/*.mode1v3 +**/ios/**/*.mode2v3 +**/ios/**/*.moved-aside +**/ios/**/*.pbxuser +**/ios/**/*.perspectivev3 +**/ios/**/*sync/ +**/ios/**/.sconsign.dblite +**/ios/**/.tags* +**/ios/**/.vagrant/ +**/ios/**/DerivedData/ +**/ios/**/Icon? +**/ios/**/Pods/ +**/ios/**/.symlinks/ +**/ios/**/profile +**/ios/**/xcuserdata +**/ios/.generated/ +**/ios/Flutter/.last_build_id +**/ios/Flutter/App.framework +**/ios/Flutter/Flutter.framework +**/ios/Flutter/Flutter.podspec +**/ios/Flutter/Generated.xcconfig +**/ios/Flutter/ephemeral +**/ios/Flutter/app.flx +**/ios/Flutter/app.zip +**/ios/Flutter/flutter_assets/ +**/ios/Flutter/flutter_export_environment.sh +**/ios/ServiceDefinitions.json +**/ios/Runner/GeneratedPluginRegistrant.* + +# macOS +**/Flutter/ephemeral/ +**/Pods/ +**/macos/Flutter/GeneratedPluginRegistrant.swift +**/macos/Flutter/ephemeral +**/xcuserdata/ + +# Windows +**/windows/flutter/ephemeral/ +**/windows/flutter/generated_plugin_registrant.cc +**/windows/flutter/generated_plugin_registrant.h +**/windows/flutter/generated_plugins.cmake + +# Linux +**/linux/flutter/ephemeral/ +**/linux/flutter/generated_plugin_registrant.cc +**/linux/flutter/generated_plugin_registrant.h +**/linux/flutter/generated_plugins.cmake + +# Coverage +coverage/ + +# Symbols +app.*.symbols + +# Exceptions to above rules. +!**/ios/**/default.mode1v3 +!**/ios/**/default.mode2v3 +!**/ios/**/default.pbxuser +!**/ios/**/default.perspectivev3 +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages +!/dev/ci/**/Gemfile.lock +!.vscode/settings.json \ No newline at end of file diff --git a/pkgs/cupertino_http/.gitattributes b/pkgs/cupertino_http/.gitattributes index d1c5cc3aee..472b1abfbd 100644 --- a/pkgs/cupertino_http/.gitattributes +++ b/pkgs/cupertino_http/.gitattributes @@ -1,5 +1,3 @@ # ffigen generated code lib/src/native_cupertino_bindings.dart linguist-generated - -# vendored Dart API code -src/dart-sdk/** linguist-vendored +darwin/cupertino_http/Sources/cupertino_http/native_cupertino_bindings.m linguist-generated diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 4667f6ab1f..04b2ed6a65 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,4 +1,23 @@ -## 1.5.2-wip +## 2.0.0-wip + +* The behavior of `CupertinoClient` and `CupertinoWebSocket` has not changed. +* **Breaking:** `MutableURLRequest.httpBodyStream` now takes a `NSInputStream` + instead of a `Stream>`. +* **Breaking:** The following enums/classes previous defined by + `package:cupertino_http` are now imported from `package:objective_c`: + * `NSData` + * `NSError` + * `NSHTTPCookieAcceptPolicy` + * `NSMutableData` + * `NSURLRequestCachePolicy` + * `NSURLRequestNetworkServiceType` + * `NSURLSessionMultipathServiceType` + * `NSURLSessionResponseDisposition` + * `NSURLSessionTaskState` + * `NSURLSessionWebSocketCloseCode` + * `NSURLSessionWebSocketMessageType` +* **Breaking:** `URLSession.dataTaskWithCompletionHandler` is no longer + supported for background sessions. ## 1.5.1 diff --git a/pkgs/cupertino_http/darwin/Classes/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/darwin/Classes/CUPHTTPClientDelegate.m deleted file mode 100644 index 5b375ca3b4..0000000000 --- a/pkgs/cupertino_http/darwin/Classes/CUPHTTPClientDelegate.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPClientDelegate.m" diff --git a/pkgs/cupertino_http/darwin/Classes/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/darwin/Classes/CUPHTTPCompletionHelper.m deleted file mode 100644 index b05d1fc717..0000000000 --- a/pkgs/cupertino_http/darwin/Classes/CUPHTTPCompletionHelper.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPCompletionHelper.m" diff --git a/pkgs/cupertino_http/darwin/Classes/CUPHTTPForwardedDelegate.m b/pkgs/cupertino_http/darwin/Classes/CUPHTTPForwardedDelegate.m deleted file mode 100644 index 39c9e02729..0000000000 --- a/pkgs/cupertino_http/darwin/Classes/CUPHTTPForwardedDelegate.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPForwardedDelegate.m" diff --git a/pkgs/cupertino_http/darwin/Classes/CUPHTTPStreamToNSInputStreamAdapter.m b/pkgs/cupertino_http/darwin/Classes/CUPHTTPStreamToNSInputStreamAdapter.m deleted file mode 100644 index 46eb84ba89..0000000000 --- a/pkgs/cupertino_http/darwin/Classes/CUPHTTPStreamToNSInputStreamAdapter.m +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/CUPHTTPStreamToNSInputStreamAdapter.m" diff --git a/pkgs/cupertino_http/darwin/Classes/dart_api_dl.c b/pkgs/cupertino_http/darwin/Classes/dart_api_dl.c deleted file mode 100644 index 023f80ab06..0000000000 --- a/pkgs/cupertino_http/darwin/Classes/dart_api_dl.c +++ /dev/null @@ -1 +0,0 @@ -#include "../../src/dart-sdk/include/dart_api_dl.c" diff --git a/pkgs/cupertino_http/darwin/cupertino_http.podspec b/pkgs/cupertino_http/darwin/cupertino_http.podspec index c3e47bac03..0b44154cb6 100644 --- a/pkgs/cupertino_http/darwin/cupertino_http.podspec +++ b/pkgs/cupertino_http/darwin/cupertino_http.podspec @@ -12,18 +12,13 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http' s.license = { :type => 'BSD', :file => '../LICENSE' } s.author = { 'TODO' => 'use-valid-author' } + s.source = { :http => 'https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http' } - # This will ensure the source files in Classes/ are included in the native - # builds of apps using this FFI plugin. Podspec does not support relative - # paths, so Classes contains a forwarder C file that relatively imports - # `../src/*` so that the C sources can be shared among all target platforms. - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' + s.source_files = 'cupertino_http/Sources/cupertino_http/**/*' s.ios.dependency 'Flutter' s.osx.dependency 'FlutterMacOS' - s.ios.deployment_target = '12.0' - s.osx.deployment_target = '10.14' - s.requires_arc = [] + s.ios.deployment_target = '13.0' # Required for NSURLSessionWebSocketDelegate. + s.osx.deployment_target = '10.15' # Required for NSURLSessionWebSocketDelegate. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } s.swift_version = '5.0' diff --git a/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/native_cupertino_bindings.m b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/native_cupertino_bindings.m new file mode 100644 index 0000000000..20bed4c2b7 --- /dev/null +++ b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/native_cupertino_bindings.m @@ -0,0 +1,284 @@ +#include +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import "utils.h" + +#if !__has_feature(objc_arc) +#error "This file must be compiled with ARC enabled" +#endif + +id objc_retain(id); +id objc_retainBlock(id); + +typedef void (^_ListenerTrampoline)(); +_ListenerTrampoline _wrapListenerBlock_ksby9f(_ListenerTrampoline block) NS_RETURNS_RETAINED { + return ^void() { + objc_retainBlock(block); + block(); + }; +} + +typedef void (^_ListenerTrampoline1)(void * arg0); +_ListenerTrampoline1 _wrapListenerBlock_hepzs(_ListenerTrampoline1 block) NS_RETURNS_RETAINED { + return ^void(void * arg0) { + objc_retainBlock(block); + block(arg0); + }; +} + +typedef void (^_ListenerTrampoline2)(void * arg0, id arg1); +_ListenerTrampoline2 _wrapListenerBlock_sjfpmz(_ListenerTrampoline2 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1)); + }; +} + +typedef void (^_ListenerTrampoline3)(id arg0); +_ListenerTrampoline3 _wrapListenerBlock_ukcdfq(_ListenerTrampoline3 block) NS_RETURNS_RETAINED { + return ^void(id arg0) { + objc_retainBlock(block); + block(objc_retain(arg0)); + }; +} + +typedef void (^_ListenerTrampoline4)(struct __CFRunLoopObserver * arg0, CFRunLoopActivity arg1); +_ListenerTrampoline4 _wrapListenerBlock_ttt6u1(_ListenerTrampoline4 block) NS_RETURNS_RETAINED { + return ^void(struct __CFRunLoopObserver * arg0, CFRunLoopActivity arg1) { + objc_retainBlock(block); + block(arg0, arg1); + }; +} + +typedef void (^_ListenerTrampoline5)(struct __CFRunLoopTimer * arg0); +_ListenerTrampoline5 _wrapListenerBlock_1txhfzs(_ListenerTrampoline5 block) NS_RETURNS_RETAINED { + return ^void(struct __CFRunLoopTimer * arg0) { + objc_retainBlock(block); + block(arg0); + }; +} + +typedef void (^_ListenerTrampoline6)(size_t arg0); +_ListenerTrampoline6 _wrapListenerBlock_1hmngv6(_ListenerTrampoline6 block) NS_RETURNS_RETAINED { + return ^void(size_t arg0) { + objc_retainBlock(block); + block(arg0); + }; +} + +typedef void (^_ListenerTrampoline7)(id arg0, int arg1); +_ListenerTrampoline7 _wrapListenerBlock_108ugvk(_ListenerTrampoline7 block) NS_RETURNS_RETAINED { + return ^void(id arg0, int arg1) { + objc_retainBlock(block); + block(objc_retain(arg0), arg1); + }; +} + +typedef void (^_ListenerTrampoline8)(int arg0); +_ListenerTrampoline8 _wrapListenerBlock_1afulej(_ListenerTrampoline8 block) NS_RETURNS_RETAINED { + return ^void(int arg0) { + objc_retainBlock(block); + block(arg0); + }; +} + +typedef void (^_ListenerTrampoline9)(BOOL arg0, id arg1, int arg2); +_ListenerTrampoline9 _wrapListenerBlock_elldw5(_ListenerTrampoline9 block) NS_RETURNS_RETAINED { + return ^void(BOOL arg0, id arg1, int arg2) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1), arg2); + }; +} + +typedef void (^_ListenerTrampoline10)(struct __SecTrust * arg0, SecTrustResultType arg1); +_ListenerTrampoline10 _wrapListenerBlock_129ffij(_ListenerTrampoline10 block) NS_RETURNS_RETAINED { + return ^void(struct __SecTrust * arg0, SecTrustResultType arg1) { + objc_retainBlock(block); + block(arg0, arg1); + }; +} + +typedef void (^_ListenerTrampoline11)(struct __SecTrust * arg0, BOOL arg1, struct __CFError * arg2); +_ListenerTrampoline11 _wrapListenerBlock_1458n52(_ListenerTrampoline11 block) NS_RETURNS_RETAINED { + return ^void(struct __SecTrust * arg0, BOOL arg1, struct __CFError * arg2) { + objc_retainBlock(block); + block(arg0, arg1, arg2); + }; +} + +typedef void (^_ListenerTrampoline12)(uint16_t arg0); +_ListenerTrampoline12 _wrapListenerBlock_yo3tv0(_ListenerTrampoline12 block) NS_RETURNS_RETAINED { + return ^void(uint16_t arg0) { + objc_retainBlock(block); + block(arg0); + }; +} + +typedef void (^_ListenerTrampoline13)(id arg0, id arg1); +_ListenerTrampoline13 _wrapListenerBlock_1tjlcwl(_ListenerTrampoline13 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1) { + objc_retainBlock(block); + block(objc_retain(arg0), objc_retain(arg1)); + }; +} + +typedef void (^_ListenerTrampoline14)(id arg0, id arg1, id arg2); +_ListenerTrampoline14 _wrapListenerBlock_10t0qpd(_ListenerTrampoline14 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1, id arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), objc_retain(arg1), objc_retainBlock(arg2)); + }; +} + +typedef void (^_ListenerTrampoline15)(id arg0, id arg1); +_ListenerTrampoline15 _wrapListenerBlock_cmbt6k(_ListenerTrampoline15 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1) { + objc_retainBlock(block); + block(objc_retain(arg0), objc_retainBlock(arg1)); + }; +} + +typedef void (^_ListenerTrampoline16)(BOOL arg0); +_ListenerTrampoline16 _wrapListenerBlock_117qins(_ListenerTrampoline16 block) NS_RETURNS_RETAINED { + return ^void(BOOL arg0) { + objc_retainBlock(block); + block(arg0); + }; +} + +typedef void (^_ListenerTrampoline17)(id arg0, id arg1, id arg2); +_ListenerTrampoline17 _wrapListenerBlock_tenbla(_ListenerTrampoline17 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1, id arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), objc_retain(arg1), objc_retain(arg2)); + }; +} + +typedef void (^_ListenerTrampoline18)(id arg0, BOOL arg1, id arg2); +_ListenerTrampoline18 _wrapListenerBlock_hfhq9m(_ListenerTrampoline18 block) NS_RETURNS_RETAINED { + return ^void(id arg0, BOOL arg1, id arg2) { + objc_retainBlock(block); + block(objc_retain(arg0), arg1, objc_retain(arg2)); + }; +} + +typedef void (^_ListenerTrampoline19)(void * arg0, id arg1, id arg2); +_ListenerTrampoline19 _wrapListenerBlock_tm2na8(_ListenerTrampoline19 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1), objc_retain(arg2)); + }; +} + +typedef void (^_ListenerTrampoline20)(NSURLSessionAuthChallengeDisposition arg0, id arg1); +_ListenerTrampoline20 _wrapListenerBlock_1najo2h(_ListenerTrampoline20 block) NS_RETURNS_RETAINED { + return ^void(NSURLSessionAuthChallengeDisposition arg0, id arg1) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1)); + }; +} + +typedef void (^_ListenerTrampoline21)(void * arg0, id arg1, id arg2, id arg3); +_ListenerTrampoline21 _wrapListenerBlock_1wmulza(_ListenerTrampoline21 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, id arg3) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retainBlock(arg3)); + }; +} + +typedef void (^_ListenerTrampoline22)(NSURLSessionDelayedRequestDisposition arg0, id arg1); +_ListenerTrampoline22 _wrapListenerBlock_wnmjgj(_ListenerTrampoline22 block) NS_RETURNS_RETAINED { + return ^void(NSURLSessionDelayedRequestDisposition arg0, id arg1) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1)); + }; +} + +typedef void (^_ListenerTrampoline23)(void * arg0, id arg1, id arg2, id arg3, id arg4); +_ListenerTrampoline23 _wrapListenerBlock_1nnj9ov(_ListenerTrampoline23 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, id arg3, id arg4) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retain(arg3), objc_retainBlock(arg4)); + }; +} + +typedef void (^_ListenerTrampoline24)(void * arg0, id arg1, id arg2, id arg3, id arg4, id arg5); +_ListenerTrampoline24 _wrapListenerBlock_dmve6(_ListenerTrampoline24 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, id arg3, id arg4, id arg5) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retain(arg3), objc_retain(arg4), objc_retainBlock(arg5)); + }; +} + +typedef void (^_ListenerTrampoline25)(void * arg0, id arg1, id arg2, int64_t arg3, id arg4); +_ListenerTrampoline25 _wrapListenerBlock_qxeqyf(_ListenerTrampoline25 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, int64_t arg3, id arg4) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1), objc_retain(arg2), arg3, objc_retainBlock(arg4)); + }; +} + +typedef void (^_ListenerTrampoline26)(void * arg0, id arg1, id arg2, int64_t arg3, int64_t arg4, int64_t arg5); +_ListenerTrampoline26 _wrapListenerBlock_jzggzf(_ListenerTrampoline26 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, int64_t arg3, int64_t arg4, int64_t arg5) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1), objc_retain(arg2), arg3, arg4, arg5); + }; +} + +typedef void (^_ListenerTrampoline27)(void * arg0, id arg1, id arg2, id arg3); +_ListenerTrampoline27 _wrapListenerBlock_1a6kixf(_ListenerTrampoline27 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, id arg3) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retain(arg3)); + }; +} + +typedef void (^_ListenerTrampoline28)(NSURLSessionResponseDisposition arg0); +_ListenerTrampoline28 _wrapListenerBlock_ci81hw(_ListenerTrampoline28 block) NS_RETURNS_RETAINED { + return ^void(NSURLSessionResponseDisposition arg0) { + objc_retainBlock(block); + block(arg0); + }; +} + +typedef void (^_ListenerTrampoline29)(void * arg0, id arg1, id arg2, int64_t arg3, int64_t arg4); +_ListenerTrampoline29 _wrapListenerBlock_1wl7fts(_ListenerTrampoline29 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, int64_t arg3, int64_t arg4) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1), objc_retain(arg2), arg3, arg4); + }; +} + +typedef void (^_ListenerTrampoline30)(void * arg0, id arg1, id arg2, id arg3, id arg4); +_ListenerTrampoline30 _wrapListenerBlock_no6pyg(_ListenerTrampoline30 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, id arg3, id arg4) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retain(arg3), objc_retain(arg4)); + }; +} + +typedef void (^_ListenerTrampoline31)(void * arg0, id arg1, id arg2, NSURLSessionWebSocketCloseCode arg3, id arg4); +_ListenerTrampoline31 _wrapListenerBlock_10hgvcc(_ListenerTrampoline31 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, NSURLSessionWebSocketCloseCode arg3, id arg4) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1), objc_retain(arg2), arg3, objc_retain(arg4)); + }; +} + +typedef void (^_ListenerTrampoline32)(id arg0, id arg1, id arg2, id arg3); +_ListenerTrampoline32 _wrapListenerBlock_19b8ge5(_ListenerTrampoline32 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1, id arg2, id arg3) { + objc_retainBlock(block); + block(objc_retain(arg0), objc_retain(arg1), objc_retain(arg2), objc_retain(arg3)); + }; +} diff --git a/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.h b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.h new file mode 100644 index 0000000000..3dd8b2ae02 --- /dev/null +++ b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.h @@ -0,0 +1,19 @@ +#import +#import +#import +#include + +#if !__has_feature(objc_arc) +#error "This file must be compiled with ARC enabled" +#endif + +typedef void (^_DidFinish)(void *, NSURLSession *session, + NSURLSessionDownloadTask *downloadTask, + NSURL *location); +typedef void (^_DidFinishWithLock)(NSCondition *lock, NSURLSession *session, + NSURLSessionDownloadTask *downloadTask, + NSURL *location); +/// Create a block useable as a +/// `URLSession:downloadTask:didFinishDownloadingToURL:` that can be used to +/// make an async Dart callback behave synchronously. +_DidFinish adaptFinishWithLock(_DidFinishWithLock block); diff --git a/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m new file mode 100644 index 0000000000..ff5f771f5d --- /dev/null +++ b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m @@ -0,0 +1,21 @@ +#import "utils.h" + +_DidFinish adaptFinishWithLock(_DidFinishWithLock block) { + return ^void(void *, NSURLSession *session, + NSURLSessionDownloadTask *downloadTask, NSURL *location) { + NSCondition *lock = [[NSCondition alloc] init]; + [lock lock]; + block(lock, session, downloadTask, location); + [lock lock]; + [lock unlock]; + }; +} + +void doNotCall() { + // TODO(https://github.com/dart-lang/native/issues/1672): Remove + // when fixed. + // Force the protocol information to be available at runtime. + @protocol (NSURLSessionDataDelegate); + @protocol (NSURLSessionDownloadDelegate); + @protocol (NSURLSessionWebSocketDelegate); +} diff --git a/pkgs/cupertino_http/example/.gitignore b/pkgs/cupertino_http/example/.gitignore index a8e938c083..221b42254f 100644 --- a/pkgs/cupertino_http/example/.gitignore +++ b/pkgs/cupertino_http/example/.gitignore @@ -5,9 +5,11 @@ *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ migrate_working_dir/ # IntelliJ related diff --git a/pkgs/cupertino_http/example/integration_test/data_test.dart b/pkgs/cupertino_http/example/integration_test/data_test.dart deleted file mode 100644 index 981bcef614..0000000000 --- a/pkgs/cupertino_http/example/integration_test/data_test.dart +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'dart:typed_data'; - -import 'package:cupertino_http/cupertino_http.dart'; -import 'package:integration_test/integration_test.dart'; -import 'package:test/test.dart'; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - group('empty data', () { - final data = Data.fromList([]); - - test('length', () => expect(data.length, 0)); - test('bytes', () => expect(data.bytes, Uint8List(0))); - test('toString', data.toString); // Just verify that there is no crash. - }); - - group('non-empty data', () { - final data = Data.fromList([1, 2, 3, 4, 5]); - test('length', () => expect(data.length, 5)); - test( - 'bytes', () => expect(data.bytes, Uint8List.fromList([1, 2, 3, 4, 5]))); - test('toString', data.toString); // Just verify that there is no crash. - }); - - group('Data.fromData', () { - test('from empty', () { - final from = Data.fromList([]); - expect(Data.fromData(from).bytes, Uint8List(0)); - }); - - test('from non-empty', () { - final from = Data.fromList([1, 2, 3, 4, 5]); - expect(Data.fromData(from).bytes, Uint8List.fromList([1, 2, 3, 4, 5])); - }); - }); -} diff --git a/pkgs/cupertino_http/example/integration_test/error_test.dart b/pkgs/cupertino_http/example/integration_test/error_test.dart deleted file mode 100644 index 06216519c8..0000000000 --- a/pkgs/cupertino_http/example/integration_test/error_test.dart +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. 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:cupertino_http/cupertino_http.dart'; -import 'package:integration_test/integration_test.dart'; -import 'package:test/test.dart'; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - group('error', () { - test('simple', () { - final e = Error.fromCustomDomain('test domain', 123); - expect(e.code, 123); - expect(e.domain, 'test domain'); - expect(e.localizedDescription, - allOf(contains('test domain'), contains('123'))); - expect(e.localizedFailureReason, null); - expect(e.localizedRecoverySuggestion, null); - expect(e.toString(), allOf(contains('test domain'), contains('123'))); - }); - - test('localized description', () { - final e = Error.fromCustomDomain('test domain', 123, - localizedDescription: 'This is a description'); - expect(e.code, 123); - expect(e.domain, 'test domain'); - expect(e.localizedDescription, 'This is a description'); - expect(e.localizedFailureReason, null); - expect(e.localizedRecoverySuggestion, null); - expect( - e.toString(), - allOf(contains('test domain'), contains('123'), - contains('This is a description'))); - }); - }); -} diff --git a/pkgs/cupertino_http/example/integration_test/http_url_response_test.dart b/pkgs/cupertino_http/example/integration_test/http_url_response_test.dart index ae3f5f883e..5e29620a4b 100644 --- a/pkgs/cupertino_http/example/integration_test/http_url_response_test.dart +++ b/pkgs/cupertino_http/example/integration_test/http_url_response_test.dart @@ -28,7 +28,8 @@ void main() { final task = session.dataTaskWithRequest( URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) ..resume(); - while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + while ( + task.state != NSURLSessionTaskState.NSURLSessionTaskStateCompleted) { // Let the event loop run. await Future(() {}); } diff --git a/pkgs/cupertino_http/example/integration_test/main.dart b/pkgs/cupertino_http/example/integration_test/main.dart index a632b0c40a..14a7ba9bcf 100644 --- a/pkgs/cupertino_http/example/integration_test/main.dart +++ b/pkgs/cupertino_http/example/integration_test/main.dart @@ -7,10 +7,7 @@ import 'package:integration_test/integration_test.dart'; import 'client_conformance_test.dart' as client_conformance_test; import 'client_profile_test.dart' as profile_test; import 'client_test.dart' as client_test; -import 'data_test.dart' as data_test; -import 'error_test.dart' as error_test; import 'http_url_response_test.dart' as http_url_response_test; -import 'mutable_data_test.dart' as mutable_data_test; import 'mutable_url_request_test.dart' as mutable_url_request_test; import 'url_cache_test.dart' as url_cache_test; import 'url_request_test.dart' as url_request_test; @@ -33,10 +30,7 @@ void main() { client_conformance_test.main(); profile_test.main(); client_test.main(); - data_test.main(); - error_test.main(); http_url_response_test.main(); - mutable_data_test.main(); mutable_url_request_test.main(); url_cache_test.main(); url_request_test.main(); diff --git a/pkgs/cupertino_http/example/integration_test/mutable_data_test.dart b/pkgs/cupertino_http/example/integration_test/mutable_data_test.dart deleted file mode 100644 index f323574c5d..0000000000 --- a/pkgs/cupertino_http/example/integration_test/mutable_data_test.dart +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'dart:typed_data'; - -import 'package:cupertino_http/cupertino_http.dart'; -import 'package:integration_test/integration_test.dart'; -import 'package:test/test.dart'; - -void main() { - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - group('empty data', () { - final data = MutableData.empty(); - - test('length', () => expect(data.length, 0)); - test('bytes', () => expect(data.bytes, Uint8List(0))); - test('toString', data.toString); // Just verify that there is no crash. - }); - - group('appendBytes', () { - test('append no bytes', () { - final data = MutableData.empty()..appendBytes([]); - expect(data.bytes, Uint8List(0)); - data.toString(); // Just verify that there is no crash. - }); - - test('append some bytes', () { - final data = MutableData.empty()..appendBytes([1, 2, 3, 4, 5]); - expect(data.bytes, Uint8List.fromList([1, 2, 3, 4, 5])); - data.appendBytes([6, 7, 8, 9, 10]); - expect(data.bytes, Uint8List.fromList([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])); - data.toString(); // Just verify that there is no crash. - }); - }); -} diff --git a/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart b/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart index 9239d07511..446b1ee95f 100644 --- a/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart +++ b/pkgs/cupertino_http/example/integration_test/mutable_url_request_test.dart @@ -6,6 +6,7 @@ import 'dart:typed_data'; import 'package:cupertino_http/cupertino_http.dart'; import 'package:integration_test/integration_test.dart'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; void main() { @@ -18,9 +19,10 @@ void main() { setUp(() => request = MutableURLRequest.fromUrl(uri)); test('set', () { - request.cachePolicy = URLRequestCachePolicy.returnCacheDataDontLoad; - expect( - request.cachePolicy, URLRequestCachePolicy.returnCacheDataDontLoad); + request.cachePolicy = + NSURLRequestCachePolicy.NSURLRequestReturnCacheDataDontLoad; + expect(request.cachePolicy, + NSURLRequestCachePolicy.NSURLRequestReturnCacheDataDontLoad); request.toString(); // Just verify that there is no crash. }); }); @@ -47,13 +49,13 @@ void main() { test('empty', () => expect(request.httpBody, null)); test('set', () { - request.httpBody = Data.fromList([1, 2, 3]); - expect(request.httpBody!.bytes, Uint8List.fromList([1, 2, 3])); + request.httpBody = [1, 2, 3].toNSData(); + expect(request.httpBody!.toList(), Uint8List.fromList([1, 2, 3])); request.toString(); // Just verify that there is no crash. }); test('set to null', () { request - ..httpBody = Data.fromList([1, 2, 3]) + ..httpBody = [1, 2, 3].toNSData() ..httpBody = null; expect(request.httpBody, null); }); diff --git a/pkgs/cupertino_http/example/integration_test/url_cache_test.dart b/pkgs/cupertino_http/example/integration_test/url_cache_test.dart index 4b55b1a3c9..133a5d9695 100644 --- a/pkgs/cupertino_http/example/integration_test/url_cache_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_cache_test.dart @@ -56,6 +56,7 @@ void main() { await doRequest(session); expect(uncachedRequestCount, 2); + session.finishTasksAndInvalidate(); }); test('with cache', () async { @@ -67,6 +68,7 @@ void main() { await doRequest(session); expect(uncachedRequestCount, 1); + session.finishTasksAndInvalidate(); }); }); } diff --git a/pkgs/cupertino_http/example/integration_test/url_request_test.dart b/pkgs/cupertino_http/example/integration_test/url_request_test.dart index 86ce7e8007..266d578c41 100644 --- a/pkgs/cupertino_http/example/integration_test/url_request_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_request_test.dart @@ -19,7 +19,8 @@ void main() { expect(request.httpBody, null); expect(request.timeoutInterval, const Duration(minutes: 1)); - expect(request.cachePolicy, URLRequestCachePolicy.useProtocolCachePolicy); + expect(request.cachePolicy, + NSURLRequestCachePolicy.NSURLRequestUseProtocolCachePolicy); request.toString(); // Just verify that there is no crash. }); @@ -33,7 +34,8 @@ void main() { expect(request.httpBody, null); expect(request.timeoutInterval, const Duration(minutes: 1)); - expect(request.cachePolicy, URLRequestCachePolicy.useProtocolCachePolicy); + expect(request.cachePolicy, + NSURLRequestCachePolicy.NSURLRequestUseProtocolCachePolicy); request.toString(); // Just verify that there is no crash. }); @@ -47,7 +49,8 @@ void main() { expect(request.httpBody, null); expect(request.timeoutInterval, const Duration(minutes: 1)); - expect(request.cachePolicy, URLRequestCachePolicy.useProtocolCachePolicy); + expect(request.cachePolicy, + NSURLRequestCachePolicy.NSURLRequestUseProtocolCachePolicy); request.toString(); // Just verify that there is no crash. }); diff --git a/pkgs/cupertino_http/example/integration_test/url_response_test.dart b/pkgs/cupertino_http/example/integration_test/url_response_test.dart index 777ec68e6a..908996d9e7 100644 --- a/pkgs/cupertino_http/example/integration_test/url_response_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_response_test.dart @@ -16,7 +16,8 @@ void main() { final task = session.dataTaskWithRequest(URLRequest.fromUrl( Uri.parse('data:text/fancy;charset=utf-8,Hello%20World'))) ..resume(); - while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + while ( + task.state != NSURLSessionTaskState.NSURLSessionTaskStateCompleted) { // Let the event loop run. await Future.delayed(const Duration()); } diff --git a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart index ab117c37d0..e316e80bb3 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_configuration_test.dart @@ -26,7 +26,7 @@ Future>> sentHeaders( final task = session.dataTaskWithRequest(URLRequest.fromUrl( Uri(scheme: 'http', host: 'localhost', port: server.port))) ..resume(); - while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + while (task.state != NSURLSessionTaskState.NSURLSessionTaskStateCompleted) { await pumpEventQueue(); } @@ -78,13 +78,13 @@ void testProperties(URLSessionConfiguration config) { }); test('httpCookieAcceptPolicy', () { config.httpCookieAcceptPolicy = - HTTPCookieAcceptPolicy.httpCookieAcceptPolicyAlways; + NSHTTPCookieAcceptPolicy.NSHTTPCookieAcceptPolicyAlways; expect(config.httpCookieAcceptPolicy, - HTTPCookieAcceptPolicy.httpCookieAcceptPolicyAlways); + NSHTTPCookieAcceptPolicy.NSHTTPCookieAcceptPolicyAlways); config.httpCookieAcceptPolicy = - HTTPCookieAcceptPolicy.httpCookieAcceptPolicyNever; + NSHTTPCookieAcceptPolicy.NSHTTPCookieAcceptPolicyNever; expect(config.httpCookieAcceptPolicy, - HTTPCookieAcceptPolicy.httpCookieAcceptPolicyNever); + NSHTTPCookieAcceptPolicy.NSHTTPCookieAcceptPolicyNever); }); test('httpMaximumConnectionsPerHost', () { config.httpMaximumConnectionsPerHost = 6; @@ -105,37 +105,44 @@ void testProperties(URLSessionConfiguration config) { expect(config.httpShouldUsePipelining, false); }); test('multipathServiceType', () { - expect(config.multipathServiceType, - URLSessionMultipathServiceType.multipathServiceTypeNone); + expect( + config.multipathServiceType, + NSURLSessionMultipathServiceType + .NSURLSessionMultipathServiceTypeNone); + config.multipathServiceType = NSURLSessionMultipathServiceType + .NSURLSessionMultipathServiceTypeAggregate; + expect( + config.multipathServiceType, + NSURLSessionMultipathServiceType + .NSURLSessionMultipathServiceTypeAggregate); config.multipathServiceType = - URLSessionMultipathServiceType.multipathServiceTypeAggregate; - expect(config.multipathServiceType, - URLSessionMultipathServiceType.multipathServiceTypeAggregate); - config.multipathServiceType = - URLSessionMultipathServiceType.multipathServiceTypeNone; - expect(config.multipathServiceType, - URLSessionMultipathServiceType.multipathServiceTypeNone); + NSURLSessionMultipathServiceType.NSURLSessionMultipathServiceTypeNone; + expect( + config.multipathServiceType, + NSURLSessionMultipathServiceType + .NSURLSessionMultipathServiceTypeNone); }); test('networkServiceType', () { expect(config.networkServiceType, - URLRequestNetworkService.networkServiceTypeDefault); + NSURLRequestNetworkServiceType.NSURLNetworkServiceTypeDefault); config.networkServiceType = - URLRequestNetworkService.networkServiceTypeResponsiveData; + NSURLRequestNetworkServiceType.NSURLNetworkServiceTypeResponsiveAV; expect(config.networkServiceType, - URLRequestNetworkService.networkServiceTypeResponsiveData); + NSURLRequestNetworkServiceType.NSURLNetworkServiceTypeResponsiveAV); config.networkServiceType = - URLRequestNetworkService.networkServiceTypeDefault; + NSURLRequestNetworkServiceType.NSURLNetworkServiceTypeDefault; expect(config.networkServiceType, - URLRequestNetworkService.networkServiceTypeDefault); + NSURLRequestNetworkServiceType.NSURLNetworkServiceTypeDefault); }); test('requestCachePolicy', () { - config.requestCachePolicy = URLRequestCachePolicy.returnCacheDataDontLoad; + config.requestCachePolicy = + NSURLRequestCachePolicy.NSURLRequestReturnCacheDataDontLoad; expect(config.requestCachePolicy, - URLRequestCachePolicy.returnCacheDataDontLoad); + NSURLRequestCachePolicy.NSURLRequestReturnCacheDataDontLoad); config.requestCachePolicy = - URLRequestCachePolicy.reloadIgnoringLocalCacheData; + NSURLRequestCachePolicy.NSURLRequestReloadIgnoringLocalCacheData; expect(config.requestCachePolicy, - URLRequestCachePolicy.reloadIgnoringLocalCacheData); + NSURLRequestCachePolicy.NSURLRequestReloadIgnoringLocalCacheData); }); test('sessionSendsLaunchEvents', () { config.sessionSendsLaunchEvents = true; diff --git a/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart index 0d86694c09..6baa5e6ca9 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_delegate_test.dart @@ -8,9 +8,10 @@ import 'dart:io'; import 'package:cupertino_http/cupertino_http.dart'; import 'package:integration_test/integration_test.dart'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; -void testOnComplete(URLSessionConfiguration config) { +void testOnComplete(URLSessionConfiguration Function() config) { group('onComplete', () { late HttpServer server; @@ -29,12 +30,12 @@ void testOnComplete(URLSessionConfiguration config) { test('success', () async { final c = Completer(); - Error? actualError; + NSError? actualError; late URLSession actualSession; late URLSessionTask actualTask; final session = - URLSession.sessionWithConfiguration(config, onComplete: (s, t, e) { + URLSession.sessionWithConfiguration(config(), onComplete: (s, t, e) { actualSession = s; actualTask = t; actualError = e; @@ -49,16 +50,17 @@ void testOnComplete(URLSessionConfiguration config) { expect(actualSession, session); expect(actualTask, task); expect(actualError, null); + session.finishTasksAndInvalidate(); }); test('bad host', () async { final c = Completer(); - Error? actualError; + NSError? actualError; late URLSession actualSession; late URLSessionTask actualTask; final session = - URLSession.sessionWithConfiguration(config, onComplete: (s, t, e) { + URLSession.sessionWithConfiguration(config(), onComplete: (s, t, e) { actualSession = s; actualTask = t; actualError = e; @@ -77,11 +79,12 @@ void testOnComplete(URLSessionConfiguration config) { -1001, // kCFURLErrorTimedOut -1003, // kCFURLErrorCannotFindHost )); + session.finishTasksAndInvalidate(); }); }); } -void testOnResponse(URLSessionConfiguration config) { +void testOnResponse(URLSessionConfiguration Function() config) { group('onResponse', () { late HttpServer server; @@ -105,12 +108,12 @@ void testOnResponse(URLSessionConfiguration config) { late URLSessionTask actualTask; final session = - URLSession.sessionWithConfiguration(config, onResponse: (s, t, r) { + URLSession.sessionWithConfiguration(config(), onResponse: (s, t, r) { actualSession = s; actualTask = t; actualResponse = r as HTTPURLResponse; c.complete(); - return URLSessionResponseDisposition.urlSessionResponseAllow; + return NSURLSessionResponseDisposition.NSURLSessionResponseAllow; }); final task = session.dataTaskWithRequest( @@ -120,6 +123,7 @@ void testOnResponse(URLSessionConfiguration config) { expect(actualSession, session); expect(actualTask, task); expect(actualResponse.statusCode, 200); + session.finishTasksAndInvalidate(); }); test('bad host', () async { @@ -127,11 +131,11 @@ void testOnResponse(URLSessionConfiguration config) { final c = Completer(); var called = false; - final session = URLSession.sessionWithConfiguration(config, + final session = URLSession.sessionWithConfiguration(config(), onComplete: (session, task, error) => c.complete(), onResponse: (s, t, r) { called = true; - return URLSessionResponseDisposition.urlSessionResponseAllow; + return NSURLSessionResponseDisposition.NSURLSessionResponseAllow; }); session @@ -140,11 +144,12 @@ void testOnResponse(URLSessionConfiguration config) { .resume(); await c.future; expect(called, false); + session.finishTasksAndInvalidate(); }); }); } -void testOnData(URLSessionConfiguration config) { +void testOnData(URLSessionConfiguration Function() config) { group('onData', () { late HttpServer server; @@ -163,16 +168,16 @@ void testOnData(URLSessionConfiguration config) { test('success', () async { final c = Completer(); - final actualData = MutableData.empty(); + final actualData = NSMutableData.data(); late URLSession actualSession; late URLSessionTask actualTask; - final session = URLSession.sessionWithConfiguration(config, + final session = URLSession.sessionWithConfiguration(config(), onComplete: (s, t, r) => c.complete(), onData: (s, t, d) { actualSession = s; actualTask = t; - actualData.appendBytes(d.bytes); + actualData.appendData_(d); }); final task = session.dataTaskWithRequest( @@ -181,12 +186,13 @@ void testOnData(URLSessionConfiguration config) { await c.future; expect(actualSession, session); expect(actualTask, task); - expect(actualData.bytes, 'Hello World'.codeUnits); + expect(actualData.toList(), 'Hello World'.codeUnits); + session.finishTasksAndInvalidate(); }); }); } -void testOnFinishedDownloading(URLSessionConfiguration config) { +void testOnFinishedDownloading(URLSessionConfiguration Function() config) { group('onFinishedDownloading', () { late HttpServer server; @@ -209,7 +215,7 @@ void testOnFinishedDownloading(URLSessionConfiguration config) { late URLSessionDownloadTask actualTask; late String actualContent; - final session = URLSession.sessionWithConfiguration(config, + final session = URLSession.sessionWithConfiguration(config(), onComplete: (s, t, r) => c.complete(), onFinishedDownloading: (s, t, uri) { actualSession = s; @@ -224,11 +230,12 @@ void testOnFinishedDownloading(URLSessionConfiguration config) { expect(actualSession, session); expect(actualTask, task); expect(actualContent, 'Hello World'); + session.finishTasksAndInvalidate(); }); }); } -void testOnRedirect(URLSessionConfiguration config) { +void testOnRedirect(URLSessionConfiguration Function() config) { group('onRedirect', () { late HttpServer redirectServer; @@ -257,13 +264,13 @@ void testOnRedirect(URLSessionConfiguration config) { }); test('disallow redirect', () async { - final session = URLSession.sessionWithConfiguration(config, + final session = URLSession.sessionWithConfiguration(config(), onRedirect: (redirectSession, redirectTask, redirectResponse, newRequest) => null); final c = Completer(); - HTTPURLResponse? response; - Error? error; + URLResponse? response; + NSError? error; session.dataTaskWithCompletionHandler( URLRequest.fromUrl( @@ -275,20 +282,26 @@ void testOnRedirect(URLSessionConfiguration config) { }).resume(); await c.future; - expect(response!.statusCode, 302); - expect(response!.allHeaderFields['Location'], - 'http://localhost:${redirectServer.port}/99'); + expect( + response, + isA() + .having((r) => r.statusCode, 'statusCode', 302) + .having( + (r) => r.allHeaderFields['Location'], + "allHeaderFields['Location']", + 'http://localhost:${redirectServer.port}/99')); expect(error, null); + session.finishTasksAndInvalidate(); }); - test('use preposed redirect request', () async { - final session = URLSession.sessionWithConfiguration(config, + test('use proposed redirect request', () async { + final session = URLSession.sessionWithConfiguration(config(), onRedirect: (redirectSession, redirectTask, redirectResponse, newRequest) => newRequest); final c = Completer(); - HTTPURLResponse? response; - Error? error; + URLResponse? response; + NSError? error; session.dataTaskWithCompletionHandler( URLRequest.fromUrl( @@ -300,21 +313,25 @@ void testOnRedirect(URLSessionConfiguration config) { }).resume(); await c.future; - expect(response!.statusCode, 200); + expect( + response, + isA() + .having((r) => r.statusCode, 'statusCode', 200)); expect(error, null); + session.finishTasksAndInvalidate(); }); test('use custom redirect request', () async { final session = URLSession.sessionWithConfiguration( - config, + config(), onRedirect: (redirectSession, redirectTask, redirectResponse, newRequest) => URLRequest.fromUrl( Uri.parse('http://localhost:${redirectServer.port}/')), ); final c = Completer(); - HTTPURLResponse? response; - Error? error; + URLResponse? response; + NSError? error; session.dataTaskWithCompletionHandler( URLRequest.fromUrl( @@ -326,22 +343,26 @@ void testOnRedirect(URLSessionConfiguration config) { }).resume(); await c.future; - expect(response!.statusCode, 200); + expect( + response, + isA() + .having((r) => r.statusCode, 'statusCode', 200)); expect(error, null); + session.finishTasksAndInvalidate(); }); test('exception in http redirection', () async { final session = URLSession.sessionWithConfiguration( - config, + config(), onRedirect: (redirectSession, redirectTask, redirectResponse, newRequest) { throw UnimplementedError(); }, ); final c = Completer(); - HTTPURLResponse? response; + URLResponse? response; // ignore: unused_local_variable - Error? error; + NSError? error; session.dataTaskWithCompletionHandler( URLRequest.fromUrl( @@ -353,45 +374,28 @@ void testOnRedirect(URLSessionConfiguration config) { }).resume(); await c.future; - expect(response!.statusCode, 302); + expect( + response, + isA() + .having((r) => r.statusCode, 'statusCode', 302)); // TODO(https://github.com/dart-lang/ffigen/issues/386): Check that the // error is set. + session.finishTasksAndInvalidate(); }, skip: 'Error not set for redirect exceptions.'); test('3 redirects', () async { var redirectCounter = 0; final session = URLSession.sessionWithConfiguration( - config, + config(), onRedirect: (redirectSession, redirectTask, redirectResponse, newRequest) { - expect(redirectResponse.statusCode, 302); - switch (redirectCounter) { - case 0: - expect(redirectResponse.allHeaderFields['Location'], - 'http://localhost:${redirectServer.port}/2'); - expect(newRequest.url, - Uri.parse('http://localhost:${redirectServer.port}/2')); - break; - case 1: - expect(redirectResponse.allHeaderFields['Location'], - 'http://localhost:${redirectServer.port}/1'); - expect(newRequest.url, - Uri.parse('http://localhost:${redirectServer.port}/1')); - break; - case 2: - expect(redirectResponse.allHeaderFields['Location'], - 'http://localhost:${redirectServer.port}/'); - expect(newRequest.url, - Uri.parse('http://localhost:${redirectServer.port}/')); - break; - } ++redirectCounter; return newRequest; }, ); final c = Completer(); - HTTPURLResponse? response; - Error? error; + URLResponse? response; + NSError? error; session.dataTaskWithCompletionHandler( URLRequest.fromUrl( @@ -403,22 +407,27 @@ void testOnRedirect(URLSessionConfiguration config) { }).resume(); await c.future; - expect(response!.statusCode, 200); + expect(redirectCounter, 3); + expect( + response, + isA() + .having((r) => r.statusCode, 'statusCode', 200)); expect(error, null); + session.finishTasksAndInvalidate(); }); test('allow too many redirects', () async { // The Foundation URL Loading System limits the number of redirects // even when a redirect delegate is present and allows the redirect. final session = URLSession.sessionWithConfiguration( - config, + config(), onRedirect: (redirectSession, redirectTask, redirectResponse, newRequest) => newRequest, ); final c = Completer(); - HTTPURLResponse? response; - Error? error; + URLResponse? response; + NSError? error; session.dataTaskWithCompletionHandler( URLRequest.fromUrl( @@ -430,13 +439,24 @@ void testOnRedirect(URLSessionConfiguration config) { }).resume(); await c.future; - expect(response, null); + expect( + response, + anyOf( + isNull, + isA() + .having((r) => r.statusCode, 'statusCode', 302) + .having( + (r) => r.allHeaderFields['Location'], + "r.allHeaderFields['Location']", + matches('http://localhost:${redirectServer.port}/' + r'\d+')))); expect(error!.code, -1007); // kCFURLErrorHTTPTooManyRedirects + session.finishTasksAndInvalidate(); }); }); } -void testOnWebSocketTaskOpened(URLSessionConfiguration config) { +void testOnWebSocketTaskOpened(URLSessionConfiguration Function() config) { group('onWebSocketTaskOpened', () { late HttpServer server; @@ -465,7 +485,7 @@ void testOnWebSocketTaskOpened(URLSessionConfiguration config) { late URLSession actualSession; late URLSessionWebSocketTask actualTask; - final session = URLSession.sessionWithConfiguration(config, + final session = URLSession.sessionWithConfiguration(config(), onWebSocketTaskOpened: (s, t, p) { actualSession = s; actualTask = t; @@ -482,6 +502,7 @@ void testOnWebSocketTaskOpened(URLSessionConfiguration config) { expect(actualSession, session); expect(actualTask, task); expect(actualProtocol, 'myprotocol'); + session.finishTasksAndInvalidate(); }); test('without protocol', () async { @@ -490,7 +511,7 @@ void testOnWebSocketTaskOpened(URLSessionConfiguration config) { late URLSession actualSession; late URLSessionWebSocketTask actualTask; - final session = URLSession.sessionWithConfiguration(config, + final session = URLSession.sessionWithConfiguration(config(), onWebSocketTaskOpened: (s, t, p) { actualSession = s; actualTask = t; @@ -505,17 +526,19 @@ void testOnWebSocketTaskOpened(URLSessionConfiguration config) { expect(actualSession, session); expect(actualTask, task); expect(actualProtocol, null); + session.finishTasksAndInvalidate(); }); test('server failure', () async { final c = Completer(); var onWebSocketTaskOpenedCalled = false; + NSError? actualError; - final session = URLSession.sessionWithConfiguration(config, + final session = URLSession.sessionWithConfiguration(config(), onWebSocketTaskOpened: (s, t, p) { onWebSocketTaskOpenedCalled = true; }, onComplete: (s, t, e) { - expect(e, isNotNull); + actualError = e; c.complete(); }); @@ -523,12 +546,14 @@ void testOnWebSocketTaskOpened(URLSessionConfiguration config) { Uri.parse('http://localhost:${server.port}?error=1')); session.webSocketTaskWithRequest(request).resume(); await c.future; + expect(actualError, isNotNull); expect(onWebSocketTaskOpenedCalled, false); + session.finishTasksAndInvalidate(); }); }); } -void testOnWebSocketTaskClosed(URLSessionConfiguration config) { +void testOnWebSocketTaskClosed(URLSessionConfiguration Function() config) { group('testOnWebSocketTaskClosed', () { late HttpServer server; late int? serverCode; @@ -562,13 +587,13 @@ void testOnWebSocketTaskClosed(URLSessionConfiguration config) { serverCode = null; serverReason = null; - final session = URLSession.sessionWithConfiguration(config, + final session = URLSession.sessionWithConfiguration(config(), onWebSocketTaskOpened: (session, task, protocol) {}, onWebSocketTaskClosed: (session, task, closeCode, reason) { actualSession = session; actualTask = task; actualCloseCode = closeCode!; - actualReason = utf8.decode(reason!.bytes); + actualReason = utf8.decode(reason!.toList()); c.complete(); }); @@ -579,7 +604,7 @@ void testOnWebSocketTaskClosed(URLSessionConfiguration config) { expect( task.receiveMessage(), - throwsA(isA() + throwsA(isA() .having((e) => e.code, 'code', 57 // Socket is not connected. ))); await c.future; @@ -587,6 +612,7 @@ void testOnWebSocketTaskClosed(URLSessionConfiguration config) { expect(actualTask, task); expect(actualCloseCode, 1005); expect(actualReason, ''); + session.finishTasksAndInvalidate(); }); test('close code', () async { @@ -599,13 +625,13 @@ void testOnWebSocketTaskClosed(URLSessionConfiguration config) { serverCode = 4000; serverReason = null; - final session = URLSession.sessionWithConfiguration(config, + final session = URLSession.sessionWithConfiguration(config(), onWebSocketTaskOpened: (session, task, protocol) {}, onWebSocketTaskClosed: (session, task, closeCode, reason) { actualSession = session; actualTask = task; actualCloseCode = closeCode!; - actualReason = utf8.decode(reason!.bytes); + actualReason = utf8.decode(reason!.toList()); c.complete(); }); @@ -616,7 +642,7 @@ void testOnWebSocketTaskClosed(URLSessionConfiguration config) { expect( task.receiveMessage(), - throwsA(isA() + throwsA(isA() .having((e) => e.code, 'code', 57 // Socket is not connected. ))); await c.future; @@ -624,6 +650,7 @@ void testOnWebSocketTaskClosed(URLSessionConfiguration config) { expect(actualTask, task); expect(actualCloseCode, serverCode); expect(actualReason, ''); + session.finishTasksAndInvalidate(); }); test('close code and reason', () async { @@ -636,13 +663,13 @@ void testOnWebSocketTaskClosed(URLSessionConfiguration config) { serverCode = 4000; serverReason = 'no real reason'; - final session = URLSession.sessionWithConfiguration(config, + final session = URLSession.sessionWithConfiguration(config(), onWebSocketTaskOpened: (session, task, protocol) {}, onWebSocketTaskClosed: (session, task, closeCode, reason) { actualSession = session; actualTask = task; actualCloseCode = closeCode!; - actualReason = utf8.decode(reason!.bytes); + actualReason = utf8.decode(reason!.toList()); c.complete(); }); @@ -653,7 +680,7 @@ void testOnWebSocketTaskClosed(URLSessionConfiguration config) { expect( task.receiveMessage(), - throwsA(isA() + throwsA(isA() .having((e) => e.code, 'code', 57 // Socket is not connected. ))); await c.future; @@ -661,6 +688,7 @@ void testOnWebSocketTaskClosed(URLSessionConfiguration config) { expect(actualTask, task); expect(actualCloseCode, serverCode); expect(actualReason, serverReason); + session.finishTasksAndInvalidate(); }); }); } @@ -669,10 +697,15 @@ void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); group('backgroundSession', () { - final config = - URLSessionConfiguration.backgroundSession('backgroundSession'); + var count = 0; + URLSessionConfiguration config() { + ++count; + return URLSessionConfiguration.backgroundSession( + 'backgroundSession{$count}'); + } + testOnComplete(config); - testOnResponse(config); + // onResponse is not called for background sessions. testOnData(config); // onRedirect is not called for background sessions. testOnFinishedDownloading(config); @@ -680,7 +713,8 @@ void main() { }); group('defaultSessionConfiguration', () { - final config = URLSessionConfiguration.defaultSessionConfiguration(); + URLSessionConfiguration config() => + URLSessionConfiguration.defaultSessionConfiguration(); testOnComplete(config); testOnResponse(config); testOnData(config); @@ -691,7 +725,8 @@ void main() { }); group('ephemeralSessionConfiguration', () { - final config = URLSessionConfiguration.ephemeralSessionConfiguration(); + URLSessionConfiguration config() => + URLSessionConfiguration.ephemeralSessionConfiguration(); testOnComplete(config); testOnResponse(config); testOnData(config); diff --git a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart index c00de9c142..a85b317a10 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_task_test.dart @@ -6,6 +6,7 @@ import 'dart:io'; import 'package:cupertino_http/cupertino_http.dart'; import 'package:integration_test/integration_test.dart'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; void testWebSocketTask() { @@ -52,6 +53,7 @@ void testWebSocketTask() { () => session.webSocketTaskWithRequest(URLRequest.fromUrl( Uri.parse('ws://localhost:${server.port}/?noclose'))), throwsUnsupportedError); + session.finishTasksAndInvalidate(); }); test('client code and reason', () async { @@ -62,7 +64,7 @@ void testWebSocketTask() { await task .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); await task.receiveMessage(); - task.cancelWithCloseCode(4998, Data.fromList('Bye'.codeUnits)); + task.cancelWithCloseCode(4998, 'Bye'.codeUnits.toNSData()); // Allow the server to run and save the close code. while (lastCloseCode == null) { @@ -80,13 +82,16 @@ void testWebSocketTask() { await task .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); await task.receiveMessage(); - await expectLater(task.receiveMessage(), - throwsA(isA().having((e) => e.code, 'code', 57 // NOT_CONNECTED - ))); + await expectLater( + task.receiveMessage(), + throwsA( + isA().having((e) => e.code, 'code', 57 // NOT_CONNECTED + ))); expect(task.closeCode, 4999); - expect(task.closeReason!.bytes, 'fun'.codeUnits); + expect(task.closeReason!.toList(), 'fun'.codeUnits); task.cancel(); + session.finishTasksAndInvalidate(); }); test('data message', () async { @@ -95,11 +100,13 @@ void testWebSocketTask() { URLRequest.fromUrl(Uri.parse('ws://localhost:${server.port}'))) ..resume(); await task.sendMessage( - URLSessionWebSocketMessage.fromData(Data.fromList([1, 2, 3]))); + URLSessionWebSocketMessage.fromData([1, 2, 3].toNSData())); final receivedMessage = await task.receiveMessage(); - expect(receivedMessage.type, - URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeData); - expect(receivedMessage.data!.bytes, [1, 2, 3]); + expect( + receivedMessage.type, + NSURLSessionWebSocketMessageType + .NSURLSessionWebSocketMessageTypeData); + expect(receivedMessage.data!.toList(), [1, 2, 3]); expect(receivedMessage.string, null); task.cancel(); }); @@ -112,8 +119,10 @@ void testWebSocketTask() { await task .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); final receivedMessage = await task.receiveMessage(); - expect(receivedMessage.type, - URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeString); + expect( + receivedMessage.type, + NSURLSessionWebSocketMessageType + .NSURLSessionWebSocketMessageTypeString); expect(receivedMessage.data, null); expect(receivedMessage.string, 'Hello World!'); task.cancel(); @@ -127,7 +136,7 @@ void testWebSocketTask() { await expectLater( task.sendMessage( URLSessionWebSocketMessage.fromString('Hello World!')), - throwsA(isA().having( + throwsA(isA().having( (e) => e.code, 'code', -1011 // NSURLErrorBadServerResponse ))); task.cancel(); @@ -141,9 +150,11 @@ void testWebSocketTask() { await task .sendMessage(URLSessionWebSocketMessage.fromString('Hello World!')); await task.receiveMessage(); - await expectLater(task.receiveMessage(), - throwsA(isA().having((e) => e.code, 'code', 57 // NOT_CONNECTED - ))); + await expectLater( + task.receiveMessage(), + throwsA( + isA().having((e) => e.code, 'code', 57 // NOT_CONNECTED + ))); task.cancel(); }); }); @@ -171,14 +182,14 @@ void testURLSessionTaskCommon( server.close(); }); test('starts suspended', () { - expect(task.state, URLSessionTaskState.urlSessionTaskStateSuspended); + expect(task.state, NSURLSessionTaskState.NSURLSessionTaskStateSuspended); expect(task.response, null); task.toString(); // Just verify that there is no crash. }); test('resume to running', () { task.resume(); - expect(task.state, URLSessionTaskState.urlSessionTaskStateRunning); + expect(task.state, NSURLSessionTaskState.NSURLSessionTaskStateRunning); expect(task.response, null); task.toString(); // Just verify that there is no crash. }); @@ -186,9 +197,11 @@ void testURLSessionTaskCommon( test('cancel', () { task.cancel(); if (suspendedAfterCancel) { - expect(task.state, URLSessionTaskState.urlSessionTaskStateSuspended); + expect( + task.state, NSURLSessionTaskState.NSURLSessionTaskStateSuspended); } else { - expect(task.state, URLSessionTaskState.urlSessionTaskStateCanceling); + expect( + task.state, NSURLSessionTaskState.NSURLSessionTaskStateCanceling); } expect(task.response, null); task.toString(); // Just verify that there is no crash. @@ -196,7 +209,8 @@ void testURLSessionTaskCommon( test('completed', () async { task.resume(); - while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + while ( + task.state != NSURLSessionTaskState.NSURLSessionTaskStateCompleted) { // Let the event loop run. await Future(() {}); } @@ -219,13 +233,14 @@ void testURLSessionTaskCommon( MutableURLRequest.fromUrl( Uri.parse('http://localhost:${server.port}/mypath')) ..httpMethod = 'POST' - ..httpBody = Data.fromList([1, 2, 3])) + ..httpBody = [1, 2, 3].toNSData()) ..prefersIncrementalDelivery = false ..priority = 0.2 ..taskDescription = 'my task description' ..resume(); - while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + while ( + task.state != NSURLSessionTaskState.NSURLSessionTaskStateCompleted) { // Let the event loop run. await Future(() {}); } @@ -296,7 +311,8 @@ void testURLSessionTaskCommon( MutableURLRequest.fromUrl(Uri.parse('http://notarealserver'))) ..resume(); - while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + while ( + task.state != NSURLSessionTaskState.NSURLSessionTaskStateCompleted) { // Let the event loop run. await Future(() {}); } @@ -340,7 +356,8 @@ void testURLSessionTaskCommon( Uri.parse('http://localhost:${server.port}/launch'))) ..resume(); - while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + while ( + task.state != NSURLSessionTaskState.NSURLSessionTaskStateCompleted) { // Let the event loop run. await Future(() {}); } diff --git a/pkgs/cupertino_http/example/integration_test/url_session_test.dart b/pkgs/cupertino_http/example/integration_test/url_session_test.dart index 3bed931e95..96e09789f8 100644 --- a/pkgs/cupertino_http/example/integration_test/url_session_test.dart +++ b/pkgs/cupertino_http/example/integration_test/url_session_test.dart @@ -7,6 +7,7 @@ import 'dart:io'; import 'package:cupertino_http/cupertino_http.dart'; import 'package:integration_test/integration_test.dart'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; void testDataTaskWithCompletionHandler(URLSession session) { @@ -58,9 +59,9 @@ void testDataTaskWithCompletionHandler(URLSession session) { test('success', () async { final c = Completer(); - Data? data; - HTTPURLResponse? response; - Error? error; + NSData? data; + URLResponse? response; + NSError? error; session.dataTaskWithCompletionHandler( URLRequest.fromUrl( @@ -72,16 +73,19 @@ void testDataTaskWithCompletionHandler(URLSession session) { }).resume(); await c.future; - expect(data!.bytes, 'Hello World'.codeUnits); - expect(response!.statusCode, 200); + expect(data!.toList(), 'Hello World'.codeUnits); + expect( + response, + isA() + .having((r) => r.statusCode, 'statusCode', 200)); expect(error, null); }); test('success no data', () async { final c = Completer(); - Data? data; - HTTPURLResponse? response; - Error? error; + NSData? data; + URLResponse? response; + NSError? error; final request = MutableURLRequest.fromUrl( Uri.parse('http://localhost:${successServer.port}')) @@ -95,16 +99,19 @@ void testDataTaskWithCompletionHandler(URLSession session) { }).resume(); await c.future; - expect(data, null); - expect(response!.statusCode, 200); + expect(data!.length, 0); + expect( + response, + isA() + .having((r) => r.statusCode, 'statusCode', 200)); expect(error, null); }); test('500 response', () async { final c = Completer(); - Data? data; - HTTPURLResponse? response; - Error? error; + NSData? data; + URLResponse? response; + NSError? error; session.dataTaskWithCompletionHandler( URLRequest.fromUrl( @@ -116,8 +123,11 @@ void testDataTaskWithCompletionHandler(URLSession session) { }).resume(); await c.future; - expect(data!.bytes, 'Hello World'.codeUnits); - expect(response!.statusCode, 500); + expect(data!.toList(), 'Hello World'.codeUnits); + expect( + response, + isA() + .having((r) => r.statusCode, 'statusCode', 500)); expect(error, null); }); @@ -125,9 +135,9 @@ void testDataTaskWithCompletionHandler(URLSession session) { // Ensures that the delegate used to implement the completion handler // does not interfere with the default redirect behavior. final c = Completer(); - Data? data; - HTTPURLResponse? response; - Error? error; + NSData? data; + URLResponse? response; + NSError? error; session.dataTaskWithCompletionHandler( URLRequest.fromUrl( @@ -140,16 +150,26 @@ void testDataTaskWithCompletionHandler(URLSession session) { }).resume(); await c.future; - expect(response, null); expect(data, null); + expect( + response, + anyOf( + isNull, + isA() + .having((r) => r.statusCode, 'statusCode', 302) + .having( + (r) => r.allHeaderFields['Location'], + "r.allHeaderFields['Location']", + matches('http://localhost:${redirectServer.port}/' + r'\d+')))); expect(error!.code, -1007); // kCFURLErrorHTTPTooManyRedirects }); test('unable to connect', () async { final c = Completer(); - Data? data; - HTTPURLResponse? response; - Error? error; + NSData? data; + URLResponse? response; + NSError? error; session.dataTaskWithCompletionHandler( URLRequest.fromUrl(Uri.parse('http://this is not a valid URL')), @@ -196,7 +216,8 @@ void testURLSession(URLSession session) { final task = session.dataTaskWithRequest( URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) ..resume(); - while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + while ( + task.state != NSURLSessionTaskState.NSURLSessionTaskStateCompleted) { // Let the event loop run. await Future.delayed(const Duration()); } @@ -208,15 +229,14 @@ void testURLSession(URLSession session) { final task = session.downloadTaskWithRequest( URLRequest.fromUrl(Uri.parse('http://localhost:${server.port}'))) ..resume(); - while (task.state != URLSessionTaskState.urlSessionTaskStateCompleted) { + while ( + task.state != NSURLSessionTaskState.NSURLSessionTaskStateCompleted) { // Let the event loop run. await Future.delayed(const Duration()); } final response = task.response as HTTPURLResponse; expect(response.statusCode, 200); }); - - testDataTaskWithCompletionHandler(session); }); } @@ -231,6 +251,7 @@ void main() { }); testURLSession(session); + testDataTaskWithCompletionHandler(session); }); group('defaultSessionConfiguration', () { @@ -243,6 +264,7 @@ void main() { }); testURLSession(session); + testDataTaskWithCompletionHandler(session); }); group('backgroundSession', () { @@ -256,5 +278,6 @@ void main() { }); testURLSession(session); + // dataTaskWithCompletionHandler is not supported in background sessions. }); } diff --git a/pkgs/cupertino_http/example/integration_test/utils_test.dart b/pkgs/cupertino_http/example/integration_test/utils_test.dart index 315282a6be..d075927863 100644 --- a/pkgs/cupertino_http/example/integration_test/utils_test.dart +++ b/pkgs/cupertino_http/example/integration_test/utils_test.dart @@ -2,50 +2,50 @@ // for details. 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:cupertino_http/src/native_cupertino_bindings.dart' as ncb; import 'package:cupertino_http/src/utils.dart'; import 'package:integration_test/integration_test.dart'; +import 'package:objective_c/objective_c.dart' as objc; import 'package:test/test.dart'; void main() { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - group('toStringOrNull', () { - test('null input', () { - expect(toStringOrNull(null), null); - }); - - test('string input', () { - expect(toStringOrNull('Test'.toNSString(linkedLibs)), 'Test'); - }); - }); - group('stringNSDictionaryToMap', () { test('empty input', () { - final d = ncb.NSMutableDictionary.new1(linkedLibs); + final d = objc.NSMutableDictionary.new1(); expect(stringNSDictionaryToMap(d), {}); }); test('single string input', () { - final d = ncb.NSMutableDictionary.new1(linkedLibs) - ..setObject_forKey_( - 'value'.toNSString(linkedLibs), 'key'.toNSString(linkedLibs)); + final d = objc.NSMutableDictionary.new1() + ..setObject_forKey_('value'.toNSString(), 'key'.toNSString()); expect(stringNSDictionaryToMap(d), {'key': 'value'}); }); test('multiple string input', () { - final d = ncb.NSMutableDictionary.new1(linkedLibs) - ..setObject_forKey_( - 'value1'.toNSString(linkedLibs), 'key1'.toNSString(linkedLibs)) - ..setObject_forKey_( - 'value2'.toNSString(linkedLibs), 'key2'.toNSString(linkedLibs)) - ..setObject_forKey_( - 'value3'.toNSString(linkedLibs), 'key3'.toNSString(linkedLibs)); + final d = objc.NSMutableDictionary.new1() + ..setObject_forKey_('value1'.toNSString(), 'key1'.toNSString()) + ..setObject_forKey_('value2'.toNSString(), 'key2'.toNSString()) + ..setObject_forKey_('value3'.toNSString(), 'key3'.toNSString()); expect(stringNSDictionaryToMap(d), {'key1': 'value1', 'key2': 'value2', 'key3': 'value3'}); }); + + test('non-string value', () { + final d = objc.NSMutableDictionary.new1() + ..setObject_forKey_( + objc.NSNumber.numberWithInteger_(5), 'key'.toNSString()); + expect(() => stringNSDictionaryToMap(d), throwsUnsupportedError); + }); + + test('non-string key', () { + final d = objc.NSMutableDictionary.new1() + ..setObject_forKey_( + 'value'.toNSString(), objc.NSNumber.numberWithInteger_(5)); + expect(() => stringNSDictionaryToMap(d), throwsUnsupportedError); + }); }); group('stringIterableToNSArray', () { @@ -58,16 +58,16 @@ void main() { final array = stringIterableToNSArray(['apple']); expect(array.count, 1); expect( - ncb.NSString.castFrom(array.objectAtIndex_(0)).toString(), 'apple'); + objc.NSString.castFrom(array.objectAtIndex_(0)).toString(), 'apple'); }); test('multiple string input', () { final array = stringIterableToNSArray(['apple', 'banana']); expect(array.count, 2); expect( - ncb.NSString.castFrom(array.objectAtIndex_(0)).toString(), 'apple'); + objc.NSString.castFrom(array.objectAtIndex_(0)).toString(), 'apple'); expect( - ncb.NSString.castFrom(array.objectAtIndex_(1)).toString(), 'banana'); + objc.NSString.castFrom(array.objectAtIndex_(1)).toString(), 'banana'); }); }); } diff --git a/pkgs/cupertino_http/example/ios/Flutter/AppFrameworkInfo.plist b/pkgs/cupertino_http/example/ios/Flutter/AppFrameworkInfo.plist index 9625e105df..1dc6cf7652 100644 --- a/pkgs/cupertino_http/example/ios/Flutter/AppFrameworkInfo.plist +++ b/pkgs/cupertino_http/example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 13.0 diff --git a/pkgs/cupertino_http/example/ios/Podfile b/pkgs/cupertino_http/example/ios/Podfile index 88359b225f..6be20bc436 100644 --- a/pkgs/cupertino_http/example/ios/Podfile +++ b/pkgs/cupertino_http/example/ios/Podfile @@ -1,5 +1,4 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +platform :ios, '13.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/pkgs/cupertino_http/example/ios/Podfile.lock b/pkgs/cupertino_http/example/ios/Podfile.lock index 709672b9d7..7201c0f962 100644 --- a/pkgs/cupertino_http/example/ios/Podfile.lock +++ b/pkgs/cupertino_http/example/ios/Podfile.lock @@ -1,28 +1,35 @@ PODS: - cupertino_http (0.0.1): - Flutter + - FlutterMacOS - Flutter (1.0.0) - integration_test (0.0.1): - Flutter + - objective_c (0.0.1): + - Flutter DEPENDENCIES: - - cupertino_http (from `.symlinks/plugins/cupertino_http/ios`) + - cupertino_http (from `.symlinks/plugins/cupertino_http/darwin`) - Flutter (from `Flutter`) - integration_test (from `.symlinks/plugins/integration_test/ios`) + - objective_c (from `.symlinks/plugins/objective_c/ios`) EXTERNAL SOURCES: cupertino_http: - :path: ".symlinks/plugins/cupertino_http/ios" + :path: ".symlinks/plugins/cupertino_http/darwin" Flutter: :path: Flutter integration_test: :path: ".symlinks/plugins/integration_test/ios" + objective_c: + :path: ".symlinks/plugins/objective_c/ios" SPEC CHECKSUMS: - cupertino_http: 5f8b1161107fe6c8d94a0c618735a033d93fa7db - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 - integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5 + cupertino_http: 947a233f40cfea55167a49f2facc18434ea117ba + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 + integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 + objective_c: 77e887b5ba1827970907e10e832eec1683f3431d -PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 +PODFILE CHECKSUM: d2243213672c3c48aae53c36642ba411a6be7309 -COCOAPODS: 1.11.2 +COCOAPODS: 1.15.2 diff --git a/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.pbxproj b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.pbxproj index 3f233bb8b9..64fe2b898d 100644 --- a/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.pbxproj +++ b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/project.pbxproj @@ -156,7 +156,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -205,6 +205,7 @@ files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -342,7 +343,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -420,7 +421,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -469,7 +470,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/pkgs/cupertino_http/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a335..5e31d3d342 100644 --- a/pkgs/cupertino_http/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/pkgs/cupertino_http/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ Bool { return true } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } } diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index b074234bff..5d15cf4a47 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -31,6 +31,7 @@ dev_dependencies: http_profile: ^0.1.0 integration_test: sdk: flutter + objective_c: ^3.0.0 test: ^1.21.1 web_socket_conformance_tests: path: ../../web_socket_conformance_tests/ diff --git a/pkgs/cupertino_http/ffigen.yaml b/pkgs/cupertino_http/ffigen.yaml index 3e535933a9..9ec658d8bc 100644 --- a/pkgs/cupertino_http/ffigen.yaml +++ b/pkgs/cupertino_http/ffigen.yaml @@ -5,26 +5,23 @@ description: | Regenerate bindings with `flutter packages pub run ffigen --config ffigen.yaml`. language: 'objc' -output: 'lib/src/native_cupertino_bindings.dart' +output: + bindings: 'lib/src/native_cupertino_bindings.dart' + objc-bindings: 'darwin/cupertino_http/Sources/cupertino_http/native_cupertino_bindings.m' headers: entry-points: - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSArray.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSData.h' - - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLCache.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLRequest.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLSession.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURL.h' + - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSLock.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSProgress.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSURLResponse.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSHTTPCookieStorage.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSOperation.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSError.h' - '/System/Volumes/Data/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Versions/C/Headers/NSDictionary.h' - - 'src/CUPHTTPClientDelegate.h' - - 'src/CUPHTTPForwardedDelegate.h' - - 'src/CUPHTTPCompletionHelper.h' - - 'src/CUPHTTPStreamToNSInputStreamAdapter.h' + - 'darwin/cupertino_http/Sources/cupertino_http/utils.h' preamble: | // ignore_for_file: always_specify_types // ignore_for_file: camel_case_types @@ -32,6 +29,32 @@ preamble: | // ignore_for_file: unused_element // ignore_for_file: unused_field // ignore_for_file: return_of_invalid_type +objc-interfaces: + include: + - 'NSHTTPURLResponse' + - 'NSMutableURLRequest' + - 'NSOperationQueue' + - 'NSURLCache' + - 'NSURLRequest' + - 'NSURLResponse' + - 'NSURLSession' + - 'NSURLSessionConfiguration' + - 'NSURLSessionDownloadTask' + - 'NSURLSessionTask' + - 'NSURLSessionWebSocketMessage' + - 'NSURLSessionWebSocketTask' comments: style: any length: full +enums: + include: + - 'NSHTTPCookieAcceptPolicy' + - 'NSURLRequestCachePolicy' + - 'NSURLRequestNetworkServiceType' + - 'NSURLSessionMultipathServiceType' + - 'NSURLSessionResponseDisposition' + - 'NSURLSessionTaskState' + - 'NSURLSessionWebSocketMessageType' + as-int: + include: + - 'NSURLSessionWebSocketCloseCode' diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 00bf1d0d22..99fb2ee041 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -27,18 +27,34 @@ library; import 'dart:async'; -import 'dart:ffi'; import 'dart:isolate'; -import 'dart:math'; -import 'dart:typed_data'; -import 'package:async/async.dart'; -import 'package:ffi/ffi.dart'; +import 'package:objective_c/objective_c.dart' as objc; import 'native_cupertino_bindings.dart' as ncb; +import 'native_cupertino_bindings.dart' + show + NSHTTPCookieAcceptPolicy, + NSURLRequestCachePolicy, + NSURLRequestNetworkServiceType, + NSURLSessionMultipathServiceType, + NSURLSessionResponseDisposition, + NSURLSessionTaskState, + NSURLSessionWebSocketMessageType; import 'utils.dart'; -abstract class _ObjectHolder { +export 'native_cupertino_bindings.dart' + show + NSHTTPCookieAcceptPolicy, + NSURLRequestCachePolicy, + NSURLRequestNetworkServiceType, + NSURLSessionMultipathServiceType, + NSURLSessionResponseDisposition, + NSURLSessionTaskState, + NSURLSessionWebSocketCloseCode, + NSURLSessionWebSocketMessageType; + +abstract class _ObjectHolder { final T _nsObject; _ObjectHolder(this._nsObject); @@ -55,183 +71,6 @@ abstract class _ObjectHolder { int get hashCode => _nsObject.hashCode; } -/// Settings for controlling whether cookies will be accepted. -/// -/// See [HTTPCookieAcceptPolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408933-httpcookieacceptpolicy). -enum HTTPCookieAcceptPolicy { - httpCookieAcceptPolicyAlways, - httpCookieAcceptPolicyNever, - httpCookieAcceptPolicyOnlyFromMainDocumentDomain, -} - -/// Controls how response data is cached. -/// -/// See [URLRequestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequestcachepolicy). -enum URLRequestCachePolicy { - useProtocolCachePolicy, - reloadIgnoringLocalCacheData, - returnCacheDataElseLoad, - returnCacheDataDontLoad, - reloadIgnoringLocalAndRemoteCacheData, - reloadRevalidatingCacheData, -} - -// Controls how multipath TCP should be used. -// -// See [NSURLSessionMultipathServiceType](https://developer.apple.com/documentation/foundation/nsurlsessionmultipathservicetype). -enum URLSessionMultipathServiceType { - multipathServiceTypeNone, - multipathServiceTypeHandover, - multipathServiceTypeInteractive, - multipathServiceTypeAggregate, -} - -/// Controls how [URLSessionTask] execute will proceed after the response is -/// received. -/// -/// See [NSURLSessionResponseDisposition](https://developer.apple.com/documentation/foundation/nsurlsessionresponsedisposition). -enum URLSessionResponseDisposition { - urlSessionResponseCancel, - urlSessionResponseAllow, - urlSessionResponseBecomeDownload, - urlSessionResponseBecomeStream -} - -/// Provides in indication to the operating system on what type of requests -/// are being sent. -/// -/// See [NSURLRequestNetworkServiceType](https://developer.apple.com/documentation/foundation/nsurlrequestnetworkservicetype). -enum URLRequestNetworkService { - networkServiceTypeDefault, - networkServiceTypeVoIP, - networkServiceTypeVideo, - networkServiceTypeBackground, - networkServiceTypeVoice, - networkServiceTypeResponsiveData, - networkServiceTypeAVStreaming, - networkServiceTypeResponsiveAV, - networkServiceTypeCallSignaling -} - -/// The type of a WebSocket message i.e. text or data. -/// -/// See [NSURLSessionWebSocketMessageType](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessagetype) -enum URLSessionWebSocketMessageType { - urlSessionWebSocketMessageTypeData, - urlSessionWebSocketMessageTypeString, -} - -ncb.NSInputStream _streamToNSInputStream(Stream> stream) { - const maxReadAheadSize = 4096; - final queue = StreamQueue(stream); - final port = ReceivePort(); - final inputStream = ncb.CUPHTTPStreamToNSInputStreamAdapter.alloc(helperLibs) - .initWithPort_(port.sendPort.nativePort); - - late StreamSubscription s; - // Messages from `CUPHTTPStreamToNSInputStreamAdapter` indicate that the task - // is attempting to read more data but there is none available. - s = port.listen((_) async { - if (inputStream.streamStatus == ncb.NSStreamStatus.NSStreamStatusClosed) { - return; - } - - // Prevent multiple executions of this code to be in flight at once. - s.pause(); - while (await queue.hasNext && - inputStream.streamStatus != ncb.NSStreamStatus.NSStreamStatusClosed) { - late final List next; - try { - next = await queue.next; - } catch (e) { - inputStream.setError_(Error.fromCustomDomain('DartError', 0, - localizedDescription: e.toString()) - ._nsObject); - break; - } - // In practice the read length request will be large (>1MB) so, - // instead of adding that much data, try to keep the buffer - // at least `maxReadAheadSize`. - if (inputStream.addData_(Data.fromList(next)._nsObject) > - maxReadAheadSize) { - break; - } - } - if (!await queue.hasNext) { - inputStream.setDone(); - } else { - s.resume(); - } - }); - return inputStream; -} - -/// Information about a failure. -/// -/// See [NSError](https://developer.apple.com/documentation/foundation/nserror) -class Error extends _ObjectHolder implements Exception { - Error._(super.c); - - /// Create an Error from a custom domain. - factory Error.fromCustomDomain(String domain, int code, - {String? localizedDescription}) { - final d = ncb.NSMutableDictionary.alloc(linkedLibs).init(); - - if (localizedDescription != null) { - d.setObject_forKey_( - localizedDescription.toNSString(linkedLibs), - ncb.NSString.castFromPointer( - linkedLibs, linkedLibs.NSLocalizedDescriptionKey), - ); - } - final e = ncb.NSError.alloc(linkedLibs) - .initWithDomain_code_userInfo_(domain.toNSString(linkedLibs), code, d); - return Error._(e); - } - - /// The numeric code for the error e.g. -1003 (kCFURLErrorCannotFindHost). - /// - /// The interpretation of this code will depend on the domain of the error - /// which, for URL loading, will usually be - /// [`kCFErrorDomainCFNetwork`](https://developer.apple.com/documentation/cfnetwork/kcferrordomaincfnetwork). - /// - /// See [NSError.code](https://developer.apple.com/documentation/foundation/nserror/1409165-code) - int get code => _nsObject.code; - - /// The error domain, for example `"NSPOSIXErrorDomain"`. - /// - /// See [NSError.domain](https://developer.apple.com/documentation/foundation/nserror/1413924-domain) - String get domain => _nsObject.domain.toString(); - - /// A description of the error in the current locale e.g. - /// 'A server with the specified hostname could not be found.' - /// - /// See [NSError.localizedDescription](https://developer.apple.com/documentation/foundation/nserror/1414418-localizeddescription) - String? get localizedDescription => - toStringOrNull(_nsObject.localizedDescription); - - /// An explanation of the reason for the error in the current locale. - /// - /// See [NSError.localizedFailureReason](https://developer.apple.com/documentation/foundation/nserror/1412752-localizedfailurereason) - String? get localizedFailureReason => - toStringOrNull(_nsObject.localizedFailureReason); - - /// An explanation of how to fix the error in the current locale. - /// - /// See [NSError.localizedRecoverySuggestion](https://developer.apple.com/documentation/foundation/nserror/1407500-localizedrecoverysuggestion) - String? get localizedRecoverySuggestion => - toStringOrNull(_nsObject.localizedRecoverySuggestion); - - @override - String toString() => '[Error ' - 'domain=$domain ' - 'code=$code ' - 'localizedDescription=$localizedDescription ' - 'localizedFailureReason=$localizedFailureReason ' - 'localizedRecoverySuggestion=$localizedRecoverySuggestion ' - ']'; -} - /// A cache for [URLRequest]s. Used by [URLSessionConfiguration.cache]. /// /// See [NSURLCache](https://developer.apple.com/documentation/foundation/nsurlcache) @@ -242,7 +81,7 @@ class URLCache extends _ObjectHolder { /// /// See [NSURLCache.sharedURLCache](https://developer.apple.com/documentation/foundation/nsurlcache/1413377-sharedurlcache) static URLCache? get sharedURLCache { - final sharedCache = ncb.NSURLCache.getSharedURLCache(linkedLibs); + final sharedCache = ncb.NSURLCache.getSharedURLCache(); return URLCache._(sharedCache); } @@ -256,7 +95,7 @@ class URLCache extends _ObjectHolder { /// See [NSURLCache initWithMemoryCapacity:diskCapacity:directoryURL:](https://developer.apple.com/documentation/foundation/nsurlcache/3240612-initwithmemorycapacity) factory URLCache.withCapacity( {int memoryCapacity = 0, int diskCapacity = 0, Uri? directory}) => - URLCache._(ncb.NSURLCache.alloc(linkedLibs) + URLCache._(ncb.NSURLCache.alloc() .initWithMemoryCapacity_diskCapacity_directoryURL_(memoryCapacity, diskCapacity, directory == null ? null : uriToNSURL(directory))); } @@ -281,7 +120,7 @@ class URLSessionConfiguration URLSessionConfiguration._( ncb.NSURLSessionConfiguration .backgroundSessionConfigurationWithIdentifier_( - linkedLibs, identifier.toNSString(linkedLibs)), + identifier.toNSString()), isBackground: true); /// A configuration that uses caching and saves cookies and credentials. @@ -290,8 +129,7 @@ class URLSessionConfiguration factory URLSessionConfiguration.defaultSessionConfiguration() => URLSessionConfiguration._( ncb.NSURLSessionConfiguration.castFrom( - ncb.NSURLSessionConfiguration.getDefaultSessionConfiguration( - linkedLibs)), + ncb.NSURLSessionConfiguration.getDefaultSessionConfiguration()), isBackground: false); /// A session configuration that uses no persistent storage for caches, @@ -301,8 +139,7 @@ class URLSessionConfiguration factory URLSessionConfiguration.ephemeralSessionConfiguration() => URLSessionConfiguration._( ncb.NSURLSessionConfiguration.castFrom( - ncb.NSURLSessionConfiguration.getEphemeralSessionConfiguration( - linkedLibs)), + ncb.NSURLSessionConfiguration.getEphemeralSessionConfiguration()), isBackground: false); /// Whether connections over a cellular network are allowed. @@ -350,7 +187,7 @@ class URLSessionConfiguration /// See [NSURLSessionConfiguration.HTTPAdditionalHeaders](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411532-httpadditionalheaders) Map? get httpAdditionalHeaders { if (_nsObject.HTTPAdditionalHeaders case var additionalHeaders?) { - final headers = ncb.NSDictionary.castFrom(additionalHeaders); + final headers = objc.NSDictionary.castFrom(additionalHeaders); return stringNSDictionaryToMap(headers); } return null; @@ -361,10 +198,9 @@ class URLSessionConfiguration _nsObject.HTTPAdditionalHeaders = null; return; } - final d = ncb.NSMutableDictionary.alloc(linkedLibs).init(); + final d = objc.NSMutableDictionary.alloc().init(); headers.forEach((key, value) { - d.setObject_forKey_( - value.toNSString(linkedLibs), key.toNSString(linkedLibs)); + d.setObject_forKey_(value.toNSString(), key.toNSString()); }); _nsObject.HTTPAdditionalHeaders = d; } @@ -372,10 +208,10 @@ class URLSessionConfiguration /// What policy to use when deciding whether to accept cookies. /// /// See [NSURLSessionConfiguration.HTTPCookieAcceptPolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408933-httpcookieacceptpolicy). - HTTPCookieAcceptPolicy get httpCookieAcceptPolicy => - HTTPCookieAcceptPolicy.values[_nsObject.HTTPCookieAcceptPolicy]; - set httpCookieAcceptPolicy(HTTPCookieAcceptPolicy value) => - _nsObject.HTTPCookieAcceptPolicy = value.index; + NSHTTPCookieAcceptPolicy get httpCookieAcceptPolicy => + _nsObject.HTTPCookieAcceptPolicy; + set httpCookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) => + _nsObject.HTTPCookieAcceptPolicy = value; /// The maximum number of connections that a URLSession can have open to the /// same host. @@ -403,27 +239,27 @@ class URLSessionConfiguration /// What type of Multipath TCP connections to use. /// /// See [NSURLSessionConfiguration.multipathServiceType](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/2875967-multipathservicetype) - URLSessionMultipathServiceType get multipathServiceType => - URLSessionMultipathServiceType.values[_nsObject.multipathServiceType]; - set multipathServiceType(URLSessionMultipathServiceType value) => - _nsObject.multipathServiceType = value.index; + NSURLSessionMultipathServiceType get multipathServiceType => + _nsObject.multipathServiceType; + set multipathServiceType(NSURLSessionMultipathServiceType value) => + _nsObject.multipathServiceType = value; /// Provides in indication to the operating system on what type of requests /// are being sent. /// /// See [NSURLSessionConfiguration.networkServiceType](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411606-networkservicetype). - URLRequestNetworkService get networkServiceType => - URLRequestNetworkService.values[_nsObject.networkServiceType]; - set networkServiceType(URLRequestNetworkService value) => - _nsObject.networkServiceType = value.index; + NSURLRequestNetworkServiceType get networkServiceType => + _nsObject.networkServiceType; + set networkServiceType(NSURLRequestNetworkServiceType value) => + _nsObject.networkServiceType = value; /// Controls how to deal with response caching. /// /// See [NSURLSessionConfiguration.requestCachePolicy](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1411655-requestcachepolicy) - URLRequestCachePolicy get requestCachePolicy => - URLRequestCachePolicy.values[_nsObject.requestCachePolicy]; - set requestCachePolicy(URLRequestCachePolicy value) => - _nsObject.requestCachePolicy = value.index; + NSURLRequestCachePolicy get requestCachePolicy => + _nsObject.requestCachePolicy; + set requestCachePolicy(NSURLRequestCachePolicy value) => + _nsObject.requestCachePolicy = value; /// Whether the app should be resumed when background tasks complete. /// @@ -480,102 +316,6 @@ class URLSessionConfiguration ']'; } -/// A container for byte data. -/// -/// See [NSData](https://developer.apple.com/documentation/foundation/nsdata) -class Data extends _ObjectHolder { - Data._(super.c); - - /// A new [Data] from an existing one. - /// - /// See [NSData dataWithData:](https://developer.apple.com/documentation/foundation/nsdata/1547230-datawithdata) - factory Data.fromData(Data d) => - Data._(ncb.NSData.dataWithData_(linkedLibs, d._nsObject)); - - /// A new [Data] object containing the given bytes. - factory Data.fromList(List l) { - final buffer = calloc(l.length); - try { - buffer.asTypedList(l.length).setAll(0, l); - - final data = - ncb.NSData.dataWithBytes_length_(linkedLibs, buffer.cast(), l.length); - return Data._(data); - } finally { - calloc.free(buffer); - } - } - - /// A new [Data] object containing the given bytes. - @Deprecated('Use Data.fromList instead') - factory Data.fromUint8List(Uint8List l) = Data.fromList; - - /// The number of bytes contained in the object. - /// - /// See [NSData.length](https://developer.apple.com/documentation/foundation/nsdata/1416769-length) - int get length => _nsObject.length; - - /// The data contained in the object. - /// - /// See [NSData.bytes](https://developer.apple.com/documentation/foundation/nsdata/1410616-bytes) - Uint8List get bytes { - final bytes = _nsObject.bytes; - if (bytes.address == 0) { - return Uint8List(0); - } else { - // `NSData.byte` has the same lifetime as the `NSData` so make a copy to - // ensure memory safety. - // TODO(https://github.com/dart-lang/ffigen/issues/375): Remove copy. - return Uint8List.fromList(bytes.cast().asTypedList(length)); - } - } - - @override - String toString() { - final subrange = - length == 0 ? Uint8List(0) : bytes.sublist(0, min(length - 1, 20)); - final b = subrange.map((e) => e.toRadixString(16)).join(); - return '[Data length=$length bytes=0x$b...]'; - } -} - -/// A container for byte data. -/// -/// See [NSMutableData](https://developer.apple.com/documentation/foundation/nsmutabledata) -class MutableData extends Data { - final ncb.NSMutableData _mutableData; - - MutableData._(ncb.NSMutableData super.c) - : _mutableData = c, - super._(); - - /// A new empty [MutableData]. - factory MutableData.empty() => - MutableData._(ncb.NSMutableData.dataWithCapacity_(linkedLibs, 0)!); - - /// Appends the given data. - /// - /// See [NSMutableData appendBytes:length:](https://developer.apple.com/documentation/foundation/nsmutabledata/1407704-appendbytes) - void appendBytes(List l) { - final f = calloc(l.length); - try { - f.asTypedList(l.length).setAll(0, l); - - _mutableData.appendBytes_length_(f.cast(), l.length); - } finally { - calloc.free(f); - } - } - - @override - String toString() { - final subrange = - length == 0 ? Uint8List(0) : bytes.sublist(0, min(length - 1, 20)); - final b = subrange.map((e) => e.toRadixString(16)).join(); - return '[MutableData length=$length bytes=0x$b...]'; - } -} - /// The response associated with loading an URL. /// /// See [NSURLResponse](https://developer.apple.com/documentation/foundation/nsurlresponse) @@ -597,7 +337,7 @@ class URLResponse extends _ObjectHolder { /// The MIME type of the response. /// /// See [NSURLResponse.MIMEType](https://developer.apple.com/documentation/foundation/nsurlresponse/1411613-mimetype) - String? get mimeType => toStringOrNull(_nsObject.MIMEType); + String? get mimeType => _nsObject.MIMEType?.toString(); @override String toString() => '[URLResponse ' @@ -625,7 +365,8 @@ class HTTPURLResponse extends URLResponse { /// /// See [HTTPURLResponse.allHeaderFields](https://developer.apple.com/documentation/foundation/nshttpurlresponse/1417930-allheaderfields) Map get allHeaderFields { - final headers = ncb.NSDictionary.castFrom(_httpUrlResponse.allHeaderFields); + final headers = + objc.NSDictionary.castFrom(_httpUrlResponse.allHeaderFields); return stringNSDictionaryToMap(headers); } @@ -637,16 +378,6 @@ class HTTPURLResponse extends URLResponse { ']'; } -/// The possible states of a [URLSessionTask]. -/// -/// See [NSURLSessionTaskState](https://developer.apple.com/documentation/foundation/nsurlsessiontaskstate) -enum URLSessionTaskState { - urlSessionTaskStateRunning, - urlSessionTaskStateSuspended, - urlSessionTaskStateCanceling, - urlSessionTaskStateCompleted, -} - /// A WebSocket message. /// /// See [NSURLSessionWebSocketMessage](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage) @@ -657,38 +388,35 @@ class URLSessionWebSocketMessage /// Create a WebSocket data message. /// /// See [NSURLSessionWebSocketMessage initWithData:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181192-initwithdata) - factory URLSessionWebSocketMessage.fromData(Data d) => + factory URLSessionWebSocketMessage.fromData(objc.NSData d) => URLSessionWebSocketMessage._( - ncb.NSURLSessionWebSocketMessage.alloc(linkedLibs) - .initWithData_(d._nsObject)); + ncb.NSURLSessionWebSocketMessage.alloc().initWithData_(d)); /// Create a WebSocket string message. /// /// See [NSURLSessionWebSocketMessage initWitString:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181193-initwithstring) factory URLSessionWebSocketMessage.fromString(String s) => - URLSessionWebSocketMessage._( - ncb.NSURLSessionWebSocketMessage.alloc(linkedLibs) - .initWithString_(s.toNSString(linkedLibs))); + URLSessionWebSocketMessage._(ncb.NSURLSessionWebSocketMessage.alloc() + .initWithString_(s.toNSString())); /// The data associated with the WebSocket message. /// /// Will be `null` if the [URLSessionWebSocketMessage] is a string message. /// /// See [NSURLSessionWebSocketMessage.data](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181191-data) - Data? get data => _nsObject.data == null ? null : Data._(_nsObject.data!); + objc.NSData? get data => _nsObject.data; /// The string associated with the WebSocket message. /// /// Will be `null` if the [URLSessionWebSocketMessage] is a data message. /// /// See [NSURLSessionWebSocketMessage.string](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181194-string) - String? get string => toStringOrNull(_nsObject.string); + String? get string => _nsObject.string?.toString(); /// The type of the WebSocket message. /// /// See [NSURLSessionWebSocketMessage.type](https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketmessage/3181195-type) - URLSessionWebSocketMessageType get type => - URLSessionWebSocketMessageType.values[_nsObject.type]; + NSURLSessionWebSocketMessageType get type => _nsObject.type; @override String toString() => @@ -725,7 +453,7 @@ class URLSessionTask extends _ObjectHolder { /// The current state of the task. /// /// See [NSURLSessionTask.state](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1409888-state) - URLSessionTaskState get state => URLSessionTaskState.values[_nsObject.state]; + NSURLSessionTaskState get state => _nsObject.state; /// The relative priority [0, 1] that the host should use to handle the /// request. @@ -783,14 +511,7 @@ class URLSessionTask extends _ObjectHolder { /// An error indicating why the task failed or `null` on success. /// /// See [NSURLSessionTask.error](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1408145-error) - Error? get error { - final error = _nsObject.error; - if (error == null) { - return null; - } else { - return Error._(error); - } - } + objc.NSError? get error => _nsObject.error; /// The user-assigned description for the task. /// @@ -801,7 +522,7 @@ class URLSessionTask extends _ObjectHolder { /// /// See [NSURLSessionTask.taskDescription](https://developer.apple.com/documentation/foundation/nsurlsessiontask/1409798-taskdescription) set taskDescription(String value) => - _nsObject.taskDescription = value.toNSString(linkedLibs); + _nsObject.taskDescription = value.toNSString(); /// A unique ID for the [URLSessionTask] in a [URLSession]. /// @@ -886,14 +607,7 @@ class URLSessionWebSocketTask extends URLSessionTask { /// If there is no close reason available this property will be null. /// /// See [NSURLSessionWebSocketTask.closeReason](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181202-closereason) - Data? get closeReason { - final reason = _urlSessionWebSocketTask.closeReason; - if (reason == null) { - return null; - } else { - return Data._(reason); - } - } + objc.NSData? get closeReason => _urlSessionWebSocketTask.closeReason; /// Sends a single WebSocket message. /// @@ -903,21 +617,15 @@ class URLSessionWebSocketTask extends URLSessionTask { /// See [NSURLSessionWebSocketTask.sendMessage:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181205-sendmessage) Future sendMessage(URLSessionWebSocketMessage message) async { final completer = Completer(); - final completionPort = ReceivePort(); - completionPort.listen((message) { - final ep = Pointer.fromAddress(message as int); - if (ep.address == 0) { + _urlSessionWebSocketTask.sendMessage_completionHandler_(message._nsObject, + ncb.ObjCBlock_ffiVoid_NSError.listener((error) { + if (error == null) { completer.complete(); } else { - final error = Error._(ncb.NSError.castFromPointer(linkedLibs, ep, - retain: false, release: true)); completer.completeError(error); } - completionPort.close(); - }); + })); - helperLibs.CUPHTTPSendMessage(_urlSessionWebSocketTask, message._nsObject, - completionPort.sendPort.nativePort); await completer.future; } @@ -928,42 +636,26 @@ class URLSessionWebSocketTask extends URLSessionTask { /// See [NSURLSessionWebSocketTask.receiveMessageWithCompletionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181204-receivemessagewithcompletionhand) Future receiveMessage() async { final completer = Completer(); - final completionPort = ReceivePort(); - completionPort.listen((d) { - final messageAndError = d as List; - - final mp = Pointer.fromAddress(messageAndError[0] as int); - final ep = Pointer.fromAddress(messageAndError[1] as int); - - final message = mp.address == 0 - ? null - : URLSessionWebSocketMessage._( - ncb.NSURLSessionWebSocketMessage.castFromPointer(linkedLibs, mp, - retain: false, release: true)); - final error = ep.address == 0 - ? null - : Error._(ncb.NSError.castFromPointer(linkedLibs, ep, - retain: false, release: true)); - + _urlSessionWebSocketTask.receiveMessageWithCompletionHandler_( + ncb.ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.listener( + (message, error) { if (error != null) { completer.completeError(error); + } else if (message != null) { + completer.complete(URLSessionWebSocketMessage._(message)); } else { - completer.complete(message!); + completer.completeError( + StateError('one of message or error must be non-null')); } - completionPort.close(); - }); - - helperLibs.CUPHTTPReceiveMessage( - _urlSessionWebSocketTask, completionPort.sendPort.nativePort); + })); return completer.future; } /// Sends close frame with the given code and optional reason. /// /// See [NSURLSessionWebSocketTask.cancelWithCloseCode:reason:](https://developer.apple.com/documentation/foundation/nsurlsessionwebsockettask/3181200-cancelwithclosecode) - void cancelWithCloseCode(int closeCode, Data? reason) { - _urlSessionWebSocketTask.cancelWithCloseCode_reason_( - closeCode, reason?._nsObject); + void cancelWithCloseCode(int closeCode, objc.NSData? reason) { + _urlSessionWebSocketTask.cancelWithCloseCode_reason_(closeCode, reason); } @override @@ -979,8 +671,8 @@ class URLRequest extends _ObjectHolder { /// Creates a request for a URL. /// /// See [NSURLRequest.requestWithURL:](https://developer.apple.com/documentation/foundation/nsurlrequest/1528603-requestwithurl) - factory URLRequest.fromUrl(Uri uri) => URLRequest._( - ncb.NSURLRequest.requestWithURL_(linkedLibs, uriToNSURL(uri))); + factory URLRequest.fromUrl(Uri uri) => + URLRequest._(ncb.NSURLRequest.requestWithURL_(uriToNSURL(uri))); /// Returns all of the HTTP headers for the request. /// @@ -989,27 +681,19 @@ class URLRequest extends _ObjectHolder { if (_nsObject.allHTTPHeaderFields == null) { return null; } else { - final headers = ncb.NSDictionary.castFrom(_nsObject.allHTTPHeaderFields!); - return stringNSDictionaryToMap(headers); + return stringNSDictionaryToMap(_nsObject.allHTTPHeaderFields!); } } /// Controls how to deal with caching for the request. /// /// See [NSURLSession.cachePolicy](https://developer.apple.com/documentation/foundation/nsurlrequest/1407944-cachepolicy) - URLRequestCachePolicy get cachePolicy => - URLRequestCachePolicy.values[_nsObject.cachePolicy]; + NSURLRequestCachePolicy get cachePolicy => _nsObject.cachePolicy; /// The body of the request. /// /// See [NSURLRequest.HTTPBody](https://developer.apple.com/documentation/foundation/nsurlrequest/1411317-httpbody) - Data? get httpBody { - final body = _nsObject.HTTPBody; - if (body == null) { - return null; - } - return Data._(ncb.NSData.castFrom(body)); - } + objc.NSData? get httpBody => _nsObject.HTTPBody; /// The HTTP request method (e.g. 'GET'). /// @@ -1035,7 +719,7 @@ class URLRequest extends _ObjectHolder { if (nsUrl == null) { return null; } - return Uri.parse(nsUrl.absoluteString!.toString()); + return nsurlToUri(nsUrl); } @override @@ -1063,28 +747,26 @@ class MutableURLRequest extends URLRequest { /// /// See [NSMutableURLRequest.requestWithURL:](https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1414617-allhttpheaderfields) factory MutableURLRequest.fromUrl(Uri uri) { - final url = ncb.NSURL - .URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs))!; - return MutableURLRequest._( - ncb.NSMutableURLRequest.requestWithURL_(linkedLibs, url)); + final url = objc.NSURL.URLWithString_(uri.toString().toNSString())!; + return MutableURLRequest._(ncb.NSMutableURLRequest.requestWithURL_(url)); } - set cachePolicy(URLRequestCachePolicy value) => - _mutableUrlRequest.cachePolicy = value.index; + set cachePolicy(NSURLRequestCachePolicy value) => + _mutableUrlRequest.cachePolicy = value; - set httpBody(Data? data) { - _mutableUrlRequest.HTTPBody = data?._nsObject; + set httpBody(objc.NSData? data) { + _mutableUrlRequest.HTTPBody = data; } /// Sets the body of the request to the given [Stream]. /// /// See [NSMutableURLRequest.HTTPBodyStream](https://developer.apple.com/documentation/foundation/nsurlrequest/1407341-httpbodystream). - set httpBodyStream(Stream> stream) { - _mutableUrlRequest.HTTPBodyStream = _streamToNSInputStream(stream); + set httpBodyStream(objc.NSInputStream stream) { + _mutableUrlRequest.HTTPBodyStream = stream; } set httpMethod(String method) { - _mutableUrlRequest.HTTPMethod = method.toNSString(linkedLibs); + _mutableUrlRequest.HTTPMethod = method.toNSString(); } set timeoutInterval(Duration interval) { @@ -1097,7 +779,7 @@ class MutableURLRequest extends URLRequest { /// See [NSMutableURLRequest setValue:forHTTPHeaderField:](https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1408793-setvalue) void setValueForHttpHeaderField(String value, String field) { _mutableUrlRequest.setValue_forHTTPHeaderField_( - field.toNSString(linkedLibs), value.toNSString(linkedLibs)); + field.toNSString(), value.toNSString()); } @override @@ -1111,279 +793,195 @@ class MutableURLRequest extends URLRequest { ']'; } -/// Setup delegation for the given [task] to the given methods. -/// -/// Specifically, this causes the Objective-C-implemented delegate installed -/// with -/// [sessionWithConfiguration:delegate:delegateQueue:](https://developer.apple.com/documentation/foundation/nsurlsession/1411597-sessionwithconfiguration) -/// to send a [ncb.CUPHTTPForwardedDelegate] object to a send port, which is -/// then processed by [_setupDelegation] and forwarded to the given methods. -void _setupDelegation( - ncb.CUPHTTPClientDelegate delegate, - URLSession session, - URLSessionTask task, { - URLRequest? Function(URLSession session, URLSessionTask task, - HTTPURLResponse response, URLRequest newRequest)? - onRedirect, - URLSessionResponseDisposition Function( - URLSession session, URLSessionTask task, URLResponse response)? - onResponse, - void Function(URLSession session, URLSessionTask task, Data error)? onData, - void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? - onFinishedDownloading, - void Function(URLSession session, URLSessionTask task, Error? error)? - onComplete, - void Function( - URLSession session, URLSessionWebSocketTask task, String? protocol)? - onWebSocketTaskOpened, - void Function(URLSession session, URLSessionWebSocketTask task, int closeCode, - Data? reason)? - onWebSocketTaskClosed, -}) { - final responsePort = ReceivePort(); - responsePort.listen((d) { - final message = d as List; - final messageType = message[0]; - final dp = Pointer.fromAddress(message[1] as int); - - final forwardedDelegate = ncb.CUPHTTPForwardedDelegate.castFromPointer( - helperLibs, dp, - retain: true, release: true); - - switch (messageType) { - case ncb.MessageType.RedirectMessage: - final forwardedRedirect = - ncb.CUPHTTPForwardedRedirect.castFrom(forwardedDelegate); - URLRequest? redirectRequest; - - try { - final request = URLRequest._( - ncb.NSURLRequest.castFrom(forwardedRedirect.request)); - - if (onRedirect == null) { - redirectRequest = request; - break; - } - try { - final response = HTTPURLResponse._( - ncb.NSHTTPURLResponse.castFrom(forwardedRedirect.response)); - redirectRequest = onRedirect(session, task, response, request); - } catch (e) { - // TODO(https://github.com/dart-lang/ffigen/issues/386): Package - // this exception as an `Error` and call the completion function - // with it. - } - } finally { - forwardedRedirect.finishWithRequest_(redirectRequest?._nsObject); - } - break; - case ncb.MessageType.ResponseMessage: - final forwardedResponse = - ncb.CUPHTTPForwardedResponse.castFrom(forwardedDelegate); - var disposition = - URLSessionResponseDisposition.urlSessionResponseCancel; - - try { - if (onResponse == null) { - disposition = URLSessionResponseDisposition.urlSessionResponseAllow; - break; - } - final response = - URLResponse._exactURLResponseType(forwardedResponse.response); - - try { - disposition = onResponse(session, task, response); - } catch (e) { - // TODO(https://github.com/dart-lang/ffigen/issues/386): Package - // this exception as an `Error` and call the completion function - // with it. - } - } finally { - forwardedResponse.finishWithDisposition_(disposition.index); - } - break; - case ncb.MessageType.DataMessage: - final forwardedData = - ncb.CUPHTTPForwardedData.castFrom(forwardedDelegate); - - try { - if (onData == null) { - break; - } - try { - onData( - session, task, Data._(ncb.NSData.castFrom(forwardedData.data))); - } catch (e) { - // TODO(https://github.com/dart-lang/ffigen/issues/386): Package - // this exception as an `Error` and call the completion function - // with it. - } - } finally { - forwardedData.finish(); - } - break; - case ncb.MessageType.FinishedDownloading: - final finishedDownloading = - ncb.CUPHTTPForwardedFinishedDownloading.castFrom(forwardedDelegate); - try { - if (onFinishedDownloading == null) { - break; - } - try { - onFinishedDownloading( - session, - task as URLSessionDownloadTask, - Uri.parse( - finishedDownloading.location.absoluteString!.toString())); - } catch (e) { - // TODO(https://github.com/dart-lang/ffigen/issues/386): Package - // this exception as an `Error` and call the completion function - // with it. - } - } finally { - finishedDownloading.finish(); - } - break; - case ncb.MessageType.CompletedMessage: - final forwardedComplete = - ncb.CUPHTTPForwardedComplete.castFrom(forwardedDelegate); - - try { - if (onComplete == null) { - break; - } - Error? error; - if (forwardedComplete.error != null) { - error = Error._(ncb.NSError.castFrom(forwardedComplete.error!)); - } - try { - onComplete(session, task, error); - } catch (e) { - // TODO(https://github.com/dart-lang/ffigen/issues/386): Package - // this exception as an `Error` and call the completion function - // with it. - } - } finally { - forwardedComplete.finish(); - responsePort.close(); - } - break; - case ncb.MessageType.WebSocketOpened: - final webSocketOpened = - ncb.CUPHTTPForwardedWebSocketOpened.castFrom(forwardedDelegate); - - try { - if (onWebSocketTaskOpened == null) { - break; - } - try { - onWebSocketTaskOpened(session, task as URLSessionWebSocketTask, - webSocketOpened.protocol?.toString()); - } catch (e) { - // TODO(https://github.com/dart-lang/ffigen/issues/386): Package - // this exception as an `Error` and call the completion function - // with it. - } - } finally { - webSocketOpened.finish(); - } - break; - case ncb.MessageType.WebSocketClosed: - final webSocketClosed = - ncb.CUPHTTPForwardedWebSocketClosed.castFrom(forwardedDelegate); - - try { - if (onWebSocketTaskClosed == null) { - break; - } - try { - onWebSocketTaskClosed( - session, - task as URLSessionWebSocketTask, - webSocketClosed.closeCode, - webSocketClosed.reason == null - ? null - : Data._(webSocketClosed.reason!)); - } catch (e) { - // TODO(https://github.com/dart-lang/ffigen/issues/386): Package - // this exception as an `Error` and call the completion function - // with it. - } - } finally { - webSocketClosed.finish(); - } - break; - } - }); - final config = ncb.CUPHTTPTaskConfiguration.castFrom( - ncb.CUPHTTPTaskConfiguration.alloc(helperLibs) - .initWithPort_(responsePort.sendPort.nativePort)); - - delegate.registerTask_withConfiguration_(task._nsObject, config); -} - /// A client that can make network requests to a server. /// /// See [NSURLSession](https://developer.apple.com/documentation/foundation/nsurlsession) class URLSession extends _ObjectHolder { // Provide our own native delegate to `NSURLSession` because delegates can be // called on arbitrary threads and Dart code cannot be. - static final _delegate = ncb.CUPHTTPClientDelegate.new1(helperLibs); // Indicates if the session is a background session. Copied from the // [URLSessionConfiguration._isBackground] associated with this [URLSession]. final bool _isBackground; + final bool _hasDelegate; + // Pending Dart-implemented protocols/blocks do not keep the isolate alive. + // So we create a `ReceivePort` to keep the isolate alive. + // When a new task is created in a `URLSession` with a delegate installed + // (`_hasDelegate`), `_taskCount` is incremented. When a task completes, + // `_taskCount` is decremented. When `_taskCount` is 0 then the `ReceivePort` + // is closed. + static var _taskCount = 0; + static ReceivePort? _port; + + static void _incrementTaskCount() { + _port ??= ReceivePort(); + ++_taskCount; + } - final URLRequest? Function(URLSession session, URLSessionTask task, - HTTPURLResponse response, URLRequest newRequest)? _onRedirect; - final URLSessionResponseDisposition Function( - URLSession session, URLSessionTask task, URLResponse response)? - _onResponse; - final void Function(URLSession session, URLSessionTask task, Data error)? - _onData; - final void Function(URLSession session, URLSessionTask task, Error? error)? - _onComplete; - final void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? - _onFinishedDownloading; - final void Function( - URLSession session, URLSessionWebSocketTask task, String? protocol)? - _onWebSocketTaskOpened; - final void Function(URLSession session, URLSessionWebSocketTask task, - int closeCode, Data? reason)? _onWebSocketTaskClosed; + static void _decrementTaskCount() { + assert(_taskCount > 0); + assert(_port != null); + --_taskCount; + if (_taskCount == 0) { + _port?.close(); + _port = null; + } + } - URLSession._( - super.c, { - required bool isBackground, + static objc.ObjCObjectBase delegate( + bool isBackground, { URLRequest? Function(URLSession session, URLSessionTask task, HTTPURLResponse response, URLRequest newRequest)? onRedirect, - URLSessionResponseDisposition Function( + NSURLSessionResponseDisposition Function( URLSession session, URLSessionTask task, URLResponse response)? onResponse, - void Function(URLSession session, URLSessionTask task, Data error)? onData, + void Function(URLSession session, URLSessionTask task, objc.NSData error)? + onData, void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? onFinishedDownloading, - void Function(URLSession session, URLSessionTask task, Error? error)? + void Function(URLSession session, URLSessionTask task, objc.NSError? error)? onComplete, void Function( URLSession session, URLSessionWebSocketTask task, String? protocol)? onWebSocketTaskOpened, void Function(URLSession session, URLSessionWebSocketTask task, - int closeCode, Data? reason)? + int closeCode, objc.NSData? reason)? onWebSocketTaskClosed, + }) { + final protoBuilder = objc.ObjCProtocolBuilder(); + + ncb.NSURLSessionDataDelegate.addToBuilderAsListener( + protoBuilder, + URLSession_task_didCompleteWithError_: (nsSession, nsTask, nsError) { + _decrementTaskCount(); + if (onComplete != null) { + onComplete( + URLSession._(nsSession, + isBackground: isBackground, hasDelegate: true), + URLSessionTask._(nsTask), + nsError); + } + }, + ); + + if (onRedirect != null) { + ncb.NSURLSessionDataDelegate.addToBuilderAsListener(protoBuilder, + // ignore: lines_longer_than_80_chars + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_: + (nsSession, nsTask, nsResponse, nsRequest, nsRequestCompleter) { + final request = URLRequest._(nsRequest); + URLRequest? redirectRequest; + + try { + final response = + URLResponse._exactURLResponseType(nsResponse) as HTTPURLResponse; + redirectRequest = onRedirect( + URLSession._(nsSession, + isBackground: isBackground, hasDelegate: true), + URLSessionTask._(nsTask), + response, + request); + nsRequestCompleter.call(redirectRequest?._nsObject); + } catch (e) { + // TODO(https://github.com/dart-lang/ffigen/issues/386): Package + // this exception as an `Error` and call the completion function + // with it. + } + }); + } + + if (onResponse != null) { + ncb.NSURLSessionDataDelegate.addToBuilderAsListener(protoBuilder, + URLSession_dataTask_didReceiveResponse_completionHandler_: + (nsSession, nsDataTask, nsResponse, nsCompletionHandler) { + final exactResponse = URLResponse._exactURLResponseType(nsResponse); + final disposition = onResponse( + URLSession._(nsSession, + isBackground: isBackground, hasDelegate: true), + URLSessionTask._(nsDataTask), + exactResponse); + nsCompletionHandler.call(disposition); + }); + } + + if (onData != null) { + ncb.NSURLSessionDataDelegate.addToBuilderAsListener(protoBuilder, + URLSession_dataTask_didReceiveData_: (nsSession, nsDataTask, nsData) { + onData( + URLSession._(nsSession, + isBackground: isBackground, hasDelegate: true), + URLSessionTask._(nsDataTask), + nsData); + }); + } + + if (onFinishedDownloading != null) { + final asyncFinishDownloading = + // ignore: lines_longer_than_80_chars + ncb.ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL + .listener((nsCondition, nsSession, nsTask, nsUrl) { + try { + onFinishedDownloading( + URLSession._(nsSession, + isBackground: isBackground, hasDelegate: true), + URLSessionDownloadTask._(nsTask), + nsurlToUri(nsUrl)); + } finally { + nsCondition.unlock(); + } + }); + + final downloadDelegate = objc.getProtocol('NSURLSessionDownloadDelegate'); + final didFinishDownloadingToURL = objc + .registerName('URLSession:downloadTask:didFinishDownloadingToURL:'); + final signature = objc.getProtocolMethodSignature( + downloadDelegate, didFinishDownloadingToURL, + isRequired: true, isInstanceMethod: true); + protoBuilder.implementMethod(didFinishDownloadingToURL, signature, + linkedLibs.adaptFinishWithLock(asyncFinishDownloading)); + } + + if (onWebSocketTaskOpened != null) { + ncb.NSURLSessionWebSocketDelegate.addToBuilderAsListener(protoBuilder, + URLSession_webSocketTask_didOpenWithProtocol_: + (nsSession, nsTask, nsProtocol) { + onWebSocketTaskOpened( + URLSession._(nsSession, + isBackground: isBackground, hasDelegate: true), + URLSessionWebSocketTask._(nsTask), + nsProtocol?.toString()); + }); + } + + if (onWebSocketTaskClosed != null) { + ncb.NSURLSessionWebSocketDelegate.addToBuilderAsListener(protoBuilder, + URLSession_webSocketTask_didCloseWithCode_reason_: + (nsSession, nsTask, closeCode, reason) { + onWebSocketTaskClosed( + URLSession._(nsSession, + isBackground: isBackground, hasDelegate: true), + URLSessionWebSocketTask._(nsTask), + closeCode, + reason); + }); + } + + return protoBuilder.build(); + } + + URLSession._( + super.c, { + required bool isBackground, + required bool hasDelegate, }) : _isBackground = isBackground, - _onRedirect = onRedirect, - _onResponse = onResponse, - _onData = onData, - _onFinishedDownloading = onFinishedDownloading, - _onComplete = onComplete, - _onWebSocketTaskOpened = onWebSocketTaskOpened, - _onWebSocketTaskClosed = onWebSocketTaskClosed; + _hasDelegate = hasDelegate; /// A client with reasonable default behavior. /// /// See [NSURLSession.sharedSession](https://developer.apple.com/documentation/foundation/nsurlsession/1409000-sharedsession) - factory URLSession.sharedSession() => URLSession.sessionWithConfiguration( - URLSessionConfiguration.defaultSessionConfiguration()); + factory URLSession.sharedSession() => + URLSession._(ncb.NSURLSession.getSharedSession(), + isBackground: false, hasDelegate: false); /// A client with a given configuration. /// @@ -1398,7 +996,7 @@ class URLSession extends _ObjectHolder { /// [URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessiontaskdelegate/1411626-urlsession) /// /// If [onResponse] is set then it will be called whenever a valid response - /// is received. The returned [URLSessionResponseDisposition] will decide + /// is received. The returned [NSURLSessionResponseDisposition] will decide /// how the content of the response is processed. See /// [URLSession:dataTask:didReceiveResponse:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsessiondatadelegate/1410027-urlsession) /// @@ -1429,43 +1027,60 @@ class URLSession extends _ObjectHolder { URLRequest? Function(URLSession session, URLSessionTask task, HTTPURLResponse response, URLRequest newRequest)? onRedirect, - URLSessionResponseDisposition Function( + NSURLSessionResponseDisposition Function( URLSession session, URLSessionTask task, URLResponse response)? onResponse, - void Function(URLSession session, URLSessionTask task, Data error)? onData, + void Function(URLSession session, URLSessionTask task, objc.NSData data)? + onData, void Function(URLSession session, URLSessionDownloadTask task, Uri uri)? onFinishedDownloading, - void Function(URLSession session, URLSessionTask task, Error? error)? + void Function(URLSession session, URLSessionTask task, objc.NSError? error)? onComplete, void Function( URLSession session, URLSessionWebSocketTask task, String? protocol)? onWebSocketTaskOpened, void Function(URLSession session, URLSessionWebSocketTask task, - int? closeCode, Data? reason)? + int? closeCode, objc.NSData? reason)? onWebSocketTaskClosed, }) { // Avoid the complexity of simultaneous or out-of-order delegate callbacks // by only allowing callbacks to execute sequentially. // See https://developer.apple.com/forums/thread/47252 - // NOTE: this is likely to reduce throughput when there are multiple - // requests in flight because each call to a delegate waits on a lock - // that is unlocked by Dart code. - final queue = ncb.NSOperationQueue.new1(linkedLibs) + final queue = ncb.NSOperationQueue.new1() ..maxConcurrentOperationCount = 1 - ..name = - 'cupertino_http.NSURLSessionDelegateQueue'.toNSString(linkedLibs); - - return URLSession._( + ..name = 'cupertino_http.NSURLSessionDelegateQueue'.toNSString(); + + final hasDelegate = (onRedirect ?? + onResponse ?? + onData ?? + onFinishedDownloading ?? + onComplete ?? + onWebSocketTaskOpened ?? + onWebSocketTaskClosed) != + null; + + if (hasDelegate) { + return URLSession._( ncb.NSURLSession.sessionWithConfiguration_delegate_delegateQueue_( - linkedLibs, config._nsObject, _delegate, queue), + config._nsObject, + delegate(config._isBackground, + onRedirect: onRedirect, + onResponse: onResponse, + onData: onData, + onFinishedDownloading: onFinishedDownloading, + onComplete: onComplete, + onWebSocketTaskOpened: onWebSocketTaskOpened, + onWebSocketTaskClosed: onWebSocketTaskClosed), + queue), isBackground: config._isBackground, - onRedirect: onRedirect, - onResponse: onResponse, - onData: onData, - onFinishedDownloading: onFinishedDownloading, - onComplete: onComplete, - onWebSocketTaskOpened: onWebSocketTaskOpened, - onWebSocketTaskClosed: onWebSocketTaskClosed); + hasDelegate: true, + ); + } else { + return URLSession._( + ncb.NSURLSession.sessionWithConfiguration_(config._nsObject), + isBackground: config._isBackground, + hasDelegate: false); + } } /// A **copy** of the configuration for this session. @@ -1478,10 +1093,9 @@ class URLSession extends _ObjectHolder { /// A description of the session that may be useful for debugging. /// /// See [NSURLSession.sessionDescription](https://developer.apple.com/documentation/foundation/nsurlsession/1408277-sessiondescription) - String? get sessionDescription => - toStringOrNull(_nsObject.sessionDescription); + String? get sessionDescription => _nsObject.sessionDescription?.toString(); set sessionDescription(String? value) => - _nsObject.sessionDescription = value?.toNSString(linkedLibs); + _nsObject.sessionDescription = value?.toNSString(); /// Create a [URLSessionTask] that accesses a server URL. /// @@ -1489,12 +1103,9 @@ class URLSession extends _ObjectHolder { URLSessionTask dataTaskWithRequest(URLRequest request) { final task = URLSessionTask._(_nsObject.dataTaskWithRequest_(request._nsObject)); - _setupDelegation(_delegate, this, task, - onComplete: _onComplete, - onData: _onData, - onFinishedDownloading: _onFinishedDownloading, - onRedirect: _onRedirect, - onResponse: _onResponse); + if (_hasDelegate) { + _incrementTaskCount(); + } return task; } @@ -1504,39 +1115,32 @@ class URLSession extends _ObjectHolder { /// See [NSURLSession dataTaskWithRequest:completionHandler:](https://developer.apple.com/documentation/foundation/nsurlsession/1407613-datataskwithrequest) URLSessionTask dataTaskWithCompletionHandler( URLRequest request, - void Function(Data? data, HTTPURLResponse? response, Error? error) + void Function( + objc.NSData? data, URLResponse? response, objc.NSError? error) completion) { - // This method cannot be implemented by simply calling - // `dataTaskWithRequest:completionHandler:` because the completion handler - // will invoke the Dart callback on an arbitrary thread and Dart code - // cannot be run that way - // (see https://github.com/dart-lang/sdk/issues/37022). - // - // Instead, we use `dataTaskWithRequest:` and: - // 1. create a port to receive information about the request. - // 2. use a delegate to send information about the task to the port - // 3. call the user-provided completion function when we receive the - // `CompletedMessage` message type. - final task = - URLSessionTask._(_nsObject.dataTaskWithRequest_(request._nsObject)); - - HTTPURLResponse? finalResponse; - MutableData? allData; - - _setupDelegation(_delegate, this, task, onRedirect: _onRedirect, onResponse: - (URLSession session, URLSessionTask task, URLResponse response) { - finalResponse = - HTTPURLResponse._(ncb.NSHTTPURLResponse.castFrom(response._nsObject)); - return URLSessionResponseDisposition.urlSessionResponseAllow; - }, onData: (URLSession session, URLSessionTask task, Data data) { - allData ??= MutableData.empty(); - allData!.appendBytes(data.bytes); - }, onComplete: (URLSession session, URLSessionTask task, Error? error) { - completion(allData == null ? null : Data.fromData(allData!), - finalResponse, error); + if (_isBackground) { + throw UnsupportedError( + 'dataTaskWithCompletionHandler is not supported in background ' + 'sessions'); + } + final completer = + ncb.ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.listener( + (data, response, error) { + _decrementTaskCount(); + completion( + data, + response == null ? null : URLResponse._exactURLResponseType(response), + error, + ); }); - return URLSessionTask._(task._nsObject); + final task = _nsObject.dataTaskWithRequest_completionHandler_( + request._nsObject, + completer, + ); + + _incrementTaskCount(); + return URLSessionTask._(task); } /// Creates a [URLSessionDownloadTask] that downloads the data from a server @@ -1549,12 +1153,9 @@ class URLSession extends _ObjectHolder { URLSessionDownloadTask downloadTaskWithRequest(URLRequest request) { final task = URLSessionDownloadTask._( _nsObject.downloadTaskWithRequest_(request._nsObject)); - _setupDelegation(_delegate, this, task, - onComplete: _onComplete, - onData: _onData, - onFinishedDownloading: _onFinishedDownloading, - onRedirect: _onRedirect, - onResponse: _onResponse); + if (_hasDelegate) { + _incrementTaskCount(); + } return task; } @@ -1572,14 +1173,9 @@ class URLSession extends _ObjectHolder { } final task = URLSessionWebSocketTask._( _nsObject.webSocketTaskWithRequest_(request._nsObject)); - _setupDelegation(_delegate, this, task, - onComplete: _onComplete, - onData: _onData, - onFinishedDownloading: _onFinishedDownloading, - onRedirect: _onRedirect, - onResponse: _onResponse, - onWebSocketTaskOpened: _onWebSocketTaskOpened, - onWebSocketTaskClosed: _onWebSocketTaskClosed); + if (_hasDelegate) { + _incrementTaskCount(); + } return task; } @@ -1593,7 +1189,6 @@ class URLSession extends _ObjectHolder { throw UnsupportedError( 'WebSocket tasks are not supported in background sessions'); } - final URLSessionWebSocketTask task; if (protocols == null) { task = URLSessionWebSocketTask._( @@ -1603,14 +1198,9 @@ class URLSession extends _ObjectHolder { _nsObject.webSocketTaskWithURL_protocols_( uriToNSURL(uri), stringIterableToNSArray(protocols))); } - _setupDelegation(_delegate, this, task, - onComplete: _onComplete, - onData: _onData, - onFinishedDownloading: _onFinishedDownloading, - onRedirect: _onRedirect, - onResponse: _onResponse, - onWebSocketTaskOpened: _onWebSocketTaskOpened, - onWebSocketTaskClosed: _onWebSocketTaskClosed); + if (_hasDelegate) { + _incrementTaskCount(); + } return task; } diff --git a/pkgs/cupertino_http/lib/src/cupertino_client.dart b/pkgs/cupertino_http/lib/src/cupertino_client.dart index eefa1189f0..041f7f584c 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_client.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_client.dart @@ -9,6 +9,7 @@ import 'dart:typed_data'; import 'package:async/async.dart'; import 'package:http/http.dart'; import 'package:http_profile/http_profile.dart'; +import 'package:objective_c/objective_c.dart'; import 'cupertino_api.dart'; @@ -164,11 +165,11 @@ class CupertinoClient extends BaseClient { static _TaskTracker _tracker(URLSessionTask task) => _tasks[task]!; static void _onComplete( - URLSession session, URLSessionTask task, Error? error) { + URLSession session, URLSessionTask task, NSError? error) { final taskTracker = _tracker(task); if (error != null) { final exception = ClientException( - error.localizedDescription ?? 'Unknown', taskTracker.request.url); + error.localizedDescription.toString(), taskTracker.request.url); if (taskTracker.profile != null && taskTracker.profile!.requestData.endTime == null) { // Error occurred during the request. @@ -196,10 +197,10 @@ class CupertinoClient extends BaseClient { _tasks.remove(task); } - static void _onData(URLSession session, URLSessionTask task, Data data) { + static void _onData(URLSession session, URLSessionTask task, NSData data) { final taskTracker = _tracker(task); - taskTracker.responseController.add(data.bytes); - taskTracker.profile?.responseData.bodySink.add(data.bytes); + taskTracker.responseController.add(data.toList()); + taskTracker.profile?.responseData.bodySink.add(data.toList()); } static URLRequest? _onRedirect(URLSession session, URLSessionTask task, @@ -218,13 +219,13 @@ class CupertinoClient extends BaseClient { return null; } - static URLSessionResponseDisposition _onResponse( + static NSURLSessionResponseDisposition _onResponse( URLSession session, URLSessionTask task, URLResponse response) { final taskTracker = _tracker(task); taskTracker.responseCompleter.complete(response); unawaited(taskTracker.profile?.requestData.close()); - return URLSessionResponseDisposition.urlSessionResponseAllow; + return NSURLSessionResponseDisposition.NSURLSessionResponseAllow; } /// A [Client] with the default configuration. @@ -319,17 +320,17 @@ class CupertinoClient extends BaseClient { if (request is Request) { // Optimize the (typical) `Request` case since assigning to // `httpBodyStream` requires a lot of expensive setup and data passing. - urlRequest.httpBody = Data.fromList(request.bodyBytes); + urlRequest.httpBody = request.bodyBytes.toNSData(); profile?.requestData.bodySink.add(request.bodyBytes); } else if (await _hasData(stream) case (true, final s)) { // If the request is supposed to be bodyless (e.g. GET requests) // then setting `httpBodyStream` will cause the request to fail - // even if the stream is empty. if (profile == null) { - urlRequest.httpBodyStream = s; + urlRequest.httpBodyStream = s.toNSInputStream(); } else { final splitter = StreamSplitter(s); - urlRequest.httpBodyStream = splitter.split(); + urlRequest.httpBodyStream = splitter.split().toNSInputStream(); unawaited(profile.requestData.bodySink.addStream(splitter.split())); } } diff --git a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart index dc4d748c14..124e6c5ba2 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_web_socket.dart @@ -6,13 +6,14 @@ import 'dart:async'; import 'dart:convert'; import 'dart:typed_data'; +import 'package:objective_c/objective_c.dart' as objc; import 'package:web_socket/web_socket.dart'; import 'cupertino_api.dart'; /// An error occurred while connecting to the peer. class ConnectionException extends WebSocketException { - final Error error; + final objc.NSError error; ConnectionException(super.message, this.error); @@ -115,7 +116,7 @@ class CupertinoWebSocket implements WebSocket { // 3. an error occurred (e.g. network failure) and `_connectionClosed` // will signal that and close `event`. webSocket._connectionClosed( - 1006, Data.fromList('abnormal close'.codeUnits)); + 1006, 'abnormal close'.codeUnits.toNSData()); } }); @@ -138,11 +139,13 @@ class CupertinoWebSocket implements WebSocket { late WebSocketEvent event; switch (value.type) { - case URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeString: + case NSURLSessionWebSocketMessageType + .NSURLSessionWebSocketMessageTypeString: event = TextDataReceived(value.string!); break; - case URLSessionWebSocketMessageType.urlSessionWebSocketMessageTypeData: - event = BinaryDataReceived(value.data!.bytes); + case NSURLSessionWebSocketMessageType + .NSURLSessionWebSocketMessageTypeData: + event = BinaryDataReceived(value.data!.toList()); break; } _events.add(event); @@ -158,28 +161,30 @@ class CupertinoWebSocket implements WebSocket { /// Close the WebSocket connection due to an error and send the /// [CloseReceived] event. void _closeConnectionWithError(Object e) { - if (e is Error) { - if (e.domain == 'NSPOSIXErrorDomain' && e.code == 57) { + if (e is objc.NSError) { + if (e.domain.toString() == 'NSPOSIXErrorDomain' && e.code == 57) { // Socket is not connected. // onWebSocketTaskClosed/onComplete will be invoked and may indicate a // close code. return; } - var (int code, String? reason) = switch ([e.domain, e.code]) { - ['NSPOSIXErrorDomain', 100] => (1002, e.localizedDescription), - _ => (1006, e.localizedDescription) + var (int code, String? reason) = switch ([e.domain.toString(), e.code]) { + ['NSPOSIXErrorDomain', 100] => ( + 1002, + e.localizedDescription.toString() + ), + _ => (1006, e.localizedDescription.toString()) }; _task.cancel(); - _connectionClosed( - code, reason == null ? null : Data.fromList(reason.codeUnits)); + _connectionClosed(code, reason.codeUnits.toNSData()); } else { throw StateError('unexpected error: $e'); } } - void _connectionClosed(int? closeCode, Data? reason) { + void _connectionClosed(int? closeCode, objc.NSData? reason) { if (!_events.isClosed) { - final closeReason = reason == null ? '' : utf8.decode(reason.bytes); + final closeReason = reason == null ? '' : utf8.decode(reason.toList()); _events ..add(CloseReceived(closeCode, closeReason)) @@ -193,7 +198,7 @@ class CupertinoWebSocket implements WebSocket { throw WebSocketConnectionClosed(); } _task - .sendMessage(URLSessionWebSocketMessage.fromData(Data.fromList(b))) + .sendMessage(URLSessionWebSocketMessage.fromData(b.toNSData())) .then((value) => value, onError: _closeConnectionWithError); } @@ -226,7 +231,7 @@ class CupertinoWebSocket implements WebSocket { unawaited(_events.close()); if (code != null) { reason = reason ?? ''; - _task.cancelWithCloseCode(code, Data.fromList(utf8.encode(reason))); + _task.cancelWithCloseCode(code, utf8.encode(reason).toNSData()); } else { _task.cancel(); } diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index 9c3b2c40b5..a4f2e61ccf 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -10,7 +10,7 @@ // Generated by `package:ffigen`. // ignore_for_file: type=lint import 'dart:ffi' as ffi; -import 'package:ffi/ffi.dart' as pkg_ffi; +import 'package:objective_c/objective_c.dart' as objc; /// Bindings for the Foundation URL Loading System and supporting libraries. /// @@ -199,13 +199,13 @@ class NativeCupertinoHttp { _waitpidPtr.asFunction, int)>(); int waitid( - int arg0, - int arg1, + idtype_t arg0, + Dart__uint32_t arg1, ffi.Pointer arg2, int arg3, ) { return _waitid( - arg0, + arg0.value, arg1, arg2, arg3, @@ -214,8 +214,8 @@ class NativeCupertinoHttp { late final _waitidPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int32, id_t, ffi.Pointer, ffi.Int)>>('waitid'); + ffi.Int Function(ffi.UnsignedInt, id_t, ffi.Pointer, + ffi.Int)>>('waitid'); late final _waitid = _waitidPtr .asFunction, int)>(); @@ -599,6 +599,23 @@ class NativeCupertinoHttp { late final _realloc = _reallocPtr .asFunction Function(ffi.Pointer, int)>(); + ffi.Pointer reallocf( + ffi.Pointer __ptr, + int __size, + ) { + return _reallocf( + __ptr, + __size, + ); + } + + late final _reallocfPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('reallocf'); + late final _reallocf = _reallocfPtr + .asFunction Function(ffi.Pointer, int)>(); + ffi.Pointer valloc( int arg0, ) { @@ -1689,91 +1706,34 @@ class NativeCupertinoHttp { _arc4random_uniformPtr.asFunction(); int atexit_b( - ObjCBlock_ffiVoid arg0, + objc.ObjCBlock arg0, ) { return _atexit_b( - arg0._id, - ); - } - - late final _atexit_bPtr = - _lookup)>>( - 'atexit_b'); - late final _atexit_b = - _atexit_bPtr.asFunction)>(); - - ffi.Pointer<_ObjCBlockDesc> _newBlockDesc1() { - final d = - pkg_ffi.calloc.allocate<_ObjCBlockDesc>(ffi.sizeOf<_ObjCBlockDesc>()); - d.ref.reserved = 0; - d.ref.size = ffi.sizeOf<_ObjCBlock>(); - d.ref.copy_helper = ffi.nullptr; - d.ref.dispose_helper = ffi.nullptr; - d.ref.signature = ffi.nullptr; - return d; - } - - late final _objc_block_desc1 = _newBlockDesc1(); - late final _objc_concrete_global_block1 = - _lookup('_NSConcreteGlobalBlock'); - ffi.Pointer<_ObjCBlock> _newBlock1( - ffi.Pointer invoke, ffi.Pointer target) { - final b = pkg_ffi.calloc.allocate<_ObjCBlock>(ffi.sizeOf<_ObjCBlock>()); - b.ref.isa = _objc_concrete_global_block1; - b.ref.flags = 0; - b.ref.reserved = 0; - b.ref.invoke = invoke; - b.ref.target = target; - b.ref.descriptor = _objc_block_desc1; - final copy = _Block_copy(b.cast()).cast<_ObjCBlock>(); - pkg_ffi.calloc.free(b); - return copy; - } - - ffi.Pointer _Block_copy( - ffi.Pointer value, - ) { - return __Block_copy( - value, + arg0.ref.pointer, ); } - late final __Block_copyPtr = _lookup< + late final _atexit_bPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('_Block_copy'); - late final __Block_copy = __Block_copyPtr - .asFunction Function(ffi.Pointer)>(); - - void _Block_release( - ffi.Pointer value, - ) { - return __Block_release( - value, - ); - } - - late final __Block_releasePtr = - _lookup)>>( - '_Block_release'); - late final __Block_release = - __Block_releasePtr.asFunction)>(); + ffi.Int Function(ffi.Pointer)>>('atexit_b'); + late final _atexit_b = + _atexit_bPtr.asFunction)>(); - late final _objc_releaseFinalizer2 = - ffi.NativeFinalizer(__Block_releasePtr.cast()); ffi.Pointer bsearch_b( ffi.Pointer __key, ffi.Pointer __base, int __nel, int __width, - ObjCBlock_ffiInt_ffiVoid_ffiVoid __compar, + objc.ObjCBlock< + ffi.Int Function(ffi.Pointer, ffi.Pointer)> + __compar, ) { return _bsearch_b( __key, __base, __nel, __width, - __compar._id, + __compar.ref.pointer, ); } @@ -1784,10 +1744,10 @@ class NativeCupertinoHttp { ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('bsearch_b'); + ffi.Pointer)>>('bsearch_b'); late final _bsearch_b = _bsearch_bPtr.asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, int, int, ffi.Pointer)>(); ffi.Pointer cgetcap( ffi.Pointer arg0, @@ -2116,22 +2076,25 @@ class NativeCupertinoHttp { ffi.Pointer __base, int __nel, int __width, - ObjCBlock_ffiInt_ffiVoid_ffiVoid __compar, + objc.ObjCBlock< + ffi.Int Function(ffi.Pointer, ffi.Pointer)> + __compar, ) { return _heapsort_b( __base, __nel, __width, - __compar._id, + __compar.ref.pointer, ); } late final _heapsort_bPtr = _lookup< ffi.NativeFunction< ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('heapsort_b'); + ffi.Pointer)>>('heapsort_b'); late final _heapsort_b = _heapsort_bPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + int Function( + ffi.Pointer, int, int, ffi.Pointer)>(); int mergesort( ffi.Pointer __base, @@ -2174,22 +2137,25 @@ class NativeCupertinoHttp { ffi.Pointer __base, int __nel, int __width, - ObjCBlock_ffiInt_ffiVoid_ffiVoid __compar, + objc.ObjCBlock< + ffi.Int Function(ffi.Pointer, ffi.Pointer)> + __compar, ) { return _mergesort_b( __base, __nel, __width, - __compar._id, + __compar.ref.pointer, ); } late final _mergesort_bPtr = _lookup< ffi.NativeFunction< ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('mergesort_b'); + ffi.Pointer)>>('mergesort_b'); late final _mergesort_b = _mergesort_bPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + int Function( + ffi.Pointer, int, int, ffi.Pointer)>(); void psort( ffi.Pointer __base, @@ -2232,23 +2198,25 @@ class NativeCupertinoHttp { ffi.Pointer __base, int __nel, int __width, - ObjCBlock_ffiInt_ffiVoid_ffiVoid __compar, + objc.ObjCBlock< + ffi.Int Function(ffi.Pointer, ffi.Pointer)> + __compar, ) { return _psort_b( __base, __nel, __width, - __compar._id, + __compar.ref.pointer, ); } late final _psort_bPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('psort_b'); + ffi.Pointer)>>('psort_b'); late final _psort_b = _psort_bPtr.asFunction< void Function( - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, int, int, ffi.Pointer)>(); void psort_r( ffi.Pointer __base, @@ -2298,23 +2266,25 @@ class NativeCupertinoHttp { ffi.Pointer __base, int __nel, int __width, - ObjCBlock_ffiInt_ffiVoid_ffiVoid __compar, + objc.ObjCBlock< + ffi.Int Function(ffi.Pointer, ffi.Pointer)> + __compar, ) { return _qsort_b( __base, __nel, __width, - __compar._id, + __compar.ref.pointer, ); } late final _qsort_bPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer<_ObjCBlock>)>>('qsort_b'); + ffi.Pointer)>>('qsort_b'); late final _qsort_b = _qsort_bPtr.asFunction< void Function( - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer, int, int, ffi.Pointer)>(); void qsort_r( ffi.Pointer __base, @@ -2434,23 +2404,6 @@ class NativeCupertinoHttp { _lookup>('srandomdev'); late final _srandomdev = _srandomdevPtr.asFunction(); - ffi.Pointer reallocf( - ffi.Pointer __ptr, - int __size, - ) { - return _reallocf( - __ptr, - __size, - ); - } - - late final _reallocfPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('reallocf'); - late final _reallocf = _reallocfPtr - .asFunction Function(ffi.Pointer, int)>(); - int strtonum( ffi.Pointer __numstr, int __minval, @@ -2541,7 +2494,7 @@ class NativeCupertinoHttp { .asFunction, int)>(); ffi.Pointer sel_getName( - ffi.Pointer sel, + ffi.Pointer sel, ) { return _sel_getName( sel, @@ -2550,70 +2503,71 @@ class NativeCupertinoHttp { late final _sel_getNamePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('sel_getName'); - late final _sel_getName = _sel_getNamePtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('sel_getName'); + late final _sel_getName = _sel_getNamePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - ffi.Pointer sel_registerName( + ffi.Pointer sel_registerName( ffi.Pointer str, ) { - return _sel_registerName1( + return _sel_registerName( str, ); } late final _sel_registerNamePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer)>>('sel_registerName'); - late final _sel_registerName1 = _sel_registerNamePtr - .asFunction Function(ffi.Pointer)>(); + late final _sel_registerName = _sel_registerNamePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); ffi.Pointer object_getClassName( - NSObject? obj, + objc.ObjCObjectBase? obj, ) { return _object_getClassName( - obj?._id ?? ffi.nullptr, + obj?.ref.pointer ?? ffi.nullptr, ); } late final _object_getClassNamePtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer)>>('object_getClassName'); - late final _object_getClassName = _object_getClassNamePtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer)>>('object_getClassName'); + late final _object_getClassName = _object_getClassNamePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); ffi.Pointer object_getIndexedIvars( - NSObject? obj, + objc.ObjCObjectBase? obj, ) { return _object_getIndexedIvars( - obj?._id ?? ffi.nullptr, + obj?.ref.pointer ?? ffi.nullptr, ); } late final _object_getIndexedIvarsPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer)>>('object_getIndexedIvars'); - late final _object_getIndexedIvars = _object_getIndexedIvarsPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer)>>('object_getIndexedIvars'); + late final _object_getIndexedIvars = _object_getIndexedIvarsPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); bool sel_isMapped( - ffi.Pointer sel, + ffi.Pointer sel, ) { return _sel_isMapped( sel, ); } - late final _sel_isMappedPtr = - _lookup)>>( - 'sel_isMapped'); - late final _sel_isMapped = - _sel_isMappedPtr.asFunction)>(); + late final _sel_isMappedPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer)>>('sel_isMapped'); + late final _sel_isMapped = _sel_isMappedPtr + .asFunction)>(); - ffi.Pointer sel_getUid( + ffi.Pointer sel_getUid( ffi.Pointer str, ) { return _sel_getUid( @@ -2623,11 +2577,12 @@ class NativeCupertinoHttp { late final _sel_getUidPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('sel_getUid'); - late final _sel_getUid = _sel_getUidPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('sel_getUid'); + late final _sel_getUid = _sel_getUidPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - NSObject? objc_retainedObject( + objc.ObjCObjectBase? objc_retainedObject( objc_objectptr_t obj, ) { return _objc_retainedObject( @@ -2635,23 +2590,22 @@ class NativeCupertinoHttp { ).address == 0 ? null - : NSObject._( + : objc.ObjCObjectBase( _objc_retainedObject( obj, ), - this, retain: true, release: true); } late final _objc_retainedObjectPtr = _lookup< - ffi - .NativeFunction Function(objc_objectptr_t)>>( - 'objc_retainedObject'); + ffi.NativeFunction< + ffi.Pointer Function( + objc_objectptr_t)>>('objc_retainedObject'); late final _objc_retainedObject = _objc_retainedObjectPtr - .asFunction Function(objc_objectptr_t)>(); + .asFunction Function(objc_objectptr_t)>(); - NSObject? objc_unretainedObject( + objc.ObjCObjectBase? objc_unretainedObject( objc_objectptr_t obj, ) { return _objc_unretainedObject( @@ -2659,73438 +2613,46610 @@ class NativeCupertinoHttp { ).address == 0 ? null - : NSObject._( + : objc.ObjCObjectBase( _objc_unretainedObject( obj, ), - this, retain: true, release: true); } late final _objc_unretainedObjectPtr = _lookup< - ffi - .NativeFunction Function(objc_objectptr_t)>>( - 'objc_unretainedObject'); + ffi.NativeFunction< + ffi.Pointer Function( + objc_objectptr_t)>>('objc_unretainedObject'); late final _objc_unretainedObject = _objc_unretainedObjectPtr - .asFunction Function(objc_objectptr_t)>(); + .asFunction Function(objc_objectptr_t)>(); objc_objectptr_t objc_unretainedPointer( - NSObject? obj, + objc.ObjCObjectBase? obj, ) { return _objc_unretainedPointer( - obj?._id ?? ffi.nullptr, + obj?.ref.pointer ?? ffi.nullptr, ); } late final _objc_unretainedPointerPtr = _lookup< - ffi - .NativeFunction)>>( - 'objc_unretainedPointer'); + ffi.NativeFunction< + objc_objectptr_t Function( + ffi.Pointer)>>('objc_unretainedPointer'); late final _objc_unretainedPointer = _objc_unretainedPointerPtr - .asFunction)>(); + .asFunction)>(); - ffi.Pointer _registerName1(String name) { - final cstr = name.toNativeUtf8(); - final sel = _sel_registerName(cstr.cast()); - pkg_ffi.calloc.free(cstr); - return sel; - } - - ffi.Pointer _sel_registerName( - ffi.Pointer str, - ) { - return __sel_registerName( - str, - ); - } + late final ffi.Pointer _NSFoundationVersionNumber = + _lookup('NSFoundationVersionNumber'); - late final __sel_registerNamePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('sel_registerName'); - late final __sel_registerName = __sel_registerNamePtr - .asFunction Function(ffi.Pointer)>(); + double get NSFoundationVersionNumber => _NSFoundationVersionNumber.value; - ffi.Pointer _getClass1(String name) { - final cstr = name.toNativeUtf8(); - final clazz = _objc_getClass(cstr.cast()); - pkg_ffi.calloc.free(cstr); - if (clazz == ffi.nullptr) { - throw Exception('Failed to load Objective-C class: $name'); - } - return clazz; - } + set NSFoundationVersionNumber(double value) => + _NSFoundationVersionNumber.value = value; - ffi.Pointer _objc_getClass( - ffi.Pointer str, + objc.NSString NSStringFromSelector( + ffi.Pointer aSelector, ) { - return __objc_getClass( - str, - ); + return objc.NSString.castFromPointer( + _NSStringFromSelector( + aSelector, + ), + retain: true, + release: true); } - late final __objc_getClassPtr = _lookup< + late final _NSStringFromSelectorPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('objc_getClass'); - late final __objc_getClass = __objc_getClassPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSStringFromSelector'); + late final _NSStringFromSelector = _NSStringFromSelectorPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - ffi.Pointer _objc_retain( - ffi.Pointer value, + ffi.Pointer NSSelectorFromString( + objc.NSString aSelectorName, ) { - return __objc_retain( - value, + return _NSSelectorFromString( + aSelectorName.ref.pointer, ); } - late final __objc_retainPtr = _lookup< + late final _NSSelectorFromStringPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('objc_retain'); - late final __objc_retain = __objc_retainPtr - .asFunction Function(ffi.Pointer)>(); - - void _objc_release( - ffi.Pointer value, - ) { - return __objc_release( - value, - ); - } - - late final __objc_releasePtr = - _lookup)>>( - 'objc_release'); - late final __objc_release = - __objc_releasePtr.asFunction)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSSelectorFromString'); + late final _NSSelectorFromString = _NSSelectorFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _objc_releaseFinalizer11 = - ffi.NativeFinalizer(__objc_releasePtr.cast()); - late final _class_NSObject1 = _getClass1("NSObject"); - late final _sel_load1 = _registerName1("load"); - void _objc_msgSend_1( - ffi.Pointer obj, - ffi.Pointer sel, + objc.NSString NSStringFromClass( + objc.ObjCObjectBase aClass, ) { - return __objc_msgSend_1( - obj, - sel, - ); + return objc.NSString.castFromPointer( + _NSStringFromClass( + aClass.ref.pointer, + ), + retain: true, + release: true); } - late final __objc_msgSend_1Ptr = _lookup< + late final _NSStringFromClassPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_1 = __objc_msgSend_1Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSStringFromClass'); + late final _NSStringFromClass = _NSStringFromClassPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_initialize1 = _registerName1("initialize"); - late final _sel_init1 = _registerName1("init"); - instancetype _objc_msgSend_2( - ffi.Pointer obj, - ffi.Pointer sel, + objc.ObjCObjectBase? NSClassFromString( + objc.NSString aClassName, ) { - return __objc_msgSend_2( - obj, - sel, - ); + return _NSClassFromString( + aClassName.ref.pointer, + ).address == + 0 + ? null + : objc.ObjCObjectBase( + _NSClassFromString( + aClassName.ref.pointer, + ), + retain: true, + release: true); } - late final __objc_msgSend_2Ptr = _lookup< + late final _NSClassFromStringPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_2 = __objc_msgSend_2Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSClassFromString'); + late final _NSClassFromString = _NSClassFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_new1 = _registerName1("new"); - late final _sel_allocWithZone_1 = _registerName1("allocWithZone:"); - instancetype _objc_msgSend_3( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_NSZone> zone, + objc.NSString NSStringFromProtocol( + objc.Protocol proto, ) { - return __objc_msgSend_3( - obj, - sel, - zone, - ); + return objc.NSString.castFromPointer( + _NSStringFromProtocol( + proto.ref.pointer, + ), + retain: true, + release: true); } - late final __objc_msgSend_3Ptr = _lookup< + late final _NSStringFromProtocolPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>>('objc_msgSend'); - late final __objc_msgSend_3 = __objc_msgSend_3Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSZone>)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSStringFromProtocol'); + late final _NSStringFromProtocol = _NSStringFromProtocolPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_alloc1 = _registerName1("alloc"); - late final _sel_dealloc1 = _registerName1("dealloc"); - late final _sel_finalize1 = _registerName1("finalize"); - late final _sel_copy1 = _registerName1("copy"); - late final _sel_mutableCopy1 = _registerName1("mutableCopy"); - late final _sel_copyWithZone_1 = _registerName1("copyWithZone:"); - late final _sel_mutableCopyWithZone_1 = - _registerName1("mutableCopyWithZone:"); - late final _sel_instancesRespondToSelector_1 = - _registerName1("instancesRespondToSelector:"); - bool _objc_msgSend_4( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, + objc.Protocol? NSProtocolFromString( + objc.NSString namestr, ) { - return __objc_msgSend_4( - obj, - sel, - aSelector, - ); + return _NSProtocolFromString( + namestr.ref.pointer, + ).address == + 0 + ? null + : objc.Protocol.castFromPointer( + _NSProtocolFromString( + namestr.ref.pointer, + ), + retain: true, + release: true); } - late final __objc_msgSend_4Ptr = _lookup< + late final _NSProtocolFromStringPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_4 = __objc_msgSend_4Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSProtocolFromString'); + late final _NSProtocolFromString = _NSProtocolFromStringPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - bool _objc_msgSend_0( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer clazz, + ffi.Pointer NSGetSizeAndAlignment( + ffi.Pointer typePtr, + ffi.Pointer sizep, + ffi.Pointer alignp, ) { - return __objc_msgSend_0( - obj, - sel, - clazz, + return _NSGetSizeAndAlignment( + typePtr, + sizep, + alignp, ); } - late final __objc_msgSend_0Ptr = _lookup< + late final _NSGetSizeAndAlignmentPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_0 = __objc_msgSend_0Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('NSGetSizeAndAlignment'); + late final _NSGetSizeAndAlignment = _NSGetSizeAndAlignmentPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final _sel_isKindOfClass_1 = _registerName1("isKindOfClass:"); - late final _class_Protocol1 = _getClass1("Protocol"); - late final _sel_conformsToProtocol_1 = _registerName1("conformsToProtocol:"); - bool _objc_msgSend_5( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer protocol, + void NSLog( + objc.NSString format, ) { - return __objc_msgSend_5( - obj, - sel, - protocol, + return _NSLog( + format.ref.pointer, ); } - late final __objc_msgSend_5Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_5 = __objc_msgSend_5Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _NSLogPtr = _lookup< + ffi.NativeFunction)>>( + 'NSLog'); + late final _NSLog = + _NSLogPtr.asFunction)>(); - late final _sel_methodForSelector_1 = _registerName1("methodForSelector:"); - IMP _objc_msgSend_6( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, + void NSLogv( + objc.NSString format, + va_list args, ) { - return __objc_msgSend_6( - obj, - sel, - aSelector, + return _NSLogv( + format.ref.pointer, + args, ); } - late final __objc_msgSend_6Ptr = _lookup< + late final _NSLogvPtr = _lookup< ffi.NativeFunction< - IMP Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_6 = __objc_msgSend_6Ptr.asFunction< - IMP Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, va_list)>>('NSLogv'); + late final _NSLogv = _NSLogvPtr.asFunction< + void Function(ffi.Pointer, va_list)>(); - late final _sel_instanceMethodForSelector_1 = - _registerName1("instanceMethodForSelector:"); - late final _sel_doesNotRecognizeSelector_1 = - _registerName1("doesNotRecognizeSelector:"); - void _objc_msgSend_7( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ) { - return __objc_msgSend_7( - obj, - sel, - aSelector, - ); - } + late final ffi.Pointer _NSNotFound = + _lookup('NSNotFound'); - late final __objc_msgSend_7Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_7 = __objc_msgSend_7Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + DartNSInteger get NSNotFound => _NSNotFound.value; - late final _sel_forwardingTargetForSelector_1 = - _registerName1("forwardingTargetForSelector:"); - ffi.Pointer _objc_msgSend_8( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, + ffi.Pointer _Block_copy( + ffi.Pointer aBlock, ) { - return __objc_msgSend_8( - obj, - sel, - aSelector, + return __Block_copy( + aBlock, ); } - late final __objc_msgSend_8Ptr = _lookup< + late final __Block_copyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_8 = __objc_msgSend_8Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('_Block_copy'); + late final __Block_copy = __Block_copyPtr + .asFunction Function(ffi.Pointer)>(); - late final _class_NSInvocation1 = _getClass1("NSInvocation"); - late final _sel_forwardInvocation_1 = _registerName1("forwardInvocation:"); - void _objc_msgSend_9( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anInvocation, + void _Block_release( + ffi.Pointer aBlock, ) { - return __objc_msgSend_9( - obj, - sel, - anInvocation, + return __Block_release( + aBlock, ); } - late final __objc_msgSend_9Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_9 = __objc_msgSend_9Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final __Block_releasePtr = + _lookup)>>( + '_Block_release'); + late final __Block_release = + __Block_releasePtr.asFunction)>(); - late final _class_NSMethodSignature1 = _getClass1("NSMethodSignature"); - late final _sel_methodSignatureForSelector_1 = - _registerName1("methodSignatureForSelector:"); - ffi.Pointer _objc_msgSend_10( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, + void _Block_object_assign( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_10( - obj, - sel, - aSelector, + return __Block_object_assign( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_10Ptr = _lookup< + late final __Block_object_assignPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_10 = __objc_msgSend_10Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('_Block_object_assign'); + late final __Block_object_assign = __Block_object_assignPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_instanceMethodSignatureForSelector_1 = - _registerName1("instanceMethodSignatureForSelector:"); - late final _sel_allowsWeakReference1 = _registerName1("allowsWeakReference"); - bool _objc_msgSend_11( - ffi.Pointer obj, - ffi.Pointer sel, + void _Block_object_dispose( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_11( - obj, - sel, + return __Block_object_dispose( + arg0, + arg1, ); } - late final __objc_msgSend_11Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_11 = __objc_msgSend_11Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_retainWeakReference1 = _registerName1("retainWeakReference"); - late final _sel_isSubclassOfClass_1 = _registerName1("isSubclassOfClass:"); - late final _sel_resolveClassMethod_1 = _registerName1("resolveClassMethod:"); - late final _sel_resolveInstanceMethod_1 = - _registerName1("resolveInstanceMethod:"); - late final _sel_hash1 = _registerName1("hash"); - int _objc_msgSend_12( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_12( - obj, - sel, - ); - } + late final __Block_object_disposePtr = _lookup< + ffi + .NativeFunction, ffi.Int)>>( + '_Block_object_dispose'); + late final __Block_object_dispose = __Block_object_disposePtr + .asFunction, int)>(); - late final __objc_msgSend_12Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_12 = __objc_msgSend_12Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer>> + __NSConcreteGlobalBlock = + _lookup>>('_NSConcreteGlobalBlock'); - late final _sel_superclass1 = _registerName1("superclass"); - late final _sel_class1 = _registerName1("class"); - late final _class_NSString1 = _getClass1("NSString"); - late final _sel_length1 = _registerName1("length"); - late final _sel_characterAtIndex_1 = _registerName1("characterAtIndex:"); - int _objc_msgSend_13( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_13( - obj, - sel, - index, - ); - } + ffi.Pointer> get _NSConcreteGlobalBlock => + __NSConcreteGlobalBlock.value; - late final __objc_msgSend_13Ptr = _lookup< - ffi.NativeFunction< - unichar Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_13 = __objc_msgSend_13Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + set _NSConcreteGlobalBlock(ffi.Pointer> value) => + __NSConcreteGlobalBlock.value = value; - late final _class_NSCoder1 = _getClass1("NSCoder"); - late final _sel_initWithCoder_1 = _registerName1("initWithCoder:"); - instancetype _objc_msgSend_14( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer coder, - ) { - return __objc_msgSend_14( - obj, - sel, - coder, - ); - } + late final ffi.Pointer>> + __NSConcreteStackBlock = + _lookup>>('_NSConcreteStackBlock'); - late final __objc_msgSend_14Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_14 = __objc_msgSend_14Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer> get _NSConcreteStackBlock => + __NSConcreteStackBlock.value; - late final _sel_substringFromIndex_1 = _registerName1("substringFromIndex:"); - ffi.Pointer _objc_msgSend_15( - ffi.Pointer obj, - ffi.Pointer sel, - int from, - ) { - return __objc_msgSend_15( - obj, - sel, - from, - ); + set _NSConcreteStackBlock(ffi.Pointer> value) => + __NSConcreteStackBlock.value = value; + + void Debugger() { + return _Debugger(); } - late final __objc_msgSend_15Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_15 = __objc_msgSend_15Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _DebuggerPtr = + _lookup>('Debugger'); + late final _Debugger = _DebuggerPtr.asFunction(); - late final _sel_substringToIndex_1 = _registerName1("substringToIndex:"); - late final _sel_substringWithRange_1 = _registerName1("substringWithRange:"); - ffi.Pointer _objc_msgSend_16( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + void DebugStr( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_16( - obj, - sel, - range, + return _DebugStr( + debuggerMsg, ); } - late final __objc_msgSend_16Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_16 = __objc_msgSend_16Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + late final _DebugStrPtr = + _lookup>( + 'DebugStr'); + late final _DebugStr = + _DebugStrPtr.asFunction(); - late final _sel_getCharacters_range_1 = - _registerName1("getCharacters:range:"); - void _objc_msgSend_17( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - NSRange range, - ) { - return __objc_msgSend_17( - obj, - sel, - buffer, - range, - ); + void SysBreak() { + return _SysBreak(); } - late final __objc_msgSend_17Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_17 = __objc_msgSend_17Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + late final _SysBreakPtr = + _lookup>('SysBreak'); + late final _SysBreak = _SysBreakPtr.asFunction(); - late final _sel_compare_1 = _registerName1("compare:"); - int _objc_msgSend_18( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, + void SysBreakStr( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_18( - obj, - sel, - string, + return _SysBreakStr( + debuggerMsg, ); } - late final __objc_msgSend_18Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_18 = __objc_msgSend_18Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _SysBreakStrPtr = + _lookup>( + 'SysBreakStr'); + late final _SysBreakStr = + _SysBreakStrPtr.asFunction(); - late final _sel_compare_options_1 = _registerName1("compare:options:"); - int _objc_msgSend_19( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, + void SysBreakFunc( + ConstStr255Param debuggerMsg, ) { - return __objc_msgSend_19( - obj, - sel, - string, - mask, + return _SysBreakFunc( + debuggerMsg, ); } - late final __objc_msgSend_19Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_19 = __objc_msgSend_19Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _SysBreakFuncPtr = + _lookup>( + 'SysBreakFunc'); + late final _SysBreakFunc = + _SysBreakFuncPtr.asFunction(); - late final _sel_compare_options_range_1 = - _registerName1("compare:options:range:"); - int _objc_msgSend_20( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - NSRange rangeOfReceiverToCompare, - ) { - return __objc_msgSend_20( - obj, - sel, - string, - mask, - rangeOfReceiverToCompare, - ); - } + late final ffi.Pointer _kCFCoreFoundationVersionNumber = + _lookup('kCFCoreFoundationVersionNumber'); - late final __objc_msgSend_20Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_20 = __objc_msgSend_20Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + double get kCFCoreFoundationVersionNumber => + _kCFCoreFoundationVersionNumber.value; - late final _sel_compare_options_range_locale_1 = - _registerName1("compare:options:range:locale:"); - int _objc_msgSend_21( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer string, - int mask, - NSRange rangeOfReceiverToCompare, - ffi.Pointer locale, - ) { - return __objc_msgSend_21( - obj, - sel, - string, - mask, - rangeOfReceiverToCompare, - locale, - ); - } + set kCFCoreFoundationVersionNumber(double value) => + _kCFCoreFoundationVersionNumber.value = value; - late final __objc_msgSend_21Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_21 = __objc_msgSend_21Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange, ffi.Pointer)>(); - - late final _sel_caseInsensitiveCompare_1 = - _registerName1("caseInsensitiveCompare:"); - late final _sel_localizedCompare_1 = _registerName1("localizedCompare:"); - late final _sel_localizedCaseInsensitiveCompare_1 = - _registerName1("localizedCaseInsensitiveCompare:"); - late final _sel_localizedStandardCompare_1 = - _registerName1("localizedStandardCompare:"); - late final _sel_isEqualToString_1 = _registerName1("isEqualToString:"); - bool _objc_msgSend_22( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, - ) { - return __objc_msgSend_22( - obj, - sel, - aString, - ); - } + late final ffi.Pointer _kCFNotFound = + _lookup('kCFNotFound'); - late final __objc_msgSend_22Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_22 = __objc_msgSend_22Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + DartCFIndex get kCFNotFound => _kCFNotFound.value; - late final _sel_hasPrefix_1 = _registerName1("hasPrefix:"); - late final _sel_hasSuffix_1 = _registerName1("hasSuffix:"); - late final _sel_commonPrefixWithString_options_1 = - _registerName1("commonPrefixWithString:options:"); - ffi.Pointer _objc_msgSend_23( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - int mask, + CFRange __CFRangeMake( + int loc, + int len, ) { - return __objc_msgSend_23( - obj, - sel, - str, - mask, + return ___CFRangeMake( + loc, + len, ); } - late final __objc_msgSend_23Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_23 = __objc_msgSend_23Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + late final ___CFRangeMakePtr = + _lookup>( + '__CFRangeMake'); + late final ___CFRangeMake = + ___CFRangeMakePtr.asFunction(); - late final _sel_containsString_1 = _registerName1("containsString:"); - late final _sel_localizedCaseInsensitiveContainsString_1 = - _registerName1("localizedCaseInsensitiveContainsString:"); - late final _sel_localizedStandardContainsString_1 = - _registerName1("localizedStandardContainsString:"); - late final _sel_localizedStandardRangeOfString_1 = - _registerName1("localizedStandardRangeOfString:"); - NSRange _objc_msgSend_24( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer str, - ) { - return __objc_msgSend_24( - obj, - sel, - str, - ); + int CFNullGetTypeID() { + return _CFNullGetTypeID(); } - late final __objc_msgSend_24Ptr = _lookup< - ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_24 = __objc_msgSend_24Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _CFNullGetTypeIDPtr = + _lookup>('CFNullGetTypeID'); + late final _CFNullGetTypeID = + _CFNullGetTypeIDPtr.asFunction(); - late final _sel_rangeOfString_1 = _registerName1("rangeOfString:"); - late final _sel_rangeOfString_options_1 = - _registerName1("rangeOfString:options:"); - NSRange _objc_msgSend_25( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - ) { - return __objc_msgSend_25( - obj, - sel, - searchString, - mask, - ); - } + late final ffi.Pointer _kCFNull = _lookup('kCFNull'); - late final __objc_msgSend_25Ptr = _lookup< - ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_25 = __objc_msgSend_25Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + CFNullRef get kCFNull => _kCFNull.value; - late final _sel_rangeOfString_options_range_1 = - _registerName1("rangeOfString:options:range:"); - NSRange _objc_msgSend_26( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - NSRange rangeOfReceiverToSearch, - ) { - return __objc_msgSend_26( - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - ); - } + late final ffi.Pointer _kCFAllocatorDefault = + _lookup('kCFAllocatorDefault'); - late final __objc_msgSend_26Ptr = _lookup< - ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_26 = __objc_msgSend_26Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + CFAllocatorRef get kCFAllocatorDefault => _kCFAllocatorDefault.value; - late final _class_NSLocale1 = _getClass1("NSLocale"); - late final _sel_rangeOfString_options_range_locale_1 = - _registerName1("rangeOfString:options:range:locale:"); - NSRange _objc_msgSend_27( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchString, - int mask, - NSRange rangeOfReceiverToSearch, - ffi.Pointer locale, - ) { - return __objc_msgSend_27( - obj, - sel, - searchString, - mask, - rangeOfReceiverToSearch, - locale, - ); - } + late final ffi.Pointer _kCFAllocatorSystemDefault = + _lookup('kCFAllocatorSystemDefault'); - late final __objc_msgSend_27Ptr = _lookup< - ffi.NativeFunction< - NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_27 = __objc_msgSend_27Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange, ffi.Pointer)>(); + CFAllocatorRef get kCFAllocatorSystemDefault => + _kCFAllocatorSystemDefault.value; - late final _class_NSCharacterSet1 = _getClass1("NSCharacterSet"); - late final _sel_controlCharacterSet1 = _registerName1("controlCharacterSet"); - ffi.Pointer _objc_msgSend_28( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_28( - obj, - sel, - ); - } + late final ffi.Pointer _kCFAllocatorMalloc = + _lookup('kCFAllocatorMalloc'); - late final __objc_msgSend_28Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_28 = __objc_msgSend_28Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_whitespaceCharacterSet1 = - _registerName1("whitespaceCharacterSet"); - late final _sel_whitespaceAndNewlineCharacterSet1 = - _registerName1("whitespaceAndNewlineCharacterSet"); - late final _sel_decimalDigitCharacterSet1 = - _registerName1("decimalDigitCharacterSet"); - late final _sel_letterCharacterSet1 = _registerName1("letterCharacterSet"); - late final _sel_lowercaseLetterCharacterSet1 = - _registerName1("lowercaseLetterCharacterSet"); - late final _sel_uppercaseLetterCharacterSet1 = - _registerName1("uppercaseLetterCharacterSet"); - late final _sel_nonBaseCharacterSet1 = _registerName1("nonBaseCharacterSet"); - late final _sel_alphanumericCharacterSet1 = - _registerName1("alphanumericCharacterSet"); - late final _sel_decomposableCharacterSet1 = - _registerName1("decomposableCharacterSet"); - late final _sel_illegalCharacterSet1 = _registerName1("illegalCharacterSet"); - late final _sel_punctuationCharacterSet1 = - _registerName1("punctuationCharacterSet"); - late final _sel_capitalizedLetterCharacterSet1 = - _registerName1("capitalizedLetterCharacterSet"); - late final _sel_symbolCharacterSet1 = _registerName1("symbolCharacterSet"); - late final _sel_newlineCharacterSet1 = _registerName1("newlineCharacterSet"); - late final _sel_characterSetWithRange_1 = - _registerName1("characterSetWithRange:"); - ffi.Pointer _objc_msgSend_29( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange aRange, - ) { - return __objc_msgSend_29( - obj, - sel, - aRange, - ); - } + CFAllocatorRef get kCFAllocatorMalloc => _kCFAllocatorMalloc.value; - late final __objc_msgSend_29Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_29 = __objc_msgSend_29Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + late final ffi.Pointer _kCFAllocatorMallocZone = + _lookup('kCFAllocatorMallocZone'); - late final _sel_characterSetWithCharactersInString_1 = - _registerName1("characterSetWithCharactersInString:"); - ffi.Pointer _objc_msgSend_30( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, - ) { - return __objc_msgSend_30( - obj, - sel, - aString, - ); - } + CFAllocatorRef get kCFAllocatorMallocZone => _kCFAllocatorMallocZone.value; - late final __objc_msgSend_30Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_30 = __objc_msgSend_30Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer _kCFAllocatorNull = + _lookup('kCFAllocatorNull'); - late final _class_NSData1 = _getClass1("NSData"); - late final _sel_bytes1 = _registerName1("bytes"); - ffi.Pointer _objc_msgSend_31( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_31( - obj, - sel, - ); - } + CFAllocatorRef get kCFAllocatorNull => _kCFAllocatorNull.value; - late final __objc_msgSend_31Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_31 = __objc_msgSend_31Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer _kCFAllocatorUseContext = + _lookup('kCFAllocatorUseContext'); - late final _sel_description1 = _registerName1("description"); - ffi.Pointer _objc_msgSend_32( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_32( - obj, - sel, - ); + CFAllocatorRef get kCFAllocatorUseContext => _kCFAllocatorUseContext.value; + + int CFAllocatorGetTypeID() { + return _CFAllocatorGetTypeID(); } - late final __objc_msgSend_32Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_32 = __objc_msgSend_32Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _CFAllocatorGetTypeIDPtr = + _lookup>('CFAllocatorGetTypeID'); + late final _CFAllocatorGetTypeID = + _CFAllocatorGetTypeIDPtr.asFunction(); - late final _sel_getBytes_length_1 = _registerName1("getBytes:length:"); - void _objc_msgSend_33( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int length, + void CFAllocatorSetDefault( + CFAllocatorRef allocator, ) { - return __objc_msgSend_33( - obj, - sel, - buffer, - length, + return _CFAllocatorSetDefault( + allocator, ); } - late final __objc_msgSend_33Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_33 = __objc_msgSend_33Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_getBytes_range_1 = _registerName1("getBytes:range:"); - void _objc_msgSend_34( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - NSRange range, - ) { - return __objc_msgSend_34( - obj, - sel, - buffer, - range, - ); + late final _CFAllocatorSetDefaultPtr = + _lookup>( + 'CFAllocatorSetDefault'); + late final _CFAllocatorSetDefault = + _CFAllocatorSetDefaultPtr.asFunction(); + + CFAllocatorRef CFAllocatorGetDefault() { + return _CFAllocatorGetDefault(); } - late final __objc_msgSend_34Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_34 = __objc_msgSend_34Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + late final _CFAllocatorGetDefaultPtr = + _lookup>( + 'CFAllocatorGetDefault'); + late final _CFAllocatorGetDefault = + _CFAllocatorGetDefaultPtr.asFunction(); - late final _sel_isEqualToData_1 = _registerName1("isEqualToData:"); - bool _objc_msgSend_35( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, + CFAllocatorRef CFAllocatorCreate( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return __objc_msgSend_35( - obj, - sel, - other, + return _CFAllocatorCreate( + allocator, + context, ); } - late final __objc_msgSend_35Ptr = _lookup< + late final _CFAllocatorCreatePtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_35 = __objc_msgSend_35Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + CFAllocatorRef Function(CFAllocatorRef, + ffi.Pointer)>>('CFAllocatorCreate'); + late final _CFAllocatorCreate = _CFAllocatorCreatePtr.asFunction< + CFAllocatorRef Function( + CFAllocatorRef, ffi.Pointer)>(); - late final _sel_subdataWithRange_1 = _registerName1("subdataWithRange:"); - ffi.Pointer _objc_msgSend_36( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + ffi.Pointer CFAllocatorAllocate( + CFAllocatorRef allocator, + int size, + int hint, ) { - return __objc_msgSend_36( - obj, - sel, - range, + return _CFAllocatorAllocate( + allocator, + size, + hint, ); } - late final __objc_msgSend_36Ptr = _lookup< + late final _CFAllocatorAllocatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_36 = __objc_msgSend_36Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Pointer Function( + CFAllocatorRef, CFIndex, CFOptionFlags)>>('CFAllocatorAllocate'); + late final _CFAllocatorAllocate = _CFAllocatorAllocatePtr.asFunction< + ffi.Pointer Function(CFAllocatorRef, int, int)>(); - late final _sel_writeToFile_atomically_1 = - _registerName1("writeToFile:atomically:"); - bool _objc_msgSend_37( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool useAuxiliaryFile, + ffi.Pointer CFAllocatorReallocate( + CFAllocatorRef allocator, + ffi.Pointer ptr, + int newsize, + int hint, ) { - return __objc_msgSend_37( - obj, - sel, - path, - useAuxiliaryFile, + return _CFAllocatorReallocate( + allocator, + ptr, + newsize, + hint, ); } - late final __objc_msgSend_37Ptr = _lookup< + late final _CFAllocatorReallocatePtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_37 = __objc_msgSend_37Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Pointer Function(CFAllocatorRef, ffi.Pointer, + CFIndex, CFOptionFlags)>>('CFAllocatorReallocate'); + late final _CFAllocatorReallocate = _CFAllocatorReallocatePtr.asFunction< + ffi.Pointer Function( + CFAllocatorRef, ffi.Pointer, int, int)>(); - late final _class_NSURL1 = _getClass1("NSURL"); - late final _sel_initWithScheme_host_path_1 = - _registerName1("initWithScheme:host:path:"); - instancetype _objc_msgSend_38( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer scheme, - ffi.Pointer host, - ffi.Pointer path, + void CFAllocatorDeallocate( + CFAllocatorRef allocator, + ffi.Pointer ptr, ) { - return __objc_msgSend_38( - obj, - sel, - scheme, - host, - path, - ); - } - - late final __objc_msgSend_38Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_38 = __objc_msgSend_38Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initFileURLWithPath_isDirectory_relativeToURL_1 = - _registerName1("initFileURLWithPath:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_39( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_39( - obj, - sel, - path, - isDir, - baseURL, + return _CFAllocatorDeallocate( + allocator, + ptr, ); } - late final __objc_msgSend_39Ptr = _lookup< + late final _CFAllocatorDeallocatePtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_39 = __objc_msgSend_39Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, ffi.Pointer)>(); + ffi.Void Function( + CFAllocatorRef, ffi.Pointer)>>('CFAllocatorDeallocate'); + late final _CFAllocatorDeallocate = _CFAllocatorDeallocatePtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer)>(); - late final _sel_initFileURLWithPath_relativeToURL_1 = - _registerName1("initFileURLWithPath:relativeToURL:"); - instancetype _objc_msgSend_40( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer baseURL, + int CFAllocatorGetPreferredSizeForSize( + CFAllocatorRef allocator, + int size, + int hint, ) { - return __objc_msgSend_40( - obj, - sel, - path, - baseURL, + return _CFAllocatorGetPreferredSizeForSize( + allocator, + size, + hint, ); } - late final __objc_msgSend_40Ptr = _lookup< + late final _CFAllocatorGetPreferredSizeForSizePtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_40 = __objc_msgSend_40Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CFIndex Function(CFAllocatorRef, CFIndex, + CFOptionFlags)>>('CFAllocatorGetPreferredSizeForSize'); + late final _CFAllocatorGetPreferredSizeForSize = + _CFAllocatorGetPreferredSizeForSizePtr.asFunction< + int Function(CFAllocatorRef, int, int)>(); - late final _sel_initFileURLWithPath_isDirectory_1 = - _registerName1("initFileURLWithPath:isDirectory:"); - instancetype _objc_msgSend_41( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, + void CFAllocatorGetContext( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return __objc_msgSend_41( - obj, - sel, - path, - isDir, + return _CFAllocatorGetContext( + allocator, + context, ); } - late final __objc_msgSend_41Ptr = _lookup< + late final _CFAllocatorGetContextPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_41 = __objc_msgSend_41Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Void Function(CFAllocatorRef, + ffi.Pointer)>>('CFAllocatorGetContext'); + late final _CFAllocatorGetContext = _CFAllocatorGetContextPtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer)>(); - late final _sel_initFileURLWithPath_1 = - _registerName1("initFileURLWithPath:"); - instancetype _objc_msgSend_42( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + int CFGetTypeID( + CFTypeRef cf, ) { - return __objc_msgSend_42( - obj, - sel, - path, + return _CFGetTypeID( + cf, ); } - late final __objc_msgSend_42Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_42 = __objc_msgSend_42Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _CFGetTypeIDPtr = + _lookup>('CFGetTypeID'); + late final _CFGetTypeID = + _CFGetTypeIDPtr.asFunction(); - late final _sel_fileURLWithPath_isDirectory_relativeToURL_1 = - _registerName1("fileURLWithPath:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_43( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, + CFStringRef CFCopyTypeIDDescription( + int type_id, ) { - return __objc_msgSend_43( - obj, - sel, - path, - isDir, - baseURL, + return _CFCopyTypeIDDescription( + type_id, ); } - late final __objc_msgSend_43Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_43 = __objc_msgSend_43Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); - - late final _sel_fileURLWithPath_relativeToURL_1 = - _registerName1("fileURLWithPath:relativeToURL:"); - ffi.Pointer _objc_msgSend_44( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_44( - obj, - sel, - path, - baseURL, + late final _CFCopyTypeIDDescriptionPtr = + _lookup>( + 'CFCopyTypeIDDescription'); + late final _CFCopyTypeIDDescription = + _CFCopyTypeIDDescriptionPtr.asFunction(); + + CFTypeRef CFRetain( + CFTypeRef cf, + ) { + return _CFRetain( + cf, ); } - late final __objc_msgSend_44Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_44 = __objc_msgSend_44Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _CFRetainPtr = + _lookup>('CFRetain'); + late final _CFRetain = + _CFRetainPtr.asFunction(); - late final _sel_fileURLWithPath_isDirectory_1 = - _registerName1("fileURLWithPath:isDirectory:"); - ffi.Pointer _objc_msgSend_45( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, + void CFRelease( + CFTypeRef cf, ) { - return __objc_msgSend_45( - obj, - sel, - path, - isDir, + return _CFRelease( + cf, ); } - late final __objc_msgSend_45Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_45 = __objc_msgSend_45Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); + late final _CFReleasePtr = + _lookup>('CFRelease'); + late final _CFRelease = _CFReleasePtr.asFunction(); - late final _sel_fileURLWithPath_1 = _registerName1("fileURLWithPath:"); - ffi.Pointer _objc_msgSend_46( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + CFTypeRef CFAutorelease( + CFTypeRef arg, ) { - return __objc_msgSend_46( - obj, - sel, - path, + return _CFAutorelease( + arg, ); } - late final __objc_msgSend_46Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_46 = __objc_msgSend_46Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFAutoreleasePtr = + _lookup>( + 'CFAutorelease'); + late final _CFAutorelease = + _CFAutoreleasePtr.asFunction(); - late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = - _registerName1( - "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - instancetype _objc_msgSend_47( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, + int CFGetRetainCount( + CFTypeRef cf, ) { - return __objc_msgSend_47( - obj, - sel, - path, - isDir, - baseURL, + return _CFGetRetainCount( + cf, ); } - late final __objc_msgSend_47Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_47 = __objc_msgSend_47Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool, ffi.Pointer)>(); - - late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1 = - _registerName1( - "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); - ffi.Pointer _objc_msgSend_48( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool isDir, - ffi.Pointer baseURL, + late final _CFGetRetainCountPtr = + _lookup>( + 'CFGetRetainCount'); + late final _CFGetRetainCount = + _CFGetRetainCountPtr.asFunction(); + + int CFEqual( + CFTypeRef cf1, + CFTypeRef cf2, ) { - return __objc_msgSend_48( - obj, - sel, - path, - isDir, - baseURL, + return _CFEqual( + cf1, + cf2, ); } - late final __objc_msgSend_48Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_48 = __objc_msgSend_48Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); + late final _CFEqualPtr = + _lookup>( + 'CFEqual'); + late final _CFEqual = + _CFEqualPtr.asFunction(); - late final _sel_initWithString_1 = _registerName1("initWithString:"); - instancetype _objc_msgSend_49( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URLString, + int CFHash( + CFTypeRef cf, ) { - return __objc_msgSend_49( - obj, - sel, - URLString, + return _CFHash( + cf, ); } - late final __objc_msgSend_49Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_49 = __objc_msgSend_49Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _CFHashPtr = + _lookup>('CFHash'); + late final _CFHash = _CFHashPtr.asFunction(); - late final _sel_initWithString_relativeToURL_1 = - _registerName1("initWithString:relativeToURL:"); - instancetype _objc_msgSend_50( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URLString, - ffi.Pointer baseURL, + CFStringRef CFCopyDescription( + CFTypeRef cf, ) { - return __objc_msgSend_50( - obj, - sel, - URLString, - baseURL, + return _CFCopyDescription( + cf, ); } - late final __objc_msgSend_50Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_50 = __objc_msgSend_50Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFCopyDescriptionPtr = + _lookup>( + 'CFCopyDescription'); + late final _CFCopyDescription = + _CFCopyDescriptionPtr.asFunction(); - late final _sel_URLWithString_1 = _registerName1("URLWithString:"); - late final _sel_URLWithString_relativeToURL_1 = - _registerName1("URLWithString:relativeToURL:"); - late final _sel_initWithString_encodingInvalidCharacters_1 = - _registerName1("initWithString:encodingInvalidCharacters:"); - instancetype _objc_msgSend_51( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URLString, - bool encodingInvalidCharacters, + CFAllocatorRef CFGetAllocator( + CFTypeRef cf, ) { - return __objc_msgSend_51( - obj, - sel, - URLString, - encodingInvalidCharacters, + return _CFGetAllocator( + cf, ); } - late final __objc_msgSend_51Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_51 = __objc_msgSend_51Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + late final _CFGetAllocatorPtr = + _lookup>( + 'CFGetAllocator'); + late final _CFGetAllocator = + _CFGetAllocatorPtr.asFunction(); - late final _sel_URLWithString_encodingInvalidCharacters_1 = - _registerName1("URLWithString:encodingInvalidCharacters:"); - late final _sel_initWithDataRepresentation_relativeToURL_1 = - _registerName1("initWithDataRepresentation:relativeToURL:"); - instancetype _objc_msgSend_52( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer baseURL, + CFTypeRef CFMakeCollectable( + CFTypeRef cf, ) { - return __objc_msgSend_52( - obj, - sel, - data, - baseURL, + return _CFMakeCollectable( + cf, ); } - late final __objc_msgSend_52Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_52 = __objc_msgSend_52Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFMakeCollectablePtr = + _lookup>( + 'CFMakeCollectable'); + late final _CFMakeCollectable = + _CFMakeCollectablePtr.asFunction(); - late final _sel_URLWithDataRepresentation_relativeToURL_1 = - _registerName1("URLWithDataRepresentation:relativeToURL:"); - ffi.Pointer _objc_msgSend_53( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_53( - obj, - sel, - data, - baseURL, - ); + ffi.Pointer NSDefaultMallocZone() { + return _NSDefaultMallocZone(); } - late final __objc_msgSend_53Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_53 = __objc_msgSend_53Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _NSDefaultMallocZonePtr = + _lookup Function()>>( + 'NSDefaultMallocZone'); + late final _NSDefaultMallocZone = + _NSDefaultMallocZonePtr.asFunction Function()>(); - late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1 = - _registerName1("initAbsoluteURLWithDataRepresentation:relativeToURL:"); - late final _sel_absoluteURLWithDataRepresentation_relativeToURL_1 = - _registerName1("absoluteURLWithDataRepresentation:relativeToURL:"); - late final _sel_dataRepresentation1 = _registerName1("dataRepresentation"); - ffi.Pointer _objc_msgSend_54( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSCreateZone( + int startSize, + int granularity, + bool canFree, ) { - return __objc_msgSend_54( - obj, - sel, + return _NSCreateZone( + startSize, + granularity, + canFree, ); } - late final __objc_msgSend_54Ptr = _lookup< + late final _NSCreateZonePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_54 = __objc_msgSend_54Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + NSUInteger, NSUInteger, ffi.Bool)>>('NSCreateZone'); + late final _NSCreateZone = _NSCreateZonePtr.asFunction< + ffi.Pointer Function(int, int, bool)>(); - late final _sel_absoluteString1 = _registerName1("absoluteString"); - ffi.Pointer _objc_msgSend_55( - ffi.Pointer obj, - ffi.Pointer sel, + void NSRecycleZone( + ffi.Pointer zone, ) { - return __objc_msgSend_55( - obj, - sel, + return _NSRecycleZone( + zone, ); } - late final __objc_msgSend_55Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_55 = __objc_msgSend_55Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _NSRecycleZonePtr = + _lookup)>>( + 'NSRecycleZone'); + late final _NSRecycleZone = + _NSRecycleZonePtr.asFunction)>(); - late final _sel_relativeString1 = _registerName1("relativeString"); - late final _sel_baseURL1 = _registerName1("baseURL"); - ffi.Pointer _objc_msgSend_56( - ffi.Pointer obj, - ffi.Pointer sel, + void NSSetZoneName( + ffi.Pointer zone, + objc.NSString name, ) { - return __objc_msgSend_56( - obj, - sel, + return _NSSetZoneName( + zone, + name.ref.pointer, ); } - late final __objc_msgSend_56Ptr = _lookup< + late final _NSSetZoneNamePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_56 = __objc_msgSend_56Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>>('NSSetZoneName'); + late final _NSSetZoneName = _NSSetZoneNamePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_absoluteURL1 = _registerName1("absoluteURL"); - late final _sel_scheme1 = _registerName1("scheme"); - late final _sel_resourceSpecifier1 = _registerName1("resourceSpecifier"); - late final _sel_host1 = _registerName1("host"); - late final _class_NSNumber1 = _getClass1("NSNumber"); - late final _class_NSValue1 = _getClass1("NSValue"); - late final _sel_getValue_size_1 = _registerName1("getValue:size:"); - late final _sel_objCType1 = _registerName1("objCType"); - ffi.Pointer _objc_msgSend_57( - ffi.Pointer obj, - ffi.Pointer sel, + objc.NSString NSZoneName( + ffi.Pointer zone, ) { - return __objc_msgSend_57( - obj, - sel, - ); + return objc.NSString.castFromPointer( + _NSZoneName( + zone, + ), + retain: true, + release: true); } - late final __objc_msgSend_57Ptr = _lookup< + late final _NSZoneNamePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_57 = __objc_msgSend_57Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer)>>('NSZoneName'); + late final _NSZoneName = _NSZoneNamePtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_initWithBytes_objCType_1 = - _registerName1("initWithBytes:objCType:"); - instancetype _objc_msgSend_58( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer type, + ffi.Pointer NSZoneFromPointer( + ffi.Pointer ptr, ) { - return __objc_msgSend_58( - obj, - sel, - value, - type, + return _NSZoneFromPointer( + ptr, ); } - late final __objc_msgSend_58Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_58 = __objc_msgSend_58Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _NSZoneFromPointerPtr = _lookup< + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'NSZoneFromPointer'); + late final _NSZoneFromPointer = _NSZoneFromPointerPtr.asFunction< + ffi.Pointer Function(ffi.Pointer)>(); - late final _sel_valueWithBytes_objCType_1 = - _registerName1("valueWithBytes:objCType:"); - ffi.Pointer _objc_msgSend_59( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer type, + ffi.Pointer NSZoneMalloc( + ffi.Pointer zone, + int size, ) { - return __objc_msgSend_59( - obj, - sel, - value, - type, + return _NSZoneMalloc( + zone, + size, ); } - late final __objc_msgSend_59Ptr = _lookup< + late final _NSZoneMallocPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_59 = __objc_msgSend_59Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, NSUInteger)>>('NSZoneMalloc'); + late final _NSZoneMalloc = _NSZoneMallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int)>(); - late final _sel_value_withObjCType_1 = _registerName1("value:withObjCType:"); - late final _sel_valueWithNonretainedObject_1 = - _registerName1("valueWithNonretainedObject:"); - ffi.Pointer _objc_msgSend_60( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, + ffi.Pointer NSZoneCalloc( + ffi.Pointer zone, + int numElems, + int byteSize, ) { - return __objc_msgSend_60( - obj, - sel, - anObject, + return _NSZoneCalloc( + zone, + numElems, + byteSize, ); } - late final __objc_msgSend_60Ptr = _lookup< + late final _NSZoneCallocPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_60 = __objc_msgSend_60Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, NSUInteger, NSUInteger)>>('NSZoneCalloc'); + late final _NSZoneCalloc = _NSZoneCallocPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - late final _sel_nonretainedObjectValue1 = - _registerName1("nonretainedObjectValue"); - ffi.Pointer _objc_msgSend_61( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer NSZoneRealloc( + ffi.Pointer zone, + ffi.Pointer ptr, + int size, ) { - return __objc_msgSend_61( - obj, - sel, + return _NSZoneRealloc( + zone, + ptr, + size, ); } - late final __objc_msgSend_61Ptr = _lookup< + late final _NSZoneReallocPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_61 = __objc_msgSend_61Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>('NSZoneRealloc'); + late final _NSZoneRealloc = _NSZoneReallocPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_valueWithPointer_1 = _registerName1("valueWithPointer:"); - ffi.Pointer _objc_msgSend_62( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pointer, + void NSZoneFree( + ffi.Pointer zone, + ffi.Pointer ptr, ) { - return __objc_msgSend_62( - obj, - sel, - pointer, + return _NSZoneFree( + zone, + ptr, ); } - late final __objc_msgSend_62Ptr = _lookup< + late final _NSZoneFreePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_62 = __objc_msgSend_62Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('NSZoneFree'); + late final _NSZoneFree = _NSZoneFreePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_pointerValue1 = _registerName1("pointerValue"); - late final _sel_isEqualToValue_1 = _registerName1("isEqualToValue:"); - bool _objc_msgSend_63( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer NSAllocateCollectable( + int size, + int options, ) { - return __objc_msgSend_63( - obj, - sel, - value, + return _NSAllocateCollectable( + size, + options, ); } - late final __objc_msgSend_63Ptr = _lookup< + late final _NSAllocateCollectablePtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_63 = __objc_msgSend_63Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + NSUInteger, NSUInteger)>>('NSAllocateCollectable'); + late final _NSAllocateCollectable = _NSAllocateCollectablePtr.asFunction< + ffi.Pointer Function(int, int)>(); - late final _sel_getValue_1 = _registerName1("getValue:"); - void _objc_msgSend_64( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer NSReallocateCollectable( + ffi.Pointer ptr, + int size, + int options, ) { - return __objc_msgSend_64( - obj, - sel, - value, + return _NSReallocateCollectable( + ptr, + size, + options, ); } - late final __objc_msgSend_64Ptr = _lookup< + late final _NSReallocateCollectablePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_64 = __objc_msgSend_64Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, NSUInteger, + NSUInteger)>>('NSReallocateCollectable'); + late final _NSReallocateCollectable = _NSReallocateCollectablePtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - late final _sel_valueWithRange_1 = _registerName1("valueWithRange:"); - ffi.Pointer _objc_msgSend_65( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - ) { - return __objc_msgSend_65( - obj, - sel, - range, - ); + int NSPageSize() { + return _NSPageSize(); } - late final __objc_msgSend_65Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_65 = __objc_msgSend_65Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + late final _NSPageSizePtr = + _lookup>('NSPageSize'); + late final _NSPageSize = _NSPageSizePtr.asFunction(); - late final _sel_rangeValue1 = _registerName1("rangeValue"); - NSRange _objc_msgSend_66( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_66( - obj, - sel, - ); + int NSLogPageSize() { + return _NSLogPageSize(); } - late final __objc_msgSend_66Ptr = _lookup< - ffi.NativeFunction< - NSRange Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_66 = __objc_msgSend_66Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer)>(); + late final _NSLogPageSizePtr = + _lookup>('NSLogPageSize'); + late final _NSLogPageSize = _NSLogPageSizePtr.asFunction(); - late final _sel_initWithChar_1 = _registerName1("initWithChar:"); - ffi.Pointer _objc_msgSend_67( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int NSRoundUpToMultipleOfPageSize( + int bytes, ) { - return __objc_msgSend_67( - obj, - sel, - value, + return _NSRoundUpToMultipleOfPageSize( + bytes, ); } - late final __objc_msgSend_67Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Char)>>('objc_msgSend'); - late final __objc_msgSend_67 = __objc_msgSend_67Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _NSRoundUpToMultipleOfPageSizePtr = + _lookup>( + 'NSRoundUpToMultipleOfPageSize'); + late final _NSRoundUpToMultipleOfPageSize = + _NSRoundUpToMultipleOfPageSizePtr.asFunction(); - late final _sel_initWithUnsignedChar_1 = - _registerName1("initWithUnsignedChar:"); - ffi.Pointer _objc_msgSend_68( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int NSRoundDownToMultipleOfPageSize( + int bytes, ) { - return __objc_msgSend_68( - obj, - sel, - value, + return _NSRoundDownToMultipleOfPageSize( + bytes, ); } - late final __objc_msgSend_68Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedChar)>>('objc_msgSend'); - late final __objc_msgSend_68 = __objc_msgSend_68Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _NSRoundDownToMultipleOfPageSizePtr = + _lookup>( + 'NSRoundDownToMultipleOfPageSize'); + late final _NSRoundDownToMultipleOfPageSize = + _NSRoundDownToMultipleOfPageSizePtr.asFunction(); - late final _sel_initWithShort_1 = _registerName1("initWithShort:"); - ffi.Pointer _objc_msgSend_69( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + ffi.Pointer NSAllocateMemoryPages( + int bytes, ) { - return __objc_msgSend_69( - obj, - sel, - value, + return _NSAllocateMemoryPages( + bytes, ); } - late final __objc_msgSend_69Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Short)>>('objc_msgSend'); - late final __objc_msgSend_69 = __objc_msgSend_69Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_initWithUnsignedShort_1 = - _registerName1("initWithUnsignedShort:"); - ffi.Pointer _objc_msgSend_70( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_70( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_70Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedShort)>>('objc_msgSend'); - late final __objc_msgSend_70 = __objc_msgSend_70Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _NSAllocateMemoryPagesPtr = + _lookup Function(NSUInteger)>>( + 'NSAllocateMemoryPages'); + late final _NSAllocateMemoryPages = _NSAllocateMemoryPagesPtr.asFunction< + ffi.Pointer Function(int)>(); - late final _sel_initWithInt_1 = _registerName1("initWithInt:"); - ffi.Pointer _objc_msgSend_71( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void NSDeallocateMemoryPages( + ffi.Pointer ptr, + int bytes, ) { - return __objc_msgSend_71( - obj, - sel, - value, + return _NSDeallocateMemoryPages( + ptr, + bytes, ); } - late final __objc_msgSend_71Ptr = _lookup< + late final _NSDeallocateMemoryPagesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>('objc_msgSend'); - late final __objc_msgSend_71 = __objc_msgSend_71Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function( + ffi.Pointer, NSUInteger)>>('NSDeallocateMemoryPages'); + late final _NSDeallocateMemoryPages = _NSDeallocateMemoryPagesPtr.asFunction< + void Function(ffi.Pointer, int)>(); - late final _sel_initWithUnsignedInt_1 = - _registerName1("initWithUnsignedInt:"); - ffi.Pointer _objc_msgSend_72( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void NSCopyMemoryPages( + ffi.Pointer source, + ffi.Pointer dest, + int bytes, ) { - return __objc_msgSend_72( - obj, - sel, - value, + return _NSCopyMemoryPages( + source, + dest, + bytes, ); } - late final __objc_msgSend_72Ptr = _lookup< + late final _NSCopyMemoryPagesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>('objc_msgSend'); - late final __objc_msgSend_72 = __objc_msgSend_72Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + NSUInteger)>>('NSCopyMemoryPages'); + late final _NSCopyMemoryPages = _NSCopyMemoryPagesPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_initWithLong_1 = _registerName1("initWithLong:"); - ffi.Pointer _objc_msgSend_73( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_73( - obj, - sel, - value, - ); + int NSRealMemoryAvailable() { + return _NSRealMemoryAvailable(); } - late final __objc_msgSend_73Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Long)>>('objc_msgSend'); - late final __objc_msgSend_73 = __objc_msgSend_73Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _NSRealMemoryAvailablePtr = + _lookup>( + 'NSRealMemoryAvailable'); + late final _NSRealMemoryAvailable = + _NSRealMemoryAvailablePtr.asFunction(); - late final _sel_initWithUnsignedLong_1 = - _registerName1("initWithUnsignedLong:"); - ffi.Pointer _objc_msgSend_74( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + objc.ObjCObjectBase NSAllocateObject( + objc.ObjCObjectBase aClass, + DartNSUInteger extraBytes, + ffi.Pointer zone, ) { - return __objc_msgSend_74( - obj, - sel, - value, - ); + return objc.ObjCObjectBase( + _NSAllocateObject( + aClass.ref.pointer, + extraBytes, + zone, + ), + retain: true, + release: true); } - late final __objc_msgSend_74Ptr = _lookup< + late final _NSAllocateObjectPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>('objc_msgSend'); - late final __objc_msgSend_74 = __objc_msgSend_74Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + NSUInteger, ffi.Pointer)>>('NSAllocateObject'); + late final _NSAllocateObject = _NSAllocateObjectPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - late final _sel_initWithLongLong_1 = _registerName1("initWithLongLong:"); - ffi.Pointer _objc_msgSend_75( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void NSDeallocateObject( + objc.ObjCObjectBase object, ) { - return __objc_msgSend_75( - obj, - sel, - value, + return _NSDeallocateObject( + object.ref.pointer, ); } - late final __objc_msgSend_75Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.LongLong)>>('objc_msgSend'); - late final __objc_msgSend_75 = __objc_msgSend_75Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _NSDeallocateObjectPtr = _lookup< + ffi.NativeFunction)>>( + 'NSDeallocateObject'); + late final _NSDeallocateObject = _NSDeallocateObjectPtr.asFunction< + void Function(ffi.Pointer)>(); - late final _sel_initWithUnsignedLongLong_1 = - _registerName1("initWithUnsignedLongLong:"); - ffi.Pointer _objc_msgSend_76( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + objc.ObjCObjectBase NSCopyObject( + objc.ObjCObjectBase object, + DartNSUInteger extraBytes, + ffi.Pointer zone, ) { - return __objc_msgSend_76( - obj, - sel, - value, - ); + return objc.ObjCObjectBase( + _NSCopyObject( + object.ref.pointer, + extraBytes, + zone, + ), + retain: true, + release: true); } - late final __objc_msgSend_76Ptr = _lookup< + late final _NSCopyObjectPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLongLong)>>('objc_msgSend'); - late final __objc_msgSend_76 = __objc_msgSend_76Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + NSUInteger, ffi.Pointer)>>('NSCopyObject'); + late final _NSCopyObject = _NSCopyObjectPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - late final _sel_initWithFloat_1 = _registerName1("initWithFloat:"); - ffi.Pointer _objc_msgSend_77( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + bool NSShouldRetainWithZone( + objc.ObjCObjectBase anObject, + ffi.Pointer requestedZone, ) { - return __objc_msgSend_77( - obj, - sel, - value, + return _NSShouldRetainWithZone( + anObject.ref.pointer, + requestedZone, ); } - late final __objc_msgSend_77Ptr = _lookup< + late final _NSShouldRetainWithZonePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_77 = __objc_msgSend_77Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>('NSShouldRetainWithZone'); + late final _NSShouldRetainWithZone = _NSShouldRetainWithZonePtr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_initWithDouble_1 = _registerName1("initWithDouble:"); - ffi.Pointer _objc_msgSend_78( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + void NSIncrementExtraRefCount( + objc.ObjCObjectBase object, ) { - return __objc_msgSend_78( - obj, - sel, - value, + return _NSIncrementExtraRefCount( + object.ref.pointer, ); } - late final __objc_msgSend_78Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_78 = __objc_msgSend_78Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, double)>(); + late final _NSIncrementExtraRefCountPtr = _lookup< + ffi.NativeFunction)>>( + 'NSIncrementExtraRefCount'); + late final _NSIncrementExtraRefCount = _NSIncrementExtraRefCountPtr + .asFunction)>(); - late final _sel_initWithBool_1 = _registerName1("initWithBool:"); - ffi.Pointer _objc_msgSend_79( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, + bool NSDecrementExtraRefCountWasZero( + objc.ObjCObjectBase object, ) { - return __objc_msgSend_79( - obj, - sel, - value, + return _NSDecrementExtraRefCountWasZero( + object.ref.pointer, ); } - late final __objc_msgSend_79Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_79 = __objc_msgSend_79Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + late final _NSDecrementExtraRefCountWasZeroPtr = _lookup< + ffi.NativeFunction)>>( + 'NSDecrementExtraRefCountWasZero'); + late final _NSDecrementExtraRefCountWasZero = + _NSDecrementExtraRefCountWasZeroPtr.asFunction< + bool Function(ffi.Pointer)>(); - late final _sel_initWithInteger_1 = _registerName1("initWithInteger:"); - late final _sel_initWithUnsignedInteger_1 = - _registerName1("initWithUnsignedInteger:"); - late final _sel_charValue1 = _registerName1("charValue"); - int _objc_msgSend_80( - ffi.Pointer obj, - ffi.Pointer sel, + DartNSUInteger NSExtraRefCount( + objc.ObjCObjectBase object, ) { - return __objc_msgSend_80( - obj, - sel, + return _NSExtraRefCount( + object.ref.pointer, ); } - late final __objc_msgSend_80Ptr = _lookup< - ffi.NativeFunction< - ffi.Char Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_80 = __objc_msgSend_80Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _NSExtraRefCountPtr = _lookup< + ffi + .NativeFunction)>>( + 'NSExtraRefCount'); + late final _NSExtraRefCount = _NSExtraRefCountPtr.asFunction< + int Function(ffi.Pointer)>(); - late final _sel_unsignedCharValue1 = _registerName1("unsignedCharValue"); - int _objc_msgSend_81( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_81( - obj, - sel, - ); - } + late final ffi.Pointer + _NSSystemClockDidChangeNotification = + _lookup('NSSystemClockDidChangeNotification'); - late final __objc_msgSend_81Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedChar Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_81 = __objc_msgSend_81Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + DartNSNotificationName get NSSystemClockDidChangeNotification => + objc.NSString.castFromPointer(_NSSystemClockDidChangeNotification.value, + retain: true, release: true); - late final _sel_shortValue1 = _registerName1("shortValue"); - int _objc_msgSend_82( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_82( - obj, - sel, - ); + set NSSystemClockDidChangeNotification(DartNSNotificationName value) { + objc.NSString.castFromPointer(_NSSystemClockDidChangeNotification.value, + retain: false, release: true) + .ref + .release(); + _NSSystemClockDidChangeNotification.value = + value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_82Ptr = _lookup< - ffi.NativeFunction< - ffi.Short Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_82 = __objc_msgSend_82Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _NSHTTPCookieManagerAcceptPolicyChangedNotification = + _lookup( + 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); - late final _sel_unsignedShortValue1 = _registerName1("unsignedShortValue"); - int _objc_msgSend_83( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_83( - obj, - sel, - ); + DartNSNotificationName + get NSHTTPCookieManagerAcceptPolicyChangedNotification => + objc.NSString.castFromPointer( + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value, + retain: true, + release: true); + + set NSHTTPCookieManagerAcceptPolicyChangedNotification( + DartNSNotificationName value) { + objc.NSString.castFromPointer( + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value, + retain: false, + release: true) + .ref + .release(); + _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = + value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_83Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedShort Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_83 = __objc_msgSend_83Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _NSHTTPCookieManagerCookiesChangedNotification = + _lookup( + 'NSHTTPCookieManagerCookiesChangedNotification'); - late final _sel_intValue1 = _registerName1("intValue"); - int _objc_msgSend_84( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_84( - obj, - sel, - ); + DartNSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => + objc.NSString.castFromPointer( + _NSHTTPCookieManagerCookiesChangedNotification.value, + retain: true, + release: true); + + set NSHTTPCookieManagerCookiesChangedNotification( + DartNSNotificationName value) { + objc.NSString.castFromPointer( + _NSHTTPCookieManagerCookiesChangedNotification.value, + retain: false, + release: true) + .ref + .release(); + _NSHTTPCookieManagerCookiesChangedNotification.value = + value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_84Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_84 = __objc_msgSend_84Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _NSProgressEstimatedTimeRemainingKey = + _lookup('NSProgressEstimatedTimeRemainingKey'); - late final _sel_unsignedIntValue1 = _registerName1("unsignedIntValue"); - int _objc_msgSend_85( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_85( - obj, - sel, - ); + DartNSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => + objc.NSString.castFromPointer(_NSProgressEstimatedTimeRemainingKey.value, + retain: true, release: true); + + set NSProgressEstimatedTimeRemainingKey(DartNSProgressUserInfoKey value) { + objc.NSString.castFromPointer(_NSProgressEstimatedTimeRemainingKey.value, + retain: false, release: true) + .ref + .release(); + _NSProgressEstimatedTimeRemainingKey.value = + value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_85Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedInt Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_85 = __objc_msgSend_85Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer _NSProgressThroughputKey = + _lookup('NSProgressThroughputKey'); - late final _sel_longValue1 = _registerName1("longValue"); - int _objc_msgSend_86( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_86( - obj, - sel, - ); + DartNSProgressUserInfoKey get NSProgressThroughputKey => + objc.NSString.castFromPointer(_NSProgressThroughputKey.value, + retain: true, release: true); + + set NSProgressThroughputKey(DartNSProgressUserInfoKey value) { + objc.NSString.castFromPointer(_NSProgressThroughputKey.value, + retain: false, release: true) + .ref + .release(); + _NSProgressThroughputKey.value = value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_86Ptr = _lookup< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_86 = __objc_msgSend_86Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer _NSProgressKindFile = + _lookup('NSProgressKindFile'); - late final _sel_unsignedLongValue1 = _registerName1("unsignedLongValue"); - late final _sel_longLongValue1 = _registerName1("longLongValue"); - int _objc_msgSend_87( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_87( - obj, - sel, - ); + DartNSProgressKind get NSProgressKindFile => + objc.NSString.castFromPointer(_NSProgressKindFile.value, + retain: true, release: true); + + set NSProgressKindFile(DartNSProgressKind value) { + objc.NSString.castFromPointer(_NSProgressKindFile.value, + retain: false, release: true) + .ref + .release(); + _NSProgressKindFile.value = value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_87Ptr = _lookup< - ffi.NativeFunction< - ffi.LongLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_87 = __objc_msgSend_87Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _NSProgressFileOperationKindKey = + _lookup('NSProgressFileOperationKindKey'); - late final _sel_unsignedLongLongValue1 = - _registerName1("unsignedLongLongValue"); - int _objc_msgSend_88( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_88( - obj, - sel, - ); + DartNSProgressUserInfoKey get NSProgressFileOperationKindKey => + objc.NSString.castFromPointer(_NSProgressFileOperationKindKey.value, + retain: true, release: true); + + set NSProgressFileOperationKindKey(DartNSProgressUserInfoKey value) { + objc.NSString.castFromPointer(_NSProgressFileOperationKindKey.value, + retain: false, release: true) + .ref + .release(); + _NSProgressFileOperationKindKey.value = value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_88Ptr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLongLong Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_88 = __objc_msgSend_88Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _NSProgressFileOperationKindDownloading = + _lookup( + 'NSProgressFileOperationKindDownloading'); - late final _sel_floatValue1 = _registerName1("floatValue"); - late final _objc_msgSend_useVariants1 = ffi.Abi.current() == ffi.Abi.iosX64 || - ffi.Abi.current() == ffi.Abi.macosX64; - double _objc_msgSend_89( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_89( - obj, - sel, - ); + DartNSProgressFileOperationKind get NSProgressFileOperationKindDownloading => + objc.NSString.castFromPointer( + _NSProgressFileOperationKindDownloading.value, + retain: true, + release: true); + + set NSProgressFileOperationKindDownloading( + DartNSProgressFileOperationKind value) { + objc.NSString.castFromPointer(_NSProgressFileOperationKindDownloading.value, + retain: false, release: true) + .ref + .release(); + _NSProgressFileOperationKindDownloading.value = + value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_89Ptr = _lookup< - ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_89 = __objc_msgSend_89Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _NSProgressFileOperationKindDecompressingAfterDownloading = + _lookup( + 'NSProgressFileOperationKindDecompressingAfterDownloading'); - double _objc_msgSend_89_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_89_fpret( - obj, - sel, - ); + DartNSProgressFileOperationKind + get NSProgressFileOperationKindDecompressingAfterDownloading => + objc.NSString.castFromPointer( + _NSProgressFileOperationKindDecompressingAfterDownloading.value, + retain: true, + release: true); + + set NSProgressFileOperationKindDecompressingAfterDownloading( + DartNSProgressFileOperationKind value) { + objc.NSString.castFromPointer( + _NSProgressFileOperationKindDecompressingAfterDownloading.value, + retain: false, + release: true) + .ref + .release(); + _NSProgressFileOperationKindDecompressingAfterDownloading.value = + value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_89_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); - late final __objc_msgSend_89_fpret = __objc_msgSend_89_fpretPtr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _NSProgressFileOperationKindReceiving = + _lookup( + 'NSProgressFileOperationKindReceiving'); - late final _sel_doubleValue1 = _registerName1("doubleValue"); - double _objc_msgSend_90( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_90( - obj, - sel, - ); + DartNSProgressFileOperationKind get NSProgressFileOperationKindReceiving => + objc.NSString.castFromPointer(_NSProgressFileOperationKindReceiving.value, + retain: true, release: true); + + set NSProgressFileOperationKindReceiving( + DartNSProgressFileOperationKind value) { + objc.NSString.castFromPointer(_NSProgressFileOperationKindReceiving.value, + retain: false, release: true) + .ref + .release(); + _NSProgressFileOperationKindReceiving.value = + value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_90Ptr = _lookup< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_90 = __objc_msgSend_90Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _NSProgressFileOperationKindCopying = + _lookup( + 'NSProgressFileOperationKindCopying'); - double _objc_msgSend_90_fpret( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_90_fpret( - obj, - sel, - ); + DartNSProgressFileOperationKind get NSProgressFileOperationKindCopying => + objc.NSString.castFromPointer(_NSProgressFileOperationKindCopying.value, + retain: true, release: true); + + set NSProgressFileOperationKindCopying( + DartNSProgressFileOperationKind value) { + objc.NSString.castFromPointer(_NSProgressFileOperationKindCopying.value, + retain: false, release: true) + .ref + .release(); + _NSProgressFileOperationKindCopying.value = + value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_90_fpretPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, - ffi.Pointer)>>('objc_msgSend_fpret'); - late final __objc_msgSend_90_fpret = __objc_msgSend_90_fpretPtr.asFunction< - double Function(ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _NSProgressFileOperationKindUploading = + _lookup( + 'NSProgressFileOperationKindUploading'); - late final _sel_boolValue1 = _registerName1("boolValue"); - late final _sel_integerValue1 = _registerName1("integerValue"); - late final _sel_unsignedIntegerValue1 = - _registerName1("unsignedIntegerValue"); - late final _sel_stringValue1 = _registerName1("stringValue"); - int _objc_msgSend_91( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherNumber, - ) { - return __objc_msgSend_91( - obj, - sel, - otherNumber, - ); + DartNSProgressFileOperationKind get NSProgressFileOperationKindUploading => + objc.NSString.castFromPointer(_NSProgressFileOperationKindUploading.value, + retain: true, release: true); + + set NSProgressFileOperationKindUploading( + DartNSProgressFileOperationKind value) { + objc.NSString.castFromPointer(_NSProgressFileOperationKindUploading.value, + retain: false, release: true) + .ref + .release(); + _NSProgressFileOperationKindUploading.value = + value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_91Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_91 = __objc_msgSend_91Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final ffi.Pointer + _NSProgressFileOperationKindDuplicating = + _lookup( + 'NSProgressFileOperationKindDuplicating'); - late final _sel_isEqualToNumber_1 = _registerName1("isEqualToNumber:"); - bool _objc_msgSend_92( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer number, - ) { - return __objc_msgSend_92( - obj, - sel, - number, - ); + DartNSProgressFileOperationKind get NSProgressFileOperationKindDuplicating => + objc.NSString.castFromPointer( + _NSProgressFileOperationKindDuplicating.value, + retain: true, + release: true); + + set NSProgressFileOperationKindDuplicating( + DartNSProgressFileOperationKind value) { + objc.NSString.castFromPointer(_NSProgressFileOperationKindDuplicating.value, + retain: false, release: true) + .ref + .release(); + _NSProgressFileOperationKindDuplicating.value = + value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_92Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_92 = __objc_msgSend_92Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final ffi.Pointer _NSProgressFileURLKey = + _lookup('NSProgressFileURLKey'); - late final _sel_descriptionWithLocale_1 = - _registerName1("descriptionWithLocale:"); - ffi.Pointer _objc_msgSend_93( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, - ) { - return __objc_msgSend_93( - obj, - sel, - locale, - ); + DartNSProgressUserInfoKey get NSProgressFileURLKey => + objc.NSString.castFromPointer(_NSProgressFileURLKey.value, + retain: true, release: true); + + set NSProgressFileURLKey(DartNSProgressUserInfoKey value) { + objc.NSString.castFromPointer(_NSProgressFileURLKey.value, + retain: false, release: true) + .ref + .release(); + _NSProgressFileURLKey.value = value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_93Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_93 = __objc_msgSend_93Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_numberWithChar_1 = _registerName1("numberWithChar:"); - late final _sel_numberWithUnsignedChar_1 = - _registerName1("numberWithUnsignedChar:"); - late final _sel_numberWithShort_1 = _registerName1("numberWithShort:"); - late final _sel_numberWithUnsignedShort_1 = - _registerName1("numberWithUnsignedShort:"); - late final _sel_numberWithInt_1 = _registerName1("numberWithInt:"); - late final _sel_numberWithUnsignedInt_1 = - _registerName1("numberWithUnsignedInt:"); - late final _sel_numberWithLong_1 = _registerName1("numberWithLong:"); - late final _sel_numberWithUnsignedLong_1 = - _registerName1("numberWithUnsignedLong:"); - late final _sel_numberWithLongLong_1 = _registerName1("numberWithLongLong:"); - late final _sel_numberWithUnsignedLongLong_1 = - _registerName1("numberWithUnsignedLongLong:"); - late final _sel_numberWithFloat_1 = _registerName1("numberWithFloat:"); - late final _sel_numberWithDouble_1 = _registerName1("numberWithDouble:"); - late final _sel_numberWithBool_1 = _registerName1("numberWithBool:"); - late final _sel_numberWithInteger_1 = _registerName1("numberWithInteger:"); - late final _sel_numberWithUnsignedInteger_1 = - _registerName1("numberWithUnsignedInteger:"); - late final _sel_port1 = _registerName1("port"); - ffi.Pointer _objc_msgSend_94( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_94( - obj, - sel, - ); + late final ffi.Pointer _NSProgressFileTotalCountKey = + _lookup('NSProgressFileTotalCountKey'); + + DartNSProgressUserInfoKey get NSProgressFileTotalCountKey => + objc.NSString.castFromPointer(_NSProgressFileTotalCountKey.value, + retain: true, release: true); + + set NSProgressFileTotalCountKey(DartNSProgressUserInfoKey value) { + objc.NSString.castFromPointer(_NSProgressFileTotalCountKey.value, + retain: false, release: true) + .ref + .release(); + _NSProgressFileTotalCountKey.value = value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_94Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_94 = __objc_msgSend_94Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_user1 = _registerName1("user"); - late final _sel_password1 = _registerName1("password"); - late final _sel_path1 = _registerName1("path"); - late final _sel_fragment1 = _registerName1("fragment"); - late final _sel_parameterString1 = _registerName1("parameterString"); - late final _sel_query1 = _registerName1("query"); - late final _sel_relativePath1 = _registerName1("relativePath"); - late final _sel_hasDirectoryPath1 = _registerName1("hasDirectoryPath"); - late final _sel_getFileSystemRepresentation_maxLength_1 = - _registerName1("getFileSystemRepresentation:maxLength:"); - bool _objc_msgSend_95( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferLength, - ) { - return __objc_msgSend_95( - obj, - sel, - buffer, - maxBufferLength, - ); - } - - late final __objc_msgSend_95Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_95 = __objc_msgSend_95Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_fileSystemRepresentation1 = - _registerName1("fileSystemRepresentation"); - late final _sel_isFileURL1 = _registerName1("isFileURL"); - late final _sel_standardizedURL1 = _registerName1("standardizedURL"); - late final _sel_isFileReferenceURL1 = _registerName1("isFileReferenceURL"); - late final _sel_fileReferenceURL1 = _registerName1("fileReferenceURL"); - late final _sel_filePathURL1 = _registerName1("filePathURL"); - late final _class_NSError1 = _getClass1("NSError"); - late final _class_NSDictionary1 = _getClass1("NSDictionary"); - late final _sel_count1 = _registerName1("count"); - late final _sel_objectForKey_1 = _registerName1("objectForKey:"); - ffi.Pointer _objc_msgSend_96( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aKey, - ) { - return __objc_msgSend_96( - obj, - sel, - aKey, - ); + late final ffi.Pointer + _NSProgressFileCompletedCountKey = + _lookup('NSProgressFileCompletedCountKey'); + + DartNSProgressUserInfoKey get NSProgressFileCompletedCountKey => + objc.NSString.castFromPointer(_NSProgressFileCompletedCountKey.value, + retain: true, release: true); + + set NSProgressFileCompletedCountKey(DartNSProgressUserInfoKey value) { + objc.NSString.castFromPointer(_NSProgressFileCompletedCountKey.value, + retain: false, release: true) + .ref + .release(); + _NSProgressFileCompletedCountKey.value = value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_96Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_96 = __objc_msgSend_96Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _NSProgressFileAnimationImageKey = + _lookup('NSProgressFileAnimationImageKey'); - late final _class_NSEnumerator1 = _getClass1("NSEnumerator"); - late final _sel_nextObject1 = _registerName1("nextObject"); - late final _sel_allObjects1 = _registerName1("allObjects"); - late final _sel_keyEnumerator1 = _registerName1("keyEnumerator"); - ffi.Pointer _objc_msgSend_97( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_97( - obj, - sel, - ); + DartNSProgressUserInfoKey get NSProgressFileAnimationImageKey => + objc.NSString.castFromPointer(_NSProgressFileAnimationImageKey.value, + retain: true, release: true); + + set NSProgressFileAnimationImageKey(DartNSProgressUserInfoKey value) { + objc.NSString.castFromPointer(_NSProgressFileAnimationImageKey.value, + retain: false, release: true) + .ref + .release(); + _NSProgressFileAnimationImageKey.value = value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_97Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_97 = __objc_msgSend_97Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final ffi.Pointer + _NSProgressFileAnimationImageOriginalRectKey = + _lookup( + 'NSProgressFileAnimationImageOriginalRectKey'); - late final _sel_initWithObjects_forKeys_count_1 = - _registerName1("initWithObjects:forKeys:count:"); - instancetype _objc_msgSend_98( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt, - ) { - return __objc_msgSend_98( - obj, - sel, - objects, - keys, - cnt, - ); + DartNSProgressUserInfoKey get NSProgressFileAnimationImageOriginalRectKey => + objc.NSString.castFromPointer( + _NSProgressFileAnimationImageOriginalRectKey.value, + retain: true, + release: true); + + set NSProgressFileAnimationImageOriginalRectKey( + DartNSProgressUserInfoKey value) { + objc.NSString.castFromPointer( + _NSProgressFileAnimationImageOriginalRectKey.value, + retain: false, + release: true) + .ref + .release(); + _NSProgressFileAnimationImageOriginalRectKey.value = + value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_98Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_98 = __objc_msgSend_98Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); + late final ffi.Pointer _NSProgressFileIconKey = + _lookup('NSProgressFileIconKey'); - late final _class_NSArray1 = _getClass1("NSArray"); - late final _sel_objectAtIndex_1 = _registerName1("objectAtIndex:"); - ffi.Pointer _objc_msgSend_99( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ) { - return __objc_msgSend_99( - obj, - sel, - index, - ); + DartNSProgressUserInfoKey get NSProgressFileIconKey => + objc.NSString.castFromPointer(_NSProgressFileIconKey.value, + retain: true, release: true); + + set NSProgressFileIconKey(DartNSProgressUserInfoKey value) { + objc.NSString.castFromPointer(_NSProgressFileIconKey.value, + retain: false, release: true) + .ref + .release(); + _NSProgressFileIconKey.value = value.ref.retainAndReturnPointer(); } - late final __objc_msgSend_99Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_99 = __objc_msgSend_99Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final ffi.Pointer _kCFTypeArrayCallBacks = + _lookup('kCFTypeArrayCallBacks'); - late final _sel_initWithObjects_count_1 = - _registerName1("initWithObjects:count:"); - instancetype _objc_msgSend_100( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - int cnt, - ) { - return __objc_msgSend_100( - obj, - sel, - objects, - cnt, - ); + CFArrayCallBacks get kCFTypeArrayCallBacks => _kCFTypeArrayCallBacks.ref; + + int CFArrayGetTypeID() { + return _CFArrayGetTypeID(); } - late final __objc_msgSend_100Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_100 = __objc_msgSend_100Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, int)>(); + late final _CFArrayGetTypeIDPtr = + _lookup>('CFArrayGetTypeID'); + late final _CFArrayGetTypeID = + _CFArrayGetTypeIDPtr.asFunction(); - late final _sel_arrayByAddingObject_1 = - _registerName1("arrayByAddingObject:"); - ffi.Pointer _objc_msgSend_101( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, + CFArrayRef CFArrayCreate( + CFAllocatorRef allocator, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, ) { - return __objc_msgSend_101( - obj, - sel, - anObject, + return _CFArrayCreate( + allocator, + values, + numValues, + callBacks, ); } - late final __objc_msgSend_101Ptr = _lookup< + late final _CFArrayCreatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_101 = __objc_msgSend_101Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CFArrayRef Function( + CFAllocatorRef, + ffi.Pointer>, + CFIndex, + ffi.Pointer)>>('CFArrayCreate'); + late final _CFArrayCreate = _CFArrayCreatePtr.asFunction< + CFArrayRef Function(CFAllocatorRef, ffi.Pointer>, + int, ffi.Pointer)>(); - late final _sel_arrayByAddingObjectsFromArray_1 = - _registerName1("arrayByAddingObjectsFromArray:"); - ffi.Pointer _objc_msgSend_102( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + CFArrayRef CFArrayCreateCopy( + CFAllocatorRef allocator, + CFArrayRef theArray, ) { - return __objc_msgSend_102( - obj, - sel, - otherArray, + return _CFArrayCreateCopy( + allocator, + theArray, ); } - late final __objc_msgSend_102Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_102 = __objc_msgSend_102Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFArrayCreateCopyPtr = _lookup< + ffi.NativeFunction>( + 'CFArrayCreateCopy'); + late final _CFArrayCreateCopy = _CFArrayCreateCopyPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFArrayRef)>(); - late final _sel_componentsJoinedByString_1 = - _registerName1("componentsJoinedByString:"); - ffi.Pointer _objc_msgSend_103( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer separator, + CFMutableArrayRef CFArrayCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, ) { - return __objc_msgSend_103( - obj, - sel, - separator, + return _CFArrayCreateMutable( + allocator, + capacity, + callBacks, ); } - late final __objc_msgSend_103Ptr = _lookup< + late final _CFArrayCreateMutablePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_103 = __objc_msgSend_103Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CFMutableArrayRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFArrayCreateMutable'); + late final _CFArrayCreateMutable = _CFArrayCreateMutablePtr.asFunction< + CFMutableArrayRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - late final _sel_containsObject_1 = _registerName1("containsObject:"); - late final _sel_descriptionWithLocale_indent_1 = - _registerName1("descriptionWithLocale:indent:"); - ffi.Pointer _objc_msgSend_104( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, - int level, + CFMutableArrayRef CFArrayCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFArrayRef theArray, ) { - return __objc_msgSend_104( - obj, - sel, - locale, - level, + return _CFArrayCreateMutableCopy( + allocator, + capacity, + theArray, ); } - late final __objc_msgSend_104Ptr = _lookup< + late final _CFArrayCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_104 = __objc_msgSend_104Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + CFMutableArrayRef Function(CFAllocatorRef, CFIndex, + CFArrayRef)>>('CFArrayCreateMutableCopy'); + late final _CFArrayCreateMutableCopy = + _CFArrayCreateMutableCopyPtr.asFunction< + CFMutableArrayRef Function(CFAllocatorRef, int, CFArrayRef)>(); - late final _sel_firstObjectCommonWithArray_1 = - _registerName1("firstObjectCommonWithArray:"); - ffi.Pointer _objc_msgSend_105( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + int CFArrayGetCount( + CFArrayRef theArray, ) { - return __objc_msgSend_105( - obj, - sel, - otherArray, + return _CFArrayGetCount( + theArray, ); } - late final __objc_msgSend_105Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_105 = __objc_msgSend_105Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFArrayGetCountPtr = + _lookup>( + 'CFArrayGetCount'); + late final _CFArrayGetCount = + _CFArrayGetCountPtr.asFunction(); - late final _sel_getObjects_range_1 = _registerName1("getObjects:range:"); - void _objc_msgSend_106( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - NSRange range, + int CFArrayGetCountOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return __objc_msgSend_106( - obj, - sel, - objects, + return _CFArrayGetCountOfValue( + theArray, range, + value, ); } - late final __objc_msgSend_106Ptr = _lookup< + late final _CFArrayGetCountOfValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_106 = __objc_msgSend_106Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, NSRange)>(); + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetCountOfValue'); + late final _CFArrayGetCountOfValue = _CFArrayGetCountOfValuePtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer)>(); - late final _sel_indexOfObject_1 = _registerName1("indexOfObject:"); - int _objc_msgSend_107( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, + int CFArrayContainsValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return __objc_msgSend_107( - obj, - sel, - anObject, + return _CFArrayContainsValue( + theArray, + range, + value, ); } - late final __objc_msgSend_107Ptr = _lookup< + late final _CFArrayContainsValuePtr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_107 = __objc_msgSend_107Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + Boolean Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayContainsValue'); + late final _CFArrayContainsValue = _CFArrayContainsValuePtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer)>(); - late final _sel_indexOfObject_inRange_1 = - _registerName1("indexOfObject:inRange:"); - int _objc_msgSend_108( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - NSRange range, + ffi.Pointer CFArrayGetValueAtIndex( + CFArrayRef theArray, + int idx, ) { - return __objc_msgSend_108( - obj, - sel, - anObject, - range, + return _CFArrayGetValueAtIndex( + theArray, + idx, ); } - late final __objc_msgSend_108Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_108 = __objc_msgSend_108Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + late final _CFArrayGetValueAtIndexPtr = _lookup< + ffi + .NativeFunction Function(CFArrayRef, CFIndex)>>( + 'CFArrayGetValueAtIndex'); + late final _CFArrayGetValueAtIndex = _CFArrayGetValueAtIndexPtr.asFunction< + ffi.Pointer Function(CFArrayRef, int)>(); - late final _sel_indexOfObjectIdenticalTo_1 = - _registerName1("indexOfObjectIdenticalTo:"); - late final _sel_indexOfObjectIdenticalTo_inRange_1 = - _registerName1("indexOfObjectIdenticalTo:inRange:"); - late final _sel_isEqualToArray_1 = _registerName1("isEqualToArray:"); - bool _objc_msgSend_109( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + void CFArrayGetValues( + CFArrayRef theArray, + CFRange range, + ffi.Pointer> values, ) { - return __objc_msgSend_109( - obj, - sel, - otherArray, + return _CFArrayGetValues( + theArray, + range, + values, ); } - late final __objc_msgSend_109Ptr = _lookup< + late final _CFArrayGetValuesPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_109 = __objc_msgSend_109Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(CFArrayRef, CFRange, + ffi.Pointer>)>>('CFArrayGetValues'); + late final _CFArrayGetValues = _CFArrayGetValuesPtr.asFunction< + void Function(CFArrayRef, CFRange, ffi.Pointer>)>(); - late final _sel_firstObject1 = _registerName1("firstObject"); - late final _sel_lastObject1 = _registerName1("lastObject"); - late final _sel_objectEnumerator1 = _registerName1("objectEnumerator"); - late final _sel_reverseObjectEnumerator1 = - _registerName1("reverseObjectEnumerator"); - late final _sel_sortedArrayHint1 = _registerName1("sortedArrayHint"); - late final _sel_sortedArrayUsingFunction_context_1 = - _registerName1("sortedArrayUsingFunction:context:"); - ffi.Pointer _objc_msgSend_110( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, + void CFArrayApplyFunction( + CFArrayRef theArray, + CFRange range, + CFArrayApplierFunction applier, ffi.Pointer context, ) { - return __objc_msgSend_110( - obj, - sel, - comparator, + return _CFArrayApplyFunction( + theArray, + range, + applier, context, ); } - late final __objc_msgSend_110Ptr = _lookup< + late final _CFArrayApplyFunctionPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_110 = __objc_msgSend_110Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, + ffi.Void Function(CFArrayRef, CFRange, CFArrayApplierFunction, + ffi.Pointer)>>('CFArrayApplyFunction'); + late final _CFArrayApplyFunction = _CFArrayApplyFunctionPtr.asFunction< + void Function(CFArrayRef, CFRange, CFArrayApplierFunction, ffi.Pointer)>(); - late final _sel_sortedArrayUsingFunction_context_hint_1 = - _registerName1("sortedArrayUsingFunction:context:hint:"); - ffi.Pointer _objc_msgSend_111( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - ffi.Pointer hint, + int CFArrayGetFirstIndexOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return __objc_msgSend_111( - obj, - sel, - comparator, - context, - hint, + return _CFArrayGetFirstIndexOfValue( + theArray, + range, + value, ); } - late final __objc_msgSend_111Ptr = _lookup< + late final _CFArrayGetFirstIndexOfValuePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_111 = __objc_msgSend_111Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>(); + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetFirstIndexOfValue'); + late final _CFArrayGetFirstIndexOfValue = _CFArrayGetFirstIndexOfValuePtr + .asFunction)>(); - late final _sel_sortedArrayUsingSelector_1 = - _registerName1("sortedArrayUsingSelector:"); - ffi.Pointer _objc_msgSend_112( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer comparator, + int CFArrayGetLastIndexOfValue( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, ) { - return __objc_msgSend_112( - obj, - sel, - comparator, + return _CFArrayGetLastIndexOfValue( + theArray, + range, + value, ); } - late final __objc_msgSend_112Ptr = _lookup< + late final _CFArrayGetLastIndexOfValuePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_112 = __objc_msgSend_112Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + CFIndex Function(CFArrayRef, CFRange, + ffi.Pointer)>>('CFArrayGetLastIndexOfValue'); + late final _CFArrayGetLastIndexOfValue = _CFArrayGetLastIndexOfValuePtr + .asFunction)>(); - late final _sel_subarrayWithRange_1 = _registerName1("subarrayWithRange:"); - ffi.Pointer _objc_msgSend_113( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + int CFArrayBSearchValues( + CFArrayRef theArray, + CFRange range, + ffi.Pointer value, + CFComparatorFunction comparator, + ffi.Pointer context, ) { - return __objc_msgSend_113( - obj, - sel, + return _CFArrayBSearchValues( + theArray, range, + value, + comparator, + context, ); } - late final __objc_msgSend_113Ptr = _lookup< + late final _CFArrayBSearchValuesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_113 = __objc_msgSend_113Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + CFIndex Function( + CFArrayRef, + CFRange, + ffi.Pointer, + CFComparatorFunction, + ffi.Pointer)>>('CFArrayBSearchValues'); + late final _CFArrayBSearchValues = _CFArrayBSearchValuesPtr.asFunction< + int Function(CFArrayRef, CFRange, ffi.Pointer, + CFComparatorFunction, ffi.Pointer)>(); - late final _sel_writeToURL_error_1 = _registerName1("writeToURL:error:"); - bool _objc_msgSend_114( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, + void CFArrayAppendValue( + CFMutableArrayRef theArray, + ffi.Pointer value, ) { - return __objc_msgSend_114( - obj, - sel, - url, - error, - ); - } - - late final __objc_msgSend_114Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_114 = __objc_msgSend_114Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_makeObjectsPerformSelector_1 = - _registerName1("makeObjectsPerformSelector:"); - late final _sel_makeObjectsPerformSelector_withObject_1 = - _registerName1("makeObjectsPerformSelector:withObject:"); - void _objc_msgSend_115( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aSelector, - ffi.Pointer argument, - ) { - return __objc_msgSend_115( - obj, - sel, - aSelector, - argument, + return _CFArrayAppendValue( + theArray, + value, ); } - late final __objc_msgSend_115Ptr = _lookup< + late final _CFArrayAppendValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_115 = __objc_msgSend_115Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + CFMutableArrayRef, ffi.Pointer)>>('CFArrayAppendValue'); + late final _CFArrayAppendValue = _CFArrayAppendValuePtr.asFunction< + void Function(CFMutableArrayRef, ffi.Pointer)>(); - late final _class_NSIndexSet1 = _getClass1("NSIndexSet"); - late final _sel_indexSet1 = _registerName1("indexSet"); - late final _sel_indexSetWithIndex_1 = _registerName1("indexSetWithIndex:"); - late final _sel_indexSetWithIndexesInRange_1 = - _registerName1("indexSetWithIndexesInRange:"); - instancetype _objc_msgSend_116( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + void CFArrayInsertValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ffi.Pointer value, ) { - return __objc_msgSend_116( - obj, - sel, - range, + return _CFArrayInsertValueAtIndex( + theArray, + idx, + value, ); } - late final __objc_msgSend_116Ptr = _lookup< + late final _CFArrayInsertValueAtIndexPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_116 = __objc_msgSend_116Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Void Function(CFMutableArrayRef, CFIndex, + ffi.Pointer)>>('CFArrayInsertValueAtIndex'); + late final _CFArrayInsertValueAtIndex = + _CFArrayInsertValueAtIndexPtr.asFunction< + void Function(CFMutableArrayRef, int, ffi.Pointer)>(); - late final _sel_initWithIndexesInRange_1 = - _registerName1("initWithIndexesInRange:"); - late final _sel_initWithIndexSet_1 = _registerName1("initWithIndexSet:"); - instancetype _objc_msgSend_117( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, + void CFArraySetValueAtIndex( + CFMutableArrayRef theArray, + int idx, + ffi.Pointer value, ) { - return __objc_msgSend_117( - obj, - sel, - indexSet, + return _CFArraySetValueAtIndex( + theArray, + idx, + value, ); } - late final __objc_msgSend_117Ptr = _lookup< + late final _CFArraySetValueAtIndexPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_117 = __objc_msgSend_117Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(CFMutableArrayRef, CFIndex, + ffi.Pointer)>>('CFArraySetValueAtIndex'); + late final _CFArraySetValueAtIndex = _CFArraySetValueAtIndexPtr.asFunction< + void Function(CFMutableArrayRef, int, ffi.Pointer)>(); - late final _sel_initWithIndex_1 = _registerName1("initWithIndex:"); - late final _sel_isEqualToIndexSet_1 = _registerName1("isEqualToIndexSet:"); - bool _objc_msgSend_118( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, + void CFArrayRemoveValueAtIndex( + CFMutableArrayRef theArray, + int idx, ) { - return __objc_msgSend_118( - obj, - sel, - indexSet, + return _CFArrayRemoveValueAtIndex( + theArray, + idx, ); } - late final __objc_msgSend_118Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_118 = __objc_msgSend_118Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _CFArrayRemoveValueAtIndexPtr = _lookup< + ffi.NativeFunction>( + 'CFArrayRemoveValueAtIndex'); + late final _CFArrayRemoveValueAtIndex = _CFArrayRemoveValueAtIndexPtr + .asFunction(); - late final _sel_firstIndex1 = _registerName1("firstIndex"); - late final _sel_lastIndex1 = _registerName1("lastIndex"); - late final _sel_indexGreaterThanIndex_1 = - _registerName1("indexGreaterThanIndex:"); - int _objc_msgSend_119( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void CFArrayRemoveAllValues( + CFMutableArrayRef theArray, ) { - return __objc_msgSend_119( - obj, - sel, - value, + return _CFArrayRemoveAllValues( + theArray, ); } - late final __objc_msgSend_119Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_119 = __objc_msgSend_119Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_indexLessThanIndex_1 = _registerName1("indexLessThanIndex:"); - late final _sel_indexGreaterThanOrEqualToIndex_1 = - _registerName1("indexGreaterThanOrEqualToIndex:"); - late final _sel_indexLessThanOrEqualToIndex_1 = - _registerName1("indexLessThanOrEqualToIndex:"); - late final _sel_getIndexes_maxCount_inIndexRange_1 = - _registerName1("getIndexes:maxCount:inIndexRange:"); - int _objc_msgSend_120( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexBuffer, - int bufferSize, - NSRangePointer range, - ) { - return __objc_msgSend_120( - obj, - sel, - indexBuffer, - bufferSize, - range, - ); - } + late final _CFArrayRemoveAllValuesPtr = + _lookup>( + 'CFArrayRemoveAllValues'); + late final _CFArrayRemoveAllValues = + _CFArrayRemoveAllValuesPtr.asFunction(); - late final __objc_msgSend_120Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_120 = __objc_msgSend_120Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRangePointer)>(); - - late final _sel_countOfIndexesInRange_1 = - _registerName1("countOfIndexesInRange:"); - int _objc_msgSend_121( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + void CFArrayReplaceValues( + CFMutableArrayRef theArray, + CFRange range, + ffi.Pointer> newValues, + int newCount, ) { - return __objc_msgSend_121( - obj, - sel, + return _CFArrayReplaceValues( + theArray, range, + newValues, + newCount, ); } - late final __objc_msgSend_121Ptr = _lookup< + late final _CFArrayReplaceValuesPtr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_121 = __objc_msgSend_121Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Void Function( + CFMutableArrayRef, + CFRange, + ffi.Pointer>, + CFIndex)>>('CFArrayReplaceValues'); + late final _CFArrayReplaceValues = _CFArrayReplaceValuesPtr.asFunction< + void Function(CFMutableArrayRef, CFRange, + ffi.Pointer>, int)>(); - late final _sel_containsIndex_1 = _registerName1("containsIndex:"); - bool _objc_msgSend_122( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void CFArrayExchangeValuesAtIndices( + CFMutableArrayRef theArray, + int idx1, + int idx2, ) { - return __objc_msgSend_122( - obj, - sel, - value, + return _CFArrayExchangeValuesAtIndices( + theArray, + idx1, + idx2, ); } - late final __objc_msgSend_122Ptr = _lookup< + late final _CFArrayExchangeValuesAtIndicesPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_122 = __objc_msgSend_122Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(CFMutableArrayRef, CFIndex, + CFIndex)>>('CFArrayExchangeValuesAtIndices'); + late final _CFArrayExchangeValuesAtIndices = + _CFArrayExchangeValuesAtIndicesPtr.asFunction< + void Function(CFMutableArrayRef, int, int)>(); - late final _sel_containsIndexesInRange_1 = - _registerName1("containsIndexesInRange:"); - bool _objc_msgSend_123( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + void CFArraySortValues( + CFMutableArrayRef theArray, + CFRange range, + CFComparatorFunction comparator, + ffi.Pointer context, ) { - return __objc_msgSend_123( - obj, - sel, + return _CFArraySortValues( + theArray, range, + comparator, + context, ); } - late final __objc_msgSend_123Ptr = _lookup< + late final _CFArraySortValuesPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_123 = __objc_msgSend_123Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + ffi.Void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, + ffi.Pointer)>>('CFArraySortValues'); + late final _CFArraySortValues = _CFArraySortValuesPtr.asFunction< + void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, + ffi.Pointer)>(); - late final _sel_containsIndexes_1 = _registerName1("containsIndexes:"); - late final _sel_intersectsIndexesInRange_1 = - _registerName1("intersectsIndexesInRange:"); - late final _sel_enumerateIndexesUsingBlock_1 = - _registerName1("enumerateIndexesUsingBlock:"); - void _objc_msgSend_124( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + void CFArrayAppendArray( + CFMutableArrayRef theArray, + CFArrayRef otherArray, + CFRange otherRange, ) { - return __objc_msgSend_124( - obj, - sel, - block, + return _CFArrayAppendArray( + theArray, + otherArray, + otherRange, ); } - late final __objc_msgSend_124Ptr = _lookup< + late final _CFArrayAppendArrayPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_124 = __objc_msgSend_124Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function( + CFMutableArrayRef, CFArrayRef, CFRange)>>('CFArrayAppendArray'); + late final _CFArrayAppendArray = _CFArrayAppendArrayPtr.asFunction< + void Function(CFMutableArrayRef, CFArrayRef, CFRange)>(); - late final _sel_enumerateIndexesWithOptions_usingBlock_1 = - _registerName1("enumerateIndexesWithOptions:usingBlock:"); - void _objc_msgSend_125( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer os_retain( + ffi.Pointer object, ) { - return __objc_msgSend_125( - obj, - sel, - opts, - block, + return _os_retain( + object, ); } - late final __objc_msgSend_125Ptr = _lookup< + late final _os_retainPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_125 = __objc_msgSend_125Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer)>>('os_retain'); + late final _os_retain = _os_retainPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_enumerateIndexesInRange_options_usingBlock_1 = - _registerName1("enumerateIndexesInRange:options:usingBlock:"); - void _objc_msgSend_126( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, + void os_release( + ffi.Pointer object, ) { - return __objc_msgSend_126( - obj, - sel, - range, - opts, - block, + return _os_release( + object, ); } - late final __objc_msgSend_126Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_126 = __objc_msgSend_126Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + late final _os_releasePtr = + _lookup)>>( + 'os_release'); + late final _os_release = + _os_releasePtr.asFunction)>(); - late final _sel_indexPassingTest_1 = _registerName1("indexPassingTest:"); - int _objc_msgSend_127( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer sec_retain( + ffi.Pointer obj, ) { - return __objc_msgSend_127( + return _sec_retain( obj, - sel, - predicate, ); } - late final __objc_msgSend_127Ptr = _lookup< + late final _sec_retainPtr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_127 = __objc_msgSend_127Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(ffi.Pointer)>>('sec_retain'); + late final _sec_retain = _sec_retainPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_indexWithOptions_passingTest_1 = - _registerName1("indexWithOptions:passingTest:"); - int _objc_msgSend_128( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + void sec_release( + ffi.Pointer obj, ) { - return __objc_msgSend_128( + return _sec_release( obj, - sel, - opts, - predicate, ); } - late final __objc_msgSend_128Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_128 = __objc_msgSend_128Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + late final _sec_releasePtr = + _lookup)>>( + 'sec_release'); + late final _sec_release = + _sec_releasePtr.asFunction)>(); - late final _sel_indexInRange_options_passingTest_1 = - _registerName1("indexInRange:options:passingTest:"); - int _objc_msgSend_129( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + CFStringRef SecCopyErrorMessageString( + int status, + ffi.Pointer reserved, ) { - return __objc_msgSend_129( - obj, - sel, - range, - opts, - predicate, + return _SecCopyErrorMessageString( + status, + reserved, ); } - late final __objc_msgSend_129Ptr = _lookup< + late final _SecCopyErrorMessageStringPtr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_129 = __objc_msgSend_129Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + CFStringRef Function( + OSStatus, ffi.Pointer)>>('SecCopyErrorMessageString'); + late final _SecCopyErrorMessageString = _SecCopyErrorMessageStringPtr + .asFunction)>(); - late final _sel_indexesPassingTest_1 = _registerName1("indexesPassingTest:"); - ffi.Pointer _objc_msgSend_130( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + void __assert_rtn( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return __objc_msgSend_130( - obj, - sel, - predicate, + return ___assert_rtn( + arg0, + arg1, + arg2, + arg3, ); } - late final __objc_msgSend_130Ptr = _lookup< + late final ___assert_rtnPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_130 = __objc_msgSend_130Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int, ffi.Pointer)>>('__assert_rtn'); + late final ___assert_rtn = ___assert_rtnPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, + ffi.Pointer)>(); - late final _sel_indexesWithOptions_passingTest_1 = - _registerName1("indexesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_131( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_131( - obj, - sel, - opts, - predicate, - ); - } + late final ffi.Pointer<_RuneLocale> __DefaultRuneLocale = + _lookup<_RuneLocale>('_DefaultRuneLocale'); - late final __objc_msgSend_131Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_131 = __objc_msgSend_131Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + _RuneLocale get _DefaultRuneLocale => __DefaultRuneLocale.ref; - late final _sel_indexesInRange_options_passingTest_1 = - _registerName1("indexesInRange:options:passingTest:"); - ffi.Pointer _objc_msgSend_132( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_132( - obj, - sel, - range, - opts, - predicate, - ); - } + late final ffi.Pointer> __CurrentRuneLocale = + _lookup>('_CurrentRuneLocale'); - late final __objc_msgSend_132Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_132 = __objc_msgSend_132Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer<_RuneLocale> get _CurrentRuneLocale => __CurrentRuneLocale.value; + + set _CurrentRuneLocale(ffi.Pointer<_RuneLocale> value) => + __CurrentRuneLocale.value = value; - late final _sel_enumerateRangesUsingBlock_1 = - _registerName1("enumerateRangesUsingBlock:"); - void _objc_msgSend_133( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + int ___runetype( + int arg0, ) { - return __objc_msgSend_133( - obj, - sel, - block, + return ____runetype( + arg0, ); } - late final __objc_msgSend_133Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_133 = __objc_msgSend_133Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final ____runetypePtr = _lookup< + ffi.NativeFunction>( + '___runetype'); + late final ____runetype = ____runetypePtr.asFunction(); - late final _sel_enumerateRangesWithOptions_usingBlock_1 = - _registerName1("enumerateRangesWithOptions:usingBlock:"); - void _objc_msgSend_134( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + int ___tolower( + int arg0, ) { - return __objc_msgSend_134( - obj, - sel, - opts, - block, + return ____tolower( + arg0, ); } - late final __objc_msgSend_134Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_134 = __objc_msgSend_134Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + late final ____tolowerPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '___tolower'); + late final ____tolower = ____tolowerPtr.asFunction(); - late final _sel_enumerateRangesInRange_options_usingBlock_1 = - _registerName1("enumerateRangesInRange:options:usingBlock:"); - void _objc_msgSend_135( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, + int ___toupper( + int arg0, ) { - return __objc_msgSend_135( - obj, - sel, - range, - opts, - block, + return ____toupper( + arg0, ); } - late final __objc_msgSend_135Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_135 = __objc_msgSend_135Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + late final ____toupperPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '___toupper'); + late final ____toupper = ____toupperPtr.asFunction(); - late final _sel_objectsAtIndexes_1 = _registerName1("objectsAtIndexes:"); - ffi.Pointer _objc_msgSend_136( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, + int __maskrune( + int arg0, + int arg1, ) { - return __objc_msgSend_136( - obj, - sel, - indexes, + return ___maskrune( + arg0, + arg1, ); } - late final __objc_msgSend_136Ptr = _lookup< + late final ___maskrunePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_136 = __objc_msgSend_136Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + __darwin_ct_rune_t, ffi.UnsignedLong)>>('__maskrune'); + late final ___maskrune = ___maskrunePtr.asFunction(); - late final _sel_objectAtIndexedSubscript_1 = - _registerName1("objectAtIndexedSubscript:"); - late final _sel_enumerateObjectsUsingBlock_1 = - _registerName1("enumerateObjectsUsingBlock:"); - void _objc_msgSend_137( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + int __toupper( + int arg0, ) { - return __objc_msgSend_137( - obj, - sel, - block, + return ___toupper1( + arg0, ); } - late final __objc_msgSend_137Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_137 = __objc_msgSend_137Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final ___toupperPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '__toupper'); + late final ___toupper1 = ___toupperPtr.asFunction(); - late final _sel_enumerateObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateObjectsWithOptions:usingBlock:"); - void _objc_msgSend_138( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + int __tolower( + int arg0, ) { - return __objc_msgSend_138( - obj, - sel, - opts, - block, + return ___tolower1( + arg0, ); } - late final __objc_msgSend_138Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_138 = __objc_msgSend_138Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + late final ___tolowerPtr = _lookup< + ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( + '__tolower'); + late final ___tolower1 = ___tolowerPtr.asFunction(); - late final _sel_enumerateObjectsAtIndexes_options_usingBlock_1 = - _registerName1("enumerateObjectsAtIndexes:options:usingBlock:"); - void _objc_msgSend_139( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_139( - obj, - sel, - s, - opts, - block, - ); + ffi.Pointer __error() { + return ___error(); } - late final __objc_msgSend_139Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_139 = __objc_msgSend_139Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_indexOfObjectPassingTest_1 = - _registerName1("indexOfObjectPassingTest:"); - int _objc_msgSend_140( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_140( - obj, - sel, - predicate, - ); + late final ___errorPtr = + _lookup Function()>>('__error'); + late final ___error = + ___errorPtr.asFunction Function()>(); + + ffi.Pointer localeconv() { + return _localeconv(); } - late final __objc_msgSend_140Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_140 = __objc_msgSend_140Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _localeconvPtr = + _lookup Function()>>('localeconv'); + late final _localeconv = + _localeconvPtr.asFunction Function()>(); - late final _sel_indexOfObjectWithOptions_passingTest_1 = - _registerName1("indexOfObjectWithOptions:passingTest:"); - int _objc_msgSend_141( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + ffi.Pointer setlocale( + int arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_141( - obj, - sel, - opts, - predicate, + return _setlocale( + arg0, + arg1, ); } - late final __objc_msgSend_141Ptr = _lookup< + late final _setlocalePtr = _lookup< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_141 = __objc_msgSend_141Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('setlocale'); + late final _setlocale = _setlocalePtr + .asFunction Function(int, ffi.Pointer)>(); - late final _sel_indexOfObjectAtIndexes_options_passingTest_1 = - _registerName1("indexOfObjectAtIndexes:options:passingTest:"); - int _objc_msgSend_142( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, - ) { - return __objc_msgSend_142( - obj, - sel, - s, - opts, - predicate, - ); + int __math_errhandling() { + return ___math_errhandling(); } - late final __objc_msgSend_142Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_142 = __objc_msgSend_142Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + late final ___math_errhandlingPtr = + _lookup>('__math_errhandling'); + late final ___math_errhandling = + ___math_errhandlingPtr.asFunction(); - late final _sel_indexesOfObjectsPassingTest_1 = - _registerName1("indexesOfObjectsPassingTest:"); - ffi.Pointer _objc_msgSend_143( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + int __fpclassifyf( + double arg0, ) { - return __objc_msgSend_143( - obj, - sel, - predicate, + return ___fpclassifyf( + arg0, ); } - late final __objc_msgSend_143Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_143 = __objc_msgSend_143Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + late final ___fpclassifyfPtr = + _lookup>('__fpclassifyf'); + late final ___fpclassifyf = + ___fpclassifyfPtr.asFunction(); - late final _sel_indexesOfObjectsWithOptions_passingTest_1 = - _registerName1("indexesOfObjectsWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_144( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + int __fpclassifyd( + double arg0, ) { - return __objc_msgSend_144( - obj, - sel, - opts, - predicate, + return ___fpclassifyd( + arg0, ); } - late final __objc_msgSend_144Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_144 = __objc_msgSend_144Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + late final ___fpclassifydPtr = + _lookup>( + '__fpclassifyd'); + late final ___fpclassifyd = + ___fpclassifydPtr.asFunction(); - late final _sel_indexesOfObjectsAtIndexes_options_passingTest_1 = - _registerName1("indexesOfObjectsAtIndexes:options:passingTest:"); - ffi.Pointer _objc_msgSend_145( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer s, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + double acosf( + double arg0, ) { - return __objc_msgSend_145( - obj, - sel, - s, - opts, - predicate, + return _acosf( + arg0, ); } - late final __objc_msgSend_145Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_145 = __objc_msgSend_145Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); + late final _acosfPtr = + _lookup>('acosf'); + late final _acosf = _acosfPtr.asFunction(); - late final _sel_sortedArrayUsingComparator_1 = - _registerName1("sortedArrayUsingComparator:"); - ffi.Pointer _objc_msgSend_146( - ffi.Pointer obj, - ffi.Pointer sel, - NSComparator cmptr, + double acos( + double arg0, ) { - return __objc_msgSend_146( - obj, - sel, - cmptr, + return _acos( + arg0, ); } - late final __objc_msgSend_146Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_146 = __objc_msgSend_146Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSComparator)>(); + late final _acosPtr = + _lookup>('acos'); + late final _acos = _acosPtr.asFunction(); - late final _sel_sortedArrayWithOptions_usingComparator_1 = - _registerName1("sortedArrayWithOptions:usingComparator:"); - ffi.Pointer _objc_msgSend_147( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - NSComparator cmptr, + double asinf( + double arg0, ) { - return __objc_msgSend_147( - obj, - sel, - opts, - cmptr, + return _asinf( + arg0, ); } - late final __objc_msgSend_147Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_147 = __objc_msgSend_147Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, NSComparator)>(); + late final _asinfPtr = + _lookup>('asinf'); + late final _asinf = _asinfPtr.asFunction(); - late final _sel_indexOfObject_inSortedRange_options_usingComparator_1 = - _registerName1("indexOfObject:inSortedRange:options:usingComparator:"); - int _objc_msgSend_148( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer obj1, - NSRange r, - int opts, - NSComparator cmp, + double asin( + double arg0, ) { - return __objc_msgSend_148( - obj, - sel, - obj1, - r, - opts, - cmp, - ); - } - - late final __objc_msgSend_148Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Int32, - NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_148 = __objc_msgSend_148Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange, int, NSComparator)>(); - - late final _sel_array1 = _registerName1("array"); - late final _sel_arrayWithObject_1 = _registerName1("arrayWithObject:"); - instancetype _objc_msgSend_149( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ) { - return __objc_msgSend_149( - obj, - sel, - anObject, + return _asin( + arg0, ); } - late final __objc_msgSend_149Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_149 = __objc_msgSend_149Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _asinPtr = + _lookup>('asin'); + late final _asin = _asinPtr.asFunction(); - late final _sel_arrayWithObjects_count_1 = - _registerName1("arrayWithObjects:count:"); - late final _sel_arrayWithObjects_1 = _registerName1("arrayWithObjects:"); - late final _sel_arrayWithArray_1 = _registerName1("arrayWithArray:"); - instancetype _objc_msgSend_150( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer array, + double atanf( + double arg0, ) { - return __objc_msgSend_150( - obj, - sel, - array, + return _atanf( + arg0, ); } - late final __objc_msgSend_150Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_150 = __objc_msgSend_150Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _atanfPtr = + _lookup>('atanf'); + late final _atanf = _atanfPtr.asFunction(); - late final _sel_initWithObjects_1 = _registerName1("initWithObjects:"); - late final _sel_initWithArray_1 = _registerName1("initWithArray:"); - late final _sel_initWithArray_copyItems_1 = - _registerName1("initWithArray:copyItems:"); - instancetype _objc_msgSend_151( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer array, - bool flag, + double atan( + double arg0, ) { - return __objc_msgSend_151( - obj, - sel, - array, - flag, + return _atan( + arg0, ); } - late final __objc_msgSend_151Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_151 = __objc_msgSend_151Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + late final _atanPtr = + _lookup>('atan'); + late final _atan = _atanPtr.asFunction(); - late final _sel_initWithContentsOfURL_error_1 = - _registerName1("initWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_152( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, + double atan2f( + double arg0, + double arg1, ) { - return __objc_msgSend_152( - obj, - sel, - url, - error, + return _atan2f( + arg0, + arg1, ); } - late final __objc_msgSend_152Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_152 = __objc_msgSend_152Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_arrayWithContentsOfURL_error_1 = - _registerName1("arrayWithContentsOfURL:error:"); - late final _class_NSOrderedCollectionDifference1 = - _getClass1("NSOrderedCollectionDifference"); - late final _sel_initWithChanges_1 = _registerName1("initWithChanges:"); - late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1 = - _registerName1( - "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:additionalChanges:"); - instancetype _objc_msgSend_153( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer inserts, - ffi.Pointer insertedObjects, - ffi.Pointer removes, - ffi.Pointer removedObjects, - ffi.Pointer changes, - ) { - return __objc_msgSend_153( - obj, - sel, - inserts, - insertedObjects, - removes, - removedObjects, - changes, - ); - } - - late final __objc_msgSend_153Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_153 = __objc_msgSend_153Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1 = - _registerName1( - "initWithInsertIndexes:insertedObjects:removeIndexes:removedObjects:"); - instancetype _objc_msgSend_154( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer inserts, - ffi.Pointer insertedObjects, - ffi.Pointer removes, - ffi.Pointer removedObjects, - ) { - return __objc_msgSend_154( - obj, - sel, - inserts, - insertedObjects, - removes, - removedObjects, - ); - } - - late final __objc_msgSend_154Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_154 = __objc_msgSend_154Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_insertions1 = _registerName1("insertions"); - late final _sel_removals1 = _registerName1("removals"); - late final _sel_hasChanges1 = _registerName1("hasChanges"); - late final _class_NSOrderedCollectionChange1 = - _getClass1("NSOrderedCollectionChange"); - late final _sel_changeWithObject_type_index_1 = - _registerName1("changeWithObject:type:index:"); - ffi.Pointer _objc_msgSend_155( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, + late final _atan2fPtr = + _lookup>( + 'atan2f'); + late final _atan2f = _atan2fPtr.asFunction(); + + double atan2( + double arg0, + double arg1, ) { - return __objc_msgSend_155( - obj, - sel, - anObject, - type, - index, + return _atan2( + arg0, + arg1, ); } - late final __objc_msgSend_155Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_155 = __objc_msgSend_155Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int)>(); + late final _atan2Ptr = + _lookup>( + 'atan2'); + late final _atan2 = _atan2Ptr.asFunction(); - late final _sel_changeWithObject_type_index_associatedIndex_1 = - _registerName1("changeWithObject:type:index:associatedIndex:"); - ffi.Pointer _objc_msgSend_156( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, - int associatedIndex, + double cosf( + double arg0, ) { - return __objc_msgSend_156( - obj, - sel, - anObject, - type, - index, - associatedIndex, + return _cosf( + arg0, ); } - late final __objc_msgSend_156Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSUInteger, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_156 = __objc_msgSend_156Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int, int)>(); + late final _cosfPtr = + _lookup>('cosf'); + late final _cosf = _cosfPtr.asFunction(); - late final _sel_object1 = _registerName1("object"); - late final _sel_changeType1 = _registerName1("changeType"); - int _objc_msgSend_157( - ffi.Pointer obj, - ffi.Pointer sel, + double cos( + double arg0, ) { - return __objc_msgSend_157( - obj, - sel, + return _cos( + arg0, ); } - late final __objc_msgSend_157Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_157 = __objc_msgSend_157Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _cosPtr = + _lookup>('cos'); + late final _cos = _cosPtr.asFunction(); - late final _sel_index1 = _registerName1("index"); - late final _sel_associatedIndex1 = _registerName1("associatedIndex"); - late final _sel_initWithObject_type_index_1 = - _registerName1("initWithObject:type:index:"); - instancetype _objc_msgSend_158( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, + double sinf( + double arg0, ) { - return __objc_msgSend_158( - obj, - sel, - anObject, - type, - index, + return _sinf( + arg0, ); } - late final __objc_msgSend_158Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_158 = __objc_msgSend_158Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + late final _sinfPtr = + _lookup>('sinf'); + late final _sinf = _sinfPtr.asFunction(); - late final _sel_initWithObject_type_index_associatedIndex_1 = - _registerName1("initWithObject:type:index:associatedIndex:"); - instancetype _objc_msgSend_159( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - int type, - int index, - int associatedIndex, + double sin( + double arg0, ) { - return __objc_msgSend_159( - obj, - sel, - anObject, - type, - index, - associatedIndex, + return _sin( + arg0, ); } - late final __objc_msgSend_159Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSUInteger, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_159 = __objc_msgSend_159Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, int)>(); + late final _sinPtr = + _lookup>('sin'); + late final _sin = _sinPtr.asFunction(); - late final _sel_differenceByTransformingChangesWithBlock_1 = - _registerName1("differenceByTransformingChangesWithBlock:"); - ffi.Pointer _objc_msgSend_160( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + double tanf( + double arg0, ) { - return __objc_msgSend_160( - obj, - sel, - block, + return _tanf( + arg0, ); } - late final __objc_msgSend_160Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_160 = __objc_msgSend_160Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + late final _tanfPtr = + _lookup>('tanf'); + late final _tanf = _tanfPtr.asFunction(); - late final _sel_inverseDifference1 = _registerName1("inverseDifference"); - late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_1 = - _registerName1("differenceFromArray:withOptions:usingEquivalenceTest:"); - ffi.Pointer _objc_msgSend_161( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - int options, - ffi.Pointer<_ObjCBlock> block, + double tan( + double arg0, ) { - return __objc_msgSend_161( - obj, - sel, - other, - options, - block, + return _tan( + arg0, ); } - late final __objc_msgSend_161Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_161 = __objc_msgSend_161Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_differenceFromArray_withOptions_1 = - _registerName1("differenceFromArray:withOptions:"); - ffi.Pointer _objc_msgSend_162( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - int options, + late final _tanPtr = + _lookup>('tan'); + late final _tan = _tanPtr.asFunction(); + + double acoshf( + double arg0, ) { - return __objc_msgSend_162( - obj, - sel, - other, - options, + return _acoshf( + arg0, ); } - late final __objc_msgSend_162Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_162 = __objc_msgSend_162Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); + late final _acoshfPtr = + _lookup>('acoshf'); + late final _acoshf = _acoshfPtr.asFunction(); - late final _sel_differenceFromArray_1 = - _registerName1("differenceFromArray:"); - ffi.Pointer _objc_msgSend_163( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, + double acosh( + double arg0, ) { - return __objc_msgSend_163( - obj, - sel, - other, + return _acosh( + arg0, ); } - late final __objc_msgSend_163Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_163 = __objc_msgSend_163Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _acoshPtr = + _lookup>('acosh'); + late final _acosh = _acoshPtr.asFunction(); - late final _sel_arrayByApplyingDifference_1 = - _registerName1("arrayByApplyingDifference:"); - ffi.Pointer _objc_msgSend_164( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer difference, + double asinhf( + double arg0, ) { - return __objc_msgSend_164( - obj, - sel, - difference, + return _asinhf( + arg0, ); } - late final __objc_msgSend_164Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_164 = __objc_msgSend_164Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _asinhfPtr = + _lookup>('asinhf'); + late final _asinhf = _asinhfPtr.asFunction(); - late final _sel_getObjects_1 = _registerName1("getObjects:"); - void _objc_msgSend_165( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, + double asinh( + double arg0, ) { - return __objc_msgSend_165( - obj, - sel, - objects, + return _asinh( + arg0, ); } - late final __objc_msgSend_165Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_165 = __objc_msgSend_165Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + late final _asinhPtr = + _lookup>('asinh'); + late final _asinh = _asinhPtr.asFunction(); - late final _sel_arrayWithContentsOfFile_1 = - _registerName1("arrayWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_166( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + double atanhf( + double arg0, ) { - return __objc_msgSend_166( - obj, - sel, - path, + return _atanhf( + arg0, ); } - late final __objc_msgSend_166Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_166 = __objc_msgSend_166Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _atanhfPtr = + _lookup>('atanhf'); + late final _atanhf = _atanhfPtr.asFunction(); - late final _sel_arrayWithContentsOfURL_1 = - _registerName1("arrayWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_167( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + double atanh( + double arg0, ) { - return __objc_msgSend_167( - obj, - sel, - url, + return _atanh( + arg0, ); } - late final __objc_msgSend_167Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_167 = __objc_msgSend_167Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _atanhPtr = + _lookup>('atanh'); + late final _atanh = _atanhPtr.asFunction(); - late final _sel_initWithContentsOfFile_1 = - _registerName1("initWithContentsOfFile:"); - late final _sel_initWithContentsOfURL_1 = - _registerName1("initWithContentsOfURL:"); - late final _sel_writeToURL_atomically_1 = - _registerName1("writeToURL:atomically:"); - bool _objc_msgSend_168( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - bool atomically, + double coshf( + double arg0, ) { - return __objc_msgSend_168( - obj, - sel, - url, - atomically, + return _coshf( + arg0, ); } - late final __objc_msgSend_168Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_168 = __objc_msgSend_168Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + late final _coshfPtr = + _lookup>('coshf'); + late final _coshf = _coshfPtr.asFunction(); - late final _sel_allKeys1 = _registerName1("allKeys"); - ffi.Pointer _objc_msgSend_169( - ffi.Pointer obj, - ffi.Pointer sel, + double cosh( + double arg0, ) { - return __objc_msgSend_169( - obj, - sel, + return _cosh( + arg0, ); } - late final __objc_msgSend_169Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_169 = __objc_msgSend_169Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _coshPtr = + _lookup>('cosh'); + late final _cosh = _coshPtr.asFunction(); - late final _sel_allKeysForObject_1 = _registerName1("allKeysForObject:"); - late final _sel_allValues1 = _registerName1("allValues"); - late final _sel_descriptionInStringsFileFormat1 = - _registerName1("descriptionInStringsFileFormat"); - late final _sel_isEqualToDictionary_1 = - _registerName1("isEqualToDictionary:"); - bool _objc_msgSend_170( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDictionary, + double sinhf( + double arg0, ) { - return __objc_msgSend_170( - obj, - sel, - otherDictionary, + return _sinhf( + arg0, ); } - late final __objc_msgSend_170Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_170 = __objc_msgSend_170Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _sinhfPtr = + _lookup>('sinhf'); + late final _sinhf = _sinhfPtr.asFunction(); - late final _sel_objectsForKeys_notFoundMarker_1 = - _registerName1("objectsForKeys:notFoundMarker:"); - ffi.Pointer _objc_msgSend_171( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer marker, - ) { - return __objc_msgSend_171( - obj, - sel, - keys, - marker, - ); - } - - late final __objc_msgSend_171Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_171 = __objc_msgSend_171Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_keysSortedByValueUsingSelector_1 = - _registerName1("keysSortedByValueUsingSelector:"); - late final _sel_getObjects_andKeys_count_1 = - _registerName1("getObjects:andKeys:count:"); - void _objc_msgSend_172( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, - int count, + double sinh( + double arg0, ) { - return __objc_msgSend_172( - obj, - sel, - objects, - keys, - count, + return _sinh( + arg0, ); } - late final __objc_msgSend_172Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_172 = __objc_msgSend_172Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); + late final _sinhPtr = + _lookup>('sinh'); + late final _sinh = _sinhPtr.asFunction(); - late final _sel_objectForKeyedSubscript_1 = - _registerName1("objectForKeyedSubscript:"); - late final _sel_enumerateKeysAndObjectsUsingBlock_1 = - _registerName1("enumerateKeysAndObjectsUsingBlock:"); - void _objc_msgSend_173( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + double tanhf( + double arg0, ) { - return __objc_msgSend_173( - obj, - sel, - block, + return _tanhf( + arg0, ); } - late final __objc_msgSend_173Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_173 = __objc_msgSend_173Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _tanhfPtr = + _lookup>('tanhf'); + late final _tanhf = _tanhfPtr.asFunction(); - late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_1 = - _registerName1("enumerateKeysAndObjectsWithOptions:usingBlock:"); - void _objc_msgSend_174( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> block, + double tanh( + double arg0, ) { - return __objc_msgSend_174( - obj, - sel, - opts, - block, + return _tanh( + arg0, ); } - late final __objc_msgSend_174Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_174 = __objc_msgSend_174Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + late final _tanhPtr = + _lookup>('tanh'); + late final _tanh = _tanhPtr.asFunction(); - late final _sel_keysSortedByValueUsingComparator_1 = - _registerName1("keysSortedByValueUsingComparator:"); - late final _sel_keysSortedByValueWithOptions_usingComparator_1 = - _registerName1("keysSortedByValueWithOptions:usingComparator:"); - late final _sel_keysOfEntriesPassingTest_1 = - _registerName1("keysOfEntriesPassingTest:"); - ffi.Pointer _objc_msgSend_175( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> predicate, + double expf( + double arg0, ) { - return __objc_msgSend_175( - obj, - sel, - predicate, + return _expf( + arg0, ); } - late final __objc_msgSend_175Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_175 = __objc_msgSend_175Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); + late final _expfPtr = + _lookup>('expf'); + late final _expf = _expfPtr.asFunction(); - late final _sel_keysOfEntriesWithOptions_passingTest_1 = - _registerName1("keysOfEntriesWithOptions:passingTest:"); - ffi.Pointer _objc_msgSend_176( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - ffi.Pointer<_ObjCBlock> predicate, + double exp( + double arg0, ) { - return __objc_msgSend_176( - obj, - sel, - opts, - predicate, + return _exp( + arg0, ); } - late final __objc_msgSend_176Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_176 = __objc_msgSend_176Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + late final _expPtr = + _lookup>('exp'); + late final _exp = _expPtr.asFunction(); - late final _sel_getObjects_andKeys_1 = _registerName1("getObjects:andKeys:"); - void _objc_msgSend_177( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> objects, - ffi.Pointer> keys, + double exp2f( + double arg0, ) { - return __objc_msgSend_177( - obj, - sel, - objects, - keys, + return _exp2f( + arg0, ); } - late final __objc_msgSend_177Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_177 = __objc_msgSend_177Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_dictionaryWithContentsOfFile_1 = - _registerName1("dictionaryWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_178( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_178( - obj, - sel, - path, + late final _exp2fPtr = + _lookup>('exp2f'); + late final _exp2f = _exp2fPtr.asFunction(); + + double exp2( + double arg0, + ) { + return _exp2( + arg0, ); } - late final __objc_msgSend_178Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_178 = __objc_msgSend_178Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _exp2Ptr = + _lookup>('exp2'); + late final _exp2 = _exp2Ptr.asFunction(); - late final _sel_dictionaryWithContentsOfURL_1 = - _registerName1("dictionaryWithContentsOfURL:"); - ffi.Pointer _objc_msgSend_179( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + double expm1f( + double arg0, ) { - return __objc_msgSend_179( - obj, - sel, - url, + return _expm1f( + arg0, ); } - late final __objc_msgSend_179Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_179 = __objc_msgSend_179Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _expm1fPtr = + _lookup>('expm1f'); + late final _expm1f = _expm1fPtr.asFunction(); - late final _sel_dictionary1 = _registerName1("dictionary"); - late final _sel_dictionaryWithObject_forKey_1 = - _registerName1("dictionaryWithObject:forKey:"); - instancetype _objc_msgSend_180( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - ffi.Pointer key, + double expm1( + double arg0, ) { - return __objc_msgSend_180( - obj, - sel, - object, - key, + return _expm1( + arg0, ); } - late final __objc_msgSend_180Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_180 = __objc_msgSend_180Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _expm1Ptr = + _lookup>('expm1'); + late final _expm1 = _expm1Ptr.asFunction(); - late final _sel_dictionaryWithObjects_forKeys_count_1 = - _registerName1("dictionaryWithObjects:forKeys:count:"); - late final _sel_dictionaryWithObjectsAndKeys_1 = - _registerName1("dictionaryWithObjectsAndKeys:"); - late final _sel_dictionaryWithDictionary_1 = - _registerName1("dictionaryWithDictionary:"); - instancetype _objc_msgSend_181( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dict, + double logf( + double arg0, ) { - return __objc_msgSend_181( - obj, - sel, - dict, + return _logf( + arg0, ); } - late final __objc_msgSend_181Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_181 = __objc_msgSend_181Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _logfPtr = + _lookup>('logf'); + late final _logf = _logfPtr.asFunction(); - late final _sel_dictionaryWithObjects_forKeys_1 = - _registerName1("dictionaryWithObjects:forKeys:"); - instancetype _objc_msgSend_182( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer keys, + double log( + double arg0, ) { - return __objc_msgSend_182( - obj, - sel, - objects, - keys, + return _log( + arg0, ); } - late final __objc_msgSend_182Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_182 = __objc_msgSend_182Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _logPtr = + _lookup>('log'); + late final _log = _logPtr.asFunction(); - late final _sel_initWithObjectsAndKeys_1 = - _registerName1("initWithObjectsAndKeys:"); - late final _sel_initWithDictionary_1 = _registerName1("initWithDictionary:"); - late final _sel_initWithDictionary_copyItems_1 = - _registerName1("initWithDictionary:copyItems:"); - instancetype _objc_msgSend_183( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDictionary, - bool flag, + double log10f( + double arg0, ) { - return __objc_msgSend_183( - obj, - sel, - otherDictionary, - flag, + return _log10f( + arg0, ); } - late final __objc_msgSend_183Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_183 = __objc_msgSend_183Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + late final _log10fPtr = + _lookup>('log10f'); + late final _log10f = _log10fPtr.asFunction(); - late final _sel_initWithObjects_forKeys_1 = - _registerName1("initWithObjects:forKeys:"); - ffi.Pointer _objc_msgSend_184( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer> error, + double log10( + double arg0, ) { - return __objc_msgSend_184( - obj, - sel, - url, - error, + return _log10( + arg0, ); } - late final __objc_msgSend_184Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_184 = __objc_msgSend_184Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_dictionaryWithContentsOfURL_error_1 = - _registerName1("dictionaryWithContentsOfURL:error:"); - late final _sel_sharedKeySetForKeys_1 = - _registerName1("sharedKeySetForKeys:"); - late final _sel_countByEnumeratingWithState_objects_count_1 = - _registerName1("countByEnumeratingWithState:objects:count:"); - int _objc_msgSend_185( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer state, - ffi.Pointer> buffer, - int len, + late final _log10Ptr = + _lookup>('log10'); + late final _log10 = _log10Ptr.asFunction(); + + double log2f( + double arg0, ) { - return __objc_msgSend_185( - obj, - sel, - state, - buffer, - len, + return _log2f( + arg0, ); } - late final __objc_msgSend_185Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_185 = __objc_msgSend_185Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int)>(); + late final _log2fPtr = + _lookup>('log2f'); + late final _log2f = _log2fPtr.asFunction(); - late final _sel_initWithDomain_code_userInfo_1 = - _registerName1("initWithDomain:code:userInfo:"); - instancetype _objc_msgSend_186( - ffi.Pointer obj, - ffi.Pointer sel, - NSErrorDomain domain, - int code, - ffi.Pointer dict, + double log2( + double arg0, ) { - return __objc_msgSend_186( - obj, - sel, - domain, - code, - dict, + return _log2( + arg0, ); } - late final __objc_msgSend_186Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSErrorDomain, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_186 = __objc_msgSend_186Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, int, ffi.Pointer)>(); + late final _log2Ptr = + _lookup>('log2'); + late final _log2 = _log2Ptr.asFunction(); - late final _sel_errorWithDomain_code_userInfo_1 = - _registerName1("errorWithDomain:code:userInfo:"); - late final _sel_domain1 = _registerName1("domain"); - late final _sel_code1 = _registerName1("code"); - late final _sel_userInfo1 = _registerName1("userInfo"); - ffi.Pointer _objc_msgSend_187( - ffi.Pointer obj, - ffi.Pointer sel, + double log1pf( + double arg0, ) { - return __objc_msgSend_187( - obj, - sel, + return _log1pf( + arg0, ); } - late final __objc_msgSend_187Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_187 = __objc_msgSend_187Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _log1pfPtr = + _lookup>('log1pf'); + late final _log1pf = _log1pfPtr.asFunction(); - late final _sel_localizedDescription1 = - _registerName1("localizedDescription"); - late final _sel_localizedFailureReason1 = - _registerName1("localizedFailureReason"); - late final _sel_localizedRecoverySuggestion1 = - _registerName1("localizedRecoverySuggestion"); - late final _sel_localizedRecoveryOptions1 = - _registerName1("localizedRecoveryOptions"); - ffi.Pointer _objc_msgSend_188( - ffi.Pointer obj, - ffi.Pointer sel, + double log1p( + double arg0, ) { - return __objc_msgSend_188( - obj, - sel, + return _log1p( + arg0, ); } - late final __objc_msgSend_188Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_188 = __objc_msgSend_188Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _log1pPtr = + _lookup>('log1p'); + late final _log1p = _log1pPtr.asFunction(); - late final _sel_recoveryAttempter1 = _registerName1("recoveryAttempter"); - late final _sel_helpAnchor1 = _registerName1("helpAnchor"); - late final _sel_underlyingErrors1 = _registerName1("underlyingErrors"); - late final _sel_setUserInfoValueProviderForDomain_provider_1 = - _registerName1("setUserInfoValueProviderForDomain:provider:"); - void _objc_msgSend_189( - ffi.Pointer obj, - ffi.Pointer sel, - NSErrorDomain errorDomain, - ffi.Pointer<_ObjCBlock> provider, + double logbf( + double arg0, ) { - return __objc_msgSend_189( - obj, - sel, - errorDomain, - provider, + return _logbf( + arg0, ); } - late final __objc_msgSend_189Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_189 = __objc_msgSend_189Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSErrorDomain, ffi.Pointer<_ObjCBlock>)>(); + late final _logbfPtr = + _lookup>('logbf'); + late final _logbf = _logbfPtr.asFunction(); - late final _sel_userInfoValueProviderForDomain_1 = - _registerName1("userInfoValueProviderForDomain:"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_190( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer err, - NSErrorUserInfoKey userInfoKey, - NSErrorDomain errorDomain, + double logb( + double arg0, ) { - return __objc_msgSend_190( - obj, - sel, - err, - userInfoKey, - errorDomain, - ); - } - - late final __objc_msgSend_190Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSErrorUserInfoKey, - NSErrorDomain)>>('objc_msgSend'); - late final __objc_msgSend_190 = __objc_msgSend_190Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSErrorUserInfoKey, - NSErrorDomain)>(); - - late final _sel_getResourceValue_forKey_error_1 = - _registerName1("getResourceValue:forKey:error:"); - bool _objc_msgSend_191( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> value, - NSURLResourceKey key, - ffi.Pointer> error, - ) { - return __objc_msgSend_191( - obj, - sel, - value, - key, - error, + return _logb( + arg0, ); } - late final __objc_msgSend_191Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSURLResourceKey, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_191 = __objc_msgSend_191Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - NSURLResourceKey, - ffi.Pointer>)>(); - - late final _sel_resourceValuesForKeys_error_1 = - _registerName1("resourceValuesForKeys:error:"); - ffi.Pointer _objc_msgSend_192( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer> error, - ) { - return __objc_msgSend_192( - obj, - sel, - keys, - error, + late final _logbPtr = + _lookup>('logb'); + late final _logb = _logbPtr.asFunction(); + + double modff( + double arg0, + ffi.Pointer arg1, + ) { + return _modff( + arg0, + arg1, ); } - late final __objc_msgSend_192Ptr = _lookup< + late final _modffPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_192 = __objc_msgSend_192Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + ffi.Float Function(ffi.Float, ffi.Pointer)>>('modff'); + late final _modff = + _modffPtr.asFunction)>(); - late final _sel_setResourceValue_forKey_error_1 = - _registerName1("setResourceValue:forKey:error:"); - bool _objc_msgSend_193( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - NSURLResourceKey key, - ffi.Pointer> error, + double modf( + double arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_193( - obj, - sel, - value, - key, - error, + return _modf( + arg0, + arg1, ); } - late final __objc_msgSend_193Ptr = _lookup< + late final _modfPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLResourceKey, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_193 = __objc_msgSend_193Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLResourceKey, - ffi.Pointer>)>(); - - late final _sel_setResourceValues_error_1 = - _registerName1("setResourceValues:error:"); - bool _objc_msgSend_194( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyedValues, - ffi.Pointer> error, - ) { - return __objc_msgSend_194( - obj, - sel, - keyedValues, - error, - ); - } + ffi.Double Function(ffi.Double, ffi.Pointer)>>('modf'); + late final _modf = + _modfPtr.asFunction)>(); - late final __objc_msgSend_194Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_194 = __objc_msgSend_194Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - late final _sel_removeCachedResourceValueForKey_1 = - _registerName1("removeCachedResourceValueForKey:"); - void _objc_msgSend_195( - ffi.Pointer obj, - ffi.Pointer sel, - NSURLResourceKey key, - ) { - return __objc_msgSend_195( - obj, - sel, - key, - ); - } - - late final __objc_msgSend_195Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSURLResourceKey)>>('objc_msgSend'); - late final __objc_msgSend_195 = __objc_msgSend_195Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, NSURLResourceKey)>(); - - late final _sel_removeAllCachedResourceValues1 = - _registerName1("removeAllCachedResourceValues"); - late final _sel_setTemporaryResourceValue_forKey_1 = - _registerName1("setTemporaryResourceValue:forKey:"); - void _objc_msgSend_196( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - NSURLResourceKey key, - ) { - return __objc_msgSend_196( - obj, - sel, - value, - key, + double ldexpf( + double arg0, + int arg1, + ) { + return _ldexpf( + arg0, + arg1, ); } - late final __objc_msgSend_196Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSURLResourceKey)>>('objc_msgSend'); - late final __objc_msgSend_196 = __objc_msgSend_196Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSURLResourceKey)>(); + late final _ldexpfPtr = + _lookup>( + 'ldexpf'); + late final _ldexpf = _ldexpfPtr.asFunction(); - late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1 = - _registerName1( - "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); - ffi.Pointer _objc_msgSend_197( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer keys, - ffi.Pointer relativeURL, - ffi.Pointer> error, + double ldexp( + double arg0, + int arg1, ) { - return __objc_msgSend_197( - obj, - sel, - options, - keys, - relativeURL, - error, + return _ldexp( + arg0, + arg1, ); } - late final __objc_msgSend_197Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_197 = __objc_msgSend_197Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - instancetype _objc_msgSend_198( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bookmarkData, - int options, - ffi.Pointer relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error, + late final _ldexpPtr = + _lookup>( + 'ldexp'); + late final _ldexp = _ldexpPtr.asFunction(); + + double frexpf( + double arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_198( - obj, - sel, - bookmarkData, - options, - relativeURL, - isStale, - error, + return _frexpf( + arg0, + arg1, ); } - late final __objc_msgSend_198Ptr = _lookup< + late final _frexpfPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_198 = __objc_msgSend_198Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1 = - _registerName1( - "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); - late final _sel_resourceValuesForKeys_fromBookmarkData_1 = - _registerName1("resourceValuesForKeys:fromBookmarkData:"); - ffi.Pointer _objc_msgSend_199( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keys, - ffi.Pointer bookmarkData, - ) { - return __objc_msgSend_199( - obj, - sel, - keys, - bookmarkData, - ); - } - - late final __objc_msgSend_199Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_199 = __objc_msgSend_199Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_writeBookmarkData_toURL_options_error_1 = - _registerName1("writeBookmarkData:toURL:options:error:"); - bool _objc_msgSend_200( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bookmarkData, - ffi.Pointer bookmarkFileURL, - int options, - ffi.Pointer> error, + ffi.Float Function(ffi.Float, ffi.Pointer)>>('frexpf'); + late final _frexpf = + _frexpfPtr.asFunction)>(); + + double frexp( + double arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_200( - obj, - sel, - bookmarkData, - bookmarkFileURL, - options, - error, + return _frexp( + arg0, + arg1, ); } - late final __objc_msgSend_200Ptr = _lookup< + late final _frexpPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSURLBookmarkFileCreationOptions, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_200 = __objc_msgSend_200Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); + ffi.Double Function(ffi.Double, ffi.Pointer)>>('frexp'); + late final _frexp = + _frexpPtr.asFunction)>(); - late final _sel_bookmarkDataWithContentsOfURL_error_1 = - _registerName1("bookmarkDataWithContentsOfURL:error:"); - ffi.Pointer _objc_msgSend_201( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bookmarkFileURL, - ffi.Pointer> error, + int ilogbf( + double arg0, ) { - return __objc_msgSend_201( - obj, - sel, - bookmarkFileURL, - error, + return _ilogbf( + arg0, ); } - late final __objc_msgSend_201Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_201 = __objc_msgSend_201Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); + late final _ilogbfPtr = + _lookup>('ilogbf'); + late final _ilogbf = _ilogbfPtr.asFunction(); - late final _sel_URLByResolvingAliasFileAtURL_options_error_1 = - _registerName1("URLByResolvingAliasFileAtURL:options:error:"); - instancetype _objc_msgSend_202( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int options, - ffi.Pointer> error, + int ilogb( + double arg0, ) { - return __objc_msgSend_202( - obj, - sel, - url, - options, - error, + return _ilogb( + arg0, ); } - late final __objc_msgSend_202Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_202 = __objc_msgSend_202Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_startAccessingSecurityScopedResource1 = - _registerName1("startAccessingSecurityScopedResource"); - late final _sel_stopAccessingSecurityScopedResource1 = - _registerName1("stopAccessingSecurityScopedResource"); - late final _sel_getPromisedItemResourceValue_forKey_error_1 = - _registerName1("getPromisedItemResourceValue:forKey:error:"); - late final _sel_promisedItemResourceValuesForKeys_error_1 = - _registerName1("promisedItemResourceValuesForKeys:error:"); - late final _sel_checkPromisedItemIsReachableAndReturnError_1 = - _registerName1("checkPromisedItemIsReachableAndReturnError:"); - bool _objc_msgSend_203( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> error, - ) { - return __objc_msgSend_203( - obj, - sel, - error, + late final _ilogbPtr = + _lookup>('ilogb'); + late final _ilogb = _ilogbPtr.asFunction(); + + double scalbnf( + double arg0, + int arg1, + ) { + return _scalbnf( + arg0, + arg1, ); } - late final __objc_msgSend_203Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_203 = __objc_msgSend_203Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + late final _scalbnfPtr = + _lookup>( + 'scalbnf'); + late final _scalbnf = _scalbnfPtr.asFunction(); - late final _sel_fileURLWithPathComponents_1 = - _registerName1("fileURLWithPathComponents:"); - ffi.Pointer _objc_msgSend_204( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer components, + double scalbn( + double arg0, + int arg1, ) { - return __objc_msgSend_204( - obj, - sel, - components, + return _scalbn( + arg0, + arg1, ); } - late final __objc_msgSend_204Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_204 = __objc_msgSend_204Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _scalbnPtr = + _lookup>( + 'scalbn'); + late final _scalbn = _scalbnPtr.asFunction(); - late final _sel_pathComponents1 = _registerName1("pathComponents"); - late final _sel_lastPathComponent1 = _registerName1("lastPathComponent"); - late final _sel_pathExtension1 = _registerName1("pathExtension"); - late final _sel_URLByAppendingPathComponent_1 = - _registerName1("URLByAppendingPathComponent:"); - ffi.Pointer _objc_msgSend_205( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pathComponent, + double scalblnf( + double arg0, + int arg1, ) { - return __objc_msgSend_205( - obj, - sel, - pathComponent, + return _scalblnf( + arg0, + arg1, ); } - late final __objc_msgSend_205Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_205 = __objc_msgSend_205Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _scalblnfPtr = + _lookup>( + 'scalblnf'); + late final _scalblnf = + _scalblnfPtr.asFunction(); - late final _sel_URLByAppendingPathComponent_isDirectory_1 = - _registerName1("URLByAppendingPathComponent:isDirectory:"); - ffi.Pointer _objc_msgSend_206( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer pathComponent, - bool isDirectory, + double scalbln( + double arg0, + int arg1, ) { - return __objc_msgSend_206( - obj, - sel, - pathComponent, - isDirectory, + return _scalbln( + arg0, + arg1, ); } - late final __objc_msgSend_206Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_206 = __objc_msgSend_206Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_URLByDeletingLastPathComponent1 = - _registerName1("URLByDeletingLastPathComponent"); - late final _sel_URLByAppendingPathExtension_1 = - _registerName1("URLByAppendingPathExtension:"); - late final _sel_URLByDeletingPathExtension1 = - _registerName1("URLByDeletingPathExtension"); - late final _sel_checkResourceIsReachableAndReturnError_1 = - _registerName1("checkResourceIsReachableAndReturnError:"); - late final _sel_URLByStandardizingPath1 = - _registerName1("URLByStandardizingPath"); - late final _sel_URLByResolvingSymlinksInPath1 = - _registerName1("URLByResolvingSymlinksInPath"); - late final _sel_resourceDataUsingCache_1 = - _registerName1("resourceDataUsingCache:"); - ffi.Pointer _objc_msgSend_207( - ffi.Pointer obj, - ffi.Pointer sel, - bool shouldUseCache, - ) { - return __objc_msgSend_207( - obj, - sel, - shouldUseCache, + late final _scalblnPtr = + _lookup>( + 'scalbln'); + late final _scalbln = _scalblnPtr.asFunction(); + + double fabsf( + double arg0, + ) { + return _fabsf( + arg0, ); } - late final __objc_msgSend_207Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_207 = __objc_msgSend_207Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + late final _fabsfPtr = + _lookup>('fabsf'); + late final _fabsf = _fabsfPtr.asFunction(); - late final _sel_loadResourceDataNotifyingClient_usingCache_1 = - _registerName1("loadResourceDataNotifyingClient:usingCache:"); - void _objc_msgSend_208( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer client, - bool shouldUseCache, + double fabs( + double arg0, ) { - return __objc_msgSend_208( - obj, - sel, - client, - shouldUseCache, + return _fabs( + arg0, ); } - late final __objc_msgSend_208Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_208 = __objc_msgSend_208Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + late final _fabsPtr = + _lookup>('fabs'); + late final _fabs = _fabsPtr.asFunction(); - late final _sel_propertyForKey_1 = _registerName1("propertyForKey:"); - late final _sel_setResourceData_1 = _registerName1("setResourceData:"); - late final _sel_setProperty_forKey_1 = _registerName1("setProperty:forKey:"); - bool _objc_msgSend_209( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer property, - ffi.Pointer propertyKey, + double cbrtf( + double arg0, ) { - return __objc_msgSend_209( - obj, - sel, - property, - propertyKey, + return _cbrtf( + arg0, ); } - late final __objc_msgSend_209Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_209 = __objc_msgSend_209Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLHandle1 = _getClass1("NSURLHandle"); - late final _sel_registerURLHandleClass_1 = - _registerName1("registerURLHandleClass:"); - void _objc_msgSend_210( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURLHandleSubclass, - ) { - return __objc_msgSend_210( - obj, - sel, - anURLHandleSubclass, + late final _cbrtfPtr = + _lookup>('cbrtf'); + late final _cbrtf = _cbrtfPtr.asFunction(); + + double cbrt( + double arg0, + ) { + return _cbrt( + arg0, ); } - late final __objc_msgSend_210Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_210 = __objc_msgSend_210Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _cbrtPtr = + _lookup>('cbrt'); + late final _cbrt = _cbrtPtr.asFunction(); - late final _sel_URLHandleClassForURL_1 = - _registerName1("URLHandleClassForURL:"); - ffi.Pointer _objc_msgSend_211( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, + double hypotf( + double arg0, + double arg1, ) { - return __objc_msgSend_211( - obj, - sel, - anURL, + return _hypotf( + arg0, + arg1, ); } - late final __objc_msgSend_211Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_211 = __objc_msgSend_211Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _hypotfPtr = + _lookup>( + 'hypotf'); + late final _hypotf = _hypotfPtr.asFunction(); - late final _sel_status1 = _registerName1("status"); - int _objc_msgSend_212( - ffi.Pointer obj, - ffi.Pointer sel, + double hypot( + double arg0, + double arg1, ) { - return __objc_msgSend_212( - obj, - sel, + return _hypot( + arg0, + arg1, ); } - late final __objc_msgSend_212Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_212 = __objc_msgSend_212Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_failureReason1 = _registerName1("failureReason"); - late final _sel_addClient_1 = _registerName1("addClient:"); - late final _sel_removeClient_1 = _registerName1("removeClient:"); - late final _sel_loadInBackground1 = _registerName1("loadInBackground"); - late final _sel_cancelLoadInBackground1 = - _registerName1("cancelLoadInBackground"); - late final _sel_resourceData1 = _registerName1("resourceData"); - late final _sel_availableResourceData1 = - _registerName1("availableResourceData"); - late final _sel_expectedResourceDataSize1 = - _registerName1("expectedResourceDataSize"); - late final _sel_flushCachedData1 = _registerName1("flushCachedData"); - late final _sel_backgroundLoadDidFailWithReason_1 = - _registerName1("backgroundLoadDidFailWithReason:"); - late final _sel_didLoadBytes_loadComplete_1 = - _registerName1("didLoadBytes:loadComplete:"); - void _objc_msgSend_213( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer newBytes, - bool yorn, - ) { - return __objc_msgSend_213( - obj, - sel, - newBytes, - yorn, + late final _hypotPtr = + _lookup>( + 'hypot'); + late final _hypot = _hypotPtr.asFunction(); + + double powf( + double arg0, + double arg1, + ) { + return _powf( + arg0, + arg1, ); } - late final __objc_msgSend_213Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_213 = __objc_msgSend_213Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + late final _powfPtr = + _lookup>( + 'powf'); + late final _powf = _powfPtr.asFunction(); - late final _sel_canInitWithURL_1 = _registerName1("canInitWithURL:"); - bool _objc_msgSend_214( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, + double pow( + double arg0, + double arg1, ) { - return __objc_msgSend_214( - obj, - sel, - anURL, + return _pow( + arg0, + arg1, ); } - late final __objc_msgSend_214Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_214 = __objc_msgSend_214Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _powPtr = + _lookup>( + 'pow'); + late final _pow = _powPtr.asFunction(); - late final _sel_cachedHandleForURL_1 = _registerName1("cachedHandleForURL:"); - ffi.Pointer _objc_msgSend_215( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, + double sqrtf( + double arg0, ) { - return __objc_msgSend_215( - obj, - sel, - anURL, + return _sqrtf( + arg0, ); } - late final __objc_msgSend_215Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_215 = __objc_msgSend_215Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _sqrtfPtr = + _lookup>('sqrtf'); + late final _sqrtf = _sqrtfPtr.asFunction(); - late final _sel_initWithURL_cached_1 = _registerName1("initWithURL:cached:"); - ffi.Pointer _objc_msgSend_216( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anURL, - bool willCache, + double sqrt( + double arg0, ) { - return __objc_msgSend_216( - obj, - sel, - anURL, - willCache, - ); - } - - late final __objc_msgSend_216Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_216 = __objc_msgSend_216Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, bool)>(); - - late final _sel_propertyForKeyIfAvailable_1 = - _registerName1("propertyForKeyIfAvailable:"); - late final _sel_writeProperty_forKey_1 = - _registerName1("writeProperty:forKey:"); - late final _sel_writeData_1 = _registerName1("writeData:"); - late final _sel_loadInForeground1 = _registerName1("loadInForeground"); - late final _sel_beginLoadInBackground1 = - _registerName1("beginLoadInBackground"); - late final _sel_endLoadInBackground1 = _registerName1("endLoadInBackground"); - late final _sel_URLHandleUsingCache_1 = - _registerName1("URLHandleUsingCache:"); - ffi.Pointer _objc_msgSend_217( - ffi.Pointer obj, - ffi.Pointer sel, - bool shouldUseCache, - ) { - return __objc_msgSend_217( - obj, - sel, - shouldUseCache, + return _sqrt( + arg0, ); } - late final __objc_msgSend_217Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_217 = __objc_msgSend_217Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, bool)>(); + late final _sqrtPtr = + _lookup>('sqrt'); + late final _sqrt = _sqrtPtr.asFunction(); - late final _sel_writeToFile_options_error_1 = - _registerName1("writeToFile:options:error:"); - bool _objc_msgSend_218( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - int writeOptionsMask, - ffi.Pointer> errorPtr, + double erff( + double arg0, ) { - return __objc_msgSend_218( - obj, - sel, - path, - writeOptionsMask, - errorPtr, + return _erff( + arg0, ); } - late final __objc_msgSend_218Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_218 = __objc_msgSend_218Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_writeToURL_options_error_1 = - _registerName1("writeToURL:options:error:"); - bool _objc_msgSend_219( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int writeOptionsMask, - ffi.Pointer> errorPtr, - ) { - return __objc_msgSend_219( - obj, - sel, - url, - writeOptionsMask, - errorPtr, - ); - } + late final _erffPtr = + _lookup>('erff'); + late final _erff = _erffPtr.asFunction(); - late final __objc_msgSend_219Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_219 = __objc_msgSend_219Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_rangeOfData_options_range_1 = - _registerName1("rangeOfData:options:range:"); - NSRange _objc_msgSend_220( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataToFind, - int mask, - NSRange searchRange, + double erf( + double arg0, ) { - return __objc_msgSend_220( - obj, - sel, - dataToFind, - mask, - searchRange, + return _erf( + arg0, ); } - late final __objc_msgSend_220Ptr = _lookup< - ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_220 = __objc_msgSend_220Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + late final _erfPtr = + _lookup>('erf'); + late final _erf = _erfPtr.asFunction(); - late final _sel_enumerateByteRangesUsingBlock_1 = - _registerName1("enumerateByteRangesUsingBlock:"); - void _objc_msgSend_221( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + double erfcf( + double arg0, ) { - return __objc_msgSend_221( - obj, - sel, - block, + return _erfcf( + arg0, ); } - late final __objc_msgSend_221Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_221 = __objc_msgSend_221Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _erfcfPtr = + _lookup>('erfcf'); + late final _erfcf = _erfcfPtr.asFunction(); - late final _sel_data1 = _registerName1("data"); - late final _sel_dataWithBytes_length_1 = - _registerName1("dataWithBytes:length:"); - instancetype _objc_msgSend_222( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, + double erfc( + double arg0, ) { - return __objc_msgSend_222( - obj, - sel, - bytes, - length, + return _erfc( + arg0, ); } - late final __objc_msgSend_222Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_222 = __objc_msgSend_222Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _erfcPtr = + _lookup>('erfc'); + late final _erfc = _erfcPtr.asFunction(); - late final _sel_dataWithBytesNoCopy_length_1 = - _registerName1("dataWithBytesNoCopy:length:"); - late final _sel_dataWithBytesNoCopy_length_freeWhenDone_1 = - _registerName1("dataWithBytesNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_223( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool b, + double lgammaf( + double arg0, ) { - return __objc_msgSend_223( - obj, - sel, - bytes, - length, - b, + return _lgammaf( + arg0, ); } - late final __objc_msgSend_223Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_223 = __objc_msgSend_223Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); + late final _lgammafPtr = + _lookup>('lgammaf'); + late final _lgammaf = _lgammafPtr.asFunction(); - late final _sel_dataWithContentsOfFile_options_error_1 = - _registerName1("dataWithContentsOfFile:options:error:"); - instancetype _objc_msgSend_224( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - int readOptionsMask, - ffi.Pointer> errorPtr, + double lgamma( + double arg0, ) { - return __objc_msgSend_224( - obj, - sel, - path, - readOptionsMask, - errorPtr, + return _lgamma( + arg0, ); } - late final __objc_msgSend_224Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_224 = __objc_msgSend_224Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_dataWithContentsOfURL_options_error_1 = - _registerName1("dataWithContentsOfURL:options:error:"); - instancetype _objc_msgSend_225( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int readOptionsMask, - ffi.Pointer> errorPtr, - ) { - return __objc_msgSend_225( - obj, - sel, - url, - readOptionsMask, - errorPtr, - ); - } + late final _lgammaPtr = + _lookup>('lgamma'); + late final _lgamma = _lgammaPtr.asFunction(); - late final __objc_msgSend_225Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_225 = __objc_msgSend_225Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_dataWithContentsOfFile_1 = - _registerName1("dataWithContentsOfFile:"); - late final _sel_dataWithContentsOfURL_1 = - _registerName1("dataWithContentsOfURL:"); - instancetype _objc_msgSend_226( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_226( - obj, - sel, - url, + double tgammaf( + double arg0, + ) { + return _tgammaf( + arg0, ); } - late final __objc_msgSend_226Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_226 = __objc_msgSend_226Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _tgammafPtr = + _lookup>('tgammaf'); + late final _tgammaf = _tgammafPtr.asFunction(); - late final _sel_initWithBytes_length_1 = - _registerName1("initWithBytes:length:"); - late final _sel_initWithBytesNoCopy_length_1 = - _registerName1("initWithBytesNoCopy:length:"); - late final _sel_initWithBytesNoCopy_length_freeWhenDone_1 = - _registerName1("initWithBytesNoCopy:length:freeWhenDone:"); - late final _sel_initWithBytesNoCopy_length_deallocator_1 = - _registerName1("initWithBytesNoCopy:length:deallocator:"); - instancetype _objc_msgSend_227( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - ffi.Pointer<_ObjCBlock> deallocator, + double tgamma( + double arg0, ) { - return __objc_msgSend_227( - obj, - sel, - bytes, - length, - deallocator, + return _tgamma( + arg0, ); } - late final __objc_msgSend_227Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_227 = __objc_msgSend_227Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_initWithContentsOfFile_options_error_1 = - _registerName1("initWithContentsOfFile:options:error:"); - late final _sel_initWithContentsOfURL_options_error_1 = - _registerName1("initWithContentsOfURL:options:error:"); - late final _sel_initWithData_1 = _registerName1("initWithData:"); - instancetype _objc_msgSend_228( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_228( - obj, - sel, - data, + late final _tgammaPtr = + _lookup>('tgamma'); + late final _tgamma = _tgammaPtr.asFunction(); + + double ceilf( + double arg0, + ) { + return _ceilf( + arg0, ); } - late final __objc_msgSend_228Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_228 = __objc_msgSend_228Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _ceilfPtr = + _lookup>('ceilf'); + late final _ceilf = _ceilfPtr.asFunction(); - late final _sel_dataWithData_1 = _registerName1("dataWithData:"); - late final _sel_initWithBase64EncodedString_options_1 = - _registerName1("initWithBase64EncodedString:options:"); - instancetype _objc_msgSend_229( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer base64String, - int options, + double ceil( + double arg0, ) { - return __objc_msgSend_229( - obj, - sel, - base64String, - options, + return _ceil( + arg0, ); } - late final __objc_msgSend_229Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_229 = __objc_msgSend_229Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _ceilPtr = + _lookup>('ceil'); + late final _ceil = _ceilPtr.asFunction(); - late final _sel_base64EncodedStringWithOptions_1 = - _registerName1("base64EncodedStringWithOptions:"); - ffi.Pointer _objc_msgSend_230( - ffi.Pointer obj, - ffi.Pointer sel, - int options, + double floorf( + double arg0, ) { - return __objc_msgSend_230( - obj, - sel, - options, + return _floorf( + arg0, ); } - late final __objc_msgSend_230Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_230 = __objc_msgSend_230Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _floorfPtr = + _lookup>('floorf'); + late final _floorf = _floorfPtr.asFunction(); - late final _sel_initWithBase64EncodedData_options_1 = - _registerName1("initWithBase64EncodedData:options:"); - instancetype _objc_msgSend_231( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer base64Data, - int options, + double floor( + double arg0, ) { - return __objc_msgSend_231( - obj, - sel, - base64Data, - options, + return _floor( + arg0, ); } - late final __objc_msgSend_231Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_231 = __objc_msgSend_231Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _floorPtr = + _lookup>('floor'); + late final _floor = _floorPtr.asFunction(); - late final _sel_base64EncodedDataWithOptions_1 = - _registerName1("base64EncodedDataWithOptions:"); - ffi.Pointer _objc_msgSend_232( - ffi.Pointer obj, - ffi.Pointer sel, - int options, + double nearbyintf( + double arg0, ) { - return __objc_msgSend_232( - obj, - sel, - options, + return _nearbyintf( + arg0, ); } - late final __objc_msgSend_232Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_232 = __objc_msgSend_232Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _nearbyintfPtr = + _lookup>('nearbyintf'); + late final _nearbyintf = _nearbyintfPtr.asFunction(); - late final _sel_decompressedDataUsingAlgorithm_error_1 = - _registerName1("decompressedDataUsingAlgorithm:error:"); - instancetype _objc_msgSend_233( - ffi.Pointer obj, - ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, + double nearbyint( + double arg0, ) { - return __objc_msgSend_233( - obj, - sel, - algorithm, - error, + return _nearbyint( + arg0, ); } - late final __objc_msgSend_233Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_233 = __objc_msgSend_233Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); - - late final _sel_compressedDataUsingAlgorithm_error_1 = - _registerName1("compressedDataUsingAlgorithm:error:"); - late final _sel_getBytes_1 = _registerName1("getBytes:"); - late final _sel_dataWithContentsOfMappedFile_1 = - _registerName1("dataWithContentsOfMappedFile:"); - late final _sel_initWithContentsOfMappedFile_1 = - _registerName1("initWithContentsOfMappedFile:"); - late final _sel_initWithBase64Encoding_1 = - _registerName1("initWithBase64Encoding:"); - late final _sel_base64Encoding1 = _registerName1("base64Encoding"); - late final _sel_characterSetWithBitmapRepresentation_1 = - _registerName1("characterSetWithBitmapRepresentation:"); - ffi.Pointer _objc_msgSend_234( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_234( - obj, - sel, - data, + late final _nearbyintPtr = + _lookup>('nearbyint'); + late final _nearbyint = _nearbyintPtr.asFunction(); + + double rintf( + double arg0, + ) { + return _rintf( + arg0, ); } - late final __objc_msgSend_234Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_234 = __objc_msgSend_234Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _rintfPtr = + _lookup>('rintf'); + late final _rintf = _rintfPtr.asFunction(); - late final _sel_characterSetWithContentsOfFile_1 = - _registerName1("characterSetWithContentsOfFile:"); - ffi.Pointer _objc_msgSend_235( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer fName, + double rint( + double arg0, ) { - return __objc_msgSend_235( - obj, - sel, - fName, + return _rint( + arg0, ); } - late final __objc_msgSend_235Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_235 = __objc_msgSend_235Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _rintPtr = + _lookup>('rint'); + late final _rint = _rintPtr.asFunction(); - instancetype _objc_msgSend_236( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer coder, + int lrintf( + double arg0, ) { - return __objc_msgSend_236( - obj, - sel, - coder, + return _lrintf( + arg0, ); } - late final __objc_msgSend_236Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_236 = __objc_msgSend_236Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _lrintfPtr = + _lookup>('lrintf'); + late final _lrintf = _lrintfPtr.asFunction(); - late final _sel_characterIsMember_1 = _registerName1("characterIsMember:"); - bool _objc_msgSend_237( - ffi.Pointer obj, - ffi.Pointer sel, - int aCharacter, + int lrint( + double arg0, ) { - return __objc_msgSend_237( - obj, - sel, - aCharacter, + return _lrint( + arg0, ); } - late final __objc_msgSend_237Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - unichar)>>('objc_msgSend'); - late final __objc_msgSend_237 = __objc_msgSend_237Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _lrintPtr = + _lookup>('lrint'); + late final _lrint = _lrintPtr.asFunction(); - late final _sel_bitmapRepresentation1 = - _registerName1("bitmapRepresentation"); - late final _sel_invertedSet1 = _registerName1("invertedSet"); - late final _sel_longCharacterIsMember_1 = - _registerName1("longCharacterIsMember:"); - bool _objc_msgSend_238( - ffi.Pointer obj, - ffi.Pointer sel, - int theLongChar, + double roundf( + double arg0, ) { - return __objc_msgSend_238( - obj, - sel, - theLongChar, + return _roundf( + arg0, ); } - late final __objc_msgSend_238Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - UTF32Char)>>('objc_msgSend'); - late final __objc_msgSend_238 = __objc_msgSend_238Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _roundfPtr = + _lookup>('roundf'); + late final _roundf = _roundfPtr.asFunction(); - late final _sel_isSupersetOfSet_1 = _registerName1("isSupersetOfSet:"); - bool _objc_msgSend_239( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer theOtherSet, + double round( + double arg0, ) { - return __objc_msgSend_239( - obj, - sel, - theOtherSet, + return _round( + arg0, ); } - late final __objc_msgSend_239Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_239 = __objc_msgSend_239Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _roundPtr = + _lookup>('round'); + late final _round = _roundPtr.asFunction(); - late final _sel_hasMemberInPlane_1 = _registerName1("hasMemberInPlane:"); - bool _objc_msgSend_240( - ffi.Pointer obj, - ffi.Pointer sel, - int thePlane, + int lroundf( + double arg0, ) { - return __objc_msgSend_240( - obj, - sel, - thePlane, + return _lroundf( + arg0, ); } - late final __objc_msgSend_240Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Uint8)>>('objc_msgSend'); - late final __objc_msgSend_240 = __objc_msgSend_240Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_URLUserAllowedCharacterSet1 = - _registerName1("URLUserAllowedCharacterSet"); - late final _sel_URLPasswordAllowedCharacterSet1 = - _registerName1("URLPasswordAllowedCharacterSet"); - late final _sel_URLHostAllowedCharacterSet1 = - _registerName1("URLHostAllowedCharacterSet"); - late final _sel_URLPathAllowedCharacterSet1 = - _registerName1("URLPathAllowedCharacterSet"); - late final _sel_URLQueryAllowedCharacterSet1 = - _registerName1("URLQueryAllowedCharacterSet"); - late final _sel_URLFragmentAllowedCharacterSet1 = - _registerName1("URLFragmentAllowedCharacterSet"); - late final _sel_rangeOfCharacterFromSet_1 = - _registerName1("rangeOfCharacterFromSet:"); - NSRange _objc_msgSend_241( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - ) { - return __objc_msgSend_241( - obj, - sel, - searchSet, + late final _lroundfPtr = + _lookup>('lroundf'); + late final _lroundf = _lroundfPtr.asFunction(); + + int lround( + double arg0, + ) { + return _lround( + arg0, ); } - late final __objc_msgSend_241Ptr = _lookup< - ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_241 = __objc_msgSend_241Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _lroundPtr = + _lookup>('lround'); + late final _lround = _lroundPtr.asFunction(); - late final _sel_rangeOfCharacterFromSet_options_1 = - _registerName1("rangeOfCharacterFromSet:options:"); - NSRange _objc_msgSend_242( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, + int llrintf( + double arg0, ) { - return __objc_msgSend_242( - obj, - sel, - searchSet, - mask, + return _llrintf( + arg0, ); } - late final __objc_msgSend_242Ptr = _lookup< - ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_242 = __objc_msgSend_242Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _llrintfPtr = + _lookup>('llrintf'); + late final _llrintf = _llrintfPtr.asFunction(); - late final _sel_rangeOfCharacterFromSet_options_range_1 = - _registerName1("rangeOfCharacterFromSet:options:range:"); - NSRange _objc_msgSend_243( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer searchSet, - int mask, - NSRange rangeOfReceiverToSearch, + int llrint( + double arg0, ) { - return __objc_msgSend_243( - obj, - sel, - searchSet, - mask, - rangeOfReceiverToSearch, + return _llrint( + arg0, ); } - late final __objc_msgSend_243Ptr = _lookup< - ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_243 = __objc_msgSend_243Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange)>(); + late final _llrintPtr = + _lookup>('llrint'); + late final _llrint = _llrintPtr.asFunction(); - late final _sel_rangeOfComposedCharacterSequenceAtIndex_1 = - _registerName1("rangeOfComposedCharacterSequenceAtIndex:"); - NSRange _objc_msgSend_244( - ffi.Pointer obj, - ffi.Pointer sel, - int index, + int llroundf( + double arg0, ) { - return __objc_msgSend_244( - obj, - sel, - index, + return _llroundf( + arg0, ); } - late final __objc_msgSend_244Ptr = _lookup< - ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_244 = __objc_msgSend_244Ptr.asFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _llroundfPtr = + _lookup>('llroundf'); + late final _llroundf = _llroundfPtr.asFunction(); - late final _sel_rangeOfComposedCharacterSequencesForRange_1 = - _registerName1("rangeOfComposedCharacterSequencesForRange:"); - NSRange _objc_msgSend_245( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, + int llround( + double arg0, ) { - return __objc_msgSend_245( - obj, - sel, - range, + return _llround( + arg0, ); } - late final __objc_msgSend_245Ptr = _lookup< - ffi.NativeFunction< - NSRange Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_245 = __objc_msgSend_245Ptr.asFunction< - NSRange Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); - - late final _sel_stringByAppendingString_1 = - _registerName1("stringByAppendingString:"); - late final _sel_stringByAppendingFormat_1 = - _registerName1("stringByAppendingFormat:"); - late final _sel_uppercaseString1 = _registerName1("uppercaseString"); - late final _sel_lowercaseString1 = _registerName1("lowercaseString"); - late final _sel_capitalizedString1 = _registerName1("capitalizedString"); - late final _sel_localizedUppercaseString1 = - _registerName1("localizedUppercaseString"); - late final _sel_localizedLowercaseString1 = - _registerName1("localizedLowercaseString"); - late final _sel_localizedCapitalizedString1 = - _registerName1("localizedCapitalizedString"); - late final _sel_uppercaseStringWithLocale_1 = - _registerName1("uppercaseStringWithLocale:"); - ffi.Pointer _objc_msgSend_246( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer locale, - ) { - return __objc_msgSend_246( - obj, - sel, - locale, + late final _llroundPtr = + _lookup>('llround'); + late final _llround = _llroundPtr.asFunction(); + + double truncf( + double arg0, + ) { + return _truncf( + arg0, ); } - late final __objc_msgSend_246Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_246 = __objc_msgSend_246Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _truncfPtr = + _lookup>('truncf'); + late final _truncf = _truncfPtr.asFunction(); - late final _sel_lowercaseStringWithLocale_1 = - _registerName1("lowercaseStringWithLocale:"); - late final _sel_capitalizedStringWithLocale_1 = - _registerName1("capitalizedStringWithLocale:"); - late final _sel_getLineStart_end_contentsEnd_forRange_1 = - _registerName1("getLineStart:end:contentsEnd:forRange:"); - void _objc_msgSend_247( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - NSRange range, + double trunc( + double arg0, ) { - return __objc_msgSend_247( - obj, - sel, - startPtr, - lineEndPtr, - contentsEndPtr, - range, + return _trunc( + arg0, ); } - late final __objc_msgSend_247Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_247 = __objc_msgSend_247Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSRange)>(); - - late final _sel_lineRangeForRange_1 = _registerName1("lineRangeForRange:"); - late final _sel_getParagraphStart_end_contentsEnd_forRange_1 = - _registerName1("getParagraphStart:end:contentsEnd:forRange:"); - late final _sel_paragraphRangeForRange_1 = - _registerName1("paragraphRangeForRange:"); - late final _sel_enumerateSubstringsInRange_options_usingBlock_1 = - _registerName1("enumerateSubstringsInRange:options:usingBlock:"); - void _objc_msgSend_248( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - int opts, - ffi.Pointer<_ObjCBlock> block, + late final _truncPtr = + _lookup>('trunc'); + late final _trunc = _truncPtr.asFunction(); + + double fmodf( + double arg0, + double arg1, ) { - return __objc_msgSend_248( - obj, - sel, - range, - opts, - block, + return _fmodf( + arg0, + arg1, ); } - late final __objc_msgSend_248Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Int32, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_248 = __objc_msgSend_248Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, int, - ffi.Pointer<_ObjCBlock>)>(); + late final _fmodfPtr = + _lookup>( + 'fmodf'); + late final _fmodf = _fmodfPtr.asFunction(); - late final _sel_enumerateLinesUsingBlock_1 = - _registerName1("enumerateLinesUsingBlock:"); - void _objc_msgSend_249( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + double fmod( + double arg0, + double arg1, ) { - return __objc_msgSend_249( - obj, - sel, - block, + return _fmod( + arg0, + arg1, ); } - late final __objc_msgSend_249Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_249 = __objc_msgSend_249Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + late final _fmodPtr = + _lookup>( + 'fmod'); + late final _fmod = _fmodPtr.asFunction(); - late final _sel_UTF8String1 = _registerName1("UTF8String"); - late final _sel_fastestEncoding1 = _registerName1("fastestEncoding"); - late final _sel_smallestEncoding1 = _registerName1("smallestEncoding"); - late final _sel_dataUsingEncoding_allowLossyConversion_1 = - _registerName1("dataUsingEncoding:allowLossyConversion:"); - ffi.Pointer _objc_msgSend_250( - ffi.Pointer obj, - ffi.Pointer sel, - int encoding, - bool lossy, + double remainderf( + double arg0, + double arg1, ) { - return __objc_msgSend_250( - obj, - sel, - encoding, - lossy, + return _remainderf( + arg0, + arg1, ); } - late final __objc_msgSend_250Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSStringEncoding, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_250 = __objc_msgSend_250Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, bool)>(); + late final _remainderfPtr = + _lookup>( + 'remainderf'); + late final _remainderf = + _remainderfPtr.asFunction(); - late final _sel_dataUsingEncoding_1 = _registerName1("dataUsingEncoding:"); - ffi.Pointer _objc_msgSend_251( - ffi.Pointer obj, - ffi.Pointer sel, - int encoding, + double remainder( + double arg0, + double arg1, ) { - return __objc_msgSend_251( - obj, - sel, - encoding, + return _remainder( + arg0, + arg1, ); } - late final __objc_msgSend_251Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_251 = __objc_msgSend_251Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _remainderPtr = + _lookup>( + 'remainder'); + late final _remainder = + _remainderPtr.asFunction(); - late final _sel_canBeConvertedToEncoding_1 = - _registerName1("canBeConvertedToEncoding:"); - late final _sel_cStringUsingEncoding_1 = - _registerName1("cStringUsingEncoding:"); - ffi.Pointer _objc_msgSend_252( - ffi.Pointer obj, - ffi.Pointer sel, - int encoding, + double remquof( + double arg0, + double arg1, + ffi.Pointer arg2, ) { - return __objc_msgSend_252( - obj, - sel, - encoding, + return _remquof( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_252Ptr = _lookup< + late final _remquofPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_252 = __objc_msgSend_252Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Float Function( + ffi.Float, ffi.Float, ffi.Pointer)>>('remquof'); + late final _remquof = _remquofPtr + .asFunction)>(); - late final _sel_getCString_maxLength_encoding_1 = - _registerName1("getCString:maxLength:encoding:"); - bool _objc_msgSend_253( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - int encoding, + double remquo( + double arg0, + double arg1, + ffi.Pointer arg2, ) { - return __objc_msgSend_253( - obj, - sel, - buffer, - maxBufferCount, - encoding, + return _remquo( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_253Ptr = _lookup< + late final _remquoPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_253 = __objc_msgSend_253Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); - - late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1 = - _registerName1( - "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); - bool _objc_msgSend_254( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, - NSRange range, - NSRangePointer leftover, + ffi.Double Function( + ffi.Double, ffi.Double, ffi.Pointer)>>('remquo'); + late final _remquo = _remquoPtr + .asFunction)>(); + + double copysignf( + double arg0, + double arg1, ) { - return __objc_msgSend_254( - obj, - sel, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover, + return _copysignf( + arg0, + arg1, ); } - late final __objc_msgSend_254Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - NSStringEncoding, - ffi.Int32, - NSRange, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_254 = __objc_msgSend_254Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - int, - NSRange, - NSRangePointer)>(); - - late final _sel_maximumLengthOfBytesUsingEncoding_1 = - _registerName1("maximumLengthOfBytesUsingEncoding:"); - late final _sel_lengthOfBytesUsingEncoding_1 = - _registerName1("lengthOfBytesUsingEncoding:"); - late final _sel_availableStringEncodings1 = - _registerName1("availableStringEncodings"); - ffi.Pointer _objc_msgSend_255( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_255( - obj, - sel, - ); - } + late final _copysignfPtr = + _lookup>( + 'copysignf'); + late final _copysignf = + _copysignfPtr.asFunction(); - late final __objc_msgSend_255Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_255 = __objc_msgSend_255Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_localizedNameOfStringEncoding_1 = - _registerName1("localizedNameOfStringEncoding:"); - late final _sel_defaultCStringEncoding1 = - _registerName1("defaultCStringEncoding"); - late final _sel_decomposedStringWithCanonicalMapping1 = - _registerName1("decomposedStringWithCanonicalMapping"); - late final _sel_precomposedStringWithCanonicalMapping1 = - _registerName1("precomposedStringWithCanonicalMapping"); - late final _sel_decomposedStringWithCompatibilityMapping1 = - _registerName1("decomposedStringWithCompatibilityMapping"); - late final _sel_precomposedStringWithCompatibilityMapping1 = - _registerName1("precomposedStringWithCompatibilityMapping"); - late final _sel_componentsSeparatedByString_1 = - _registerName1("componentsSeparatedByString:"); - ffi.Pointer _objc_msgSend_256( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer separator, - ) { - return __objc_msgSend_256( - obj, - sel, - separator, + double copysign( + double arg0, + double arg1, + ) { + return _copysign( + arg0, + arg1, ); } - late final __objc_msgSend_256Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_256 = __objc_msgSend_256Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _copysignPtr = + _lookup>( + 'copysign'); + late final _copysign = + _copysignPtr.asFunction(); - late final _sel_componentsSeparatedByCharactersInSet_1 = - _registerName1("componentsSeparatedByCharactersInSet:"); - ffi.Pointer _objc_msgSend_257( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer separator, + double nanf( + ffi.Pointer arg0, ) { - return __objc_msgSend_257( - obj, - sel, - separator, + return _nanf( + arg0, ); } - late final __objc_msgSend_257Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_257 = __objc_msgSend_257Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _nanfPtr = + _lookup)>>( + 'nanf'); + late final _nanf = + _nanfPtr.asFunction)>(); - late final _sel_stringByTrimmingCharactersInSet_1 = - _registerName1("stringByTrimmingCharactersInSet:"); - ffi.Pointer _objc_msgSend_258( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer set1, + double nan( + ffi.Pointer arg0, ) { - return __objc_msgSend_258( - obj, - sel, - set1, + return _nan( + arg0, ); } - late final __objc_msgSend_258Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_258 = __objc_msgSend_258Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _nanPtr = + _lookup)>>( + 'nan'); + late final _nan = + _nanPtr.asFunction)>(); - late final _sel_stringByPaddingToLength_withString_startingAtIndex_1 = - _registerName1("stringByPaddingToLength:withString:startingAtIndex:"); - ffi.Pointer _objc_msgSend_259( - ffi.Pointer obj, - ffi.Pointer sel, - int newLength, - ffi.Pointer padString, - int padIndex, + double nextafterf( + double arg0, + double arg1, ) { - return __objc_msgSend_259( - obj, - sel, - newLength, - padString, - padIndex, + return _nextafterf( + arg0, + arg1, ); } - late final __objc_msgSend_259Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_259 = __objc_msgSend_259Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); + late final _nextafterfPtr = + _lookup>( + 'nextafterf'); + late final _nextafterf = + _nextafterfPtr.asFunction(); - late final _sel_stringByFoldingWithOptions_locale_1 = - _registerName1("stringByFoldingWithOptions:locale:"); - ffi.Pointer _objc_msgSend_260( - ffi.Pointer obj, - ffi.Pointer sel, - int options, - ffi.Pointer locale, + double nextafter( + double arg0, + double arg1, ) { - return __objc_msgSend_260( - obj, - sel, - options, - locale, + return _nextafter( + arg0, + arg1, ); } - late final __objc_msgSend_260Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_260 = __objc_msgSend_260Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer)>(); + late final _nextafterPtr = + _lookup>( + 'nextafter'); + late final _nextafter = + _nextafterPtr.asFunction(); - late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_1 = - _registerName1( - "stringByReplacingOccurrencesOfString:withString:options:range:"); - ffi.Pointer _objc_msgSend_261( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - NSRange searchRange, + double fdimf( + double arg0, + double arg1, ) { - return __objc_msgSend_261( - obj, - sel, - target, - replacement, - options, - searchRange, + return _fdimf( + arg0, + arg1, ); } - late final __objc_msgSend_261Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_261 = __objc_msgSend_261Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - NSRange)>(); + late final _fdimfPtr = + _lookup>( + 'fdimf'); + late final _fdimf = _fdimfPtr.asFunction(); - late final _sel_stringByReplacingOccurrencesOfString_withString_1 = - _registerName1("stringByReplacingOccurrencesOfString:withString:"); - ffi.Pointer _objc_msgSend_262( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, + double fdim( + double arg0, + double arg1, ) { - return __objc_msgSend_262( - obj, - sel, - target, - replacement, + return _fdim( + arg0, + arg1, ); } - late final __objc_msgSend_262Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_262 = __objc_msgSend_262Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _fdimPtr = + _lookup>( + 'fdim'); + late final _fdim = _fdimPtr.asFunction(); - late final _sel_stringByReplacingCharactersInRange_withString_1 = - _registerName1("stringByReplacingCharactersInRange:withString:"); - ffi.Pointer _objc_msgSend_263( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - ffi.Pointer replacement, + double fmaxf( + double arg0, + double arg1, ) { - return __objc_msgSend_263( - obj, - sel, - range, - replacement, + return _fmaxf( + arg0, + arg1, ); } - late final __objc_msgSend_263Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSRange, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_263 = __objc_msgSend_263Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange, ffi.Pointer)>(); + late final _fmaxfPtr = + _lookup>( + 'fmaxf'); + late final _fmaxf = _fmaxfPtr.asFunction(); - late final _sel_stringByApplyingTransform_reverse_1 = - _registerName1("stringByApplyingTransform:reverse:"); - ffi.Pointer _objc_msgSend_264( - ffi.Pointer obj, - ffi.Pointer sel, - NSStringTransform transform, - bool reverse, + double fmax( + double arg0, + double arg1, ) { - return __objc_msgSend_264( - obj, - sel, - transform, - reverse, + return _fmax( + arg0, + arg1, ); } - late final __objc_msgSend_264Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSStringTransform, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_264 = __objc_msgSend_264Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringTransform, bool)>(); + late final _fmaxPtr = + _lookup>( + 'fmax'); + late final _fmax = _fmaxPtr.asFunction(); - late final _sel_writeToURL_atomically_encoding_error_1 = - _registerName1("writeToURL:atomically:encoding:error:"); - bool _objc_msgSend_265( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error, + double fminf( + double arg0, + double arg1, ) { - return __objc_msgSend_265( - obj, - sel, - url, - useAuxiliaryFile, - enc, - error, + return _fminf( + arg0, + arg1, ); } - late final __objc_msgSend_265Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_265 = __objc_msgSend_265Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); - - late final _sel_writeToFile_atomically_encoding_error_1 = - _registerName1("writeToFile:atomically:encoding:error:"); - bool _objc_msgSend_266( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_266( - obj, - sel, - path, - useAuxiliaryFile, - enc, - error, - ); - } + late final _fminfPtr = + _lookup>( + 'fminf'); + late final _fminf = _fminfPtr.asFunction(); - late final __objc_msgSend_266Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_266 = __objc_msgSend_266Ptr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); - - late final _sel_initWithCharactersNoCopy_length_freeWhenDone_1 = - _registerName1("initWithCharactersNoCopy:length:freeWhenDone:"); - instancetype _objc_msgSend_267( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer characters, - int length, - bool freeBuffer, + double fmin( + double arg0, + double arg1, ) { - return __objc_msgSend_267( - obj, - sel, - characters, - length, - freeBuffer, + return _fmin( + arg0, + arg1, ); } - late final __objc_msgSend_267Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_267 = __objc_msgSend_267Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, bool)>(); + late final _fminPtr = + _lookup>( + 'fmin'); + late final _fmin = _fminPtr.asFunction(); - late final _sel_initWithCharactersNoCopy_length_deallocator_1 = - _registerName1("initWithCharactersNoCopy:length:deallocator:"); - instancetype _objc_msgSend_268( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer chars, - int len, - ffi.Pointer<_ObjCBlock> deallocator, + double fmaf( + double arg0, + double arg1, + double arg2, ) { - return __objc_msgSend_268( - obj, - sel, - chars, - len, - deallocator, + return _fmaf( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_268Ptr = _lookup< + late final _fmafPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_268 = __objc_msgSend_268Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); + ffi.Float Function(ffi.Float, ffi.Float, ffi.Float)>>('fmaf'); + late final _fmaf = + _fmafPtr.asFunction(); - late final _sel_initWithCharacters_length_1 = - _registerName1("initWithCharacters:length:"); - instancetype _objc_msgSend_269( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer characters, - int length, + double fma( + double arg0, + double arg1, + double arg2, ) { - return __objc_msgSend_269( - obj, - sel, - characters, - length, + return _fma( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_269Ptr = _lookup< + late final _fmaPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_269 = __objc_msgSend_269Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Double Function(ffi.Double, ffi.Double, ffi.Double)>>('fma'); + late final _fma = + _fmaPtr.asFunction(); - late final _sel_initWithUTF8String_1 = _registerName1("initWithUTF8String:"); - instancetype _objc_msgSend_270( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer nullTerminatedCString, + double __exp10f( + double arg0, ) { - return __objc_msgSend_270( - obj, - sel, - nullTerminatedCString, + return ___exp10f( + arg0, ); } - late final __objc_msgSend_270Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_270 = __objc_msgSend_270Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final ___exp10fPtr = + _lookup>('__exp10f'); + late final ___exp10f = ___exp10fPtr.asFunction(); - late final _sel_initWithFormat_1 = _registerName1("initWithFormat:"); - late final _sel_initWithFormat_arguments_1 = - _registerName1("initWithFormat:arguments:"); - instancetype _objc_msgSend_271( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - va_list argList, + double __exp10( + double arg0, ) { - return __objc_msgSend_271( - obj, - sel, - format, - argList, + return ___exp10( + arg0, ); } - late final __objc_msgSend_271Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, va_list)>>('objc_msgSend'); - late final __objc_msgSend_271 = __objc_msgSend_271Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, va_list)>(); + late final ___exp10Ptr = + _lookup>('__exp10'); + late final ___exp10 = ___exp10Ptr.asFunction(); - late final _sel_initWithFormat_locale_1 = - _registerName1("initWithFormat:locale:"); - instancetype _objc_msgSend_272( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, + double __cospif( + double arg0, ) { - return __objc_msgSend_272( - obj, - sel, - format, - locale, + return ___cospif( + arg0, ); } - late final __objc_msgSend_272Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_272 = __objc_msgSend_272Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final ___cospifPtr = + _lookup>('__cospif'); + late final ___cospif = ___cospifPtr.asFunction(); - late final _sel_initWithFormat_locale_arguments_1 = - _registerName1("initWithFormat:locale:arguments:"); - instancetype _objc_msgSend_273( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer locale, - va_list argList, + double __cospi( + double arg0, ) { - return __objc_msgSend_273( - obj, - sel, - format, - locale, - argList, + return ___cospi( + arg0, ); } - late final __objc_msgSend_273Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - va_list)>>('objc_msgSend'); - late final __objc_msgSend_273 = __objc_msgSend_273Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, va_list)>(); + late final ___cospiPtr = + _lookup>('__cospi'); + late final ___cospi = ___cospiPtr.asFunction(); - late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_1 = - _registerName1("initWithValidatedFormat:validFormatSpecifiers:error:"); - instancetype _objc_msgSend_274( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer> error, + double __sinpif( + double arg0, ) { - return __objc_msgSend_274( - obj, - sel, - format, - validFormatSpecifiers, - error, + return ___sinpif( + arg0, ); } - late final __objc_msgSend_274Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_274 = __objc_msgSend_274Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1 = - _registerName1( - "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); - instancetype _objc_msgSend_275( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer locale, - ffi.Pointer> error, - ) { - return __objc_msgSend_275( - obj, - sel, - format, - validFormatSpecifiers, - locale, - error, - ); - } + late final ___sinpifPtr = + _lookup>('__sinpif'); + late final ___sinpif = ___sinpifPtr.asFunction(); - late final __objc_msgSend_275Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_275 = __objc_msgSend_275Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1 = - _registerName1( - "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); - instancetype _objc_msgSend_276( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - va_list argList, - ffi.Pointer> error, - ) { - return __objc_msgSend_276( - obj, - sel, - format, - validFormatSpecifiers, - argList, - error, + double __sinpi( + double arg0, + ) { + return ___sinpi( + arg0, ); } - late final __objc_msgSend_276Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - va_list, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_276 = __objc_msgSend_276Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - va_list, - ffi.Pointer>)>(); - - late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1 = - _registerName1( - "initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:"); - instancetype _objc_msgSend_277( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer format, - ffi.Pointer validFormatSpecifiers, - ffi.Pointer locale, - va_list argList, - ffi.Pointer> error, - ) { - return __objc_msgSend_277( - obj, - sel, - format, - validFormatSpecifiers, - locale, - argList, - error, - ); - } + late final ___sinpiPtr = + _lookup>('__sinpi'); + late final ___sinpi = ___sinpiPtr.asFunction(); - late final __objc_msgSend_277Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - va_list, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_277 = __objc_msgSend_277Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - va_list, - ffi.Pointer>)>(); - - late final _sel_initWithData_encoding_1 = - _registerName1("initWithData:encoding:"); - instancetype _objc_msgSend_278( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - int encoding, + double __tanpif( + double arg0, ) { - return __objc_msgSend_278( - obj, - sel, - data, - encoding, + return ___tanpif( + arg0, ); } - late final __objc_msgSend_278Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_278 = __objc_msgSend_278Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final ___tanpifPtr = + _lookup>('__tanpif'); + late final ___tanpif = ___tanpifPtr.asFunction(); - late final _sel_initWithBytes_length_encoding_1 = - _registerName1("initWithBytes:length:encoding:"); - instancetype _objc_msgSend_279( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, + double __tanpi( + double arg0, ) { - return __objc_msgSend_279( - obj, - sel, - bytes, - len, - encoding, + return ___tanpi( + arg0, ); } - late final __objc_msgSend_279Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_279 = __objc_msgSend_279Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + late final ___tanpiPtr = + _lookup>('__tanpi'); + late final ___tanpi = ___tanpiPtr.asFunction(); - late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1 = - _registerName1("initWithBytesNoCopy:length:encoding:freeWhenDone:"); - instancetype _objc_msgSend_280( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - bool freeBuffer, + __float2 __sincosf_stret( + double arg0, ) { - return __objc_msgSend_280( - obj, - sel, - bytes, - len, - encoding, - freeBuffer, + return ___sincosf_stret( + arg0, ); } - late final __objc_msgSend_280Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_280 = __objc_msgSend_280Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, bool)>(); - - late final _sel_initWithBytesNoCopy_length_encoding_deallocator_1 = - _registerName1("initWithBytesNoCopy:length:encoding:deallocator:"); - instancetype _objc_msgSend_281( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int len, - int encoding, - ffi.Pointer<_ObjCBlock> deallocator, + late final ___sincosf_stretPtr = + _lookup>( + '__sincosf_stret'); + late final ___sincosf_stret = + ___sincosf_stretPtr.asFunction<__float2 Function(double)>(); + + __double2 __sincos_stret( + double arg0, ) { - return __objc_msgSend_281( - obj, - sel, - bytes, - len, - encoding, - deallocator, + return ___sincos_stret( + arg0, ); } - late final __objc_msgSend_281Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSStringEncoding, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_281 = __objc_msgSend_281Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_string1 = _registerName1("string"); - late final _sel_stringWithString_1 = _registerName1("stringWithString:"); - late final _sel_stringWithCharacters_length_1 = - _registerName1("stringWithCharacters:length:"); - late final _sel_stringWithUTF8String_1 = - _registerName1("stringWithUTF8String:"); - late final _sel_stringWithFormat_1 = _registerName1("stringWithFormat:"); - late final _sel_localizedStringWithFormat_1 = - _registerName1("localizedStringWithFormat:"); - late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_1 = - _registerName1("stringWithValidatedFormat:validFormatSpecifiers:error:"); - late final _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1 = - _registerName1( - "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); - late final _sel_initWithCString_encoding_1 = - _registerName1("initWithCString:encoding:"); - instancetype _objc_msgSend_282( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer nullTerminatedCString, - int encoding, + late final ___sincos_stretPtr = + _lookup>( + '__sincos_stret'); + late final ___sincos_stret = + ___sincos_stretPtr.asFunction<__double2 Function(double)>(); + + __float2 __sincospif_stret( + double arg0, ) { - return __objc_msgSend_282( - obj, - sel, - nullTerminatedCString, - encoding, + return ___sincospif_stret( + arg0, ); } - late final __objc_msgSend_282Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_282 = __objc_msgSend_282Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final ___sincospif_stretPtr = + _lookup>( + '__sincospif_stret'); + late final ___sincospif_stret = + ___sincospif_stretPtr.asFunction<__float2 Function(double)>(); - late final _sel_stringWithCString_encoding_1 = - _registerName1("stringWithCString:encoding:"); - late final _sel_initWithContentsOfURL_encoding_error_1 = - _registerName1("initWithContentsOfURL:encoding:error:"); - instancetype _objc_msgSend_283( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int enc, - ffi.Pointer> error, + __double2 __sincospi_stret( + double arg0, ) { - return __objc_msgSend_283( - obj, - sel, - url, - enc, - error, + return ___sincospi_stret( + arg0, ); } - late final __objc_msgSend_283Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_283 = __objc_msgSend_283Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_initWithContentsOfFile_encoding_error_1 = - _registerName1("initWithContentsOfFile:encoding:error:"); - instancetype _objc_msgSend_284( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - int enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_284( - obj, - sel, - path, - enc, - error, - ); - } + late final ___sincospi_stretPtr = + _lookup>( + '__sincospi_stret'); + late final ___sincospi_stret = + ___sincospi_stretPtr.asFunction<__double2 Function(double)>(); - late final __objc_msgSend_284Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSStringEncoding, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_284 = __objc_msgSend_284Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - - late final _sel_stringWithContentsOfURL_encoding_error_1 = - _registerName1("stringWithContentsOfURL:encoding:error:"); - late final _sel_stringWithContentsOfFile_encoding_error_1 = - _registerName1("stringWithContentsOfFile:encoding:error:"); - late final _sel_initWithContentsOfURL_usedEncoding_error_1 = - _registerName1("initWithContentsOfURL:usedEncoding:error:"); - instancetype _objc_msgSend_285( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_285( - obj, - sel, - url, - enc, - error, + double j0( + double arg0, + ) { + return _j0( + arg0, ); } - late final __objc_msgSend_285Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_285 = __objc_msgSend_285Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_initWithContentsOfFile_usedEncoding_error_1 = - _registerName1("initWithContentsOfFile:usedEncoding:error:"); - instancetype _objc_msgSend_286( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ffi.Pointer enc, - ffi.Pointer> error, - ) { - return __objc_msgSend_286( - obj, - sel, - path, - enc, - error, - ); - } + late final _j0Ptr = + _lookup>('j0'); + late final _j0 = _j0Ptr.asFunction(); - late final __objc_msgSend_286Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_286 = __objc_msgSend_286Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - late final _sel_stringWithContentsOfURL_usedEncoding_error_1 = - _registerName1("stringWithContentsOfURL:usedEncoding:error:"); - late final _sel_stringWithContentsOfFile_usedEncoding_error_1 = - _registerName1("stringWithContentsOfFile:usedEncoding:error:"); - late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1 = - _registerName1( - "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); - int _objc_msgSend_287( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ffi.Pointer opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion, - ) { - return __objc_msgSend_287( - obj, - sel, - data, - opts, - string, - usedLossyConversion, + double j1( + double arg0, + ) { + return _j1( + arg0, ); } - late final __objc_msgSend_287Ptr = _lookup< - ffi.NativeFunction< - NSStringEncoding Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_287 = __objc_msgSend_287Ptr.asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - late final _sel_propertyList1 = _registerName1("propertyList"); - late final _sel_propertyListFromStringsFileFormat1 = - _registerName1("propertyListFromStringsFileFormat"); - ffi.Pointer _objc_msgSend_288( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_288( - obj, - sel, + late final _j1Ptr = + _lookup>('j1'); + late final _j1 = _j1Ptr.asFunction(); + + double jn( + int arg0, + double arg1, + ) { + return _jn( + arg0, + arg1, ); } - late final __objc_msgSend_288Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_288 = __objc_msgSend_288Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _jnPtr = + _lookup>( + 'jn'); + late final _jn = _jnPtr.asFunction(); - late final _sel_cString1 = _registerName1("cString"); - late final _sel_lossyCString1 = _registerName1("lossyCString"); - late final _sel_cStringLength1 = _registerName1("cStringLength"); - late final _sel_getCString_1 = _registerName1("getCString:"); - void _objc_msgSend_289( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, + double y0( + double arg0, ) { - return __objc_msgSend_289( - obj, - sel, - bytes, + return _y0( + arg0, ); } - late final __objc_msgSend_289Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_289 = __objc_msgSend_289Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _y0Ptr = + _lookup>('y0'); + late final _y0 = _y0Ptr.asFunction(); - late final _sel_getCString_maxLength_1 = - _registerName1("getCString:maxLength:"); - void _objc_msgSend_290( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int maxLength, + double y1( + double arg0, ) { - return __objc_msgSend_290( - obj, - sel, - bytes, - maxLength, + return _y1( + arg0, ); } - late final __objc_msgSend_290Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_290 = __objc_msgSend_290Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _y1Ptr = + _lookup>('y1'); + late final _y1 = _y1Ptr.asFunction(); - late final _sel_getCString_maxLength_range_remainingRange_1 = - _registerName1("getCString:maxLength:range:remainingRange:"); - void _objc_msgSend_291( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int maxLength, - NSRange aRange, - NSRangePointer leftoverRange, + double yn( + int arg0, + double arg1, ) { - return __objc_msgSend_291( - obj, - sel, - bytes, - maxLength, - aRange, - leftoverRange, + return _yn( + arg0, + arg1, ); } - late final __objc_msgSend_291Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSRange, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_291 = __objc_msgSend_291Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, NSRange, NSRangePointer)>(); - - late final _sel_stringWithContentsOfFile_1 = - _registerName1("stringWithContentsOfFile:"); - late final _sel_stringWithContentsOfURL_1 = - _registerName1("stringWithContentsOfURL:"); - late final _sel_initWithCStringNoCopy_length_freeWhenDone_1 = - _registerName1("initWithCStringNoCopy:length:freeWhenDone:"); - ffi.Pointer _objc_msgSend_292( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer bytes, - int length, - bool freeBuffer, + late final _ynPtr = + _lookup>( + 'yn'); + late final _yn = _ynPtr.asFunction(); + + double scalb( + double arg0, + double arg1, ) { - return __objc_msgSend_292( - obj, - sel, - bytes, - length, - freeBuffer, + return _scalb( + arg0, + arg1, ); } - late final __objc_msgSend_292Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_292 = __objc_msgSend_292Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, bool)>(); - - late final _sel_initWithCString_length_1 = - _registerName1("initWithCString:length:"); - late final _sel_initWithCString_1 = _registerName1("initWithCString:"); - late final _sel_stringWithCString_length_1 = - _registerName1("stringWithCString:length:"); - late final _sel_stringWithCString_1 = _registerName1("stringWithCString:"); - late final _sel_getCharacters_1 = _registerName1("getCharacters:"); - void _objc_msgSend_293( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - ) { - return __objc_msgSend_293( - obj, - sel, - buffer, - ); - } + late final _scalbPtr = + _lookup>( + 'scalb'); + late final _scalb = _scalbPtr.asFunction(); - late final __objc_msgSend_293Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_293 = __objc_msgSend_293Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final ffi.Pointer _signgam = _lookup('signgam'); - late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_1 = - _registerName1("stringByAddingPercentEncodingWithAllowedCharacters:"); - ffi.Pointer _objc_msgSend_294( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer allowedCharacters, - ) { - return __objc_msgSend_294( - obj, - sel, - allowedCharacters, - ); - } + int get signgam => _signgam.value; - late final __objc_msgSend_294Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_294 = __objc_msgSend_294Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + set signgam(int value) => _signgam.value = value; - late final _sel_stringByRemovingPercentEncoding1 = - _registerName1("stringByRemovingPercentEncoding"); - late final _sel_stringByAddingPercentEscapesUsingEncoding_1 = - _registerName1("stringByAddingPercentEscapesUsingEncoding:"); - ffi.Pointer _objc_msgSend_295( - ffi.Pointer obj, - ffi.Pointer sel, - int enc, + int setjmp( + ffi.Pointer arg0, ) { - return __objc_msgSend_295( - obj, - sel, - enc, + return _setjmp1( + arg0, ); } - late final __objc_msgSend_295Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSStringEncoding)>>('objc_msgSend'); - late final __objc_msgSend_295 = __objc_msgSend_295Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _setjmpPtr = + _lookup)>>( + 'setjmp'); + late final _setjmp1 = + _setjmpPtr.asFunction)>(); - late final _sel_stringByReplacingPercentEscapesUsingEncoding_1 = - _registerName1("stringByReplacingPercentEscapesUsingEncoding:"); - late final _sel_debugDescription1 = _registerName1("debugDescription"); - late final _sel_version1 = _registerName1("version"); - late final _sel_setVersion_1 = _registerName1("setVersion:"); - void _objc_msgSend_296( - ffi.Pointer obj, - ffi.Pointer sel, - int aVersion, + void longjmp( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_296( - obj, - sel, - aVersion, - ); - } - - late final __objc_msgSend_296Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_296 = __objc_msgSend_296Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_classForCoder1 = _registerName1("classForCoder"); - late final _sel_replacementObjectForCoder_1 = - _registerName1("replacementObjectForCoder:"); - late final _sel_awakeAfterUsingCoder_1 = - _registerName1("awakeAfterUsingCoder:"); - late final _sel_poseAsClass_1 = _registerName1("poseAsClass:"); - late final _sel_autoContentAccessingProxy1 = - _registerName1("autoContentAccessingProxy"); - late final _sel_URL_resourceDataDidBecomeAvailable_1 = - _registerName1("URL:resourceDataDidBecomeAvailable:"); - void _objc_msgSend_297( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer newBytes, - ) { - return __objc_msgSend_297( - obj, - sel, - sender, - newBytes, + return _longjmp1( + arg0, + arg1, ); } - late final __objc_msgSend_297Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_297 = __objc_msgSend_297Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_URLResourceDidFinishLoading_1 = - _registerName1("URLResourceDidFinishLoading:"); - void _objc_msgSend_298( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sender, - ) { - return __objc_msgSend_298( - obj, - sel, - sender, + late final _longjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'longjmp'); + late final _longjmp1 = + _longjmpPtr.asFunction, int)>(); + + int _setjmp( + ffi.Pointer arg0, + ) { + return __setjmp( + arg0, ); } - late final __objc_msgSend_298Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_298 = __objc_msgSend_298Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final __setjmpPtr = + _lookup)>>( + '_setjmp'); + late final __setjmp = + __setjmpPtr.asFunction)>(); - late final _sel_URLResourceDidCancelLoading_1 = - _registerName1("URLResourceDidCancelLoading:"); - late final _sel_URL_resourceDidFailLoadingWithReason_1 = - _registerName1("URL:resourceDidFailLoadingWithReason:"); - void _objc_msgSend_299( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer sender, - ffi.Pointer reason, + void _longjmp( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_299( - obj, - sel, - sender, - reason, + return __longjmp( + arg0, + arg1, ); } - late final __objc_msgSend_299Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_299 = __objc_msgSend_299Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1 = - _registerName1( - "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); - void _objc_msgSend_300( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, - ffi.Pointer delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo, - ) { - return __objc_msgSend_300( - obj, - sel, - error, - recoveryOptionIndex, - delegate, - didRecoverSelector, - contextInfo, + late final __longjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + '_longjmp'); + late final __longjmp = + __longjmpPtr.asFunction, int)>(); + + int sigsetjmp( + ffi.Pointer arg0, + int arg1, + ) { + return _sigsetjmp( + arg0, + arg1, ); } - late final __objc_msgSend_300Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_300 = __objc_msgSend_300Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + late final _sigsetjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigsetjmp'); + late final _sigsetjmp = + _sigsetjmpPtr.asFunction, int)>(); - late final _sel_attemptRecoveryFromError_optionIndex_1 = - _registerName1("attemptRecoveryFromError:optionIndex:"); - bool _objc_msgSend_301( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer error, - int recoveryOptionIndex, + void siglongjmp( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_301( - obj, - sel, - error, - recoveryOptionIndex, + return _siglongjmp( + arg0, + arg1, ); } - late final __objc_msgSend_301Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_301 = __objc_msgSend_301Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final ffi.Pointer _NSFoundationVersionNumber = - _lookup('NSFoundationVersionNumber'); + late final _siglongjmpPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'siglongjmp'); + late final _siglongjmp = + _siglongjmpPtr.asFunction, int)>(); - double get NSFoundationVersionNumber => _NSFoundationVersionNumber.value; + void longjmperror() { + return _longjmperror(); + } - set NSFoundationVersionNumber(double value) => - _NSFoundationVersionNumber.value = value; + late final _longjmperrorPtr = + _lookup>('longjmperror'); + late final _longjmperror = _longjmperrorPtr.asFunction(); - NSString NSStringFromSelector( - ffi.Pointer aSelector, - ) { - return NSString._( - _NSStringFromSelector( - aSelector, - ), - this, - retain: true, - release: true); - } + late final ffi.Pointer>> _sys_signame = + _lookup>>('sys_signame'); - late final _NSStringFromSelectorPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromSelector'); - late final _NSStringFromSelector = _NSStringFromSelectorPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer> get sys_signame => _sys_signame.value; - ffi.Pointer NSSelectorFromString( - NSString aSelectorName, - ) { - return _NSSelectorFromString( - aSelectorName._id, - ); - } + set sys_signame(ffi.Pointer> value) => + _sys_signame.value = value; - late final _NSSelectorFromStringPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSSelectorFromString'); - late final _NSSelectorFromString = _NSSelectorFromStringPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + late final ffi.Pointer>> _sys_siglist = + _lookup>>('sys_siglist'); - NSString NSStringFromClass( - NSObject aClass, - ) { - return NSString._( - _NSStringFromClass( - aClass._id, - ), - this, - retain: true, - release: true); - } + ffi.Pointer> get sys_siglist => _sys_siglist.value; - late final _NSStringFromClassPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromClass'); - late final _NSStringFromClass = _NSStringFromClassPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + set sys_siglist(ffi.Pointer> value) => + _sys_siglist.value = value; - NSObject? NSClassFromString( - NSString aClassName, + int raise( + int arg0, ) { - return _NSClassFromString( - aClassName._id, - ).address == - 0 - ? null - : NSObject._( - _NSClassFromString( - aClassName._id, - ), - this, - retain: true, - release: true); + return _raise( + arg0, + ); } - late final _NSClassFromStringPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSClassFromString'); - late final _NSClassFromString = _NSClassFromStringPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + late final _raisePtr = + _lookup>('raise'); + late final _raise = _raisePtr.asFunction(); - NSString NSStringFromProtocol( - Protocol proto, + ffi.Pointer> bsd_signal( + int arg0, + ffi.Pointer> arg1, ) { - return NSString._( - _NSStringFromProtocol( - proto._id, - ), - this, - retain: true, - release: true); + return _bsd_signal( + arg0, + arg1, + ); } - late final _NSStringFromProtocolPtr = _lookup< + late final _bsd_signalPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSStringFromProtocol'); - late final _NSStringFromProtocol = _NSStringFromProtocolPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi + .NativeFunction>)>>('bsd_signal'); + late final _bsd_signal = _bsd_signalPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); - Protocol? NSProtocolFromString( - NSString namestr, + int kill( + int arg0, + int arg1, ) { - return _NSProtocolFromString( - namestr._id, - ).address == - 0 - ? null - : Protocol._( - _NSProtocolFromString( - namestr._id, - ), - this, - retain: true, - release: true); + return _kill( + arg0, + arg1, + ); } - late final _NSProtocolFromStringPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('NSProtocolFromString'); - late final _NSProtocolFromString = _NSProtocolFromStringPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + late final _killPtr = + _lookup>('kill'); + late final _kill = _killPtr.asFunction(); - ffi.Pointer NSGetSizeAndAlignment( - ffi.Pointer typePtr, - ffi.Pointer sizep, - ffi.Pointer alignp, + int killpg( + int arg0, + int arg1, ) { - return _NSGetSizeAndAlignment( - typePtr, - sizep, - alignp, + return _killpg( + arg0, + arg1, ); } - late final _NSGetSizeAndAlignmentPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('NSGetSizeAndAlignment'); - late final _NSGetSizeAndAlignment = _NSGetSizeAndAlignmentPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _killpgPtr = + _lookup>('killpg'); + late final _killpg = _killpgPtr.asFunction(); - void NSLog( - NSString format, + int pthread_kill( + pthread_t arg0, + int arg1, ) { - return _NSLog( - format._id, + return _pthread_kill( + arg0, + arg1, ); } - late final _NSLogPtr = - _lookup)>>( - 'NSLog'); - late final _NSLog = - _NSLogPtr.asFunction)>(); + late final _pthread_killPtr = + _lookup>( + 'pthread_kill'); + late final _pthread_kill = + _pthread_killPtr.asFunction(); - void NSLogv( - NSString format, - va_list args, + int pthread_sigmask( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _NSLogv( - format._id, - args, + return _pthread_sigmask( + arg0, + arg1, + arg2, ); } - late final _NSLogvPtr = _lookup< + late final _pthread_sigmaskPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, va_list)>>('NSLogv'); - late final _NSLogv = - _NSLogvPtr.asFunction, va_list)>(); - - late final ffi.Pointer _NSNotFound = - _lookup('NSNotFound'); - - int get NSNotFound => _NSNotFound.value; + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('pthread_sigmask'); + late final _pthread_sigmask = _pthread_sigmaskPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer _Block_copy1( - ffi.Pointer aBlock, + int sigaction1( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return __Block_copy1( - aBlock, + return _sigaction1( + arg0, + arg1, + arg2, ); } - late final __Block_copy1Ptr = _lookup< + late final _sigaction1Ptr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('_Block_copy'); - late final __Block_copy1 = __Block_copy1Ptr - .asFunction Function(ffi.Pointer)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('sigaction'); + late final _sigaction1 = _sigaction1Ptr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - void _Block_release1( - ffi.Pointer aBlock, + int sigaddset( + ffi.Pointer arg0, + int arg1, ) { - return __Block_release1( - aBlock, + return _sigaddset( + arg0, + arg1, ); } - late final __Block_release1Ptr = - _lookup)>>( - '_Block_release'); - late final __Block_release1 = - __Block_release1Ptr.asFunction)>(); + late final _sigaddsetPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigaddset'); + late final _sigaddset = + _sigaddsetPtr.asFunction, int)>(); - void _Block_object_assign( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int sigaltstack( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __Block_object_assign( + return _sigaltstack( arg0, arg1, - arg2, ); } - late final __Block_object_assignPtr = _lookup< + late final _sigaltstackPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('_Block_object_assign'); - late final __Block_object_assign = __Block_object_assignPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sigaltstack'); + late final _sigaltstack = _sigaltstackPtr + .asFunction, ffi.Pointer)>(); - void _Block_object_dispose( - ffi.Pointer arg0, + int sigdelset( + ffi.Pointer arg0, int arg1, ) { - return __Block_object_dispose( + return _sigdelset( arg0, arg1, ); } - late final __Block_object_disposePtr = _lookup< - ffi - .NativeFunction, ffi.Int)>>( - '_Block_object_dispose'); - late final __Block_object_dispose = __Block_object_disposePtr - .asFunction, int)>(); - - late final ffi.Pointer>> - __NSConcreteGlobalBlock = - _lookup>>('_NSConcreteGlobalBlock'); - - ffi.Pointer> get _NSConcreteGlobalBlock => - __NSConcreteGlobalBlock.value; - - set _NSConcreteGlobalBlock(ffi.Pointer> value) => - __NSConcreteGlobalBlock.value = value; - - late final ffi.Pointer>> - __NSConcreteStackBlock = - _lookup>>('_NSConcreteStackBlock'); - - ffi.Pointer> get _NSConcreteStackBlock => - __NSConcreteStackBlock.value; - - set _NSConcreteStackBlock(ffi.Pointer> value) => - __NSConcreteStackBlock.value = value; - - void Debugger() { - return _Debugger(); - } - - late final _DebuggerPtr = - _lookup>('Debugger'); - late final _Debugger = _DebuggerPtr.asFunction(); + late final _sigdelsetPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigdelset'); + late final _sigdelset = + _sigdelsetPtr.asFunction, int)>(); - void DebugStr( - ConstStr255Param debuggerMsg, + int sigemptyset( + ffi.Pointer arg0, ) { - return _DebugStr( - debuggerMsg, + return _sigemptyset( + arg0, ); } - late final _DebugStrPtr = - _lookup>( - 'DebugStr'); - late final _DebugStr = - _DebugStrPtr.asFunction(); - - void SysBreak() { - return _SysBreak(); - } - - late final _SysBreakPtr = - _lookup>('SysBreak'); - late final _SysBreak = _SysBreakPtr.asFunction(); + late final _sigemptysetPtr = + _lookup)>>( + 'sigemptyset'); + late final _sigemptyset = + _sigemptysetPtr.asFunction)>(); - void SysBreakStr( - ConstStr255Param debuggerMsg, + int sigfillset( + ffi.Pointer arg0, ) { - return _SysBreakStr( - debuggerMsg, + return _sigfillset( + arg0, ); } - late final _SysBreakStrPtr = - _lookup>( - 'SysBreakStr'); - late final _SysBreakStr = - _SysBreakStrPtr.asFunction(); + late final _sigfillsetPtr = + _lookup)>>( + 'sigfillset'); + late final _sigfillset = + _sigfillsetPtr.asFunction)>(); - void SysBreakFunc( - ConstStr255Param debuggerMsg, + int sighold( + int arg0, ) { - return _SysBreakFunc( - debuggerMsg, + return _sighold( + arg0, ); } - late final _SysBreakFuncPtr = - _lookup>( - 'SysBreakFunc'); - late final _SysBreakFunc = - _SysBreakFuncPtr.asFunction(); - - late final ffi.Pointer _kCFCoreFoundationVersionNumber = - _lookup('kCFCoreFoundationVersionNumber'); - - double get kCFCoreFoundationVersionNumber => - _kCFCoreFoundationVersionNumber.value; - - set kCFCoreFoundationVersionNumber(double value) => - _kCFCoreFoundationVersionNumber.value = value; - - late final ffi.Pointer _kCFNotFound = - _lookup('kCFNotFound'); - - int get kCFNotFound => _kCFNotFound.value; + late final _sigholdPtr = + _lookup>('sighold'); + late final _sighold = _sigholdPtr.asFunction(); - CFRange __CFRangeMake( - int loc, - int len, + int sigignore( + int arg0, ) { - return ___CFRangeMake( - loc, - len, + return _sigignore( + arg0, ); } - late final ___CFRangeMakePtr = - _lookup>( - '__CFRangeMake'); - late final ___CFRangeMake = - ___CFRangeMakePtr.asFunction(); - - int CFNullGetTypeID() { - return _CFNullGetTypeID(); - } - - late final _CFNullGetTypeIDPtr = - _lookup>('CFNullGetTypeID'); - late final _CFNullGetTypeID = - _CFNullGetTypeIDPtr.asFunction(); - - late final ffi.Pointer _kCFNull = _lookup('kCFNull'); - - CFNullRef get kCFNull => _kCFNull.value; - - late final ffi.Pointer _kCFAllocatorDefault = - _lookup('kCFAllocatorDefault'); - - CFAllocatorRef get kCFAllocatorDefault => _kCFAllocatorDefault.value; - - late final ffi.Pointer _kCFAllocatorSystemDefault = - _lookup('kCFAllocatorSystemDefault'); - - CFAllocatorRef get kCFAllocatorSystemDefault => - _kCFAllocatorSystemDefault.value; - - late final ffi.Pointer _kCFAllocatorMalloc = - _lookup('kCFAllocatorMalloc'); - - CFAllocatorRef get kCFAllocatorMalloc => _kCFAllocatorMalloc.value; - - late final ffi.Pointer _kCFAllocatorMallocZone = - _lookup('kCFAllocatorMallocZone'); - - CFAllocatorRef get kCFAllocatorMallocZone => _kCFAllocatorMallocZone.value; - - late final ffi.Pointer _kCFAllocatorNull = - _lookup('kCFAllocatorNull'); - - CFAllocatorRef get kCFAllocatorNull => _kCFAllocatorNull.value; - - late final ffi.Pointer _kCFAllocatorUseContext = - _lookup('kCFAllocatorUseContext'); - - CFAllocatorRef get kCFAllocatorUseContext => _kCFAllocatorUseContext.value; - - int CFAllocatorGetTypeID() { - return _CFAllocatorGetTypeID(); - } - - late final _CFAllocatorGetTypeIDPtr = - _lookup>('CFAllocatorGetTypeID'); - late final _CFAllocatorGetTypeID = - _CFAllocatorGetTypeIDPtr.asFunction(); + late final _sigignorePtr = + _lookup>('sigignore'); + late final _sigignore = _sigignorePtr.asFunction(); - void CFAllocatorSetDefault( - CFAllocatorRef allocator, + int siginterrupt( + int arg0, + int arg1, ) { - return _CFAllocatorSetDefault( - allocator, + return _siginterrupt( + arg0, + arg1, ); } - late final _CFAllocatorSetDefaultPtr = - _lookup>( - 'CFAllocatorSetDefault'); - late final _CFAllocatorSetDefault = - _CFAllocatorSetDefaultPtr.asFunction(); + late final _siginterruptPtr = + _lookup>( + 'siginterrupt'); + late final _siginterrupt = + _siginterruptPtr.asFunction(); - CFAllocatorRef CFAllocatorGetDefault() { - return _CFAllocatorGetDefault(); + int sigismember( + ffi.Pointer arg0, + int arg1, + ) { + return _sigismember( + arg0, + arg1, + ); } - late final _CFAllocatorGetDefaultPtr = - _lookup>( - 'CFAllocatorGetDefault'); - late final _CFAllocatorGetDefault = - _CFAllocatorGetDefaultPtr.asFunction(); + late final _sigismemberPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sigismember'); + late final _sigismember = + _sigismemberPtr.asFunction, int)>(); - CFAllocatorRef CFAllocatorCreate( - CFAllocatorRef allocator, - ffi.Pointer context, + int sigpause( + int arg0, ) { - return _CFAllocatorCreate( - allocator, - context, + return _sigpause( + arg0, ); } - late final _CFAllocatorCreatePtr = _lookup< - ffi.NativeFunction< - CFAllocatorRef Function(CFAllocatorRef, - ffi.Pointer)>>('CFAllocatorCreate'); - late final _CFAllocatorCreate = _CFAllocatorCreatePtr.asFunction< - CFAllocatorRef Function( - CFAllocatorRef, ffi.Pointer)>(); + late final _sigpausePtr = + _lookup>('sigpause'); + late final _sigpause = _sigpausePtr.asFunction(); - ffi.Pointer CFAllocatorAllocate( - CFAllocatorRef allocator, - int size, - int hint, + int sigpending( + ffi.Pointer arg0, ) { - return _CFAllocatorAllocate( - allocator, - size, - hint, + return _sigpending( + arg0, ); } - late final _CFAllocatorAllocatePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef, CFIndex, CFOptionFlags)>>('CFAllocatorAllocate'); - late final _CFAllocatorAllocate = _CFAllocatorAllocatePtr.asFunction< - ffi.Pointer Function(CFAllocatorRef, int, int)>(); + late final _sigpendingPtr = + _lookup)>>( + 'sigpending'); + late final _sigpending = + _sigpendingPtr.asFunction)>(); - ffi.Pointer CFAllocatorReallocate( - CFAllocatorRef allocator, - ffi.Pointer ptr, - int newsize, - int hint, + int sigprocmask( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _CFAllocatorReallocate( - allocator, - ptr, - newsize, - hint, + return _sigprocmask( + arg0, + arg1, + arg2, ); } - late final _CFAllocatorReallocatePtr = _lookup< + late final _sigprocmaskPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(CFAllocatorRef, ffi.Pointer, - CFIndex, CFOptionFlags)>>('CFAllocatorReallocate'); - late final _CFAllocatorReallocate = _CFAllocatorReallocatePtr.asFunction< - ffi.Pointer Function( - CFAllocatorRef, ffi.Pointer, int, int)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer)>>('sigprocmask'); + late final _sigprocmask = _sigprocmaskPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - void CFAllocatorDeallocate( - CFAllocatorRef allocator, - ffi.Pointer ptr, + int sigrelse( + int arg0, ) { - return _CFAllocatorDeallocate( - allocator, - ptr, + return _sigrelse( + arg0, ); } - late final _CFAllocatorDeallocatePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, ffi.Pointer)>>('CFAllocatorDeallocate'); - late final _CFAllocatorDeallocate = _CFAllocatorDeallocatePtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer)>(); + late final _sigrelsePtr = + _lookup>('sigrelse'); + late final _sigrelse = _sigrelsePtr.asFunction(); - int CFAllocatorGetPreferredSizeForSize( - CFAllocatorRef allocator, - int size, - int hint, + ffi.Pointer> sigset( + int arg0, + ffi.Pointer> arg1, ) { - return _CFAllocatorGetPreferredSizeForSize( - allocator, - size, - hint, + return _sigset( + arg0, + arg1, ); } - late final _CFAllocatorGetPreferredSizeForSizePtr = _lookup< + late final _sigsetPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFAllocatorRef, CFIndex, - CFOptionFlags)>>('CFAllocatorGetPreferredSizeForSize'); - late final _CFAllocatorGetPreferredSizeForSize = - _CFAllocatorGetPreferredSizeForSizePtr.asFunction< - int Function(CFAllocatorRef, int, int)>(); + ffi.Pointer> Function( + ffi.Int, + ffi.Pointer< + ffi.NativeFunction>)>>('sigset'); + late final _sigset = _sigsetPtr.asFunction< + ffi.Pointer> Function( + int, ffi.Pointer>)>(); - void CFAllocatorGetContext( - CFAllocatorRef allocator, - ffi.Pointer context, + int sigsuspend( + ffi.Pointer arg0, ) { - return _CFAllocatorGetContext( - allocator, - context, + return _sigsuspend( + arg0, ); } - late final _CFAllocatorGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFAllocatorRef, - ffi.Pointer)>>('CFAllocatorGetContext'); - late final _CFAllocatorGetContext = _CFAllocatorGetContextPtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer)>(); + late final _sigsuspendPtr = + _lookup)>>( + 'sigsuspend'); + late final _sigsuspend = + _sigsuspendPtr.asFunction)>(); - int CFGetTypeID( - CFTypeRef cf, + int sigwait( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFGetTypeID( - cf, + return _sigwait( + arg0, + arg1, ); } - late final _CFGetTypeIDPtr = - _lookup>('CFGetTypeID'); - late final _CFGetTypeID = - _CFGetTypeIDPtr.asFunction(); + late final _sigwaitPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sigwait'); + late final _sigwait = _sigwaitPtr + .asFunction, ffi.Pointer)>(); - CFStringRef CFCopyTypeIDDescription( - int type_id, + void psignal( + int arg0, + ffi.Pointer arg1, ) { - return _CFCopyTypeIDDescription( - type_id, + return _psignal( + arg0, + arg1, ); } - late final _CFCopyTypeIDDescriptionPtr = - _lookup>( - 'CFCopyTypeIDDescription'); - late final _CFCopyTypeIDDescription = - _CFCopyTypeIDDescriptionPtr.asFunction(); + late final _psignalPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int, ffi.Pointer)>>('psignal'); + late final _psignal = + _psignalPtr.asFunction)>(); - CFTypeRef CFRetain( - CFTypeRef cf, + int sigblock( + int arg0, ) { - return _CFRetain( - cf, + return _sigblock( + arg0, ); } - late final _CFRetainPtr = - _lookup>('CFRetain'); - late final _CFRetain = - _CFRetainPtr.asFunction(); + late final _sigblockPtr = + _lookup>('sigblock'); + late final _sigblock = _sigblockPtr.asFunction(); - void CFRelease( - CFTypeRef cf, + int sigsetmask( + int arg0, ) { - return _CFRelease( - cf, + return _sigsetmask( + arg0, ); } - late final _CFReleasePtr = - _lookup>('CFRelease'); - late final _CFRelease = _CFReleasePtr.asFunction(); + late final _sigsetmaskPtr = + _lookup>('sigsetmask'); + late final _sigsetmask = _sigsetmaskPtr.asFunction(); - CFTypeRef CFAutorelease( - CFTypeRef arg, + int sigvec1( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _CFAutorelease( - arg, + return _sigvec1( + arg0, + arg1, + arg2, ); } - late final _CFAutoreleasePtr = - _lookup>( - 'CFAutorelease'); - late final _CFAutorelease = - _CFAutoreleasePtr.asFunction(); + late final _sigvec1Ptr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Pointer)>>('sigvec'); + late final _sigvec1 = _sigvec1Ptr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer)>(); - int CFGetRetainCount( - CFTypeRef cf, + int renameat( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, ) { - return _CFGetRetainCount( - cf, + return _renameat( + arg0, + arg1, + arg2, + arg3, ); } - late final _CFGetRetainCountPtr = - _lookup>( - 'CFGetRetainCount'); - late final _CFGetRetainCount = - _CFGetRetainCountPtr.asFunction(); + late final _renameatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer)>>('renameat'); + late final _renameat = _renameatPtr.asFunction< + int Function(int, ffi.Pointer, int, ffi.Pointer)>(); - int CFEqual( - CFTypeRef cf1, - CFTypeRef cf2, + int renamex_np( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFEqual( - cf1, - cf2, + return _renamex_np( + arg0, + arg1, + arg2, ); } - late final _CFEqualPtr = - _lookup>( - 'CFEqual'); - late final _CFEqual = - _CFEqualPtr.asFunction(); + late final _renamex_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedInt)>>('renamex_np'); + late final _renamex_np = _renamex_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int CFHash( - CFTypeRef cf, + int renameatx_np( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + int arg4, ) { - return _CFHash( - cf, + return _renameatx_np( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _CFHashPtr = - _lookup>('CFHash'); - late final _CFHash = _CFHashPtr.asFunction(); + late final _renameatx_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.UnsignedInt)>>('renameatx_np'); + late final _renameatx_np = _renameatx_npPtr.asFunction< + int Function( + int, ffi.Pointer, int, ffi.Pointer, int)>(); - CFStringRef CFCopyDescription( - CFTypeRef cf, + late final ffi.Pointer> ___stdinp = + _lookup>('__stdinp'); + + ffi.Pointer get __stdinp => ___stdinp.value; + + set __stdinp(ffi.Pointer value) => ___stdinp.value = value; + + late final ffi.Pointer> ___stdoutp = + _lookup>('__stdoutp'); + + ffi.Pointer get __stdoutp => ___stdoutp.value; + + set __stdoutp(ffi.Pointer value) => ___stdoutp.value = value; + + late final ffi.Pointer> ___stderrp = + _lookup>('__stderrp'); + + ffi.Pointer get __stderrp => ___stderrp.value; + + set __stderrp(ffi.Pointer value) => ___stderrp.value = value; + + void clearerr( + ffi.Pointer arg0, ) { - return _CFCopyDescription( - cf, + return _clearerr( + arg0, ); } - late final _CFCopyDescriptionPtr = - _lookup>( - 'CFCopyDescription'); - late final _CFCopyDescription = - _CFCopyDescriptionPtr.asFunction(); + late final _clearerrPtr = + _lookup)>>( + 'clearerr'); + late final _clearerr = + _clearerrPtr.asFunction)>(); - CFAllocatorRef CFGetAllocator( - CFTypeRef cf, + int fclose( + ffi.Pointer arg0, ) { - return _CFGetAllocator( - cf, + return _fclose( + arg0, ); } - late final _CFGetAllocatorPtr = - _lookup>( - 'CFGetAllocator'); - late final _CFGetAllocator = - _CFGetAllocatorPtr.asFunction(); + late final _fclosePtr = + _lookup)>>( + 'fclose'); + late final _fclose = _fclosePtr.asFunction)>(); - CFTypeRef CFMakeCollectable( - CFTypeRef cf, + int feof( + ffi.Pointer arg0, ) { - return _CFMakeCollectable( - cf, + return _feof( + arg0, ); } - late final _CFMakeCollectablePtr = - _lookup>( - 'CFMakeCollectable'); - late final _CFMakeCollectable = - _CFMakeCollectablePtr.asFunction(); + late final _feofPtr = + _lookup)>>('feof'); + late final _feof = _feofPtr.asFunction)>(); - ffi.Pointer NSDefaultMallocZone() { - return _NSDefaultMallocZone(); + int ferror( + ffi.Pointer arg0, + ) { + return _ferror( + arg0, + ); } - late final _NSDefaultMallocZonePtr = - _lookup Function()>>( - 'NSDefaultMallocZone'); - late final _NSDefaultMallocZone = - _NSDefaultMallocZonePtr.asFunction Function()>(); + late final _ferrorPtr = + _lookup)>>( + 'ferror'); + late final _ferror = _ferrorPtr.asFunction)>(); - ffi.Pointer NSCreateZone( - int startSize, - int granularity, - bool canFree, + int fflush( + ffi.Pointer arg0, ) { - return _NSCreateZone( - startSize, - granularity, - canFree, + return _fflush( + arg0, ); } - late final _NSCreateZonePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - NSUInteger, NSUInteger, ffi.Bool)>>('NSCreateZone'); - late final _NSCreateZone = _NSCreateZonePtr.asFunction< - ffi.Pointer Function(int, int, bool)>(); + late final _fflushPtr = + _lookup)>>( + 'fflush'); + late final _fflush = _fflushPtr.asFunction)>(); - void NSRecycleZone( - ffi.Pointer zone, + int fgetc( + ffi.Pointer arg0, ) { - return _NSRecycleZone( - zone, + return _fgetc( + arg0, ); } - late final _NSRecycleZonePtr = - _lookup)>>( - 'NSRecycleZone'); - late final _NSRecycleZone = - _NSRecycleZonePtr.asFunction)>(); + late final _fgetcPtr = + _lookup)>>('fgetc'); + late final _fgetc = _fgetcPtr.asFunction)>(); - void NSSetZoneName( - ffi.Pointer zone, - NSString name, + int fgetpos( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _NSSetZoneName( - zone, - name._id, + return _fgetpos( + arg0, + arg1, ); } - late final _NSSetZoneNamePtr = _lookup< + late final _fgetposPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('NSSetZoneName'); - late final _NSSetZoneName = _NSSetZoneNamePtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fgetpos'); + late final _fgetpos = _fgetposPtr + .asFunction, ffi.Pointer)>(); - NSString NSZoneName( - ffi.Pointer zone, + ffi.Pointer fgets( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, ) { - return NSString._( - _NSZoneName( - zone, - ), - this, - retain: true, - release: true); + return _fgets( + arg0, + arg1, + arg2, + ); } - late final _NSZoneNamePtr = _lookup< + late final _fgetsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('NSZoneName'); - late final _NSZoneName = _NSZoneNamePtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Pointer)>>('fgets'); + late final _fgets = _fgetsPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - ffi.Pointer NSZoneFromPointer( - ffi.Pointer ptr, + ffi.Pointer fopen( + ffi.Pointer __filename, + ffi.Pointer __mode, ) { - return _NSZoneFromPointer( - ptr, + return _fopen( + __filename, + __mode, ); } - late final _NSZoneFromPointerPtr = _lookup< - ffi - .NativeFunction Function(ffi.Pointer)>>( - 'NSZoneFromPointer'); - late final _NSZoneFromPointer = _NSZoneFromPointerPtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); + late final _fopenPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fopen'); + late final _fopen = _fopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSZoneMalloc( - ffi.Pointer zone, - int size, + int fprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _NSZoneMalloc( - zone, - size, + return _fprintf( + arg0, + arg1, ); } - late final _NSZoneMallocPtr = _lookup< + late final _fprintfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, NSUInteger)>>('NSZoneMalloc'); - late final _NSZoneMalloc = _NSZoneMallocPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('fprintf'); + late final _fprintf = _fprintfPtr + .asFunction, ffi.Pointer)>(); - ffi.Pointer NSZoneCalloc( - ffi.Pointer zone, - int numElems, - int byteSize, + int fputc( + int arg0, + ffi.Pointer arg1, ) { - return _NSZoneCalloc( - zone, - numElems, - byteSize, + return _fputc( + arg0, + arg1, ); } - late final _NSZoneCallocPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, NSUInteger, NSUInteger)>>('NSZoneCalloc'); - late final _NSZoneCalloc = _NSZoneCallocPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + late final _fputcPtr = + _lookup)>>( + 'fputc'); + late final _fputc = + _fputcPtr.asFunction)>(); - ffi.Pointer NSZoneRealloc( - ffi.Pointer zone, - ffi.Pointer ptr, - int size, + int fputs( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _NSZoneRealloc( - zone, - ptr, - size, + return _fputs( + arg0, + arg1, ); } - late final _NSZoneReallocPtr = _lookup< + late final _fputsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('NSZoneRealloc'); - late final _NSZoneRealloc = _NSZoneReallocPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fputs'); + late final _fputs = _fputsPtr + .asFunction, ffi.Pointer)>(); - void NSZoneFree( - ffi.Pointer zone, - ffi.Pointer ptr, + int fread( + ffi.Pointer __ptr, + int __size, + int __nitems, + ffi.Pointer __stream, ) { - return _NSZoneFree( - zone, - ptr, + return _fread( + __ptr, + __size, + __nitems, + __stream, ); } - late final _NSZoneFreePtr = _lookup< + late final _freadPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('NSZoneFree'); - late final _NSZoneFree = _NSZoneFreePtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer)>>('fread'); + late final _fread = _freadPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); - ffi.Pointer NSAllocateCollectable( - int size, - int options, + ffi.Pointer freopen( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _NSAllocateCollectable( - size, - options, + return _freopen( + arg0, + arg1, + arg2, ); } - late final _NSAllocateCollectablePtr = _lookup< + late final _freopenPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - NSUInteger, NSUInteger)>>('NSAllocateCollectable'); - late final _NSAllocateCollectable = _NSAllocateCollectablePtr.asFunction< - ffi.Pointer Function(int, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('freopen'); + late final _freopen = _freopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - ffi.Pointer NSReallocateCollectable( - ffi.Pointer ptr, - int size, - int options, + int fscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _NSReallocateCollectable( - ptr, - size, - options, + return _fscanf( + arg0, + arg1, ); } - late final _NSReallocateCollectablePtr = _lookup< + late final _fscanfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, NSUInteger, - NSUInteger)>>('NSReallocateCollectable'); - late final _NSReallocateCollectable = _NSReallocateCollectablePtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('fscanf'); + late final _fscanf = _fscanfPtr + .asFunction, ffi.Pointer)>(); - int NSPageSize() { - return _NSPageSize(); + int fseek( + ffi.Pointer arg0, + int arg1, + int arg2, + ) { + return _fseek( + arg0, + arg1, + arg2, + ); } - late final _NSPageSizePtr = - _lookup>('NSPageSize'); - late final _NSPageSize = _NSPageSizePtr.asFunction(); + late final _fseekPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Long, ffi.Int)>>('fseek'); + late final _fseek = + _fseekPtr.asFunction, int, int)>(); - int NSLogPageSize() { - return _NSLogPageSize(); + int fsetpos( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _fsetpos( + arg0, + arg1, + ); } - late final _NSLogPageSizePtr = - _lookup>('NSLogPageSize'); - late final _NSLogPageSize = _NSLogPageSizePtr.asFunction(); + late final _fsetposPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fsetpos'); + late final _fsetpos = _fsetposPtr + .asFunction, ffi.Pointer)>(); - int NSRoundUpToMultipleOfPageSize( - int bytes, + int ftell( + ffi.Pointer arg0, ) { - return _NSRoundUpToMultipleOfPageSize( - bytes, + return _ftell( + arg0, ); } - late final _NSRoundUpToMultipleOfPageSizePtr = - _lookup>( - 'NSRoundUpToMultipleOfPageSize'); - late final _NSRoundUpToMultipleOfPageSize = - _NSRoundUpToMultipleOfPageSizePtr.asFunction(); + late final _ftellPtr = + _lookup)>>( + 'ftell'); + late final _ftell = _ftellPtr.asFunction)>(); - int NSRoundDownToMultipleOfPageSize( - int bytes, + int fwrite( + ffi.Pointer __ptr, + int __size, + int __nitems, + ffi.Pointer __stream, ) { - return _NSRoundDownToMultipleOfPageSize( - bytes, + return _fwrite( + __ptr, + __size, + __nitems, + __stream, ); } - late final _NSRoundDownToMultipleOfPageSizePtr = - _lookup>( - 'NSRoundDownToMultipleOfPageSize'); - late final _NSRoundDownToMultipleOfPageSize = - _NSRoundDownToMultipleOfPageSizePtr.asFunction(); + late final _fwritePtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, + ffi.Pointer)>>('fwrite'); + late final _fwrite = _fwritePtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); - ffi.Pointer NSAllocateMemoryPages( - int bytes, + int getc( + ffi.Pointer arg0, ) { - return _NSAllocateMemoryPages( - bytes, + return _getc( + arg0, ); } - late final _NSAllocateMemoryPagesPtr = - _lookup Function(NSUInteger)>>( - 'NSAllocateMemoryPages'); - late final _NSAllocateMemoryPages = _NSAllocateMemoryPagesPtr.asFunction< - ffi.Pointer Function(int)>(); + late final _getcPtr = + _lookup)>>('getc'); + late final _getc = _getcPtr.asFunction)>(); - void NSDeallocateMemoryPages( - ffi.Pointer ptr, - int bytes, - ) { - return _NSDeallocateMemoryPages( - ptr, - bytes, - ); + int getchar() { + return _getchar(); } - late final _NSDeallocateMemoryPagesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, NSUInteger)>>('NSDeallocateMemoryPages'); - late final _NSDeallocateMemoryPages = _NSDeallocateMemoryPagesPtr.asFunction< - void Function(ffi.Pointer, int)>(); + late final _getcharPtr = + _lookup>('getchar'); + late final _getchar = _getcharPtr.asFunction(); - void NSCopyMemoryPages( - ffi.Pointer source, - ffi.Pointer dest, - int bytes, + ffi.Pointer gets( + ffi.Pointer arg0, ) { - return _NSCopyMemoryPages( - source, - dest, - bytes, + return _gets( + arg0, ); } - late final _NSCopyMemoryPagesPtr = _lookup< + late final _getsPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('NSCopyMemoryPages'); - late final _NSCopyMemoryPages = _NSCopyMemoryPagesPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - int NSRealMemoryAvailable() { - return _NSRealMemoryAvailable(); - } - - late final _NSRealMemoryAvailablePtr = - _lookup>( - 'NSRealMemoryAvailable'); - late final _NSRealMemoryAvailable = - _NSRealMemoryAvailablePtr.asFunction(); + ffi.Pointer Function(ffi.Pointer)>>('gets'); + late final _gets = _getsPtr + .asFunction Function(ffi.Pointer)>(); - NSObject NSAllocateObject( - NSObject aClass, - DartNSUInteger extraBytes, - ffi.Pointer zone, + void perror( + ffi.Pointer arg0, ) { - return NSObject._( - _NSAllocateObject( - aClass._id, - extraBytes, - zone, - ), - this, - retain: true, - release: true); + return _perror( + arg0, + ); } - late final _NSAllocateObjectPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, NSUInteger, - ffi.Pointer)>>('NSAllocateObject'); - late final _NSAllocateObject = _NSAllocateObjectPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + late final _perrorPtr = + _lookup)>>( + 'perror'); + late final _perror = + _perrorPtr.asFunction)>(); - void NSDeallocateObject( - NSObject object, + int printf( + ffi.Pointer arg0, ) { - return _NSDeallocateObject( - object._id, + return _printf( + arg0, ); } - late final _NSDeallocateObjectPtr = - _lookup)>>( - 'NSDeallocateObject'); - late final _NSDeallocateObject = _NSDeallocateObjectPtr.asFunction< - void Function(ffi.Pointer)>(); + late final _printfPtr = + _lookup)>>( + 'printf'); + late final _printf = + _printfPtr.asFunction)>(); - NSObject NSCopyObject( - NSObject object, - DartNSUInteger extraBytes, - ffi.Pointer zone, + int putc( + int arg0, + ffi.Pointer arg1, ) { - return NSObject._( - _NSCopyObject( - object._id, - extraBytes, - zone, - ), - this, - retain: true, - release: true); + return _putc( + arg0, + arg1, + ); } - late final _NSCopyObjectPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, NSUInteger, - ffi.Pointer)>>('NSCopyObject'); - late final _NSCopyObject = _NSCopyObjectPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + late final _putcPtr = + _lookup)>>( + 'putc'); + late final _putc = + _putcPtr.asFunction)>(); - bool NSShouldRetainWithZone( - NSObject anObject, - ffi.Pointer requestedZone, + int putchar( + int arg0, ) { - return _NSShouldRetainWithZone( - anObject._id, - requestedZone, + return _putchar( + arg0, ); } - late final _NSShouldRetainWithZonePtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer)>>('NSShouldRetainWithZone'); - late final _NSShouldRetainWithZone = _NSShouldRetainWithZonePtr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); + late final _putcharPtr = + _lookup>('putchar'); + late final _putchar = _putcharPtr.asFunction(); - void NSIncrementExtraRefCount( - NSObject object, + int puts( + ffi.Pointer arg0, ) { - return _NSIncrementExtraRefCount( - object._id, + return _puts( + arg0, ); } - late final _NSIncrementExtraRefCountPtr = - _lookup)>>( - 'NSIncrementExtraRefCount'); - late final _NSIncrementExtraRefCount = _NSIncrementExtraRefCountPtr - .asFunction)>(); + late final _putsPtr = + _lookup)>>( + 'puts'); + late final _puts = _putsPtr.asFunction)>(); - bool NSDecrementExtraRefCountWasZero( - NSObject object, + int remove( + ffi.Pointer arg0, ) { - return _NSDecrementExtraRefCountWasZero( - object._id, + return _remove( + arg0, ); } - late final _NSDecrementExtraRefCountWasZeroPtr = - _lookup)>>( - 'NSDecrementExtraRefCountWasZero'); - late final _NSDecrementExtraRefCountWasZero = - _NSDecrementExtraRefCountWasZeroPtr.asFunction< - bool Function(ffi.Pointer)>(); + late final _removePtr = + _lookup)>>( + 'remove'); + late final _remove = + _removePtr.asFunction)>(); - DartNSUInteger NSExtraRefCount( - NSObject object, + int rename( + ffi.Pointer __old, + ffi.Pointer __new, ) { - return _NSExtraRefCount( - object._id, + return _rename( + __old, + __new, ); } - late final _NSExtraRefCountPtr = - _lookup)>>( - 'NSExtraRefCount'); - late final _NSExtraRefCount = - _NSExtraRefCountPtr.asFunction)>(); + late final _renamePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('rename'); + late final _rename = _renamePtr + .asFunction, ffi.Pointer)>(); - NSRange NSUnionRange( - NSRange range1, - NSRange range2, + void rewind( + ffi.Pointer arg0, ) { - return _NSUnionRange( - range1, - range2, + return _rewind( + arg0, ); } - late final _NSUnionRangePtr = - _lookup>( - 'NSUnionRange'); - late final _NSUnionRange = - _NSUnionRangePtr.asFunction(); + late final _rewindPtr = + _lookup)>>( + 'rewind'); + late final _rewind = + _rewindPtr.asFunction)>(); - NSRange NSIntersectionRange( - NSRange range1, - NSRange range2, + int scanf( + ffi.Pointer arg0, ) { - return _NSIntersectionRange( - range1, - range2, + return _scanf( + arg0, ); } - late final _NSIntersectionRangePtr = - _lookup>( - 'NSIntersectionRange'); - late final _NSIntersectionRange = - _NSIntersectionRangePtr.asFunction(); + late final _scanfPtr = + _lookup)>>( + 'scanf'); + late final _scanf = + _scanfPtr.asFunction)>(); - NSString NSStringFromRange( - NSRange range, + void setbuf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return NSString._( - _NSStringFromRange( - range, - ), - this, - retain: true, - release: true); + return _setbuf( + arg0, + arg1, + ); } - late final _NSStringFromRangePtr = - _lookup Function(NSRange)>>( - 'NSStringFromRange'); - late final _NSStringFromRange = _NSStringFromRangePtr.asFunction< - ffi.Pointer Function(NSRange)>(); + late final _setbufPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('setbuf'); + late final _setbuf = _setbufPtr + .asFunction, ffi.Pointer)>(); - NSRange NSRangeFromString( - NSString aString, + int setvbuf( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + int arg3, ) { - return _NSRangeFromString( - aString._id, + return _setvbuf( + arg0, + arg1, + arg2, + arg3, ); } - late final _NSRangeFromStringPtr = - _lookup)>>( - 'NSRangeFromString'); - late final _NSRangeFromString = _NSRangeFromStringPtr.asFunction< - NSRange Function(ffi.Pointer)>(); + late final _setvbufPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int, + ffi.Size)>>('setvbuf'); + late final _setvbuf = _setvbufPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int, int)>(); - late final _class_NSMutableIndexSet1 = _getClass1("NSMutableIndexSet"); - late final _sel_addIndexes_1 = _registerName1("addIndexes:"); - void _objc_msgSend_302( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexSet, + int sprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_302( - obj, - sel, - indexSet, + return _sprintf( + arg0, + arg1, ); } - late final __objc_msgSend_302Ptr = _lookup< + late final _sprintfPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_302 = __objc_msgSend_302Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sprintf'); + late final _sprintf = _sprintfPtr + .asFunction, ffi.Pointer)>(); - late final _sel_removeIndexes_1 = _registerName1("removeIndexes:"); - late final _sel_removeAllIndexes1 = _registerName1("removeAllIndexes"); - late final _sel_addIndex_1 = _registerName1("addIndex:"); - void _objc_msgSend_303( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int sscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_303( - obj, - sel, - value, + return _sscanf( + arg0, + arg1, ); } - late final __objc_msgSend_303Ptr = _lookup< + late final _sscanfPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_303 = __objc_msgSend_303Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('sscanf'); + late final _sscanf = _sscanfPtr + .asFunction, ffi.Pointer)>(); - late final _sel_removeIndex_1 = _registerName1("removeIndex:"); - late final _sel_addIndexesInRange_1 = _registerName1("addIndexesInRange:"); - void _objc_msgSend_304( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - ) { - return __objc_msgSend_304( - obj, - sel, - range, - ); + ffi.Pointer tmpfile() { + return _tmpfile(); } - late final __objc_msgSend_304Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_304 = __objc_msgSend_304Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange)>(); + late final _tmpfilePtr = + _lookup Function()>>('tmpfile'); + late final _tmpfile = _tmpfilePtr.asFunction Function()>(); - late final _sel_removeIndexesInRange_1 = - _registerName1("removeIndexesInRange:"); - late final _sel_shiftIndexesStartingAtIndex_by_1 = - _registerName1("shiftIndexesStartingAtIndex:by:"); - void _objc_msgSend_305( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - int delta, + ffi.Pointer tmpnam( + ffi.Pointer arg0, ) { - return __objc_msgSend_305( - obj, - sel, - index, - delta, + return _tmpnam( + arg0, ); } - late final __objc_msgSend_305Ptr = _lookup< + late final _tmpnamPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_305 = __objc_msgSend_305Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + ffi.Pointer Function(ffi.Pointer)>>('tmpnam'); + late final _tmpnam = _tmpnamPtr + .asFunction Function(ffi.Pointer)>(); - late final _class_NSMutableArray1 = _getClass1("NSMutableArray"); - late final _sel_addObject_1 = _registerName1("addObject:"); - late final _sel_insertObject_atIndex_1 = - _registerName1("insertObject:atIndex:"); - void _objc_msgSend_306( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - int index, + int ungetc( + int arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_306( - obj, - sel, - anObject, - index, + return _ungetc( + arg0, + arg1, ); } - late final __objc_msgSend_306Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_306 = __objc_msgSend_306Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + late final _ungetcPtr = + _lookup)>>( + 'ungetc'); + late final _ungetc = + _ungetcPtr.asFunction)>(); - late final _sel_removeLastObject1 = _registerName1("removeLastObject"); - late final _sel_removeObjectAtIndex_1 = - _registerName1("removeObjectAtIndex:"); - late final _sel_replaceObjectAtIndex_withObject_1 = - _registerName1("replaceObjectAtIndex:withObject:"); - void _objc_msgSend_307( - ffi.Pointer obj, - ffi.Pointer sel, - int index, - ffi.Pointer anObject, + int vfprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return __objc_msgSend_307( - obj, - sel, - index, - anObject, + return _vfprintf( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_307Ptr = _lookup< + late final _vfprintfPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_307 = __objc_msgSend_307Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer, va_list)>>('vfprintf'); + late final _vfprintf = _vfprintfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - late final _sel_initWithCapacity_1 = _registerName1("initWithCapacity:"); - late final _sel_addObjectsFromArray_1 = - _registerName1("addObjectsFromArray:"); - void _objc_msgSend_308( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherArray, + int vprintf( + ffi.Pointer arg0, + va_list arg1, ) { - return __objc_msgSend_308( - obj, - sel, - otherArray, + return _vprintf( + arg0, + arg1, ); } - late final __objc_msgSend_308Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_308 = __objc_msgSend_308Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _vprintfPtr = _lookup< + ffi.NativeFunction, va_list)>>( + 'vprintf'); + late final _vprintf = + _vprintfPtr.asFunction, va_list)>(); - late final _sel_exchangeObjectAtIndex_withObjectAtIndex_1 = - _registerName1("exchangeObjectAtIndex:withObjectAtIndex:"); - void _objc_msgSend_309( - ffi.Pointer obj, - ffi.Pointer sel, - int idx1, - int idx2, + int vsprintf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return __objc_msgSend_309( - obj, - sel, - idx1, - idx2, + return _vsprintf( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_309Ptr = _lookup< + late final _vsprintfPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_309 = __objc_msgSend_309Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('vsprintf'); + late final _vsprintf = _vsprintfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - late final _sel_removeAllObjects1 = _registerName1("removeAllObjects"); - late final _sel_removeObject_inRange_1 = - _registerName1("removeObject:inRange:"); - void _objc_msgSend_310( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - NSRange range, + ffi.Pointer ctermid( + ffi.Pointer arg0, ) { - return __objc_msgSend_310( - obj, - sel, - anObject, - range, + return _ctermid( + arg0, ); } - late final __objc_msgSend_310Ptr = _lookup< + late final _ctermidPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_310 = __objc_msgSend_310Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRange)>(); + ffi.Pointer Function(ffi.Pointer)>>('ctermid'); + late final _ctermid = _ctermidPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_removeObject_1 = _registerName1("removeObject:"); - late final _sel_removeObjectIdenticalTo_inRange_1 = - _registerName1("removeObjectIdenticalTo:inRange:"); - late final _sel_removeObjectIdenticalTo_1 = - _registerName1("removeObjectIdenticalTo:"); - late final _sel_removeObjectsFromIndices_numIndices_1 = - _registerName1("removeObjectsFromIndices:numIndices:"); - void _objc_msgSend_311( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indices, - int cnt, + ffi.Pointer fdopen( + int arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_311( - obj, - sel, - indices, - cnt, + return _fdopen( + arg0, + arg1, ); } - late final __objc_msgSend_311Ptr = _lookup< + late final _fdopenPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_311 = __objc_msgSend_311Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('fdopen'); + late final _fdopen = _fdopenPtr + .asFunction Function(int, ffi.Pointer)>(); - late final _sel_removeObjectsInArray_1 = - _registerName1("removeObjectsInArray:"); - late final _sel_removeObjectsInRange_1 = - _registerName1("removeObjectsInRange:"); - late final _sel_replaceObjectsInRange_withObjectsFromArray_range_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:range:"); - void _objc_msgSend_312( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - ffi.Pointer otherArray, - NSRange otherRange, + int fileno( + ffi.Pointer arg0, ) { - return __objc_msgSend_312( - obj, - sel, - range, - otherArray, - otherRange, + return _fileno( + arg0, ); } - late final __objc_msgSend_312Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_312 = __objc_msgSend_312Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer, NSRange)>(); + late final _filenoPtr = + _lookup)>>( + 'fileno'); + late final _fileno = _filenoPtr.asFunction)>(); - late final _sel_replaceObjectsInRange_withObjectsFromArray_1 = - _registerName1("replaceObjectsInRange:withObjectsFromArray:"); - void _objc_msgSend_313( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - ffi.Pointer otherArray, + int pclose( + ffi.Pointer arg0, ) { - return __objc_msgSend_313( - obj, - sel, - range, - otherArray, + return _pclose( + arg0, ); } - late final __objc_msgSend_313Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_313 = __objc_msgSend_313Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>(); + late final _pclosePtr = + _lookup)>>( + 'pclose'); + late final _pclose = _pclosePtr.asFunction)>(); - late final _sel_setArray_1 = _registerName1("setArray:"); - late final _sel_sortUsingFunction_context_1 = - _registerName1("sortUsingFunction:context:"); - void _objc_msgSend_314( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context, + ffi.Pointer popen( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_314( - obj, - sel, - compare, - context, + return _popen( + arg0, + arg1, ); } - late final __objc_msgSend_314Ptr = _lookup< + late final _popenPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_314 = __objc_msgSend_314Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('popen'); + late final _popen = _popenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_sortUsingSelector_1 = _registerName1("sortUsingSelector:"); - late final _sel_insertObjects_atIndexes_1 = - _registerName1("insertObjects:atIndexes:"); - void _objc_msgSend_315( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer objects, - ffi.Pointer indexes, + int __srget( + ffi.Pointer arg0, ) { - return __objc_msgSend_315( - obj, - sel, - objects, - indexes, + return ___srget( + arg0, ); } - late final __objc_msgSend_315Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_315 = __objc_msgSend_315Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removeObjectsAtIndexes_1 = - _registerName1("removeObjectsAtIndexes:"); - late final _sel_replaceObjectsAtIndexes_withObjects_1 = - _registerName1("replaceObjectsAtIndexes:withObjects:"); - void _objc_msgSend_316( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer indexes, - ffi.Pointer objects, - ) { - return __objc_msgSend_316( - obj, - sel, - indexes, - objects, - ); - } + late final ___srgetPtr = + _lookup)>>( + '__srget'); + late final ___srget = + ___srgetPtr.asFunction)>(); - late final __objc_msgSend_316Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_316 = __objc_msgSend_316Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setObject_atIndexedSubscript_1 = - _registerName1("setObject:atIndexedSubscript:"); - late final _sel_sortUsingComparator_1 = - _registerName1("sortUsingComparator:"); - void _objc_msgSend_317( - ffi.Pointer obj, - ffi.Pointer sel, - NSComparator cmptr, - ) { - return __objc_msgSend_317( - obj, - sel, - cmptr, + int __svfscanf( + ffi.Pointer arg0, + ffi.Pointer arg1, + va_list arg2, + ) { + return ___svfscanf( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_317Ptr = _lookup< + late final ___svfscanfPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_317 = __objc_msgSend_317Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, NSComparator)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('__svfscanf'); + late final ___svfscanf = ___svfscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - late final _sel_sortWithOptions_usingComparator_1 = - _registerName1("sortWithOptions:usingComparator:"); - void _objc_msgSend_318( - ffi.Pointer obj, - ffi.Pointer sel, - int opts, - NSComparator cmptr, + int __swbuf( + int arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_318( - obj, - sel, - opts, - cmptr, + return ___swbuf( + arg0, + arg1, ); } - late final __objc_msgSend_318Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, NSComparator)>>('objc_msgSend'); - late final __objc_msgSend_318 = __objc_msgSend_318Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, int, NSComparator)>(); + late final ___swbufPtr = + _lookup)>>( + '__swbuf'); + late final ___swbuf = + ___swbufPtr.asFunction)>(); - late final _sel_arrayWithCapacity_1 = _registerName1("arrayWithCapacity:"); - ffi.Pointer _objc_msgSend_319( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, + void flockfile( + ffi.Pointer arg0, ) { - return __objc_msgSend_319( - obj, - sel, - path, + return _flockfile( + arg0, ); } - late final __objc_msgSend_319Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_319 = __objc_msgSend_319Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _flockfilePtr = + _lookup)>>( + 'flockfile'); + late final _flockfile = + _flockfilePtr.asFunction)>(); - ffi.Pointer _objc_msgSend_320( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + int ftrylockfile( + ffi.Pointer arg0, ) { - return __objc_msgSend_320( - obj, - sel, - url, + return _ftrylockfile( + arg0, ); } - late final __objc_msgSend_320Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_320 = __objc_msgSend_320Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _ftrylockfilePtr = + _lookup)>>( + 'ftrylockfile'); + late final _ftrylockfile = + _ftrylockfilePtr.asFunction)>(); - late final _sel_applyDifference_1 = _registerName1("applyDifference:"); - void _objc_msgSend_321( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer difference, + void funlockfile( + ffi.Pointer arg0, ) { - return __objc_msgSend_321( - obj, - sel, - difference, + return _funlockfile( + arg0, ); } - late final __objc_msgSend_321Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_321 = __objc_msgSend_321Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _funlockfilePtr = + _lookup)>>( + 'funlockfile'); + late final _funlockfile = + _funlockfilePtr.asFunction)>(); - late final _class_NSMutableData1 = _getClass1("NSMutableData"); - late final _sel_mutableBytes1 = _registerName1("mutableBytes"); - late final _sel_setLength_1 = _registerName1("setLength:"); - void _objc_msgSend_322( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int getc_unlocked( + ffi.Pointer arg0, ) { - return __objc_msgSend_322( - obj, - sel, - value, + return _getc_unlocked( + arg0, ); } - late final __objc_msgSend_322Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_322 = __objc_msgSend_322Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _getc_unlockedPtr = + _lookup)>>( + 'getc_unlocked'); + late final _getc_unlocked = + _getc_unlockedPtr.asFunction)>(); - late final _sel_appendBytes_length_1 = _registerName1("appendBytes:length:"); - late final _sel_appendData_1 = _registerName1("appendData:"); - void _objc_msgSend_323( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, - ) { - return __objc_msgSend_323( - obj, - sel, - other, - ); + int getchar_unlocked() { + return _getchar_unlocked(); } - late final __objc_msgSend_323Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_323 = __objc_msgSend_323Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _getchar_unlockedPtr = + _lookup>('getchar_unlocked'); + late final _getchar_unlocked = + _getchar_unlockedPtr.asFunction(); - late final _sel_increaseLengthBy_1 = _registerName1("increaseLengthBy:"); - late final _sel_replaceBytesInRange_withBytes_1 = - _registerName1("replaceBytesInRange:withBytes:"); - void _objc_msgSend_324( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - ffi.Pointer bytes, + int putc_unlocked( + int arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_324( - obj, - sel, - range, - bytes, + return _putc_unlocked( + arg0, + arg1, ); } - late final __objc_msgSend_324Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_324 = __objc_msgSend_324Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>(); + late final _putc_unlockedPtr = + _lookup)>>( + 'putc_unlocked'); + late final _putc_unlocked = + _putc_unlockedPtr.asFunction)>(); - late final _sel_resetBytesInRange_1 = _registerName1("resetBytesInRange:"); - late final _sel_setData_1 = _registerName1("setData:"); - late final _sel_replaceBytesInRange_withBytes_length_1 = - _registerName1("replaceBytesInRange:withBytes:length:"); - void _objc_msgSend_325( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - ffi.Pointer replacementBytes, - int replacementLength, + int putchar_unlocked( + int arg0, ) { - return __objc_msgSend_325( - obj, - sel, - range, - replacementBytes, - replacementLength, + return _putchar_unlocked( + arg0, ); } - late final __objc_msgSend_325Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_325 = __objc_msgSend_325Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer, int)>(); + late final _putchar_unlockedPtr = + _lookup>( + 'putchar_unlocked'); + late final _putchar_unlocked = + _putchar_unlockedPtr.asFunction(); - late final _sel_dataWithCapacity_1 = _registerName1("dataWithCapacity:"); - instancetype _objc_msgSend_326( - ffi.Pointer obj, - ffi.Pointer sel, - int aNumItems, + int getw( + ffi.Pointer arg0, ) { - return __objc_msgSend_326( - obj, - sel, - aNumItems, + return _getw( + arg0, ); } - late final __objc_msgSend_326Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_326 = __objc_msgSend_326Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _getwPtr = + _lookup)>>('getw'); + late final _getw = _getwPtr.asFunction)>(); - late final _sel_dataWithLength_1 = _registerName1("dataWithLength:"); - late final _sel_initWithLength_1 = _registerName1("initWithLength:"); - late final _sel_decompressUsingAlgorithm_error_1 = - _registerName1("decompressUsingAlgorithm:error:"); - bool _objc_msgSend_327( - ffi.Pointer obj, - ffi.Pointer sel, - int algorithm, - ffi.Pointer> error, + int putw( + int arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_327( - obj, - sel, - algorithm, - error, + return _putw( + arg0, + arg1, ); } - late final __objc_msgSend_327Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_327 = __objc_msgSend_327Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer>)>(); - - late final _sel_compressUsingAlgorithm_error_1 = - _registerName1("compressUsingAlgorithm:error:"); - late final _class_NSPurgeableData1 = _getClass1("NSPurgeableData"); - late final _class_NSMutableDictionary1 = _getClass1("NSMutableDictionary"); - late final _sel_removeObjectForKey_1 = _registerName1("removeObjectForKey:"); - late final _sel_setObject_forKey_1 = _registerName1("setObject:forKey:"); - void _objc_msgSend_328( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anObject, - ffi.Pointer aKey, - ) { - return __objc_msgSend_328( - obj, - sel, - anObject, - aKey, - ); - } + late final _putwPtr = + _lookup)>>( + 'putw'); + late final _putw = + _putwPtr.asFunction)>(); - late final __objc_msgSend_328Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_328 = __objc_msgSend_328Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addEntriesFromDictionary_1 = - _registerName1("addEntriesFromDictionary:"); - void _objc_msgSend_329( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDictionary, - ) { - return __objc_msgSend_329( - obj, - sel, - otherDictionary, + ffi.Pointer tempnam( + ffi.Pointer __dir, + ffi.Pointer __prefix, + ) { + return _tempnam( + __dir, + __prefix, ); } - late final __objc_msgSend_329Ptr = _lookup< + late final _tempnamPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_329 = __objc_msgSend_329Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('tempnam'); + late final _tempnam = _tempnamPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_removeObjectsForKeys_1 = - _registerName1("removeObjectsForKeys:"); - late final _sel_setDictionary_1 = _registerName1("setDictionary:"); - late final _sel_setObject_forKeyedSubscript_1 = - _registerName1("setObject:forKeyedSubscript:"); - void _objc_msgSend_330( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer obj1, - ffi.Pointer key, + int fseeko( + ffi.Pointer __stream, + int __offset, + int __whence, ) { - return __objc_msgSend_330( - obj, - sel, - obj1, - key, - ); - } - - late final __objc_msgSend_330Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_330 = __objc_msgSend_330Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dictionaryWithCapacity_1 = - _registerName1("dictionaryWithCapacity:"); - ffi.Pointer _objc_msgSend_331( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer path, - ) { - return __objc_msgSend_331( - obj, - sel, - path, + return _fseeko( + __stream, + __offset, + __whence, ); } - late final __objc_msgSend_331Ptr = _lookup< + late final _fseekoPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_331 = __objc_msgSend_331Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, off_t, ffi.Int)>>('fseeko'); + late final _fseeko = + _fseekoPtr.asFunction, int, int)>(); - ffi.Pointer _objc_msgSend_332( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, + int ftello( + ffi.Pointer __stream, ) { - return __objc_msgSend_332( - obj, - sel, - url, + return _ftello( + __stream, ); } - late final __objc_msgSend_332Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_332 = __objc_msgSend_332Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _ftelloPtr = + _lookup)>>('ftello'); + late final _ftello = _ftelloPtr.asFunction)>(); - late final _sel_dictionaryWithSharedKeySet_1 = - _registerName1("dictionaryWithSharedKeySet:"); - ffi.Pointer _objc_msgSend_333( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer keyset, + int snprintf( + ffi.Pointer __str, + int __size, + ffi.Pointer __format, ) { - return __objc_msgSend_333( - obj, - sel, - keyset, + return _snprintf( + __str, + __size, + __format, ); } - late final __objc_msgSend_333Ptr = _lookup< + late final _snprintfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_333 = __objc_msgSend_333Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer)>>('snprintf'); + late final _snprintf = _snprintfPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); - late final _class_NSCachedURLResponse1 = _getClass1("NSCachedURLResponse"); - late final _class_NSURLResponse1 = _getClass1("NSURLResponse"); - late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1 = - _registerName1( - "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); - instancetype _objc_msgSend_334( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - ffi.Pointer MIMEType, - int length, - ffi.Pointer name, + int vfscanf( + ffi.Pointer __stream, + ffi.Pointer __format, + va_list arg2, ) { - return __objc_msgSend_334( - obj, - sel, - URL, - MIMEType, - length, - name, - ); - } - - late final __objc_msgSend_334Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_334 = __objc_msgSend_334Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_URL1 = _registerName1("URL"); - late final _sel_MIMEType1 = _registerName1("MIMEType"); - late final _sel_expectedContentLength1 = - _registerName1("expectedContentLength"); - late final _sel_textEncodingName1 = _registerName1("textEncodingName"); - late final _sel_suggestedFilename1 = _registerName1("suggestedFilename"); - late final _sel_initWithResponse_data_1 = - _registerName1("initWithResponse:data:"); - instancetype _objc_msgSend_335( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer response, - ffi.Pointer data, - ) { - return __objc_msgSend_335( - obj, - sel, - response, - data, + return _vfscanf( + __stream, + __format, + arg2, ); } - late final __objc_msgSend_335Ptr = _lookup< + late final _vfscanfPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_335 = __objc_msgSend_335Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_initWithResponse_data_userInfo_storagePolicy_1 = - _registerName1("initWithResponse:data:userInfo:storagePolicy:"); - instancetype _objc_msgSend_336( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer response, - ffi.Pointer data, - ffi.Pointer userInfo, - int storagePolicy, - ) { - return __objc_msgSend_336( - obj, - sel, - response, - data, - userInfo, - storagePolicy, - ); - } - - late final __objc_msgSend_336Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_336 = __objc_msgSend_336Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer, va_list)>>('vfscanf'); + late final _vfscanf = _vfscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - late final _sel_response1 = _registerName1("response"); - ffi.Pointer _objc_msgSend_337( - ffi.Pointer obj, - ffi.Pointer sel, + int vscanf( + ffi.Pointer __format, + va_list arg1, ) { - return __objc_msgSend_337( - obj, - sel, + return _vscanf( + __format, + arg1, ); } - late final __objc_msgSend_337Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_337 = __objc_msgSend_337Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _vscanfPtr = _lookup< + ffi.NativeFunction, va_list)>>( + 'vscanf'); + late final _vscanf = + _vscanfPtr.asFunction, va_list)>(); - late final _sel_storagePolicy1 = _registerName1("storagePolicy"); - int _objc_msgSend_338( - ffi.Pointer obj, - ffi.Pointer sel, + int vsnprintf( + ffi.Pointer __str, + int __size, + ffi.Pointer __format, + va_list arg3, ) { - return __objc_msgSend_338( - obj, - sel, + return _vsnprintf( + __str, + __size, + __format, + arg3, ); } - late final __objc_msgSend_338Ptr = _lookup< + late final _vsnprintfPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_338 = __objc_msgSend_338Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer, va_list)>>('vsnprintf'); + late final _vsnprintf = _vsnprintfPtr.asFunction< + int Function( + ffi.Pointer, int, ffi.Pointer, va_list)>(); - late final _class_NSURLCache1 = _getClass1("NSURLCache"); - late final _sel_sharedURLCache1 = _registerName1("sharedURLCache"); - ffi.Pointer _objc_msgSend_339( - ffi.Pointer obj, - ffi.Pointer sel, + int vsscanf( + ffi.Pointer __str, + ffi.Pointer __format, + va_list arg2, ) { - return __objc_msgSend_339( - obj, - sel, + return _vsscanf( + __str, + __format, + arg2, ); } - late final __objc_msgSend_339Ptr = _lookup< + late final _vsscanfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_339 = __objc_msgSend_339Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + va_list)>>('vsscanf'); + late final _vsscanf = _vsscanfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - late final _sel_setSharedURLCache_1 = _registerName1("setSharedURLCache:"); - void _objc_msgSend_340( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + int dprintf( + int arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_340( - obj, - sel, - value, + return _dprintf( + arg0, + arg1, ); } - late final __objc_msgSend_340Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_340 = __objc_msgSend_340Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _dprintfPtr = _lookup< + ffi.NativeFunction)>>( + 'dprintf'); + late final _dprintf = + _dprintfPtr.asFunction)>(); - late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_1 = - _registerName1("initWithMemoryCapacity:diskCapacity:diskPath:"); - instancetype _objc_msgSend_341( - ffi.Pointer obj, - ffi.Pointer sel, - int memoryCapacity, - int diskCapacity, - ffi.Pointer path, + int vdprintf( + int arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return __objc_msgSend_341( - obj, - sel, - memoryCapacity, - diskCapacity, - path, + return _vdprintf( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_341Ptr = _lookup< + late final _vdprintfPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSUInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_341 = __objc_msgSend_341Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - int, ffi.Pointer)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, va_list)>>('vdprintf'); + late final _vdprintf = _vdprintfPtr + .asFunction, va_list)>(); - late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_1 = - _registerName1("initWithMemoryCapacity:diskCapacity:directoryURL:"); - instancetype _objc_msgSend_342( - ffi.Pointer obj, - ffi.Pointer sel, - int memoryCapacity, - int diskCapacity, - ffi.Pointer directoryURL, + int getdelim( + ffi.Pointer> __linep, + ffi.Pointer __linecapp, + int __delimiter, + ffi.Pointer __stream, ) { - return __objc_msgSend_342( - obj, - sel, - memoryCapacity, - diskCapacity, - directoryURL, - ); - } - - late final __objc_msgSend_342Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSUInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_342 = __objc_msgSend_342Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, int, - int, ffi.Pointer)>(); - - late final _class_NSURLRequest1 = _getClass1("NSURLRequest"); - late final _sel_requestWithURL_1 = _registerName1("requestWithURL:"); - late final _sel_supportsSecureCoding1 = - _registerName1("supportsSecureCoding"); - late final _sel_requestWithURL_cachePolicy_timeoutInterval_1 = - _registerName1("requestWithURL:cachePolicy:timeoutInterval:"); - instancetype _objc_msgSend_343( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer URL, - int cachePolicy, - double timeoutInterval, - ) { - return __objc_msgSend_343( - obj, - sel, - URL, - cachePolicy, - timeoutInterval, + return _getdelim( + __linep, + __linecapp, + __delimiter, + __stream, ); } - late final __objc_msgSend_343Ptr = _lookup< + late final _getdelimPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_343 = __objc_msgSend_343Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, double)>(); + ssize_t Function(ffi.Pointer>, + ffi.Pointer, ffi.Int, ffi.Pointer)>>('getdelim'); + late final _getdelim = _getdelimPtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + int, ffi.Pointer)>(); - late final _sel_initWithURL_1 = _registerName1("initWithURL:"); - late final _sel_initWithURL_cachePolicy_timeoutInterval_1 = - _registerName1("initWithURL:cachePolicy:timeoutInterval:"); - late final _sel_cachePolicy1 = _registerName1("cachePolicy"); - int _objc_msgSend_344( - ffi.Pointer obj, - ffi.Pointer sel, + int getline( + ffi.Pointer> __linep, + ffi.Pointer __linecapp, + ffi.Pointer __stream, ) { - return __objc_msgSend_344( - obj, - sel, + return _getline( + __linep, + __linecapp, + __stream, ); } - late final __objc_msgSend_344Ptr = _lookup< + late final _getlinePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_344 = __objc_msgSend_344Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ssize_t Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>('getline'); + late final _getline = _getlinePtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_timeoutInterval1 = _registerName1("timeoutInterval"); - late final _sel_mainDocumentURL1 = _registerName1("mainDocumentURL"); - late final _sel_networkServiceType1 = _registerName1("networkServiceType"); - int _objc_msgSend_345( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer fmemopen( + ffi.Pointer __buf, + int __size, + ffi.Pointer __mode, ) { - return __objc_msgSend_345( - obj, - sel, + return _fmemopen( + __buf, + __size, + __mode, ); } - late final __objc_msgSend_345Ptr = _lookup< + late final _fmemopenPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_345 = __objc_msgSend_345Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Pointer)>>('fmemopen'); + late final _fmemopen = _fmemopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer)>(); - late final _sel_allowsCellularAccess1 = - _registerName1("allowsCellularAccess"); - late final _sel_allowsExpensiveNetworkAccess1 = - _registerName1("allowsExpensiveNetworkAccess"); - late final _sel_allowsConstrainedNetworkAccess1 = - _registerName1("allowsConstrainedNetworkAccess"); - late final _sel_assumesHTTP3Capable1 = _registerName1("assumesHTTP3Capable"); - late final _sel_attribution1 = _registerName1("attribution"); - int _objc_msgSend_346( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer open_memstream( + ffi.Pointer> __bufp, + ffi.Pointer __sizep, ) { - return __objc_msgSend_346( - obj, - sel, + return _open_memstream( + __bufp, + __sizep, ); } - late final __objc_msgSend_346Ptr = _lookup< + late final _open_memstreamPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_346 = __objc_msgSend_346Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer>, + ffi.Pointer)>>('open_memstream'); + late final _open_memstream = _open_memstreamPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer>, ffi.Pointer)>(); + + late final ffi.Pointer _sys_nerr = _lookup('sys_nerr'); + + int get sys_nerr => _sys_nerr.value; + + late final ffi.Pointer>> _sys_errlist = + _lookup>>('sys_errlist'); + + ffi.Pointer> get sys_errlist => _sys_errlist.value; + + set sys_errlist(ffi.Pointer> value) => + _sys_errlist.value = value; - late final _sel_requiresDNSSECValidation1 = - _registerName1("requiresDNSSECValidation"); - late final _sel_HTTPMethod1 = _registerName1("HTTPMethod"); - late final _sel_allHTTPHeaderFields1 = _registerName1("allHTTPHeaderFields"); - late final _sel_valueForHTTPHeaderField_1 = - _registerName1("valueForHTTPHeaderField:"); - ffi.Pointer _objc_msgSend_347( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer field, + int asprintf( + ffi.Pointer> arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_347( - obj, - sel, - field, + return _asprintf( + arg0, + arg1, ); } - late final __objc_msgSend_347Ptr = _lookup< + late final _asprintfPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_347 = __objc_msgSend_347Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer>, + ffi.Pointer)>>('asprintf'); + late final _asprintf = _asprintfPtr.asFunction< + int Function( + ffi.Pointer>, ffi.Pointer)>(); - late final _sel_HTTPBody1 = _registerName1("HTTPBody"); - ffi.Pointer _objc_msgSend_348( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer ctermid_r( + ffi.Pointer arg0, ) { - return __objc_msgSend_348( - obj, - sel, + return _ctermid_r( + arg0, ); } - late final __objc_msgSend_348Ptr = _lookup< + late final _ctermid_rPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_348 = __objc_msgSend_348Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer)>>('ctermid_r'); + late final _ctermid_r = _ctermid_rPtr + .asFunction Function(ffi.Pointer)>(); - late final _class_NSInputStream1 = _getClass1("NSInputStream"); - late final _class_NSStream1 = _getClass1("NSStream"); - late final _sel_open1 = _registerName1("open"); - late final _sel_close1 = _registerName1("close"); - late final _sel_delegate1 = _registerName1("delegate"); - late final _sel_setDelegate_1 = _registerName1("setDelegate:"); - void _objc_msgSend_349( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer fgetln( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_349( - obj, - sel, - value, + return _fgetln( + arg0, + arg1, ); } - late final __objc_msgSend_349Ptr = _lookup< + late final _fgetlnPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_349 = __objc_msgSend_349Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fgetln'); + late final _fgetln = _fgetlnPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - bool _objc_msgSend_350( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer property, - NSStreamPropertyKey key, + ffi.Pointer fmtcheck( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_350( - obj, - sel, - property, - key, + return _fmtcheck( + arg0, + arg1, ); } - late final __objc_msgSend_350Ptr = _lookup< + late final _fmtcheckPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSStreamPropertyKey)>>('objc_msgSend'); - late final __objc_msgSend_350 = __objc_msgSend_350Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSStreamPropertyKey)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('fmtcheck'); + late final _fmtcheck = _fmtcheckPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _class_NSRunLoop1 = _getClass1("NSRunLoop"); - late final _sel_scheduleInRunLoop_forMode_1 = - _registerName1("scheduleInRunLoop:forMode:"); - void _objc_msgSend_351( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aRunLoop, - NSRunLoopMode mode, + int fpurge( + ffi.Pointer arg0, ) { - return __objc_msgSend_351( - obj, - sel, - aRunLoop, - mode, + return _fpurge( + arg0, ); } - late final __objc_msgSend_351Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRunLoopMode)>>('objc_msgSend'); - late final __objc_msgSend_351 = __objc_msgSend_351Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSRunLoopMode)>(); + late final _fpurgePtr = + _lookup)>>( + 'fpurge'); + late final _fpurge = _fpurgePtr.asFunction)>(); - late final _sel_removeFromRunLoop_forMode_1 = - _registerName1("removeFromRunLoop:forMode:"); - late final _sel_streamStatus1 = _registerName1("streamStatus"); - int _objc_msgSend_352( - ffi.Pointer obj, - ffi.Pointer sel, + void setbuffer( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_352( - obj, - sel, + return _setbuffer( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_352Ptr = _lookup< + late final _setbufferPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_352 = __objc_msgSend_352Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>('setbuffer'); + late final _setbuffer = _setbufferPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_streamError1 = _registerName1("streamError"); - ffi.Pointer _objc_msgSend_353( - ffi.Pointer obj, - ffi.Pointer sel, + int setlinebuf( + ffi.Pointer arg0, ) { - return __objc_msgSend_353( - obj, - sel, + return _setlinebuf( + arg0, ); } - late final __objc_msgSend_353Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_353 = __objc_msgSend_353Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _setlinebufPtr = + _lookup)>>( + 'setlinebuf'); + late final _setlinebuf = + _setlinebufPtr.asFunction)>(); - late final _class_NSOutputStream1 = _getClass1("NSOutputStream"); - late final _sel_write_maxLength_1 = _registerName1("write:maxLength:"); - int _objc_msgSend_354( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int len, + int vasprintf( + ffi.Pointer> arg0, + ffi.Pointer arg1, + va_list arg2, ) { - return __objc_msgSend_354( - obj, - sel, - buffer, - len, + return _vasprintf( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_354Ptr = _lookup< + late final _vasprintfPtr = _lookup< ffi.NativeFunction< - NSInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_354 = __objc_msgSend_354Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer>, + ffi.Pointer, va_list)>>('vasprintf'); + late final _vasprintf = _vasprintfPtr.asFunction< + int Function(ffi.Pointer>, ffi.Pointer, + va_list)>(); - late final _sel_hasSpaceAvailable1 = _registerName1("hasSpaceAvailable"); - late final _sel_initToMemory1 = _registerName1("initToMemory"); - late final _sel_initToBuffer_capacity_1 = - _registerName1("initToBuffer:capacity:"); - instancetype _objc_msgSend_355( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer buffer, - int capacity, + ffi.Pointer funopen( + ffi.Pointer arg0, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> + arg1, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> + arg2, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> + arg3, + ffi.Pointer)>> + arg4, ) { - return __objc_msgSend_355( - obj, - sel, - buffer, - capacity, + return _funopen( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final __objc_msgSend_355Ptr = _lookup< + late final _funopenPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_355 = __objc_msgSend_355Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_initWithURL_append_1 = _registerName1("initWithURL:append:"); - instancetype _objc_msgSend_356( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - bool shouldAppend, - ) { - return __objc_msgSend_356( - obj, - sel, - url, - shouldAppend, - ); - } - - late final __objc_msgSend_356Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_356 = __objc_msgSend_356Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); - - late final _sel_initToFileAtPath_append_1 = - _registerName1("initToFileAtPath:append:"); - late final _sel_outputStreamToMemory1 = - _registerName1("outputStreamToMemory"); - late final _sel_outputStreamToBuffer_capacity_1 = - _registerName1("outputStreamToBuffer:capacity:"); - late final _sel_outputStreamToFileAtPath_append_1 = - _registerName1("outputStreamToFileAtPath:append:"); - late final _sel_outputStreamWithURL_append_1 = - _registerName1("outputStreamWithURL:append:"); - late final _sel_getStreamsToHostWithName_port_inputStream_outputStream_1 = - _registerName1("getStreamsToHostWithName:port:inputStream:outputStream:"); - void _objc_msgSend_357( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, - ) { - return __objc_msgSend_357( - obj, - sel, - hostname, - port, - inputStream, - outputStream, - ); - } + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer)>>)>>('funopen'); + late final _funopen = _funopenPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, + ffi.Pointer< + ffi.NativeFunction)>>)>(); - late final __objc_msgSend_357Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_357 = __objc_msgSend_357Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _class_NSHost1 = _getClass1("NSHost"); - late final _sel_getStreamsToHost_port_inputStream_outputStream_1 = - _registerName1("getStreamsToHost:port:inputStream:outputStream:"); - void _objc_msgSend_358( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, + int __sprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, ) { - return __objc_msgSend_358( - obj, - sel, - host, - port, - inputStream, - outputStream, + return ___sprintf_chk( + arg0, + arg1, + arg2, + arg3, ); } - late final __objc_msgSend_358Ptr = _lookup< + late final ___sprintf_chkPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_358 = __objc_msgSend_358Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1 = - _registerName1("getBoundStreamsWithBufferSize:inputStream:outputStream:"); - void _objc_msgSend_359( - ffi.Pointer obj, - ffi.Pointer sel, - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream, + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, + ffi.Pointer)>>('__sprintf_chk'); + late final ___sprintf_chk = ___sprintf_chkPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + + int __snprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, + ffi.Pointer arg4, ) { - return __objc_msgSend_359( - obj, - sel, - bufferSize, - inputStream, - outputStream, + return ___snprintf_chk( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final __objc_msgSend_359Ptr = _lookup< + late final ___snprintf_chkPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - ffi.Pointer>, - ffi.Pointer>)>>('objc_msgSend'); - late final __objc_msgSend_359 = __objc_msgSend_359Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer>)>(); - - late final _sel_read_maxLength_1 = _registerName1("read:maxLength:"); - late final _sel_getBuffer_length_1 = _registerName1("getBuffer:length:"); - bool _objc_msgSend_360( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer> buffer, - ffi.Pointer len, - ) { - return __objc_msgSend_360( - obj, - sel, - buffer, - len, - ); - } + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, + ffi.Pointer)>>('__snprintf_chk'); + late final ___snprintf_chk = ___snprintf_chkPtr.asFunction< + int Function( + ffi.Pointer, int, int, int, ffi.Pointer)>(); - late final __objc_msgSend_360Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_360 = __objc_msgSend_360Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - late final _sel_hasBytesAvailable1 = _registerName1("hasBytesAvailable"); - late final _sel_initWithFileAtPath_1 = _registerName1("initWithFileAtPath:"); - late final _sel_inputStreamWithData_1 = - _registerName1("inputStreamWithData:"); - instancetype _objc_msgSend_361( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_361( - obj, - sel, - data, + int __vsprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, + va_list arg4, + ) { + return ___vsprintf_chk( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final __objc_msgSend_361Ptr = _lookup< + late final ___vsprintf_chkPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_361 = __objc_msgSend_361Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, + ffi.Pointer, va_list)>>('__vsprintf_chk'); + late final ___vsprintf_chk = ___vsprintf_chkPtr.asFunction< + int Function( + ffi.Pointer, int, int, ffi.Pointer, va_list)>(); - late final _sel_inputStreamWithFileAtPath_1 = - _registerName1("inputStreamWithFileAtPath:"); - late final _sel_inputStreamWithURL_1 = _registerName1("inputStreamWithURL:"); - late final _sel_HTTPBodyStream1 = _registerName1("HTTPBodyStream"); - ffi.Pointer _objc_msgSend_362( - ffi.Pointer obj, - ffi.Pointer sel, + int __vsnprintf_chk( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, + ffi.Pointer arg4, + va_list arg5, ) { - return __objc_msgSend_362( - obj, - sel, + return ___vsnprintf_chk( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final __objc_msgSend_362Ptr = _lookup< + late final ___vsnprintf_chkPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_362 = __objc_msgSend_362Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, + ffi.Pointer, va_list)>>('__vsnprintf_chk'); + late final ___vsnprintf_chk = ___vsnprintf_chkPtr.asFunction< + int Function(ffi.Pointer, int, int, int, ffi.Pointer, + va_list)>(); - late final _sel_HTTPShouldHandleCookies1 = - _registerName1("HTTPShouldHandleCookies"); - late final _sel_HTTPShouldUsePipelining1 = - _registerName1("HTTPShouldUsePipelining"); - late final _sel_cachedResponseForRequest_1 = - _registerName1("cachedResponseForRequest:"); - ffi.Pointer _objc_msgSend_363( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, + ffi.Pointer memchr( + ffi.Pointer __s, + int __c, + int __n, ) { - return __objc_msgSend_363( - obj, - sel, - request, + return _memchr( + __s, + __c, + __n, ); } - late final __objc_msgSend_363Ptr = _lookup< + late final _memchrPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_363 = __objc_msgSend_363Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Size)>>('memchr'); + late final _memchr = _memchrPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - late final _sel_storeCachedResponse_forRequest_1 = - _registerName1("storeCachedResponse:forRequest:"); - void _objc_msgSend_364( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cachedResponse, - ffi.Pointer request, + int memcmp( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return __objc_msgSend_364( - obj, - sel, - cachedResponse, - request, + return _memcmp( + __s1, + __s2, + __n, ); } - late final __objc_msgSend_364Ptr = _lookup< + late final _memcmpPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_364 = __objc_msgSend_364Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_removeCachedResponseForRequest_1 = - _registerName1("removeCachedResponseForRequest:"); - void _objc_msgSend_365( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_365( - obj, - sel, - request, + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memcmp'); + late final _memcmp = _memcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer memcpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, + ) { + return _memcpy( + __dst, + __src, + __n, ); } - late final __objc_msgSend_365Ptr = _lookup< + late final _memcpyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_365 = __objc_msgSend_365Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('memcpy'); + late final _memcpy = _memcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeAllCachedResponses1 = - _registerName1("removeAllCachedResponses"); - late final _class_NSDate1 = _getClass1("NSDate"); - late final _sel_timeIntervalSinceReferenceDate1 = - _registerName1("timeIntervalSinceReferenceDate"); - late final _sel_initWithTimeIntervalSinceReferenceDate_1 = - _registerName1("initWithTimeIntervalSinceReferenceDate:"); - instancetype _objc_msgSend_366( - ffi.Pointer obj, - ffi.Pointer sel, - double ti, + ffi.Pointer memmove( + ffi.Pointer __dst, + ffi.Pointer __src, + int __len, ) { - return __objc_msgSend_366( - obj, - sel, - ti, + return _memmove( + __dst, + __src, + __len, ); } - late final __objc_msgSend_366Ptr = _lookup< + late final _memmovePtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSTimeInterval)>>('objc_msgSend'); - late final __objc_msgSend_366 = __objc_msgSend_366Ptr.asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer, double)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('memmove'); + late final _memmove = _memmovePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_timeIntervalSinceDate_1 = - _registerName1("timeIntervalSinceDate:"); - double _objc_msgSend_367( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anotherDate, + ffi.Pointer memset( + ffi.Pointer __b, + int __c, + int __len, ) { - return __objc_msgSend_367( - obj, - sel, - anotherDate, + return _memset( + __b, + __c, + __len, ); } - late final __objc_msgSend_367Ptr = _lookup< + late final _memsetPtr = _lookup< ffi.NativeFunction< - NSTimeInterval Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_367 = __objc_msgSend_367Ptr.asFunction< - double Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int, ffi.Size)>>('memset'); + late final _memset = _memsetPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, int, int)>(); - late final _sel_timeIntervalSinceNow1 = - _registerName1("timeIntervalSinceNow"); - late final _sel_timeIntervalSince19701 = - _registerName1("timeIntervalSince1970"); - late final _sel_addTimeInterval_1 = _registerName1("addTimeInterval:"); - late final _sel_dateByAddingTimeInterval_1 = - _registerName1("dateByAddingTimeInterval:"); - late final _sel_earlierDate_1 = _registerName1("earlierDate:"); - ffi.Pointer _objc_msgSend_368( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer anotherDate, + ffi.Pointer strcat( + ffi.Pointer __s1, + ffi.Pointer __s2, ) { - return __objc_msgSend_368( - obj, - sel, - anotherDate, + return _strcat( + __s1, + __s2, ); } - late final __objc_msgSend_368Ptr = _lookup< + late final _strcatPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_368 = __objc_msgSend_368Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strcat'); + late final _strcat = _strcatPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_laterDate_1 = _registerName1("laterDate:"); - int _objc_msgSend_369( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer other, + ffi.Pointer strchr( + ffi.Pointer __s, + int __c, ) { - return __objc_msgSend_369( - obj, - sel, - other, + return _strchr( + __s, + __c, ); } - late final __objc_msgSend_369Ptr = _lookup< + late final _strchrPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_369 = __objc_msgSend_369Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('strchr'); + late final _strchr = _strchrPtr + .asFunction Function(ffi.Pointer, int)>(); - late final _sel_isEqualToDate_1 = _registerName1("isEqualToDate:"); - bool _objc_msgSend_370( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherDate, + int strcmp( + ffi.Pointer __s1, + ffi.Pointer __s2, ) { - return __objc_msgSend_370( - obj, - sel, - otherDate, + return _strcmp( + __s1, + __s2, ); } - late final __objc_msgSend_370Ptr = _lookup< + late final _strcmpPtr = _lookup< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_370 = __objc_msgSend_370Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcmp'); + late final _strcmp = _strcmpPtr + .asFunction, ffi.Pointer)>(); - late final _sel_date1 = _registerName1("date"); - late final _sel_dateWithTimeIntervalSinceNow_1 = - _registerName1("dateWithTimeIntervalSinceNow:"); - late final _sel_dateWithTimeIntervalSinceReferenceDate_1 = - _registerName1("dateWithTimeIntervalSinceReferenceDate:"); - late final _sel_dateWithTimeIntervalSince1970_1 = - _registerName1("dateWithTimeIntervalSince1970:"); - late final _sel_dateWithTimeInterval_sinceDate_1 = - _registerName1("dateWithTimeInterval:sinceDate:"); - instancetype _objc_msgSend_371( - ffi.Pointer obj, - ffi.Pointer sel, - double secsToBeAdded, - ffi.Pointer date, + int strcoll( + ffi.Pointer __s1, + ffi.Pointer __s2, ) { - return __objc_msgSend_371( - obj, - sel, - secsToBeAdded, - date, + return _strcoll( + __s1, + __s2, ); } - late final __objc_msgSend_371Ptr = _lookup< + late final _strcollPtr = _lookup< ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSTimeInterval, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_371 = __objc_msgSend_371Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - double, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcoll'); + late final _strcoll = _strcollPtr + .asFunction, ffi.Pointer)>(); - late final _sel_distantFuture1 = _registerName1("distantFuture"); - ffi.Pointer _objc_msgSend_372( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer strcpy( + ffi.Pointer __dst, + ffi.Pointer __src, ) { - return __objc_msgSend_372( - obj, - sel, + return _strcpy( + __dst, + __src, ); } - late final __objc_msgSend_372Ptr = _lookup< + late final _strcpyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_372 = __objc_msgSend_372Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strcpy'); + late final _strcpy = _strcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_distantPast1 = _registerName1("distantPast"); - late final _sel_now1 = _registerName1("now"); - late final _sel_initWithTimeIntervalSinceNow_1 = - _registerName1("initWithTimeIntervalSinceNow:"); - late final _sel_initWithTimeIntervalSince1970_1 = - _registerName1("initWithTimeIntervalSince1970:"); - late final _sel_initWithTimeInterval_sinceDate_1 = - _registerName1("initWithTimeInterval:sinceDate:"); - late final _sel_removeCachedResponsesSinceDate_1 = - _registerName1("removeCachedResponsesSinceDate:"); - void _objc_msgSend_373( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer date, + int strcspn( + ffi.Pointer __s, + ffi.Pointer __charset, ) { - return __objc_msgSend_373( - obj, - sel, - date, + return _strcspn( + __s, + __charset, ); } - late final __objc_msgSend_373Ptr = _lookup< + late final _strcspnPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_373 = __objc_msgSend_373Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>>('strcspn'); + late final _strcspn = _strcspnPtr + .asFunction, ffi.Pointer)>(); - late final _sel_memoryCapacity1 = _registerName1("memoryCapacity"); - late final _sel_setMemoryCapacity_1 = _registerName1("setMemoryCapacity:"); - late final _sel_diskCapacity1 = _registerName1("diskCapacity"); - late final _sel_setDiskCapacity_1 = _registerName1("setDiskCapacity:"); - late final _sel_currentMemoryUsage1 = _registerName1("currentMemoryUsage"); - late final _sel_currentDiskUsage1 = _registerName1("currentDiskUsage"); - late final _class_NSURLSessionDataTask1 = _getClass1("NSURLSessionDataTask"); - late final _class_NSURLSessionTask1 = _getClass1("NSURLSessionTask"); - late final _sel_taskIdentifier1 = _registerName1("taskIdentifier"); - late final _sel_originalRequest1 = _registerName1("originalRequest"); - ffi.Pointer _objc_msgSend_374( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer strerror( + int __errnum, ) { - return __objc_msgSend_374( - obj, - sel, + return _strerror( + __errnum, ); } - late final __objc_msgSend_374Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_374 = __objc_msgSend_374Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _strerrorPtr = + _lookup Function(ffi.Int)>>( + 'strerror'); + late final _strerror = + _strerrorPtr.asFunction Function(int)>(); - late final _sel_currentRequest1 = _registerName1("currentRequest"); - ffi.Pointer _objc_msgSend_375( - ffi.Pointer obj, - ffi.Pointer sel, + int strlen( + ffi.Pointer __s, ) { - return __objc_msgSend_375( - obj, - sel, + return _strlen( + __s, ); } - late final __objc_msgSend_375Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_375 = __objc_msgSend_375Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _strlenPtr = _lookup< + ffi.NativeFunction)>>( + 'strlen'); + late final _strlen = + _strlenPtr.asFunction)>(); - late final _class_NSProgress1 = _getClass1("NSProgress"); - late final _sel_currentProgress1 = _registerName1("currentProgress"); - ffi.Pointer _objc_msgSend_376( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer strncat( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return __objc_msgSend_376( - obj, - sel, + return _strncat( + __s1, + __s2, + __n, ); } - late final __objc_msgSend_376Ptr = _lookup< + late final _strncatPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_376 = __objc_msgSend_376Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strncat'); + late final _strncat = _strncatPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_progressWithTotalUnitCount_1 = - _registerName1("progressWithTotalUnitCount:"); - ffi.Pointer _objc_msgSend_377( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, + int strncmp( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return __objc_msgSend_377( - obj, - sel, - unitCount, + return _strncmp( + __s1, + __s2, + __n, ); } - late final __objc_msgSend_377Ptr = _lookup< + late final _strncmpPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_377 = __objc_msgSend_377Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('strncmp'); + late final _strncmp = _strncmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_discreteProgressWithTotalUnitCount_1 = - _registerName1("discreteProgressWithTotalUnitCount:"); - late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_1 = - _registerName1("progressWithTotalUnitCount:parent:pendingUnitCount:"); - ffi.Pointer _objc_msgSend_378( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, - ffi.Pointer parent, - int portionOfParentTotalUnitCount, + ffi.Pointer strncpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, ) { - return __objc_msgSend_378( - obj, - sel, - unitCount, - parent, - portionOfParentTotalUnitCount, + return _strncpy( + __dst, + __src, + __n, ); } - late final __objc_msgSend_378Ptr = _lookup< + late final _strncpyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_378 = __objc_msgSend_378Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); - - late final _sel_initWithParent_userInfo_1 = - _registerName1("initWithParent:userInfo:"); - instancetype _objc_msgSend_379( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer parentProgressOrNil, - ffi.Pointer userInfoOrNil, - ) { - return __objc_msgSend_379( - obj, - sel, - parentProgressOrNil, - userInfoOrNil, + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strncpy'); + late final _strncpy = _strncpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + ffi.Pointer strpbrk( + ffi.Pointer __s, + ffi.Pointer __charset, + ) { + return _strpbrk( + __s, + __charset, ); } - late final __objc_msgSend_379Ptr = _lookup< + late final _strpbrkPtr = _lookup< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_379 = __objc_msgSend_379Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strpbrk'); + late final _strpbrk = _strpbrkPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_becomeCurrentWithPendingUnitCount_1 = - _registerName1("becomeCurrentWithPendingUnitCount:"); - void _objc_msgSend_380( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, + ffi.Pointer strrchr( + ffi.Pointer __s, + int __c, ) { - return __objc_msgSend_380( - obj, - sel, - unitCount, + return _strrchr( + __s, + __c, ); } - late final __objc_msgSend_380Ptr = _lookup< + late final _strrchrPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_380 = __objc_msgSend_380Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('strrchr'); + late final _strrchr = _strrchrPtr + .asFunction Function(ffi.Pointer, int)>(); - late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_1 = - _registerName1("performAsCurrentWithPendingUnitCount:usingBlock:"); - void _objc_msgSend_381( - ffi.Pointer obj, - ffi.Pointer sel, - int unitCount, - ffi.Pointer<_ObjCBlock> work, + int strspn( + ffi.Pointer __s, + ffi.Pointer __charset, ) { - return __objc_msgSend_381( - obj, - sel, - unitCount, - work, + return _strspn( + __s, + __charset, ); } - late final __objc_msgSend_381Ptr = _lookup< + late final _strspnPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64, ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_381 = __objc_msgSend_381Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.UnsignedLong Function( + ffi.Pointer, ffi.Pointer)>>('strspn'); + late final _strspn = _strspnPtr + .asFunction, ffi.Pointer)>(); - late final _sel_resignCurrent1 = _registerName1("resignCurrent"); - late final _sel_addChild_withPendingUnitCount_1 = - _registerName1("addChild:withPendingUnitCount:"); - void _objc_msgSend_382( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer child, - int inUnitCount, + ffi.Pointer strstr( + ffi.Pointer __big, + ffi.Pointer __little, ) { - return __objc_msgSend_382( - obj, - sel, - child, - inUnitCount, + return _strstr( + __big, + __little, ); } - late final __objc_msgSend_382Ptr = _lookup< + late final _strstrPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_382 = __objc_msgSend_382Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strstr'); + late final _strstr = _strstrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_totalUnitCount1 = _registerName1("totalUnitCount"); - int _objc_msgSend_383( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer strtok( + ffi.Pointer __str, + ffi.Pointer __sep, ) { - return __objc_msgSend_383( - obj, - sel, + return _strtok( + __str, + __sep, ); } - late final __objc_msgSend_383Ptr = _lookup< + late final _strtokPtr = _lookup< ffi.NativeFunction< - ffi.Int64 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_383 = __objc_msgSend_383Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strtok'); + late final _strtok = _strtokPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_setTotalUnitCount_1 = _registerName1("setTotalUnitCount:"); - void _objc_msgSend_384( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int strxfrm( + ffi.Pointer __s1, + ffi.Pointer __s2, + int __n, ) { - return __objc_msgSend_384( - obj, - sel, - value, + return _strxfrm( + __s1, + __s2, + __n, ); } - late final __objc_msgSend_384Ptr = _lookup< + late final _strxfrmPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int64)>>('objc_msgSend'); - late final __objc_msgSend_384 = __objc_msgSend_384Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strxfrm'); + late final _strxfrm = _strxfrmPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_completedUnitCount1 = _registerName1("completedUnitCount"); - late final _sel_setCompletedUnitCount_1 = - _registerName1("setCompletedUnitCount:"); - late final _sel_setLocalizedDescription_1 = - _registerName1("setLocalizedDescription:"); - void _objc_msgSend_385( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer strtok_r( + ffi.Pointer __str, + ffi.Pointer __sep, + ffi.Pointer> __lasts, ) { - return __objc_msgSend_385( - obj, - sel, - value, + return _strtok_r( + __str, + __sep, + __lasts, ); } - late final __objc_msgSend_385Ptr = _lookup< + late final _strtok_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_385 = __objc_msgSend_385Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>('strtok_r'); + late final _strtok_r = _strtok_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); - late final _sel_localizedAdditionalDescription1 = - _registerName1("localizedAdditionalDescription"); - late final _sel_setLocalizedAdditionalDescription_1 = - _registerName1("setLocalizedAdditionalDescription:"); - late final _sel_isCancellable1 = _registerName1("isCancellable"); - late final _sel_setCancellable_1 = _registerName1("setCancellable:"); - void _objc_msgSend_386( - ffi.Pointer obj, - ffi.Pointer sel, - bool value, + int strerror_r( + int __errnum, + ffi.Pointer __strerrbuf, + int __buflen, ) { - return __objc_msgSend_386( - obj, - sel, - value, + return _strerror_r( + __errnum, + __strerrbuf, + __buflen, ); } - late final __objc_msgSend_386Ptr = _lookup< + late final _strerror_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_386 = __objc_msgSend_386Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, bool)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('strerror_r'); + late final _strerror_r = _strerror_rPtr + .asFunction, int)>(); - late final _sel_isPausable1 = _registerName1("isPausable"); - late final _sel_setPausable_1 = _registerName1("setPausable:"); - late final _sel_isCancelled1 = _registerName1("isCancelled"); - late final _sel_isPaused1 = _registerName1("isPaused"); - late final _sel_cancellationHandler1 = _registerName1("cancellationHandler"); - ffi.Pointer<_ObjCBlock> _objc_msgSend_387( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer strdup( + ffi.Pointer __s1, ) { - return __objc_msgSend_387( - obj, - sel, + return _strdup( + __s1, ); } - late final __objc_msgSend_387Ptr = _lookup< + late final _strdupPtr = _lookup< ffi.NativeFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_387 = __objc_msgSend_387Ptr.asFunction< - ffi.Pointer<_ObjCBlock> Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer)>>('strdup'); + late final _strdup = _strdupPtr + .asFunction Function(ffi.Pointer)>(); - late final _sel_setCancellationHandler_1 = - _registerName1("setCancellationHandler:"); - void _objc_msgSend_388( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> value, + ffi.Pointer memccpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __c, + int __n, ) { - return __objc_msgSend_388( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_388Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_388 = __objc_msgSend_388Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_pausingHandler1 = _registerName1("pausingHandler"); - late final _sel_setPausingHandler_1 = _registerName1("setPausingHandler:"); - late final _sel_resumingHandler1 = _registerName1("resumingHandler"); - late final _sel_setResumingHandler_1 = _registerName1("setResumingHandler:"); - late final _sel_setUserInfoObject_forKey_1 = - _registerName1("setUserInfoObject:forKey:"); - late final _sel_isIndeterminate1 = _registerName1("isIndeterminate"); - late final _sel_fractionCompleted1 = _registerName1("fractionCompleted"); - late final _sel_isFinished1 = _registerName1("isFinished"); - late final _sel_cancel1 = _registerName1("cancel"); - late final _sel_pause1 = _registerName1("pause"); - late final _sel_resume1 = _registerName1("resume"); - late final _sel_kind1 = _registerName1("kind"); - late final _sel_setKind_1 = _registerName1("setKind:"); - late final _sel_estimatedTimeRemaining1 = - _registerName1("estimatedTimeRemaining"); - late final _sel_setEstimatedTimeRemaining_1 = - _registerName1("setEstimatedTimeRemaining:"); - void _objc_msgSend_389( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_389( - obj, - sel, - value, + return _memccpy( + __dst, + __src, + __c, + __n, ); } - late final __objc_msgSend_389Ptr = _lookup< + late final _memccpyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_389 = __objc_msgSend_389Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int, ffi.Size)>>('memccpy'); + late final _memccpy = _memccpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int, int)>(); - late final _sel_throughput1 = _registerName1("throughput"); - late final _sel_setThroughput_1 = _registerName1("setThroughput:"); - late final _sel_fileOperationKind1 = _registerName1("fileOperationKind"); - late final _sel_setFileOperationKind_1 = - _registerName1("setFileOperationKind:"); - late final _sel_fileURL1 = _registerName1("fileURL"); - late final _sel_setFileURL_1 = _registerName1("setFileURL:"); - void _objc_msgSend_390( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer stpcpy( + ffi.Pointer __dst, + ffi.Pointer __src, ) { - return __objc_msgSend_390( - obj, - sel, - value, + return _stpcpy( + __dst, + __src, ); } - late final __objc_msgSend_390Ptr = _lookup< + late final _stpcpyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_390 = __objc_msgSend_390Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('stpcpy'); + late final _stpcpy = _stpcpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_fileTotalCount1 = _registerName1("fileTotalCount"); - late final _sel_setFileTotalCount_1 = _registerName1("setFileTotalCount:"); - late final _sel_fileCompletedCount1 = _registerName1("fileCompletedCount"); - late final _sel_setFileCompletedCount_1 = - _registerName1("setFileCompletedCount:"); - late final _sel_publish1 = _registerName1("publish"); - late final _sel_unpublish1 = _registerName1("unpublish"); - late final _sel_addSubscriberForFileURL_withPublishingHandler_1 = - _registerName1("addSubscriberForFileURL:withPublishingHandler:"); - ffi.Pointer _objc_msgSend_391( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - NSProgressPublishingHandler publishingHandler, + ffi.Pointer stpncpy( + ffi.Pointer __dst, + ffi.Pointer __src, + int __n, ) { - return __objc_msgSend_391( - obj, - sel, - url, - publishingHandler, + return _stpncpy( + __dst, + __src, + __n, ); } - late final __objc_msgSend_391Ptr = _lookup< + late final _stpncpyPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>>('objc_msgSend'); - late final __objc_msgSend_391 = __objc_msgSend_391Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('stpncpy'); + late final _stpncpy = _stpncpyPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_removeSubscriber_1 = _registerName1("removeSubscriber:"); - late final _sel_isOld1 = _registerName1("isOld"); - late final _sel_progress1 = _registerName1("progress"); - ffi.Pointer _objc_msgSend_392( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer strndup( + ffi.Pointer __s1, + int __n, ) { - return __objc_msgSend_392( - obj, - sel, + return _strndup( + __s1, + __n, ); } - late final __objc_msgSend_392Ptr = _lookup< + late final _strndupPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_392 = __objc_msgSend_392Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('strndup'); + late final _strndup = _strndupPtr + .asFunction Function(ffi.Pointer, int)>(); - late final _sel_earliestBeginDate1 = _registerName1("earliestBeginDate"); - ffi.Pointer _objc_msgSend_393( - ffi.Pointer obj, - ffi.Pointer sel, + int strnlen( + ffi.Pointer __s1, + int __n, ) { - return __objc_msgSend_393( - obj, - sel, + return _strnlen( + __s1, + __n, ); } - late final __objc_msgSend_393Ptr = _lookup< + late final _strnlenPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_393 = __objc_msgSend_393Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Size Function(ffi.Pointer, ffi.Size)>>('strnlen'); + late final _strnlen = + _strnlenPtr.asFunction, int)>(); - late final _sel_setEarliestBeginDate_1 = - _registerName1("setEarliestBeginDate:"); - void _objc_msgSend_394( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer strsignal( + int __sig, ) { - return __objc_msgSend_394( - obj, - sel, - value, + return _strsignal( + __sig, ); } - late final __objc_msgSend_394Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_394 = __objc_msgSend_394Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_countOfBytesClientExpectsToSend1 = - _registerName1("countOfBytesClientExpectsToSend"); - late final _sel_setCountOfBytesClientExpectsToSend_1 = - _registerName1("setCountOfBytesClientExpectsToSend:"); - late final _sel_countOfBytesClientExpectsToReceive1 = - _registerName1("countOfBytesClientExpectsToReceive"); - late final _sel_setCountOfBytesClientExpectsToReceive_1 = - _registerName1("setCountOfBytesClientExpectsToReceive:"); - late final _sel_countOfBytesSent1 = _registerName1("countOfBytesSent"); - late final _sel_countOfBytesReceived1 = - _registerName1("countOfBytesReceived"); - late final _sel_countOfBytesExpectedToSend1 = - _registerName1("countOfBytesExpectedToSend"); - late final _sel_countOfBytesExpectedToReceive1 = - _registerName1("countOfBytesExpectedToReceive"); - late final _sel_taskDescription1 = _registerName1("taskDescription"); - late final _sel_setTaskDescription_1 = _registerName1("setTaskDescription:"); - void _objc_msgSend_395( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_395( - obj, - sel, - value, + late final _strsignalPtr = + _lookup Function(ffi.Int)>>( + 'strsignal'); + late final _strsignal = + _strsignalPtr.asFunction Function(int)>(); + + int memset_s( + ffi.Pointer __s, + int __smax, + int __c, + int __n, + ) { + return _memset_s( + __s, + __smax, + __c, + __n, ); } - late final __objc_msgSend_395Ptr = _lookup< + late final _memset_sPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_395 = __objc_msgSend_395Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + errno_t Function( + ffi.Pointer, rsize_t, ffi.Int, rsize_t)>>('memset_s'); + late final _memset_s = _memset_sPtr + .asFunction, int, int, int)>(); - late final _sel_state1 = _registerName1("state"); - int _objc_msgSend_396( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer memmem( + ffi.Pointer __big, + int __big_len, + ffi.Pointer __little, + int __little_len, ) { - return __objc_msgSend_396( - obj, - sel, + return _memmem( + __big, + __big_len, + __little, + __little_len, ); } - late final __objc_msgSend_396Ptr = _lookup< + late final _memmemPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_396 = __objc_msgSend_396Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer, ffi.Size, + ffi.Pointer, ffi.Size)>>('memmem'); + late final _memmem = _memmemPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, int, ffi.Pointer, int)>(); - late final _sel_error1 = _registerName1("error"); - late final _sel_suspend1 = _registerName1("suspend"); - late final _sel_priority1 = _registerName1("priority"); - late final _sel_setPriority_1 = _registerName1("setPriority:"); - void _objc_msgSend_397( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + void memset_pattern4( + ffi.Pointer __b, + ffi.Pointer __pattern4, + int __len, ) { - return __objc_msgSend_397( - obj, - sel, - value, + return _memset_pattern4( + __b, + __pattern4, + __len, ); } - late final __objc_msgSend_397Ptr = _lookup< + late final _memset_pattern4Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Float)>>('objc_msgSend'); - late final __objc_msgSend_397 = __objc_msgSend_397Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memset_pattern4'); + late final _memset_pattern4 = _memset_pattern4Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_prefersIncrementalDelivery1 = - _registerName1("prefersIncrementalDelivery"); - late final _sel_setPrefersIncrementalDelivery_1 = - _registerName1("setPrefersIncrementalDelivery:"); - late final _sel_storeCachedResponse_forDataTask_1 = - _registerName1("storeCachedResponse:forDataTask:"); - void _objc_msgSend_398( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cachedResponse, - ffi.Pointer dataTask, + void memset_pattern8( + ffi.Pointer __b, + ffi.Pointer __pattern8, + int __len, ) { - return __objc_msgSend_398( - obj, - sel, - cachedResponse, - dataTask, + return _memset_pattern8( + __b, + __pattern8, + __len, ); } - late final __objc_msgSend_398Ptr = _lookup< + late final _memset_pattern8Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_398 = __objc_msgSend_398Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getCachedResponseForDataTask_completionHandler_1 = - _registerName1("getCachedResponseForDataTask:completionHandler:"); - void _objc_msgSend_399( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataTask, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_399( - obj, - sel, - dataTask, - completionHandler, - ); - } + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memset_pattern8'); + late final _memset_pattern8 = _memset_pattern8Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final __objc_msgSend_399Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_399 = __objc_msgSend_399Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_removeCachedResponseForDataTask_1 = - _registerName1("removeCachedResponseForDataTask:"); - void _objc_msgSend_400( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer dataTask, - ) { - return __objc_msgSend_400( - obj, - sel, - dataTask, + void memset_pattern16( + ffi.Pointer __b, + ffi.Pointer __pattern16, + int __len, + ) { + return _memset_pattern16( + __b, + __pattern16, + __len, ); } - late final __objc_msgSend_400Ptr = _lookup< + late final _memset_pattern16Ptr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_400 = __objc_msgSend_400Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('memset_pattern16'); + late final _memset_pattern16 = _memset_pattern16Ptr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _class_NSNotification1 = _getClass1("NSNotification"); - late final _sel_name1 = _registerName1("name"); - late final _sel_initWithName_object_userInfo_1 = - _registerName1("initWithName:object:userInfo:"); - instancetype _objc_msgSend_401( - ffi.Pointer obj, - ffi.Pointer sel, - NSNotificationName name, - ffi.Pointer object, - ffi.Pointer userInfo, + ffi.Pointer strcasestr( + ffi.Pointer __big, + ffi.Pointer __little, ) { - return __objc_msgSend_401( - obj, - sel, - name, - object, - userInfo, - ); - } - - late final __objc_msgSend_401Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_401 = __objc_msgSend_401Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_notificationWithName_object_1 = - _registerName1("notificationWithName:object:"); - late final _sel_notificationWithName_object_userInfo_1 = - _registerName1("notificationWithName:object:userInfo:"); - late final _class_NSNotificationCenter1 = _getClass1("NSNotificationCenter"); - late final _sel_defaultCenter1 = _registerName1("defaultCenter"); - ffi.Pointer _objc_msgSend_402( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_402( - obj, - sel, + return _strcasestr( + __big, + __little, ); } - late final __objc_msgSend_402Ptr = _lookup< + late final _strcasestrPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_402 = __objc_msgSend_402Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('strcasestr'); + late final _strcasestr = _strcasestrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final _sel_addObserver_selector_name_object_1 = - _registerName1("addObserver:selector:name:object:"); - void _objc_msgSend_403( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - ffi.Pointer aSelector, - NSNotificationName aName, - ffi.Pointer anObject, + ffi.Pointer strnstr( + ffi.Pointer __big, + ffi.Pointer __little, + int __len, ) { - return __objc_msgSend_403( - obj, - sel, - observer, - aSelector, - aName, - anObject, + return _strnstr( + __big, + __little, + __len, ); } - late final __objc_msgSend_403Ptr = _lookup< + late final _strnstrPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_403 = __objc_msgSend_403Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer)>(); - - late final _sel_postNotification_1 = _registerName1("postNotification:"); - void _objc_msgSend_404( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer notification, - ) { - return __objc_msgSend_404( - obj, - sel, - notification, + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strnstr'); + late final _strnstr = _strnstrPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, int)>(); + + int strlcat( + ffi.Pointer __dst, + ffi.Pointer __source, + int __size, + ) { + return _strlcat( + __dst, + __source, + __size, ); } - late final __objc_msgSend_404Ptr = _lookup< + late final _strlcatPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_404 = __objc_msgSend_404Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strlcat'); + late final _strlcat = _strlcatPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_postNotificationName_object_1 = - _registerName1("postNotificationName:object:"); - void _objc_msgSend_405( - ffi.Pointer obj, - ffi.Pointer sel, - NSNotificationName aName, - ffi.Pointer anObject, + int strlcpy( + ffi.Pointer __dst, + ffi.Pointer __source, + int __size, ) { - return __objc_msgSend_405( - obj, - sel, - aName, - anObject, + return _strlcpy( + __dst, + __source, + __size, ); } - late final __objc_msgSend_405Ptr = _lookup< + late final _strlcpyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_405 = __objc_msgSend_405Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSNotificationName, ffi.Pointer)>(); + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Size)>>('strlcpy'); + late final _strlcpy = _strlcpyPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_postNotificationName_object_userInfo_1 = - _registerName1("postNotificationName:object:userInfo:"); - void _objc_msgSend_406( - ffi.Pointer obj, - ffi.Pointer sel, - NSNotificationName aName, - ffi.Pointer anObject, - ffi.Pointer aUserInfo, + void strmode( + int __mode, + ffi.Pointer __bp, ) { - return __objc_msgSend_406( - obj, - sel, - aName, - anObject, - aUserInfo, + return _strmode( + __mode, + __bp, ); } - late final __objc_msgSend_406Ptr = _lookup< + late final _strmodePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_406 = __objc_msgSend_406Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_removeObserver_1 = _registerName1("removeObserver:"); - late final _sel_removeObserver_name_object_1 = - _registerName1("removeObserver:name:object:"); - void _objc_msgSend_407( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer observer, - NSNotificationName aName, - ffi.Pointer anObject, - ) { - return __objc_msgSend_407( - obj, - sel, - observer, - aName, - anObject, - ); - } + ffi.Void Function(ffi.Int, ffi.Pointer)>>('strmode'); + late final _strmode = + _strmodePtr.asFunction)>(); - late final __objc_msgSend_407Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_407 = __objc_msgSend_407Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer)>(); - - late final _class_NSOperationQueue1 = _getClass1("NSOperationQueue"); - late final _class_NSOperation1 = _getClass1("NSOperation"); - late final _sel_start1 = _registerName1("start"); - late final _sel_main1 = _registerName1("main"); - late final _sel_isExecuting1 = _registerName1("isExecuting"); - late final _sel_isConcurrent1 = _registerName1("isConcurrent"); - late final _sel_isAsynchronous1 = _registerName1("isAsynchronous"); - late final _sel_isReady1 = _registerName1("isReady"); - late final _sel_addDependency_1 = _registerName1("addDependency:"); - void _objc_msgSend_408( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer op, - ) { - return __objc_msgSend_408( - obj, - sel, - op, + ffi.Pointer strsep( + ffi.Pointer> __stringp, + ffi.Pointer __delim, + ) { + return _strsep( + __stringp, + __delim, ); } - late final __objc_msgSend_408Ptr = _lookup< + late final _strsepPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_408 = __objc_msgSend_408Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer>, + ffi.Pointer)>>('strsep'); + late final _strsep = _strsepPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer>, ffi.Pointer)>(); - late final _sel_removeDependency_1 = _registerName1("removeDependency:"); - late final _sel_dependencies1 = _registerName1("dependencies"); - late final _sel_queuePriority1 = _registerName1("queuePriority"); - int _objc_msgSend_409( - ffi.Pointer obj, - ffi.Pointer sel, + void swab( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_409( - obj, - sel, + return _swab( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_409Ptr = _lookup< + late final _swabPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_409 = __objc_msgSend_409Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function( + ffi.Pointer, ffi.Pointer, ssize_t)>>('swab'); + late final _swab = _swabPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_setQueuePriority_1 = _registerName1("setQueuePriority:"); - void _objc_msgSend_410( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int timingsafe_bcmp( + ffi.Pointer __b1, + ffi.Pointer __b2, + int __len, ) { - return __objc_msgSend_410( - obj, - sel, - value, + return _timingsafe_bcmp( + __b1, + __b2, + __len, ); } - late final __objc_msgSend_410Ptr = _lookup< + late final _timingsafe_bcmpPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_410 = __objc_msgSend_410Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('timingsafe_bcmp'); + late final _timingsafe_bcmp = _timingsafe_bcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_completionBlock1 = _registerName1("completionBlock"); - late final _sel_setCompletionBlock_1 = _registerName1("setCompletionBlock:"); - late final _sel_waitUntilFinished1 = _registerName1("waitUntilFinished"); - late final _sel_threadPriority1 = _registerName1("threadPriority"); - late final _sel_setThreadPriority_1 = _registerName1("setThreadPriority:"); - void _objc_msgSend_411( - ffi.Pointer obj, - ffi.Pointer sel, - double value, + int strsignal_r( + int __sig, + ffi.Pointer __strsignalbuf, + int __buflen, ) { - return __objc_msgSend_411( - obj, - sel, - value, + return _strsignal_r( + __sig, + __strsignalbuf, + __buflen, ); } - late final __objc_msgSend_411Ptr = _lookup< + late final _strsignal_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Double)>>('objc_msgSend'); - late final __objc_msgSend_411 = __objc_msgSend_411Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, double)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('strsignal_r'); + late final _strsignal_r = _strsignal_rPtr + .asFunction, int)>(); - late final _sel_qualityOfService1 = _registerName1("qualityOfService"); - int _objc_msgSend_412( - ffi.Pointer obj, - ffi.Pointer sel, + int bcmp( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_412( - obj, - sel, + return _bcmp( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_412Ptr = _lookup< + late final _bcmpPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_412 = __objc_msgSend_412Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Size)>>('bcmp'); + late final _bcmp = _bcmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_setQualityOfService_1 = - _registerName1("setQualityOfService:"); - void _objc_msgSend_413( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void bcopy( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_413( - obj, - sel, - value, + return _bcopy( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_413Ptr = _lookup< + late final _bcopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_413 = __objc_msgSend_413Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('bcopy'); + late final _bcopy = _bcopyPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_setName_1 = _registerName1("setName:"); - late final _sel_addOperation_1 = _registerName1("addOperation:"); - late final _sel_addOperations_waitUntilFinished_1 = - _registerName1("addOperations:waitUntilFinished:"); - void _objc_msgSend_414( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer ops, - bool wait, + void bzero( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_414( - obj, - sel, - ops, - wait, + return _bzero( + arg0, + arg1, ); } - late final __objc_msgSend_414Ptr = _lookup< + late final _bzeroPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Bool)>>('objc_msgSend'); - late final __objc_msgSend_414 = __objc_msgSend_414Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, bool)>(); + ffi.Void Function(ffi.Pointer, ffi.Size)>>('bzero'); + late final _bzero = + _bzeroPtr.asFunction, int)>(); - late final _sel_addOperationWithBlock_1 = - _registerName1("addOperationWithBlock:"); - void _objc_msgSend_415( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, + ffi.Pointer index( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_415( - obj, - sel, - block, + return _index( + arg0, + arg1, ); } - late final __objc_msgSend_415Ptr = _lookup< + late final _indexPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_415 = __objc_msgSend_415Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('index'); + late final _index = _indexPtr + .asFunction Function(ffi.Pointer, int)>(); - late final _sel_addBarrierBlock_1 = _registerName1("addBarrierBlock:"); - late final _sel_maxConcurrentOperationCount1 = - _registerName1("maxConcurrentOperationCount"); - late final _sel_setMaxConcurrentOperationCount_1 = - _registerName1("setMaxConcurrentOperationCount:"); - void _objc_msgSend_416( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + ffi.Pointer rindex( + ffi.Pointer arg0, + int arg1, ) { - return __objc_msgSend_416( - obj, - sel, - value, + return _rindex( + arg0, + arg1, ); } - late final __objc_msgSend_416Ptr = _lookup< + late final _rindexPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_416 = __objc_msgSend_416Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Int)>>('rindex'); + late final _rindex = _rindexPtr + .asFunction Function(ffi.Pointer, int)>(); - late final _sel_isSuspended1 = _registerName1("isSuspended"); - late final _sel_setSuspended_1 = _registerName1("setSuspended:"); - late final _sel_underlyingQueue1 = _registerName1("underlyingQueue"); - dispatch_queue_t _objc_msgSend_417( - ffi.Pointer obj, - ffi.Pointer sel, + int ffs( + int arg0, ) { - return __objc_msgSend_417( - obj, - sel, + return _ffs( + arg0, ); } - late final __objc_msgSend_417Ptr = _lookup< - ffi.NativeFunction< - dispatch_queue_t Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_417 = __objc_msgSend_417Ptr.asFunction< - dispatch_queue_t Function( - ffi.Pointer, ffi.Pointer)>(); + late final _ffsPtr = + _lookup>('ffs'); + late final _ffs = _ffsPtr.asFunction(); - late final _sel_setUnderlyingQueue_1 = _registerName1("setUnderlyingQueue:"); - void _objc_msgSend_418( - ffi.Pointer obj, - ffi.Pointer sel, - dispatch_queue_t value, + int strcasecmp( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_418( - obj, - sel, - value, + return _strcasecmp( + arg0, + arg1, ); } - late final __objc_msgSend_418Ptr = _lookup< + late final _strcasecmpPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - dispatch_queue_t)>>('objc_msgSend'); - late final __objc_msgSend_418 = __objc_msgSend_418Ptr.asFunction< - void Function( - ffi.Pointer, ffi.Pointer, dispatch_queue_t)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('strcasecmp'); + late final _strcasecmp = _strcasecmpPtr + .asFunction, ffi.Pointer)>(); - late final _sel_cancelAllOperations1 = _registerName1("cancelAllOperations"); - late final _sel_waitUntilAllOperationsAreFinished1 = - _registerName1("waitUntilAllOperationsAreFinished"); - late final _sel_currentQueue1 = _registerName1("currentQueue"); - ffi.Pointer _objc_msgSend_419( - ffi.Pointer obj, - ffi.Pointer sel, + int strncasecmp( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return __objc_msgSend_419( - obj, - sel, + return _strncasecmp( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_419Ptr = _lookup< + late final _strncasecmpPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_419 = __objc_msgSend_419Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('strncasecmp'); + late final _strncasecmp = _strncasecmpPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final _sel_mainQueue1 = _registerName1("mainQueue"); - ffi.Pointer _objc_msgSend_420( - ffi.Pointer obj, - ffi.Pointer sel, + int ffsl( + int arg0, ) { - return __objc_msgSend_420( - obj, - sel, + return _ffsl( + arg0, ); } - late final __objc_msgSend_420Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_420 = __objc_msgSend_420Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _ffslPtr = + _lookup>('ffsl'); + late final _ffsl = _ffslPtr.asFunction(); - late final _sel_operations1 = _registerName1("operations"); - late final _sel_operationCount1 = _registerName1("operationCount"); - late final _sel_addObserverForName_object_queue_usingBlock_1 = - _registerName1("addObserverForName:object:queue:usingBlock:"); - ffi.Pointer _objc_msgSend_421( - ffi.Pointer obj, - ffi.Pointer sel, - NSNotificationName name, - ffi.Pointer obj1, - ffi.Pointer queue, - ffi.Pointer<_ObjCBlock> block, + int ffsll( + int arg0, ) { - return __objc_msgSend_421( - obj, - sel, - name, - obj1, - queue, - block, - ); - } - - late final __objc_msgSend_421Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_421 = __objc_msgSend_421Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSNotificationName, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final ffi.Pointer - _NSSystemClockDidChangeNotification = - _lookup('NSSystemClockDidChangeNotification'); - - NSNotificationName get NSSystemClockDidChangeNotification => - _NSSystemClockDidChangeNotification.value; + return _ffsll( + arg0, + ); + } - set NSSystemClockDidChangeNotification(NSNotificationName value) => - _NSSystemClockDidChangeNotification.value = value; + late final _ffsllPtr = + _lookup>('ffsll'); + late final _ffsll = _ffsllPtr.asFunction(); - late final _class_NSMutableURLRequest1 = _getClass1("NSMutableURLRequest"); - late final _sel_setURL_1 = _registerName1("setURL:"); - late final _sel_setCachePolicy_1 = _registerName1("setCachePolicy:"); - void _objc_msgSend_422( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int fls( + int arg0, ) { - return __objc_msgSend_422( - obj, - sel, - value, + return _fls( + arg0, ); } - late final __objc_msgSend_422Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_422 = __objc_msgSend_422Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _flsPtr = + _lookup>('fls'); + late final _fls = _flsPtr.asFunction(); - late final _sel_setTimeoutInterval_1 = _registerName1("setTimeoutInterval:"); - late final _sel_setMainDocumentURL_1 = _registerName1("setMainDocumentURL:"); - late final _sel_setNetworkServiceType_1 = - _registerName1("setNetworkServiceType:"); - void _objc_msgSend_423( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + int flsl( + int arg0, ) { - return __objc_msgSend_423( - obj, - sel, - value, + return _flsl( + arg0, ); } - late final __objc_msgSend_423Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_423 = __objc_msgSend_423Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_setAllowsCellularAccess_1 = - _registerName1("setAllowsCellularAccess:"); - late final _sel_setAllowsExpensiveNetworkAccess_1 = - _registerName1("setAllowsExpensiveNetworkAccess:"); - late final _sel_setAllowsConstrainedNetworkAccess_1 = - _registerName1("setAllowsConstrainedNetworkAccess:"); - late final _sel_setAssumesHTTP3Capable_1 = - _registerName1("setAssumesHTTP3Capable:"); - late final _sel_setAttribution_1 = _registerName1("setAttribution:"); - void _objc_msgSend_424( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + late final _flslPtr = + _lookup>('flsl'); + late final _flsl = _flslPtr.asFunction(); + + int flsll( + int arg0, ) { - return __objc_msgSend_424( - obj, - sel, - value, + return _flsll( + arg0, ); } - late final __objc_msgSend_424Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_424 = __objc_msgSend_424Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _flsllPtr = + _lookup>('flsll'); + late final _flsll = _flsllPtr.asFunction(); + + late final ffi.Pointer>> _tzname = + _lookup>>('tzname'); + + ffi.Pointer> get tzname => _tzname.value; + + set tzname(ffi.Pointer> value) => _tzname.value = value; + + late final ffi.Pointer _getdate_err = + _lookup('getdate_err'); + + int get getdate_err => _getdate_err.value; + + set getdate_err(int value) => _getdate_err.value = value; + + late final ffi.Pointer _timezone = _lookup('timezone'); + + int get timezone => _timezone.value; + + set timezone(int value) => _timezone.value = value; + + late final ffi.Pointer _daylight = _lookup('daylight'); + + int get daylight => _daylight.value; + + set daylight(int value) => _daylight.value = value; - late final _sel_setRequiresDNSSECValidation_1 = - _registerName1("setRequiresDNSSECValidation:"); - late final _sel_setHTTPMethod_1 = _registerName1("setHTTPMethod:"); - late final _sel_setAllHTTPHeaderFields_1 = - _registerName1("setAllHTTPHeaderFields:"); - void _objc_msgSend_425( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer asctime( + ffi.Pointer arg0, ) { - return __objc_msgSend_425( - obj, - sel, - value, + return _asctime( + arg0, ); } - late final __objc_msgSend_425Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_425 = __objc_msgSend_425Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _asctimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'asctime'); + late final _asctime = + _asctimePtr.asFunction Function(ffi.Pointer)>(); + + int clock() { + return _clock(); + } + + late final _clockPtr = + _lookup>('clock'); + late final _clock = _clockPtr.asFunction(); - late final _sel_setValue_forHTTPHeaderField_1 = - _registerName1("setValue:forHTTPHeaderField:"); - void _objc_msgSend_426( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer field, + ffi.Pointer ctime( + ffi.Pointer arg0, ) { - return __objc_msgSend_426( - obj, - sel, - value, - field, + return _ctime( + arg0, ); } - late final __objc_msgSend_426Ptr = _lookup< + late final _ctimePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_426 = __objc_msgSend_426Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_addValue_forHTTPHeaderField_1 = - _registerName1("addValue:forHTTPHeaderField:"); - void _objc_msgSend_427( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ffi.Pointer field, - ) { - return __objc_msgSend_427( - obj, - sel, - value, - field, + ffi.Pointer Function(ffi.Pointer)>>('ctime'); + late final _ctime = _ctimePtr + .asFunction Function(ffi.Pointer)>(); + + double difftime( + int arg0, + int arg1, + ) { + return _difftime( + arg0, + arg1, ); } - late final __objc_msgSend_427Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_427 = __objc_msgSend_427Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setHTTPBody_1 = _registerName1("setHTTPBody:"); - void _objc_msgSend_428( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_428( - obj, - sel, - value, + late final _difftimePtr = + _lookup>( + 'difftime'); + late final _difftime = _difftimePtr.asFunction(); + + ffi.Pointer getdate( + ffi.Pointer arg0, + ) { + return _getdate( + arg0, ); } - late final __objc_msgSend_428Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_428 = __objc_msgSend_428Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _getdatePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'getdate'); + late final _getdate = + _getdatePtr.asFunction Function(ffi.Pointer)>(); - late final _sel_setHTTPBodyStream_1 = _registerName1("setHTTPBodyStream:"); - void _objc_msgSend_429( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, + ffi.Pointer gmtime( + ffi.Pointer arg0, ) { - return __objc_msgSend_429( - obj, - sel, - value, + return _gmtime( + arg0, ); } - late final __objc_msgSend_429Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_429 = __objc_msgSend_429Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + late final _gmtimePtr = _lookup< + ffi + .NativeFunction Function(ffi.Pointer)>>('gmtime'); + late final _gmtime = + _gmtimePtr.asFunction Function(ffi.Pointer)>(); - late final _sel_setHTTPShouldHandleCookies_1 = - _registerName1("setHTTPShouldHandleCookies:"); - late final _sel_setHTTPShouldUsePipelining_1 = - _registerName1("setHTTPShouldUsePipelining:"); - late final _class_NSHTTPCookieStorage1 = _getClass1("NSHTTPCookieStorage"); - late final _sel_sharedHTTPCookieStorage1 = - _registerName1("sharedHTTPCookieStorage"); - ffi.Pointer _objc_msgSend_430( - ffi.Pointer obj, - ffi.Pointer sel, + ffi.Pointer localtime( + ffi.Pointer arg0, ) { - return __objc_msgSend_430( - obj, - sel, + return _localtime( + arg0, ); } - late final __objc_msgSend_430Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_430 = __objc_msgSend_430Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _localtimePtr = _lookup< + ffi.NativeFunction Function(ffi.Pointer)>>( + 'localtime'); + late final _localtime = + _localtimePtr.asFunction Function(ffi.Pointer)>(); - late final _sel_sharedCookieStorageForGroupContainerIdentifier_1 = - _registerName1("sharedCookieStorageForGroupContainerIdentifier:"); - ffi.Pointer _objc_msgSend_431( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, + int mktime( + ffi.Pointer arg0, ) { - return __objc_msgSend_431( - obj, - sel, - identifier, + return _mktime( + arg0, ); } - late final __objc_msgSend_431Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_431 = __objc_msgSend_431Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _mktimePtr = + _lookup)>>('mktime'); + late final _mktime = _mktimePtr.asFunction)>(); - late final _sel_cookies1 = _registerName1("cookies"); - late final _class_NSHTTPCookie1 = _getClass1("NSHTTPCookie"); - late final _sel_setCookie_1 = _registerName1("setCookie:"); - void _objc_msgSend_432( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookie, + int strftime( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return __objc_msgSend_432( - obj, - sel, - cookie, + return _strftime( + arg0, + arg1, + arg2, + arg3, ); } - late final __objc_msgSend_432Ptr = _lookup< + late final _strftimePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_432 = __objc_msgSend_432Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + ffi.Size Function(ffi.Pointer, ffi.Size, + ffi.Pointer, ffi.Pointer)>>('strftime'); + late final _strftime = _strftimePtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); - late final _sel_deleteCookie_1 = _registerName1("deleteCookie:"); - late final _sel_removeCookiesSinceDate_1 = - _registerName1("removeCookiesSinceDate:"); - late final _sel_cookiesForURL_1 = _registerName1("cookiesForURL:"); - late final _sel_setCookies_forURL_mainDocumentURL_1 = - _registerName1("setCookies:forURL:mainDocumentURL:"); - void _objc_msgSend_433( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer URL, - ffi.Pointer mainDocumentURL, + ffi.Pointer strptime( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return __objc_msgSend_433( - obj, - sel, - cookies, - URL, - mainDocumentURL, + return _strptime( + arg0, + arg1, + arg2, ); } - late final __objc_msgSend_433Ptr = _lookup< + late final _strptimePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_433 = __objc_msgSend_433Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_cookieAcceptPolicy1 = _registerName1("cookieAcceptPolicy"); - int _objc_msgSend_434( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_434( - obj, - sel, + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('strptime'); + late final _strptime = _strptimePtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + + int time( + ffi.Pointer arg0, + ) { + return _time( + arg0, ); } - late final __objc_msgSend_434Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_434 = __objc_msgSend_434Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _timePtr = + _lookup)>>('time'); + late final _time = _timePtr.asFunction)>(); - late final _sel_setCookieAcceptPolicy_1 = - _registerName1("setCookieAcceptPolicy:"); - void _objc_msgSend_435( - ffi.Pointer obj, - ffi.Pointer sel, - int value, + void tzset() { + return _tzset(); + } + + late final _tzsetPtr = + _lookup>('tzset'); + late final _tzset = _tzsetPtr.asFunction(); + + ffi.Pointer asctime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_435( - obj, - sel, - value, + return _asctime_r( + arg0, + arg1, ); } - late final __objc_msgSend_435Ptr = _lookup< + late final _asctime_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_435 = __objc_msgSend_435Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('asctime_r'); + late final _asctime_r = _asctime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); - late final _sel_sortedCookiesUsingDescriptors_1 = - _registerName1("sortedCookiesUsingDescriptors:"); - late final _sel_storeCookies_forTask_1 = - _registerName1("storeCookies:forTask:"); - void _objc_msgSend_436( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer cookies, - ffi.Pointer task, + ffi.Pointer ctime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return __objc_msgSend_436( - obj, - sel, - cookies, - task, + return _ctime_r( + arg0, + arg1, ); } - late final __objc_msgSend_436Ptr = _lookup< + late final _ctime_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_436 = __objc_msgSend_436Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_getCookiesForTask_completionHandler_1 = - _registerName1("getCookiesForTask:completionHandler:"); - void _objc_msgSend_437( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_437( - obj, - sel, - task, - completionHandler, + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('ctime_r'); + late final _ctime_r = _ctime_rPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer gmtime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _gmtime_r( + arg0, + arg1, ); } - late final __objc_msgSend_437Ptr = _lookup< + late final _gmtime_rPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_437 = __objc_msgSend_437Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final ffi.Pointer - _NSHTTPCookieManagerAcceptPolicyChangedNotification = - _lookup( - 'NSHTTPCookieManagerAcceptPolicyChangedNotification'); - - NSNotificationName get NSHTTPCookieManagerAcceptPolicyChangedNotification => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value; - - set NSHTTPCookieManagerAcceptPolicyChangedNotification( - NSNotificationName value) => - _NSHTTPCookieManagerAcceptPolicyChangedNotification.value = value; - - late final ffi.Pointer - _NSHTTPCookieManagerCookiesChangedNotification = - _lookup( - 'NSHTTPCookieManagerCookiesChangedNotification'); - - NSNotificationName get NSHTTPCookieManagerCookiesChangedNotification => - _NSHTTPCookieManagerCookiesChangedNotification.value; - - set NSHTTPCookieManagerCookiesChangedNotification(NSNotificationName value) => - _NSHTTPCookieManagerCookiesChangedNotification.value = value; - - late final ffi.Pointer - _NSProgressEstimatedTimeRemainingKey = - _lookup('NSProgressEstimatedTimeRemainingKey'); - - NSProgressUserInfoKey get NSProgressEstimatedTimeRemainingKey => - _NSProgressEstimatedTimeRemainingKey.value; - - set NSProgressEstimatedTimeRemainingKey(NSProgressUserInfoKey value) => - _NSProgressEstimatedTimeRemainingKey.value = value; - - late final ffi.Pointer _NSProgressThroughputKey = - _lookup('NSProgressThroughputKey'); - - NSProgressUserInfoKey get NSProgressThroughputKey => - _NSProgressThroughputKey.value; - - set NSProgressThroughputKey(NSProgressUserInfoKey value) => - _NSProgressThroughputKey.value = value; - - late final ffi.Pointer _NSProgressKindFile = - _lookup('NSProgressKindFile'); - - NSProgressKind get NSProgressKindFile => _NSProgressKindFile.value; - - set NSProgressKindFile(NSProgressKind value) => - _NSProgressKindFile.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindKey = - _lookup('NSProgressFileOperationKindKey'); - - NSProgressUserInfoKey get NSProgressFileOperationKindKey => - _NSProgressFileOperationKindKey.value; - - set NSProgressFileOperationKindKey(NSProgressUserInfoKey value) => - _NSProgressFileOperationKindKey.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindDownloading = - _lookup( - 'NSProgressFileOperationKindDownloading'); - - NSProgressFileOperationKind get NSProgressFileOperationKindDownloading => - _NSProgressFileOperationKindDownloading.value; - - set NSProgressFileOperationKindDownloading( - NSProgressFileOperationKind value) => - _NSProgressFileOperationKindDownloading.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindDecompressingAfterDownloading = - _lookup( - 'NSProgressFileOperationKindDecompressingAfterDownloading'); - - NSProgressFileOperationKind - get NSProgressFileOperationKindDecompressingAfterDownloading => - _NSProgressFileOperationKindDecompressingAfterDownloading.value; - - set NSProgressFileOperationKindDecompressingAfterDownloading( - NSProgressFileOperationKind value) => - _NSProgressFileOperationKindDecompressingAfterDownloading.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindReceiving = - _lookup( - 'NSProgressFileOperationKindReceiving'); - - NSProgressFileOperationKind get NSProgressFileOperationKindReceiving => - _NSProgressFileOperationKindReceiving.value; - - set NSProgressFileOperationKindReceiving(NSProgressFileOperationKind value) => - _NSProgressFileOperationKindReceiving.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindCopying = - _lookup( - 'NSProgressFileOperationKindCopying'); - - NSProgressFileOperationKind get NSProgressFileOperationKindCopying => - _NSProgressFileOperationKindCopying.value; - - set NSProgressFileOperationKindCopying(NSProgressFileOperationKind value) => - _NSProgressFileOperationKindCopying.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindUploading = - _lookup( - 'NSProgressFileOperationKindUploading'); - - NSProgressFileOperationKind get NSProgressFileOperationKindUploading => - _NSProgressFileOperationKindUploading.value; - - set NSProgressFileOperationKindUploading(NSProgressFileOperationKind value) => - _NSProgressFileOperationKindUploading.value = value; - - late final ffi.Pointer - _NSProgressFileOperationKindDuplicating = - _lookup( - 'NSProgressFileOperationKindDuplicating'); - - NSProgressFileOperationKind get NSProgressFileOperationKindDuplicating => - _NSProgressFileOperationKindDuplicating.value; - - set NSProgressFileOperationKindDuplicating( - NSProgressFileOperationKind value) => - _NSProgressFileOperationKindDuplicating.value = value; - - late final ffi.Pointer _NSProgressFileURLKey = - _lookup('NSProgressFileURLKey'); - - NSProgressUserInfoKey get NSProgressFileURLKey => _NSProgressFileURLKey.value; - - set NSProgressFileURLKey(NSProgressUserInfoKey value) => - _NSProgressFileURLKey.value = value; - - late final ffi.Pointer _NSProgressFileTotalCountKey = - _lookup('NSProgressFileTotalCountKey'); - - NSProgressUserInfoKey get NSProgressFileTotalCountKey => - _NSProgressFileTotalCountKey.value; - - set NSProgressFileTotalCountKey(NSProgressUserInfoKey value) => - _NSProgressFileTotalCountKey.value = value; - - late final ffi.Pointer - _NSProgressFileCompletedCountKey = - _lookup('NSProgressFileCompletedCountKey'); - - NSProgressUserInfoKey get NSProgressFileCompletedCountKey => - _NSProgressFileCompletedCountKey.value; - - set NSProgressFileCompletedCountKey(NSProgressUserInfoKey value) => - _NSProgressFileCompletedCountKey.value = value; - - late final ffi.Pointer - _NSProgressFileAnimationImageKey = - _lookup('NSProgressFileAnimationImageKey'); - - NSProgressUserInfoKey get NSProgressFileAnimationImageKey => - _NSProgressFileAnimationImageKey.value; - - set NSProgressFileAnimationImageKey(NSProgressUserInfoKey value) => - _NSProgressFileAnimationImageKey.value = value; - - late final ffi.Pointer - _NSProgressFileAnimationImageOriginalRectKey = - _lookup( - 'NSProgressFileAnimationImageOriginalRectKey'); - - NSProgressUserInfoKey get NSProgressFileAnimationImageOriginalRectKey => - _NSProgressFileAnimationImageOriginalRectKey.value; + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('gmtime_r'); + late final _gmtime_r = _gmtime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); - set NSProgressFileAnimationImageOriginalRectKey( - NSProgressUserInfoKey value) => - _NSProgressFileAnimationImageOriginalRectKey.value = value; + ffi.Pointer localtime_r( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _localtime_r( + arg0, + arg1, + ); + } - late final ffi.Pointer _NSProgressFileIconKey = - _lookup('NSProgressFileIconKey'); + late final _localtime_rPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('localtime_r'); + late final _localtime_r = _localtime_rPtr.asFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); - NSProgressUserInfoKey get NSProgressFileIconKey => - _NSProgressFileIconKey.value; + int posix2time( + int arg0, + ) { + return _posix2time( + arg0, + ); + } - set NSProgressFileIconKey(NSProgressUserInfoKey value) => - _NSProgressFileIconKey.value = value; + late final _posix2timePtr = + _lookup>('posix2time'); + late final _posix2time = _posix2timePtr.asFunction(); - late final ffi.Pointer _kCFTypeArrayCallBacks = - _lookup('kCFTypeArrayCallBacks'); + void tzsetwall() { + return _tzsetwall(); + } - CFArrayCallBacks get kCFTypeArrayCallBacks => _kCFTypeArrayCallBacks.ref; + late final _tzsetwallPtr = + _lookup>('tzsetwall'); + late final _tzsetwall = _tzsetwallPtr.asFunction(); - int CFArrayGetTypeID() { - return _CFArrayGetTypeID(); + int time2posix( + int arg0, + ) { + return _time2posix( + arg0, + ); } - late final _CFArrayGetTypeIDPtr = - _lookup>('CFArrayGetTypeID'); - late final _CFArrayGetTypeID = - _CFArrayGetTypeIDPtr.asFunction(); + late final _time2posixPtr = + _lookup>('time2posix'); + late final _time2posix = _time2posixPtr.asFunction(); - CFArrayRef CFArrayCreate( - CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + int timelocal( + ffi.Pointer arg0, ) { - return _CFArrayCreate( - allocator, - values, - numValues, - callBacks, + return _timelocal( + arg0, ); } - late final _CFArrayCreatePtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function( - CFAllocatorRef, - ffi.Pointer>, - CFIndex, - ffi.Pointer)>>('CFArrayCreate'); - late final _CFArrayCreate = _CFArrayCreatePtr.asFunction< - CFArrayRef Function(CFAllocatorRef, ffi.Pointer>, - int, ffi.Pointer)>(); + late final _timelocalPtr = + _lookup)>>( + 'timelocal'); + late final _timelocal = + _timelocalPtr.asFunction)>(); - CFArrayRef CFArrayCreateCopy( - CFAllocatorRef allocator, - CFArrayRef theArray, + int timegm( + ffi.Pointer arg0, ) { - return _CFArrayCreateCopy( - allocator, - theArray, + return _timegm( + arg0, ); } - late final _CFArrayCreateCopyPtr = _lookup< - ffi.NativeFunction>( - 'CFArrayCreateCopy'); - late final _CFArrayCreateCopy = _CFArrayCreateCopyPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFArrayRef)>(); + late final _timegmPtr = + _lookup)>>('timegm'); + late final _timegm = _timegmPtr.asFunction)>(); - CFMutableArrayRef CFArrayCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + int nanosleep( + ffi.Pointer __rqtp, + ffi.Pointer __rmtp, ) { - return _CFArrayCreateMutable( - allocator, - capacity, - callBacks, + return _nanosleep( + __rqtp, + __rmtp, ); } - late final _CFArrayCreateMutablePtr = _lookup< + late final _nanosleepPtr = _lookup< ffi.NativeFunction< - CFMutableArrayRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFArrayCreateMutable'); - late final _CFArrayCreateMutable = _CFArrayCreateMutablePtr.asFunction< - CFMutableArrayRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('nanosleep'); + late final _nanosleep = _nanosleepPtr + .asFunction, ffi.Pointer)>(); - CFMutableArrayRef CFArrayCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFArrayRef theArray, + int clock_getres( + clockid_t __clock_id, + ffi.Pointer __res, ) { - return _CFArrayCreateMutableCopy( - allocator, - capacity, - theArray, + return _clock_getres( + __clock_id.value, + __res, ); } - late final _CFArrayCreateMutableCopyPtr = _lookup< + late final _clock_getresPtr = _lookup< ffi.NativeFunction< - CFMutableArrayRef Function(CFAllocatorRef, CFIndex, - CFArrayRef)>>('CFArrayCreateMutableCopy'); - late final _CFArrayCreateMutableCopy = - _CFArrayCreateMutableCopyPtr.asFunction< - CFMutableArrayRef Function(CFAllocatorRef, int, CFArrayRef)>(); + ffi.Int Function( + ffi.UnsignedInt, ffi.Pointer)>>('clock_getres'); + late final _clock_getres = + _clock_getresPtr.asFunction)>(); - int CFArrayGetCount( - CFArrayRef theArray, + int clock_gettime( + clockid_t __clock_id, + ffi.Pointer __tp, ) { - return _CFArrayGetCount( - theArray, + return _clock_gettime( + __clock_id.value, + __tp, ); } - late final _CFArrayGetCountPtr = - _lookup>( - 'CFArrayGetCount'); - late final _CFArrayGetCount = - _CFArrayGetCountPtr.asFunction(); + late final _clock_gettimePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.UnsignedInt, ffi.Pointer)>>('clock_gettime'); + late final _clock_gettime = + _clock_gettimePtr.asFunction)>(); - int CFArrayGetCountOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + Dart__uint64_t clock_gettime_nsec_np( + clockid_t __clock_id, ) { - return _CFArrayGetCountOfValue( - theArray, - range, - value, + return _clock_gettime_nsec_np( + __clock_id.value, ); } - late final _CFArrayGetCountOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetCountOfValue'); - late final _CFArrayGetCountOfValue = _CFArrayGetCountOfValuePtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer)>(); + late final _clock_gettime_nsec_npPtr = + _lookup>( + 'clock_gettime_nsec_np'); + late final _clock_gettime_nsec_np = + _clock_gettime_nsec_npPtr.asFunction(); - int CFArrayContainsValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + int clock_settime( + clockid_t __clock_id, + ffi.Pointer __tp, ) { - return _CFArrayContainsValue( - theArray, - range, - value, + return _clock_settime( + __clock_id.value, + __tp, ); } - late final _CFArrayContainsValuePtr = _lookup< + late final _clock_settimePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayContainsValue'); - late final _CFArrayContainsValue = _CFArrayContainsValuePtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer)>(); + ffi.Int Function( + ffi.UnsignedInt, ffi.Pointer)>>('clock_settime'); + late final _clock_settime = + _clock_settimePtr.asFunction)>(); - ffi.Pointer CFArrayGetValueAtIndex( - CFArrayRef theArray, - int idx, + int timespec_get( + ffi.Pointer ts, + int base, ) { - return _CFArrayGetValueAtIndex( - theArray, - idx, + return _timespec_get( + ts, + base, ); } - late final _CFArrayGetValueAtIndexPtr = _lookup< - ffi - .NativeFunction Function(CFArrayRef, CFIndex)>>( - 'CFArrayGetValueAtIndex'); - late final _CFArrayGetValueAtIndex = _CFArrayGetValueAtIndexPtr.asFunction< - ffi.Pointer Function(CFArrayRef, int)>(); + late final _timespec_getPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'timespec_get'); + late final _timespec_get = + _timespec_getPtr.asFunction, int)>(); - void CFArrayGetValues( - CFArrayRef theArray, - CFRange range, - ffi.Pointer> values, + int imaxabs( + int j, ) { - return _CFArrayGetValues( - theArray, - range, - values, + return _imaxabs( + j, ); } - late final _CFArrayGetValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFArrayRef, CFRange, - ffi.Pointer>)>>('CFArrayGetValues'); - late final _CFArrayGetValues = _CFArrayGetValuesPtr.asFunction< - void Function(CFArrayRef, CFRange, ffi.Pointer>)>(); + late final _imaxabsPtr = + _lookup>('imaxabs'); + late final _imaxabs = _imaxabsPtr.asFunction(); - void CFArrayApplyFunction( - CFArrayRef theArray, - CFRange range, - CFArrayApplierFunction applier, - ffi.Pointer context, + imaxdiv_t imaxdiv( + int __numer, + int __denom, ) { - return _CFArrayApplyFunction( - theArray, - range, - applier, - context, + return _imaxdiv( + __numer, + __denom, ); } - late final _CFArrayApplyFunctionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFArrayRef, CFRange, CFArrayApplierFunction, - ffi.Pointer)>>('CFArrayApplyFunction'); - late final _CFArrayApplyFunction = _CFArrayApplyFunctionPtr.asFunction< - void Function(CFArrayRef, CFRange, CFArrayApplierFunction, - ffi.Pointer)>(); + late final _imaxdivPtr = + _lookup>( + 'imaxdiv'); + late final _imaxdiv = _imaxdivPtr.asFunction(); - int CFArrayGetFirstIndexOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + int strtoimax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, ) { - return _CFArrayGetFirstIndexOfValue( - theArray, - range, - value, + return _strtoimax( + __nptr, + __endptr, + __base, ); } - late final _CFArrayGetFirstIndexOfValuePtr = _lookup< + late final _strtoimaxPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetFirstIndexOfValue'); - late final _CFArrayGetFirstIndexOfValue = _CFArrayGetFirstIndexOfValuePtr - .asFunction)>(); + intmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoimax'); + late final _strtoimax = _strtoimaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - int CFArrayGetLastIndexOfValue( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, + int strtoumax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, ) { - return _CFArrayGetLastIndexOfValue( - theArray, - range, - value, + return _strtoumax( + __nptr, + __endptr, + __base, ); } - late final _CFArrayGetLastIndexOfValuePtr = _lookup< + late final _strtoumaxPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFArrayRef, CFRange, - ffi.Pointer)>>('CFArrayGetLastIndexOfValue'); - late final _CFArrayGetLastIndexOfValue = _CFArrayGetLastIndexOfValuePtr - .asFunction)>(); + uintmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('strtoumax'); + late final _strtoumax = _strtoumaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - int CFArrayBSearchValues( - CFArrayRef theArray, - CFRange range, - ffi.Pointer value, - CFComparatorFunction comparator, - ffi.Pointer context, + int wcstoimax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, ) { - return _CFArrayBSearchValues( - theArray, - range, - value, - comparator, - context, + return _wcstoimax( + __nptr, + __endptr, + __base, ); } - late final _CFArrayBSearchValuesPtr = _lookup< + late final _wcstoimaxPtr = _lookup< ffi.NativeFunction< - CFIndex Function( - CFArrayRef, - CFRange, - ffi.Pointer, - CFComparatorFunction, - ffi.Pointer)>>('CFArrayBSearchValues'); - late final _CFArrayBSearchValues = _CFArrayBSearchValuesPtr.asFunction< - int Function(CFArrayRef, CFRange, ffi.Pointer, - CFComparatorFunction, ffi.Pointer)>(); + intmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('wcstoimax'); + late final _wcstoimax = _wcstoimaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - void CFArrayAppendValue( - CFMutableArrayRef theArray, - ffi.Pointer value, + int wcstoumax( + ffi.Pointer __nptr, + ffi.Pointer> __endptr, + int __base, ) { - return _CFArrayAppendValue( - theArray, - value, + return _wcstoumax( + __nptr, + __endptr, + __base, ); } - late final _CFArrayAppendValuePtr = _lookup< + late final _wcstoumaxPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableArrayRef, ffi.Pointer)>>('CFArrayAppendValue'); - late final _CFArrayAppendValue = _CFArrayAppendValuePtr.asFunction< - void Function(CFMutableArrayRef, ffi.Pointer)>(); + uintmax_t Function(ffi.Pointer, + ffi.Pointer>, ffi.Int)>>('wcstoumax'); + late final _wcstoumax = _wcstoumaxPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>, int)>(); - void CFArrayInsertValueAtIndex( - CFMutableArrayRef theArray, - int idx, - ffi.Pointer value, - ) { - return _CFArrayInsertValueAtIndex( - theArray, - idx, - value, - ); + late final ffi.Pointer _kCFTypeBagCallBacks = + _lookup('kCFTypeBagCallBacks'); + + CFBagCallBacks get kCFTypeBagCallBacks => _kCFTypeBagCallBacks.ref; + + late final ffi.Pointer _kCFCopyStringBagCallBacks = + _lookup('kCFCopyStringBagCallBacks'); + + CFBagCallBacks get kCFCopyStringBagCallBacks => + _kCFCopyStringBagCallBacks.ref; + + int CFBagGetTypeID() { + return _CFBagGetTypeID(); } - late final _CFArrayInsertValueAtIndexPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - ffi.Pointer)>>('CFArrayInsertValueAtIndex'); - late final _CFArrayInsertValueAtIndex = - _CFArrayInsertValueAtIndexPtr.asFunction< - void Function(CFMutableArrayRef, int, ffi.Pointer)>(); + late final _CFBagGetTypeIDPtr = + _lookup>('CFBagGetTypeID'); + late final _CFBagGetTypeID = _CFBagGetTypeIDPtr.asFunction(); - void CFArraySetValueAtIndex( - CFMutableArrayRef theArray, - int idx, - ffi.Pointer value, + CFBagRef CFBagCreate( + CFAllocatorRef allocator, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, ) { - return _CFArraySetValueAtIndex( - theArray, - idx, - value, + return _CFBagCreate( + allocator, + values, + numValues, + callBacks, ); } - late final _CFArraySetValueAtIndexPtr = _lookup< + late final _CFBagCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - ffi.Pointer)>>('CFArraySetValueAtIndex'); - late final _CFArraySetValueAtIndex = _CFArraySetValueAtIndexPtr.asFunction< - void Function(CFMutableArrayRef, int, ffi.Pointer)>(); + CFBagRef Function(CFAllocatorRef, ffi.Pointer>, + CFIndex, ffi.Pointer)>>('CFBagCreate'); + late final _CFBagCreate = _CFBagCreatePtr.asFunction< + CFBagRef Function(CFAllocatorRef, ffi.Pointer>, int, + ffi.Pointer)>(); - void CFArrayRemoveValueAtIndex( - CFMutableArrayRef theArray, - int idx, + CFBagRef CFBagCreateCopy( + CFAllocatorRef allocator, + CFBagRef theBag, ) { - return _CFArrayRemoveValueAtIndex( - theArray, - idx, + return _CFBagCreateCopy( + allocator, + theBag, ); } - late final _CFArrayRemoveValueAtIndexPtr = _lookup< - ffi.NativeFunction>( - 'CFArrayRemoveValueAtIndex'); - late final _CFArrayRemoveValueAtIndex = _CFArrayRemoveValueAtIndexPtr - .asFunction(); + late final _CFBagCreateCopyPtr = + _lookup>( + 'CFBagCreateCopy'); + late final _CFBagCreateCopy = _CFBagCreateCopyPtr.asFunction< + CFBagRef Function(CFAllocatorRef, CFBagRef)>(); - void CFArrayRemoveAllValues( - CFMutableArrayRef theArray, + CFMutableBagRef CFBagCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, ) { - return _CFArrayRemoveAllValues( - theArray, + return _CFBagCreateMutable( + allocator, + capacity, + callBacks, ); } - late final _CFArrayRemoveAllValuesPtr = - _lookup>( - 'CFArrayRemoveAllValues'); - late final _CFArrayRemoveAllValues = - _CFArrayRemoveAllValuesPtr.asFunction(); + late final _CFBagCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableBagRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFBagCreateMutable'); + late final _CFBagCreateMutable = _CFBagCreateMutablePtr.asFunction< + CFMutableBagRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - void CFArrayReplaceValues( - CFMutableArrayRef theArray, - CFRange range, - ffi.Pointer> newValues, - int newCount, + CFMutableBagRef CFBagCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFBagRef theBag, ) { - return _CFArrayReplaceValues( - theArray, - range, - newValues, - newCount, + return _CFBagCreateMutableCopy( + allocator, + capacity, + theBag, ); } - late final _CFArrayReplaceValuesPtr = _lookup< + late final _CFBagCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableArrayRef, - CFRange, - ffi.Pointer>, - CFIndex)>>('CFArrayReplaceValues'); - late final _CFArrayReplaceValues = _CFArrayReplaceValuesPtr.asFunction< - void Function(CFMutableArrayRef, CFRange, - ffi.Pointer>, int)>(); + CFMutableBagRef Function( + CFAllocatorRef, CFIndex, CFBagRef)>>('CFBagCreateMutableCopy'); + late final _CFBagCreateMutableCopy = _CFBagCreateMutableCopyPtr.asFunction< + CFMutableBagRef Function(CFAllocatorRef, int, CFBagRef)>(); - void CFArrayExchangeValuesAtIndices( - CFMutableArrayRef theArray, - int idx1, - int idx2, + int CFBagGetCount( + CFBagRef theBag, ) { - return _CFArrayExchangeValuesAtIndices( - theArray, - idx1, - idx2, + return _CFBagGetCount( + theBag, ); } - late final _CFArrayExchangeValuesAtIndicesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFIndex, - CFIndex)>>('CFArrayExchangeValuesAtIndices'); - late final _CFArrayExchangeValuesAtIndices = - _CFArrayExchangeValuesAtIndicesPtr.asFunction< - void Function(CFMutableArrayRef, int, int)>(); + late final _CFBagGetCountPtr = + _lookup>('CFBagGetCount'); + late final _CFBagGetCount = + _CFBagGetCountPtr.asFunction(); - void CFArraySortValues( - CFMutableArrayRef theArray, - CFRange range, - CFComparatorFunction comparator, - ffi.Pointer context, + int CFBagGetCountOfValue( + CFBagRef theBag, + ffi.Pointer value, ) { - return _CFArraySortValues( - theArray, - range, - comparator, - context, + return _CFBagGetCountOfValue( + theBag, + value, ); } - late final _CFArraySortValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, - ffi.Pointer)>>('CFArraySortValues'); - late final _CFArraySortValues = _CFArraySortValuesPtr.asFunction< - void Function(CFMutableArrayRef, CFRange, CFComparatorFunction, - ffi.Pointer)>(); + late final _CFBagGetCountOfValuePtr = _lookup< + ffi + .NativeFunction)>>( + 'CFBagGetCountOfValue'); + late final _CFBagGetCountOfValue = _CFBagGetCountOfValuePtr.asFunction< + int Function(CFBagRef, ffi.Pointer)>(); - void CFArrayAppendArray( - CFMutableArrayRef theArray, - CFArrayRef otherArray, - CFRange otherRange, + int CFBagContainsValue( + CFBagRef theBag, + ffi.Pointer value, ) { - return _CFArrayAppendArray( - theArray, - otherArray, - otherRange, + return _CFBagContainsValue( + theBag, + value, ); } - late final _CFArrayAppendArrayPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableArrayRef, CFArrayRef, CFRange)>>('CFArrayAppendArray'); - late final _CFArrayAppendArray = _CFArrayAppendArrayPtr.asFunction< - void Function(CFMutableArrayRef, CFArrayRef, CFRange)>(); + late final _CFBagContainsValuePtr = _lookup< + ffi + .NativeFunction)>>( + 'CFBagContainsValue'); + late final _CFBagContainsValue = _CFBagContainsValuePtr.asFunction< + int Function(CFBagRef, ffi.Pointer)>(); - ffi.Pointer os_retain( - ffi.Pointer object, + ffi.Pointer CFBagGetValue( + CFBagRef theBag, + ffi.Pointer value, ) { - return _os_retain( - object, + return _CFBagGetValue( + theBag, + value, ); } - late final _os_retainPtr = _lookup< + late final _CFBagGetValuePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('os_retain'); - late final _os_retain = _os_retainPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Pointer Function( + CFBagRef, ffi.Pointer)>>('CFBagGetValue'); + late final _CFBagGetValue = _CFBagGetValuePtr.asFunction< + ffi.Pointer Function(CFBagRef, ffi.Pointer)>(); - void os_release( - ffi.Pointer object, + int CFBagGetValueIfPresent( + CFBagRef theBag, + ffi.Pointer candidate, + ffi.Pointer> value, ) { - return _os_release( - object, + return _CFBagGetValueIfPresent( + theBag, + candidate, + value, ); } - late final _os_releasePtr = - _lookup)>>( - 'os_release'); - late final _os_release = - _os_releasePtr.asFunction)>(); + late final _CFBagGetValueIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBagRef, ffi.Pointer, + ffi.Pointer>)>>('CFBagGetValueIfPresent'); + late final _CFBagGetValueIfPresent = _CFBagGetValueIfPresentPtr.asFunction< + int Function(CFBagRef, ffi.Pointer, + ffi.Pointer>)>(); - ffi.Pointer sec_retain( - ffi.Pointer obj, + void CFBagGetValues( + CFBagRef theBag, + ffi.Pointer> values, ) { - return _sec_retain( - obj, + return _CFBagGetValues( + theBag, + values, ); } - late final _sec_retainPtr = _lookup< + late final _CFBagGetValuesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('sec_retain'); - late final _sec_retain = _sec_retainPtr - .asFunction Function(ffi.Pointer)>(); - - void sec_release( - ffi.Pointer obj, - ) { - return _sec_release( - obj, - ); - } - - late final _sec_releasePtr = - _lookup)>>( - 'sec_release'); - late final _sec_release = - _sec_releasePtr.asFunction)>(); + ffi.Void Function( + CFBagRef, ffi.Pointer>)>>('CFBagGetValues'); + late final _CFBagGetValues = _CFBagGetValuesPtr.asFunction< + void Function(CFBagRef, ffi.Pointer>)>(); - CFStringRef SecCopyErrorMessageString( - int status, - ffi.Pointer reserved, + void CFBagApplyFunction( + CFBagRef theBag, + CFBagApplierFunction applier, + ffi.Pointer context, ) { - return _SecCopyErrorMessageString( - status, - reserved, + return _CFBagApplyFunction( + theBag, + applier, + context, ); } - late final _SecCopyErrorMessageStringPtr = _lookup< + late final _CFBagApplyFunctionPtr = _lookup< ffi.NativeFunction< - CFStringRef Function( - OSStatus, ffi.Pointer)>>('SecCopyErrorMessageString'); - late final _SecCopyErrorMessageString = _SecCopyErrorMessageStringPtr - .asFunction)>(); + ffi.Void Function(CFBagRef, CFBagApplierFunction, + ffi.Pointer)>>('CFBagApplyFunction'); + late final _CFBagApplyFunction = _CFBagApplyFunctionPtr.asFunction< + void Function(CFBagRef, CFBagApplierFunction, ffi.Pointer)>(); - void __assert_rtn( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + void CFBagAddValue( + CFMutableBagRef theBag, + ffi.Pointer value, ) { - return ___assert_rtn( - arg0, - arg1, - arg2, - arg3, + return _CFBagAddValue( + theBag, + value, ); } - late final ___assert_rtnPtr = _lookup< + late final _CFBagAddValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int, ffi.Pointer)>>('__assert_rtn'); - late final ___assert_rtn = ___assert_rtnPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final ffi.Pointer<_RuneLocale> __DefaultRuneLocale = - _lookup<_RuneLocale>('_DefaultRuneLocale'); - - _RuneLocale get _DefaultRuneLocale => __DefaultRuneLocale.ref; - - late final ffi.Pointer> __CurrentRuneLocale = - _lookup>('_CurrentRuneLocale'); - - ffi.Pointer<_RuneLocale> get _CurrentRuneLocale => __CurrentRuneLocale.value; - - set _CurrentRuneLocale(ffi.Pointer<_RuneLocale> value) => - __CurrentRuneLocale.value = value; - - int ___runetype( - int arg0, - ) { - return ____runetype( - arg0, - ); - } - - late final ____runetypePtr = _lookup< - ffi.NativeFunction>( - '___runetype'); - late final ____runetype = ____runetypePtr.asFunction(); - - int ___tolower( - int arg0, - ) { - return ____tolower( - arg0, - ); - } - - late final ____tolowerPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '___tolower'); - late final ____tolower = ____tolowerPtr.asFunction(); + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagAddValue'); + late final _CFBagAddValue = _CFBagAddValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - int ___toupper( - int arg0, + void CFBagReplaceValue( + CFMutableBagRef theBag, + ffi.Pointer value, ) { - return ____toupper( - arg0, + return _CFBagReplaceValue( + theBag, + value, ); } - late final ____toupperPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '___toupper'); - late final ____toupper = ____toupperPtr.asFunction(); + late final _CFBagReplaceValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagReplaceValue'); + late final _CFBagReplaceValue = _CFBagReplaceValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - int __maskrune( - int arg0, - int arg1, + void CFBagSetValue( + CFMutableBagRef theBag, + ffi.Pointer value, ) { - return ___maskrune( - arg0, - arg1, + return _CFBagSetValue( + theBag, + value, ); } - late final ___maskrunePtr = _lookup< + late final _CFBagSetValuePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - __darwin_ct_rune_t, ffi.UnsignedLong)>>('__maskrune'); - late final ___maskrune = ___maskrunePtr.asFunction(); + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagSetValue'); + late final _CFBagSetValue = _CFBagSetValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - int __toupper( - int arg0, + void CFBagRemoveValue( + CFMutableBagRef theBag, + ffi.Pointer value, ) { - return ___toupper1( - arg0, + return _CFBagRemoveValue( + theBag, + value, ); } - late final ___toupperPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '__toupper'); - late final ___toupper1 = ___toupperPtr.asFunction(); + late final _CFBagRemoveValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBagRef, ffi.Pointer)>>('CFBagRemoveValue'); + late final _CFBagRemoveValue = _CFBagRemoveValuePtr.asFunction< + void Function(CFMutableBagRef, ffi.Pointer)>(); - int __tolower( - int arg0, + void CFBagRemoveAllValues( + CFMutableBagRef theBag, ) { - return ___tolower1( - arg0, + return _CFBagRemoveAllValues( + theBag, ); } - late final ___tolowerPtr = _lookup< - ffi.NativeFunction<__darwin_ct_rune_t Function(__darwin_ct_rune_t)>>( - '__tolower'); - late final ___tolower1 = ___tolowerPtr.asFunction(); + late final _CFBagRemoveAllValuesPtr = + _lookup>( + 'CFBagRemoveAllValues'); + late final _CFBagRemoveAllValues = + _CFBagRemoveAllValuesPtr.asFunction(); - ffi.Pointer __error() { - return ___error(); - } + late final ffi.Pointer _kCFStringBinaryHeapCallBacks = + _lookup('kCFStringBinaryHeapCallBacks'); - late final ___errorPtr = - _lookup Function()>>('__error'); - late final ___error = - ___errorPtr.asFunction Function()>(); + CFBinaryHeapCallBacks get kCFStringBinaryHeapCallBacks => + _kCFStringBinaryHeapCallBacks.ref; - ffi.Pointer localeconv() { - return _localeconv(); + int CFBinaryHeapGetTypeID() { + return _CFBinaryHeapGetTypeID(); } - late final _localeconvPtr = - _lookup Function()>>('localeconv'); - late final _localeconv = - _localeconvPtr.asFunction Function()>(); + late final _CFBinaryHeapGetTypeIDPtr = + _lookup>('CFBinaryHeapGetTypeID'); + late final _CFBinaryHeapGetTypeID = + _CFBinaryHeapGetTypeIDPtr.asFunction(); - ffi.Pointer setlocale( - int arg0, - ffi.Pointer arg1, + CFBinaryHeapRef CFBinaryHeapCreate( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, + ffi.Pointer compareContext, ) { - return _setlocale( - arg0, - arg1, + return _CFBinaryHeapCreate( + allocator, + capacity, + callBacks, + compareContext, ); } - late final _setlocalePtr = _lookup< + late final _CFBinaryHeapCreatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer)>>('setlocale'); - late final _setlocale = _setlocalePtr - .asFunction Function(int, ffi.Pointer)>(); - - int __math_errhandling() { - return ___math_errhandling(); - } - - late final ___math_errhandlingPtr = - _lookup>('__math_errhandling'); - late final ___math_errhandling = - ___math_errhandlingPtr.asFunction(); + CFBinaryHeapRef Function( + CFAllocatorRef, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFBinaryHeapCreate'); + late final _CFBinaryHeapCreate = _CFBinaryHeapCreatePtr.asFunction< + CFBinaryHeapRef Function( + CFAllocatorRef, + int, + ffi.Pointer, + ffi.Pointer)>(); - int __fpclassifyf( - double arg0, + CFBinaryHeapRef CFBinaryHeapCreateCopy( + CFAllocatorRef allocator, + int capacity, + CFBinaryHeapRef heap, ) { - return ___fpclassifyf( - arg0, + return _CFBinaryHeapCreateCopy( + allocator, + capacity, + heap, ); } - late final ___fpclassifyfPtr = - _lookup>('__fpclassifyf'); - late final ___fpclassifyf = - ___fpclassifyfPtr.asFunction(); + late final _CFBinaryHeapCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFBinaryHeapRef Function(CFAllocatorRef, CFIndex, + CFBinaryHeapRef)>>('CFBinaryHeapCreateCopy'); + late final _CFBinaryHeapCreateCopy = _CFBinaryHeapCreateCopyPtr.asFunction< + CFBinaryHeapRef Function(CFAllocatorRef, int, CFBinaryHeapRef)>(); - int __fpclassifyd( - double arg0, + int CFBinaryHeapGetCount( + CFBinaryHeapRef heap, ) { - return ___fpclassifyd( - arg0, + return _CFBinaryHeapGetCount( + heap, ); } - late final ___fpclassifydPtr = - _lookup>( - '__fpclassifyd'); - late final ___fpclassifyd = - ___fpclassifydPtr.asFunction(); + late final _CFBinaryHeapGetCountPtr = + _lookup>( + 'CFBinaryHeapGetCount'); + late final _CFBinaryHeapGetCount = + _CFBinaryHeapGetCountPtr.asFunction(); - double acosf( - double arg0, + int CFBinaryHeapGetCountOfValue( + CFBinaryHeapRef heap, + ffi.Pointer value, ) { - return _acosf( - arg0, + return _CFBinaryHeapGetCountOfValue( + heap, + value, ); } - late final _acosfPtr = - _lookup>('acosf'); - late final _acosf = _acosfPtr.asFunction(); + late final _CFBinaryHeapGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFBinaryHeapRef, + ffi.Pointer)>>('CFBinaryHeapGetCountOfValue'); + late final _CFBinaryHeapGetCountOfValue = _CFBinaryHeapGetCountOfValuePtr + .asFunction)>(); - double acos( - double arg0, + int CFBinaryHeapContainsValue( + CFBinaryHeapRef heap, + ffi.Pointer value, ) { - return _acos( - arg0, + return _CFBinaryHeapContainsValue( + heap, + value, ); } - late final _acosPtr = - _lookup>('acos'); - late final _acos = _acosPtr.asFunction(); + late final _CFBinaryHeapContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBinaryHeapRef, + ffi.Pointer)>>('CFBinaryHeapContainsValue'); + late final _CFBinaryHeapContainsValue = _CFBinaryHeapContainsValuePtr + .asFunction)>(); - double asinf( - double arg0, + ffi.Pointer CFBinaryHeapGetMinimum( + CFBinaryHeapRef heap, ) { - return _asinf( - arg0, + return _CFBinaryHeapGetMinimum( + heap, ); } - late final _asinfPtr = - _lookup>('asinf'); - late final _asinf = _asinfPtr.asFunction(); + late final _CFBinaryHeapGetMinimumPtr = _lookup< + ffi.NativeFunction Function(CFBinaryHeapRef)>>( + 'CFBinaryHeapGetMinimum'); + late final _CFBinaryHeapGetMinimum = _CFBinaryHeapGetMinimumPtr.asFunction< + ffi.Pointer Function(CFBinaryHeapRef)>(); - double asin( - double arg0, + int CFBinaryHeapGetMinimumIfPresent( + CFBinaryHeapRef heap, + ffi.Pointer> value, ) { - return _asin( - arg0, + return _CFBinaryHeapGetMinimumIfPresent( + heap, + value, ); } - late final _asinPtr = - _lookup>('asin'); - late final _asin = _asinPtr.asFunction(); + late final _CFBinaryHeapGetMinimumIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFBinaryHeapRef, ffi.Pointer>)>>( + 'CFBinaryHeapGetMinimumIfPresent'); + late final _CFBinaryHeapGetMinimumIfPresent = + _CFBinaryHeapGetMinimumIfPresentPtr.asFunction< + int Function(CFBinaryHeapRef, ffi.Pointer>)>(); - double atanf( - double arg0, + void CFBinaryHeapGetValues( + CFBinaryHeapRef heap, + ffi.Pointer> values, ) { - return _atanf( - arg0, + return _CFBinaryHeapGetValues( + heap, + values, ); } - late final _atanfPtr = - _lookup>('atanf'); - late final _atanf = _atanfPtr.asFunction(); + late final _CFBinaryHeapGetValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBinaryHeapRef, + ffi.Pointer>)>>('CFBinaryHeapGetValues'); + late final _CFBinaryHeapGetValues = _CFBinaryHeapGetValuesPtr.asFunction< + void Function(CFBinaryHeapRef, ffi.Pointer>)>(); - double atan( - double arg0, + void CFBinaryHeapApplyFunction( + CFBinaryHeapRef heap, + CFBinaryHeapApplierFunction applier, + ffi.Pointer context, ) { - return _atan( - arg0, + return _CFBinaryHeapApplyFunction( + heap, + applier, + context, ); } - late final _atanPtr = - _lookup>('atan'); - late final _atan = _atanPtr.asFunction(); + late final _CFBinaryHeapApplyFunctionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, + ffi.Pointer)>>('CFBinaryHeapApplyFunction'); + late final _CFBinaryHeapApplyFunction = + _CFBinaryHeapApplyFunctionPtr.asFunction< + void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, + ffi.Pointer)>(); - double atan2f( - double arg0, - double arg1, + void CFBinaryHeapAddValue( + CFBinaryHeapRef heap, + ffi.Pointer value, ) { - return _atan2f( - arg0, - arg1, + return _CFBinaryHeapAddValue( + heap, + value, ); } - late final _atan2fPtr = - _lookup>( - 'atan2f'); - late final _atan2f = _atan2fPtr.asFunction(); + late final _CFBinaryHeapAddValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFBinaryHeapRef, ffi.Pointer)>>('CFBinaryHeapAddValue'); + late final _CFBinaryHeapAddValue = _CFBinaryHeapAddValuePtr.asFunction< + void Function(CFBinaryHeapRef, ffi.Pointer)>(); - double atan2( - double arg0, - double arg1, + void CFBinaryHeapRemoveMinimumValue( + CFBinaryHeapRef heap, ) { - return _atan2( - arg0, - arg1, + return _CFBinaryHeapRemoveMinimumValue( + heap, ); } - late final _atan2Ptr = - _lookup>( - 'atan2'); - late final _atan2 = _atan2Ptr.asFunction(); + late final _CFBinaryHeapRemoveMinimumValuePtr = + _lookup>( + 'CFBinaryHeapRemoveMinimumValue'); + late final _CFBinaryHeapRemoveMinimumValue = + _CFBinaryHeapRemoveMinimumValuePtr.asFunction< + void Function(CFBinaryHeapRef)>(); - double cosf( - double arg0, + void CFBinaryHeapRemoveAllValues( + CFBinaryHeapRef heap, ) { - return _cosf( - arg0, + return _CFBinaryHeapRemoveAllValues( + heap, ); } - late final _cosfPtr = - _lookup>('cosf'); - late final _cosf = _cosfPtr.asFunction(); + late final _CFBinaryHeapRemoveAllValuesPtr = + _lookup>( + 'CFBinaryHeapRemoveAllValues'); + late final _CFBinaryHeapRemoveAllValues = _CFBinaryHeapRemoveAllValuesPtr + .asFunction(); - double cos( - double arg0, - ) { - return _cos( - arg0, - ); + int CFBitVectorGetTypeID() { + return _CFBitVectorGetTypeID(); } - late final _cosPtr = - _lookup>('cos'); - late final _cos = _cosPtr.asFunction(); + late final _CFBitVectorGetTypeIDPtr = + _lookup>('CFBitVectorGetTypeID'); + late final _CFBitVectorGetTypeID = + _CFBitVectorGetTypeIDPtr.asFunction(); - double sinf( - double arg0, + CFBitVectorRef CFBitVectorCreate( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int numBits, ) { - return _sinf( - arg0, + return _CFBitVectorCreate( + allocator, + bytes, + numBits, ); } - late final _sinfPtr = - _lookup>('sinf'); - late final _sinf = _sinfPtr.asFunction(); + late final _CFBitVectorCreatePtr = _lookup< + ffi.NativeFunction< + CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFBitVectorCreate'); + late final _CFBitVectorCreate = _CFBitVectorCreatePtr.asFunction< + CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - double sin( - double arg0, + CFBitVectorRef CFBitVectorCreateCopy( + CFAllocatorRef allocator, + CFBitVectorRef bv, ) { - return _sin( - arg0, + return _CFBitVectorCreateCopy( + allocator, + bv, ); } - late final _sinPtr = - _lookup>('sin'); - late final _sin = _sinPtr.asFunction(); + late final _CFBitVectorCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFBitVectorRef Function( + CFAllocatorRef, CFBitVectorRef)>>('CFBitVectorCreateCopy'); + late final _CFBitVectorCreateCopy = _CFBitVectorCreateCopyPtr.asFunction< + CFBitVectorRef Function(CFAllocatorRef, CFBitVectorRef)>(); - double tanf( - double arg0, + CFMutableBitVectorRef CFBitVectorCreateMutable( + CFAllocatorRef allocator, + int capacity, ) { - return _tanf( - arg0, + return _CFBitVectorCreateMutable( + allocator, + capacity, ); } - late final _tanfPtr = - _lookup>('tanf'); - late final _tanf = _tanfPtr.asFunction(); + late final _CFBitVectorCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableBitVectorRef Function( + CFAllocatorRef, CFIndex)>>('CFBitVectorCreateMutable'); + late final _CFBitVectorCreateMutable = _CFBitVectorCreateMutablePtr + .asFunction(); - double tan( - double arg0, + CFMutableBitVectorRef CFBitVectorCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFBitVectorRef bv, ) { - return _tan( - arg0, + return _CFBitVectorCreateMutableCopy( + allocator, + capacity, + bv, ); } - late final _tanPtr = - _lookup>('tan'); - late final _tan = _tanPtr.asFunction(); + late final _CFBitVectorCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableBitVectorRef Function(CFAllocatorRef, CFIndex, + CFBitVectorRef)>>('CFBitVectorCreateMutableCopy'); + late final _CFBitVectorCreateMutableCopy = + _CFBitVectorCreateMutableCopyPtr.asFunction< + CFMutableBitVectorRef Function( + CFAllocatorRef, int, CFBitVectorRef)>(); - double acoshf( - double arg0, + int CFBitVectorGetCount( + CFBitVectorRef bv, ) { - return _acoshf( - arg0, + return _CFBitVectorGetCount( + bv, ); } - late final _acoshfPtr = - _lookup>('acoshf'); - late final _acoshf = _acoshfPtr.asFunction(); + late final _CFBitVectorGetCountPtr = + _lookup>( + 'CFBitVectorGetCount'); + late final _CFBitVectorGetCount = + _CFBitVectorGetCountPtr.asFunction(); - double acosh( - double arg0, + int CFBitVectorGetCountOfBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _acosh( - arg0, + return _CFBitVectorGetCountOfBit( + bv, + range, + value, ); } - late final _acoshPtr = - _lookup>('acosh'); - late final _acosh = _acoshPtr.asFunction(); + late final _CFBitVectorGetCountOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetCountOfBit'); + late final _CFBitVectorGetCountOfBit = _CFBitVectorGetCountOfBitPtr + .asFunction(); - double asinhf( - double arg0, + int CFBitVectorContainsBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _asinhf( - arg0, + return _CFBitVectorContainsBit( + bv, + range, + value, ); } - late final _asinhfPtr = - _lookup>('asinhf'); - late final _asinhf = _asinhfPtr.asFunction(); + late final _CFBitVectorContainsBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorContainsBit'); + late final _CFBitVectorContainsBit = _CFBitVectorContainsBitPtr.asFunction< + int Function(CFBitVectorRef, CFRange, int)>(); - double asinh( - double arg0, + int CFBitVectorGetBitAtIndex( + CFBitVectorRef bv, + int idx, ) { - return _asinh( - arg0, + return _CFBitVectorGetBitAtIndex( + bv, + idx, ); } - late final _asinhPtr = - _lookup>('asinh'); - late final _asinh = _asinhPtr.asFunction(); + late final _CFBitVectorGetBitAtIndexPtr = + _lookup>( + 'CFBitVectorGetBitAtIndex'); + late final _CFBitVectorGetBitAtIndex = _CFBitVectorGetBitAtIndexPtr + .asFunction(); - double atanhf( - double arg0, + void CFBitVectorGetBits( + CFBitVectorRef bv, + CFRange range, + ffi.Pointer bytes, ) { - return _atanhf( - arg0, + return _CFBitVectorGetBits( + bv, + range, + bytes, ); } - late final _atanhfPtr = - _lookup>('atanhf'); - late final _atanhf = _atanhfPtr.asFunction(); + late final _CFBitVectorGetBitsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBitVectorRef, CFRange, + ffi.Pointer)>>('CFBitVectorGetBits'); + late final _CFBitVectorGetBits = _CFBitVectorGetBitsPtr.asFunction< + void Function(CFBitVectorRef, CFRange, ffi.Pointer)>(); - double atanh( - double arg0, + int CFBitVectorGetFirstIndexOfBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _atanh( - arg0, + return _CFBitVectorGetFirstIndexOfBit( + bv, + range, + value, ); } - late final _atanhPtr = - _lookup>('atanh'); - late final _atanh = _atanhPtr.asFunction(); + late final _CFBitVectorGetFirstIndexOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetFirstIndexOfBit'); + late final _CFBitVectorGetFirstIndexOfBit = _CFBitVectorGetFirstIndexOfBitPtr + .asFunction(); - double coshf( - double arg0, + int CFBitVectorGetLastIndexOfBit( + CFBitVectorRef bv, + CFRange range, + int value, ) { - return _coshf( - arg0, + return _CFBitVectorGetLastIndexOfBit( + bv, + range, + value, ); } - late final _coshfPtr = - _lookup>('coshf'); - late final _coshf = _coshfPtr.asFunction(); + late final _CFBitVectorGetLastIndexOfBitPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorGetLastIndexOfBit'); + late final _CFBitVectorGetLastIndexOfBit = _CFBitVectorGetLastIndexOfBitPtr + .asFunction(); - double cosh( - double arg0, + void CFBitVectorSetCount( + CFMutableBitVectorRef bv, + int count, ) { - return _cosh( - arg0, + return _CFBitVectorSetCount( + bv, + count, ); } - late final _coshPtr = - _lookup>('cosh'); - late final _cosh = _coshPtr.asFunction(); + late final _CFBitVectorSetCountPtr = _lookup< + ffi + .NativeFunction>( + 'CFBitVectorSetCount'); + late final _CFBitVectorSetCount = _CFBitVectorSetCountPtr.asFunction< + void Function(CFMutableBitVectorRef, int)>(); - double sinhf( - double arg0, + void CFBitVectorFlipBitAtIndex( + CFMutableBitVectorRef bv, + int idx, ) { - return _sinhf( - arg0, + return _CFBitVectorFlipBitAtIndex( + bv, + idx, ); } - late final _sinhfPtr = - _lookup>('sinhf'); - late final _sinhf = _sinhfPtr.asFunction(); + late final _CFBitVectorFlipBitAtIndexPtr = _lookup< + ffi + .NativeFunction>( + 'CFBitVectorFlipBitAtIndex'); + late final _CFBitVectorFlipBitAtIndex = _CFBitVectorFlipBitAtIndexPtr + .asFunction(); - double sinh( - double arg0, + void CFBitVectorFlipBits( + CFMutableBitVectorRef bv, + CFRange range, ) { - return _sinh( - arg0, + return _CFBitVectorFlipBits( + bv, + range, ); } - late final _sinhPtr = - _lookup>('sinh'); - late final _sinh = _sinhPtr.asFunction(); + late final _CFBitVectorFlipBitsPtr = _lookup< + ffi + .NativeFunction>( + 'CFBitVectorFlipBits'); + late final _CFBitVectorFlipBits = _CFBitVectorFlipBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, CFRange)>(); - double tanhf( - double arg0, + void CFBitVectorSetBitAtIndex( + CFMutableBitVectorRef bv, + int idx, + int value, ) { - return _tanhf( - arg0, + return _CFBitVectorSetBitAtIndex( + bv, + idx, + value, ); } - late final _tanhfPtr = - _lookup>('tanhf'); - late final _tanhf = _tanhfPtr.asFunction(); + late final _CFBitVectorSetBitAtIndexPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableBitVectorRef, CFIndex, + CFBit)>>('CFBitVectorSetBitAtIndex'); + late final _CFBitVectorSetBitAtIndex = _CFBitVectorSetBitAtIndexPtr + .asFunction(); - double tanh( - double arg0, + void CFBitVectorSetBits( + CFMutableBitVectorRef bv, + CFRange range, + int value, ) { - return _tanh( - arg0, + return _CFBitVectorSetBits( + bv, + range, + value, ); } - late final _tanhPtr = - _lookup>('tanh'); - late final _tanh = _tanhPtr.asFunction(); + late final _CFBitVectorSetBitsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableBitVectorRef, CFRange, CFBit)>>('CFBitVectorSetBits'); + late final _CFBitVectorSetBits = _CFBitVectorSetBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, CFRange, int)>(); - double expf( - double arg0, + void CFBitVectorSetAllBits( + CFMutableBitVectorRef bv, + int value, ) { - return _expf( - arg0, + return _CFBitVectorSetAllBits( + bv, + value, ); } - late final _expfPtr = - _lookup>('expf'); - late final _expf = _expfPtr.asFunction(); + late final _CFBitVectorSetAllBitsPtr = _lookup< + ffi.NativeFunction>( + 'CFBitVectorSetAllBits'); + late final _CFBitVectorSetAllBits = _CFBitVectorSetAllBitsPtr.asFunction< + void Function(CFMutableBitVectorRef, int)>(); - double exp( - double arg0, - ) { - return _exp( - arg0, - ); - } + late final ffi.Pointer + _kCFTypeDictionaryKeyCallBacks = + _lookup('kCFTypeDictionaryKeyCallBacks'); - late final _expPtr = - _lookup>('exp'); - late final _exp = _expPtr.asFunction(); + CFDictionaryKeyCallBacks get kCFTypeDictionaryKeyCallBacks => + _kCFTypeDictionaryKeyCallBacks.ref; - double exp2f( - double arg0, - ) { - return _exp2f( - arg0, - ); - } + late final ffi.Pointer + _kCFCopyStringDictionaryKeyCallBacks = + _lookup('kCFCopyStringDictionaryKeyCallBacks'); - late final _exp2fPtr = - _lookup>('exp2f'); - late final _exp2f = _exp2fPtr.asFunction(); + CFDictionaryKeyCallBacks get kCFCopyStringDictionaryKeyCallBacks => + _kCFCopyStringDictionaryKeyCallBacks.ref; - double exp2( - double arg0, - ) { - return _exp2( - arg0, - ); + late final ffi.Pointer + _kCFTypeDictionaryValueCallBacks = + _lookup('kCFTypeDictionaryValueCallBacks'); + + CFDictionaryValueCallBacks get kCFTypeDictionaryValueCallBacks => + _kCFTypeDictionaryValueCallBacks.ref; + + int CFDictionaryGetTypeID() { + return _CFDictionaryGetTypeID(); } - late final _exp2Ptr = - _lookup>('exp2'); - late final _exp2 = _exp2Ptr.asFunction(); + late final _CFDictionaryGetTypeIDPtr = + _lookup>('CFDictionaryGetTypeID'); + late final _CFDictionaryGetTypeID = + _CFDictionaryGetTypeIDPtr.asFunction(); - double expm1f( - double arg0, + CFDictionaryRef CFDictionaryCreate( + CFAllocatorRef allocator, + ffi.Pointer> keys, + ffi.Pointer> values, + int numValues, + ffi.Pointer keyCallBacks, + ffi.Pointer valueCallBacks, ) { - return _expm1f( - arg0, + return _CFDictionaryCreate( + allocator, + keys, + values, + numValues, + keyCallBacks, + valueCallBacks, ); } - late final _expm1fPtr = - _lookup>('expm1f'); - late final _expm1f = _expm1fPtr.asFunction(); + late final _CFDictionaryCreatePtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function( + CFAllocatorRef, + ffi.Pointer>, + ffi.Pointer>, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFDictionaryCreate'); + late final _CFDictionaryCreate = _CFDictionaryCreatePtr.asFunction< + CFDictionaryRef Function( + CFAllocatorRef, + ffi.Pointer>, + ffi.Pointer>, + int, + ffi.Pointer, + ffi.Pointer)>(); - double expm1( - double arg0, + CFDictionaryRef CFDictionaryCreateCopy( + CFAllocatorRef allocator, + CFDictionaryRef theDict, ) { - return _expm1( - arg0, + return _CFDictionaryCreateCopy( + allocator, + theDict, ); } - late final _expm1Ptr = - _lookup>('expm1'); - late final _expm1 = _expm1Ptr.asFunction(); + late final _CFDictionaryCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function( + CFAllocatorRef, CFDictionaryRef)>>('CFDictionaryCreateCopy'); + late final _CFDictionaryCreateCopy = _CFDictionaryCreateCopyPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFDictionaryRef)>(); - double logf( - double arg0, + CFMutableDictionaryRef CFDictionaryCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer keyCallBacks, + ffi.Pointer valueCallBacks, ) { - return _logf( - arg0, + return _CFDictionaryCreateMutable( + allocator, + capacity, + keyCallBacks, + valueCallBacks, ); } - late final _logfPtr = - _lookup>('logf'); - late final _logf = _logfPtr.asFunction(); + late final _CFDictionaryCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>( + 'CFDictionaryCreateMutable'); + late final _CFDictionaryCreateMutable = + _CFDictionaryCreateMutablePtr.asFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, + int, + ffi.Pointer, + ffi.Pointer)>(); - double log( - double arg0, + CFMutableDictionaryRef CFDictionaryCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFDictionaryRef theDict, ) { - return _log( - arg0, + return _CFDictionaryCreateMutableCopy( + allocator, + capacity, + theDict, ); } - late final _logPtr = - _lookup>('log'); - late final _log = _logPtr.asFunction(); + late final _CFDictionaryCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableDictionaryRef Function(CFAllocatorRef, CFIndex, + CFDictionaryRef)>>('CFDictionaryCreateMutableCopy'); + late final _CFDictionaryCreateMutableCopy = + _CFDictionaryCreateMutableCopyPtr.asFunction< + CFMutableDictionaryRef Function( + CFAllocatorRef, int, CFDictionaryRef)>(); - double log10f( - double arg0, + int CFDictionaryGetCount( + CFDictionaryRef theDict, ) { - return _log10f( - arg0, + return _CFDictionaryGetCount( + theDict, ); } - late final _log10fPtr = - _lookup>('log10f'); - late final _log10f = _log10fPtr.asFunction(); + late final _CFDictionaryGetCountPtr = + _lookup>( + 'CFDictionaryGetCount'); + late final _CFDictionaryGetCount = + _CFDictionaryGetCountPtr.asFunction(); - double log10( - double arg0, + int CFDictionaryGetCountOfKey( + CFDictionaryRef theDict, + ffi.Pointer key, ) { - return _log10( - arg0, + return _CFDictionaryGetCountOfKey( + theDict, + key, ); } - late final _log10Ptr = - _lookup>('log10'); - late final _log10 = _log10Ptr.asFunction(); + late final _CFDictionaryGetCountOfKeyPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryGetCountOfKey'); + late final _CFDictionaryGetCountOfKey = _CFDictionaryGetCountOfKeyPtr + .asFunction)>(); - double log2f( - double arg0, + int CFDictionaryGetCountOfValue( + CFDictionaryRef theDict, + ffi.Pointer value, ) { - return _log2f( - arg0, + return _CFDictionaryGetCountOfValue( + theDict, + value, ); } - late final _log2fPtr = - _lookup>('log2f'); - late final _log2f = _log2fPtr.asFunction(); + late final _CFDictionaryGetCountOfValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryGetCountOfValue'); + late final _CFDictionaryGetCountOfValue = _CFDictionaryGetCountOfValuePtr + .asFunction)>(); - double log2( - double arg0, + int CFDictionaryContainsKey( + CFDictionaryRef theDict, + ffi.Pointer key, ) { - return _log2( - arg0, + return _CFDictionaryContainsKey( + theDict, + key, ); } - late final _log2Ptr = - _lookup>('log2'); - late final _log2 = _log2Ptr.asFunction(); + late final _CFDictionaryContainsKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryContainsKey'); + late final _CFDictionaryContainsKey = _CFDictionaryContainsKeyPtr.asFunction< + int Function(CFDictionaryRef, ffi.Pointer)>(); - double log1pf( - double arg0, + int CFDictionaryContainsValue( + CFDictionaryRef theDict, + ffi.Pointer value, ) { - return _log1pf( - arg0, + return _CFDictionaryContainsValue( + theDict, + value, ); } - late final _log1pfPtr = - _lookup>('log1pf'); - late final _log1pf = _log1pfPtr.asFunction(); + late final _CFDictionaryContainsValuePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDictionaryRef, + ffi.Pointer)>>('CFDictionaryContainsValue'); + late final _CFDictionaryContainsValue = _CFDictionaryContainsValuePtr + .asFunction)>(); - double log1p( - double arg0, + ffi.Pointer CFDictionaryGetValue( + CFDictionaryRef theDict, + ffi.Pointer key, ) { - return _log1p( - arg0, + return _CFDictionaryGetValue( + theDict, + key, ); } - late final _log1pPtr = - _lookup>('log1p'); - late final _log1p = _log1pPtr.asFunction(); + late final _CFDictionaryGetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFDictionaryRef, ffi.Pointer)>>('CFDictionaryGetValue'); + late final _CFDictionaryGetValue = _CFDictionaryGetValuePtr.asFunction< + ffi.Pointer Function(CFDictionaryRef, ffi.Pointer)>(); - double logbf( - double arg0, + int CFDictionaryGetValueIfPresent( + CFDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer> value, ) { - return _logbf( - arg0, + return _CFDictionaryGetValueIfPresent( + theDict, + key, + value, ); } - late final _logbfPtr = - _lookup>('logbf'); - late final _logbf = _logbfPtr.asFunction(); + late final _CFDictionaryGetValueIfPresentPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDictionaryRef, ffi.Pointer, + ffi.Pointer>)>>( + 'CFDictionaryGetValueIfPresent'); + late final _CFDictionaryGetValueIfPresent = + _CFDictionaryGetValueIfPresentPtr.asFunction< + int Function(CFDictionaryRef, ffi.Pointer, + ffi.Pointer>)>(); - double logb( - double arg0, + void CFDictionaryGetKeysAndValues( + CFDictionaryRef theDict, + ffi.Pointer> keys, + ffi.Pointer> values, ) { - return _logb( - arg0, + return _CFDictionaryGetKeysAndValues( + theDict, + keys, + values, ); } - late final _logbPtr = - _lookup>('logb'); - late final _logb = _logbPtr.asFunction(); + late final _CFDictionaryGetKeysAndValuesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFDictionaryRef, + ffi.Pointer>, + ffi.Pointer>)>>( + 'CFDictionaryGetKeysAndValues'); + late final _CFDictionaryGetKeysAndValues = + _CFDictionaryGetKeysAndValuesPtr.asFunction< + void Function(CFDictionaryRef, ffi.Pointer>, + ffi.Pointer>)>(); - double modff( - double arg0, - ffi.Pointer arg1, + void CFDictionaryApplyFunction( + CFDictionaryRef theDict, + CFDictionaryApplierFunction applier, + ffi.Pointer context, ) { - return _modff( - arg0, - arg1, + return _CFDictionaryApplyFunction( + theDict, + applier, + context, ); } - late final _modffPtr = _lookup< + late final _CFDictionaryApplyFunctionPtr = _lookup< ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Pointer)>>('modff'); - late final _modff = - _modffPtr.asFunction)>(); + ffi.Void Function(CFDictionaryRef, CFDictionaryApplierFunction, + ffi.Pointer)>>('CFDictionaryApplyFunction'); + late final _CFDictionaryApplyFunction = + _CFDictionaryApplyFunctionPtr.asFunction< + void Function(CFDictionaryRef, CFDictionaryApplierFunction, + ffi.Pointer)>(); - double modf( - double arg0, - ffi.Pointer arg1, + void CFDictionaryAddValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, ) { - return _modf( - arg0, - arg1, + return _CFDictionaryAddValue( + theDict, + key, + value, ); } - late final _modfPtr = _lookup< + late final _CFDictionaryAddValuePtr = _lookup< ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Pointer)>>('modf'); - late final _modf = - _modfPtr.asFunction)>(); + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionaryAddValue'); + late final _CFDictionaryAddValue = _CFDictionaryAddValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); - double ldexpf( - double arg0, - int arg1, + void CFDictionarySetValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, ) { - return _ldexpf( - arg0, - arg1, + return _CFDictionarySetValue( + theDict, + key, + value, ); } - late final _ldexpfPtr = - _lookup>( - 'ldexpf'); - late final _ldexpf = _ldexpfPtr.asFunction(); + late final _CFDictionarySetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionarySetValue'); + late final _CFDictionarySetValue = _CFDictionarySetValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); - double ldexp( - double arg0, - int arg1, + void CFDictionaryReplaceValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, + ffi.Pointer value, ) { - return _ldexp( - arg0, - arg1, + return _CFDictionaryReplaceValue( + theDict, + key, + value, ); } - late final _ldexpPtr = - _lookup>( - 'ldexp'); - late final _ldexp = _ldexpPtr.asFunction(); + late final _CFDictionaryReplaceValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>>('CFDictionaryReplaceValue'); + late final _CFDictionaryReplaceValue = + _CFDictionaryReplaceValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer, + ffi.Pointer)>(); - double frexpf( - double arg0, - ffi.Pointer arg1, + void CFDictionaryRemoveValue( + CFMutableDictionaryRef theDict, + ffi.Pointer key, ) { - return _frexpf( - arg0, - arg1, + return _CFDictionaryRemoveValue( + theDict, + key, ); } - late final _frexpfPtr = _lookup< + late final _CFDictionaryRemoveValuePtr = _lookup< ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Pointer)>>('frexpf'); - late final _frexpf = - _frexpfPtr.asFunction)>(); + ffi.Void Function(CFMutableDictionaryRef, + ffi.Pointer)>>('CFDictionaryRemoveValue'); + late final _CFDictionaryRemoveValue = _CFDictionaryRemoveValuePtr.asFunction< + void Function(CFMutableDictionaryRef, ffi.Pointer)>(); - double frexp( - double arg0, - ffi.Pointer arg1, + void CFDictionaryRemoveAllValues( + CFMutableDictionaryRef theDict, ) { - return _frexp( - arg0, - arg1, + return _CFDictionaryRemoveAllValues( + theDict, ); } - late final _frexpPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Pointer)>>('frexp'); - late final _frexp = - _frexpPtr.asFunction)>(); + late final _CFDictionaryRemoveAllValuesPtr = + _lookup>( + 'CFDictionaryRemoveAllValues'); + late final _CFDictionaryRemoveAllValues = _CFDictionaryRemoveAllValuesPtr + .asFunction(); - int ilogbf( - double arg0, - ) { - return _ilogbf( - arg0, - ); + int CFNotificationCenterGetTypeID() { + return _CFNotificationCenterGetTypeID(); } - late final _ilogbfPtr = - _lookup>('ilogbf'); - late final _ilogbf = _ilogbfPtr.asFunction(); + late final _CFNotificationCenterGetTypeIDPtr = + _lookup>( + 'CFNotificationCenterGetTypeID'); + late final _CFNotificationCenterGetTypeID = + _CFNotificationCenterGetTypeIDPtr.asFunction(); - int ilogb( - double arg0, - ) { - return _ilogb( - arg0, - ); + CFNotificationCenterRef CFNotificationCenterGetLocalCenter() { + return _CFNotificationCenterGetLocalCenter(); } - late final _ilogbPtr = - _lookup>('ilogb'); - late final _ilogb = _ilogbPtr.asFunction(); + late final _CFNotificationCenterGetLocalCenterPtr = + _lookup>( + 'CFNotificationCenterGetLocalCenter'); + late final _CFNotificationCenterGetLocalCenter = + _CFNotificationCenterGetLocalCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); - double scalbnf( - double arg0, - int arg1, - ) { - return _scalbnf( - arg0, - arg1, - ); + CFNotificationCenterRef CFNotificationCenterGetDistributedCenter() { + return _CFNotificationCenterGetDistributedCenter(); } - late final _scalbnfPtr = - _lookup>( - 'scalbnf'); - late final _scalbnf = _scalbnfPtr.asFunction(); + late final _CFNotificationCenterGetDistributedCenterPtr = + _lookup>( + 'CFNotificationCenterGetDistributedCenter'); + late final _CFNotificationCenterGetDistributedCenter = + _CFNotificationCenterGetDistributedCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); - double scalbn( - double arg0, - int arg1, - ) { - return _scalbn( - arg0, - arg1, - ); + CFNotificationCenterRef CFNotificationCenterGetDarwinNotifyCenter() { + return _CFNotificationCenterGetDarwinNotifyCenter(); } - late final _scalbnPtr = - _lookup>( - 'scalbn'); - late final _scalbn = _scalbnPtr.asFunction(); + late final _CFNotificationCenterGetDarwinNotifyCenterPtr = + _lookup>( + 'CFNotificationCenterGetDarwinNotifyCenter'); + late final _CFNotificationCenterGetDarwinNotifyCenter = + _CFNotificationCenterGetDarwinNotifyCenterPtr.asFunction< + CFNotificationCenterRef Function()>(); - double scalblnf( - double arg0, - int arg1, + void CFNotificationCenterAddObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationCallback callBack, + CFStringRef name, + ffi.Pointer object, + CFNotificationSuspensionBehavior suspensionBehavior, ) { - return _scalblnf( - arg0, - arg1, + return _CFNotificationCenterAddObserver( + center, + observer, + callBack, + name, + object, + suspensionBehavior.value, ); } - late final _scalblnfPtr = - _lookup>( - 'scalblnf'); - late final _scalblnf = - _scalblnfPtr.asFunction(); + late final _CFNotificationCenterAddObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationCallback, + CFStringRef, + ffi.Pointer, + CFIndex)>>('CFNotificationCenterAddObserver'); + late final _CFNotificationCenterAddObserver = + _CFNotificationCenterAddObserverPtr.asFunction< + void Function( + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationCallback, + CFStringRef, + ffi.Pointer, + int)>(); - double scalbln( - double arg0, - int arg1, + void CFNotificationCenterRemoveObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationName name, + ffi.Pointer object, ) { - return _scalbln( - arg0, - arg1, + return _CFNotificationCenterRemoveObserver( + center, + observer, + name, + object, ); } - late final _scalblnPtr = - _lookup>( - 'scalbln'); - late final _scalbln = _scalblnPtr.asFunction(); + late final _CFNotificationCenterRemoveObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, + ffi.Pointer, + CFNotificationName, + ffi.Pointer)>>('CFNotificationCenterRemoveObserver'); + late final _CFNotificationCenterRemoveObserver = + _CFNotificationCenterRemoveObserverPtr.asFunction< + void Function(CFNotificationCenterRef, ffi.Pointer, + CFNotificationName, ffi.Pointer)>(); - double fabsf( - double arg0, + void CFNotificationCenterRemoveEveryObserver( + CFNotificationCenterRef center, + ffi.Pointer observer, ) { - return _fabsf( - arg0, + return _CFNotificationCenterRemoveEveryObserver( + center, + observer, ); } - late final _fabsfPtr = - _lookup>('fabsf'); - late final _fabsf = _fabsfPtr.asFunction(); + late final _CFNotificationCenterRemoveEveryObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, ffi.Pointer)>>( + 'CFNotificationCenterRemoveEveryObserver'); + late final _CFNotificationCenterRemoveEveryObserver = + _CFNotificationCenterRemoveEveryObserverPtr.asFunction< + void Function(CFNotificationCenterRef, ffi.Pointer)>(); - double fabs( - double arg0, + void CFNotificationCenterPostNotification( + CFNotificationCenterRef center, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo, + int deliverImmediately, ) { - return _fabs( - arg0, + return _CFNotificationCenterPostNotification( + center, + name, + object, + userInfo, + deliverImmediately, ); } - late final _fabsPtr = - _lookup>('fabs'); - late final _fabs = _fabsPtr.asFunction(); + late final _CFNotificationCenterPostNotificationPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFNotificationCenterRef, + CFNotificationName, + ffi.Pointer, + CFDictionaryRef, + Boolean)>>('CFNotificationCenterPostNotification'); + late final _CFNotificationCenterPostNotification = + _CFNotificationCenterPostNotificationPtr.asFunction< + void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, int)>(); - double cbrtf( - double arg0, + void CFNotificationCenterPostNotificationWithOptions( + CFNotificationCenterRef center, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo, + int options, ) { - return _cbrtf( - arg0, + return _CFNotificationCenterPostNotificationWithOptions( + center, + name, + object, + userInfo, + options, ); } - late final _cbrtfPtr = - _lookup>('cbrtf'); - late final _cbrtf = _cbrtfPtr.asFunction(); + late final _CFNotificationCenterPostNotificationWithOptionsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, CFOptionFlags)>>( + 'CFNotificationCenterPostNotificationWithOptions'); + late final _CFNotificationCenterPostNotificationWithOptions = + _CFNotificationCenterPostNotificationWithOptionsPtr.asFunction< + void Function(CFNotificationCenterRef, CFNotificationName, + ffi.Pointer, CFDictionaryRef, int)>(); - double cbrt( - double arg0, - ) { - return _cbrt( - arg0, - ); + int CFLocaleGetTypeID() { + return _CFLocaleGetTypeID(); } - late final _cbrtPtr = - _lookup>('cbrt'); - late final _cbrt = _cbrtPtr.asFunction(); + late final _CFLocaleGetTypeIDPtr = + _lookup>('CFLocaleGetTypeID'); + late final _CFLocaleGetTypeID = + _CFLocaleGetTypeIDPtr.asFunction(); - double hypotf( - double arg0, - double arg1, - ) { - return _hypotf( - arg0, - arg1, - ); + CFLocaleRef CFLocaleGetSystem() { + return _CFLocaleGetSystem(); } - late final _hypotfPtr = - _lookup>( - 'hypotf'); - late final _hypotf = _hypotfPtr.asFunction(); + late final _CFLocaleGetSystemPtr = + _lookup>('CFLocaleGetSystem'); + late final _CFLocaleGetSystem = + _CFLocaleGetSystemPtr.asFunction(); - double hypot( - double arg0, - double arg1, - ) { - return _hypot( - arg0, - arg1, - ); + CFLocaleRef CFLocaleCopyCurrent() { + return _CFLocaleCopyCurrent(); } - late final _hypotPtr = - _lookup>( - 'hypot'); - late final _hypot = _hypotPtr.asFunction(); + late final _CFLocaleCopyCurrentPtr = + _lookup>( + 'CFLocaleCopyCurrent'); + late final _CFLocaleCopyCurrent = + _CFLocaleCopyCurrentPtr.asFunction(); - double powf( - double arg0, - double arg1, - ) { - return _powf( - arg0, - arg1, - ); + CFArrayRef CFLocaleCopyAvailableLocaleIdentifiers() { + return _CFLocaleCopyAvailableLocaleIdentifiers(); } - late final _powfPtr = - _lookup>( - 'powf'); - late final _powf = _powfPtr.asFunction(); + late final _CFLocaleCopyAvailableLocaleIdentifiersPtr = + _lookup>( + 'CFLocaleCopyAvailableLocaleIdentifiers'); + late final _CFLocaleCopyAvailableLocaleIdentifiers = + _CFLocaleCopyAvailableLocaleIdentifiersPtr.asFunction< + CFArrayRef Function()>(); - double pow( - double arg0, - double arg1, - ) { - return _pow( - arg0, - arg1, - ); + CFArrayRef CFLocaleCopyISOLanguageCodes() { + return _CFLocaleCopyISOLanguageCodes(); } - late final _powPtr = - _lookup>( - 'pow'); - late final _pow = _powPtr.asFunction(); + late final _CFLocaleCopyISOLanguageCodesPtr = + _lookup>( + 'CFLocaleCopyISOLanguageCodes'); + late final _CFLocaleCopyISOLanguageCodes = + _CFLocaleCopyISOLanguageCodesPtr.asFunction(); - double sqrtf( - double arg0, - ) { - return _sqrtf( - arg0, - ); + CFArrayRef CFLocaleCopyISOCountryCodes() { + return _CFLocaleCopyISOCountryCodes(); } - late final _sqrtfPtr = - _lookup>('sqrtf'); - late final _sqrtf = _sqrtfPtr.asFunction(); + late final _CFLocaleCopyISOCountryCodesPtr = + _lookup>( + 'CFLocaleCopyISOCountryCodes'); + late final _CFLocaleCopyISOCountryCodes = + _CFLocaleCopyISOCountryCodesPtr.asFunction(); - double sqrt( - double arg0, - ) { - return _sqrt( - arg0, - ); + CFArrayRef CFLocaleCopyISOCurrencyCodes() { + return _CFLocaleCopyISOCurrencyCodes(); } - late final _sqrtPtr = - _lookup>('sqrt'); - late final _sqrt = _sqrtPtr.asFunction(); + late final _CFLocaleCopyISOCurrencyCodesPtr = + _lookup>( + 'CFLocaleCopyISOCurrencyCodes'); + late final _CFLocaleCopyISOCurrencyCodes = + _CFLocaleCopyISOCurrencyCodesPtr.asFunction(); - double erff( - double arg0, - ) { - return _erff( - arg0, - ); + CFArrayRef CFLocaleCopyCommonISOCurrencyCodes() { + return _CFLocaleCopyCommonISOCurrencyCodes(); } - late final _erffPtr = - _lookup>('erff'); - late final _erff = _erffPtr.asFunction(); + late final _CFLocaleCopyCommonISOCurrencyCodesPtr = + _lookup>( + 'CFLocaleCopyCommonISOCurrencyCodes'); + late final _CFLocaleCopyCommonISOCurrencyCodes = + _CFLocaleCopyCommonISOCurrencyCodesPtr.asFunction< + CFArrayRef Function()>(); - double erf( - double arg0, - ) { - return _erf( - arg0, - ); + CFArrayRef CFLocaleCopyPreferredLanguages() { + return _CFLocaleCopyPreferredLanguages(); } - late final _erfPtr = - _lookup>('erf'); - late final _erf = _erfPtr.asFunction(); + late final _CFLocaleCopyPreferredLanguagesPtr = + _lookup>( + 'CFLocaleCopyPreferredLanguages'); + late final _CFLocaleCopyPreferredLanguages = + _CFLocaleCopyPreferredLanguagesPtr.asFunction(); - double erfcf( - double arg0, + CFLocaleIdentifier CFLocaleCreateCanonicalLanguageIdentifierFromString( + CFAllocatorRef allocator, + CFStringRef localeIdentifier, ) { - return _erfcf( - arg0, + return _CFLocaleCreateCanonicalLanguageIdentifierFromString( + allocator, + localeIdentifier, ); } - late final _erfcfPtr = - _lookup>('erfcf'); - late final _erfcf = _erfcfPtr.asFunction(); + late final _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( + 'CFLocaleCreateCanonicalLanguageIdentifierFromString'); + late final _CFLocaleCreateCanonicalLanguageIdentifierFromString = + _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); - double erfc( - double arg0, + CFLocaleIdentifier CFLocaleCreateCanonicalLocaleIdentifierFromString( + CFAllocatorRef allocator, + CFStringRef localeIdentifier, ) { - return _erfc( - arg0, + return _CFLocaleCreateCanonicalLocaleIdentifierFromString( + allocator, + localeIdentifier, ); } - late final _erfcPtr = - _lookup>('erfc'); - late final _erfc = _erfcPtr.asFunction(); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( + 'CFLocaleCreateCanonicalLocaleIdentifierFromString'); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromString = + _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); - double lgammaf( - double arg0, + CFLocaleIdentifier + CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + CFAllocatorRef allocator, + int lcode, + int rcode, ) { - return _lgammaf( - arg0, + return _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + allocator, + lcode, + rcode, ); } - late final _lgammafPtr = - _lookup>('lgammaf'); - late final _lgammaf = _lgammafPtr.asFunction(); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr = + _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function( + CFAllocatorRef, LangCode, RegionCode)>>( + 'CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes'); + late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes = + _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr + .asFunction(); - double lgamma( - double arg0, + CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + CFAllocatorRef allocator, + int lcid, ) { - return _lgamma( - arg0, + return _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + allocator, + lcid, ); } - late final _lgammaPtr = - _lookup>('lgamma'); - late final _lgamma = _lgammaPtr.asFunction(); + late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, ffi.Uint32)>>( + 'CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode'); + late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode = + _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, int)>(); - double tgammaf( - double arg0, + int CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( + CFLocaleIdentifier localeIdentifier, ) { - return _tgammaf( - arg0, + return _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( + localeIdentifier, ); } - late final _tgammafPtr = - _lookup>('tgammaf'); - late final _tgammaf = _tgammafPtr.asFunction(); + late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr = + _lookup>( + 'CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier'); + late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier = + _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr.asFunction< + int Function(CFLocaleIdentifier)>(); - double tgamma( - double arg0, + CFLocaleLanguageDirection CFLocaleGetLanguageCharacterDirection( + CFStringRef isoLangCode, ) { - return _tgamma( - arg0, - ); + return CFLocaleLanguageDirection.fromValue( + _CFLocaleGetLanguageCharacterDirection( + isoLangCode, + )); } - late final _tgammaPtr = - _lookup>('tgamma'); - late final _tgamma = _tgammaPtr.asFunction(); + late final _CFLocaleGetLanguageCharacterDirectionPtr = + _lookup>( + 'CFLocaleGetLanguageCharacterDirection'); + late final _CFLocaleGetLanguageCharacterDirection = + _CFLocaleGetLanguageCharacterDirectionPtr.asFunction< + int Function(CFStringRef)>(); - double ceilf( - double arg0, + CFLocaleLanguageDirection CFLocaleGetLanguageLineDirection( + CFStringRef isoLangCode, ) { - return _ceilf( - arg0, - ); + return CFLocaleLanguageDirection.fromValue( + _CFLocaleGetLanguageLineDirection( + isoLangCode, + )); } - late final _ceilfPtr = - _lookup>('ceilf'); - late final _ceilf = _ceilfPtr.asFunction(); + late final _CFLocaleGetLanguageLineDirectionPtr = + _lookup>( + 'CFLocaleGetLanguageLineDirection'); + late final _CFLocaleGetLanguageLineDirection = + _CFLocaleGetLanguageLineDirectionPtr.asFunction< + int Function(CFStringRef)>(); - double ceil( - double arg0, + CFDictionaryRef CFLocaleCreateComponentsFromLocaleIdentifier( + CFAllocatorRef allocator, + CFLocaleIdentifier localeID, ) { - return _ceil( - arg0, + return _CFLocaleCreateComponentsFromLocaleIdentifier( + allocator, + localeID, ); } - late final _ceilPtr = - _lookup>('ceil'); - late final _ceil = _ceilPtr.asFunction(); + late final _CFLocaleCreateComponentsFromLocaleIdentifierPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>>( + 'CFLocaleCreateComponentsFromLocaleIdentifier'); + late final _CFLocaleCreateComponentsFromLocaleIdentifier = + _CFLocaleCreateComponentsFromLocaleIdentifierPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); - double floorf( - double arg0, + CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromComponents( + CFAllocatorRef allocator, + CFDictionaryRef dictionary, ) { - return _floorf( - arg0, + return _CFLocaleCreateLocaleIdentifierFromComponents( + allocator, + dictionary, ); } - late final _floorfPtr = - _lookup>('floorf'); - late final _floorf = _floorfPtr.asFunction(); + late final _CFLocaleCreateLocaleIdentifierFromComponentsPtr = _lookup< + ffi.NativeFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>>( + 'CFLocaleCreateLocaleIdentifierFromComponents'); + late final _CFLocaleCreateLocaleIdentifierFromComponents = + _CFLocaleCreateLocaleIdentifierFromComponentsPtr.asFunction< + CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>(); - double floor( - double arg0, + CFLocaleRef CFLocaleCreate( + CFAllocatorRef allocator, + CFLocaleIdentifier localeIdentifier, ) { - return _floor( - arg0, + return _CFLocaleCreate( + allocator, + localeIdentifier, ); } - late final _floorPtr = - _lookup>('floor'); - late final _floor = _floorPtr.asFunction(); + late final _CFLocaleCreatePtr = _lookup< + ffi.NativeFunction< + CFLocaleRef Function( + CFAllocatorRef, CFLocaleIdentifier)>>('CFLocaleCreate'); + late final _CFLocaleCreate = _CFLocaleCreatePtr.asFunction< + CFLocaleRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); - double nearbyintf( - double arg0, + CFLocaleRef CFLocaleCreateCopy( + CFAllocatorRef allocator, + CFLocaleRef locale, ) { - return _nearbyintf( - arg0, + return _CFLocaleCreateCopy( + allocator, + locale, ); } - late final _nearbyintfPtr = - _lookup>('nearbyintf'); - late final _nearbyintf = _nearbyintfPtr.asFunction(); + late final _CFLocaleCreateCopyPtr = _lookup< + ffi + .NativeFunction>( + 'CFLocaleCreateCopy'); + late final _CFLocaleCreateCopy = _CFLocaleCreateCopyPtr.asFunction< + CFLocaleRef Function(CFAllocatorRef, CFLocaleRef)>(); - double nearbyint( - double arg0, + CFLocaleIdentifier CFLocaleGetIdentifier( + CFLocaleRef locale, ) { - return _nearbyint( - arg0, + return _CFLocaleGetIdentifier( + locale, ); } - late final _nearbyintPtr = - _lookup>('nearbyint'); - late final _nearbyint = _nearbyintPtr.asFunction(); + late final _CFLocaleGetIdentifierPtr = + _lookup>( + 'CFLocaleGetIdentifier'); + late final _CFLocaleGetIdentifier = _CFLocaleGetIdentifierPtr.asFunction< + CFLocaleIdentifier Function(CFLocaleRef)>(); - double rintf( - double arg0, + CFTypeRef CFLocaleGetValue( + CFLocaleRef locale, + CFLocaleKey key, ) { - return _rintf( - arg0, + return _CFLocaleGetValue( + locale, + key, ); } - late final _rintfPtr = - _lookup>('rintf'); - late final _rintf = _rintfPtr.asFunction(); + late final _CFLocaleGetValuePtr = + _lookup>( + 'CFLocaleGetValue'); + late final _CFLocaleGetValue = _CFLocaleGetValuePtr.asFunction< + CFTypeRef Function(CFLocaleRef, CFLocaleKey)>(); - double rint( - double arg0, + CFStringRef CFLocaleCopyDisplayNameForPropertyValue( + CFLocaleRef displayLocale, + CFLocaleKey key, + CFStringRef value, ) { - return _rint( - arg0, + return _CFLocaleCopyDisplayNameForPropertyValue( + displayLocale, + key, + value, ); } - late final _rintPtr = - _lookup>('rint'); - late final _rint = _rintPtr.asFunction(); + late final _CFLocaleCopyDisplayNameForPropertyValuePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFLocaleRef, CFLocaleKey, + CFStringRef)>>('CFLocaleCopyDisplayNameForPropertyValue'); + late final _CFLocaleCopyDisplayNameForPropertyValue = + _CFLocaleCopyDisplayNameForPropertyValuePtr.asFunction< + CFStringRef Function(CFLocaleRef, CFLocaleKey, CFStringRef)>(); - int lrintf( - double arg0, - ) { - return _lrintf( - arg0, - ); - } + late final ffi.Pointer + _kCFLocaleCurrentLocaleDidChangeNotification = + _lookup( + 'kCFLocaleCurrentLocaleDidChangeNotification'); - late final _lrintfPtr = - _lookup>('lrintf'); - late final _lrintf = _lrintfPtr.asFunction(); + CFNotificationName get kCFLocaleCurrentLocaleDidChangeNotification => + _kCFLocaleCurrentLocaleDidChangeNotification.value; - int lrint( - double arg0, - ) { - return _lrint( - arg0, - ); - } + late final ffi.Pointer _kCFLocaleIdentifier = + _lookup('kCFLocaleIdentifier'); - late final _lrintPtr = - _lookup>('lrint'); - late final _lrint = _lrintPtr.asFunction(); + CFLocaleKey get kCFLocaleIdentifier => _kCFLocaleIdentifier.value; - double roundf( - double arg0, - ) { - return _roundf( - arg0, - ); - } + late final ffi.Pointer _kCFLocaleLanguageCode = + _lookup('kCFLocaleLanguageCode'); - late final _roundfPtr = - _lookup>('roundf'); - late final _roundf = _roundfPtr.asFunction(); + CFLocaleKey get kCFLocaleLanguageCode => _kCFLocaleLanguageCode.value; - double round( - double arg0, - ) { - return _round( - arg0, - ); - } + late final ffi.Pointer _kCFLocaleCountryCode = + _lookup('kCFLocaleCountryCode'); - late final _roundPtr = - _lookup>('round'); - late final _round = _roundPtr.asFunction(); + CFLocaleKey get kCFLocaleCountryCode => _kCFLocaleCountryCode.value; - int lroundf( - double arg0, - ) { - return _lroundf( - arg0, - ); - } + late final ffi.Pointer _kCFLocaleScriptCode = + _lookup('kCFLocaleScriptCode'); - late final _lroundfPtr = - _lookup>('lroundf'); - late final _lroundf = _lroundfPtr.asFunction(); + CFLocaleKey get kCFLocaleScriptCode => _kCFLocaleScriptCode.value; - int lround( - double arg0, - ) { - return _lround( - arg0, - ); - } + late final ffi.Pointer _kCFLocaleVariantCode = + _lookup('kCFLocaleVariantCode'); - late final _lroundPtr = - _lookup>('lround'); - late final _lround = _lroundPtr.asFunction(); + CFLocaleKey get kCFLocaleVariantCode => _kCFLocaleVariantCode.value; - int llrintf( - double arg0, - ) { - return _llrintf( - arg0, - ); - } + late final ffi.Pointer _kCFLocaleExemplarCharacterSet = + _lookup('kCFLocaleExemplarCharacterSet'); - late final _llrintfPtr = - _lookup>('llrintf'); - late final _llrintf = _llrintfPtr.asFunction(); + CFLocaleKey get kCFLocaleExemplarCharacterSet => + _kCFLocaleExemplarCharacterSet.value; - int llrint( - double arg0, - ) { - return _llrint( - arg0, - ); - } + late final ffi.Pointer _kCFLocaleCalendarIdentifier = + _lookup('kCFLocaleCalendarIdentifier'); - late final _llrintPtr = - _lookup>('llrint'); - late final _llrint = _llrintPtr.asFunction(); + CFLocaleKey get kCFLocaleCalendarIdentifier => + _kCFLocaleCalendarIdentifier.value; - int llroundf( - double arg0, - ) { - return _llroundf( - arg0, - ); - } + late final ffi.Pointer _kCFLocaleCalendar = + _lookup('kCFLocaleCalendar'); - late final _llroundfPtr = - _lookup>('llroundf'); - late final _llroundf = _llroundfPtr.asFunction(); + CFLocaleKey get kCFLocaleCalendar => _kCFLocaleCalendar.value; - int llround( - double arg0, - ) { - return _llround( - arg0, - ); - } + late final ffi.Pointer _kCFLocaleCollationIdentifier = + _lookup('kCFLocaleCollationIdentifier'); - late final _llroundPtr = - _lookup>('llround'); - late final _llround = _llroundPtr.asFunction(); + CFLocaleKey get kCFLocaleCollationIdentifier => + _kCFLocaleCollationIdentifier.value; - double truncf( - double arg0, - ) { - return _truncf( - arg0, - ); - } + late final ffi.Pointer _kCFLocaleUsesMetricSystem = + _lookup('kCFLocaleUsesMetricSystem'); - late final _truncfPtr = - _lookup>('truncf'); - late final _truncf = _truncfPtr.asFunction(); + CFLocaleKey get kCFLocaleUsesMetricSystem => _kCFLocaleUsesMetricSystem.value; - double trunc( - double arg0, - ) { - return _trunc( - arg0, - ); + late final ffi.Pointer _kCFLocaleMeasurementSystem = + _lookup('kCFLocaleMeasurementSystem'); + + CFLocaleKey get kCFLocaleMeasurementSystem => + _kCFLocaleMeasurementSystem.value; + + late final ffi.Pointer _kCFLocaleDecimalSeparator = + _lookup('kCFLocaleDecimalSeparator'); + + CFLocaleKey get kCFLocaleDecimalSeparator => _kCFLocaleDecimalSeparator.value; + + late final ffi.Pointer _kCFLocaleGroupingSeparator = + _lookup('kCFLocaleGroupingSeparator'); + + CFLocaleKey get kCFLocaleGroupingSeparator => + _kCFLocaleGroupingSeparator.value; + + late final ffi.Pointer _kCFLocaleCurrencySymbol = + _lookup('kCFLocaleCurrencySymbol'); + + CFLocaleKey get kCFLocaleCurrencySymbol => _kCFLocaleCurrencySymbol.value; + + late final ffi.Pointer _kCFLocaleCurrencyCode = + _lookup('kCFLocaleCurrencyCode'); + + CFLocaleKey get kCFLocaleCurrencyCode => _kCFLocaleCurrencyCode.value; + + late final ffi.Pointer _kCFLocaleCollatorIdentifier = + _lookup('kCFLocaleCollatorIdentifier'); + + CFLocaleKey get kCFLocaleCollatorIdentifier => + _kCFLocaleCollatorIdentifier.value; + + late final ffi.Pointer _kCFLocaleQuotationBeginDelimiterKey = + _lookup('kCFLocaleQuotationBeginDelimiterKey'); + + CFLocaleKey get kCFLocaleQuotationBeginDelimiterKey => + _kCFLocaleQuotationBeginDelimiterKey.value; + + late final ffi.Pointer _kCFLocaleQuotationEndDelimiterKey = + _lookup('kCFLocaleQuotationEndDelimiterKey'); + + CFLocaleKey get kCFLocaleQuotationEndDelimiterKey => + _kCFLocaleQuotationEndDelimiterKey.value; + + late final ffi.Pointer + _kCFLocaleAlternateQuotationBeginDelimiterKey = + _lookup('kCFLocaleAlternateQuotationBeginDelimiterKey'); + + CFLocaleKey get kCFLocaleAlternateQuotationBeginDelimiterKey => + _kCFLocaleAlternateQuotationBeginDelimiterKey.value; + + late final ffi.Pointer + _kCFLocaleAlternateQuotationEndDelimiterKey = + _lookup('kCFLocaleAlternateQuotationEndDelimiterKey'); + + CFLocaleKey get kCFLocaleAlternateQuotationEndDelimiterKey => + _kCFLocaleAlternateQuotationEndDelimiterKey.value; + + late final ffi.Pointer _kCFGregorianCalendar = + _lookup('kCFGregorianCalendar'); + + CFCalendarIdentifier get kCFGregorianCalendar => _kCFGregorianCalendar.value; + + late final ffi.Pointer _kCFBuddhistCalendar = + _lookup('kCFBuddhistCalendar'); + + CFCalendarIdentifier get kCFBuddhistCalendar => _kCFBuddhistCalendar.value; + + late final ffi.Pointer _kCFChineseCalendar = + _lookup('kCFChineseCalendar'); + + CFCalendarIdentifier get kCFChineseCalendar => _kCFChineseCalendar.value; + + late final ffi.Pointer _kCFHebrewCalendar = + _lookup('kCFHebrewCalendar'); + + CFCalendarIdentifier get kCFHebrewCalendar => _kCFHebrewCalendar.value; + + late final ffi.Pointer _kCFIslamicCalendar = + _lookup('kCFIslamicCalendar'); + + CFCalendarIdentifier get kCFIslamicCalendar => _kCFIslamicCalendar.value; + + late final ffi.Pointer _kCFIslamicCivilCalendar = + _lookup('kCFIslamicCivilCalendar'); + + CFCalendarIdentifier get kCFIslamicCivilCalendar => + _kCFIslamicCivilCalendar.value; + + late final ffi.Pointer _kCFJapaneseCalendar = + _lookup('kCFJapaneseCalendar'); + + CFCalendarIdentifier get kCFJapaneseCalendar => _kCFJapaneseCalendar.value; + + late final ffi.Pointer _kCFRepublicOfChinaCalendar = + _lookup('kCFRepublicOfChinaCalendar'); + + CFCalendarIdentifier get kCFRepublicOfChinaCalendar => + _kCFRepublicOfChinaCalendar.value; + + late final ffi.Pointer _kCFPersianCalendar = + _lookup('kCFPersianCalendar'); + + CFCalendarIdentifier get kCFPersianCalendar => _kCFPersianCalendar.value; + + late final ffi.Pointer _kCFIndianCalendar = + _lookup('kCFIndianCalendar'); + + CFCalendarIdentifier get kCFIndianCalendar => _kCFIndianCalendar.value; + + late final ffi.Pointer _kCFISO8601Calendar = + _lookup('kCFISO8601Calendar'); + + CFCalendarIdentifier get kCFISO8601Calendar => _kCFISO8601Calendar.value; + + late final ffi.Pointer _kCFIslamicTabularCalendar = + _lookup('kCFIslamicTabularCalendar'); + + CFCalendarIdentifier get kCFIslamicTabularCalendar => + _kCFIslamicTabularCalendar.value; + + late final ffi.Pointer _kCFIslamicUmmAlQuraCalendar = + _lookup('kCFIslamicUmmAlQuraCalendar'); + + CFCalendarIdentifier get kCFIslamicUmmAlQuraCalendar => + _kCFIslamicUmmAlQuraCalendar.value; + + double CFAbsoluteTimeGetCurrent() { + return _CFAbsoluteTimeGetCurrent(); } - late final _truncPtr = - _lookup>('trunc'); - late final _trunc = _truncPtr.asFunction(); + late final _CFAbsoluteTimeGetCurrentPtr = + _lookup>( + 'CFAbsoluteTimeGetCurrent'); + late final _CFAbsoluteTimeGetCurrent = + _CFAbsoluteTimeGetCurrentPtr.asFunction(); - double fmodf( - double arg0, - double arg1, - ) { - return _fmodf( - arg0, - arg1, - ); + late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1970 = + _lookup('kCFAbsoluteTimeIntervalSince1970'); + + DartCFTimeInterval get kCFAbsoluteTimeIntervalSince1970 => + _kCFAbsoluteTimeIntervalSince1970.value; + + late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1904 = + _lookup('kCFAbsoluteTimeIntervalSince1904'); + + DartCFTimeInterval get kCFAbsoluteTimeIntervalSince1904 => + _kCFAbsoluteTimeIntervalSince1904.value; + + int CFDateGetTypeID() { + return _CFDateGetTypeID(); } - late final _fmodfPtr = - _lookup>( - 'fmodf'); - late final _fmodf = _fmodfPtr.asFunction(); + late final _CFDateGetTypeIDPtr = + _lookup>('CFDateGetTypeID'); + late final _CFDateGetTypeID = + _CFDateGetTypeIDPtr.asFunction(); - double fmod( - double arg0, - double arg1, + CFDateRef CFDateCreate( + CFAllocatorRef allocator, + double at, ) { - return _fmod( - arg0, - arg1, + return _CFDateCreate( + allocator, + at, ); } - late final _fmodPtr = - _lookup>( - 'fmod'); - late final _fmod = _fmodPtr.asFunction(); + late final _CFDateCreatePtr = _lookup< + ffi.NativeFunction< + CFDateRef Function(CFAllocatorRef, CFAbsoluteTime)>>('CFDateCreate'); + late final _CFDateCreate = + _CFDateCreatePtr.asFunction(); - double remainderf( - double arg0, - double arg1, + double CFDateGetAbsoluteTime( + CFDateRef theDate, ) { - return _remainderf( - arg0, - arg1, + return _CFDateGetAbsoluteTime( + theDate, ); } - late final _remainderfPtr = - _lookup>( - 'remainderf'); - late final _remainderf = - _remainderfPtr.asFunction(); + late final _CFDateGetAbsoluteTimePtr = + _lookup>( + 'CFDateGetAbsoluteTime'); + late final _CFDateGetAbsoluteTime = + _CFDateGetAbsoluteTimePtr.asFunction(); - double remainder( - double arg0, - double arg1, + double CFDateGetTimeIntervalSinceDate( + CFDateRef theDate, + CFDateRef otherDate, ) { - return _remainder( - arg0, - arg1, + return _CFDateGetTimeIntervalSinceDate( + theDate, + otherDate, ); } - late final _remainderPtr = - _lookup>( - 'remainder'); - late final _remainder = - _remainderPtr.asFunction(); + late final _CFDateGetTimeIntervalSinceDatePtr = _lookup< + ffi.NativeFunction>( + 'CFDateGetTimeIntervalSinceDate'); + late final _CFDateGetTimeIntervalSinceDate = + _CFDateGetTimeIntervalSinceDatePtr.asFunction< + double Function(CFDateRef, CFDateRef)>(); - double remquof( - double arg0, - double arg1, - ffi.Pointer arg2, + CFComparisonResult CFDateCompare( + CFDateRef theDate, + CFDateRef otherDate, + ffi.Pointer context, ) { - return _remquof( - arg0, - arg1, - arg2, - ); + return CFComparisonResult.fromValue(_CFDateCompare( + theDate, + otherDate, + context, + )); } - late final _remquofPtr = _lookup< + late final _CFDateComparePtr = _lookup< ffi.NativeFunction< - ffi.Float Function( - ffi.Float, ffi.Float, ffi.Pointer)>>('remquof'); - late final _remquof = _remquofPtr - .asFunction)>(); + CFIndex Function( + CFDateRef, CFDateRef, ffi.Pointer)>>('CFDateCompare'); + late final _CFDateCompare = _CFDateComparePtr.asFunction< + int Function(CFDateRef, CFDateRef, ffi.Pointer)>(); - double remquo( - double arg0, - double arg1, - ffi.Pointer arg2, + int CFGregorianDateIsValid( + CFGregorianDate gdate, + int unitFlags, ) { - return _remquo( - arg0, - arg1, - arg2, + return _CFGregorianDateIsValid( + gdate, + unitFlags, ); } - late final _remquoPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function( - ffi.Double, ffi.Double, ffi.Pointer)>>('remquo'); - late final _remquo = _remquoPtr - .asFunction)>(); + late final _CFGregorianDateIsValidPtr = _lookup< + ffi.NativeFunction>( + 'CFGregorianDateIsValid'); + late final _CFGregorianDateIsValid = _CFGregorianDateIsValidPtr.asFunction< + int Function(CFGregorianDate, int)>(); - double copysignf( - double arg0, - double arg1, + double CFGregorianDateGetAbsoluteTime( + CFGregorianDate gdate, + CFTimeZoneRef tz, ) { - return _copysignf( - arg0, - arg1, + return _CFGregorianDateGetAbsoluteTime( + gdate, + tz, ); } - late final _copysignfPtr = - _lookup>( - 'copysignf'); - late final _copysignf = - _copysignfPtr.asFunction(); + late final _CFGregorianDateGetAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + CFAbsoluteTime Function(CFGregorianDate, + CFTimeZoneRef)>>('CFGregorianDateGetAbsoluteTime'); + late final _CFGregorianDateGetAbsoluteTime = + _CFGregorianDateGetAbsoluteTimePtr.asFunction< + double Function(CFGregorianDate, CFTimeZoneRef)>(); - double copysign( - double arg0, - double arg1, + CFGregorianDate CFAbsoluteTimeGetGregorianDate( + double at, + CFTimeZoneRef tz, ) { - return _copysign( - arg0, - arg1, + return _CFAbsoluteTimeGetGregorianDate( + at, + tz, ); } - late final _copysignPtr = - _lookup>( - 'copysign'); - late final _copysign = - _copysignPtr.asFunction(); + late final _CFAbsoluteTimeGetGregorianDatePtr = _lookup< + ffi.NativeFunction< + CFGregorianDate Function(CFAbsoluteTime, + CFTimeZoneRef)>>('CFAbsoluteTimeGetGregorianDate'); + late final _CFAbsoluteTimeGetGregorianDate = + _CFAbsoluteTimeGetGregorianDatePtr.asFunction< + CFGregorianDate Function(double, CFTimeZoneRef)>(); - double nanf( - ffi.Pointer arg0, + double CFAbsoluteTimeAddGregorianUnits( + double at, + CFTimeZoneRef tz, + CFGregorianUnits units, ) { - return _nanf( - arg0, + return _CFAbsoluteTimeAddGregorianUnits( + at, + tz, + units, ); } - late final _nanfPtr = - _lookup)>>( - 'nanf'); - late final _nanf = - _nanfPtr.asFunction)>(); + late final _CFAbsoluteTimeAddGregorianUnitsPtr = _lookup< + ffi.NativeFunction< + CFAbsoluteTime Function(CFAbsoluteTime, CFTimeZoneRef, + CFGregorianUnits)>>('CFAbsoluteTimeAddGregorianUnits'); + late final _CFAbsoluteTimeAddGregorianUnits = + _CFAbsoluteTimeAddGregorianUnitsPtr.asFunction< + double Function(double, CFTimeZoneRef, CFGregorianUnits)>(); - double nan( - ffi.Pointer arg0, + CFGregorianUnits CFAbsoluteTimeGetDifferenceAsGregorianUnits( + double at1, + double at2, + CFTimeZoneRef tz, + int unitFlags, ) { - return _nan( - arg0, + return _CFAbsoluteTimeGetDifferenceAsGregorianUnits( + at1, + at2, + tz, + unitFlags, ); } - late final _nanPtr = - _lookup)>>( - 'nan'); - late final _nan = - _nanPtr.asFunction)>(); + late final _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr = _lookup< + ffi.NativeFunction< + CFGregorianUnits Function( + CFAbsoluteTime, + CFAbsoluteTime, + CFTimeZoneRef, + CFOptionFlags)>>('CFAbsoluteTimeGetDifferenceAsGregorianUnits'); + late final _CFAbsoluteTimeGetDifferenceAsGregorianUnits = + _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr.asFunction< + CFGregorianUnits Function(double, double, CFTimeZoneRef, int)>(); - double nextafterf( - double arg0, - double arg1, + int CFAbsoluteTimeGetDayOfWeek( + double at, + CFTimeZoneRef tz, ) { - return _nextafterf( - arg0, - arg1, + return _CFAbsoluteTimeGetDayOfWeek( + at, + tz, ); } - late final _nextafterfPtr = - _lookup>( - 'nextafterf'); - late final _nextafterf = - _nextafterfPtr.asFunction(); + late final _CFAbsoluteTimeGetDayOfWeekPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetDayOfWeek'); + late final _CFAbsoluteTimeGetDayOfWeek = _CFAbsoluteTimeGetDayOfWeekPtr + .asFunction(); - double nextafter( - double arg0, - double arg1, + int CFAbsoluteTimeGetDayOfYear( + double at, + CFTimeZoneRef tz, ) { - return _nextafter( - arg0, - arg1, + return _CFAbsoluteTimeGetDayOfYear( + at, + tz, ); } - late final _nextafterPtr = - _lookup>( - 'nextafter'); - late final _nextafter = - _nextafterPtr.asFunction(); + late final _CFAbsoluteTimeGetDayOfYearPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetDayOfYear'); + late final _CFAbsoluteTimeGetDayOfYear = _CFAbsoluteTimeGetDayOfYearPtr + .asFunction(); - double fdimf( - double arg0, - double arg1, + int CFAbsoluteTimeGetWeekOfYear( + double at, + CFTimeZoneRef tz, ) { - return _fdimf( - arg0, - arg1, + return _CFAbsoluteTimeGetWeekOfYear( + at, + tz, ); } - late final _fdimfPtr = - _lookup>( - 'fdimf'); - late final _fdimf = _fdimfPtr.asFunction(); + late final _CFAbsoluteTimeGetWeekOfYearPtr = _lookup< + ffi.NativeFunction>( + 'CFAbsoluteTimeGetWeekOfYear'); + late final _CFAbsoluteTimeGetWeekOfYear = _CFAbsoluteTimeGetWeekOfYearPtr + .asFunction(); - double fdim( - double arg0, - double arg1, - ) { - return _fdim( - arg0, - arg1, - ); + int CFDataGetTypeID() { + return _CFDataGetTypeID(); } - late final _fdimPtr = - _lookup>( - 'fdim'); - late final _fdim = _fdimPtr.asFunction(); + late final _CFDataGetTypeIDPtr = + _lookup>('CFDataGetTypeID'); + late final _CFDataGetTypeID = + _CFDataGetTypeIDPtr.asFunction(); - double fmaxf( - double arg0, - double arg1, + CFDataRef CFDataCreate( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int length, ) { - return _fmaxf( - arg0, - arg1, + return _CFDataCreate( + allocator, + bytes, + length, ); } - late final _fmaxfPtr = - _lookup>( - 'fmaxf'); - late final _fmaxf = _fmaxfPtr.asFunction(); + late final _CFDataCreatePtr = _lookup< + ffi.NativeFunction< + CFDataRef Function( + CFAllocatorRef, ffi.Pointer, CFIndex)>>('CFDataCreate'); + late final _CFDataCreate = _CFDataCreatePtr.asFunction< + CFDataRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - double fmax( - double arg0, - double arg1, + CFDataRef CFDataCreateWithBytesNoCopy( + CFAllocatorRef allocator, + ffi.Pointer bytes, + int length, + CFAllocatorRef bytesDeallocator, ) { - return _fmax( - arg0, - arg1, + return _CFDataCreateWithBytesNoCopy( + allocator, + bytes, + length, + bytesDeallocator, ); } - late final _fmaxPtr = - _lookup>( - 'fmax'); - late final _fmax = _fmaxPtr.asFunction(); + late final _CFDataCreateWithBytesNoCopyPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFDataCreateWithBytesNoCopy'); + late final _CFDataCreateWithBytesNoCopy = + _CFDataCreateWithBytesNoCopyPtr.asFunction< + CFDataRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - double fminf( - double arg0, - double arg1, + CFDataRef CFDataCreateCopy( + CFAllocatorRef allocator, + CFDataRef theData, ) { - return _fminf( - arg0, - arg1, + return _CFDataCreateCopy( + allocator, + theData, ); } - late final _fminfPtr = - _lookup>( - 'fminf'); - late final _fminf = _fminfPtr.asFunction(); + late final _CFDataCreateCopyPtr = _lookup< + ffi.NativeFunction>( + 'CFDataCreateCopy'); + late final _CFDataCreateCopy = _CFDataCreateCopyPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFDataRef)>(); - double fmin( - double arg0, - double arg1, + CFMutableDataRef CFDataCreateMutable( + CFAllocatorRef allocator, + int capacity, ) { - return _fmin( - arg0, - arg1, + return _CFDataCreateMutable( + allocator, + capacity, ); } - late final _fminPtr = - _lookup>( - 'fmin'); - late final _fmin = _fminPtr.asFunction(); + late final _CFDataCreateMutablePtr = _lookup< + ffi + .NativeFunction>( + 'CFDataCreateMutable'); + late final _CFDataCreateMutable = _CFDataCreateMutablePtr.asFunction< + CFMutableDataRef Function(CFAllocatorRef, int)>(); - double fmaf( - double arg0, - double arg1, - double arg2, + CFMutableDataRef CFDataCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFDataRef theData, ) { - return _fmaf( - arg0, - arg1, - arg2, + return _CFDataCreateMutableCopy( + allocator, + capacity, + theData, ); } - late final _fmafPtr = _lookup< + late final _CFDataCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - ffi.Float Function(ffi.Float, ffi.Float, ffi.Float)>>('fmaf'); - late final _fmaf = - _fmafPtr.asFunction(); + CFMutableDataRef Function( + CFAllocatorRef, CFIndex, CFDataRef)>>('CFDataCreateMutableCopy'); + late final _CFDataCreateMutableCopy = _CFDataCreateMutableCopyPtr.asFunction< + CFMutableDataRef Function(CFAllocatorRef, int, CFDataRef)>(); - double fma( - double arg0, - double arg1, - double arg2, + int CFDataGetLength( + CFDataRef theData, ) { - return _fma( - arg0, - arg1, - arg2, + return _CFDataGetLength( + theData, ); } - late final _fmaPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function(ffi.Double, ffi.Double, ffi.Double)>>('fma'); - late final _fma = - _fmaPtr.asFunction(); + late final _CFDataGetLengthPtr = + _lookup>( + 'CFDataGetLength'); + late final _CFDataGetLength = + _CFDataGetLengthPtr.asFunction(); - double __exp10f( - double arg0, + ffi.Pointer CFDataGetBytePtr( + CFDataRef theData, ) { - return ___exp10f( - arg0, + return _CFDataGetBytePtr( + theData, ); } - late final ___exp10fPtr = - _lookup>('__exp10f'); - late final ___exp10f = ___exp10fPtr.asFunction(); + late final _CFDataGetBytePtrPtr = + _lookup Function(CFDataRef)>>( + 'CFDataGetBytePtr'); + late final _CFDataGetBytePtr = + _CFDataGetBytePtrPtr.asFunction Function(CFDataRef)>(); - double __exp10( - double arg0, + ffi.Pointer CFDataGetMutableBytePtr( + CFMutableDataRef theData, ) { - return ___exp10( - arg0, + return _CFDataGetMutableBytePtr( + theData, ); } - late final ___exp10Ptr = - _lookup>('__exp10'); - late final ___exp10 = ___exp10Ptr.asFunction(); + late final _CFDataGetMutableBytePtrPtr = _lookup< + ffi.NativeFunction Function(CFMutableDataRef)>>( + 'CFDataGetMutableBytePtr'); + late final _CFDataGetMutableBytePtr = _CFDataGetMutableBytePtrPtr.asFunction< + ffi.Pointer Function(CFMutableDataRef)>(); - double __cospif( - double arg0, + void CFDataGetBytes( + CFDataRef theData, + CFRange range, + ffi.Pointer buffer, ) { - return ___cospif( - arg0, + return _CFDataGetBytes( + theData, + range, + buffer, ); } - late final ___cospifPtr = - _lookup>('__cospif'); - late final ___cospif = ___cospifPtr.asFunction(); + late final _CFDataGetBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFDataRef, CFRange, ffi.Pointer)>>('CFDataGetBytes'); + late final _CFDataGetBytes = _CFDataGetBytesPtr.asFunction< + void Function(CFDataRef, CFRange, ffi.Pointer)>(); - double __cospi( - double arg0, + void CFDataSetLength( + CFMutableDataRef theData, + int length, ) { - return ___cospi( - arg0, + return _CFDataSetLength( + theData, + length, ); } - late final ___cospiPtr = - _lookup>('__cospi'); - late final ___cospi = ___cospiPtr.asFunction(); + late final _CFDataSetLengthPtr = + _lookup>( + 'CFDataSetLength'); + late final _CFDataSetLength = + _CFDataSetLengthPtr.asFunction(); - double __sinpif( - double arg0, + void CFDataIncreaseLength( + CFMutableDataRef theData, + int extraLength, ) { - return ___sinpif( - arg0, + return _CFDataIncreaseLength( + theData, + extraLength, ); } - late final ___sinpifPtr = - _lookup>('__sinpif'); - late final ___sinpif = ___sinpifPtr.asFunction(); + late final _CFDataIncreaseLengthPtr = + _lookup>( + 'CFDataIncreaseLength'); + late final _CFDataIncreaseLength = _CFDataIncreaseLengthPtr.asFunction< + void Function(CFMutableDataRef, int)>(); - double __sinpi( - double arg0, + void CFDataAppendBytes( + CFMutableDataRef theData, + ffi.Pointer bytes, + int length, ) { - return ___sinpi( - arg0, + return _CFDataAppendBytes( + theData, + bytes, + length, ); } - late final ___sinpiPtr = - _lookup>('__sinpi'); - late final ___sinpi = ___sinpiPtr.asFunction(); + late final _CFDataAppendBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDataRef, ffi.Pointer, + CFIndex)>>('CFDataAppendBytes'); + late final _CFDataAppendBytes = _CFDataAppendBytesPtr.asFunction< + void Function(CFMutableDataRef, ffi.Pointer, int)>(); - double __tanpif( - double arg0, + void CFDataReplaceBytes( + CFMutableDataRef theData, + CFRange range, + ffi.Pointer newBytes, + int newLength, ) { - return ___tanpif( - arg0, + return _CFDataReplaceBytes( + theData, + range, + newBytes, + newLength, ); } - late final ___tanpifPtr = - _lookup>('__tanpif'); - late final ___tanpif = ___tanpifPtr.asFunction(); + late final _CFDataReplaceBytesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableDataRef, CFRange, ffi.Pointer, + CFIndex)>>('CFDataReplaceBytes'); + late final _CFDataReplaceBytes = _CFDataReplaceBytesPtr.asFunction< + void Function(CFMutableDataRef, CFRange, ffi.Pointer, int)>(); - double __tanpi( - double arg0, + void CFDataDeleteBytes( + CFMutableDataRef theData, + CFRange range, ) { - return ___tanpi( - arg0, + return _CFDataDeleteBytes( + theData, + range, ); } - late final ___tanpiPtr = - _lookup>('__tanpi'); - late final ___tanpi = ___tanpiPtr.asFunction(); + late final _CFDataDeleteBytesPtr = + _lookup>( + 'CFDataDeleteBytes'); + late final _CFDataDeleteBytes = _CFDataDeleteBytesPtr.asFunction< + void Function(CFMutableDataRef, CFRange)>(); - double j0( - double arg0, + CFRange CFDataFind( + CFDataRef theData, + CFDataRef dataToFind, + CFRange searchRange, + CFDataSearchFlags compareOptions, ) { - return _j0( - arg0, + return _CFDataFind( + theData, + dataToFind, + searchRange, + compareOptions.value, ); } - late final _j0Ptr = - _lookup>('j0'); - late final _j0 = _j0Ptr.asFunction(); + late final _CFDataFindPtr = _lookup< + ffi.NativeFunction< + CFRange Function( + CFDataRef, CFDataRef, CFRange, CFOptionFlags)>>('CFDataFind'); + late final _CFDataFind = _CFDataFindPtr.asFunction< + CFRange Function(CFDataRef, CFDataRef, CFRange, int)>(); - double j1( - double arg0, - ) { - return _j1( - arg0, - ); + int CFCharacterSetGetTypeID() { + return _CFCharacterSetGetTypeID(); } - late final _j1Ptr = - _lookup>('j1'); - late final _j1 = _j1Ptr.asFunction(); + late final _CFCharacterSetGetTypeIDPtr = + _lookup>( + 'CFCharacterSetGetTypeID'); + late final _CFCharacterSetGetTypeID = + _CFCharacterSetGetTypeIDPtr.asFunction(); - double jn( - int arg0, - double arg1, + CFCharacterSetRef CFCharacterSetGetPredefined( + CFCharacterSetPredefinedSet theSetIdentifier, ) { - return _jn( - arg0, - arg1, + return _CFCharacterSetGetPredefined( + theSetIdentifier.value, ); } - late final _jnPtr = - _lookup>( - 'jn'); - late final _jn = _jnPtr.asFunction(); + late final _CFCharacterSetGetPredefinedPtr = + _lookup>( + 'CFCharacterSetGetPredefined'); + late final _CFCharacterSetGetPredefined = _CFCharacterSetGetPredefinedPtr + .asFunction(); - double y0( - double arg0, + CFCharacterSetRef CFCharacterSetCreateWithCharactersInRange( + CFAllocatorRef alloc, + CFRange theRange, ) { - return _y0( - arg0, + return _CFCharacterSetCreateWithCharactersInRange( + alloc, + theRange, ); } - late final _y0Ptr = - _lookup>('y0'); - late final _y0 = _y0Ptr.asFunction(); + late final _CFCharacterSetCreateWithCharactersInRangePtr = _lookup< + ffi + .NativeFunction>( + 'CFCharacterSetCreateWithCharactersInRange'); + late final _CFCharacterSetCreateWithCharactersInRange = + _CFCharacterSetCreateWithCharactersInRangePtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFRange)>(); - double y1( - double arg0, + CFCharacterSetRef CFCharacterSetCreateWithCharactersInString( + CFAllocatorRef alloc, + CFStringRef theString, ) { - return _y1( - arg0, + return _CFCharacterSetCreateWithCharactersInString( + alloc, + theString, ); } - late final _y1Ptr = - _lookup>('y1'); - late final _y1 = _y1Ptr.asFunction(); + late final _CFCharacterSetCreateWithCharactersInStringPtr = _lookup< + ffi.NativeFunction< + CFCharacterSetRef Function(CFAllocatorRef, + CFStringRef)>>('CFCharacterSetCreateWithCharactersInString'); + late final _CFCharacterSetCreateWithCharactersInString = + _CFCharacterSetCreateWithCharactersInStringPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFStringRef)>(); - double yn( - int arg0, - double arg1, + CFCharacterSetRef CFCharacterSetCreateWithBitmapRepresentation( + CFAllocatorRef alloc, + CFDataRef theData, ) { - return _yn( - arg0, - arg1, + return _CFCharacterSetCreateWithBitmapRepresentation( + alloc, + theData, ); } - late final _ynPtr = - _lookup>( - 'yn'); - late final _yn = _ynPtr.asFunction(); + late final _CFCharacterSetCreateWithBitmapRepresentationPtr = _lookup< + ffi.NativeFunction< + CFCharacterSetRef Function(CFAllocatorRef, + CFDataRef)>>('CFCharacterSetCreateWithBitmapRepresentation'); + late final _CFCharacterSetCreateWithBitmapRepresentation = + _CFCharacterSetCreateWithBitmapRepresentationPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFDataRef)>(); - double scalb( - double arg0, - double arg1, + CFCharacterSetRef CFCharacterSetCreateInvertedSet( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return _scalb( - arg0, - arg1, + return _CFCharacterSetCreateInvertedSet( + alloc, + theSet, ); } - late final _scalbPtr = - _lookup>( - 'scalb'); - late final _scalb = _scalbPtr.asFunction(); - - late final ffi.Pointer _signgam = _lookup('signgam'); + late final _CFCharacterSetCreateInvertedSetPtr = _lookup< + ffi.NativeFunction< + CFCharacterSetRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateInvertedSet'); + late final _CFCharacterSetCreateInvertedSet = + _CFCharacterSetCreateInvertedSetPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); - int get signgam => _signgam.value; + int CFCharacterSetIsSupersetOfSet( + CFCharacterSetRef theSet, + CFCharacterSetRef theOtherset, + ) { + return _CFCharacterSetIsSupersetOfSet( + theSet, + theOtherset, + ); + } - set signgam(int value) => _signgam.value = value; + late final _CFCharacterSetIsSupersetOfSetPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetIsSupersetOfSet'); + late final _CFCharacterSetIsSupersetOfSet = _CFCharacterSetIsSupersetOfSetPtr + .asFunction(); - int setjmp( - ffi.Pointer arg0, + int CFCharacterSetHasMemberInPlane( + CFCharacterSetRef theSet, + int thePlane, ) { - return _setjmp1( - arg0, + return _CFCharacterSetHasMemberInPlane( + theSet, + thePlane, ); } - late final _setjmpPtr = - _lookup)>>( - 'setjmp'); - late final _setjmp1 = - _setjmpPtr.asFunction)>(); + late final _CFCharacterSetHasMemberInPlanePtr = + _lookup>( + 'CFCharacterSetHasMemberInPlane'); + late final _CFCharacterSetHasMemberInPlane = + _CFCharacterSetHasMemberInPlanePtr.asFunction< + int Function(CFCharacterSetRef, int)>(); - void longjmp( - ffi.Pointer arg0, - int arg1, + CFMutableCharacterSetRef CFCharacterSetCreateMutable( + CFAllocatorRef alloc, ) { - return _longjmp1( - arg0, - arg1, + return _CFCharacterSetCreateMutable( + alloc, ); } - late final _longjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'longjmp'); - late final _longjmp1 = - _longjmpPtr.asFunction, int)>(); + late final _CFCharacterSetCreateMutablePtr = _lookup< + ffi + .NativeFunction>( + 'CFCharacterSetCreateMutable'); + late final _CFCharacterSetCreateMutable = _CFCharacterSetCreateMutablePtr + .asFunction(); - int _setjmp( - ffi.Pointer arg0, + CFCharacterSetRef CFCharacterSetCreateCopy( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return __setjmp( - arg0, + return _CFCharacterSetCreateCopy( + alloc, + theSet, ); } - late final __setjmpPtr = - _lookup)>>( - '_setjmp'); - late final __setjmp = - __setjmpPtr.asFunction)>(); + late final _CFCharacterSetCreateCopyPtr = _lookup< + ffi.NativeFunction< + CFCharacterSetRef Function( + CFAllocatorRef, CFCharacterSetRef)>>('CFCharacterSetCreateCopy'); + late final _CFCharacterSetCreateCopy = + _CFCharacterSetCreateCopyPtr.asFunction< + CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); - void _longjmp( - ffi.Pointer arg0, - int arg1, + CFMutableCharacterSetRef CFCharacterSetCreateMutableCopy( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return __longjmp( - arg0, - arg1, + return _CFCharacterSetCreateMutableCopy( + alloc, + theSet, ); } - late final __longjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - '_longjmp'); - late final __longjmp = - __longjmpPtr.asFunction, int)>(); + late final _CFCharacterSetCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableCharacterSetRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateMutableCopy'); + late final _CFCharacterSetCreateMutableCopy = + _CFCharacterSetCreateMutableCopyPtr.asFunction< + CFMutableCharacterSetRef Function( + CFAllocatorRef, CFCharacterSetRef)>(); - int sigsetjmp( - ffi.Pointer arg0, - int arg1, + int CFCharacterSetIsCharacterMember( + CFCharacterSetRef theSet, + int theChar, ) { - return _sigsetjmp( - arg0, - arg1, + return _CFCharacterSetIsCharacterMember( + theSet, + theChar, ); } - late final _sigsetjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigsetjmp'); - late final _sigsetjmp = - _sigsetjmpPtr.asFunction, int)>(); + late final _CFCharacterSetIsCharacterMemberPtr = + _lookup>( + 'CFCharacterSetIsCharacterMember'); + late final _CFCharacterSetIsCharacterMember = + _CFCharacterSetIsCharacterMemberPtr.asFunction< + int Function(CFCharacterSetRef, int)>(); - void siglongjmp( - ffi.Pointer arg0, - int arg1, + int CFCharacterSetIsLongCharacterMember( + CFCharacterSetRef theSet, + int theChar, ) { - return _siglongjmp( - arg0, - arg1, + return _CFCharacterSetIsLongCharacterMember( + theSet, + theChar, ); } - late final _siglongjmpPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'siglongjmp'); - late final _siglongjmp = - _siglongjmpPtr.asFunction, int)>(); - - void longjmperror() { - return _longjmperror(); - } - - late final _longjmperrorPtr = - _lookup>('longjmperror'); - late final _longjmperror = _longjmperrorPtr.asFunction(); - - late final ffi.Pointer>> _sys_signame = - _lookup>>('sys_signame'); - - ffi.Pointer> get sys_signame => _sys_signame.value; - - set sys_signame(ffi.Pointer> value) => - _sys_signame.value = value; - - late final ffi.Pointer>> _sys_siglist = - _lookup>>('sys_siglist'); - - ffi.Pointer> get sys_siglist => _sys_siglist.value; - - set sys_siglist(ffi.Pointer> value) => - _sys_siglist.value = value; + late final _CFCharacterSetIsLongCharacterMemberPtr = _lookup< + ffi.NativeFunction>( + 'CFCharacterSetIsLongCharacterMember'); + late final _CFCharacterSetIsLongCharacterMember = + _CFCharacterSetIsLongCharacterMemberPtr.asFunction< + int Function(CFCharacterSetRef, int)>(); - int raise( - int arg0, + CFDataRef CFCharacterSetCreateBitmapRepresentation( + CFAllocatorRef alloc, + CFCharacterSetRef theSet, ) { - return _raise( - arg0, + return _CFCharacterSetCreateBitmapRepresentation( + alloc, + theSet, ); } - late final _raisePtr = - _lookup>('raise'); - late final _raise = _raisePtr.asFunction(); + late final _CFCharacterSetCreateBitmapRepresentationPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, + CFCharacterSetRef)>>('CFCharacterSetCreateBitmapRepresentation'); + late final _CFCharacterSetCreateBitmapRepresentation = + _CFCharacterSetCreateBitmapRepresentationPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFCharacterSetRef)>(); - ffi.Pointer> bsd_signal( - int arg0, - ffi.Pointer> arg1, + void CFCharacterSetAddCharactersInRange( + CFMutableCharacterSetRef theSet, + CFRange theRange, ) { - return _bsd_signal( - arg0, - arg1, + return _CFCharacterSetAddCharactersInRange( + theSet, + theRange, ); } - late final _bsd_signalPtr = _lookup< + late final _CFCharacterSetAddCharactersInRangePtr = _lookup< ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Int, - ffi.Pointer< - ffi - .NativeFunction>)>>('bsd_signal'); - late final _bsd_signal = _bsd_signalPtr.asFunction< - ffi.Pointer> Function( - int, ffi.Pointer>)>(); + ffi.Void Function(CFMutableCharacterSetRef, + CFRange)>>('CFCharacterSetAddCharactersInRange'); + late final _CFCharacterSetAddCharactersInRange = + _CFCharacterSetAddCharactersInRangePtr.asFunction< + void Function(CFMutableCharacterSetRef, CFRange)>(); - int kill( - int arg0, - int arg1, + void CFCharacterSetRemoveCharactersInRange( + CFMutableCharacterSetRef theSet, + CFRange theRange, ) { - return _kill( - arg0, - arg1, + return _CFCharacterSetRemoveCharactersInRange( + theSet, + theRange, ); } - late final _killPtr = - _lookup>('kill'); - late final _kill = _killPtr.asFunction(); + late final _CFCharacterSetRemoveCharactersInRangePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFRange)>>('CFCharacterSetRemoveCharactersInRange'); + late final _CFCharacterSetRemoveCharactersInRange = + _CFCharacterSetRemoveCharactersInRangePtr.asFunction< + void Function(CFMutableCharacterSetRef, CFRange)>(); - int killpg( - int arg0, - int arg1, + void CFCharacterSetAddCharactersInString( + CFMutableCharacterSetRef theSet, + CFStringRef theString, ) { - return _killpg( - arg0, - arg1, + return _CFCharacterSetAddCharactersInString( + theSet, + theString, ); } - late final _killpgPtr = - _lookup>('killpg'); - late final _killpg = _killpgPtr.asFunction(); + late final _CFCharacterSetAddCharactersInStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFStringRef)>>('CFCharacterSetAddCharactersInString'); + late final _CFCharacterSetAddCharactersInString = + _CFCharacterSetAddCharactersInStringPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFStringRef)>(); - int pthread_kill( - pthread_t arg0, - int arg1, + void CFCharacterSetRemoveCharactersInString( + CFMutableCharacterSetRef theSet, + CFStringRef theString, ) { - return _pthread_kill( - arg0, - arg1, + return _CFCharacterSetRemoveCharactersInString( + theSet, + theString, ); } - late final _pthread_killPtr = - _lookup>( - 'pthread_kill'); - late final _pthread_kill = - _pthread_killPtr.asFunction(); + late final _CFCharacterSetRemoveCharactersInStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableCharacterSetRef, + CFStringRef)>>('CFCharacterSetRemoveCharactersInString'); + late final _CFCharacterSetRemoveCharactersInString = + _CFCharacterSetRemoveCharactersInStringPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFStringRef)>(); - int pthread_sigmask( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + void CFCharacterSetUnion( + CFMutableCharacterSetRef theSet, + CFCharacterSetRef theOtherSet, ) { - return _pthread_sigmask( - arg0, - arg1, - arg2, + return _CFCharacterSetUnion( + theSet, + theOtherSet, ); } - late final _pthread_sigmaskPtr = _lookup< + late final _CFCharacterSetUnionPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('pthread_sigmask'); - late final _pthread_sigmask = _pthread_sigmaskPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(CFMutableCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetUnion'); + late final _CFCharacterSetUnion = _CFCharacterSetUnionPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); - int sigaction1( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + void CFCharacterSetIntersect( + CFMutableCharacterSetRef theSet, + CFCharacterSetRef theOtherSet, ) { - return _sigaction1( - arg0, - arg1, - arg2, + return _CFCharacterSetIntersect( + theSet, + theOtherSet, ); } - late final _sigaction1Ptr = _lookup< + late final _CFCharacterSetIntersectPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('sigaction'); - late final _sigaction1 = _sigaction1Ptr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(CFMutableCharacterSetRef, + CFCharacterSetRef)>>('CFCharacterSetIntersect'); + late final _CFCharacterSetIntersect = _CFCharacterSetIntersectPtr.asFunction< + void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); - int sigaddset( - ffi.Pointer arg0, - int arg1, + void CFCharacterSetInvert( + CFMutableCharacterSetRef theSet, ) { - return _sigaddset( - arg0, - arg1, + return _CFCharacterSetInvert( + theSet, ); } - late final _sigaddsetPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigaddset'); - late final _sigaddset = - _sigaddsetPtr.asFunction, int)>(); + late final _CFCharacterSetInvertPtr = + _lookup>( + 'CFCharacterSetInvert'); + late final _CFCharacterSetInvert = _CFCharacterSetInvertPtr.asFunction< + void Function(CFMutableCharacterSetRef)>(); - int sigaltstack( - ffi.Pointer arg0, - ffi.Pointer arg1, + int CFErrorGetTypeID() { + return _CFErrorGetTypeID(); + } + + late final _CFErrorGetTypeIDPtr = + _lookup>('CFErrorGetTypeID'); + late final _CFErrorGetTypeID = + _CFErrorGetTypeIDPtr.asFunction(); + + late final ffi.Pointer _kCFErrorDomainPOSIX = + _lookup('kCFErrorDomainPOSIX'); + + CFErrorDomain get kCFErrorDomainPOSIX => _kCFErrorDomainPOSIX.value; + + late final ffi.Pointer _kCFErrorDomainOSStatus = + _lookup('kCFErrorDomainOSStatus'); + + CFErrorDomain get kCFErrorDomainOSStatus => _kCFErrorDomainOSStatus.value; + + late final ffi.Pointer _kCFErrorDomainMach = + _lookup('kCFErrorDomainMach'); + + CFErrorDomain get kCFErrorDomainMach => _kCFErrorDomainMach.value; + + late final ffi.Pointer _kCFErrorDomainCocoa = + _lookup('kCFErrorDomainCocoa'); + + CFErrorDomain get kCFErrorDomainCocoa => _kCFErrorDomainCocoa.value; + + late final ffi.Pointer _kCFErrorLocalizedDescriptionKey = + _lookup('kCFErrorLocalizedDescriptionKey'); + + CFStringRef get kCFErrorLocalizedDescriptionKey => + _kCFErrorLocalizedDescriptionKey.value; + + late final ffi.Pointer _kCFErrorLocalizedFailureKey = + _lookup('kCFErrorLocalizedFailureKey'); + + CFStringRef get kCFErrorLocalizedFailureKey => + _kCFErrorLocalizedFailureKey.value; + + late final ffi.Pointer _kCFErrorLocalizedFailureReasonKey = + _lookup('kCFErrorLocalizedFailureReasonKey'); + + CFStringRef get kCFErrorLocalizedFailureReasonKey => + _kCFErrorLocalizedFailureReasonKey.value; + + late final ffi.Pointer _kCFErrorLocalizedRecoverySuggestionKey = + _lookup('kCFErrorLocalizedRecoverySuggestionKey'); + + CFStringRef get kCFErrorLocalizedRecoverySuggestionKey => + _kCFErrorLocalizedRecoverySuggestionKey.value; + + late final ffi.Pointer _kCFErrorDescriptionKey = + _lookup('kCFErrorDescriptionKey'); + + CFStringRef get kCFErrorDescriptionKey => _kCFErrorDescriptionKey.value; + + late final ffi.Pointer _kCFErrorUnderlyingErrorKey = + _lookup('kCFErrorUnderlyingErrorKey'); + + CFStringRef get kCFErrorUnderlyingErrorKey => + _kCFErrorUnderlyingErrorKey.value; + + late final ffi.Pointer _kCFErrorURLKey = + _lookup('kCFErrorURLKey'); + + CFStringRef get kCFErrorURLKey => _kCFErrorURLKey.value; + + late final ffi.Pointer _kCFErrorFilePathKey = + _lookup('kCFErrorFilePathKey'); + + CFStringRef get kCFErrorFilePathKey => _kCFErrorFilePathKey.value; + + CFErrorRef CFErrorCreate( + CFAllocatorRef allocator, + CFErrorDomain domain, + int code, + CFDictionaryRef userInfo, ) { - return _sigaltstack( - arg0, - arg1, + return _CFErrorCreate( + allocator, + domain, + code, + userInfo, ); } - late final _sigaltstackPtr = _lookup< + late final _CFErrorCreatePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sigaltstack'); - late final _sigaltstack = _sigaltstackPtr - .asFunction, ffi.Pointer)>(); + CFErrorRef Function(CFAllocatorRef, CFErrorDomain, CFIndex, + CFDictionaryRef)>>('CFErrorCreate'); + late final _CFErrorCreate = _CFErrorCreatePtr.asFunction< + CFErrorRef Function( + CFAllocatorRef, CFErrorDomain, int, CFDictionaryRef)>(); - int sigdelset( - ffi.Pointer arg0, - int arg1, + CFErrorRef CFErrorCreateWithUserInfoKeysAndValues( + CFAllocatorRef allocator, + CFErrorDomain domain, + int code, + ffi.Pointer> userInfoKeys, + ffi.Pointer> userInfoValues, + int numUserInfoValues, ) { - return _sigdelset( - arg0, - arg1, + return _CFErrorCreateWithUserInfoKeysAndValues( + allocator, + domain, + code, + userInfoKeys, + userInfoValues, + numUserInfoValues, ); } - late final _sigdelsetPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigdelset'); - late final _sigdelset = - _sigdelsetPtr.asFunction, int)>(); + late final _CFErrorCreateWithUserInfoKeysAndValuesPtr = _lookup< + ffi.NativeFunction< + CFErrorRef Function( + CFAllocatorRef, + CFErrorDomain, + CFIndex, + ffi.Pointer>, + ffi.Pointer>, + CFIndex)>>('CFErrorCreateWithUserInfoKeysAndValues'); + late final _CFErrorCreateWithUserInfoKeysAndValues = + _CFErrorCreateWithUserInfoKeysAndValuesPtr.asFunction< + CFErrorRef Function( + CFAllocatorRef, + CFErrorDomain, + int, + ffi.Pointer>, + ffi.Pointer>, + int)>(); - int sigemptyset( - ffi.Pointer arg0, + CFErrorDomain CFErrorGetDomain( + CFErrorRef err, ) { - return _sigemptyset( - arg0, + return _CFErrorGetDomain( + err, ); } - late final _sigemptysetPtr = - _lookup)>>( - 'sigemptyset'); - late final _sigemptyset = - _sigemptysetPtr.asFunction)>(); + late final _CFErrorGetDomainPtr = + _lookup>( + 'CFErrorGetDomain'); + late final _CFErrorGetDomain = + _CFErrorGetDomainPtr.asFunction(); - int sigfillset( - ffi.Pointer arg0, + int CFErrorGetCode( + CFErrorRef err, ) { - return _sigfillset( - arg0, + return _CFErrorGetCode( + err, ); } - late final _sigfillsetPtr = - _lookup)>>( - 'sigfillset'); - late final _sigfillset = - _sigfillsetPtr.asFunction)>(); + late final _CFErrorGetCodePtr = + _lookup>( + 'CFErrorGetCode'); + late final _CFErrorGetCode = + _CFErrorGetCodePtr.asFunction(); - int sighold( - int arg0, + CFDictionaryRef CFErrorCopyUserInfo( + CFErrorRef err, ) { - return _sighold( - arg0, + return _CFErrorCopyUserInfo( + err, ); } - late final _sigholdPtr = - _lookup>('sighold'); - late final _sighold = _sigholdPtr.asFunction(); + late final _CFErrorCopyUserInfoPtr = + _lookup>( + 'CFErrorCopyUserInfo'); + late final _CFErrorCopyUserInfo = _CFErrorCopyUserInfoPtr.asFunction< + CFDictionaryRef Function(CFErrorRef)>(); - int sigignore( - int arg0, + CFStringRef CFErrorCopyDescription( + CFErrorRef err, ) { - return _sigignore( - arg0, + return _CFErrorCopyDescription( + err, ); } - late final _sigignorePtr = - _lookup>('sigignore'); - late final _sigignore = _sigignorePtr.asFunction(); + late final _CFErrorCopyDescriptionPtr = + _lookup>( + 'CFErrorCopyDescription'); + late final _CFErrorCopyDescription = + _CFErrorCopyDescriptionPtr.asFunction(); - int siginterrupt( - int arg0, - int arg1, + CFStringRef CFErrorCopyFailureReason( + CFErrorRef err, ) { - return _siginterrupt( - arg0, - arg1, + return _CFErrorCopyFailureReason( + err, ); } - late final _siginterruptPtr = - _lookup>( - 'siginterrupt'); - late final _siginterrupt = - _siginterruptPtr.asFunction(); + late final _CFErrorCopyFailureReasonPtr = + _lookup>( + 'CFErrorCopyFailureReason'); + late final _CFErrorCopyFailureReason = _CFErrorCopyFailureReasonPtr + .asFunction(); - int sigismember( - ffi.Pointer arg0, - int arg1, + CFStringRef CFErrorCopyRecoverySuggestion( + CFErrorRef err, ) { - return _sigismember( - arg0, - arg1, + return _CFErrorCopyRecoverySuggestion( + err, ); } - late final _sigismemberPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sigismember'); - late final _sigismember = - _sigismemberPtr.asFunction, int)>(); + late final _CFErrorCopyRecoverySuggestionPtr = + _lookup>( + 'CFErrorCopyRecoverySuggestion'); + late final _CFErrorCopyRecoverySuggestion = _CFErrorCopyRecoverySuggestionPtr + .asFunction(); - int sigpause( - int arg0, - ) { - return _sigpause( - arg0, - ); + int CFStringGetTypeID() { + return _CFStringGetTypeID(); } - late final _sigpausePtr = - _lookup>('sigpause'); - late final _sigpause = _sigpausePtr.asFunction(); + late final _CFStringGetTypeIDPtr = + _lookup>('CFStringGetTypeID'); + late final _CFStringGetTypeID = + _CFStringGetTypeIDPtr.asFunction(); - int sigpending( - ffi.Pointer arg0, + CFStringRef CFStringCreateWithPascalString( + CFAllocatorRef alloc, + ConstStr255Param pStr, + int encoding, ) { - return _sigpending( - arg0, + return _CFStringCreateWithPascalString( + alloc, + pStr, + encoding, ); } - late final _sigpendingPtr = - _lookup)>>( - 'sigpending'); - late final _sigpending = - _sigpendingPtr.asFunction)>(); + late final _CFStringCreateWithPascalStringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ConstStr255Param, + CFStringEncoding)>>('CFStringCreateWithPascalString'); + late final _CFStringCreateWithPascalString = + _CFStringCreateWithPascalStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ConstStr255Param, int)>(); - int sigprocmask( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + CFStringRef CFStringCreateWithCString( + CFAllocatorRef alloc, + ffi.Pointer cStr, + int encoding, ) { - return _sigprocmask( - arg0, - arg1, - arg2, + return _CFStringCreateWithCString( + alloc, + cStr, + encoding, ); } - late final _sigprocmaskPtr = _lookup< + late final _CFStringCreateWithCStringPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer)>>('sigprocmask'); - late final _sigprocmask = _sigprocmaskPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + CFStringRef Function(CFAllocatorRef, ffi.Pointer, + CFStringEncoding)>>('CFStringCreateWithCString'); + late final _CFStringCreateWithCString = + _CFStringCreateWithCStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - int sigrelse( - int arg0, + CFStringRef CFStringCreateWithBytes( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int numBytes, + int encoding, + int isExternalRepresentation, ) { - return _sigrelse( - arg0, + return _CFStringCreateWithBytes( + alloc, + bytes, + numBytes, + encoding, + isExternalRepresentation, ); } - late final _sigrelsePtr = - _lookup>('sigrelse'); - late final _sigrelse = _sigrelsePtr.asFunction(); + late final _CFStringCreateWithBytesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFStringEncoding, Boolean)>>('CFStringCreateWithBytes'); + late final _CFStringCreateWithBytes = _CFStringCreateWithBytesPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, int, int)>(); - ffi.Pointer> sigset( - int arg0, - ffi.Pointer> arg1, + CFStringRef CFStringCreateWithCharacters( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, ) { - return _sigset( - arg0, - arg1, + return _CFStringCreateWithCharacters( + alloc, + chars, + numChars, ); } - late final _sigsetPtr = _lookup< + late final _CFStringCreateWithCharactersPtr = _lookup< ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Int, - ffi.Pointer< - ffi.NativeFunction>)>>('sigset'); - late final _sigset = _sigsetPtr.asFunction< - ffi.Pointer> Function( - int, ffi.Pointer>)>(); + CFStringRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFStringCreateWithCharacters'); + late final _CFStringCreateWithCharacters = + _CFStringCreateWithCharactersPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - int sigsuspend( - ffi.Pointer arg0, + CFStringRef CFStringCreateWithPascalStringNoCopy( + CFAllocatorRef alloc, + ConstStr255Param pStr, + int encoding, + CFAllocatorRef contentsDeallocator, ) { - return _sigsuspend( - arg0, + return _CFStringCreateWithPascalStringNoCopy( + alloc, + pStr, + encoding, + contentsDeallocator, ); } - late final _sigsuspendPtr = - _lookup)>>( - 'sigsuspend'); - late final _sigsuspend = - _sigsuspendPtr.asFunction)>(); + late final _CFStringCreateWithPascalStringNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + ConstStr255Param, + CFStringEncoding, + CFAllocatorRef)>>('CFStringCreateWithPascalStringNoCopy'); + late final _CFStringCreateWithPascalStringNoCopy = + _CFStringCreateWithPascalStringNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ConstStr255Param, int, CFAllocatorRef)>(); - int sigwait( - ffi.Pointer arg0, - ffi.Pointer arg1, + CFStringRef CFStringCreateWithCStringNoCopy( + CFAllocatorRef alloc, + ffi.Pointer cStr, + int encoding, + CFAllocatorRef contentsDeallocator, ) { - return _sigwait( - arg0, - arg1, + return _CFStringCreateWithCStringNoCopy( + alloc, + cStr, + encoding, + contentsDeallocator, ); } - late final _sigwaitPtr = _lookup< + late final _CFStringCreateWithCStringNoCopyPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sigwait'); - late final _sigwait = _sigwaitPtr - .asFunction, ffi.Pointer)>(); + CFStringRef Function( + CFAllocatorRef, + ffi.Pointer, + CFStringEncoding, + CFAllocatorRef)>>('CFStringCreateWithCStringNoCopy'); + late final _CFStringCreateWithCStringNoCopy = + _CFStringCreateWithCStringNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - void psignal( - int arg0, - ffi.Pointer arg1, + CFStringRef CFStringCreateWithBytesNoCopy( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int numBytes, + int encoding, + int isExternalRepresentation, + CFAllocatorRef contentsDeallocator, ) { - return _psignal( - arg0, - arg1, + return _CFStringCreateWithBytesNoCopy( + alloc, + bytes, + numBytes, + encoding, + isExternalRepresentation, + contentsDeallocator, ); } - late final _psignalPtr = _lookup< + late final _CFStringCreateWithBytesNoCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int, ffi.Pointer)>>('psignal'); - late final _psignal = - _psignalPtr.asFunction)>(); + CFStringRef Function( + CFAllocatorRef, + ffi.Pointer, + CFIndex, + CFStringEncoding, + Boolean, + CFAllocatorRef)>>('CFStringCreateWithBytesNoCopy'); + late final _CFStringCreateWithBytesNoCopy = + _CFStringCreateWithBytesNoCopyPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, int, int, + int, CFAllocatorRef)>(); - int sigblock( - int arg0, + CFStringRef CFStringCreateWithCharactersNoCopy( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, + CFAllocatorRef contentsDeallocator, ) { - return _sigblock( - arg0, + return _CFStringCreateWithCharactersNoCopy( + alloc, + chars, + numChars, + contentsDeallocator, ); } - late final _sigblockPtr = - _lookup>('sigblock'); - late final _sigblock = _sigblockPtr.asFunction(); + late final _CFStringCreateWithCharactersNoCopyPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFStringCreateWithCharactersNoCopy'); + late final _CFStringCreateWithCharactersNoCopy = + _CFStringCreateWithCharactersNoCopyPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - int sigsetmask( - int arg0, + CFStringRef CFStringCreateWithSubstring( + CFAllocatorRef alloc, + CFStringRef str, + CFRange range, ) { - return _sigsetmask( - arg0, + return _CFStringCreateWithSubstring( + alloc, + str, + range, ); } - late final _sigsetmaskPtr = - _lookup>('sigsetmask'); - late final _sigsetmask = _sigsetmaskPtr.asFunction(); + late final _CFStringCreateWithSubstringPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFRange)>>('CFStringCreateWithSubstring'); + late final _CFStringCreateWithSubstring = _CFStringCreateWithSubstringPtr + .asFunction(); - int sigvec1( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + CFStringRef CFStringCreateCopy( + CFAllocatorRef alloc, + CFStringRef theString, ) { - return _sigvec1( - arg0, - arg1, - arg2, + return _CFStringCreateCopy( + alloc, + theString, ); } - late final _sigvec1Ptr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Pointer)>>('sigvec'); - late final _sigvec1 = _sigvec1Ptr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer)>(); + late final _CFStringCreateCopyPtr = _lookup< + ffi + .NativeFunction>( + 'CFStringCreateCopy'); + late final _CFStringCreateCopy = _CFStringCreateCopyPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef)>(); - int renameat( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, + CFStringRef CFStringCreateWithFormat( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef format, ) { - return _renameat( - arg0, - arg1, - arg2, - arg3, + return _CFStringCreateWithFormat( + alloc, + formatOptions, + format, ); } - late final _renameatPtr = _lookup< + late final _CFStringCreateWithFormatPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Pointer)>>('renameat'); - late final _renameat = _renameatPtr.asFunction< - int Function(int, ffi.Pointer, int, ffi.Pointer)>(); + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, + CFStringRef)>>('CFStringCreateWithFormat'); + late final _CFStringCreateWithFormat = + _CFStringCreateWithFormatPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef)>(); - int renamex_np( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + CFStringRef CFStringCreateWithFormatAndArguments( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef format, + va_list arguments, ) { - return _renamex_np( - arg0, - arg1, - arg2, + return _CFStringCreateWithFormatAndArguments( + alloc, + formatOptions, + format, + arguments, ); } - late final _renamex_npPtr = _lookup< + late final _CFStringCreateWithFormatAndArgumentsPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('renamex_np'); - late final _renamex_np = _renamex_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + va_list)>>('CFStringCreateWithFormatAndArguments'); + late final _CFStringCreateWithFormatAndArguments = + _CFStringCreateWithFormatAndArgumentsPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFDictionaryRef, CFStringRef, va_list)>(); - int renameatx_np( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, - int arg4, + CFStringRef CFStringCreateStringWithValidatedFormat( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef validFormatSpecifiers, + CFStringRef format, + ffi.Pointer errorPtr, ) { - return _renameatx_np( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFStringCreateStringWithValidatedFormat( + alloc, + formatOptions, + validFormatSpecifiers, + format, + errorPtr, ); } - late final _renameatx_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Pointer, ffi.UnsignedInt)>>('renameatx_np'); - late final _renameatx_np = _renameatx_npPtr.asFunction< - int Function( - int, ffi.Pointer, int, ffi.Pointer, int)>(); - - late final ffi.Pointer> ___stdinp = - _lookup>('__stdinp'); - - ffi.Pointer get __stdinp => ___stdinp.value; - - set __stdinp(ffi.Pointer value) => ___stdinp.value = value; - - late final ffi.Pointer> ___stdoutp = - _lookup>('__stdoutp'); - - ffi.Pointer get __stdoutp => ___stdoutp.value; - - set __stdoutp(ffi.Pointer value) => ___stdoutp.value = value; - - late final ffi.Pointer> ___stderrp = - _lookup>('__stderrp'); - - ffi.Pointer get __stderrp => ___stderrp.value; - - set __stderrp(ffi.Pointer value) => ___stderrp.value = value; + late final _CFStringCreateStringWithValidatedFormatPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + CFStringRef, ffi.Pointer)>>( + 'CFStringCreateStringWithValidatedFormat'); + late final _CFStringCreateStringWithValidatedFormat = + _CFStringCreateStringWithValidatedFormatPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + CFStringRef, ffi.Pointer)>(); - void clearerr( - ffi.Pointer arg0, + CFStringRef CFStringCreateStringWithValidatedFormatAndArguments( + CFAllocatorRef alloc, + CFDictionaryRef formatOptions, + CFStringRef validFormatSpecifiers, + CFStringRef format, + va_list arguments, + ffi.Pointer errorPtr, ) { - return _clearerr( - arg0, + return _CFStringCreateStringWithValidatedFormatAndArguments( + alloc, + formatOptions, + validFormatSpecifiers, + format, + arguments, + errorPtr, ); } - late final _clearerrPtr = - _lookup)>>( - 'clearerr'); - late final _clearerr = - _clearerrPtr.asFunction)>(); + late final _CFStringCreateStringWithValidatedFormatAndArgumentsPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + CFStringRef, va_list, ffi.Pointer)>>( + 'CFStringCreateStringWithValidatedFormatAndArguments'); + late final _CFStringCreateStringWithValidatedFormatAndArguments = + _CFStringCreateStringWithValidatedFormatAndArgumentsPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, + CFStringRef, va_list, ffi.Pointer)>(); - int fclose( - ffi.Pointer arg0, + CFMutableStringRef CFStringCreateMutable( + CFAllocatorRef alloc, + int maxLength, ) { - return _fclose( - arg0, + return _CFStringCreateMutable( + alloc, + maxLength, ); } - late final _fclosePtr = - _lookup)>>( - 'fclose'); - late final _fclose = _fclosePtr.asFunction)>(); + late final _CFStringCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function( + CFAllocatorRef, CFIndex)>>('CFStringCreateMutable'); + late final _CFStringCreateMutable = _CFStringCreateMutablePtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, int)>(); - int feof( - ffi.Pointer arg0, + CFMutableStringRef CFStringCreateMutableCopy( + CFAllocatorRef alloc, + int maxLength, + CFStringRef theString, ) { - return _feof( - arg0, + return _CFStringCreateMutableCopy( + alloc, + maxLength, + theString, ); } - late final _feofPtr = - _lookup)>>('feof'); - late final _feof = _feofPtr.asFunction)>(); + late final _CFStringCreateMutableCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function(CFAllocatorRef, CFIndex, + CFStringRef)>>('CFStringCreateMutableCopy'); + late final _CFStringCreateMutableCopy = + _CFStringCreateMutableCopyPtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, int, CFStringRef)>(); - int ferror( - ffi.Pointer arg0, + CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy( + CFAllocatorRef alloc, + ffi.Pointer chars, + int numChars, + int capacity, + CFAllocatorRef externalCharactersAllocator, ) { - return _ferror( - arg0, + return _CFStringCreateMutableWithExternalCharactersNoCopy( + alloc, + chars, + numChars, + capacity, + externalCharactersAllocator, ); } - late final _ferrorPtr = - _lookup)>>( - 'ferror'); - late final _ferror = _ferrorPtr.asFunction)>(); - - int fflush( - ffi.Pointer arg0, - ) { - return _fflush( - arg0, - ); - } - - late final _fflushPtr = - _lookup)>>( - 'fflush'); - late final _fflush = _fflushPtr.asFunction)>(); + late final _CFStringCreateMutableWithExternalCharactersNoCopyPtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex, CFIndex, CFAllocatorRef)>>( + 'CFStringCreateMutableWithExternalCharactersNoCopy'); + late final _CFStringCreateMutableWithExternalCharactersNoCopy = + _CFStringCreateMutableWithExternalCharactersNoCopyPtr.asFunction< + CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, int, + int, CFAllocatorRef)>(); - int fgetc( - ffi.Pointer arg0, + int CFStringGetLength( + CFStringRef theString, ) { - return _fgetc( - arg0, + return _CFStringGetLength( + theString, ); } - late final _fgetcPtr = - _lookup)>>('fgetc'); - late final _fgetc = _fgetcPtr.asFunction)>(); + late final _CFStringGetLengthPtr = + _lookup>( + 'CFStringGetLength'); + late final _CFStringGetLength = + _CFStringGetLengthPtr.asFunction(); - int fgetpos( - ffi.Pointer arg0, - ffi.Pointer arg1, + int CFStringGetCharacterAtIndex( + CFStringRef theString, + int idx, ) { - return _fgetpos( - arg0, - arg1, + return _CFStringGetCharacterAtIndex( + theString, + idx, ); } - late final _fgetposPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fgetpos'); - late final _fgetpos = _fgetposPtr - .asFunction, ffi.Pointer)>(); + late final _CFStringGetCharacterAtIndexPtr = + _lookup>( + 'CFStringGetCharacterAtIndex'); + late final _CFStringGetCharacterAtIndex = _CFStringGetCharacterAtIndexPtr + .asFunction(); - ffi.Pointer fgets( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, + void CFStringGetCharacters( + CFStringRef theString, + CFRange range, + ffi.Pointer buffer, ) { - return _fgets( - arg0, - arg1, - arg2, + return _CFStringGetCharacters( + theString, + range, + buffer, ); } - late final _fgetsPtr = _lookup< + late final _CFStringGetCharactersPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int, ffi.Pointer)>>('fgets'); - late final _fgets = _fgetsPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + ffi.Void Function(CFStringRef, CFRange, + ffi.Pointer)>>('CFStringGetCharacters'); + late final _CFStringGetCharacters = _CFStringGetCharactersPtr.asFunction< + void Function(CFStringRef, CFRange, ffi.Pointer)>(); - ffi.Pointer fopen( - ffi.Pointer __filename, - ffi.Pointer __mode, + int CFStringGetPascalString( + CFStringRef theString, + StringPtr buffer, + int bufferSize, + int encoding, ) { - return _fopen( - __filename, - __mode, + return _CFStringGetPascalString( + theString, + buffer, + bufferSize, + encoding, ); } - late final _fopenPtr = _lookup< + late final _CFStringGetPascalStringPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('fopen'); - late final _fopen = _fopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + Boolean Function(CFStringRef, StringPtr, CFIndex, + CFStringEncoding)>>('CFStringGetPascalString'); + late final _CFStringGetPascalString = _CFStringGetPascalStringPtr.asFunction< + int Function(CFStringRef, StringPtr, int, int)>(); - int fprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, + int CFStringGetCString( + CFStringRef theString, + ffi.Pointer buffer, + int bufferSize, + int encoding, ) { - return _fprintf( - arg0, - arg1, + return _CFStringGetCString( + theString, + buffer, + bufferSize, + encoding, ); } - late final _fprintfPtr = _lookup< + late final _CFStringGetCStringPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('fprintf'); - late final _fprintf = _fprintfPtr - .asFunction, ffi.Pointer)>(); + Boolean Function(CFStringRef, ffi.Pointer, CFIndex, + CFStringEncoding)>>('CFStringGetCString'); + late final _CFStringGetCString = _CFStringGetCStringPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, int, int)>(); - int fputc( - int arg0, - ffi.Pointer arg1, + ConstStringPtr CFStringGetPascalStringPtr( + CFStringRef theString, + int encoding, ) { - return _fputc( - arg0, - arg1, + return _CFStringGetPascalStringPtr1( + theString, + encoding, ); } - late final _fputcPtr = - _lookup)>>( - 'fputc'); - late final _fputc = - _fputcPtr.asFunction)>(); + late final _CFStringGetPascalStringPtrPtr = _lookup< + ffi.NativeFunction< + ConstStringPtr Function( + CFStringRef, CFStringEncoding)>>('CFStringGetPascalStringPtr'); + late final _CFStringGetPascalStringPtr1 = _CFStringGetPascalStringPtrPtr + .asFunction(); - int fputs( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer CFStringGetCStringPtr( + CFStringRef theString, + int encoding, ) { - return _fputs( - arg0, - arg1, + return _CFStringGetCStringPtr1( + theString, + encoding, ); } - late final _fputsPtr = _lookup< + late final _CFStringGetCStringPtrPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fputs'); - late final _fputs = _fputsPtr - .asFunction, ffi.Pointer)>(); + ffi.Pointer Function( + CFStringRef, CFStringEncoding)>>('CFStringGetCStringPtr'); + late final _CFStringGetCStringPtr1 = _CFStringGetCStringPtrPtr.asFunction< + ffi.Pointer Function(CFStringRef, int)>(); - int fread( - ffi.Pointer __ptr, - int __size, - int __nitems, - ffi.Pointer __stream, + ffi.Pointer CFStringGetCharactersPtr( + CFStringRef theString, ) { - return _fread( - __ptr, - __size, - __nitems, - __stream, + return _CFStringGetCharactersPtr1( + theString, ); } - late final _freadPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer)>>('fread'); - late final _fread = _freadPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + late final _CFStringGetCharactersPtrPtr = + _lookup Function(CFStringRef)>>( + 'CFStringGetCharactersPtr'); + late final _CFStringGetCharactersPtr1 = _CFStringGetCharactersPtrPtr + .asFunction Function(CFStringRef)>(); - ffi.Pointer freopen( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + int CFStringGetBytes( + CFStringRef theString, + CFRange range, + int encoding, + int lossByte, + int isExternalRepresentation, + ffi.Pointer buffer, + int maxBufLen, + ffi.Pointer usedBufLen, ) { - return _freopen( - arg0, - arg1, - arg2, + return _CFStringGetBytes( + theString, + range, + encoding, + lossByte, + isExternalRepresentation, + buffer, + maxBufLen, + usedBufLen, ); } - late final _freopenPtr = _lookup< + late final _CFStringGetBytesPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('freopen'); - late final _freopen = _freopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + CFIndex Function( + CFStringRef, + CFRange, + CFStringEncoding, + UInt8, + Boolean, + ffi.Pointer, + CFIndex, + ffi.Pointer)>>('CFStringGetBytes'); + late final _CFStringGetBytes = _CFStringGetBytesPtr.asFunction< + int Function(CFStringRef, CFRange, int, int, int, ffi.Pointer, int, + ffi.Pointer)>(); - int fscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, + CFStringRef CFStringCreateFromExternalRepresentation( + CFAllocatorRef alloc, + CFDataRef data, + int encoding, ) { - return _fscanf( - arg0, - arg1, + return _CFStringCreateFromExternalRepresentation( + alloc, + data, + encoding, ); } - late final _fscanfPtr = _lookup< + late final _CFStringCreateFromExternalRepresentationPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('fscanf'); - late final _fscanf = _fscanfPtr - .asFunction, ffi.Pointer)>(); + CFStringRef Function(CFAllocatorRef, CFDataRef, + CFStringEncoding)>>('CFStringCreateFromExternalRepresentation'); + late final _CFStringCreateFromExternalRepresentation = + _CFStringCreateFromExternalRepresentationPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDataRef, int)>(); - int fseek( - ffi.Pointer arg0, - int arg1, - int arg2, + CFDataRef CFStringCreateExternalRepresentation( + CFAllocatorRef alloc, + CFStringRef theString, + int encoding, + int lossByte, ) { - return _fseek( - arg0, - arg1, - arg2, + return _CFStringCreateExternalRepresentation( + alloc, + theString, + encoding, + lossByte, ); } - late final _fseekPtr = _lookup< + late final _CFStringCreateExternalRepresentationPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Long, ffi.Int)>>('fseek'); - late final _fseek = - _fseekPtr.asFunction, int, int)>(); + CFDataRef Function(CFAllocatorRef, CFStringRef, CFStringEncoding, + UInt8)>>('CFStringCreateExternalRepresentation'); + late final _CFStringCreateExternalRepresentation = + _CFStringCreateExternalRepresentationPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFStringRef, int, int)>(); - int fsetpos( - ffi.Pointer arg0, - ffi.Pointer arg1, + int CFStringGetSmallestEncoding( + CFStringRef theString, ) { - return _fsetpos( - arg0, - arg1, + return _CFStringGetSmallestEncoding( + theString, ); } - late final _fsetposPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer)>>('fsetpos'); - late final _fsetpos = _fsetposPtr - .asFunction, ffi.Pointer)>(); + late final _CFStringGetSmallestEncodingPtr = + _lookup>( + 'CFStringGetSmallestEncoding'); + late final _CFStringGetSmallestEncoding = + _CFStringGetSmallestEncodingPtr.asFunction(); - int ftell( - ffi.Pointer arg0, + int CFStringGetFastestEncoding( + CFStringRef theString, ) { - return _ftell( - arg0, + return _CFStringGetFastestEncoding( + theString, ); } - late final _ftellPtr = - _lookup)>>( - 'ftell'); - late final _ftell = _ftellPtr.asFunction)>(); + late final _CFStringGetFastestEncodingPtr = + _lookup>( + 'CFStringGetFastestEncoding'); + late final _CFStringGetFastestEncoding = + _CFStringGetFastestEncodingPtr.asFunction(); - int fwrite( - ffi.Pointer __ptr, - int __size, - int __nitems, - ffi.Pointer __stream, - ) { - return _fwrite( - __ptr, - __size, - __nitems, - __stream, - ); + int CFStringGetSystemEncoding() { + return _CFStringGetSystemEncoding(); } - late final _fwritePtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, ffi.Size, ffi.Size, - ffi.Pointer)>>('fwrite'); - late final _fwrite = _fwritePtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + late final _CFStringGetSystemEncodingPtr = + _lookup>( + 'CFStringGetSystemEncoding'); + late final _CFStringGetSystemEncoding = + _CFStringGetSystemEncodingPtr.asFunction(); - int getc( - ffi.Pointer arg0, + int CFStringGetMaximumSizeForEncoding( + int length, + int encoding, ) { - return _getc( - arg0, + return _CFStringGetMaximumSizeForEncoding( + length, + encoding, ); } - late final _getcPtr = - _lookup)>>('getc'); - late final _getc = _getcPtr.asFunction)>(); - - int getchar() { - return _getchar(); - } - - late final _getcharPtr = - _lookup>('getchar'); - late final _getchar = _getcharPtr.asFunction(); + late final _CFStringGetMaximumSizeForEncodingPtr = + _lookup>( + 'CFStringGetMaximumSizeForEncoding'); + late final _CFStringGetMaximumSizeForEncoding = + _CFStringGetMaximumSizeForEncodingPtr.asFunction< + int Function(int, int)>(); - ffi.Pointer gets( - ffi.Pointer arg0, + int CFStringGetFileSystemRepresentation( + CFStringRef string, + ffi.Pointer buffer, + int maxBufLen, ) { - return _gets( - arg0, + return _CFStringGetFileSystemRepresentation( + string, + buffer, + maxBufLen, ); } - late final _getsPtr = _lookup< + late final _CFStringGetFileSystemRepresentationPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('gets'); - late final _gets = _getsPtr - .asFunction Function(ffi.Pointer)>(); + Boolean Function(CFStringRef, ffi.Pointer, + CFIndex)>>('CFStringGetFileSystemRepresentation'); + late final _CFStringGetFileSystemRepresentation = + _CFStringGetFileSystemRepresentationPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, int)>(); - void perror( - ffi.Pointer arg0, + int CFStringGetMaximumSizeOfFileSystemRepresentation( + CFStringRef string, ) { - return _perror( - arg0, + return _CFStringGetMaximumSizeOfFileSystemRepresentation( + string, ); } - late final _perrorPtr = - _lookup)>>( - 'perror'); - late final _perror = - _perrorPtr.asFunction)>(); + late final _CFStringGetMaximumSizeOfFileSystemRepresentationPtr = + _lookup>( + 'CFStringGetMaximumSizeOfFileSystemRepresentation'); + late final _CFStringGetMaximumSizeOfFileSystemRepresentation = + _CFStringGetMaximumSizeOfFileSystemRepresentationPtr.asFunction< + int Function(CFStringRef)>(); - int printf( - ffi.Pointer arg0, + CFStringRef CFStringCreateWithFileSystemRepresentation( + CFAllocatorRef alloc, + ffi.Pointer buffer, ) { - return _printf( - arg0, + return _CFStringCreateWithFileSystemRepresentation( + alloc, + buffer, ); } - late final _printfPtr = - _lookup)>>( - 'printf'); - late final _printf = - _printfPtr.asFunction)>(); + late final _CFStringCreateWithFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer)>>( + 'CFStringCreateWithFileSystemRepresentation'); + late final _CFStringCreateWithFileSystemRepresentation = + _CFStringCreateWithFileSystemRepresentationPtr.asFunction< + CFStringRef Function(CFAllocatorRef, ffi.Pointer)>(); - int putc( - int arg0, - ffi.Pointer arg1, + CFComparisonResult CFStringCompareWithOptionsAndLocale( + CFStringRef theString1, + CFStringRef theString2, + CFRange rangeToCompare, + CFStringCompareFlags compareOptions, + CFLocaleRef locale, ) { - return _putc( - arg0, - arg1, - ); + return CFComparisonResult.fromValue(_CFStringCompareWithOptionsAndLocale( + theString1, + theString2, + rangeToCompare, + compareOptions.value, + locale, + )); } - late final _putcPtr = - _lookup)>>( - 'putc'); - late final _putc = - _putcPtr.asFunction)>(); + late final _CFStringCompareWithOptionsAndLocalePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFStringRef, CFStringRef, CFRange, CFOptionFlags, + CFLocaleRef)>>('CFStringCompareWithOptionsAndLocale'); + late final _CFStringCompareWithOptionsAndLocale = + _CFStringCompareWithOptionsAndLocalePtr.asFunction< + int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef)>(); - int putchar( - int arg0, + CFComparisonResult CFStringCompareWithOptions( + CFStringRef theString1, + CFStringRef theString2, + CFRange rangeToCompare, + CFStringCompareFlags compareOptions, ) { - return _putchar( - arg0, - ); + return CFComparisonResult.fromValue(_CFStringCompareWithOptions( + theString1, + theString2, + rangeToCompare, + compareOptions.value, + )); } - late final _putcharPtr = - _lookup>('putchar'); - late final _putchar = _putcharPtr.asFunction(); + late final _CFStringCompareWithOptionsPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFStringRef, CFStringRef, CFRange, + CFOptionFlags)>>('CFStringCompareWithOptions'); + late final _CFStringCompareWithOptions = _CFStringCompareWithOptionsPtr + .asFunction(); - int puts( - ffi.Pointer arg0, + CFComparisonResult CFStringCompare( + CFStringRef theString1, + CFStringRef theString2, + CFStringCompareFlags compareOptions, ) { - return _puts( - arg0, - ); + return CFComparisonResult.fromValue(_CFStringCompare( + theString1, + theString2, + compareOptions.value, + )); } - late final _putsPtr = - _lookup)>>( - 'puts'); - late final _puts = _putsPtr.asFunction)>(); + late final _CFStringComparePtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFStringRef, CFStringRef, CFOptionFlags)>>('CFStringCompare'); + late final _CFStringCompare = _CFStringComparePtr.asFunction< + int Function(CFStringRef, CFStringRef, int)>(); - int remove( - ffi.Pointer arg0, + DartBoolean CFStringFindWithOptionsAndLocale( + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + CFStringCompareFlags searchOptions, + CFLocaleRef locale, + ffi.Pointer result, ) { - return _remove( - arg0, + return _CFStringFindWithOptionsAndLocale( + theString, + stringToFind, + rangeToSearch, + searchOptions.value, + locale, + result, ); } - late final _removePtr = - _lookup)>>( - 'remove'); - late final _remove = - _removePtr.asFunction)>(); + late final _CFStringFindWithOptionsAndLocalePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFStringRef, + CFStringRef, + CFRange, + CFOptionFlags, + CFLocaleRef, + ffi.Pointer)>>('CFStringFindWithOptionsAndLocale'); + late final _CFStringFindWithOptionsAndLocale = + _CFStringFindWithOptionsAndLocalePtr.asFunction< + int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef, + ffi.Pointer)>(); - int rename( - ffi.Pointer __old, - ffi.Pointer __new, + DartBoolean CFStringFindWithOptions( + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + CFStringCompareFlags searchOptions, + ffi.Pointer result, ) { - return _rename( - __old, - __new, + return _CFStringFindWithOptions( + theString, + stringToFind, + rangeToSearch, + searchOptions.value, + result, ); } - late final _renamePtr = _lookup< + late final _CFStringFindWithOptionsPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('rename'); - late final _rename = _renamePtr - .asFunction, ffi.Pointer)>(); + Boolean Function(CFStringRef, CFStringRef, CFRange, CFOptionFlags, + ffi.Pointer)>>('CFStringFindWithOptions'); + late final _CFStringFindWithOptions = _CFStringFindWithOptionsPtr.asFunction< + int Function( + CFStringRef, CFStringRef, CFRange, int, ffi.Pointer)>(); - void rewind( - ffi.Pointer arg0, + CFArrayRef CFStringCreateArrayWithFindResults( + CFAllocatorRef alloc, + CFStringRef theString, + CFStringRef stringToFind, + CFRange rangeToSearch, + CFStringCompareFlags compareOptions, ) { - return _rewind( - arg0, + return _CFStringCreateArrayWithFindResults( + alloc, + theString, + stringToFind, + rangeToSearch, + compareOptions.value, ); } - late final _rewindPtr = - _lookup)>>( - 'rewind'); - late final _rewind = - _rewindPtr.asFunction)>(); + late final _CFStringCreateArrayWithFindResultsPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef, CFRange, + CFOptionFlags)>>('CFStringCreateArrayWithFindResults'); + late final _CFStringCreateArrayWithFindResults = + _CFStringCreateArrayWithFindResultsPtr.asFunction< + CFArrayRef Function( + CFAllocatorRef, CFStringRef, CFStringRef, CFRange, int)>(); - int scanf( - ffi.Pointer arg0, + CFRange CFStringFind( + CFStringRef theString, + CFStringRef stringToFind, + CFStringCompareFlags compareOptions, ) { - return _scanf( - arg0, + return _CFStringFind( + theString, + stringToFind, + compareOptions.value, ); } - late final _scanfPtr = - _lookup)>>( - 'scanf'); - late final _scanf = - _scanfPtr.asFunction)>(); + late final _CFStringFindPtr = _lookup< + ffi.NativeFunction< + CFRange Function( + CFStringRef, CFStringRef, CFOptionFlags)>>('CFStringFind'); + late final _CFStringFind = _CFStringFindPtr.asFunction< + CFRange Function(CFStringRef, CFStringRef, int)>(); - void setbuf( - ffi.Pointer arg0, - ffi.Pointer arg1, + int CFStringHasPrefix( + CFStringRef theString, + CFStringRef prefix, ) { - return _setbuf( - arg0, - arg1, + return _CFStringHasPrefix( + theString, + prefix, ); } - late final _setbufPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>>('setbuf'); - late final _setbuf = _setbufPtr - .asFunction, ffi.Pointer)>(); + late final _CFStringHasPrefixPtr = + _lookup>( + 'CFStringHasPrefix'); + late final _CFStringHasPrefix = _CFStringHasPrefixPtr.asFunction< + int Function(CFStringRef, CFStringRef)>(); - int setvbuf( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - int arg3, + int CFStringHasSuffix( + CFStringRef theString, + CFStringRef suffix, ) { - return _setvbuf( - arg0, - arg1, - arg2, - arg3, + return _CFStringHasSuffix( + theString, + suffix, ); } - late final _setvbufPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, ffi.Int, - ffi.Size)>>('setvbuf'); - late final _setvbuf = _setvbufPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int, int)>(); + late final _CFStringHasSuffixPtr = + _lookup>( + 'CFStringHasSuffix'); + late final _CFStringHasSuffix = _CFStringHasSuffixPtr.asFunction< + int Function(CFStringRef, CFStringRef)>(); - int sprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, + CFRange CFStringGetRangeOfComposedCharactersAtIndex( + CFStringRef theString, + int theIndex, ) { - return _sprintf( - arg0, - arg1, + return _CFStringGetRangeOfComposedCharactersAtIndex( + theString, + theIndex, ); } - late final _sprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sprintf'); - late final _sprintf = _sprintfPtr - .asFunction, ffi.Pointer)>(); + late final _CFStringGetRangeOfComposedCharactersAtIndexPtr = + _lookup>( + 'CFStringGetRangeOfComposedCharactersAtIndex'); + late final _CFStringGetRangeOfComposedCharactersAtIndex = + _CFStringGetRangeOfComposedCharactersAtIndexPtr.asFunction< + CFRange Function(CFStringRef, int)>(); - int sscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, + DartBoolean CFStringFindCharacterFromSet( + CFStringRef theString, + CFCharacterSetRef theSet, + CFRange rangeToSearch, + CFStringCompareFlags searchOptions, + ffi.Pointer result, ) { - return _sscanf( - arg0, - arg1, + return _CFStringFindCharacterFromSet( + theString, + theSet, + rangeToSearch, + searchOptions.value, + result, ); } - late final _sscanfPtr = _lookup< + late final _CFStringFindCharacterFromSetPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('sscanf'); - late final _sscanf = _sscanfPtr - .asFunction, ffi.Pointer)>(); - - ffi.Pointer tmpfile() { - return _tmpfile(); - } - - late final _tmpfilePtr = - _lookup Function()>>('tmpfile'); - late final _tmpfile = _tmpfilePtr.asFunction Function()>(); + Boolean Function( + CFStringRef, + CFCharacterSetRef, + CFRange, + CFOptionFlags, + ffi.Pointer)>>('CFStringFindCharacterFromSet'); + late final _CFStringFindCharacterFromSet = + _CFStringFindCharacterFromSetPtr.asFunction< + int Function(CFStringRef, CFCharacterSetRef, CFRange, int, + ffi.Pointer)>(); - ffi.Pointer tmpnam( - ffi.Pointer arg0, + void CFStringGetLineBounds( + CFStringRef theString, + CFRange range, + ffi.Pointer lineBeginIndex, + ffi.Pointer lineEndIndex, + ffi.Pointer contentsEndIndex, ) { - return _tmpnam( - arg0, + return _CFStringGetLineBounds( + theString, + range, + lineBeginIndex, + lineEndIndex, + contentsEndIndex, ); } - late final _tmpnamPtr = _lookup< + late final _CFStringGetLineBoundsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('tmpnam'); - late final _tmpnam = _tmpnamPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Void Function( + CFStringRef, + CFRange, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('CFStringGetLineBounds'); + late final _CFStringGetLineBounds = _CFStringGetLineBoundsPtr.asFunction< + void Function(CFStringRef, CFRange, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int ungetc( - int arg0, - ffi.Pointer arg1, + void CFStringGetParagraphBounds( + CFStringRef string, + CFRange range, + ffi.Pointer parBeginIndex, + ffi.Pointer parEndIndex, + ffi.Pointer contentsEndIndex, ) { - return _ungetc( - arg0, - arg1, + return _CFStringGetParagraphBounds( + string, + range, + parBeginIndex, + parEndIndex, + contentsEndIndex, ); } - late final _ungetcPtr = - _lookup)>>( - 'ungetc'); - late final _ungetc = - _ungetcPtr.asFunction)>(); + late final _CFStringGetParagraphBoundsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFStringRef, + CFRange, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('CFStringGetParagraphBounds'); + late final _CFStringGetParagraphBounds = + _CFStringGetParagraphBoundsPtr.asFunction< + void Function(CFStringRef, CFRange, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int vfprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + int CFStringGetHyphenationLocationBeforeIndex( + CFStringRef string, + int location, + CFRange limitRange, + int options, + CFLocaleRef locale, + ffi.Pointer character, ) { - return _vfprintf( - arg0, - arg1, - arg2, + return _CFStringGetHyphenationLocationBeforeIndex( + string, + location, + limitRange, + options, + locale, + character, ); } - late final _vfprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, va_list)>>('vfprintf'); - late final _vfprintf = _vfprintfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + late final _CFStringGetHyphenationLocationBeforeIndexPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFStringRef, CFIndex, CFRange, CFOptionFlags, + CFLocaleRef, ffi.Pointer)>>( + 'CFStringGetHyphenationLocationBeforeIndex'); + late final _CFStringGetHyphenationLocationBeforeIndex = + _CFStringGetHyphenationLocationBeforeIndexPtr.asFunction< + int Function(CFStringRef, int, CFRange, int, CFLocaleRef, + ffi.Pointer)>(); - int vprintf( - ffi.Pointer arg0, - va_list arg1, + int CFStringIsHyphenationAvailableForLocale( + CFLocaleRef locale, ) { - return _vprintf( - arg0, - arg1, + return _CFStringIsHyphenationAvailableForLocale( + locale, ); } - late final _vprintfPtr = _lookup< - ffi.NativeFunction, va_list)>>( - 'vprintf'); - late final _vprintf = - _vprintfPtr.asFunction, va_list)>(); + late final _CFStringIsHyphenationAvailableForLocalePtr = + _lookup>( + 'CFStringIsHyphenationAvailableForLocale'); + late final _CFStringIsHyphenationAvailableForLocale = + _CFStringIsHyphenationAvailableForLocalePtr.asFunction< + int Function(CFLocaleRef)>(); - int vsprintf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + CFStringRef CFStringCreateByCombiningStrings( + CFAllocatorRef alloc, + CFArrayRef theArray, + CFStringRef separatorString, ) { - return _vsprintf( - arg0, - arg1, - arg2, + return _CFStringCreateByCombiningStrings( + alloc, + theArray, + separatorString, ); } - late final _vsprintfPtr = _lookup< + late final _CFStringCreateByCombiningStringsPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - va_list)>>('vsprintf'); - late final _vsprintf = _vsprintfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + CFStringRef Function(CFAllocatorRef, CFArrayRef, + CFStringRef)>>('CFStringCreateByCombiningStrings'); + late final _CFStringCreateByCombiningStrings = + _CFStringCreateByCombiningStringsPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFArrayRef, CFStringRef)>(); - ffi.Pointer ctermid( - ffi.Pointer arg0, + CFArrayRef CFStringCreateArrayBySeparatingStrings( + CFAllocatorRef alloc, + CFStringRef theString, + CFStringRef separatorString, ) { - return _ctermid( - arg0, + return _CFStringCreateArrayBySeparatingStrings( + alloc, + theString, + separatorString, ); } - late final _ctermidPtr = _lookup< + late final _CFStringCreateArrayBySeparatingStringsPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctermid'); - late final _ctermid = _ctermidPtr - .asFunction Function(ffi.Pointer)>(); + CFArrayRef Function(CFAllocatorRef, CFStringRef, + CFStringRef)>>('CFStringCreateArrayBySeparatingStrings'); + late final _CFStringCreateArrayBySeparatingStrings = + _CFStringCreateArrayBySeparatingStringsPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); - ffi.Pointer fdopen( - int arg0, - ffi.Pointer arg1, + int CFStringGetIntValue( + CFStringRef str, ) { - return _fdopen( - arg0, - arg1, + return _CFStringGetIntValue( + str, ); } - late final _fdopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer)>>('fdopen'); - late final _fdopen = _fdopenPtr - .asFunction Function(int, ffi.Pointer)>(); + late final _CFStringGetIntValuePtr = + _lookup>( + 'CFStringGetIntValue'); + late final _CFStringGetIntValue = + _CFStringGetIntValuePtr.asFunction(); - int fileno( - ffi.Pointer arg0, + double CFStringGetDoubleValue( + CFStringRef str, ) { - return _fileno( - arg0, + return _CFStringGetDoubleValue( + str, ); } - late final _filenoPtr = - _lookup)>>( - 'fileno'); - late final _fileno = _filenoPtr.asFunction)>(); + late final _CFStringGetDoubleValuePtr = + _lookup>( + 'CFStringGetDoubleValue'); + late final _CFStringGetDoubleValue = + _CFStringGetDoubleValuePtr.asFunction(); - int pclose( - ffi.Pointer arg0, + void CFStringAppend( + CFMutableStringRef theString, + CFStringRef appendedString, ) { - return _pclose( - arg0, + return _CFStringAppend( + theString, + appendedString, ); } - late final _pclosePtr = - _lookup)>>( - 'pclose'); - late final _pclose = _pclosePtr.asFunction)>(); + late final _CFStringAppendPtr = _lookup< + ffi + .NativeFunction>( + 'CFStringAppend'); + late final _CFStringAppend = _CFStringAppendPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); - ffi.Pointer popen( - ffi.Pointer arg0, - ffi.Pointer arg1, + void CFStringAppendCharacters( + CFMutableStringRef theString, + ffi.Pointer chars, + int numChars, ) { - return _popen( - arg0, - arg1, + return _CFStringAppendCharacters( + theString, + chars, + numChars, ); } - late final _popenPtr = _lookup< + late final _CFStringAppendCharactersPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('popen'); - late final _popen = _popenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(CFMutableStringRef, ffi.Pointer, + CFIndex)>>('CFStringAppendCharacters'); + late final _CFStringAppendCharacters = + _CFStringAppendCharactersPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int)>(); - int __srget( - ffi.Pointer arg0, + void CFStringAppendPascalString( + CFMutableStringRef theString, + ConstStr255Param pStr, + int encoding, ) { - return ___srget( - arg0, + return _CFStringAppendPascalString( + theString, + pStr, + encoding, ); } - late final ___srgetPtr = - _lookup)>>( - '__srget'); - late final ___srget = - ___srgetPtr.asFunction)>(); + late final _CFStringAppendPascalStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ConstStr255Param, + CFStringEncoding)>>('CFStringAppendPascalString'); + late final _CFStringAppendPascalString = _CFStringAppendPascalStringPtr + .asFunction(); - int __svfscanf( - ffi.Pointer arg0, - ffi.Pointer arg1, - va_list arg2, + void CFStringAppendCString( + CFMutableStringRef theString, + ffi.Pointer cStr, + int encoding, ) { - return ___svfscanf( - arg0, - arg1, - arg2, + return _CFStringAppendCString( + theString, + cStr, + encoding, ); } - late final ___svfscanfPtr = _lookup< + late final _CFStringAppendCStringPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - va_list)>>('__svfscanf'); - late final ___svfscanf = ___svfscanfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + ffi.Void Function(CFMutableStringRef, ffi.Pointer, + CFStringEncoding)>>('CFStringAppendCString'); + late final _CFStringAppendCString = _CFStringAppendCStringPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int)>(); - int __swbuf( - int arg0, - ffi.Pointer arg1, + void CFStringAppendFormat( + CFMutableStringRef theString, + CFDictionaryRef formatOptions, + CFStringRef format, ) { - return ___swbuf( - arg0, - arg1, + return _CFStringAppendFormat( + theString, + formatOptions, + format, ); } - late final ___swbufPtr = - _lookup)>>( - '__swbuf'); - late final ___swbuf = - ___swbufPtr.asFunction)>(); + late final _CFStringAppendFormatPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFDictionaryRef, + CFStringRef)>>('CFStringAppendFormat'); + late final _CFStringAppendFormat = _CFStringAppendFormatPtr.asFunction< + void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef)>(); - void flockfile( - ffi.Pointer arg0, + void CFStringAppendFormatAndArguments( + CFMutableStringRef theString, + CFDictionaryRef formatOptions, + CFStringRef format, + va_list arguments, ) { - return _flockfile( - arg0, + return _CFStringAppendFormatAndArguments( + theString, + formatOptions, + format, + arguments, ); } - late final _flockfilePtr = - _lookup)>>( - 'flockfile'); - late final _flockfile = - _flockfilePtr.asFunction)>(); + late final _CFStringAppendFormatAndArgumentsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef, + va_list)>>('CFStringAppendFormatAndArguments'); + late final _CFStringAppendFormatAndArguments = + _CFStringAppendFormatAndArgumentsPtr.asFunction< + void Function( + CFMutableStringRef, CFDictionaryRef, CFStringRef, va_list)>(); - int ftrylockfile( - ffi.Pointer arg0, + void CFStringInsert( + CFMutableStringRef str, + int idx, + CFStringRef insertedStr, ) { - return _ftrylockfile( - arg0, + return _CFStringInsert( + str, + idx, + insertedStr, ); } - late final _ftrylockfilePtr = - _lookup)>>( - 'ftrylockfile'); - late final _ftrylockfile = - _ftrylockfilePtr.asFunction)>(); + late final _CFStringInsertPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFIndex, CFStringRef)>>('CFStringInsert'); + late final _CFStringInsert = _CFStringInsertPtr.asFunction< + void Function(CFMutableStringRef, int, CFStringRef)>(); - void funlockfile( - ffi.Pointer arg0, + void CFStringDelete( + CFMutableStringRef theString, + CFRange range, ) { - return _funlockfile( - arg0, + return _CFStringDelete( + theString, + range, ); } - late final _funlockfilePtr = - _lookup)>>( - 'funlockfile'); - late final _funlockfile = - _funlockfilePtr.asFunction)>(); + late final _CFStringDeletePtr = _lookup< + ffi.NativeFunction>( + 'CFStringDelete'); + late final _CFStringDelete = _CFStringDeletePtr.asFunction< + void Function(CFMutableStringRef, CFRange)>(); - int getc_unlocked( - ffi.Pointer arg0, + void CFStringReplace( + CFMutableStringRef theString, + CFRange range, + CFStringRef replacement, ) { - return _getc_unlocked( - arg0, + return _CFStringReplace( + theString, + range, + replacement, ); } - late final _getc_unlockedPtr = - _lookup)>>( - 'getc_unlocked'); - late final _getc_unlocked = - _getc_unlockedPtr.asFunction)>(); - - int getchar_unlocked() { - return _getchar_unlocked(); - } - - late final _getchar_unlockedPtr = - _lookup>('getchar_unlocked'); - late final _getchar_unlocked = - _getchar_unlockedPtr.asFunction(); + late final _CFStringReplacePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMutableStringRef, CFRange, CFStringRef)>>('CFStringReplace'); + late final _CFStringReplace = _CFStringReplacePtr.asFunction< + void Function(CFMutableStringRef, CFRange, CFStringRef)>(); - int putc_unlocked( - int arg0, - ffi.Pointer arg1, + void CFStringReplaceAll( + CFMutableStringRef theString, + CFStringRef replacement, ) { - return _putc_unlocked( - arg0, - arg1, + return _CFStringReplaceAll( + theString, + replacement, ); } - late final _putc_unlockedPtr = - _lookup)>>( - 'putc_unlocked'); - late final _putc_unlocked = - _putc_unlockedPtr.asFunction)>(); + late final _CFStringReplaceAllPtr = _lookup< + ffi + .NativeFunction>( + 'CFStringReplaceAll'); + late final _CFStringReplaceAll = _CFStringReplaceAllPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); - int putchar_unlocked( - int arg0, + DartCFIndex CFStringFindAndReplace( + CFMutableStringRef theString, + CFStringRef stringToFind, + CFStringRef replacementString, + CFRange rangeToSearch, + CFStringCompareFlags compareOptions, ) { - return _putchar_unlocked( - arg0, + return _CFStringFindAndReplace( + theString, + stringToFind, + replacementString, + rangeToSearch, + compareOptions.value, ); } - late final _putchar_unlockedPtr = - _lookup>( - 'putchar_unlocked'); - late final _putchar_unlocked = - _putchar_unlockedPtr.asFunction(); + late final _CFStringFindAndReplacePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFMutableStringRef, CFStringRef, CFStringRef, + CFRange, CFOptionFlags)>>('CFStringFindAndReplace'); + late final _CFStringFindAndReplace = _CFStringFindAndReplacePtr.asFunction< + int Function( + CFMutableStringRef, CFStringRef, CFStringRef, CFRange, int)>(); - int getw( - ffi.Pointer arg0, + void CFStringSetExternalCharactersNoCopy( + CFMutableStringRef theString, + ffi.Pointer chars, + int length, + int capacity, ) { - return _getw( - arg0, + return _CFStringSetExternalCharactersNoCopy( + theString, + chars, + length, + capacity, ); } - late final _getwPtr = - _lookup)>>('getw'); - late final _getw = _getwPtr.asFunction)>(); + late final _CFStringSetExternalCharactersNoCopyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, ffi.Pointer, CFIndex, + CFIndex)>>('CFStringSetExternalCharactersNoCopy'); + late final _CFStringSetExternalCharactersNoCopy = + _CFStringSetExternalCharactersNoCopyPtr.asFunction< + void Function(CFMutableStringRef, ffi.Pointer, int, int)>(); - int putw( - int arg0, - ffi.Pointer arg1, + void CFStringPad( + CFMutableStringRef theString, + CFStringRef padString, + int length, + int indexIntoPad, ) { - return _putw( - arg0, - arg1, + return _CFStringPad( + theString, + padString, + length, + indexIntoPad, ); } - late final _putwPtr = - _lookup)>>( - 'putw'); - late final _putw = - _putwPtr.asFunction)>(); + late final _CFStringPadPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableStringRef, CFStringRef, CFIndex, + CFIndex)>>('CFStringPad'); + late final _CFStringPad = _CFStringPadPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef, int, int)>(); - ffi.Pointer tempnam( - ffi.Pointer __dir, - ffi.Pointer __prefix, + void CFStringTrim( + CFMutableStringRef theString, + CFStringRef trimString, ) { - return _tempnam( - __dir, - __prefix, + return _CFStringTrim( + theString, + trimString, ); } - late final _tempnamPtr = _lookup< + late final _CFStringTrimPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('tempnam'); - late final _tempnam = _tempnamPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + ffi.Void Function(CFMutableStringRef, CFStringRef)>>('CFStringTrim'); + late final _CFStringTrim = _CFStringTrimPtr.asFunction< + void Function(CFMutableStringRef, CFStringRef)>(); - int fseeko( - ffi.Pointer __stream, - int __offset, - int __whence, + void CFStringTrimWhitespace( + CFMutableStringRef theString, ) { - return _fseeko( - __stream, - __offset, - __whence, + return _CFStringTrimWhitespace( + theString, ); } - late final _fseekoPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, off_t, ffi.Int)>>('fseeko'); - late final _fseeko = - _fseekoPtr.asFunction, int, int)>(); + late final _CFStringTrimWhitespacePtr = + _lookup>( + 'CFStringTrimWhitespace'); + late final _CFStringTrimWhitespace = _CFStringTrimWhitespacePtr.asFunction< + void Function(CFMutableStringRef)>(); - int ftello( - ffi.Pointer __stream, + void CFStringLowercase( + CFMutableStringRef theString, + CFLocaleRef locale, ) { - return _ftello( - __stream, + return _CFStringLowercase( + theString, + locale, ); } - late final _ftelloPtr = - _lookup)>>('ftello'); - late final _ftello = _ftelloPtr.asFunction)>(); + late final _CFStringLowercasePtr = _lookup< + ffi + .NativeFunction>( + 'CFStringLowercase'); + late final _CFStringLowercase = _CFStringLowercasePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); - int snprintf( - ffi.Pointer __str, - int __size, - ffi.Pointer __format, + void CFStringUppercase( + CFMutableStringRef theString, + CFLocaleRef locale, ) { - return _snprintf( - __str, - __size, - __format, + return _CFStringUppercase( + theString, + locale, ); } - late final _snprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer)>>('snprintf'); - late final _snprintf = _snprintfPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); + late final _CFStringUppercasePtr = _lookup< + ffi + .NativeFunction>( + 'CFStringUppercase'); + late final _CFStringUppercase = _CFStringUppercasePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); - int vfscanf( - ffi.Pointer __stream, - ffi.Pointer __format, - va_list arg2, + void CFStringCapitalize( + CFMutableStringRef theString, + CFLocaleRef locale, ) { - return _vfscanf( - __stream, - __format, - arg2, + return _CFStringCapitalize( + theString, + locale, ); } - late final _vfscanfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, va_list)>>('vfscanf'); - late final _vfscanf = _vfscanfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); + late final _CFStringCapitalizePtr = _lookup< + ffi + .NativeFunction>( + 'CFStringCapitalize'); + late final _CFStringCapitalize = _CFStringCapitalizePtr.asFunction< + void Function(CFMutableStringRef, CFLocaleRef)>(); - int vscanf( - ffi.Pointer __format, - va_list arg1, + void CFStringNormalize( + CFMutableStringRef theString, + CFStringNormalizationForm theForm, ) { - return _vscanf( - __format, - arg1, + return _CFStringNormalize( + theString, + theForm.value, ); } - late final _vscanfPtr = _lookup< - ffi.NativeFunction, va_list)>>( - 'vscanf'); - late final _vscanf = - _vscanfPtr.asFunction, va_list)>(); + late final _CFStringNormalizePtr = _lookup< + ffi.NativeFunction>( + 'CFStringNormalize'); + late final _CFStringNormalize = _CFStringNormalizePtr.asFunction< + void Function(CFMutableStringRef, int)>(); - int vsnprintf( - ffi.Pointer __str, - int __size, - ffi.Pointer __format, - va_list arg3, + void CFStringFold( + CFMutableStringRef theString, + CFStringCompareFlags theFlags, + CFLocaleRef theLocale, ) { - return _vsnprintf( - __str, - __size, - __format, - arg3, + return _CFStringFold( + theString, + theFlags.value, + theLocale, ); } - late final _vsnprintfPtr = _lookup< + late final _CFStringFoldPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer, va_list)>>('vsnprintf'); - late final _vsnprintf = _vsnprintfPtr.asFunction< - int Function( - ffi.Pointer, int, ffi.Pointer, va_list)>(); + ffi.Void Function( + CFMutableStringRef, CFOptionFlags, CFLocaleRef)>>('CFStringFold'); + late final _CFStringFold = _CFStringFoldPtr.asFunction< + void Function(CFMutableStringRef, int, CFLocaleRef)>(); - int vsscanf( - ffi.Pointer __str, - ffi.Pointer __format, - va_list arg2, + int CFStringTransform( + CFMutableStringRef string, + ffi.Pointer range, + CFStringRef transform, + int reverse, ) { - return _vsscanf( - __str, - __format, - arg2, + return _CFStringTransform( + string, + range, + transform, + reverse, ); } - late final _vsscanfPtr = _lookup< + late final _CFStringTransformPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - va_list)>>('vsscanf'); - late final _vsscanf = _vsscanfPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, va_list)>(); - - int dprintf( - int arg0, - ffi.Pointer arg1, - ) { - return _dprintf( - arg0, - arg1, - ); - } + Boolean Function(CFMutableStringRef, ffi.Pointer, + CFStringRef, Boolean)>>('CFStringTransform'); + late final _CFStringTransform = _CFStringTransformPtr.asFunction< + int Function( + CFMutableStringRef, ffi.Pointer, CFStringRef, int)>(); - late final _dprintfPtr = _lookup< - ffi.NativeFunction)>>( - 'dprintf'); - late final _dprintf = - _dprintfPtr.asFunction)>(); + late final ffi.Pointer _kCFStringTransformStripCombiningMarks = + _lookup('kCFStringTransformStripCombiningMarks'); - int vdprintf( - int arg0, - ffi.Pointer arg1, - va_list arg2, - ) { - return _vdprintf( - arg0, - arg1, - arg2, - ); - } + CFStringRef get kCFStringTransformStripCombiningMarks => + _kCFStringTransformStripCombiningMarks.value; - late final _vdprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, va_list)>>('vdprintf'); - late final _vdprintf = _vdprintfPtr - .asFunction, va_list)>(); + late final ffi.Pointer _kCFStringTransformToLatin = + _lookup('kCFStringTransformToLatin'); - int getdelim( - ffi.Pointer> __linep, - ffi.Pointer __linecapp, - int __delimiter, - ffi.Pointer __stream, - ) { - return _getdelim( - __linep, - __linecapp, - __delimiter, - __stream, - ); - } + CFStringRef get kCFStringTransformToLatin => _kCFStringTransformToLatin.value; - late final _getdelimPtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Pointer>, - ffi.Pointer, ffi.Int, ffi.Pointer)>>('getdelim'); - late final _getdelim = _getdelimPtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - int, ffi.Pointer)>(); + late final ffi.Pointer _kCFStringTransformFullwidthHalfwidth = + _lookup('kCFStringTransformFullwidthHalfwidth'); - int getline( - ffi.Pointer> __linep, - ffi.Pointer __linecapp, - ffi.Pointer __stream, - ) { - return _getline( - __linep, - __linecapp, - __stream, - ); - } + CFStringRef get kCFStringTransformFullwidthHalfwidth => + _kCFStringTransformFullwidthHalfwidth.value; - late final _getlinePtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>>('getline'); - late final _getline = _getlinePtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - ffi.Pointer)>(); + late final ffi.Pointer _kCFStringTransformLatinKatakana = + _lookup('kCFStringTransformLatinKatakana'); - ffi.Pointer fmemopen( - ffi.Pointer __buf, - int __size, - ffi.Pointer __mode, - ) { - return _fmemopen( - __buf, - __size, - __mode, - ); - } + CFStringRef get kCFStringTransformLatinKatakana => + _kCFStringTransformLatinKatakana.value; - late final _fmemopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Size, - ffi.Pointer)>>('fmemopen'); - late final _fmemopen = _fmemopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer)>(); + late final ffi.Pointer _kCFStringTransformLatinHiragana = + _lookup('kCFStringTransformLatinHiragana'); - ffi.Pointer open_memstream( - ffi.Pointer> __bufp, - ffi.Pointer __sizep, - ) { - return _open_memstream( - __bufp, - __sizep, - ); - } + CFStringRef get kCFStringTransformLatinHiragana => + _kCFStringTransformLatinHiragana.value; - late final _open_memstreamPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer>, - ffi.Pointer)>>('open_memstream'); - late final _open_memstream = _open_memstreamPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer>, ffi.Pointer)>(); + late final ffi.Pointer _kCFStringTransformHiraganaKatakana = + _lookup('kCFStringTransformHiraganaKatakana'); - late final ffi.Pointer _sys_nerr = _lookup('sys_nerr'); + CFStringRef get kCFStringTransformHiraganaKatakana => + _kCFStringTransformHiraganaKatakana.value; - int get sys_nerr => _sys_nerr.value; + late final ffi.Pointer _kCFStringTransformMandarinLatin = + _lookup('kCFStringTransformMandarinLatin'); - late final ffi.Pointer>> _sys_errlist = - _lookup>>('sys_errlist'); + CFStringRef get kCFStringTransformMandarinLatin => + _kCFStringTransformMandarinLatin.value; - ffi.Pointer> get sys_errlist => _sys_errlist.value; + late final ffi.Pointer _kCFStringTransformLatinHangul = + _lookup('kCFStringTransformLatinHangul'); - set sys_errlist(ffi.Pointer> value) => - _sys_errlist.value = value; + CFStringRef get kCFStringTransformLatinHangul => + _kCFStringTransformLatinHangul.value; - int asprintf( - ffi.Pointer> arg0, - ffi.Pointer arg1, - ) { - return _asprintf( - arg0, - arg1, - ); - } + late final ffi.Pointer _kCFStringTransformLatinArabic = + _lookup('kCFStringTransformLatinArabic'); - late final _asprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer)>>('asprintf'); - late final _asprintf = _asprintfPtr.asFunction< - int Function( - ffi.Pointer>, ffi.Pointer)>(); + CFStringRef get kCFStringTransformLatinArabic => + _kCFStringTransformLatinArabic.value; - ffi.Pointer ctermid_r( - ffi.Pointer arg0, - ) { - return _ctermid_r( - arg0, - ); - } + late final ffi.Pointer _kCFStringTransformLatinHebrew = + _lookup('kCFStringTransformLatinHebrew'); - late final _ctermid_rPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctermid_r'); - late final _ctermid_r = _ctermid_rPtr - .asFunction Function(ffi.Pointer)>(); + CFStringRef get kCFStringTransformLatinHebrew => + _kCFStringTransformLatinHebrew.value; - ffi.Pointer fgetln( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return _fgetln( - arg0, - arg1, - ); - } + late final ffi.Pointer _kCFStringTransformLatinThai = + _lookup('kCFStringTransformLatinThai'); - late final _fgetlnPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('fgetln'); - late final _fgetln = _fgetlnPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + CFStringRef get kCFStringTransformLatinThai => + _kCFStringTransformLatinThai.value; - ffi.Pointer fmtcheck( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return _fmtcheck( - arg0, - arg1, - ); - } + late final ffi.Pointer _kCFStringTransformLatinCyrillic = + _lookup('kCFStringTransformLatinCyrillic'); - late final _fmtcheckPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('fmtcheck'); - late final _fmtcheck = _fmtcheckPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + CFStringRef get kCFStringTransformLatinCyrillic => + _kCFStringTransformLatinCyrillic.value; - int fpurge( - ffi.Pointer arg0, + late final ffi.Pointer _kCFStringTransformLatinGreek = + _lookup('kCFStringTransformLatinGreek'); + + CFStringRef get kCFStringTransformLatinGreek => + _kCFStringTransformLatinGreek.value; + + late final ffi.Pointer _kCFStringTransformToXMLHex = + _lookup('kCFStringTransformToXMLHex'); + + CFStringRef get kCFStringTransformToXMLHex => + _kCFStringTransformToXMLHex.value; + + late final ffi.Pointer _kCFStringTransformToUnicodeName = + _lookup('kCFStringTransformToUnicodeName'); + + CFStringRef get kCFStringTransformToUnicodeName => + _kCFStringTransformToUnicodeName.value; + + late final ffi.Pointer _kCFStringTransformStripDiacritics = + _lookup('kCFStringTransformStripDiacritics'); + + CFStringRef get kCFStringTransformStripDiacritics => + _kCFStringTransformStripDiacritics.value; + + int CFStringIsEncodingAvailable( + int encoding, ) { - return _fpurge( - arg0, + return _CFStringIsEncodingAvailable( + encoding, ); } - late final _fpurgePtr = - _lookup)>>( - 'fpurge'); - late final _fpurge = _fpurgePtr.asFunction)>(); + late final _CFStringIsEncodingAvailablePtr = + _lookup>( + 'CFStringIsEncodingAvailable'); + late final _CFStringIsEncodingAvailable = + _CFStringIsEncodingAvailablePtr.asFunction(); - void setbuffer( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, - ) { - return _setbuffer( - arg0, - arg1, - arg2, - ); + ffi.Pointer CFStringGetListOfAvailableEncodings() { + return _CFStringGetListOfAvailableEncodings(); } - late final _setbufferPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>>('setbuffer'); - late final _setbuffer = _setbufferPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _CFStringGetListOfAvailableEncodingsPtr = + _lookup Function()>>( + 'CFStringGetListOfAvailableEncodings'); + late final _CFStringGetListOfAvailableEncodings = + _CFStringGetListOfAvailableEncodingsPtr.asFunction< + ffi.Pointer Function()>(); - int setlinebuf( - ffi.Pointer arg0, + CFStringRef CFStringGetNameOfEncoding( + int encoding, ) { - return _setlinebuf( - arg0, + return _CFStringGetNameOfEncoding( + encoding, ); } - late final _setlinebufPtr = - _lookup)>>( - 'setlinebuf'); - late final _setlinebuf = - _setlinebufPtr.asFunction)>(); + late final _CFStringGetNameOfEncodingPtr = + _lookup>( + 'CFStringGetNameOfEncoding'); + late final _CFStringGetNameOfEncoding = + _CFStringGetNameOfEncodingPtr.asFunction(); - int vasprintf( - ffi.Pointer> arg0, - ffi.Pointer arg1, - va_list arg2, + int CFStringConvertEncodingToNSStringEncoding( + int encoding, ) { - return _vasprintf( - arg0, - arg1, - arg2, + return _CFStringConvertEncodingToNSStringEncoding( + encoding, ); } - late final _vasprintfPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer>, - ffi.Pointer, va_list)>>('vasprintf'); - late final _vasprintf = _vasprintfPtr.asFunction< - int Function(ffi.Pointer>, ffi.Pointer, - va_list)>(); + late final _CFStringConvertEncodingToNSStringEncodingPtr = + _lookup>( + 'CFStringConvertEncodingToNSStringEncoding'); + late final _CFStringConvertEncodingToNSStringEncoding = + _CFStringConvertEncodingToNSStringEncodingPtr.asFunction< + int Function(int)>(); - ffi.Pointer funopen( - ffi.Pointer arg0, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> - arg1, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> - arg2, - ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> - arg3, - ffi.Pointer)>> - arg4, + int CFStringConvertNSStringEncodingToEncoding( + int encoding, ) { - return _funopen( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFStringConvertNSStringEncodingToEncoding( + encoding, ); } - late final _funopenPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>>)>>('funopen'); - late final _funopen = _funopenPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>>, - ffi.Pointer< - ffi.NativeFunction)>>)>(); + late final _CFStringConvertNSStringEncodingToEncodingPtr = + _lookup>( + 'CFStringConvertNSStringEncodingToEncoding'); + late final _CFStringConvertNSStringEncodingToEncoding = + _CFStringConvertNSStringEncodingToEncodingPtr.asFunction< + int Function(int)>(); - int __sprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, + int CFStringConvertEncodingToWindowsCodepage( + int encoding, ) { - return ___sprintf_chk( - arg0, - arg1, - arg2, - arg3, + return _CFStringConvertEncodingToWindowsCodepage( + encoding, ); } - late final ___sprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, - ffi.Pointer)>>('__sprintf_chk'); - late final ___sprintf_chk = ___sprintf_chkPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer)>(); + late final _CFStringConvertEncodingToWindowsCodepagePtr = + _lookup>( + 'CFStringConvertEncodingToWindowsCodepage'); + late final _CFStringConvertEncodingToWindowsCodepage = + _CFStringConvertEncodingToWindowsCodepagePtr.asFunction< + int Function(int)>(); - int __snprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, - ffi.Pointer arg4, + int CFStringConvertWindowsCodepageToEncoding( + int codepage, ) { - return ___snprintf_chk( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFStringConvertWindowsCodepageToEncoding( + codepage, ); } - late final ___snprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, - ffi.Pointer)>>('__snprintf_chk'); - late final ___snprintf_chk = ___snprintf_chkPtr.asFunction< - int Function( - ffi.Pointer, int, int, int, ffi.Pointer)>(); + late final _CFStringConvertWindowsCodepageToEncodingPtr = + _lookup>( + 'CFStringConvertWindowsCodepageToEncoding'); + late final _CFStringConvertWindowsCodepageToEncoding = + _CFStringConvertWindowsCodepageToEncodingPtr.asFunction< + int Function(int)>(); - int __vsprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, - va_list arg4, + int CFStringConvertIANACharSetNameToEncoding( + CFStringRef theString, ) { - return ___vsprintf_chk( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFStringConvertIANACharSetNameToEncoding( + theString, ); } - late final ___vsprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Size, - ffi.Pointer, va_list)>>('__vsprintf_chk'); - late final ___vsprintf_chk = ___vsprintf_chkPtr.asFunction< - int Function( - ffi.Pointer, int, int, ffi.Pointer, va_list)>(); + late final _CFStringConvertIANACharSetNameToEncodingPtr = + _lookup>( + 'CFStringConvertIANACharSetNameToEncoding'); + late final _CFStringConvertIANACharSetNameToEncoding = + _CFStringConvertIANACharSetNameToEncodingPtr.asFunction< + int Function(CFStringRef)>(); - int __vsnprintf_chk( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, - ffi.Pointer arg4, - va_list arg5, + CFStringRef CFStringConvertEncodingToIANACharSetName( + int encoding, ) { - return ___vsnprintf_chk( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _CFStringConvertEncodingToIANACharSetName( + encoding, ); } - late final ___vsnprintf_chkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.Int, ffi.Size, - ffi.Pointer, va_list)>>('__vsnprintf_chk'); - late final ___vsnprintf_chk = ___vsnprintf_chkPtr.asFunction< - int Function(ffi.Pointer, int, int, int, ffi.Pointer, - va_list)>(); + late final _CFStringConvertEncodingToIANACharSetNamePtr = + _lookup>( + 'CFStringConvertEncodingToIANACharSetName'); + late final _CFStringConvertEncodingToIANACharSetName = + _CFStringConvertEncodingToIANACharSetNamePtr.asFunction< + CFStringRef Function(int)>(); - ffi.Pointer memchr( - ffi.Pointer __s, - int __c, - int __n, + int CFStringGetMostCompatibleMacStringEncoding( + int encoding, ) { - return _memchr( - __s, - __c, - __n, + return _CFStringGetMostCompatibleMacStringEncoding( + encoding, ); } - late final _memchrPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int, ffi.Size)>>('memchr'); - late final _memchr = _memchrPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + late final _CFStringGetMostCompatibleMacStringEncodingPtr = + _lookup>( + 'CFStringGetMostCompatibleMacStringEncoding'); + late final _CFStringGetMostCompatibleMacStringEncoding = + _CFStringGetMostCompatibleMacStringEncodingPtr.asFunction< + int Function(int)>(); - int memcmp( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + void CFShow( + CFTypeRef obj, ) { - return _memcmp( - __s1, - __s2, - __n, + return _CFShow( + obj, ); } - late final _memcmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memcmp'); - late final _memcmp = _memcmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _CFShowPtr = + _lookup>('CFShow'); + late final _CFShow = _CFShowPtr.asFunction(); - ffi.Pointer memcpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + void CFShowStr( + CFStringRef str, ) { - return _memcpy( - __dst, - __src, - __n, + return _CFShowStr( + str, ); } - late final _memcpyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('memcpy'); - late final _memcpy = _memcpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _CFShowStrPtr = + _lookup>('CFShowStr'); + late final _CFShowStr = + _CFShowStrPtr.asFunction(); - ffi.Pointer memmove( - ffi.Pointer __dst, - ffi.Pointer __src, - int __len, + CFStringRef __CFStringMakeConstantString( + ffi.Pointer cStr, ) { - return _memmove( - __dst, - __src, - __len, + return ___CFStringMakeConstantString( + cStr, ); } - late final _memmovePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('memmove'); - late final _memmove = _memmovePtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final ___CFStringMakeConstantStringPtr = + _lookup)>>( + '__CFStringMakeConstantString'); + late final ___CFStringMakeConstantString = ___CFStringMakeConstantStringPtr + .asFunction)>(); - ffi.Pointer memset( - ffi.Pointer __b, - int __c, - int __len, - ) { - return _memset( - __b, - __c, - __len, - ); + int CFTimeZoneGetTypeID() { + return _CFTimeZoneGetTypeID(); } - late final _memsetPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int, ffi.Size)>>('memset'); - late final _memset = _memsetPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, int, int)>(); + late final _CFTimeZoneGetTypeIDPtr = + _lookup>('CFTimeZoneGetTypeID'); + late final _CFTimeZoneGetTypeID = + _CFTimeZoneGetTypeIDPtr.asFunction(); - ffi.Pointer strcat( - ffi.Pointer __s1, - ffi.Pointer __s2, - ) { - return _strcat( - __s1, - __s2, - ); + CFTimeZoneRef CFTimeZoneCopySystem() { + return _CFTimeZoneCopySystem(); } - late final _strcatPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strcat'); - late final _strcat = _strcatPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _CFTimeZoneCopySystemPtr = + _lookup>( + 'CFTimeZoneCopySystem'); + late final _CFTimeZoneCopySystem = + _CFTimeZoneCopySystemPtr.asFunction(); - ffi.Pointer strchr( - ffi.Pointer __s, - int __c, - ) { - return _strchr( - __s, - __c, - ); + void CFTimeZoneResetSystem() { + return _CFTimeZoneResetSystem(); } - late final _strchrPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('strchr'); - late final _strchr = _strchrPtr - .asFunction Function(ffi.Pointer, int)>(); + late final _CFTimeZoneResetSystemPtr = + _lookup>('CFTimeZoneResetSystem'); + late final _CFTimeZoneResetSystem = + _CFTimeZoneResetSystemPtr.asFunction(); - int strcmp( - ffi.Pointer __s1, - ffi.Pointer __s2, - ) { - return _strcmp( - __s1, - __s2, - ); + CFTimeZoneRef CFTimeZoneCopyDefault() { + return _CFTimeZoneCopyDefault(); } - late final _strcmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('strcmp'); - late final _strcmp = _strcmpPtr - .asFunction, ffi.Pointer)>(); + late final _CFTimeZoneCopyDefaultPtr = + _lookup>( + 'CFTimeZoneCopyDefault'); + late final _CFTimeZoneCopyDefault = + _CFTimeZoneCopyDefaultPtr.asFunction(); - int strcoll( - ffi.Pointer __s1, - ffi.Pointer __s2, + void CFTimeZoneSetDefault( + CFTimeZoneRef tz, ) { - return _strcoll( - __s1, - __s2, + return _CFTimeZoneSetDefault( + tz, ); } - late final _strcollPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('strcoll'); - late final _strcoll = _strcollPtr - .asFunction, ffi.Pointer)>(); + late final _CFTimeZoneSetDefaultPtr = + _lookup>( + 'CFTimeZoneSetDefault'); + late final _CFTimeZoneSetDefault = + _CFTimeZoneSetDefaultPtr.asFunction(); - ffi.Pointer strcpy( - ffi.Pointer __dst, - ffi.Pointer __src, - ) { - return _strcpy( - __dst, - __src, - ); + CFArrayRef CFTimeZoneCopyKnownNames() { + return _CFTimeZoneCopyKnownNames(); } - late final _strcpyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strcpy'); - late final _strcpy = _strcpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _CFTimeZoneCopyKnownNamesPtr = + _lookup>( + 'CFTimeZoneCopyKnownNames'); + late final _CFTimeZoneCopyKnownNames = + _CFTimeZoneCopyKnownNamesPtr.asFunction(); - int strcspn( - ffi.Pointer __s, - ffi.Pointer __charset, - ) { - return _strcspn( - __s, - __charset, - ); + CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary() { + return _CFTimeZoneCopyAbbreviationDictionary(); } - late final _strcspnPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>>('strcspn'); - late final _strcspn = _strcspnPtr - .asFunction, ffi.Pointer)>(); + late final _CFTimeZoneCopyAbbreviationDictionaryPtr = + _lookup>( + 'CFTimeZoneCopyAbbreviationDictionary'); + late final _CFTimeZoneCopyAbbreviationDictionary = + _CFTimeZoneCopyAbbreviationDictionaryPtr.asFunction< + CFDictionaryRef Function()>(); - ffi.Pointer strerror( - int __errnum, + void CFTimeZoneSetAbbreviationDictionary( + CFDictionaryRef dict, ) { - return _strerror( - __errnum, + return _CFTimeZoneSetAbbreviationDictionary( + dict, ); } - late final _strerrorPtr = - _lookup Function(ffi.Int)>>( - 'strerror'); - late final _strerror = - _strerrorPtr.asFunction Function(int)>(); + late final _CFTimeZoneSetAbbreviationDictionaryPtr = + _lookup>( + 'CFTimeZoneSetAbbreviationDictionary'); + late final _CFTimeZoneSetAbbreviationDictionary = + _CFTimeZoneSetAbbreviationDictionaryPtr.asFunction< + void Function(CFDictionaryRef)>(); - int strlen( - ffi.Pointer __s, + CFTimeZoneRef CFTimeZoneCreate( + CFAllocatorRef allocator, + CFStringRef name, + CFDataRef data, ) { - return _strlen( - __s, + return _CFTimeZoneCreate( + allocator, + name, + data, ); } - late final _strlenPtr = _lookup< - ffi.NativeFunction)>>( - 'strlen'); - late final _strlen = - _strlenPtr.asFunction)>(); + late final _CFTimeZoneCreatePtr = _lookup< + ffi.NativeFunction< + CFTimeZoneRef Function( + CFAllocatorRef, CFStringRef, CFDataRef)>>('CFTimeZoneCreate'); + late final _CFTimeZoneCreate = _CFTimeZoneCreatePtr.asFunction< + CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); - ffi.Pointer strncat( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT( + CFAllocatorRef allocator, + double ti, ) { - return _strncat( - __s1, - __s2, - __n, + return _CFTimeZoneCreateWithTimeIntervalFromGMT( + allocator, + ti, ); } - late final _strncatPtr = _lookup< + late final _CFTimeZoneCreateWithTimeIntervalFromGMTPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strncat'); - late final _strncat = _strncatPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + CFTimeZoneRef Function(CFAllocatorRef, + CFTimeInterval)>>('CFTimeZoneCreateWithTimeIntervalFromGMT'); + late final _CFTimeZoneCreateWithTimeIntervalFromGMT = + _CFTimeZoneCreateWithTimeIntervalFromGMTPtr.asFunction< + CFTimeZoneRef Function(CFAllocatorRef, double)>(); - int strncmp( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + CFTimeZoneRef CFTimeZoneCreateWithName( + CFAllocatorRef allocator, + CFStringRef name, + int tryAbbrev, ) { - return _strncmp( - __s1, - __s2, - __n, + return _CFTimeZoneCreateWithName( + allocator, + name, + tryAbbrev, ); } - late final _strncmpPtr = _lookup< + late final _CFTimeZoneCreateWithNamePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('strncmp'); - late final _strncmp = _strncmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, + Boolean)>>('CFTimeZoneCreateWithName'); + late final _CFTimeZoneCreateWithName = _CFTimeZoneCreateWithNamePtr + .asFunction(); - ffi.Pointer strncpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + CFStringRef CFTimeZoneGetName( + CFTimeZoneRef tz, ) { - return _strncpy( - __dst, - __src, - __n, + return _CFTimeZoneGetName( + tz, ); } - late final _strncpyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strncpy'); - late final _strncpy = _strncpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _CFTimeZoneGetNamePtr = + _lookup>( + 'CFTimeZoneGetName'); + late final _CFTimeZoneGetName = + _CFTimeZoneGetNamePtr.asFunction(); - ffi.Pointer strpbrk( - ffi.Pointer __s, - ffi.Pointer __charset, + CFDataRef CFTimeZoneGetData( + CFTimeZoneRef tz, ) { - return _strpbrk( - __s, - __charset, + return _CFTimeZoneGetData( + tz, ); } - late final _strpbrkPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strpbrk'); - late final _strpbrk = _strpbrkPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _CFTimeZoneGetDataPtr = + _lookup>( + 'CFTimeZoneGetData'); + late final _CFTimeZoneGetData = + _CFTimeZoneGetDataPtr.asFunction(); - ffi.Pointer strrchr( - ffi.Pointer __s, - int __c, + double CFTimeZoneGetSecondsFromGMT( + CFTimeZoneRef tz, + double at, ) { - return _strrchr( - __s, - __c, + return _CFTimeZoneGetSecondsFromGMT( + tz, + at, ); } - late final _strrchrPtr = _lookup< + late final _CFTimeZoneGetSecondsFromGMTPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('strrchr'); - late final _strrchr = _strrchrPtr - .asFunction Function(ffi.Pointer, int)>(); + CFTimeInterval Function( + CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneGetSecondsFromGMT'); + late final _CFTimeZoneGetSecondsFromGMT = _CFTimeZoneGetSecondsFromGMTPtr + .asFunction(); - int strspn( - ffi.Pointer __s, - ffi.Pointer __charset, + CFStringRef CFTimeZoneCopyAbbreviation( + CFTimeZoneRef tz, + double at, ) { - return _strspn( - __s, - __charset, + return _CFTimeZoneCopyAbbreviation( + tz, + at, ); } - late final _strspnPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, ffi.Pointer)>>('strspn'); - late final _strspn = _strspnPtr - .asFunction, ffi.Pointer)>(); + late final _CFTimeZoneCopyAbbreviationPtr = _lookup< + ffi + .NativeFunction>( + 'CFTimeZoneCopyAbbreviation'); + late final _CFTimeZoneCopyAbbreviation = _CFTimeZoneCopyAbbreviationPtr + .asFunction(); - ffi.Pointer strstr( - ffi.Pointer __big, - ffi.Pointer __little, + int CFTimeZoneIsDaylightSavingTime( + CFTimeZoneRef tz, + double at, ) { - return _strstr( - __big, - __little, + return _CFTimeZoneIsDaylightSavingTime( + tz, + at, ); } - late final _strstrPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strstr'); - late final _strstr = _strstrPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _CFTimeZoneIsDaylightSavingTimePtr = _lookup< + ffi.NativeFunction>( + 'CFTimeZoneIsDaylightSavingTime'); + late final _CFTimeZoneIsDaylightSavingTime = + _CFTimeZoneIsDaylightSavingTimePtr.asFunction< + int Function(CFTimeZoneRef, double)>(); - ffi.Pointer strtok( - ffi.Pointer __str, - ffi.Pointer __sep, + double CFTimeZoneGetDaylightSavingTimeOffset( + CFTimeZoneRef tz, + double at, ) { - return _strtok( - __str, - __sep, + return _CFTimeZoneGetDaylightSavingTimeOffset( + tz, + at, ); } - late final _strtokPtr = _lookup< + late final _CFTimeZoneGetDaylightSavingTimeOffsetPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strtok'); - late final _strtok = _strtokPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + CFTimeInterval Function(CFTimeZoneRef, + CFAbsoluteTime)>>('CFTimeZoneGetDaylightSavingTimeOffset'); + late final _CFTimeZoneGetDaylightSavingTimeOffset = + _CFTimeZoneGetDaylightSavingTimeOffsetPtr.asFunction< + double Function(CFTimeZoneRef, double)>(); - int strxfrm( - ffi.Pointer __s1, - ffi.Pointer __s2, - int __n, + double CFTimeZoneGetNextDaylightSavingTimeTransition( + CFTimeZoneRef tz, + double at, ) { - return _strxfrm( - __s1, - __s2, - __n, + return _CFTimeZoneGetNextDaylightSavingTimeTransition( + tz, + at, ); } - late final _strxfrmPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strxfrm'); - late final _strxfrm = _strxfrmPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr = _lookup< + ffi.NativeFunction< + CFAbsoluteTime Function(CFTimeZoneRef, CFAbsoluteTime)>>( + 'CFTimeZoneGetNextDaylightSavingTimeTransition'); + late final _CFTimeZoneGetNextDaylightSavingTimeTransition = + _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr.asFunction< + double Function(CFTimeZoneRef, double)>(); - ffi.Pointer strtok_r( - ffi.Pointer __str, - ffi.Pointer __sep, - ffi.Pointer> __lasts, + CFStringRef CFTimeZoneCopyLocalizedName( + CFTimeZoneRef tz, + CFTimeZoneNameStyle style, + CFLocaleRef locale, ) { - return _strtok_r( - __str, - __sep, - __lasts, + return _CFTimeZoneCopyLocalizedName( + tz, + style.value, + locale, ); } - late final _strtok_rPtr = _lookup< + late final _CFTimeZoneCopyLocalizedNamePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('strtok_r'); - late final _strtok_r = _strtok_rPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); + CFStringRef Function(CFTimeZoneRef, CFIndex, + CFLocaleRef)>>('CFTimeZoneCopyLocalizedName'); + late final _CFTimeZoneCopyLocalizedName = _CFTimeZoneCopyLocalizedNamePtr + .asFunction(); - int strerror_r( - int __errnum, - ffi.Pointer __strerrbuf, - int __buflen, - ) { - return _strerror_r( - __errnum, - __strerrbuf, - __buflen, - ); + late final ffi.Pointer + _kCFTimeZoneSystemTimeZoneDidChangeNotification = + _lookup( + 'kCFTimeZoneSystemTimeZoneDidChangeNotification'); + + CFNotificationName get kCFTimeZoneSystemTimeZoneDidChangeNotification => + _kCFTimeZoneSystemTimeZoneDidChangeNotification.value; + + int CFCalendarGetTypeID() { + return _CFCalendarGetTypeID(); } - late final _strerror_rPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('strerror_r'); - late final _strerror_r = _strerror_rPtr - .asFunction, int)>(); + late final _CFCalendarGetTypeIDPtr = + _lookup>('CFCalendarGetTypeID'); + late final _CFCalendarGetTypeID = + _CFCalendarGetTypeIDPtr.asFunction(); - ffi.Pointer strdup( - ffi.Pointer __s1, - ) { - return _strdup( - __s1, - ); + CFCalendarRef CFCalendarCopyCurrent() { + return _CFCalendarCopyCurrent(); } - late final _strdupPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('strdup'); - late final _strdup = _strdupPtr - .asFunction Function(ffi.Pointer)>(); + late final _CFCalendarCopyCurrentPtr = + _lookup>( + 'CFCalendarCopyCurrent'); + late final _CFCalendarCopyCurrent = + _CFCalendarCopyCurrentPtr.asFunction(); - ffi.Pointer memccpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __c, - int __n, + CFCalendarRef CFCalendarCreateWithIdentifier( + CFAllocatorRef allocator, + CFCalendarIdentifier identifier, ) { - return _memccpy( - __dst, - __src, - __c, - __n, + return _CFCalendarCreateWithIdentifier( + allocator, + identifier, ); } - late final _memccpyPtr = _lookup< + late final _CFCalendarCreateWithIdentifierPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int, ffi.Size)>>('memccpy'); - late final _memccpy = _memccpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int, int)>(); + CFCalendarRef Function(CFAllocatorRef, + CFCalendarIdentifier)>>('CFCalendarCreateWithIdentifier'); + late final _CFCalendarCreateWithIdentifier = + _CFCalendarCreateWithIdentifierPtr.asFunction< + CFCalendarRef Function(CFAllocatorRef, CFCalendarIdentifier)>(); - ffi.Pointer stpcpy( - ffi.Pointer __dst, - ffi.Pointer __src, + CFCalendarIdentifier CFCalendarGetIdentifier( + CFCalendarRef calendar, ) { - return _stpcpy( - __dst, - __src, + return _CFCalendarGetIdentifier( + calendar, ); } - late final _stpcpyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('stpcpy'); - late final _stpcpy = _stpcpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _CFCalendarGetIdentifierPtr = + _lookup>( + 'CFCalendarGetIdentifier'); + late final _CFCalendarGetIdentifier = _CFCalendarGetIdentifierPtr.asFunction< + CFCalendarIdentifier Function(CFCalendarRef)>(); - ffi.Pointer stpncpy( - ffi.Pointer __dst, - ffi.Pointer __src, - int __n, + CFLocaleRef CFCalendarCopyLocale( + CFCalendarRef calendar, ) { - return _stpncpy( - __dst, - __src, - __n, + return _CFCalendarCopyLocale( + calendar, ); } - late final _stpncpyPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('stpncpy'); - late final _stpncpy = _stpncpyPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + late final _CFCalendarCopyLocalePtr = + _lookup>( + 'CFCalendarCopyLocale'); + late final _CFCalendarCopyLocale = _CFCalendarCopyLocalePtr.asFunction< + CFLocaleRef Function(CFCalendarRef)>(); - ffi.Pointer strndup( - ffi.Pointer __s1, - int __n, + void CFCalendarSetLocale( + CFCalendarRef calendar, + CFLocaleRef locale, ) { - return _strndup( - __s1, - __n, + return _CFCalendarSetLocale( + calendar, + locale, ); } - late final _strndupPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('strndup'); - late final _strndup = _strndupPtr - .asFunction Function(ffi.Pointer, int)>(); + late final _CFCalendarSetLocalePtr = _lookup< + ffi.NativeFunction>( + 'CFCalendarSetLocale'); + late final _CFCalendarSetLocale = _CFCalendarSetLocalePtr.asFunction< + void Function(CFCalendarRef, CFLocaleRef)>(); - int strnlen( - ffi.Pointer __s1, - int __n, + CFTimeZoneRef CFCalendarCopyTimeZone( + CFCalendarRef calendar, ) { - return _strnlen( - __s1, - __n, + return _CFCalendarCopyTimeZone( + calendar, ); } - late final _strnlenPtr = _lookup< - ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Size)>>('strnlen'); - late final _strnlen = - _strnlenPtr.asFunction, int)>(); + late final _CFCalendarCopyTimeZonePtr = + _lookup>( + 'CFCalendarCopyTimeZone'); + late final _CFCalendarCopyTimeZone = _CFCalendarCopyTimeZonePtr.asFunction< + CFTimeZoneRef Function(CFCalendarRef)>(); - ffi.Pointer strsignal( - int __sig, + void CFCalendarSetTimeZone( + CFCalendarRef calendar, + CFTimeZoneRef tz, ) { - return _strsignal( - __sig, + return _CFCalendarSetTimeZone( + calendar, + tz, ); } - late final _strsignalPtr = - _lookup Function(ffi.Int)>>( - 'strsignal'); - late final _strsignal = - _strsignalPtr.asFunction Function(int)>(); + late final _CFCalendarSetTimeZonePtr = _lookup< + ffi.NativeFunction>( + 'CFCalendarSetTimeZone'); + late final _CFCalendarSetTimeZone = _CFCalendarSetTimeZonePtr.asFunction< + void Function(CFCalendarRef, CFTimeZoneRef)>(); - int memset_s( - ffi.Pointer __s, - int __smax, - int __c, - int __n, + int CFCalendarGetFirstWeekday( + CFCalendarRef calendar, ) { - return _memset_s( - __s, - __smax, - __c, - __n, + return _CFCalendarGetFirstWeekday( + calendar, ); } - late final _memset_sPtr = _lookup< - ffi.NativeFunction< - errno_t Function( - ffi.Pointer, rsize_t, ffi.Int, rsize_t)>>('memset_s'); - late final _memset_s = _memset_sPtr - .asFunction, int, int, int)>(); + late final _CFCalendarGetFirstWeekdayPtr = + _lookup>( + 'CFCalendarGetFirstWeekday'); + late final _CFCalendarGetFirstWeekday = + _CFCalendarGetFirstWeekdayPtr.asFunction(); - ffi.Pointer memmem( - ffi.Pointer __big, - int __big_len, - ffi.Pointer __little, - int __little_len, + void CFCalendarSetFirstWeekday( + CFCalendarRef calendar, + int wkdy, ) { - return _memmem( - __big, - __big_len, - __little, - __little_len, + return _CFCalendarSetFirstWeekday( + calendar, + wkdy, ); } - late final _memmemPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Size, - ffi.Pointer, ffi.Size)>>('memmem'); - late final _memmem = _memmemPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, int, ffi.Pointer, int)>(); + late final _CFCalendarSetFirstWeekdayPtr = + _lookup>( + 'CFCalendarSetFirstWeekday'); + late final _CFCalendarSetFirstWeekday = _CFCalendarSetFirstWeekdayPtr + .asFunction(); - void memset_pattern4( - ffi.Pointer __b, - ffi.Pointer __pattern4, - int __len, + int CFCalendarGetMinimumDaysInFirstWeek( + CFCalendarRef calendar, ) { - return _memset_pattern4( - __b, - __pattern4, - __len, + return _CFCalendarGetMinimumDaysInFirstWeek( + calendar, ); } - late final _memset_pattern4Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memset_pattern4'); - late final _memset_pattern4 = _memset_pattern4Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _CFCalendarGetMinimumDaysInFirstWeekPtr = + _lookup>( + 'CFCalendarGetMinimumDaysInFirstWeek'); + late final _CFCalendarGetMinimumDaysInFirstWeek = + _CFCalendarGetMinimumDaysInFirstWeekPtr.asFunction< + int Function(CFCalendarRef)>(); - void memset_pattern8( - ffi.Pointer __b, - ffi.Pointer __pattern8, - int __len, + void CFCalendarSetMinimumDaysInFirstWeek( + CFCalendarRef calendar, + int mwd, ) { - return _memset_pattern8( - __b, - __pattern8, - __len, + return _CFCalendarSetMinimumDaysInFirstWeek( + calendar, + mwd, ); } - late final _memset_pattern8Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memset_pattern8'); - late final _memset_pattern8 = _memset_pattern8Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _CFCalendarSetMinimumDaysInFirstWeekPtr = + _lookup>( + 'CFCalendarSetMinimumDaysInFirstWeek'); + late final _CFCalendarSetMinimumDaysInFirstWeek = + _CFCalendarSetMinimumDaysInFirstWeekPtr.asFunction< + void Function(CFCalendarRef, int)>(); - void memset_pattern16( - ffi.Pointer __b, - ffi.Pointer __pattern16, - int __len, + CFRange CFCalendarGetMinimumRangeOfUnit( + CFCalendarRef calendar, + CFCalendarUnit unit, ) { - return _memset_pattern16( - __b, - __pattern16, - __len, + return _CFCalendarGetMinimumRangeOfUnit( + calendar, + unit.value, ); } - late final _memset_pattern16Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('memset_pattern16'); - late final _memset_pattern16 = _memset_pattern16Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _CFCalendarGetMinimumRangeOfUnitPtr = _lookup< + ffi.NativeFunction>( + 'CFCalendarGetMinimumRangeOfUnit'); + late final _CFCalendarGetMinimumRangeOfUnit = + _CFCalendarGetMinimumRangeOfUnitPtr.asFunction< + CFRange Function(CFCalendarRef, int)>(); - ffi.Pointer strcasestr( - ffi.Pointer __big, - ffi.Pointer __little, + CFRange CFCalendarGetMaximumRangeOfUnit( + CFCalendarRef calendar, + CFCalendarUnit unit, ) { - return _strcasestr( - __big, - __little, + return _CFCalendarGetMaximumRangeOfUnit( + calendar, + unit.value, ); } - late final _strcasestrPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('strcasestr'); - late final _strcasestr = _strcasestrPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _CFCalendarGetMaximumRangeOfUnitPtr = _lookup< + ffi.NativeFunction>( + 'CFCalendarGetMaximumRangeOfUnit'); + late final _CFCalendarGetMaximumRangeOfUnit = + _CFCalendarGetMaximumRangeOfUnitPtr.asFunction< + CFRange Function(CFCalendarRef, int)>(); - ffi.Pointer strnstr( - ffi.Pointer __big, - ffi.Pointer __little, - int __len, + CFRange CFCalendarGetRangeOfUnit( + CFCalendarRef calendar, + CFCalendarUnit smallerUnit, + CFCalendarUnit biggerUnit, + DartCFTimeInterval at, ) { - return _strnstr( - __big, - __little, - __len, + return _CFCalendarGetRangeOfUnit( + calendar, + smallerUnit.value, + biggerUnit.value, + at, ); } - late final _strnstrPtr = _lookup< + late final _CFCalendarGetRangeOfUnitPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strnstr'); - late final _strnstr = _strnstrPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); + CFRange Function(CFCalendarRef, CFOptionFlags, CFOptionFlags, + CFAbsoluteTime)>>('CFCalendarGetRangeOfUnit'); + late final _CFCalendarGetRangeOfUnit = _CFCalendarGetRangeOfUnitPtr + .asFunction(); - int strlcat( - ffi.Pointer __dst, - ffi.Pointer __source, - int __size, + DartCFIndex CFCalendarGetOrdinalityOfUnit( + CFCalendarRef calendar, + CFCalendarUnit smallerUnit, + CFCalendarUnit biggerUnit, + DartCFTimeInterval at, ) { - return _strlcat( - __dst, - __source, - __size, + return _CFCalendarGetOrdinalityOfUnit( + calendar, + smallerUnit.value, + biggerUnit.value, + at, ); } - late final _strlcatPtr = _lookup< + late final _CFCalendarGetOrdinalityOfUnitPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strlcat'); - late final _strlcat = _strlcatPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + CFIndex Function(CFCalendarRef, CFOptionFlags, CFOptionFlags, + CFAbsoluteTime)>>('CFCalendarGetOrdinalityOfUnit'); + late final _CFCalendarGetOrdinalityOfUnit = _CFCalendarGetOrdinalityOfUnitPtr + .asFunction(); - int strlcpy( - ffi.Pointer __dst, - ffi.Pointer __source, - int __size, + DartBoolean CFCalendarGetTimeRangeOfUnit( + CFCalendarRef calendar, + CFCalendarUnit unit, + DartCFTimeInterval at, + ffi.Pointer startp, + ffi.Pointer tip, ) { - return _strlcpy( - __dst, - __source, - __size, + return _CFCalendarGetTimeRangeOfUnit( + calendar, + unit.value, + at, + startp, + tip, ); } - late final _strlcpyPtr = _lookup< + late final _CFCalendarGetTimeRangeOfUnitPtr = _lookup< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Size)>>('strlcpy'); - late final _strlcpy = _strlcpyPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + Boolean Function( + CFCalendarRef, + CFOptionFlags, + CFAbsoluteTime, + ffi.Pointer, + ffi.Pointer)>>('CFCalendarGetTimeRangeOfUnit'); + late final _CFCalendarGetTimeRangeOfUnit = + _CFCalendarGetTimeRangeOfUnitPtr.asFunction< + int Function(CFCalendarRef, int, double, ffi.Pointer, + ffi.Pointer)>(); - void strmode( - int __mode, - ffi.Pointer __bp, + int CFCalendarComposeAbsoluteTime( + CFCalendarRef calendar, + ffi.Pointer at, + ffi.Pointer componentDesc, ) { - return _strmode( - __mode, - __bp, + return _CFCalendarComposeAbsoluteTime( + calendar, + at, + componentDesc, ); } - late final _strmodePtr = _lookup< + late final _CFCalendarComposeAbsoluteTimePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Int, ffi.Pointer)>>('strmode'); - late final _strmode = - _strmodePtr.asFunction)>(); + Boolean Function(CFCalendarRef, ffi.Pointer, + ffi.Pointer)>>('CFCalendarComposeAbsoluteTime'); + late final _CFCalendarComposeAbsoluteTime = + _CFCalendarComposeAbsoluteTimePtr.asFunction< + int Function(CFCalendarRef, ffi.Pointer, + ffi.Pointer)>(); - ffi.Pointer strsep( - ffi.Pointer> __stringp, - ffi.Pointer __delim, + int CFCalendarDecomposeAbsoluteTime( + CFCalendarRef calendar, + double at, + ffi.Pointer componentDesc, ) { - return _strsep( - __stringp, - __delim, + return _CFCalendarDecomposeAbsoluteTime( + calendar, + at, + componentDesc, ); } - late final _strsepPtr = _lookup< + late final _CFCalendarDecomposeAbsoluteTimePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer>, - ffi.Pointer)>>('strsep'); - late final _strsep = _strsepPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer>, ffi.Pointer)>(); + Boolean Function(CFCalendarRef, CFAbsoluteTime, + ffi.Pointer)>>('CFCalendarDecomposeAbsoluteTime'); + late final _CFCalendarDecomposeAbsoluteTime = + _CFCalendarDecomposeAbsoluteTimePtr.asFunction< + int Function(CFCalendarRef, double, ffi.Pointer)>(); - void swab( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int CFCalendarAddComponents( + CFCalendarRef calendar, + ffi.Pointer at, + int options, + ffi.Pointer componentDesc, ) { - return _swab( - arg0, - arg1, - arg2, + return _CFCalendarAddComponents( + calendar, + at, + options, + componentDesc, ); } - late final _swabPtr = _lookup< + late final _CFCalendarAddComponentsPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer, ssize_t)>>('swab'); - late final _swab = _swabPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + Boolean Function( + CFCalendarRef, + ffi.Pointer, + CFOptionFlags, + ffi.Pointer)>>('CFCalendarAddComponents'); + late final _CFCalendarAddComponents = _CFCalendarAddComponentsPtr.asFunction< + int Function(CFCalendarRef, ffi.Pointer, int, + ffi.Pointer)>(); - int timingsafe_bcmp( - ffi.Pointer __b1, - ffi.Pointer __b2, - int __len, + int CFCalendarGetComponentDifference( + CFCalendarRef calendar, + double startingAT, + double resultAT, + int options, + ffi.Pointer componentDesc, ) { - return _timingsafe_bcmp( - __b1, - __b2, - __len, + return _CFCalendarGetComponentDifference( + calendar, + startingAT, + resultAT, + options, + componentDesc, ); } - late final _timingsafe_bcmpPtr = _lookup< + late final _CFCalendarGetComponentDifferencePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('timingsafe_bcmp'); - late final _timingsafe_bcmp = _timingsafe_bcmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + Boolean Function( + CFCalendarRef, + CFAbsoluteTime, + CFAbsoluteTime, + CFOptionFlags, + ffi.Pointer)>>('CFCalendarGetComponentDifference'); + late final _CFCalendarGetComponentDifference = + _CFCalendarGetComponentDifferencePtr.asFunction< + int Function( + CFCalendarRef, double, double, int, ffi.Pointer)>(); - int strsignal_r( - int __sig, - ffi.Pointer __strsignalbuf, - int __buflen, + CFStringRef CFDateFormatterCreateDateFormatFromTemplate( + CFAllocatorRef allocator, + CFStringRef tmplate, + int options, + CFLocaleRef locale, ) { - return _strsignal_r( - __sig, - __strsignalbuf, - __buflen, + return _CFDateFormatterCreateDateFormatFromTemplate( + allocator, + tmplate, + options, + locale, ); } - late final _strsignal_rPtr = _lookup< + late final _CFDateFormatterCreateDateFormatFromTemplatePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('strsignal_r'); - late final _strsignal_r = _strsignal_rPtr - .asFunction, int)>(); + CFStringRef Function(CFAllocatorRef, CFStringRef, CFOptionFlags, + CFLocaleRef)>>('CFDateFormatterCreateDateFormatFromTemplate'); + late final _CFDateFormatterCreateDateFormatFromTemplate = + _CFDateFormatterCreateDateFormatFromTemplatePtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef, int, CFLocaleRef)>(); - int bcmp( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int CFDateFormatterGetTypeID() { + return _CFDateFormatterGetTypeID(); + } + + late final _CFDateFormatterGetTypeIDPtr = + _lookup>( + 'CFDateFormatterGetTypeID'); + late final _CFDateFormatterGetTypeID = + _CFDateFormatterGetTypeIDPtr.asFunction(); + + CFDateFormatterRef CFDateFormatterCreateISO8601Formatter( + CFAllocatorRef allocator, + CFISO8601DateFormatOptions formatOptions, ) { - return _bcmp( - arg0, - arg1, - arg2, + return _CFDateFormatterCreateISO8601Formatter( + allocator, + formatOptions.value, ); } - late final _bcmpPtr = _lookup< + late final _CFDateFormatterCreateISO8601FormatterPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Size)>>('bcmp'); - late final _bcmp = _bcmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + CFDateFormatterRef Function(CFAllocatorRef, + CFOptionFlags)>>('CFDateFormatterCreateISO8601Formatter'); + late final _CFDateFormatterCreateISO8601Formatter = + _CFDateFormatterCreateISO8601FormatterPtr.asFunction< + CFDateFormatterRef Function(CFAllocatorRef, int)>(); - void bcopy( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + CFDateFormatterRef CFDateFormatterCreate( + CFAllocatorRef allocator, + CFLocaleRef locale, + CFDateFormatterStyle dateStyle, + CFDateFormatterStyle timeStyle, ) { - return _bcopy( - arg0, - arg1, - arg2, + return _CFDateFormatterCreate( + allocator, + locale, + dateStyle.value, + timeStyle.value, ); } - late final _bcopyPtr = _lookup< + late final _CFDateFormatterCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('bcopy'); - late final _bcopy = _bcopyPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); + CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, CFIndex, + CFIndex)>>('CFDateFormatterCreate'); + late final _CFDateFormatterCreate = _CFDateFormatterCreatePtr.asFunction< + CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, int, int)>(); - void bzero( - ffi.Pointer arg0, - int arg1, + CFLocaleRef CFDateFormatterGetLocale( + CFDateFormatterRef formatter, ) { - return _bzero( - arg0, - arg1, + return _CFDateFormatterGetLocale( + formatter, ); } - late final _bzeroPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Size)>>('bzero'); - late final _bzero = - _bzeroPtr.asFunction, int)>(); + late final _CFDateFormatterGetLocalePtr = + _lookup>( + 'CFDateFormatterGetLocale'); + late final _CFDateFormatterGetLocale = _CFDateFormatterGetLocalePtr + .asFunction(); - ffi.Pointer index( - ffi.Pointer arg0, - int arg1, + CFDateFormatterStyle CFDateFormatterGetDateStyle( + CFDateFormatterRef formatter, ) { - return _index( - arg0, - arg1, - ); + return CFDateFormatterStyle.fromValue(_CFDateFormatterGetDateStyle( + formatter, + )); } - late final _indexPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('index'); - late final _index = _indexPtr - .asFunction Function(ffi.Pointer, int)>(); + late final _CFDateFormatterGetDateStylePtr = + _lookup>( + 'CFDateFormatterGetDateStyle'); + late final _CFDateFormatterGetDateStyle = _CFDateFormatterGetDateStylePtr + .asFunction(); - ffi.Pointer rindex( - ffi.Pointer arg0, - int arg1, + CFDateFormatterStyle CFDateFormatterGetTimeStyle( + CFDateFormatterRef formatter, ) { - return _rindex( - arg0, - arg1, - ); + return CFDateFormatterStyle.fromValue(_CFDateFormatterGetTimeStyle( + formatter, + )); } - late final _rindexPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Int)>>('rindex'); - late final _rindex = _rindexPtr - .asFunction Function(ffi.Pointer, int)>(); + late final _CFDateFormatterGetTimeStylePtr = + _lookup>( + 'CFDateFormatterGetTimeStyle'); + late final _CFDateFormatterGetTimeStyle = _CFDateFormatterGetTimeStylePtr + .asFunction(); - int ffs( - int arg0, + CFStringRef CFDateFormatterGetFormat( + CFDateFormatterRef formatter, ) { - return _ffs( - arg0, + return _CFDateFormatterGetFormat( + formatter, ); } - late final _ffsPtr = - _lookup>('ffs'); - late final _ffs = _ffsPtr.asFunction(); + late final _CFDateFormatterGetFormatPtr = + _lookup>( + 'CFDateFormatterGetFormat'); + late final _CFDateFormatterGetFormat = _CFDateFormatterGetFormatPtr + .asFunction(); - int strcasecmp( - ffi.Pointer arg0, - ffi.Pointer arg1, + void CFDateFormatterSetFormat( + CFDateFormatterRef formatter, + CFStringRef formatString, ) { - return _strcasecmp( - arg0, - arg1, + return _CFDateFormatterSetFormat( + formatter, + formatString, ); } - late final _strcasecmpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('strcasecmp'); - late final _strcasecmp = _strcasecmpPtr - .asFunction, ffi.Pointer)>(); + late final _CFDateFormatterSetFormatPtr = _lookup< + ffi + .NativeFunction>( + 'CFDateFormatterSetFormat'); + late final _CFDateFormatterSetFormat = _CFDateFormatterSetFormatPtr + .asFunction(); - int strncasecmp( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + CFStringRef CFDateFormatterCreateStringWithDate( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + CFDateRef date, ) { - return _strncasecmp( - arg0, - arg1, - arg2, + return _CFDateFormatterCreateStringWithDate( + allocator, + formatter, + date, ); } - late final _strncasecmpPtr = _lookup< + late final _CFDateFormatterCreateStringWithDatePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('strncasecmp'); - late final _strncasecmp = _strncasecmpPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, + CFDateRef)>>('CFDateFormatterCreateStringWithDate'); + late final _CFDateFormatterCreateStringWithDate = + _CFDateFormatterCreateStringWithDatePtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFDateFormatterRef, CFDateRef)>(); - int ffsl( - int arg0, + CFStringRef CFDateFormatterCreateStringWithAbsoluteTime( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + double at, ) { - return _ffsl( - arg0, + return _CFDateFormatterCreateStringWithAbsoluteTime( + allocator, + formatter, + at, ); } - late final _ffslPtr = - _lookup>('ffsl'); - late final _ffsl = _ffslPtr.asFunction(); + late final _CFDateFormatterCreateStringWithAbsoluteTimePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, + CFAbsoluteTime)>>('CFDateFormatterCreateStringWithAbsoluteTime'); + late final _CFDateFormatterCreateStringWithAbsoluteTime = + _CFDateFormatterCreateStringWithAbsoluteTimePtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, double)>(); - int ffsll( - int arg0, + CFDateRef CFDateFormatterCreateDateFromString( + CFAllocatorRef allocator, + CFDateFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, ) { - return _ffsll( - arg0, + return _CFDateFormatterCreateDateFromString( + allocator, + formatter, + string, + rangep, ); } - late final _ffsllPtr = - _lookup>('ffsll'); - late final _ffsll = _ffsllPtr.asFunction(); + late final _CFDateFormatterCreateDateFromStringPtr = _lookup< + ffi.NativeFunction< + CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, + ffi.Pointer)>>('CFDateFormatterCreateDateFromString'); + late final _CFDateFormatterCreateDateFromString = + _CFDateFormatterCreateDateFromStringPtr.asFunction< + CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, + ffi.Pointer)>(); - int fls( - int arg0, + int CFDateFormatterGetAbsoluteTimeFromString( + CFDateFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + ffi.Pointer atp, ) { - return _fls( - arg0, + return _CFDateFormatterGetAbsoluteTimeFromString( + formatter, + string, + rangep, + atp, ); } - late final _flsPtr = - _lookup>('fls'); - late final _fls = _flsPtr.asFunction(); + late final _CFDateFormatterGetAbsoluteTimeFromStringPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFDateFormatterRef, CFStringRef, + ffi.Pointer, ffi.Pointer)>>( + 'CFDateFormatterGetAbsoluteTimeFromString'); + late final _CFDateFormatterGetAbsoluteTimeFromString = + _CFDateFormatterGetAbsoluteTimeFromStringPtr.asFunction< + int Function(CFDateFormatterRef, CFStringRef, ffi.Pointer, + ffi.Pointer)>(); - int flsl( - int arg0, + void CFDateFormatterSetProperty( + CFDateFormatterRef formatter, + CFStringRef key, + CFTypeRef value, ) { - return _flsl( - arg0, + return _CFDateFormatterSetProperty( + formatter, + key, + value, ); } - late final _flslPtr = - _lookup>('flsl'); - late final _flsl = _flslPtr.asFunction(); + late final _CFDateFormatterSetPropertyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFDateFormatterRef, CFStringRef, + CFTypeRef)>>('CFDateFormatterSetProperty'); + late final _CFDateFormatterSetProperty = _CFDateFormatterSetPropertyPtr + .asFunction(); - int flsll( - int arg0, + CFTypeRef CFDateFormatterCopyProperty( + CFDateFormatterRef formatter, + CFDateFormatterKey key, ) { - return _flsll( - arg0, + return _CFDateFormatterCopyProperty( + formatter, + key, ); } - late final _flsllPtr = - _lookup>('flsll'); - late final _flsll = _flsllPtr.asFunction(); + late final _CFDateFormatterCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFDateFormatterRef, + CFDateFormatterKey)>>('CFDateFormatterCopyProperty'); + late final _CFDateFormatterCopyProperty = _CFDateFormatterCopyPropertyPtr + .asFunction(); - late final ffi.Pointer>> _tzname = - _lookup>>('tzname'); + late final ffi.Pointer _kCFDateFormatterIsLenient = + _lookup('kCFDateFormatterIsLenient'); - ffi.Pointer> get tzname => _tzname.value; + CFDateFormatterKey get kCFDateFormatterIsLenient => + _kCFDateFormatterIsLenient.value; - set tzname(ffi.Pointer> value) => _tzname.value = value; + late final ffi.Pointer _kCFDateFormatterTimeZone = + _lookup('kCFDateFormatterTimeZone'); - late final ffi.Pointer _getdate_err = - _lookup('getdate_err'); + CFDateFormatterKey get kCFDateFormatterTimeZone => + _kCFDateFormatterTimeZone.value; - int get getdate_err => _getdate_err.value; + late final ffi.Pointer _kCFDateFormatterCalendarName = + _lookup('kCFDateFormatterCalendarName'); - set getdate_err(int value) => _getdate_err.value = value; + CFDateFormatterKey get kCFDateFormatterCalendarName => + _kCFDateFormatterCalendarName.value; - late final ffi.Pointer _timezone = _lookup('timezone'); + late final ffi.Pointer _kCFDateFormatterDefaultFormat = + _lookup('kCFDateFormatterDefaultFormat'); - int get timezone => _timezone.value; + CFDateFormatterKey get kCFDateFormatterDefaultFormat => + _kCFDateFormatterDefaultFormat.value; - set timezone(int value) => _timezone.value = value; + late final ffi.Pointer + _kCFDateFormatterTwoDigitStartDate = + _lookup('kCFDateFormatterTwoDigitStartDate'); - late final ffi.Pointer _daylight = _lookup('daylight'); + CFDateFormatterKey get kCFDateFormatterTwoDigitStartDate => + _kCFDateFormatterTwoDigitStartDate.value; - int get daylight => _daylight.value; + late final ffi.Pointer _kCFDateFormatterDefaultDate = + _lookup('kCFDateFormatterDefaultDate'); - set daylight(int value) => _daylight.value = value; + CFDateFormatterKey get kCFDateFormatterDefaultDate => + _kCFDateFormatterDefaultDate.value; - ffi.Pointer asctime( - ffi.Pointer arg0, - ) { - return _asctime( - arg0, - ); - } + late final ffi.Pointer _kCFDateFormatterCalendar = + _lookup('kCFDateFormatterCalendar'); - late final _asctimePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'asctime'); - late final _asctime = - _asctimePtr.asFunction Function(ffi.Pointer)>(); + CFDateFormatterKey get kCFDateFormatterCalendar => + _kCFDateFormatterCalendar.value; - int clock() { - return _clock(); - } + late final ffi.Pointer _kCFDateFormatterEraSymbols = + _lookup('kCFDateFormatterEraSymbols'); - late final _clockPtr = - _lookup>('clock'); - late final _clock = _clockPtr.asFunction(); + CFDateFormatterKey get kCFDateFormatterEraSymbols => + _kCFDateFormatterEraSymbols.value; - ffi.Pointer ctime( - ffi.Pointer arg0, - ) { - return _ctime( - arg0, - ); - } + late final ffi.Pointer _kCFDateFormatterMonthSymbols = + _lookup('kCFDateFormatterMonthSymbols'); - late final _ctimePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('ctime'); - late final _ctime = _ctimePtr - .asFunction Function(ffi.Pointer)>(); + CFDateFormatterKey get kCFDateFormatterMonthSymbols => + _kCFDateFormatterMonthSymbols.value; - double difftime( - int arg0, - int arg1, - ) { - return _difftime( - arg0, - arg1, - ); - } + late final ffi.Pointer + _kCFDateFormatterShortMonthSymbols = + _lookup('kCFDateFormatterShortMonthSymbols'); - late final _difftimePtr = - _lookup>( - 'difftime'); - late final _difftime = _difftimePtr.asFunction(); + CFDateFormatterKey get kCFDateFormatterShortMonthSymbols => + _kCFDateFormatterShortMonthSymbols.value; - ffi.Pointer getdate( - ffi.Pointer arg0, - ) { - return _getdate( - arg0, - ); - } + late final ffi.Pointer _kCFDateFormatterWeekdaySymbols = + _lookup('kCFDateFormatterWeekdaySymbols'); - late final _getdatePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'getdate'); - late final _getdate = - _getdatePtr.asFunction Function(ffi.Pointer)>(); + CFDateFormatterKey get kCFDateFormatterWeekdaySymbols => + _kCFDateFormatterWeekdaySymbols.value; - ffi.Pointer gmtime( - ffi.Pointer arg0, - ) { - return _gmtime( - arg0, - ); - } + late final ffi.Pointer + _kCFDateFormatterShortWeekdaySymbols = + _lookup('kCFDateFormatterShortWeekdaySymbols'); - late final _gmtimePtr = _lookup< - ffi - .NativeFunction Function(ffi.Pointer)>>('gmtime'); - late final _gmtime = - _gmtimePtr.asFunction Function(ffi.Pointer)>(); + CFDateFormatterKey get kCFDateFormatterShortWeekdaySymbols => + _kCFDateFormatterShortWeekdaySymbols.value; - ffi.Pointer localtime( - ffi.Pointer arg0, - ) { - return _localtime( - arg0, - ); - } + late final ffi.Pointer _kCFDateFormatterAMSymbol = + _lookup('kCFDateFormatterAMSymbol'); - late final _localtimePtr = _lookup< - ffi.NativeFunction Function(ffi.Pointer)>>( - 'localtime'); - late final _localtime = - _localtimePtr.asFunction Function(ffi.Pointer)>(); + CFDateFormatterKey get kCFDateFormatterAMSymbol => + _kCFDateFormatterAMSymbol.value; - int mktime( - ffi.Pointer arg0, - ) { - return _mktime( - arg0, - ); - } + late final ffi.Pointer _kCFDateFormatterPMSymbol = + _lookup('kCFDateFormatterPMSymbol'); - late final _mktimePtr = - _lookup)>>('mktime'); - late final _mktime = _mktimePtr.asFunction)>(); + CFDateFormatterKey get kCFDateFormatterPMSymbol => + _kCFDateFormatterPMSymbol.value; - int strftime( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ) { - return _strftime( - arg0, - arg1, - arg2, - arg3, - ); - } + late final ffi.Pointer _kCFDateFormatterLongEraSymbols = + _lookup('kCFDateFormatterLongEraSymbols'); - late final _strftimePtr = _lookup< - ffi.NativeFunction< - ffi.Size Function(ffi.Pointer, ffi.Size, - ffi.Pointer, ffi.Pointer)>>('strftime'); - late final _strftime = _strftimePtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, - ffi.Pointer)>(); + CFDateFormatterKey get kCFDateFormatterLongEraSymbols => + _kCFDateFormatterLongEraSymbols.value; - ffi.Pointer strptime( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ) { - return _strptime( - arg0, - arg1, - arg2, - ); - } + late final ffi.Pointer + _kCFDateFormatterVeryShortMonthSymbols = + _lookup('kCFDateFormatterVeryShortMonthSymbols'); - late final _strptimePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('strptime'); - late final _strptime = _strptimePtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + CFDateFormatterKey get kCFDateFormatterVeryShortMonthSymbols => + _kCFDateFormatterVeryShortMonthSymbols.value; - int time( - ffi.Pointer arg0, - ) { - return _time( - arg0, - ); - } + late final ffi.Pointer + _kCFDateFormatterStandaloneMonthSymbols = + _lookup('kCFDateFormatterStandaloneMonthSymbols'); - late final _timePtr = - _lookup)>>('time'); - late final _time = _timePtr.asFunction)>(); + CFDateFormatterKey get kCFDateFormatterStandaloneMonthSymbols => + _kCFDateFormatterStandaloneMonthSymbols.value; - void tzset() { - return _tzset(); - } + late final ffi.Pointer + _kCFDateFormatterShortStandaloneMonthSymbols = + _lookup( + 'kCFDateFormatterShortStandaloneMonthSymbols'); - late final _tzsetPtr = - _lookup>('tzset'); - late final _tzset = _tzsetPtr.asFunction(); + CFDateFormatterKey get kCFDateFormatterShortStandaloneMonthSymbols => + _kCFDateFormatterShortStandaloneMonthSymbols.value; - ffi.Pointer asctime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return _asctime_r( - arg0, - arg1, - ); - } + late final ffi.Pointer + _kCFDateFormatterVeryShortStandaloneMonthSymbols = + _lookup( + 'kCFDateFormatterVeryShortStandaloneMonthSymbols'); - late final _asctime_rPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('asctime_r'); - late final _asctime_r = _asctime_rPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); + CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneMonthSymbols => + _kCFDateFormatterVeryShortStandaloneMonthSymbols.value; - ffi.Pointer ctime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return _ctime_r( - arg0, - arg1, - ); - } + late final ffi.Pointer + _kCFDateFormatterVeryShortWeekdaySymbols = + _lookup('kCFDateFormatterVeryShortWeekdaySymbols'); - late final _ctime_rPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('ctime_r'); - late final _ctime_r = _ctime_rPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + CFDateFormatterKey get kCFDateFormatterVeryShortWeekdaySymbols => + _kCFDateFormatterVeryShortWeekdaySymbols.value; - ffi.Pointer gmtime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return _gmtime_r( - arg0, - arg1, - ); - } + late final ffi.Pointer + _kCFDateFormatterStandaloneWeekdaySymbols = + _lookup('kCFDateFormatterStandaloneWeekdaySymbols'); - late final _gmtime_rPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('gmtime_r'); - late final _gmtime_r = _gmtime_rPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); + CFDateFormatterKey get kCFDateFormatterStandaloneWeekdaySymbols => + _kCFDateFormatterStandaloneWeekdaySymbols.value; - ffi.Pointer localtime_r( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return _localtime_r( - arg0, - arg1, - ); - } + late final ffi.Pointer + _kCFDateFormatterShortStandaloneWeekdaySymbols = + _lookup( + 'kCFDateFormatterShortStandaloneWeekdaySymbols'); - late final _localtime_rPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('localtime_r'); - late final _localtime_r = _localtime_rPtr.asFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>(); + CFDateFormatterKey get kCFDateFormatterShortStandaloneWeekdaySymbols => + _kCFDateFormatterShortStandaloneWeekdaySymbols.value; - int posix2time( - int arg0, - ) { - return _posix2time( - arg0, - ); - } + late final ffi.Pointer + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols = + _lookup( + 'kCFDateFormatterVeryShortStandaloneWeekdaySymbols'); - late final _posix2timePtr = - _lookup>('posix2time'); - late final _posix2time = _posix2timePtr.asFunction(); + CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneWeekdaySymbols => + _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value; - void tzsetwall() { - return _tzsetwall(); - } + late final ffi.Pointer _kCFDateFormatterQuarterSymbols = + _lookup('kCFDateFormatterQuarterSymbols'); - late final _tzsetwallPtr = - _lookup>('tzsetwall'); - late final _tzsetwall = _tzsetwallPtr.asFunction(); + CFDateFormatterKey get kCFDateFormatterQuarterSymbols => + _kCFDateFormatterQuarterSymbols.value; - int time2posix( - int arg0, - ) { - return _time2posix( - arg0, - ); + late final ffi.Pointer + _kCFDateFormatterShortQuarterSymbols = + _lookup('kCFDateFormatterShortQuarterSymbols'); + + CFDateFormatterKey get kCFDateFormatterShortQuarterSymbols => + _kCFDateFormatterShortQuarterSymbols.value; + + late final ffi.Pointer + _kCFDateFormatterStandaloneQuarterSymbols = + _lookup('kCFDateFormatterStandaloneQuarterSymbols'); + + CFDateFormatterKey get kCFDateFormatterStandaloneQuarterSymbols => + _kCFDateFormatterStandaloneQuarterSymbols.value; + + late final ffi.Pointer + _kCFDateFormatterShortStandaloneQuarterSymbols = + _lookup( + 'kCFDateFormatterShortStandaloneQuarterSymbols'); + + CFDateFormatterKey get kCFDateFormatterShortStandaloneQuarterSymbols => + _kCFDateFormatterShortStandaloneQuarterSymbols.value; + + late final ffi.Pointer + _kCFDateFormatterGregorianStartDate = + _lookup('kCFDateFormatterGregorianStartDate'); + + CFDateFormatterKey get kCFDateFormatterGregorianStartDate => + _kCFDateFormatterGregorianStartDate.value; + + late final ffi.Pointer + _kCFDateFormatterDoesRelativeDateFormattingKey = + _lookup( + 'kCFDateFormatterDoesRelativeDateFormattingKey'); + + CFDateFormatterKey get kCFDateFormatterDoesRelativeDateFormattingKey => + _kCFDateFormatterDoesRelativeDateFormattingKey.value; + + late final ffi.Pointer _kCFBooleanTrue = + _lookup('kCFBooleanTrue'); + + CFBooleanRef get kCFBooleanTrue => _kCFBooleanTrue.value; + + late final ffi.Pointer _kCFBooleanFalse = + _lookup('kCFBooleanFalse'); + + CFBooleanRef get kCFBooleanFalse => _kCFBooleanFalse.value; + + int CFBooleanGetTypeID() { + return _CFBooleanGetTypeID(); } - late final _time2posixPtr = - _lookup>('time2posix'); - late final _time2posix = _time2posixPtr.asFunction(); + late final _CFBooleanGetTypeIDPtr = + _lookup>('CFBooleanGetTypeID'); + late final _CFBooleanGetTypeID = + _CFBooleanGetTypeIDPtr.asFunction(); - int timelocal( - ffi.Pointer arg0, + int CFBooleanGetValue( + CFBooleanRef boolean, ) { - return _timelocal( - arg0, + return _CFBooleanGetValue( + boolean, ); } - late final _timelocalPtr = - _lookup)>>( - 'timelocal'); - late final _timelocal = - _timelocalPtr.asFunction)>(); + late final _CFBooleanGetValuePtr = + _lookup>( + 'CFBooleanGetValue'); + late final _CFBooleanGetValue = + _CFBooleanGetValuePtr.asFunction(); - int timegm( - ffi.Pointer arg0, - ) { - return _timegm( - arg0, - ); + late final ffi.Pointer _kCFNumberPositiveInfinity = + _lookup('kCFNumberPositiveInfinity'); + + CFNumberRef get kCFNumberPositiveInfinity => _kCFNumberPositiveInfinity.value; + + late final ffi.Pointer _kCFNumberNegativeInfinity = + _lookup('kCFNumberNegativeInfinity'); + + CFNumberRef get kCFNumberNegativeInfinity => _kCFNumberNegativeInfinity.value; + + late final ffi.Pointer _kCFNumberNaN = + _lookup('kCFNumberNaN'); + + CFNumberRef get kCFNumberNaN => _kCFNumberNaN.value; + + int CFNumberGetTypeID() { + return _CFNumberGetTypeID(); } - late final _timegmPtr = - _lookup)>>('timegm'); - late final _timegm = _timegmPtr.asFunction)>(); + late final _CFNumberGetTypeIDPtr = + _lookup>('CFNumberGetTypeID'); + late final _CFNumberGetTypeID = + _CFNumberGetTypeIDPtr.asFunction(); - int nanosleep( - ffi.Pointer __rqtp, - ffi.Pointer __rmtp, + CFNumberRef CFNumberCreate( + CFAllocatorRef allocator, + CFNumberType theType, + ffi.Pointer valuePtr, ) { - return _nanosleep( - __rqtp, - __rmtp, + return _CFNumberCreate( + allocator, + theType.value, + valuePtr, ); } - late final _nanosleepPtr = _lookup< + late final _CFNumberCreatePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('nanosleep'); - late final _nanosleep = _nanosleepPtr - .asFunction, ffi.Pointer)>(); + CFNumberRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFNumberCreate'); + late final _CFNumberCreate = _CFNumberCreatePtr.asFunction< + CFNumberRef Function(CFAllocatorRef, int, ffi.Pointer)>(); - int clock_getres( - int __clock_id, - ffi.Pointer __res, + CFNumberType CFNumberGetType( + CFNumberRef number, ) { - return _clock_getres( - __clock_id, - __res, - ); + return CFNumberType.fromValue(_CFNumberGetType( + number, + )); } - late final _clock_getresPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_getres'); - late final _clock_getres = - _clock_getresPtr.asFunction)>(); + late final _CFNumberGetTypePtr = + _lookup>( + 'CFNumberGetType'); + late final _CFNumberGetType = + _CFNumberGetTypePtr.asFunction(); - int clock_gettime( - int __clock_id, - ffi.Pointer __tp, + int CFNumberGetByteSize( + CFNumberRef number, ) { - return _clock_gettime( - __clock_id, - __tp, + return _CFNumberGetByteSize( + number, ); } - late final _clock_gettimePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_gettime'); - late final _clock_gettime = - _clock_gettimePtr.asFunction)>(); + late final _CFNumberGetByteSizePtr = + _lookup>( + 'CFNumberGetByteSize'); + late final _CFNumberGetByteSize = + _CFNumberGetByteSizePtr.asFunction(); - int clock_gettime_nsec_np( - int __clock_id, + int CFNumberIsFloatType( + CFNumberRef number, ) { - return _clock_gettime_nsec_np( - __clock_id, + return _CFNumberIsFloatType( + number, ); } - late final _clock_gettime_nsec_npPtr = - _lookup>( - 'clock_gettime_nsec_np'); - late final _clock_gettime_nsec_np = - _clock_gettime_nsec_npPtr.asFunction(); + late final _CFNumberIsFloatTypePtr = + _lookup>( + 'CFNumberIsFloatType'); + late final _CFNumberIsFloatType = + _CFNumberIsFloatTypePtr.asFunction(); - int clock_settime( - int __clock_id, - ffi.Pointer __tp, + DartBoolean CFNumberGetValue( + CFNumberRef number, + CFNumberType theType, + ffi.Pointer valuePtr, ) { - return _clock_settime( - __clock_id, - __tp, + return _CFNumberGetValue( + number, + theType.value, + valuePtr, ); } - late final _clock_settimePtr = _lookup< + late final _CFNumberGetValuePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int32, ffi.Pointer)>>('clock_settime'); - late final _clock_settime = - _clock_settimePtr.asFunction)>(); + Boolean Function(CFNumberRef, CFIndex, + ffi.Pointer)>>('CFNumberGetValue'); + late final _CFNumberGetValue = _CFNumberGetValuePtr.asFunction< + int Function(CFNumberRef, int, ffi.Pointer)>(); - int timespec_get( - ffi.Pointer ts, - int base, + CFComparisonResult CFNumberCompare( + CFNumberRef number, + CFNumberRef otherNumber, + ffi.Pointer context, ) { - return _timespec_get( - ts, - base, - ); + return CFComparisonResult.fromValue(_CFNumberCompare( + number, + otherNumber, + context, + )); } - late final _timespec_getPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'timespec_get'); - late final _timespec_get = - _timespec_getPtr.asFunction, int)>(); + late final _CFNumberComparePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFNumberRef, CFNumberRef, + ffi.Pointer)>>('CFNumberCompare'); + late final _CFNumberCompare = _CFNumberComparePtr.asFunction< + int Function(CFNumberRef, CFNumberRef, ffi.Pointer)>(); - int imaxabs( - int j, - ) { - return _imaxabs( - j, - ); + int CFNumberFormatterGetTypeID() { + return _CFNumberFormatterGetTypeID(); } - late final _imaxabsPtr = - _lookup>('imaxabs'); - late final _imaxabs = _imaxabsPtr.asFunction(); + late final _CFNumberFormatterGetTypeIDPtr = + _lookup>( + 'CFNumberFormatterGetTypeID'); + late final _CFNumberFormatterGetTypeID = + _CFNumberFormatterGetTypeIDPtr.asFunction(); - imaxdiv_t imaxdiv( - int __numer, - int __denom, + CFNumberFormatterRef CFNumberFormatterCreate( + CFAllocatorRef allocator, + CFLocaleRef locale, + CFNumberFormatterStyle style, ) { - return _imaxdiv( - __numer, - __denom, + return _CFNumberFormatterCreate( + allocator, + locale, + style.value, ); } - late final _imaxdivPtr = - _lookup>( - 'imaxdiv'); - late final _imaxdiv = _imaxdivPtr.asFunction(); + late final _CFNumberFormatterCreatePtr = _lookup< + ffi.NativeFunction< + CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, + CFIndex)>>('CFNumberFormatterCreate'); + late final _CFNumberFormatterCreate = _CFNumberFormatterCreatePtr.asFunction< + CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, int)>(); - int strtoimax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + CFLocaleRef CFNumberFormatterGetLocale( + CFNumberFormatterRef formatter, ) { - return _strtoimax( - __nptr, - __endptr, - __base, + return _CFNumberFormatterGetLocale( + formatter, ); } - late final _strtoimaxPtr = _lookup< - ffi.NativeFunction< - intmax_t Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoimax'); - late final _strtoimax = _strtoimaxPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + late final _CFNumberFormatterGetLocalePtr = + _lookup>( + 'CFNumberFormatterGetLocale'); + late final _CFNumberFormatterGetLocale = _CFNumberFormatterGetLocalePtr + .asFunction(); - int strtoumax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + CFNumberFormatterStyle CFNumberFormatterGetStyle( + CFNumberFormatterRef formatter, ) { - return _strtoumax( - __nptr, - __endptr, - __base, - ); + return CFNumberFormatterStyle.fromValue(_CFNumberFormatterGetStyle( + formatter, + )); } - late final _strtoumaxPtr = _lookup< - ffi.NativeFunction< - uintmax_t Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('strtoumax'); - late final _strtoumax = _strtoumaxPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + late final _CFNumberFormatterGetStylePtr = + _lookup>( + 'CFNumberFormatterGetStyle'); + late final _CFNumberFormatterGetStyle = _CFNumberFormatterGetStylePtr + .asFunction(); - int wcstoimax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + CFStringRef CFNumberFormatterGetFormat( + CFNumberFormatterRef formatter, ) { - return _wcstoimax( - __nptr, - __endptr, - __base, + return _CFNumberFormatterGetFormat( + formatter, ); } - late final _wcstoimaxPtr = _lookup< - ffi.NativeFunction< - intmax_t Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('wcstoimax'); - late final _wcstoimax = _wcstoimaxPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); + late final _CFNumberFormatterGetFormatPtr = + _lookup>( + 'CFNumberFormatterGetFormat'); + late final _CFNumberFormatterGetFormat = _CFNumberFormatterGetFormatPtr + .asFunction(); - int wcstoumax( - ffi.Pointer __nptr, - ffi.Pointer> __endptr, - int __base, + void CFNumberFormatterSetFormat( + CFNumberFormatterRef formatter, + CFStringRef formatString, ) { - return _wcstoumax( - __nptr, - __endptr, - __base, + return _CFNumberFormatterSetFormat( + formatter, + formatString, ); } - late final _wcstoumaxPtr = _lookup< + late final _CFNumberFormatterSetFormatPtr = _lookup< ffi.NativeFunction< - uintmax_t Function(ffi.Pointer, - ffi.Pointer>, ffi.Int)>>('wcstoumax'); - late final _wcstoumax = _wcstoumaxPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>, int)>(); - - late final ffi.Pointer _kCFTypeBagCallBacks = - _lookup('kCFTypeBagCallBacks'); - - CFBagCallBacks get kCFTypeBagCallBacks => _kCFTypeBagCallBacks.ref; - - late final ffi.Pointer _kCFCopyStringBagCallBacks = - _lookup('kCFCopyStringBagCallBacks'); - - CFBagCallBacks get kCFCopyStringBagCallBacks => - _kCFCopyStringBagCallBacks.ref; - - int CFBagGetTypeID() { - return _CFBagGetTypeID(); - } - - late final _CFBagGetTypeIDPtr = - _lookup>('CFBagGetTypeID'); - late final _CFBagGetTypeID = _CFBagGetTypeIDPtr.asFunction(); + ffi.Void Function(CFNumberFormatterRef, + CFStringRef)>>('CFNumberFormatterSetFormat'); + late final _CFNumberFormatterSetFormat = _CFNumberFormatterSetFormatPtr + .asFunction(); - CFBagRef CFBagCreate( + CFStringRef CFNumberFormatterCreateStringWithNumber( CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + CFNumberFormatterRef formatter, + CFNumberRef number, ) { - return _CFBagCreate( + return _CFNumberFormatterCreateStringWithNumber( allocator, - values, - numValues, - callBacks, + formatter, + number, ); } - late final _CFBagCreatePtr = _lookup< + late final _CFNumberFormatterCreateStringWithNumberPtr = _lookup< ffi.NativeFunction< - CFBagRef Function(CFAllocatorRef, ffi.Pointer>, - CFIndex, ffi.Pointer)>>('CFBagCreate'); - late final _CFBagCreate = _CFBagCreatePtr.asFunction< - CFBagRef Function(CFAllocatorRef, ffi.Pointer>, int, - ffi.Pointer)>(); + CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, + CFNumberRef)>>('CFNumberFormatterCreateStringWithNumber'); + late final _CFNumberFormatterCreateStringWithNumber = + _CFNumberFormatterCreateStringWithNumberPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFNumberFormatterRef, CFNumberRef)>(); - CFBagRef CFBagCreateCopy( + CFStringRef CFNumberFormatterCreateStringWithValue( CFAllocatorRef allocator, - CFBagRef theBag, + CFNumberFormatterRef formatter, + CFNumberType numberType, + ffi.Pointer valuePtr, ) { - return _CFBagCreateCopy( + return _CFNumberFormatterCreateStringWithValue( allocator, - theBag, + formatter, + numberType.value, + valuePtr, ); } - late final _CFBagCreateCopyPtr = - _lookup>( - 'CFBagCreateCopy'); - late final _CFBagCreateCopy = _CFBagCreateCopyPtr.asFunction< - CFBagRef Function(CFAllocatorRef, CFBagRef)>(); - - CFMutableBagRef CFBagCreateMutable( + late final _CFNumberFormatterCreateStringWithValuePtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, + CFIndex, ffi.Pointer)>>( + 'CFNumberFormatterCreateStringWithValue'); + late final _CFNumberFormatterCreateStringWithValue = + _CFNumberFormatterCreateStringWithValuePtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, int, + ffi.Pointer)>(); + + CFNumberRef CFNumberFormatterCreateNumberFromString( CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + CFNumberFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + int options, ) { - return _CFBagCreateMutable( + return _CFNumberFormatterCreateNumberFromString( allocator, - capacity, - callBacks, + formatter, + string, + rangep, + options, ); } - late final _CFBagCreateMutablePtr = _lookup< + late final _CFNumberFormatterCreateNumberFromStringPtr = _lookup< ffi.NativeFunction< - CFMutableBagRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFBagCreateMutable'); - late final _CFBagCreateMutable = _CFBagCreateMutablePtr.asFunction< - CFMutableBagRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + CFNumberRef Function( + CFAllocatorRef, + CFNumberFormatterRef, + CFStringRef, + ffi.Pointer, + CFOptionFlags)>>('CFNumberFormatterCreateNumberFromString'); + late final _CFNumberFormatterCreateNumberFromString = + _CFNumberFormatterCreateNumberFromStringPtr.asFunction< + CFNumberRef Function(CFAllocatorRef, CFNumberFormatterRef, + CFStringRef, ffi.Pointer, int)>(); - CFMutableBagRef CFBagCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFBagRef theBag, + DartBoolean CFNumberFormatterGetValueFromString( + CFNumberFormatterRef formatter, + CFStringRef string, + ffi.Pointer rangep, + CFNumberType numberType, + ffi.Pointer valuePtr, ) { - return _CFBagCreateMutableCopy( - allocator, - capacity, - theBag, + return _CFNumberFormatterGetValueFromString( + formatter, + string, + rangep, + numberType.value, + valuePtr, ); } - late final _CFBagCreateMutableCopyPtr = _lookup< + late final _CFNumberFormatterGetValueFromStringPtr = _lookup< ffi.NativeFunction< - CFMutableBagRef Function( - CFAllocatorRef, CFIndex, CFBagRef)>>('CFBagCreateMutableCopy'); - late final _CFBagCreateMutableCopy = _CFBagCreateMutableCopyPtr.asFunction< - CFMutableBagRef Function(CFAllocatorRef, int, CFBagRef)>(); + Boolean Function( + CFNumberFormatterRef, + CFStringRef, + ffi.Pointer, + CFIndex, + ffi.Pointer)>>('CFNumberFormatterGetValueFromString'); + late final _CFNumberFormatterGetValueFromString = + _CFNumberFormatterGetValueFromStringPtr.asFunction< + int Function(CFNumberFormatterRef, CFStringRef, ffi.Pointer, + int, ffi.Pointer)>(); - int CFBagGetCount( - CFBagRef theBag, + void CFNumberFormatterSetProperty( + CFNumberFormatterRef formatter, + CFNumberFormatterKey key, + CFTypeRef value, ) { - return _CFBagGetCount( - theBag, + return _CFNumberFormatterSetProperty( + formatter, + key, + value, ); } - late final _CFBagGetCountPtr = - _lookup>('CFBagGetCount'); - late final _CFBagGetCount = - _CFBagGetCountPtr.asFunction(); + late final _CFNumberFormatterSetPropertyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFNumberFormatterRef, CFNumberFormatterKey, + CFTypeRef)>>('CFNumberFormatterSetProperty'); + late final _CFNumberFormatterSetProperty = + _CFNumberFormatterSetPropertyPtr.asFunction< + void Function( + CFNumberFormatterRef, CFNumberFormatterKey, CFTypeRef)>(); - int CFBagGetCountOfValue( - CFBagRef theBag, - ffi.Pointer value, + CFTypeRef CFNumberFormatterCopyProperty( + CFNumberFormatterRef formatter, + CFNumberFormatterKey key, ) { - return _CFBagGetCountOfValue( - theBag, - value, + return _CFNumberFormatterCopyProperty( + formatter, + key, ); } - late final _CFBagGetCountOfValuePtr = _lookup< - ffi - .NativeFunction)>>( - 'CFBagGetCountOfValue'); - late final _CFBagGetCountOfValue = _CFBagGetCountOfValuePtr.asFunction< - int Function(CFBagRef, ffi.Pointer)>(); + late final _CFNumberFormatterCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFNumberFormatterRef, + CFNumberFormatterKey)>>('CFNumberFormatterCopyProperty'); + late final _CFNumberFormatterCopyProperty = + _CFNumberFormatterCopyPropertyPtr.asFunction< + CFTypeRef Function(CFNumberFormatterRef, CFNumberFormatterKey)>(); - int CFBagContainsValue( - CFBagRef theBag, - ffi.Pointer value, - ) { - return _CFBagContainsValue( - theBag, - value, - ); - } + late final ffi.Pointer _kCFNumberFormatterCurrencyCode = + _lookup('kCFNumberFormatterCurrencyCode'); - late final _CFBagContainsValuePtr = _lookup< - ffi - .NativeFunction)>>( - 'CFBagContainsValue'); - late final _CFBagContainsValue = _CFBagContainsValuePtr.asFunction< - int Function(CFBagRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterCurrencyCode => + _kCFNumberFormatterCurrencyCode.value; - ffi.Pointer CFBagGetValue( - CFBagRef theBag, - ffi.Pointer value, - ) { - return _CFBagGetValue( - theBag, - value, - ); - } + late final ffi.Pointer + _kCFNumberFormatterDecimalSeparator = + _lookup('kCFNumberFormatterDecimalSeparator'); - late final _CFBagGetValuePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFBagRef, ffi.Pointer)>>('CFBagGetValue'); - late final _CFBagGetValue = _CFBagGetValuePtr.asFunction< - ffi.Pointer Function(CFBagRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterDecimalSeparator => + _kCFNumberFormatterDecimalSeparator.value; - int CFBagGetValueIfPresent( - CFBagRef theBag, - ffi.Pointer candidate, - ffi.Pointer> value, - ) { - return _CFBagGetValueIfPresent( - theBag, - candidate, - value, - ); - } + late final ffi.Pointer + _kCFNumberFormatterCurrencyDecimalSeparator = + _lookup( + 'kCFNumberFormatterCurrencyDecimalSeparator'); - late final _CFBagGetValueIfPresentPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFBagRef, ffi.Pointer, - ffi.Pointer>)>>('CFBagGetValueIfPresent'); - late final _CFBagGetValueIfPresent = _CFBagGetValueIfPresentPtr.asFunction< - int Function(CFBagRef, ffi.Pointer, - ffi.Pointer>)>(); + CFNumberFormatterKey get kCFNumberFormatterCurrencyDecimalSeparator => + _kCFNumberFormatterCurrencyDecimalSeparator.value; - void CFBagGetValues( - CFBagRef theBag, - ffi.Pointer> values, - ) { - return _CFBagGetValues( - theBag, - values, - ); - } + late final ffi.Pointer + _kCFNumberFormatterAlwaysShowDecimalSeparator = + _lookup( + 'kCFNumberFormatterAlwaysShowDecimalSeparator'); - late final _CFBagGetValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFBagRef, ffi.Pointer>)>>('CFBagGetValues'); - late final _CFBagGetValues = _CFBagGetValuesPtr.asFunction< - void Function(CFBagRef, ffi.Pointer>)>(); + CFNumberFormatterKey get kCFNumberFormatterAlwaysShowDecimalSeparator => + _kCFNumberFormatterAlwaysShowDecimalSeparator.value; - void CFBagApplyFunction( - CFBagRef theBag, - CFBagApplierFunction applier, - ffi.Pointer context, - ) { - return _CFBagApplyFunction( - theBag, - applier, - context, - ); - } + late final ffi.Pointer + _kCFNumberFormatterGroupingSeparator = + _lookup('kCFNumberFormatterGroupingSeparator'); - late final _CFBagApplyFunctionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBagRef, CFBagApplierFunction, - ffi.Pointer)>>('CFBagApplyFunction'); - late final _CFBagApplyFunction = _CFBagApplyFunctionPtr.asFunction< - void Function(CFBagRef, CFBagApplierFunction, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterGroupingSeparator => + _kCFNumberFormatterGroupingSeparator.value; - void CFBagAddValue( - CFMutableBagRef theBag, - ffi.Pointer value, - ) { - return _CFBagAddValue( - theBag, - value, - ); - } + late final ffi.Pointer + _kCFNumberFormatterUseGroupingSeparator = + _lookup('kCFNumberFormatterUseGroupingSeparator'); - late final _CFBagAddValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagAddValue'); - late final _CFBagAddValue = _CFBagAddValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterUseGroupingSeparator => + _kCFNumberFormatterUseGroupingSeparator.value; - void CFBagReplaceValue( - CFMutableBagRef theBag, - ffi.Pointer value, - ) { - return _CFBagReplaceValue( - theBag, - value, - ); - } + late final ffi.Pointer + _kCFNumberFormatterPercentSymbol = + _lookup('kCFNumberFormatterPercentSymbol'); - late final _CFBagReplaceValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagReplaceValue'); - late final _CFBagReplaceValue = _CFBagReplaceValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterPercentSymbol => + _kCFNumberFormatterPercentSymbol.value; - void CFBagSetValue( - CFMutableBagRef theBag, - ffi.Pointer value, - ) { - return _CFBagSetValue( - theBag, - value, - ); - } + late final ffi.Pointer _kCFNumberFormatterZeroSymbol = + _lookup('kCFNumberFormatterZeroSymbol'); - late final _CFBagSetValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagSetValue'); - late final _CFBagSetValue = _CFBagSetValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterZeroSymbol => + _kCFNumberFormatterZeroSymbol.value; - void CFBagRemoveValue( - CFMutableBagRef theBag, - ffi.Pointer value, - ) { - return _CFBagRemoveValue( - theBag, - value, - ); - } + late final ffi.Pointer _kCFNumberFormatterNaNSymbol = + _lookup('kCFNumberFormatterNaNSymbol'); - late final _CFBagRemoveValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBagRef, ffi.Pointer)>>('CFBagRemoveValue'); - late final _CFBagRemoveValue = _CFBagRemoveValuePtr.asFunction< - void Function(CFMutableBagRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterNaNSymbol => + _kCFNumberFormatterNaNSymbol.value; - void CFBagRemoveAllValues( - CFMutableBagRef theBag, - ) { - return _CFBagRemoveAllValues( - theBag, - ); - } + late final ffi.Pointer + _kCFNumberFormatterInfinitySymbol = + _lookup('kCFNumberFormatterInfinitySymbol'); - late final _CFBagRemoveAllValuesPtr = - _lookup>( - 'CFBagRemoveAllValues'); - late final _CFBagRemoveAllValues = - _CFBagRemoveAllValuesPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterInfinitySymbol => + _kCFNumberFormatterInfinitySymbol.value; - late final ffi.Pointer _kCFStringBinaryHeapCallBacks = - _lookup('kCFStringBinaryHeapCallBacks'); + late final ffi.Pointer _kCFNumberFormatterMinusSign = + _lookup('kCFNumberFormatterMinusSign'); - CFBinaryHeapCallBacks get kCFStringBinaryHeapCallBacks => - _kCFStringBinaryHeapCallBacks.ref; + CFNumberFormatterKey get kCFNumberFormatterMinusSign => + _kCFNumberFormatterMinusSign.value; - int CFBinaryHeapGetTypeID() { - return _CFBinaryHeapGetTypeID(); - } + late final ffi.Pointer _kCFNumberFormatterPlusSign = + _lookup('kCFNumberFormatterPlusSign'); - late final _CFBinaryHeapGetTypeIDPtr = - _lookup>('CFBinaryHeapGetTypeID'); - late final _CFBinaryHeapGetTypeID = - _CFBinaryHeapGetTypeIDPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterPlusSign => + _kCFNumberFormatterPlusSign.value; - CFBinaryHeapRef CFBinaryHeapCreate( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, - ffi.Pointer compareContext, - ) { - return _CFBinaryHeapCreate( - allocator, - capacity, - callBacks, - compareContext, - ); - } + late final ffi.Pointer + _kCFNumberFormatterCurrencySymbol = + _lookup('kCFNumberFormatterCurrencySymbol'); - late final _CFBinaryHeapCreatePtr = _lookup< - ffi.NativeFunction< - CFBinaryHeapRef Function( - CFAllocatorRef, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>('CFBinaryHeapCreate'); - late final _CFBinaryHeapCreate = _CFBinaryHeapCreatePtr.asFunction< - CFBinaryHeapRef Function( - CFAllocatorRef, - int, - ffi.Pointer, - ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterCurrencySymbol => + _kCFNumberFormatterCurrencySymbol.value; - CFBinaryHeapRef CFBinaryHeapCreateCopy( - CFAllocatorRef allocator, - int capacity, - CFBinaryHeapRef heap, - ) { - return _CFBinaryHeapCreateCopy( - allocator, - capacity, - heap, - ); - } + late final ffi.Pointer + _kCFNumberFormatterExponentSymbol = + _lookup('kCFNumberFormatterExponentSymbol'); - late final _CFBinaryHeapCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFBinaryHeapRef Function(CFAllocatorRef, CFIndex, - CFBinaryHeapRef)>>('CFBinaryHeapCreateCopy'); - late final _CFBinaryHeapCreateCopy = _CFBinaryHeapCreateCopyPtr.asFunction< - CFBinaryHeapRef Function(CFAllocatorRef, int, CFBinaryHeapRef)>(); + CFNumberFormatterKey get kCFNumberFormatterExponentSymbol => + _kCFNumberFormatterExponentSymbol.value; - int CFBinaryHeapGetCount( - CFBinaryHeapRef heap, - ) { - return _CFBinaryHeapGetCount( - heap, - ); - } + late final ffi.Pointer + _kCFNumberFormatterMinIntegerDigits = + _lookup('kCFNumberFormatterMinIntegerDigits'); - late final _CFBinaryHeapGetCountPtr = - _lookup>( - 'CFBinaryHeapGetCount'); - late final _CFBinaryHeapGetCount = - _CFBinaryHeapGetCountPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterMinIntegerDigits => + _kCFNumberFormatterMinIntegerDigits.value; - int CFBinaryHeapGetCountOfValue( - CFBinaryHeapRef heap, - ffi.Pointer value, - ) { - return _CFBinaryHeapGetCountOfValue( - heap, - value, - ); - } + late final ffi.Pointer + _kCFNumberFormatterMaxIntegerDigits = + _lookup('kCFNumberFormatterMaxIntegerDigits'); - late final _CFBinaryHeapGetCountOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFBinaryHeapRef, - ffi.Pointer)>>('CFBinaryHeapGetCountOfValue'); - late final _CFBinaryHeapGetCountOfValue = _CFBinaryHeapGetCountOfValuePtr - .asFunction)>(); + CFNumberFormatterKey get kCFNumberFormatterMaxIntegerDigits => + _kCFNumberFormatterMaxIntegerDigits.value; - int CFBinaryHeapContainsValue( - CFBinaryHeapRef heap, - ffi.Pointer value, - ) { - return _CFBinaryHeapContainsValue( - heap, - value, - ); - } + late final ffi.Pointer + _kCFNumberFormatterMinFractionDigits = + _lookup('kCFNumberFormatterMinFractionDigits'); - late final _CFBinaryHeapContainsValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFBinaryHeapRef, - ffi.Pointer)>>('CFBinaryHeapContainsValue'); - late final _CFBinaryHeapContainsValue = _CFBinaryHeapContainsValuePtr - .asFunction)>(); + CFNumberFormatterKey get kCFNumberFormatterMinFractionDigits => + _kCFNumberFormatterMinFractionDigits.value; - ffi.Pointer CFBinaryHeapGetMinimum( - CFBinaryHeapRef heap, - ) { - return _CFBinaryHeapGetMinimum( - heap, - ); - } + late final ffi.Pointer + _kCFNumberFormatterMaxFractionDigits = + _lookup('kCFNumberFormatterMaxFractionDigits'); - late final _CFBinaryHeapGetMinimumPtr = _lookup< - ffi.NativeFunction Function(CFBinaryHeapRef)>>( - 'CFBinaryHeapGetMinimum'); - late final _CFBinaryHeapGetMinimum = _CFBinaryHeapGetMinimumPtr.asFunction< - ffi.Pointer Function(CFBinaryHeapRef)>(); + CFNumberFormatterKey get kCFNumberFormatterMaxFractionDigits => + _kCFNumberFormatterMaxFractionDigits.value; - int CFBinaryHeapGetMinimumIfPresent( - CFBinaryHeapRef heap, - ffi.Pointer> value, - ) { - return _CFBinaryHeapGetMinimumIfPresent( - heap, - value, - ); - } + late final ffi.Pointer _kCFNumberFormatterGroupingSize = + _lookup('kCFNumberFormatterGroupingSize'); - late final _CFBinaryHeapGetMinimumIfPresentPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFBinaryHeapRef, ffi.Pointer>)>>( - 'CFBinaryHeapGetMinimumIfPresent'); - late final _CFBinaryHeapGetMinimumIfPresent = - _CFBinaryHeapGetMinimumIfPresentPtr.asFunction< - int Function(CFBinaryHeapRef, ffi.Pointer>)>(); + CFNumberFormatterKey get kCFNumberFormatterGroupingSize => + _kCFNumberFormatterGroupingSize.value; - void CFBinaryHeapGetValues( - CFBinaryHeapRef heap, - ffi.Pointer> values, - ) { - return _CFBinaryHeapGetValues( - heap, - values, - ); - } + late final ffi.Pointer + _kCFNumberFormatterSecondaryGroupingSize = + _lookup('kCFNumberFormatterSecondaryGroupingSize'); - late final _CFBinaryHeapGetValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBinaryHeapRef, - ffi.Pointer>)>>('CFBinaryHeapGetValues'); - late final _CFBinaryHeapGetValues = _CFBinaryHeapGetValuesPtr.asFunction< - void Function(CFBinaryHeapRef, ffi.Pointer>)>(); + CFNumberFormatterKey get kCFNumberFormatterSecondaryGroupingSize => + _kCFNumberFormatterSecondaryGroupingSize.value; - void CFBinaryHeapApplyFunction( - CFBinaryHeapRef heap, - CFBinaryHeapApplierFunction applier, - ffi.Pointer context, - ) { - return _CFBinaryHeapApplyFunction( - heap, - applier, - context, - ); - } + late final ffi.Pointer _kCFNumberFormatterRoundingMode = + _lookup('kCFNumberFormatterRoundingMode'); - late final _CFBinaryHeapApplyFunctionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, - ffi.Pointer)>>('CFBinaryHeapApplyFunction'); - late final _CFBinaryHeapApplyFunction = - _CFBinaryHeapApplyFunctionPtr.asFunction< - void Function(CFBinaryHeapRef, CFBinaryHeapApplierFunction, - ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterRoundingMode => + _kCFNumberFormatterRoundingMode.value; - void CFBinaryHeapAddValue( - CFBinaryHeapRef heap, - ffi.Pointer value, - ) { - return _CFBinaryHeapAddValue( - heap, - value, - ); - } + late final ffi.Pointer + _kCFNumberFormatterRoundingIncrement = + _lookup('kCFNumberFormatterRoundingIncrement'); - late final _CFBinaryHeapAddValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFBinaryHeapRef, ffi.Pointer)>>('CFBinaryHeapAddValue'); - late final _CFBinaryHeapAddValue = _CFBinaryHeapAddValuePtr.asFunction< - void Function(CFBinaryHeapRef, ffi.Pointer)>(); + CFNumberFormatterKey get kCFNumberFormatterRoundingIncrement => + _kCFNumberFormatterRoundingIncrement.value; - void CFBinaryHeapRemoveMinimumValue( - CFBinaryHeapRef heap, - ) { - return _CFBinaryHeapRemoveMinimumValue( - heap, - ); - } + late final ffi.Pointer _kCFNumberFormatterFormatWidth = + _lookup('kCFNumberFormatterFormatWidth'); - late final _CFBinaryHeapRemoveMinimumValuePtr = - _lookup>( - 'CFBinaryHeapRemoveMinimumValue'); - late final _CFBinaryHeapRemoveMinimumValue = - _CFBinaryHeapRemoveMinimumValuePtr.asFunction< - void Function(CFBinaryHeapRef)>(); + CFNumberFormatterKey get kCFNumberFormatterFormatWidth => + _kCFNumberFormatterFormatWidth.value; - void CFBinaryHeapRemoveAllValues( - CFBinaryHeapRef heap, - ) { - return _CFBinaryHeapRemoveAllValues( - heap, - ); - } + late final ffi.Pointer + _kCFNumberFormatterPaddingPosition = + _lookup('kCFNumberFormatterPaddingPosition'); - late final _CFBinaryHeapRemoveAllValuesPtr = - _lookup>( - 'CFBinaryHeapRemoveAllValues'); - late final _CFBinaryHeapRemoveAllValues = _CFBinaryHeapRemoveAllValuesPtr - .asFunction(); + CFNumberFormatterKey get kCFNumberFormatterPaddingPosition => + _kCFNumberFormatterPaddingPosition.value; - int CFBitVectorGetTypeID() { - return _CFBitVectorGetTypeID(); - } + late final ffi.Pointer + _kCFNumberFormatterPaddingCharacter = + _lookup('kCFNumberFormatterPaddingCharacter'); - late final _CFBitVectorGetTypeIDPtr = - _lookup>('CFBitVectorGetTypeID'); - late final _CFBitVectorGetTypeID = - _CFBitVectorGetTypeIDPtr.asFunction(); + CFNumberFormatterKey get kCFNumberFormatterPaddingCharacter => + _kCFNumberFormatterPaddingCharacter.value; - CFBitVectorRef CFBitVectorCreate( - CFAllocatorRef allocator, - ffi.Pointer bytes, - int numBits, + late final ffi.Pointer + _kCFNumberFormatterDefaultFormat = + _lookup('kCFNumberFormatterDefaultFormat'); + + CFNumberFormatterKey get kCFNumberFormatterDefaultFormat => + _kCFNumberFormatterDefaultFormat.value; + + late final ffi.Pointer _kCFNumberFormatterMultiplier = + _lookup('kCFNumberFormatterMultiplier'); + + CFNumberFormatterKey get kCFNumberFormatterMultiplier => + _kCFNumberFormatterMultiplier.value; + + late final ffi.Pointer + _kCFNumberFormatterPositivePrefix = + _lookup('kCFNumberFormatterPositivePrefix'); + + CFNumberFormatterKey get kCFNumberFormatterPositivePrefix => + _kCFNumberFormatterPositivePrefix.value; + + late final ffi.Pointer + _kCFNumberFormatterPositiveSuffix = + _lookup('kCFNumberFormatterPositiveSuffix'); + + CFNumberFormatterKey get kCFNumberFormatterPositiveSuffix => + _kCFNumberFormatterPositiveSuffix.value; + + late final ffi.Pointer + _kCFNumberFormatterNegativePrefix = + _lookup('kCFNumberFormatterNegativePrefix'); + + CFNumberFormatterKey get kCFNumberFormatterNegativePrefix => + _kCFNumberFormatterNegativePrefix.value; + + late final ffi.Pointer + _kCFNumberFormatterNegativeSuffix = + _lookup('kCFNumberFormatterNegativeSuffix'); + + CFNumberFormatterKey get kCFNumberFormatterNegativeSuffix => + _kCFNumberFormatterNegativeSuffix.value; + + late final ffi.Pointer + _kCFNumberFormatterPerMillSymbol = + _lookup('kCFNumberFormatterPerMillSymbol'); + + CFNumberFormatterKey get kCFNumberFormatterPerMillSymbol => + _kCFNumberFormatterPerMillSymbol.value; + + late final ffi.Pointer + _kCFNumberFormatterInternationalCurrencySymbol = + _lookup( + 'kCFNumberFormatterInternationalCurrencySymbol'); + + CFNumberFormatterKey get kCFNumberFormatterInternationalCurrencySymbol => + _kCFNumberFormatterInternationalCurrencySymbol.value; + + late final ffi.Pointer + _kCFNumberFormatterCurrencyGroupingSeparator = + _lookup( + 'kCFNumberFormatterCurrencyGroupingSeparator'); + + CFNumberFormatterKey get kCFNumberFormatterCurrencyGroupingSeparator => + _kCFNumberFormatterCurrencyGroupingSeparator.value; + + late final ffi.Pointer _kCFNumberFormatterIsLenient = + _lookup('kCFNumberFormatterIsLenient'); + + CFNumberFormatterKey get kCFNumberFormatterIsLenient => + _kCFNumberFormatterIsLenient.value; + + late final ffi.Pointer + _kCFNumberFormatterUseSignificantDigits = + _lookup('kCFNumberFormatterUseSignificantDigits'); + + CFNumberFormatterKey get kCFNumberFormatterUseSignificantDigits => + _kCFNumberFormatterUseSignificantDigits.value; + + late final ffi.Pointer + _kCFNumberFormatterMinSignificantDigits = + _lookup('kCFNumberFormatterMinSignificantDigits'); + + CFNumberFormatterKey get kCFNumberFormatterMinSignificantDigits => + _kCFNumberFormatterMinSignificantDigits.value; + + late final ffi.Pointer + _kCFNumberFormatterMaxSignificantDigits = + _lookup('kCFNumberFormatterMaxSignificantDigits'); + + CFNumberFormatterKey get kCFNumberFormatterMaxSignificantDigits => + _kCFNumberFormatterMaxSignificantDigits.value; + + int CFNumberFormatterGetDecimalInfoForCurrencyCode( + CFStringRef currencyCode, + ffi.Pointer defaultFractionDigits, + ffi.Pointer roundingIncrement, ) { - return _CFBitVectorCreate( - allocator, - bytes, - numBits, + return _CFNumberFormatterGetDecimalInfoForCurrencyCode( + currencyCode, + defaultFractionDigits, + roundingIncrement, ); } - late final _CFBitVectorCreatePtr = _lookup< - ffi.NativeFunction< - CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex)>>('CFBitVectorCreate'); - late final _CFBitVectorCreate = _CFBitVectorCreatePtr.asFunction< - CFBitVectorRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + late final _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>>( + 'CFNumberFormatterGetDecimalInfoForCurrencyCode'); + late final _CFNumberFormatterGetDecimalInfoForCurrencyCode = + _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr.asFunction< + int Function( + CFStringRef, ffi.Pointer, ffi.Pointer)>(); - CFBitVectorRef CFBitVectorCreateCopy( - CFAllocatorRef allocator, - CFBitVectorRef bv, + late final ffi.Pointer _kCFPreferencesAnyApplication = + _lookup('kCFPreferencesAnyApplication'); + + CFStringRef get kCFPreferencesAnyApplication => + _kCFPreferencesAnyApplication.value; + + set kCFPreferencesAnyApplication(CFStringRef value) => + _kCFPreferencesAnyApplication.value = value; + + late final ffi.Pointer _kCFPreferencesCurrentApplication = + _lookup('kCFPreferencesCurrentApplication'); + + CFStringRef get kCFPreferencesCurrentApplication => + _kCFPreferencesCurrentApplication.value; + + set kCFPreferencesCurrentApplication(CFStringRef value) => + _kCFPreferencesCurrentApplication.value = value; + + late final ffi.Pointer _kCFPreferencesAnyHost = + _lookup('kCFPreferencesAnyHost'); + + CFStringRef get kCFPreferencesAnyHost => _kCFPreferencesAnyHost.value; + + set kCFPreferencesAnyHost(CFStringRef value) => + _kCFPreferencesAnyHost.value = value; + + late final ffi.Pointer _kCFPreferencesCurrentHost = + _lookup('kCFPreferencesCurrentHost'); + + CFStringRef get kCFPreferencesCurrentHost => _kCFPreferencesCurrentHost.value; + + set kCFPreferencesCurrentHost(CFStringRef value) => + _kCFPreferencesCurrentHost.value = value; + + late final ffi.Pointer _kCFPreferencesAnyUser = + _lookup('kCFPreferencesAnyUser'); + + CFStringRef get kCFPreferencesAnyUser => _kCFPreferencesAnyUser.value; + + set kCFPreferencesAnyUser(CFStringRef value) => + _kCFPreferencesAnyUser.value = value; + + late final ffi.Pointer _kCFPreferencesCurrentUser = + _lookup('kCFPreferencesCurrentUser'); + + CFStringRef get kCFPreferencesCurrentUser => _kCFPreferencesCurrentUser.value; + + set kCFPreferencesCurrentUser(CFStringRef value) => + _kCFPreferencesCurrentUser.value = value; + + CFPropertyListRef CFPreferencesCopyAppValue( + CFStringRef key, + CFStringRef applicationID, ) { - return _CFBitVectorCreateCopy( - allocator, - bv, + return _CFPreferencesCopyAppValue( + key, + applicationID, ); } - late final _CFBitVectorCreateCopyPtr = _lookup< + late final _CFPreferencesCopyAppValuePtr = _lookup< ffi.NativeFunction< - CFBitVectorRef Function( - CFAllocatorRef, CFBitVectorRef)>>('CFBitVectorCreateCopy'); - late final _CFBitVectorCreateCopy = _CFBitVectorCreateCopyPtr.asFunction< - CFBitVectorRef Function(CFAllocatorRef, CFBitVectorRef)>(); + CFPropertyListRef Function( + CFStringRef, CFStringRef)>>('CFPreferencesCopyAppValue'); + late final _CFPreferencesCopyAppValue = _CFPreferencesCopyAppValuePtr + .asFunction(); - CFMutableBitVectorRef CFBitVectorCreateMutable( - CFAllocatorRef allocator, - int capacity, + int CFPreferencesGetAppBooleanValue( + CFStringRef key, + CFStringRef applicationID, + ffi.Pointer keyExistsAndHasValidFormat, ) { - return _CFBitVectorCreateMutable( - allocator, - capacity, + return _CFPreferencesGetAppBooleanValue( + key, + applicationID, + keyExistsAndHasValidFormat, ); } - late final _CFBitVectorCreateMutablePtr = _lookup< + late final _CFPreferencesGetAppBooleanValuePtr = _lookup< ffi.NativeFunction< - CFMutableBitVectorRef Function( - CFAllocatorRef, CFIndex)>>('CFBitVectorCreateMutable'); - late final _CFBitVectorCreateMutable = _CFBitVectorCreateMutablePtr - .asFunction(); + Boolean Function(CFStringRef, CFStringRef, + ffi.Pointer)>>('CFPreferencesGetAppBooleanValue'); + late final _CFPreferencesGetAppBooleanValue = + _CFPreferencesGetAppBooleanValuePtr.asFunction< + int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); - CFMutableBitVectorRef CFBitVectorCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFBitVectorRef bv, + int CFPreferencesGetAppIntegerValue( + CFStringRef key, + CFStringRef applicationID, + ffi.Pointer keyExistsAndHasValidFormat, ) { - return _CFBitVectorCreateMutableCopy( - allocator, - capacity, - bv, + return _CFPreferencesGetAppIntegerValue( + key, + applicationID, + keyExistsAndHasValidFormat, ); } - late final _CFBitVectorCreateMutableCopyPtr = _lookup< + late final _CFPreferencesGetAppIntegerValuePtr = _lookup< ffi.NativeFunction< - CFMutableBitVectorRef Function(CFAllocatorRef, CFIndex, - CFBitVectorRef)>>('CFBitVectorCreateMutableCopy'); - late final _CFBitVectorCreateMutableCopy = - _CFBitVectorCreateMutableCopyPtr.asFunction< - CFMutableBitVectorRef Function( - CFAllocatorRef, int, CFBitVectorRef)>(); + CFIndex Function(CFStringRef, CFStringRef, + ffi.Pointer)>>('CFPreferencesGetAppIntegerValue'); + late final _CFPreferencesGetAppIntegerValue = + _CFPreferencesGetAppIntegerValuePtr.asFunction< + int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); - int CFBitVectorGetCount( - CFBitVectorRef bv, + void CFPreferencesSetAppValue( + CFStringRef key, + CFPropertyListRef value, + CFStringRef applicationID, ) { - return _CFBitVectorGetCount( - bv, + return _CFPreferencesSetAppValue( + key, + value, + applicationID, ); } - late final _CFBitVectorGetCountPtr = - _lookup>( - 'CFBitVectorGetCount'); - late final _CFBitVectorGetCount = - _CFBitVectorGetCountPtr.asFunction(); + late final _CFPreferencesSetAppValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringRef, CFPropertyListRef, + CFStringRef)>>('CFPreferencesSetAppValue'); + late final _CFPreferencesSetAppValue = _CFPreferencesSetAppValuePtr + .asFunction(); - int CFBitVectorGetCountOfBit( - CFBitVectorRef bv, - CFRange range, - int value, + void CFPreferencesAddSuitePreferencesToApp( + CFStringRef applicationID, + CFStringRef suiteID, ) { - return _CFBitVectorGetCountOfBit( - bv, - range, - value, + return _CFPreferencesAddSuitePreferencesToApp( + applicationID, + suiteID, ); } - late final _CFBitVectorGetCountOfBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorGetCountOfBit'); - late final _CFBitVectorGetCountOfBit = _CFBitVectorGetCountOfBitPtr - .asFunction(); + late final _CFPreferencesAddSuitePreferencesToAppPtr = + _lookup>( + 'CFPreferencesAddSuitePreferencesToApp'); + late final _CFPreferencesAddSuitePreferencesToApp = + _CFPreferencesAddSuitePreferencesToAppPtr.asFunction< + void Function(CFStringRef, CFStringRef)>(); - int CFBitVectorContainsBit( - CFBitVectorRef bv, - CFRange range, - int value, + void CFPreferencesRemoveSuitePreferencesFromApp( + CFStringRef applicationID, + CFStringRef suiteID, ) { - return _CFBitVectorContainsBit( - bv, - range, - value, + return _CFPreferencesRemoveSuitePreferencesFromApp( + applicationID, + suiteID, ); } - late final _CFBitVectorContainsBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorContainsBit'); - late final _CFBitVectorContainsBit = _CFBitVectorContainsBitPtr.asFunction< - int Function(CFBitVectorRef, CFRange, int)>(); + late final _CFPreferencesRemoveSuitePreferencesFromAppPtr = + _lookup>( + 'CFPreferencesRemoveSuitePreferencesFromApp'); + late final _CFPreferencesRemoveSuitePreferencesFromApp = + _CFPreferencesRemoveSuitePreferencesFromAppPtr.asFunction< + void Function(CFStringRef, CFStringRef)>(); - int CFBitVectorGetBitAtIndex( - CFBitVectorRef bv, - int idx, + int CFPreferencesAppSynchronize( + CFStringRef applicationID, ) { - return _CFBitVectorGetBitAtIndex( - bv, - idx, + return _CFPreferencesAppSynchronize( + applicationID, ); } - late final _CFBitVectorGetBitAtIndexPtr = - _lookup>( - 'CFBitVectorGetBitAtIndex'); - late final _CFBitVectorGetBitAtIndex = _CFBitVectorGetBitAtIndexPtr - .asFunction(); + late final _CFPreferencesAppSynchronizePtr = + _lookup>( + 'CFPreferencesAppSynchronize'); + late final _CFPreferencesAppSynchronize = + _CFPreferencesAppSynchronizePtr.asFunction(); - void CFBitVectorGetBits( - CFBitVectorRef bv, - CFRange range, - ffi.Pointer bytes, + CFPropertyListRef CFPreferencesCopyValue( + CFStringRef key, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, ) { - return _CFBitVectorGetBits( - bv, - range, - bytes, + return _CFPreferencesCopyValue( + key, + applicationID, + userName, + hostName, ); } - late final _CFBitVectorGetBitsPtr = _lookup< + late final _CFPreferencesCopyValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFBitVectorRef, CFRange, - ffi.Pointer)>>('CFBitVectorGetBits'); - late final _CFBitVectorGetBits = _CFBitVectorGetBitsPtr.asFunction< - void Function(CFBitVectorRef, CFRange, ffi.Pointer)>(); + CFPropertyListRef Function(CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyValue'); + late final _CFPreferencesCopyValue = _CFPreferencesCopyValuePtr.asFunction< + CFPropertyListRef Function( + CFStringRef, CFStringRef, CFStringRef, CFStringRef)>(); - int CFBitVectorGetFirstIndexOfBit( - CFBitVectorRef bv, - CFRange range, - int value, + CFDictionaryRef CFPreferencesCopyMultiple( + CFArrayRef keysToFetch, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, ) { - return _CFBitVectorGetFirstIndexOfBit( - bv, - range, - value, + return _CFPreferencesCopyMultiple( + keysToFetch, + applicationID, + userName, + hostName, ); } - late final _CFBitVectorGetFirstIndexOfBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorGetFirstIndexOfBit'); - late final _CFBitVectorGetFirstIndexOfBit = _CFBitVectorGetFirstIndexOfBitPtr - .asFunction(); + late final _CFPreferencesCopyMultiplePtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFArrayRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyMultiple'); + late final _CFPreferencesCopyMultiple = + _CFPreferencesCopyMultiplePtr.asFunction< + CFDictionaryRef Function( + CFArrayRef, CFStringRef, CFStringRef, CFStringRef)>(); - int CFBitVectorGetLastIndexOfBit( - CFBitVectorRef bv, - CFRange range, - int value, + void CFPreferencesSetValue( + CFStringRef key, + CFPropertyListRef value, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, ) { - return _CFBitVectorGetLastIndexOfBit( - bv, - range, + return _CFPreferencesSetValue( + key, value, + applicationID, + userName, + hostName, ); } - late final _CFBitVectorGetLastIndexOfBitPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorGetLastIndexOfBit'); - late final _CFBitVectorGetLastIndexOfBit = _CFBitVectorGetLastIndexOfBitPtr - .asFunction(); + late final _CFPreferencesSetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFStringRef, CFPropertyListRef, CFStringRef, + CFStringRef, CFStringRef)>>('CFPreferencesSetValue'); + late final _CFPreferencesSetValue = _CFPreferencesSetValuePtr.asFunction< + void Function(CFStringRef, CFPropertyListRef, CFStringRef, CFStringRef, + CFStringRef)>(); - void CFBitVectorSetCount( - CFMutableBitVectorRef bv, - int count, + void CFPreferencesSetMultiple( + CFDictionaryRef keysToSet, + CFArrayRef keysToRemove, + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, ) { - return _CFBitVectorSetCount( - bv, - count, + return _CFPreferencesSetMultiple( + keysToSet, + keysToRemove, + applicationID, + userName, + hostName, ); } - late final _CFBitVectorSetCountPtr = _lookup< - ffi - .NativeFunction>( - 'CFBitVectorSetCount'); - late final _CFBitVectorSetCount = _CFBitVectorSetCountPtr.asFunction< - void Function(CFMutableBitVectorRef, int)>(); + late final _CFPreferencesSetMultiplePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFDictionaryRef, CFArrayRef, CFStringRef, + CFStringRef, CFStringRef)>>('CFPreferencesSetMultiple'); + late final _CFPreferencesSetMultiple = + _CFPreferencesSetMultiplePtr.asFunction< + void Function(CFDictionaryRef, CFArrayRef, CFStringRef, CFStringRef, + CFStringRef)>(); - void CFBitVectorFlipBitAtIndex( - CFMutableBitVectorRef bv, - int idx, + int CFPreferencesSynchronize( + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, ) { - return _CFBitVectorFlipBitAtIndex( - bv, - idx, + return _CFPreferencesSynchronize( + applicationID, + userName, + hostName, ); } - late final _CFBitVectorFlipBitAtIndexPtr = _lookup< - ffi - .NativeFunction>( - 'CFBitVectorFlipBitAtIndex'); - late final _CFBitVectorFlipBitAtIndex = _CFBitVectorFlipBitAtIndexPtr - .asFunction(); + late final _CFPreferencesSynchronizePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesSynchronize'); + late final _CFPreferencesSynchronize = _CFPreferencesSynchronizePtr + .asFunction(); - void CFBitVectorFlipBits( - CFMutableBitVectorRef bv, - CFRange range, + CFArrayRef CFPreferencesCopyApplicationList( + CFStringRef userName, + CFStringRef hostName, ) { - return _CFBitVectorFlipBits( - bv, - range, + return _CFPreferencesCopyApplicationList( + userName, + hostName, ); } - late final _CFBitVectorFlipBitsPtr = _lookup< - ffi - .NativeFunction>( - 'CFBitVectorFlipBits'); - late final _CFBitVectorFlipBits = _CFBitVectorFlipBitsPtr.asFunction< - void Function(CFMutableBitVectorRef, CFRange)>(); + late final _CFPreferencesCopyApplicationListPtr = _lookup< + ffi.NativeFunction>( + 'CFPreferencesCopyApplicationList'); + late final _CFPreferencesCopyApplicationList = + _CFPreferencesCopyApplicationListPtr.asFunction< + CFArrayRef Function(CFStringRef, CFStringRef)>(); - void CFBitVectorSetBitAtIndex( - CFMutableBitVectorRef bv, - int idx, - int value, + CFArrayRef CFPreferencesCopyKeyList( + CFStringRef applicationID, + CFStringRef userName, + CFStringRef hostName, ) { - return _CFBitVectorSetBitAtIndex( - bv, - idx, - value, + return _CFPreferencesCopyKeyList( + applicationID, + userName, + hostName, ); } - late final _CFBitVectorSetBitAtIndexPtr = _lookup< + late final _CFPreferencesCopyKeyListPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableBitVectorRef, CFIndex, - CFBit)>>('CFBitVectorSetBitAtIndex'); - late final _CFBitVectorSetBitAtIndex = _CFBitVectorSetBitAtIndexPtr - .asFunction(); + CFArrayRef Function(CFStringRef, CFStringRef, + CFStringRef)>>('CFPreferencesCopyKeyList'); + late final _CFPreferencesCopyKeyList = _CFPreferencesCopyKeyListPtr + .asFunction(); - void CFBitVectorSetBits( - CFMutableBitVectorRef bv, - CFRange range, - int value, + int CFPreferencesAppValueIsForced( + CFStringRef key, + CFStringRef applicationID, ) { - return _CFBitVectorSetBits( - bv, - range, - value, + return _CFPreferencesAppValueIsForced( + key, + applicationID, ); } - late final _CFBitVectorSetBitsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableBitVectorRef, CFRange, CFBit)>>('CFBitVectorSetBits'); - late final _CFBitVectorSetBits = _CFBitVectorSetBitsPtr.asFunction< - void Function(CFMutableBitVectorRef, CFRange, int)>(); + late final _CFPreferencesAppValueIsForcedPtr = + _lookup>( + 'CFPreferencesAppValueIsForced'); + late final _CFPreferencesAppValueIsForced = _CFPreferencesAppValueIsForcedPtr + .asFunction(); - void CFBitVectorSetAllBits( - CFMutableBitVectorRef bv, - int value, - ) { - return _CFBitVectorSetAllBits( - bv, - value, - ); + int CFURLGetTypeID() { + return _CFURLGetTypeID(); } - late final _CFBitVectorSetAllBitsPtr = _lookup< - ffi.NativeFunction>( - 'CFBitVectorSetAllBits'); - late final _CFBitVectorSetAllBits = _CFBitVectorSetAllBitsPtr.asFunction< - void Function(CFMutableBitVectorRef, int)>(); - - late final ffi.Pointer - _kCFTypeDictionaryKeyCallBacks = - _lookup('kCFTypeDictionaryKeyCallBacks'); - - CFDictionaryKeyCallBacks get kCFTypeDictionaryKeyCallBacks => - _kCFTypeDictionaryKeyCallBacks.ref; - - late final ffi.Pointer - _kCFCopyStringDictionaryKeyCallBacks = - _lookup('kCFCopyStringDictionaryKeyCallBacks'); - - CFDictionaryKeyCallBacks get kCFCopyStringDictionaryKeyCallBacks => - _kCFCopyStringDictionaryKeyCallBacks.ref; - - late final ffi.Pointer - _kCFTypeDictionaryValueCallBacks = - _lookup('kCFTypeDictionaryValueCallBacks'); - - CFDictionaryValueCallBacks get kCFTypeDictionaryValueCallBacks => - _kCFTypeDictionaryValueCallBacks.ref; + late final _CFURLGetTypeIDPtr = + _lookup>('CFURLGetTypeID'); + late final _CFURLGetTypeID = _CFURLGetTypeIDPtr.asFunction(); - int CFDictionaryGetTypeID() { - return _CFDictionaryGetTypeID(); + CFURLRef CFURLCreateWithBytes( + CFAllocatorRef allocator, + ffi.Pointer URLBytes, + int length, + int encoding, + CFURLRef baseURL, + ) { + return _CFURLCreateWithBytes( + allocator, + URLBytes, + length, + encoding, + baseURL, + ); } - late final _CFDictionaryGetTypeIDPtr = - _lookup>('CFDictionaryGetTypeID'); - late final _CFDictionaryGetTypeID = - _CFDictionaryGetTypeIDPtr.asFunction(); + late final _CFURLCreateWithBytesPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFStringEncoding, CFURLRef)>>('CFURLCreateWithBytes'); + late final _CFURLCreateWithBytes = _CFURLCreateWithBytesPtr.asFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); - CFDictionaryRef CFDictionaryCreate( + CFDataRef CFURLCreateData( CFAllocatorRef allocator, - ffi.Pointer> keys, - ffi.Pointer> values, - int numValues, - ffi.Pointer keyCallBacks, - ffi.Pointer valueCallBacks, + CFURLRef url, + int encoding, + int escapeWhitespace, ) { - return _CFDictionaryCreate( + return _CFURLCreateData( allocator, - keys, - values, - numValues, - keyCallBacks, - valueCallBacks, + url, + encoding, + escapeWhitespace, ); } - late final _CFDictionaryCreatePtr = _lookup< + late final _CFURLCreateDataPtr = _lookup< ffi.NativeFunction< - CFDictionaryRef Function( - CFAllocatorRef, - ffi.Pointer>, - ffi.Pointer>, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>('CFDictionaryCreate'); - late final _CFDictionaryCreate = _CFDictionaryCreatePtr.asFunction< - CFDictionaryRef Function( - CFAllocatorRef, - ffi.Pointer>, - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer)>(); + CFDataRef Function(CFAllocatorRef, CFURLRef, CFStringEncoding, + Boolean)>>('CFURLCreateData'); + late final _CFURLCreateData = _CFURLCreateDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, int, int)>(); - CFDictionaryRef CFDictionaryCreateCopy( + CFURLRef CFURLCreateWithString( CFAllocatorRef allocator, - CFDictionaryRef theDict, + CFStringRef URLString, + CFURLRef baseURL, ) { - return _CFDictionaryCreateCopy( + return _CFURLCreateWithString( allocator, - theDict, + URLString, + baseURL, ); } - late final _CFDictionaryCreateCopyPtr = _lookup< + late final _CFURLCreateWithStringPtr = _lookup< ffi.NativeFunction< - CFDictionaryRef Function( - CFAllocatorRef, CFDictionaryRef)>>('CFDictionaryCreateCopy'); - late final _CFDictionaryCreateCopy = _CFDictionaryCreateCopyPtr.asFunction< - CFDictionaryRef Function(CFAllocatorRef, CFDictionaryRef)>(); + CFURLRef Function( + CFAllocatorRef, CFStringRef, CFURLRef)>>('CFURLCreateWithString'); + late final _CFURLCreateWithString = _CFURLCreateWithStringPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, CFURLRef)>(); - CFMutableDictionaryRef CFDictionaryCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer keyCallBacks, - ffi.Pointer valueCallBacks, + CFURLRef CFURLCreateAbsoluteURLWithBytes( + CFAllocatorRef alloc, + ffi.Pointer relativeURLBytes, + int length, + int encoding, + CFURLRef baseURL, + int useCompatibilityMode, ) { - return _CFDictionaryCreateMutable( - allocator, - capacity, - keyCallBacks, - valueCallBacks, + return _CFURLCreateAbsoluteURLWithBytes( + alloc, + relativeURLBytes, + length, + encoding, + baseURL, + useCompatibilityMode, ); } - late final _CFDictionaryCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableDictionaryRef Function( - CFAllocatorRef, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>( - 'CFDictionaryCreateMutable'); - late final _CFDictionaryCreateMutable = - _CFDictionaryCreateMutablePtr.asFunction< - CFMutableDictionaryRef Function( + late final _CFURLCreateAbsoluteURLWithBytesPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( CFAllocatorRef, - int, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer, + CFIndex, + CFStringEncoding, + CFURLRef, + Boolean)>>('CFURLCreateAbsoluteURLWithBytes'); + late final _CFURLCreateAbsoluteURLWithBytes = + _CFURLCreateAbsoluteURLWithBytesPtr.asFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer, int, int, CFURLRef, int)>(); - CFMutableDictionaryRef CFDictionaryCreateMutableCopy( + CFURLRef CFURLCreateWithFileSystemPath( CFAllocatorRef allocator, - int capacity, - CFDictionaryRef theDict, + CFStringRef filePath, + CFURLPathStyle pathStyle, + DartBoolean isDirectory, ) { - return _CFDictionaryCreateMutableCopy( + return _CFURLCreateWithFileSystemPath( allocator, - capacity, - theDict, + filePath, + pathStyle.value, + isDirectory, ); } - late final _CFDictionaryCreateMutableCopyPtr = _lookup< + late final _CFURLCreateWithFileSystemPathPtr = _lookup< ffi.NativeFunction< - CFMutableDictionaryRef Function(CFAllocatorRef, CFIndex, - CFDictionaryRef)>>('CFDictionaryCreateMutableCopy'); - late final _CFDictionaryCreateMutableCopy = - _CFDictionaryCreateMutableCopyPtr.asFunction< - CFMutableDictionaryRef Function( - CFAllocatorRef, int, CFDictionaryRef)>(); + CFURLRef Function(CFAllocatorRef, CFStringRef, CFIndex, + Boolean)>>('CFURLCreateWithFileSystemPath'); + late final _CFURLCreateWithFileSystemPath = _CFURLCreateWithFileSystemPathPtr + .asFunction(); - int CFDictionaryGetCount( - CFDictionaryRef theDict, + CFURLRef CFURLCreateFromFileSystemRepresentation( + CFAllocatorRef allocator, + ffi.Pointer buffer, + int bufLen, + int isDirectory, ) { - return _CFDictionaryGetCount( - theDict, + return _CFURLCreateFromFileSystemRepresentation( + allocator, + buffer, + bufLen, + isDirectory, ); } - late final _CFDictionaryGetCountPtr = - _lookup>( - 'CFDictionaryGetCount'); - late final _CFDictionaryGetCount = - _CFDictionaryGetCountPtr.asFunction(); + late final _CFURLCreateFromFileSystemRepresentationPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + Boolean)>>('CFURLCreateFromFileSystemRepresentation'); + late final _CFURLCreateFromFileSystemRepresentation = + _CFURLCreateFromFileSystemRepresentationPtr.asFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, int, int)>(); - int CFDictionaryGetCountOfKey( - CFDictionaryRef theDict, - ffi.Pointer key, + CFURLRef CFURLCreateWithFileSystemPathRelativeToBase( + CFAllocatorRef allocator, + CFStringRef filePath, + CFURLPathStyle pathStyle, + DartBoolean isDirectory, + CFURLRef baseURL, ) { - return _CFDictionaryGetCountOfKey( - theDict, - key, + return _CFURLCreateWithFileSystemPathRelativeToBase( + allocator, + filePath, + pathStyle.value, + isDirectory, + baseURL, ); } - late final _CFDictionaryGetCountOfKeyPtr = _lookup< + late final _CFURLCreateWithFileSystemPathRelativeToBasePtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryGetCountOfKey'); - late final _CFDictionaryGetCountOfKey = _CFDictionaryGetCountOfKeyPtr - .asFunction)>(); + CFURLRef Function(CFAllocatorRef, CFStringRef, CFIndex, Boolean, + CFURLRef)>>('CFURLCreateWithFileSystemPathRelativeToBase'); + late final _CFURLCreateWithFileSystemPathRelativeToBase = + _CFURLCreateWithFileSystemPathRelativeToBasePtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFStringRef, int, int, CFURLRef)>(); - int CFDictionaryGetCountOfValue( - CFDictionaryRef theDict, - ffi.Pointer value, + CFURLRef CFURLCreateFromFileSystemRepresentationRelativeToBase( + CFAllocatorRef allocator, + ffi.Pointer buffer, + int bufLen, + int isDirectory, + CFURLRef baseURL, ) { - return _CFDictionaryGetCountOfValue( - theDict, - value, + return _CFURLCreateFromFileSystemRepresentationRelativeToBase( + allocator, + buffer, + bufLen, + isDirectory, + baseURL, ); } - late final _CFDictionaryGetCountOfValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryGetCountOfValue'); - late final _CFDictionaryGetCountOfValue = _CFDictionaryGetCountOfValuePtr - .asFunction)>(); + late final _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr = + _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + Boolean, CFURLRef)>>( + 'CFURLCreateFromFileSystemRepresentationRelativeToBase'); + late final _CFURLCreateFromFileSystemRepresentationRelativeToBase = + _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr.asFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); - int CFDictionaryContainsKey( - CFDictionaryRef theDict, - ffi.Pointer key, + int CFURLGetFileSystemRepresentation( + CFURLRef url, + int resolveAgainstBase, + ffi.Pointer buffer, + int maxBufLen, ) { - return _CFDictionaryContainsKey( - theDict, - key, + return _CFURLGetFileSystemRepresentation( + url, + resolveAgainstBase, + buffer, + maxBufLen, ); } - late final _CFDictionaryContainsKeyPtr = _lookup< + late final _CFURLGetFileSystemRepresentationPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryContainsKey'); - late final _CFDictionaryContainsKey = _CFDictionaryContainsKeyPtr.asFunction< - int Function(CFDictionaryRef, ffi.Pointer)>(); + Boolean Function(CFURLRef, Boolean, ffi.Pointer, + CFIndex)>>('CFURLGetFileSystemRepresentation'); + late final _CFURLGetFileSystemRepresentation = + _CFURLGetFileSystemRepresentationPtr.asFunction< + int Function(CFURLRef, int, ffi.Pointer, int)>(); - int CFDictionaryContainsValue( - CFDictionaryRef theDict, - ffi.Pointer value, + CFURLRef CFURLCopyAbsoluteURL( + CFURLRef relativeURL, ) { - return _CFDictionaryContainsValue( - theDict, - value, + return _CFURLCopyAbsoluteURL( + relativeURL, ); } - late final _CFDictionaryContainsValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFDictionaryRef, - ffi.Pointer)>>('CFDictionaryContainsValue'); - late final _CFDictionaryContainsValue = _CFDictionaryContainsValuePtr - .asFunction)>(); + late final _CFURLCopyAbsoluteURLPtr = + _lookup>( + 'CFURLCopyAbsoluteURL'); + late final _CFURLCopyAbsoluteURL = + _CFURLCopyAbsoluteURLPtr.asFunction(); - ffi.Pointer CFDictionaryGetValue( - CFDictionaryRef theDict, - ffi.Pointer key, + CFStringRef CFURLGetString( + CFURLRef anURL, ) { - return _CFDictionaryGetValue( - theDict, - key, + return _CFURLGetString( + anURL, ); } - late final _CFDictionaryGetValuePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFDictionaryRef, ffi.Pointer)>>('CFDictionaryGetValue'); - late final _CFDictionaryGetValue = _CFDictionaryGetValuePtr.asFunction< - ffi.Pointer Function(CFDictionaryRef, ffi.Pointer)>(); + late final _CFURLGetStringPtr = + _lookup>( + 'CFURLGetString'); + late final _CFURLGetString = + _CFURLGetStringPtr.asFunction(); - int CFDictionaryGetValueIfPresent( - CFDictionaryRef theDict, - ffi.Pointer key, - ffi.Pointer> value, + CFURLRef CFURLGetBaseURL( + CFURLRef anURL, ) { - return _CFDictionaryGetValueIfPresent( - theDict, - key, - value, + return _CFURLGetBaseURL( + anURL, ); } - late final _CFDictionaryGetValueIfPresentPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFDictionaryRef, ffi.Pointer, - ffi.Pointer>)>>( - 'CFDictionaryGetValueIfPresent'); - late final _CFDictionaryGetValueIfPresent = - _CFDictionaryGetValueIfPresentPtr.asFunction< - int Function(CFDictionaryRef, ffi.Pointer, - ffi.Pointer>)>(); + late final _CFURLGetBaseURLPtr = + _lookup>( + 'CFURLGetBaseURL'); + late final _CFURLGetBaseURL = + _CFURLGetBaseURLPtr.asFunction(); - void CFDictionaryGetKeysAndValues( - CFDictionaryRef theDict, - ffi.Pointer> keys, - ffi.Pointer> values, + int CFURLCanBeDecomposed( + CFURLRef anURL, ) { - return _CFDictionaryGetKeysAndValues( - theDict, - keys, - values, + return _CFURLCanBeDecomposed( + anURL, ); } - late final _CFDictionaryGetKeysAndValuesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFDictionaryRef, - ffi.Pointer>, - ffi.Pointer>)>>( - 'CFDictionaryGetKeysAndValues'); - late final _CFDictionaryGetKeysAndValues = - _CFDictionaryGetKeysAndValuesPtr.asFunction< - void Function(CFDictionaryRef, ffi.Pointer>, - ffi.Pointer>)>(); + late final _CFURLCanBeDecomposedPtr = + _lookup>( + 'CFURLCanBeDecomposed'); + late final _CFURLCanBeDecomposed = + _CFURLCanBeDecomposedPtr.asFunction(); - void CFDictionaryApplyFunction( - CFDictionaryRef theDict, - CFDictionaryApplierFunction applier, - ffi.Pointer context, + CFStringRef CFURLCopyScheme( + CFURLRef anURL, ) { - return _CFDictionaryApplyFunction( - theDict, - applier, - context, + return _CFURLCopyScheme( + anURL, ); } - late final _CFDictionaryApplyFunctionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFDictionaryRef, CFDictionaryApplierFunction, - ffi.Pointer)>>('CFDictionaryApplyFunction'); - late final _CFDictionaryApplyFunction = - _CFDictionaryApplyFunctionPtr.asFunction< - void Function(CFDictionaryRef, CFDictionaryApplierFunction, - ffi.Pointer)>(); + late final _CFURLCopySchemePtr = + _lookup>( + 'CFURLCopyScheme'); + late final _CFURLCopyScheme = + _CFURLCopySchemePtr.asFunction(); - void CFDictionaryAddValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, - ffi.Pointer value, + CFStringRef CFURLCopyNetLocation( + CFURLRef anURL, ) { - return _CFDictionaryAddValue( - theDict, - key, - value, + return _CFURLCopyNetLocation( + anURL, ); } - late final _CFDictionaryAddValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>>('CFDictionaryAddValue'); - late final _CFDictionaryAddValue = _CFDictionaryAddValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>(); + late final _CFURLCopyNetLocationPtr = + _lookup>( + 'CFURLCopyNetLocation'); + late final _CFURLCopyNetLocation = + _CFURLCopyNetLocationPtr.asFunction(); - void CFDictionarySetValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, - ffi.Pointer value, + CFStringRef CFURLCopyPath( + CFURLRef anURL, ) { - return _CFDictionarySetValue( - theDict, - key, - value, + return _CFURLCopyPath( + anURL, ); } - late final _CFDictionarySetValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>>('CFDictionarySetValue'); - late final _CFDictionarySetValue = _CFDictionarySetValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>(); + late final _CFURLCopyPathPtr = + _lookup>( + 'CFURLCopyPath'); + late final _CFURLCopyPath = + _CFURLCopyPathPtr.asFunction(); - void CFDictionaryReplaceValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, - ffi.Pointer value, + CFStringRef CFURLCopyStrictPath( + CFURLRef anURL, + ffi.Pointer isAbsolute, ) { - return _CFDictionaryReplaceValue( - theDict, - key, - value, + return _CFURLCopyStrictPath( + anURL, + isAbsolute, ); } - late final _CFDictionaryReplaceValuePtr = _lookup< + late final _CFURLCopyStrictPathPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>>('CFDictionaryReplaceValue'); - late final _CFDictionaryReplaceValue = - _CFDictionaryReplaceValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer, - ffi.Pointer)>(); + CFStringRef Function( + CFURLRef, ffi.Pointer)>>('CFURLCopyStrictPath'); + late final _CFURLCopyStrictPath = _CFURLCopyStrictPathPtr.asFunction< + CFStringRef Function(CFURLRef, ffi.Pointer)>(); - void CFDictionaryRemoveValue( - CFMutableDictionaryRef theDict, - ffi.Pointer key, + CFStringRef CFURLCopyFileSystemPath( + CFURLRef anURL, + CFURLPathStyle pathStyle, ) { - return _CFDictionaryRemoveValue( - theDict, - key, + return _CFURLCopyFileSystemPath( + anURL, + pathStyle.value, ); } - late final _CFDictionaryRemoveValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableDictionaryRef, - ffi.Pointer)>>('CFDictionaryRemoveValue'); - late final _CFDictionaryRemoveValue = _CFDictionaryRemoveValuePtr.asFunction< - void Function(CFMutableDictionaryRef, ffi.Pointer)>(); + late final _CFURLCopyFileSystemPathPtr = + _lookup>( + 'CFURLCopyFileSystemPath'); + late final _CFURLCopyFileSystemPath = _CFURLCopyFileSystemPathPtr.asFunction< + CFStringRef Function(CFURLRef, int)>(); - void CFDictionaryRemoveAllValues( - CFMutableDictionaryRef theDict, + int CFURLHasDirectoryPath( + CFURLRef anURL, ) { - return _CFDictionaryRemoveAllValues( - theDict, + return _CFURLHasDirectoryPath( + anURL, ); } - late final _CFDictionaryRemoveAllValuesPtr = - _lookup>( - 'CFDictionaryRemoveAllValues'); - late final _CFDictionaryRemoveAllValues = _CFDictionaryRemoveAllValuesPtr - .asFunction(); + late final _CFURLHasDirectoryPathPtr = + _lookup>( + 'CFURLHasDirectoryPath'); + late final _CFURLHasDirectoryPath = + _CFURLHasDirectoryPathPtr.asFunction(); - int CFNotificationCenterGetTypeID() { - return _CFNotificationCenterGetTypeID(); + CFStringRef CFURLCopyResourceSpecifier( + CFURLRef anURL, + ) { + return _CFURLCopyResourceSpecifier( + anURL, + ); } - late final _CFNotificationCenterGetTypeIDPtr = - _lookup>( - 'CFNotificationCenterGetTypeID'); - late final _CFNotificationCenterGetTypeID = - _CFNotificationCenterGetTypeIDPtr.asFunction(); + late final _CFURLCopyResourceSpecifierPtr = + _lookup>( + 'CFURLCopyResourceSpecifier'); + late final _CFURLCopyResourceSpecifier = _CFURLCopyResourceSpecifierPtr + .asFunction(); - CFNotificationCenterRef CFNotificationCenterGetLocalCenter() { - return _CFNotificationCenterGetLocalCenter(); + CFStringRef CFURLCopyHostName( + CFURLRef anURL, + ) { + return _CFURLCopyHostName( + anURL, + ); } - late final _CFNotificationCenterGetLocalCenterPtr = - _lookup>( - 'CFNotificationCenterGetLocalCenter'); - late final _CFNotificationCenterGetLocalCenter = - _CFNotificationCenterGetLocalCenterPtr.asFunction< - CFNotificationCenterRef Function()>(); + late final _CFURLCopyHostNamePtr = + _lookup>( + 'CFURLCopyHostName'); + late final _CFURLCopyHostName = + _CFURLCopyHostNamePtr.asFunction(); - CFNotificationCenterRef CFNotificationCenterGetDistributedCenter() { - return _CFNotificationCenterGetDistributedCenter(); + int CFURLGetPortNumber( + CFURLRef anURL, + ) { + return _CFURLGetPortNumber( + anURL, + ); } - late final _CFNotificationCenterGetDistributedCenterPtr = - _lookup>( - 'CFNotificationCenterGetDistributedCenter'); - late final _CFNotificationCenterGetDistributedCenter = - _CFNotificationCenterGetDistributedCenterPtr.asFunction< - CFNotificationCenterRef Function()>(); + late final _CFURLGetPortNumberPtr = + _lookup>( + 'CFURLGetPortNumber'); + late final _CFURLGetPortNumber = + _CFURLGetPortNumberPtr.asFunction(); - CFNotificationCenterRef CFNotificationCenterGetDarwinNotifyCenter() { - return _CFNotificationCenterGetDarwinNotifyCenter(); + CFStringRef CFURLCopyUserName( + CFURLRef anURL, + ) { + return _CFURLCopyUserName( + anURL, + ); } - late final _CFNotificationCenterGetDarwinNotifyCenterPtr = - _lookup>( - 'CFNotificationCenterGetDarwinNotifyCenter'); - late final _CFNotificationCenterGetDarwinNotifyCenter = - _CFNotificationCenterGetDarwinNotifyCenterPtr.asFunction< - CFNotificationCenterRef Function()>(); + late final _CFURLCopyUserNamePtr = + _lookup>( + 'CFURLCopyUserName'); + late final _CFURLCopyUserName = + _CFURLCopyUserNamePtr.asFunction(); - void CFNotificationCenterAddObserver( - CFNotificationCenterRef center, - ffi.Pointer observer, - CFNotificationCallback callBack, - CFStringRef name, - ffi.Pointer object, - int suspensionBehavior, + CFStringRef CFURLCopyPassword( + CFURLRef anURL, ) { - return _CFNotificationCenterAddObserver( - center, - observer, - callBack, - name, - object, - suspensionBehavior, + return _CFURLCopyPassword( + anURL, ); } - late final _CFNotificationCenterAddObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFNotificationCenterRef, - ffi.Pointer, - CFNotificationCallback, - CFStringRef, - ffi.Pointer, - ffi.Int32)>>('CFNotificationCenterAddObserver'); - late final _CFNotificationCenterAddObserver = - _CFNotificationCenterAddObserverPtr.asFunction< - void Function( - CFNotificationCenterRef, - ffi.Pointer, - CFNotificationCallback, - CFStringRef, - ffi.Pointer, - int)>(); + late final _CFURLCopyPasswordPtr = + _lookup>( + 'CFURLCopyPassword'); + late final _CFURLCopyPassword = + _CFURLCopyPasswordPtr.asFunction(); - void CFNotificationCenterRemoveObserver( - CFNotificationCenterRef center, - ffi.Pointer observer, - CFNotificationName name, - ffi.Pointer object, + CFStringRef CFURLCopyParameterString( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, ) { - return _CFNotificationCenterRemoveObserver( - center, - observer, - name, - object, + return _CFURLCopyParameterString( + anURL, + charactersToLeaveEscaped, ); } - late final _CFNotificationCenterRemoveObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFNotificationCenterRef, - ffi.Pointer, - CFNotificationName, - ffi.Pointer)>>('CFNotificationCenterRemoveObserver'); - late final _CFNotificationCenterRemoveObserver = - _CFNotificationCenterRemoveObserverPtr.asFunction< - void Function(CFNotificationCenterRef, ffi.Pointer, - CFNotificationName, ffi.Pointer)>(); + late final _CFURLCopyParameterStringPtr = + _lookup>( + 'CFURLCopyParameterString'); + late final _CFURLCopyParameterString = _CFURLCopyParameterStringPtr + .asFunction(); - void CFNotificationCenterRemoveEveryObserver( - CFNotificationCenterRef center, - ffi.Pointer observer, + CFStringRef CFURLCopyQueryString( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, ) { - return _CFNotificationCenterRemoveEveryObserver( - center, - observer, + return _CFURLCopyQueryString( + anURL, + charactersToLeaveEscaped, ); } - late final _CFNotificationCenterRemoveEveryObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFNotificationCenterRef, ffi.Pointer)>>( - 'CFNotificationCenterRemoveEveryObserver'); - late final _CFNotificationCenterRemoveEveryObserver = - _CFNotificationCenterRemoveEveryObserverPtr.asFunction< - void Function(CFNotificationCenterRef, ffi.Pointer)>(); + late final _CFURLCopyQueryStringPtr = + _lookup>( + 'CFURLCopyQueryString'); + late final _CFURLCopyQueryString = _CFURLCopyQueryStringPtr.asFunction< + CFStringRef Function(CFURLRef, CFStringRef)>(); - void CFNotificationCenterPostNotification( - CFNotificationCenterRef center, - CFNotificationName name, - ffi.Pointer object, - CFDictionaryRef userInfo, - int deliverImmediately, + CFStringRef CFURLCopyFragment( + CFURLRef anURL, + CFStringRef charactersToLeaveEscaped, ) { - return _CFNotificationCenterPostNotification( - center, - name, - object, - userInfo, - deliverImmediately, + return _CFURLCopyFragment( + anURL, + charactersToLeaveEscaped, ); } - late final _CFNotificationCenterPostNotificationPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFNotificationCenterRef, - CFNotificationName, - ffi.Pointer, - CFDictionaryRef, - Boolean)>>('CFNotificationCenterPostNotification'); - late final _CFNotificationCenterPostNotification = - _CFNotificationCenterPostNotificationPtr.asFunction< - void Function(CFNotificationCenterRef, CFNotificationName, - ffi.Pointer, CFDictionaryRef, int)>(); + late final _CFURLCopyFragmentPtr = + _lookup>( + 'CFURLCopyFragment'); + late final _CFURLCopyFragment = _CFURLCopyFragmentPtr.asFunction< + CFStringRef Function(CFURLRef, CFStringRef)>(); - void CFNotificationCenterPostNotificationWithOptions( - CFNotificationCenterRef center, - CFNotificationName name, - ffi.Pointer object, - CFDictionaryRef userInfo, - int options, + CFStringRef CFURLCopyLastPathComponent( + CFURLRef url, ) { - return _CFNotificationCenterPostNotificationWithOptions( - center, - name, - object, - userInfo, - options, + return _CFURLCopyLastPathComponent( + url, ); } - late final _CFNotificationCenterPostNotificationWithOptionsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFNotificationCenterRef, CFNotificationName, - ffi.Pointer, CFDictionaryRef, CFOptionFlags)>>( - 'CFNotificationCenterPostNotificationWithOptions'); - late final _CFNotificationCenterPostNotificationWithOptions = - _CFNotificationCenterPostNotificationWithOptionsPtr.asFunction< - void Function(CFNotificationCenterRef, CFNotificationName, - ffi.Pointer, CFDictionaryRef, int)>(); + late final _CFURLCopyLastPathComponentPtr = + _lookup>( + 'CFURLCopyLastPathComponent'); + late final _CFURLCopyLastPathComponent = _CFURLCopyLastPathComponentPtr + .asFunction(); - int CFLocaleGetTypeID() { - return _CFLocaleGetTypeID(); + CFStringRef CFURLCopyPathExtension( + CFURLRef url, + ) { + return _CFURLCopyPathExtension( + url, + ); } - late final _CFLocaleGetTypeIDPtr = - _lookup>('CFLocaleGetTypeID'); - late final _CFLocaleGetTypeID = - _CFLocaleGetTypeIDPtr.asFunction(); + late final _CFURLCopyPathExtensionPtr = + _lookup>( + 'CFURLCopyPathExtension'); + late final _CFURLCopyPathExtension = + _CFURLCopyPathExtensionPtr.asFunction(); - CFLocaleRef CFLocaleGetSystem() { - return _CFLocaleGetSystem(); + CFURLRef CFURLCreateCopyAppendingPathComponent( + CFAllocatorRef allocator, + CFURLRef url, + CFStringRef pathComponent, + int isDirectory, + ) { + return _CFURLCreateCopyAppendingPathComponent( + allocator, + url, + pathComponent, + isDirectory, + ); } - late final _CFLocaleGetSystemPtr = - _lookup>('CFLocaleGetSystem'); - late final _CFLocaleGetSystem = - _CFLocaleGetSystemPtr.asFunction(); + late final _CFURLCreateCopyAppendingPathComponentPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, + Boolean)>>('CFURLCreateCopyAppendingPathComponent'); + late final _CFURLCreateCopyAppendingPathComponent = + _CFURLCreateCopyAppendingPathComponentPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, int)>(); - CFLocaleRef CFLocaleCopyCurrent() { - return _CFLocaleCopyCurrent(); + CFURLRef CFURLCreateCopyDeletingLastPathComponent( + CFAllocatorRef allocator, + CFURLRef url, + ) { + return _CFURLCreateCopyDeletingLastPathComponent( + allocator, + url, + ); } - late final _CFLocaleCopyCurrentPtr = - _lookup>( - 'CFLocaleCopyCurrent'); - late final _CFLocaleCopyCurrent = - _CFLocaleCopyCurrentPtr.asFunction(); + late final _CFURLCreateCopyDeletingLastPathComponentPtr = + _lookup>( + 'CFURLCreateCopyDeletingLastPathComponent'); + late final _CFURLCreateCopyDeletingLastPathComponent = + _CFURLCreateCopyDeletingLastPathComponentPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef)>(); - CFArrayRef CFLocaleCopyAvailableLocaleIdentifiers() { - return _CFLocaleCopyAvailableLocaleIdentifiers(); + CFURLRef CFURLCreateCopyAppendingPathExtension( + CFAllocatorRef allocator, + CFURLRef url, + CFStringRef extension1, + ) { + return _CFURLCreateCopyAppendingPathExtension( + allocator, + url, + extension1, + ); } - late final _CFLocaleCopyAvailableLocaleIdentifiersPtr = - _lookup>( - 'CFLocaleCopyAvailableLocaleIdentifiers'); - late final _CFLocaleCopyAvailableLocaleIdentifiers = - _CFLocaleCopyAvailableLocaleIdentifiersPtr.asFunction< - CFArrayRef Function()>(); + late final _CFURLCreateCopyAppendingPathExtensionPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + CFStringRef)>>('CFURLCreateCopyAppendingPathExtension'); + late final _CFURLCreateCopyAppendingPathExtension = + _CFURLCreateCopyAppendingPathExtensionPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); - CFArrayRef CFLocaleCopyISOLanguageCodes() { - return _CFLocaleCopyISOLanguageCodes(); + CFURLRef CFURLCreateCopyDeletingPathExtension( + CFAllocatorRef allocator, + CFURLRef url, + ) { + return _CFURLCreateCopyDeletingPathExtension( + allocator, + url, + ); } - late final _CFLocaleCopyISOLanguageCodesPtr = - _lookup>( - 'CFLocaleCopyISOLanguageCodes'); - late final _CFLocaleCopyISOLanguageCodes = - _CFLocaleCopyISOLanguageCodesPtr.asFunction(); - - CFArrayRef CFLocaleCopyISOCountryCodes() { - return _CFLocaleCopyISOCountryCodes(); - } - - late final _CFLocaleCopyISOCountryCodesPtr = - _lookup>( - 'CFLocaleCopyISOCountryCodes'); - late final _CFLocaleCopyISOCountryCodes = - _CFLocaleCopyISOCountryCodesPtr.asFunction(); + late final _CFURLCreateCopyDeletingPathExtensionPtr = + _lookup>( + 'CFURLCreateCopyDeletingPathExtension'); + late final _CFURLCreateCopyDeletingPathExtension = + _CFURLCreateCopyDeletingPathExtensionPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef)>(); - CFArrayRef CFLocaleCopyISOCurrencyCodes() { - return _CFLocaleCopyISOCurrencyCodes(); + int CFURLGetBytes( + CFURLRef url, + ffi.Pointer buffer, + int bufferLength, + ) { + return _CFURLGetBytes( + url, + buffer, + bufferLength, + ); } - late final _CFLocaleCopyISOCurrencyCodesPtr = - _lookup>( - 'CFLocaleCopyISOCurrencyCodes'); - late final _CFLocaleCopyISOCurrencyCodes = - _CFLocaleCopyISOCurrencyCodesPtr.asFunction(); + late final _CFURLGetBytesPtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + CFURLRef, ffi.Pointer, CFIndex)>>('CFURLGetBytes'); + late final _CFURLGetBytes = _CFURLGetBytesPtr.asFunction< + int Function(CFURLRef, ffi.Pointer, int)>(); - CFArrayRef CFLocaleCopyCommonISOCurrencyCodes() { - return _CFLocaleCopyCommonISOCurrencyCodes(); + CFRange CFURLGetByteRangeForComponent( + CFURLRef url, + CFURLComponentType component, + ffi.Pointer rangeIncludingSeparators, + ) { + return _CFURLGetByteRangeForComponent( + url, + component.value, + rangeIncludingSeparators, + ); } - late final _CFLocaleCopyCommonISOCurrencyCodesPtr = - _lookup>( - 'CFLocaleCopyCommonISOCurrencyCodes'); - late final _CFLocaleCopyCommonISOCurrencyCodes = - _CFLocaleCopyCommonISOCurrencyCodesPtr.asFunction< - CFArrayRef Function()>(); + late final _CFURLGetByteRangeForComponentPtr = _lookup< + ffi.NativeFunction< + CFRange Function(CFURLRef, CFIndex, + ffi.Pointer)>>('CFURLGetByteRangeForComponent'); + late final _CFURLGetByteRangeForComponent = _CFURLGetByteRangeForComponentPtr + .asFunction)>(); - CFArrayRef CFLocaleCopyPreferredLanguages() { - return _CFLocaleCopyPreferredLanguages(); + CFStringRef CFURLCreateStringByReplacingPercentEscapes( + CFAllocatorRef allocator, + CFStringRef originalString, + CFStringRef charactersToLeaveEscaped, + ) { + return _CFURLCreateStringByReplacingPercentEscapes( + allocator, + originalString, + charactersToLeaveEscaped, + ); } - late final _CFLocaleCopyPreferredLanguagesPtr = - _lookup>( - 'CFLocaleCopyPreferredLanguages'); - late final _CFLocaleCopyPreferredLanguages = - _CFLocaleCopyPreferredLanguagesPtr.asFunction(); + late final _CFURLCreateStringByReplacingPercentEscapesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFStringRef)>>('CFURLCreateStringByReplacingPercentEscapes'); + late final _CFURLCreateStringByReplacingPercentEscapes = + _CFURLCreateStringByReplacingPercentEscapesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); - CFLocaleIdentifier CFLocaleCreateCanonicalLanguageIdentifierFromString( + CFStringRef CFURLCreateStringByReplacingPercentEscapesUsingEncoding( CFAllocatorRef allocator, - CFStringRef localeIdentifier, + CFStringRef origString, + CFStringRef charsToLeaveEscaped, + int encoding, ) { - return _CFLocaleCreateCanonicalLanguageIdentifierFromString( + return _CFURLCreateStringByReplacingPercentEscapesUsingEncoding( allocator, - localeIdentifier, + origString, + charsToLeaveEscaped, + encoding, ); } - late final _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( - 'CFLocaleCreateCanonicalLanguageIdentifierFromString'); - late final _CFLocaleCreateCanonicalLanguageIdentifierFromString = - _CFLocaleCreateCanonicalLanguageIdentifierFromStringPtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); + late final _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr = + _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef, + CFStringEncoding)>>( + 'CFURLCreateStringByReplacingPercentEscapesUsingEncoding'); + late final _CFURLCreateStringByReplacingPercentEscapesUsingEncoding = + _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef, CFStringRef, int)>(); - CFLocaleIdentifier CFLocaleCreateCanonicalLocaleIdentifierFromString( + CFStringRef CFURLCreateStringByAddingPercentEscapes( CFAllocatorRef allocator, - CFStringRef localeIdentifier, + CFStringRef originalString, + CFStringRef charactersToLeaveUnescaped, + CFStringRef legalURLCharactersToBeEscaped, + int encoding, ) { - return _CFLocaleCreateCanonicalLocaleIdentifierFromString( + return _CFURLCreateStringByAddingPercentEscapes( allocator, - localeIdentifier, + originalString, + charactersToLeaveUnescaped, + legalURLCharactersToBeEscaped, + encoding, ); } - late final _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>>( - 'CFLocaleCreateCanonicalLocaleIdentifierFromString'); - late final _CFLocaleCreateCanonicalLocaleIdentifierFromString = - _CFLocaleCreateCanonicalLocaleIdentifierFromStringPtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFStringRef)>(); + late final _CFURLCreateStringByAddingPercentEscapesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function( + CFAllocatorRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringEncoding)>>('CFURLCreateStringByAddingPercentEscapes'); + late final _CFURLCreateStringByAddingPercentEscapes = + _CFURLCreateStringByAddingPercentEscapesPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, CFStringRef, CFStringRef, CFStringRef, int)>(); - CFLocaleIdentifier - CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + int CFURLIsFileReferenceURL( + CFURLRef url, + ) { + return _CFURLIsFileReferenceURL( + url, + ); + } + + late final _CFURLIsFileReferenceURLPtr = + _lookup>( + 'CFURLIsFileReferenceURL'); + late final _CFURLIsFileReferenceURL = + _CFURLIsFileReferenceURLPtr.asFunction(); + + CFURLRef CFURLCreateFileReferenceURL( CFAllocatorRef allocator, - int lcode, - int rcode, + CFURLRef url, + ffi.Pointer error, ) { - return _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes( + return _CFURLCreateFileReferenceURL( allocator, - lcode, - rcode, + url, + error, ); } - late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr = - _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function( - CFAllocatorRef, LangCode, RegionCode)>>( - 'CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes'); - late final _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodes = - _CFLocaleCreateCanonicalLocaleIdentifierFromScriptManagerCodesPtr - .asFunction(); + late final _CFURLCreateFileReferenceURLPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + ffi.Pointer)>>('CFURLCreateFileReferenceURL'); + late final _CFURLCreateFileReferenceURL = + _CFURLCreateFileReferenceURLPtr.asFunction< + CFURLRef Function( + CFAllocatorRef, CFURLRef, ffi.Pointer)>(); - CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + CFURLRef CFURLCreateFilePathURL( CFAllocatorRef allocator, - int lcid, + CFURLRef url, + ffi.Pointer error, ) { - return _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode( + return _CFURLCreateFilePathURL( allocator, - lcid, + url, + error, ); } - late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, ffi.Uint32)>>( - 'CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode'); - late final _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCode = - _CFLocaleCreateLocaleIdentifierFromWindowsLocaleCodePtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, int)>(); + late final _CFURLCreateFilePathURLPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, + ffi.Pointer)>>('CFURLCreateFilePathURL'); + late final _CFURLCreateFilePathURL = _CFURLCreateFilePathURLPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFURLRef, ffi.Pointer)>(); - int CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( - CFLocaleIdentifier localeIdentifier, + CFURLRef CFURLCreateFromFSRef( + CFAllocatorRef allocator, + ffi.Pointer fsRef, ) { - return _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier( - localeIdentifier, + return _CFURLCreateFromFSRef( + allocator, + fsRef, ); } - late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr = - _lookup>( - 'CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier'); - late final _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifier = - _CFLocaleGetWindowsLocaleCodeFromLocaleIdentifierPtr.asFunction< - int Function(CFLocaleIdentifier)>(); + late final _CFURLCreateFromFSRefPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function( + CFAllocatorRef, ffi.Pointer)>>('CFURLCreateFromFSRef'); + late final _CFURLCreateFromFSRef = _CFURLCreateFromFSRefPtr.asFunction< + CFURLRef Function(CFAllocatorRef, ffi.Pointer)>(); - int CFLocaleGetLanguageCharacterDirection( - CFStringRef isoLangCode, + int CFURLGetFSRef( + CFURLRef url, + ffi.Pointer fsRef, ) { - return _CFLocaleGetLanguageCharacterDirection( - isoLangCode, + return _CFURLGetFSRef( + url, + fsRef, ); } - late final _CFLocaleGetLanguageCharacterDirectionPtr = - _lookup>( - 'CFLocaleGetLanguageCharacterDirection'); - late final _CFLocaleGetLanguageCharacterDirection = - _CFLocaleGetLanguageCharacterDirectionPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFURLGetFSRefPtr = _lookup< + ffi.NativeFunction)>>( + 'CFURLGetFSRef'); + late final _CFURLGetFSRef = _CFURLGetFSRefPtr.asFunction< + int Function(CFURLRef, ffi.Pointer)>(); - int CFLocaleGetLanguageLineDirection( - CFStringRef isoLangCode, + int CFURLCopyResourcePropertyForKey( + CFURLRef url, + CFStringRef key, + ffi.Pointer propertyValueTypeRefPtr, + ffi.Pointer error, ) { - return _CFLocaleGetLanguageLineDirection( - isoLangCode, + return _CFURLCopyResourcePropertyForKey( + url, + key, + propertyValueTypeRefPtr, + error, ); } - late final _CFLocaleGetLanguageLineDirectionPtr = - _lookup>( - 'CFLocaleGetLanguageLineDirection'); - late final _CFLocaleGetLanguageLineDirection = - _CFLocaleGetLanguageLineDirectionPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFURLCopyResourcePropertyForKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFStringRef, ffi.Pointer, + ffi.Pointer)>>('CFURLCopyResourcePropertyForKey'); + late final _CFURLCopyResourcePropertyForKey = + _CFURLCopyResourcePropertyForKeyPtr.asFunction< + int Function(CFURLRef, CFStringRef, ffi.Pointer, + ffi.Pointer)>(); - CFDictionaryRef CFLocaleCreateComponentsFromLocaleIdentifier( - CFAllocatorRef allocator, - CFLocaleIdentifier localeID, + CFDictionaryRef CFURLCopyResourcePropertiesForKeys( + CFURLRef url, + CFArrayRef keys, + ffi.Pointer error, ) { - return _CFLocaleCreateComponentsFromLocaleIdentifier( - allocator, - localeID, + return _CFURLCopyResourcePropertiesForKeys( + url, + keys, + error, ); } - late final _CFLocaleCreateComponentsFromLocaleIdentifierPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>>( - 'CFLocaleCreateComponentsFromLocaleIdentifier'); - late final _CFLocaleCreateComponentsFromLocaleIdentifier = - _CFLocaleCreateComponentsFromLocaleIdentifierPtr.asFunction< - CFDictionaryRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); + late final _CFURLCopyResourcePropertiesForKeysPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFURLRef, CFArrayRef, + ffi.Pointer)>>('CFURLCopyResourcePropertiesForKeys'); + late final _CFURLCopyResourcePropertiesForKeys = + _CFURLCopyResourcePropertiesForKeysPtr.asFunction< + CFDictionaryRef Function( + CFURLRef, CFArrayRef, ffi.Pointer)>(); - CFLocaleIdentifier CFLocaleCreateLocaleIdentifierFromComponents( - CFAllocatorRef allocator, - CFDictionaryRef dictionary, + int CFURLSetResourcePropertyForKey( + CFURLRef url, + CFStringRef key, + CFTypeRef propertyValue, + ffi.Pointer error, ) { - return _CFLocaleCreateLocaleIdentifierFromComponents( - allocator, - dictionary, + return _CFURLSetResourcePropertyForKey( + url, + key, + propertyValue, + error, ); } - late final _CFLocaleCreateLocaleIdentifierFromComponentsPtr = _lookup< - ffi.NativeFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>>( - 'CFLocaleCreateLocaleIdentifierFromComponents'); - late final _CFLocaleCreateLocaleIdentifierFromComponents = - _CFLocaleCreateLocaleIdentifierFromComponentsPtr.asFunction< - CFLocaleIdentifier Function(CFAllocatorRef, CFDictionaryRef)>(); + late final _CFURLSetResourcePropertyForKeyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFStringRef, CFTypeRef, + ffi.Pointer)>>('CFURLSetResourcePropertyForKey'); + late final _CFURLSetResourcePropertyForKey = + _CFURLSetResourcePropertyForKeyPtr.asFunction< + int Function( + CFURLRef, CFStringRef, CFTypeRef, ffi.Pointer)>(); - CFLocaleRef CFLocaleCreate( - CFAllocatorRef allocator, - CFLocaleIdentifier localeIdentifier, + int CFURLSetResourcePropertiesForKeys( + CFURLRef url, + CFDictionaryRef keyedPropertyValues, + ffi.Pointer error, ) { - return _CFLocaleCreate( - allocator, - localeIdentifier, + return _CFURLSetResourcePropertiesForKeys( + url, + keyedPropertyValues, + error, ); } - late final _CFLocaleCreatePtr = _lookup< + late final _CFURLSetResourcePropertiesForKeysPtr = _lookup< ffi.NativeFunction< - CFLocaleRef Function( - CFAllocatorRef, CFLocaleIdentifier)>>('CFLocaleCreate'); - late final _CFLocaleCreate = _CFLocaleCreatePtr.asFunction< - CFLocaleRef Function(CFAllocatorRef, CFLocaleIdentifier)>(); + Boolean Function(CFURLRef, CFDictionaryRef, + ffi.Pointer)>>('CFURLSetResourcePropertiesForKeys'); + late final _CFURLSetResourcePropertiesForKeys = + _CFURLSetResourcePropertiesForKeysPtr.asFunction< + int Function(CFURLRef, CFDictionaryRef, ffi.Pointer)>(); - CFLocaleRef CFLocaleCreateCopy( - CFAllocatorRef allocator, - CFLocaleRef locale, + late final ffi.Pointer _kCFURLKeysOfUnsetValuesKey = + _lookup('kCFURLKeysOfUnsetValuesKey'); + + CFStringRef get kCFURLKeysOfUnsetValuesKey => + _kCFURLKeysOfUnsetValuesKey.value; + + void CFURLClearResourcePropertyCacheForKey( + CFURLRef url, + CFStringRef key, ) { - return _CFLocaleCreateCopy( - allocator, - locale, + return _CFURLClearResourcePropertyCacheForKey( + url, + key, ); } - late final _CFLocaleCreateCopyPtr = _lookup< - ffi - .NativeFunction>( - 'CFLocaleCreateCopy'); - late final _CFLocaleCreateCopy = _CFLocaleCreateCopyPtr.asFunction< - CFLocaleRef Function(CFAllocatorRef, CFLocaleRef)>(); + late final _CFURLClearResourcePropertyCacheForKeyPtr = + _lookup>( + 'CFURLClearResourcePropertyCacheForKey'); + late final _CFURLClearResourcePropertyCacheForKey = + _CFURLClearResourcePropertyCacheForKeyPtr.asFunction< + void Function(CFURLRef, CFStringRef)>(); - CFLocaleIdentifier CFLocaleGetIdentifier( - CFLocaleRef locale, + void CFURLClearResourcePropertyCache( + CFURLRef url, ) { - return _CFLocaleGetIdentifier( - locale, + return _CFURLClearResourcePropertyCache( + url, ); } - late final _CFLocaleGetIdentifierPtr = - _lookup>( - 'CFLocaleGetIdentifier'); - late final _CFLocaleGetIdentifier = _CFLocaleGetIdentifierPtr.asFunction< - CFLocaleIdentifier Function(CFLocaleRef)>(); + late final _CFURLClearResourcePropertyCachePtr = + _lookup>( + 'CFURLClearResourcePropertyCache'); + late final _CFURLClearResourcePropertyCache = + _CFURLClearResourcePropertyCachePtr.asFunction(); - CFTypeRef CFLocaleGetValue( - CFLocaleRef locale, - CFLocaleKey key, + void CFURLSetTemporaryResourcePropertyForKey( + CFURLRef url, + CFStringRef key, + CFTypeRef propertyValue, ) { - return _CFLocaleGetValue( - locale, + return _CFURLSetTemporaryResourcePropertyForKey( + url, key, + propertyValue, ); } - late final _CFLocaleGetValuePtr = - _lookup>( - 'CFLocaleGetValue'); - late final _CFLocaleGetValue = _CFLocaleGetValuePtr.asFunction< - CFTypeRef Function(CFLocaleRef, CFLocaleKey)>(); + late final _CFURLSetTemporaryResourcePropertyForKeyPtr = _lookup< + ffi + .NativeFunction>( + 'CFURLSetTemporaryResourcePropertyForKey'); + late final _CFURLSetTemporaryResourcePropertyForKey = + _CFURLSetTemporaryResourcePropertyForKeyPtr.asFunction< + void Function(CFURLRef, CFStringRef, CFTypeRef)>(); - CFStringRef CFLocaleCopyDisplayNameForPropertyValue( - CFLocaleRef displayLocale, - CFLocaleKey key, - CFStringRef value, + int CFURLResourceIsReachable( + CFURLRef url, + ffi.Pointer error, ) { - return _CFLocaleCopyDisplayNameForPropertyValue( - displayLocale, - key, - value, + return _CFURLResourceIsReachable( + url, + error, ); } - late final _CFLocaleCopyDisplayNameForPropertyValuePtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFLocaleRef, CFLocaleKey, - CFStringRef)>>('CFLocaleCopyDisplayNameForPropertyValue'); - late final _CFLocaleCopyDisplayNameForPropertyValue = - _CFLocaleCopyDisplayNameForPropertyValuePtr.asFunction< - CFStringRef Function(CFLocaleRef, CFLocaleKey, CFStringRef)>(); + late final _CFURLResourceIsReachablePtr = _lookup< + ffi + .NativeFunction)>>( + 'CFURLResourceIsReachable'); + late final _CFURLResourceIsReachable = _CFURLResourceIsReachablePtr + .asFunction)>(); - late final ffi.Pointer - _kCFLocaleCurrentLocaleDidChangeNotification = - _lookup( - 'kCFLocaleCurrentLocaleDidChangeNotification'); + late final ffi.Pointer _kCFURLNameKey = + _lookup('kCFURLNameKey'); - CFNotificationName get kCFLocaleCurrentLocaleDidChangeNotification => - _kCFLocaleCurrentLocaleDidChangeNotification.value; + CFStringRef get kCFURLNameKey => _kCFURLNameKey.value; - late final ffi.Pointer _kCFLocaleIdentifier = - _lookup('kCFLocaleIdentifier'); + late final ffi.Pointer _kCFURLLocalizedNameKey = + _lookup('kCFURLLocalizedNameKey'); - CFLocaleKey get kCFLocaleIdentifier => _kCFLocaleIdentifier.value; + CFStringRef get kCFURLLocalizedNameKey => _kCFURLLocalizedNameKey.value; - late final ffi.Pointer _kCFLocaleLanguageCode = - _lookup('kCFLocaleLanguageCode'); + late final ffi.Pointer _kCFURLIsRegularFileKey = + _lookup('kCFURLIsRegularFileKey'); - CFLocaleKey get kCFLocaleLanguageCode => _kCFLocaleLanguageCode.value; + CFStringRef get kCFURLIsRegularFileKey => _kCFURLIsRegularFileKey.value; - late final ffi.Pointer _kCFLocaleCountryCode = - _lookup('kCFLocaleCountryCode'); + late final ffi.Pointer _kCFURLIsDirectoryKey = + _lookup('kCFURLIsDirectoryKey'); - CFLocaleKey get kCFLocaleCountryCode => _kCFLocaleCountryCode.value; + CFStringRef get kCFURLIsDirectoryKey => _kCFURLIsDirectoryKey.value; - late final ffi.Pointer _kCFLocaleScriptCode = - _lookup('kCFLocaleScriptCode'); + late final ffi.Pointer _kCFURLIsSymbolicLinkKey = + _lookup('kCFURLIsSymbolicLinkKey'); - CFLocaleKey get kCFLocaleScriptCode => _kCFLocaleScriptCode.value; + CFStringRef get kCFURLIsSymbolicLinkKey => _kCFURLIsSymbolicLinkKey.value; - late final ffi.Pointer _kCFLocaleVariantCode = - _lookup('kCFLocaleVariantCode'); + late final ffi.Pointer _kCFURLIsVolumeKey = + _lookup('kCFURLIsVolumeKey'); - CFLocaleKey get kCFLocaleVariantCode => _kCFLocaleVariantCode.value; + CFStringRef get kCFURLIsVolumeKey => _kCFURLIsVolumeKey.value; - late final ffi.Pointer _kCFLocaleExemplarCharacterSet = - _lookup('kCFLocaleExemplarCharacterSet'); + late final ffi.Pointer _kCFURLIsPackageKey = + _lookup('kCFURLIsPackageKey'); - CFLocaleKey get kCFLocaleExemplarCharacterSet => - _kCFLocaleExemplarCharacterSet.value; + CFStringRef get kCFURLIsPackageKey => _kCFURLIsPackageKey.value; - late final ffi.Pointer _kCFLocaleCalendarIdentifier = - _lookup('kCFLocaleCalendarIdentifier'); + late final ffi.Pointer _kCFURLIsApplicationKey = + _lookup('kCFURLIsApplicationKey'); - CFLocaleKey get kCFLocaleCalendarIdentifier => - _kCFLocaleCalendarIdentifier.value; + CFStringRef get kCFURLIsApplicationKey => _kCFURLIsApplicationKey.value; - late final ffi.Pointer _kCFLocaleCalendar = - _lookup('kCFLocaleCalendar'); + late final ffi.Pointer _kCFURLApplicationIsScriptableKey = + _lookup('kCFURLApplicationIsScriptableKey'); - CFLocaleKey get kCFLocaleCalendar => _kCFLocaleCalendar.value; + CFStringRef get kCFURLApplicationIsScriptableKey => + _kCFURLApplicationIsScriptableKey.value; - late final ffi.Pointer _kCFLocaleCollationIdentifier = - _lookup('kCFLocaleCollationIdentifier'); + late final ffi.Pointer _kCFURLIsSystemImmutableKey = + _lookup('kCFURLIsSystemImmutableKey'); - CFLocaleKey get kCFLocaleCollationIdentifier => - _kCFLocaleCollationIdentifier.value; + CFStringRef get kCFURLIsSystemImmutableKey => + _kCFURLIsSystemImmutableKey.value; - late final ffi.Pointer _kCFLocaleUsesMetricSystem = - _lookup('kCFLocaleUsesMetricSystem'); + late final ffi.Pointer _kCFURLIsUserImmutableKey = + _lookup('kCFURLIsUserImmutableKey'); - CFLocaleKey get kCFLocaleUsesMetricSystem => _kCFLocaleUsesMetricSystem.value; + CFStringRef get kCFURLIsUserImmutableKey => _kCFURLIsUserImmutableKey.value; - late final ffi.Pointer _kCFLocaleMeasurementSystem = - _lookup('kCFLocaleMeasurementSystem'); + late final ffi.Pointer _kCFURLIsHiddenKey = + _lookup('kCFURLIsHiddenKey'); - CFLocaleKey get kCFLocaleMeasurementSystem => - _kCFLocaleMeasurementSystem.value; + CFStringRef get kCFURLIsHiddenKey => _kCFURLIsHiddenKey.value; - late final ffi.Pointer _kCFLocaleDecimalSeparator = - _lookup('kCFLocaleDecimalSeparator'); + late final ffi.Pointer _kCFURLHasHiddenExtensionKey = + _lookup('kCFURLHasHiddenExtensionKey'); - CFLocaleKey get kCFLocaleDecimalSeparator => _kCFLocaleDecimalSeparator.value; + CFStringRef get kCFURLHasHiddenExtensionKey => + _kCFURLHasHiddenExtensionKey.value; - late final ffi.Pointer _kCFLocaleGroupingSeparator = - _lookup('kCFLocaleGroupingSeparator'); + late final ffi.Pointer _kCFURLCreationDateKey = + _lookup('kCFURLCreationDateKey'); - CFLocaleKey get kCFLocaleGroupingSeparator => - _kCFLocaleGroupingSeparator.value; + CFStringRef get kCFURLCreationDateKey => _kCFURLCreationDateKey.value; - late final ffi.Pointer _kCFLocaleCurrencySymbol = - _lookup('kCFLocaleCurrencySymbol'); + late final ffi.Pointer _kCFURLContentAccessDateKey = + _lookup('kCFURLContentAccessDateKey'); - CFLocaleKey get kCFLocaleCurrencySymbol => _kCFLocaleCurrencySymbol.value; + CFStringRef get kCFURLContentAccessDateKey => + _kCFURLContentAccessDateKey.value; - late final ffi.Pointer _kCFLocaleCurrencyCode = - _lookup('kCFLocaleCurrencyCode'); + late final ffi.Pointer _kCFURLContentModificationDateKey = + _lookup('kCFURLContentModificationDateKey'); - CFLocaleKey get kCFLocaleCurrencyCode => _kCFLocaleCurrencyCode.value; + CFStringRef get kCFURLContentModificationDateKey => + _kCFURLContentModificationDateKey.value; - late final ffi.Pointer _kCFLocaleCollatorIdentifier = - _lookup('kCFLocaleCollatorIdentifier'); + late final ffi.Pointer _kCFURLAttributeModificationDateKey = + _lookup('kCFURLAttributeModificationDateKey'); - CFLocaleKey get kCFLocaleCollatorIdentifier => - _kCFLocaleCollatorIdentifier.value; + CFStringRef get kCFURLAttributeModificationDateKey => + _kCFURLAttributeModificationDateKey.value; - late final ffi.Pointer _kCFLocaleQuotationBeginDelimiterKey = - _lookup('kCFLocaleQuotationBeginDelimiterKey'); + late final ffi.Pointer _kCFURLFileIdentifierKey = + _lookup('kCFURLFileIdentifierKey'); - CFLocaleKey get kCFLocaleQuotationBeginDelimiterKey => - _kCFLocaleQuotationBeginDelimiterKey.value; + CFStringRef get kCFURLFileIdentifierKey => _kCFURLFileIdentifierKey.value; - late final ffi.Pointer _kCFLocaleQuotationEndDelimiterKey = - _lookup('kCFLocaleQuotationEndDelimiterKey'); + late final ffi.Pointer _kCFURLFileContentIdentifierKey = + _lookup('kCFURLFileContentIdentifierKey'); - CFLocaleKey get kCFLocaleQuotationEndDelimiterKey => - _kCFLocaleQuotationEndDelimiterKey.value; + CFStringRef get kCFURLFileContentIdentifierKey => + _kCFURLFileContentIdentifierKey.value; - late final ffi.Pointer - _kCFLocaleAlternateQuotationBeginDelimiterKey = - _lookup('kCFLocaleAlternateQuotationBeginDelimiterKey'); + late final ffi.Pointer _kCFURLMayShareFileContentKey = + _lookup('kCFURLMayShareFileContentKey'); - CFLocaleKey get kCFLocaleAlternateQuotationBeginDelimiterKey => - _kCFLocaleAlternateQuotationBeginDelimiterKey.value; + CFStringRef get kCFURLMayShareFileContentKey => + _kCFURLMayShareFileContentKey.value; - late final ffi.Pointer - _kCFLocaleAlternateQuotationEndDelimiterKey = - _lookup('kCFLocaleAlternateQuotationEndDelimiterKey'); + late final ffi.Pointer _kCFURLMayHaveExtendedAttributesKey = + _lookup('kCFURLMayHaveExtendedAttributesKey'); - CFLocaleKey get kCFLocaleAlternateQuotationEndDelimiterKey => - _kCFLocaleAlternateQuotationEndDelimiterKey.value; + CFStringRef get kCFURLMayHaveExtendedAttributesKey => + _kCFURLMayHaveExtendedAttributesKey.value; - late final ffi.Pointer _kCFGregorianCalendar = - _lookup('kCFGregorianCalendar'); + late final ffi.Pointer _kCFURLIsPurgeableKey = + _lookup('kCFURLIsPurgeableKey'); - CFCalendarIdentifier get kCFGregorianCalendar => _kCFGregorianCalendar.value; + CFStringRef get kCFURLIsPurgeableKey => _kCFURLIsPurgeableKey.value; - late final ffi.Pointer _kCFBuddhistCalendar = - _lookup('kCFBuddhistCalendar'); + late final ffi.Pointer _kCFURLIsSparseKey = + _lookup('kCFURLIsSparseKey'); - CFCalendarIdentifier get kCFBuddhistCalendar => _kCFBuddhistCalendar.value; + CFStringRef get kCFURLIsSparseKey => _kCFURLIsSparseKey.value; - late final ffi.Pointer _kCFChineseCalendar = - _lookup('kCFChineseCalendar'); + late final ffi.Pointer _kCFURLLinkCountKey = + _lookup('kCFURLLinkCountKey'); - CFCalendarIdentifier get kCFChineseCalendar => _kCFChineseCalendar.value; + CFStringRef get kCFURLLinkCountKey => _kCFURLLinkCountKey.value; - late final ffi.Pointer _kCFHebrewCalendar = - _lookup('kCFHebrewCalendar'); + late final ffi.Pointer _kCFURLParentDirectoryURLKey = + _lookup('kCFURLParentDirectoryURLKey'); - CFCalendarIdentifier get kCFHebrewCalendar => _kCFHebrewCalendar.value; + CFStringRef get kCFURLParentDirectoryURLKey => + _kCFURLParentDirectoryURLKey.value; - late final ffi.Pointer _kCFIslamicCalendar = - _lookup('kCFIslamicCalendar'); + late final ffi.Pointer _kCFURLVolumeURLKey = + _lookup('kCFURLVolumeURLKey'); - CFCalendarIdentifier get kCFIslamicCalendar => _kCFIslamicCalendar.value; + CFStringRef get kCFURLVolumeURLKey => _kCFURLVolumeURLKey.value; - late final ffi.Pointer _kCFIslamicCivilCalendar = - _lookup('kCFIslamicCivilCalendar'); + late final ffi.Pointer _kCFURLTypeIdentifierKey = + _lookup('kCFURLTypeIdentifierKey'); - CFCalendarIdentifier get kCFIslamicCivilCalendar => - _kCFIslamicCivilCalendar.value; + CFStringRef get kCFURLTypeIdentifierKey => _kCFURLTypeIdentifierKey.value; - late final ffi.Pointer _kCFJapaneseCalendar = - _lookup('kCFJapaneseCalendar'); + late final ffi.Pointer _kCFURLLocalizedTypeDescriptionKey = + _lookup('kCFURLLocalizedTypeDescriptionKey'); - CFCalendarIdentifier get kCFJapaneseCalendar => _kCFJapaneseCalendar.value; + CFStringRef get kCFURLLocalizedTypeDescriptionKey => + _kCFURLLocalizedTypeDescriptionKey.value; - late final ffi.Pointer _kCFRepublicOfChinaCalendar = - _lookup('kCFRepublicOfChinaCalendar'); + late final ffi.Pointer _kCFURLLabelNumberKey = + _lookup('kCFURLLabelNumberKey'); - CFCalendarIdentifier get kCFRepublicOfChinaCalendar => - _kCFRepublicOfChinaCalendar.value; + CFStringRef get kCFURLLabelNumberKey => _kCFURLLabelNumberKey.value; - late final ffi.Pointer _kCFPersianCalendar = - _lookup('kCFPersianCalendar'); + late final ffi.Pointer _kCFURLLabelColorKey = + _lookup('kCFURLLabelColorKey'); - CFCalendarIdentifier get kCFPersianCalendar => _kCFPersianCalendar.value; + CFStringRef get kCFURLLabelColorKey => _kCFURLLabelColorKey.value; - late final ffi.Pointer _kCFIndianCalendar = - _lookup('kCFIndianCalendar'); + late final ffi.Pointer _kCFURLLocalizedLabelKey = + _lookup('kCFURLLocalizedLabelKey'); - CFCalendarIdentifier get kCFIndianCalendar => _kCFIndianCalendar.value; + CFStringRef get kCFURLLocalizedLabelKey => _kCFURLLocalizedLabelKey.value; - late final ffi.Pointer _kCFISO8601Calendar = - _lookup('kCFISO8601Calendar'); + late final ffi.Pointer _kCFURLEffectiveIconKey = + _lookup('kCFURLEffectiveIconKey'); - CFCalendarIdentifier get kCFISO8601Calendar => _kCFISO8601Calendar.value; + CFStringRef get kCFURLEffectiveIconKey => _kCFURLEffectiveIconKey.value; - late final ffi.Pointer _kCFIslamicTabularCalendar = - _lookup('kCFIslamicTabularCalendar'); + late final ffi.Pointer _kCFURLCustomIconKey = + _lookup('kCFURLCustomIconKey'); - CFCalendarIdentifier get kCFIslamicTabularCalendar => - _kCFIslamicTabularCalendar.value; + CFStringRef get kCFURLCustomIconKey => _kCFURLCustomIconKey.value; - late final ffi.Pointer _kCFIslamicUmmAlQuraCalendar = - _lookup('kCFIslamicUmmAlQuraCalendar'); + late final ffi.Pointer _kCFURLFileResourceIdentifierKey = + _lookup('kCFURLFileResourceIdentifierKey'); - CFCalendarIdentifier get kCFIslamicUmmAlQuraCalendar => - _kCFIslamicUmmAlQuraCalendar.value; + CFStringRef get kCFURLFileResourceIdentifierKey => + _kCFURLFileResourceIdentifierKey.value; - double CFAbsoluteTimeGetCurrent() { - return _CFAbsoluteTimeGetCurrent(); - } + late final ffi.Pointer _kCFURLVolumeIdentifierKey = + _lookup('kCFURLVolumeIdentifierKey'); - late final _CFAbsoluteTimeGetCurrentPtr = - _lookup>( - 'CFAbsoluteTimeGetCurrent'); - late final _CFAbsoluteTimeGetCurrent = - _CFAbsoluteTimeGetCurrentPtr.asFunction(); + CFStringRef get kCFURLVolumeIdentifierKey => _kCFURLVolumeIdentifierKey.value; - late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1970 = - _lookup('kCFAbsoluteTimeIntervalSince1970'); + late final ffi.Pointer _kCFURLPreferredIOBlockSizeKey = + _lookup('kCFURLPreferredIOBlockSizeKey'); - double get kCFAbsoluteTimeIntervalSince1970 => - _kCFAbsoluteTimeIntervalSince1970.value; + CFStringRef get kCFURLPreferredIOBlockSizeKey => + _kCFURLPreferredIOBlockSizeKey.value; - late final ffi.Pointer _kCFAbsoluteTimeIntervalSince1904 = - _lookup('kCFAbsoluteTimeIntervalSince1904'); + late final ffi.Pointer _kCFURLIsReadableKey = + _lookup('kCFURLIsReadableKey'); - double get kCFAbsoluteTimeIntervalSince1904 => - _kCFAbsoluteTimeIntervalSince1904.value; + CFStringRef get kCFURLIsReadableKey => _kCFURLIsReadableKey.value; - int CFDateGetTypeID() { - return _CFDateGetTypeID(); - } + late final ffi.Pointer _kCFURLIsWritableKey = + _lookup('kCFURLIsWritableKey'); - late final _CFDateGetTypeIDPtr = - _lookup>('CFDateGetTypeID'); - late final _CFDateGetTypeID = - _CFDateGetTypeIDPtr.asFunction(); + CFStringRef get kCFURLIsWritableKey => _kCFURLIsWritableKey.value; - CFDateRef CFDateCreate( - CFAllocatorRef allocator, - double at, - ) { - return _CFDateCreate( - allocator, - at, - ); - } + late final ffi.Pointer _kCFURLIsExecutableKey = + _lookup('kCFURLIsExecutableKey'); - late final _CFDateCreatePtr = _lookup< - ffi.NativeFunction< - CFDateRef Function(CFAllocatorRef, CFAbsoluteTime)>>('CFDateCreate'); - late final _CFDateCreate = - _CFDateCreatePtr.asFunction(); + CFStringRef get kCFURLIsExecutableKey => _kCFURLIsExecutableKey.value; - double CFDateGetAbsoluteTime( - CFDateRef theDate, - ) { - return _CFDateGetAbsoluteTime( - theDate, - ); - } + late final ffi.Pointer _kCFURLFileSecurityKey = + _lookup('kCFURLFileSecurityKey'); - late final _CFDateGetAbsoluteTimePtr = - _lookup>( - 'CFDateGetAbsoluteTime'); - late final _CFDateGetAbsoluteTime = - _CFDateGetAbsoluteTimePtr.asFunction(); + CFStringRef get kCFURLFileSecurityKey => _kCFURLFileSecurityKey.value; - double CFDateGetTimeIntervalSinceDate( - CFDateRef theDate, - CFDateRef otherDate, - ) { - return _CFDateGetTimeIntervalSinceDate( - theDate, - otherDate, - ); - } + late final ffi.Pointer _kCFURLIsExcludedFromBackupKey = + _lookup('kCFURLIsExcludedFromBackupKey'); - late final _CFDateGetTimeIntervalSinceDatePtr = _lookup< - ffi.NativeFunction>( - 'CFDateGetTimeIntervalSinceDate'); - late final _CFDateGetTimeIntervalSinceDate = - _CFDateGetTimeIntervalSinceDatePtr.asFunction< - double Function(CFDateRef, CFDateRef)>(); + CFStringRef get kCFURLIsExcludedFromBackupKey => + _kCFURLIsExcludedFromBackupKey.value; - int CFDateCompare( - CFDateRef theDate, - CFDateRef otherDate, - ffi.Pointer context, - ) { - return _CFDateCompare( - theDate, - otherDate, - context, - ); - } + late final ffi.Pointer _kCFURLTagNamesKey = + _lookup('kCFURLTagNamesKey'); - late final _CFDateComparePtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - CFDateRef, CFDateRef, ffi.Pointer)>>('CFDateCompare'); - late final _CFDateCompare = _CFDateComparePtr.asFunction< - int Function(CFDateRef, CFDateRef, ffi.Pointer)>(); + CFStringRef get kCFURLTagNamesKey => _kCFURLTagNamesKey.value; - int CFGregorianDateIsValid( - CFGregorianDate gdate, - int unitFlags, - ) { - return _CFGregorianDateIsValid( - gdate, - unitFlags, - ); - } + late final ffi.Pointer _kCFURLPathKey = + _lookup('kCFURLPathKey'); - late final _CFGregorianDateIsValidPtr = _lookup< - ffi.NativeFunction>( - 'CFGregorianDateIsValid'); - late final _CFGregorianDateIsValid = _CFGregorianDateIsValidPtr.asFunction< - int Function(CFGregorianDate, int)>(); + CFStringRef get kCFURLPathKey => _kCFURLPathKey.value; - double CFGregorianDateGetAbsoluteTime( - CFGregorianDate gdate, - CFTimeZoneRef tz, - ) { - return _CFGregorianDateGetAbsoluteTime( - gdate, - tz, - ); - } + late final ffi.Pointer _kCFURLCanonicalPathKey = + _lookup('kCFURLCanonicalPathKey'); - late final _CFGregorianDateGetAbsoluteTimePtr = _lookup< - ffi.NativeFunction< - CFAbsoluteTime Function(CFGregorianDate, - CFTimeZoneRef)>>('CFGregorianDateGetAbsoluteTime'); - late final _CFGregorianDateGetAbsoluteTime = - _CFGregorianDateGetAbsoluteTimePtr.asFunction< - double Function(CFGregorianDate, CFTimeZoneRef)>(); + CFStringRef get kCFURLCanonicalPathKey => _kCFURLCanonicalPathKey.value; - CFGregorianDate CFAbsoluteTimeGetGregorianDate( - double at, - CFTimeZoneRef tz, - ) { - return _CFAbsoluteTimeGetGregorianDate( - at, - tz, - ); - } + late final ffi.Pointer _kCFURLIsMountTriggerKey = + _lookup('kCFURLIsMountTriggerKey'); - late final _CFAbsoluteTimeGetGregorianDatePtr = _lookup< - ffi.NativeFunction< - CFGregorianDate Function(CFAbsoluteTime, - CFTimeZoneRef)>>('CFAbsoluteTimeGetGregorianDate'); - late final _CFAbsoluteTimeGetGregorianDate = - _CFAbsoluteTimeGetGregorianDatePtr.asFunction< - CFGregorianDate Function(double, CFTimeZoneRef)>(); + CFStringRef get kCFURLIsMountTriggerKey => _kCFURLIsMountTriggerKey.value; - double CFAbsoluteTimeAddGregorianUnits( - double at, - CFTimeZoneRef tz, - CFGregorianUnits units, - ) { - return _CFAbsoluteTimeAddGregorianUnits( - at, - tz, - units, - ); - } + late final ffi.Pointer _kCFURLGenerationIdentifierKey = + _lookup('kCFURLGenerationIdentifierKey'); - late final _CFAbsoluteTimeAddGregorianUnitsPtr = _lookup< - ffi.NativeFunction< - CFAbsoluteTime Function(CFAbsoluteTime, CFTimeZoneRef, - CFGregorianUnits)>>('CFAbsoluteTimeAddGregorianUnits'); - late final _CFAbsoluteTimeAddGregorianUnits = - _CFAbsoluteTimeAddGregorianUnitsPtr.asFunction< - double Function(double, CFTimeZoneRef, CFGregorianUnits)>(); + CFStringRef get kCFURLGenerationIdentifierKey => + _kCFURLGenerationIdentifierKey.value; - CFGregorianUnits CFAbsoluteTimeGetDifferenceAsGregorianUnits( - double at1, - double at2, - CFTimeZoneRef tz, - int unitFlags, - ) { - return _CFAbsoluteTimeGetDifferenceAsGregorianUnits( - at1, - at2, - tz, - unitFlags, - ); - } + late final ffi.Pointer _kCFURLDocumentIdentifierKey = + _lookup('kCFURLDocumentIdentifierKey'); - late final _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr = _lookup< - ffi.NativeFunction< - CFGregorianUnits Function( - CFAbsoluteTime, - CFAbsoluteTime, - CFTimeZoneRef, - CFOptionFlags)>>('CFAbsoluteTimeGetDifferenceAsGregorianUnits'); - late final _CFAbsoluteTimeGetDifferenceAsGregorianUnits = - _CFAbsoluteTimeGetDifferenceAsGregorianUnitsPtr.asFunction< - CFGregorianUnits Function(double, double, CFTimeZoneRef, int)>(); + CFStringRef get kCFURLDocumentIdentifierKey => + _kCFURLDocumentIdentifierKey.value; - int CFAbsoluteTimeGetDayOfWeek( - double at, - CFTimeZoneRef tz, - ) { - return _CFAbsoluteTimeGetDayOfWeek( - at, - tz, - ); - } + late final ffi.Pointer _kCFURLAddedToDirectoryDateKey = + _lookup('kCFURLAddedToDirectoryDateKey'); - late final _CFAbsoluteTimeGetDayOfWeekPtr = _lookup< - ffi.NativeFunction>( - 'CFAbsoluteTimeGetDayOfWeek'); - late final _CFAbsoluteTimeGetDayOfWeek = _CFAbsoluteTimeGetDayOfWeekPtr - .asFunction(); + CFStringRef get kCFURLAddedToDirectoryDateKey => + _kCFURLAddedToDirectoryDateKey.value; - int CFAbsoluteTimeGetDayOfYear( - double at, - CFTimeZoneRef tz, - ) { - return _CFAbsoluteTimeGetDayOfYear( - at, - tz, - ); - } + late final ffi.Pointer _kCFURLQuarantinePropertiesKey = + _lookup('kCFURLQuarantinePropertiesKey'); - late final _CFAbsoluteTimeGetDayOfYearPtr = _lookup< - ffi.NativeFunction>( - 'CFAbsoluteTimeGetDayOfYear'); - late final _CFAbsoluteTimeGetDayOfYear = _CFAbsoluteTimeGetDayOfYearPtr - .asFunction(); + CFStringRef get kCFURLQuarantinePropertiesKey => + _kCFURLQuarantinePropertiesKey.value; - int CFAbsoluteTimeGetWeekOfYear( - double at, - CFTimeZoneRef tz, - ) { - return _CFAbsoluteTimeGetWeekOfYear( - at, - tz, - ); - } + late final ffi.Pointer _kCFURLFileResourceTypeKey = + _lookup('kCFURLFileResourceTypeKey'); - late final _CFAbsoluteTimeGetWeekOfYearPtr = _lookup< - ffi.NativeFunction>( - 'CFAbsoluteTimeGetWeekOfYear'); - late final _CFAbsoluteTimeGetWeekOfYear = _CFAbsoluteTimeGetWeekOfYearPtr - .asFunction(); + CFStringRef get kCFURLFileResourceTypeKey => _kCFURLFileResourceTypeKey.value; - int CFDataGetTypeID() { - return _CFDataGetTypeID(); - } + late final ffi.Pointer _kCFURLFileResourceTypeNamedPipe = + _lookup('kCFURLFileResourceTypeNamedPipe'); - late final _CFDataGetTypeIDPtr = - _lookup>('CFDataGetTypeID'); - late final _CFDataGetTypeID = - _CFDataGetTypeIDPtr.asFunction(); + CFStringRef get kCFURLFileResourceTypeNamedPipe => + _kCFURLFileResourceTypeNamedPipe.value; - CFDataRef CFDataCreate( - CFAllocatorRef allocator, - ffi.Pointer bytes, - int length, - ) { - return _CFDataCreate( - allocator, - bytes, - length, - ); - } + late final ffi.Pointer _kCFURLFileResourceTypeCharacterSpecial = + _lookup('kCFURLFileResourceTypeCharacterSpecial'); - late final _CFDataCreatePtr = _lookup< - ffi.NativeFunction< - CFDataRef Function( - CFAllocatorRef, ffi.Pointer, CFIndex)>>('CFDataCreate'); - late final _CFDataCreate = _CFDataCreatePtr.asFunction< - CFDataRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + CFStringRef get kCFURLFileResourceTypeCharacterSpecial => + _kCFURLFileResourceTypeCharacterSpecial.value; - CFDataRef CFDataCreateWithBytesNoCopy( - CFAllocatorRef allocator, - ffi.Pointer bytes, - int length, - CFAllocatorRef bytesDeallocator, - ) { - return _CFDataCreateWithBytesNoCopy( - allocator, - bytes, - length, - bytesDeallocator, - ); - } + late final ffi.Pointer _kCFURLFileResourceTypeDirectory = + _lookup('kCFURLFileResourceTypeDirectory'); - late final _CFDataCreateWithBytesNoCopyPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFAllocatorRef)>>('CFDataCreateWithBytesNoCopy'); - late final _CFDataCreateWithBytesNoCopy = - _CFDataCreateWithBytesNoCopyPtr.asFunction< - CFDataRef Function( - CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + CFStringRef get kCFURLFileResourceTypeDirectory => + _kCFURLFileResourceTypeDirectory.value; - CFDataRef CFDataCreateCopy( - CFAllocatorRef allocator, - CFDataRef theData, - ) { - return _CFDataCreateCopy( - allocator, - theData, - ); - } + late final ffi.Pointer _kCFURLFileResourceTypeBlockSpecial = + _lookup('kCFURLFileResourceTypeBlockSpecial'); - late final _CFDataCreateCopyPtr = _lookup< - ffi.NativeFunction>( - 'CFDataCreateCopy'); - late final _CFDataCreateCopy = _CFDataCreateCopyPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFDataRef)>(); - - CFMutableDataRef CFDataCreateMutable( - CFAllocatorRef allocator, - int capacity, - ) { - return _CFDataCreateMutable( - allocator, - capacity, - ); - } + CFStringRef get kCFURLFileResourceTypeBlockSpecial => + _kCFURLFileResourceTypeBlockSpecial.value; - late final _CFDataCreateMutablePtr = _lookup< - ffi - .NativeFunction>( - 'CFDataCreateMutable'); - late final _CFDataCreateMutable = _CFDataCreateMutablePtr.asFunction< - CFMutableDataRef Function(CFAllocatorRef, int)>(); + late final ffi.Pointer _kCFURLFileResourceTypeRegular = + _lookup('kCFURLFileResourceTypeRegular'); - CFMutableDataRef CFDataCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFDataRef theData, - ) { - return _CFDataCreateMutableCopy( - allocator, - capacity, - theData, - ); - } + CFStringRef get kCFURLFileResourceTypeRegular => + _kCFURLFileResourceTypeRegular.value; - late final _CFDataCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableDataRef Function( - CFAllocatorRef, CFIndex, CFDataRef)>>('CFDataCreateMutableCopy'); - late final _CFDataCreateMutableCopy = _CFDataCreateMutableCopyPtr.asFunction< - CFMutableDataRef Function(CFAllocatorRef, int, CFDataRef)>(); + late final ffi.Pointer _kCFURLFileResourceTypeSymbolicLink = + _lookup('kCFURLFileResourceTypeSymbolicLink'); - int CFDataGetLength( - CFDataRef theData, - ) { - return _CFDataGetLength( - theData, - ); - } + CFStringRef get kCFURLFileResourceTypeSymbolicLink => + _kCFURLFileResourceTypeSymbolicLink.value; - late final _CFDataGetLengthPtr = - _lookup>( - 'CFDataGetLength'); - late final _CFDataGetLength = - _CFDataGetLengthPtr.asFunction(); + late final ffi.Pointer _kCFURLFileResourceTypeSocket = + _lookup('kCFURLFileResourceTypeSocket'); - ffi.Pointer CFDataGetBytePtr( - CFDataRef theData, - ) { - return _CFDataGetBytePtr( - theData, - ); - } + CFStringRef get kCFURLFileResourceTypeSocket => + _kCFURLFileResourceTypeSocket.value; - late final _CFDataGetBytePtrPtr = - _lookup Function(CFDataRef)>>( - 'CFDataGetBytePtr'); - late final _CFDataGetBytePtr = - _CFDataGetBytePtrPtr.asFunction Function(CFDataRef)>(); + late final ffi.Pointer _kCFURLFileResourceTypeUnknown = + _lookup('kCFURLFileResourceTypeUnknown'); - ffi.Pointer CFDataGetMutableBytePtr( - CFMutableDataRef theData, - ) { - return _CFDataGetMutableBytePtr( - theData, - ); - } + CFStringRef get kCFURLFileResourceTypeUnknown => + _kCFURLFileResourceTypeUnknown.value; - late final _CFDataGetMutableBytePtrPtr = _lookup< - ffi.NativeFunction Function(CFMutableDataRef)>>( - 'CFDataGetMutableBytePtr'); - late final _CFDataGetMutableBytePtr = _CFDataGetMutableBytePtrPtr.asFunction< - ffi.Pointer Function(CFMutableDataRef)>(); + late final ffi.Pointer _kCFURLFileSizeKey = + _lookup('kCFURLFileSizeKey'); - void CFDataGetBytes( - CFDataRef theData, - CFRange range, - ffi.Pointer buffer, - ) { - return _CFDataGetBytes( - theData, - range, - buffer, - ); - } + CFStringRef get kCFURLFileSizeKey => _kCFURLFileSizeKey.value; - late final _CFDataGetBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFDataRef, CFRange, ffi.Pointer)>>('CFDataGetBytes'); - late final _CFDataGetBytes = _CFDataGetBytesPtr.asFunction< - void Function(CFDataRef, CFRange, ffi.Pointer)>(); + late final ffi.Pointer _kCFURLFileAllocatedSizeKey = + _lookup('kCFURLFileAllocatedSizeKey'); - void CFDataSetLength( - CFMutableDataRef theData, - int length, - ) { - return _CFDataSetLength( - theData, - length, - ); - } + CFStringRef get kCFURLFileAllocatedSizeKey => + _kCFURLFileAllocatedSizeKey.value; - late final _CFDataSetLengthPtr = - _lookup>( - 'CFDataSetLength'); - late final _CFDataSetLength = - _CFDataSetLengthPtr.asFunction(); + late final ffi.Pointer _kCFURLTotalFileSizeKey = + _lookup('kCFURLTotalFileSizeKey'); - void CFDataIncreaseLength( - CFMutableDataRef theData, - int extraLength, - ) { - return _CFDataIncreaseLength( - theData, - extraLength, - ); - } + CFStringRef get kCFURLTotalFileSizeKey => _kCFURLTotalFileSizeKey.value; - late final _CFDataIncreaseLengthPtr = - _lookup>( - 'CFDataIncreaseLength'); - late final _CFDataIncreaseLength = _CFDataIncreaseLengthPtr.asFunction< - void Function(CFMutableDataRef, int)>(); + late final ffi.Pointer _kCFURLTotalFileAllocatedSizeKey = + _lookup('kCFURLTotalFileAllocatedSizeKey'); - void CFDataAppendBytes( - CFMutableDataRef theData, - ffi.Pointer bytes, - int length, - ) { - return _CFDataAppendBytes( - theData, - bytes, - length, - ); - } + CFStringRef get kCFURLTotalFileAllocatedSizeKey => + _kCFURLTotalFileAllocatedSizeKey.value; - late final _CFDataAppendBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableDataRef, ffi.Pointer, - CFIndex)>>('CFDataAppendBytes'); - late final _CFDataAppendBytes = _CFDataAppendBytesPtr.asFunction< - void Function(CFMutableDataRef, ffi.Pointer, int)>(); + late final ffi.Pointer _kCFURLIsAliasFileKey = + _lookup('kCFURLIsAliasFileKey'); - void CFDataReplaceBytes( - CFMutableDataRef theData, - CFRange range, - ffi.Pointer newBytes, - int newLength, - ) { - return _CFDataReplaceBytes( - theData, - range, - newBytes, - newLength, - ); - } + CFStringRef get kCFURLIsAliasFileKey => _kCFURLIsAliasFileKey.value; - late final _CFDataReplaceBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableDataRef, CFRange, ffi.Pointer, - CFIndex)>>('CFDataReplaceBytes'); - late final _CFDataReplaceBytes = _CFDataReplaceBytesPtr.asFunction< - void Function(CFMutableDataRef, CFRange, ffi.Pointer, int)>(); + late final ffi.Pointer _kCFURLFileProtectionKey = + _lookup('kCFURLFileProtectionKey'); - void CFDataDeleteBytes( - CFMutableDataRef theData, - CFRange range, - ) { - return _CFDataDeleteBytes( - theData, - range, - ); - } + CFStringRef get kCFURLFileProtectionKey => _kCFURLFileProtectionKey.value; - late final _CFDataDeleteBytesPtr = - _lookup>( - 'CFDataDeleteBytes'); - late final _CFDataDeleteBytes = _CFDataDeleteBytesPtr.asFunction< - void Function(CFMutableDataRef, CFRange)>(); + late final ffi.Pointer _kCFURLFileProtectionNone = + _lookup('kCFURLFileProtectionNone'); - CFRange CFDataFind( - CFDataRef theData, - CFDataRef dataToFind, - CFRange searchRange, - int compareOptions, - ) { - return _CFDataFind( - theData, - dataToFind, - searchRange, - compareOptions, - ); - } + CFStringRef get kCFURLFileProtectionNone => _kCFURLFileProtectionNone.value; - late final _CFDataFindPtr = _lookup< - ffi.NativeFunction< - CFRange Function( - CFDataRef, CFDataRef, CFRange, ffi.Int32)>>('CFDataFind'); - late final _CFDataFind = _CFDataFindPtr.asFunction< - CFRange Function(CFDataRef, CFDataRef, CFRange, int)>(); + late final ffi.Pointer _kCFURLFileProtectionComplete = + _lookup('kCFURLFileProtectionComplete'); - int CFCharacterSetGetTypeID() { - return _CFCharacterSetGetTypeID(); - } + CFStringRef get kCFURLFileProtectionComplete => + _kCFURLFileProtectionComplete.value; - late final _CFCharacterSetGetTypeIDPtr = - _lookup>( - 'CFCharacterSetGetTypeID'); - late final _CFCharacterSetGetTypeID = - _CFCharacterSetGetTypeIDPtr.asFunction(); + late final ffi.Pointer _kCFURLFileProtectionCompleteUnlessOpen = + _lookup('kCFURLFileProtectionCompleteUnlessOpen'); - CFCharacterSetRef CFCharacterSetGetPredefined( - int theSetIdentifier, - ) { - return _CFCharacterSetGetPredefined( - theSetIdentifier, - ); - } + CFStringRef get kCFURLFileProtectionCompleteUnlessOpen => + _kCFURLFileProtectionCompleteUnlessOpen.value; - late final _CFCharacterSetGetPredefinedPtr = - _lookup>( - 'CFCharacterSetGetPredefined'); - late final _CFCharacterSetGetPredefined = _CFCharacterSetGetPredefinedPtr - .asFunction(); + late final ffi.Pointer + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication = + _lookup( + 'kCFURLFileProtectionCompleteUntilFirstUserAuthentication'); - CFCharacterSetRef CFCharacterSetCreateWithCharactersInRange( - CFAllocatorRef alloc, - CFRange theRange, - ) { - return _CFCharacterSetCreateWithCharactersInRange( - alloc, - theRange, - ); - } + CFStringRef get kCFURLFileProtectionCompleteUntilFirstUserAuthentication => + _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value; - late final _CFCharacterSetCreateWithCharactersInRangePtr = _lookup< - ffi - .NativeFunction>( - 'CFCharacterSetCreateWithCharactersInRange'); - late final _CFCharacterSetCreateWithCharactersInRange = - _CFCharacterSetCreateWithCharactersInRangePtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFRange)>(); + late final ffi.Pointer + _kCFURLFileProtectionCompleteWhenUserInactive = + _lookup('kCFURLFileProtectionCompleteWhenUserInactive'); - CFCharacterSetRef CFCharacterSetCreateWithCharactersInString( - CFAllocatorRef alloc, - CFStringRef theString, - ) { - return _CFCharacterSetCreateWithCharactersInString( - alloc, - theString, - ); - } + CFStringRef get kCFURLFileProtectionCompleteWhenUserInactive => + _kCFURLFileProtectionCompleteWhenUserInactive.value; - late final _CFCharacterSetCreateWithCharactersInStringPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFStringRef)>>('CFCharacterSetCreateWithCharactersInString'); - late final _CFCharacterSetCreateWithCharactersInString = - _CFCharacterSetCreateWithCharactersInStringPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFStringRef)>(); + late final ffi.Pointer _kCFURLDirectoryEntryCountKey = + _lookup('kCFURLDirectoryEntryCountKey'); - CFCharacterSetRef CFCharacterSetCreateWithBitmapRepresentation( - CFAllocatorRef alloc, - CFDataRef theData, - ) { - return _CFCharacterSetCreateWithBitmapRepresentation( - alloc, - theData, - ); - } + CFStringRef get kCFURLDirectoryEntryCountKey => + _kCFURLDirectoryEntryCountKey.value; - late final _CFCharacterSetCreateWithBitmapRepresentationPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFDataRef)>>('CFCharacterSetCreateWithBitmapRepresentation'); - late final _CFCharacterSetCreateWithBitmapRepresentation = - _CFCharacterSetCreateWithBitmapRepresentationPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFDataRef)>(); + late final ffi.Pointer + _kCFURLVolumeLocalizedFormatDescriptionKey = + _lookup('kCFURLVolumeLocalizedFormatDescriptionKey'); - CFCharacterSetRef CFCharacterSetCreateInvertedSet( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, - ) { - return _CFCharacterSetCreateInvertedSet( - alloc, - theSet, - ); - } + CFStringRef get kCFURLVolumeLocalizedFormatDescriptionKey => + _kCFURLVolumeLocalizedFormatDescriptionKey.value; - late final _CFCharacterSetCreateInvertedSetPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function(CFAllocatorRef, - CFCharacterSetRef)>>('CFCharacterSetCreateInvertedSet'); - late final _CFCharacterSetCreateInvertedSet = - _CFCharacterSetCreateInvertedSetPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + late final ffi.Pointer _kCFURLVolumeTotalCapacityKey = + _lookup('kCFURLVolumeTotalCapacityKey'); - int CFCharacterSetIsSupersetOfSet( - CFCharacterSetRef theSet, - CFCharacterSetRef theOtherset, - ) { - return _CFCharacterSetIsSupersetOfSet( - theSet, - theOtherset, - ); - } + CFStringRef get kCFURLVolumeTotalCapacityKey => + _kCFURLVolumeTotalCapacityKey.value; - late final _CFCharacterSetIsSupersetOfSetPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFCharacterSetRef, - CFCharacterSetRef)>>('CFCharacterSetIsSupersetOfSet'); - late final _CFCharacterSetIsSupersetOfSet = _CFCharacterSetIsSupersetOfSetPtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeAvailableCapacityKey = + _lookup('kCFURLVolumeAvailableCapacityKey'); - int CFCharacterSetHasMemberInPlane( - CFCharacterSetRef theSet, - int thePlane, - ) { - return _CFCharacterSetHasMemberInPlane( - theSet, - thePlane, - ); - } + CFStringRef get kCFURLVolumeAvailableCapacityKey => + _kCFURLVolumeAvailableCapacityKey.value; - late final _CFCharacterSetHasMemberInPlanePtr = - _lookup>( - 'CFCharacterSetHasMemberInPlane'); - late final _CFCharacterSetHasMemberInPlane = - _CFCharacterSetHasMemberInPlanePtr.asFunction< - int Function(CFCharacterSetRef, int)>(); + late final ffi.Pointer + _kCFURLVolumeAvailableCapacityForImportantUsageKey = + _lookup('kCFURLVolumeAvailableCapacityForImportantUsageKey'); - CFMutableCharacterSetRef CFCharacterSetCreateMutable( - CFAllocatorRef alloc, - ) { - return _CFCharacterSetCreateMutable( - alloc, - ); - } + CFStringRef get kCFURLVolumeAvailableCapacityForImportantUsageKey => + _kCFURLVolumeAvailableCapacityForImportantUsageKey.value; - late final _CFCharacterSetCreateMutablePtr = _lookup< - ffi - .NativeFunction>( - 'CFCharacterSetCreateMutable'); - late final _CFCharacterSetCreateMutable = _CFCharacterSetCreateMutablePtr - .asFunction(); + late final ffi.Pointer + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey = + _lookup( + 'kCFURLVolumeAvailableCapacityForOpportunisticUsageKey'); - CFCharacterSetRef CFCharacterSetCreateCopy( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, - ) { - return _CFCharacterSetCreateCopy( - alloc, - theSet, - ); - } + CFStringRef get kCFURLVolumeAvailableCapacityForOpportunisticUsageKey => + _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value; - late final _CFCharacterSetCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFCharacterSetRef Function( - CFAllocatorRef, CFCharacterSetRef)>>('CFCharacterSetCreateCopy'); - late final _CFCharacterSetCreateCopy = - _CFCharacterSetCreateCopyPtr.asFunction< - CFCharacterSetRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + late final ffi.Pointer _kCFURLVolumeResourceCountKey = + _lookup('kCFURLVolumeResourceCountKey'); - CFMutableCharacterSetRef CFCharacterSetCreateMutableCopy( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, - ) { - return _CFCharacterSetCreateMutableCopy( - alloc, - theSet, - ); - } + CFStringRef get kCFURLVolumeResourceCountKey => + _kCFURLVolumeResourceCountKey.value; - late final _CFCharacterSetCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableCharacterSetRef Function(CFAllocatorRef, - CFCharacterSetRef)>>('CFCharacterSetCreateMutableCopy'); - late final _CFCharacterSetCreateMutableCopy = - _CFCharacterSetCreateMutableCopyPtr.asFunction< - CFMutableCharacterSetRef Function( - CFAllocatorRef, CFCharacterSetRef)>(); + late final ffi.Pointer _kCFURLVolumeSupportsPersistentIDsKey = + _lookup('kCFURLVolumeSupportsPersistentIDsKey'); - int CFCharacterSetIsCharacterMember( - CFCharacterSetRef theSet, - int theChar, - ) { - return _CFCharacterSetIsCharacterMember( - theSet, - theChar, - ); - } + CFStringRef get kCFURLVolumeSupportsPersistentIDsKey => + _kCFURLVolumeSupportsPersistentIDsKey.value; - late final _CFCharacterSetIsCharacterMemberPtr = - _lookup>( - 'CFCharacterSetIsCharacterMember'); - late final _CFCharacterSetIsCharacterMember = - _CFCharacterSetIsCharacterMemberPtr.asFunction< - int Function(CFCharacterSetRef, int)>(); + late final ffi.Pointer _kCFURLVolumeSupportsSymbolicLinksKey = + _lookup('kCFURLVolumeSupportsSymbolicLinksKey'); - int CFCharacterSetIsLongCharacterMember( - CFCharacterSetRef theSet, - int theChar, - ) { - return _CFCharacterSetIsLongCharacterMember( - theSet, - theChar, - ); - } + CFStringRef get kCFURLVolumeSupportsSymbolicLinksKey => + _kCFURLVolumeSupportsSymbolicLinksKey.value; - late final _CFCharacterSetIsLongCharacterMemberPtr = _lookup< - ffi.NativeFunction>( - 'CFCharacterSetIsLongCharacterMember'); - late final _CFCharacterSetIsLongCharacterMember = - _CFCharacterSetIsLongCharacterMemberPtr.asFunction< - int Function(CFCharacterSetRef, int)>(); + late final ffi.Pointer _kCFURLVolumeSupportsHardLinksKey = + _lookup('kCFURLVolumeSupportsHardLinksKey'); - CFDataRef CFCharacterSetCreateBitmapRepresentation( - CFAllocatorRef alloc, - CFCharacterSetRef theSet, - ) { - return _CFCharacterSetCreateBitmapRepresentation( - alloc, - theSet, - ); - } + CFStringRef get kCFURLVolumeSupportsHardLinksKey => + _kCFURLVolumeSupportsHardLinksKey.value; - late final _CFCharacterSetCreateBitmapRepresentationPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, - CFCharacterSetRef)>>('CFCharacterSetCreateBitmapRepresentation'); - late final _CFCharacterSetCreateBitmapRepresentation = - _CFCharacterSetCreateBitmapRepresentationPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFCharacterSetRef)>(); + late final ffi.Pointer _kCFURLVolumeSupportsJournalingKey = + _lookup('kCFURLVolumeSupportsJournalingKey'); - void CFCharacterSetAddCharactersInRange( - CFMutableCharacterSetRef theSet, - CFRange theRange, - ) { - return _CFCharacterSetAddCharactersInRange( - theSet, - theRange, - ); - } + CFStringRef get kCFURLVolumeSupportsJournalingKey => + _kCFURLVolumeSupportsJournalingKey.value; - late final _CFCharacterSetAddCharactersInRangePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFRange)>>('CFCharacterSetAddCharactersInRange'); - late final _CFCharacterSetAddCharactersInRange = - _CFCharacterSetAddCharactersInRangePtr.asFunction< - void Function(CFMutableCharacterSetRef, CFRange)>(); + late final ffi.Pointer _kCFURLVolumeIsJournalingKey = + _lookup('kCFURLVolumeIsJournalingKey'); - void CFCharacterSetRemoveCharactersInRange( - CFMutableCharacterSetRef theSet, - CFRange theRange, - ) { - return _CFCharacterSetRemoveCharactersInRange( - theSet, - theRange, - ); - } + CFStringRef get kCFURLVolumeIsJournalingKey => + _kCFURLVolumeIsJournalingKey.value; - late final _CFCharacterSetRemoveCharactersInRangePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFRange)>>('CFCharacterSetRemoveCharactersInRange'); - late final _CFCharacterSetRemoveCharactersInRange = - _CFCharacterSetRemoveCharactersInRangePtr.asFunction< - void Function(CFMutableCharacterSetRef, CFRange)>(); + late final ffi.Pointer _kCFURLVolumeSupportsSparseFilesKey = + _lookup('kCFURLVolumeSupportsSparseFilesKey'); - void CFCharacterSetAddCharactersInString( - CFMutableCharacterSetRef theSet, - CFStringRef theString, - ) { - return _CFCharacterSetAddCharactersInString( - theSet, - theString, - ); - } + CFStringRef get kCFURLVolumeSupportsSparseFilesKey => + _kCFURLVolumeSupportsSparseFilesKey.value; - late final _CFCharacterSetAddCharactersInStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFStringRef)>>('CFCharacterSetAddCharactersInString'); - late final _CFCharacterSetAddCharactersInString = - _CFCharacterSetAddCharactersInStringPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFStringRef)>(); + late final ffi.Pointer _kCFURLVolumeSupportsZeroRunsKey = + _lookup('kCFURLVolumeSupportsZeroRunsKey'); - void CFCharacterSetRemoveCharactersInString( - CFMutableCharacterSetRef theSet, - CFStringRef theString, - ) { - return _CFCharacterSetRemoveCharactersInString( - theSet, - theString, - ); - } + CFStringRef get kCFURLVolumeSupportsZeroRunsKey => + _kCFURLVolumeSupportsZeroRunsKey.value; - late final _CFCharacterSetRemoveCharactersInStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFStringRef)>>('CFCharacterSetRemoveCharactersInString'); - late final _CFCharacterSetRemoveCharactersInString = - _CFCharacterSetRemoveCharactersInStringPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFStringRef)>(); + late final ffi.Pointer + _kCFURLVolumeSupportsCaseSensitiveNamesKey = + _lookup('kCFURLVolumeSupportsCaseSensitiveNamesKey'); - void CFCharacterSetUnion( - CFMutableCharacterSetRef theSet, - CFCharacterSetRef theOtherSet, - ) { - return _CFCharacterSetUnion( - theSet, - theOtherSet, - ); - } + CFStringRef get kCFURLVolumeSupportsCaseSensitiveNamesKey => + _kCFURLVolumeSupportsCaseSensitiveNamesKey.value; - late final _CFCharacterSetUnionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFCharacterSetRef)>>('CFCharacterSetUnion'); - late final _CFCharacterSetUnion = _CFCharacterSetUnionPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); + late final ffi.Pointer + _kCFURLVolumeSupportsCasePreservedNamesKey = + _lookup('kCFURLVolumeSupportsCasePreservedNamesKey'); - void CFCharacterSetIntersect( - CFMutableCharacterSetRef theSet, - CFCharacterSetRef theOtherSet, - ) { - return _CFCharacterSetIntersect( - theSet, - theOtherSet, - ); - } + CFStringRef get kCFURLVolumeSupportsCasePreservedNamesKey => + _kCFURLVolumeSupportsCasePreservedNamesKey.value; - late final _CFCharacterSetIntersectPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableCharacterSetRef, - CFCharacterSetRef)>>('CFCharacterSetIntersect'); - late final _CFCharacterSetIntersect = _CFCharacterSetIntersectPtr.asFunction< - void Function(CFMutableCharacterSetRef, CFCharacterSetRef)>(); + late final ffi.Pointer + _kCFURLVolumeSupportsRootDirectoryDatesKey = + _lookup('kCFURLVolumeSupportsRootDirectoryDatesKey'); - void CFCharacterSetInvert( - CFMutableCharacterSetRef theSet, - ) { - return _CFCharacterSetInvert( - theSet, - ); - } + CFStringRef get kCFURLVolumeSupportsRootDirectoryDatesKey => + _kCFURLVolumeSupportsRootDirectoryDatesKey.value; - late final _CFCharacterSetInvertPtr = - _lookup>( - 'CFCharacterSetInvert'); - late final _CFCharacterSetInvert = _CFCharacterSetInvertPtr.asFunction< - void Function(CFMutableCharacterSetRef)>(); + late final ffi.Pointer _kCFURLVolumeSupportsVolumeSizesKey = + _lookup('kCFURLVolumeSupportsVolumeSizesKey'); - int CFErrorGetTypeID() { - return _CFErrorGetTypeID(); - } + CFStringRef get kCFURLVolumeSupportsVolumeSizesKey => + _kCFURLVolumeSupportsVolumeSizesKey.value; - late final _CFErrorGetTypeIDPtr = - _lookup>('CFErrorGetTypeID'); - late final _CFErrorGetTypeID = - _CFErrorGetTypeIDPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsRenamingKey = + _lookup('kCFURLVolumeSupportsRenamingKey'); - late final ffi.Pointer _kCFErrorDomainPOSIX = - _lookup('kCFErrorDomainPOSIX'); + CFStringRef get kCFURLVolumeSupportsRenamingKey => + _kCFURLVolumeSupportsRenamingKey.value; - CFErrorDomain get kCFErrorDomainPOSIX => _kCFErrorDomainPOSIX.value; + late final ffi.Pointer + _kCFURLVolumeSupportsAdvisoryFileLockingKey = + _lookup('kCFURLVolumeSupportsAdvisoryFileLockingKey'); - late final ffi.Pointer _kCFErrorDomainOSStatus = - _lookup('kCFErrorDomainOSStatus'); + CFStringRef get kCFURLVolumeSupportsAdvisoryFileLockingKey => + _kCFURLVolumeSupportsAdvisoryFileLockingKey.value; - CFErrorDomain get kCFErrorDomainOSStatus => _kCFErrorDomainOSStatus.value; + late final ffi.Pointer _kCFURLVolumeSupportsExtendedSecurityKey = + _lookup('kCFURLVolumeSupportsExtendedSecurityKey'); - late final ffi.Pointer _kCFErrorDomainMach = - _lookup('kCFErrorDomainMach'); + CFStringRef get kCFURLVolumeSupportsExtendedSecurityKey => + _kCFURLVolumeSupportsExtendedSecurityKey.value; - CFErrorDomain get kCFErrorDomainMach => _kCFErrorDomainMach.value; + late final ffi.Pointer _kCFURLVolumeIsBrowsableKey = + _lookup('kCFURLVolumeIsBrowsableKey'); - late final ffi.Pointer _kCFErrorDomainCocoa = - _lookup('kCFErrorDomainCocoa'); + CFStringRef get kCFURLVolumeIsBrowsableKey => + _kCFURLVolumeIsBrowsableKey.value; - CFErrorDomain get kCFErrorDomainCocoa => _kCFErrorDomainCocoa.value; + late final ffi.Pointer _kCFURLVolumeMaximumFileSizeKey = + _lookup('kCFURLVolumeMaximumFileSizeKey'); - late final ffi.Pointer _kCFErrorLocalizedDescriptionKey = - _lookup('kCFErrorLocalizedDescriptionKey'); + CFStringRef get kCFURLVolumeMaximumFileSizeKey => + _kCFURLVolumeMaximumFileSizeKey.value; - CFStringRef get kCFErrorLocalizedDescriptionKey => - _kCFErrorLocalizedDescriptionKey.value; + late final ffi.Pointer _kCFURLVolumeIsEjectableKey = + _lookup('kCFURLVolumeIsEjectableKey'); - late final ffi.Pointer _kCFErrorLocalizedFailureKey = - _lookup('kCFErrorLocalizedFailureKey'); + CFStringRef get kCFURLVolumeIsEjectableKey => + _kCFURLVolumeIsEjectableKey.value; - CFStringRef get kCFErrorLocalizedFailureKey => - _kCFErrorLocalizedFailureKey.value; + late final ffi.Pointer _kCFURLVolumeIsRemovableKey = + _lookup('kCFURLVolumeIsRemovableKey'); - late final ffi.Pointer _kCFErrorLocalizedFailureReasonKey = - _lookup('kCFErrorLocalizedFailureReasonKey'); + CFStringRef get kCFURLVolumeIsRemovableKey => + _kCFURLVolumeIsRemovableKey.value; - CFStringRef get kCFErrorLocalizedFailureReasonKey => - _kCFErrorLocalizedFailureReasonKey.value; + late final ffi.Pointer _kCFURLVolumeIsInternalKey = + _lookup('kCFURLVolumeIsInternalKey'); - late final ffi.Pointer _kCFErrorLocalizedRecoverySuggestionKey = - _lookup('kCFErrorLocalizedRecoverySuggestionKey'); + CFStringRef get kCFURLVolumeIsInternalKey => _kCFURLVolumeIsInternalKey.value; - CFStringRef get kCFErrorLocalizedRecoverySuggestionKey => - _kCFErrorLocalizedRecoverySuggestionKey.value; + late final ffi.Pointer _kCFURLVolumeIsAutomountedKey = + _lookup('kCFURLVolumeIsAutomountedKey'); - late final ffi.Pointer _kCFErrorDescriptionKey = - _lookup('kCFErrorDescriptionKey'); + CFStringRef get kCFURLVolumeIsAutomountedKey => + _kCFURLVolumeIsAutomountedKey.value; - CFStringRef get kCFErrorDescriptionKey => _kCFErrorDescriptionKey.value; + late final ffi.Pointer _kCFURLVolumeIsLocalKey = + _lookup('kCFURLVolumeIsLocalKey'); - late final ffi.Pointer _kCFErrorUnderlyingErrorKey = - _lookup('kCFErrorUnderlyingErrorKey'); + CFStringRef get kCFURLVolumeIsLocalKey => _kCFURLVolumeIsLocalKey.value; - CFStringRef get kCFErrorUnderlyingErrorKey => - _kCFErrorUnderlyingErrorKey.value; + late final ffi.Pointer _kCFURLVolumeIsReadOnlyKey = + _lookup('kCFURLVolumeIsReadOnlyKey'); - late final ffi.Pointer _kCFErrorURLKey = - _lookup('kCFErrorURLKey'); + CFStringRef get kCFURLVolumeIsReadOnlyKey => _kCFURLVolumeIsReadOnlyKey.value; - CFStringRef get kCFErrorURLKey => _kCFErrorURLKey.value; + late final ffi.Pointer _kCFURLVolumeCreationDateKey = + _lookup('kCFURLVolumeCreationDateKey'); - late final ffi.Pointer _kCFErrorFilePathKey = - _lookup('kCFErrorFilePathKey'); + CFStringRef get kCFURLVolumeCreationDateKey => + _kCFURLVolumeCreationDateKey.value; - CFStringRef get kCFErrorFilePathKey => _kCFErrorFilePathKey.value; + late final ffi.Pointer _kCFURLVolumeURLForRemountingKey = + _lookup('kCFURLVolumeURLForRemountingKey'); - CFErrorRef CFErrorCreate( - CFAllocatorRef allocator, - CFErrorDomain domain, - int code, - CFDictionaryRef userInfo, - ) { - return _CFErrorCreate( - allocator, - domain, - code, - userInfo, - ); - } + CFStringRef get kCFURLVolumeURLForRemountingKey => + _kCFURLVolumeURLForRemountingKey.value; - late final _CFErrorCreatePtr = _lookup< - ffi.NativeFunction< - CFErrorRef Function(CFAllocatorRef, CFErrorDomain, CFIndex, - CFDictionaryRef)>>('CFErrorCreate'); - late final _CFErrorCreate = _CFErrorCreatePtr.asFunction< - CFErrorRef Function( - CFAllocatorRef, CFErrorDomain, int, CFDictionaryRef)>(); + late final ffi.Pointer _kCFURLVolumeUUIDStringKey = + _lookup('kCFURLVolumeUUIDStringKey'); - CFErrorRef CFErrorCreateWithUserInfoKeysAndValues( - CFAllocatorRef allocator, - CFErrorDomain domain, - int code, - ffi.Pointer> userInfoKeys, - ffi.Pointer> userInfoValues, - int numUserInfoValues, - ) { - return _CFErrorCreateWithUserInfoKeysAndValues( - allocator, - domain, - code, - userInfoKeys, - userInfoValues, - numUserInfoValues, - ); - } + CFStringRef get kCFURLVolumeUUIDStringKey => _kCFURLVolumeUUIDStringKey.value; - late final _CFErrorCreateWithUserInfoKeysAndValuesPtr = _lookup< - ffi.NativeFunction< - CFErrorRef Function( - CFAllocatorRef, - CFErrorDomain, - CFIndex, - ffi.Pointer>, - ffi.Pointer>, - CFIndex)>>('CFErrorCreateWithUserInfoKeysAndValues'); - late final _CFErrorCreateWithUserInfoKeysAndValues = - _CFErrorCreateWithUserInfoKeysAndValuesPtr.asFunction< - CFErrorRef Function( - CFAllocatorRef, - CFErrorDomain, - int, - ffi.Pointer>, - ffi.Pointer>, - int)>(); + late final ffi.Pointer _kCFURLVolumeNameKey = + _lookup('kCFURLVolumeNameKey'); - CFErrorDomain CFErrorGetDomain( - CFErrorRef err, - ) { - return _CFErrorGetDomain( - err, - ); - } + CFStringRef get kCFURLVolumeNameKey => _kCFURLVolumeNameKey.value; - late final _CFErrorGetDomainPtr = - _lookup>( - 'CFErrorGetDomain'); - late final _CFErrorGetDomain = - _CFErrorGetDomainPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeLocalizedNameKey = + _lookup('kCFURLVolumeLocalizedNameKey'); - int CFErrorGetCode( - CFErrorRef err, - ) { - return _CFErrorGetCode( - err, - ); - } + CFStringRef get kCFURLVolumeLocalizedNameKey => + _kCFURLVolumeLocalizedNameKey.value; - late final _CFErrorGetCodePtr = - _lookup>( - 'CFErrorGetCode'); - late final _CFErrorGetCode = - _CFErrorGetCodePtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeIsEncryptedKey = + _lookup('kCFURLVolumeIsEncryptedKey'); - CFDictionaryRef CFErrorCopyUserInfo( - CFErrorRef err, - ) { - return _CFErrorCopyUserInfo( - err, - ); - } + CFStringRef get kCFURLVolumeIsEncryptedKey => + _kCFURLVolumeIsEncryptedKey.value; - late final _CFErrorCopyUserInfoPtr = - _lookup>( - 'CFErrorCopyUserInfo'); - late final _CFErrorCopyUserInfo = _CFErrorCopyUserInfoPtr.asFunction< - CFDictionaryRef Function(CFErrorRef)>(); + late final ffi.Pointer _kCFURLVolumeIsRootFileSystemKey = + _lookup('kCFURLVolumeIsRootFileSystemKey'); - CFStringRef CFErrorCopyDescription( - CFErrorRef err, - ) { - return _CFErrorCopyDescription( - err, - ); - } + CFStringRef get kCFURLVolumeIsRootFileSystemKey => + _kCFURLVolumeIsRootFileSystemKey.value; - late final _CFErrorCopyDescriptionPtr = - _lookup>( - 'CFErrorCopyDescription'); - late final _CFErrorCopyDescription = - _CFErrorCopyDescriptionPtr.asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsCompressionKey = + _lookup('kCFURLVolumeSupportsCompressionKey'); - CFStringRef CFErrorCopyFailureReason( - CFErrorRef err, - ) { - return _CFErrorCopyFailureReason( - err, - ); - } + CFStringRef get kCFURLVolumeSupportsCompressionKey => + _kCFURLVolumeSupportsCompressionKey.value; - late final _CFErrorCopyFailureReasonPtr = - _lookup>( - 'CFErrorCopyFailureReason'); - late final _CFErrorCopyFailureReason = _CFErrorCopyFailureReasonPtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsFileCloningKey = + _lookup('kCFURLVolumeSupportsFileCloningKey'); - CFStringRef CFErrorCopyRecoverySuggestion( - CFErrorRef err, - ) { - return _CFErrorCopyRecoverySuggestion( - err, - ); - } + CFStringRef get kCFURLVolumeSupportsFileCloningKey => + _kCFURLVolumeSupportsFileCloningKey.value; - late final _CFErrorCopyRecoverySuggestionPtr = - _lookup>( - 'CFErrorCopyRecoverySuggestion'); - late final _CFErrorCopyRecoverySuggestion = _CFErrorCopyRecoverySuggestionPtr - .asFunction(); + late final ffi.Pointer _kCFURLVolumeSupportsSwapRenamingKey = + _lookup('kCFURLVolumeSupportsSwapRenamingKey'); - int CFStringGetTypeID() { - return _CFStringGetTypeID(); - } + CFStringRef get kCFURLVolumeSupportsSwapRenamingKey => + _kCFURLVolumeSupportsSwapRenamingKey.value; - late final _CFStringGetTypeIDPtr = - _lookup>('CFStringGetTypeID'); - late final _CFStringGetTypeID = - _CFStringGetTypeIDPtr.asFunction(); + late final ffi.Pointer + _kCFURLVolumeSupportsExclusiveRenamingKey = + _lookup('kCFURLVolumeSupportsExclusiveRenamingKey'); - CFStringRef CFStringCreateWithPascalString( - CFAllocatorRef alloc, - ConstStr255Param pStr, - int encoding, - ) { - return _CFStringCreateWithPascalString( - alloc, - pStr, - encoding, - ); - } + CFStringRef get kCFURLVolumeSupportsExclusiveRenamingKey => + _kCFURLVolumeSupportsExclusiveRenamingKey.value; - late final _CFStringCreateWithPascalStringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ConstStr255Param, - CFStringEncoding)>>('CFStringCreateWithPascalString'); - late final _CFStringCreateWithPascalString = - _CFStringCreateWithPascalStringPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ConstStr255Param, int)>(); + late final ffi.Pointer _kCFURLVolumeSupportsImmutableFilesKey = + _lookup('kCFURLVolumeSupportsImmutableFilesKey'); - CFStringRef CFStringCreateWithCString( - CFAllocatorRef alloc, - ffi.Pointer cStr, - int encoding, - ) { - return _CFStringCreateWithCString( - alloc, - cStr, - encoding, - ); - } + CFStringRef get kCFURLVolumeSupportsImmutableFilesKey => + _kCFURLVolumeSupportsImmutableFilesKey.value; - late final _CFStringCreateWithCStringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, - CFStringEncoding)>>('CFStringCreateWithCString'); - late final _CFStringCreateWithCString = - _CFStringCreateWithCStringPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + late final ffi.Pointer + _kCFURLVolumeSupportsAccessPermissionsKey = + _lookup('kCFURLVolumeSupportsAccessPermissionsKey'); - CFStringRef CFStringCreateWithBytes( - CFAllocatorRef alloc, - ffi.Pointer bytes, - int numBytes, - int encoding, - int isExternalRepresentation, - ) { - return _CFStringCreateWithBytes( - alloc, - bytes, - numBytes, - encoding, - isExternalRepresentation, - ); - } + CFStringRef get kCFURLVolumeSupportsAccessPermissionsKey => + _kCFURLVolumeSupportsAccessPermissionsKey.value; - late final _CFStringCreateWithBytesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFStringEncoding, Boolean)>>('CFStringCreateWithBytes'); - late final _CFStringCreateWithBytes = _CFStringCreateWithBytesPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, ffi.Pointer, int, int, int)>(); + late final ffi.Pointer _kCFURLVolumeSupportsFileProtectionKey = + _lookup('kCFURLVolumeSupportsFileProtectionKey'); - CFStringRef CFStringCreateWithCharacters( - CFAllocatorRef alloc, - ffi.Pointer chars, - int numChars, - ) { - return _CFStringCreateWithCharacters( - alloc, - chars, - numChars, - ); - } + CFStringRef get kCFURLVolumeSupportsFileProtectionKey => + _kCFURLVolumeSupportsFileProtectionKey.value; - late final _CFStringCreateWithCharactersPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex)>>('CFStringCreateWithCharacters'); - late final _CFStringCreateWithCharacters = - _CFStringCreateWithCharactersPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + late final ffi.Pointer _kCFURLVolumeTypeNameKey = + _lookup('kCFURLVolumeTypeNameKey'); - CFStringRef CFStringCreateWithPascalStringNoCopy( - CFAllocatorRef alloc, - ConstStr255Param pStr, - int encoding, - CFAllocatorRef contentsDeallocator, - ) { - return _CFStringCreateWithPascalStringNoCopy( - alloc, - pStr, - encoding, - contentsDeallocator, - ); - } + CFStringRef get kCFURLVolumeTypeNameKey => _kCFURLVolumeTypeNameKey.value; - late final _CFStringCreateWithPascalStringNoCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, - ConstStr255Param, - CFStringEncoding, - CFAllocatorRef)>>('CFStringCreateWithPascalStringNoCopy'); - late final _CFStringCreateWithPascalStringNoCopy = - _CFStringCreateWithPascalStringNoCopyPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, ConstStr255Param, int, CFAllocatorRef)>(); + late final ffi.Pointer _kCFURLVolumeSubtypeKey = + _lookup('kCFURLVolumeSubtypeKey'); - CFStringRef CFStringCreateWithCStringNoCopy( - CFAllocatorRef alloc, - ffi.Pointer cStr, - int encoding, - CFAllocatorRef contentsDeallocator, - ) { - return _CFStringCreateWithCStringNoCopy( - alloc, - cStr, - encoding, - contentsDeallocator, - ); - } + CFStringRef get kCFURLVolumeSubtypeKey => _kCFURLVolumeSubtypeKey.value; - late final _CFStringCreateWithCStringNoCopyPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, - ffi.Pointer, - CFStringEncoding, - CFAllocatorRef)>>('CFStringCreateWithCStringNoCopy'); - late final _CFStringCreateWithCStringNoCopy = - _CFStringCreateWithCStringNoCopyPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + late final ffi.Pointer _kCFURLVolumeMountFromLocationKey = + _lookup('kCFURLVolumeMountFromLocationKey'); - CFStringRef CFStringCreateWithBytesNoCopy( - CFAllocatorRef alloc, - ffi.Pointer bytes, - int numBytes, - int encoding, - int isExternalRepresentation, - CFAllocatorRef contentsDeallocator, + CFStringRef get kCFURLVolumeMountFromLocationKey => + _kCFURLVolumeMountFromLocationKey.value; + + late final ffi.Pointer _kCFURLIsUbiquitousItemKey = + _lookup('kCFURLIsUbiquitousItemKey'); + + CFStringRef get kCFURLIsUbiquitousItemKey => _kCFURLIsUbiquitousItemKey.value; + + late final ffi.Pointer + _kCFURLUbiquitousItemHasUnresolvedConflictsKey = + _lookup('kCFURLUbiquitousItemHasUnresolvedConflictsKey'); + + CFStringRef get kCFURLUbiquitousItemHasUnresolvedConflictsKey => + _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadedKey = + _lookup('kCFURLUbiquitousItemIsDownloadedKey'); + + CFStringRef get kCFURLUbiquitousItemIsDownloadedKey => + _kCFURLUbiquitousItemIsDownloadedKey.value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadingKey = + _lookup('kCFURLUbiquitousItemIsDownloadingKey'); + + CFStringRef get kCFURLUbiquitousItemIsDownloadingKey => + _kCFURLUbiquitousItemIsDownloadingKey.value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsUploadedKey = + _lookup('kCFURLUbiquitousItemIsUploadedKey'); + + CFStringRef get kCFURLUbiquitousItemIsUploadedKey => + _kCFURLUbiquitousItemIsUploadedKey.value; + + late final ffi.Pointer _kCFURLUbiquitousItemIsUploadingKey = + _lookup('kCFURLUbiquitousItemIsUploadingKey'); + + CFStringRef get kCFURLUbiquitousItemIsUploadingKey => + _kCFURLUbiquitousItemIsUploadingKey.value; + + late final ffi.Pointer + _kCFURLUbiquitousItemPercentDownloadedKey = + _lookup('kCFURLUbiquitousItemPercentDownloadedKey'); + + CFStringRef get kCFURLUbiquitousItemPercentDownloadedKey => + _kCFURLUbiquitousItemPercentDownloadedKey.value; + + late final ffi.Pointer _kCFURLUbiquitousItemPercentUploadedKey = + _lookup('kCFURLUbiquitousItemPercentUploadedKey'); + + CFStringRef get kCFURLUbiquitousItemPercentUploadedKey => + _kCFURLUbiquitousItemPercentUploadedKey.value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusKey = + _lookup('kCFURLUbiquitousItemDownloadingStatusKey'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusKey => + _kCFURLUbiquitousItemDownloadingStatusKey.value; + + late final ffi.Pointer _kCFURLUbiquitousItemDownloadingErrorKey = + _lookup('kCFURLUbiquitousItemDownloadingErrorKey'); + + CFStringRef get kCFURLUbiquitousItemDownloadingErrorKey => + _kCFURLUbiquitousItemDownloadingErrorKey.value; + + late final ffi.Pointer _kCFURLUbiquitousItemUploadingErrorKey = + _lookup('kCFURLUbiquitousItemUploadingErrorKey'); + + CFStringRef get kCFURLUbiquitousItemUploadingErrorKey => + _kCFURLUbiquitousItemUploadingErrorKey.value; + + late final ffi.Pointer + _kCFURLUbiquitousItemIsExcludedFromSyncKey = + _lookup('kCFURLUbiquitousItemIsExcludedFromSyncKey'); + + CFStringRef get kCFURLUbiquitousItemIsExcludedFromSyncKey => + _kCFURLUbiquitousItemIsExcludedFromSyncKey.value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusNotDownloaded = + _lookup( + 'kCFURLUbiquitousItemDownloadingStatusNotDownloaded'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusNotDownloaded => + _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusDownloaded = + _lookup('kCFURLUbiquitousItemDownloadingStatusDownloaded'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusDownloaded => + _kCFURLUbiquitousItemDownloadingStatusDownloaded.value; + + late final ffi.Pointer + _kCFURLUbiquitousItemDownloadingStatusCurrent = + _lookup('kCFURLUbiquitousItemDownloadingStatusCurrent'); + + CFStringRef get kCFURLUbiquitousItemDownloadingStatusCurrent => + _kCFURLUbiquitousItemDownloadingStatusCurrent.value; + + CFDataRef CFURLCreateBookmarkData( + CFAllocatorRef allocator, + CFURLRef url, + CFURLBookmarkCreationOptions options, + CFArrayRef resourcePropertiesToInclude, + CFURLRef relativeToURL, + ffi.Pointer error, ) { - return _CFStringCreateWithBytesNoCopy( - alloc, - bytes, - numBytes, - encoding, - isExternalRepresentation, - contentsDeallocator, + return _CFURLCreateBookmarkData( + allocator, + url, + options.value, + resourcePropertiesToInclude, + relativeToURL, + error, ); } - late final _CFStringCreateWithBytesNoCopyPtr = _lookup< + late final _CFURLCreateBookmarkDataPtr = _lookup< ffi.NativeFunction< - CFStringRef Function( + CFDataRef Function( CFAllocatorRef, - ffi.Pointer, - CFIndex, - CFStringEncoding, - Boolean, - CFAllocatorRef)>>('CFStringCreateWithBytesNoCopy'); - late final _CFStringCreateWithBytesNoCopy = - _CFStringCreateWithBytesNoCopyPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, int, int, - int, CFAllocatorRef)>(); + CFURLRef, + CFOptionFlags, + CFArrayRef, + CFURLRef, + ffi.Pointer)>>('CFURLCreateBookmarkData'); + late final _CFURLCreateBookmarkData = _CFURLCreateBookmarkDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFURLRef, int, CFArrayRef, CFURLRef, + ffi.Pointer)>(); - CFStringRef CFStringCreateWithCharactersNoCopy( - CFAllocatorRef alloc, - ffi.Pointer chars, - int numChars, - CFAllocatorRef contentsDeallocator, + CFURLRef CFURLCreateByResolvingBookmarkData( + CFAllocatorRef allocator, + CFDataRef bookmark, + CFURLBookmarkResolutionOptions options, + CFURLRef relativeToURL, + CFArrayRef resourcePropertiesToInclude, + ffi.Pointer isStale, + ffi.Pointer error, ) { - return _CFStringCreateWithCharactersNoCopy( - alloc, - chars, - numChars, - contentsDeallocator, + return _CFURLCreateByResolvingBookmarkData( + allocator, + bookmark, + options.value, + relativeToURL, + resourcePropertiesToInclude, + isStale, + error, ); } - late final _CFStringCreateWithCharactersNoCopyPtr = _lookup< + late final _CFURLCreateByResolvingBookmarkDataPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFAllocatorRef)>>('CFStringCreateWithCharactersNoCopy'); - late final _CFStringCreateWithCharactersNoCopy = - _CFStringCreateWithCharactersNoCopyPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + CFURLRef Function( + CFAllocatorRef, + CFDataRef, + CFOptionFlags, + CFURLRef, + CFArrayRef, + ffi.Pointer, + ffi.Pointer)>>('CFURLCreateByResolvingBookmarkData'); + late final _CFURLCreateByResolvingBookmarkData = + _CFURLCreateByResolvingBookmarkDataPtr.asFunction< + CFURLRef Function(CFAllocatorRef, CFDataRef, int, CFURLRef, + CFArrayRef, ffi.Pointer, ffi.Pointer)>(); - CFStringRef CFStringCreateWithSubstring( - CFAllocatorRef alloc, - CFStringRef str, - CFRange range, + CFDictionaryRef CFURLCreateResourcePropertiesForKeysFromBookmarkData( + CFAllocatorRef allocator, + CFArrayRef resourcePropertiesToReturn, + CFDataRef bookmark, ) { - return _CFStringCreateWithSubstring( - alloc, - str, - range, + return _CFURLCreateResourcePropertiesForKeysFromBookmarkData( + allocator, + resourcePropertiesToReturn, + bookmark, ); } - late final _CFStringCreateWithSubstringPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFRange)>>('CFStringCreateWithSubstring'); - late final _CFStringCreateWithSubstring = _CFStringCreateWithSubstringPtr - .asFunction(); + late final _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr = _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>>( + 'CFURLCreateResourcePropertiesForKeysFromBookmarkData'); + late final _CFURLCreateResourcePropertiesForKeysFromBookmarkData = + _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr.asFunction< + CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>(); - CFStringRef CFStringCreateCopy( - CFAllocatorRef alloc, - CFStringRef theString, + CFTypeRef CFURLCreateResourcePropertyForKeyFromBookmarkData( + CFAllocatorRef allocator, + CFStringRef resourcePropertyKey, + CFDataRef bookmark, ) { - return _CFStringCreateCopy( - alloc, - theString, + return _CFURLCreateResourcePropertyForKeyFromBookmarkData( + allocator, + resourcePropertyKey, + bookmark, ); } - late final _CFStringCreateCopyPtr = _lookup< - ffi - .NativeFunction>( - 'CFStringCreateCopy'); - late final _CFStringCreateCopy = _CFStringCreateCopyPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef)>(); + late final _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFAllocatorRef, CFStringRef, + CFDataRef)>>('CFURLCreateResourcePropertyForKeyFromBookmarkData'); + late final _CFURLCreateResourcePropertyForKeyFromBookmarkData = + _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr.asFunction< + CFTypeRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); - CFStringRef CFStringCreateWithFormat( - CFAllocatorRef alloc, - CFDictionaryRef formatOptions, - CFStringRef format, + CFDataRef CFURLCreateBookmarkDataFromFile( + CFAllocatorRef allocator, + CFURLRef fileURL, + ffi.Pointer errorRef, ) { - return _CFStringCreateWithFormat( - alloc, - formatOptions, - format, + return _CFURLCreateBookmarkDataFromFile( + allocator, + fileURL, + errorRef, ); } - late final _CFStringCreateWithFormatPtr = _lookup< + late final _CFURLCreateBookmarkDataFromFilePtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, - CFStringRef)>>('CFStringCreateWithFormat'); - late final _CFStringCreateWithFormat = - _CFStringCreateWithFormatPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef)>(); + CFDataRef Function(CFAllocatorRef, CFURLRef, + ffi.Pointer)>>('CFURLCreateBookmarkDataFromFile'); + late final _CFURLCreateBookmarkDataFromFile = + _CFURLCreateBookmarkDataFromFilePtr.asFunction< + CFDataRef Function( + CFAllocatorRef, CFURLRef, ffi.Pointer)>(); - CFStringRef CFStringCreateWithFormatAndArguments( - CFAllocatorRef alloc, - CFDictionaryRef formatOptions, - CFStringRef format, - va_list arguments, + int CFURLWriteBookmarkDataToFile( + CFDataRef bookmarkRef, + CFURLRef fileURL, + int options, + ffi.Pointer errorRef, ) { - return _CFStringCreateWithFormatAndArguments( - alloc, - formatOptions, - format, - arguments, + return _CFURLWriteBookmarkDataToFile( + bookmarkRef, + fileURL, + options, + errorRef, ); } - late final _CFStringCreateWithFormatAndArgumentsPtr = _lookup< + late final _CFURLWriteBookmarkDataToFilePtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, - va_list)>>('CFStringCreateWithFormatAndArguments'); - late final _CFStringCreateWithFormatAndArguments = - _CFStringCreateWithFormatAndArgumentsPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFDictionaryRef, CFStringRef, va_list)>(); + Boolean Function( + CFDataRef, + CFURLRef, + CFURLBookmarkFileCreationOptions, + ffi.Pointer)>>('CFURLWriteBookmarkDataToFile'); + late final _CFURLWriteBookmarkDataToFile = + _CFURLWriteBookmarkDataToFilePtr.asFunction< + int Function(CFDataRef, CFURLRef, int, ffi.Pointer)>(); - CFStringRef CFStringCreateStringWithValidatedFormat( - CFAllocatorRef alloc, - CFDictionaryRef formatOptions, - CFStringRef validFormatSpecifiers, - CFStringRef format, - ffi.Pointer errorPtr, + CFDataRef CFURLCreateBookmarkDataFromAliasRecord( + CFAllocatorRef allocatorRef, + CFDataRef aliasRecordDataRef, ) { - return _CFStringCreateStringWithValidatedFormat( - alloc, - formatOptions, - validFormatSpecifiers, - format, - errorPtr, + return _CFURLCreateBookmarkDataFromAliasRecord( + allocatorRef, + aliasRecordDataRef, ); } - late final _CFStringCreateStringWithValidatedFormatPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, - CFStringRef, ffi.Pointer)>>( - 'CFStringCreateStringWithValidatedFormat'); - late final _CFStringCreateStringWithValidatedFormat = - _CFStringCreateStringWithValidatedFormatPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, - CFStringRef, ffi.Pointer)>(); + late final _CFURLCreateBookmarkDataFromAliasRecordPtr = _lookup< + ffi.NativeFunction>( + 'CFURLCreateBookmarkDataFromAliasRecord'); + late final _CFURLCreateBookmarkDataFromAliasRecord = + _CFURLCreateBookmarkDataFromAliasRecordPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFDataRef)>(); - CFStringRef CFStringCreateStringWithValidatedFormatAndArguments( - CFAllocatorRef alloc, - CFDictionaryRef formatOptions, - CFStringRef validFormatSpecifiers, - CFStringRef format, - va_list arguments, - ffi.Pointer errorPtr, + int CFURLStartAccessingSecurityScopedResource( + CFURLRef url, ) { - return _CFStringCreateStringWithValidatedFormatAndArguments( - alloc, - formatOptions, - validFormatSpecifiers, - format, - arguments, - errorPtr, + return _CFURLStartAccessingSecurityScopedResource( + url, ); } - late final _CFStringCreateStringWithValidatedFormatAndArgumentsPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, - CFStringRef, va_list, ffi.Pointer)>>( - 'CFStringCreateStringWithValidatedFormatAndArguments'); - late final _CFStringCreateStringWithValidatedFormatAndArguments = - _CFStringCreateStringWithValidatedFormatAndArgumentsPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDictionaryRef, CFStringRef, - CFStringRef, va_list, ffi.Pointer)>(); + late final _CFURLStartAccessingSecurityScopedResourcePtr = + _lookup>( + 'CFURLStartAccessingSecurityScopedResource'); + late final _CFURLStartAccessingSecurityScopedResource = + _CFURLStartAccessingSecurityScopedResourcePtr.asFunction< + int Function(CFURLRef)>(); - CFMutableStringRef CFStringCreateMutable( - CFAllocatorRef alloc, - int maxLength, + void CFURLStopAccessingSecurityScopedResource( + CFURLRef url, ) { - return _CFStringCreateMutable( - alloc, - maxLength, + return _CFURLStopAccessingSecurityScopedResource( + url, ); } - late final _CFStringCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableStringRef Function( - CFAllocatorRef, CFIndex)>>('CFStringCreateMutable'); - late final _CFStringCreateMutable = _CFStringCreateMutablePtr.asFunction< - CFMutableStringRef Function(CFAllocatorRef, int)>(); + late final _CFURLStopAccessingSecurityScopedResourcePtr = + _lookup>( + 'CFURLStopAccessingSecurityScopedResource'); + late final _CFURLStopAccessingSecurityScopedResource = + _CFURLStopAccessingSecurityScopedResourcePtr.asFunction< + void Function(CFURLRef)>(); - CFMutableStringRef CFStringCreateMutableCopy( - CFAllocatorRef alloc, - int maxLength, - CFStringRef theString, - ) { - return _CFStringCreateMutableCopy( - alloc, - maxLength, - theString, - ); + late final ffi.Pointer _kCFRunLoopDefaultMode = + _lookup('kCFRunLoopDefaultMode'); + + CFRunLoopMode get kCFRunLoopDefaultMode => _kCFRunLoopDefaultMode.value; + + late final ffi.Pointer _kCFRunLoopCommonModes = + _lookup('kCFRunLoopCommonModes'); + + CFRunLoopMode get kCFRunLoopCommonModes => _kCFRunLoopCommonModes.value; + + int CFRunLoopGetTypeID() { + return _CFRunLoopGetTypeID(); } - late final _CFStringCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableStringRef Function(CFAllocatorRef, CFIndex, - CFStringRef)>>('CFStringCreateMutableCopy'); - late final _CFStringCreateMutableCopy = - _CFStringCreateMutableCopyPtr.asFunction< - CFMutableStringRef Function(CFAllocatorRef, int, CFStringRef)>(); + late final _CFRunLoopGetTypeIDPtr = + _lookup>('CFRunLoopGetTypeID'); + late final _CFRunLoopGetTypeID = + _CFRunLoopGetTypeIDPtr.asFunction(); - CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy( - CFAllocatorRef alloc, - ffi.Pointer chars, - int numChars, - int capacity, - CFAllocatorRef externalCharactersAllocator, - ) { - return _CFStringCreateMutableWithExternalCharactersNoCopy( - alloc, - chars, - numChars, - capacity, - externalCharactersAllocator, - ); + CFRunLoopRef CFRunLoopGetCurrent() { + return _CFRunLoopGetCurrent(); } - late final _CFStringCreateMutableWithExternalCharactersNoCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex, CFIndex, CFAllocatorRef)>>( - 'CFStringCreateMutableWithExternalCharactersNoCopy'); - late final _CFStringCreateMutableWithExternalCharactersNoCopy = - _CFStringCreateMutableWithExternalCharactersNoCopyPtr.asFunction< - CFMutableStringRef Function(CFAllocatorRef, ffi.Pointer, int, - int, CFAllocatorRef)>(); + late final _CFRunLoopGetCurrentPtr = + _lookup>( + 'CFRunLoopGetCurrent'); + late final _CFRunLoopGetCurrent = + _CFRunLoopGetCurrentPtr.asFunction(); - int CFStringGetLength( - CFStringRef theString, - ) { - return _CFStringGetLength( - theString, - ); + CFRunLoopRef CFRunLoopGetMain() { + return _CFRunLoopGetMain(); } - late final _CFStringGetLengthPtr = - _lookup>( - 'CFStringGetLength'); - late final _CFStringGetLength = - _CFStringGetLengthPtr.asFunction(); + late final _CFRunLoopGetMainPtr = + _lookup>('CFRunLoopGetMain'); + late final _CFRunLoopGetMain = + _CFRunLoopGetMainPtr.asFunction(); - int CFStringGetCharacterAtIndex( - CFStringRef theString, - int idx, + CFRunLoopMode CFRunLoopCopyCurrentMode( + CFRunLoopRef rl, ) { - return _CFStringGetCharacterAtIndex( - theString, - idx, + return _CFRunLoopCopyCurrentMode( + rl, ); } - late final _CFStringGetCharacterAtIndexPtr = - _lookup>( - 'CFStringGetCharacterAtIndex'); - late final _CFStringGetCharacterAtIndex = _CFStringGetCharacterAtIndexPtr - .asFunction(); + late final _CFRunLoopCopyCurrentModePtr = + _lookup>( + 'CFRunLoopCopyCurrentMode'); + late final _CFRunLoopCopyCurrentMode = _CFRunLoopCopyCurrentModePtr + .asFunction(); - void CFStringGetCharacters( - CFStringRef theString, - CFRange range, - ffi.Pointer buffer, + CFArrayRef CFRunLoopCopyAllModes( + CFRunLoopRef rl, ) { - return _CFStringGetCharacters( - theString, - range, - buffer, + return _CFRunLoopCopyAllModes( + rl, ); } - late final _CFStringGetCharactersPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFStringRef, CFRange, - ffi.Pointer)>>('CFStringGetCharacters'); - late final _CFStringGetCharacters = _CFStringGetCharactersPtr.asFunction< - void Function(CFStringRef, CFRange, ffi.Pointer)>(); + late final _CFRunLoopCopyAllModesPtr = + _lookup>( + 'CFRunLoopCopyAllModes'); + late final _CFRunLoopCopyAllModes = + _CFRunLoopCopyAllModesPtr.asFunction(); - int CFStringGetPascalString( - CFStringRef theString, - StringPtr buffer, - int bufferSize, - int encoding, + void CFRunLoopAddCommonMode( + CFRunLoopRef rl, + CFRunLoopMode mode, ) { - return _CFStringGetPascalString( - theString, - buffer, - bufferSize, - encoding, + return _CFRunLoopAddCommonMode( + rl, + mode, ); } - late final _CFStringGetPascalStringPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, StringPtr, CFIndex, - CFStringEncoding)>>('CFStringGetPascalString'); - late final _CFStringGetPascalString = _CFStringGetPascalStringPtr.asFunction< - int Function(CFStringRef, StringPtr, int, int)>(); + late final _CFRunLoopAddCommonModePtr = _lookup< + ffi.NativeFunction>( + 'CFRunLoopAddCommonMode'); + late final _CFRunLoopAddCommonMode = _CFRunLoopAddCommonModePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopMode)>(); - int CFStringGetCString( - CFStringRef theString, - ffi.Pointer buffer, - int bufferSize, - int encoding, + double CFRunLoopGetNextTimerFireDate( + CFRunLoopRef rl, + CFRunLoopMode mode, ) { - return _CFStringGetCString( - theString, - buffer, - bufferSize, - encoding, + return _CFRunLoopGetNextTimerFireDate( + rl, + mode, ); } - late final _CFStringGetCStringPtr = _lookup< + late final _CFRunLoopGetNextTimerFireDatePtr = _lookup< ffi.NativeFunction< - Boolean Function(CFStringRef, ffi.Pointer, CFIndex, - CFStringEncoding)>>('CFStringGetCString'); - late final _CFStringGetCString = _CFStringGetCStringPtr.asFunction< - int Function(CFStringRef, ffi.Pointer, int, int)>(); + CFAbsoluteTime Function( + CFRunLoopRef, CFRunLoopMode)>>('CFRunLoopGetNextTimerFireDate'); + late final _CFRunLoopGetNextTimerFireDate = _CFRunLoopGetNextTimerFireDatePtr + .asFunction(); - ConstStringPtr CFStringGetPascalStringPtr( - CFStringRef theString, - int encoding, + void CFRunLoopRun() { + return _CFRunLoopRun(); + } + + late final _CFRunLoopRunPtr = + _lookup>('CFRunLoopRun'); + late final _CFRunLoopRun = _CFRunLoopRunPtr.asFunction(); + + CFRunLoopRunResult CFRunLoopRunInMode( + CFRunLoopMode mode, + DartCFTimeInterval seconds, + DartBoolean returnAfterSourceHandled, ) { - return _CFStringGetPascalStringPtr1( - theString, - encoding, - ); + return CFRunLoopRunResult.fromValue(_CFRunLoopRunInMode( + mode, + seconds, + returnAfterSourceHandled, + )); } - late final _CFStringGetPascalStringPtrPtr = _lookup< + late final _CFRunLoopRunInModePtr = _lookup< ffi.NativeFunction< - ConstStringPtr Function( - CFStringRef, CFStringEncoding)>>('CFStringGetPascalStringPtr'); - late final _CFStringGetPascalStringPtr1 = _CFStringGetPascalStringPtrPtr - .asFunction(); + SInt32 Function( + CFRunLoopMode, CFTimeInterval, Boolean)>>('CFRunLoopRunInMode'); + late final _CFRunLoopRunInMode = _CFRunLoopRunInModePtr.asFunction< + int Function(CFRunLoopMode, double, int)>(); - ffi.Pointer CFStringGetCStringPtr( - CFStringRef theString, - int encoding, + int CFRunLoopIsWaiting( + CFRunLoopRef rl, ) { - return _CFStringGetCStringPtr1( - theString, - encoding, + return _CFRunLoopIsWaiting( + rl, ); } - late final _CFStringGetCStringPtrPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFStringRef, CFStringEncoding)>>('CFStringGetCStringPtr'); - late final _CFStringGetCStringPtr1 = _CFStringGetCStringPtrPtr.asFunction< - ffi.Pointer Function(CFStringRef, int)>(); + late final _CFRunLoopIsWaitingPtr = + _lookup>( + 'CFRunLoopIsWaiting'); + late final _CFRunLoopIsWaiting = + _CFRunLoopIsWaitingPtr.asFunction(); - ffi.Pointer CFStringGetCharactersPtr( - CFStringRef theString, + void CFRunLoopWakeUp( + CFRunLoopRef rl, ) { - return _CFStringGetCharactersPtr1( - theString, + return _CFRunLoopWakeUp( + rl, ); } - late final _CFStringGetCharactersPtrPtr = - _lookup Function(CFStringRef)>>( - 'CFStringGetCharactersPtr'); - late final _CFStringGetCharactersPtr1 = _CFStringGetCharactersPtrPtr - .asFunction Function(CFStringRef)>(); + late final _CFRunLoopWakeUpPtr = + _lookup>( + 'CFRunLoopWakeUp'); + late final _CFRunLoopWakeUp = + _CFRunLoopWakeUpPtr.asFunction(); - int CFStringGetBytes( - CFStringRef theString, - CFRange range, - int encoding, - int lossByte, - int isExternalRepresentation, - ffi.Pointer buffer, - int maxBufLen, - ffi.Pointer usedBufLen, + void CFRunLoopStop( + CFRunLoopRef rl, ) { - return _CFStringGetBytes( - theString, - range, - encoding, - lossByte, - isExternalRepresentation, - buffer, - maxBufLen, - usedBufLen, + return _CFRunLoopStop( + rl, ); } - late final _CFStringGetBytesPtr = _lookup< - ffi.NativeFunction< - CFIndex Function( - CFStringRef, - CFRange, - CFStringEncoding, - UInt8, - Boolean, - ffi.Pointer, - CFIndex, - ffi.Pointer)>>('CFStringGetBytes'); - late final _CFStringGetBytes = _CFStringGetBytesPtr.asFunction< - int Function(CFStringRef, CFRange, int, int, int, ffi.Pointer, int, - ffi.Pointer)>(); + late final _CFRunLoopStopPtr = + _lookup>( + 'CFRunLoopStop'); + late final _CFRunLoopStop = + _CFRunLoopStopPtr.asFunction(); - CFStringRef CFStringCreateFromExternalRepresentation( - CFAllocatorRef alloc, - CFDataRef data, - int encoding, + void CFRunLoopPerformBlock( + CFRunLoopRef rl, + CFTypeRef mode, + objc.ObjCBlock block, ) { - return _CFStringCreateFromExternalRepresentation( - alloc, - data, - encoding, + return _CFRunLoopPerformBlock( + rl, + mode, + block.ref.pointer, ); } - late final _CFStringCreateFromExternalRepresentationPtr = _lookup< + late final _CFRunLoopPerformBlockPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDataRef, - CFStringEncoding)>>('CFStringCreateFromExternalRepresentation'); - late final _CFStringCreateFromExternalRepresentation = - _CFStringCreateFromExternalRepresentationPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDataRef, int)>(); + ffi.Void Function(CFRunLoopRef, CFTypeRef, + ffi.Pointer)>>('CFRunLoopPerformBlock'); + late final _CFRunLoopPerformBlock = _CFRunLoopPerformBlockPtr.asFunction< + void Function( + CFRunLoopRef, CFTypeRef, ffi.Pointer)>(); - CFDataRef CFStringCreateExternalRepresentation( - CFAllocatorRef alloc, - CFStringRef theString, - int encoding, - int lossByte, + int CFRunLoopContainsSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, ) { - return _CFStringCreateExternalRepresentation( - alloc, - theString, - encoding, - lossByte, + return _CFRunLoopContainsSource( + rl, + source, + mode, ); } - late final _CFStringCreateExternalRepresentationPtr = _lookup< + late final _CFRunLoopContainsSourcePtr = _lookup< ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFStringRef, CFStringEncoding, - UInt8)>>('CFStringCreateExternalRepresentation'); - late final _CFStringCreateExternalRepresentation = - _CFStringCreateExternalRepresentationPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFStringRef, int, int)>(); + Boolean Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopContainsSource'); + late final _CFRunLoopContainsSource = _CFRunLoopContainsSourcePtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); - int CFStringGetSmallestEncoding( - CFStringRef theString, + void CFRunLoopAddSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, ) { - return _CFStringGetSmallestEncoding( - theString, + return _CFRunLoopAddSource( + rl, + source, + mode, ); } - late final _CFStringGetSmallestEncodingPtr = - _lookup>( - 'CFStringGetSmallestEncoding'); - late final _CFStringGetSmallestEncoding = - _CFStringGetSmallestEncodingPtr.asFunction(); + late final _CFRunLoopAddSourcePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopAddSource'); + late final _CFRunLoopAddSource = _CFRunLoopAddSourcePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); - int CFStringGetFastestEncoding( - CFStringRef theString, + void CFRunLoopRemoveSource( + CFRunLoopRef rl, + CFRunLoopSourceRef source, + CFRunLoopMode mode, ) { - return _CFStringGetFastestEncoding( - theString, + return _CFRunLoopRemoveSource( + rl, + source, + mode, ); } - late final _CFStringGetFastestEncodingPtr = - _lookup>( - 'CFStringGetFastestEncoding'); - late final _CFStringGetFastestEncoding = - _CFStringGetFastestEncodingPtr.asFunction(); + late final _CFRunLoopRemoveSourcePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, + CFRunLoopMode)>>('CFRunLoopRemoveSource'); + late final _CFRunLoopRemoveSource = _CFRunLoopRemoveSourcePtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); - int CFStringGetSystemEncoding() { - return _CFStringGetSystemEncoding(); + int CFRunLoopContainsObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, + ) { + return _CFRunLoopContainsObserver( + rl, + observer, + mode, + ); } - late final _CFStringGetSystemEncodingPtr = - _lookup>( - 'CFStringGetSystemEncoding'); - late final _CFStringGetSystemEncoding = - _CFStringGetSystemEncodingPtr.asFunction(); + late final _CFRunLoopContainsObserverPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopContainsObserver'); + late final _CFRunLoopContainsObserver = + _CFRunLoopContainsObserverPtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); - int CFStringGetMaximumSizeForEncoding( - int length, - int encoding, + void CFRunLoopAddObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, ) { - return _CFStringGetMaximumSizeForEncoding( - length, - encoding, + return _CFRunLoopAddObserver( + rl, + observer, + mode, ); } - late final _CFStringGetMaximumSizeForEncodingPtr = - _lookup>( - 'CFStringGetMaximumSizeForEncoding'); - late final _CFStringGetMaximumSizeForEncoding = - _CFStringGetMaximumSizeForEncodingPtr.asFunction< - int Function(int, int)>(); + late final _CFRunLoopAddObserverPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopAddObserver'); + late final _CFRunLoopAddObserver = _CFRunLoopAddObserverPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); - int CFStringGetFileSystemRepresentation( - CFStringRef string, - ffi.Pointer buffer, - int maxBufLen, + void CFRunLoopRemoveObserver( + CFRunLoopRef rl, + CFRunLoopObserverRef observer, + CFRunLoopMode mode, ) { - return _CFStringGetFileSystemRepresentation( - string, - buffer, - maxBufLen, + return _CFRunLoopRemoveObserver( + rl, + observer, + mode, ); } - late final _CFStringGetFileSystemRepresentationPtr = _lookup< + late final _CFRunLoopRemoveObserverPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFStringRef, ffi.Pointer, - CFIndex)>>('CFStringGetFileSystemRepresentation'); - late final _CFStringGetFileSystemRepresentation = - _CFStringGetFileSystemRepresentationPtr.asFunction< - int Function(CFStringRef, ffi.Pointer, int)>(); + ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, + CFRunLoopMode)>>('CFRunLoopRemoveObserver'); + late final _CFRunLoopRemoveObserver = _CFRunLoopRemoveObserverPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); - int CFStringGetMaximumSizeOfFileSystemRepresentation( - CFStringRef string, + int CFRunLoopContainsTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, ) { - return _CFStringGetMaximumSizeOfFileSystemRepresentation( - string, + return _CFRunLoopContainsTimer( + rl, + timer, + mode, ); } - late final _CFStringGetMaximumSizeOfFileSystemRepresentationPtr = - _lookup>( - 'CFStringGetMaximumSizeOfFileSystemRepresentation'); - late final _CFStringGetMaximumSizeOfFileSystemRepresentation = - _CFStringGetMaximumSizeOfFileSystemRepresentationPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFRunLoopContainsTimerPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopContainsTimer'); + late final _CFRunLoopContainsTimer = _CFRunLoopContainsTimerPtr.asFunction< + int Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); - CFStringRef CFStringCreateWithFileSystemRepresentation( - CFAllocatorRef alloc, - ffi.Pointer buffer, + void CFRunLoopAddTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, ) { - return _CFStringCreateWithFileSystemRepresentation( - alloc, - buffer, + return _CFRunLoopAddTimer( + rl, + timer, + mode, ); } - late final _CFStringCreateWithFileSystemRepresentationPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer)>>( - 'CFStringCreateWithFileSystemRepresentation'); - late final _CFStringCreateWithFileSystemRepresentation = - _CFStringCreateWithFileSystemRepresentationPtr.asFunction< - CFStringRef Function(CFAllocatorRef, ffi.Pointer)>(); + late final _CFRunLoopAddTimerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopAddTimer'); + late final _CFRunLoopAddTimer = _CFRunLoopAddTimerPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); - int CFStringCompareWithOptionsAndLocale( - CFStringRef theString1, - CFStringRef theString2, - CFRange rangeToCompare, - int compareOptions, - CFLocaleRef locale, + void CFRunLoopRemoveTimer( + CFRunLoopRef rl, + CFRunLoopTimerRef timer, + CFRunLoopMode mode, ) { - return _CFStringCompareWithOptionsAndLocale( - theString1, - theString2, - rangeToCompare, - compareOptions, - locale, + return _CFRunLoopRemoveTimer( + rl, + timer, + mode, ); } - late final _CFStringCompareWithOptionsAndLocalePtr = _lookup< + late final _CFRunLoopRemoveTimerPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, - CFLocaleRef)>>('CFStringCompareWithOptionsAndLocale'); - late final _CFStringCompareWithOptionsAndLocale = - _CFStringCompareWithOptionsAndLocalePtr.asFunction< - int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef)>(); + ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, + CFRunLoopMode)>>('CFRunLoopRemoveTimer'); + late final _CFRunLoopRemoveTimer = _CFRunLoopRemoveTimerPtr.asFunction< + void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); - int CFStringCompareWithOptions( - CFStringRef theString1, - CFStringRef theString2, - CFRange rangeToCompare, - int compareOptions, + int CFRunLoopSourceGetTypeID() { + return _CFRunLoopSourceGetTypeID(); + } + + late final _CFRunLoopSourceGetTypeIDPtr = + _lookup>( + 'CFRunLoopSourceGetTypeID'); + late final _CFRunLoopSourceGetTypeID = + _CFRunLoopSourceGetTypeIDPtr.asFunction(); + + CFRunLoopSourceRef CFRunLoopSourceCreate( + CFAllocatorRef allocator, + int order, + ffi.Pointer context, ) { - return _CFStringCompareWithOptions( - theString1, - theString2, - rangeToCompare, - compareOptions, + return _CFRunLoopSourceCreate( + allocator, + order, + context, ); } - late final _CFStringCompareWithOptionsPtr = _lookup< + late final _CFRunLoopSourceCreatePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFStringRef, CFStringRef, CFRange, - ffi.Int32)>>('CFStringCompareWithOptions'); - late final _CFStringCompareWithOptions = _CFStringCompareWithOptionsPtr - .asFunction(); + CFRunLoopSourceRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFRunLoopSourceCreate'); + late final _CFRunLoopSourceCreate = _CFRunLoopSourceCreatePtr.asFunction< + CFRunLoopSourceRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - int CFStringCompare( - CFStringRef theString1, - CFStringRef theString2, - int compareOptions, + int CFRunLoopSourceGetOrder( + CFRunLoopSourceRef source, ) { - return _CFStringCompare( - theString1, - theString2, - compareOptions, + return _CFRunLoopSourceGetOrder( + source, ); } - late final _CFStringComparePtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - CFStringRef, CFStringRef, ffi.Int32)>>('CFStringCompare'); - late final _CFStringCompare = _CFStringComparePtr.asFunction< - int Function(CFStringRef, CFStringRef, int)>(); + late final _CFRunLoopSourceGetOrderPtr = + _lookup>( + 'CFRunLoopSourceGetOrder'); + late final _CFRunLoopSourceGetOrder = _CFRunLoopSourceGetOrderPtr.asFunction< + int Function(CFRunLoopSourceRef)>(); - int CFStringFindWithOptionsAndLocale( - CFStringRef theString, - CFStringRef stringToFind, - CFRange rangeToSearch, - int searchOptions, - CFLocaleRef locale, - ffi.Pointer result, + void CFRunLoopSourceInvalidate( + CFRunLoopSourceRef source, ) { - return _CFStringFindWithOptionsAndLocale( - theString, - stringToFind, - rangeToSearch, - searchOptions, - locale, - result, + return _CFRunLoopSourceInvalidate( + source, ); } - late final _CFStringFindWithOptionsAndLocalePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFStringRef, - CFStringRef, - CFRange, - ffi.Int32, - CFLocaleRef, - ffi.Pointer)>>('CFStringFindWithOptionsAndLocale'); - late final _CFStringFindWithOptionsAndLocale = - _CFStringFindWithOptionsAndLocalePtr.asFunction< - int Function(CFStringRef, CFStringRef, CFRange, int, CFLocaleRef, - ffi.Pointer)>(); + late final _CFRunLoopSourceInvalidatePtr = + _lookup>( + 'CFRunLoopSourceInvalidate'); + late final _CFRunLoopSourceInvalidate = _CFRunLoopSourceInvalidatePtr + .asFunction(); - int CFStringFindWithOptions( - CFStringRef theString, - CFStringRef stringToFind, - CFRange rangeToSearch, - int searchOptions, - ffi.Pointer result, + int CFRunLoopSourceIsValid( + CFRunLoopSourceRef source, ) { - return _CFStringFindWithOptions( - theString, - stringToFind, - rangeToSearch, - searchOptions, - result, + return _CFRunLoopSourceIsValid( + source, ); } - late final _CFStringFindWithOptionsPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, CFStringRef, CFRange, ffi.Int32, - ffi.Pointer)>>('CFStringFindWithOptions'); - late final _CFStringFindWithOptions = _CFStringFindWithOptionsPtr.asFunction< - int Function( - CFStringRef, CFStringRef, CFRange, int, ffi.Pointer)>(); + late final _CFRunLoopSourceIsValidPtr = + _lookup>( + 'CFRunLoopSourceIsValid'); + late final _CFRunLoopSourceIsValid = + _CFRunLoopSourceIsValidPtr.asFunction(); - CFArrayRef CFStringCreateArrayWithFindResults( - CFAllocatorRef alloc, - CFStringRef theString, - CFStringRef stringToFind, - CFRange rangeToSearch, - int compareOptions, + void CFRunLoopSourceGetContext( + CFRunLoopSourceRef source, + ffi.Pointer context, ) { - return _CFStringCreateArrayWithFindResults( - alloc, - theString, - stringToFind, - rangeToSearch, - compareOptions, + return _CFRunLoopSourceGetContext( + source, + context, ); } - late final _CFStringCreateArrayWithFindResultsPtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef, CFRange, - ffi.Int32)>>('CFStringCreateArrayWithFindResults'); - late final _CFStringCreateArrayWithFindResults = - _CFStringCreateArrayWithFindResultsPtr.asFunction< - CFArrayRef Function( - CFAllocatorRef, CFStringRef, CFStringRef, CFRange, int)>(); + late final _CFRunLoopSourceGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFRunLoopSourceRef, ffi.Pointer)>>( + 'CFRunLoopSourceGetContext'); + late final _CFRunLoopSourceGetContext = + _CFRunLoopSourceGetContextPtr.asFunction< + void Function( + CFRunLoopSourceRef, ffi.Pointer)>(); - CFRange CFStringFind( - CFStringRef theString, - CFStringRef stringToFind, - int compareOptions, + void CFRunLoopSourceSignal( + CFRunLoopSourceRef source, ) { - return _CFStringFind( - theString, - stringToFind, - compareOptions, + return _CFRunLoopSourceSignal( + source, ); } - late final _CFStringFindPtr = _lookup< - ffi.NativeFunction< - CFRange Function( - CFStringRef, CFStringRef, ffi.Int32)>>('CFStringFind'); - late final _CFStringFind = _CFStringFindPtr.asFunction< - CFRange Function(CFStringRef, CFStringRef, int)>(); + late final _CFRunLoopSourceSignalPtr = + _lookup>( + 'CFRunLoopSourceSignal'); + late final _CFRunLoopSourceSignal = + _CFRunLoopSourceSignalPtr.asFunction(); - int CFStringHasPrefix( - CFStringRef theString, - CFStringRef prefix, - ) { - return _CFStringHasPrefix( - theString, - prefix, - ); + int CFRunLoopObserverGetTypeID() { + return _CFRunLoopObserverGetTypeID(); } - late final _CFStringHasPrefixPtr = - _lookup>( - 'CFStringHasPrefix'); - late final _CFStringHasPrefix = _CFStringHasPrefixPtr.asFunction< - int Function(CFStringRef, CFStringRef)>(); + late final _CFRunLoopObserverGetTypeIDPtr = + _lookup>( + 'CFRunLoopObserverGetTypeID'); + late final _CFRunLoopObserverGetTypeID = + _CFRunLoopObserverGetTypeIDPtr.asFunction(); - int CFStringHasSuffix( - CFStringRef theString, - CFStringRef suffix, + CFRunLoopObserverRef CFRunLoopObserverCreate( + CFAllocatorRef allocator, + int activities, + int repeats, + int order, + CFRunLoopObserverCallBack callout, + ffi.Pointer context, ) { - return _CFStringHasSuffix( - theString, - suffix, + return _CFRunLoopObserverCreate( + allocator, + activities, + repeats, + order, + callout, + context, ); } - late final _CFStringHasSuffixPtr = - _lookup>( - 'CFStringHasSuffix'); - late final _CFStringHasSuffix = _CFStringHasSuffixPtr.asFunction< - int Function(CFStringRef, CFStringRef)>(); + late final _CFRunLoopObserverCreatePtr = _lookup< + ffi.NativeFunction< + CFRunLoopObserverRef Function( + CFAllocatorRef, + CFOptionFlags, + Boolean, + CFIndex, + CFRunLoopObserverCallBack, + ffi.Pointer)>>( + 'CFRunLoopObserverCreate'); + late final _CFRunLoopObserverCreate = _CFRunLoopObserverCreatePtr.asFunction< + CFRunLoopObserverRef Function(CFAllocatorRef, int, int, int, + CFRunLoopObserverCallBack, ffi.Pointer)>(); - CFRange CFStringGetRangeOfComposedCharactersAtIndex( - CFStringRef theString, - int theIndex, + CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler( + CFAllocatorRef allocator, + DartCFOptionFlags activities, + DartBoolean repeats, + DartCFIndex order, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__CFRunLoopObserver>, CFOptionFlags)> + block, ) { - return _CFStringGetRangeOfComposedCharactersAtIndex( - theString, - theIndex, + return _CFRunLoopObserverCreateWithHandler( + allocator, + activities, + repeats, + order, + block.ref.pointer, ); } - late final _CFStringGetRangeOfComposedCharactersAtIndexPtr = - _lookup>( - 'CFStringGetRangeOfComposedCharactersAtIndex'); - late final _CFStringGetRangeOfComposedCharactersAtIndex = - _CFStringGetRangeOfComposedCharactersAtIndexPtr.asFunction< - CFRange Function(CFStringRef, int)>(); + late final _CFRunLoopObserverCreateWithHandlerPtr = _lookup< + ffi.NativeFunction< + CFRunLoopObserverRef Function(CFAllocatorRef, CFOptionFlags, + Boolean, CFIndex, ffi.Pointer)>>( + 'CFRunLoopObserverCreateWithHandler'); + late final _CFRunLoopObserverCreateWithHandler = + _CFRunLoopObserverCreateWithHandlerPtr.asFunction< + CFRunLoopObserverRef Function(CFAllocatorRef, int, int, int, + ffi.Pointer)>(); - int CFStringFindCharacterFromSet( - CFStringRef theString, - CFCharacterSetRef theSet, - CFRange rangeToSearch, - int searchOptions, - ffi.Pointer result, + int CFRunLoopObserverGetActivities( + CFRunLoopObserverRef observer, ) { - return _CFStringFindCharacterFromSet( - theString, - theSet, - rangeToSearch, - searchOptions, - result, + return _CFRunLoopObserverGetActivities( + observer, ); } - late final _CFStringFindCharacterFromSetPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, CFCharacterSetRef, CFRange, ffi.Int32, - ffi.Pointer)>>('CFStringFindCharacterFromSet'); - late final _CFStringFindCharacterFromSet = - _CFStringFindCharacterFromSetPtr.asFunction< - int Function(CFStringRef, CFCharacterSetRef, CFRange, int, - ffi.Pointer)>(); + late final _CFRunLoopObserverGetActivitiesPtr = + _lookup>( + 'CFRunLoopObserverGetActivities'); + late final _CFRunLoopObserverGetActivities = + _CFRunLoopObserverGetActivitiesPtr.asFunction< + int Function(CFRunLoopObserverRef)>(); - void CFStringGetLineBounds( - CFStringRef theString, - CFRange range, - ffi.Pointer lineBeginIndex, - ffi.Pointer lineEndIndex, - ffi.Pointer contentsEndIndex, + int CFRunLoopObserverDoesRepeat( + CFRunLoopObserverRef observer, ) { - return _CFStringGetLineBounds( - theString, - range, - lineBeginIndex, - lineEndIndex, - contentsEndIndex, + return _CFRunLoopObserverDoesRepeat( + observer, ); } - late final _CFStringGetLineBoundsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFStringRef, - CFRange, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('CFStringGetLineBounds'); - late final _CFStringGetLineBounds = _CFStringGetLineBoundsPtr.asFunction< - void Function(CFStringRef, CFRange, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFRunLoopObserverDoesRepeatPtr = + _lookup>( + 'CFRunLoopObserverDoesRepeat'); + late final _CFRunLoopObserverDoesRepeat = _CFRunLoopObserverDoesRepeatPtr + .asFunction(); - void CFStringGetParagraphBounds( - CFStringRef string, - CFRange range, - ffi.Pointer parBeginIndex, - ffi.Pointer parEndIndex, - ffi.Pointer contentsEndIndex, + int CFRunLoopObserverGetOrder( + CFRunLoopObserverRef observer, ) { - return _CFStringGetParagraphBounds( - string, - range, - parBeginIndex, - parEndIndex, - contentsEndIndex, + return _CFRunLoopObserverGetOrder( + observer, ); } - late final _CFStringGetParagraphBoundsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFStringRef, - CFRange, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('CFStringGetParagraphBounds'); - late final _CFStringGetParagraphBounds = - _CFStringGetParagraphBoundsPtr.asFunction< - void Function(CFStringRef, CFRange, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _CFRunLoopObserverGetOrderPtr = + _lookup>( + 'CFRunLoopObserverGetOrder'); + late final _CFRunLoopObserverGetOrder = _CFRunLoopObserverGetOrderPtr + .asFunction(); - int CFStringGetHyphenationLocationBeforeIndex( - CFStringRef string, - int location, - CFRange limitRange, - int options, - CFLocaleRef locale, - ffi.Pointer character, + void CFRunLoopObserverInvalidate( + CFRunLoopObserverRef observer, ) { - return _CFStringGetHyphenationLocationBeforeIndex( - string, - location, - limitRange, - options, - locale, - character, + return _CFRunLoopObserverInvalidate( + observer, ); } - late final _CFStringGetHyphenationLocationBeforeIndexPtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFStringRef, CFIndex, CFRange, CFOptionFlags, - CFLocaleRef, ffi.Pointer)>>( - 'CFStringGetHyphenationLocationBeforeIndex'); - late final _CFStringGetHyphenationLocationBeforeIndex = - _CFStringGetHyphenationLocationBeforeIndexPtr.asFunction< - int Function(CFStringRef, int, CFRange, int, CFLocaleRef, - ffi.Pointer)>(); + late final _CFRunLoopObserverInvalidatePtr = + _lookup>( + 'CFRunLoopObserverInvalidate'); + late final _CFRunLoopObserverInvalidate = _CFRunLoopObserverInvalidatePtr + .asFunction(); - int CFStringIsHyphenationAvailableForLocale( - CFLocaleRef locale, + int CFRunLoopObserverIsValid( + CFRunLoopObserverRef observer, ) { - return _CFStringIsHyphenationAvailableForLocale( - locale, + return _CFRunLoopObserverIsValid( + observer, ); } - late final _CFStringIsHyphenationAvailableForLocalePtr = - _lookup>( - 'CFStringIsHyphenationAvailableForLocale'); - late final _CFStringIsHyphenationAvailableForLocale = - _CFStringIsHyphenationAvailableForLocalePtr.asFunction< - int Function(CFLocaleRef)>(); + late final _CFRunLoopObserverIsValidPtr = + _lookup>( + 'CFRunLoopObserverIsValid'); + late final _CFRunLoopObserverIsValid = _CFRunLoopObserverIsValidPtr + .asFunction(); - CFStringRef CFStringCreateByCombiningStrings( - CFAllocatorRef alloc, - CFArrayRef theArray, - CFStringRef separatorString, + void CFRunLoopObserverGetContext( + CFRunLoopObserverRef observer, + ffi.Pointer context, ) { - return _CFStringCreateByCombiningStrings( - alloc, - theArray, - separatorString, + return _CFRunLoopObserverGetContext( + observer, + context, ); } - late final _CFStringCreateByCombiningStringsPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFArrayRef, - CFStringRef)>>('CFStringCreateByCombiningStrings'); - late final _CFStringCreateByCombiningStrings = - _CFStringCreateByCombiningStringsPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFArrayRef, CFStringRef)>(); + late final _CFRunLoopObserverGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopObserverRef, + ffi.Pointer)>>( + 'CFRunLoopObserverGetContext'); + late final _CFRunLoopObserverGetContext = + _CFRunLoopObserverGetContextPtr.asFunction< + void Function( + CFRunLoopObserverRef, ffi.Pointer)>(); - CFArrayRef CFStringCreateArrayBySeparatingStrings( - CFAllocatorRef alloc, - CFStringRef theString, - CFStringRef separatorString, + int CFRunLoopTimerGetTypeID() { + return _CFRunLoopTimerGetTypeID(); + } + + late final _CFRunLoopTimerGetTypeIDPtr = + _lookup>( + 'CFRunLoopTimerGetTypeID'); + late final _CFRunLoopTimerGetTypeID = + _CFRunLoopTimerGetTypeIDPtr.asFunction(); + + CFRunLoopTimerRef CFRunLoopTimerCreate( + CFAllocatorRef allocator, + double fireDate, + double interval, + int flags, + int order, + CFRunLoopTimerCallBack callout, + ffi.Pointer context, ) { - return _CFStringCreateArrayBySeparatingStrings( - alloc, - theString, - separatorString, + return _CFRunLoopTimerCreate( + allocator, + fireDate, + interval, + flags, + order, + callout, + context, ); } - late final _CFStringCreateArrayBySeparatingStringsPtr = _lookup< + late final _CFRunLoopTimerCreatePtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFAllocatorRef, CFStringRef, - CFStringRef)>>('CFStringCreateArrayBySeparatingStrings'); - late final _CFStringCreateArrayBySeparatingStrings = - _CFStringCreateArrayBySeparatingStringsPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); + CFRunLoopTimerRef Function( + CFAllocatorRef, + CFAbsoluteTime, + CFTimeInterval, + CFOptionFlags, + CFIndex, + CFRunLoopTimerCallBack, + ffi.Pointer)>>('CFRunLoopTimerCreate'); + late final _CFRunLoopTimerCreate = _CFRunLoopTimerCreatePtr.asFunction< + CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, + CFRunLoopTimerCallBack, ffi.Pointer)>(); - int CFStringGetIntValue( - CFStringRef str, + CFRunLoopTimerRef CFRunLoopTimerCreateWithHandler( + CFAllocatorRef allocator, + DartCFTimeInterval fireDate, + DartCFTimeInterval interval, + DartCFOptionFlags flags, + DartCFIndex order, + objc.ObjCBlock)> block, ) { - return _CFStringGetIntValue( - str, + return _CFRunLoopTimerCreateWithHandler( + allocator, + fireDate, + interval, + flags, + order, + block.ref.pointer, ); } - late final _CFStringGetIntValuePtr = - _lookup>( - 'CFStringGetIntValue'); - late final _CFStringGetIntValue = - _CFStringGetIntValuePtr.asFunction(); + late final _CFRunLoopTimerCreateWithHandlerPtr = _lookup< + ffi.NativeFunction< + CFRunLoopTimerRef Function( + CFAllocatorRef, + CFAbsoluteTime, + CFTimeInterval, + CFOptionFlags, + CFIndex, + ffi.Pointer)>>( + 'CFRunLoopTimerCreateWithHandler'); + late final _CFRunLoopTimerCreateWithHandler = + _CFRunLoopTimerCreateWithHandlerPtr.asFunction< + CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, + ffi.Pointer)>(); - double CFStringGetDoubleValue( - CFStringRef str, + double CFRunLoopTimerGetNextFireDate( + CFRunLoopTimerRef timer, ) { - return _CFStringGetDoubleValue( - str, + return _CFRunLoopTimerGetNextFireDate( + timer, ); } - late final _CFStringGetDoubleValuePtr = - _lookup>( - 'CFStringGetDoubleValue'); - late final _CFStringGetDoubleValue = - _CFStringGetDoubleValuePtr.asFunction(); + late final _CFRunLoopTimerGetNextFireDatePtr = + _lookup>( + 'CFRunLoopTimerGetNextFireDate'); + late final _CFRunLoopTimerGetNextFireDate = _CFRunLoopTimerGetNextFireDatePtr + .asFunction(); - void CFStringAppend( - CFMutableStringRef theString, - CFStringRef appendedString, + void CFRunLoopTimerSetNextFireDate( + CFRunLoopTimerRef timer, + double fireDate, ) { - return _CFStringAppend( - theString, - appendedString, + return _CFRunLoopTimerSetNextFireDate( + timer, + fireDate, ); } - late final _CFStringAppendPtr = _lookup< - ffi - .NativeFunction>( - 'CFStringAppend'); - late final _CFStringAppend = _CFStringAppendPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef)>(); + late final _CFRunLoopTimerSetNextFireDatePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFRunLoopTimerRef, + CFAbsoluteTime)>>('CFRunLoopTimerSetNextFireDate'); + late final _CFRunLoopTimerSetNextFireDate = _CFRunLoopTimerSetNextFireDatePtr + .asFunction(); - void CFStringAppendCharacters( - CFMutableStringRef theString, - ffi.Pointer chars, - int numChars, + double CFRunLoopTimerGetInterval( + CFRunLoopTimerRef timer, ) { - return _CFStringAppendCharacters( - theString, - chars, - numChars, + return _CFRunLoopTimerGetInterval( + timer, ); } - late final _CFStringAppendCharactersPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ffi.Pointer, - CFIndex)>>('CFStringAppendCharacters'); - late final _CFStringAppendCharacters = - _CFStringAppendCharactersPtr.asFunction< - void Function(CFMutableStringRef, ffi.Pointer, int)>(); + late final _CFRunLoopTimerGetIntervalPtr = + _lookup>( + 'CFRunLoopTimerGetInterval'); + late final _CFRunLoopTimerGetInterval = _CFRunLoopTimerGetIntervalPtr + .asFunction(); - void CFStringAppendPascalString( - CFMutableStringRef theString, - ConstStr255Param pStr, - int encoding, + int CFRunLoopTimerDoesRepeat( + CFRunLoopTimerRef timer, ) { - return _CFStringAppendPascalString( - theString, - pStr, - encoding, + return _CFRunLoopTimerDoesRepeat( + timer, ); } - late final _CFStringAppendPascalStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ConstStr255Param, - CFStringEncoding)>>('CFStringAppendPascalString'); - late final _CFStringAppendPascalString = _CFStringAppendPascalStringPtr - .asFunction(); + late final _CFRunLoopTimerDoesRepeatPtr = + _lookup>( + 'CFRunLoopTimerDoesRepeat'); + late final _CFRunLoopTimerDoesRepeat = _CFRunLoopTimerDoesRepeatPtr + .asFunction(); - void CFStringAppendCString( - CFMutableStringRef theString, - ffi.Pointer cStr, - int encoding, + int CFRunLoopTimerGetOrder( + CFRunLoopTimerRef timer, ) { - return _CFStringAppendCString( - theString, - cStr, - encoding, + return _CFRunLoopTimerGetOrder( + timer, ); } - late final _CFStringAppendCStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ffi.Pointer, - CFStringEncoding)>>('CFStringAppendCString'); - late final _CFStringAppendCString = _CFStringAppendCStringPtr.asFunction< - void Function(CFMutableStringRef, ffi.Pointer, int)>(); + late final _CFRunLoopTimerGetOrderPtr = + _lookup>( + 'CFRunLoopTimerGetOrder'); + late final _CFRunLoopTimerGetOrder = + _CFRunLoopTimerGetOrderPtr.asFunction(); - void CFStringAppendFormat( - CFMutableStringRef theString, - CFDictionaryRef formatOptions, - CFStringRef format, + void CFRunLoopTimerInvalidate( + CFRunLoopTimerRef timer, ) { - return _CFStringAppendFormat( - theString, - formatOptions, - format, + return _CFRunLoopTimerInvalidate( + timer, ); } - late final _CFStringAppendFormatPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFDictionaryRef, - CFStringRef)>>('CFStringAppendFormat'); - late final _CFStringAppendFormat = _CFStringAppendFormatPtr.asFunction< - void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef)>(); + late final _CFRunLoopTimerInvalidatePtr = + _lookup>( + 'CFRunLoopTimerInvalidate'); + late final _CFRunLoopTimerInvalidate = _CFRunLoopTimerInvalidatePtr + .asFunction(); - void CFStringAppendFormatAndArguments( - CFMutableStringRef theString, - CFDictionaryRef formatOptions, - CFStringRef format, - va_list arguments, + int CFRunLoopTimerIsValid( + CFRunLoopTimerRef timer, ) { - return _CFStringAppendFormatAndArguments( - theString, - formatOptions, - format, - arguments, + return _CFRunLoopTimerIsValid( + timer, ); } - late final _CFStringAppendFormatAndArgumentsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFDictionaryRef, CFStringRef, - va_list)>>('CFStringAppendFormatAndArguments'); - late final _CFStringAppendFormatAndArguments = - _CFStringAppendFormatAndArgumentsPtr.asFunction< - void Function( - CFMutableStringRef, CFDictionaryRef, CFStringRef, va_list)>(); + late final _CFRunLoopTimerIsValidPtr = + _lookup>( + 'CFRunLoopTimerIsValid'); + late final _CFRunLoopTimerIsValid = + _CFRunLoopTimerIsValidPtr.asFunction(); - void CFStringInsert( - CFMutableStringRef str, - int idx, - CFStringRef insertedStr, + void CFRunLoopTimerGetContext( + CFRunLoopTimerRef timer, + ffi.Pointer context, ) { - return _CFStringInsert( - str, - idx, - insertedStr, + return _CFRunLoopTimerGetContext( + timer, + context, ); } - late final _CFStringInsertPtr = _lookup< + late final _CFRunLoopTimerGetContextPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFIndex, CFStringRef)>>('CFStringInsert'); - late final _CFStringInsert = _CFStringInsertPtr.asFunction< - void Function(CFMutableStringRef, int, CFStringRef)>(); + ffi.Void Function(CFRunLoopTimerRef, + ffi.Pointer)>>('CFRunLoopTimerGetContext'); + late final _CFRunLoopTimerGetContext = + _CFRunLoopTimerGetContextPtr.asFunction< + void Function( + CFRunLoopTimerRef, ffi.Pointer)>(); - void CFStringDelete( - CFMutableStringRef theString, - CFRange range, + double CFRunLoopTimerGetTolerance( + CFRunLoopTimerRef timer, ) { - return _CFStringDelete( - theString, - range, + return _CFRunLoopTimerGetTolerance( + timer, ); } - late final _CFStringDeletePtr = _lookup< - ffi.NativeFunction>( - 'CFStringDelete'); - late final _CFStringDelete = _CFStringDeletePtr.asFunction< - void Function(CFMutableStringRef, CFRange)>(); + late final _CFRunLoopTimerGetTolerancePtr = + _lookup>( + 'CFRunLoopTimerGetTolerance'); + late final _CFRunLoopTimerGetTolerance = _CFRunLoopTimerGetTolerancePtr + .asFunction(); - void CFStringReplace( - CFMutableStringRef theString, - CFRange range, - CFStringRef replacement, + void CFRunLoopTimerSetTolerance( + CFRunLoopTimerRef timer, + double tolerance, ) { - return _CFStringReplace( - theString, - range, - replacement, + return _CFRunLoopTimerSetTolerance( + timer, + tolerance, ); } - late final _CFStringReplacePtr = _lookup< + late final _CFRunLoopTimerSetTolerancePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, CFRange, CFStringRef)>>('CFStringReplace'); - late final _CFStringReplace = _CFStringReplacePtr.asFunction< - void Function(CFMutableStringRef, CFRange, CFStringRef)>(); + ffi.Void Function(CFRunLoopTimerRef, + CFTimeInterval)>>('CFRunLoopTimerSetTolerance'); + late final _CFRunLoopTimerSetTolerance = _CFRunLoopTimerSetTolerancePtr + .asFunction(); - void CFStringReplaceAll( - CFMutableStringRef theString, - CFStringRef replacement, - ) { - return _CFStringReplaceAll( - theString, - replacement, - ); + int CFSocketGetTypeID() { + return _CFSocketGetTypeID(); } - late final _CFStringReplaceAllPtr = _lookup< - ffi - .NativeFunction>( - 'CFStringReplaceAll'); - late final _CFStringReplaceAll = _CFStringReplaceAllPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef)>(); + late final _CFSocketGetTypeIDPtr = + _lookup>('CFSocketGetTypeID'); + late final _CFSocketGetTypeID = + _CFSocketGetTypeIDPtr.asFunction(); - int CFStringFindAndReplace( - CFMutableStringRef theString, - CFStringRef stringToFind, - CFStringRef replacementString, - CFRange rangeToSearch, - int compareOptions, + CFSocketRef CFSocketCreate( + CFAllocatorRef allocator, + int protocolFamily, + int socketType, + int protocol, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, ) { - return _CFStringFindAndReplace( - theString, - stringToFind, - replacementString, - rangeToSearch, - compareOptions, + return _CFSocketCreate( + allocator, + protocolFamily, + socketType, + protocol, + callBackTypes, + callout, + context, ); } - late final _CFStringFindAndReplacePtr = _lookup< + late final _CFSocketCreatePtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFMutableStringRef, CFStringRef, CFStringRef, - CFRange, ffi.Int32)>>('CFStringFindAndReplace'); - late final _CFStringFindAndReplace = _CFStringFindAndReplacePtr.asFunction< - int Function( - CFMutableStringRef, CFStringRef, CFStringRef, CFRange, int)>(); + CFSocketRef Function( + CFAllocatorRef, + SInt32, + SInt32, + SInt32, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer)>>('CFSocketCreate'); + late final _CFSocketCreate = _CFSocketCreatePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, int, int, int, int, CFSocketCallBack, + ffi.Pointer)>(); - void CFStringSetExternalCharactersNoCopy( - CFMutableStringRef theString, - ffi.Pointer chars, - int length, - int capacity, + CFSocketRef CFSocketCreateWithNative( + CFAllocatorRef allocator, + int sock, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, ) { - return _CFStringSetExternalCharactersNoCopy( - theString, - chars, - length, - capacity, + return _CFSocketCreateWithNative( + allocator, + sock, + callBackTypes, + callout, + context, ); } - late final _CFStringSetExternalCharactersNoCopyPtr = _lookup< + late final _CFSocketCreateWithNativePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, ffi.Pointer, CFIndex, - CFIndex)>>('CFStringSetExternalCharactersNoCopy'); - late final _CFStringSetExternalCharactersNoCopy = - _CFStringSetExternalCharactersNoCopyPtr.asFunction< - void Function(CFMutableStringRef, ffi.Pointer, int, int)>(); + CFSocketRef Function( + CFAllocatorRef, + CFSocketNativeHandle, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer)>>('CFSocketCreateWithNative'); + late final _CFSocketCreateWithNative = + _CFSocketCreateWithNativePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, int, int, CFSocketCallBack, + ffi.Pointer)>(); - void CFStringPad( - CFMutableStringRef theString, - CFStringRef padString, - int length, - int indexIntoPad, + CFSocketRef CFSocketCreateWithSocketSignature( + CFAllocatorRef allocator, + ffi.Pointer signature, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, ) { - return _CFStringPad( - theString, - padString, - length, - indexIntoPad, + return _CFSocketCreateWithSocketSignature( + allocator, + signature, + callBackTypes, + callout, + context, ); } - late final _CFStringPadPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFStringRef, CFIndex, - CFIndex)>>('CFStringPad'); - late final _CFStringPad = _CFStringPadPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef, int, int)>(); + late final _CFSocketCreateWithSocketSignaturePtr = _lookup< + ffi.NativeFunction< + CFSocketRef Function( + CFAllocatorRef, + ffi.Pointer, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer)>>( + 'CFSocketCreateWithSocketSignature'); + late final _CFSocketCreateWithSocketSignature = + _CFSocketCreateWithSocketSignaturePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, ffi.Pointer, + int, CFSocketCallBack, ffi.Pointer)>(); - void CFStringTrim( - CFMutableStringRef theString, - CFStringRef trimString, + CFSocketRef CFSocketCreateConnectedToSocketSignature( + CFAllocatorRef allocator, + ffi.Pointer signature, + int callBackTypes, + CFSocketCallBack callout, + ffi.Pointer context, + double timeout, ) { - return _CFStringTrim( - theString, - trimString, + return _CFSocketCreateConnectedToSocketSignature( + allocator, + signature, + callBackTypes, + callout, + context, + timeout, ); } - late final _CFStringTrimPtr = _lookup< + late final _CFSocketCreateConnectedToSocketSignaturePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMutableStringRef, CFStringRef)>>('CFStringTrim'); - late final _CFStringTrim = _CFStringTrimPtr.asFunction< - void Function(CFMutableStringRef, CFStringRef)>(); + CFSocketRef Function( + CFAllocatorRef, + ffi.Pointer, + CFOptionFlags, + CFSocketCallBack, + ffi.Pointer, + CFTimeInterval)>>('CFSocketCreateConnectedToSocketSignature'); + late final _CFSocketCreateConnectedToSocketSignature = + _CFSocketCreateConnectedToSocketSignaturePtr.asFunction< + CFSocketRef Function(CFAllocatorRef, ffi.Pointer, + int, CFSocketCallBack, ffi.Pointer, double)>(); - void CFStringTrimWhitespace( - CFMutableStringRef theString, + CFSocketError CFSocketSetAddress( + CFSocketRef s, + CFDataRef address, ) { - return _CFStringTrimWhitespace( - theString, - ); + return CFSocketError.fromValue(_CFSocketSetAddress( + s, + address, + )); } - late final _CFStringTrimWhitespacePtr = - _lookup>( - 'CFStringTrimWhitespace'); - late final _CFStringTrimWhitespace = _CFStringTrimWhitespacePtr.asFunction< - void Function(CFMutableStringRef)>(); + late final _CFSocketSetAddressPtr = + _lookup>( + 'CFSocketSetAddress'); + late final _CFSocketSetAddress = + _CFSocketSetAddressPtr.asFunction(); - void CFStringLowercase( - CFMutableStringRef theString, - CFLocaleRef locale, + CFSocketError CFSocketConnectToAddress( + CFSocketRef s, + CFDataRef address, + DartCFTimeInterval timeout, ) { - return _CFStringLowercase( - theString, - locale, - ); + return CFSocketError.fromValue(_CFSocketConnectToAddress( + s, + address, + timeout, + )); } - late final _CFStringLowercasePtr = _lookup< - ffi - .NativeFunction>( - 'CFStringLowercase'); - late final _CFStringLowercase = _CFStringLowercasePtr.asFunction< - void Function(CFMutableStringRef, CFLocaleRef)>(); + late final _CFSocketConnectToAddressPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFSocketRef, CFDataRef, + CFTimeInterval)>>('CFSocketConnectToAddress'); + late final _CFSocketConnectToAddress = _CFSocketConnectToAddressPtr + .asFunction(); - void CFStringUppercase( - CFMutableStringRef theString, - CFLocaleRef locale, + void CFSocketInvalidate( + CFSocketRef s, ) { - return _CFStringUppercase( - theString, - locale, + return _CFSocketInvalidate( + s, ); } - late final _CFStringUppercasePtr = _lookup< - ffi - .NativeFunction>( - 'CFStringUppercase'); - late final _CFStringUppercase = _CFStringUppercasePtr.asFunction< - void Function(CFMutableStringRef, CFLocaleRef)>(); + late final _CFSocketInvalidatePtr = + _lookup>( + 'CFSocketInvalidate'); + late final _CFSocketInvalidate = + _CFSocketInvalidatePtr.asFunction(); - void CFStringCapitalize( - CFMutableStringRef theString, - CFLocaleRef locale, + int CFSocketIsValid( + CFSocketRef s, ) { - return _CFStringCapitalize( - theString, - locale, + return _CFSocketIsValid( + s, ); } - late final _CFStringCapitalizePtr = _lookup< - ffi - .NativeFunction>( - 'CFStringCapitalize'); - late final _CFStringCapitalize = _CFStringCapitalizePtr.asFunction< - void Function(CFMutableStringRef, CFLocaleRef)>(); + late final _CFSocketIsValidPtr = + _lookup>( + 'CFSocketIsValid'); + late final _CFSocketIsValid = + _CFSocketIsValidPtr.asFunction(); - void CFStringNormalize( - CFMutableStringRef theString, - int theForm, + CFDataRef CFSocketCopyAddress( + CFSocketRef s, ) { - return _CFStringNormalize( - theString, - theForm, + return _CFSocketCopyAddress( + s, ); } - late final _CFStringNormalizePtr = _lookup< - ffi.NativeFunction>( - 'CFStringNormalize'); - late final _CFStringNormalize = _CFStringNormalizePtr.asFunction< - void Function(CFMutableStringRef, int)>(); + late final _CFSocketCopyAddressPtr = + _lookup>( + 'CFSocketCopyAddress'); + late final _CFSocketCopyAddress = + _CFSocketCopyAddressPtr.asFunction(); - void CFStringFold( - CFMutableStringRef theString, - int theFlags, - CFLocaleRef theLocale, + CFDataRef CFSocketCopyPeerAddress( + CFSocketRef s, ) { - return _CFStringFold( - theString, - theFlags, - theLocale, + return _CFSocketCopyPeerAddress( + s, ); } - late final _CFStringFoldPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableStringRef, ffi.Int32, CFLocaleRef)>>('CFStringFold'); - late final _CFStringFold = _CFStringFoldPtr.asFunction< - void Function(CFMutableStringRef, int, CFLocaleRef)>(); + late final _CFSocketCopyPeerAddressPtr = + _lookup>( + 'CFSocketCopyPeerAddress'); + late final _CFSocketCopyPeerAddress = + _CFSocketCopyPeerAddressPtr.asFunction(); - int CFStringTransform( - CFMutableStringRef string, - ffi.Pointer range, - CFStringRef transform, - int reverse, + void CFSocketGetContext( + CFSocketRef s, + ffi.Pointer context, ) { - return _CFStringTransform( - string, - range, - transform, - reverse, + return _CFSocketGetContext( + s, + context, ); } - late final _CFStringTransformPtr = _lookup< + late final _CFSocketGetContextPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFMutableStringRef, ffi.Pointer, - CFStringRef, Boolean)>>('CFStringTransform'); - late final _CFStringTransform = _CFStringTransformPtr.asFunction< - int Function( - CFMutableStringRef, ffi.Pointer, CFStringRef, int)>(); + ffi.Void Function(CFSocketRef, + ffi.Pointer)>>('CFSocketGetContext'); + late final _CFSocketGetContext = _CFSocketGetContextPtr.asFunction< + void Function(CFSocketRef, ffi.Pointer)>(); - late final ffi.Pointer _kCFStringTransformStripCombiningMarks = - _lookup('kCFStringTransformStripCombiningMarks'); + int CFSocketGetNative( + CFSocketRef s, + ) { + return _CFSocketGetNative( + s, + ); + } - CFStringRef get kCFStringTransformStripCombiningMarks => - _kCFStringTransformStripCombiningMarks.value; + late final _CFSocketGetNativePtr = + _lookup>( + 'CFSocketGetNative'); + late final _CFSocketGetNative = + _CFSocketGetNativePtr.asFunction(); - late final ffi.Pointer _kCFStringTransformToLatin = - _lookup('kCFStringTransformToLatin'); + CFRunLoopSourceRef CFSocketCreateRunLoopSource( + CFAllocatorRef allocator, + CFSocketRef s, + int order, + ) { + return _CFSocketCreateRunLoopSource( + allocator, + s, + order, + ); + } - CFStringRef get kCFStringTransformToLatin => _kCFStringTransformToLatin.value; + late final _CFSocketCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, + CFIndex)>>('CFSocketCreateRunLoopSource'); + late final _CFSocketCreateRunLoopSource = + _CFSocketCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, int)>(); - late final ffi.Pointer _kCFStringTransformFullwidthHalfwidth = - _lookup('kCFStringTransformFullwidthHalfwidth'); - - CFStringRef get kCFStringTransformFullwidthHalfwidth => - _kCFStringTransformFullwidthHalfwidth.value; - - late final ffi.Pointer _kCFStringTransformLatinKatakana = - _lookup('kCFStringTransformLatinKatakana'); - - CFStringRef get kCFStringTransformLatinKatakana => - _kCFStringTransformLatinKatakana.value; - - late final ffi.Pointer _kCFStringTransformLatinHiragana = - _lookup('kCFStringTransformLatinHiragana'); - - CFStringRef get kCFStringTransformLatinHiragana => - _kCFStringTransformLatinHiragana.value; - - late final ffi.Pointer _kCFStringTransformHiraganaKatakana = - _lookup('kCFStringTransformHiraganaKatakana'); - - CFStringRef get kCFStringTransformHiraganaKatakana => - _kCFStringTransformHiraganaKatakana.value; - - late final ffi.Pointer _kCFStringTransformMandarinLatin = - _lookup('kCFStringTransformMandarinLatin'); - - CFStringRef get kCFStringTransformMandarinLatin => - _kCFStringTransformMandarinLatin.value; - - late final ffi.Pointer _kCFStringTransformLatinHangul = - _lookup('kCFStringTransformLatinHangul'); - - CFStringRef get kCFStringTransformLatinHangul => - _kCFStringTransformLatinHangul.value; - - late final ffi.Pointer _kCFStringTransformLatinArabic = - _lookup('kCFStringTransformLatinArabic'); - - CFStringRef get kCFStringTransformLatinArabic => - _kCFStringTransformLatinArabic.value; - - late final ffi.Pointer _kCFStringTransformLatinHebrew = - _lookup('kCFStringTransformLatinHebrew'); - - CFStringRef get kCFStringTransformLatinHebrew => - _kCFStringTransformLatinHebrew.value; - - late final ffi.Pointer _kCFStringTransformLatinThai = - _lookup('kCFStringTransformLatinThai'); - - CFStringRef get kCFStringTransformLatinThai => - _kCFStringTransformLatinThai.value; - - late final ffi.Pointer _kCFStringTransformLatinCyrillic = - _lookup('kCFStringTransformLatinCyrillic'); - - CFStringRef get kCFStringTransformLatinCyrillic => - _kCFStringTransformLatinCyrillic.value; - - late final ffi.Pointer _kCFStringTransformLatinGreek = - _lookup('kCFStringTransformLatinGreek'); - - CFStringRef get kCFStringTransformLatinGreek => - _kCFStringTransformLatinGreek.value; - - late final ffi.Pointer _kCFStringTransformToXMLHex = - _lookup('kCFStringTransformToXMLHex'); - - CFStringRef get kCFStringTransformToXMLHex => - _kCFStringTransformToXMLHex.value; - - late final ffi.Pointer _kCFStringTransformToUnicodeName = - _lookup('kCFStringTransformToUnicodeName'); - - CFStringRef get kCFStringTransformToUnicodeName => - _kCFStringTransformToUnicodeName.value; - - late final ffi.Pointer _kCFStringTransformStripDiacritics = - _lookup('kCFStringTransformStripDiacritics'); - - CFStringRef get kCFStringTransformStripDiacritics => - _kCFStringTransformStripDiacritics.value; - - int CFStringIsEncodingAvailable( - int encoding, - ) { - return _CFStringIsEncodingAvailable( - encoding, - ); - } - - late final _CFStringIsEncodingAvailablePtr = - _lookup>( - 'CFStringIsEncodingAvailable'); - late final _CFStringIsEncodingAvailable = - _CFStringIsEncodingAvailablePtr.asFunction(); - - ffi.Pointer CFStringGetListOfAvailableEncodings() { - return _CFStringGetListOfAvailableEncodings(); - } - - late final _CFStringGetListOfAvailableEncodingsPtr = - _lookup Function()>>( - 'CFStringGetListOfAvailableEncodings'); - late final _CFStringGetListOfAvailableEncodings = - _CFStringGetListOfAvailableEncodingsPtr.asFunction< - ffi.Pointer Function()>(); - - CFStringRef CFStringGetNameOfEncoding( - int encoding, + int CFSocketGetSocketFlags( + CFSocketRef s, ) { - return _CFStringGetNameOfEncoding( - encoding, + return _CFSocketGetSocketFlags( + s, ); } - late final _CFStringGetNameOfEncodingPtr = - _lookup>( - 'CFStringGetNameOfEncoding'); - late final _CFStringGetNameOfEncoding = - _CFStringGetNameOfEncodingPtr.asFunction(); + late final _CFSocketGetSocketFlagsPtr = + _lookup>( + 'CFSocketGetSocketFlags'); + late final _CFSocketGetSocketFlags = + _CFSocketGetSocketFlagsPtr.asFunction(); - int CFStringConvertEncodingToNSStringEncoding( - int encoding, + void CFSocketSetSocketFlags( + CFSocketRef s, + int flags, ) { - return _CFStringConvertEncodingToNSStringEncoding( - encoding, + return _CFSocketSetSocketFlags( + s, + flags, ); } - late final _CFStringConvertEncodingToNSStringEncodingPtr = - _lookup>( - 'CFStringConvertEncodingToNSStringEncoding'); - late final _CFStringConvertEncodingToNSStringEncoding = - _CFStringConvertEncodingToNSStringEncodingPtr.asFunction< - int Function(int)>(); + late final _CFSocketSetSocketFlagsPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketSetSocketFlags'); + late final _CFSocketSetSocketFlags = + _CFSocketSetSocketFlagsPtr.asFunction(); - int CFStringConvertNSStringEncodingToEncoding( - int encoding, + void CFSocketDisableCallBacks( + CFSocketRef s, + int callBackTypes, ) { - return _CFStringConvertNSStringEncodingToEncoding( - encoding, + return _CFSocketDisableCallBacks( + s, + callBackTypes, ); } - late final _CFStringConvertNSStringEncodingToEncodingPtr = - _lookup>( - 'CFStringConvertNSStringEncodingToEncoding'); - late final _CFStringConvertNSStringEncodingToEncoding = - _CFStringConvertNSStringEncodingToEncodingPtr.asFunction< - int Function(int)>(); + late final _CFSocketDisableCallBacksPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketDisableCallBacks'); + late final _CFSocketDisableCallBacks = _CFSocketDisableCallBacksPtr + .asFunction(); - int CFStringConvertEncodingToWindowsCodepage( - int encoding, + void CFSocketEnableCallBacks( + CFSocketRef s, + int callBackTypes, ) { - return _CFStringConvertEncodingToWindowsCodepage( - encoding, + return _CFSocketEnableCallBacks( + s, + callBackTypes, ); } - late final _CFStringConvertEncodingToWindowsCodepagePtr = - _lookup>( - 'CFStringConvertEncodingToWindowsCodepage'); - late final _CFStringConvertEncodingToWindowsCodepage = - _CFStringConvertEncodingToWindowsCodepagePtr.asFunction< - int Function(int)>(); + late final _CFSocketEnableCallBacksPtr = _lookup< + ffi.NativeFunction>( + 'CFSocketEnableCallBacks'); + late final _CFSocketEnableCallBacks = + _CFSocketEnableCallBacksPtr.asFunction(); - int CFStringConvertWindowsCodepageToEncoding( - int codepage, + CFSocketError CFSocketSendData( + CFSocketRef s, + CFDataRef address, + CFDataRef data, + DartCFTimeInterval timeout, ) { - return _CFStringConvertWindowsCodepageToEncoding( - codepage, - ); + return CFSocketError.fromValue(_CFSocketSendData( + s, + address, + data, + timeout, + )); } - late final _CFStringConvertWindowsCodepageToEncodingPtr = - _lookup>( - 'CFStringConvertWindowsCodepageToEncoding'); - late final _CFStringConvertWindowsCodepageToEncoding = - _CFStringConvertWindowsCodepageToEncodingPtr.asFunction< - int Function(int)>(); + late final _CFSocketSendDataPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFSocketRef, CFDataRef, CFDataRef, + CFTimeInterval)>>('CFSocketSendData'); + late final _CFSocketSendData = _CFSocketSendDataPtr.asFunction< + int Function(CFSocketRef, CFDataRef, CFDataRef, double)>(); - int CFStringConvertIANACharSetNameToEncoding( - CFStringRef theString, + CFSocketError CFSocketRegisterValue( + ffi.Pointer nameServerSignature, + DartCFTimeInterval timeout, + CFStringRef name, + CFPropertyListRef value, ) { - return _CFStringConvertIANACharSetNameToEncoding( - theString, - ); + return CFSocketError.fromValue(_CFSocketRegisterValue( + nameServerSignature, + timeout, + name, + value, + )); } - late final _CFStringConvertIANACharSetNameToEncodingPtr = - _lookup>( - 'CFStringConvertIANACharSetNameToEncoding'); - late final _CFStringConvertIANACharSetNameToEncoding = - _CFStringConvertIANACharSetNameToEncodingPtr.asFunction< - int Function(CFStringRef)>(); + late final _CFSocketRegisterValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(ffi.Pointer, CFTimeInterval, + CFStringRef, CFPropertyListRef)>>('CFSocketRegisterValue'); + late final _CFSocketRegisterValue = _CFSocketRegisterValuePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + CFPropertyListRef)>(); - CFStringRef CFStringConvertEncodingToIANACharSetName( - int encoding, + CFSocketError CFSocketCopyRegisteredValue( + ffi.Pointer nameServerSignature, + DartCFTimeInterval timeout, + CFStringRef name, + ffi.Pointer value, + ffi.Pointer nameServerAddress, ) { - return _CFStringConvertEncodingToIANACharSetName( - encoding, - ); + return CFSocketError.fromValue(_CFSocketCopyRegisteredValue( + nameServerSignature, + timeout, + name, + value, + nameServerAddress, + )); } - late final _CFStringConvertEncodingToIANACharSetNamePtr = - _lookup>( - 'CFStringConvertEncodingToIANACharSetName'); - late final _CFStringConvertEncodingToIANACharSetName = - _CFStringConvertEncodingToIANACharSetNamePtr.asFunction< - CFStringRef Function(int)>(); + late final _CFSocketCopyRegisteredValuePtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + ffi.Pointer, + CFTimeInterval, + CFStringRef, + ffi.Pointer, + ffi.Pointer)>>('CFSocketCopyRegisteredValue'); + late final _CFSocketCopyRegisteredValue = + _CFSocketCopyRegisteredValuePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + ffi.Pointer, ffi.Pointer)>(); - int CFStringGetMostCompatibleMacStringEncoding( - int encoding, + CFSocketError CFSocketRegisterSocketSignature( + ffi.Pointer nameServerSignature, + DartCFTimeInterval timeout, + CFStringRef name, + ffi.Pointer signature, ) { - return _CFStringGetMostCompatibleMacStringEncoding( - encoding, - ); + return CFSocketError.fromValue(_CFSocketRegisterSocketSignature( + nameServerSignature, + timeout, + name, + signature, + )); } - late final _CFStringGetMostCompatibleMacStringEncodingPtr = - _lookup>( - 'CFStringGetMostCompatibleMacStringEncoding'); - late final _CFStringGetMostCompatibleMacStringEncoding = - _CFStringGetMostCompatibleMacStringEncodingPtr.asFunction< - int Function(int)>(); + late final _CFSocketRegisterSocketSignaturePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(ffi.Pointer, CFTimeInterval, + CFStringRef, ffi.Pointer)>>( + 'CFSocketRegisterSocketSignature'); + late final _CFSocketRegisterSocketSignature = + _CFSocketRegisterSocketSignaturePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + ffi.Pointer)>(); - void CFShow( - CFTypeRef obj, + CFSocketError CFSocketCopyRegisteredSocketSignature( + ffi.Pointer nameServerSignature, + DartCFTimeInterval timeout, + CFStringRef name, + ffi.Pointer signature, + ffi.Pointer nameServerAddress, ) { - return _CFShow( - obj, - ); + return CFSocketError.fromValue(_CFSocketCopyRegisteredSocketSignature( + nameServerSignature, + timeout, + name, + signature, + nameServerAddress, + )); } - late final _CFShowPtr = - _lookup>('CFShow'); - late final _CFShow = _CFShowPtr.asFunction(); + late final _CFSocketCopyRegisteredSocketSignaturePtr = _lookup< + ffi.NativeFunction< + CFIndex Function( + ffi.Pointer, + CFTimeInterval, + CFStringRef, + ffi.Pointer, + ffi.Pointer)>>( + 'CFSocketCopyRegisteredSocketSignature'); + late final _CFSocketCopyRegisteredSocketSignature = + _CFSocketCopyRegisteredSocketSignaturePtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef, + ffi.Pointer, ffi.Pointer)>(); - void CFShowStr( - CFStringRef str, + CFSocketError CFSocketUnregister( + ffi.Pointer nameServerSignature, + DartCFTimeInterval timeout, + CFStringRef name, ) { - return _CFShowStr( - str, - ); + return CFSocketError.fromValue(_CFSocketUnregister( + nameServerSignature, + timeout, + name, + )); } - late final _CFShowStrPtr = - _lookup>('CFShowStr'); - late final _CFShowStr = - _CFShowStrPtr.asFunction(); + late final _CFSocketUnregisterPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(ffi.Pointer, CFTimeInterval, + CFStringRef)>>('CFSocketUnregister'); + late final _CFSocketUnregister = _CFSocketUnregisterPtr.asFunction< + int Function(ffi.Pointer, double, CFStringRef)>(); - CFStringRef __CFStringMakeConstantString( - ffi.Pointer cStr, + void CFSocketSetDefaultNameRegistryPortNumber( + int port, ) { - return ___CFStringMakeConstantString( - cStr, + return _CFSocketSetDefaultNameRegistryPortNumber( + port, ); } - late final ___CFStringMakeConstantStringPtr = - _lookup)>>( - '__CFStringMakeConstantString'); - late final ___CFStringMakeConstantString = ___CFStringMakeConstantStringPtr - .asFunction)>(); + late final _CFSocketSetDefaultNameRegistryPortNumberPtr = + _lookup>( + 'CFSocketSetDefaultNameRegistryPortNumber'); + late final _CFSocketSetDefaultNameRegistryPortNumber = + _CFSocketSetDefaultNameRegistryPortNumberPtr.asFunction< + void Function(int)>(); - int CFTimeZoneGetTypeID() { - return _CFTimeZoneGetTypeID(); + int CFSocketGetDefaultNameRegistryPortNumber() { + return _CFSocketGetDefaultNameRegistryPortNumber(); } - late final _CFTimeZoneGetTypeIDPtr = - _lookup>('CFTimeZoneGetTypeID'); - late final _CFTimeZoneGetTypeID = - _CFTimeZoneGetTypeIDPtr.asFunction(); + late final _CFSocketGetDefaultNameRegistryPortNumberPtr = + _lookup>( + 'CFSocketGetDefaultNameRegistryPortNumber'); + late final _CFSocketGetDefaultNameRegistryPortNumber = + _CFSocketGetDefaultNameRegistryPortNumberPtr.asFunction(); - CFTimeZoneRef CFTimeZoneCopySystem() { - return _CFTimeZoneCopySystem(); - } + late final ffi.Pointer _kCFSocketCommandKey = + _lookup('kCFSocketCommandKey'); - late final _CFTimeZoneCopySystemPtr = - _lookup>( - 'CFTimeZoneCopySystem'); - late final _CFTimeZoneCopySystem = - _CFTimeZoneCopySystemPtr.asFunction(); + CFStringRef get kCFSocketCommandKey => _kCFSocketCommandKey.value; - void CFTimeZoneResetSystem() { - return _CFTimeZoneResetSystem(); - } + late final ffi.Pointer _kCFSocketNameKey = + _lookup('kCFSocketNameKey'); - late final _CFTimeZoneResetSystemPtr = - _lookup>('CFTimeZoneResetSystem'); - late final _CFTimeZoneResetSystem = - _CFTimeZoneResetSystemPtr.asFunction(); + CFStringRef get kCFSocketNameKey => _kCFSocketNameKey.value; - CFTimeZoneRef CFTimeZoneCopyDefault() { - return _CFTimeZoneCopyDefault(); - } + late final ffi.Pointer _kCFSocketValueKey = + _lookup('kCFSocketValueKey'); - late final _CFTimeZoneCopyDefaultPtr = - _lookup>( - 'CFTimeZoneCopyDefault'); - late final _CFTimeZoneCopyDefault = - _CFTimeZoneCopyDefaultPtr.asFunction(); + CFStringRef get kCFSocketValueKey => _kCFSocketValueKey.value; - void CFTimeZoneSetDefault( - CFTimeZoneRef tz, - ) { - return _CFTimeZoneSetDefault( - tz, - ); - } + late final ffi.Pointer _kCFSocketResultKey = + _lookup('kCFSocketResultKey'); - late final _CFTimeZoneSetDefaultPtr = - _lookup>( - 'CFTimeZoneSetDefault'); - late final _CFTimeZoneSetDefault = - _CFTimeZoneSetDefaultPtr.asFunction(); + CFStringRef get kCFSocketResultKey => _kCFSocketResultKey.value; - CFArrayRef CFTimeZoneCopyKnownNames() { - return _CFTimeZoneCopyKnownNames(); - } + late final ffi.Pointer _kCFSocketErrorKey = + _lookup('kCFSocketErrorKey'); - late final _CFTimeZoneCopyKnownNamesPtr = - _lookup>( - 'CFTimeZoneCopyKnownNames'); - late final _CFTimeZoneCopyKnownNames = - _CFTimeZoneCopyKnownNamesPtr.asFunction(); + CFStringRef get kCFSocketErrorKey => _kCFSocketErrorKey.value; - CFDictionaryRef CFTimeZoneCopyAbbreviationDictionary() { - return _CFTimeZoneCopyAbbreviationDictionary(); - } + late final ffi.Pointer _kCFSocketRegisterCommand = + _lookup('kCFSocketRegisterCommand'); - late final _CFTimeZoneCopyAbbreviationDictionaryPtr = - _lookup>( - 'CFTimeZoneCopyAbbreviationDictionary'); - late final _CFTimeZoneCopyAbbreviationDictionary = - _CFTimeZoneCopyAbbreviationDictionaryPtr.asFunction< - CFDictionaryRef Function()>(); + CFStringRef get kCFSocketRegisterCommand => _kCFSocketRegisterCommand.value; - void CFTimeZoneSetAbbreviationDictionary( - CFDictionaryRef dict, - ) { - return _CFTimeZoneSetAbbreviationDictionary( - dict, - ); - } + late final ffi.Pointer _kCFSocketRetrieveCommand = + _lookup('kCFSocketRetrieveCommand'); - late final _CFTimeZoneSetAbbreviationDictionaryPtr = - _lookup>( - 'CFTimeZoneSetAbbreviationDictionary'); - late final _CFTimeZoneSetAbbreviationDictionary = - _CFTimeZoneSetAbbreviationDictionaryPtr.asFunction< - void Function(CFDictionaryRef)>(); + CFStringRef get kCFSocketRetrieveCommand => _kCFSocketRetrieveCommand.value; - CFTimeZoneRef CFTimeZoneCreate( - CFAllocatorRef allocator, - CFStringRef name, - CFDataRef data, + int getattrlistbulk( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _CFTimeZoneCreate( - allocator, - name, - data, + return _getattrlistbulk( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _CFTimeZoneCreatePtr = _lookup< + late final _getattrlistbulkPtr = _lookup< ffi.NativeFunction< - CFTimeZoneRef Function( - CFAllocatorRef, CFStringRef, CFDataRef)>>('CFTimeZoneCreate'); - late final _CFTimeZoneCreate = _CFTimeZoneCreatePtr.asFunction< - CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, + ffi.Pointer, ffi.Size, ffi.Uint64)>>('getattrlistbulk'); + late final _getattrlistbulk = _getattrlistbulkPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); - CFTimeZoneRef CFTimeZoneCreateWithTimeIntervalFromGMT( - CFAllocatorRef allocator, - double ti, + int getattrlistat( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + int arg4, + int arg5, ) { - return _CFTimeZoneCreateWithTimeIntervalFromGMT( - allocator, - ti, + return _getattrlistat( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _CFTimeZoneCreateWithTimeIntervalFromGMTPtr = _lookup< + late final _getattrlistatPtr = _lookup< ffi.NativeFunction< - CFTimeZoneRef Function(CFAllocatorRef, - CFTimeInterval)>>('CFTimeZoneCreateWithTimeIntervalFromGMT'); - late final _CFTimeZoneCreateWithTimeIntervalFromGMT = - _CFTimeZoneCreateWithTimeIntervalFromGMTPtr.asFunction< - CFTimeZoneRef Function(CFAllocatorRef, double)>(); + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedLong)>>('getattrlistat'); + late final _getattrlistat = _getattrlistatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - CFTimeZoneRef CFTimeZoneCreateWithName( - CFAllocatorRef allocator, - CFStringRef name, - int tryAbbrev, + int setattrlistat( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + int arg4, + int arg5, ) { - return _CFTimeZoneCreateWithName( - allocator, - name, - tryAbbrev, + return _setattrlistat( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _CFTimeZoneCreateWithNamePtr = _lookup< + late final _setattrlistatPtr = _lookup< ffi.NativeFunction< - CFTimeZoneRef Function(CFAllocatorRef, CFStringRef, - Boolean)>>('CFTimeZoneCreateWithName'); - late final _CFTimeZoneCreateWithName = _CFTimeZoneCreateWithNamePtr - .asFunction(); - - CFStringRef CFTimeZoneGetName( - CFTimeZoneRef tz, - ) { - return _CFTimeZoneGetName( - tz, - ); - } - - late final _CFTimeZoneGetNamePtr = - _lookup>( - 'CFTimeZoneGetName'); - late final _CFTimeZoneGetName = - _CFTimeZoneGetNamePtr.asFunction(); + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Uint32)>>('setattrlistat'); + late final _setattrlistat = _setattrlistatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - CFDataRef CFTimeZoneGetData( - CFTimeZoneRef tz, + int freadlink( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFTimeZoneGetData( - tz, + return _freadlink( + arg0, + arg1, + arg2, ); } - late final _CFTimeZoneGetDataPtr = - _lookup>( - 'CFTimeZoneGetData'); - late final _CFTimeZoneGetData = - _CFTimeZoneGetDataPtr.asFunction(); + late final _freadlinkPtr = _lookup< + ffi.NativeFunction< + ssize_t Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('freadlink'); + late final _freadlink = + _freadlinkPtr.asFunction, int)>(); - double CFTimeZoneGetSecondsFromGMT( - CFTimeZoneRef tz, - double at, + int faccessat( + int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, ) { - return _CFTimeZoneGetSecondsFromGMT( - tz, - at, + return _faccessat( + arg0, + arg1, + arg2, + arg3, ); } - late final _CFTimeZoneGetSecondsFromGMTPtr = _lookup< + late final _faccessatPtr = _lookup< ffi.NativeFunction< - CFTimeInterval Function( - CFTimeZoneRef, CFAbsoluteTime)>>('CFTimeZoneGetSecondsFromGMT'); - late final _CFTimeZoneGetSecondsFromGMT = _CFTimeZoneGetSecondsFromGMTPtr - .asFunction(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int, ffi.Int)>>('faccessat'); + late final _faccessat = _faccessatPtr + .asFunction, int, int)>(); - CFStringRef CFTimeZoneCopyAbbreviation( - CFTimeZoneRef tz, - double at, + int fchownat( + int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, + int arg4, ) { - return _CFTimeZoneCopyAbbreviation( - tz, - at, + return _fchownat( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _CFTimeZoneCopyAbbreviationPtr = _lookup< - ffi - .NativeFunction>( - 'CFTimeZoneCopyAbbreviation'); - late final _CFTimeZoneCopyAbbreviation = _CFTimeZoneCopyAbbreviationPtr - .asFunction(); + late final _fchownatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, uid_t, gid_t, + ffi.Int)>>('fchownat'); + late final _fchownat = _fchownatPtr + .asFunction, int, int, int)>(); - int CFTimeZoneIsDaylightSavingTime( - CFTimeZoneRef tz, - double at, + int linkat( + int arg0, + ffi.Pointer arg1, + int arg2, + ffi.Pointer arg3, + int arg4, ) { - return _CFTimeZoneIsDaylightSavingTime( - tz, - at, + return _linkat( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _CFTimeZoneIsDaylightSavingTimePtr = _lookup< - ffi.NativeFunction>( - 'CFTimeZoneIsDaylightSavingTime'); - late final _CFTimeZoneIsDaylightSavingTime = - _CFTimeZoneIsDaylightSavingTimePtr.asFunction< - int Function(CFTimeZoneRef, double)>(); + late final _linkatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.Int)>>('linkat'); + late final _linkat = _linkatPtr.asFunction< + int Function( + int, ffi.Pointer, int, ffi.Pointer, int)>(); - double CFTimeZoneGetDaylightSavingTimeOffset( - CFTimeZoneRef tz, - double at, + int readlinkat( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, ) { - return _CFTimeZoneGetDaylightSavingTimeOffset( - tz, - at, + return _readlinkat( + arg0, + arg1, + arg2, + arg3, ); } - late final _CFTimeZoneGetDaylightSavingTimeOffsetPtr = _lookup< + late final _readlinkatPtr = _lookup< ffi.NativeFunction< - CFTimeInterval Function(CFTimeZoneRef, - CFAbsoluteTime)>>('CFTimeZoneGetDaylightSavingTimeOffset'); - late final _CFTimeZoneGetDaylightSavingTimeOffset = - _CFTimeZoneGetDaylightSavingTimeOffsetPtr.asFunction< - double Function(CFTimeZoneRef, double)>(); + ssize_t Function(ffi.Int, ffi.Pointer, + ffi.Pointer, ffi.Size)>>('readlinkat'); + late final _readlinkat = _readlinkatPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, int)>(); - double CFTimeZoneGetNextDaylightSavingTimeTransition( - CFTimeZoneRef tz, - double at, + int symlinkat( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, ) { - return _CFTimeZoneGetNextDaylightSavingTimeTransition( - tz, - at, + return _symlinkat( + arg0, + arg1, + arg2, ); } - late final _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr = _lookup< - ffi.NativeFunction< - CFAbsoluteTime Function(CFTimeZoneRef, CFAbsoluteTime)>>( - 'CFTimeZoneGetNextDaylightSavingTimeTransition'); - late final _CFTimeZoneGetNextDaylightSavingTimeTransition = - _CFTimeZoneGetNextDaylightSavingTimeTransitionPtr.asFunction< - double Function(CFTimeZoneRef, double)>(); + late final _symlinkatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, + ffi.Pointer)>>('symlinkat'); + late final _symlinkat = _symlinkatPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); - CFStringRef CFTimeZoneCopyLocalizedName( - CFTimeZoneRef tz, - int style, - CFLocaleRef locale, + int unlinkat( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFTimeZoneCopyLocalizedName( - tz, - style, - locale, + return _unlinkat( + arg0, + arg1, + arg2, ); } - late final _CFTimeZoneCopyLocalizedNamePtr = _lookup< + late final _unlinkatPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFTimeZoneRef, ffi.Int32, - CFLocaleRef)>>('CFTimeZoneCopyLocalizedName'); - late final _CFTimeZoneCopyLocalizedName = _CFTimeZoneCopyLocalizedNamePtr - .asFunction(); - - late final ffi.Pointer - _kCFTimeZoneSystemTimeZoneDidChangeNotification = - _lookup( - 'kCFTimeZoneSystemTimeZoneDidChangeNotification'); - - CFNotificationName get kCFTimeZoneSystemTimeZoneDidChangeNotification => - _kCFTimeZoneSystemTimeZoneDidChangeNotification.value; - - int CFCalendarGetTypeID() { - return _CFCalendarGetTypeID(); - } - - late final _CFCalendarGetTypeIDPtr = - _lookup>('CFCalendarGetTypeID'); - late final _CFCalendarGetTypeID = - _CFCalendarGetTypeIDPtr.asFunction(); - - CFCalendarRef CFCalendarCopyCurrent() { - return _CFCalendarCopyCurrent(); - } - - late final _CFCalendarCopyCurrentPtr = - _lookup>( - 'CFCalendarCopyCurrent'); - late final _CFCalendarCopyCurrent = - _CFCalendarCopyCurrentPtr.asFunction(); + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int)>>('unlinkat'); + late final _unlinkat = + _unlinkatPtr.asFunction, int)>(); - CFCalendarRef CFCalendarCreateWithIdentifier( - CFAllocatorRef allocator, - CFCalendarIdentifier identifier, + void _exit( + int arg0, ) { - return _CFCalendarCreateWithIdentifier( - allocator, - identifier, + return __exit( + arg0, ); } - late final _CFCalendarCreateWithIdentifierPtr = _lookup< - ffi.NativeFunction< - CFCalendarRef Function(CFAllocatorRef, - CFCalendarIdentifier)>>('CFCalendarCreateWithIdentifier'); - late final _CFCalendarCreateWithIdentifier = - _CFCalendarCreateWithIdentifierPtr.asFunction< - CFCalendarRef Function(CFAllocatorRef, CFCalendarIdentifier)>(); + late final __exitPtr = + _lookup>('_exit'); + late final __exit = __exitPtr.asFunction(); - CFCalendarIdentifier CFCalendarGetIdentifier( - CFCalendarRef calendar, + int access( + ffi.Pointer arg0, + int arg1, ) { - return _CFCalendarGetIdentifier( - calendar, + return _access( + arg0, + arg1, ); } - late final _CFCalendarGetIdentifierPtr = - _lookup>( - 'CFCalendarGetIdentifier'); - late final _CFCalendarGetIdentifier = _CFCalendarGetIdentifierPtr.asFunction< - CFCalendarIdentifier Function(CFCalendarRef)>(); + late final _accessPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'access'); + late final _access = + _accessPtr.asFunction, int)>(); - CFLocaleRef CFCalendarCopyLocale( - CFCalendarRef calendar, + int alarm( + int arg0, ) { - return _CFCalendarCopyLocale( - calendar, + return _alarm( + arg0, ); } - late final _CFCalendarCopyLocalePtr = - _lookup>( - 'CFCalendarCopyLocale'); - late final _CFCalendarCopyLocale = _CFCalendarCopyLocalePtr.asFunction< - CFLocaleRef Function(CFCalendarRef)>(); + late final _alarmPtr = + _lookup>( + 'alarm'); + late final _alarm = _alarmPtr.asFunction(); - void CFCalendarSetLocale( - CFCalendarRef calendar, - CFLocaleRef locale, + int chdir( + ffi.Pointer arg0, ) { - return _CFCalendarSetLocale( - calendar, - locale, + return _chdir( + arg0, ); } - late final _CFCalendarSetLocalePtr = _lookup< - ffi.NativeFunction>( - 'CFCalendarSetLocale'); - late final _CFCalendarSetLocale = _CFCalendarSetLocalePtr.asFunction< - void Function(CFCalendarRef, CFLocaleRef)>(); + late final _chdirPtr = + _lookup)>>( + 'chdir'); + late final _chdir = + _chdirPtr.asFunction)>(); - CFTimeZoneRef CFCalendarCopyTimeZone( - CFCalendarRef calendar, + int chown( + ffi.Pointer arg0, + int arg1, + int arg2, ) { - return _CFCalendarCopyTimeZone( - calendar, + return _chown( + arg0, + arg1, + arg2, ); } - late final _CFCalendarCopyTimeZonePtr = - _lookup>( - 'CFCalendarCopyTimeZone'); - late final _CFCalendarCopyTimeZone = _CFCalendarCopyTimeZonePtr.asFunction< - CFTimeZoneRef Function(CFCalendarRef)>(); + late final _chownPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('chown'); + late final _chown = + _chownPtr.asFunction, int, int)>(); - void CFCalendarSetTimeZone( - CFCalendarRef calendar, - CFTimeZoneRef tz, + int close( + int arg0, ) { - return _CFCalendarSetTimeZone( - calendar, - tz, + return _close( + arg0, ); } - late final _CFCalendarSetTimeZonePtr = _lookup< - ffi.NativeFunction>( - 'CFCalendarSetTimeZone'); - late final _CFCalendarSetTimeZone = _CFCalendarSetTimeZonePtr.asFunction< - void Function(CFCalendarRef, CFTimeZoneRef)>(); + late final _closePtr = + _lookup>('close'); + late final _close = _closePtr.asFunction(); - int CFCalendarGetFirstWeekday( - CFCalendarRef calendar, + int dup( + int arg0, ) { - return _CFCalendarGetFirstWeekday( - calendar, + return _dup( + arg0, ); } - late final _CFCalendarGetFirstWeekdayPtr = - _lookup>( - 'CFCalendarGetFirstWeekday'); - late final _CFCalendarGetFirstWeekday = - _CFCalendarGetFirstWeekdayPtr.asFunction(); + late final _dupPtr = + _lookup>('dup'); + late final _dup = _dupPtr.asFunction(); - void CFCalendarSetFirstWeekday( - CFCalendarRef calendar, - int wkdy, + int dup2( + int arg0, + int arg1, ) { - return _CFCalendarSetFirstWeekday( - calendar, - wkdy, + return _dup2( + arg0, + arg1, ); } - late final _CFCalendarSetFirstWeekdayPtr = - _lookup>( - 'CFCalendarSetFirstWeekday'); - late final _CFCalendarSetFirstWeekday = _CFCalendarSetFirstWeekdayPtr - .asFunction(); + late final _dup2Ptr = + _lookup>('dup2'); + late final _dup2 = _dup2Ptr.asFunction(); - int CFCalendarGetMinimumDaysInFirstWeek( - CFCalendarRef calendar, + int execl( + ffi.Pointer __path, + ffi.Pointer __arg0, ) { - return _CFCalendarGetMinimumDaysInFirstWeek( - calendar, + return _execl( + __path, + __arg0, ); } - late final _CFCalendarGetMinimumDaysInFirstWeekPtr = - _lookup>( - 'CFCalendarGetMinimumDaysInFirstWeek'); - late final _CFCalendarGetMinimumDaysInFirstWeek = - _CFCalendarGetMinimumDaysInFirstWeekPtr.asFunction< - int Function(CFCalendarRef)>(); + late final _execlPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('execl'); + late final _execl = _execlPtr + .asFunction, ffi.Pointer)>(); - void CFCalendarSetMinimumDaysInFirstWeek( - CFCalendarRef calendar, - int mwd, + int execle( + ffi.Pointer __path, + ffi.Pointer __arg0, ) { - return _CFCalendarSetMinimumDaysInFirstWeek( - calendar, - mwd, + return _execle( + __path, + __arg0, ); } - late final _CFCalendarSetMinimumDaysInFirstWeekPtr = - _lookup>( - 'CFCalendarSetMinimumDaysInFirstWeek'); - late final _CFCalendarSetMinimumDaysInFirstWeek = - _CFCalendarSetMinimumDaysInFirstWeekPtr.asFunction< - void Function(CFCalendarRef, int)>(); + late final _execlePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('execle'); + late final _execle = _execlePtr + .asFunction, ffi.Pointer)>(); - CFRange CFCalendarGetMinimumRangeOfUnit( - CFCalendarRef calendar, - int unit, + int execlp( + ffi.Pointer __file, + ffi.Pointer __arg0, ) { - return _CFCalendarGetMinimumRangeOfUnit( - calendar, - unit, + return _execlp( + __file, + __arg0, ); } - late final _CFCalendarGetMinimumRangeOfUnitPtr = - _lookup>( - 'CFCalendarGetMinimumRangeOfUnit'); - late final _CFCalendarGetMinimumRangeOfUnit = - _CFCalendarGetMinimumRangeOfUnitPtr.asFunction< - CFRange Function(CFCalendarRef, int)>(); + late final _execlpPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('execlp'); + late final _execlp = _execlpPtr + .asFunction, ffi.Pointer)>(); - CFRange CFCalendarGetMaximumRangeOfUnit( - CFCalendarRef calendar, - int unit, + int execv( + ffi.Pointer __path, + ffi.Pointer> __argv, ) { - return _CFCalendarGetMaximumRangeOfUnit( - calendar, - unit, + return _execv( + __path, + __argv, ); } - late final _CFCalendarGetMaximumRangeOfUnitPtr = - _lookup>( - 'CFCalendarGetMaximumRangeOfUnit'); - late final _CFCalendarGetMaximumRangeOfUnit = - _CFCalendarGetMaximumRangeOfUnitPtr.asFunction< - CFRange Function(CFCalendarRef, int)>(); + late final _execvPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer>)>>('execv'); + late final _execv = _execvPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>)>(); - CFRange CFCalendarGetRangeOfUnit( - CFCalendarRef calendar, - int smallerUnit, - int biggerUnit, - double at, + int execve( + ffi.Pointer __file, + ffi.Pointer> __argv, + ffi.Pointer> __envp, ) { - return _CFCalendarGetRangeOfUnit( - calendar, - smallerUnit, - biggerUnit, - at, + return _execve( + __file, + __argv, + __envp, ); } - late final _CFCalendarGetRangeOfUnitPtr = _lookup< + late final _execvePtr = _lookup< ffi.NativeFunction< - CFRange Function(CFCalendarRef, ffi.Int32, ffi.Int32, - CFAbsoluteTime)>>('CFCalendarGetRangeOfUnit'); - late final _CFCalendarGetRangeOfUnit = _CFCalendarGetRangeOfUnitPtr - .asFunction(); + ffi.Int Function( + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>('execve'); + late final _execve = _execvePtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer>, + ffi.Pointer>)>(); - int CFCalendarGetOrdinalityOfUnit( - CFCalendarRef calendar, - int smallerUnit, - int biggerUnit, - double at, + int execvp( + ffi.Pointer __file, + ffi.Pointer> __argv, ) { - return _CFCalendarGetOrdinalityOfUnit( - calendar, - smallerUnit, - biggerUnit, - at, + return _execvp( + __file, + __argv, ); } - late final _CFCalendarGetOrdinalityOfUnitPtr = _lookup< + late final _execvpPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFCalendarRef, ffi.Int32, ffi.Int32, - CFAbsoluteTime)>>('CFCalendarGetOrdinalityOfUnit'); - late final _CFCalendarGetOrdinalityOfUnit = _CFCalendarGetOrdinalityOfUnitPtr - .asFunction(); + ffi.Int Function(ffi.Pointer, + ffi.Pointer>)>>('execvp'); + late final _execvp = _execvpPtr.asFunction< + int Function( + ffi.Pointer, ffi.Pointer>)>(); - int CFCalendarGetTimeRangeOfUnit( - CFCalendarRef calendar, - int unit, - double at, - ffi.Pointer startp, - ffi.Pointer tip, - ) { - return _CFCalendarGetTimeRangeOfUnit( - calendar, - unit, - at, - startp, - tip, - ); + int fork() { + return _fork(); } - late final _CFCalendarGetTimeRangeOfUnitPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFCalendarRef, - ffi.Int32, - CFAbsoluteTime, - ffi.Pointer, - ffi.Pointer)>>('CFCalendarGetTimeRangeOfUnit'); - late final _CFCalendarGetTimeRangeOfUnit = - _CFCalendarGetTimeRangeOfUnitPtr.asFunction< - int Function(CFCalendarRef, int, double, ffi.Pointer, - ffi.Pointer)>(); + late final _forkPtr = _lookup>('fork'); + late final _fork = _forkPtr.asFunction(); - int CFCalendarComposeAbsoluteTime( - CFCalendarRef calendar, - ffi.Pointer at, - ffi.Pointer componentDesc, + int fpathconf( + int arg0, + int arg1, ) { - return _CFCalendarComposeAbsoluteTime( - calendar, - at, - componentDesc, + return _fpathconf( + arg0, + arg1, ); } - late final _CFCalendarComposeAbsoluteTimePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFCalendarRef, ffi.Pointer, - ffi.Pointer)>>('CFCalendarComposeAbsoluteTime'); - late final _CFCalendarComposeAbsoluteTime = - _CFCalendarComposeAbsoluteTimePtr.asFunction< - int Function(CFCalendarRef, ffi.Pointer, - ffi.Pointer)>(); + late final _fpathconfPtr = + _lookup>( + 'fpathconf'); + late final _fpathconf = _fpathconfPtr.asFunction(); - int CFCalendarDecomposeAbsoluteTime( - CFCalendarRef calendar, - double at, - ffi.Pointer componentDesc, + ffi.Pointer getcwd( + ffi.Pointer arg0, + int arg1, ) { - return _CFCalendarDecomposeAbsoluteTime( - calendar, - at, - componentDesc, + return _getcwd( + arg0, + arg1, ); } - late final _CFCalendarDecomposeAbsoluteTimePtr = _lookup< + late final _getcwdPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFCalendarRef, CFAbsoluteTime, - ffi.Pointer)>>('CFCalendarDecomposeAbsoluteTime'); - late final _CFCalendarDecomposeAbsoluteTime = - _CFCalendarDecomposeAbsoluteTimePtr.asFunction< - int Function(CFCalendarRef, double, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Size)>>('getcwd'); + late final _getcwd = _getcwdPtr + .asFunction Function(ffi.Pointer, int)>(); - int CFCalendarAddComponents( - CFCalendarRef calendar, - ffi.Pointer at, - int options, - ffi.Pointer componentDesc, - ) { - return _CFCalendarAddComponents( - calendar, - at, - options, - componentDesc, - ); + int getegid() { + return _getegid(); } - late final _CFCalendarAddComponentsPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFCalendarRef, - ffi.Pointer, - CFOptionFlags, - ffi.Pointer)>>('CFCalendarAddComponents'); - late final _CFCalendarAddComponents = _CFCalendarAddComponentsPtr.asFunction< - int Function(CFCalendarRef, ffi.Pointer, int, - ffi.Pointer)>(); + late final _getegidPtr = + _lookup>('getegid'); + late final _getegid = _getegidPtr.asFunction(); - int CFCalendarGetComponentDifference( - CFCalendarRef calendar, - double startingAT, - double resultAT, - int options, - ffi.Pointer componentDesc, - ) { - return _CFCalendarGetComponentDifference( - calendar, - startingAT, - resultAT, - options, - componentDesc, - ); + int geteuid() { + return _geteuid(); } - late final _CFCalendarGetComponentDifferencePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFCalendarRef, - CFAbsoluteTime, - CFAbsoluteTime, - CFOptionFlags, - ffi.Pointer)>>('CFCalendarGetComponentDifference'); - late final _CFCalendarGetComponentDifference = - _CFCalendarGetComponentDifferencePtr.asFunction< - int Function( - CFCalendarRef, double, double, int, ffi.Pointer)>(); + late final _geteuidPtr = + _lookup>('geteuid'); + late final _geteuid = _geteuidPtr.asFunction(); - CFStringRef CFDateFormatterCreateDateFormatFromTemplate( - CFAllocatorRef allocator, - CFStringRef tmplate, - int options, - CFLocaleRef locale, + int getgid() { + return _getgid(); + } + + late final _getgidPtr = + _lookup>('getgid'); + late final _getgid = _getgidPtr.asFunction(); + + int getgroups( + int arg0, + ffi.Pointer arg1, ) { - return _CFDateFormatterCreateDateFormatFromTemplate( - allocator, - tmplate, - options, - locale, + return _getgroups( + arg0, + arg1, ); } - late final _CFDateFormatterCreateDateFormatFromTemplatePtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFOptionFlags, - CFLocaleRef)>>('CFDateFormatterCreateDateFormatFromTemplate'); - late final _CFDateFormatterCreateDateFormatFromTemplate = - _CFDateFormatterCreateDateFormatFromTemplatePtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef, int, CFLocaleRef)>(); + late final _getgroupsPtr = _lookup< + ffi.NativeFunction)>>( + 'getgroups'); + late final _getgroups = + _getgroupsPtr.asFunction)>(); - int CFDateFormatterGetTypeID() { - return _CFDateFormatterGetTypeID(); + ffi.Pointer getlogin() { + return _getlogin(); } - late final _CFDateFormatterGetTypeIDPtr = - _lookup>( - 'CFDateFormatterGetTypeID'); - late final _CFDateFormatterGetTypeID = - _CFDateFormatterGetTypeIDPtr.asFunction(); + late final _getloginPtr = + _lookup Function()>>('getlogin'); + late final _getlogin = + _getloginPtr.asFunction Function()>(); - CFDateFormatterRef CFDateFormatterCreateISO8601Formatter( - CFAllocatorRef allocator, - int formatOptions, - ) { - return _CFDateFormatterCreateISO8601Formatter( - allocator, - formatOptions, - ); + int getpgrp() { + return _getpgrp(); } - late final _CFDateFormatterCreateISO8601FormatterPtr = _lookup< - ffi.NativeFunction< - CFDateFormatterRef Function(CFAllocatorRef, - ffi.Int32)>>('CFDateFormatterCreateISO8601Formatter'); - late final _CFDateFormatterCreateISO8601Formatter = - _CFDateFormatterCreateISO8601FormatterPtr.asFunction< - CFDateFormatterRef Function(CFAllocatorRef, int)>(); + late final _getpgrpPtr = + _lookup>('getpgrp'); + late final _getpgrp = _getpgrpPtr.asFunction(); - CFDateFormatterRef CFDateFormatterCreate( - CFAllocatorRef allocator, - CFLocaleRef locale, - int dateStyle, - int timeStyle, - ) { - return _CFDateFormatterCreate( - allocator, - locale, - dateStyle, - timeStyle, - ); + int getpid() { + return _getpid(); } - late final _CFDateFormatterCreatePtr = _lookup< - ffi.NativeFunction< - CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, ffi.Int32, - ffi.Int32)>>('CFDateFormatterCreate'); - late final _CFDateFormatterCreate = _CFDateFormatterCreatePtr.asFunction< - CFDateFormatterRef Function(CFAllocatorRef, CFLocaleRef, int, int)>(); + late final _getpidPtr = + _lookup>('getpid'); + late final _getpid = _getpidPtr.asFunction(); - CFLocaleRef CFDateFormatterGetLocale( - CFDateFormatterRef formatter, - ) { - return _CFDateFormatterGetLocale( - formatter, - ); + int getppid() { + return _getppid(); } - late final _CFDateFormatterGetLocalePtr = - _lookup>( - 'CFDateFormatterGetLocale'); - late final _CFDateFormatterGetLocale = _CFDateFormatterGetLocalePtr - .asFunction(); + late final _getppidPtr = + _lookup>('getppid'); + late final _getppid = _getppidPtr.asFunction(); - int CFDateFormatterGetDateStyle( - CFDateFormatterRef formatter, - ) { - return _CFDateFormatterGetDateStyle( - formatter, - ); + int getuid() { + return _getuid(); } - late final _CFDateFormatterGetDateStylePtr = - _lookup>( - 'CFDateFormatterGetDateStyle'); - late final _CFDateFormatterGetDateStyle = _CFDateFormatterGetDateStylePtr - .asFunction(); + late final _getuidPtr = + _lookup>('getuid'); + late final _getuid = _getuidPtr.asFunction(); - int CFDateFormatterGetTimeStyle( - CFDateFormatterRef formatter, + int isatty( + int arg0, ) { - return _CFDateFormatterGetTimeStyle( - formatter, + return _isatty( + arg0, ); } - late final _CFDateFormatterGetTimeStylePtr = - _lookup>( - 'CFDateFormatterGetTimeStyle'); - late final _CFDateFormatterGetTimeStyle = _CFDateFormatterGetTimeStylePtr - .asFunction(); + late final _isattyPtr = + _lookup>('isatty'); + late final _isatty = _isattyPtr.asFunction(); - CFStringRef CFDateFormatterGetFormat( - CFDateFormatterRef formatter, + int link( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFDateFormatterGetFormat( - formatter, + return _link( + arg0, + arg1, ); } - late final _CFDateFormatterGetFormatPtr = - _lookup>( - 'CFDateFormatterGetFormat'); - late final _CFDateFormatterGetFormat = _CFDateFormatterGetFormatPtr - .asFunction(); + late final _linkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('link'); + late final _link = _linkPtr + .asFunction, ffi.Pointer)>(); - void CFDateFormatterSetFormat( - CFDateFormatterRef formatter, - CFStringRef formatString, + int lseek( + int arg0, + int arg1, + int arg2, ) { - return _CFDateFormatterSetFormat( - formatter, - formatString, + return _lseek( + arg0, + arg1, + arg2, ); } - late final _CFDateFormatterSetFormatPtr = _lookup< - ffi - .NativeFunction>( - 'CFDateFormatterSetFormat'); - late final _CFDateFormatterSetFormat = _CFDateFormatterSetFormatPtr - .asFunction(); + late final _lseekPtr = + _lookup>( + 'lseek'); + late final _lseek = _lseekPtr.asFunction(); - CFStringRef CFDateFormatterCreateStringWithDate( - CFAllocatorRef allocator, - CFDateFormatterRef formatter, - CFDateRef date, + int pathconf( + ffi.Pointer arg0, + int arg1, ) { - return _CFDateFormatterCreateStringWithDate( - allocator, - formatter, - date, + return _pathconf( + arg0, + arg1, ); } - late final _CFDateFormatterCreateStringWithDatePtr = _lookup< + late final _pathconfPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, - CFDateRef)>>('CFDateFormatterCreateStringWithDate'); - late final _CFDateFormatterCreateStringWithDate = - _CFDateFormatterCreateStringWithDatePtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFDateFormatterRef, CFDateRef)>(); + ffi.Long Function(ffi.Pointer, ffi.Int)>>('pathconf'); + late final _pathconf = + _pathconfPtr.asFunction, int)>(); - CFStringRef CFDateFormatterCreateStringWithAbsoluteTime( - CFAllocatorRef allocator, - CFDateFormatterRef formatter, - double at, + int pause() { + return _pause(); + } + + late final _pausePtr = + _lookup>('pause'); + late final _pause = _pausePtr.asFunction(); + + int pipe( + ffi.Pointer arg0, ) { - return _CFDateFormatterCreateStringWithAbsoluteTime( - allocator, - formatter, - at, + return _pipe( + arg0, ); } - late final _CFDateFormatterCreateStringWithAbsoluteTimePtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, - CFAbsoluteTime)>>('CFDateFormatterCreateStringWithAbsoluteTime'); - late final _CFDateFormatterCreateStringWithAbsoluteTime = - _CFDateFormatterCreateStringWithAbsoluteTimePtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFDateFormatterRef, double)>(); + late final _pipePtr = + _lookup)>>( + 'pipe'); + late final _pipe = _pipePtr.asFunction)>(); - CFDateRef CFDateFormatterCreateDateFromString( - CFAllocatorRef allocator, - CFDateFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, + int read( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFDateFormatterCreateDateFromString( - allocator, - formatter, - string, - rangep, + return _read( + arg0, + arg1, + arg2, ); } - late final _CFDateFormatterCreateDateFromStringPtr = _lookup< + late final _readPtr = _lookup< ffi.NativeFunction< - CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, - ffi.Pointer)>>('CFDateFormatterCreateDateFromString'); - late final _CFDateFormatterCreateDateFromString = - _CFDateFormatterCreateDateFromStringPtr.asFunction< - CFDateRef Function(CFAllocatorRef, CFDateFormatterRef, CFStringRef, - ffi.Pointer)>(); + ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('read'); + late final _read = + _readPtr.asFunction, int)>(); - int CFDateFormatterGetAbsoluteTimeFromString( - CFDateFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, - ffi.Pointer atp, + int rmdir( + ffi.Pointer arg0, ) { - return _CFDateFormatterGetAbsoluteTimeFromString( - formatter, - string, - rangep, - atp, + return _rmdir( + arg0, ); } - late final _CFDateFormatterGetAbsoluteTimeFromStringPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFDateFormatterRef, CFStringRef, - ffi.Pointer, ffi.Pointer)>>( - 'CFDateFormatterGetAbsoluteTimeFromString'); - late final _CFDateFormatterGetAbsoluteTimeFromString = - _CFDateFormatterGetAbsoluteTimeFromStringPtr.asFunction< - int Function(CFDateFormatterRef, CFStringRef, ffi.Pointer, - ffi.Pointer)>(); + late final _rmdirPtr = + _lookup)>>( + 'rmdir'); + late final _rmdir = + _rmdirPtr.asFunction)>(); - void CFDateFormatterSetProperty( - CFDateFormatterRef formatter, - CFStringRef key, - CFTypeRef value, + int setgid( + int arg0, ) { - return _CFDateFormatterSetProperty( - formatter, - key, - value, + return _setgid( + arg0, ); } - late final _CFDateFormatterSetPropertyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFDateFormatterRef, CFStringRef, - CFTypeRef)>>('CFDateFormatterSetProperty'); - late final _CFDateFormatterSetProperty = _CFDateFormatterSetPropertyPtr - .asFunction(); + late final _setgidPtr = + _lookup>('setgid'); + late final _setgid = _setgidPtr.asFunction(); - CFTypeRef CFDateFormatterCopyProperty( - CFDateFormatterRef formatter, - CFDateFormatterKey key, + int setpgid( + int arg0, + int arg1, ) { - return _CFDateFormatterCopyProperty( - formatter, - key, + return _setpgid( + arg0, + arg1, ); } - late final _CFDateFormatterCopyPropertyPtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFDateFormatterRef, - CFDateFormatterKey)>>('CFDateFormatterCopyProperty'); - late final _CFDateFormatterCopyProperty = _CFDateFormatterCopyPropertyPtr - .asFunction(); - - late final ffi.Pointer _kCFDateFormatterIsLenient = - _lookup('kCFDateFormatterIsLenient'); - - CFDateFormatterKey get kCFDateFormatterIsLenient => - _kCFDateFormatterIsLenient.value; - - late final ffi.Pointer _kCFDateFormatterTimeZone = - _lookup('kCFDateFormatterTimeZone'); - - CFDateFormatterKey get kCFDateFormatterTimeZone => - _kCFDateFormatterTimeZone.value; - - late final ffi.Pointer _kCFDateFormatterCalendarName = - _lookup('kCFDateFormatterCalendarName'); - - CFDateFormatterKey get kCFDateFormatterCalendarName => - _kCFDateFormatterCalendarName.value; - - late final ffi.Pointer _kCFDateFormatterDefaultFormat = - _lookup('kCFDateFormatterDefaultFormat'); - - CFDateFormatterKey get kCFDateFormatterDefaultFormat => - _kCFDateFormatterDefaultFormat.value; - - late final ffi.Pointer - _kCFDateFormatterTwoDigitStartDate = - _lookup('kCFDateFormatterTwoDigitStartDate'); - - CFDateFormatterKey get kCFDateFormatterTwoDigitStartDate => - _kCFDateFormatterTwoDigitStartDate.value; - - late final ffi.Pointer _kCFDateFormatterDefaultDate = - _lookup('kCFDateFormatterDefaultDate'); - - CFDateFormatterKey get kCFDateFormatterDefaultDate => - _kCFDateFormatterDefaultDate.value; - - late final ffi.Pointer _kCFDateFormatterCalendar = - _lookup('kCFDateFormatterCalendar'); - - CFDateFormatterKey get kCFDateFormatterCalendar => - _kCFDateFormatterCalendar.value; - - late final ffi.Pointer _kCFDateFormatterEraSymbols = - _lookup('kCFDateFormatterEraSymbols'); - - CFDateFormatterKey get kCFDateFormatterEraSymbols => - _kCFDateFormatterEraSymbols.value; + late final _setpgidPtr = + _lookup>('setpgid'); + late final _setpgid = _setpgidPtr.asFunction(); - late final ffi.Pointer _kCFDateFormatterMonthSymbols = - _lookup('kCFDateFormatterMonthSymbols'); + int setsid() { + return _setsid(); + } - CFDateFormatterKey get kCFDateFormatterMonthSymbols => - _kCFDateFormatterMonthSymbols.value; + late final _setsidPtr = + _lookup>('setsid'); + late final _setsid = _setsidPtr.asFunction(); - late final ffi.Pointer - _kCFDateFormatterShortMonthSymbols = - _lookup('kCFDateFormatterShortMonthSymbols'); + int setuid( + int arg0, + ) { + return _setuid( + arg0, + ); + } - CFDateFormatterKey get kCFDateFormatterShortMonthSymbols => - _kCFDateFormatterShortMonthSymbols.value; + late final _setuidPtr = + _lookup>('setuid'); + late final _setuid = _setuidPtr.asFunction(); - late final ffi.Pointer _kCFDateFormatterWeekdaySymbols = - _lookup('kCFDateFormatterWeekdaySymbols'); + int sleep( + int arg0, + ) { + return _sleep( + arg0, + ); + } - CFDateFormatterKey get kCFDateFormatterWeekdaySymbols => - _kCFDateFormatterWeekdaySymbols.value; + late final _sleepPtr = + _lookup>( + 'sleep'); + late final _sleep = _sleepPtr.asFunction(); - late final ffi.Pointer - _kCFDateFormatterShortWeekdaySymbols = - _lookup('kCFDateFormatterShortWeekdaySymbols'); + int sysconf( + int arg0, + ) { + return _sysconf( + arg0, + ); + } - CFDateFormatterKey get kCFDateFormatterShortWeekdaySymbols => - _kCFDateFormatterShortWeekdaySymbols.value; + late final _sysconfPtr = + _lookup>('sysconf'); + late final _sysconf = _sysconfPtr.asFunction(); - late final ffi.Pointer _kCFDateFormatterAMSymbol = - _lookup('kCFDateFormatterAMSymbol'); + int tcgetpgrp( + int arg0, + ) { + return _tcgetpgrp( + arg0, + ); + } - CFDateFormatterKey get kCFDateFormatterAMSymbol => - _kCFDateFormatterAMSymbol.value; + late final _tcgetpgrpPtr = + _lookup>('tcgetpgrp'); + late final _tcgetpgrp = _tcgetpgrpPtr.asFunction(); - late final ffi.Pointer _kCFDateFormatterPMSymbol = - _lookup('kCFDateFormatterPMSymbol'); + int tcsetpgrp( + int arg0, + int arg1, + ) { + return _tcsetpgrp( + arg0, + arg1, + ); + } - CFDateFormatterKey get kCFDateFormatterPMSymbol => - _kCFDateFormatterPMSymbol.value; + late final _tcsetpgrpPtr = + _lookup>( + 'tcsetpgrp'); + late final _tcsetpgrp = _tcsetpgrpPtr.asFunction(); - late final ffi.Pointer _kCFDateFormatterLongEraSymbols = - _lookup('kCFDateFormatterLongEraSymbols'); + ffi.Pointer ttyname( + int arg0, + ) { + return _ttyname( + arg0, + ); + } - CFDateFormatterKey get kCFDateFormatterLongEraSymbols => - _kCFDateFormatterLongEraSymbols.value; + late final _ttynamePtr = + _lookup Function(ffi.Int)>>( + 'ttyname'); + late final _ttyname = + _ttynamePtr.asFunction Function(int)>(); - late final ffi.Pointer - _kCFDateFormatterVeryShortMonthSymbols = - _lookup('kCFDateFormatterVeryShortMonthSymbols'); + int ttyname_r( + int arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _ttyname_r( + arg0, + arg1, + arg2, + ); + } - CFDateFormatterKey get kCFDateFormatterVeryShortMonthSymbols => - _kCFDateFormatterVeryShortMonthSymbols.value; + late final _ttyname_rPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('ttyname_r'); + late final _ttyname_r = + _ttyname_rPtr.asFunction, int)>(); - late final ffi.Pointer - _kCFDateFormatterStandaloneMonthSymbols = - _lookup('kCFDateFormatterStandaloneMonthSymbols'); + int unlink( + ffi.Pointer arg0, + ) { + return _unlink( + arg0, + ); + } - CFDateFormatterKey get kCFDateFormatterStandaloneMonthSymbols => - _kCFDateFormatterStandaloneMonthSymbols.value; + late final _unlinkPtr = + _lookup)>>( + 'unlink'); + late final _unlink = + _unlinkPtr.asFunction)>(); - late final ffi.Pointer - _kCFDateFormatterShortStandaloneMonthSymbols = - _lookup( - 'kCFDateFormatterShortStandaloneMonthSymbols'); + int write( + int __fd, + ffi.Pointer __buf, + int __nbyte, + ) { + return _write( + __fd, + __buf, + __nbyte, + ); + } - CFDateFormatterKey get kCFDateFormatterShortStandaloneMonthSymbols => - _kCFDateFormatterShortStandaloneMonthSymbols.value; + late final _writePtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('write'); + late final _write = + _writePtr.asFunction, int)>(); - late final ffi.Pointer - _kCFDateFormatterVeryShortStandaloneMonthSymbols = - _lookup( - 'kCFDateFormatterVeryShortStandaloneMonthSymbols'); + int confstr( + int arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _confstr( + arg0, + arg1, + arg2, + ); + } - CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneMonthSymbols => - _kCFDateFormatterVeryShortStandaloneMonthSymbols.value; + late final _confstrPtr = _lookup< + ffi.NativeFunction< + ffi.Size Function( + ffi.Int, ffi.Pointer, ffi.Size)>>('confstr'); + late final _confstr = + _confstrPtr.asFunction, int)>(); - late final ffi.Pointer - _kCFDateFormatterVeryShortWeekdaySymbols = - _lookup('kCFDateFormatterVeryShortWeekdaySymbols'); + int getopt( + int arg0, + ffi.Pointer> arg1, + ffi.Pointer arg2, + ) { + return _getopt( + arg0, + arg1, + arg2, + ); + } - CFDateFormatterKey get kCFDateFormatterVeryShortWeekdaySymbols => - _kCFDateFormatterVeryShortWeekdaySymbols.value; + late final _getoptPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer>, + ffi.Pointer)>>('getopt'); + late final _getopt = _getoptPtr.asFunction< + int Function( + int, ffi.Pointer>, ffi.Pointer)>(); - late final ffi.Pointer - _kCFDateFormatterStandaloneWeekdaySymbols = - _lookup('kCFDateFormatterStandaloneWeekdaySymbols'); + late final ffi.Pointer> _optarg = + _lookup>('optarg'); - CFDateFormatterKey get kCFDateFormatterStandaloneWeekdaySymbols => - _kCFDateFormatterStandaloneWeekdaySymbols.value; + ffi.Pointer get optarg => _optarg.value; - late final ffi.Pointer - _kCFDateFormatterShortStandaloneWeekdaySymbols = - _lookup( - 'kCFDateFormatterShortStandaloneWeekdaySymbols'); + set optarg(ffi.Pointer value) => _optarg.value = value; - CFDateFormatterKey get kCFDateFormatterShortStandaloneWeekdaySymbols => - _kCFDateFormatterShortStandaloneWeekdaySymbols.value; + late final ffi.Pointer _optind = _lookup('optind'); - late final ffi.Pointer - _kCFDateFormatterVeryShortStandaloneWeekdaySymbols = - _lookup( - 'kCFDateFormatterVeryShortStandaloneWeekdaySymbols'); + int get optind => _optind.value; - CFDateFormatterKey get kCFDateFormatterVeryShortStandaloneWeekdaySymbols => - _kCFDateFormatterVeryShortStandaloneWeekdaySymbols.value; + set optind(int value) => _optind.value = value; - late final ffi.Pointer _kCFDateFormatterQuarterSymbols = - _lookup('kCFDateFormatterQuarterSymbols'); + late final ffi.Pointer _opterr = _lookup('opterr'); - CFDateFormatterKey get kCFDateFormatterQuarterSymbols => - _kCFDateFormatterQuarterSymbols.value; + int get opterr => _opterr.value; - late final ffi.Pointer - _kCFDateFormatterShortQuarterSymbols = - _lookup('kCFDateFormatterShortQuarterSymbols'); + set opterr(int value) => _opterr.value = value; - CFDateFormatterKey get kCFDateFormatterShortQuarterSymbols => - _kCFDateFormatterShortQuarterSymbols.value; + late final ffi.Pointer _optopt = _lookup('optopt'); - late final ffi.Pointer - _kCFDateFormatterStandaloneQuarterSymbols = - _lookup('kCFDateFormatterStandaloneQuarterSymbols'); + int get optopt => _optopt.value; - CFDateFormatterKey get kCFDateFormatterStandaloneQuarterSymbols => - _kCFDateFormatterStandaloneQuarterSymbols.value; + set optopt(int value) => _optopt.value = value; - late final ffi.Pointer - _kCFDateFormatterShortStandaloneQuarterSymbols = - _lookup( - 'kCFDateFormatterShortStandaloneQuarterSymbols'); + ffi.Pointer brk( + ffi.Pointer arg0, + ) { + return _brk( + arg0, + ); + } - CFDateFormatterKey get kCFDateFormatterShortStandaloneQuarterSymbols => - _kCFDateFormatterShortStandaloneQuarterSymbols.value; + late final _brkPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('brk'); + late final _brk = _brkPtr + .asFunction Function(ffi.Pointer)>(); - late final ffi.Pointer - _kCFDateFormatterGregorianStartDate = - _lookup('kCFDateFormatterGregorianStartDate'); + int chroot( + ffi.Pointer arg0, + ) { + return _chroot( + arg0, + ); + } - CFDateFormatterKey get kCFDateFormatterGregorianStartDate => - _kCFDateFormatterGregorianStartDate.value; + late final _chrootPtr = + _lookup)>>( + 'chroot'); + late final _chroot = + _chrootPtr.asFunction)>(); - late final ffi.Pointer - _kCFDateFormatterDoesRelativeDateFormattingKey = - _lookup( - 'kCFDateFormatterDoesRelativeDateFormattingKey'); + ffi.Pointer crypt( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _crypt( + arg0, + arg1, + ); + } - CFDateFormatterKey get kCFDateFormatterDoesRelativeDateFormattingKey => - _kCFDateFormatterDoesRelativeDateFormattingKey.value; + late final _cryptPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>>('crypt'); + late final _crypt = _cryptPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - late final ffi.Pointer _kCFBooleanTrue = - _lookup('kCFBooleanTrue'); + void encrypt( + ffi.Pointer arg0, + int arg1, + ) { + return _encrypt( + arg0, + arg1, + ); + } - CFBooleanRef get kCFBooleanTrue => _kCFBooleanTrue.value; + late final _encryptPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int)>>('encrypt'); + late final _encrypt = + _encryptPtr.asFunction, int)>(); - late final ffi.Pointer _kCFBooleanFalse = - _lookup('kCFBooleanFalse'); + int fchdir( + int arg0, + ) { + return _fchdir( + arg0, + ); + } - CFBooleanRef get kCFBooleanFalse => _kCFBooleanFalse.value; + late final _fchdirPtr = + _lookup>('fchdir'); + late final _fchdir = _fchdirPtr.asFunction(); - int CFBooleanGetTypeID() { - return _CFBooleanGetTypeID(); + int gethostid() { + return _gethostid(); } - late final _CFBooleanGetTypeIDPtr = - _lookup>('CFBooleanGetTypeID'); - late final _CFBooleanGetTypeID = - _CFBooleanGetTypeIDPtr.asFunction(); + late final _gethostidPtr = + _lookup>('gethostid'); + late final _gethostid = _gethostidPtr.asFunction(); - int CFBooleanGetValue( - CFBooleanRef boolean, + int getpgid( + int arg0, ) { - return _CFBooleanGetValue( - boolean, + return _getpgid( + arg0, ); } - late final _CFBooleanGetValuePtr = - _lookup>( - 'CFBooleanGetValue'); - late final _CFBooleanGetValue = - _CFBooleanGetValuePtr.asFunction(); - - late final ffi.Pointer _kCFNumberPositiveInfinity = - _lookup('kCFNumberPositiveInfinity'); - - CFNumberRef get kCFNumberPositiveInfinity => _kCFNumberPositiveInfinity.value; + late final _getpgidPtr = + _lookup>('getpgid'); + late final _getpgid = _getpgidPtr.asFunction(); - late final ffi.Pointer _kCFNumberNegativeInfinity = - _lookup('kCFNumberNegativeInfinity'); + int getsid( + int arg0, + ) { + return _getsid( + arg0, + ); + } - CFNumberRef get kCFNumberNegativeInfinity => _kCFNumberNegativeInfinity.value; + late final _getsidPtr = + _lookup>('getsid'); + late final _getsid = _getsidPtr.asFunction(); - late final ffi.Pointer _kCFNumberNaN = - _lookup('kCFNumberNaN'); + int getdtablesize() { + return _getdtablesize(); + } - CFNumberRef get kCFNumberNaN => _kCFNumberNaN.value; + late final _getdtablesizePtr = + _lookup>('getdtablesize'); + late final _getdtablesize = _getdtablesizePtr.asFunction(); - int CFNumberGetTypeID() { - return _CFNumberGetTypeID(); + int getpagesize() { + return _getpagesize(); } - late final _CFNumberGetTypeIDPtr = - _lookup>('CFNumberGetTypeID'); - late final _CFNumberGetTypeID = - _CFNumberGetTypeIDPtr.asFunction(); + late final _getpagesizePtr = + _lookup>('getpagesize'); + late final _getpagesize = _getpagesizePtr.asFunction(); - CFNumberRef CFNumberCreate( - CFAllocatorRef allocator, - int theType, - ffi.Pointer valuePtr, + ffi.Pointer getpass( + ffi.Pointer arg0, ) { - return _CFNumberCreate( - allocator, - theType, - valuePtr, + return _getpass( + arg0, ); } - late final _CFNumberCreatePtr = _lookup< + late final _getpassPtr = _lookup< ffi.NativeFunction< - CFNumberRef Function(CFAllocatorRef, ffi.Int32, - ffi.Pointer)>>('CFNumberCreate'); - late final _CFNumberCreate = _CFNumberCreatePtr.asFunction< - CFNumberRef Function(CFAllocatorRef, int, ffi.Pointer)>(); + ffi.Pointer Function(ffi.Pointer)>>('getpass'); + late final _getpass = _getpassPtr + .asFunction Function(ffi.Pointer)>(); - int CFNumberGetType( - CFNumberRef number, + ffi.Pointer getwd( + ffi.Pointer arg0, ) { - return _CFNumberGetType( - number, + return _getwd( + arg0, ); } - late final _CFNumberGetTypePtr = - _lookup>( - 'CFNumberGetType'); - late final _CFNumberGetType = - _CFNumberGetTypePtr.asFunction(); + late final _getwdPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('getwd'); + late final _getwd = _getwdPtr + .asFunction Function(ffi.Pointer)>(); - int CFNumberGetByteSize( - CFNumberRef number, + int lchown( + ffi.Pointer arg0, + int arg1, + int arg2, ) { - return _CFNumberGetByteSize( - number, + return _lchown( + arg0, + arg1, + arg2, ); } - late final _CFNumberGetByteSizePtr = - _lookup>( - 'CFNumberGetByteSize'); - late final _CFNumberGetByteSize = - _CFNumberGetByteSizePtr.asFunction(); - - int CFNumberIsFloatType( - CFNumberRef number, - ) { - return _CFNumberIsFloatType( - number, + late final _lchownPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('lchown'); + late final _lchown = + _lchownPtr.asFunction, int, int)>(); + + int lockf( + int arg0, + int arg1, + int arg2, + ) { + return _lockf( + arg0, + arg1, + arg2, ); } - late final _CFNumberIsFloatTypePtr = - _lookup>( - 'CFNumberIsFloatType'); - late final _CFNumberIsFloatType = - _CFNumberIsFloatTypePtr.asFunction(); + late final _lockfPtr = + _lookup>( + 'lockf'); + late final _lockf = _lockfPtr.asFunction(); - int CFNumberGetValue( - CFNumberRef number, - int theType, - ffi.Pointer valuePtr, + int nice( + int arg0, ) { - return _CFNumberGetValue( - number, - theType, - valuePtr, + return _nice( + arg0, ); } - late final _CFNumberGetValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFNumberRef, ffi.Int32, - ffi.Pointer)>>('CFNumberGetValue'); - late final _CFNumberGetValue = _CFNumberGetValuePtr.asFunction< - int Function(CFNumberRef, int, ffi.Pointer)>(); + late final _nicePtr = + _lookup>('nice'); + late final _nice = _nicePtr.asFunction(); - int CFNumberCompare( - CFNumberRef number, - CFNumberRef otherNumber, - ffi.Pointer context, + int pread( + int __fd, + ffi.Pointer __buf, + int __nbyte, + int __offset, ) { - return _CFNumberCompare( - number, - otherNumber, - context, + return _pread( + __fd, + __buf, + __nbyte, + __offset, ); } - late final _CFNumberComparePtr = _lookup< + late final _preadPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFNumberRef, CFNumberRef, - ffi.Pointer)>>('CFNumberCompare'); - late final _CFNumberCompare = _CFNumberComparePtr.asFunction< - int Function(CFNumberRef, CFNumberRef, ffi.Pointer)>(); + ssize_t Function( + ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pread'); + late final _pread = _preadPtr + .asFunction, int, int)>(); - int CFNumberFormatterGetTypeID() { - return _CFNumberFormatterGetTypeID(); + int pwrite( + int __fd, + ffi.Pointer __buf, + int __nbyte, + int __offset, + ) { + return _pwrite( + __fd, + __buf, + __nbyte, + __offset, + ); } - late final _CFNumberFormatterGetTypeIDPtr = - _lookup>( - 'CFNumberFormatterGetTypeID'); - late final _CFNumberFormatterGetTypeID = - _CFNumberFormatterGetTypeIDPtr.asFunction(); + late final _pwritePtr = _lookup< + ffi.NativeFunction< + ssize_t Function( + ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pwrite'); + late final _pwrite = _pwritePtr + .asFunction, int, int)>(); - CFNumberFormatterRef CFNumberFormatterCreate( - CFAllocatorRef allocator, - CFLocaleRef locale, - int style, + ffi.Pointer sbrk( + int arg0, ) { - return _CFNumberFormatterCreate( - allocator, - locale, - style, + return _sbrk( + arg0, ); } - late final _CFNumberFormatterCreatePtr = _lookup< - ffi.NativeFunction< - CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, - ffi.Int32)>>('CFNumberFormatterCreate'); - late final _CFNumberFormatterCreate = _CFNumberFormatterCreatePtr.asFunction< - CFNumberFormatterRef Function(CFAllocatorRef, CFLocaleRef, int)>(); + late final _sbrkPtr = + _lookup Function(ffi.Int)>>( + 'sbrk'); + late final _sbrk = _sbrkPtr.asFunction Function(int)>(); - CFLocaleRef CFNumberFormatterGetLocale( - CFNumberFormatterRef formatter, + int setpgrp() { + return _setpgrp(); + } + + late final _setpgrpPtr = + _lookup>('setpgrp'); + late final _setpgrp = _setpgrpPtr.asFunction(); + + int setregid( + int arg0, + int arg1, ) { - return _CFNumberFormatterGetLocale( - formatter, + return _setregid( + arg0, + arg1, ); } - late final _CFNumberFormatterGetLocalePtr = - _lookup>( - 'CFNumberFormatterGetLocale'); - late final _CFNumberFormatterGetLocale = _CFNumberFormatterGetLocalePtr - .asFunction(); + late final _setregidPtr = + _lookup>('setregid'); + late final _setregid = _setregidPtr.asFunction(); - int CFNumberFormatterGetStyle( - CFNumberFormatterRef formatter, + int setreuid( + int arg0, + int arg1, ) { - return _CFNumberFormatterGetStyle( - formatter, + return _setreuid( + arg0, + arg1, ); } - late final _CFNumberFormatterGetStylePtr = - _lookup>( - 'CFNumberFormatterGetStyle'); - late final _CFNumberFormatterGetStyle = _CFNumberFormatterGetStylePtr - .asFunction(); + late final _setreuidPtr = + _lookup>('setreuid'); + late final _setreuid = _setreuidPtr.asFunction(); - CFStringRef CFNumberFormatterGetFormat( - CFNumberFormatterRef formatter, + void sync1() { + return _sync1(); + } + + late final _sync1Ptr = + _lookup>('sync'); + late final _sync1 = _sync1Ptr.asFunction(); + + int truncate( + ffi.Pointer arg0, + int arg1, ) { - return _CFNumberFormatterGetFormat( - formatter, + return _truncate( + arg0, + arg1, ); } - late final _CFNumberFormatterGetFormatPtr = - _lookup>( - 'CFNumberFormatterGetFormat'); - late final _CFNumberFormatterGetFormat = _CFNumberFormatterGetFormatPtr - .asFunction(); + late final _truncatePtr = _lookup< + ffi.NativeFunction, off_t)>>( + 'truncate'); + late final _truncate = + _truncatePtr.asFunction, int)>(); - void CFNumberFormatterSetFormat( - CFNumberFormatterRef formatter, - CFStringRef formatString, + int ualarm( + int arg0, + int arg1, ) { - return _CFNumberFormatterSetFormat( - formatter, - formatString, + return _ualarm( + arg0, + arg1, ); } - late final _CFNumberFormatterSetFormatPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFNumberFormatterRef, - CFStringRef)>>('CFNumberFormatterSetFormat'); - late final _CFNumberFormatterSetFormat = _CFNumberFormatterSetFormatPtr - .asFunction(); + late final _ualarmPtr = + _lookup>( + 'ualarm'); + late final _ualarm = _ualarmPtr.asFunction(); - CFStringRef CFNumberFormatterCreateStringWithNumber( - CFAllocatorRef allocator, - CFNumberFormatterRef formatter, - CFNumberRef number, + int usleep( + int arg0, ) { - return _CFNumberFormatterCreateStringWithNumber( - allocator, - formatter, - number, + return _usleep( + arg0, ); } - late final _CFNumberFormatterCreateStringWithNumberPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, - CFNumberRef)>>('CFNumberFormatterCreateStringWithNumber'); - late final _CFNumberFormatterCreateStringWithNumber = - _CFNumberFormatterCreateStringWithNumberPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFNumberFormatterRef, CFNumberRef)>(); + late final _usleepPtr = + _lookup>('usleep'); + late final _usleep = _usleepPtr.asFunction(); - CFStringRef CFNumberFormatterCreateStringWithValue( - CFAllocatorRef allocator, - CFNumberFormatterRef formatter, - int numberType, - ffi.Pointer valuePtr, + int vfork() { + return _vfork(); + } + + late final _vforkPtr = + _lookup>('vfork'); + late final _vfork = _vforkPtr.asFunction(); + + int fsync( + int arg0, ) { - return _CFNumberFormatterCreateStringWithValue( - allocator, - formatter, - numberType, - valuePtr, + return _fsync( + arg0, ); } - late final _CFNumberFormatterCreateStringWithValuePtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, - ffi.Int32, ffi.Pointer)>>( - 'CFNumberFormatterCreateStringWithValue'); - late final _CFNumberFormatterCreateStringWithValue = - _CFNumberFormatterCreateStringWithValuePtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFNumberFormatterRef, int, - ffi.Pointer)>(); + late final _fsyncPtr = + _lookup>('fsync'); + late final _fsync = _fsyncPtr.asFunction(); - CFNumberRef CFNumberFormatterCreateNumberFromString( - CFAllocatorRef allocator, - CFNumberFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, - int options, + int ftruncate( + int arg0, + int arg1, ) { - return _CFNumberFormatterCreateNumberFromString( - allocator, - formatter, - string, - rangep, - options, + return _ftruncate( + arg0, + arg1, ); } - late final _CFNumberFormatterCreateNumberFromStringPtr = _lookup< - ffi.NativeFunction< - CFNumberRef Function( - CFAllocatorRef, - CFNumberFormatterRef, - CFStringRef, - ffi.Pointer, - CFOptionFlags)>>('CFNumberFormatterCreateNumberFromString'); - late final _CFNumberFormatterCreateNumberFromString = - _CFNumberFormatterCreateNumberFromStringPtr.asFunction< - CFNumberRef Function(CFAllocatorRef, CFNumberFormatterRef, - CFStringRef, ffi.Pointer, int)>(); + late final _ftruncatePtr = + _lookup>( + 'ftruncate'); + late final _ftruncate = _ftruncatePtr.asFunction(); - int CFNumberFormatterGetValueFromString( - CFNumberFormatterRef formatter, - CFStringRef string, - ffi.Pointer rangep, - int numberType, - ffi.Pointer valuePtr, + int getlogin_r( + ffi.Pointer arg0, + int arg1, ) { - return _CFNumberFormatterGetValueFromString( - formatter, - string, - rangep, - numberType, - valuePtr, + return _getlogin_r( + arg0, + arg1, ); } - late final _CFNumberFormatterGetValueFromStringPtr = _lookup< + late final _getlogin_rPtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFNumberFormatterRef, - CFStringRef, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('CFNumberFormatterGetValueFromString'); - late final _CFNumberFormatterGetValueFromString = - _CFNumberFormatterGetValueFromStringPtr.asFunction< - int Function(CFNumberFormatterRef, CFStringRef, ffi.Pointer, - int, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Size)>>('getlogin_r'); + late final _getlogin_r = + _getlogin_rPtr.asFunction, int)>(); - void CFNumberFormatterSetProperty( - CFNumberFormatterRef formatter, - CFNumberFormatterKey key, - CFTypeRef value, + int fchown( + int arg0, + int arg1, + int arg2, ) { - return _CFNumberFormatterSetProperty( - formatter, - key, - value, + return _fchown( + arg0, + arg1, + arg2, ); } - late final _CFNumberFormatterSetPropertyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFNumberFormatterRef, CFNumberFormatterKey, - CFTypeRef)>>('CFNumberFormatterSetProperty'); - late final _CFNumberFormatterSetProperty = - _CFNumberFormatterSetPropertyPtr.asFunction< - void Function( - CFNumberFormatterRef, CFNumberFormatterKey, CFTypeRef)>(); + late final _fchownPtr = + _lookup>( + 'fchown'); + late final _fchown = _fchownPtr.asFunction(); - CFTypeRef CFNumberFormatterCopyProperty( - CFNumberFormatterRef formatter, - CFNumberFormatterKey key, + int gethostname( + ffi.Pointer arg0, + int arg1, ) { - return _CFNumberFormatterCopyProperty( - formatter, - key, + return _gethostname( + arg0, + arg1, ); } - late final _CFNumberFormatterCopyPropertyPtr = _lookup< + late final _gethostnamePtr = _lookup< ffi.NativeFunction< - CFTypeRef Function(CFNumberFormatterRef, - CFNumberFormatterKey)>>('CFNumberFormatterCopyProperty'); - late final _CFNumberFormatterCopyProperty = - _CFNumberFormatterCopyPropertyPtr.asFunction< - CFTypeRef Function(CFNumberFormatterRef, CFNumberFormatterKey)>(); - - late final ffi.Pointer _kCFNumberFormatterCurrencyCode = - _lookup('kCFNumberFormatterCurrencyCode'); - - CFNumberFormatterKey get kCFNumberFormatterCurrencyCode => - _kCFNumberFormatterCurrencyCode.value; + ffi.Int Function(ffi.Pointer, ffi.Size)>>('gethostname'); + late final _gethostname = + _gethostnamePtr.asFunction, int)>(); - late final ffi.Pointer - _kCFNumberFormatterDecimalSeparator = - _lookup('kCFNumberFormatterDecimalSeparator'); + int readlink( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, + ) { + return _readlink( + arg0, + arg1, + arg2, + ); + } - CFNumberFormatterKey get kCFNumberFormatterDecimalSeparator => - _kCFNumberFormatterDecimalSeparator.value; + late final _readlinkPtr = _lookup< + ffi.NativeFunction< + ssize_t Function(ffi.Pointer, ffi.Pointer, + ffi.Size)>>('readlink'); + late final _readlink = _readlinkPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - late final ffi.Pointer - _kCFNumberFormatterCurrencyDecimalSeparator = - _lookup( - 'kCFNumberFormatterCurrencyDecimalSeparator'); + int setegid( + int arg0, + ) { + return _setegid( + arg0, + ); + } - CFNumberFormatterKey get kCFNumberFormatterCurrencyDecimalSeparator => - _kCFNumberFormatterCurrencyDecimalSeparator.value; + late final _setegidPtr = + _lookup>('setegid'); + late final _setegid = _setegidPtr.asFunction(); - late final ffi.Pointer - _kCFNumberFormatterAlwaysShowDecimalSeparator = - _lookup( - 'kCFNumberFormatterAlwaysShowDecimalSeparator'); + int seteuid( + int arg0, + ) { + return _seteuid( + arg0, + ); + } - CFNumberFormatterKey get kCFNumberFormatterAlwaysShowDecimalSeparator => - _kCFNumberFormatterAlwaysShowDecimalSeparator.value; + late final _seteuidPtr = + _lookup>('seteuid'); + late final _seteuid = _seteuidPtr.asFunction(); - late final ffi.Pointer - _kCFNumberFormatterGroupingSeparator = - _lookup('kCFNumberFormatterGroupingSeparator'); + int symlink( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _symlink( + arg0, + arg1, + ); + } - CFNumberFormatterKey get kCFNumberFormatterGroupingSeparator => - _kCFNumberFormatterGroupingSeparator.value; + late final _symlinkPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('symlink'); + late final _symlink = _symlinkPtr + .asFunction, ffi.Pointer)>(); - late final ffi.Pointer - _kCFNumberFormatterUseGroupingSeparator = - _lookup('kCFNumberFormatterUseGroupingSeparator'); + int pselect( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + ) { + return _pselect( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + ); + } - CFNumberFormatterKey get kCFNumberFormatterUseGroupingSeparator => - _kCFNumberFormatterUseGroupingSeparator.value; + late final _pselectPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('pselect'); + late final _pselect = _pselectPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - late final ffi.Pointer - _kCFNumberFormatterPercentSymbol = - _lookup('kCFNumberFormatterPercentSymbol'); + int select( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ) { + return _select( + arg0, + arg1, + arg2, + arg3, + arg4, + ); + } - CFNumberFormatterKey get kCFNumberFormatterPercentSymbol => - _kCFNumberFormatterPercentSymbol.value; + late final _selectPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>('select'); + late final _select = _selectPtr.asFunction< + int Function(int, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - late final ffi.Pointer _kCFNumberFormatterZeroSymbol = - _lookup('kCFNumberFormatterZeroSymbol'); - - CFNumberFormatterKey get kCFNumberFormatterZeroSymbol => - _kCFNumberFormatterZeroSymbol.value; - - late final ffi.Pointer _kCFNumberFormatterNaNSymbol = - _lookup('kCFNumberFormatterNaNSymbol'); - - CFNumberFormatterKey get kCFNumberFormatterNaNSymbol => - _kCFNumberFormatterNaNSymbol.value; + int accessx_np( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + int arg3, + ) { + return _accessx_np( + arg0, + arg1, + arg2, + arg3, + ); + } - late final ffi.Pointer - _kCFNumberFormatterInfinitySymbol = - _lookup('kCFNumberFormatterInfinitySymbol'); + late final _accessx_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, + ffi.Pointer, uid_t)>>('accessx_np'); + late final _accessx_np = _accessx_npPtr.asFunction< + int Function( + ffi.Pointer, int, ffi.Pointer, int)>(); - CFNumberFormatterKey get kCFNumberFormatterInfinitySymbol => - _kCFNumberFormatterInfinitySymbol.value; + int acct( + ffi.Pointer arg0, + ) { + return _acct( + arg0, + ); + } - late final ffi.Pointer _kCFNumberFormatterMinusSign = - _lookup('kCFNumberFormatterMinusSign'); + late final _acctPtr = + _lookup)>>( + 'acct'); + late final _acct = _acctPtr.asFunction)>(); - CFNumberFormatterKey get kCFNumberFormatterMinusSign => - _kCFNumberFormatterMinusSign.value; + int add_profil( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, + ) { + return _add_profil( + arg0, + arg1, + arg2, + arg3, + ); + } - late final ffi.Pointer _kCFNumberFormatterPlusSign = - _lookup('kCFNumberFormatterPlusSign'); + late final _add_profilPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, + ffi.UnsignedInt)>>('add_profil'); + late final _add_profil = _add_profilPtr + .asFunction, int, int, int)>(); - CFNumberFormatterKey get kCFNumberFormatterPlusSign => - _kCFNumberFormatterPlusSign.value; + void endusershell() { + return _endusershell(); + } - late final ffi.Pointer - _kCFNumberFormatterCurrencySymbol = - _lookup('kCFNumberFormatterCurrencySymbol'); + late final _endusershellPtr = + _lookup>('endusershell'); + late final _endusershell = _endusershellPtr.asFunction(); - CFNumberFormatterKey get kCFNumberFormatterCurrencySymbol => - _kCFNumberFormatterCurrencySymbol.value; + int execvP( + ffi.Pointer __file, + ffi.Pointer __searchpath, + ffi.Pointer> __argv, + ) { + return _execvP( + __file, + __searchpath, + __argv, + ); + } - late final ffi.Pointer - _kCFNumberFormatterExponentSymbol = - _lookup('kCFNumberFormatterExponentSymbol'); + late final _execvPPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>>('execvP'); + late final _execvP = _execvPPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer>)>(); - CFNumberFormatterKey get kCFNumberFormatterExponentSymbol => - _kCFNumberFormatterExponentSymbol.value; + ffi.Pointer fflagstostr( + int arg0, + ) { + return _fflagstostr( + arg0, + ); + } - late final ffi.Pointer - _kCFNumberFormatterMinIntegerDigits = - _lookup('kCFNumberFormatterMinIntegerDigits'); + late final _fflagstostrPtr = _lookup< + ffi.NativeFunction Function(ffi.UnsignedLong)>>( + 'fflagstostr'); + late final _fflagstostr = + _fflagstostrPtr.asFunction Function(int)>(); - CFNumberFormatterKey get kCFNumberFormatterMinIntegerDigits => - _kCFNumberFormatterMinIntegerDigits.value; + int getdomainname( + ffi.Pointer arg0, + int arg1, + ) { + return _getdomainname( + arg0, + arg1, + ); + } - late final ffi.Pointer - _kCFNumberFormatterMaxIntegerDigits = - _lookup('kCFNumberFormatterMaxIntegerDigits'); + late final _getdomainnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'getdomainname'); + late final _getdomainname = + _getdomainnamePtr.asFunction, int)>(); - CFNumberFormatterKey get kCFNumberFormatterMaxIntegerDigits => - _kCFNumberFormatterMaxIntegerDigits.value; + int getgrouplist( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) { + return _getgrouplist( + arg0, + arg1, + arg2, + arg3, + ); + } - late final ffi.Pointer - _kCFNumberFormatterMinFractionDigits = - _lookup('kCFNumberFormatterMinFractionDigits'); + late final _getgrouplistPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer, + ffi.Pointer)>>('getgrouplist'); + late final _getgrouplist = _getgrouplistPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterMinFractionDigits => - _kCFNumberFormatterMinFractionDigits.value; + int gethostuuid( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _gethostuuid( + arg0, + arg1, + ); + } - late final ffi.Pointer - _kCFNumberFormatterMaxFractionDigits = - _lookup('kCFNumberFormatterMaxFractionDigits'); + late final _gethostuuidPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('gethostuuid'); + late final _gethostuuid = _gethostuuidPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterMaxFractionDigits => - _kCFNumberFormatterMaxFractionDigits.value; + int getmode( + ffi.Pointer arg0, + int arg1, + ) { + return _getmode( + arg0, + arg1, + ); + } - late final ffi.Pointer _kCFNumberFormatterGroupingSize = - _lookup('kCFNumberFormatterGroupingSize'); + late final _getmodePtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'getmode'); + late final _getmode = + _getmodePtr.asFunction, int)>(); - CFNumberFormatterKey get kCFNumberFormatterGroupingSize => - _kCFNumberFormatterGroupingSize.value; + int getpeereid( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) { + return _getpeereid( + arg0, + arg1, + arg2, + ); + } - late final ffi.Pointer - _kCFNumberFormatterSecondaryGroupingSize = - _lookup('kCFNumberFormatterSecondaryGroupingSize'); + late final _getpeereidPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Pointer)>>('getpeereid'); + late final _getpeereid = _getpeereidPtr + .asFunction, ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterSecondaryGroupingSize => - _kCFNumberFormatterSecondaryGroupingSize.value; + int getsgroups_np( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _getsgroups_np( + arg0, + arg1, + ); + } - late final ffi.Pointer _kCFNumberFormatterRoundingMode = - _lookup('kCFNumberFormatterRoundingMode'); + late final _getsgroups_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('getsgroups_np'); + late final _getsgroups_np = _getsgroups_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterRoundingMode => - _kCFNumberFormatterRoundingMode.value; + ffi.Pointer getusershell() { + return _getusershell(); + } - late final ffi.Pointer - _kCFNumberFormatterRoundingIncrement = - _lookup('kCFNumberFormatterRoundingIncrement'); + late final _getusershellPtr = + _lookup Function()>>( + 'getusershell'); + late final _getusershell = + _getusershellPtr.asFunction Function()>(); - CFNumberFormatterKey get kCFNumberFormatterRoundingIncrement => - _kCFNumberFormatterRoundingIncrement.value; + int getwgroups_np( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) { + return _getwgroups_np( + arg0, + arg1, + ); + } - late final ffi.Pointer _kCFNumberFormatterFormatWidth = - _lookup('kCFNumberFormatterFormatWidth'); + late final _getwgroups_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('getwgroups_np'); + late final _getwgroups_np = _getwgroups_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterFormatWidth => - _kCFNumberFormatterFormatWidth.value; + int initgroups( + ffi.Pointer arg0, + int arg1, + ) { + return _initgroups( + arg0, + arg1, + ); + } - late final ffi.Pointer - _kCFNumberFormatterPaddingPosition = - _lookup('kCFNumberFormatterPaddingPosition'); + late final _initgroupsPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'initgroups'); + late final _initgroups = + _initgroupsPtr.asFunction, int)>(); - CFNumberFormatterKey get kCFNumberFormatterPaddingPosition => - _kCFNumberFormatterPaddingPosition.value; + int issetugid() { + return _issetugid(); + } - late final ffi.Pointer - _kCFNumberFormatterPaddingCharacter = - _lookup('kCFNumberFormatterPaddingCharacter'); + late final _issetugidPtr = + _lookup>('issetugid'); + late final _issetugid = _issetugidPtr.asFunction(); - CFNumberFormatterKey get kCFNumberFormatterPaddingCharacter => - _kCFNumberFormatterPaddingCharacter.value; + ffi.Pointer mkdtemp( + ffi.Pointer arg0, + ) { + return _mkdtemp( + arg0, + ); + } - late final ffi.Pointer - _kCFNumberFormatterDefaultFormat = - _lookup('kCFNumberFormatterDefaultFormat'); + late final _mkdtempPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>>('mkdtemp'); + late final _mkdtemp = _mkdtempPtr + .asFunction Function(ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterDefaultFormat => - _kCFNumberFormatterDefaultFormat.value; + int mknod( + ffi.Pointer arg0, + int arg1, + int arg2, + ) { + return _mknod( + arg0, + arg1, + arg2, + ); + } - late final ffi.Pointer _kCFNumberFormatterMultiplier = - _lookup('kCFNumberFormatterMultiplier'); + late final _mknodPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, mode_t, dev_t)>>('mknod'); + late final _mknod = + _mknodPtr.asFunction, int, int)>(); - CFNumberFormatterKey get kCFNumberFormatterMultiplier => - _kCFNumberFormatterMultiplier.value; + int mkpath_np( + ffi.Pointer path, + int omode, + ) { + return _mkpath_np( + path, + omode, + ); + } - late final ffi.Pointer - _kCFNumberFormatterPositivePrefix = - _lookup('kCFNumberFormatterPositivePrefix'); + late final _mkpath_npPtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'mkpath_np'); + late final _mkpath_np = + _mkpath_npPtr.asFunction, int)>(); - CFNumberFormatterKey get kCFNumberFormatterPositivePrefix => - _kCFNumberFormatterPositivePrefix.value; + int mkpathat_np( + int dfd, + ffi.Pointer path, + int omode, + ) { + return _mkpathat_np( + dfd, + path, + omode, + ); + } - late final ffi.Pointer - _kCFNumberFormatterPositiveSuffix = - _lookup('kCFNumberFormatterPositiveSuffix'); + late final _mkpathat_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, mode_t)>>('mkpathat_np'); + late final _mkpathat_np = _mkpathat_npPtr + .asFunction, int)>(); - CFNumberFormatterKey get kCFNumberFormatterPositiveSuffix => - _kCFNumberFormatterPositiveSuffix.value; + int mkstemps( + ffi.Pointer arg0, + int arg1, + ) { + return _mkstemps( + arg0, + arg1, + ); + } - late final ffi.Pointer - _kCFNumberFormatterNegativePrefix = - _lookup('kCFNumberFormatterNegativePrefix'); + late final _mkstempsPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'mkstemps'); + late final _mkstemps = + _mkstempsPtr.asFunction, int)>(); - CFNumberFormatterKey get kCFNumberFormatterNegativePrefix => - _kCFNumberFormatterNegativePrefix.value; + int mkostemp( + ffi.Pointer path, + int oflags, + ) { + return _mkostemp( + path, + oflags, + ); + } - late final ffi.Pointer - _kCFNumberFormatterNegativeSuffix = - _lookup('kCFNumberFormatterNegativeSuffix'); + late final _mkostempPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'mkostemp'); + late final _mkostemp = + _mkostempPtr.asFunction, int)>(); - CFNumberFormatterKey get kCFNumberFormatterNegativeSuffix => - _kCFNumberFormatterNegativeSuffix.value; + int mkostemps( + ffi.Pointer path, + int slen, + int oflags, + ) { + return _mkostemps( + path, + slen, + oflags, + ); + } - late final ffi.Pointer - _kCFNumberFormatterPerMillSymbol = - _lookup('kCFNumberFormatterPerMillSymbol'); + late final _mkostempsPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int, ffi.Int)>>('mkostemps'); + late final _mkostemps = + _mkostempsPtr.asFunction, int, int)>(); - CFNumberFormatterKey get kCFNumberFormatterPerMillSymbol => - _kCFNumberFormatterPerMillSymbol.value; + int mkstemp_dprotected_np( + ffi.Pointer path, + int dpclass, + int dpflags, + ) { + return _mkstemp_dprotected_np( + path, + dpclass, + dpflags, + ); + } - late final ffi.Pointer - _kCFNumberFormatterInternationalCurrencySymbol = - _lookup( - 'kCFNumberFormatterInternationalCurrencySymbol'); + late final _mkstemp_dprotected_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, + ffi.Int)>>('mkstemp_dprotected_np'); + late final _mkstemp_dprotected_np = _mkstemp_dprotected_npPtr + .asFunction, int, int)>(); - CFNumberFormatterKey get kCFNumberFormatterInternationalCurrencySymbol => - _kCFNumberFormatterInternationalCurrencySymbol.value; + ffi.Pointer mkdtempat_np( + int dfd, + ffi.Pointer path, + ) { + return _mkdtempat_np( + dfd, + path, + ); + } - late final ffi.Pointer - _kCFNumberFormatterCurrencyGroupingSeparator = - _lookup( - 'kCFNumberFormatterCurrencyGroupingSeparator'); + late final _mkdtempat_npPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Int, ffi.Pointer)>>('mkdtempat_np'); + late final _mkdtempat_np = _mkdtempat_npPtr + .asFunction Function(int, ffi.Pointer)>(); - CFNumberFormatterKey get kCFNumberFormatterCurrencyGroupingSeparator => - _kCFNumberFormatterCurrencyGroupingSeparator.value; + int mkstempsat_np( + int dfd, + ffi.Pointer path, + int slen, + ) { + return _mkstempsat_np( + dfd, + path, + slen, + ); + } - late final ffi.Pointer _kCFNumberFormatterIsLenient = - _lookup('kCFNumberFormatterIsLenient'); + late final _mkstempsat_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, ffi.Pointer, ffi.Int)>>('mkstempsat_np'); + late final _mkstempsat_np = _mkstempsat_npPtr + .asFunction, int)>(); - CFNumberFormatterKey get kCFNumberFormatterIsLenient => - _kCFNumberFormatterIsLenient.value; - - late final ffi.Pointer - _kCFNumberFormatterUseSignificantDigits = - _lookup('kCFNumberFormatterUseSignificantDigits'); - - CFNumberFormatterKey get kCFNumberFormatterUseSignificantDigits => - _kCFNumberFormatterUseSignificantDigits.value; - - late final ffi.Pointer - _kCFNumberFormatterMinSignificantDigits = - _lookup('kCFNumberFormatterMinSignificantDigits'); - - CFNumberFormatterKey get kCFNumberFormatterMinSignificantDigits => - _kCFNumberFormatterMinSignificantDigits.value; - - late final ffi.Pointer - _kCFNumberFormatterMaxSignificantDigits = - _lookup('kCFNumberFormatterMaxSignificantDigits'); - - CFNumberFormatterKey get kCFNumberFormatterMaxSignificantDigits => - _kCFNumberFormatterMaxSignificantDigits.value; - - int CFNumberFormatterGetDecimalInfoForCurrencyCode( - CFStringRef currencyCode, - ffi.Pointer defaultFractionDigits, - ffi.Pointer roundingIncrement, + int mkostempsat_np( + int dfd, + ffi.Pointer path, + int slen, + int oflags, ) { - return _CFNumberFormatterGetDecimalInfoForCurrencyCode( - currencyCode, - defaultFractionDigits, - roundingIncrement, + return _mkostempsat_np( + dfd, + path, + slen, + oflags, ); } - late final _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, ffi.Pointer, - ffi.Pointer)>>( - 'CFNumberFormatterGetDecimalInfoForCurrencyCode'); - late final _CFNumberFormatterGetDecimalInfoForCurrencyCode = - _CFNumberFormatterGetDecimalInfoForCurrencyCodePtr.asFunction< - int Function( - CFStringRef, ffi.Pointer, ffi.Pointer)>(); - - late final ffi.Pointer _kCFPreferencesAnyApplication = - _lookup('kCFPreferencesAnyApplication'); - - CFStringRef get kCFPreferencesAnyApplication => - _kCFPreferencesAnyApplication.value; - - set kCFPreferencesAnyApplication(CFStringRef value) => - _kCFPreferencesAnyApplication.value = value; - - late final ffi.Pointer _kCFPreferencesCurrentApplication = - _lookup('kCFPreferencesCurrentApplication'); - - CFStringRef get kCFPreferencesCurrentApplication => - _kCFPreferencesCurrentApplication.value; - - set kCFPreferencesCurrentApplication(CFStringRef value) => - _kCFPreferencesCurrentApplication.value = value; - - late final ffi.Pointer _kCFPreferencesAnyHost = - _lookup('kCFPreferencesAnyHost'); - - CFStringRef get kCFPreferencesAnyHost => _kCFPreferencesAnyHost.value; - - set kCFPreferencesAnyHost(CFStringRef value) => - _kCFPreferencesAnyHost.value = value; - - late final ffi.Pointer _kCFPreferencesCurrentHost = - _lookup('kCFPreferencesCurrentHost'); - - CFStringRef get kCFPreferencesCurrentHost => _kCFPreferencesCurrentHost.value; - - set kCFPreferencesCurrentHost(CFStringRef value) => - _kCFPreferencesCurrentHost.value = value; + late final _mkostempsat_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Int)>>('mkostempsat_np'); + late final _mkostempsat_np = _mkostempsat_npPtr + .asFunction, int, int)>(); - late final ffi.Pointer _kCFPreferencesAnyUser = - _lookup('kCFPreferencesAnyUser'); + int nfssvc( + int arg0, + ffi.Pointer arg1, + ) { + return _nfssvc( + arg0, + arg1, + ); + } - CFStringRef get kCFPreferencesAnyUser => _kCFPreferencesAnyUser.value; + late final _nfssvcPtr = _lookup< + ffi.NativeFunction)>>( + 'nfssvc'); + late final _nfssvc = + _nfssvcPtr.asFunction)>(); - set kCFPreferencesAnyUser(CFStringRef value) => - _kCFPreferencesAnyUser.value = value; + int profil( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, + ) { + return _profil( + arg0, + arg1, + arg2, + arg3, + ); + } - late final ffi.Pointer _kCFPreferencesCurrentUser = - _lookup('kCFPreferencesCurrentUser'); + late final _profilPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, + ffi.UnsignedInt)>>('profil'); + late final _profil = _profilPtr + .asFunction, int, int, int)>(); - CFStringRef get kCFPreferencesCurrentUser => _kCFPreferencesCurrentUser.value; + int pthread_setugid_np( + int arg0, + int arg1, + ) { + return _pthread_setugid_np( + arg0, + arg1, + ); + } - set kCFPreferencesCurrentUser(CFStringRef value) => - _kCFPreferencesCurrentUser.value = value; + late final _pthread_setugid_npPtr = + _lookup>( + 'pthread_setugid_np'); + late final _pthread_setugid_np = + _pthread_setugid_npPtr.asFunction(); - CFPropertyListRef CFPreferencesCopyAppValue( - CFStringRef key, - CFStringRef applicationID, + int pthread_getugid_np( + ffi.Pointer arg0, + ffi.Pointer arg1, ) { - return _CFPreferencesCopyAppValue( - key, - applicationID, + return _pthread_getugid_np( + arg0, + arg1, ); } - late final _CFPreferencesCopyAppValuePtr = _lookup< + late final _pthread_getugid_npPtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function( - CFStringRef, CFStringRef)>>('CFPreferencesCopyAppValue'); - late final _CFPreferencesCopyAppValue = _CFPreferencesCopyAppValuePtr - .asFunction(); + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>>('pthread_getugid_np'); + late final _pthread_getugid_np = _pthread_getugid_npPtr + .asFunction, ffi.Pointer)>(); - int CFPreferencesGetAppBooleanValue( - CFStringRef key, - CFStringRef applicationID, - ffi.Pointer keyExistsAndHasValidFormat, + int reboot( + int arg0, ) { - return _CFPreferencesGetAppBooleanValue( - key, - applicationID, - keyExistsAndHasValidFormat, + return _reboot( + arg0, ); } - late final _CFPreferencesGetAppBooleanValuePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, CFStringRef, - ffi.Pointer)>>('CFPreferencesGetAppBooleanValue'); - late final _CFPreferencesGetAppBooleanValue = - _CFPreferencesGetAppBooleanValuePtr.asFunction< - int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); + late final _rebootPtr = + _lookup>('reboot'); + late final _reboot = _rebootPtr.asFunction(); - int CFPreferencesGetAppIntegerValue( - CFStringRef key, - CFStringRef applicationID, - ffi.Pointer keyExistsAndHasValidFormat, + int revoke( + ffi.Pointer arg0, ) { - return _CFPreferencesGetAppIntegerValue( - key, - applicationID, - keyExistsAndHasValidFormat, + return _revoke( + arg0, ); } - late final _CFPreferencesGetAppIntegerValuePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFStringRef, CFStringRef, - ffi.Pointer)>>('CFPreferencesGetAppIntegerValue'); - late final _CFPreferencesGetAppIntegerValue = - _CFPreferencesGetAppIntegerValuePtr.asFunction< - int Function(CFStringRef, CFStringRef, ffi.Pointer)>(); + late final _revokePtr = + _lookup)>>( + 'revoke'); + late final _revoke = + _revokePtr.asFunction)>(); - void CFPreferencesSetAppValue( - CFStringRef key, - CFPropertyListRef value, - CFStringRef applicationID, + int rcmd( + ffi.Pointer> arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, ) { - return _CFPreferencesSetAppValue( - key, - value, - applicationID, + return _rcmd( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _CFPreferencesSetAppValuePtr = _lookup< + late final _rcmdPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFStringRef, CFPropertyListRef, - CFStringRef)>>('CFPreferencesSetAppValue'); - late final _CFPreferencesSetAppValue = _CFPreferencesSetAppValuePtr - .asFunction(); + ffi.Int Function( + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>('rcmd'); + late final _rcmd = _rcmdPtr.asFunction< + int Function( + ffi.Pointer>, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - void CFPreferencesAddSuitePreferencesToApp( - CFStringRef applicationID, - CFStringRef suiteID, + int rcmd_af( + ffi.Pointer> arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + int arg6, ) { - return _CFPreferencesAddSuitePreferencesToApp( - applicationID, - suiteID, + return _rcmd_af( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, ); } - late final _CFPreferencesAddSuitePreferencesToAppPtr = - _lookup>( - 'CFPreferencesAddSuitePreferencesToApp'); - late final _CFPreferencesAddSuitePreferencesToApp = - _CFPreferencesAddSuitePreferencesToAppPtr.asFunction< - void Function(CFStringRef, CFStringRef)>(); + late final _rcmd_afPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer>, + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>>('rcmd_af'); + late final _rcmd_af = _rcmd_afPtr.asFunction< + int Function( + ffi.Pointer>, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - void CFPreferencesRemoveSuitePreferencesFromApp( - CFStringRef applicationID, - CFStringRef suiteID, + int rresvport( + ffi.Pointer arg0, ) { - return _CFPreferencesRemoveSuitePreferencesFromApp( - applicationID, - suiteID, + return _rresvport( + arg0, ); } - late final _CFPreferencesRemoveSuitePreferencesFromAppPtr = - _lookup>( - 'CFPreferencesRemoveSuitePreferencesFromApp'); - late final _CFPreferencesRemoveSuitePreferencesFromApp = - _CFPreferencesRemoveSuitePreferencesFromAppPtr.asFunction< - void Function(CFStringRef, CFStringRef)>(); + late final _rresvportPtr = + _lookup)>>( + 'rresvport'); + late final _rresvport = + _rresvportPtr.asFunction)>(); - int CFPreferencesAppSynchronize( - CFStringRef applicationID, + int rresvport_af( + ffi.Pointer arg0, + int arg1, ) { - return _CFPreferencesAppSynchronize( - applicationID, + return _rresvport_af( + arg0, + arg1, ); } - late final _CFPreferencesAppSynchronizePtr = - _lookup>( - 'CFPreferencesAppSynchronize'); - late final _CFPreferencesAppSynchronize = - _CFPreferencesAppSynchronizePtr.asFunction(); + late final _rresvport_afPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'rresvport_af'); + late final _rresvport_af = + _rresvport_afPtr.asFunction, int)>(); - CFPropertyListRef CFPreferencesCopyValue( - CFStringRef key, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + int iruserok( + int arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _CFPreferencesCopyValue( - key, - applicationID, - userName, - hostName, + return _iruserok( + arg0, + arg1, + arg2, + arg3, ); } - late final _CFPreferencesCopyValuePtr = _lookup< + late final _iruserokPtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function(CFStringRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFPreferencesCopyValue'); - late final _CFPreferencesCopyValue = _CFPreferencesCopyValuePtr.asFunction< - CFPropertyListRef Function( - CFStringRef, CFStringRef, CFStringRef, CFStringRef)>(); + ffi.Int Function(ffi.UnsignedLong, ffi.Int, ffi.Pointer, + ffi.Pointer)>>('iruserok'); + late final _iruserok = _iruserokPtr.asFunction< + int Function(int, int, ffi.Pointer, ffi.Pointer)>(); - CFDictionaryRef CFPreferencesCopyMultiple( - CFArrayRef keysToFetch, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + int iruserok_sa( + ffi.Pointer arg0, + int arg1, + int arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, ) { - return _CFPreferencesCopyMultiple( - keysToFetch, - applicationID, - userName, - hostName, + return _iruserok_sa( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _CFPreferencesCopyMultiplePtr = _lookup< + late final _iruserok_saPtr = _lookup< ffi.NativeFunction< - CFDictionaryRef Function(CFArrayRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFPreferencesCopyMultiple'); - late final _CFPreferencesCopyMultiple = - _CFPreferencesCopyMultiplePtr.asFunction< - CFDictionaryRef Function( - CFArrayRef, CFStringRef, CFStringRef, CFStringRef)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('iruserok_sa'); + late final _iruserok_sa = _iruserok_saPtr.asFunction< + int Function(ffi.Pointer, int, int, ffi.Pointer, + ffi.Pointer)>(); - void CFPreferencesSetValue( - CFStringRef key, - CFPropertyListRef value, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + int ruserok( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, ) { - return _CFPreferencesSetValue( - key, - value, - applicationID, - userName, - hostName, + return _ruserok( + arg0, + arg1, + arg2, + arg3, ); } - late final _CFPreferencesSetValuePtr = _lookup< + late final _ruserokPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFStringRef, CFPropertyListRef, CFStringRef, - CFStringRef, CFStringRef)>>('CFPreferencesSetValue'); - late final _CFPreferencesSetValue = _CFPreferencesSetValuePtr.asFunction< - void Function(CFStringRef, CFPropertyListRef, CFStringRef, CFStringRef, - CFStringRef)>(); + ffi.Int Function(ffi.Pointer, ffi.Int, + ffi.Pointer, ffi.Pointer)>>('ruserok'); + late final _ruserok = _ruserokPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer)>(); - void CFPreferencesSetMultiple( - CFDictionaryRef keysToSet, - CFArrayRef keysToRemove, - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + int setdomainname( + ffi.Pointer arg0, + int arg1, ) { - return _CFPreferencesSetMultiple( - keysToSet, - keysToRemove, - applicationID, - userName, - hostName, + return _setdomainname( + arg0, + arg1, ); } - late final _CFPreferencesSetMultiplePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFDictionaryRef, CFArrayRef, CFStringRef, - CFStringRef, CFStringRef)>>('CFPreferencesSetMultiple'); - late final _CFPreferencesSetMultiple = - _CFPreferencesSetMultiplePtr.asFunction< - void Function(CFDictionaryRef, CFArrayRef, CFStringRef, CFStringRef, - CFStringRef)>(); + late final _setdomainnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'setdomainname'); + late final _setdomainname = + _setdomainnamePtr.asFunction, int)>(); - int CFPreferencesSynchronize( - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + int setgroups( + int arg0, + ffi.Pointer arg1, ) { - return _CFPreferencesSynchronize( - applicationID, - userName, - hostName, + return _setgroups( + arg0, + arg1, ); } - late final _CFPreferencesSynchronizePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFStringRef, CFStringRef, - CFStringRef)>>('CFPreferencesSynchronize'); - late final _CFPreferencesSynchronize = _CFPreferencesSynchronizePtr - .asFunction(); + late final _setgroupsPtr = _lookup< + ffi.NativeFunction)>>( + 'setgroups'); + late final _setgroups = + _setgroupsPtr.asFunction)>(); - CFArrayRef CFPreferencesCopyApplicationList( - CFStringRef userName, - CFStringRef hostName, + void sethostid( + int arg0, ) { - return _CFPreferencesCopyApplicationList( - userName, - hostName, + return _sethostid( + arg0, ); } - late final _CFPreferencesCopyApplicationListPtr = _lookup< - ffi.NativeFunction>( - 'CFPreferencesCopyApplicationList'); - late final _CFPreferencesCopyApplicationList = - _CFPreferencesCopyApplicationListPtr.asFunction< - CFArrayRef Function(CFStringRef, CFStringRef)>(); + late final _sethostidPtr = + _lookup>('sethostid'); + late final _sethostid = _sethostidPtr.asFunction(); - CFArrayRef CFPreferencesCopyKeyList( - CFStringRef applicationID, - CFStringRef userName, - CFStringRef hostName, + int sethostname( + ffi.Pointer arg0, + int arg1, ) { - return _CFPreferencesCopyKeyList( - applicationID, - userName, - hostName, + return _sethostname( + arg0, + arg1, ); } - late final _CFPreferencesCopyKeyListPtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFStringRef, CFStringRef, - CFStringRef)>>('CFPreferencesCopyKeyList'); - late final _CFPreferencesCopyKeyList = _CFPreferencesCopyKeyListPtr - .asFunction(); + late final _sethostnamePtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sethostname'); + late final _sethostname = + _sethostnamePtr.asFunction, int)>(); - int CFPreferencesAppValueIsForced( - CFStringRef key, - CFStringRef applicationID, + int setlogin( + ffi.Pointer arg0, ) { - return _CFPreferencesAppValueIsForced( - key, - applicationID, + return _setlogin( + arg0, ); } - late final _CFPreferencesAppValueIsForcedPtr = - _lookup>( - 'CFPreferencesAppValueIsForced'); - late final _CFPreferencesAppValueIsForced = _CFPreferencesAppValueIsForcedPtr - .asFunction(); - - int CFURLGetTypeID() { - return _CFURLGetTypeID(); - } - - late final _CFURLGetTypeIDPtr = - _lookup>('CFURLGetTypeID'); - late final _CFURLGetTypeID = _CFURLGetTypeIDPtr.asFunction(); + late final _setloginPtr = + _lookup)>>( + 'setlogin'); + late final _setlogin = + _setloginPtr.asFunction)>(); - CFURLRef CFURLCreateWithBytes( - CFAllocatorRef allocator, - ffi.Pointer URLBytes, - int length, - int encoding, - CFURLRef baseURL, + ffi.Pointer setmode( + ffi.Pointer arg0, ) { - return _CFURLCreateWithBytes( - allocator, - URLBytes, - length, - encoding, - baseURL, + return _setmode( + arg0, ); } - late final _CFURLCreateWithBytesPtr = _lookup< + late final _setmodePtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFStringEncoding, CFURLRef)>>('CFURLCreateWithBytes'); - late final _CFURLCreateWithBytes = _CFURLCreateWithBytesPtr.asFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); + ffi.Pointer Function(ffi.Pointer)>>('setmode'); + late final _setmode = _setmodePtr + .asFunction Function(ffi.Pointer)>(); - CFDataRef CFURLCreateData( - CFAllocatorRef allocator, - CFURLRef url, - int encoding, - int escapeWhitespace, + int setrgid( + int arg0, ) { - return _CFURLCreateData( - allocator, - url, - encoding, - escapeWhitespace, + return _setrgid( + arg0, ); } - late final _CFURLCreateDataPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, CFStringEncoding, - Boolean)>>('CFURLCreateData'); - late final _CFURLCreateData = _CFURLCreateDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, int, int)>(); + late final _setrgidPtr = + _lookup>('setrgid'); + late final _setrgid = _setrgidPtr.asFunction(); - CFURLRef CFURLCreateWithString( - CFAllocatorRef allocator, - CFStringRef URLString, - CFURLRef baseURL, + int setruid( + int arg0, ) { - return _CFURLCreateWithString( - allocator, - URLString, - baseURL, + return _setruid( + arg0, ); } - late final _CFURLCreateWithStringPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function( - CFAllocatorRef, CFStringRef, CFURLRef)>>('CFURLCreateWithString'); - late final _CFURLCreateWithString = _CFURLCreateWithStringPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, CFURLRef)>(); + late final _setruidPtr = + _lookup>('setruid'); + late final _setruid = _setruidPtr.asFunction(); - CFURLRef CFURLCreateAbsoluteURLWithBytes( - CFAllocatorRef alloc, - ffi.Pointer relativeURLBytes, - int length, - int encoding, - CFURLRef baseURL, - int useCompatibilityMode, + int setsgroups_np( + int arg0, + ffi.Pointer arg1, ) { - return _CFURLCreateAbsoluteURLWithBytes( - alloc, - relativeURLBytes, - length, - encoding, - baseURL, - useCompatibilityMode, + return _setsgroups_np( + arg0, + arg1, ); } - late final _CFURLCreateAbsoluteURLWithBytesPtr = _lookup< + late final _setsgroups_npPtr = _lookup< ffi.NativeFunction< - CFURLRef Function( - CFAllocatorRef, - ffi.Pointer, - CFIndex, - CFStringEncoding, - CFURLRef, - Boolean)>>('CFURLCreateAbsoluteURLWithBytes'); - late final _CFURLCreateAbsoluteURLWithBytes = - _CFURLCreateAbsoluteURLWithBytesPtr.asFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer, int, int, CFURLRef, int)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer)>>('setsgroups_np'); + late final _setsgroups_np = _setsgroups_npPtr + .asFunction)>(); - CFURLRef CFURLCreateWithFileSystemPath( - CFAllocatorRef allocator, - CFStringRef filePath, - int pathStyle, - int isDirectory, - ) { - return _CFURLCreateWithFileSystemPath( - allocator, - filePath, - pathStyle, - isDirectory, - ); + void setusershell() { + return _setusershell(); } - late final _CFURLCreateWithFileSystemPathPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, - Boolean)>>('CFURLCreateWithFileSystemPath'); - late final _CFURLCreateWithFileSystemPath = _CFURLCreateWithFileSystemPathPtr - .asFunction(); + late final _setusershellPtr = + _lookup>('setusershell'); + late final _setusershell = _setusershellPtr.asFunction(); - CFURLRef CFURLCreateFromFileSystemRepresentation( - CFAllocatorRef allocator, - ffi.Pointer buffer, - int bufLen, - int isDirectory, + int setwgroups_np( + int arg0, + ffi.Pointer arg1, ) { - return _CFURLCreateFromFileSystemRepresentation( - allocator, - buffer, - bufLen, - isDirectory, + return _setwgroups_np( + arg0, + arg1, ); } - late final _CFURLCreateFromFileSystemRepresentationPtr = _lookup< + late final _setwgroups_npPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - Boolean)>>('CFURLCreateFromFileSystemRepresentation'); - late final _CFURLCreateFromFileSystemRepresentation = - _CFURLCreateFromFileSystemRepresentationPtr.asFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, int, int)>(); + ffi.Int Function( + ffi.Int, ffi.Pointer)>>('setwgroups_np'); + late final _setwgroups_np = _setwgroups_npPtr + .asFunction)>(); - CFURLRef CFURLCreateWithFileSystemPathRelativeToBase( - CFAllocatorRef allocator, - CFStringRef filePath, - int pathStyle, - int isDirectory, - CFURLRef baseURL, + int strtofflags( + ffi.Pointer> arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, ) { - return _CFURLCreateWithFileSystemPathRelativeToBase( - allocator, - filePath, - pathStyle, - isDirectory, - baseURL, + return _strtofflags( + arg0, + arg1, + arg2, ); } - late final _CFURLCreateWithFileSystemPathRelativeToBasePtr = _lookup< + late final _strtofflagsPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, ffi.Int32, Boolean, - CFURLRef)>>('CFURLCreateWithFileSystemPathRelativeToBase'); - late final _CFURLCreateWithFileSystemPathRelativeToBase = - _CFURLCreateWithFileSystemPathRelativeToBasePtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFStringRef, int, int, CFURLRef)>(); + ffi.Int Function( + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>('strtofflags'); + late final _strtofflags = _strtofflagsPtr.asFunction< + int Function(ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>(); - CFURLRef CFURLCreateFromFileSystemRepresentationRelativeToBase( - CFAllocatorRef allocator, - ffi.Pointer buffer, - int bufLen, - int isDirectory, - CFURLRef baseURL, + int swapon( + ffi.Pointer arg0, ) { - return _CFURLCreateFromFileSystemRepresentationRelativeToBase( - allocator, - buffer, - bufLen, - isDirectory, - baseURL, + return _swapon( + arg0, ); } - late final _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr = - _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - Boolean, CFURLRef)>>( - 'CFURLCreateFromFileSystemRepresentationRelativeToBase'); - late final _CFURLCreateFromFileSystemRepresentationRelativeToBase = - _CFURLCreateFromFileSystemRepresentationRelativeToBasePtr.asFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer, int, int, CFURLRef)>(); + late final _swaponPtr = + _lookup)>>( + 'swapon'); + late final _swapon = + _swaponPtr.asFunction)>(); - int CFURLGetFileSystemRepresentation( - CFURLRef url, - int resolveAgainstBase, - ffi.Pointer buffer, - int maxBufLen, - ) { - return _CFURLGetFileSystemRepresentation( - url, - resolveAgainstBase, - buffer, - maxBufLen, - ); + int ttyslot() { + return _ttyslot(); } - late final _CFURLGetFileSystemRepresentationPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, Boolean, ffi.Pointer, - CFIndex)>>('CFURLGetFileSystemRepresentation'); - late final _CFURLGetFileSystemRepresentation = - _CFURLGetFileSystemRepresentationPtr.asFunction< - int Function(CFURLRef, int, ffi.Pointer, int)>(); + late final _ttyslotPtr = + _lookup>('ttyslot'); + late final _ttyslot = _ttyslotPtr.asFunction(); - CFURLRef CFURLCopyAbsoluteURL( - CFURLRef relativeURL, + int undelete( + ffi.Pointer arg0, ) { - return _CFURLCopyAbsoluteURL( - relativeURL, + return _undelete( + arg0, ); } - late final _CFURLCopyAbsoluteURLPtr = - _lookup>( - 'CFURLCopyAbsoluteURL'); - late final _CFURLCopyAbsoluteURL = - _CFURLCopyAbsoluteURLPtr.asFunction(); + late final _undeletePtr = + _lookup)>>( + 'undelete'); + late final _undelete = + _undeletePtr.asFunction)>(); - CFStringRef CFURLGetString( - CFURLRef anURL, + int unwhiteout( + ffi.Pointer arg0, ) { - return _CFURLGetString( - anURL, + return _unwhiteout( + arg0, ); } - late final _CFURLGetStringPtr = - _lookup>( - 'CFURLGetString'); - late final _CFURLGetString = - _CFURLGetStringPtr.asFunction(); + late final _unwhiteoutPtr = + _lookup)>>( + 'unwhiteout'); + late final _unwhiteout = + _unwhiteoutPtr.asFunction)>(); - CFURLRef CFURLGetBaseURL( - CFURLRef anURL, + int syscall( + int arg0, ) { - return _CFURLGetBaseURL( - anURL, + return _syscall( + arg0, ); } - late final _CFURLGetBaseURLPtr = - _lookup>( - 'CFURLGetBaseURL'); - late final _CFURLGetBaseURL = - _CFURLGetBaseURLPtr.asFunction(); + late final _syscallPtr = + _lookup>('syscall'); + late final _syscall = _syscallPtr.asFunction(); - int CFURLCanBeDecomposed( - CFURLRef anURL, + int fgetattrlist( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _CFURLCanBeDecomposed( - anURL, + return _fgetattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _CFURLCanBeDecomposedPtr = - _lookup>( - 'CFURLCanBeDecomposed'); - late final _CFURLCanBeDecomposed = - _CFURLCanBeDecomposedPtr.asFunction(); + late final _fgetattrlistPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('fgetattrlist'); + late final _fgetattrlist = _fgetattrlistPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); - CFStringRef CFURLCopyScheme( - CFURLRef anURL, + int fsetattrlist( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _CFURLCopyScheme( - anURL, + return _fsetattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _CFURLCopySchemePtr = - _lookup>( - 'CFURLCopyScheme'); - late final _CFURLCopyScheme = - _CFURLCopySchemePtr.asFunction(); + late final _fsetattrlistPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('fsetattrlist'); + late final _fsetattrlist = _fsetattrlistPtr.asFunction< + int Function( + int, ffi.Pointer, ffi.Pointer, int, int)>(); - CFStringRef CFURLCopyNetLocation( - CFURLRef anURL, + int getattrlist( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _CFURLCopyNetLocation( - anURL, + return _getattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _CFURLCopyNetLocationPtr = - _lookup>( - 'CFURLCopyNetLocation'); - late final _CFURLCopyNetLocation = - _CFURLCopyNetLocationPtr.asFunction(); + late final _getattrlistPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('getattrlist'); + late final _getattrlist = _getattrlistPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - CFStringRef CFURLCopyPath( - CFURLRef anURL, + int setattrlist( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, ) { - return _CFURLCopyPath( - anURL, + return _setattrlist( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _CFURLCopyPathPtr = - _lookup>( - 'CFURLCopyPath'); - late final _CFURLCopyPath = - _CFURLCopyPathPtr.asFunction(); + late final _setattrlistPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.UnsignedInt)>>('setattrlist'); + late final _setattrlist = _setattrlistPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int)>(); - CFStringRef CFURLCopyStrictPath( - CFURLRef anURL, - ffi.Pointer isAbsolute, + int exchangedata( + ffi.Pointer arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFURLCopyStrictPath( - anURL, - isAbsolute, + return _exchangedata( + arg0, + arg1, + arg2, ); } - late final _CFURLCopyStrictPathPtr = _lookup< + late final _exchangedataPtr = _lookup< ffi.NativeFunction< - CFStringRef Function( - CFURLRef, ffi.Pointer)>>('CFURLCopyStrictPath'); - late final _CFURLCopyStrictPath = _CFURLCopyStrictPathPtr.asFunction< - CFStringRef Function(CFURLRef, ffi.Pointer)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedInt)>>('exchangedata'); + late final _exchangedata = _exchangedataPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - CFStringRef CFURLCopyFileSystemPath( - CFURLRef anURL, - int pathStyle, - ) { - return _CFURLCopyFileSystemPath( - anURL, - pathStyle, - ); - } + int getdirentriesattr( + int arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4, + ffi.Pointer arg5, + ffi.Pointer arg6, + int arg7, + ) { + return _getdirentriesattr( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, + arg6, + arg7, + ); + } - late final _CFURLCopyFileSystemPathPtr = - _lookup>( - 'CFURLCopyFileSystemPath'); - late final _CFURLCopyFileSystemPath = _CFURLCopyFileSystemPathPtr.asFunction< - CFStringRef Function(CFURLRef, int)>(); + late final _getdirentriesattrPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Int, + ffi.Pointer, + ffi.Pointer, + ffi.Size, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt)>>('getdirentriesattr'); + late final _getdirentriesattr = _getdirentriesattrPtr.asFunction< + int Function( + int, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - int CFURLHasDirectoryPath( - CFURLRef anURL, + int searchfs( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + ffi.Pointer arg5, ) { - return _CFURLHasDirectoryPath( - anURL, + return _searchfs( + arg0, + arg1, + arg2, + arg3, + arg4, + arg5, ); } - late final _CFURLHasDirectoryPathPtr = - _lookup>( - 'CFURLHasDirectoryPath'); - late final _CFURLHasDirectoryPath = - _CFURLHasDirectoryPathPtr.asFunction(); + late final _searchfsPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedInt, + ffi.UnsignedInt, + ffi.Pointer)>>('searchfs'); + late final _searchfs = _searchfsPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, int, ffi.Pointer)>(); - CFStringRef CFURLCopyResourceSpecifier( - CFURLRef anURL, + int fsctl( + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2, + int arg3, ) { - return _CFURLCopyResourceSpecifier( - anURL, + return _fsctl( + arg0, + arg1, + arg2, + arg3, ); } - late final _CFURLCopyResourceSpecifierPtr = - _lookup>( - 'CFURLCopyResourceSpecifier'); - late final _CFURLCopyResourceSpecifier = _CFURLCopyResourceSpecifierPtr - .asFunction(); + late final _fsctlPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer, ffi.UnsignedInt)>>('fsctl'); + late final _fsctl = _fsctlPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, int)>(); - CFStringRef CFURLCopyHostName( - CFURLRef anURL, + int ffsctl( + int arg0, + int arg1, + ffi.Pointer arg2, + int arg3, ) { - return _CFURLCopyHostName( - anURL, + return _ffsctl( + arg0, + arg1, + arg2, + arg3, ); } - late final _CFURLCopyHostNamePtr = - _lookup>( - 'CFURLCopyHostName'); - late final _CFURLCopyHostName = - _CFURLCopyHostNamePtr.asFunction(); + late final _ffsctlPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.UnsignedLong, ffi.Pointer, + ffi.UnsignedInt)>>('ffsctl'); + late final _ffsctl = _ffsctlPtr + .asFunction, int)>(); - int CFURLGetPortNumber( - CFURLRef anURL, + int fsync_volume_np( + int arg0, + int arg1, ) { - return _CFURLGetPortNumber( - anURL, + return _fsync_volume_np( + arg0, + arg1, ); } - late final _CFURLGetPortNumberPtr = - _lookup>( - 'CFURLGetPortNumber'); - late final _CFURLGetPortNumber = - _CFURLGetPortNumberPtr.asFunction(); + late final _fsync_volume_npPtr = + _lookup>( + 'fsync_volume_np'); + late final _fsync_volume_np = + _fsync_volume_npPtr.asFunction(); - CFStringRef CFURLCopyUserName( - CFURLRef anURL, + int sync_volume_np( + ffi.Pointer arg0, + int arg1, ) { - return _CFURLCopyUserName( - anURL, + return _sync_volume_np( + arg0, + arg1, ); } - late final _CFURLCopyUserNamePtr = - _lookup>( - 'CFURLCopyUserName'); - late final _CFURLCopyUserName = - _CFURLCopyUserNamePtr.asFunction(); + late final _sync_volume_npPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'sync_volume_np'); + late final _sync_volume_np = + _sync_volume_npPtr.asFunction, int)>(); - CFStringRef CFURLCopyPassword( - CFURLRef anURL, + late final ffi.Pointer _optreset = _lookup('optreset'); + + int get optreset => _optreset.value; + + set optreset(int value) => _optreset.value = value; + + int open( + ffi.Pointer arg0, + int arg1, ) { - return _CFURLCopyPassword( - anURL, + return _open( + arg0, + arg1, ); } - late final _CFURLCopyPasswordPtr = - _lookup>( - 'CFURLCopyPassword'); - late final _CFURLCopyPassword = - _CFURLCopyPasswordPtr.asFunction(); + late final _openPtr = _lookup< + ffi.NativeFunction, ffi.Int)>>( + 'open'); + late final _open = + _openPtr.asFunction, int)>(); - CFStringRef CFURLCopyParameterString( - CFURLRef anURL, - CFStringRef charactersToLeaveEscaped, + int openat( + int arg0, + ffi.Pointer arg1, + int arg2, ) { - return _CFURLCopyParameterString( - anURL, - charactersToLeaveEscaped, + return _openat( + arg0, + arg1, + arg2, ); } - late final _CFURLCopyParameterStringPtr = - _lookup>( - 'CFURLCopyParameterString'); - late final _CFURLCopyParameterString = _CFURLCopyParameterStringPtr - .asFunction(); + late final _openatPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int)>>('openat'); + late final _openat = + _openatPtr.asFunction, int)>(); - CFStringRef CFURLCopyQueryString( - CFURLRef anURL, - CFStringRef charactersToLeaveEscaped, + int creat( + ffi.Pointer arg0, + int arg1, ) { - return _CFURLCopyQueryString( - anURL, - charactersToLeaveEscaped, + return _creat( + arg0, + arg1, ); } - late final _CFURLCopyQueryStringPtr = - _lookup>( - 'CFURLCopyQueryString'); - late final _CFURLCopyQueryString = _CFURLCopyQueryStringPtr.asFunction< - CFStringRef Function(CFURLRef, CFStringRef)>(); + late final _creatPtr = _lookup< + ffi.NativeFunction, mode_t)>>( + 'creat'); + late final _creat = + _creatPtr.asFunction, int)>(); - CFStringRef CFURLCopyFragment( - CFURLRef anURL, - CFStringRef charactersToLeaveEscaped, + int fcntl( + int arg0, + int arg1, ) { - return _CFURLCopyFragment( - anURL, - charactersToLeaveEscaped, + return _fcntl( + arg0, + arg1, ); } - late final _CFURLCopyFragmentPtr = - _lookup>( - 'CFURLCopyFragment'); - late final _CFURLCopyFragment = _CFURLCopyFragmentPtr.asFunction< - CFStringRef Function(CFURLRef, CFStringRef)>(); + late final _fcntlPtr = + _lookup>('fcntl'); + late final _fcntl = _fcntlPtr.asFunction(); - CFStringRef CFURLCopyLastPathComponent( - CFURLRef url, + int openx_np( + ffi.Pointer arg0, + int arg1, + filesec_t arg2, ) { - return _CFURLCopyLastPathComponent( - url, + return _openx_np( + arg0, + arg1, + arg2, ); } - late final _CFURLCopyLastPathComponentPtr = - _lookup>( - 'CFURLCopyLastPathComponent'); - late final _CFURLCopyLastPathComponent = _CFURLCopyLastPathComponentPtr - .asFunction(); + late final _openx_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Int, filesec_t)>>('openx_np'); + late final _openx_np = _openx_npPtr + .asFunction, int, filesec_t)>(); - CFStringRef CFURLCopyPathExtension( - CFURLRef url, + int open_dprotected_np( + ffi.Pointer arg0, + int arg1, + int arg2, + int arg3, ) { - return _CFURLCopyPathExtension( - url, + return _open_dprotected_np( + arg0, + arg1, + arg2, + arg3, ); } - late final _CFURLCopyPathExtensionPtr = - _lookup>( - 'CFURLCopyPathExtension'); - late final _CFURLCopyPathExtension = - _CFURLCopyPathExtensionPtr.asFunction(); + late final _open_dprotected_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Int)>>('open_dprotected_np'); + late final _open_dprotected_np = _open_dprotected_npPtr + .asFunction, int, int, int)>(); - CFURLRef CFURLCreateCopyAppendingPathComponent( - CFAllocatorRef allocator, - CFURLRef url, - CFStringRef pathComponent, - int isDirectory, + int openat_dprotected_np( + int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, + int arg4, ) { - return _CFURLCreateCopyAppendingPathComponent( - allocator, - url, - pathComponent, - isDirectory, + return _openat_dprotected_np( + arg0, + arg1, + arg2, + arg3, + arg4, ); } - late final _CFURLCreateCopyAppendingPathComponentPtr = _lookup< + late final _openat_dprotected_npPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, - Boolean)>>('CFURLCreateCopyAppendingPathComponent'); - late final _CFURLCreateCopyAppendingPathComponent = - _CFURLCreateCopyAppendingPathComponentPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef, int)>(); + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, ffi.Int, + ffi.Int)>>('openat_dprotected_np'); + late final _openat_dprotected_np = _openat_dprotected_npPtr + .asFunction, int, int, int)>(); - CFURLRef CFURLCreateCopyDeletingLastPathComponent( - CFAllocatorRef allocator, - CFURLRef url, + int openat_authenticated_np( + int arg0, + ffi.Pointer arg1, + int arg2, + int arg3, ) { - return _CFURLCreateCopyDeletingLastPathComponent( - allocator, - url, + return _openat_authenticated_np( + arg0, + arg1, + arg2, + arg3, ); } - late final _CFURLCreateCopyDeletingLastPathComponentPtr = - _lookup>( - 'CFURLCreateCopyDeletingLastPathComponent'); - late final _CFURLCreateCopyDeletingLastPathComponent = - _CFURLCreateCopyDeletingLastPathComponentPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef)>(); + late final _openat_authenticated_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, + ffi.Int)>>('openat_authenticated_np'); + late final _openat_authenticated_np = _openat_authenticated_npPtr + .asFunction, int, int)>(); - CFURLRef CFURLCreateCopyAppendingPathExtension( - CFAllocatorRef allocator, - CFURLRef url, - CFStringRef extension1, + int flock1( + int arg0, + int arg1, ) { - return _CFURLCreateCopyAppendingPathExtension( - allocator, - url, - extension1, + return _flock1( + arg0, + arg1, ); } - late final _CFURLCreateCopyAppendingPathExtensionPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, - CFStringRef)>>('CFURLCreateCopyAppendingPathExtension'); - late final _CFURLCreateCopyAppendingPathExtension = - _CFURLCreateCopyAppendingPathExtensionPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); + late final _flock1Ptr = + _lookup>('flock'); + late final _flock1 = _flock1Ptr.asFunction(); - CFURLRef CFURLCreateCopyDeletingPathExtension( - CFAllocatorRef allocator, - CFURLRef url, + filesec_t filesec_init() { + return _filesec_init(); + } + + late final _filesec_initPtr = + _lookup>('filesec_init'); + late final _filesec_init = + _filesec_initPtr.asFunction(); + + filesec_t filesec_dup( + filesec_t arg0, ) { - return _CFURLCreateCopyDeletingPathExtension( - allocator, - url, + return _filesec_dup( + arg0, ); } - late final _CFURLCreateCopyDeletingPathExtensionPtr = - _lookup>( - 'CFURLCreateCopyDeletingPathExtension'); - late final _CFURLCreateCopyDeletingPathExtension = - _CFURLCreateCopyDeletingPathExtensionPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef)>(); + late final _filesec_dupPtr = + _lookup>('filesec_dup'); + late final _filesec_dup = + _filesec_dupPtr.asFunction(); - int CFURLGetBytes( - CFURLRef url, - ffi.Pointer buffer, - int bufferLength, + void filesec_free( + filesec_t arg0, ) { - return _CFURLGetBytes( - url, - buffer, - bufferLength, + return _filesec_free( + arg0, ); } - late final _CFURLGetBytesPtr = _lookup< - ffi.NativeFunction< - CFIndex Function( - CFURLRef, ffi.Pointer, CFIndex)>>('CFURLGetBytes'); - late final _CFURLGetBytes = _CFURLGetBytesPtr.asFunction< - int Function(CFURLRef, ffi.Pointer, int)>(); + late final _filesec_freePtr = + _lookup>('filesec_free'); + late final _filesec_free = + _filesec_freePtr.asFunction(); - CFRange CFURLGetByteRangeForComponent( - CFURLRef url, - int component, - ffi.Pointer rangeIncludingSeparators, + int filesec_get_property( + filesec_t arg0, + filesec_property_t arg1, + ffi.Pointer arg2, ) { - return _CFURLGetByteRangeForComponent( - url, - component, - rangeIncludingSeparators, + return _filesec_get_property( + arg0, + arg1.value, + arg2, ); } - late final _CFURLGetByteRangeForComponentPtr = _lookup< + late final _filesec_get_propertyPtr = _lookup< ffi.NativeFunction< - CFRange Function(CFURLRef, ffi.Int32, - ffi.Pointer)>>('CFURLGetByteRangeForComponent'); - late final _CFURLGetByteRangeForComponent = _CFURLGetByteRangeForComponentPtr - .asFunction)>(); + ffi.Int Function(filesec_t, ffi.UnsignedInt, + ffi.Pointer)>>('filesec_get_property'); + late final _filesec_get_property = _filesec_get_propertyPtr + .asFunction)>(); - CFStringRef CFURLCreateStringByReplacingPercentEscapes( - CFAllocatorRef allocator, - CFStringRef originalString, - CFStringRef charactersToLeaveEscaped, + int filesec_query_property( + filesec_t arg0, + filesec_property_t arg1, + ffi.Pointer arg2, ) { - return _CFURLCreateStringByReplacingPercentEscapes( - allocator, - originalString, - charactersToLeaveEscaped, + return _filesec_query_property( + arg0, + arg1.value, + arg2, ); } - late final _CFURLCreateStringByReplacingPercentEscapesPtr = _lookup< + late final _filesec_query_propertyPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFStringRef)>>('CFURLCreateStringByReplacingPercentEscapes'); - late final _CFURLCreateStringByReplacingPercentEscapes = - _CFURLCreateStringByReplacingPercentEscapesPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef)>(); + ffi.Int Function(filesec_t, ffi.UnsignedInt, + ffi.Pointer)>>('filesec_query_property'); + late final _filesec_query_property = _filesec_query_propertyPtr + .asFunction)>(); - CFStringRef CFURLCreateStringByReplacingPercentEscapesUsingEncoding( - CFAllocatorRef allocator, - CFStringRef origString, - CFStringRef charsToLeaveEscaped, - int encoding, + int filesec_set_property( + filesec_t arg0, + filesec_property_t arg1, + ffi.Pointer arg2, ) { - return _CFURLCreateStringByReplacingPercentEscapesUsingEncoding( - allocator, - origString, - charsToLeaveEscaped, - encoding, + return _filesec_set_property( + arg0, + arg1.value, + arg2, ); } - late final _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr = - _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFStringRef, - CFStringEncoding)>>( - 'CFURLCreateStringByReplacingPercentEscapesUsingEncoding'); - late final _CFURLCreateStringByReplacingPercentEscapesUsingEncoding = - _CFURLCreateStringByReplacingPercentEscapesUsingEncodingPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef, CFStringRef, int)>(); + late final _filesec_set_propertyPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(filesec_t, ffi.UnsignedInt, + ffi.Pointer)>>('filesec_set_property'); + late final _filesec_set_property = _filesec_set_propertyPtr + .asFunction)>(); - CFStringRef CFURLCreateStringByAddingPercentEscapes( - CFAllocatorRef allocator, - CFStringRef originalString, - CFStringRef charactersToLeaveUnescaped, - CFStringRef legalURLCharactersToBeEscaped, - int encoding, + int filesec_unset_property( + filesec_t arg0, + filesec_property_t arg1, ) { - return _CFURLCreateStringByAddingPercentEscapes( - allocator, - originalString, - charactersToLeaveUnescaped, - legalURLCharactersToBeEscaped, - encoding, + return _filesec_unset_property( + arg0, + arg1.value, ); } - late final _CFURLCreateStringByAddingPercentEscapesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function( - CFAllocatorRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringEncoding)>>('CFURLCreateStringByAddingPercentEscapes'); - late final _CFURLCreateStringByAddingPercentEscapes = - _CFURLCreateStringByAddingPercentEscapesPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, CFStringRef, CFStringRef, CFStringRef, int)>(); + late final _filesec_unset_propertyPtr = + _lookup>( + 'filesec_unset_property'); + late final _filesec_unset_property = + _filesec_unset_propertyPtr.asFunction(); - int CFURLIsFileReferenceURL( - CFURLRef url, + int os_workgroup_copy_port( + Dartos_workgroup_t wg, + ffi.Pointer mach_port_out, ) { - return _CFURLIsFileReferenceURL( - url, + return _os_workgroup_copy_port( + wg.ref.pointer, + mach_port_out, ); } - late final _CFURLIsFileReferenceURLPtr = - _lookup>( - 'CFURLIsFileReferenceURL'); - late final _CFURLIsFileReferenceURL = - _CFURLIsFileReferenceURLPtr.asFunction(); + late final _os_workgroup_copy_portPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_t, + ffi.Pointer)>>('os_workgroup_copy_port'); + late final _os_workgroup_copy_port = _os_workgroup_copy_portPtr + .asFunction)>(); - CFURLRef CFURLCreateFileReferenceURL( - CFAllocatorRef allocator, - CFURLRef url, - ffi.Pointer error, + Dartos_workgroup_t os_workgroup_create_with_port( + ffi.Pointer name, + Dart__darwin_natural_t mach_port, ) { - return _CFURLCreateFileReferenceURL( - allocator, - url, - error, - ); + return OS_os_workgroup.castFromPointer( + _os_workgroup_create_with_port( + name, + mach_port, + ), + retain: false, + release: true); } - late final _CFURLCreateFileReferenceURLPtr = _lookup< + late final _os_workgroup_create_with_portPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, - ffi.Pointer)>>('CFURLCreateFileReferenceURL'); - late final _CFURLCreateFileReferenceURL = - _CFURLCreateFileReferenceURLPtr.asFunction< - CFURLRef Function( - CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + os_workgroup_t Function(ffi.Pointer, + mach_port_t)>>('os_workgroup_create_with_port'); + late final _os_workgroup_create_with_port = _os_workgroup_create_with_portPtr + .asFunction, int)>(); - CFURLRef CFURLCreateFilePathURL( - CFAllocatorRef allocator, - CFURLRef url, - ffi.Pointer error, + Dartos_workgroup_t os_workgroup_create_with_workgroup( + ffi.Pointer name, + Dartos_workgroup_t wg, ) { - return _CFURLCreateFilePathURL( - allocator, - url, - error, - ); + return OS_os_workgroup.castFromPointer( + _os_workgroup_create_with_workgroup( + name, + wg.ref.pointer, + ), + retain: false, + release: true); } - late final _CFURLCreateFilePathURLPtr = _lookup< + late final _os_workgroup_create_with_workgroupPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, - ffi.Pointer)>>('CFURLCreateFilePathURL'); - late final _CFURLCreateFilePathURL = _CFURLCreateFilePathURLPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + os_workgroup_t Function(ffi.Pointer, + os_workgroup_t)>>('os_workgroup_create_with_workgroup'); + late final _os_workgroup_create_with_workgroup = + _os_workgroup_create_with_workgroupPtr.asFunction< + os_workgroup_t Function(ffi.Pointer, os_workgroup_t)>(); - CFURLRef CFURLCreateFromFSRef( - CFAllocatorRef allocator, - ffi.Pointer fsRef, + int os_workgroup_join( + Dartos_workgroup_t wg, + os_workgroup_join_token_t token_out, ) { - return _CFURLCreateFromFSRef( - allocator, - fsRef, + return _os_workgroup_join( + wg.ref.pointer, + token_out, ); } - late final _CFURLCreateFromFSRefPtr = _lookup< + late final _os_workgroup_joinPtr = _lookup< ffi.NativeFunction< - CFURLRef Function( - CFAllocatorRef, ffi.Pointer)>>('CFURLCreateFromFSRef'); - late final _CFURLCreateFromFSRef = _CFURLCreateFromFSRefPtr.asFunction< - CFURLRef Function(CFAllocatorRef, ffi.Pointer)>(); + ffi.Int Function( + os_workgroup_t, os_workgroup_join_token_t)>>('os_workgroup_join'); + late final _os_workgroup_join = _os_workgroup_joinPtr + .asFunction(); - int CFURLGetFSRef( - CFURLRef url, - ffi.Pointer fsRef, + void os_workgroup_leave( + Dartos_workgroup_t wg, + os_workgroup_join_token_t token, ) { - return _CFURLGetFSRef( - url, - fsRef, + return _os_workgroup_leave( + wg.ref.pointer, + token, ); } - late final _CFURLGetFSRefPtr = _lookup< - ffi.NativeFunction)>>( - 'CFURLGetFSRef'); - late final _CFURLGetFSRef = _CFURLGetFSRefPtr.asFunction< - int Function(CFURLRef, ffi.Pointer)>(); + late final _os_workgroup_leavePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(os_workgroup_t, + os_workgroup_join_token_t)>>('os_workgroup_leave'); + late final _os_workgroup_leave = _os_workgroup_leavePtr + .asFunction(); - int CFURLCopyResourcePropertyForKey( - CFURLRef url, - CFStringRef key, - ffi.Pointer propertyValueTypeRefPtr, - ffi.Pointer error, + int os_workgroup_set_working_arena( + Dartos_workgroup_t wg, + ffi.Pointer arena, + int max_workers, + os_workgroup_working_arena_destructor_t destructor, ) { - return _CFURLCopyResourcePropertyForKey( - url, - key, - propertyValueTypeRefPtr, - error, + return _os_workgroup_set_working_arena( + wg.ref.pointer, + arena, + max_workers, + destructor, ); } - late final _CFURLCopyResourcePropertyForKeyPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, CFStringRef, ffi.Pointer, - ffi.Pointer)>>('CFURLCopyResourcePropertyForKey'); - late final _CFURLCopyResourcePropertyForKey = - _CFURLCopyResourcePropertyForKeyPtr.asFunction< - int Function(CFURLRef, CFStringRef, ffi.Pointer, - ffi.Pointer)>(); + late final _os_workgroup_set_working_arenaPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_t, ffi.Pointer, + ffi.Uint32, os_workgroup_working_arena_destructor_t)>>( + 'os_workgroup_set_working_arena'); + late final _os_workgroup_set_working_arena = + _os_workgroup_set_working_arenaPtr.asFunction< + int Function(os_workgroup_t, ffi.Pointer, int, + os_workgroup_working_arena_destructor_t)>(); - CFDictionaryRef CFURLCopyResourcePropertiesForKeys( - CFURLRef url, - CFArrayRef keys, - ffi.Pointer error, + ffi.Pointer os_workgroup_get_working_arena( + Dartos_workgroup_t wg, + ffi.Pointer index_out, ) { - return _CFURLCopyResourcePropertiesForKeys( - url, - keys, - error, + return _os_workgroup_get_working_arena( + wg.ref.pointer, + index_out, ); } - late final _CFURLCopyResourcePropertiesForKeysPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFURLRef, CFArrayRef, - ffi.Pointer)>>('CFURLCopyResourcePropertiesForKeys'); - late final _CFURLCopyResourcePropertiesForKeys = - _CFURLCopyResourcePropertiesForKeysPtr.asFunction< - CFDictionaryRef Function( - CFURLRef, CFArrayRef, ffi.Pointer)>(); + late final _os_workgroup_get_working_arenaPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + os_workgroup_t, ffi.Pointer)>>( + 'os_workgroup_get_working_arena'); + late final _os_workgroup_get_working_arena = + _os_workgroup_get_working_arenaPtr.asFunction< + ffi.Pointer Function( + os_workgroup_t, ffi.Pointer)>(); - int CFURLSetResourcePropertyForKey( - CFURLRef url, - CFStringRef key, - CFTypeRef propertyValue, - ffi.Pointer error, + void os_workgroup_cancel( + Dartos_workgroup_t wg, ) { - return _CFURLSetResourcePropertyForKey( - url, - key, - propertyValue, - error, + return _os_workgroup_cancel( + wg.ref.pointer, ); } - late final _CFURLSetResourcePropertyForKeyPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, CFStringRef, CFTypeRef, - ffi.Pointer)>>('CFURLSetResourcePropertyForKey'); - late final _CFURLSetResourcePropertyForKey = - _CFURLSetResourcePropertyForKeyPtr.asFunction< - int Function( - CFURLRef, CFStringRef, CFTypeRef, ffi.Pointer)>(); + late final _os_workgroup_cancelPtr = + _lookup>( + 'os_workgroup_cancel'); + late final _os_workgroup_cancel = + _os_workgroup_cancelPtr.asFunction(); - int CFURLSetResourcePropertiesForKeys( - CFURLRef url, - CFDictionaryRef keyedPropertyValues, - ffi.Pointer error, + bool os_workgroup_testcancel( + Dartos_workgroup_t wg, ) { - return _CFURLSetResourcePropertiesForKeys( - url, - keyedPropertyValues, - error, + return _os_workgroup_testcancel( + wg.ref.pointer, ); } - late final _CFURLSetResourcePropertiesForKeysPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, CFDictionaryRef, - ffi.Pointer)>>('CFURLSetResourcePropertiesForKeys'); - late final _CFURLSetResourcePropertiesForKeys = - _CFURLSetResourcePropertiesForKeysPtr.asFunction< - int Function(CFURLRef, CFDictionaryRef, ffi.Pointer)>(); - - late final ffi.Pointer _kCFURLKeysOfUnsetValuesKey = - _lookup('kCFURLKeysOfUnsetValuesKey'); - - CFStringRef get kCFURLKeysOfUnsetValuesKey => - _kCFURLKeysOfUnsetValuesKey.value; + late final _os_workgroup_testcancelPtr = + _lookup>( + 'os_workgroup_testcancel'); + late final _os_workgroup_testcancel = + _os_workgroup_testcancelPtr.asFunction(); - void CFURLClearResourcePropertyCacheForKey( - CFURLRef url, - CFStringRef key, + int os_workgroup_max_parallel_threads( + Dartos_workgroup_t wg, + os_workgroup_mpt_attr_t attr, ) { - return _CFURLClearResourcePropertyCacheForKey( - url, - key, + return _os_workgroup_max_parallel_threads( + wg.ref.pointer, + attr, ); } - late final _CFURLClearResourcePropertyCacheForKeyPtr = - _lookup>( - 'CFURLClearResourcePropertyCacheForKey'); - late final _CFURLClearResourcePropertyCacheForKey = - _CFURLClearResourcePropertyCacheForKeyPtr.asFunction< - void Function(CFURLRef, CFStringRef)>(); + late final _os_workgroup_max_parallel_threadsPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_t, + os_workgroup_mpt_attr_t)>>('os_workgroup_max_parallel_threads'); + late final _os_workgroup_max_parallel_threads = + _os_workgroup_max_parallel_threadsPtr + .asFunction(); - void CFURLClearResourcePropertyCache( - CFURLRef url, + int os_workgroup_interval_start( + Dartos_workgroup_interval_t wg, + int start, + int deadline, + os_workgroup_interval_data_t data, ) { - return _CFURLClearResourcePropertyCache( - url, + return _os_workgroup_interval_start( + wg.ref.pointer, + start, + deadline, + data, ); } - late final _CFURLClearResourcePropertyCachePtr = - _lookup>( - 'CFURLClearResourcePropertyCache'); - late final _CFURLClearResourcePropertyCache = - _CFURLClearResourcePropertyCachePtr.asFunction(); + late final _os_workgroup_interval_startPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, ffi.Uint64, + os_workgroup_interval_data_t)>>('os_workgroup_interval_start'); + late final _os_workgroup_interval_start = + _os_workgroup_interval_startPtr.asFunction< + int Function(os_workgroup_interval_t, int, int, + os_workgroup_interval_data_t)>(); - void CFURLSetTemporaryResourcePropertyForKey( - CFURLRef url, - CFStringRef key, - CFTypeRef propertyValue, + int os_workgroup_interval_update( + Dartos_workgroup_interval_t wg, + int deadline, + os_workgroup_interval_data_t data, ) { - return _CFURLSetTemporaryResourcePropertyForKey( - url, - key, - propertyValue, + return _os_workgroup_interval_update( + wg.ref.pointer, + deadline, + data, ); } - late final _CFURLSetTemporaryResourcePropertyForKeyPtr = _lookup< - ffi - .NativeFunction>( - 'CFURLSetTemporaryResourcePropertyForKey'); - late final _CFURLSetTemporaryResourcePropertyForKey = - _CFURLSetTemporaryResourcePropertyForKeyPtr.asFunction< - void Function(CFURLRef, CFStringRef, CFTypeRef)>(); + late final _os_workgroup_interval_updatePtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, + os_workgroup_interval_data_t)>>('os_workgroup_interval_update'); + late final _os_workgroup_interval_update = + _os_workgroup_interval_updatePtr.asFunction< + int Function( + os_workgroup_interval_t, int, os_workgroup_interval_data_t)>(); - int CFURLResourceIsReachable( - CFURLRef url, - ffi.Pointer error, + int os_workgroup_interval_finish( + Dartos_workgroup_interval_t wg, + os_workgroup_interval_data_t data, ) { - return _CFURLResourceIsReachable( - url, - error, + return _os_workgroup_interval_finish( + wg.ref.pointer, + data, ); } - late final _CFURLResourceIsReachablePtr = _lookup< - ffi - .NativeFunction)>>( - 'CFURLResourceIsReachable'); - late final _CFURLResourceIsReachable = _CFURLResourceIsReachablePtr - .asFunction)>(); - - late final ffi.Pointer _kCFURLNameKey = - _lookup('kCFURLNameKey'); + late final _os_workgroup_interval_finishPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(os_workgroup_interval_t, + os_workgroup_interval_data_t)>>('os_workgroup_interval_finish'); + late final _os_workgroup_interval_finish = + _os_workgroup_interval_finishPtr.asFunction< + int Function( + os_workgroup_interval_t, os_workgroup_interval_data_t)>(); - CFStringRef get kCFURLNameKey => _kCFURLNameKey.value; + Dartos_workgroup_parallel_t os_workgroup_parallel_create( + ffi.Pointer name, + os_workgroup_attr_t attr, + ) { + return OS_os_workgroup.castFromPointer( + _os_workgroup_parallel_create( + name, + attr, + ), + retain: false, + release: true); + } - late final ffi.Pointer _kCFURLLocalizedNameKey = - _lookup('kCFURLLocalizedNameKey'); + late final _os_workgroup_parallel_createPtr = _lookup< + ffi.NativeFunction< + os_workgroup_parallel_t Function(ffi.Pointer, + os_workgroup_attr_t)>>('os_workgroup_parallel_create'); + late final _os_workgroup_parallel_create = + _os_workgroup_parallel_createPtr.asFunction< + os_workgroup_parallel_t Function( + ffi.Pointer, os_workgroup_attr_t)>(); - CFStringRef get kCFURLLocalizedNameKey => _kCFURLLocalizedNameKey.value; + int dispatch_time( + int when, + int delta, + ) { + return _dispatch_time( + when, + delta, + ); + } - late final ffi.Pointer _kCFURLIsRegularFileKey = - _lookup('kCFURLIsRegularFileKey'); + late final _dispatch_timePtr = _lookup< + ffi.NativeFunction< + dispatch_time_t Function( + dispatch_time_t, ffi.Int64)>>('dispatch_time'); + late final _dispatch_time = + _dispatch_timePtr.asFunction(); - CFStringRef get kCFURLIsRegularFileKey => _kCFURLIsRegularFileKey.value; + int dispatch_walltime( + ffi.Pointer when, + int delta, + ) { + return _dispatch_walltime( + when, + delta, + ); + } - late final ffi.Pointer _kCFURLIsDirectoryKey = - _lookup('kCFURLIsDirectoryKey'); + late final _dispatch_walltimePtr = _lookup< + ffi.NativeFunction< + dispatch_time_t Function( + ffi.Pointer, ffi.Int64)>>('dispatch_walltime'); + late final _dispatch_walltime = _dispatch_walltimePtr + .asFunction, int)>(); - CFStringRef get kCFURLIsDirectoryKey => _kCFURLIsDirectoryKey.value; + qos_class_t qos_class_self() { + return qos_class_t.fromValue(_qos_class_self()); + } - late final ffi.Pointer _kCFURLIsSymbolicLinkKey = - _lookup('kCFURLIsSymbolicLinkKey'); + late final _qos_class_selfPtr = + _lookup>('qos_class_self'); + late final _qos_class_self = _qos_class_selfPtr.asFunction(); - CFStringRef get kCFURLIsSymbolicLinkKey => _kCFURLIsSymbolicLinkKey.value; + qos_class_t qos_class_main() { + return qos_class_t.fromValue(_qos_class_main()); + } - late final ffi.Pointer _kCFURLIsVolumeKey = - _lookup('kCFURLIsVolumeKey'); + late final _qos_class_mainPtr = + _lookup>('qos_class_main'); + late final _qos_class_main = _qos_class_mainPtr.asFunction(); - CFStringRef get kCFURLIsVolumeKey => _kCFURLIsVolumeKey.value; + void dispatch_retain( + Dartdispatch_object_t object, + ) { + return _dispatch_retain( + object.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLIsPackageKey = - _lookup('kCFURLIsPackageKey'); + late final _dispatch_retainPtr = + _lookup>( + 'dispatch_retain'); + late final _dispatch_retain = + _dispatch_retainPtr.asFunction(); - CFStringRef get kCFURLIsPackageKey => _kCFURLIsPackageKey.value; + void dispatch_release( + Dartdispatch_object_t object, + ) { + return _dispatch_release( + object.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLIsApplicationKey = - _lookup('kCFURLIsApplicationKey'); + late final _dispatch_releasePtr = + _lookup>( + 'dispatch_release'); + late final _dispatch_release = + _dispatch_releasePtr.asFunction(); - CFStringRef get kCFURLIsApplicationKey => _kCFURLIsApplicationKey.value; + ffi.Pointer dispatch_get_context( + Dartdispatch_object_t object, + ) { + return _dispatch_get_context( + object.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLApplicationIsScriptableKey = - _lookup('kCFURLApplicationIsScriptableKey'); + late final _dispatch_get_contextPtr = _lookup< + ffi + .NativeFunction Function(dispatch_object_t)>>( + 'dispatch_get_context'); + late final _dispatch_get_context = _dispatch_get_contextPtr + .asFunction Function(dispatch_object_t)>(); - CFStringRef get kCFURLApplicationIsScriptableKey => - _kCFURLApplicationIsScriptableKey.value; + void dispatch_set_context( + Dartdispatch_object_t object, + ffi.Pointer context, + ) { + return _dispatch_set_context( + object.ref.pointer, + context, + ); + } - late final ffi.Pointer _kCFURLIsSystemImmutableKey = - _lookup('kCFURLIsSystemImmutableKey'); + late final _dispatch_set_contextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, + ffi.Pointer)>>('dispatch_set_context'); + late final _dispatch_set_context = _dispatch_set_contextPtr + .asFunction)>(); - CFStringRef get kCFURLIsSystemImmutableKey => - _kCFURLIsSystemImmutableKey.value; + void dispatch_set_finalizer_f( + Dartdispatch_object_t object, + dispatch_function_t finalizer, + ) { + return _dispatch_set_finalizer_f( + object.ref.pointer, + finalizer, + ); + } - late final ffi.Pointer _kCFURLIsUserImmutableKey = - _lookup('kCFURLIsUserImmutableKey'); + late final _dispatch_set_finalizer_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, + dispatch_function_t)>>('dispatch_set_finalizer_f'); + late final _dispatch_set_finalizer_f = _dispatch_set_finalizer_fPtr + .asFunction(); - CFStringRef get kCFURLIsUserImmutableKey => _kCFURLIsUserImmutableKey.value; - - late final ffi.Pointer _kCFURLIsHiddenKey = - _lookup('kCFURLIsHiddenKey'); - - CFStringRef get kCFURLIsHiddenKey => _kCFURLIsHiddenKey.value; + void dispatch_activate( + Dartdispatch_object_t object, + ) { + return _dispatch_activate( + object.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLHasHiddenExtensionKey = - _lookup('kCFURLHasHiddenExtensionKey'); + late final _dispatch_activatePtr = + _lookup>( + 'dispatch_activate'); + late final _dispatch_activate = + _dispatch_activatePtr.asFunction(); - CFStringRef get kCFURLHasHiddenExtensionKey => - _kCFURLHasHiddenExtensionKey.value; + void dispatch_suspend( + Dartdispatch_object_t object, + ) { + return _dispatch_suspend( + object.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLCreationDateKey = - _lookup('kCFURLCreationDateKey'); + late final _dispatch_suspendPtr = + _lookup>( + 'dispatch_suspend'); + late final _dispatch_suspend = + _dispatch_suspendPtr.asFunction(); - CFStringRef get kCFURLCreationDateKey => _kCFURLCreationDateKey.value; + void dispatch_resume( + Dartdispatch_object_t object, + ) { + return _dispatch_resume( + object.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLContentAccessDateKey = - _lookup('kCFURLContentAccessDateKey'); + late final _dispatch_resumePtr = + _lookup>( + 'dispatch_resume'); + late final _dispatch_resume = + _dispatch_resumePtr.asFunction(); - CFStringRef get kCFURLContentAccessDateKey => - _kCFURLContentAccessDateKey.value; + void dispatch_set_qos_class_floor( + Dartdispatch_object_t object, + qos_class_t qos_class, + int relative_priority, + ) { + return _dispatch_set_qos_class_floor( + object.ref.pointer, + qos_class.value, + relative_priority, + ); + } - late final ffi.Pointer _kCFURLContentModificationDateKey = - _lookup('kCFURLContentModificationDateKey'); + late final _dispatch_set_qos_class_floorPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, ffi.UnsignedInt, + ffi.Int)>>('dispatch_set_qos_class_floor'); + late final _dispatch_set_qos_class_floor = _dispatch_set_qos_class_floorPtr + .asFunction(); - CFStringRef get kCFURLContentModificationDateKey => - _kCFURLContentModificationDateKey.value; + int dispatch_wait( + ffi.Pointer object, + int timeout, + ) { + return _dispatch_wait( + object, + timeout, + ); + } - late final ffi.Pointer _kCFURLAttributeModificationDateKey = - _lookup('kCFURLAttributeModificationDateKey'); + late final _dispatch_waitPtr = _lookup< + ffi.NativeFunction< + ffi.IntPtr Function( + ffi.Pointer, dispatch_time_t)>>('dispatch_wait'); + late final _dispatch_wait = + _dispatch_waitPtr.asFunction, int)>(); - CFStringRef get kCFURLAttributeModificationDateKey => - _kCFURLAttributeModificationDateKey.value; + void dispatch_notify( + ffi.Pointer object, + Dartdispatch_object_t queue, + Dartdispatch_block_t notification_block, + ) { + return _dispatch_notify( + object, + queue.ref.pointer, + notification_block.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLFileIdentifierKey = - _lookup('kCFURLFileIdentifierKey'); + late final _dispatch_notifyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, dispatch_object_t, + dispatch_block_t)>>('dispatch_notify'); + late final _dispatch_notify = _dispatch_notifyPtr.asFunction< + void Function( + ffi.Pointer, dispatch_object_t, dispatch_block_t)>(); - CFStringRef get kCFURLFileIdentifierKey => _kCFURLFileIdentifierKey.value; + void dispatch_cancel( + ffi.Pointer object, + ) { + return _dispatch_cancel( + object, + ); + } - late final ffi.Pointer _kCFURLFileContentIdentifierKey = - _lookup('kCFURLFileContentIdentifierKey'); + late final _dispatch_cancelPtr = + _lookup)>>( + 'dispatch_cancel'); + late final _dispatch_cancel = + _dispatch_cancelPtr.asFunction)>(); - CFStringRef get kCFURLFileContentIdentifierKey => - _kCFURLFileContentIdentifierKey.value; + int dispatch_testcancel( + ffi.Pointer object, + ) { + return _dispatch_testcancel( + object, + ); + } - late final ffi.Pointer _kCFURLMayShareFileContentKey = - _lookup('kCFURLMayShareFileContentKey'); + late final _dispatch_testcancelPtr = + _lookup)>>( + 'dispatch_testcancel'); + late final _dispatch_testcancel = + _dispatch_testcancelPtr.asFunction)>(); - CFStringRef get kCFURLMayShareFileContentKey => - _kCFURLMayShareFileContentKey.value; + void dispatch_debug( + Dartdispatch_object_t object, + ffi.Pointer message, + ) { + return _dispatch_debug( + object.ref.pointer, + message, + ); + } - late final ffi.Pointer _kCFURLMayHaveExtendedAttributesKey = - _lookup('kCFURLMayHaveExtendedAttributesKey'); + late final _dispatch_debugPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_object_t, ffi.Pointer)>>('dispatch_debug'); + late final _dispatch_debug = _dispatch_debugPtr + .asFunction)>(); - CFStringRef get kCFURLMayHaveExtendedAttributesKey => - _kCFURLMayHaveExtendedAttributesKey.value; + void dispatch_debugv( + Dartdispatch_object_t object, + ffi.Pointer message, + va_list ap, + ) { + return _dispatch_debugv( + object.ref.pointer, + message, + ap, + ); + } - late final ffi.Pointer _kCFURLIsPurgeableKey = - _lookup('kCFURLIsPurgeableKey'); + late final _dispatch_debugvPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, ffi.Pointer, + va_list)>>('dispatch_debugv'); + late final _dispatch_debugv = _dispatch_debugvPtr.asFunction< + void Function(dispatch_object_t, ffi.Pointer, va_list)>(); - CFStringRef get kCFURLIsPurgeableKey => _kCFURLIsPurgeableKey.value; + void dispatch_async( + Dartdispatch_queue_t queue, + Dartdispatch_block_t block, + ) { + return _dispatch_async( + queue.ref.pointer, + block.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLIsSparseKey = - _lookup('kCFURLIsSparseKey'); + late final _dispatch_asyncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_async'); + late final _dispatch_async = _dispatch_asyncPtr + .asFunction(); - CFStringRef get kCFURLIsSparseKey => _kCFURLIsSparseKey.value; + void dispatch_async_f( + Dartdispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_async_f( + queue.ref.pointer, + context, + work, + ); + } - late final ffi.Pointer _kCFURLLinkCountKey = - _lookup('kCFURLLinkCountKey'); + late final _dispatch_async_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_async_f'); + late final _dispatch_async_f = _dispatch_async_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - CFStringRef get kCFURLLinkCountKey => _kCFURLLinkCountKey.value; + void dispatch_sync( + Dartdispatch_queue_t queue, + Dartdispatch_block_t block, + ) { + return _dispatch_sync( + queue.ref.pointer, + block.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLParentDirectoryURLKey = - _lookup('kCFURLParentDirectoryURLKey'); + late final _dispatch_syncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_sync'); + late final _dispatch_sync = _dispatch_syncPtr + .asFunction(); - CFStringRef get kCFURLParentDirectoryURLKey => - _kCFURLParentDirectoryURLKey.value; + void dispatch_sync_f( + Dartdispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_sync_f( + queue.ref.pointer, + context, + work, + ); + } - late final ffi.Pointer _kCFURLVolumeURLKey = - _lookup('kCFURLVolumeURLKey'); + late final _dispatch_sync_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_sync_f'); + late final _dispatch_sync_f = _dispatch_sync_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - CFStringRef get kCFURLVolumeURLKey => _kCFURLVolumeURLKey.value; + void dispatch_async_and_wait( + Dartdispatch_queue_t queue, + Dartdispatch_block_t block, + ) { + return _dispatch_async_and_wait( + queue.ref.pointer, + block.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLTypeIdentifierKey = - _lookup('kCFURLTypeIdentifierKey'); + late final _dispatch_async_and_waitPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_async_and_wait'); + late final _dispatch_async_and_wait = _dispatch_async_and_waitPtr + .asFunction(); - CFStringRef get kCFURLTypeIdentifierKey => _kCFURLTypeIdentifierKey.value; + void dispatch_async_and_wait_f( + Dartdispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_async_and_wait_f( + queue.ref.pointer, + context, + work, + ); + } - late final ffi.Pointer _kCFURLLocalizedTypeDescriptionKey = - _lookup('kCFURLLocalizedTypeDescriptionKey'); + late final _dispatch_async_and_wait_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_async_and_wait_f'); + late final _dispatch_async_and_wait_f = + _dispatch_async_and_wait_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - CFStringRef get kCFURLLocalizedTypeDescriptionKey => - _kCFURLLocalizedTypeDescriptionKey.value; + void dispatch_apply( + int iterations, + Dartdispatch_queue_t queue, + objc.ObjCBlock block, + ) { + return _dispatch_apply( + iterations, + queue.ref.pointer, + block.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLLabelNumberKey = - _lookup('kCFURLLabelNumberKey'); + late final _dispatch_applyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Size, dispatch_queue_t, + ffi.Pointer)>>('dispatch_apply'); + late final _dispatch_apply = _dispatch_applyPtr.asFunction< + void Function(int, dispatch_queue_t, ffi.Pointer)>(); - CFStringRef get kCFURLLabelNumberKey => _kCFURLLabelNumberKey.value; + void dispatch_apply_f( + int iterations, + Dartdispatch_queue_t queue, + ffi.Pointer context, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer context, ffi.Size iteration)>> + work, + ) { + return _dispatch_apply_f( + iterations, + queue.ref.pointer, + context, + work, + ); + } - late final ffi.Pointer _kCFURLLabelColorKey = - _lookup('kCFURLLabelColorKey'); + late final _dispatch_apply_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Size, + dispatch_queue_t, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer context, + ffi.Size iteration)>>)>>('dispatch_apply_f'); + late final _dispatch_apply_f = _dispatch_apply_fPtr.asFunction< + void Function( + int, + dispatch_queue_t, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer context, ffi.Size iteration)>>)>(); - CFStringRef get kCFURLLabelColorKey => _kCFURLLabelColorKey.value; + Dartdispatch_queue_t dispatch_get_current_queue() { + return objc.NSObject.castFromPointer(_dispatch_get_current_queue(), + retain: true, release: true); + } - late final ffi.Pointer _kCFURLLocalizedLabelKey = - _lookup('kCFURLLocalizedLabelKey'); + late final _dispatch_get_current_queuePtr = + _lookup>( + 'dispatch_get_current_queue'); + late final _dispatch_get_current_queue = + _dispatch_get_current_queuePtr.asFunction(); - CFStringRef get kCFURLLocalizedLabelKey => _kCFURLLocalizedLabelKey.value; + late final ffi.Pointer __dispatch_main_q = + _lookup('_dispatch_main_q'); - late final ffi.Pointer _kCFURLEffectiveIconKey = - _lookup('kCFURLEffectiveIconKey'); + ffi.Pointer get _dispatch_main_q => __dispatch_main_q; - CFStringRef get kCFURLEffectiveIconKey => _kCFURLEffectiveIconKey.value; + Dartdispatch_queue_global_t dispatch_get_global_queue( + int identifier, + int flags, + ) { + return objc.NSObject.castFromPointer( + _dispatch_get_global_queue( + identifier, + flags, + ), + retain: true, + release: true); + } - late final ffi.Pointer _kCFURLCustomIconKey = - _lookup('kCFURLCustomIconKey'); + late final _dispatch_get_global_queuePtr = _lookup< + ffi.NativeFunction< + dispatch_queue_global_t Function( + ffi.IntPtr, ffi.UintPtr)>>('dispatch_get_global_queue'); + late final _dispatch_get_global_queue = _dispatch_get_global_queuePtr + .asFunction(); - CFStringRef get kCFURLCustomIconKey => _kCFURLCustomIconKey.value; + late final ffi.Pointer + __dispatch_queue_attr_concurrent = + _lookup('_dispatch_queue_attr_concurrent'); - late final ffi.Pointer _kCFURLFileResourceIdentifierKey = - _lookup('kCFURLFileResourceIdentifierKey'); + ffi.Pointer get _dispatch_queue_attr_concurrent => + __dispatch_queue_attr_concurrent; - CFStringRef get kCFURLFileResourceIdentifierKey => - _kCFURLFileResourceIdentifierKey.value; + Dartdispatch_queue_attr_t dispatch_queue_attr_make_initially_inactive( + Dartdispatch_queue_attr_t attr, + ) { + return objc.NSObject.castFromPointer( + _dispatch_queue_attr_make_initially_inactive( + attr.ref.pointer, + ), + retain: true, + release: true); + } - late final ffi.Pointer _kCFURLVolumeIdentifierKey = - _lookup('kCFURLVolumeIdentifierKey'); + late final _dispatch_queue_attr_make_initially_inactivePtr = _lookup< + ffi.NativeFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t)>>( + 'dispatch_queue_attr_make_initially_inactive'); + late final _dispatch_queue_attr_make_initially_inactive = + _dispatch_queue_attr_make_initially_inactivePtr + .asFunction(); - CFStringRef get kCFURLVolumeIdentifierKey => _kCFURLVolumeIdentifierKey.value; + Dartdispatch_queue_attr_t dispatch_queue_attr_make_with_autorelease_frequency( + Dartdispatch_queue_attr_t attr, + dispatch_autorelease_frequency_t frequency, + ) { + return objc.NSObject.castFromPointer( + _dispatch_queue_attr_make_with_autorelease_frequency( + attr.ref.pointer, + frequency.value, + ), + retain: true, + release: true); + } - late final ffi.Pointer _kCFURLPreferredIOBlockSizeKey = - _lookup('kCFURLPreferredIOBlockSizeKey'); + late final _dispatch_queue_attr_make_with_autorelease_frequencyPtr = _lookup< + ffi.NativeFunction< + dispatch_queue_attr_t Function( + dispatch_queue_attr_t, ffi.UnsignedLong)>>( + 'dispatch_queue_attr_make_with_autorelease_frequency'); + late final _dispatch_queue_attr_make_with_autorelease_frequency = + _dispatch_queue_attr_make_with_autorelease_frequencyPtr.asFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t, int)>(); - CFStringRef get kCFURLPreferredIOBlockSizeKey => - _kCFURLPreferredIOBlockSizeKey.value; + Dartdispatch_queue_attr_t dispatch_queue_attr_make_with_qos_class( + Dartdispatch_queue_attr_t attr, + qos_class_t qos_class, + int relative_priority, + ) { + return objc.NSObject.castFromPointer( + _dispatch_queue_attr_make_with_qos_class( + attr.ref.pointer, + qos_class.value, + relative_priority, + ), + retain: true, + release: true); + } - late final ffi.Pointer _kCFURLIsReadableKey = - _lookup('kCFURLIsReadableKey'); + late final _dispatch_queue_attr_make_with_qos_classPtr = _lookup< + ffi.NativeFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t, ffi.UnsignedInt, + ffi.Int)>>('dispatch_queue_attr_make_with_qos_class'); + late final _dispatch_queue_attr_make_with_qos_class = + _dispatch_queue_attr_make_with_qos_classPtr.asFunction< + dispatch_queue_attr_t Function(dispatch_queue_attr_t, int, int)>(); - CFStringRef get kCFURLIsReadableKey => _kCFURLIsReadableKey.value; + Dartdispatch_queue_t dispatch_queue_create_with_target( + ffi.Pointer label, + Dartdispatch_queue_attr_t attr, + Dartdispatch_queue_t target, + ) { + return objc.NSObject.castFromPointer( + _dispatch_queue_create_with_target( + label, + attr.ref.pointer, + target.ref.pointer, + ), + retain: false, + release: true); + } - late final ffi.Pointer _kCFURLIsWritableKey = - _lookup('kCFURLIsWritableKey'); + late final _dispatch_queue_create_with_targetPtr = _lookup< + ffi.NativeFunction< + dispatch_queue_t Function( + ffi.Pointer, + dispatch_queue_attr_t, + dispatch_queue_t)>>('dispatch_queue_create_with_target'); + late final _dispatch_queue_create_with_target = + _dispatch_queue_create_with_targetPtr.asFunction< + dispatch_queue_t Function(ffi.Pointer, + dispatch_queue_attr_t, dispatch_queue_t)>(); - CFStringRef get kCFURLIsWritableKey => _kCFURLIsWritableKey.value; + Dartdispatch_queue_t dispatch_queue_create( + ffi.Pointer label, + Dartdispatch_queue_attr_t attr, + ) { + return objc.NSObject.castFromPointer( + _dispatch_queue_create( + label, + attr.ref.pointer, + ), + retain: false, + release: true); + } - late final ffi.Pointer _kCFURLIsExecutableKey = - _lookup('kCFURLIsExecutableKey'); + late final _dispatch_queue_createPtr = _lookup< + ffi.NativeFunction< + dispatch_queue_t Function(ffi.Pointer, + dispatch_queue_attr_t)>>('dispatch_queue_create'); + late final _dispatch_queue_create = _dispatch_queue_createPtr.asFunction< + dispatch_queue_t Function( + ffi.Pointer, dispatch_queue_attr_t)>(); - CFStringRef get kCFURLIsExecutableKey => _kCFURLIsExecutableKey.value; + ffi.Pointer dispatch_queue_get_label( + Dartdispatch_queue_t queue, + ) { + return _dispatch_queue_get_label( + queue.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLFileSecurityKey = - _lookup('kCFURLFileSecurityKey'); + late final _dispatch_queue_get_labelPtr = _lookup< + ffi.NativeFunction Function(dispatch_queue_t)>>( + 'dispatch_queue_get_label'); + late final _dispatch_queue_get_label = _dispatch_queue_get_labelPtr + .asFunction Function(dispatch_queue_t)>(); - CFStringRef get kCFURLFileSecurityKey => _kCFURLFileSecurityKey.value; + qos_class_t dispatch_queue_get_qos_class( + Dartdispatch_queue_t queue, + ffi.Pointer relative_priority_ptr, + ) { + return qos_class_t.fromValue(_dispatch_queue_get_qos_class( + queue.ref.pointer, + relative_priority_ptr, + )); + } - late final ffi.Pointer _kCFURLIsExcludedFromBackupKey = - _lookup('kCFURLIsExcludedFromBackupKey'); + late final _dispatch_queue_get_qos_classPtr = _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(dispatch_queue_t, + ffi.Pointer)>>('dispatch_queue_get_qos_class'); + late final _dispatch_queue_get_qos_class = _dispatch_queue_get_qos_classPtr + .asFunction)>(); - CFStringRef get kCFURLIsExcludedFromBackupKey => - _kCFURLIsExcludedFromBackupKey.value; + void dispatch_set_target_queue( + Dartdispatch_object_t object, + Dartdispatch_queue_t queue, + ) { + return _dispatch_set_target_queue( + object.ref.pointer, + queue.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLTagNamesKey = - _lookup('kCFURLTagNamesKey'); + late final _dispatch_set_target_queuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_object_t, + dispatch_queue_t)>>('dispatch_set_target_queue'); + late final _dispatch_set_target_queue = _dispatch_set_target_queuePtr + .asFunction(); - CFStringRef get kCFURLTagNamesKey => _kCFURLTagNamesKey.value; + void dispatch_main() { + return _dispatch_main(); + } - late final ffi.Pointer _kCFURLPathKey = - _lookup('kCFURLPathKey'); + late final _dispatch_mainPtr = + _lookup>('dispatch_main'); + late final _dispatch_main = _dispatch_mainPtr.asFunction(); - CFStringRef get kCFURLPathKey => _kCFURLPathKey.value; + void dispatch_after( + Dartdispatch_time_t when, + Dartdispatch_queue_t queue, + Dartdispatch_block_t block, + ) { + return _dispatch_after( + when, + queue.ref.pointer, + block.ref.pointer, + ); + } - late final ffi.Pointer _kCFURLCanonicalPathKey = - _lookup('kCFURLCanonicalPathKey'); + late final _dispatch_afterPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_time_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_after'); + late final _dispatch_after = _dispatch_afterPtr + .asFunction(); - CFStringRef get kCFURLCanonicalPathKey => _kCFURLCanonicalPathKey.value; - - late final ffi.Pointer _kCFURLIsMountTriggerKey = - _lookup('kCFURLIsMountTriggerKey'); + void dispatch_after_f( + Dartdispatch_time_t when, + Dartdispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_after_f( + when, + queue.ref.pointer, + context, + work, + ); + } - CFStringRef get kCFURLIsMountTriggerKey => _kCFURLIsMountTriggerKey.value; + late final _dispatch_after_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_time_t, dispatch_queue_t, + ffi.Pointer, dispatch_function_t)>>('dispatch_after_f'); + late final _dispatch_after_f = _dispatch_after_fPtr.asFunction< + void Function( + int, dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - late final ffi.Pointer _kCFURLGenerationIdentifierKey = - _lookup('kCFURLGenerationIdentifierKey'); + void dispatch_barrier_async( + Dartdispatch_queue_t queue, + Dartdispatch_block_t block, + ) { + return _dispatch_barrier_async( + queue.ref.pointer, + block.ref.pointer, + ); + } - CFStringRef get kCFURLGenerationIdentifierKey => - _kCFURLGenerationIdentifierKey.value; + late final _dispatch_barrier_asyncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_async'); + late final _dispatch_barrier_async = _dispatch_barrier_asyncPtr + .asFunction(); - late final ffi.Pointer _kCFURLDocumentIdentifierKey = - _lookup('kCFURLDocumentIdentifierKey'); + void dispatch_barrier_async_f( + Dartdispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_barrier_async_f( + queue.ref.pointer, + context, + work, + ); + } - CFStringRef get kCFURLDocumentIdentifierKey => - _kCFURLDocumentIdentifierKey.value; + late final _dispatch_barrier_async_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_barrier_async_f'); + late final _dispatch_barrier_async_f = + _dispatch_barrier_async_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - late final ffi.Pointer _kCFURLAddedToDirectoryDateKey = - _lookup('kCFURLAddedToDirectoryDateKey'); + void dispatch_barrier_sync( + Dartdispatch_queue_t queue, + Dartdispatch_block_t block, + ) { + return _dispatch_barrier_sync( + queue.ref.pointer, + block.ref.pointer, + ); + } - CFStringRef get kCFURLAddedToDirectoryDateKey => - _kCFURLAddedToDirectoryDateKey.value; + late final _dispatch_barrier_syncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_sync'); + late final _dispatch_barrier_sync = _dispatch_barrier_syncPtr + .asFunction(); - late final ffi.Pointer _kCFURLQuarantinePropertiesKey = - _lookup('kCFURLQuarantinePropertiesKey'); + void dispatch_barrier_sync_f( + Dartdispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_barrier_sync_f( + queue.ref.pointer, + context, + work, + ); + } - CFStringRef get kCFURLQuarantinePropertiesKey => - _kCFURLQuarantinePropertiesKey.value; + late final _dispatch_barrier_sync_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_barrier_sync_f'); + late final _dispatch_barrier_sync_f = _dispatch_barrier_sync_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - late final ffi.Pointer _kCFURLFileResourceTypeKey = - _lookup('kCFURLFileResourceTypeKey'); + void dispatch_barrier_async_and_wait( + Dartdispatch_queue_t queue, + Dartdispatch_block_t block, + ) { + return _dispatch_barrier_async_and_wait( + queue.ref.pointer, + block.ref.pointer, + ); + } - CFStringRef get kCFURLFileResourceTypeKey => _kCFURLFileResourceTypeKey.value; + late final _dispatch_barrier_async_and_waitPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, + dispatch_block_t)>>('dispatch_barrier_async_and_wait'); + late final _dispatch_barrier_async_and_wait = + _dispatch_barrier_async_and_waitPtr + .asFunction(); - late final ffi.Pointer _kCFURLFileResourceTypeNamedPipe = - _lookup('kCFURLFileResourceTypeNamedPipe'); + void dispatch_barrier_async_and_wait_f( + Dartdispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_barrier_async_and_wait_f( + queue.ref.pointer, + context, + work, + ); + } - CFStringRef get kCFURLFileResourceTypeNamedPipe => - _kCFURLFileResourceTypeNamedPipe.value; + late final _dispatch_barrier_async_and_wait_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>>('dispatch_barrier_async_and_wait_f'); + late final _dispatch_barrier_async_and_wait_f = + _dispatch_barrier_async_and_wait_fPtr.asFunction< + void Function( + dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); - late final ffi.Pointer _kCFURLFileResourceTypeCharacterSpecial = - _lookup('kCFURLFileResourceTypeCharacterSpecial'); + void dispatch_queue_set_specific( + Dartdispatch_queue_t queue, + ffi.Pointer key, + ffi.Pointer context, + dispatch_function_t destructor, + ) { + return _dispatch_queue_set_specific( + queue.ref.pointer, + key, + context, + destructor, + ); + } - CFStringRef get kCFURLFileResourceTypeCharacterSpecial => - _kCFURLFileResourceTypeCharacterSpecial.value; + late final _dispatch_queue_set_specificPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_queue_t, + ffi.Pointer, + ffi.Pointer, + dispatch_function_t)>>('dispatch_queue_set_specific'); + late final _dispatch_queue_set_specific = + _dispatch_queue_set_specificPtr.asFunction< + void Function(dispatch_queue_t, ffi.Pointer, + ffi.Pointer, dispatch_function_t)>(); - late final ffi.Pointer _kCFURLFileResourceTypeDirectory = - _lookup('kCFURLFileResourceTypeDirectory'); + ffi.Pointer dispatch_queue_get_specific( + Dartdispatch_queue_t queue, + ffi.Pointer key, + ) { + return _dispatch_queue_get_specific( + queue.ref.pointer, + key, + ); + } - CFStringRef get kCFURLFileResourceTypeDirectory => - _kCFURLFileResourceTypeDirectory.value; + late final _dispatch_queue_get_specificPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(dispatch_queue_t, + ffi.Pointer)>>('dispatch_queue_get_specific'); + late final _dispatch_queue_get_specific = + _dispatch_queue_get_specificPtr.asFunction< + ffi.Pointer Function( + dispatch_queue_t, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLFileResourceTypeBlockSpecial = - _lookup('kCFURLFileResourceTypeBlockSpecial'); + ffi.Pointer dispatch_get_specific( + ffi.Pointer key, + ) { + return _dispatch_get_specific( + key, + ); + } - CFStringRef get kCFURLFileResourceTypeBlockSpecial => - _kCFURLFileResourceTypeBlockSpecial.value; + late final _dispatch_get_specificPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('dispatch_get_specific'); + late final _dispatch_get_specific = _dispatch_get_specificPtr + .asFunction Function(ffi.Pointer)>(); - late final ffi.Pointer _kCFURLFileResourceTypeRegular = - _lookup('kCFURLFileResourceTypeRegular'); + void dispatch_assert_queue( + Dartdispatch_queue_t queue, + ) { + return _dispatch_assert_queue( + queue.ref.pointer, + ); + } - CFStringRef get kCFURLFileResourceTypeRegular => - _kCFURLFileResourceTypeRegular.value; + late final _dispatch_assert_queuePtr = + _lookup>( + 'dispatch_assert_queue'); + late final _dispatch_assert_queue = + _dispatch_assert_queuePtr.asFunction(); - late final ffi.Pointer _kCFURLFileResourceTypeSymbolicLink = - _lookup('kCFURLFileResourceTypeSymbolicLink'); + void dispatch_assert_queue_barrier( + Dartdispatch_queue_t queue, + ) { + return _dispatch_assert_queue_barrier( + queue.ref.pointer, + ); + } - CFStringRef get kCFURLFileResourceTypeSymbolicLink => - _kCFURLFileResourceTypeSymbolicLink.value; + late final _dispatch_assert_queue_barrierPtr = + _lookup>( + 'dispatch_assert_queue_barrier'); + late final _dispatch_assert_queue_barrier = _dispatch_assert_queue_barrierPtr + .asFunction(); - late final ffi.Pointer _kCFURLFileResourceTypeSocket = - _lookup('kCFURLFileResourceTypeSocket'); + void dispatch_assert_queue_not( + Dartdispatch_queue_t queue, + ) { + return _dispatch_assert_queue_not( + queue.ref.pointer, + ); + } - CFStringRef get kCFURLFileResourceTypeSocket => - _kCFURLFileResourceTypeSocket.value; + late final _dispatch_assert_queue_notPtr = + _lookup>( + 'dispatch_assert_queue_not'); + late final _dispatch_assert_queue_not = _dispatch_assert_queue_notPtr + .asFunction(); - late final ffi.Pointer _kCFURLFileResourceTypeUnknown = - _lookup('kCFURLFileResourceTypeUnknown'); + int dispatch_allow_send_signals( + int preserve_signum, + ) { + return _dispatch_allow_send_signals( + preserve_signum, + ); + } - CFStringRef get kCFURLFileResourceTypeUnknown => - _kCFURLFileResourceTypeUnknown.value; + late final _dispatch_allow_send_signalsPtr = + _lookup>( + 'dispatch_allow_send_signals'); + late final _dispatch_allow_send_signals = + _dispatch_allow_send_signalsPtr.asFunction(); - late final ffi.Pointer _kCFURLFileSizeKey = - _lookup('kCFURLFileSizeKey'); + Dartdispatch_block_t dispatch_block_create( + dispatch_block_flags_t flags, + Dartdispatch_block_t block, + ) { + return ObjCBlock_ffiVoid.castFromPointer( + _dispatch_block_create( + flags.value, + block.ref.pointer, + ), + retain: false, + release: true); + } - CFStringRef get kCFURLFileSizeKey => _kCFURLFileSizeKey.value; + late final _dispatch_block_createPtr = _lookup< + ffi.NativeFunction< + dispatch_block_t Function( + ffi.UnsignedLong, dispatch_block_t)>>('dispatch_block_create'); + late final _dispatch_block_create = _dispatch_block_createPtr + .asFunction(); - late final ffi.Pointer _kCFURLFileAllocatedSizeKey = - _lookup('kCFURLFileAllocatedSizeKey'); + Dartdispatch_block_t dispatch_block_create_with_qos_class( + dispatch_block_flags_t flags, + qos_class_t qos_class, + int relative_priority, + Dartdispatch_block_t block, + ) { + return ObjCBlock_ffiVoid.castFromPointer( + _dispatch_block_create_with_qos_class( + flags.value, + qos_class.value, + relative_priority, + block.ref.pointer, + ), + retain: false, + release: true); + } - CFStringRef get kCFURLFileAllocatedSizeKey => - _kCFURLFileAllocatedSizeKey.value; + late final _dispatch_block_create_with_qos_classPtr = _lookup< + ffi.NativeFunction< + dispatch_block_t Function(ffi.UnsignedLong, ffi.UnsignedInt, ffi.Int, + dispatch_block_t)>>('dispatch_block_create_with_qos_class'); + late final _dispatch_block_create_with_qos_class = + _dispatch_block_create_with_qos_classPtr.asFunction< + dispatch_block_t Function(int, int, int, dispatch_block_t)>(); - late final ffi.Pointer _kCFURLTotalFileSizeKey = - _lookup('kCFURLTotalFileSizeKey'); + void dispatch_block_perform( + dispatch_block_flags_t flags, + Dartdispatch_block_t block, + ) { + return _dispatch_block_perform( + flags.value, + block.ref.pointer, + ); + } - CFStringRef get kCFURLTotalFileSizeKey => _kCFURLTotalFileSizeKey.value; + late final _dispatch_block_performPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.UnsignedLong, dispatch_block_t)>>('dispatch_block_perform'); + late final _dispatch_block_perform = _dispatch_block_performPtr + .asFunction(); - late final ffi.Pointer _kCFURLTotalFileAllocatedSizeKey = - _lookup('kCFURLTotalFileAllocatedSizeKey'); + int dispatch_block_wait( + Dartdispatch_block_t block, + Dartdispatch_time_t timeout, + ) { + return _dispatch_block_wait( + block.ref.pointer, + timeout, + ); + } - CFStringRef get kCFURLTotalFileAllocatedSizeKey => - _kCFURLTotalFileAllocatedSizeKey.value; + late final _dispatch_block_waitPtr = _lookup< + ffi.NativeFunction< + ffi.IntPtr Function( + dispatch_block_t, dispatch_time_t)>>('dispatch_block_wait'); + late final _dispatch_block_wait = + _dispatch_block_waitPtr.asFunction(); - late final ffi.Pointer _kCFURLIsAliasFileKey = - _lookup('kCFURLIsAliasFileKey'); + void dispatch_block_notify( + Dartdispatch_block_t block, + Dartdispatch_queue_t queue, + Dartdispatch_block_t notification_block, + ) { + return _dispatch_block_notify( + block.ref.pointer, + queue.ref.pointer, + notification_block.ref.pointer, + ); + } - CFStringRef get kCFURLIsAliasFileKey => _kCFURLIsAliasFileKey.value; + late final _dispatch_block_notifyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_block_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_block_notify'); + late final _dispatch_block_notify = _dispatch_block_notifyPtr.asFunction< + void Function(dispatch_block_t, dispatch_queue_t, dispatch_block_t)>(); - late final ffi.Pointer _kCFURLFileProtectionKey = - _lookup('kCFURLFileProtectionKey'); + void dispatch_block_cancel( + Dartdispatch_block_t block, + ) { + return _dispatch_block_cancel( + block.ref.pointer, + ); + } - CFStringRef get kCFURLFileProtectionKey => _kCFURLFileProtectionKey.value; + late final _dispatch_block_cancelPtr = + _lookup>( + 'dispatch_block_cancel'); + late final _dispatch_block_cancel = + _dispatch_block_cancelPtr.asFunction(); - late final ffi.Pointer _kCFURLFileProtectionNone = - _lookup('kCFURLFileProtectionNone'); + int dispatch_block_testcancel( + Dartdispatch_block_t block, + ) { + return _dispatch_block_testcancel( + block.ref.pointer, + ); + } - CFStringRef get kCFURLFileProtectionNone => _kCFURLFileProtectionNone.value; + late final _dispatch_block_testcancelPtr = + _lookup>( + 'dispatch_block_testcancel'); + late final _dispatch_block_testcancel = _dispatch_block_testcancelPtr + .asFunction(); - late final ffi.Pointer _kCFURLFileProtectionComplete = - _lookup('kCFURLFileProtectionComplete'); + late final ffi.Pointer _KERNEL_SECURITY_TOKEN = + _lookup('KERNEL_SECURITY_TOKEN'); - CFStringRef get kCFURLFileProtectionComplete => - _kCFURLFileProtectionComplete.value; + security_token_t get KERNEL_SECURITY_TOKEN => _KERNEL_SECURITY_TOKEN.ref; - late final ffi.Pointer _kCFURLFileProtectionCompleteUnlessOpen = - _lookup('kCFURLFileProtectionCompleteUnlessOpen'); + late final ffi.Pointer _KERNEL_AUDIT_TOKEN = + _lookup('KERNEL_AUDIT_TOKEN'); - CFStringRef get kCFURLFileProtectionCompleteUnlessOpen => - _kCFURLFileProtectionCompleteUnlessOpen.value; + audit_token_t get KERNEL_AUDIT_TOKEN => _KERNEL_AUDIT_TOKEN.ref; - late final ffi.Pointer - _kCFURLFileProtectionCompleteUntilFirstUserAuthentication = - _lookup( - 'kCFURLFileProtectionCompleteUntilFirstUserAuthentication'); + int mach_msg_overwrite( + ffi.Pointer msg, + int option, + int send_size, + int rcv_size, + int rcv_name, + int timeout, + int notify, + ffi.Pointer rcv_msg, + int rcv_limit, + ) { + return _mach_msg_overwrite( + msg, + option, + send_size, + rcv_size, + rcv_name, + timeout, + notify, + rcv_msg, + rcv_limit, + ); + } - CFStringRef get kCFURLFileProtectionCompleteUntilFirstUserAuthentication => - _kCFURLFileProtectionCompleteUntilFirstUserAuthentication.value; + late final _mach_msg_overwritePtr = _lookup< + ffi.NativeFunction< + mach_msg_return_t Function( + ffi.Pointer, + mach_msg_option_t, + mach_msg_size_t, + mach_msg_size_t, + mach_port_name_t, + mach_msg_timeout_t, + mach_port_name_t, + ffi.Pointer, + mach_msg_size_t)>>('mach_msg_overwrite'); + late final _mach_msg_overwrite = _mach_msg_overwritePtr.asFunction< + int Function(ffi.Pointer, int, int, int, int, int, int, + ffi.Pointer, int)>(); - late final ffi.Pointer - _kCFURLFileProtectionCompleteWhenUserInactive = - _lookup('kCFURLFileProtectionCompleteWhenUserInactive'); + int mach_msg( + ffi.Pointer msg, + int option, + int send_size, + int rcv_size, + int rcv_name, + int timeout, + int notify, + ) { + return _mach_msg( + msg, + option, + send_size, + rcv_size, + rcv_name, + timeout, + notify, + ); + } - CFStringRef get kCFURLFileProtectionCompleteWhenUserInactive => - _kCFURLFileProtectionCompleteWhenUserInactive.value; + late final _mach_msgPtr = _lookup< + ffi.NativeFunction< + mach_msg_return_t Function( + ffi.Pointer, + mach_msg_option_t, + mach_msg_size_t, + mach_msg_size_t, + mach_port_name_t, + mach_msg_timeout_t, + mach_port_name_t)>>('mach_msg'); + late final _mach_msg = _mach_msgPtr.asFunction< + int Function( + ffi.Pointer, int, int, int, int, int, int)>(); - late final ffi.Pointer _kCFURLDirectoryEntryCountKey = - _lookup('kCFURLDirectoryEntryCountKey'); + int mach_voucher_deallocate( + int voucher, + ) { + return _mach_voucher_deallocate( + voucher, + ); + } - CFStringRef get kCFURLDirectoryEntryCountKey => - _kCFURLDirectoryEntryCountKey.value; + late final _mach_voucher_deallocatePtr = + _lookup>( + 'mach_voucher_deallocate'); + late final _mach_voucher_deallocate = + _mach_voucher_deallocatePtr.asFunction(); - late final ffi.Pointer - _kCFURLVolumeLocalizedFormatDescriptionKey = - _lookup('kCFURLVolumeLocalizedFormatDescriptionKey'); + late final ffi.Pointer + __dispatch_source_type_data_add = + _lookup('_dispatch_source_type_data_add'); - CFStringRef get kCFURLVolumeLocalizedFormatDescriptionKey => - _kCFURLVolumeLocalizedFormatDescriptionKey.value; + ffi.Pointer get _dispatch_source_type_data_add => + __dispatch_source_type_data_add; - late final ffi.Pointer _kCFURLVolumeTotalCapacityKey = - _lookup('kCFURLVolumeTotalCapacityKey'); + late final ffi.Pointer + __dispatch_source_type_data_or = + _lookup('_dispatch_source_type_data_or'); - CFStringRef get kCFURLVolumeTotalCapacityKey => - _kCFURLVolumeTotalCapacityKey.value; + ffi.Pointer get _dispatch_source_type_data_or => + __dispatch_source_type_data_or; - late final ffi.Pointer _kCFURLVolumeAvailableCapacityKey = - _lookup('kCFURLVolumeAvailableCapacityKey'); + late final ffi.Pointer + __dispatch_source_type_data_replace = + _lookup('_dispatch_source_type_data_replace'); - CFStringRef get kCFURLVolumeAvailableCapacityKey => - _kCFURLVolumeAvailableCapacityKey.value; + ffi.Pointer get _dispatch_source_type_data_replace => + __dispatch_source_type_data_replace; - late final ffi.Pointer - _kCFURLVolumeAvailableCapacityForImportantUsageKey = - _lookup('kCFURLVolumeAvailableCapacityForImportantUsageKey'); + late final ffi.Pointer + __dispatch_source_type_mach_send = + _lookup('_dispatch_source_type_mach_send'); - CFStringRef get kCFURLVolumeAvailableCapacityForImportantUsageKey => - _kCFURLVolumeAvailableCapacityForImportantUsageKey.value; + ffi.Pointer get _dispatch_source_type_mach_send => + __dispatch_source_type_mach_send; - late final ffi.Pointer - _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey = - _lookup( - 'kCFURLVolumeAvailableCapacityForOpportunisticUsageKey'); + late final ffi.Pointer + __dispatch_source_type_mach_recv = + _lookup('_dispatch_source_type_mach_recv'); - CFStringRef get kCFURLVolumeAvailableCapacityForOpportunisticUsageKey => - _kCFURLVolumeAvailableCapacityForOpportunisticUsageKey.value; + ffi.Pointer get _dispatch_source_type_mach_recv => + __dispatch_source_type_mach_recv; - late final ffi.Pointer _kCFURLVolumeResourceCountKey = - _lookup('kCFURLVolumeResourceCountKey'); + late final ffi.Pointer + __dispatch_source_type_memorypressure = + _lookup('_dispatch_source_type_memorypressure'); - CFStringRef get kCFURLVolumeResourceCountKey => - _kCFURLVolumeResourceCountKey.value; + ffi.Pointer + get _dispatch_source_type_memorypressure => + __dispatch_source_type_memorypressure; - late final ffi.Pointer _kCFURLVolumeSupportsPersistentIDsKey = - _lookup('kCFURLVolumeSupportsPersistentIDsKey'); + late final ffi.Pointer __dispatch_source_type_proc = + _lookup('_dispatch_source_type_proc'); - CFStringRef get kCFURLVolumeSupportsPersistentIDsKey => - _kCFURLVolumeSupportsPersistentIDsKey.value; + ffi.Pointer get _dispatch_source_type_proc => + __dispatch_source_type_proc; - late final ffi.Pointer _kCFURLVolumeSupportsSymbolicLinksKey = - _lookup('kCFURLVolumeSupportsSymbolicLinksKey'); + late final ffi.Pointer __dispatch_source_type_read = + _lookup('_dispatch_source_type_read'); - CFStringRef get kCFURLVolumeSupportsSymbolicLinksKey => - _kCFURLVolumeSupportsSymbolicLinksKey.value; + ffi.Pointer get _dispatch_source_type_read => + __dispatch_source_type_read; - late final ffi.Pointer _kCFURLVolumeSupportsHardLinksKey = - _lookup('kCFURLVolumeSupportsHardLinksKey'); + late final ffi.Pointer __dispatch_source_type_signal = + _lookup('_dispatch_source_type_signal'); - CFStringRef get kCFURLVolumeSupportsHardLinksKey => - _kCFURLVolumeSupportsHardLinksKey.value; + ffi.Pointer get _dispatch_source_type_signal => + __dispatch_source_type_signal; - late final ffi.Pointer _kCFURLVolumeSupportsJournalingKey = - _lookup('kCFURLVolumeSupportsJournalingKey'); + late final ffi.Pointer __dispatch_source_type_timer = + _lookup('_dispatch_source_type_timer'); - CFStringRef get kCFURLVolumeSupportsJournalingKey => - _kCFURLVolumeSupportsJournalingKey.value; + ffi.Pointer get _dispatch_source_type_timer => + __dispatch_source_type_timer; - late final ffi.Pointer _kCFURLVolumeIsJournalingKey = - _lookup('kCFURLVolumeIsJournalingKey'); + late final ffi.Pointer __dispatch_source_type_vnode = + _lookup('_dispatch_source_type_vnode'); - CFStringRef get kCFURLVolumeIsJournalingKey => - _kCFURLVolumeIsJournalingKey.value; + ffi.Pointer get _dispatch_source_type_vnode => + __dispatch_source_type_vnode; - late final ffi.Pointer _kCFURLVolumeSupportsSparseFilesKey = - _lookup('kCFURLVolumeSupportsSparseFilesKey'); + late final ffi.Pointer __dispatch_source_type_write = + _lookup('_dispatch_source_type_write'); - CFStringRef get kCFURLVolumeSupportsSparseFilesKey => - _kCFURLVolumeSupportsSparseFilesKey.value; + ffi.Pointer get _dispatch_source_type_write => + __dispatch_source_type_write; - late final ffi.Pointer _kCFURLVolumeSupportsZeroRunsKey = - _lookup('kCFURLVolumeSupportsZeroRunsKey'); + Dartdispatch_source_t dispatch_source_create( + dispatch_source_type_t type, + int handle, + int mask, + Dartdispatch_queue_t queue, + ) { + return objc.NSObject.castFromPointer( + _dispatch_source_create( + type, + handle, + mask, + queue.ref.pointer, + ), + retain: false, + release: true); + } - CFStringRef get kCFURLVolumeSupportsZeroRunsKey => - _kCFURLVolumeSupportsZeroRunsKey.value; + late final _dispatch_source_createPtr = _lookup< + ffi.NativeFunction< + dispatch_source_t Function(dispatch_source_type_t, ffi.UintPtr, + ffi.UintPtr, dispatch_queue_t)>>('dispatch_source_create'); + late final _dispatch_source_create = _dispatch_source_createPtr.asFunction< + dispatch_source_t Function( + dispatch_source_type_t, int, int, dispatch_queue_t)>(); - late final ffi.Pointer - _kCFURLVolumeSupportsCaseSensitiveNamesKey = - _lookup('kCFURLVolumeSupportsCaseSensitiveNamesKey'); + void dispatch_source_set_event_handler( + Dartdispatch_source_t source, + Dartdispatch_block_t handler, + ) { + return _dispatch_source_set_event_handler( + source.ref.pointer, + handler.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeSupportsCaseSensitiveNamesKey => - _kCFURLVolumeSupportsCaseSensitiveNamesKey.value; + late final _dispatch_source_set_event_handlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_block_t)>>('dispatch_source_set_event_handler'); + late final _dispatch_source_set_event_handler = + _dispatch_source_set_event_handlerPtr + .asFunction(); - late final ffi.Pointer - _kCFURLVolumeSupportsCasePreservedNamesKey = - _lookup('kCFURLVolumeSupportsCasePreservedNamesKey'); + void dispatch_source_set_event_handler_f( + Dartdispatch_source_t source, + dispatch_function_t handler, + ) { + return _dispatch_source_set_event_handler_f( + source.ref.pointer, + handler, + ); + } - CFStringRef get kCFURLVolumeSupportsCasePreservedNamesKey => - _kCFURLVolumeSupportsCasePreservedNamesKey.value; + late final _dispatch_source_set_event_handler_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_function_t)>>('dispatch_source_set_event_handler_f'); + late final _dispatch_source_set_event_handler_f = + _dispatch_source_set_event_handler_fPtr + .asFunction(); - late final ffi.Pointer - _kCFURLVolumeSupportsRootDirectoryDatesKey = - _lookup('kCFURLVolumeSupportsRootDirectoryDatesKey'); + void dispatch_source_set_cancel_handler( + Dartdispatch_source_t source, + Dartdispatch_block_t handler, + ) { + return _dispatch_source_set_cancel_handler( + source.ref.pointer, + handler.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeSupportsRootDirectoryDatesKey => - _kCFURLVolumeSupportsRootDirectoryDatesKey.value; + late final _dispatch_source_set_cancel_handlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_block_t)>>('dispatch_source_set_cancel_handler'); + late final _dispatch_source_set_cancel_handler = + _dispatch_source_set_cancel_handlerPtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeSupportsVolumeSizesKey = - _lookup('kCFURLVolumeSupportsVolumeSizesKey'); + void dispatch_source_set_cancel_handler_f( + Dartdispatch_source_t source, + dispatch_function_t handler, + ) { + return _dispatch_source_set_cancel_handler_f( + source.ref.pointer, + handler, + ); + } - CFStringRef get kCFURLVolumeSupportsVolumeSizesKey => - _kCFURLVolumeSupportsVolumeSizesKey.value; + late final _dispatch_source_set_cancel_handler_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_function_t)>>('dispatch_source_set_cancel_handler_f'); + late final _dispatch_source_set_cancel_handler_f = + _dispatch_source_set_cancel_handler_fPtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeSupportsRenamingKey = - _lookup('kCFURLVolumeSupportsRenamingKey'); + void dispatch_source_cancel( + Dartdispatch_source_t source, + ) { + return _dispatch_source_cancel( + source.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeSupportsRenamingKey => - _kCFURLVolumeSupportsRenamingKey.value; + late final _dispatch_source_cancelPtr = + _lookup>( + 'dispatch_source_cancel'); + late final _dispatch_source_cancel = + _dispatch_source_cancelPtr.asFunction(); - late final ffi.Pointer - _kCFURLVolumeSupportsAdvisoryFileLockingKey = - _lookup('kCFURLVolumeSupportsAdvisoryFileLockingKey'); + int dispatch_source_testcancel( + Dartdispatch_source_t source, + ) { + return _dispatch_source_testcancel( + source.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeSupportsAdvisoryFileLockingKey => - _kCFURLVolumeSupportsAdvisoryFileLockingKey.value; + late final _dispatch_source_testcancelPtr = + _lookup>( + 'dispatch_source_testcancel'); + late final _dispatch_source_testcancel = _dispatch_source_testcancelPtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeSupportsExtendedSecurityKey = - _lookup('kCFURLVolumeSupportsExtendedSecurityKey'); + int dispatch_source_get_handle( + Dartdispatch_source_t source, + ) { + return _dispatch_source_get_handle( + source.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeSupportsExtendedSecurityKey => - _kCFURLVolumeSupportsExtendedSecurityKey.value; + late final _dispatch_source_get_handlePtr = + _lookup>( + 'dispatch_source_get_handle'); + late final _dispatch_source_get_handle = _dispatch_source_get_handlePtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeIsBrowsableKey = - _lookup('kCFURLVolumeIsBrowsableKey'); + int dispatch_source_get_mask( + Dartdispatch_source_t source, + ) { + return _dispatch_source_get_mask( + source.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeIsBrowsableKey => - _kCFURLVolumeIsBrowsableKey.value; + late final _dispatch_source_get_maskPtr = + _lookup>( + 'dispatch_source_get_mask'); + late final _dispatch_source_get_mask = _dispatch_source_get_maskPtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeMaximumFileSizeKey = - _lookup('kCFURLVolumeMaximumFileSizeKey'); + int dispatch_source_get_data( + Dartdispatch_source_t source, + ) { + return _dispatch_source_get_data( + source.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeMaximumFileSizeKey => - _kCFURLVolumeMaximumFileSizeKey.value; + late final _dispatch_source_get_dataPtr = + _lookup>( + 'dispatch_source_get_data'); + late final _dispatch_source_get_data = _dispatch_source_get_dataPtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeIsEjectableKey = - _lookup('kCFURLVolumeIsEjectableKey'); + void dispatch_source_merge_data( + Dartdispatch_source_t source, + int value, + ) { + return _dispatch_source_merge_data( + source.ref.pointer, + value, + ); + } - CFStringRef get kCFURLVolumeIsEjectableKey => - _kCFURLVolumeIsEjectableKey.value; + late final _dispatch_source_merge_dataPtr = _lookup< + ffi + .NativeFunction>( + 'dispatch_source_merge_data'); + late final _dispatch_source_merge_data = _dispatch_source_merge_dataPtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeIsRemovableKey = - _lookup('kCFURLVolumeIsRemovableKey'); + void dispatch_source_set_timer( + Dartdispatch_source_t source, + Dartdispatch_time_t start, + int interval, + int leeway, + ) { + return _dispatch_source_set_timer( + source.ref.pointer, + start, + interval, + leeway, + ); + } - CFStringRef get kCFURLVolumeIsRemovableKey => - _kCFURLVolumeIsRemovableKey.value; + late final _dispatch_source_set_timerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, dispatch_time_t, ffi.Uint64, + ffi.Uint64)>>('dispatch_source_set_timer'); + late final _dispatch_source_set_timer = _dispatch_source_set_timerPtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeIsInternalKey = - _lookup('kCFURLVolumeIsInternalKey'); + void dispatch_source_set_registration_handler( + Dartdispatch_source_t source, + Dartdispatch_block_t handler, + ) { + return _dispatch_source_set_registration_handler( + source.ref.pointer, + handler.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeIsInternalKey => _kCFURLVolumeIsInternalKey.value; + late final _dispatch_source_set_registration_handlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, + dispatch_block_t)>>('dispatch_source_set_registration_handler'); + late final _dispatch_source_set_registration_handler = + _dispatch_source_set_registration_handlerPtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeIsAutomountedKey = - _lookup('kCFURLVolumeIsAutomountedKey'); + void dispatch_source_set_registration_handler_f( + Dartdispatch_source_t source, + dispatch_function_t handler, + ) { + return _dispatch_source_set_registration_handler_f( + source.ref.pointer, + handler, + ); + } - CFStringRef get kCFURLVolumeIsAutomountedKey => - _kCFURLVolumeIsAutomountedKey.value; + late final _dispatch_source_set_registration_handler_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_source_t, dispatch_function_t)>>( + 'dispatch_source_set_registration_handler_f'); + late final _dispatch_source_set_registration_handler_f = + _dispatch_source_set_registration_handler_fPtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeIsLocalKey = - _lookup('kCFURLVolumeIsLocalKey'); + Dartdispatch_group_t dispatch_group_create() { + return objc.NSObject.castFromPointer(_dispatch_group_create(), + retain: false, release: true); + } - CFStringRef get kCFURLVolumeIsLocalKey => _kCFURLVolumeIsLocalKey.value; + late final _dispatch_group_createPtr = + _lookup>( + 'dispatch_group_create'); + late final _dispatch_group_create = + _dispatch_group_createPtr.asFunction(); - late final ffi.Pointer _kCFURLVolumeIsReadOnlyKey = - _lookup('kCFURLVolumeIsReadOnlyKey'); + void dispatch_group_async( + Dartdispatch_group_t group, + Dartdispatch_queue_t queue, + Dartdispatch_block_t block, + ) { + return _dispatch_group_async( + group.ref.pointer, + queue.ref.pointer, + block.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeIsReadOnlyKey => _kCFURLVolumeIsReadOnlyKey.value; + late final _dispatch_group_asyncPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_group_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_group_async'); + late final _dispatch_group_async = _dispatch_group_asyncPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); - late final ffi.Pointer _kCFURLVolumeCreationDateKey = - _lookup('kCFURLVolumeCreationDateKey'); + void dispatch_group_async_f( + Dartdispatch_group_t group, + Dartdispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_group_async_f( + group.ref.pointer, + queue.ref.pointer, + context, + work, + ); + } - CFStringRef get kCFURLVolumeCreationDateKey => - _kCFURLVolumeCreationDateKey.value; + late final _dispatch_group_async_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_group_t, + dispatch_queue_t, + ffi.Pointer, + dispatch_function_t)>>('dispatch_group_async_f'); + late final _dispatch_group_async_f = _dispatch_group_async_fPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>(); - late final ffi.Pointer _kCFURLVolumeURLForRemountingKey = - _lookup('kCFURLVolumeURLForRemountingKey'); + int dispatch_group_wait( + Dartdispatch_group_t group, + Dartdispatch_time_t timeout, + ) { + return _dispatch_group_wait( + group.ref.pointer, + timeout, + ); + } - CFStringRef get kCFURLVolumeURLForRemountingKey => - _kCFURLVolumeURLForRemountingKey.value; + late final _dispatch_group_waitPtr = _lookup< + ffi.NativeFunction< + ffi.IntPtr Function( + dispatch_group_t, dispatch_time_t)>>('dispatch_group_wait'); + late final _dispatch_group_wait = + _dispatch_group_waitPtr.asFunction(); - late final ffi.Pointer _kCFURLVolumeUUIDStringKey = - _lookup('kCFURLVolumeUUIDStringKey'); + void dispatch_group_notify( + Dartdispatch_group_t group, + Dartdispatch_queue_t queue, + Dartdispatch_block_t block, + ) { + return _dispatch_group_notify( + group.ref.pointer, + queue.ref.pointer, + block.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeUUIDStringKey => _kCFURLVolumeUUIDStringKey.value; + late final _dispatch_group_notifyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_group_t, dispatch_queue_t, + dispatch_block_t)>>('dispatch_group_notify'); + late final _dispatch_group_notify = _dispatch_group_notifyPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); - late final ffi.Pointer _kCFURLVolumeNameKey = - _lookup('kCFURLVolumeNameKey'); + void dispatch_group_notify_f( + Dartdispatch_group_t group, + Dartdispatch_queue_t queue, + ffi.Pointer context, + dispatch_function_t work, + ) { + return _dispatch_group_notify_f( + group.ref.pointer, + queue.ref.pointer, + context, + work, + ); + } - CFStringRef get kCFURLVolumeNameKey => _kCFURLVolumeNameKey.value; + late final _dispatch_group_notify_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + dispatch_group_t, + dispatch_queue_t, + ffi.Pointer, + dispatch_function_t)>>('dispatch_group_notify_f'); + late final _dispatch_group_notify_f = _dispatch_group_notify_fPtr.asFunction< + void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, + dispatch_function_t)>(); - late final ffi.Pointer _kCFURLVolumeLocalizedNameKey = - _lookup('kCFURLVolumeLocalizedNameKey'); + void dispatch_group_enter( + Dartdispatch_group_t group, + ) { + return _dispatch_group_enter( + group.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeLocalizedNameKey => - _kCFURLVolumeLocalizedNameKey.value; + late final _dispatch_group_enterPtr = + _lookup>( + 'dispatch_group_enter'); + late final _dispatch_group_enter = + _dispatch_group_enterPtr.asFunction(); - late final ffi.Pointer _kCFURLVolumeIsEncryptedKey = - _lookup('kCFURLVolumeIsEncryptedKey'); + void dispatch_group_leave( + Dartdispatch_group_t group, + ) { + return _dispatch_group_leave( + group.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeIsEncryptedKey => - _kCFURLVolumeIsEncryptedKey.value; + late final _dispatch_group_leavePtr = + _lookup>( + 'dispatch_group_leave'); + late final _dispatch_group_leave = + _dispatch_group_leavePtr.asFunction(); - late final ffi.Pointer _kCFURLVolumeIsRootFileSystemKey = - _lookup('kCFURLVolumeIsRootFileSystemKey'); + Dartdispatch_semaphore_t dispatch_semaphore_create( + int value, + ) { + return objc.NSObject.castFromPointer( + _dispatch_semaphore_create( + value, + ), + retain: false, + release: true); + } - CFStringRef get kCFURLVolumeIsRootFileSystemKey => - _kCFURLVolumeIsRootFileSystemKey.value; + late final _dispatch_semaphore_createPtr = + _lookup>( + 'dispatch_semaphore_create'); + late final _dispatch_semaphore_create = _dispatch_semaphore_createPtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeSupportsCompressionKey = - _lookup('kCFURLVolumeSupportsCompressionKey'); + int dispatch_semaphore_wait( + Dartdispatch_semaphore_t dsema, + Dartdispatch_time_t timeout, + ) { + return _dispatch_semaphore_wait( + dsema.ref.pointer, + timeout, + ); + } - CFStringRef get kCFURLVolumeSupportsCompressionKey => - _kCFURLVolumeSupportsCompressionKey.value; + late final _dispatch_semaphore_waitPtr = _lookup< + ffi.NativeFunction< + ffi.IntPtr Function(dispatch_semaphore_t, + dispatch_time_t)>>('dispatch_semaphore_wait'); + late final _dispatch_semaphore_wait = _dispatch_semaphore_waitPtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeSupportsFileCloningKey = - _lookup('kCFURLVolumeSupportsFileCloningKey'); + int dispatch_semaphore_signal( + Dartdispatch_semaphore_t dsema, + ) { + return _dispatch_semaphore_signal( + dsema.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeSupportsFileCloningKey => - _kCFURLVolumeSupportsFileCloningKey.value; + late final _dispatch_semaphore_signalPtr = + _lookup>( + 'dispatch_semaphore_signal'); + late final _dispatch_semaphore_signal = _dispatch_semaphore_signalPtr + .asFunction(); - late final ffi.Pointer _kCFURLVolumeSupportsSwapRenamingKey = - _lookup('kCFURLVolumeSupportsSwapRenamingKey'); + void dispatch_once( + ffi.Pointer predicate, + Dartdispatch_block_t block, + ) { + return _dispatch_once( + predicate, + block.ref.pointer, + ); + } - CFStringRef get kCFURLVolumeSupportsSwapRenamingKey => - _kCFURLVolumeSupportsSwapRenamingKey.value; + late final _dispatch_oncePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + dispatch_block_t)>>('dispatch_once'); + late final _dispatch_once = _dispatch_oncePtr.asFunction< + void Function(ffi.Pointer, dispatch_block_t)>(); - late final ffi.Pointer - _kCFURLVolumeSupportsExclusiveRenamingKey = - _lookup('kCFURLVolumeSupportsExclusiveRenamingKey'); + void dispatch_once_f( + ffi.Pointer predicate, + ffi.Pointer context, + dispatch_function_t function, + ) { + return _dispatch_once_f( + predicate, + context, + function, + ); + } - CFStringRef get kCFURLVolumeSupportsExclusiveRenamingKey => - _kCFURLVolumeSupportsExclusiveRenamingKey.value; + late final _dispatch_once_fPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + dispatch_function_t)>>('dispatch_once_f'); + late final _dispatch_once_f = _dispatch_once_fPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, + dispatch_function_t)>(); - late final ffi.Pointer _kCFURLVolumeSupportsImmutableFilesKey = - _lookup('kCFURLVolumeSupportsImmutableFilesKey'); - - CFStringRef get kCFURLVolumeSupportsImmutableFilesKey => - _kCFURLVolumeSupportsImmutableFilesKey.value; - - late final ffi.Pointer - _kCFURLVolumeSupportsAccessPermissionsKey = - _lookup('kCFURLVolumeSupportsAccessPermissionsKey'); - - CFStringRef get kCFURLVolumeSupportsAccessPermissionsKey => - _kCFURLVolumeSupportsAccessPermissionsKey.value; - - late final ffi.Pointer _kCFURLVolumeSupportsFileProtectionKey = - _lookup('kCFURLVolumeSupportsFileProtectionKey'); - - CFStringRef get kCFURLVolumeSupportsFileProtectionKey => - _kCFURLVolumeSupportsFileProtectionKey.value; - - late final ffi.Pointer _kCFURLVolumeTypeNameKey = - _lookup('kCFURLVolumeTypeNameKey'); + late final ffi.Pointer __dispatch_data_empty = + _lookup('_dispatch_data_empty'); - CFStringRef get kCFURLVolumeTypeNameKey => _kCFURLVolumeTypeNameKey.value; + ffi.Pointer get _dispatch_data_empty => + __dispatch_data_empty; - late final ffi.Pointer _kCFURLVolumeSubtypeKey = - _lookup('kCFURLVolumeSubtypeKey'); + late final ffi.Pointer __dispatch_data_destructor_free = + _lookup('_dispatch_data_destructor_free'); - CFStringRef get kCFURLVolumeSubtypeKey => _kCFURLVolumeSubtypeKey.value; + Dartdispatch_block_t get _dispatch_data_destructor_free => + ObjCBlock_ffiVoid.castFromPointer(__dispatch_data_destructor_free.value, + retain: true, release: true); - late final ffi.Pointer _kCFURLVolumeMountFromLocationKey = - _lookup('kCFURLVolumeMountFromLocationKey'); + set _dispatch_data_destructor_free(Dartdispatch_block_t value) { + ObjCBlock_ffiVoid.castFromPointer(__dispatch_data_destructor_free.value, + retain: false, release: true) + .ref + .release(); + __dispatch_data_destructor_free.value = value.ref.retainAndReturnPointer(); + } - CFStringRef get kCFURLVolumeMountFromLocationKey => - _kCFURLVolumeMountFromLocationKey.value; + late final ffi.Pointer __dispatch_data_destructor_munmap = + _lookup('_dispatch_data_destructor_munmap'); - late final ffi.Pointer _kCFURLIsUbiquitousItemKey = - _lookup('kCFURLIsUbiquitousItemKey'); + Dartdispatch_block_t get _dispatch_data_destructor_munmap => + ObjCBlock_ffiVoid.castFromPointer(__dispatch_data_destructor_munmap.value, + retain: true, release: true); - CFStringRef get kCFURLIsUbiquitousItemKey => _kCFURLIsUbiquitousItemKey.value; + set _dispatch_data_destructor_munmap(Dartdispatch_block_t value) { + ObjCBlock_ffiVoid.castFromPointer(__dispatch_data_destructor_munmap.value, + retain: false, release: true) + .ref + .release(); + __dispatch_data_destructor_munmap.value = + value.ref.retainAndReturnPointer(); + } - late final ffi.Pointer - _kCFURLUbiquitousItemHasUnresolvedConflictsKey = - _lookup('kCFURLUbiquitousItemHasUnresolvedConflictsKey'); + Dartdispatch_data_t dispatch_data_create( + ffi.Pointer buffer, + int size, + Dartdispatch_queue_t queue, + Dartdispatch_block_t destructor, + ) { + return objc.NSObject.castFromPointer( + _dispatch_data_create( + buffer, + size, + queue.ref.pointer, + destructor.ref.pointer, + ), + retain: false, + release: true); + } - CFStringRef get kCFURLUbiquitousItemHasUnresolvedConflictsKey => - _kCFURLUbiquitousItemHasUnresolvedConflictsKey.value; + late final _dispatch_data_createPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(ffi.Pointer, ffi.Size, + dispatch_queue_t, dispatch_block_t)>>('dispatch_data_create'); + late final _dispatch_data_create = _dispatch_data_createPtr.asFunction< + dispatch_data_t Function( + ffi.Pointer, int, dispatch_queue_t, dispatch_block_t)>(); - late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadedKey = - _lookup('kCFURLUbiquitousItemIsDownloadedKey'); + int dispatch_data_get_size( + Dartdispatch_data_t data, + ) { + return _dispatch_data_get_size( + data.ref.pointer, + ); + } - CFStringRef get kCFURLUbiquitousItemIsDownloadedKey => - _kCFURLUbiquitousItemIsDownloadedKey.value; + late final _dispatch_data_get_sizePtr = + _lookup>( + 'dispatch_data_get_size'); + late final _dispatch_data_get_size = + _dispatch_data_get_sizePtr.asFunction(); - late final ffi.Pointer _kCFURLUbiquitousItemIsDownloadingKey = - _lookup('kCFURLUbiquitousItemIsDownloadingKey'); + Dartdispatch_data_t dispatch_data_create_map( + Dartdispatch_data_t data, + ffi.Pointer> buffer_ptr, + ffi.Pointer size_ptr, + ) { + return objc.NSObject.castFromPointer( + _dispatch_data_create_map( + data.ref.pointer, + buffer_ptr, + size_ptr, + ), + retain: false, + release: true); + } - CFStringRef get kCFURLUbiquitousItemIsDownloadingKey => - _kCFURLUbiquitousItemIsDownloadingKey.value; + late final _dispatch_data_create_mapPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function( + dispatch_data_t, + ffi.Pointer>, + ffi.Pointer)>>('dispatch_data_create_map'); + late final _dispatch_data_create_map = + _dispatch_data_create_mapPtr.asFunction< + dispatch_data_t Function(dispatch_data_t, + ffi.Pointer>, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLUbiquitousItemIsUploadedKey = - _lookup('kCFURLUbiquitousItemIsUploadedKey'); + Dartdispatch_data_t dispatch_data_create_concat( + Dartdispatch_data_t data1, + Dartdispatch_data_t data2, + ) { + return objc.NSObject.castFromPointer( + _dispatch_data_create_concat( + data1.ref.pointer, + data2.ref.pointer, + ), + retain: false, + release: true); + } - CFStringRef get kCFURLUbiquitousItemIsUploadedKey => - _kCFURLUbiquitousItemIsUploadedKey.value; + late final _dispatch_data_create_concatPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(dispatch_data_t, + dispatch_data_t)>>('dispatch_data_create_concat'); + late final _dispatch_data_create_concat = _dispatch_data_create_concatPtr + .asFunction(); - late final ffi.Pointer _kCFURLUbiquitousItemIsUploadingKey = - _lookup('kCFURLUbiquitousItemIsUploadingKey'); + Dartdispatch_data_t dispatch_data_create_subrange( + Dartdispatch_data_t data, + int offset, + int length, + ) { + return objc.NSObject.castFromPointer( + _dispatch_data_create_subrange( + data.ref.pointer, + offset, + length, + ), + retain: false, + release: true); + } - CFStringRef get kCFURLUbiquitousItemIsUploadingKey => - _kCFURLUbiquitousItemIsUploadingKey.value; + late final _dispatch_data_create_subrangePtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(dispatch_data_t, ffi.Size, + ffi.Size)>>('dispatch_data_create_subrange'); + late final _dispatch_data_create_subrange = _dispatch_data_create_subrangePtr + .asFunction(); - late final ffi.Pointer - _kCFURLUbiquitousItemPercentDownloadedKey = - _lookup('kCFURLUbiquitousItemPercentDownloadedKey'); + bool dispatch_data_apply( + Dartdispatch_data_t data, + Dartdispatch_data_applier_t applier, + ) { + return _dispatch_data_apply( + data.ref.pointer, + applier.ref.pointer, + ); + } - CFStringRef get kCFURLUbiquitousItemPercentDownloadedKey => - _kCFURLUbiquitousItemPercentDownloadedKey.value; + late final _dispatch_data_applyPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(dispatch_data_t, + dispatch_data_applier_t)>>('dispatch_data_apply'); + late final _dispatch_data_apply = _dispatch_data_applyPtr + .asFunction(); - late final ffi.Pointer _kCFURLUbiquitousItemPercentUploadedKey = - _lookup('kCFURLUbiquitousItemPercentUploadedKey'); + Dartdispatch_data_t dispatch_data_copy_region( + Dartdispatch_data_t data, + int location, + ffi.Pointer offset_ptr, + ) { + return objc.NSObject.castFromPointer( + _dispatch_data_copy_region( + data.ref.pointer, + location, + offset_ptr, + ), + retain: false, + release: true); + } - CFStringRef get kCFURLUbiquitousItemPercentUploadedKey => - _kCFURLUbiquitousItemPercentUploadedKey.value; + late final _dispatch_data_copy_regionPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function(dispatch_data_t, ffi.Size, + ffi.Pointer)>>('dispatch_data_copy_region'); + late final _dispatch_data_copy_region = + _dispatch_data_copy_regionPtr.asFunction< + dispatch_data_t Function( + dispatch_data_t, int, ffi.Pointer)>(); - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusKey = - _lookup('kCFURLUbiquitousItemDownloadingStatusKey'); + void dispatch_read( + Dartdispatch_fd_t fd, + int length, + Dartdispatch_queue_t queue, + objc.ObjCBlock handler, + ) { + return _dispatch_read( + fd, + length, + queue.ref.pointer, + handler.ref.pointer, + ); + } - CFStringRef get kCFURLUbiquitousItemDownloadingStatusKey => - _kCFURLUbiquitousItemDownloadingStatusKey.value; + late final _dispatch_readPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_fd_t, ffi.Size, dispatch_queue_t, + ffi.Pointer)>>('dispatch_read'); + late final _dispatch_read = _dispatch_readPtr.asFunction< + void Function( + int, int, dispatch_queue_t, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLUbiquitousItemDownloadingErrorKey = - _lookup('kCFURLUbiquitousItemDownloadingErrorKey'); + void dispatch_write( + Dartdispatch_fd_t fd, + Dartdispatch_data_t data, + Dartdispatch_queue_t queue, + objc.ObjCBlock handler, + ) { + return _dispatch_write( + fd, + data.ref.pointer, + queue.ref.pointer, + handler.ref.pointer, + ); + } - CFStringRef get kCFURLUbiquitousItemDownloadingErrorKey => - _kCFURLUbiquitousItemDownloadingErrorKey.value; + late final _dispatch_writePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_fd_t, dispatch_data_t, dispatch_queue_t, + ffi.Pointer)>>('dispatch_write'); + late final _dispatch_write = _dispatch_writePtr.asFunction< + void Function(int, dispatch_data_t, dispatch_queue_t, + ffi.Pointer)>(); - late final ffi.Pointer _kCFURLUbiquitousItemUploadingErrorKey = - _lookup('kCFURLUbiquitousItemUploadingErrorKey'); + Dartdispatch_io_t dispatch_io_create( + Dartdispatch_io_type_t type, + Dartdispatch_fd_t fd, + Dartdispatch_queue_t queue, + objc.ObjCBlock cleanup_handler, + ) { + return objc.NSObject.castFromPointer( + _dispatch_io_create( + type, + fd, + queue.ref.pointer, + cleanup_handler.ref.pointer, + ), + retain: false, + release: true); + } - CFStringRef get kCFURLUbiquitousItemUploadingErrorKey => - _kCFURLUbiquitousItemUploadingErrorKey.value; + late final _dispatch_io_createPtr = _lookup< + ffi.NativeFunction< + dispatch_io_t Function( + dispatch_io_type_t, + dispatch_fd_t, + dispatch_queue_t, + ffi.Pointer)>>('dispatch_io_create'); + late final _dispatch_io_create = _dispatch_io_createPtr.asFunction< + dispatch_io_t Function( + int, int, dispatch_queue_t, ffi.Pointer)>(); - late final ffi.Pointer - _kCFURLUbiquitousItemIsExcludedFromSyncKey = - _lookup('kCFURLUbiquitousItemIsExcludedFromSyncKey'); + Dartdispatch_io_t dispatch_io_create_with_path( + Dartdispatch_io_type_t type, + ffi.Pointer path, + int oflag, + Dart__uint16_t mode, + Dartdispatch_queue_t queue, + objc.ObjCBlock cleanup_handler, + ) { + return objc.NSObject.castFromPointer( + _dispatch_io_create_with_path( + type, + path, + oflag, + mode, + queue.ref.pointer, + cleanup_handler.ref.pointer, + ), + retain: false, + release: true); + } - CFStringRef get kCFURLUbiquitousItemIsExcludedFromSyncKey => - _kCFURLUbiquitousItemIsExcludedFromSyncKey.value; + late final _dispatch_io_create_with_pathPtr = _lookup< + ffi.NativeFunction< + dispatch_io_t Function( + dispatch_io_type_t, + ffi.Pointer, + ffi.Int, + mode_t, + dispatch_queue_t, + ffi.Pointer)>>( + 'dispatch_io_create_with_path'); + late final _dispatch_io_create_with_path = + _dispatch_io_create_with_pathPtr.asFunction< + dispatch_io_t Function(int, ffi.Pointer, int, int, + dispatch_queue_t, ffi.Pointer)>(); - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusNotDownloaded = - _lookup( - 'kCFURLUbiquitousItemDownloadingStatusNotDownloaded'); + Dartdispatch_io_t dispatch_io_create_with_io( + Dartdispatch_io_type_t type, + Dartdispatch_io_t io, + Dartdispatch_queue_t queue, + objc.ObjCBlock cleanup_handler, + ) { + return objc.NSObject.castFromPointer( + _dispatch_io_create_with_io( + type, + io.ref.pointer, + queue.ref.pointer, + cleanup_handler.ref.pointer, + ), + retain: false, + release: true); + } - CFStringRef get kCFURLUbiquitousItemDownloadingStatusNotDownloaded => - _kCFURLUbiquitousItemDownloadingStatusNotDownloaded.value; + late final _dispatch_io_create_with_ioPtr = _lookup< + ffi.NativeFunction< + dispatch_io_t Function( + dispatch_io_type_t, + dispatch_io_t, + dispatch_queue_t, + ffi.Pointer)>>('dispatch_io_create_with_io'); + late final _dispatch_io_create_with_io = + _dispatch_io_create_with_ioPtr.asFunction< + dispatch_io_t Function(int, dispatch_io_t, dispatch_queue_t, + ffi.Pointer)>(); - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusDownloaded = - _lookup('kCFURLUbiquitousItemDownloadingStatusDownloaded'); + void dispatch_io_read( + Dartdispatch_io_t channel, + Dart__int64_t offset, + int length, + Dartdispatch_queue_t queue, + Dartdispatch_io_handler_t io_handler, + ) { + return _dispatch_io_read( + channel.ref.pointer, + offset, + length, + queue.ref.pointer, + io_handler.ref.pointer, + ); + } - CFStringRef get kCFURLUbiquitousItemDownloadingStatusDownloaded => - _kCFURLUbiquitousItemDownloadingStatusDownloaded.value; + late final _dispatch_io_readPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_io_t, off_t, ffi.Size, dispatch_queue_t, + dispatch_io_handler_t)>>('dispatch_io_read'); + late final _dispatch_io_read = _dispatch_io_readPtr.asFunction< + void Function( + dispatch_io_t, int, int, dispatch_queue_t, dispatch_io_handler_t)>(); - late final ffi.Pointer - _kCFURLUbiquitousItemDownloadingStatusCurrent = - _lookup('kCFURLUbiquitousItemDownloadingStatusCurrent'); + void dispatch_io_write( + Dartdispatch_io_t channel, + Dart__int64_t offset, + Dartdispatch_data_t data, + Dartdispatch_queue_t queue, + Dartdispatch_io_handler_t io_handler, + ) { + return _dispatch_io_write( + channel.ref.pointer, + offset, + data.ref.pointer, + queue.ref.pointer, + io_handler.ref.pointer, + ); + } - CFStringRef get kCFURLUbiquitousItemDownloadingStatusCurrent => - _kCFURLUbiquitousItemDownloadingStatusCurrent.value; + late final _dispatch_io_writePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_io_t, off_t, dispatch_data_t, + dispatch_queue_t, dispatch_io_handler_t)>>('dispatch_io_write'); + late final _dispatch_io_write = _dispatch_io_writePtr.asFunction< + void Function(dispatch_io_t, int, dispatch_data_t, dispatch_queue_t, + dispatch_io_handler_t)>(); - CFDataRef CFURLCreateBookmarkData( - CFAllocatorRef allocator, - CFURLRef url, - int options, - CFArrayRef resourcePropertiesToInclude, - CFURLRef relativeToURL, - ffi.Pointer error, + void dispatch_io_close( + Dartdispatch_io_t channel, + Dartdispatch_io_close_flags_t flags, ) { - return _CFURLCreateBookmarkData( - allocator, - url, - options, - resourcePropertiesToInclude, - relativeToURL, - error, + return _dispatch_io_close( + channel.ref.pointer, + flags, ); } - late final _CFURLCreateBookmarkDataPtr = _lookup< + late final _dispatch_io_closePtr = _lookup< ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, CFArrayRef, - CFURLRef, ffi.Pointer)>>('CFURLCreateBookmarkData'); - late final _CFURLCreateBookmarkData = _CFURLCreateBookmarkDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, int, CFArrayRef, CFURLRef, - ffi.Pointer)>(); + ffi.Void Function( + dispatch_io_t, dispatch_io_close_flags_t)>>('dispatch_io_close'); + late final _dispatch_io_close = + _dispatch_io_closePtr.asFunction(); - CFURLRef CFURLCreateByResolvingBookmarkData( - CFAllocatorRef allocator, - CFDataRef bookmark, - int options, - CFURLRef relativeToURL, - CFArrayRef resourcePropertiesToInclude, - ffi.Pointer isStale, - ffi.Pointer error, + void dispatch_io_barrier( + Dartdispatch_io_t channel, + Dartdispatch_block_t barrier, ) { - return _CFURLCreateByResolvingBookmarkData( - allocator, - bookmark, - options, - relativeToURL, - resourcePropertiesToInclude, - isStale, - error, + return _dispatch_io_barrier( + channel.ref.pointer, + barrier.ref.pointer, ); } - late final _CFURLCreateByResolvingBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function( - CFAllocatorRef, - CFDataRef, - ffi.Int32, - CFURLRef, - CFArrayRef, - ffi.Pointer, - ffi.Pointer)>>('CFURLCreateByResolvingBookmarkData'); - late final _CFURLCreateByResolvingBookmarkData = - _CFURLCreateByResolvingBookmarkDataPtr.asFunction< - CFURLRef Function(CFAllocatorRef, CFDataRef, int, CFURLRef, - CFArrayRef, ffi.Pointer, ffi.Pointer)>(); + late final _dispatch_io_barrierPtr = _lookup< + ffi + .NativeFunction>( + 'dispatch_io_barrier'); + late final _dispatch_io_barrier = _dispatch_io_barrierPtr + .asFunction(); - CFDictionaryRef CFURLCreateResourcePropertiesForKeysFromBookmarkData( - CFAllocatorRef allocator, - CFArrayRef resourcePropertiesToReturn, - CFDataRef bookmark, + Dartdispatch_fd_t dispatch_io_get_descriptor( + Dartdispatch_io_t channel, ) { - return _CFURLCreateResourcePropertiesForKeysFromBookmarkData( - allocator, - resourcePropertiesToReturn, - bookmark, + return _dispatch_io_get_descriptor( + channel.ref.pointer, ); } - late final _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>>( - 'CFURLCreateResourcePropertiesForKeysFromBookmarkData'); - late final _CFURLCreateResourcePropertiesForKeysFromBookmarkData = - _CFURLCreateResourcePropertiesForKeysFromBookmarkDataPtr.asFunction< - CFDictionaryRef Function(CFAllocatorRef, CFArrayRef, CFDataRef)>(); + late final _dispatch_io_get_descriptorPtr = + _lookup>( + 'dispatch_io_get_descriptor'); + late final _dispatch_io_get_descriptor = + _dispatch_io_get_descriptorPtr.asFunction(); - CFTypeRef CFURLCreateResourcePropertyForKeyFromBookmarkData( - CFAllocatorRef allocator, - CFStringRef resourcePropertyKey, - CFDataRef bookmark, + void dispatch_io_set_high_water( + Dartdispatch_io_t channel, + int high_water, ) { - return _CFURLCreateResourcePropertyForKeyFromBookmarkData( - allocator, - resourcePropertyKey, - bookmark, + return _dispatch_io_set_high_water( + channel.ref.pointer, + high_water, ); } - late final _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFAllocatorRef, CFStringRef, - CFDataRef)>>('CFURLCreateResourcePropertyForKeyFromBookmarkData'); - late final _CFURLCreateResourcePropertyForKeyFromBookmarkData = - _CFURLCreateResourcePropertyForKeyFromBookmarkDataPtr.asFunction< - CFTypeRef Function(CFAllocatorRef, CFStringRef, CFDataRef)>(); + late final _dispatch_io_set_high_waterPtr = + _lookup>( + 'dispatch_io_set_high_water'); + late final _dispatch_io_set_high_water = _dispatch_io_set_high_waterPtr + .asFunction(); - CFDataRef CFURLCreateBookmarkDataFromFile( - CFAllocatorRef allocator, - CFURLRef fileURL, - ffi.Pointer errorRef, + void dispatch_io_set_low_water( + Dartdispatch_io_t channel, + int low_water, ) { - return _CFURLCreateBookmarkDataFromFile( - allocator, - fileURL, - errorRef, + return _dispatch_io_set_low_water( + channel.ref.pointer, + low_water, ); } - late final _CFURLCreateBookmarkDataFromFilePtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, CFURLRef, - ffi.Pointer)>>('CFURLCreateBookmarkDataFromFile'); - late final _CFURLCreateBookmarkDataFromFile = - _CFURLCreateBookmarkDataFromFilePtr.asFunction< - CFDataRef Function( - CFAllocatorRef, CFURLRef, ffi.Pointer)>(); + late final _dispatch_io_set_low_waterPtr = + _lookup>( + 'dispatch_io_set_low_water'); + late final _dispatch_io_set_low_water = _dispatch_io_set_low_waterPtr + .asFunction(); - int CFURLWriteBookmarkDataToFile( - CFDataRef bookmarkRef, - CFURLRef fileURL, - int options, - ffi.Pointer errorRef, + void dispatch_io_set_interval( + Dartdispatch_io_t channel, + int interval, + Dartdispatch_io_interval_flags_t flags, ) { - return _CFURLWriteBookmarkDataToFile( - bookmarkRef, - fileURL, - options, - errorRef, + return _dispatch_io_set_interval( + channel.ref.pointer, + interval, + flags, ); } - late final _CFURLWriteBookmarkDataToFilePtr = _lookup< + late final _dispatch_io_set_intervalPtr = _lookup< ffi.NativeFunction< - Boolean Function( - CFDataRef, - CFURLRef, - CFURLBookmarkFileCreationOptions, - ffi.Pointer)>>('CFURLWriteBookmarkDataToFile'); - late final _CFURLWriteBookmarkDataToFile = - _CFURLWriteBookmarkDataToFilePtr.asFunction< - int Function(CFDataRef, CFURLRef, int, ffi.Pointer)>(); + ffi.Void Function(dispatch_io_t, ffi.Uint64, + dispatch_io_interval_flags_t)>>('dispatch_io_set_interval'); + late final _dispatch_io_set_interval = _dispatch_io_set_intervalPtr + .asFunction(); - CFDataRef CFURLCreateBookmarkDataFromAliasRecord( - CFAllocatorRef allocatorRef, - CFDataRef aliasRecordDataRef, + Dartdispatch_workloop_t dispatch_workloop_create( + ffi.Pointer label, ) { - return _CFURLCreateBookmarkDataFromAliasRecord( - allocatorRef, - aliasRecordDataRef, - ); + return objc.NSObject.castFromPointer( + _dispatch_workloop_create( + label, + ), + retain: false, + release: true); } - late final _CFURLCreateBookmarkDataFromAliasRecordPtr = _lookup< - ffi.NativeFunction>( - 'CFURLCreateBookmarkDataFromAliasRecord'); - late final _CFURLCreateBookmarkDataFromAliasRecord = - _CFURLCreateBookmarkDataFromAliasRecordPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFDataRef)>(); + late final _dispatch_workloop_createPtr = _lookup< + ffi + .NativeFunction)>>( + 'dispatch_workloop_create'); + late final _dispatch_workloop_create = _dispatch_workloop_createPtr + .asFunction)>(); - int CFURLStartAccessingSecurityScopedResource( - CFURLRef url, + Dartdispatch_workloop_t dispatch_workloop_create_inactive( + ffi.Pointer label, ) { - return _CFURLStartAccessingSecurityScopedResource( - url, - ); + return objc.NSObject.castFromPointer( + _dispatch_workloop_create_inactive( + label, + ), + retain: false, + release: true); } - late final _CFURLStartAccessingSecurityScopedResourcePtr = - _lookup>( - 'CFURLStartAccessingSecurityScopedResource'); - late final _CFURLStartAccessingSecurityScopedResource = - _CFURLStartAccessingSecurityScopedResourcePtr.asFunction< - int Function(CFURLRef)>(); + late final _dispatch_workloop_create_inactivePtr = _lookup< + ffi + .NativeFunction)>>( + 'dispatch_workloop_create_inactive'); + late final _dispatch_workloop_create_inactive = + _dispatch_workloop_create_inactivePtr + .asFunction)>(); - void CFURLStopAccessingSecurityScopedResource( - CFURLRef url, + void dispatch_workloop_set_autorelease_frequency( + Dartdispatch_workloop_t workloop, + dispatch_autorelease_frequency_t frequency, ) { - return _CFURLStopAccessingSecurityScopedResource( - url, + return _dispatch_workloop_set_autorelease_frequency( + workloop.ref.pointer, + frequency.value, ); } - late final _CFURLStopAccessingSecurityScopedResourcePtr = - _lookup>( - 'CFURLStopAccessingSecurityScopedResource'); - late final _CFURLStopAccessingSecurityScopedResource = - _CFURLStopAccessingSecurityScopedResourcePtr.asFunction< - void Function(CFURLRef)>(); - - late final ffi.Pointer _kCFRunLoopDefaultMode = - _lookup('kCFRunLoopDefaultMode'); - - CFRunLoopMode get kCFRunLoopDefaultMode => _kCFRunLoopDefaultMode.value; - - late final ffi.Pointer _kCFRunLoopCommonModes = - _lookup('kCFRunLoopCommonModes'); - - CFRunLoopMode get kCFRunLoopCommonModes => _kCFRunLoopCommonModes.value; + late final _dispatch_workloop_set_autorelease_frequencyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_workloop_t, ffi.UnsignedLong)>>( + 'dispatch_workloop_set_autorelease_frequency'); + late final _dispatch_workloop_set_autorelease_frequency = + _dispatch_workloop_set_autorelease_frequencyPtr + .asFunction(); - int CFRunLoopGetTypeID() { - return _CFRunLoopGetTypeID(); + void dispatch_workloop_set_os_workgroup( + Dartdispatch_workloop_t workloop, + Dartos_workgroup_t workgroup, + ) { + return _dispatch_workloop_set_os_workgroup( + workloop.ref.pointer, + workgroup.ref.pointer, + ); } - late final _CFRunLoopGetTypeIDPtr = - _lookup>('CFRunLoopGetTypeID'); - late final _CFRunLoopGetTypeID = - _CFRunLoopGetTypeIDPtr.asFunction(); + late final _dispatch_workloop_set_os_workgroupPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(dispatch_workloop_t, + os_workgroup_t)>>('dispatch_workloop_set_os_workgroup'); + late final _dispatch_workloop_set_os_workgroup = + _dispatch_workloop_set_os_workgroupPtr + .asFunction(); - CFRunLoopRef CFRunLoopGetCurrent() { - return _CFRunLoopGetCurrent(); + int CFReadStreamGetTypeID() { + return _CFReadStreamGetTypeID(); } - late final _CFRunLoopGetCurrentPtr = - _lookup>( - 'CFRunLoopGetCurrent'); - late final _CFRunLoopGetCurrent = - _CFRunLoopGetCurrentPtr.asFunction(); + late final _CFReadStreamGetTypeIDPtr = + _lookup>('CFReadStreamGetTypeID'); + late final _CFReadStreamGetTypeID = + _CFReadStreamGetTypeIDPtr.asFunction(); - CFRunLoopRef CFRunLoopGetMain() { - return _CFRunLoopGetMain(); + int CFWriteStreamGetTypeID() { + return _CFWriteStreamGetTypeID(); } - late final _CFRunLoopGetMainPtr = - _lookup>('CFRunLoopGetMain'); - late final _CFRunLoopGetMain = - _CFRunLoopGetMainPtr.asFunction(); + late final _CFWriteStreamGetTypeIDPtr = + _lookup>( + 'CFWriteStreamGetTypeID'); + late final _CFWriteStreamGetTypeID = + _CFWriteStreamGetTypeIDPtr.asFunction(); - CFRunLoopMode CFRunLoopCopyCurrentMode( - CFRunLoopRef rl, - ) { - return _CFRunLoopCopyCurrentMode( - rl, - ); - } + late final ffi.Pointer _kCFStreamPropertyDataWritten = + _lookup('kCFStreamPropertyDataWritten'); - late final _CFRunLoopCopyCurrentModePtr = - _lookup>( - 'CFRunLoopCopyCurrentMode'); - late final _CFRunLoopCopyCurrentMode = _CFRunLoopCopyCurrentModePtr - .asFunction(); + CFStreamPropertyKey get kCFStreamPropertyDataWritten => + _kCFStreamPropertyDataWritten.value; - CFArrayRef CFRunLoopCopyAllModes( - CFRunLoopRef rl, + CFReadStreamRef CFReadStreamCreateWithBytesNoCopy( + CFAllocatorRef alloc, + ffi.Pointer bytes, + int length, + CFAllocatorRef bytesDeallocator, ) { - return _CFRunLoopCopyAllModes( - rl, + return _CFReadStreamCreateWithBytesNoCopy( + alloc, + bytes, + length, + bytesDeallocator, ); } - late final _CFRunLoopCopyAllModesPtr = - _lookup>( - 'CFRunLoopCopyAllModes'); - late final _CFRunLoopCopyAllModes = - _CFRunLoopCopyAllModesPtr.asFunction(); + late final _CFReadStreamCreateWithBytesNoCopyPtr = _lookup< + ffi.NativeFunction< + CFReadStreamRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, + CFAllocatorRef)>>('CFReadStreamCreateWithBytesNoCopy'); + late final _CFReadStreamCreateWithBytesNoCopy = + _CFReadStreamCreateWithBytesNoCopyPtr.asFunction< + CFReadStreamRef Function( + CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); - void CFRunLoopAddCommonMode( - CFRunLoopRef rl, - CFRunLoopMode mode, + CFWriteStreamRef CFWriteStreamCreateWithBuffer( + CFAllocatorRef alloc, + ffi.Pointer buffer, + int bufferCapacity, ) { - return _CFRunLoopAddCommonMode( - rl, - mode, + return _CFWriteStreamCreateWithBuffer( + alloc, + buffer, + bufferCapacity, ); } - late final _CFRunLoopAddCommonModePtr = _lookup< - ffi.NativeFunction>( - 'CFRunLoopAddCommonMode'); - late final _CFRunLoopAddCommonMode = _CFRunLoopAddCommonModePtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopMode)>(); + late final _CFWriteStreamCreateWithBufferPtr = _lookup< + ffi.NativeFunction< + CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, + CFIndex)>>('CFWriteStreamCreateWithBuffer'); + late final _CFWriteStreamCreateWithBuffer = + _CFWriteStreamCreateWithBufferPtr.asFunction< + CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, int)>(); - double CFRunLoopGetNextTimerFireDate( - CFRunLoopRef rl, - CFRunLoopMode mode, + CFWriteStreamRef CFWriteStreamCreateWithAllocatedBuffers( + CFAllocatorRef alloc, + CFAllocatorRef bufferAllocator, ) { - return _CFRunLoopGetNextTimerFireDate( - rl, - mode, + return _CFWriteStreamCreateWithAllocatedBuffers( + alloc, + bufferAllocator, ); } - late final _CFRunLoopGetNextTimerFireDatePtr = _lookup< + late final _CFWriteStreamCreateWithAllocatedBuffersPtr = _lookup< ffi.NativeFunction< - CFAbsoluteTime Function( - CFRunLoopRef, CFRunLoopMode)>>('CFRunLoopGetNextTimerFireDate'); - late final _CFRunLoopGetNextTimerFireDate = _CFRunLoopGetNextTimerFireDatePtr - .asFunction(); - - void CFRunLoopRun() { - return _CFRunLoopRun(); - } - - late final _CFRunLoopRunPtr = - _lookup>('CFRunLoopRun'); - late final _CFRunLoopRun = _CFRunLoopRunPtr.asFunction(); + CFWriteStreamRef Function(CFAllocatorRef, + CFAllocatorRef)>>('CFWriteStreamCreateWithAllocatedBuffers'); + late final _CFWriteStreamCreateWithAllocatedBuffers = + _CFWriteStreamCreateWithAllocatedBuffersPtr.asFunction< + CFWriteStreamRef Function(CFAllocatorRef, CFAllocatorRef)>(); - int CFRunLoopRunInMode( - CFRunLoopMode mode, - double seconds, - int returnAfterSourceHandled, + CFReadStreamRef CFReadStreamCreateWithFile( + CFAllocatorRef alloc, + CFURLRef fileURL, ) { - return _CFRunLoopRunInMode( - mode, - seconds, - returnAfterSourceHandled, + return _CFReadStreamCreateWithFile( + alloc, + fileURL, ); } - late final _CFRunLoopRunInModePtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - CFRunLoopMode, CFTimeInterval, Boolean)>>('CFRunLoopRunInMode'); - late final _CFRunLoopRunInMode = _CFRunLoopRunInModePtr.asFunction< - int Function(CFRunLoopMode, double, int)>(); + late final _CFReadStreamCreateWithFilePtr = _lookup< + ffi + .NativeFunction>( + 'CFReadStreamCreateWithFile'); + late final _CFReadStreamCreateWithFile = _CFReadStreamCreateWithFilePtr + .asFunction(); - int CFRunLoopIsWaiting( - CFRunLoopRef rl, + CFWriteStreamRef CFWriteStreamCreateWithFile( + CFAllocatorRef alloc, + CFURLRef fileURL, ) { - return _CFRunLoopIsWaiting( - rl, + return _CFWriteStreamCreateWithFile( + alloc, + fileURL, ); } - late final _CFRunLoopIsWaitingPtr = - _lookup>( - 'CFRunLoopIsWaiting'); - late final _CFRunLoopIsWaiting = - _CFRunLoopIsWaitingPtr.asFunction(); + late final _CFWriteStreamCreateWithFilePtr = _lookup< + ffi + .NativeFunction>( + 'CFWriteStreamCreateWithFile'); + late final _CFWriteStreamCreateWithFile = _CFWriteStreamCreateWithFilePtr + .asFunction(); - void CFRunLoopWakeUp( - CFRunLoopRef rl, + void CFStreamCreateBoundPair( + CFAllocatorRef alloc, + ffi.Pointer readStream, + ffi.Pointer writeStream, + int transferBufferSize, ) { - return _CFRunLoopWakeUp( - rl, + return _CFStreamCreateBoundPair( + alloc, + readStream, + writeStream, + transferBufferSize, ); } - late final _CFRunLoopWakeUpPtr = - _lookup>( - 'CFRunLoopWakeUp'); - late final _CFRunLoopWakeUp = - _CFRunLoopWakeUpPtr.asFunction(); + late final _CFStreamCreateBoundPairPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef, + ffi.Pointer, + ffi.Pointer, + CFIndex)>>('CFStreamCreateBoundPair'); + late final _CFStreamCreateBoundPair = _CFStreamCreateBoundPairPtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer, + ffi.Pointer, int)>(); - void CFRunLoopStop( - CFRunLoopRef rl, - ) { - return _CFRunLoopStop( - rl, - ); - } + late final ffi.Pointer _kCFStreamPropertyAppendToFile = + _lookup('kCFStreamPropertyAppendToFile'); - late final _CFRunLoopStopPtr = - _lookup>( - 'CFRunLoopStop'); - late final _CFRunLoopStop = - _CFRunLoopStopPtr.asFunction(); + CFStreamPropertyKey get kCFStreamPropertyAppendToFile => + _kCFStreamPropertyAppendToFile.value; - void CFRunLoopPerformBlock( - CFRunLoopRef rl, - CFTypeRef mode, - ObjCBlock_ffiVoid block, - ) { - return _CFRunLoopPerformBlock( - rl, - mode, - block._id, - ); - } + late final ffi.Pointer + _kCFStreamPropertyFileCurrentOffset = + _lookup('kCFStreamPropertyFileCurrentOffset'); - late final _CFRunLoopPerformBlockPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFTypeRef, - ffi.Pointer<_ObjCBlock>)>>('CFRunLoopPerformBlock'); - late final _CFRunLoopPerformBlock = _CFRunLoopPerformBlockPtr.asFunction< - void Function(CFRunLoopRef, CFTypeRef, ffi.Pointer<_ObjCBlock>)>(); + CFStreamPropertyKey get kCFStreamPropertyFileCurrentOffset => + _kCFStreamPropertyFileCurrentOffset.value; - int CFRunLoopContainsSource( - CFRunLoopRef rl, - CFRunLoopSourceRef source, - CFRunLoopMode mode, - ) { - return _CFRunLoopContainsSource( - rl, - source, - mode, - ); - } + late final ffi.Pointer + _kCFStreamPropertySocketNativeHandle = + _lookup('kCFStreamPropertySocketNativeHandle'); - late final _CFRunLoopContainsSourcePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFRunLoopRef, CFRunLoopSourceRef, - CFRunLoopMode)>>('CFRunLoopContainsSource'); - late final _CFRunLoopContainsSource = _CFRunLoopContainsSourcePtr.asFunction< - int Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + CFStreamPropertyKey get kCFStreamPropertySocketNativeHandle => + _kCFStreamPropertySocketNativeHandle.value; - void CFRunLoopAddSource( - CFRunLoopRef rl, - CFRunLoopSourceRef source, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddSource( - rl, - source, - mode, - ); - } + late final ffi.Pointer + _kCFStreamPropertySocketRemoteHostName = + _lookup('kCFStreamPropertySocketRemoteHostName'); - late final _CFRunLoopAddSourcePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, - CFRunLoopMode)>>('CFRunLoopAddSource'); - late final _CFRunLoopAddSource = _CFRunLoopAddSourcePtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + CFStreamPropertyKey get kCFStreamPropertySocketRemoteHostName => + _kCFStreamPropertySocketRemoteHostName.value; - void CFRunLoopRemoveSource( - CFRunLoopRef rl, - CFRunLoopSourceRef source, - CFRunLoopMode mode, - ) { - return _CFRunLoopRemoveSource( - rl, - source, - mode, - ); - } + late final ffi.Pointer + _kCFStreamPropertySocketRemotePortNumber = + _lookup('kCFStreamPropertySocketRemotePortNumber'); - late final _CFRunLoopRemoveSourcePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopSourceRef, - CFRunLoopMode)>>('CFRunLoopRemoveSource'); - late final _CFRunLoopRemoveSource = _CFRunLoopRemoveSourcePtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopSourceRef, CFRunLoopMode)>(); + CFStreamPropertyKey get kCFStreamPropertySocketRemotePortNumber => + _kCFStreamPropertySocketRemotePortNumber.value; - int CFRunLoopContainsObserver( - CFRunLoopRef rl, - CFRunLoopObserverRef observer, - CFRunLoopMode mode, - ) { - return _CFRunLoopContainsObserver( - rl, - observer, - mode, - ); - } + late final ffi.Pointer _kCFStreamErrorDomainSOCKS = + _lookup('kCFStreamErrorDomainSOCKS'); - late final _CFRunLoopContainsObserverPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFRunLoopRef, CFRunLoopObserverRef, - CFRunLoopMode)>>('CFRunLoopContainsObserver'); - late final _CFRunLoopContainsObserver = - _CFRunLoopContainsObserverPtr.asFunction< - int Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + int get kCFStreamErrorDomainSOCKS => _kCFStreamErrorDomainSOCKS.value; - void CFRunLoopAddObserver( - CFRunLoopRef rl, - CFRunLoopObserverRef observer, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddObserver( - rl, - observer, - mode, - ); - } + late final ffi.Pointer _kCFStreamPropertySOCKSProxy = + _lookup('kCFStreamPropertySOCKSProxy'); - late final _CFRunLoopAddObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, - CFRunLoopMode)>>('CFRunLoopAddObserver'); - late final _CFRunLoopAddObserver = _CFRunLoopAddObserverPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + CFStringRef get kCFStreamPropertySOCKSProxy => + _kCFStreamPropertySOCKSProxy.value; - void CFRunLoopRemoveObserver( - CFRunLoopRef rl, - CFRunLoopObserverRef observer, - CFRunLoopMode mode, - ) { - return _CFRunLoopRemoveObserver( - rl, - observer, - mode, - ); - } + set kCFStreamPropertySOCKSProxy(CFStringRef value) => + _kCFStreamPropertySOCKSProxy.value = value; - late final _CFRunLoopRemoveObserverPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopObserverRef, - CFRunLoopMode)>>('CFRunLoopRemoveObserver'); - late final _CFRunLoopRemoveObserver = _CFRunLoopRemoveObserverPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopObserverRef, CFRunLoopMode)>(); + late final ffi.Pointer _kCFStreamPropertySOCKSProxyHost = + _lookup('kCFStreamPropertySOCKSProxyHost'); - int CFRunLoopContainsTimer( - CFRunLoopRef rl, - CFRunLoopTimerRef timer, - CFRunLoopMode mode, - ) { - return _CFRunLoopContainsTimer( - rl, - timer, - mode, - ); - } + CFStringRef get kCFStreamPropertySOCKSProxyHost => + _kCFStreamPropertySOCKSProxyHost.value; - late final _CFRunLoopContainsTimerPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFRunLoopRef, CFRunLoopTimerRef, - CFRunLoopMode)>>('CFRunLoopContainsTimer'); - late final _CFRunLoopContainsTimer = _CFRunLoopContainsTimerPtr.asFunction< - int Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + set kCFStreamPropertySOCKSProxyHost(CFStringRef value) => + _kCFStreamPropertySOCKSProxyHost.value = value; - void CFRunLoopAddTimer( - CFRunLoopRef rl, - CFRunLoopTimerRef timer, - CFRunLoopMode mode, - ) { - return _CFRunLoopAddTimer( - rl, - timer, - mode, - ); - } + late final ffi.Pointer _kCFStreamPropertySOCKSProxyPort = + _lookup('kCFStreamPropertySOCKSProxyPort'); - late final _CFRunLoopAddTimerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, - CFRunLoopMode)>>('CFRunLoopAddTimer'); - late final _CFRunLoopAddTimer = _CFRunLoopAddTimerPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + CFStringRef get kCFStreamPropertySOCKSProxyPort => + _kCFStreamPropertySOCKSProxyPort.value; - void CFRunLoopRemoveTimer( - CFRunLoopRef rl, - CFRunLoopTimerRef timer, - CFRunLoopMode mode, - ) { - return _CFRunLoopRemoveTimer( - rl, - timer, - mode, - ); - } + set kCFStreamPropertySOCKSProxyPort(CFStringRef value) => + _kCFStreamPropertySOCKSProxyPort.value = value; - late final _CFRunLoopRemoveTimerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopRef, CFRunLoopTimerRef, - CFRunLoopMode)>>('CFRunLoopRemoveTimer'); - late final _CFRunLoopRemoveTimer = _CFRunLoopRemoveTimerPtr.asFunction< - void Function(CFRunLoopRef, CFRunLoopTimerRef, CFRunLoopMode)>(); + late final ffi.Pointer _kCFStreamPropertySOCKSVersion = + _lookup('kCFStreamPropertySOCKSVersion'); - int CFRunLoopSourceGetTypeID() { - return _CFRunLoopSourceGetTypeID(); - } + CFStringRef get kCFStreamPropertySOCKSVersion => + _kCFStreamPropertySOCKSVersion.value; - late final _CFRunLoopSourceGetTypeIDPtr = - _lookup>( - 'CFRunLoopSourceGetTypeID'); - late final _CFRunLoopSourceGetTypeID = - _CFRunLoopSourceGetTypeIDPtr.asFunction(); + set kCFStreamPropertySOCKSVersion(CFStringRef value) => + _kCFStreamPropertySOCKSVersion.value = value; - CFRunLoopSourceRef CFRunLoopSourceCreate( - CFAllocatorRef allocator, - int order, - ffi.Pointer context, - ) { - return _CFRunLoopSourceCreate( - allocator, - order, - context, - ); - } + late final ffi.Pointer _kCFStreamSocketSOCKSVersion4 = + _lookup('kCFStreamSocketSOCKSVersion4'); - late final _CFRunLoopSourceCreatePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFRunLoopSourceCreate'); - late final _CFRunLoopSourceCreate = _CFRunLoopSourceCreatePtr.asFunction< - CFRunLoopSourceRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + CFStringRef get kCFStreamSocketSOCKSVersion4 => + _kCFStreamSocketSOCKSVersion4.value; - int CFRunLoopSourceGetOrder( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceGetOrder( - source, - ); - } + set kCFStreamSocketSOCKSVersion4(CFStringRef value) => + _kCFStreamSocketSOCKSVersion4.value = value; - late final _CFRunLoopSourceGetOrderPtr = - _lookup>( - 'CFRunLoopSourceGetOrder'); - late final _CFRunLoopSourceGetOrder = _CFRunLoopSourceGetOrderPtr.asFunction< - int Function(CFRunLoopSourceRef)>(); + late final ffi.Pointer _kCFStreamSocketSOCKSVersion5 = + _lookup('kCFStreamSocketSOCKSVersion5'); - void CFRunLoopSourceInvalidate( - CFRunLoopSourceRef source, - ) { - return _CFRunLoopSourceInvalidate( - source, - ); - } + CFStringRef get kCFStreamSocketSOCKSVersion5 => + _kCFStreamSocketSOCKSVersion5.value; - late final _CFRunLoopSourceInvalidatePtr = - _lookup>( - 'CFRunLoopSourceInvalidate'); - late final _CFRunLoopSourceInvalidate = _CFRunLoopSourceInvalidatePtr - .asFunction(); + set kCFStreamSocketSOCKSVersion5(CFStringRef value) => + _kCFStreamSocketSOCKSVersion5.value = value; - int CFRunLoopSourceIsValid( - CFRunLoopSourceRef source, + late final ffi.Pointer _kCFStreamPropertySOCKSUser = + _lookup('kCFStreamPropertySOCKSUser'); + + CFStringRef get kCFStreamPropertySOCKSUser => + _kCFStreamPropertySOCKSUser.value; + + set kCFStreamPropertySOCKSUser(CFStringRef value) => + _kCFStreamPropertySOCKSUser.value = value; + + late final ffi.Pointer _kCFStreamPropertySOCKSPassword = + _lookup('kCFStreamPropertySOCKSPassword'); + + CFStringRef get kCFStreamPropertySOCKSPassword => + _kCFStreamPropertySOCKSPassword.value; + + set kCFStreamPropertySOCKSPassword(CFStringRef value) => + _kCFStreamPropertySOCKSPassword.value = value; + + late final ffi.Pointer _kCFStreamErrorDomainSSL = + _lookup('kCFStreamErrorDomainSSL'); + + int get kCFStreamErrorDomainSSL => _kCFStreamErrorDomainSSL.value; + + late final ffi.Pointer _kCFStreamPropertySocketSecurityLevel = + _lookup('kCFStreamPropertySocketSecurityLevel'); + + CFStringRef get kCFStreamPropertySocketSecurityLevel => + _kCFStreamPropertySocketSecurityLevel.value; + + set kCFStreamPropertySocketSecurityLevel(CFStringRef value) => + _kCFStreamPropertySocketSecurityLevel.value = value; + + late final ffi.Pointer _kCFStreamSocketSecurityLevelNone = + _lookup('kCFStreamSocketSecurityLevelNone'); + + CFStringRef get kCFStreamSocketSecurityLevelNone => + _kCFStreamSocketSecurityLevelNone.value; + + set kCFStreamSocketSecurityLevelNone(CFStringRef value) => + _kCFStreamSocketSecurityLevelNone.value = value; + + late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv2 = + _lookup('kCFStreamSocketSecurityLevelSSLv2'); + + CFStringRef get kCFStreamSocketSecurityLevelSSLv2 => + _kCFStreamSocketSecurityLevelSSLv2.value; + + set kCFStreamSocketSecurityLevelSSLv2(CFStringRef value) => + _kCFStreamSocketSecurityLevelSSLv2.value = value; + + late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv3 = + _lookup('kCFStreamSocketSecurityLevelSSLv3'); + + CFStringRef get kCFStreamSocketSecurityLevelSSLv3 => + _kCFStreamSocketSecurityLevelSSLv3.value; + + set kCFStreamSocketSecurityLevelSSLv3(CFStringRef value) => + _kCFStreamSocketSecurityLevelSSLv3.value = value; + + late final ffi.Pointer _kCFStreamSocketSecurityLevelTLSv1 = + _lookup('kCFStreamSocketSecurityLevelTLSv1'); + + CFStringRef get kCFStreamSocketSecurityLevelTLSv1 => + _kCFStreamSocketSecurityLevelTLSv1.value; + + set kCFStreamSocketSecurityLevelTLSv1(CFStringRef value) => + _kCFStreamSocketSecurityLevelTLSv1.value = value; + + late final ffi.Pointer + _kCFStreamSocketSecurityLevelNegotiatedSSL = + _lookup('kCFStreamSocketSecurityLevelNegotiatedSSL'); + + CFStringRef get kCFStreamSocketSecurityLevelNegotiatedSSL => + _kCFStreamSocketSecurityLevelNegotiatedSSL.value; + + set kCFStreamSocketSecurityLevelNegotiatedSSL(CFStringRef value) => + _kCFStreamSocketSecurityLevelNegotiatedSSL.value = value; + + late final ffi.Pointer + _kCFStreamPropertyShouldCloseNativeSocket = + _lookup('kCFStreamPropertyShouldCloseNativeSocket'); + + CFStringRef get kCFStreamPropertyShouldCloseNativeSocket => + _kCFStreamPropertyShouldCloseNativeSocket.value; + + set kCFStreamPropertyShouldCloseNativeSocket(CFStringRef value) => + _kCFStreamPropertyShouldCloseNativeSocket.value = value; + + void CFStreamCreatePairWithSocket( + CFAllocatorRef alloc, + int sock, + ffi.Pointer readStream, + ffi.Pointer writeStream, ) { - return _CFRunLoopSourceIsValid( - source, + return _CFStreamCreatePairWithSocket( + alloc, + sock, + readStream, + writeStream, ); } - late final _CFRunLoopSourceIsValidPtr = - _lookup>( - 'CFRunLoopSourceIsValid'); - late final _CFRunLoopSourceIsValid = - _CFRunLoopSourceIsValidPtr.asFunction(); + late final _CFStreamCreatePairWithSocketPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef, + CFSocketNativeHandle, + ffi.Pointer, + ffi.Pointer)>>('CFStreamCreatePairWithSocket'); + late final _CFStreamCreatePairWithSocket = + _CFStreamCreatePairWithSocketPtr.asFunction< + void Function(CFAllocatorRef, int, ffi.Pointer, + ffi.Pointer)>(); - void CFRunLoopSourceGetContext( - CFRunLoopSourceRef source, - ffi.Pointer context, + void CFStreamCreatePairWithSocketToHost( + CFAllocatorRef alloc, + CFStringRef host, + int port, + ffi.Pointer readStream, + ffi.Pointer writeStream, ) { - return _CFRunLoopSourceGetContext( - source, - context, + return _CFStreamCreatePairWithSocketToHost( + alloc, + host, + port, + readStream, + writeStream, ); } - late final _CFRunLoopSourceGetContextPtr = _lookup< + late final _CFStreamCreatePairWithSocketToHostPtr = _lookup< ffi.NativeFunction< ffi.Void Function( - CFRunLoopSourceRef, ffi.Pointer)>>( - 'CFRunLoopSourceGetContext'); - late final _CFRunLoopSourceGetContext = - _CFRunLoopSourceGetContextPtr.asFunction< - void Function( - CFRunLoopSourceRef, ffi.Pointer)>(); + CFAllocatorRef, + CFStringRef, + UInt32, + ffi.Pointer, + ffi.Pointer)>>( + 'CFStreamCreatePairWithSocketToHost'); + late final _CFStreamCreatePairWithSocketToHost = + _CFStreamCreatePairWithSocketToHostPtr.asFunction< + void Function(CFAllocatorRef, CFStringRef, int, + ffi.Pointer, ffi.Pointer)>(); - void CFRunLoopSourceSignal( - CFRunLoopSourceRef source, + void CFStreamCreatePairWithPeerSocketSignature( + CFAllocatorRef alloc, + ffi.Pointer signature, + ffi.Pointer readStream, + ffi.Pointer writeStream, ) { - return _CFRunLoopSourceSignal( - source, + return _CFStreamCreatePairWithPeerSocketSignature( + alloc, + signature, + readStream, + writeStream, ); } - late final _CFRunLoopSourceSignalPtr = - _lookup>( - 'CFRunLoopSourceSignal'); - late final _CFRunLoopSourceSignal = - _CFRunLoopSourceSignalPtr.asFunction(); + late final _CFStreamCreatePairWithPeerSocketSignaturePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>( + 'CFStreamCreatePairWithPeerSocketSignature'); + late final _CFStreamCreatePairWithPeerSocketSignature = + _CFStreamCreatePairWithPeerSocketSignaturePtr.asFunction< + void Function(CFAllocatorRef, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - int CFRunLoopObserverGetTypeID() { - return _CFRunLoopObserverGetTypeID(); + CFStreamStatus CFReadStreamGetStatus( + CFReadStreamRef stream, + ) { + return CFStreamStatus.fromValue(_CFReadStreamGetStatus( + stream, + )); } - late final _CFRunLoopObserverGetTypeIDPtr = - _lookup>( - 'CFRunLoopObserverGetTypeID'); - late final _CFRunLoopObserverGetTypeID = - _CFRunLoopObserverGetTypeIDPtr.asFunction(); + late final _CFReadStreamGetStatusPtr = + _lookup>( + 'CFReadStreamGetStatus'); + late final _CFReadStreamGetStatus = + _CFReadStreamGetStatusPtr.asFunction(); - CFRunLoopObserverRef CFRunLoopObserverCreate( - CFAllocatorRef allocator, - int activities, - int repeats, - int order, - CFRunLoopObserverCallBack callout, - ffi.Pointer context, + CFStreamStatus CFWriteStreamGetStatus( + CFWriteStreamRef stream, ) { - return _CFRunLoopObserverCreate( - allocator, - activities, - repeats, - order, - callout, - context, - ); + return CFStreamStatus.fromValue(_CFWriteStreamGetStatus( + stream, + )); } - late final _CFRunLoopObserverCreatePtr = _lookup< - ffi.NativeFunction< - CFRunLoopObserverRef Function( - CFAllocatorRef, - CFOptionFlags, - Boolean, - CFIndex, - CFRunLoopObserverCallBack, - ffi.Pointer)>>( - 'CFRunLoopObserverCreate'); - late final _CFRunLoopObserverCreate = _CFRunLoopObserverCreatePtr.asFunction< - CFRunLoopObserverRef Function(CFAllocatorRef, int, int, int, - CFRunLoopObserverCallBack, ffi.Pointer)>(); + late final _CFWriteStreamGetStatusPtr = + _lookup>( + 'CFWriteStreamGetStatus'); + late final _CFWriteStreamGetStatus = + _CFWriteStreamGetStatusPtr.asFunction(); - CFRunLoopObserverRef CFRunLoopObserverCreateWithHandler( - CFAllocatorRef allocator, - DartCFOptionFlags activities, - DartBoolean repeats, - DartCFIndex order, - ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity block, + CFErrorRef CFReadStreamCopyError( + CFReadStreamRef stream, ) { - return _CFRunLoopObserverCreateWithHandler( - allocator, - activities, - repeats, - order, - block._id, + return _CFReadStreamCopyError( + stream, ); } - late final _CFRunLoopObserverCreateWithHandlerPtr = _lookup< - ffi.NativeFunction< - CFRunLoopObserverRef Function( - CFAllocatorRef, - CFOptionFlags, - Boolean, - CFIndex, - ffi.Pointer<_ObjCBlock>)>>('CFRunLoopObserverCreateWithHandler'); - late final _CFRunLoopObserverCreateWithHandler = - _CFRunLoopObserverCreateWithHandlerPtr.asFunction< - CFRunLoopObserverRef Function( - CFAllocatorRef, int, int, int, ffi.Pointer<_ObjCBlock>)>(); + late final _CFReadStreamCopyErrorPtr = + _lookup>( + 'CFReadStreamCopyError'); + late final _CFReadStreamCopyError = _CFReadStreamCopyErrorPtr.asFunction< + CFErrorRef Function(CFReadStreamRef)>(); - int CFRunLoopObserverGetActivities( - CFRunLoopObserverRef observer, + CFErrorRef CFWriteStreamCopyError( + CFWriteStreamRef stream, ) { - return _CFRunLoopObserverGetActivities( - observer, + return _CFWriteStreamCopyError( + stream, ); } - late final _CFRunLoopObserverGetActivitiesPtr = - _lookup>( - 'CFRunLoopObserverGetActivities'); - late final _CFRunLoopObserverGetActivities = - _CFRunLoopObserverGetActivitiesPtr.asFunction< - int Function(CFRunLoopObserverRef)>(); + late final _CFWriteStreamCopyErrorPtr = + _lookup>( + 'CFWriteStreamCopyError'); + late final _CFWriteStreamCopyError = _CFWriteStreamCopyErrorPtr.asFunction< + CFErrorRef Function(CFWriteStreamRef)>(); - int CFRunLoopObserverDoesRepeat( - CFRunLoopObserverRef observer, + int CFReadStreamOpen( + CFReadStreamRef stream, ) { - return _CFRunLoopObserverDoesRepeat( - observer, + return _CFReadStreamOpen( + stream, ); } - late final _CFRunLoopObserverDoesRepeatPtr = - _lookup>( - 'CFRunLoopObserverDoesRepeat'); - late final _CFRunLoopObserverDoesRepeat = _CFRunLoopObserverDoesRepeatPtr - .asFunction(); + late final _CFReadStreamOpenPtr = + _lookup>( + 'CFReadStreamOpen'); + late final _CFReadStreamOpen = + _CFReadStreamOpenPtr.asFunction(); - int CFRunLoopObserverGetOrder( - CFRunLoopObserverRef observer, + int CFWriteStreamOpen( + CFWriteStreamRef stream, ) { - return _CFRunLoopObserverGetOrder( - observer, + return _CFWriteStreamOpen( + stream, ); } - late final _CFRunLoopObserverGetOrderPtr = - _lookup>( - 'CFRunLoopObserverGetOrder'); - late final _CFRunLoopObserverGetOrder = _CFRunLoopObserverGetOrderPtr - .asFunction(); + late final _CFWriteStreamOpenPtr = + _lookup>( + 'CFWriteStreamOpen'); + late final _CFWriteStreamOpen = + _CFWriteStreamOpenPtr.asFunction(); - void CFRunLoopObserverInvalidate( - CFRunLoopObserverRef observer, + void CFReadStreamClose( + CFReadStreamRef stream, ) { - return _CFRunLoopObserverInvalidate( - observer, + return _CFReadStreamClose( + stream, ); } - late final _CFRunLoopObserverInvalidatePtr = - _lookup>( - 'CFRunLoopObserverInvalidate'); - late final _CFRunLoopObserverInvalidate = _CFRunLoopObserverInvalidatePtr - .asFunction(); + late final _CFReadStreamClosePtr = + _lookup>( + 'CFReadStreamClose'); + late final _CFReadStreamClose = + _CFReadStreamClosePtr.asFunction(); - int CFRunLoopObserverIsValid( - CFRunLoopObserverRef observer, + void CFWriteStreamClose( + CFWriteStreamRef stream, ) { - return _CFRunLoopObserverIsValid( - observer, + return _CFWriteStreamClose( + stream, ); } - late final _CFRunLoopObserverIsValidPtr = - _lookup>( - 'CFRunLoopObserverIsValid'); - late final _CFRunLoopObserverIsValid = _CFRunLoopObserverIsValidPtr - .asFunction(); + late final _CFWriteStreamClosePtr = + _lookup>( + 'CFWriteStreamClose'); + late final _CFWriteStreamClose = + _CFWriteStreamClosePtr.asFunction(); - void CFRunLoopObserverGetContext( - CFRunLoopObserverRef observer, - ffi.Pointer context, + int CFReadStreamHasBytesAvailable( + CFReadStreamRef stream, ) { - return _CFRunLoopObserverGetContext( - observer, - context, + return _CFReadStreamHasBytesAvailable( + stream, ); } - late final _CFRunLoopObserverGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopObserverRef, - ffi.Pointer)>>( - 'CFRunLoopObserverGetContext'); - late final _CFRunLoopObserverGetContext = - _CFRunLoopObserverGetContextPtr.asFunction< - void Function( - CFRunLoopObserverRef, ffi.Pointer)>(); - - int CFRunLoopTimerGetTypeID() { - return _CFRunLoopTimerGetTypeID(); - } - - late final _CFRunLoopTimerGetTypeIDPtr = - _lookup>( - 'CFRunLoopTimerGetTypeID'); - late final _CFRunLoopTimerGetTypeID = - _CFRunLoopTimerGetTypeIDPtr.asFunction(); + late final _CFReadStreamHasBytesAvailablePtr = + _lookup>( + 'CFReadStreamHasBytesAvailable'); + late final _CFReadStreamHasBytesAvailable = _CFReadStreamHasBytesAvailablePtr + .asFunction(); - CFRunLoopTimerRef CFRunLoopTimerCreate( - CFAllocatorRef allocator, - double fireDate, - double interval, - int flags, - int order, - CFRunLoopTimerCallBack callout, - ffi.Pointer context, + int CFReadStreamRead( + CFReadStreamRef stream, + ffi.Pointer buffer, + int bufferLength, ) { - return _CFRunLoopTimerCreate( - allocator, - fireDate, - interval, - flags, - order, - callout, - context, + return _CFReadStreamRead( + stream, + buffer, + bufferLength, ); } - late final _CFRunLoopTimerCreatePtr = _lookup< + late final _CFReadStreamReadPtr = _lookup< ffi.NativeFunction< - CFRunLoopTimerRef Function( - CFAllocatorRef, - CFAbsoluteTime, - CFTimeInterval, - CFOptionFlags, - CFIndex, - CFRunLoopTimerCallBack, - ffi.Pointer)>>('CFRunLoopTimerCreate'); - late final _CFRunLoopTimerCreate = _CFRunLoopTimerCreatePtr.asFunction< - CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, - CFRunLoopTimerCallBack, ffi.Pointer)>(); + CFIndex Function(CFReadStreamRef, ffi.Pointer, + CFIndex)>>('CFReadStreamRead'); + late final _CFReadStreamRead = _CFReadStreamReadPtr.asFunction< + int Function(CFReadStreamRef, ffi.Pointer, int)>(); - CFRunLoopTimerRef CFRunLoopTimerCreateWithHandler( - CFAllocatorRef allocator, - DartCFTimeInterval fireDate, - DartCFTimeInterval interval, - DartCFOptionFlags flags, - DartCFIndex order, - ObjCBlock_ffiVoid_CFRunLoopTimerRef block, + ffi.Pointer CFReadStreamGetBuffer( + CFReadStreamRef stream, + int maxBytesToRead, + ffi.Pointer numBytesRead, ) { - return _CFRunLoopTimerCreateWithHandler( - allocator, - fireDate, - interval, - flags, - order, - block._id, + return _CFReadStreamGetBuffer( + stream, + maxBytesToRead, + numBytesRead, ); } - late final _CFRunLoopTimerCreateWithHandlerPtr = _lookup< + late final _CFReadStreamGetBufferPtr = _lookup< ffi.NativeFunction< - CFRunLoopTimerRef Function( - CFAllocatorRef, - CFAbsoluteTime, - CFTimeInterval, - CFOptionFlags, - CFIndex, - ffi.Pointer<_ObjCBlock>)>>('CFRunLoopTimerCreateWithHandler'); - late final _CFRunLoopTimerCreateWithHandler = - _CFRunLoopTimerCreateWithHandlerPtr.asFunction< - CFRunLoopTimerRef Function(CFAllocatorRef, double, double, int, int, - ffi.Pointer<_ObjCBlock>)>(); + ffi.Pointer Function(CFReadStreamRef, CFIndex, + ffi.Pointer)>>('CFReadStreamGetBuffer'); + late final _CFReadStreamGetBuffer = _CFReadStreamGetBufferPtr.asFunction< + ffi.Pointer Function( + CFReadStreamRef, int, ffi.Pointer)>(); - double CFRunLoopTimerGetNextFireDate( - CFRunLoopTimerRef timer, + int CFWriteStreamCanAcceptBytes( + CFWriteStreamRef stream, ) { - return _CFRunLoopTimerGetNextFireDate( - timer, + return _CFWriteStreamCanAcceptBytes( + stream, ); } - late final _CFRunLoopTimerGetNextFireDatePtr = - _lookup>( - 'CFRunLoopTimerGetNextFireDate'); - late final _CFRunLoopTimerGetNextFireDate = _CFRunLoopTimerGetNextFireDatePtr - .asFunction(); + late final _CFWriteStreamCanAcceptBytesPtr = + _lookup>( + 'CFWriteStreamCanAcceptBytes'); + late final _CFWriteStreamCanAcceptBytes = _CFWriteStreamCanAcceptBytesPtr + .asFunction(); - void CFRunLoopTimerSetNextFireDate( - CFRunLoopTimerRef timer, - double fireDate, + int CFWriteStreamWrite( + CFWriteStreamRef stream, + ffi.Pointer buffer, + int bufferLength, ) { - return _CFRunLoopTimerSetNextFireDate( - timer, - fireDate, + return _CFWriteStreamWrite( + stream, + buffer, + bufferLength, ); } - late final _CFRunLoopTimerSetNextFireDatePtr = _lookup< + late final _CFWriteStreamWritePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, - CFAbsoluteTime)>>('CFRunLoopTimerSetNextFireDate'); - late final _CFRunLoopTimerSetNextFireDate = _CFRunLoopTimerSetNextFireDatePtr - .asFunction(); + CFIndex Function(CFWriteStreamRef, ffi.Pointer, + CFIndex)>>('CFWriteStreamWrite'); + late final _CFWriteStreamWrite = _CFWriteStreamWritePtr.asFunction< + int Function(CFWriteStreamRef, ffi.Pointer, int)>(); - double CFRunLoopTimerGetInterval( - CFRunLoopTimerRef timer, + CFTypeRef CFReadStreamCopyProperty( + CFReadStreamRef stream, + CFStreamPropertyKey propertyName, ) { - return _CFRunLoopTimerGetInterval( - timer, + return _CFReadStreamCopyProperty( + stream, + propertyName, ); } - late final _CFRunLoopTimerGetIntervalPtr = - _lookup>( - 'CFRunLoopTimerGetInterval'); - late final _CFRunLoopTimerGetInterval = _CFRunLoopTimerGetIntervalPtr - .asFunction(); + late final _CFReadStreamCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFReadStreamRef, + CFStreamPropertyKey)>>('CFReadStreamCopyProperty'); + late final _CFReadStreamCopyProperty = _CFReadStreamCopyPropertyPtr + .asFunction(); - int CFRunLoopTimerDoesRepeat( - CFRunLoopTimerRef timer, + CFTypeRef CFWriteStreamCopyProperty( + CFWriteStreamRef stream, + CFStreamPropertyKey propertyName, ) { - return _CFRunLoopTimerDoesRepeat( - timer, + return _CFWriteStreamCopyProperty( + stream, + propertyName, ); } - late final _CFRunLoopTimerDoesRepeatPtr = - _lookup>( - 'CFRunLoopTimerDoesRepeat'); - late final _CFRunLoopTimerDoesRepeat = _CFRunLoopTimerDoesRepeatPtr - .asFunction(); + late final _CFWriteStreamCopyPropertyPtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFWriteStreamRef, + CFStreamPropertyKey)>>('CFWriteStreamCopyProperty'); + late final _CFWriteStreamCopyProperty = _CFWriteStreamCopyPropertyPtr + .asFunction(); - int CFRunLoopTimerGetOrder( - CFRunLoopTimerRef timer, + int CFReadStreamSetProperty( + CFReadStreamRef stream, + CFStreamPropertyKey propertyName, + CFTypeRef propertyValue, ) { - return _CFRunLoopTimerGetOrder( - timer, + return _CFReadStreamSetProperty( + stream, + propertyName, + propertyValue, ); } - late final _CFRunLoopTimerGetOrderPtr = - _lookup>( - 'CFRunLoopTimerGetOrder'); - late final _CFRunLoopTimerGetOrder = - _CFRunLoopTimerGetOrderPtr.asFunction(); + late final _CFReadStreamSetPropertyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFReadStreamRef, CFStreamPropertyKey, + CFTypeRef)>>('CFReadStreamSetProperty'); + late final _CFReadStreamSetProperty = _CFReadStreamSetPropertyPtr.asFunction< + int Function(CFReadStreamRef, CFStreamPropertyKey, CFTypeRef)>(); - void CFRunLoopTimerInvalidate( - CFRunLoopTimerRef timer, + int CFWriteStreamSetProperty( + CFWriteStreamRef stream, + CFStreamPropertyKey propertyName, + CFTypeRef propertyValue, ) { - return _CFRunLoopTimerInvalidate( - timer, + return _CFWriteStreamSetProperty( + stream, + propertyName, + propertyValue, ); } - late final _CFRunLoopTimerInvalidatePtr = - _lookup>( - 'CFRunLoopTimerInvalidate'); - late final _CFRunLoopTimerInvalidate = _CFRunLoopTimerInvalidatePtr - .asFunction(); + late final _CFWriteStreamSetPropertyPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFWriteStreamRef, CFStreamPropertyKey, + CFTypeRef)>>('CFWriteStreamSetProperty'); + late final _CFWriteStreamSetProperty = + _CFWriteStreamSetPropertyPtr.asFunction< + int Function(CFWriteStreamRef, CFStreamPropertyKey, CFTypeRef)>(); - int CFRunLoopTimerIsValid( - CFRunLoopTimerRef timer, + int CFReadStreamSetClient( + CFReadStreamRef stream, + int streamEvents, + CFReadStreamClientCallBack clientCB, + ffi.Pointer clientContext, ) { - return _CFRunLoopTimerIsValid( - timer, + return _CFReadStreamSetClient( + stream, + streamEvents, + clientCB, + clientContext, ); } - late final _CFRunLoopTimerIsValidPtr = - _lookup>( - 'CFRunLoopTimerIsValid'); - late final _CFRunLoopTimerIsValid = - _CFRunLoopTimerIsValidPtr.asFunction(); + late final _CFReadStreamSetClientPtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFReadStreamRef, + CFOptionFlags, + CFReadStreamClientCallBack, + ffi.Pointer)>>('CFReadStreamSetClient'); + late final _CFReadStreamSetClient = _CFReadStreamSetClientPtr.asFunction< + int Function(CFReadStreamRef, int, CFReadStreamClientCallBack, + ffi.Pointer)>(); - void CFRunLoopTimerGetContext( - CFRunLoopTimerRef timer, - ffi.Pointer context, + int CFWriteStreamSetClient( + CFWriteStreamRef stream, + int streamEvents, + CFWriteStreamClientCallBack clientCB, + ffi.Pointer clientContext, ) { - return _CFRunLoopTimerGetContext( - timer, - context, + return _CFWriteStreamSetClient( + stream, + streamEvents, + clientCB, + clientContext, ); } - late final _CFRunLoopTimerGetContextPtr = _lookup< + late final _CFWriteStreamSetClientPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, - ffi.Pointer)>>('CFRunLoopTimerGetContext'); - late final _CFRunLoopTimerGetContext = - _CFRunLoopTimerGetContextPtr.asFunction< - void Function( - CFRunLoopTimerRef, ffi.Pointer)>(); + Boolean Function( + CFWriteStreamRef, + CFOptionFlags, + CFWriteStreamClientCallBack, + ffi.Pointer)>>('CFWriteStreamSetClient'); + late final _CFWriteStreamSetClient = _CFWriteStreamSetClientPtr.asFunction< + int Function(CFWriteStreamRef, int, CFWriteStreamClientCallBack, + ffi.Pointer)>(); - double CFRunLoopTimerGetTolerance( - CFRunLoopTimerRef timer, + void CFReadStreamScheduleWithRunLoop( + CFReadStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, ) { - return _CFRunLoopTimerGetTolerance( - timer, + return _CFReadStreamScheduleWithRunLoop( + stream, + runLoop, + runLoopMode, ); } - late final _CFRunLoopTimerGetTolerancePtr = - _lookup>( - 'CFRunLoopTimerGetTolerance'); - late final _CFRunLoopTimerGetTolerance = _CFRunLoopTimerGetTolerancePtr - .asFunction(); + late final _CFReadStreamScheduleWithRunLoopPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFReadStreamScheduleWithRunLoop'); + late final _CFReadStreamScheduleWithRunLoop = + _CFReadStreamScheduleWithRunLoopPtr.asFunction< + void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - void CFRunLoopTimerSetTolerance( - CFRunLoopTimerRef timer, - double tolerance, + void CFWriteStreamScheduleWithRunLoop( + CFWriteStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, ) { - return _CFRunLoopTimerSetTolerance( - timer, - tolerance, + return _CFWriteStreamScheduleWithRunLoop( + stream, + runLoop, + runLoopMode, ); } - late final _CFRunLoopTimerSetTolerancePtr = _lookup< + late final _CFWriteStreamScheduleWithRunLoopPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFRunLoopTimerRef, - CFTimeInterval)>>('CFRunLoopTimerSetTolerance'); - late final _CFRunLoopTimerSetTolerance = _CFRunLoopTimerSetTolerancePtr - .asFunction(); - - int CFSocketGetTypeID() { - return _CFSocketGetTypeID(); - } - - late final _CFSocketGetTypeIDPtr = - _lookup>('CFSocketGetTypeID'); - late final _CFSocketGetTypeID = - _CFSocketGetTypeIDPtr.asFunction(); + ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFWriteStreamScheduleWithRunLoop'); + late final _CFWriteStreamScheduleWithRunLoop = + _CFWriteStreamScheduleWithRunLoopPtr.asFunction< + void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - CFSocketRef CFSocketCreate( - CFAllocatorRef allocator, - int protocolFamily, - int socketType, - int protocol, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, + void CFReadStreamUnscheduleFromRunLoop( + CFReadStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, ) { - return _CFSocketCreate( - allocator, - protocolFamily, - socketType, - protocol, - callBackTypes, - callout, - context, + return _CFReadStreamUnscheduleFromRunLoop( + stream, + runLoop, + runLoopMode, ); } - late final _CFSocketCreatePtr = _lookup< + late final _CFReadStreamUnscheduleFromRunLoopPtr = _lookup< ffi.NativeFunction< - CFSocketRef Function( - CFAllocatorRef, - SInt32, - SInt32, - SInt32, - CFOptionFlags, - CFSocketCallBack, - ffi.Pointer)>>('CFSocketCreate'); - late final _CFSocketCreate = _CFSocketCreatePtr.asFunction< - CFSocketRef Function(CFAllocatorRef, int, int, int, int, CFSocketCallBack, - ffi.Pointer)>(); + ffi.Void Function(CFReadStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFReadStreamUnscheduleFromRunLoop'); + late final _CFReadStreamUnscheduleFromRunLoop = + _CFReadStreamUnscheduleFromRunLoopPtr.asFunction< + void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - CFSocketRef CFSocketCreateWithNative( - CFAllocatorRef allocator, - int sock, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, + void CFWriteStreamUnscheduleFromRunLoop( + CFWriteStreamRef stream, + CFRunLoopRef runLoop, + CFRunLoopMode runLoopMode, ) { - return _CFSocketCreateWithNative( - allocator, - sock, - callBackTypes, - callout, - context, + return _CFWriteStreamUnscheduleFromRunLoop( + stream, + runLoop, + runLoopMode, ); } - late final _CFSocketCreateWithNativePtr = _lookup< + late final _CFWriteStreamUnscheduleFromRunLoopPtr = _lookup< ffi.NativeFunction< - CFSocketRef Function( - CFAllocatorRef, - CFSocketNativeHandle, - CFOptionFlags, - CFSocketCallBack, - ffi.Pointer)>>('CFSocketCreateWithNative'); - late final _CFSocketCreateWithNative = - _CFSocketCreateWithNativePtr.asFunction< - CFSocketRef Function(CFAllocatorRef, int, int, CFSocketCallBack, - ffi.Pointer)>(); + ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, + CFRunLoopMode)>>('CFWriteStreamUnscheduleFromRunLoop'); + late final _CFWriteStreamUnscheduleFromRunLoop = + _CFWriteStreamUnscheduleFromRunLoopPtr.asFunction< + void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); - CFSocketRef CFSocketCreateWithSocketSignature( - CFAllocatorRef allocator, - ffi.Pointer signature, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, + void CFReadStreamSetDispatchQueue( + CFReadStreamRef stream, + Dartdispatch_queue_t q, ) { - return _CFSocketCreateWithSocketSignature( - allocator, - signature, - callBackTypes, - callout, - context, + return _CFReadStreamSetDispatchQueue( + stream, + q.ref.pointer, ); } - late final _CFSocketCreateWithSocketSignaturePtr = _lookup< - ffi.NativeFunction< - CFSocketRef Function( - CFAllocatorRef, - ffi.Pointer, - CFOptionFlags, - CFSocketCallBack, - ffi.Pointer)>>( - 'CFSocketCreateWithSocketSignature'); - late final _CFSocketCreateWithSocketSignature = - _CFSocketCreateWithSocketSignaturePtr.asFunction< - CFSocketRef Function(CFAllocatorRef, ffi.Pointer, - int, CFSocketCallBack, ffi.Pointer)>(); + late final _CFReadStreamSetDispatchQueuePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFReadStreamRef, + dispatch_queue_t)>>('CFReadStreamSetDispatchQueue'); + late final _CFReadStreamSetDispatchQueue = _CFReadStreamSetDispatchQueuePtr + .asFunction(); - CFSocketRef CFSocketCreateConnectedToSocketSignature( - CFAllocatorRef allocator, - ffi.Pointer signature, - int callBackTypes, - CFSocketCallBack callout, - ffi.Pointer context, - double timeout, + void CFWriteStreamSetDispatchQueue( + CFWriteStreamRef stream, + Dartdispatch_queue_t q, ) { - return _CFSocketCreateConnectedToSocketSignature( - allocator, - signature, - callBackTypes, - callout, - context, - timeout, + return _CFWriteStreamSetDispatchQueue( + stream, + q.ref.pointer, ); } - late final _CFSocketCreateConnectedToSocketSignaturePtr = _lookup< + late final _CFWriteStreamSetDispatchQueuePtr = _lookup< ffi.NativeFunction< - CFSocketRef Function( - CFAllocatorRef, - ffi.Pointer, - CFOptionFlags, - CFSocketCallBack, - ffi.Pointer, - CFTimeInterval)>>('CFSocketCreateConnectedToSocketSignature'); - late final _CFSocketCreateConnectedToSocketSignature = - _CFSocketCreateConnectedToSocketSignaturePtr.asFunction< - CFSocketRef Function(CFAllocatorRef, ffi.Pointer, - int, CFSocketCallBack, ffi.Pointer, double)>(); + ffi.Void Function(CFWriteStreamRef, + dispatch_queue_t)>>('CFWriteStreamSetDispatchQueue'); + late final _CFWriteStreamSetDispatchQueue = _CFWriteStreamSetDispatchQueuePtr + .asFunction(); - int CFSocketSetAddress( - CFSocketRef s, - CFDataRef address, + Dartdispatch_queue_t CFReadStreamCopyDispatchQueue( + CFReadStreamRef stream, ) { - return _CFSocketSetAddress( - s, - address, - ); + return objc.NSObject.castFromPointer( + _CFReadStreamCopyDispatchQueue( + stream, + ), + retain: true, + release: true); } - late final _CFSocketSetAddressPtr = - _lookup>( - 'CFSocketSetAddress'); - late final _CFSocketSetAddress = - _CFSocketSetAddressPtr.asFunction(); + late final _CFReadStreamCopyDispatchQueuePtr = + _lookup>( + 'CFReadStreamCopyDispatchQueue'); + late final _CFReadStreamCopyDispatchQueue = _CFReadStreamCopyDispatchQueuePtr + .asFunction(); - int CFSocketConnectToAddress( - CFSocketRef s, - CFDataRef address, - double timeout, + Dartdispatch_queue_t CFWriteStreamCopyDispatchQueue( + CFWriteStreamRef stream, ) { - return _CFSocketConnectToAddress( - s, - address, - timeout, - ); + return objc.NSObject.castFromPointer( + _CFWriteStreamCopyDispatchQueue( + stream, + ), + retain: true, + release: true); } - late final _CFSocketConnectToAddressPtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(CFSocketRef, CFDataRef, - CFTimeInterval)>>('CFSocketConnectToAddress'); - late final _CFSocketConnectToAddress = _CFSocketConnectToAddressPtr - .asFunction(); + late final _CFWriteStreamCopyDispatchQueuePtr = + _lookup>( + 'CFWriteStreamCopyDispatchQueue'); + late final _CFWriteStreamCopyDispatchQueue = + _CFWriteStreamCopyDispatchQueuePtr.asFunction< + dispatch_queue_t Function(CFWriteStreamRef)>(); - void CFSocketInvalidate( - CFSocketRef s, + CFStreamError CFReadStreamGetError( + CFReadStreamRef stream, ) { - return _CFSocketInvalidate( - s, + return _CFReadStreamGetError( + stream, ); } - late final _CFSocketInvalidatePtr = - _lookup>( - 'CFSocketInvalidate'); - late final _CFSocketInvalidate = - _CFSocketInvalidatePtr.asFunction(); + late final _CFReadStreamGetErrorPtr = + _lookup>( + 'CFReadStreamGetError'); + late final _CFReadStreamGetError = _CFReadStreamGetErrorPtr.asFunction< + CFStreamError Function(CFReadStreamRef)>(); - int CFSocketIsValid( - CFSocketRef s, + CFStreamError CFWriteStreamGetError( + CFWriteStreamRef stream, ) { - return _CFSocketIsValid( - s, + return _CFWriteStreamGetError( + stream, ); } - late final _CFSocketIsValidPtr = - _lookup>( - 'CFSocketIsValid'); - late final _CFSocketIsValid = - _CFSocketIsValidPtr.asFunction(); + late final _CFWriteStreamGetErrorPtr = + _lookup>( + 'CFWriteStreamGetError'); + late final _CFWriteStreamGetError = _CFWriteStreamGetErrorPtr.asFunction< + CFStreamError Function(CFWriteStreamRef)>(); - CFDataRef CFSocketCopyAddress( - CFSocketRef s, + CFPropertyListRef CFPropertyListCreateFromXMLData( + CFAllocatorRef allocator, + CFDataRef xmlData, + int mutabilityOption, + ffi.Pointer errorString, ) { - return _CFSocketCopyAddress( - s, + return _CFPropertyListCreateFromXMLData( + allocator, + xmlData, + mutabilityOption, + errorString, ); } - late final _CFSocketCopyAddressPtr = - _lookup>( - 'CFSocketCopyAddress'); - late final _CFSocketCopyAddress = - _CFSocketCopyAddressPtr.asFunction(); + late final _CFPropertyListCreateFromXMLDataPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function(CFAllocatorRef, CFDataRef, CFOptionFlags, + ffi.Pointer)>>('CFPropertyListCreateFromXMLData'); + late final _CFPropertyListCreateFromXMLData = + _CFPropertyListCreateFromXMLDataPtr.asFunction< + CFPropertyListRef Function( + CFAllocatorRef, CFDataRef, int, ffi.Pointer)>(); - CFDataRef CFSocketCopyPeerAddress( - CFSocketRef s, + CFDataRef CFPropertyListCreateXMLData( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, ) { - return _CFSocketCopyPeerAddress( - s, + return _CFPropertyListCreateXMLData( + allocator, + propertyList, ); } - late final _CFSocketCopyPeerAddressPtr = - _lookup>( - 'CFSocketCopyPeerAddress'); - late final _CFSocketCopyPeerAddress = - _CFSocketCopyPeerAddressPtr.asFunction(); + late final _CFPropertyListCreateXMLDataPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(CFAllocatorRef, + CFPropertyListRef)>>('CFPropertyListCreateXMLData'); + late final _CFPropertyListCreateXMLData = _CFPropertyListCreateXMLDataPtr + .asFunction(); - void CFSocketGetContext( - CFSocketRef s, - ffi.Pointer context, + CFPropertyListRef CFPropertyListCreateDeepCopy( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, + int mutabilityOption, ) { - return _CFSocketGetContext( - s, - context, + return _CFPropertyListCreateDeepCopy( + allocator, + propertyList, + mutabilityOption, ); } - late final _CFSocketGetContextPtr = _lookup< + late final _CFPropertyListCreateDeepCopyPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFSocketRef, - ffi.Pointer)>>('CFSocketGetContext'); - late final _CFSocketGetContext = _CFSocketGetContextPtr.asFunction< - void Function(CFSocketRef, ffi.Pointer)>(); - - int CFSocketGetNative( - CFSocketRef s, + CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, + CFOptionFlags)>>('CFPropertyListCreateDeepCopy'); + late final _CFPropertyListCreateDeepCopy = + _CFPropertyListCreateDeepCopyPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, int)>(); + + DartBoolean CFPropertyListIsValid( + CFPropertyListRef plist, + CFPropertyListFormat format, ) { - return _CFSocketGetNative( - s, + return _CFPropertyListIsValid( + plist, + format.value, ); } - late final _CFSocketGetNativePtr = - _lookup>( - 'CFSocketGetNative'); - late final _CFSocketGetNative = - _CFSocketGetNativePtr.asFunction(); + late final _CFPropertyListIsValidPtr = + _lookup>( + 'CFPropertyListIsValid'); + late final _CFPropertyListIsValid = _CFPropertyListIsValidPtr.asFunction< + int Function(CFPropertyListRef, int)>(); - CFRunLoopSourceRef CFSocketCreateRunLoopSource( - CFAllocatorRef allocator, - CFSocketRef s, - int order, + DartCFIndex CFPropertyListWriteToStream( + CFPropertyListRef propertyList, + CFWriteStreamRef stream, + CFPropertyListFormat format, + ffi.Pointer errorString, ) { - return _CFSocketCreateRunLoopSource( - allocator, - s, - order, + return _CFPropertyListWriteToStream( + propertyList, + stream, + format.value, + errorString, ); } - late final _CFSocketCreateRunLoopSourcePtr = _lookup< + late final _CFPropertyListWriteToStreamPtr = _lookup< ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, - CFIndex)>>('CFSocketCreateRunLoopSource'); - late final _CFSocketCreateRunLoopSource = - _CFSocketCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFSocketRef, int)>(); + CFIndex Function(CFPropertyListRef, CFWriteStreamRef, CFIndex, + ffi.Pointer)>>('CFPropertyListWriteToStream'); + late final _CFPropertyListWriteToStream = + _CFPropertyListWriteToStreamPtr.asFunction< + int Function(CFPropertyListRef, CFWriteStreamRef, int, + ffi.Pointer)>(); - int CFSocketGetSocketFlags( - CFSocketRef s, + CFPropertyListRef CFPropertyListCreateFromStream( + CFAllocatorRef allocator, + CFReadStreamRef stream, + int streamLength, + int mutabilityOption, + ffi.Pointer format, + ffi.Pointer errorString, ) { - return _CFSocketGetSocketFlags( - s, + return _CFPropertyListCreateFromStream( + allocator, + stream, + streamLength, + mutabilityOption, + format, + errorString, ); } - late final _CFSocketGetSocketFlagsPtr = - _lookup>( - 'CFSocketGetSocketFlags'); - late final _CFSocketGetSocketFlags = - _CFSocketGetSocketFlagsPtr.asFunction(); + late final _CFPropertyListCreateFromStreamPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFAllocatorRef, + CFReadStreamRef, + CFIndex, + CFOptionFlags, + ffi.Pointer, + ffi.Pointer)>>('CFPropertyListCreateFromStream'); + late final _CFPropertyListCreateFromStream = + _CFPropertyListCreateFromStreamPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, + ffi.Pointer, ffi.Pointer)>(); - void CFSocketSetSocketFlags( - CFSocketRef s, - int flags, + CFPropertyListRef CFPropertyListCreateWithData( + CFAllocatorRef allocator, + CFDataRef data, + int options, + ffi.Pointer format, + ffi.Pointer error, ) { - return _CFSocketSetSocketFlags( - s, - flags, + return _CFPropertyListCreateWithData( + allocator, + data, + options, + format, + error, ); } - late final _CFSocketSetSocketFlagsPtr = _lookup< - ffi.NativeFunction>( - 'CFSocketSetSocketFlags'); - late final _CFSocketSetSocketFlags = - _CFSocketSetSocketFlagsPtr.asFunction(); + late final _CFPropertyListCreateWithDataPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFAllocatorRef, + CFDataRef, + CFOptionFlags, + ffi.Pointer, + ffi.Pointer)>>('CFPropertyListCreateWithData'); + late final _CFPropertyListCreateWithData = + _CFPropertyListCreateWithDataPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFDataRef, int, + ffi.Pointer, ffi.Pointer)>(); - void CFSocketDisableCallBacks( - CFSocketRef s, - int callBackTypes, + CFPropertyListRef CFPropertyListCreateWithStream( + CFAllocatorRef allocator, + CFReadStreamRef stream, + int streamLength, + int options, + ffi.Pointer format, + ffi.Pointer error, ) { - return _CFSocketDisableCallBacks( - s, - callBackTypes, + return _CFPropertyListCreateWithStream( + allocator, + stream, + streamLength, + options, + format, + error, ); } - late final _CFSocketDisableCallBacksPtr = _lookup< - ffi.NativeFunction>( - 'CFSocketDisableCallBacks'); - late final _CFSocketDisableCallBacks = _CFSocketDisableCallBacksPtr - .asFunction(); + late final _CFPropertyListCreateWithStreamPtr = _lookup< + ffi.NativeFunction< + CFPropertyListRef Function( + CFAllocatorRef, + CFReadStreamRef, + CFIndex, + CFOptionFlags, + ffi.Pointer, + ffi.Pointer)>>('CFPropertyListCreateWithStream'); + late final _CFPropertyListCreateWithStream = + _CFPropertyListCreateWithStreamPtr.asFunction< + CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, + ffi.Pointer, ffi.Pointer)>(); - void CFSocketEnableCallBacks( - CFSocketRef s, - int callBackTypes, + DartCFIndex CFPropertyListWrite( + CFPropertyListRef propertyList, + CFWriteStreamRef stream, + CFPropertyListFormat format, + DartCFOptionFlags options, + ffi.Pointer error, ) { - return _CFSocketEnableCallBacks( - s, - callBackTypes, + return _CFPropertyListWrite( + propertyList, + stream, + format.value, + options, + error, ); } - late final _CFSocketEnableCallBacksPtr = _lookup< - ffi.NativeFunction>( - 'CFSocketEnableCallBacks'); - late final _CFSocketEnableCallBacks = - _CFSocketEnableCallBacksPtr.asFunction(); + late final _CFPropertyListWritePtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFPropertyListRef, CFWriteStreamRef, CFIndex, + CFOptionFlags, ffi.Pointer)>>('CFPropertyListWrite'); + late final _CFPropertyListWrite = _CFPropertyListWritePtr.asFunction< + int Function(CFPropertyListRef, CFWriteStreamRef, int, int, + ffi.Pointer)>(); - int CFSocketSendData( - CFSocketRef s, - CFDataRef address, - CFDataRef data, - double timeout, + CFDataRef CFPropertyListCreateData( + CFAllocatorRef allocator, + CFPropertyListRef propertyList, + CFPropertyListFormat format, + DartCFOptionFlags options, + ffi.Pointer error, ) { - return _CFSocketSendData( - s, - address, - data, - timeout, + return _CFPropertyListCreateData( + allocator, + propertyList, + format.value, + options, + error, ); } - late final _CFSocketSendDataPtr = _lookup< + late final _CFPropertyListCreateDataPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(CFSocketRef, CFDataRef, CFDataRef, - CFTimeInterval)>>('CFSocketSendData'); - late final _CFSocketSendData = _CFSocketSendDataPtr.asFunction< - int Function(CFSocketRef, CFDataRef, CFDataRef, double)>(); + CFDataRef Function( + CFAllocatorRef, + CFPropertyListRef, + CFIndex, + CFOptionFlags, + ffi.Pointer)>>('CFPropertyListCreateData'); + late final _CFPropertyListCreateData = + _CFPropertyListCreateDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFPropertyListRef, int, int, + ffi.Pointer)>(); - int CFSocketRegisterValue( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - CFPropertyListRef value, - ) { - return _CFSocketRegisterValue( - nameServerSignature, - timeout, - name, - value, - ); + late final ffi.Pointer _kCFTypeSetCallBacks = + _lookup('kCFTypeSetCallBacks'); + + CFSetCallBacks get kCFTypeSetCallBacks => _kCFTypeSetCallBacks.ref; + + late final ffi.Pointer _kCFCopyStringSetCallBacks = + _lookup('kCFCopyStringSetCallBacks'); + + CFSetCallBacks get kCFCopyStringSetCallBacks => + _kCFCopyStringSetCallBacks.ref; + + int CFSetGetTypeID() { + return _CFSetGetTypeID(); } - late final _CFSocketRegisterValuePtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, CFTimeInterval, - CFStringRef, CFPropertyListRef)>>('CFSocketRegisterValue'); - late final _CFSocketRegisterValue = _CFSocketRegisterValuePtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef, - CFPropertyListRef)>(); + late final _CFSetGetTypeIDPtr = + _lookup>('CFSetGetTypeID'); + late final _CFSetGetTypeID = _CFSetGetTypeIDPtr.asFunction(); - int CFSocketCopyRegisteredValue( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - ffi.Pointer value, - ffi.Pointer nameServerAddress, + CFSetRef CFSetCreate( + CFAllocatorRef allocator, + ffi.Pointer> values, + int numValues, + ffi.Pointer callBacks, ) { - return _CFSocketCopyRegisteredValue( - nameServerSignature, - timeout, - name, - value, - nameServerAddress, + return _CFSetCreate( + allocator, + values, + numValues, + callBacks, ); } - late final _CFSocketCopyRegisteredValuePtr = _lookup< + late final _CFSetCreatePtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - CFTimeInterval, - CFStringRef, - ffi.Pointer, - ffi.Pointer)>>('CFSocketCopyRegisteredValue'); - late final _CFSocketCopyRegisteredValue = - _CFSocketCopyRegisteredValuePtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef, - ffi.Pointer, ffi.Pointer)>(); + CFSetRef Function(CFAllocatorRef, ffi.Pointer>, + CFIndex, ffi.Pointer)>>('CFSetCreate'); + late final _CFSetCreate = _CFSetCreatePtr.asFunction< + CFSetRef Function(CFAllocatorRef, ffi.Pointer>, int, + ffi.Pointer)>(); - int CFSocketRegisterSocketSignature( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - ffi.Pointer signature, + CFSetRef CFSetCreateCopy( + CFAllocatorRef allocator, + CFSetRef theSet, ) { - return _CFSocketRegisterSocketSignature( - nameServerSignature, - timeout, - name, - signature, + return _CFSetCreateCopy( + allocator, + theSet, ); } - late final _CFSocketRegisterSocketSignaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, CFTimeInterval, - CFStringRef, ffi.Pointer)>>( - 'CFSocketRegisterSocketSignature'); - late final _CFSocketRegisterSocketSignature = - _CFSocketRegisterSocketSignaturePtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef, - ffi.Pointer)>(); + late final _CFSetCreateCopyPtr = + _lookup>( + 'CFSetCreateCopy'); + late final _CFSetCreateCopy = _CFSetCreateCopyPtr.asFunction< + CFSetRef Function(CFAllocatorRef, CFSetRef)>(); - int CFSocketCopyRegisteredSocketSignature( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, - ffi.Pointer signature, - ffi.Pointer nameServerAddress, + CFMutableSetRef CFSetCreateMutable( + CFAllocatorRef allocator, + int capacity, + ffi.Pointer callBacks, ) { - return _CFSocketCopyRegisteredSocketSignature( - nameServerSignature, - timeout, - name, - signature, - nameServerAddress, + return _CFSetCreateMutable( + allocator, + capacity, + callBacks, ); } - late final _CFSocketCopyRegisteredSocketSignaturePtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - CFTimeInterval, - CFStringRef, - ffi.Pointer, - ffi.Pointer)>>( - 'CFSocketCopyRegisteredSocketSignature'); - late final _CFSocketCopyRegisteredSocketSignature = - _CFSocketCopyRegisteredSocketSignaturePtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef, - ffi.Pointer, ffi.Pointer)>(); + late final _CFSetCreateMutablePtr = _lookup< + ffi.NativeFunction< + CFMutableSetRef Function(CFAllocatorRef, CFIndex, + ffi.Pointer)>>('CFSetCreateMutable'); + late final _CFSetCreateMutable = _CFSetCreateMutablePtr.asFunction< + CFMutableSetRef Function( + CFAllocatorRef, int, ffi.Pointer)>(); - int CFSocketUnregister( - ffi.Pointer nameServerSignature, - double timeout, - CFStringRef name, + CFMutableSetRef CFSetCreateMutableCopy( + CFAllocatorRef allocator, + int capacity, + CFSetRef theSet, ) { - return _CFSocketUnregister( - nameServerSignature, - timeout, - name, + return _CFSetCreateMutableCopy( + allocator, + capacity, + theSet, ); } - late final _CFSocketUnregisterPtr = _lookup< + late final _CFSetCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, CFTimeInterval, - CFStringRef)>>('CFSocketUnregister'); - late final _CFSocketUnregister = _CFSocketUnregisterPtr.asFunction< - int Function(ffi.Pointer, double, CFStringRef)>(); + CFMutableSetRef Function( + CFAllocatorRef, CFIndex, CFSetRef)>>('CFSetCreateMutableCopy'); + late final _CFSetCreateMutableCopy = _CFSetCreateMutableCopyPtr.asFunction< + CFMutableSetRef Function(CFAllocatorRef, int, CFSetRef)>(); - void CFSocketSetDefaultNameRegistryPortNumber( - int port, + int CFSetGetCount( + CFSetRef theSet, ) { - return _CFSocketSetDefaultNameRegistryPortNumber( - port, + return _CFSetGetCount( + theSet, ); } - late final _CFSocketSetDefaultNameRegistryPortNumberPtr = - _lookup>( - 'CFSocketSetDefaultNameRegistryPortNumber'); - late final _CFSocketSetDefaultNameRegistryPortNumber = - _CFSocketSetDefaultNameRegistryPortNumberPtr.asFunction< - void Function(int)>(); + late final _CFSetGetCountPtr = + _lookup>('CFSetGetCount'); + late final _CFSetGetCount = + _CFSetGetCountPtr.asFunction(); - int CFSocketGetDefaultNameRegistryPortNumber() { - return _CFSocketGetDefaultNameRegistryPortNumber(); + int CFSetGetCountOfValue( + CFSetRef theSet, + ffi.Pointer value, + ) { + return _CFSetGetCountOfValue( + theSet, + value, + ); } - late final _CFSocketGetDefaultNameRegistryPortNumberPtr = - _lookup>( - 'CFSocketGetDefaultNameRegistryPortNumber'); - late final _CFSocketGetDefaultNameRegistryPortNumber = - _CFSocketGetDefaultNameRegistryPortNumberPtr.asFunction(); - - late final ffi.Pointer _kCFSocketCommandKey = - _lookup('kCFSocketCommandKey'); - - CFStringRef get kCFSocketCommandKey => _kCFSocketCommandKey.value; - - late final ffi.Pointer _kCFSocketNameKey = - _lookup('kCFSocketNameKey'); - - CFStringRef get kCFSocketNameKey => _kCFSocketNameKey.value; - - late final ffi.Pointer _kCFSocketValueKey = - _lookup('kCFSocketValueKey'); - - CFStringRef get kCFSocketValueKey => _kCFSocketValueKey.value; - - late final ffi.Pointer _kCFSocketResultKey = - _lookup('kCFSocketResultKey'); - - CFStringRef get kCFSocketResultKey => _kCFSocketResultKey.value; - - late final ffi.Pointer _kCFSocketErrorKey = - _lookup('kCFSocketErrorKey'); - - CFStringRef get kCFSocketErrorKey => _kCFSocketErrorKey.value; + late final _CFSetGetCountOfValuePtr = _lookup< + ffi + .NativeFunction)>>( + 'CFSetGetCountOfValue'); + late final _CFSetGetCountOfValue = _CFSetGetCountOfValuePtr.asFunction< + int Function(CFSetRef, ffi.Pointer)>(); - late final ffi.Pointer _kCFSocketRegisterCommand = - _lookup('kCFSocketRegisterCommand'); + int CFSetContainsValue( + CFSetRef theSet, + ffi.Pointer value, + ) { + return _CFSetContainsValue( + theSet, + value, + ); + } - CFStringRef get kCFSocketRegisterCommand => _kCFSocketRegisterCommand.value; + late final _CFSetContainsValuePtr = _lookup< + ffi + .NativeFunction)>>( + 'CFSetContainsValue'); + late final _CFSetContainsValue = _CFSetContainsValuePtr.asFunction< + int Function(CFSetRef, ffi.Pointer)>(); - late final ffi.Pointer _kCFSocketRetrieveCommand = - _lookup('kCFSocketRetrieveCommand'); + ffi.Pointer CFSetGetValue( + CFSetRef theSet, + ffi.Pointer value, + ) { + return _CFSetGetValue( + theSet, + value, + ); + } - CFStringRef get kCFSocketRetrieveCommand => _kCFSocketRetrieveCommand.value; + late final _CFSetGetValuePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + CFSetRef, ffi.Pointer)>>('CFSetGetValue'); + late final _CFSetGetValue = _CFSetGetValuePtr.asFunction< + ffi.Pointer Function(CFSetRef, ffi.Pointer)>(); - int getattrlistbulk( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + int CFSetGetValueIfPresent( + CFSetRef theSet, + ffi.Pointer candidate, + ffi.Pointer> value, ) { - return _getattrlistbulk( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFSetGetValueIfPresent( + theSet, + candidate, + value, ); } - late final _getattrlistbulkPtr = _lookup< + late final _CFSetGetValueIfPresentPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, - ffi.Pointer, ffi.Size, ffi.Uint64)>>('getattrlistbulk'); - late final _getattrlistbulk = _getattrlistbulkPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer, int, int)>(); + Boolean Function(CFSetRef, ffi.Pointer, + ffi.Pointer>)>>('CFSetGetValueIfPresent'); + late final _CFSetGetValueIfPresent = _CFSetGetValueIfPresentPtr.asFunction< + int Function(CFSetRef, ffi.Pointer, + ffi.Pointer>)>(); - int getattrlistat( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - int arg4, - int arg5, + void CFSetGetValues( + CFSetRef theSet, + ffi.Pointer> values, ) { - return _getattrlistat( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _CFSetGetValues( + theSet, + values, ); } - late final _getattrlistatPtr = _lookup< + late final _CFSetGetValuesPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedLong)>>('getattrlistat'); - late final _getattrlistat = _getattrlistatPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Void Function( + CFSetRef, ffi.Pointer>)>>('CFSetGetValues'); + late final _CFSetGetValues = _CFSetGetValuesPtr.asFunction< + void Function(CFSetRef, ffi.Pointer>)>(); - int setattrlistat( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - int arg4, - int arg5, + void CFSetApplyFunction( + CFSetRef theSet, + CFSetApplierFunction applier, + ffi.Pointer context, ) { - return _setattrlistat( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _CFSetApplyFunction( + theSet, + applier, + context, ); } - late final _setattrlistatPtr = _lookup< + late final _CFSetApplyFunctionPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Uint32)>>('setattrlistat'); - late final _setattrlistat = _setattrlistatPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + ffi.Void Function(CFSetRef, CFSetApplierFunction, + ffi.Pointer)>>('CFSetApplyFunction'); + late final _CFSetApplyFunction = _CFSetApplyFunctionPtr.asFunction< + void Function(CFSetRef, CFSetApplierFunction, ffi.Pointer)>(); - int freadlink( - int arg0, - ffi.Pointer arg1, - int arg2, + void CFSetAddValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _freadlink( - arg0, - arg1, - arg2, + return _CFSetAddValue( + theSet, + value, ); } - late final _freadlinkPtr = _lookup< + late final _CFSetAddValuePtr = _lookup< ffi.NativeFunction< - ssize_t Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('freadlink'); - late final _freadlink = - _freadlinkPtr.asFunction, int)>(); + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetAddValue'); + late final _CFSetAddValue = _CFSetAddValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - int faccessat( - int arg0, - ffi.Pointer arg1, - int arg2, - int arg3, + void CFSetReplaceValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _faccessat( - arg0, - arg1, - arg2, - arg3, + return _CFSetReplaceValue( + theSet, + value, ); } - late final _faccessatPtr = _lookup< + late final _CFSetReplaceValuePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int, ffi.Int)>>('faccessat'); - late final _faccessat = _faccessatPtr - .asFunction, int, int)>(); + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetReplaceValue'); + late final _CFSetReplaceValue = _CFSetReplaceValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - int fchownat( - int arg0, - ffi.Pointer arg1, - int arg2, - int arg3, - int arg4, + void CFSetSetValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _fchownat( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFSetSetValue( + theSet, + value, ); } - late final _fchownatPtr = _lookup< + late final _CFSetSetValuePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, uid_t, gid_t, - ffi.Int)>>('fchownat'); - late final _fchownat = _fchownatPtr - .asFunction, int, int, int)>(); + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetSetValue'); + late final _CFSetSetValue = _CFSetSetValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - int linkat( - int arg0, - ffi.Pointer arg1, - int arg2, - ffi.Pointer arg3, - int arg4, + void CFSetRemoveValue( + CFMutableSetRef theSet, + ffi.Pointer value, ) { - return _linkat( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFSetRemoveValue( + theSet, + value, ); } - late final _linkatPtr = _lookup< + late final _CFSetRemoveValuePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Pointer, ffi.Int)>>('linkat'); - late final _linkat = _linkatPtr.asFunction< - int Function( - int, ffi.Pointer, int, ffi.Pointer, int)>(); + ffi.Void Function( + CFMutableSetRef, ffi.Pointer)>>('CFSetRemoveValue'); + late final _CFSetRemoveValue = _CFSetRemoveValuePtr.asFunction< + void Function(CFMutableSetRef, ffi.Pointer)>(); - int readlinkat( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, + void CFSetRemoveAllValues( + CFMutableSetRef theSet, ) { - return _readlinkat( - arg0, - arg1, - arg2, - arg3, + return _CFSetRemoveAllValues( + theSet, ); } - late final _readlinkatPtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Int, ffi.Pointer, - ffi.Pointer, ffi.Size)>>('readlinkat'); - late final _readlinkat = _readlinkatPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, int)>(); + late final _CFSetRemoveAllValuesPtr = + _lookup>( + 'CFSetRemoveAllValues'); + late final _CFSetRemoveAllValues = + _CFSetRemoveAllValuesPtr.asFunction(); - int symlinkat( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ) { - return _symlinkat( - arg0, - arg1, - arg2, - ); + int CFTreeGetTypeID() { + return _CFTreeGetTypeID(); } - late final _symlinkatPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer)>>('symlinkat'); - late final _symlinkat = _symlinkatPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer)>(); + late final _CFTreeGetTypeIDPtr = + _lookup>('CFTreeGetTypeID'); + late final _CFTreeGetTypeID = + _CFTreeGetTypeIDPtr.asFunction(); - int unlinkat( - int arg0, - ffi.Pointer arg1, - int arg2, + CFTreeRef CFTreeCreate( + CFAllocatorRef allocator, + ffi.Pointer context, ) { - return _unlinkat( - arg0, - arg1, - arg2, + return _CFTreeCreate( + allocator, + context, ); } - late final _unlinkatPtr = _lookup< + late final _CFTreeCreatePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int)>>('unlinkat'); - late final _unlinkat = - _unlinkatPtr.asFunction, int)>(); - - void _exit( - int arg0, - ) { - return __exit( - arg0, - ); - } - - late final __exitPtr = - _lookup>('_exit'); - late final __exit = __exitPtr.asFunction(); + CFTreeRef Function( + CFAllocatorRef, ffi.Pointer)>>('CFTreeCreate'); + late final _CFTreeCreate = _CFTreeCreatePtr.asFunction< + CFTreeRef Function(CFAllocatorRef, ffi.Pointer)>(); - int access( - ffi.Pointer arg0, - int arg1, + CFTreeRef CFTreeGetParent( + CFTreeRef tree, ) { - return _access( - arg0, - arg1, + return _CFTreeGetParent( + tree, ); } - late final _accessPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'access'); - late final _access = - _accessPtr.asFunction, int)>(); + late final _CFTreeGetParentPtr = + _lookup>( + 'CFTreeGetParent'); + late final _CFTreeGetParent = + _CFTreeGetParentPtr.asFunction(); - int alarm( - int arg0, + CFTreeRef CFTreeGetNextSibling( + CFTreeRef tree, ) { - return _alarm( - arg0, + return _CFTreeGetNextSibling( + tree, ); } - late final _alarmPtr = - _lookup>( - 'alarm'); - late final _alarm = _alarmPtr.asFunction(); + late final _CFTreeGetNextSiblingPtr = + _lookup>( + 'CFTreeGetNextSibling'); + late final _CFTreeGetNextSibling = + _CFTreeGetNextSiblingPtr.asFunction(); - int chdir( - ffi.Pointer arg0, + CFTreeRef CFTreeGetFirstChild( + CFTreeRef tree, ) { - return _chdir( - arg0, + return _CFTreeGetFirstChild( + tree, ); } - late final _chdirPtr = - _lookup)>>( - 'chdir'); - late final _chdir = - _chdirPtr.asFunction)>(); + late final _CFTreeGetFirstChildPtr = + _lookup>( + 'CFTreeGetFirstChild'); + late final _CFTreeGetFirstChild = + _CFTreeGetFirstChildPtr.asFunction(); - int chown( - ffi.Pointer arg0, - int arg1, - int arg2, + void CFTreeGetContext( + CFTreeRef tree, + ffi.Pointer context, ) { - return _chown( - arg0, - arg1, - arg2, + return _CFTreeGetContext( + tree, + context, ); } - late final _chownPtr = _lookup< + late final _CFTreeGetContextPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('chown'); - late final _chown = - _chownPtr.asFunction, int, int)>(); + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeGetContext'); + late final _CFTreeGetContext = _CFTreeGetContextPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); - int close( - int arg0, + int CFTreeGetChildCount( + CFTreeRef tree, ) { - return _close( - arg0, + return _CFTreeGetChildCount( + tree, ); } - late final _closePtr = - _lookup>('close'); - late final _close = _closePtr.asFunction(); + late final _CFTreeGetChildCountPtr = + _lookup>( + 'CFTreeGetChildCount'); + late final _CFTreeGetChildCount = + _CFTreeGetChildCountPtr.asFunction(); - int dup( - int arg0, + CFTreeRef CFTreeGetChildAtIndex( + CFTreeRef tree, + int idx, ) { - return _dup( - arg0, + return _CFTreeGetChildAtIndex( + tree, + idx, ); } - late final _dupPtr = - _lookup>('dup'); - late final _dup = _dupPtr.asFunction(); + late final _CFTreeGetChildAtIndexPtr = + _lookup>( + 'CFTreeGetChildAtIndex'); + late final _CFTreeGetChildAtIndex = _CFTreeGetChildAtIndexPtr.asFunction< + CFTreeRef Function(CFTreeRef, int)>(); - int dup2( - int arg0, - int arg1, + void CFTreeGetChildren( + CFTreeRef tree, + ffi.Pointer children, ) { - return _dup2( - arg0, - arg1, + return _CFTreeGetChildren( + tree, + children, ); } - late final _dup2Ptr = - _lookup>('dup2'); - late final _dup2 = _dup2Ptr.asFunction(); + late final _CFTreeGetChildrenPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeGetChildren'); + late final _CFTreeGetChildren = _CFTreeGetChildrenPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); - int execl( - ffi.Pointer __path, - ffi.Pointer __arg0, + void CFTreeApplyFunctionToChildren( + CFTreeRef tree, + CFTreeApplierFunction applier, + ffi.Pointer context, ) { - return _execl( - __path, - __arg0, + return _CFTreeApplyFunctionToChildren( + tree, + applier, + context, ); } - late final _execlPtr = _lookup< + late final _CFTreeApplyFunctionToChildrenPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('execl'); - late final _execl = _execlPtr - .asFunction, ffi.Pointer)>(); + ffi.Void Function(CFTreeRef, CFTreeApplierFunction, + ffi.Pointer)>>('CFTreeApplyFunctionToChildren'); + late final _CFTreeApplyFunctionToChildren = + _CFTreeApplyFunctionToChildrenPtr.asFunction< + void Function( + CFTreeRef, CFTreeApplierFunction, ffi.Pointer)>(); - int execle( - ffi.Pointer __path, - ffi.Pointer __arg0, + CFTreeRef CFTreeFindRoot( + CFTreeRef tree, ) { - return _execle( - __path, - __arg0, + return _CFTreeFindRoot( + tree, ); } - late final _execlePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('execle'); - late final _execle = _execlePtr - .asFunction, ffi.Pointer)>(); + late final _CFTreeFindRootPtr = + _lookup>( + 'CFTreeFindRoot'); + late final _CFTreeFindRoot = + _CFTreeFindRootPtr.asFunction(); - int execlp( - ffi.Pointer __file, - ffi.Pointer __arg0, + void CFTreeSetContext( + CFTreeRef tree, + ffi.Pointer context, ) { - return _execlp( - __file, - __arg0, + return _CFTreeSetContext( + tree, + context, ); } - late final _execlpPtr = _lookup< + late final _CFTreeSetContextPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('execlp'); - late final _execlp = _execlpPtr - .asFunction, ffi.Pointer)>(); + ffi.Void Function( + CFTreeRef, ffi.Pointer)>>('CFTreeSetContext'); + late final _CFTreeSetContext = _CFTreeSetContextPtr.asFunction< + void Function(CFTreeRef, ffi.Pointer)>(); - int execv( - ffi.Pointer __path, - ffi.Pointer> __argv, + void CFTreePrependChild( + CFTreeRef tree, + CFTreeRef newChild, ) { - return _execv( - __path, - __argv, + return _CFTreePrependChild( + tree, + newChild, ); } - late final _execvPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('execv'); - late final _execv = _execvPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); + late final _CFTreePrependChildPtr = + _lookup>( + 'CFTreePrependChild'); + late final _CFTreePrependChild = + _CFTreePrependChildPtr.asFunction(); - int execve( - ffi.Pointer __file, - ffi.Pointer> __argv, - ffi.Pointer> __envp, + void CFTreeAppendChild( + CFTreeRef tree, + CFTreeRef newChild, ) { - return _execve( - __file, - __argv, - __envp, + return _CFTreeAppendChild( + tree, + newChild, ); } - late final _execvePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>('execve'); - late final _execve = _execvePtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer>, - ffi.Pointer>)>(); + late final _CFTreeAppendChildPtr = + _lookup>( + 'CFTreeAppendChild'); + late final _CFTreeAppendChild = + _CFTreeAppendChildPtr.asFunction(); - int execvp( - ffi.Pointer __file, - ffi.Pointer> __argv, + void CFTreeInsertSibling( + CFTreeRef tree, + CFTreeRef newSibling, ) { - return _execvp( - __file, - __argv, + return _CFTreeInsertSibling( + tree, + newSibling, ); } - late final _execvpPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer>)>>('execvp'); - late final _execvp = _execvpPtr.asFunction< - int Function( - ffi.Pointer, ffi.Pointer>)>(); + late final _CFTreeInsertSiblingPtr = + _lookup>( + 'CFTreeInsertSibling'); + late final _CFTreeInsertSibling = + _CFTreeInsertSiblingPtr.asFunction(); - int fork() { - return _fork(); + void CFTreeRemove( + CFTreeRef tree, + ) { + return _CFTreeRemove( + tree, + ); } - late final _forkPtr = _lookup>('fork'); - late final _fork = _forkPtr.asFunction(); + late final _CFTreeRemovePtr = + _lookup>('CFTreeRemove'); + late final _CFTreeRemove = + _CFTreeRemovePtr.asFunction(); - int fpathconf( - int arg0, - int arg1, + void CFTreeRemoveAllChildren( + CFTreeRef tree, ) { - return _fpathconf( - arg0, - arg1, + return _CFTreeRemoveAllChildren( + tree, ); } - late final _fpathconfPtr = - _lookup>( - 'fpathconf'); - late final _fpathconf = _fpathconfPtr.asFunction(); + late final _CFTreeRemoveAllChildrenPtr = + _lookup>( + 'CFTreeRemoveAllChildren'); + late final _CFTreeRemoveAllChildren = + _CFTreeRemoveAllChildrenPtr.asFunction(); - ffi.Pointer getcwd( - ffi.Pointer arg0, - int arg1, + void CFTreeSortChildren( + CFTreeRef tree, + CFComparatorFunction comparator, + ffi.Pointer context, ) { - return _getcwd( - arg0, - arg1, + return _CFTreeSortChildren( + tree, + comparator, + context, ); } - late final _getcwdPtr = _lookup< + late final _CFTreeSortChildrenPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Size)>>('getcwd'); - late final _getcwd = _getcwdPtr - .asFunction Function(ffi.Pointer, int)>(); + ffi.Void Function(CFTreeRef, CFComparatorFunction, + ffi.Pointer)>>('CFTreeSortChildren'); + late final _CFTreeSortChildren = _CFTreeSortChildrenPtr.asFunction< + void Function(CFTreeRef, CFComparatorFunction, ffi.Pointer)>(); - int getegid() { - return _getegid(); + int CFURLCreateDataAndPropertiesFromResource( + CFAllocatorRef alloc, + CFURLRef url, + ffi.Pointer resourceData, + ffi.Pointer properties, + CFArrayRef desiredProperties, + ffi.Pointer errorCode, + ) { + return _CFURLCreateDataAndPropertiesFromResource( + alloc, + url, + resourceData, + properties, + desiredProperties, + errorCode, + ); } - late final _getegidPtr = - _lookup>('getegid'); - late final _getegid = _getegidPtr.asFunction(); + late final _CFURLCreateDataAndPropertiesFromResourcePtr = _lookup< + ffi.NativeFunction< + Boolean Function( + CFAllocatorRef, + CFURLRef, + ffi.Pointer, + ffi.Pointer, + CFArrayRef, + ffi.Pointer)>>( + 'CFURLCreateDataAndPropertiesFromResource'); + late final _CFURLCreateDataAndPropertiesFromResource = + _CFURLCreateDataAndPropertiesFromResourcePtr.asFunction< + int Function(CFAllocatorRef, CFURLRef, ffi.Pointer, + ffi.Pointer, CFArrayRef, ffi.Pointer)>(); - int geteuid() { - return _geteuid(); + int CFURLWriteDataAndPropertiesToResource( + CFURLRef url, + CFDataRef dataToWrite, + CFDictionaryRef propertiesToWrite, + ffi.Pointer errorCode, + ) { + return _CFURLWriteDataAndPropertiesToResource( + url, + dataToWrite, + propertiesToWrite, + errorCode, + ); } - late final _geteuidPtr = - _lookup>('geteuid'); - late final _geteuid = _geteuidPtr.asFunction(); + late final _CFURLWriteDataAndPropertiesToResourcePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFURLRef, CFDataRef, CFDictionaryRef, + ffi.Pointer)>>('CFURLWriteDataAndPropertiesToResource'); + late final _CFURLWriteDataAndPropertiesToResource = + _CFURLWriteDataAndPropertiesToResourcePtr.asFunction< + int Function( + CFURLRef, CFDataRef, CFDictionaryRef, ffi.Pointer)>(); - int getgid() { - return _getgid(); + int CFURLDestroyResource( + CFURLRef url, + ffi.Pointer errorCode, + ) { + return _CFURLDestroyResource( + url, + errorCode, + ); } - late final _getgidPtr = - _lookup>('getgid'); - late final _getgid = _getgidPtr.asFunction(); + late final _CFURLDestroyResourcePtr = _lookup< + ffi.NativeFunction)>>( + 'CFURLDestroyResource'); + late final _CFURLDestroyResource = _CFURLDestroyResourcePtr.asFunction< + int Function(CFURLRef, ffi.Pointer)>(); - int getgroups( - int arg0, - ffi.Pointer arg1, + CFTypeRef CFURLCreatePropertyFromResource( + CFAllocatorRef alloc, + CFURLRef url, + CFStringRef property, + ffi.Pointer errorCode, ) { - return _getgroups( - arg0, - arg1, + return _CFURLCreatePropertyFromResource( + alloc, + url, + property, + errorCode, ); } - late final _getgroupsPtr = _lookup< - ffi.NativeFunction)>>( - 'getgroups'); - late final _getgroups = - _getgroupsPtr.asFunction)>(); + late final _CFURLCreatePropertyFromResourcePtr = _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFAllocatorRef, CFURLRef, CFStringRef, + ffi.Pointer)>>('CFURLCreatePropertyFromResource'); + late final _CFURLCreatePropertyFromResource = + _CFURLCreatePropertyFromResourcePtr.asFunction< + CFTypeRef Function( + CFAllocatorRef, CFURLRef, CFStringRef, ffi.Pointer)>(); - ffi.Pointer getlogin() { - return _getlogin(); - } + late final ffi.Pointer _kCFURLFileExists = + _lookup('kCFURLFileExists'); - late final _getloginPtr = - _lookup Function()>>('getlogin'); - late final _getlogin = - _getloginPtr.asFunction Function()>(); + CFStringRef get kCFURLFileExists => _kCFURLFileExists.value; - int getpgrp() { - return _getpgrp(); - } + late final ffi.Pointer _kCFURLFileDirectoryContents = + _lookup('kCFURLFileDirectoryContents'); - late final _getpgrpPtr = - _lookup>('getpgrp'); - late final _getpgrp = _getpgrpPtr.asFunction(); + CFStringRef get kCFURLFileDirectoryContents => + _kCFURLFileDirectoryContents.value; - int getpid() { - return _getpid(); - } + late final ffi.Pointer _kCFURLFileLength = + _lookup('kCFURLFileLength'); - late final _getpidPtr = - _lookup>('getpid'); - late final _getpid = _getpidPtr.asFunction(); + CFStringRef get kCFURLFileLength => _kCFURLFileLength.value; - int getppid() { - return _getppid(); - } + late final ffi.Pointer _kCFURLFileLastModificationTime = + _lookup('kCFURLFileLastModificationTime'); - late final _getppidPtr = - _lookup>('getppid'); - late final _getppid = _getppidPtr.asFunction(); + CFStringRef get kCFURLFileLastModificationTime => + _kCFURLFileLastModificationTime.value; - int getuid() { - return _getuid(); - } + late final ffi.Pointer _kCFURLFilePOSIXMode = + _lookup('kCFURLFilePOSIXMode'); - late final _getuidPtr = - _lookup>('getuid'); - late final _getuid = _getuidPtr.asFunction(); + CFStringRef get kCFURLFilePOSIXMode => _kCFURLFilePOSIXMode.value; - int isatty( - int arg0, - ) { - return _isatty( - arg0, - ); - } + late final ffi.Pointer _kCFURLFileOwnerID = + _lookup('kCFURLFileOwnerID'); - late final _isattyPtr = - _lookup>('isatty'); - late final _isatty = _isattyPtr.asFunction(); + CFStringRef get kCFURLFileOwnerID => _kCFURLFileOwnerID.value; - int link( - ffi.Pointer arg0, - ffi.Pointer arg1, - ) { - return _link( - arg0, - arg1, - ); + late final ffi.Pointer _kCFURLHTTPStatusCode = + _lookup('kCFURLHTTPStatusCode'); + + CFStringRef get kCFURLHTTPStatusCode => _kCFURLHTTPStatusCode.value; + + late final ffi.Pointer _kCFURLHTTPStatusLine = + _lookup('kCFURLHTTPStatusLine'); + + CFStringRef get kCFURLHTTPStatusLine => _kCFURLHTTPStatusLine.value; + + int CFUUIDGetTypeID() { + return _CFUUIDGetTypeID(); } - late final _linkPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('link'); - late final _link = _linkPtr - .asFunction, ffi.Pointer)>(); + late final _CFUUIDGetTypeIDPtr = + _lookup>('CFUUIDGetTypeID'); + late final _CFUUIDGetTypeID = + _CFUUIDGetTypeIDPtr.asFunction(); - int lseek( - int arg0, - int arg1, - int arg2, + CFUUIDRef CFUUIDCreate( + CFAllocatorRef alloc, ) { - return _lseek( - arg0, - arg1, - arg2, + return _CFUUIDCreate( + alloc, ); } - late final _lseekPtr = - _lookup>( - 'lseek'); - late final _lseek = _lseekPtr.asFunction(); + late final _CFUUIDCreatePtr = + _lookup>( + 'CFUUIDCreate'); + late final _CFUUIDCreate = + _CFUUIDCreatePtr.asFunction(); - int pathconf( - ffi.Pointer arg0, - int arg1, + CFUUIDRef CFUUIDCreateWithBytes( + CFAllocatorRef alloc, + int byte0, + int byte1, + int byte2, + int byte3, + int byte4, + int byte5, + int byte6, + int byte7, + int byte8, + int byte9, + int byte10, + int byte11, + int byte12, + int byte13, + int byte14, + int byte15, ) { - return _pathconf( - arg0, - arg1, + return _CFUUIDCreateWithBytes( + alloc, + byte0, + byte1, + byte2, + byte3, + byte4, + byte5, + byte6, + byte7, + byte8, + byte9, + byte10, + byte11, + byte12, + byte13, + byte14, + byte15, ); } - late final _pathconfPtr = _lookup< + late final _CFUUIDCreateWithBytesPtr = _lookup< ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, ffi.Int)>>('pathconf'); - late final _pathconf = - _pathconfPtr.asFunction, int)>(); + CFUUIDRef Function( + CFAllocatorRef, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8)>>('CFUUIDCreateWithBytes'); + late final _CFUUIDCreateWithBytes = _CFUUIDCreateWithBytesPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int)>(); - int pause() { - return _pause(); + CFUUIDRef CFUUIDCreateFromString( + CFAllocatorRef alloc, + CFStringRef uuidStr, + ) { + return _CFUUIDCreateFromString( + alloc, + uuidStr, + ); } - late final _pausePtr = - _lookup>('pause'); - late final _pause = _pausePtr.asFunction(); + late final _CFUUIDCreateFromStringPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateFromString'); + late final _CFUUIDCreateFromString = _CFUUIDCreateFromStringPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, CFStringRef)>(); - int pipe( - ffi.Pointer arg0, + CFStringRef CFUUIDCreateString( + CFAllocatorRef alloc, + CFUUIDRef uuid, ) { - return _pipe( - arg0, + return _CFUUIDCreateString( + alloc, + uuid, ); } - late final _pipePtr = - _lookup)>>( - 'pipe'); - late final _pipe = _pipePtr.asFunction)>(); + late final _CFUUIDCreateStringPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateString'); + late final _CFUUIDCreateString = _CFUUIDCreateStringPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFUUIDRef)>(); - int read( - int arg0, - ffi.Pointer arg1, - int arg2, + CFUUIDRef CFUUIDGetConstantUUIDWithBytes( + CFAllocatorRef alloc, + int byte0, + int byte1, + int byte2, + int byte3, + int byte4, + int byte5, + int byte6, + int byte7, + int byte8, + int byte9, + int byte10, + int byte11, + int byte12, + int byte13, + int byte14, + int byte15, ) { - return _read( - arg0, - arg1, - arg2, + return _CFUUIDGetConstantUUIDWithBytes( + alloc, + byte0, + byte1, + byte2, + byte3, + byte4, + byte5, + byte6, + byte7, + byte8, + byte9, + byte10, + byte11, + byte12, + byte13, + byte14, + byte15, ); } - late final _readPtr = _lookup< + late final _CFUUIDGetConstantUUIDWithBytesPtr = _lookup< ffi.NativeFunction< - ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('read'); - late final _read = - _readPtr.asFunction, int)>(); + CFUUIDRef Function( + CFAllocatorRef, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8, + UInt8)>>('CFUUIDGetConstantUUIDWithBytes'); + late final _CFUUIDGetConstantUUIDWithBytes = + _CFUUIDGetConstantUUIDWithBytesPtr.asFunction< + CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, + int, int, int, int, int, int, int, int, int)>(); - int rmdir( - ffi.Pointer arg0, + CFUUIDBytes CFUUIDGetUUIDBytes( + CFUUIDRef uuid, ) { - return _rmdir( - arg0, + return _CFUUIDGetUUIDBytes( + uuid, ); } - late final _rmdirPtr = - _lookup)>>( - 'rmdir'); - late final _rmdir = - _rmdirPtr.asFunction)>(); + late final _CFUUIDGetUUIDBytesPtr = + _lookup>( + 'CFUUIDGetUUIDBytes'); + late final _CFUUIDGetUUIDBytes = + _CFUUIDGetUUIDBytesPtr.asFunction(); - int setgid( - int arg0, + CFUUIDRef CFUUIDCreateFromUUIDBytes( + CFAllocatorRef alloc, + CFUUIDBytes bytes, ) { - return _setgid( - arg0, + return _CFUUIDCreateFromUUIDBytes( + alloc, + bytes, ); } - late final _setgidPtr = - _lookup>('setgid'); - late final _setgid = _setgidPtr.asFunction(); + late final _CFUUIDCreateFromUUIDBytesPtr = _lookup< + ffi.NativeFunction>( + 'CFUUIDCreateFromUUIDBytes'); + late final _CFUUIDCreateFromUUIDBytes = _CFUUIDCreateFromUUIDBytesPtr + .asFunction(); - int setpgid( - int arg0, - int arg1, - ) { - return _setpgid( - arg0, - arg1, - ); + CFURLRef CFCopyHomeDirectoryURL() { + return _CFCopyHomeDirectoryURL(); } - late final _setpgidPtr = - _lookup>('setpgid'); - late final _setpgid = _setpgidPtr.asFunction(); - - int setsid() { - return _setsid(); - } + late final _CFCopyHomeDirectoryURLPtr = + _lookup>( + 'CFCopyHomeDirectoryURL'); + late final _CFCopyHomeDirectoryURL = + _CFCopyHomeDirectoryURLPtr.asFunction(); - late final _setsidPtr = - _lookup>('setsid'); - late final _setsid = _setsidPtr.asFunction(); + late final ffi.Pointer _kCFBundleInfoDictionaryVersionKey = + _lookup('kCFBundleInfoDictionaryVersionKey'); - int setuid( - int arg0, - ) { - return _setuid( - arg0, - ); - } + CFStringRef get kCFBundleInfoDictionaryVersionKey => + _kCFBundleInfoDictionaryVersionKey.value; - late final _setuidPtr = - _lookup>('setuid'); - late final _setuid = _setuidPtr.asFunction(); + late final ffi.Pointer _kCFBundleExecutableKey = + _lookup('kCFBundleExecutableKey'); - int sleep( - int arg0, - ) { - return _sleep( - arg0, - ); + CFStringRef get kCFBundleExecutableKey => _kCFBundleExecutableKey.value; + + late final ffi.Pointer _kCFBundleIdentifierKey = + _lookup('kCFBundleIdentifierKey'); + + CFStringRef get kCFBundleIdentifierKey => _kCFBundleIdentifierKey.value; + + late final ffi.Pointer _kCFBundleVersionKey = + _lookup('kCFBundleVersionKey'); + + CFStringRef get kCFBundleVersionKey => _kCFBundleVersionKey.value; + + late final ffi.Pointer _kCFBundleDevelopmentRegionKey = + _lookup('kCFBundleDevelopmentRegionKey'); + + CFStringRef get kCFBundleDevelopmentRegionKey => + _kCFBundleDevelopmentRegionKey.value; + + late final ffi.Pointer _kCFBundleNameKey = + _lookup('kCFBundleNameKey'); + + CFStringRef get kCFBundleNameKey => _kCFBundleNameKey.value; + + late final ffi.Pointer _kCFBundleLocalizationsKey = + _lookup('kCFBundleLocalizationsKey'); + + CFStringRef get kCFBundleLocalizationsKey => _kCFBundleLocalizationsKey.value; + + CFBundleRef CFBundleGetMainBundle() { + return _CFBundleGetMainBundle(); } - late final _sleepPtr = - _lookup>( - 'sleep'); - late final _sleep = _sleepPtr.asFunction(); + late final _CFBundleGetMainBundlePtr = + _lookup>( + 'CFBundleGetMainBundle'); + late final _CFBundleGetMainBundle = + _CFBundleGetMainBundlePtr.asFunction(); - int sysconf( - int arg0, + CFBundleRef CFBundleGetBundleWithIdentifier( + CFStringRef bundleID, ) { - return _sysconf( - arg0, + return _CFBundleGetBundleWithIdentifier( + bundleID, ); } - late final _sysconfPtr = - _lookup>('sysconf'); - late final _sysconf = _sysconfPtr.asFunction(); + late final _CFBundleGetBundleWithIdentifierPtr = + _lookup>( + 'CFBundleGetBundleWithIdentifier'); + late final _CFBundleGetBundleWithIdentifier = + _CFBundleGetBundleWithIdentifierPtr.asFunction< + CFBundleRef Function(CFStringRef)>(); - int tcgetpgrp( - int arg0, - ) { - return _tcgetpgrp( - arg0, - ); + CFArrayRef CFBundleGetAllBundles() { + return _CFBundleGetAllBundles(); } - late final _tcgetpgrpPtr = - _lookup>('tcgetpgrp'); - late final _tcgetpgrp = _tcgetpgrpPtr.asFunction(); + late final _CFBundleGetAllBundlesPtr = + _lookup>( + 'CFBundleGetAllBundles'); + late final _CFBundleGetAllBundles = + _CFBundleGetAllBundlesPtr.asFunction(); - int tcsetpgrp( - int arg0, - int arg1, - ) { - return _tcsetpgrp( - arg0, - arg1, - ); + int CFBundleGetTypeID() { + return _CFBundleGetTypeID(); } - late final _tcsetpgrpPtr = - _lookup>( - 'tcsetpgrp'); - late final _tcsetpgrp = _tcsetpgrpPtr.asFunction(); + late final _CFBundleGetTypeIDPtr = + _lookup>('CFBundleGetTypeID'); + late final _CFBundleGetTypeID = + _CFBundleGetTypeIDPtr.asFunction(); - ffi.Pointer ttyname( - int arg0, + CFBundleRef CFBundleCreate( + CFAllocatorRef allocator, + CFURLRef bundleURL, ) { - return _ttyname( - arg0, + return _CFBundleCreate( + allocator, + bundleURL, ); } - late final _ttynamePtr = - _lookup Function(ffi.Int)>>( - 'ttyname'); - late final _ttyname = - _ttynamePtr.asFunction Function(int)>(); + late final _CFBundleCreatePtr = _lookup< + ffi.NativeFunction>( + 'CFBundleCreate'); + late final _CFBundleCreate = _CFBundleCreatePtr.asFunction< + CFBundleRef Function(CFAllocatorRef, CFURLRef)>(); - int ttyname_r( - int arg0, - ffi.Pointer arg1, - int arg2, + CFArrayRef CFBundleCreateBundlesFromDirectory( + CFAllocatorRef allocator, + CFURLRef directoryURL, + CFStringRef bundleType, ) { - return _ttyname_r( - arg0, - arg1, - arg2, + return _CFBundleCreateBundlesFromDirectory( + allocator, + directoryURL, + bundleType, ); } - late final _ttyname_rPtr = _lookup< + late final _CFBundleCreateBundlesFromDirectoryPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('ttyname_r'); - late final _ttyname_r = - _ttyname_rPtr.asFunction, int)>(); + CFArrayRef Function(CFAllocatorRef, CFURLRef, + CFStringRef)>>('CFBundleCreateBundlesFromDirectory'); + late final _CFBundleCreateBundlesFromDirectory = + _CFBundleCreateBundlesFromDirectoryPtr.asFunction< + CFArrayRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); - int unlink( - ffi.Pointer arg0, + CFURLRef CFBundleCopyBundleURL( + CFBundleRef bundle, ) { - return _unlink( - arg0, + return _CFBundleCopyBundleURL( + bundle, ); } - late final _unlinkPtr = - _lookup)>>( - 'unlink'); - late final _unlink = - _unlinkPtr.asFunction)>(); + late final _CFBundleCopyBundleURLPtr = + _lookup>( + 'CFBundleCopyBundleURL'); + late final _CFBundleCopyBundleURL = + _CFBundleCopyBundleURLPtr.asFunction(); - int write( - int __fd, - ffi.Pointer __buf, - int __nbyte, + CFTypeRef CFBundleGetValueForInfoDictionaryKey( + CFBundleRef bundle, + CFStringRef key, ) { - return _write( - __fd, - __buf, - __nbyte, + return _CFBundleGetValueForInfoDictionaryKey( + bundle, + key, ); } - late final _writePtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Int, ffi.Pointer, ffi.Size)>>('write'); - late final _write = - _writePtr.asFunction, int)>(); + late final _CFBundleGetValueForInfoDictionaryKeyPtr = + _lookup>( + 'CFBundleGetValueForInfoDictionaryKey'); + late final _CFBundleGetValueForInfoDictionaryKey = + _CFBundleGetValueForInfoDictionaryKeyPtr.asFunction< + CFTypeRef Function(CFBundleRef, CFStringRef)>(); - int confstr( - int arg0, - ffi.Pointer arg1, - int arg2, + CFDictionaryRef CFBundleGetInfoDictionary( + CFBundleRef bundle, ) { - return _confstr( - arg0, - arg1, - arg2, + return _CFBundleGetInfoDictionary( + bundle, ); } - late final _confstrPtr = _lookup< - ffi.NativeFunction< - ffi.Size Function( - ffi.Int, ffi.Pointer, ffi.Size)>>('confstr'); - late final _confstr = - _confstrPtr.asFunction, int)>(); + late final _CFBundleGetInfoDictionaryPtr = + _lookup>( + 'CFBundleGetInfoDictionary'); + late final _CFBundleGetInfoDictionary = _CFBundleGetInfoDictionaryPtr + .asFunction(); - int getopt( - int arg0, - ffi.Pointer> arg1, - ffi.Pointer arg2, + CFDictionaryRef CFBundleGetLocalInfoDictionary( + CFBundleRef bundle, ) { - return _getopt( - arg0, - arg1, - arg2, + return _CFBundleGetLocalInfoDictionary( + bundle, ); } - late final _getoptPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer>, - ffi.Pointer)>>('getopt'); - late final _getopt = _getoptPtr.asFunction< - int Function( - int, ffi.Pointer>, ffi.Pointer)>(); - - late final ffi.Pointer> _optarg = - _lookup>('optarg'); - - ffi.Pointer get optarg => _optarg.value; - - set optarg(ffi.Pointer value) => _optarg.value = value; - - late final ffi.Pointer _optind = _lookup('optind'); - - int get optind => _optind.value; - - set optind(int value) => _optind.value = value; - - late final ffi.Pointer _opterr = _lookup('opterr'); - - int get opterr => _opterr.value; - - set opterr(int value) => _opterr.value = value; - - late final ffi.Pointer _optopt = _lookup('optopt'); - - int get optopt => _optopt.value; - - set optopt(int value) => _optopt.value = value; + late final _CFBundleGetLocalInfoDictionaryPtr = + _lookup>( + 'CFBundleGetLocalInfoDictionary'); + late final _CFBundleGetLocalInfoDictionary = + _CFBundleGetLocalInfoDictionaryPtr.asFunction< + CFDictionaryRef Function(CFBundleRef)>(); - ffi.Pointer brk( - ffi.Pointer arg0, + void CFBundleGetPackageInfo( + CFBundleRef bundle, + ffi.Pointer packageType, + ffi.Pointer packageCreator, ) { - return _brk( - arg0, + return _CFBundleGetPackageInfo( + bundle, + packageType, + packageCreator, ); } - late final _brkPtr = _lookup< + late final _CFBundleGetPackageInfoPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('brk'); - late final _brk = _brkPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Void Function(CFBundleRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleGetPackageInfo'); + late final _CFBundleGetPackageInfo = _CFBundleGetPackageInfoPtr.asFunction< + void Function(CFBundleRef, ffi.Pointer, ffi.Pointer)>(); - int chroot( - ffi.Pointer arg0, + CFStringRef CFBundleGetIdentifier( + CFBundleRef bundle, ) { - return _chroot( - arg0, + return _CFBundleGetIdentifier( + bundle, ); } - late final _chrootPtr = - _lookup)>>( - 'chroot'); - late final _chroot = - _chrootPtr.asFunction)>(); + late final _CFBundleGetIdentifierPtr = + _lookup>( + 'CFBundleGetIdentifier'); + late final _CFBundleGetIdentifier = + _CFBundleGetIdentifierPtr.asFunction(); - ffi.Pointer crypt( - ffi.Pointer arg0, - ffi.Pointer arg1, + int CFBundleGetVersionNumber( + CFBundleRef bundle, ) { - return _crypt( - arg0, - arg1, + return _CFBundleGetVersionNumber( + bundle, ); } - late final _cryptPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('crypt'); - late final _crypt = _cryptPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + late final _CFBundleGetVersionNumberPtr = + _lookup>( + 'CFBundleGetVersionNumber'); + late final _CFBundleGetVersionNumber = + _CFBundleGetVersionNumberPtr.asFunction(); - void encrypt( - ffi.Pointer arg0, - int arg1, + CFStringRef CFBundleGetDevelopmentRegion( + CFBundleRef bundle, ) { - return _encrypt( - arg0, - arg1, + return _CFBundleGetDevelopmentRegion( + bundle, ); } - late final _encryptPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int)>>('encrypt'); - late final _encrypt = - _encryptPtr.asFunction, int)>(); + late final _CFBundleGetDevelopmentRegionPtr = + _lookup>( + 'CFBundleGetDevelopmentRegion'); + late final _CFBundleGetDevelopmentRegion = _CFBundleGetDevelopmentRegionPtr + .asFunction(); - int fchdir( - int arg0, + CFURLRef CFBundleCopySupportFilesDirectoryURL( + CFBundleRef bundle, ) { - return _fchdir( - arg0, + return _CFBundleCopySupportFilesDirectoryURL( + bundle, ); } - late final _fchdirPtr = - _lookup>('fchdir'); - late final _fchdir = _fchdirPtr.asFunction(); - - int gethostid() { - return _gethostid(); - } - - late final _gethostidPtr = - _lookup>('gethostid'); - late final _gethostid = _gethostidPtr.asFunction(); + late final _CFBundleCopySupportFilesDirectoryURLPtr = + _lookup>( + 'CFBundleCopySupportFilesDirectoryURL'); + late final _CFBundleCopySupportFilesDirectoryURL = + _CFBundleCopySupportFilesDirectoryURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - int getpgid( - int arg0, + CFURLRef CFBundleCopyResourcesDirectoryURL( + CFBundleRef bundle, ) { - return _getpgid( - arg0, + return _CFBundleCopyResourcesDirectoryURL( + bundle, ); } - late final _getpgidPtr = - _lookup>('getpgid'); - late final _getpgid = _getpgidPtr.asFunction(); + late final _CFBundleCopyResourcesDirectoryURLPtr = + _lookup>( + 'CFBundleCopyResourcesDirectoryURL'); + late final _CFBundleCopyResourcesDirectoryURL = + _CFBundleCopyResourcesDirectoryURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - int getsid( - int arg0, + CFURLRef CFBundleCopyPrivateFrameworksURL( + CFBundleRef bundle, ) { - return _getsid( - arg0, + return _CFBundleCopyPrivateFrameworksURL( + bundle, ); } - late final _getsidPtr = - _lookup>('getsid'); - late final _getsid = _getsidPtr.asFunction(); + late final _CFBundleCopyPrivateFrameworksURLPtr = + _lookup>( + 'CFBundleCopyPrivateFrameworksURL'); + late final _CFBundleCopyPrivateFrameworksURL = + _CFBundleCopyPrivateFrameworksURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - int getdtablesize() { - return _getdtablesize(); + CFURLRef CFBundleCopySharedFrameworksURL( + CFBundleRef bundle, + ) { + return _CFBundleCopySharedFrameworksURL( + bundle, + ); } - late final _getdtablesizePtr = - _lookup>('getdtablesize'); - late final _getdtablesize = _getdtablesizePtr.asFunction(); + late final _CFBundleCopySharedFrameworksURLPtr = + _lookup>( + 'CFBundleCopySharedFrameworksURL'); + late final _CFBundleCopySharedFrameworksURL = + _CFBundleCopySharedFrameworksURLPtr.asFunction< + CFURLRef Function(CFBundleRef)>(); - int getpagesize() { - return _getpagesize(); + CFURLRef CFBundleCopySharedSupportURL( + CFBundleRef bundle, + ) { + return _CFBundleCopySharedSupportURL( + bundle, + ); } - late final _getpagesizePtr = - _lookup>('getpagesize'); - late final _getpagesize = _getpagesizePtr.asFunction(); + late final _CFBundleCopySharedSupportURLPtr = + _lookup>( + 'CFBundleCopySharedSupportURL'); + late final _CFBundleCopySharedSupportURL = _CFBundleCopySharedSupportURLPtr + .asFunction(); - ffi.Pointer getpass( - ffi.Pointer arg0, + CFURLRef CFBundleCopyBuiltInPlugInsURL( + CFBundleRef bundle, ) { - return _getpass( - arg0, + return _CFBundleCopyBuiltInPlugInsURL( + bundle, ); } - late final _getpassPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('getpass'); - late final _getpass = _getpassPtr - .asFunction Function(ffi.Pointer)>(); + late final _CFBundleCopyBuiltInPlugInsURLPtr = + _lookup>( + 'CFBundleCopyBuiltInPlugInsURL'); + late final _CFBundleCopyBuiltInPlugInsURL = _CFBundleCopyBuiltInPlugInsURLPtr + .asFunction(); - ffi.Pointer getwd( - ffi.Pointer arg0, + CFDictionaryRef CFBundleCopyInfoDictionaryInDirectory( + CFURLRef bundleURL, ) { - return _getwd( - arg0, + return _CFBundleCopyInfoDictionaryInDirectory( + bundleURL, ); } - late final _getwdPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('getwd'); - late final _getwd = _getwdPtr - .asFunction Function(ffi.Pointer)>(); + late final _CFBundleCopyInfoDictionaryInDirectoryPtr = + _lookup>( + 'CFBundleCopyInfoDictionaryInDirectory'); + late final _CFBundleCopyInfoDictionaryInDirectory = + _CFBundleCopyInfoDictionaryInDirectoryPtr.asFunction< + CFDictionaryRef Function(CFURLRef)>(); - int lchown( - ffi.Pointer arg0, - int arg1, - int arg2, + int CFBundleGetPackageInfoInDirectory( + CFURLRef url, + ffi.Pointer packageType, + ffi.Pointer packageCreator, ) { - return _lchown( - arg0, - arg1, - arg2, + return _CFBundleGetPackageInfoInDirectory( + url, + packageType, + packageCreator, ); } - late final _lchownPtr = _lookup< + late final _CFBundleGetPackageInfoInDirectoryPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, uid_t, gid_t)>>('lchown'); - late final _lchown = - _lchownPtr.asFunction, int, int)>(); + Boolean Function(CFURLRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleGetPackageInfoInDirectory'); + late final _CFBundleGetPackageInfoInDirectory = + _CFBundleGetPackageInfoInDirectoryPtr.asFunction< + int Function(CFURLRef, ffi.Pointer, ffi.Pointer)>(); - int lockf( - int arg0, - int arg1, - int arg2, + CFURLRef CFBundleCopyResourceURL( + CFBundleRef bundle, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _lockf( - arg0, - arg1, - arg2, + return _CFBundleCopyResourceURL( + bundle, + resourceName, + resourceType, + subDirName, ); } - late final _lockfPtr = - _lookup>( - 'lockf'); - late final _lockf = _lockfPtr.asFunction(); + late final _CFBundleCopyResourceURLPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURL'); + late final _CFBundleCopyResourceURL = _CFBundleCopyResourceURLPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); - int nice( - int arg0, + CFArrayRef CFBundleCopyResourceURLsOfType( + CFBundleRef bundle, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _nice( - arg0, + return _CFBundleCopyResourceURLsOfType( + bundle, + resourceType, + subDirName, ); } - late final _nicePtr = - _lookup>('nice'); - late final _nice = _nicePtr.asFunction(); + late final _CFBundleCopyResourceURLsOfTypePtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFBundleRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfType'); + late final _CFBundleCopyResourceURLsOfType = + _CFBundleCopyResourceURLsOfTypePtr.asFunction< + CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef)>(); - int pread( - int __fd, - ffi.Pointer __buf, - int __nbyte, - int __offset, + CFStringRef CFBundleCopyLocalizedString( + CFBundleRef bundle, + CFStringRef key, + CFStringRef value, + CFStringRef tableName, ) { - return _pread( - __fd, - __buf, - __nbyte, - __offset, + return _CFBundleCopyLocalizedString( + bundle, + key, + value, + tableName, ); } - late final _preadPtr = _lookup< + late final _CFBundleCopyLocalizedStringPtr = _lookup< ffi.NativeFunction< - ssize_t Function( - ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pread'); - late final _pread = _preadPtr - .asFunction, int, int)>(); + CFStringRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyLocalizedString'); + late final _CFBundleCopyLocalizedString = + _CFBundleCopyLocalizedStringPtr.asFunction< + CFStringRef Function( + CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); - int pwrite( - int __fd, - ffi.Pointer __buf, - int __nbyte, - int __offset, + CFURLRef CFBundleCopyResourceURLInDirectory( + CFURLRef bundleURL, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _pwrite( - __fd, - __buf, - __nbyte, - __offset, + return _CFBundleCopyResourceURLInDirectory( + bundleURL, + resourceName, + resourceType, + subDirName, ); } - late final _pwritePtr = _lookup< + late final _CFBundleCopyResourceURLInDirectoryPtr = _lookup< ffi.NativeFunction< - ssize_t Function( - ffi.Int, ffi.Pointer, ffi.Size, off_t)>>('pwrite'); - late final _pwrite = _pwritePtr - .asFunction, int, int)>(); + CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLInDirectory'); + late final _CFBundleCopyResourceURLInDirectory = + _CFBundleCopyResourceURLInDirectoryPtr.asFunction< + CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, CFStringRef)>(); - ffi.Pointer sbrk( - int arg0, + CFArrayRef CFBundleCopyResourceURLsOfTypeInDirectory( + CFURLRef bundleURL, + CFStringRef resourceType, + CFStringRef subDirName, ) { - return _sbrk( - arg0, + return _CFBundleCopyResourceURLsOfTypeInDirectory( + bundleURL, + resourceType, + subDirName, ); } - late final _sbrkPtr = - _lookup Function(ffi.Int)>>( - 'sbrk'); - late final _sbrk = _sbrkPtr.asFunction Function(int)>(); - - int setpgrp() { - return _setpgrp(); - } - - late final _setpgrpPtr = - _lookup>('setpgrp'); - late final _setpgrp = _setpgrpPtr.asFunction(); + late final _CFBundleCopyResourceURLsOfTypeInDirectoryPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFURLRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfTypeInDirectory'); + late final _CFBundleCopyResourceURLsOfTypeInDirectory = + _CFBundleCopyResourceURLsOfTypeInDirectoryPtr.asFunction< + CFArrayRef Function(CFURLRef, CFStringRef, CFStringRef)>(); - int setregid( - int arg0, - int arg1, + CFArrayRef CFBundleCopyBundleLocalizations( + CFBundleRef bundle, ) { - return _setregid( - arg0, - arg1, + return _CFBundleCopyBundleLocalizations( + bundle, ); } - late final _setregidPtr = - _lookup>('setregid'); - late final _setregid = _setregidPtr.asFunction(); + late final _CFBundleCopyBundleLocalizationsPtr = + _lookup>( + 'CFBundleCopyBundleLocalizations'); + late final _CFBundleCopyBundleLocalizations = + _CFBundleCopyBundleLocalizationsPtr.asFunction< + CFArrayRef Function(CFBundleRef)>(); - int setreuid( - int arg0, - int arg1, + CFArrayRef CFBundleCopyPreferredLocalizationsFromArray( + CFArrayRef locArray, ) { - return _setreuid( - arg0, - arg1, + return _CFBundleCopyPreferredLocalizationsFromArray( + locArray, ); } - late final _setreuidPtr = - _lookup>('setreuid'); - late final _setreuid = _setreuidPtr.asFunction(); + late final _CFBundleCopyPreferredLocalizationsFromArrayPtr = + _lookup>( + 'CFBundleCopyPreferredLocalizationsFromArray'); + late final _CFBundleCopyPreferredLocalizationsFromArray = + _CFBundleCopyPreferredLocalizationsFromArrayPtr.asFunction< + CFArrayRef Function(CFArrayRef)>(); - void sync1() { - return _sync1(); + CFArrayRef CFBundleCopyLocalizationsForPreferences( + CFArrayRef locArray, + CFArrayRef prefArray, + ) { + return _CFBundleCopyLocalizationsForPreferences( + locArray, + prefArray, + ); } - late final _sync1Ptr = - _lookup>('sync'); - late final _sync1 = _sync1Ptr.asFunction(); + late final _CFBundleCopyLocalizationsForPreferencesPtr = + _lookup>( + 'CFBundleCopyLocalizationsForPreferences'); + late final _CFBundleCopyLocalizationsForPreferences = + _CFBundleCopyLocalizationsForPreferencesPtr.asFunction< + CFArrayRef Function(CFArrayRef, CFArrayRef)>(); - int truncate( - ffi.Pointer arg0, - int arg1, + CFURLRef CFBundleCopyResourceURLForLocalization( + CFBundleRef bundle, + CFStringRef resourceName, + CFStringRef resourceType, + CFStringRef subDirName, + CFStringRef localizationName, ) { - return _truncate( - arg0, - arg1, + return _CFBundleCopyResourceURLForLocalization( + bundle, + resourceName, + resourceType, + subDirName, + localizationName, ); } - late final _truncatePtr = _lookup< - ffi.NativeFunction, off_t)>>( - 'truncate'); - late final _truncate = - _truncatePtr.asFunction, int)>(); + late final _CFBundleCopyResourceURLForLocalizationPtr = _lookup< + ffi.NativeFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLForLocalization'); + late final _CFBundleCopyResourceURLForLocalization = + _CFBundleCopyResourceURLForLocalizationPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, + CFStringRef)>(); - int ualarm( - int arg0, - int arg1, + CFArrayRef CFBundleCopyResourceURLsOfTypeForLocalization( + CFBundleRef bundle, + CFStringRef resourceType, + CFStringRef subDirName, + CFStringRef localizationName, ) { - return _ualarm( - arg0, - arg1, + return _CFBundleCopyResourceURLsOfTypeForLocalization( + bundle, + resourceType, + subDirName, + localizationName, ); } - late final _ualarmPtr = - _lookup>( - 'ualarm'); - late final _ualarm = _ualarmPtr.asFunction(); + late final _CFBundleCopyResourceURLsOfTypeForLocalizationPtr = _lookup< + ffi.NativeFunction< + CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef, + CFStringRef)>>('CFBundleCopyResourceURLsOfTypeForLocalization'); + late final _CFBundleCopyResourceURLsOfTypeForLocalization = + _CFBundleCopyResourceURLsOfTypeForLocalizationPtr.asFunction< + CFArrayRef Function( + CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); - int usleep( - int arg0, + CFDictionaryRef CFBundleCopyInfoDictionaryForURL( + CFURLRef url, ) { - return _usleep( - arg0, + return _CFBundleCopyInfoDictionaryForURL( + url, ); } - late final _usleepPtr = - _lookup>('usleep'); - late final _usleep = _usleepPtr.asFunction(); + late final _CFBundleCopyInfoDictionaryForURLPtr = + _lookup>( + 'CFBundleCopyInfoDictionaryForURL'); + late final _CFBundleCopyInfoDictionaryForURL = + _CFBundleCopyInfoDictionaryForURLPtr.asFunction< + CFDictionaryRef Function(CFURLRef)>(); - int vfork() { - return _vfork(); + CFArrayRef CFBundleCopyLocalizationsForURL( + CFURLRef url, + ) { + return _CFBundleCopyLocalizationsForURL( + url, + ); } - late final _vforkPtr = - _lookup>('vfork'); - late final _vfork = _vforkPtr.asFunction(); + late final _CFBundleCopyLocalizationsForURLPtr = + _lookup>( + 'CFBundleCopyLocalizationsForURL'); + late final _CFBundleCopyLocalizationsForURL = + _CFBundleCopyLocalizationsForURLPtr.asFunction< + CFArrayRef Function(CFURLRef)>(); - int fsync( - int arg0, + CFArrayRef CFBundleCopyExecutableArchitecturesForURL( + CFURLRef url, ) { - return _fsync( - arg0, + return _CFBundleCopyExecutableArchitecturesForURL( + url, ); } - late final _fsyncPtr = - _lookup>('fsync'); - late final _fsync = _fsyncPtr.asFunction(); + late final _CFBundleCopyExecutableArchitecturesForURLPtr = + _lookup>( + 'CFBundleCopyExecutableArchitecturesForURL'); + late final _CFBundleCopyExecutableArchitecturesForURL = + _CFBundleCopyExecutableArchitecturesForURLPtr.asFunction< + CFArrayRef Function(CFURLRef)>(); - int ftruncate( - int arg0, - int arg1, + CFURLRef CFBundleCopyExecutableURL( + CFBundleRef bundle, ) { - return _ftruncate( - arg0, - arg1, + return _CFBundleCopyExecutableURL( + bundle, ); } - late final _ftruncatePtr = - _lookup>( - 'ftruncate'); - late final _ftruncate = _ftruncatePtr.asFunction(); + late final _CFBundleCopyExecutableURLPtr = + _lookup>( + 'CFBundleCopyExecutableURL'); + late final _CFBundleCopyExecutableURL = _CFBundleCopyExecutableURLPtr + .asFunction(); - int getlogin_r( - ffi.Pointer arg0, - int arg1, + CFArrayRef CFBundleCopyExecutableArchitectures( + CFBundleRef bundle, ) { - return _getlogin_r( - arg0, - arg1, + return _CFBundleCopyExecutableArchitectures( + bundle, ); } - late final _getlogin_rPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('getlogin_r'); - late final _getlogin_r = - _getlogin_rPtr.asFunction, int)>(); + late final _CFBundleCopyExecutableArchitecturesPtr = + _lookup>( + 'CFBundleCopyExecutableArchitectures'); + late final _CFBundleCopyExecutableArchitectures = + _CFBundleCopyExecutableArchitecturesPtr.asFunction< + CFArrayRef Function(CFBundleRef)>(); - int fchown( - int arg0, - int arg1, - int arg2, + int CFBundlePreflightExecutable( + CFBundleRef bundle, + ffi.Pointer error, ) { - return _fchown( - arg0, - arg1, - arg2, + return _CFBundlePreflightExecutable( + bundle, + error, ); } - late final _fchownPtr = - _lookup>( - 'fchown'); - late final _fchown = _fchownPtr.asFunction(); + late final _CFBundlePreflightExecutablePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBundleRef, + ffi.Pointer)>>('CFBundlePreflightExecutable'); + late final _CFBundlePreflightExecutable = _CFBundlePreflightExecutablePtr + .asFunction)>(); - int gethostname( - ffi.Pointer arg0, - int arg1, + int CFBundleLoadExecutableAndReturnError( + CFBundleRef bundle, + ffi.Pointer error, ) { - return _gethostname( - arg0, - arg1, + return _CFBundleLoadExecutableAndReturnError( + bundle, + error, ); } - late final _gethostnamePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size)>>('gethostname'); - late final _gethostname = - _gethostnamePtr.asFunction, int)>(); + late final _CFBundleLoadExecutableAndReturnErrorPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFBundleRef, ffi.Pointer)>>( + 'CFBundleLoadExecutableAndReturnError'); + late final _CFBundleLoadExecutableAndReturnError = + _CFBundleLoadExecutableAndReturnErrorPtr.asFunction< + int Function(CFBundleRef, ffi.Pointer)>(); - int readlink( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + int CFBundleLoadExecutable( + CFBundleRef bundle, ) { - return _readlink( - arg0, - arg1, - arg2, + return _CFBundleLoadExecutable( + bundle, ); } - late final _readlinkPtr = _lookup< - ffi.NativeFunction< - ssize_t Function(ffi.Pointer, ffi.Pointer, - ffi.Size)>>('readlink'); - late final _readlink = _readlinkPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final _CFBundleLoadExecutablePtr = + _lookup>( + 'CFBundleLoadExecutable'); + late final _CFBundleLoadExecutable = + _CFBundleLoadExecutablePtr.asFunction(); - int setegid( - int arg0, + int CFBundleIsExecutableLoaded( + CFBundleRef bundle, ) { - return _setegid( - arg0, + return _CFBundleIsExecutableLoaded( + bundle, ); } - late final _setegidPtr = - _lookup>('setegid'); - late final _setegid = _setegidPtr.asFunction(); + late final _CFBundleIsExecutableLoadedPtr = + _lookup>( + 'CFBundleIsExecutableLoaded'); + late final _CFBundleIsExecutableLoaded = + _CFBundleIsExecutableLoadedPtr.asFunction(); - int seteuid( - int arg0, + void CFBundleUnloadExecutable( + CFBundleRef bundle, ) { - return _seteuid( - arg0, + return _CFBundleUnloadExecutable( + bundle, ); } - late final _seteuidPtr = - _lookup>('seteuid'); - late final _seteuid = _seteuidPtr.asFunction(); + late final _CFBundleUnloadExecutablePtr = + _lookup>( + 'CFBundleUnloadExecutable'); + late final _CFBundleUnloadExecutable = + _CFBundleUnloadExecutablePtr.asFunction(); - int symlink( - ffi.Pointer arg0, - ffi.Pointer arg1, + ffi.Pointer CFBundleGetFunctionPointerForName( + CFBundleRef bundle, + CFStringRef functionName, ) { - return _symlink( - arg0, - arg1, + return _CFBundleGetFunctionPointerForName( + bundle, + functionName, ); } - late final _symlinkPtr = _lookup< + late final _CFBundleGetFunctionPointerForNamePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('symlink'); - late final _symlink = _symlinkPtr - .asFunction, ffi.Pointer)>(); + ffi.Pointer Function( + CFBundleRef, CFStringRef)>>('CFBundleGetFunctionPointerForName'); + late final _CFBundleGetFunctionPointerForName = + _CFBundleGetFunctionPointerForNamePtr.asFunction< + ffi.Pointer Function(CFBundleRef, CFStringRef)>(); - int pselect( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, + void CFBundleGetFunctionPointersForNames( + CFBundleRef bundle, + CFArrayRef functionNames, + ffi.Pointer> ftbl, ) { - return _pselect( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _CFBundleGetFunctionPointersForNames( + bundle, + functionNames, + ftbl, ); } - late final _pselectPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('pselect'); - late final _pselect = _pselectPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); + late final _CFBundleGetFunctionPointersForNamesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBundleRef, CFArrayRef, + ffi.Pointer>)>>( + 'CFBundleGetFunctionPointersForNames'); + late final _CFBundleGetFunctionPointersForNames = + _CFBundleGetFunctionPointersForNamesPtr.asFunction< + void Function( + CFBundleRef, CFArrayRef, ffi.Pointer>)>(); - int select( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, + ffi.Pointer CFBundleGetDataPointerForName( + CFBundleRef bundle, + CFStringRef symbolName, ) { - return _select( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFBundleGetDataPointerForName( + bundle, + symbolName, ); } - late final _selectPtr = _lookup< + late final _CFBundleGetDataPointerForNamePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('select'); - late final _select = _selectPtr.asFunction< - int Function(int, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + CFBundleRef, CFStringRef)>>('CFBundleGetDataPointerForName'); + late final _CFBundleGetDataPointerForName = _CFBundleGetDataPointerForNamePtr + .asFunction Function(CFBundleRef, CFStringRef)>(); - int accessx_np( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - int arg3, + void CFBundleGetDataPointersForNames( + CFBundleRef bundle, + CFArrayRef symbolNames, + ffi.Pointer> stbl, ) { - return _accessx_np( - arg0, - arg1, - arg2, - arg3, + return _CFBundleGetDataPointersForNames( + bundle, + symbolNames, + stbl, ); } - late final _accessx_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, - ffi.Pointer, uid_t)>>('accessx_np'); - late final _accessx_np = _accessx_npPtr.asFunction< - int Function( - ffi.Pointer, int, ffi.Pointer, int)>(); + late final _CFBundleGetDataPointersForNamesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFBundleRef, CFArrayRef, + ffi.Pointer>)>>( + 'CFBundleGetDataPointersForNames'); + late final _CFBundleGetDataPointersForNames = + _CFBundleGetDataPointersForNamesPtr.asFunction< + void Function( + CFBundleRef, CFArrayRef, ffi.Pointer>)>(); - int acct( - ffi.Pointer arg0, + CFURLRef CFBundleCopyAuxiliaryExecutableURL( + CFBundleRef bundle, + CFStringRef executableName, ) { - return _acct( - arg0, + return _CFBundleCopyAuxiliaryExecutableURL( + bundle, + executableName, ); } - late final _acctPtr = - _lookup)>>( - 'acct'); - late final _acct = _acctPtr.asFunction)>(); + late final _CFBundleCopyAuxiliaryExecutableURLPtr = + _lookup>( + 'CFBundleCopyAuxiliaryExecutableURL'); + late final _CFBundleCopyAuxiliaryExecutableURL = + _CFBundleCopyAuxiliaryExecutableURLPtr.asFunction< + CFURLRef Function(CFBundleRef, CFStringRef)>(); - int add_profil( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, + int CFBundleIsExecutableLoadable( + CFBundleRef bundle, ) { - return _add_profil( - arg0, - arg1, - arg2, - arg3, + return _CFBundleIsExecutableLoadable( + bundle, ); } - late final _add_profilPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, - ffi.UnsignedInt)>>('add_profil'); - late final _add_profil = _add_profilPtr - .asFunction, int, int, int)>(); + late final _CFBundleIsExecutableLoadablePtr = + _lookup>( + 'CFBundleIsExecutableLoadable'); + late final _CFBundleIsExecutableLoadable = + _CFBundleIsExecutableLoadablePtr.asFunction(); - void endusershell() { - return _endusershell(); + int CFBundleIsExecutableLoadableForURL( + CFURLRef url, + ) { + return _CFBundleIsExecutableLoadableForURL( + url, + ); } - late final _endusershellPtr = - _lookup>('endusershell'); - late final _endusershell = _endusershellPtr.asFunction(); + late final _CFBundleIsExecutableLoadableForURLPtr = + _lookup>( + 'CFBundleIsExecutableLoadableForURL'); + late final _CFBundleIsExecutableLoadableForURL = + _CFBundleIsExecutableLoadableForURLPtr.asFunction< + int Function(CFURLRef)>(); - int execvP( - ffi.Pointer __file, - ffi.Pointer __searchpath, - ffi.Pointer> __argv, + int CFBundleIsArchitectureLoadable( + int arch, ) { - return _execvP( - __file, - __searchpath, - __argv, + return _CFBundleIsArchitectureLoadable( + arch, ); } - late final _execvPPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>('execvP'); - late final _execvP = _execvPPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + late final _CFBundleIsArchitectureLoadablePtr = + _lookup>( + 'CFBundleIsArchitectureLoadable'); + late final _CFBundleIsArchitectureLoadable = + _CFBundleIsArchitectureLoadablePtr.asFunction(); - ffi.Pointer fflagstostr( - int arg0, + CFPlugInRef CFBundleGetPlugIn( + CFBundleRef bundle, ) { - return _fflagstostr( - arg0, + return _CFBundleGetPlugIn( + bundle, ); } - late final _fflagstostrPtr = _lookup< - ffi.NativeFunction Function(ffi.UnsignedLong)>>( - 'fflagstostr'); - late final _fflagstostr = - _fflagstostrPtr.asFunction Function(int)>(); + late final _CFBundleGetPlugInPtr = + _lookup>( + 'CFBundleGetPlugIn'); + late final _CFBundleGetPlugIn = + _CFBundleGetPlugInPtr.asFunction(); - int getdomainname( - ffi.Pointer arg0, - int arg1, + int CFBundleOpenBundleResourceMap( + CFBundleRef bundle, ) { - return _getdomainname( - arg0, - arg1, + return _CFBundleOpenBundleResourceMap( + bundle, ); } - late final _getdomainnamePtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'getdomainname'); - late final _getdomainname = - _getdomainnamePtr.asFunction, int)>(); + late final _CFBundleOpenBundleResourceMapPtr = + _lookup>( + 'CFBundleOpenBundleResourceMap'); + late final _CFBundleOpenBundleResourceMap = + _CFBundleOpenBundleResourceMapPtr.asFunction(); - int getgrouplist( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + int CFBundleOpenBundleResourceFiles( + CFBundleRef bundle, + ffi.Pointer refNum, + ffi.Pointer localizedRefNum, ) { - return _getgrouplist( - arg0, - arg1, - arg2, - arg3, + return _CFBundleOpenBundleResourceFiles( + bundle, + refNum, + localizedRefNum, ); } - late final _getgrouplistPtr = _lookup< + late final _CFBundleOpenBundleResourceFilesPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Pointer, - ffi.Pointer)>>('getgrouplist'); - late final _getgrouplist = _getgrouplistPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, - ffi.Pointer)>(); + SInt32 Function(CFBundleRef, ffi.Pointer, + ffi.Pointer)>>('CFBundleOpenBundleResourceFiles'); + late final _CFBundleOpenBundleResourceFiles = + _CFBundleOpenBundleResourceFilesPtr.asFunction< + int Function(CFBundleRef, ffi.Pointer, + ffi.Pointer)>(); - int gethostuuid( - ffi.Pointer arg0, - ffi.Pointer arg1, + void CFBundleCloseBundleResourceMap( + CFBundleRef bundle, + int refNum, ) { - return _gethostuuid( - arg0, - arg1, + return _CFBundleCloseBundleResourceMap( + bundle, + refNum, ); } - late final _gethostuuidPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('gethostuuid'); - late final _gethostuuid = _gethostuuidPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _CFBundleCloseBundleResourceMapPtr = _lookup< + ffi.NativeFunction>( + 'CFBundleCloseBundleResourceMap'); + late final _CFBundleCloseBundleResourceMap = + _CFBundleCloseBundleResourceMapPtr.asFunction< + void Function(CFBundleRef, int)>(); - int getmode( - ffi.Pointer arg0, - int arg1, - ) { - return _getmode( - arg0, - arg1, - ); + int CFMessagePortGetTypeID() { + return _CFMessagePortGetTypeID(); } - late final _getmodePtr = _lookup< - ffi.NativeFunction, mode_t)>>( - 'getmode'); - late final _getmode = - _getmodePtr.asFunction, int)>(); + late final _CFMessagePortGetTypeIDPtr = + _lookup>( + 'CFMessagePortGetTypeID'); + late final _CFMessagePortGetTypeID = + _CFMessagePortGetTypeIDPtr.asFunction(); - int getpeereid( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + CFMessagePortRef CFMessagePortCreateLocal( + CFAllocatorRef allocator, + CFStringRef name, + CFMessagePortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, ) { - return _getpeereid( - arg0, - arg1, - arg2, + return _CFMessagePortCreateLocal( + allocator, + name, + callout, + context, + shouldFreeInfo, ); } - late final _getpeereidPtr = _lookup< + late final _CFMessagePortCreateLocalPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Pointer)>>('getpeereid'); - late final _getpeereid = _getpeereidPtr - .asFunction, ffi.Pointer)>(); + CFMessagePortRef Function( + CFAllocatorRef, + CFStringRef, + CFMessagePortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMessagePortCreateLocal'); + late final _CFMessagePortCreateLocal = + _CFMessagePortCreateLocalPtr.asFunction< + CFMessagePortRef Function( + CFAllocatorRef, + CFStringRef, + CFMessagePortCallBack, + ffi.Pointer, + ffi.Pointer)>(); - int getsgroups_np( - ffi.Pointer arg0, - ffi.Pointer arg1, + CFMessagePortRef CFMessagePortCreateRemote( + CFAllocatorRef allocator, + CFStringRef name, ) { - return _getsgroups_np( - arg0, - arg1, + return _CFMessagePortCreateRemote( + allocator, + name, ); } - late final _getsgroups_npPtr = _lookup< + late final _CFMessagePortCreateRemotePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('getsgroups_np'); - late final _getsgroups_np = _getsgroups_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer getusershell() { - return _getusershell(); - } - - late final _getusershellPtr = - _lookup Function()>>( - 'getusershell'); - late final _getusershell = - _getusershellPtr.asFunction Function()>(); + CFMessagePortRef Function( + CFAllocatorRef, CFStringRef)>>('CFMessagePortCreateRemote'); + late final _CFMessagePortCreateRemote = _CFMessagePortCreateRemotePtr + .asFunction(); - int getwgroups_np( - ffi.Pointer arg0, - ffi.Pointer arg1, + int CFMessagePortIsRemote( + CFMessagePortRef ms, ) { - return _getwgroups_np( - arg0, - arg1, + return _CFMessagePortIsRemote( + ms, ); } - late final _getwgroups_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('getwgroups_np'); - late final _getwgroups_np = _getwgroups_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + late final _CFMessagePortIsRemotePtr = + _lookup>( + 'CFMessagePortIsRemote'); + late final _CFMessagePortIsRemote = + _CFMessagePortIsRemotePtr.asFunction(); - int initgroups( - ffi.Pointer arg0, - int arg1, + CFStringRef CFMessagePortGetName( + CFMessagePortRef ms, ) { - return _initgroups( - arg0, - arg1, + return _CFMessagePortGetName( + ms, ); } - late final _initgroupsPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'initgroups'); - late final _initgroups = - _initgroupsPtr.asFunction, int)>(); + late final _CFMessagePortGetNamePtr = + _lookup>( + 'CFMessagePortGetName'); + late final _CFMessagePortGetName = _CFMessagePortGetNamePtr.asFunction< + CFStringRef Function(CFMessagePortRef)>(); - int issetugid() { - return _issetugid(); + int CFMessagePortSetName( + CFMessagePortRef ms, + CFStringRef newName, + ) { + return _CFMessagePortSetName( + ms, + newName, + ); } - late final _issetugidPtr = - _lookup>('issetugid'); - late final _issetugid = _issetugidPtr.asFunction(); + late final _CFMessagePortSetNamePtr = _lookup< + ffi.NativeFunction>( + 'CFMessagePortSetName'); + late final _CFMessagePortSetName = _CFMessagePortSetNamePtr.asFunction< + int Function(CFMessagePortRef, CFStringRef)>(); - ffi.Pointer mkdtemp( - ffi.Pointer arg0, + void CFMessagePortGetContext( + CFMessagePortRef ms, + ffi.Pointer context, ) { - return _mkdtemp( - arg0, + return _CFMessagePortGetContext( + ms, + context, ); } - late final _mkdtempPtr = _lookup< + late final _CFMessagePortGetContextPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('mkdtemp'); - late final _mkdtemp = _mkdtempPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Void Function(CFMessagePortRef, + ffi.Pointer)>>('CFMessagePortGetContext'); + late final _CFMessagePortGetContext = _CFMessagePortGetContextPtr.asFunction< + void Function(CFMessagePortRef, ffi.Pointer)>(); - int mknod( - ffi.Pointer arg0, - int arg1, - int arg2, + void CFMessagePortInvalidate( + CFMessagePortRef ms, ) { - return _mknod( - arg0, - arg1, - arg2, + return _CFMessagePortInvalidate( + ms, ); } - late final _mknodPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, mode_t, dev_t)>>('mknod'); - late final _mknod = - _mknodPtr.asFunction, int, int)>(); + late final _CFMessagePortInvalidatePtr = + _lookup>( + 'CFMessagePortInvalidate'); + late final _CFMessagePortInvalidate = + _CFMessagePortInvalidatePtr.asFunction(); - int mkpath_np( - ffi.Pointer path, - int omode, + int CFMessagePortIsValid( + CFMessagePortRef ms, ) { - return _mkpath_np( - path, - omode, + return _CFMessagePortIsValid( + ms, ); } - late final _mkpath_npPtr = _lookup< - ffi.NativeFunction, mode_t)>>( - 'mkpath_np'); - late final _mkpath_np = - _mkpath_npPtr.asFunction, int)>(); + late final _CFMessagePortIsValidPtr = + _lookup>( + 'CFMessagePortIsValid'); + late final _CFMessagePortIsValid = + _CFMessagePortIsValidPtr.asFunction(); - int mkpathat_np( - int dfd, - ffi.Pointer path, - int omode, + CFMessagePortInvalidationCallBack CFMessagePortGetInvalidationCallBack( + CFMessagePortRef ms, ) { - return _mkpathat_np( - dfd, - path, - omode, + return _CFMessagePortGetInvalidationCallBack( + ms, ); } - late final _mkpathat_npPtr = _lookup< + late final _CFMessagePortGetInvalidationCallBackPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, mode_t)>>('mkpathat_np'); - late final _mkpathat_np = _mkpathat_npPtr - .asFunction, int)>(); + CFMessagePortInvalidationCallBack Function( + CFMessagePortRef)>>('CFMessagePortGetInvalidationCallBack'); + late final _CFMessagePortGetInvalidationCallBack = + _CFMessagePortGetInvalidationCallBackPtr.asFunction< + CFMessagePortInvalidationCallBack Function(CFMessagePortRef)>(); - int mkstemps( - ffi.Pointer arg0, - int arg1, + void CFMessagePortSetInvalidationCallBack( + CFMessagePortRef ms, + CFMessagePortInvalidationCallBack callout, ) { - return _mkstemps( - arg0, - arg1, + return _CFMessagePortSetInvalidationCallBack( + ms, + callout, ); } - late final _mkstempsPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'mkstemps'); - late final _mkstemps = - _mkstempsPtr.asFunction, int)>(); + late final _CFMessagePortSetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMessagePortRef, CFMessagePortInvalidationCallBack)>>( + 'CFMessagePortSetInvalidationCallBack'); + late final _CFMessagePortSetInvalidationCallBack = + _CFMessagePortSetInvalidationCallBackPtr.asFunction< + void Function(CFMessagePortRef, CFMessagePortInvalidationCallBack)>(); - int mkostemp( - ffi.Pointer path, - int oflags, + int CFMessagePortSendRequest( + CFMessagePortRef remote, + int msgid, + CFDataRef data, + double sendTimeout, + double rcvTimeout, + CFStringRef replyMode, + ffi.Pointer returnData, ) { - return _mkostemp( - path, - oflags, + return _CFMessagePortSendRequest( + remote, + msgid, + data, + sendTimeout, + rcvTimeout, + replyMode, + returnData, ); } - late final _mkostempPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'mkostemp'); - late final _mkostemp = - _mkostempPtr.asFunction, int)>(); + late final _CFMessagePortSendRequestPtr = _lookup< + ffi.NativeFunction< + SInt32 Function( + CFMessagePortRef, + SInt32, + CFDataRef, + CFTimeInterval, + CFTimeInterval, + CFStringRef, + ffi.Pointer)>>('CFMessagePortSendRequest'); + late final _CFMessagePortSendRequest = + _CFMessagePortSendRequestPtr.asFunction< + int Function(CFMessagePortRef, int, CFDataRef, double, double, + CFStringRef, ffi.Pointer)>(); - int mkostemps( - ffi.Pointer path, - int slen, - int oflags, + CFRunLoopSourceRef CFMessagePortCreateRunLoopSource( + CFAllocatorRef allocator, + CFMessagePortRef local, + int order, ) { - return _mkostemps( - path, - slen, - oflags, + return _CFMessagePortCreateRunLoopSource( + allocator, + local, + order, ); } - late final _mkostempsPtr = _lookup< + late final _CFMessagePortCreateRunLoopSourcePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int, ffi.Int)>>('mkostemps'); - late final _mkostemps = - _mkostempsPtr.asFunction, int, int)>(); + CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, + CFIndex)>>('CFMessagePortCreateRunLoopSource'); + late final _CFMessagePortCreateRunLoopSource = + _CFMessagePortCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, int)>(); - int mkstemp_dprotected_np( - ffi.Pointer path, - int dpclass, - int dpflags, + void CFMessagePortSetDispatchQueue( + CFMessagePortRef ms, + Dartdispatch_queue_t queue, ) { - return _mkstemp_dprotected_np( - path, - dpclass, - dpflags, + return _CFMessagePortSetDispatchQueue( + ms, + queue.ref.pointer, ); } - late final _mkstemp_dprotected_npPtr = _lookup< + late final _CFMessagePortSetDispatchQueuePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Int)>>('mkstemp_dprotected_np'); - late final _mkstemp_dprotected_np = _mkstemp_dprotected_npPtr - .asFunction, int, int)>(); + ffi.Void Function(CFMessagePortRef, + dispatch_queue_t)>>('CFMessagePortSetDispatchQueue'); + late final _CFMessagePortSetDispatchQueue = _CFMessagePortSetDispatchQueuePtr + .asFunction(); - ffi.Pointer mkdtempat_np( - int dfd, - ffi.Pointer path, - ) { - return _mkdtempat_np( - dfd, - path, - ); - } + late final ffi.Pointer _kCFPlugInDynamicRegistrationKey = + _lookup('kCFPlugInDynamicRegistrationKey'); - late final _mkdtempat_npPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer)>>('mkdtempat_np'); - late final _mkdtempat_np = _mkdtempat_npPtr - .asFunction Function(int, ffi.Pointer)>(); + CFStringRef get kCFPlugInDynamicRegistrationKey => + _kCFPlugInDynamicRegistrationKey.value; - int mkstempsat_np( - int dfd, - ffi.Pointer path, - int slen, - ) { - return _mkstempsat_np( - dfd, - path, - slen, - ); - } + late final ffi.Pointer _kCFPlugInDynamicRegisterFunctionKey = + _lookup('kCFPlugInDynamicRegisterFunctionKey'); - late final _mkstempsat_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer, ffi.Int)>>('mkstempsat_np'); - late final _mkstempsat_np = _mkstempsat_npPtr - .asFunction, int)>(); + CFStringRef get kCFPlugInDynamicRegisterFunctionKey => + _kCFPlugInDynamicRegisterFunctionKey.value; - int mkostempsat_np( - int dfd, - ffi.Pointer path, - int slen, - int oflags, - ) { - return _mkostempsat_np( - dfd, - path, - slen, - oflags, - ); + late final ffi.Pointer _kCFPlugInUnloadFunctionKey = + _lookup('kCFPlugInUnloadFunctionKey'); + + CFStringRef get kCFPlugInUnloadFunctionKey => + _kCFPlugInUnloadFunctionKey.value; + + late final ffi.Pointer _kCFPlugInFactoriesKey = + _lookup('kCFPlugInFactoriesKey'); + + CFStringRef get kCFPlugInFactoriesKey => _kCFPlugInFactoriesKey.value; + + late final ffi.Pointer _kCFPlugInTypesKey = + _lookup('kCFPlugInTypesKey'); + + CFStringRef get kCFPlugInTypesKey => _kCFPlugInTypesKey.value; + + int CFPlugInGetTypeID() { + return _CFPlugInGetTypeID(); } - late final _mkostempsat_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Int)>>('mkostempsat_np'); - late final _mkostempsat_np = _mkostempsat_npPtr - .asFunction, int, int)>(); + late final _CFPlugInGetTypeIDPtr = + _lookup>('CFPlugInGetTypeID'); + late final _CFPlugInGetTypeID = + _CFPlugInGetTypeIDPtr.asFunction(); - int nfssvc( - int arg0, - ffi.Pointer arg1, + CFPlugInRef CFPlugInCreate( + CFAllocatorRef allocator, + CFURLRef plugInURL, ) { - return _nfssvc( - arg0, - arg1, + return _CFPlugInCreate( + allocator, + plugInURL, ); } - late final _nfssvcPtr = _lookup< - ffi.NativeFunction)>>( - 'nfssvc'); - late final _nfssvc = - _nfssvcPtr.asFunction)>(); + late final _CFPlugInCreatePtr = _lookup< + ffi.NativeFunction>( + 'CFPlugInCreate'); + late final _CFPlugInCreate = _CFPlugInCreatePtr.asFunction< + CFPlugInRef Function(CFAllocatorRef, CFURLRef)>(); - int profil( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, + CFBundleRef CFPlugInGetBundle( + CFPlugInRef plugIn, ) { - return _profil( - arg0, - arg1, - arg2, - arg3, + return _CFPlugInGetBundle( + plugIn, ); } - late final _profilPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Size, ffi.UnsignedLong, - ffi.UnsignedInt)>>('profil'); - late final _profil = _profilPtr - .asFunction, int, int, int)>(); + late final _CFPlugInGetBundlePtr = + _lookup>( + 'CFPlugInGetBundle'); + late final _CFPlugInGetBundle = + _CFPlugInGetBundlePtr.asFunction(); - int pthread_setugid_np( - int arg0, - int arg1, + void CFPlugInSetLoadOnDemand( + CFPlugInRef plugIn, + int flag, ) { - return _pthread_setugid_np( - arg0, - arg1, + return _CFPlugInSetLoadOnDemand( + plugIn, + flag, ); } - late final _pthread_setugid_npPtr = - _lookup>( - 'pthread_setugid_np'); - late final _pthread_setugid_np = - _pthread_setugid_npPtr.asFunction(); + late final _CFPlugInSetLoadOnDemandPtr = + _lookup>( + 'CFPlugInSetLoadOnDemand'); + late final _CFPlugInSetLoadOnDemand = + _CFPlugInSetLoadOnDemandPtr.asFunction(); - int pthread_getugid_np( - ffi.Pointer arg0, - ffi.Pointer arg1, + int CFPlugInIsLoadOnDemand( + CFPlugInRef plugIn, ) { - return _pthread_getugid_np( - arg0, - arg1, + return _CFPlugInIsLoadOnDemand( + plugIn, ); } - late final _pthread_getugid_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer)>>('pthread_getugid_np'); - late final _pthread_getugid_np = _pthread_getugid_npPtr - .asFunction, ffi.Pointer)>(); + late final _CFPlugInIsLoadOnDemandPtr = + _lookup>( + 'CFPlugInIsLoadOnDemand'); + late final _CFPlugInIsLoadOnDemand = + _CFPlugInIsLoadOnDemandPtr.asFunction(); - int reboot( - int arg0, + CFArrayRef CFPlugInFindFactoriesForPlugInType( + CFUUIDRef typeUUID, ) { - return _reboot( - arg0, + return _CFPlugInFindFactoriesForPlugInType( + typeUUID, ); } - late final _rebootPtr = - _lookup>('reboot'); - late final _reboot = _rebootPtr.asFunction(); + late final _CFPlugInFindFactoriesForPlugInTypePtr = + _lookup>( + 'CFPlugInFindFactoriesForPlugInType'); + late final _CFPlugInFindFactoriesForPlugInType = + _CFPlugInFindFactoriesForPlugInTypePtr.asFunction< + CFArrayRef Function(CFUUIDRef)>(); - int revoke( - ffi.Pointer arg0, + CFArrayRef CFPlugInFindFactoriesForPlugInTypeInPlugIn( + CFUUIDRef typeUUID, + CFPlugInRef plugIn, ) { - return _revoke( - arg0, + return _CFPlugInFindFactoriesForPlugInTypeInPlugIn( + typeUUID, + plugIn, ); } - late final _revokePtr = - _lookup)>>( - 'revoke'); - late final _revoke = - _revokePtr.asFunction)>(); + late final _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr = + _lookup>( + 'CFPlugInFindFactoriesForPlugInTypeInPlugIn'); + late final _CFPlugInFindFactoriesForPlugInTypeInPlugIn = + _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr.asFunction< + CFArrayRef Function(CFUUIDRef, CFPlugInRef)>(); - int rcmd( - ffi.Pointer> arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, + ffi.Pointer CFPlugInInstanceCreate( + CFAllocatorRef allocator, + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, ) { - return _rcmd( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _CFPlugInInstanceCreate( + allocator, + factoryUUID, + typeUUID, ); } - late final _rcmdPtr = _lookup< + late final _CFPlugInInstanceCreatePtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('rcmd'); - late final _rcmd = _rcmdPtr.asFunction< - int Function( - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + ffi.Pointer Function( + CFAllocatorRef, CFUUIDRef, CFUUIDRef)>>('CFPlugInInstanceCreate'); + late final _CFPlugInInstanceCreate = _CFPlugInInstanceCreatePtr.asFunction< + ffi.Pointer Function(CFAllocatorRef, CFUUIDRef, CFUUIDRef)>(); - int rcmd_af( - ffi.Pointer> arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, - int arg6, + int CFPlugInRegisterFactoryFunction( + CFUUIDRef factoryUUID, + CFPlugInFactoryFunction func, ) { - return _rcmd_af( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, - arg6, + return _CFPlugInRegisterFactoryFunction( + factoryUUID, + func, ); } - late final _rcmd_afPtr = _lookup< + late final _CFPlugInRegisterFactoryFunctionPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int)>>('rcmd_af'); - late final _rcmd_af = _rcmd_afPtr.asFunction< - int Function( - ffi.Pointer>, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + Boolean Function(CFUUIDRef, + CFPlugInFactoryFunction)>>('CFPlugInRegisterFactoryFunction'); + late final _CFPlugInRegisterFactoryFunction = + _CFPlugInRegisterFactoryFunctionPtr.asFunction< + int Function(CFUUIDRef, CFPlugInFactoryFunction)>(); - int rresvport( - ffi.Pointer arg0, + int CFPlugInRegisterFactoryFunctionByName( + CFUUIDRef factoryUUID, + CFPlugInRef plugIn, + CFStringRef functionName, ) { - return _rresvport( - arg0, + return _CFPlugInRegisterFactoryFunctionByName( + factoryUUID, + plugIn, + functionName, ); } - late final _rresvportPtr = - _lookup)>>( - 'rresvport'); - late final _rresvport = - _rresvportPtr.asFunction)>(); + late final _CFPlugInRegisterFactoryFunctionByNamePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFUUIDRef, CFPlugInRef, + CFStringRef)>>('CFPlugInRegisterFactoryFunctionByName'); + late final _CFPlugInRegisterFactoryFunctionByName = + _CFPlugInRegisterFactoryFunctionByNamePtr.asFunction< + int Function(CFUUIDRef, CFPlugInRef, CFStringRef)>(); - int rresvport_af( - ffi.Pointer arg0, - int arg1, + int CFPlugInUnregisterFactory( + CFUUIDRef factoryUUID, ) { - return _rresvport_af( - arg0, - arg1, + return _CFPlugInUnregisterFactory( + factoryUUID, ); } - late final _rresvport_afPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'rresvport_af'); - late final _rresvport_af = - _rresvport_afPtr.asFunction, int)>(); + late final _CFPlugInUnregisterFactoryPtr = + _lookup>( + 'CFPlugInUnregisterFactory'); + late final _CFPlugInUnregisterFactory = + _CFPlugInUnregisterFactoryPtr.asFunction(); - int iruserok( - int arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + int CFPlugInRegisterPlugInType( + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, ) { - return _iruserok( - arg0, - arg1, - arg2, - arg3, + return _CFPlugInRegisterPlugInType( + factoryUUID, + typeUUID, ); } - late final _iruserokPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.UnsignedLong, ffi.Int, ffi.Pointer, - ffi.Pointer)>>('iruserok'); - late final _iruserok = _iruserokPtr.asFunction< - int Function(int, int, ffi.Pointer, ffi.Pointer)>(); + late final _CFPlugInRegisterPlugInTypePtr = + _lookup>( + 'CFPlugInRegisterPlugInType'); + late final _CFPlugInRegisterPlugInType = _CFPlugInRegisterPlugInTypePtr + .asFunction(); - int iruserok_sa( - ffi.Pointer arg0, - int arg1, - int arg2, - ffi.Pointer arg3, - ffi.Pointer arg4, + int CFPlugInUnregisterPlugInType( + CFUUIDRef factoryUUID, + CFUUIDRef typeUUID, ) { - return _iruserok_sa( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFPlugInUnregisterPlugInType( + factoryUUID, + typeUUID, ); } - late final _iruserok_saPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer, ffi.Pointer)>>('iruserok_sa'); - late final _iruserok_sa = _iruserok_saPtr.asFunction< - int Function(ffi.Pointer, int, int, ffi.Pointer, - ffi.Pointer)>(); + late final _CFPlugInUnregisterPlugInTypePtr = + _lookup>( + 'CFPlugInUnregisterPlugInType'); + late final _CFPlugInUnregisterPlugInType = _CFPlugInUnregisterPlugInTypePtr + .asFunction(); - int ruserok( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, + void CFPlugInAddInstanceForFactory( + CFUUIDRef factoryID, ) { - return _ruserok( - arg0, - arg1, - arg2, - arg3, + return _CFPlugInAddInstanceForFactory( + factoryID, ); } - late final _ruserokPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, - ffi.Pointer, ffi.Pointer)>>('ruserok'); - late final _ruserok = _ruserokPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, - ffi.Pointer)>(); + late final _CFPlugInAddInstanceForFactoryPtr = + _lookup>( + 'CFPlugInAddInstanceForFactory'); + late final _CFPlugInAddInstanceForFactory = + _CFPlugInAddInstanceForFactoryPtr.asFunction(); - int setdomainname( - ffi.Pointer arg0, - int arg1, + void CFPlugInRemoveInstanceForFactory( + CFUUIDRef factoryID, ) { - return _setdomainname( - arg0, - arg1, + return _CFPlugInRemoveInstanceForFactory( + factoryID, ); } - late final _setdomainnamePtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'setdomainname'); - late final _setdomainname = - _setdomainnamePtr.asFunction, int)>(); + late final _CFPlugInRemoveInstanceForFactoryPtr = + _lookup>( + 'CFPlugInRemoveInstanceForFactory'); + late final _CFPlugInRemoveInstanceForFactory = + _CFPlugInRemoveInstanceForFactoryPtr.asFunction< + void Function(CFUUIDRef)>(); - int setgroups( - int arg0, - ffi.Pointer arg1, + int CFPlugInInstanceGetInterfaceFunctionTable( + CFPlugInInstanceRef instance, + CFStringRef interfaceName, + ffi.Pointer> ftbl, ) { - return _setgroups( - arg0, - arg1, + return _CFPlugInInstanceGetInterfaceFunctionTable( + instance, + interfaceName, + ftbl, ); } - late final _setgroupsPtr = _lookup< - ffi.NativeFunction)>>( - 'setgroups'); - late final _setgroups = - _setgroupsPtr.asFunction)>(); + late final _CFPlugInInstanceGetInterfaceFunctionTablePtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFPlugInInstanceRef, CFStringRef, + ffi.Pointer>)>>( + 'CFPlugInInstanceGetInterfaceFunctionTable'); + late final _CFPlugInInstanceGetInterfaceFunctionTable = + _CFPlugInInstanceGetInterfaceFunctionTablePtr.asFunction< + int Function(CFPlugInInstanceRef, CFStringRef, + ffi.Pointer>)>(); - void sethostid( - int arg0, + CFStringRef CFPlugInInstanceGetFactoryName( + CFPlugInInstanceRef instance, ) { - return _sethostid( - arg0, + return _CFPlugInInstanceGetFactoryName( + instance, ); } - late final _sethostidPtr = - _lookup>('sethostid'); - late final _sethostid = _sethostidPtr.asFunction(); + late final _CFPlugInInstanceGetFactoryNamePtr = + _lookup>( + 'CFPlugInInstanceGetFactoryName'); + late final _CFPlugInInstanceGetFactoryName = + _CFPlugInInstanceGetFactoryNamePtr.asFunction< + CFStringRef Function(CFPlugInInstanceRef)>(); - int sethostname( - ffi.Pointer arg0, - int arg1, + ffi.Pointer CFPlugInInstanceGetInstanceData( + CFPlugInInstanceRef instance, ) { - return _sethostname( - arg0, - arg1, + return _CFPlugInInstanceGetInstanceData( + instance, ); } - late final _sethostnamePtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sethostname'); - late final _sethostname = - _sethostnamePtr.asFunction, int)>(); + late final _CFPlugInInstanceGetInstanceDataPtr = _lookup< + ffi + .NativeFunction Function(CFPlugInInstanceRef)>>( + 'CFPlugInInstanceGetInstanceData'); + late final _CFPlugInInstanceGetInstanceData = + _CFPlugInInstanceGetInstanceDataPtr.asFunction< + ffi.Pointer Function(CFPlugInInstanceRef)>(); - int setlogin( - ffi.Pointer arg0, + int CFPlugInInstanceGetTypeID() { + return _CFPlugInInstanceGetTypeID(); + } + + late final _CFPlugInInstanceGetTypeIDPtr = + _lookup>( + 'CFPlugInInstanceGetTypeID'); + late final _CFPlugInInstanceGetTypeID = + _CFPlugInInstanceGetTypeIDPtr.asFunction(); + + CFPlugInInstanceRef CFPlugInInstanceCreateWithInstanceDataSize( + CFAllocatorRef allocator, + int instanceDataSize, + CFPlugInInstanceDeallocateInstanceDataFunction deallocateInstanceFunction, + CFStringRef factoryName, + CFPlugInInstanceGetInterfaceFunction getInterfaceFunction, ) { - return _setlogin( - arg0, + return _CFPlugInInstanceCreateWithInstanceDataSize( + allocator, + instanceDataSize, + deallocateInstanceFunction, + factoryName, + getInterfaceFunction, ); } - late final _setloginPtr = - _lookup)>>( - 'setlogin'); - late final _setlogin = - _setloginPtr.asFunction)>(); + late final _CFPlugInInstanceCreateWithInstanceDataSizePtr = _lookup< + ffi.NativeFunction< + CFPlugInInstanceRef Function( + CFAllocatorRef, + CFIndex, + CFPlugInInstanceDeallocateInstanceDataFunction, + CFStringRef, + CFPlugInInstanceGetInterfaceFunction)>>( + 'CFPlugInInstanceCreateWithInstanceDataSize'); + late final _CFPlugInInstanceCreateWithInstanceDataSize = + _CFPlugInInstanceCreateWithInstanceDataSizePtr.asFunction< + CFPlugInInstanceRef Function( + CFAllocatorRef, + int, + CFPlugInInstanceDeallocateInstanceDataFunction, + CFStringRef, + CFPlugInInstanceGetInterfaceFunction)>(); - ffi.Pointer setmode( - ffi.Pointer arg0, + int CFMachPortGetTypeID() { + return _CFMachPortGetTypeID(); + } + + late final _CFMachPortGetTypeIDPtr = + _lookup>('CFMachPortGetTypeID'); + late final _CFMachPortGetTypeID = + _CFMachPortGetTypeIDPtr.asFunction(); + + CFMachPortRef CFMachPortCreate( + CFAllocatorRef allocator, + CFMachPortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, ) { - return _setmode( - arg0, + return _CFMachPortCreate( + allocator, + callout, + context, + shouldFreeInfo, ); } - late final _setmodePtr = _lookup< + late final _CFMachPortCreatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('setmode'); - late final _setmode = _setmodePtr - .asFunction Function(ffi.Pointer)>(); + CFMachPortRef Function( + CFAllocatorRef, + CFMachPortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMachPortCreate'); + late final _CFMachPortCreate = _CFMachPortCreatePtr.asFunction< + CFMachPortRef Function(CFAllocatorRef, CFMachPortCallBack, + ffi.Pointer, ffi.Pointer)>(); - int setrgid( - int arg0, + CFMachPortRef CFMachPortCreateWithPort( + CFAllocatorRef allocator, + int portNum, + CFMachPortCallBack callout, + ffi.Pointer context, + ffi.Pointer shouldFreeInfo, ) { - return _setrgid( - arg0, + return _CFMachPortCreateWithPort( + allocator, + portNum, + callout, + context, + shouldFreeInfo, ); } - late final _setrgidPtr = - _lookup>('setrgid'); - late final _setrgid = _setrgidPtr.asFunction(); + late final _CFMachPortCreateWithPortPtr = _lookup< + ffi.NativeFunction< + CFMachPortRef Function( + CFAllocatorRef, + mach_port_t, + CFMachPortCallBack, + ffi.Pointer, + ffi.Pointer)>>('CFMachPortCreateWithPort'); + late final _CFMachPortCreateWithPort = + _CFMachPortCreateWithPortPtr.asFunction< + CFMachPortRef Function(CFAllocatorRef, int, CFMachPortCallBack, + ffi.Pointer, ffi.Pointer)>(); - int setruid( - int arg0, + int CFMachPortGetPort( + CFMachPortRef port, ) { - return _setruid( - arg0, + return _CFMachPortGetPort( + port, ); } - late final _setruidPtr = - _lookup>('setruid'); - late final _setruid = _setruidPtr.asFunction(); + late final _CFMachPortGetPortPtr = + _lookup>( + 'CFMachPortGetPort'); + late final _CFMachPortGetPort = + _CFMachPortGetPortPtr.asFunction(); - int setsgroups_np( - int arg0, - ffi.Pointer arg1, + void CFMachPortGetContext( + CFMachPortRef port, + ffi.Pointer context, ) { - return _setsgroups_np( - arg0, - arg1, + return _CFMachPortGetContext( + port, + context, ); } - late final _setsgroups_npPtr = _lookup< + late final _CFMachPortGetContextPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer)>>('setsgroups_np'); - late final _setsgroups_np = _setsgroups_npPtr - .asFunction)>(); + ffi.Void Function(CFMachPortRef, + ffi.Pointer)>>('CFMachPortGetContext'); + late final _CFMachPortGetContext = _CFMachPortGetContextPtr.asFunction< + void Function(CFMachPortRef, ffi.Pointer)>(); - void setusershell() { - return _setusershell(); + void CFMachPortInvalidate( + CFMachPortRef port, + ) { + return _CFMachPortInvalidate( + port, + ); } - late final _setusershellPtr = - _lookup>('setusershell'); - late final _setusershell = _setusershellPtr.asFunction(); + late final _CFMachPortInvalidatePtr = + _lookup>( + 'CFMachPortInvalidate'); + late final _CFMachPortInvalidate = + _CFMachPortInvalidatePtr.asFunction(); - int setwgroups_np( - int arg0, - ffi.Pointer arg1, + int CFMachPortIsValid( + CFMachPortRef port, ) { - return _setwgroups_np( - arg0, - arg1, + return _CFMachPortIsValid( + port, ); } - late final _setwgroups_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, ffi.Pointer)>>('setwgroups_np'); - late final _setwgroups_np = _setwgroups_npPtr - .asFunction)>(); + late final _CFMachPortIsValidPtr = + _lookup>( + 'CFMachPortIsValid'); + late final _CFMachPortIsValid = + _CFMachPortIsValidPtr.asFunction(); - int strtofflags( - ffi.Pointer> arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, + CFMachPortInvalidationCallBack CFMachPortGetInvalidationCallBack( + CFMachPortRef port, ) { - return _strtofflags( - arg0, - arg1, - arg2, + return _CFMachPortGetInvalidationCallBack( + port, ); } - late final _strtofflagsPtr = _lookup< + late final _CFMachPortGetInvalidationCallBackPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>('strtofflags'); - late final _strtofflags = _strtofflagsPtr.asFunction< - int Function(ffi.Pointer>, - ffi.Pointer, ffi.Pointer)>(); + CFMachPortInvalidationCallBack Function( + CFMachPortRef)>>('CFMachPortGetInvalidationCallBack'); + late final _CFMachPortGetInvalidationCallBack = + _CFMachPortGetInvalidationCallBackPtr.asFunction< + CFMachPortInvalidationCallBack Function(CFMachPortRef)>(); - int swapon( - ffi.Pointer arg0, + void CFMachPortSetInvalidationCallBack( + CFMachPortRef port, + CFMachPortInvalidationCallBack callout, ) { - return _swapon( - arg0, + return _CFMachPortSetInvalidationCallBack( + port, + callout, ); } - late final _swaponPtr = - _lookup)>>( - 'swapon'); - late final _swapon = - _swaponPtr.asFunction)>(); + late final _CFMachPortSetInvalidationCallBackPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFMachPortRef, CFMachPortInvalidationCallBack)>>( + 'CFMachPortSetInvalidationCallBack'); + late final _CFMachPortSetInvalidationCallBack = + _CFMachPortSetInvalidationCallBackPtr.asFunction< + void Function(CFMachPortRef, CFMachPortInvalidationCallBack)>(); - int ttyslot() { - return _ttyslot(); + CFRunLoopSourceRef CFMachPortCreateRunLoopSource( + CFAllocatorRef allocator, + CFMachPortRef port, + int order, + ) { + return _CFMachPortCreateRunLoopSource( + allocator, + port, + order, + ); } - late final _ttyslotPtr = - _lookup>('ttyslot'); - late final _ttyslot = _ttyslotPtr.asFunction(); + late final _CFMachPortCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, + CFIndex)>>('CFMachPortCreateRunLoopSource'); + late final _CFMachPortCreateRunLoopSource = + _CFMachPortCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, int)>(); - int undelete( - ffi.Pointer arg0, - ) { - return _undelete( - arg0, - ); + int CFAttributedStringGetTypeID() { + return _CFAttributedStringGetTypeID(); } - late final _undeletePtr = - _lookup)>>( - 'undelete'); - late final _undelete = - _undeletePtr.asFunction)>(); + late final _CFAttributedStringGetTypeIDPtr = + _lookup>( + 'CFAttributedStringGetTypeID'); + late final _CFAttributedStringGetTypeID = + _CFAttributedStringGetTypeIDPtr.asFunction(); - int unwhiteout( - ffi.Pointer arg0, + CFAttributedStringRef CFAttributedStringCreate( + CFAllocatorRef alloc, + CFStringRef str, + CFDictionaryRef attributes, ) { - return _unwhiteout( - arg0, + return _CFAttributedStringCreate( + alloc, + str, + attributes, ); } - late final _unwhiteoutPtr = - _lookup)>>( - 'unwhiteout'); - late final _unwhiteout = - _unwhiteoutPtr.asFunction)>(); + late final _CFAttributedStringCreatePtr = _lookup< + ffi.NativeFunction< + CFAttributedStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFAttributedStringCreate'); + late final _CFAttributedStringCreate = + _CFAttributedStringCreatePtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - int syscall( - int arg0, + CFAttributedStringRef CFAttributedStringCreateWithSubstring( + CFAllocatorRef alloc, + CFAttributedStringRef aStr, + CFRange range, ) { - return _syscall( - arg0, + return _CFAttributedStringCreateWithSubstring( + alloc, + aStr, + range, ); } - late final _syscallPtr = - _lookup>('syscall'); - late final _syscall = _syscallPtr.asFunction(); + late final _CFAttributedStringCreateWithSubstringPtr = _lookup< + ffi.NativeFunction< + CFAttributedStringRef Function(CFAllocatorRef, CFAttributedStringRef, + CFRange)>>('CFAttributedStringCreateWithSubstring'); + late final _CFAttributedStringCreateWithSubstring = + _CFAttributedStringCreateWithSubstringPtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFAttributedStringRef, CFRange)>(); - int fgetattrlist( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + CFAttributedStringRef CFAttributedStringCreateCopy( + CFAllocatorRef alloc, + CFAttributedStringRef aStr, ) { - return _fgetattrlist( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFAttributedStringCreateCopy( + alloc, + aStr, ); } - late final _fgetattrlistPtr = _lookup< + late final _CFAttributedStringCreateCopyPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedInt)>>('fgetattrlist'); - late final _fgetattrlist = _fgetattrlistPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer, int, int)>(); + CFAttributedStringRef Function(CFAllocatorRef, + CFAttributedStringRef)>>('CFAttributedStringCreateCopy'); + late final _CFAttributedStringCreateCopy = + _CFAttributedStringCreateCopyPtr.asFunction< + CFAttributedStringRef Function( + CFAllocatorRef, CFAttributedStringRef)>(); - int fsetattrlist( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + CFStringRef CFAttributedStringGetString( + CFAttributedStringRef aStr, ) { - return _fsetattrlist( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFAttributedStringGetString( + aStr, ); } - late final _fsetattrlistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedInt)>>('fsetattrlist'); - late final _fsetattrlist = _fsetattrlistPtr.asFunction< - int Function( - int, ffi.Pointer, ffi.Pointer, int, int)>(); + late final _CFAttributedStringGetStringPtr = + _lookup>( + 'CFAttributedStringGetString'); + late final _CFAttributedStringGetString = _CFAttributedStringGetStringPtr + .asFunction(); - int getattrlist( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + int CFAttributedStringGetLength( + CFAttributedStringRef aStr, ) { - return _getattrlist( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFAttributedStringGetLength( + aStr, ); } - late final _getattrlistPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedInt)>>('getattrlist'); - late final _getattrlist = _getattrlistPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + late final _CFAttributedStringGetLengthPtr = + _lookup>( + 'CFAttributedStringGetLength'); + late final _CFAttributedStringGetLength = _CFAttributedStringGetLengthPtr + .asFunction(); - int setattrlist( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, + CFDictionaryRef CFAttributedStringGetAttributes( + CFAttributedStringRef aStr, + int loc, + ffi.Pointer effectiveRange, ) { - return _setattrlist( - arg0, - arg1, - arg2, - arg3, - arg4, + return _CFAttributedStringGetAttributes( + aStr, + loc, + effectiveRange, ); } - late final _setattrlistPtr = _lookup< + late final _CFAttributedStringGetAttributesPtr = _lookup< ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.UnsignedInt)>>('setattrlist'); - late final _setattrlist = _setattrlistPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int)>(); + CFDictionaryRef Function(CFAttributedStringRef, CFIndex, + ffi.Pointer)>>('CFAttributedStringGetAttributes'); + late final _CFAttributedStringGetAttributes = + _CFAttributedStringGetAttributesPtr.asFunction< + CFDictionaryRef Function( + CFAttributedStringRef, int, ffi.Pointer)>(); - int exchangedata( - ffi.Pointer arg0, - ffi.Pointer arg1, - int arg2, + CFTypeRef CFAttributedStringGetAttribute( + CFAttributedStringRef aStr, + int loc, + CFStringRef attrName, + ffi.Pointer effectiveRange, ) { - return _exchangedata( - arg0, - arg1, - arg2, + return _CFAttributedStringGetAttribute( + aStr, + loc, + attrName, + effectiveRange, ); } - late final _exchangedataPtr = _lookup< + late final _CFAttributedStringGetAttributePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedInt)>>('exchangedata'); - late final _exchangedata = _exchangedataPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + CFTypeRef Function(CFAttributedStringRef, CFIndex, CFStringRef, + ffi.Pointer)>>('CFAttributedStringGetAttribute'); + late final _CFAttributedStringGetAttribute = + _CFAttributedStringGetAttributePtr.asFunction< + CFTypeRef Function( + CFAttributedStringRef, int, CFStringRef, ffi.Pointer)>(); - int getdirentriesattr( - int arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - ffi.Pointer arg4, - ffi.Pointer arg5, - ffi.Pointer arg6, - int arg7, + CFDictionaryRef CFAttributedStringGetAttributesAndLongestEffectiveRange( + CFAttributedStringRef aStr, + int loc, + CFRange inRange, + ffi.Pointer longestEffectiveRange, ) { - return _getdirentriesattr( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, - arg6, - arg7, + return _CFAttributedStringGetAttributesAndLongestEffectiveRange( + aStr, + loc, + inRange, + longestEffectiveRange, ); } - late final _getdirentriesattrPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Int, - ffi.Pointer, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt)>>('getdirentriesattr'); - late final _getdirentriesattr = _getdirentriesattrPtr.asFunction< - int Function( - int, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + late final _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr = + _lookup< + ffi.NativeFunction< + CFDictionaryRef Function(CFAttributedStringRef, CFIndex, + CFRange, ffi.Pointer)>>( + 'CFAttributedStringGetAttributesAndLongestEffectiveRange'); + late final _CFAttributedStringGetAttributesAndLongestEffectiveRange = + _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr.asFunction< + CFDictionaryRef Function( + CFAttributedStringRef, int, CFRange, ffi.Pointer)>(); - int searchfs( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, - ffi.Pointer arg5, + CFTypeRef CFAttributedStringGetAttributeAndLongestEffectiveRange( + CFAttributedStringRef aStr, + int loc, + CFStringRef attrName, + CFRange inRange, + ffi.Pointer longestEffectiveRange, ) { - return _searchfs( - arg0, - arg1, - arg2, - arg3, - arg4, - arg5, + return _CFAttributedStringGetAttributeAndLongestEffectiveRange( + aStr, + loc, + attrName, + inRange, + longestEffectiveRange, ); } - late final _searchfsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer)>>('searchfs'); - late final _searchfs = _searchfsPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer)>(); + late final _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr = + _lookup< + ffi.NativeFunction< + CFTypeRef Function(CFAttributedStringRef, CFIndex, + CFStringRef, CFRange, ffi.Pointer)>>( + 'CFAttributedStringGetAttributeAndLongestEffectiveRange'); + late final _CFAttributedStringGetAttributeAndLongestEffectiveRange = + _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr.asFunction< + CFTypeRef Function(CFAttributedStringRef, int, CFStringRef, CFRange, + ffi.Pointer)>(); - int fsctl( - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2, - int arg3, + CFMutableAttributedStringRef CFAttributedStringCreateMutableCopy( + CFAllocatorRef alloc, + int maxLength, + CFAttributedStringRef aStr, ) { - return _fsctl( - arg0, - arg1, - arg2, - arg3, + return _CFAttributedStringCreateMutableCopy( + alloc, + maxLength, + aStr, ); } - late final _fsctlPtr = _lookup< + late final _CFAttributedStringCreateMutableCopyPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.UnsignedLong, - ffi.Pointer, ffi.UnsignedInt)>>('fsctl'); - late final _fsctl = _fsctlPtr.asFunction< - int Function(ffi.Pointer, int, ffi.Pointer, int)>(); + CFMutableAttributedStringRef Function(CFAllocatorRef, CFIndex, + CFAttributedStringRef)>>('CFAttributedStringCreateMutableCopy'); + late final _CFAttributedStringCreateMutableCopy = + _CFAttributedStringCreateMutableCopyPtr.asFunction< + CFMutableAttributedStringRef Function( + CFAllocatorRef, int, CFAttributedStringRef)>(); - int ffsctl( - int arg0, - int arg1, - ffi.Pointer arg2, - int arg3, + CFMutableAttributedStringRef CFAttributedStringCreateMutable( + CFAllocatorRef alloc, + int maxLength, ) { - return _ffsctl( - arg0, - arg1, - arg2, - arg3, + return _CFAttributedStringCreateMutable( + alloc, + maxLength, ); } - late final _ffsctlPtr = _lookup< + late final _CFAttributedStringCreateMutablePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.UnsignedLong, ffi.Pointer, - ffi.UnsignedInt)>>('ffsctl'); - late final _ffsctl = _ffsctlPtr - .asFunction, int)>(); + CFMutableAttributedStringRef Function( + CFAllocatorRef, CFIndex)>>('CFAttributedStringCreateMutable'); + late final _CFAttributedStringCreateMutable = + _CFAttributedStringCreateMutablePtr.asFunction< + CFMutableAttributedStringRef Function(CFAllocatorRef, int)>(); - int fsync_volume_np( - int arg0, - int arg1, + void CFAttributedStringReplaceString( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef replacement, ) { - return _fsync_volume_np( - arg0, - arg1, + return _CFAttributedStringReplaceString( + aStr, + range, + replacement, ); } - late final _fsync_volume_npPtr = - _lookup>( - 'fsync_volume_np'); - late final _fsync_volume_np = - _fsync_volume_npPtr.asFunction(); + late final _CFAttributedStringReplaceStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFStringRef)>>('CFAttributedStringReplaceString'); + late final _CFAttributedStringReplaceString = + _CFAttributedStringReplaceStringPtr.asFunction< + void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); - int sync_volume_np( - ffi.Pointer arg0, - int arg1, + CFMutableStringRef CFAttributedStringGetMutableString( + CFMutableAttributedStringRef aStr, ) { - return _sync_volume_np( - arg0, - arg1, + return _CFAttributedStringGetMutableString( + aStr, ); } - late final _sync_volume_npPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'sync_volume_np'); - late final _sync_volume_np = - _sync_volume_npPtr.asFunction, int)>(); - - late final ffi.Pointer _optreset = _lookup('optreset'); - - int get optreset => _optreset.value; - - set optreset(int value) => _optreset.value = value; + late final _CFAttributedStringGetMutableStringPtr = _lookup< + ffi.NativeFunction< + CFMutableStringRef Function(CFMutableAttributedStringRef)>>( + 'CFAttributedStringGetMutableString'); + late final _CFAttributedStringGetMutableString = + _CFAttributedStringGetMutableStringPtr.asFunction< + CFMutableStringRef Function(CFMutableAttributedStringRef)>(); - int open( - ffi.Pointer arg0, - int arg1, + void CFAttributedStringSetAttributes( + CFMutableAttributedStringRef aStr, + CFRange range, + CFDictionaryRef replacement, + int clearOtherAttributes, ) { - return _open( - arg0, - arg1, + return _CFAttributedStringSetAttributes( + aStr, + range, + replacement, + clearOtherAttributes, ); } - late final _openPtr = _lookup< - ffi.NativeFunction, ffi.Int)>>( - 'open'); - late final _open = - _openPtr.asFunction, int)>(); + late final _CFAttributedStringSetAttributesPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFDictionaryRef, Boolean)>>('CFAttributedStringSetAttributes'); + late final _CFAttributedStringSetAttributes = + _CFAttributedStringSetAttributesPtr.asFunction< + void Function( + CFMutableAttributedStringRef, CFRange, CFDictionaryRef, int)>(); - int openat( - int arg0, - ffi.Pointer arg1, - int arg2, + void CFAttributedStringSetAttribute( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef attrName, + CFTypeRef value, ) { - return _openat( - arg0, - arg1, - arg2, + return _CFAttributedStringSetAttribute( + aStr, + range, + attrName, + value, ); } - late final _openatPtr = _lookup< + late final _CFAttributedStringSetAttributePtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int)>>('openat'); - late final _openat = - _openatPtr.asFunction, int)>(); + ffi.Void Function(CFMutableAttributedStringRef, CFRange, CFStringRef, + CFTypeRef)>>('CFAttributedStringSetAttribute'); + late final _CFAttributedStringSetAttribute = + _CFAttributedStringSetAttributePtr.asFunction< + void Function( + CFMutableAttributedStringRef, CFRange, CFStringRef, CFTypeRef)>(); - int creat( - ffi.Pointer arg0, - int arg1, + void CFAttributedStringRemoveAttribute( + CFMutableAttributedStringRef aStr, + CFRange range, + CFStringRef attrName, ) { - return _creat( - arg0, - arg1, + return _CFAttributedStringRemoveAttribute( + aStr, + range, + attrName, ); } - late final _creatPtr = _lookup< - ffi.NativeFunction, mode_t)>>( - 'creat'); - late final _creat = - _creatPtr.asFunction, int)>(); + late final _CFAttributedStringRemoveAttributePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFStringRef)>>('CFAttributedStringRemoveAttribute'); + late final _CFAttributedStringRemoveAttribute = + _CFAttributedStringRemoveAttributePtr.asFunction< + void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); - int fcntl( - int arg0, - int arg1, + void CFAttributedStringReplaceAttributedString( + CFMutableAttributedStringRef aStr, + CFRange range, + CFAttributedStringRef replacement, ) { - return _fcntl( - arg0, - arg1, + return _CFAttributedStringReplaceAttributedString( + aStr, + range, + replacement, ); } - late final _fcntlPtr = - _lookup>('fcntl'); - late final _fcntl = _fcntlPtr.asFunction(); + late final _CFAttributedStringReplaceAttributedStringPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFMutableAttributedStringRef, CFRange, + CFAttributedStringRef)>>( + 'CFAttributedStringReplaceAttributedString'); + late final _CFAttributedStringReplaceAttributedString = + _CFAttributedStringReplaceAttributedStringPtr.asFunction< + void Function( + CFMutableAttributedStringRef, CFRange, CFAttributedStringRef)>(); - int openx_np( - ffi.Pointer arg0, - int arg1, - filesec_t arg2, + void CFAttributedStringBeginEditing( + CFMutableAttributedStringRef aStr, ) { - return _openx_np( - arg0, - arg1, - arg2, + return _CFAttributedStringBeginEditing( + aStr, ); } - late final _openx_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int, filesec_t)>>('openx_np'); - late final _openx_np = _openx_npPtr - .asFunction, int, filesec_t)>(); + late final _CFAttributedStringBeginEditingPtr = _lookup< + ffi.NativeFunction>( + 'CFAttributedStringBeginEditing'); + late final _CFAttributedStringBeginEditing = + _CFAttributedStringBeginEditingPtr.asFunction< + void Function(CFMutableAttributedStringRef)>(); - int open_dprotected_np( - ffi.Pointer arg0, - int arg1, - int arg2, - int arg3, + void CFAttributedStringEndEditing( + CFMutableAttributedStringRef aStr, ) { - return _open_dprotected_np( - arg0, - arg1, - arg2, - arg3, + return _CFAttributedStringEndEditing( + aStr, ); } - late final _open_dprotected_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Int)>>('open_dprotected_np'); - late final _open_dprotected_np = _open_dprotected_npPtr - .asFunction, int, int, int)>(); + late final _CFAttributedStringEndEditingPtr = _lookup< + ffi.NativeFunction>( + 'CFAttributedStringEndEditing'); + late final _CFAttributedStringEndEditing = _CFAttributedStringEndEditingPtr + .asFunction(); - int openat_dprotected_np( - int arg0, - ffi.Pointer arg1, - int arg2, - int arg3, - int arg4, - ) { - return _openat_dprotected_np( - arg0, - arg1, - arg2, - arg3, - arg4, - ); + int CFURLEnumeratorGetTypeID() { + return _CFURLEnumeratorGetTypeID(); } - late final _openat_dprotected_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, ffi.Int, - ffi.Int)>>('openat_dprotected_np'); - late final _openat_dprotected_np = _openat_dprotected_npPtr - .asFunction, int, int, int)>(); + late final _CFURLEnumeratorGetTypeIDPtr = + _lookup>( + 'CFURLEnumeratorGetTypeID'); + late final _CFURLEnumeratorGetTypeID = + _CFURLEnumeratorGetTypeIDPtr.asFunction(); - int openat_authenticated_np( - int arg0, - ffi.Pointer arg1, - int arg2, - int arg3, + CFURLEnumeratorRef CFURLEnumeratorCreateForDirectoryURL( + CFAllocatorRef alloc, + CFURLRef directoryURL, + CFURLEnumeratorOptions option, + CFArrayRef propertyKeys, ) { - return _openat_authenticated_np( - arg0, - arg1, - arg2, - arg3, + return _CFURLEnumeratorCreateForDirectoryURL( + alloc, + directoryURL, + option.value, + propertyKeys, ); } - late final _openat_authenticated_npPtr = _lookup< + late final _CFURLEnumeratorCreateForDirectoryURLPtr = _lookup< ffi.NativeFunction< - ffi.Int Function(ffi.Int, ffi.Pointer, ffi.Int, - ffi.Int)>>('openat_authenticated_np'); - late final _openat_authenticated_np = _openat_authenticated_npPtr - .asFunction, int, int)>(); + CFURLEnumeratorRef Function(CFAllocatorRef, CFURLRef, CFOptionFlags, + CFArrayRef)>>('CFURLEnumeratorCreateForDirectoryURL'); + late final _CFURLEnumeratorCreateForDirectoryURL = + _CFURLEnumeratorCreateForDirectoryURLPtr.asFunction< + CFURLEnumeratorRef Function( + CFAllocatorRef, CFURLRef, int, CFArrayRef)>(); - int flock1( - int arg0, - int arg1, + CFURLEnumeratorRef CFURLEnumeratorCreateForMountedVolumes( + CFAllocatorRef alloc, + CFURLEnumeratorOptions option, + CFArrayRef propertyKeys, ) { - return _flock1( - arg0, - arg1, + return _CFURLEnumeratorCreateForMountedVolumes( + alloc, + option.value, + propertyKeys, ); } - late final _flock1Ptr = - _lookup>('flock'); - late final _flock1 = _flock1Ptr.asFunction(); + late final _CFURLEnumeratorCreateForMountedVolumesPtr = _lookup< + ffi.NativeFunction< + CFURLEnumeratorRef Function(CFAllocatorRef, CFOptionFlags, + CFArrayRef)>>('CFURLEnumeratorCreateForMountedVolumes'); + late final _CFURLEnumeratorCreateForMountedVolumes = + _CFURLEnumeratorCreateForMountedVolumesPtr.asFunction< + CFURLEnumeratorRef Function(CFAllocatorRef, int, CFArrayRef)>(); - filesec_t filesec_init() { - return _filesec_init(); + CFURLEnumeratorResult CFURLEnumeratorGetNextURL( + CFURLEnumeratorRef enumerator, + ffi.Pointer url, + ffi.Pointer error, + ) { + return CFURLEnumeratorResult.fromValue(_CFURLEnumeratorGetNextURL( + enumerator, + url, + error, + )); } - late final _filesec_initPtr = - _lookup>('filesec_init'); - late final _filesec_init = - _filesec_initPtr.asFunction(); + late final _CFURLEnumeratorGetNextURLPtr = _lookup< + ffi.NativeFunction< + CFIndex Function(CFURLEnumeratorRef, ffi.Pointer, + ffi.Pointer)>>('CFURLEnumeratorGetNextURL'); + late final _CFURLEnumeratorGetNextURL = + _CFURLEnumeratorGetNextURLPtr.asFunction< + int Function(CFURLEnumeratorRef, ffi.Pointer, + ffi.Pointer)>(); - filesec_t filesec_dup( - filesec_t arg0, + void CFURLEnumeratorSkipDescendents( + CFURLEnumeratorRef enumerator, ) { - return _filesec_dup( - arg0, + return _CFURLEnumeratorSkipDescendents( + enumerator, ); } - late final _filesec_dupPtr = - _lookup>('filesec_dup'); - late final _filesec_dup = - _filesec_dupPtr.asFunction(); + late final _CFURLEnumeratorSkipDescendentsPtr = + _lookup>( + 'CFURLEnumeratorSkipDescendents'); + late final _CFURLEnumeratorSkipDescendents = + _CFURLEnumeratorSkipDescendentsPtr.asFunction< + void Function(CFURLEnumeratorRef)>(); - void filesec_free( - filesec_t arg0, + int CFURLEnumeratorGetDescendentLevel( + CFURLEnumeratorRef enumerator, ) { - return _filesec_free( - arg0, + return _CFURLEnumeratorGetDescendentLevel( + enumerator, ); } - late final _filesec_freePtr = - _lookup>('filesec_free'); - late final _filesec_free = - _filesec_freePtr.asFunction(); + late final _CFURLEnumeratorGetDescendentLevelPtr = + _lookup>( + 'CFURLEnumeratorGetDescendentLevel'); + late final _CFURLEnumeratorGetDescendentLevel = + _CFURLEnumeratorGetDescendentLevelPtr.asFunction< + int Function(CFURLEnumeratorRef)>(); - int filesec_get_property( - filesec_t arg0, - int arg1, - ffi.Pointer arg2, + int CFURLEnumeratorGetSourceDidChange( + CFURLEnumeratorRef enumerator, ) { - return _filesec_get_property( - arg0, - arg1, - arg2, + return _CFURLEnumeratorGetSourceDidChange( + enumerator, ); } - late final _filesec_get_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filesec_t, ffi.Int32, - ffi.Pointer)>>('filesec_get_property'); - late final _filesec_get_property = _filesec_get_propertyPtr - .asFunction)>(); + late final _CFURLEnumeratorGetSourceDidChangePtr = + _lookup>( + 'CFURLEnumeratorGetSourceDidChange'); + late final _CFURLEnumeratorGetSourceDidChange = + _CFURLEnumeratorGetSourceDidChangePtr.asFunction< + int Function(CFURLEnumeratorRef)>(); - int filesec_query_property( - filesec_t arg0, - int arg1, - ffi.Pointer arg2, + acl_t acl_dup( + acl_t acl, ) { - return _filesec_query_property( - arg0, - arg1, - arg2, + return _acl_dup( + acl, ); } - late final _filesec_query_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filesec_t, ffi.Int32, - ffi.Pointer)>>('filesec_query_property'); - late final _filesec_query_property = _filesec_query_propertyPtr - .asFunction)>(); + late final _acl_dupPtr = + _lookup>('acl_dup'); + late final _acl_dup = _acl_dupPtr.asFunction(); - int filesec_set_property( - filesec_t arg0, - int arg1, - ffi.Pointer arg2, + int acl_free( + ffi.Pointer obj_p, ) { - return _filesec_set_property( - arg0, - arg1, - arg2, + return _acl_free( + obj_p, ); } - late final _filesec_set_propertyPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(filesec_t, ffi.Int32, - ffi.Pointer)>>('filesec_set_property'); - late final _filesec_set_property = _filesec_set_propertyPtr - .asFunction)>(); + late final _acl_freePtr = + _lookup)>>( + 'acl_free'); + late final _acl_free = + _acl_freePtr.asFunction)>(); - int filesec_unset_property( - filesec_t arg0, - int arg1, + acl_t acl_init( + int count, ) { - return _filesec_unset_property( - arg0, - arg1, + return _acl_init( + count, ); } - late final _filesec_unset_propertyPtr = - _lookup>( - 'filesec_unset_property'); - late final _filesec_unset_property = - _filesec_unset_propertyPtr.asFunction(); + late final _acl_initPtr = + _lookup>('acl_init'); + late final _acl_init = _acl_initPtr.asFunction(); - int os_workgroup_copy_port( - os_workgroup_t wg, - ffi.Pointer mach_port_out, + int acl_copy_entry( + acl_entry_t dest_d, + acl_entry_t src_d, ) { - return _os_workgroup_copy_port( - wg, - mach_port_out, + return _acl_copy_entry( + dest_d, + src_d, ); } - late final _os_workgroup_copy_portPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(os_workgroup_t, - ffi.Pointer)>>('os_workgroup_copy_port'); - late final _os_workgroup_copy_port = _os_workgroup_copy_portPtr - .asFunction)>(); + late final _acl_copy_entryPtr = + _lookup>( + 'acl_copy_entry'); + late final _acl_copy_entry = + _acl_copy_entryPtr.asFunction(); - os_workgroup_t os_workgroup_create_with_port( - ffi.Pointer name, - int mach_port, + int acl_create_entry( + ffi.Pointer acl_p, + ffi.Pointer entry_p, ) { - return _os_workgroup_create_with_port( - name, - mach_port, + return _acl_create_entry( + acl_p, + entry_p, ); } - late final _os_workgroup_create_with_portPtr = _lookup< + late final _acl_create_entryPtr = _lookup< ffi.NativeFunction< - os_workgroup_t Function(ffi.Pointer, - mach_port_t)>>('os_workgroup_create_with_port'); - late final _os_workgroup_create_with_port = _os_workgroup_create_with_portPtr - .asFunction, int)>(); + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('acl_create_entry'); + late final _acl_create_entry = _acl_create_entryPtr + .asFunction, ffi.Pointer)>(); - os_workgroup_t os_workgroup_create_with_workgroup( - ffi.Pointer name, - os_workgroup_t wg, + int acl_create_entry_np( + ffi.Pointer acl_p, + ffi.Pointer entry_p, + int entry_index, ) { - return _os_workgroup_create_with_workgroup( - name, - wg, + return _acl_create_entry_np( + acl_p, + entry_p, + entry_index, ); } - late final _os_workgroup_create_with_workgroupPtr = _lookup< + late final _acl_create_entry_npPtr = _lookup< ffi.NativeFunction< - os_workgroup_t Function(ffi.Pointer, - os_workgroup_t)>>('os_workgroup_create_with_workgroup'); - late final _os_workgroup_create_with_workgroup = - _os_workgroup_create_with_workgroupPtr.asFunction< - os_workgroup_t Function(ffi.Pointer, os_workgroup_t)>(); + ffi.Int Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('acl_create_entry_np'); + late final _acl_create_entry_np = _acl_create_entry_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); - int os_workgroup_join( - os_workgroup_t wg, - os_workgroup_join_token_t token_out, + int acl_delete_entry( + acl_t acl, + acl_entry_t entry_d, ) { - return _os_workgroup_join( - wg, - token_out, + return _acl_delete_entry( + acl, + entry_d, ); } - late final _os_workgroup_joinPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - os_workgroup_t, os_workgroup_join_token_t)>>('os_workgroup_join'); - late final _os_workgroup_join = _os_workgroup_joinPtr - .asFunction(); + late final _acl_delete_entryPtr = + _lookup>( + 'acl_delete_entry'); + late final _acl_delete_entry = + _acl_delete_entryPtr.asFunction(); - void os_workgroup_leave( - os_workgroup_t wg, - os_workgroup_join_token_t token, + int acl_get_entry( + acl_t acl, + int entry_id, + ffi.Pointer entry_p, ) { - return _os_workgroup_leave( - wg, - token, + return _acl_get_entry( + acl, + entry_id, + entry_p, ); } - late final _os_workgroup_leavePtr = _lookup< + late final _acl_get_entryPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(os_workgroup_t, - os_workgroup_join_token_t)>>('os_workgroup_leave'); - late final _os_workgroup_leave = _os_workgroup_leavePtr - .asFunction(); + ffi.Int Function( + acl_t, ffi.Int, ffi.Pointer)>>('acl_get_entry'); + late final _acl_get_entry = _acl_get_entryPtr + .asFunction)>(); - int os_workgroup_set_working_arena( - os_workgroup_t wg, - ffi.Pointer arena, - int max_workers, - os_workgroup_working_arena_destructor_t destructor, + int acl_valid( + acl_t acl, ) { - return _os_workgroup_set_working_arena( - wg, - arena, - max_workers, - destructor, + return _acl_valid( + acl, ); } - late final _os_workgroup_set_working_arenaPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(os_workgroup_t, ffi.Pointer, - ffi.Uint32, os_workgroup_working_arena_destructor_t)>>( - 'os_workgroup_set_working_arena'); - late final _os_workgroup_set_working_arena = - _os_workgroup_set_working_arenaPtr.asFunction< - int Function(os_workgroup_t, ffi.Pointer, int, - os_workgroup_working_arena_destructor_t)>(); + late final _acl_validPtr = + _lookup>('acl_valid'); + late final _acl_valid = _acl_validPtr.asFunction(); - ffi.Pointer os_workgroup_get_working_arena( - os_workgroup_t wg, - ffi.Pointer index_out, + int acl_valid_fd_np( + int fd, + acl_type_t type, + acl_t acl, ) { - return _os_workgroup_get_working_arena( - wg, - index_out, + return _acl_valid_fd_np( + fd, + type.value, + acl, ); } - late final _os_workgroup_get_working_arenaPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - os_workgroup_t, ffi.Pointer)>>( - 'os_workgroup_get_working_arena'); - late final _os_workgroup_get_working_arena = - _os_workgroup_get_working_arenaPtr.asFunction< - ffi.Pointer Function( - os_workgroup_t, ffi.Pointer)>(); + late final _acl_valid_fd_npPtr = _lookup< + ffi + .NativeFunction>( + 'acl_valid_fd_np'); + late final _acl_valid_fd_np = + _acl_valid_fd_npPtr.asFunction(); - void os_workgroup_cancel( - os_workgroup_t wg, + int acl_valid_file_np( + ffi.Pointer path, + acl_type_t type, + acl_t acl, ) { - return _os_workgroup_cancel( - wg, + return _acl_valid_file_np( + path, + type.value, + acl, ); } - late final _os_workgroup_cancelPtr = - _lookup>( - 'os_workgroup_cancel'); - late final _os_workgroup_cancel = - _os_workgroup_cancelPtr.asFunction(); + late final _acl_valid_file_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.UnsignedInt, + acl_t)>>('acl_valid_file_np'); + late final _acl_valid_file_np = _acl_valid_file_npPtr + .asFunction, int, acl_t)>(); - bool os_workgroup_testcancel( - os_workgroup_t wg, + int acl_valid_link_np( + ffi.Pointer path, + acl_type_t type, + acl_t acl, ) { - return _os_workgroup_testcancel( - wg, + return _acl_valid_link_np( + path, + type.value, + acl, ); } - late final _os_workgroup_testcancelPtr = - _lookup>( - 'os_workgroup_testcancel'); - late final _os_workgroup_testcancel = - _os_workgroup_testcancelPtr.asFunction(); + late final _acl_valid_link_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, ffi.UnsignedInt, + acl_t)>>('acl_valid_link_np'); + late final _acl_valid_link_np = _acl_valid_link_npPtr + .asFunction, int, acl_t)>(); - int os_workgroup_max_parallel_threads( - os_workgroup_t wg, - os_workgroup_mpt_attr_t attr, + int acl_add_perm( + acl_permset_t permset_d, + acl_perm_t perm, ) { - return _os_workgroup_max_parallel_threads( - wg, - attr, + return _acl_add_perm( + permset_d, + perm.value, ); } - late final _os_workgroup_max_parallel_threadsPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(os_workgroup_t, - os_workgroup_mpt_attr_t)>>('os_workgroup_max_parallel_threads'); - late final _os_workgroup_max_parallel_threads = - _os_workgroup_max_parallel_threadsPtr - .asFunction(); + late final _acl_add_permPtr = _lookup< + ffi.NativeFunction>( + 'acl_add_perm'); + late final _acl_add_perm = + _acl_add_permPtr.asFunction(); - int os_workgroup_interval_start( - os_workgroup_interval_t wg, - int start, - int deadline, - os_workgroup_interval_data_t data, + int acl_calc_mask( + ffi.Pointer acl_p, ) { - return _os_workgroup_interval_start( - wg, - start, - deadline, - data, + return _acl_calc_mask( + acl_p, ); } - late final _os_workgroup_interval_startPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, ffi.Uint64, - os_workgroup_interval_data_t)>>('os_workgroup_interval_start'); - late final _os_workgroup_interval_start = - _os_workgroup_interval_startPtr.asFunction< - int Function(os_workgroup_interval_t, int, int, - os_workgroup_interval_data_t)>(); + late final _acl_calc_maskPtr = + _lookup)>>( + 'acl_calc_mask'); + late final _acl_calc_mask = + _acl_calc_maskPtr.asFunction)>(); - int os_workgroup_interval_update( - os_workgroup_interval_t wg, - int deadline, - os_workgroup_interval_data_t data, + int acl_clear_perms( + acl_permset_t permset_d, ) { - return _os_workgroup_interval_update( - wg, - deadline, - data, + return _acl_clear_perms( + permset_d, ); } - late final _os_workgroup_interval_updatePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(os_workgroup_interval_t, ffi.Uint64, - os_workgroup_interval_data_t)>>('os_workgroup_interval_update'); - late final _os_workgroup_interval_update = - _os_workgroup_interval_updatePtr.asFunction< - int Function( - os_workgroup_interval_t, int, os_workgroup_interval_data_t)>(); + late final _acl_clear_permsPtr = + _lookup>( + 'acl_clear_perms'); + late final _acl_clear_perms = + _acl_clear_permsPtr.asFunction(); - int os_workgroup_interval_finish( - os_workgroup_interval_t wg, - os_workgroup_interval_data_t data, + int acl_delete_perm( + acl_permset_t permset_d, + acl_perm_t perm, ) { - return _os_workgroup_interval_finish( - wg, - data, + return _acl_delete_perm( + permset_d, + perm.value, ); } - late final _os_workgroup_interval_finishPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(os_workgroup_interval_t, - os_workgroup_interval_data_t)>>('os_workgroup_interval_finish'); - late final _os_workgroup_interval_finish = - _os_workgroup_interval_finishPtr.asFunction< - int Function( - os_workgroup_interval_t, os_workgroup_interval_data_t)>(); + late final _acl_delete_permPtr = _lookup< + ffi.NativeFunction>( + 'acl_delete_perm'); + late final _acl_delete_perm = + _acl_delete_permPtr.asFunction(); - os_workgroup_parallel_t os_workgroup_parallel_create( - ffi.Pointer name, - os_workgroup_attr_t attr, + int acl_get_perm_np( + acl_permset_t permset_d, + acl_perm_t perm, ) { - return _os_workgroup_parallel_create( - name, - attr, + return _acl_get_perm_np( + permset_d, + perm.value, ); } - late final _os_workgroup_parallel_createPtr = _lookup< - ffi.NativeFunction< - os_workgroup_parallel_t Function(ffi.Pointer, - os_workgroup_attr_t)>>('os_workgroup_parallel_create'); - late final _os_workgroup_parallel_create = - _os_workgroup_parallel_createPtr.asFunction< - os_workgroup_parallel_t Function( - ffi.Pointer, os_workgroup_attr_t)>(); + late final _acl_get_perm_npPtr = _lookup< + ffi.NativeFunction>( + 'acl_get_perm_np'); + late final _acl_get_perm_np = + _acl_get_perm_npPtr.asFunction(); - int dispatch_time( - int when, - int delta, + int acl_get_permset( + acl_entry_t entry_d, + ffi.Pointer permset_p, ) { - return _dispatch_time( - when, - delta, + return _acl_get_permset( + entry_d, + permset_p, ); } - late final _dispatch_timePtr = _lookup< + late final _acl_get_permsetPtr = _lookup< ffi.NativeFunction< - dispatch_time_t Function( - dispatch_time_t, ffi.Int64)>>('dispatch_time'); - late final _dispatch_time = - _dispatch_timePtr.asFunction(); + ffi.Int Function( + acl_entry_t, ffi.Pointer)>>('acl_get_permset'); + late final _acl_get_permset = _acl_get_permsetPtr + .asFunction)>(); - int dispatch_walltime( - ffi.Pointer when, - int delta, + int acl_set_permset( + acl_entry_t entry_d, + acl_permset_t permset_d, ) { - return _dispatch_walltime( - when, - delta, + return _acl_set_permset( + entry_d, + permset_d, ); } - late final _dispatch_walltimePtr = _lookup< - ffi.NativeFunction< - dispatch_time_t Function( - ffi.Pointer, ffi.Int64)>>('dispatch_walltime'); - late final _dispatch_walltime = _dispatch_walltimePtr - .asFunction, int)>(); + late final _acl_set_permsetPtr = + _lookup>( + 'acl_set_permset'); + late final _acl_set_permset = _acl_set_permsetPtr + .asFunction(); - int qos_class_self() { - return _qos_class_self(); + int acl_maximal_permset_mask_np( + ffi.Pointer mask_p, + ) { + return _acl_maximal_permset_mask_np( + mask_p, + ); } - late final _qos_class_selfPtr = - _lookup>('qos_class_self'); - late final _qos_class_self = _qos_class_selfPtr.asFunction(); + late final _acl_maximal_permset_mask_npPtr = _lookup< + ffi + .NativeFunction)>>( + 'acl_maximal_permset_mask_np'); + late final _acl_maximal_permset_mask_np = _acl_maximal_permset_mask_npPtr + .asFunction)>(); - int qos_class_main() { - return _qos_class_main(); + int acl_get_permset_mask_np( + acl_entry_t entry_d, + ffi.Pointer mask_p, + ) { + return _acl_get_permset_mask_np( + entry_d, + mask_p, + ); } - late final _qos_class_mainPtr = - _lookup>('qos_class_main'); - late final _qos_class_main = _qos_class_mainPtr.asFunction(); + late final _acl_get_permset_mask_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(acl_entry_t, + ffi.Pointer)>>('acl_get_permset_mask_np'); + late final _acl_get_permset_mask_np = _acl_get_permset_mask_npPtr + .asFunction)>(); - void dispatch_retain( - dispatch_object_t object, + int acl_set_permset_mask_np( + acl_entry_t entry_d, + int mask, ) { - return _dispatch_retain( - object, + return _acl_set_permset_mask_np( + entry_d, + mask, ); } - late final _dispatch_retainPtr = - _lookup>( - 'dispatch_retain'); - late final _dispatch_retain = - _dispatch_retainPtr.asFunction(); + late final _acl_set_permset_mask_npPtr = _lookup< + ffi + .NativeFunction>( + 'acl_set_permset_mask_np'); + late final _acl_set_permset_mask_np = + _acl_set_permset_mask_npPtr.asFunction(); - void dispatch_release( - dispatch_object_t object, + int acl_add_flag_np( + acl_flagset_t flagset_d, + acl_flag_t flag, ) { - return _dispatch_release( - object, + return _acl_add_flag_np( + flagset_d, + flag.value, ); } - late final _dispatch_releasePtr = - _lookup>( - 'dispatch_release'); - late final _dispatch_release = - _dispatch_releasePtr.asFunction(); + late final _acl_add_flag_npPtr = _lookup< + ffi.NativeFunction>( + 'acl_add_flag_np'); + late final _acl_add_flag_np = + _acl_add_flag_npPtr.asFunction(); - ffi.Pointer dispatch_get_context( - dispatch_object_t object, + int acl_clear_flags_np( + acl_flagset_t flagset_d, ) { - return _dispatch_get_context( - object, + return _acl_clear_flags_np( + flagset_d, ); } - late final _dispatch_get_contextPtr = _lookup< - ffi - .NativeFunction Function(dispatch_object_t)>>( - 'dispatch_get_context'); - late final _dispatch_get_context = _dispatch_get_contextPtr - .asFunction Function(dispatch_object_t)>(); + late final _acl_clear_flags_npPtr = + _lookup>( + 'acl_clear_flags_np'); + late final _acl_clear_flags_np = + _acl_clear_flags_npPtr.asFunction(); - void dispatch_set_context( - dispatch_object_t object, - ffi.Pointer context, + int acl_delete_flag_np( + acl_flagset_t flagset_d, + acl_flag_t flag, ) { - return _dispatch_set_context( - object, - context, + return _acl_delete_flag_np( + flagset_d, + flag.value, ); } - late final _dispatch_set_contextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, - ffi.Pointer)>>('dispatch_set_context'); - late final _dispatch_set_context = _dispatch_set_contextPtr - .asFunction)>(); + late final _acl_delete_flag_npPtr = _lookup< + ffi.NativeFunction>( + 'acl_delete_flag_np'); + late final _acl_delete_flag_np = + _acl_delete_flag_npPtr.asFunction(); - void dispatch_set_finalizer_f( - dispatch_object_t object, - dispatch_function_t finalizer, + int acl_get_flag_np( + acl_flagset_t flagset_d, + acl_flag_t flag, ) { - return _dispatch_set_finalizer_f( - object, - finalizer, + return _acl_get_flag_np( + flagset_d, + flag.value, ); } - late final _dispatch_set_finalizer_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, - dispatch_function_t)>>('dispatch_set_finalizer_f'); - late final _dispatch_set_finalizer_f = _dispatch_set_finalizer_fPtr - .asFunction(); + late final _acl_get_flag_npPtr = _lookup< + ffi.NativeFunction>( + 'acl_get_flag_np'); + late final _acl_get_flag_np = + _acl_get_flag_npPtr.asFunction(); - void dispatch_activate( - dispatch_object_t object, + int acl_get_flagset_np( + ffi.Pointer obj_p, + ffi.Pointer flagset_p, ) { - return _dispatch_activate( - object, + return _acl_get_flagset_np( + obj_p, + flagset_p, ); } - late final _dispatch_activatePtr = - _lookup>( - 'dispatch_activate'); - late final _dispatch_activate = - _dispatch_activatePtr.asFunction(); + late final _acl_get_flagset_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>('acl_get_flagset_np'); + late final _acl_get_flagset_np = _acl_get_flagset_npPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer)>(); - void dispatch_suspend( - dispatch_object_t object, + int acl_set_flagset_np( + ffi.Pointer obj_p, + acl_flagset_t flagset_d, ) { - return _dispatch_suspend( - object, + return _acl_set_flagset_np( + obj_p, + flagset_d, ); } - late final _dispatch_suspendPtr = - _lookup>( - 'dispatch_suspend'); - late final _dispatch_suspend = - _dispatch_suspendPtr.asFunction(); + late final _acl_set_flagset_npPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, acl_flagset_t)>>('acl_set_flagset_np'); + late final _acl_set_flagset_np = _acl_set_flagset_npPtr + .asFunction, acl_flagset_t)>(); - void dispatch_resume( - dispatch_object_t object, + ffi.Pointer acl_get_qualifier( + acl_entry_t entry_d, ) { - return _dispatch_resume( - object, + return _acl_get_qualifier( + entry_d, ); } - late final _dispatch_resumePtr = - _lookup>( - 'dispatch_resume'); - late final _dispatch_resume = - _dispatch_resumePtr.asFunction(); + late final _acl_get_qualifierPtr = + _lookup Function(acl_entry_t)>>( + 'acl_get_qualifier'); + late final _acl_get_qualifier = _acl_get_qualifierPtr + .asFunction Function(acl_entry_t)>(); - void dispatch_set_qos_class_floor( - dispatch_object_t object, - int qos_class, - int relative_priority, + int acl_get_tag_type( + acl_entry_t entry_d, + ffi.Pointer tag_type_p, ) { - return _dispatch_set_qos_class_floor( - object, - qos_class, - relative_priority, + return _acl_get_tag_type( + entry_d, + tag_type_p, ); } - late final _dispatch_set_qos_class_floorPtr = _lookup< + late final _acl_get_tag_typePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, ffi.Int32, - ffi.Int)>>('dispatch_set_qos_class_floor'); - late final _dispatch_set_qos_class_floor = _dispatch_set_qos_class_floorPtr - .asFunction(); + ffi.Int Function( + acl_entry_t, ffi.Pointer)>>('acl_get_tag_type'); + late final _acl_get_tag_type = _acl_get_tag_typePtr + .asFunction)>(); - int dispatch_wait( - ffi.Pointer object, - int timeout, + int acl_set_qualifier( + acl_entry_t entry_d, + ffi.Pointer tag_qualifier_p, ) { - return _dispatch_wait( - object, - timeout, + return _acl_set_qualifier( + entry_d, + tag_qualifier_p, ); } - late final _dispatch_waitPtr = _lookup< + late final _acl_set_qualifierPtr = _lookup< ffi.NativeFunction< - ffi.IntPtr Function( - ffi.Pointer, dispatch_time_t)>>('dispatch_wait'); - late final _dispatch_wait = - _dispatch_waitPtr.asFunction, int)>(); + ffi.Int Function( + acl_entry_t, ffi.Pointer)>>('acl_set_qualifier'); + late final _acl_set_qualifier = _acl_set_qualifierPtr + .asFunction)>(); - void dispatch_notify( - ffi.Pointer object, - dispatch_object_t queue, - Dartdispatch_block_t notification_block, + int acl_set_tag_type( + acl_entry_t entry_d, + acl_tag_t tag_type, ) { - return _dispatch_notify( - object, - queue, - notification_block._id, + return _acl_set_tag_type( + entry_d, + tag_type.value, ); } - late final _dispatch_notifyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, dispatch_object_t, - dispatch_block_t)>>('dispatch_notify'); - late final _dispatch_notify = _dispatch_notifyPtr.asFunction< - void Function( - ffi.Pointer, dispatch_object_t, dispatch_block_t)>(); + late final _acl_set_tag_typePtr = _lookup< + ffi.NativeFunction>( + 'acl_set_tag_type'); + late final _acl_set_tag_type = + _acl_set_tag_typePtr.asFunction(); - void dispatch_cancel( - ffi.Pointer object, + int acl_delete_def_file( + ffi.Pointer path_p, ) { - return _dispatch_cancel( - object, + return _acl_delete_def_file( + path_p, ); } - late final _dispatch_cancelPtr = - _lookup)>>( - 'dispatch_cancel'); - late final _dispatch_cancel = - _dispatch_cancelPtr.asFunction)>(); + late final _acl_delete_def_filePtr = + _lookup)>>( + 'acl_delete_def_file'); + late final _acl_delete_def_file = + _acl_delete_def_filePtr.asFunction)>(); - int dispatch_testcancel( - ffi.Pointer object, + acl_t acl_get_fd( + int fd, ) { - return _dispatch_testcancel( - object, + return _acl_get_fd( + fd, ); } - late final _dispatch_testcancelPtr = - _lookup)>>( - 'dispatch_testcancel'); - late final _dispatch_testcancel = - _dispatch_testcancelPtr.asFunction)>(); + late final _acl_get_fdPtr = + _lookup>('acl_get_fd'); + late final _acl_get_fd = _acl_get_fdPtr.asFunction(); - void dispatch_debug( - dispatch_object_t object, - ffi.Pointer message, + acl_t acl_get_fd_np( + int fd, + acl_type_t type, ) { - return _dispatch_debug( - object, - message, + return _acl_get_fd_np( + fd, + type.value, ); } - late final _dispatch_debugPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_object_t, ffi.Pointer)>>('dispatch_debug'); - late final _dispatch_debug = _dispatch_debugPtr - .asFunction)>(); + late final _acl_get_fd_npPtr = + _lookup>( + 'acl_get_fd_np'); + late final _acl_get_fd_np = + _acl_get_fd_npPtr.asFunction(); - void dispatch_debugv( - dispatch_object_t object, - ffi.Pointer message, - va_list ap, + acl_t acl_get_file( + ffi.Pointer path_p, + acl_type_t type, ) { - return _dispatch_debugv( - object, - message, - ap, + return _acl_get_file( + path_p, + type.value, ); } - late final _dispatch_debugvPtr = _lookup< + late final _acl_get_filePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, ffi.Pointer, - va_list)>>('dispatch_debugv'); - late final _dispatch_debugv = _dispatch_debugvPtr.asFunction< - void Function(dispatch_object_t, ffi.Pointer, va_list)>(); + acl_t Function( + ffi.Pointer, ffi.UnsignedInt)>>('acl_get_file'); + late final _acl_get_file = + _acl_get_filePtr.asFunction, int)>(); - void dispatch_async( - dispatch_queue_t queue, - Dartdispatch_block_t block, + acl_t acl_get_link_np( + ffi.Pointer path_p, + acl_type_t type, ) { - return _dispatch_async( - queue, - block._id, + return _acl_get_link_np( + path_p, + type.value, ); } - late final _dispatch_asyncPtr = _lookup< + late final _acl_get_link_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_async'); - late final _dispatch_async = _dispatch_asyncPtr - .asFunction(); + acl_t Function( + ffi.Pointer, ffi.UnsignedInt)>>('acl_get_link_np'); + late final _acl_get_link_np = _acl_get_link_npPtr + .asFunction, int)>(); - void dispatch_async_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int acl_set_fd( + int fd, + acl_t acl, ) { - return _dispatch_async_f( - queue, - context, - work, + return _acl_set_fd( + fd, + acl, ); } - late final _dispatch_async_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_async_f'); - late final _dispatch_async_f = _dispatch_async_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + late final _acl_set_fdPtr = + _lookup>( + 'acl_set_fd'); + late final _acl_set_fd = + _acl_set_fdPtr.asFunction(); - void dispatch_sync( - dispatch_queue_t queue, - Dartdispatch_block_t block, + int acl_set_fd_np( + int fd, + acl_t acl, + acl_type_t acl_type, ) { - return _dispatch_sync( - queue, - block._id, + return _acl_set_fd_np( + fd, + acl, + acl_type.value, ); } - late final _dispatch_syncPtr = _lookup< + late final _acl_set_fd_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_sync'); - late final _dispatch_sync = _dispatch_syncPtr - .asFunction(); + ffi.Int Function(ffi.Int, acl_t, ffi.UnsignedInt)>>('acl_set_fd_np'); + late final _acl_set_fd_np = + _acl_set_fd_npPtr.asFunction(); - void dispatch_sync_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int acl_set_file( + ffi.Pointer path_p, + acl_type_t type, + acl_t acl, ) { - return _dispatch_sync_f( - queue, - context, - work, + return _acl_set_file( + path_p, + type.value, + acl, ); } - late final _dispatch_sync_fPtr = _lookup< + late final _acl_set_filePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_sync_f'); - late final _dispatch_sync_f = _dispatch_sync_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + ffi.Int Function( + ffi.Pointer, ffi.UnsignedInt, acl_t)>>('acl_set_file'); + late final _acl_set_file = _acl_set_filePtr + .asFunction, int, acl_t)>(); - void dispatch_async_and_wait( - dispatch_queue_t queue, - Dartdispatch_block_t block, + int acl_set_link_np( + ffi.Pointer path_p, + acl_type_t type, + acl_t acl, ) { - return _dispatch_async_and_wait( - queue, - block._id, + return _acl_set_link_np( + path_p, + type.value, + acl, ); } - late final _dispatch_async_and_waitPtr = _lookup< + late final _acl_set_link_npPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_async_and_wait'); - late final _dispatch_async_and_wait = _dispatch_async_and_waitPtr - .asFunction(); + ffi.Int Function(ffi.Pointer, ffi.UnsignedInt, + acl_t)>>('acl_set_link_np'); + late final _acl_set_link_np = _acl_set_link_npPtr + .asFunction, int, acl_t)>(); - void dispatch_async_and_wait_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int acl_copy_ext( + ffi.Pointer buf_p, + acl_t acl, + int size, ) { - return _dispatch_async_and_wait_f( - queue, - context, - work, + return _acl_copy_ext( + buf_p, + acl, + size, ); } - late final _dispatch_async_and_wait_fPtr = _lookup< + late final _acl_copy_extPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_async_and_wait_f'); - late final _dispatch_async_and_wait_f = - _dispatch_async_and_wait_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + ssize_t Function( + ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext'); + late final _acl_copy_ext = _acl_copy_extPtr + .asFunction, acl_t, int)>(); - void dispatch_apply( - int iterations, - dispatch_queue_t queue, - ObjCBlock_ffiVoid_ffiSize block, + int acl_copy_ext_native( + ffi.Pointer buf_p, + acl_t acl, + int size, ) { - return _dispatch_apply( - iterations, - queue, - block._id, + return _acl_copy_ext_native( + buf_p, + acl, + size, ); } - late final _dispatch_applyPtr = _lookup< + late final _acl_copy_ext_nativePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(ffi.Size, dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_apply'); - late final _dispatch_apply = _dispatch_applyPtr.asFunction< - void Function(int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + ssize_t Function( + ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext_native'); + late final _acl_copy_ext_native = _acl_copy_ext_nativePtr + .asFunction, acl_t, int)>(); - void dispatch_apply_f( - int iterations, - dispatch_queue_t queue, - ffi.Pointer context, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer context, ffi.Size iteration)>> - work, + acl_t acl_copy_int( + ffi.Pointer buf_p, ) { - return _dispatch_apply_f( - iterations, - queue, - context, - work, + return _acl_copy_int( + buf_p, ); } - late final _dispatch_apply_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Size, - dispatch_queue_t, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer context, - ffi.Size iteration)>>)>>('dispatch_apply_f'); - late final _dispatch_apply_f = _dispatch_apply_fPtr.asFunction< - void Function( - int, - dispatch_queue_t, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer context, ffi.Size iteration)>>)>(); + late final _acl_copy_intPtr = + _lookup)>>( + 'acl_copy_int'); + late final _acl_copy_int = + _acl_copy_intPtr.asFunction)>(); - dispatch_queue_t dispatch_get_current_queue() { - return _dispatch_get_current_queue(); + acl_t acl_copy_int_native( + ffi.Pointer buf_p, + ) { + return _acl_copy_int_native( + buf_p, + ); } - late final _dispatch_get_current_queuePtr = - _lookup>( - 'dispatch_get_current_queue'); - late final _dispatch_get_current_queue = - _dispatch_get_current_queuePtr.asFunction(); - - late final ffi.Pointer __dispatch_main_q = - _lookup('_dispatch_main_q'); - - ffi.Pointer get _dispatch_main_q => __dispatch_main_q; + late final _acl_copy_int_nativePtr = + _lookup)>>( + 'acl_copy_int_native'); + late final _acl_copy_int_native = _acl_copy_int_nativePtr + .asFunction)>(); - dispatch_queue_global_t dispatch_get_global_queue( - int identifier, - int flags, + acl_t acl_from_text( + ffi.Pointer buf_p, ) { - return _dispatch_get_global_queue( - identifier, - flags, + return _acl_from_text( + buf_p, ); } - late final _dispatch_get_global_queuePtr = _lookup< - ffi.NativeFunction< - dispatch_queue_global_t Function( - ffi.IntPtr, ffi.UintPtr)>>('dispatch_get_global_queue'); - late final _dispatch_get_global_queue = _dispatch_get_global_queuePtr - .asFunction(); - - late final ffi.Pointer - __dispatch_queue_attr_concurrent = - _lookup('_dispatch_queue_attr_concurrent'); - - ffi.Pointer get _dispatch_queue_attr_concurrent => - __dispatch_queue_attr_concurrent; + late final _acl_from_textPtr = + _lookup)>>( + 'acl_from_text'); + late final _acl_from_text = + _acl_from_textPtr.asFunction)>(); - dispatch_queue_attr_t dispatch_queue_attr_make_initially_inactive( - dispatch_queue_attr_t attr, + int acl_size( + acl_t acl, ) { - return _dispatch_queue_attr_make_initially_inactive( - attr, + return _acl_size( + acl, ); } - late final _dispatch_queue_attr_make_initially_inactivePtr = _lookup< - ffi.NativeFunction< - dispatch_queue_attr_t Function(dispatch_queue_attr_t)>>( - 'dispatch_queue_attr_make_initially_inactive'); - late final _dispatch_queue_attr_make_initially_inactive = - _dispatch_queue_attr_make_initially_inactivePtr - .asFunction(); + late final _acl_sizePtr = + _lookup>('acl_size'); + late final _acl_size = _acl_sizePtr.asFunction(); - dispatch_queue_attr_t dispatch_queue_attr_make_with_autorelease_frequency( - dispatch_queue_attr_t attr, - int frequency, + ffi.Pointer acl_to_text( + acl_t acl, + ffi.Pointer len_p, ) { - return _dispatch_queue_attr_make_with_autorelease_frequency( - attr, - frequency, + return _acl_to_text( + acl, + len_p, ); } - late final _dispatch_queue_attr_make_with_autorelease_frequencyPtr = _lookup< - ffi.NativeFunction< - dispatch_queue_attr_t Function( - dispatch_queue_attr_t, ffi.Int32)>>( - 'dispatch_queue_attr_make_with_autorelease_frequency'); - late final _dispatch_queue_attr_make_with_autorelease_frequency = - _dispatch_queue_attr_make_with_autorelease_frequencyPtr.asFunction< - dispatch_queue_attr_t Function(dispatch_queue_attr_t, int)>(); + late final _acl_to_textPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + acl_t, ffi.Pointer)>>('acl_to_text'); + late final _acl_to_text = _acl_to_textPtr.asFunction< + ffi.Pointer Function(acl_t, ffi.Pointer)>(); - dispatch_queue_attr_t dispatch_queue_attr_make_with_qos_class( - dispatch_queue_attr_t attr, - int qos_class, - int relative_priority, + int CFFileSecurityGetTypeID() { + return _CFFileSecurityGetTypeID(); + } + + late final _CFFileSecurityGetTypeIDPtr = + _lookup>( + 'CFFileSecurityGetTypeID'); + late final _CFFileSecurityGetTypeID = + _CFFileSecurityGetTypeIDPtr.asFunction(); + + CFFileSecurityRef CFFileSecurityCreate( + CFAllocatorRef allocator, ) { - return _dispatch_queue_attr_make_with_qos_class( - attr, - qos_class, - relative_priority, + return _CFFileSecurityCreate( + allocator, ); } - late final _dispatch_queue_attr_make_with_qos_classPtr = _lookup< - ffi.NativeFunction< - dispatch_queue_attr_t Function(dispatch_queue_attr_t, ffi.Int32, - ffi.Int)>>('dispatch_queue_attr_make_with_qos_class'); - late final _dispatch_queue_attr_make_with_qos_class = - _dispatch_queue_attr_make_with_qos_classPtr.asFunction< - dispatch_queue_attr_t Function(dispatch_queue_attr_t, int, int)>(); + late final _CFFileSecurityCreatePtr = + _lookup>( + 'CFFileSecurityCreate'); + late final _CFFileSecurityCreate = _CFFileSecurityCreatePtr.asFunction< + CFFileSecurityRef Function(CFAllocatorRef)>(); - dispatch_queue_t dispatch_queue_create_with_target( - ffi.Pointer label, - dispatch_queue_attr_t attr, - dispatch_queue_t target, + CFFileSecurityRef CFFileSecurityCreateCopy( + CFAllocatorRef allocator, + CFFileSecurityRef fileSec, ) { - return _dispatch_queue_create_with_target( - label, - attr, - target, + return _CFFileSecurityCreateCopy( + allocator, + fileSec, ); } - late final _dispatch_queue_create_with_targetPtr = _lookup< + late final _CFFileSecurityCreateCopyPtr = _lookup< ffi.NativeFunction< - dispatch_queue_t Function( - ffi.Pointer, - dispatch_queue_attr_t, - dispatch_queue_t)>>('dispatch_queue_create_with_target'); - late final _dispatch_queue_create_with_target = - _dispatch_queue_create_with_targetPtr.asFunction< - dispatch_queue_t Function(ffi.Pointer, - dispatch_queue_attr_t, dispatch_queue_t)>(); + CFFileSecurityRef Function( + CFAllocatorRef, CFFileSecurityRef)>>('CFFileSecurityCreateCopy'); + late final _CFFileSecurityCreateCopy = + _CFFileSecurityCreateCopyPtr.asFunction< + CFFileSecurityRef Function(CFAllocatorRef, CFFileSecurityRef)>(); - dispatch_queue_t dispatch_queue_create( - ffi.Pointer label, - dispatch_queue_attr_t attr, + int CFFileSecurityCopyOwnerUUID( + CFFileSecurityRef fileSec, + ffi.Pointer ownerUUID, ) { - return _dispatch_queue_create( - label, - attr, + return _CFFileSecurityCopyOwnerUUID( + fileSec, + ownerUUID, ); } - late final _dispatch_queue_createPtr = _lookup< + late final _CFFileSecurityCopyOwnerUUIDPtr = _lookup< ffi.NativeFunction< - dispatch_queue_t Function(ffi.Pointer, - dispatch_queue_attr_t)>>('dispatch_queue_create'); - late final _dispatch_queue_create = _dispatch_queue_createPtr.asFunction< - dispatch_queue_t Function( - ffi.Pointer, dispatch_queue_attr_t)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyOwnerUUID'); + late final _CFFileSecurityCopyOwnerUUID = _CFFileSecurityCopyOwnerUUIDPtr + .asFunction)>(); - ffi.Pointer dispatch_queue_get_label( - dispatch_queue_t queue, + int CFFileSecuritySetOwnerUUID( + CFFileSecurityRef fileSec, + CFUUIDRef ownerUUID, ) { - return _dispatch_queue_get_label( - queue, + return _CFFileSecuritySetOwnerUUID( + fileSec, + ownerUUID, ); } - late final _dispatch_queue_get_labelPtr = _lookup< - ffi.NativeFunction Function(dispatch_queue_t)>>( - 'dispatch_queue_get_label'); - late final _dispatch_queue_get_label = _dispatch_queue_get_labelPtr - .asFunction Function(dispatch_queue_t)>(); + late final _CFFileSecuritySetOwnerUUIDPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecuritySetOwnerUUID'); + late final _CFFileSecuritySetOwnerUUID = _CFFileSecuritySetOwnerUUIDPtr + .asFunction(); - int dispatch_queue_get_qos_class( - dispatch_queue_t queue, - ffi.Pointer relative_priority_ptr, + int CFFileSecurityCopyGroupUUID( + CFFileSecurityRef fileSec, + ffi.Pointer groupUUID, ) { - return _dispatch_queue_get_qos_class( - queue, - relative_priority_ptr, + return _CFFileSecurityCopyGroupUUID( + fileSec, + groupUUID, ); } - late final _dispatch_queue_get_qos_classPtr = _lookup< + late final _CFFileSecurityCopyGroupUUIDPtr = _lookup< ffi.NativeFunction< - ffi.Int32 Function(dispatch_queue_t, - ffi.Pointer)>>('dispatch_queue_get_qos_class'); - late final _dispatch_queue_get_qos_class = _dispatch_queue_get_qos_classPtr - .asFunction)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyGroupUUID'); + late final _CFFileSecurityCopyGroupUUID = _CFFileSecurityCopyGroupUUIDPtr + .asFunction)>(); - void dispatch_set_target_queue( - dispatch_object_t object, - dispatch_queue_t queue, + int CFFileSecuritySetGroupUUID( + CFFileSecurityRef fileSec, + CFUUIDRef groupUUID, ) { - return _dispatch_set_target_queue( - object, - queue, + return _CFFileSecuritySetGroupUUID( + fileSec, + groupUUID, ); } - late final _dispatch_set_target_queuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_object_t, - dispatch_queue_t)>>('dispatch_set_target_queue'); - late final _dispatch_set_target_queue = _dispatch_set_target_queuePtr - .asFunction(); + late final _CFFileSecuritySetGroupUUIDPtr = _lookup< + ffi.NativeFunction>( + 'CFFileSecuritySetGroupUUID'); + late final _CFFileSecuritySetGroupUUID = _CFFileSecuritySetGroupUUIDPtr + .asFunction(); - void dispatch_main() { - return _dispatch_main(); + int CFFileSecurityCopyAccessControlList( + CFFileSecurityRef fileSec, + ffi.Pointer accessControlList, + ) { + return _CFFileSecurityCopyAccessControlList( + fileSec, + accessControlList, + ); } - late final _dispatch_mainPtr = - _lookup>('dispatch_main'); - late final _dispatch_main = _dispatch_mainPtr.asFunction(); + late final _CFFileSecurityCopyAccessControlListPtr = _lookup< + ffi.NativeFunction< + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityCopyAccessControlList'); + late final _CFFileSecurityCopyAccessControlList = + _CFFileSecurityCopyAccessControlListPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - void dispatch_after( - Dartdispatch_time_t when, - dispatch_queue_t queue, - Dartdispatch_block_t block, + int CFFileSecuritySetAccessControlList( + CFFileSecurityRef fileSec, + acl_t accessControlList, ) { - return _dispatch_after( - when, - queue, - block._id, + return _CFFileSecuritySetAccessControlList( + fileSec, + accessControlList, ); } - late final _dispatch_afterPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_time_t, dispatch_queue_t, - dispatch_block_t)>>('dispatch_after'); - late final _dispatch_after = _dispatch_afterPtr - .asFunction(); + late final _CFFileSecuritySetAccessControlListPtr = + _lookup>( + 'CFFileSecuritySetAccessControlList'); + late final _CFFileSecuritySetAccessControlList = + _CFFileSecuritySetAccessControlListPtr.asFunction< + int Function(CFFileSecurityRef, acl_t)>(); - void dispatch_after_f( - int when, - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int CFFileSecurityGetOwner( + CFFileSecurityRef fileSec, + ffi.Pointer owner, ) { - return _dispatch_after_f( - when, - queue, - context, - work, + return _CFFileSecurityGetOwner( + fileSec, + owner, ); } - late final _dispatch_after_fPtr = _lookup< + late final _CFFileSecurityGetOwnerPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_time_t, dispatch_queue_t, - ffi.Pointer, dispatch_function_t)>>('dispatch_after_f'); - late final _dispatch_after_f = _dispatch_after_fPtr.asFunction< - void Function( - int, dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetOwner'); + late final _CFFileSecurityGetOwner = _CFFileSecurityGetOwnerPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - void dispatch_barrier_async( - dispatch_queue_t queue, - Dartdispatch_block_t block, + int CFFileSecuritySetOwner( + CFFileSecurityRef fileSec, + int owner, ) { - return _dispatch_barrier_async( - queue, - block._id, + return _CFFileSecuritySetOwner( + fileSec, + owner, ); } - late final _dispatch_barrier_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_async'); - late final _dispatch_barrier_async = _dispatch_barrier_asyncPtr - .asFunction(); + late final _CFFileSecuritySetOwnerPtr = + _lookup>( + 'CFFileSecuritySetOwner'); + late final _CFFileSecuritySetOwner = _CFFileSecuritySetOwnerPtr.asFunction< + int Function(CFFileSecurityRef, int)>(); - void dispatch_barrier_async_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int CFFileSecurityGetGroup( + CFFileSecurityRef fileSec, + ffi.Pointer group, ) { - return _dispatch_barrier_async_f( - queue, - context, - work, + return _CFFileSecurityGetGroup( + fileSec, + group, ); } - late final _dispatch_barrier_async_fPtr = _lookup< + late final _CFFileSecurityGetGroupPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_barrier_async_f'); - late final _dispatch_barrier_async_f = - _dispatch_barrier_async_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetGroup'); + late final _CFFileSecurityGetGroup = _CFFileSecurityGetGroupPtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - void dispatch_barrier_sync( - dispatch_queue_t queue, - Dartdispatch_block_t block, + int CFFileSecuritySetGroup( + CFFileSecurityRef fileSec, + int group, ) { - return _dispatch_barrier_sync( - queue, - block._id, + return _CFFileSecuritySetGroup( + fileSec, + group, ); } - late final _dispatch_barrier_syncPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, dispatch_block_t)>>('dispatch_barrier_sync'); - late final _dispatch_barrier_sync = _dispatch_barrier_syncPtr - .asFunction(); + late final _CFFileSecuritySetGroupPtr = + _lookup>( + 'CFFileSecuritySetGroup'); + late final _CFFileSecuritySetGroup = _CFFileSecuritySetGroupPtr.asFunction< + int Function(CFFileSecurityRef, int)>(); - void dispatch_barrier_sync_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + int CFFileSecurityGetMode( + CFFileSecurityRef fileSec, + ffi.Pointer mode, ) { - return _dispatch_barrier_sync_f( - queue, - context, - work, + return _CFFileSecurityGetMode( + fileSec, + mode, ); } - late final _dispatch_barrier_sync_fPtr = _lookup< + late final _CFFileSecurityGetModePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_barrier_sync_f'); - late final _dispatch_barrier_sync_f = _dispatch_barrier_sync_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + Boolean Function(CFFileSecurityRef, + ffi.Pointer)>>('CFFileSecurityGetMode'); + late final _CFFileSecurityGetMode = _CFFileSecurityGetModePtr.asFunction< + int Function(CFFileSecurityRef, ffi.Pointer)>(); - void dispatch_barrier_async_and_wait( - dispatch_queue_t queue, - Dartdispatch_block_t block, + int CFFileSecuritySetMode( + CFFileSecurityRef fileSec, + int mode, ) { - return _dispatch_barrier_async_and_wait( - queue, - block._id, + return _CFFileSecuritySetMode( + fileSec, + mode, ); } - late final _dispatch_barrier_async_and_waitPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, - dispatch_block_t)>>('dispatch_barrier_async_and_wait'); - late final _dispatch_barrier_async_and_wait = - _dispatch_barrier_async_and_waitPtr - .asFunction(); + late final _CFFileSecuritySetModePtr = + _lookup>( + 'CFFileSecuritySetMode'); + late final _CFFileSecuritySetMode = _CFFileSecuritySetModePtr.asFunction< + int Function(CFFileSecurityRef, int)>(); - void dispatch_barrier_async_and_wait_f( - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + DartBoolean CFFileSecurityClearProperties( + CFFileSecurityRef fileSec, + CFFileSecurityClearOptions clearPropertyMask, ) { - return _dispatch_barrier_async_and_wait_f( - queue, - context, - work, + return _CFFileSecurityClearProperties( + fileSec, + clearPropertyMask.value, ); } - late final _dispatch_barrier_async_and_wait_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>>('dispatch_barrier_async_and_wait_f'); - late final _dispatch_barrier_async_and_wait_f = - _dispatch_barrier_async_and_wait_fPtr.asFunction< - void Function( - dispatch_queue_t, ffi.Pointer, dispatch_function_t)>(); + late final _CFFileSecurityClearPropertiesPtr = _lookup< + ffi + .NativeFunction>( + 'CFFileSecurityClearProperties'); + late final _CFFileSecurityClearProperties = _CFFileSecurityClearPropertiesPtr + .asFunction(); - void dispatch_queue_set_specific( - dispatch_queue_t queue, - ffi.Pointer key, - ffi.Pointer context, - dispatch_function_t destructor, + CFStringRef CFStringTokenizerCopyBestStringLanguage( + CFStringRef string, + CFRange range, ) { - return _dispatch_queue_set_specific( - queue, - key, - context, - destructor, + return _CFStringTokenizerCopyBestStringLanguage( + string, + range, ); } - late final _dispatch_queue_set_specificPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_queue_t, - ffi.Pointer, - ffi.Pointer, - dispatch_function_t)>>('dispatch_queue_set_specific'); - late final _dispatch_queue_set_specific = - _dispatch_queue_set_specificPtr.asFunction< - void Function(dispatch_queue_t, ffi.Pointer, - ffi.Pointer, dispatch_function_t)>(); + late final _CFStringTokenizerCopyBestStringLanguagePtr = + _lookup>( + 'CFStringTokenizerCopyBestStringLanguage'); + late final _CFStringTokenizerCopyBestStringLanguage = + _CFStringTokenizerCopyBestStringLanguagePtr.asFunction< + CFStringRef Function(CFStringRef, CFRange)>(); - ffi.Pointer dispatch_queue_get_specific( - dispatch_queue_t queue, - ffi.Pointer key, + int CFStringTokenizerGetTypeID() { + return _CFStringTokenizerGetTypeID(); + } + + late final _CFStringTokenizerGetTypeIDPtr = + _lookup>( + 'CFStringTokenizerGetTypeID'); + late final _CFStringTokenizerGetTypeID = + _CFStringTokenizerGetTypeIDPtr.asFunction(); + + CFStringTokenizerRef CFStringTokenizerCreate( + CFAllocatorRef alloc, + CFStringRef string, + CFRange range, + int options, + CFLocaleRef locale, ) { - return _dispatch_queue_get_specific( - queue, - key, + return _CFStringTokenizerCreate( + alloc, + string, + range, + options, + locale, ); } - late final _dispatch_queue_get_specificPtr = _lookup< + late final _CFStringTokenizerCreatePtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function(dispatch_queue_t, - ffi.Pointer)>>('dispatch_queue_get_specific'); - late final _dispatch_queue_get_specific = - _dispatch_queue_get_specificPtr.asFunction< - ffi.Pointer Function( - dispatch_queue_t, ffi.Pointer)>(); + CFStringTokenizerRef Function(CFAllocatorRef, CFStringRef, CFRange, + CFOptionFlags, CFLocaleRef)>>('CFStringTokenizerCreate'); + late final _CFStringTokenizerCreate = _CFStringTokenizerCreatePtr.asFunction< + CFStringTokenizerRef Function( + CFAllocatorRef, CFStringRef, CFRange, int, CFLocaleRef)>(); - ffi.Pointer dispatch_get_specific( - ffi.Pointer key, + void CFStringTokenizerSetString( + CFStringTokenizerRef tokenizer, + CFStringRef string, + CFRange range, ) { - return _dispatch_get_specific( - key, + return _CFStringTokenizerSetString( + tokenizer, + string, + range, ); } - late final _dispatch_get_specificPtr = _lookup< + late final _CFStringTokenizerSetStringPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('dispatch_get_specific'); - late final _dispatch_get_specific = _dispatch_get_specificPtr - .asFunction Function(ffi.Pointer)>(); + ffi.Void Function(CFStringTokenizerRef, CFStringRef, + CFRange)>>('CFStringTokenizerSetString'); + late final _CFStringTokenizerSetString = _CFStringTokenizerSetStringPtr + .asFunction(); - void dispatch_assert_queue( - dispatch_queue_t queue, + CFStringTokenizerTokenType CFStringTokenizerGoToTokenAtIndex( + CFStringTokenizerRef tokenizer, + DartCFIndex index, ) { - return _dispatch_assert_queue( - queue, - ); + return CFStringTokenizerTokenType.fromValue( + _CFStringTokenizerGoToTokenAtIndex( + tokenizer, + index, + )); } - late final _dispatch_assert_queuePtr = - _lookup>( - 'dispatch_assert_queue'); - late final _dispatch_assert_queue = - _dispatch_assert_queuePtr.asFunction(); + late final _CFStringTokenizerGoToTokenAtIndexPtr = _lookup< + ffi.NativeFunction< + CFOptionFlags Function(CFStringTokenizerRef, + CFIndex)>>('CFStringTokenizerGoToTokenAtIndex'); + late final _CFStringTokenizerGoToTokenAtIndex = + _CFStringTokenizerGoToTokenAtIndexPtr.asFunction< + int Function(CFStringTokenizerRef, int)>(); - void dispatch_assert_queue_barrier( - dispatch_queue_t queue, + CFStringTokenizerTokenType CFStringTokenizerAdvanceToNextToken( + CFStringTokenizerRef tokenizer, ) { - return _dispatch_assert_queue_barrier( - queue, - ); + return CFStringTokenizerTokenType.fromValue( + _CFStringTokenizerAdvanceToNextToken( + tokenizer, + )); } - late final _dispatch_assert_queue_barrierPtr = - _lookup>( - 'dispatch_assert_queue_barrier'); - late final _dispatch_assert_queue_barrier = _dispatch_assert_queue_barrierPtr - .asFunction(); + late final _CFStringTokenizerAdvanceToNextTokenPtr = + _lookup>( + 'CFStringTokenizerAdvanceToNextToken'); + late final _CFStringTokenizerAdvanceToNextToken = + _CFStringTokenizerAdvanceToNextTokenPtr.asFunction< + int Function(CFStringTokenizerRef)>(); - void dispatch_assert_queue_not( - dispatch_queue_t queue, + CFRange CFStringTokenizerGetCurrentTokenRange( + CFStringTokenizerRef tokenizer, ) { - return _dispatch_assert_queue_not( - queue, + return _CFStringTokenizerGetCurrentTokenRange( + tokenizer, ); } - late final _dispatch_assert_queue_notPtr = - _lookup>( - 'dispatch_assert_queue_not'); - late final _dispatch_assert_queue_not = _dispatch_assert_queue_notPtr - .asFunction(); + late final _CFStringTokenizerGetCurrentTokenRangePtr = + _lookup>( + 'CFStringTokenizerGetCurrentTokenRange'); + late final _CFStringTokenizerGetCurrentTokenRange = + _CFStringTokenizerGetCurrentTokenRangePtr.asFunction< + CFRange Function(CFStringTokenizerRef)>(); - Dartdispatch_block_t dispatch_block_create( - int flags, - Dartdispatch_block_t block, + CFTypeRef CFStringTokenizerCopyCurrentTokenAttribute( + CFStringTokenizerRef tokenizer, + int attribute, ) { - return ObjCBlock_ffiVoid._( - _dispatch_block_create( - flags, - block._id, - ), - this, - retain: false, - release: true); + return _CFStringTokenizerCopyCurrentTokenAttribute( + tokenizer, + attribute, + ); } - late final _dispatch_block_createPtr = _lookup< + late final _CFStringTokenizerCopyCurrentTokenAttributePtr = _lookup< ffi.NativeFunction< - dispatch_block_t Function( - ffi.Int32, dispatch_block_t)>>('dispatch_block_create'); - late final _dispatch_block_create = _dispatch_block_createPtr - .asFunction(); - - Dartdispatch_block_t dispatch_block_create_with_qos_class( - int flags, - int qos_class, - int relative_priority, - Dartdispatch_block_t block, + CFTypeRef Function(CFStringTokenizerRef, + CFOptionFlags)>>('CFStringTokenizerCopyCurrentTokenAttribute'); + late final _CFStringTokenizerCopyCurrentTokenAttribute = + _CFStringTokenizerCopyCurrentTokenAttributePtr.asFunction< + CFTypeRef Function(CFStringTokenizerRef, int)>(); + + int CFStringTokenizerGetCurrentSubTokens( + CFStringTokenizerRef tokenizer, + ffi.Pointer ranges, + int maxRangeLength, + CFMutableArrayRef derivedSubTokens, ) { - return ObjCBlock_ffiVoid._( - _dispatch_block_create_with_qos_class( - flags, - qos_class, - relative_priority, - block._id, - ), - this, - retain: false, - release: true); + return _CFStringTokenizerGetCurrentSubTokens( + tokenizer, + ranges, + maxRangeLength, + derivedSubTokens, + ); } - late final _dispatch_block_create_with_qos_classPtr = _lookup< + late final _CFStringTokenizerGetCurrentSubTokensPtr = _lookup< ffi.NativeFunction< - dispatch_block_t Function(ffi.Int32, ffi.Int32, ffi.Int, - dispatch_block_t)>>('dispatch_block_create_with_qos_class'); - late final _dispatch_block_create_with_qos_class = - _dispatch_block_create_with_qos_classPtr.asFunction< - dispatch_block_t Function(int, int, int, dispatch_block_t)>(); + CFIndex Function(CFStringTokenizerRef, ffi.Pointer, CFIndex, + CFMutableArrayRef)>>('CFStringTokenizerGetCurrentSubTokens'); + late final _CFStringTokenizerGetCurrentSubTokens = + _CFStringTokenizerGetCurrentSubTokensPtr.asFunction< + int Function(CFStringTokenizerRef, ffi.Pointer, int, + CFMutableArrayRef)>(); - void dispatch_block_perform( - int flags, - Dartdispatch_block_t block, - ) { - return _dispatch_block_perform( - flags, - block._id, - ); + int CFFileDescriptorGetTypeID() { + return _CFFileDescriptorGetTypeID(); } - late final _dispatch_block_performPtr = _lookup< - ffi.NativeFunction>( - 'dispatch_block_perform'); - late final _dispatch_block_perform = _dispatch_block_performPtr - .asFunction(); + late final _CFFileDescriptorGetTypeIDPtr = + _lookup>( + 'CFFileDescriptorGetTypeID'); + late final _CFFileDescriptorGetTypeID = + _CFFileDescriptorGetTypeIDPtr.asFunction(); - int dispatch_block_wait( - Dartdispatch_block_t block, - Dartdispatch_time_t timeout, + CFFileDescriptorRef CFFileDescriptorCreate( + CFAllocatorRef allocator, + int fd, + int closeOnInvalidate, + CFFileDescriptorCallBack callout, + ffi.Pointer context, ) { - return _dispatch_block_wait( - block._id, - timeout, + return _CFFileDescriptorCreate( + allocator, + fd, + closeOnInvalidate, + callout, + context, ); } - late final _dispatch_block_waitPtr = _lookup< + late final _CFFileDescriptorCreatePtr = _lookup< ffi.NativeFunction< - ffi.IntPtr Function( - dispatch_block_t, dispatch_time_t)>>('dispatch_block_wait'); - late final _dispatch_block_wait = - _dispatch_block_waitPtr.asFunction(); + CFFileDescriptorRef Function( + CFAllocatorRef, + CFFileDescriptorNativeDescriptor, + Boolean, + CFFileDescriptorCallBack, + ffi.Pointer)>>('CFFileDescriptorCreate'); + late final _CFFileDescriptorCreate = _CFFileDescriptorCreatePtr.asFunction< + CFFileDescriptorRef Function(CFAllocatorRef, int, int, + CFFileDescriptorCallBack, ffi.Pointer)>(); - void dispatch_block_notify( - Dartdispatch_block_t block, - dispatch_queue_t queue, - Dartdispatch_block_t notification_block, + int CFFileDescriptorGetNativeDescriptor( + CFFileDescriptorRef f, ) { - return _dispatch_block_notify( - block._id, - queue, - notification_block._id, + return _CFFileDescriptorGetNativeDescriptor( + f, ); } - late final _dispatch_block_notifyPtr = _lookup< + late final _CFFileDescriptorGetNativeDescriptorPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_block_t, dispatch_queue_t, - dispatch_block_t)>>('dispatch_block_notify'); - late final _dispatch_block_notify = _dispatch_block_notifyPtr.asFunction< - void Function(dispatch_block_t, dispatch_queue_t, dispatch_block_t)>(); + CFFileDescriptorNativeDescriptor Function( + CFFileDescriptorRef)>>('CFFileDescriptorGetNativeDescriptor'); + late final _CFFileDescriptorGetNativeDescriptor = + _CFFileDescriptorGetNativeDescriptorPtr.asFunction< + int Function(CFFileDescriptorRef)>(); - void dispatch_block_cancel( - Dartdispatch_block_t block, + void CFFileDescriptorGetContext( + CFFileDescriptorRef f, + ffi.Pointer context, ) { - return _dispatch_block_cancel( - block._id, + return _CFFileDescriptorGetContext( + f, + context, ); } - late final _dispatch_block_cancelPtr = - _lookup>( - 'dispatch_block_cancel'); - late final _dispatch_block_cancel = - _dispatch_block_cancelPtr.asFunction(); + late final _CFFileDescriptorGetContextPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + CFFileDescriptorRef, ffi.Pointer)>>( + 'CFFileDescriptorGetContext'); + late final _CFFileDescriptorGetContext = + _CFFileDescriptorGetContextPtr.asFunction< + void Function( + CFFileDescriptorRef, ffi.Pointer)>(); - int dispatch_block_testcancel( - Dartdispatch_block_t block, + void CFFileDescriptorEnableCallBacks( + CFFileDescriptorRef f, + int callBackTypes, ) { - return _dispatch_block_testcancel( - block._id, + return _CFFileDescriptorEnableCallBacks( + f, + callBackTypes, ); } - late final _dispatch_block_testcancelPtr = - _lookup>( - 'dispatch_block_testcancel'); - late final _dispatch_block_testcancel = _dispatch_block_testcancelPtr - .asFunction(); - - late final ffi.Pointer _KERNEL_SECURITY_TOKEN = - _lookup('KERNEL_SECURITY_TOKEN'); - - security_token_t get KERNEL_SECURITY_TOKEN => _KERNEL_SECURITY_TOKEN.ref; - - late final ffi.Pointer _KERNEL_AUDIT_TOKEN = - _lookup('KERNEL_AUDIT_TOKEN'); - - audit_token_t get KERNEL_AUDIT_TOKEN => _KERNEL_AUDIT_TOKEN.ref; + late final _CFFileDescriptorEnableCallBacksPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(CFFileDescriptorRef, + CFOptionFlags)>>('CFFileDescriptorEnableCallBacks'); + late final _CFFileDescriptorEnableCallBacks = + _CFFileDescriptorEnableCallBacksPtr.asFunction< + void Function(CFFileDescriptorRef, int)>(); - int mach_msg_overwrite( - ffi.Pointer msg, - int option, - int send_size, - int rcv_size, - int rcv_name, - int timeout, - int notify, - ffi.Pointer rcv_msg, - int rcv_limit, + void CFFileDescriptorDisableCallBacks( + CFFileDescriptorRef f, + int callBackTypes, ) { - return _mach_msg_overwrite( - msg, - option, - send_size, - rcv_size, - rcv_name, - timeout, - notify, - rcv_msg, - rcv_limit, + return _CFFileDescriptorDisableCallBacks( + f, + callBackTypes, ); } - late final _mach_msg_overwritePtr = _lookup< + late final _CFFileDescriptorDisableCallBacksPtr = _lookup< ffi.NativeFunction< - mach_msg_return_t Function( - ffi.Pointer, - mach_msg_option_t, - mach_msg_size_t, - mach_msg_size_t, - mach_port_name_t, - mach_msg_timeout_t, - mach_port_name_t, - ffi.Pointer, - mach_msg_size_t)>>('mach_msg_overwrite'); - late final _mach_msg_overwrite = _mach_msg_overwritePtr.asFunction< - int Function(ffi.Pointer, int, int, int, int, int, int, - ffi.Pointer, int)>(); + ffi.Void Function(CFFileDescriptorRef, + CFOptionFlags)>>('CFFileDescriptorDisableCallBacks'); + late final _CFFileDescriptorDisableCallBacks = + _CFFileDescriptorDisableCallBacksPtr.asFunction< + void Function(CFFileDescriptorRef, int)>(); - int mach_msg( - ffi.Pointer msg, - int option, - int send_size, - int rcv_size, - int rcv_name, - int timeout, - int notify, + void CFFileDescriptorInvalidate( + CFFileDescriptorRef f, ) { - return _mach_msg( - msg, - option, - send_size, - rcv_size, - rcv_name, - timeout, - notify, + return _CFFileDescriptorInvalidate( + f, ); } - late final _mach_msgPtr = _lookup< - ffi.NativeFunction< - mach_msg_return_t Function( - ffi.Pointer, - mach_msg_option_t, - mach_msg_size_t, - mach_msg_size_t, - mach_port_name_t, - mach_msg_timeout_t, - mach_port_name_t)>>('mach_msg'); - late final _mach_msg = _mach_msgPtr.asFunction< - int Function( - ffi.Pointer, int, int, int, int, int, int)>(); + late final _CFFileDescriptorInvalidatePtr = + _lookup>( + 'CFFileDescriptorInvalidate'); + late final _CFFileDescriptorInvalidate = _CFFileDescriptorInvalidatePtr + .asFunction(); - int mach_voucher_deallocate( - int voucher, + int CFFileDescriptorIsValid( + CFFileDescriptorRef f, ) { - return _mach_voucher_deallocate( - voucher, + return _CFFileDescriptorIsValid( + f, ); } - late final _mach_voucher_deallocatePtr = - _lookup>( - 'mach_voucher_deallocate'); - late final _mach_voucher_deallocate = - _mach_voucher_deallocatePtr.asFunction(); - - late final ffi.Pointer - __dispatch_source_type_data_add = - _lookup('_dispatch_source_type_data_add'); - - ffi.Pointer get _dispatch_source_type_data_add => - __dispatch_source_type_data_add; - - late final ffi.Pointer - __dispatch_source_type_data_or = - _lookup('_dispatch_source_type_data_or'); - - ffi.Pointer get _dispatch_source_type_data_or => - __dispatch_source_type_data_or; - - late final ffi.Pointer - __dispatch_source_type_data_replace = - _lookup('_dispatch_source_type_data_replace'); - - ffi.Pointer get _dispatch_source_type_data_replace => - __dispatch_source_type_data_replace; - - late final ffi.Pointer - __dispatch_source_type_mach_send = - _lookup('_dispatch_source_type_mach_send'); - - ffi.Pointer get _dispatch_source_type_mach_send => - __dispatch_source_type_mach_send; - - late final ffi.Pointer - __dispatch_source_type_mach_recv = - _lookup('_dispatch_source_type_mach_recv'); - - ffi.Pointer get _dispatch_source_type_mach_recv => - __dispatch_source_type_mach_recv; - - late final ffi.Pointer - __dispatch_source_type_memorypressure = - _lookup('_dispatch_source_type_memorypressure'); - - ffi.Pointer - get _dispatch_source_type_memorypressure => - __dispatch_source_type_memorypressure; - - late final ffi.Pointer __dispatch_source_type_proc = - _lookup('_dispatch_source_type_proc'); - - ffi.Pointer get _dispatch_source_type_proc => - __dispatch_source_type_proc; - - late final ffi.Pointer __dispatch_source_type_read = - _lookup('_dispatch_source_type_read'); - - ffi.Pointer get _dispatch_source_type_read => - __dispatch_source_type_read; - - late final ffi.Pointer __dispatch_source_type_signal = - _lookup('_dispatch_source_type_signal'); - - ffi.Pointer get _dispatch_source_type_signal => - __dispatch_source_type_signal; - - late final ffi.Pointer __dispatch_source_type_timer = - _lookup('_dispatch_source_type_timer'); - - ffi.Pointer get _dispatch_source_type_timer => - __dispatch_source_type_timer; + late final _CFFileDescriptorIsValidPtr = + _lookup>( + 'CFFileDescriptorIsValid'); + late final _CFFileDescriptorIsValid = _CFFileDescriptorIsValidPtr.asFunction< + int Function(CFFileDescriptorRef)>(); - late final ffi.Pointer __dispatch_source_type_vnode = - _lookup('_dispatch_source_type_vnode'); + CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource( + CFAllocatorRef allocator, + CFFileDescriptorRef f, + int order, + ) { + return _CFFileDescriptorCreateRunLoopSource( + allocator, + f, + order, + ); + } - ffi.Pointer get _dispatch_source_type_vnode => - __dispatch_source_type_vnode; + late final _CFFileDescriptorCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFFileDescriptorRef, + CFIndex)>>('CFFileDescriptorCreateRunLoopSource'); + late final _CFFileDescriptorCreateRunLoopSource = + _CFFileDescriptorCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function( + CFAllocatorRef, CFFileDescriptorRef, int)>(); - late final ffi.Pointer __dispatch_source_type_write = - _lookup('_dispatch_source_type_write'); + int CFUserNotificationGetTypeID() { + return _CFUserNotificationGetTypeID(); + } - ffi.Pointer get _dispatch_source_type_write => - __dispatch_source_type_write; + late final _CFUserNotificationGetTypeIDPtr = + _lookup>( + 'CFUserNotificationGetTypeID'); + late final _CFUserNotificationGetTypeID = + _CFUserNotificationGetTypeIDPtr.asFunction(); - dispatch_source_t dispatch_source_create( - dispatch_source_type_t type, - int handle, - int mask, - dispatch_queue_t queue, + CFUserNotificationRef CFUserNotificationCreate( + CFAllocatorRef allocator, + double timeout, + int flags, + ffi.Pointer error, + CFDictionaryRef dictionary, ) { - return _dispatch_source_create( - type, - handle, - mask, - queue, + return _CFUserNotificationCreate( + allocator, + timeout, + flags, + error, + dictionary, ); } - late final _dispatch_source_createPtr = _lookup< + late final _CFUserNotificationCreatePtr = _lookup< ffi.NativeFunction< - dispatch_source_t Function(dispatch_source_type_t, ffi.UintPtr, - ffi.UintPtr, dispatch_queue_t)>>('dispatch_source_create'); - late final _dispatch_source_create = _dispatch_source_createPtr.asFunction< - dispatch_source_t Function( - dispatch_source_type_t, int, int, dispatch_queue_t)>(); + CFUserNotificationRef Function( + CFAllocatorRef, + CFTimeInterval, + CFOptionFlags, + ffi.Pointer, + CFDictionaryRef)>>('CFUserNotificationCreate'); + late final _CFUserNotificationCreate = + _CFUserNotificationCreatePtr.asFunction< + CFUserNotificationRef Function(CFAllocatorRef, double, int, + ffi.Pointer, CFDictionaryRef)>(); - void dispatch_source_set_event_handler( - dispatch_source_t source, - Dartdispatch_block_t handler, + int CFUserNotificationReceiveResponse( + CFUserNotificationRef userNotification, + double timeout, + ffi.Pointer responseFlags, ) { - return _dispatch_source_set_event_handler( - source, - handler._id, + return _CFUserNotificationReceiveResponse( + userNotification, + timeout, + responseFlags, ); } - late final _dispatch_source_set_event_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_block_t)>>('dispatch_source_set_event_handler'); - late final _dispatch_source_set_event_handler = - _dispatch_source_set_event_handlerPtr - .asFunction(); + late final _CFUserNotificationReceiveResponsePtr = _lookup< + ffi.NativeFunction< + SInt32 Function(CFUserNotificationRef, CFTimeInterval, + ffi.Pointer)>>( + 'CFUserNotificationReceiveResponse'); + late final _CFUserNotificationReceiveResponse = + _CFUserNotificationReceiveResponsePtr.asFunction< + int Function( + CFUserNotificationRef, double, ffi.Pointer)>(); - void dispatch_source_set_event_handler_f( - dispatch_source_t source, - dispatch_function_t handler, + CFStringRef CFUserNotificationGetResponseValue( + CFUserNotificationRef userNotification, + CFStringRef key, + int idx, ) { - return _dispatch_source_set_event_handler_f( - source, - handler, + return _CFUserNotificationGetResponseValue( + userNotification, + key, + idx, ); } - late final _dispatch_source_set_event_handler_fPtr = _lookup< + late final _CFUserNotificationGetResponseValuePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_function_t)>>('dispatch_source_set_event_handler_f'); - late final _dispatch_source_set_event_handler_f = - _dispatch_source_set_event_handler_fPtr - .asFunction(); + CFStringRef Function(CFUserNotificationRef, CFStringRef, + CFIndex)>>('CFUserNotificationGetResponseValue'); + late final _CFUserNotificationGetResponseValue = + _CFUserNotificationGetResponseValuePtr.asFunction< + CFStringRef Function(CFUserNotificationRef, CFStringRef, int)>(); - void dispatch_source_set_cancel_handler( - dispatch_source_t source, - Dartdispatch_block_t handler, + CFDictionaryRef CFUserNotificationGetResponseDictionary( + CFUserNotificationRef userNotification, ) { - return _dispatch_source_set_cancel_handler( - source, - handler._id, + return _CFUserNotificationGetResponseDictionary( + userNotification, ); } - late final _dispatch_source_set_cancel_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_block_t)>>('dispatch_source_set_cancel_handler'); - late final _dispatch_source_set_cancel_handler = - _dispatch_source_set_cancel_handlerPtr - .asFunction(); + late final _CFUserNotificationGetResponseDictionaryPtr = _lookup< + ffi.NativeFunction>( + 'CFUserNotificationGetResponseDictionary'); + late final _CFUserNotificationGetResponseDictionary = + _CFUserNotificationGetResponseDictionaryPtr.asFunction< + CFDictionaryRef Function(CFUserNotificationRef)>(); - void dispatch_source_set_cancel_handler_f( - dispatch_source_t source, - dispatch_function_t handler, + int CFUserNotificationUpdate( + CFUserNotificationRef userNotification, + double timeout, + int flags, + CFDictionaryRef dictionary, ) { - return _dispatch_source_set_cancel_handler_f( - source, - handler, + return _CFUserNotificationUpdate( + userNotification, + timeout, + flags, + dictionary, ); } - late final _dispatch_source_set_cancel_handler_fPtr = _lookup< + late final _CFUserNotificationUpdatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_function_t)>>('dispatch_source_set_cancel_handler_f'); - late final _dispatch_source_set_cancel_handler_f = - _dispatch_source_set_cancel_handler_fPtr - .asFunction(); + SInt32 Function(CFUserNotificationRef, CFTimeInterval, CFOptionFlags, + CFDictionaryRef)>>('CFUserNotificationUpdate'); + late final _CFUserNotificationUpdate = + _CFUserNotificationUpdatePtr.asFunction< + int Function(CFUserNotificationRef, double, int, CFDictionaryRef)>(); - void dispatch_source_cancel( - dispatch_source_t source, + int CFUserNotificationCancel( + CFUserNotificationRef userNotification, ) { - return _dispatch_source_cancel( - source, + return _CFUserNotificationCancel( + userNotification, ); } - late final _dispatch_source_cancelPtr = - _lookup>( - 'dispatch_source_cancel'); - late final _dispatch_source_cancel = - _dispatch_source_cancelPtr.asFunction(); + late final _CFUserNotificationCancelPtr = + _lookup>( + 'CFUserNotificationCancel'); + late final _CFUserNotificationCancel = _CFUserNotificationCancelPtr + .asFunction(); - int dispatch_source_testcancel( - dispatch_source_t source, + CFRunLoopSourceRef CFUserNotificationCreateRunLoopSource( + CFAllocatorRef allocator, + CFUserNotificationRef userNotification, + CFUserNotificationCallBack callout, + int order, ) { - return _dispatch_source_testcancel( - source, + return _CFUserNotificationCreateRunLoopSource( + allocator, + userNotification, + callout, + order, ); } - late final _dispatch_source_testcancelPtr = - _lookup>( - 'dispatch_source_testcancel'); - late final _dispatch_source_testcancel = _dispatch_source_testcancelPtr - .asFunction(); + late final _CFUserNotificationCreateRunLoopSourcePtr = _lookup< + ffi.NativeFunction< + CFRunLoopSourceRef Function( + CFAllocatorRef, + CFUserNotificationRef, + CFUserNotificationCallBack, + CFIndex)>>('CFUserNotificationCreateRunLoopSource'); + late final _CFUserNotificationCreateRunLoopSource = + _CFUserNotificationCreateRunLoopSourcePtr.asFunction< + CFRunLoopSourceRef Function(CFAllocatorRef, CFUserNotificationRef, + CFUserNotificationCallBack, int)>(); - int dispatch_source_get_handle( - dispatch_source_t source, + int CFUserNotificationDisplayNotice( + double timeout, + int flags, + CFURLRef iconURL, + CFURLRef soundURL, + CFURLRef localizationURL, + CFStringRef alertHeader, + CFStringRef alertMessage, + CFStringRef defaultButtonTitle, ) { - return _dispatch_source_get_handle( - source, + return _CFUserNotificationDisplayNotice( + timeout, + flags, + iconURL, + soundURL, + localizationURL, + alertHeader, + alertMessage, + defaultButtonTitle, ); } - late final _dispatch_source_get_handlePtr = - _lookup>( - 'dispatch_source_get_handle'); - late final _dispatch_source_get_handle = _dispatch_source_get_handlePtr - .asFunction(); + late final _CFUserNotificationDisplayNoticePtr = _lookup< + ffi.NativeFunction< + SInt32 Function( + CFTimeInterval, + CFOptionFlags, + CFURLRef, + CFURLRef, + CFURLRef, + CFStringRef, + CFStringRef, + CFStringRef)>>('CFUserNotificationDisplayNotice'); + late final _CFUserNotificationDisplayNotice = + _CFUserNotificationDisplayNoticePtr.asFunction< + int Function(double, int, CFURLRef, CFURLRef, CFURLRef, CFStringRef, + CFStringRef, CFStringRef)>(); - int dispatch_source_get_mask( - dispatch_source_t source, + int CFUserNotificationDisplayAlert( + double timeout, + int flags, + CFURLRef iconURL, + CFURLRef soundURL, + CFURLRef localizationURL, + CFStringRef alertHeader, + CFStringRef alertMessage, + CFStringRef defaultButtonTitle, + CFStringRef alternateButtonTitle, + CFStringRef otherButtonTitle, + ffi.Pointer responseFlags, ) { - return _dispatch_source_get_mask( - source, + return _CFUserNotificationDisplayAlert( + timeout, + flags, + iconURL, + soundURL, + localizationURL, + alertHeader, + alertMessage, + defaultButtonTitle, + alternateButtonTitle, + otherButtonTitle, + responseFlags, ); } - late final _dispatch_source_get_maskPtr = - _lookup>( - 'dispatch_source_get_mask'); - late final _dispatch_source_get_mask = _dispatch_source_get_maskPtr - .asFunction(); + late final _CFUserNotificationDisplayAlertPtr = _lookup< + ffi.NativeFunction< + SInt32 Function( + CFTimeInterval, + CFOptionFlags, + CFURLRef, + CFURLRef, + CFURLRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + ffi.Pointer)>>('CFUserNotificationDisplayAlert'); + late final _CFUserNotificationDisplayAlert = + _CFUserNotificationDisplayAlertPtr.asFunction< + int Function( + double, + int, + CFURLRef, + CFURLRef, + CFURLRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + CFStringRef, + ffi.Pointer)>(); - int dispatch_source_get_data( - dispatch_source_t source, - ) { - return _dispatch_source_get_data( - source, - ); - } + late final ffi.Pointer _kCFUserNotificationIconURLKey = + _lookup('kCFUserNotificationIconURLKey'); - late final _dispatch_source_get_dataPtr = - _lookup>( - 'dispatch_source_get_data'); - late final _dispatch_source_get_data = _dispatch_source_get_dataPtr - .asFunction(); + CFStringRef get kCFUserNotificationIconURLKey => + _kCFUserNotificationIconURLKey.value; - void dispatch_source_merge_data( - dispatch_source_t source, - int value, - ) { - return _dispatch_source_merge_data( - source, - value, - ); - } + late final ffi.Pointer _kCFUserNotificationSoundURLKey = + _lookup('kCFUserNotificationSoundURLKey'); - late final _dispatch_source_merge_dataPtr = _lookup< - ffi - .NativeFunction>( - 'dispatch_source_merge_data'); - late final _dispatch_source_merge_data = _dispatch_source_merge_dataPtr - .asFunction(); + CFStringRef get kCFUserNotificationSoundURLKey => + _kCFUserNotificationSoundURLKey.value; - void dispatch_source_set_timer( - dispatch_source_t source, - int start, - int interval, - int leeway, - ) { - return _dispatch_source_set_timer( - source, - start, - interval, - leeway, - ); - } + late final ffi.Pointer _kCFUserNotificationLocalizationURLKey = + _lookup('kCFUserNotificationLocalizationURLKey'); - late final _dispatch_source_set_timerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, dispatch_time_t, ffi.Uint64, - ffi.Uint64)>>('dispatch_source_set_timer'); - late final _dispatch_source_set_timer = _dispatch_source_set_timerPtr - .asFunction(); + CFStringRef get kCFUserNotificationLocalizationURLKey => + _kCFUserNotificationLocalizationURLKey.value; - void dispatch_source_set_registration_handler( - dispatch_source_t source, - Dartdispatch_block_t handler, - ) { - return _dispatch_source_set_registration_handler( - source, - handler._id, - ); - } + late final ffi.Pointer _kCFUserNotificationAlertHeaderKey = + _lookup('kCFUserNotificationAlertHeaderKey'); - late final _dispatch_source_set_registration_handlerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, - dispatch_block_t)>>('dispatch_source_set_registration_handler'); - late final _dispatch_source_set_registration_handler = - _dispatch_source_set_registration_handlerPtr - .asFunction(); + CFStringRef get kCFUserNotificationAlertHeaderKey => + _kCFUserNotificationAlertHeaderKey.value; - void dispatch_source_set_registration_handler_f( - dispatch_source_t source, - dispatch_function_t handler, - ) { - return _dispatch_source_set_registration_handler_f( - source, - handler, - ); - } + late final ffi.Pointer _kCFUserNotificationAlertMessageKey = + _lookup('kCFUserNotificationAlertMessageKey'); - late final _dispatch_source_set_registration_handler_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_source_t, dispatch_function_t)>>( - 'dispatch_source_set_registration_handler_f'); - late final _dispatch_source_set_registration_handler_f = - _dispatch_source_set_registration_handler_fPtr - .asFunction(); + CFStringRef get kCFUserNotificationAlertMessageKey => + _kCFUserNotificationAlertMessageKey.value; - dispatch_group_t dispatch_group_create() { - return _dispatch_group_create(); - } + late final ffi.Pointer + _kCFUserNotificationDefaultButtonTitleKey = + _lookup('kCFUserNotificationDefaultButtonTitleKey'); - late final _dispatch_group_createPtr = - _lookup>( - 'dispatch_group_create'); - late final _dispatch_group_create = - _dispatch_group_createPtr.asFunction(); + CFStringRef get kCFUserNotificationDefaultButtonTitleKey => + _kCFUserNotificationDefaultButtonTitleKey.value; - void dispatch_group_async( - dispatch_group_t group, - dispatch_queue_t queue, - Dartdispatch_block_t block, - ) { - return _dispatch_group_async( - group, - queue, - block._id, - ); - } + late final ffi.Pointer + _kCFUserNotificationAlternateButtonTitleKey = + _lookup('kCFUserNotificationAlternateButtonTitleKey'); - late final _dispatch_group_asyncPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_group_t, dispatch_queue_t, - dispatch_block_t)>>('dispatch_group_async'); - late final _dispatch_group_async = _dispatch_group_asyncPtr.asFunction< - void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); + CFStringRef get kCFUserNotificationAlternateButtonTitleKey => + _kCFUserNotificationAlternateButtonTitleKey.value; - void dispatch_group_async_f( - dispatch_group_t group, - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, - ) { - return _dispatch_group_async_f( - group, - queue, - context, - work, - ); - } + late final ffi.Pointer _kCFUserNotificationOtherButtonTitleKey = + _lookup('kCFUserNotificationOtherButtonTitleKey'); - late final _dispatch_group_async_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - dispatch_group_t, - dispatch_queue_t, - ffi.Pointer, - dispatch_function_t)>>('dispatch_group_async_f'); - late final _dispatch_group_async_f = _dispatch_group_async_fPtr.asFunction< - void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>(); + CFStringRef get kCFUserNotificationOtherButtonTitleKey => + _kCFUserNotificationOtherButtonTitleKey.value; - int dispatch_group_wait( - dispatch_group_t group, - int timeout, - ) { - return _dispatch_group_wait( - group, - timeout, - ); - } + late final ffi.Pointer + _kCFUserNotificationProgressIndicatorValueKey = + _lookup('kCFUserNotificationProgressIndicatorValueKey'); - late final _dispatch_group_waitPtr = _lookup< - ffi.NativeFunction< - ffi.IntPtr Function( - dispatch_group_t, dispatch_time_t)>>('dispatch_group_wait'); - late final _dispatch_group_wait = - _dispatch_group_waitPtr.asFunction(); + CFStringRef get kCFUserNotificationProgressIndicatorValueKey => + _kCFUserNotificationProgressIndicatorValueKey.value; - void dispatch_group_notify( - dispatch_group_t group, - dispatch_queue_t queue, - Dartdispatch_block_t block, - ) { - return _dispatch_group_notify( - group, - queue, - block._id, - ); + late final ffi.Pointer _kCFUserNotificationPopUpTitlesKey = + _lookup('kCFUserNotificationPopUpTitlesKey'); + + CFStringRef get kCFUserNotificationPopUpTitlesKey => + _kCFUserNotificationPopUpTitlesKey.value; + + late final ffi.Pointer _kCFUserNotificationTextFieldTitlesKey = + _lookup('kCFUserNotificationTextFieldTitlesKey'); + + CFStringRef get kCFUserNotificationTextFieldTitlesKey => + _kCFUserNotificationTextFieldTitlesKey.value; + + late final ffi.Pointer _kCFUserNotificationCheckBoxTitlesKey = + _lookup('kCFUserNotificationCheckBoxTitlesKey'); + + CFStringRef get kCFUserNotificationCheckBoxTitlesKey => + _kCFUserNotificationCheckBoxTitlesKey.value; + + late final ffi.Pointer _kCFUserNotificationTextFieldValuesKey = + _lookup('kCFUserNotificationTextFieldValuesKey'); + + CFStringRef get kCFUserNotificationTextFieldValuesKey => + _kCFUserNotificationTextFieldValuesKey.value; + + late final ffi.Pointer _kCFUserNotificationPopUpSelectionKey = + _lookup('kCFUserNotificationPopUpSelectionKey'); + + CFStringRef get kCFUserNotificationPopUpSelectionKey => + _kCFUserNotificationPopUpSelectionKey.value; + + late final ffi.Pointer _kCFUserNotificationAlertTopMostKey = + _lookup('kCFUserNotificationAlertTopMostKey'); + + CFStringRef get kCFUserNotificationAlertTopMostKey => + _kCFUserNotificationAlertTopMostKey.value; + + late final ffi.Pointer _kCFUserNotificationKeyboardTypesKey = + _lookup('kCFUserNotificationKeyboardTypesKey'); + + CFStringRef get kCFUserNotificationKeyboardTypesKey => + _kCFUserNotificationKeyboardTypesKey.value; + + int CFXMLNodeGetTypeID() { + return _CFXMLNodeGetTypeID(); } - late final _dispatch_group_notifyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_group_t, dispatch_queue_t, - dispatch_block_t)>>('dispatch_group_notify'); - late final _dispatch_group_notify = _dispatch_group_notifyPtr.asFunction< - void Function(dispatch_group_t, dispatch_queue_t, dispatch_block_t)>(); + late final _CFXMLNodeGetTypeIDPtr = + _lookup>('CFXMLNodeGetTypeID'); + late final _CFXMLNodeGetTypeID = + _CFXMLNodeGetTypeIDPtr.asFunction(); - void dispatch_group_notify_f( - dispatch_group_t group, - dispatch_queue_t queue, - ffi.Pointer context, - dispatch_function_t work, + CFXMLNodeRef CFXMLNodeCreate( + CFAllocatorRef alloc, + CFXMLNodeTypeCode xmlType, + CFStringRef dataString, + ffi.Pointer additionalInfoPtr, + DartCFIndex version, ) { - return _dispatch_group_notify_f( - group, - queue, - context, - work, + return _CFXMLNodeCreate( + alloc, + xmlType.value, + dataString, + additionalInfoPtr, + version, ); } - late final _dispatch_group_notify_fPtr = _lookup< + late final _CFXMLNodeCreatePtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_group_t, - dispatch_queue_t, - ffi.Pointer, - dispatch_function_t)>>('dispatch_group_notify_f'); - late final _dispatch_group_notify_f = _dispatch_group_notify_fPtr.asFunction< - void Function(dispatch_group_t, dispatch_queue_t, ffi.Pointer, - dispatch_function_t)>(); + CFXMLNodeRef Function(CFAllocatorRef, CFIndex, CFStringRef, + ffi.Pointer, CFIndex)>>('CFXMLNodeCreate'); + late final _CFXMLNodeCreate = _CFXMLNodeCreatePtr.asFunction< + CFXMLNodeRef Function( + CFAllocatorRef, int, CFStringRef, ffi.Pointer, int)>(); - void dispatch_group_enter( - dispatch_group_t group, + CFXMLNodeRef CFXMLNodeCreateCopy( + CFAllocatorRef alloc, + CFXMLNodeRef origNode, ) { - return _dispatch_group_enter( - group, + return _CFXMLNodeCreateCopy( + alloc, + origNode, ); } - late final _dispatch_group_enterPtr = - _lookup>( - 'dispatch_group_enter'); - late final _dispatch_group_enter = - _dispatch_group_enterPtr.asFunction(); + late final _CFXMLNodeCreateCopyPtr = _lookup< + ffi + .NativeFunction>( + 'CFXMLNodeCreateCopy'); + late final _CFXMLNodeCreateCopy = _CFXMLNodeCreateCopyPtr.asFunction< + CFXMLNodeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); - void dispatch_group_leave( - dispatch_group_t group, + CFXMLNodeTypeCode CFXMLNodeGetTypeCode( + CFXMLNodeRef node, ) { - return _dispatch_group_leave( - group, - ); + return CFXMLNodeTypeCode.fromValue(_CFXMLNodeGetTypeCode( + node, + )); } - late final _dispatch_group_leavePtr = - _lookup>( - 'dispatch_group_leave'); - late final _dispatch_group_leave = - _dispatch_group_leavePtr.asFunction(); + late final _CFXMLNodeGetTypeCodePtr = + _lookup>( + 'CFXMLNodeGetTypeCode'); + late final _CFXMLNodeGetTypeCode = + _CFXMLNodeGetTypeCodePtr.asFunction(); - dispatch_semaphore_t dispatch_semaphore_create( - int value, + CFStringRef CFXMLNodeGetString( + CFXMLNodeRef node, ) { - return _dispatch_semaphore_create( - value, + return _CFXMLNodeGetString( + node, ); } - late final _dispatch_semaphore_createPtr = - _lookup>( - 'dispatch_semaphore_create'); - late final _dispatch_semaphore_create = _dispatch_semaphore_createPtr - .asFunction(); + late final _CFXMLNodeGetStringPtr = + _lookup>( + 'CFXMLNodeGetString'); + late final _CFXMLNodeGetString = + _CFXMLNodeGetStringPtr.asFunction(); - int dispatch_semaphore_wait( - dispatch_semaphore_t dsema, - int timeout, + ffi.Pointer CFXMLNodeGetInfoPtr( + CFXMLNodeRef node, ) { - return _dispatch_semaphore_wait( - dsema, - timeout, + return _CFXMLNodeGetInfoPtr( + node, ); } - late final _dispatch_semaphore_waitPtr = _lookup< - ffi.NativeFunction< - ffi.IntPtr Function(dispatch_semaphore_t, - dispatch_time_t)>>('dispatch_semaphore_wait'); - late final _dispatch_semaphore_wait = _dispatch_semaphore_waitPtr - .asFunction(); + late final _CFXMLNodeGetInfoPtrPtr = + _lookup Function(CFXMLNodeRef)>>( + 'CFXMLNodeGetInfoPtr'); + late final _CFXMLNodeGetInfoPtr = _CFXMLNodeGetInfoPtrPtr.asFunction< + ffi.Pointer Function(CFXMLNodeRef)>(); - int dispatch_semaphore_signal( - dispatch_semaphore_t dsema, + int CFXMLNodeGetVersion( + CFXMLNodeRef node, ) { - return _dispatch_semaphore_signal( - dsema, + return _CFXMLNodeGetVersion( + node, ); } - late final _dispatch_semaphore_signalPtr = - _lookup>( - 'dispatch_semaphore_signal'); - late final _dispatch_semaphore_signal = _dispatch_semaphore_signalPtr - .asFunction(); + late final _CFXMLNodeGetVersionPtr = + _lookup>( + 'CFXMLNodeGetVersion'); + late final _CFXMLNodeGetVersion = + _CFXMLNodeGetVersionPtr.asFunction(); - void dispatch_once( - ffi.Pointer predicate, - Dartdispatch_block_t block, + CFXMLTreeRef CFXMLTreeCreateWithNode( + CFAllocatorRef allocator, + CFXMLNodeRef node, ) { - return _dispatch_once( - predicate, - block._id, + return _CFXMLTreeCreateWithNode( + allocator, + node, ); } - late final _dispatch_oncePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - dispatch_block_t)>>('dispatch_once'); - late final _dispatch_once = _dispatch_oncePtr.asFunction< - void Function(ffi.Pointer, dispatch_block_t)>(); + late final _CFXMLTreeCreateWithNodePtr = _lookup< + ffi + .NativeFunction>( + 'CFXMLTreeCreateWithNode'); + late final _CFXMLTreeCreateWithNode = _CFXMLTreeCreateWithNodePtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); - void dispatch_once_f( - ffi.Pointer predicate, - ffi.Pointer context, - dispatch_function_t function, + CFXMLNodeRef CFXMLTreeGetNode( + CFXMLTreeRef xmlTree, ) { - return _dispatch_once_f( - predicate, - context, - function, + return _CFXMLTreeGetNode( + xmlTree, ); } - late final _dispatch_once_fPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - dispatch_function_t)>>('dispatch_once_f'); - late final _dispatch_once_f = _dispatch_once_fPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - dispatch_function_t)>(); - - late final ffi.Pointer __dispatch_data_empty = - _lookup('_dispatch_data_empty'); - - ffi.Pointer get _dispatch_data_empty => - __dispatch_data_empty; - - late final ffi.Pointer __dispatch_data_destructor_free = - _lookup('_dispatch_data_destructor_free'); - - dispatch_block_t get _dispatch_data_destructor_free => - __dispatch_data_destructor_free.value; - - set _dispatch_data_destructor_free(dispatch_block_t value) => - __dispatch_data_destructor_free.value = value; - - late final ffi.Pointer __dispatch_data_destructor_munmap = - _lookup('_dispatch_data_destructor_munmap'); + late final _CFXMLTreeGetNodePtr = + _lookup>( + 'CFXMLTreeGetNode'); + late final _CFXMLTreeGetNode = + _CFXMLTreeGetNodePtr.asFunction(); - dispatch_block_t get _dispatch_data_destructor_munmap => - __dispatch_data_destructor_munmap.value; + int CFXMLParserGetTypeID() { + return _CFXMLParserGetTypeID(); + } - set _dispatch_data_destructor_munmap(dispatch_block_t value) => - __dispatch_data_destructor_munmap.value = value; + late final _CFXMLParserGetTypeIDPtr = + _lookup>('CFXMLParserGetTypeID'); + late final _CFXMLParserGetTypeID = + _CFXMLParserGetTypeIDPtr.asFunction(); - dispatch_data_t dispatch_data_create( - ffi.Pointer buffer, - int size, - dispatch_queue_t queue, - Dartdispatch_block_t destructor, + CFXMLParserRef CFXMLParserCreate( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer callBacks, + ffi.Pointer context, ) { - return _dispatch_data_create( - buffer, - size, - queue, - destructor._id, + return _CFXMLParserCreate( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, + callBacks, + context, ); } - late final _dispatch_data_createPtr = _lookup< + late final _CFXMLParserCreatePtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function(ffi.Pointer, ffi.Size, - dispatch_queue_t, dispatch_block_t)>>('dispatch_data_create'); - late final _dispatch_data_create = _dispatch_data_createPtr.asFunction< - dispatch_data_t Function( - ffi.Pointer, int, dispatch_queue_t, dispatch_block_t)>(); + CFXMLParserRef Function( + CFAllocatorRef, + CFDataRef, + CFURLRef, + CFOptionFlags, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>('CFXMLParserCreate'); + late final _CFXMLParserCreate = _CFXMLParserCreatePtr.asFunction< + CFXMLParserRef Function( + CFAllocatorRef, + CFDataRef, + CFURLRef, + int, + int, + ffi.Pointer, + ffi.Pointer)>(); - int dispatch_data_get_size( - dispatch_data_t data, + CFXMLParserRef CFXMLParserCreateWithDataFromURL( + CFAllocatorRef allocator, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer callBacks, + ffi.Pointer context, ) { - return _dispatch_data_get_size( - data, + return _CFXMLParserCreateWithDataFromURL( + allocator, + dataSource, + parseOptions, + versionOfNodes, + callBacks, + context, ); } - late final _dispatch_data_get_sizePtr = - _lookup>( - 'dispatch_data_get_size'); - late final _dispatch_data_get_size = - _dispatch_data_get_sizePtr.asFunction(); + late final _CFXMLParserCreateWithDataFromURLPtr = _lookup< + ffi.NativeFunction< + CFXMLParserRef Function( + CFAllocatorRef, + CFURLRef, + CFOptionFlags, + CFIndex, + ffi.Pointer, + ffi.Pointer)>>( + 'CFXMLParserCreateWithDataFromURL'); + late final _CFXMLParserCreateWithDataFromURL = + _CFXMLParserCreateWithDataFromURLPtr.asFunction< + CFXMLParserRef Function( + CFAllocatorRef, + CFURLRef, + int, + int, + ffi.Pointer, + ffi.Pointer)>(); - dispatch_data_t dispatch_data_create_map( - dispatch_data_t data, - ffi.Pointer> buffer_ptr, - ffi.Pointer size_ptr, + void CFXMLParserGetContext( + CFXMLParserRef parser, + ffi.Pointer context, ) { - return _dispatch_data_create_map( - data, - buffer_ptr, - size_ptr, + return _CFXMLParserGetContext( + parser, + context, ); } - late final _dispatch_data_create_mapPtr = _lookup< + late final _CFXMLParserGetContextPtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function( - dispatch_data_t, - ffi.Pointer>, - ffi.Pointer)>>('dispatch_data_create_map'); - late final _dispatch_data_create_map = - _dispatch_data_create_mapPtr.asFunction< - dispatch_data_t Function(dispatch_data_t, - ffi.Pointer>, ffi.Pointer)>(); + ffi.Void Function(CFXMLParserRef, + ffi.Pointer)>>('CFXMLParserGetContext'); + late final _CFXMLParserGetContext = _CFXMLParserGetContextPtr.asFunction< + void Function(CFXMLParserRef, ffi.Pointer)>(); - dispatch_data_t dispatch_data_create_concat( - dispatch_data_t data1, - dispatch_data_t data2, + void CFXMLParserGetCallBacks( + CFXMLParserRef parser, + ffi.Pointer callBacks, ) { - return _dispatch_data_create_concat( - data1, - data2, + return _CFXMLParserGetCallBacks( + parser, + callBacks, ); } - late final _dispatch_data_create_concatPtr = _lookup< + late final _CFXMLParserGetCallBacksPtr = _lookup< ffi.NativeFunction< - dispatch_data_t Function(dispatch_data_t, - dispatch_data_t)>>('dispatch_data_create_concat'); - late final _dispatch_data_create_concat = _dispatch_data_create_concatPtr - .asFunction(); + ffi.Void Function(CFXMLParserRef, + ffi.Pointer)>>('CFXMLParserGetCallBacks'); + late final _CFXMLParserGetCallBacks = _CFXMLParserGetCallBacksPtr.asFunction< + void Function(CFXMLParserRef, ffi.Pointer)>(); - dispatch_data_t dispatch_data_create_subrange( - dispatch_data_t data, - int offset, - int length, + CFURLRef CFXMLParserGetSourceURL( + CFXMLParserRef parser, ) { - return _dispatch_data_create_subrange( - data, - offset, - length, + return _CFXMLParserGetSourceURL( + parser, ); } - late final _dispatch_data_create_subrangePtr = _lookup< - ffi.NativeFunction< - dispatch_data_t Function(dispatch_data_t, ffi.Size, - ffi.Size)>>('dispatch_data_create_subrange'); - late final _dispatch_data_create_subrange = _dispatch_data_create_subrangePtr - .asFunction(); + late final _CFXMLParserGetSourceURLPtr = + _lookup>( + 'CFXMLParserGetSourceURL'); + late final _CFXMLParserGetSourceURL = _CFXMLParserGetSourceURLPtr.asFunction< + CFURLRef Function(CFXMLParserRef)>(); - bool dispatch_data_apply( - dispatch_data_t data, - Dartdispatch_data_applier_t applier, + int CFXMLParserGetLocation( + CFXMLParserRef parser, ) { - return _dispatch_data_apply( - data, - applier._id, + return _CFXMLParserGetLocation( + parser, ); } - late final _dispatch_data_applyPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(dispatch_data_t, - dispatch_data_applier_t)>>('dispatch_data_apply'); - late final _dispatch_data_apply = _dispatch_data_applyPtr - .asFunction(); + late final _CFXMLParserGetLocationPtr = + _lookup>( + 'CFXMLParserGetLocation'); + late final _CFXMLParserGetLocation = + _CFXMLParserGetLocationPtr.asFunction(); - dispatch_data_t dispatch_data_copy_region( - dispatch_data_t data, - int location, - ffi.Pointer offset_ptr, + int CFXMLParserGetLineNumber( + CFXMLParserRef parser, ) { - return _dispatch_data_copy_region( - data, - location, - offset_ptr, + return _CFXMLParserGetLineNumber( + parser, ); } - late final _dispatch_data_copy_regionPtr = _lookup< - ffi.NativeFunction< - dispatch_data_t Function(dispatch_data_t, ffi.Size, - ffi.Pointer)>>('dispatch_data_copy_region'); - late final _dispatch_data_copy_region = - _dispatch_data_copy_regionPtr.asFunction< - dispatch_data_t Function( - dispatch_data_t, int, ffi.Pointer)>(); + late final _CFXMLParserGetLineNumberPtr = + _lookup>( + 'CFXMLParserGetLineNumber'); + late final _CFXMLParserGetLineNumber = + _CFXMLParserGetLineNumberPtr.asFunction(); - void dispatch_read( - Dartdispatch_fd_t fd, - int length, - dispatch_queue_t queue, - ObjCBlock_ffiVoid_dispatchdatat_ffiInt handler, + ffi.Pointer CFXMLParserGetDocument( + CFXMLParserRef parser, ) { - return _dispatch_read( - fd, - length, - queue, - handler._id, + return _CFXMLParserGetDocument( + parser, ); } - late final _dispatch_readPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_fd_t, ffi.Size, dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_read'); - late final _dispatch_read = _dispatch_readPtr.asFunction< - void Function(int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + late final _CFXMLParserGetDocumentPtr = _lookup< + ffi.NativeFunction Function(CFXMLParserRef)>>( + 'CFXMLParserGetDocument'); + late final _CFXMLParserGetDocument = _CFXMLParserGetDocumentPtr.asFunction< + ffi.Pointer Function(CFXMLParserRef)>(); - void dispatch_write( - Dartdispatch_fd_t fd, - dispatch_data_t data, - dispatch_queue_t queue, - ObjCBlock_ffiVoid_dispatchdatat_ffiInt handler, + CFXMLParserStatusCode CFXMLParserGetStatusCode( + CFXMLParserRef parser, ) { - return _dispatch_write( - fd, - data, - queue, - handler._id, - ); + return CFXMLParserStatusCode.fromValue(_CFXMLParserGetStatusCode( + parser, + )); } - late final _dispatch_writePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_fd_t, dispatch_data_t, dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_write'); - late final _dispatch_write = _dispatch_writePtr.asFunction< - void Function( - int, dispatch_data_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + late final _CFXMLParserGetStatusCodePtr = + _lookup>( + 'CFXMLParserGetStatusCode'); + late final _CFXMLParserGetStatusCode = + _CFXMLParserGetStatusCodePtr.asFunction(); - dispatch_io_t dispatch_io_create( - Dartdispatch_io_type_t type, - Dartdispatch_fd_t fd, - dispatch_queue_t queue, - ObjCBlock_ffiVoid_ffiInt cleanup_handler, + CFStringRef CFXMLParserCopyErrorDescription( + CFXMLParserRef parser, ) { - return _dispatch_io_create( - type, - fd, - queue, - cleanup_handler._id, + return _CFXMLParserCopyErrorDescription( + parser, ); } - late final _dispatch_io_createPtr = _lookup< - ffi.NativeFunction< - dispatch_io_t Function( - dispatch_io_type_t, - dispatch_fd_t, - dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create'); - late final _dispatch_io_create = _dispatch_io_createPtr.asFunction< - dispatch_io_t Function( - int, int, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + late final _CFXMLParserCopyErrorDescriptionPtr = + _lookup>( + 'CFXMLParserCopyErrorDescription'); + late final _CFXMLParserCopyErrorDescription = + _CFXMLParserCopyErrorDescriptionPtr.asFunction< + CFStringRef Function(CFXMLParserRef)>(); - dispatch_io_t dispatch_io_create_with_path( - Dartdispatch_io_type_t type, - ffi.Pointer path, - int oflag, - Dart__uint16_t mode, - dispatch_queue_t queue, - ObjCBlock_ffiVoid_ffiInt cleanup_handler, + void CFXMLParserAbort( + CFXMLParserRef parser, + CFXMLParserStatusCode errorCode, + CFStringRef errorDescription, ) { - return _dispatch_io_create_with_path( - type, - path, - oflag, - mode, - queue, - cleanup_handler._id, + return _CFXMLParserAbort( + parser, + errorCode.value, + errorDescription, ); } - late final _dispatch_io_create_with_pathPtr = _lookup< + late final _CFXMLParserAbortPtr = _lookup< ffi.NativeFunction< - dispatch_io_t Function( - dispatch_io_type_t, - ffi.Pointer, - ffi.Int, - mode_t, - dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create_with_path'); - late final _dispatch_io_create_with_path = - _dispatch_io_create_with_pathPtr.asFunction< - dispatch_io_t Function(int, ffi.Pointer, int, int, - dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + ffi.Void Function( + CFXMLParserRef, CFIndex, CFStringRef)>>('CFXMLParserAbort'); + late final _CFXMLParserAbort = _CFXMLParserAbortPtr.asFunction< + void Function(CFXMLParserRef, int, CFStringRef)>(); - dispatch_io_t dispatch_io_create_with_io( - Dartdispatch_io_type_t type, - dispatch_io_t io, - dispatch_queue_t queue, - ObjCBlock_ffiVoid_ffiInt cleanup_handler, + int CFXMLParserParse( + CFXMLParserRef parser, ) { - return _dispatch_io_create_with_io( - type, - io, - queue, - cleanup_handler._id, + return _CFXMLParserParse( + parser, ); } - late final _dispatch_io_create_with_ioPtr = _lookup< - ffi.NativeFunction< - dispatch_io_t Function( - dispatch_io_type_t, - dispatch_io_t, - dispatch_queue_t, - ffi.Pointer<_ObjCBlock>)>>('dispatch_io_create_with_io'); - late final _dispatch_io_create_with_io = - _dispatch_io_create_with_ioPtr.asFunction< - dispatch_io_t Function( - int, dispatch_io_t, dispatch_queue_t, ffi.Pointer<_ObjCBlock>)>(); + late final _CFXMLParserParsePtr = + _lookup>( + 'CFXMLParserParse'); + late final _CFXMLParserParse = + _CFXMLParserParsePtr.asFunction(); - void dispatch_io_read( - dispatch_io_t channel, - Dart__int64_t offset, - int length, - dispatch_queue_t queue, - Dartdispatch_io_handler_t io_handler, + CFXMLTreeRef CFXMLTreeCreateFromData( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, ) { - return _dispatch_io_read( - channel, - offset, - length, - queue, - io_handler._id, + return _CFXMLTreeCreateFromData( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, ); } - late final _dispatch_io_readPtr = _lookup< + late final _CFXMLTreeCreateFromDataPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(dispatch_io_t, off_t, ffi.Size, dispatch_queue_t, - dispatch_io_handler_t)>>('dispatch_io_read'); - late final _dispatch_io_read = _dispatch_io_readPtr.asFunction< - void Function( - dispatch_io_t, int, int, dispatch_queue_t, dispatch_io_handler_t)>(); + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, + CFOptionFlags, CFIndex)>>('CFXMLTreeCreateFromData'); + late final _CFXMLTreeCreateFromData = _CFXMLTreeCreateFromDataPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int)>(); - void dispatch_io_write( - dispatch_io_t channel, - Dart__int64_t offset, - dispatch_data_t data, - dispatch_queue_t queue, - Dartdispatch_io_handler_t io_handler, + CFXMLTreeRef CFXMLTreeCreateFromDataWithError( + CFAllocatorRef allocator, + CFDataRef xmlData, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, + ffi.Pointer errorDict, ) { - return _dispatch_io_write( - channel, - offset, - data, - queue, - io_handler._id, + return _CFXMLTreeCreateFromDataWithError( + allocator, + xmlData, + dataSource, + parseOptions, + versionOfNodes, + errorDict, ); } - late final _dispatch_io_writePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_io_t, off_t, dispatch_data_t, - dispatch_queue_t, dispatch_io_handler_t)>>('dispatch_io_write'); - late final _dispatch_io_write = _dispatch_io_writePtr.asFunction< - void Function(dispatch_io_t, int, dispatch_data_t, dispatch_queue_t, - dispatch_io_handler_t)>(); + late final _CFXMLTreeCreateFromDataWithErrorPtr = _lookup< + ffi.NativeFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, + CFOptionFlags, CFIndex, ffi.Pointer)>>( + 'CFXMLTreeCreateFromDataWithError'); + late final _CFXMLTreeCreateFromDataWithError = + _CFXMLTreeCreateFromDataWithErrorPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int, + ffi.Pointer)>(); - void dispatch_io_close( - dispatch_io_t channel, - int flags, + CFXMLTreeRef CFXMLTreeCreateWithDataFromURL( + CFAllocatorRef allocator, + CFURLRef dataSource, + int parseOptions, + int versionOfNodes, ) { - return _dispatch_io_close( - channel, - flags, + return _CFXMLTreeCreateWithDataFromURL( + allocator, + dataSource, + parseOptions, + versionOfNodes, ); } - late final _dispatch_io_closePtr = _lookup< + late final _CFXMLTreeCreateWithDataFromURLPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - dispatch_io_t, dispatch_io_close_flags_t)>>('dispatch_io_close'); - late final _dispatch_io_close = - _dispatch_io_closePtr.asFunction(); + CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, CFOptionFlags, + CFIndex)>>('CFXMLTreeCreateWithDataFromURL'); + late final _CFXMLTreeCreateWithDataFromURL = + _CFXMLTreeCreateWithDataFromURLPtr.asFunction< + CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, int, int)>(); - void dispatch_io_barrier( - dispatch_io_t channel, - Dartdispatch_block_t barrier, + CFDataRef CFXMLTreeCreateXMLData( + CFAllocatorRef allocator, + CFXMLTreeRef xmlTree, ) { - return _dispatch_io_barrier( - channel, - barrier._id, + return _CFXMLTreeCreateXMLData( + allocator, + xmlTree, ); } - late final _dispatch_io_barrierPtr = _lookup< - ffi - .NativeFunction>( - 'dispatch_io_barrier'); - late final _dispatch_io_barrier = _dispatch_io_barrierPtr - .asFunction(); + late final _CFXMLTreeCreateXMLDataPtr = _lookup< + ffi.NativeFunction>( + 'CFXMLTreeCreateXMLData'); + late final _CFXMLTreeCreateXMLData = _CFXMLTreeCreateXMLDataPtr.asFunction< + CFDataRef Function(CFAllocatorRef, CFXMLTreeRef)>(); - int dispatch_io_get_descriptor( - dispatch_io_t channel, + CFStringRef CFXMLCreateStringByEscapingEntities( + CFAllocatorRef allocator, + CFStringRef string, + CFDictionaryRef entitiesDictionary, ) { - return _dispatch_io_get_descriptor( - channel, + return _CFXMLCreateStringByEscapingEntities( + allocator, + string, + entitiesDictionary, ); } - late final _dispatch_io_get_descriptorPtr = - _lookup>( - 'dispatch_io_get_descriptor'); - late final _dispatch_io_get_descriptor = - _dispatch_io_get_descriptorPtr.asFunction(); + late final _CFXMLCreateStringByEscapingEntitiesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFXMLCreateStringByEscapingEntities'); + late final _CFXMLCreateStringByEscapingEntities = + _CFXMLCreateStringByEscapingEntitiesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - void dispatch_io_set_high_water( - dispatch_io_t channel, - int high_water, + CFStringRef CFXMLCreateStringByUnescapingEntities( + CFAllocatorRef allocator, + CFStringRef string, + CFDictionaryRef entitiesDictionary, ) { - return _dispatch_io_set_high_water( - channel, - high_water, + return _CFXMLCreateStringByUnescapingEntities( + allocator, + string, + entitiesDictionary, ); } - late final _dispatch_io_set_high_waterPtr = - _lookup>( - 'dispatch_io_set_high_water'); - late final _dispatch_io_set_high_water = _dispatch_io_set_high_waterPtr - .asFunction(); + late final _CFXMLCreateStringByUnescapingEntitiesPtr = _lookup< + ffi.NativeFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, + CFDictionaryRef)>>('CFXMLCreateStringByUnescapingEntities'); + late final _CFXMLCreateStringByUnescapingEntities = + _CFXMLCreateStringByUnescapingEntitiesPtr.asFunction< + CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); - void dispatch_io_set_low_water( - dispatch_io_t channel, - int low_water, - ) { - return _dispatch_io_set_low_water( - channel, - low_water, - ); - } + late final ffi.Pointer _kCFXMLTreeErrorDescription = + _lookup('kCFXMLTreeErrorDescription'); - late final _dispatch_io_set_low_waterPtr = - _lookup>( - 'dispatch_io_set_low_water'); - late final _dispatch_io_set_low_water = _dispatch_io_set_low_waterPtr - .asFunction(); + CFStringRef get kCFXMLTreeErrorDescription => + _kCFXMLTreeErrorDescription.value; - void dispatch_io_set_interval( - dispatch_io_t channel, - int interval, - int flags, - ) { - return _dispatch_io_set_interval( - channel, - interval, - flags, - ); - } + late final ffi.Pointer _kCFXMLTreeErrorLineNumber = + _lookup('kCFXMLTreeErrorLineNumber'); - late final _dispatch_io_set_intervalPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_io_t, ffi.Uint64, - dispatch_io_interval_flags_t)>>('dispatch_io_set_interval'); - late final _dispatch_io_set_interval = _dispatch_io_set_intervalPtr - .asFunction(); + CFStringRef get kCFXMLTreeErrorLineNumber => _kCFXMLTreeErrorLineNumber.value; - dispatch_workloop_t dispatch_workloop_create( - ffi.Pointer label, - ) { - return _dispatch_workloop_create( - label, - ); - } + late final ffi.Pointer _kCFXMLTreeErrorLocation = + _lookup('kCFXMLTreeErrorLocation'); - late final _dispatch_workloop_createPtr = _lookup< - ffi - .NativeFunction)>>( - 'dispatch_workloop_create'); - late final _dispatch_workloop_create = _dispatch_workloop_createPtr - .asFunction)>(); + CFStringRef get kCFXMLTreeErrorLocation => _kCFXMLTreeErrorLocation.value; - dispatch_workloop_t dispatch_workloop_create_inactive( - ffi.Pointer label, - ) { - return _dispatch_workloop_create_inactive( - label, - ); - } + late final ffi.Pointer _kCFXMLTreeErrorStatusCode = + _lookup('kCFXMLTreeErrorStatusCode'); - late final _dispatch_workloop_create_inactivePtr = _lookup< - ffi - .NativeFunction)>>( - 'dispatch_workloop_create_inactive'); - late final _dispatch_workloop_create_inactive = - _dispatch_workloop_create_inactivePtr - .asFunction)>(); + CFStringRef get kCFXMLTreeErrorStatusCode => _kCFXMLTreeErrorStatusCode.value; - void dispatch_workloop_set_autorelease_frequency( - dispatch_workloop_t workloop, - int frequency, - ) { - return _dispatch_workloop_set_autorelease_frequency( - workloop, - frequency, - ); - } + late final ffi.Pointer _gGuidCssm = + _lookup('gGuidCssm'); - late final _dispatch_workloop_set_autorelease_frequencyPtr = _lookup< - ffi - .NativeFunction>( - 'dispatch_workloop_set_autorelease_frequency'); - late final _dispatch_workloop_set_autorelease_frequency = - _dispatch_workloop_set_autorelease_frequencyPtr - .asFunction(); + CSSM_GUID get gGuidCssm => _gGuidCssm.ref; - void dispatch_workloop_set_os_workgroup( - dispatch_workloop_t workloop, - os_workgroup_t workgroup, - ) { - return _dispatch_workloop_set_os_workgroup( - workloop, - workgroup, - ); - } + late final ffi.Pointer _gGuidAppleFileDL = + _lookup('gGuidAppleFileDL'); - late final _dispatch_workloop_set_os_workgroupPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(dispatch_workloop_t, - os_workgroup_t)>>('dispatch_workloop_set_os_workgroup'); - late final _dispatch_workloop_set_os_workgroup = - _dispatch_workloop_set_os_workgroupPtr - .asFunction(); + CSSM_GUID get gGuidAppleFileDL => _gGuidAppleFileDL.ref; - int CFReadStreamGetTypeID() { - return _CFReadStreamGetTypeID(); - } + late final ffi.Pointer _gGuidAppleCSP = + _lookup('gGuidAppleCSP'); - late final _CFReadStreamGetTypeIDPtr = - _lookup>('CFReadStreamGetTypeID'); - late final _CFReadStreamGetTypeID = - _CFReadStreamGetTypeIDPtr.asFunction(); + CSSM_GUID get gGuidAppleCSP => _gGuidAppleCSP.ref; - int CFWriteStreamGetTypeID() { - return _CFWriteStreamGetTypeID(); - } + late final ffi.Pointer _gGuidAppleCSPDL = + _lookup('gGuidAppleCSPDL'); - late final _CFWriteStreamGetTypeIDPtr = - _lookup>( - 'CFWriteStreamGetTypeID'); - late final _CFWriteStreamGetTypeID = - _CFWriteStreamGetTypeIDPtr.asFunction(); + CSSM_GUID get gGuidAppleCSPDL => _gGuidAppleCSPDL.ref; - late final ffi.Pointer _kCFStreamPropertyDataWritten = - _lookup('kCFStreamPropertyDataWritten'); + late final ffi.Pointer _gGuidAppleX509CL = + _lookup('gGuidAppleX509CL'); - CFStreamPropertyKey get kCFStreamPropertyDataWritten => - _kCFStreamPropertyDataWritten.value; + CSSM_GUID get gGuidAppleX509CL => _gGuidAppleX509CL.ref; - CFReadStreamRef CFReadStreamCreateWithBytesNoCopy( - CFAllocatorRef alloc, - ffi.Pointer bytes, - int length, - CFAllocatorRef bytesDeallocator, - ) { - return _CFReadStreamCreateWithBytesNoCopy( - alloc, - bytes, - length, - bytesDeallocator, - ); - } + late final ffi.Pointer _gGuidAppleX509TP = + _lookup('gGuidAppleX509TP'); - late final _CFReadStreamCreateWithBytesNoCopyPtr = _lookup< - ffi.NativeFunction< - CFReadStreamRef Function(CFAllocatorRef, ffi.Pointer, CFIndex, - CFAllocatorRef)>>('CFReadStreamCreateWithBytesNoCopy'); - late final _CFReadStreamCreateWithBytesNoCopy = - _CFReadStreamCreateWithBytesNoCopyPtr.asFunction< - CFReadStreamRef Function( - CFAllocatorRef, ffi.Pointer, int, CFAllocatorRef)>(); + CSSM_GUID get gGuidAppleX509TP => _gGuidAppleX509TP.ref; - CFWriteStreamRef CFWriteStreamCreateWithBuffer( - CFAllocatorRef alloc, - ffi.Pointer buffer, - int bufferCapacity, - ) { - return _CFWriteStreamCreateWithBuffer( - alloc, - buffer, - bufferCapacity, - ); - } + late final ffi.Pointer _gGuidAppleLDAPDL = + _lookup('gGuidAppleLDAPDL'); - late final _CFWriteStreamCreateWithBufferPtr = _lookup< - ffi.NativeFunction< - CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, - CFIndex)>>('CFWriteStreamCreateWithBuffer'); - late final _CFWriteStreamCreateWithBuffer = - _CFWriteStreamCreateWithBufferPtr.asFunction< - CFWriteStreamRef Function(CFAllocatorRef, ffi.Pointer, int)>(); + CSSM_GUID get gGuidAppleLDAPDL => _gGuidAppleLDAPDL.ref; - CFWriteStreamRef CFWriteStreamCreateWithAllocatedBuffers( - CFAllocatorRef alloc, - CFAllocatorRef bufferAllocator, - ) { - return _CFWriteStreamCreateWithAllocatedBuffers( - alloc, - bufferAllocator, - ); - } + late final ffi.Pointer _gGuidAppleDotMacTP = + _lookup('gGuidAppleDotMacTP'); - late final _CFWriteStreamCreateWithAllocatedBuffersPtr = _lookup< - ffi.NativeFunction< - CFWriteStreamRef Function(CFAllocatorRef, - CFAllocatorRef)>>('CFWriteStreamCreateWithAllocatedBuffers'); - late final _CFWriteStreamCreateWithAllocatedBuffers = - _CFWriteStreamCreateWithAllocatedBuffersPtr.asFunction< - CFWriteStreamRef Function(CFAllocatorRef, CFAllocatorRef)>(); + CSSM_GUID get gGuidAppleDotMacTP => _gGuidAppleDotMacTP.ref; - CFReadStreamRef CFReadStreamCreateWithFile( - CFAllocatorRef alloc, - CFURLRef fileURL, + late final ffi.Pointer _gGuidAppleSdCSPDL = + _lookup('gGuidAppleSdCSPDL'); + + CSSM_GUID get gGuidAppleSdCSPDL => _gGuidAppleSdCSPDL.ref; + + late final ffi.Pointer _gGuidAppleDotMacDL = + _lookup('gGuidAppleDotMacDL'); + + CSSM_GUID get gGuidAppleDotMacDL => _gGuidAppleDotMacDL.ref; + + void cssmPerror( + ffi.Pointer how, + int error, ) { - return _CFReadStreamCreateWithFile( - alloc, - fileURL, + return _cssmPerror( + how, + error, ); } - late final _CFReadStreamCreateWithFilePtr = _lookup< - ffi - .NativeFunction>( - 'CFReadStreamCreateWithFile'); - late final _CFReadStreamCreateWithFile = _CFReadStreamCreateWithFilePtr - .asFunction(); + late final _cssmPerrorPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, CSSM_RETURN)>>('cssmPerror'); + late final _cssmPerror = + _cssmPerrorPtr.asFunction, int)>(); - CFWriteStreamRef CFWriteStreamCreateWithFile( - CFAllocatorRef alloc, - CFURLRef fileURL, + bool cssmOidToAlg( + ffi.Pointer oid, + ffi.Pointer alg, ) { - return _CFWriteStreamCreateWithFile( - alloc, - fileURL, + return _cssmOidToAlg( + oid, + alg, ); } - late final _CFWriteStreamCreateWithFilePtr = _lookup< - ffi - .NativeFunction>( - 'CFWriteStreamCreateWithFile'); - late final _CFWriteStreamCreateWithFile = _CFWriteStreamCreateWithFilePtr - .asFunction(); + late final _cssmOidToAlgPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>('cssmOidToAlg'); + late final _cssmOidToAlg = _cssmOidToAlgPtr.asFunction< + bool Function(ffi.Pointer, ffi.Pointer)>(); - void CFStreamCreateBoundPair( - CFAllocatorRef alloc, - ffi.Pointer readStream, - ffi.Pointer writeStream, - int transferBufferSize, + ffi.Pointer cssmAlgToOid( + int algId, ) { - return _CFStreamCreateBoundPair( - alloc, - readStream, - writeStream, - transferBufferSize, + return _cssmAlgToOid( + algId, ); } - late final _CFStreamCreateBoundPairPtr = _lookup< + late final _cssmAlgToOidPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, - ffi.Pointer, - ffi.Pointer, - CFIndex)>>('CFStreamCreateBoundPair'); - late final _CFStreamCreateBoundPair = _CFStreamCreateBoundPairPtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer, - ffi.Pointer, int)>(); - - late final ffi.Pointer _kCFStreamPropertyAppendToFile = - _lookup('kCFStreamPropertyAppendToFile'); + ffi.Pointer Function(CSSM_ALGORITHMS)>>('cssmAlgToOid'); + late final _cssmAlgToOid = + _cssmAlgToOidPtr.asFunction Function(int)>(); - CFStreamPropertyKey get kCFStreamPropertyAppendToFile => - _kCFStreamPropertyAppendToFile.value; + late final ffi.Pointer _kSecPropertyTypeTitle = + _lookup('kSecPropertyTypeTitle'); - late final ffi.Pointer - _kCFStreamPropertyFileCurrentOffset = - _lookup('kCFStreamPropertyFileCurrentOffset'); + CFStringRef get kSecPropertyTypeTitle => _kSecPropertyTypeTitle.value; - CFStreamPropertyKey get kCFStreamPropertyFileCurrentOffset => - _kCFStreamPropertyFileCurrentOffset.value; + set kSecPropertyTypeTitle(CFStringRef value) => + _kSecPropertyTypeTitle.value = value; - late final ffi.Pointer - _kCFStreamPropertySocketNativeHandle = - _lookup('kCFStreamPropertySocketNativeHandle'); + late final ffi.Pointer _kSecPropertyTypeError = + _lookup('kSecPropertyTypeError'); - CFStreamPropertyKey get kCFStreamPropertySocketNativeHandle => - _kCFStreamPropertySocketNativeHandle.value; + CFStringRef get kSecPropertyTypeError => _kSecPropertyTypeError.value; - late final ffi.Pointer - _kCFStreamPropertySocketRemoteHostName = - _lookup('kCFStreamPropertySocketRemoteHostName'); + set kSecPropertyTypeError(CFStringRef value) => + _kSecPropertyTypeError.value = value; - CFStreamPropertyKey get kCFStreamPropertySocketRemoteHostName => - _kCFStreamPropertySocketRemoteHostName.value; + late final ffi.Pointer _kSecTrustEvaluationDate = + _lookup('kSecTrustEvaluationDate'); - late final ffi.Pointer - _kCFStreamPropertySocketRemotePortNumber = - _lookup('kCFStreamPropertySocketRemotePortNumber'); + CFStringRef get kSecTrustEvaluationDate => _kSecTrustEvaluationDate.value; - CFStreamPropertyKey get kCFStreamPropertySocketRemotePortNumber => - _kCFStreamPropertySocketRemotePortNumber.value; + set kSecTrustEvaluationDate(CFStringRef value) => + _kSecTrustEvaluationDate.value = value; - late final ffi.Pointer _kCFStreamErrorDomainSOCKS = - _lookup('kCFStreamErrorDomainSOCKS'); + late final ffi.Pointer _kSecTrustExtendedValidation = + _lookup('kSecTrustExtendedValidation'); - int get kCFStreamErrorDomainSOCKS => _kCFStreamErrorDomainSOCKS.value; + CFStringRef get kSecTrustExtendedValidation => + _kSecTrustExtendedValidation.value; - late final ffi.Pointer _kCFStreamPropertySOCKSProxy = - _lookup('kCFStreamPropertySOCKSProxy'); + set kSecTrustExtendedValidation(CFStringRef value) => + _kSecTrustExtendedValidation.value = value; - CFStringRef get kCFStreamPropertySOCKSProxy => - _kCFStreamPropertySOCKSProxy.value; + late final ffi.Pointer _kSecTrustOrganizationName = + _lookup('kSecTrustOrganizationName'); - set kCFStreamPropertySOCKSProxy(CFStringRef value) => - _kCFStreamPropertySOCKSProxy.value = value; + CFStringRef get kSecTrustOrganizationName => _kSecTrustOrganizationName.value; - late final ffi.Pointer _kCFStreamPropertySOCKSProxyHost = - _lookup('kCFStreamPropertySOCKSProxyHost'); + set kSecTrustOrganizationName(CFStringRef value) => + _kSecTrustOrganizationName.value = value; - CFStringRef get kCFStreamPropertySOCKSProxyHost => - _kCFStreamPropertySOCKSProxyHost.value; + late final ffi.Pointer _kSecTrustResultValue = + _lookup('kSecTrustResultValue'); - set kCFStreamPropertySOCKSProxyHost(CFStringRef value) => - _kCFStreamPropertySOCKSProxyHost.value = value; + CFStringRef get kSecTrustResultValue => _kSecTrustResultValue.value; - late final ffi.Pointer _kCFStreamPropertySOCKSProxyPort = - _lookup('kCFStreamPropertySOCKSProxyPort'); + set kSecTrustResultValue(CFStringRef value) => + _kSecTrustResultValue.value = value; - CFStringRef get kCFStreamPropertySOCKSProxyPort => - _kCFStreamPropertySOCKSProxyPort.value; + late final ffi.Pointer _kSecTrustRevocationChecked = + _lookup('kSecTrustRevocationChecked'); - set kCFStreamPropertySOCKSProxyPort(CFStringRef value) => - _kCFStreamPropertySOCKSProxyPort.value = value; + CFStringRef get kSecTrustRevocationChecked => + _kSecTrustRevocationChecked.value; - late final ffi.Pointer _kCFStreamPropertySOCKSVersion = - _lookup('kCFStreamPropertySOCKSVersion'); + set kSecTrustRevocationChecked(CFStringRef value) => + _kSecTrustRevocationChecked.value = value; - CFStringRef get kCFStreamPropertySOCKSVersion => - _kCFStreamPropertySOCKSVersion.value; + late final ffi.Pointer _kSecTrustRevocationValidUntilDate = + _lookup('kSecTrustRevocationValidUntilDate'); - set kCFStreamPropertySOCKSVersion(CFStringRef value) => - _kCFStreamPropertySOCKSVersion.value = value; + CFStringRef get kSecTrustRevocationValidUntilDate => + _kSecTrustRevocationValidUntilDate.value; - late final ffi.Pointer _kCFStreamSocketSOCKSVersion4 = - _lookup('kCFStreamSocketSOCKSVersion4'); + set kSecTrustRevocationValidUntilDate(CFStringRef value) => + _kSecTrustRevocationValidUntilDate.value = value; - CFStringRef get kCFStreamSocketSOCKSVersion4 => - _kCFStreamSocketSOCKSVersion4.value; + late final ffi.Pointer _kSecTrustCertificateTransparency = + _lookup('kSecTrustCertificateTransparency'); - set kCFStreamSocketSOCKSVersion4(CFStringRef value) => - _kCFStreamSocketSOCKSVersion4.value = value; + CFStringRef get kSecTrustCertificateTransparency => + _kSecTrustCertificateTransparency.value; - late final ffi.Pointer _kCFStreamSocketSOCKSVersion5 = - _lookup('kCFStreamSocketSOCKSVersion5'); + set kSecTrustCertificateTransparency(CFStringRef value) => + _kSecTrustCertificateTransparency.value = value; - CFStringRef get kCFStreamSocketSOCKSVersion5 => - _kCFStreamSocketSOCKSVersion5.value; + late final ffi.Pointer + _kSecTrustCertificateTransparencyWhiteList = + _lookup('kSecTrustCertificateTransparencyWhiteList'); - set kCFStreamSocketSOCKSVersion5(CFStringRef value) => - _kCFStreamSocketSOCKSVersion5.value = value; + CFStringRef get kSecTrustCertificateTransparencyWhiteList => + _kSecTrustCertificateTransparencyWhiteList.value; - late final ffi.Pointer _kCFStreamPropertySOCKSUser = - _lookup('kCFStreamPropertySOCKSUser'); + set kSecTrustCertificateTransparencyWhiteList(CFStringRef value) => + _kSecTrustCertificateTransparencyWhiteList.value = value; - CFStringRef get kCFStreamPropertySOCKSUser => - _kCFStreamPropertySOCKSUser.value; + int SecTrustGetTypeID() { + return _SecTrustGetTypeID(); + } - set kCFStreamPropertySOCKSUser(CFStringRef value) => - _kCFStreamPropertySOCKSUser.value = value; + late final _SecTrustGetTypeIDPtr = + _lookup>('SecTrustGetTypeID'); + late final _SecTrustGetTypeID = + _SecTrustGetTypeIDPtr.asFunction(); - late final ffi.Pointer _kCFStreamPropertySOCKSPassword = - _lookup('kCFStreamPropertySOCKSPassword'); + int SecTrustCreateWithCertificates( + CFTypeRef certificates, + CFTypeRef policies, + ffi.Pointer trust, + ) { + return _SecTrustCreateWithCertificates( + certificates, + policies, + trust, + ); + } - CFStringRef get kCFStreamPropertySOCKSPassword => - _kCFStreamPropertySOCKSPassword.value; + late final _SecTrustCreateWithCertificatesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(CFTypeRef, CFTypeRef, + ffi.Pointer)>>('SecTrustCreateWithCertificates'); + late final _SecTrustCreateWithCertificates = + _SecTrustCreateWithCertificatesPtr.asFunction< + int Function(CFTypeRef, CFTypeRef, ffi.Pointer)>(); - set kCFStreamPropertySOCKSPassword(CFStringRef value) => - _kCFStreamPropertySOCKSPassword.value = value; + int SecTrustSetPolicies( + SecTrustRef trust, + CFTypeRef policies, + ) { + return _SecTrustSetPolicies( + trust, + policies, + ); + } - late final ffi.Pointer _kCFStreamErrorDomainSSL = - _lookup('kCFStreamErrorDomainSSL'); + late final _SecTrustSetPoliciesPtr = + _lookup>( + 'SecTrustSetPolicies'); + late final _SecTrustSetPolicies = _SecTrustSetPoliciesPtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); - int get kCFStreamErrorDomainSSL => _kCFStreamErrorDomainSSL.value; + int SecTrustCopyPolicies( + SecTrustRef trust, + ffi.Pointer policies, + ) { + return _SecTrustCopyPolicies( + trust, + policies, + ); + } - late final ffi.Pointer _kCFStreamPropertySocketSecurityLevel = - _lookup('kCFStreamPropertySocketSecurityLevel'); + late final _SecTrustCopyPoliciesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustCopyPolicies'); + late final _SecTrustCopyPolicies = _SecTrustCopyPoliciesPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - CFStringRef get kCFStreamPropertySocketSecurityLevel => - _kCFStreamPropertySocketSecurityLevel.value; + int SecTrustSetNetworkFetchAllowed( + SecTrustRef trust, + int allowFetch, + ) { + return _SecTrustSetNetworkFetchAllowed( + trust, + allowFetch, + ); + } - set kCFStreamPropertySocketSecurityLevel(CFStringRef value) => - _kCFStreamPropertySocketSecurityLevel.value = value; + late final _SecTrustSetNetworkFetchAllowedPtr = + _lookup>( + 'SecTrustSetNetworkFetchAllowed'); + late final _SecTrustSetNetworkFetchAllowed = + _SecTrustSetNetworkFetchAllowedPtr.asFunction< + int Function(SecTrustRef, int)>(); - late final ffi.Pointer _kCFStreamSocketSecurityLevelNone = - _lookup('kCFStreamSocketSecurityLevelNone'); + int SecTrustGetNetworkFetchAllowed( + SecTrustRef trust, + ffi.Pointer allowFetch, + ) { + return _SecTrustGetNetworkFetchAllowed( + trust, + allowFetch, + ); + } - CFStringRef get kCFStreamSocketSecurityLevelNone => - _kCFStreamSocketSecurityLevelNone.value; + late final _SecTrustGetNetworkFetchAllowedPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetNetworkFetchAllowed'); + late final _SecTrustGetNetworkFetchAllowed = + _SecTrustGetNetworkFetchAllowedPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - set kCFStreamSocketSecurityLevelNone(CFStringRef value) => - _kCFStreamSocketSecurityLevelNone.value = value; + int SecTrustSetAnchorCertificates( + SecTrustRef trust, + CFArrayRef anchorCertificates, + ) { + return _SecTrustSetAnchorCertificates( + trust, + anchorCertificates, + ); + } - late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv2 = - _lookup('kCFStreamSocketSecurityLevelSSLv2'); + late final _SecTrustSetAnchorCertificatesPtr = + _lookup>( + 'SecTrustSetAnchorCertificates'); + late final _SecTrustSetAnchorCertificates = _SecTrustSetAnchorCertificatesPtr + .asFunction(); - CFStringRef get kCFStreamSocketSecurityLevelSSLv2 => - _kCFStreamSocketSecurityLevelSSLv2.value; + int SecTrustSetAnchorCertificatesOnly( + SecTrustRef trust, + int anchorCertificatesOnly, + ) { + return _SecTrustSetAnchorCertificatesOnly( + trust, + anchorCertificatesOnly, + ); + } - set kCFStreamSocketSecurityLevelSSLv2(CFStringRef value) => - _kCFStreamSocketSecurityLevelSSLv2.value = value; + late final _SecTrustSetAnchorCertificatesOnlyPtr = + _lookup>( + 'SecTrustSetAnchorCertificatesOnly'); + late final _SecTrustSetAnchorCertificatesOnly = + _SecTrustSetAnchorCertificatesOnlyPtr.asFunction< + int Function(SecTrustRef, int)>(); - late final ffi.Pointer _kCFStreamSocketSecurityLevelSSLv3 = - _lookup('kCFStreamSocketSecurityLevelSSLv3'); + int SecTrustCopyCustomAnchorCertificates( + SecTrustRef trust, + ffi.Pointer anchors, + ) { + return _SecTrustCopyCustomAnchorCertificates( + trust, + anchors, + ); + } - CFStringRef get kCFStreamSocketSecurityLevelSSLv3 => - _kCFStreamSocketSecurityLevelSSLv3.value; - - set kCFStreamSocketSecurityLevelSSLv3(CFStringRef value) => - _kCFStreamSocketSecurityLevelSSLv3.value = value; - - late final ffi.Pointer _kCFStreamSocketSecurityLevelTLSv1 = - _lookup('kCFStreamSocketSecurityLevelTLSv1'); - - CFStringRef get kCFStreamSocketSecurityLevelTLSv1 => - _kCFStreamSocketSecurityLevelTLSv1.value; - - set kCFStreamSocketSecurityLevelTLSv1(CFStringRef value) => - _kCFStreamSocketSecurityLevelTLSv1.value = value; - - late final ffi.Pointer - _kCFStreamSocketSecurityLevelNegotiatedSSL = - _lookup('kCFStreamSocketSecurityLevelNegotiatedSSL'); - - CFStringRef get kCFStreamSocketSecurityLevelNegotiatedSSL => - _kCFStreamSocketSecurityLevelNegotiatedSSL.value; - - set kCFStreamSocketSecurityLevelNegotiatedSSL(CFStringRef value) => - _kCFStreamSocketSecurityLevelNegotiatedSSL.value = value; - - late final ffi.Pointer - _kCFStreamPropertyShouldCloseNativeSocket = - _lookup('kCFStreamPropertyShouldCloseNativeSocket'); - - CFStringRef get kCFStreamPropertyShouldCloseNativeSocket => - _kCFStreamPropertyShouldCloseNativeSocket.value; - - set kCFStreamPropertyShouldCloseNativeSocket(CFStringRef value) => - _kCFStreamPropertyShouldCloseNativeSocket.value = value; + late final _SecTrustCopyCustomAnchorCertificatesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, ffi.Pointer)>>( + 'SecTrustCopyCustomAnchorCertificates'); + late final _SecTrustCopyCustomAnchorCertificates = + _SecTrustCopyCustomAnchorCertificatesPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - void CFStreamCreatePairWithSocket( - CFAllocatorRef alloc, - int sock, - ffi.Pointer readStream, - ffi.Pointer writeStream, + int SecTrustSetVerifyDate( + SecTrustRef trust, + CFDateRef verifyDate, ) { - return _CFStreamCreatePairWithSocket( - alloc, - sock, - readStream, - writeStream, + return _SecTrustSetVerifyDate( + trust, + verifyDate, ); } - late final _CFStreamCreatePairWithSocketPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, - CFSocketNativeHandle, - ffi.Pointer, - ffi.Pointer)>>('CFStreamCreatePairWithSocket'); - late final _CFStreamCreatePairWithSocket = - _CFStreamCreatePairWithSocketPtr.asFunction< - void Function(CFAllocatorRef, int, ffi.Pointer, - ffi.Pointer)>(); + late final _SecTrustSetVerifyDatePtr = + _lookup>( + 'SecTrustSetVerifyDate'); + late final _SecTrustSetVerifyDate = _SecTrustSetVerifyDatePtr.asFunction< + int Function(SecTrustRef, CFDateRef)>(); - void CFStreamCreatePairWithSocketToHost( - CFAllocatorRef alloc, - CFStringRef host, - int port, - ffi.Pointer readStream, - ffi.Pointer writeStream, + double SecTrustGetVerifyTime( + SecTrustRef trust, ) { - return _CFStreamCreatePairWithSocketToHost( - alloc, - host, - port, - readStream, - writeStream, + return _SecTrustGetVerifyTime( + trust, ); } - late final _CFStreamCreatePairWithSocketToHostPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, - CFStringRef, - UInt32, - ffi.Pointer, - ffi.Pointer)>>( - 'CFStreamCreatePairWithSocketToHost'); - late final _CFStreamCreatePairWithSocketToHost = - _CFStreamCreatePairWithSocketToHostPtr.asFunction< - void Function(CFAllocatorRef, CFStringRef, int, - ffi.Pointer, ffi.Pointer)>(); + late final _SecTrustGetVerifyTimePtr = + _lookup>( + 'SecTrustGetVerifyTime'); + late final _SecTrustGetVerifyTime = + _SecTrustGetVerifyTimePtr.asFunction(); - void CFStreamCreatePairWithPeerSocketSignature( - CFAllocatorRef alloc, - ffi.Pointer signature, - ffi.Pointer readStream, - ffi.Pointer writeStream, + int SecTrustEvaluate( + SecTrustRef trust, + ffi.Pointer result, ) { - return _CFStreamCreatePairWithPeerSocketSignature( - alloc, - signature, - readStream, - writeStream, + return _SecTrustEvaluate( + trust, + result, ); } - late final _CFStreamCreatePairWithPeerSocketSignaturePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>( - 'CFStreamCreatePairWithPeerSocketSignature'); - late final _CFStreamCreatePairWithPeerSocketSignature = - _CFStreamCreatePairWithPeerSocketSignaturePtr.asFunction< - void Function(CFAllocatorRef, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + late final _SecTrustEvaluatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustEvaluate'); + late final _SecTrustEvaluate = _SecTrustEvaluatePtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - int CFReadStreamGetStatus( - CFReadStreamRef stream, + DartSInt32 SecTrustEvaluateAsync( + SecTrustRef trust, + Dartdispatch_queue_t queue, + DartSecTrustCallback result, ) { - return _CFReadStreamGetStatus( - stream, + return _SecTrustEvaluateAsync( + trust, + queue.ref.pointer, + result.ref.pointer, ); } - late final _CFReadStreamGetStatusPtr = - _lookup>( - 'CFReadStreamGetStatus'); - late final _CFReadStreamGetStatus = - _CFReadStreamGetStatusPtr.asFunction(); + late final _SecTrustEvaluateAsyncPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, dispatch_queue_t, + SecTrustCallback)>>('SecTrustEvaluateAsync'); + late final _SecTrustEvaluateAsync = _SecTrustEvaluateAsyncPtr.asFunction< + int Function(SecTrustRef, dispatch_queue_t, SecTrustCallback)>(); - int CFWriteStreamGetStatus( - CFWriteStreamRef stream, + bool SecTrustEvaluateWithError( + SecTrustRef trust, + ffi.Pointer error, ) { - return _CFWriteStreamGetStatus( - stream, + return _SecTrustEvaluateWithError( + trust, + error, ); } - late final _CFWriteStreamGetStatusPtr = - _lookup>( - 'CFWriteStreamGetStatus'); - late final _CFWriteStreamGetStatus = - _CFWriteStreamGetStatusPtr.asFunction(); + late final _SecTrustEvaluateWithErrorPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(SecTrustRef, + ffi.Pointer)>>('SecTrustEvaluateWithError'); + late final _SecTrustEvaluateWithError = _SecTrustEvaluateWithErrorPtr + .asFunction)>(); - CFErrorRef CFReadStreamCopyError( - CFReadStreamRef stream, + DartSInt32 SecTrustEvaluateAsyncWithError( + SecTrustRef trust, + Dartdispatch_queue_t queue, + DartSecTrustWithErrorCallback result, ) { - return _CFReadStreamCopyError( - stream, + return _SecTrustEvaluateAsyncWithError( + trust, + queue.ref.pointer, + result.ref.pointer, ); } - late final _CFReadStreamCopyErrorPtr = - _lookup>( - 'CFReadStreamCopyError'); - late final _CFReadStreamCopyError = _CFReadStreamCopyErrorPtr.asFunction< - CFErrorRef Function(CFReadStreamRef)>(); + late final _SecTrustEvaluateAsyncWithErrorPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, dispatch_queue_t, + SecTrustWithErrorCallback)>>('SecTrustEvaluateAsyncWithError'); + late final _SecTrustEvaluateAsyncWithError = + _SecTrustEvaluateAsyncWithErrorPtr.asFunction< + int Function( + SecTrustRef, dispatch_queue_t, SecTrustWithErrorCallback)>(); - CFErrorRef CFWriteStreamCopyError( - CFWriteStreamRef stream, + int SecTrustGetTrustResult( + SecTrustRef trust, + ffi.Pointer result, ) { - return _CFWriteStreamCopyError( - stream, + return _SecTrustGetTrustResult( + trust, + result, ); } - late final _CFWriteStreamCopyErrorPtr = - _lookup>( - 'CFWriteStreamCopyError'); - late final _CFWriteStreamCopyError = _CFWriteStreamCopyErrorPtr.asFunction< - CFErrorRef Function(CFWriteStreamRef)>(); + late final _SecTrustGetTrustResultPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, ffi.Pointer)>>('SecTrustGetTrustResult'); + late final _SecTrustGetTrustResult = _SecTrustGetTrustResultPtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - int CFReadStreamOpen( - CFReadStreamRef stream, + SecKeyRef SecTrustCopyPublicKey( + SecTrustRef trust, ) { - return _CFReadStreamOpen( - stream, + return _SecTrustCopyPublicKey( + trust, ); } - late final _CFReadStreamOpenPtr = - _lookup>( - 'CFReadStreamOpen'); - late final _CFReadStreamOpen = - _CFReadStreamOpenPtr.asFunction(); + late final _SecTrustCopyPublicKeyPtr = + _lookup>( + 'SecTrustCopyPublicKey'); + late final _SecTrustCopyPublicKey = + _SecTrustCopyPublicKeyPtr.asFunction(); - int CFWriteStreamOpen( - CFWriteStreamRef stream, + SecKeyRef SecTrustCopyKey( + SecTrustRef trust, ) { - return _CFWriteStreamOpen( - stream, + return _SecTrustCopyKey( + trust, ); } - late final _CFWriteStreamOpenPtr = - _lookup>( - 'CFWriteStreamOpen'); - late final _CFWriteStreamOpen = - _CFWriteStreamOpenPtr.asFunction(); + late final _SecTrustCopyKeyPtr = + _lookup>( + 'SecTrustCopyKey'); + late final _SecTrustCopyKey = + _SecTrustCopyKeyPtr.asFunction(); - void CFReadStreamClose( - CFReadStreamRef stream, + int SecTrustGetCertificateCount( + SecTrustRef trust, ) { - return _CFReadStreamClose( - stream, + return _SecTrustGetCertificateCount( + trust, ); } - late final _CFReadStreamClosePtr = - _lookup>( - 'CFReadStreamClose'); - late final _CFReadStreamClose = - _CFReadStreamClosePtr.asFunction(); + late final _SecTrustGetCertificateCountPtr = + _lookup>( + 'SecTrustGetCertificateCount'); + late final _SecTrustGetCertificateCount = + _SecTrustGetCertificateCountPtr.asFunction(); - void CFWriteStreamClose( - CFWriteStreamRef stream, + SecCertificateRef SecTrustGetCertificateAtIndex( + SecTrustRef trust, + int ix, ) { - return _CFWriteStreamClose( - stream, + return _SecTrustGetCertificateAtIndex( + trust, + ix, ); } - late final _CFWriteStreamClosePtr = - _lookup>( - 'CFWriteStreamClose'); - late final _CFWriteStreamClose = - _CFWriteStreamClosePtr.asFunction(); + late final _SecTrustGetCertificateAtIndexPtr = _lookup< + ffi.NativeFunction>( + 'SecTrustGetCertificateAtIndex'); + late final _SecTrustGetCertificateAtIndex = _SecTrustGetCertificateAtIndexPtr + .asFunction(); - int CFReadStreamHasBytesAvailable( - CFReadStreamRef stream, + CFDataRef SecTrustCopyExceptions( + SecTrustRef trust, ) { - return _CFReadStreamHasBytesAvailable( - stream, + return _SecTrustCopyExceptions( + trust, ); } - late final _CFReadStreamHasBytesAvailablePtr = - _lookup>( - 'CFReadStreamHasBytesAvailable'); - late final _CFReadStreamHasBytesAvailable = _CFReadStreamHasBytesAvailablePtr - .asFunction(); + late final _SecTrustCopyExceptionsPtr = + _lookup>( + 'SecTrustCopyExceptions'); + late final _SecTrustCopyExceptions = + _SecTrustCopyExceptionsPtr.asFunction(); - int CFReadStreamRead( - CFReadStreamRef stream, - ffi.Pointer buffer, - int bufferLength, + bool SecTrustSetExceptions( + SecTrustRef trust, + CFDataRef exceptions, ) { - return _CFReadStreamRead( - stream, - buffer, - bufferLength, + return _SecTrustSetExceptions( + trust, + exceptions, ); } - late final _CFReadStreamReadPtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFReadStreamRef, ffi.Pointer, - CFIndex)>>('CFReadStreamRead'); - late final _CFReadStreamRead = _CFReadStreamReadPtr.asFunction< - int Function(CFReadStreamRef, ffi.Pointer, int)>(); + late final _SecTrustSetExceptionsPtr = + _lookup>( + 'SecTrustSetExceptions'); + late final _SecTrustSetExceptions = _SecTrustSetExceptionsPtr.asFunction< + bool Function(SecTrustRef, CFDataRef)>(); - ffi.Pointer CFReadStreamGetBuffer( - CFReadStreamRef stream, - int maxBytesToRead, - ffi.Pointer numBytesRead, + CFArrayRef SecTrustCopyProperties( + SecTrustRef trust, ) { - return _CFReadStreamGetBuffer( - stream, - maxBytesToRead, - numBytesRead, + return _SecTrustCopyProperties( + trust, ); } - late final _CFReadStreamGetBufferPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(CFReadStreamRef, CFIndex, - ffi.Pointer)>>('CFReadStreamGetBuffer'); - late final _CFReadStreamGetBuffer = _CFReadStreamGetBufferPtr.asFunction< - ffi.Pointer Function( - CFReadStreamRef, int, ffi.Pointer)>(); + late final _SecTrustCopyPropertiesPtr = + _lookup>( + 'SecTrustCopyProperties'); + late final _SecTrustCopyProperties = + _SecTrustCopyPropertiesPtr.asFunction(); - int CFWriteStreamCanAcceptBytes( - CFWriteStreamRef stream, + CFDictionaryRef SecTrustCopyResult( + SecTrustRef trust, ) { - return _CFWriteStreamCanAcceptBytes( - stream, + return _SecTrustCopyResult( + trust, ); } - late final _CFWriteStreamCanAcceptBytesPtr = - _lookup>( - 'CFWriteStreamCanAcceptBytes'); - late final _CFWriteStreamCanAcceptBytes = _CFWriteStreamCanAcceptBytesPtr - .asFunction(); + late final _SecTrustCopyResultPtr = + _lookup>( + 'SecTrustCopyResult'); + late final _SecTrustCopyResult = _SecTrustCopyResultPtr.asFunction< + CFDictionaryRef Function(SecTrustRef)>(); - int CFWriteStreamWrite( - CFWriteStreamRef stream, - ffi.Pointer buffer, - int bufferLength, + int SecTrustSetOCSPResponse( + SecTrustRef trust, + CFTypeRef responseData, ) { - return _CFWriteStreamWrite( - stream, - buffer, - bufferLength, + return _SecTrustSetOCSPResponse( + trust, + responseData, ); } - late final _CFWriteStreamWritePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFWriteStreamRef, ffi.Pointer, - CFIndex)>>('CFWriteStreamWrite'); - late final _CFWriteStreamWrite = _CFWriteStreamWritePtr.asFunction< - int Function(CFWriteStreamRef, ffi.Pointer, int)>(); + late final _SecTrustSetOCSPResponsePtr = + _lookup>( + 'SecTrustSetOCSPResponse'); + late final _SecTrustSetOCSPResponse = _SecTrustSetOCSPResponsePtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); - CFTypeRef CFReadStreamCopyProperty( - CFReadStreamRef stream, - CFStreamPropertyKey propertyName, + int SecTrustSetSignedCertificateTimestamps( + SecTrustRef trust, + CFArrayRef sctArray, ) { - return _CFReadStreamCopyProperty( - stream, - propertyName, + return _SecTrustSetSignedCertificateTimestamps( + trust, + sctArray, ); } - late final _CFReadStreamCopyPropertyPtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFReadStreamRef, - CFStreamPropertyKey)>>('CFReadStreamCopyProperty'); - late final _CFReadStreamCopyProperty = _CFReadStreamCopyPropertyPtr - .asFunction(); + late final _SecTrustSetSignedCertificateTimestampsPtr = + _lookup>( + 'SecTrustSetSignedCertificateTimestamps'); + late final _SecTrustSetSignedCertificateTimestamps = + _SecTrustSetSignedCertificateTimestampsPtr.asFunction< + int Function(SecTrustRef, CFArrayRef)>(); - CFTypeRef CFWriteStreamCopyProperty( - CFWriteStreamRef stream, - CFStreamPropertyKey propertyName, + CFArrayRef SecTrustCopyCertificateChain( + SecTrustRef trust, ) { - return _CFWriteStreamCopyProperty( - stream, - propertyName, + return _SecTrustCopyCertificateChain( + trust, ); } - late final _CFWriteStreamCopyPropertyPtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFWriteStreamRef, - CFStreamPropertyKey)>>('CFWriteStreamCopyProperty'); - late final _CFWriteStreamCopyProperty = _CFWriteStreamCopyPropertyPtr - .asFunction(); + late final _SecTrustCopyCertificateChainPtr = + _lookup>( + 'SecTrustCopyCertificateChain'); + late final _SecTrustCopyCertificateChain = _SecTrustCopyCertificateChainPtr + .asFunction(); - int CFReadStreamSetProperty( - CFReadStreamRef stream, - CFStreamPropertyKey propertyName, - CFTypeRef propertyValue, + DartSInt32 SecTrustSetOptions( + SecTrustRef trustRef, + SecTrustOptionFlags options, ) { - return _CFReadStreamSetProperty( - stream, - propertyName, - propertyValue, + return _SecTrustSetOptions( + trustRef, + options.value, ); } - late final _CFReadStreamSetPropertyPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFReadStreamRef, CFStreamPropertyKey, - CFTypeRef)>>('CFReadStreamSetProperty'); - late final _CFReadStreamSetProperty = _CFReadStreamSetPropertyPtr.asFunction< - int Function(CFReadStreamRef, CFStreamPropertyKey, CFTypeRef)>(); + late final _SecTrustSetOptionsPtr = + _lookup>( + 'SecTrustSetOptions'); + late final _SecTrustSetOptions = + _SecTrustSetOptionsPtr.asFunction(); - int CFWriteStreamSetProperty( - CFWriteStreamRef stream, - CFStreamPropertyKey propertyName, - CFTypeRef propertyValue, + int SecTrustSetParameters( + SecTrustRef trustRef, + int action, + CFDataRef actionData, ) { - return _CFWriteStreamSetProperty( - stream, - propertyName, - propertyValue, + return _SecTrustSetParameters( + trustRef, + action, + actionData, ); } - late final _CFWriteStreamSetPropertyPtr = _lookup< + late final _SecTrustSetParametersPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFWriteStreamRef, CFStreamPropertyKey, - CFTypeRef)>>('CFWriteStreamSetProperty'); - late final _CFWriteStreamSetProperty = - _CFWriteStreamSetPropertyPtr.asFunction< - int Function(CFWriteStreamRef, CFStreamPropertyKey, CFTypeRef)>(); + OSStatus Function(SecTrustRef, CSSM_TP_ACTION, + CFDataRef)>>('SecTrustSetParameters'); + late final _SecTrustSetParameters = _SecTrustSetParametersPtr.asFunction< + int Function(SecTrustRef, int, CFDataRef)>(); - int CFReadStreamSetClient( - CFReadStreamRef stream, - int streamEvents, - CFReadStreamClientCallBack clientCB, - ffi.Pointer clientContext, + int SecTrustSetKeychains( + SecTrustRef trust, + CFTypeRef keychainOrArray, ) { - return _CFReadStreamSetClient( - stream, - streamEvents, - clientCB, - clientContext, + return _SecTrustSetKeychains( + trust, + keychainOrArray, ); } - late final _CFReadStreamSetClientPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFReadStreamRef, - CFOptionFlags, - CFReadStreamClientCallBack, - ffi.Pointer)>>('CFReadStreamSetClient'); - late final _CFReadStreamSetClient = _CFReadStreamSetClientPtr.asFunction< - int Function(CFReadStreamRef, int, CFReadStreamClientCallBack, - ffi.Pointer)>(); + late final _SecTrustSetKeychainsPtr = + _lookup>( + 'SecTrustSetKeychains'); + late final _SecTrustSetKeychains = _SecTrustSetKeychainsPtr.asFunction< + int Function(SecTrustRef, CFTypeRef)>(); - int CFWriteStreamSetClient( - CFWriteStreamRef stream, - int streamEvents, - CFWriteStreamClientCallBack clientCB, - ffi.Pointer clientContext, + int SecTrustGetResult( + SecTrustRef trustRef, + ffi.Pointer result, + ffi.Pointer certChain, + ffi.Pointer> statusChain, ) { - return _CFWriteStreamSetClient( - stream, - streamEvents, - clientCB, - clientContext, + return _SecTrustGetResult( + trustRef, + result, + certChain, + statusChain, ); } - late final _CFWriteStreamSetClientPtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFWriteStreamRef, - CFOptionFlags, - CFWriteStreamClientCallBack, - ffi.Pointer)>>('CFWriteStreamSetClient'); - late final _CFWriteStreamSetClient = _CFWriteStreamSetClientPtr.asFunction< - int Function(CFWriteStreamRef, int, CFWriteStreamClientCallBack, - ffi.Pointer)>(); + late final _SecTrustGetResultPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecTrustRef, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>( + 'SecTrustGetResult'); + late final _SecTrustGetResult = _SecTrustGetResultPtr.asFunction< + int Function( + SecTrustRef, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); - void CFReadStreamScheduleWithRunLoop( - CFReadStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + int SecTrustGetCssmResult( + SecTrustRef trust, + ffi.Pointer result, ) { - return _CFReadStreamScheduleWithRunLoop( - stream, - runLoop, - runLoopMode, + return _SecTrustGetCssmResult( + trust, + result, ); } - late final _CFReadStreamScheduleWithRunLoopPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFReadStreamScheduleWithRunLoop'); - late final _CFReadStreamScheduleWithRunLoop = - _CFReadStreamScheduleWithRunLoopPtr.asFunction< - void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + late final _SecTrustGetCssmResultPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecTrustRef, + ffi.Pointer)>>( + 'SecTrustGetCssmResult'); + late final _SecTrustGetCssmResult = _SecTrustGetCssmResultPtr.asFunction< + int Function( + SecTrustRef, ffi.Pointer)>(); - void CFWriteStreamScheduleWithRunLoop( - CFWriteStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + int SecTrustGetCssmResultCode( + SecTrustRef trust, + ffi.Pointer resultCode, ) { - return _CFWriteStreamScheduleWithRunLoop( - stream, - runLoop, - runLoopMode, + return _SecTrustGetCssmResultCode( + trust, + resultCode, ); } - late final _CFWriteStreamScheduleWithRunLoopPtr = _lookup< + late final _SecTrustGetCssmResultCodePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFWriteStreamScheduleWithRunLoop'); - late final _CFWriteStreamScheduleWithRunLoop = - _CFWriteStreamScheduleWithRunLoopPtr.asFunction< - void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetCssmResultCode'); + late final _SecTrustGetCssmResultCode = _SecTrustGetCssmResultCodePtr + .asFunction)>(); - void CFReadStreamUnscheduleFromRunLoop( - CFReadStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + int SecTrustGetTPHandle( + SecTrustRef trust, + ffi.Pointer handle, ) { - return _CFReadStreamUnscheduleFromRunLoop( - stream, - runLoop, - runLoopMode, + return _SecTrustGetTPHandle( + trust, + handle, ); } - late final _CFReadStreamUnscheduleFromRunLoopPtr = _lookup< + late final _SecTrustGetTPHandlePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFReadStreamUnscheduleFromRunLoop'); - late final _CFReadStreamUnscheduleFromRunLoop = - _CFReadStreamUnscheduleFromRunLoopPtr.asFunction< - void Function(CFReadStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + OSStatus Function(SecTrustRef, + ffi.Pointer)>>('SecTrustGetTPHandle'); + late final _SecTrustGetTPHandle = _SecTrustGetTPHandlePtr.asFunction< + int Function(SecTrustRef, ffi.Pointer)>(); - void CFWriteStreamUnscheduleFromRunLoop( - CFWriteStreamRef stream, - CFRunLoopRef runLoop, - CFRunLoopMode runLoopMode, + int SecTrustCopyAnchorCertificates( + ffi.Pointer anchors, ) { - return _CFWriteStreamUnscheduleFromRunLoop( - stream, - runLoop, - runLoopMode, + return _SecTrustCopyAnchorCertificates( + anchors, ); } - late final _CFWriteStreamUnscheduleFromRunLoopPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, CFRunLoopRef, - CFRunLoopMode)>>('CFWriteStreamUnscheduleFromRunLoop'); - late final _CFWriteStreamUnscheduleFromRunLoop = - _CFWriteStreamUnscheduleFromRunLoopPtr.asFunction< - void Function(CFWriteStreamRef, CFRunLoopRef, CFRunLoopMode)>(); + late final _SecTrustCopyAnchorCertificatesPtr = + _lookup)>>( + 'SecTrustCopyAnchorCertificates'); + late final _SecTrustCopyAnchorCertificates = + _SecTrustCopyAnchorCertificatesPtr.asFunction< + int Function(ffi.Pointer)>(); - void CFReadStreamSetDispatchQueue( - CFReadStreamRef stream, - dispatch_queue_t q, - ) { - return _CFReadStreamSetDispatchQueue( - stream, - q, - ); + int SecCertificateGetTypeID() { + return _SecCertificateGetTypeID(); } - late final _CFReadStreamSetDispatchQueuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFReadStreamRef, - dispatch_queue_t)>>('CFReadStreamSetDispatchQueue'); - late final _CFReadStreamSetDispatchQueue = _CFReadStreamSetDispatchQueuePtr - .asFunction(); + late final _SecCertificateGetTypeIDPtr = + _lookup>( + 'SecCertificateGetTypeID'); + late final _SecCertificateGetTypeID = + _SecCertificateGetTypeIDPtr.asFunction(); - void CFWriteStreamSetDispatchQueue( - CFWriteStreamRef stream, - dispatch_queue_t q, + SecCertificateRef SecCertificateCreateWithData( + CFAllocatorRef allocator, + CFDataRef data, ) { - return _CFWriteStreamSetDispatchQueue( - stream, - q, + return _SecCertificateCreateWithData( + allocator, + data, ); } - late final _CFWriteStreamSetDispatchQueuePtr = _lookup< + late final _SecCertificateCreateWithDataPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFWriteStreamRef, - dispatch_queue_t)>>('CFWriteStreamSetDispatchQueue'); - late final _CFWriteStreamSetDispatchQueue = _CFWriteStreamSetDispatchQueuePtr - .asFunction(); + SecCertificateRef Function( + CFAllocatorRef, CFDataRef)>>('SecCertificateCreateWithData'); + late final _SecCertificateCreateWithData = _SecCertificateCreateWithDataPtr + .asFunction(); - dispatch_queue_t CFReadStreamCopyDispatchQueue( - CFReadStreamRef stream, + CFDataRef SecCertificateCopyData( + SecCertificateRef certificate, ) { - return _CFReadStreamCopyDispatchQueue( - stream, + return _SecCertificateCopyData( + certificate, ); } - late final _CFReadStreamCopyDispatchQueuePtr = - _lookup>( - 'CFReadStreamCopyDispatchQueue'); - late final _CFReadStreamCopyDispatchQueue = _CFReadStreamCopyDispatchQueuePtr - .asFunction(); + late final _SecCertificateCopyDataPtr = + _lookup>( + 'SecCertificateCopyData'); + late final _SecCertificateCopyData = _SecCertificateCopyDataPtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); - dispatch_queue_t CFWriteStreamCopyDispatchQueue( - CFWriteStreamRef stream, + CFStringRef SecCertificateCopySubjectSummary( + SecCertificateRef certificate, ) { - return _CFWriteStreamCopyDispatchQueue( - stream, + return _SecCertificateCopySubjectSummary( + certificate, ); } - late final _CFWriteStreamCopyDispatchQueuePtr = - _lookup>( - 'CFWriteStreamCopyDispatchQueue'); - late final _CFWriteStreamCopyDispatchQueue = - _CFWriteStreamCopyDispatchQueuePtr.asFunction< - dispatch_queue_t Function(CFWriteStreamRef)>(); + late final _SecCertificateCopySubjectSummaryPtr = + _lookup>( + 'SecCertificateCopySubjectSummary'); + late final _SecCertificateCopySubjectSummary = + _SecCertificateCopySubjectSummaryPtr.asFunction< + CFStringRef Function(SecCertificateRef)>(); - CFStreamError CFReadStreamGetError( - CFReadStreamRef stream, + int SecCertificateCopyCommonName( + SecCertificateRef certificate, + ffi.Pointer commonName, ) { - return _CFReadStreamGetError( - stream, + return _SecCertificateCopyCommonName( + certificate, + commonName, ); } - late final _CFReadStreamGetErrorPtr = - _lookup>( - 'CFReadStreamGetError'); - late final _CFReadStreamGetError = _CFReadStreamGetErrorPtr.asFunction< - CFStreamError Function(CFReadStreamRef)>(); + late final _SecCertificateCopyCommonNamePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyCommonName'); + late final _SecCertificateCopyCommonName = _SecCertificateCopyCommonNamePtr + .asFunction)>(); - CFStreamError CFWriteStreamGetError( - CFWriteStreamRef stream, + int SecCertificateCopyEmailAddresses( + SecCertificateRef certificate, + ffi.Pointer emailAddresses, ) { - return _CFWriteStreamGetError( - stream, + return _SecCertificateCopyEmailAddresses( + certificate, + emailAddresses, ); } - late final _CFWriteStreamGetErrorPtr = - _lookup>( - 'CFWriteStreamGetError'); - late final _CFWriteStreamGetError = _CFWriteStreamGetErrorPtr.asFunction< - CFStreamError Function(CFWriteStreamRef)>(); + late final _SecCertificateCopyEmailAddressesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyEmailAddresses'); + late final _SecCertificateCopyEmailAddresses = + _SecCertificateCopyEmailAddressesPtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); - CFPropertyListRef CFPropertyListCreateFromXMLData( - CFAllocatorRef allocator, - CFDataRef xmlData, - int mutabilityOption, - ffi.Pointer errorString, + CFDataRef SecCertificateCopyNormalizedIssuerSequence( + SecCertificateRef certificate, ) { - return _CFPropertyListCreateFromXMLData( - allocator, - xmlData, - mutabilityOption, - errorString, + return _SecCertificateCopyNormalizedIssuerSequence( + certificate, ); } - late final _CFPropertyListCreateFromXMLDataPtr = _lookup< - ffi.NativeFunction< - CFPropertyListRef Function(CFAllocatorRef, CFDataRef, CFOptionFlags, - ffi.Pointer)>>('CFPropertyListCreateFromXMLData'); - late final _CFPropertyListCreateFromXMLData = - _CFPropertyListCreateFromXMLDataPtr.asFunction< - CFPropertyListRef Function( - CFAllocatorRef, CFDataRef, int, ffi.Pointer)>(); + late final _SecCertificateCopyNormalizedIssuerSequencePtr = + _lookup>( + 'SecCertificateCopyNormalizedIssuerSequence'); + late final _SecCertificateCopyNormalizedIssuerSequence = + _SecCertificateCopyNormalizedIssuerSequencePtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); - CFDataRef CFPropertyListCreateXMLData( - CFAllocatorRef allocator, - CFPropertyListRef propertyList, + CFDataRef SecCertificateCopyNormalizedSubjectSequence( + SecCertificateRef certificate, ) { - return _CFPropertyListCreateXMLData( - allocator, - propertyList, + return _SecCertificateCopyNormalizedSubjectSequence( + certificate, ); } - late final _CFPropertyListCreateXMLDataPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(CFAllocatorRef, - CFPropertyListRef)>>('CFPropertyListCreateXMLData'); - late final _CFPropertyListCreateXMLData = _CFPropertyListCreateXMLDataPtr - .asFunction(); + late final _SecCertificateCopyNormalizedSubjectSequencePtr = + _lookup>( + 'SecCertificateCopyNormalizedSubjectSequence'); + late final _SecCertificateCopyNormalizedSubjectSequence = + _SecCertificateCopyNormalizedSubjectSequencePtr.asFunction< + CFDataRef Function(SecCertificateRef)>(); - CFPropertyListRef CFPropertyListCreateDeepCopy( - CFAllocatorRef allocator, - CFPropertyListRef propertyList, - int mutabilityOption, + SecKeyRef SecCertificateCopyKey( + SecCertificateRef certificate, ) { - return _CFPropertyListCreateDeepCopy( - allocator, - propertyList, - mutabilityOption, + return _SecCertificateCopyKey( + certificate, ); } - late final _CFPropertyListCreateDeepCopyPtr = _lookup< - ffi.NativeFunction< - CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, - CFOptionFlags)>>('CFPropertyListCreateDeepCopy'); - late final _CFPropertyListCreateDeepCopy = - _CFPropertyListCreateDeepCopyPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFPropertyListRef, int)>(); + late final _SecCertificateCopyKeyPtr = + _lookup>( + 'SecCertificateCopyKey'); + late final _SecCertificateCopyKey = _SecCertificateCopyKeyPtr.asFunction< + SecKeyRef Function(SecCertificateRef)>(); - int CFPropertyListIsValid( - CFPropertyListRef plist, - int format, + int SecCertificateCopyPublicKey( + SecCertificateRef certificate, + ffi.Pointer key, ) { - return _CFPropertyListIsValid( - plist, - format, + return _SecCertificateCopyPublicKey( + certificate, + key, ); } - late final _CFPropertyListIsValidPtr = _lookup< - ffi.NativeFunction>( - 'CFPropertyListIsValid'); - late final _CFPropertyListIsValid = _CFPropertyListIsValidPtr.asFunction< - int Function(CFPropertyListRef, int)>(); + late final _SecCertificateCopyPublicKeyPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyPublicKey'); + late final _SecCertificateCopyPublicKey = _SecCertificateCopyPublicKeyPtr + .asFunction)>(); - int CFPropertyListWriteToStream( - CFPropertyListRef propertyList, - CFWriteStreamRef stream, - int format, - ffi.Pointer errorString, + CFDataRef SecCertificateCopySerialNumberData( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _CFPropertyListWriteToStream( - propertyList, - stream, - format, - errorString, + return _SecCertificateCopySerialNumberData( + certificate, + error, ); } - late final _CFPropertyListWriteToStreamPtr = _lookup< + late final _SecCertificateCopySerialNumberDataPtr = _lookup< ffi.NativeFunction< - CFIndex Function(CFPropertyListRef, CFWriteStreamRef, ffi.Int32, - ffi.Pointer)>>('CFPropertyListWriteToStream'); - late final _CFPropertyListWriteToStream = - _CFPropertyListWriteToStreamPtr.asFunction< - int Function(CFPropertyListRef, CFWriteStreamRef, int, - ffi.Pointer)>(); + CFDataRef Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopySerialNumberData'); + late final _SecCertificateCopySerialNumberData = + _SecCertificateCopySerialNumberDataPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - CFPropertyListRef CFPropertyListCreateFromStream( - CFAllocatorRef allocator, - CFReadStreamRef stream, - int streamLength, - int mutabilityOption, - ffi.Pointer format, - ffi.Pointer errorString, + CFDataRef SecCertificateCopySerialNumber( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _CFPropertyListCreateFromStream( - allocator, - stream, - streamLength, - mutabilityOption, - format, - errorString, + return _SecCertificateCopySerialNumber( + certificate, + error, ); } - late final _CFPropertyListCreateFromStreamPtr = _lookup< + late final _SecCertificateCopySerialNumberPtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function( - CFAllocatorRef, - CFReadStreamRef, - CFIndex, - CFOptionFlags, - ffi.Pointer, - ffi.Pointer)>>('CFPropertyListCreateFromStream'); - late final _CFPropertyListCreateFromStream = - _CFPropertyListCreateFromStreamPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, - ffi.Pointer, ffi.Pointer)>(); + CFDataRef Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopySerialNumber'); + late final _SecCertificateCopySerialNumber = + _SecCertificateCopySerialNumberPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - CFPropertyListRef CFPropertyListCreateWithData( - CFAllocatorRef allocator, - CFDataRef data, - int options, - ffi.Pointer format, - ffi.Pointer error, + int SecCertificateCreateFromData( + ffi.Pointer data, + int type, + int encoding, + ffi.Pointer certificate, ) { - return _CFPropertyListCreateWithData( - allocator, + return _SecCertificateCreateFromData( data, - options, - format, - error, + type, + encoding, + certificate, ); } - late final _CFPropertyListCreateWithDataPtr = _lookup< + late final _SecCertificateCreateFromDataPtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function( - CFAllocatorRef, - CFDataRef, - CFOptionFlags, - ffi.Pointer, - ffi.Pointer)>>('CFPropertyListCreateWithData'); - late final _CFPropertyListCreateWithData = - _CFPropertyListCreateWithDataPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFDataRef, int, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + ffi.Pointer, + CSSM_CERT_TYPE, + CSSM_CERT_ENCODING, + ffi.Pointer)>>('SecCertificateCreateFromData'); + late final _SecCertificateCreateFromData = + _SecCertificateCreateFromDataPtr.asFunction< + int Function(ffi.Pointer, int, int, + ffi.Pointer)>(); - CFPropertyListRef CFPropertyListCreateWithStream( - CFAllocatorRef allocator, - CFReadStreamRef stream, - int streamLength, - int options, - ffi.Pointer format, - ffi.Pointer error, + int SecCertificateAddToKeychain( + SecCertificateRef certificate, + SecKeychainRef keychain, ) { - return _CFPropertyListCreateWithStream( - allocator, - stream, - streamLength, - options, - format, - error, + return _SecCertificateAddToKeychain( + certificate, + keychain, ); } - late final _CFPropertyListCreateWithStreamPtr = _lookup< + late final _SecCertificateAddToKeychainPtr = _lookup< ffi.NativeFunction< - CFPropertyListRef Function( - CFAllocatorRef, - CFReadStreamRef, - CFIndex, - CFOptionFlags, - ffi.Pointer, - ffi.Pointer)>>('CFPropertyListCreateWithStream'); - late final _CFPropertyListCreateWithStream = - _CFPropertyListCreateWithStreamPtr.asFunction< - CFPropertyListRef Function(CFAllocatorRef, CFReadStreamRef, int, int, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function(SecCertificateRef, + SecKeychainRef)>>('SecCertificateAddToKeychain'); + late final _SecCertificateAddToKeychain = _SecCertificateAddToKeychainPtr + .asFunction(); - int CFPropertyListWrite( - CFPropertyListRef propertyList, - CFWriteStreamRef stream, - int format, - int options, - ffi.Pointer error, + int SecCertificateGetData( + SecCertificateRef certificate, + CSSM_DATA_PTR data, ) { - return _CFPropertyListWrite( - propertyList, - stream, - format, - options, - error, + return _SecCertificateGetData( + certificate, + data, ); } - late final _CFPropertyListWritePtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFPropertyListRef, CFWriteStreamRef, ffi.Int32, - CFOptionFlags, ffi.Pointer)>>('CFPropertyListWrite'); - late final _CFPropertyListWrite = _CFPropertyListWritePtr.asFunction< - int Function(CFPropertyListRef, CFWriteStreamRef, int, int, - ffi.Pointer)>(); + late final _SecCertificateGetDataPtr = _lookup< + ffi + .NativeFunction>( + 'SecCertificateGetData'); + late final _SecCertificateGetData = _SecCertificateGetDataPtr.asFunction< + int Function(SecCertificateRef, CSSM_DATA_PTR)>(); - CFDataRef CFPropertyListCreateData( - CFAllocatorRef allocator, - CFPropertyListRef propertyList, - int format, - int options, - ffi.Pointer error, + int SecCertificateGetType( + SecCertificateRef certificate, + ffi.Pointer certificateType, ) { - return _CFPropertyListCreateData( - allocator, - propertyList, - format, - options, - error, + return _SecCertificateGetType( + certificate, + certificateType, ); } - late final _CFPropertyListCreateDataPtr = _lookup< + late final _SecCertificateGetTypePtr = _lookup< ffi.NativeFunction< - CFDataRef Function( - CFAllocatorRef, - CFPropertyListRef, - ffi.Int32, - CFOptionFlags, - ffi.Pointer)>>('CFPropertyListCreateData'); - late final _CFPropertyListCreateData = - _CFPropertyListCreateDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFPropertyListRef, int, int, - ffi.Pointer)>(); - - late final ffi.Pointer _kCFTypeSetCallBacks = - _lookup('kCFTypeSetCallBacks'); - - CFSetCallBacks get kCFTypeSetCallBacks => _kCFTypeSetCallBacks.ref; - - late final ffi.Pointer _kCFCopyStringSetCallBacks = - _lookup('kCFCopyStringSetCallBacks'); - - CFSetCallBacks get kCFCopyStringSetCallBacks => - _kCFCopyStringSetCallBacks.ref; - - int CFSetGetTypeID() { - return _CFSetGetTypeID(); - } - - late final _CFSetGetTypeIDPtr = - _lookup>('CFSetGetTypeID'); - late final _CFSetGetTypeID = _CFSetGetTypeIDPtr.asFunction(); + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateGetType'); + late final _SecCertificateGetType = _SecCertificateGetTypePtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); - CFSetRef CFSetCreate( - CFAllocatorRef allocator, - ffi.Pointer> values, - int numValues, - ffi.Pointer callBacks, + int SecCertificateGetSubject( + SecCertificateRef certificate, + ffi.Pointer> subject, ) { - return _CFSetCreate( - allocator, - values, - numValues, - callBacks, + return _SecCertificateGetSubject( + certificate, + subject, ); } - late final _CFSetCreatePtr = _lookup< - ffi.NativeFunction< - CFSetRef Function(CFAllocatorRef, ffi.Pointer>, - CFIndex, ffi.Pointer)>>('CFSetCreate'); - late final _CFSetCreate = _CFSetCreatePtr.asFunction< - CFSetRef Function(CFAllocatorRef, ffi.Pointer>, int, - ffi.Pointer)>(); + late final _SecCertificateGetSubjectPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer>)>>( + 'SecCertificateGetSubject'); + late final _SecCertificateGetSubject = + _SecCertificateGetSubjectPtr.asFunction< + int Function( + SecCertificateRef, ffi.Pointer>)>(); - CFSetRef CFSetCreateCopy( - CFAllocatorRef allocator, - CFSetRef theSet, + int SecCertificateGetIssuer( + SecCertificateRef certificate, + ffi.Pointer> issuer, ) { - return _CFSetCreateCopy( - allocator, - theSet, + return _SecCertificateGetIssuer( + certificate, + issuer, ); } - late final _CFSetCreateCopyPtr = - _lookup>( - 'CFSetCreateCopy'); - late final _CFSetCreateCopy = _CFSetCreateCopyPtr.asFunction< - CFSetRef Function(CFAllocatorRef, CFSetRef)>(); + late final _SecCertificateGetIssuerPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, + ffi.Pointer>)>>( + 'SecCertificateGetIssuer'); + late final _SecCertificateGetIssuer = _SecCertificateGetIssuerPtr.asFunction< + int Function( + SecCertificateRef, ffi.Pointer>)>(); - CFMutableSetRef CFSetCreateMutable( - CFAllocatorRef allocator, - int capacity, - ffi.Pointer callBacks, + int SecCertificateGetCLHandle( + SecCertificateRef certificate, + ffi.Pointer clHandle, ) { - return _CFSetCreateMutable( - allocator, - capacity, - callBacks, + return _SecCertificateGetCLHandle( + certificate, + clHandle, ); } - late final _CFSetCreateMutablePtr = _lookup< + late final _SecCertificateGetCLHandlePtr = _lookup< ffi.NativeFunction< - CFMutableSetRef Function(CFAllocatorRef, CFIndex, - ffi.Pointer)>>('CFSetCreateMutable'); - late final _CFSetCreateMutable = _CFSetCreateMutablePtr.asFunction< - CFMutableSetRef Function( - CFAllocatorRef, int, ffi.Pointer)>(); + OSStatus Function(SecCertificateRef, + ffi.Pointer)>>('SecCertificateGetCLHandle'); + late final _SecCertificateGetCLHandle = + _SecCertificateGetCLHandlePtr.asFunction< + int Function(SecCertificateRef, ffi.Pointer)>(); - CFMutableSetRef CFSetCreateMutableCopy( - CFAllocatorRef allocator, - int capacity, - CFSetRef theSet, + int SecCertificateGetAlgorithmID( + SecCertificateRef certificate, + ffi.Pointer> algid, ) { - return _CFSetCreateMutableCopy( - allocator, - capacity, - theSet, + return _SecCertificateGetAlgorithmID( + certificate, + algid, ); } - late final _CFSetCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableSetRef Function( - CFAllocatorRef, CFIndex, CFSetRef)>>('CFSetCreateMutableCopy'); - late final _CFSetCreateMutableCopy = _CFSetCreateMutableCopyPtr.asFunction< - CFMutableSetRef Function(CFAllocatorRef, int, CFSetRef)>(); + late final _SecCertificateGetAlgorithmIDPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SecCertificateRef, ffi.Pointer>)>>( + 'SecCertificateGetAlgorithmID'); + late final _SecCertificateGetAlgorithmID = + _SecCertificateGetAlgorithmIDPtr.asFunction< + int Function( + SecCertificateRef, ffi.Pointer>)>(); - int CFSetGetCount( - CFSetRef theSet, + int SecCertificateCopyPreference( + CFStringRef name, + int keyUsage, + ffi.Pointer certificate, ) { - return _CFSetGetCount( - theSet, + return _SecCertificateCopyPreference( + name, + keyUsage, + certificate, ); } - late final _CFSetGetCountPtr = - _lookup>('CFSetGetCount'); - late final _CFSetGetCount = - _CFSetGetCountPtr.asFunction(); + late final _SecCertificateCopyPreferencePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(CFStringRef, uint32, + ffi.Pointer)>>('SecCertificateCopyPreference'); + late final _SecCertificateCopyPreference = + _SecCertificateCopyPreferencePtr.asFunction< + int Function(CFStringRef, int, ffi.Pointer)>(); - int CFSetGetCountOfValue( - CFSetRef theSet, - ffi.Pointer value, + SecCertificateRef SecCertificateCopyPreferred( + CFStringRef name, + CFArrayRef keyUsage, ) { - return _CFSetGetCountOfValue( - theSet, - value, + return _SecCertificateCopyPreferred( + name, + keyUsage, ); } - late final _CFSetGetCountOfValuePtr = _lookup< + late final _SecCertificateCopyPreferredPtr = _lookup< ffi - .NativeFunction)>>( - 'CFSetGetCountOfValue'); - late final _CFSetGetCountOfValue = _CFSetGetCountOfValuePtr.asFunction< - int Function(CFSetRef, ffi.Pointer)>(); + .NativeFunction>( + 'SecCertificateCopyPreferred'); + late final _SecCertificateCopyPreferred = _SecCertificateCopyPreferredPtr + .asFunction(); - int CFSetContainsValue( - CFSetRef theSet, - ffi.Pointer value, + int SecCertificateSetPreference( + SecCertificateRef certificate, + CFStringRef name, + int keyUsage, + CFDateRef date, ) { - return _CFSetContainsValue( - theSet, - value, + return _SecCertificateSetPreference( + certificate, + name, + keyUsage, + date, ); } - late final _CFSetContainsValuePtr = _lookup< - ffi - .NativeFunction)>>( - 'CFSetContainsValue'); - late final _CFSetContainsValue = _CFSetContainsValuePtr.asFunction< - int Function(CFSetRef, ffi.Pointer)>(); + late final _SecCertificateSetPreferencePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecCertificateRef, CFStringRef, uint32, + CFDateRef)>>('SecCertificateSetPreference'); + late final _SecCertificateSetPreference = + _SecCertificateSetPreferencePtr.asFunction< + int Function(SecCertificateRef, CFStringRef, int, CFDateRef)>(); - ffi.Pointer CFSetGetValue( - CFSetRef theSet, - ffi.Pointer value, + int SecCertificateSetPreferred( + SecCertificateRef certificate, + CFStringRef name, + CFArrayRef keyUsage, ) { - return _CFSetGetValue( - theSet, - value, + return _SecCertificateSetPreferred( + certificate, + name, + keyUsage, ); } - late final _CFSetGetValuePtr = _lookup< + late final _SecCertificateSetPreferredPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFSetRef, ffi.Pointer)>>('CFSetGetValue'); - late final _CFSetGetValue = _CFSetGetValuePtr.asFunction< - ffi.Pointer Function(CFSetRef, ffi.Pointer)>(); + OSStatus Function(SecCertificateRef, CFStringRef, + CFArrayRef)>>('SecCertificateSetPreferred'); + late final _SecCertificateSetPreferred = _SecCertificateSetPreferredPtr + .asFunction(); - int CFSetGetValueIfPresent( - CFSetRef theSet, - ffi.Pointer candidate, - ffi.Pointer> value, - ) { - return _CFSetGetValueIfPresent( - theSet, - candidate, - value, - ); - } + late final ffi.Pointer _kSecPropertyKeyType = + _lookup('kSecPropertyKeyType'); - late final _CFSetGetValueIfPresentPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFSetRef, ffi.Pointer, - ffi.Pointer>)>>('CFSetGetValueIfPresent'); - late final _CFSetGetValueIfPresent = _CFSetGetValueIfPresentPtr.asFunction< - int Function(CFSetRef, ffi.Pointer, - ffi.Pointer>)>(); + CFStringRef get kSecPropertyKeyType => _kSecPropertyKeyType.value; - void CFSetGetValues( - CFSetRef theSet, - ffi.Pointer> values, + set kSecPropertyKeyType(CFStringRef value) => + _kSecPropertyKeyType.value = value; + + late final ffi.Pointer _kSecPropertyKeyLabel = + _lookup('kSecPropertyKeyLabel'); + + CFStringRef get kSecPropertyKeyLabel => _kSecPropertyKeyLabel.value; + + set kSecPropertyKeyLabel(CFStringRef value) => + _kSecPropertyKeyLabel.value = value; + + late final ffi.Pointer _kSecPropertyKeyLocalizedLabel = + _lookup('kSecPropertyKeyLocalizedLabel'); + + CFStringRef get kSecPropertyKeyLocalizedLabel => + _kSecPropertyKeyLocalizedLabel.value; + + set kSecPropertyKeyLocalizedLabel(CFStringRef value) => + _kSecPropertyKeyLocalizedLabel.value = value; + + late final ffi.Pointer _kSecPropertyKeyValue = + _lookup('kSecPropertyKeyValue'); + + CFStringRef get kSecPropertyKeyValue => _kSecPropertyKeyValue.value; + + set kSecPropertyKeyValue(CFStringRef value) => + _kSecPropertyKeyValue.value = value; + + late final ffi.Pointer _kSecPropertyTypeWarning = + _lookup('kSecPropertyTypeWarning'); + + CFStringRef get kSecPropertyTypeWarning => _kSecPropertyTypeWarning.value; + + set kSecPropertyTypeWarning(CFStringRef value) => + _kSecPropertyTypeWarning.value = value; + + late final ffi.Pointer _kSecPropertyTypeSuccess = + _lookup('kSecPropertyTypeSuccess'); + + CFStringRef get kSecPropertyTypeSuccess => _kSecPropertyTypeSuccess.value; + + set kSecPropertyTypeSuccess(CFStringRef value) => + _kSecPropertyTypeSuccess.value = value; + + late final ffi.Pointer _kSecPropertyTypeSection = + _lookup('kSecPropertyTypeSection'); + + CFStringRef get kSecPropertyTypeSection => _kSecPropertyTypeSection.value; + + set kSecPropertyTypeSection(CFStringRef value) => + _kSecPropertyTypeSection.value = value; + + late final ffi.Pointer _kSecPropertyTypeData = + _lookup('kSecPropertyTypeData'); + + CFStringRef get kSecPropertyTypeData => _kSecPropertyTypeData.value; + + set kSecPropertyTypeData(CFStringRef value) => + _kSecPropertyTypeData.value = value; + + late final ffi.Pointer _kSecPropertyTypeString = + _lookup('kSecPropertyTypeString'); + + CFStringRef get kSecPropertyTypeString => _kSecPropertyTypeString.value; + + set kSecPropertyTypeString(CFStringRef value) => + _kSecPropertyTypeString.value = value; + + late final ffi.Pointer _kSecPropertyTypeURL = + _lookup('kSecPropertyTypeURL'); + + CFStringRef get kSecPropertyTypeURL => _kSecPropertyTypeURL.value; + + set kSecPropertyTypeURL(CFStringRef value) => + _kSecPropertyTypeURL.value = value; + + late final ffi.Pointer _kSecPropertyTypeDate = + _lookup('kSecPropertyTypeDate'); + + CFStringRef get kSecPropertyTypeDate => _kSecPropertyTypeDate.value; + + set kSecPropertyTypeDate(CFStringRef value) => + _kSecPropertyTypeDate.value = value; + + late final ffi.Pointer _kSecPropertyTypeArray = + _lookup('kSecPropertyTypeArray'); + + CFStringRef get kSecPropertyTypeArray => _kSecPropertyTypeArray.value; + + set kSecPropertyTypeArray(CFStringRef value) => + _kSecPropertyTypeArray.value = value; + + late final ffi.Pointer _kSecPropertyTypeNumber = + _lookup('kSecPropertyTypeNumber'); + + CFStringRef get kSecPropertyTypeNumber => _kSecPropertyTypeNumber.value; + + set kSecPropertyTypeNumber(CFStringRef value) => + _kSecPropertyTypeNumber.value = value; + + CFDictionaryRef SecCertificateCopyValues( + SecCertificateRef certificate, + CFArrayRef keys, + ffi.Pointer error, ) { - return _CFSetGetValues( - theSet, - values, + return _SecCertificateCopyValues( + certificate, + keys, + error, ); } - late final _CFSetGetValuesPtr = _lookup< + late final _SecCertificateCopyValuesPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFSetRef, ffi.Pointer>)>>('CFSetGetValues'); - late final _CFSetGetValues = _CFSetGetValuesPtr.asFunction< - void Function(CFSetRef, ffi.Pointer>)>(); + CFDictionaryRef Function(SecCertificateRef, CFArrayRef, + ffi.Pointer)>>('SecCertificateCopyValues'); + late final _SecCertificateCopyValues = + _SecCertificateCopyValuesPtr.asFunction< + CFDictionaryRef Function( + SecCertificateRef, CFArrayRef, ffi.Pointer)>(); - void CFSetApplyFunction( - CFSetRef theSet, - CFSetApplierFunction applier, - ffi.Pointer context, + CFStringRef SecCertificateCopyLongDescription( + CFAllocatorRef alloc, + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _CFSetApplyFunction( - theSet, - applier, - context, + return _SecCertificateCopyLongDescription( + alloc, + certificate, + error, ); } - late final _CFSetApplyFunctionPtr = _lookup< + late final _SecCertificateCopyLongDescriptionPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFSetRef, CFSetApplierFunction, - ffi.Pointer)>>('CFSetApplyFunction'); - late final _CFSetApplyFunction = _CFSetApplyFunctionPtr.asFunction< - void Function(CFSetRef, CFSetApplierFunction, ffi.Pointer)>(); + CFStringRef Function(CFAllocatorRef, SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyLongDescription'); + late final _SecCertificateCopyLongDescription = + _SecCertificateCopyLongDescriptionPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); - void CFSetAddValue( - CFMutableSetRef theSet, - ffi.Pointer value, + CFStringRef SecCertificateCopyShortDescription( + CFAllocatorRef alloc, + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _CFSetAddValue( - theSet, - value, + return _SecCertificateCopyShortDescription( + alloc, + certificate, + error, ); } - late final _CFSetAddValuePtr = _lookup< + late final _SecCertificateCopyShortDescriptionPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetAddValue'); - late final _CFSetAddValue = _CFSetAddValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + CFStringRef Function(CFAllocatorRef, SecCertificateRef, + ffi.Pointer)>>('SecCertificateCopyShortDescription'); + late final _SecCertificateCopyShortDescription = + _SecCertificateCopyShortDescriptionPtr.asFunction< + CFStringRef Function( + CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); - void CFSetReplaceValue( - CFMutableSetRef theSet, - ffi.Pointer value, + CFDataRef SecCertificateCopyNormalizedIssuerContent( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _CFSetReplaceValue( - theSet, - value, + return _SecCertificateCopyNormalizedIssuerContent( + certificate, + error, ); } - late final _CFSetReplaceValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetReplaceValue'); - late final _CFSetReplaceValue = _CFSetReplaceValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + late final _SecCertificateCopyNormalizedIssuerContentPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( + 'SecCertificateCopyNormalizedIssuerContent'); + late final _SecCertificateCopyNormalizedIssuerContent = + _SecCertificateCopyNormalizedIssuerContentPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - void CFSetSetValue( - CFMutableSetRef theSet, - ffi.Pointer value, + CFDataRef SecCertificateCopyNormalizedSubjectContent( + SecCertificateRef certificate, + ffi.Pointer error, ) { - return _CFSetSetValue( - theSet, - value, + return _SecCertificateCopyNormalizedSubjectContent( + certificate, + error, ); } - late final _CFSetSetValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetSetValue'); - late final _CFSetSetValue = _CFSetSetValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + late final _SecCertificateCopyNormalizedSubjectContentPtr = _lookup< + ffi.NativeFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( + 'SecCertificateCopyNormalizedSubjectContent'); + late final _SecCertificateCopyNormalizedSubjectContent = + _SecCertificateCopyNormalizedSubjectContentPtr.asFunction< + CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - void CFSetRemoveValue( - CFMutableSetRef theSet, - ffi.Pointer value, - ) { - return _CFSetRemoveValue( - theSet, - value, - ); + int SecIdentityGetTypeID() { + return _SecIdentityGetTypeID(); } - late final _CFSetRemoveValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMutableSetRef, ffi.Pointer)>>('CFSetRemoveValue'); - late final _CFSetRemoveValue = _CFSetRemoveValuePtr.asFunction< - void Function(CFMutableSetRef, ffi.Pointer)>(); + late final _SecIdentityGetTypeIDPtr = + _lookup>('SecIdentityGetTypeID'); + late final _SecIdentityGetTypeID = + _SecIdentityGetTypeIDPtr.asFunction(); - void CFSetRemoveAllValues( - CFMutableSetRef theSet, + int SecIdentityCreateWithCertificate( + CFTypeRef keychainOrArray, + SecCertificateRef certificateRef, + ffi.Pointer identityRef, ) { - return _CFSetRemoveAllValues( - theSet, + return _SecIdentityCreateWithCertificate( + keychainOrArray, + certificateRef, + identityRef, ); } - late final _CFSetRemoveAllValuesPtr = - _lookup>( - 'CFSetRemoveAllValues'); - late final _CFSetRemoveAllValues = - _CFSetRemoveAllValuesPtr.asFunction(); + late final _SecIdentityCreateWithCertificatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + CFTypeRef, SecCertificateRef, ffi.Pointer)>>( + 'SecIdentityCreateWithCertificate'); + late final _SecIdentityCreateWithCertificate = + _SecIdentityCreateWithCertificatePtr.asFunction< + int Function( + CFTypeRef, SecCertificateRef, ffi.Pointer)>(); - int CFTreeGetTypeID() { - return _CFTreeGetTypeID(); + int SecIdentityCopyCertificate( + SecIdentityRef identityRef, + ffi.Pointer certificateRef, + ) { + return _SecIdentityCopyCertificate( + identityRef, + certificateRef, + ); } - late final _CFTreeGetTypeIDPtr = - _lookup>('CFTreeGetTypeID'); - late final _CFTreeGetTypeID = - _CFTreeGetTypeIDPtr.asFunction(); + late final _SecIdentityCopyCertificatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecIdentityRef, + ffi.Pointer)>>('SecIdentityCopyCertificate'); + late final _SecIdentityCopyCertificate = + _SecIdentityCopyCertificatePtr.asFunction< + int Function(SecIdentityRef, ffi.Pointer)>(); - CFTreeRef CFTreeCreate( - CFAllocatorRef allocator, - ffi.Pointer context, + int SecIdentityCopyPrivateKey( + SecIdentityRef identityRef, + ffi.Pointer privateKeyRef, ) { - return _CFTreeCreate( - allocator, - context, + return _SecIdentityCopyPrivateKey( + identityRef, + privateKeyRef, ); } - late final _CFTreeCreatePtr = _lookup< + late final _SecIdentityCopyPrivateKeyPtr = _lookup< ffi.NativeFunction< - CFTreeRef Function( - CFAllocatorRef, ffi.Pointer)>>('CFTreeCreate'); - late final _CFTreeCreate = _CFTreeCreatePtr.asFunction< - CFTreeRef Function(CFAllocatorRef, ffi.Pointer)>(); + OSStatus Function(SecIdentityRef, + ffi.Pointer)>>('SecIdentityCopyPrivateKey'); + late final _SecIdentityCopyPrivateKey = _SecIdentityCopyPrivateKeyPtr + .asFunction)>(); - CFTreeRef CFTreeGetParent( - CFTreeRef tree, + int SecIdentityCopyPreference( + CFStringRef name, + int keyUsage, + CFArrayRef validIssuers, + ffi.Pointer identity, ) { - return _CFTreeGetParent( - tree, + return _SecIdentityCopyPreference( + name, + keyUsage, + validIssuers, + identity, ); } - late final _CFTreeGetParentPtr = - _lookup>( - 'CFTreeGetParent'); - late final _CFTreeGetParent = - _CFTreeGetParentPtr.asFunction(); + late final _SecIdentityCopyPreferencePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(CFStringRef, CSSM_KEYUSE, CFArrayRef, + ffi.Pointer)>>('SecIdentityCopyPreference'); + late final _SecIdentityCopyPreference = + _SecIdentityCopyPreferencePtr.asFunction< + int Function( + CFStringRef, int, CFArrayRef, ffi.Pointer)>(); - CFTreeRef CFTreeGetNextSibling( - CFTreeRef tree, + SecIdentityRef SecIdentityCopyPreferred( + CFStringRef name, + CFArrayRef keyUsage, + CFArrayRef validIssuers, ) { - return _CFTreeGetNextSibling( - tree, + return _SecIdentityCopyPreferred( + name, + keyUsage, + validIssuers, ); } - late final _CFTreeGetNextSiblingPtr = - _lookup>( - 'CFTreeGetNextSibling'); - late final _CFTreeGetNextSibling = - _CFTreeGetNextSiblingPtr.asFunction(); + late final _SecIdentityCopyPreferredPtr = _lookup< + ffi.NativeFunction< + SecIdentityRef Function(CFStringRef, CFArrayRef, + CFArrayRef)>>('SecIdentityCopyPreferred'); + late final _SecIdentityCopyPreferred = + _SecIdentityCopyPreferredPtr.asFunction< + SecIdentityRef Function(CFStringRef, CFArrayRef, CFArrayRef)>(); - CFTreeRef CFTreeGetFirstChild( - CFTreeRef tree, + int SecIdentitySetPreference( + SecIdentityRef identity, + CFStringRef name, + int keyUsage, ) { - return _CFTreeGetFirstChild( - tree, + return _SecIdentitySetPreference( + identity, + name, + keyUsage, ); } - late final _CFTreeGetFirstChildPtr = - _lookup>( - 'CFTreeGetFirstChild'); - late final _CFTreeGetFirstChild = - _CFTreeGetFirstChildPtr.asFunction(); + late final _SecIdentitySetPreferencePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SecIdentityRef, CFStringRef, + CSSM_KEYUSE)>>('SecIdentitySetPreference'); + late final _SecIdentitySetPreference = _SecIdentitySetPreferencePtr + .asFunction(); - void CFTreeGetContext( - CFTreeRef tree, - ffi.Pointer context, + int SecIdentitySetPreferred( + SecIdentityRef identity, + CFStringRef name, + CFArrayRef keyUsage, ) { - return _CFTreeGetContext( - tree, - context, + return _SecIdentitySetPreferred( + identity, + name, + keyUsage, ); } - late final _CFTreeGetContextPtr = _lookup< + late final _SecIdentitySetPreferredPtr = _lookup< ffi.NativeFunction< - ffi.Void Function( - CFTreeRef, ffi.Pointer)>>('CFTreeGetContext'); - late final _CFTreeGetContext = _CFTreeGetContextPtr.asFunction< - void Function(CFTreeRef, ffi.Pointer)>(); + OSStatus Function(SecIdentityRef, CFStringRef, + CFArrayRef)>>('SecIdentitySetPreferred'); + late final _SecIdentitySetPreferred = _SecIdentitySetPreferredPtr.asFunction< + int Function(SecIdentityRef, CFStringRef, CFArrayRef)>(); - int CFTreeGetChildCount( - CFTreeRef tree, + int SecIdentityCopySystemIdentity( + CFStringRef domain, + ffi.Pointer idRef, + ffi.Pointer actualDomain, ) { - return _CFTreeGetChildCount( - tree, + return _SecIdentityCopySystemIdentity( + domain, + idRef, + actualDomain, ); } - late final _CFTreeGetChildCountPtr = - _lookup>( - 'CFTreeGetChildCount'); - late final _CFTreeGetChildCount = - _CFTreeGetChildCountPtr.asFunction(); + late final _SecIdentityCopySystemIdentityPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>>('SecIdentityCopySystemIdentity'); + late final _SecIdentityCopySystemIdentity = + _SecIdentityCopySystemIdentityPtr.asFunction< + int Function(CFStringRef, ffi.Pointer, + ffi.Pointer)>(); - CFTreeRef CFTreeGetChildAtIndex( - CFTreeRef tree, - int idx, + int SecIdentitySetSystemIdentity( + CFStringRef domain, + SecIdentityRef idRef, ) { - return _CFTreeGetChildAtIndex( - tree, - idx, + return _SecIdentitySetSystemIdentity( + domain, + idRef, ); } - late final _CFTreeGetChildAtIndexPtr = - _lookup>( - 'CFTreeGetChildAtIndex'); - late final _CFTreeGetChildAtIndex = _CFTreeGetChildAtIndexPtr.asFunction< - CFTreeRef Function(CFTreeRef, int)>(); + late final _SecIdentitySetSystemIdentityPtr = _lookup< + ffi.NativeFunction>( + 'SecIdentitySetSystemIdentity'); + late final _SecIdentitySetSystemIdentity = _SecIdentitySetSystemIdentityPtr + .asFunction(); - void CFTreeGetChildren( - CFTreeRef tree, - ffi.Pointer children, + late final ffi.Pointer _kSecIdentityDomainDefault = + _lookup('kSecIdentityDomainDefault'); + + CFStringRef get kSecIdentityDomainDefault => _kSecIdentityDomainDefault.value; + + set kSecIdentityDomainDefault(CFStringRef value) => + _kSecIdentityDomainDefault.value = value; + + late final ffi.Pointer _kSecIdentityDomainKerberosKDC = + _lookup('kSecIdentityDomainKerberosKDC'); + + CFStringRef get kSecIdentityDomainKerberosKDC => + _kSecIdentityDomainKerberosKDC.value; + + set kSecIdentityDomainKerberosKDC(CFStringRef value) => + _kSecIdentityDomainKerberosKDC.value = value; + + Dartsec_trust_t sec_trust_create( + SecTrustRef trust, ) { - return _CFTreeGetChildren( - tree, - children, - ); + return objc.NSObject.castFromPointer( + _sec_trust_create( + trust, + ), + retain: false, + release: true); } - late final _CFTreeGetChildrenPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFTreeRef, ffi.Pointer)>>('CFTreeGetChildren'); - late final _CFTreeGetChildren = _CFTreeGetChildrenPtr.asFunction< - void Function(CFTreeRef, ffi.Pointer)>(); + late final _sec_trust_createPtr = + _lookup>( + 'sec_trust_create'); + late final _sec_trust_create = + _sec_trust_createPtr.asFunction(); - void CFTreeApplyFunctionToChildren( - CFTreeRef tree, - CFTreeApplierFunction applier, - ffi.Pointer context, + SecTrustRef sec_trust_copy_ref( + Dartsec_trust_t trust, ) { - return _CFTreeApplyFunctionToChildren( - tree, - applier, - context, + return _sec_trust_copy_ref( + trust.ref.pointer, ); } - late final _CFTreeApplyFunctionToChildrenPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFTreeRef, CFTreeApplierFunction, - ffi.Pointer)>>('CFTreeApplyFunctionToChildren'); - late final _CFTreeApplyFunctionToChildren = - _CFTreeApplyFunctionToChildrenPtr.asFunction< - void Function( - CFTreeRef, CFTreeApplierFunction, ffi.Pointer)>(); + late final _sec_trust_copy_refPtr = + _lookup>( + 'sec_trust_copy_ref'); + late final _sec_trust_copy_ref = + _sec_trust_copy_refPtr.asFunction(); - CFTreeRef CFTreeFindRoot( - CFTreeRef tree, + Dartsec_identity_t sec_identity_create( + SecIdentityRef identity, ) { - return _CFTreeFindRoot( - tree, - ); + return objc.NSObject.castFromPointer( + _sec_identity_create( + identity, + ), + retain: false, + release: true); } - late final _CFTreeFindRootPtr = - _lookup>( - 'CFTreeFindRoot'); - late final _CFTreeFindRoot = - _CFTreeFindRootPtr.asFunction(); + late final _sec_identity_createPtr = + _lookup>( + 'sec_identity_create'); + late final _sec_identity_create = _sec_identity_createPtr + .asFunction(); - void CFTreeSetContext( - CFTreeRef tree, - ffi.Pointer context, + Dartsec_identity_t sec_identity_create_with_certificates( + SecIdentityRef identity, + CFArrayRef certificates, ) { - return _CFTreeSetContext( - tree, - context, - ); + return objc.NSObject.castFromPointer( + _sec_identity_create_with_certificates( + identity, + certificates, + ), + retain: false, + release: true); } - late final _CFTreeSetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFTreeRef, ffi.Pointer)>>('CFTreeSetContext'); - late final _CFTreeSetContext = _CFTreeSetContextPtr.asFunction< - void Function(CFTreeRef, ffi.Pointer)>(); + late final _sec_identity_create_with_certificatesPtr = _lookup< + ffi + .NativeFunction>( + 'sec_identity_create_with_certificates'); + late final _sec_identity_create_with_certificates = + _sec_identity_create_with_certificatesPtr + .asFunction(); - void CFTreePrependChild( - CFTreeRef tree, - CFTreeRef newChild, + bool sec_identity_access_certificates( + Dartsec_identity_t identity, + objc.ObjCBlock handler, ) { - return _CFTreePrependChild( - tree, - newChild, + return _sec_identity_access_certificates( + identity.ref.pointer, + handler.ref.pointer, ); } - late final _CFTreePrependChildPtr = - _lookup>( - 'CFTreePrependChild'); - late final _CFTreePrependChild = - _CFTreePrependChildPtr.asFunction(); + late final _sec_identity_access_certificatesPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_identity_t, ffi.Pointer)>>( + 'sec_identity_access_certificates'); + late final _sec_identity_access_certificates = + _sec_identity_access_certificatesPtr.asFunction< + bool Function(sec_identity_t, ffi.Pointer)>(); - void CFTreeAppendChild( - CFTreeRef tree, - CFTreeRef newChild, + SecIdentityRef sec_identity_copy_ref( + Dartsec_identity_t identity, ) { - return _CFTreeAppendChild( - tree, - newChild, + return _sec_identity_copy_ref( + identity.ref.pointer, ); } - late final _CFTreeAppendChildPtr = - _lookup>( - 'CFTreeAppendChild'); - late final _CFTreeAppendChild = - _CFTreeAppendChildPtr.asFunction(); + late final _sec_identity_copy_refPtr = + _lookup>( + 'sec_identity_copy_ref'); + late final _sec_identity_copy_ref = _sec_identity_copy_refPtr + .asFunction(); - void CFTreeInsertSibling( - CFTreeRef tree, - CFTreeRef newSibling, + CFArrayRef sec_identity_copy_certificates_ref( + Dartsec_identity_t identity, ) { - return _CFTreeInsertSibling( - tree, - newSibling, + return _sec_identity_copy_certificates_ref( + identity.ref.pointer, ); } - late final _CFTreeInsertSiblingPtr = - _lookup>( - 'CFTreeInsertSibling'); - late final _CFTreeInsertSibling = - _CFTreeInsertSiblingPtr.asFunction(); + late final _sec_identity_copy_certificates_refPtr = + _lookup>( + 'sec_identity_copy_certificates_ref'); + late final _sec_identity_copy_certificates_ref = + _sec_identity_copy_certificates_refPtr + .asFunction(); - void CFTreeRemove( - CFTreeRef tree, + Dartsec_certificate_t sec_certificate_create( + SecCertificateRef certificate, ) { - return _CFTreeRemove( - tree, - ); + return objc.NSObject.castFromPointer( + _sec_certificate_create( + certificate, + ), + retain: false, + release: true); } - late final _CFTreeRemovePtr = - _lookup>('CFTreeRemove'); - late final _CFTreeRemove = - _CFTreeRemovePtr.asFunction(); + late final _sec_certificate_createPtr = _lookup< + ffi.NativeFunction>( + 'sec_certificate_create'); + late final _sec_certificate_create = _sec_certificate_createPtr + .asFunction(); - void CFTreeRemoveAllChildren( - CFTreeRef tree, + SecCertificateRef sec_certificate_copy_ref( + Dartsec_certificate_t certificate, ) { - return _CFTreeRemoveAllChildren( - tree, + return _sec_certificate_copy_ref( + certificate.ref.pointer, ); } - late final _CFTreeRemoveAllChildrenPtr = - _lookup>( - 'CFTreeRemoveAllChildren'); - late final _CFTreeRemoveAllChildren = - _CFTreeRemoveAllChildrenPtr.asFunction(); + late final _sec_certificate_copy_refPtr = _lookup< + ffi.NativeFunction>( + 'sec_certificate_copy_ref'); + late final _sec_certificate_copy_ref = _sec_certificate_copy_refPtr + .asFunction(); - void CFTreeSortChildren( - CFTreeRef tree, - CFComparatorFunction comparator, - ffi.Pointer context, + ffi.Pointer sec_protocol_metadata_get_negotiated_protocol( + Dartsec_protocol_metadata_t metadata, ) { - return _CFTreeSortChildren( - tree, - comparator, - context, + return _sec_protocol_metadata_get_negotiated_protocol( + metadata.ref.pointer, ); } - late final _CFTreeSortChildrenPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFTreeRef, CFComparatorFunction, - ffi.Pointer)>>('CFTreeSortChildren'); - late final _CFTreeSortChildren = _CFTreeSortChildrenPtr.asFunction< - void Function(CFTreeRef, CFComparatorFunction, ffi.Pointer)>(); + late final _sec_protocol_metadata_get_negotiated_protocolPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_get_negotiated_protocol'); + late final _sec_protocol_metadata_get_negotiated_protocol = + _sec_protocol_metadata_get_negotiated_protocolPtr.asFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>(); - int CFURLCreateDataAndPropertiesFromResource( - CFAllocatorRef alloc, - CFURLRef url, - ffi.Pointer resourceData, - ffi.Pointer properties, - CFArrayRef desiredProperties, - ffi.Pointer errorCode, + Dartdispatch_data_t sec_protocol_metadata_copy_peer_public_key( + Dartsec_protocol_metadata_t metadata, ) { - return _CFURLCreateDataAndPropertiesFromResource( - alloc, - url, - resourceData, - properties, - desiredProperties, - errorCode, - ); + return objc.NSObject.castFromPointer( + _sec_protocol_metadata_copy_peer_public_key( + metadata.ref.pointer, + ), + retain: false, + release: true); } - late final _CFURLCreateDataAndPropertiesFromResourcePtr = _lookup< - ffi.NativeFunction< - Boolean Function( - CFAllocatorRef, - CFURLRef, - ffi.Pointer, - ffi.Pointer, - CFArrayRef, - ffi.Pointer)>>( - 'CFURLCreateDataAndPropertiesFromResource'); - late final _CFURLCreateDataAndPropertiesFromResource = - _CFURLCreateDataAndPropertiesFromResourcePtr.asFunction< - int Function(CFAllocatorRef, CFURLRef, ffi.Pointer, - ffi.Pointer, CFArrayRef, ffi.Pointer)>(); + late final _sec_protocol_metadata_copy_peer_public_keyPtr = _lookup< + ffi + .NativeFunction>( + 'sec_protocol_metadata_copy_peer_public_key'); + late final _sec_protocol_metadata_copy_peer_public_key = + _sec_protocol_metadata_copy_peer_public_keyPtr + .asFunction(); - int CFURLWriteDataAndPropertiesToResource( - CFURLRef url, - CFDataRef dataToWrite, - CFDictionaryRef propertiesToWrite, - ffi.Pointer errorCode, + tls_protocol_version_t + sec_protocol_metadata_get_negotiated_tls_protocol_version( + Dartsec_protocol_metadata_t metadata, ) { - return _CFURLWriteDataAndPropertiesToResource( - url, - dataToWrite, - propertiesToWrite, - errorCode, - ); + return tls_protocol_version_t + .fromValue(_sec_protocol_metadata_get_negotiated_tls_protocol_version( + metadata.ref.pointer, + )); } - late final _CFURLWriteDataAndPropertiesToResourcePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, CFDataRef, CFDictionaryRef, - ffi.Pointer)>>('CFURLWriteDataAndPropertiesToResource'); - late final _CFURLWriteDataAndPropertiesToResource = - _CFURLWriteDataAndPropertiesToResourcePtr.asFunction< - int Function( - CFURLRef, CFDataRef, CFDictionaryRef, ffi.Pointer)>(); + late final _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr = + _lookup>( + 'sec_protocol_metadata_get_negotiated_tls_protocol_version'); + late final _sec_protocol_metadata_get_negotiated_tls_protocol_version = + _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr + .asFunction(); - int CFURLDestroyResource( - CFURLRef url, - ffi.Pointer errorCode, + SSLProtocol sec_protocol_metadata_get_negotiated_protocol_version( + Dartsec_protocol_metadata_t metadata, ) { - return _CFURLDestroyResource( - url, - errorCode, - ); + return SSLProtocol.fromValue( + _sec_protocol_metadata_get_negotiated_protocol_version( + metadata.ref.pointer, + )); } - late final _CFURLDestroyResourcePtr = _lookup< - ffi.NativeFunction)>>( - 'CFURLDestroyResource'); - late final _CFURLDestroyResource = _CFURLDestroyResourcePtr.asFunction< - int Function(CFURLRef, ffi.Pointer)>(); + late final _sec_protocol_metadata_get_negotiated_protocol_versionPtr = + _lookup< + ffi.NativeFunction< + ffi.UnsignedInt Function(sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_get_negotiated_protocol_version'); + late final _sec_protocol_metadata_get_negotiated_protocol_version = + _sec_protocol_metadata_get_negotiated_protocol_versionPtr + .asFunction(); - CFTypeRef CFURLCreatePropertyFromResource( - CFAllocatorRef alloc, - CFURLRef url, - CFStringRef property, - ffi.Pointer errorCode, + tls_ciphersuite_t sec_protocol_metadata_get_negotiated_tls_ciphersuite( + Dartsec_protocol_metadata_t metadata, ) { - return _CFURLCreatePropertyFromResource( - alloc, - url, - property, - errorCode, - ); + return tls_ciphersuite_t + .fromValue(_sec_protocol_metadata_get_negotiated_tls_ciphersuite( + metadata.ref.pointer, + )); } - late final _CFURLCreatePropertyFromResourcePtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFAllocatorRef, CFURLRef, CFStringRef, - ffi.Pointer)>>('CFURLCreatePropertyFromResource'); - late final _CFURLCreatePropertyFromResource = - _CFURLCreatePropertyFromResourcePtr.asFunction< - CFTypeRef Function( - CFAllocatorRef, CFURLRef, CFStringRef, ffi.Pointer)>(); + late final _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr = + _lookup>( + 'sec_protocol_metadata_get_negotiated_tls_ciphersuite'); + late final _sec_protocol_metadata_get_negotiated_tls_ciphersuite = + _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr + .asFunction(); - late final ffi.Pointer _kCFURLFileExists = - _lookup('kCFURLFileExists'); + DartSSLCipherSuite sec_protocol_metadata_get_negotiated_ciphersuite( + Dartsec_protocol_metadata_t metadata, + ) { + return _sec_protocol_metadata_get_negotiated_ciphersuite( + metadata.ref.pointer, + ); + } - CFStringRef get kCFURLFileExists => _kCFURLFileExists.value; + late final _sec_protocol_metadata_get_negotiated_ciphersuitePtr = _lookup< + ffi.NativeFunction>( + 'sec_protocol_metadata_get_negotiated_ciphersuite'); + late final _sec_protocol_metadata_get_negotiated_ciphersuite = + _sec_protocol_metadata_get_negotiated_ciphersuitePtr + .asFunction(); - late final ffi.Pointer _kCFURLFileDirectoryContents = - _lookup('kCFURLFileDirectoryContents'); + bool sec_protocol_metadata_get_early_data_accepted( + Dartsec_protocol_metadata_t metadata, + ) { + return _sec_protocol_metadata_get_early_data_accepted( + metadata.ref.pointer, + ); + } - CFStringRef get kCFURLFileDirectoryContents => - _kCFURLFileDirectoryContents.value; + late final _sec_protocol_metadata_get_early_data_acceptedPtr = + _lookup>( + 'sec_protocol_metadata_get_early_data_accepted'); + late final _sec_protocol_metadata_get_early_data_accepted = + _sec_protocol_metadata_get_early_data_acceptedPtr + .asFunction(); - late final ffi.Pointer _kCFURLFileLength = - _lookup('kCFURLFileLength'); + bool sec_protocol_metadata_access_peer_certificate_chain( + Dartsec_protocol_metadata_t metadata, + objc.ObjCBlock handler, + ) { + return _sec_protocol_metadata_access_peer_certificate_chain( + metadata.ref.pointer, + handler.ref.pointer, + ); + } - CFStringRef get kCFURLFileLength => _kCFURLFileLength.value; + late final _sec_protocol_metadata_access_peer_certificate_chainPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer)>>( + 'sec_protocol_metadata_access_peer_certificate_chain'); + late final _sec_protocol_metadata_access_peer_certificate_chain = + _sec_protocol_metadata_access_peer_certificate_chainPtr.asFunction< + bool Function( + sec_protocol_metadata_t, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLFileLastModificationTime = - _lookup('kCFURLFileLastModificationTime'); + bool sec_protocol_metadata_access_ocsp_response( + Dartsec_protocol_metadata_t metadata, + objc.ObjCBlock handler, + ) { + return _sec_protocol_metadata_access_ocsp_response( + metadata.ref.pointer, + handler.ref.pointer, + ); + } - CFStringRef get kCFURLFileLastModificationTime => - _kCFURLFileLastModificationTime.value; + late final _sec_protocol_metadata_access_ocsp_responsePtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer)>>( + 'sec_protocol_metadata_access_ocsp_response'); + late final _sec_protocol_metadata_access_ocsp_response = + _sec_protocol_metadata_access_ocsp_responsePtr.asFunction< + bool Function( + sec_protocol_metadata_t, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLFilePOSIXMode = - _lookup('kCFURLFilePOSIXMode'); + bool sec_protocol_metadata_access_supported_signature_algorithms( + Dartsec_protocol_metadata_t metadata, + objc.ObjCBlock handler, + ) { + return _sec_protocol_metadata_access_supported_signature_algorithms( + metadata.ref.pointer, + handler.ref.pointer, + ); + } - CFStringRef get kCFURLFilePOSIXMode => _kCFURLFilePOSIXMode.value; + late final _sec_protocol_metadata_access_supported_signature_algorithmsPtr = + _lookup< + ffi.NativeFunction< + ffi.Bool Function(sec_protocol_metadata_t, + ffi.Pointer)>>( + 'sec_protocol_metadata_access_supported_signature_algorithms'); + late final _sec_protocol_metadata_access_supported_signature_algorithms = + _sec_protocol_metadata_access_supported_signature_algorithmsPtr + .asFunction< + bool Function( + sec_protocol_metadata_t, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLFileOwnerID = - _lookup('kCFURLFileOwnerID'); + bool sec_protocol_metadata_access_distinguished_names( + Dartsec_protocol_metadata_t metadata, + objc.ObjCBlock handler, + ) { + return _sec_protocol_metadata_access_distinguished_names( + metadata.ref.pointer, + handler.ref.pointer, + ); + } - CFStringRef get kCFURLFileOwnerID => _kCFURLFileOwnerID.value; + late final _sec_protocol_metadata_access_distinguished_namesPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer)>>( + 'sec_protocol_metadata_access_distinguished_names'); + late final _sec_protocol_metadata_access_distinguished_names = + _sec_protocol_metadata_access_distinguished_namesPtr.asFunction< + bool Function( + sec_protocol_metadata_t, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLHTTPStatusCode = - _lookup('kCFURLHTTPStatusCode'); + bool sec_protocol_metadata_access_pre_shared_keys( + Dartsec_protocol_metadata_t metadata, + objc.ObjCBlock handler, + ) { + return _sec_protocol_metadata_access_pre_shared_keys( + metadata.ref.pointer, + handler.ref.pointer, + ); + } - CFStringRef get kCFURLHTTPStatusCode => _kCFURLHTTPStatusCode.value; + late final _sec_protocol_metadata_access_pre_shared_keysPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, ffi.Pointer)>>( + 'sec_protocol_metadata_access_pre_shared_keys'); + late final _sec_protocol_metadata_access_pre_shared_keys = + _sec_protocol_metadata_access_pre_shared_keysPtr.asFunction< + bool Function( + sec_protocol_metadata_t, ffi.Pointer)>(); - late final ffi.Pointer _kCFURLHTTPStatusLine = - _lookup('kCFURLHTTPStatusLine'); + ffi.Pointer sec_protocol_metadata_get_server_name( + Dartsec_protocol_metadata_t metadata, + ) { + return _sec_protocol_metadata_get_server_name( + metadata.ref.pointer, + ); + } - CFStringRef get kCFURLHTTPStatusLine => _kCFURLHTTPStatusLine.value; + late final _sec_protocol_metadata_get_server_namePtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_get_server_name'); + late final _sec_protocol_metadata_get_server_name = + _sec_protocol_metadata_get_server_namePtr.asFunction< + ffi.Pointer Function(sec_protocol_metadata_t)>(); - int CFUUIDGetTypeID() { - return _CFUUIDGetTypeID(); + bool sec_protocol_metadata_peers_are_equal( + Dartsec_protocol_metadata_t metadataA, + Dartsec_protocol_metadata_t metadataB, + ) { + return _sec_protocol_metadata_peers_are_equal( + metadataA.ref.pointer, + metadataB.ref.pointer, + ); } - late final _CFUUIDGetTypeIDPtr = - _lookup>('CFUUIDGetTypeID'); - late final _CFUUIDGetTypeID = - _CFUUIDGetTypeIDPtr.asFunction(); + late final _sec_protocol_metadata_peers_are_equalPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_peers_are_equal'); + late final _sec_protocol_metadata_peers_are_equal = + _sec_protocol_metadata_peers_are_equalPtr.asFunction< + bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); - CFUUIDRef CFUUIDCreate( - CFAllocatorRef alloc, + bool sec_protocol_metadata_challenge_parameters_are_equal( + Dartsec_protocol_metadata_t metadataA, + Dartsec_protocol_metadata_t metadataB, ) { - return _CFUUIDCreate( - alloc, + return _sec_protocol_metadata_challenge_parameters_are_equal( + metadataA.ref.pointer, + metadataB.ref.pointer, ); } - late final _CFUUIDCreatePtr = - _lookup>( - 'CFUUIDCreate'); - late final _CFUUIDCreate = - _CFUUIDCreatePtr.asFunction(); + late final _sec_protocol_metadata_challenge_parameters_are_equalPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function( + sec_protocol_metadata_t, sec_protocol_metadata_t)>>( + 'sec_protocol_metadata_challenge_parameters_are_equal'); + late final _sec_protocol_metadata_challenge_parameters_are_equal = + _sec_protocol_metadata_challenge_parameters_are_equalPtr.asFunction< + bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); - CFUUIDRef CFUUIDCreateWithBytes( - CFAllocatorRef alloc, - int byte0, - int byte1, - int byte2, - int byte3, - int byte4, - int byte5, - int byte6, - int byte7, - int byte8, - int byte9, - int byte10, - int byte11, - int byte12, - int byte13, - int byte14, - int byte15, + Dartdispatch_data_t sec_protocol_metadata_create_secret( + Dartsec_protocol_metadata_t metadata, + int label_len, + ffi.Pointer label, + int exporter_length, ) { - return _CFUUIDCreateWithBytes( - alloc, - byte0, - byte1, - byte2, - byte3, - byte4, - byte5, - byte6, - byte7, - byte8, - byte9, - byte10, - byte11, - byte12, - byte13, - byte14, - byte15, - ); + return objc.NSObject.castFromPointer( + _sec_protocol_metadata_create_secret( + metadata.ref.pointer, + label_len, + label, + exporter_length, + ), + retain: false, + release: true); } - late final _CFUUIDCreateWithBytesPtr = _lookup< + late final _sec_protocol_metadata_create_secretPtr = _lookup< ffi.NativeFunction< - CFUUIDRef Function( - CFAllocatorRef, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8)>>('CFUUIDCreateWithBytes'); - late final _CFUUIDCreateWithBytes = _CFUUIDCreateWithBytesPtr.asFunction< - CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int)>(); + dispatch_data_t Function( + sec_protocol_metadata_t, + ffi.Size, + ffi.Pointer, + ffi.Size)>>('sec_protocol_metadata_create_secret'); + late final _sec_protocol_metadata_create_secret = + _sec_protocol_metadata_create_secretPtr.asFunction< + dispatch_data_t Function( + sec_protocol_metadata_t, int, ffi.Pointer, int)>(); - CFUUIDRef CFUUIDCreateFromString( - CFAllocatorRef alloc, - CFStringRef uuidStr, + Dartdispatch_data_t sec_protocol_metadata_create_secret_with_context( + Dartsec_protocol_metadata_t metadata, + int label_len, + ffi.Pointer label, + int context_len, + ffi.Pointer context, + int exporter_length, ) { - return _CFUUIDCreateFromString( - alloc, - uuidStr, - ); + return objc.NSObject.castFromPointer( + _sec_protocol_metadata_create_secret_with_context( + metadata.ref.pointer, + label_len, + label, + context_len, + context, + exporter_length, + ), + retain: false, + release: true); } - late final _CFUUIDCreateFromStringPtr = _lookup< - ffi.NativeFunction>( - 'CFUUIDCreateFromString'); - late final _CFUUIDCreateFromString = _CFUUIDCreateFromStringPtr.asFunction< - CFUUIDRef Function(CFAllocatorRef, CFStringRef)>(); + late final _sec_protocol_metadata_create_secret_with_contextPtr = _lookup< + ffi.NativeFunction< + dispatch_data_t Function( + sec_protocol_metadata_t, + ffi.Size, + ffi.Pointer, + ffi.Size, + ffi.Pointer, + ffi.Size)>>('sec_protocol_metadata_create_secret_with_context'); + late final _sec_protocol_metadata_create_secret_with_context = + _sec_protocol_metadata_create_secret_with_contextPtr.asFunction< + dispatch_data_t Function(sec_protocol_metadata_t, int, + ffi.Pointer, int, ffi.Pointer, int)>(); - CFStringRef CFUUIDCreateString( - CFAllocatorRef alloc, - CFUUIDRef uuid, + bool sec_protocol_options_are_equal( + Dartsec_protocol_options_t optionsA, + Dartsec_protocol_options_t optionsB, ) { - return _CFUUIDCreateString( - alloc, - uuid, + return _sec_protocol_options_are_equal( + optionsA.ref.pointer, + optionsB.ref.pointer, ); } - late final _CFUUIDCreateStringPtr = _lookup< - ffi.NativeFunction>( - 'CFUUIDCreateString'); - late final _CFUUIDCreateString = _CFUUIDCreateStringPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFUUIDRef)>(); + late final _sec_protocol_options_are_equalPtr = _lookup< + ffi.NativeFunction< + ffi.Bool Function(sec_protocol_options_t, + sec_protocol_options_t)>>('sec_protocol_options_are_equal'); + late final _sec_protocol_options_are_equal = + _sec_protocol_options_are_equalPtr.asFunction< + bool Function(sec_protocol_options_t, sec_protocol_options_t)>(); - CFUUIDRef CFUUIDGetConstantUUIDWithBytes( - CFAllocatorRef alloc, - int byte0, - int byte1, - int byte2, - int byte3, - int byte4, - int byte5, - int byte6, - int byte7, - int byte8, - int byte9, - int byte10, - int byte11, - int byte12, - int byte13, - int byte14, - int byte15, + void sec_protocol_options_set_local_identity( + Dartsec_protocol_options_t options, + Dartsec_identity_t identity, ) { - return _CFUUIDGetConstantUUIDWithBytes( - alloc, - byte0, - byte1, - byte2, - byte3, - byte4, - byte5, - byte6, - byte7, - byte8, - byte9, - byte10, - byte11, - byte12, - byte13, - byte14, - byte15, + return _sec_protocol_options_set_local_identity( + options.ref.pointer, + identity.ref.pointer, ); } - late final _CFUUIDGetConstantUUIDWithBytesPtr = _lookup< + late final _sec_protocol_options_set_local_identityPtr = _lookup< ffi.NativeFunction< - CFUUIDRef Function( - CFAllocatorRef, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8, - UInt8)>>('CFUUIDGetConstantUUIDWithBytes'); - late final _CFUUIDGetConstantUUIDWithBytes = - _CFUUIDGetConstantUUIDWithBytesPtr.asFunction< - CFUUIDRef Function(CFAllocatorRef, int, int, int, int, int, int, int, - int, int, int, int, int, int, int, int, int)>(); + ffi.Void Function(sec_protocol_options_t, + sec_identity_t)>>('sec_protocol_options_set_local_identity'); + late final _sec_protocol_options_set_local_identity = + _sec_protocol_options_set_local_identityPtr + .asFunction(); - CFUUIDBytes CFUUIDGetUUIDBytes( - CFUUIDRef uuid, + void sec_protocol_options_append_tls_ciphersuite( + Dartsec_protocol_options_t options, + tls_ciphersuite_t ciphersuite, ) { - return _CFUUIDGetUUIDBytes( - uuid, + return _sec_protocol_options_append_tls_ciphersuite( + options.ref.pointer, + ciphersuite.value, ); } - late final _CFUUIDGetUUIDBytesPtr = - _lookup>( - 'CFUUIDGetUUIDBytes'); - late final _CFUUIDGetUUIDBytes = - _CFUUIDGetUUIDBytesPtr.asFunction(); + late final _sec_protocol_options_append_tls_ciphersuitePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.Uint16)>>('sec_protocol_options_append_tls_ciphersuite'); + late final _sec_protocol_options_append_tls_ciphersuite = + _sec_protocol_options_append_tls_ciphersuitePtr + .asFunction(); - CFUUIDRef CFUUIDCreateFromUUIDBytes( - CFAllocatorRef alloc, - CFUUIDBytes bytes, + void sec_protocol_options_add_tls_ciphersuite( + Dartsec_protocol_options_t options, + DartSSLCipherSuite ciphersuite, ) { - return _CFUUIDCreateFromUUIDBytes( - alloc, - bytes, + return _sec_protocol_options_add_tls_ciphersuite( + options.ref.pointer, + ciphersuite, ); } - late final _CFUUIDCreateFromUUIDBytesPtr = _lookup< - ffi.NativeFunction>( - 'CFUUIDCreateFromUUIDBytes'); - late final _CFUUIDCreateFromUUIDBytes = _CFUUIDCreateFromUUIDBytesPtr - .asFunction(); + late final _sec_protocol_options_add_tls_ciphersuitePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + SSLCipherSuite)>>('sec_protocol_options_add_tls_ciphersuite'); + late final _sec_protocol_options_add_tls_ciphersuite = + _sec_protocol_options_add_tls_ciphersuitePtr + .asFunction(); - CFURLRef CFCopyHomeDirectoryURL() { - return _CFCopyHomeDirectoryURL(); + void sec_protocol_options_append_tls_ciphersuite_group( + Dartsec_protocol_options_t options, + tls_ciphersuite_group_t group, + ) { + return _sec_protocol_options_append_tls_ciphersuite_group( + options.ref.pointer, + group.value, + ); } - late final _CFCopyHomeDirectoryURLPtr = - _lookup>( - 'CFCopyHomeDirectoryURL'); - late final _CFCopyHomeDirectoryURL = - _CFCopyHomeDirectoryURLPtr.asFunction(); - - late final ffi.Pointer _kCFBundleInfoDictionaryVersionKey = - _lookup('kCFBundleInfoDictionaryVersionKey'); + late final _sec_protocol_options_append_tls_ciphersuite_groupPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Uint16)>>( + 'sec_protocol_options_append_tls_ciphersuite_group'); + late final _sec_protocol_options_append_tls_ciphersuite_group = + _sec_protocol_options_append_tls_ciphersuite_groupPtr + .asFunction(); - CFStringRef get kCFBundleInfoDictionaryVersionKey => - _kCFBundleInfoDictionaryVersionKey.value; + void sec_protocol_options_add_tls_ciphersuite_group( + Dartsec_protocol_options_t options, + SSLCiphersuiteGroup group, + ) { + return _sec_protocol_options_add_tls_ciphersuite_group( + options.ref.pointer, + group.value, + ); + } - late final ffi.Pointer _kCFBundleExecutableKey = - _lookup('kCFBundleExecutableKey'); + late final _sec_protocol_options_add_tls_ciphersuite_groupPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.UnsignedInt)>>( + 'sec_protocol_options_add_tls_ciphersuite_group'); + late final _sec_protocol_options_add_tls_ciphersuite_group = + _sec_protocol_options_add_tls_ciphersuite_groupPtr + .asFunction(); - CFStringRef get kCFBundleExecutableKey => _kCFBundleExecutableKey.value; + void sec_protocol_options_set_tls_min_version( + Dartsec_protocol_options_t options, + SSLProtocol version, + ) { + return _sec_protocol_options_set_tls_min_version( + options.ref.pointer, + version.value, + ); + } - late final ffi.Pointer _kCFBundleIdentifierKey = - _lookup('kCFBundleIdentifierKey'); + late final _sec_protocol_options_set_tls_min_versionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.UnsignedInt)>>('sec_protocol_options_set_tls_min_version'); + late final _sec_protocol_options_set_tls_min_version = + _sec_protocol_options_set_tls_min_versionPtr + .asFunction(); - CFStringRef get kCFBundleIdentifierKey => _kCFBundleIdentifierKey.value; + void sec_protocol_options_set_min_tls_protocol_version( + Dartsec_protocol_options_t options, + tls_protocol_version_t version, + ) { + return _sec_protocol_options_set_min_tls_protocol_version( + options.ref.pointer, + version.value, + ); + } - late final ffi.Pointer _kCFBundleVersionKey = - _lookup('kCFBundleVersionKey'); + late final _sec_protocol_options_set_min_tls_protocol_versionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Uint16)>>( + 'sec_protocol_options_set_min_tls_protocol_version'); + late final _sec_protocol_options_set_min_tls_protocol_version = + _sec_protocol_options_set_min_tls_protocol_versionPtr + .asFunction(); - CFStringRef get kCFBundleVersionKey => _kCFBundleVersionKey.value; + tls_protocol_version_t + sec_protocol_options_get_default_min_tls_protocol_version() { + return tls_protocol_version_t.fromValue( + _sec_protocol_options_get_default_min_tls_protocol_version()); + } - late final ffi.Pointer _kCFBundleDevelopmentRegionKey = - _lookup('kCFBundleDevelopmentRegionKey'); + late final _sec_protocol_options_get_default_min_tls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_min_tls_protocol_version'); + late final _sec_protocol_options_get_default_min_tls_protocol_version = + _sec_protocol_options_get_default_min_tls_protocol_versionPtr + .asFunction(); - CFStringRef get kCFBundleDevelopmentRegionKey => - _kCFBundleDevelopmentRegionKey.value; + tls_protocol_version_t + sec_protocol_options_get_default_min_dtls_protocol_version() { + return tls_protocol_version_t.fromValue( + _sec_protocol_options_get_default_min_dtls_protocol_version()); + } - late final ffi.Pointer _kCFBundleNameKey = - _lookup('kCFBundleNameKey'); - - CFStringRef get kCFBundleNameKey => _kCFBundleNameKey.value; - - late final ffi.Pointer _kCFBundleLocalizationsKey = - _lookup('kCFBundleLocalizationsKey'); - - CFStringRef get kCFBundleLocalizationsKey => _kCFBundleLocalizationsKey.value; + late final _sec_protocol_options_get_default_min_dtls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_min_dtls_protocol_version'); + late final _sec_protocol_options_get_default_min_dtls_protocol_version = + _sec_protocol_options_get_default_min_dtls_protocol_versionPtr + .asFunction(); - CFBundleRef CFBundleGetMainBundle() { - return _CFBundleGetMainBundle(); + void sec_protocol_options_set_tls_max_version( + Dartsec_protocol_options_t options, + SSLProtocol version, + ) { + return _sec_protocol_options_set_tls_max_version( + options.ref.pointer, + version.value, + ); } - late final _CFBundleGetMainBundlePtr = - _lookup>( - 'CFBundleGetMainBundle'); - late final _CFBundleGetMainBundle = - _CFBundleGetMainBundlePtr.asFunction(); + late final _sec_protocol_options_set_tls_max_versionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, + ffi.UnsignedInt)>>('sec_protocol_options_set_tls_max_version'); + late final _sec_protocol_options_set_tls_max_version = + _sec_protocol_options_set_tls_max_versionPtr + .asFunction(); - CFBundleRef CFBundleGetBundleWithIdentifier( - CFStringRef bundleID, + void sec_protocol_options_set_max_tls_protocol_version( + Dartsec_protocol_options_t options, + tls_protocol_version_t version, ) { - return _CFBundleGetBundleWithIdentifier( - bundleID, + return _sec_protocol_options_set_max_tls_protocol_version( + options.ref.pointer, + version.value, ); } - late final _CFBundleGetBundleWithIdentifierPtr = - _lookup>( - 'CFBundleGetBundleWithIdentifier'); - late final _CFBundleGetBundleWithIdentifier = - _CFBundleGetBundleWithIdentifierPtr.asFunction< - CFBundleRef Function(CFStringRef)>(); + late final _sec_protocol_options_set_max_tls_protocol_versionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Uint16)>>( + 'sec_protocol_options_set_max_tls_protocol_version'); + late final _sec_protocol_options_set_max_tls_protocol_version = + _sec_protocol_options_set_max_tls_protocol_versionPtr + .asFunction(); - CFArrayRef CFBundleGetAllBundles() { - return _CFBundleGetAllBundles(); + tls_protocol_version_t + sec_protocol_options_get_default_max_tls_protocol_version() { + return tls_protocol_version_t.fromValue( + _sec_protocol_options_get_default_max_tls_protocol_version()); } - late final _CFBundleGetAllBundlesPtr = - _lookup>( - 'CFBundleGetAllBundles'); - late final _CFBundleGetAllBundles = - _CFBundleGetAllBundlesPtr.asFunction(); + late final _sec_protocol_options_get_default_max_tls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_max_tls_protocol_version'); + late final _sec_protocol_options_get_default_max_tls_protocol_version = + _sec_protocol_options_get_default_max_tls_protocol_versionPtr + .asFunction(); - int CFBundleGetTypeID() { - return _CFBundleGetTypeID(); + tls_protocol_version_t + sec_protocol_options_get_default_max_dtls_protocol_version() { + return tls_protocol_version_t.fromValue( + _sec_protocol_options_get_default_max_dtls_protocol_version()); } - late final _CFBundleGetTypeIDPtr = - _lookup>('CFBundleGetTypeID'); - late final _CFBundleGetTypeID = - _CFBundleGetTypeIDPtr.asFunction(); + late final _sec_protocol_options_get_default_max_dtls_protocol_versionPtr = + _lookup>( + 'sec_protocol_options_get_default_max_dtls_protocol_version'); + late final _sec_protocol_options_get_default_max_dtls_protocol_version = + _sec_protocol_options_get_default_max_dtls_protocol_versionPtr + .asFunction(); - CFBundleRef CFBundleCreate( - CFAllocatorRef allocator, - CFURLRef bundleURL, + bool sec_protocol_options_get_enable_encrypted_client_hello( + Dartsec_protocol_options_t options, ) { - return _CFBundleCreate( - allocator, - bundleURL, + return _sec_protocol_options_get_enable_encrypted_client_hello( + options.ref.pointer, ); } - late final _CFBundleCreatePtr = _lookup< - ffi.NativeFunction>( - 'CFBundleCreate'); - late final _CFBundleCreate = _CFBundleCreatePtr.asFunction< - CFBundleRef Function(CFAllocatorRef, CFURLRef)>(); + late final _sec_protocol_options_get_enable_encrypted_client_helloPtr = + _lookup>( + 'sec_protocol_options_get_enable_encrypted_client_hello'); + late final _sec_protocol_options_get_enable_encrypted_client_hello = + _sec_protocol_options_get_enable_encrypted_client_helloPtr + .asFunction(); - CFArrayRef CFBundleCreateBundlesFromDirectory( - CFAllocatorRef allocator, - CFURLRef directoryURL, - CFStringRef bundleType, + bool sec_protocol_options_get_quic_use_legacy_codepoint( + Dartsec_protocol_options_t options, ) { - return _CFBundleCreateBundlesFromDirectory( - allocator, - directoryURL, - bundleType, + return _sec_protocol_options_get_quic_use_legacy_codepoint( + options.ref.pointer, ); } - late final _CFBundleCreateBundlesFromDirectoryPtr = _lookup< - ffi.NativeFunction< - CFArrayRef Function(CFAllocatorRef, CFURLRef, - CFStringRef)>>('CFBundleCreateBundlesFromDirectory'); - late final _CFBundleCreateBundlesFromDirectory = - _CFBundleCreateBundlesFromDirectoryPtr.asFunction< - CFArrayRef Function(CFAllocatorRef, CFURLRef, CFStringRef)>(); + late final _sec_protocol_options_get_quic_use_legacy_codepointPtr = + _lookup>( + 'sec_protocol_options_get_quic_use_legacy_codepoint'); + late final _sec_protocol_options_get_quic_use_legacy_codepoint = + _sec_protocol_options_get_quic_use_legacy_codepointPtr + .asFunction(); - CFURLRef CFBundleCopyBundleURL( - CFBundleRef bundle, + void sec_protocol_options_add_tls_application_protocol( + Dartsec_protocol_options_t options, + ffi.Pointer application_protocol, ) { - return _CFBundleCopyBundleURL( - bundle, + return _sec_protocol_options_add_tls_application_protocol( + options.ref.pointer, + application_protocol, ); } - late final _CFBundleCopyBundleURLPtr = - _lookup>( - 'CFBundleCopyBundleURL'); - late final _CFBundleCopyBundleURL = - _CFBundleCopyBundleURLPtr.asFunction(); + late final _sec_protocol_options_add_tls_application_protocolPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_options_t, ffi.Pointer)>>( + 'sec_protocol_options_add_tls_application_protocol'); + late final _sec_protocol_options_add_tls_application_protocol = + _sec_protocol_options_add_tls_application_protocolPtr.asFunction< + void Function(sec_protocol_options_t, ffi.Pointer)>(); - CFTypeRef CFBundleGetValueForInfoDictionaryKey( - CFBundleRef bundle, - CFStringRef key, + void sec_protocol_options_set_tls_server_name( + Dartsec_protocol_options_t options, + ffi.Pointer server_name, ) { - return _CFBundleGetValueForInfoDictionaryKey( - bundle, - key, + return _sec_protocol_options_set_tls_server_name( + options.ref.pointer, + server_name, ); } - late final _CFBundleGetValueForInfoDictionaryKeyPtr = - _lookup>( - 'CFBundleGetValueForInfoDictionaryKey'); - late final _CFBundleGetValueForInfoDictionaryKey = - _CFBundleGetValueForInfoDictionaryKeyPtr.asFunction< - CFTypeRef Function(CFBundleRef, CFStringRef)>(); + late final _sec_protocol_options_set_tls_server_namePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_options_t, ffi.Pointer)>>( + 'sec_protocol_options_set_tls_server_name'); + late final _sec_protocol_options_set_tls_server_name = + _sec_protocol_options_set_tls_server_namePtr.asFunction< + void Function(sec_protocol_options_t, ffi.Pointer)>(); - CFDictionaryRef CFBundleGetInfoDictionary( - CFBundleRef bundle, + void sec_protocol_options_set_tls_diffie_hellman_parameters( + Dartsec_protocol_options_t options, + Dartdispatch_data_t params, ) { - return _CFBundleGetInfoDictionary( - bundle, + return _sec_protocol_options_set_tls_diffie_hellman_parameters( + options.ref.pointer, + params.ref.pointer, ); } - late final _CFBundleGetInfoDictionaryPtr = - _lookup>( - 'CFBundleGetInfoDictionary'); - late final _CFBundleGetInfoDictionary = _CFBundleGetInfoDictionaryPtr - .asFunction(); + late final _sec_protocol_options_set_tls_diffie_hellman_parametersPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( + 'sec_protocol_options_set_tls_diffie_hellman_parameters'); + late final _sec_protocol_options_set_tls_diffie_hellman_parameters = + _sec_protocol_options_set_tls_diffie_hellman_parametersPtr + .asFunction(); - CFDictionaryRef CFBundleGetLocalInfoDictionary( - CFBundleRef bundle, + void sec_protocol_options_add_pre_shared_key( + Dartsec_protocol_options_t options, + Dartdispatch_data_t psk, + Dartdispatch_data_t psk_identity, ) { - return _CFBundleGetLocalInfoDictionary( - bundle, + return _sec_protocol_options_add_pre_shared_key( + options.ref.pointer, + psk.ref.pointer, + psk_identity.ref.pointer, ); } - late final _CFBundleGetLocalInfoDictionaryPtr = - _lookup>( - 'CFBundleGetLocalInfoDictionary'); - late final _CFBundleGetLocalInfoDictionary = - _CFBundleGetLocalInfoDictionaryPtr.asFunction< - CFDictionaryRef Function(CFBundleRef)>(); + late final _sec_protocol_options_add_pre_shared_keyPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, dispatch_data_t, + dispatch_data_t)>>('sec_protocol_options_add_pre_shared_key'); + late final _sec_protocol_options_add_pre_shared_key = + _sec_protocol_options_add_pre_shared_keyPtr.asFunction< + void Function( + sec_protocol_options_t, dispatch_data_t, dispatch_data_t)>(); - void CFBundleGetPackageInfo( - CFBundleRef bundle, - ffi.Pointer packageType, - ffi.Pointer packageCreator, + void sec_protocol_options_set_tls_pre_shared_key_identity_hint( + Dartsec_protocol_options_t options, + Dartdispatch_data_t psk_identity_hint, ) { - return _CFBundleGetPackageInfo( - bundle, - packageType, - packageCreator, + return _sec_protocol_options_set_tls_pre_shared_key_identity_hint( + options.ref.pointer, + psk_identity_hint.ref.pointer, ); } - late final _CFBundleGetPackageInfoPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBundleRef, ffi.Pointer, - ffi.Pointer)>>('CFBundleGetPackageInfo'); - late final _CFBundleGetPackageInfo = _CFBundleGetPackageInfoPtr.asFunction< - void Function(CFBundleRef, ffi.Pointer, ffi.Pointer)>(); + late final _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( + 'sec_protocol_options_set_tls_pre_shared_key_identity_hint'); + late final _sec_protocol_options_set_tls_pre_shared_key_identity_hint = + _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr + .asFunction(); - CFStringRef CFBundleGetIdentifier( - CFBundleRef bundle, + void sec_protocol_options_set_pre_shared_key_selection_block( + Dartsec_protocol_options_t options, + Dartsec_protocol_pre_shared_key_selection_t psk_selection_block, + Dartdispatch_queue_t psk_selection_queue, ) { - return _CFBundleGetIdentifier( - bundle, + return _sec_protocol_options_set_pre_shared_key_selection_block( + options.ref.pointer, + psk_selection_block.ref.pointer, + psk_selection_queue.ref.pointer, ); } - late final _CFBundleGetIdentifierPtr = - _lookup>( - 'CFBundleGetIdentifier'); - late final _CFBundleGetIdentifier = - _CFBundleGetIdentifierPtr.asFunction(); + late final _sec_protocol_options_set_pre_shared_key_selection_blockPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_options_t, + sec_protocol_pre_shared_key_selection_t, + dispatch_queue_t)>>( + 'sec_protocol_options_set_pre_shared_key_selection_block'); + late final _sec_protocol_options_set_pre_shared_key_selection_block = + _sec_protocol_options_set_pre_shared_key_selection_blockPtr.asFunction< + void Function(sec_protocol_options_t, + sec_protocol_pre_shared_key_selection_t, dispatch_queue_t)>(); - int CFBundleGetVersionNumber( - CFBundleRef bundle, + void sec_protocol_options_set_tls_tickets_enabled( + Dartsec_protocol_options_t options, + bool tickets_enabled, ) { - return _CFBundleGetVersionNumber( - bundle, + return _sec_protocol_options_set_tls_tickets_enabled( + options.ref.pointer, + tickets_enabled, ); } - late final _CFBundleGetVersionNumberPtr = - _lookup>( - 'CFBundleGetVersionNumber'); - late final _CFBundleGetVersionNumber = - _CFBundleGetVersionNumberPtr.asFunction(); + late final _sec_protocol_options_set_tls_tickets_enabledPtr = _lookup< + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_tickets_enabled'); + late final _sec_protocol_options_set_tls_tickets_enabled = + _sec_protocol_options_set_tls_tickets_enabledPtr + .asFunction(); - CFStringRef CFBundleGetDevelopmentRegion( - CFBundleRef bundle, + void sec_protocol_options_set_tls_is_fallback_attempt( + Dartsec_protocol_options_t options, + bool is_fallback_attempt, ) { - return _CFBundleGetDevelopmentRegion( - bundle, + return _sec_protocol_options_set_tls_is_fallback_attempt( + options.ref.pointer, + is_fallback_attempt, ); } - late final _CFBundleGetDevelopmentRegionPtr = - _lookup>( - 'CFBundleGetDevelopmentRegion'); - late final _CFBundleGetDevelopmentRegion = _CFBundleGetDevelopmentRegionPtr - .asFunction(); + late final _sec_protocol_options_set_tls_is_fallback_attemptPtr = _lookup< + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_is_fallback_attempt'); + late final _sec_protocol_options_set_tls_is_fallback_attempt = + _sec_protocol_options_set_tls_is_fallback_attemptPtr + .asFunction(); - CFURLRef CFBundleCopySupportFilesDirectoryURL( - CFBundleRef bundle, + void sec_protocol_options_set_tls_resumption_enabled( + Dartsec_protocol_options_t options, + bool resumption_enabled, ) { - return _CFBundleCopySupportFilesDirectoryURL( - bundle, + return _sec_protocol_options_set_tls_resumption_enabled( + options.ref.pointer, + resumption_enabled, ); } - late final _CFBundleCopySupportFilesDirectoryURLPtr = - _lookup>( - 'CFBundleCopySupportFilesDirectoryURL'); - late final _CFBundleCopySupportFilesDirectoryURL = - _CFBundleCopySupportFilesDirectoryURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _sec_protocol_options_set_tls_resumption_enabledPtr = _lookup< + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_resumption_enabled'); + late final _sec_protocol_options_set_tls_resumption_enabled = + _sec_protocol_options_set_tls_resumption_enabledPtr + .asFunction(); - CFURLRef CFBundleCopyResourcesDirectoryURL( - CFBundleRef bundle, + void sec_protocol_options_set_tls_false_start_enabled( + Dartsec_protocol_options_t options, + bool false_start_enabled, ) { - return _CFBundleCopyResourcesDirectoryURL( - bundle, + return _sec_protocol_options_set_tls_false_start_enabled( + options.ref.pointer, + false_start_enabled, ); } - late final _CFBundleCopyResourcesDirectoryURLPtr = - _lookup>( - 'CFBundleCopyResourcesDirectoryURL'); - late final _CFBundleCopyResourcesDirectoryURL = - _CFBundleCopyResourcesDirectoryURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _sec_protocol_options_set_tls_false_start_enabledPtr = _lookup< + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_false_start_enabled'); + late final _sec_protocol_options_set_tls_false_start_enabled = + _sec_protocol_options_set_tls_false_start_enabledPtr + .asFunction(); - CFURLRef CFBundleCopyPrivateFrameworksURL( - CFBundleRef bundle, + void sec_protocol_options_set_tls_ocsp_enabled( + Dartsec_protocol_options_t options, + bool ocsp_enabled, ) { - return _CFBundleCopyPrivateFrameworksURL( - bundle, + return _sec_protocol_options_set_tls_ocsp_enabled( + options.ref.pointer, + ocsp_enabled, ); } - late final _CFBundleCopyPrivateFrameworksURLPtr = - _lookup>( - 'CFBundleCopyPrivateFrameworksURL'); - late final _CFBundleCopyPrivateFrameworksURL = - _CFBundleCopyPrivateFrameworksURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _sec_protocol_options_set_tls_ocsp_enabledPtr = _lookup< + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_ocsp_enabled'); + late final _sec_protocol_options_set_tls_ocsp_enabled = + _sec_protocol_options_set_tls_ocsp_enabledPtr + .asFunction(); - CFURLRef CFBundleCopySharedFrameworksURL( - CFBundleRef bundle, + void sec_protocol_options_set_tls_sct_enabled( + Dartsec_protocol_options_t options, + bool sct_enabled, ) { - return _CFBundleCopySharedFrameworksURL( - bundle, + return _sec_protocol_options_set_tls_sct_enabled( + options.ref.pointer, + sct_enabled, ); } - late final _CFBundleCopySharedFrameworksURLPtr = - _lookup>( - 'CFBundleCopySharedFrameworksURL'); - late final _CFBundleCopySharedFrameworksURL = - _CFBundleCopySharedFrameworksURLPtr.asFunction< - CFURLRef Function(CFBundleRef)>(); + late final _sec_protocol_options_set_tls_sct_enabledPtr = _lookup< + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_sct_enabled'); + late final _sec_protocol_options_set_tls_sct_enabled = + _sec_protocol_options_set_tls_sct_enabledPtr + .asFunction(); - CFURLRef CFBundleCopySharedSupportURL( - CFBundleRef bundle, + void sec_protocol_options_set_tls_renegotiation_enabled( + Dartsec_protocol_options_t options, + bool renegotiation_enabled, ) { - return _CFBundleCopySharedSupportURL( - bundle, + return _sec_protocol_options_set_tls_renegotiation_enabled( + options.ref.pointer, + renegotiation_enabled, ); } - late final _CFBundleCopySharedSupportURLPtr = - _lookup>( - 'CFBundleCopySharedSupportURL'); - late final _CFBundleCopySharedSupportURL = _CFBundleCopySharedSupportURLPtr - .asFunction(); + late final _sec_protocol_options_set_tls_renegotiation_enabledPtr = _lookup< + ffi + .NativeFunction>( + 'sec_protocol_options_set_tls_renegotiation_enabled'); + late final _sec_protocol_options_set_tls_renegotiation_enabled = + _sec_protocol_options_set_tls_renegotiation_enabledPtr + .asFunction(); - CFURLRef CFBundleCopyBuiltInPlugInsURL( - CFBundleRef bundle, + void sec_protocol_options_set_peer_authentication_required( + Dartsec_protocol_options_t options, + bool peer_authentication_required, ) { - return _CFBundleCopyBuiltInPlugInsURL( - bundle, + return _sec_protocol_options_set_peer_authentication_required( + options.ref.pointer, + peer_authentication_required, ); } - late final _CFBundleCopyBuiltInPlugInsURLPtr = - _lookup>( - 'CFBundleCopyBuiltInPlugInsURL'); - late final _CFBundleCopyBuiltInPlugInsURL = _CFBundleCopyBuiltInPlugInsURLPtr - .asFunction(); + late final _sec_protocol_options_set_peer_authentication_requiredPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( + 'sec_protocol_options_set_peer_authentication_required'); + late final _sec_protocol_options_set_peer_authentication_required = + _sec_protocol_options_set_peer_authentication_requiredPtr + .asFunction(); - CFDictionaryRef CFBundleCopyInfoDictionaryInDirectory( - CFURLRef bundleURL, + void sec_protocol_options_set_peer_authentication_optional( + Dartsec_protocol_options_t options, + bool peer_authentication_optional, ) { - return _CFBundleCopyInfoDictionaryInDirectory( - bundleURL, + return _sec_protocol_options_set_peer_authentication_optional( + options.ref.pointer, + peer_authentication_optional, ); } - late final _CFBundleCopyInfoDictionaryInDirectoryPtr = - _lookup>( - 'CFBundleCopyInfoDictionaryInDirectory'); - late final _CFBundleCopyInfoDictionaryInDirectory = - _CFBundleCopyInfoDictionaryInDirectoryPtr.asFunction< - CFDictionaryRef Function(CFURLRef)>(); + late final _sec_protocol_options_set_peer_authentication_optionalPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( + 'sec_protocol_options_set_peer_authentication_optional'); + late final _sec_protocol_options_set_peer_authentication_optional = + _sec_protocol_options_set_peer_authentication_optionalPtr + .asFunction(); - int CFBundleGetPackageInfoInDirectory( - CFURLRef url, - ffi.Pointer packageType, - ffi.Pointer packageCreator, + void sec_protocol_options_set_enable_encrypted_client_hello( + Dartsec_protocol_options_t options, + bool enable_encrypted_client_hello, ) { - return _CFBundleGetPackageInfoInDirectory( - url, - packageType, - packageCreator, + return _sec_protocol_options_set_enable_encrypted_client_hello( + options.ref.pointer, + enable_encrypted_client_hello, ); } - late final _CFBundleGetPackageInfoInDirectoryPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFURLRef, ffi.Pointer, - ffi.Pointer)>>('CFBundleGetPackageInfoInDirectory'); - late final _CFBundleGetPackageInfoInDirectory = - _CFBundleGetPackageInfoInDirectoryPtr.asFunction< - int Function(CFURLRef, ffi.Pointer, ffi.Pointer)>(); + late final _sec_protocol_options_set_enable_encrypted_client_helloPtr = + _lookup< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( + 'sec_protocol_options_set_enable_encrypted_client_hello'); + late final _sec_protocol_options_set_enable_encrypted_client_hello = + _sec_protocol_options_set_enable_encrypted_client_helloPtr + .asFunction(); - CFURLRef CFBundleCopyResourceURL( - CFBundleRef bundle, - CFStringRef resourceName, - CFStringRef resourceType, - CFStringRef subDirName, + void sec_protocol_options_set_quic_use_legacy_codepoint( + Dartsec_protocol_options_t options, + bool quic_use_legacy_codepoint, ) { - return _CFBundleCopyResourceURL( - bundle, - resourceName, - resourceType, - subDirName, + return _sec_protocol_options_set_quic_use_legacy_codepoint( + options.ref.pointer, + quic_use_legacy_codepoint, ); } - late final _CFBundleCopyResourceURLPtr = _lookup< - ffi.NativeFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURL'); - late final _CFBundleCopyResourceURL = _CFBundleCopyResourceURLPtr.asFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + late final _sec_protocol_options_set_quic_use_legacy_codepointPtr = _lookup< + ffi + .NativeFunction>( + 'sec_protocol_options_set_quic_use_legacy_codepoint'); + late final _sec_protocol_options_set_quic_use_legacy_codepoint = + _sec_protocol_options_set_quic_use_legacy_codepointPtr + .asFunction(); - CFArrayRef CFBundleCopyResourceURLsOfType( - CFBundleRef bundle, - CFStringRef resourceType, - CFStringRef subDirName, + void sec_protocol_options_set_key_update_block( + Dartsec_protocol_options_t options, + Dartsec_protocol_key_update_t key_update_block, + Dartdispatch_queue_t key_update_queue, ) { - return _CFBundleCopyResourceURLsOfType( - bundle, - resourceType, - subDirName, + return _sec_protocol_options_set_key_update_block( + options.ref.pointer, + key_update_block.ref.pointer, + key_update_queue.ref.pointer, ); } - late final _CFBundleCopyResourceURLsOfTypePtr = _lookup< + late final _sec_protocol_options_set_key_update_blockPtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFBundleRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLsOfType'); - late final _CFBundleCopyResourceURLsOfType = - _CFBundleCopyResourceURLsOfTypePtr.asFunction< - CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef)>(); + ffi.Void Function(sec_protocol_options_t, sec_protocol_key_update_t, + dispatch_queue_t)>>('sec_protocol_options_set_key_update_block'); + late final _sec_protocol_options_set_key_update_block = + _sec_protocol_options_set_key_update_blockPtr.asFunction< + void Function(sec_protocol_options_t, sec_protocol_key_update_t, + dispatch_queue_t)>(); - CFStringRef CFBundleCopyLocalizedString( - CFBundleRef bundle, - CFStringRef key, - CFStringRef value, - CFStringRef tableName, + void sec_protocol_options_set_challenge_block( + Dartsec_protocol_options_t options, + Dartsec_protocol_challenge_t challenge_block, + Dartdispatch_queue_t challenge_queue, ) { - return _CFBundleCopyLocalizedString( - bundle, - key, - value, - tableName, + return _sec_protocol_options_set_challenge_block( + options.ref.pointer, + challenge_block.ref.pointer, + challenge_queue.ref.pointer, ); } - late final _CFBundleCopyLocalizedStringPtr = _lookup< + late final _sec_protocol_options_set_challenge_blockPtr = _lookup< ffi.NativeFunction< - CFStringRef Function(CFBundleRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyLocalizedString'); - late final _CFBundleCopyLocalizedString = - _CFBundleCopyLocalizedStringPtr.asFunction< - CFStringRef Function( - CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + ffi.Void Function(sec_protocol_options_t, sec_protocol_challenge_t, + dispatch_queue_t)>>('sec_protocol_options_set_challenge_block'); + late final _sec_protocol_options_set_challenge_block = + _sec_protocol_options_set_challenge_blockPtr.asFunction< + void Function(sec_protocol_options_t, sec_protocol_challenge_t, + dispatch_queue_t)>(); - CFURLRef CFBundleCopyResourceURLInDirectory( - CFURLRef bundleURL, - CFStringRef resourceName, - CFStringRef resourceType, - CFStringRef subDirName, + void sec_protocol_options_set_verify_block( + Dartsec_protocol_options_t options, + Dartsec_protocol_verify_t verify_block, + Dartdispatch_queue_t verify_block_queue, ) { - return _CFBundleCopyResourceURLInDirectory( - bundleURL, - resourceName, - resourceType, - subDirName, + return _sec_protocol_options_set_verify_block( + options.ref.pointer, + verify_block.ref.pointer, + verify_block_queue.ref.pointer, ); } - late final _CFBundleCopyResourceURLInDirectoryPtr = _lookup< + late final _sec_protocol_options_set_verify_blockPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLInDirectory'); - late final _CFBundleCopyResourceURLInDirectory = - _CFBundleCopyResourceURLInDirectoryPtr.asFunction< - CFURLRef Function(CFURLRef, CFStringRef, CFStringRef, CFStringRef)>(); + ffi.Void Function(sec_protocol_options_t, sec_protocol_verify_t, + dispatch_queue_t)>>('sec_protocol_options_set_verify_block'); + late final _sec_protocol_options_set_verify_block = + _sec_protocol_options_set_verify_blockPtr.asFunction< + void Function(sec_protocol_options_t, sec_protocol_verify_t, + dispatch_queue_t)>(); - CFArrayRef CFBundleCopyResourceURLsOfTypeInDirectory( - CFURLRef bundleURL, - CFStringRef resourceType, - CFStringRef subDirName, + late final ffi.Pointer _kSSLSessionConfig_default = + _lookup('kSSLSessionConfig_default'); + + CFStringRef get kSSLSessionConfig_default => _kSSLSessionConfig_default.value; + + set kSSLSessionConfig_default(CFStringRef value) => + _kSSLSessionConfig_default.value = value; + + late final ffi.Pointer _kSSLSessionConfig_ATSv1 = + _lookup('kSSLSessionConfig_ATSv1'); + + CFStringRef get kSSLSessionConfig_ATSv1 => _kSSLSessionConfig_ATSv1.value; + + set kSSLSessionConfig_ATSv1(CFStringRef value) => + _kSSLSessionConfig_ATSv1.value = value; + + late final ffi.Pointer _kSSLSessionConfig_ATSv1_noPFS = + _lookup('kSSLSessionConfig_ATSv1_noPFS'); + + CFStringRef get kSSLSessionConfig_ATSv1_noPFS => + _kSSLSessionConfig_ATSv1_noPFS.value; + + set kSSLSessionConfig_ATSv1_noPFS(CFStringRef value) => + _kSSLSessionConfig_ATSv1_noPFS.value = value; + + late final ffi.Pointer _kSSLSessionConfig_standard = + _lookup('kSSLSessionConfig_standard'); + + CFStringRef get kSSLSessionConfig_standard => + _kSSLSessionConfig_standard.value; + + set kSSLSessionConfig_standard(CFStringRef value) => + _kSSLSessionConfig_standard.value = value; + + late final ffi.Pointer _kSSLSessionConfig_RC4_fallback = + _lookup('kSSLSessionConfig_RC4_fallback'); + + CFStringRef get kSSLSessionConfig_RC4_fallback => + _kSSLSessionConfig_RC4_fallback.value; + + set kSSLSessionConfig_RC4_fallback(CFStringRef value) => + _kSSLSessionConfig_RC4_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_TLSv1_fallback = + _lookup('kSSLSessionConfig_TLSv1_fallback'); + + CFStringRef get kSSLSessionConfig_TLSv1_fallback => + _kSSLSessionConfig_TLSv1_fallback.value; + + set kSSLSessionConfig_TLSv1_fallback(CFStringRef value) => + _kSSLSessionConfig_TLSv1_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_TLSv1_RC4_fallback = + _lookup('kSSLSessionConfig_TLSv1_RC4_fallback'); + + CFStringRef get kSSLSessionConfig_TLSv1_RC4_fallback => + _kSSLSessionConfig_TLSv1_RC4_fallback.value; + + set kSSLSessionConfig_TLSv1_RC4_fallback(CFStringRef value) => + _kSSLSessionConfig_TLSv1_RC4_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_legacy = + _lookup('kSSLSessionConfig_legacy'); + + CFStringRef get kSSLSessionConfig_legacy => _kSSLSessionConfig_legacy.value; + + set kSSLSessionConfig_legacy(CFStringRef value) => + _kSSLSessionConfig_legacy.value = value; + + late final ffi.Pointer _kSSLSessionConfig_legacy_DHE = + _lookup('kSSLSessionConfig_legacy_DHE'); + + CFStringRef get kSSLSessionConfig_legacy_DHE => + _kSSLSessionConfig_legacy_DHE.value; + + set kSSLSessionConfig_legacy_DHE(CFStringRef value) => + _kSSLSessionConfig_legacy_DHE.value = value; + + late final ffi.Pointer _kSSLSessionConfig_anonymous = + _lookup('kSSLSessionConfig_anonymous'); + + CFStringRef get kSSLSessionConfig_anonymous => + _kSSLSessionConfig_anonymous.value; + + set kSSLSessionConfig_anonymous(CFStringRef value) => + _kSSLSessionConfig_anonymous.value = value; + + late final ffi.Pointer _kSSLSessionConfig_3DES_fallback = + _lookup('kSSLSessionConfig_3DES_fallback'); + + CFStringRef get kSSLSessionConfig_3DES_fallback => + _kSSLSessionConfig_3DES_fallback.value; + + set kSSLSessionConfig_3DES_fallback(CFStringRef value) => + _kSSLSessionConfig_3DES_fallback.value = value; + + late final ffi.Pointer _kSSLSessionConfig_TLSv1_3DES_fallback = + _lookup('kSSLSessionConfig_TLSv1_3DES_fallback'); + + CFStringRef get kSSLSessionConfig_TLSv1_3DES_fallback => + _kSSLSessionConfig_TLSv1_3DES_fallback.value; + + set kSSLSessionConfig_TLSv1_3DES_fallback(CFStringRef value) => + _kSSLSessionConfig_TLSv1_3DES_fallback.value = value; + + int SSLContextGetTypeID() { + return _SSLContextGetTypeID(); + } + + late final _SSLContextGetTypeIDPtr = + _lookup>('SSLContextGetTypeID'); + late final _SSLContextGetTypeID = + _SSLContextGetTypeIDPtr.asFunction(); + + SSLContextRef SSLCreateContext( + CFAllocatorRef alloc, + SSLProtocolSide protocolSide, + SSLConnectionType connectionType, ) { - return _CFBundleCopyResourceURLsOfTypeInDirectory( - bundleURL, - resourceType, - subDirName, + return _SSLCreateContext( + alloc, + protocolSide.value, + connectionType.value, ); } - late final _CFBundleCopyResourceURLsOfTypeInDirectoryPtr = _lookup< + late final _SSLCreateContextPtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFURLRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLsOfTypeInDirectory'); - late final _CFBundleCopyResourceURLsOfTypeInDirectory = - _CFBundleCopyResourceURLsOfTypeInDirectoryPtr.asFunction< - CFArrayRef Function(CFURLRef, CFStringRef, CFStringRef)>(); + SSLContextRef Function(CFAllocatorRef, ffi.UnsignedInt, + ffi.UnsignedInt)>>('SSLCreateContext'); + late final _SSLCreateContext = _SSLCreateContextPtr.asFunction< + SSLContextRef Function(CFAllocatorRef, int, int)>(); - CFArrayRef CFBundleCopyBundleLocalizations( - CFBundleRef bundle, + int SSLNewContext( + int isServer, + ffi.Pointer contextPtr, ) { - return _CFBundleCopyBundleLocalizations( - bundle, + return _SSLNewContext( + isServer, + contextPtr, ); } - late final _CFBundleCopyBundleLocalizationsPtr = - _lookup>( - 'CFBundleCopyBundleLocalizations'); - late final _CFBundleCopyBundleLocalizations = - _CFBundleCopyBundleLocalizationsPtr.asFunction< - CFArrayRef Function(CFBundleRef)>(); + late final _SSLNewContextPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + Boolean, ffi.Pointer)>>('SSLNewContext'); + late final _SSLNewContext = _SSLNewContextPtr.asFunction< + int Function(int, ffi.Pointer)>(); - CFArrayRef CFBundleCopyPreferredLocalizationsFromArray( - CFArrayRef locArray, + int SSLDisposeContext( + SSLContextRef context, ) { - return _CFBundleCopyPreferredLocalizationsFromArray( - locArray, + return _SSLDisposeContext( + context, ); } - late final _CFBundleCopyPreferredLocalizationsFromArrayPtr = - _lookup>( - 'CFBundleCopyPreferredLocalizationsFromArray'); - late final _CFBundleCopyPreferredLocalizationsFromArray = - _CFBundleCopyPreferredLocalizationsFromArrayPtr.asFunction< - CFArrayRef Function(CFArrayRef)>(); + late final _SSLDisposeContextPtr = + _lookup>( + 'SSLDisposeContext'); + late final _SSLDisposeContext = + _SSLDisposeContextPtr.asFunction(); - CFArrayRef CFBundleCopyLocalizationsForPreferences( - CFArrayRef locArray, - CFArrayRef prefArray, + int SSLGetSessionState( + SSLContextRef context, + ffi.Pointer state, ) { - return _CFBundleCopyLocalizationsForPreferences( - locArray, - prefArray, + return _SSLGetSessionState( + context, + state, ); } - late final _CFBundleCopyLocalizationsForPreferencesPtr = - _lookup>( - 'CFBundleCopyLocalizationsForPreferences'); - late final _CFBundleCopyLocalizationsForPreferences = - _CFBundleCopyLocalizationsForPreferencesPtr.asFunction< - CFArrayRef Function(CFArrayRef, CFArrayRef)>(); + late final _SSLGetSessionStatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetSessionState'); + late final _SSLGetSessionState = _SSLGetSessionStatePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - CFURLRef CFBundleCopyResourceURLForLocalization( - CFBundleRef bundle, - CFStringRef resourceName, - CFStringRef resourceType, - CFStringRef subDirName, - CFStringRef localizationName, + DartSInt32 SSLSetSessionOption( + SSLContextRef context, + SSLSessionOption option, + DartBoolean value, ) { - return _CFBundleCopyResourceURLForLocalization( - bundle, - resourceName, - resourceType, - subDirName, - localizationName, + return _SSLSetSessionOption( + context, + option.value, + value, ); } - late final _CFBundleCopyResourceURLForLocalizationPtr = _lookup< + late final _SSLSetSessionOptionPtr = _lookup< ffi.NativeFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLForLocalization'); - late final _CFBundleCopyResourceURLForLocalization = - _CFBundleCopyResourceURLForLocalizationPtr.asFunction< - CFURLRef Function(CFBundleRef, CFStringRef, CFStringRef, CFStringRef, - CFStringRef)>(); + OSStatus Function( + SSLContextRef, ffi.UnsignedInt, Boolean)>>('SSLSetSessionOption'); + late final _SSLSetSessionOption = _SSLSetSessionOptionPtr.asFunction< + int Function(SSLContextRef, int, int)>(); - CFArrayRef CFBundleCopyResourceURLsOfTypeForLocalization( - CFBundleRef bundle, - CFStringRef resourceType, - CFStringRef subDirName, - CFStringRef localizationName, + DartSInt32 SSLGetSessionOption( + SSLContextRef context, + SSLSessionOption option, + ffi.Pointer value, ) { - return _CFBundleCopyResourceURLsOfTypeForLocalization( - bundle, - resourceType, - subDirName, - localizationName, + return _SSLGetSessionOption( + context, + option.value, + value, ); } - late final _CFBundleCopyResourceURLsOfTypeForLocalizationPtr = _lookup< + late final _SSLGetSessionOptionPtr = _lookup< ffi.NativeFunction< - CFArrayRef Function(CFBundleRef, CFStringRef, CFStringRef, - CFStringRef)>>('CFBundleCopyResourceURLsOfTypeForLocalization'); - late final _CFBundleCopyResourceURLsOfTypeForLocalization = - _CFBundleCopyResourceURLsOfTypeForLocalizationPtr.asFunction< - CFArrayRef Function( - CFBundleRef, CFStringRef, CFStringRef, CFStringRef)>(); + OSStatus Function(SSLContextRef, ffi.UnsignedInt, + ffi.Pointer)>>('SSLGetSessionOption'); + late final _SSLGetSessionOption = _SSLGetSessionOptionPtr.asFunction< + int Function(SSLContextRef, int, ffi.Pointer)>(); - CFDictionaryRef CFBundleCopyInfoDictionaryForURL( - CFURLRef url, + int SSLSetIOFuncs( + SSLContextRef context, + SSLReadFunc readFunc, + SSLWriteFunc writeFunc, ) { - return _CFBundleCopyInfoDictionaryForURL( - url, + return _SSLSetIOFuncs( + context, + readFunc, + writeFunc, ); } - late final _CFBundleCopyInfoDictionaryForURLPtr = - _lookup>( - 'CFBundleCopyInfoDictionaryForURL'); - late final _CFBundleCopyInfoDictionaryForURL = - _CFBundleCopyInfoDictionaryForURLPtr.asFunction< - CFDictionaryRef Function(CFURLRef)>(); + late final _SSLSetIOFuncsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, SSLReadFunc, SSLWriteFunc)>>('SSLSetIOFuncs'); + late final _SSLSetIOFuncs = _SSLSetIOFuncsPtr.asFunction< + int Function(SSLContextRef, SSLReadFunc, SSLWriteFunc)>(); - CFArrayRef CFBundleCopyLocalizationsForURL( - CFURLRef url, + int SSLSetSessionConfig( + SSLContextRef context, + CFStringRef config, ) { - return _CFBundleCopyLocalizationsForURL( - url, + return _SSLSetSessionConfig( + context, + config, ); } - late final _CFBundleCopyLocalizationsForURLPtr = - _lookup>( - 'CFBundleCopyLocalizationsForURL'); - late final _CFBundleCopyLocalizationsForURL = - _CFBundleCopyLocalizationsForURLPtr.asFunction< - CFArrayRef Function(CFURLRef)>(); + late final _SSLSetSessionConfigPtr = _lookup< + ffi.NativeFunction>( + 'SSLSetSessionConfig'); + late final _SSLSetSessionConfig = _SSLSetSessionConfigPtr.asFunction< + int Function(SSLContextRef, CFStringRef)>(); - CFArrayRef CFBundleCopyExecutableArchitecturesForURL( - CFURLRef url, + DartSInt32 SSLSetProtocolVersionMin( + SSLContextRef context, + SSLProtocol minVersion, ) { - return _CFBundleCopyExecutableArchitecturesForURL( - url, + return _SSLSetProtocolVersionMin( + context, + minVersion.value, ); } - late final _CFBundleCopyExecutableArchitecturesForURLPtr = - _lookup>( - 'CFBundleCopyExecutableArchitecturesForURL'); - late final _CFBundleCopyExecutableArchitecturesForURL = - _CFBundleCopyExecutableArchitecturesForURLPtr.asFunction< - CFArrayRef Function(CFURLRef)>(); + late final _SSLSetProtocolVersionMinPtr = _lookup< + ffi + .NativeFunction>( + 'SSLSetProtocolVersionMin'); + late final _SSLSetProtocolVersionMin = _SSLSetProtocolVersionMinPtr + .asFunction(); - CFURLRef CFBundleCopyExecutableURL( - CFBundleRef bundle, + int SSLGetProtocolVersionMin( + SSLContextRef context, + ffi.Pointer minVersion, ) { - return _CFBundleCopyExecutableURL( - bundle, + return _SSLGetProtocolVersionMin( + context, + minVersion, ); } - late final _CFBundleCopyExecutableURLPtr = - _lookup>( - 'CFBundleCopyExecutableURL'); - late final _CFBundleCopyExecutableURL = _CFBundleCopyExecutableURLPtr - .asFunction(); + late final _SSLGetProtocolVersionMinPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetProtocolVersionMin'); + late final _SSLGetProtocolVersionMin = _SSLGetProtocolVersionMinPtr + .asFunction)>(); - CFArrayRef CFBundleCopyExecutableArchitectures( - CFBundleRef bundle, + DartSInt32 SSLSetProtocolVersionMax( + SSLContextRef context, + SSLProtocol maxVersion, ) { - return _CFBundleCopyExecutableArchitectures( - bundle, + return _SSLSetProtocolVersionMax( + context, + maxVersion.value, ); } - late final _CFBundleCopyExecutableArchitecturesPtr = - _lookup>( - 'CFBundleCopyExecutableArchitectures'); - late final _CFBundleCopyExecutableArchitectures = - _CFBundleCopyExecutableArchitecturesPtr.asFunction< - CFArrayRef Function(CFBundleRef)>(); + late final _SSLSetProtocolVersionMaxPtr = _lookup< + ffi + .NativeFunction>( + 'SSLSetProtocolVersionMax'); + late final _SSLSetProtocolVersionMax = _SSLSetProtocolVersionMaxPtr + .asFunction(); - int CFBundlePreflightExecutable( - CFBundleRef bundle, - ffi.Pointer error, + int SSLGetProtocolVersionMax( + SSLContextRef context, + ffi.Pointer maxVersion, ) { - return _CFBundlePreflightExecutable( - bundle, - error, + return _SSLGetProtocolVersionMax( + context, + maxVersion, ); } - late final _CFBundlePreflightExecutablePtr = _lookup< + late final _SSLGetProtocolVersionMaxPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFBundleRef, - ffi.Pointer)>>('CFBundlePreflightExecutable'); - late final _CFBundlePreflightExecutable = _CFBundlePreflightExecutablePtr - .asFunction)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetProtocolVersionMax'); + late final _SSLGetProtocolVersionMax = _SSLGetProtocolVersionMaxPtr + .asFunction)>(); - int CFBundleLoadExecutableAndReturnError( - CFBundleRef bundle, - ffi.Pointer error, + DartSInt32 SSLSetProtocolVersionEnabled( + SSLContextRef context, + SSLProtocol protocol, + DartBoolean enable, ) { - return _CFBundleLoadExecutableAndReturnError( - bundle, - error, + return _SSLSetProtocolVersionEnabled( + context, + protocol.value, + enable, ); } - late final _CFBundleLoadExecutableAndReturnErrorPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFBundleRef, ffi.Pointer)>>( - 'CFBundleLoadExecutableAndReturnError'); - late final _CFBundleLoadExecutableAndReturnError = - _CFBundleLoadExecutableAndReturnErrorPtr.asFunction< - int Function(CFBundleRef, ffi.Pointer)>(); + late final _SSLSetProtocolVersionEnabledPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.UnsignedInt, + Boolean)>>('SSLSetProtocolVersionEnabled'); + late final _SSLSetProtocolVersionEnabled = _SSLSetProtocolVersionEnabledPtr + .asFunction(); - int CFBundleLoadExecutable( - CFBundleRef bundle, + DartSInt32 SSLGetProtocolVersionEnabled( + SSLContextRef context, + SSLProtocol protocol, + ffi.Pointer enable, ) { - return _CFBundleLoadExecutable( - bundle, + return _SSLGetProtocolVersionEnabled( + context, + protocol.value, + enable, ); } - late final _CFBundleLoadExecutablePtr = - _lookup>( - 'CFBundleLoadExecutable'); - late final _CFBundleLoadExecutable = - _CFBundleLoadExecutablePtr.asFunction(); + late final _SSLGetProtocolVersionEnabledPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.UnsignedInt, + ffi.Pointer)>>('SSLGetProtocolVersionEnabled'); + late final _SSLGetProtocolVersionEnabled = _SSLGetProtocolVersionEnabledPtr + .asFunction)>(); - int CFBundleIsExecutableLoaded( - CFBundleRef bundle, + DartSInt32 SSLSetProtocolVersion( + SSLContextRef context, + SSLProtocol version, ) { - return _CFBundleIsExecutableLoaded( - bundle, + return _SSLSetProtocolVersion( + context, + version.value, ); } - late final _CFBundleIsExecutableLoadedPtr = - _lookup>( - 'CFBundleIsExecutableLoaded'); - late final _CFBundleIsExecutableLoaded = - _CFBundleIsExecutableLoadedPtr.asFunction(); + late final _SSLSetProtocolVersionPtr = _lookup< + ffi + .NativeFunction>( + 'SSLSetProtocolVersion'); + late final _SSLSetProtocolVersion = + _SSLSetProtocolVersionPtr.asFunction(); - void CFBundleUnloadExecutable( - CFBundleRef bundle, + int SSLGetProtocolVersion( + SSLContextRef context, + ffi.Pointer protocol, ) { - return _CFBundleUnloadExecutable( - bundle, + return _SSLGetProtocolVersion( + context, + protocol, ); } - late final _CFBundleUnloadExecutablePtr = - _lookup>( - 'CFBundleUnloadExecutable'); - late final _CFBundleUnloadExecutable = - _CFBundleUnloadExecutablePtr.asFunction(); + late final _SSLGetProtocolVersionPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetProtocolVersion'); + late final _SSLGetProtocolVersion = _SSLGetProtocolVersionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - ffi.Pointer CFBundleGetFunctionPointerForName( - CFBundleRef bundle, - CFStringRef functionName, + int SSLSetCertificate( + SSLContextRef context, + CFArrayRef certRefs, ) { - return _CFBundleGetFunctionPointerForName( - bundle, - functionName, + return _SSLSetCertificate( + context, + certRefs, ); } - late final _CFBundleGetFunctionPointerForNamePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFBundleRef, CFStringRef)>>('CFBundleGetFunctionPointerForName'); - late final _CFBundleGetFunctionPointerForName = - _CFBundleGetFunctionPointerForNamePtr.asFunction< - ffi.Pointer Function(CFBundleRef, CFStringRef)>(); + late final _SSLSetCertificatePtr = + _lookup>( + 'SSLSetCertificate'); + late final _SSLSetCertificate = _SSLSetCertificatePtr.asFunction< + int Function(SSLContextRef, CFArrayRef)>(); - void CFBundleGetFunctionPointersForNames( - CFBundleRef bundle, - CFArrayRef functionNames, - ffi.Pointer> ftbl, + int SSLSetConnection( + SSLContextRef context, + SSLConnectionRef connection, ) { - return _CFBundleGetFunctionPointersForNames( - bundle, - functionNames, - ftbl, + return _SSLSetConnection( + context, + connection, ); } - late final _CFBundleGetFunctionPointersForNamesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBundleRef, CFArrayRef, - ffi.Pointer>)>>( - 'CFBundleGetFunctionPointersForNames'); - late final _CFBundleGetFunctionPointersForNames = - _CFBundleGetFunctionPointersForNamesPtr.asFunction< - void Function( - CFBundleRef, CFArrayRef, ffi.Pointer>)>(); + late final _SSLSetConnectionPtr = _lookup< + ffi + .NativeFunction>( + 'SSLSetConnection'); + late final _SSLSetConnection = _SSLSetConnectionPtr.asFunction< + int Function(SSLContextRef, SSLConnectionRef)>(); - ffi.Pointer CFBundleGetDataPointerForName( - CFBundleRef bundle, - CFStringRef symbolName, + int SSLGetConnection( + SSLContextRef context, + ffi.Pointer connection, ) { - return _CFBundleGetDataPointerForName( - bundle, - symbolName, + return _SSLGetConnection( + context, + connection, ); } - late final _CFBundleGetDataPointerForNamePtr = _lookup< + late final _SSLGetConnectionPtr = _lookup< ffi.NativeFunction< - ffi.Pointer Function( - CFBundleRef, CFStringRef)>>('CFBundleGetDataPointerForName'); - late final _CFBundleGetDataPointerForName = _CFBundleGetDataPointerForNamePtr - .asFunction Function(CFBundleRef, CFStringRef)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetConnection'); + late final _SSLGetConnection = _SSLGetConnectionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - void CFBundleGetDataPointersForNames( - CFBundleRef bundle, - CFArrayRef symbolNames, - ffi.Pointer> stbl, + int SSLSetPeerDomainName( + SSLContextRef context, + ffi.Pointer peerName, + int peerNameLen, ) { - return _CFBundleGetDataPointersForNames( - bundle, - symbolNames, - stbl, + return _SSLSetPeerDomainName( + context, + peerName, + peerNameLen, ); } - late final _CFBundleGetDataPointersForNamesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFBundleRef, CFArrayRef, - ffi.Pointer>)>>( - 'CFBundleGetDataPointersForNames'); - late final _CFBundleGetDataPointersForNames = - _CFBundleGetDataPointersForNamesPtr.asFunction< - void Function( - CFBundleRef, CFArrayRef, ffi.Pointer>)>(); + late final _SSLSetPeerDomainNamePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetPeerDomainName'); + late final _SSLSetPeerDomainName = _SSLSetPeerDomainNamePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - CFURLRef CFBundleCopyAuxiliaryExecutableURL( - CFBundleRef bundle, - CFStringRef executableName, + int SSLGetPeerDomainNameLength( + SSLContextRef context, + ffi.Pointer peerNameLen, ) { - return _CFBundleCopyAuxiliaryExecutableURL( - bundle, - executableName, + return _SSLGetPeerDomainNameLength( + context, + peerNameLen, ); } - late final _CFBundleCopyAuxiliaryExecutableURLPtr = - _lookup>( - 'CFBundleCopyAuxiliaryExecutableURL'); - late final _CFBundleCopyAuxiliaryExecutableURL = - _CFBundleCopyAuxiliaryExecutableURLPtr.asFunction< - CFURLRef Function(CFBundleRef, CFStringRef)>(); + late final _SSLGetPeerDomainNameLengthPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetPeerDomainNameLength'); + late final _SSLGetPeerDomainNameLength = _SSLGetPeerDomainNameLengthPtr + .asFunction)>(); - int CFBundleIsExecutableLoadable( - CFBundleRef bundle, + int SSLGetPeerDomainName( + SSLContextRef context, + ffi.Pointer peerName, + ffi.Pointer peerNameLen, ) { - return _CFBundleIsExecutableLoadable( - bundle, + return _SSLGetPeerDomainName( + context, + peerName, + peerNameLen, ); } - late final _CFBundleIsExecutableLoadablePtr = - _lookup>( - 'CFBundleIsExecutableLoadable'); - late final _CFBundleIsExecutableLoadable = - _CFBundleIsExecutableLoadablePtr.asFunction(); + late final _SSLGetPeerDomainNamePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLGetPeerDomainName'); + late final _SSLGetPeerDomainName = _SSLGetPeerDomainNamePtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - int CFBundleIsExecutableLoadableForURL( - CFURLRef url, + int SSLCopyRequestedPeerNameLength( + SSLContextRef ctx, + ffi.Pointer peerNameLen, ) { - return _CFBundleIsExecutableLoadableForURL( - url, + return _SSLCopyRequestedPeerNameLength( + ctx, + peerNameLen, ); } - late final _CFBundleIsExecutableLoadableForURLPtr = - _lookup>( - 'CFBundleIsExecutableLoadableForURL'); - late final _CFBundleIsExecutableLoadableForURL = - _CFBundleIsExecutableLoadableForURLPtr.asFunction< - int Function(CFURLRef)>(); + late final _SSLCopyRequestedPeerNameLengthPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyRequestedPeerNameLength'); + late final _SSLCopyRequestedPeerNameLength = + _SSLCopyRequestedPeerNameLengthPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - int CFBundleIsArchitectureLoadable( - int arch, + int SSLCopyRequestedPeerName( + SSLContextRef context, + ffi.Pointer peerName, + ffi.Pointer peerNameLen, ) { - return _CFBundleIsArchitectureLoadable( - arch, + return _SSLCopyRequestedPeerName( + context, + peerName, + peerNameLen, ); } - late final _CFBundleIsArchitectureLoadablePtr = - _lookup>( - 'CFBundleIsArchitectureLoadable'); - late final _CFBundleIsArchitectureLoadable = - _CFBundleIsArchitectureLoadablePtr.asFunction(); + late final _SSLCopyRequestedPeerNamePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLCopyRequestedPeerName'); + late final _SSLCopyRequestedPeerName = + _SSLCopyRequestedPeerNamePtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - CFPlugInRef CFBundleGetPlugIn( - CFBundleRef bundle, + int SSLSetDatagramHelloCookie( + SSLContextRef dtlsContext, + ffi.Pointer cookie, + int cookieLen, ) { - return _CFBundleGetPlugIn( - bundle, + return _SSLSetDatagramHelloCookie( + dtlsContext, + cookie, + cookieLen, ); } - late final _CFBundleGetPlugInPtr = - _lookup>( - 'CFBundleGetPlugIn'); - late final _CFBundleGetPlugIn = - _CFBundleGetPlugInPtr.asFunction(); + late final _SSLSetDatagramHelloCookiePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetDatagramHelloCookie'); + late final _SSLSetDatagramHelloCookie = _SSLSetDatagramHelloCookiePtr + .asFunction, int)>(); - int CFBundleOpenBundleResourceMap( - CFBundleRef bundle, + int SSLSetMaxDatagramRecordSize( + SSLContextRef dtlsContext, + int maxSize, ) { - return _CFBundleOpenBundleResourceMap( - bundle, + return _SSLSetMaxDatagramRecordSize( + dtlsContext, + maxSize, ); } - late final _CFBundleOpenBundleResourceMapPtr = - _lookup>( - 'CFBundleOpenBundleResourceMap'); - late final _CFBundleOpenBundleResourceMap = - _CFBundleOpenBundleResourceMapPtr.asFunction(); + late final _SSLSetMaxDatagramRecordSizePtr = + _lookup>( + 'SSLSetMaxDatagramRecordSize'); + late final _SSLSetMaxDatagramRecordSize = _SSLSetMaxDatagramRecordSizePtr + .asFunction(); - int CFBundleOpenBundleResourceFiles( - CFBundleRef bundle, - ffi.Pointer refNum, - ffi.Pointer localizedRefNum, + int SSLGetMaxDatagramRecordSize( + SSLContextRef dtlsContext, + ffi.Pointer maxSize, ) { - return _CFBundleOpenBundleResourceFiles( - bundle, - refNum, - localizedRefNum, + return _SSLGetMaxDatagramRecordSize( + dtlsContext, + maxSize, ); } - late final _CFBundleOpenBundleResourceFilesPtr = _lookup< + late final _SSLGetMaxDatagramRecordSizePtr = _lookup< ffi.NativeFunction< - SInt32 Function(CFBundleRef, ffi.Pointer, - ffi.Pointer)>>('CFBundleOpenBundleResourceFiles'); - late final _CFBundleOpenBundleResourceFiles = - _CFBundleOpenBundleResourceFilesPtr.asFunction< - int Function(CFBundleRef, ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetMaxDatagramRecordSize'); + late final _SSLGetMaxDatagramRecordSize = _SSLGetMaxDatagramRecordSizePtr + .asFunction)>(); - void CFBundleCloseBundleResourceMap( - CFBundleRef bundle, - int refNum, + int SSLGetNegotiatedProtocolVersion( + SSLContextRef context, + ffi.Pointer protocol, ) { - return _CFBundleCloseBundleResourceMap( - bundle, - refNum, + return _SSLGetNegotiatedProtocolVersion( + context, + protocol, ); } - late final _CFBundleCloseBundleResourceMapPtr = _lookup< - ffi.NativeFunction>( - 'CFBundleCloseBundleResourceMap'); - late final _CFBundleCloseBundleResourceMap = - _CFBundleCloseBundleResourceMapPtr.asFunction< - void Function(CFBundleRef, int)>(); + late final _SSLGetNegotiatedProtocolVersionPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer)>>( + 'SSLGetNegotiatedProtocolVersion'); + late final _SSLGetNegotiatedProtocolVersion = + _SSLGetNegotiatedProtocolVersionPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - int CFMessagePortGetTypeID() { - return _CFMessagePortGetTypeID(); + int SSLGetNumberSupportedCiphers( + SSLContextRef context, + ffi.Pointer numCiphers, + ) { + return _SSLGetNumberSupportedCiphers( + context, + numCiphers, + ); } - late final _CFMessagePortGetTypeIDPtr = - _lookup>( - 'CFMessagePortGetTypeID'); - late final _CFMessagePortGetTypeID = - _CFMessagePortGetTypeIDPtr.asFunction(); + late final _SSLGetNumberSupportedCiphersPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNumberSupportedCiphers'); + late final _SSLGetNumberSupportedCiphers = _SSLGetNumberSupportedCiphersPtr + .asFunction)>(); - CFMessagePortRef CFMessagePortCreateLocal( - CFAllocatorRef allocator, - CFStringRef name, - CFMessagePortCallBack callout, - ffi.Pointer context, - ffi.Pointer shouldFreeInfo, + int SSLGetSupportedCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + ffi.Pointer numCiphers, ) { - return _CFMessagePortCreateLocal( - allocator, - name, - callout, + return _SSLGetSupportedCiphers( context, - shouldFreeInfo, + ciphers, + numCiphers, ); } - late final _CFMessagePortCreateLocalPtr = _lookup< + late final _SSLGetSupportedCiphersPtr = _lookup< ffi.NativeFunction< - CFMessagePortRef Function( - CFAllocatorRef, - CFStringRef, - CFMessagePortCallBack, - ffi.Pointer, - ffi.Pointer)>>('CFMessagePortCreateLocal'); - late final _CFMessagePortCreateLocal = - _CFMessagePortCreateLocalPtr.asFunction< - CFMessagePortRef Function( - CFAllocatorRef, - CFStringRef, - CFMessagePortCallBack, - ffi.Pointer, - ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLGetSupportedCiphers'); + late final _SSLGetSupportedCiphers = _SSLGetSupportedCiphersPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - CFMessagePortRef CFMessagePortCreateRemote( - CFAllocatorRef allocator, - CFStringRef name, + int SSLGetNumberEnabledCiphers( + SSLContextRef context, + ffi.Pointer numCiphers, ) { - return _CFMessagePortCreateRemote( - allocator, - name, + return _SSLGetNumberEnabledCiphers( + context, + numCiphers, ); } - late final _CFMessagePortCreateRemotePtr = _lookup< + late final _SSLGetNumberEnabledCiphersPtr = _lookup< ffi.NativeFunction< - CFMessagePortRef Function( - CFAllocatorRef, CFStringRef)>>('CFMessagePortCreateRemote'); - late final _CFMessagePortCreateRemote = _CFMessagePortCreateRemotePtr - .asFunction(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNumberEnabledCiphers'); + late final _SSLGetNumberEnabledCiphers = _SSLGetNumberEnabledCiphersPtr + .asFunction)>(); - int CFMessagePortIsRemote( - CFMessagePortRef ms, + int SSLSetEnabledCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + int numCiphers, ) { - return _CFMessagePortIsRemote( - ms, + return _SSLSetEnabledCiphers( + context, + ciphers, + numCiphers, ); } - late final _CFMessagePortIsRemotePtr = - _lookup>( - 'CFMessagePortIsRemote'); - late final _CFMessagePortIsRemote = - _CFMessagePortIsRemotePtr.asFunction(); + late final _SSLSetEnabledCiphersPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetEnabledCiphers'); + late final _SSLSetEnabledCiphers = _SSLSetEnabledCiphersPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - CFStringRef CFMessagePortGetName( - CFMessagePortRef ms, + int SSLGetEnabledCiphers( + SSLContextRef context, + ffi.Pointer ciphers, + ffi.Pointer numCiphers, ) { - return _CFMessagePortGetName( - ms, + return _SSLGetEnabledCiphers( + context, + ciphers, + numCiphers, ); } - late final _CFMessagePortGetNamePtr = - _lookup>( - 'CFMessagePortGetName'); - late final _CFMessagePortGetName = _CFMessagePortGetNamePtr.asFunction< - CFStringRef Function(CFMessagePortRef)>(); + late final _SSLGetEnabledCiphersPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Pointer)>>('SSLGetEnabledCiphers'); + late final _SSLGetEnabledCiphers = _SSLGetEnabledCiphersPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, ffi.Pointer)>(); - int CFMessagePortSetName( - CFMessagePortRef ms, - CFStringRef newName, + int SSLSetSessionTicketsEnabled( + SSLContextRef context, + int enabled, ) { - return _CFMessagePortSetName( - ms, - newName, + return _SSLSetSessionTicketsEnabled( + context, + enabled, ); } - late final _CFMessagePortSetNamePtr = _lookup< - ffi.NativeFunction>( - 'CFMessagePortSetName'); - late final _CFMessagePortSetName = _CFMessagePortSetNamePtr.asFunction< - int Function(CFMessagePortRef, CFStringRef)>(); + late final _SSLSetSessionTicketsEnabledPtr = + _lookup>( + 'SSLSetSessionTicketsEnabled'); + late final _SSLSetSessionTicketsEnabled = _SSLSetSessionTicketsEnabledPtr + .asFunction(); - void CFMessagePortGetContext( - CFMessagePortRef ms, - ffi.Pointer context, + int SSLSetEnableCertVerify( + SSLContextRef context, + int enableVerify, ) { - return _CFMessagePortGetContext( - ms, + return _SSLSetEnableCertVerify( context, + enableVerify, ); } - late final _CFMessagePortGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMessagePortRef, - ffi.Pointer)>>('CFMessagePortGetContext'); - late final _CFMessagePortGetContext = _CFMessagePortGetContextPtr.asFunction< - void Function(CFMessagePortRef, ffi.Pointer)>(); + late final _SSLSetEnableCertVerifyPtr = + _lookup>( + 'SSLSetEnableCertVerify'); + late final _SSLSetEnableCertVerify = + _SSLSetEnableCertVerifyPtr.asFunction(); - void CFMessagePortInvalidate( - CFMessagePortRef ms, + int SSLGetEnableCertVerify( + SSLContextRef context, + ffi.Pointer enableVerify, ) { - return _CFMessagePortInvalidate( - ms, + return _SSLGetEnableCertVerify( + context, + enableVerify, ); } - late final _CFMessagePortInvalidatePtr = - _lookup>( - 'CFMessagePortInvalidate'); - late final _CFMessagePortInvalidate = - _CFMessagePortInvalidatePtr.asFunction(); + late final _SSLGetEnableCertVerifyPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetEnableCertVerify'); + late final _SSLGetEnableCertVerify = _SSLGetEnableCertVerifyPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - int CFMessagePortIsValid( - CFMessagePortRef ms, + int SSLSetAllowsExpiredCerts( + SSLContextRef context, + int allowsExpired, ) { - return _CFMessagePortIsValid( - ms, + return _SSLSetAllowsExpiredCerts( + context, + allowsExpired, ); } - late final _CFMessagePortIsValidPtr = - _lookup>( - 'CFMessagePortIsValid'); - late final _CFMessagePortIsValid = - _CFMessagePortIsValidPtr.asFunction(); + late final _SSLSetAllowsExpiredCertsPtr = + _lookup>( + 'SSLSetAllowsExpiredCerts'); + late final _SSLSetAllowsExpiredCerts = _SSLSetAllowsExpiredCertsPtr + .asFunction(); - CFMessagePortInvalidationCallBack CFMessagePortGetInvalidationCallBack( - CFMessagePortRef ms, + int SSLGetAllowsExpiredCerts( + SSLContextRef context, + ffi.Pointer allowsExpired, ) { - return _CFMessagePortGetInvalidationCallBack( - ms, + return _SSLGetAllowsExpiredCerts( + context, + allowsExpired, ); } - late final _CFMessagePortGetInvalidationCallBackPtr = _lookup< + late final _SSLGetAllowsExpiredCertsPtr = _lookup< ffi.NativeFunction< - CFMessagePortInvalidationCallBack Function( - CFMessagePortRef)>>('CFMessagePortGetInvalidationCallBack'); - late final _CFMessagePortGetInvalidationCallBack = - _CFMessagePortGetInvalidationCallBackPtr.asFunction< - CFMessagePortInvalidationCallBack Function(CFMessagePortRef)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetAllowsExpiredCerts'); + late final _SSLGetAllowsExpiredCerts = _SSLGetAllowsExpiredCertsPtr + .asFunction)>(); - void CFMessagePortSetInvalidationCallBack( - CFMessagePortRef ms, - CFMessagePortInvalidationCallBack callout, + int SSLSetAllowsExpiredRoots( + SSLContextRef context, + int allowsExpired, ) { - return _CFMessagePortSetInvalidationCallBack( - ms, - callout, - ); + return _SSLSetAllowsExpiredRoots( + context, + allowsExpired, + ); } - late final _CFMessagePortSetInvalidationCallBackPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMessagePortRef, CFMessagePortInvalidationCallBack)>>( - 'CFMessagePortSetInvalidationCallBack'); - late final _CFMessagePortSetInvalidationCallBack = - _CFMessagePortSetInvalidationCallBackPtr.asFunction< - void Function(CFMessagePortRef, CFMessagePortInvalidationCallBack)>(); + late final _SSLSetAllowsExpiredRootsPtr = + _lookup>( + 'SSLSetAllowsExpiredRoots'); + late final _SSLSetAllowsExpiredRoots = _SSLSetAllowsExpiredRootsPtr + .asFunction(); - int CFMessagePortSendRequest( - CFMessagePortRef remote, - int msgid, - CFDataRef data, - double sendTimeout, - double rcvTimeout, - CFStringRef replyMode, - ffi.Pointer returnData, + int SSLGetAllowsExpiredRoots( + SSLContextRef context, + ffi.Pointer allowsExpired, ) { - return _CFMessagePortSendRequest( - remote, - msgid, - data, - sendTimeout, - rcvTimeout, - replyMode, - returnData, + return _SSLGetAllowsExpiredRoots( + context, + allowsExpired, ); } - late final _CFMessagePortSendRequestPtr = _lookup< + late final _SSLGetAllowsExpiredRootsPtr = _lookup< ffi.NativeFunction< - SInt32 Function( - CFMessagePortRef, - SInt32, - CFDataRef, - CFTimeInterval, - CFTimeInterval, - CFStringRef, - ffi.Pointer)>>('CFMessagePortSendRequest'); - late final _CFMessagePortSendRequest = - _CFMessagePortSendRequestPtr.asFunction< - int Function(CFMessagePortRef, int, CFDataRef, double, double, - CFStringRef, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetAllowsExpiredRoots'); + late final _SSLGetAllowsExpiredRoots = _SSLGetAllowsExpiredRootsPtr + .asFunction)>(); - CFRunLoopSourceRef CFMessagePortCreateRunLoopSource( - CFAllocatorRef allocator, - CFMessagePortRef local, - int order, + int SSLSetAllowsAnyRoot( + SSLContextRef context, + int anyRoot, ) { - return _CFMessagePortCreateRunLoopSource( - allocator, - local, - order, + return _SSLSetAllowsAnyRoot( + context, + anyRoot, ); } - late final _CFMessagePortCreateRunLoopSourcePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, - CFIndex)>>('CFMessagePortCreateRunLoopSource'); - late final _CFMessagePortCreateRunLoopSource = - _CFMessagePortCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMessagePortRef, int)>(); + late final _SSLSetAllowsAnyRootPtr = + _lookup>( + 'SSLSetAllowsAnyRoot'); + late final _SSLSetAllowsAnyRoot = + _SSLSetAllowsAnyRootPtr.asFunction(); - void CFMessagePortSetDispatchQueue( - CFMessagePortRef ms, - dispatch_queue_t queue, + int SSLGetAllowsAnyRoot( + SSLContextRef context, + ffi.Pointer anyRoot, ) { - return _CFMessagePortSetDispatchQueue( - ms, - queue, + return _SSLGetAllowsAnyRoot( + context, + anyRoot, ); } - late final _CFMessagePortSetDispatchQueuePtr = _lookup< + late final _SSLGetAllowsAnyRootPtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMessagePortRef, - dispatch_queue_t)>>('CFMessagePortSetDispatchQueue'); - late final _CFMessagePortSetDispatchQueue = _CFMessagePortSetDispatchQueuePtr - .asFunction(); - - late final ffi.Pointer _kCFPlugInDynamicRegistrationKey = - _lookup('kCFPlugInDynamicRegistrationKey'); - - CFStringRef get kCFPlugInDynamicRegistrationKey => - _kCFPlugInDynamicRegistrationKey.value; - - late final ffi.Pointer _kCFPlugInDynamicRegisterFunctionKey = - _lookup('kCFPlugInDynamicRegisterFunctionKey'); - - CFStringRef get kCFPlugInDynamicRegisterFunctionKey => - _kCFPlugInDynamicRegisterFunctionKey.value; - - late final ffi.Pointer _kCFPlugInUnloadFunctionKey = - _lookup('kCFPlugInUnloadFunctionKey'); - - CFStringRef get kCFPlugInUnloadFunctionKey => - _kCFPlugInUnloadFunctionKey.value; - - late final ffi.Pointer _kCFPlugInFactoriesKey = - _lookup('kCFPlugInFactoriesKey'); - - CFStringRef get kCFPlugInFactoriesKey => _kCFPlugInFactoriesKey.value; - - late final ffi.Pointer _kCFPlugInTypesKey = - _lookup('kCFPlugInTypesKey'); - - CFStringRef get kCFPlugInTypesKey => _kCFPlugInTypesKey.value; + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetAllowsAnyRoot'); + late final _SSLGetAllowsAnyRoot = _SSLGetAllowsAnyRootPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - int CFPlugInGetTypeID() { - return _CFPlugInGetTypeID(); + int SSLSetTrustedRoots( + SSLContextRef context, + CFArrayRef trustedRoots, + int replaceExisting, + ) { + return _SSLSetTrustedRoots( + context, + trustedRoots, + replaceExisting, + ); } - late final _CFPlugInGetTypeIDPtr = - _lookup>('CFPlugInGetTypeID'); - late final _CFPlugInGetTypeID = - _CFPlugInGetTypeIDPtr.asFunction(); + late final _SSLSetTrustedRootsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, CFArrayRef, Boolean)>>('SSLSetTrustedRoots'); + late final _SSLSetTrustedRoots = _SSLSetTrustedRootsPtr.asFunction< + int Function(SSLContextRef, CFArrayRef, int)>(); - CFPlugInRef CFPlugInCreate( - CFAllocatorRef allocator, - CFURLRef plugInURL, + int SSLCopyTrustedRoots( + SSLContextRef context, + ffi.Pointer trustedRoots, ) { - return _CFPlugInCreate( - allocator, - plugInURL, + return _SSLCopyTrustedRoots( + context, + trustedRoots, ); } - late final _CFPlugInCreatePtr = _lookup< - ffi.NativeFunction>( - 'CFPlugInCreate'); - late final _CFPlugInCreate = _CFPlugInCreatePtr.asFunction< - CFPlugInRef Function(CFAllocatorRef, CFURLRef)>(); + late final _SSLCopyTrustedRootsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyTrustedRoots'); + late final _SSLCopyTrustedRoots = _SSLCopyTrustedRootsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - CFBundleRef CFPlugInGetBundle( - CFPlugInRef plugIn, + int SSLCopyPeerCertificates( + SSLContextRef context, + ffi.Pointer certs, ) { - return _CFPlugInGetBundle( - plugIn, + return _SSLCopyPeerCertificates( + context, + certs, ); } - late final _CFPlugInGetBundlePtr = - _lookup>( - 'CFPlugInGetBundle'); - late final _CFPlugInGetBundle = - _CFPlugInGetBundlePtr.asFunction(); + late final _SSLCopyPeerCertificatesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyPeerCertificates'); + late final _SSLCopyPeerCertificates = _SSLCopyPeerCertificatesPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - void CFPlugInSetLoadOnDemand( - CFPlugInRef plugIn, - int flag, + int SSLCopyPeerTrust( + SSLContextRef context, + ffi.Pointer trust, ) { - return _CFPlugInSetLoadOnDemand( - plugIn, - flag, + return _SSLCopyPeerTrust( + context, + trust, ); } - late final _CFPlugInSetLoadOnDemandPtr = - _lookup>( - 'CFPlugInSetLoadOnDemand'); - late final _CFPlugInSetLoadOnDemand = - _CFPlugInSetLoadOnDemandPtr.asFunction(); + late final _SSLCopyPeerTrustPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyPeerTrust'); + late final _SSLCopyPeerTrust = _SSLCopyPeerTrustPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - int CFPlugInIsLoadOnDemand( - CFPlugInRef plugIn, + int SSLSetPeerID( + SSLContextRef context, + ffi.Pointer peerID, + int peerIDLen, ) { - return _CFPlugInIsLoadOnDemand( - plugIn, + return _SSLSetPeerID( + context, + peerID, + peerIDLen, ); } - late final _CFPlugInIsLoadOnDemandPtr = - _lookup>( - 'CFPlugInIsLoadOnDemand'); - late final _CFPlugInIsLoadOnDemand = - _CFPlugInIsLoadOnDemandPtr.asFunction(); + late final _SSLSetPeerIDPtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer, ffi.Size)>>('SSLSetPeerID'); + late final _SSLSetPeerID = _SSLSetPeerIDPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - CFArrayRef CFPlugInFindFactoriesForPlugInType( - CFUUIDRef typeUUID, + int SSLGetPeerID( + SSLContextRef context, + ffi.Pointer> peerID, + ffi.Pointer peerIDLen, ) { - return _CFPlugInFindFactoriesForPlugInType( - typeUUID, + return _SSLGetPeerID( + context, + peerID, + peerIDLen, ); } - late final _CFPlugInFindFactoriesForPlugInTypePtr = - _lookup>( - 'CFPlugInFindFactoriesForPlugInType'); - late final _CFPlugInFindFactoriesForPlugInType = - _CFPlugInFindFactoriesForPlugInTypePtr.asFunction< - CFArrayRef Function(CFUUIDRef)>(); + late final _SSLGetPeerIDPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>>('SSLGetPeerID'); + late final _SSLGetPeerID = _SSLGetPeerIDPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>(); - CFArrayRef CFPlugInFindFactoriesForPlugInTypeInPlugIn( - CFUUIDRef typeUUID, - CFPlugInRef plugIn, + int SSLGetNegotiatedCipher( + SSLContextRef context, + ffi.Pointer cipherSuite, ) { - return _CFPlugInFindFactoriesForPlugInTypeInPlugIn( - typeUUID, - plugIn, + return _SSLGetNegotiatedCipher( + context, + cipherSuite, ); } - late final _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr = - _lookup>( - 'CFPlugInFindFactoriesForPlugInTypeInPlugIn'); - late final _CFPlugInFindFactoriesForPlugInTypeInPlugIn = - _CFPlugInFindFactoriesForPlugInTypeInPlugInPtr.asFunction< - CFArrayRef Function(CFUUIDRef, CFPlugInRef)>(); + late final _SSLGetNegotiatedCipherPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetNegotiatedCipher'); + late final _SSLGetNegotiatedCipher = _SSLGetNegotiatedCipherPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - ffi.Pointer CFPlugInInstanceCreate( - CFAllocatorRef allocator, - CFUUIDRef factoryUUID, - CFUUIDRef typeUUID, + int SSLSetALPNProtocols( + SSLContextRef context, + CFArrayRef protocols, ) { - return _CFPlugInInstanceCreate( - allocator, - factoryUUID, - typeUUID, + return _SSLSetALPNProtocols( + context, + protocols, ); } - late final _CFPlugInInstanceCreatePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef, CFUUIDRef, CFUUIDRef)>>('CFPlugInInstanceCreate'); - late final _CFPlugInInstanceCreate = _CFPlugInInstanceCreatePtr.asFunction< - ffi.Pointer Function(CFAllocatorRef, CFUUIDRef, CFUUIDRef)>(); + late final _SSLSetALPNProtocolsPtr = + _lookup>( + 'SSLSetALPNProtocols'); + late final _SSLSetALPNProtocols = _SSLSetALPNProtocolsPtr.asFunction< + int Function(SSLContextRef, CFArrayRef)>(); - int CFPlugInRegisterFactoryFunction( - CFUUIDRef factoryUUID, - CFPlugInFactoryFunction func, + int SSLCopyALPNProtocols( + SSLContextRef context, + ffi.Pointer protocols, ) { - return _CFPlugInRegisterFactoryFunction( - factoryUUID, - func, + return _SSLCopyALPNProtocols( + context, + protocols, ); } - late final _CFPlugInRegisterFactoryFunctionPtr = _lookup< + late final _SSLCopyALPNProtocolsPtr = _lookup< ffi.NativeFunction< - Boolean Function(CFUUIDRef, - CFPlugInFactoryFunction)>>('CFPlugInRegisterFactoryFunction'); - late final _CFPlugInRegisterFactoryFunction = - _CFPlugInRegisterFactoryFunctionPtr.asFunction< - int Function(CFUUIDRef, CFPlugInFactoryFunction)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLCopyALPNProtocols'); + late final _SSLCopyALPNProtocols = _SSLCopyALPNProtocolsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - int CFPlugInRegisterFactoryFunctionByName( - CFUUIDRef factoryUUID, - CFPlugInRef plugIn, - CFStringRef functionName, + int SSLSetOCSPResponse( + SSLContextRef context, + CFDataRef response, ) { - return _CFPlugInRegisterFactoryFunctionByName( - factoryUUID, - plugIn, - functionName, + return _SSLSetOCSPResponse( + context, + response, ); } - late final _CFPlugInRegisterFactoryFunctionByNamePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFUUIDRef, CFPlugInRef, - CFStringRef)>>('CFPlugInRegisterFactoryFunctionByName'); - late final _CFPlugInRegisterFactoryFunctionByName = - _CFPlugInRegisterFactoryFunctionByNamePtr.asFunction< - int Function(CFUUIDRef, CFPlugInRef, CFStringRef)>(); + late final _SSLSetOCSPResponsePtr = + _lookup>( + 'SSLSetOCSPResponse'); + late final _SSLSetOCSPResponse = _SSLSetOCSPResponsePtr.asFunction< + int Function(SSLContextRef, CFDataRef)>(); - int CFPlugInUnregisterFactory( - CFUUIDRef factoryUUID, + int SSLSetEncryptionCertificate( + SSLContextRef context, + CFArrayRef certRefs, ) { - return _CFPlugInUnregisterFactory( - factoryUUID, + return _SSLSetEncryptionCertificate( + context, + certRefs, ); } - late final _CFPlugInUnregisterFactoryPtr = - _lookup>( - 'CFPlugInUnregisterFactory'); - late final _CFPlugInUnregisterFactory = - _CFPlugInUnregisterFactoryPtr.asFunction(); + late final _SSLSetEncryptionCertificatePtr = + _lookup>( + 'SSLSetEncryptionCertificate'); + late final _SSLSetEncryptionCertificate = _SSLSetEncryptionCertificatePtr + .asFunction(); - int CFPlugInRegisterPlugInType( - CFUUIDRef factoryUUID, - CFUUIDRef typeUUID, + DartSInt32 SSLSetClientSideAuthenticate( + SSLContextRef context, + SSLAuthenticate auth, ) { - return _CFPlugInRegisterPlugInType( - factoryUUID, - typeUUID, + return _SSLSetClientSideAuthenticate( + context, + auth.value, ); } - late final _CFPlugInRegisterPlugInTypePtr = - _lookup>( - 'CFPlugInRegisterPlugInType'); - late final _CFPlugInRegisterPlugInType = _CFPlugInRegisterPlugInTypePtr - .asFunction(); + late final _SSLSetClientSideAuthenticatePtr = _lookup< + ffi + .NativeFunction>( + 'SSLSetClientSideAuthenticate'); + late final _SSLSetClientSideAuthenticate = _SSLSetClientSideAuthenticatePtr + .asFunction(); - int CFPlugInUnregisterPlugInType( - CFUUIDRef factoryUUID, - CFUUIDRef typeUUID, + int SSLAddDistinguishedName( + SSLContextRef context, + ffi.Pointer derDN, + int derDNLen, ) { - return _CFPlugInUnregisterPlugInType( - factoryUUID, - typeUUID, + return _SSLAddDistinguishedName( + context, + derDN, + derDNLen, ); } - late final _CFPlugInUnregisterPlugInTypePtr = - _lookup>( - 'CFPlugInUnregisterPlugInType'); - late final _CFPlugInUnregisterPlugInType = _CFPlugInUnregisterPlugInTypePtr - .asFunction(); + late final _SSLAddDistinguishedNamePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLAddDistinguishedName'); + late final _SSLAddDistinguishedName = _SSLAddDistinguishedNamePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer, int)>(); - void CFPlugInAddInstanceForFactory( - CFUUIDRef factoryID, + int SSLSetCertificateAuthorities( + SSLContextRef context, + CFTypeRef certificateOrArray, + int replaceExisting, ) { - return _CFPlugInAddInstanceForFactory( - factoryID, + return _SSLSetCertificateAuthorities( + context, + certificateOrArray, + replaceExisting, ); } - late final _CFPlugInAddInstanceForFactoryPtr = - _lookup>( - 'CFPlugInAddInstanceForFactory'); - late final _CFPlugInAddInstanceForFactory = - _CFPlugInAddInstanceForFactoryPtr.asFunction(); + late final _SSLSetCertificateAuthoritiesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, CFTypeRef, + Boolean)>>('SSLSetCertificateAuthorities'); + late final _SSLSetCertificateAuthorities = _SSLSetCertificateAuthoritiesPtr + .asFunction(); - void CFPlugInRemoveInstanceForFactory( - CFUUIDRef factoryID, + int SSLCopyCertificateAuthorities( + SSLContextRef context, + ffi.Pointer certificates, ) { - return _CFPlugInRemoveInstanceForFactory( - factoryID, + return _SSLCopyCertificateAuthorities( + context, + certificates, ); } - late final _CFPlugInRemoveInstanceForFactoryPtr = - _lookup>( - 'CFPlugInRemoveInstanceForFactory'); - late final _CFPlugInRemoveInstanceForFactory = - _CFPlugInRemoveInstanceForFactoryPtr.asFunction< - void Function(CFUUIDRef)>(); + late final _SSLCopyCertificateAuthoritiesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyCertificateAuthorities'); + late final _SSLCopyCertificateAuthorities = _SSLCopyCertificateAuthoritiesPtr + .asFunction)>(); - int CFPlugInInstanceGetInterfaceFunctionTable( - CFPlugInInstanceRef instance, - CFStringRef interfaceName, - ffi.Pointer> ftbl, + int SSLCopyDistinguishedNames( + SSLContextRef context, + ffi.Pointer names, ) { - return _CFPlugInInstanceGetInterfaceFunctionTable( - instance, - interfaceName, - ftbl, + return _SSLCopyDistinguishedNames( + context, + names, ); } - late final _CFPlugInInstanceGetInterfaceFunctionTablePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFPlugInInstanceRef, CFStringRef, - ffi.Pointer>)>>( - 'CFPlugInInstanceGetInterfaceFunctionTable'); - late final _CFPlugInInstanceGetInterfaceFunctionTable = - _CFPlugInInstanceGetInterfaceFunctionTablePtr.asFunction< - int Function(CFPlugInInstanceRef, CFStringRef, - ffi.Pointer>)>(); + late final _SSLCopyDistinguishedNamesPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLCopyDistinguishedNames'); + late final _SSLCopyDistinguishedNames = _SSLCopyDistinguishedNamesPtr + .asFunction)>(); - CFStringRef CFPlugInInstanceGetFactoryName( - CFPlugInInstanceRef instance, + int SSLGetClientCertificateState( + SSLContextRef context, + ffi.Pointer clientState, ) { - return _CFPlugInInstanceGetFactoryName( - instance, + return _SSLGetClientCertificateState( + context, + clientState, ); } - late final _CFPlugInInstanceGetFactoryNamePtr = - _lookup>( - 'CFPlugInInstanceGetFactoryName'); - late final _CFPlugInInstanceGetFactoryName = - _CFPlugInInstanceGetFactoryNamePtr.asFunction< - CFStringRef Function(CFPlugInInstanceRef)>(); + late final _SSLGetClientCertificateStatePtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetClientCertificateState'); + late final _SSLGetClientCertificateState = _SSLGetClientCertificateStatePtr + .asFunction)>(); - ffi.Pointer CFPlugInInstanceGetInstanceData( - CFPlugInInstanceRef instance, + int SSLSetDiffieHellmanParams( + SSLContextRef context, + ffi.Pointer dhParams, + int dhParamsLen, ) { - return _CFPlugInInstanceGetInstanceData( - instance, + return _SSLSetDiffieHellmanParams( + context, + dhParams, + dhParamsLen, ); } - late final _CFPlugInInstanceGetInstanceDataPtr = _lookup< - ffi - .NativeFunction Function(CFPlugInInstanceRef)>>( - 'CFPlugInInstanceGetInstanceData'); - late final _CFPlugInInstanceGetInstanceData = - _CFPlugInInstanceGetInstanceDataPtr.asFunction< - ffi.Pointer Function(CFPlugInInstanceRef)>(); - - int CFPlugInInstanceGetTypeID() { - return _CFPlugInInstanceGetTypeID(); - } - - late final _CFPlugInInstanceGetTypeIDPtr = - _lookup>( - 'CFPlugInInstanceGetTypeID'); - late final _CFPlugInInstanceGetTypeID = - _CFPlugInInstanceGetTypeIDPtr.asFunction(); + late final _SSLSetDiffieHellmanParamsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, + ffi.Size)>>('SSLSetDiffieHellmanParams'); + late final _SSLSetDiffieHellmanParams = _SSLSetDiffieHellmanParamsPtr + .asFunction, int)>(); - CFPlugInInstanceRef CFPlugInInstanceCreateWithInstanceDataSize( - CFAllocatorRef allocator, - int instanceDataSize, - CFPlugInInstanceDeallocateInstanceDataFunction deallocateInstanceFunction, - CFStringRef factoryName, - CFPlugInInstanceGetInterfaceFunction getInterfaceFunction, + int SSLGetDiffieHellmanParams( + SSLContextRef context, + ffi.Pointer> dhParams, + ffi.Pointer dhParamsLen, ) { - return _CFPlugInInstanceCreateWithInstanceDataSize( - allocator, - instanceDataSize, - deallocateInstanceFunction, - factoryName, - getInterfaceFunction, + return _SSLGetDiffieHellmanParams( + context, + dhParams, + dhParamsLen, ); } - late final _CFPlugInInstanceCreateWithInstanceDataSizePtr = _lookup< - ffi.NativeFunction< - CFPlugInInstanceRef Function( - CFAllocatorRef, - CFIndex, - CFPlugInInstanceDeallocateInstanceDataFunction, - CFStringRef, - CFPlugInInstanceGetInterfaceFunction)>>( - 'CFPlugInInstanceCreateWithInstanceDataSize'); - late final _CFPlugInInstanceCreateWithInstanceDataSize = - _CFPlugInInstanceCreateWithInstanceDataSizePtr.asFunction< - CFPlugInInstanceRef Function( - CFAllocatorRef, - int, - CFPlugInInstanceDeallocateInstanceDataFunction, - CFStringRef, - CFPlugInInstanceGetInterfaceFunction)>(); + late final _SSLGetDiffieHellmanParamsPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>>('SSLGetDiffieHellmanParams'); + late final _SSLGetDiffieHellmanParams = + _SSLGetDiffieHellmanParamsPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer>, + ffi.Pointer)>(); - int CFMachPortGetTypeID() { - return _CFMachPortGetTypeID(); + int SSLSetRsaBlinding( + SSLContextRef context, + int blinding, + ) { + return _SSLSetRsaBlinding( + context, + blinding, + ); } - late final _CFMachPortGetTypeIDPtr = - _lookup>('CFMachPortGetTypeID'); - late final _CFMachPortGetTypeID = - _CFMachPortGetTypeIDPtr.asFunction(); + late final _SSLSetRsaBlindingPtr = + _lookup>( + 'SSLSetRsaBlinding'); + late final _SSLSetRsaBlinding = + _SSLSetRsaBlindingPtr.asFunction(); - CFMachPortRef CFMachPortCreate( - CFAllocatorRef allocator, - CFMachPortCallBack callout, - ffi.Pointer context, - ffi.Pointer shouldFreeInfo, + int SSLGetRsaBlinding( + SSLContextRef context, + ffi.Pointer blinding, ) { - return _CFMachPortCreate( - allocator, - callout, + return _SSLGetRsaBlinding( context, - shouldFreeInfo, + blinding, ); } - late final _CFMachPortCreatePtr = _lookup< + late final _SSLGetRsaBlindingPtr = _lookup< ffi.NativeFunction< - CFMachPortRef Function( - CFAllocatorRef, - CFMachPortCallBack, - ffi.Pointer, - ffi.Pointer)>>('CFMachPortCreate'); - late final _CFMachPortCreate = _CFMachPortCreatePtr.asFunction< - CFMachPortRef Function(CFAllocatorRef, CFMachPortCallBack, - ffi.Pointer, ffi.Pointer)>(); + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetRsaBlinding'); + late final _SSLGetRsaBlinding = _SSLGetRsaBlindingPtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - CFMachPortRef CFMachPortCreateWithPort( - CFAllocatorRef allocator, - int portNum, - CFMachPortCallBack callout, - ffi.Pointer context, - ffi.Pointer shouldFreeInfo, + int SSLHandshake( + SSLContextRef context, ) { - return _CFMachPortCreateWithPort( - allocator, - portNum, - callout, + return _SSLHandshake( context, - shouldFreeInfo, ); } - late final _CFMachPortCreateWithPortPtr = _lookup< - ffi.NativeFunction< - CFMachPortRef Function( - CFAllocatorRef, - mach_port_t, - CFMachPortCallBack, - ffi.Pointer, - ffi.Pointer)>>('CFMachPortCreateWithPort'); - late final _CFMachPortCreateWithPort = - _CFMachPortCreateWithPortPtr.asFunction< - CFMachPortRef Function(CFAllocatorRef, int, CFMachPortCallBack, - ffi.Pointer, ffi.Pointer)>(); + late final _SSLHandshakePtr = + _lookup>( + 'SSLHandshake'); + late final _SSLHandshake = + _SSLHandshakePtr.asFunction(); - int CFMachPortGetPort( - CFMachPortRef port, + int SSLReHandshake( + SSLContextRef context, ) { - return _CFMachPortGetPort( - port, + return _SSLReHandshake( + context, ); } - late final _CFMachPortGetPortPtr = - _lookup>( - 'CFMachPortGetPort'); - late final _CFMachPortGetPort = - _CFMachPortGetPortPtr.asFunction(); + late final _SSLReHandshakePtr = + _lookup>( + 'SSLReHandshake'); + late final _SSLReHandshake = + _SSLReHandshakePtr.asFunction(); - void CFMachPortGetContext( - CFMachPortRef port, - ffi.Pointer context, + int SSLWrite( + SSLContextRef context, + ffi.Pointer data, + int dataLength, + ffi.Pointer processed, ) { - return _CFMachPortGetContext( - port, + return _SSLWrite( context, + data, + dataLength, + processed, ); } - late final _CFMachPortGetContextPtr = _lookup< + late final _SSLWritePtr = _lookup< ffi.NativeFunction< - ffi.Void Function(CFMachPortRef, - ffi.Pointer)>>('CFMachPortGetContext'); - late final _CFMachPortGetContext = _CFMachPortGetContextPtr.asFunction< - void Function(CFMachPortRef, ffi.Pointer)>(); + OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, + ffi.Pointer)>>('SSLWrite'); + late final _SSLWrite = _SSLWritePtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); - void CFMachPortInvalidate( - CFMachPortRef port, + int SSLRead( + SSLContextRef context, + ffi.Pointer data, + int dataLength, + ffi.Pointer processed, ) { - return _CFMachPortInvalidate( - port, + return _SSLRead( + context, + data, + dataLength, + processed, ); } - late final _CFMachPortInvalidatePtr = - _lookup>( - 'CFMachPortInvalidate'); - late final _CFMachPortInvalidate = - _CFMachPortInvalidatePtr.asFunction(); + late final _SSLReadPtr = _lookup< + ffi.NativeFunction< + OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, + ffi.Pointer)>>('SSLRead'); + late final _SSLRead = _SSLReadPtr.asFunction< + int Function( + SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); - int CFMachPortIsValid( - CFMachPortRef port, + int SSLGetBufferedReadSize( + SSLContextRef context, + ffi.Pointer bufferSize, ) { - return _CFMachPortIsValid( - port, + return _SSLGetBufferedReadSize( + context, + bufferSize, ); } - late final _CFMachPortIsValidPtr = - _lookup>( - 'CFMachPortIsValid'); - late final _CFMachPortIsValid = - _CFMachPortIsValidPtr.asFunction(); + late final _SSLGetBufferedReadSizePtr = _lookup< + ffi.NativeFunction< + OSStatus Function( + SSLContextRef, ffi.Pointer)>>('SSLGetBufferedReadSize'); + late final _SSLGetBufferedReadSize = _SSLGetBufferedReadSizePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - CFMachPortInvalidationCallBack CFMachPortGetInvalidationCallBack( - CFMachPortRef port, + int SSLGetDatagramWriteSize( + SSLContextRef dtlsContext, + ffi.Pointer bufSize, ) { - return _CFMachPortGetInvalidationCallBack( - port, + return _SSLGetDatagramWriteSize( + dtlsContext, + bufSize, ); } - late final _CFMachPortGetInvalidationCallBackPtr = _lookup< + late final _SSLGetDatagramWriteSizePtr = _lookup< ffi.NativeFunction< - CFMachPortInvalidationCallBack Function( - CFMachPortRef)>>('CFMachPortGetInvalidationCallBack'); - late final _CFMachPortGetInvalidationCallBack = - _CFMachPortGetInvalidationCallBackPtr.asFunction< - CFMachPortInvalidationCallBack Function(CFMachPortRef)>(); + OSStatus Function(SSLContextRef, + ffi.Pointer)>>('SSLGetDatagramWriteSize'); + late final _SSLGetDatagramWriteSize = _SSLGetDatagramWriteSizePtr.asFunction< + int Function(SSLContextRef, ffi.Pointer)>(); - void CFMachPortSetInvalidationCallBack( - CFMachPortRef port, - CFMachPortInvalidationCallBack callout, + int SSLClose( + SSLContextRef context, ) { - return _CFMachPortSetInvalidationCallBack( - port, - callout, + return _SSLClose( + context, ); } - late final _CFMachPortSetInvalidationCallBackPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFMachPortRef, CFMachPortInvalidationCallBack)>>( - 'CFMachPortSetInvalidationCallBack'); - late final _CFMachPortSetInvalidationCallBack = - _CFMachPortSetInvalidationCallBackPtr.asFunction< - void Function(CFMachPortRef, CFMachPortInvalidationCallBack)>(); + late final _SSLClosePtr = + _lookup>('SSLClose'); + late final _SSLClose = _SSLClosePtr.asFunction(); - CFRunLoopSourceRef CFMachPortCreateRunLoopSource( - CFAllocatorRef allocator, - CFMachPortRef port, - int order, + int SSLSetError( + SSLContextRef context, + int status, ) { - return _CFMachPortCreateRunLoopSource( - allocator, - port, - order, + return _SSLSetError( + context, + status, ); } - late final _CFMachPortCreateRunLoopSourcePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, - CFIndex)>>('CFMachPortCreateRunLoopSource'); - late final _CFMachPortCreateRunLoopSource = - _CFMachPortCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFMachPortRef, int)>(); + late final _SSLSetErrorPtr = + _lookup>( + 'SSLSetError'); + late final _SSLSetError = + _SSLSetErrorPtr.asFunction(); - int CFAttributedStringGetTypeID() { - return _CFAttributedStringGetTypeID(); - } + /// -1LL + late final ffi.Pointer _NSURLSessionTransferSizeUnknown = + _lookup('NSURLSessionTransferSizeUnknown'); - late final _CFAttributedStringGetTypeIDPtr = - _lookup>( - 'CFAttributedStringGetTypeID'); - late final _CFAttributedStringGetTypeID = - _CFAttributedStringGetTypeIDPtr.asFunction(); + int get NSURLSessionTransferSizeUnknown => + _NSURLSessionTransferSizeUnknown.value; - CFAttributedStringRef CFAttributedStringCreate( - CFAllocatorRef alloc, - CFStringRef str, - CFDictionaryRef attributes, - ) { - return _CFAttributedStringCreate( - alloc, - str, - attributes, - ); + late final ffi.Pointer _NSURLSessionTaskPriorityDefault = + _lookup('NSURLSessionTaskPriorityDefault'); + + double get NSURLSessionTaskPriorityDefault => + _NSURLSessionTaskPriorityDefault.value; + + late final ffi.Pointer _NSURLSessionTaskPriorityLow = + _lookup('NSURLSessionTaskPriorityLow'); + + double get NSURLSessionTaskPriorityLow => _NSURLSessionTaskPriorityLow.value; + + late final ffi.Pointer _NSURLSessionTaskPriorityHigh = + _lookup('NSURLSessionTaskPriorityHigh'); + + double get NSURLSessionTaskPriorityHigh => + _NSURLSessionTaskPriorityHigh.value; + + /// Key in the userInfo dictionary of an NSError received during a failed download. + late final ffi.Pointer> + _NSURLSessionDownloadTaskResumeData = + _lookup>( + 'NSURLSessionDownloadTaskResumeData'); + + objc.NSString get NSURLSessionDownloadTaskResumeData => + objc.NSString.castFromPointer(_NSURLSessionDownloadTaskResumeData.value, + retain: true, release: true); + + set NSURLSessionDownloadTaskResumeData(objc.NSString value) { + objc.NSString.castFromPointer(_NSURLSessionDownloadTaskResumeData.value, + retain: false, release: true) + .ref + .release(); + _NSURLSessionDownloadTaskResumeData.value = + value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringCreatePtr = _lookup< - ffi.NativeFunction< - CFAttributedStringRef Function(CFAllocatorRef, CFStringRef, - CFDictionaryRef)>>('CFAttributedStringCreate'); - late final _CFAttributedStringCreate = - _CFAttributedStringCreatePtr.asFunction< - CFAttributedStringRef Function( - CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); + /// Key in the userInfo dictionary of an NSError received during a failed upload. + late final ffi.Pointer> + _NSURLSessionUploadTaskResumeData = + _lookup>('NSURLSessionUploadTaskResumeData'); - CFAttributedStringRef CFAttributedStringCreateWithSubstring( - CFAllocatorRef alloc, - CFAttributedStringRef aStr, - CFRange range, + objc.NSString get NSURLSessionUploadTaskResumeData => + objc.NSString.castFromPointer(_NSURLSessionUploadTaskResumeData.value, + retain: true, release: true); + + set NSURLSessionUploadTaskResumeData(objc.NSString value) { + objc.NSString.castFromPointer(_NSURLSessionUploadTaskResumeData.value, + retain: false, release: true) + .ref + .release(); + _NSURLSessionUploadTaskResumeData.value = + value.ref.retainAndReturnPointer(); + } + + NSRange NSUnionRange( + NSRange range1, + NSRange range2, ) { - return _CFAttributedStringCreateWithSubstring( - alloc, - aStr, - range, + return _NSUnionRange( + range1, + range2, ); } - late final _CFAttributedStringCreateWithSubstringPtr = _lookup< - ffi.NativeFunction< - CFAttributedStringRef Function(CFAllocatorRef, CFAttributedStringRef, - CFRange)>>('CFAttributedStringCreateWithSubstring'); - late final _CFAttributedStringCreateWithSubstring = - _CFAttributedStringCreateWithSubstringPtr.asFunction< - CFAttributedStringRef Function( - CFAllocatorRef, CFAttributedStringRef, CFRange)>(); + late final _NSUnionRangePtr = + _lookup>( + 'NSUnionRange'); + late final _NSUnionRange = + _NSUnionRangePtr.asFunction(); - CFAttributedStringRef CFAttributedStringCreateCopy( - CFAllocatorRef alloc, - CFAttributedStringRef aStr, + NSRange NSIntersectionRange( + NSRange range1, + NSRange range2, ) { - return _CFAttributedStringCreateCopy( - alloc, - aStr, + return _NSIntersectionRange( + range1, + range2, ); } - late final _CFAttributedStringCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFAttributedStringRef Function(CFAllocatorRef, - CFAttributedStringRef)>>('CFAttributedStringCreateCopy'); - late final _CFAttributedStringCreateCopy = - _CFAttributedStringCreateCopyPtr.asFunction< - CFAttributedStringRef Function( - CFAllocatorRef, CFAttributedStringRef)>(); + late final _NSIntersectionRangePtr = + _lookup>( + 'NSIntersectionRange'); + late final _NSIntersectionRange = + _NSIntersectionRangePtr.asFunction(); - CFStringRef CFAttributedStringGetString( - CFAttributedStringRef aStr, + objc.NSString NSStringFromRange( + NSRange range, ) { - return _CFAttributedStringGetString( - aStr, - ); + return objc.NSString.castFromPointer( + _NSStringFromRange( + range, + ), + retain: true, + release: true); } - late final _CFAttributedStringGetStringPtr = - _lookup>( - 'CFAttributedStringGetString'); - late final _CFAttributedStringGetString = _CFAttributedStringGetStringPtr - .asFunction(); + late final _NSStringFromRangePtr = _lookup< + ffi.NativeFunction Function(NSRange)>>( + 'NSStringFromRange'); + late final _NSStringFromRange = _NSStringFromRangePtr.asFunction< + ffi.Pointer Function(NSRange)>(); - int CFAttributedStringGetLength( - CFAttributedStringRef aStr, + NSRange NSRangeFromString( + objc.NSString aString, ) { - return _CFAttributedStringGetLength( - aStr, + return _NSRangeFromString( + aString.ref.pointer, ); } - late final _CFAttributedStringGetLengthPtr = - _lookup>( - 'CFAttributedStringGetLength'); - late final _CFAttributedStringGetLength = _CFAttributedStringGetLengthPtr - .asFunction(); + late final _NSRangeFromStringPtr = _lookup< + ffi.NativeFunction)>>( + 'NSRangeFromString'); + late final _NSRangeFromString = _NSRangeFromStringPtr.asFunction< + NSRange Function(ffi.Pointer)>(); - CFDictionaryRef CFAttributedStringGetAttributes( - CFAttributedStringRef aStr, - int loc, - ffi.Pointer effectiveRange, - ) { - return _CFAttributedStringGetAttributes( - aStr, - loc, - effectiveRange, - ); + late final ffi.Pointer> + _NSItemProviderPreferredImageSizeKey = + _lookup>( + 'NSItemProviderPreferredImageSizeKey'); + + objc.NSString get NSItemProviderPreferredImageSizeKey => + objc.NSString.castFromPointer(_NSItemProviderPreferredImageSizeKey.value, + retain: true, release: true); + + set NSItemProviderPreferredImageSizeKey(objc.NSString value) { + objc.NSString.castFromPointer(_NSItemProviderPreferredImageSizeKey.value, + retain: false, release: true) + .ref + .release(); + _NSItemProviderPreferredImageSizeKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringGetAttributesPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFAttributedStringRef, CFIndex, - ffi.Pointer)>>('CFAttributedStringGetAttributes'); - late final _CFAttributedStringGetAttributes = - _CFAttributedStringGetAttributesPtr.asFunction< - CFDictionaryRef Function( - CFAttributedStringRef, int, ffi.Pointer)>(); + late final ffi.Pointer> + _NSExtensionJavaScriptPreprocessingResultsKey = + _lookup>( + 'NSExtensionJavaScriptPreprocessingResultsKey'); - CFTypeRef CFAttributedStringGetAttribute( - CFAttributedStringRef aStr, - int loc, - CFStringRef attrName, - ffi.Pointer effectiveRange, - ) { - return _CFAttributedStringGetAttribute( - aStr, - loc, - attrName, - effectiveRange, - ); + objc.NSString get NSExtensionJavaScriptPreprocessingResultsKey => + objc.NSString.castFromPointer( + _NSExtensionJavaScriptPreprocessingResultsKey.value, + retain: true, + release: true); + + set NSExtensionJavaScriptPreprocessingResultsKey(objc.NSString value) { + objc.NSString.castFromPointer( + _NSExtensionJavaScriptPreprocessingResultsKey.value, + retain: false, + release: true) + .ref + .release(); + _NSExtensionJavaScriptPreprocessingResultsKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringGetAttributePtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFAttributedStringRef, CFIndex, CFStringRef, - ffi.Pointer)>>('CFAttributedStringGetAttribute'); - late final _CFAttributedStringGetAttribute = - _CFAttributedStringGetAttributePtr.asFunction< - CFTypeRef Function( - CFAttributedStringRef, int, CFStringRef, ffi.Pointer)>(); + late final ffi.Pointer> + _NSExtensionJavaScriptFinalizeArgumentKey = + _lookup>( + 'NSExtensionJavaScriptFinalizeArgumentKey'); - CFDictionaryRef CFAttributedStringGetAttributesAndLongestEffectiveRange( - CFAttributedStringRef aStr, - int loc, - CFRange inRange, - ffi.Pointer longestEffectiveRange, - ) { - return _CFAttributedStringGetAttributesAndLongestEffectiveRange( - aStr, - loc, - inRange, - longestEffectiveRange, - ); + objc.NSString get NSExtensionJavaScriptFinalizeArgumentKey => + objc.NSString.castFromPointer( + _NSExtensionJavaScriptFinalizeArgumentKey.value, + retain: true, + release: true); + + set NSExtensionJavaScriptFinalizeArgumentKey(objc.NSString value) { + objc.NSString.castFromPointer( + _NSExtensionJavaScriptFinalizeArgumentKey.value, + retain: false, + release: true) + .ref + .release(); + _NSExtensionJavaScriptFinalizeArgumentKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr = - _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(CFAttributedStringRef, CFIndex, - CFRange, ffi.Pointer)>>( - 'CFAttributedStringGetAttributesAndLongestEffectiveRange'); - late final _CFAttributedStringGetAttributesAndLongestEffectiveRange = - _CFAttributedStringGetAttributesAndLongestEffectiveRangePtr.asFunction< - CFDictionaryRef Function( - CFAttributedStringRef, int, CFRange, ffi.Pointer)>(); + late final ffi.Pointer> + _NSItemProviderErrorDomain = + _lookup>('NSItemProviderErrorDomain'); - CFTypeRef CFAttributedStringGetAttributeAndLongestEffectiveRange( - CFAttributedStringRef aStr, - int loc, - CFStringRef attrName, - CFRange inRange, - ffi.Pointer longestEffectiveRange, - ) { - return _CFAttributedStringGetAttributeAndLongestEffectiveRange( - aStr, - loc, - attrName, - inRange, - longestEffectiveRange, - ); + objc.NSString get NSItemProviderErrorDomain => + objc.NSString.castFromPointer(_NSItemProviderErrorDomain.value, + retain: true, release: true); + + set NSItemProviderErrorDomain(objc.NSString value) { + objc.NSString.castFromPointer(_NSItemProviderErrorDomain.value, + retain: false, release: true) + .ref + .release(); + _NSItemProviderErrorDomain.value = value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr = - _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFAttributedStringRef, CFIndex, - CFStringRef, CFRange, ffi.Pointer)>>( - 'CFAttributedStringGetAttributeAndLongestEffectiveRange'); - late final _CFAttributedStringGetAttributeAndLongestEffectiveRange = - _CFAttributedStringGetAttributeAndLongestEffectiveRangePtr.asFunction< - CFTypeRef Function(CFAttributedStringRef, int, CFStringRef, CFRange, - ffi.Pointer)>(); + late final ffi.Pointer _NSStringTransformLatinToKatakana = + _lookup('NSStringTransformLatinToKatakana'); - CFMutableAttributedStringRef CFAttributedStringCreateMutableCopy( - CFAllocatorRef alloc, - int maxLength, - CFAttributedStringRef aStr, - ) { - return _CFAttributedStringCreateMutableCopy( - alloc, - maxLength, - aStr, - ); + DartNSStringTransform get NSStringTransformLatinToKatakana => + objc.NSString.castFromPointer(_NSStringTransformLatinToKatakana.value, + retain: true, release: true); + + set NSStringTransformLatinToKatakana(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformLatinToKatakana.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformLatinToKatakana.value = + value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringCreateMutableCopyPtr = _lookup< - ffi.NativeFunction< - CFMutableAttributedStringRef Function(CFAllocatorRef, CFIndex, - CFAttributedStringRef)>>('CFAttributedStringCreateMutableCopy'); - late final _CFAttributedStringCreateMutableCopy = - _CFAttributedStringCreateMutableCopyPtr.asFunction< - CFMutableAttributedStringRef Function( - CFAllocatorRef, int, CFAttributedStringRef)>(); + late final ffi.Pointer _NSStringTransformLatinToHiragana = + _lookup('NSStringTransformLatinToHiragana'); - CFMutableAttributedStringRef CFAttributedStringCreateMutable( - CFAllocatorRef alloc, - int maxLength, - ) { - return _CFAttributedStringCreateMutable( - alloc, - maxLength, - ); + DartNSStringTransform get NSStringTransformLatinToHiragana => + objc.NSString.castFromPointer(_NSStringTransformLatinToHiragana.value, + retain: true, release: true); + + set NSStringTransformLatinToHiragana(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformLatinToHiragana.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformLatinToHiragana.value = + value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringCreateMutablePtr = _lookup< - ffi.NativeFunction< - CFMutableAttributedStringRef Function( - CFAllocatorRef, CFIndex)>>('CFAttributedStringCreateMutable'); - late final _CFAttributedStringCreateMutable = - _CFAttributedStringCreateMutablePtr.asFunction< - CFMutableAttributedStringRef Function(CFAllocatorRef, int)>(); + late final ffi.Pointer _NSStringTransformLatinToHangul = + _lookup('NSStringTransformLatinToHangul'); - void CFAttributedStringReplaceString( - CFMutableAttributedStringRef aStr, - CFRange range, - CFStringRef replacement, - ) { - return _CFAttributedStringReplaceString( - aStr, - range, - replacement, - ); + DartNSStringTransform get NSStringTransformLatinToHangul => + objc.NSString.castFromPointer(_NSStringTransformLatinToHangul.value, + retain: true, release: true); + + set NSStringTransformLatinToHangul(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformLatinToHangul.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformLatinToHangul.value = value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringReplaceStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFStringRef)>>('CFAttributedStringReplaceString'); - late final _CFAttributedStringReplaceString = - _CFAttributedStringReplaceStringPtr.asFunction< - void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); + late final ffi.Pointer _NSStringTransformLatinToArabic = + _lookup('NSStringTransformLatinToArabic'); - CFMutableStringRef CFAttributedStringGetMutableString( - CFMutableAttributedStringRef aStr, - ) { - return _CFAttributedStringGetMutableString( - aStr, - ); + DartNSStringTransform get NSStringTransformLatinToArabic => + objc.NSString.castFromPointer(_NSStringTransformLatinToArabic.value, + retain: true, release: true); + + set NSStringTransformLatinToArabic(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformLatinToArabic.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformLatinToArabic.value = value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringGetMutableStringPtr = _lookup< - ffi.NativeFunction< - CFMutableStringRef Function(CFMutableAttributedStringRef)>>( - 'CFAttributedStringGetMutableString'); - late final _CFAttributedStringGetMutableString = - _CFAttributedStringGetMutableStringPtr.asFunction< - CFMutableStringRef Function(CFMutableAttributedStringRef)>(); + late final ffi.Pointer _NSStringTransformLatinToHebrew = + _lookup('NSStringTransformLatinToHebrew'); - void CFAttributedStringSetAttributes( - CFMutableAttributedStringRef aStr, - CFRange range, - CFDictionaryRef replacement, - int clearOtherAttributes, - ) { - return _CFAttributedStringSetAttributes( - aStr, - range, - replacement, - clearOtherAttributes, - ); + DartNSStringTransform get NSStringTransformLatinToHebrew => + objc.NSString.castFromPointer(_NSStringTransformLatinToHebrew.value, + retain: true, release: true); + + set NSStringTransformLatinToHebrew(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformLatinToHebrew.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformLatinToHebrew.value = value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringSetAttributesPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFDictionaryRef, Boolean)>>('CFAttributedStringSetAttributes'); - late final _CFAttributedStringSetAttributes = - _CFAttributedStringSetAttributesPtr.asFunction< - void Function( - CFMutableAttributedStringRef, CFRange, CFDictionaryRef, int)>(); + late final ffi.Pointer _NSStringTransformLatinToThai = + _lookup('NSStringTransformLatinToThai'); - void CFAttributedStringSetAttribute( - CFMutableAttributedStringRef aStr, - CFRange range, - CFStringRef attrName, - CFTypeRef value, - ) { - return _CFAttributedStringSetAttribute( - aStr, - range, - attrName, - value, - ); + DartNSStringTransform get NSStringTransformLatinToThai => + objc.NSString.castFromPointer(_NSStringTransformLatinToThai.value, + retain: true, release: true); + + set NSStringTransformLatinToThai(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformLatinToThai.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformLatinToThai.value = value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringSetAttributePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, CFStringRef, - CFTypeRef)>>('CFAttributedStringSetAttribute'); - late final _CFAttributedStringSetAttribute = - _CFAttributedStringSetAttributePtr.asFunction< - void Function( - CFMutableAttributedStringRef, CFRange, CFStringRef, CFTypeRef)>(); + late final ffi.Pointer _NSStringTransformLatinToCyrillic = + _lookup('NSStringTransformLatinToCyrillic'); - void CFAttributedStringRemoveAttribute( - CFMutableAttributedStringRef aStr, - CFRange range, - CFStringRef attrName, - ) { - return _CFAttributedStringRemoveAttribute( - aStr, - range, - attrName, - ); + DartNSStringTransform get NSStringTransformLatinToCyrillic => + objc.NSString.castFromPointer(_NSStringTransformLatinToCyrillic.value, + retain: true, release: true); + + set NSStringTransformLatinToCyrillic(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformLatinToCyrillic.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformLatinToCyrillic.value = + value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringRemoveAttributePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFStringRef)>>('CFAttributedStringRemoveAttribute'); - late final _CFAttributedStringRemoveAttribute = - _CFAttributedStringRemoveAttributePtr.asFunction< - void Function(CFMutableAttributedStringRef, CFRange, CFStringRef)>(); + late final ffi.Pointer _NSStringTransformLatinToGreek = + _lookup('NSStringTransformLatinToGreek'); - void CFAttributedStringReplaceAttributedString( - CFMutableAttributedStringRef aStr, - CFRange range, - CFAttributedStringRef replacement, - ) { - return _CFAttributedStringReplaceAttributedString( - aStr, - range, - replacement, - ); + DartNSStringTransform get NSStringTransformLatinToGreek => + objc.NSString.castFromPointer(_NSStringTransformLatinToGreek.value, + retain: true, release: true); + + set NSStringTransformLatinToGreek(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformLatinToGreek.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformLatinToGreek.value = value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringReplaceAttributedStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFMutableAttributedStringRef, CFRange, - CFAttributedStringRef)>>( - 'CFAttributedStringReplaceAttributedString'); - late final _CFAttributedStringReplaceAttributedString = - _CFAttributedStringReplaceAttributedStringPtr.asFunction< - void Function( - CFMutableAttributedStringRef, CFRange, CFAttributedStringRef)>(); + late final ffi.Pointer _NSStringTransformToLatin = + _lookup('NSStringTransformToLatin'); - void CFAttributedStringBeginEditing( - CFMutableAttributedStringRef aStr, - ) { - return _CFAttributedStringBeginEditing( - aStr, - ); + DartNSStringTransform get NSStringTransformToLatin => + objc.NSString.castFromPointer(_NSStringTransformToLatin.value, + retain: true, release: true); + + set NSStringTransformToLatin(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformToLatin.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformToLatin.value = value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringBeginEditingPtr = _lookup< - ffi.NativeFunction>( - 'CFAttributedStringBeginEditing'); - late final _CFAttributedStringBeginEditing = - _CFAttributedStringBeginEditingPtr.asFunction< - void Function(CFMutableAttributedStringRef)>(); + late final ffi.Pointer _NSStringTransformMandarinToLatin = + _lookup('NSStringTransformMandarinToLatin'); - void CFAttributedStringEndEditing( - CFMutableAttributedStringRef aStr, - ) { - return _CFAttributedStringEndEditing( - aStr, - ); + DartNSStringTransform get NSStringTransformMandarinToLatin => + objc.NSString.castFromPointer(_NSStringTransformMandarinToLatin.value, + retain: true, release: true); + + set NSStringTransformMandarinToLatin(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformMandarinToLatin.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformMandarinToLatin.value = + value.ref.retainAndReturnPointer(); } - late final _CFAttributedStringEndEditingPtr = _lookup< - ffi.NativeFunction>( - 'CFAttributedStringEndEditing'); - late final _CFAttributedStringEndEditing = _CFAttributedStringEndEditingPtr - .asFunction(); + late final ffi.Pointer + _NSStringTransformHiraganaToKatakana = + _lookup('NSStringTransformHiraganaToKatakana'); - int CFURLEnumeratorGetTypeID() { - return _CFURLEnumeratorGetTypeID(); + DartNSStringTransform get NSStringTransformHiraganaToKatakana => + objc.NSString.castFromPointer(_NSStringTransformHiraganaToKatakana.value, + retain: true, release: true); + + set NSStringTransformHiraganaToKatakana(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformHiraganaToKatakana.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformHiraganaToKatakana.value = + value.ref.retainAndReturnPointer(); } - late final _CFURLEnumeratorGetTypeIDPtr = - _lookup>( - 'CFURLEnumeratorGetTypeID'); - late final _CFURLEnumeratorGetTypeID = - _CFURLEnumeratorGetTypeIDPtr.asFunction(); + late final ffi.Pointer + _NSStringTransformFullwidthToHalfwidth = + _lookup('NSStringTransformFullwidthToHalfwidth'); - CFURLEnumeratorRef CFURLEnumeratorCreateForDirectoryURL( - CFAllocatorRef alloc, - CFURLRef directoryURL, - int option, - CFArrayRef propertyKeys, - ) { - return _CFURLEnumeratorCreateForDirectoryURL( - alloc, - directoryURL, - option, - propertyKeys, - ); + DartNSStringTransform get NSStringTransformFullwidthToHalfwidth => + objc.NSString.castFromPointer( + _NSStringTransformFullwidthToHalfwidth.value, + retain: true, + release: true); + + set NSStringTransformFullwidthToHalfwidth(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformFullwidthToHalfwidth.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformFullwidthToHalfwidth.value = + value.ref.retainAndReturnPointer(); } - late final _CFURLEnumeratorCreateForDirectoryURLPtr = _lookup< - ffi.NativeFunction< - CFURLEnumeratorRef Function(CFAllocatorRef, CFURLRef, ffi.Int32, - CFArrayRef)>>('CFURLEnumeratorCreateForDirectoryURL'); - late final _CFURLEnumeratorCreateForDirectoryURL = - _CFURLEnumeratorCreateForDirectoryURLPtr.asFunction< - CFURLEnumeratorRef Function( - CFAllocatorRef, CFURLRef, int, CFArrayRef)>(); + late final ffi.Pointer _NSStringTransformToXMLHex = + _lookup('NSStringTransformToXMLHex'); - CFURLEnumeratorRef CFURLEnumeratorCreateForMountedVolumes( - CFAllocatorRef alloc, - int option, - CFArrayRef propertyKeys, - ) { - return _CFURLEnumeratorCreateForMountedVolumes( - alloc, - option, - propertyKeys, - ); + DartNSStringTransform get NSStringTransformToXMLHex => + objc.NSString.castFromPointer(_NSStringTransformToXMLHex.value, + retain: true, release: true); + + set NSStringTransformToXMLHex(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformToXMLHex.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformToXMLHex.value = value.ref.retainAndReturnPointer(); } - late final _CFURLEnumeratorCreateForMountedVolumesPtr = _lookup< - ffi.NativeFunction< - CFURLEnumeratorRef Function(CFAllocatorRef, ffi.Int32, - CFArrayRef)>>('CFURLEnumeratorCreateForMountedVolumes'); - late final _CFURLEnumeratorCreateForMountedVolumes = - _CFURLEnumeratorCreateForMountedVolumesPtr.asFunction< - CFURLEnumeratorRef Function(CFAllocatorRef, int, CFArrayRef)>(); + late final ffi.Pointer _NSStringTransformToUnicodeName = + _lookup('NSStringTransformToUnicodeName'); - int CFURLEnumeratorGetNextURL( - CFURLEnumeratorRef enumerator, - ffi.Pointer url, - ffi.Pointer error, - ) { - return _CFURLEnumeratorGetNextURL( - enumerator, - url, - error, - ); + DartNSStringTransform get NSStringTransformToUnicodeName => + objc.NSString.castFromPointer(_NSStringTransformToUnicodeName.value, + retain: true, release: true); + + set NSStringTransformToUnicodeName(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformToUnicodeName.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformToUnicodeName.value = value.ref.retainAndReturnPointer(); } - late final _CFURLEnumeratorGetNextURLPtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(CFURLEnumeratorRef, ffi.Pointer, - ffi.Pointer)>>('CFURLEnumeratorGetNextURL'); - late final _CFURLEnumeratorGetNextURL = - _CFURLEnumeratorGetNextURLPtr.asFunction< - int Function(CFURLEnumeratorRef, ffi.Pointer, - ffi.Pointer)>(); + late final ffi.Pointer + _NSStringTransformStripCombiningMarks = + _lookup('NSStringTransformStripCombiningMarks'); - void CFURLEnumeratorSkipDescendents( - CFURLEnumeratorRef enumerator, - ) { - return _CFURLEnumeratorSkipDescendents( - enumerator, - ); + DartNSStringTransform get NSStringTransformStripCombiningMarks => + objc.NSString.castFromPointer(_NSStringTransformStripCombiningMarks.value, + retain: true, release: true); + + set NSStringTransformStripCombiningMarks(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformStripCombiningMarks.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformStripCombiningMarks.value = + value.ref.retainAndReturnPointer(); } - late final _CFURLEnumeratorSkipDescendentsPtr = - _lookup>( - 'CFURLEnumeratorSkipDescendents'); - late final _CFURLEnumeratorSkipDescendents = - _CFURLEnumeratorSkipDescendentsPtr.asFunction< - void Function(CFURLEnumeratorRef)>(); + late final ffi.Pointer _NSStringTransformStripDiacritics = + _lookup('NSStringTransformStripDiacritics'); - int CFURLEnumeratorGetDescendentLevel( - CFURLEnumeratorRef enumerator, - ) { - return _CFURLEnumeratorGetDescendentLevel( - enumerator, - ); + DartNSStringTransform get NSStringTransformStripDiacritics => + objc.NSString.castFromPointer(_NSStringTransformStripDiacritics.value, + retain: true, release: true); + + set NSStringTransformStripDiacritics(DartNSStringTransform value) { + objc.NSString.castFromPointer(_NSStringTransformStripDiacritics.value, + retain: false, release: true) + .ref + .release(); + _NSStringTransformStripDiacritics.value = + value.ref.retainAndReturnPointer(); } - late final _CFURLEnumeratorGetDescendentLevelPtr = - _lookup>( - 'CFURLEnumeratorGetDescendentLevel'); - late final _CFURLEnumeratorGetDescendentLevel = - _CFURLEnumeratorGetDescendentLevelPtr.asFunction< - int Function(CFURLEnumeratorRef)>(); + late final ffi.Pointer + _NSStringEncodingDetectionSuggestedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionSuggestedEncodingsKey'); - int CFURLEnumeratorGetSourceDidChange( - CFURLEnumeratorRef enumerator, - ) { - return _CFURLEnumeratorGetSourceDidChange( - enumerator, - ); + DartNSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionSuggestedEncodingsKey => + objc.NSString.castFromPointer( + _NSStringEncodingDetectionSuggestedEncodingsKey.value, + retain: true, + release: true); + + set NSStringEncodingDetectionSuggestedEncodingsKey( + DartNSStringEncodingDetectionOptionsKey value) { + objc.NSString.castFromPointer( + _NSStringEncodingDetectionSuggestedEncodingsKey.value, + retain: false, + release: true) + .ref + .release(); + _NSStringEncodingDetectionSuggestedEncodingsKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFURLEnumeratorGetSourceDidChangePtr = - _lookup>( - 'CFURLEnumeratorGetSourceDidChange'); - late final _CFURLEnumeratorGetSourceDidChange = - _CFURLEnumeratorGetSourceDidChangePtr.asFunction< - int Function(CFURLEnumeratorRef)>(); + late final ffi.Pointer + _NSStringEncodingDetectionDisallowedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionDisallowedEncodingsKey'); - acl_t acl_dup( - acl_t acl, - ) { - return _acl_dup( - acl, - ); + DartNSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionDisallowedEncodingsKey => + objc.NSString.castFromPointer( + _NSStringEncodingDetectionDisallowedEncodingsKey.value, + retain: true, + release: true); + + set NSStringEncodingDetectionDisallowedEncodingsKey( + DartNSStringEncodingDetectionOptionsKey value) { + objc.NSString.castFromPointer( + _NSStringEncodingDetectionDisallowedEncodingsKey.value, + retain: false, + release: true) + .ref + .release(); + _NSStringEncodingDetectionDisallowedEncodingsKey.value = + value.ref.retainAndReturnPointer(); } - late final _acl_dupPtr = - _lookup>('acl_dup'); - late final _acl_dup = _acl_dupPtr.asFunction(); + late final ffi.Pointer + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey = + _lookup( + 'NSStringEncodingDetectionUseOnlySuggestedEncodingsKey'); - int acl_free( - ffi.Pointer obj_p, - ) { - return _acl_free( - obj_p, - ); + DartNSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionUseOnlySuggestedEncodingsKey => + objc.NSString.castFromPointer( + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value, + retain: true, + release: true); + + set NSStringEncodingDetectionUseOnlySuggestedEncodingsKey( + DartNSStringEncodingDetectionOptionsKey value) { + objc.NSString.castFromPointer( + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value, + retain: false, + release: true) + .ref + .release(); + _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value = + value.ref.retainAndReturnPointer(); } - late final _acl_freePtr = - _lookup)>>( - 'acl_free'); - late final _acl_free = - _acl_freePtr.asFunction)>(); + late final ffi.Pointer + _NSStringEncodingDetectionAllowLossyKey = + _lookup( + 'NSStringEncodingDetectionAllowLossyKey'); - acl_t acl_init( - int count, - ) { - return _acl_init( - count, - ); + DartNSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionAllowLossyKey => + objc.NSString.castFromPointer( + _NSStringEncodingDetectionAllowLossyKey.value, + retain: true, + release: true); + + set NSStringEncodingDetectionAllowLossyKey( + DartNSStringEncodingDetectionOptionsKey value) { + objc.NSString.castFromPointer(_NSStringEncodingDetectionAllowLossyKey.value, + retain: false, release: true) + .ref + .release(); + _NSStringEncodingDetectionAllowLossyKey.value = + value.ref.retainAndReturnPointer(); } - late final _acl_initPtr = - _lookup>('acl_init'); - late final _acl_init = _acl_initPtr.asFunction(); + late final ffi.Pointer + _NSStringEncodingDetectionFromWindowsKey = + _lookup( + 'NSStringEncodingDetectionFromWindowsKey'); - int acl_copy_entry( - acl_entry_t dest_d, - acl_entry_t src_d, - ) { - return _acl_copy_entry( - dest_d, - src_d, - ); + DartNSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionFromWindowsKey => + objc.NSString.castFromPointer( + _NSStringEncodingDetectionFromWindowsKey.value, + retain: true, + release: true); + + set NSStringEncodingDetectionFromWindowsKey( + DartNSStringEncodingDetectionOptionsKey value) { + objc.NSString.castFromPointer( + _NSStringEncodingDetectionFromWindowsKey.value, + retain: false, + release: true) + .ref + .release(); + _NSStringEncodingDetectionFromWindowsKey.value = + value.ref.retainAndReturnPointer(); } - late final _acl_copy_entryPtr = - _lookup>( - 'acl_copy_entry'); - late final _acl_copy_entry = - _acl_copy_entryPtr.asFunction(); + late final ffi.Pointer + _NSStringEncodingDetectionLossySubstitutionKey = + _lookup( + 'NSStringEncodingDetectionLossySubstitutionKey'); - int acl_create_entry( - ffi.Pointer acl_p, - ffi.Pointer entry_p, - ) { - return _acl_create_entry( - acl_p, - entry_p, - ); + DartNSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionLossySubstitutionKey => + objc.NSString.castFromPointer( + _NSStringEncodingDetectionLossySubstitutionKey.value, + retain: true, + release: true); + + set NSStringEncodingDetectionLossySubstitutionKey( + DartNSStringEncodingDetectionOptionsKey value) { + objc.NSString.castFromPointer( + _NSStringEncodingDetectionLossySubstitutionKey.value, + retain: false, + release: true) + .ref + .release(); + _NSStringEncodingDetectionLossySubstitutionKey.value = + value.ref.retainAndReturnPointer(); } - late final _acl_create_entryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('acl_create_entry'); - late final _acl_create_entry = _acl_create_entryPtr - .asFunction, ffi.Pointer)>(); + late final ffi.Pointer + _NSStringEncodingDetectionLikelyLanguageKey = + _lookup( + 'NSStringEncodingDetectionLikelyLanguageKey'); - int acl_create_entry_np( - ffi.Pointer acl_p, - ffi.Pointer entry_p, - int entry_index, - ) { - return _acl_create_entry_np( - acl_p, - entry_p, - entry_index, - ); + DartNSStringEncodingDetectionOptionsKey + get NSStringEncodingDetectionLikelyLanguageKey => + objc.NSString.castFromPointer( + _NSStringEncodingDetectionLikelyLanguageKey.value, + retain: true, + release: true); + + set NSStringEncodingDetectionLikelyLanguageKey( + DartNSStringEncodingDetectionOptionsKey value) { + objc.NSString.castFromPointer( + _NSStringEncodingDetectionLikelyLanguageKey.value, + retain: false, + release: true) + .ref + .release(); + _NSStringEncodingDetectionLikelyLanguageKey.value = + value.ref.retainAndReturnPointer(); } - late final _acl_create_entry_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Pointer, - ffi.Int)>>('acl_create_entry_np'); - late final _acl_create_entry_np = _acl_create_entry_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, int)>(); + late final ffi.Pointer _NSCharacterConversionException = + _lookup('NSCharacterConversionException'); - int acl_delete_entry( - acl_t acl, - acl_entry_t entry_d, - ) { - return _acl_delete_entry( - acl, - entry_d, - ); + DartNSExceptionName get NSCharacterConversionException => + objc.NSString.castFromPointer(_NSCharacterConversionException.value, + retain: true, release: true); + + set NSCharacterConversionException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSCharacterConversionException.value, + retain: false, release: true) + .ref + .release(); + _NSCharacterConversionException.value = value.ref.retainAndReturnPointer(); } - late final _acl_delete_entryPtr = - _lookup>( - 'acl_delete_entry'); - late final _acl_delete_entry = - _acl_delete_entryPtr.asFunction(); + late final ffi.Pointer _NSParseErrorException = + _lookup('NSParseErrorException'); - int acl_get_entry( - acl_t acl, - int entry_id, - ffi.Pointer entry_p, - ) { - return _acl_get_entry( - acl, - entry_id, - entry_p, - ); + DartNSExceptionName get NSParseErrorException => + objc.NSString.castFromPointer(_NSParseErrorException.value, + retain: true, release: true); + + set NSParseErrorException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSParseErrorException.value, + retain: false, release: true) + .ref + .release(); + _NSParseErrorException.value = value.ref.retainAndReturnPointer(); } - late final _acl_get_entryPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - acl_t, ffi.Int, ffi.Pointer)>>('acl_get_entry'); - late final _acl_get_entry = _acl_get_entryPtr - .asFunction)>(); + late final ffi.Pointer> + _NSHTTPPropertyStatusCodeKey = + _lookup>('NSHTTPPropertyStatusCodeKey'); - int acl_valid( - acl_t acl, - ) { - return _acl_valid( - acl, - ); - } + objc.NSString get NSHTTPPropertyStatusCodeKey => + objc.NSString.castFromPointer(_NSHTTPPropertyStatusCodeKey.value, + retain: true, release: true); - late final _acl_validPtr = - _lookup>('acl_valid'); - late final _acl_valid = _acl_validPtr.asFunction(); + late final ffi.Pointer> + _NSHTTPPropertyStatusReasonKey = + _lookup>('NSHTTPPropertyStatusReasonKey'); - int acl_valid_fd_np( - int fd, - int type, - acl_t acl, - ) { - return _acl_valid_fd_np( - fd, - type, - acl, - ); + objc.NSString get NSHTTPPropertyStatusReasonKey => + objc.NSString.castFromPointer(_NSHTTPPropertyStatusReasonKey.value, + retain: true, release: true); + + late final ffi.Pointer> + _NSHTTPPropertyServerHTTPVersionKey = + _lookup>( + 'NSHTTPPropertyServerHTTPVersionKey'); + + objc.NSString get NSHTTPPropertyServerHTTPVersionKey => + objc.NSString.castFromPointer(_NSHTTPPropertyServerHTTPVersionKey.value, + retain: true, release: true); + + late final ffi.Pointer> + _NSHTTPPropertyRedirectionHeadersKey = + _lookup>( + 'NSHTTPPropertyRedirectionHeadersKey'); + + objc.NSString get NSHTTPPropertyRedirectionHeadersKey => + objc.NSString.castFromPointer(_NSHTTPPropertyRedirectionHeadersKey.value, + retain: true, release: true); + + late final ffi.Pointer> + _NSHTTPPropertyErrorPageDataKey = + _lookup>('NSHTTPPropertyErrorPageDataKey'); + + objc.NSString get NSHTTPPropertyErrorPageDataKey => + objc.NSString.castFromPointer(_NSHTTPPropertyErrorPageDataKey.value, + retain: true, release: true); + + late final ffi.Pointer> + _NSHTTPPropertyHTTPProxy = + _lookup>('NSHTTPPropertyHTTPProxy'); + + objc.NSString get NSHTTPPropertyHTTPProxy => + objc.NSString.castFromPointer(_NSHTTPPropertyHTTPProxy.value, + retain: true, release: true); + + late final ffi.Pointer> + _NSFTPPropertyUserLoginKey = + _lookup>('NSFTPPropertyUserLoginKey'); + + objc.NSString get NSFTPPropertyUserLoginKey => + objc.NSString.castFromPointer(_NSFTPPropertyUserLoginKey.value, + retain: true, release: true); + + late final ffi.Pointer> + _NSFTPPropertyUserPasswordKey = + _lookup>('NSFTPPropertyUserPasswordKey'); + + objc.NSString get NSFTPPropertyUserPasswordKey => + objc.NSString.castFromPointer(_NSFTPPropertyUserPasswordKey.value, + retain: true, release: true); + + late final ffi.Pointer> + _NSFTPPropertyActiveTransferModeKey = + _lookup>( + 'NSFTPPropertyActiveTransferModeKey'); + + objc.NSString get NSFTPPropertyActiveTransferModeKey => + objc.NSString.castFromPointer(_NSFTPPropertyActiveTransferModeKey.value, + retain: true, release: true); + + late final ffi.Pointer> + _NSFTPPropertyFileOffsetKey = + _lookup>('NSFTPPropertyFileOffsetKey'); + + objc.NSString get NSFTPPropertyFileOffsetKey => + objc.NSString.castFromPointer(_NSFTPPropertyFileOffsetKey.value, + retain: true, release: true); + + late final ffi.Pointer> _NSFTPPropertyFTPProxy = + _lookup>('NSFTPPropertyFTPProxy'); + + objc.NSString get NSFTPPropertyFTPProxy => + objc.NSString.castFromPointer(_NSFTPPropertyFTPProxy.value, + retain: true, release: true); + + /// A string constant for the "file" URL scheme. If you are using this to compare to a URL's scheme to see if it is a file URL, you should instead use the NSURL fileURL property -- the fileURL property is much faster. + late final ffi.Pointer> _NSURLFileScheme = + _lookup>('NSURLFileScheme'); + + objc.NSString get NSURLFileScheme => + objc.NSString.castFromPointer(_NSURLFileScheme.value, + retain: true, release: true); + + set NSURLFileScheme(objc.NSString value) { + objc.NSString.castFromPointer(_NSURLFileScheme.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileScheme.value = value.ref.retainAndReturnPointer(); } - late final _acl_valid_fd_npPtr = - _lookup>( - 'acl_valid_fd_np'); - late final _acl_valid_fd_np = - _acl_valid_fd_npPtr.asFunction(); + /// Key for the resource properties that have not been set after setResourceValues:error: returns an error, returned as an array of of strings. + late final ffi.Pointer _NSURLKeysOfUnsetValuesKey = + _lookup('NSURLKeysOfUnsetValuesKey'); - int acl_valid_file_np( - ffi.Pointer path, - int type, - acl_t acl, - ) { - return _acl_valid_file_np( - path, - type, - acl, - ); + DartNSURLResourceKey get NSURLKeysOfUnsetValuesKey => + objc.NSString.castFromPointer(_NSURLKeysOfUnsetValuesKey.value, + retain: true, release: true); + + set NSURLKeysOfUnsetValuesKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLKeysOfUnsetValuesKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLKeysOfUnsetValuesKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_valid_file_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int32, acl_t)>>('acl_valid_file_np'); - late final _acl_valid_file_np = _acl_valid_file_npPtr - .asFunction, int, acl_t)>(); + /// The resource name provided by the file system (Read-write, value type NSString) + late final ffi.Pointer _NSURLNameKey = + _lookup('NSURLNameKey'); - int acl_valid_link_np( - ffi.Pointer path, - int type, - acl_t acl, - ) { - return _acl_valid_link_np( - path, - type, - acl, - ); + DartNSURLResourceKey get NSURLNameKey => + objc.NSString.castFromPointer(_NSURLNameKey.value, + retain: true, release: true); + + set NSURLNameKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLNameKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLNameKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_valid_link_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int32, acl_t)>>('acl_valid_link_np'); - late final _acl_valid_link_np = _acl_valid_link_npPtr - .asFunction, int, acl_t)>(); + /// Localized or extension-hidden name as displayed to users (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedNameKey = + _lookup('NSURLLocalizedNameKey'); - int acl_add_perm( - acl_permset_t permset_d, - int perm, - ) { - return _acl_add_perm( - permset_d, - perm, - ); + DartNSURLResourceKey get NSURLLocalizedNameKey => + objc.NSString.castFromPointer(_NSURLLocalizedNameKey.value, + retain: true, release: true); + + set NSURLLocalizedNameKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLLocalizedNameKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLLocalizedNameKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_add_permPtr = - _lookup>( - 'acl_add_perm'); - late final _acl_add_perm = - _acl_add_permPtr.asFunction(); + /// True for regular files (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsRegularFileKey = + _lookup('NSURLIsRegularFileKey'); - int acl_calc_mask( - ffi.Pointer acl_p, - ) { - return _acl_calc_mask( - acl_p, - ); + DartNSURLResourceKey get NSURLIsRegularFileKey => + objc.NSString.castFromPointer(_NSURLIsRegularFileKey.value, + retain: true, release: true); + + set NSURLIsRegularFileKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsRegularFileKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsRegularFileKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_calc_maskPtr = - _lookup)>>( - 'acl_calc_mask'); - late final _acl_calc_mask = - _acl_calc_maskPtr.asFunction)>(); + /// True for directories (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsDirectoryKey = + _lookup('NSURLIsDirectoryKey'); - int acl_clear_perms( - acl_permset_t permset_d, - ) { - return _acl_clear_perms( - permset_d, - ); + DartNSURLResourceKey get NSURLIsDirectoryKey => + objc.NSString.castFromPointer(_NSURLIsDirectoryKey.value, + retain: true, release: true); + + set NSURLIsDirectoryKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsDirectoryKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsDirectoryKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_clear_permsPtr = - _lookup>( - 'acl_clear_perms'); - late final _acl_clear_perms = - _acl_clear_permsPtr.asFunction(); + /// True for symlinks (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsSymbolicLinkKey = + _lookup('NSURLIsSymbolicLinkKey'); - int acl_delete_perm( - acl_permset_t permset_d, - int perm, - ) { - return _acl_delete_perm( - permset_d, - perm, - ); + DartNSURLResourceKey get NSURLIsSymbolicLinkKey => + objc.NSString.castFromPointer(_NSURLIsSymbolicLinkKey.value, + retain: true, release: true); + + set NSURLIsSymbolicLinkKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsSymbolicLinkKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsSymbolicLinkKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_delete_permPtr = - _lookup>( - 'acl_delete_perm'); - late final _acl_delete_perm = - _acl_delete_permPtr.asFunction(); + /// True for the root directory of a volume (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsVolumeKey = + _lookup('NSURLIsVolumeKey'); - int acl_get_perm_np( - acl_permset_t permset_d, - int perm, - ) { - return _acl_get_perm_np( - permset_d, - perm, - ); + DartNSURLResourceKey get NSURLIsVolumeKey => + objc.NSString.castFromPointer(_NSURLIsVolumeKey.value, + retain: true, release: true); + + set NSURLIsVolumeKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsVolumeKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsVolumeKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_get_perm_npPtr = - _lookup>( - 'acl_get_perm_np'); - late final _acl_get_perm_np = - _acl_get_perm_npPtr.asFunction(); + /// True for packaged directories (Read-only 10_6 and 10_7, read-write 10_8, value type boolean NSNumber). Note: You can only set or clear this property on directories; if you try to set this property on non-directory objects, the property is ignored. If the directory is a package for some other reason (extension type, etc), setting this property to false will have no effect. + late final ffi.Pointer _NSURLIsPackageKey = + _lookup('NSURLIsPackageKey'); - int acl_get_permset( - acl_entry_t entry_d, - ffi.Pointer permset_p, - ) { - return _acl_get_permset( - entry_d, - permset_p, - ); + DartNSURLResourceKey get NSURLIsPackageKey => + objc.NSString.castFromPointer(_NSURLIsPackageKey.value, + retain: true, release: true); + + set NSURLIsPackageKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsPackageKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsPackageKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_get_permsetPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - acl_entry_t, ffi.Pointer)>>('acl_get_permset'); - late final _acl_get_permset = _acl_get_permsetPtr - .asFunction)>(); + /// True if resource is an application (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsApplicationKey = + _lookup('NSURLIsApplicationKey'); - int acl_set_permset( - acl_entry_t entry_d, - acl_permset_t permset_d, - ) { - return _acl_set_permset( - entry_d, - permset_d, - ); + DartNSURLResourceKey get NSURLIsApplicationKey => + objc.NSString.castFromPointer(_NSURLIsApplicationKey.value, + retain: true, release: true); + + set NSURLIsApplicationKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsApplicationKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsApplicationKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_set_permsetPtr = - _lookup>( - 'acl_set_permset'); - late final _acl_set_permset = _acl_set_permsetPtr - .asFunction(); + /// True if the resource is scriptable. Only applies to applications (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLApplicationIsScriptableKey = + _lookup('NSURLApplicationIsScriptableKey'); - int acl_maximal_permset_mask_np( - ffi.Pointer mask_p, - ) { - return _acl_maximal_permset_mask_np( - mask_p, - ); + DartNSURLResourceKey get NSURLApplicationIsScriptableKey => + objc.NSString.castFromPointer(_NSURLApplicationIsScriptableKey.value, + retain: true, release: true); + + set NSURLApplicationIsScriptableKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLApplicationIsScriptableKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLApplicationIsScriptableKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_maximal_permset_mask_npPtr = _lookup< - ffi - .NativeFunction)>>( - 'acl_maximal_permset_mask_np'); - late final _acl_maximal_permset_mask_np = _acl_maximal_permset_mask_npPtr - .asFunction)>(); + /// True for system-immutable resources (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsSystemImmutableKey = + _lookup('NSURLIsSystemImmutableKey'); - int acl_get_permset_mask_np( - acl_entry_t entry_d, - ffi.Pointer mask_p, - ) { - return _acl_get_permset_mask_np( - entry_d, - mask_p, - ); + DartNSURLResourceKey get NSURLIsSystemImmutableKey => + objc.NSString.castFromPointer(_NSURLIsSystemImmutableKey.value, + retain: true, release: true); + + set NSURLIsSystemImmutableKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsSystemImmutableKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsSystemImmutableKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_get_permset_mask_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(acl_entry_t, - ffi.Pointer)>>('acl_get_permset_mask_np'); - late final _acl_get_permset_mask_np = _acl_get_permset_mask_npPtr - .asFunction)>(); + /// True for user-immutable resources (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsUserImmutableKey = + _lookup('NSURLIsUserImmutableKey'); - int acl_set_permset_mask_np( - acl_entry_t entry_d, - int mask, - ) { - return _acl_set_permset_mask_np( - entry_d, - mask, - ); + DartNSURLResourceKey get NSURLIsUserImmutableKey => + objc.NSString.castFromPointer(_NSURLIsUserImmutableKey.value, + retain: true, release: true); + + set NSURLIsUserImmutableKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsUserImmutableKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsUserImmutableKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_set_permset_mask_npPtr = _lookup< - ffi - .NativeFunction>( - 'acl_set_permset_mask_np'); - late final _acl_set_permset_mask_np = - _acl_set_permset_mask_npPtr.asFunction(); + /// True for resources normally not displayed to users (Read-write, value type boolean NSNumber). Note: If the resource is a hidden because its name starts with a period, setting this property to false will not change the property. + late final ffi.Pointer _NSURLIsHiddenKey = + _lookup('NSURLIsHiddenKey'); - int acl_add_flag_np( - acl_flagset_t flagset_d, - int flag, - ) { - return _acl_add_flag_np( - flagset_d, - flag, - ); + DartNSURLResourceKey get NSURLIsHiddenKey => + objc.NSString.castFromPointer(_NSURLIsHiddenKey.value, + retain: true, release: true); + + set NSURLIsHiddenKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsHiddenKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsHiddenKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_add_flag_npPtr = - _lookup>( - 'acl_add_flag_np'); - late final _acl_add_flag_np = - _acl_add_flag_npPtr.asFunction(); + /// True for resources whose filename extension is removed from the localized name property (Read-write, value type boolean NSNumber) + late final ffi.Pointer _NSURLHasHiddenExtensionKey = + _lookup('NSURLHasHiddenExtensionKey'); - int acl_clear_flags_np( - acl_flagset_t flagset_d, - ) { - return _acl_clear_flags_np( - flagset_d, - ); + DartNSURLResourceKey get NSURLHasHiddenExtensionKey => + objc.NSString.castFromPointer(_NSURLHasHiddenExtensionKey.value, + retain: true, release: true); + + set NSURLHasHiddenExtensionKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLHasHiddenExtensionKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLHasHiddenExtensionKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_clear_flags_npPtr = - _lookup>( - 'acl_clear_flags_np'); - late final _acl_clear_flags_np = - _acl_clear_flags_npPtr.asFunction(); + /// The date the resource was created (Read-write, value type NSDate) + late final ffi.Pointer _NSURLCreationDateKey = + _lookup('NSURLCreationDateKey'); - int acl_delete_flag_np( - acl_flagset_t flagset_d, - int flag, - ) { - return _acl_delete_flag_np( - flagset_d, - flag, - ); + DartNSURLResourceKey get NSURLCreationDateKey => + objc.NSString.castFromPointer(_NSURLCreationDateKey.value, + retain: true, release: true); + + set NSURLCreationDateKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLCreationDateKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLCreationDateKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_delete_flag_npPtr = - _lookup>( - 'acl_delete_flag_np'); - late final _acl_delete_flag_np = - _acl_delete_flag_npPtr.asFunction(); + /// The date the resource was last accessed (Read-write, value type NSDate) + late final ffi.Pointer _NSURLContentAccessDateKey = + _lookup('NSURLContentAccessDateKey'); - int acl_get_flag_np( - acl_flagset_t flagset_d, - int flag, - ) { - return _acl_get_flag_np( - flagset_d, - flag, - ); + DartNSURLResourceKey get NSURLContentAccessDateKey => + objc.NSString.castFromPointer(_NSURLContentAccessDateKey.value, + retain: true, release: true); + + set NSURLContentAccessDateKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLContentAccessDateKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLContentAccessDateKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_get_flag_npPtr = - _lookup>( - 'acl_get_flag_np'); - late final _acl_get_flag_np = - _acl_get_flag_npPtr.asFunction(); + /// The time the resource content was last modified (Read-write, value type NSDate) + late final ffi.Pointer _NSURLContentModificationDateKey = + _lookup('NSURLContentModificationDateKey'); - int acl_get_flagset_np( - ffi.Pointer obj_p, - ffi.Pointer flagset_p, - ) { - return _acl_get_flagset_np( - obj_p, - flagset_p, - ); + DartNSURLResourceKey get NSURLContentModificationDateKey => + objc.NSString.castFromPointer(_NSURLContentModificationDateKey.value, + retain: true, release: true); + + set NSURLContentModificationDateKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLContentModificationDateKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLContentModificationDateKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_get_flagset_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>('acl_get_flagset_np'); - late final _acl_get_flagset_np = _acl_get_flagset_npPtr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); + /// The time the resource's attributes were last modified (Read-only, value type NSDate) + late final ffi.Pointer _NSURLAttributeModificationDateKey = + _lookup('NSURLAttributeModificationDateKey'); - int acl_set_flagset_np( - ffi.Pointer obj_p, - acl_flagset_t flagset_d, - ) { - return _acl_set_flagset_np( - obj_p, - flagset_d, - ); + DartNSURLResourceKey get NSURLAttributeModificationDateKey => + objc.NSString.castFromPointer(_NSURLAttributeModificationDateKey.value, + retain: true, release: true); + + set NSURLAttributeModificationDateKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLAttributeModificationDateKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLAttributeModificationDateKey.value = + value.ref.retainAndReturnPointer(); } - late final _acl_set_flagset_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, acl_flagset_t)>>('acl_set_flagset_np'); - late final _acl_set_flagset_np = _acl_set_flagset_npPtr - .asFunction, acl_flagset_t)>(); + /// Number of hard links to the resource (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLLinkCountKey = + _lookup('NSURLLinkCountKey'); - ffi.Pointer acl_get_qualifier( - acl_entry_t entry_d, - ) { - return _acl_get_qualifier( - entry_d, - ); + DartNSURLResourceKey get NSURLLinkCountKey => + objc.NSString.castFromPointer(_NSURLLinkCountKey.value, + retain: true, release: true); + + set NSURLLinkCountKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLLinkCountKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLLinkCountKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_get_qualifierPtr = - _lookup Function(acl_entry_t)>>( - 'acl_get_qualifier'); - late final _acl_get_qualifier = _acl_get_qualifierPtr - .asFunction Function(acl_entry_t)>(); + /// The resource's parent directory, if any (Read-only, value type NSURL) + late final ffi.Pointer _NSURLParentDirectoryURLKey = + _lookup('NSURLParentDirectoryURLKey'); - int acl_get_tag_type( - acl_entry_t entry_d, - ffi.Pointer tag_type_p, - ) { - return _acl_get_tag_type( - entry_d, - tag_type_p, - ); + DartNSURLResourceKey get NSURLParentDirectoryURLKey => + objc.NSString.castFromPointer(_NSURLParentDirectoryURLKey.value, + retain: true, release: true); + + set NSURLParentDirectoryURLKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLParentDirectoryURLKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLParentDirectoryURLKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_get_tag_typePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - acl_entry_t, ffi.Pointer)>>('acl_get_tag_type'); - late final _acl_get_tag_type = _acl_get_tag_typePtr - .asFunction)>(); + /// URL of the volume on which the resource is stored (Read-only, value type NSURL) + late final ffi.Pointer _NSURLVolumeURLKey = + _lookup('NSURLVolumeURLKey'); - int acl_set_qualifier( - acl_entry_t entry_d, - ffi.Pointer tag_qualifier_p, - ) { - return _acl_set_qualifier( - entry_d, - tag_qualifier_p, - ); + DartNSURLResourceKey get NSURLVolumeURLKey => + objc.NSString.castFromPointer(_NSURLVolumeURLKey.value, + retain: true, release: true); + + set NSURLVolumeURLKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeURLKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeURLKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_set_qualifierPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - acl_entry_t, ffi.Pointer)>>('acl_set_qualifier'); - late final _acl_set_qualifier = _acl_set_qualifierPtr - .asFunction)>(); + /// Uniform type identifier (UTI) for the resource (Read-only, value type NSString) + late final ffi.Pointer _NSURLTypeIdentifierKey = + _lookup('NSURLTypeIdentifierKey'); - int acl_set_tag_type( - acl_entry_t entry_d, - int tag_type, - ) { - return _acl_set_tag_type( - entry_d, - tag_type, - ); + DartNSURLResourceKey get NSURLTypeIdentifierKey => + objc.NSString.castFromPointer(_NSURLTypeIdentifierKey.value, + retain: true, release: true); + + set NSURLTypeIdentifierKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLTypeIdentifierKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLTypeIdentifierKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_set_tag_typePtr = - _lookup>( - 'acl_set_tag_type'); - late final _acl_set_tag_type = - _acl_set_tag_typePtr.asFunction(); + /// File type (UTType) for the resource (Read-only, value type UTType) + late final ffi.Pointer _NSURLContentTypeKey = + _lookup('NSURLContentTypeKey'); - int acl_delete_def_file( - ffi.Pointer path_p, - ) { - return _acl_delete_def_file( - path_p, - ); + DartNSURLResourceKey get NSURLContentTypeKey => + objc.NSString.castFromPointer(_NSURLContentTypeKey.value, + retain: true, release: true); + + set NSURLContentTypeKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLContentTypeKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLContentTypeKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_delete_def_filePtr = - _lookup)>>( - 'acl_delete_def_file'); - late final _acl_delete_def_file = - _acl_delete_def_filePtr.asFunction)>(); + /// User-visible type or "kind" description (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedTypeDescriptionKey = + _lookup('NSURLLocalizedTypeDescriptionKey'); - acl_t acl_get_fd( - int fd, - ) { - return _acl_get_fd( - fd, - ); + DartNSURLResourceKey get NSURLLocalizedTypeDescriptionKey => + objc.NSString.castFromPointer(_NSURLLocalizedTypeDescriptionKey.value, + retain: true, release: true); + + set NSURLLocalizedTypeDescriptionKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLLocalizedTypeDescriptionKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLLocalizedTypeDescriptionKey.value = + value.ref.retainAndReturnPointer(); } - late final _acl_get_fdPtr = - _lookup>('acl_get_fd'); - late final _acl_get_fd = _acl_get_fdPtr.asFunction(); + /// The label number assigned to the resource (Read-write, value type NSNumber) + late final ffi.Pointer _NSURLLabelNumberKey = + _lookup('NSURLLabelNumberKey'); - acl_t acl_get_fd_np( - int fd, - int type, - ) { - return _acl_get_fd_np( - fd, - type, - ); + DartNSURLResourceKey get NSURLLabelNumberKey => + objc.NSString.castFromPointer(_NSURLLabelNumberKey.value, + retain: true, release: true); + + set NSURLLabelNumberKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLLabelNumberKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLLabelNumberKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_get_fd_npPtr = - _lookup>( - 'acl_get_fd_np'); - late final _acl_get_fd_np = - _acl_get_fd_npPtr.asFunction(); + /// The color of the assigned label (Read-only, value type NSColor) + late final ffi.Pointer _NSURLLabelColorKey = + _lookup('NSURLLabelColorKey'); - acl_t acl_get_file( - ffi.Pointer path_p, - int type, - ) { - return _acl_get_file( - path_p, - type, - ); + DartNSURLResourceKey get NSURLLabelColorKey => + objc.NSString.castFromPointer(_NSURLLabelColorKey.value, + retain: true, release: true); + + set NSURLLabelColorKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLLabelColorKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLLabelColorKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_get_filePtr = _lookup< - ffi.NativeFunction, ffi.Int32)>>( - 'acl_get_file'); - late final _acl_get_file = - _acl_get_filePtr.asFunction, int)>(); + /// The user-visible label text (Read-only, value type NSString) + late final ffi.Pointer _NSURLLocalizedLabelKey = + _lookup('NSURLLocalizedLabelKey'); - acl_t acl_get_link_np( - ffi.Pointer path_p, - int type, - ) { - return _acl_get_link_np( - path_p, - type, - ); + DartNSURLResourceKey get NSURLLocalizedLabelKey => + objc.NSString.castFromPointer(_NSURLLocalizedLabelKey.value, + retain: true, release: true); + + set NSURLLocalizedLabelKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLLocalizedLabelKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLLocalizedLabelKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_get_link_npPtr = _lookup< - ffi.NativeFunction, ffi.Int32)>>( - 'acl_get_link_np'); - late final _acl_get_link_np = _acl_get_link_npPtr - .asFunction, int)>(); + /// The icon normally displayed for the resource (Read-only, value type NSImage) + late final ffi.Pointer _NSURLEffectiveIconKey = + _lookup('NSURLEffectiveIconKey'); - int acl_set_fd( - int fd, - acl_t acl, - ) { - return _acl_set_fd( - fd, - acl, - ); + DartNSURLResourceKey get NSURLEffectiveIconKey => + objc.NSString.castFromPointer(_NSURLEffectiveIconKey.value, + retain: true, release: true); + + set NSURLEffectiveIconKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLEffectiveIconKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLEffectiveIconKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_set_fdPtr = - _lookup>( - 'acl_set_fd'); - late final _acl_set_fd = - _acl_set_fdPtr.asFunction(); + /// The custom icon assigned to the resource, if any (Currently not implemented, value type NSImage) + late final ffi.Pointer _NSURLCustomIconKey = + _lookup('NSURLCustomIconKey'); - int acl_set_fd_np( - int fd, - acl_t acl, - int acl_type, - ) { - return _acl_set_fd_np( - fd, - acl, - acl_type, - ); + DartNSURLResourceKey get NSURLCustomIconKey => + objc.NSString.castFromPointer(_NSURLCustomIconKey.value, + retain: true, release: true); + + set NSURLCustomIconKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLCustomIconKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLCustomIconKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_set_fd_npPtr = - _lookup>( - 'acl_set_fd_np'); - late final _acl_set_fd_np = - _acl_set_fd_npPtr.asFunction(); + /// An identifier which can be used to compare two file system objects for equality using -isEqual (i.e, two object identifiers are equal if they have the same file system path or if the paths are linked to same inode on the same file system). This identifier is not persistent across system restarts. (Read-only, value type id ) + late final ffi.Pointer _NSURLFileResourceIdentifierKey = + _lookup('NSURLFileResourceIdentifierKey'); - int acl_set_file( - ffi.Pointer path_p, - int type, - acl_t acl, - ) { - return _acl_set_file( - path_p, - type, - acl, - ); + DartNSURLResourceKey get NSURLFileResourceIdentifierKey => + objc.NSString.castFromPointer(_NSURLFileResourceIdentifierKey.value, + retain: true, release: true); + + set NSURLFileResourceIdentifierKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLFileResourceIdentifierKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileResourceIdentifierKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_set_filePtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int32, acl_t)>>('acl_set_file'); - late final _acl_set_file = _acl_set_filePtr - .asFunction, int, acl_t)>(); + /// An identifier that can be used to identify the volume the file system object is on. Other objects on the same volume will have the same volume identifier and can be compared using for equality using -isEqual. This identifier is not persistent across system restarts. (Read-only, value type id ) + late final ffi.Pointer _NSURLVolumeIdentifierKey = + _lookup('NSURLVolumeIdentifierKey'); - int acl_set_link_np( - ffi.Pointer path_p, - int type, - acl_t acl, - ) { - return _acl_set_link_np( - path_p, - type, - acl, - ); + DartNSURLResourceKey get NSURLVolumeIdentifierKey => + objc.NSString.castFromPointer(_NSURLVolumeIdentifierKey.value, + retain: true, release: true); + + set NSURLVolumeIdentifierKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeIdentifierKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeIdentifierKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_set_link_npPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int32, acl_t)>>('acl_set_link_np'); - late final _acl_set_link_np = _acl_set_link_npPtr - .asFunction, int, acl_t)>(); + /// The optimal block size when reading or writing this file's data, or nil if not available. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLPreferredIOBlockSizeKey = + _lookup('NSURLPreferredIOBlockSizeKey'); - int acl_copy_ext( - ffi.Pointer buf_p, - acl_t acl, - int size, - ) { - return _acl_copy_ext( - buf_p, - acl, - size, - ); + DartNSURLResourceKey get NSURLPreferredIOBlockSizeKey => + objc.NSString.castFromPointer(_NSURLPreferredIOBlockSizeKey.value, + retain: true, release: true); + + set NSURLPreferredIOBlockSizeKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLPreferredIOBlockSizeKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLPreferredIOBlockSizeKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_copy_extPtr = _lookup< - ffi.NativeFunction< - ssize_t Function( - ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext'); - late final _acl_copy_ext = _acl_copy_extPtr - .asFunction, acl_t, int)>(); + /// true if this process (as determined by EUID) can read the resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsReadableKey = + _lookup('NSURLIsReadableKey'); - int acl_copy_ext_native( - ffi.Pointer buf_p, - acl_t acl, - int size, - ) { - return _acl_copy_ext_native( - buf_p, - acl, - size, - ); + DartNSURLResourceKey get NSURLIsReadableKey => + objc.NSString.castFromPointer(_NSURLIsReadableKey.value, + retain: true, release: true); + + set NSURLIsReadableKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsReadableKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsReadableKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_copy_ext_nativePtr = _lookup< - ffi.NativeFunction< - ssize_t Function( - ffi.Pointer, acl_t, ssize_t)>>('acl_copy_ext_native'); - late final _acl_copy_ext_native = _acl_copy_ext_nativePtr - .asFunction, acl_t, int)>(); + /// true if this process (as determined by EUID) can write to the resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsWritableKey = + _lookup('NSURLIsWritableKey'); - acl_t acl_copy_int( - ffi.Pointer buf_p, - ) { - return _acl_copy_int( - buf_p, - ); + DartNSURLResourceKey get NSURLIsWritableKey => + objc.NSString.castFromPointer(_NSURLIsWritableKey.value, + retain: true, release: true); + + set NSURLIsWritableKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsWritableKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsWritableKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_copy_intPtr = - _lookup)>>( - 'acl_copy_int'); - late final _acl_copy_int = - _acl_copy_intPtr.asFunction)>(); + /// true if this process (as determined by EUID) can execute a file resource or search a directory resource. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsExecutableKey = + _lookup('NSURLIsExecutableKey'); - acl_t acl_copy_int_native( - ffi.Pointer buf_p, - ) { - return _acl_copy_int_native( - buf_p, - ); + DartNSURLResourceKey get NSURLIsExecutableKey => + objc.NSString.castFromPointer(_NSURLIsExecutableKey.value, + retain: true, release: true); + + set NSURLIsExecutableKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsExecutableKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsExecutableKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_copy_int_nativePtr = - _lookup)>>( - 'acl_copy_int_native'); - late final _acl_copy_int_native = _acl_copy_int_nativePtr - .asFunction)>(); + /// The file system object's security information encapsulated in a NSFileSecurity object. (Read-write, Value type NSFileSecurity) + late final ffi.Pointer _NSURLFileSecurityKey = + _lookup('NSURLFileSecurityKey'); - acl_t acl_from_text( - ffi.Pointer buf_p, - ) { - return _acl_from_text( - buf_p, - ); + DartNSURLResourceKey get NSURLFileSecurityKey => + objc.NSString.castFromPointer(_NSURLFileSecurityKey.value, + retain: true, release: true); + + set NSURLFileSecurityKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLFileSecurityKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileSecurityKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_from_textPtr = - _lookup)>>( - 'acl_from_text'); - late final _acl_from_text = - _acl_from_textPtr.asFunction)>(); + /// true if resource should be excluded from backups, false otherwise (Read-write, value type boolean NSNumber). This property is only useful for excluding cache and other application support files which are not needed in a backup. Some operations commonly made to user documents will cause this property to be reset to false and so this property should not be used on user documents. + late final ffi.Pointer _NSURLIsExcludedFromBackupKey = + _lookup('NSURLIsExcludedFromBackupKey'); - int acl_size( - acl_t acl, - ) { - return _acl_size( - acl, - ); + DartNSURLResourceKey get NSURLIsExcludedFromBackupKey => + objc.NSString.castFromPointer(_NSURLIsExcludedFromBackupKey.value, + retain: true, release: true); + + set NSURLIsExcludedFromBackupKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsExcludedFromBackupKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsExcludedFromBackupKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_sizePtr = - _lookup>('acl_size'); - late final _acl_size = _acl_sizePtr.asFunction(); + /// The array of Tag names (Read-write, value type NSArray of NSString) + late final ffi.Pointer _NSURLTagNamesKey = + _lookup('NSURLTagNamesKey'); - ffi.Pointer acl_to_text( - acl_t acl, - ffi.Pointer len_p, - ) { - return _acl_to_text( - acl, - len_p, - ); + DartNSURLResourceKey get NSURLTagNamesKey => + objc.NSString.castFromPointer(_NSURLTagNamesKey.value, + retain: true, release: true); + + set NSURLTagNamesKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLTagNamesKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLTagNamesKey.value = value.ref.retainAndReturnPointer(); } - late final _acl_to_textPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - acl_t, ffi.Pointer)>>('acl_to_text'); - late final _acl_to_text = _acl_to_textPtr.asFunction< - ffi.Pointer Function(acl_t, ffi.Pointer)>(); + /// the URL's path as a file system path (Read-only, value type NSString) + late final ffi.Pointer _NSURLPathKey = + _lookup('NSURLPathKey'); - int CFFileSecurityGetTypeID() { - return _CFFileSecurityGetTypeID(); + DartNSURLResourceKey get NSURLPathKey => + objc.NSString.castFromPointer(_NSURLPathKey.value, + retain: true, release: true); + + set NSURLPathKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLPathKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLPathKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecurityGetTypeIDPtr = - _lookup>( - 'CFFileSecurityGetTypeID'); - late final _CFFileSecurityGetTypeID = - _CFFileSecurityGetTypeIDPtr.asFunction(); + /// the URL's path as a canonical absolute file system path (Read-only, value type NSString) + late final ffi.Pointer _NSURLCanonicalPathKey = + _lookup('NSURLCanonicalPathKey'); - CFFileSecurityRef CFFileSecurityCreate( - CFAllocatorRef allocator, - ) { - return _CFFileSecurityCreate( - allocator, - ); + DartNSURLResourceKey get NSURLCanonicalPathKey => + objc.NSString.castFromPointer(_NSURLCanonicalPathKey.value, + retain: true, release: true); + + set NSURLCanonicalPathKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLCanonicalPathKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLCanonicalPathKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecurityCreatePtr = - _lookup>( - 'CFFileSecurityCreate'); - late final _CFFileSecurityCreate = _CFFileSecurityCreatePtr.asFunction< - CFFileSecurityRef Function(CFAllocatorRef)>(); + /// true if this URL is a file system trigger directory. Traversing or opening a file system trigger will cause an attempt to mount a file system on the trigger directory. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsMountTriggerKey = + _lookup('NSURLIsMountTriggerKey'); - CFFileSecurityRef CFFileSecurityCreateCopy( - CFAllocatorRef allocator, - CFFileSecurityRef fileSec, - ) { - return _CFFileSecurityCreateCopy( - allocator, - fileSec, - ); + DartNSURLResourceKey get NSURLIsMountTriggerKey => + objc.NSString.castFromPointer(_NSURLIsMountTriggerKey.value, + retain: true, release: true); + + set NSURLIsMountTriggerKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsMountTriggerKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsMountTriggerKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecurityCreateCopyPtr = _lookup< - ffi.NativeFunction< - CFFileSecurityRef Function( - CFAllocatorRef, CFFileSecurityRef)>>('CFFileSecurityCreateCopy'); - late final _CFFileSecurityCreateCopy = - _CFFileSecurityCreateCopyPtr.asFunction< - CFFileSecurityRef Function(CFAllocatorRef, CFFileSecurityRef)>(); + /// An opaque generation identifier which can be compared using isEqual: to determine if the data in a document has been modified. For URLs which refer to the same file inode, the generation identifier will change when the data in the file's data fork is changed (changes to extended attributes or other file system metadata do not change the generation identifier). For URLs which refer to the same directory inode, the generation identifier will change when direct children of that directory are added, removed or renamed (changes to the data of the direct children of that directory will not change the generation identifier). The generation identifier is persistent across system restarts. The generation identifier is tied to a specific document on a specific volume and is not transferred when the document is copied to another volume. This property is not supported by all volumes. (Read-only, value type id ) + late final ffi.Pointer _NSURLGenerationIdentifierKey = + _lookup('NSURLGenerationIdentifierKey'); - int CFFileSecurityCopyOwnerUUID( - CFFileSecurityRef fileSec, - ffi.Pointer ownerUUID, - ) { - return _CFFileSecurityCopyOwnerUUID( - fileSec, - ownerUUID, - ); + DartNSURLResourceKey get NSURLGenerationIdentifierKey => + objc.NSString.castFromPointer(_NSURLGenerationIdentifierKey.value, + retain: true, release: true); + + set NSURLGenerationIdentifierKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLGenerationIdentifierKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLGenerationIdentifierKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecurityCopyOwnerUUIDPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityCopyOwnerUUID'); - late final _CFFileSecurityCopyOwnerUUID = _CFFileSecurityCopyOwnerUUIDPtr - .asFunction)>(); + /// The document identifier -- a value assigned by the kernel to a document (which can be either a file or directory) and is used to identify the document regardless of where it gets moved on a volume. The document identifier survives "safe save” operations; i.e it is sticky to the path it was assigned to (-replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: is the preferred safe-save API). The document identifier is persistent across system restarts. The document identifier is not transferred when the file is copied. Document identifiers are only unique within a single volume. This property is not supported by all volumes. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLDocumentIdentifierKey = + _lookup('NSURLDocumentIdentifierKey'); - int CFFileSecuritySetOwnerUUID( - CFFileSecurityRef fileSec, - CFUUIDRef ownerUUID, - ) { - return _CFFileSecuritySetOwnerUUID( - fileSec, - ownerUUID, - ); + DartNSURLResourceKey get NSURLDocumentIdentifierKey => + objc.NSString.castFromPointer(_NSURLDocumentIdentifierKey.value, + retain: true, release: true); + + set NSURLDocumentIdentifierKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLDocumentIdentifierKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLDocumentIdentifierKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecuritySetOwnerUUIDPtr = _lookup< - ffi.NativeFunction>( - 'CFFileSecuritySetOwnerUUID'); - late final _CFFileSecuritySetOwnerUUID = _CFFileSecuritySetOwnerUUIDPtr - .asFunction(); + /// The date the resource was created, or renamed into or within its parent directory. Note that inconsistent behavior may be observed when this attribute is requested on hard-linked items. This property is not supported by all volumes. (Read-only before macOS 10.15, iOS 13.0, watchOS 6.0, and tvOS 13.0; Read-write after, value type NSDate) + late final ffi.Pointer _NSURLAddedToDirectoryDateKey = + _lookup('NSURLAddedToDirectoryDateKey'); - int CFFileSecurityCopyGroupUUID( - CFFileSecurityRef fileSec, - ffi.Pointer groupUUID, - ) { - return _CFFileSecurityCopyGroupUUID( - fileSec, - groupUUID, - ); + DartNSURLResourceKey get NSURLAddedToDirectoryDateKey => + objc.NSString.castFromPointer(_NSURLAddedToDirectoryDateKey.value, + retain: true, release: true); + + set NSURLAddedToDirectoryDateKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLAddedToDirectoryDateKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLAddedToDirectoryDateKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecurityCopyGroupUUIDPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityCopyGroupUUID'); - late final _CFFileSecurityCopyGroupUUID = _CFFileSecurityCopyGroupUUIDPtr - .asFunction)>(); + /// The quarantine properties as defined in LSQuarantine.h. To remove quarantine information from a file, pass NSNull as the value when setting this property. (Read-write, value type NSDictionary) + late final ffi.Pointer _NSURLQuarantinePropertiesKey = + _lookup('NSURLQuarantinePropertiesKey'); - int CFFileSecuritySetGroupUUID( - CFFileSecurityRef fileSec, - CFUUIDRef groupUUID, - ) { - return _CFFileSecuritySetGroupUUID( - fileSec, - groupUUID, - ); + DartNSURLResourceKey get NSURLQuarantinePropertiesKey => + objc.NSString.castFromPointer(_NSURLQuarantinePropertiesKey.value, + retain: true, release: true); + + set NSURLQuarantinePropertiesKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLQuarantinePropertiesKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLQuarantinePropertiesKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecuritySetGroupUUIDPtr = _lookup< - ffi.NativeFunction>( - 'CFFileSecuritySetGroupUUID'); - late final _CFFileSecuritySetGroupUUID = _CFFileSecuritySetGroupUUIDPtr - .asFunction(); + /// Returns the file system object type. (Read-only, value type NSString) + late final ffi.Pointer _NSURLFileResourceTypeKey = + _lookup('NSURLFileResourceTypeKey'); - int CFFileSecurityCopyAccessControlList( - CFFileSecurityRef fileSec, - ffi.Pointer accessControlList, - ) { - return _CFFileSecurityCopyAccessControlList( - fileSec, - accessControlList, - ); + DartNSURLResourceKey get NSURLFileResourceTypeKey => + objc.NSString.castFromPointer(_NSURLFileResourceTypeKey.value, + retain: true, release: true); + + set NSURLFileResourceTypeKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLFileResourceTypeKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileResourceTypeKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecurityCopyAccessControlListPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityCopyAccessControlList'); - late final _CFFileSecurityCopyAccessControlList = - _CFFileSecurityCopyAccessControlListPtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + /// The file system's internal inode identifier for the item. This value is not stable for all file systems or across all mounts, so it should be used sparingly and not persisted. It is useful, for example, to match URLs from the URL enumerator with paths from FSEvents. (Read-only, value type NSNumber containing an unsigned long long). + late final ffi.Pointer _NSURLFileIdentifierKey = + _lookup('NSURLFileIdentifierKey'); - int CFFileSecuritySetAccessControlList( - CFFileSecurityRef fileSec, - acl_t accessControlList, - ) { - return _CFFileSecuritySetAccessControlList( - fileSec, - accessControlList, - ); + DartNSURLResourceKey get NSURLFileIdentifierKey => + objc.NSString.castFromPointer(_NSURLFileIdentifierKey.value, + retain: true, release: true); + + set NSURLFileIdentifierKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLFileIdentifierKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileIdentifierKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecuritySetAccessControlListPtr = - _lookup>( - 'CFFileSecuritySetAccessControlList'); - late final _CFFileSecuritySetAccessControlList = - _CFFileSecuritySetAccessControlListPtr.asFunction< - int Function(CFFileSecurityRef, acl_t)>(); + /// A 64-bit value assigned by APFS that identifies a file's content data stream. Only cloned files and their originals can have the same identifier. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileContentIdentifierKey = + _lookup('NSURLFileContentIdentifierKey'); - int CFFileSecurityGetOwner( - CFFileSecurityRef fileSec, - ffi.Pointer owner, - ) { - return _CFFileSecurityGetOwner( - fileSec, - owner, - ); + DartNSURLResourceKey get NSURLFileContentIdentifierKey => + objc.NSString.castFromPointer(_NSURLFileContentIdentifierKey.value, + retain: true, release: true); + + set NSURLFileContentIdentifierKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLFileContentIdentifierKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileContentIdentifierKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecurityGetOwnerPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityGetOwner'); - late final _CFFileSecurityGetOwner = _CFFileSecurityGetOwnerPtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + /// True for cloned files and their originals that may share all, some, or no data blocks. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLMayShareFileContentKey = + _lookup('NSURLMayShareFileContentKey'); - int CFFileSecuritySetOwner( - CFFileSecurityRef fileSec, - int owner, - ) { - return _CFFileSecuritySetOwner( - fileSec, - owner, - ); + DartNSURLResourceKey get NSURLMayShareFileContentKey => + objc.NSString.castFromPointer(_NSURLMayShareFileContentKey.value, + retain: true, release: true); + + set NSURLMayShareFileContentKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLMayShareFileContentKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLMayShareFileContentKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecuritySetOwnerPtr = - _lookup>( - 'CFFileSecuritySetOwner'); - late final _CFFileSecuritySetOwner = _CFFileSecuritySetOwnerPtr.asFunction< - int Function(CFFileSecurityRef, int)>(); + /// True if the file has extended attributes. False guarantees there are none. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLMayHaveExtendedAttributesKey = + _lookup('NSURLMayHaveExtendedAttributesKey'); - int CFFileSecurityGetGroup( - CFFileSecurityRef fileSec, - ffi.Pointer group, - ) { - return _CFFileSecurityGetGroup( - fileSec, - group, - ); + DartNSURLResourceKey get NSURLMayHaveExtendedAttributesKey => + objc.NSString.castFromPointer(_NSURLMayHaveExtendedAttributesKey.value, + retain: true, release: true); + + set NSURLMayHaveExtendedAttributesKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLMayHaveExtendedAttributesKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLMayHaveExtendedAttributesKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFFileSecurityGetGroupPtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityGetGroup'); - late final _CFFileSecurityGetGroup = _CFFileSecurityGetGroupPtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + /// True if the file can be deleted by the file system when asked to free space. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLIsPurgeableKey = + _lookup('NSURLIsPurgeableKey'); - int CFFileSecuritySetGroup( - CFFileSecurityRef fileSec, - int group, - ) { - return _CFFileSecuritySetGroup( - fileSec, - group, - ); + DartNSURLResourceKey get NSURLIsPurgeableKey => + objc.NSString.castFromPointer(_NSURLIsPurgeableKey.value, + retain: true, release: true); + + set NSURLIsPurgeableKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsPurgeableKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsPurgeableKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecuritySetGroupPtr = - _lookup>( - 'CFFileSecuritySetGroup'); - late final _CFFileSecuritySetGroup = _CFFileSecuritySetGroupPtr.asFunction< - int Function(CFFileSecurityRef, int)>(); + /// True if the file has sparse regions. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLIsSparseKey = + _lookup('NSURLIsSparseKey'); - int CFFileSecurityGetMode( - CFFileSecurityRef fileSec, - ffi.Pointer mode, - ) { - return _CFFileSecurityGetMode( - fileSec, - mode, - ); + DartNSURLResourceKey get NSURLIsSparseKey => + objc.NSString.castFromPointer(_NSURLIsSparseKey.value, + retain: true, release: true); + + set NSURLIsSparseKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsSparseKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsSparseKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecurityGetModePtr = _lookup< - ffi.NativeFunction< - Boolean Function(CFFileSecurityRef, - ffi.Pointer)>>('CFFileSecurityGetMode'); - late final _CFFileSecurityGetMode = _CFFileSecurityGetModePtr.asFunction< - int Function(CFFileSecurityRef, ffi.Pointer)>(); + /// The file system object type values returned for the NSURLFileResourceTypeKey + late final ffi.Pointer + _NSURLFileResourceTypeNamedPipe = + _lookup('NSURLFileResourceTypeNamedPipe'); - int CFFileSecuritySetMode( - CFFileSecurityRef fileSec, - int mode, - ) { - return _CFFileSecuritySetMode( - fileSec, - mode, - ); + DartNSURLFileResourceType get NSURLFileResourceTypeNamedPipe => + objc.NSString.castFromPointer(_NSURLFileResourceTypeNamedPipe.value, + retain: true, release: true); + + set NSURLFileResourceTypeNamedPipe(DartNSURLFileResourceType value) { + objc.NSString.castFromPointer(_NSURLFileResourceTypeNamedPipe.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileResourceTypeNamedPipe.value = value.ref.retainAndReturnPointer(); } - late final _CFFileSecuritySetModePtr = - _lookup>( - 'CFFileSecuritySetMode'); - late final _CFFileSecuritySetMode = _CFFileSecuritySetModePtr.asFunction< - int Function(CFFileSecurityRef, int)>(); + late final ffi.Pointer + _NSURLFileResourceTypeCharacterSpecial = + _lookup('NSURLFileResourceTypeCharacterSpecial'); - int CFFileSecurityClearProperties( - CFFileSecurityRef fileSec, - int clearPropertyMask, - ) { - return _CFFileSecurityClearProperties( - fileSec, - clearPropertyMask, - ); + DartNSURLFileResourceType get NSURLFileResourceTypeCharacterSpecial => + objc.NSString.castFromPointer( + _NSURLFileResourceTypeCharacterSpecial.value, + retain: true, + release: true); + + set NSURLFileResourceTypeCharacterSpecial(DartNSURLFileResourceType value) { + objc.NSString.castFromPointer(_NSURLFileResourceTypeCharacterSpecial.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileResourceTypeCharacterSpecial.value = + value.ref.retainAndReturnPointer(); } - late final _CFFileSecurityClearPropertiesPtr = _lookup< - ffi.NativeFunction>( - 'CFFileSecurityClearProperties'); - late final _CFFileSecurityClearProperties = _CFFileSecurityClearPropertiesPtr - .asFunction(); + late final ffi.Pointer + _NSURLFileResourceTypeDirectory = + _lookup('NSURLFileResourceTypeDirectory'); - CFStringRef CFStringTokenizerCopyBestStringLanguage( - CFStringRef string, - CFRange range, - ) { - return _CFStringTokenizerCopyBestStringLanguage( - string, - range, - ); + DartNSURLFileResourceType get NSURLFileResourceTypeDirectory => + objc.NSString.castFromPointer(_NSURLFileResourceTypeDirectory.value, + retain: true, release: true); + + set NSURLFileResourceTypeDirectory(DartNSURLFileResourceType value) { + objc.NSString.castFromPointer(_NSURLFileResourceTypeDirectory.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileResourceTypeDirectory.value = value.ref.retainAndReturnPointer(); } - late final _CFStringTokenizerCopyBestStringLanguagePtr = - _lookup>( - 'CFStringTokenizerCopyBestStringLanguage'); - late final _CFStringTokenizerCopyBestStringLanguage = - _CFStringTokenizerCopyBestStringLanguagePtr.asFunction< - CFStringRef Function(CFStringRef, CFRange)>(); + late final ffi.Pointer + _NSURLFileResourceTypeBlockSpecial = + _lookup('NSURLFileResourceTypeBlockSpecial'); - int CFStringTokenizerGetTypeID() { - return _CFStringTokenizerGetTypeID(); + DartNSURLFileResourceType get NSURLFileResourceTypeBlockSpecial => + objc.NSString.castFromPointer(_NSURLFileResourceTypeBlockSpecial.value, + retain: true, release: true); + + set NSURLFileResourceTypeBlockSpecial(DartNSURLFileResourceType value) { + objc.NSString.castFromPointer(_NSURLFileResourceTypeBlockSpecial.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileResourceTypeBlockSpecial.value = + value.ref.retainAndReturnPointer(); } - late final _CFStringTokenizerGetTypeIDPtr = - _lookup>( - 'CFStringTokenizerGetTypeID'); - late final _CFStringTokenizerGetTypeID = - _CFStringTokenizerGetTypeIDPtr.asFunction(); + late final ffi.Pointer _NSURLFileResourceTypeRegular = + _lookup('NSURLFileResourceTypeRegular'); - CFStringTokenizerRef CFStringTokenizerCreate( - CFAllocatorRef alloc, - CFStringRef string, - CFRange range, - int options, - CFLocaleRef locale, - ) { - return _CFStringTokenizerCreate( - alloc, - string, - range, - options, - locale, - ); + DartNSURLFileResourceType get NSURLFileResourceTypeRegular => + objc.NSString.castFromPointer(_NSURLFileResourceTypeRegular.value, + retain: true, release: true); + + set NSURLFileResourceTypeRegular(DartNSURLFileResourceType value) { + objc.NSString.castFromPointer(_NSURLFileResourceTypeRegular.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileResourceTypeRegular.value = value.ref.retainAndReturnPointer(); } - late final _CFStringTokenizerCreatePtr = _lookup< - ffi.NativeFunction< - CFStringTokenizerRef Function(CFAllocatorRef, CFStringRef, CFRange, - CFOptionFlags, CFLocaleRef)>>('CFStringTokenizerCreate'); - late final _CFStringTokenizerCreate = _CFStringTokenizerCreatePtr.asFunction< - CFStringTokenizerRef Function( - CFAllocatorRef, CFStringRef, CFRange, int, CFLocaleRef)>(); + late final ffi.Pointer + _NSURLFileResourceTypeSymbolicLink = + _lookup('NSURLFileResourceTypeSymbolicLink'); - void CFStringTokenizerSetString( - CFStringTokenizerRef tokenizer, - CFStringRef string, - CFRange range, - ) { - return _CFStringTokenizerSetString( - tokenizer, - string, - range, - ); + DartNSURLFileResourceType get NSURLFileResourceTypeSymbolicLink => + objc.NSString.castFromPointer(_NSURLFileResourceTypeSymbolicLink.value, + retain: true, release: true); + + set NSURLFileResourceTypeSymbolicLink(DartNSURLFileResourceType value) { + objc.NSString.castFromPointer(_NSURLFileResourceTypeSymbolicLink.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileResourceTypeSymbolicLink.value = + value.ref.retainAndReturnPointer(); } - late final _CFStringTokenizerSetStringPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFStringTokenizerRef, CFStringRef, - CFRange)>>('CFStringTokenizerSetString'); - late final _CFStringTokenizerSetString = _CFStringTokenizerSetStringPtr - .asFunction(); + late final ffi.Pointer _NSURLFileResourceTypeSocket = + _lookup('NSURLFileResourceTypeSocket'); - int CFStringTokenizerGoToTokenAtIndex( - CFStringTokenizerRef tokenizer, - int index, - ) { - return _CFStringTokenizerGoToTokenAtIndex( - tokenizer, - index, - ); + DartNSURLFileResourceType get NSURLFileResourceTypeSocket => + objc.NSString.castFromPointer(_NSURLFileResourceTypeSocket.value, + retain: true, release: true); + + set NSURLFileResourceTypeSocket(DartNSURLFileResourceType value) { + objc.NSString.castFromPointer(_NSURLFileResourceTypeSocket.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileResourceTypeSocket.value = value.ref.retainAndReturnPointer(); } - late final _CFStringTokenizerGoToTokenAtIndexPtr = _lookup< - ffi - .NativeFunction>( - 'CFStringTokenizerGoToTokenAtIndex'); - late final _CFStringTokenizerGoToTokenAtIndex = - _CFStringTokenizerGoToTokenAtIndexPtr.asFunction< - int Function(CFStringTokenizerRef, int)>(); + late final ffi.Pointer _NSURLFileResourceTypeUnknown = + _lookup('NSURLFileResourceTypeUnknown'); - int CFStringTokenizerAdvanceToNextToken( - CFStringTokenizerRef tokenizer, - ) { - return _CFStringTokenizerAdvanceToNextToken( - tokenizer, - ); + DartNSURLFileResourceType get NSURLFileResourceTypeUnknown => + objc.NSString.castFromPointer(_NSURLFileResourceTypeUnknown.value, + retain: true, release: true); + + set NSURLFileResourceTypeUnknown(DartNSURLFileResourceType value) { + objc.NSString.castFromPointer(_NSURLFileResourceTypeUnknown.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileResourceTypeUnknown.value = value.ref.retainAndReturnPointer(); } - late final _CFStringTokenizerAdvanceToNextTokenPtr = - _lookup>( - 'CFStringTokenizerAdvanceToNextToken'); - late final _CFStringTokenizerAdvanceToNextToken = - _CFStringTokenizerAdvanceToNextTokenPtr.asFunction< - int Function(CFStringTokenizerRef)>(); + /// dictionary of NSImage/UIImage objects keyed by size + late final ffi.Pointer _NSURLThumbnailDictionaryKey = + _lookup('NSURLThumbnailDictionaryKey'); - CFRange CFStringTokenizerGetCurrentTokenRange( - CFStringTokenizerRef tokenizer, - ) { - return _CFStringTokenizerGetCurrentTokenRange( - tokenizer, - ); + DartNSURLResourceKey get NSURLThumbnailDictionaryKey => + objc.NSString.castFromPointer(_NSURLThumbnailDictionaryKey.value, + retain: true, release: true); + + set NSURLThumbnailDictionaryKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLThumbnailDictionaryKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLThumbnailDictionaryKey.value = value.ref.retainAndReturnPointer(); } - late final _CFStringTokenizerGetCurrentTokenRangePtr = - _lookup>( - 'CFStringTokenizerGetCurrentTokenRange'); - late final _CFStringTokenizerGetCurrentTokenRange = - _CFStringTokenizerGetCurrentTokenRangePtr.asFunction< - CFRange Function(CFStringTokenizerRef)>(); + /// returns all thumbnails as a single NSImage + late final ffi.Pointer _NSURLThumbnailKey = + _lookup('NSURLThumbnailKey'); - CFTypeRef CFStringTokenizerCopyCurrentTokenAttribute( - CFStringTokenizerRef tokenizer, - int attribute, - ) { - return _CFStringTokenizerCopyCurrentTokenAttribute( - tokenizer, - attribute, - ); + DartNSURLResourceKey get NSURLThumbnailKey => + objc.NSString.castFromPointer(_NSURLThumbnailKey.value, + retain: true, release: true); + + set NSURLThumbnailKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLThumbnailKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLThumbnailKey.value = value.ref.retainAndReturnPointer(); } - late final _CFStringTokenizerCopyCurrentTokenAttributePtr = _lookup< - ffi.NativeFunction< - CFTypeRef Function(CFStringTokenizerRef, - CFOptionFlags)>>('CFStringTokenizerCopyCurrentTokenAttribute'); - late final _CFStringTokenizerCopyCurrentTokenAttribute = - _CFStringTokenizerCopyCurrentTokenAttributePtr.asFunction< - CFTypeRef Function(CFStringTokenizerRef, int)>(); + /// size key for a 1024 x 1024 thumbnail image + late final ffi.Pointer + _NSThumbnail1024x1024SizeKey = + _lookup('NSThumbnail1024x1024SizeKey'); - int CFStringTokenizerGetCurrentSubTokens( - CFStringTokenizerRef tokenizer, - ffi.Pointer ranges, - int maxRangeLength, - CFMutableArrayRef derivedSubTokens, - ) { - return _CFStringTokenizerGetCurrentSubTokens( - tokenizer, - ranges, - maxRangeLength, - derivedSubTokens, - ); + DartNSURLThumbnailDictionaryItem get NSThumbnail1024x1024SizeKey => + objc.NSString.castFromPointer(_NSThumbnail1024x1024SizeKey.value, + retain: true, release: true); + + set NSThumbnail1024x1024SizeKey(DartNSURLThumbnailDictionaryItem value) { + objc.NSString.castFromPointer(_NSThumbnail1024x1024SizeKey.value, + retain: false, release: true) + .ref + .release(); + _NSThumbnail1024x1024SizeKey.value = value.ref.retainAndReturnPointer(); } - late final _CFStringTokenizerGetCurrentSubTokensPtr = _lookup< - ffi.NativeFunction< - CFIndex Function(CFStringTokenizerRef, ffi.Pointer, CFIndex, - CFMutableArrayRef)>>('CFStringTokenizerGetCurrentSubTokens'); - late final _CFStringTokenizerGetCurrentSubTokens = - _CFStringTokenizerGetCurrentSubTokensPtr.asFunction< - int Function(CFStringTokenizerRef, ffi.Pointer, int, - CFMutableArrayRef)>(); + /// Total file size in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileSizeKey = + _lookup('NSURLFileSizeKey'); - int CFFileDescriptorGetTypeID() { - return _CFFileDescriptorGetTypeID(); + DartNSURLResourceKey get NSURLFileSizeKey => + objc.NSString.castFromPointer(_NSURLFileSizeKey.value, + retain: true, release: true); + + set NSURLFileSizeKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLFileSizeKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileSizeKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileDescriptorGetTypeIDPtr = - _lookup>( - 'CFFileDescriptorGetTypeID'); - late final _CFFileDescriptorGetTypeID = - _CFFileDescriptorGetTypeIDPtr.asFunction(); + /// Total size allocated on disk for the file in bytes (number of blocks times block size) (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLFileAllocatedSizeKey = + _lookup('NSURLFileAllocatedSizeKey'); - CFFileDescriptorRef CFFileDescriptorCreate( - CFAllocatorRef allocator, - int fd, - int closeOnInvalidate, - CFFileDescriptorCallBack callout, - ffi.Pointer context, - ) { - return _CFFileDescriptorCreate( - allocator, - fd, - closeOnInvalidate, - callout, - context, - ); + DartNSURLResourceKey get NSURLFileAllocatedSizeKey => + objc.NSString.castFromPointer(_NSURLFileAllocatedSizeKey.value, + retain: true, release: true); + + set NSURLFileAllocatedSizeKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLFileAllocatedSizeKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileAllocatedSizeKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileDescriptorCreatePtr = _lookup< - ffi.NativeFunction< - CFFileDescriptorRef Function( - CFAllocatorRef, - CFFileDescriptorNativeDescriptor, - Boolean, - CFFileDescriptorCallBack, - ffi.Pointer)>>('CFFileDescriptorCreate'); - late final _CFFileDescriptorCreate = _CFFileDescriptorCreatePtr.asFunction< - CFFileDescriptorRef Function(CFAllocatorRef, int, int, - CFFileDescriptorCallBack, ffi.Pointer)>(); + /// Total displayable size of the file in bytes (this may include space used by metadata), or nil if not available. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLTotalFileSizeKey = + _lookup('NSURLTotalFileSizeKey'); - int CFFileDescriptorGetNativeDescriptor( - CFFileDescriptorRef f, - ) { - return _CFFileDescriptorGetNativeDescriptor( - f, - ); + DartNSURLResourceKey get NSURLTotalFileSizeKey => + objc.NSString.castFromPointer(_NSURLTotalFileSizeKey.value, + retain: true, release: true); + + set NSURLTotalFileSizeKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLTotalFileSizeKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLTotalFileSizeKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileDescriptorGetNativeDescriptorPtr = _lookup< - ffi.NativeFunction< - CFFileDescriptorNativeDescriptor Function( - CFFileDescriptorRef)>>('CFFileDescriptorGetNativeDescriptor'); - late final _CFFileDescriptorGetNativeDescriptor = - _CFFileDescriptorGetNativeDescriptorPtr.asFunction< - int Function(CFFileDescriptorRef)>(); + /// Total allocated size of the file in bytes (this may include space used by metadata), or nil if not available. This can be less than the value returned by NSURLTotalFileSizeKey if the resource is compressed. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLTotalFileAllocatedSizeKey = + _lookup('NSURLTotalFileAllocatedSizeKey'); - void CFFileDescriptorGetContext( - CFFileDescriptorRef f, - ffi.Pointer context, - ) { - return _CFFileDescriptorGetContext( - f, - context, - ); + DartNSURLResourceKey get NSURLTotalFileAllocatedSizeKey => + objc.NSString.castFromPointer(_NSURLTotalFileAllocatedSizeKey.value, + retain: true, release: true); + + set NSURLTotalFileAllocatedSizeKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLTotalFileAllocatedSizeKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLTotalFileAllocatedSizeKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileDescriptorGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFFileDescriptorRef, ffi.Pointer)>>( - 'CFFileDescriptorGetContext'); - late final _CFFileDescriptorGetContext = - _CFFileDescriptorGetContextPtr.asFunction< - void Function( - CFFileDescriptorRef, ffi.Pointer)>(); + /// true if the resource is a Finder alias file or a symlink, false otherwise ( Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsAliasFileKey = + _lookup('NSURLIsAliasFileKey'); - void CFFileDescriptorEnableCallBacks( - CFFileDescriptorRef f, - int callBackTypes, - ) { - return _CFFileDescriptorEnableCallBacks( - f, - callBackTypes, - ); + DartNSURLResourceKey get NSURLIsAliasFileKey => + objc.NSString.castFromPointer(_NSURLIsAliasFileKey.value, + retain: true, release: true); + + set NSURLIsAliasFileKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsAliasFileKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsAliasFileKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileDescriptorEnableCallBacksPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFFileDescriptorRef, - CFOptionFlags)>>('CFFileDescriptorEnableCallBacks'); - late final _CFFileDescriptorEnableCallBacks = - _CFFileDescriptorEnableCallBacksPtr.asFunction< - void Function(CFFileDescriptorRef, int)>(); + /// The protection level for this file + late final ffi.Pointer _NSURLFileProtectionKey = + _lookup('NSURLFileProtectionKey'); - void CFFileDescriptorDisableCallBacks( - CFFileDescriptorRef f, - int callBackTypes, - ) { - return _CFFileDescriptorDisableCallBacks( - f, - callBackTypes, - ); + DartNSURLResourceKey get NSURLFileProtectionKey => + objc.NSString.castFromPointer(_NSURLFileProtectionKey.value, + retain: true, release: true); + + set NSURLFileProtectionKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLFileProtectionKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileProtectionKey.value = value.ref.retainAndReturnPointer(); } - late final _CFFileDescriptorDisableCallBacksPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFFileDescriptorRef, - CFOptionFlags)>>('CFFileDescriptorDisableCallBacks'); - late final _CFFileDescriptorDisableCallBacks = - _CFFileDescriptorDisableCallBacksPtr.asFunction< - void Function(CFFileDescriptorRef, int)>(); + /// The file has no special protections associated with it. It can be read from or written to at any time. + late final ffi.Pointer _NSURLFileProtectionNone = + _lookup('NSURLFileProtectionNone'); - void CFFileDescriptorInvalidate( - CFFileDescriptorRef f, - ) { - return _CFFileDescriptorInvalidate( - f, - ); + DartNSURLFileProtectionType get NSURLFileProtectionNone => + objc.NSString.castFromPointer(_NSURLFileProtectionNone.value, + retain: true, release: true); + + set NSURLFileProtectionNone(DartNSURLFileProtectionType value) { + objc.NSString.castFromPointer(_NSURLFileProtectionNone.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileProtectionNone.value = value.ref.retainAndReturnPointer(); } - late final _CFFileDescriptorInvalidatePtr = - _lookup>( - 'CFFileDescriptorInvalidate'); - late final _CFFileDescriptorInvalidate = _CFFileDescriptorInvalidatePtr - .asFunction(); + /// The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting. Transient data files with this protection type should be excluded from backups using NSURLIsExcludedFromBackupKey. + late final ffi.Pointer _NSURLFileProtectionComplete = + _lookup('NSURLFileProtectionComplete'); - int CFFileDescriptorIsValid( - CFFileDescriptorRef f, - ) { - return _CFFileDescriptorIsValid( - f, - ); + DartNSURLFileProtectionType get NSURLFileProtectionComplete => + objc.NSString.castFromPointer(_NSURLFileProtectionComplete.value, + retain: true, release: true); + + set NSURLFileProtectionComplete(DartNSURLFileProtectionType value) { + objc.NSString.castFromPointer(_NSURLFileProtectionComplete.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileProtectionComplete.value = value.ref.retainAndReturnPointer(); } - late final _CFFileDescriptorIsValidPtr = - _lookup>( - 'CFFileDescriptorIsValid'); - late final _CFFileDescriptorIsValid = _CFFileDescriptorIsValidPtr.asFunction< - int Function(CFFileDescriptorRef)>(); + /// The file is stored in an encrypted format on disk. Files can be created while the device is locked, but once closed, cannot be opened again until the device is unlocked. If the file is opened when unlocked, you may continue to access the file normally, even if the user locks the device. There is a small performance penalty when the file is created and opened, though not when being written to or read from. This can be mitigated by changing the file protection to NSURLFileProtectionComplete when the device is unlocked. Transient data files with this protection type should be excluded from backups using NSURLIsExcludedFromBackupKey. + late final ffi.Pointer + _NSURLFileProtectionCompleteUnlessOpen = + _lookup('NSURLFileProtectionCompleteUnlessOpen'); - CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource( - CFAllocatorRef allocator, - CFFileDescriptorRef f, - int order, - ) { - return _CFFileDescriptorCreateRunLoopSource( - allocator, - f, - order, - ); + DartNSURLFileProtectionType get NSURLFileProtectionCompleteUnlessOpen => + objc.NSString.castFromPointer( + _NSURLFileProtectionCompleteUnlessOpen.value, + retain: true, + release: true); + + set NSURLFileProtectionCompleteUnlessOpen(DartNSURLFileProtectionType value) { + objc.NSString.castFromPointer(_NSURLFileProtectionCompleteUnlessOpen.value, + retain: false, release: true) + .ref + .release(); + _NSURLFileProtectionCompleteUnlessOpen.value = + value.ref.retainAndReturnPointer(); } - late final _CFFileDescriptorCreateRunLoopSourcePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFFileDescriptorRef, - CFIndex)>>('CFFileDescriptorCreateRunLoopSource'); - late final _CFFileDescriptorCreateRunLoopSource = - _CFFileDescriptorCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function( - CFAllocatorRef, CFFileDescriptorRef, int)>(); + /// The file is stored in an encrypted format on disk and cannot be accessed until after the device has booted. After the user unlocks the device for the first time, your app can access the file and continue to access it even if the user subsequently locks the device. + late final ffi.Pointer + _NSURLFileProtectionCompleteUntilFirstUserAuthentication = + _lookup( + 'NSURLFileProtectionCompleteUntilFirstUserAuthentication'); - int CFUserNotificationGetTypeID() { - return _CFUserNotificationGetTypeID(); + DartNSURLFileProtectionType + get NSURLFileProtectionCompleteUntilFirstUserAuthentication => + objc.NSString.castFromPointer( + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value, + retain: true, + release: true); + + set NSURLFileProtectionCompleteUntilFirstUserAuthentication( + DartNSURLFileProtectionType value) { + objc.NSString.castFromPointer( + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value, + retain: false, + release: true) + .ref + .release(); + _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value = + value.ref.retainAndReturnPointer(); } - late final _CFUserNotificationGetTypeIDPtr = - _lookup>( - 'CFUserNotificationGetTypeID'); - late final _CFUserNotificationGetTypeID = - _CFUserNotificationGetTypeIDPtr.asFunction(); + /// The file is stored in an encrypted format on disk and cannot be accessed until after first unlock after the device has booted. After this first unlock, your app can access the file even while the device is locked until access expiry. Access is renewed once the user unlocks the device again. + late final ffi.Pointer + _NSURLFileProtectionCompleteWhenUserInactive = + _lookup( + 'NSURLFileProtectionCompleteWhenUserInactive'); - CFUserNotificationRef CFUserNotificationCreate( - CFAllocatorRef allocator, - double timeout, - int flags, - ffi.Pointer error, - CFDictionaryRef dictionary, - ) { - return _CFUserNotificationCreate( - allocator, - timeout, - flags, - error, - dictionary, - ); + DartNSURLFileProtectionType get NSURLFileProtectionCompleteWhenUserInactive => + objc.NSString.castFromPointer( + _NSURLFileProtectionCompleteWhenUserInactive.value, + retain: true, + release: true); + + set NSURLFileProtectionCompleteWhenUserInactive( + DartNSURLFileProtectionType value) { + objc.NSString.castFromPointer( + _NSURLFileProtectionCompleteWhenUserInactive.value, + retain: false, + release: true) + .ref + .release(); + _NSURLFileProtectionCompleteWhenUserInactive.value = + value.ref.retainAndReturnPointer(); } - late final _CFUserNotificationCreatePtr = _lookup< - ffi.NativeFunction< - CFUserNotificationRef Function( - CFAllocatorRef, - CFTimeInterval, - CFOptionFlags, - ffi.Pointer, - CFDictionaryRef)>>('CFUserNotificationCreate'); - late final _CFUserNotificationCreate = - _CFUserNotificationCreatePtr.asFunction< - CFUserNotificationRef Function(CFAllocatorRef, double, int, - ffi.Pointer, CFDictionaryRef)>(); + /// Returns the count of file system objects contained in the directory. This is a count of objects actually stored in the file system, so excludes virtual items like "." and "..". The property is useful for quickly identifying an empty directory for backup and syncing. If the URL is not a directory or the file system cannot cheaply compute the value, `nil` is returned. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLDirectoryEntryCountKey = + _lookup('NSURLDirectoryEntryCountKey'); - int CFUserNotificationReceiveResponse( - CFUserNotificationRef userNotification, - double timeout, - ffi.Pointer responseFlags, - ) { - return _CFUserNotificationReceiveResponse( - userNotification, - timeout, - responseFlags, - ); + DartNSURLResourceKey get NSURLDirectoryEntryCountKey => + objc.NSString.castFromPointer(_NSURLDirectoryEntryCountKey.value, + retain: true, release: true); + + set NSURLDirectoryEntryCountKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLDirectoryEntryCountKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLDirectoryEntryCountKey.value = value.ref.retainAndReturnPointer(); } - late final _CFUserNotificationReceiveResponsePtr = _lookup< - ffi.NativeFunction< - SInt32 Function(CFUserNotificationRef, CFTimeInterval, - ffi.Pointer)>>( - 'CFUserNotificationReceiveResponse'); - late final _CFUserNotificationReceiveResponse = - _CFUserNotificationReceiveResponsePtr.asFunction< - int Function( - CFUserNotificationRef, double, ffi.Pointer)>(); + /// The user-visible volume format (Read-only, value type NSString) + late final ffi.Pointer + _NSURLVolumeLocalizedFormatDescriptionKey = + _lookup('NSURLVolumeLocalizedFormatDescriptionKey'); - CFStringRef CFUserNotificationGetResponseValue( - CFUserNotificationRef userNotification, - CFStringRef key, - int idx, - ) { - return _CFUserNotificationGetResponseValue( - userNotification, - key, - idx, - ); + DartNSURLResourceKey get NSURLVolumeLocalizedFormatDescriptionKey => + objc.NSString.castFromPointer( + _NSURLVolumeLocalizedFormatDescriptionKey.value, + retain: true, + release: true); + + set NSURLVolumeLocalizedFormatDescriptionKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLVolumeLocalizedFormatDescriptionKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLVolumeLocalizedFormatDescriptionKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFUserNotificationGetResponseValuePtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFUserNotificationRef, CFStringRef, - CFIndex)>>('CFUserNotificationGetResponseValue'); - late final _CFUserNotificationGetResponseValue = - _CFUserNotificationGetResponseValuePtr.asFunction< - CFStringRef Function(CFUserNotificationRef, CFStringRef, int)>(); + /// Total volume capacity in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeTotalCapacityKey = + _lookup('NSURLVolumeTotalCapacityKey'); - CFDictionaryRef CFUserNotificationGetResponseDictionary( - CFUserNotificationRef userNotification, - ) { - return _CFUserNotificationGetResponseDictionary( - userNotification, - ); + DartNSURLResourceKey get NSURLVolumeTotalCapacityKey => + objc.NSString.castFromPointer(_NSURLVolumeTotalCapacityKey.value, + retain: true, release: true); + + set NSURLVolumeTotalCapacityKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeTotalCapacityKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeTotalCapacityKey.value = value.ref.retainAndReturnPointer(); } - late final _CFUserNotificationGetResponseDictionaryPtr = _lookup< - ffi.NativeFunction>( - 'CFUserNotificationGetResponseDictionary'); - late final _CFUserNotificationGetResponseDictionary = - _CFUserNotificationGetResponseDictionaryPtr.asFunction< - CFDictionaryRef Function(CFUserNotificationRef)>(); + /// Total free space in bytes (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeAvailableCapacityKey = + _lookup('NSURLVolumeAvailableCapacityKey'); - int CFUserNotificationUpdate( - CFUserNotificationRef userNotification, - double timeout, - int flags, - CFDictionaryRef dictionary, - ) { - return _CFUserNotificationUpdate( - userNotification, - timeout, - flags, - dictionary, - ); + DartNSURLResourceKey get NSURLVolumeAvailableCapacityKey => + objc.NSString.castFromPointer(_NSURLVolumeAvailableCapacityKey.value, + retain: true, release: true); + + set NSURLVolumeAvailableCapacityKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeAvailableCapacityKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeAvailableCapacityKey.value = value.ref.retainAndReturnPointer(); } - late final _CFUserNotificationUpdatePtr = _lookup< - ffi.NativeFunction< - SInt32 Function(CFUserNotificationRef, CFTimeInterval, CFOptionFlags, - CFDictionaryRef)>>('CFUserNotificationUpdate'); - late final _CFUserNotificationUpdate = - _CFUserNotificationUpdatePtr.asFunction< - int Function(CFUserNotificationRef, double, int, CFDictionaryRef)>(); + /// Total number of resources on the volume (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeResourceCountKey = + _lookup('NSURLVolumeResourceCountKey'); - int CFUserNotificationCancel( - CFUserNotificationRef userNotification, - ) { - return _CFUserNotificationCancel( - userNotification, - ); + DartNSURLResourceKey get NSURLVolumeResourceCountKey => + objc.NSString.castFromPointer(_NSURLVolumeResourceCountKey.value, + retain: true, release: true); + + set NSURLVolumeResourceCountKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeResourceCountKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeResourceCountKey.value = value.ref.retainAndReturnPointer(); } - late final _CFUserNotificationCancelPtr = - _lookup>( - 'CFUserNotificationCancel'); - late final _CFUserNotificationCancel = _CFUserNotificationCancelPtr - .asFunction(); + /// true if the volume format supports persistent object identifiers and can look up file system objects by their IDs (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsPersistentIDsKey = + _lookup('NSURLVolumeSupportsPersistentIDsKey'); - CFRunLoopSourceRef CFUserNotificationCreateRunLoopSource( - CFAllocatorRef allocator, - CFUserNotificationRef userNotification, - CFUserNotificationCallBack callout, - int order, - ) { - return _CFUserNotificationCreateRunLoopSource( - allocator, - userNotification, - callout, - order, - ); + DartNSURLResourceKey get NSURLVolumeSupportsPersistentIDsKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsPersistentIDsKey.value, + retain: true, release: true); + + set NSURLVolumeSupportsPersistentIDsKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsPersistentIDsKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsPersistentIDsKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFUserNotificationCreateRunLoopSourcePtr = _lookup< - ffi.NativeFunction< - CFRunLoopSourceRef Function( - CFAllocatorRef, - CFUserNotificationRef, - CFUserNotificationCallBack, - CFIndex)>>('CFUserNotificationCreateRunLoopSource'); - late final _CFUserNotificationCreateRunLoopSource = - _CFUserNotificationCreateRunLoopSourcePtr.asFunction< - CFRunLoopSourceRef Function(CFAllocatorRef, CFUserNotificationRef, - CFUserNotificationCallBack, int)>(); + /// true if the volume format supports symbolic links (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsSymbolicLinksKey = + _lookup('NSURLVolumeSupportsSymbolicLinksKey'); - int CFUserNotificationDisplayNotice( - double timeout, - int flags, - CFURLRef iconURL, - CFURLRef soundURL, - CFURLRef localizationURL, - CFStringRef alertHeader, - CFStringRef alertMessage, - CFStringRef defaultButtonTitle, - ) { - return _CFUserNotificationDisplayNotice( - timeout, - flags, - iconURL, - soundURL, - localizationURL, - alertHeader, - alertMessage, - defaultButtonTitle, - ); + DartNSURLResourceKey get NSURLVolumeSupportsSymbolicLinksKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsSymbolicLinksKey.value, + retain: true, release: true); + + set NSURLVolumeSupportsSymbolicLinksKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsSymbolicLinksKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsSymbolicLinksKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFUserNotificationDisplayNoticePtr = _lookup< - ffi.NativeFunction< - SInt32 Function( - CFTimeInterval, - CFOptionFlags, - CFURLRef, - CFURLRef, - CFURLRef, - CFStringRef, - CFStringRef, - CFStringRef)>>('CFUserNotificationDisplayNotice'); - late final _CFUserNotificationDisplayNotice = - _CFUserNotificationDisplayNoticePtr.asFunction< - int Function(double, int, CFURLRef, CFURLRef, CFURLRef, CFStringRef, - CFStringRef, CFStringRef)>(); + /// true if the volume format supports hard links (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsHardLinksKey = + _lookup('NSURLVolumeSupportsHardLinksKey'); - int CFUserNotificationDisplayAlert( - double timeout, - int flags, - CFURLRef iconURL, - CFURLRef soundURL, - CFURLRef localizationURL, - CFStringRef alertHeader, - CFStringRef alertMessage, - CFStringRef defaultButtonTitle, - CFStringRef alternateButtonTitle, - CFStringRef otherButtonTitle, - ffi.Pointer responseFlags, - ) { - return _CFUserNotificationDisplayAlert( - timeout, - flags, - iconURL, - soundURL, - localizationURL, - alertHeader, - alertMessage, - defaultButtonTitle, - alternateButtonTitle, - otherButtonTitle, - responseFlags, - ); + DartNSURLResourceKey get NSURLVolumeSupportsHardLinksKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsHardLinksKey.value, + retain: true, release: true); + + set NSURLVolumeSupportsHardLinksKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsHardLinksKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsHardLinksKey.value = value.ref.retainAndReturnPointer(); } - late final _CFUserNotificationDisplayAlertPtr = _lookup< - ffi.NativeFunction< - SInt32 Function( - CFTimeInterval, - CFOptionFlags, - CFURLRef, - CFURLRef, - CFURLRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringRef, - ffi.Pointer)>>('CFUserNotificationDisplayAlert'); - late final _CFUserNotificationDisplayAlert = - _CFUserNotificationDisplayAlertPtr.asFunction< - int Function( - double, - int, - CFURLRef, - CFURLRef, - CFURLRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringRef, - CFStringRef, - ffi.Pointer)>(); + /// true if the volume format supports a journal used to speed recovery in case of unplanned restart (such as a power outage or crash). This does not necessarily mean the volume is actively using a journal. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsJournalingKey = + _lookup('NSURLVolumeSupportsJournalingKey'); - late final ffi.Pointer _kCFUserNotificationIconURLKey = - _lookup('kCFUserNotificationIconURLKey'); + DartNSURLResourceKey get NSURLVolumeSupportsJournalingKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsJournalingKey.value, + retain: true, release: true); - CFStringRef get kCFUserNotificationIconURLKey => - _kCFUserNotificationIconURLKey.value; + set NSURLVolumeSupportsJournalingKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsJournalingKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsJournalingKey.value = + value.ref.retainAndReturnPointer(); + } - late final ffi.Pointer _kCFUserNotificationSoundURLKey = - _lookup('kCFUserNotificationSoundURLKey'); + /// true if the volume is currently using a journal for speedy recovery after an unplanned restart. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsJournalingKey = + _lookup('NSURLVolumeIsJournalingKey'); - CFStringRef get kCFUserNotificationSoundURLKey => - _kCFUserNotificationSoundURLKey.value; + DartNSURLResourceKey get NSURLVolumeIsJournalingKey => + objc.NSString.castFromPointer(_NSURLVolumeIsJournalingKey.value, + retain: true, release: true); - late final ffi.Pointer _kCFUserNotificationLocalizationURLKey = - _lookup('kCFUserNotificationLocalizationURLKey'); + set NSURLVolumeIsJournalingKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeIsJournalingKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeIsJournalingKey.value = value.ref.retainAndReturnPointer(); + } - CFStringRef get kCFUserNotificationLocalizationURLKey => - _kCFUserNotificationLocalizationURLKey.value; + /// true if the volume format supports sparse files, that is, files which can have 'holes' that have never been written to, and thus do not consume space on disk. A sparse file may have an allocated size on disk that is less than its logical length (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsSparseFilesKey = + _lookup('NSURLVolumeSupportsSparseFilesKey'); - late final ffi.Pointer _kCFUserNotificationAlertHeaderKey = - _lookup('kCFUserNotificationAlertHeaderKey'); + DartNSURLResourceKey get NSURLVolumeSupportsSparseFilesKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsSparseFilesKey.value, + retain: true, release: true); - CFStringRef get kCFUserNotificationAlertHeaderKey => - _kCFUserNotificationAlertHeaderKey.value; + set NSURLVolumeSupportsSparseFilesKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsSparseFilesKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsSparseFilesKey.value = + value.ref.retainAndReturnPointer(); + } - late final ffi.Pointer _kCFUserNotificationAlertMessageKey = - _lookup('kCFUserNotificationAlertMessageKey'); + /// For security reasons, parts of a file (runs) that have never been written to must appear to contain zeroes. true if the volume keeps track of allocated but unwritten runs of a file so that it can substitute zeroes without actually writing zeroes to the media. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsZeroRunsKey = + _lookup('NSURLVolumeSupportsZeroRunsKey'); - CFStringRef get kCFUserNotificationAlertMessageKey => - _kCFUserNotificationAlertMessageKey.value; + DartNSURLResourceKey get NSURLVolumeSupportsZeroRunsKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsZeroRunsKey.value, + retain: true, release: true); - late final ffi.Pointer - _kCFUserNotificationDefaultButtonTitleKey = - _lookup('kCFUserNotificationDefaultButtonTitleKey'); + set NSURLVolumeSupportsZeroRunsKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsZeroRunsKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsZeroRunsKey.value = value.ref.retainAndReturnPointer(); + } - CFStringRef get kCFUserNotificationDefaultButtonTitleKey => - _kCFUserNotificationDefaultButtonTitleKey.value; + /// true if the volume format treats upper and lower case characters in file and directory names as different. Otherwise an upper case character is equivalent to a lower case character, and you can't have two names that differ solely in the case of the characters. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsCaseSensitiveNamesKey = + _lookup('NSURLVolumeSupportsCaseSensitiveNamesKey'); - late final ffi.Pointer - _kCFUserNotificationAlternateButtonTitleKey = - _lookup('kCFUserNotificationAlternateButtonTitleKey'); + DartNSURLResourceKey get NSURLVolumeSupportsCaseSensitiveNamesKey => + objc.NSString.castFromPointer( + _NSURLVolumeSupportsCaseSensitiveNamesKey.value, + retain: true, + release: true); - CFStringRef get kCFUserNotificationAlternateButtonTitleKey => - _kCFUserNotificationAlternateButtonTitleKey.value; + set NSURLVolumeSupportsCaseSensitiveNamesKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLVolumeSupportsCaseSensitiveNamesKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLVolumeSupportsCaseSensitiveNamesKey.value = + value.ref.retainAndReturnPointer(); + } - late final ffi.Pointer _kCFUserNotificationOtherButtonTitleKey = - _lookup('kCFUserNotificationOtherButtonTitleKey'); + /// true if the volume format preserves the case of file and directory names. Otherwise the volume may change the case of some characters (typically making them all upper or all lower case). (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsCasePreservedNamesKey = + _lookup('NSURLVolumeSupportsCasePreservedNamesKey'); - CFStringRef get kCFUserNotificationOtherButtonTitleKey => - _kCFUserNotificationOtherButtonTitleKey.value; + DartNSURLResourceKey get NSURLVolumeSupportsCasePreservedNamesKey => + objc.NSString.castFromPointer( + _NSURLVolumeSupportsCasePreservedNamesKey.value, + retain: true, + release: true); - late final ffi.Pointer - _kCFUserNotificationProgressIndicatorValueKey = - _lookup('kCFUserNotificationProgressIndicatorValueKey'); + set NSURLVolumeSupportsCasePreservedNamesKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLVolumeSupportsCasePreservedNamesKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLVolumeSupportsCasePreservedNamesKey.value = + value.ref.retainAndReturnPointer(); + } - CFStringRef get kCFUserNotificationProgressIndicatorValueKey => - _kCFUserNotificationProgressIndicatorValueKey.value; + /// true if the volume supports reliable storage of times for the root directory. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsRootDirectoryDatesKey = + _lookup('NSURLVolumeSupportsRootDirectoryDatesKey'); - late final ffi.Pointer _kCFUserNotificationPopUpTitlesKey = - _lookup('kCFUserNotificationPopUpTitlesKey'); + DartNSURLResourceKey get NSURLVolumeSupportsRootDirectoryDatesKey => + objc.NSString.castFromPointer( + _NSURLVolumeSupportsRootDirectoryDatesKey.value, + retain: true, + release: true); - CFStringRef get kCFUserNotificationPopUpTitlesKey => - _kCFUserNotificationPopUpTitlesKey.value; + set NSURLVolumeSupportsRootDirectoryDatesKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLVolumeSupportsRootDirectoryDatesKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLVolumeSupportsRootDirectoryDatesKey.value = + value.ref.retainAndReturnPointer(); + } - late final ffi.Pointer _kCFUserNotificationTextFieldTitlesKey = - _lookup('kCFUserNotificationTextFieldTitlesKey'); + /// true if the volume supports returning volume size values (NSURLVolumeTotalCapacityKey and NSURLVolumeAvailableCapacityKey). (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsVolumeSizesKey = + _lookup('NSURLVolumeSupportsVolumeSizesKey'); - CFStringRef get kCFUserNotificationTextFieldTitlesKey => - _kCFUserNotificationTextFieldTitlesKey.value; + DartNSURLResourceKey get NSURLVolumeSupportsVolumeSizesKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsVolumeSizesKey.value, + retain: true, release: true); - late final ffi.Pointer _kCFUserNotificationCheckBoxTitlesKey = - _lookup('kCFUserNotificationCheckBoxTitlesKey'); + set NSURLVolumeSupportsVolumeSizesKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsVolumeSizesKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsVolumeSizesKey.value = + value.ref.retainAndReturnPointer(); + } - CFStringRef get kCFUserNotificationCheckBoxTitlesKey => - _kCFUserNotificationCheckBoxTitlesKey.value; + /// true if the volume can be renamed. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsRenamingKey = + _lookup('NSURLVolumeSupportsRenamingKey'); - late final ffi.Pointer _kCFUserNotificationTextFieldValuesKey = - _lookup('kCFUserNotificationTextFieldValuesKey'); + DartNSURLResourceKey get NSURLVolumeSupportsRenamingKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsRenamingKey.value, + retain: true, release: true); - CFStringRef get kCFUserNotificationTextFieldValuesKey => - _kCFUserNotificationTextFieldValuesKey.value; + set NSURLVolumeSupportsRenamingKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsRenamingKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsRenamingKey.value = value.ref.retainAndReturnPointer(); + } - late final ffi.Pointer _kCFUserNotificationPopUpSelectionKey = - _lookup('kCFUserNotificationPopUpSelectionKey'); + /// true if the volume implements whole-file flock(2) style advisory locks, and the O_EXLOCK and O_SHLOCK flags of the open(2) call. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsAdvisoryFileLockingKey = + _lookup('NSURLVolumeSupportsAdvisoryFileLockingKey'); - CFStringRef get kCFUserNotificationPopUpSelectionKey => - _kCFUserNotificationPopUpSelectionKey.value; + DartNSURLResourceKey get NSURLVolumeSupportsAdvisoryFileLockingKey => + objc.NSString.castFromPointer( + _NSURLVolumeSupportsAdvisoryFileLockingKey.value, + retain: true, + release: true); - late final ffi.Pointer _kCFUserNotificationAlertTopMostKey = - _lookup('kCFUserNotificationAlertTopMostKey'); + set NSURLVolumeSupportsAdvisoryFileLockingKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLVolumeSupportsAdvisoryFileLockingKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLVolumeSupportsAdvisoryFileLockingKey.value = + value.ref.retainAndReturnPointer(); + } - CFStringRef get kCFUserNotificationAlertTopMostKey => - _kCFUserNotificationAlertTopMostKey.value; + /// true if the volume implements extended security (ACLs). (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsExtendedSecurityKey = + _lookup('NSURLVolumeSupportsExtendedSecurityKey'); - late final ffi.Pointer _kCFUserNotificationKeyboardTypesKey = - _lookup('kCFUserNotificationKeyboardTypesKey'); + DartNSURLResourceKey get NSURLVolumeSupportsExtendedSecurityKey => + objc.NSString.castFromPointer( + _NSURLVolumeSupportsExtendedSecurityKey.value, + retain: true, + release: true); - CFStringRef get kCFUserNotificationKeyboardTypesKey => - _kCFUserNotificationKeyboardTypesKey.value; + set NSURLVolumeSupportsExtendedSecurityKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsExtendedSecurityKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsExtendedSecurityKey.value = + value.ref.retainAndReturnPointer(); + } - int CFXMLNodeGetTypeID() { - return _CFXMLNodeGetTypeID(); + /// true if the volume should be visible via the GUI (i.e., appear on the Desktop as a separate volume). (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsBrowsableKey = + _lookup('NSURLVolumeIsBrowsableKey'); + + DartNSURLResourceKey get NSURLVolumeIsBrowsableKey => + objc.NSString.castFromPointer(_NSURLVolumeIsBrowsableKey.value, + retain: true, release: true); + + set NSURLVolumeIsBrowsableKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeIsBrowsableKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeIsBrowsableKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLNodeGetTypeIDPtr = - _lookup>('CFXMLNodeGetTypeID'); - late final _CFXMLNodeGetTypeID = - _CFXMLNodeGetTypeIDPtr.asFunction(); + /// The largest file size (in bytes) supported by this file system, or nil if this cannot be determined. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeMaximumFileSizeKey = + _lookup('NSURLVolumeMaximumFileSizeKey'); - CFXMLNodeRef CFXMLNodeCreate( - CFAllocatorRef alloc, - int xmlType, - CFStringRef dataString, - ffi.Pointer additionalInfoPtr, - int version, - ) { - return _CFXMLNodeCreate( - alloc, - xmlType, - dataString, - additionalInfoPtr, - version, - ); + DartNSURLResourceKey get NSURLVolumeMaximumFileSizeKey => + objc.NSString.castFromPointer(_NSURLVolumeMaximumFileSizeKey.value, + retain: true, release: true); + + set NSURLVolumeMaximumFileSizeKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeMaximumFileSizeKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeMaximumFileSizeKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLNodeCreatePtr = _lookup< - ffi.NativeFunction< - CFXMLNodeRef Function(CFAllocatorRef, ffi.Int32, CFStringRef, - ffi.Pointer, CFIndex)>>('CFXMLNodeCreate'); - late final _CFXMLNodeCreate = _CFXMLNodeCreatePtr.asFunction< - CFXMLNodeRef Function( - CFAllocatorRef, int, CFStringRef, ffi.Pointer, int)>(); + /// true if the volume's media is ejectable from the drive mechanism under software control. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsEjectableKey = + _lookup('NSURLVolumeIsEjectableKey'); - CFXMLNodeRef CFXMLNodeCreateCopy( - CFAllocatorRef alloc, - CFXMLNodeRef origNode, - ) { - return _CFXMLNodeCreateCopy( - alloc, - origNode, - ); + DartNSURLResourceKey get NSURLVolumeIsEjectableKey => + objc.NSString.castFromPointer(_NSURLVolumeIsEjectableKey.value, + retain: true, release: true); + + set NSURLVolumeIsEjectableKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeIsEjectableKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeIsEjectableKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLNodeCreateCopyPtr = _lookup< - ffi - .NativeFunction>( - 'CFXMLNodeCreateCopy'); - late final _CFXMLNodeCreateCopy = _CFXMLNodeCreateCopyPtr.asFunction< - CFXMLNodeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); + /// true if the volume's media is removable from the drive mechanism. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsRemovableKey = + _lookup('NSURLVolumeIsRemovableKey'); - int CFXMLNodeGetTypeCode( - CFXMLNodeRef node, - ) { - return _CFXMLNodeGetTypeCode( - node, - ); + DartNSURLResourceKey get NSURLVolumeIsRemovableKey => + objc.NSString.castFromPointer(_NSURLVolumeIsRemovableKey.value, + retain: true, release: true); + + set NSURLVolumeIsRemovableKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeIsRemovableKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeIsRemovableKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLNodeGetTypeCodePtr = - _lookup>( - 'CFXMLNodeGetTypeCode'); - late final _CFXMLNodeGetTypeCode = - _CFXMLNodeGetTypeCodePtr.asFunction(); + /// true if the volume's device is connected to an internal bus, false if connected to an external bus, or nil if not available. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsInternalKey = + _lookup('NSURLVolumeIsInternalKey'); - CFStringRef CFXMLNodeGetString( - CFXMLNodeRef node, - ) { - return _CFXMLNodeGetString( - node, - ); + DartNSURLResourceKey get NSURLVolumeIsInternalKey => + objc.NSString.castFromPointer(_NSURLVolumeIsInternalKey.value, + retain: true, release: true); + + set NSURLVolumeIsInternalKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeIsInternalKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeIsInternalKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLNodeGetStringPtr = - _lookup>( - 'CFXMLNodeGetString'); - late final _CFXMLNodeGetString = - _CFXMLNodeGetStringPtr.asFunction(); + /// true if the volume is automounted. Note: do not mistake this with the functionality provided by kCFURLVolumeSupportsBrowsingKey. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsAutomountedKey = + _lookup('NSURLVolumeIsAutomountedKey'); - ffi.Pointer CFXMLNodeGetInfoPtr( - CFXMLNodeRef node, - ) { - return _CFXMLNodeGetInfoPtr( - node, - ); + DartNSURLResourceKey get NSURLVolumeIsAutomountedKey => + objc.NSString.castFromPointer(_NSURLVolumeIsAutomountedKey.value, + retain: true, release: true); + + set NSURLVolumeIsAutomountedKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeIsAutomountedKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeIsAutomountedKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLNodeGetInfoPtrPtr = - _lookup Function(CFXMLNodeRef)>>( - 'CFXMLNodeGetInfoPtr'); - late final _CFXMLNodeGetInfoPtr = _CFXMLNodeGetInfoPtrPtr.asFunction< - ffi.Pointer Function(CFXMLNodeRef)>(); + /// true if the volume is stored on a local device. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsLocalKey = + _lookup('NSURLVolumeIsLocalKey'); - int CFXMLNodeGetVersion( - CFXMLNodeRef node, - ) { - return _CFXMLNodeGetVersion( - node, - ); + DartNSURLResourceKey get NSURLVolumeIsLocalKey => + objc.NSString.castFromPointer(_NSURLVolumeIsLocalKey.value, + retain: true, release: true); + + set NSURLVolumeIsLocalKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeIsLocalKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeIsLocalKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLNodeGetVersionPtr = - _lookup>( - 'CFXMLNodeGetVersion'); - late final _CFXMLNodeGetVersion = - _CFXMLNodeGetVersionPtr.asFunction(); + /// true if the volume is read-only. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsReadOnlyKey = + _lookup('NSURLVolumeIsReadOnlyKey'); - CFXMLTreeRef CFXMLTreeCreateWithNode( - CFAllocatorRef allocator, - CFXMLNodeRef node, - ) { - return _CFXMLTreeCreateWithNode( - allocator, - node, - ); + DartNSURLResourceKey get NSURLVolumeIsReadOnlyKey => + objc.NSString.castFromPointer(_NSURLVolumeIsReadOnlyKey.value, + retain: true, release: true); + + set NSURLVolumeIsReadOnlyKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeIsReadOnlyKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeIsReadOnlyKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLTreeCreateWithNodePtr = _lookup< - ffi - .NativeFunction>( - 'CFXMLTreeCreateWithNode'); - late final _CFXMLTreeCreateWithNode = _CFXMLTreeCreateWithNodePtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFXMLNodeRef)>(); + /// The volume's creation date, or nil if this cannot be determined. (Read-only, value type NSDate) + late final ffi.Pointer _NSURLVolumeCreationDateKey = + _lookup('NSURLVolumeCreationDateKey'); - CFXMLNodeRef CFXMLTreeGetNode( - CFXMLTreeRef xmlTree, - ) { - return _CFXMLTreeGetNode( - xmlTree, - ); + DartNSURLResourceKey get NSURLVolumeCreationDateKey => + objc.NSString.castFromPointer(_NSURLVolumeCreationDateKey.value, + retain: true, release: true); + + set NSURLVolumeCreationDateKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeCreationDateKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeCreationDateKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLTreeGetNodePtr = - _lookup>( - 'CFXMLTreeGetNode'); - late final _CFXMLTreeGetNode = - _CFXMLTreeGetNodePtr.asFunction(); + /// The NSURL needed to remount a network volume, or nil if not available. (Read-only, value type NSURL) + late final ffi.Pointer _NSURLVolumeURLForRemountingKey = + _lookup('NSURLVolumeURLForRemountingKey'); - int CFXMLParserGetTypeID() { - return _CFXMLParserGetTypeID(); + DartNSURLResourceKey get NSURLVolumeURLForRemountingKey => + objc.NSString.castFromPointer(_NSURLVolumeURLForRemountingKey.value, + retain: true, release: true); + + set NSURLVolumeURLForRemountingKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeURLForRemountingKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeURLForRemountingKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLParserGetTypeIDPtr = - _lookup>('CFXMLParserGetTypeID'); - late final _CFXMLParserGetTypeID = - _CFXMLParserGetTypeIDPtr.asFunction(); + /// The volume's persistent UUID as a string, or nil if a persistent UUID is not available for the volume. (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeUUIDStringKey = + _lookup('NSURLVolumeUUIDStringKey'); - CFXMLParserRef CFXMLParserCreate( - CFAllocatorRef allocator, - CFDataRef xmlData, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ffi.Pointer callBacks, - ffi.Pointer context, - ) { - return _CFXMLParserCreate( - allocator, - xmlData, - dataSource, - parseOptions, - versionOfNodes, - callBacks, - context, - ); + DartNSURLResourceKey get NSURLVolumeUUIDStringKey => + objc.NSString.castFromPointer(_NSURLVolumeUUIDStringKey.value, + retain: true, release: true); + + set NSURLVolumeUUIDStringKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeUUIDStringKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeUUIDStringKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLParserCreatePtr = _lookup< - ffi.NativeFunction< - CFXMLParserRef Function( - CFAllocatorRef, - CFDataRef, - CFURLRef, - CFOptionFlags, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>('CFXMLParserCreate'); - late final _CFXMLParserCreate = _CFXMLParserCreatePtr.asFunction< - CFXMLParserRef Function( - CFAllocatorRef, - CFDataRef, - CFURLRef, - int, - int, - ffi.Pointer, - ffi.Pointer)>(); + /// The name of the volume (Read-write if NSURLVolumeSupportsRenamingKey is YES, otherwise read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeNameKey = + _lookup('NSURLVolumeNameKey'); - CFXMLParserRef CFXMLParserCreateWithDataFromURL( - CFAllocatorRef allocator, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ffi.Pointer callBacks, - ffi.Pointer context, - ) { - return _CFXMLParserCreateWithDataFromURL( - allocator, - dataSource, - parseOptions, - versionOfNodes, - callBacks, - context, - ); + DartNSURLResourceKey get NSURLVolumeNameKey => + objc.NSString.castFromPointer(_NSURLVolumeNameKey.value, + retain: true, release: true); + + set NSURLVolumeNameKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeNameKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeNameKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLParserCreateWithDataFromURLPtr = _lookup< - ffi.NativeFunction< - CFXMLParserRef Function( - CFAllocatorRef, - CFURLRef, - CFOptionFlags, - CFIndex, - ffi.Pointer, - ffi.Pointer)>>( - 'CFXMLParserCreateWithDataFromURL'); - late final _CFXMLParserCreateWithDataFromURL = - _CFXMLParserCreateWithDataFromURLPtr.asFunction< - CFXMLParserRef Function( - CFAllocatorRef, - CFURLRef, - int, - int, - ffi.Pointer, - ffi.Pointer)>(); + /// The user-presentable name of the volume (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeLocalizedNameKey = + _lookup('NSURLVolumeLocalizedNameKey'); - void CFXMLParserGetContext( - CFXMLParserRef parser, - ffi.Pointer context, - ) { - return _CFXMLParserGetContext( - parser, - context, - ); + DartNSURLResourceKey get NSURLVolumeLocalizedNameKey => + objc.NSString.castFromPointer(_NSURLVolumeLocalizedNameKey.value, + retain: true, release: true); + + set NSURLVolumeLocalizedNameKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeLocalizedNameKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeLocalizedNameKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLParserGetContextPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFXMLParserRef, - ffi.Pointer)>>('CFXMLParserGetContext'); - late final _CFXMLParserGetContext = _CFXMLParserGetContextPtr.asFunction< - void Function(CFXMLParserRef, ffi.Pointer)>(); + /// true if the volume is encrypted. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsEncryptedKey = + _lookup('NSURLVolumeIsEncryptedKey'); - void CFXMLParserGetCallBacks( - CFXMLParserRef parser, - ffi.Pointer callBacks, - ) { - return _CFXMLParserGetCallBacks( - parser, - callBacks, - ); + DartNSURLResourceKey get NSURLVolumeIsEncryptedKey => + objc.NSString.castFromPointer(_NSURLVolumeIsEncryptedKey.value, + retain: true, release: true); + + set NSURLVolumeIsEncryptedKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeIsEncryptedKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeIsEncryptedKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLParserGetCallBacksPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CFXMLParserRef, - ffi.Pointer)>>('CFXMLParserGetCallBacks'); - late final _CFXMLParserGetCallBacks = _CFXMLParserGetCallBacksPtr.asFunction< - void Function(CFXMLParserRef, ffi.Pointer)>(); + /// true if the volume is the root filesystem. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeIsRootFileSystemKey = + _lookup('NSURLVolumeIsRootFileSystemKey'); - CFURLRef CFXMLParserGetSourceURL( - CFXMLParserRef parser, - ) { - return _CFXMLParserGetSourceURL( - parser, - ); + DartNSURLResourceKey get NSURLVolumeIsRootFileSystemKey => + objc.NSString.castFromPointer(_NSURLVolumeIsRootFileSystemKey.value, + retain: true, release: true); + + set NSURLVolumeIsRootFileSystemKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeIsRootFileSystemKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeIsRootFileSystemKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLParserGetSourceURLPtr = - _lookup>( - 'CFXMLParserGetSourceURL'); - late final _CFXMLParserGetSourceURL = _CFXMLParserGetSourceURLPtr.asFunction< - CFURLRef Function(CFXMLParserRef)>(); + /// true if the volume supports transparent decompression of compressed files using decmpfs. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsCompressionKey = + _lookup('NSURLVolumeSupportsCompressionKey'); - int CFXMLParserGetLocation( - CFXMLParserRef parser, - ) { - return _CFXMLParserGetLocation( - parser, - ); + DartNSURLResourceKey get NSURLVolumeSupportsCompressionKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsCompressionKey.value, + retain: true, release: true); + + set NSURLVolumeSupportsCompressionKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsCompressionKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsCompressionKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFXMLParserGetLocationPtr = - _lookup>( - 'CFXMLParserGetLocation'); - late final _CFXMLParserGetLocation = - _CFXMLParserGetLocationPtr.asFunction(); + /// true if the volume supports clonefile(2) (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsFileCloningKey = + _lookup('NSURLVolumeSupportsFileCloningKey'); - int CFXMLParserGetLineNumber( - CFXMLParserRef parser, - ) { - return _CFXMLParserGetLineNumber( - parser, - ); + DartNSURLResourceKey get NSURLVolumeSupportsFileCloningKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsFileCloningKey.value, + retain: true, release: true); + + set NSURLVolumeSupportsFileCloningKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsFileCloningKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsFileCloningKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFXMLParserGetLineNumberPtr = - _lookup>( - 'CFXMLParserGetLineNumber'); - late final _CFXMLParserGetLineNumber = - _CFXMLParserGetLineNumberPtr.asFunction(); + /// true if the volume supports renamex_np(2)'s RENAME_SWAP option (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLVolumeSupportsSwapRenamingKey = + _lookup('NSURLVolumeSupportsSwapRenamingKey'); - ffi.Pointer CFXMLParserGetDocument( - CFXMLParserRef parser, - ) { - return _CFXMLParserGetDocument( - parser, - ); + DartNSURLResourceKey get NSURLVolumeSupportsSwapRenamingKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsSwapRenamingKey.value, + retain: true, release: true); + + set NSURLVolumeSupportsSwapRenamingKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsSwapRenamingKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsSwapRenamingKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFXMLParserGetDocumentPtr = _lookup< - ffi.NativeFunction Function(CFXMLParserRef)>>( - 'CFXMLParserGetDocument'); - late final _CFXMLParserGetDocument = _CFXMLParserGetDocumentPtr.asFunction< - ffi.Pointer Function(CFXMLParserRef)>(); + /// true if the volume supports renamex_np(2)'s RENAME_EXCL option (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsExclusiveRenamingKey = + _lookup('NSURLVolumeSupportsExclusiveRenamingKey'); - int CFXMLParserGetStatusCode( - CFXMLParserRef parser, - ) { - return _CFXMLParserGetStatusCode( - parser, - ); + DartNSURLResourceKey get NSURLVolumeSupportsExclusiveRenamingKey => + objc.NSString.castFromPointer( + _NSURLVolumeSupportsExclusiveRenamingKey.value, + retain: true, + release: true); + + set NSURLVolumeSupportsExclusiveRenamingKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLVolumeSupportsExclusiveRenamingKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLVolumeSupportsExclusiveRenamingKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFXMLParserGetStatusCodePtr = - _lookup>( - 'CFXMLParserGetStatusCode'); - late final _CFXMLParserGetStatusCode = - _CFXMLParserGetStatusCodePtr.asFunction(); + /// true if the volume supports making files immutable with the NSURLIsUserImmutableKey or NSURLIsSystemImmutableKey properties (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsImmutableFilesKey = + _lookup('NSURLVolumeSupportsImmutableFilesKey'); - CFStringRef CFXMLParserCopyErrorDescription( - CFXMLParserRef parser, - ) { - return _CFXMLParserCopyErrorDescription( - parser, - ); + DartNSURLResourceKey get NSURLVolumeSupportsImmutableFilesKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsImmutableFilesKey.value, + retain: true, release: true); + + set NSURLVolumeSupportsImmutableFilesKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsImmutableFilesKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsImmutableFilesKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFXMLParserCopyErrorDescriptionPtr = - _lookup>( - 'CFXMLParserCopyErrorDescription'); - late final _CFXMLParserCopyErrorDescription = - _CFXMLParserCopyErrorDescriptionPtr.asFunction< - CFStringRef Function(CFXMLParserRef)>(); + /// true if the volume supports setting POSIX access permissions with the NSURLFileSecurityKey property (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsAccessPermissionsKey = + _lookup('NSURLVolumeSupportsAccessPermissionsKey'); - void CFXMLParserAbort( - CFXMLParserRef parser, - int errorCode, - CFStringRef errorDescription, - ) { - return _CFXMLParserAbort( - parser, - errorCode, - errorDescription, - ); + DartNSURLResourceKey get NSURLVolumeSupportsAccessPermissionsKey => + objc.NSString.castFromPointer( + _NSURLVolumeSupportsAccessPermissionsKey.value, + retain: true, + release: true); + + set NSURLVolumeSupportsAccessPermissionsKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLVolumeSupportsAccessPermissionsKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLVolumeSupportsAccessPermissionsKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFXMLParserAbortPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - CFXMLParserRef, ffi.Int32, CFStringRef)>>('CFXMLParserAbort'); - late final _CFXMLParserAbort = _CFXMLParserAbortPtr.asFunction< - void Function(CFXMLParserRef, int, CFStringRef)>(); + /// True if the volume supports the File Protection attribute (see NSURLFileProtectionKey). (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeSupportsFileProtectionKey = + _lookup('NSURLVolumeSupportsFileProtectionKey'); - int CFXMLParserParse( - CFXMLParserRef parser, - ) { - return _CFXMLParserParse( - parser, - ); + DartNSURLResourceKey get NSURLVolumeSupportsFileProtectionKey => + objc.NSString.castFromPointer(_NSURLVolumeSupportsFileProtectionKey.value, + retain: true, release: true); + + set NSURLVolumeSupportsFileProtectionKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSupportsFileProtectionKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSupportsFileProtectionKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFXMLParserParsePtr = - _lookup>( - 'CFXMLParserParse'); - late final _CFXMLParserParse = - _CFXMLParserParsePtr.asFunction(); + /// (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeAvailableCapacityForImportantUsageKey = + _lookup( + 'NSURLVolumeAvailableCapacityForImportantUsageKey'); - CFXMLTreeRef CFXMLTreeCreateFromData( - CFAllocatorRef allocator, - CFDataRef xmlData, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ) { - return _CFXMLTreeCreateFromData( - allocator, - xmlData, - dataSource, - parseOptions, - versionOfNodes, - ); + DartNSURLResourceKey get NSURLVolumeAvailableCapacityForImportantUsageKey => + objc.NSString.castFromPointer( + _NSURLVolumeAvailableCapacityForImportantUsageKey.value, + retain: true, + release: true); + + set NSURLVolumeAvailableCapacityForImportantUsageKey( + DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLVolumeAvailableCapacityForImportantUsageKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLVolumeAvailableCapacityForImportantUsageKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFXMLTreeCreateFromDataPtr = _lookup< - ffi.NativeFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, - CFOptionFlags, CFIndex)>>('CFXMLTreeCreateFromData'); - late final _CFXMLTreeCreateFromData = _CFXMLTreeCreateFromDataPtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int)>(); + /// (Read-only, value type NSNumber) + late final ffi.Pointer + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey = + _lookup( + 'NSURLVolumeAvailableCapacityForOpportunisticUsageKey'); - CFXMLTreeRef CFXMLTreeCreateFromDataWithError( - CFAllocatorRef allocator, - CFDataRef xmlData, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ffi.Pointer errorDict, - ) { - return _CFXMLTreeCreateFromDataWithError( - allocator, - xmlData, - dataSource, - parseOptions, - versionOfNodes, - errorDict, - ); + DartNSURLResourceKey + get NSURLVolumeAvailableCapacityForOpportunisticUsageKey => + objc.NSString.castFromPointer( + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value, + retain: true, + release: true); + + set NSURLVolumeAvailableCapacityForOpportunisticUsageKey( + DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value = + value.ref.retainAndReturnPointer(); } - late final _CFXMLTreeCreateFromDataWithErrorPtr = _lookup< - ffi.NativeFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, - CFOptionFlags, CFIndex, ffi.Pointer)>>( - 'CFXMLTreeCreateFromDataWithError'); - late final _CFXMLTreeCreateFromDataWithError = - _CFXMLTreeCreateFromDataWithErrorPtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFDataRef, CFURLRef, int, int, - ffi.Pointer)>(); + /// The name of the file system type. (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeTypeNameKey = + _lookup('NSURLVolumeTypeNameKey'); - CFXMLTreeRef CFXMLTreeCreateWithDataFromURL( - CFAllocatorRef allocator, - CFURLRef dataSource, - int parseOptions, - int versionOfNodes, - ) { - return _CFXMLTreeCreateWithDataFromURL( - allocator, - dataSource, - parseOptions, - versionOfNodes, - ); + DartNSURLResourceKey get NSURLVolumeTypeNameKey => + objc.NSString.castFromPointer(_NSURLVolumeTypeNameKey.value, + retain: true, release: true); + + set NSURLVolumeTypeNameKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeTypeNameKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeTypeNameKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLTreeCreateWithDataFromURLPtr = _lookup< - ffi.NativeFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, CFOptionFlags, - CFIndex)>>('CFXMLTreeCreateWithDataFromURL'); - late final _CFXMLTreeCreateWithDataFromURL = - _CFXMLTreeCreateWithDataFromURLPtr.asFunction< - CFXMLTreeRef Function(CFAllocatorRef, CFURLRef, int, int)>(); + /// The file system subtype value. (Read-only, value type NSNumber) + late final ffi.Pointer _NSURLVolumeSubtypeKey = + _lookup('NSURLVolumeSubtypeKey'); - CFDataRef CFXMLTreeCreateXMLData( - CFAllocatorRef allocator, - CFXMLTreeRef xmlTree, - ) { - return _CFXMLTreeCreateXMLData( - allocator, - xmlTree, - ); + DartNSURLResourceKey get NSURLVolumeSubtypeKey => + objc.NSString.castFromPointer(_NSURLVolumeSubtypeKey.value, + retain: true, release: true); + + set NSURLVolumeSubtypeKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeSubtypeKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeSubtypeKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLTreeCreateXMLDataPtr = _lookup< - ffi.NativeFunction>( - 'CFXMLTreeCreateXMLData'); - late final _CFXMLTreeCreateXMLData = _CFXMLTreeCreateXMLDataPtr.asFunction< - CFDataRef Function(CFAllocatorRef, CFXMLTreeRef)>(); + /// The volume mounted from location. (Read-only, value type NSString) + late final ffi.Pointer _NSURLVolumeMountFromLocationKey = + _lookup('NSURLVolumeMountFromLocationKey'); - CFStringRef CFXMLCreateStringByEscapingEntities( - CFAllocatorRef allocator, - CFStringRef string, - CFDictionaryRef entitiesDictionary, - ) { - return _CFXMLCreateStringByEscapingEntities( - allocator, - string, - entitiesDictionary, - ); + DartNSURLResourceKey get NSURLVolumeMountFromLocationKey => + objc.NSString.castFromPointer(_NSURLVolumeMountFromLocationKey.value, + retain: true, release: true); + + set NSURLVolumeMountFromLocationKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLVolumeMountFromLocationKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLVolumeMountFromLocationKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLCreateStringByEscapingEntitiesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFDictionaryRef)>>('CFXMLCreateStringByEscapingEntities'); - late final _CFXMLCreateStringByEscapingEntities = - _CFXMLCreateStringByEscapingEntitiesPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); + /// true if this item is synced to the cloud, false if it is only a local file. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLIsUbiquitousItemKey = + _lookup('NSURLIsUbiquitousItemKey'); - CFStringRef CFXMLCreateStringByUnescapingEntities( - CFAllocatorRef allocator, - CFStringRef string, - CFDictionaryRef entitiesDictionary, - ) { - return _CFXMLCreateStringByUnescapingEntities( - allocator, - string, - entitiesDictionary, - ); + DartNSURLResourceKey get NSURLIsUbiquitousItemKey => + objc.NSString.castFromPointer(_NSURLIsUbiquitousItemKey.value, + retain: true, release: true); + + set NSURLIsUbiquitousItemKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLIsUbiquitousItemKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLIsUbiquitousItemKey.value = value.ref.retainAndReturnPointer(); } - late final _CFXMLCreateStringByUnescapingEntitiesPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, - CFDictionaryRef)>>('CFXMLCreateStringByUnescapingEntities'); - late final _CFXMLCreateStringByUnescapingEntities = - _CFXMLCreateStringByUnescapingEntitiesPtr.asFunction< - CFStringRef Function(CFAllocatorRef, CFStringRef, CFDictionaryRef)>(); + /// true if this item has conflicts outstanding. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemHasUnresolvedConflictsKey = + _lookup('NSURLUbiquitousItemHasUnresolvedConflictsKey'); - late final ffi.Pointer _kCFXMLTreeErrorDescription = - _lookup('kCFXMLTreeErrorDescription'); + DartNSURLResourceKey get NSURLUbiquitousItemHasUnresolvedConflictsKey => + objc.NSString.castFromPointer( + _NSURLUbiquitousItemHasUnresolvedConflictsKey.value, + retain: true, + release: true); - CFStringRef get kCFXMLTreeErrorDescription => - _kCFXMLTreeErrorDescription.value; + set NSURLUbiquitousItemHasUnresolvedConflictsKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousItemHasUnresolvedConflictsKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousItemHasUnresolvedConflictsKey.value = + value.ref.retainAndReturnPointer(); + } - late final ffi.Pointer _kCFXMLTreeErrorLineNumber = - _lookup('kCFXMLTreeErrorLineNumber'); + /// equivalent to NSURLUbiquitousItemDownloadingStatusKey == NSURLUbiquitousItemDownloadingStatusCurrent. Has never behaved as documented in earlier releases, hence deprecated. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsDownloadedKey = + _lookup('NSURLUbiquitousItemIsDownloadedKey'); - CFStringRef get kCFXMLTreeErrorLineNumber => _kCFXMLTreeErrorLineNumber.value; + DartNSURLResourceKey get NSURLUbiquitousItemIsDownloadedKey => + objc.NSString.castFromPointer(_NSURLUbiquitousItemIsDownloadedKey.value, + retain: true, release: true); - late final ffi.Pointer _kCFXMLTreeErrorLocation = - _lookup('kCFXMLTreeErrorLocation'); + set NSURLUbiquitousItemIsDownloadedKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLUbiquitousItemIsDownloadedKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLUbiquitousItemIsDownloadedKey.value = + value.ref.retainAndReturnPointer(); + } - CFStringRef get kCFXMLTreeErrorLocation => _kCFXMLTreeErrorLocation.value; + /// true if data is being downloaded for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemIsDownloadingKey = + _lookup('NSURLUbiquitousItemIsDownloadingKey'); - late final ffi.Pointer _kCFXMLTreeErrorStatusCode = - _lookup('kCFXMLTreeErrorStatusCode'); + DartNSURLResourceKey get NSURLUbiquitousItemIsDownloadingKey => + objc.NSString.castFromPointer(_NSURLUbiquitousItemIsDownloadingKey.value, + retain: true, release: true); - CFStringRef get kCFXMLTreeErrorStatusCode => _kCFXMLTreeErrorStatusCode.value; + set NSURLUbiquitousItemIsDownloadingKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLUbiquitousItemIsDownloadingKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLUbiquitousItemIsDownloadingKey.value = + value.ref.retainAndReturnPointer(); + } - late final ffi.Pointer _gGuidCssm = - _lookup('gGuidCssm'); + /// true if there is data present in the cloud for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsUploadedKey = + _lookup('NSURLUbiquitousItemIsUploadedKey'); - CSSM_GUID get gGuidCssm => _gGuidCssm.ref; + DartNSURLResourceKey get NSURLUbiquitousItemIsUploadedKey => + objc.NSString.castFromPointer(_NSURLUbiquitousItemIsUploadedKey.value, + retain: true, release: true); - late final ffi.Pointer _gGuidAppleFileDL = - _lookup('gGuidAppleFileDL'); + set NSURLUbiquitousItemIsUploadedKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLUbiquitousItemIsUploadedKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLUbiquitousItemIsUploadedKey.value = + value.ref.retainAndReturnPointer(); + } - CSSM_GUID get gGuidAppleFileDL => _gGuidAppleFileDL.ref; + /// true if data is being uploaded for this item. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsUploadingKey = + _lookup('NSURLUbiquitousItemIsUploadingKey'); - late final ffi.Pointer _gGuidAppleCSP = - _lookup('gGuidAppleCSP'); + DartNSURLResourceKey get NSURLUbiquitousItemIsUploadingKey => + objc.NSString.castFromPointer(_NSURLUbiquitousItemIsUploadingKey.value, + retain: true, release: true); - CSSM_GUID get gGuidAppleCSP => _gGuidAppleCSP.ref; + set NSURLUbiquitousItemIsUploadingKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLUbiquitousItemIsUploadingKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLUbiquitousItemIsUploadingKey.value = + value.ref.retainAndReturnPointer(); + } - late final ffi.Pointer _gGuidAppleCSPDL = - _lookup('gGuidAppleCSPDL'); + /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead + late final ffi.Pointer + _NSURLUbiquitousItemPercentDownloadedKey = + _lookup('NSURLUbiquitousItemPercentDownloadedKey'); - CSSM_GUID get gGuidAppleCSPDL => _gGuidAppleCSPDL.ref; + DartNSURLResourceKey get NSURLUbiquitousItemPercentDownloadedKey => + objc.NSString.castFromPointer( + _NSURLUbiquitousItemPercentDownloadedKey.value, + retain: true, + release: true); - late final ffi.Pointer _gGuidAppleX509CL = - _lookup('gGuidAppleX509CL'); + set NSURLUbiquitousItemPercentDownloadedKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousItemPercentDownloadedKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousItemPercentDownloadedKey.value = + value.ref.retainAndReturnPointer(); + } - CSSM_GUID get gGuidAppleX509CL => _gGuidAppleX509CL.ref; + /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead + late final ffi.Pointer + _NSURLUbiquitousItemPercentUploadedKey = + _lookup('NSURLUbiquitousItemPercentUploadedKey'); - late final ffi.Pointer _gGuidAppleX509TP = - _lookup('gGuidAppleX509TP'); + DartNSURLResourceKey get NSURLUbiquitousItemPercentUploadedKey => + objc.NSString.castFromPointer( + _NSURLUbiquitousItemPercentUploadedKey.value, + retain: true, + release: true); - CSSM_GUID get gGuidAppleX509TP => _gGuidAppleX509TP.ref; + set NSURLUbiquitousItemPercentUploadedKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLUbiquitousItemPercentUploadedKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLUbiquitousItemPercentUploadedKey.value = + value.ref.retainAndReturnPointer(); + } - late final ffi.Pointer _gGuidAppleLDAPDL = - _lookup('gGuidAppleLDAPDL'); + /// returns the download status of this item. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusKey = + _lookup('NSURLUbiquitousItemDownloadingStatusKey'); - CSSM_GUID get gGuidAppleLDAPDL => _gGuidAppleLDAPDL.ref; + DartNSURLResourceKey get NSURLUbiquitousItemDownloadingStatusKey => + objc.NSString.castFromPointer( + _NSURLUbiquitousItemDownloadingStatusKey.value, + retain: true, + release: true); - late final ffi.Pointer _gGuidAppleDotMacTP = - _lookup('gGuidAppleDotMacTP'); + set NSURLUbiquitousItemDownloadingStatusKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousItemDownloadingStatusKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousItemDownloadingStatusKey.value = + value.ref.retainAndReturnPointer(); + } - CSSM_GUID get gGuidAppleDotMacTP => _gGuidAppleDotMacTP.ref; + /// returns the error when downloading the item from iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingErrorKey = + _lookup('NSURLUbiquitousItemDownloadingErrorKey'); - late final ffi.Pointer _gGuidAppleSdCSPDL = - _lookup('gGuidAppleSdCSPDL'); + DartNSURLResourceKey get NSURLUbiquitousItemDownloadingErrorKey => + objc.NSString.castFromPointer( + _NSURLUbiquitousItemDownloadingErrorKey.value, + retain: true, + release: true); - CSSM_GUID get gGuidAppleSdCSPDL => _gGuidAppleSdCSPDL.ref; + set NSURLUbiquitousItemDownloadingErrorKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLUbiquitousItemDownloadingErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLUbiquitousItemDownloadingErrorKey.value = + value.ref.retainAndReturnPointer(); + } - late final ffi.Pointer _gGuidAppleDotMacDL = - _lookup('gGuidAppleDotMacDL'); + /// returns the error when uploading the item to iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) + late final ffi.Pointer + _NSURLUbiquitousItemUploadingErrorKey = + _lookup('NSURLUbiquitousItemUploadingErrorKey'); - CSSM_GUID get gGuidAppleDotMacDL => _gGuidAppleDotMacDL.ref; + DartNSURLResourceKey get NSURLUbiquitousItemUploadingErrorKey => + objc.NSString.castFromPointer(_NSURLUbiquitousItemUploadingErrorKey.value, + retain: true, release: true); - void cssmPerror( - ffi.Pointer how, - int error, - ) { - return _cssmPerror( - how, - error, - ); + set NSURLUbiquitousItemUploadingErrorKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLUbiquitousItemUploadingErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLUbiquitousItemUploadingErrorKey.value = + value.ref.retainAndReturnPointer(); } - late final _cssmPerrorPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, CSSM_RETURN)>>('cssmPerror'); - late final _cssmPerror = - _cssmPerrorPtr.asFunction, int)>(); + /// returns whether a download of this item has already been requested with an API like -startDownloadingUbiquitousItemAtURL:error: (Read-only, value type boolean NSNumber) + late final ffi.Pointer + _NSURLUbiquitousItemDownloadRequestedKey = + _lookup('NSURLUbiquitousItemDownloadRequestedKey'); - bool cssmOidToAlg( - ffi.Pointer oid, - ffi.Pointer alg, - ) { - return _cssmOidToAlg( - oid, - alg, - ); + DartNSURLResourceKey get NSURLUbiquitousItemDownloadRequestedKey => + objc.NSString.castFromPointer( + _NSURLUbiquitousItemDownloadRequestedKey.value, + retain: true, + release: true); + + set NSURLUbiquitousItemDownloadRequestedKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousItemDownloadRequestedKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousItemDownloadRequestedKey.value = + value.ref.retainAndReturnPointer(); } - late final _cssmOidToAlgPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer)>>('cssmOidToAlg'); - late final _cssmOidToAlg = _cssmOidToAlgPtr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer)>(); + /// returns the name of this item's container as displayed to users. + late final ffi.Pointer + _NSURLUbiquitousItemContainerDisplayNameKey = + _lookup('NSURLUbiquitousItemContainerDisplayNameKey'); - ffi.Pointer cssmAlgToOid( - int algId, - ) { - return _cssmAlgToOid( - algId, - ); + DartNSURLResourceKey get NSURLUbiquitousItemContainerDisplayNameKey => + objc.NSString.castFromPointer( + _NSURLUbiquitousItemContainerDisplayNameKey.value, + retain: true, + release: true); + + set NSURLUbiquitousItemContainerDisplayNameKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousItemContainerDisplayNameKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousItemContainerDisplayNameKey.value = + value.ref.retainAndReturnPointer(); } - late final _cssmAlgToOidPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(CSSM_ALGORITHMS)>>('cssmAlgToOid'); - late final _cssmAlgToOid = - _cssmAlgToOidPtr.asFunction Function(int)>(); + /// true if the item is excluded from sync, which means it is locally on disk but won't be available on the server. An excluded item is no longer ubiquitous. (Read-write, value type boolean NSNumber + late final ffi.Pointer + _NSURLUbiquitousItemIsExcludedFromSyncKey = + _lookup('NSURLUbiquitousItemIsExcludedFromSyncKey'); - late final ffi.Pointer _kSecPropertyTypeTitle = - _lookup('kSecPropertyTypeTitle'); + DartNSURLResourceKey get NSURLUbiquitousItemIsExcludedFromSyncKey => + objc.NSString.castFromPointer( + _NSURLUbiquitousItemIsExcludedFromSyncKey.value, + retain: true, + release: true); - CFStringRef get kSecPropertyTypeTitle => _kSecPropertyTypeTitle.value; + set NSURLUbiquitousItemIsExcludedFromSyncKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousItemIsExcludedFromSyncKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousItemIsExcludedFromSyncKey.value = + value.ref.retainAndReturnPointer(); + } - set kSecPropertyTypeTitle(CFStringRef value) => - _kSecPropertyTypeTitle.value = value; + /// true if the ubiquitous item is shared. (Read-only, value type boolean NSNumber) + late final ffi.Pointer _NSURLUbiquitousItemIsSharedKey = + _lookup('NSURLUbiquitousItemIsSharedKey'); - late final ffi.Pointer _kSecPropertyTypeError = - _lookup('kSecPropertyTypeError'); + DartNSURLResourceKey get NSURLUbiquitousItemIsSharedKey => + objc.NSString.castFromPointer(_NSURLUbiquitousItemIsSharedKey.value, + retain: true, release: true); - CFStringRef get kSecPropertyTypeError => _kSecPropertyTypeError.value; + set NSURLUbiquitousItemIsSharedKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer(_NSURLUbiquitousItemIsSharedKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLUbiquitousItemIsSharedKey.value = value.ref.retainAndReturnPointer(); + } - set kSecPropertyTypeError(CFStringRef value) => - _kSecPropertyTypeError.value = value; + /// returns the current user's role for this shared item, or nil if not shared. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousSharedItemCurrentUserRoleKey = + _lookup('NSURLUbiquitousSharedItemCurrentUserRoleKey'); - late final ffi.Pointer _kSecTrustEvaluationDate = - _lookup('kSecTrustEvaluationDate'); + DartNSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserRoleKey => + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value, + retain: true, + release: true); - CFStringRef get kSecTrustEvaluationDate => _kSecTrustEvaluationDate.value; + set NSURLUbiquitousSharedItemCurrentUserRoleKey(DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousSharedItemCurrentUserRoleKey.value = + value.ref.retainAndReturnPointer(); + } - set kSecTrustEvaluationDate(CFStringRef value) => - _kSecTrustEvaluationDate.value = value; + /// returns the permissions for the current user, or nil if not shared. (Read-only, value type NSString). Possible values below. + late final ffi.Pointer + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey = + _lookup( + 'NSURLUbiquitousSharedItemCurrentUserPermissionsKey'); - late final ffi.Pointer _kSecTrustExtendedValidation = - _lookup('kSecTrustExtendedValidation'); + DartNSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserPermissionsKey => + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value, + retain: true, + release: true); - CFStringRef get kSecTrustExtendedValidation => - _kSecTrustExtendedValidation.value; + set NSURLUbiquitousSharedItemCurrentUserPermissionsKey( + DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value = + value.ref.retainAndReturnPointer(); + } - set kSecTrustExtendedValidation(CFStringRef value) => - _kSecTrustExtendedValidation.value = value; + /// returns a NSPersonNameComponents, or nil if the current user. (Read-only, value type NSPersonNameComponents) + late final ffi.Pointer + _NSURLUbiquitousSharedItemOwnerNameComponentsKey = + _lookup( + 'NSURLUbiquitousSharedItemOwnerNameComponentsKey'); - late final ffi.Pointer _kSecTrustOrganizationName = - _lookup('kSecTrustOrganizationName'); + DartNSURLResourceKey get NSURLUbiquitousSharedItemOwnerNameComponentsKey => + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value, + retain: true, + release: true); - CFStringRef get kSecTrustOrganizationName => _kSecTrustOrganizationName.value; + set NSURLUbiquitousSharedItemOwnerNameComponentsKey( + DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value = + value.ref.retainAndReturnPointer(); + } - set kSecTrustOrganizationName(CFStringRef value) => - _kSecTrustOrganizationName.value = value; + /// returns a NSPersonNameComponents for the most recent editor of the document, or nil if it is the current user. (Read-only, value type NSPersonNameComponents) + late final ffi.Pointer + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey = + _lookup( + 'NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey'); - late final ffi.Pointer _kSecTrustResultValue = - _lookup('kSecTrustResultValue'); + DartNSURLResourceKey + get NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey => + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value, + retain: true, + release: true); - CFStringRef get kSecTrustResultValue => _kSecTrustResultValue.value; + set NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey( + DartNSURLResourceKey value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value = + value.ref.retainAndReturnPointer(); + } - set kSecTrustResultValue(CFStringRef value) => - _kSecTrustResultValue.value = value; + /// this item has not been downloaded yet. Use startDownloadingUbiquitousItemAtURL:error: to download it. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusNotDownloaded = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusNotDownloaded'); - late final ffi.Pointer _kSecTrustRevocationChecked = - _lookup('kSecTrustRevocationChecked'); + DartNSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusNotDownloaded => + objc.NSString.castFromPointer( + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value, + retain: true, + release: true); - CFStringRef get kSecTrustRevocationChecked => - _kSecTrustRevocationChecked.value; + set NSURLUbiquitousItemDownloadingStatusNotDownloaded( + DartNSURLUbiquitousItemDownloadingStatus value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value = + value.ref.retainAndReturnPointer(); + } - set kSecTrustRevocationChecked(CFStringRef value) => - _kSecTrustRevocationChecked.value = value; + /// there is a local version of this item available. The most current version will get downloaded as soon as possible. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusDownloaded = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusDownloaded'); - late final ffi.Pointer _kSecTrustRevocationValidUntilDate = - _lookup('kSecTrustRevocationValidUntilDate'); + DartNSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusDownloaded => + objc.NSString.castFromPointer( + _NSURLUbiquitousItemDownloadingStatusDownloaded.value, + retain: true, + release: true); - CFStringRef get kSecTrustRevocationValidUntilDate => - _kSecTrustRevocationValidUntilDate.value; + set NSURLUbiquitousItemDownloadingStatusDownloaded( + DartNSURLUbiquitousItemDownloadingStatus value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousItemDownloadingStatusDownloaded.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousItemDownloadingStatusDownloaded.value = + value.ref.retainAndReturnPointer(); + } - set kSecTrustRevocationValidUntilDate(CFStringRef value) => - _kSecTrustRevocationValidUntilDate.value = value; + /// there is a local version of this item and it is the most up-to-date version known to this device. + late final ffi.Pointer + _NSURLUbiquitousItemDownloadingStatusCurrent = + _lookup( + 'NSURLUbiquitousItemDownloadingStatusCurrent'); - late final ffi.Pointer _kSecTrustCertificateTransparency = - _lookup('kSecTrustCertificateTransparency'); + DartNSURLUbiquitousItemDownloadingStatus + get NSURLUbiquitousItemDownloadingStatusCurrent => + objc.NSString.castFromPointer( + _NSURLUbiquitousItemDownloadingStatusCurrent.value, + retain: true, + release: true); - CFStringRef get kSecTrustCertificateTransparency => - _kSecTrustCertificateTransparency.value; + set NSURLUbiquitousItemDownloadingStatusCurrent( + DartNSURLUbiquitousItemDownloadingStatus value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousItemDownloadingStatusCurrent.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousItemDownloadingStatusCurrent.value = + value.ref.retainAndReturnPointer(); + } - set kSecTrustCertificateTransparency(CFStringRef value) => - _kSecTrustCertificateTransparency.value = value; + /// the current user is the owner of this shared item. + late final ffi.Pointer + _NSURLUbiquitousSharedItemRoleOwner = + _lookup( + 'NSURLUbiquitousSharedItemRoleOwner'); - late final ffi.Pointer - _kSecTrustCertificateTransparencyWhiteList = - _lookup('kSecTrustCertificateTransparencyWhiteList'); + DartNSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleOwner => + objc.NSString.castFromPointer(_NSURLUbiquitousSharedItemRoleOwner.value, + retain: true, release: true); - CFStringRef get kSecTrustCertificateTransparencyWhiteList => - _kSecTrustCertificateTransparencyWhiteList.value; + set NSURLUbiquitousSharedItemRoleOwner( + DartNSURLUbiquitousSharedItemRole value) { + objc.NSString.castFromPointer(_NSURLUbiquitousSharedItemRoleOwner.value, + retain: false, release: true) + .ref + .release(); + _NSURLUbiquitousSharedItemRoleOwner.value = + value.ref.retainAndReturnPointer(); + } - set kSecTrustCertificateTransparencyWhiteList(CFStringRef value) => - _kSecTrustCertificateTransparencyWhiteList.value = value; + /// the current user is a participant of this shared item. + late final ffi.Pointer + _NSURLUbiquitousSharedItemRoleParticipant = + _lookup( + 'NSURLUbiquitousSharedItemRoleParticipant'); - int SecTrustGetTypeID() { - return _SecTrustGetTypeID(); + DartNSURLUbiquitousSharedItemRole + get NSURLUbiquitousSharedItemRoleParticipant => + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemRoleParticipant.value, + retain: true, + release: true); + + set NSURLUbiquitousSharedItemRoleParticipant( + DartNSURLUbiquitousSharedItemRole value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemRoleParticipant.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousSharedItemRoleParticipant.value = + value.ref.retainAndReturnPointer(); } - late final _SecTrustGetTypeIDPtr = - _lookup>('SecTrustGetTypeID'); - late final _SecTrustGetTypeID = - _SecTrustGetTypeIDPtr.asFunction(); + /// the current user is only allowed to read this item + late final ffi.Pointer + _NSURLUbiquitousSharedItemPermissionsReadOnly = + _lookup( + 'NSURLUbiquitousSharedItemPermissionsReadOnly'); - int SecTrustCreateWithCertificates( - CFTypeRef certificates, - CFTypeRef policies, - ffi.Pointer trust, - ) { - return _SecTrustCreateWithCertificates( - certificates, - policies, - trust, - ); + DartNSURLUbiquitousSharedItemPermissions + get NSURLUbiquitousSharedItemPermissionsReadOnly => + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemPermissionsReadOnly.value, + retain: true, + release: true); + + set NSURLUbiquitousSharedItemPermissionsReadOnly( + DartNSURLUbiquitousSharedItemPermissions value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemPermissionsReadOnly.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousSharedItemPermissionsReadOnly.value = + value.ref.retainAndReturnPointer(); } - late final _SecTrustCreateWithCertificatesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(CFTypeRef, CFTypeRef, - ffi.Pointer)>>('SecTrustCreateWithCertificates'); - late final _SecTrustCreateWithCertificates = - _SecTrustCreateWithCertificatesPtr.asFunction< - int Function(CFTypeRef, CFTypeRef, ffi.Pointer)>(); + /// the current user is allowed to both read and write this item + late final ffi.Pointer + _NSURLUbiquitousSharedItemPermissionsReadWrite = + _lookup( + 'NSURLUbiquitousSharedItemPermissionsReadWrite'); - int SecTrustSetPolicies( - SecTrustRef trust, - CFTypeRef policies, - ) { - return _SecTrustSetPolicies( - trust, - policies, - ); + DartNSURLUbiquitousSharedItemPermissions + get NSURLUbiquitousSharedItemPermissionsReadWrite => + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemPermissionsReadWrite.value, + retain: true, + release: true); + + set NSURLUbiquitousSharedItemPermissionsReadWrite( + DartNSURLUbiquitousSharedItemPermissions value) { + objc.NSString.castFromPointer( + _NSURLUbiquitousSharedItemPermissionsReadWrite.value, + retain: false, + release: true) + .ref + .release(); + _NSURLUbiquitousSharedItemPermissionsReadWrite.value = + value.ref.retainAndReturnPointer(); } - late final _SecTrustSetPoliciesPtr = - _lookup>( - 'SecTrustSetPolicies'); - late final _SecTrustSetPolicies = _SecTrustSetPoliciesPtr.asFunction< - int Function(SecTrustRef, CFTypeRef)>(); + late final ffi.Pointer _NSGenericException = + _lookup('NSGenericException'); - int SecTrustCopyPolicies( - SecTrustRef trust, - ffi.Pointer policies, - ) { - return _SecTrustCopyPolicies( - trust, - policies, - ); + DartNSExceptionName get NSGenericException => + objc.NSString.castFromPointer(_NSGenericException.value, + retain: true, release: true); + + set NSGenericException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSGenericException.value, + retain: false, release: true) + .ref + .release(); + _NSGenericException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustCopyPoliciesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecTrustRef, ffi.Pointer)>>('SecTrustCopyPolicies'); - late final _SecTrustCopyPolicies = _SecTrustCopyPoliciesPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final ffi.Pointer _NSRangeException = + _lookup('NSRangeException'); - int SecTrustSetNetworkFetchAllowed( - SecTrustRef trust, - int allowFetch, - ) { - return _SecTrustSetNetworkFetchAllowed( - trust, - allowFetch, - ); + DartNSExceptionName get NSRangeException => + objc.NSString.castFromPointer(_NSRangeException.value, + retain: true, release: true); + + set NSRangeException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSRangeException.value, + retain: false, release: true) + .ref + .release(); + _NSRangeException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustSetNetworkFetchAllowedPtr = - _lookup>( - 'SecTrustSetNetworkFetchAllowed'); - late final _SecTrustSetNetworkFetchAllowed = - _SecTrustSetNetworkFetchAllowedPtr.asFunction< - int Function(SecTrustRef, int)>(); + late final ffi.Pointer _NSInvalidArgumentException = + _lookup('NSInvalidArgumentException'); - int SecTrustGetNetworkFetchAllowed( - SecTrustRef trust, - ffi.Pointer allowFetch, - ) { - return _SecTrustGetNetworkFetchAllowed( - trust, - allowFetch, - ); + DartNSExceptionName get NSInvalidArgumentException => + objc.NSString.castFromPointer(_NSInvalidArgumentException.value, + retain: true, release: true); + + set NSInvalidArgumentException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSInvalidArgumentException.value, + retain: false, release: true) + .ref + .release(); + _NSInvalidArgumentException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustGetNetworkFetchAllowedPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>('SecTrustGetNetworkFetchAllowed'); - late final _SecTrustGetNetworkFetchAllowed = - _SecTrustGetNetworkFetchAllowedPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final ffi.Pointer _NSInternalInconsistencyException = + _lookup('NSInternalInconsistencyException'); - int SecTrustSetAnchorCertificates( - SecTrustRef trust, - CFArrayRef anchorCertificates, - ) { - return _SecTrustSetAnchorCertificates( - trust, - anchorCertificates, - ); + DartNSExceptionName get NSInternalInconsistencyException => + objc.NSString.castFromPointer(_NSInternalInconsistencyException.value, + retain: true, release: true); + + set NSInternalInconsistencyException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSInternalInconsistencyException.value, + retain: false, release: true) + .ref + .release(); + _NSInternalInconsistencyException.value = + value.ref.retainAndReturnPointer(); } - late final _SecTrustSetAnchorCertificatesPtr = - _lookup>( - 'SecTrustSetAnchorCertificates'); - late final _SecTrustSetAnchorCertificates = _SecTrustSetAnchorCertificatesPtr - .asFunction(); + late final ffi.Pointer _NSMallocException = + _lookup('NSMallocException'); - int SecTrustSetAnchorCertificatesOnly( - SecTrustRef trust, - int anchorCertificatesOnly, - ) { - return _SecTrustSetAnchorCertificatesOnly( - trust, - anchorCertificatesOnly, - ); + DartNSExceptionName get NSMallocException => + objc.NSString.castFromPointer(_NSMallocException.value, + retain: true, release: true); + + set NSMallocException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSMallocException.value, + retain: false, release: true) + .ref + .release(); + _NSMallocException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustSetAnchorCertificatesOnlyPtr = - _lookup>( - 'SecTrustSetAnchorCertificatesOnly'); - late final _SecTrustSetAnchorCertificatesOnly = - _SecTrustSetAnchorCertificatesOnlyPtr.asFunction< - int Function(SecTrustRef, int)>(); + late final ffi.Pointer _NSObjectInaccessibleException = + _lookup('NSObjectInaccessibleException'); - int SecTrustCopyCustomAnchorCertificates( - SecTrustRef trust, - ffi.Pointer anchors, - ) { - return _SecTrustCopyCustomAnchorCertificates( - trust, - anchors, - ); + DartNSExceptionName get NSObjectInaccessibleException => + objc.NSString.castFromPointer(_NSObjectInaccessibleException.value, + retain: true, release: true); + + set NSObjectInaccessibleException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSObjectInaccessibleException.value, + retain: false, release: true) + .ref + .release(); + _NSObjectInaccessibleException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustCopyCustomAnchorCertificatesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, ffi.Pointer)>>( - 'SecTrustCopyCustomAnchorCertificates'); - late final _SecTrustCopyCustomAnchorCertificates = - _SecTrustCopyCustomAnchorCertificatesPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final ffi.Pointer _NSObjectNotAvailableException = + _lookup('NSObjectNotAvailableException'); - int SecTrustSetVerifyDate( - SecTrustRef trust, - CFDateRef verifyDate, - ) { - return _SecTrustSetVerifyDate( - trust, - verifyDate, - ); + DartNSExceptionName get NSObjectNotAvailableException => + objc.NSString.castFromPointer(_NSObjectNotAvailableException.value, + retain: true, release: true); + + set NSObjectNotAvailableException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSObjectNotAvailableException.value, + retain: false, release: true) + .ref + .release(); + _NSObjectNotAvailableException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustSetVerifyDatePtr = - _lookup>( - 'SecTrustSetVerifyDate'); - late final _SecTrustSetVerifyDate = _SecTrustSetVerifyDatePtr.asFunction< - int Function(SecTrustRef, CFDateRef)>(); + late final ffi.Pointer _NSDestinationInvalidException = + _lookup('NSDestinationInvalidException'); - double SecTrustGetVerifyTime( - SecTrustRef trust, - ) { - return _SecTrustGetVerifyTime( - trust, - ); + DartNSExceptionName get NSDestinationInvalidException => + objc.NSString.castFromPointer(_NSDestinationInvalidException.value, + retain: true, release: true); + + set NSDestinationInvalidException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSDestinationInvalidException.value, + retain: false, release: true) + .ref + .release(); + _NSDestinationInvalidException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustGetVerifyTimePtr = - _lookup>( - 'SecTrustGetVerifyTime'); - late final _SecTrustGetVerifyTime = - _SecTrustGetVerifyTimePtr.asFunction(); + late final ffi.Pointer _NSPortTimeoutException = + _lookup('NSPortTimeoutException'); - int SecTrustEvaluate( - SecTrustRef trust, - ffi.Pointer result, - ) { - return _SecTrustEvaluate( - trust, - result, - ); + DartNSExceptionName get NSPortTimeoutException => + objc.NSString.castFromPointer(_NSPortTimeoutException.value, + retain: true, release: true); + + set NSPortTimeoutException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSPortTimeoutException.value, + retain: false, release: true) + .ref + .release(); + _NSPortTimeoutException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustEvaluatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecTrustRef, ffi.Pointer)>>('SecTrustEvaluate'); - late final _SecTrustEvaluate = _SecTrustEvaluatePtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final ffi.Pointer _NSInvalidSendPortException = + _lookup('NSInvalidSendPortException'); - DartSInt32 SecTrustEvaluateAsync( - SecTrustRef trust, - dispatch_queue_t queue, - DartSecTrustCallback result, - ) { - return _SecTrustEvaluateAsync( - trust, - queue, - result._id, - ); + DartNSExceptionName get NSInvalidSendPortException => + objc.NSString.castFromPointer(_NSInvalidSendPortException.value, + retain: true, release: true); + + set NSInvalidSendPortException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSInvalidSendPortException.value, + retain: false, release: true) + .ref + .release(); + _NSInvalidSendPortException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustEvaluateAsyncPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, dispatch_queue_t, - SecTrustCallback)>>('SecTrustEvaluateAsync'); - late final _SecTrustEvaluateAsync = _SecTrustEvaluateAsyncPtr.asFunction< - int Function(SecTrustRef, dispatch_queue_t, SecTrustCallback)>(); + late final ffi.Pointer _NSInvalidReceivePortException = + _lookup('NSInvalidReceivePortException'); - bool SecTrustEvaluateWithError( - SecTrustRef trust, - ffi.Pointer error, - ) { - return _SecTrustEvaluateWithError( - trust, - error, - ); + DartNSExceptionName get NSInvalidReceivePortException => + objc.NSString.castFromPointer(_NSInvalidReceivePortException.value, + retain: true, release: true); + + set NSInvalidReceivePortException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSInvalidReceivePortException.value, + retain: false, release: true) + .ref + .release(); + _NSInvalidReceivePortException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustEvaluateWithErrorPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(SecTrustRef, - ffi.Pointer)>>('SecTrustEvaluateWithError'); - late final _SecTrustEvaluateWithError = _SecTrustEvaluateWithErrorPtr - .asFunction)>(); + late final ffi.Pointer _NSPortSendException = + _lookup('NSPortSendException'); - DartSInt32 SecTrustEvaluateAsyncWithError( - SecTrustRef trust, - dispatch_queue_t queue, - DartSecTrustWithErrorCallback result, - ) { - return _SecTrustEvaluateAsyncWithError( - trust, - queue, - result._id, - ); + DartNSExceptionName get NSPortSendException => + objc.NSString.castFromPointer(_NSPortSendException.value, + retain: true, release: true); + + set NSPortSendException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSPortSendException.value, + retain: false, release: true) + .ref + .release(); + _NSPortSendException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustEvaluateAsyncWithErrorPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, dispatch_queue_t, - SecTrustWithErrorCallback)>>('SecTrustEvaluateAsyncWithError'); - late final _SecTrustEvaluateAsyncWithError = - _SecTrustEvaluateAsyncWithErrorPtr.asFunction< - int Function( - SecTrustRef, dispatch_queue_t, SecTrustWithErrorCallback)>(); + late final ffi.Pointer _NSPortReceiveException = + _lookup('NSPortReceiveException'); - int SecTrustGetTrustResult( - SecTrustRef trust, - ffi.Pointer result, - ) { - return _SecTrustGetTrustResult( - trust, - result, - ); + DartNSExceptionName get NSPortReceiveException => + objc.NSString.castFromPointer(_NSPortReceiveException.value, + retain: true, release: true); + + set NSPortReceiveException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSPortReceiveException.value, + retain: false, release: true) + .ref + .release(); + _NSPortReceiveException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustGetTrustResultPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecTrustRef, ffi.Pointer)>>('SecTrustGetTrustResult'); - late final _SecTrustGetTrustResult = _SecTrustGetTrustResultPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + late final ffi.Pointer _NSOldStyleException = + _lookup('NSOldStyleException'); - SecKeyRef SecTrustCopyPublicKey( - SecTrustRef trust, - ) { - return _SecTrustCopyPublicKey( - trust, - ); + DartNSExceptionName get NSOldStyleException => + objc.NSString.castFromPointer(_NSOldStyleException.value, + retain: true, release: true); + + set NSOldStyleException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSOldStyleException.value, + retain: false, release: true) + .ref + .release(); + _NSOldStyleException.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustCopyPublicKeyPtr = - _lookup>( - 'SecTrustCopyPublicKey'); - late final _SecTrustCopyPublicKey = - _SecTrustCopyPublicKeyPtr.asFunction(); + late final ffi.Pointer _NSInconsistentArchiveException = + _lookup('NSInconsistentArchiveException'); - SecKeyRef SecTrustCopyKey( - SecTrustRef trust, - ) { - return _SecTrustCopyKey( - trust, - ); - } + DartNSExceptionName get NSInconsistentArchiveException => + objc.NSString.castFromPointer(_NSInconsistentArchiveException.value, + retain: true, release: true); - late final _SecTrustCopyKeyPtr = - _lookup>( - 'SecTrustCopyKey'); - late final _SecTrustCopyKey = - _SecTrustCopyKeyPtr.asFunction(); + set NSInconsistentArchiveException(DartNSExceptionName value) { + objc.NSString.castFromPointer(_NSInconsistentArchiveException.value, + retain: false, release: true) + .ref + .release(); + _NSInconsistentArchiveException.value = value.ref.retainAndReturnPointer(); + } - int SecTrustGetCertificateCount( - SecTrustRef trust, - ) { - return _SecTrustGetCertificateCount( - trust, - ); + ffi.Pointer NSGetUncaughtExceptionHandler() { + return _NSGetUncaughtExceptionHandler(); } - late final _SecTrustGetCertificateCountPtr = - _lookup>( - 'SecTrustGetCertificateCount'); - late final _SecTrustGetCertificateCount = - _SecTrustGetCertificateCountPtr.asFunction(); + late final _NSGetUncaughtExceptionHandlerPtr = _lookup< + ffi + .NativeFunction Function()>>( + 'NSGetUncaughtExceptionHandler'); + late final _NSGetUncaughtExceptionHandler = _NSGetUncaughtExceptionHandlerPtr + .asFunction Function()>(); - SecCertificateRef SecTrustGetCertificateAtIndex( - SecTrustRef trust, - int ix, + void NSSetUncaughtExceptionHandler( + ffi.Pointer arg0, ) { - return _SecTrustGetCertificateAtIndex( - trust, - ix, + return _NSSetUncaughtExceptionHandler( + arg0, ); } - late final _SecTrustGetCertificateAtIndexPtr = _lookup< - ffi.NativeFunction>( - 'SecTrustGetCertificateAtIndex'); - late final _SecTrustGetCertificateAtIndex = _SecTrustGetCertificateAtIndexPtr - .asFunction(); + late final _NSSetUncaughtExceptionHandlerPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer)>>( + 'NSSetUncaughtExceptionHandler'); + late final _NSSetUncaughtExceptionHandler = _NSSetUncaughtExceptionHandlerPtr + .asFunction)>(); - CFDataRef SecTrustCopyExceptions( - SecTrustRef trust, - ) { - return _SecTrustCopyExceptions( - trust, - ); - } + late final ffi.Pointer> _NSAssertionHandlerKey = + _lookup>('NSAssertionHandlerKey'); - late final _SecTrustCopyExceptionsPtr = - _lookup>( - 'SecTrustCopyExceptions'); - late final _SecTrustCopyExceptions = - _SecTrustCopyExceptionsPtr.asFunction(); + objc.NSString get NSAssertionHandlerKey => + objc.NSString.castFromPointer(_NSAssertionHandlerKey.value, + retain: true, release: true); - bool SecTrustSetExceptions( - SecTrustRef trust, - CFDataRef exceptions, - ) { - return _SecTrustSetExceptions( - trust, - exceptions, - ); + set NSAssertionHandlerKey(objc.NSString value) { + objc.NSString.castFromPointer(_NSAssertionHandlerKey.value, + retain: false, release: true) + .ref + .release(); + _NSAssertionHandlerKey.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustSetExceptionsPtr = - _lookup>( - 'SecTrustSetExceptions'); - late final _SecTrustSetExceptions = _SecTrustSetExceptionsPtr.asFunction< - bool Function(SecTrustRef, CFDataRef)>(); + late final ffi.Pointer + _NSInvocationOperationVoidResultException = + _lookup('NSInvocationOperationVoidResultException'); - CFArrayRef SecTrustCopyProperties( - SecTrustRef trust, - ) { - return _SecTrustCopyProperties( - trust, - ); + DartNSExceptionName get NSInvocationOperationVoidResultException => + objc.NSString.castFromPointer( + _NSInvocationOperationVoidResultException.value, + retain: true, + release: true); + + set NSInvocationOperationVoidResultException(DartNSExceptionName value) { + objc.NSString.castFromPointer( + _NSInvocationOperationVoidResultException.value, + retain: false, + release: true) + .ref + .release(); + _NSInvocationOperationVoidResultException.value = + value.ref.retainAndReturnPointer(); } - late final _SecTrustCopyPropertiesPtr = - _lookup>( - 'SecTrustCopyProperties'); - late final _SecTrustCopyProperties = - _SecTrustCopyPropertiesPtr.asFunction(); + late final ffi.Pointer + _NSInvocationOperationCancelledException = + _lookup('NSInvocationOperationCancelledException'); - CFDictionaryRef SecTrustCopyResult( - SecTrustRef trust, - ) { - return _SecTrustCopyResult( - trust, - ); + DartNSExceptionName get NSInvocationOperationCancelledException => + objc.NSString.castFromPointer( + _NSInvocationOperationCancelledException.value, + retain: true, + release: true); + + set NSInvocationOperationCancelledException(DartNSExceptionName value) { + objc.NSString.castFromPointer( + _NSInvocationOperationCancelledException.value, + retain: false, + release: true) + .ref + .release(); + _NSInvocationOperationCancelledException.value = + value.ref.retainAndReturnPointer(); } - late final _SecTrustCopyResultPtr = - _lookup>( - 'SecTrustCopyResult'); - late final _SecTrustCopyResult = _SecTrustCopyResultPtr.asFunction< - CFDictionaryRef Function(SecTrustRef)>(); + late final ffi.Pointer + _NSOperationQueueDefaultMaxConcurrentOperationCount = + _lookup('NSOperationQueueDefaultMaxConcurrentOperationCount'); - int SecTrustSetOCSPResponse( - SecTrustRef trust, - CFTypeRef responseData, - ) { - return _SecTrustSetOCSPResponse( - trust, - responseData, - ); - } + DartNSInteger get NSOperationQueueDefaultMaxConcurrentOperationCount => + _NSOperationQueueDefaultMaxConcurrentOperationCount.value; - late final _SecTrustSetOCSPResponsePtr = - _lookup>( - 'SecTrustSetOCSPResponse'); - late final _SecTrustSetOCSPResponse = _SecTrustSetOCSPResponsePtr.asFunction< - int Function(SecTrustRef, CFTypeRef)>(); + /// Predefined domain for errors from most AppKit and Foundation APIs. + late final ffi.Pointer _NSCocoaErrorDomain = + _lookup('NSCocoaErrorDomain'); - int SecTrustSetSignedCertificateTimestamps( - SecTrustRef trust, - CFArrayRef sctArray, - ) { - return _SecTrustSetSignedCertificateTimestamps( - trust, - sctArray, - ); + DartNSErrorDomain get NSCocoaErrorDomain => + objc.NSString.castFromPointer(_NSCocoaErrorDomain.value, + retain: true, release: true); + + set NSCocoaErrorDomain(DartNSErrorDomain value) { + objc.NSString.castFromPointer(_NSCocoaErrorDomain.value, + retain: false, release: true) + .ref + .release(); + _NSCocoaErrorDomain.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustSetSignedCertificateTimestampsPtr = - _lookup>( - 'SecTrustSetSignedCertificateTimestamps'); - late final _SecTrustSetSignedCertificateTimestamps = - _SecTrustSetSignedCertificateTimestampsPtr.asFunction< - int Function(SecTrustRef, CFArrayRef)>(); + /// Other predefined domains; value of "code" will correspond to preexisting values in these domains. + late final ffi.Pointer _NSPOSIXErrorDomain = + _lookup('NSPOSIXErrorDomain'); - CFArrayRef SecTrustCopyCertificateChain( - SecTrustRef trust, - ) { - return _SecTrustCopyCertificateChain( - trust, - ); + DartNSErrorDomain get NSPOSIXErrorDomain => + objc.NSString.castFromPointer(_NSPOSIXErrorDomain.value, + retain: true, release: true); + + set NSPOSIXErrorDomain(DartNSErrorDomain value) { + objc.NSString.castFromPointer(_NSPOSIXErrorDomain.value, + retain: false, release: true) + .ref + .release(); + _NSPOSIXErrorDomain.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustCopyCertificateChainPtr = - _lookup>( - 'SecTrustCopyCertificateChain'); - late final _SecTrustCopyCertificateChain = _SecTrustCopyCertificateChainPtr - .asFunction(); + late final ffi.Pointer _NSOSStatusErrorDomain = + _lookup('NSOSStatusErrorDomain'); - int SecTrustSetOptions( - SecTrustRef trustRef, - int options, - ) { - return _SecTrustSetOptions( - trustRef, - options, - ); + DartNSErrorDomain get NSOSStatusErrorDomain => + objc.NSString.castFromPointer(_NSOSStatusErrorDomain.value, + retain: true, release: true); + + set NSOSStatusErrorDomain(DartNSErrorDomain value) { + objc.NSString.castFromPointer(_NSOSStatusErrorDomain.value, + retain: false, release: true) + .ref + .release(); + _NSOSStatusErrorDomain.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustSetOptionsPtr = - _lookup>( - 'SecTrustSetOptions'); - late final _SecTrustSetOptions = - _SecTrustSetOptionsPtr.asFunction(); + late final ffi.Pointer _NSMachErrorDomain = + _lookup('NSMachErrorDomain'); - int SecTrustSetParameters( - SecTrustRef trustRef, - int action, - CFDataRef actionData, - ) { - return _SecTrustSetParameters( - trustRef, - action, - actionData, - ); + DartNSErrorDomain get NSMachErrorDomain => + objc.NSString.castFromPointer(_NSMachErrorDomain.value, + retain: true, release: true); + + set NSMachErrorDomain(DartNSErrorDomain value) { + objc.NSString.castFromPointer(_NSMachErrorDomain.value, + retain: false, release: true) + .ref + .release(); + _NSMachErrorDomain.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustSetParametersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, CSSM_TP_ACTION, - CFDataRef)>>('SecTrustSetParameters'); - late final _SecTrustSetParameters = _SecTrustSetParametersPtr.asFunction< - int Function(SecTrustRef, int, CFDataRef)>(); + /// Key in userInfo. A recommended standard way to embed NSErrors from underlying calls. The value of this key should be an NSError. + late final ffi.Pointer _NSUnderlyingErrorKey = + _lookup('NSUnderlyingErrorKey'); - int SecTrustSetKeychains( - SecTrustRef trust, - CFTypeRef keychainOrArray, - ) { - return _SecTrustSetKeychains( - trust, - keychainOrArray, - ); + DartNSErrorUserInfoKey get NSUnderlyingErrorKey => + objc.NSString.castFromPointer(_NSUnderlyingErrorKey.value, + retain: true, release: true); + + set NSUnderlyingErrorKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSUnderlyingErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSUnderlyingErrorKey.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustSetKeychainsPtr = - _lookup>( - 'SecTrustSetKeychains'); - late final _SecTrustSetKeychains = _SecTrustSetKeychainsPtr.asFunction< - int Function(SecTrustRef, CFTypeRef)>(); + /// Key in userInfo. A recommended standard way to embed a list of several NSErrors from underlying calls. The value of this key should be an NSArray of NSError. This value is independent from the value of `NSUnderlyingErrorKey` - neither, one, or both may be set. + late final ffi.Pointer _NSMultipleUnderlyingErrorsKey = + _lookup('NSMultipleUnderlyingErrorsKey'); - int SecTrustGetResult( - SecTrustRef trustRef, - ffi.Pointer result, - ffi.Pointer certChain, - ffi.Pointer> statusChain, - ) { - return _SecTrustGetResult( - trustRef, - result, - certChain, - statusChain, - ); + DartNSErrorUserInfoKey get NSMultipleUnderlyingErrorsKey => + objc.NSString.castFromPointer(_NSMultipleUnderlyingErrorsKey.value, + retain: true, release: true); + + set NSMultipleUnderlyingErrorsKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSMultipleUnderlyingErrorsKey.value, + retain: false, release: true) + .ref + .release(); + _NSMultipleUnderlyingErrorsKey.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustGetResultPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecTrustRef, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'SecTrustGetResult'); - late final _SecTrustGetResult = _SecTrustGetResultPtr.asFunction< - int Function(SecTrustRef, ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); + /// NSString, a complete sentence (or more) describing ideally both what failed and why it failed. + late final ffi.Pointer _NSLocalizedDescriptionKey = + _lookup('NSLocalizedDescriptionKey'); - int SecTrustGetCssmResult( - SecTrustRef trust, - ffi.Pointer result, - ) { - return _SecTrustGetCssmResult( - trust, - result, - ); + DartNSErrorUserInfoKey get NSLocalizedDescriptionKey => + objc.NSString.castFromPointer(_NSLocalizedDescriptionKey.value, + retain: true, release: true); + + set NSLocalizedDescriptionKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSLocalizedDescriptionKey.value, + retain: false, release: true) + .ref + .release(); + _NSLocalizedDescriptionKey.value = value.ref.retainAndReturnPointer(); } - late final _SecTrustGetCssmResultPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>( - 'SecTrustGetCssmResult'); - late final _SecTrustGetCssmResult = _SecTrustGetCssmResultPtr.asFunction< - int Function( - SecTrustRef, ffi.Pointer)>(); + /// NSString, a complete sentence (or more) describing why the operation failed. + late final ffi.Pointer _NSLocalizedFailureReasonErrorKey = + _lookup('NSLocalizedFailureReasonErrorKey'); - int SecTrustGetCssmResultCode( - SecTrustRef trust, - ffi.Pointer resultCode, - ) { - return _SecTrustGetCssmResultCode( - trust, - resultCode, - ); + DartNSErrorUserInfoKey get NSLocalizedFailureReasonErrorKey => + objc.NSString.castFromPointer(_NSLocalizedFailureReasonErrorKey.value, + retain: true, release: true); + + set NSLocalizedFailureReasonErrorKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSLocalizedFailureReasonErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSLocalizedFailureReasonErrorKey.value = + value.ref.retainAndReturnPointer(); } - late final _SecTrustGetCssmResultCodePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>('SecTrustGetCssmResultCode'); - late final _SecTrustGetCssmResultCode = _SecTrustGetCssmResultCodePtr - .asFunction)>(); + /// NSString, a complete sentence (or more) describing what the user can do to fix the problem. + late final ffi.Pointer + _NSLocalizedRecoverySuggestionErrorKey = + _lookup('NSLocalizedRecoverySuggestionErrorKey'); - int SecTrustGetTPHandle( - SecTrustRef trust, - ffi.Pointer handle, - ) { - return _SecTrustGetTPHandle( - trust, - handle, - ); + DartNSErrorUserInfoKey get NSLocalizedRecoverySuggestionErrorKey => + objc.NSString.castFromPointer( + _NSLocalizedRecoverySuggestionErrorKey.value, + retain: true, + release: true); + + set NSLocalizedRecoverySuggestionErrorKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSLocalizedRecoverySuggestionErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSLocalizedRecoverySuggestionErrorKey.value = + value.ref.retainAndReturnPointer(); } - late final _SecTrustGetTPHandlePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecTrustRef, - ffi.Pointer)>>('SecTrustGetTPHandle'); - late final _SecTrustGetTPHandle = _SecTrustGetTPHandlePtr.asFunction< - int Function(SecTrustRef, ffi.Pointer)>(); + /// NSArray of NSStrings corresponding to button titles. + late final ffi.Pointer + _NSLocalizedRecoveryOptionsErrorKey = + _lookup('NSLocalizedRecoveryOptionsErrorKey'); - int SecTrustCopyAnchorCertificates( - ffi.Pointer anchors, - ) { - return _SecTrustCopyAnchorCertificates( - anchors, - ); + DartNSErrorUserInfoKey get NSLocalizedRecoveryOptionsErrorKey => + objc.NSString.castFromPointer(_NSLocalizedRecoveryOptionsErrorKey.value, + retain: true, release: true); + + set NSLocalizedRecoveryOptionsErrorKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSLocalizedRecoveryOptionsErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSLocalizedRecoveryOptionsErrorKey.value = + value.ref.retainAndReturnPointer(); } - late final _SecTrustCopyAnchorCertificatesPtr = - _lookup)>>( - 'SecTrustCopyAnchorCertificates'); - late final _SecTrustCopyAnchorCertificates = - _SecTrustCopyAnchorCertificatesPtr.asFunction< - int Function(ffi.Pointer)>(); + /// Instance of a subclass of NSObject that conforms to the NSErrorRecoveryAttempting informal protocol + late final ffi.Pointer _NSRecoveryAttempterErrorKey = + _lookup('NSRecoveryAttempterErrorKey'); - int SecCertificateGetTypeID() { - return _SecCertificateGetTypeID(); + DartNSErrorUserInfoKey get NSRecoveryAttempterErrorKey => + objc.NSString.castFromPointer(_NSRecoveryAttempterErrorKey.value, + retain: true, release: true); + + set NSRecoveryAttempterErrorKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSRecoveryAttempterErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSRecoveryAttempterErrorKey.value = value.ref.retainAndReturnPointer(); } - late final _SecCertificateGetTypeIDPtr = - _lookup>( - 'SecCertificateGetTypeID'); - late final _SecCertificateGetTypeID = - _SecCertificateGetTypeIDPtr.asFunction(); + /// NSString containing a help anchor + late final ffi.Pointer _NSHelpAnchorErrorKey = + _lookup('NSHelpAnchorErrorKey'); - SecCertificateRef SecCertificateCreateWithData( - CFAllocatorRef allocator, - CFDataRef data, - ) { - return _SecCertificateCreateWithData( - allocator, - data, - ); + DartNSErrorUserInfoKey get NSHelpAnchorErrorKey => + objc.NSString.castFromPointer(_NSHelpAnchorErrorKey.value, + retain: true, release: true); + + set NSHelpAnchorErrorKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSHelpAnchorErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSHelpAnchorErrorKey.value = value.ref.retainAndReturnPointer(); } - late final _SecCertificateCreateWithDataPtr = _lookup< - ffi.NativeFunction< - SecCertificateRef Function( - CFAllocatorRef, CFDataRef)>>('SecCertificateCreateWithData'); - late final _SecCertificateCreateWithData = _SecCertificateCreateWithDataPtr - .asFunction(); - - CFDataRef SecCertificateCopyData( - SecCertificateRef certificate, - ) { - return _SecCertificateCopyData( - certificate, - ); - } + /// NSString. This provides a string which will be shown when constructing the debugDescription of the NSError, to be used when debugging or when formatting the error with %@. This string will never be used in localizedDescription, so will not be shown to the user. + late final ffi.Pointer _NSDebugDescriptionErrorKey = + _lookup('NSDebugDescriptionErrorKey'); - late final _SecCertificateCopyDataPtr = - _lookup>( - 'SecCertificateCopyData'); - late final _SecCertificateCopyData = _SecCertificateCopyDataPtr.asFunction< - CFDataRef Function(SecCertificateRef)>(); + DartNSErrorUserInfoKey get NSDebugDescriptionErrorKey => + objc.NSString.castFromPointer(_NSDebugDescriptionErrorKey.value, + retain: true, release: true); - CFStringRef SecCertificateCopySubjectSummary( - SecCertificateRef certificate, - ) { - return _SecCertificateCopySubjectSummary( - certificate, - ); + set NSDebugDescriptionErrorKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSDebugDescriptionErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSDebugDescriptionErrorKey.value = value.ref.retainAndReturnPointer(); } - late final _SecCertificateCopySubjectSummaryPtr = - _lookup>( - 'SecCertificateCopySubjectSummary'); - late final _SecCertificateCopySubjectSummary = - _SecCertificateCopySubjectSummaryPtr.asFunction< - CFStringRef Function(SecCertificateRef)>(); - - int SecCertificateCopyCommonName( - SecCertificateRef certificate, - ffi.Pointer commonName, - ) { - return _SecCertificateCopyCommonName( - certificate, - commonName, - ); - } + /// NSString, a complete sentence (or more) describing what failed. Setting a value for this key in userInfo dictionary of errors received from framework APIs is a good way to customize and fine tune the localizedDescription of an NSError. As an example, for Foundation error code NSFileWriteOutOfSpaceError, setting the value of this key to "The image library could not be saved." will allow the localizedDescription of the error to come out as "The image library could not be saved. The volume Macintosh HD is out of space." rather than the default (say) “You can't save the file ImgDatabaseV2 because the volume Macintosh HD is out of space." + late final ffi.Pointer _NSLocalizedFailureErrorKey = + _lookup('NSLocalizedFailureErrorKey'); - late final _SecCertificateCopyCommonNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyCommonName'); - late final _SecCertificateCopyCommonName = _SecCertificateCopyCommonNamePtr - .asFunction)>(); + DartNSErrorUserInfoKey get NSLocalizedFailureErrorKey => + objc.NSString.castFromPointer(_NSLocalizedFailureErrorKey.value, + retain: true, release: true); - int SecCertificateCopyEmailAddresses( - SecCertificateRef certificate, - ffi.Pointer emailAddresses, - ) { - return _SecCertificateCopyEmailAddresses( - certificate, - emailAddresses, - ); + set NSLocalizedFailureErrorKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSLocalizedFailureErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSLocalizedFailureErrorKey.value = value.ref.retainAndReturnPointer(); } - late final _SecCertificateCopyEmailAddressesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyEmailAddresses'); - late final _SecCertificateCopyEmailAddresses = - _SecCertificateCopyEmailAddressesPtr.asFunction< - int Function(SecCertificateRef, ffi.Pointer)>(); - - CFDataRef SecCertificateCopyNormalizedIssuerSequence( - SecCertificateRef certificate, - ) { - return _SecCertificateCopyNormalizedIssuerSequence( - certificate, - ); - } + /// NSNumber containing NSStringEncoding + late final ffi.Pointer _NSStringEncodingErrorKey = + _lookup('NSStringEncodingErrorKey'); - late final _SecCertificateCopyNormalizedIssuerSequencePtr = - _lookup>( - 'SecCertificateCopyNormalizedIssuerSequence'); - late final _SecCertificateCopyNormalizedIssuerSequence = - _SecCertificateCopyNormalizedIssuerSequencePtr.asFunction< - CFDataRef Function(SecCertificateRef)>(); + DartNSErrorUserInfoKey get NSStringEncodingErrorKey => + objc.NSString.castFromPointer(_NSStringEncodingErrorKey.value, + retain: true, release: true); - CFDataRef SecCertificateCopyNormalizedSubjectSequence( - SecCertificateRef certificate, - ) { - return _SecCertificateCopyNormalizedSubjectSequence( - certificate, - ); + set NSStringEncodingErrorKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSStringEncodingErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSStringEncodingErrorKey.value = value.ref.retainAndReturnPointer(); } - late final _SecCertificateCopyNormalizedSubjectSequencePtr = - _lookup>( - 'SecCertificateCopyNormalizedSubjectSequence'); - late final _SecCertificateCopyNormalizedSubjectSequence = - _SecCertificateCopyNormalizedSubjectSequencePtr.asFunction< - CFDataRef Function(SecCertificateRef)>(); - - SecKeyRef SecCertificateCopyKey( - SecCertificateRef certificate, - ) { - return _SecCertificateCopyKey( - certificate, - ); - } + /// NSURL + late final ffi.Pointer _NSURLErrorKey = + _lookup('NSURLErrorKey'); - late final _SecCertificateCopyKeyPtr = - _lookup>( - 'SecCertificateCopyKey'); - late final _SecCertificateCopyKey = _SecCertificateCopyKeyPtr.asFunction< - SecKeyRef Function(SecCertificateRef)>(); + DartNSErrorUserInfoKey get NSURLErrorKey => + objc.NSString.castFromPointer(_NSURLErrorKey.value, + retain: true, release: true); - int SecCertificateCopyPublicKey( - SecCertificateRef certificate, - ffi.Pointer key, - ) { - return _SecCertificateCopyPublicKey( - certificate, - key, - ); + set NSURLErrorKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSURLErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSURLErrorKey.value = value.ref.retainAndReturnPointer(); } - late final _SecCertificateCopyPublicKeyPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyPublicKey'); - late final _SecCertificateCopyPublicKey = _SecCertificateCopyPublicKeyPtr - .asFunction)>(); - - CFDataRef SecCertificateCopySerialNumberData( - SecCertificateRef certificate, - ffi.Pointer error, - ) { - return _SecCertificateCopySerialNumberData( - certificate, - error, - ); - } + /// NSString + late final ffi.Pointer _NSFilePathErrorKey = + _lookup('NSFilePathErrorKey'); - late final _SecCertificateCopySerialNumberDataPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopySerialNumberData'); - late final _SecCertificateCopySerialNumberData = - _SecCertificateCopySerialNumberDataPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + DartNSErrorUserInfoKey get NSFilePathErrorKey => + objc.NSString.castFromPointer(_NSFilePathErrorKey.value, + retain: true, release: true); - CFDataRef SecCertificateCopySerialNumber( - SecCertificateRef certificate, - ffi.Pointer error, - ) { - return _SecCertificateCopySerialNumber( - certificate, - error, - ); + set NSFilePathErrorKey(DartNSErrorUserInfoKey value) { + objc.NSString.castFromPointer(_NSFilePathErrorKey.value, + retain: false, release: true) + .ref + .release(); + _NSFilePathErrorKey.value = value.ref.retainAndReturnPointer(); } - late final _SecCertificateCopySerialNumberPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopySerialNumber'); - late final _SecCertificateCopySerialNumber = - _SecCertificateCopySerialNumberPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); - - int SecCertificateCreateFromData( - ffi.Pointer data, - int type, - int encoding, - ffi.Pointer certificate, + /// Create a block useable as a + /// `URLSession:downloadTask:didFinishDownloadingToURL:` that can be used to + /// make an async Dart callback behave synchronously. + Dart_DidFinish adaptFinishWithLock( + Dart_DidFinishWithLock block, ) { - return _SecCertificateCreateFromData( - data, - type, - encoding, - certificate, - ); + return ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL + .castFromPointer( + _adaptFinishWithLock( + block.ref.pointer, + ), + retain: true, + release: true); } - late final _SecCertificateCreateFromDataPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - ffi.Pointer, - CSSM_CERT_TYPE, - CSSM_CERT_ENCODING, - ffi.Pointer)>>('SecCertificateCreateFromData'); - late final _SecCertificateCreateFromData = - _SecCertificateCreateFromDataPtr.asFunction< - int Function(ffi.Pointer, int, int, - ffi.Pointer)>(); - - int SecCertificateAddToKeychain( - SecCertificateRef certificate, - SecKeychainRef keychain, - ) { - return _SecCertificateAddToKeychain( - certificate, - keychain, - ); - } + late final _adaptFinishWithLockPtr = + _lookup>( + 'adaptFinishWithLock'); + late final _adaptFinishWithLock = _adaptFinishWithLockPtr + .asFunction<_DidFinish Function(_DidFinishWithLock)>(); +} + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_ksby9f( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_hepzs( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_sjfpmz( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_ukcdfq( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_ttt6u1( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1txhfzs( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1hmngv6( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_108ugvk( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1afulej( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_elldw5( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_129ffij( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1458n52( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_yo3tv0( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1tjlcwl( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_10t0qpd( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_cmbt6k( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_117qins( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_tenbla( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_hfhq9m( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_tm2na8( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1najo2h( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1wmulza( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_wnmjgj( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1nnj9ov( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_dmve6( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_qxeqyf( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_jzggzf( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1a6kixf( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_ci81hw( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_1wl7fts( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_no6pyg( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_10hgvcc( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _wrapListenerBlock_19b8ge5( + ffi.Pointer block, +); - late final _SecCertificateAddToKeychainPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - SecKeychainRef)>>('SecCertificateAddToKeychain'); - late final _SecCertificateAddToKeychain = _SecCertificateAddToKeychainPtr - .asFunction(); +final class __mbstate_t extends ffi.Union { + @ffi.Array.multi([128]) + external ffi.Array __mbstate8; - int SecCertificateGetData( - SecCertificateRef certificate, - CSSM_DATA_PTR data, - ) { - return _SecCertificateGetData( - certificate, - data, - ); - } + @ffi.LongLong() + external int _mbstateL; +} - late final _SecCertificateGetDataPtr = _lookup< - ffi - .NativeFunction>( - 'SecCertificateGetData'); - late final _SecCertificateGetData = _SecCertificateGetDataPtr.asFunction< - int Function(SecCertificateRef, CSSM_DATA_PTR)>(); +final class __darwin_pthread_handler_rec extends ffi.Struct { + external ffi + .Pointer)>> + __routine; - int SecCertificateGetType( - SecCertificateRef certificate, - ffi.Pointer certificateType, - ) { - return _SecCertificateGetType( - certificate, - certificateType, - ); - } + external ffi.Pointer __arg; - late final _SecCertificateGetTypePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateGetType'); - late final _SecCertificateGetType = _SecCertificateGetTypePtr.asFunction< - int Function(SecCertificateRef, ffi.Pointer)>(); + external ffi.Pointer<__darwin_pthread_handler_rec> __next; +} - int SecCertificateGetSubject( - SecCertificateRef certificate, - ffi.Pointer> subject, - ) { - return _SecCertificateGetSubject( - certificate, - subject, - ); - } +final class _opaque_pthread_attr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - late final _SecCertificateGetSubjectPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer>)>>( - 'SecCertificateGetSubject'); - late final _SecCertificateGetSubject = - _SecCertificateGetSubjectPtr.asFunction< - int Function( - SecCertificateRef, ffi.Pointer>)>(); + @ffi.Array.multi([56]) + external ffi.Array __opaque; +} - int SecCertificateGetIssuer( - SecCertificateRef certificate, - ffi.Pointer> issuer, - ) { - return _SecCertificateGetIssuer( - certificate, - issuer, - ); - } +final class _opaque_pthread_cond_t extends ffi.Struct { + @ffi.Long() + external int __sig; - late final _SecCertificateGetIssuerPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer>)>>( - 'SecCertificateGetIssuer'); - late final _SecCertificateGetIssuer = _SecCertificateGetIssuerPtr.asFunction< - int Function( - SecCertificateRef, ffi.Pointer>)>(); + @ffi.Array.multi([40]) + external ffi.Array __opaque; +} - int SecCertificateGetCLHandle( - SecCertificateRef certificate, - ffi.Pointer clHandle, - ) { - return _SecCertificateGetCLHandle( - certificate, - clHandle, - ); - } +final class _opaque_pthread_condattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - late final _SecCertificateGetCLHandlePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, - ffi.Pointer)>>('SecCertificateGetCLHandle'); - late final _SecCertificateGetCLHandle = - _SecCertificateGetCLHandlePtr.asFunction< - int Function(SecCertificateRef, ffi.Pointer)>(); + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} - int SecCertificateGetAlgorithmID( - SecCertificateRef certificate, - ffi.Pointer> algid, - ) { - return _SecCertificateGetAlgorithmID( - certificate, - algid, - ); - } +final class _opaque_pthread_mutex_t extends ffi.Struct { + @ffi.Long() + external int __sig; - late final _SecCertificateGetAlgorithmIDPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SecCertificateRef, ffi.Pointer>)>>( - 'SecCertificateGetAlgorithmID'); - late final _SecCertificateGetAlgorithmID = - _SecCertificateGetAlgorithmIDPtr.asFunction< - int Function( - SecCertificateRef, ffi.Pointer>)>(); + @ffi.Array.multi([56]) + external ffi.Array __opaque; +} - int SecCertificateCopyPreference( - CFStringRef name, - int keyUsage, - ffi.Pointer certificate, - ) { - return _SecCertificateCopyPreference( - name, - keyUsage, - certificate, - ); - } +final class _opaque_pthread_mutexattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - late final _SecCertificateCopyPreferencePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(CFStringRef, uint32, - ffi.Pointer)>>('SecCertificateCopyPreference'); - late final _SecCertificateCopyPreference = - _SecCertificateCopyPreferencePtr.asFunction< - int Function(CFStringRef, int, ffi.Pointer)>(); + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} - SecCertificateRef SecCertificateCopyPreferred( - CFStringRef name, - CFArrayRef keyUsage, - ) { - return _SecCertificateCopyPreferred( - name, - keyUsage, - ); - } +final class _opaque_pthread_once_t extends ffi.Struct { + @ffi.Long() + external int __sig; - late final _SecCertificateCopyPreferredPtr = _lookup< - ffi - .NativeFunction>( - 'SecCertificateCopyPreferred'); - late final _SecCertificateCopyPreferred = _SecCertificateCopyPreferredPtr - .asFunction(); + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} - int SecCertificateSetPreference( - SecCertificateRef certificate, - CFStringRef name, - int keyUsage, - CFDateRef date, - ) { - return _SecCertificateSetPreference( - certificate, - name, - keyUsage, - date, - ); - } +final class _opaque_pthread_rwlock_t extends ffi.Struct { + @ffi.Long() + external int __sig; - late final _SecCertificateSetPreferencePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, CFStringRef, uint32, - CFDateRef)>>('SecCertificateSetPreference'); - late final _SecCertificateSetPreference = - _SecCertificateSetPreferencePtr.asFunction< - int Function(SecCertificateRef, CFStringRef, int, CFDateRef)>(); + @ffi.Array.multi([192]) + external ffi.Array __opaque; +} - int SecCertificateSetPreferred( - SecCertificateRef certificate, - CFStringRef name, - CFArrayRef keyUsage, - ) { - return _SecCertificateSetPreferred( - certificate, - name, - keyUsage, - ); - } +final class _opaque_pthread_rwlockattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; - late final _SecCertificateSetPreferredPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecCertificateRef, CFStringRef, - CFArrayRef)>>('SecCertificateSetPreferred'); - late final _SecCertificateSetPreferred = _SecCertificateSetPreferredPtr - .asFunction(); + @ffi.Array.multi([16]) + external ffi.Array __opaque; +} - late final ffi.Pointer _kSecPropertyKeyType = - _lookup('kSecPropertyKeyType'); +final class _opaque_pthread_t extends ffi.Struct { + @ffi.Long() + external int __sig; - CFStringRef get kSecPropertyKeyType => _kSecPropertyKeyType.value; + external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; - set kSecPropertyKeyType(CFStringRef value) => - _kSecPropertyKeyType.value = value; + @ffi.Array.multi([8176]) + external ffi.Array __opaque; +} - late final ffi.Pointer _kSecPropertyKeyLabel = - _lookup('kSecPropertyKeyLabel'); +final class __darwin_arm_exception_state extends ffi.Struct { + @__uint32_t() + external int __exception; - CFStringRef get kSecPropertyKeyLabel => _kSecPropertyKeyLabel.value; + @__uint32_t() + external int __fsr; - set kSecPropertyKeyLabel(CFStringRef value) => - _kSecPropertyKeyLabel.value = value; + @__uint32_t() + external int __far; +} - late final ffi.Pointer _kSecPropertyKeyLocalizedLabel = - _lookup('kSecPropertyKeyLocalizedLabel'); +typedef __uint32_t = ffi.UnsignedInt; +typedef Dart__uint32_t = int; - CFStringRef get kSecPropertyKeyLocalizedLabel => - _kSecPropertyKeyLocalizedLabel.value; +final class __darwin_arm_exception_state64 extends ffi.Struct { + @__uint64_t() + external int __far; - set kSecPropertyKeyLocalizedLabel(CFStringRef value) => - _kSecPropertyKeyLocalizedLabel.value = value; + @__uint32_t() + external int __esr; - late final ffi.Pointer _kSecPropertyKeyValue = - _lookup('kSecPropertyKeyValue'); + @__uint32_t() + external int __exception; +} - CFStringRef get kSecPropertyKeyValue => _kSecPropertyKeyValue.value; +typedef __uint64_t = ffi.UnsignedLongLong; +typedef Dart__uint64_t = int; - set kSecPropertyKeyValue(CFStringRef value) => - _kSecPropertyKeyValue.value = value; +final class __darwin_arm_thread_state extends ffi.Struct { + @ffi.Array.multi([13]) + external ffi.Array<__uint32_t> __r; - late final ffi.Pointer _kSecPropertyTypeWarning = - _lookup('kSecPropertyTypeWarning'); + @__uint32_t() + external int __sp; - CFStringRef get kSecPropertyTypeWarning => _kSecPropertyTypeWarning.value; + @__uint32_t() + external int __lr; - set kSecPropertyTypeWarning(CFStringRef value) => - _kSecPropertyTypeWarning.value = value; + @__uint32_t() + external int __pc; - late final ffi.Pointer _kSecPropertyTypeSuccess = - _lookup('kSecPropertyTypeSuccess'); + @__uint32_t() + external int __cpsr; +} - CFStringRef get kSecPropertyTypeSuccess => _kSecPropertyTypeSuccess.value; +final class __darwin_arm_thread_state64 extends ffi.Struct { + @ffi.Array.multi([29]) + external ffi.Array<__uint64_t> __x; - set kSecPropertyTypeSuccess(CFStringRef value) => - _kSecPropertyTypeSuccess.value = value; + @__uint64_t() + external int __fp; - late final ffi.Pointer _kSecPropertyTypeSection = - _lookup('kSecPropertyTypeSection'); + @__uint64_t() + external int __lr; - CFStringRef get kSecPropertyTypeSection => _kSecPropertyTypeSection.value; + @__uint64_t() + external int __sp; - set kSecPropertyTypeSection(CFStringRef value) => - _kSecPropertyTypeSection.value = value; + @__uint64_t() + external int __pc; - late final ffi.Pointer _kSecPropertyTypeData = - _lookup('kSecPropertyTypeData'); + @__uint32_t() + external int __cpsr; - CFStringRef get kSecPropertyTypeData => _kSecPropertyTypeData.value; + @__uint32_t() + external int __pad; +} - set kSecPropertyTypeData(CFStringRef value) => - _kSecPropertyTypeData.value = value; +final class __darwin_arm_vfp_state extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array<__uint32_t> __r; - late final ffi.Pointer _kSecPropertyTypeString = - _lookup('kSecPropertyTypeString'); + @__uint32_t() + external int __fpscr; +} - CFStringRef get kSecPropertyTypeString => _kSecPropertyTypeString.value; +final class __darwin_arm_neon_state64 extends ffi.Opaque {} - set kSecPropertyTypeString(CFStringRef value) => - _kSecPropertyTypeString.value = value; +final class __darwin_arm_neon_state extends ffi.Opaque {} - late final ffi.Pointer _kSecPropertyTypeURL = - _lookup('kSecPropertyTypeURL'); +final class __arm_pagein_state extends ffi.Struct { + @ffi.Int() + external int __pagein_error; +} - CFStringRef get kSecPropertyTypeURL => _kSecPropertyTypeURL.value; +final class __arm_legacy_debug_state extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; - set kSecPropertyTypeURL(CFStringRef value) => - _kSecPropertyTypeURL.value = value; + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; - late final ffi.Pointer _kSecPropertyTypeDate = - _lookup('kSecPropertyTypeDate'); + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; - CFStringRef get kSecPropertyTypeDate => _kSecPropertyTypeDate.value; + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; +} - set kSecPropertyTypeDate(CFStringRef value) => - _kSecPropertyTypeDate.value = value; +final class __darwin_arm_debug_state32 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bvr; - late final ffi.Pointer _kSecPropertyTypeArray = - _lookup('kSecPropertyTypeArray'); + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __bcr; - CFStringRef get kSecPropertyTypeArray => _kSecPropertyTypeArray.value; + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wvr; - set kSecPropertyTypeArray(CFStringRef value) => - _kSecPropertyTypeArray.value = value; + @ffi.Array.multi([16]) + external ffi.Array<__uint32_t> __wcr; - late final ffi.Pointer _kSecPropertyTypeNumber = - _lookup('kSecPropertyTypeNumber'); + @__uint64_t() + external int __mdscr_el1; +} - CFStringRef get kSecPropertyTypeNumber => _kSecPropertyTypeNumber.value; +final class __darwin_arm_debug_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bvr; - set kSecPropertyTypeNumber(CFStringRef value) => - _kSecPropertyTypeNumber.value = value; + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __bcr; - CFDictionaryRef SecCertificateCopyValues( - SecCertificateRef certificate, - CFArrayRef keys, - ffi.Pointer error, - ) { - return _SecCertificateCopyValues( - certificate, - keys, - error, - ); - } + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wvr; - late final _SecCertificateCopyValuesPtr = _lookup< - ffi.NativeFunction< - CFDictionaryRef Function(SecCertificateRef, CFArrayRef, - ffi.Pointer)>>('SecCertificateCopyValues'); - late final _SecCertificateCopyValues = - _SecCertificateCopyValuesPtr.asFunction< - CFDictionaryRef Function( - SecCertificateRef, CFArrayRef, ffi.Pointer)>(); + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __wcr; - CFStringRef SecCertificateCopyLongDescription( - CFAllocatorRef alloc, - SecCertificateRef certificate, - ffi.Pointer error, - ) { - return _SecCertificateCopyLongDescription( - alloc, - certificate, - error, - ); - } + @__uint64_t() + external int __mdscr_el1; +} - late final _SecCertificateCopyLongDescriptionPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyLongDescription'); - late final _SecCertificateCopyLongDescription = - _SecCertificateCopyLongDescriptionPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); +final class __darwin_arm_cpmu_state64 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array<__uint64_t> __ctrs; +} - CFStringRef SecCertificateCopyShortDescription( - CFAllocatorRef alloc, - SecCertificateRef certificate, - ffi.Pointer error, - ) { - return _SecCertificateCopyShortDescription( - alloc, - certificate, - error, - ); - } +final class __darwin_mcontext32 extends ffi.Struct { + external __darwin_arm_exception_state __es; - late final _SecCertificateCopyShortDescriptionPtr = _lookup< - ffi.NativeFunction< - CFStringRef Function(CFAllocatorRef, SecCertificateRef, - ffi.Pointer)>>('SecCertificateCopyShortDescription'); - late final _SecCertificateCopyShortDescription = - _SecCertificateCopyShortDescriptionPtr.asFunction< - CFStringRef Function( - CFAllocatorRef, SecCertificateRef, ffi.Pointer)>(); + external __darwin_arm_thread_state __ss; - CFDataRef SecCertificateCopyNormalizedIssuerContent( - SecCertificateRef certificate, - ffi.Pointer error, - ) { - return _SecCertificateCopyNormalizedIssuerContent( - certificate, - error, - ); - } + external __darwin_arm_vfp_state __fs; +} - late final _SecCertificateCopyNormalizedIssuerContentPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( - 'SecCertificateCopyNormalizedIssuerContent'); - late final _SecCertificateCopyNormalizedIssuerContent = - _SecCertificateCopyNormalizedIssuerContentPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); +final class __darwin_mcontext64 extends ffi.Opaque {} - CFDataRef SecCertificateCopyNormalizedSubjectContent( - SecCertificateRef certificate, - ffi.Pointer error, - ) { - return _SecCertificateCopyNormalizedSubjectContent( - certificate, - error, - ); - } +final class __darwin_sigaltstack extends ffi.Struct { + external ffi.Pointer ss_sp; - late final _SecCertificateCopyNormalizedSubjectContentPtr = _lookup< - ffi.NativeFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>>( - 'SecCertificateCopyNormalizedSubjectContent'); - late final _SecCertificateCopyNormalizedSubjectContent = - _SecCertificateCopyNormalizedSubjectContentPtr.asFunction< - CFDataRef Function(SecCertificateRef, ffi.Pointer)>(); + @__darwin_size_t() + external int ss_size; - int SecIdentityGetTypeID() { - return _SecIdentityGetTypeID(); - } + @ffi.Int() + external int ss_flags; +} - late final _SecIdentityGetTypeIDPtr = - _lookup>('SecIdentityGetTypeID'); - late final _SecIdentityGetTypeID = - _SecIdentityGetTypeIDPtr.asFunction(); +typedef __darwin_size_t = ffi.UnsignedLong; +typedef Dart__darwin_size_t = int; - int SecIdentityCreateWithCertificate( - CFTypeRef keychainOrArray, - SecCertificateRef certificateRef, - ffi.Pointer identityRef, - ) { - return _SecIdentityCreateWithCertificate( - keychainOrArray, - certificateRef, - identityRef, - ); - } +final class __darwin_ucontext extends ffi.Struct { + @ffi.Int() + external int uc_onstack; - late final _SecIdentityCreateWithCertificatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - CFTypeRef, SecCertificateRef, ffi.Pointer)>>( - 'SecIdentityCreateWithCertificate'); - late final _SecIdentityCreateWithCertificate = - _SecIdentityCreateWithCertificatePtr.asFunction< - int Function( - CFTypeRef, SecCertificateRef, ffi.Pointer)>(); + @__darwin_sigset_t() + external int uc_sigmask; - int SecIdentityCopyCertificate( - SecIdentityRef identityRef, - ffi.Pointer certificateRef, - ) { - return _SecIdentityCopyCertificate( - identityRef, - certificateRef, - ); - } + external __darwin_sigaltstack uc_stack; - late final _SecIdentityCopyCertificatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecIdentityRef, - ffi.Pointer)>>('SecIdentityCopyCertificate'); - late final _SecIdentityCopyCertificate = - _SecIdentityCopyCertificatePtr.asFunction< - int Function(SecIdentityRef, ffi.Pointer)>(); + external ffi.Pointer<__darwin_ucontext> uc_link; - int SecIdentityCopyPrivateKey( - SecIdentityRef identityRef, - ffi.Pointer privateKeyRef, - ) { - return _SecIdentityCopyPrivateKey( - identityRef, - privateKeyRef, - ); - } + @__darwin_size_t() + external int uc_mcsize; - late final _SecIdentityCopyPrivateKeyPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecIdentityRef, - ffi.Pointer)>>('SecIdentityCopyPrivateKey'); - late final _SecIdentityCopyPrivateKey = _SecIdentityCopyPrivateKeyPtr - .asFunction)>(); + external ffi.Pointer<__darwin_mcontext64> uc_mcontext; +} - int SecIdentityCopyPreference( - CFStringRef name, - int keyUsage, - CFArrayRef validIssuers, - ffi.Pointer identity, - ) { - return _SecIdentityCopyPreference( - name, - keyUsage, - validIssuers, - identity, - ); - } +typedef __darwin_sigset_t = __uint32_t; - late final _SecIdentityCopyPreferencePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(CFStringRef, CSSM_KEYUSE, CFArrayRef, - ffi.Pointer)>>('SecIdentityCopyPreference'); - late final _SecIdentityCopyPreference = - _SecIdentityCopyPreferencePtr.asFunction< - int Function( - CFStringRef, int, CFArrayRef, ffi.Pointer)>(); +final class sigval extends ffi.Union { + @ffi.Int() + external int sival_int; - SecIdentityRef SecIdentityCopyPreferred( - CFStringRef name, - CFArrayRef keyUsage, - CFArrayRef validIssuers, - ) { - return _SecIdentityCopyPreferred( - name, - keyUsage, - validIssuers, - ); - } + external ffi.Pointer sival_ptr; +} - late final _SecIdentityCopyPreferredPtr = _lookup< - ffi.NativeFunction< - SecIdentityRef Function(CFStringRef, CFArrayRef, - CFArrayRef)>>('SecIdentityCopyPreferred'); - late final _SecIdentityCopyPreferred = - _SecIdentityCopyPreferredPtr.asFunction< - SecIdentityRef Function(CFStringRef, CFArrayRef, CFArrayRef)>(); +final class sigevent extends ffi.Struct { + @ffi.Int() + external int sigev_notify; - int SecIdentitySetPreference( - SecIdentityRef identity, - CFStringRef name, - int keyUsage, - ) { - return _SecIdentitySetPreference( - identity, - name, - keyUsage, - ); - } + @ffi.Int() + external int sigev_signo; - late final _SecIdentitySetPreferencePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecIdentityRef, CFStringRef, - CSSM_KEYUSE)>>('SecIdentitySetPreference'); - late final _SecIdentitySetPreference = _SecIdentitySetPreferencePtr - .asFunction(); + external sigval sigev_value; - int SecIdentitySetPreferred( - SecIdentityRef identity, - CFStringRef name, - CFArrayRef keyUsage, - ) { - return _SecIdentitySetPreferred( - identity, - name, - keyUsage, - ); - } + external ffi.Pointer> + sigev_notify_function; - late final _SecIdentitySetPreferredPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SecIdentityRef, CFStringRef, - CFArrayRef)>>('SecIdentitySetPreferred'); - late final _SecIdentitySetPreferred = _SecIdentitySetPreferredPtr.asFunction< - int Function(SecIdentityRef, CFStringRef, CFArrayRef)>(); + external ffi.Pointer sigev_notify_attributes; +} - int SecIdentityCopySystemIdentity( - CFStringRef domain, - ffi.Pointer idRef, - ffi.Pointer actualDomain, - ) { - return _SecIdentityCopySystemIdentity( - domain, - idRef, - actualDomain, - ); - } +typedef pthread_attr_t = __darwin_pthread_attr_t; +typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; - late final _SecIdentityCopySystemIdentityPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(CFStringRef, ffi.Pointer, - ffi.Pointer)>>('SecIdentityCopySystemIdentity'); - late final _SecIdentityCopySystemIdentity = - _SecIdentityCopySystemIdentityPtr.asFunction< - int Function(CFStringRef, ffi.Pointer, - ffi.Pointer)>(); +final class __siginfo extends ffi.Struct { + @ffi.Int() + external int si_signo; - int SecIdentitySetSystemIdentity( - CFStringRef domain, - SecIdentityRef idRef, - ) { - return _SecIdentitySetSystemIdentity( - domain, - idRef, - ); - } + @ffi.Int() + external int si_errno; - late final _SecIdentitySetSystemIdentityPtr = _lookup< - ffi.NativeFunction>( - 'SecIdentitySetSystemIdentity'); - late final _SecIdentitySetSystemIdentity = _SecIdentitySetSystemIdentityPtr - .asFunction(); + @ffi.Int() + external int si_code; - late final ffi.Pointer _kSecIdentityDomainDefault = - _lookup('kSecIdentityDomainDefault'); + @pid_t() + external int si_pid; - CFStringRef get kSecIdentityDomainDefault => _kSecIdentityDomainDefault.value; + @uid_t() + external int si_uid; - set kSecIdentityDomainDefault(CFStringRef value) => - _kSecIdentityDomainDefault.value = value; + @ffi.Int() + external int si_status; - late final ffi.Pointer _kSecIdentityDomainKerberosKDC = - _lookup('kSecIdentityDomainKerberosKDC'); + external ffi.Pointer si_addr; - CFStringRef get kSecIdentityDomainKerberosKDC => - _kSecIdentityDomainKerberosKDC.value; + external sigval si_value; - set kSecIdentityDomainKerberosKDC(CFStringRef value) => - _kSecIdentityDomainKerberosKDC.value = value; + @ffi.Long() + external int si_band; - sec_trust_t sec_trust_create( - SecTrustRef trust, - ) { - return _sec_trust_create( - trust, - ); - } + @ffi.Array.multi([7]) + external ffi.Array __pad; +} - late final _sec_trust_createPtr = - _lookup>( - 'sec_trust_create'); - late final _sec_trust_create = - _sec_trust_createPtr.asFunction(); +typedef pid_t = __darwin_pid_t; +typedef __darwin_pid_t = __int32_t; +typedef __int32_t = ffi.Int; +typedef Dart__int32_t = int; +typedef uid_t = __darwin_uid_t; +typedef __darwin_uid_t = __uint32_t; - SecTrustRef sec_trust_copy_ref( - sec_trust_t trust, - ) { - return _sec_trust_copy_ref( - trust, - ); - } +final class __sigaction_u extends ffi.Union { + external ffi.Pointer> + __sa_handler; - late final _sec_trust_copy_refPtr = - _lookup>( - 'sec_trust_copy_ref'); - late final _sec_trust_copy_ref = - _sec_trust_copy_refPtr.asFunction(); + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer)>> + __sa_sigaction; +} - sec_identity_t sec_identity_create( - SecIdentityRef identity, - ) { - return _sec_identity_create( - identity, - ); - } +final class __sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; - late final _sec_identity_createPtr = - _lookup>( - 'sec_identity_create'); - late final _sec_identity_create = _sec_identity_createPtr - .asFunction(); + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Int, + ffi.Pointer, ffi.Pointer)>> sa_tramp; - sec_identity_t sec_identity_create_with_certificates( - SecIdentityRef identity, - CFArrayRef certificates, - ) { - return _sec_identity_create_with_certificates( - identity, - certificates, - ); - } + @sigset_t() + external int sa_mask; - late final _sec_identity_create_with_certificatesPtr = _lookup< - ffi - .NativeFunction>( - 'sec_identity_create_with_certificates'); - late final _sec_identity_create_with_certificates = - _sec_identity_create_with_certificatesPtr - .asFunction(); + @ffi.Int() + external int sa_flags; +} - bool sec_identity_access_certificates( - sec_identity_t identity, - ObjCBlock_ffiVoid_seccertificatet handler, - ) { - return _sec_identity_access_certificates( - identity, - handler._id, - ); - } +typedef siginfo_t = __siginfo; +typedef sigset_t = __darwin_sigset_t; - late final _sec_identity_access_certificatesPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(sec_identity_t, - ffi.Pointer<_ObjCBlock>)>>('sec_identity_access_certificates'); - late final _sec_identity_access_certificates = - _sec_identity_access_certificatesPtr - .asFunction)>(); +final class sigaction extends ffi.Struct { + external __sigaction_u __sigaction_u1; - SecIdentityRef sec_identity_copy_ref( - sec_identity_t identity, - ) { - return _sec_identity_copy_ref( - identity, - ); - } + @sigset_t() + external int sa_mask; - late final _sec_identity_copy_refPtr = - _lookup>( - 'sec_identity_copy_ref'); - late final _sec_identity_copy_ref = _sec_identity_copy_refPtr - .asFunction(); + @ffi.Int() + external int sa_flags; +} - CFArrayRef sec_identity_copy_certificates_ref( - sec_identity_t identity, - ) { - return _sec_identity_copy_certificates_ref( - identity, - ); - } +final class sigvec extends ffi.Struct { + external ffi.Pointer> + sv_handler; - late final _sec_identity_copy_certificates_refPtr = - _lookup>( - 'sec_identity_copy_certificates_ref'); - late final _sec_identity_copy_certificates_ref = - _sec_identity_copy_certificates_refPtr - .asFunction(); + @ffi.Int() + external int sv_mask; - sec_certificate_t sec_certificate_create( - SecCertificateRef certificate, - ) { - return _sec_certificate_create( - certificate, - ); - } + @ffi.Int() + external int sv_flags; +} - late final _sec_certificate_createPtr = _lookup< - ffi.NativeFunction>( - 'sec_certificate_create'); - late final _sec_certificate_create = _sec_certificate_createPtr - .asFunction(); +final class sigstack extends ffi.Struct { + external ffi.Pointer ss_sp; - SecCertificateRef sec_certificate_copy_ref( - sec_certificate_t certificate, - ) { - return _sec_certificate_copy_ref( - certificate, - ); - } + @ffi.Int() + external int ss_onstack; +} - late final _sec_certificate_copy_refPtr = _lookup< - ffi.NativeFunction>( - 'sec_certificate_copy_ref'); - late final _sec_certificate_copy_ref = _sec_certificate_copy_refPtr - .asFunction(); +final class timeval extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; - ffi.Pointer sec_protocol_metadata_get_negotiated_protocol( - sec_protocol_metadata_t metadata, - ) { - return _sec_protocol_metadata_get_negotiated_protocol( - metadata, - ); - } + @__darwin_suseconds_t() + external int tv_usec; +} - late final _sec_protocol_metadata_get_negotiated_protocolPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_get_negotiated_protocol'); - late final _sec_protocol_metadata_get_negotiated_protocol = - _sec_protocol_metadata_get_negotiated_protocolPtr.asFunction< - ffi.Pointer Function(sec_protocol_metadata_t)>(); +typedef __darwin_time_t = ffi.Long; +typedef Dart__darwin_time_t = int; +typedef __darwin_suseconds_t = __int32_t; - dispatch_data_t sec_protocol_metadata_copy_peer_public_key( - sec_protocol_metadata_t metadata, - ) { - return _sec_protocol_metadata_copy_peer_public_key( - metadata, - ); - } +final class rusage extends ffi.Struct { + external timeval ru_utime; - late final _sec_protocol_metadata_copy_peer_public_keyPtr = _lookup< - ffi - .NativeFunction>( - 'sec_protocol_metadata_copy_peer_public_key'); - late final _sec_protocol_metadata_copy_peer_public_key = - _sec_protocol_metadata_copy_peer_public_keyPtr - .asFunction(); + external timeval ru_stime; - int sec_protocol_metadata_get_negotiated_tls_protocol_version( - sec_protocol_metadata_t metadata, - ) { - return _sec_protocol_metadata_get_negotiated_tls_protocol_version( - metadata, - ); - } + @ffi.Long() + external int ru_maxrss; - late final _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr = - _lookup>( - 'sec_protocol_metadata_get_negotiated_tls_protocol_version'); - late final _sec_protocol_metadata_get_negotiated_tls_protocol_version = - _sec_protocol_metadata_get_negotiated_tls_protocol_versionPtr - .asFunction(); + @ffi.Long() + external int ru_ixrss; - int sec_protocol_metadata_get_negotiated_protocol_version( - sec_protocol_metadata_t metadata, - ) { - return _sec_protocol_metadata_get_negotiated_protocol_version( - metadata, - ); - } + @ffi.Long() + external int ru_idrss; - late final _sec_protocol_metadata_get_negotiated_protocol_versionPtr = - _lookup>( - 'sec_protocol_metadata_get_negotiated_protocol_version'); - late final _sec_protocol_metadata_get_negotiated_protocol_version = - _sec_protocol_metadata_get_negotiated_protocol_versionPtr - .asFunction(); + @ffi.Long() + external int ru_isrss; - int sec_protocol_metadata_get_negotiated_tls_ciphersuite( - sec_protocol_metadata_t metadata, - ) { - return _sec_protocol_metadata_get_negotiated_tls_ciphersuite( - metadata, - ); - } + @ffi.Long() + external int ru_minflt; - late final _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr = - _lookup>( - 'sec_protocol_metadata_get_negotiated_tls_ciphersuite'); - late final _sec_protocol_metadata_get_negotiated_tls_ciphersuite = - _sec_protocol_metadata_get_negotiated_tls_ciphersuitePtr - .asFunction(); + @ffi.Long() + external int ru_majflt; - int sec_protocol_metadata_get_negotiated_ciphersuite( - sec_protocol_metadata_t metadata, - ) { - return _sec_protocol_metadata_get_negotiated_ciphersuite( - metadata, - ); - } + @ffi.Long() + external int ru_nswap; - late final _sec_protocol_metadata_get_negotiated_ciphersuitePtr = _lookup< - ffi.NativeFunction>( - 'sec_protocol_metadata_get_negotiated_ciphersuite'); - late final _sec_protocol_metadata_get_negotiated_ciphersuite = - _sec_protocol_metadata_get_negotiated_ciphersuitePtr - .asFunction(); + @ffi.Long() + external int ru_inblock; - bool sec_protocol_metadata_get_early_data_accepted( - sec_protocol_metadata_t metadata, - ) { - return _sec_protocol_metadata_get_early_data_accepted( - metadata, - ); - } + @ffi.Long() + external int ru_oublock; - late final _sec_protocol_metadata_get_early_data_acceptedPtr = - _lookup>( - 'sec_protocol_metadata_get_early_data_accepted'); - late final _sec_protocol_metadata_get_early_data_accepted = - _sec_protocol_metadata_get_early_data_acceptedPtr - .asFunction(); + @ffi.Long() + external int ru_msgsnd; - bool sec_protocol_metadata_access_peer_certificate_chain( - sec_protocol_metadata_t metadata, - ObjCBlock_ffiVoid_seccertificatet handler, - ) { - return _sec_protocol_metadata_access_peer_certificate_chain( - metadata, - handler._id, - ); - } + @ffi.Long() + external int ru_msgrcv; - late final _sec_protocol_metadata_access_peer_certificate_chainPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_peer_certificate_chain'); - late final _sec_protocol_metadata_access_peer_certificate_chain = - _sec_protocol_metadata_access_peer_certificate_chainPtr.asFunction< - bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + @ffi.Long() + external int ru_nsignals; - bool sec_protocol_metadata_access_ocsp_response( - sec_protocol_metadata_t metadata, - ObjCBlock_ffiVoid_dispatchdatat handler, - ) { - return _sec_protocol_metadata_access_ocsp_response( - metadata, - handler._id, - ); - } + @ffi.Long() + external int ru_nvcsw; - late final _sec_protocol_metadata_access_ocsp_responsePtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_ocsp_response'); - late final _sec_protocol_metadata_access_ocsp_response = - _sec_protocol_metadata_access_ocsp_responsePtr.asFunction< - bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + @ffi.Long() + external int ru_nivcsw; +} - bool sec_protocol_metadata_access_supported_signature_algorithms( - sec_protocol_metadata_t metadata, - ObjCBlock_ffiVoid_Uint16 handler, - ) { - return _sec_protocol_metadata_access_supported_signature_algorithms( - metadata, - handler._id, - ); - } +final class rusage_info_v0 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - late final _sec_protocol_metadata_access_supported_signature_algorithmsPtr = - _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_supported_signature_algorithms'); - late final _sec_protocol_metadata_access_supported_signature_algorithms = - _sec_protocol_metadata_access_supported_signature_algorithmsPtr - .asFunction< - bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + @ffi.Uint64() + external int ri_user_time; - bool sec_protocol_metadata_access_distinguished_names( - sec_protocol_metadata_t metadata, - ObjCBlock_ffiVoid_dispatchdatat handler, - ) { - return _sec_protocol_metadata_access_distinguished_names( - metadata, - handler._id, - ); - } + @ffi.Uint64() + external int ri_system_time; - late final _sec_protocol_metadata_access_distinguished_namesPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_distinguished_names'); - late final _sec_protocol_metadata_access_distinguished_names = - _sec_protocol_metadata_access_distinguished_namesPtr.asFunction< - bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + @ffi.Uint64() + external int ri_pkg_idle_wkups; - bool sec_protocol_metadata_access_pre_shared_keys( - sec_protocol_metadata_t metadata, - ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat handler, - ) { - return _sec_protocol_metadata_access_pre_shared_keys( - metadata, - handler._id, - ); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - late final _sec_protocol_metadata_access_pre_shared_keysPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>>( - 'sec_protocol_metadata_access_pre_shared_keys'); - late final _sec_protocol_metadata_access_pre_shared_keys = - _sec_protocol_metadata_access_pre_shared_keysPtr.asFunction< - bool Function(sec_protocol_metadata_t, ffi.Pointer<_ObjCBlock>)>(); + @ffi.Uint64() + external int ri_pageins; - ffi.Pointer sec_protocol_metadata_get_server_name( - sec_protocol_metadata_t metadata, - ) { - return _sec_protocol_metadata_get_server_name( - metadata, - ); - } + @ffi.Uint64() + external int ri_wired_size; - late final _sec_protocol_metadata_get_server_namePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_get_server_name'); - late final _sec_protocol_metadata_get_server_name = - _sec_protocol_metadata_get_server_namePtr.asFunction< - ffi.Pointer Function(sec_protocol_metadata_t)>(); + @ffi.Uint64() + external int ri_resident_size; - bool sec_protocol_metadata_peers_are_equal( - sec_protocol_metadata_t metadataA, - sec_protocol_metadata_t metadataB, - ) { - return _sec_protocol_metadata_peers_are_equal( - metadataA, - metadataB, - ); - } + @ffi.Uint64() + external int ri_phys_footprint; - late final _sec_protocol_metadata_peers_are_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_peers_are_equal'); - late final _sec_protocol_metadata_peers_are_equal = - _sec_protocol_metadata_peers_are_equalPtr.asFunction< - bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); + @ffi.Uint64() + external int ri_proc_start_abstime; - bool sec_protocol_metadata_challenge_parameters_are_equal( - sec_protocol_metadata_t metadataA, - sec_protocol_metadata_t metadataB, - ) { - return _sec_protocol_metadata_challenge_parameters_are_equal( - metadataA, - metadataB, - ); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; +} - late final _sec_protocol_metadata_challenge_parameters_are_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - sec_protocol_metadata_t, sec_protocol_metadata_t)>>( - 'sec_protocol_metadata_challenge_parameters_are_equal'); - late final _sec_protocol_metadata_challenge_parameters_are_equal = - _sec_protocol_metadata_challenge_parameters_are_equalPtr.asFunction< - bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); +final class rusage_info_v1 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - dispatch_data_t sec_protocol_metadata_create_secret( - sec_protocol_metadata_t metadata, - int label_len, - ffi.Pointer label, - int exporter_length, - ) { - return _sec_protocol_metadata_create_secret( - metadata, - label_len, - label, - exporter_length, - ); - } + @ffi.Uint64() + external int ri_user_time; - late final _sec_protocol_metadata_create_secretPtr = _lookup< - ffi.NativeFunction< - dispatch_data_t Function( - sec_protocol_metadata_t, - ffi.Size, - ffi.Pointer, - ffi.Size)>>('sec_protocol_metadata_create_secret'); - late final _sec_protocol_metadata_create_secret = - _sec_protocol_metadata_create_secretPtr.asFunction< - dispatch_data_t Function( - sec_protocol_metadata_t, int, ffi.Pointer, int)>(); + @ffi.Uint64() + external int ri_system_time; - dispatch_data_t sec_protocol_metadata_create_secret_with_context( - sec_protocol_metadata_t metadata, - int label_len, - ffi.Pointer label, - int context_len, - ffi.Pointer context, - int exporter_length, - ) { - return _sec_protocol_metadata_create_secret_with_context( - metadata, - label_len, - label, - context_len, - context, - exporter_length, - ); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - late final _sec_protocol_metadata_create_secret_with_contextPtr = _lookup< - ffi.NativeFunction< - dispatch_data_t Function( - sec_protocol_metadata_t, - ffi.Size, - ffi.Pointer, - ffi.Size, - ffi.Pointer, - ffi.Size)>>('sec_protocol_metadata_create_secret_with_context'); - late final _sec_protocol_metadata_create_secret_with_context = - _sec_protocol_metadata_create_secret_with_contextPtr.asFunction< - dispatch_data_t Function(sec_protocol_metadata_t, int, - ffi.Pointer, int, ffi.Pointer, int)>(); + @ffi.Uint64() + external int ri_interrupt_wkups; - bool sec_protocol_options_are_equal( - sec_protocol_options_t optionsA, - sec_protocol_options_t optionsB, - ) { - return _sec_protocol_options_are_equal( - optionsA, - optionsB, - ); - } + @ffi.Uint64() + external int ri_pageins; - late final _sec_protocol_options_are_equalPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(sec_protocol_options_t, - sec_protocol_options_t)>>('sec_protocol_options_are_equal'); - late final _sec_protocol_options_are_equal = - _sec_protocol_options_are_equalPtr.asFunction< - bool Function(sec_protocol_options_t, sec_protocol_options_t)>(); + @ffi.Uint64() + external int ri_wired_size; - void sec_protocol_options_set_local_identity( - sec_protocol_options_t options, - sec_identity_t identity, - ) { - return _sec_protocol_options_set_local_identity( - options, - identity, - ); - } + @ffi.Uint64() + external int ri_resident_size; - late final _sec_protocol_options_set_local_identityPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - sec_identity_t)>>('sec_protocol_options_set_local_identity'); - late final _sec_protocol_options_set_local_identity = - _sec_protocol_options_set_local_identityPtr - .asFunction(); + @ffi.Uint64() + external int ri_phys_footprint; - void sec_protocol_options_append_tls_ciphersuite( - sec_protocol_options_t options, - int ciphersuite, - ) { - return _sec_protocol_options_append_tls_ciphersuite( - options, - ciphersuite, - ); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - late final _sec_protocol_options_append_tls_ciphersuitePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite'); - late final _sec_protocol_options_append_tls_ciphersuite = - _sec_protocol_options_append_tls_ciphersuitePtr - .asFunction(); + @ffi.Uint64() + external int ri_proc_exit_abstime; - void sec_protocol_options_add_tls_ciphersuite( - sec_protocol_options_t options, - int ciphersuite, - ) { - return _sec_protocol_options_add_tls_ciphersuite( - options, - ciphersuite, - ); - } + @ffi.Uint64() + external int ri_child_user_time; - late final _sec_protocol_options_add_tls_ciphersuitePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - SSLCipherSuite)>>('sec_protocol_options_add_tls_ciphersuite'); - late final _sec_protocol_options_add_tls_ciphersuite = - _sec_protocol_options_add_tls_ciphersuitePtr - .asFunction(); + @ffi.Uint64() + external int ri_child_system_time; - void sec_protocol_options_append_tls_ciphersuite_group( - sec_protocol_options_t options, - int group, - ) { - return _sec_protocol_options_append_tls_ciphersuite_group( - options, - group, - ); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - late final _sec_protocol_options_append_tls_ciphersuite_groupPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_append_tls_ciphersuite_group'); - late final _sec_protocol_options_append_tls_ciphersuite_group = - _sec_protocol_options_append_tls_ciphersuite_groupPtr - .asFunction(); + @ffi.Uint64() + external int ri_child_interrupt_wkups; - void sec_protocol_options_add_tls_ciphersuite_group( - sec_protocol_options_t options, - int group, - ) { - return _sec_protocol_options_add_tls_ciphersuite_group( - options, - group, - ); - } + @ffi.Uint64() + external int ri_child_pageins; - late final _sec_protocol_options_add_tls_ciphersuite_groupPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_add_tls_ciphersuite_group'); - late final _sec_protocol_options_add_tls_ciphersuite_group = - _sec_protocol_options_add_tls_ciphersuite_groupPtr - .asFunction(); + @ffi.Uint64() + external int ri_child_elapsed_abstime; +} - void sec_protocol_options_set_tls_min_version( - sec_protocol_options_t options, - int version, - ) { - return _sec_protocol_options_set_tls_min_version( - options, - version, - ); - } +final class rusage_info_v2 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - late final _sec_protocol_options_set_tls_min_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_set_tls_min_version'); - late final _sec_protocol_options_set_tls_min_version = - _sec_protocol_options_set_tls_min_versionPtr - .asFunction(); + @ffi.Uint64() + external int ri_user_time; - void sec_protocol_options_set_min_tls_protocol_version( - sec_protocol_options_t options, - int version, - ) { - return _sec_protocol_options_set_min_tls_protocol_version( - options, - version, - ); - } + @ffi.Uint64() + external int ri_system_time; - late final _sec_protocol_options_set_min_tls_protocol_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_set_min_tls_protocol_version'); - late final _sec_protocol_options_set_min_tls_protocol_version = - _sec_protocol_options_set_min_tls_protocol_versionPtr - .asFunction(); + @ffi.Uint64() + external int ri_pkg_idle_wkups; - int sec_protocol_options_get_default_min_tls_protocol_version() { - return _sec_protocol_options_get_default_min_tls_protocol_version(); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - late final _sec_protocol_options_get_default_min_tls_protocol_versionPtr = - _lookup>( - 'sec_protocol_options_get_default_min_tls_protocol_version'); - late final _sec_protocol_options_get_default_min_tls_protocol_version = - _sec_protocol_options_get_default_min_tls_protocol_versionPtr - .asFunction(); + @ffi.Uint64() + external int ri_pageins; - int sec_protocol_options_get_default_min_dtls_protocol_version() { - return _sec_protocol_options_get_default_min_dtls_protocol_version(); - } + @ffi.Uint64() + external int ri_wired_size; - late final _sec_protocol_options_get_default_min_dtls_protocol_versionPtr = - _lookup>( - 'sec_protocol_options_get_default_min_dtls_protocol_version'); - late final _sec_protocol_options_get_default_min_dtls_protocol_version = - _sec_protocol_options_get_default_min_dtls_protocol_versionPtr - .asFunction(); + @ffi.Uint64() + external int ri_resident_size; - void sec_protocol_options_set_tls_max_version( - sec_protocol_options_t options, - int version, - ) { - return _sec_protocol_options_set_tls_max_version( - options, - version, - ); - } + @ffi.Uint64() + external int ri_phys_footprint; - late final _sec_protocol_options_set_tls_max_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_set_tls_max_version'); - late final _sec_protocol_options_set_tls_max_version = - _sec_protocol_options_set_tls_max_versionPtr - .asFunction(); + @ffi.Uint64() + external int ri_proc_start_abstime; - void sec_protocol_options_set_max_tls_protocol_version( - sec_protocol_options_t options, - int version, - ) { - return _sec_protocol_options_set_max_tls_protocol_version( - options, - version, - ); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - late final _sec_protocol_options_set_max_tls_protocol_versionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, - ffi.Int32)>>('sec_protocol_options_set_max_tls_protocol_version'); - late final _sec_protocol_options_set_max_tls_protocol_version = - _sec_protocol_options_set_max_tls_protocol_versionPtr - .asFunction(); + @ffi.Uint64() + external int ri_child_user_time; - int sec_protocol_options_get_default_max_tls_protocol_version() { - return _sec_protocol_options_get_default_max_tls_protocol_version(); - } + @ffi.Uint64() + external int ri_child_system_time; - late final _sec_protocol_options_get_default_max_tls_protocol_versionPtr = - _lookup>( - 'sec_protocol_options_get_default_max_tls_protocol_version'); - late final _sec_protocol_options_get_default_max_tls_protocol_version = - _sec_protocol_options_get_default_max_tls_protocol_versionPtr - .asFunction(); + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - int sec_protocol_options_get_default_max_dtls_protocol_version() { - return _sec_protocol_options_get_default_max_dtls_protocol_version(); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - late final _sec_protocol_options_get_default_max_dtls_protocol_versionPtr = - _lookup>( - 'sec_protocol_options_get_default_max_dtls_protocol_version'); - late final _sec_protocol_options_get_default_max_dtls_protocol_version = - _sec_protocol_options_get_default_max_dtls_protocol_versionPtr - .asFunction(); + @ffi.Uint64() + external int ri_child_pageins; - bool sec_protocol_options_get_enable_encrypted_client_hello( - sec_protocol_options_t options, - ) { - return _sec_protocol_options_get_enable_encrypted_client_hello( - options, - ); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - late final _sec_protocol_options_get_enable_encrypted_client_helloPtr = - _lookup>( - 'sec_protocol_options_get_enable_encrypted_client_hello'); - late final _sec_protocol_options_get_enable_encrypted_client_hello = - _sec_protocol_options_get_enable_encrypted_client_helloPtr - .asFunction(); + @ffi.Uint64() + external int ri_diskio_bytesread; - bool sec_protocol_options_get_quic_use_legacy_codepoint( - sec_protocol_options_t options, - ) { - return _sec_protocol_options_get_quic_use_legacy_codepoint( - options, - ); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; +} - late final _sec_protocol_options_get_quic_use_legacy_codepointPtr = - _lookup>( - 'sec_protocol_options_get_quic_use_legacy_codepoint'); - late final _sec_protocol_options_get_quic_use_legacy_codepoint = - _sec_protocol_options_get_quic_use_legacy_codepointPtr - .asFunction(); +final class rusage_info_v3 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - void sec_protocol_options_add_tls_application_protocol( - sec_protocol_options_t options, - ffi.Pointer application_protocol, - ) { - return _sec_protocol_options_add_tls_application_protocol( - options, - application_protocol, - ); - } + @ffi.Uint64() + external int ri_user_time; - late final _sec_protocol_options_add_tls_application_protocolPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_options_t, ffi.Pointer)>>( - 'sec_protocol_options_add_tls_application_protocol'); - late final _sec_protocol_options_add_tls_application_protocol = - _sec_protocol_options_add_tls_application_protocolPtr.asFunction< - void Function(sec_protocol_options_t, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_system_time; - void sec_protocol_options_set_tls_server_name( - sec_protocol_options_t options, - ffi.Pointer server_name, - ) { - return _sec_protocol_options_set_tls_server_name( - options, - server_name, - ); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - late final _sec_protocol_options_set_tls_server_namePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_options_t, ffi.Pointer)>>( - 'sec_protocol_options_set_tls_server_name'); - late final _sec_protocol_options_set_tls_server_name = - _sec_protocol_options_set_tls_server_namePtr.asFunction< - void Function(sec_protocol_options_t, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_interrupt_wkups; - void sec_protocol_options_set_tls_diffie_hellman_parameters( - sec_protocol_options_t options, - dispatch_data_t params, - ) { - return _sec_protocol_options_set_tls_diffie_hellman_parameters( - options, - params, - ); - } + @ffi.Uint64() + external int ri_pageins; - late final _sec_protocol_options_set_tls_diffie_hellman_parametersPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( - 'sec_protocol_options_set_tls_diffie_hellman_parameters'); - late final _sec_protocol_options_set_tls_diffie_hellman_parameters = - _sec_protocol_options_set_tls_diffie_hellman_parametersPtr - .asFunction(); + @ffi.Uint64() + external int ri_wired_size; - void sec_protocol_options_add_pre_shared_key( - sec_protocol_options_t options, - dispatch_data_t psk, - dispatch_data_t psk_identity, - ) { - return _sec_protocol_options_add_pre_shared_key( - options, - psk, - psk_identity, - ); - } + @ffi.Uint64() + external int ri_resident_size; - late final _sec_protocol_options_add_pre_shared_keyPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, dispatch_data_t, - dispatch_data_t)>>('sec_protocol_options_add_pre_shared_key'); - late final _sec_protocol_options_add_pre_shared_key = - _sec_protocol_options_add_pre_shared_keyPtr.asFunction< - void Function( - sec_protocol_options_t, dispatch_data_t, dispatch_data_t)>(); + @ffi.Uint64() + external int ri_phys_footprint; - void sec_protocol_options_set_tls_pre_shared_key_identity_hint( - sec_protocol_options_t options, - dispatch_data_t psk_identity_hint, - ) { - return _sec_protocol_options_set_tls_pre_shared_key_identity_hint( - options, - psk_identity_hint, - ); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - late final _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, dispatch_data_t)>>( - 'sec_protocol_options_set_tls_pre_shared_key_identity_hint'); - late final _sec_protocol_options_set_tls_pre_shared_key_identity_hint = - _sec_protocol_options_set_tls_pre_shared_key_identity_hintPtr - .asFunction(); + @ffi.Uint64() + external int ri_proc_exit_abstime; - void sec_protocol_options_set_pre_shared_key_selection_block( - sec_protocol_options_t options, - Dartsec_protocol_pre_shared_key_selection_t psk_selection_block, - dispatch_queue_t psk_selection_queue, - ) { - return _sec_protocol_options_set_pre_shared_key_selection_block( - options, - psk_selection_block._id, - psk_selection_queue, - ); - } + @ffi.Uint64() + external int ri_child_user_time; - late final _sec_protocol_options_set_pre_shared_key_selection_blockPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_options_t, - sec_protocol_pre_shared_key_selection_t, - dispatch_queue_t)>>( - 'sec_protocol_options_set_pre_shared_key_selection_block'); - late final _sec_protocol_options_set_pre_shared_key_selection_block = - _sec_protocol_options_set_pre_shared_key_selection_blockPtr.asFunction< - void Function(sec_protocol_options_t, - sec_protocol_pre_shared_key_selection_t, dispatch_queue_t)>(); + @ffi.Uint64() + external int ri_child_system_time; - void sec_protocol_options_set_tls_tickets_enabled( - sec_protocol_options_t options, - bool tickets_enabled, - ) { - return _sec_protocol_options_set_tls_tickets_enabled( - options, - tickets_enabled, - ); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - late final _sec_protocol_options_set_tls_tickets_enabledPtr = _lookup< - ffi - .NativeFunction>( - 'sec_protocol_options_set_tls_tickets_enabled'); - late final _sec_protocol_options_set_tls_tickets_enabled = - _sec_protocol_options_set_tls_tickets_enabledPtr - .asFunction(); + @ffi.Uint64() + external int ri_child_interrupt_wkups; - void sec_protocol_options_set_tls_is_fallback_attempt( - sec_protocol_options_t options, - bool is_fallback_attempt, - ) { - return _sec_protocol_options_set_tls_is_fallback_attempt( - options, - is_fallback_attempt, - ); - } + @ffi.Uint64() + external int ri_child_pageins; - late final _sec_protocol_options_set_tls_is_fallback_attemptPtr = _lookup< - ffi - .NativeFunction>( - 'sec_protocol_options_set_tls_is_fallback_attempt'); - late final _sec_protocol_options_set_tls_is_fallback_attempt = - _sec_protocol_options_set_tls_is_fallback_attemptPtr - .asFunction(); + @ffi.Uint64() + external int ri_child_elapsed_abstime; - void sec_protocol_options_set_tls_resumption_enabled( - sec_protocol_options_t options, - bool resumption_enabled, - ) { - return _sec_protocol_options_set_tls_resumption_enabled( - options, - resumption_enabled, - ); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - late final _sec_protocol_options_set_tls_resumption_enabledPtr = _lookup< - ffi - .NativeFunction>( - 'sec_protocol_options_set_tls_resumption_enabled'); - late final _sec_protocol_options_set_tls_resumption_enabled = - _sec_protocol_options_set_tls_resumption_enabledPtr - .asFunction(); + @ffi.Uint64() + external int ri_diskio_byteswritten; - void sec_protocol_options_set_tls_false_start_enabled( - sec_protocol_options_t options, - bool false_start_enabled, - ) { - return _sec_protocol_options_set_tls_false_start_enabled( - options, - false_start_enabled, - ); - } + @ffi.Uint64() + external int ri_cpu_time_qos_default; - late final _sec_protocol_options_set_tls_false_start_enabledPtr = _lookup< - ffi - .NativeFunction>( - 'sec_protocol_options_set_tls_false_start_enabled'); - late final _sec_protocol_options_set_tls_false_start_enabled = - _sec_protocol_options_set_tls_false_start_enabledPtr - .asFunction(); + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - void sec_protocol_options_set_tls_ocsp_enabled( - sec_protocol_options_t options, - bool ocsp_enabled, - ) { - return _sec_protocol_options_set_tls_ocsp_enabled( - options, - ocsp_enabled, - ); - } + @ffi.Uint64() + external int ri_cpu_time_qos_background; - late final _sec_protocol_options_set_tls_ocsp_enabledPtr = _lookup< - ffi - .NativeFunction>( - 'sec_protocol_options_set_tls_ocsp_enabled'); - late final _sec_protocol_options_set_tls_ocsp_enabled = - _sec_protocol_options_set_tls_ocsp_enabledPtr - .asFunction(); + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - void sec_protocol_options_set_tls_sct_enabled( - sec_protocol_options_t options, - bool sct_enabled, - ) { - return _sec_protocol_options_set_tls_sct_enabled( - options, - sct_enabled, - ); - } + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; - late final _sec_protocol_options_set_tls_sct_enabledPtr = _lookup< - ffi - .NativeFunction>( - 'sec_protocol_options_set_tls_sct_enabled'); - late final _sec_protocol_options_set_tls_sct_enabled = - _sec_protocol_options_set_tls_sct_enabledPtr - .asFunction(); + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; - void sec_protocol_options_set_tls_renegotiation_enabled( - sec_protocol_options_t options, - bool renegotiation_enabled, - ) { - return _sec_protocol_options_set_tls_renegotiation_enabled( - options, - renegotiation_enabled, - ); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - late final _sec_protocol_options_set_tls_renegotiation_enabledPtr = _lookup< - ffi - .NativeFunction>( - 'sec_protocol_options_set_tls_renegotiation_enabled'); - late final _sec_protocol_options_set_tls_renegotiation_enabled = - _sec_protocol_options_set_tls_renegotiation_enabledPtr - .asFunction(); + @ffi.Uint64() + external int ri_billed_system_time; - void sec_protocol_options_set_peer_authentication_required( - sec_protocol_options_t options, - bool peer_authentication_required, - ) { - return _sec_protocol_options_set_peer_authentication_required( - options, - peer_authentication_required, - ); - } + @ffi.Uint64() + external int ri_serviced_system_time; +} - late final _sec_protocol_options_set_peer_authentication_requiredPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( - 'sec_protocol_options_set_peer_authentication_required'); - late final _sec_protocol_options_set_peer_authentication_required = - _sec_protocol_options_set_peer_authentication_requiredPtr - .asFunction(); +final class rusage_info_v4 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - void sec_protocol_options_set_peer_authentication_optional( - sec_protocol_options_t options, - bool peer_authentication_optional, - ) { - return _sec_protocol_options_set_peer_authentication_optional( - options, - peer_authentication_optional, - ); - } + @ffi.Uint64() + external int ri_user_time; - late final _sec_protocol_options_set_peer_authentication_optionalPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( - 'sec_protocol_options_set_peer_authentication_optional'); - late final _sec_protocol_options_set_peer_authentication_optional = - _sec_protocol_options_set_peer_authentication_optionalPtr - .asFunction(); + @ffi.Uint64() + external int ri_system_time; - void sec_protocol_options_set_enable_encrypted_client_hello( - sec_protocol_options_t options, - bool enable_encrypted_client_hello, - ) { - return _sec_protocol_options_set_enable_encrypted_client_hello( - options, - enable_encrypted_client_hello, - ); - } + @ffi.Uint64() + external int ri_pkg_idle_wkups; - late final _sec_protocol_options_set_enable_encrypted_client_helloPtr = - _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, ffi.Bool)>>( - 'sec_protocol_options_set_enable_encrypted_client_hello'); - late final _sec_protocol_options_set_enable_encrypted_client_hello = - _sec_protocol_options_set_enable_encrypted_client_helloPtr - .asFunction(); + @ffi.Uint64() + external int ri_interrupt_wkups; - void sec_protocol_options_set_quic_use_legacy_codepoint( - sec_protocol_options_t options, - bool quic_use_legacy_codepoint, - ) { - return _sec_protocol_options_set_quic_use_legacy_codepoint( - options, - quic_use_legacy_codepoint, - ); - } + @ffi.Uint64() + external int ri_pageins; - late final _sec_protocol_options_set_quic_use_legacy_codepointPtr = _lookup< - ffi - .NativeFunction>( - 'sec_protocol_options_set_quic_use_legacy_codepoint'); - late final _sec_protocol_options_set_quic_use_legacy_codepoint = - _sec_protocol_options_set_quic_use_legacy_codepointPtr - .asFunction(); + @ffi.Uint64() + external int ri_wired_size; - void sec_protocol_options_set_key_update_block( - sec_protocol_options_t options, - Dartsec_protocol_key_update_t key_update_block, - dispatch_queue_t key_update_queue, - ) { - return _sec_protocol_options_set_key_update_block( - options, - key_update_block._id, - key_update_queue, - ); - } + @ffi.Uint64() + external int ri_resident_size; - late final _sec_protocol_options_set_key_update_blockPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, sec_protocol_key_update_t, - dispatch_queue_t)>>('sec_protocol_options_set_key_update_block'); - late final _sec_protocol_options_set_key_update_block = - _sec_protocol_options_set_key_update_blockPtr.asFunction< - void Function(sec_protocol_options_t, sec_protocol_key_update_t, - dispatch_queue_t)>(); + @ffi.Uint64() + external int ri_phys_footprint; - void sec_protocol_options_set_challenge_block( - sec_protocol_options_t options, - Dartsec_protocol_challenge_t challenge_block, - dispatch_queue_t challenge_queue, - ) { - return _sec_protocol_options_set_challenge_block( - options, - challenge_block._id, - challenge_queue, - ); - } + @ffi.Uint64() + external int ri_proc_start_abstime; - late final _sec_protocol_options_set_challenge_blockPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, sec_protocol_challenge_t, - dispatch_queue_t)>>('sec_protocol_options_set_challenge_block'); - late final _sec_protocol_options_set_challenge_block = - _sec_protocol_options_set_challenge_blockPtr.asFunction< - void Function(sec_protocol_options_t, sec_protocol_challenge_t, - dispatch_queue_t)>(); + @ffi.Uint64() + external int ri_proc_exit_abstime; - void sec_protocol_options_set_verify_block( - sec_protocol_options_t options, - Dartsec_protocol_verify_t verify_block, - dispatch_queue_t verify_block_queue, - ) { - return _sec_protocol_options_set_verify_block( - options, - verify_block._id, - verify_block_queue, - ); - } + @ffi.Uint64() + external int ri_child_user_time; - late final _sec_protocol_options_set_verify_blockPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_options_t, sec_protocol_verify_t, - dispatch_queue_t)>>('sec_protocol_options_set_verify_block'); - late final _sec_protocol_options_set_verify_block = - _sec_protocol_options_set_verify_blockPtr.asFunction< - void Function(sec_protocol_options_t, sec_protocol_verify_t, - dispatch_queue_t)>(); + @ffi.Uint64() + external int ri_child_system_time; - late final ffi.Pointer _kSSLSessionConfig_default = - _lookup('kSSLSessionConfig_default'); + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - CFStringRef get kSSLSessionConfig_default => _kSSLSessionConfig_default.value; + @ffi.Uint64() + external int ri_child_interrupt_wkups; - set kSSLSessionConfig_default(CFStringRef value) => - _kSSLSessionConfig_default.value = value; + @ffi.Uint64() + external int ri_child_pageins; - late final ffi.Pointer _kSSLSessionConfig_ATSv1 = - _lookup('kSSLSessionConfig_ATSv1'); + @ffi.Uint64() + external int ri_child_elapsed_abstime; - CFStringRef get kSSLSessionConfig_ATSv1 => _kSSLSessionConfig_ATSv1.value; + @ffi.Uint64() + external int ri_diskio_bytesread; - set kSSLSessionConfig_ATSv1(CFStringRef value) => - _kSSLSessionConfig_ATSv1.value = value; + @ffi.Uint64() + external int ri_diskio_byteswritten; - late final ffi.Pointer _kSSLSessionConfig_ATSv1_noPFS = - _lookup('kSSLSessionConfig_ATSv1_noPFS'); + @ffi.Uint64() + external int ri_cpu_time_qos_default; - CFStringRef get kSSLSessionConfig_ATSv1_noPFS => - _kSSLSessionConfig_ATSv1_noPFS.value; + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - set kSSLSessionConfig_ATSv1_noPFS(CFStringRef value) => - _kSSLSessionConfig_ATSv1_noPFS.value = value; + @ffi.Uint64() + external int ri_cpu_time_qos_background; - late final ffi.Pointer _kSSLSessionConfig_standard = - _lookup('kSSLSessionConfig_standard'); + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - CFStringRef get kSSLSessionConfig_standard => - _kSSLSessionConfig_standard.value; + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; - set kSSLSessionConfig_standard(CFStringRef value) => - _kSSLSessionConfig_standard.value = value; + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; - late final ffi.Pointer _kSSLSessionConfig_RC4_fallback = - _lookup('kSSLSessionConfig_RC4_fallback'); + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - CFStringRef get kSSLSessionConfig_RC4_fallback => - _kSSLSessionConfig_RC4_fallback.value; + @ffi.Uint64() + external int ri_billed_system_time; - set kSSLSessionConfig_RC4_fallback(CFStringRef value) => - _kSSLSessionConfig_RC4_fallback.value = value; + @ffi.Uint64() + external int ri_serviced_system_time; - late final ffi.Pointer _kSSLSessionConfig_TLSv1_fallback = - _lookup('kSSLSessionConfig_TLSv1_fallback'); + @ffi.Uint64() + external int ri_logical_writes; - CFStringRef get kSSLSessionConfig_TLSv1_fallback => - _kSSLSessionConfig_TLSv1_fallback.value; + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; - set kSSLSessionConfig_TLSv1_fallback(CFStringRef value) => - _kSSLSessionConfig_TLSv1_fallback.value = value; + @ffi.Uint64() + external int ri_instructions; - late final ffi.Pointer _kSSLSessionConfig_TLSv1_RC4_fallback = - _lookup('kSSLSessionConfig_TLSv1_RC4_fallback'); + @ffi.Uint64() + external int ri_cycles; - CFStringRef get kSSLSessionConfig_TLSv1_RC4_fallback => - _kSSLSessionConfig_TLSv1_RC4_fallback.value; + @ffi.Uint64() + external int ri_billed_energy; - set kSSLSessionConfig_TLSv1_RC4_fallback(CFStringRef value) => - _kSSLSessionConfig_TLSv1_RC4_fallback.value = value; + @ffi.Uint64() + external int ri_serviced_energy; - late final ffi.Pointer _kSSLSessionConfig_legacy = - _lookup('kSSLSessionConfig_legacy'); + @ffi.Uint64() + external int ri_interval_max_phys_footprint; - CFStringRef get kSSLSessionConfig_legacy => _kSSLSessionConfig_legacy.value; + @ffi.Uint64() + external int ri_runnable_time; +} - set kSSLSessionConfig_legacy(CFStringRef value) => - _kSSLSessionConfig_legacy.value = value; +final class rusage_info_v5 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - late final ffi.Pointer _kSSLSessionConfig_legacy_DHE = - _lookup('kSSLSessionConfig_legacy_DHE'); + @ffi.Uint64() + external int ri_user_time; - CFStringRef get kSSLSessionConfig_legacy_DHE => - _kSSLSessionConfig_legacy_DHE.value; + @ffi.Uint64() + external int ri_system_time; - set kSSLSessionConfig_legacy_DHE(CFStringRef value) => - _kSSLSessionConfig_legacy_DHE.value = value; + @ffi.Uint64() + external int ri_pkg_idle_wkups; - late final ffi.Pointer _kSSLSessionConfig_anonymous = - _lookup('kSSLSessionConfig_anonymous'); + @ffi.Uint64() + external int ri_interrupt_wkups; - CFStringRef get kSSLSessionConfig_anonymous => - _kSSLSessionConfig_anonymous.value; + @ffi.Uint64() + external int ri_pageins; - set kSSLSessionConfig_anonymous(CFStringRef value) => - _kSSLSessionConfig_anonymous.value = value; + @ffi.Uint64() + external int ri_wired_size; - late final ffi.Pointer _kSSLSessionConfig_3DES_fallback = - _lookup('kSSLSessionConfig_3DES_fallback'); + @ffi.Uint64() + external int ri_resident_size; - CFStringRef get kSSLSessionConfig_3DES_fallback => - _kSSLSessionConfig_3DES_fallback.value; + @ffi.Uint64() + external int ri_phys_footprint; - set kSSLSessionConfig_3DES_fallback(CFStringRef value) => - _kSSLSessionConfig_3DES_fallback.value = value; + @ffi.Uint64() + external int ri_proc_start_abstime; - late final ffi.Pointer _kSSLSessionConfig_TLSv1_3DES_fallback = - _lookup('kSSLSessionConfig_TLSv1_3DES_fallback'); + @ffi.Uint64() + external int ri_proc_exit_abstime; - CFStringRef get kSSLSessionConfig_TLSv1_3DES_fallback => - _kSSLSessionConfig_TLSv1_3DES_fallback.value; + @ffi.Uint64() + external int ri_child_user_time; - set kSSLSessionConfig_TLSv1_3DES_fallback(CFStringRef value) => - _kSSLSessionConfig_TLSv1_3DES_fallback.value = value; + @ffi.Uint64() + external int ri_child_system_time; - int SSLContextGetTypeID() { - return _SSLContextGetTypeID(); - } + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - late final _SSLContextGetTypeIDPtr = - _lookup>('SSLContextGetTypeID'); - late final _SSLContextGetTypeID = - _SSLContextGetTypeIDPtr.asFunction(); + @ffi.Uint64() + external int ri_child_interrupt_wkups; - SSLContextRef SSLCreateContext( - CFAllocatorRef alloc, - int protocolSide, - int connectionType, - ) { - return _SSLCreateContext( - alloc, - protocolSide, - connectionType, - ); - } + @ffi.Uint64() + external int ri_child_pageins; - late final _SSLCreateContextPtr = _lookup< - ffi.NativeFunction< - SSLContextRef Function( - CFAllocatorRef, ffi.Int32, ffi.Int32)>>('SSLCreateContext'); - late final _SSLCreateContext = _SSLCreateContextPtr.asFunction< - SSLContextRef Function(CFAllocatorRef, int, int)>(); + @ffi.Uint64() + external int ri_child_elapsed_abstime; - int SSLNewContext( - int isServer, - ffi.Pointer contextPtr, - ) { - return _SSLNewContext( - isServer, - contextPtr, - ); - } + @ffi.Uint64() + external int ri_diskio_bytesread; - late final _SSLNewContextPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - Boolean, ffi.Pointer)>>('SSLNewContext'); - late final _SSLNewContext = _SSLNewContextPtr.asFunction< - int Function(int, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_diskio_byteswritten; - int SSLDisposeContext( - SSLContextRef context, - ) { - return _SSLDisposeContext( - context, - ); - } + @ffi.Uint64() + external int ri_cpu_time_qos_default; - late final _SSLDisposeContextPtr = - _lookup>( - 'SSLDisposeContext'); - late final _SSLDisposeContext = - _SSLDisposeContextPtr.asFunction(); + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - int SSLGetSessionState( - SSLContextRef context, - ffi.Pointer state, - ) { - return _SSLGetSessionState( - context, - state, - ); - } + @ffi.Uint64() + external int ri_cpu_time_qos_background; - late final _SSLGetSessionStatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetSessionState'); - late final _SSLGetSessionState = _SSLGetSessionStatePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - int SSLSetSessionOption( - SSLContextRef context, - int option, - int value, - ) { - return _SSLSetSessionOption( - context, - option, - value, - ); - } + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; - late final _SSLSetSessionOptionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Int32, Boolean)>>('SSLSetSessionOption'); - late final _SSLSetSessionOption = _SSLSetSessionOptionPtr.asFunction< - int Function(SSLContextRef, int, int)>(); + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; - int SSLGetSessionOption( - SSLContextRef context, - int option, - ffi.Pointer value, - ) { - return _SSLGetSessionOption( - context, - option, - value, - ); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - late final _SSLGetSessionOptionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Int32, - ffi.Pointer)>>('SSLGetSessionOption'); - late final _SSLGetSessionOption = _SSLGetSessionOptionPtr.asFunction< - int Function(SSLContextRef, int, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_billed_system_time; - int SSLSetIOFuncs( - SSLContextRef context, - SSLReadFunc readFunc, - SSLWriteFunc writeFunc, - ) { - return _SSLSetIOFuncs( - context, - readFunc, - writeFunc, - ); - } + @ffi.Uint64() + external int ri_serviced_system_time; - late final _SSLSetIOFuncsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, SSLReadFunc, SSLWriteFunc)>>('SSLSetIOFuncs'); - late final _SSLSetIOFuncs = _SSLSetIOFuncsPtr.asFunction< - int Function(SSLContextRef, SSLReadFunc, SSLWriteFunc)>(); + @ffi.Uint64() + external int ri_logical_writes; - int SSLSetSessionConfig( - SSLContextRef context, - CFStringRef config, - ) { - return _SSLSetSessionConfig( - context, - config, - ); - } + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; - late final _SSLSetSessionConfigPtr = _lookup< - ffi.NativeFunction>( - 'SSLSetSessionConfig'); - late final _SSLSetSessionConfig = _SSLSetSessionConfigPtr.asFunction< - int Function(SSLContextRef, CFStringRef)>(); + @ffi.Uint64() + external int ri_instructions; - int SSLSetProtocolVersionMin( - SSLContextRef context, - int minVersion, - ) { - return _SSLSetProtocolVersionMin( - context, - minVersion, - ); - } + @ffi.Uint64() + external int ri_cycles; - late final _SSLSetProtocolVersionMinPtr = - _lookup>( - 'SSLSetProtocolVersionMin'); - late final _SSLSetProtocolVersionMin = _SSLSetProtocolVersionMinPtr - .asFunction(); + @ffi.Uint64() + external int ri_billed_energy; - int SSLGetProtocolVersionMin( - SSLContextRef context, - ffi.Pointer minVersion, - ) { - return _SSLGetProtocolVersionMin( - context, - minVersion, - ); - } + @ffi.Uint64() + external int ri_serviced_energy; - late final _SSLGetProtocolVersionMinPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetProtocolVersionMin'); - late final _SSLGetProtocolVersionMin = _SSLGetProtocolVersionMinPtr - .asFunction)>(); + @ffi.Uint64() + external int ri_interval_max_phys_footprint; - int SSLSetProtocolVersionMax( - SSLContextRef context, - int maxVersion, - ) { - return _SSLSetProtocolVersionMax( - context, - maxVersion, - ); - } + @ffi.Uint64() + external int ri_runnable_time; - late final _SSLSetProtocolVersionMaxPtr = - _lookup>( - 'SSLSetProtocolVersionMax'); - late final _SSLSetProtocolVersionMax = _SSLSetProtocolVersionMaxPtr - .asFunction(); + @ffi.Uint64() + external int ri_flags; +} - int SSLGetProtocolVersionMax( - SSLContextRef context, - ffi.Pointer maxVersion, - ) { - return _SSLGetProtocolVersionMax( - context, - maxVersion, - ); - } +final class rusage_info_v6 extends ffi.Struct { + @ffi.Array.multi([16]) + external ffi.Array ri_uuid; - late final _SSLGetProtocolVersionMaxPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetProtocolVersionMax'); - late final _SSLGetProtocolVersionMax = _SSLGetProtocolVersionMaxPtr - .asFunction)>(); + @ffi.Uint64() + external int ri_user_time; - int SSLSetProtocolVersionEnabled( - SSLContextRef context, - int protocol, - int enable, - ) { - return _SSLSetProtocolVersionEnabled( - context, - protocol, - enable, - ); - } + @ffi.Uint64() + external int ri_system_time; - late final _SSLSetProtocolVersionEnabledPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Int32, - Boolean)>>('SSLSetProtocolVersionEnabled'); - late final _SSLSetProtocolVersionEnabled = _SSLSetProtocolVersionEnabledPtr - .asFunction(); + @ffi.Uint64() + external int ri_pkg_idle_wkups; - int SSLGetProtocolVersionEnabled( - SSLContextRef context, - int protocol, - ffi.Pointer enable, - ) { - return _SSLGetProtocolVersionEnabled( - context, - protocol, - enable, - ); - } + @ffi.Uint64() + external int ri_interrupt_wkups; - late final _SSLGetProtocolVersionEnabledPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Int32, - ffi.Pointer)>>('SSLGetProtocolVersionEnabled'); - late final _SSLGetProtocolVersionEnabled = _SSLGetProtocolVersionEnabledPtr - .asFunction)>(); + @ffi.Uint64() + external int ri_pageins; - int SSLSetProtocolVersion( - SSLContextRef context, - int version, - ) { - return _SSLSetProtocolVersion( - context, - version, - ); - } + @ffi.Uint64() + external int ri_wired_size; - late final _SSLSetProtocolVersionPtr = - _lookup>( - 'SSLSetProtocolVersion'); - late final _SSLSetProtocolVersion = - _SSLSetProtocolVersionPtr.asFunction(); + @ffi.Uint64() + external int ri_resident_size; - int SSLGetProtocolVersion( - SSLContextRef context, - ffi.Pointer protocol, - ) { - return _SSLGetProtocolVersion( - context, - protocol, - ); - } + @ffi.Uint64() + external int ri_phys_footprint; - late final _SSLGetProtocolVersionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetProtocolVersion'); - late final _SSLGetProtocolVersion = _SSLGetProtocolVersionPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_proc_start_abstime; - int SSLSetCertificate( - SSLContextRef context, - CFArrayRef certRefs, - ) { - return _SSLSetCertificate( - context, - certRefs, - ); - } + @ffi.Uint64() + external int ri_proc_exit_abstime; - late final _SSLSetCertificatePtr = - _lookup>( - 'SSLSetCertificate'); - late final _SSLSetCertificate = _SSLSetCertificatePtr.asFunction< - int Function(SSLContextRef, CFArrayRef)>(); + @ffi.Uint64() + external int ri_child_user_time; - int SSLSetConnection( - SSLContextRef context, - SSLConnectionRef connection, - ) { - return _SSLSetConnection( - context, - connection, - ); - } + @ffi.Uint64() + external int ri_child_system_time; - late final _SSLSetConnectionPtr = _lookup< - ffi - .NativeFunction>( - 'SSLSetConnection'); - late final _SSLSetConnection = _SSLSetConnectionPtr.asFunction< - int Function(SSLContextRef, SSLConnectionRef)>(); + @ffi.Uint64() + external int ri_child_pkg_idle_wkups; - int SSLGetConnection( - SSLContextRef context, - ffi.Pointer connection, - ) { - return _SSLGetConnection( - context, - connection, - ); - } + @ffi.Uint64() + external int ri_child_interrupt_wkups; - late final _SSLGetConnectionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetConnection'); - late final _SSLGetConnection = _SSLGetConnectionPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_child_pageins; - int SSLSetPeerDomainName( - SSLContextRef context, - ffi.Pointer peerName, - int peerNameLen, - ) { - return _SSLSetPeerDomainName( - context, - peerName, - peerNameLen, - ); - } + @ffi.Uint64() + external int ri_child_elapsed_abstime; - late final _SSLSetPeerDomainNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetPeerDomainName'); - late final _SSLSetPeerDomainName = _SSLSetPeerDomainNamePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer, int)>(); + @ffi.Uint64() + external int ri_diskio_bytesread; - int SSLGetPeerDomainNameLength( - SSLContextRef context, - ffi.Pointer peerNameLen, - ) { - return _SSLGetPeerDomainNameLength( - context, - peerNameLen, - ); - } + @ffi.Uint64() + external int ri_diskio_byteswritten; - late final _SSLGetPeerDomainNameLengthPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetPeerDomainNameLength'); - late final _SSLGetPeerDomainNameLength = _SSLGetPeerDomainNameLengthPtr - .asFunction)>(); + @ffi.Uint64() + external int ri_cpu_time_qos_default; - int SSLGetPeerDomainName( - SSLContextRef context, - ffi.Pointer peerName, - ffi.Pointer peerNameLen, - ) { - return _SSLGetPeerDomainName( - context, - peerName, - peerNameLen, - ); - } + @ffi.Uint64() + external int ri_cpu_time_qos_maintenance; - late final _SSLGetPeerDomainNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Pointer)>>('SSLGetPeerDomainName'); - late final _SSLGetPeerDomainName = _SSLGetPeerDomainNamePtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_cpu_time_qos_background; - int SSLCopyRequestedPeerNameLength( - SSLContextRef ctx, - ffi.Pointer peerNameLen, - ) { - return _SSLCopyRequestedPeerNameLength( - ctx, - peerNameLen, - ); - } + @ffi.Uint64() + external int ri_cpu_time_qos_utility; - late final _SSLCopyRequestedPeerNameLengthPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyRequestedPeerNameLength'); - late final _SSLCopyRequestedPeerNameLength = - _SSLCopyRequestedPeerNameLengthPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_cpu_time_qos_legacy; - int SSLCopyRequestedPeerName( - SSLContextRef context, - ffi.Pointer peerName, - ffi.Pointer peerNameLen, - ) { - return _SSLCopyRequestedPeerName( - context, - peerName, - peerNameLen, - ); - } + @ffi.Uint64() + external int ri_cpu_time_qos_user_initiated; - late final _SSLCopyRequestedPeerNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Pointer)>>('SSLCopyRequestedPeerName'); - late final _SSLCopyRequestedPeerName = - _SSLCopyRequestedPeerNamePtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_cpu_time_qos_user_interactive; - int SSLSetDatagramHelloCookie( - SSLContextRef dtlsContext, - ffi.Pointer cookie, - int cookieLen, - ) { - return _SSLSetDatagramHelloCookie( - dtlsContext, - cookie, - cookieLen, - ); - } + @ffi.Uint64() + external int ri_billed_system_time; - late final _SSLSetDatagramHelloCookiePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetDatagramHelloCookie'); - late final _SSLSetDatagramHelloCookie = _SSLSetDatagramHelloCookiePtr - .asFunction, int)>(); + @ffi.Uint64() + external int ri_serviced_system_time; - int SSLSetMaxDatagramRecordSize( - SSLContextRef dtlsContext, - int maxSize, - ) { - return _SSLSetMaxDatagramRecordSize( - dtlsContext, - maxSize, - ); - } + @ffi.Uint64() + external int ri_logical_writes; - late final _SSLSetMaxDatagramRecordSizePtr = - _lookup>( - 'SSLSetMaxDatagramRecordSize'); - late final _SSLSetMaxDatagramRecordSize = _SSLSetMaxDatagramRecordSizePtr - .asFunction(); + @ffi.Uint64() + external int ri_lifetime_max_phys_footprint; - int SSLGetMaxDatagramRecordSize( - SSLContextRef dtlsContext, - ffi.Pointer maxSize, - ) { - return _SSLGetMaxDatagramRecordSize( - dtlsContext, - maxSize, - ); - } + @ffi.Uint64() + external int ri_instructions; - late final _SSLGetMaxDatagramRecordSizePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetMaxDatagramRecordSize'); - late final _SSLGetMaxDatagramRecordSize = _SSLGetMaxDatagramRecordSizePtr - .asFunction)>(); + @ffi.Uint64() + external int ri_cycles; - int SSLGetNegotiatedProtocolVersion( - SSLContextRef context, - ffi.Pointer protocol, - ) { - return _SSLGetNegotiatedProtocolVersion( - context, - protocol, - ); - } + @ffi.Uint64() + external int ri_billed_energy; - late final _SSLGetNegotiatedProtocolVersionPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNegotiatedProtocolVersion'); - late final _SSLGetNegotiatedProtocolVersion = - _SSLGetNegotiatedProtocolVersionPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_serviced_energy; - int SSLGetNumberSupportedCiphers( - SSLContextRef context, - ffi.Pointer numCiphers, - ) { - return _SSLGetNumberSupportedCiphers( - context, - numCiphers, - ); - } + @ffi.Uint64() + external int ri_interval_max_phys_footprint; - late final _SSLGetNumberSupportedCiphersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNumberSupportedCiphers'); - late final _SSLGetNumberSupportedCiphers = _SSLGetNumberSupportedCiphersPtr - .asFunction)>(); + @ffi.Uint64() + external int ri_runnable_time; - int SSLGetSupportedCiphers( - SSLContextRef context, - ffi.Pointer ciphers, - ffi.Pointer numCiphers, - ) { - return _SSLGetSupportedCiphers( - context, - ciphers, - numCiphers, - ); - } + @ffi.Uint64() + external int ri_flags; - late final _SSLGetSupportedCiphersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Pointer)>>('SSLGetSupportedCiphers'); - late final _SSLGetSupportedCiphers = _SSLGetSupportedCiphersPtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_user_ptime; - int SSLGetNumberEnabledCiphers( - SSLContextRef context, - ffi.Pointer numCiphers, - ) { - return _SSLGetNumberEnabledCiphers( - context, - numCiphers, - ); - } + @ffi.Uint64() + external int ri_system_ptime; - late final _SSLGetNumberEnabledCiphersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNumberEnabledCiphers'); - late final _SSLGetNumberEnabledCiphers = _SSLGetNumberEnabledCiphersPtr - .asFunction)>(); + @ffi.Uint64() + external int ri_pinstructions; - int SSLSetEnabledCiphers( - SSLContextRef context, - ffi.Pointer ciphers, - int numCiphers, - ) { - return _SSLSetEnabledCiphers( - context, - ciphers, - numCiphers, - ); - } + @ffi.Uint64() + external int ri_pcycles; - late final _SSLSetEnabledCiphersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetEnabledCiphers'); - late final _SSLSetEnabledCiphers = _SSLSetEnabledCiphersPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer, int)>(); + @ffi.Uint64() + external int ri_energy_nj; - int SSLGetEnabledCiphers( - SSLContextRef context, - ffi.Pointer ciphers, - ffi.Pointer numCiphers, - ) { - return _SSLGetEnabledCiphers( - context, - ciphers, - numCiphers, - ); - } + @ffi.Uint64() + external int ri_penergy_nj; - late final _SSLGetEnabledCiphersPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Pointer)>>('SSLGetEnabledCiphers'); - late final _SSLGetEnabledCiphers = _SSLGetEnabledCiphersPtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, ffi.Pointer)>(); + @ffi.Uint64() + external int ri_secure_time_in_system; - int SSLSetSessionTicketsEnabled( - SSLContextRef context, - int enabled, - ) { - return _SSLSetSessionTicketsEnabled( - context, - enabled, - ); - } + @ffi.Uint64() + external int ri_secure_ptime_in_system; - late final _SSLSetSessionTicketsEnabledPtr = - _lookup>( - 'SSLSetSessionTicketsEnabled'); - late final _SSLSetSessionTicketsEnabled = _SSLSetSessionTicketsEnabledPtr - .asFunction(); + @ffi.Array.multi([12]) + external ffi.Array ri_reserved; +} - int SSLSetEnableCertVerify( - SSLContextRef context, - int enableVerify, - ) { - return _SSLSetEnableCertVerify( - context, - enableVerify, - ); - } +final class rlimit extends ffi.Struct { + @rlim_t() + external int rlim_cur; - late final _SSLSetEnableCertVerifyPtr = - _lookup>( - 'SSLSetEnableCertVerify'); - late final _SSLSetEnableCertVerify = - _SSLSetEnableCertVerifyPtr.asFunction(); + @rlim_t() + external int rlim_max; +} - int SSLGetEnableCertVerify( - SSLContextRef context, - ffi.Pointer enableVerify, - ) { - return _SSLGetEnableCertVerify( - context, - enableVerify, - ); - } +typedef rlim_t = __uint64_t; - late final _SSLGetEnableCertVerifyPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetEnableCertVerify'); - late final _SSLGetEnableCertVerify = _SSLGetEnableCertVerifyPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); +final class proc_rlimit_control_wakeupmon extends ffi.Struct { + @ffi.Uint32() + external int wm_flags; - int SSLSetAllowsExpiredCerts( - SSLContextRef context, - int allowsExpired, - ) { - return _SSLSetAllowsExpiredCerts( - context, - allowsExpired, - ); - } + @ffi.Int32() + external int wm_rate; +} - late final _SSLSetAllowsExpiredCertsPtr = - _lookup>( - 'SSLSetAllowsExpiredCerts'); - late final _SSLSetAllowsExpiredCerts = _SSLSetAllowsExpiredCertsPtr - .asFunction(); +typedef id_t = __darwin_id_t; +typedef __darwin_id_t = __uint32_t; - int SSLGetAllowsExpiredCerts( - SSLContextRef context, - ffi.Pointer allowsExpired, - ) { - return _SSLGetAllowsExpiredCerts( - context, - allowsExpired, - ); - } +@ffi.Packed(1) +final class _OSUnalignedU16 extends ffi.Struct { + @ffi.Uint16() + external int __val; +} - late final _SSLGetAllowsExpiredCertsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetAllowsExpiredCerts'); - late final _SSLGetAllowsExpiredCerts = _SSLGetAllowsExpiredCertsPtr - .asFunction)>(); +@ffi.Packed(1) +final class _OSUnalignedU32 extends ffi.Struct { + @ffi.Uint32() + external int __val; +} - int SSLSetAllowsExpiredRoots( - SSLContextRef context, - int allowsExpired, - ) { - return _SSLSetAllowsExpiredRoots( - context, - allowsExpired, - ); - } +@ffi.Packed(1) +final class _OSUnalignedU64 extends ffi.Struct { + @ffi.Uint64() + external int __val; +} - late final _SSLSetAllowsExpiredRootsPtr = - _lookup>( - 'SSLSetAllowsExpiredRoots'); - late final _SSLSetAllowsExpiredRoots = _SSLSetAllowsExpiredRootsPtr - .asFunction(); +final class wait extends ffi.Opaque {} - int SSLGetAllowsExpiredRoots( - SSLContextRef context, - ffi.Pointer allowsExpired, - ) { - return _SSLGetAllowsExpiredRoots( - context, - allowsExpired, - ); - } +enum idtype_t { + P_ALL(0), + P_PID(1), + P_PGID(2); - late final _SSLGetAllowsExpiredRootsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetAllowsExpiredRoots'); - late final _SSLGetAllowsExpiredRoots = _SSLGetAllowsExpiredRootsPtr - .asFunction)>(); + final int value; + const idtype_t(this.value); - int SSLSetAllowsAnyRoot( - SSLContextRef context, - int anyRoot, - ) { - return _SSLSetAllowsAnyRoot( - context, - anyRoot, - ); - } + static idtype_t fromValue(int value) => switch (value) { + 0 => P_ALL, + 1 => P_PID, + 2 => P_PGID, + _ => throw ArgumentError("Unknown value for idtype_t: $value"), + }; +} - late final _SSLSetAllowsAnyRootPtr = - _lookup>( - 'SSLSetAllowsAnyRoot'); - late final _SSLSetAllowsAnyRoot = - _SSLSetAllowsAnyRootPtr.asFunction(); +final class div_t extends ffi.Struct { + @ffi.Int() + external int quot; - int SSLGetAllowsAnyRoot( - SSLContextRef context, - ffi.Pointer anyRoot, - ) { - return _SSLGetAllowsAnyRoot( - context, - anyRoot, - ); - } + @ffi.Int() + external int rem; +} - late final _SSLGetAllowsAnyRootPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetAllowsAnyRoot'); - late final _SSLGetAllowsAnyRoot = _SSLGetAllowsAnyRootPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); +final class ldiv_t extends ffi.Struct { + @ffi.Long() + external int quot; - int SSLSetTrustedRoots( - SSLContextRef context, - CFArrayRef trustedRoots, - int replaceExisting, - ) { - return _SSLSetTrustedRoots( - context, - trustedRoots, - replaceExisting, - ); - } + @ffi.Long() + external int rem; +} - late final _SSLSetTrustedRootsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, CFArrayRef, Boolean)>>('SSLSetTrustedRoots'); - late final _SSLSetTrustedRoots = _SSLSetTrustedRootsPtr.asFunction< - int Function(SSLContextRef, CFArrayRef, int)>(); +final class lldiv_t extends ffi.Struct { + @ffi.LongLong() + external int quot; - int SSLCopyTrustedRoots( - SSLContextRef context, - ffi.Pointer trustedRoots, - ) { - return _SSLCopyTrustedRoots( - context, - trustedRoots, - ); - } + @ffi.LongLong() + external int rem; +} - late final _SSLCopyTrustedRootsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLCopyTrustedRoots'); - late final _SSLCopyTrustedRoots = _SSLCopyTrustedRootsPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); +typedef malloc_type_id_t = ffi.UnsignedLongLong; +typedef Dartmalloc_type_id_t = int; - int SSLCopyPeerCertificates( - SSLContextRef context, - ffi.Pointer certs, - ) { - return _SSLCopyPeerCertificates( - context, - certs, - ); - } +final class _malloc_zone_t extends ffi.Opaque {} - late final _SSLCopyPeerCertificatesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyPeerCertificates'); - late final _SSLCopyPeerCertificates = _SSLCopyPeerCertificatesPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); +typedef malloc_zone_t = _malloc_zone_t; +void _ObjCBlock_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, +) => + block.ref.target + .cast>() + .asFunction()(); +ffi.Pointer _ObjCBlock_ffiVoid_fnPtrCallable = ffi.Pointer + .fromFunction)>( + _ObjCBlock_ffiVoid_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_closureTrampoline( + ffi.Pointer block, +) => + (objc.getBlockClosure(block) as void Function())(); +ffi.Pointer _ObjCBlock_ffiVoid_closureCallable = ffi.Pointer + .fromFunction)>( + _ObjCBlock_ffiVoid_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_listenerTrampoline( + ffi.Pointer block, +) { + (objc.getBlockClosure(block) as void Function())(); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable)> + _ObjCBlock_ffiVoid_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - int SSLCopyPeerTrust( - SSLContextRef context, - ffi.Pointer trust, - ) { - return _SSLCopyPeerTrust( - context, - trust, - ); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - late final _SSLCopyPeerTrustPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLCopyPeerTrust'); - late final _SSLCopyPeerTrust = _SSLCopyPeerTrustPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction(void Function() fn) => + objc.ObjCBlock( + objc.newClosureBlock(_ObjCBlock_ffiVoid_closureCallable, () => fn()), + retain: false, + release: true); - int SSLSetPeerID( - SSLContextRef context, - ffi.Pointer peerID, - int peerIDLen, - ) { - return _SSLSetPeerID( - context, - peerID, - peerIDLen, - ); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener(void Function() fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_listenerCallable.nativeFunction.cast(), () => fn()); + final wrapper = _wrapListenerBlock_ksby9f(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } +} - late final _SSLSetPeerIDPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer, ffi.Size)>>('SSLSetPeerID'); - late final _SSLSetPeerID = _SSLSetPeerIDPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer, int)>(); - - int SSLGetPeerID( - SSLContextRef context, - ffi.Pointer> peerID, - ffi.Pointer peerIDLen, - ) { - return _SSLGetPeerID( - context, - peerID, - peerIDLen, - ); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_CallExtension + on objc.ObjCBlock { + void call() => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block)>>() + .asFunction)>()( + ref.pointer, + ); +} - late final _SSLGetPeerIDPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer>, - ffi.Pointer)>>('SSLGetPeerID'); - late final _SSLGetPeerID = _SSLGetPeerIDPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer>, - ffi.Pointer)>(); - - int SSLGetNegotiatedCipher( - SSLContextRef context, - ffi.Pointer cipherSuite, - ) { - return _SSLGetNegotiatedCipher( - context, - cipherSuite, - ); - } - - late final _SSLGetNegotiatedCipherPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetNegotiatedCipher'); - late final _SSLGetNegotiatedCipher = _SSLGetNegotiatedCipherPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); - - int SSLSetALPNProtocols( - SSLContextRef context, - CFArrayRef protocols, - ) { - return _SSLSetALPNProtocols( - context, - protocols, - ); - } - - late final _SSLSetALPNProtocolsPtr = - _lookup>( - 'SSLSetALPNProtocols'); - late final _SSLSetALPNProtocols = _SSLSetALPNProtocolsPtr.asFunction< - int Function(SSLContextRef, CFArrayRef)>(); - - int SSLCopyALPNProtocols( - SSLContextRef context, - ffi.Pointer protocols, - ) { - return _SSLCopyALPNProtocols( - context, - protocols, - ); - } - - late final _SSLCopyALPNProtocolsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLCopyALPNProtocols'); - late final _SSLCopyALPNProtocols = _SSLCopyALPNProtocolsPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); - - int SSLSetOCSPResponse( - SSLContextRef context, - CFDataRef response, - ) { - return _SSLSetOCSPResponse( - context, - response, - ); - } - - late final _SSLSetOCSPResponsePtr = - _lookup>( - 'SSLSetOCSPResponse'); - late final _SSLSetOCSPResponse = _SSLSetOCSPResponsePtr.asFunction< - int Function(SSLContextRef, CFDataRef)>(); - - int SSLSetEncryptionCertificate( - SSLContextRef context, - CFArrayRef certRefs, - ) { - return _SSLSetEncryptionCertificate( - context, - certRefs, - ); - } - - late final _SSLSetEncryptionCertificatePtr = - _lookup>( - 'SSLSetEncryptionCertificate'); - late final _SSLSetEncryptionCertificate = _SSLSetEncryptionCertificatePtr - .asFunction(); - - int SSLSetClientSideAuthenticate( - SSLContextRef context, - int auth, - ) { - return _SSLSetClientSideAuthenticate( - context, - auth, - ); - } - - late final _SSLSetClientSideAuthenticatePtr = - _lookup>( - 'SSLSetClientSideAuthenticate'); - late final _SSLSetClientSideAuthenticate = _SSLSetClientSideAuthenticatePtr - .asFunction(); - - int SSLAddDistinguishedName( - SSLContextRef context, - ffi.Pointer derDN, - int derDNLen, - ) { - return _SSLAddDistinguishedName( - context, - derDN, - derDNLen, - ); - } - - late final _SSLAddDistinguishedNamePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLAddDistinguishedName'); - late final _SSLAddDistinguishedName = _SSLAddDistinguishedNamePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer, int)>(); - - int SSLSetCertificateAuthorities( - SSLContextRef context, - CFTypeRef certificateOrArray, - int replaceExisting, - ) { - return _SSLSetCertificateAuthorities( - context, - certificateOrArray, - replaceExisting, - ); - } - - late final _SSLSetCertificateAuthoritiesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, CFTypeRef, - Boolean)>>('SSLSetCertificateAuthorities'); - late final _SSLSetCertificateAuthorities = _SSLSetCertificateAuthoritiesPtr - .asFunction(); - - int SSLCopyCertificateAuthorities( - SSLContextRef context, - ffi.Pointer certificates, - ) { - return _SSLCopyCertificateAuthorities( - context, - certificates, - ); - } - - late final _SSLCopyCertificateAuthoritiesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyCertificateAuthorities'); - late final _SSLCopyCertificateAuthorities = _SSLCopyCertificateAuthoritiesPtr - .asFunction)>(); - - int SSLCopyDistinguishedNames( - SSLContextRef context, - ffi.Pointer names, - ) { - return _SSLCopyDistinguishedNames( - context, - names, - ); - } - - late final _SSLCopyDistinguishedNamesPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLCopyDistinguishedNames'); - late final _SSLCopyDistinguishedNames = _SSLCopyDistinguishedNamesPtr - .asFunction)>(); - - int SSLGetClientCertificateState( - SSLContextRef context, - ffi.Pointer clientState, - ) { - return _SSLGetClientCertificateState( - context, - clientState, - ); - } - - late final _SSLGetClientCertificateStatePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetClientCertificateState'); - late final _SSLGetClientCertificateState = _SSLGetClientCertificateStatePtr - .asFunction)>(); - - int SSLSetDiffieHellmanParams( - SSLContextRef context, - ffi.Pointer dhParams, - int dhParamsLen, - ) { - return _SSLSetDiffieHellmanParams( - context, - dhParams, - dhParamsLen, - ); - } - - late final _SSLSetDiffieHellmanParamsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, - ffi.Size)>>('SSLSetDiffieHellmanParams'); - late final _SSLSetDiffieHellmanParams = _SSLSetDiffieHellmanParamsPtr - .asFunction, int)>(); - - int SSLGetDiffieHellmanParams( - SSLContextRef context, - ffi.Pointer> dhParams, - ffi.Pointer dhParamsLen, - ) { - return _SSLGetDiffieHellmanParams( - context, - dhParams, - dhParamsLen, - ); - } - - late final _SSLGetDiffieHellmanParamsPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer>, - ffi.Pointer)>>('SSLGetDiffieHellmanParams'); - late final _SSLGetDiffieHellmanParams = - _SSLGetDiffieHellmanParamsPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer>, - ffi.Pointer)>(); - - int SSLSetRsaBlinding( - SSLContextRef context, - int blinding, - ) { - return _SSLSetRsaBlinding( - context, - blinding, - ); - } - - late final _SSLSetRsaBlindingPtr = - _lookup>( - 'SSLSetRsaBlinding'); - late final _SSLSetRsaBlinding = - _SSLSetRsaBlindingPtr.asFunction(); - - int SSLGetRsaBlinding( - SSLContextRef context, - ffi.Pointer blinding, - ) { - return _SSLGetRsaBlinding( - context, - blinding, - ); - } - - late final _SSLGetRsaBlindingPtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetRsaBlinding'); - late final _SSLGetRsaBlinding = _SSLGetRsaBlindingPtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); - - int SSLHandshake( - SSLContextRef context, - ) { - return _SSLHandshake( - context, - ); - } - - late final _SSLHandshakePtr = - _lookup>( - 'SSLHandshake'); - late final _SSLHandshake = - _SSLHandshakePtr.asFunction(); - - int SSLReHandshake( - SSLContextRef context, - ) { - return _SSLReHandshake( - context, - ); - } - - late final _SSLReHandshakePtr = - _lookup>( - 'SSLReHandshake'); - late final _SSLReHandshake = - _SSLReHandshakePtr.asFunction(); - - int SSLWrite( - SSLContextRef context, - ffi.Pointer data, - int dataLength, - ffi.Pointer processed, - ) { - return _SSLWrite( - context, - data, - dataLength, - processed, - ); - } - - late final _SSLWritePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, - ffi.Pointer)>>('SSLWrite'); - late final _SSLWrite = _SSLWritePtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); - - int SSLRead( - SSLContextRef context, - ffi.Pointer data, - int dataLength, - ffi.Pointer processed, - ) { - return _SSLRead( - context, - data, - dataLength, - processed, - ); - } - - late final _SSLReadPtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, ffi.Pointer, ffi.Size, - ffi.Pointer)>>('SSLRead'); - late final _SSLRead = _SSLReadPtr.asFunction< - int Function( - SSLContextRef, ffi.Pointer, int, ffi.Pointer)>(); - - int SSLGetBufferedReadSize( - SSLContextRef context, - ffi.Pointer bufferSize, - ) { - return _SSLGetBufferedReadSize( - context, - bufferSize, - ); - } - - late final _SSLGetBufferedReadSizePtr = _lookup< - ffi.NativeFunction< - OSStatus Function( - SSLContextRef, ffi.Pointer)>>('SSLGetBufferedReadSize'); - late final _SSLGetBufferedReadSize = _SSLGetBufferedReadSizePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); - - int SSLGetDatagramWriteSize( - SSLContextRef dtlsContext, - ffi.Pointer bufSize, - ) { - return _SSLGetDatagramWriteSize( - dtlsContext, - bufSize, - ); - } - - late final _SSLGetDatagramWriteSizePtr = _lookup< - ffi.NativeFunction< - OSStatus Function(SSLContextRef, - ffi.Pointer)>>('SSLGetDatagramWriteSize'); - late final _SSLGetDatagramWriteSize = _SSLGetDatagramWriteSizePtr.asFunction< - int Function(SSLContextRef, ffi.Pointer)>(); - - int SSLClose( - SSLContextRef context, - ) { - return _SSLClose( - context, - ); - } - - late final _SSLClosePtr = - _lookup>('SSLClose'); - late final _SSLClose = _SSLClosePtr.asFunction(); - - int SSLSetError( - SSLContextRef context, - int status, - ) { - return _SSLSetError( - context, - status, - ); - } - - late final _SSLSetErrorPtr = - _lookup>( - 'SSLSetError'); - late final _SSLSetError = - _SSLSetErrorPtr.asFunction(); - - /// -1LL - late final ffi.Pointer _NSURLSessionTransferSizeUnknown = - _lookup('NSURLSessionTransferSizeUnknown'); - - int get NSURLSessionTransferSizeUnknown => - _NSURLSessionTransferSizeUnknown.value; - - late final _class_NSURLSession1 = _getClass1("NSURLSession"); - late final _sel_sharedSession1 = _registerName1("sharedSession"); - ffi.Pointer _objc_msgSend_438( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_438( - obj, - sel, - ); - } - - late final __objc_msgSend_438Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_438 = __objc_msgSend_438Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionConfiguration1 = - _getClass1("NSURLSessionConfiguration"); - late final _sel_defaultSessionConfiguration1 = - _registerName1("defaultSessionConfiguration"); - ffi.Pointer _objc_msgSend_439( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_439( - obj, - sel, - ); - } - - late final __objc_msgSend_439Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_439 = __objc_msgSend_439Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_ephemeralSessionConfiguration1 = - _registerName1("ephemeralSessionConfiguration"); - late final _sel_backgroundSessionConfigurationWithIdentifier_1 = - _registerName1("backgroundSessionConfigurationWithIdentifier:"); - ffi.Pointer _objc_msgSend_440( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer identifier, - ) { - return __objc_msgSend_440( - obj, - sel, - identifier, - ); - } - - late final __objc_msgSend_440Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_440 = __objc_msgSend_440Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_identifier1 = _registerName1("identifier"); - late final _sel_requestCachePolicy1 = _registerName1("requestCachePolicy"); - late final _sel_setRequestCachePolicy_1 = - _registerName1("setRequestCachePolicy:"); - late final _sel_timeoutIntervalForRequest1 = - _registerName1("timeoutIntervalForRequest"); - late final _sel_setTimeoutIntervalForRequest_1 = - _registerName1("setTimeoutIntervalForRequest:"); - late final _sel_timeoutIntervalForResource1 = - _registerName1("timeoutIntervalForResource"); - late final _sel_setTimeoutIntervalForResource_1 = - _registerName1("setTimeoutIntervalForResource:"); - late final _sel_waitsForConnectivity1 = - _registerName1("waitsForConnectivity"); - late final _sel_setWaitsForConnectivity_1 = - _registerName1("setWaitsForConnectivity:"); - late final _sel_isDiscretionary1 = _registerName1("isDiscretionary"); - late final _sel_setDiscretionary_1 = _registerName1("setDiscretionary:"); - late final _sel_sharedContainerIdentifier1 = - _registerName1("sharedContainerIdentifier"); - late final _sel_setSharedContainerIdentifier_1 = - _registerName1("setSharedContainerIdentifier:"); - late final _sel_sessionSendsLaunchEvents1 = - _registerName1("sessionSendsLaunchEvents"); - late final _sel_setSessionSendsLaunchEvents_1 = - _registerName1("setSessionSendsLaunchEvents:"); - late final _sel_connectionProxyDictionary1 = - _registerName1("connectionProxyDictionary"); - late final _sel_setConnectionProxyDictionary_1 = - _registerName1("setConnectionProxyDictionary:"); - late final _sel_TLSMinimumSupportedProtocol1 = - _registerName1("TLSMinimumSupportedProtocol"); - int _objc_msgSend_441( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_441( - obj, - sel, - ); - } - - late final __objc_msgSend_441Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_441 = __objc_msgSend_441Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setTLSMinimumSupportedProtocol_1 = - _registerName1("setTLSMinimumSupportedProtocol:"); - void _objc_msgSend_442( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_442( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_442Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_442 = __objc_msgSend_442Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_TLSMaximumSupportedProtocol1 = - _registerName1("TLSMaximumSupportedProtocol"); - late final _sel_setTLSMaximumSupportedProtocol_1 = - _registerName1("setTLSMaximumSupportedProtocol:"); - late final _sel_TLSMinimumSupportedProtocolVersion1 = - _registerName1("TLSMinimumSupportedProtocolVersion"); - int _objc_msgSend_443( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_443( - obj, - sel, - ); - } - - late final __objc_msgSend_443Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_443 = __objc_msgSend_443Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setTLSMinimumSupportedProtocolVersion_1 = - _registerName1("setTLSMinimumSupportedProtocolVersion:"); - void _objc_msgSend_444( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_444( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_444Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_444 = __objc_msgSend_444Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_TLSMaximumSupportedProtocolVersion1 = - _registerName1("TLSMaximumSupportedProtocolVersion"); - late final _sel_setTLSMaximumSupportedProtocolVersion_1 = - _registerName1("setTLSMaximumSupportedProtocolVersion:"); - late final _sel_HTTPShouldSetCookies1 = - _registerName1("HTTPShouldSetCookies"); - late final _sel_setHTTPShouldSetCookies_1 = - _registerName1("setHTTPShouldSetCookies:"); - late final _sel_HTTPCookieAcceptPolicy1 = - _registerName1("HTTPCookieAcceptPolicy"); - late final _sel_setHTTPCookieAcceptPolicy_1 = - _registerName1("setHTTPCookieAcceptPolicy:"); - late final _sel_HTTPAdditionalHeaders1 = - _registerName1("HTTPAdditionalHeaders"); - late final _sel_setHTTPAdditionalHeaders_1 = - _registerName1("setHTTPAdditionalHeaders:"); - late final _sel_HTTPMaximumConnectionsPerHost1 = - _registerName1("HTTPMaximumConnectionsPerHost"); - late final _sel_setHTTPMaximumConnectionsPerHost_1 = - _registerName1("setHTTPMaximumConnectionsPerHost:"); - late final _sel_HTTPCookieStorage1 = _registerName1("HTTPCookieStorage"); - ffi.Pointer _objc_msgSend_445( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_445( - obj, - sel, - ); - } - - late final __objc_msgSend_445Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_445 = __objc_msgSend_445Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setHTTPCookieStorage_1 = - _registerName1("setHTTPCookieStorage:"); - void _objc_msgSend_446( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_446( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_446Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_446 = __objc_msgSend_446Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _class_NSURLCredentialStorage1 = - _getClass1("NSURLCredentialStorage"); - late final _sel_URLCredentialStorage1 = - _registerName1("URLCredentialStorage"); - ffi.Pointer _objc_msgSend_447( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_447( - obj, - sel, - ); - } - - late final __objc_msgSend_447Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_447 = __objc_msgSend_447Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setURLCredentialStorage_1 = - _registerName1("setURLCredentialStorage:"); - void _objc_msgSend_448( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_448( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_448Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_448 = __objc_msgSend_448Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_URLCache1 = _registerName1("URLCache"); - ffi.Pointer _objc_msgSend_449( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_449( - obj, - sel, - ); - } - - late final __objc_msgSend_449Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_449 = __objc_msgSend_449Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setURLCache_1 = _registerName1("setURLCache:"); - void _objc_msgSend_450( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_450( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_450Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_450 = __objc_msgSend_450Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_shouldUseExtendedBackgroundIdleMode1 = - _registerName1("shouldUseExtendedBackgroundIdleMode"); - late final _sel_setShouldUseExtendedBackgroundIdleMode_1 = - _registerName1("setShouldUseExtendedBackgroundIdleMode:"); - late final _sel_protocolClasses1 = _registerName1("protocolClasses"); - late final _sel_setProtocolClasses_1 = _registerName1("setProtocolClasses:"); - void _objc_msgSend_451( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer value, - ) { - return __objc_msgSend_451( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_451Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_451 = __objc_msgSend_451Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_multipathServiceType1 = - _registerName1("multipathServiceType"); - int _objc_msgSend_452( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_452( - obj, - sel, - ); - } - - late final __objc_msgSend_452Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_452 = __objc_msgSend_452Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setMultipathServiceType_1 = - _registerName1("setMultipathServiceType:"); - void _objc_msgSend_453( - ffi.Pointer obj, - ffi.Pointer sel, - int value, - ) { - return __objc_msgSend_453( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_453Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_453 = __objc_msgSend_453Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_backgroundSessionConfiguration_1 = - _registerName1("backgroundSessionConfiguration:"); - late final _sel_sessionWithConfiguration_1 = - _registerName1("sessionWithConfiguration:"); - ffi.Pointer _objc_msgSend_454( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer configuration, - ) { - return __objc_msgSend_454( - obj, - sel, - configuration, - ); - } - - late final __objc_msgSend_454Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_454 = __objc_msgSend_454Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_sessionWithConfiguration_delegate_delegateQueue_1 = - _registerName1("sessionWithConfiguration:delegate:delegateQueue:"); - ffi.Pointer _objc_msgSend_455( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer configuration, - ffi.Pointer delegate, - ffi.Pointer queue, - ) { - return __objc_msgSend_455( - obj, - sel, - configuration, - delegate, - queue, - ); - } - - late final __objc_msgSend_455Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_455 = __objc_msgSend_455Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_delegateQueue1 = _registerName1("delegateQueue"); - late final _sel_configuration1 = _registerName1("configuration"); - late final _sel_sessionDescription1 = _registerName1("sessionDescription"); - late final _sel_setSessionDescription_1 = - _registerName1("setSessionDescription:"); - late final _sel_finishTasksAndInvalidate1 = - _registerName1("finishTasksAndInvalidate"); - late final _sel_invalidateAndCancel1 = _registerName1("invalidateAndCancel"); - late final _sel_resetWithCompletionHandler_1 = - _registerName1("resetWithCompletionHandler:"); - late final _sel_flushWithCompletionHandler_1 = - _registerName1("flushWithCompletionHandler:"); - late final _sel_getTasksWithCompletionHandler_1 = - _registerName1("getTasksWithCompletionHandler:"); - void _objc_msgSend_456( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_456( - obj, - sel, - completionHandler, - ); - } - - late final __objc_msgSend_456Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_456 = __objc_msgSend_456Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_getAllTasksWithCompletionHandler_1 = - _registerName1("getAllTasksWithCompletionHandler:"); - void _objc_msgSend_457( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_457( - obj, - sel, - completionHandler, - ); - } - - late final __objc_msgSend_457Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_457 = __objc_msgSend_457Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_dataTaskWithRequest_1 = - _registerName1("dataTaskWithRequest:"); - ffi.Pointer _objc_msgSend_458( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_458( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_458Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_458 = __objc_msgSend_458Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dataTaskWithURL_1 = _registerName1("dataTaskWithURL:"); - ffi.Pointer _objc_msgSend_459( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_459( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_459Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_459 = __objc_msgSend_459Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionUploadTask1 = - _getClass1("NSURLSessionUploadTask"); - late final _sel_cancelByProducingResumeData_1 = - _registerName1("cancelByProducingResumeData:"); - void _objc_msgSend_460( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_460( - obj, - sel, - completionHandler, - ); - } - - late final __objc_msgSend_460Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_460 = __objc_msgSend_460Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_uploadTaskWithRequest_fromFile_1 = - _registerName1("uploadTaskWithRequest:fromFile:"); - ffi.Pointer _objc_msgSend_461( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer fileURL, - ) { - return __objc_msgSend_461( - obj, - sel, - request, - fileURL, - ); - } - - late final __objc_msgSend_461Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_461 = __objc_msgSend_461Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_uploadTaskWithRequest_fromData_1 = - _registerName1("uploadTaskWithRequest:fromData:"); - ffi.Pointer _objc_msgSend_462( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer bodyData, - ) { - return __objc_msgSend_462( - obj, - sel, - request, - bodyData, - ); - } - - late final __objc_msgSend_462Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_462 = __objc_msgSend_462Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_uploadTaskWithResumeData_1 = - _registerName1("uploadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_463( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ) { - return __objc_msgSend_463( - obj, - sel, - resumeData, - ); - } - - late final __objc_msgSend_463Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_463 = __objc_msgSend_463Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_uploadTaskWithStreamedRequest_1 = - _registerName1("uploadTaskWithStreamedRequest:"); - ffi.Pointer _objc_msgSend_464( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_464( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_464Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_464 = __objc_msgSend_464Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionDownloadTask1 = - _getClass1("NSURLSessionDownloadTask"); - late final _sel_downloadTaskWithRequest_1 = - _registerName1("downloadTaskWithRequest:"); - ffi.Pointer _objc_msgSend_465( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_465( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_465Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_465 = __objc_msgSend_465Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_downloadTaskWithURL_1 = - _registerName1("downloadTaskWithURL:"); - ffi.Pointer _objc_msgSend_466( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_466( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_466Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_466 = __objc_msgSend_466Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_downloadTaskWithResumeData_1 = - _registerName1("downloadTaskWithResumeData:"); - ffi.Pointer _objc_msgSend_467( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ) { - return __objc_msgSend_467( - obj, - sel, - resumeData, - ); - } - - late final __objc_msgSend_467Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_467 = __objc_msgSend_467Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionStreamTask1 = - _getClass1("NSURLSessionStreamTask"); - late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_1 = - _registerName1( - "readDataOfMinLength:maxLength:timeout:completionHandler:"); - void _objc_msgSend_468( - ffi.Pointer obj, - ffi.Pointer sel, - int minBytes, - int maxBytes, - double timeout, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_468( - obj, - sel, - minBytes, - maxBytes, - timeout, - completionHandler, - ); - } - - late final __objc_msgSend_468Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSUInteger, - NSTimeInterval, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_468 = __objc_msgSend_468Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, int, - double, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_writeData_timeout_completionHandler_1 = - _registerName1("writeData:timeout:completionHandler:"); - void _objc_msgSend_469( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - double timeout, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_469( - obj, - sel, - data, - timeout, - completionHandler, - ); - } - - late final __objc_msgSend_469Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSTimeInterval, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_469 = __objc_msgSend_469Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, double, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_captureStreams1 = _registerName1("captureStreams"); - late final _sel_closeWrite1 = _registerName1("closeWrite"); - late final _sel_closeRead1 = _registerName1("closeRead"); - late final _sel_startSecureConnection1 = - _registerName1("startSecureConnection"); - late final _sel_stopSecureConnection1 = - _registerName1("stopSecureConnection"); - late final _sel_streamTaskWithHostName_port_1 = - _registerName1("streamTaskWithHostName:port:"); - ffi.Pointer _objc_msgSend_470( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer hostname, - int port, - ) { - return __objc_msgSend_470( - obj, - sel, - hostname, - port, - ); - } - - late final __objc_msgSend_470Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_470 = __objc_msgSend_470Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - - late final _class_NSNetService1 = _getClass1("NSNetService"); - late final _sel_streamTaskWithNetService_1 = - _registerName1("streamTaskWithNetService:"); - ffi.Pointer _objc_msgSend_471( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer service, - ) { - return __objc_msgSend_471( - obj, - sel, - service, - ); - } - - late final __objc_msgSend_471Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_471 = __objc_msgSend_471Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionWebSocketTask1 = - _getClass1("NSURLSessionWebSocketTask"); - late final _class_NSURLSessionWebSocketMessage1 = - _getClass1("NSURLSessionWebSocketMessage"); - late final _sel_type1 = _registerName1("type"); - int _objc_msgSend_472( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_472( - obj, - sel, - ); - } - - late final __objc_msgSend_472Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_472 = __objc_msgSend_472Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_sendMessage_completionHandler_1 = - _registerName1("sendMessage:completionHandler:"); - void _objc_msgSend_473( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer message, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_473( - obj, - sel, - message, - completionHandler, - ); - } - - late final __objc_msgSend_473Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_473 = __objc_msgSend_473Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_receiveMessageWithCompletionHandler_1 = - _registerName1("receiveMessageWithCompletionHandler:"); - void _objc_msgSend_474( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_474( - obj, - sel, - completionHandler, - ); - } - - late final __objc_msgSend_474Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_474 = __objc_msgSend_474Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_sendPingWithPongReceiveHandler_1 = - _registerName1("sendPingWithPongReceiveHandler:"); - void _objc_msgSend_475( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> pongReceiveHandler, - ) { - return __objc_msgSend_475( - obj, - sel, - pongReceiveHandler, - ); - } - - late final __objc_msgSend_475Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_475 = __objc_msgSend_475Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_cancelWithCloseCode_reason_1 = - _registerName1("cancelWithCloseCode:reason:"); - void _objc_msgSend_476( - ffi.Pointer obj, - ffi.Pointer sel, - int closeCode, - ffi.Pointer reason, - ) { - return __objc_msgSend_476( - obj, - sel, - closeCode, - reason, - ); - } - - late final __objc_msgSend_476Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_476 = __objc_msgSend_476Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); - - late final _sel_maximumMessageSize1 = _registerName1("maximumMessageSize"); - late final _sel_setMaximumMessageSize_1 = - _registerName1("setMaximumMessageSize:"); - late final _sel_closeCode1 = _registerName1("closeCode"); - int _objc_msgSend_477( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_477( - obj, - sel, - ); - } - - late final __objc_msgSend_477Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_477 = __objc_msgSend_477Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_closeReason1 = _registerName1("closeReason"); - late final _sel_webSocketTaskWithURL_1 = - _registerName1("webSocketTaskWithURL:"); - ffi.Pointer _objc_msgSend_478( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ) { - return __objc_msgSend_478( - obj, - sel, - url, - ); - } - - late final __objc_msgSend_478Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_478 = __objc_msgSend_478Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_webSocketTaskWithURL_protocols_1 = - _registerName1("webSocketTaskWithURL:protocols:"); - ffi.Pointer _objc_msgSend_479( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer protocols, - ) { - return __objc_msgSend_479( - obj, - sel, - url, - protocols, - ); - } - - late final __objc_msgSend_479Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_479 = __objc_msgSend_479Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_webSocketTaskWithRequest_1 = - _registerName1("webSocketTaskWithRequest:"); - ffi.Pointer _objc_msgSend_480( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_480( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_480Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_480 = __objc_msgSend_480Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_dataTaskWithRequest_completionHandler_1 = - _registerName1("dataTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_481( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_481( - obj, - sel, - request, - completionHandler, - ); - } - - late final __objc_msgSend_481Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_481 = __objc_msgSend_481Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_dataTaskWithURL_completionHandler_1 = - _registerName1("dataTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_482( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_482( - obj, - sel, - url, - completionHandler, - ); - } - - late final __objc_msgSend_482Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_482 = __objc_msgSend_482Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_uploadTaskWithRequest_fromFile_completionHandler_1 = - _registerName1("uploadTaskWithRequest:fromFile:completionHandler:"); - ffi.Pointer _objc_msgSend_483( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer fileURL, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_483( - obj, - sel, - request, - fileURL, - completionHandler, - ); - } - - late final __objc_msgSend_483Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_483 = __objc_msgSend_483Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_uploadTaskWithRequest_fromData_completionHandler_1 = - _registerName1("uploadTaskWithRequest:fromData:completionHandler:"); - ffi.Pointer _objc_msgSend_484( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer bodyData, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_484( - obj, - sel, - request, - bodyData, - completionHandler, - ); - } - - late final __objc_msgSend_484Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_484 = __objc_msgSend_484Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_uploadTaskWithResumeData_completionHandler_1 = - _registerName1("uploadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_485( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_485( - obj, - sel, - resumeData, - completionHandler, - ); - } - - late final __objc_msgSend_485Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_485 = __objc_msgSend_485Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_downloadTaskWithRequest_completionHandler_1 = - _registerName1("downloadTaskWithRequest:completionHandler:"); - ffi.Pointer _objc_msgSend_486( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_486( - obj, - sel, - request, - completionHandler, - ); - } - - late final __objc_msgSend_486Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_486 = __objc_msgSend_486Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_downloadTaskWithURL_completionHandler_1 = - _registerName1("downloadTaskWithURL:completionHandler:"); - ffi.Pointer _objc_msgSend_487( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_487( - obj, - sel, - url, - completionHandler, - ); - } - - late final __objc_msgSend_487Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_487 = __objc_msgSend_487Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_downloadTaskWithResumeData_completionHandler_1 = - _registerName1("downloadTaskWithResumeData:completionHandler:"); - ffi.Pointer _objc_msgSend_488( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer resumeData, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_488( - obj, - sel, - resumeData, - completionHandler, - ); - } - - late final __objc_msgSend_488Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_488 = __objc_msgSend_488Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final ffi.Pointer _NSURLSessionTaskPriorityDefault = - _lookup('NSURLSessionTaskPriorityDefault'); - - double get NSURLSessionTaskPriorityDefault => - _NSURLSessionTaskPriorityDefault.value; - - late final ffi.Pointer _NSURLSessionTaskPriorityLow = - _lookup('NSURLSessionTaskPriorityLow'); - - double get NSURLSessionTaskPriorityLow => _NSURLSessionTaskPriorityLow.value; - - late final ffi.Pointer _NSURLSessionTaskPriorityHigh = - _lookup('NSURLSessionTaskPriorityHigh'); - - double get NSURLSessionTaskPriorityHigh => - _NSURLSessionTaskPriorityHigh.value; - - /// Key in the userInfo dictionary of an NSError received during a failed download. - late final ffi.Pointer> - _NSURLSessionDownloadTaskResumeData = - _lookup>('NSURLSessionDownloadTaskResumeData'); - - ffi.Pointer get NSURLSessionDownloadTaskResumeData => - _NSURLSessionDownloadTaskResumeData.value; - - set NSURLSessionDownloadTaskResumeData(ffi.Pointer value) => - _NSURLSessionDownloadTaskResumeData.value = value; - - /// Key in the userInfo dictionary of an NSError received during a failed upload. - late final ffi.Pointer> - _NSURLSessionUploadTaskResumeData = - _lookup>('NSURLSessionUploadTaskResumeData'); - - ffi.Pointer get NSURLSessionUploadTaskResumeData => - _NSURLSessionUploadTaskResumeData.value; - - set NSURLSessionUploadTaskResumeData(ffi.Pointer value) => - _NSURLSessionUploadTaskResumeData.value = value; - - late final _class_NSURLSessionTaskTransactionMetrics1 = - _getClass1("NSURLSessionTaskTransactionMetrics"); - late final _sel_request1 = _registerName1("request"); - ffi.Pointer _objc_msgSend_489( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_489( - obj, - sel, - ); - } - - late final __objc_msgSend_489Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_489 = __objc_msgSend_489Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_fetchStartDate1 = _registerName1("fetchStartDate"); - late final _sel_domainLookupStartDate1 = - _registerName1("domainLookupStartDate"); - late final _sel_domainLookupEndDate1 = _registerName1("domainLookupEndDate"); - late final _sel_connectStartDate1 = _registerName1("connectStartDate"); - late final _sel_secureConnectionStartDate1 = - _registerName1("secureConnectionStartDate"); - late final _sel_secureConnectionEndDate1 = - _registerName1("secureConnectionEndDate"); - late final _sel_connectEndDate1 = _registerName1("connectEndDate"); - late final _sel_requestStartDate1 = _registerName1("requestStartDate"); - late final _sel_requestEndDate1 = _registerName1("requestEndDate"); - late final _sel_responseStartDate1 = _registerName1("responseStartDate"); - late final _sel_responseEndDate1 = _registerName1("responseEndDate"); - late final _sel_networkProtocolName1 = _registerName1("networkProtocolName"); - late final _sel_isProxyConnection1 = _registerName1("isProxyConnection"); - late final _sel_isReusedConnection1 = _registerName1("isReusedConnection"); - late final _sel_resourceFetchType1 = _registerName1("resourceFetchType"); - int _objc_msgSend_490( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_490( - obj, - sel, - ); - } - - late final __objc_msgSend_490Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_490 = __objc_msgSend_490Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _sel_countOfRequestHeaderBytesSent1 = - _registerName1("countOfRequestHeaderBytesSent"); - late final _sel_countOfRequestBodyBytesSent1 = - _registerName1("countOfRequestBodyBytesSent"); - late final _sel_countOfRequestBodyBytesBeforeEncoding1 = - _registerName1("countOfRequestBodyBytesBeforeEncoding"); - late final _sel_countOfResponseHeaderBytesReceived1 = - _registerName1("countOfResponseHeaderBytesReceived"); - late final _sel_countOfResponseBodyBytesReceived1 = - _registerName1("countOfResponseBodyBytesReceived"); - late final _sel_countOfResponseBodyBytesAfterDecoding1 = - _registerName1("countOfResponseBodyBytesAfterDecoding"); - late final _sel_localAddress1 = _registerName1("localAddress"); - late final _sel_localPort1 = _registerName1("localPort"); - late final _sel_remoteAddress1 = _registerName1("remoteAddress"); - late final _sel_remotePort1 = _registerName1("remotePort"); - late final _sel_negotiatedTLSProtocolVersion1 = - _registerName1("negotiatedTLSProtocolVersion"); - late final _sel_negotiatedTLSCipherSuite1 = - _registerName1("negotiatedTLSCipherSuite"); - late final _sel_isCellular1 = _registerName1("isCellular"); - late final _sel_isExpensive1 = _registerName1("isExpensive"); - late final _sel_isConstrained1 = _registerName1("isConstrained"); - late final _sel_isMultipath1 = _registerName1("isMultipath"); - late final _sel_domainResolutionProtocol1 = - _registerName1("domainResolutionProtocol"); - int _objc_msgSend_491( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_491( - obj, - sel, - ); - } - - late final __objc_msgSend_491Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_491 = __objc_msgSend_491Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSURLSessionTaskMetrics1 = - _getClass1("NSURLSessionTaskMetrics"); - late final _sel_transactionMetrics1 = _registerName1("transactionMetrics"); - late final _class_NSDateInterval1 = _getClass1("NSDateInterval"); - late final _sel_taskInterval1 = _registerName1("taskInterval"); - ffi.Pointer _objc_msgSend_492( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_492( - obj, - sel, - ); - } - - late final __objc_msgSend_492Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_492 = __objc_msgSend_492Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_redirectCount1 = _registerName1("redirectCount"); - late final _class_NSItemProvider1 = _getClass1("NSItemProvider"); - late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1 = - _registerName1( - "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); - void _objc_msgSend_493( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, - ) { - return __objc_msgSend_493( - obj, - sel, - typeIdentifier, - visibility, - loadHandler, - ); - } - - late final __objc_msgSend_493Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_493 = __objc_msgSend_493Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1 = - _registerName1( - "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); - void _objc_msgSend_494( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int fileOptions, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, - ) { - return __objc_msgSend_494( - obj, - sel, - typeIdentifier, - fileOptions, - visibility, - loadHandler, - ); - } - - late final __objc_msgSend_494Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_494 = __objc_msgSend_494Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_registeredTypeIdentifiers1 = - _registerName1("registeredTypeIdentifiers"); - late final _sel_registeredTypeIdentifiersWithFileOptions_1 = - _registerName1("registeredTypeIdentifiersWithFileOptions:"); - ffi.Pointer _objc_msgSend_495( - ffi.Pointer obj, - ffi.Pointer sel, - int fileOptions, - ) { - return __objc_msgSend_495( - obj, - sel, - fileOptions, - ); - } - - late final __objc_msgSend_495Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_495 = __objc_msgSend_495Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_hasItemConformingToTypeIdentifier_1 = - _registerName1("hasItemConformingToTypeIdentifier:"); - late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1 = - _registerName1( - "hasRepresentationConformingToTypeIdentifier:fileOptions:"); - bool _objc_msgSend_496( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - int fileOptions, - ) { - return __objc_msgSend_496( - obj, - sel, - typeIdentifier, - fileOptions, - ); - } - - late final __objc_msgSend_496Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_496 = __objc_msgSend_496Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadDataRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_497( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_497( - obj, - sel, - typeIdentifier, - completionHandler, - ); - } - - late final __objc_msgSend_497Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_497 = __objc_msgSend_497Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_498( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_498( - obj, - sel, - typeIdentifier, - completionHandler, - ); - } - - late final __objc_msgSend_498Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_498 = __objc_msgSend_498Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1 = - _registerName1( - "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); - ffi.Pointer _objc_msgSend_499( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_499( - obj, - sel, - typeIdentifier, - completionHandler, - ); - } - - late final __objc_msgSend_499Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_499 = __objc_msgSend_499Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_suggestedName1 = _registerName1("suggestedName"); - late final _sel_setSuggestedName_1 = _registerName1("setSuggestedName:"); - late final _sel_initWithObject_1 = _registerName1("initWithObject:"); - late final _sel_registerObject_visibility_1 = - _registerName1("registerObject:visibility:"); - void _objc_msgSend_500( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer object, - int visibility, - ) { - return __objc_msgSend_500( - obj, - sel, - object, - visibility, - ); - } - - late final __objc_msgSend_500Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_500 = __objc_msgSend_500Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_registerObjectOfClass_visibility_loadHandler_1 = - _registerName1("registerObjectOfClass:visibility:loadHandler:"); - void _objc_msgSend_501( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - int visibility, - ffi.Pointer<_ObjCBlock> loadHandler, - ) { - return __objc_msgSend_501( - obj, - sel, - aClass, - visibility, - loadHandler, - ); - } - - late final __objc_msgSend_501Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_501 = __objc_msgSend_501Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_canLoadObjectOfClass_1 = - _registerName1("canLoadObjectOfClass:"); - late final _sel_loadObjectOfClass_completionHandler_1 = - _registerName1("loadObjectOfClass:completionHandler:"); - ffi.Pointer _objc_msgSend_502( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aClass, - ffi.Pointer<_ObjCBlock> completionHandler, - ) { - return __objc_msgSend_502( - obj, - sel, - aClass, - completionHandler, - ); - } - - late final __objc_msgSend_502Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_502 = __objc_msgSend_502Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_initWithItem_typeIdentifier_1 = - _registerName1("initWithItem:typeIdentifier:"); - instancetype _objc_msgSend_503( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer item, - ffi.Pointer typeIdentifier, - ) { - return __objc_msgSend_503( - obj, - sel, - item, - typeIdentifier, - ); - } - - late final __objc_msgSend_503Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_503 = __objc_msgSend_503Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_registerItemForTypeIdentifier_loadHandler_1 = - _registerName1("registerItemForTypeIdentifier:loadHandler:"); - void _objc_msgSend_504( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - NSItemProviderLoadHandler loadHandler, - ) { - return __objc_msgSend_504( - obj, - sel, - typeIdentifier, - loadHandler, - ); - } - - late final __objc_msgSend_504Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_504 = __objc_msgSend_504Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSItemProviderLoadHandler)>(); - - late final _sel_loadItemForTypeIdentifier_options_completionHandler_1 = - _registerName1("loadItemForTypeIdentifier:options:completionHandler:"); - void _objc_msgSend_505( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer typeIdentifier, - ffi.Pointer options, - NSItemProviderCompletionHandler completionHandler, - ) { - return __objc_msgSend_505( - obj, - sel, - typeIdentifier, - options, - completionHandler, - ); - } - - late final __objc_msgSend_505Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_505 = __objc_msgSend_505Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSItemProviderCompletionHandler)>(); - - late final _sel_previewImageHandler1 = _registerName1("previewImageHandler"); - NSItemProviderLoadHandler _objc_msgSend_506( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_506( - obj, - sel, - ); - } - - late final __objc_msgSend_506Ptr = _lookup< - ffi.NativeFunction< - NSItemProviderLoadHandler Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_506 = __objc_msgSend_506Ptr.asFunction< - NSItemProviderLoadHandler Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setPreviewImageHandler_1 = - _registerName1("setPreviewImageHandler:"); - void _objc_msgSend_507( - ffi.Pointer obj, - ffi.Pointer sel, - NSItemProviderLoadHandler value, - ) { - return __objc_msgSend_507( - obj, - sel, - value, - ); - } - - late final __objc_msgSend_507Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSItemProviderLoadHandler)>>('objc_msgSend'); - late final __objc_msgSend_507 = __objc_msgSend_507Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSItemProviderLoadHandler)>(); - - late final _sel_loadPreviewImageWithOptions_completionHandler_1 = - _registerName1("loadPreviewImageWithOptions:completionHandler:"); - void _objc_msgSend_508( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer options, - NSItemProviderCompletionHandler completionHandler, - ) { - return __objc_msgSend_508( - obj, - sel, - options, - completionHandler, - ); - } - - late final __objc_msgSend_508Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSItemProviderCompletionHandler)>>('objc_msgSend'); - late final __objc_msgSend_508 = __objc_msgSend_508Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSItemProviderCompletionHandler)>(); - - late final ffi.Pointer> - _NSItemProviderPreferredImageSizeKey = - _lookup>('NSItemProviderPreferredImageSizeKey'); - - ffi.Pointer get NSItemProviderPreferredImageSizeKey => - _NSItemProviderPreferredImageSizeKey.value; - - set NSItemProviderPreferredImageSizeKey(ffi.Pointer value) => - _NSItemProviderPreferredImageSizeKey.value = value; - - late final ffi.Pointer> - _NSExtensionJavaScriptPreprocessingResultsKey = - _lookup>( - 'NSExtensionJavaScriptPreprocessingResultsKey'); - - ffi.Pointer get NSExtensionJavaScriptPreprocessingResultsKey => - _NSExtensionJavaScriptPreprocessingResultsKey.value; - - set NSExtensionJavaScriptPreprocessingResultsKey( - ffi.Pointer value) => - _NSExtensionJavaScriptPreprocessingResultsKey.value = value; - - late final ffi.Pointer> - _NSExtensionJavaScriptFinalizeArgumentKey = - _lookup>( - 'NSExtensionJavaScriptFinalizeArgumentKey'); - - ffi.Pointer get NSExtensionJavaScriptFinalizeArgumentKey => - _NSExtensionJavaScriptFinalizeArgumentKey.value; - - set NSExtensionJavaScriptFinalizeArgumentKey(ffi.Pointer value) => - _NSExtensionJavaScriptFinalizeArgumentKey.value = value; - - late final ffi.Pointer> _NSItemProviderErrorDomain = - _lookup>('NSItemProviderErrorDomain'); - - ffi.Pointer get NSItemProviderErrorDomain => - _NSItemProviderErrorDomain.value; - - set NSItemProviderErrorDomain(ffi.Pointer value) => - _NSItemProviderErrorDomain.value = value; - - late final ffi.Pointer _NSStringTransformLatinToKatakana = - _lookup('NSStringTransformLatinToKatakana'); - - NSStringTransform get NSStringTransformLatinToKatakana => - _NSStringTransformLatinToKatakana.value; - - set NSStringTransformLatinToKatakana(NSStringTransform value) => - _NSStringTransformLatinToKatakana.value = value; - - late final ffi.Pointer _NSStringTransformLatinToHiragana = - _lookup('NSStringTransformLatinToHiragana'); - - NSStringTransform get NSStringTransformLatinToHiragana => - _NSStringTransformLatinToHiragana.value; - - set NSStringTransformLatinToHiragana(NSStringTransform value) => - _NSStringTransformLatinToHiragana.value = value; - - late final ffi.Pointer _NSStringTransformLatinToHangul = - _lookup('NSStringTransformLatinToHangul'); - - NSStringTransform get NSStringTransformLatinToHangul => - _NSStringTransformLatinToHangul.value; - - set NSStringTransformLatinToHangul(NSStringTransform value) => - _NSStringTransformLatinToHangul.value = value; - - late final ffi.Pointer _NSStringTransformLatinToArabic = - _lookup('NSStringTransformLatinToArabic'); - - NSStringTransform get NSStringTransformLatinToArabic => - _NSStringTransformLatinToArabic.value; - - set NSStringTransformLatinToArabic(NSStringTransform value) => - _NSStringTransformLatinToArabic.value = value; - - late final ffi.Pointer _NSStringTransformLatinToHebrew = - _lookup('NSStringTransformLatinToHebrew'); - - NSStringTransform get NSStringTransformLatinToHebrew => - _NSStringTransformLatinToHebrew.value; - - set NSStringTransformLatinToHebrew(NSStringTransform value) => - _NSStringTransformLatinToHebrew.value = value; - - late final ffi.Pointer _NSStringTransformLatinToThai = - _lookup('NSStringTransformLatinToThai'); - - NSStringTransform get NSStringTransformLatinToThai => - _NSStringTransformLatinToThai.value; - - set NSStringTransformLatinToThai(NSStringTransform value) => - _NSStringTransformLatinToThai.value = value; - - late final ffi.Pointer _NSStringTransformLatinToCyrillic = - _lookup('NSStringTransformLatinToCyrillic'); - - NSStringTransform get NSStringTransformLatinToCyrillic => - _NSStringTransformLatinToCyrillic.value; - - set NSStringTransformLatinToCyrillic(NSStringTransform value) => - _NSStringTransformLatinToCyrillic.value = value; - - late final ffi.Pointer _NSStringTransformLatinToGreek = - _lookup('NSStringTransformLatinToGreek'); - - NSStringTransform get NSStringTransformLatinToGreek => - _NSStringTransformLatinToGreek.value; - - set NSStringTransformLatinToGreek(NSStringTransform value) => - _NSStringTransformLatinToGreek.value = value; - - late final ffi.Pointer _NSStringTransformToLatin = - _lookup('NSStringTransformToLatin'); - - NSStringTransform get NSStringTransformToLatin => - _NSStringTransformToLatin.value; - - set NSStringTransformToLatin(NSStringTransform value) => - _NSStringTransformToLatin.value = value; - - late final ffi.Pointer _NSStringTransformMandarinToLatin = - _lookup('NSStringTransformMandarinToLatin'); - - NSStringTransform get NSStringTransformMandarinToLatin => - _NSStringTransformMandarinToLatin.value; - - set NSStringTransformMandarinToLatin(NSStringTransform value) => - _NSStringTransformMandarinToLatin.value = value; - - late final ffi.Pointer - _NSStringTransformHiraganaToKatakana = - _lookup('NSStringTransformHiraganaToKatakana'); - - NSStringTransform get NSStringTransformHiraganaToKatakana => - _NSStringTransformHiraganaToKatakana.value; - - set NSStringTransformHiraganaToKatakana(NSStringTransform value) => - _NSStringTransformHiraganaToKatakana.value = value; - - late final ffi.Pointer - _NSStringTransformFullwidthToHalfwidth = - _lookup('NSStringTransformFullwidthToHalfwidth'); - - NSStringTransform get NSStringTransformFullwidthToHalfwidth => - _NSStringTransformFullwidthToHalfwidth.value; - - set NSStringTransformFullwidthToHalfwidth(NSStringTransform value) => - _NSStringTransformFullwidthToHalfwidth.value = value; - - late final ffi.Pointer _NSStringTransformToXMLHex = - _lookup('NSStringTransformToXMLHex'); - - NSStringTransform get NSStringTransformToXMLHex => - _NSStringTransformToXMLHex.value; - - set NSStringTransformToXMLHex(NSStringTransform value) => - _NSStringTransformToXMLHex.value = value; - - late final ffi.Pointer _NSStringTransformToUnicodeName = - _lookup('NSStringTransformToUnicodeName'); - - NSStringTransform get NSStringTransformToUnicodeName => - _NSStringTransformToUnicodeName.value; - - set NSStringTransformToUnicodeName(NSStringTransform value) => - _NSStringTransformToUnicodeName.value = value; - - late final ffi.Pointer - _NSStringTransformStripCombiningMarks = - _lookup('NSStringTransformStripCombiningMarks'); - - NSStringTransform get NSStringTransformStripCombiningMarks => - _NSStringTransformStripCombiningMarks.value; - - set NSStringTransformStripCombiningMarks(NSStringTransform value) => - _NSStringTransformStripCombiningMarks.value = value; - - late final ffi.Pointer _NSStringTransformStripDiacritics = - _lookup('NSStringTransformStripDiacritics'); - - NSStringTransform get NSStringTransformStripDiacritics => - _NSStringTransformStripDiacritics.value; - - set NSStringTransformStripDiacritics(NSStringTransform value) => - _NSStringTransformStripDiacritics.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionSuggestedEncodingsKey = - _lookup( - 'NSStringEncodingDetectionSuggestedEncodingsKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionSuggestedEncodingsKey => - _NSStringEncodingDetectionSuggestedEncodingsKey.value; - - set NSStringEncodingDetectionSuggestedEncodingsKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionSuggestedEncodingsKey.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionDisallowedEncodingsKey = - _lookup( - 'NSStringEncodingDetectionDisallowedEncodingsKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionDisallowedEncodingsKey => - _NSStringEncodingDetectionDisallowedEncodingsKey.value; - - set NSStringEncodingDetectionDisallowedEncodingsKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionDisallowedEncodingsKey.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey = - _lookup( - 'NSStringEncodingDetectionUseOnlySuggestedEncodingsKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionUseOnlySuggestedEncodingsKey => - _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value; - - set NSStringEncodingDetectionUseOnlySuggestedEncodingsKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionUseOnlySuggestedEncodingsKey.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionAllowLossyKey = - _lookup( - 'NSStringEncodingDetectionAllowLossyKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionAllowLossyKey => - _NSStringEncodingDetectionAllowLossyKey.value; - - set NSStringEncodingDetectionAllowLossyKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionAllowLossyKey.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionFromWindowsKey = - _lookup( - 'NSStringEncodingDetectionFromWindowsKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionFromWindowsKey => - _NSStringEncodingDetectionFromWindowsKey.value; - - set NSStringEncodingDetectionFromWindowsKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionFromWindowsKey.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionLossySubstitutionKey = - _lookup( - 'NSStringEncodingDetectionLossySubstitutionKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionLossySubstitutionKey => - _NSStringEncodingDetectionLossySubstitutionKey.value; - - set NSStringEncodingDetectionLossySubstitutionKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionLossySubstitutionKey.value = value; - - late final ffi.Pointer - _NSStringEncodingDetectionLikelyLanguageKey = - _lookup( - 'NSStringEncodingDetectionLikelyLanguageKey'); - - NSStringEncodingDetectionOptionsKey - get NSStringEncodingDetectionLikelyLanguageKey => - _NSStringEncodingDetectionLikelyLanguageKey.value; - - set NSStringEncodingDetectionLikelyLanguageKey( - NSStringEncodingDetectionOptionsKey value) => - _NSStringEncodingDetectionLikelyLanguageKey.value = value; - - late final _class_NSMutableString1 = _getClass1("NSMutableString"); - late final _sel_replaceCharactersInRange_withString_1 = - _registerName1("replaceCharactersInRange:withString:"); - void _objc_msgSend_509( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange range, - ffi.Pointer aString, - ) { - return __objc_msgSend_509( - obj, - sel, - range, - aString, - ); - } - - late final __objc_msgSend_509Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - NSRange, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_509 = __objc_msgSend_509Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, NSRange, - ffi.Pointer)>(); - - late final _sel_insertString_atIndex_1 = - _registerName1("insertString:atIndex:"); - void _objc_msgSend_510( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, - int loc, - ) { - return __objc_msgSend_510( - obj, - sel, - aString, - loc, - ); - } - - late final __objc_msgSend_510Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_510 = __objc_msgSend_510Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, int)>(); - - late final _sel_deleteCharactersInRange_1 = - _registerName1("deleteCharactersInRange:"); - late final _sel_appendString_1 = _registerName1("appendString:"); - late final _sel_appendFormat_1 = _registerName1("appendFormat:"); - late final _sel_setString_1 = _registerName1("setString:"); - late final _sel_replaceOccurrencesOfString_withString_options_range_1 = - _registerName1("replaceOccurrencesOfString:withString:options:range:"); - int _objc_msgSend_511( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer replacement, - int options, - NSRange searchRange, - ) { - return __objc_msgSend_511( - obj, - sel, - target, - replacement, - options, - searchRange, - ); - } - - late final __objc_msgSend_511Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - NSRange)>>('objc_msgSend'); - late final __objc_msgSend_511 = __objc_msgSend_511Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, NSRange)>(); - - late final _sel_applyTransform_reverse_range_updatedRange_1 = - _registerName1("applyTransform:reverse:range:updatedRange:"); - bool _objc_msgSend_512( - ffi.Pointer obj, - ffi.Pointer sel, - NSStringTransform transform, - bool reverse, - NSRange range, - NSRangePointer resultingRange, - ) { - return __objc_msgSend_512( - obj, - sel, - transform, - reverse, - range, - resultingRange, - ); - } - - late final __objc_msgSend_512Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - NSStringTransform, - ffi.Bool, - NSRange, - NSRangePointer)>>('objc_msgSend'); - late final __objc_msgSend_512 = __objc_msgSend_512Ptr.asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - NSStringTransform, bool, NSRange, NSRangePointer)>(); - - ffi.Pointer _objc_msgSend_513( - ffi.Pointer obj, - ffi.Pointer sel, - int capacity, - ) { - return __objc_msgSend_513( - obj, - sel, - capacity, - ); - } - - late final __objc_msgSend_513Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>('objc_msgSend'); - late final __objc_msgSend_513 = __objc_msgSend_513Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_stringWithCapacity_1 = _registerName1("stringWithCapacity:"); - late final ffi.Pointer _NSCharacterConversionException = - _lookup('NSCharacterConversionException'); - - NSExceptionName get NSCharacterConversionException => - _NSCharacterConversionException.value; - - set NSCharacterConversionException(NSExceptionName value) => - _NSCharacterConversionException.value = value; - - late final ffi.Pointer _NSParseErrorException = - _lookup('NSParseErrorException'); - - NSExceptionName get NSParseErrorException => _NSParseErrorException.value; - - set NSParseErrorException(NSExceptionName value) => - _NSParseErrorException.value = value; - - late final _class_NSSimpleCString1 = _getClass1("NSSimpleCString"); - late final _class_NSConstantString1 = _getClass1("NSConstantString"); - late final _class_NSMutableCharacterSet1 = - _getClass1("NSMutableCharacterSet"); - late final _sel_addCharactersInRange_1 = - _registerName1("addCharactersInRange:"); - late final _sel_removeCharactersInRange_1 = - _registerName1("removeCharactersInRange:"); - late final _sel_addCharactersInString_1 = - _registerName1("addCharactersInString:"); - late final _sel_removeCharactersInString_1 = - _registerName1("removeCharactersInString:"); - late final _sel_formUnionWithCharacterSet_1 = - _registerName1("formUnionWithCharacterSet:"); - void _objc_msgSend_514( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer otherSet, - ) { - return __objc_msgSend_514( - obj, - sel, - otherSet, - ); - } - - late final __objc_msgSend_514Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_514 = __objc_msgSend_514Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_formIntersectionWithCharacterSet_1 = - _registerName1("formIntersectionWithCharacterSet:"); - late final _sel_invert1 = _registerName1("invert"); - ffi.Pointer _objc_msgSend_515( - ffi.Pointer obj, - ffi.Pointer sel, - NSRange aRange, - ) { - return __objc_msgSend_515( - obj, - sel, - aRange, - ); - } - - late final __objc_msgSend_515Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSRange)>>('objc_msgSend'); - late final __objc_msgSend_515 = __objc_msgSend_515Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, NSRange)>(); - - ffi.Pointer _objc_msgSend_516( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer aString, - ) { - return __objc_msgSend_516( - obj, - sel, - aString, - ); - } - - late final __objc_msgSend_516Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_516 = __objc_msgSend_516Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_517( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_517( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_517Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_517 = __objc_msgSend_517Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_518( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer fName, - ) { - return __objc_msgSend_518( - obj, - sel, - fName, - ); - } - - late final __objc_msgSend_518Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_518 = __objc_msgSend_518Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final ffi.Pointer> _NSHTTPPropertyStatusCodeKey = - _lookup>('NSHTTPPropertyStatusCodeKey'); - - ffi.Pointer get NSHTTPPropertyStatusCodeKey => - _NSHTTPPropertyStatusCodeKey.value; - - late final ffi.Pointer> - _NSHTTPPropertyStatusReasonKey = - _lookup>('NSHTTPPropertyStatusReasonKey'); - - ffi.Pointer get NSHTTPPropertyStatusReasonKey => - _NSHTTPPropertyStatusReasonKey.value; - - late final ffi.Pointer> - _NSHTTPPropertyServerHTTPVersionKey = - _lookup>('NSHTTPPropertyServerHTTPVersionKey'); - - ffi.Pointer get NSHTTPPropertyServerHTTPVersionKey => - _NSHTTPPropertyServerHTTPVersionKey.value; - - late final ffi.Pointer> - _NSHTTPPropertyRedirectionHeadersKey = - _lookup>('NSHTTPPropertyRedirectionHeadersKey'); - - ffi.Pointer get NSHTTPPropertyRedirectionHeadersKey => - _NSHTTPPropertyRedirectionHeadersKey.value; - - late final ffi.Pointer> - _NSHTTPPropertyErrorPageDataKey = - _lookup>('NSHTTPPropertyErrorPageDataKey'); - - ffi.Pointer get NSHTTPPropertyErrorPageDataKey => - _NSHTTPPropertyErrorPageDataKey.value; - - late final ffi.Pointer> _NSHTTPPropertyHTTPProxy = - _lookup>('NSHTTPPropertyHTTPProxy'); - - ffi.Pointer get NSHTTPPropertyHTTPProxy => - _NSHTTPPropertyHTTPProxy.value; - - late final ffi.Pointer> _NSFTPPropertyUserLoginKey = - _lookup>('NSFTPPropertyUserLoginKey'); - - ffi.Pointer get NSFTPPropertyUserLoginKey => - _NSFTPPropertyUserLoginKey.value; - - late final ffi.Pointer> - _NSFTPPropertyUserPasswordKey = - _lookup>('NSFTPPropertyUserPasswordKey'); - - ffi.Pointer get NSFTPPropertyUserPasswordKey => - _NSFTPPropertyUserPasswordKey.value; - - late final ffi.Pointer> - _NSFTPPropertyActiveTransferModeKey = - _lookup>('NSFTPPropertyActiveTransferModeKey'); - - ffi.Pointer get NSFTPPropertyActiveTransferModeKey => - _NSFTPPropertyActiveTransferModeKey.value; - - late final ffi.Pointer> _NSFTPPropertyFileOffsetKey = - _lookup>('NSFTPPropertyFileOffsetKey'); - - ffi.Pointer get NSFTPPropertyFileOffsetKey => - _NSFTPPropertyFileOffsetKey.value; - - late final ffi.Pointer> _NSFTPPropertyFTPProxy = - _lookup>('NSFTPPropertyFTPProxy'); - - ffi.Pointer get NSFTPPropertyFTPProxy => - _NSFTPPropertyFTPProxy.value; - - /// A string constant for the "file" URL scheme. If you are using this to compare to a URL's scheme to see if it is a file URL, you should instead use the NSURL fileURL property -- the fileURL property is much faster. - late final ffi.Pointer> _NSURLFileScheme = - _lookup>('NSURLFileScheme'); - - ffi.Pointer get NSURLFileScheme => _NSURLFileScheme.value; - - set NSURLFileScheme(ffi.Pointer value) => - _NSURLFileScheme.value = value; - - /// Key for the resource properties that have not been set after setResourceValues:error: returns an error, returned as an array of of strings. - late final ffi.Pointer _NSURLKeysOfUnsetValuesKey = - _lookup('NSURLKeysOfUnsetValuesKey'); - - NSURLResourceKey get NSURLKeysOfUnsetValuesKey => - _NSURLKeysOfUnsetValuesKey.value; - - set NSURLKeysOfUnsetValuesKey(NSURLResourceKey value) => - _NSURLKeysOfUnsetValuesKey.value = value; - - /// The resource name provided by the file system (Read-write, value type NSString) - late final ffi.Pointer _NSURLNameKey = - _lookup('NSURLNameKey'); - - NSURLResourceKey get NSURLNameKey => _NSURLNameKey.value; - - set NSURLNameKey(NSURLResourceKey value) => _NSURLNameKey.value = value; - - /// Localized or extension-hidden name as displayed to users (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedNameKey = - _lookup('NSURLLocalizedNameKey'); - - NSURLResourceKey get NSURLLocalizedNameKey => _NSURLLocalizedNameKey.value; - - set NSURLLocalizedNameKey(NSURLResourceKey value) => - _NSURLLocalizedNameKey.value = value; - - /// True for regular files (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsRegularFileKey = - _lookup('NSURLIsRegularFileKey'); - - NSURLResourceKey get NSURLIsRegularFileKey => _NSURLIsRegularFileKey.value; - - set NSURLIsRegularFileKey(NSURLResourceKey value) => - _NSURLIsRegularFileKey.value = value; - - /// True for directories (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsDirectoryKey = - _lookup('NSURLIsDirectoryKey'); - - NSURLResourceKey get NSURLIsDirectoryKey => _NSURLIsDirectoryKey.value; - - set NSURLIsDirectoryKey(NSURLResourceKey value) => - _NSURLIsDirectoryKey.value = value; - - /// True for symlinks (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsSymbolicLinkKey = - _lookup('NSURLIsSymbolicLinkKey'); - - NSURLResourceKey get NSURLIsSymbolicLinkKey => _NSURLIsSymbolicLinkKey.value; - - set NSURLIsSymbolicLinkKey(NSURLResourceKey value) => - _NSURLIsSymbolicLinkKey.value = value; - - /// True for the root directory of a volume (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsVolumeKey = - _lookup('NSURLIsVolumeKey'); - - NSURLResourceKey get NSURLIsVolumeKey => _NSURLIsVolumeKey.value; - - set NSURLIsVolumeKey(NSURLResourceKey value) => - _NSURLIsVolumeKey.value = value; - - /// True for packaged directories (Read-only 10_6 and 10_7, read-write 10_8, value type boolean NSNumber). Note: You can only set or clear this property on directories; if you try to set this property on non-directory objects, the property is ignored. If the directory is a package for some other reason (extension type, etc), setting this property to false will have no effect. - late final ffi.Pointer _NSURLIsPackageKey = - _lookup('NSURLIsPackageKey'); - - NSURLResourceKey get NSURLIsPackageKey => _NSURLIsPackageKey.value; - - set NSURLIsPackageKey(NSURLResourceKey value) => - _NSURLIsPackageKey.value = value; - - /// True if resource is an application (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsApplicationKey = - _lookup('NSURLIsApplicationKey'); - - NSURLResourceKey get NSURLIsApplicationKey => _NSURLIsApplicationKey.value; - - set NSURLIsApplicationKey(NSURLResourceKey value) => - _NSURLIsApplicationKey.value = value; - - /// True if the resource is scriptable. Only applies to applications (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLApplicationIsScriptableKey = - _lookup('NSURLApplicationIsScriptableKey'); - - NSURLResourceKey get NSURLApplicationIsScriptableKey => - _NSURLApplicationIsScriptableKey.value; - - set NSURLApplicationIsScriptableKey(NSURLResourceKey value) => - _NSURLApplicationIsScriptableKey.value = value; - - /// True for system-immutable resources (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsSystemImmutableKey = - _lookup('NSURLIsSystemImmutableKey'); - - NSURLResourceKey get NSURLIsSystemImmutableKey => - _NSURLIsSystemImmutableKey.value; - - set NSURLIsSystemImmutableKey(NSURLResourceKey value) => - _NSURLIsSystemImmutableKey.value = value; - - /// True for user-immutable resources (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsUserImmutableKey = - _lookup('NSURLIsUserImmutableKey'); - - NSURLResourceKey get NSURLIsUserImmutableKey => - _NSURLIsUserImmutableKey.value; - - set NSURLIsUserImmutableKey(NSURLResourceKey value) => - _NSURLIsUserImmutableKey.value = value; - - /// True for resources normally not displayed to users (Read-write, value type boolean NSNumber). Note: If the resource is a hidden because its name starts with a period, setting this property to false will not change the property. - late final ffi.Pointer _NSURLIsHiddenKey = - _lookup('NSURLIsHiddenKey'); - - NSURLResourceKey get NSURLIsHiddenKey => _NSURLIsHiddenKey.value; - - set NSURLIsHiddenKey(NSURLResourceKey value) => - _NSURLIsHiddenKey.value = value; - - /// True for resources whose filename extension is removed from the localized name property (Read-write, value type boolean NSNumber) - late final ffi.Pointer _NSURLHasHiddenExtensionKey = - _lookup('NSURLHasHiddenExtensionKey'); - - NSURLResourceKey get NSURLHasHiddenExtensionKey => - _NSURLHasHiddenExtensionKey.value; - - set NSURLHasHiddenExtensionKey(NSURLResourceKey value) => - _NSURLHasHiddenExtensionKey.value = value; - - /// The date the resource was created (Read-write, value type NSDate) - late final ffi.Pointer _NSURLCreationDateKey = - _lookup('NSURLCreationDateKey'); - - NSURLResourceKey get NSURLCreationDateKey => _NSURLCreationDateKey.value; - - set NSURLCreationDateKey(NSURLResourceKey value) => - _NSURLCreationDateKey.value = value; - - /// The date the resource was last accessed (Read-write, value type NSDate) - late final ffi.Pointer _NSURLContentAccessDateKey = - _lookup('NSURLContentAccessDateKey'); - - NSURLResourceKey get NSURLContentAccessDateKey => - _NSURLContentAccessDateKey.value; - - set NSURLContentAccessDateKey(NSURLResourceKey value) => - _NSURLContentAccessDateKey.value = value; - - /// The time the resource content was last modified (Read-write, value type NSDate) - late final ffi.Pointer _NSURLContentModificationDateKey = - _lookup('NSURLContentModificationDateKey'); - - NSURLResourceKey get NSURLContentModificationDateKey => - _NSURLContentModificationDateKey.value; - - set NSURLContentModificationDateKey(NSURLResourceKey value) => - _NSURLContentModificationDateKey.value = value; - - /// The time the resource's attributes were last modified (Read-only, value type NSDate) - late final ffi.Pointer _NSURLAttributeModificationDateKey = - _lookup('NSURLAttributeModificationDateKey'); - - NSURLResourceKey get NSURLAttributeModificationDateKey => - _NSURLAttributeModificationDateKey.value; - - set NSURLAttributeModificationDateKey(NSURLResourceKey value) => - _NSURLAttributeModificationDateKey.value = value; - - /// Number of hard links to the resource (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLLinkCountKey = - _lookup('NSURLLinkCountKey'); - - NSURLResourceKey get NSURLLinkCountKey => _NSURLLinkCountKey.value; - - set NSURLLinkCountKey(NSURLResourceKey value) => - _NSURLLinkCountKey.value = value; - - /// The resource's parent directory, if any (Read-only, value type NSURL) - late final ffi.Pointer _NSURLParentDirectoryURLKey = - _lookup('NSURLParentDirectoryURLKey'); - - NSURLResourceKey get NSURLParentDirectoryURLKey => - _NSURLParentDirectoryURLKey.value; - - set NSURLParentDirectoryURLKey(NSURLResourceKey value) => - _NSURLParentDirectoryURLKey.value = value; - - /// URL of the volume on which the resource is stored (Read-only, value type NSURL) - late final ffi.Pointer _NSURLVolumeURLKey = - _lookup('NSURLVolumeURLKey'); - - NSURLResourceKey get NSURLVolumeURLKey => _NSURLVolumeURLKey.value; - - set NSURLVolumeURLKey(NSURLResourceKey value) => - _NSURLVolumeURLKey.value = value; - - /// Uniform type identifier (UTI) for the resource (Read-only, value type NSString) - late final ffi.Pointer _NSURLTypeIdentifierKey = - _lookup('NSURLTypeIdentifierKey'); - - NSURLResourceKey get NSURLTypeIdentifierKey => _NSURLTypeIdentifierKey.value; - - set NSURLTypeIdentifierKey(NSURLResourceKey value) => - _NSURLTypeIdentifierKey.value = value; - - /// File type (UTType) for the resource (Read-only, value type UTType) - late final ffi.Pointer _NSURLContentTypeKey = - _lookup('NSURLContentTypeKey'); - - NSURLResourceKey get NSURLContentTypeKey => _NSURLContentTypeKey.value; - - set NSURLContentTypeKey(NSURLResourceKey value) => - _NSURLContentTypeKey.value = value; - - /// User-visible type or "kind" description (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedTypeDescriptionKey = - _lookup('NSURLLocalizedTypeDescriptionKey'); - - NSURLResourceKey get NSURLLocalizedTypeDescriptionKey => - _NSURLLocalizedTypeDescriptionKey.value; - - set NSURLLocalizedTypeDescriptionKey(NSURLResourceKey value) => - _NSURLLocalizedTypeDescriptionKey.value = value; - - /// The label number assigned to the resource (Read-write, value type NSNumber) - late final ffi.Pointer _NSURLLabelNumberKey = - _lookup('NSURLLabelNumberKey'); - - NSURLResourceKey get NSURLLabelNumberKey => _NSURLLabelNumberKey.value; - - set NSURLLabelNumberKey(NSURLResourceKey value) => - _NSURLLabelNumberKey.value = value; - - /// The color of the assigned label (Read-only, value type NSColor) - late final ffi.Pointer _NSURLLabelColorKey = - _lookup('NSURLLabelColorKey'); - - NSURLResourceKey get NSURLLabelColorKey => _NSURLLabelColorKey.value; - - set NSURLLabelColorKey(NSURLResourceKey value) => - _NSURLLabelColorKey.value = value; - - /// The user-visible label text (Read-only, value type NSString) - late final ffi.Pointer _NSURLLocalizedLabelKey = - _lookup('NSURLLocalizedLabelKey'); - - NSURLResourceKey get NSURLLocalizedLabelKey => _NSURLLocalizedLabelKey.value; - - set NSURLLocalizedLabelKey(NSURLResourceKey value) => - _NSURLLocalizedLabelKey.value = value; - - /// The icon normally displayed for the resource (Read-only, value type NSImage) - late final ffi.Pointer _NSURLEffectiveIconKey = - _lookup('NSURLEffectiveIconKey'); - - NSURLResourceKey get NSURLEffectiveIconKey => _NSURLEffectiveIconKey.value; - - set NSURLEffectiveIconKey(NSURLResourceKey value) => - _NSURLEffectiveIconKey.value = value; - - /// The custom icon assigned to the resource, if any (Currently not implemented, value type NSImage) - late final ffi.Pointer _NSURLCustomIconKey = - _lookup('NSURLCustomIconKey'); - - NSURLResourceKey get NSURLCustomIconKey => _NSURLCustomIconKey.value; - - set NSURLCustomIconKey(NSURLResourceKey value) => - _NSURLCustomIconKey.value = value; - - /// An identifier which can be used to compare two file system objects for equality using -isEqual (i.e, two object identifiers are equal if they have the same file system path or if the paths are linked to same inode on the same file system). This identifier is not persistent across system restarts. (Read-only, value type id ) - late final ffi.Pointer _NSURLFileResourceIdentifierKey = - _lookup('NSURLFileResourceIdentifierKey'); - - NSURLResourceKey get NSURLFileResourceIdentifierKey => - _NSURLFileResourceIdentifierKey.value; - - set NSURLFileResourceIdentifierKey(NSURLResourceKey value) => - _NSURLFileResourceIdentifierKey.value = value; - - /// An identifier that can be used to identify the volume the file system object is on. Other objects on the same volume will have the same volume identifier and can be compared using for equality using -isEqual. This identifier is not persistent across system restarts. (Read-only, value type id ) - late final ffi.Pointer _NSURLVolumeIdentifierKey = - _lookup('NSURLVolumeIdentifierKey'); - - NSURLResourceKey get NSURLVolumeIdentifierKey => - _NSURLVolumeIdentifierKey.value; - - set NSURLVolumeIdentifierKey(NSURLResourceKey value) => - _NSURLVolumeIdentifierKey.value = value; - - /// The optimal block size when reading or writing this file's data, or nil if not available. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLPreferredIOBlockSizeKey = - _lookup('NSURLPreferredIOBlockSizeKey'); - - NSURLResourceKey get NSURLPreferredIOBlockSizeKey => - _NSURLPreferredIOBlockSizeKey.value; - - set NSURLPreferredIOBlockSizeKey(NSURLResourceKey value) => - _NSURLPreferredIOBlockSizeKey.value = value; - - /// true if this process (as determined by EUID) can read the resource. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsReadableKey = - _lookup('NSURLIsReadableKey'); - - NSURLResourceKey get NSURLIsReadableKey => _NSURLIsReadableKey.value; - - set NSURLIsReadableKey(NSURLResourceKey value) => - _NSURLIsReadableKey.value = value; - - /// true if this process (as determined by EUID) can write to the resource. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsWritableKey = - _lookup('NSURLIsWritableKey'); - - NSURLResourceKey get NSURLIsWritableKey => _NSURLIsWritableKey.value; - - set NSURLIsWritableKey(NSURLResourceKey value) => - _NSURLIsWritableKey.value = value; - - /// true if this process (as determined by EUID) can execute a file resource or search a directory resource. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsExecutableKey = - _lookup('NSURLIsExecutableKey'); - - NSURLResourceKey get NSURLIsExecutableKey => _NSURLIsExecutableKey.value; - - set NSURLIsExecutableKey(NSURLResourceKey value) => - _NSURLIsExecutableKey.value = value; - - /// The file system object's security information encapsulated in a NSFileSecurity object. (Read-write, Value type NSFileSecurity) - late final ffi.Pointer _NSURLFileSecurityKey = - _lookup('NSURLFileSecurityKey'); - - NSURLResourceKey get NSURLFileSecurityKey => _NSURLFileSecurityKey.value; - - set NSURLFileSecurityKey(NSURLResourceKey value) => - _NSURLFileSecurityKey.value = value; - - /// true if resource should be excluded from backups, false otherwise (Read-write, value type boolean NSNumber). This property is only useful for excluding cache and other application support files which are not needed in a backup. Some operations commonly made to user documents will cause this property to be reset to false and so this property should not be used on user documents. - late final ffi.Pointer _NSURLIsExcludedFromBackupKey = - _lookup('NSURLIsExcludedFromBackupKey'); - - NSURLResourceKey get NSURLIsExcludedFromBackupKey => - _NSURLIsExcludedFromBackupKey.value; - - set NSURLIsExcludedFromBackupKey(NSURLResourceKey value) => - _NSURLIsExcludedFromBackupKey.value = value; - - /// The array of Tag names (Read-write, value type NSArray of NSString) - late final ffi.Pointer _NSURLTagNamesKey = - _lookup('NSURLTagNamesKey'); - - NSURLResourceKey get NSURLTagNamesKey => _NSURLTagNamesKey.value; - - set NSURLTagNamesKey(NSURLResourceKey value) => - _NSURLTagNamesKey.value = value; - - /// the URL's path as a file system path (Read-only, value type NSString) - late final ffi.Pointer _NSURLPathKey = - _lookup('NSURLPathKey'); - - NSURLResourceKey get NSURLPathKey => _NSURLPathKey.value; - - set NSURLPathKey(NSURLResourceKey value) => _NSURLPathKey.value = value; - - /// the URL's path as a canonical absolute file system path (Read-only, value type NSString) - late final ffi.Pointer _NSURLCanonicalPathKey = - _lookup('NSURLCanonicalPathKey'); - - NSURLResourceKey get NSURLCanonicalPathKey => _NSURLCanonicalPathKey.value; - - set NSURLCanonicalPathKey(NSURLResourceKey value) => - _NSURLCanonicalPathKey.value = value; - - /// true if this URL is a file system trigger directory. Traversing or opening a file system trigger will cause an attempt to mount a file system on the trigger directory. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsMountTriggerKey = - _lookup('NSURLIsMountTriggerKey'); - - NSURLResourceKey get NSURLIsMountTriggerKey => _NSURLIsMountTriggerKey.value; - - set NSURLIsMountTriggerKey(NSURLResourceKey value) => - _NSURLIsMountTriggerKey.value = value; - - /// An opaque generation identifier which can be compared using isEqual: to determine if the data in a document has been modified. For URLs which refer to the same file inode, the generation identifier will change when the data in the file's data fork is changed (changes to extended attributes or other file system metadata do not change the generation identifier). For URLs which refer to the same directory inode, the generation identifier will change when direct children of that directory are added, removed or renamed (changes to the data of the direct children of that directory will not change the generation identifier). The generation identifier is persistent across system restarts. The generation identifier is tied to a specific document on a specific volume and is not transferred when the document is copied to another volume. This property is not supported by all volumes. (Read-only, value type id ) - late final ffi.Pointer _NSURLGenerationIdentifierKey = - _lookup('NSURLGenerationIdentifierKey'); - - NSURLResourceKey get NSURLGenerationIdentifierKey => - _NSURLGenerationIdentifierKey.value; - - set NSURLGenerationIdentifierKey(NSURLResourceKey value) => - _NSURLGenerationIdentifierKey.value = value; - - /// The document identifier -- a value assigned by the kernel to a document (which can be either a file or directory) and is used to identify the document regardless of where it gets moved on a volume. The document identifier survives "safe save” operations; i.e it is sticky to the path it was assigned to (-replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error: is the preferred safe-save API). The document identifier is persistent across system restarts. The document identifier is not transferred when the file is copied. Document identifiers are only unique within a single volume. This property is not supported by all volumes. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLDocumentIdentifierKey = - _lookup('NSURLDocumentIdentifierKey'); - - NSURLResourceKey get NSURLDocumentIdentifierKey => - _NSURLDocumentIdentifierKey.value; - - set NSURLDocumentIdentifierKey(NSURLResourceKey value) => - _NSURLDocumentIdentifierKey.value = value; - - /// The date the resource was created, or renamed into or within its parent directory. Note that inconsistent behavior may be observed when this attribute is requested on hard-linked items. This property is not supported by all volumes. (Read-only before macOS 10.15, iOS 13.0, watchOS 6.0, and tvOS 13.0; Read-write after, value type NSDate) - late final ffi.Pointer _NSURLAddedToDirectoryDateKey = - _lookup('NSURLAddedToDirectoryDateKey'); - - NSURLResourceKey get NSURLAddedToDirectoryDateKey => - _NSURLAddedToDirectoryDateKey.value; - - set NSURLAddedToDirectoryDateKey(NSURLResourceKey value) => - _NSURLAddedToDirectoryDateKey.value = value; - - /// The quarantine properties as defined in LSQuarantine.h. To remove quarantine information from a file, pass NSNull as the value when setting this property. (Read-write, value type NSDictionary) - late final ffi.Pointer _NSURLQuarantinePropertiesKey = - _lookup('NSURLQuarantinePropertiesKey'); - - NSURLResourceKey get NSURLQuarantinePropertiesKey => - _NSURLQuarantinePropertiesKey.value; - - set NSURLQuarantinePropertiesKey(NSURLResourceKey value) => - _NSURLQuarantinePropertiesKey.value = value; - - /// Returns the file system object type. (Read-only, value type NSString) - late final ffi.Pointer _NSURLFileResourceTypeKey = - _lookup('NSURLFileResourceTypeKey'); - - NSURLResourceKey get NSURLFileResourceTypeKey => - _NSURLFileResourceTypeKey.value; - - set NSURLFileResourceTypeKey(NSURLResourceKey value) => - _NSURLFileResourceTypeKey.value = value; - - /// The file system's internal inode identifier for the item. This value is not stable for all file systems or across all mounts, so it should be used sparingly and not persisted. It is useful, for example, to match URLs from the URL enumerator with paths from FSEvents. (Read-only, value type NSNumber containing an unsigned long long). - late final ffi.Pointer _NSURLFileIdentifierKey = - _lookup('NSURLFileIdentifierKey'); - - NSURLResourceKey get NSURLFileIdentifierKey => _NSURLFileIdentifierKey.value; - - set NSURLFileIdentifierKey(NSURLResourceKey value) => - _NSURLFileIdentifierKey.value = value; - - /// A 64-bit value assigned by APFS that identifies a file's content data stream. Only cloned files and their originals can have the same identifier. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileContentIdentifierKey = - _lookup('NSURLFileContentIdentifierKey'); - - NSURLResourceKey get NSURLFileContentIdentifierKey => - _NSURLFileContentIdentifierKey.value; - - set NSURLFileContentIdentifierKey(NSURLResourceKey value) => - _NSURLFileContentIdentifierKey.value = value; - - /// True for cloned files and their originals that may share all, some, or no data blocks. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLMayShareFileContentKey = - _lookup('NSURLMayShareFileContentKey'); - - NSURLResourceKey get NSURLMayShareFileContentKey => - _NSURLMayShareFileContentKey.value; - - set NSURLMayShareFileContentKey(NSURLResourceKey value) => - _NSURLMayShareFileContentKey.value = value; - - /// True if the file has extended attributes. False guarantees there are none. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLMayHaveExtendedAttributesKey = - _lookup('NSURLMayHaveExtendedAttributesKey'); - - NSURLResourceKey get NSURLMayHaveExtendedAttributesKey => - _NSURLMayHaveExtendedAttributesKey.value; - - set NSURLMayHaveExtendedAttributesKey(NSURLResourceKey value) => - _NSURLMayHaveExtendedAttributesKey.value = value; - - /// True if the file can be deleted by the file system when asked to free space. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLIsPurgeableKey = - _lookup('NSURLIsPurgeableKey'); - - NSURLResourceKey get NSURLIsPurgeableKey => _NSURLIsPurgeableKey.value; - - set NSURLIsPurgeableKey(NSURLResourceKey value) => - _NSURLIsPurgeableKey.value = value; - - /// True if the file has sparse regions. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLIsSparseKey = - _lookup('NSURLIsSparseKey'); - - NSURLResourceKey get NSURLIsSparseKey => _NSURLIsSparseKey.value; - - set NSURLIsSparseKey(NSURLResourceKey value) => - _NSURLIsSparseKey.value = value; - - /// The file system object type values returned for the NSURLFileResourceTypeKey - late final ffi.Pointer - _NSURLFileResourceTypeNamedPipe = - _lookup('NSURLFileResourceTypeNamedPipe'); - - NSURLFileResourceType get NSURLFileResourceTypeNamedPipe => - _NSURLFileResourceTypeNamedPipe.value; - - set NSURLFileResourceTypeNamedPipe(NSURLFileResourceType value) => - _NSURLFileResourceTypeNamedPipe.value = value; - - late final ffi.Pointer - _NSURLFileResourceTypeCharacterSpecial = - _lookup('NSURLFileResourceTypeCharacterSpecial'); - - NSURLFileResourceType get NSURLFileResourceTypeCharacterSpecial => - _NSURLFileResourceTypeCharacterSpecial.value; - - set NSURLFileResourceTypeCharacterSpecial(NSURLFileResourceType value) => - _NSURLFileResourceTypeCharacterSpecial.value = value; - - late final ffi.Pointer - _NSURLFileResourceTypeDirectory = - _lookup('NSURLFileResourceTypeDirectory'); - - NSURLFileResourceType get NSURLFileResourceTypeDirectory => - _NSURLFileResourceTypeDirectory.value; - - set NSURLFileResourceTypeDirectory(NSURLFileResourceType value) => - _NSURLFileResourceTypeDirectory.value = value; - - late final ffi.Pointer - _NSURLFileResourceTypeBlockSpecial = - _lookup('NSURLFileResourceTypeBlockSpecial'); - - NSURLFileResourceType get NSURLFileResourceTypeBlockSpecial => - _NSURLFileResourceTypeBlockSpecial.value; - - set NSURLFileResourceTypeBlockSpecial(NSURLFileResourceType value) => - _NSURLFileResourceTypeBlockSpecial.value = value; - - late final ffi.Pointer _NSURLFileResourceTypeRegular = - _lookup('NSURLFileResourceTypeRegular'); - - NSURLFileResourceType get NSURLFileResourceTypeRegular => - _NSURLFileResourceTypeRegular.value; - - set NSURLFileResourceTypeRegular(NSURLFileResourceType value) => - _NSURLFileResourceTypeRegular.value = value; - - late final ffi.Pointer - _NSURLFileResourceTypeSymbolicLink = - _lookup('NSURLFileResourceTypeSymbolicLink'); - - NSURLFileResourceType get NSURLFileResourceTypeSymbolicLink => - _NSURLFileResourceTypeSymbolicLink.value; - - set NSURLFileResourceTypeSymbolicLink(NSURLFileResourceType value) => - _NSURLFileResourceTypeSymbolicLink.value = value; - - late final ffi.Pointer _NSURLFileResourceTypeSocket = - _lookup('NSURLFileResourceTypeSocket'); - - NSURLFileResourceType get NSURLFileResourceTypeSocket => - _NSURLFileResourceTypeSocket.value; - - set NSURLFileResourceTypeSocket(NSURLFileResourceType value) => - _NSURLFileResourceTypeSocket.value = value; - - late final ffi.Pointer _NSURLFileResourceTypeUnknown = - _lookup('NSURLFileResourceTypeUnknown'); - - NSURLFileResourceType get NSURLFileResourceTypeUnknown => - _NSURLFileResourceTypeUnknown.value; - - set NSURLFileResourceTypeUnknown(NSURLFileResourceType value) => - _NSURLFileResourceTypeUnknown.value = value; - - /// dictionary of NSImage/UIImage objects keyed by size - late final ffi.Pointer _NSURLThumbnailDictionaryKey = - _lookup('NSURLThumbnailDictionaryKey'); - - NSURLResourceKey get NSURLThumbnailDictionaryKey => - _NSURLThumbnailDictionaryKey.value; - - set NSURLThumbnailDictionaryKey(NSURLResourceKey value) => - _NSURLThumbnailDictionaryKey.value = value; - - /// returns all thumbnails as a single NSImage - late final ffi.Pointer _NSURLThumbnailKey = - _lookup('NSURLThumbnailKey'); - - NSURLResourceKey get NSURLThumbnailKey => _NSURLThumbnailKey.value; - - set NSURLThumbnailKey(NSURLResourceKey value) => - _NSURLThumbnailKey.value = value; - - /// size key for a 1024 x 1024 thumbnail image - late final ffi.Pointer - _NSThumbnail1024x1024SizeKey = - _lookup('NSThumbnail1024x1024SizeKey'); - - NSURLThumbnailDictionaryItem get NSThumbnail1024x1024SizeKey => - _NSThumbnail1024x1024SizeKey.value; - - set NSThumbnail1024x1024SizeKey(NSURLThumbnailDictionaryItem value) => - _NSThumbnail1024x1024SizeKey.value = value; - - /// Total file size in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileSizeKey = - _lookup('NSURLFileSizeKey'); - - NSURLResourceKey get NSURLFileSizeKey => _NSURLFileSizeKey.value; - - set NSURLFileSizeKey(NSURLResourceKey value) => - _NSURLFileSizeKey.value = value; - - /// Total size allocated on disk for the file in bytes (number of blocks times block size) (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLFileAllocatedSizeKey = - _lookup('NSURLFileAllocatedSizeKey'); - - NSURLResourceKey get NSURLFileAllocatedSizeKey => - _NSURLFileAllocatedSizeKey.value; - - set NSURLFileAllocatedSizeKey(NSURLResourceKey value) => - _NSURLFileAllocatedSizeKey.value = value; - - /// Total displayable size of the file in bytes (this may include space used by metadata), or nil if not available. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLTotalFileSizeKey = - _lookup('NSURLTotalFileSizeKey'); - - NSURLResourceKey get NSURLTotalFileSizeKey => _NSURLTotalFileSizeKey.value; - - set NSURLTotalFileSizeKey(NSURLResourceKey value) => - _NSURLTotalFileSizeKey.value = value; - - /// Total allocated size of the file in bytes (this may include space used by metadata), or nil if not available. This can be less than the value returned by NSURLTotalFileSizeKey if the resource is compressed. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLTotalFileAllocatedSizeKey = - _lookup('NSURLTotalFileAllocatedSizeKey'); - - NSURLResourceKey get NSURLTotalFileAllocatedSizeKey => - _NSURLTotalFileAllocatedSizeKey.value; - - set NSURLTotalFileAllocatedSizeKey(NSURLResourceKey value) => - _NSURLTotalFileAllocatedSizeKey.value = value; - - /// true if the resource is a Finder alias file or a symlink, false otherwise ( Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsAliasFileKey = - _lookup('NSURLIsAliasFileKey'); - - NSURLResourceKey get NSURLIsAliasFileKey => _NSURLIsAliasFileKey.value; - - set NSURLIsAliasFileKey(NSURLResourceKey value) => - _NSURLIsAliasFileKey.value = value; - - /// The protection level for this file - late final ffi.Pointer _NSURLFileProtectionKey = - _lookup('NSURLFileProtectionKey'); - - NSURLResourceKey get NSURLFileProtectionKey => _NSURLFileProtectionKey.value; - - set NSURLFileProtectionKey(NSURLResourceKey value) => - _NSURLFileProtectionKey.value = value; - - /// The file has no special protections associated with it. It can be read from or written to at any time. - late final ffi.Pointer _NSURLFileProtectionNone = - _lookup('NSURLFileProtectionNone'); - - NSURLFileProtectionType get NSURLFileProtectionNone => - _NSURLFileProtectionNone.value; - - set NSURLFileProtectionNone(NSURLFileProtectionType value) => - _NSURLFileProtectionNone.value = value; - - /// The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting. Transient data files with this protection type should be excluded from backups using NSURLIsExcludedFromBackupKey. - late final ffi.Pointer _NSURLFileProtectionComplete = - _lookup('NSURLFileProtectionComplete'); - - NSURLFileProtectionType get NSURLFileProtectionComplete => - _NSURLFileProtectionComplete.value; - - set NSURLFileProtectionComplete(NSURLFileProtectionType value) => - _NSURLFileProtectionComplete.value = value; - - /// The file is stored in an encrypted format on disk. Files can be created while the device is locked, but once closed, cannot be opened again until the device is unlocked. If the file is opened when unlocked, you may continue to access the file normally, even if the user locks the device. There is a small performance penalty when the file is created and opened, though not when being written to or read from. This can be mitigated by changing the file protection to NSURLFileProtectionComplete when the device is unlocked. Transient data files with this protection type should be excluded from backups using NSURLIsExcludedFromBackupKey. - late final ffi.Pointer - _NSURLFileProtectionCompleteUnlessOpen = - _lookup('NSURLFileProtectionCompleteUnlessOpen'); - - NSURLFileProtectionType get NSURLFileProtectionCompleteUnlessOpen => - _NSURLFileProtectionCompleteUnlessOpen.value; - - set NSURLFileProtectionCompleteUnlessOpen(NSURLFileProtectionType value) => - _NSURLFileProtectionCompleteUnlessOpen.value = value; - - /// The file is stored in an encrypted format on disk and cannot be accessed until after the device has booted. After the user unlocks the device for the first time, your app can access the file and continue to access it even if the user subsequently locks the device. - late final ffi.Pointer - _NSURLFileProtectionCompleteUntilFirstUserAuthentication = - _lookup( - 'NSURLFileProtectionCompleteUntilFirstUserAuthentication'); - - NSURLFileProtectionType - get NSURLFileProtectionCompleteUntilFirstUserAuthentication => - _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value; - - set NSURLFileProtectionCompleteUntilFirstUserAuthentication( - NSURLFileProtectionType value) => - _NSURLFileProtectionCompleteUntilFirstUserAuthentication.value = value; - - /// The file is stored in an encrypted format on disk and cannot be accessed until after first unlock after the device has booted. After this first unlock, your app can access the file even while the device is locked until access expiry. Access is renewed once the user unlocks the device again. - late final ffi.Pointer - _NSURLFileProtectionCompleteWhenUserInactive = - _lookup( - 'NSURLFileProtectionCompleteWhenUserInactive'); - - NSURLFileProtectionType get NSURLFileProtectionCompleteWhenUserInactive => - _NSURLFileProtectionCompleteWhenUserInactive.value; - - set NSURLFileProtectionCompleteWhenUserInactive( - NSURLFileProtectionType value) => - _NSURLFileProtectionCompleteWhenUserInactive.value = value; - - /// Returns the count of file system objects contained in the directory. This is a count of objects actually stored in the file system, so excludes virtual items like "." and "..". The property is useful for quickly identifying an empty directory for backup and syncing. If the URL is not a directory or the file system cannot cheaply compute the value, `nil` is returned. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLDirectoryEntryCountKey = - _lookup('NSURLDirectoryEntryCountKey'); - - NSURLResourceKey get NSURLDirectoryEntryCountKey => - _NSURLDirectoryEntryCountKey.value; - - set NSURLDirectoryEntryCountKey(NSURLResourceKey value) => - _NSURLDirectoryEntryCountKey.value = value; - - /// The user-visible volume format (Read-only, value type NSString) - late final ffi.Pointer - _NSURLVolumeLocalizedFormatDescriptionKey = - _lookup('NSURLVolumeLocalizedFormatDescriptionKey'); - - NSURLResourceKey get NSURLVolumeLocalizedFormatDescriptionKey => - _NSURLVolumeLocalizedFormatDescriptionKey.value; - - set NSURLVolumeLocalizedFormatDescriptionKey(NSURLResourceKey value) => - _NSURLVolumeLocalizedFormatDescriptionKey.value = value; - - /// Total volume capacity in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeTotalCapacityKey = - _lookup('NSURLVolumeTotalCapacityKey'); - - NSURLResourceKey get NSURLVolumeTotalCapacityKey => - _NSURLVolumeTotalCapacityKey.value; - - set NSURLVolumeTotalCapacityKey(NSURLResourceKey value) => - _NSURLVolumeTotalCapacityKey.value = value; - - /// Total free space in bytes (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeAvailableCapacityKey = - _lookup('NSURLVolumeAvailableCapacityKey'); - - NSURLResourceKey get NSURLVolumeAvailableCapacityKey => - _NSURLVolumeAvailableCapacityKey.value; - - set NSURLVolumeAvailableCapacityKey(NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityKey.value = value; - - /// Total number of resources on the volume (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeResourceCountKey = - _lookup('NSURLVolumeResourceCountKey'); - - NSURLResourceKey get NSURLVolumeResourceCountKey => - _NSURLVolumeResourceCountKey.value; - - set NSURLVolumeResourceCountKey(NSURLResourceKey value) => - _NSURLVolumeResourceCountKey.value = value; - - /// true if the volume format supports persistent object identifiers and can look up file system objects by their IDs (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsPersistentIDsKey = - _lookup('NSURLVolumeSupportsPersistentIDsKey'); - - NSURLResourceKey get NSURLVolumeSupportsPersistentIDsKey => - _NSURLVolumeSupportsPersistentIDsKey.value; - - set NSURLVolumeSupportsPersistentIDsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsPersistentIDsKey.value = value; - - /// true if the volume format supports symbolic links (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsSymbolicLinksKey = - _lookup('NSURLVolumeSupportsSymbolicLinksKey'); - - NSURLResourceKey get NSURLVolumeSupportsSymbolicLinksKey => - _NSURLVolumeSupportsSymbolicLinksKey.value; - - set NSURLVolumeSupportsSymbolicLinksKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSymbolicLinksKey.value = value; - - /// true if the volume format supports hard links (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsHardLinksKey = - _lookup('NSURLVolumeSupportsHardLinksKey'); - - NSURLResourceKey get NSURLVolumeSupportsHardLinksKey => - _NSURLVolumeSupportsHardLinksKey.value; - - set NSURLVolumeSupportsHardLinksKey(NSURLResourceKey value) => - _NSURLVolumeSupportsHardLinksKey.value = value; - - /// true if the volume format supports a journal used to speed recovery in case of unplanned restart (such as a power outage or crash). This does not necessarily mean the volume is actively using a journal. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsJournalingKey = - _lookup('NSURLVolumeSupportsJournalingKey'); - - NSURLResourceKey get NSURLVolumeSupportsJournalingKey => - _NSURLVolumeSupportsJournalingKey.value; - - set NSURLVolumeSupportsJournalingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsJournalingKey.value = value; - - /// true if the volume is currently using a journal for speedy recovery after an unplanned restart. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsJournalingKey = - _lookup('NSURLVolumeIsJournalingKey'); - - NSURLResourceKey get NSURLVolumeIsJournalingKey => - _NSURLVolumeIsJournalingKey.value; - - set NSURLVolumeIsJournalingKey(NSURLResourceKey value) => - _NSURLVolumeIsJournalingKey.value = value; - - /// true if the volume format supports sparse files, that is, files which can have 'holes' that have never been written to, and thus do not consume space on disk. A sparse file may have an allocated size on disk that is less than its logical length (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsSparseFilesKey = - _lookup('NSURLVolumeSupportsSparseFilesKey'); - - NSURLResourceKey get NSURLVolumeSupportsSparseFilesKey => - _NSURLVolumeSupportsSparseFilesKey.value; - - set NSURLVolumeSupportsSparseFilesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSparseFilesKey.value = value; - - /// For security reasons, parts of a file (runs) that have never been written to must appear to contain zeroes. true if the volume keeps track of allocated but unwritten runs of a file so that it can substitute zeroes without actually writing zeroes to the media. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsZeroRunsKey = - _lookup('NSURLVolumeSupportsZeroRunsKey'); - - NSURLResourceKey get NSURLVolumeSupportsZeroRunsKey => - _NSURLVolumeSupportsZeroRunsKey.value; - - set NSURLVolumeSupportsZeroRunsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsZeroRunsKey.value = value; - - /// true if the volume format treats upper and lower case characters in file and directory names as different. Otherwise an upper case character is equivalent to a lower case character, and you can't have two names that differ solely in the case of the characters. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsCaseSensitiveNamesKey = - _lookup('NSURLVolumeSupportsCaseSensitiveNamesKey'); - - NSURLResourceKey get NSURLVolumeSupportsCaseSensitiveNamesKey => - _NSURLVolumeSupportsCaseSensitiveNamesKey.value; - - set NSURLVolumeSupportsCaseSensitiveNamesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCaseSensitiveNamesKey.value = value; - - /// true if the volume format preserves the case of file and directory names. Otherwise the volume may change the case of some characters (typically making them all upper or all lower case). (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsCasePreservedNamesKey = - _lookup('NSURLVolumeSupportsCasePreservedNamesKey'); - - NSURLResourceKey get NSURLVolumeSupportsCasePreservedNamesKey => - _NSURLVolumeSupportsCasePreservedNamesKey.value; - - set NSURLVolumeSupportsCasePreservedNamesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCasePreservedNamesKey.value = value; - - /// true if the volume supports reliable storage of times for the root directory. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsRootDirectoryDatesKey = - _lookup('NSURLVolumeSupportsRootDirectoryDatesKey'); - - NSURLResourceKey get NSURLVolumeSupportsRootDirectoryDatesKey => - _NSURLVolumeSupportsRootDirectoryDatesKey.value; - - set NSURLVolumeSupportsRootDirectoryDatesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsRootDirectoryDatesKey.value = value; - - /// true if the volume supports returning volume size values (NSURLVolumeTotalCapacityKey and NSURLVolumeAvailableCapacityKey). (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsVolumeSizesKey = - _lookup('NSURLVolumeSupportsVolumeSizesKey'); - - NSURLResourceKey get NSURLVolumeSupportsVolumeSizesKey => - _NSURLVolumeSupportsVolumeSizesKey.value; - - set NSURLVolumeSupportsVolumeSizesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsVolumeSizesKey.value = value; - - /// true if the volume can be renamed. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsRenamingKey = - _lookup('NSURLVolumeSupportsRenamingKey'); - - NSURLResourceKey get NSURLVolumeSupportsRenamingKey => - _NSURLVolumeSupportsRenamingKey.value; - - set NSURLVolumeSupportsRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsRenamingKey.value = value; - - /// true if the volume implements whole-file flock(2) style advisory locks, and the O_EXLOCK and O_SHLOCK flags of the open(2) call. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsAdvisoryFileLockingKey = - _lookup('NSURLVolumeSupportsAdvisoryFileLockingKey'); - - NSURLResourceKey get NSURLVolumeSupportsAdvisoryFileLockingKey => - _NSURLVolumeSupportsAdvisoryFileLockingKey.value; - - set NSURLVolumeSupportsAdvisoryFileLockingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsAdvisoryFileLockingKey.value = value; - - /// true if the volume implements extended security (ACLs). (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsExtendedSecurityKey = - _lookup('NSURLVolumeSupportsExtendedSecurityKey'); - - NSURLResourceKey get NSURLVolumeSupportsExtendedSecurityKey => - _NSURLVolumeSupportsExtendedSecurityKey.value; - - set NSURLVolumeSupportsExtendedSecurityKey(NSURLResourceKey value) => - _NSURLVolumeSupportsExtendedSecurityKey.value = value; - - /// true if the volume should be visible via the GUI (i.e., appear on the Desktop as a separate volume). (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsBrowsableKey = - _lookup('NSURLVolumeIsBrowsableKey'); - - NSURLResourceKey get NSURLVolumeIsBrowsableKey => - _NSURLVolumeIsBrowsableKey.value; - - set NSURLVolumeIsBrowsableKey(NSURLResourceKey value) => - _NSURLVolumeIsBrowsableKey.value = value; - - /// The largest file size (in bytes) supported by this file system, or nil if this cannot be determined. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeMaximumFileSizeKey = - _lookup('NSURLVolumeMaximumFileSizeKey'); - - NSURLResourceKey get NSURLVolumeMaximumFileSizeKey => - _NSURLVolumeMaximumFileSizeKey.value; - - set NSURLVolumeMaximumFileSizeKey(NSURLResourceKey value) => - _NSURLVolumeMaximumFileSizeKey.value = value; - - /// true if the volume's media is ejectable from the drive mechanism under software control. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsEjectableKey = - _lookup('NSURLVolumeIsEjectableKey'); - - NSURLResourceKey get NSURLVolumeIsEjectableKey => - _NSURLVolumeIsEjectableKey.value; - - set NSURLVolumeIsEjectableKey(NSURLResourceKey value) => - _NSURLVolumeIsEjectableKey.value = value; - - /// true if the volume's media is removable from the drive mechanism. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsRemovableKey = - _lookup('NSURLVolumeIsRemovableKey'); - - NSURLResourceKey get NSURLVolumeIsRemovableKey => - _NSURLVolumeIsRemovableKey.value; - - set NSURLVolumeIsRemovableKey(NSURLResourceKey value) => - _NSURLVolumeIsRemovableKey.value = value; - - /// true if the volume's device is connected to an internal bus, false if connected to an external bus, or nil if not available. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsInternalKey = - _lookup('NSURLVolumeIsInternalKey'); - - NSURLResourceKey get NSURLVolumeIsInternalKey => - _NSURLVolumeIsInternalKey.value; - - set NSURLVolumeIsInternalKey(NSURLResourceKey value) => - _NSURLVolumeIsInternalKey.value = value; - - /// true if the volume is automounted. Note: do not mistake this with the functionality provided by kCFURLVolumeSupportsBrowsingKey. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsAutomountedKey = - _lookup('NSURLVolumeIsAutomountedKey'); - - NSURLResourceKey get NSURLVolumeIsAutomountedKey => - _NSURLVolumeIsAutomountedKey.value; - - set NSURLVolumeIsAutomountedKey(NSURLResourceKey value) => - _NSURLVolumeIsAutomountedKey.value = value; - - /// true if the volume is stored on a local device. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsLocalKey = - _lookup('NSURLVolumeIsLocalKey'); - - NSURLResourceKey get NSURLVolumeIsLocalKey => _NSURLVolumeIsLocalKey.value; - - set NSURLVolumeIsLocalKey(NSURLResourceKey value) => - _NSURLVolumeIsLocalKey.value = value; - - /// true if the volume is read-only. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsReadOnlyKey = - _lookup('NSURLVolumeIsReadOnlyKey'); - - NSURLResourceKey get NSURLVolumeIsReadOnlyKey => - _NSURLVolumeIsReadOnlyKey.value; - - set NSURLVolumeIsReadOnlyKey(NSURLResourceKey value) => - _NSURLVolumeIsReadOnlyKey.value = value; - - /// The volume's creation date, or nil if this cannot be determined. (Read-only, value type NSDate) - late final ffi.Pointer _NSURLVolumeCreationDateKey = - _lookup('NSURLVolumeCreationDateKey'); - - NSURLResourceKey get NSURLVolumeCreationDateKey => - _NSURLVolumeCreationDateKey.value; - - set NSURLVolumeCreationDateKey(NSURLResourceKey value) => - _NSURLVolumeCreationDateKey.value = value; - - /// The NSURL needed to remount a network volume, or nil if not available. (Read-only, value type NSURL) - late final ffi.Pointer _NSURLVolumeURLForRemountingKey = - _lookup('NSURLVolumeURLForRemountingKey'); - - NSURLResourceKey get NSURLVolumeURLForRemountingKey => - _NSURLVolumeURLForRemountingKey.value; - - set NSURLVolumeURLForRemountingKey(NSURLResourceKey value) => - _NSURLVolumeURLForRemountingKey.value = value; - - /// The volume's persistent UUID as a string, or nil if a persistent UUID is not available for the volume. (Read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeUUIDStringKey = - _lookup('NSURLVolumeUUIDStringKey'); - - NSURLResourceKey get NSURLVolumeUUIDStringKey => - _NSURLVolumeUUIDStringKey.value; - - set NSURLVolumeUUIDStringKey(NSURLResourceKey value) => - _NSURLVolumeUUIDStringKey.value = value; - - /// The name of the volume (Read-write if NSURLVolumeSupportsRenamingKey is YES, otherwise read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeNameKey = - _lookup('NSURLVolumeNameKey'); - - NSURLResourceKey get NSURLVolumeNameKey => _NSURLVolumeNameKey.value; - - set NSURLVolumeNameKey(NSURLResourceKey value) => - _NSURLVolumeNameKey.value = value; - - /// The user-presentable name of the volume (Read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeLocalizedNameKey = - _lookup('NSURLVolumeLocalizedNameKey'); - - NSURLResourceKey get NSURLVolumeLocalizedNameKey => - _NSURLVolumeLocalizedNameKey.value; - - set NSURLVolumeLocalizedNameKey(NSURLResourceKey value) => - _NSURLVolumeLocalizedNameKey.value = value; - - /// true if the volume is encrypted. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsEncryptedKey = - _lookup('NSURLVolumeIsEncryptedKey'); - - NSURLResourceKey get NSURLVolumeIsEncryptedKey => - _NSURLVolumeIsEncryptedKey.value; - - set NSURLVolumeIsEncryptedKey(NSURLResourceKey value) => - _NSURLVolumeIsEncryptedKey.value = value; - - /// true if the volume is the root filesystem. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeIsRootFileSystemKey = - _lookup('NSURLVolumeIsRootFileSystemKey'); - - NSURLResourceKey get NSURLVolumeIsRootFileSystemKey => - _NSURLVolumeIsRootFileSystemKey.value; - - set NSURLVolumeIsRootFileSystemKey(NSURLResourceKey value) => - _NSURLVolumeIsRootFileSystemKey.value = value; - - /// true if the volume supports transparent decompression of compressed files using decmpfs. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsCompressionKey = - _lookup('NSURLVolumeSupportsCompressionKey'); - - NSURLResourceKey get NSURLVolumeSupportsCompressionKey => - _NSURLVolumeSupportsCompressionKey.value; - - set NSURLVolumeSupportsCompressionKey(NSURLResourceKey value) => - _NSURLVolumeSupportsCompressionKey.value = value; - - /// true if the volume supports clonefile(2) (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsFileCloningKey = - _lookup('NSURLVolumeSupportsFileCloningKey'); - - NSURLResourceKey get NSURLVolumeSupportsFileCloningKey => - _NSURLVolumeSupportsFileCloningKey.value; - - set NSURLVolumeSupportsFileCloningKey(NSURLResourceKey value) => - _NSURLVolumeSupportsFileCloningKey.value = value; - - /// true if the volume supports renamex_np(2)'s RENAME_SWAP option (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLVolumeSupportsSwapRenamingKey = - _lookup('NSURLVolumeSupportsSwapRenamingKey'); - - NSURLResourceKey get NSURLVolumeSupportsSwapRenamingKey => - _NSURLVolumeSupportsSwapRenamingKey.value; - - set NSURLVolumeSupportsSwapRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsSwapRenamingKey.value = value; - - /// true if the volume supports renamex_np(2)'s RENAME_EXCL option (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsExclusiveRenamingKey = - _lookup('NSURLVolumeSupportsExclusiveRenamingKey'); - - NSURLResourceKey get NSURLVolumeSupportsExclusiveRenamingKey => - _NSURLVolumeSupportsExclusiveRenamingKey.value; - - set NSURLVolumeSupportsExclusiveRenamingKey(NSURLResourceKey value) => - _NSURLVolumeSupportsExclusiveRenamingKey.value = value; - - /// true if the volume supports making files immutable with the NSURLIsUserImmutableKey or NSURLIsSystemImmutableKey properties (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsImmutableFilesKey = - _lookup('NSURLVolumeSupportsImmutableFilesKey'); - - NSURLResourceKey get NSURLVolumeSupportsImmutableFilesKey => - _NSURLVolumeSupportsImmutableFilesKey.value; - - set NSURLVolumeSupportsImmutableFilesKey(NSURLResourceKey value) => - _NSURLVolumeSupportsImmutableFilesKey.value = value; - - /// true if the volume supports setting POSIX access permissions with the NSURLFileSecurityKey property (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsAccessPermissionsKey = - _lookup('NSURLVolumeSupportsAccessPermissionsKey'); - - NSURLResourceKey get NSURLVolumeSupportsAccessPermissionsKey => - _NSURLVolumeSupportsAccessPermissionsKey.value; - - set NSURLVolumeSupportsAccessPermissionsKey(NSURLResourceKey value) => - _NSURLVolumeSupportsAccessPermissionsKey.value = value; - - /// True if the volume supports the File Protection attribute (see NSURLFileProtectionKey). (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeSupportsFileProtectionKey = - _lookup('NSURLVolumeSupportsFileProtectionKey'); - - NSURLResourceKey get NSURLVolumeSupportsFileProtectionKey => - _NSURLVolumeSupportsFileProtectionKey.value; - - set NSURLVolumeSupportsFileProtectionKey(NSURLResourceKey value) => - _NSURLVolumeSupportsFileProtectionKey.value = value; - - /// (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeAvailableCapacityForImportantUsageKey = - _lookup( - 'NSURLVolumeAvailableCapacityForImportantUsageKey'); - - NSURLResourceKey get NSURLVolumeAvailableCapacityForImportantUsageKey => - _NSURLVolumeAvailableCapacityForImportantUsageKey.value; - - set NSURLVolumeAvailableCapacityForImportantUsageKey( - NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityForImportantUsageKey.value = value; - - /// (Read-only, value type NSNumber) - late final ffi.Pointer - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey = - _lookup( - 'NSURLVolumeAvailableCapacityForOpportunisticUsageKey'); - - NSURLResourceKey get NSURLVolumeAvailableCapacityForOpportunisticUsageKey => - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value; - - set NSURLVolumeAvailableCapacityForOpportunisticUsageKey( - NSURLResourceKey value) => - _NSURLVolumeAvailableCapacityForOpportunisticUsageKey.value = value; - - /// The name of the file system type. (Read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeTypeNameKey = - _lookup('NSURLVolumeTypeNameKey'); - - NSURLResourceKey get NSURLVolumeTypeNameKey => _NSURLVolumeTypeNameKey.value; - - set NSURLVolumeTypeNameKey(NSURLResourceKey value) => - _NSURLVolumeTypeNameKey.value = value; - - /// The file system subtype value. (Read-only, value type NSNumber) - late final ffi.Pointer _NSURLVolumeSubtypeKey = - _lookup('NSURLVolumeSubtypeKey'); - - NSURLResourceKey get NSURLVolumeSubtypeKey => _NSURLVolumeSubtypeKey.value; - - set NSURLVolumeSubtypeKey(NSURLResourceKey value) => - _NSURLVolumeSubtypeKey.value = value; - - /// The volume mounted from location. (Read-only, value type NSString) - late final ffi.Pointer _NSURLVolumeMountFromLocationKey = - _lookup('NSURLVolumeMountFromLocationKey'); - - NSURLResourceKey get NSURLVolumeMountFromLocationKey => - _NSURLVolumeMountFromLocationKey.value; - - set NSURLVolumeMountFromLocationKey(NSURLResourceKey value) => - _NSURLVolumeMountFromLocationKey.value = value; - - /// true if this item is synced to the cloud, false if it is only a local file. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLIsUbiquitousItemKey = - _lookup('NSURLIsUbiquitousItemKey'); - - NSURLResourceKey get NSURLIsUbiquitousItemKey => - _NSURLIsUbiquitousItemKey.value; - - set NSURLIsUbiquitousItemKey(NSURLResourceKey value) => - _NSURLIsUbiquitousItemKey.value = value; - - /// true if this item has conflicts outstanding. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemHasUnresolvedConflictsKey = - _lookup('NSURLUbiquitousItemHasUnresolvedConflictsKey'); - - NSURLResourceKey get NSURLUbiquitousItemHasUnresolvedConflictsKey => - _NSURLUbiquitousItemHasUnresolvedConflictsKey.value; - - set NSURLUbiquitousItemHasUnresolvedConflictsKey(NSURLResourceKey value) => - _NSURLUbiquitousItemHasUnresolvedConflictsKey.value = value; - - /// equivalent to NSURLUbiquitousItemDownloadingStatusKey == NSURLUbiquitousItemDownloadingStatusCurrent. Has never behaved as documented in earlier releases, hence deprecated. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsDownloadedKey = - _lookup('NSURLUbiquitousItemIsDownloadedKey'); - - NSURLResourceKey get NSURLUbiquitousItemIsDownloadedKey => - _NSURLUbiquitousItemIsDownloadedKey.value; - - set NSURLUbiquitousItemIsDownloadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsDownloadedKey.value = value; - - /// true if data is being downloaded for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemIsDownloadingKey = - _lookup('NSURLUbiquitousItemIsDownloadingKey'); - - NSURLResourceKey get NSURLUbiquitousItemIsDownloadingKey => - _NSURLUbiquitousItemIsDownloadingKey.value; - - set NSURLUbiquitousItemIsDownloadingKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsDownloadingKey.value = value; - - /// true if there is data present in the cloud for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsUploadedKey = - _lookup('NSURLUbiquitousItemIsUploadedKey'); - - NSURLResourceKey get NSURLUbiquitousItemIsUploadedKey => - _NSURLUbiquitousItemIsUploadedKey.value; - - set NSURLUbiquitousItemIsUploadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsUploadedKey.value = value; - - /// true if data is being uploaded for this item. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsUploadingKey = - _lookup('NSURLUbiquitousItemIsUploadingKey'); - - NSURLResourceKey get NSURLUbiquitousItemIsUploadingKey => - _NSURLUbiquitousItemIsUploadingKey.value; - - set NSURLUbiquitousItemIsUploadingKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsUploadingKey.value = value; - - /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead - late final ffi.Pointer - _NSURLUbiquitousItemPercentDownloadedKey = - _lookup('NSURLUbiquitousItemPercentDownloadedKey'); - - NSURLResourceKey get NSURLUbiquitousItemPercentDownloadedKey => - _NSURLUbiquitousItemPercentDownloadedKey.value; - - set NSURLUbiquitousItemPercentDownloadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemPercentDownloadedKey.value = value; - - /// Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead - late final ffi.Pointer - _NSURLUbiquitousItemPercentUploadedKey = - _lookup('NSURLUbiquitousItemPercentUploadedKey'); - - NSURLResourceKey get NSURLUbiquitousItemPercentUploadedKey => - _NSURLUbiquitousItemPercentUploadedKey.value; - - set NSURLUbiquitousItemPercentUploadedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemPercentUploadedKey.value = value; - - /// returns the download status of this item. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusKey = - _lookup('NSURLUbiquitousItemDownloadingStatusKey'); - - NSURLResourceKey get NSURLUbiquitousItemDownloadingStatusKey => - _NSURLUbiquitousItemDownloadingStatusKey.value; - - set NSURLUbiquitousItemDownloadingStatusKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadingStatusKey.value = value; - - /// returns the error when downloading the item from iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingErrorKey = - _lookup('NSURLUbiquitousItemDownloadingErrorKey'); - - NSURLResourceKey get NSURLUbiquitousItemDownloadingErrorKey => - _NSURLUbiquitousItemDownloadingErrorKey.value; - - set NSURLUbiquitousItemDownloadingErrorKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadingErrorKey.value = value; - - /// returns the error when uploading the item to iCloud failed, see the NSUbiquitousFile section in FoundationErrors.h (Read-only, value type NSError) - late final ffi.Pointer - _NSURLUbiquitousItemUploadingErrorKey = - _lookup('NSURLUbiquitousItemUploadingErrorKey'); - - NSURLResourceKey get NSURLUbiquitousItemUploadingErrorKey => - _NSURLUbiquitousItemUploadingErrorKey.value; - - set NSURLUbiquitousItemUploadingErrorKey(NSURLResourceKey value) => - _NSURLUbiquitousItemUploadingErrorKey.value = value; - - /// returns whether a download of this item has already been requested with an API like -startDownloadingUbiquitousItemAtURL:error: (Read-only, value type boolean NSNumber) - late final ffi.Pointer - _NSURLUbiquitousItemDownloadRequestedKey = - _lookup('NSURLUbiquitousItemDownloadRequestedKey'); - - NSURLResourceKey get NSURLUbiquitousItemDownloadRequestedKey => - _NSURLUbiquitousItemDownloadRequestedKey.value; - - set NSURLUbiquitousItemDownloadRequestedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemDownloadRequestedKey.value = value; - - /// returns the name of this item's container as displayed to users. - late final ffi.Pointer - _NSURLUbiquitousItemContainerDisplayNameKey = - _lookup('NSURLUbiquitousItemContainerDisplayNameKey'); - - NSURLResourceKey get NSURLUbiquitousItemContainerDisplayNameKey => - _NSURLUbiquitousItemContainerDisplayNameKey.value; - - set NSURLUbiquitousItemContainerDisplayNameKey(NSURLResourceKey value) => - _NSURLUbiquitousItemContainerDisplayNameKey.value = value; - - /// true if the item is excluded from sync, which means it is locally on disk but won't be available on the server. An excluded item is no longer ubiquitous. (Read-write, value type boolean NSNumber - late final ffi.Pointer - _NSURLUbiquitousItemIsExcludedFromSyncKey = - _lookup('NSURLUbiquitousItemIsExcludedFromSyncKey'); - - NSURLResourceKey get NSURLUbiquitousItemIsExcludedFromSyncKey => - _NSURLUbiquitousItemIsExcludedFromSyncKey.value; - - set NSURLUbiquitousItemIsExcludedFromSyncKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsExcludedFromSyncKey.value = value; - - /// true if the ubiquitous item is shared. (Read-only, value type boolean NSNumber) - late final ffi.Pointer _NSURLUbiquitousItemIsSharedKey = - _lookup('NSURLUbiquitousItemIsSharedKey'); - - NSURLResourceKey get NSURLUbiquitousItemIsSharedKey => - _NSURLUbiquitousItemIsSharedKey.value; - - set NSURLUbiquitousItemIsSharedKey(NSURLResourceKey value) => - _NSURLUbiquitousItemIsSharedKey.value = value; - - /// returns the current user's role for this shared item, or nil if not shared. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousSharedItemCurrentUserRoleKey = - _lookup('NSURLUbiquitousSharedItemCurrentUserRoleKey'); - - NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserRoleKey => - _NSURLUbiquitousSharedItemCurrentUserRoleKey.value; - - set NSURLUbiquitousSharedItemCurrentUserRoleKey(NSURLResourceKey value) => - _NSURLUbiquitousSharedItemCurrentUserRoleKey.value = value; - - /// returns the permissions for the current user, or nil if not shared. (Read-only, value type NSString). Possible values below. - late final ffi.Pointer - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey = - _lookup( - 'NSURLUbiquitousSharedItemCurrentUserPermissionsKey'); - - NSURLResourceKey get NSURLUbiquitousSharedItemCurrentUserPermissionsKey => - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value; - - set NSURLUbiquitousSharedItemCurrentUserPermissionsKey( - NSURLResourceKey value) => - _NSURLUbiquitousSharedItemCurrentUserPermissionsKey.value = value; - - /// returns a NSPersonNameComponents, or nil if the current user. (Read-only, value type NSPersonNameComponents) - late final ffi.Pointer - _NSURLUbiquitousSharedItemOwnerNameComponentsKey = - _lookup( - 'NSURLUbiquitousSharedItemOwnerNameComponentsKey'); - - NSURLResourceKey get NSURLUbiquitousSharedItemOwnerNameComponentsKey => - _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value; - - set NSURLUbiquitousSharedItemOwnerNameComponentsKey(NSURLResourceKey value) => - _NSURLUbiquitousSharedItemOwnerNameComponentsKey.value = value; - - /// returns a NSPersonNameComponents for the most recent editor of the document, or nil if it is the current user. (Read-only, value type NSPersonNameComponents) - late final ffi.Pointer - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey = - _lookup( - 'NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey'); - - NSURLResourceKey - get NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey => - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value; - - set NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey( - NSURLResourceKey value) => - _NSURLUbiquitousSharedItemMostRecentEditorNameComponentsKey.value = value; - - /// this item has not been downloaded yet. Use startDownloadingUbiquitousItemAtURL:error: to download it. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusNotDownloaded = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusNotDownloaded'); - - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusNotDownloaded => - _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value; - - set NSURLUbiquitousItemDownloadingStatusNotDownloaded( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusNotDownloaded.value = value; - - /// there is a local version of this item available. The most current version will get downloaded as soon as possible. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusDownloaded = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusDownloaded'); - - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusDownloaded => - _NSURLUbiquitousItemDownloadingStatusDownloaded.value; - - set NSURLUbiquitousItemDownloadingStatusDownloaded( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusDownloaded.value = value; - - /// there is a local version of this item and it is the most up-to-date version known to this device. - late final ffi.Pointer - _NSURLUbiquitousItemDownloadingStatusCurrent = - _lookup( - 'NSURLUbiquitousItemDownloadingStatusCurrent'); - - NSURLUbiquitousItemDownloadingStatus - get NSURLUbiquitousItemDownloadingStatusCurrent => - _NSURLUbiquitousItemDownloadingStatusCurrent.value; - - set NSURLUbiquitousItemDownloadingStatusCurrent( - NSURLUbiquitousItemDownloadingStatus value) => - _NSURLUbiquitousItemDownloadingStatusCurrent.value = value; - - /// the current user is the owner of this shared item. - late final ffi.Pointer - _NSURLUbiquitousSharedItemRoleOwner = - _lookup( - 'NSURLUbiquitousSharedItemRoleOwner'); - - NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleOwner => - _NSURLUbiquitousSharedItemRoleOwner.value; - - set NSURLUbiquitousSharedItemRoleOwner(NSURLUbiquitousSharedItemRole value) => - _NSURLUbiquitousSharedItemRoleOwner.value = value; - - /// the current user is a participant of this shared item. - late final ffi.Pointer - _NSURLUbiquitousSharedItemRoleParticipant = - _lookup( - 'NSURLUbiquitousSharedItemRoleParticipant'); - - NSURLUbiquitousSharedItemRole get NSURLUbiquitousSharedItemRoleParticipant => - _NSURLUbiquitousSharedItemRoleParticipant.value; - - set NSURLUbiquitousSharedItemRoleParticipant( - NSURLUbiquitousSharedItemRole value) => - _NSURLUbiquitousSharedItemRoleParticipant.value = value; - - /// the current user is only allowed to read this item - late final ffi.Pointer - _NSURLUbiquitousSharedItemPermissionsReadOnly = - _lookup( - 'NSURLUbiquitousSharedItemPermissionsReadOnly'); - - NSURLUbiquitousSharedItemPermissions - get NSURLUbiquitousSharedItemPermissionsReadOnly => - _NSURLUbiquitousSharedItemPermissionsReadOnly.value; - - set NSURLUbiquitousSharedItemPermissionsReadOnly( - NSURLUbiquitousSharedItemPermissions value) => - _NSURLUbiquitousSharedItemPermissionsReadOnly.value = value; - - /// the current user is allowed to both read and write this item - late final ffi.Pointer - _NSURLUbiquitousSharedItemPermissionsReadWrite = - _lookup( - 'NSURLUbiquitousSharedItemPermissionsReadWrite'); - - NSURLUbiquitousSharedItemPermissions - get NSURLUbiquitousSharedItemPermissionsReadWrite => - _NSURLUbiquitousSharedItemPermissionsReadWrite.value; - - set NSURLUbiquitousSharedItemPermissionsReadWrite( - NSURLUbiquitousSharedItemPermissions value) => - _NSURLUbiquitousSharedItemPermissionsReadWrite.value = value; - - late final _class_NSURLQueryItem1 = _getClass1("NSURLQueryItem"); - late final _sel_initWithName_value_1 = _registerName1("initWithName:value:"); - instancetype _objc_msgSend_519( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer name, - ffi.Pointer value, - ) { - return __objc_msgSend_519( - obj, - sel, - name, - value, - ); - } - - late final __objc_msgSend_519Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_519 = __objc_msgSend_519Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_queryItemWithName_value_1 = - _registerName1("queryItemWithName:value:"); - late final _sel_value1 = _registerName1("value"); - late final _class_NSURLComponents1 = _getClass1("NSURLComponents"); - late final _sel_initWithURL_resolvingAgainstBaseURL_1 = - _registerName1("initWithURL:resolvingAgainstBaseURL:"); - late final _sel_componentsWithURL_resolvingAgainstBaseURL_1 = - _registerName1("componentsWithURL:resolvingAgainstBaseURL:"); - late final _sel_componentsWithString_1 = - _registerName1("componentsWithString:"); - late final _sel_componentsWithString_encodingInvalidCharacters_1 = - _registerName1("componentsWithString:encodingInvalidCharacters:"); - late final _sel_URLRelativeToURL_1 = _registerName1("URLRelativeToURL:"); - ffi.Pointer _objc_msgSend_520( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer baseURL, - ) { - return __objc_msgSend_520( - obj, - sel, - baseURL, - ); - } - - late final __objc_msgSend_520Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_520 = __objc_msgSend_520Ptr.asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_setScheme_1 = _registerName1("setScheme:"); - late final _sel_setUser_1 = _registerName1("setUser:"); - late final _sel_setPassword_1 = _registerName1("setPassword:"); - late final _sel_setHost_1 = _registerName1("setHost:"); - late final _sel_setPort_1 = _registerName1("setPort:"); - late final _sel_setPath_1 = _registerName1("setPath:"); - late final _sel_setQuery_1 = _registerName1("setQuery:"); - late final _sel_setFragment_1 = _registerName1("setFragment:"); - late final _sel_percentEncodedUser1 = _registerName1("percentEncodedUser"); - late final _sel_setPercentEncodedUser_1 = - _registerName1("setPercentEncodedUser:"); - late final _sel_percentEncodedPassword1 = - _registerName1("percentEncodedPassword"); - late final _sel_setPercentEncodedPassword_1 = - _registerName1("setPercentEncodedPassword:"); - late final _sel_percentEncodedHost1 = _registerName1("percentEncodedHost"); - late final _sel_setPercentEncodedHost_1 = - _registerName1("setPercentEncodedHost:"); - late final _sel_percentEncodedPath1 = _registerName1("percentEncodedPath"); - late final _sel_setPercentEncodedPath_1 = - _registerName1("setPercentEncodedPath:"); - late final _sel_percentEncodedQuery1 = _registerName1("percentEncodedQuery"); - late final _sel_setPercentEncodedQuery_1 = - _registerName1("setPercentEncodedQuery:"); - late final _sel_percentEncodedFragment1 = - _registerName1("percentEncodedFragment"); - late final _sel_setPercentEncodedFragment_1 = - _registerName1("setPercentEncodedFragment:"); - late final _sel_encodedHost1 = _registerName1("encodedHost"); - late final _sel_setEncodedHost_1 = _registerName1("setEncodedHost:"); - late final _sel_rangeOfScheme1 = _registerName1("rangeOfScheme"); - late final _sel_rangeOfUser1 = _registerName1("rangeOfUser"); - late final _sel_rangeOfPassword1 = _registerName1("rangeOfPassword"); - late final _sel_rangeOfHost1 = _registerName1("rangeOfHost"); - late final _sel_rangeOfPort1 = _registerName1("rangeOfPort"); - late final _sel_rangeOfPath1 = _registerName1("rangeOfPath"); - late final _sel_rangeOfQuery1 = _registerName1("rangeOfQuery"); - late final _sel_rangeOfFragment1 = _registerName1("rangeOfFragment"); - late final _sel_queryItems1 = _registerName1("queryItems"); - late final _sel_setQueryItems_1 = _registerName1("setQueryItems:"); - late final _sel_percentEncodedQueryItems1 = - _registerName1("percentEncodedQueryItems"); - late final _sel_setPercentEncodedQueryItems_1 = - _registerName1("setPercentEncodedQueryItems:"); - late final _class_NSFileSecurity1 = _getClass1("NSFileSecurity"); - late final _class_NSHTTPURLResponse1 = _getClass1("NSHTTPURLResponse"); - late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_1 = - _registerName1("initWithURL:statusCode:HTTPVersion:headerFields:"); - instancetype _objc_msgSend_521( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer url, - int statusCode, - ffi.Pointer HTTPVersion, - ffi.Pointer headerFields, - ) { - return __objc_msgSend_521( - obj, - sel, - url, - statusCode, - HTTPVersion, - headerFields, - ); - } - - late final __objc_msgSend_521Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_521 = __objc_msgSend_521Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_statusCode1 = _registerName1("statusCode"); - late final _sel_allHeaderFields1 = _registerName1("allHeaderFields"); - late final _sel_localizedStringForStatusCode_1 = - _registerName1("localizedStringForStatusCode:"); - ffi.Pointer _objc_msgSend_522( - ffi.Pointer obj, - ffi.Pointer sel, - int statusCode, - ) { - return __objc_msgSend_522( - obj, - sel, - statusCode, - ); - } - - late final __objc_msgSend_522Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSInteger)>>('objc_msgSend'); - late final __objc_msgSend_522 = __objc_msgSend_522Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final ffi.Pointer _NSGenericException = - _lookup('NSGenericException'); - - NSExceptionName get NSGenericException => _NSGenericException.value; - - set NSGenericException(NSExceptionName value) => - _NSGenericException.value = value; - - late final ffi.Pointer _NSRangeException = - _lookup('NSRangeException'); - - NSExceptionName get NSRangeException => _NSRangeException.value; - - set NSRangeException(NSExceptionName value) => - _NSRangeException.value = value; - - late final ffi.Pointer _NSInvalidArgumentException = - _lookup('NSInvalidArgumentException'); - - NSExceptionName get NSInvalidArgumentException => - _NSInvalidArgumentException.value; - - set NSInvalidArgumentException(NSExceptionName value) => - _NSInvalidArgumentException.value = value; - - late final ffi.Pointer _NSInternalInconsistencyException = - _lookup('NSInternalInconsistencyException'); - - NSExceptionName get NSInternalInconsistencyException => - _NSInternalInconsistencyException.value; - - set NSInternalInconsistencyException(NSExceptionName value) => - _NSInternalInconsistencyException.value = value; - - late final ffi.Pointer _NSMallocException = - _lookup('NSMallocException'); - - NSExceptionName get NSMallocException => _NSMallocException.value; - - set NSMallocException(NSExceptionName value) => - _NSMallocException.value = value; - - late final ffi.Pointer _NSObjectInaccessibleException = - _lookup('NSObjectInaccessibleException'); - - NSExceptionName get NSObjectInaccessibleException => - _NSObjectInaccessibleException.value; - - set NSObjectInaccessibleException(NSExceptionName value) => - _NSObjectInaccessibleException.value = value; - - late final ffi.Pointer _NSObjectNotAvailableException = - _lookup('NSObjectNotAvailableException'); - - NSExceptionName get NSObjectNotAvailableException => - _NSObjectNotAvailableException.value; - - set NSObjectNotAvailableException(NSExceptionName value) => - _NSObjectNotAvailableException.value = value; - - late final ffi.Pointer _NSDestinationInvalidException = - _lookup('NSDestinationInvalidException'); - - NSExceptionName get NSDestinationInvalidException => - _NSDestinationInvalidException.value; - - set NSDestinationInvalidException(NSExceptionName value) => - _NSDestinationInvalidException.value = value; - - late final ffi.Pointer _NSPortTimeoutException = - _lookup('NSPortTimeoutException'); - - NSExceptionName get NSPortTimeoutException => _NSPortTimeoutException.value; - - set NSPortTimeoutException(NSExceptionName value) => - _NSPortTimeoutException.value = value; - - late final ffi.Pointer _NSInvalidSendPortException = - _lookup('NSInvalidSendPortException'); - - NSExceptionName get NSInvalidSendPortException => - _NSInvalidSendPortException.value; - - set NSInvalidSendPortException(NSExceptionName value) => - _NSInvalidSendPortException.value = value; - - late final ffi.Pointer _NSInvalidReceivePortException = - _lookup('NSInvalidReceivePortException'); - - NSExceptionName get NSInvalidReceivePortException => - _NSInvalidReceivePortException.value; - - set NSInvalidReceivePortException(NSExceptionName value) => - _NSInvalidReceivePortException.value = value; - - late final ffi.Pointer _NSPortSendException = - _lookup('NSPortSendException'); - - NSExceptionName get NSPortSendException => _NSPortSendException.value; - - set NSPortSendException(NSExceptionName value) => - _NSPortSendException.value = value; - - late final ffi.Pointer _NSPortReceiveException = - _lookup('NSPortReceiveException'); - - NSExceptionName get NSPortReceiveException => _NSPortReceiveException.value; - - set NSPortReceiveException(NSExceptionName value) => - _NSPortReceiveException.value = value; - - late final ffi.Pointer _NSOldStyleException = - _lookup('NSOldStyleException'); - - NSExceptionName get NSOldStyleException => _NSOldStyleException.value; - - set NSOldStyleException(NSExceptionName value) => - _NSOldStyleException.value = value; - - late final ffi.Pointer _NSInconsistentArchiveException = - _lookup('NSInconsistentArchiveException'); - - NSExceptionName get NSInconsistentArchiveException => - _NSInconsistentArchiveException.value; - - set NSInconsistentArchiveException(NSExceptionName value) => - _NSInconsistentArchiveException.value = value; - - late final _class_NSException1 = _getClass1("NSException"); - late final _sel_exceptionWithName_reason_userInfo_1 = - _registerName1("exceptionWithName:reason:userInfo:"); - ffi.Pointer _objc_msgSend_523( - ffi.Pointer obj, - ffi.Pointer sel, - NSExceptionName name, - ffi.Pointer reason, - ffi.Pointer userInfo, - ) { - return __objc_msgSend_523( - obj, - sel, - name, - reason, - userInfo, - ); - } - - late final __objc_msgSend_523Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSExceptionName, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_523 = __objc_msgSend_523Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - NSExceptionName, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithName_reason_userInfo_1 = - _registerName1("initWithName:reason:userInfo:"); - instancetype _objc_msgSend_524( - ffi.Pointer obj, - ffi.Pointer sel, - NSExceptionName aName, - ffi.Pointer aReason, - ffi.Pointer aUserInfo, - ) { - return __objc_msgSend_524( - obj, - sel, - aName, - aReason, - aUserInfo, - ); - } - - late final __objc_msgSend_524Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - NSExceptionName, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_524 = __objc_msgSend_524Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - NSExceptionName, ffi.Pointer, ffi.Pointer)>(); - - late final _sel_reason1 = _registerName1("reason"); - late final _sel_callStackReturnAddresses1 = - _registerName1("callStackReturnAddresses"); - late final _sel_callStackSymbols1 = _registerName1("callStackSymbols"); - late final _sel_raise1 = _registerName1("raise"); - late final _sel_raise_format_1 = _registerName1("raise:format:"); - late final _sel_raise_format_arguments_1 = - _registerName1("raise:format:arguments:"); - void _objc_msgSend_525( - ffi.Pointer obj, - ffi.Pointer sel, - NSExceptionName name, - ffi.Pointer format, - va_list argList, - ) { - return __objc_msgSend_525( - obj, - sel, - name, - format, - argList, - ); - } - - late final __objc_msgSend_525Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSExceptionName, - ffi.Pointer, - va_list)>>('objc_msgSend'); - late final __objc_msgSend_525 = __objc_msgSend_525Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - NSExceptionName, ffi.Pointer, va_list)>(); - - ffi.Pointer NSGetUncaughtExceptionHandler() { - return _NSGetUncaughtExceptionHandler(); - } - - late final _NSGetUncaughtExceptionHandlerPtr = _lookup< - ffi - .NativeFunction Function()>>( - 'NSGetUncaughtExceptionHandler'); - late final _NSGetUncaughtExceptionHandler = _NSGetUncaughtExceptionHandlerPtr - .asFunction Function()>(); - - void NSSetUncaughtExceptionHandler( - ffi.Pointer arg0, - ) { - return _NSSetUncaughtExceptionHandler( - arg0, - ); - } - - late final _NSSetUncaughtExceptionHandlerPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>>( - 'NSSetUncaughtExceptionHandler'); - late final _NSSetUncaughtExceptionHandler = _NSSetUncaughtExceptionHandlerPtr - .asFunction)>(); - - late final ffi.Pointer> _NSAssertionHandlerKey = - _lookup>('NSAssertionHandlerKey'); - - ffi.Pointer get NSAssertionHandlerKey => - _NSAssertionHandlerKey.value; - - set NSAssertionHandlerKey(ffi.Pointer value) => - _NSAssertionHandlerKey.value = value; - - late final _class_NSAssertionHandler1 = _getClass1("NSAssertionHandler"); - late final _sel_currentHandler1 = _registerName1("currentHandler"); - ffi.Pointer _objc_msgSend_526( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_526( - obj, - sel, - ); - } - - late final __objc_msgSend_526Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_526 = __objc_msgSend_526Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_handleFailureInMethod_object_file_lineNumber_description_1 = - _registerName1( - "handleFailureInMethod:object:file:lineNumber:description:"); - void _objc_msgSend_527( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer selector, - ffi.Pointer object, - ffi.Pointer fileName, - int line, - ffi.Pointer format, - ) { - return __objc_msgSend_527( - obj, - sel, - selector, - object, - fileName, - line, - format, - ); - } - - late final __objc_msgSend_527Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_527 = __objc_msgSend_527Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _sel_handleFailureInFunction_file_lineNumber_description_1 = - _registerName1("handleFailureInFunction:file:lineNumber:description:"); - void _objc_msgSend_528( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer functionName, - ffi.Pointer fileName, - int line, - ffi.Pointer format, - ) { - return __objc_msgSend_528( - obj, - sel, - functionName, - fileName, - line, - format, - ); - } - - late final __objc_msgSend_528Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_528 = __objc_msgSend_528Ptr.asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - late final _class_NSBlockOperation1 = _getClass1("NSBlockOperation"); - late final _sel_blockOperationWithBlock_1 = - _registerName1("blockOperationWithBlock:"); - instancetype _objc_msgSend_529( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer<_ObjCBlock> block, - ) { - return __objc_msgSend_529( - obj, - sel, - block, - ); - } - - late final __objc_msgSend_529Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>>('objc_msgSend'); - late final __objc_msgSend_529 = __objc_msgSend_529Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer<_ObjCBlock>)>(); - - late final _sel_addExecutionBlock_1 = _registerName1("addExecutionBlock:"); - late final _sel_executionBlocks1 = _registerName1("executionBlocks"); - late final _class_NSInvocationOperation1 = - _getClass1("NSInvocationOperation"); - late final _sel_initWithTarget_selector_object_1 = - _registerName1("initWithTarget:selector:object:"); - instancetype _objc_msgSend_530( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer target, - ffi.Pointer sel1, - ffi.Pointer arg, - ) { - return __objc_msgSend_530( - obj, - sel, - target, - sel1, - arg, - ); - } - - late final __objc_msgSend_530Ptr = _lookup< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_530 = __objc_msgSend_530Ptr.asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_initWithInvocation_1 = _registerName1("initWithInvocation:"); - instancetype _objc_msgSend_531( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer inv, - ) { - return __objc_msgSend_531( - obj, - sel, - inv, - ); - } - - late final __objc_msgSend_531Ptr = _lookup< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_531 = __objc_msgSend_531Ptr.asFunction< - instancetype Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_invocation1 = _registerName1("invocation"); - ffi.Pointer _objc_msgSend_532( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_532( - obj, - sel, - ); - } - - late final __objc_msgSend_532Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_532 = __objc_msgSend_532Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_result1 = _registerName1("result"); - late final ffi.Pointer - _NSInvocationOperationVoidResultException = - _lookup('NSInvocationOperationVoidResultException'); - - NSExceptionName get NSInvocationOperationVoidResultException => - _NSInvocationOperationVoidResultException.value; - - set NSInvocationOperationVoidResultException(NSExceptionName value) => - _NSInvocationOperationVoidResultException.value = value; - - late final ffi.Pointer - _NSInvocationOperationCancelledException = - _lookup('NSInvocationOperationCancelledException'); - - NSExceptionName get NSInvocationOperationCancelledException => - _NSInvocationOperationCancelledException.value; - - set NSInvocationOperationCancelledException(NSExceptionName value) => - _NSInvocationOperationCancelledException.value = value; - - late final ffi.Pointer - _NSOperationQueueDefaultMaxConcurrentOperationCount = - _lookup('NSOperationQueueDefaultMaxConcurrentOperationCount'); - - int get NSOperationQueueDefaultMaxConcurrentOperationCount => - _NSOperationQueueDefaultMaxConcurrentOperationCount.value; - - /// Predefined domain for errors from most AppKit and Foundation APIs. - late final ffi.Pointer _NSCocoaErrorDomain = - _lookup('NSCocoaErrorDomain'); - - NSErrorDomain get NSCocoaErrorDomain => _NSCocoaErrorDomain.value; - - set NSCocoaErrorDomain(NSErrorDomain value) => - _NSCocoaErrorDomain.value = value; - - /// Other predefined domains; value of "code" will correspond to preexisting values in these domains. - late final ffi.Pointer _NSPOSIXErrorDomain = - _lookup('NSPOSIXErrorDomain'); - - NSErrorDomain get NSPOSIXErrorDomain => _NSPOSIXErrorDomain.value; - - set NSPOSIXErrorDomain(NSErrorDomain value) => - _NSPOSIXErrorDomain.value = value; - - late final ffi.Pointer _NSOSStatusErrorDomain = - _lookup('NSOSStatusErrorDomain'); - - NSErrorDomain get NSOSStatusErrorDomain => _NSOSStatusErrorDomain.value; - - set NSOSStatusErrorDomain(NSErrorDomain value) => - _NSOSStatusErrorDomain.value = value; - - late final ffi.Pointer _NSMachErrorDomain = - _lookup('NSMachErrorDomain'); - - NSErrorDomain get NSMachErrorDomain => _NSMachErrorDomain.value; - - set NSMachErrorDomain(NSErrorDomain value) => - _NSMachErrorDomain.value = value; - - /// Key in userInfo. A recommended standard way to embed NSErrors from underlying calls. The value of this key should be an NSError. - late final ffi.Pointer _NSUnderlyingErrorKey = - _lookup('NSUnderlyingErrorKey'); - - NSErrorUserInfoKey get NSUnderlyingErrorKey => _NSUnderlyingErrorKey.value; - - set NSUnderlyingErrorKey(NSErrorUserInfoKey value) => - _NSUnderlyingErrorKey.value = value; - - /// Key in userInfo. A recommended standard way to embed a list of several NSErrors from underlying calls. The value of this key should be an NSArray of NSError. This value is independent from the value of `NSUnderlyingErrorKey` - neither, one, or both may be set. - late final ffi.Pointer _NSMultipleUnderlyingErrorsKey = - _lookup('NSMultipleUnderlyingErrorsKey'); - - NSErrorUserInfoKey get NSMultipleUnderlyingErrorsKey => - _NSMultipleUnderlyingErrorsKey.value; - - set NSMultipleUnderlyingErrorsKey(NSErrorUserInfoKey value) => - _NSMultipleUnderlyingErrorsKey.value = value; - - /// NSString, a complete sentence (or more) describing ideally both what failed and why it failed. - late final ffi.Pointer _NSLocalizedDescriptionKey = - _lookup('NSLocalizedDescriptionKey'); - - NSErrorUserInfoKey get NSLocalizedDescriptionKey => - _NSLocalizedDescriptionKey.value; - - set NSLocalizedDescriptionKey(NSErrorUserInfoKey value) => - _NSLocalizedDescriptionKey.value = value; - - /// NSString, a complete sentence (or more) describing why the operation failed. - late final ffi.Pointer _NSLocalizedFailureReasonErrorKey = - _lookup('NSLocalizedFailureReasonErrorKey'); - - NSErrorUserInfoKey get NSLocalizedFailureReasonErrorKey => - _NSLocalizedFailureReasonErrorKey.value; - - set NSLocalizedFailureReasonErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedFailureReasonErrorKey.value = value; - - /// NSString, a complete sentence (or more) describing what the user can do to fix the problem. - late final ffi.Pointer - _NSLocalizedRecoverySuggestionErrorKey = - _lookup('NSLocalizedRecoverySuggestionErrorKey'); - - NSErrorUserInfoKey get NSLocalizedRecoverySuggestionErrorKey => - _NSLocalizedRecoverySuggestionErrorKey.value; - - set NSLocalizedRecoverySuggestionErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedRecoverySuggestionErrorKey.value = value; - - /// NSArray of NSStrings corresponding to button titles. - late final ffi.Pointer - _NSLocalizedRecoveryOptionsErrorKey = - _lookup('NSLocalizedRecoveryOptionsErrorKey'); - - NSErrorUserInfoKey get NSLocalizedRecoveryOptionsErrorKey => - _NSLocalizedRecoveryOptionsErrorKey.value; - - set NSLocalizedRecoveryOptionsErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedRecoveryOptionsErrorKey.value = value; - - /// Instance of a subclass of NSObject that conforms to the NSErrorRecoveryAttempting informal protocol - late final ffi.Pointer _NSRecoveryAttempterErrorKey = - _lookup('NSRecoveryAttempterErrorKey'); - - NSErrorUserInfoKey get NSRecoveryAttempterErrorKey => - _NSRecoveryAttempterErrorKey.value; - - set NSRecoveryAttempterErrorKey(NSErrorUserInfoKey value) => - _NSRecoveryAttempterErrorKey.value = value; - - /// NSString containing a help anchor - late final ffi.Pointer _NSHelpAnchorErrorKey = - _lookup('NSHelpAnchorErrorKey'); - - NSErrorUserInfoKey get NSHelpAnchorErrorKey => _NSHelpAnchorErrorKey.value; - - set NSHelpAnchorErrorKey(NSErrorUserInfoKey value) => - _NSHelpAnchorErrorKey.value = value; - - /// NSString. This provides a string which will be shown when constructing the debugDescription of the NSError, to be used when debugging or when formatting the error with %@. This string will never be used in localizedDescription, so will not be shown to the user. - late final ffi.Pointer _NSDebugDescriptionErrorKey = - _lookup('NSDebugDescriptionErrorKey'); - - NSErrorUserInfoKey get NSDebugDescriptionErrorKey => - _NSDebugDescriptionErrorKey.value; - - set NSDebugDescriptionErrorKey(NSErrorUserInfoKey value) => - _NSDebugDescriptionErrorKey.value = value; - - /// NSString, a complete sentence (or more) describing what failed. Setting a value for this key in userInfo dictionary of errors received from framework APIs is a good way to customize and fine tune the localizedDescription of an NSError. As an example, for Foundation error code NSFileWriteOutOfSpaceError, setting the value of this key to "The image library could not be saved." will allow the localizedDescription of the error to come out as "The image library could not be saved. The volume Macintosh HD is out of space." rather than the default (say) “You can't save the file ImgDatabaseV2 because the volume Macintosh HD is out of space." - late final ffi.Pointer _NSLocalizedFailureErrorKey = - _lookup('NSLocalizedFailureErrorKey'); - - NSErrorUserInfoKey get NSLocalizedFailureErrorKey => - _NSLocalizedFailureErrorKey.value; - - set NSLocalizedFailureErrorKey(NSErrorUserInfoKey value) => - _NSLocalizedFailureErrorKey.value = value; - - /// NSNumber containing NSStringEncoding - late final ffi.Pointer _NSStringEncodingErrorKey = - _lookup('NSStringEncodingErrorKey'); - - NSErrorUserInfoKey get NSStringEncodingErrorKey => - _NSStringEncodingErrorKey.value; - - set NSStringEncodingErrorKey(NSErrorUserInfoKey value) => - _NSStringEncodingErrorKey.value = value; - - /// NSURL - late final ffi.Pointer _NSURLErrorKey = - _lookup('NSURLErrorKey'); - - NSErrorUserInfoKey get NSURLErrorKey => _NSURLErrorKey.value; - - set NSURLErrorKey(NSErrorUserInfoKey value) => _NSURLErrorKey.value = value; - - /// NSString - late final ffi.Pointer _NSFilePathErrorKey = - _lookup('NSFilePathErrorKey'); - - NSErrorUserInfoKey get NSFilePathErrorKey => _NSFilePathErrorKey.value; - - set NSFilePathErrorKey(NSErrorUserInfoKey value) => - _NSFilePathErrorKey.value = value; - - /// Is this an error handle? - /// - /// Requires there to be a current isolate. - bool Dart_IsError( - Object handle, - ) { - return _Dart_IsError( - handle, - ); - } - - late final _Dart_IsErrorPtr = - _lookup>( - 'Dart_IsError'); - late final _Dart_IsError = - _Dart_IsErrorPtr.asFunction(); - - /// Is this an api error handle? - /// - /// Api error handles are produced when an api function is misused. - /// This happens when a Dart embedding api function is called with - /// invalid arguments or in an invalid context. - /// - /// Requires there to be a current isolate. - bool Dart_IsApiError( - Object handle, - ) { - return _Dart_IsApiError( - handle, - ); - } - - late final _Dart_IsApiErrorPtr = - _lookup>( - 'Dart_IsApiError'); - late final _Dart_IsApiError = - _Dart_IsApiErrorPtr.asFunction(); - - /// Is this an unhandled exception error handle? - /// - /// Unhandled exception error handles are produced when, during the - /// execution of Dart code, an exception is thrown but not caught. - /// This can occur in any function which triggers the execution of Dart - /// code. - /// - /// See Dart_ErrorGetException and Dart_ErrorGetStackTrace. - /// - /// Requires there to be a current isolate. - bool Dart_IsUnhandledExceptionError( - Object handle, - ) { - return _Dart_IsUnhandledExceptionError( - handle, - ); - } - - late final _Dart_IsUnhandledExceptionErrorPtr = - _lookup>( - 'Dart_IsUnhandledExceptionError'); - late final _Dart_IsUnhandledExceptionError = - _Dart_IsUnhandledExceptionErrorPtr.asFunction(); - - /// Is this a compilation error handle? - /// - /// Compilation error handles are produced when, during the execution - /// of Dart code, a compile-time error occurs. This can occur in any - /// function which triggers the execution of Dart code. - /// - /// Requires there to be a current isolate. - bool Dart_IsCompilationError( - Object handle, - ) { - return _Dart_IsCompilationError( - handle, - ); - } - - late final _Dart_IsCompilationErrorPtr = - _lookup>( - 'Dart_IsCompilationError'); - late final _Dart_IsCompilationError = - _Dart_IsCompilationErrorPtr.asFunction(); - - /// Is this a fatal error handle? - /// - /// Fatal error handles are produced when the system wants to shut down - /// the current isolate. - /// - /// Requires there to be a current isolate. - bool Dart_IsFatalError( - Object handle, - ) { - return _Dart_IsFatalError( - handle, - ); - } - - late final _Dart_IsFatalErrorPtr = - _lookup>( - 'Dart_IsFatalError'); - late final _Dart_IsFatalError = - _Dart_IsFatalErrorPtr.asFunction(); - - /// Gets the error message from an error handle. - /// - /// Requires there to be a current isolate. - /// - /// \return A C string containing an error message if the handle is - /// error. An empty C string ("") if the handle is valid. This C - /// String is scope allocated and is only valid until the next call - /// to Dart_ExitScope. - ffi.Pointer Dart_GetError( - Object handle, - ) { - return _Dart_GetError( - handle, - ); - } - - late final _Dart_GetErrorPtr = - _lookup Function(ffi.Handle)>>( - 'Dart_GetError'); - late final _Dart_GetError = - _Dart_GetErrorPtr.asFunction Function(Object)>(); - - /// Is this an error handle for an unhandled exception? - bool Dart_ErrorHasException( - Object handle, - ) { - return _Dart_ErrorHasException( - handle, - ); - } - - late final _Dart_ErrorHasExceptionPtr = - _lookup>( - 'Dart_ErrorHasException'); - late final _Dart_ErrorHasException = - _Dart_ErrorHasExceptionPtr.asFunction(); - - /// Gets the exception Object from an unhandled exception error handle. - Object Dart_ErrorGetException( - Object handle, - ) { - return _Dart_ErrorGetException( - handle, - ); - } - - late final _Dart_ErrorGetExceptionPtr = - _lookup>( - 'Dart_ErrorGetException'); - late final _Dart_ErrorGetException = - _Dart_ErrorGetExceptionPtr.asFunction(); - - /// Gets the stack trace Object from an unhandled exception error handle. - Object Dart_ErrorGetStackTrace( - Object handle, - ) { - return _Dart_ErrorGetStackTrace( - handle, - ); - } - - late final _Dart_ErrorGetStackTracePtr = - _lookup>( - 'Dart_ErrorGetStackTrace'); - late final _Dart_ErrorGetStackTrace = - _Dart_ErrorGetStackTracePtr.asFunction(); - - /// Produces an api error handle with the provided error message. - /// - /// Requires there to be a current isolate. - /// - /// \param error the error message. - Object Dart_NewApiError( - ffi.Pointer error, - ) { - return _Dart_NewApiError( - error, - ); - } - - late final _Dart_NewApiErrorPtr = - _lookup)>>( - 'Dart_NewApiError'); - late final _Dart_NewApiError = - _Dart_NewApiErrorPtr.asFunction)>(); - - Object Dart_NewCompilationError( - ffi.Pointer error, - ) { - return _Dart_NewCompilationError( - error, - ); - } - - late final _Dart_NewCompilationErrorPtr = - _lookup)>>( - 'Dart_NewCompilationError'); - late final _Dart_NewCompilationError = _Dart_NewCompilationErrorPtr - .asFunction)>(); - - /// Produces a new unhandled exception error handle. - /// - /// Requires there to be a current isolate. - /// - /// \param exception An instance of a Dart object to be thrown or - /// an ApiError or CompilationError handle. - /// When an ApiError or CompilationError handle is passed in - /// a string object of the error message is created and it becomes - /// the Dart object to be thrown. - Object Dart_NewUnhandledExceptionError( - Object exception, - ) { - return _Dart_NewUnhandledExceptionError( - exception, - ); - } - - late final _Dart_NewUnhandledExceptionErrorPtr = - _lookup>( - 'Dart_NewUnhandledExceptionError'); - late final _Dart_NewUnhandledExceptionError = - _Dart_NewUnhandledExceptionErrorPtr.asFunction(); - - /// Propagates an error. - /// - /// If the provided handle is an unhandled exception error, this - /// function will cause the unhandled exception to be rethrown. This - /// will proceed in the standard way, walking up Dart frames until an - /// appropriate 'catch' block is found, executing 'finally' blocks, - /// etc. - /// - /// If the error is not an unhandled exception error, we will unwind - /// the stack to the next C frame. Intervening Dart frames will be - /// discarded; specifically, 'finally' blocks will not execute. This - /// is the standard way that compilation errors (and the like) are - /// handled by the Dart runtime. - /// - /// In either case, when an error is propagated any current scopes - /// created by Dart_EnterScope will be exited. - /// - /// See the additional discussion under "Propagating Errors" at the - /// beginning of this file. - /// - /// \param An error handle (See Dart_IsError) - /// - /// \return On success, this function does not return. On failure, the - /// process is terminated. - void Dart_PropagateError( - Object handle, - ) { - return _Dart_PropagateError( - handle, - ); - } - - late final _Dart_PropagateErrorPtr = - _lookup>( - 'Dart_PropagateError'); - late final _Dart_PropagateError = - _Dart_PropagateErrorPtr.asFunction(); - - /// Converts an object to a string. - /// - /// May generate an unhandled exception error. - /// - /// \return The converted string if no error occurs during - /// the conversion. If an error does occur, an error handle is - /// returned. - Object Dart_ToString( - Object object, - ) { - return _Dart_ToString( - object, - ); - } - - late final _Dart_ToStringPtr = - _lookup>( - 'Dart_ToString'); - late final _Dart_ToString = - _Dart_ToStringPtr.asFunction(); - - /// Checks to see if two handles refer to identically equal objects. - /// - /// If both handles refer to instances, this is equivalent to using the top-level - /// function identical() from dart:core. Otherwise, returns whether the two - /// argument handles refer to the same object. - /// - /// \param obj1 An object to be compared. - /// \param obj2 An object to be compared. - /// - /// \return True if the objects are identically equal. False otherwise. - bool Dart_IdentityEquals( - Object obj1, - Object obj2, - ) { - return _Dart_IdentityEquals( - obj1, - obj2, - ); - } - - late final _Dart_IdentityEqualsPtr = - _lookup>( - 'Dart_IdentityEquals'); - late final _Dart_IdentityEquals = - _Dart_IdentityEqualsPtr.asFunction(); - - /// Allocates a handle in the current scope from a persistent handle. - Object Dart_HandleFromPersistent( - Object object, - ) { - return _Dart_HandleFromPersistent( - object, - ); - } - - late final _Dart_HandleFromPersistentPtr = - _lookup>( - 'Dart_HandleFromPersistent'); - late final _Dart_HandleFromPersistent = - _Dart_HandleFromPersistentPtr.asFunction(); - - /// Allocates a handle in the current scope from a weak persistent handle. - /// - /// This will be a handle to Dart_Null if the object has been garbage collected. - Object Dart_HandleFromWeakPersistent( - Dart_WeakPersistentHandle object, - ) { - return _Dart_HandleFromWeakPersistent( - object, - ); - } - - late final _Dart_HandleFromWeakPersistentPtr = _lookup< - ffi.NativeFunction>( - 'Dart_HandleFromWeakPersistent'); - late final _Dart_HandleFromWeakPersistent = _Dart_HandleFromWeakPersistentPtr - .asFunction(); - - /// Allocates a persistent handle for an object. - /// - /// This handle has the lifetime of the current isolate unless it is - /// explicitly deallocated by calling Dart_DeletePersistentHandle. - /// - /// Requires there to be a current isolate. - Object Dart_NewPersistentHandle( - Object object, - ) { - return _Dart_NewPersistentHandle( - object, - ); - } - - late final _Dart_NewPersistentHandlePtr = - _lookup>( - 'Dart_NewPersistentHandle'); - late final _Dart_NewPersistentHandle = - _Dart_NewPersistentHandlePtr.asFunction(); - - /// Assign value of local handle to a persistent handle. - /// - /// Requires there to be a current isolate. - /// - /// \param obj1 A persistent handle whose value needs to be set. - /// \param obj2 An object whose value needs to be set to the persistent handle. - /// - /// \return Success if the persistent handle was set - /// Otherwise, returns an error. - void Dart_SetPersistentHandle( - Object obj1, - Object obj2, - ) { - return _Dart_SetPersistentHandle( - obj1, - obj2, - ); - } - - late final _Dart_SetPersistentHandlePtr = - _lookup>( - 'Dart_SetPersistentHandle'); - late final _Dart_SetPersistentHandle = - _Dart_SetPersistentHandlePtr.asFunction(); - - /// Deallocates a persistent handle. - /// - /// Requires there to be a current isolate group. - void Dart_DeletePersistentHandle( - Object object, - ) { - return _Dart_DeletePersistentHandle( - object, - ); - } - - late final _Dart_DeletePersistentHandlePtr = - _lookup>( - 'Dart_DeletePersistentHandle'); - late final _Dart_DeletePersistentHandle = - _Dart_DeletePersistentHandlePtr.asFunction(); - - /// Allocates a weak persistent handle for an object. - /// - /// This handle has the lifetime of the current isolate. The handle can also be - /// explicitly deallocated by calling Dart_DeleteWeakPersistentHandle. - /// - /// If the object becomes unreachable the callback is invoked with the peer as - /// argument. The callback can be executed on any thread, will have a current - /// isolate group, but will not have a current isolate. The callback can only - /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. This - /// gives the embedder the ability to cleanup data associated with the object. - /// The handle will point to the Dart_Null object after the finalizer has been - /// run. It is illegal to call into the VM with any other Dart_* functions from - /// the callback. If the handle is deleted before the object becomes - /// unreachable, the callback is never invoked. - /// - /// Requires there to be a current isolate. - /// - /// \param object An object with identity. - /// \param peer A pointer to a native object or NULL. This value is - /// provided to callback when it is invoked. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A function pointer that will be invoked sometime - /// after the object is garbage collected, unless the handle has been deleted. - /// A valid callback needs to be specified it cannot be NULL. - /// - /// \return The weak persistent handle or NULL. NULL is returned in case of bad - /// parameters. - Dart_WeakPersistentHandle Dart_NewWeakPersistentHandle( - Object object, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewWeakPersistentHandle( - object, - peer, - external_allocation_size, - callback, - ); - } - - late final _Dart_NewWeakPersistentHandlePtr = _lookup< - ffi.NativeFunction< - Dart_WeakPersistentHandle Function( - ffi.Handle, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewWeakPersistentHandle'); - late final _Dart_NewWeakPersistentHandle = - _Dart_NewWeakPersistentHandlePtr.asFunction< - Dart_WeakPersistentHandle Function( - Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); - - /// Deletes the given weak persistent [object] handle. - /// - /// Requires there to be a current isolate group. - void Dart_DeleteWeakPersistentHandle( - Dart_WeakPersistentHandle object, - ) { - return _Dart_DeleteWeakPersistentHandle( - object, - ); - } - - late final _Dart_DeleteWeakPersistentHandlePtr = - _lookup>( - 'Dart_DeleteWeakPersistentHandle'); - late final _Dart_DeleteWeakPersistentHandle = - _Dart_DeleteWeakPersistentHandlePtr.asFunction< - void Function(Dart_WeakPersistentHandle)>(); - - /// Updates the external memory size for the given weak persistent handle. - /// - /// May trigger garbage collection. - void Dart_UpdateExternalSize( - Dart_WeakPersistentHandle object, - int external_allocation_size, - ) { - return _Dart_UpdateExternalSize( - object, - external_allocation_size, - ); - } - - late final _Dart_UpdateExternalSizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_WeakPersistentHandle, - ffi.IntPtr)>>('Dart_UpdateExternalSize'); - late final _Dart_UpdateExternalSize = _Dart_UpdateExternalSizePtr.asFunction< - void Function(Dart_WeakPersistentHandle, int)>(); - - /// Allocates a finalizable handle for an object. - /// - /// This handle has the lifetime of the current isolate group unless the object - /// pointed to by the handle is garbage collected, in this case the VM - /// automatically deletes the handle after invoking the callback associated - /// with the handle. The handle can also be explicitly deallocated by - /// calling Dart_DeleteFinalizableHandle. - /// - /// If the object becomes unreachable the callback is invoked with the - /// the peer as argument. The callback can be executed on any thread, will have - /// an isolate group, but will not have a current isolate. The callback can only - /// call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. - /// This gives the embedder the ability to cleanup data associated with the - /// object and clear out any cached references to the handle. All references to - /// this handle after the callback will be invalid. It is illegal to call into - /// the VM with any other Dart_* functions from the callback. If the handle is - /// deleted before the object becomes unreachable, the callback is never - /// invoked. - /// - /// Requires there to be a current isolate. - /// - /// \param object An object with identity. - /// \param peer A pointer to a native object or NULL. This value is - /// provided to callback when it is invoked. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A function pointer that will be invoked sometime - /// after the object is garbage collected, unless the handle has been deleted. - /// A valid callback needs to be specified it cannot be NULL. - /// - /// \return The finalizable handle or NULL. NULL is returned in case of bad - /// parameters. - Dart_FinalizableHandle Dart_NewFinalizableHandle( - Object object, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewFinalizableHandle( - object, - peer, - external_allocation_size, - callback, - ); - } - - late final _Dart_NewFinalizableHandlePtr = _lookup< - ffi.NativeFunction< - Dart_FinalizableHandle Function(ffi.Handle, ffi.Pointer, - ffi.IntPtr, Dart_HandleFinalizer)>>('Dart_NewFinalizableHandle'); - late final _Dart_NewFinalizableHandle = - _Dart_NewFinalizableHandlePtr.asFunction< - Dart_FinalizableHandle Function( - Object, ffi.Pointer, int, Dart_HandleFinalizer)>(); - - /// Deletes the given finalizable [object] handle. - /// - /// The caller has to provide the actual Dart object the handle was created from - /// to prove the object (and therefore the finalizable handle) is still alive. - /// - /// Requires there to be a current isolate. - void Dart_DeleteFinalizableHandle( - Dart_FinalizableHandle object, - Object strong_ref_to_object, - ) { - return _Dart_DeleteFinalizableHandle( - object, - strong_ref_to_object, - ); - } - - late final _Dart_DeleteFinalizableHandlePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, - ffi.Handle)>>('Dart_DeleteFinalizableHandle'); - late final _Dart_DeleteFinalizableHandle = _Dart_DeleteFinalizableHandlePtr - .asFunction(); - - /// Updates the external memory size for the given finalizable handle. - /// - /// The caller has to provide the actual Dart object the handle was created from - /// to prove the object (and therefore the finalizable handle) is still alive. - /// - /// May trigger garbage collection. - void Dart_UpdateFinalizableExternalSize( - Dart_FinalizableHandle object, - Object strong_ref_to_object, - int external_allocation_size, - ) { - return _Dart_UpdateFinalizableExternalSize( - object, - strong_ref_to_object, - external_allocation_size, - ); - } - - late final _Dart_UpdateFinalizableExternalSizePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_FinalizableHandle, ffi.Handle, - ffi.IntPtr)>>('Dart_UpdateFinalizableExternalSize'); - late final _Dart_UpdateFinalizableExternalSize = - _Dart_UpdateFinalizableExternalSizePtr.asFunction< - void Function(Dart_FinalizableHandle, Object, int)>(); - - /// Gets the version string for the Dart VM. - /// - /// The version of the Dart VM can be accessed without initializing the VM. - /// - /// \return The version string for the embedded Dart VM. - ffi.Pointer Dart_VersionString() { - return _Dart_VersionString(); - } - - late final _Dart_VersionStringPtr = - _lookup Function()>>( - 'Dart_VersionString'); - late final _Dart_VersionString = - _Dart_VersionStringPtr.asFunction Function()>(); - - /// Initialize Dart_IsolateFlags with correct version and default values. - void Dart_IsolateFlagsInitialize( - ffi.Pointer flags, - ) { - return _Dart_IsolateFlagsInitialize( - flags, - ); - } - - late final _Dart_IsolateFlagsInitializePtr = _lookup< - ffi - .NativeFunction)>>( - 'Dart_IsolateFlagsInitialize'); - late final _Dart_IsolateFlagsInitialize = _Dart_IsolateFlagsInitializePtr - .asFunction)>(); - - /// Initializes the VM. - /// - /// \param params A struct containing initialization information. The version - /// field of the struct must be DART_INITIALIZE_PARAMS_CURRENT_VERSION. - /// - /// \return NULL if initialization is successful. Returns an error message - /// otherwise. The caller is responsible for freeing the error message. - ffi.Pointer Dart_Initialize( - ffi.Pointer params, - ) { - return _Dart_Initialize( - params, - ); - } - - late final _Dart_InitializePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('Dart_Initialize'); - late final _Dart_Initialize = _Dart_InitializePtr.asFunction< - ffi.Pointer Function(ffi.Pointer)>(); - - /// Cleanup state in the VM before process termination. - /// - /// \return NULL if cleanup is successful. Returns an error message otherwise. - /// The caller is responsible for freeing the error message. - /// - /// NOTE: This function must not be called on a thread that was created by the VM - /// itself. - ffi.Pointer Dart_Cleanup() { - return _Dart_Cleanup(); - } - - late final _Dart_CleanupPtr = - _lookup Function()>>( - 'Dart_Cleanup'); - late final _Dart_Cleanup = - _Dart_CleanupPtr.asFunction Function()>(); - - /// Sets command line flags. Should be called before Dart_Initialize. - /// - /// \param argc The length of the arguments array. - /// \param argv An array of arguments. - /// - /// \return NULL if successful. Returns an error message otherwise. - /// The caller is responsible for freeing the error message. - /// - /// NOTE: This call does not store references to the passed in c-strings. - ffi.Pointer Dart_SetVMFlags( - int argc, - ffi.Pointer> argv, - ) { - return _Dart_SetVMFlags( - argc, - argv, - ); - } - - late final _Dart_SetVMFlagsPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Int, ffi.Pointer>)>>('Dart_SetVMFlags'); - late final _Dart_SetVMFlags = _Dart_SetVMFlagsPtr.asFunction< - ffi.Pointer Function( - int, ffi.Pointer>)>(); - - /// Returns true if the named VM flag is of boolean type, specified, and set to - /// true. - /// - /// \param flag_name The name of the flag without leading punctuation - /// (example: "enable_asserts"). - bool Dart_IsVMFlagSet( - ffi.Pointer flag_name, - ) { - return _Dart_IsVMFlagSet( - flag_name, - ); - } - - late final _Dart_IsVMFlagSetPtr = - _lookup)>>( - 'Dart_IsVMFlagSet'); - late final _Dart_IsVMFlagSet = - _Dart_IsVMFlagSetPtr.asFunction)>(); - - /// Creates a new isolate. The new isolate becomes the current isolate. - /// - /// A snapshot can be used to restore the VM quickly to a saved state - /// and is useful for fast startup. If snapshot data is provided, the - /// isolate will be started using that snapshot data. Requires a core snapshot or - /// an app snapshot created by Dart_CreateSnapshot or - /// Dart_CreatePrecompiledSnapshot* from a VM with the same version. - /// - /// Requires there to be no current isolate. - /// - /// \param script_uri The main source file or snapshot this isolate will load. - /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child - /// isolate is created by Isolate.spawn. The embedder should use a URI that - /// allows it to load the same program into such a child isolate. - /// \param name A short name for the isolate to improve debugging messages. - /// Typically of the format 'foo.dart:main()'. - /// \param isolate_snapshot_data - /// \param isolate_snapshot_instructions Buffers containing a snapshot of the - /// isolate or NULL if no snapshot is provided. If provided, the buffers must - /// remain valid until the isolate shuts down. - /// \param flags Pointer to VM specific flags or NULL for default flags. - /// \param isolate_group_data Embedder group data. This data can be obtained - /// by calling Dart_IsolateGroupData and will be passed to the - /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and - /// Dart_IsolateGroupCleanupCallback. - /// \param isolate_data Embedder data. This data will be passed to - /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from - /// this parent isolate. - /// \param error Returns NULL if creation is successful, an error message - /// otherwise. The caller is responsible for calling free() on the error - /// message. - /// - /// \return The new isolate on success, or NULL if isolate creation failed. - Dart_Isolate Dart_CreateIsolateGroup( - ffi.Pointer script_uri, - ffi.Pointer name, - ffi.Pointer isolate_snapshot_data, - ffi.Pointer isolate_snapshot_instructions, - ffi.Pointer flags, - ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data, - ffi.Pointer> error, - ) { - return _Dart_CreateIsolateGroup( - script_uri, - name, - isolate_snapshot_data, - isolate_snapshot_instructions, - flags, - isolate_group_data, - isolate_data, - error, - ); - } - - late final _Dart_CreateIsolateGroupPtr = _lookup< - ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('Dart_CreateIsolateGroup'); - late final _Dart_CreateIsolateGroup = _Dart_CreateIsolateGroupPtr.asFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - /// Creates a new isolate inside the isolate group of [group_member]. - /// - /// Requires there to be no current isolate. - /// - /// \param group_member An isolate from the same group into which the newly created - /// isolate should be born into. Other threads may not have entered / enter this - /// member isolate. - /// \param name A short name for the isolate for debugging purposes. - /// \param shutdown_callback A callback to be called when the isolate is being - /// shutdown (may be NULL). - /// \param cleanup_callback A callback to be called when the isolate is being - /// cleaned up (may be NULL). - /// \param isolate_data The embedder-specific data associated with this isolate. - /// \param error Set to NULL if creation is successful, set to an error - /// message otherwise. The caller is responsible for calling free() on the - /// error message. - /// - /// \return The newly created isolate on success, or NULL if isolate creation - /// failed. - /// - /// If successful, the newly created isolate will become the current isolate. - Dart_Isolate Dart_CreateIsolateInGroup( - Dart_Isolate group_member, - ffi.Pointer name, - Dart_IsolateShutdownCallback shutdown_callback, - Dart_IsolateCleanupCallback cleanup_callback, - ffi.Pointer child_isolate_data, - ffi.Pointer> error, - ) { - return _Dart_CreateIsolateInGroup( - group_member, - name, - shutdown_callback, - cleanup_callback, - child_isolate_data, - error, - ); - } - - late final _Dart_CreateIsolateInGroupPtr = _lookup< - ffi.NativeFunction< - Dart_Isolate Function( - Dart_Isolate, - ffi.Pointer, - Dart_IsolateShutdownCallback, - Dart_IsolateCleanupCallback, - ffi.Pointer, - ffi.Pointer>)>>( - 'Dart_CreateIsolateInGroup'); - late final _Dart_CreateIsolateInGroup = - _Dart_CreateIsolateInGroupPtr.asFunction< - Dart_Isolate Function( - Dart_Isolate, - ffi.Pointer, - Dart_IsolateShutdownCallback, - Dart_IsolateCleanupCallback, - ffi.Pointer, - ffi.Pointer>)>(); - - /// Creates a new isolate from a Dart Kernel file. The new isolate - /// becomes the current isolate. - /// - /// Requires there to be no current isolate. - /// - /// \param script_uri The main source file or snapshot this isolate will load. - /// The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child - /// isolate is created by Isolate.spawn. The embedder should use a URI that - /// allows it to load the same program into such a child isolate. - /// \param name A short name for the isolate to improve debugging messages. - /// Typically of the format 'foo.dart:main()'. - /// \param kernel_buffer - /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must - /// remain valid until isolate shutdown. - /// \param flags Pointer to VM specific flags or NULL for default flags. - /// \param isolate_group_data Embedder group data. This data can be obtained - /// by calling Dart_IsolateGroupData and will be passed to the - /// Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and - /// Dart_IsolateGroupCleanupCallback. - /// \param isolate_data Embedder data. This data will be passed to - /// the Dart_IsolateGroupCreateCallback when new isolates are spawned from - /// this parent isolate. - /// \param error Returns NULL if creation is successful, an error message - /// otherwise. The caller is responsible for calling free() on the error - /// message. - /// - /// \return The new isolate on success, or NULL if isolate creation failed. - Dart_Isolate Dart_CreateIsolateGroupFromKernel( - ffi.Pointer script_uri, - ffi.Pointer name, - ffi.Pointer kernel_buffer, - int kernel_buffer_size, - ffi.Pointer flags, - ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data, - ffi.Pointer> error, - ) { - return _Dart_CreateIsolateGroupFromKernel( - script_uri, - name, - kernel_buffer, - kernel_buffer_size, - flags, - isolate_group_data, - isolate_data, - error, - ); - } - - late final _Dart_CreateIsolateGroupFromKernelPtr = _lookup< - ffi.NativeFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>( - 'Dart_CreateIsolateGroupFromKernel'); - late final _Dart_CreateIsolateGroupFromKernel = - _Dart_CreateIsolateGroupFromKernelPtr.asFunction< - Dart_Isolate Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - - /// Shuts down the current isolate. After this call, the current isolate is NULL. - /// Any current scopes created by Dart_EnterScope will be exited. Invokes the - /// shutdown callback and any callbacks of remaining weak persistent handles. - /// - /// Requires there to be a current isolate. - void Dart_ShutdownIsolate() { - return _Dart_ShutdownIsolate(); - } - - late final _Dart_ShutdownIsolatePtr = - _lookup>('Dart_ShutdownIsolate'); - late final _Dart_ShutdownIsolate = - _Dart_ShutdownIsolatePtr.asFunction(); - - /// Returns the current isolate. Will return NULL if there is no - /// current isolate. - Dart_Isolate Dart_CurrentIsolate() { - return _Dart_CurrentIsolate(); - } - - late final _Dart_CurrentIsolatePtr = - _lookup>( - 'Dart_CurrentIsolate'); - late final _Dart_CurrentIsolate = - _Dart_CurrentIsolatePtr.asFunction(); - - /// Returns the callback data associated with the current isolate. This - /// data was set when the isolate got created or initialized. - ffi.Pointer Dart_CurrentIsolateData() { - return _Dart_CurrentIsolateData(); - } - - late final _Dart_CurrentIsolateDataPtr = - _lookup Function()>>( - 'Dart_CurrentIsolateData'); - late final _Dart_CurrentIsolateData = _Dart_CurrentIsolateDataPtr.asFunction< - ffi.Pointer Function()>(); - - /// Returns the callback data associated with the given isolate. This - /// data was set when the isolate got created or initialized. - ffi.Pointer Dart_IsolateData( - Dart_Isolate isolate, - ) { - return _Dart_IsolateData( - isolate, - ); - } - - late final _Dart_IsolateDataPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateData'); - late final _Dart_IsolateData = _Dart_IsolateDataPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); - - /// Returns the current isolate group. Will return NULL if there is no - /// current isolate group. - Dart_IsolateGroup Dart_CurrentIsolateGroup() { - return _Dart_CurrentIsolateGroup(); - } - - late final _Dart_CurrentIsolateGroupPtr = - _lookup>( - 'Dart_CurrentIsolateGroup'); - late final _Dart_CurrentIsolateGroup = - _Dart_CurrentIsolateGroupPtr.asFunction(); - - /// Returns the callback data associated with the current isolate group. This - /// data was passed to the isolate group when it was created. - ffi.Pointer Dart_CurrentIsolateGroupData() { - return _Dart_CurrentIsolateGroupData(); - } - - late final _Dart_CurrentIsolateGroupDataPtr = - _lookup Function()>>( - 'Dart_CurrentIsolateGroupData'); - late final _Dart_CurrentIsolateGroupData = _Dart_CurrentIsolateGroupDataPtr - .asFunction Function()>(); - - /// Returns the callback data associated with the specified isolate group. This - /// data was passed to the isolate when it was created. - /// The embedder is responsible for ensuring the consistency of this data - /// with respect to the lifecycle of an isolate group. - ffi.Pointer Dart_IsolateGroupData( - Dart_Isolate isolate, - ) { - return _Dart_IsolateGroupData( - isolate, - ); - } - - late final _Dart_IsolateGroupDataPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateGroupData'); - late final _Dart_IsolateGroupData = _Dart_IsolateGroupDataPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); - - /// Returns the debugging name for the current isolate. - /// - /// This name is unique to each isolate and should only be used to make - /// debugging messages more comprehensible. - Object Dart_DebugName() { - return _Dart_DebugName(); - } - - late final _Dart_DebugNamePtr = - _lookup>('Dart_DebugName'); - late final _Dart_DebugName = - _Dart_DebugNamePtr.asFunction(); - - /// Returns the ID for an isolate which is used to query the service protocol. - /// - /// It is the responsibility of the caller to free the returned ID. - ffi.Pointer Dart_IsolateServiceId( - Dart_Isolate isolate, - ) { - return _Dart_IsolateServiceId( - isolate, - ); - } - - late final _Dart_IsolateServiceIdPtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateServiceId'); - late final _Dart_IsolateServiceId = _Dart_IsolateServiceIdPtr.asFunction< - ffi.Pointer Function(Dart_Isolate)>(); - - /// Enters an isolate. After calling this function, - /// the current isolate will be set to the provided isolate. - /// - /// Requires there to be no current isolate. Multiple threads may not be in - /// the same isolate at once. - void Dart_EnterIsolate( - Dart_Isolate isolate, - ) { - return _Dart_EnterIsolate( - isolate, - ); - } - - late final _Dart_EnterIsolatePtr = - _lookup>( - 'Dart_EnterIsolate'); - late final _Dart_EnterIsolate = - _Dart_EnterIsolatePtr.asFunction(); - - /// Kills the given isolate. - /// - /// This function has the same effect as dart:isolate's - /// Isolate.kill(priority:immediate). - /// It can interrupt ordinary Dart code but not native code. If the isolate is - /// in the middle of a long running native function, the isolate will not be - /// killed until control returns to Dart. - /// - /// Does not require a current isolate. It is safe to kill the current isolate if - /// there is one. - void Dart_KillIsolate( - Dart_Isolate isolate, - ) { - return _Dart_KillIsolate( - isolate, - ); - } - - late final _Dart_KillIsolatePtr = - _lookup>( - 'Dart_KillIsolate'); - late final _Dart_KillIsolate = - _Dart_KillIsolatePtr.asFunction(); - - /// Notifies the VM that the embedder expects |size| bytes of memory have become - /// unreachable. The VM may use this hint to adjust the garbage collector's - /// growth policy. - /// - /// Multiple calls are interpreted as increasing, not replacing, the estimate of - /// unreachable memory. - /// - /// Requires there to be a current isolate. - void Dart_HintFreed( - int size, - ) { - return _Dart_HintFreed( - size, - ); - } - - late final _Dart_HintFreedPtr = - _lookup>( - 'Dart_HintFreed'); - late final _Dart_HintFreed = - _Dart_HintFreedPtr.asFunction(); - - /// Notifies the VM that the embedder expects to be idle until |deadline|. The VM - /// may use this time to perform garbage collection or other tasks to avoid - /// delays during execution of Dart code in the future. - /// - /// |deadline| is measured in microseconds against the system's monotonic time. - /// This clock can be accessed via Dart_TimelineGetMicros(). - /// - /// Requires there to be a current isolate. - void Dart_NotifyIdle( - int deadline, - ) { - return _Dart_NotifyIdle( - deadline, - ); - } - - late final _Dart_NotifyIdlePtr = - _lookup>( - 'Dart_NotifyIdle'); - late final _Dart_NotifyIdle = - _Dart_NotifyIdlePtr.asFunction(); - - /// Notifies the VM that the system is running low on memory. - /// - /// Does not require a current isolate. Only valid after calling Dart_Initialize. - void Dart_NotifyLowMemory() { - return _Dart_NotifyLowMemory(); - } - - late final _Dart_NotifyLowMemoryPtr = - _lookup>('Dart_NotifyLowMemory'); - late final _Dart_NotifyLowMemory = - _Dart_NotifyLowMemoryPtr.asFunction(); - - /// Starts the CPU sampling profiler. - void Dart_StartProfiling() { - return _Dart_StartProfiling(); - } - - late final _Dart_StartProfilingPtr = - _lookup>('Dart_StartProfiling'); - late final _Dart_StartProfiling = - _Dart_StartProfilingPtr.asFunction(); - - /// Stops the CPU sampling profiler. - /// - /// Note that some profile samples might still be taken after this fucntion - /// returns due to the asynchronous nature of the implementation on some - /// platforms. - void Dart_StopProfiling() { - return _Dart_StopProfiling(); - } - - late final _Dart_StopProfilingPtr = - _lookup>('Dart_StopProfiling'); - late final _Dart_StopProfiling = - _Dart_StopProfilingPtr.asFunction(); - - /// Notifies the VM that the current thread should not be profiled until a - /// matching call to Dart_ThreadEnableProfiling is made. - /// - /// NOTE: By default, if a thread has entered an isolate it will be profiled. - /// This function should be used when an embedder knows a thread is about - /// to make a blocking call and wants to avoid unnecessary interrupts by - /// the profiler. - void Dart_ThreadDisableProfiling() { - return _Dart_ThreadDisableProfiling(); - } - - late final _Dart_ThreadDisableProfilingPtr = - _lookup>( - 'Dart_ThreadDisableProfiling'); - late final _Dart_ThreadDisableProfiling = - _Dart_ThreadDisableProfilingPtr.asFunction(); - - /// Notifies the VM that the current thread should be profiled. - /// - /// NOTE: It is only legal to call this function *after* calling - /// Dart_ThreadDisableProfiling. - /// - /// NOTE: By default, if a thread has entered an isolate it will be profiled. - void Dart_ThreadEnableProfiling() { - return _Dart_ThreadEnableProfiling(); - } - - late final _Dart_ThreadEnableProfilingPtr = - _lookup>( - 'Dart_ThreadEnableProfiling'); - late final _Dart_ThreadEnableProfiling = - _Dart_ThreadEnableProfilingPtr.asFunction(); - - /// Register symbol information for the Dart VM's profiler and crash dumps. - /// - /// This consumes the output of //topaz/runtime/dart/profiler_symbols, which - /// should be treated as opaque. - void Dart_AddSymbols( - ffi.Pointer dso_name, - ffi.Pointer buffer, - int buffer_size, - ) { - return _Dart_AddSymbols( - dso_name, - buffer, - buffer_size, - ); - } - - late final _Dart_AddSymbolsPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.IntPtr)>>('Dart_AddSymbols'); - late final _Dart_AddSymbols = _Dart_AddSymbolsPtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// Exits an isolate. After this call, Dart_CurrentIsolate will - /// return NULL. - /// - /// Requires there to be a current isolate. - void Dart_ExitIsolate() { - return _Dart_ExitIsolate(); - } - - late final _Dart_ExitIsolatePtr = - _lookup>('Dart_ExitIsolate'); - late final _Dart_ExitIsolate = - _Dart_ExitIsolatePtr.asFunction(); - - /// Creates a full snapshot of the current isolate heap. - /// - /// A full snapshot is a compact representation of the dart vm isolate heap - /// and dart isolate heap states. These snapshots are used to initialize - /// the vm isolate on startup and fast initialization of an isolate. - /// A Snapshot of the heap is created before any dart code has executed. - /// - /// Requires there to be a current isolate. Not available in the precompiled - /// runtime (check Dart_IsPrecompiledRuntime). - /// - /// \param buffer Returns a pointer to a buffer containing the - /// snapshot. This buffer is scope allocated and is only valid - /// until the next call to Dart_ExitScope. - /// \param size Returns the size of the buffer. - /// \param is_core Create a snapshot containing core libraries. - /// Such snapshot should be agnostic to null safety mode. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateSnapshot( - ffi.Pointer> vm_snapshot_data_buffer, - ffi.Pointer vm_snapshot_data_size, - ffi.Pointer> isolate_snapshot_data_buffer, - ffi.Pointer isolate_snapshot_data_size, - bool is_core, - ) { - return _Dart_CreateSnapshot( - vm_snapshot_data_buffer, - vm_snapshot_data_size, - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - is_core, - ); - } - - late final _Dart_CreateSnapshotPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Bool)>>('Dart_CreateSnapshot'); - late final _Dart_CreateSnapshot = _Dart_CreateSnapshotPtr.asFunction< - Object Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - bool)>(); - - /// Returns whether the buffer contains a kernel file. - /// - /// \param buffer Pointer to a buffer that might contain a kernel binary. - /// \param buffer_size Size of the buffer. - /// - /// \return Whether the buffer contains a kernel binary (full or partial). - bool Dart_IsKernel( - ffi.Pointer buffer, - int buffer_size, - ) { - return _Dart_IsKernel( - buffer, - buffer_size, - ); - } - - late final _Dart_IsKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_IsKernel'); - late final _Dart_IsKernel = _Dart_IsKernelPtr.asFunction< - bool Function(ffi.Pointer, int)>(); - - /// Make isolate runnable. - /// - /// When isolates are spawned, this function is used to indicate that - /// the creation and initialization (including script loading) of the - /// isolate is complete and the isolate can start. - /// This function expects there to be no current isolate. - /// - /// \param isolate The isolate to be made runnable. - /// - /// \return NULL if successful. Returns an error message otherwise. The caller - /// is responsible for freeing the error message. - ffi.Pointer Dart_IsolateMakeRunnable( - Dart_Isolate isolate, - ) { - return _Dart_IsolateMakeRunnable( - isolate, - ); - } - - late final _Dart_IsolateMakeRunnablePtr = - _lookup Function(Dart_Isolate)>>( - 'Dart_IsolateMakeRunnable'); - late final _Dart_IsolateMakeRunnable = _Dart_IsolateMakeRunnablePtr - .asFunction Function(Dart_Isolate)>(); - - /// Allows embedders to provide an alternative wakeup mechanism for the - /// delivery of inter-isolate messages. This setting only applies to - /// the current isolate. - /// - /// Most embedders will only call this function once, before isolate - /// execution begins. If this function is called after isolate - /// execution begins, the embedder is responsible for threading issues. - void Dart_SetMessageNotifyCallback( - Dart_MessageNotifyCallback message_notify_callback, - ) { - return _Dart_SetMessageNotifyCallback( - message_notify_callback, - ); - } - - late final _Dart_SetMessageNotifyCallbackPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetMessageNotifyCallback'); - late final _Dart_SetMessageNotifyCallback = _Dart_SetMessageNotifyCallbackPtr - .asFunction(); - - /// Query the current message notify callback for the isolate. - /// - /// \return The current message notify callback for the isolate. - Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback() { - return _Dart_GetMessageNotifyCallback(); - } - - late final _Dart_GetMessageNotifyCallbackPtr = - _lookup>( - 'Dart_GetMessageNotifyCallback'); - late final _Dart_GetMessageNotifyCallback = _Dart_GetMessageNotifyCallbackPtr - .asFunction(); - - /// If the VM flag `--pause-isolates-on-start` was passed this will be true. - /// - /// \return A boolean value indicating if pause on start was requested. - bool Dart_ShouldPauseOnStart() { - return _Dart_ShouldPauseOnStart(); - } - - late final _Dart_ShouldPauseOnStartPtr = - _lookup>( - 'Dart_ShouldPauseOnStart'); - late final _Dart_ShouldPauseOnStart = - _Dart_ShouldPauseOnStartPtr.asFunction(); - - /// Override the VM flag `--pause-isolates-on-start` for the current isolate. - /// - /// \param should_pause Should the isolate be paused on start? - /// - /// NOTE: This must be called before Dart_IsolateMakeRunnable. - void Dart_SetShouldPauseOnStart( - bool should_pause, - ) { - return _Dart_SetShouldPauseOnStart( - should_pause, - ); - } - - late final _Dart_SetShouldPauseOnStartPtr = - _lookup>( - 'Dart_SetShouldPauseOnStart'); - late final _Dart_SetShouldPauseOnStart = - _Dart_SetShouldPauseOnStartPtr.asFunction(); - - /// Is the current isolate paused on start? - /// - /// \return A boolean value indicating if the isolate is paused on start. - bool Dart_IsPausedOnStart() { - return _Dart_IsPausedOnStart(); - } - - late final _Dart_IsPausedOnStartPtr = - _lookup>('Dart_IsPausedOnStart'); - late final _Dart_IsPausedOnStart = - _Dart_IsPausedOnStartPtr.asFunction(); - - /// Called when the embedder has paused the current isolate on start and when - /// the embedder has resumed the isolate. - /// - /// \param paused Is the isolate paused on start? - void Dart_SetPausedOnStart( - bool paused, - ) { - return _Dart_SetPausedOnStart( - paused, - ); - } - - late final _Dart_SetPausedOnStartPtr = - _lookup>( - 'Dart_SetPausedOnStart'); - late final _Dart_SetPausedOnStart = - _Dart_SetPausedOnStartPtr.asFunction(); - - /// If the VM flag `--pause-isolates-on-exit` was passed this will be true. - /// - /// \return A boolean value indicating if pause on exit was requested. - bool Dart_ShouldPauseOnExit() { - return _Dart_ShouldPauseOnExit(); - } - - late final _Dart_ShouldPauseOnExitPtr = - _lookup>( - 'Dart_ShouldPauseOnExit'); - late final _Dart_ShouldPauseOnExit = - _Dart_ShouldPauseOnExitPtr.asFunction(); - - /// Override the VM flag `--pause-isolates-on-exit` for the current isolate. - /// - /// \param should_pause Should the isolate be paused on exit? - void Dart_SetShouldPauseOnExit( - bool should_pause, - ) { - return _Dart_SetShouldPauseOnExit( - should_pause, - ); - } - - late final _Dart_SetShouldPauseOnExitPtr = - _lookup>( - 'Dart_SetShouldPauseOnExit'); - late final _Dart_SetShouldPauseOnExit = - _Dart_SetShouldPauseOnExitPtr.asFunction(); - - /// Is the current isolate paused on exit? - /// - /// \return A boolean value indicating if the isolate is paused on exit. - bool Dart_IsPausedOnExit() { - return _Dart_IsPausedOnExit(); - } - - late final _Dart_IsPausedOnExitPtr = - _lookup>('Dart_IsPausedOnExit'); - late final _Dart_IsPausedOnExit = - _Dart_IsPausedOnExitPtr.asFunction(); - - /// Called when the embedder has paused the current isolate on exit and when - /// the embedder has resumed the isolate. - /// - /// \param paused Is the isolate paused on exit? - void Dart_SetPausedOnExit( - bool paused, - ) { - return _Dart_SetPausedOnExit( - paused, - ); - } - - late final _Dart_SetPausedOnExitPtr = - _lookup>( - 'Dart_SetPausedOnExit'); - late final _Dart_SetPausedOnExit = - _Dart_SetPausedOnExitPtr.asFunction(); - - /// Called when the embedder has caught a top level unhandled exception error - /// in the current isolate. - /// - /// NOTE: It is illegal to call this twice on the same isolate without first - /// clearing the sticky error to null. - /// - /// \param error The unhandled exception error. - void Dart_SetStickyError( - Object error, - ) { - return _Dart_SetStickyError( - error, - ); - } - - late final _Dart_SetStickyErrorPtr = - _lookup>( - 'Dart_SetStickyError'); - late final _Dart_SetStickyError = - _Dart_SetStickyErrorPtr.asFunction(); - - /// Does the current isolate have a sticky error? - bool Dart_HasStickyError() { - return _Dart_HasStickyError(); - } - - late final _Dart_HasStickyErrorPtr = - _lookup>('Dart_HasStickyError'); - late final _Dart_HasStickyError = - _Dart_HasStickyErrorPtr.asFunction(); - - /// Gets the sticky error for the current isolate. - /// - /// \return A handle to the sticky error object or null. - Object Dart_GetStickyError() { - return _Dart_GetStickyError(); - } - - late final _Dart_GetStickyErrorPtr = - _lookup>('Dart_GetStickyError'); - late final _Dart_GetStickyError = - _Dart_GetStickyErrorPtr.asFunction(); - - /// Handles the next pending message for the current isolate. - /// - /// May generate an unhandled exception error. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_HandleMessage() { - return _Dart_HandleMessage(); - } - - late final _Dart_HandleMessagePtr = - _lookup>('Dart_HandleMessage'); - late final _Dart_HandleMessage = - _Dart_HandleMessagePtr.asFunction(); - - /// Drains the microtask queue, then blocks the calling thread until the current - /// isolate recieves a message, then handles all messages. - /// - /// \param timeout_millis When non-zero, the call returns after the indicated - /// number of milliseconds even if no message was received. - /// \return A valid handle if no error occurs, otherwise an error handle. - Object Dart_WaitForEvent( - int timeout_millis, - ) { - return _Dart_WaitForEvent( - timeout_millis, - ); - } - - late final _Dart_WaitForEventPtr = - _lookup>( - 'Dart_WaitForEvent'); - late final _Dart_WaitForEvent = - _Dart_WaitForEventPtr.asFunction(); - - /// Handles any pending messages for the vm service for the current - /// isolate. - /// - /// This function may be used by an embedder at a breakpoint to avoid - /// pausing the vm service. - /// - /// This function can indirectly cause the message notify callback to - /// be called. - /// - /// \return true if the vm service requests the program resume - /// execution, false otherwise - bool Dart_HandleServiceMessages() { - return _Dart_HandleServiceMessages(); - } - - late final _Dart_HandleServiceMessagesPtr = - _lookup>( - 'Dart_HandleServiceMessages'); - late final _Dart_HandleServiceMessages = - _Dart_HandleServiceMessagesPtr.asFunction(); - - /// Does the current isolate have pending service messages? - /// - /// \return true if the isolate has pending service messages, false otherwise. - bool Dart_HasServiceMessages() { - return _Dart_HasServiceMessages(); - } - - late final _Dart_HasServiceMessagesPtr = - _lookup>( - 'Dart_HasServiceMessages'); - late final _Dart_HasServiceMessages = - _Dart_HasServiceMessagesPtr.asFunction(); - - /// Processes any incoming messages for the current isolate. - /// - /// This function may only be used when the embedder has not provided - /// an alternate message delivery mechanism with - /// Dart_SetMessageCallbacks. It is provided for convenience. - /// - /// This function waits for incoming messages for the current - /// isolate. As new messages arrive, they are handled using - /// Dart_HandleMessage. The routine exits when all ports to the - /// current isolate are closed. - /// - /// \return A valid handle if the run loop exited successfully. If an - /// exception or other error occurs while processing messages, an - /// error handle is returned. - Object Dart_RunLoop() { - return _Dart_RunLoop(); - } - - late final _Dart_RunLoopPtr = - _lookup>('Dart_RunLoop'); - late final _Dart_RunLoop = _Dart_RunLoopPtr.asFunction(); - - /// Lets the VM run message processing for the isolate. - /// - /// This function expects there to a current isolate and the current isolate - /// must not have an active api scope. The VM will take care of making the - /// isolate runnable (if not already), handles its message loop and will take - /// care of shutting the isolate down once it's done. - /// - /// \param errors_are_fatal Whether uncaught errors should be fatal. - /// \param on_error_port A port to notify on uncaught errors (or ILLEGAL_PORT). - /// \param on_exit_port A port to notify on exit (or ILLEGAL_PORT). - /// \param error A non-NULL pointer which will hold an error message if the call - /// fails. The error has to be free()ed by the caller. - /// - /// \return If successfull the VM takes owernship of the isolate and takes care - /// of its message loop. If not successful the caller retains owernship of the - /// isolate. - bool Dart_RunLoopAsync( - bool errors_are_fatal, - int on_error_port, - int on_exit_port, - ffi.Pointer> error, - ) { - return _Dart_RunLoopAsync( - errors_are_fatal, - on_error_port, - on_exit_port, - error, - ); - } - - late final _Dart_RunLoopAsyncPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Bool, Dart_Port, Dart_Port, - ffi.Pointer>)>>('Dart_RunLoopAsync'); - late final _Dart_RunLoopAsync = _Dart_RunLoopAsyncPtr.asFunction< - bool Function(bool, int, int, ffi.Pointer>)>(); - - /// Gets the main port id for the current isolate. - int Dart_GetMainPortId() { - return _Dart_GetMainPortId(); - } - - late final _Dart_GetMainPortIdPtr = - _lookup>('Dart_GetMainPortId'); - late final _Dart_GetMainPortId = - _Dart_GetMainPortIdPtr.asFunction(); - - /// Does the current isolate have live ReceivePorts? - /// - /// A ReceivePort is live when it has not been closed. - bool Dart_HasLivePorts() { - return _Dart_HasLivePorts(); - } - - late final _Dart_HasLivePortsPtr = - _lookup>('Dart_HasLivePorts'); - late final _Dart_HasLivePorts = - _Dart_HasLivePortsPtr.asFunction(); - - /// Posts a message for some isolate. The message is a serialized - /// object. - /// - /// Requires there to be a current isolate. - /// - /// \param port The destination port. - /// \param object An object from the current isolate. - /// - /// \return True if the message was posted. - bool Dart_Post( - int port_id, - Object object, - ) { - return _Dart_Post( - port_id, - object, - ); - } - - late final _Dart_PostPtr = - _lookup>( - 'Dart_Post'); - late final _Dart_Post = - _Dart_PostPtr.asFunction(); - - /// Returns a new SendPort with the provided port id. - /// - /// \param port_id The destination port. - /// - /// \return A new SendPort if no errors occurs. Otherwise returns - /// an error handle. - Object Dart_NewSendPort( - int port_id, - ) { - return _Dart_NewSendPort( - port_id, - ); - } - - late final _Dart_NewSendPortPtr = - _lookup>( - 'Dart_NewSendPort'); - late final _Dart_NewSendPort = - _Dart_NewSendPortPtr.asFunction(); - - /// Gets the SendPort id for the provided SendPort. - /// \param port A SendPort object whose id is desired. - /// \param port_id Returns the id of the SendPort. - /// \return Success if no error occurs. Otherwise returns - /// an error handle. - Object Dart_SendPortGetId( - Object port, - ffi.Pointer port_id, - ) { - return _Dart_SendPortGetId( - port, - port_id, - ); - } - - late final _Dart_SendPortGetIdPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_SendPortGetId'); - late final _Dart_SendPortGetId = _Dart_SendPortGetIdPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Enters a new scope. - /// - /// All new local handles will be created in this scope. Additionally, - /// some functions may return "scope allocated" memory which is only - /// valid within this scope. - /// - /// Requires there to be a current isolate. - void Dart_EnterScope() { - return _Dart_EnterScope(); - } - - late final _Dart_EnterScopePtr = - _lookup>('Dart_EnterScope'); - late final _Dart_EnterScope = - _Dart_EnterScopePtr.asFunction(); - - /// Exits a scope. - /// - /// The previous scope (if any) becomes the current scope. - /// - /// Requires there to be a current isolate. - void Dart_ExitScope() { - return _Dart_ExitScope(); - } - - late final _Dart_ExitScopePtr = - _lookup>('Dart_ExitScope'); - late final _Dart_ExitScope = _Dart_ExitScopePtr.asFunction(); - - /// The Dart VM uses "zone allocation" for temporary structures. Zones - /// support very fast allocation of small chunks of memory. The chunks - /// cannot be deallocated individually, but instead zones support - /// deallocating all chunks in one fast operation. - /// - /// This function makes it possible for the embedder to allocate - /// temporary data in the VMs zone allocator. - /// - /// Zone allocation is possible: - /// 1. when inside a scope where local handles can be allocated - /// 2. when processing a message from a native port in a native port - /// handler - /// - /// All the memory allocated this way will be reclaimed either on the - /// next call to Dart_ExitScope or when the native port handler exits. - /// - /// \param size Size of the memory to allocate. - /// - /// \return A pointer to the allocated memory. NULL if allocation - /// failed. Failure might due to is no current VM zone. - ffi.Pointer Dart_ScopeAllocate( - int size, - ) { - return _Dart_ScopeAllocate( - size, - ); - } - - late final _Dart_ScopeAllocatePtr = - _lookup Function(ffi.IntPtr)>>( - 'Dart_ScopeAllocate'); - late final _Dart_ScopeAllocate = - _Dart_ScopeAllocatePtr.asFunction Function(int)>(); - - /// Returns the null object. - /// - /// \return A handle to the null object. - Object Dart_Null() { - return _Dart_Null(); - } - - late final _Dart_NullPtr = - _lookup>('Dart_Null'); - late final _Dart_Null = _Dart_NullPtr.asFunction(); - - /// Is this object null? - bool Dart_IsNull( - Object object, - ) { - return _Dart_IsNull( - object, - ); - } - - late final _Dart_IsNullPtr = - _lookup>('Dart_IsNull'); - late final _Dart_IsNull = _Dart_IsNullPtr.asFunction(); - - /// Returns the empty string object. - /// - /// \return A handle to the empty string object. - Object Dart_EmptyString() { - return _Dart_EmptyString(); - } - - late final _Dart_EmptyStringPtr = - _lookup>('Dart_EmptyString'); - late final _Dart_EmptyString = - _Dart_EmptyStringPtr.asFunction(); - - /// Returns types that are not classes, and which therefore cannot be looked up - /// as library members by Dart_GetType. - /// - /// \return A handle to the dynamic, void or Never type. - Object Dart_TypeDynamic() { - return _Dart_TypeDynamic(); - } - - late final _Dart_TypeDynamicPtr = - _lookup>('Dart_TypeDynamic'); - late final _Dart_TypeDynamic = - _Dart_TypeDynamicPtr.asFunction(); - - Object Dart_TypeVoid() { - return _Dart_TypeVoid(); - } - - late final _Dart_TypeVoidPtr = - _lookup>('Dart_TypeVoid'); - late final _Dart_TypeVoid = _Dart_TypeVoidPtr.asFunction(); - - Object Dart_TypeNever() { - return _Dart_TypeNever(); - } - - late final _Dart_TypeNeverPtr = - _lookup>('Dart_TypeNever'); - late final _Dart_TypeNever = - _Dart_TypeNeverPtr.asFunction(); - - /// Checks if the two objects are equal. - /// - /// The result of the comparison is returned through the 'equal' - /// parameter. The return value itself is used to indicate success or - /// failure, not equality. - /// - /// May generate an unhandled exception error. - /// - /// \param obj1 An object to be compared. - /// \param obj2 An object to be compared. - /// \param equal Returns the result of the equality comparison. - /// - /// \return A valid handle if no error occurs during the comparison. - Object Dart_ObjectEquals( - Object obj1, - Object obj2, - ffi.Pointer equal, - ) { - return _Dart_ObjectEquals( - obj1, - obj2, - equal, - ); - } - - late final _Dart_ObjectEqualsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, - ffi.Pointer)>>('Dart_ObjectEquals'); - late final _Dart_ObjectEquals = _Dart_ObjectEqualsPtr.asFunction< - Object Function(Object, Object, ffi.Pointer)>(); - - /// Is this object an instance of some type? - /// - /// The result of the test is returned through the 'instanceof' parameter. - /// The return value itself is used to indicate success or failure. - /// - /// \param object An object. - /// \param type A type. - /// \param instanceof Return true if 'object' is an instance of type 'type'. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ObjectIsType( - Object object, - Object type, - ffi.Pointer instanceof, - ) { - return _Dart_ObjectIsType( - object, - type, - instanceof, - ); - } - - late final _Dart_ObjectIsTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, - ffi.Pointer)>>('Dart_ObjectIsType'); - late final _Dart_ObjectIsType = _Dart_ObjectIsTypePtr.asFunction< - Object Function(Object, Object, ffi.Pointer)>(); - - /// Query object type. - /// - /// \param object Some Object. - /// - /// \return true if Object is of the specified type. - bool Dart_IsInstance( - Object object, - ) { - return _Dart_IsInstance( - object, - ); - } - - late final _Dart_IsInstancePtr = - _lookup>( - 'Dart_IsInstance'); - late final _Dart_IsInstance = - _Dart_IsInstancePtr.asFunction(); - - bool Dart_IsNumber( - Object object, - ) { - return _Dart_IsNumber( - object, - ); - } - - late final _Dart_IsNumberPtr = - _lookup>( - 'Dart_IsNumber'); - late final _Dart_IsNumber = - _Dart_IsNumberPtr.asFunction(); - - bool Dart_IsInteger( - Object object, - ) { - return _Dart_IsInteger( - object, - ); - } - - late final _Dart_IsIntegerPtr = - _lookup>( - 'Dart_IsInteger'); - late final _Dart_IsInteger = - _Dart_IsIntegerPtr.asFunction(); - - bool Dart_IsDouble( - Object object, - ) { - return _Dart_IsDouble( - object, - ); - } - - late final _Dart_IsDoublePtr = - _lookup>( - 'Dart_IsDouble'); - late final _Dart_IsDouble = - _Dart_IsDoublePtr.asFunction(); - - bool Dart_IsBoolean( - Object object, - ) { - return _Dart_IsBoolean( - object, - ); - } - - late final _Dart_IsBooleanPtr = - _lookup>( - 'Dart_IsBoolean'); - late final _Dart_IsBoolean = - _Dart_IsBooleanPtr.asFunction(); - - bool Dart_IsString( - Object object, - ) { - return _Dart_IsString( - object, - ); - } - - late final _Dart_IsStringPtr = - _lookup>( - 'Dart_IsString'); - late final _Dart_IsString = - _Dart_IsStringPtr.asFunction(); - - bool Dart_IsStringLatin1( - Object object, - ) { - return _Dart_IsStringLatin1( - object, - ); - } - - late final _Dart_IsStringLatin1Ptr = - _lookup>( - 'Dart_IsStringLatin1'); - late final _Dart_IsStringLatin1 = - _Dart_IsStringLatin1Ptr.asFunction(); - - bool Dart_IsExternalString( - Object object, - ) { - return _Dart_IsExternalString( - object, - ); - } - - late final _Dart_IsExternalStringPtr = - _lookup>( - 'Dart_IsExternalString'); - late final _Dart_IsExternalString = - _Dart_IsExternalStringPtr.asFunction(); - - bool Dart_IsList( - Object object, - ) { - return _Dart_IsList( - object, - ); - } - - late final _Dart_IsListPtr = - _lookup>('Dart_IsList'); - late final _Dart_IsList = _Dart_IsListPtr.asFunction(); - - bool Dart_IsMap( - Object object, - ) { - return _Dart_IsMap( - object, - ); - } - - late final _Dart_IsMapPtr = - _lookup>('Dart_IsMap'); - late final _Dart_IsMap = _Dart_IsMapPtr.asFunction(); - - bool Dart_IsLibrary( - Object object, - ) { - return _Dart_IsLibrary( - object, - ); - } - - late final _Dart_IsLibraryPtr = - _lookup>( - 'Dart_IsLibrary'); - late final _Dart_IsLibrary = - _Dart_IsLibraryPtr.asFunction(); - - bool Dart_IsType( - Object handle, - ) { - return _Dart_IsType( - handle, - ); - } - - late final _Dart_IsTypePtr = - _lookup>('Dart_IsType'); - late final _Dart_IsType = _Dart_IsTypePtr.asFunction(); - - bool Dart_IsFunction( - Object handle, - ) { - return _Dart_IsFunction( - handle, - ); - } - - late final _Dart_IsFunctionPtr = - _lookup>( - 'Dart_IsFunction'); - late final _Dart_IsFunction = - _Dart_IsFunctionPtr.asFunction(); - - bool Dart_IsVariable( - Object handle, - ) { - return _Dart_IsVariable( - handle, - ); - } - - late final _Dart_IsVariablePtr = - _lookup>( - 'Dart_IsVariable'); - late final _Dart_IsVariable = - _Dart_IsVariablePtr.asFunction(); - - bool Dart_IsTypeVariable( - Object handle, - ) { - return _Dart_IsTypeVariable( - handle, - ); - } - - late final _Dart_IsTypeVariablePtr = - _lookup>( - 'Dart_IsTypeVariable'); - late final _Dart_IsTypeVariable = - _Dart_IsTypeVariablePtr.asFunction(); - - bool Dart_IsClosure( - Object object, - ) { - return _Dart_IsClosure( - object, - ); - } - - late final _Dart_IsClosurePtr = - _lookup>( - 'Dart_IsClosure'); - late final _Dart_IsClosure = - _Dart_IsClosurePtr.asFunction(); - - bool Dart_IsTypedData( - Object object, - ) { - return _Dart_IsTypedData( - object, - ); - } - - late final _Dart_IsTypedDataPtr = - _lookup>( - 'Dart_IsTypedData'); - late final _Dart_IsTypedData = - _Dart_IsTypedDataPtr.asFunction(); - - bool Dart_IsByteBuffer( - Object object, - ) { - return _Dart_IsByteBuffer( - object, - ); - } - - late final _Dart_IsByteBufferPtr = - _lookup>( - 'Dart_IsByteBuffer'); - late final _Dart_IsByteBuffer = - _Dart_IsByteBufferPtr.asFunction(); - - bool Dart_IsFuture( - Object object, - ) { - return _Dart_IsFuture( - object, - ); - } - - late final _Dart_IsFuturePtr = - _lookup>( - 'Dart_IsFuture'); - late final _Dart_IsFuture = - _Dart_IsFuturePtr.asFunction(); - - /// Gets the type of a Dart language object. - /// - /// \param instance Some Dart object. - /// - /// \return If no error occurs, the type is returned. Otherwise an - /// error handle is returned. - Object Dart_InstanceGetType( - Object instance, - ) { - return _Dart_InstanceGetType( - instance, - ); - } - - late final _Dart_InstanceGetTypePtr = - _lookup>( - 'Dart_InstanceGetType'); - late final _Dart_InstanceGetType = - _Dart_InstanceGetTypePtr.asFunction(); - - /// Returns the name for the provided class type. - /// - /// \return A valid string handle if no error occurs during the - /// operation. - Object Dart_ClassName( - Object cls_type, - ) { - return _Dart_ClassName( - cls_type, - ); - } - - late final _Dart_ClassNamePtr = - _lookup>( - 'Dart_ClassName'); - late final _Dart_ClassName = - _Dart_ClassNamePtr.asFunction(); - - /// Returns the name for the provided function or method. - /// - /// \return A valid string handle if no error occurs during the - /// operation. - Object Dart_FunctionName( - Object function, - ) { - return _Dart_FunctionName( - function, - ); - } - - late final _Dart_FunctionNamePtr = - _lookup>( - 'Dart_FunctionName'); - late final _Dart_FunctionName = - _Dart_FunctionNamePtr.asFunction(); - - /// Returns a handle to the owner of a function. - /// - /// The owner of an instance method or a static method is its defining - /// class. The owner of a top-level function is its defining - /// library. The owner of the function of a non-implicit closure is the - /// function of the method or closure that defines the non-implicit - /// closure. - /// - /// \return A valid handle to the owner of the function, or an error - /// handle if the argument is not a valid handle to a function. - Object Dart_FunctionOwner( - Object function, - ) { - return _Dart_FunctionOwner( - function, - ); - } - - late final _Dart_FunctionOwnerPtr = - _lookup>( - 'Dart_FunctionOwner'); - late final _Dart_FunctionOwner = - _Dart_FunctionOwnerPtr.asFunction(); - - /// Determines whether a function handle referes to a static function - /// of method. - /// - /// For the purposes of the embedding API, a top-level function is - /// implicitly declared static. - /// - /// \param function A handle to a function or method declaration. - /// \param is_static Returns whether the function or method is declared static. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_FunctionIsStatic( - Object function, - ffi.Pointer is_static, - ) { - return _Dart_FunctionIsStatic( - function, - is_static, - ); - } - - late final _Dart_FunctionIsStaticPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_FunctionIsStatic'); - late final _Dart_FunctionIsStatic = _Dart_FunctionIsStaticPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Is this object a closure resulting from a tear-off (closurized method)? - /// - /// Returns true for closures produced when an ordinary method is accessed - /// through a getter call. Returns false otherwise, in particular for closures - /// produced from local function declarations. - /// - /// \param object Some Object. - /// - /// \return true if Object is a tear-off. - bool Dart_IsTearOff( - Object object, - ) { - return _Dart_IsTearOff( - object, - ); - } - - late final _Dart_IsTearOffPtr = - _lookup>( - 'Dart_IsTearOff'); - late final _Dart_IsTearOff = - _Dart_IsTearOffPtr.asFunction(); - - /// Retrieves the function of a closure. - /// - /// \return A handle to the function of the closure, or an error handle if the - /// argument is not a closure. - Object Dart_ClosureFunction( - Object closure, - ) { - return _Dart_ClosureFunction( - closure, - ); - } - - late final _Dart_ClosureFunctionPtr = - _lookup>( - 'Dart_ClosureFunction'); - late final _Dart_ClosureFunction = - _Dart_ClosureFunctionPtr.asFunction(); - - /// Returns a handle to the library which contains class. - /// - /// \return A valid handle to the library with owns class, null if the class - /// has no library or an error handle if the argument is not a valid handle - /// to a class type. - Object Dart_ClassLibrary( - Object cls_type, - ) { - return _Dart_ClassLibrary( - cls_type, - ); - } - - late final _Dart_ClassLibraryPtr = - _lookup>( - 'Dart_ClassLibrary'); - late final _Dart_ClassLibrary = - _Dart_ClassLibraryPtr.asFunction(); - - /// Does this Integer fit into a 64-bit signed integer? - /// - /// \param integer An integer. - /// \param fits Returns true if the integer fits into a 64-bit signed integer. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerFitsIntoInt64( - Object integer, - ffi.Pointer fits, - ) { - return _Dart_IntegerFitsIntoInt64( - integer, - fits, - ); - } - - late final _Dart_IntegerFitsIntoInt64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IntegerFitsIntoInt64'); - late final _Dart_IntegerFitsIntoInt64 = _Dart_IntegerFitsIntoInt64Ptr - .asFunction)>(); - - /// Does this Integer fit into a 64-bit unsigned integer? - /// - /// \param integer An integer. - /// \param fits Returns true if the integer fits into a 64-bit unsigned integer. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerFitsIntoUint64( - Object integer, - ffi.Pointer fits, - ) { - return _Dart_IntegerFitsIntoUint64( - integer, - fits, - ); - } - - late final _Dart_IntegerFitsIntoUint64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer)>>('Dart_IntegerFitsIntoUint64'); - late final _Dart_IntegerFitsIntoUint64 = _Dart_IntegerFitsIntoUint64Ptr - .asFunction)>(); - - /// Returns an Integer with the provided value. - /// - /// \param value The value of the integer. - /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewInteger( - int value, - ) { - return _Dart_NewInteger( - value, - ); - } - - late final _Dart_NewIntegerPtr = - _lookup>( - 'Dart_NewInteger'); - late final _Dart_NewInteger = - _Dart_NewIntegerPtr.asFunction(); - - /// Returns an Integer with the provided value. - /// - /// \param value The unsigned value of the integer. - /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewIntegerFromUint64( - int value, - ) { - return _Dart_NewIntegerFromUint64( - value, - ); - } - - late final _Dart_NewIntegerFromUint64Ptr = - _lookup>( - 'Dart_NewIntegerFromUint64'); - late final _Dart_NewIntegerFromUint64 = - _Dart_NewIntegerFromUint64Ptr.asFunction(); - - /// Returns an Integer with the provided value. - /// - /// \param value The value of the integer represented as a C string - /// containing a hexadecimal number. - /// - /// \return The Integer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewIntegerFromHexCString( - ffi.Pointer value, - ) { - return _Dart_NewIntegerFromHexCString( - value, - ); - } - - late final _Dart_NewIntegerFromHexCStringPtr = - _lookup)>>( - 'Dart_NewIntegerFromHexCString'); - late final _Dart_NewIntegerFromHexCString = _Dart_NewIntegerFromHexCStringPtr - .asFunction)>(); - - /// Gets the value of an Integer. - /// - /// The integer must fit into a 64-bit signed integer, otherwise an error occurs. - /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToInt64( - Object integer, - ffi.Pointer value, - ) { - return _Dart_IntegerToInt64( - integer, - value, - ); - } - - late final _Dart_IntegerToInt64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IntegerToInt64'); - late final _Dart_IntegerToInt64 = _Dart_IntegerToInt64Ptr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Gets the value of an Integer. - /// - /// The integer must fit into a 64-bit unsigned integer, otherwise an - /// error occurs. - /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToUint64( - Object integer, - ffi.Pointer value, - ) { - return _Dart_IntegerToUint64( - integer, - value, - ); - } - - late final _Dart_IntegerToUint64Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IntegerToUint64'); - late final _Dart_IntegerToUint64 = _Dart_IntegerToUint64Ptr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Gets the value of an integer as a hexadecimal C string. - /// - /// \param integer An Integer. - /// \param value Returns the value of the Integer as a hexadecimal C - /// string. This C string is scope allocated and is only valid until - /// the next call to Dart_ExitScope. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_IntegerToHexCString( - Object integer, - ffi.Pointer> value, - ) { - return _Dart_IntegerToHexCString( - integer, - value, - ); - } - - late final _Dart_IntegerToHexCStringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer>)>>('Dart_IntegerToHexCString'); - late final _Dart_IntegerToHexCString = - _Dart_IntegerToHexCStringPtr.asFunction< - Object Function(Object, ffi.Pointer>)>(); - - /// Returns a Double with the provided value. - /// - /// \param value A double. - /// - /// \return The Double object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewDouble( - double value, - ) { - return _Dart_NewDouble( - value, - ); - } - - late final _Dart_NewDoublePtr = - _lookup>( - 'Dart_NewDouble'); - late final _Dart_NewDouble = - _Dart_NewDoublePtr.asFunction(); - - /// Gets the value of a Double - /// - /// \param double_obj A Double - /// \param value Returns the value of the Double. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_DoubleValue( - Object double_obj, - ffi.Pointer value, - ) { - return _Dart_DoubleValue( - double_obj, - value, - ); - } - - late final _Dart_DoubleValuePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_DoubleValue'); - late final _Dart_DoubleValue = _Dart_DoubleValuePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Returns a closure of static function 'function_name' in the class 'class_name' - /// in the exported namespace of specified 'library'. - /// - /// \param library Library object - /// \param cls_type Type object representing a Class - /// \param function_name Name of the static function in the class - /// - /// \return A valid Dart instance if no error occurs during the operation. - Object Dart_GetStaticMethodClosure( - Object library1, - Object cls_type, - Object function_name, - ) { - return _Dart_GetStaticMethodClosure( - library1, - cls_type, - function_name, - ); - } - - late final _Dart_GetStaticMethodClosurePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, - ffi.Handle)>>('Dart_GetStaticMethodClosure'); - late final _Dart_GetStaticMethodClosure = _Dart_GetStaticMethodClosurePtr - .asFunction(); - - /// Returns the True object. - /// - /// Requires there to be a current isolate. - /// - /// \return A handle to the True object. - Object Dart_True() { - return _Dart_True(); - } - - late final _Dart_TruePtr = - _lookup>('Dart_True'); - late final _Dart_True = _Dart_TruePtr.asFunction(); - - /// Returns the False object. - /// - /// Requires there to be a current isolate. - /// - /// \return A handle to the False object. - Object Dart_False() { - return _Dart_False(); - } - - late final _Dart_FalsePtr = - _lookup>('Dart_False'); - late final _Dart_False = _Dart_FalsePtr.asFunction(); - - /// Returns a Boolean with the provided value. - /// - /// \param value true or false. - /// - /// \return The Boolean object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewBoolean( - bool value, - ) { - return _Dart_NewBoolean( - value, - ); - } - - late final _Dart_NewBooleanPtr = - _lookup>( - 'Dart_NewBoolean'); - late final _Dart_NewBoolean = - _Dart_NewBooleanPtr.asFunction(); - - /// Gets the value of a Boolean - /// - /// \param boolean_obj A Boolean - /// \param value Returns the value of the Boolean. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_BooleanValue( - Object boolean_obj, - ffi.Pointer value, - ) { - return _Dart_BooleanValue( - boolean_obj, - value, - ); - } - - late final _Dart_BooleanValuePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_BooleanValue'); - late final _Dart_BooleanValue = _Dart_BooleanValuePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Gets the length of a String. - /// - /// \param str A String. - /// \param length Returns the length of the String. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringLength( - Object str, - ffi.Pointer length, - ) { - return _Dart_StringLength( - str, - length, - ); - } - - late final _Dart_StringLengthPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_StringLength'); - late final _Dart_StringLength = _Dart_StringLengthPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Returns a String built from the provided C string - /// (There is an implicit assumption that the C string passed in contains - /// UTF-8 encoded characters and '\0' is considered as a termination - /// character). - /// - /// \param value A C String - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromCString( - ffi.Pointer str, - ) { - return _Dart_NewStringFromCString( - str, - ); - } - - late final _Dart_NewStringFromCStringPtr = - _lookup)>>( - 'Dart_NewStringFromCString'); - late final _Dart_NewStringFromCString = _Dart_NewStringFromCStringPtr - .asFunction)>(); - - /// Returns a String built from an array of UTF-8 encoded characters. - /// - /// \param utf8_array An array of UTF-8 encoded characters. - /// \param length The length of the codepoints array. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF8( - ffi.Pointer utf8_array, - int length, - ) { - return _Dart_NewStringFromUTF8( - utf8_array, - length, - ); - } - - late final _Dart_NewStringFromUTF8Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF8'); - late final _Dart_NewStringFromUTF8 = _Dart_NewStringFromUTF8Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); - - /// Returns a String built from an array of UTF-16 encoded characters. - /// - /// \param utf16_array An array of UTF-16 encoded characters. - /// \param length The length of the codepoints array. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF16( - ffi.Pointer utf16_array, - int length, - ) { - return _Dart_NewStringFromUTF16( - utf16_array, - length, - ); - } - - late final _Dart_NewStringFromUTF16Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF16'); - late final _Dart_NewStringFromUTF16 = _Dart_NewStringFromUTF16Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); - - /// Returns a String built from an array of UTF-32 encoded characters. - /// - /// \param utf32_array An array of UTF-32 encoded characters. - /// \param length The length of the codepoints array. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewStringFromUTF32( - ffi.Pointer utf32_array, - int length, - ) { - return _Dart_NewStringFromUTF32( - utf32_array, - length, - ); - } - - late final _Dart_NewStringFromUTF32Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, ffi.IntPtr)>>('Dart_NewStringFromUTF32'); - late final _Dart_NewStringFromUTF32 = _Dart_NewStringFromUTF32Ptr.asFunction< - Object Function(ffi.Pointer, int)>(); - - /// Returns a String which references an external array of - /// Latin-1 (ISO-8859-1) encoded characters. - /// - /// \param latin1_array Array of Latin-1 encoded characters. This must not move. - /// \param length The length of the characters array. - /// \param peer An external pointer to associate with this string. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A callback to be called when this string is finalized. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalLatin1String( - ffi.Pointer latin1_array, - int length, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewExternalLatin1String( - latin1_array, - length, - peer, - external_allocation_size, - callback, - ); - } - - late final _Dart_NewExternalLatin1StringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewExternalLatin1String'); - late final _Dart_NewExternalLatin1String = - _Dart_NewExternalLatin1StringPtr.asFunction< - Object Function(ffi.Pointer, int, ffi.Pointer, - int, Dart_HandleFinalizer)>(); - - /// Returns a String which references an external array of UTF-16 encoded - /// characters. - /// - /// \param utf16_array An array of UTF-16 encoded characters. This must not move. - /// \param length The length of the characters array. - /// \param peer An external pointer to associate with this string. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A callback to be called when this string is finalized. - /// - /// \return The String object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalUTF16String( - ffi.Pointer utf16_array, - int length, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewExternalUTF16String( - utf16_array, - length, - peer, - external_allocation_size, - callback, - ); - } - - late final _Dart_NewExternalUTF16StringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewExternalUTF16String'); - late final _Dart_NewExternalUTF16String = - _Dart_NewExternalUTF16StringPtr.asFunction< - Object Function(ffi.Pointer, int, ffi.Pointer, - int, Dart_HandleFinalizer)>(); - - /// Gets the C string representation of a String. - /// (It is a sequence of UTF-8 encoded values with a '\0' termination.) - /// - /// \param str A string. - /// \param cstr Returns the String represented as a C string. - /// This C string is scope allocated and is only valid until - /// the next call to Dart_ExitScope. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToCString( - Object str, - ffi.Pointer> cstr, - ) { - return _Dart_StringToCString( - str, - cstr, - ); - } - - late final _Dart_StringToCStringPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer>)>>('Dart_StringToCString'); - late final _Dart_StringToCString = _Dart_StringToCStringPtr.asFunction< - Object Function(Object, ffi.Pointer>)>(); - - /// Gets a UTF-8 encoded representation of a String. - /// - /// Any unpaired surrogate code points in the string will be converted as - /// replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need - /// to preserve unpaired surrogates, use the Dart_StringToUTF16 function. - /// - /// \param str A string. - /// \param utf8_array Returns the String represented as UTF-8 code - /// units. This UTF-8 array is scope allocated and is only valid - /// until the next call to Dart_ExitScope. - /// \param length Used to return the length of the array which was - /// actually used. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToUTF8( - Object str, - ffi.Pointer> utf8_array, - ffi.Pointer length, - ) { - return _Dart_StringToUTF8( - str, - utf8_array, - length, - ); - } - - late final _Dart_StringToUTF8Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer>, - ffi.Pointer)>>('Dart_StringToUTF8'); - late final _Dart_StringToUTF8 = _Dart_StringToUTF8Ptr.asFunction< - Object Function(Object, ffi.Pointer>, - ffi.Pointer)>(); - - /// Gets the data corresponding to the string object. This function returns - /// the data only for Latin-1 (ISO-8859-1) string objects. For all other - /// string objects it returns an error. - /// - /// \param str A string. - /// \param latin1_array An array allocated by the caller, used to return - /// the string data. - /// \param length Used to pass in the length of the provided array. - /// Used to return the length of the array which was actually used. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToLatin1( - Object str, - ffi.Pointer latin1_array, - ffi.Pointer length, - ) { - return _Dart_StringToLatin1( - str, - latin1_array, - length, - ); - } - - late final _Dart_StringToLatin1Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer, - ffi.Pointer)>>('Dart_StringToLatin1'); - late final _Dart_StringToLatin1 = _Dart_StringToLatin1Ptr.asFunction< - Object Function( - Object, ffi.Pointer, ffi.Pointer)>(); - - /// Gets the UTF-16 encoded representation of a string. - /// - /// \param str A string. - /// \param utf16_array An array allocated by the caller, used to return - /// the array of UTF-16 encoded characters. - /// \param length Used to pass in the length of the provided array. - /// Used to return the length of the array which was actually used. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringToUTF16( - Object str, - ffi.Pointer utf16_array, - ffi.Pointer length, - ) { - return _Dart_StringToUTF16( - str, - utf16_array, - length, - ); - } - - late final _Dart_StringToUTF16Ptr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Pointer, - ffi.Pointer)>>('Dart_StringToUTF16'); - late final _Dart_StringToUTF16 = _Dart_StringToUTF16Ptr.asFunction< - Object Function( - Object, ffi.Pointer, ffi.Pointer)>(); - - /// Gets the storage size in bytes of a String. - /// - /// \param str A String. - /// \param length Returns the storage size in bytes of the String. - /// This is the size in bytes needed to store the String. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_StringStorageSize( - Object str, - ffi.Pointer size, - ) { - return _Dart_StringStorageSize( - str, - size, - ); - } - - late final _Dart_StringStorageSizePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_StringStorageSize'); - late final _Dart_StringStorageSize = _Dart_StringStorageSizePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Retrieves some properties associated with a String. - /// Properties retrieved are: - /// - character size of the string (one or two byte) - /// - length of the string - /// - peer pointer of string if it is an external string. - /// \param str A String. - /// \param char_size Returns the character size of the String. - /// \param str_len Returns the length of the String. - /// \param peer Returns the peer pointer associated with the String or 0 if - /// there is no peer pointer for it. - /// \return Success if no error occurs. Otherwise returns - /// an error handle. - Object Dart_StringGetProperties( - Object str, - ffi.Pointer char_size, - ffi.Pointer str_len, - ffi.Pointer> peer, - ) { - return _Dart_StringGetProperties( - str, - char_size, - str_len, - peer, - ); - } - - late final _Dart_StringGetPropertiesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>('Dart_StringGetProperties'); - late final _Dart_StringGetProperties = - _Dart_StringGetPropertiesPtr.asFunction< - Object Function(Object, ffi.Pointer, - ffi.Pointer, ffi.Pointer>)>(); - - /// Returns a List of the desired length. - /// - /// \param length The length of the list. - /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewList( - int length, - ) { - return _Dart_NewList( - length, - ); - } - - late final _Dart_NewListPtr = - _lookup>( - 'Dart_NewList'); - late final _Dart_NewList = - _Dart_NewListPtr.asFunction(); - - /// TODO(bkonyi): convert this to use nullable types once NNBD is enabled. - /// /** - /// * Returns a List of the desired length with the desired legacy element type. - /// * - /// * \param element_type_id The type of elements of the list. - /// * \param length The length of the list. - /// * - /// * \return The List object if no error occurs. Otherwise returns an error - /// * handle. - /// */ - Object Dart_NewListOf( - int element_type_id, - int length, - ) { - return _Dart_NewListOf( - element_type_id, - length, - ); - } - - late final _Dart_NewListOfPtr = - _lookup>( - 'Dart_NewListOf'); - late final _Dart_NewListOf = - _Dart_NewListOfPtr.asFunction(); - - /// Returns a List of the desired length with the desired element type. - /// - /// \param element_type Handle to a nullable type object. E.g., from - /// Dart_GetType or Dart_GetNullableType. - /// - /// \param length The length of the list. - /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewListOfType( - Object element_type, - int length, - ) { - return _Dart_NewListOfType( - element_type, - length, - ); - } - - late final _Dart_NewListOfTypePtr = - _lookup>( - 'Dart_NewListOfType'); - late final _Dart_NewListOfType = - _Dart_NewListOfTypePtr.asFunction(); - - /// Returns a List of the desired length with the desired element type, filled - /// with the provided object. - /// - /// \param element_type Handle to a type object. E.g., from Dart_GetType. - /// - /// \param fill_object Handle to an object of type 'element_type' that will be - /// used to populate the list. This parameter can only be Dart_Null() if the - /// length of the list is 0 or 'element_type' is a nullable type. - /// - /// \param length The length of the list. - /// - /// \return The List object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewListOfTypeFilled( - Object element_type, - Object fill_object, - int length, - ) { - return _Dart_NewListOfTypeFilled( - element_type, - fill_object, - length, - ); - } - - late final _Dart_NewListOfTypeFilledPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Handle, ffi.IntPtr)>>('Dart_NewListOfTypeFilled'); - late final _Dart_NewListOfTypeFilled = _Dart_NewListOfTypeFilledPtr - .asFunction(); - - /// Gets the length of a List. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param length Returns the length of the List. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ListLength( - Object list, - ffi.Pointer length, - ) { - return _Dart_ListLength( - list, - length, - ); - } - - late final _Dart_ListLengthPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_ListLength'); - late final _Dart_ListLength = _Dart_ListLengthPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Gets the Object at some index of a List. - /// - /// If the index is out of bounds, an error occurs. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param index A valid index into the List. - /// - /// \return The Object in the List at the specified index if no error - /// occurs. Otherwise returns an error handle. - Object Dart_ListGetAt( - Object list, - int index, - ) { - return _Dart_ListGetAt( - list, - index, - ); - } - - late final _Dart_ListGetAtPtr = - _lookup>( - 'Dart_ListGetAt'); - late final _Dart_ListGetAt = - _Dart_ListGetAtPtr.asFunction(); - - /// Gets a range of Objects from a List. - /// - /// If any of the requested index values are out of bounds, an error occurs. - /// - /// May generate an unhandled exception error. - /// - /// \param list A List. - /// \param offset The offset of the first item to get. - /// \param length The number of items to get. - /// \param result A pointer to fill with the objects. - /// - /// \return Success if no error occurs during the operation. - Object Dart_ListGetRange( - Object list, - int offset, - int length, - ffi.Pointer result, - ) { - return _Dart_ListGetRange( - list, - offset, - length, - result, - ); - } - - late final _Dart_ListGetRangePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.IntPtr, - ffi.Pointer)>>('Dart_ListGetRange'); - late final _Dart_ListGetRange = _Dart_ListGetRangePtr.asFunction< - Object Function(Object, int, int, ffi.Pointer)>(); - - /// Sets the Object at some index of a List. - /// - /// If the index is out of bounds, an error occurs. - /// - /// May generate an unhandled exception error. - /// - /// \param array A List. - /// \param index A valid index into the List. - /// \param value The Object to put in the List. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_ListSetAt( - Object list, - int index, - Object value, - ) { - return _Dart_ListSetAt( - list, - index, - value, - ); - } - - late final _Dart_ListSetAtPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.IntPtr, ffi.Handle)>>('Dart_ListSetAt'); - late final _Dart_ListSetAt = - _Dart_ListSetAtPtr.asFunction(); - - /// May generate an unhandled exception error. - Object Dart_ListGetAsBytes( - Object list, - int offset, - ffi.Pointer native_array, - int length, - ) { - return _Dart_ListGetAsBytes( - list, - offset, - native_array, - length, - ); - } - - late final _Dart_ListGetAsBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, - ffi.IntPtr)>>('Dart_ListGetAsBytes'); - late final _Dart_ListGetAsBytes = _Dart_ListGetAsBytesPtr.asFunction< - Object Function(Object, int, ffi.Pointer, int)>(); - - /// May generate an unhandled exception error. - Object Dart_ListSetAsBytes( - Object list, - int offset, - ffi.Pointer native_array, - int length, - ) { - return _Dart_ListSetAsBytes( - list, - offset, - native_array, - length, - ); - } - - late final _Dart_ListSetAsBytesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, ffi.Pointer, - ffi.IntPtr)>>('Dart_ListSetAsBytes'); - late final _Dart_ListSetAsBytes = _Dart_ListSetAsBytesPtr.asFunction< - Object Function(Object, int, ffi.Pointer, int)>(); - - /// Gets the Object at some key of a Map. - /// - /// May generate an unhandled exception error. - /// - /// \param map A Map. - /// \param key An Object. - /// - /// \return The value in the map at the specified key, null if the map does not - /// contain the key, or an error handle. - Object Dart_MapGetAt( - Object map, - Object key, - ) { - return _Dart_MapGetAt( - map, - key, - ); - } - - late final _Dart_MapGetAtPtr = - _lookup>( - 'Dart_MapGetAt'); - late final _Dart_MapGetAt = - _Dart_MapGetAtPtr.asFunction(); - - /// Returns whether the Map contains a given key. - /// - /// May generate an unhandled exception error. - /// - /// \param map A Map. - /// - /// \return A handle on a boolean indicating whether map contains the key. - /// Otherwise returns an error handle. - Object Dart_MapContainsKey( - Object map, - Object key, - ) { - return _Dart_MapContainsKey( - map, - key, - ); - } - - late final _Dart_MapContainsKeyPtr = - _lookup>( - 'Dart_MapContainsKey'); - late final _Dart_MapContainsKey = - _Dart_MapContainsKeyPtr.asFunction(); - - /// Gets the list of keys of a Map. - /// - /// May generate an unhandled exception error. - /// - /// \param map A Map. - /// - /// \return The list of key Objects if no error occurs. Otherwise returns an - /// error handle. - Object Dart_MapKeys( - Object map, - ) { - return _Dart_MapKeys( - map, - ); - } - - late final _Dart_MapKeysPtr = - _lookup>( - 'Dart_MapKeys'); - late final _Dart_MapKeys = - _Dart_MapKeysPtr.asFunction(); - - /// Return type if this object is a TypedData object. - /// - /// \return kInvalid if the object is not a TypedData object or the appropriate - /// Dart_TypedData_Type. - int Dart_GetTypeOfTypedData( - Object object, - ) { - return _Dart_GetTypeOfTypedData( - object, - ); - } - - late final _Dart_GetTypeOfTypedDataPtr = - _lookup>( - 'Dart_GetTypeOfTypedData'); - late final _Dart_GetTypeOfTypedData = - _Dart_GetTypeOfTypedDataPtr.asFunction(); - - /// Return type if this object is an external TypedData object. - /// - /// \return kInvalid if the object is not an external TypedData object or - /// the appropriate Dart_TypedData_Type. - int Dart_GetTypeOfExternalTypedData( - Object object, - ) { - return _Dart_GetTypeOfExternalTypedData( - object, - ); - } - - late final _Dart_GetTypeOfExternalTypedDataPtr = - _lookup>( - 'Dart_GetTypeOfExternalTypedData'); - late final _Dart_GetTypeOfExternalTypedData = - _Dart_GetTypeOfExternalTypedDataPtr.asFunction(); - - /// Returns a TypedData object of the desired length and type. - /// - /// \param type The type of the TypedData object. - /// \param length The length of the TypedData object (length in type units). - /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewTypedData( - int type, - int length, - ) { - return _Dart_NewTypedData( - type, - length, - ); - } - - late final _Dart_NewTypedDataPtr = - _lookup>( - 'Dart_NewTypedData'); - late final _Dart_NewTypedData = - _Dart_NewTypedDataPtr.asFunction(); - - /// Returns a TypedData object which references an external data array. - /// - /// \param type The type of the data array. - /// \param data A data array. This array must not move. - /// \param length The length of the data array (length in type units). - /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalTypedData( - int type, - ffi.Pointer data, - int length, - ) { - return _Dart_NewExternalTypedData( - type, - data, - length, - ); - } - - late final _Dart_NewExternalTypedDataPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Int32, ffi.Pointer, - ffi.IntPtr)>>('Dart_NewExternalTypedData'); - late final _Dart_NewExternalTypedData = _Dart_NewExternalTypedDataPtr - .asFunction, int)>(); - - /// Returns a TypedData object which references an external data array. - /// - /// \param type The type of the data array. - /// \param data A data array. This array must not move. - /// \param length The length of the data array (length in type units). - /// \param peer A pointer to a native object or NULL. This value is - /// provided to callback when it is invoked. - /// \param external_allocation_size The number of externally allocated - /// bytes for peer. Used to inform the garbage collector. - /// \param callback A function pointer that will be invoked sometime - /// after the object is garbage collected, unless the handle has been deleted. - /// A valid callback needs to be specified it cannot be NULL. - /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewExternalTypedDataWithFinalizer( - int type, - ffi.Pointer data, - int length, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback, - ) { - return _Dart_NewExternalTypedDataWithFinalizer( - type, - data, - length, - peer, - external_allocation_size, - callback, - ); - } - - late final _Dart_NewExternalTypedDataWithFinalizerPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Int32, - ffi.Pointer, - ffi.IntPtr, - ffi.Pointer, - ffi.IntPtr, - Dart_HandleFinalizer)>>('Dart_NewExternalTypedDataWithFinalizer'); - late final _Dart_NewExternalTypedDataWithFinalizer = - _Dart_NewExternalTypedDataWithFinalizerPtr.asFunction< - Object Function(int, ffi.Pointer, int, - ffi.Pointer, int, Dart_HandleFinalizer)>(); - - /// Returns a ByteBuffer object for the typed data. - /// - /// \param type_data The TypedData object. - /// - /// \return The ByteBuffer object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_NewByteBuffer( - Object typed_data, - ) { - return _Dart_NewByteBuffer( - typed_data, - ); - } - - late final _Dart_NewByteBufferPtr = - _lookup>( - 'Dart_NewByteBuffer'); - late final _Dart_NewByteBuffer = - _Dart_NewByteBufferPtr.asFunction(); - - /// Acquires access to the internal data address of a TypedData object. - /// - /// \param object The typed data object whose internal data address is to - /// be accessed. - /// \param type The type of the object is returned here. - /// \param data The internal data address is returned here. - /// \param len Size of the typed array is returned here. - /// - /// Notes: - /// When the internal address of the object is acquired any calls to a - /// Dart API function that could potentially allocate an object or run - /// any Dart code will return an error. - /// - /// Any Dart API functions for accessing the data should not be called - /// before the corresponding release. In particular, the object should - /// not be acquired again before its release. This leads to undefined - /// behavior. - /// - /// \return Success if the internal data address is acquired successfully. - /// Otherwise, returns an error handle. - Object Dart_TypedDataAcquireData( - Object object, - ffi.Pointer type, - ffi.Pointer> data, - ffi.Pointer len, - ) { - return _Dart_TypedDataAcquireData( - object, - type, - data, - len, - ); - } - - late final _Dart_TypedDataAcquireDataPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('Dart_TypedDataAcquireData'); - late final _Dart_TypedDataAcquireData = - _Dart_TypedDataAcquireDataPtr.asFunction< - Object Function(Object, ffi.Pointer, - ffi.Pointer>, ffi.Pointer)>(); - - /// Releases access to the internal data address that was acquired earlier using - /// Dart_TypedDataAcquireData. - /// - /// \param object The typed data object whose internal data address is to be - /// released. - /// - /// \return Success if the internal data address is released successfully. - /// Otherwise, returns an error handle. - Object Dart_TypedDataReleaseData( - Object object, - ) { - return _Dart_TypedDataReleaseData( - object, - ); - } - - late final _Dart_TypedDataReleaseDataPtr = - _lookup>( - 'Dart_TypedDataReleaseData'); - late final _Dart_TypedDataReleaseData = - _Dart_TypedDataReleaseDataPtr.asFunction(); - - /// Returns the TypedData object associated with the ByteBuffer object. - /// - /// \param byte_buffer The ByteBuffer object. - /// - /// \return The TypedData object if no error occurs. Otherwise returns - /// an error handle. - Object Dart_GetDataFromByteBuffer( - Object byte_buffer, - ) { - return _Dart_GetDataFromByteBuffer( - byte_buffer, - ); - } - - late final _Dart_GetDataFromByteBufferPtr = - _lookup>( - 'Dart_GetDataFromByteBuffer'); - late final _Dart_GetDataFromByteBuffer = - _Dart_GetDataFromByteBufferPtr.asFunction(); - - /// Invokes a constructor, creating a new object. - /// - /// This function allows hidden constructors (constructors with leading - /// underscores) to be called. - /// - /// \param type Type of object to be constructed. - /// \param constructor_name The name of the constructor to invoke. Use - /// Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. - /// This name should not include the name of the class. - /// \param number_of_arguments Size of the arguments array. - /// \param arguments An array of arguments to the constructor. - /// - /// \return If the constructor is called and completes successfully, - /// then the new object. If an error occurs during execution, then an - /// error handle is returned. - Object Dart_New( - Object type, - Object constructor_name, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_New( - type, - constructor_name, - number_of_arguments, - arguments, - ); - } - - late final _Dart_NewPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_New'); - late final _Dart_New = _Dart_NewPtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Allocate a new object without invoking a constructor. - /// - /// \param type The type of an object to be allocated. - /// - /// \return The new object. If an error occurs during execution, then an - /// error handle is returned. - Object Dart_Allocate( - Object type, - ) { - return _Dart_Allocate( - type, - ); - } - - late final _Dart_AllocatePtr = - _lookup>( - 'Dart_Allocate'); - late final _Dart_Allocate = - _Dart_AllocatePtr.asFunction(); - - /// Allocate a new object without invoking a constructor, and sets specified - /// native fields. - /// - /// \param type The type of an object to be allocated. - /// \param num_native_fields The number of native fields to set. - /// \param native_fields An array containing the value of native fields. - /// - /// \return The new object. If an error occurs during execution, then an - /// error handle is returned. - Object Dart_AllocateWithNativeFields( - Object type, - int num_native_fields, - ffi.Pointer native_fields, - ) { - return _Dart_AllocateWithNativeFields( - type, - num_native_fields, - native_fields, - ); - } - - late final _Dart_AllocateWithNativeFieldsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_AllocateWithNativeFields'); - late final _Dart_AllocateWithNativeFields = _Dart_AllocateWithNativeFieldsPtr - .asFunction)>(); - - /// Invokes a method or function. - /// - /// The 'target' parameter may be an object, type, or library. If - /// 'target' is an object, then this function will invoke an instance - /// method. If 'target' is a type, then this function will invoke a - /// static method. If 'target' is a library, then this function will - /// invoke a top-level function from that library. - /// NOTE: This API call cannot be used to invoke methods of a type object. - /// - /// This function ignores visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. - /// - /// \param target An object, type, or library. - /// \param name The name of the function or method to invoke. - /// \param number_of_arguments Size of the arguments array. - /// \param arguments An array of arguments to the function. - /// - /// \return If the function or method is called and completes - /// successfully, then the return value is returned. If an error - /// occurs during execution, then an error handle is returned. - Object Dart_Invoke( - Object target, - Object name, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_Invoke( - target, - name, - number_of_arguments, - arguments, - ); - } - - late final _Dart_InvokePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_Invoke'); - late final _Dart_Invoke = _Dart_InvokePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Invokes a Closure with the given arguments. - /// - /// May generate an unhandled exception error. - /// - /// \return If no error occurs during execution, then the result of - /// invoking the closure is returned. If an error occurs during - /// execution, then an error handle is returned. - Object Dart_InvokeClosure( - Object closure, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_InvokeClosure( - closure, - number_of_arguments, - arguments, - ); - } - - late final _Dart_InvokeClosurePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_InvokeClosure'); - late final _Dart_InvokeClosure = _Dart_InvokeClosurePtr.asFunction< - Object Function(Object, int, ffi.Pointer)>(); - - /// Invokes a Generative Constructor on an object that was previously - /// allocated using Dart_Allocate/Dart_AllocateWithNativeFields. - /// - /// The 'target' parameter must be an object. - /// - /// This function ignores visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. - /// - /// \param target An object. - /// \param name The name of the constructor to invoke. - /// Use Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. - /// \param number_of_arguments Size of the arguments array. - /// \param arguments An array of arguments to the function. - /// - /// \return If the constructor is called and completes - /// successfully, then the object is returned. If an error - /// occurs during execution, then an error handle is returned. - Object Dart_InvokeConstructor( - Object object, - Object name, - int number_of_arguments, - ffi.Pointer arguments, - ) { - return _Dart_InvokeConstructor( - object, - name, - number_of_arguments, - arguments, - ); - } - - late final _Dart_InvokeConstructorPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_InvokeConstructor'); - late final _Dart_InvokeConstructor = _Dart_InvokeConstructorPtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Gets the value of a field. - /// - /// The 'container' parameter may be an object, type, or library. If - /// 'container' is an object, then this function will access an - /// instance field. If 'container' is a type, then this function will - /// access a static field. If 'container' is a library, then this - /// function will access a top-level variable. - /// NOTE: This API call cannot be used to access fields of a type object. - /// - /// This function ignores field visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. - /// - /// \param container An object, type, or library. - /// \param name A field name. - /// - /// \return If no error occurs, then the value of the field is - /// returned. Otherwise an error handle is returned. - Object Dart_GetField( - Object container, - Object name, - ) { - return _Dart_GetField( - container, - name, - ); - } - - late final _Dart_GetFieldPtr = - _lookup>( - 'Dart_GetField'); - late final _Dart_GetField = - _Dart_GetFieldPtr.asFunction(); - - /// Sets the value of a field. - /// - /// The 'container' parameter may actually be an object, type, or - /// library. If 'container' is an object, then this function will - /// access an instance field. If 'container' is a type, then this - /// function will access a static field. If 'container' is a library, - /// then this function will access a top-level variable. - /// NOTE: This API call cannot be used to access fields of a type object. - /// - /// This function ignores field visibility (leading underscores in names). - /// - /// May generate an unhandled exception error. - /// - /// \param container An object, type, or library. - /// \param name A field name. - /// \param value The new field value. - /// - /// \return A valid handle if no error occurs. - Object Dart_SetField( - Object container, - Object name, - Object value, - ) { - return _Dart_SetField( - container, - name, - value, - ); - } - - late final _Dart_SetFieldPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Handle, ffi.Handle)>>('Dart_SetField'); - late final _Dart_SetField = - _Dart_SetFieldPtr.asFunction(); - - /// Throws an exception. - /// - /// This function causes a Dart language exception to be thrown. This - /// will proceed in the standard way, walking up Dart frames until an - /// appropriate 'catch' block is found, executing 'finally' blocks, - /// etc. - /// - /// If an error handle is passed into this function, the error is - /// propagated immediately. See Dart_PropagateError for a discussion - /// of error propagation. - /// - /// If successful, this function does not return. Note that this means - /// that the destructors of any stack-allocated C++ objects will not be - /// called. If there are no Dart frames on the stack, an error occurs. - /// - /// \return An error handle if the exception was not thrown. - /// Otherwise the function does not return. - Object Dart_ThrowException( - Object exception, - ) { - return _Dart_ThrowException( - exception, - ); - } - - late final _Dart_ThrowExceptionPtr = - _lookup>( - 'Dart_ThrowException'); - late final _Dart_ThrowException = - _Dart_ThrowExceptionPtr.asFunction(); - - /// Rethrows an exception. - /// - /// Rethrows an exception, unwinding all dart frames on the stack. If - /// successful, this function does not return. Note that this means - /// that the destructors of any stack-allocated C++ objects will not be - /// called. If there are no Dart frames on the stack, an error occurs. - /// - /// \return An error handle if the exception was not thrown. - /// Otherwise the function does not return. - Object Dart_ReThrowException( - Object exception, - Object stacktrace, - ) { - return _Dart_ReThrowException( - exception, - stacktrace, - ); - } - - late final _Dart_ReThrowExceptionPtr = - _lookup>( - 'Dart_ReThrowException'); - late final _Dart_ReThrowException = - _Dart_ReThrowExceptionPtr.asFunction(); - - /// Gets the number of native instance fields in an object. - Object Dart_GetNativeInstanceFieldCount( - Object obj, - ffi.Pointer count, - ) { - return _Dart_GetNativeInstanceFieldCount( - obj, - count, - ); - } - - late final _Dart_GetNativeInstanceFieldCountPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer)>>('Dart_GetNativeInstanceFieldCount'); - late final _Dart_GetNativeInstanceFieldCount = - _Dart_GetNativeInstanceFieldCountPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Gets the value of a native field. - /// - /// TODO(turnidge): Document. - Object Dart_GetNativeInstanceField( - Object obj, - int index, - ffi.Pointer value, - ) { - return _Dart_GetNativeInstanceField( - obj, - index, - value, - ); - } - - late final _Dart_GetNativeInstanceFieldPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeInstanceField'); - late final _Dart_GetNativeInstanceField = _Dart_GetNativeInstanceFieldPtr - .asFunction)>(); - - /// Sets the value of a native field. - /// - /// TODO(turnidge): Document. - Object Dart_SetNativeInstanceField( - Object obj, - int index, - int value, - ) { - return _Dart_SetNativeInstanceField( - obj, - index, - value, - ); - } - - late final _Dart_SetNativeInstanceFieldPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Int, ffi.IntPtr)>>('Dart_SetNativeInstanceField'); - late final _Dart_SetNativeInstanceField = _Dart_SetNativeInstanceFieldPtr - .asFunction(); - - /// Extracts current isolate group data from the native arguments structure. - ffi.Pointer Dart_GetNativeIsolateGroupData( - Dart_NativeArguments args, - ) { - return _Dart_GetNativeIsolateGroupData( - args, - ); - } - - late final _Dart_GetNativeIsolateGroupDataPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - Dart_NativeArguments)>>('Dart_GetNativeIsolateGroupData'); - late final _Dart_GetNativeIsolateGroupData = - _Dart_GetNativeIsolateGroupDataPtr.asFunction< - ffi.Pointer Function(Dart_NativeArguments)>(); - - /// Gets the native arguments based on the types passed in and populates - /// the passed arguments buffer with appropriate native values. - /// - /// \param args the Native arguments block passed into the native call. - /// \param num_arguments length of argument descriptor array and argument - /// values array passed in. - /// \param arg_descriptors an array that describes the arguments that - /// need to be retrieved. For each argument to be retrieved the descriptor - /// contains the argument number (0, 1 etc.) and the argument type - /// described using Dart_NativeArgument_Type, e.g: - /// DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kBool, 1) indicates - /// that the first argument is to be retrieved and it should be a boolean. - /// \param arg_values array into which the native arguments need to be - /// extracted into, the array is allocated by the caller (it could be - /// stack allocated to avoid the malloc/free performance overhead). - /// - /// \return Success if all the arguments could be extracted correctly, - /// returns an error handle if there were any errors while extracting the - /// arguments (mismatched number of arguments, incorrect types, etc.). - Object Dart_GetNativeArguments( - Dart_NativeArguments args, - int num_arguments, - ffi.Pointer arg_descriptors, - ffi.Pointer arg_values, - ) { - return _Dart_GetNativeArguments( - args, - num_arguments, - arg_descriptors, - arg_values, - ); - } - - late final _Dart_GetNativeArgumentsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_NativeArguments, - ffi.Int, - ffi.Pointer, - ffi.Pointer)>>( - 'Dart_GetNativeArguments'); - late final _Dart_GetNativeArguments = _Dart_GetNativeArgumentsPtr.asFunction< - Object Function( - Dart_NativeArguments, - int, - ffi.Pointer, - ffi.Pointer)>(); - - /// Gets the native argument at some index. - Object Dart_GetNativeArgument( - Dart_NativeArguments args, - int index, - ) { - return _Dart_GetNativeArgument( - args, - index, - ); - } - - late final _Dart_GetNativeArgumentPtr = _lookup< - ffi - .NativeFunction>( - 'Dart_GetNativeArgument'); - late final _Dart_GetNativeArgument = _Dart_GetNativeArgumentPtr.asFunction< - Object Function(Dart_NativeArguments, int)>(); - - /// Gets the number of native arguments. - int Dart_GetNativeArgumentCount( - Dart_NativeArguments args, - ) { - return _Dart_GetNativeArgumentCount( - args, - ); - } - - late final _Dart_GetNativeArgumentCountPtr = - _lookup>( - 'Dart_GetNativeArgumentCount'); - late final _Dart_GetNativeArgumentCount = _Dart_GetNativeArgumentCountPtr - .asFunction(); - - /// Gets all the native fields of the native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param num_fields size of the intptr_t array 'field_values' passed in. - /// \param field_values intptr_t array in which native field values are returned. - /// \return Success if the native fields where copied in successfully. Otherwise - /// returns an error handle. On success the native field values are copied - /// into the 'field_values' array, if the argument at 'arg_index' is a - /// null object then 0 is copied as the native field values into the - /// 'field_values' array. - Object Dart_GetNativeFieldsOfArgument( - Dart_NativeArguments args, - int arg_index, - int num_fields, - ffi.Pointer field_values, - ) { - return _Dart_GetNativeFieldsOfArgument( - args, - arg_index, - num_fields, - field_values, - ); - } - - late final _Dart_GetNativeFieldsOfArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeFieldsOfArgument'); - late final _Dart_GetNativeFieldsOfArgument = - _Dart_GetNativeFieldsOfArgumentPtr.asFunction< - Object Function( - Dart_NativeArguments, int, int, ffi.Pointer)>(); - - /// Gets the native field of the receiver. - Object Dart_GetNativeReceiver( - Dart_NativeArguments args, - ffi.Pointer value, - ) { - return _Dart_GetNativeReceiver( - args, - value, - ); - } - - late final _Dart_GetNativeReceiverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, - ffi.Pointer)>>('Dart_GetNativeReceiver'); - late final _Dart_GetNativeReceiver = _Dart_GetNativeReceiverPtr.asFunction< - Object Function(Dart_NativeArguments, ffi.Pointer)>(); - - /// Gets a string native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param peer Returns the peer pointer if the string argument has one. - /// \return Success if the string argument has a peer, if it does not - /// have a peer then the String object is returned. Otherwise returns - /// an error handle (argument is not a String object). - Object Dart_GetNativeStringArgument( - Dart_NativeArguments args, - int arg_index, - ffi.Pointer> peer, - ) { - return _Dart_GetNativeStringArgument( - args, - arg_index, - peer, - ); - } - - late final _Dart_GetNativeStringArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer>)>>( - 'Dart_GetNativeStringArgument'); - late final _Dart_GetNativeStringArgument = - _Dart_GetNativeStringArgumentPtr.asFunction< - Object Function( - Dart_NativeArguments, int, ffi.Pointer>)>(); - - /// Gets an integer native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param value Returns the integer value if the argument is an Integer. - /// \return Success if no error occurs. Otherwise returns an error handle. - Object Dart_GetNativeIntegerArgument( - Dart_NativeArguments args, - int index, - ffi.Pointer value, - ) { - return _Dart_GetNativeIntegerArgument( - args, - index, - value, - ); - } - - late final _Dart_GetNativeIntegerArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeIntegerArgument'); - late final _Dart_GetNativeIntegerArgument = - _Dart_GetNativeIntegerArgumentPtr.asFunction< - Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); - - /// Gets a boolean native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param value Returns the boolean value if the argument is a Boolean. - /// \return Success if no error occurs. Otherwise returns an error handle. - Object Dart_GetNativeBooleanArgument( - Dart_NativeArguments args, - int index, - ffi.Pointer value, - ) { - return _Dart_GetNativeBooleanArgument( - args, - index, - value, - ); - } - - late final _Dart_GetNativeBooleanArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeBooleanArgument'); - late final _Dart_GetNativeBooleanArgument = - _Dart_GetNativeBooleanArgumentPtr.asFunction< - Object Function(Dart_NativeArguments, int, ffi.Pointer)>(); - - /// Gets a double native argument at some index. - /// \param args Native arguments structure. - /// \param arg_index Index of the desired argument in the structure above. - /// \param value Returns the double value if the argument is a double. - /// \return Success if no error occurs. Otherwise returns an error handle. - Object Dart_GetNativeDoubleArgument( - Dart_NativeArguments args, - int index, - ffi.Pointer value, - ) { - return _Dart_GetNativeDoubleArgument( - args, - index, - value, - ); - } - - late final _Dart_GetNativeDoubleArgumentPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_NativeArguments, ffi.Int, - ffi.Pointer)>>('Dart_GetNativeDoubleArgument'); - late final _Dart_GetNativeDoubleArgument = - _Dart_GetNativeDoubleArgumentPtr.asFunction< - Object Function( - Dart_NativeArguments, int, ffi.Pointer)>(); - - /// Sets the return value for a native function. - /// - /// If retval is an Error handle, then error will be propagated once - /// the native functions exits. See Dart_PropagateError for a - /// discussion of how different types of errors are propagated. - void Dart_SetReturnValue( - Dart_NativeArguments args, - Object retval, - ) { - return _Dart_SetReturnValue( - args, - retval, - ); - } - - late final _Dart_SetReturnValuePtr = _lookup< - ffi - .NativeFunction>( - 'Dart_SetReturnValue'); - late final _Dart_SetReturnValue = _Dart_SetReturnValuePtr.asFunction< - void Function(Dart_NativeArguments, Object)>(); - - void Dart_SetWeakHandleReturnValue( - Dart_NativeArguments args, - Dart_WeakPersistentHandle rval, - ) { - return _Dart_SetWeakHandleReturnValue( - args, - rval, - ); - } - - late final _Dart_SetWeakHandleReturnValuePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(Dart_NativeArguments, - Dart_WeakPersistentHandle)>>('Dart_SetWeakHandleReturnValue'); - late final _Dart_SetWeakHandleReturnValue = - _Dart_SetWeakHandleReturnValuePtr.asFunction< - void Function(Dart_NativeArguments, Dart_WeakPersistentHandle)>(); - - void Dart_SetBooleanReturnValue( - Dart_NativeArguments args, - bool retval, - ) { - return _Dart_SetBooleanReturnValue( - args, - retval, - ); - } - - late final _Dart_SetBooleanReturnValuePtr = _lookup< - ffi - .NativeFunction>( - 'Dart_SetBooleanReturnValue'); - late final _Dart_SetBooleanReturnValue = _Dart_SetBooleanReturnValuePtr - .asFunction(); - - void Dart_SetIntegerReturnValue( - Dart_NativeArguments args, - int retval, - ) { - return _Dart_SetIntegerReturnValue( - args, - retval, - ); - } - - late final _Dart_SetIntegerReturnValuePtr = _lookup< - ffi - .NativeFunction>( - 'Dart_SetIntegerReturnValue'); - late final _Dart_SetIntegerReturnValue = _Dart_SetIntegerReturnValuePtr - .asFunction(); - - void Dart_SetDoubleReturnValue( - Dart_NativeArguments args, - double retval, - ) { - return _Dart_SetDoubleReturnValue( - args, - retval, - ); - } - - late final _Dart_SetDoubleReturnValuePtr = _lookup< - ffi - .NativeFunction>( - 'Dart_SetDoubleReturnValue'); - late final _Dart_SetDoubleReturnValue = _Dart_SetDoubleReturnValuePtr - .asFunction(); - - /// Sets the environment callback for the current isolate. This - /// callback is used to lookup environment values by name in the - /// current environment. This enables the embedder to supply values for - /// the const constructors bool.fromEnvironment, int.fromEnvironment - /// and String.fromEnvironment. - Object Dart_SetEnvironmentCallback( - Dart_EnvironmentCallback callback, - ) { - return _Dart_SetEnvironmentCallback( - callback, - ); - } - - late final _Dart_SetEnvironmentCallbackPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetEnvironmentCallback'); - late final _Dart_SetEnvironmentCallback = _Dart_SetEnvironmentCallbackPtr - .asFunction(); - - /// Sets the callback used to resolve native functions for a library. - /// - /// \param library A library. - /// \param resolver A native entry resolver. - /// - /// \return A valid handle if the native resolver was set successfully. - Object Dart_SetNativeResolver( - Object library1, - Dart_NativeEntryResolver resolver, - Dart_NativeEntrySymbol symbol, - ) { - return _Dart_SetNativeResolver( - library1, - resolver, - symbol, - ); - } - - late final _Dart_SetNativeResolverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, Dart_NativeEntryResolver, - Dart_NativeEntrySymbol)>>('Dart_SetNativeResolver'); - late final _Dart_SetNativeResolver = _Dart_SetNativeResolverPtr.asFunction< - Object Function( - Object, Dart_NativeEntryResolver, Dart_NativeEntrySymbol)>(); - - /// Returns the callback used to resolve native functions for a library. - /// - /// \param library A library. - /// \param resolver a pointer to a Dart_NativeEntryResolver - /// - /// \return A valid handle if the library was found. - Object Dart_GetNativeResolver( - Object library1, - ffi.Pointer resolver, - ) { - return _Dart_GetNativeResolver( - library1, - resolver, - ); - } - - late final _Dart_GetNativeResolverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>( - 'Dart_GetNativeResolver'); - late final _Dart_GetNativeResolver = _Dart_GetNativeResolverPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Returns the callback used to resolve native function symbols for a library. - /// - /// \param library A library. - /// \param resolver a pointer to a Dart_NativeEntrySymbol. - /// - /// \return A valid handle if the library was found. - Object Dart_GetNativeSymbol( - Object library1, - ffi.Pointer resolver, - ) { - return _Dart_GetNativeSymbol( - library1, - resolver, - ); - } - - late final _Dart_GetNativeSymbolPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - ffi.Pointer)>>('Dart_GetNativeSymbol'); - late final _Dart_GetNativeSymbol = _Dart_GetNativeSymbolPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Sets the callback used to resolve FFI native functions for a library. - /// The resolved functions are expected to be a C function pointer of the - /// correct signature (as specified in the `@FfiNative()` function - /// annotation in Dart code). - /// - /// NOTE: This is an experimental feature and might change in the future. - /// - /// \param library A library. - /// \param resolver A native function resolver. - /// - /// \return A valid handle if the native resolver was set successfully. - Object Dart_SetFfiNativeResolver( - Object library1, - Dart_FfiNativeResolver resolver, - ) { - return _Dart_SetFfiNativeResolver( - library1, - resolver, - ); - } - - late final _Dart_SetFfiNativeResolverPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, - Dart_FfiNativeResolver)>>('Dart_SetFfiNativeResolver'); - late final _Dart_SetFfiNativeResolver = _Dart_SetFfiNativeResolverPtr - .asFunction(); - - /// Sets library tag handler for the current isolate. This handler is - /// used to handle the various tags encountered while loading libraries - /// or scripts in the isolate. - /// - /// \param handler Handler code to be used for handling the various tags - /// encountered while loading libraries or scripts in the isolate. - /// - /// \return If no error occurs, the handler is set for the isolate. - /// Otherwise an error handle is returned. - /// - /// TODO(turnidge): Document. - Object Dart_SetLibraryTagHandler( - Dart_LibraryTagHandler handler, - ) { - return _Dart_SetLibraryTagHandler( - handler, - ); - } - - late final _Dart_SetLibraryTagHandlerPtr = - _lookup>( - 'Dart_SetLibraryTagHandler'); - late final _Dart_SetLibraryTagHandler = _Dart_SetLibraryTagHandlerPtr - .asFunction(); - - /// Sets the deferred load handler for the current isolate. This handler is - /// used to handle loading deferred imports in an AppJIT or AppAOT program. - Object Dart_SetDeferredLoadHandler( - Dart_DeferredLoadHandler handler, - ) { - return _Dart_SetDeferredLoadHandler( - handler, - ); - } - - late final _Dart_SetDeferredLoadHandlerPtr = _lookup< - ffi.NativeFunction>( - 'Dart_SetDeferredLoadHandler'); - late final _Dart_SetDeferredLoadHandler = _Dart_SetDeferredLoadHandlerPtr - .asFunction(); - - /// Notifies the VM that a deferred load completed successfully. This function - /// will eventually cause the corresponding `prefix.loadLibrary()` futures to - /// complete. - /// - /// Requires the current isolate to be the same current isolate during the - /// invocation of the Dart_DeferredLoadHandler. - Object Dart_DeferredLoadComplete( - int loading_unit_id, - ffi.Pointer snapshot_data, - ffi.Pointer snapshot_instructions, - ) { - return _Dart_DeferredLoadComplete( - loading_unit_id, - snapshot_data, - snapshot_instructions, - ); - } - - late final _Dart_DeferredLoadCompletePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.IntPtr, ffi.Pointer, - ffi.Pointer)>>('Dart_DeferredLoadComplete'); - late final _Dart_DeferredLoadComplete = - _Dart_DeferredLoadCompletePtr.asFunction< - Object Function( - int, ffi.Pointer, ffi.Pointer)>(); - - /// Notifies the VM that a deferred load failed. This function - /// will eventually cause the corresponding `prefix.loadLibrary()` futures to - /// complete with an error. - /// - /// If `transient` is true, future invocations of `prefix.loadLibrary()` will - /// trigger new load requests. If false, futures invocation will complete with - /// the same error. - /// - /// Requires the current isolate to be the same current isolate during the - /// invocation of the Dart_DeferredLoadHandler. - Object Dart_DeferredLoadCompleteError( - int loading_unit_id, - ffi.Pointer error_message, - bool transient, - ) { - return _Dart_DeferredLoadCompleteError( - loading_unit_id, - error_message, - transient, - ); - } - - late final _Dart_DeferredLoadCompleteErrorPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.IntPtr, ffi.Pointer, - ffi.Bool)>>('Dart_DeferredLoadCompleteError'); - late final _Dart_DeferredLoadCompleteError = - _Dart_DeferredLoadCompleteErrorPtr.asFunction< - Object Function(int, ffi.Pointer, bool)>(); - - /// Canonicalizes a url with respect to some library. - /// - /// The url is resolved with respect to the library's url and some url - /// normalizations are performed. - /// - /// This canonicalization function should be sufficient for most - /// embedders to implement the Dart_kCanonicalizeUrl tag. - /// - /// \param base_url The base url relative to which the url is - /// being resolved. - /// \param url The url being resolved and canonicalized. This - /// parameter is a string handle. - /// - /// \return If no error occurs, a String object is returned. Otherwise - /// an error handle is returned. - Object Dart_DefaultCanonicalizeUrl( - Object base_url, - Object url, - ) { - return _Dart_DefaultCanonicalizeUrl( - base_url, - url, - ); - } - - late final _Dart_DefaultCanonicalizeUrlPtr = - _lookup>( - 'Dart_DefaultCanonicalizeUrl'); - late final _Dart_DefaultCanonicalizeUrl = _Dart_DefaultCanonicalizeUrlPtr - .asFunction(); - - /// Loads the root library for the current isolate. - /// - /// Requires there to be no current root library. - /// - /// \param buffer A buffer which contains a kernel binary (see - /// pkg/kernel/binary.md). Must remain valid until isolate group shutdown. - /// \param buffer_size Length of the passed in buffer. - /// - /// \return A handle to the root library, or an error. - Object Dart_LoadScriptFromKernel( - ffi.Pointer kernel_buffer, - int kernel_size, - ) { - return _Dart_LoadScriptFromKernel( - kernel_buffer, - kernel_size, - ); - } - - late final _Dart_LoadScriptFromKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_LoadScriptFromKernel'); - late final _Dart_LoadScriptFromKernel = _Dart_LoadScriptFromKernelPtr - .asFunction, int)>(); - - /// Gets the library for the root script for the current isolate. - /// - /// If the root script has not yet been set for the current isolate, - /// this function returns Dart_Null(). This function never returns an - /// error handle. - /// - /// \return Returns the root Library for the current isolate or Dart_Null(). - Object Dart_RootLibrary() { - return _Dart_RootLibrary(); - } - - late final _Dart_RootLibraryPtr = - _lookup>('Dart_RootLibrary'); - late final _Dart_RootLibrary = - _Dart_RootLibraryPtr.asFunction(); - - /// Sets the root library for the current isolate. - /// - /// \return Returns an error handle if `library` is not a library handle. - Object Dart_SetRootLibrary( - Object library1, - ) { - return _Dart_SetRootLibrary( - library1, - ); - } - - late final _Dart_SetRootLibraryPtr = - _lookup>( - 'Dart_SetRootLibrary'); - late final _Dart_SetRootLibrary = - _Dart_SetRootLibraryPtr.asFunction(); - - /// Lookup or instantiate a legacy type by name and type arguments from a - /// Library. - /// - /// \param library The library containing the class or interface. - /// \param class_name The class name for the type. - /// \param number_of_type_arguments Number of type arguments. - /// For non parametric types the number of type arguments would be 0. - /// \param type_arguments Pointer to an array of type arguments. - /// For non parameteric types a NULL would be passed in for this argument. - /// - /// \return If no error occurs, the type is returned. - /// Otherwise an error handle is returned. - Object Dart_GetType( - Object library1, - Object class_name, - int number_of_type_arguments, - ffi.Pointer type_arguments, - ) { - return _Dart_GetType( - library1, - class_name, - number_of_type_arguments, - type_arguments, - ); - } - - late final _Dart_GetTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_GetType'); - late final _Dart_GetType = _Dart_GetTypePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Lookup or instantiate a nullable type by name and type arguments from - /// Library. - /// - /// \param library The library containing the class or interface. - /// \param class_name The class name for the type. - /// \param number_of_type_arguments Number of type arguments. - /// For non parametric types the number of type arguments would be 0. - /// \param type_arguments Pointer to an array of type arguments. - /// For non parameteric types a NULL would be passed in for this argument. - /// - /// \return If no error occurs, the type is returned. - /// Otherwise an error handle is returned. - Object Dart_GetNullableType( - Object library1, - Object class_name, - int number_of_type_arguments, - ffi.Pointer type_arguments, - ) { - return _Dart_GetNullableType( - library1, - class_name, - number_of_type_arguments, - type_arguments, - ); - } - - late final _Dart_GetNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_GetNullableType'); - late final _Dart_GetNullableType = _Dart_GetNullableTypePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Lookup or instantiate a non-nullable type by name and type arguments from - /// Library. - /// - /// \param library The library containing the class or interface. - /// \param class_name The class name for the type. - /// \param number_of_type_arguments Number of type arguments. - /// For non parametric types the number of type arguments would be 0. - /// \param type_arguments Pointer to an array of type arguments. - /// For non parameteric types a NULL would be passed in for this argument. - /// - /// \return If no error occurs, the type is returned. - /// Otherwise an error handle is returned. - Object Dart_GetNonNullableType( - Object library1, - Object class_name, - int number_of_type_arguments, - ffi.Pointer type_arguments, - ) { - return _Dart_GetNonNullableType( - library1, - class_name, - number_of_type_arguments, - type_arguments, - ); - } - - late final _Dart_GetNonNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Handle, ffi.Handle, ffi.IntPtr, - ffi.Pointer)>>('Dart_GetNonNullableType'); - late final _Dart_GetNonNullableType = _Dart_GetNonNullableTypePtr.asFunction< - Object Function(Object, Object, int, ffi.Pointer)>(); - - /// Creates a nullable version of the provided type. - /// - /// \param type The type to be converted to a nullable type. - /// - /// \return If no error occurs, a nullable type is returned. - /// Otherwise an error handle is returned. - Object Dart_TypeToNullableType( - Object type, - ) { - return _Dart_TypeToNullableType( - type, - ); - } - - late final _Dart_TypeToNullableTypePtr = - _lookup>( - 'Dart_TypeToNullableType'); - late final _Dart_TypeToNullableType = - _Dart_TypeToNullableTypePtr.asFunction(); - - /// Creates a non-nullable version of the provided type. - /// - /// \param type The type to be converted to a non-nullable type. - /// - /// \return If no error occurs, a non-nullable type is returned. - /// Otherwise an error handle is returned. - Object Dart_TypeToNonNullableType( - Object type, - ) { - return _Dart_TypeToNonNullableType( - type, - ); - } - - late final _Dart_TypeToNonNullableTypePtr = - _lookup>( - 'Dart_TypeToNonNullableType'); - late final _Dart_TypeToNonNullableType = - _Dart_TypeToNonNullableTypePtr.asFunction(); - - /// A type's nullability. - /// - /// \param type A Dart type. - /// \param result An out parameter containing the result of the check. True if - /// the type is of the specified nullability, false otherwise. - /// - /// \return Returns an error handle if type is not of type Type. - Object Dart_IsNullableType( - Object type, - ffi.Pointer result, - ) { - return _Dart_IsNullableType( - type, - result, - ); - } - - late final _Dart_IsNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IsNullableType'); - late final _Dart_IsNullableType = _Dart_IsNullableTypePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - Object Dart_IsNonNullableType( - Object type, - ffi.Pointer result, - ) { - return _Dart_IsNonNullableType( - type, - result, - ); - } - - late final _Dart_IsNonNullableTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IsNonNullableType'); - late final _Dart_IsNonNullableType = _Dart_IsNonNullableTypePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - Object Dart_IsLegacyType( - Object type, - ffi.Pointer result, - ) { - return _Dart_IsLegacyType( - type, - result, - ); - } - - late final _Dart_IsLegacyTypePtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_IsLegacyType'); - late final _Dart_IsLegacyType = _Dart_IsLegacyTypePtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - /// Lookup a class or interface by name from a Library. - /// - /// \param library The library containing the class or interface. - /// \param class_name The name of the class or interface. - /// - /// \return If no error occurs, the class or interface is - /// returned. Otherwise an error handle is returned. - Object Dart_GetClass( - Object library1, - Object class_name, - ) { - return _Dart_GetClass( - library1, - class_name, - ); - } - - late final _Dart_GetClassPtr = - _lookup>( - 'Dart_GetClass'); - late final _Dart_GetClass = - _Dart_GetClassPtr.asFunction(); - - /// Returns an import path to a Library, such as "file:///test.dart" or - /// "dart:core". - Object Dart_LibraryUrl( - Object library1, - ) { - return _Dart_LibraryUrl( - library1, - ); - } - - late final _Dart_LibraryUrlPtr = - _lookup>( - 'Dart_LibraryUrl'); - late final _Dart_LibraryUrl = - _Dart_LibraryUrlPtr.asFunction(); - - /// Returns a URL from which a Library was loaded. - Object Dart_LibraryResolvedUrl( - Object library1, - ) { - return _Dart_LibraryResolvedUrl( - library1, - ); - } - - late final _Dart_LibraryResolvedUrlPtr = - _lookup>( - 'Dart_LibraryResolvedUrl'); - late final _Dart_LibraryResolvedUrl = - _Dart_LibraryResolvedUrlPtr.asFunction(); - - /// \return An array of libraries. - Object Dart_GetLoadedLibraries() { - return _Dart_GetLoadedLibraries(); - } - - late final _Dart_GetLoadedLibrariesPtr = - _lookup>( - 'Dart_GetLoadedLibraries'); - late final _Dart_GetLoadedLibraries = - _Dart_GetLoadedLibrariesPtr.asFunction(); - - Object Dart_LookupLibrary( - Object url, - ) { - return _Dart_LookupLibrary( - url, - ); - } - - late final _Dart_LookupLibraryPtr = - _lookup>( - 'Dart_LookupLibrary'); - late final _Dart_LookupLibrary = - _Dart_LookupLibraryPtr.asFunction(); - - /// Report an loading error for the library. - /// - /// \param library The library that failed to load. - /// \param error The Dart error instance containing the load error. - /// - /// \return If the VM handles the error, the return value is - /// a null handle. If it doesn't handle the error, the error - /// object is returned. - Object Dart_LibraryHandleError( - Object library1, - Object error, - ) { - return _Dart_LibraryHandleError( - library1, - error, - ); - } - - late final _Dart_LibraryHandleErrorPtr = - _lookup>( - 'Dart_LibraryHandleError'); - late final _Dart_LibraryHandleError = - _Dart_LibraryHandleErrorPtr.asFunction(); - - /// Called by the embedder to load a partial program. Does not set the root - /// library. - /// - /// \param buffer A buffer which contains a kernel binary (see - /// pkg/kernel/binary.md). Must remain valid until isolate shutdown. - /// \param buffer_size Length of the passed in buffer. - /// - /// \return A handle to the main library of the compilation unit, or an error. - Object Dart_LoadLibraryFromKernel( - ffi.Pointer kernel_buffer, - int kernel_buffer_size, - ) { - return _Dart_LoadLibraryFromKernel( - kernel_buffer, - kernel_buffer_size, - ); - } - - late final _Dart_LoadLibraryFromKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_LoadLibraryFromKernel'); - late final _Dart_LoadLibraryFromKernel = _Dart_LoadLibraryFromKernelPtr - .asFunction, int)>(); - - /// Indicates that all outstanding load requests have been satisfied. - /// This finalizes all the new classes loaded and optionally completes - /// deferred library futures. - /// - /// Requires there to be a current isolate. - /// - /// \param complete_futures Specify true if all deferred library - /// futures should be completed, false otherwise. - /// - /// \return Success if all classes have been finalized and deferred library - /// futures are completed. Otherwise, returns an error. - Object Dart_FinalizeLoading( - bool complete_futures, - ) { - return _Dart_FinalizeLoading( - complete_futures, - ); - } - - late final _Dart_FinalizeLoadingPtr = - _lookup>( - 'Dart_FinalizeLoading'); - late final _Dart_FinalizeLoading = - _Dart_FinalizeLoadingPtr.asFunction(); - - /// Returns the value of peer field of 'object' in 'peer'. - /// - /// \param object An object. - /// \param peer An out parameter that returns the value of the peer - /// field. - /// - /// \return Returns an error if 'object' is a subtype of Null, num, or - /// bool. - Object Dart_GetPeer( - Object object, - ffi.Pointer> peer, - ) { - return _Dart_GetPeer( - object, - peer, - ); - } - - late final _Dart_GetPeerPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer>)>>('Dart_GetPeer'); - late final _Dart_GetPeer = _Dart_GetPeerPtr.asFunction< - Object Function(Object, ffi.Pointer>)>(); - - /// Sets the value of the peer field of 'object' to the value of - /// 'peer'. - /// - /// \param object An object. - /// \param peer A value to store in the peer field. - /// - /// \return Returns an error if 'object' is a subtype of Null, num, or - /// bool. - Object Dart_SetPeer( - Object object, - ffi.Pointer peer, - ) { - return _Dart_SetPeer( - object, - peer, - ); - } - - late final _Dart_SetPeerPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Handle, ffi.Pointer)>>('Dart_SetPeer'); - late final _Dart_SetPeer = _Dart_SetPeerPtr.asFunction< - Object Function(Object, ffi.Pointer)>(); - - bool Dart_IsKernelIsolate( - Dart_Isolate isolate, - ) { - return _Dart_IsKernelIsolate( - isolate, - ); - } - - late final _Dart_IsKernelIsolatePtr = - _lookup>( - 'Dart_IsKernelIsolate'); - late final _Dart_IsKernelIsolate = - _Dart_IsKernelIsolatePtr.asFunction(); - - bool Dart_KernelIsolateIsRunning() { - return _Dart_KernelIsolateIsRunning(); - } - - late final _Dart_KernelIsolateIsRunningPtr = - _lookup>( - 'Dart_KernelIsolateIsRunning'); - late final _Dart_KernelIsolateIsRunning = - _Dart_KernelIsolateIsRunningPtr.asFunction(); - - int Dart_KernelPort() { - return _Dart_KernelPort(); - } - - late final _Dart_KernelPortPtr = - _lookup>('Dart_KernelPort'); - late final _Dart_KernelPort = - _Dart_KernelPortPtr.asFunction(); - - /// Compiles the given `script_uri` to a kernel file. - /// - /// \param platform_kernel A buffer containing the kernel of the platform (e.g. - /// `vm_platform_strong.dill`). The VM does not take ownership of this memory. - /// - /// \param platform_kernel_size The length of the platform_kernel buffer. - /// - /// \param snapshot_compile Set to `true` when the compilation is for a snapshot. - /// This is used by the frontend to determine if compilation related information - /// should be printed to console (e.g., null safety mode). - /// - /// \param verbosity Specifies the logging behavior of the kernel compilation - /// service. - /// - /// \return Returns the result of the compilation. - /// - /// On a successful compilation the returned [Dart_KernelCompilationResult] has - /// a status of [Dart_KernelCompilationStatus_Ok] and the `kernel`/`kernel_size` - /// fields are set. The caller takes ownership of the malloc()ed buffer. - /// - /// On a failed compilation the `error` might be set describing the reason for - /// the failed compilation. The caller takes ownership of the malloc()ed - /// error. - /// - /// Requires there to be a current isolate. - Dart_KernelCompilationResult Dart_CompileToKernel( - ffi.Pointer script_uri, - ffi.Pointer platform_kernel, - int platform_kernel_size, - bool incremental_compile, - bool snapshot_compile, - ffi.Pointer package_config, - int verbosity, - ) { - return _Dart_CompileToKernel( - script_uri, - platform_kernel, - platform_kernel_size, - incremental_compile, - snapshot_compile, - package_config, - verbosity, - ); - } - - late final _Dart_CompileToKernelPtr = _lookup< - ffi.NativeFunction< - Dart_KernelCompilationResult Function( - ffi.Pointer, - ffi.Pointer, - ffi.IntPtr, - ffi.Bool, - ffi.Bool, - ffi.Pointer, - ffi.Int32)>>('Dart_CompileToKernel'); - late final _Dart_CompileToKernel = _Dart_CompileToKernelPtr.asFunction< - Dart_KernelCompilationResult Function( - ffi.Pointer, - ffi.Pointer, - int, - bool, - bool, - ffi.Pointer, - int)>(); - - Dart_KernelCompilationResult Dart_KernelListDependencies() { - return _Dart_KernelListDependencies(); - } - - late final _Dart_KernelListDependenciesPtr = - _lookup>( - 'Dart_KernelListDependencies'); - late final _Dart_KernelListDependencies = _Dart_KernelListDependenciesPtr - .asFunction(); - - /// Sets the kernel buffer which will be used to load Dart SDK sources - /// dynamically at runtime. - /// - /// \param platform_kernel A buffer containing kernel which has sources for the - /// Dart SDK populated. Note: The VM does not take ownership of this memory. - /// - /// \param platform_kernel_size The length of the platform_kernel buffer. - void Dart_SetDartLibrarySourcesKernel( - ffi.Pointer platform_kernel, - int platform_kernel_size, - ) { - return _Dart_SetDartLibrarySourcesKernel( - platform_kernel, - platform_kernel_size, - ); - } - - late final _Dart_SetDartLibrarySourcesKernelPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.IntPtr)>>('Dart_SetDartLibrarySourcesKernel'); - late final _Dart_SetDartLibrarySourcesKernel = - _Dart_SetDartLibrarySourcesKernelPtr.asFunction< - void Function(ffi.Pointer, int)>(); - - /// Detect the null safety opt-in status. - /// - /// When running from source, it is based on the opt-in status of `script_uri`. - /// When running from a kernel buffer, it is based on the mode used when - /// generating `kernel_buffer`. - /// When running from an appJIT or AOT snapshot, it is based on the mode used - /// when generating `snapshot_data`. - /// - /// \param script_uri Uri of the script that contains the source code - /// - /// \param package_config Uri of the package configuration file (either in format - /// of .packages or .dart_tool/package_config.json) for the null safety - /// detection to resolve package imports against. If this parameter is not - /// passed the package resolution of the parent isolate should be used. - /// - /// \param original_working_directory current working directory when the VM - /// process was launched, this is used to correctly resolve the path specified - /// for package_config. - /// - /// \param snapshot_data - /// - /// \param snapshot_instructions Buffers containing a snapshot of the - /// isolate or NULL if no snapshot is provided. If provided, the buffers must - /// remain valid until the isolate shuts down. - /// - /// \param kernel_buffer - /// - /// \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must - /// remain valid until isolate shutdown. - /// - /// \return Returns true if the null safety is opted in by the input being - /// run `script_uri`, `snapshot_data` or `kernel_buffer`. - bool Dart_DetectNullSafety( - ffi.Pointer script_uri, - ffi.Pointer package_config, - ffi.Pointer original_working_directory, - ffi.Pointer snapshot_data, - ffi.Pointer snapshot_instructions, - ffi.Pointer kernel_buffer, - int kernel_buffer_size, - ) { - return _Dart_DetectNullSafety( - script_uri, - package_config, - original_working_directory, - snapshot_data, - snapshot_instructions, - kernel_buffer, - kernel_buffer_size, - ); - } - - late final _Dart_DetectNullSafetyPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.IntPtr)>>('Dart_DetectNullSafety'); - late final _Dart_DetectNullSafety = _Dart_DetectNullSafetyPtr.asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - - /// Returns true if isolate is the service isolate. - /// - /// \param isolate An isolate - /// - /// \return Returns true if 'isolate' is the service isolate. - bool Dart_IsServiceIsolate( - Dart_Isolate isolate, - ) { - return _Dart_IsServiceIsolate( - isolate, - ); - } - - late final _Dart_IsServiceIsolatePtr = - _lookup>( - 'Dart_IsServiceIsolate'); - late final _Dart_IsServiceIsolate = - _Dart_IsServiceIsolatePtr.asFunction(); - - /// Writes the CPU profile to the timeline as a series of 'instant' events. - /// - /// Note that this is an expensive operation. - /// - /// \param main_port The main port of the Isolate whose profile samples to write. - /// \param error An optional error, must be free()ed by caller. - /// - /// \return Returns true if the profile is successfully written and false - /// otherwise. - bool Dart_WriteProfileToTimeline( - int main_port, - ffi.Pointer> error, - ) { - return _Dart_WriteProfileToTimeline( - main_port, - error, - ); - } - - late final _Dart_WriteProfileToTimelinePtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - Dart_Port, ffi.Pointer>)>>( - 'Dart_WriteProfileToTimeline'); - late final _Dart_WriteProfileToTimeline = _Dart_WriteProfileToTimelinePtr - .asFunction>)>(); - - /// Compiles all functions reachable from entry points and marks - /// the isolate to disallow future compilation. - /// - /// Entry points should be specified using `@pragma("vm:entry-point")` - /// annotation. - /// - /// \return An error handle if a compilation error or runtime error running const - /// constructors was encountered. - Object Dart_Precompile() { - return _Dart_Precompile(); - } - - late final _Dart_PrecompilePtr = - _lookup>('Dart_Precompile'); - late final _Dart_Precompile = - _Dart_PrecompilePtr.asFunction(); - - Object Dart_LoadingUnitLibraryUris( - int loading_unit_id, - ) { - return _Dart_LoadingUnitLibraryUris( - loading_unit_id, - ); - } - - late final _Dart_LoadingUnitLibraryUrisPtr = - _lookup>( - 'Dart_LoadingUnitLibraryUris'); - late final _Dart_LoadingUnitLibraryUris = - _Dart_LoadingUnitLibraryUrisPtr.asFunction(); - - /// Creates a precompiled snapshot. - /// - A root library must have been loaded. - /// - Dart_Precompile must have been called. - /// - /// Outputs an assembly file defining the symbols listed in the definitions - /// above. - /// - /// The assembly should be compiled as a static or shared library and linked or - /// loaded by the embedder. Running this snapshot requires a VM compiled with - /// DART_PRECOMPILED_SNAPSHOT. The kDartVmSnapshotData and - /// kDartVmSnapshotInstructions should be passed to Dart_Initialize. The - /// kDartIsolateSnapshotData and kDartIsolateSnapshotInstructions should be - /// passed to Dart_CreateIsolateGroup. - /// - /// The callback will be invoked one or more times to provide the assembly code. - /// - /// If stripped is true, then the assembly code will not include DWARF - /// debugging sections. - /// - /// If debug_callback_data is provided, debug_callback_data will be used with - /// the callback to provide separate debugging information. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateAppAOTSnapshotAsAssembly( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, - bool stripped, - ffi.Pointer debug_callback_data, - ) { - return _Dart_CreateAppAOTSnapshotAsAssembly( - callback, - callback_data, - stripped, - debug_callback_data, - ); - } - - late final _Dart_CreateAppAOTSnapshotAsAssemblyPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_StreamingWriteCallback, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsAssembly'); - late final _Dart_CreateAppAOTSnapshotAsAssembly = - _Dart_CreateAppAOTSnapshotAsAssemblyPtr.asFunction< - Object Function(Dart_StreamingWriteCallback, ffi.Pointer, - bool, ffi.Pointer)>(); - - Object Dart_CreateAppAOTSnapshotAsAssemblies( - Dart_CreateLoadingUnitCallback next_callback, - ffi.Pointer next_callback_data, - bool stripped, - Dart_StreamingWriteCallback write_callback, - Dart_StreamingCloseCallback close_callback, - ) { - return _Dart_CreateAppAOTSnapshotAsAssemblies( - next_callback, - next_callback_data, - stripped, - write_callback, - close_callback, - ); - } - - late final _Dart_CreateAppAOTSnapshotAsAssembliesPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - ffi.Bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>>( - 'Dart_CreateAppAOTSnapshotAsAssemblies'); - late final _Dart_CreateAppAOTSnapshotAsAssemblies = - _Dart_CreateAppAOTSnapshotAsAssembliesPtr.asFunction< - Object Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>(); - - /// Creates a precompiled snapshot. - /// - A root library must have been loaded. - /// - Dart_Precompile must have been called. - /// - /// Outputs an ELF shared library defining the symbols - /// - _kDartVmSnapshotData - /// - _kDartVmSnapshotInstructions - /// - _kDartIsolateSnapshotData - /// - _kDartIsolateSnapshotInstructions - /// - /// The shared library should be dynamically loaded by the embedder. - /// Running this snapshot requires a VM compiled with DART_PRECOMPILED_SNAPSHOT. - /// The kDartVmSnapshotData and kDartVmSnapshotInstructions should be passed to - /// Dart_Initialize. The kDartIsolateSnapshotData and - /// kDartIsolateSnapshotInstructions should be passed to Dart_CreateIsolate. - /// - /// The callback will be invoked one or more times to provide the binary output. - /// - /// If stripped is true, then the binary output will not include DWARF - /// debugging sections. - /// - /// If debug_callback_data is provided, debug_callback_data will be used with - /// the callback to provide separate debugging information. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateAppAOTSnapshotAsElf( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, - bool stripped, - ffi.Pointer debug_callback_data, - ) { - return _Dart_CreateAppAOTSnapshotAsElf( - callback, - callback_data, - stripped, - debug_callback_data, - ); - } - - late final _Dart_CreateAppAOTSnapshotAsElfPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_StreamingWriteCallback, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>('Dart_CreateAppAOTSnapshotAsElf'); - late final _Dart_CreateAppAOTSnapshotAsElf = - _Dart_CreateAppAOTSnapshotAsElfPtr.asFunction< - Object Function(Dart_StreamingWriteCallback, ffi.Pointer, - bool, ffi.Pointer)>(); - - Object Dart_CreateAppAOTSnapshotAsElfs( - Dart_CreateLoadingUnitCallback next_callback, - ffi.Pointer next_callback_data, - bool stripped, - Dart_StreamingWriteCallback write_callback, - Dart_StreamingCloseCallback close_callback, - ) { - return _Dart_CreateAppAOTSnapshotAsElfs( - next_callback, - next_callback_data, - stripped, - write_callback, - close_callback, - ); - } - - late final _Dart_CreateAppAOTSnapshotAsElfsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - ffi.Bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>>('Dart_CreateAppAOTSnapshotAsElfs'); - late final _Dart_CreateAppAOTSnapshotAsElfs = - _Dart_CreateAppAOTSnapshotAsElfsPtr.asFunction< - Object Function( - Dart_CreateLoadingUnitCallback, - ffi.Pointer, - bool, - Dart_StreamingWriteCallback, - Dart_StreamingCloseCallback)>(); - - /// Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes - /// kDartVmSnapshotData and kDartVmSnapshotInstructions. It also does - /// not strip DWARF information from the generated assembly or allow for - /// separate debug information. - Object Dart_CreateVMAOTSnapshotAsAssembly( - Dart_StreamingWriteCallback callback, - ffi.Pointer callback_data, - ) { - return _Dart_CreateVMAOTSnapshotAsAssembly( - callback, - callback_data, - ); - } - - late final _Dart_CreateVMAOTSnapshotAsAssemblyPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(Dart_StreamingWriteCallback, - ffi.Pointer)>>('Dart_CreateVMAOTSnapshotAsAssembly'); - late final _Dart_CreateVMAOTSnapshotAsAssembly = - _Dart_CreateVMAOTSnapshotAsAssemblyPtr.asFunction< - Object Function( - Dart_StreamingWriteCallback, ffi.Pointer)>(); - - /// Sorts the class-ids in depth first traversal order of the inheritance - /// tree. This is a costly operation, but it can make method dispatch - /// more efficient and is done before writing snapshots. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_SortClasses() { - return _Dart_SortClasses(); - } - - late final _Dart_SortClassesPtr = - _lookup>('Dart_SortClasses'); - late final _Dart_SortClasses = - _Dart_SortClassesPtr.asFunction(); - - /// Creates a snapshot that caches compiled code and type feedback for faster - /// startup and quicker warmup in a subsequent process. - /// - /// Outputs a snapshot in two pieces. The pieces should be passed to - /// Dart_CreateIsolateGroup in a VM using the same VM snapshot pieces used in the - /// current VM. The instructions piece must be loaded with read and execute - /// permissions; the data piece may be loaded as read-only. - /// - /// - Requires the VM to have not been started with --precompilation. - /// - Not supported when targeting IA32. - /// - The VM writing the snapshot and the VM reading the snapshot must be the - /// same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must - /// be targeting the same architecture, and must both be in checked mode or - /// both in unchecked mode. - /// - /// The buffers are scope allocated and are only valid until the next call to - /// Dart_ExitScope. - /// - /// \return A valid handle if no error occurs during the operation. - Object Dart_CreateAppJITSnapshotAsBlobs( - ffi.Pointer> isolate_snapshot_data_buffer, - ffi.Pointer isolate_snapshot_data_size, - ffi.Pointer> isolate_snapshot_instructions_buffer, - ffi.Pointer isolate_snapshot_instructions_size, - ) { - return _Dart_CreateAppJITSnapshotAsBlobs( - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - isolate_snapshot_instructions_buffer, - isolate_snapshot_instructions_size, - ); - } - - late final _Dart_CreateAppJITSnapshotAsBlobsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('Dart_CreateAppJITSnapshotAsBlobs'); - late final _Dart_CreateAppJITSnapshotAsBlobs = - _Dart_CreateAppJITSnapshotAsBlobsPtr.asFunction< - Object Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - /// Like Dart_CreateAppJITSnapshotAsBlobs, but also creates a new VM snapshot. - Object Dart_CreateCoreJITSnapshotAsBlobs( - ffi.Pointer> vm_snapshot_data_buffer, - ffi.Pointer vm_snapshot_data_size, - ffi.Pointer> vm_snapshot_instructions_buffer, - ffi.Pointer vm_snapshot_instructions_size, - ffi.Pointer> isolate_snapshot_data_buffer, - ffi.Pointer isolate_snapshot_data_size, - ffi.Pointer> isolate_snapshot_instructions_buffer, - ffi.Pointer isolate_snapshot_instructions_size, - ) { - return _Dart_CreateCoreJITSnapshotAsBlobs( - vm_snapshot_data_buffer, - vm_snapshot_data_size, - vm_snapshot_instructions_buffer, - vm_snapshot_instructions_size, - isolate_snapshot_data_buffer, - isolate_snapshot_data_size, - isolate_snapshot_instructions_buffer, - isolate_snapshot_instructions_size, - ); - } - - late final _Dart_CreateCoreJITSnapshotAsBlobsPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>('Dart_CreateCoreJITSnapshotAsBlobs'); - late final _Dart_CreateCoreJITSnapshotAsBlobs = - _Dart_CreateCoreJITSnapshotAsBlobsPtr.asFunction< - Object Function( - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); - - /// Get obfuscation map for precompiled code. - /// - /// Obfuscation map is encoded as a JSON array of pairs (original name, - /// obfuscated name). - /// - /// \return Returns an error handler if the VM was built in a mode that does not - /// support obfuscation. - Object Dart_GetObfuscationMap( - ffi.Pointer> buffer, - ffi.Pointer buffer_length, - ) { - return _Dart_GetObfuscationMap( - buffer, - buffer_length, - ); - } - - late final _Dart_GetObfuscationMapPtr = _lookup< - ffi.NativeFunction< - ffi.Handle Function(ffi.Pointer>, - ffi.Pointer)>>('Dart_GetObfuscationMap'); - late final _Dart_GetObfuscationMap = _Dart_GetObfuscationMapPtr.asFunction< - Object Function( - ffi.Pointer>, ffi.Pointer)>(); - - /// Returns whether the VM only supports running from precompiled snapshots and - /// not from any other kind of snapshot or from source (that is, the VM was - /// compiled with DART_PRECOMPILED_RUNTIME). - bool Dart_IsPrecompiledRuntime() { - return _Dart_IsPrecompiledRuntime(); - } - - late final _Dart_IsPrecompiledRuntimePtr = - _lookup>( - 'Dart_IsPrecompiledRuntime'); - late final _Dart_IsPrecompiledRuntime = - _Dart_IsPrecompiledRuntimePtr.asFunction(); - - /// Print a native stack trace. Used for crash handling. - /// - /// If context is NULL, prints the current stack trace. Otherwise, context - /// should be a CONTEXT* (Windows) or ucontext_t* (POSIX) from a signal handler - /// running on the current thread. - void Dart_DumpNativeStackTrace( - ffi.Pointer context, - ) { - return _Dart_DumpNativeStackTrace( - context, - ); - } - - late final _Dart_DumpNativeStackTracePtr = - _lookup)>>( - 'Dart_DumpNativeStackTrace'); - late final _Dart_DumpNativeStackTrace = _Dart_DumpNativeStackTracePtr - .asFunction)>(); - - /// Indicate that the process is about to abort, and the Dart VM should not - /// attempt to cleanup resources. - void Dart_PrepareToAbort() { - return _Dart_PrepareToAbort(); - } - - late final _Dart_PrepareToAbortPtr = - _lookup>('Dart_PrepareToAbort'); - late final _Dart_PrepareToAbort = - _Dart_PrepareToAbortPtr.asFunction(); - - /// Posts a message on some port. The message will contain the Dart_CObject - /// object graph rooted in 'message'. - /// - /// While the message is being sent the state of the graph of Dart_CObject - /// structures rooted in 'message' should not be accessed, as the message - /// generation will make temporary modifications to the data. When the message - /// has been sent the graph will be fully restored. - /// - /// If true is returned, the message was enqueued, and finalizers for external - /// typed data will eventually run, even if the receiving isolate shuts down - /// before processing the message. If false is returned, the message was not - /// enqueued and ownership of external typed data in the message remains with the - /// caller. - /// - /// This function may be called on any thread when the VM is running (that is, - /// after Dart_Initialize has returned and before Dart_Cleanup has been called). - /// - /// \param port_id The destination port. - /// \param message The message to send. - /// - /// \return True if the message was posted. - bool Dart_PostCObject( - int port_id, - ffi.Pointer message, - ) { - return _Dart_PostCObject( - port_id, - message, - ); - } - - late final _Dart_PostCObjectPtr = _lookup< - ffi.NativeFunction< - ffi.Bool Function( - Dart_Port, ffi.Pointer)>>('Dart_PostCObject'); - late final _Dart_PostCObject = _Dart_PostCObjectPtr.asFunction< - bool Function(int, ffi.Pointer)>(); - - /// Posts a message on some port. The message will contain the integer 'message'. - /// - /// \param port_id The destination port. - /// \param message The message to send. - /// - /// \return True if the message was posted. - bool Dart_PostInteger( - int port_id, - int message, - ) { - return _Dart_PostInteger( - port_id, - message, - ); - } - - late final _Dart_PostIntegerPtr = - _lookup>( - 'Dart_PostInteger'); - late final _Dart_PostInteger = - _Dart_PostIntegerPtr.asFunction(); - - /// Creates a new native port. When messages are received on this - /// native port, then they will be dispatched to the provided native - /// message handler. - /// - /// \param name The name of this port in debugging messages. - /// \param handler The C handler to run when messages arrive on the port. - /// \param handle_concurrently Is it okay to process requests on this - /// native port concurrently? - /// - /// \return If successful, returns the port id for the native port. In - /// case of error, returns ILLEGAL_PORT. - int Dart_NewNativePort( - ffi.Pointer name, - Dart_NativeMessageHandler handler, - bool handle_concurrently, - ) { - return _Dart_NewNativePort( - name, - handler, - handle_concurrently, - ); - } - - late final _Dart_NewNativePortPtr = _lookup< - ffi.NativeFunction< - Dart_Port Function(ffi.Pointer, Dart_NativeMessageHandler, - ffi.Bool)>>('Dart_NewNativePort'); - late final _Dart_NewNativePort = _Dart_NewNativePortPtr.asFunction< - int Function(ffi.Pointer, Dart_NativeMessageHandler, bool)>(); - - /// Closes the native port with the given id. - /// - /// The port must have been allocated by a call to Dart_NewNativePort. - /// - /// \param native_port_id The id of the native port to close. - /// - /// \return Returns true if the port was closed successfully. - bool Dart_CloseNativePort( - int native_port_id, - ) { - return _Dart_CloseNativePort( - native_port_id, - ); - } - - late final _Dart_CloseNativePortPtr = - _lookup>( - 'Dart_CloseNativePort'); - late final _Dart_CloseNativePort = - _Dart_CloseNativePortPtr.asFunction(); - - /// Forces all loaded classes and functions to be compiled eagerly in - /// the current isolate.. - /// - /// TODO(turnidge): Document. - Object Dart_CompileAll() { - return _Dart_CompileAll(); - } - - late final _Dart_CompileAllPtr = - _lookup>('Dart_CompileAll'); - late final _Dart_CompileAll = - _Dart_CompileAllPtr.asFunction(); - - /// Finalizes all classes. - Object Dart_FinalizeAllClasses() { - return _Dart_FinalizeAllClasses(); - } - - late final _Dart_FinalizeAllClassesPtr = - _lookup>( - 'Dart_FinalizeAllClasses'); - late final _Dart_FinalizeAllClasses = - _Dart_FinalizeAllClassesPtr.asFunction(); - - /// This function is intentionally undocumented. - /// - /// It should not be used outside internal tests. - ffi.Pointer Dart_ExecuteInternalCommand( - ffi.Pointer command, - ffi.Pointer arg, - ) { - return _Dart_ExecuteInternalCommand( - command, - arg, - ); - } - - late final _Dart_ExecuteInternalCommandPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>('Dart_ExecuteInternalCommand'); - late final _Dart_ExecuteInternalCommand = - _Dart_ExecuteInternalCommandPtr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - /// \mainpage Dynamically Linked Dart API - /// - /// This exposes a subset of symbols from dart_api.h and dart_native_api.h - /// available in every Dart embedder through dynamic linking. - /// - /// All symbols are postfixed with _DL to indicate that they are dynamically - /// linked and to prevent conflicts with the original symbol. - /// - /// Link `dart_api_dl.c` file into your library and invoke - /// `Dart_InitializeApiDL` with `NativeApi.initializeApiDLData`. - int Dart_InitializeApiDL( - ffi.Pointer data, - ) { - return _Dart_InitializeApiDL( - data, - ); - } - - late final _Dart_InitializeApiDLPtr = - _lookup)>>( - 'Dart_InitializeApiDL'); - late final _Dart_InitializeApiDL = _Dart_InitializeApiDLPtr.asFunction< - int Function(ffi.Pointer)>(); - - late final ffi.Pointer _Dart_PostCObject_DL = - _lookup('Dart_PostCObject_DL'); - - Dart_PostCObject_Type get Dart_PostCObject_DL => _Dart_PostCObject_DL.value; - - set Dart_PostCObject_DL(Dart_PostCObject_Type value) => - _Dart_PostCObject_DL.value = value; - - late final ffi.Pointer _Dart_PostInteger_DL = - _lookup('Dart_PostInteger_DL'); - - Dart_PostInteger_Type get Dart_PostInteger_DL => _Dart_PostInteger_DL.value; - - set Dart_PostInteger_DL(Dart_PostInteger_Type value) => - _Dart_PostInteger_DL.value = value; - - late final ffi.Pointer _Dart_NewNativePort_DL = - _lookup('Dart_NewNativePort_DL'); - - Dart_NewNativePort_Type get Dart_NewNativePort_DL => - _Dart_NewNativePort_DL.value; - - set Dart_NewNativePort_DL(Dart_NewNativePort_Type value) => - _Dart_NewNativePort_DL.value = value; - - late final ffi.Pointer _Dart_CloseNativePort_DL = - _lookup('Dart_CloseNativePort_DL'); - - Dart_CloseNativePort_Type get Dart_CloseNativePort_DL => - _Dart_CloseNativePort_DL.value; - - set Dart_CloseNativePort_DL(Dart_CloseNativePort_Type value) => - _Dart_CloseNativePort_DL.value = value; - - late final ffi.Pointer _Dart_IsError_DL = - _lookup('Dart_IsError_DL'); - - Dart_IsError_Type get Dart_IsError_DL => _Dart_IsError_DL.value; - - set Dart_IsError_DL(Dart_IsError_Type value) => - _Dart_IsError_DL.value = value; - - late final ffi.Pointer _Dart_IsApiError_DL = - _lookup('Dart_IsApiError_DL'); - - Dart_IsApiError_Type get Dart_IsApiError_DL => _Dart_IsApiError_DL.value; - - set Dart_IsApiError_DL(Dart_IsApiError_Type value) => - _Dart_IsApiError_DL.value = value; - - late final ffi.Pointer - _Dart_IsUnhandledExceptionError_DL = - _lookup( - 'Dart_IsUnhandledExceptionError_DL'); - - Dart_IsUnhandledExceptionError_Type get Dart_IsUnhandledExceptionError_DL => - _Dart_IsUnhandledExceptionError_DL.value; - - set Dart_IsUnhandledExceptionError_DL( - Dart_IsUnhandledExceptionError_Type value) => - _Dart_IsUnhandledExceptionError_DL.value = value; - - late final ffi.Pointer - _Dart_IsCompilationError_DL = - _lookup('Dart_IsCompilationError_DL'); - - Dart_IsCompilationError_Type get Dart_IsCompilationError_DL => - _Dart_IsCompilationError_DL.value; - - set Dart_IsCompilationError_DL(Dart_IsCompilationError_Type value) => - _Dart_IsCompilationError_DL.value = value; - - late final ffi.Pointer _Dart_IsFatalError_DL = - _lookup('Dart_IsFatalError_DL'); - - Dart_IsFatalError_Type get Dart_IsFatalError_DL => - _Dart_IsFatalError_DL.value; - - set Dart_IsFatalError_DL(Dart_IsFatalError_Type value) => - _Dart_IsFatalError_DL.value = value; - - late final ffi.Pointer _Dart_GetError_DL = - _lookup('Dart_GetError_DL'); - - Dart_GetError_Type get Dart_GetError_DL => _Dart_GetError_DL.value; - - set Dart_GetError_DL(Dart_GetError_Type value) => - _Dart_GetError_DL.value = value; - - late final ffi.Pointer - _Dart_ErrorHasException_DL = - _lookup('Dart_ErrorHasException_DL'); - - Dart_ErrorHasException_Type get Dart_ErrorHasException_DL => - _Dart_ErrorHasException_DL.value; - - set Dart_ErrorHasException_DL(Dart_ErrorHasException_Type value) => - _Dart_ErrorHasException_DL.value = value; - - late final ffi.Pointer - _Dart_ErrorGetException_DL = - _lookup('Dart_ErrorGetException_DL'); - - Dart_ErrorGetException_Type get Dart_ErrorGetException_DL => - _Dart_ErrorGetException_DL.value; - - set Dart_ErrorGetException_DL(Dart_ErrorGetException_Type value) => - _Dart_ErrorGetException_DL.value = value; - - late final ffi.Pointer - _Dart_ErrorGetStackTrace_DL = - _lookup('Dart_ErrorGetStackTrace_DL'); - - Dart_ErrorGetStackTrace_Type get Dart_ErrorGetStackTrace_DL => - _Dart_ErrorGetStackTrace_DL.value; - - set Dart_ErrorGetStackTrace_DL(Dart_ErrorGetStackTrace_Type value) => - _Dart_ErrorGetStackTrace_DL.value = value; - - late final ffi.Pointer _Dart_NewApiError_DL = - _lookup('Dart_NewApiError_DL'); - - Dart_NewApiError_Type get Dart_NewApiError_DL => _Dart_NewApiError_DL.value; - - set Dart_NewApiError_DL(Dart_NewApiError_Type value) => - _Dart_NewApiError_DL.value = value; - - late final ffi.Pointer - _Dart_NewCompilationError_DL = - _lookup('Dart_NewCompilationError_DL'); - - Dart_NewCompilationError_Type get Dart_NewCompilationError_DL => - _Dart_NewCompilationError_DL.value; - - set Dart_NewCompilationError_DL(Dart_NewCompilationError_Type value) => - _Dart_NewCompilationError_DL.value = value; - - late final ffi.Pointer - _Dart_NewUnhandledExceptionError_DL = - _lookup( - 'Dart_NewUnhandledExceptionError_DL'); - - Dart_NewUnhandledExceptionError_Type get Dart_NewUnhandledExceptionError_DL => - _Dart_NewUnhandledExceptionError_DL.value; - - set Dart_NewUnhandledExceptionError_DL( - Dart_NewUnhandledExceptionError_Type value) => - _Dart_NewUnhandledExceptionError_DL.value = value; - - late final ffi.Pointer _Dart_PropagateError_DL = - _lookup('Dart_PropagateError_DL'); - - Dart_PropagateError_Type get Dart_PropagateError_DL => - _Dart_PropagateError_DL.value; - - set Dart_PropagateError_DL(Dart_PropagateError_Type value) => - _Dart_PropagateError_DL.value = value; - - late final ffi.Pointer - _Dart_HandleFromPersistent_DL = - _lookup('Dart_HandleFromPersistent_DL'); - - Dart_HandleFromPersistent_Type get Dart_HandleFromPersistent_DL => - _Dart_HandleFromPersistent_DL.value; - - set Dart_HandleFromPersistent_DL(Dart_HandleFromPersistent_Type value) => - _Dart_HandleFromPersistent_DL.value = value; - - late final ffi.Pointer - _Dart_HandleFromWeakPersistent_DL = - _lookup( - 'Dart_HandleFromWeakPersistent_DL'); - - Dart_HandleFromWeakPersistent_Type get Dart_HandleFromWeakPersistent_DL => - _Dart_HandleFromWeakPersistent_DL.value; - - set Dart_HandleFromWeakPersistent_DL( - Dart_HandleFromWeakPersistent_Type value) => - _Dart_HandleFromWeakPersistent_DL.value = value; - - late final ffi.Pointer - _Dart_NewPersistentHandle_DL = - _lookup('Dart_NewPersistentHandle_DL'); - - Dart_NewPersistentHandle_Type get Dart_NewPersistentHandle_DL => - _Dart_NewPersistentHandle_DL.value; - - set Dart_NewPersistentHandle_DL(Dart_NewPersistentHandle_Type value) => - _Dart_NewPersistentHandle_DL.value = value; - - late final ffi.Pointer - _Dart_SetPersistentHandle_DL = - _lookup('Dart_SetPersistentHandle_DL'); - - Dart_SetPersistentHandle_Type get Dart_SetPersistentHandle_DL => - _Dart_SetPersistentHandle_DL.value; - - set Dart_SetPersistentHandle_DL(Dart_SetPersistentHandle_Type value) => - _Dart_SetPersistentHandle_DL.value = value; - - late final ffi.Pointer - _Dart_DeletePersistentHandle_DL = - _lookup( - 'Dart_DeletePersistentHandle_DL'); - - Dart_DeletePersistentHandle_Type get Dart_DeletePersistentHandle_DL => - _Dart_DeletePersistentHandle_DL.value; - - set Dart_DeletePersistentHandle_DL(Dart_DeletePersistentHandle_Type value) => - _Dart_DeletePersistentHandle_DL.value = value; - - late final ffi.Pointer - _Dart_NewWeakPersistentHandle_DL = - _lookup( - 'Dart_NewWeakPersistentHandle_DL'); - - Dart_NewWeakPersistentHandle_Type get Dart_NewWeakPersistentHandle_DL => - _Dart_NewWeakPersistentHandle_DL.value; - - set Dart_NewWeakPersistentHandle_DL( - Dart_NewWeakPersistentHandle_Type value) => - _Dart_NewWeakPersistentHandle_DL.value = value; - - late final ffi.Pointer - _Dart_DeleteWeakPersistentHandle_DL = - _lookup( - 'Dart_DeleteWeakPersistentHandle_DL'); - - Dart_DeleteWeakPersistentHandle_Type get Dart_DeleteWeakPersistentHandle_DL => - _Dart_DeleteWeakPersistentHandle_DL.value; - - set Dart_DeleteWeakPersistentHandle_DL( - Dart_DeleteWeakPersistentHandle_Type value) => - _Dart_DeleteWeakPersistentHandle_DL.value = value; - - late final ffi.Pointer - _Dart_UpdateExternalSize_DL = - _lookup('Dart_UpdateExternalSize_DL'); - - Dart_UpdateExternalSize_Type get Dart_UpdateExternalSize_DL => - _Dart_UpdateExternalSize_DL.value; - - set Dart_UpdateExternalSize_DL(Dart_UpdateExternalSize_Type value) => - _Dart_UpdateExternalSize_DL.value = value; - - late final ffi.Pointer - _Dart_NewFinalizableHandle_DL = - _lookup('Dart_NewFinalizableHandle_DL'); - - Dart_NewFinalizableHandle_Type get Dart_NewFinalizableHandle_DL => - _Dart_NewFinalizableHandle_DL.value; - - set Dart_NewFinalizableHandle_DL(Dart_NewFinalizableHandle_Type value) => - _Dart_NewFinalizableHandle_DL.value = value; - - late final ffi.Pointer - _Dart_DeleteFinalizableHandle_DL = - _lookup( - 'Dart_DeleteFinalizableHandle_DL'); - - Dart_DeleteFinalizableHandle_Type get Dart_DeleteFinalizableHandle_DL => - _Dart_DeleteFinalizableHandle_DL.value; - - set Dart_DeleteFinalizableHandle_DL( - Dart_DeleteFinalizableHandle_Type value) => - _Dart_DeleteFinalizableHandle_DL.value = value; - - late final ffi.Pointer - _Dart_UpdateFinalizableExternalSize_DL = - _lookup( - 'Dart_UpdateFinalizableExternalSize_DL'); - - Dart_UpdateFinalizableExternalSize_Type - get Dart_UpdateFinalizableExternalSize_DL => - _Dart_UpdateFinalizableExternalSize_DL.value; - - set Dart_UpdateFinalizableExternalSize_DL( - Dart_UpdateFinalizableExternalSize_Type value) => - _Dart_UpdateFinalizableExternalSize_DL.value = value; - - late final ffi.Pointer _Dart_Post_DL = - _lookup('Dart_Post_DL'); - - Dart_Post_Type get Dart_Post_DL => _Dart_Post_DL.value; - - set Dart_Post_DL(Dart_Post_Type value) => _Dart_Post_DL.value = value; - - late final ffi.Pointer _Dart_NewSendPort_DL = - _lookup('Dart_NewSendPort_DL'); - - Dart_NewSendPort_Type get Dart_NewSendPort_DL => _Dart_NewSendPort_DL.value; - - set Dart_NewSendPort_DL(Dart_NewSendPort_Type value) => - _Dart_NewSendPort_DL.value = value; - - late final ffi.Pointer _Dart_SendPortGetId_DL = - _lookup('Dart_SendPortGetId_DL'); - - Dart_SendPortGetId_Type get Dart_SendPortGetId_DL => - _Dart_SendPortGetId_DL.value; - - set Dart_SendPortGetId_DL(Dart_SendPortGetId_Type value) => - _Dart_SendPortGetId_DL.value = value; - - late final ffi.Pointer _Dart_EnterScope_DL = - _lookup('Dart_EnterScope_DL'); - - Dart_EnterScope_Type get Dart_EnterScope_DL => _Dart_EnterScope_DL.value; - - set Dart_EnterScope_DL(Dart_EnterScope_Type value) => - _Dart_EnterScope_DL.value = value; - - late final ffi.Pointer _Dart_ExitScope_DL = - _lookup('Dart_ExitScope_DL'); - - Dart_ExitScope_Type get Dart_ExitScope_DL => _Dart_ExitScope_DL.value; - - set Dart_ExitScope_DL(Dart_ExitScope_Type value) => - _Dart_ExitScope_DL.value = value; - - late final _class_CUPHTTPTaskConfiguration1 = - _getClass1("CUPHTTPTaskConfiguration"); - late final _sel_initWithPort_1 = _registerName1("initWithPort:"); - ffi.Pointer _objc_msgSend_533( - ffi.Pointer obj, - ffi.Pointer sel, - int sendPort, - ) { - return __objc_msgSend_533( - obj, - sel, - sendPort, - ); - } - - late final __objc_msgSend_533Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, Dart_Port)>>('objc_msgSend'); - late final __objc_msgSend_533 = __objc_msgSend_533Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_sendPort1 = _registerName1("sendPort"); - late final _class_CUPHTTPClientDelegate1 = - _getClass1("CUPHTTPClientDelegate"); - late final _sel_registerTask_withConfiguration_1 = - _registerName1("registerTask:withConfiguration:"); - void _objc_msgSend_534( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer task, - ffi.Pointer config, - ) { - return __objc_msgSend_534( - obj, - sel, - task, - config, - ); - } - - late final __objc_msgSend_534Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_534 = __objc_msgSend_534Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - - late final _class_CUPHTTPForwardedDelegate1 = - _getClass1("CUPHTTPForwardedDelegate"); - late final _sel_initWithSession_task_1 = - _registerName1("initWithSession:task:"); - ffi.Pointer _objc_msgSend_535( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ) { - return __objc_msgSend_535( - obj, - sel, - session, - task, - ); - } - - late final __objc_msgSend_535Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_535 = __objc_msgSend_535Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_finish1 = _registerName1("finish"); - late final _sel_session1 = _registerName1("session"); - late final _sel_task1 = _registerName1("task"); - ffi.Pointer _objc_msgSend_536( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_536( - obj, - sel, - ); - } - - late final __objc_msgSend_536Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_536 = __objc_msgSend_536Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_NSLock1 = _getClass1("NSLock"); - late final _sel_lock1 = _registerName1("lock"); - ffi.Pointer _objc_msgSend_537( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_537( - obj, - sel, - ); - } - - late final __objc_msgSend_537Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_537 = __objc_msgSend_537Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_CUPHTTPForwardedRedirect1 = - _getClass1("CUPHTTPForwardedRedirect"); - late final _sel_initWithSession_task_response_request_1 = - _registerName1("initWithSession:task:response:request:"); - ffi.Pointer _objc_msgSend_538( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer response, - ffi.Pointer request, - ) { - return __objc_msgSend_538( - obj, - sel, - session, - task, - response, - request, - ); - } - - late final __objc_msgSend_538Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_538 = __objc_msgSend_538Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_finishWithRequest_1 = _registerName1("finishWithRequest:"); - void _objc_msgSend_539( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer request, - ) { - return __objc_msgSend_539( - obj, - sel, - request, - ); - } - - late final __objc_msgSend_539Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_539 = __objc_msgSend_539Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - ffi.Pointer _objc_msgSend_540( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_540( - obj, - sel, - ); - } - - late final __objc_msgSend_540Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_540 = __objc_msgSend_540Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _sel_redirectRequest1 = _registerName1("redirectRequest"); - late final _class_CUPHTTPForwardedResponse1 = - _getClass1("CUPHTTPForwardedResponse"); - late final _sel_initWithSession_task_response_1 = - _registerName1("initWithSession:task:response:"); - ffi.Pointer _objc_msgSend_541( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer response, - ) { - return __objc_msgSend_541( - obj, - sel, - session, - task, - response, - ); - } - - late final __objc_msgSend_541Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_541 = __objc_msgSend_541Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_finishWithDisposition_1 = - _registerName1("finishWithDisposition:"); - void _objc_msgSend_542( - ffi.Pointer obj, - ffi.Pointer sel, - int disposition, - ) { - return __objc_msgSend_542( - obj, - sel, - disposition, - ); - } - - late final __objc_msgSend_542Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Int32)>>('objc_msgSend'); - late final __objc_msgSend_542 = __objc_msgSend_542Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - late final _sel_disposition1 = _registerName1("disposition"); - int _objc_msgSend_543( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_543( - obj, - sel, - ); - } - - late final __objc_msgSend_543Ptr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_543 = __objc_msgSend_543Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer)>(); - - late final _class_CUPHTTPForwardedData1 = _getClass1("CUPHTTPForwardedData"); - late final _sel_initWithSession_task_data_1 = - _registerName1("initWithSession:task:data:"); - ffi.Pointer _objc_msgSend_544( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer data, - ) { - return __objc_msgSend_544( - obj, - sel, - session, - task, - data, - ); - } - - late final __objc_msgSend_544Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_544 = __objc_msgSend_544Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_CUPHTTPForwardedComplete1 = - _getClass1("CUPHTTPForwardedComplete"); - late final _sel_initWithSession_task_error_1 = - _registerName1("initWithSession:task:error:"); - ffi.Pointer _objc_msgSend_545( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer task, - ffi.Pointer error, - ) { - return __objc_msgSend_545( - obj, - sel, - session, - task, - error, - ); - } - - late final __objc_msgSend_545Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_545 = __objc_msgSend_545Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _class_CUPHTTPForwardedFinishedDownloading1 = - _getClass1("CUPHTTPForwardedFinishedDownloading"); - late final _sel_initWithSession_downloadTask_url_1 = - _registerName1("initWithSession:downloadTask:url:"); - ffi.Pointer _objc_msgSend_546( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer downloadTask, - ffi.Pointer location, - ) { - return __objc_msgSend_546( - obj, - sel, - session, - downloadTask, - location, - ); - } - - late final __objc_msgSend_546Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_546 = __objc_msgSend_546Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_location1 = _registerName1("location"); - ffi.Pointer _objc_msgSend_547( - ffi.Pointer obj, - ffi.Pointer sel, - ) { - return __objc_msgSend_547( - obj, - sel, - ); - } - - late final __objc_msgSend_547Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_547 = __objc_msgSend_547Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - - late final _class_CUPHTTPForwardedWebSocketOpened1 = - _getClass1("CUPHTTPForwardedWebSocketOpened"); - late final _sel_initWithSession_webSocketTask_didOpenWithProtocol_1 = - _registerName1("initWithSession:webSocketTask:didOpenWithProtocol:"); - ffi.Pointer _objc_msgSend_548( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer webSocketTask, - ffi.Pointer protocol, - ) { - return __objc_msgSend_548( - obj, - sel, - session, - webSocketTask, - protocol, - ); - } - - late final __objc_msgSend_548Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_548 = __objc_msgSend_548Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_protocol1 = _registerName1("protocol"); - late final _class_CUPHTTPForwardedWebSocketClosed1 = - _getClass1("CUPHTTPForwardedWebSocketClosed"); - late final _sel_initWithSession_webSocketTask_code_reason_1 = - _registerName1("initWithSession:webSocketTask:code:reason:"); - ffi.Pointer _objc_msgSend_549( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer session, - ffi.Pointer webSocketTask, - int closeCode, - ffi.Pointer reason, - ) { - return __objc_msgSend_549( - obj, - sel, - session, - webSocketTask, - closeCode, - reason, - ); - } - - late final __objc_msgSend_549Ptr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_549 = __objc_msgSend_549Ptr.asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - - /// Creates a `Dart_CObject` containing the given `NSObject` pointer as an int. - Dart_CObject NSObjectToCObject( - NSObject n, - ) { - return _NSObjectToCObject( - n._id, - ); - } - - late final _NSObjectToCObjectPtr = _lookup< - ffi.NativeFunction)>>( - 'NSObjectToCObject'); - late final _NSObjectToCObject = _NSObjectToCObjectPtr.asFunction< - Dart_CObject Function(ffi.Pointer)>(); - - /// Executes [NSURLSessionWebSocketTask sendMessage:completionHandler:] and - /// sends the results of the completion handler to the given `Dart_Port`. - void CUPHTTPSendMessage( - NSURLSessionWebSocketTask task, - NSURLSessionWebSocketMessage message, - DartDart_Port sendPort, - ) { - return _CUPHTTPSendMessage( - task._id, - message._id, - sendPort, - ); - } - - late final _CUPHTTPSendMessagePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - Dart_Port)>>('CUPHTTPSendMessage'); - late final _CUPHTTPSendMessage = _CUPHTTPSendMessagePtr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, int)>(); - - /// Executes [NSURLSessionWebSocketTask receiveMessageWithCompletionHandler:] - /// and sends the results of the completion handler to the given `Dart_Port`. - void CUPHTTPReceiveMessage( - NSURLSessionWebSocketTask task, - DartDart_Port sendPort, - ) { - return _CUPHTTPReceiveMessage( - task._id, - sendPort, - ); - } - - late final _CUPHTTPReceiveMessagePtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, Dart_Port)>>('CUPHTTPReceiveMessage'); - late final _CUPHTTPReceiveMessage = _CUPHTTPReceiveMessagePtr.asFunction< - void Function(ffi.Pointer, int)>(); - - late final ffi.Pointer _NSStreamSocketSecurityLevelKey = - _lookup('NSStreamSocketSecurityLevelKey'); - - NSStreamPropertyKey get NSStreamSocketSecurityLevelKey => - _NSStreamSocketSecurityLevelKey.value; - - set NSStreamSocketSecurityLevelKey(NSStreamPropertyKey value) => - _NSStreamSocketSecurityLevelKey.value = value; - - late final ffi.Pointer - _NSStreamSocketSecurityLevelNone = - _lookup('NSStreamSocketSecurityLevelNone'); - - NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelNone => - _NSStreamSocketSecurityLevelNone.value; - - set NSStreamSocketSecurityLevelNone(NSStreamSocketSecurityLevel value) => - _NSStreamSocketSecurityLevelNone.value = value; - - late final ffi.Pointer - _NSStreamSocketSecurityLevelSSLv2 = - _lookup('NSStreamSocketSecurityLevelSSLv2'); - - NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelSSLv2 => - _NSStreamSocketSecurityLevelSSLv2.value; - - set NSStreamSocketSecurityLevelSSLv2(NSStreamSocketSecurityLevel value) => - _NSStreamSocketSecurityLevelSSLv2.value = value; - - late final ffi.Pointer - _NSStreamSocketSecurityLevelSSLv3 = - _lookup('NSStreamSocketSecurityLevelSSLv3'); - - NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelSSLv3 => - _NSStreamSocketSecurityLevelSSLv3.value; - - set NSStreamSocketSecurityLevelSSLv3(NSStreamSocketSecurityLevel value) => - _NSStreamSocketSecurityLevelSSLv3.value = value; - - late final ffi.Pointer - _NSStreamSocketSecurityLevelTLSv1 = - _lookup('NSStreamSocketSecurityLevelTLSv1'); - - NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelTLSv1 => - _NSStreamSocketSecurityLevelTLSv1.value; - - set NSStreamSocketSecurityLevelTLSv1(NSStreamSocketSecurityLevel value) => - _NSStreamSocketSecurityLevelTLSv1.value = value; - - late final ffi.Pointer - _NSStreamSocketSecurityLevelNegotiatedSSL = - _lookup( - 'NSStreamSocketSecurityLevelNegotiatedSSL'); - - NSStreamSocketSecurityLevel get NSStreamSocketSecurityLevelNegotiatedSSL => - _NSStreamSocketSecurityLevelNegotiatedSSL.value; - - set NSStreamSocketSecurityLevelNegotiatedSSL( - NSStreamSocketSecurityLevel value) => - _NSStreamSocketSecurityLevelNegotiatedSSL.value = value; - - late final ffi.Pointer - _NSStreamSOCKSProxyConfigurationKey = - _lookup('NSStreamSOCKSProxyConfigurationKey'); - - NSStreamPropertyKey get NSStreamSOCKSProxyConfigurationKey => - _NSStreamSOCKSProxyConfigurationKey.value; - - set NSStreamSOCKSProxyConfigurationKey(NSStreamPropertyKey value) => - _NSStreamSOCKSProxyConfigurationKey.value = value; - - late final ffi.Pointer - _NSStreamSOCKSProxyHostKey = - _lookup('NSStreamSOCKSProxyHostKey'); - - NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyHostKey => - _NSStreamSOCKSProxyHostKey.value; - - set NSStreamSOCKSProxyHostKey(NSStreamSOCKSProxyConfiguration value) => - _NSStreamSOCKSProxyHostKey.value = value; - - late final ffi.Pointer - _NSStreamSOCKSProxyPortKey = - _lookup('NSStreamSOCKSProxyPortKey'); - - NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyPortKey => - _NSStreamSOCKSProxyPortKey.value; - - set NSStreamSOCKSProxyPortKey(NSStreamSOCKSProxyConfiguration value) => - _NSStreamSOCKSProxyPortKey.value = value; - - late final ffi.Pointer - _NSStreamSOCKSProxyVersionKey = - _lookup('NSStreamSOCKSProxyVersionKey'); - - NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyVersionKey => - _NSStreamSOCKSProxyVersionKey.value; - - set NSStreamSOCKSProxyVersionKey(NSStreamSOCKSProxyConfiguration value) => - _NSStreamSOCKSProxyVersionKey.value = value; - - late final ffi.Pointer - _NSStreamSOCKSProxyUserKey = - _lookup('NSStreamSOCKSProxyUserKey'); - - NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyUserKey => - _NSStreamSOCKSProxyUserKey.value; - - set NSStreamSOCKSProxyUserKey(NSStreamSOCKSProxyConfiguration value) => - _NSStreamSOCKSProxyUserKey.value = value; - - late final ffi.Pointer - _NSStreamSOCKSProxyPasswordKey = - _lookup('NSStreamSOCKSProxyPasswordKey'); - - NSStreamSOCKSProxyConfiguration get NSStreamSOCKSProxyPasswordKey => - _NSStreamSOCKSProxyPasswordKey.value; - - set NSStreamSOCKSProxyPasswordKey(NSStreamSOCKSProxyConfiguration value) => - _NSStreamSOCKSProxyPasswordKey.value = value; - - late final ffi.Pointer - _NSStreamSOCKSProxyVersion4 = - _lookup('NSStreamSOCKSProxyVersion4'); - - NSStreamSOCKSProxyVersion get NSStreamSOCKSProxyVersion4 => - _NSStreamSOCKSProxyVersion4.value; - - set NSStreamSOCKSProxyVersion4(NSStreamSOCKSProxyVersion value) => - _NSStreamSOCKSProxyVersion4.value = value; - - late final ffi.Pointer - _NSStreamSOCKSProxyVersion5 = - _lookup('NSStreamSOCKSProxyVersion5'); - - NSStreamSOCKSProxyVersion get NSStreamSOCKSProxyVersion5 => - _NSStreamSOCKSProxyVersion5.value; - - set NSStreamSOCKSProxyVersion5(NSStreamSOCKSProxyVersion value) => - _NSStreamSOCKSProxyVersion5.value = value; - - late final ffi.Pointer - _NSStreamDataWrittenToMemoryStreamKey = - _lookup('NSStreamDataWrittenToMemoryStreamKey'); - - NSStreamPropertyKey get NSStreamDataWrittenToMemoryStreamKey => - _NSStreamDataWrittenToMemoryStreamKey.value; - - set NSStreamDataWrittenToMemoryStreamKey(NSStreamPropertyKey value) => - _NSStreamDataWrittenToMemoryStreamKey.value = value; - - late final ffi.Pointer _NSStreamFileCurrentOffsetKey = - _lookup('NSStreamFileCurrentOffsetKey'); - - NSStreamPropertyKey get NSStreamFileCurrentOffsetKey => - _NSStreamFileCurrentOffsetKey.value; - - set NSStreamFileCurrentOffsetKey(NSStreamPropertyKey value) => - _NSStreamFileCurrentOffsetKey.value = value; - - late final ffi.Pointer _NSStreamSocketSSLErrorDomain = - _lookup('NSStreamSocketSSLErrorDomain'); - - NSErrorDomain1 get NSStreamSocketSSLErrorDomain => - _NSStreamSocketSSLErrorDomain.value; - - set NSStreamSocketSSLErrorDomain(NSErrorDomain1 value) => - _NSStreamSocketSSLErrorDomain.value = value; - - late final ffi.Pointer _NSStreamSOCKSErrorDomain = - _lookup('NSStreamSOCKSErrorDomain'); - - NSErrorDomain1 get NSStreamSOCKSErrorDomain => - _NSStreamSOCKSErrorDomain.value; - - set NSStreamSOCKSErrorDomain(NSErrorDomain1 value) => - _NSStreamSOCKSErrorDomain.value = value; - - late final ffi.Pointer _NSStreamNetworkServiceType = - _lookup('NSStreamNetworkServiceType'); - - NSStreamPropertyKey get NSStreamNetworkServiceType => - _NSStreamNetworkServiceType.value; - - set NSStreamNetworkServiceType(NSStreamPropertyKey value) => - _NSStreamNetworkServiceType.value = value; - - late final ffi.Pointer - _NSStreamNetworkServiceTypeVoIP = - _lookup( - 'NSStreamNetworkServiceTypeVoIP'); - - NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeVoIP => - _NSStreamNetworkServiceTypeVoIP.value; - - set NSStreamNetworkServiceTypeVoIP(NSStreamNetworkServiceTypeValue value) => - _NSStreamNetworkServiceTypeVoIP.value = value; - - late final ffi.Pointer - _NSStreamNetworkServiceTypeVideo = - _lookup( - 'NSStreamNetworkServiceTypeVideo'); - - NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeVideo => - _NSStreamNetworkServiceTypeVideo.value; - - set NSStreamNetworkServiceTypeVideo(NSStreamNetworkServiceTypeValue value) => - _NSStreamNetworkServiceTypeVideo.value = value; - - late final ffi.Pointer - _NSStreamNetworkServiceTypeBackground = - _lookup( - 'NSStreamNetworkServiceTypeBackground'); - - NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeBackground => - _NSStreamNetworkServiceTypeBackground.value; - - set NSStreamNetworkServiceTypeBackground( - NSStreamNetworkServiceTypeValue value) => - _NSStreamNetworkServiceTypeBackground.value = value; - - late final ffi.Pointer - _NSStreamNetworkServiceTypeVoice = - _lookup( - 'NSStreamNetworkServiceTypeVoice'); - - NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeVoice => - _NSStreamNetworkServiceTypeVoice.value; - - set NSStreamNetworkServiceTypeVoice(NSStreamNetworkServiceTypeValue value) => - _NSStreamNetworkServiceTypeVoice.value = value; - - late final ffi.Pointer - _NSStreamNetworkServiceTypeCallSignaling = - _lookup( - 'NSStreamNetworkServiceTypeCallSignaling'); - - NSStreamNetworkServiceTypeValue get NSStreamNetworkServiceTypeCallSignaling => - _NSStreamNetworkServiceTypeCallSignaling.value; - - set NSStreamNetworkServiceTypeCallSignaling( - NSStreamNetworkServiceTypeValue value) => - _NSStreamNetworkServiceTypeCallSignaling.value = value; - - late final _class_CUPHTTPStreamToNSInputStreamAdapter1 = - _getClass1("CUPHTTPStreamToNSInputStreamAdapter"); - late final _sel_addData_1 = _registerName1("addData:"); - int _objc_msgSend_550( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer data, - ) { - return __objc_msgSend_550( - obj, - sel, - data, - ); - } - - late final __objc_msgSend_550Ptr = _lookup< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_550 = __objc_msgSend_550Ptr.asFunction< - int Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); - - late final _sel_setDone1 = _registerName1("setDone"); - late final _sel_setError_1 = _registerName1("setError:"); - void _objc_msgSend_551( - ffi.Pointer obj, - ffi.Pointer sel, - ffi.Pointer error, - ) { - return __objc_msgSend_551( - obj, - sel, - error, - ); - } - - late final __objc_msgSend_551Ptr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>('objc_msgSend'); - late final __objc_msgSend_551 = __objc_msgSend_551Ptr.asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -} - -final class __mbstate_t extends ffi.Union { - @ffi.Array.multi([128]) - external ffi.Array __mbstate8; - - @ffi.LongLong() - external int _mbstateL; -} - -final class __darwin_pthread_handler_rec extends ffi.Struct { - external ffi - .Pointer)>> - __routine; - - external ffi.Pointer __arg; - - external ffi.Pointer<__darwin_pthread_handler_rec> __next; -} - -final class _opaque_pthread_attr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([56]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_cond_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([40]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_condattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_mutex_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([56]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_mutexattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_once_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([8]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_rwlock_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([192]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_rwlockattr_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - @ffi.Array.multi([16]) - external ffi.Array __opaque; -} - -final class _opaque_pthread_t extends ffi.Struct { - @ffi.Long() - external int __sig; - - external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; - - @ffi.Array.multi([8176]) - external ffi.Array __opaque; -} - -abstract class idtype_t { - static const int P_ALL = 0; - static const int P_PID = 1; - static const int P_PGID = 2; -} - -final class __darwin_arm_exception_state extends ffi.Struct { - @__uint32_t() - external int __exception; - - @__uint32_t() - external int __fsr; - - @__uint32_t() - external int __far; -} - -typedef __uint32_t = ffi.UnsignedInt; -typedef Dart__uint32_t = int; - -final class __darwin_arm_exception_state64 extends ffi.Struct { - @__uint64_t() - external int __far; - - @__uint32_t() - external int __esr; - - @__uint32_t() - external int __exception; -} - -typedef __uint64_t = ffi.UnsignedLongLong; -typedef Dart__uint64_t = int; - -final class __darwin_arm_thread_state extends ffi.Struct { - @ffi.Array.multi([13]) - external ffi.Array<__uint32_t> __r; - - @__uint32_t() - external int __sp; - - @__uint32_t() - external int __lr; - - @__uint32_t() - external int __pc; - - @__uint32_t() - external int __cpsr; -} - -final class __darwin_arm_thread_state64 extends ffi.Struct { - @ffi.Array.multi([29]) - external ffi.Array<__uint64_t> __x; - - @__uint64_t() - external int __fp; - - @__uint64_t() - external int __lr; - - @__uint64_t() - external int __sp; - - @__uint64_t() - external int __pc; - - @__uint32_t() - external int __cpsr; - - @__uint32_t() - external int __pad; -} - -final class __darwin_arm_vfp_state extends ffi.Struct { - @ffi.Array.multi([64]) - external ffi.Array<__uint32_t> __r; - - @__uint32_t() - external int __fpscr; -} - -final class __darwin_arm_neon_state64 extends ffi.Opaque {} - -final class __darwin_arm_neon_state extends ffi.Opaque {} - -final class __arm_pagein_state extends ffi.Struct { - @ffi.Int() - external int __pagein_error; -} - -final class __arm_legacy_debug_state extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bcr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wcr; -} - -final class __darwin_arm_debug_state32 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __bcr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint32_t> __wcr; - - @__uint64_t() - external int __mdscr_el1; -} - -final class __darwin_arm_debug_state64 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __bvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __bcr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __wvr; - - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __wcr; - - @__uint64_t() - external int __mdscr_el1; -} - -final class __darwin_arm_cpmu_state64 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array<__uint64_t> __ctrs; -} - -final class __darwin_mcontext32 extends ffi.Struct { - external __darwin_arm_exception_state __es; - - external __darwin_arm_thread_state __ss; - - external __darwin_arm_vfp_state __fs; -} - -final class __darwin_mcontext64 extends ffi.Opaque {} - -final class __darwin_sigaltstack extends ffi.Struct { - external ffi.Pointer ss_sp; - - @__darwin_size_t() - external int ss_size; - - @ffi.Int() - external int ss_flags; -} - -typedef __darwin_size_t = ffi.UnsignedLong; -typedef Dart__darwin_size_t = int; - -final class __darwin_ucontext extends ffi.Struct { - @ffi.Int() - external int uc_onstack; - - @__darwin_sigset_t() - external int uc_sigmask; - - external __darwin_sigaltstack uc_stack; - - external ffi.Pointer<__darwin_ucontext> uc_link; - - @__darwin_size_t() - external int uc_mcsize; - - external ffi.Pointer<__darwin_mcontext64> uc_mcontext; -} - -typedef __darwin_sigset_t = __uint32_t; - -final class sigval extends ffi.Union { - @ffi.Int() - external int sival_int; - - external ffi.Pointer sival_ptr; -} - -final class sigevent extends ffi.Struct { - @ffi.Int() - external int sigev_notify; - - @ffi.Int() - external int sigev_signo; - - external sigval sigev_value; - - external ffi.Pointer> - sigev_notify_function; - - external ffi.Pointer sigev_notify_attributes; -} - -typedef pthread_attr_t = __darwin_pthread_attr_t; -typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; - -final class __siginfo extends ffi.Struct { - @ffi.Int() - external int si_signo; - - @ffi.Int() - external int si_errno; - - @ffi.Int() - external int si_code; - - @pid_t() - external int si_pid; - - @uid_t() - external int si_uid; - - @ffi.Int() - external int si_status; - - external ffi.Pointer si_addr; - - external sigval si_value; - - @ffi.Long() - external int si_band; - - @ffi.Array.multi([7]) - external ffi.Array __pad; -} - -typedef pid_t = __darwin_pid_t; -typedef __darwin_pid_t = __int32_t; -typedef __int32_t = ffi.Int; -typedef Dart__int32_t = int; -typedef uid_t = __darwin_uid_t; -typedef __darwin_uid_t = __uint32_t; - -final class __sigaction_u extends ffi.Union { - external ffi.Pointer> - __sa_handler; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int, ffi.Pointer<__siginfo>, ffi.Pointer)>> - __sa_sigaction; -} - -final class __sigaction extends ffi.Struct { - external __sigaction_u __sigaction_u1; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, ffi.Int, ffi.Int, - ffi.Pointer, ffi.Pointer)>> sa_tramp; - - @sigset_t() - external int sa_mask; - - @ffi.Int() - external int sa_flags; -} - -typedef siginfo_t = __siginfo; -typedef sigset_t = __darwin_sigset_t; - -final class sigaction extends ffi.Struct { - external __sigaction_u __sigaction_u1; - - @sigset_t() - external int sa_mask; - - @ffi.Int() - external int sa_flags; -} - -final class sigvec extends ffi.Struct { - external ffi.Pointer> - sv_handler; - - @ffi.Int() - external int sv_mask; - - @ffi.Int() - external int sv_flags; -} - -final class sigstack extends ffi.Struct { - external ffi.Pointer ss_sp; - - @ffi.Int() - external int ss_onstack; -} - -final class timeval extends ffi.Struct { - @__darwin_time_t() - external int tv_sec; - - @__darwin_suseconds_t() - external int tv_usec; -} - -typedef __darwin_time_t = ffi.Long; -typedef Dart__darwin_time_t = int; -typedef __darwin_suseconds_t = __int32_t; - -final class rusage extends ffi.Struct { - external timeval ru_utime; - - external timeval ru_stime; - - @ffi.Long() - external int ru_maxrss; - - @ffi.Long() - external int ru_ixrss; - - @ffi.Long() - external int ru_idrss; - - @ffi.Long() - external int ru_isrss; - - @ffi.Long() - external int ru_minflt; - - @ffi.Long() - external int ru_majflt; - - @ffi.Long() - external int ru_nswap; - - @ffi.Long() - external int ru_inblock; - - @ffi.Long() - external int ru_oublock; - - @ffi.Long() - external int ru_msgsnd; - - @ffi.Long() - external int ru_msgrcv; - - @ffi.Long() - external int ru_nsignals; - - @ffi.Long() - external int ru_nvcsw; - - @ffi.Long() - external int ru_nivcsw; -} - -final class rusage_info_v0 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; - - @ffi.Uint64() - external int ri_user_time; - - @ffi.Uint64() - external int ri_system_time; - - @ffi.Uint64() - external int ri_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_interrupt_wkups; - - @ffi.Uint64() - external int ri_pageins; - - @ffi.Uint64() - external int ri_wired_size; - - @ffi.Uint64() - external int ri_resident_size; - - @ffi.Uint64() - external int ri_phys_footprint; - - @ffi.Uint64() - external int ri_proc_start_abstime; - - @ffi.Uint64() - external int ri_proc_exit_abstime; -} - -final class rusage_info_v1 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; - - @ffi.Uint64() - external int ri_user_time; - - @ffi.Uint64() - external int ri_system_time; - - @ffi.Uint64() - external int ri_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_interrupt_wkups; - - @ffi.Uint64() - external int ri_pageins; - - @ffi.Uint64() - external int ri_wired_size; - - @ffi.Uint64() - external int ri_resident_size; - - @ffi.Uint64() - external int ri_phys_footprint; - - @ffi.Uint64() - external int ri_proc_start_abstime; - - @ffi.Uint64() - external int ri_proc_exit_abstime; - - @ffi.Uint64() - external int ri_child_user_time; - - @ffi.Uint64() - external int ri_child_system_time; - - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_child_interrupt_wkups; - - @ffi.Uint64() - external int ri_child_pageins; - - @ffi.Uint64() - external int ri_child_elapsed_abstime; -} - -final class rusage_info_v2 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; - - @ffi.Uint64() - external int ri_user_time; - - @ffi.Uint64() - external int ri_system_time; - - @ffi.Uint64() - external int ri_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_interrupt_wkups; - - @ffi.Uint64() - external int ri_pageins; - - @ffi.Uint64() - external int ri_wired_size; - - @ffi.Uint64() - external int ri_resident_size; - - @ffi.Uint64() - external int ri_phys_footprint; - - @ffi.Uint64() - external int ri_proc_start_abstime; - - @ffi.Uint64() - external int ri_proc_exit_abstime; - - @ffi.Uint64() - external int ri_child_user_time; - - @ffi.Uint64() - external int ri_child_system_time; - - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_child_interrupt_wkups; - - @ffi.Uint64() - external int ri_child_pageins; - - @ffi.Uint64() - external int ri_child_elapsed_abstime; - - @ffi.Uint64() - external int ri_diskio_bytesread; - - @ffi.Uint64() - external int ri_diskio_byteswritten; -} - -final class rusage_info_v3 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; - - @ffi.Uint64() - external int ri_user_time; - - @ffi.Uint64() - external int ri_system_time; - - @ffi.Uint64() - external int ri_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_interrupt_wkups; - - @ffi.Uint64() - external int ri_pageins; - - @ffi.Uint64() - external int ri_wired_size; - - @ffi.Uint64() - external int ri_resident_size; - - @ffi.Uint64() - external int ri_phys_footprint; - - @ffi.Uint64() - external int ri_proc_start_abstime; - - @ffi.Uint64() - external int ri_proc_exit_abstime; - - @ffi.Uint64() - external int ri_child_user_time; - - @ffi.Uint64() - external int ri_child_system_time; - - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_child_interrupt_wkups; - - @ffi.Uint64() - external int ri_child_pageins; - - @ffi.Uint64() - external int ri_child_elapsed_abstime; - - @ffi.Uint64() - external int ri_diskio_bytesread; - - @ffi.Uint64() - external int ri_diskio_byteswritten; - - @ffi.Uint64() - external int ri_cpu_time_qos_default; - - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; - - @ffi.Uint64() - external int ri_cpu_time_qos_background; - - @ffi.Uint64() - external int ri_cpu_time_qos_utility; - - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; - - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; - - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; - - @ffi.Uint64() - external int ri_billed_system_time; - - @ffi.Uint64() - external int ri_serviced_system_time; -} - -final class rusage_info_v4 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; - - @ffi.Uint64() - external int ri_user_time; - - @ffi.Uint64() - external int ri_system_time; - - @ffi.Uint64() - external int ri_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_interrupt_wkups; - - @ffi.Uint64() - external int ri_pageins; - - @ffi.Uint64() - external int ri_wired_size; - - @ffi.Uint64() - external int ri_resident_size; - - @ffi.Uint64() - external int ri_phys_footprint; - - @ffi.Uint64() - external int ri_proc_start_abstime; - - @ffi.Uint64() - external int ri_proc_exit_abstime; - - @ffi.Uint64() - external int ri_child_user_time; - - @ffi.Uint64() - external int ri_child_system_time; - - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_child_interrupt_wkups; - - @ffi.Uint64() - external int ri_child_pageins; - - @ffi.Uint64() - external int ri_child_elapsed_abstime; - - @ffi.Uint64() - external int ri_diskio_bytesread; - - @ffi.Uint64() - external int ri_diskio_byteswritten; - - @ffi.Uint64() - external int ri_cpu_time_qos_default; - - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; - - @ffi.Uint64() - external int ri_cpu_time_qos_background; - - @ffi.Uint64() - external int ri_cpu_time_qos_utility; - - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; - - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; - - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; - - @ffi.Uint64() - external int ri_billed_system_time; - - @ffi.Uint64() - external int ri_serviced_system_time; - - @ffi.Uint64() - external int ri_logical_writes; - - @ffi.Uint64() - external int ri_lifetime_max_phys_footprint; - - @ffi.Uint64() - external int ri_instructions; - - @ffi.Uint64() - external int ri_cycles; - - @ffi.Uint64() - external int ri_billed_energy; - - @ffi.Uint64() - external int ri_serviced_energy; - - @ffi.Uint64() - external int ri_interval_max_phys_footprint; - - @ffi.Uint64() - external int ri_runnable_time; -} - -final class rusage_info_v5 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; - - @ffi.Uint64() - external int ri_user_time; - - @ffi.Uint64() - external int ri_system_time; - - @ffi.Uint64() - external int ri_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_interrupt_wkups; - - @ffi.Uint64() - external int ri_pageins; - - @ffi.Uint64() - external int ri_wired_size; - - @ffi.Uint64() - external int ri_resident_size; - - @ffi.Uint64() - external int ri_phys_footprint; - - @ffi.Uint64() - external int ri_proc_start_abstime; - - @ffi.Uint64() - external int ri_proc_exit_abstime; - - @ffi.Uint64() - external int ri_child_user_time; - - @ffi.Uint64() - external int ri_child_system_time; - - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_child_interrupt_wkups; - - @ffi.Uint64() - external int ri_child_pageins; - - @ffi.Uint64() - external int ri_child_elapsed_abstime; - - @ffi.Uint64() - external int ri_diskio_bytesread; - - @ffi.Uint64() - external int ri_diskio_byteswritten; - - @ffi.Uint64() - external int ri_cpu_time_qos_default; - - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; - - @ffi.Uint64() - external int ri_cpu_time_qos_background; - - @ffi.Uint64() - external int ri_cpu_time_qos_utility; - - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; - - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; - - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; - - @ffi.Uint64() - external int ri_billed_system_time; - - @ffi.Uint64() - external int ri_serviced_system_time; - - @ffi.Uint64() - external int ri_logical_writes; - - @ffi.Uint64() - external int ri_lifetime_max_phys_footprint; - - @ffi.Uint64() - external int ri_instructions; - - @ffi.Uint64() - external int ri_cycles; - - @ffi.Uint64() - external int ri_billed_energy; - - @ffi.Uint64() - external int ri_serviced_energy; - - @ffi.Uint64() - external int ri_interval_max_phys_footprint; - - @ffi.Uint64() - external int ri_runnable_time; - - @ffi.Uint64() - external int ri_flags; -} - -final class rusage_info_v6 extends ffi.Struct { - @ffi.Array.multi([16]) - external ffi.Array ri_uuid; - - @ffi.Uint64() - external int ri_user_time; - - @ffi.Uint64() - external int ri_system_time; - - @ffi.Uint64() - external int ri_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_interrupt_wkups; - - @ffi.Uint64() - external int ri_pageins; - - @ffi.Uint64() - external int ri_wired_size; - - @ffi.Uint64() - external int ri_resident_size; - - @ffi.Uint64() - external int ri_phys_footprint; - - @ffi.Uint64() - external int ri_proc_start_abstime; - - @ffi.Uint64() - external int ri_proc_exit_abstime; - - @ffi.Uint64() - external int ri_child_user_time; - - @ffi.Uint64() - external int ri_child_system_time; - - @ffi.Uint64() - external int ri_child_pkg_idle_wkups; - - @ffi.Uint64() - external int ri_child_interrupt_wkups; - - @ffi.Uint64() - external int ri_child_pageins; - - @ffi.Uint64() - external int ri_child_elapsed_abstime; - - @ffi.Uint64() - external int ri_diskio_bytesread; - - @ffi.Uint64() - external int ri_diskio_byteswritten; - - @ffi.Uint64() - external int ri_cpu_time_qos_default; - - @ffi.Uint64() - external int ri_cpu_time_qos_maintenance; - - @ffi.Uint64() - external int ri_cpu_time_qos_background; - - @ffi.Uint64() - external int ri_cpu_time_qos_utility; - - @ffi.Uint64() - external int ri_cpu_time_qos_legacy; - - @ffi.Uint64() - external int ri_cpu_time_qos_user_initiated; - - @ffi.Uint64() - external int ri_cpu_time_qos_user_interactive; - - @ffi.Uint64() - external int ri_billed_system_time; - - @ffi.Uint64() - external int ri_serviced_system_time; - - @ffi.Uint64() - external int ri_logical_writes; - - @ffi.Uint64() - external int ri_lifetime_max_phys_footprint; - - @ffi.Uint64() - external int ri_instructions; - - @ffi.Uint64() - external int ri_cycles; - - @ffi.Uint64() - external int ri_billed_energy; - - @ffi.Uint64() - external int ri_serviced_energy; - - @ffi.Uint64() - external int ri_interval_max_phys_footprint; - - @ffi.Uint64() - external int ri_runnable_time; - - @ffi.Uint64() - external int ri_flags; - - @ffi.Uint64() - external int ri_user_ptime; - - @ffi.Uint64() - external int ri_system_ptime; - - @ffi.Uint64() - external int ri_pinstructions; - - @ffi.Uint64() - external int ri_pcycles; - - @ffi.Uint64() - external int ri_energy_nj; - - @ffi.Uint64() - external int ri_penergy_nj; - - @ffi.Array.multi([14]) - external ffi.Array ri_reserved; -} - -final class rlimit extends ffi.Struct { - @rlim_t() - external int rlim_cur; - - @rlim_t() - external int rlim_max; -} - -typedef rlim_t = __uint64_t; - -final class proc_rlimit_control_wakeupmon extends ffi.Struct { - @ffi.Uint32() - external int wm_flags; - - @ffi.Int32() - external int wm_rate; -} - -typedef id_t = __darwin_id_t; -typedef __darwin_id_t = __uint32_t; - -@ffi.Packed(1) -final class _OSUnalignedU16 extends ffi.Struct { - @ffi.Uint16() - external int __val; -} - -@ffi.Packed(1) -final class _OSUnalignedU32 extends ffi.Struct { - @ffi.Uint32() - external int __val; -} - -@ffi.Packed(1) -final class _OSUnalignedU64 extends ffi.Struct { - @ffi.Uint64() - external int __val; -} - -final class wait extends ffi.Opaque {} - -final class div_t extends ffi.Struct { - @ffi.Int() - external int quot; - - @ffi.Int() - external int rem; -} - -final class ldiv_t extends ffi.Struct { - @ffi.Long() - external int quot; - - @ffi.Long() - external int rem; -} - -final class lldiv_t extends ffi.Struct { - @ffi.LongLong() - external int quot; - - @ffi.LongLong() - external int rem; -} - -typedef malloc_type_id_t = ffi.UnsignedLongLong; -typedef Dartmalloc_type_id_t = int; - -final class _malloc_zone_t extends ffi.Opaque {} - -typedef malloc_zone_t = _malloc_zone_t; - -class _ObjCBlockBase implements ffi.Finalizable { - final ffi.Pointer<_ObjCBlock> _id; - final NativeCupertinoHttp _lib; - bool _pendingRelease; - - _ObjCBlockBase._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._Block_copy(_id.cast()); - } - if (release) { - _lib._objc_releaseFinalizer2.attach(this, _id.cast(), detach: this); - } - } - - /// Releases the reference to the underlying ObjC block held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._Block_release(_id.cast()); - _lib._objc_releaseFinalizer2.detach(this); - } else { - throw StateError( - 'Released an ObjC block that was unowned or already released.'); - } - } - - @override - bool operator ==(Object other) { - return other is _ObjCBlockBase && _id == other._id; - } - - @override - int get hashCode => _id.hashCode; - - /// Return a pointer to this object. - ffi.Pointer<_ObjCBlock> get pointer => _id; - - ffi.Pointer<_ObjCBlock> _retainAndReturnId() { - _lib._Block_copy(_id.cast()); - return _id; - } -} - -void _ObjCBlock_ffiVoid_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, -) => - block.ref.target - .cast>() - .asFunction()(); -final _ObjCBlock_ffiVoid_closureRegistry = {}; -int _ObjCBlock_ffiVoid_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_registerClosure(void Function() fn) { - final id = ++_ObjCBlock_ffiVoid_closureRegistryIndex; - _ObjCBlock_ffiVoid_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, -) => - _ObjCBlock_ffiVoid_closureRegistry[block.ref.target.address]!(); - -class ObjCBlock_ffiVoid extends _ObjCBlockBase { - ObjCBlock_ffiVoid._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_ffiVoid_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid.fromFunction(NativeCupertinoHttp lib, void Function() fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_ffiVoid_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_registerClosure(() => fn())), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid.listener(NativeCupertinoHttp lib, void Function() fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>)>.listener( - _ObjCBlock_ffiVoid_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_registerClosure(() => fn())), - lib); - static ffi.NativeCallable)>? - _dartFuncListenerTrampoline; - - void call() => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() - .asFunction)>()( - _id, - ); -} - -final class _ObjCBlockDesc extends ffi.Struct { - @ffi.UnsignedLong() - external int reserved; - - @ffi.UnsignedLong() - external int size; - - external ffi.Pointer copy_helper; - - external ffi.Pointer dispose_helper; - - external ffi.Pointer signature; -} - -final class _ObjCBlock extends ffi.Struct { - external ffi.Pointer isa; - - @ffi.Int() - external int flags; - - @ffi.Int() - external int reserved; - - external ffi.Pointer invoke; - - external ffi.Pointer<_ObjCBlockDesc> descriptor; - - external ffi.Pointer target; -} - -int _ObjCBlock_ffiInt_ffiVoid_ffiVoid_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiInt_ffiVoid_ffiVoid_registerClosure( - int Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureRegistryIndex; - _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -int _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiInt_ffiVoid_ffiVoid extends _ObjCBlockBase { - ObjCBlock_ffiInt_ffiVoid_ffiVoid._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiInt_ffiVoid_ffiVoid.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiInt_ffiVoid_ffiVoid_fnPtrTrampoline, 0) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiInt_ffiVoid_ffiVoid.fromFunction(NativeCupertinoHttp lib, - int Function(ffi.Pointer, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureTrampoline, 0) - .cast(), - _ObjCBlock_ffiInt_ffiVoid_ffiVoid_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - int call(ffi.Pointer arg0, ffi.Pointer arg1) => _id - .ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0, arg1); -} - -typedef dev_t = __darwin_dev_t; -typedef __darwin_dev_t = __int32_t; -typedef mode_t = __darwin_mode_t; -typedef __darwin_mode_t = __uint16_t; -typedef __uint16_t = ffi.UnsignedShort; -typedef Dart__uint16_t = int; - -final class fd_set extends ffi.Struct { - @ffi.Array.multi([32]) - external ffi.Array<__int32_t> fds_bits; -} - -final class objc_class extends ffi.Opaque {} - -final class objc_object extends ffi.Struct { - external ffi.Pointer isa; -} - -final class ObjCObject extends ffi.Opaque {} - -final class objc_selector extends ffi.Opaque {} - -final class ObjCSel extends ffi.Opaque {} - -typedef objc_objectptr_t = ffi.Pointer; - -final class _NSZone extends ffi.Opaque {} - -class _ObjCWrapper implements ffi.Finalizable { - final ffi.Pointer _id; - final NativeCupertinoHttp _lib; - bool _pendingRelease; - - _ObjCWrapper._(this._id, this._lib, - {bool retain = false, bool release = false}) - : _pendingRelease = release { - if (retain) { - _lib._objc_retain(_id.cast()); - } - if (release) { - _lib._objc_releaseFinalizer11.attach(this, _id.cast(), detach: this); - } - } - - /// Releases the reference to the underlying ObjC object held by this wrapper. - /// Throws a StateError if this wrapper doesn't currently hold a reference. - void release() { - if (_pendingRelease) { - _pendingRelease = false; - _lib._objc_release(_id.cast()); - _lib._objc_releaseFinalizer11.detach(this); - } else { - throw StateError( - 'Released an ObjC object that was unowned or already released.'); - } - } - - @override - bool operator ==(Object other) { - return other is _ObjCWrapper && _id == other._id; - } - - @override - int get hashCode => _id.hashCode; - - /// Return a pointer to this object. - ffi.Pointer get pointer => _id; - - ffi.Pointer _retainAndReturnId() { - _lib._objc_retain(_id.cast()); - return _id; - } -} - -class NSObject extends _ObjCWrapper { - NSObject._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSObject] that points to the same underlying object as [other]. - static NSObject castFrom(T other) { - return NSObject._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSObject] that wraps the given raw object pointer. - static NSObject castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSObject._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSObject]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSObject1); - } - - static void load(NativeCupertinoHttp _lib) { - _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_load1); - } - - static void initialize(NativeCupertinoHttp _lib) { - _lib._objc_msgSend_1(_lib._class_NSObject1, _lib._sel_initialize1); - } - - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_new1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static NSObject allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_allocWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static NSObject alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_alloc1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - void dealloc() { - _lib._objc_msgSend_1(_id, _lib._sel_dealloc1); - } - - void finalize() { - _lib._objc_msgSend_1(_id, _lib._sel_finalize1); - } - - NSObject copy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_copy1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - NSObject mutableCopy() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_mutableCopy1); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static NSObject copyWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_copyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static NSObject mutableCopyWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSObject1, _lib._sel_mutableCopyWithZone_1, zone); - return NSObject._(_ret, _lib, retain: false, release: true); - } - - static bool instancesRespondToSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_4(_lib._class_NSObject1, - _lib._sel_instancesRespondToSelector_1, aSelector); - } - - static bool conformsToProtocol_(NativeCupertinoHttp _lib, Protocol protocol) { - return _lib._objc_msgSend_5( - _lib._class_NSObject1, _lib._sel_conformsToProtocol_1, protocol._id); - } - - IMP methodForSelector_(ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_id, _lib._sel_methodForSelector_1, aSelector); - } - - static IMP instanceMethodForSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - return _lib._objc_msgSend_6(_lib._class_NSObject1, - _lib._sel_instanceMethodForSelector_1, aSelector); - } - - void doesNotRecognizeSelector_(ffi.Pointer aSelector) { - _lib._objc_msgSend_7(_id, _lib._sel_doesNotRecognizeSelector_1, aSelector); - } - - NSObject forwardingTargetForSelector_(ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_8( - _id, _lib._sel_forwardingTargetForSelector_1, aSelector); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void forwardInvocation_(NSInvocation anInvocation) { - _lib._objc_msgSend_9(_id, _lib._sel_forwardInvocation_1, anInvocation._id); - } - - NSMethodSignature methodSignatureForSelector_( - ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_10( - _id, _lib._sel_methodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - static NSMethodSignature instanceMethodSignatureForSelector_( - NativeCupertinoHttp _lib, ffi.Pointer aSelector) { - final _ret = _lib._objc_msgSend_10(_lib._class_NSObject1, - _lib._sel_instanceMethodSignatureForSelector_1, aSelector); - return NSMethodSignature._(_ret, _lib, retain: true, release: true); - } - - bool allowsWeakReference() { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsWeakReference1); - } - - bool retainWeakReference() { - return _lib._objc_msgSend_11(_id, _lib._sel_retainWeakReference1); - } - - static bool isSubclassOfClass_(NativeCupertinoHttp _lib, NSObject aClass) { - return _lib._objc_msgSend_0( - _lib._class_NSObject1, _lib._sel_isSubclassOfClass_1, aClass._id); - } - - static bool resolveClassMethod_( - NativeCupertinoHttp _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveClassMethod_1, sel); - } - - static bool resolveInstanceMethod_( - NativeCupertinoHttp _lib, ffi.Pointer sel) { - return _lib._objc_msgSend_4( - _lib._class_NSObject1, _lib._sel_resolveInstanceMethod_1, sel); - } - - static DartNSUInteger hash(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12(_lib._class_NSObject1, _lib._sel_hash1); - } - - static NSObject superclass(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_superclass1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject class1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSObject1, _lib._sel_class1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSString description(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_32(_lib._class_NSObject1, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString debugDescription(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_32( - _lib._class_NSObject1, _lib._sel_debugDescription1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static DartNSInteger version(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_86(_lib._class_NSObject1, _lib._sel_version1); - } - - static void setVersion_(NativeCupertinoHttp _lib, DartNSInteger aVersion) { - _lib._objc_msgSend_296( - _lib._class_NSObject1, _lib._sel_setVersion_1, aVersion); - } - - NSObject get classForCoder { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_classForCoder1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? replacementObjectForCoder_(NSCoder coder) { - final _ret = _lib._objc_msgSend_14( - _id, _lib._sel_replacementObjectForCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? awakeAfterUsingCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_awakeAfterUsingCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: false, release: true); - } - - static void poseAsClass_(NativeCupertinoHttp _lib, NSObject aClass) { - _lib._objc_msgSend_210( - _lib._class_NSObject1, _lib._sel_poseAsClass_1, aClass._id); - } - - NSObject get autoContentAccessingProxy { - final _ret = - _lib._objc_msgSend_2(_id, _lib._sel_autoContentAccessingProxy1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void URL_resourceDataDidBecomeAvailable_(NSURL sender, NSData newBytes) { - _lib._objc_msgSend_297(_id, _lib._sel_URL_resourceDataDidBecomeAvailable_1, - sender._id, newBytes._id); - } - - void URLResourceDidFinishLoading_(NSURL sender) { - _lib._objc_msgSend_298( - _id, _lib._sel_URLResourceDidFinishLoading_1, sender._id); - } - - void URLResourceDidCancelLoading_(NSURL sender) { - _lib._objc_msgSend_298( - _id, _lib._sel_URLResourceDidCancelLoading_1, sender._id); - } - - void URL_resourceDidFailLoadingWithReason_(NSURL sender, NSString reason) { - _lib._objc_msgSend_299( - _id, - _lib._sel_URL_resourceDidFailLoadingWithReason_1, - sender._id, - reason._id); - } - - /// Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: - /// - /// - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; - /// - /// The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. - void - attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( - NSError error, - DartNSUInteger recoveryOptionIndex, - NSObject? delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo) { - _lib._objc_msgSend_300( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_1, - error._id, - recoveryOptionIndex, - delegate?._id ?? ffi.nullptr, - didRecoverSelector, - contextInfo); - } - - /// Given that an error alert has been presented applicaton-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and return YES if error recovery was completely successful, NO otherwise. The recovery option index is an index into the error's array of localized recovery options. - bool attemptRecoveryFromError_optionIndex_( - NSError error, DartNSUInteger recoveryOptionIndex) { - return _lib._objc_msgSend_301( - _id, - _lib._sel_attemptRecoveryFromError_optionIndex_1, - error._id, - recoveryOptionIndex); - } -} - -typedef instancetype = ffi.Pointer; -typedef Dartinstancetype = NSObject; - -class Protocol extends _ObjCWrapper { - Protocol._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [Protocol] that points to the same underlying object as [other]. - static Protocol castFrom(T other) { - return Protocol._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [Protocol] that wraps the given raw object pointer. - static Protocol castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return Protocol._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [Protocol]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_Protocol1); - } -} - -typedef IMP = ffi.Pointer>; -typedef IMPFunction = ffi.Void Function(); -typedef DartIMPFunction = void Function(); - -class NSInvocation extends _ObjCWrapper { - NSInvocation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSInvocation] that points to the same underlying object as [other]. - static NSInvocation castFrom(T other) { - return NSInvocation._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSInvocation] that wraps the given raw object pointer. - static NSInvocation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInvocation._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSInvocation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInvocation1); - } -} - -class NSMethodSignature extends _ObjCWrapper { - NSMethodSignature._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. - static NSMethodSignature castFrom(T other) { - return NSMethodSignature._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSMethodSignature] that wraps the given raw object pointer. - static NSMethodSignature castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMethodSignature._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMethodSignature]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMethodSignature1); - } -} - -typedef NSUInteger = ffi.UnsignedLong; -typedef DartNSUInteger = int; - -class NSString extends NSObject { - NSString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSString] that points to the same underlying object as [other]. - static NSString castFrom(T other) { - return NSString._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSString] that wraps the given raw object pointer. - static NSString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSString._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSString1); - } - - factory NSString(NativeCupertinoHttp _lib, String str) { - final cstr = str.toNativeUtf16(); - final nsstr = stringWithCharacters_length_(_lib, cstr.cast(), str.length); - pkg_ffi.calloc.free(cstr); - return nsstr; - } - - @override - String toString() { - final data = - dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); - return data!.bytes.cast().toDartString(length: length); - } - - DartNSUInteger get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); - } - - Dartunichar characterAtIndex_(DartNSUInteger index) { - return _lib._objc_msgSend_13(_id, _lib._sel_characterAtIndex_1, index); - } - - @override - NSString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString substringFromIndex_(DartNSUInteger from) { - final _ret = - _lib._objc_msgSend_15(_id, _lib._sel_substringFromIndex_1, from); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString substringToIndex_(DartNSUInteger to) { - final _ret = _lib._objc_msgSend_15(_id, _lib._sel_substringToIndex_1, to); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString substringWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_16(_id, _lib._sel_substringWithRange_1, range); - return NSString._(_ret, _lib, retain: true, release: true); - } - - void getCharacters_range_(ffi.Pointer buffer, NSRange range) { - _lib._objc_msgSend_17(_id, _lib._sel_getCharacters_range_1, buffer, range); - } - - int compare_(NSString string) { - return _lib._objc_msgSend_18(_id, _lib._sel_compare_1, string._id); - } - - int compare_options_(NSString string, int mask) { - return _lib._objc_msgSend_19( - _id, _lib._sel_compare_options_1, string._id, mask); - } - - int compare_options_range_( - NSString string, int mask, NSRange rangeOfReceiverToCompare) { - return _lib._objc_msgSend_20(_id, _lib._sel_compare_options_range_1, - string._id, mask, rangeOfReceiverToCompare); - } - - int compare_options_range_locale_(NSString string, int mask, - NSRange rangeOfReceiverToCompare, NSObject? locale) { - return _lib._objc_msgSend_21(_id, _lib._sel_compare_options_range_locale_1, - string._id, mask, rangeOfReceiverToCompare, locale?._id ?? ffi.nullptr); - } - - int caseInsensitiveCompare_(NSString string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_caseInsensitiveCompare_1, string._id); - } - - int localizedCompare_(NSString string) { - return _lib._objc_msgSend_18(_id, _lib._sel_localizedCompare_1, string._id); - } - - int localizedCaseInsensitiveCompare_(NSString string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_localizedCaseInsensitiveCompare_1, string._id); - } - - int localizedStandardCompare_(NSString string) { - return _lib._objc_msgSend_18( - _id, _lib._sel_localizedStandardCompare_1, string._id); - } - - bool isEqualToString_(NSString aString) { - return _lib._objc_msgSend_22(_id, _lib._sel_isEqualToString_1, aString._id); - } - - bool hasPrefix_(NSString str) { - return _lib._objc_msgSend_22(_id, _lib._sel_hasPrefix_1, str._id); - } - - bool hasSuffix_(NSString str) { - return _lib._objc_msgSend_22(_id, _lib._sel_hasSuffix_1, str._id); - } - - NSString commonPrefixWithString_options_(NSString str, int mask) { - final _ret = _lib._objc_msgSend_23( - _id, _lib._sel_commonPrefixWithString_options_1, str._id, mask); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool containsString_(NSString str) { - return _lib._objc_msgSend_22(_id, _lib._sel_containsString_1, str._id); - } - - bool localizedCaseInsensitiveContainsString_(NSString str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_localizedCaseInsensitiveContainsString_1, str._id); - } - - bool localizedStandardContainsString_(NSString str) { - return _lib._objc_msgSend_22( - _id, _lib._sel_localizedStandardContainsString_1, str._id); - } - - NSRange localizedStandardRangeOfString_(NSString str) { - return _lib._objc_msgSend_24( - _id, _lib._sel_localizedStandardRangeOfString_1, str._id); - } - - NSRange rangeOfString_(NSString searchString) { - return _lib._objc_msgSend_24( - _id, _lib._sel_rangeOfString_1, searchString._id); - } - - NSRange rangeOfString_options_(NSString searchString, int mask) { - return _lib._objc_msgSend_25( - _id, _lib._sel_rangeOfString_options_1, searchString._id, mask); - } - - NSRange rangeOfString_options_range_( - NSString searchString, int mask, NSRange rangeOfReceiverToSearch) { - return _lib._objc_msgSend_26(_id, _lib._sel_rangeOfString_options_range_1, - searchString._id, mask, rangeOfReceiverToSearch); - } - - NSRange rangeOfString_options_range_locale_(NSString searchString, int mask, - NSRange rangeOfReceiverToSearch, NSLocale? locale) { - return _lib._objc_msgSend_27( - _id, - _lib._sel_rangeOfString_options_range_locale_1, - searchString._id, - mask, - rangeOfReceiverToSearch, - locale?._id ?? ffi.nullptr); - } - - NSRange rangeOfCharacterFromSet_(NSCharacterSet searchSet) { - return _lib._objc_msgSend_241( - _id, _lib._sel_rangeOfCharacterFromSet_1, searchSet._id); - } - - NSRange rangeOfCharacterFromSet_options_(NSCharacterSet searchSet, int mask) { - return _lib._objc_msgSend_242( - _id, _lib._sel_rangeOfCharacterFromSet_options_1, searchSet._id, mask); - } - - NSRange rangeOfCharacterFromSet_options_range_( - NSCharacterSet searchSet, int mask, NSRange rangeOfReceiverToSearch) { - return _lib._objc_msgSend_243( - _id, - _lib._sel_rangeOfCharacterFromSet_options_range_1, - searchSet._id, - mask, - rangeOfReceiverToSearch); - } - - NSRange rangeOfComposedCharacterSequenceAtIndex_(DartNSUInteger index) { - return _lib._objc_msgSend_244( - _id, _lib._sel_rangeOfComposedCharacterSequenceAtIndex_1, index); - } - - NSRange rangeOfComposedCharacterSequencesForRange_(NSRange range) { - return _lib._objc_msgSend_245( - _id, _lib._sel_rangeOfComposedCharacterSequencesForRange_1, range); - } - - NSString stringByAppendingString_(NSString aString) { - final _ret = _lib._objc_msgSend_103( - _id, _lib._sel_stringByAppendingString_1, aString._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByAppendingFormat_(NSString format) { - final _ret = _lib._objc_msgSend_103( - _id, _lib._sel_stringByAppendingFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - double get doubleValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_doubleValue1) - : _lib._objc_msgSend_90(_id, _lib._sel_doubleValue1); - } - - double get floatValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_89_fpret(_id, _lib._sel_floatValue1) - : _lib._objc_msgSend_89(_id, _lib._sel_floatValue1); - } - - int get intValue { - return _lib._objc_msgSend_84(_id, _lib._sel_intValue1); - } - - DartNSInteger get integerValue { - return _lib._objc_msgSend_86(_id, _lib._sel_integerValue1); - } - - int get longLongValue { - return _lib._objc_msgSend_87(_id, _lib._sel_longLongValue1); - } - - bool get boolValue { - return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); - } - - NSString get uppercaseString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_uppercaseString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get lowercaseString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_lowercaseString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get capitalizedString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_capitalizedString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get localizedUppercaseString { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedUppercaseString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get localizedLowercaseString { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedLowercaseString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get localizedCapitalizedString { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedCapitalizedString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString uppercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_246( - _id, _lib._sel_uppercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString lowercaseStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_246( - _id, _lib._sel_lowercaseStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString capitalizedStringWithLocale_(NSLocale? locale) { - final _ret = _lib._objc_msgSend_246(_id, - _lib._sel_capitalizedStringWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - void getLineStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - NSRange range) { - _lib._objc_msgSend_247( - _id, - _lib._sel_getLineStart_end_contentsEnd_forRange_1, - startPtr, - lineEndPtr, - contentsEndPtr, - range); - } - - NSRange lineRangeForRange_(NSRange range) { - return _lib._objc_msgSend_245(_id, _lib._sel_lineRangeForRange_1, range); - } - - void getParagraphStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer parEndPtr, - ffi.Pointer contentsEndPtr, - NSRange range) { - _lib._objc_msgSend_247( - _id, - _lib._sel_getParagraphStart_end_contentsEnd_forRange_1, - startPtr, - parEndPtr, - contentsEndPtr, - range); - } - - NSRange paragraphRangeForRange_(NSRange range) { - return _lib._objc_msgSend_245( - _id, _lib._sel_paragraphRangeForRange_1, range); - } - - void enumerateSubstringsInRange_options_usingBlock_(NSRange range, int opts, - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { - _lib._objc_msgSend_248( - _id, - _lib._sel_enumerateSubstringsInRange_options_usingBlock_1, - range, - opts, - block._id); - } - - void enumerateLinesUsingBlock_(ObjCBlock_ffiVoid_NSString_bool block) { - _lib._objc_msgSend_249( - _id, _lib._sel_enumerateLinesUsingBlock_1, block._id); - } - - ffi.Pointer get UTF8String { - return _lib._objc_msgSend_57(_id, _lib._sel_UTF8String1); - } - - DartNSUInteger get fastestEncoding { - return _lib._objc_msgSend_12(_id, _lib._sel_fastestEncoding1); - } - - DartNSUInteger get smallestEncoding { - return _lib._objc_msgSend_12(_id, _lib._sel_smallestEncoding1); - } - - NSData? dataUsingEncoding_allowLossyConversion_( - DartNSUInteger encoding, bool lossy) { - final _ret = _lib._objc_msgSend_250(_id, - _lib._sel_dataUsingEncoding_allowLossyConversion_1, encoding, lossy); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? dataUsingEncoding_(DartNSUInteger encoding) { - final _ret = - _lib._objc_msgSend_251(_id, _lib._sel_dataUsingEncoding_1, encoding); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - bool canBeConvertedToEncoding_(DartNSUInteger encoding) { - return _lib._objc_msgSend_122( - _id, _lib._sel_canBeConvertedToEncoding_1, encoding); - } - - ffi.Pointer cStringUsingEncoding_(DartNSUInteger encoding) { - return _lib._objc_msgSend_252( - _id, _lib._sel_cStringUsingEncoding_1, encoding); - } - - bool getCString_maxLength_encoding_(ffi.Pointer buffer, - DartNSUInteger maxBufferCount, DartNSUInteger encoding) { - return _lib._objc_msgSend_253( - _id, - _lib._sel_getCString_maxLength_encoding_1, - buffer, - maxBufferCount, - encoding); - } - - bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( - ffi.Pointer buffer, - DartNSUInteger maxBufferCount, - ffi.Pointer usedBufferCount, - DartNSUInteger encoding, - int options, - NSRange range, - NSRangePointer leftover) { - return _lib._objc_msgSend_254( - _id, - _lib._sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_1, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover); - } - - DartNSUInteger maximumLengthOfBytesUsingEncoding_(DartNSUInteger enc) { - return _lib._objc_msgSend_119( - _id, _lib._sel_maximumLengthOfBytesUsingEncoding_1, enc); - } - - DartNSUInteger lengthOfBytesUsingEncoding_(DartNSUInteger enc) { - return _lib._objc_msgSend_119( - _id, _lib._sel_lengthOfBytesUsingEncoding_1, enc); - } - - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_255( - _lib._class_NSString1, _lib._sel_availableStringEncodings1); - } - - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static DartNSUInteger getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSString1, _lib._sel_defaultCStringEncoding1); - } - - NSString get decomposedStringWithCanonicalMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_decomposedStringWithCanonicalMapping1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get precomposedStringWithCanonicalMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_precomposedStringWithCanonicalMapping1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get decomposedStringWithCompatibilityMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_decomposedStringWithCompatibilityMapping1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get precomposedStringWithCompatibilityMapping { - final _ret = _lib._objc_msgSend_32( - _id, _lib._sel_precomposedStringWithCompatibilityMapping1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSArray componentsSeparatedByString_(NSString separator) { - final _ret = _lib._objc_msgSend_256( - _id, _lib._sel_componentsSeparatedByString_1, separator._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet separator) { - final _ret = _lib._objc_msgSend_257( - _id, _lib._sel_componentsSeparatedByCharactersInSet_1, separator._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString stringByTrimmingCharactersInSet_(NSCharacterSet set) { - final _ret = _lib._objc_msgSend_258( - _id, _lib._sel_stringByTrimmingCharactersInSet_1, set._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByPaddingToLength_withString_startingAtIndex_( - DartNSUInteger newLength, NSString padString, DartNSUInteger padIndex) { - final _ret = _lib._objc_msgSend_259( - _id, - _lib._sel_stringByPaddingToLength_withString_startingAtIndex_1, - newLength, - padString._id, - padIndex); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { - final _ret = _lib._objc_msgSend_260( - _id, - _lib._sel_stringByFoldingWithOptions_locale_1, - options, - locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByReplacingOccurrencesOfString_withString_options_range_( - NSString target, NSString replacement, int options, NSRange searchRange) { - final _ret = _lib._objc_msgSend_261( - _id, - _lib._sel_stringByReplacingOccurrencesOfString_withString_options_range_1, - target._id, - replacement._id, - options, - searchRange); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByReplacingOccurrencesOfString_withString_( - NSString target, NSString replacement) { - final _ret = _lib._objc_msgSend_262( - _id, - _lib._sel_stringByReplacingOccurrencesOfString_withString_1, - target._id, - replacement._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString stringByReplacingCharactersInRange_withString_( - NSRange range, NSString replacement) { - final _ret = _lib._objc_msgSend_263( - _id, - _lib._sel_stringByReplacingCharactersInRange_withString_1, - range, - replacement._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? stringByApplyingTransform_reverse_( - DartNSStringTransform transform, bool reverse) { - final _ret = _lib._objc_msgSend_264(_id, - _lib._sel_stringByApplyingTransform_reverse_1, transform._id, reverse); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - bool writeToURL_atomically_encoding_error_(NSURL url, bool useAuxiliaryFile, - DartNSUInteger enc, ffi.Pointer> error) { - return _lib._objc_msgSend_265( - _id, - _lib._sel_writeToURL_atomically_encoding_error_1, - url._id, - useAuxiliaryFile, - enc, - error); - } - - bool writeToFile_atomically_encoding_error_( - NSString path, - bool useAuxiliaryFile, - DartNSUInteger enc, - ffi.Pointer> error) { - return _lib._objc_msgSend_266( - _id, - _lib._sel_writeToFile_atomically_encoding_error_1, - path._id, - useAuxiliaryFile, - enc, - error); - } - - NSString get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - DartNSUInteger get hash { - return _lib._objc_msgSend_12(_id, _lib._sel_hash1); - } - - NSString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, DartNSUInteger length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_267( - _id, - _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, - characters, - length, - freeBuffer); - return NSString._(_ret, _lib, retain: false, release: true); - } - - NSString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, - DartNSUInteger len, - ObjCBlock_ffiVoid_unichar_NSUInteger? deallocator) { - final _ret = _lib._objc_msgSend_268( - _id, - _lib._sel_initWithCharactersNoCopy_length_deallocator_1, - chars, - len, - deallocator?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: false, release: true); - } - - NSString initWithCharacters_length_( - ffi.Pointer characters, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_269( - _id, _lib._sel_initWithCharacters_length_1, characters, length); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithUTF8String_(ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_270( - _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithString_(NSString aString) { - final _ret = - _lib._objc_msgSend_42(_id, _lib._sel_initWithString_1, aString._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithFormat_(NSString format) { - final _ret = - _lib._objc_msgSend_42(_id, _lib._sel_initWithFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithFormat_arguments_(NSString format, va_list argList) { - final _ret = _lib._objc_msgSend_271( - _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithFormat_locale_(NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_272(_id, _lib._sel_initWithFormat_locale_1, - format._id, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString initWithFormat_locale_arguments_( - NSString format, NSObject? locale, va_list argList) { - final _ret = _lib._objc_msgSend_273( - _id, - _lib._sel_initWithFormat_locale_arguments_1, - format._id, - locale?._id ?? ffi.nullptr, - argList); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_274( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_275( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - va_list argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_276( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, - format._id, - validFormatSpecifiers._id, - argList, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - va_list argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_277( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - argList, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithData_encoding_(NSData data, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_278( - _id, _lib._sel_initWithData_encoding_1, data._id, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithBytes_length_encoding_(ffi.Pointer bytes, - DartNSUInteger len, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_279( - _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, - DartNSUInteger len, - DartNSUInteger encoding, - bool freeBuffer) { - final _ret = _lib._objc_msgSend_280( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, - bytes, - len, - encoding, - freeBuffer); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: false, release: true); - } - - NSString? initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - DartNSUInteger len, - DartNSUInteger encoding, - ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { - final _ret = _lib._objc_msgSend_281( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, - bytes, - len, - encoding, - deallocator?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: false, release: true); - } - - static NSString string(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_string1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString stringWithString_(NativeCupertinoHttp _lib, NSString string) { - final _ret = _lib._objc_msgSend_42( - _lib._class_NSString1, _lib._sel_stringWithString_1, string._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString stringWithCharacters_length_(NativeCupertinoHttp _lib, - ffi.Pointer characters, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_269(_lib._class_NSString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_270(_lib._class_NSString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString stringWithFormat_(NativeCupertinoHttp _lib, NSString format) { - final _ret = _lib._objc_msgSend_42( - _lib._class_NSString1, _lib._sel_stringWithFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSString1, - _lib._sel_localizedStringWithFormat_1, format._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_274( - _lib._class_NSString1, - _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_274( - _lib._class_NSString1, - _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_282(_id, - _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithCString_encoding_(NativeCupertinoHttp _lib, - ffi.Pointer cString, DartNSUInteger enc) { - final _ret = _lib._objc_msgSend_282(_lib._class_NSString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithContentsOfURL_encoding_error_(NSURL url, DartNSUInteger enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_283(_id, - _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithContentsOfFile_encoding_error_(NSString path, - DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284( - _id, - _lib._sel_initWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL url, - DartNSUInteger enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_283( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString path, - DartNSUInteger enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_285( - _id, - _lib._sel_initWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? initWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_286( - _id, - _lib._sel_initWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_285( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString? stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_286( - _lib._class_NSString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static DartNSUInteger - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_287( - _lib._class_NSString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data._id, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } - - NSObject propertyList() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_propertyList1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? propertyListFromStringsFileFormat() { - final _ret = _lib._objc_msgSend_288( - _id, _lib._sel_propertyListFromStringsFileFormat1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - ffi.Pointer cString() { - return _lib._objc_msgSend_57(_id, _lib._sel_cString1); - } - - ffi.Pointer lossyCString() { - return _lib._objc_msgSend_57(_id, _lib._sel_lossyCString1); - } - - DartNSUInteger cStringLength() { - return _lib._objc_msgSend_12(_id, _lib._sel_cStringLength1); - } - - void getCString_(ffi.Pointer bytes) { - _lib._objc_msgSend_289(_id, _lib._sel_getCString_1, bytes); - } - - void getCString_maxLength_( - ffi.Pointer bytes, DartNSUInteger maxLength) { - _lib._objc_msgSend_290( - _id, _lib._sel_getCString_maxLength_1, bytes, maxLength); - } - - void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, - DartNSUInteger maxLength, NSRange aRange, NSRangePointer leftoverRange) { - _lib._objc_msgSend_291( - _id, - _lib._sel_getCString_maxLength_range_remainingRange_1, - bytes, - maxLength, - aRange, - leftoverRange); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37( - _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _lib._objc_msgSend_168( - _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); - } - - NSObject? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_49( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_226(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_49( - _lib._class_NSString1, _lib._sel_stringWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_226( - _lib._class_NSString1, _lib._sel_stringWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithCStringNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, DartNSUInteger length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_292( - _id, - _lib._sel_initWithCStringNoCopy_length_freeWhenDone_1, - bytes, - length, - freeBuffer); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: false, release: true); - } - - NSObject? initWithCString_length_( - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_282( - _id, _lib._sel_initWithCString_length_1, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithCString_(ffi.Pointer bytes) { - final _ret = - _lib._objc_msgSend_270(_id, _lib._sel_initWithCString_1, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? stringWithCString_length_(NativeCupertinoHttp _lib, - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_282(_lib._class_NSString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSObject? stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_270( - _lib._class_NSString1, _lib._sel_stringWithCString_1, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void getCharacters_(ffi.Pointer buffer) { - _lib._objc_msgSend_293(_id, _lib._sel_getCharacters_1, buffer); - } - - /// Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode a URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. - NSString? stringByAddingPercentEncodingWithAllowedCharacters_( - NSCharacterSet allowedCharacters) { - final _ret = _lib._objc_msgSend_294( - _id, - _lib._sel_stringByAddingPercentEncodingWithAllowedCharacters_1, - allowedCharacters._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. - NSString? get stringByRemovingPercentEncoding { - final _ret = - _lib._objc_msgSend_55(_id, _lib._sel_stringByRemovingPercentEncoding1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? stringByAddingPercentEscapesUsingEncoding_(DartNSUInteger enc) { - final _ret = _lib._objc_msgSend_295( - _id, _lib._sel_stringByAddingPercentEscapesUsingEncoding_1, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? stringByReplacingPercentEscapesUsingEncoding_(DartNSUInteger enc) { - final _ret = _lib._objc_msgSend_295( - _id, _lib._sel_stringByReplacingPercentEscapesUsingEncoding_1, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - static NSString new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_new1); - return NSString._(_ret, _lib, retain: false, release: true); - } - - static NSString allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSString1, _lib._sel_allocWithZone_1, zone); - return NSString._(_ret, _lib, retain: false, release: true); - } - - static NSString alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSString1, _lib._sel_alloc1); - return NSString._(_ret, _lib, retain: false, release: true); - } -} - -extension StringToNSString on String { - NSString toNSString(NativeCupertinoHttp lib) => NSString(lib, this); -} - -typedef unichar = ffi.UnsignedShort; -typedef Dartunichar = int; - -class NSCoder extends _ObjCWrapper { - NSCoder._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSCoder] that points to the same underlying object as [other]. - static NSCoder castFrom(T other) { - return NSCoder._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSCoder] that wraps the given raw object pointer. - static NSCoder castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCoder._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCoder]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSCoder1); - } -} - -typedef NSRange = _NSRange; - -final class _NSRange extends ffi.Struct { - @NSUInteger() - external int location; - - @NSUInteger() - external int length; -} - -abstract class NSComparisonResult { - static const int NSOrderedAscending = -1; - static const int NSOrderedSame = 0; - static const int NSOrderedDescending = 1; -} - -abstract class NSStringCompareOptions { - static const int NSCaseInsensitiveSearch = 1; - static const int NSLiteralSearch = 2; - static const int NSBackwardsSearch = 4; - static const int NSAnchoredSearch = 8; - static const int NSNumericSearch = 64; - static const int NSDiacriticInsensitiveSearch = 128; - static const int NSWidthInsensitiveSearch = 256; - static const int NSForcedOrderingSearch = 512; - static const int NSRegularExpressionSearch = 1024; -} - -class NSLocale extends _ObjCWrapper { - NSLocale._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSLocale] that points to the same underlying object as [other]. - static NSLocale castFrom(T other) { - return NSLocale._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSLocale] that wraps the given raw object pointer. - static NSLocale castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSLocale._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSLocale]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLocale1); - } -} - -class NSCharacterSet extends NSObject { - NSCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. - static NSCharacterSet castFrom(T other) { - return NSCharacterSet._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSCharacterSet] that wraps the given raw object pointer. - static NSCharacterSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCharacterSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCharacterSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSCharacterSet1); - } - - static NSCharacterSet getControlCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_controlCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getWhitespaceAndNewlineCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSCharacterSet1, - _lib._sel_whitespaceAndNewlineCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_decimalDigitCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getLetterCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_letterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getLowercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_lowercaseLetterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getUppercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_uppercaseLetterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getNonBaseCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_alphanumericCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getDecomposableCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_decomposableCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getIllegalCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_illegalCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getPunctuationCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_punctuationCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getCapitalizedLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_capitalizedLetterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getSymbolCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_symbolCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet getNewlineCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_newlineCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } - - static NSCharacterSet characterSetWithRange_( - NativeCupertinoHttp _lib, NSRange aRange) { - final _ret = _lib._objc_msgSend_29( - _lib._class_NSCharacterSet1, _lib._sel_characterSetWithRange_1, aRange); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet characterSetWithCharactersInString_( - NativeCupertinoHttp _lib, NSString aString) { - final _ret = _lib._objc_msgSend_30(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, aString._id); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet characterSetWithBitmapRepresentation_( - NativeCupertinoHttp _lib, NSData data) { - final _ret = _lib._objc_msgSend_234(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, data._id); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet? characterSetWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString fName) { - final _ret = _lib._objc_msgSend_235(_lib._class_NSCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName._id); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - NSCharacterSet initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_236(_id, _lib._sel_initWithCoder_1, coder._id); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - bool characterIsMember_(Dartunichar aCharacter) { - return _lib._objc_msgSend_237( - _id, _lib._sel_characterIsMember_1, aCharacter); - } - - NSData get bitmapRepresentation { - final _ret = _lib._objc_msgSend_54(_id, _lib._sel_bitmapRepresentation1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSCharacterSet get invertedSet { - final _ret = _lib._objc_msgSend_28(_id, _lib._sel_invertedSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - bool longCharacterIsMember_(DartUInt32 theLongChar) { - return _lib._objc_msgSend_238( - _id, _lib._sel_longCharacterIsMember_1, theLongChar); - } - - bool isSupersetOfSet_(NSCharacterSet theOtherSet) { - return _lib._objc_msgSend_239( - _id, _lib._sel_isSupersetOfSet_1, theOtherSet._id); - } - - bool hasMemberInPlane_(int thePlane) { - return _lib._objc_msgSend_240(_id, _lib._sel_hasMemberInPlane_1, thePlane); - } - - /// Returns a character set containing the characters allowed in a URL's user subcomponent. - static NSCharacterSet getURLUserAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLUserAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - /// Returns a character set containing the characters allowed in a URL's password subcomponent. - static NSCharacterSet getURLPasswordAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLPasswordAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - /// Returns a character set containing the characters allowed in a URL's host subcomponent. - static NSCharacterSet getURLHostAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLHostAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - /// Returns a character set containing the characters allowed in a URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - static NSCharacterSet getURLPathAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLPathAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - /// Returns a character set containing the characters allowed in a URL's query component. - static NSCharacterSet getURLQueryAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLQueryAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - /// Returns a character set containing the characters allowed in a URL's fragment component. - static NSCharacterSet getURLFragmentAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSCharacterSet1, _lib._sel_URLFragmentAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSCharacterSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } - - static NSCharacterSet new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_new1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } - - static NSCharacterSet allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSCharacterSet1, _lib._sel_allocWithZone_1, zone); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } - - static NSCharacterSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCharacterSet1, _lib._sel_alloc1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } -} - -class NSData extends NSObject { - NSData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSData] that points to the same underlying object as [other]. - static NSData castFrom(T other) { - return NSData._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSData] that wraps the given raw object pointer. - static NSData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSData._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSData1); - } - - DartNSUInteger get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); - } - - /// The -bytes method returns a pointer to a contiguous region of memory managed by the receiver. - /// If the regions of memory represented by the receiver are already contiguous, it does so in O(1) time, otherwise it may take longer - /// Using -enumerateByteRangesUsingBlock: will be efficient for both contiguous and discontiguous data. - ffi.Pointer get bytes { - return _lib._objc_msgSend_31(_id, _lib._sel_bytes1); - } - - NSString get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - void getBytes_length_(ffi.Pointer buffer, DartNSUInteger length) { - _lib._objc_msgSend_33(_id, _lib._sel_getBytes_length_1, buffer, length); - } - - void getBytes_range_(ffi.Pointer buffer, NSRange range) { - _lib._objc_msgSend_34(_id, _lib._sel_getBytes_range_1, buffer, range); - } - - bool isEqualToData_(NSData other) { - return _lib._objc_msgSend_35(_id, _lib._sel_isEqualToData_1, other._id); - } - - NSData subdataWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_36(_id, _lib._sel_subdataWithRange_1, range); - return NSData._(_ret, _lib, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37( - _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); - } - - /// the atomically flag is ignored if the url is not of a type the supports atomic writes - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _lib._objc_msgSend_168( - _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); - } - - bool writeToFile_options_error_(NSString path, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_218(_id, _lib._sel_writeToFile_options_error_1, - path._id, writeOptionsMask, errorPtr); - } - - bool writeToURL_options_error_(NSURL url, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _lib._objc_msgSend_219(_id, _lib._sel_writeToURL_options_error_1, - url._id, writeOptionsMask, errorPtr); - } - - NSRange rangeOfData_options_range_( - NSData dataToFind, int mask, NSRange searchRange) { - return _lib._objc_msgSend_220(_id, _lib._sel_rangeOfData_options_range_1, - dataToFind._id, mask, searchRange); - } - - /// 'block' is called once for each contiguous region of memory in the receiver (once total for contiguous NSDatas), until either all bytes have been enumerated, or the 'stop' parameter is set to YES. - void enumerateByteRangesUsingBlock_( - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool block) { - _lib._objc_msgSend_221( - _id, _lib._sel_enumerateByteRangesUsingBlock_1, block._id); - } - - static NSData data(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData dataWithBytes_length_(NativeCupertinoHttp _lib, - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_222( - _lib._class_NSData1, _lib._sel_dataWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData dataWithBytesNoCopy_length_(NativeCupertinoHttp _lib, - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_222(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static NSData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - DartNSUInteger length, - bool b) { - final _ret = _lib._objc_msgSend_223(_lib._class_NSData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static NSData? dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_224( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData? dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_225( - _lib._class_NSData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData? dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_49( - _lib._class_NSData1, _lib._sel_dataWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData? dataWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_226( - _lib._class_NSData1, _lib._sel_dataWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData initWithBytes_length_( - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_222( - _id, _lib._sel_initWithBytes_length_1, bytes, length); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSData initWithBytesNoCopy_length_( - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_222( - _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); - return NSData._(_ret, _lib, retain: false, release: true); - } - - NSData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, DartNSUInteger length, bool b) { - final _ret = _lib._objc_msgSend_223(_id, - _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSData._(_ret, _lib, retain: false, release: true); - } - - NSData initWithBytesNoCopy_length_deallocator_( - ffi.Pointer bytes, - DartNSUInteger length, - ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { - final _ret = _lib._objc_msgSend_227( - _id, - _lib._sel_initWithBytesNoCopy_length_deallocator_1, - bytes, - length, - deallocator?._id ?? ffi.nullptr); - return NSData._(_ret, _lib, retain: false, release: true); - } - - NSData? initWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_224( - _id, - _lib._sel_initWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithContentsOfURL_options_error_(NSURL url, int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_225( - _id, - _lib._sel_initWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_49( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_226(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_228(_id, _lib._sel_initWithData_1, data._id); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData dataWithData_(NativeCupertinoHttp _lib, NSData data) { - final _ret = _lib._objc_msgSend_228( - _lib._class_NSData1, _lib._sel_dataWithData_1, data._id); - return NSData._(_ret, _lib, retain: true, release: true); - } - - /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. - NSData? initWithBase64EncodedString_options_( - NSString base64String, int options) { - final _ret = _lib._objc_msgSend_229( - _id, - _lib._sel_initWithBase64EncodedString_options_1, - base64String._id, - options); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - /// Create a Base-64 encoded NSString from the receiver's contents using the given options. - NSString base64EncodedStringWithOptions_(int options) { - final _ret = _lib._objc_msgSend_230( - _id, _lib._sel_base64EncodedStringWithOptions_1, options); - return NSString._(_ret, _lib, retain: true, release: true); - } - - /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. - NSData? initWithBase64EncodedData_options_(NSData base64Data, int options) { - final _ret = _lib._objc_msgSend_231(_id, - _lib._sel_initWithBase64EncodedData_options_1, base64Data._id, options); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - /// Create a Base-64, UTF-8 encoded NSData from the receiver's contents using the given options. - NSData base64EncodedDataWithOptions_(int options) { - final _ret = _lib._objc_msgSend_232( - _id, _lib._sel_base64EncodedDataWithOptions_1, options); - return NSData._(_ret, _lib, retain: true, release: true); - } - - /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. - NSData? decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_233(_id, - _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - NSData? compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_233( - _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - void getBytes_(ffi.Pointer buffer) { - _lib._objc_msgSend_64(_id, _lib._sel_getBytes_1, buffer); - } - - static NSObject? dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSData1, - _lib._sel_dataWithContentsOfMappedFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? initWithContentsOfMappedFile_(NSString path) { - final _ret = _lib._objc_msgSend_49( - _id, _lib._sel_initWithContentsOfMappedFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - /// These methods first appeared in NSData.h on OS X 10.9 and iOS 7.0. They are deprecated in the same releases in favor of the methods in the NSDataBase64Encoding category. However, these methods have existed for several releases, so they may be used for applications targeting releases prior to OS X 10.9 and iOS 7.0. - NSObject? initWithBase64Encoding_(NSString base64String) { - final _ret = _lib._objc_msgSend_49( - _id, _lib._sel_initWithBase64Encoding_1, base64String._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSString base64Encoding() { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_base64Encoding1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - @override - NSData init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - static NSData new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_new1); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static NSData allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSData1, _lib._sel_allocWithZone_1, zone); - return NSData._(_ret, _lib, retain: false, release: true); - } - - static NSData alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSData1, _lib._sel_alloc1); - return NSData._(_ret, _lib, retain: false, release: true); - } -} - -class NSURL extends NSObject { - NSURL._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURL] that points to the same underlying object as [other]. - static NSURL castFrom(T other) { - return NSURL._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURL] that wraps the given raw object pointer. - static NSURL castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURL._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURL]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURL1); - } - - /// this call percent-encodes both the host and path, so this cannot be used to set a username/password or port in the hostname part or with a IPv6 '[...]' type address. NSURLComponents handles IPv6 addresses correctly. - NSURL? initWithScheme_host_path_( - NSString scheme, NSString? host, NSString path) { - final _ret = _lib._objc_msgSend_38( - _id, - _lib._sel_initWithScheme_host_path_1, - scheme._id, - host?._id ?? ffi.nullptr, - path._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes a newly created file NSURL referencing the local file or directory at path, relative to a base URL. - NSURL initFileURLWithPath_isDirectory_relativeToURL_( - NSString path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_39( - _id, - _lib._sel_initFileURLWithPath_isDirectory_relativeToURL_1, - path._id, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Better to use initFileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. - NSURL initFileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_40( - _id, - _lib._sel_initFileURLWithPath_relativeToURL_1, - path._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL initFileURLWithPath_isDirectory_(NSString path, bool isDir) { - final _ret = _lib._objc_msgSend_41( - _id, _lib._sel_initFileURLWithPath_isDirectory_1, path._id, isDir); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Better to use initFileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. - NSURL initFileURLWithPath_(NSString path) { - final _ret = - _lib._objc_msgSend_42(_id, _lib._sel_initFileURLWithPath_1, path._id); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes and returns a newly created file NSURL referencing the local file or directory at path, relative to a base URL. - static NSURL fileURLWithPath_isDirectory_relativeToURL_( - NativeCupertinoHttp _lib, NSString path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_43( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_relativeToURL_1, - path._id, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Better to use fileURLWithPath:isDirectory:relativeToURL: if you know if the path is a directory vs non-directory, as it saves an I/O. - static NSURL fileURLWithPath_relativeToURL_( - NativeCupertinoHttp _lib, NSString path, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_44( - _lib._class_NSURL1, - _lib._sel_fileURLWithPath_relativeToURL_1, - path._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL fileURLWithPath_isDirectory_( - NativeCupertinoHttp _lib, NSString path, bool isDir) { - final _ret = _lib._objc_msgSend_45(_lib._class_NSURL1, - _lib._sel_fileURLWithPath_isDirectory_1, path._id, isDir); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Better to use fileURLWithPath:isDirectory: if you know if the path is a directory vs non-directory, as it saves an i/o. - static NSURL fileURLWithPath_(NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_46( - _lib._class_NSURL1, _lib._sel_fileURLWithPath_1, path._id); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. - NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_47( - _id, - _lib._sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes and returns a newly created URL referencing the local file or directory at the file system representation of the path. File system representation is a null-terminated C string with canonical UTF-8 encoding. - static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - NativeCupertinoHttp _lib, - ffi.Pointer path, - bool isDir, - NSURL? baseURL) { - final _ret = _lib._objc_msgSend_48( - _lib._class_NSURL1, - _lib._sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_1, - path, - isDir, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// These methods expect their string arguments to contain any percent escape codes that are necessary. It is an error for URLString to be nil. - NSURL? initWithString_(NSString URLString) { - final _ret = - _lib._objc_msgSend_49(_id, _lib._sel_initWithString_1, URLString._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? initWithString_relativeToURL_(NSString URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_50( - _id, - _lib._sel_initWithString_relativeToURL_1, - URLString._id, - baseURL?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL? URLWithString_(NativeCupertinoHttp _lib, NSString URLString) { - final _ret = _lib._objc_msgSend_49( - _lib._class_NSURL1, _lib._sel_URLWithString_1, URLString._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL? URLWithString_relativeToURL_( - NativeCupertinoHttp _lib, NSString URLString, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_50( - _lib._class_NSURL1, - _lib._sel_URLWithString_relativeToURL_1, - URLString._id, - baseURL?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes an `NSURL` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters. - /// If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned. - /// If `encodingInvalidCharacters` is true, `NSURL` will try to encode the string to create a valid URL. - /// If the URL string is still invalid after encoding, `nil` is returned. - /// - /// - Parameter URLString: The URL string. - /// - Parameter encodingInvalidCharacters: True if `NSURL` should try to encode an invalid URL string, false otherwise. - /// - Returns: An `NSURL` instance for a valid URL, or `nil` if the URL is invalid. - NSURL? initWithString_encodingInvalidCharacters_( - NSString URLString, bool encodingInvalidCharacters) { - final _ret = _lib._objc_msgSend_51( - _id, - _lib._sel_initWithString_encodingInvalidCharacters_1, - URLString._id, - encodingInvalidCharacters); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes and returns a newly created `NSURL` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters. - /// If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned. - /// If `encodingInvalidCharacters` is true, `NSURL` will try to encode the string to create a valid URL. - /// If the URL string is still invalid after encoding, `nil` is returned. - /// - /// - Parameter URLString: The URL string. - /// - Parameter encodingInvalidCharacters: True if `NSURL` should try to encode an invalid URL string, false otherwise. - /// - Returns: An `NSURL` instance for a valid URL, or `nil` if the URL is invalid. - static NSURL? URLWithString_encodingInvalidCharacters_( - NativeCupertinoHttp _lib, - NSString URLString, - bool encodingInvalidCharacters) { - final _ret = _lib._objc_msgSend_51( - _lib._class_NSURL1, - _lib._sel_URLWithString_encodingInvalidCharacters_1, - URLString._id, - encodingInvalidCharacters); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - NSURL initWithDataRepresentation_relativeToURL_(NSData data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_52( - _id, - _lib._sel_initWithDataRepresentation_relativeToURL_1, - data._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes and returns a newly created NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - static NSURL URLWithDataRepresentation_relativeToURL_( - NativeCupertinoHttp _lib, NSData data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_53( - _lib._class_NSURL1, - _lib._sel_URLWithDataRepresentation_relativeToURL_1, - data._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( - NSData data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_52( - _id, - _lib._sel_initAbsoluteURLWithDataRepresentation_relativeToURL_1, - data._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Initializes and returns a newly created absolute NSURL using the contents of the given data, relative to a base URL. If the data representation is not a legal URL string as ASCII bytes, the URL object may not behave as expected. - static NSURL absoluteURLWithDataRepresentation_relativeToURL_( - NativeCupertinoHttp _lib, NSData data, NSURL? baseURL) { - final _ret = _lib._objc_msgSend_53( - _lib._class_NSURL1, - _lib._sel_absoluteURLWithDataRepresentation_relativeToURL_1, - data._id, - baseURL?._id ?? ffi.nullptr); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Returns the data representation of the URL's relativeString. If the URL was initialized with -initWithData:relativeToURL:, the data representation returned are the same bytes as those used at initialization; otherwise, the data representation returned are the bytes of the relativeString encoded with NSUTF8StringEncoding. - NSData get dataRepresentation { - final _ret = _lib._objc_msgSend_54(_id, _lib._sel_dataRepresentation1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSString? get absoluteString { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_absoluteString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// The relative portion of a URL. If baseURL is nil, or if the receiver is itself absolute, this is the same as absoluteString - NSString get relativeString { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_relativeString1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - /// may be nil. - NSURL? get baseURL { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_baseURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// if the receiver is itself absolute, this will return self. - NSURL? get absoluteURL { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_absoluteURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Any URL is composed of these two basic pieces. The full URL would be the concatenation of [myURL scheme], ':', [myURL resourceSpecifier] - NSString? get scheme { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_scheme1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get resourceSpecifier { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_resourceSpecifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// If the URL conforms to rfc 1808 (the most common form of URL), the following accessors will return the various components; otherwise they return nil. The litmus test for conformance is as recommended in RFC 1808 - whether the first two characters of resourceSpecifier is @"//". In all cases, they return the component's value after resolving the receiver against its base URL. - NSString? get host { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_host1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSNumber? get port { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_port1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSString? get user { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get password { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_password1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get path { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_path1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get fragment { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_fragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get parameterString { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_parameterString1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get query { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_query1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// The same as path if baseURL is nil - NSString? get relativePath { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_relativePath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// Determines if a given URL string's path represents a directory (i.e. the path component in the URL string ends with a '/' character). This does not check the resource the URL refers to. - bool get hasDirectoryPath { - return _lib._objc_msgSend_11(_id, _lib._sel_hasDirectoryPath1); - } - - /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer buffer, DartNSUInteger maxBufferLength) { - return _lib._objc_msgSend_95( - _id, - _lib._sel_getFileSystemRepresentation_maxLength_1, - buffer, - maxBufferLength); - } - - /// Returns the URL's path in file system representation. File system representation is a null-terminated C string with canonical UTF-8 encoding. The returned C string will be automatically freed just as a returned object would be released; your code should copy the representation or use getFileSystemRepresentation:maxLength: if it needs to store the representation outside of the autorelease context in which the representation is created. - ffi.Pointer get fileSystemRepresentation { - return _lib._objc_msgSend_57(_id, _lib._sel_fileSystemRepresentation1); - } - - /// Whether the scheme is file:; if [myURL isFileURL] is YES, then [myURL path] is suitable for input into NSFileManager or NSPathUtilities. - bool get fileURL { - return _lib._objc_msgSend_11(_id, _lib._sel_isFileURL1); - } - - NSURL? get standardizedURL { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_standardizedURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Returns whether the URL is a file reference URL. Symbol is present in iOS 4, but performs no operation. - bool isFileReferenceURL() { - return _lib._objc_msgSend_11(_id, _lib._sel_isFileReferenceURL1); - } - - /// Returns a file reference URL that refers to the same resource as a specified file URL. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see -bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:). Symbol is present in iOS 4, but performs no operation. - NSURL? fileReferenceURL() { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_fileReferenceURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Returns a file path URL that refers to the same resource as a specified URL. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. Symbol is present in iOS 4, but performs no operation. - NSURL? get filePathURL { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_filePathURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Returns the resource value identified by a given resource key. This method first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then this method synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this method returns YES and value is populated with nil, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool getResourceValue_forKey_error_( - ffi.Pointer> value, - DartNSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_191( - _id, _lib._sel_getResourceValue_forKey_error_1, value, key._id, error); - } - - /// Returns the resource values identified by specified array of resource keys. This method first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then this method synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this method returns NULL, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - NSDictionary? resourceValuesForKeys_error_( - NSArray keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_192( - _id, _lib._sel_resourceValuesForKeys_error_1, keys._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - /// Sets the resource value identified by a given resource key. This method writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool setResourceValue_forKey_error_(NSObject? value, DartNSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_193( - _id, - _lib._sel_setResourceValue_forKey_error_1, - value?._id ?? ffi.nullptr, - key._id, - error); - } - - /// Sets any number of resource values of a URL's resource. This method writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to this method or to -setResourceValue:forKey:error: to guarantee the order. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. Symbol is present in iOS 4, but performs no operation. - bool setResourceValues_error_( - NSDictionary keyedValues, ffi.Pointer> error) { - return _lib._objc_msgSend_194( - _id, _lib._sel_setResourceValues_error_1, keyedValues._id, error); - } - - /// Removes the cached resource value identified by a given resource value key from the URL object. Removing a cached resource value may remove other cached resource values because some resource values are cached as a set of values, and because some resource values depend on other resource values (temporary resource values have no dependencies). This method is currently applicable only to URLs for file system resources. - void removeCachedResourceValueForKey_(DartNSURLResourceKey key) { - _lib._objc_msgSend_195( - _id, _lib._sel_removeCachedResourceValueForKey_1, key._id); - } - - /// Removes all cached resource values and all temporary resource values from the URL object. This method is currently applicable only to URLs for file system resources. - void removeAllCachedResourceValues() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResourceValues1); - } - - /// Sets a temporary resource value on the URL object. Temporary resource values are for client use. Temporary resource values exist only in memory and are never written to the resource's backing store. Once set, a temporary resource value can be copied from the URL object with -getResourceValue:forKey:error: or -resourceValuesForKeys:error:. To remove a temporary resource value from the URL object, use -removeCachedResourceValueForKey:. Care should be taken to ensure the key that identifies a temporary resource value is unique and does not conflict with system defined keys (using reverse domain name notation in your temporary resource value keys is recommended). This method is currently applicable only to URLs for file system resources. - void setTemporaryResourceValue_forKey_( - NSObject? value, DartNSURLResourceKey key) { - _lib._objc_msgSend_196(_id, _lib._sel_setTemporaryResourceValue_forKey_1, - value?._id ?? ffi.nullptr, key._id); - } - - /// Returns bookmark data for the URL, created with specified options and resource values. If this method returns nil, the optional error is populated. - NSData? - bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( - int options, - NSArray? keys, - NSURL? relativeURL, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_197( - _id, - _lib._sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_1, - options, - keys?._id ?? ffi.nullptr, - relativeURL?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - /// Initializes a newly created NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. - NSURL? - initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NSData bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_198( - _id, - _lib._sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData._id, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Creates and Initializes an NSURL that refers to a location specified by resolving bookmark data. If this method returns nil, the optional error is populated. - static NSURL? - URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NativeCupertinoHttp _lib, - NSData bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_198( - _lib._class_NSURL1, - _lib._sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_1, - bookmarkData._id, - options, - relativeURL?._id ?? ffi.nullptr, - isStale, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Returns the resource values for properties identified by a specified array of keys contained in specified bookmark data. If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available in the bookmark data. - static NSDictionary? resourceValuesForKeys_fromBookmarkData_( - NativeCupertinoHttp _lib, NSArray keys, NSData bookmarkData) { - final _ret = _lib._objc_msgSend_199( - _lib._class_NSURL1, - _lib._sel_resourceValuesForKeys_fromBookmarkData_1, - keys._id, - bookmarkData._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - /// Creates an alias file on disk at a specified location with specified bookmark data. bookmarkData must have been created with the NSURLBookmarkCreationSuitableForBookmarkFile option. bookmarkFileURL must either refer to an existing file (which will be overwritten), or to location in an existing directory. If this method returns NO, the optional error is populated. - static bool writeBookmarkData_toURL_options_error_( - NativeCupertinoHttp _lib, - NSData bookmarkData, - NSURL bookmarkFileURL, - DartNSUInteger options, - ffi.Pointer> error) { - return _lib._objc_msgSend_200( - _lib._class_NSURL1, - _lib._sel_writeBookmarkData_toURL_options_error_1, - bookmarkData._id, - bookmarkFileURL._id, - options, - error); - } - - /// Initializes and returns bookmark data derived from an alias file pointed to by a specified URL. If bookmarkFileURL refers to an alias file created prior to OS X v10.6 that contains Alias Manager information but no bookmark data, this method synthesizes bookmark data for the file. If this method returns nil, the optional error is populated. - static NSData? bookmarkDataWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL bookmarkFileURL, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_201( - _lib._class_NSURL1, - _lib._sel_bookmarkDataWithContentsOfURL_error_1, - bookmarkFileURL._id, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - /// Creates and initializes a NSURL that refers to the location specified by resolving the alias file at url. If the url argument does not refer to an alias file as defined by the NSURLIsAliasFileKey property, the NSURL returned is the same as url argument. This method fails and returns nil if the url argument is unreachable, or if the original file or directory could not be located or is not reachable, or if the original file or directory is on a volume that could not be located or mounted. If this method fails, the optional error is populated. The NSURLBookmarkResolutionWithSecurityScope option is not supported by this method. - static NSURL? URLByResolvingAliasFileAtURL_options_error_( - NativeCupertinoHttp _lib, - NSURL url, - int options, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_202( - _lib._class_NSURL1, - _lib._sel_URLByResolvingAliasFileAtURL_options_error_1, - url._id, - options, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Given a NSURL created by resolving a bookmark data created with security scope, make the resource referenced by the url accessible to the process. Each call to startAccessingSecurityScopedResource that returns YES must be balanced with a call to stopAccessingSecurityScopedResource when access to this resource is no longer needed by the client. Calls to start and stop accessing the resource are reference counted and may be nested, which allows the pair of calls to be logically scoped. - bool startAccessingSecurityScopedResource() { - return _lib._objc_msgSend_11( - _id, _lib._sel_startAccessingSecurityScopedResource1); - } - - /// Removes one "accessing" reference to the security scope. When all references are removed, it revokes the access granted to the url by the initial prior successful call to startAccessingSecurityScopedResource. - void stopAccessingSecurityScopedResource() { - _lib._objc_msgSend_1(_id, _lib._sel_stopAccessingSecurityScopedResource1); - } - - /// Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: - /// - NSMetadataQueryUbiquitousDataScope - /// - NSMetadataQueryUbiquitousDocumentsScope - /// - An NSFilePresenter presenting the contents of the directory located by -URLForUbiquitousContainerIdentifier: or a subdirectory thereof - /// - /// The following methods behave identically to their similarly named methods above (-getResourceValue:forKey:error:, etc.), except that they allow you to get resource values and check for presence regardless of whether the promised item's contents currently exist at the URL. You must use these APIs instead of the normal NSURL resource value APIs if and only if any of the following are true: - /// - You are using a URL that you know came directly from one of the above APIs - /// - You are inside the accessor block of a coordinated read or write that used NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingContentIndependentMetadataOnly - /// - /// Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. - bool getPromisedItemResourceValue_forKey_error_( - ffi.Pointer> value, - DartNSURLResourceKey key, - ffi.Pointer> error) { - return _lib._objc_msgSend_191( - _id, - _lib._sel_getPromisedItemResourceValue_forKey_error_1, - value, - key._id, - error); - } - - NSDictionary? promisedItemResourceValuesForKeys_error_( - NSArray keys, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_192(_id, - _lib._sel_promisedItemResourceValuesForKeys_error_1, keys._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - bool checkPromisedItemIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_203( - _id, _lib._sel_checkPromisedItemIsReachableAndReturnError_1, error); - } - - /// The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. - static NSURL? fileURLWithPathComponents_( - NativeCupertinoHttp _lib, NSArray components) { - final _ret = _lib._objc_msgSend_204(_lib._class_NSURL1, - _lib._sel_fileURLWithPathComponents_1, components._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSArray? get pathComponents { - final _ret = _lib._objc_msgSend_188(_id, _lib._sel_pathComponents1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString? get lastPathComponent { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_lastPathComponent1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSString? get pathExtension { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_pathExtension1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLByAppendingPathComponent_(NSString pathComponent) { - final _ret = _lib._objc_msgSend_205( - _id, _lib._sel_URLByAppendingPathComponent_1, pathComponent._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLByAppendingPathComponent_isDirectory_( - NSString pathComponent, bool isDirectory) { - final _ret = _lib._objc_msgSend_206( - _id, - _lib._sel_URLByAppendingPathComponent_isDirectory_1, - pathComponent._id, - isDirectory); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get URLByDeletingLastPathComponent { - final _ret = - _lib._objc_msgSend_56(_id, _lib._sel_URLByDeletingLastPathComponent1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? URLByAppendingPathExtension_(NSString pathExtension) { - final _ret = _lib._objc_msgSend_205( - _id, _lib._sel_URLByAppendingPathExtension_1, pathExtension._id); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get URLByDeletingPathExtension { - final _ret = - _lib._objc_msgSend_56(_id, _lib._sel_URLByDeletingPathExtension1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. - bool checkResourceIsReachableAndReturnError_( - ffi.Pointer> error) { - return _lib._objc_msgSend_203( - _id, _lib._sel_checkResourceIsReachableAndReturnError_1, error); - } - - NSURL? get URLByStandardizingPath { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_URLByStandardizingPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - NSURL? get URLByResolvingSymlinksInPath { - final _ret = - _lib._objc_msgSend_56(_id, _lib._sel_URLByResolvingSymlinksInPath1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// Blocks to load the data if necessary. If shouldUseCache is YES, then if an equivalent URL has already been loaded and cached, its resource data will be returned immediately. If shouldUseCache is NO, a new load will be started - NSData? resourceDataUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_207( - _id, _lib._sel_resourceDataUsingCache_1, shouldUseCache); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - /// Starts an asynchronous load of the data, registering delegate to receive notification. Only one such background load can proceed at a time. - void loadResourceDataNotifyingClient_usingCache_( - NSObject client, bool shouldUseCache) { - _lib._objc_msgSend_208( - _id, - _lib._sel_loadResourceDataNotifyingClient_usingCache_1, - client._id, - shouldUseCache); - } - - NSObject? propertyForKey_(NSString propertyKey) { - final _ret = - _lib._objc_msgSend_49(_id, _lib._sel_propertyForKey_1, propertyKey._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - /// These attempt to write the given arguments for the resource specified by the URL; they return success or failure - bool setResourceData_(NSData data) { - return _lib._objc_msgSend_35(_id, _lib._sel_setResourceData_1, data._id); - } - - bool setProperty_forKey_(NSObject property, NSString propertyKey) { - return _lib._objc_msgSend_209( - _id, _lib._sel_setProperty_forKey_1, property._id, propertyKey._id); - } - - /// Sophisticated clients will want to ask for this, then message the handle directly. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded - NSURLHandle? URLHandleUsingCache_(bool shouldUseCache) { - final _ret = _lib._objc_msgSend_217( - _id, _lib._sel_URLHandleUsingCache_1, shouldUseCache); - return _ret.address == 0 - ? null - : NSURLHandle._(_ret, _lib, retain: true, release: true); - } - - @override - NSURL init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURL._(_ret, _lib, retain: true, release: true); - } - - static NSURL new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_new1); - return NSURL._(_ret, _lib, retain: false, release: true); - } - - static NSURL allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURL1, _lib._sel_allocWithZone_1, zone); - return NSURL._(_ret, _lib, retain: false, release: true); - } - - static NSURL alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURL1, _lib._sel_alloc1); - return NSURL._(_ret, _lib, retain: false, release: true); - } -} - -class NSNumber extends NSValue { - NSNumber._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSNumber] that points to the same underlying object as [other]. - static NSNumber castFrom(T other) { - return NSNumber._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSNumber] that wraps the given raw object pointer. - static NSNumber castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumber._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSNumber]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNumber1); - } - - @override - NSNumber? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithChar_(int value) { - final _ret = _lib._objc_msgSend_67(_id, _lib._sel_initWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedChar_(int value) { - final _ret = - _lib._objc_msgSend_68(_id, _lib._sel_initWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithShort_(int value) { - final _ret = _lib._objc_msgSend_69(_id, _lib._sel_initWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedShort_(int value) { - final _ret = - _lib._objc_msgSend_70(_id, _lib._sel_initWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithInt_(int value) { - final _ret = _lib._objc_msgSend_71(_id, _lib._sel_initWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedInt_(int value) { - final _ret = - _lib._objc_msgSend_72(_id, _lib._sel_initWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithLong_(int value) { - final _ret = _lib._objc_msgSend_73(_id, _lib._sel_initWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedLong_(int value) { - final _ret = - _lib._objc_msgSend_74(_id, _lib._sel_initWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithLongLong_(int value) { - final _ret = - _lib._objc_msgSend_75(_id, _lib._sel_initWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedLongLong_(int value) { - final _ret = - _lib._objc_msgSend_76(_id, _lib._sel_initWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithFloat_(double value) { - final _ret = _lib._objc_msgSend_77(_id, _lib._sel_initWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithDouble_(double value) { - final _ret = _lib._objc_msgSend_78(_id, _lib._sel_initWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithBool_(bool value) { - final _ret = _lib._objc_msgSend_79(_id, _lib._sel_initWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithInteger_(DartNSInteger value) { - final _ret = _lib._objc_msgSend_73(_id, _lib._sel_initWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - NSNumber initWithUnsignedInteger_(DartNSUInteger value) { - final _ret = - _lib._objc_msgSend_74(_id, _lib._sel_initWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - int get charValue { - return _lib._objc_msgSend_80(_id, _lib._sel_charValue1); - } - - int get unsignedCharValue { - return _lib._objc_msgSend_81(_id, _lib._sel_unsignedCharValue1); - } - - int get shortValue { - return _lib._objc_msgSend_82(_id, _lib._sel_shortValue1); - } - - int get unsignedShortValue { - return _lib._objc_msgSend_83(_id, _lib._sel_unsignedShortValue1); - } - - int get intValue { - return _lib._objc_msgSend_84(_id, _lib._sel_intValue1); - } - - int get unsignedIntValue { - return _lib._objc_msgSend_85(_id, _lib._sel_unsignedIntValue1); - } - - int get longValue { - return _lib._objc_msgSend_86(_id, _lib._sel_longValue1); - } - - int get unsignedLongValue { - return _lib._objc_msgSend_12(_id, _lib._sel_unsignedLongValue1); - } - - int get longLongValue { - return _lib._objc_msgSend_87(_id, _lib._sel_longLongValue1); - } - - int get unsignedLongLongValue { - return _lib._objc_msgSend_88(_id, _lib._sel_unsignedLongLongValue1); - } - - double get floatValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_89_fpret(_id, _lib._sel_floatValue1) - : _lib._objc_msgSend_89(_id, _lib._sel_floatValue1); - } - - double get doubleValue { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_doubleValue1) - : _lib._objc_msgSend_90(_id, _lib._sel_doubleValue1); - } - - bool get boolValue { - return _lib._objc_msgSend_11(_id, _lib._sel_boolValue1); - } - - DartNSInteger get integerValue { - return _lib._objc_msgSend_86(_id, _lib._sel_integerValue1); - } - - DartNSUInteger get unsignedIntegerValue { - return _lib._objc_msgSend_12(_id, _lib._sel_unsignedIntegerValue1); - } - - NSString get stringValue { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_stringValue1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - int compare_(NSNumber otherNumber) { - return _lib._objc_msgSend_91(_id, _lib._sel_compare_1, otherNumber._id); - } - - bool isEqualToNumber_(NSNumber number) { - return _lib._objc_msgSend_92(_id, _lib._sel_isEqualToNumber_1, number._id); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_93( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithChar_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_67( - _lib._class_NSNumber1, _lib._sel_numberWithChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedChar_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_68( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedChar_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithShort_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_69( - _lib._class_NSNumber1, _lib._sel_numberWithShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedShort_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_70( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedShort_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithInt_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_71( - _lib._class_NSNumber1, _lib._sel_numberWithInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedInt_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_72( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInt_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_73( - _lib._class_NSNumber1, _lib._sel_numberWithLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_74( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithLongLong_(NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_75( - _lib._class_NSNumber1, _lib._sel_numberWithLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedLongLong_( - NativeCupertinoHttp _lib, int value) { - final _ret = _lib._objc_msgSend_76( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedLongLong_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithFloat_(NativeCupertinoHttp _lib, double value) { - final _ret = _lib._objc_msgSend_77( - _lib._class_NSNumber1, _lib._sel_numberWithFloat_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithDouble_(NativeCupertinoHttp _lib, double value) { - final _ret = _lib._objc_msgSend_78( - _lib._class_NSNumber1, _lib._sel_numberWithDouble_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithBool_(NativeCupertinoHttp _lib, bool value) { - final _ret = _lib._objc_msgSend_79( - _lib._class_NSNumber1, _lib._sel_numberWithBool_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithInteger_( - NativeCupertinoHttp _lib, DartNSInteger value) { - final _ret = _lib._objc_msgSend_73( - _lib._class_NSNumber1, _lib._sel_numberWithInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber numberWithUnsignedInteger_( - NativeCupertinoHttp _lib, DartNSUInteger value) { - final _ret = _lib._objc_msgSend_74( - _lib._class_NSNumber1, _lib._sel_numberWithUnsignedInteger_1, value); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - @override - NSNumber initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_58( - _id, _lib._sel_initWithBytes_objCType_1, value, type); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_59(_lib._class_NSNumber1, - _lib._sel_valueWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue value_withObjCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_59( - _lib._class_NSNumber1, _lib._sel_value_withObjCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithNonretainedObject_( - NativeCupertinoHttp _lib, NSObject? anObject) { - final _ret = _lib._objc_msgSend_60(_lib._class_NSNumber1, - _lib._sel_valueWithNonretainedObject_1, anObject?._id ?? ffi.nullptr); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithPointer_( - NativeCupertinoHttp _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_62( - _lib._class_NSNumber1, _lib._sel_valueWithPointer_1, pointer); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSNumber1, _lib._sel_valueWithRange_1, range); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - @override - NSNumber init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNumber._(_ret, _lib, retain: true, release: true); - } - - static NSNumber new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_new1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } - - static NSNumber allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSNumber1, _lib._sel_allocWithZone_1, zone); - return NSNumber._(_ret, _lib, retain: false, release: true); - } - - static NSNumber alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSNumber1, _lib._sel_alloc1); - return NSNumber._(_ret, _lib, retain: false, release: true); - } -} - -class NSValue extends NSObject { - NSValue._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSValue] that points to the same underlying object as [other]. - static NSValue castFrom(T other) { - return NSValue._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSValue] that wraps the given raw object pointer. - static NSValue castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSValue._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSValue]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSValue1); - } - - void getValue_size_(ffi.Pointer value, DartNSUInteger size) { - _lib._objc_msgSend_33(_id, _lib._sel_getValue_size_1, value, size); - } - - ffi.Pointer get objCType { - return _lib._objc_msgSend_57(_id, _lib._sel_objCType1); - } - - NSValue initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_58( - _id, _lib._sel_initWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - NSValue? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithBytes_objCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_59( - _lib._class_NSValue1, _lib._sel_valueWithBytes_objCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue value_withObjCType_(NativeCupertinoHttp _lib, - ffi.Pointer value, ffi.Pointer type) { - final _ret = _lib._objc_msgSend_59( - _lib._class_NSValue1, _lib._sel_value_withObjCType_1, value, type); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithNonretainedObject_( - NativeCupertinoHttp _lib, NSObject? anObject) { - final _ret = _lib._objc_msgSend_60(_lib._class_NSValue1, - _lib._sel_valueWithNonretainedObject_1, anObject?._id ?? ffi.nullptr); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - NSObject? get nonretainedObjectValue { - final _ret = _lib._objc_msgSend_61(_id, _lib._sel_nonretainedObjectValue1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSValue valueWithPointer_( - NativeCupertinoHttp _lib, ffi.Pointer pointer) { - final _ret = _lib._objc_msgSend_62( - _lib._class_NSValue1, _lib._sel_valueWithPointer_1, pointer); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - ffi.Pointer get pointerValue { - return _lib._objc_msgSend_31(_id, _lib._sel_pointerValue1); - } - - bool isEqualToValue_(NSValue value) { - return _lib._objc_msgSend_63(_id, _lib._sel_isEqualToValue_1, value._id); - } - - void getValue_(ffi.Pointer value) { - _lib._objc_msgSend_64(_id, _lib._sel_getValue_1, value); - } - - static NSValue valueWithRange_(NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_65( - _lib._class_NSValue1, _lib._sel_valueWithRange_1, range); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - NSRange get rangeValue { - return _lib._objc_msgSend_66(_id, _lib._sel_rangeValue1); - } - - @override - NSValue init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSValue._(_ret, _lib, retain: true, release: true); - } - - static NSValue new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_new1); - return NSValue._(_ret, _lib, retain: false, release: true); - } - - static NSValue allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSValue1, _lib._sel_allocWithZone_1, zone); - return NSValue._(_ret, _lib, retain: false, release: true); - } - - static NSValue alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSValue1, _lib._sel_alloc1); - return NSValue._(_ret, _lib, retain: false, release: true); - } -} - -typedef NSInteger = ffi.Long; -typedef DartNSInteger = int; -typedef NSURLResourceKey = ffi.Pointer; -typedef DartNSURLResourceKey = NSString; - -class NSError extends NSObject { - NSError._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSError] that points to the same underlying object as [other]. - static NSError castFrom(T other) { - return NSError._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSError] that wraps the given raw object pointer. - static NSError castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSError._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSError]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSError1); - } - - /// Domain cannot be nil; dict may be nil if no userInfo desired. - NSError initWithDomain_code_userInfo_( - DartNSErrorDomain domain, DartNSInteger code, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_186( - _id, - _lib._sel_initWithDomain_code_userInfo_1, - domain._id, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } - - static NSError errorWithDomain_code_userInfo_(NativeCupertinoHttp _lib, - DartNSErrorDomain domain, DartNSInteger code, NSDictionary? dict) { - final _ret = _lib._objc_msgSend_186( - _lib._class_NSError1, - _lib._sel_errorWithDomain_code_userInfo_1, - domain._id, - code, - dict?._id ?? ffi.nullptr); - return NSError._(_ret, _lib, retain: true, release: true); - } - - /// These define the error. Domains are described by names that are arbitrary strings used to differentiate groups of codes; for custom domain using reverse-DNS naming will help avoid conflicts. Codes are domain-specific. - DartNSErrorDomain get domain { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_domain1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - DartNSInteger get code { - return _lib._objc_msgSend_86(_id, _lib._sel_code1); - } - - /// Additional info which may be used to describe the error further. Examples of keys that might be included in here are "Line Number", "Failed URL", etc. Embedding other errors in here can also be used as a way to communicate underlying reasons for failures; for instance "File System Error" embedded in the userInfo of an NSError returned from a higher level document object. If the embedded error information is itself NSError, the standard key NSUnderlyingErrorKey can be used. - NSDictionary get userInfo { - final _ret = _lib._objc_msgSend_187(_id, _lib._sel_userInfo1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - /// The primary user-presentable message for the error, for instance for NSFileReadNoPermissionError: "The file "File Name" couldn't be opened because you don't have permission to view it.". This message should ideally indicate what failed and why it failed. This value either comes from NSLocalizedDescriptionKey, or NSLocalizedFailureErrorKey+NSLocalizedFailureReasonErrorKey, or NSLocalizedFailureErrorKey. The steps this takes to construct the description include: - /// 1. Look for NSLocalizedDescriptionKey in userInfo, use value as-is if present. - /// 2. Look for NSLocalizedFailureErrorKey in userInfo. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. - /// 3. Fetch NSLocalizedDescriptionKey from userInfoValueProvider, use value as-is if present. - /// 4. Fetch NSLocalizedFailureErrorKey from userInfoValueProvider. If present, use, combining with value for NSLocalizedFailureReasonErrorKey if available. - /// 5. Look for NSLocalizedFailureReasonErrorKey in userInfo or from userInfoValueProvider; combine with generic "Operation failed" message. - /// 6. Last resort localized but barely-presentable string manufactured from domain and code. The result is never nil. - NSString get localizedDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - /// Return a complete sentence which describes why the operation failed. For instance, for NSFileReadNoPermissionError: "You don't have permission.". In many cases this will be just the "because" part of the error message (but as a complete sentence, which makes localization easier). Default implementation of this picks up the value of NSLocalizedFailureReasonErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. - NSString? get localizedFailureReason { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_localizedFailureReason1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// Return the string that can be displayed as the "informative" (aka "secondary") message on an alert panel. For instance, for NSFileReadNoPermissionError: "To view or change permissions, select the item in the Finder and choose File > Get Info.". Default implementation of this picks up the value of NSLocalizedRecoverySuggestionErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. - NSString? get localizedRecoverySuggestion { - final _ret = - _lib._objc_msgSend_55(_id, _lib._sel_localizedRecoverySuggestion1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// Return titles of buttons that are appropriate for displaying in an alert. These should match the string provided as a part of localizedRecoverySuggestion. The first string would be the title of the right-most and default button, the second one next to it, and so on. If used in an alert the corresponding default return values are NSAlertFirstButtonReturn + n. Default implementation of this picks up the value of NSLocalizedRecoveryOptionsErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain, and if that returns nil, this also returns nil. nil return usually implies no special suggestion, which would imply a single "OK" button. - NSArray? get localizedRecoveryOptions { - final _ret = - _lib._objc_msgSend_188(_id, _lib._sel_localizedRecoveryOptions1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - /// Return an object that conforms to the NSErrorRecoveryAttempting informal protocol. The recovery attempter must be an object that can correctly interpret an index into the array returned by localizedRecoveryOptions. The default implementation of this picks up the value of NSRecoveryAttempterErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. - NSObject? get recoveryAttempter { - final _ret = _lib._objc_msgSend_61(_id, _lib._sel_recoveryAttempter1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - /// Return the help anchor that can be used to create a help button to accompany the error when it's displayed to the user. This is done automatically by +[NSAlert alertWithError:], which the presentError: variants in NSApplication go through. The default implementation of this picks up the value of the NSHelpAnchorErrorKey from the userInfo dictionary. If not present, it consults the userInfoValueProvider for the domain. If that returns nil, this also returns nil. - NSString? get helpAnchor { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_helpAnchor1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// Return a list of underlying errors, if any. It includes the values of both NSUnderlyingErrorKey and NSMultipleUnderlyingErrorsKey. If there are no underlying errors, returns an empty array. - NSArray get underlyingErrors { - final _ret = _lib._objc_msgSend_169(_id, _lib._sel_underlyingErrors1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - /// Specify a block which will be called from the implementations of localizedDescription, localizedFailureReason, localizedRecoverySuggestion, localizedRecoveryOptions, recoveryAttempter, helpAnchor, and debugDescription when the underlying value for these is not present in the userInfo dictionary of NSError instances with the specified domain. The provider will be called with the userInfo key corresponding to the queried property: For instance, NSLocalizedDescriptionKey for localizedDescription. The provider should return nil for any keys it is not able to provide and, very importantly, any keys it does not recognize (since we may extend the list of keys in future releases). - /// - /// The specified block will be called synchronously at the time when the above properties are queried. The results are not cached. - /// - /// This provider is optional. It enables localization and formatting of error messages to be done lazily; rather than populating the userInfo at NSError creation time, these keys will be fetched on-demand when asked for. - /// - /// It is expected that only the “owner” of an NSError domain specifies the provider for the domain, and this is done once. This facility is not meant for consumers of errors to customize the userInfo entries. This facility should not be used to customize the behaviors of error domains provided by the system. - /// - /// If an appropriate result for the requested key cannot be provided, return nil rather than choosing to manufacture a generic fallback response such as "Operation could not be completed, error 42." NSError will take care of the fallback cases. - static void setUserInfoValueProviderForDomain_provider_( - NativeCupertinoHttp _lib, - DartNSErrorDomain errorDomain, - ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey? provider) { - _lib._objc_msgSend_189( - _lib._class_NSError1, - _lib._sel_setUserInfoValueProviderForDomain_provider_1, - errorDomain._id, - provider?._id ?? ffi.nullptr); - } - - static ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey? - userInfoValueProviderForDomain_(NativeCupertinoHttp _lib, NSError err, - DartNSErrorUserInfoKey userInfoKey, DartNSErrorDomain errorDomain) { - final _ret = _lib._objc_msgSend_190( - _lib._class_NSError1, - _lib._sel_userInfoValueProviderForDomain_1, - err._id, - userInfoKey._id, - errorDomain._id); - return _ret.address == 0 - ? null - : ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey._(_ret, _lib, - retain: true, release: true); - } - - @override - NSError init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSError._(_ret, _lib, retain: true, release: true); - } - - static NSError new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_new1); - return NSError._(_ret, _lib, retain: false, release: true); - } - - static NSError allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSError1, _lib._sel_allocWithZone_1, zone); - return NSError._(_ret, _lib, retain: false, release: true); - } - - static NSError alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSError1, _lib._sel_alloc1); - return NSError._(_ret, _lib, retain: false, release: true); - } -} - -typedef NSErrorDomain = ffi.Pointer; -typedef DartNSErrorDomain = NSString; - -/// Immutable Dictionary -class NSDictionary extends NSObject { - NSDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSDictionary] that points to the same underlying object as [other]. - static NSDictionary castFrom(T other) { - return NSDictionary._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSDictionary] that wraps the given raw object pointer. - static NSDictionary castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDictionary._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSDictionary]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDictionary1); - } - - DartNSUInteger get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } - - NSObject? objectForKey_(NSObject aKey) { - final _ret = _lib._objc_msgSend_96(_id, _lib._sel_objectForKey_1, aKey._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator keyEnumerator() { - final _ret = _lib._objc_msgSend_97(_id, _lib._sel_keyEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - @override - NSDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - DartNSUInteger cnt) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSArray get allKeys { - final _ret = _lib._objc_msgSend_169(_id, _lib._sel_allKeys1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray allKeysForObject_(NSObject anObject) { - final _ret = - _lib._objc_msgSend_101(_id, _lib._sel_allKeysForObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray get allValues { - final _ret = _lib._objc_msgSend_169(_id, _lib._sel_allValues1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString get descriptionInStringsFileFormat { - final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_descriptionInStringsFileFormat1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_93( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_( - NSObject? locale, DartNSUInteger level) { - final _ret = _lib._objc_msgSend_104( - _id, - _lib._sel_descriptionWithLocale_indent_1, - locale?._id ?? ffi.nullptr, - level); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool isEqualToDictionary_(NSDictionary otherDictionary) { - return _lib._objc_msgSend_170( - _id, _lib._sel_isEqualToDictionary_1, otherDictionary._id); - } - - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_97(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSArray objectsForKeys_notFoundMarker_(NSArray keys, NSObject marker) { - final _ret = _lib._objc_msgSend_171( - _id, _lib._sel_objectsForKeys_notFoundMarker_1, keys._id, marker._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. - bool writeToURL_error_( - NSURL url, ffi.Pointer> error) { - return _lib._objc_msgSend_114( - _id, _lib._sel_writeToURL_error_1, url._id, error); - } - - NSArray keysSortedByValueUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_112( - _id, _lib._sel_keysSortedByValueUsingSelector_1, comparator); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - /// count refers to the number of elements in the dictionary - void getObjects_andKeys_count_(ffi.Pointer> objects, - ffi.Pointer> keys, DartNSUInteger count) { - _lib._objc_msgSend_172( - _id, _lib._sel_getObjects_andKeys_count_1, objects, keys, count); - } - - NSObject? objectForKeyedSubscript_(NSObject key) { - final _ret = _lib._objc_msgSend_96( - _id, _lib._sel_objectForKeyedSubscript_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void enumerateKeysAndObjectsUsingBlock_( - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool block) { - _lib._objc_msgSend_173( - _id, _lib._sel_enumerateKeysAndObjectsUsingBlock_1, block._id); - } - - void enumerateKeysAndObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool block) { - _lib._objc_msgSend_174( - _id, - _lib._sel_enumerateKeysAndObjectsWithOptions_usingBlock_1, - opts, - block._id); - } - - NSArray keysSortedByValueUsingComparator_(DartNSComparator cmptr) { - final _ret = _lib._objc_msgSend_146( - _id, _lib._sel_keysSortedByValueUsingComparator_1, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray keysSortedByValueWithOptions_usingComparator_( - int opts, DartNSComparator cmptr) { - final _ret = _lib._objc_msgSend_147( - _id, - _lib._sel_keysSortedByValueWithOptions_usingComparator_1, - opts, - cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject keysOfEntriesPassingTest_( - ObjCBlock_bool_ObjCObject_ObjCObject_bool predicate) { - final _ret = _lib._objc_msgSend_175( - _id, _lib._sel_keysOfEntriesPassingTest_1, predicate._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject keysOfEntriesWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_ObjCObject_bool predicate) { - final _ret = _lib._objc_msgSend_176(_id, - _lib._sel_keysOfEntriesWithOptions_passingTest_1, opts, predicate._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:andKeys:count: - void getObjects_andKeys_(ffi.Pointer> objects, - ffi.Pointer> keys) { - _lib._objc_msgSend_177(_id, _lib._sel_getObjects_andKeys_1, objects, keys); - } - - /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. - static NSDictionary? dictionaryWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_178(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary? dictionaryWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_179(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_178( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_179(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37( - _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); - } - - /// the atomically flag is ignored if url of a type that cannot be written atomically. - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _lib._objc_msgSend_168( - _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); - } - - static NSDictionary dictionary(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_dictionary1); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithObject_forKey_( - NativeCupertinoHttp _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_180(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithObjects_forKeys_count_( - NativeCupertinoHttp _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - DartNSUInteger cnt) { - final _ret = _lib._objc_msgSend_98(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithObjectsAndKeys_( - NativeCupertinoHttp _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_149(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithDictionary_( - NativeCupertinoHttp _lib, NSDictionary dict) { - final _ret = _lib._objc_msgSend_181(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSDictionary dictionaryWithObjects_forKeys_( - NativeCupertinoHttp _lib, NSArray objects, NSArray keys) { - final _ret = _lib._objc_msgSend_182(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, objects._id, keys._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _lib._objc_msgSend_149( - _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary initWithDictionary_(NSDictionary otherDictionary) { - final _ret = _lib._objc_msgSend_181( - _id, _lib._sel_initWithDictionary_1, otherDictionary._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - NSDictionary initWithDictionary_copyItems_( - NSDictionary otherDictionary, bool flag) { - final _ret = _lib._objc_msgSend_183(_id, - _lib._sel_initWithDictionary_copyItems_1, otherDictionary._id, flag); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } - - NSDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { - final _ret = _lib._objc_msgSend_182( - _id, _lib._sel_initWithObjects_forKeys_1, objects._id, keys._id); - return NSDictionary._(_ret, _lib, retain: true, release: true); - } - - /// Reads dictionary stored in NSPropertyList format from the specified url. - NSDictionary? initWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_184( - _id, _lib._sel_initWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - /// Reads dictionary stored in NSPropertyList format from the specified url. - static NSDictionary? dictionaryWithContentsOfURL_error_( - NativeCupertinoHttp _lib, - NSURL url, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_184(_lib._class_NSDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. - /// The keys are copied from the array and must be copyable. - /// If the array parameter is nil or not an NSArray, an exception is thrown. - /// If the array of keys is empty, an empty key set is returned. - /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). - /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. - /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. - static NSObject sharedKeySetForKeys_(NativeCupertinoHttp _lib, NSArray keys) { - final _ret = _lib._objc_msgSend_150( - _lib._class_NSDictionary1, _lib._sel_sharedKeySetForKeys_1, keys._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - DartNSUInteger countByEnumeratingWithState_objects_count_( - ffi.Pointer state, - ffi.Pointer> buffer, - DartNSUInteger len) { - return _lib._objc_msgSend_185( - _id, - _lib._sel_countByEnumeratingWithState_objects_count_1, - state, - buffer, - len); - } - - static NSDictionary new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_new1); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } - - static NSDictionary allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSDictionary1, _lib._sel_allocWithZone_1, zone); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } - - static NSDictionary alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSDictionary1, _lib._sel_alloc1); - return NSDictionary._(_ret, _lib, retain: false, release: true); - } -} - -class NSEnumerator extends NSObject { - NSEnumerator._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSEnumerator] that points to the same underlying object as [other]. - static NSEnumerator castFrom(T other) { - return NSEnumerator._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSEnumerator] that wraps the given raw object pointer. - static NSEnumerator castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSEnumerator._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSEnumerator]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSEnumerator1); - } - - NSObject? nextObject() { - final _ret = _lib._objc_msgSend_61(_id, _lib._sel_nextObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject get allObjects { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_allObjects1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSEnumerator init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - static NSEnumerator new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_new1); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } - - static NSEnumerator allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSEnumerator1, _lib._sel_allocWithZone_1, zone); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } - - static NSEnumerator alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSEnumerator1, _lib._sel_alloc1); - return NSEnumerator._(_ret, _lib, retain: false, release: true); - } -} - -/// Immutable Array -class NSArray extends NSObject { - NSArray._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSArray] that points to the same underlying object as [other]. - static NSArray castFrom(T other) { - return NSArray._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSArray] that wraps the given raw object pointer. - static NSArray castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSArray._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSArray1); - } - - DartNSUInteger get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } - - NSObject objectAtIndex_(DartNSUInteger index) { - final _ret = _lib._objc_msgSend_99(_id, _lib._sel_objectAtIndex_1, index); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray initWithObjects_count_( - ffi.Pointer> objects, DartNSUInteger cnt) { - final _ret = _lib._objc_msgSend_100( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray arrayByAddingObject_(NSObject anObject) { - final _ret = _lib._objc_msgSend_101( - _id, _lib._sel_arrayByAddingObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray arrayByAddingObjectsFromArray_(NSArray otherArray) { - final _ret = _lib._objc_msgSend_102( - _id, _lib._sel_arrayByAddingObjectsFromArray_1, otherArray._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSString componentsJoinedByString_(NSString separator) { - final _ret = _lib._objc_msgSend_103( - _id, _lib._sel_componentsJoinedByString_1, separator._id); - return NSString._(_ret, _lib, retain: true, release: true); - } - - bool containsObject_(NSObject anObject) { - return _lib._objc_msgSend_0(_id, _lib._sel_containsObject_1, anObject._id); - } - - NSString get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_93( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_( - NSObject? locale, DartNSUInteger level) { - final _ret = _lib._objc_msgSend_104( - _id, - _lib._sel_descriptionWithLocale_indent_1, - locale?._id ?? ffi.nullptr, - level); - return NSString._(_ret, _lib, retain: true, release: true); - } - - NSObject? firstObjectCommonWithArray_(NSArray otherArray) { - final _ret = _lib._objc_msgSend_105( - _id, _lib._sel_firstObjectCommonWithArray_1, otherArray._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - void getObjects_range_( - ffi.Pointer> objects, NSRange range) { - _lib._objc_msgSend_106(_id, _lib._sel_getObjects_range_1, objects, range); - } - - DartNSUInteger indexOfObject_(NSObject anObject) { - return _lib._objc_msgSend_107(_id, _lib._sel_indexOfObject_1, anObject._id); - } - - DartNSUInteger indexOfObject_inRange_(NSObject anObject, NSRange range) { - return _lib._objc_msgSend_108( - _id, _lib._sel_indexOfObject_inRange_1, anObject._id, range); - } - - DartNSUInteger indexOfObjectIdenticalTo_(NSObject anObject) { - return _lib._objc_msgSend_107( - _id, _lib._sel_indexOfObjectIdenticalTo_1, anObject._id); - } - - DartNSUInteger indexOfObjectIdenticalTo_inRange_( - NSObject anObject, NSRange range) { - return _lib._objc_msgSend_108( - _id, _lib._sel_indexOfObjectIdenticalTo_inRange_1, anObject._id, range); - } - - bool isEqualToArray_(NSArray otherArray) { - return _lib._objc_msgSend_109( - _id, _lib._sel_isEqualToArray_1, otherArray._id); - } - - NSObject? get firstObject { - final _ret = _lib._objc_msgSend_61(_id, _lib._sel_firstObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject? get lastObject { - final _ret = _lib._objc_msgSend_61(_id, _lib._sel_lastObject1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator objectEnumerator() { - final _ret = _lib._objc_msgSend_97(_id, _lib._sel_objectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSEnumerator reverseObjectEnumerator() { - final _ret = _lib._objc_msgSend_97(_id, _lib._sel_reverseObjectEnumerator1); - return NSEnumerator._(_ret, _lib, retain: true, release: true); - } - - NSData get sortedArrayHint { - final _ret = _lib._objc_msgSend_54(_id, _lib._sel_sortedArrayHint1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context) { - final _ret = _lib._objc_msgSend_110( - _id, _lib._sel_sortedArrayUsingFunction_context_1, comparator, context); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayUsingFunction_context_hint_( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - NSData? hint) { - final _ret = _lib._objc_msgSend_111( - _id, - _lib._sel_sortedArrayUsingFunction_context_hint_1, - comparator, - context, - hint?._id ?? ffi.nullptr); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { - final _ret = _lib._objc_msgSend_112( - _id, _lib._sel_sortedArrayUsingSelector_1, comparator); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray subarrayWithRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_113(_id, _lib._sel_subarrayWithRange_1, range); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - /// Serializes this instance to the specified URL in the NSPropertyList format (using NSPropertyListXMLFormat_v1_0). For other formats use NSPropertyListSerialization directly. - bool writeToURL_error_( - NSURL url, ffi.Pointer> error) { - return _lib._objc_msgSend_114( - _id, _lib._sel_writeToURL_error_1, url._id, error); - } - - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - _lib._objc_msgSend_7( - _id, _lib._sel_makeObjectsPerformSelector_1, aSelector); - } - - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject? argument) { - _lib._objc_msgSend_115( - _id, - _lib._sel_makeObjectsPerformSelector_withObject_1, - aSelector, - argument?._id ?? ffi.nullptr); - } - - NSArray objectsAtIndexes_(NSIndexSet indexes) { - final _ret = - _lib._objc_msgSend_136(_id, _lib._sel_objectsAtIndexes_1, indexes._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSObject objectAtIndexedSubscript_(DartNSUInteger idx) { - final _ret = - _lib._objc_msgSend_99(_id, _lib._sel_objectAtIndexedSubscript_1, idx); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - void enumerateObjectsUsingBlock_( - ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool block) { - _lib._objc_msgSend_137( - _id, _lib._sel_enumerateObjectsUsingBlock_1, block._id); - } - - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool block) { - _lib._objc_msgSend_138(_id, - _lib._sel_enumerateObjectsWithOptions_usingBlock_1, opts, block._id); - } - - void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, - ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool block) { - _lib._objc_msgSend_139( - _id, - _lib._sel_enumerateObjectsAtIndexes_options_usingBlock_1, - s._id, - opts, - block._id); - } - - DartNSUInteger indexOfObjectPassingTest_( - ObjCBlock_bool_ObjCObject_NSUInteger_bool predicate) { - return _lib._objc_msgSend_140( - _id, _lib._sel_indexOfObjectPassingTest_1, predicate._id); - } - - DartNSUInteger indexOfObjectWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_NSUInteger_bool predicate) { - return _lib._objc_msgSend_141(_id, - _lib._sel_indexOfObjectWithOptions_passingTest_1, opts, predicate._id); - } - - DartNSUInteger indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, - int opts, ObjCBlock_bool_ObjCObject_NSUInteger_bool predicate) { - return _lib._objc_msgSend_142( - _id, - _lib._sel_indexOfObjectAtIndexes_options_passingTest_1, - s._id, - opts, - predicate._id); - } - - NSIndexSet indexesOfObjectsPassingTest_( - ObjCBlock_bool_ObjCObject_NSUInteger_bool predicate) { - final _ret = _lib._objc_msgSend_143( - _id, _lib._sel_indexesOfObjectsPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_ObjCObject_NSUInteger_bool predicate) { - final _ret = _lib._objc_msgSend_144( - _id, - _lib._sel_indexesOfObjectsWithOptions_passingTest_1, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, - int opts, ObjCBlock_bool_ObjCObject_NSUInteger_bool predicate) { - final _ret = _lib._objc_msgSend_145( - _id, - _lib._sel_indexesOfObjectsAtIndexes_options_passingTest_1, - s._id, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayUsingComparator_(DartNSComparator cmptr) { - final _ret = _lib._objc_msgSend_146( - _id, _lib._sel_sortedArrayUsingComparator_1, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray sortedArrayWithOptions_usingComparator_( - int opts, DartNSComparator cmptr) { - final _ret = _lib._objc_msgSend_147(_id, - _lib._sel_sortedArrayWithOptions_usingComparator_1, opts, cmptr._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - /// binary search - DartNSUInteger indexOfObject_inSortedRange_options_usingComparator_( - NSObject obj, NSRange r, int opts, DartNSComparator cmp) { - return _lib._objc_msgSend_148( - _id, - _lib._sel_indexOfObject_inSortedRange_options_usingComparator_1, - obj._id, - r, - opts, - cmp._id); - } - - static NSArray array(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_array1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray arrayWithObject_(NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_149( - _lib._class_NSArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray arrayWithObjects_count_(NativeCupertinoHttp _lib, - ffi.Pointer> objects, DartNSUInteger cnt) { - final _ret = _lib._objc_msgSend_100( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray arrayWithObjects_( - NativeCupertinoHttp _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_149( - _lib._class_NSArray1, _lib._sel_arrayWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray arrayWithArray_(NativeCupertinoHttp _lib, NSArray array) { - final _ret = _lib._objc_msgSend_150( - _lib._class_NSArray1, _lib._sel_arrayWithArray_1, array._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_149(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_150(_id, _lib._sel_initWithArray_1, array._id); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray initWithArray_copyItems_(NSArray array, bool flag) { - final _ret = _lib._objc_msgSend_151( - _id, _lib._sel_initWithArray_copyItems_1, array._id, flag); - return NSArray._(_ret, _lib, retain: false, release: true); - } - - /// Reads array stored in NSPropertyList format from the specified url. - NSArray? initWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_152( - _id, _lib._sel_initWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - /// Reads array stored in NSPropertyList format from the specified url. - static NSArray? arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_152(_lib._class_NSArray1, - _lib._sel_arrayWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSOrderedCollectionDifference - differenceFromArray_withOptions_usingEquivalenceTest_(NSArray other, - int options, ObjCBlock_bool_ObjCObject_ObjCObject block) { - final _ret = _lib._objc_msgSend_161( - _id, - _lib._sel_differenceFromArray_withOptions_usingEquivalenceTest_1, - other._id, - options, - block._id); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } - - NSOrderedCollectionDifference differenceFromArray_withOptions_( - NSArray other, int options) { - final _ret = _lib._objc_msgSend_162( - _id, _lib._sel_differenceFromArray_withOptions_1, other._id, options); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } - - /// Uses isEqual: to determine the difference between the parameter and the receiver - NSOrderedCollectionDifference differenceFromArray_(NSArray other) { - final _ret = - _lib._objc_msgSend_163(_id, _lib._sel_differenceFromArray_1, other._id); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } - - NSArray? arrayByApplyingDifference_( - NSOrderedCollectionDifference difference) { - final _ret = _lib._objc_msgSend_164( - _id, _lib._sel_arrayByApplyingDifference_1, difference._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - /// This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead. - void getObjects_(ffi.Pointer> objects) { - _lib._objc_msgSend_165(_id, _lib._sel_getObjects_1, objects); - } - - /// These methods are deprecated, and will be marked with API_DEPRECATED in a subsequent release. Use the variants that use errors instead. - static NSArray? arrayWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_166( - _lib._class_NSArray1, _lib._sel_arrayWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSArray? arrayWithContentsOfURL_(NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_167( - _lib._class_NSArray1, _lib._sel_arrayWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_166( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_167(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _lib._objc_msgSend_37( - _id, _lib._sel_writeToFile_atomically_1, path._id, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _lib._objc_msgSend_168( - _id, _lib._sel_writeToURL_atomically_1, url._id, atomically); - } - - static NSArray new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_new1); - return NSArray._(_ret, _lib, retain: false, release: true); - } - - static NSArray allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSArray1, _lib._sel_allocWithZone_1, zone); - return NSArray._(_ret, _lib, retain: false, release: true); - } - - static NSArray alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSArray1, _lib._sel_alloc1); - return NSArray._(_ret, _lib, retain: false, release: true); - } -} - -class NSIndexSet extends NSObject { - NSIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSIndexSet] that points to the same underlying object as [other]. - static NSIndexSet castFrom(T other) { - return NSIndexSet._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSIndexSet] that wraps the given raw object pointer. - static NSIndexSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSIndexSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSIndexSet1); - } - - static NSIndexSet indexSet(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_indexSet1); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - static NSIndexSet indexSetWithIndex_( - NativeCupertinoHttp _lib, DartNSUInteger value) { - final _ret = _lib._objc_msgSend_99( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - static NSIndexSet indexSetWithIndexesInRange_( - NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_116( - _lib._class_NSIndexSet1, _lib._sel_indexSetWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet initWithIndexesInRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_116(_id, _lib._sel_initWithIndexesInRange_1, range); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet initWithIndexSet_(NSIndexSet indexSet) { - final _ret = - _lib._objc_msgSend_117(_id, _lib._sel_initWithIndexSet_1, indexSet._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet initWithIndex_(DartNSUInteger value) { - final _ret = _lib._objc_msgSend_99(_id, _lib._sel_initWithIndex_1, value); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - bool isEqualToIndexSet_(NSIndexSet indexSet) { - return _lib._objc_msgSend_118( - _id, _lib._sel_isEqualToIndexSet_1, indexSet._id); - } - - DartNSUInteger get count { - return _lib._objc_msgSend_12(_id, _lib._sel_count1); - } - - DartNSUInteger get firstIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_firstIndex1); - } - - DartNSUInteger get lastIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_lastIndex1); - } - - DartNSUInteger indexGreaterThanIndex_(DartNSUInteger value) { - return _lib._objc_msgSend_119( - _id, _lib._sel_indexGreaterThanIndex_1, value); - } - - DartNSUInteger indexLessThanIndex_(DartNSUInteger value) { - return _lib._objc_msgSend_119(_id, _lib._sel_indexLessThanIndex_1, value); - } - - DartNSUInteger indexGreaterThanOrEqualToIndex_(DartNSUInteger value) { - return _lib._objc_msgSend_119( - _id, _lib._sel_indexGreaterThanOrEqualToIndex_1, value); - } - - DartNSUInteger indexLessThanOrEqualToIndex_(DartNSUInteger value) { - return _lib._objc_msgSend_119( - _id, _lib._sel_indexLessThanOrEqualToIndex_1, value); - } - - DartNSUInteger getIndexes_maxCount_inIndexRange_( - ffi.Pointer indexBuffer, - DartNSUInteger bufferSize, - NSRangePointer range) { - return _lib._objc_msgSend_120( - _id, - _lib._sel_getIndexes_maxCount_inIndexRange_1, - indexBuffer, - bufferSize, - range); - } - - DartNSUInteger countOfIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_121( - _id, _lib._sel_countOfIndexesInRange_1, range); - } - - bool containsIndex_(DartNSUInteger value) { - return _lib._objc_msgSend_122(_id, _lib._sel_containsIndex_1, value); - } - - bool containsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_123( - _id, _lib._sel_containsIndexesInRange_1, range); - } - - bool containsIndexes_(NSIndexSet indexSet) { - return _lib._objc_msgSend_118( - _id, _lib._sel_containsIndexes_1, indexSet._id); - } - - bool intersectsIndexesInRange_(NSRange range) { - return _lib._objc_msgSend_123( - _id, _lib._sel_intersectsIndexesInRange_1, range); - } - - void enumerateIndexesUsingBlock_(ObjCBlock_ffiVoid_NSUInteger_bool block) { - _lib._objc_msgSend_124( - _id, _lib._sel_enumerateIndexesUsingBlock_1, block._id); - } - - void enumerateIndexesWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_NSUInteger_bool block) { - _lib._objc_msgSend_125(_id, - _lib._sel_enumerateIndexesWithOptions_usingBlock_1, opts, block._id); - } - - void enumerateIndexesInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock_ffiVoid_NSUInteger_bool block) { - _lib._objc_msgSend_126( - _id, - _lib._sel_enumerateIndexesInRange_options_usingBlock_1, - range, - opts, - block._id); - } - - DartNSUInteger indexPassingTest_(ObjCBlock_bool_NSUInteger_bool predicate) { - return _lib._objc_msgSend_127( - _id, _lib._sel_indexPassingTest_1, predicate._id); - } - - DartNSUInteger indexWithOptions_passingTest_( - int opts, ObjCBlock_bool_NSUInteger_bool predicate) { - return _lib._objc_msgSend_128( - _id, _lib._sel_indexWithOptions_passingTest_1, opts, predicate._id); - } - - DartNSUInteger indexInRange_options_passingTest_( - NSRange range, int opts, ObjCBlock_bool_NSUInteger_bool predicate) { - return _lib._objc_msgSend_129( - _id, - _lib._sel_indexInRange_options_passingTest_1, - range, - opts, - predicate._id); - } - - NSIndexSet indexesPassingTest_(ObjCBlock_bool_NSUInteger_bool predicate) { - final _ret = _lib._objc_msgSend_130( - _id, _lib._sel_indexesPassingTest_1, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesWithOptions_passingTest_( - int opts, ObjCBlock_bool_NSUInteger_bool predicate) { - final _ret = _lib._objc_msgSend_131( - _id, _lib._sel_indexesWithOptions_passingTest_1, opts, predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - NSIndexSet indexesInRange_options_passingTest_( - NSRange range, int opts, ObjCBlock_bool_NSUInteger_bool predicate) { - final _ret = _lib._objc_msgSend_132( - _id, - _lib._sel_indexesInRange_options_passingTest_1, - range, - opts, - predicate._id); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - void enumerateRangesUsingBlock_(ObjCBlock_ffiVoid_NSRange_bool block) { - _lib._objc_msgSend_133( - _id, _lib._sel_enumerateRangesUsingBlock_1, block._id); - } - - void enumerateRangesWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_NSRange_bool block) { - _lib._objc_msgSend_134(_id, - _lib._sel_enumerateRangesWithOptions_usingBlock_1, opts, block._id); - } - - void enumerateRangesInRange_options_usingBlock_( - NSRange range, int opts, ObjCBlock_ffiVoid_NSRange_bool block) { - _lib._objc_msgSend_135( - _id, - _lib._sel_enumerateRangesInRange_options_usingBlock_1, - range, - opts, - block._id); - } - - @override - NSIndexSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSIndexSet._(_ret, _lib, retain: true, release: true); - } - - static NSIndexSet new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_new1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } - - static NSIndexSet allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSIndexSet1, _lib._sel_allocWithZone_1, zone); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } - - static NSIndexSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSIndexSet1, _lib._sel_alloc1); - return NSIndexSet._(_ret, _lib, retain: false, release: true); - } -} - -typedef NSRangePointer = ffi.Pointer; -void _ObjCBlock_ffiVoid_NSUInteger_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSUInteger_bool_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSUInteger_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSUInteger_bool_registerClosure( - void Function(int, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSUInteger_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSUInteger_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSUInteger_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSUInteger_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_NSUInteger_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSUInteger_bool._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSUInteger_bool.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - NSUInteger arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - NSUInteger, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSUInteger_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSUInteger_bool.fromFunction(NativeCupertinoHttp lib, - void Function(DartNSUInteger, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - NSUInteger, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSUInteger_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSUInteger_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSUInteger_bool.listener(NativeCupertinoHttp lib, - void Function(DartNSUInteger, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - NSUInteger, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSUInteger_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSUInteger_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, NSUInteger, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(DartNSUInteger arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSUInteger arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, int, - ffi.Pointer)>()(_id, arg0, arg1); -} - -abstract class NSEnumerationOptions { - static const int NSEnumerationConcurrent = 1; - static const int NSEnumerationReverse = 2; -} - -bool _ObjCBlock_bool_NSUInteger_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function( - NSUInteger arg0, ffi.Pointer arg1)>>() - .asFunction)>()(arg0, arg1); -final _ObjCBlock_bool_NSUInteger_bool_closureRegistry = - )>{}; -int _ObjCBlock_bool_NSUInteger_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_NSUInteger_bool_registerClosure( - bool Function(int, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_NSUInteger_bool_closureRegistryIndex; - _ObjCBlock_bool_NSUInteger_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_NSUInteger_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0, ffi.Pointer arg1) => - _ObjCBlock_bool_NSUInteger_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_bool_NSUInteger_bool extends _ObjCBlockBase { - ObjCBlock_bool_NSUInteger_bool._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_NSUInteger_bool.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi - .NativeFunction< - ffi.Bool Function(NSUInteger arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock>, - NSUInteger, ffi.Pointer)>( - _ObjCBlock_bool_NSUInteger_bool_fnPtrTrampoline, false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_NSUInteger_bool.fromFunction(NativeCupertinoHttp lib, - bool Function(DartNSUInteger, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock>, - NSUInteger, ffi.Pointer)>( - _ObjCBlock_bool_NSUInteger_bool_closureTrampoline, - false) - .cast(), - _ObjCBlock_bool_NSUInteger_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(DartNSUInteger arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer<_ObjCBlock> block, NSUInteger arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, int, - ffi.Pointer)>()(_id, arg0, arg1); -} - -void _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - NSRange arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(NSRange, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - void Function(NSRange, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - NSRange arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_ffiVoid_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSRange_bool._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSRange_bool.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(NSRange arg0, ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSRange_bool.fromFunction( - NativeCupertinoHttp lib, void Function(NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - (NSRange arg0, ffi.Pointer arg1) => - fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSRange_bool.listener( - NativeCupertinoHttp lib, void Function(NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - (NSRange arg0, ffi.Pointer arg1) => - fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, NSRange, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSRange arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, NSRange arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, NSRange, - ffi.Pointer)>()(_id, arg0, arg1); -} - -void _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, int, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_registerClosure( - void Function(ffi.Pointer, int, ffi.Pointer) fn) { - final id = - ++_ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - NSUInteger arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSUInteger, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool.fromFunction( - NativeCupertinoHttp lib, - void Function(NSObject, DartNSUInteger, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSUInteger, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool.listener(NativeCupertinoHttp lib, - void Function(NSObject, DartNSUInteger, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSUInteger, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSUInteger_bool_registerClosure( - (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), - arg1, arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - NSUInteger, ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, DartNSUInteger arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - int, ffi.Pointer)>()(_id, arg0._id, arg1, arg2); -} - -bool _ObjCBlock_bool_ObjCObject_NSUInteger_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer, int, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_bool_ObjCObject_NSUInteger_bool_registerClosure( - bool Function(ffi.Pointer, int, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_bool_ObjCObject_NSUInteger_bool extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_NSUInteger_bool._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_NSUInteger_bool.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - NSUInteger arg1, ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSUInteger, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_NSUInteger_bool_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_NSUInteger_bool.fromFunction( - NativeCupertinoHttp lib, - bool Function(NSObject, DartNSUInteger, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSUInteger, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_NSUInteger_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_ObjCObject_NSUInteger_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, DartNSUInteger arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - int, ffi.Pointer)>()(_id, arg0._id, arg1, arg2); -} - -typedef NSComparator = ffi.Pointer<_ObjCBlock>; -typedef DartNSComparator = ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject; -int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_registerClosure( - int Function(ffi.Pointer, ffi.Pointer) fn) { - final id = - ++_ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistryIndex; - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -int _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject - extends _ObjCBlockBase { - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_fnPtrTrampoline, - 0) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject.fromFunction( - NativeCupertinoHttp lib, int Function(NSObject, NSObject) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_closureTrampoline, 0) - .cast(), - _ObjCBlock_NSComparisonResult_ObjCObject_ObjCObject_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - NSObject._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - int call(NSObject arg0, NSObject arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id); -} - -abstract class NSSortOptions { - static const int NSSortConcurrent = 1; - static const int NSSortStable = 16; -} - -abstract class NSBinarySearchingOptions { - static const int NSBinarySearchingFirstEqual = 256; - static const int NSBinarySearchingLastEqual = 512; - static const int NSBinarySearchingInsertionIndex = 1024; -} - -class NSOrderedCollectionDifference extends NSObject { - NSOrderedCollectionDifference._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSOrderedCollectionDifference] that points to the same underlying object as [other]. - static NSOrderedCollectionDifference castFrom( - T other) { - return NSOrderedCollectionDifference._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSOrderedCollectionDifference] that wraps the given raw object pointer. - static NSOrderedCollectionDifference castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrderedCollectionDifference._(other, lib, - retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSOrderedCollectionDifference]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOrderedCollectionDifference1); - } - - NSOrderedCollectionDifference initWithChanges_(NSObject changes) { - final _ret = - _lib._objc_msgSend_149(_id, _lib._sel_initWithChanges_1, changes._id); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } - - NSOrderedCollectionDifference - initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_( - NSIndexSet inserts, - NSObject? insertedObjects, - NSIndexSet removes, - NSObject? removedObjects, - NSObject changes) { - final _ret = _lib._objc_msgSend_153( - _id, - _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_additionalChanges_1, - inserts._id, - insertedObjects?._id ?? ffi.nullptr, - removes._id, - removedObjects?._id ?? ffi.nullptr, - changes._id); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } - - NSOrderedCollectionDifference - initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_( - NSIndexSet inserts, - NSObject? insertedObjects, - NSIndexSet removes, - NSObject? removedObjects) { - final _ret = _lib._objc_msgSend_154( - _id, - _lib._sel_initWithInsertIndexes_insertedObjects_removeIndexes_removedObjects_1, - inserts._id, - insertedObjects?._id ?? ffi.nullptr, - removes._id, - removedObjects?._id ?? ffi.nullptr); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } - - NSObject get insertions { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_insertions1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject get removals { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_removals1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - bool get hasChanges { - return _lib._objc_msgSend_11(_id, _lib._sel_hasChanges1); - } - - NSOrderedCollectionDifference differenceByTransformingChangesWithBlock_( - ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange block) { - final _ret = _lib._objc_msgSend_160( - _id, _lib._sel_differenceByTransformingChangesWithBlock_1, block._id); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } - - NSOrderedCollectionDifference inverseDifference() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_inverseDifference1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } - - @override - NSOrderedCollectionDifference init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: true, release: true); - } - - static NSOrderedCollectionDifference new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionDifference1, _lib._sel_new1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: false, release: true); - } - - static NSOrderedCollectionDifference allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOrderedCollectionDifference1, - _lib._sel_allocWithZone_1, - zone); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: false, release: true); - } - - static NSOrderedCollectionDifference alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionDifference1, _lib._sel_alloc1); - return NSOrderedCollectionDifference._(_ret, _lib, - retain: false, release: true); - } -} - -ffi.Pointer - _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer)>()(arg0); -final _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureRegistry = - Function(ffi.Pointer)>{}; -int _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_registerClosure( - ffi.Pointer Function(ffi.Pointer) fn) { - final id = - ++_ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureRegistryIndex; - _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange - extends _ObjCBlockBase { - ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange.fromFunction( - NativeCupertinoHttp lib, - NSOrderedCollectionChange Function(NSOrderedCollectionChange) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_closureTrampoline) - .cast(), - _ObjCBlock_NSOrderedCollectionChange_NSOrderedCollectionChange_registerClosure( - (ffi.Pointer arg0) => - fn(NSOrderedCollectionChange._(arg0, lib, retain: true, release: true)) - ._retainAndReturnId())), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - NSOrderedCollectionChange call(NSOrderedCollectionChange arg0) => - NSOrderedCollectionChange._( - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0._id), - _lib, - retain: false, - release: true); -} - -class NSOrderedCollectionChange extends NSObject { - NSOrderedCollectionChange._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSOrderedCollectionChange] that points to the same underlying object as [other]. - static NSOrderedCollectionChange castFrom(T other) { - return NSOrderedCollectionChange._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSOrderedCollectionChange] that wraps the given raw object pointer. - static NSOrderedCollectionChange castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrderedCollectionChange._(other, lib, - retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSOrderedCollectionChange]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOrderedCollectionChange1); - } - - static NSOrderedCollectionChange changeWithObject_type_index_( - NativeCupertinoHttp _lib, - NSObject? anObject, - int type, - DartNSUInteger index) { - final _ret = _lib._objc_msgSend_155( - _lib._class_NSOrderedCollectionChange1, - _lib._sel_changeWithObject_type_index_1, - anObject?._id ?? ffi.nullptr, - type, - index); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedCollectionChange changeWithObject_type_index_associatedIndex_( - NativeCupertinoHttp _lib, - NSObject? anObject, - int type, - DartNSUInteger index, - DartNSUInteger associatedIndex) { - final _ret = _lib._objc_msgSend_156( - _lib._class_NSOrderedCollectionChange1, - _lib._sel_changeWithObject_type_index_associatedIndex_1, - anObject?._id ?? ffi.nullptr, - type, - index, - associatedIndex); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); - } - - NSObject? get object { - final _ret = _lib._objc_msgSend_61(_id, _lib._sel_object1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - int get changeType { - return _lib._objc_msgSend_157(_id, _lib._sel_changeType1); - } - - DartNSUInteger get index { - return _lib._objc_msgSend_12(_id, _lib._sel_index1); - } - - DartNSUInteger get associatedIndex { - return _lib._objc_msgSend_12(_id, _lib._sel_associatedIndex1); - } - - @override - NSObject init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSOrderedCollectionChange initWithObject_type_index_( - NSObject? anObject, int type, DartNSUInteger index) { - final _ret = _lib._objc_msgSend_158( - _id, - _lib._sel_initWithObject_type_index_1, - anObject?._id ?? ffi.nullptr, - type, - index); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); - } - - NSOrderedCollectionChange initWithObject_type_index_associatedIndex_( - NSObject? anObject, - int type, - DartNSUInteger index, - DartNSUInteger associatedIndex) { - final _ret = _lib._objc_msgSend_159( - _id, - _lib._sel_initWithObject_type_index_associatedIndex_1, - anObject?._id ?? ffi.nullptr, - type, - index, - associatedIndex); - return NSOrderedCollectionChange._(_ret, _lib, retain: true, release: true); - } - - static NSOrderedCollectionChange new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionChange1, _lib._sel_new1); - return NSOrderedCollectionChange._(_ret, _lib, - retain: false, release: true); - } - - static NSOrderedCollectionChange allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSOrderedCollectionChange1, - _lib._sel_allocWithZone_1, zone); - return NSOrderedCollectionChange._(_ret, _lib, - retain: false, release: true); - } - - static NSOrderedCollectionChange alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOrderedCollectionChange1, _lib._sel_alloc1); - return NSOrderedCollectionChange._(_ret, _lib, - retain: false, release: true); - } -} - -abstract class NSCollectionChangeType { - static const int NSCollectionChangeInsert = 0; - static const int NSCollectionChangeRemove = 1; -} - -abstract class NSOrderedCollectionDifferenceCalculationOptions { - static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = - 1; - static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = - 2; - static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; -} - -bool _ObjCBlock_bool_ObjCObject_ObjCObject_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_ObjCObject_ObjCObject_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_ObjCObject_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_ObjCObject_ObjCObject_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_ObjCObject_ObjCObject extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_ObjCObject._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ObjCObject.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ObjCObject_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ObjCObject.fromFunction( - NativeCupertinoHttp lib, bool Function(NSObject, NSObject) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ObjCObject_closureTrampoline, - false) - .cast(), - _ObjCBlock_bool_ObjCObject_ObjCObject_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSObject._(arg0, lib, retain: true, release: true), NSObject._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, NSObject arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id); -} - -void _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.fromFunction( - NativeCupertinoHttp lib, - void Function(NSObject, NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - NSObject._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true), - arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool.listener(NativeCupertinoHttp lib, - void Function(NSObject, NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - fn( - NSObject._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true), - arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2); -} - -bool _ObjCBlock_bool_ObjCObject_ObjCObject_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = ++_ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistryIndex; - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_bool_ObjCObject_ObjCObject_bool extends _ObjCBlockBase { - ObjCBlock_bool_ObjCObject_ObjCObject_bool._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ObjCObject_bool.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ObjCObject_ObjCObject_bool.fromFunction( - NativeCupertinoHttp lib, - bool Function(NSObject, NSObject, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_ObjCObject_ObjCObject_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, lib, retain: true, release: true), NSObject._(arg1, lib, retain: true, release: true), arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2); -} - -final class NSFastEnumerationState extends ffi.Struct { - @ffi.UnsignedLong() - external int state; - - external ffi.Pointer> itemsPtr; - - external ffi.Pointer mutationsPtr; - - @ffi.Array.multi([5]) - external ffi.Array extra; -} - -ffi.Pointer - _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, NSErrorUserInfoKey)>()(arg0, arg1); -final _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureRegistry = Function( - ffi.Pointer, NSErrorUserInfoKey)>{}; -int _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_registerClosure( - ffi.Pointer Function( - ffi.Pointer, NSErrorUserInfoKey) - fn) { - final id = - ++_ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureRegistryIndex; - _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1) => - _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey extends _ObjCBlockBase { - ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, NSErrorUserInfoKey arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSErrorUserInfoKey)>( - _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey.fromFunction( - NativeCupertinoHttp lib, - NSObject? Function(NSError, DartNSErrorUserInfoKey) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSErrorUserInfoKey)>( - _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_closureTrampoline) - .cast(), - _ObjCBlock_ObjCObject_NSError_NSErrorUserInfoKey_registerClosure( - (ffi.Pointer arg0, NSErrorUserInfoKey arg1) => - fn(NSError._(arg0, lib, retain: true, release: true), NSString._(arg1, lib, retain: true, release: true)) - ?._retainAndReturnId() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - NSObject? call(NSError arg0, DartNSErrorUserInfoKey arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSErrorUserInfoKey arg1)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, NSErrorUserInfoKey)>() - (_id, arg0._id, arg1._id) - .address == - 0 - ? null - : NSObject._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, NSErrorUserInfoKey arg1)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, NSErrorUserInfoKey)>()(_id, arg0._id, arg1._id), - _lib, - retain: false, - release: true); -} - -typedef NSErrorUserInfoKey = ffi.Pointer; -typedef DartNSErrorUserInfoKey = NSString; - -/// Working with Bookmarks and alias (bookmark) files -abstract class NSURLBookmarkCreationOptions { - /// This option does nothing and has no effect on bookmark resolution - static const int NSURLBookmarkCreationPreferFileIDResolution = 256; - - /// creates bookmark data with "less" information, which may be smaller but still be able to resolve in certain ways - static const int NSURLBookmarkCreationMinimalBookmark = 512; - - /// include the properties required by writeBookmarkData:toURL:options: in the bookmark data created - static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; - - /// include information in the bookmark data which allows the same sandboxed process to access the resource after being relaunched - static const int NSURLBookmarkCreationWithSecurityScope = 2048; - - /// if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted - static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; - - /// Disable automatic embedding of an implicit security scope. The resolving process will not be able gain access to the resource by security scope, either implicitly or explicitly, through the returned URL. Not applicable to security-scoped bookmarks. - static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = - 536870912; -} - -abstract class NSURLBookmarkResolutionOptions { - /// don't perform any user interaction during bookmark resolution - static const int NSURLBookmarkResolutionWithoutUI = 256; - - /// don't mount a volume during bookmark resolution - static const int NSURLBookmarkResolutionWithoutMounting = 512; - - /// use the secure information included at creation time to provide the ability to access the resource in a sandboxed process - static const int NSURLBookmarkResolutionWithSecurityScope = 1024; - - /// Disable implicitly starting access of the ephemeral security-scoped resource during resolution. Instead, call `-[NSURL startAccessingSecurityScopedResource]` on the returned URL when ready to use the resource. Not applicable to security-scoped bookmarks. - static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; -} - -typedef NSURLBookmarkFileCreationOptions = NSUInteger; - -class NSURLHandle extends NSObject { - NSURLHandle._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLHandle] that points to the same underlying object as [other]. - static NSURLHandle castFrom(T other) { - return NSURLHandle._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURLHandle] that wraps the given raw object pointer. - static NSURLHandle castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLHandle._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLHandle]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLHandle1); - } - - static void registerURLHandleClass_( - NativeCupertinoHttp _lib, NSObject anURLHandleSubclass) { - _lib._objc_msgSend_210(_lib._class_NSURLHandle1, - _lib._sel_registerURLHandleClass_1, anURLHandleSubclass._id); - } - - static NSObject URLHandleClassForURL_(NativeCupertinoHttp _lib, NSURL anURL) { - final _ret = _lib._objc_msgSend_211( - _lib._class_NSURLHandle1, _lib._sel_URLHandleClassForURL_1, anURL._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - int status() { - return _lib._objc_msgSend_212(_id, _lib._sel_status1); - } - - NSString failureReason() { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_failureReason1); - return NSString._(_ret, _lib, retain: true, release: true); - } - - void addClient_(NSObject client) { - _lib._objc_msgSend_210(_id, _lib._sel_addClient_1, client._id); - } - - void removeClient_(NSObject client) { - _lib._objc_msgSend_210(_id, _lib._sel_removeClient_1, client._id); - } - - void loadInBackground() { - _lib._objc_msgSend_1(_id, _lib._sel_loadInBackground1); - } - - void cancelLoadInBackground() { - _lib._objc_msgSend_1(_id, _lib._sel_cancelLoadInBackground1); - } - - NSData resourceData() { - final _ret = _lib._objc_msgSend_54(_id, _lib._sel_resourceData1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - NSData availableResourceData() { - final _ret = _lib._objc_msgSend_54(_id, _lib._sel_availableResourceData1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - int expectedResourceDataSize() { - return _lib._objc_msgSend_87(_id, _lib._sel_expectedResourceDataSize1); - } - - void flushCachedData() { - _lib._objc_msgSend_1(_id, _lib._sel_flushCachedData1); - } - - void backgroundLoadDidFailWithReason_(NSString reason) { - _lib._objc_msgSend_195( - _id, _lib._sel_backgroundLoadDidFailWithReason_1, reason._id); - } - - void didLoadBytes_loadComplete_(NSData newBytes, bool yorn) { - _lib._objc_msgSend_213( - _id, _lib._sel_didLoadBytes_loadComplete_1, newBytes._id, yorn); - } - - static bool canInitWithURL_(NativeCupertinoHttp _lib, NSURL anURL) { - return _lib._objc_msgSend_214( - _lib._class_NSURLHandle1, _lib._sel_canInitWithURL_1, anURL._id); - } - - static NSURLHandle cachedHandleForURL_( - NativeCupertinoHttp _lib, NSURL anURL) { - final _ret = _lib._objc_msgSend_215( - _lib._class_NSURLHandle1, _lib._sel_cachedHandleForURL_1, anURL._id); - return NSURLHandle._(_ret, _lib, retain: true, release: true); - } - - NSObject initWithURL_cached_(NSURL anURL, bool willCache) { - final _ret = _lib._objc_msgSend_216( - _id, _lib._sel_initWithURL_cached_1, anURL._id, willCache); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject propertyForKey_(NSString propertyKey) { - final _ret = - _lib._objc_msgSend_42(_id, _lib._sel_propertyForKey_1, propertyKey._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSObject propertyForKeyIfAvailable_(NSString propertyKey) { - final _ret = _lib._objc_msgSend_42( - _id, _lib._sel_propertyForKeyIfAvailable_1, propertyKey._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - bool writeProperty_forKey_(NSObject propertyValue, NSString propertyKey) { - return _lib._objc_msgSend_209(_id, _lib._sel_writeProperty_forKey_1, - propertyValue._id, propertyKey._id); - } - - bool writeData_(NSData data) { - return _lib._objc_msgSend_35(_id, _lib._sel_writeData_1, data._id); - } - - NSData loadInForeground() { - final _ret = _lib._objc_msgSend_54(_id, _lib._sel_loadInForeground1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - void beginLoadInBackground() { - _lib._objc_msgSend_1(_id, _lib._sel_beginLoadInBackground1); - } - - void endLoadInBackground() { - _lib._objc_msgSend_1(_id, _lib._sel_endLoadInBackground1); - } - - @override - NSURLHandle init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLHandle._(_ret, _lib, retain: true, release: true); - } - - static NSURLHandle new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_new1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } - - static NSURLHandle allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLHandle1, _lib._sel_allocWithZone_1, zone); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } - - static NSURLHandle alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLHandle1, _lib._sel_alloc1); - return NSURLHandle._(_ret, _lib, retain: false, release: true); - } -} - -abstract class NSURLHandleStatus { - static const int NSURLHandleNotLoaded = 0; - static const int NSURLHandleLoadSucceeded = 1; - static const int NSURLHandleLoadInProgress = 2; - static const int NSURLHandleLoadFailed = 3; -} - -abstract class NSDataWritingOptions { - /// Hint to use auxiliary file when saving; equivalent to atomically:YES - static const int NSDataWritingAtomic = 1; - - /// Hint to prevent overwriting an existing file. Cannot be combined with NSDataWritingAtomic. - static const int NSDataWritingWithoutOverwriting = 2; - static const int NSDataWritingFileProtectionNone = 268435456; - static const int NSDataWritingFileProtectionComplete = 536870912; - static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; - static const int - NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = - 1073741824; - static const int NSDataWritingFileProtectionCompleteWhenUserInactive = - 1342177280; - static const int NSDataWritingFileProtectionMask = 4026531840; - - /// Deprecated name for NSDataWritingAtomic - static const int NSAtomicWrite = 1; -} - -/// Data Search Options -abstract class NSDataSearchOptions { - static const int NSDataSearchBackwards = 1; - static const int NSDataSearchAnchored = 2; -} - -void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, NSRange, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry = , NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - void Function(ffi.Pointer, NSRange, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunction(NativeCupertinoHttp lib, - void Function(ffi.Pointer, NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - (ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2) => - fn(arg0, arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.listener(NativeCupertinoHttp lib, - void Function(ffi.Pointer, NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - (ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2) => - fn(arg0, arg1, arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, NSRange, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(ffi.Pointer arg0, NSRange arg1, - ffi.Pointer arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - NSRange, ffi.Pointer)>()(_id, arg0, arg1, arg2); -} - -/// Read/Write Options -abstract class NSDataReadingOptions { - /// Hint to map the file in if possible and safe - static const int NSDataReadingMappedIfSafe = 1; - - /// Hint to get the file not to be cached in the kernel - static const int NSDataReadingUncached = 2; - - /// Hint to map the file in if possible. This takes precedence over NSDataReadingMappedIfSafe if both are given. - static const int NSDataReadingMappedAlways = 8; - - /// Deprecated name for NSDataReadingMappedIfSafe - static const int NSDataReadingMapped = 1; - - /// Deprecated name for NSDataReadingMapped - static const int NSMappedRead = 1; - - /// Deprecated name for NSDataReadingUncached - static const int NSUncachedRead = 2; -} - -void _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction, int)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureRegistry = - , int)>{}; -int _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_registerClosure( - void Function(ffi.Pointer, int) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => - _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ffiVoid_NSUInteger extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoid_NSUInteger._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_NSUInteger.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, NSUInteger arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, NSUInteger)>( - _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_NSUInteger.fromFunction(NativeCupertinoHttp lib, - void Function(ffi.Pointer, DartNSUInteger) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, NSUInteger)>( - _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_registerClosure( - (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiVoid_NSUInteger.listener(NativeCupertinoHttp lib, - void Function(ffi.Pointer, DartNSUInteger) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, NSUInteger)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_registerClosure( - (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer, NSUInteger)>? - _dartFuncListenerTrampoline; - - void call(ffi.Pointer arg0, DartNSUInteger arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - int)>()(_id, arg0, arg1); -} - -abstract class NSDataBase64DecodingOptions { - /// Use the following option to modify the decoding algorithm so that it ignores unknown non-Base64 bytes, including line ending characters. - static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; -} - -/// Base 64 Options -abstract class NSDataBase64EncodingOptions { - /// Use zero or one of the following to control the maximum line length after which a line ending is inserted. No line endings are inserted by default. - static const int NSDataBase64Encoding64CharacterLineLength = 1; - static const int NSDataBase64Encoding76CharacterLineLength = 2; - - /// Use zero or more of the following to specify which kind of line ending is inserted. The default line ending is CR LF. - static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; - static const int NSDataBase64EncodingEndLineWithLineFeed = 32; -} - -/// Various algorithms provided for compression APIs. See NSData and NSMutableData. -abstract class NSDataCompressionAlgorithm { - /// LZFSE is the recommended compression algorithm if you don't have a specific reason to use another algorithm. Note that LZFSE is intended for use with Apple devices only. This algorithm generally compresses better than Zlib, but not as well as LZMA. It is generally slower than LZ4. - static const int NSDataCompressionAlgorithmLZFSE = 0; - - /// LZ4 is appropriate if compression speed is critical. LZ4 generally sacrifices compression ratio in order to achieve its greater speed. - /// This implementation of LZ4 makes a small modification to the standard format, which is described in greater detail in . - static const int NSDataCompressionAlgorithmLZ4 = 1; - - /// LZMA is appropriate if compression ratio is critical and memory usage and compression speed are not a factor. LZMA is an order of magnitude slower for both compression and decompression than other algorithms. It can also use a very large amount of memory, so if you need to compress large amounts of data on embedded devices with limited memory you should probably avoid LZMA. - /// Encoding uses LZMA level 6 only, but decompression works with any compression level. - static const int NSDataCompressionAlgorithmLZMA = 2; - - /// Zlib is appropriate if you want a good balance between compression speed and compression ratio, but only if you need interoperability with non-Apple platforms. Otherwise, LZFSE is generally a better choice than Zlib. - /// Encoding uses Zlib level 5 only, but decompression works with any compression level. It uses the raw DEFLATE format as described in IETF RFC 1951. - static const int NSDataCompressionAlgorithmZlib = 3; -} - -typedef UTF32Char = UInt32; -typedef UInt32 = ffi.UnsignedInt; -typedef DartUInt32 = int; - -abstract class NSStringEnumerationOptions { - static const int NSStringEnumerationByLines = 0; - static const int NSStringEnumerationByParagraphs = 1; - static const int NSStringEnumerationByComposedCharacterSequences = 2; - static const int NSStringEnumerationByWords = 3; - static const int NSStringEnumerationBySentences = 4; - static const int NSStringEnumerationByCaretPositions = 5; - static const int NSStringEnumerationByDeletionClusters = 6; - static const int NSStringEnumerationReverse = 256; - static const int NSStringEnumerationSubstringNotRequired = 512; - static const int NSStringEnumerationLocalized = 1024; -} - -void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - NSRange arg2, ffi.Pointer arg3)>>() - .asFunction< - void Function(ffi.Pointer, NSRange, NSRange, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); -final _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry = , NSRange, NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - void Function(ffi.Pointer, NSRange, NSRange, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3) => - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2, arg3); - -class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, NSRange arg1, - NSRange arg2, ffi.Pointer arg3)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunction( - NativeCupertinoHttp lib, - void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - (ffi.Pointer arg0, NSRange arg1, NSRange arg2, - ffi.Pointer arg3) => - fn(arg0.address == 0 ? null : NSString._(arg0, lib, retain: true, release: true), arg1, arg2, arg3))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.listener( - NativeCupertinoHttp lib, - void Function(NSString?, NSRange, NSRange, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - (ffi.Pointer arg0, NSRange arg1, NSRange arg2, - ffi.Pointer arg3) => - fn(arg0.address == 0 ? null : NSString._(arg0, lib, retain: true, release: true), arg1, arg2, arg3))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSString? arg0, NSRange arg1, NSRange arg2, - ffi.Pointer arg3) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSRange arg1, - NSRange arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - NSRange, - NSRange, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1, arg2, arg3); -} - -void _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSString_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_ffiVoid_NSString_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSString_bool._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_bool.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_bool.fromFunction(NativeCupertinoHttp lib, - void Function(NSString, ffi.Pointer) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSString._(arg0, lib, retain: true, release: true), - arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSString_bool.listener(NativeCupertinoHttp lib, - void Function(NSString, ffi.Pointer) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSString._(arg0, lib, retain: true, release: true), - arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSString arg0, ffi.Pointer arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1); -} - -typedef NSStringEncoding = NSUInteger; - -abstract class NSStringEncodingConversionOptions { - static const int NSStringEncodingConversionAllowLossy = 1; - static const int NSStringEncodingConversionExternalRepresentation = 2; -} - -typedef NSStringTransform = ffi.Pointer; -typedef DartNSStringTransform = NSString; -void _ObjCBlock_ffiVoid_unichar_NSUInteger_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction, int)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_unichar_NSUInteger_closureRegistry = - , int)>{}; -int _ObjCBlock_ffiVoid_unichar_NSUInteger_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_unichar_NSUInteger_registerClosure( - void Function(ffi.Pointer, int) fn) { - final id = ++_ObjCBlock_ffiVoid_unichar_NSUInteger_closureRegistryIndex; - _ObjCBlock_ffiVoid_unichar_NSUInteger_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_unichar_NSUInteger_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0, int arg1) => - _ObjCBlock_ffiVoid_unichar_NSUInteger_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_unichar_NSUInteger extends _ObjCBlockBase { - ObjCBlock_ffiVoid_unichar_NSUInteger._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_unichar_NSUInteger.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, NSUInteger arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, NSUInteger)>( - _ObjCBlock_ffiVoid_unichar_NSUInteger_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_unichar_NSUInteger.fromFunction(NativeCupertinoHttp lib, - void Function(ffi.Pointer, DartNSUInteger) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, NSUInteger)>( - _ObjCBlock_ffiVoid_unichar_NSUInteger_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_unichar_NSUInteger_registerClosure( - (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_unichar_NSUInteger.listener(NativeCupertinoHttp lib, - void Function(ffi.Pointer, DartNSUInteger) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer, NSUInteger)>.listener( - _ObjCBlock_ffiVoid_unichar_NSUInteger_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_unichar_NSUInteger_registerClosure( - (ffi.Pointer arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer, NSUInteger)>? - _dartFuncListenerTrampoline; - - void call(ffi.Pointer arg0, DartNSUInteger arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, NSUInteger arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - int)>()(_id, arg0, arg1); -} - -typedef va_list = __builtin_va_list; -typedef __builtin_va_list = ffi.Pointer; - -abstract class NSQualityOfService { - static const int NSQualityOfServiceUserInteractive = 33; - static const int NSQualityOfServiceUserInitiated = 25; - static const int NSQualityOfServiceUtility = 17; - static const int NSQualityOfServiceBackground = 9; - static const int NSQualityOfServiceDefault = -1; -} - -abstract class ptrauth_key { - static const int ptrauth_key_none = -1; - static const int ptrauth_key_asia = 0; - static const int ptrauth_key_asib = 1; - static const int ptrauth_key_asda = 2; - static const int ptrauth_key_asdb = 3; - static const int ptrauth_key_process_independent_code = 0; - static const int ptrauth_key_process_dependent_code = 1; - static const int ptrauth_key_process_independent_data = 2; - static const int ptrauth_key_process_dependent_data = 3; - static const int ptrauth_key_function_pointer = 0; - static const int ptrauth_key_return_address = 1; - static const int ptrauth_key_frame_pointer = 3; - static const int ptrauth_key_block_function = 0; - static const int ptrauth_key_cxx_vtable_pointer = 2; - static const int ptrauth_key_method_list_pointer = 2; - static const int ptrauth_key_objc_isa_pointer = 2; - static const int ptrauth_key_objc_super_pointer = 2; - static const int ptrauth_key_block_descriptor_pointer = 2; - static const int ptrauth_key_objc_sel_pointer = 3; - static const int ptrauth_key_objc_class_ro_pointer = 2; -} - -@ffi.Packed(2) -final class wide extends ffi.Struct { - @UInt32() - external int lo; - - @SInt32() - external int hi; -} - -typedef SInt32 = ffi.Int; -typedef DartSInt32 = int; - -@ffi.Packed(2) -final class UnsignedWide extends ffi.Struct { - @UInt32() - external int lo; - - @UInt32() - external int hi; -} - -final class Float80 extends ffi.Struct { - @SInt16() - external int exp; - - @ffi.Array.multi([4]) - external ffi.Array man; -} - -typedef SInt16 = ffi.Short; -typedef DartSInt16 = int; -typedef UInt16 = ffi.UnsignedShort; -typedef DartUInt16 = int; - -final class Float96 extends ffi.Struct { - @ffi.Array.multi([2]) - external ffi.Array exp; - - @ffi.Array.multi([4]) - external ffi.Array man; -} - -@ffi.Packed(2) -final class Float32Point extends ffi.Struct { - @Float32() - external double x; - - @Float32() - external double y; -} - -typedef Float32 = ffi.Float; -typedef DartFloat32 = double; - -@ffi.Packed(2) -final class ProcessSerialNumber extends ffi.Struct { - @UInt32() - external int highLongOfPSN; - - @UInt32() - external int lowLongOfPSN; -} - -final class Point extends ffi.Struct { - @ffi.Short() - external int v; - - @ffi.Short() - external int h; -} - -final class Rect extends ffi.Struct { - @ffi.Short() - external int top; - - @ffi.Short() - external int left; - - @ffi.Short() - external int bottom; - - @ffi.Short() - external int right; -} - -@ffi.Packed(2) -final class FixedPoint extends ffi.Struct { - @Fixed() - external int x; - - @Fixed() - external int y; -} - -typedef Fixed = SInt32; - -@ffi.Packed(2) -final class FixedRect extends ffi.Struct { - @Fixed() - external int left; - - @Fixed() - external int top; - - @Fixed() - external int right; - - @Fixed() - external int bottom; -} - -final class TimeBaseRecord extends ffi.Opaque {} - -@ffi.Packed(2) -final class TimeRecord extends ffi.Struct { - external CompTimeValue value; - - @TimeScale() - external int scale; - - external TimeBase base; -} - -typedef CompTimeValue = wide; -typedef TimeScale = SInt32; -typedef TimeBase = ffi.Pointer; - -final class NumVersion extends ffi.Struct { - @UInt8() - external int nonRelRev; - - @UInt8() - external int stage; - - @UInt8() - external int minorAndBugRev; - - @UInt8() - external int majorRev; -} - -typedef UInt8 = ffi.UnsignedChar; -typedef DartUInt8 = int; - -final class NumVersionVariant extends ffi.Union { - external NumVersion parts; - - @UInt32() - external int whole; -} - -final class VersRec extends ffi.Struct { - external NumVersion numericVersion; - - @ffi.Short() - external int countryCode; - - @ffi.Array.multi([256]) - external ffi.Array shortVersion; - - @ffi.Array.multi([256]) - external ffi.Array reserved; -} - -typedef ConstStr255Param = ffi.Pointer; - -final class __CFString extends ffi.Opaque {} - -abstract class CFComparisonResult { - static const int kCFCompareLessThan = -1; - static const int kCFCompareEqualTo = 0; - static const int kCFCompareGreaterThan = 1; -} - -typedef CFIndex = ffi.Long; -typedef DartCFIndex = int; - -final class CFRange extends ffi.Struct { - @CFIndex() - external int location; - - @CFIndex() - external int length; -} - -final class __CFNull extends ffi.Opaque {} - -typedef CFTypeID = ffi.UnsignedLong; -typedef DartCFTypeID = int; -typedef CFNullRef = ffi.Pointer<__CFNull>; - -final class __CFAllocator extends ffi.Opaque {} - -typedef CFAllocatorRef = ffi.Pointer<__CFAllocator>; - -final class CFAllocatorContext extends ffi.Struct { - @CFIndex() - external int version; - - external ffi.Pointer info; - - external CFAllocatorRetainCallBack retain; - - external CFAllocatorReleaseCallBack release; - - external CFAllocatorCopyDescriptionCallBack copyDescription; - - external CFAllocatorAllocateCallBack allocate; - - external CFAllocatorReallocateCallBack reallocate; - - external CFAllocatorDeallocateCallBack deallocate; - - external CFAllocatorPreferredSizeCallBack preferredSize; -} - -typedef CFAllocatorRetainCallBack - = ffi.Pointer>; -typedef CFAllocatorRetainCallBackFunction = ffi.Pointer Function( - ffi.Pointer info); -typedef CFAllocatorReleaseCallBack - = ffi.Pointer>; -typedef CFAllocatorReleaseCallBackFunction = ffi.Void Function( - ffi.Pointer info); -typedef DartCFAllocatorReleaseCallBackFunction = void Function( - ffi.Pointer info); -typedef CFAllocatorCopyDescriptionCallBack = ffi - .Pointer>; -typedef CFAllocatorCopyDescriptionCallBackFunction = CFStringRef Function( - ffi.Pointer info); -typedef CFStringRef = ffi.Pointer<__CFString>; -typedef CFAllocatorAllocateCallBack - = ffi.Pointer>; -typedef CFAllocatorAllocateCallBackFunction = ffi.Pointer Function( - CFIndex allocSize, CFOptionFlags hint, ffi.Pointer info); -typedef DartCFAllocatorAllocateCallBackFunction - = ffi.Pointer Function(DartCFIndex allocSize, - DartCFOptionFlags hint, ffi.Pointer info); -typedef CFOptionFlags = ffi.UnsignedLong; -typedef DartCFOptionFlags = int; -typedef CFAllocatorReallocateCallBack - = ffi.Pointer>; -typedef CFAllocatorReallocateCallBackFunction = ffi.Pointer Function( - ffi.Pointer ptr, - CFIndex newsize, - CFOptionFlags hint, - ffi.Pointer info); -typedef DartCFAllocatorReallocateCallBackFunction - = ffi.Pointer Function( - ffi.Pointer ptr, - DartCFIndex newsize, - DartCFOptionFlags hint, - ffi.Pointer info); -typedef CFAllocatorDeallocateCallBack - = ffi.Pointer>; -typedef CFAllocatorDeallocateCallBackFunction = ffi.Void Function( - ffi.Pointer ptr, ffi.Pointer info); -typedef DartCFAllocatorDeallocateCallBackFunction = void Function( - ffi.Pointer ptr, ffi.Pointer info); -typedef CFAllocatorPreferredSizeCallBack - = ffi.Pointer>; -typedef CFAllocatorPreferredSizeCallBackFunction = CFIndex Function( - CFIndex size, CFOptionFlags hint, ffi.Pointer info); -typedef DartCFAllocatorPreferredSizeCallBackFunction = DartCFIndex Function( - DartCFIndex size, DartCFOptionFlags hint, ffi.Pointer info); -typedef CFTypeRef = ffi.Pointer; -typedef Boolean = ffi.UnsignedChar; -typedef DartBoolean = int; -typedef CFHashCode = ffi.UnsignedLong; -typedef DartCFHashCode = int; -typedef NSZone = _NSZone; - -class NSMutableIndexSet extends NSIndexSet { - NSMutableIndexSet._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableIndexSet] that points to the same underlying object as [other]. - static NSMutableIndexSet castFrom(T other) { - return NSMutableIndexSet._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSMutableIndexSet] that wraps the given raw object pointer. - static NSMutableIndexSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableIndexSet._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableIndexSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableIndexSet1); - } - - void addIndexes_(NSIndexSet indexSet) { - _lib._objc_msgSend_302(_id, _lib._sel_addIndexes_1, indexSet._id); - } - - void removeIndexes_(NSIndexSet indexSet) { - _lib._objc_msgSend_302(_id, _lib._sel_removeIndexes_1, indexSet._id); - } - - void removeAllIndexes() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllIndexes1); - } - - void addIndex_(DartNSUInteger value) { - _lib._objc_msgSend_303(_id, _lib._sel_addIndex_1, value); - } - - void removeIndex_(DartNSUInteger value) { - _lib._objc_msgSend_303(_id, _lib._sel_removeIndex_1, value); - } - - void addIndexesInRange_(NSRange range) { - _lib._objc_msgSend_304(_id, _lib._sel_addIndexesInRange_1, range); - } - - void removeIndexesInRange_(NSRange range) { - _lib._objc_msgSend_304(_id, _lib._sel_removeIndexesInRange_1, range); - } - - void shiftIndexesStartingAtIndex_by_( - DartNSUInteger index, DartNSInteger delta) { - _lib._objc_msgSend_305( - _id, _lib._sel_shiftIndexesStartingAtIndex_by_1, index, delta); - } - - static NSMutableIndexSet indexSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableIndexSet1, _lib._sel_indexSet1); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableIndexSet indexSetWithIndex_( - NativeCupertinoHttp _lib, DartNSUInteger value) { - final _ret = _lib._objc_msgSend_99( - _lib._class_NSMutableIndexSet1, _lib._sel_indexSetWithIndex_1, value); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableIndexSet indexSetWithIndexesInRange_( - NativeCupertinoHttp _lib, NSRange range) { - final _ret = _lib._objc_msgSend_116(_lib._class_NSMutableIndexSet1, - _lib._sel_indexSetWithIndexesInRange_1, range); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableIndexSet initWithIndexesInRange_(NSRange range) { - final _ret = - _lib._objc_msgSend_116(_id, _lib._sel_initWithIndexesInRange_1, range); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableIndexSet initWithIndexSet_(NSIndexSet indexSet) { - final _ret = - _lib._objc_msgSend_117(_id, _lib._sel_initWithIndexSet_1, indexSet._id); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableIndexSet initWithIndex_(DartNSUInteger value) { - final _ret = _lib._objc_msgSend_99(_id, _lib._sel_initWithIndex_1, value); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableIndexSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableIndexSet._(_ret, _lib, retain: true, release: true); - } - - static NSMutableIndexSet new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_new1); - return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableIndexSet allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableIndexSet1, _lib._sel_allocWithZone_1, zone); - return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); - } - - static NSMutableIndexSet alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableIndexSet1, _lib._sel_alloc1); - return NSMutableIndexSet._(_ret, _lib, retain: false, release: true); - } -} - -/// Mutable Array -class NSMutableArray extends NSArray { - NSMutableArray._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableArray] that points to the same underlying object as [other]. - static NSMutableArray castFrom(T other) { - return NSMutableArray._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSMutableArray] that wraps the given raw object pointer. - static NSMutableArray castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableArray._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableArray]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableArray1); - } - - void addObject_(NSObject anObject) { - _lib._objc_msgSend_210(_id, _lib._sel_addObject_1, anObject._id); - } - - void insertObject_atIndex_(NSObject anObject, DartNSUInteger index) { - _lib._objc_msgSend_306( - _id, _lib._sel_insertObject_atIndex_1, anObject._id, index); - } - - void removeLastObject() { - _lib._objc_msgSend_1(_id, _lib._sel_removeLastObject1); - } - - void removeObjectAtIndex_(DartNSUInteger index) { - _lib._objc_msgSend_303(_id, _lib._sel_removeObjectAtIndex_1, index); - } - - void replaceObjectAtIndex_withObject_( - DartNSUInteger index, NSObject anObject) { - _lib._objc_msgSend_307( - _id, _lib._sel_replaceObjectAtIndex_withObject_1, index, anObject._id); - } - - @override - NSMutableArray init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableArray initWithCapacity_(DartNSUInteger numItems) { - final _ret = - _lib._objc_msgSend_99(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableArray? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - void addObjectsFromArray_(NSArray otherArray) { - _lib._objc_msgSend_308( - _id, _lib._sel_addObjectsFromArray_1, otherArray._id); - } - - void exchangeObjectAtIndex_withObjectAtIndex_( - DartNSUInteger idx1, DartNSUInteger idx2) { - _lib._objc_msgSend_309( - _id, _lib._sel_exchangeObjectAtIndex_withObjectAtIndex_1, idx1, idx2); - } - - void removeAllObjects() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } - - void removeObject_inRange_(NSObject anObject, NSRange range) { - _lib._objc_msgSend_310( - _id, _lib._sel_removeObject_inRange_1, anObject._id, range); - } - - void removeObject_(NSObject anObject) { - _lib._objc_msgSend_210(_id, _lib._sel_removeObject_1, anObject._id); - } - - void removeObjectIdenticalTo_inRange_(NSObject anObject, NSRange range) { - _lib._objc_msgSend_310( - _id, _lib._sel_removeObjectIdenticalTo_inRange_1, anObject._id, range); - } - - void removeObjectIdenticalTo_(NSObject anObject) { - _lib._objc_msgSend_210( - _id, _lib._sel_removeObjectIdenticalTo_1, anObject._id); - } - - void removeObjectsFromIndices_numIndices_( - ffi.Pointer indices, DartNSUInteger cnt) { - _lib._objc_msgSend_311( - _id, _lib._sel_removeObjectsFromIndices_numIndices_1, indices, cnt); - } - - void removeObjectsInArray_(NSArray otherArray) { - _lib._objc_msgSend_308( - _id, _lib._sel_removeObjectsInArray_1, otherArray._id); - } - - void removeObjectsInRange_(NSRange range) { - _lib._objc_msgSend_304(_id, _lib._sel_removeObjectsInRange_1, range); - } - - void replaceObjectsInRange_withObjectsFromArray_range_( - NSRange range, NSArray otherArray, NSRange otherRange) { - _lib._objc_msgSend_312( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_range_1, - range, - otherArray._id, - otherRange); - } - - void replaceObjectsInRange_withObjectsFromArray_( - NSRange range, NSArray otherArray) { - _lib._objc_msgSend_313( - _id, - _lib._sel_replaceObjectsInRange_withObjectsFromArray_1, - range, - otherArray._id); - } - - void setArray_(NSArray otherArray) { - _lib._objc_msgSend_308(_id, _lib._sel_setArray_1, otherArray._id); - } - - void sortUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context) { - _lib._objc_msgSend_314( - _id, _lib._sel_sortUsingFunction_context_1, compare, context); - } - - void sortUsingSelector_(ffi.Pointer comparator) { - _lib._objc_msgSend_7(_id, _lib._sel_sortUsingSelector_1, comparator); - } - - void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { - _lib._objc_msgSend_315( - _id, _lib._sel_insertObjects_atIndexes_1, objects._id, indexes._id); - } - - void removeObjectsAtIndexes_(NSIndexSet indexes) { - _lib._objc_msgSend_302( - _id, _lib._sel_removeObjectsAtIndexes_1, indexes._id); - } - - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet indexes, NSArray objects) { - _lib._objc_msgSend_316(_id, _lib._sel_replaceObjectsAtIndexes_withObjects_1, - indexes._id, objects._id); - } - - void setObject_atIndexedSubscript_(NSObject obj, DartNSUInteger idx) { - _lib._objc_msgSend_306( - _id, _lib._sel_setObject_atIndexedSubscript_1, obj._id, idx); - } - - void sortUsingComparator_(DartNSComparator cmptr) { - _lib._objc_msgSend_317(_id, _lib._sel_sortUsingComparator_1, cmptr._id); - } - - void sortWithOptions_usingComparator_(int opts, DartNSComparator cmptr) { - _lib._objc_msgSend_318( - _id, _lib._sel_sortWithOptions_usingComparator_1, opts, cmptr._id); - } - - static NSMutableArray arrayWithCapacity_( - NativeCupertinoHttp _lib, DartNSUInteger numItems) { - final _ret = _lib._objc_msgSend_99( - _lib._class_NSMutableArray1, _lib._sel_arrayWithCapacity_1, numItems); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray? arrayWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_319(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray? arrayWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_320(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableArray? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_319( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - NSMutableArray? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_320(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - void applyDifference_(NSOrderedCollectionDifference difference) { - _lib._objc_msgSend_321(_id, _lib._sel_applyDifference_1, difference._id); - } - - @override - NSMutableArray initWithObjects_count_( - ffi.Pointer> objects, DartNSUInteger cnt) { - final _ret = _lib._objc_msgSend_100( - _id, _lib._sel_initWithObjects_count_1, objects, cnt); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray array(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_array1); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray arrayWithObject_( - NativeCupertinoHttp _lib, NSObject anObject) { - final _ret = _lib._objc_msgSend_149( - _lib._class_NSMutableArray1, _lib._sel_arrayWithObject_1, anObject._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray arrayWithObjects_count_(NativeCupertinoHttp _lib, - ffi.Pointer> objects, DartNSUInteger cnt) { - final _ret = _lib._objc_msgSend_100(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_count_1, objects, cnt); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray arrayWithObjects_( - NativeCupertinoHttp _lib, NSObject firstObj) { - final _ret = _lib._objc_msgSend_149(_lib._class_NSMutableArray1, - _lib._sel_arrayWithObjects_1, firstObj._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray arrayWithArray_( - NativeCupertinoHttp _lib, NSArray array) { - final _ret = _lib._objc_msgSend_150( - _lib._class_NSMutableArray1, _lib._sel_arrayWithArray_1, array._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableArray initWithObjects_(NSObject firstObj) { - final _ret = - _lib._objc_msgSend_149(_id, _lib._sel_initWithObjects_1, firstObj._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableArray initWithArray_(NSArray array) { - final _ret = - _lib._objc_msgSend_150(_id, _lib._sel_initWithArray_1, array._id); - return NSMutableArray._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableArray initWithArray_copyItems_(NSArray array, bool flag) { - final _ret = _lib._objc_msgSend_151( - _id, _lib._sel_initWithArray_copyItems_1, array._id, flag); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } - - /// Reads array stored in NSPropertyList format from the specified url. - static NSArray? arrayWithContentsOfURL_error_(NativeCupertinoHttp _lib, - NSURL url, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_152(_lib._class_NSMutableArray1, - _lib._sel_arrayWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } - - static NSMutableArray new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_new1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } - - static NSMutableArray allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableArray1, _lib._sel_allocWithZone_1, zone); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } - - static NSMutableArray alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableArray1, _lib._sel_alloc1); - return NSMutableArray._(_ret, _lib, retain: false, release: true); - } -} - -/// Mutable Data -class NSMutableData extends NSData { - NSMutableData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableData] that points to the same underlying object as [other]. - static NSMutableData castFrom(T other) { - return NSMutableData._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSMutableData] that wraps the given raw object pointer. - static NSMutableData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableData._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSMutableData1); - } - - ffi.Pointer get mutableBytes { - return _lib._objc_msgSend_31(_id, _lib._sel_mutableBytes1); - } - - @override - DartNSUInteger get length { - return _lib._objc_msgSend_12(_id, _lib._sel_length1); - } - - set length(DartNSUInteger value) { - return _lib._objc_msgSend_322(_id, _lib._sel_setLength_1, value); - } - - void appendBytes_length_(ffi.Pointer bytes, DartNSUInteger length) { - _lib._objc_msgSend_33(_id, _lib._sel_appendBytes_length_1, bytes, length); - } - - void appendData_(NSData other) { - _lib._objc_msgSend_323(_id, _lib._sel_appendData_1, other._id); - } - - void increaseLengthBy_(DartNSUInteger extraLength) { - _lib._objc_msgSend_303(_id, _lib._sel_increaseLengthBy_1, extraLength); - } - - void replaceBytesInRange_withBytes_( - NSRange range, ffi.Pointer bytes) { - _lib._objc_msgSend_324( - _id, _lib._sel_replaceBytesInRange_withBytes_1, range, bytes); - } - - void resetBytesInRange_(NSRange range) { - _lib._objc_msgSend_304(_id, _lib._sel_resetBytesInRange_1, range); - } - - void setData_(NSData data) { - _lib._objc_msgSend_323(_id, _lib._sel_setData_1, data._id); - } - - void replaceBytesInRange_withBytes_length_( - NSRange range, - ffi.Pointer replacementBytes, - DartNSUInteger replacementLength) { - _lib._objc_msgSend_325( - _id, - _lib._sel_replaceBytesInRange_withBytes_length_1, - range, - replacementBytes, - replacementLength); - } - - static NSMutableData? dataWithCapacity_( - NativeCupertinoHttp _lib, DartNSUInteger aNumItems) { - final _ret = _lib._objc_msgSend_326( - _lib._class_NSMutableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData? dataWithLength_( - NativeCupertinoHttp _lib, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_326( - _lib._class_NSMutableData1, _lib._sel_dataWithLength_1, length); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - NSMutableData? initWithCapacity_(DartNSUInteger capacity) { - final _ret = - _lib._objc_msgSend_326(_id, _lib._sel_initWithCapacity_1, capacity); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - NSMutableData? initWithLength_(DartNSUInteger length) { - final _ret = - _lib._objc_msgSend_326(_id, _lib._sel_initWithLength_1, length); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - /// These methods compress or decompress the receiver's contents in-place using the specified algorithm. If the operation is not successful, these methods leave the receiver unchanged.. - bool decompressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_327( - _id, _lib._sel_decompressUsingAlgorithm_error_1, algorithm, error); - } - - bool compressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _lib._objc_msgSend_327( - _id, _lib._sel_compressUsingAlgorithm_error_1, algorithm, error); - } - - static NSMutableData data(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_data1); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData dataWithBytes_length_(NativeCupertinoHttp _lib, - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_222(_lib._class_NSMutableData1, - _lib._sel_dataWithBytes_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData dataWithBytesNoCopy_length_(NativeCupertinoHttp _lib, - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_222(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - DartNSUInteger length, - bool b) { - final _ret = _lib._objc_msgSend_223(_lib._class_NSMutableData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static NSMutableData? dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_224( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_225( - _lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_226( - _lib._class_NSMutableData1, _lib._sel_dataWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData initWithBytes_length_( - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_222( - _id, _lib._sel_initWithBytes_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_( - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_222( - _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, DartNSUInteger length, bool b) { - final _ret = _lib._objc_msgSend_223(_id, - _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_deallocator_( - ffi.Pointer bytes, - DartNSUInteger length, - ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { - final _ret = _lib._objc_msgSend_227( - _id, - _lib._sel_initWithBytesNoCopy_length_deallocator_1, - bytes, - length, - deallocator?._id ?? ffi.nullptr); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableData? initWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_224( - _id, - _lib._sel_initWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfURL_options_error_(NSURL url, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_225( - _id, - _lib._sel_initWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_49( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_226(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_228(_id, _lib._sel_initWithData_1, data._id); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData dataWithData_(NativeCupertinoHttp _lib, NSData data) { - final _ret = _lib._objc_msgSend_228( - _lib._class_NSMutableData1, _lib._sel_dataWithData_1, data._id); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. - @override - NSMutableData? initWithBase64EncodedString_options_( - NSString base64String, int options) { - final _ret = _lib._objc_msgSend_229( - _id, - _lib._sel_initWithBase64EncodedString_options_1, - base64String._id, - options); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. - @override - NSMutableData? initWithBase64EncodedData_options_( - NSData base64Data, int options) { - final _ret = _lib._objc_msgSend_231(_id, - _lib._sel_initWithBase64EncodedData_options_1, base64Data._id, options); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. - @override - NSMutableData? decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_233(_id, - _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData? compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_233( - _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSMutableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableData init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableData._(_ret, _lib, retain: true, release: true); - } - - static NSMutableData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_new1); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static NSMutableData allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableData1, _lib._sel_allocWithZone_1, zone); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } - - static NSMutableData alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableData1, _lib._sel_alloc1); - return NSMutableData._(_ret, _lib, retain: false, release: true); - } -} - -/// Purgeable Data -class NSPurgeableData extends NSMutableData { - NSPurgeableData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSPurgeableData] that points to the same underlying object as [other]. - static NSPurgeableData castFrom(T other) { - return NSPurgeableData._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSPurgeableData] that wraps the given raw object pointer. - static NSPurgeableData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPurgeableData._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSPurgeableData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSPurgeableData1); - } - - static NSPurgeableData? dataWithCapacity_( - NativeCupertinoHttp _lib, DartNSUInteger aNumItems) { - final _ret = _lib._objc_msgSend_326( - _lib._class_NSPurgeableData1, _lib._sel_dataWithCapacity_1, aNumItems); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - static NSPurgeableData? dataWithLength_( - NativeCupertinoHttp _lib, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_326( - _lib._class_NSPurgeableData1, _lib._sel_dataWithLength_1, length); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSPurgeableData? initWithCapacity_(DartNSUInteger capacity) { - final _ret = - _lib._objc_msgSend_326(_id, _lib._sel_initWithCapacity_1, capacity); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSPurgeableData? initWithLength_(DartNSUInteger length) { - final _ret = - _lib._objc_msgSend_326(_id, _lib._sel_initWithLength_1, length); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - static NSPurgeableData data(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_data1); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - static NSPurgeableData dataWithBytes_length_(NativeCupertinoHttp _lib, - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_222(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytes_length_1, bytes, length); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - static NSPurgeableData dataWithBytesNoCopy_length_(NativeCupertinoHttp _lib, - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_222(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytesNoCopy_length_1, bytes, length); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } - - static NSPurgeableData dataWithBytesNoCopy_length_freeWhenDone_( - NativeCupertinoHttp _lib, - ffi.Pointer bytes, - DartNSUInteger length, - bool b) { - final _ret = _lib._objc_msgSend_223(_lib._class_NSPurgeableData1, - _lib._sel_dataWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } - - static NSPurgeableData? dataWithContentsOfFile_options_error_( - NativeCupertinoHttp _lib, - NSString path, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_224( - _lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - static NSPurgeableData? dataWithContentsOfURL_options_error_( - NativeCupertinoHttp _lib, - NSURL url, - int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_225( - _lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - static NSPurgeableData? dataWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - static NSPurgeableData? dataWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_226(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSPurgeableData initWithBytes_length_( - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_222( - _id, _lib._sel_initWithBytes_length_1, bytes, length); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSPurgeableData initWithBytesNoCopy_length_( - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_222( - _id, _lib._sel_initWithBytesNoCopy_length_1, bytes, length); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } - - @override - NSPurgeableData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, DartNSUInteger length, bool b) { - final _ret = _lib._objc_msgSend_223(_id, - _lib._sel_initWithBytesNoCopy_length_freeWhenDone_1, bytes, length, b); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } - - @override - NSPurgeableData initWithBytesNoCopy_length_deallocator_( - ffi.Pointer bytes, - DartNSUInteger length, - ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { - final _ret = _lib._objc_msgSend_227( - _id, - _lib._sel_initWithBytesNoCopy_length_deallocator_1, - bytes, - length, - deallocator?._id ?? ffi.nullptr); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } - - @override - NSPurgeableData? initWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_224( - _id, - _lib._sel_initWithContentsOfFile_options_error_1, - path._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSPurgeableData? initWithContentsOfURL_options_error_(NSURL url, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _lib._objc_msgSend_225( - _id, - _lib._sel_initWithContentsOfURL_options_error_1, - url._id, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSPurgeableData? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_49( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSPurgeableData? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_226(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSPurgeableData initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_228(_id, _lib._sel_initWithData_1, data._id); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - static NSPurgeableData dataWithData_(NativeCupertinoHttp _lib, NSData data) { - final _ret = _lib._objc_msgSend_228( - _lib._class_NSPurgeableData1, _lib._sel_dataWithData_1, data._id); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - /// Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64. - @override - NSPurgeableData? initWithBase64EncodedString_options_( - NSString base64String, int options) { - final _ret = _lib._objc_msgSend_229( - _id, - _lib._sel_initWithBase64EncodedString_options_1, - base64String._id, - options); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - /// Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64. - @override - NSPurgeableData? initWithBase64EncodedData_options_( - NSData base64Data, int options) { - final _ret = _lib._objc_msgSend_231(_id, - _lib._sel_initWithBase64EncodedData_options_1, base64Data._id, options); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - /// These methods return a compressed or decompressed version of the receiver using the specified algorithm. - @override - NSPurgeableData? decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_233(_id, - _lib._sel_decompressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - @override - NSPurgeableData? compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_233( - _id, _lib._sel_compressedDataUsingAlgorithm_error_1, algorithm, error); - return _ret.address == 0 - ? null - : NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - static NSObject? dataWithContentsOfMappedFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSPurgeableData1, - _lib._sel_dataWithContentsOfMappedFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } - - @override - NSPurgeableData init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSPurgeableData._(_ret, _lib, retain: true, release: true); - } - - static NSPurgeableData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_new1); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } - - static NSPurgeableData allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSPurgeableData1, _lib._sel_allocWithZone_1, zone); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } - - static NSPurgeableData alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSPurgeableData1, _lib._sel_alloc1); - return NSPurgeableData._(_ret, _lib, retain: false, release: true); - } -} - -/// Mutable Dictionary -class NSMutableDictionary extends NSDictionary { - NSMutableDictionary._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. - static NSMutableDictionary castFrom(T other) { - return NSMutableDictionary._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. - static NSMutableDictionary castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableDictionary._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableDictionary]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableDictionary1); - } - - void removeObjectForKey_(NSObject aKey) { - _lib._objc_msgSend_210(_id, _lib._sel_removeObjectForKey_1, aKey._id); - } - - void setObject_forKey_(NSObject anObject, NSObject aKey) { - _lib._objc_msgSend_328( - _id, _lib._sel_setObject_forKey_1, anObject._id, aKey._id); - } - - @override - NSMutableDictionary init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - NSMutableDictionary initWithCapacity_(DartNSUInteger numItems) { - final _ret = - _lib._objc_msgSend_99(_id, _lib._sel_initWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - void addEntriesFromDictionary_(NSDictionary otherDictionary) { - _lib._objc_msgSend_329( - _id, _lib._sel_addEntriesFromDictionary_1, otherDictionary._id); - } - - void removeAllObjects() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllObjects1); - } - - void removeObjectsForKeys_(NSArray keyArray) { - _lib._objc_msgSend_308(_id, _lib._sel_removeObjectsForKeys_1, keyArray._id); - } - - void setDictionary_(NSDictionary otherDictionary) { - _lib._objc_msgSend_329(_id, _lib._sel_setDictionary_1, otherDictionary._id); - } - - void setObject_forKeyedSubscript_(NSObject? obj, NSObject key) { - _lib._objc_msgSend_330(_id, _lib._sel_setObject_forKeyedSubscript_1, - obj?._id ?? ffi.nullptr, key._id); - } - - static NSMutableDictionary dictionaryWithCapacity_( - NativeCupertinoHttp _lib, DartNSUInteger numItems) { - final _ret = _lib._objc_msgSend_99(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithCapacity_1, numItems); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary? dictionaryWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_331(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary? dictionaryWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_332(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - NSMutableDictionary? initWithContentsOfFile_(NSString path) { - final _ret = _lib._objc_msgSend_331( - _id, _lib._sel_initWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - NSMutableDictionary? initWithContentsOfURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_332(_id, _lib._sel_initWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - /// Create a mutable dictionary which is optimized for dealing with a known set of keys. - /// Keys that are not in the key set can still be set into the dictionary, but that usage is not optimal. - /// As with any dictionary, the keys must be copyable. - /// If keyset is nil, an exception is thrown. - /// If keyset is not an object returned by +sharedKeySetForKeys:, an exception is thrown. - static NSMutableDictionary dictionaryWithSharedKeySet_( - NativeCupertinoHttp _lib, NSObject keyset) { - final _ret = _lib._objc_msgSend_333(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithSharedKeySet_1, keyset._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - DartNSUInteger cnt) { - final _ret = _lib._objc_msgSend_98( - _id, _lib._sel_initWithObjects_forKeys_count_1, objects, keys, cnt); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionary(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_dictionary1); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObject_forKey_( - NativeCupertinoHttp _lib, NSObject object, NSObject key) { - final _ret = _lib._objc_msgSend_180(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObject_forKey_1, object._id, key._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjects_forKeys_count_( - NativeCupertinoHttp _lib, - ffi.Pointer> objects, - ffi.Pointer> keys, - DartNSUInteger cnt) { - final _ret = _lib._objc_msgSend_98(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_count_1, objects, keys, cnt); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjectsAndKeys_( - NativeCupertinoHttp _lib, NSObject firstObject) { - final _ret = _lib._objc_msgSend_149(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjectsAndKeys_1, firstObject._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithDictionary_( - NativeCupertinoHttp _lib, NSDictionary dict) { - final _ret = _lib._objc_msgSend_181(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithDictionary_1, dict._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjects_forKeys_( - NativeCupertinoHttp _lib, NSArray objects, NSArray keys) { - final _ret = _lib._objc_msgSend_182(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithObjects_forKeys_1, objects._id, keys._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _lib._objc_msgSend_149( - _id, _lib._sel_initWithObjectsAndKeys_1, firstObject._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary initWithDictionary_(NSDictionary otherDictionary) { - final _ret = _lib._objc_msgSend_181( - _id, _lib._sel_initWithDictionary_1, otherDictionary._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - @override - NSMutableDictionary initWithDictionary_copyItems_( - NSDictionary otherDictionary, bool flag) { - final _ret = _lib._objc_msgSend_183(_id, - _lib._sel_initWithDictionary_copyItems_1, otherDictionary._id, flag); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } - - @override - NSMutableDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { - final _ret = _lib._objc_msgSend_182( - _id, _lib._sel_initWithObjects_forKeys_1, objects._id, keys._id); - return NSMutableDictionary._(_ret, _lib, retain: true, release: true); - } - - /// Reads dictionary stored in NSPropertyList format from the specified url. - static NSDictionary? dictionaryWithContentsOfURL_error_( - NativeCupertinoHttp _lib, - NSURL url, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_184(_lib._class_NSMutableDictionary1, - _lib._sel_dictionaryWithContentsOfURL_error_1, url._id, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - /// Use this method to create a key set to pass to +dictionaryWithSharedKeySet:. - /// The keys are copied from the array and must be copyable. - /// If the array parameter is nil or not an NSArray, an exception is thrown. - /// If the array of keys is empty, an empty key set is returned. - /// The array of keys may contain duplicates, which are ignored (it is undefined which object of each duplicate pair is used). - /// As for any usage of hashing, is recommended that the keys have a well-distributed implementation of -hash, and the hash codes must satisfy the hash/isEqual: invariant. - /// Keys with duplicate hash codes are allowed, but will cause lower performance and increase memory usage. - static NSObject sharedKeySetForKeys_(NativeCupertinoHttp _lib, NSArray keys) { - final _ret = _lib._objc_msgSend_150(_lib._class_NSMutableDictionary1, - _lib._sel_sharedKeySetForKeys_1, keys._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - static NSMutableDictionary new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableDictionary1, _lib._sel_new1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } - - static NSMutableDictionary allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableDictionary1, _lib._sel_allocWithZone_1, zone); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } - - static NSMutableDictionary alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableDictionary1, _lib._sel_alloc1); - return NSMutableDictionary._(_ret, _lib, retain: false, release: true); - } -} - -/// ! -/// @enum NSURLCacheStoragePolicy -/// -/// @discussion The NSURLCacheStoragePolicy enum defines constants that -/// can be used to specify the type of storage that is allowable for an -/// NSCachedURLResponse object that is to be stored in an NSURLCache. -/// -/// @constant NSURLCacheStorageAllowed Specifies that storage in an -/// NSURLCache is allowed without restriction. -/// -/// @constant NSURLCacheStorageAllowedInMemoryOnly Specifies that -/// storage in an NSURLCache is allowed; however storage should be -/// done in memory only, no disk storage should be done. -/// -/// @constant NSURLCacheStorageNotAllowed Specifies that storage in an -/// NSURLCache is not allowed in any fashion, either in memory or on -/// disk. -abstract class NSURLCacheStoragePolicy { - static const int NSURLCacheStorageAllowed = 0; - static const int NSURLCacheStorageAllowedInMemoryOnly = 1; - static const int NSURLCacheStorageNotAllowed = 2; -} - -/// ! -/// @class NSCachedURLResponse -/// NSCachedURLResponse is a class whose objects functions as a wrapper for -/// objects that are stored in the framework's caching system. -/// It is used to maintain characteristics and attributes of a cached -/// object. -class NSCachedURLResponse extends NSObject { - NSCachedURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSCachedURLResponse] that points to the same underlying object as [other]. - static NSCachedURLResponse castFrom(T other) { - return NSCachedURLResponse._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSCachedURLResponse] that wraps the given raw object pointer. - static NSCachedURLResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCachedURLResponse._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCachedURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSCachedURLResponse1); - } - - /// ! - /// @method initWithResponse:data - /// @abstract Initializes an NSCachedURLResponse with the given - /// response and data. - /// @discussion A default NSURLCacheStoragePolicy is used for - /// NSCachedURLResponse objects initialized with this method: - /// NSURLCacheStorageAllowed. - /// @param response a NSURLResponse object. - /// @param data an NSData object representing the URL content - /// corresponding to the given response. - /// @result an initialized NSCachedURLResponse. - NSCachedURLResponse initWithResponse_data_( - NSURLResponse response, NSData data) { - final _ret = _lib._objc_msgSend_335( - _id, _lib._sel_initWithResponse_data_1, response._id, data._id); - return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @method initWithResponse:data:userInfo:storagePolicy: - /// @abstract Initializes an NSCachedURLResponse with the given - /// response, data, user-info dictionary, and storage policy. - /// @param response a NSURLResponse object. - /// @param data an NSData object representing the URL content - /// corresponding to the given response. - /// @param userInfo a dictionary user-specified information to be - /// stored with the NSCachedURLResponse. - /// @param storagePolicy an NSURLCacheStoragePolicy constant. - /// @result an initialized NSCachedURLResponse. - NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( - NSURLResponse response, - NSData data, - NSDictionary? userInfo, - int storagePolicy) { - final _ret = _lib._objc_msgSend_336( - _id, - _lib._sel_initWithResponse_data_userInfo_storagePolicy_1, - response._id, - data._id, - userInfo?._id ?? ffi.nullptr, - storagePolicy); - return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the response wrapped by this instance. - /// @result The response wrapped by this instance. - NSURLResponse get response { - final _ret = _lib._objc_msgSend_337(_id, _lib._sel_response1); - return NSURLResponse._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the data of the receiver. - /// @result The data of the receiver. - NSData get data { - final _ret = _lib._objc_msgSend_54(_id, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the userInfo dictionary of the receiver. - /// @result The userInfo dictionary of the receiver. - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_288(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the NSURLCacheStoragePolicy constant of the receiver. - /// @result The NSURLCacheStoragePolicy constant of the receiver. - int get storagePolicy { - return _lib._objc_msgSend_338(_id, _lib._sel_storagePolicy1); - } - - @override - NSCachedURLResponse init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSCachedURLResponse._(_ret, _lib, retain: true, release: true); - } - - static NSCachedURLResponse new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSCachedURLResponse1, _lib._sel_new1); - return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); - } - - static NSCachedURLResponse allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSCachedURLResponse1, _lib._sel_allocWithZone_1, zone); - return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); - } - - static NSCachedURLResponse alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSCachedURLResponse1, _lib._sel_alloc1); - return NSCachedURLResponse._(_ret, _lib, retain: false, release: true); - } -} - -class NSURLResponse extends NSObject { - NSURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLResponse] that points to the same underlying object as [other]. - static NSURLResponse castFrom(T other) { - return NSURLResponse._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURLResponse] that wraps the given raw object pointer. - static NSURLResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLResponse._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLResponse1); - } - - /// ! - /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: - /// @abstract Initialize an NSURLResponse with the provided values. - /// @param URL the URL - /// @param MIMEType the MIME content type of the response - /// @param length the expected content length of the associated data - /// @param name the name of the text encoding for the associated data, if applicable, else nil - /// @result The initialized NSURLResponse. - /// @discussion This is the designated initializer for NSURLResponse. - NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - NSURL URL, NSString? MIMEType, DartNSInteger length, NSString? name) { - final _ret = _lib._objc_msgSend_334( - _id, - _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, - URL._id, - MIMEType?._id ?? ffi.nullptr, - length, - name?._id ?? ffi.nullptr); - return NSURLResponse._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - NSURL? get URL { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the MIME type of the receiver. - /// @discussion The MIME type is based on the information provided - /// from an origin source. However, that value may be changed or - /// corrected by a protocol implementation if it can be determined - /// that the origin server or source reported the information - /// incorrectly or imprecisely. An attempt to guess the MIME type may - /// be made if the origin source did not report any such information. - /// @result The MIME type of the receiver. - NSString? get MIMEType { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_MIMEType1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the expected content length of the receiver. - /// @discussion Some protocol implementations report a content length - /// as part of delivering load metadata, but not all protocols - /// guarantee the amount of data that will be delivered in actuality. - /// Hence, this method returns an expected amount. Clients should use - /// this value as an advisory, and should be prepared to deal with - /// either more or less data. - /// @result The expected content length of the receiver, or -1 if - /// there is no expectation that can be arrived at regarding expected - /// content length. - int get expectedContentLength { - return _lib._objc_msgSend_87(_id, _lib._sel_expectedContentLength1); - } - - /// ! - /// @abstract Returns the name of the text encoding of the receiver. - /// @discussion This name will be the actual string reported by the - /// origin source during the course of performing a protocol-specific - /// URL load. Clients can inspect this string and convert it to an - /// NSStringEncoding or CFStringEncoding using the methods and - /// functions made available in the appropriate framework. - /// @result The name of the text encoding of the receiver, or nil if no - /// text encoding was specified. - NSString? get textEncodingName { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_textEncodingName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns a suggested filename if the resource were saved to disk. - /// @discussion The method first checks if the server has specified a filename using the - /// content disposition header. If no valid filename is specified using that mechanism, - /// this method checks the last path component of the URL. If no valid filename can be - /// obtained using the last path component, this method uses the URL's host as the filename. - /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. - /// In most cases, this method appends the proper file extension based on the MIME type. - /// This method always returns a valid filename. - /// @result A suggested filename to use if saving the resource to disk. - NSString? get suggestedFilename { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_suggestedFilename1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - @override - NSURLResponse init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLResponse._(_ret, _lib, retain: true, release: true); - } - - static NSURLResponse new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_new1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); - } - - static NSURLResponse allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLResponse1, _lib._sel_allocWithZone_1, zone); - return NSURLResponse._(_ret, _lib, retain: false, release: true); - } - - static NSURLResponse alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLResponse1, _lib._sel_alloc1); - return NSURLResponse._(_ret, _lib, retain: false, release: true); - } -} - -class NSURLCache extends NSObject { - NSURLCache._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLCache] that points to the same underlying object as [other]. - static NSURLCache castFrom(T other) { - return NSURLCache._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURLCache] that wraps the given raw object pointer. - static NSURLCache castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCache._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLCache]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLCache1); - } - - /// ! - /// @property sharedURLCache - /// @abstract Returns the shared NSURLCache instance or - /// sets the NSURLCache instance shared by all clients of - /// the current process. This will be the new object returned when - /// calls to the sharedURLCache method are made. - /// @discussion Unless set explicitly through a call to - /// +setSharedURLCache:, this method returns an NSURLCache - /// instance created with the following default values: - ///
    - ///
  • Memory capacity: 4 megabytes (4 * 1024 * 1024 bytes) - ///
  • Disk capacity: 20 megabytes (20 * 1024 * 1024 bytes) - ///
  • Disk path: (user home directory)/Library/Caches/(application bundle id) - ///
- ///

Users who do not have special caching requirements or - /// constraints should find the default shared cache instance - /// acceptable. If this default shared cache instance is not - /// acceptable, +setSharedURLCache: can be called to set a - /// different NSURLCache instance to be returned from this method. - /// Callers should take care to ensure that the setter is called - /// at a time when no other caller has a reference to the previously-set - /// shared URL cache. This is to prevent storing cache data from - /// becoming unexpectedly unretrievable. - /// @result the shared NSURLCache instance. - static NSURLCache getSharedURLCache(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_339( - _lib._class_NSURLCache1, _lib._sel_sharedURLCache1); - return NSURLCache._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @property sharedURLCache - /// @abstract Returns the shared NSURLCache instance or - /// sets the NSURLCache instance shared by all clients of - /// the current process. This will be the new object returned when - /// calls to the sharedURLCache method are made. - /// @discussion Unless set explicitly through a call to - /// +setSharedURLCache:, this method returns an NSURLCache - /// instance created with the following default values: - ///

    - ///
  • Memory capacity: 4 megabytes (4 * 1024 * 1024 bytes) - ///
  • Disk capacity: 20 megabytes (20 * 1024 * 1024 bytes) - ///
  • Disk path: (user home directory)/Library/Caches/(application bundle id) - ///
- ///

Users who do not have special caching requirements or - /// constraints should find the default shared cache instance - /// acceptable. If this default shared cache instance is not - /// acceptable, +setSharedURLCache: can be called to set a - /// different NSURLCache instance to be returned from this method. - /// Callers should take care to ensure that the setter is called - /// at a time when no other caller has a reference to the previously-set - /// shared URL cache. This is to prevent storing cache data from - /// becoming unexpectedly unretrievable. - /// @result the shared NSURLCache instance. - static void setSharedURLCache(NativeCupertinoHttp _lib, NSURLCache value) { - return _lib._objc_msgSend_340( - _lib._class_NSURLCache1, _lib._sel_setSharedURLCache_1, value._id); - } - - /// ! - /// @method initWithMemoryCapacity:diskCapacity:diskPath: - /// @abstract Initializes an NSURLCache with the given capacity and - /// path. - /// @discussion The returned NSURLCache is backed by disk, so - /// developers can be more liberal with space when choosing the - /// capacity for this kind of cache. A disk cache measured in the tens - /// of megabytes should be acceptable in most cases. - /// @param memoryCapacity the capacity, measured in bytes, for the cache in memory. - /// @param diskCapacity the capacity, measured in bytes, for the cache on disk. - /// @param path the path on disk where the cache data is stored. - /// @result an initialized NSURLCache, with the given capacity, backed - /// by disk. - NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( - DartNSUInteger memoryCapacity, - DartNSUInteger diskCapacity, - NSString? path) { - final _ret = _lib._objc_msgSend_341( - _id, - _lib._sel_initWithMemoryCapacity_diskCapacity_diskPath_1, - memoryCapacity, - diskCapacity, - path?._id ?? ffi.nullptr); - return NSURLCache._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @method initWithMemoryCapacity:diskCapacity:directoryURL: - /// @abstract Initializes an NSURLCache with the given capacity and directory. - /// @param memoryCapacity the capacity, measured in bytes, for the cache in memory. Or 0 to disable memory cache. - /// @param diskCapacity the capacity, measured in bytes, for the cache on disk. Or 0 to disable disk cache. - /// @param directoryURL the path to a directory on disk where the cache data is stored. Or nil for default directory. - /// @result an initialized NSURLCache, with the given capacity, optionally backed by disk. - NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( - DartNSUInteger memoryCapacity, - DartNSUInteger diskCapacity, - NSURL? directoryURL) { - final _ret = _lib._objc_msgSend_342( - _id, - _lib._sel_initWithMemoryCapacity_diskCapacity_directoryURL_1, - memoryCapacity, - diskCapacity, - directoryURL?._id ?? ffi.nullptr); - return NSURLCache._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @method cachedResponseForRequest: - /// @abstract Returns the NSCachedURLResponse stored in the cache with - /// the given request. - /// @discussion The method returns nil if there is no - /// NSCachedURLResponse stored using the given request. - /// @param request the NSURLRequest to use as a key for the lookup. - /// @result The NSCachedURLResponse stored in the cache with the given - /// request, or nil if there is no NSCachedURLResponse stored with the - /// given request. - NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_363( - _id, _lib._sel_cachedResponseForRequest_1, request._id); - return _ret.address == 0 - ? null - : NSCachedURLResponse._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @method storeCachedResponse:forRequest: - /// @abstract Stores the given NSCachedURLResponse in the cache using - /// the given request. - /// @param cachedResponse The cached response to store. - /// @param request the NSURLRequest to use as a key for the storage. - void storeCachedResponse_forRequest_( - NSCachedURLResponse cachedResponse, NSURLRequest request) { - _lib._objc_msgSend_364(_id, _lib._sel_storeCachedResponse_forRequest_1, - cachedResponse._id, request._id); - } - - /// ! - /// @method removeCachedResponseForRequest: - /// @abstract Removes the NSCachedURLResponse from the cache that is - /// stored using the given request. - /// @discussion No action is taken if there is no NSCachedURLResponse - /// stored with the given request. - /// @param request the NSURLRequest to use as a key for the lookup. - void removeCachedResponseForRequest_(NSURLRequest request) { - _lib._objc_msgSend_365( - _id, _lib._sel_removeCachedResponseForRequest_1, request._id); - } - - /// ! - /// @method removeAllCachedResponses - /// @abstract Clears the given cache, removing all NSCachedURLResponse - /// objects that it stores. - void removeAllCachedResponses() { - _lib._objc_msgSend_1(_id, _lib._sel_removeAllCachedResponses1); - } - - /// ! - /// @method removeCachedResponsesSince: - /// @abstract Clears the given cache of any cached responses since the provided date. - void removeCachedResponsesSinceDate_(NSDate date) { - _lib._objc_msgSend_373( - _id, _lib._sel_removeCachedResponsesSinceDate_1, date._id); - } - - /// ! - /// @abstract In-memory capacity of the receiver. - /// @discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary. - /// @result The in-memory capacity, measured in bytes, for the receiver. - DartNSUInteger get memoryCapacity { - return _lib._objc_msgSend_12(_id, _lib._sel_memoryCapacity1); - } - - /// ! - /// @abstract In-memory capacity of the receiver. - /// @discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary. - /// @result The in-memory capacity, measured in bytes, for the receiver. - set memoryCapacity(DartNSUInteger value) { - return _lib._objc_msgSend_322(_id, _lib._sel_setMemoryCapacity_1, value); - } - - /// ! - /// @abstract The on-disk capacity of the receiver. - /// @discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary. - DartNSUInteger get diskCapacity { - return _lib._objc_msgSend_12(_id, _lib._sel_diskCapacity1); - } - - /// ! - /// @abstract The on-disk capacity of the receiver. - /// @discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary. - set diskCapacity(DartNSUInteger value) { - return _lib._objc_msgSend_322(_id, _lib._sel_setDiskCapacity_1, value); - } - - /// ! - /// @abstract Returns the current amount of space consumed by the - /// in-memory cache of the receiver. - /// @discussion This size, measured in bytes, indicates the current - /// usage of the in-memory cache. - /// @result the current usage of the in-memory cache of the receiver. - DartNSUInteger get currentMemoryUsage { - return _lib._objc_msgSend_12(_id, _lib._sel_currentMemoryUsage1); - } - - /// ! - /// @abstract Returns the current amount of space consumed by the - /// on-disk cache of the receiver. - /// @discussion This size, measured in bytes, indicates the current - /// usage of the on-disk cache. - /// @result the current usage of the on-disk cache of the receiver. - DartNSUInteger get currentDiskUsage { - return _lib._objc_msgSend_12(_id, _lib._sel_currentDiskUsage1); - } - - void storeCachedResponse_forDataTask_( - NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { - _lib._objc_msgSend_398(_id, _lib._sel_storeCachedResponse_forDataTask_1, - cachedResponse._id, dataTask._id); - } - - void getCachedResponseForDataTask_completionHandler_( - NSURLSessionDataTask dataTask, - ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { - _lib._objc_msgSend_399( - _id, - _lib._sel_getCachedResponseForDataTask_completionHandler_1, - dataTask._id, - completionHandler._id); - } - - void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { - _lib._objc_msgSend_400( - _id, _lib._sel_removeCachedResponseForDataTask_1, dataTask._id); - } - - @override - NSURLCache init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLCache._(_ret, _lib, retain: true, release: true); - } - - static NSURLCache new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_new1); - return NSURLCache._(_ret, _lib, retain: false, release: true); - } - - static NSURLCache allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLCache1, _lib._sel_allocWithZone_1, zone); - return NSURLCache._(_ret, _lib, retain: false, release: true); - } - - static NSURLCache alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLCache1, _lib._sel_alloc1); - return NSURLCache._(_ret, _lib, retain: false, release: true); - } -} - -class NSURLRequest extends NSObject { - NSURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLRequest] that points to the same underlying object as [other]. - static NSURLRequest castFrom(T other) { - return NSURLRequest._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSURLRequest] that wraps the given raw object pointer. - static NSURLRequest castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLRequest._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLRequest]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLRequest1); - } - - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_(NativeCupertinoHttp _lib, NSURL URL) { - final _ret = _lib._objc_msgSend_211( - _lib._class_NSURLRequest1, _lib._sel_requestWithURL_1, URL._id); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_11( - _lib._class_NSURLRequest1, _lib._sel_supportsSecureCoding1); - } - - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NativeCupertinoHttp _lib, - NSURL URL, - int cachePolicy, - DartNSTimeInterval timeoutInterval) { - final _ret = _lib._objc_msgSend_343( - _lib._class_NSURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL._id, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_(NSURL URL) { - final _ret = _lib._objc_msgSend_211(_id, _lib._sel_initWithURL_1, URL._id); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL and - /// cache policy. - /// @discussion This is the designated initializer for the - /// NSURLRequest class. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result An initialized NSURLRequest. - NSURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, DartNSTimeInterval timeoutInterval) { - final _ret = _lib._objc_msgSend_343( - _id, - _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, - URL._id, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - NSURL? get URL { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the cache policy of the receiver. - /// @result The cache policy of the receiver. - int get cachePolicy { - return _lib._objc_msgSend_344(_id, _lib._sel_cachePolicy1); - } - - /// ! - /// @abstract Returns the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - /// @result The timeout interval of the receiver. - DartNSTimeInterval get timeoutInterval { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_timeoutInterval1) - : _lib._objc_msgSend_90(_id, _lib._sel_timeoutInterval1); - } - - /// ! - /// @abstract The main document URL associated with this load. - /// @discussion This URL is used for the cookie "same domain as main - /// document" policy, and attributing the request as a sub-resource - /// of a user-specified URL. There may also be other future uses. - /// See setMainDocumentURL: - /// @result The main document URL. - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. - /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have - /// not explicitly set a networkServiceType (using the setNetworkServiceType method). - /// @result The NSURLRequestNetworkServiceType associated with this request. - int get networkServiceType { - return _lib._objc_msgSend_345(_id, _lib._sel_networkServiceType1); - } - - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @result YES if the receiver is allowed to use the built in cellular radios to - /// satisfy the request, NO otherwise. - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } - - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @result YES if the receiver is allowed to use an interface marked as expensive to - /// satisfy the request, NO otherwise. - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } - - /// ! - /// @abstract returns whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @result YES if the receiver is allowed to use an interface marked as constrained to - /// satisfy the request, NO otherwise. - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } - - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); - } - - /// ! - /// @abstract Returns the NSURLRequestAttribution associated with this request. - /// @discussion This will return NSURLRequestAttributionDeveloper for requests that - /// have not explicitly set an attribution. - /// @result The NSURLRequestAttribution associated with this request. - int get attribution { - return _lib._objc_msgSend_346(_id, _lib._sel_attribution1); - } - - /// ! - /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. - /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, - /// No otherwise. Defaults to NO. - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); - } - - /// ! - /// @abstract Returns the HTTP request method of the receiver. - /// @result the HTTP request method of the receiver. - NSString? get HTTPMethod { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_HTTPMethod1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns a dictionary containing all the HTTP header fields - /// of the receiver. - /// @result a dictionary containing all the HTTP header fields of the - /// receiver. - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_288(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @method valueForHTTPHeaderField: - /// @abstract Returns the value which corresponds to the given header - /// field. Note that, in keeping with the HTTP RFC, HTTP header field - /// names are case-insensitive. - /// @param field the header field name to use for the lookup - /// (case-insensitive). - /// @result the value associated with the given header field, or nil if - /// there is no value associated with the given header field. - NSString? valueForHTTPHeaderField_(NSString field) { - final _ret = _lib._objc_msgSend_347( - _id, _lib._sel_valueForHTTPHeaderField_1, field._id); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - /// @result The request body data of the receiver. - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Returns the request body stream of the receiver - /// if any has been set - /// @discussion The stream is returned for examination only; it is - /// not safe for the caller to manipulate the stream in any way. Also - /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only - /// one can be set on a given request. Also note that the body stream is - /// preserved across copies, but is LOST when the request is coded via the - /// NSCoding protocol - /// @result The request body stream of the receiver. - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_362(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract Determine whether default cookie handling will happen for - /// this request. - /// @discussion NOTE: This value is not used prior to 10.3 - /// @result YES if cookies will be sent with and set for this request; - /// otherwise NO. - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); - } - - /// ! - /// @abstract Reports whether the receiver is not expected to wait for the - /// previous response before transmitting. - /// @result YES if the receiver should transmit before the previous response - /// is received. NO if the receiver should wait for the previous response - /// before transmitting. - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); - } - - @override - NSURLRequest init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } - - static NSURLRequest new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_new1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } - - static NSURLRequest allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLRequest1, _lib._sel_allocWithZone_1, zone); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } +int _ObjCBlock_ffiInt_ffiVoid_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiInt_ffiVoid_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiInt_ffiVoid_ffiVoid_fnPtrTrampoline, 0) + .cast(); +int _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as int Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureTrampoline, 0) + .cast(); + +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiInt_ffiVoid_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Int Function( + ffi.Pointer, ffi.Pointer)>(pointer, + retain: retain, release: release); - static NSURLRequest alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLRequest1, _lib._sel_alloc1); - return NSURLRequest._(_ret, _lib, retain: false, release: true); - } -} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_ffiInt_ffiVoid_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); -/// ! -/// @enum NSURLRequestCachePolicy -/// -/// @discussion The NSURLRequestCachePolicy enum defines constants that -/// can be used to specify the type of interactions that take place with -/// the caching system when the URL loading system processes a request. -/// Specifically, these constants cover interactions that have to do -/// with whether already-existing cache data is returned to satisfy a -/// URL load request. -/// -/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the -/// caching logic defined in the protocol implementation, if any, is -/// used for a particular URL load request. This is the default policy -/// for URL load requests. -/// -/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the -/// data for the URL load should be loaded from the origin source. No -/// existing local cache data, regardless of its freshness or validity, -/// should be used to satisfy a URL load request. -/// -/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that -/// not only should the local cache data be ignored, but that proxies and -/// other intermediates should be instructed to disregard their caches -/// so far as the protocol allows. -/// -/// @constant NSURLRequestReloadIgnoringCacheData Older name for -/// NSURLRequestReloadIgnoringLocalCacheData. -/// -/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the -/// existing cache data should be used to satisfy a URL load request, -/// regardless of its age or expiration date. However, if there is no -/// existing data in the cache corresponding to a URL load request, -/// the URL is loaded from the origin source. -/// -/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the -/// existing cache data should be used to satisfy a URL load request, -/// regardless of its age or expiration date. However, if there is no -/// existing data in the cache corresponding to a URL load request, no -/// attempt is made to load the URL from the origin source, and the -/// load is considered to have failed. This constant specifies a -/// behavior that is similar to an "offline" mode. -/// -/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that -/// the existing cache data may be used provided the origin source -/// confirms its validity, otherwise the URL is loaded from the -/// origin source. -abstract class NSURLRequestCachePolicy { - static const int NSURLRequestUseProtocolCachePolicy = 0; - static const int NSURLRequestReloadIgnoringLocalCacheData = 1; - static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; - static const int NSURLRequestReloadIgnoringCacheData = 1; - static const int NSURLRequestReturnCacheDataElseLoad = 2; - static const int NSURLRequestReturnCacheDataDontLoad = 3; - static const int NSURLRequestReloadRevalidatingCacheData = 5; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.Pointer)> + fromFunction( + int Function(ffi.Pointer, ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Int Function(ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_ffiInt_ffiVoid_ffiVoid_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, arg1)), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_ffiInt_ffiVoid_ffiVoid_CallExtension on objc + .ObjCBlock, ffi.Pointer)> { + int call(ffi.Pointer arg0, ffi.Pointer arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, arg1); } -typedef NSTimeInterval = ffi.Double; -typedef DartNSTimeInterval = double; - -/// ! -/// @enum NSURLRequestNetworkServiceType -/// -/// @discussion The NSURLRequestNetworkServiceType enum defines constants that -/// can be used to specify the service type to associate with this request. The -/// service type is used to provide the networking layers a hint of the purpose -/// of the request. -/// -/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest -/// when created. This value should be left unchanged for the vast majority of requests. -/// -/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP -/// control traffic. -/// -/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video -/// traffic. -/// -/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background -/// traffic (such as a file download). -/// -/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. -/// -/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. -/// -/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. -/// -/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. -/// -/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. -abstract class NSURLRequestNetworkServiceType { - /// Standard internet traffic - static const int NSURLNetworkServiceTypeDefault = 0; - - /// Voice over IP control traffic - static const int NSURLNetworkServiceTypeVoIP = 1; - - /// Video traffic - static const int NSURLNetworkServiceTypeVideo = 2; - - /// Background traffic - static const int NSURLNetworkServiceTypeBackground = 3; - - /// Voice data - static const int NSURLNetworkServiceTypeVoice = 4; - - /// Responsive data - static const int NSURLNetworkServiceTypeResponsiveData = 6; - - /// Multimedia Audio/Video Streaming - static const int NSURLNetworkServiceTypeAVStreaming = 8; - - /// Responsive Multimedia Audio/Video - static const int NSURLNetworkServiceTypeResponsiveAV = 9; - - /// Call Signaling - static const int NSURLNetworkServiceTypeCallSignaling = 11; -} +typedef dev_t = __darwin_dev_t; +typedef __darwin_dev_t = __int32_t; +typedef mode_t = __darwin_mode_t; +typedef __darwin_mode_t = __uint16_t; +typedef __uint16_t = ffi.UnsignedShort; +typedef Dart__uint16_t = int; -/// ! -/// @enum NSURLRequestAttribution -/// -/// @discussion The NSURLRequestAttribution enum is used to indicate whether the -/// user or developer specified the URL. -/// -/// @constant NSURLRequestAttributionDeveloper Indicates that the URL was specified -/// by the developer. This is the default value for an NSURLRequest when created. -/// -/// @constant NSURLRequestAttributionUser Indicates that the URL was specified by -/// the user. -abstract class NSURLRequestAttribution { - static const int NSURLRequestAttributionDeveloper = 0; - static const int NSURLRequestAttributionUser = 1; +final class fd_set extends ffi.Struct { + @ffi.Array.multi([32]) + external ffi.Array<__int32_t> fds_bits; } -class NSInputStream extends NSStream { - NSInputStream._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSInputStream] that points to the same underlying object as [other]. - static NSInputStream castFrom(T other) { - return NSInputStream._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSInputStream] that wraps the given raw object pointer. - static NSInputStream castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInputStream._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSInputStream]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSInputStream1); - } - - DartNSInteger read_maxLength_( - ffi.Pointer buffer, DartNSUInteger len) { - return _lib._objc_msgSend_354(_id, _lib._sel_read_maxLength_1, buffer, len); - } - - bool getBuffer_length_( - ffi.Pointer> buffer, ffi.Pointer len) { - return _lib._objc_msgSend_360( - _id, _lib._sel_getBuffer_length_1, buffer, len); - } - - bool get hasBytesAvailable { - return _lib._objc_msgSend_11(_id, _lib._sel_hasBytesAvailable1); - } - - NSInputStream initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_228(_id, _lib._sel_initWithData_1, data._id); - return NSInputStream._(_ret, _lib, retain: true, release: true); - } - - NSInputStream? initWithURL_(NSURL url) { - final _ret = _lib._objc_msgSend_226(_id, _lib._sel_initWithURL_1, url._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } - - NSInputStream? initWithFileAtPath_(NSString path) { - final _ret = - _lib._objc_msgSend_49(_id, _lib._sel_initWithFileAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } - - static NSInputStream? inputStreamWithData_( - NativeCupertinoHttp _lib, NSData data) { - final _ret = _lib._objc_msgSend_361( - _lib._class_NSInputStream1, _lib._sel_inputStreamWithData_1, data._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } - - static NSInputStream? inputStreamWithFileAtPath_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSInputStream1, - _lib._sel_inputStreamWithFileAtPath_1, path._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } - - static NSInputStream? inputStreamWithURL_( - NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_226( - _lib._class_NSInputStream1, _lib._sel_inputStreamWithURL_1, url._id); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); - } - - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSString hostname, - DartNSInteger port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_357( - _lib._class_NSInputStream1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname._id, - port, - inputStream, - outputStream); - } - - static void getStreamsToHost_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSHost host, - DartNSInteger port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_358( - _lib._class_NSInputStream1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host._id, - port, - inputStream, - outputStream); - } - - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - NativeCupertinoHttp _lib, - DartNSUInteger bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_359( - _lib._class_NSInputStream1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); - } - - @override - NSInputStream init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSInputStream._(_ret, _lib, retain: true, release: true); - } - - static NSInputStream new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_new1); - return NSInputStream._(_ret, _lib, retain: false, release: true); - } - - static NSInputStream allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSInputStream1, _lib._sel_allocWithZone_1, zone); - return NSInputStream._(_ret, _lib, retain: false, release: true); - } +final class objc_class extends ffi.Opaque {} - static NSInputStream alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSInputStream1, _lib._sel_alloc1); - return NSInputStream._(_ret, _lib, retain: false, release: true); - } +final class objc_object extends ffi.Struct { + external ffi.Pointer isaAsInt; } -class NSStream extends NSObject { - NSStream._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSStream] that points to the same underlying object as [other]. - static NSStream castFrom(T other) { - return NSStream._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSStream] that wraps the given raw object pointer. - static NSStream castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSStream._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSStream]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSStream1); - } - - void open() { - _lib._objc_msgSend_1(_id, _lib._sel_open1); - } - - void close() { - _lib._objc_msgSend_1(_id, _lib._sel_close1); - } +final class objc_selector extends ffi.Opaque {} - NSObject? get delegate { - final _ret = _lib._objc_msgSend_61(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } +typedef objc_objectptr_t = ffi.Pointer; - set delegate(NSObject? value) { - return _lib._objc_msgSend_349( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); - } +/// NSObject +abstract final class NSObject { + /// Builds an object that implements the NSObject protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {required bool Function(objc.ObjCObjectBase) isEqual_, + required objc.ObjCObjectBase Function() class1, + required objc.ObjCObjectBase Function() self, + required objc.ObjCObjectBase Function(ffi.Pointer) + performSelector_, + required objc.ObjCObjectBase Function( + ffi.Pointer, objc.ObjCObjectBase) + performSelector_withObject_, + required objc.ObjCObjectBase Function(ffi.Pointer, + objc.ObjCObjectBase, objc.ObjCObjectBase) + performSelector_withObject_withObject_, + required bool Function() isProxy, + required bool Function(objc.ObjCObjectBase) isKindOfClass_, + required bool Function(objc.ObjCObjectBase) isMemberOfClass_, + required bool Function(objc.Protocol) conformsToProtocol_, + required bool Function(ffi.Pointer) + respondsToSelector_, + required objc.ObjCObjectBase Function() retain, + required void Function() release, + required objc.ObjCObjectBase Function() autorelease, + required DartNSUInteger Function() retainCount, + required ffi.Pointer<_NSZone> Function() zone, + required DartNSUInteger Function() hash, + required objc.ObjCObjectBase Function() superclass, + required objc.NSString Function() description, + objc.NSString Function()? debugDescription}) { + final builder = objc.ObjCProtocolBuilder(); + NSObject.isEqual_.implement(builder, isEqual_); + NSObject.class1.implement(builder, class1); + NSObject.self.implement(builder, self); + NSObject.performSelector_.implement(builder, performSelector_); + NSObject.performSelector_withObject_ + .implement(builder, performSelector_withObject_); + NSObject.performSelector_withObject_withObject_ + .implement(builder, performSelector_withObject_withObject_); + NSObject.isProxy.implement(builder, isProxy); + NSObject.isKindOfClass_.implement(builder, isKindOfClass_); + NSObject.isMemberOfClass_.implement(builder, isMemberOfClass_); + NSObject.conformsToProtocol_.implement(builder, conformsToProtocol_); + NSObject.respondsToSelector_.implement(builder, respondsToSelector_); + NSObject.retain.implement(builder, retain); + NSObject.release.implement(builder, release); + NSObject.autorelease.implement(builder, autorelease); + NSObject.retainCount.implement(builder, retainCount); + NSObject.zone.implement(builder, zone); + NSObject.hash.implement(builder, hash); + NSObject.superclass.implement(builder, superclass); + NSObject.description.implement(builder, description); + NSObject.debugDescription.implement(builder, debugDescription); + return builder.build(); + } + + /// Adds the implementation of the NSObject protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {required bool Function(objc.ObjCObjectBase) isEqual_, + required objc.ObjCObjectBase Function() class1, + required objc.ObjCObjectBase Function() self, + required objc.ObjCObjectBase Function(ffi.Pointer) + performSelector_, + required objc.ObjCObjectBase Function( + ffi.Pointer, objc.ObjCObjectBase) + performSelector_withObject_, + required objc.ObjCObjectBase Function(ffi.Pointer, + objc.ObjCObjectBase, objc.ObjCObjectBase) + performSelector_withObject_withObject_, + required bool Function() isProxy, + required bool Function(objc.ObjCObjectBase) isKindOfClass_, + required bool Function(objc.ObjCObjectBase) isMemberOfClass_, + required bool Function(objc.Protocol) conformsToProtocol_, + required bool Function(ffi.Pointer) + respondsToSelector_, + required objc.ObjCObjectBase Function() retain, + required void Function() release, + required objc.ObjCObjectBase Function() autorelease, + required DartNSUInteger Function() retainCount, + required ffi.Pointer<_NSZone> Function() zone, + required DartNSUInteger Function() hash, + required objc.ObjCObjectBase Function() superclass, + required objc.NSString Function() description, + objc.NSString Function()? debugDescription}) { + NSObject.isEqual_.implement(builder, isEqual_); + NSObject.class1.implement(builder, class1); + NSObject.self.implement(builder, self); + NSObject.performSelector_.implement(builder, performSelector_); + NSObject.performSelector_withObject_ + .implement(builder, performSelector_withObject_); + NSObject.performSelector_withObject_withObject_ + .implement(builder, performSelector_withObject_withObject_); + NSObject.isProxy.implement(builder, isProxy); + NSObject.isKindOfClass_.implement(builder, isKindOfClass_); + NSObject.isMemberOfClass_.implement(builder, isMemberOfClass_); + NSObject.conformsToProtocol_.implement(builder, conformsToProtocol_); + NSObject.respondsToSelector_.implement(builder, respondsToSelector_); + NSObject.retain.implement(builder, retain); + NSObject.release.implement(builder, release); + NSObject.autorelease.implement(builder, autorelease); + NSObject.retainCount.implement(builder, retainCount); + NSObject.zone.implement(builder, zone); + NSObject.hash.implement(builder, hash); + NSObject.superclass.implement(builder, superclass); + NSObject.description.implement(builder, description); + NSObject.debugDescription.implement(builder, debugDescription); + } + + /// Builds an object that implements the NSObject protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {required bool Function(objc.ObjCObjectBase) isEqual_, + required objc.ObjCObjectBase Function() class1, + required objc.ObjCObjectBase Function() self, + required objc.ObjCObjectBase Function(ffi.Pointer) + performSelector_, + required objc.ObjCObjectBase Function( + ffi.Pointer, objc.ObjCObjectBase) + performSelector_withObject_, + required objc.ObjCObjectBase Function(ffi.Pointer, + objc.ObjCObjectBase, objc.ObjCObjectBase) + performSelector_withObject_withObject_, + required bool Function() isProxy, + required bool Function(objc.ObjCObjectBase) isKindOfClass_, + required bool Function(objc.ObjCObjectBase) isMemberOfClass_, + required bool Function(objc.Protocol) conformsToProtocol_, + required bool Function(ffi.Pointer) + respondsToSelector_, + required objc.ObjCObjectBase Function() retain, + required void Function() release, + required objc.ObjCObjectBase Function() autorelease, + required DartNSUInteger Function() retainCount, + required ffi.Pointer<_NSZone> Function() zone, + required DartNSUInteger Function() hash, + required objc.ObjCObjectBase Function() superclass, + required objc.NSString Function() description, + objc.NSString Function()? debugDescription}) { + final builder = objc.ObjCProtocolBuilder(); + NSObject.isEqual_.implement(builder, isEqual_); + NSObject.class1.implement(builder, class1); + NSObject.self.implement(builder, self); + NSObject.performSelector_.implement(builder, performSelector_); + NSObject.performSelector_withObject_ + .implement(builder, performSelector_withObject_); + NSObject.performSelector_withObject_withObject_ + .implement(builder, performSelector_withObject_withObject_); + NSObject.isProxy.implement(builder, isProxy); + NSObject.isKindOfClass_.implement(builder, isKindOfClass_); + NSObject.isMemberOfClass_.implement(builder, isMemberOfClass_); + NSObject.conformsToProtocol_.implement(builder, conformsToProtocol_); + NSObject.respondsToSelector_.implement(builder, respondsToSelector_); + NSObject.retain.implement(builder, retain); + NSObject.release.implementAsListener(builder, release); + NSObject.autorelease.implement(builder, autorelease); + NSObject.retainCount.implement(builder, retainCount); + NSObject.zone.implement(builder, zone); + NSObject.hash.implement(builder, hash); + NSObject.superclass.implement(builder, superclass); + NSObject.description.implement(builder, description); + NSObject.debugDescription.implement(builder, debugDescription); + return builder.build(); + } + + /// Adds the implementation of the NSObject protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {required bool Function(objc.ObjCObjectBase) isEqual_, + required objc.ObjCObjectBase Function() class1, + required objc.ObjCObjectBase Function() self, + required objc.ObjCObjectBase Function(ffi.Pointer) + performSelector_, + required objc.ObjCObjectBase Function( + ffi.Pointer, objc.ObjCObjectBase) + performSelector_withObject_, + required objc.ObjCObjectBase Function(ffi.Pointer, + objc.ObjCObjectBase, objc.ObjCObjectBase) + performSelector_withObject_withObject_, + required bool Function() isProxy, + required bool Function(objc.ObjCObjectBase) isKindOfClass_, + required bool Function(objc.ObjCObjectBase) isMemberOfClass_, + required bool Function(objc.Protocol) conformsToProtocol_, + required bool Function(ffi.Pointer) + respondsToSelector_, + required objc.ObjCObjectBase Function() retain, + required void Function() release, + required objc.ObjCObjectBase Function() autorelease, + required DartNSUInteger Function() retainCount, + required ffi.Pointer<_NSZone> Function() zone, + required DartNSUInteger Function() hash, + required objc.ObjCObjectBase Function() superclass, + required objc.NSString Function() description, + objc.NSString Function()? debugDescription}) { + NSObject.isEqual_.implement(builder, isEqual_); + NSObject.class1.implement(builder, class1); + NSObject.self.implement(builder, self); + NSObject.performSelector_.implement(builder, performSelector_); + NSObject.performSelector_withObject_ + .implement(builder, performSelector_withObject_); + NSObject.performSelector_withObject_withObject_ + .implement(builder, performSelector_withObject_withObject_); + NSObject.isProxy.implement(builder, isProxy); + NSObject.isKindOfClass_.implement(builder, isKindOfClass_); + NSObject.isMemberOfClass_.implement(builder, isMemberOfClass_); + NSObject.conformsToProtocol_.implement(builder, conformsToProtocol_); + NSObject.respondsToSelector_.implement(builder, respondsToSelector_); + NSObject.retain.implement(builder, retain); + NSObject.release.implementAsListener(builder, release); + NSObject.autorelease.implement(builder, autorelease); + NSObject.retainCount.implement(builder, retainCount); + NSObject.zone.implement(builder, zone); + NSObject.hash.implement(builder, hash); + NSObject.superclass.implement(builder, superclass); + NSObject.description.implement(builder, description); + NSObject.debugDescription.implement(builder, debugDescription); + } + + /// isEqual: + static final isEqual_ = + objc.ObjCProtocolMethod( + _sel_isEqual_, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_isEqual_, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function(objc.ObjCObjectBase) func) => + ObjCBlock_bool_ffiVoid_objcObjCObject.fromFunction( + (ffi.Pointer _, objc.ObjCObjectBase arg1) => func(arg1)), + ); + + /// class + static final class1 = objc.ObjCProtocolMethod( + _sel_class, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_class, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObjectBase Function() func) => + ObjCBlock_objcObjCObject_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); + + /// self + static final self = objc.ObjCProtocolMethod( + _sel_self, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_self, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObjectBase Function() func) => + ObjCBlock_objcObjCObject_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); + + /// performSelector: + static final performSelector_ = objc.ObjCProtocolMethod< + objc.ObjCObjectBase Function(ffi.Pointer)>( + _sel_performSelector_, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_performSelector_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObjectBase Function(ffi.Pointer) func) => + ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector.fromFunction( + (ffi.Pointer _, ffi.Pointer arg1) => + func(arg1)), + ); + + /// performSelector:withObject: + static final performSelector_withObject_ = objc.ObjCProtocolMethod< + objc.ObjCObjectBase Function( + ffi.Pointer, objc.ObjCObjectBase)>( + _sel_performSelector_withObject_, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_performSelector_withObject_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObjectBase Function( + ffi.Pointer, objc.ObjCObjectBase) + func) => + ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject + .fromFunction((ffi.Pointer _, + ffi.Pointer arg1, + objc.ObjCObjectBase arg2) => + func(arg1, arg2)), + ); + + /// performSelector:withObject:withObject: + static final performSelector_withObject_withObject_ = objc.ObjCProtocolMethod< + objc.ObjCObjectBase Function(ffi.Pointer, + objc.ObjCObjectBase, objc.ObjCObjectBase)>( + _sel_performSelector_withObject_withObject_, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_performSelector_withObject_withObject_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObjectBase Function(ffi.Pointer, + objc.ObjCObjectBase, objc.ObjCObjectBase) + func) => + ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject + .fromFunction((ffi.Pointer _, + ffi.Pointer arg1, + objc.ObjCObjectBase arg2, + objc.ObjCObjectBase arg3) => + func(arg1, arg2, arg3)), + ); + + /// isProxy + static final isProxy = objc.ObjCProtocolMethod( + _sel_isProxy, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_isProxy, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function() func) => ObjCBlock_bool_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); + + /// isKindOfClass: + static final isKindOfClass_ = + objc.ObjCProtocolMethod( + _sel_isKindOfClass_, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_isKindOfClass_, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function(objc.ObjCObjectBase) func) => + ObjCBlock_bool_ffiVoid_objcObjCObject.fromFunction( + (ffi.Pointer _, objc.ObjCObjectBase arg1) => func(arg1)), + ); + + /// isMemberOfClass: + static final isMemberOfClass_ = + objc.ObjCProtocolMethod( + _sel_isMemberOfClass_, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_isMemberOfClass_, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function(objc.ObjCObjectBase) func) => + ObjCBlock_bool_ffiVoid_objcObjCObject.fromFunction( + (ffi.Pointer _, objc.ObjCObjectBase arg1) => func(arg1)), + ); + + /// conformsToProtocol: + static final conformsToProtocol_ = + objc.ObjCProtocolMethod( + _sel_conformsToProtocol_, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_conformsToProtocol_, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function(objc.Protocol) func) => + ObjCBlock_bool_ffiVoid_Protocol.fromFunction( + (ffi.Pointer _, objc.Protocol arg1) => func(arg1)), + ); + + /// respondsToSelector: + static final respondsToSelector_ = + objc.ObjCProtocolMethod)>( + _sel_respondsToSelector_, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_respondsToSelector_, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function(ffi.Pointer) func) => + ObjCBlock_bool_ffiVoid_objcObjCSelector.fromFunction( + (ffi.Pointer _, ffi.Pointer arg1) => + func(arg1)), + ); + + /// retain + static final retain = objc.ObjCProtocolMethod( + _sel_retain, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_retain, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObjectBase Function() func) => + ObjCBlock_objcObjCObject_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); + + /// release + static final release = objc.ObjCProtocolListenableMethod( + _sel_release, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_release, + isRequired: true, + isInstanceMethod: true, + ), + (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.listener(( + ffi.Pointer _, + ) => + func()), + ); + + /// autorelease + static final autorelease = + objc.ObjCProtocolMethod( + _sel_autorelease, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_autorelease, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObjectBase Function() func) => + ObjCBlock_objcObjCObject_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); + + /// retainCount + static final retainCount = objc.ObjCProtocolMethod( + _sel_retainCount, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_retainCount, + isRequired: true, + isInstanceMethod: true, + ), + (DartNSUInteger Function() func) => + ObjCBlock_NSUInteger_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); + + /// zone + static final zone = objc.ObjCProtocolMethod Function()>( + _sel_zone, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_zone, + isRequired: true, + isInstanceMethod: true, + ), + (ffi.Pointer<_NSZone> Function() func) => + ObjCBlock_NSZone_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); + + /// hash + static final hash = objc.ObjCProtocolMethod( + _sel_hash, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_hash, + isRequired: true, + isInstanceMethod: true, + ), + (DartNSUInteger Function() func) => + ObjCBlock_NSUInteger_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); + + /// superclass + static final superclass = + objc.ObjCProtocolMethod( + _sel_superclass, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_superclass, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObjectBase Function() func) => + ObjCBlock_objcObjCObject_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); + + /// description + static final description = objc.ObjCProtocolMethod( + _sel_description, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_description, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSString Function() func) => ObjCBlock_NSString_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); + + /// debugDescription + static final debugDescription = + objc.ObjCProtocolMethod( + _sel_debugDescription, + objc.getProtocolMethodSignature( + _protocol_NSObject, + _sel_debugDescription, + isRequired: false, + isInstanceMethod: true, + ), + (objc.NSString Function() func) => ObjCBlock_NSString_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); +} + +late final _protocol_NSObject = objc.getProtocol("NSObject"); +late final _sel_isEqual_ = objc.registerName("isEqual:"); +bool _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline, false) + .cast(); + +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + pointer, + retain: retain, + release: release); - NSObject? propertyForKey_(DartNSStreamPropertyKey key) { - final _ret = - _lib._objc_msgSend_49(_id, _lib._sel_propertyForKey_1, key._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - bool setProperty_forKey_(NSObject? property, DartNSStreamPropertyKey key) { - return _lib._objc_msgSend_350(_id, _lib._sel_setProperty_forKey_1, - property?._id ?? ffi.nullptr, key._id); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, ffi.Pointer)> + fromFunction( + bool Function(ffi.Pointer, objc.ObjCObjectBase) fn) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, objc.ObjCObjectBase(arg1, retain: true, release: true))), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ffiVoid_objcObjCObject_CallExtension on objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.Pointer)> { + bool call(ffi.Pointer arg0, objc.ObjCObjectBase arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer); +} - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, DartNSRunLoopMode mode) { - _lib._objc_msgSend_351( - _id, _lib._sel_scheduleInRunLoop_forMode_1, aRunLoop._id, mode._id); - } +late final _sel_class = objc.registerName("class"); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer)>()(arg0); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. +abstract final class ObjCBlock_objcObjCObject_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock Function(ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer)>( + pointer, + retain: retain, + release: release); - void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, DartNSRunLoopMode mode) { - _lib._objc_msgSend_351( - _id, _lib._sel_removeFromRunLoop_forMode_1, aRunLoop._id, mode._id); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock Function(ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - int get streamStatus { - return _lib._objc_msgSend_352(_id, _lib._sel_streamStatus1); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock Function(ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_CallExtension on objc + .ObjCBlock Function(ffi.Pointer)> { + objc.ObjCObjectBase call(ffi.Pointer arg0) => objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); +} + +typedef instancetype = ffi.Pointer; +typedef Dartinstancetype = objc.ObjCObjectBase; +late final _sel_self = objc.registerName("self"); +late final _sel_performSelector_ = objc.registerName("performSelector:"); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + pointer, + retain: retain, + release: release); - NSError? get streamError { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_streamError1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); - } - - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSString hostname, - DartNSInteger port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_357( - _lib._class_NSStream1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname._id, - port, - inputStream, - outputStream); - } - - static void getStreamsToHost_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSHost host, - DartNSInteger port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_358( - _lib._class_NSStream1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host._id, - port, - inputStream, - outputStream); - } - - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - NativeCupertinoHttp _lib, - DartNSUInteger bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_359( - _lib._class_NSStream1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - @override - NSStream init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSStream._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, arg1).ref.retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_CallExtension + on objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)> { + objc.ObjCObjectBase call( + ffi.Pointer arg0, ffi.Pointer arg1) => + objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1), + retain: true, + release: true); +} - static NSStream new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_new1); - return NSStream._(_ret, _lib, retain: false, release: true); - } +late final _sel_performSelector_withObject_ = + objc.registerName("performSelector:withObject:"); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(pointer, + retain: retain, release: release); - static NSStream allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSStream1, _lib._sel_allocWithZone_1, zone); - return NSStream._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static NSStream alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSStream1, _lib._sel_alloc1); - return NSStream._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase) fn) => + objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true)) + .ref + .retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_CallExtension + on objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> { + objc.ObjCObjectBase call(ffi.Pointer arg0, + ffi.Pointer arg1, objc.ObjCObjectBase arg2) => + objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1, arg2.ref.pointer), + retain: true, + release: true); } -typedef NSStreamPropertyKey = ffi.Pointer; -typedef DartNSStreamPropertyKey = NSString; +late final _sel_performSelector_withObject_withObject_ = + objc.registerName("performSelector:withObject:withObject:"); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(pointer, retain: retain, release: release); -class NSRunLoop extends _ObjCWrapper { - NSRunLoop._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Returns a [NSRunLoop] that points to the same underlying object as [other]. - static NSRunLoop castFrom(T other) { - return NSRunLoop._(other._id, other._lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase, objc.ObjCObjectBase) fn) => + objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true), objc.ObjCObjectBase(arg3, retain: true, release: true)) + .ref + .retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_CallExtension + on objc.ObjCBlock< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> { + objc.ObjCObjectBase call( + ffi.Pointer arg0, + ffi.Pointer arg1, + objc.ObjCObjectBase arg2, + objc.ObjCObjectBase arg3) => + objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, arg1, arg2.ref.pointer, arg3.ref.pointer), + retain: true, + release: true); +} - /// Returns a [NSRunLoop] that wraps the given raw object pointer. - static NSRunLoop castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSRunLoop._(other, lib, retain: retain, release: release); - } +late final _sel_isProxy = objc.registerName("isProxy"); +bool _ObjCBlock_bool_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_bool_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as bool Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_bool_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_closureTrampoline, false) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_bool_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSRunLoop]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSRunLoop1); - } -} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); -typedef NSRunLoopMode = ffi.Pointer; -typedef DartNSRunLoopMode = NSString; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunction( + bool Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock(_ObjCBlock_bool_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); +} -abstract class NSStreamStatus { - static const int NSStreamStatusNotOpen = 0; - static const int NSStreamStatusOpening = 1; - static const int NSStreamStatusOpen = 2; - static const int NSStreamStatusReading = 3; - static const int NSStreamStatusWriting = 4; - static const int NSStreamStatusAtEnd = 5; - static const int NSStreamStatusClosed = 6; - static const int NSStreamStatusError = 7; +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_bool_ffiVoid_CallExtension + on objc.ObjCBlock)> { + bool call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); } -class NSOutputStream extends NSStream { - NSOutputStream._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_isMemberOfClass_ = objc.registerName("isMemberOfClass:"); +late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); +bool _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_bool_ffiVoid_Protocol_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline, false) + .cast(); + +/// Construction methods for `objc.ObjCBlock, objc.Protocol)>`. +abstract final class ObjCBlock_bool_ffiVoid_Protocol { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock, objc.Protocol)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + objc.Protocol)>(pointer, retain: retain, release: release); - /// Returns a [NSOutputStream] that points to the same underlying object as [other]. - static NSOutputStream castFrom(T other) { - return NSOutputStream._(other._id, other._lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.Protocol)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, objc.Protocol)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Returns a [NSOutputStream] that wraps the given raw object pointer. - static NSOutputStream castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOutputStream._(other, lib, retain: retain, release: release); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.Protocol)> + fromFunction(bool Function(ffi.Pointer, objc.Protocol) fn) => + objc.ObjCBlock, objc.Protocol)>( + objc.newClosureBlock( + _ObjCBlock_bool_ffiVoid_Protocol_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn( + arg0, + objc.Protocol.castFromPointer(arg1, + retain: true, release: true))), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, objc.Protocol)>`. +extension ObjCBlock_bool_ffiVoid_Protocol_CallExtension + on objc.ObjCBlock, objc.Protocol)> { + bool call(ffi.Pointer arg0, objc.Protocol arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer); +} - /// Returns whether [obj] is an instance of [NSOutputStream]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOutputStream1); - } +late final _sel_respondsToSelector_ = objc.registerName("respondsToSelector:"); +bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline, false) + .cast(); + +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + pointer, + retain: retain, + release: release); - DartNSInteger write_maxLength_( - ffi.Pointer buffer, DartNSUInteger len) { - return _lib._objc_msgSend_354( - _id, _lib._sel_write_maxLength_1, buffer, len); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - bool get hasSpaceAvailable { - return _lib._objc_msgSend_11(_id, _lib._sel_hasSpaceAvailable1); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.Pointer)> + fromFunction(bool Function(ffi.Pointer, ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, arg1)), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_ffiVoid_objcObjCSelector_CallExtension + on objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)> { + bool call(ffi.Pointer arg0, ffi.Pointer arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, arg1); +} - NSOutputStream initToMemory() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_initToMemory1); - return NSOutputStream._(_ret, _lib, retain: true, release: true); - } +late final _sel_retain = objc.registerName("retain"); +late final _sel_release = objc.registerName("release"); +void _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); - NSOutputStream initToBuffer_capacity_( - ffi.Pointer buffer, DartNSUInteger capacity) { - final _ret = _lib._objc_msgSend_355( - _id, _lib._sel_initToBuffer_capacity_1, buffer, capacity); - return NSOutputStream._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - NSOutputStream? initWithURL_append_(NSURL url, bool shouldAppend) { - final _ret = _lib._objc_msgSend_356( - _id, _lib._sel_initWithURL_append_1, url._id, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunction( + void Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock(_ObjCBlock_ffiVoid_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); - NSOutputStream? initToFileAtPath_append_(NSString path, bool shouldAppend) { - final _ret = _lib._objc_msgSend_51( - _id, _lib._sel_initToFileAtPath_append_1, path._id, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream._(_ret, _lib, retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock)> listener( + void Function(ffi.Pointer) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0)); + final wrapper = _wrapListenerBlock_hepzs(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock)>(wrapper, + retain: false, release: true); } +} - static NSOutputStream outputStreamToMemory(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSOutputStream1, _lib._sel_outputStreamToMemory1); - return NSOutputStream._(_ret, _lib, retain: true, release: true); - } +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_CallExtension + on objc.ObjCBlock)> { + void call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); +} - static NSOutputStream outputStreamToBuffer_capacity_(NativeCupertinoHttp _lib, - ffi.Pointer buffer, DartNSUInteger capacity) { - final _ret = _lib._objc_msgSend_355(_lib._class_NSOutputStream1, - _lib._sel_outputStreamToBuffer_capacity_1, buffer, capacity); - return NSOutputStream._(_ret, _lib, retain: true, release: true); - } +late final _sel_autorelease = objc.registerName("autorelease"); +typedef NSUInteger = ffi.UnsignedLong; +typedef DartNSUInteger = int; +late final _sel_retainCount = objc.registerName("retainCount"); +int _ObjCBlock_NSUInteger_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi + .NativeFunction arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_NSUInteger_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + NSUInteger Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSUInteger_ffiVoid_fnPtrTrampoline, 0) + .cast(); +int _ObjCBlock_NSUInteger_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as int Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSUInteger_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + NSUInteger Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSUInteger_ffiVoid_closureTrampoline, 0) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSUInteger_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>( + pointer, + retain: retain, + release: release); - static NSOutputStream outputStreamToFileAtPath_append_( - NativeCupertinoHttp _lib, NSString path, bool shouldAppend) { - final _ret = _lib._objc_msgSend_41(_lib._class_NSOutputStream1, - _lib._sel_outputStreamToFileAtPath_append_1, path._id, shouldAppend); - return NSOutputStream._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.UnsignedLong Function(ffi.Pointer)> fromFunctionPointer( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_NSUInteger_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static NSOutputStream? outputStreamWithURL_append_( - NativeCupertinoHttp _lib, NSURL url, bool shouldAppend) { - final _ret = _lib._objc_msgSend_356(_lib._class_NSOutputStream1, - _lib._sel_outputStreamWithURL_append_1, url._id, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream._(_ret, _lib, retain: true, release: true); - } - - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSString hostname, - DartNSInteger port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_357( - _lib._class_NSOutputStream1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname._id, - port, - inputStream, - outputStream); - } - - static void getStreamsToHost_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSHost host, - DartNSInteger port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_358( - _lib._class_NSOutputStream1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host._id, - port, - inputStream, - outputStream); - } - - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - NativeCupertinoHttp _lib, - DartNSUInteger bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_359( - _lib._class_NSOutputStream1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunction(DartNSUInteger Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSUInteger_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSUInteger_ffiVoid_CallExtension + on objc.ObjCBlock)> { + DartNSUInteger call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); +} - @override - NSOutputStream init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOutputStream._(_ret, _lib, retain: true, release: true); - } +final class _NSZone extends ffi.Opaque {} - static NSOutputStream new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_new1); - return NSOutputStream._(_ret, _lib, retain: false, release: true); - } +late final _sel_zone = objc.registerName("zone"); +ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer)>()(arg0); +ffi.Pointer _ObjCBlock_NSZone_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer<_NSZone> Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSZone_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSZone_ffiVoid_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. +abstract final class ObjCBlock_NSZone_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock Function(ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock Function(ffi.Pointer)>( + pointer, + retain: retain, + release: release); - static NSOutputStream allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOutputStream1, _lib._sel_allocWithZone_1, zone); - return NSOutputStream._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock Function(ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_NSZone_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static NSOutputStream alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOutputStream1, _lib._sel_alloc1); - return NSOutputStream._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer)> + fromFunction(ffi.Pointer<_NSZone> Function(ffi.Pointer) fn) => + objc.ObjCBlock Function(ffi.Pointer)>( + objc.newClosureBlock(_ObjCBlock_NSZone_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. +extension ObjCBlock_NSZone_ffiVoid_CallExtension + on objc.ObjCBlock Function(ffi.Pointer)> { + ffi.Pointer<_NSZone> call(ffi.Pointer arg0) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer<_NSZone> Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer<_NSZone> Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); } -class NSHost extends _ObjCWrapper { - NSHost._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSHost] that points to the same underlying object as [other]. - static NSHost castFrom(T other) { - return NSHost._(other._id, other._lib, retain: true, release: true); - } +late final _sel_hash = objc.registerName("hash"); +late final _sel_superclass = objc.registerName("superclass"); +late final _sel_description = objc.registerName("description"); +ffi.Pointer _ObjCBlock_NSString_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer)>()(arg0); +ffi.Pointer _ObjCBlock_NSString_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSString_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSString_ffiVoid_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSString_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); - /// Returns a [NSHost] that wraps the given raw object pointer. - static NSHost castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHost._(other, lib, retain: retain, release: release); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_NSString_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Returns whether [obj] is an instance of [NSHost]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHost1); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunction(objc.NSString Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSString_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSString_ffiVoid_CallExtension + on objc.ObjCBlock)> { + objc.NSString call(ffi.Pointer arg0) => + objc.NSString.castFromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); } -class NSDate extends NSObject { - NSDate._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +late final _sel_debugDescription = objc.registerName("debugDescription"); +typedef va_list = __builtin_va_list; +typedef __builtin_va_list = ffi.Pointer; +typedef NSInteger = ffi.Long; +typedef DartNSInteger = int; - /// Returns a [NSDate] that points to the same underlying object as [other]. - static NSDate castFrom(T other) { - return NSDate._(other._id, other._lib, retain: true, release: true); - } +@ffi.Packed(2) +final class wide extends ffi.Struct { + @UInt32() + external int lo; - /// Returns a [NSDate] that wraps the given raw object pointer. - static NSDate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDate._(other, lib, retain: retain, release: release); - } + @SInt32() + external int hi; +} - /// Returns whether [obj] is an instance of [NSDate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSDate1); - } +typedef UInt32 = ffi.UnsignedInt; +typedef DartUInt32 = int; +typedef SInt32 = ffi.Int; +typedef DartSInt32 = int; - DartNSTimeInterval get timeIntervalSinceReferenceDate { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_90_fpret( - _id, _lib._sel_timeIntervalSinceReferenceDate1) - : _lib._objc_msgSend_90(_id, _lib._sel_timeIntervalSinceReferenceDate1); - } +@ffi.Packed(2) +final class UnsignedWide extends ffi.Struct { + @UInt32() + external int lo; - @override - NSDate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @UInt32() + external int hi; +} - NSDate initWithTimeIntervalSinceReferenceDate_(DartNSTimeInterval ti) { - final _ret = _lib._objc_msgSend_366( - _id, _lib._sel_initWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } +final class Float80 extends ffi.Struct { + @SInt16() + external int exp; - NSDate? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } + @ffi.Array.multi([4]) + external ffi.Array man; +} - DartNSTimeInterval timeIntervalSinceDate_(NSDate anotherDate) { - return _lib._objc_msgSend_367( - _id, _lib._sel_timeIntervalSinceDate_1, anotherDate._id); - } +typedef SInt16 = ffi.Short; +typedef DartSInt16 = int; +typedef UInt16 = ffi.UnsignedShort; +typedef DartUInt16 = int; - DartNSTimeInterval get timeIntervalSinceNow { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_timeIntervalSinceNow1) - : _lib._objc_msgSend_90(_id, _lib._sel_timeIntervalSinceNow1); - } +final class Float96 extends ffi.Struct { + @ffi.Array.multi([2]) + external ffi.Array exp; - DartNSTimeInterval get timeIntervalSince1970 { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_timeIntervalSince19701) - : _lib._objc_msgSend_90(_id, _lib._sel_timeIntervalSince19701); - } + @ffi.Array.multi([4]) + external ffi.Array man; +} - NSObject addTimeInterval_(DartNSTimeInterval seconds) { - final _ret = - _lib._objc_msgSend_366(_id, _lib._sel_addTimeInterval_1, seconds); - return NSObject._(_ret, _lib, retain: true, release: true); - } +@ffi.Packed(2) +final class Float32Point extends ffi.Struct { + @Float32() + external double x; - NSDate dateByAddingTimeInterval_(DartNSTimeInterval ti) { - final _ret = - _lib._objc_msgSend_366(_id, _lib._sel_dateByAddingTimeInterval_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @Float32() + external double y; +} - NSDate earlierDate_(NSDate anotherDate) { - final _ret = - _lib._objc_msgSend_368(_id, _lib._sel_earlierDate_1, anotherDate._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } +typedef Float32 = ffi.Float; +typedef DartFloat32 = double; - NSDate laterDate_(NSDate anotherDate) { - final _ret = - _lib._objc_msgSend_368(_id, _lib._sel_laterDate_1, anotherDate._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } +@ffi.Packed(2) +final class ProcessSerialNumber extends ffi.Struct { + @UInt32() + external int highLongOfPSN; - int compare_(NSDate other) { - return _lib._objc_msgSend_369(_id, _lib._sel_compare_1, other._id); - } + @UInt32() + external int lowLongOfPSN; +} - bool isEqualToDate_(NSDate otherDate) { - return _lib._objc_msgSend_370( - _id, _lib._sel_isEqualToDate_1, otherDate._id); - } +final class Point extends ffi.Struct { + @ffi.Short() + external int v; - NSString get description { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_description1); - return NSString._(_ret, _lib, retain: true, release: true); - } + @ffi.Short() + external int h; +} - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _lib._objc_msgSend_93( - _id, _lib._sel_descriptionWithLocale_1, locale?._id ?? ffi.nullptr); - return NSString._(_ret, _lib, retain: true, release: true); - } +final class Rect extends ffi.Struct { + @ffi.Short() + external int top; - static NSDate date(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_date1); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @ffi.Short() + external int left; - static NSDate dateWithTimeIntervalSinceNow_( - NativeCupertinoHttp _lib, DartNSTimeInterval secs) { - final _ret = _lib._objc_msgSend_366( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @ffi.Short() + external int bottom; - static NSDate dateWithTimeIntervalSinceReferenceDate_( - NativeCupertinoHttp _lib, DartNSTimeInterval ti) { - final _ret = _lib._objc_msgSend_366(_lib._class_NSDate1, - _lib._sel_dateWithTimeIntervalSinceReferenceDate_1, ti); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @ffi.Short() + external int right; +} - static NSDate dateWithTimeIntervalSince1970_( - NativeCupertinoHttp _lib, DartNSTimeInterval secs) { - final _ret = _lib._objc_msgSend_366( - _lib._class_NSDate1, _lib._sel_dateWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } +@ffi.Packed(2) +final class FixedPoint extends ffi.Struct { + @Fixed() + external int x; - static NSDate dateWithTimeInterval_sinceDate_( - NativeCupertinoHttp _lib, DartNSTimeInterval secsToBeAdded, NSDate date) { - final _ret = _lib._objc_msgSend_371(_lib._class_NSDate1, - _lib._sel_dateWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @Fixed() + external int y; +} - static NSDate getDistantFuture(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_372(_lib._class_NSDate1, _lib._sel_distantFuture1); - return NSDate._(_ret, _lib, retain: true, release: true); - } +typedef Fixed = SInt32; - static NSDate getDistantPast(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_372(_lib._class_NSDate1, _lib._sel_distantPast1); - return NSDate._(_ret, _lib, retain: true, release: true); - } +@ffi.Packed(2) +final class FixedRect extends ffi.Struct { + @Fixed() + external int left; - static NSDate getNow(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_372(_lib._class_NSDate1, _lib._sel_now1); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @Fixed() + external int top; - NSDate initWithTimeIntervalSinceNow_(DartNSTimeInterval secs) { - final _ret = _lib._objc_msgSend_366( - _id, _lib._sel_initWithTimeIntervalSinceNow_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @Fixed() + external int right; - NSDate initWithTimeIntervalSince1970_(DartNSTimeInterval secs) { - final _ret = _lib._objc_msgSend_366( - _id, _lib._sel_initWithTimeIntervalSince1970_1, secs); - return NSDate._(_ret, _lib, retain: true, release: true); - } + @Fixed() + external int bottom; +} - NSDate initWithTimeInterval_sinceDate_( - DartNSTimeInterval secsToBeAdded, NSDate date) { - final _ret = _lib._objc_msgSend_371(_id, - _lib._sel_initWithTimeInterval_sinceDate_1, secsToBeAdded, date._id); - return NSDate._(_ret, _lib, retain: true, release: true); - } +final class TimeBaseRecord extends ffi.Opaque {} - static NSDate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_new1); - return NSDate._(_ret, _lib, retain: false, release: true); - } +@ffi.Packed(2) +final class TimeRecord extends ffi.Struct { + external CompTimeValue value; - static NSDate allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSDate1, _lib._sel_allocWithZone_1, zone); - return NSDate._(_ret, _lib, retain: false, release: true); - } + @TimeScale() + external int scale; - static NSDate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSDate1, _lib._sel_alloc1); - return NSDate._(_ret, _lib, retain: false, release: true); - } + external TimeBase base; } -class NSURLSessionDataTask extends NSURLSessionTask { - NSURLSessionDataTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CompTimeValue = wide; +typedef TimeScale = SInt32; +typedef TimeBase = ffi.Pointer; - /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. - static NSURLSessionDataTask castFrom(T other) { - return NSURLSessionDataTask._(other._id, other._lib, - retain: true, release: true); - } +final class NumVersion extends ffi.Struct { + @UInt8() + external int nonRelRev; - /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. - static NSURLSessionDataTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDataTask._(other, lib, retain: retain, release: release); - } + @UInt8() + external int stage; - /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionDataTask1); - } + @UInt8() + external int minorAndBugRev; - @override - NSURLSessionDataTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } + @UInt8() + external int majorRev; +} - static NSURLSessionDataTask new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionDataTask1, _lib._sel_new1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); - } +typedef UInt8 = ffi.UnsignedChar; +typedef DartUInt8 = int; - static NSURLSessionDataTask allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionDataTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); - } +final class NumVersionVariant extends ffi.Union { + external NumVersion parts; - static NSURLSessionDataTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDataTask1, _lib._sel_alloc1); - return NSURLSessionDataTask._(_ret, _lib, retain: false, release: true); - } + @UInt32() + external int whole; } -/// NSURLSessionTask - a cancelable object that refers to the lifetime -/// of processing a given request. -class NSURLSessionTask extends NSObject { - NSURLSessionTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. - static NSURLSessionTask castFrom(T other) { - return NSURLSessionTask._(other._id, other._lib, - retain: true, release: true); - } +final class VersRec extends ffi.Struct { + external NumVersion numericVersion; - /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. - static NSURLSessionTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTask._(other, lib, retain: retain, release: release); - } + @ffi.Short() + external int countryCode; - /// Returns whether [obj] is an instance of [NSURLSessionTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTask1); - } + @ffi.Array.multi([256]) + external ffi.Array shortVersion; - /// an identifier for this task, assigned by and unique to the owning session - DartNSUInteger get taskIdentifier { - return _lib._objc_msgSend_12(_id, _lib._sel_taskIdentifier1); - } + @ffi.Array.multi([256]) + external ffi.Array reserved; +} - /// may be nil if this is a stream task - NSURLRequest? get originalRequest { - final _ret = _lib._objc_msgSend_374(_id, _lib._sel_originalRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } +typedef ConstStr255Param = ffi.Pointer; - /// may differ from originalRequest due to http server redirection - NSURLRequest? get currentRequest { - final _ret = _lib._objc_msgSend_374(_id, _lib._sel_currentRequest1); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, _lib, retain: true, release: true); - } +final class __CFString extends ffi.Opaque {} - /// may be nil if no response has been received - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_375(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); - } +typedef CFIndex = ffi.Long; +typedef DartCFIndex = int; - /// Sets a task-specific delegate. Methods not implemented on this delegate will - /// still be forwarded to the session delegate. - /// - /// Cannot be modified after task resumes. Not supported on background session. - /// - /// Delegate is strongly referenced until the task completes, after which it is - /// reset to `nil`. - NSObject? get delegate { - final _ret = _lib._objc_msgSend_61(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } +final class CFRange extends ffi.Struct { + @CFIndex() + external int location; - /// Sets a task-specific delegate. Methods not implemented on this delegate will - /// still be forwarded to the session delegate. - /// - /// Cannot be modified after task resumes. Not supported on background session. - /// - /// Delegate is strongly referenced until the task completes, after which it is - /// reset to `nil`. - set delegate(NSObject? value) { - return _lib._objc_msgSend_349( - _id, _lib._sel_setDelegate_1, value?._id ?? ffi.nullptr); - } + @CFIndex() + external int length; +} - /// NSProgress object which represents the task progress. - /// It can be used for task progress tracking. - NSProgress get progress { - final _ret = _lib._objc_msgSend_392(_id, _lib._sel_progress1); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +final class __CFNull extends ffi.Opaque {} - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - NSDate? get earliestBeginDate { - final _ret = _lib._objc_msgSend_393(_id, _lib._sel_earliestBeginDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } +typedef CFTypeID = ffi.UnsignedLong; +typedef DartCFTypeID = int; +typedef CFNullRef = ffi.Pointer<__CFNull>; - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - set earliestBeginDate(NSDate? value) { - return _lib._objc_msgSend_394( - _id, _lib._sel_setEarliestBeginDate_1, value?._id ?? ffi.nullptr); - } +final class __CFAllocator extends ffi.Opaque {} - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - int get countOfBytesClientExpectsToSend { - return _lib._objc_msgSend_383( - _id, _lib._sel_countOfBytesClientExpectsToSend1); - } +typedef CFAllocatorRef = ffi.Pointer<__CFAllocator>; - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - set countOfBytesClientExpectsToSend(int value) { - return _lib._objc_msgSend_384( - _id, _lib._sel_setCountOfBytesClientExpectsToSend_1, value); - } +final class CFAllocatorContext extends ffi.Struct { + @CFIndex() + external int version; - int get countOfBytesClientExpectsToReceive { - return _lib._objc_msgSend_383( - _id, _lib._sel_countOfBytesClientExpectsToReceive1); - } + external ffi.Pointer info; - set countOfBytesClientExpectsToReceive(int value) { - return _lib._objc_msgSend_384( - _id, _lib._sel_setCountOfBytesClientExpectsToReceive_1, value); - } + external CFAllocatorRetainCallBack retain; - /// number of body bytes already sent - int get countOfBytesSent { - return _lib._objc_msgSend_383(_id, _lib._sel_countOfBytesSent1); - } + external CFAllocatorReleaseCallBack release; - /// number of body bytes already received - int get countOfBytesReceived { - return _lib._objc_msgSend_383(_id, _lib._sel_countOfBytesReceived1); - } + external CFAllocatorCopyDescriptionCallBack copyDescription; - /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request - int get countOfBytesExpectedToSend { - return _lib._objc_msgSend_383(_id, _lib._sel_countOfBytesExpectedToSend1); - } + external CFAllocatorAllocateCallBack allocate; - /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. - int get countOfBytesExpectedToReceive { - return _lib._objc_msgSend_383( - _id, _lib._sel_countOfBytesExpectedToReceive1); - } + external CFAllocatorReallocateCallBack reallocate; - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - NSString? get taskDescription { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_taskDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + external CFAllocatorDeallocateCallBack deallocate; - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - set taskDescription(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setTaskDescription_1, value?._id ?? ffi.nullptr); - } + external CFAllocatorPreferredSizeCallBack preferredSize; +} - /// -cancel returns immediately, but marks a task as being canceled. - /// The task will signal -URLSession:task:didCompleteWithError: with an - /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some - /// cases, the task may signal other work before it acknowledges the - /// cancelation. -cancel may be sent to a task that has been suspended. - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); - } +typedef CFAllocatorRetainCallBack + = ffi.Pointer>; +typedef CFAllocatorRetainCallBackFunction = ffi.Pointer Function( + ffi.Pointer info); +typedef CFAllocatorReleaseCallBack + = ffi.Pointer>; +typedef CFAllocatorReleaseCallBackFunction = ffi.Void Function( + ffi.Pointer info); +typedef DartCFAllocatorReleaseCallBackFunction = void Function( + ffi.Pointer info); +typedef CFAllocatorCopyDescriptionCallBack = ffi + .Pointer>; +typedef CFAllocatorCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer info); +typedef CFStringRef = ffi.Pointer<__CFString>; +typedef CFAllocatorAllocateCallBack + = ffi.Pointer>; +typedef CFAllocatorAllocateCallBackFunction = ffi.Pointer Function( + CFIndex allocSize, CFOptionFlags hint, ffi.Pointer info); +typedef DartCFAllocatorAllocateCallBackFunction + = ffi.Pointer Function(DartCFIndex allocSize, + DartCFOptionFlags hint, ffi.Pointer info); +typedef CFOptionFlags = ffi.UnsignedLong; +typedef DartCFOptionFlags = int; +typedef CFAllocatorReallocateCallBack + = ffi.Pointer>; +typedef CFAllocatorReallocateCallBackFunction = ffi.Pointer Function( + ffi.Pointer ptr, + CFIndex newsize, + CFOptionFlags hint, + ffi.Pointer info); +typedef DartCFAllocatorReallocateCallBackFunction + = ffi.Pointer Function( + ffi.Pointer ptr, + DartCFIndex newsize, + DartCFOptionFlags hint, + ffi.Pointer info); +typedef CFAllocatorDeallocateCallBack + = ffi.Pointer>; +typedef CFAllocatorDeallocateCallBackFunction = ffi.Void Function( + ffi.Pointer ptr, ffi.Pointer info); +typedef DartCFAllocatorDeallocateCallBackFunction = void Function( + ffi.Pointer ptr, ffi.Pointer info); +typedef CFAllocatorPreferredSizeCallBack + = ffi.Pointer>; +typedef CFAllocatorPreferredSizeCallBackFunction = CFIndex Function( + CFIndex size, CFOptionFlags hint, ffi.Pointer info); +typedef DartCFAllocatorPreferredSizeCallBackFunction = DartCFIndex Function( + DartCFIndex size, DartCFOptionFlags hint, ffi.Pointer info); +typedef CFTypeRef = ffi.Pointer; +typedef Boolean = ffi.UnsignedChar; +typedef DartBoolean = int; +typedef CFHashCode = ffi.UnsignedLong; +typedef DartCFHashCode = int; +typedef NSZone = _NSZone; - /// The current state of the task within the session. - int get state { - return _lib._objc_msgSend_396(_id, _lib._sel_state1); - } +/// NSCopying +abstract final class NSCopying { + /// Builds an object that implements the NSCopying protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {required objc.ObjCObjectBase Function(ffi.Pointer) + copyWithZone_}) { + final builder = objc.ObjCProtocolBuilder(); + NSCopying.copyWithZone_.implement(builder, copyWithZone_); + return builder.build(); + } + + /// Adds the implementation of the NSCopying protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {required objc.ObjCObjectBase Function(ffi.Pointer) + copyWithZone_}) { + NSCopying.copyWithZone_.implement(builder, copyWithZone_); + } + + /// copyWithZone: + static final copyWithZone_ = objc.ObjCProtocolMethod< + objc.ObjCObjectBase Function(ffi.Pointer)>( + _sel_copyWithZone_, + objc.getProtocolMethodSignature( + _protocol_NSCopying, + _sel_copyWithZone_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObjectBase Function(ffi.Pointer) func) => + ObjCBlock_objcObjCObject_ffiVoid_NSZone.fromFunction( + (ffi.Pointer _, ffi.Pointer arg1) => func(arg1)), + ); +} + +late final _protocol_NSCopying = objc.getProtocol("NSCopying"); +late final _sel_copyWithZone_ = objc.registerName("copyWithZone:"); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_objcObjCObject_ffiVoid_NSZone { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer)>(pointer, + retain: retain, release: release); - /// The error, if any, delivered via -URLSession:task:didCompleteWithError: - /// This property will be nil in the event that no error occurred. - NSError? get error { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Suspending a task will prevent the NSURLSession from continuing to - /// load data. There may still be delegate calls made on behalf of - /// this task (for instance, to report data received while suspending) - /// but no further transmissions will be made on behalf of the task - /// until -resume is sent. The timeout timer associated with the task - /// will be disabled while a task is suspended. -suspend and -resume are - /// nestable. - void suspend() { - _lib._objc_msgSend_1(_id, _lib._sel_suspend1); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock> Function(ffi.Pointer, ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer) fn) => + objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, arg1).ref.retainAndReturnPointer()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_NSZone_CallExtension + on objc.ObjCBlock< + objc.Retained> Function( + ffi.Pointer, ffi.Pointer)> { + objc.ObjCObjectBase call( + ffi.Pointer arg0, ffi.Pointer arg1) => + objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, arg1), + retain: false, + release: true); +} - void resume() { - _lib._objc_msgSend_1(_id, _lib._sel_resume1); - } +/// NSMutableCopying +abstract final class NSMutableCopying { + /// Builds an object that implements the NSMutableCopying protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {required objc.ObjCObjectBase Function(ffi.Pointer) + mutableCopyWithZone_}) { + final builder = objc.ObjCProtocolBuilder(); + NSMutableCopying.mutableCopyWithZone_ + .implement(builder, mutableCopyWithZone_); + return builder.build(); + } + + /// Adds the implementation of the NSMutableCopying protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {required objc.ObjCObjectBase Function(ffi.Pointer) + mutableCopyWithZone_}) { + NSMutableCopying.mutableCopyWithZone_ + .implement(builder, mutableCopyWithZone_); + } + + /// mutableCopyWithZone: + static final mutableCopyWithZone_ = objc.ObjCProtocolMethod< + objc.ObjCObjectBase Function(ffi.Pointer)>( + _sel_mutableCopyWithZone_, + objc.getProtocolMethodSignature( + _protocol_NSMutableCopying, + _sel_mutableCopyWithZone_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.ObjCObjectBase Function(ffi.Pointer) func) => + ObjCBlock_objcObjCObject_ffiVoid_NSZone.fromFunction( + (ffi.Pointer _, ffi.Pointer arg1) => func(arg1)), + ); +} + +late final _protocol_NSMutableCopying = objc.getProtocol("NSMutableCopying"); +late final _sel_mutableCopyWithZone_ = + objc.registerName("mutableCopyWithZone:"); + +/// NSCoding +abstract final class NSCoding { + /// Builds an object that implements the NSCoding protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {required void Function(objc.NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { + final builder = objc.ObjCProtocolBuilder(); + NSCoding.encodeWithCoder_.implement(builder, encodeWithCoder_); + NSCoding.initWithCoder_.implement(builder, initWithCoder_); + return builder.build(); + } + + /// Adds the implementation of the NSCoding protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {required void Function(objc.NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { + NSCoding.encodeWithCoder_.implement(builder, encodeWithCoder_); + NSCoding.initWithCoder_.implement(builder, initWithCoder_); + } + + /// Builds an object that implements the NSCoding protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {required void Function(objc.NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { + final builder = objc.ObjCProtocolBuilder(); + NSCoding.encodeWithCoder_.implementAsListener(builder, encodeWithCoder_); + NSCoding.initWithCoder_.implement(builder, initWithCoder_); + return builder.build(); + } + + /// Adds the implementation of the NSCoding protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {required void Function(objc.NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { + NSCoding.encodeWithCoder_.implementAsListener(builder, encodeWithCoder_); + NSCoding.initWithCoder_.implement(builder, initWithCoder_); + } + + /// encodeWithCoder: + static final encodeWithCoder_ = + objc.ObjCProtocolListenableMethod( + _sel_encodeWithCoder_, + objc.getProtocolMethodSignature( + _protocol_NSCoding, + _sel_encodeWithCoder_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(objc.NSCoder) func) => + ObjCBlock_ffiVoid_ffiVoid_NSCoder.fromFunction( + (ffi.Pointer _, objc.NSCoder arg1) => func(arg1)), + (void Function(objc.NSCoder) func) => + ObjCBlock_ffiVoid_ffiVoid_NSCoder.listener( + (ffi.Pointer _, objc.NSCoder arg1) => func(arg1)), + ); + + /// initWithCoder: + static final initWithCoder_ = + objc.ObjCProtocolMethod( + _sel_initWithCoder_, + objc.getProtocolMethodSignature( + _protocol_NSCoding, + _sel_initWithCoder_, + isRequired: true, + isInstanceMethod: true, + ), + (Dartinstancetype? Function(objc.NSCoder) func) => + ObjCBlock_instancetype_ffiVoid_NSCoder.fromFunction( + (ffi.Pointer _, objc.NSCoder arg1) => func(arg1)), + ); +} + +late final _protocol_NSCoding = objc.getProtocol("NSCoding"); +late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); +void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, objc.NSCoder)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock, objc.NSCoder)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + objc.NSCoder)>(pointer, retain: retain, release: release); - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. + /// Creates a block from a C function pointer. /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.NSCoder)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, objc.NSCoder)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - double get priority { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_89_fpret(_id, _lib._sel_priority1) - : _lib._objc_msgSend_89(_id, _lib._sel_priority1); - } + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.NSCoder)> + fromFunction(void Function(ffi.Pointer, objc.NSCoder) fn) => + objc.ObjCBlock, objc.NSCoder)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn( + arg0, + objc.NSCoder.castFromPointer(arg1, + retain: true, release: true))), + retain: false, + release: true); - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. + /// Creates a listener block from a Dart function. /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - set priority(double value) { - return _lib._objc_msgSend_397(_id, _lib._sel_setPriority_1, value); + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock, objc.NSCoder)> + listener(void Function(ffi.Pointer, objc.NSCoder) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + objc.NSCoder.castFromPointer(arg1, retain: false, release: true))); + final wrapper = _wrapListenerBlock_sjfpmz(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, objc.NSCoder)>(wrapper, + retain: false, release: true); } +} - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. +/// Call operator for `objc.ObjCBlock, objc.NSCoder)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSCoder_CallExtension + on objc.ObjCBlock, objc.NSCoder)> { + void call(ffi.Pointer arg0, objc.NSCoder arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer); +} + +late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable = + ffi.Pointer.fromFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline) + .cast(); +instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as instancetype Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable = + ffi.Pointer.fromFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>`. +abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, + objc.NSCoder)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - bool get prefersIncrementalDelivery { - return _lib._objc_msgSend_11(_id, _lib._sel_prefersIncrementalDelivery1); - } + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)>( + objc.newPointerBlock( + _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. + /// Creates a block from a Dart function. /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - set prefersIncrementalDelivery(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setPrefersIncrementalDelivery_1, value); - } + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)> fromFunction( + Dartinstancetype? Function(ffi.Pointer, objc.NSCoder) fn) => + objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>( + objc.newClosureBlock( + _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, objc.NSCoder.castFromPointer(arg1, retain: true, release: true)) + ?.ref + .retainAndReturnPointer() ?? + ffi.nullptr), + retain: false, + release: true); +} - @override - NSURLSessionTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTask._(_ret, _lib, retain: true, release: true); - } +/// Call operator for `objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>`. +extension ObjCBlock_instancetype_ffiVoid_NSCoder_CallExtension + on objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)> { + Dartinstancetype? call(ffi.Pointer arg0, objc.NSCoder arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction, ffi.Pointer, ffi.Pointer)>() + (ref.pointer, arg0, arg1.ref.pointer) + .address == + 0 + ? null + : objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0, arg1.ref.pointer), + retain: false, + release: true); +} - static NSURLSessionTask new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_new1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); - } +/// NSSecureCoding +abstract final class NSSecureCoding { + /// Builds an object that implements the NSSecureCoding protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {required bool Function() supportsSecureCoding, + required void Function(objc.NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { + final builder = objc.ObjCProtocolBuilder(); + NSSecureCoding.supportsSecureCoding + .implement(builder, supportsSecureCoding); + NSSecureCoding.encodeWithCoder_.implement(builder, encodeWithCoder_); + NSSecureCoding.initWithCoder_.implement(builder, initWithCoder_); + return builder.build(); + } + + /// Adds the implementation of the NSSecureCoding protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {required bool Function() supportsSecureCoding, + required void Function(objc.NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { + NSSecureCoding.supportsSecureCoding + .implement(builder, supportsSecureCoding); + NSSecureCoding.encodeWithCoder_.implement(builder, encodeWithCoder_); + NSSecureCoding.initWithCoder_.implement(builder, initWithCoder_); + } + + /// Builds an object that implements the NSSecureCoding protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {required bool Function() supportsSecureCoding, + required void Function(objc.NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { + final builder = objc.ObjCProtocolBuilder(); + NSSecureCoding.supportsSecureCoding + .implement(builder, supportsSecureCoding); + NSSecureCoding.encodeWithCoder_ + .implementAsListener(builder, encodeWithCoder_); + NSSecureCoding.initWithCoder_.implement(builder, initWithCoder_); + return builder.build(); + } + + /// Adds the implementation of the NSSecureCoding protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {required bool Function() supportsSecureCoding, + required void Function(objc.NSCoder) encodeWithCoder_, + required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { + NSSecureCoding.supportsSecureCoding + .implement(builder, supportsSecureCoding); + NSSecureCoding.encodeWithCoder_ + .implementAsListener(builder, encodeWithCoder_); + NSSecureCoding.initWithCoder_.implement(builder, initWithCoder_); + } + + /// supportsSecureCoding + static final supportsSecureCoding = objc.ObjCProtocolMethod( + _sel_supportsSecureCoding, + objc.getProtocolMethodSignature( + _protocol_NSSecureCoding, + _sel_supportsSecureCoding, + isRequired: true, + isInstanceMethod: false, + ), + (bool Function() func) => ObjCBlock_bool_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); + + /// encodeWithCoder: + static final encodeWithCoder_ = + objc.ObjCProtocolListenableMethod( + _sel_encodeWithCoder_, + objc.getProtocolMethodSignature( + _protocol_NSSecureCoding, + _sel_encodeWithCoder_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(objc.NSCoder) func) => + ObjCBlock_ffiVoid_ffiVoid_NSCoder.fromFunction( + (ffi.Pointer _, objc.NSCoder arg1) => func(arg1)), + (void Function(objc.NSCoder) func) => + ObjCBlock_ffiVoid_ffiVoid_NSCoder.listener( + (ffi.Pointer _, objc.NSCoder arg1) => func(arg1)), + ); + + /// initWithCoder: + static final initWithCoder_ = + objc.ObjCProtocolMethod( + _sel_initWithCoder_, + objc.getProtocolMethodSignature( + _protocol_NSSecureCoding, + _sel_initWithCoder_, + isRequired: true, + isInstanceMethod: true, + ), + (Dartinstancetype? Function(objc.NSCoder) func) => + ObjCBlock_instancetype_ffiVoid_NSCoder.fromFunction( + (ffi.Pointer _, objc.NSCoder arg1) => func(arg1)), + ); +} + +late final _protocol_NSSecureCoding = objc.getProtocol("NSSecureCoding"); +late final _sel_supportsSecureCoding = + objc.registerName("supportsSecureCoding"); + +/// NSDiscardableContent +abstract final class NSDiscardableContent { + /// Builds an object that implements the NSDiscardableContent protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {required bool Function() beginContentAccess, + required void Function() endContentAccess, + required void Function() discardContentIfPossible, + required bool Function() isContentDiscarded}) { + final builder = objc.ObjCProtocolBuilder(); + NSDiscardableContent.beginContentAccess + .implement(builder, beginContentAccess); + NSDiscardableContent.endContentAccess.implement(builder, endContentAccess); + NSDiscardableContent.discardContentIfPossible + .implement(builder, discardContentIfPossible); + NSDiscardableContent.isContentDiscarded + .implement(builder, isContentDiscarded); + return builder.build(); + } + + /// Adds the implementation of the NSDiscardableContent protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {required bool Function() beginContentAccess, + required void Function() endContentAccess, + required void Function() discardContentIfPossible, + required bool Function() isContentDiscarded}) { + NSDiscardableContent.beginContentAccess + .implement(builder, beginContentAccess); + NSDiscardableContent.endContentAccess.implement(builder, endContentAccess); + NSDiscardableContent.discardContentIfPossible + .implement(builder, discardContentIfPossible); + NSDiscardableContent.isContentDiscarded + .implement(builder, isContentDiscarded); + } + + /// Builds an object that implements the NSDiscardableContent protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {required bool Function() beginContentAccess, + required void Function() endContentAccess, + required void Function() discardContentIfPossible, + required bool Function() isContentDiscarded}) { + final builder = objc.ObjCProtocolBuilder(); + NSDiscardableContent.beginContentAccess + .implement(builder, beginContentAccess); + NSDiscardableContent.endContentAccess + .implementAsListener(builder, endContentAccess); + NSDiscardableContent.discardContentIfPossible + .implementAsListener(builder, discardContentIfPossible); + NSDiscardableContent.isContentDiscarded + .implement(builder, isContentDiscarded); + return builder.build(); + } + + /// Adds the implementation of the NSDiscardableContent protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {required bool Function() beginContentAccess, + required void Function() endContentAccess, + required void Function() discardContentIfPossible, + required bool Function() isContentDiscarded}) { + NSDiscardableContent.beginContentAccess + .implement(builder, beginContentAccess); + NSDiscardableContent.endContentAccess + .implementAsListener(builder, endContentAccess); + NSDiscardableContent.discardContentIfPossible + .implementAsListener(builder, discardContentIfPossible); + NSDiscardableContent.isContentDiscarded + .implement(builder, isContentDiscarded); + } + + /// beginContentAccess + static final beginContentAccess = objc.ObjCProtocolMethod( + _sel_beginContentAccess, + objc.getProtocolMethodSignature( + _protocol_NSDiscardableContent, + _sel_beginContentAccess, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function() func) => ObjCBlock_bool_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); + + /// endContentAccess + static final endContentAccess = + objc.ObjCProtocolListenableMethod( + _sel_endContentAccess, + objc.getProtocolMethodSignature( + _protocol_NSDiscardableContent, + _sel_endContentAccess, + isRequired: true, + isInstanceMethod: true, + ), + (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.listener(( + ffi.Pointer _, + ) => + func()), + ); + + /// discardContentIfPossible + static final discardContentIfPossible = + objc.ObjCProtocolListenableMethod( + _sel_discardContentIfPossible, + objc.getProtocolMethodSignature( + _protocol_NSDiscardableContent, + _sel_discardContentIfPossible, + isRequired: true, + isInstanceMethod: true, + ), + (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.listener(( + ffi.Pointer _, + ) => + func()), + ); + + /// isContentDiscarded + static final isContentDiscarded = objc.ObjCProtocolMethod( + _sel_isContentDiscarded, + objc.getProtocolMethodSignature( + _protocol_NSDiscardableContent, + _sel_isContentDiscarded, + isRequired: true, + isInstanceMethod: true, + ), + (bool Function() func) => ObjCBlock_bool_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); +} + +late final _protocol_NSDiscardableContent = + objc.getProtocol("NSDiscardableContent"); +late final _sel_beginContentAccess = objc.registerName("beginContentAccess"); +late final _sel_endContentAccess = objc.registerName("endContentAccess"); +late final _sel_discardContentIfPossible = + objc.registerName("discardContentIfPossible"); +late final _sel_isContentDiscarded = objc.registerName("isContentDiscarded"); + +/// NSURLCache +class NSURLCache extends objc.NSObject { + NSURLCache._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSURLSessionTask allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); - } + /// Constructs a [NSURLCache] that points to the same underlying object as [other]. + NSURLCache.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - static NSURLSessionTask alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSessionTask1, _lib._sel_alloc1); - return NSURLSessionTask._(_ret, _lib, retain: false, release: true); + /// Constructs a [NSURLCache] that wraps the given raw object pointer. + NSURLCache.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLCache]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCache); } -} -class NSProgress extends NSObject { - NSProgress._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// ! + /// @property sharedURLCache + /// @abstract Returns the shared NSURLCache instance or + /// sets the NSURLCache instance shared by all clients of + /// the current process. This will be the new object returned when + /// calls to the sharedURLCache method are made. + /// @discussion Unless set explicitly through a call to + /// +setSharedURLCache:, this method returns an NSURLCache + /// instance created with the following default values: + ///

    + ///
  • Memory capacity: 4 megabytes (4 * 1024 * 1024 bytes) + ///
  • Disk capacity: 20 megabytes (20 * 1024 * 1024 bytes) + ///
  • Disk path: (user home directory)/Library/Caches/(application bundle id) + ///
+ ///

Users who do not have special caching requirements or + /// constraints should find the default shared cache instance + /// acceptable. If this default shared cache instance is not + /// acceptable, +setSharedURLCache: can be called to set a + /// different NSURLCache instance to be returned from this method. + /// Callers should take care to ensure that the setter is called + /// at a time when no other caller has a reference to the previously-set + /// shared URL cache. This is to prevent storing cache data from + /// becoming unexpectedly unretrievable. + /// @result the shared NSURLCache instance. + static NSURLCache getSharedURLCache() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_sharedURLCache); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSProgress] that points to the same underlying object as [other]. - static NSProgress castFrom(T other) { - return NSProgress._(other._id, other._lib, retain: true, release: true); + /// ! + /// @property sharedURLCache + /// @abstract Returns the shared NSURLCache instance or + /// sets the NSURLCache instance shared by all clients of + /// the current process. This will be the new object returned when + /// calls to the sharedURLCache method are made. + /// @discussion Unless set explicitly through a call to + /// +setSharedURLCache:, this method returns an NSURLCache + /// instance created with the following default values: + ///

    + ///
  • Memory capacity: 4 megabytes (4 * 1024 * 1024 bytes) + ///
  • Disk capacity: 20 megabytes (20 * 1024 * 1024 bytes) + ///
  • Disk path: (user home directory)/Library/Caches/(application bundle id) + ///
+ ///

Users who do not have special caching requirements or + /// constraints should find the default shared cache instance + /// acceptable. If this default shared cache instance is not + /// acceptable, +setSharedURLCache: can be called to set a + /// different NSURLCache instance to be returned from this method. + /// Callers should take care to ensure that the setter is called + /// at a time when no other caller has a reference to the previously-set + /// shared URL cache. This is to prevent storing cache data from + /// becoming unexpectedly unretrievable. + /// @result the shared NSURLCache instance. + static void setSharedURLCache(NSURLCache value) { + return _objc_msgSend_ukcdfq( + _class_NSURLCache, _sel_setSharedURLCache_, value.ref.pointer); } - /// Returns a [NSProgress] that wraps the given raw object pointer. - static NSProgress castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProgress._(other, lib, retain: retain, release: release); + /// ! + /// @method initWithMemoryCapacity:diskCapacity:diskPath: + /// @abstract Initializes an NSURLCache with the given capacity and + /// path. + /// @discussion The returned NSURLCache is backed by disk, so + /// developers can be more liberal with space when choosing the + /// capacity for this kind of cache. A disk cache measured in the tens + /// of megabytes should be acceptable in most cases. + /// @param memoryCapacity the capacity, measured in bytes, for the cache in memory. + /// @param diskCapacity the capacity, measured in bytes, for the cache on disk. + /// @param path the path on disk where the cache data is stored. + /// @result an initialized NSURLCache, with the given capacity, backed + /// by disk. + NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( + DartNSUInteger memoryCapacity, + DartNSUInteger diskCapacity, + objc.NSString? path) { + final _ret = _objc_msgSend_ebb7er( + this.ref.retainAndReturnPointer(), + _sel_initWithMemoryCapacity_diskCapacity_diskPath_, + memoryCapacity, + diskCapacity, + path?.ref.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSProgress]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSProgress1); + /// ! + /// @method initWithMemoryCapacity:diskCapacity:directoryURL: + /// @abstract Initializes an NSURLCache with the given capacity and directory. + /// @param memoryCapacity the capacity, measured in bytes, for the cache in memory. Or 0 to disable memory cache. + /// @param diskCapacity the capacity, measured in bytes, for the cache on disk. Or 0 to disable disk cache. + /// @param directoryURL the path to a directory on disk where the cache data is stored. Or nil for default directory. + /// @result an initialized NSURLCache, with the given capacity, optionally backed by disk. + NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( + DartNSUInteger memoryCapacity, + DartNSUInteger diskCapacity, + objc.NSURL? directoryURL) { + final _ret = _objc_msgSend_ebb7er( + this.ref.retainAndReturnPointer(), + _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, + memoryCapacity, + diskCapacity, + directoryURL?.ref.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - static NSProgress? currentProgress(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_376( - _lib._class_NSProgress1, _lib._sel_currentProgress1); + /// ! + /// @method cachedResponseForRequest: + /// @abstract Returns the NSCachedURLResponse stored in the cache with + /// the given request. + /// @discussion The method returns nil if there is no + /// NSCachedURLResponse stored using the given request. + /// @param request the NSURLRequest to use as a key for the lookup. + /// @result The NSCachedURLResponse stored in the cache with the given + /// request, or nil if there is no NSCachedURLResponse stored with the + /// given request. + NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_cachedResponseForRequest_, request.ref.pointer); return _ret.address == 0 ? null - : NSProgress._(_ret, _lib, retain: true, release: true); - } - - static NSProgress progressWithTotalUnitCount_( - NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_377(_lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - static NSProgress discreteProgressWithTotalUnitCount_( - NativeCupertinoHttp _lib, int unitCount) { - final _ret = _lib._objc_msgSend_377(_lib._class_NSProgress1, - _lib._sel_discreteProgressWithTotalUnitCount_1, unitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + /// ! + /// @method storeCachedResponse:forRequest: + /// @abstract Stores the given NSCachedURLResponse in the cache using + /// the given request. + /// @param cachedResponse The cached response to store. + /// @param request the NSURLRequest to use as a key for the storage. + void storeCachedResponse_forRequest_( + NSCachedURLResponse cachedResponse, NSURLRequest request) { + _objc_msgSend_1tjlcwl( + this.ref.pointer, + _sel_storeCachedResponse_forRequest_, + cachedResponse.ref.pointer, + request.ref.pointer); } - static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( - NativeCupertinoHttp _lib, - int unitCount, - NSProgress parent, - int portionOfParentTotalUnitCount) { - final _ret = _lib._objc_msgSend_378( - _lib._class_NSProgress1, - _lib._sel_progressWithTotalUnitCount_parent_pendingUnitCount_1, - unitCount, - parent._id, - portionOfParentTotalUnitCount); - return NSProgress._(_ret, _lib, retain: true, release: true); + /// ! + /// @method removeCachedResponseForRequest: + /// @abstract Removes the NSCachedURLResponse from the cache that is + /// stored using the given request. + /// @discussion No action is taken if there is no NSCachedURLResponse + /// stored with the given request. + /// @param request the NSURLRequest to use as a key for the lookup. + void removeCachedResponseForRequest_(NSURLRequest request) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponseForRequest_, + request.ref.pointer); } - NSProgress initWithParent_userInfo_( - NSProgress? parentProgressOrNil, NSDictionary? userInfoOrNil) { - final _ret = _lib._objc_msgSend_379( - _id, - _lib._sel_initWithParent_userInfo_1, - parentProgressOrNil?._id ?? ffi.nullptr, - userInfoOrNil?._id ?? ffi.nullptr); - return NSProgress._(_ret, _lib, retain: true, release: true); + /// ! + /// @method removeAllCachedResponses + /// @abstract Clears the given cache, removing all NSCachedURLResponse + /// objects that it stores. + void removeAllCachedResponses() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_removeAllCachedResponses); } - void becomeCurrentWithPendingUnitCount_(int unitCount) { - _lib._objc_msgSend_380( - _id, _lib._sel_becomeCurrentWithPendingUnitCount_1, unitCount); + /// ! + /// @method removeCachedResponsesSince: + /// @abstract Clears the given cache of any cached responses since the provided date. + void removeCachedResponsesSinceDate_(objc.NSDate date) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponsesSinceDate_, + date.ref.pointer); } - void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock_ffiVoid work) { - _lib._objc_msgSend_381( - _id, - _lib._sel_performAsCurrentWithPendingUnitCount_usingBlock_1, - unitCount, - work._id); + /// ! + /// @abstract In-memory capacity of the receiver. + /// @discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary. + /// @result The in-memory capacity, measured in bytes, for the receiver. + DartNSUInteger get memoryCapacity { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_memoryCapacity); } - void resignCurrent() { - _lib._objc_msgSend_1(_id, _lib._sel_resignCurrent1); + /// ! + /// @abstract In-memory capacity of the receiver. + /// @discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary. + /// @result The in-memory capacity, measured in bytes, for the receiver. + set memoryCapacity(DartNSUInteger value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setMemoryCapacity_, value); } - void addChild_withPendingUnitCount_(NSProgress child, int inUnitCount) { - _lib._objc_msgSend_382( - _id, _lib._sel_addChild_withPendingUnitCount_1, child._id, inUnitCount); + /// ! + /// @abstract The on-disk capacity of the receiver. + /// @discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary. + DartNSUInteger get diskCapacity { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_diskCapacity); } - int get totalUnitCount { - return _lib._objc_msgSend_383(_id, _lib._sel_totalUnitCount1); + /// ! + /// @abstract The on-disk capacity of the receiver. + /// @discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary. + set diskCapacity(DartNSUInteger value) { + return _objc_msgSend_1k4zaz5( + this.ref.pointer, _sel_setDiskCapacity_, value); } - set totalUnitCount(int value) { - return _lib._objc_msgSend_384(_id, _lib._sel_setTotalUnitCount_1, value); + /// ! + /// @abstract Returns the current amount of space consumed by the + /// in-memory cache of the receiver. + /// @discussion This size, measured in bytes, indicates the current + /// usage of the in-memory cache. + /// @result the current usage of the in-memory cache of the receiver. + DartNSUInteger get currentMemoryUsage { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_currentMemoryUsage); } - int get completedUnitCount { - return _lib._objc_msgSend_383(_id, _lib._sel_completedUnitCount1); + /// ! + /// @abstract Returns the current amount of space consumed by the + /// on-disk cache of the receiver. + /// @discussion This size, measured in bytes, indicates the current + /// usage of the on-disk cache. + /// @result the current usage of the on-disk cache of the receiver. + DartNSUInteger get currentDiskUsage { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_currentDiskUsage); } - set completedUnitCount(int value) { - return _lib._objc_msgSend_384( - _id, _lib._sel_setCompletedUnitCount_1, value); + /// storeCachedResponse:forDataTask: + void storeCachedResponse_forDataTask_( + NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { + _objc_msgSend_1tjlcwl( + this.ref.pointer, + _sel_storeCachedResponse_forDataTask_, + cachedResponse.ref.pointer, + dataTask.ref.pointer); } - NSString get localizedDescription { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_localizedDescription1); - return NSString._(_ret, _lib, retain: true, release: true); + /// getCachedResponseForDataTask:completionHandler: + void getCachedResponseForDataTask_completionHandler_( + NSURLSessionDataTask dataTask, + objc.ObjCBlock + completionHandler) { + _objc_msgSend_cmbt6k( + this.ref.pointer, + _sel_getCachedResponseForDataTask_completionHandler_, + dataTask.ref.pointer, + completionHandler.ref.pointer); } - set localizedDescription(NSString value) { - return _lib._objc_msgSend_385( - _id, _lib._sel_setLocalizedDescription_1, value._id); + /// removeCachedResponseForDataTask: + void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { + _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_removeCachedResponseForDataTask_, dataTask.ref.pointer); } - NSString get localizedAdditionalDescription { + /// init + NSURLCache init() { final _ret = - _lib._objc_msgSend_32(_id, _lib._sel_localizedAdditionalDescription1); - return NSString._(_ret, _lib, retain: true, release: true); + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - set localizedAdditionalDescription(NSString value) { - return _lib._objc_msgSend_385( - _id, _lib._sel_setLocalizedAdditionalDescription_1, value._id); + /// new + static NSURLCache new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_new); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - bool get cancellable { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancellable1); - } - - set cancellable(bool value) { - return _lib._objc_msgSend_386(_id, _lib._sel_setCancellable_1, value); - } + /// allocWithZone: + static NSURLCache allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSURLCache, _sel_allocWithZone_, zone); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); + } + + /// alloc + static NSURLCache alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_alloc); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSURLCache = objc.getClass("NSURLCache"); +late final _sel_sharedURLCache = objc.registerName("sharedURLCache"); +final _objc_msgSend_1unuoxw = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setSharedURLCache_ = objc.registerName("setSharedURLCache:"); +final _objc_msgSend_ukcdfq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_ = + objc.registerName("initWithMemoryCapacity:diskCapacity:diskPath:"); +final _objc_msgSend_ebb7er = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSUInteger, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_ = + objc.registerName("initWithMemoryCapacity:diskCapacity:directoryURL:"); - bool get pausable { - return _lib._objc_msgSend_11(_id, _lib._sel_isPausable1); - } +/// ! +/// @class NSCachedURLResponse +/// NSCachedURLResponse is a class whose objects functions as a wrapper for +/// objects that are stored in the framework's caching system. +/// It is used to maintain characteristics and attributes of a cached +/// object. +class NSCachedURLResponse extends objc.NSObject { + NSCachedURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - set pausable(bool value) { - return _lib._objc_msgSend_386(_id, _lib._sel_setPausable_1, value); - } + /// Constructs a [NSCachedURLResponse] that points to the same underlying object as [other]. + NSCachedURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); - } + /// Constructs a [NSCachedURLResponse] that wraps the given raw object pointer. + NSCachedURLResponse.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - bool get paused { - return _lib._objc_msgSend_11(_id, _lib._sel_isPaused1); + /// Returns whether [obj] is an instance of [NSCachedURLResponse]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); } - ObjCBlock_ffiVoid? get cancellationHandler { - final _ret = _lib._objc_msgSend_387(_id, _lib._sel_cancellationHandler1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + /// ! + /// @method initWithResponse:data + /// @abstract Initializes an NSCachedURLResponse with the given + /// response and data. + /// @discussion A default NSURLCacheStoragePolicy is used for + /// NSCachedURLResponse objects initialized with this method: + /// NSURLCacheStorageAllowed. + /// @param response a NSURLResponse object. + /// @param data an NSData object representing the URL content + /// corresponding to the given response. + /// @result an initialized NSCachedURLResponse. + NSCachedURLResponse initWithResponse_data_( + NSURLResponse response, objc.NSData data) { + final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), + _sel_initWithResponse_data_, response.ref.pointer, data.ref.pointer); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - set cancellationHandler(ObjCBlock_ffiVoid? value) { - return _lib._objc_msgSend_388( - _id, _lib._sel_setCancellationHandler_1, value?._id ?? ffi.nullptr); + /// ! + /// @method initWithResponse:data:userInfo:storagePolicy: + /// @abstract Initializes an NSCachedURLResponse with the given + /// response, data, user-info dictionary, and storage policy. + /// @param response a NSURLResponse object. + /// @param data an NSData object representing the URL content + /// corresponding to the given response. + /// @param userInfo a dictionary user-specified information to be + /// stored with the NSCachedURLResponse. + /// @param storagePolicy an NSURLCacheStoragePolicy constant. + /// @result an initialized NSCachedURLResponse. + NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( + NSURLResponse response, + objc.NSData data, + objc.NSDictionary? userInfo, + NSURLCacheStoragePolicy storagePolicy) { + final _ret = _objc_msgSend_nhp99d( + this.ref.retainAndReturnPointer(), + _sel_initWithResponse_data_userInfo_storagePolicy_, + response.ref.pointer, + data.ref.pointer, + userInfo?.ref.pointer ?? ffi.nullptr, + storagePolicy.value); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - ObjCBlock_ffiVoid? get pausingHandler { - final _ret = _lib._objc_msgSend_387(_id, _lib._sel_pausingHandler1); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns the response wrapped by this instance. + /// @result The response wrapped by this instance. + NSURLResponse get response { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_response); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - set pausingHandler(ObjCBlock_ffiVoid? value) { - return _lib._objc_msgSend_388( - _id, _lib._sel_setPausingHandler_1, value?._id ?? ffi.nullptr); + /// ! + /// @abstract Returns the data of the receiver. + /// @result The data of the receiver. + objc.NSData get data { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - ObjCBlock_ffiVoid? get resumingHandler { - final _ret = _lib._objc_msgSend_387(_id, _lib._sel_resumingHandler1); + /// ! + /// @abstract Returns the userInfo dictionary of the receiver. + /// @result The userInfo dictionary of the receiver. + objc.NSDictionary? get userInfo { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_userInfo); return _ret.address == 0 ? null - : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); - } - - set resumingHandler(ObjCBlock_ffiVoid? value) { - return _lib._objc_msgSend_388( - _id, _lib._sel_setResumingHandler_1, value?._id ?? ffi.nullptr); - } - - void setUserInfoObject_forKey_( - NSObject? objectOrNil, DartNSProgressUserInfoKey key) { - _lib._objc_msgSend_196(_id, _lib._sel_setUserInfoObject_forKey_1, - objectOrNil?._id ?? ffi.nullptr, key._id); - } - - bool get indeterminate { - return _lib._objc_msgSend_11(_id, _lib._sel_isIndeterminate1); - } - - double get fractionCompleted { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_fractionCompleted1) - : _lib._objc_msgSend_90(_id, _lib._sel_fractionCompleted1); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + /// ! + /// @abstract Returns the NSURLCacheStoragePolicy constant of the receiver. + /// @result The NSURLCacheStoragePolicy constant of the receiver. + NSURLCacheStoragePolicy get storagePolicy { + final _ret = _objc_msgSend_1xh4qg4(this.ref.pointer, _sel_storagePolicy); + return NSURLCacheStoragePolicy.fromValue(_ret); } - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + /// init + NSCachedURLResponse init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - void pause() { - _lib._objc_msgSend_1(_id, _lib._sel_pause1); + /// new + static NSCachedURLResponse new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSCachedURLResponse, _sel_new); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - void resume() { - _lib._objc_msgSend_1(_id, _lib._sel_resume1); + /// allocWithZone: + static NSCachedURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSCachedURLResponse, _sel_allocWithZone_, zone); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - NSDictionary get userInfo { - final _ret = _lib._objc_msgSend_187(_id, _lib._sel_userInfo1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + /// alloc + static NSCachedURLResponse alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSCachedURLResponse, _sel_alloc); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - DartNSProgressKind get kind { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_kind1); - return NSString._(_ret, _lib, retain: true, release: true); + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSCachedURLResponse, _sel_supportsSecureCoding); } - set kind(DartNSProgressKind value) { - return _lib._objc_msgSend_385(_id, _lib._sel_setKind_1, value._id); + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } - NSNumber? get estimatedTimeRemaining { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_estimatedTimeRemaining1); + /// initWithCoder: + NSCachedURLResponse? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + : NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } +} - set estimatedTimeRemaining(NSNumber? value) { - return _lib._objc_msgSend_389( - _id, _lib._sel_setEstimatedTimeRemaining_1, value?._id ?? ffi.nullptr); - } +late final _class_NSCachedURLResponse = objc.getClass("NSCachedURLResponse"); - NSNumber? get throughput { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_throughput1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } +/// NSURLResponse +class NSURLResponse extends objc.NSObject { + NSURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - set throughput(NSNumber? value) { - return _lib._objc_msgSend_389( - _id, _lib._sel_setThroughput_1, value?._id ?? ffi.nullptr); - } + /// Constructs a [NSURLResponse] that points to the same underlying object as [other]. + NSURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - DartNSProgressFileOperationKind get fileOperationKind { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_fileOperationKind1); - return NSString._(_ret, _lib, retain: true, release: true); + /// Constructs a [NSURLResponse] that wraps the given raw object pointer. + NSURLResponse.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLResponse]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLResponse); } - set fileOperationKind(DartNSProgressFileOperationKind value) { - return _lib._objc_msgSend_385( - _id, _lib._sel_setFileOperationKind_1, value._id); + /// ! + /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: + /// @abstract Initialize an NSURLResponse with the provided values. + /// @param URL the URL + /// @param MIMEType the MIME content type of the response + /// @param length the expected content length of the associated data + /// @param name the name of the text encoding for the associated data, if applicable, else nil + /// @result The initialized NSURLResponse. + /// @discussion This is the designated initializer for NSURLResponse. + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + objc.NSURL URL, + objc.NSString? MIMEType, + DartNSInteger length, + objc.NSString? name) { + final _ret = _objc_msgSend_eyseqq( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, + URL.ref.pointer, + MIMEType?.ref.pointer ?? ffi.nullptr, + length, + name?.ref.pointer ?? ffi.nullptr); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - NSURL? get fileURL { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_fileURL1); + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + objc.NSURL? get URL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); return _ret.address == 0 ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - set fileURL(NSURL? value) { - return _lib._objc_msgSend_390( - _id, _lib._sel_setFileURL_1, value?._id ?? ffi.nullptr); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSNumber? get fileTotalCount { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_fileTotalCount1); + /// ! + /// @abstract Returns the MIME type of the receiver. + /// @discussion The MIME type is based on the information provided + /// from an origin source. However, that value may be changed or + /// corrected by a protocol implementation if it can be determined + /// that the origin server or source reported the information + /// incorrectly or imprecisely. An attempt to guess the MIME type may + /// be made if the origin source did not report any such information. + /// @result The MIME type of the receiver. + objc.NSString? get MIMEType { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_MIMEType); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set fileTotalCount(NSNumber? value) { - return _lib._objc_msgSend_389( - _id, _lib._sel_setFileTotalCount_1, value?._id ?? ffi.nullptr); + /// ! + /// @abstract Returns the expected content length of the receiver. + /// @discussion Some protocol implementations report a content length + /// as part of delivering load metadata, but not all protocols + /// guarantee the amount of data that will be delivered in actuality. + /// Hence, this method returns an expected amount. Clients should use + /// this value as an advisory, and should be prepared to deal with + /// either more or less data. + /// @result The expected content length of the receiver, or -1 if + /// there is no expectation that can be arrived at regarding expected + /// content length. + int get expectedContentLength { + return _objc_msgSend_e94jsr(this.ref.pointer, _sel_expectedContentLength); } - NSNumber? get fileCompletedCount { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_fileCompletedCount1); + /// ! + /// @abstract Returns the name of the text encoding of the receiver. + /// @discussion This name will be the actual string reported by the + /// origin source during the course of performing a protocol-specific + /// URL load. Clients can inspect this string and convert it to an + /// NSStringEncoding or CFStringEncoding using the methods and + /// functions made available in the appropriate framework. + /// @result The name of the text encoding of the receiver, or nil if no + /// text encoding was specified. + objc.NSString? get textEncodingName { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textEncodingName); return _ret.address == 0 ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - set fileCompletedCount(NSNumber? value) { - return _lib._objc_msgSend_389( - _id, _lib._sel_setFileCompletedCount_1, value?._id ?? ffi.nullptr); - } - - void publish() { - _lib._objc_msgSend_1(_id, _lib._sel_publish1); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void unpublish() { - _lib._objc_msgSend_1(_id, _lib._sel_unpublish1); - } - - static NSObject addSubscriberForFileURL_withPublishingHandler_( - NativeCupertinoHttp _lib, - NSURL url, - DartNSProgressPublishingHandler publishingHandler) { - final _ret = _lib._objc_msgSend_391( - _lib._class_NSProgress1, - _lib._sel_addSubscriberForFileURL_withPublishingHandler_1, - url._id, - publishingHandler._id); - return NSObject._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns a suggested filename if the resource were saved to disk. + /// @discussion The method first checks if the server has specified a filename using the + /// content disposition header. If no valid filename is specified using that mechanism, + /// this method checks the last path component of the URL. If no valid filename can be + /// obtained using the last path component, this method uses the URL's host as the filename. + /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. + /// In most cases, this method appends the proper file extension based on the MIME type. + /// This method always returns a valid filename. + /// @result A suggested filename to use if saving the resource to disk. + objc.NSString? get suggestedFilename { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_suggestedFilename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void removeSubscriber_(NativeCupertinoHttp _lib, NSObject subscriber) { - _lib._objc_msgSend_210( - _lib._class_NSProgress1, _lib._sel_removeSubscriber_1, subscriber._id); + /// init + NSURLResponse init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - bool get old { - return _lib._objc_msgSend_11(_id, _lib._sel_isOld1); + /// new + static NSURLResponse new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLResponse, _sel_new); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - @override - NSProgress init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSProgress._(_ret, _lib, retain: true, release: true); + /// allocWithZone: + static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSURLResponse, _sel_allocWithZone_, zone); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - static NSProgress new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_new1); - return NSProgress._(_ret, _lib, retain: false, release: true); + /// alloc + static NSURLResponse alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLResponse, _sel_alloc); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - static NSProgress allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSProgress1, _lib._sel_allocWithZone_1, zone); - return NSProgress._(_ret, _lib, retain: false, release: true); + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSURLResponse, _sel_supportsSecureCoding); } - static NSProgress alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSProgress1, _lib._sel_alloc1); - return NSProgress._(_ret, _lib, retain: false, release: true); + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } -} -typedef NSProgressUserInfoKey = ffi.Pointer; -typedef DartNSProgressUserInfoKey = NSString; -typedef NSProgressKind = ffi.Pointer; -typedef DartNSProgressKind = NSString; -typedef NSProgressFileOperationKind = ffi.Pointer; -typedef DartNSProgressFileOperationKind = NSString; -typedef NSProgressPublishingHandler = ffi.Pointer<_ObjCBlock>; -typedef DartNSProgressPublishingHandler - = ObjCBlock_NSProgressUnpublishingHandler_NSProgress; -NSProgressUnpublishingHandler - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer)>()(arg0); -final _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureRegistry = - )>{}; -int _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_registerClosure( - NSProgressUnpublishingHandler Function(ffi.Pointer) fn) { - final id = - ++_ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureRegistryIndex; - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -NSProgressUnpublishingHandler - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_NSProgressUnpublishingHandler_NSProgress - extends _ObjCBlockBase { - ObjCBlock_NSProgressUnpublishingHandler_NSProgress._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgressUnpublishingHandler_NSProgress.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgressUnpublishingHandler_NSProgress.fromFunction( - NativeCupertinoHttp lib, - DartNSProgressUnpublishingHandler Function(NSProgress) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureTrampoline) - .cast(), - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_registerClosure( - (ffi.Pointer arg0) => - fn(NSProgress._(arg0, lib, retain: true, release: true)) - ._retainAndReturnId())), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - DartNSProgressUnpublishingHandler call(NSProgress arg0) => - ObjCBlock_ffiVoid._( - _id.ref.invoke - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0._id), - _lib, - retain: false, - release: true); -} - -typedef NSProgressUnpublishingHandler = ffi.Pointer<_ObjCBlock>; -typedef DartNSProgressUnpublishingHandler = ObjCBlock_ffiVoid; - -abstract class NSURLSessionTaskState { - /// The task is currently being serviced by the session - static const int NSURLSessionTaskStateRunning = 0; - static const int NSURLSessionTaskStateSuspended = 1; - - /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. - static const int NSURLSessionTaskStateCanceling = 2; - - /// The task has completed and the session will receive no more delegate notifications - static const int NSURLSessionTaskStateCompleted = 3; -} - -void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSCachedURLResponse extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSCachedURLResponse._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi - .Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// initWithCoder: + NSURLResponse? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSURLResponse.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSURLResponse = objc.getClass("NSURLResponse"); +late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = + objc.registerName( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); +final _objc_msgSend_eyseqq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_URL = objc.registerName("URL"); +late final _sel_MIMEType = objc.registerName("MIMEType"); +late final _sel_expectedContentLength = + objc.registerName("expectedContentLength"); +final _objc_msgSend_e94jsr = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_textEncodingName = objc.registerName("textEncodingName"); +late final _sel_suggestedFilename = objc.registerName("suggestedFilename"); +late final _sel_init = objc.registerName("init"); +late final _sel_new = objc.registerName("new"); +late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +final _objc_msgSend_1b3ihd0 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>(); +late final _sel_alloc = objc.registerName("alloc"); +final _objc_msgSend_olxnu1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_juohf7 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithResponse_data_ = + objc.registerName("initWithResponse:data:"); +final _objc_msgSend_iq11qg = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunction( - NativeCupertinoHttp lib, void Function(NSCachedURLResponse?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSCachedURLResponse._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +/// ! +/// @enum NSURLCacheStoragePolicy +/// +/// @discussion The NSURLCacheStoragePolicy enum defines constants that +/// can be used to specify the type of storage that is allowable for an +/// NSCachedURLResponse object that is to be stored in an NSURLCache. +/// +/// @constant NSURLCacheStorageAllowed Specifies that storage in an +/// NSURLCache is allowed without restriction. +/// +/// @constant NSURLCacheStorageAllowedInMemoryOnly Specifies that +/// storage in an NSURLCache is allowed; however storage should be +/// done in memory only, no disk storage should be done. +/// +/// @constant NSURLCacheStorageNotAllowed Specifies that storage in an +/// NSURLCache is not allowed in any fashion, either in memory or on +/// disk. +enum NSURLCacheStoragePolicy { + NSURLCacheStorageAllowed(0), + NSURLCacheStorageAllowedInMemoryOnly(1), + NSURLCacheStorageNotAllowed(2); + + final int value; + const NSURLCacheStoragePolicy(this.value); + + static NSURLCacheStoragePolicy fromValue(int value) => switch (value) { + 0 => NSURLCacheStorageAllowed, + 1 => NSURLCacheStorageAllowedInMemoryOnly, + 2 => NSURLCacheStorageNotAllowed, + _ => throw ArgumentError( + "Unknown value for NSURLCacheStoragePolicy: $value"), + }; +} + +late final _sel_initWithResponse_data_userInfo_storagePolicy_ = + objc.registerName("initWithResponse:data:userInfo:storagePolicy:"); +final _objc_msgSend_nhp99d = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_response = objc.registerName("response"); +late final _sel_data = objc.registerName("data"); +late final _sel_userInfo = objc.registerName("userInfo"); +late final _sel_storagePolicy = objc.registerName("storagePolicy"); +final _objc_msgSend_1xh4qg4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); + +/// NSURLRequest +class NSURLRequest extends objc.NSObject { + NSURLRequest._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSCachedURLResponse.listener( - NativeCupertinoHttp lib, void Function(NSCachedURLResponse?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSCachedURLResponse._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSCachedURLResponse? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); -} + /// Constructs a [NSURLRequest] that points to the same underlying object as [other]. + NSURLRequest.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); -class NSNotification extends NSObject { - NSNotification._(ffi.Pointer id, NativeCupertinoHttp lib, + /// Constructs a [NSURLRequest] that wraps the given raw object pointer. + NSURLRequest.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSNotification] that points to the same underlying object as [other]. - static NSNotification castFrom(T other) { - return NSNotification._(other._id, other._lib, retain: true, release: true); - } + : this._(other, retain: retain, release: release); - /// Returns a [NSNotification] that wraps the given raw object pointer. - static NSNotification castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNotification._(other, lib, retain: retain, release: release); + /// Returns whether [obj] is an instance of [NSURLRequest]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLRequest); } - /// Returns whether [obj] is an instance of [NSNotification]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSNotification1); + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_juohf7( + _class_NSURLRequest, _sel_requestWithURL_, URL.ref.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - DartNSNotificationName get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding() { + return _objc_msgSend_olxnu1(_class_NSURLRequest, _sel_supportsSecureCoding); } - NSObject? get object { - final _ret = _lib._objc_msgSend_61(_id, _lib._sel_object1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, + NSURLRequestCachePolicy cachePolicy, + DartNSTimeInterval timeoutInterval) { + final _ret = _objc_msgSend_191svj( + _class_NSURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.ref.pointer, + cachePolicy.value, + timeoutInterval); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_288(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_juohf7( + this.ref.retainAndReturnPointer(), _sel_initWithURL_, URL.ref.pointer); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - NSNotification initWithName_object_userInfo_( - DartNSNotificationName name, NSObject? object, NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_401( - _id, - _lib._sel_initWithName_object_userInfo_1, - name._id, - object?._id ?? ffi.nullptr, - userInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL and + /// cache policy. + /// @discussion This is the designated initializer for the + /// NSURLRequest class. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result An initialized NSURLRequest. + NSURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, + NSURLRequestCachePolicy cachePolicy, DartNSTimeInterval timeoutInterval) { + final _ret = _objc_msgSend_191svj( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.ref.pointer, + cachePolicy.value, + timeoutInterval); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - NSNotification? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + objc.NSURL? get URL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); return _ret.address == 0 ? null - : NSNotification._(_ret, _lib, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSNotification notificationWithName_object_(NativeCupertinoHttp _lib, - DartNSNotificationName aName, NSObject? anObject) { - final _ret = _lib._objc_msgSend_272( - _lib._class_NSNotification1, - _lib._sel_notificationWithName_object_1, - aName._id, - anObject?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns the cache policy of the receiver. + /// @result The cache policy of the receiver. + NSURLRequestCachePolicy get cachePolicy { + final _ret = _objc_msgSend_2xak1q(this.ref.pointer, _sel_cachePolicy); + return NSURLRequestCachePolicy.fromValue(_ret); } - static NSNotification notificationWithName_object_userInfo_( - NativeCupertinoHttp _lib, - DartNSNotificationName aName, - NSObject? anObject, - NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_401( - _lib._class_NSNotification1, - _lib._sel_notificationWithName_object_userInfo_1, - aName._id, - anObject?._id ?? ffi.nullptr, - aUserInfo?._id ?? ffi.nullptr); - return NSNotification._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + /// @result The timeout interval of the receiver. + DartNSTimeInterval get timeoutInterval { + return _objc_msgSend_10noklm(this.ref.pointer, _sel_timeoutInterval); } - @override - NSNotification init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNotification._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract The main document URL associated with this load. + /// @discussion This URL is used for the cookie "same domain as main + /// document" policy, and attributing the request as a sub-resource + /// of a user-specified URL. There may also be other future uses. + /// See setMainDocumentURL: + /// @result The main document URL. + objc.NSURL? get mainDocumentURL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_mainDocumentURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static NSNotification new1(NativeCupertinoHttp _lib) { + /// ! + /// @abstract Returns the NSURLRequestNetworkServiceType associated with this request. + /// @discussion This will return NSURLNetworkServiceTypeDefault for requests that have + /// not explicitly set a networkServiceType (using the setNetworkServiceType method). + /// @result The NSURLRequestNetworkServiceType associated with this request. + NSURLRequestNetworkServiceType get networkServiceType { final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_new1); - return NSNotification._(_ret, _lib, retain: false, release: true); - } - - static NSNotification allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSNotification1, _lib._sel_allocWithZone_1, zone); - return NSNotification._(_ret, _lib, retain: false, release: true); + _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); + return NSURLRequestNetworkServiceType.fromValue(_ret); } - static NSNotification alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotification1, _lib._sel_alloc1); - return NSNotification._(_ret, _lib, retain: false, release: true); + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @result YES if the receiver is allowed to use the built in cellular radios to + /// satisfy the request, NO otherwise. + bool get allowsCellularAccess { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsCellularAccess); } -} - -typedef NSNotificationName = ffi.Pointer; -typedef DartNSNotificationName = NSString; -class NSNotificationCenter extends NSObject { - NSNotificationCenter._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSNotificationCenter] that points to the same underlying object as [other]. - static NSNotificationCenter castFrom(T other) { - return NSNotificationCenter._(other._id, other._lib, - retain: true, release: true); + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @result YES if the receiver is allowed to use an interface marked as expensive to + /// satisfy the request, NO otherwise. + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsExpensiveNetworkAccess); } - /// Returns a [NSNotificationCenter] that wraps the given raw object pointer. - static NSNotificationCenter castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNotificationCenter._(other, lib, retain: retain, release: release); + /// ! + /// @abstract returns whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @result YES if the receiver is allowed to use an interface marked as constrained to + /// satisfy the request, NO otherwise. + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsConstrainedNetworkAccess); } - /// Returns whether [obj] is an instance of [NSNotificationCenter]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSNotificationCenter1); + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + bool get assumesHTTP3Capable { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_assumesHTTP3Capable); } - static NSNotificationCenter getDefaultCenter(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_402( - _lib._class_NSNotificationCenter1, _lib._sel_defaultCenter1); - return NSNotificationCenter._(_ret, _lib, retain: true, release: true); + /// ! + /// @abstract Returns the NSURLRequestAttribution associated with this request. + /// @discussion This will return NSURLRequestAttributionDeveloper for requests that + /// have not explicitly set an attribution. + /// @result The NSURLRequestAttribution associated with this request. + NSURLRequestAttribution get attribution { + final _ret = _objc_msgSend_t5yka9(this.ref.pointer, _sel_attribution); + return NSURLRequestAttribution.fromValue(_ret); } - void addObserver_selector_name_object_( - NSObject observer, - ffi.Pointer aSelector, - DartNSNotificationName aName, - NSObject? anObject) { - _lib._objc_msgSend_403(_id, _lib._sel_addObserver_selector_name_object_1, - observer._id, aSelector, aName._id, anObject?._id ?? ffi.nullptr); + /// ! + /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. + /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, + /// No otherwise. Defaults to NO. + bool get requiresDNSSECValidation { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_requiresDNSSECValidation); } - void postNotification_(NSNotification notification) { - _lib._objc_msgSend_404(_id, _lib._sel_postNotification_1, notification._id); + /// HTTPMethod + objc.NSString? get HTTPMethod { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPMethod); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void postNotificationName_object_( - DartNSNotificationName aName, NSObject? anObject) { - _lib._objc_msgSend_405(_id, _lib._sel_postNotificationName_object_1, - aName._id, anObject?._id ?? ffi.nullptr); + /// allHTTPHeaderFields + objc.NSDictionary? get allHTTPHeaderFields { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allHTTPHeaderFields); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - void postNotificationName_object_userInfo_(DartNSNotificationName aName, - NSObject? anObject, NSDictionary? aUserInfo) { - _lib._objc_msgSend_406( - _id, - _lib._sel_postNotificationName_object_userInfo_1, - aName._id, - anObject?._id ?? ffi.nullptr, - aUserInfo?._id ?? ffi.nullptr); + /// valueForHTTPHeaderField: + objc.NSString? valueForHTTPHeaderField_(objc.NSString field) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_valueForHTTPHeaderField_, field.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void removeObserver_(NSObject observer) { - _lib._objc_msgSend_210(_id, _lib._sel_removeObserver_1, observer._id); + /// HTTPBody + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBody); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - void removeObserver_name_object_( - NSObject observer, DartNSNotificationName aName, NSObject? anObject) { - _lib._objc_msgSend_407(_id, _lib._sel_removeObserver_name_object_1, - observer._id, aName._id, anObject?._id ?? ffi.nullptr); + /// HTTPBodyStream + objc.NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBodyStream); + return _ret.address == 0 + ? null + : objc.NSInputStream.castFromPointer(_ret, retain: true, release: true); } - NSObject addObserverForName_object_queue_usingBlock_( - DartNSNotificationName name, - NSObject? obj, - NSOperationQueue? queue, - ObjCBlock_ffiVoid_NSNotification block) { - final _ret = _lib._objc_msgSend_421( - _id, - _lib._sel_addObserverForName_object_queue_usingBlock_1, - name._id, - obj?._id ?? ffi.nullptr, - queue?._id ?? ffi.nullptr, - block._id); - return NSObject._(_ret, _lib, retain: true, release: true); + /// HTTPShouldHandleCookies + bool get HTTPShouldHandleCookies { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldHandleCookies); } - @override - NSNotificationCenter init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSNotificationCenter._(_ret, _lib, retain: true, release: true); + /// HTTPShouldUsePipelining + bool get HTTPShouldUsePipelining { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldUsePipelining); } - static NSNotificationCenter new1(NativeCupertinoHttp _lib) { + /// init + NSURLRequest init() { final _ret = - _lib._objc_msgSend_2(_lib._class_NSNotificationCenter1, _lib._sel_new1); - return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - static NSNotificationCenter allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSNotificationCenter1, _lib._sel_allocWithZone_1, zone); - return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + /// new + static NSURLRequest new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLRequest, _sel_new); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - static NSNotificationCenter alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSNotificationCenter1, _lib._sel_alloc1); - return NSNotificationCenter._(_ret, _lib, retain: false, release: true); + /// allocWithZone: + static NSURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSURLRequest, _sel_allocWithZone_, zone); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } -} -class NSOperationQueue extends NSObject { - NSOperationQueue._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. - static NSOperationQueue castFrom(T other) { - return NSOperationQueue._(other._id, other._lib, - retain: true, release: true); + /// alloc + static NSURLRequest alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLRequest, _sel_alloc); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } - /// Returns a [NSOperationQueue] that wraps the given raw object pointer. - static NSOperationQueue castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperationQueue._(other, lib, retain: retain, release: release); + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } - /// Returns whether [obj] is an instance of [NSOperationQueue]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSOperationQueue1); + /// initWithCoder: + NSURLRequest? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: false, release: true); } +} - /// @property progress - /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue - /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the - /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the - /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super - /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress - /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% - /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 - /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be - /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by - /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving - /// progress scenario. - /// - /// @example - /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; - /// queue.progress.totalUnitCount = 10; - NSProgress get progress { - final _ret = _lib._objc_msgSend_392(_id, _lib._sel_progress1); - return NSProgress._(_ret, _lib, retain: true, release: true); - } +late final _class_NSURLRequest = objc.getClass("NSURLRequest"); +late final _sel_requestWithURL_ = objc.registerName("requestWithURL:"); + +/// ! +/// @enum NSURLRequestCachePolicy +/// +/// @discussion The NSURLRequestCachePolicy enum defines constants that +/// can be used to specify the type of interactions that take place with +/// the caching system when the URL loading system processes a request. +/// Specifically, these constants cover interactions that have to do +/// with whether already-existing cache data is returned to satisfy a +/// URL load request. +/// +/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the +/// caching logic defined in the protocol implementation, if any, is +/// used for a particular URL load request. This is the default policy +/// for URL load requests. +/// +/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the +/// data for the URL load should be loaded from the origin source. No +/// existing local cache data, regardless of its freshness or validity, +/// should be used to satisfy a URL load request. +/// +/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that +/// not only should the local cache data be ignored, but that proxies and +/// other intermediates should be instructed to disregard their caches +/// so far as the protocol allows. +/// +/// @constant NSURLRequestReloadIgnoringCacheData Older name for +/// NSURLRequestReloadIgnoringLocalCacheData. +/// +/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, +/// the URL is loaded from the origin source. +/// +/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, no +/// attempt is made to load the URL from the origin source, and the +/// load is considered to have failed. This constant specifies a +/// behavior that is similar to an "offline" mode. +/// +/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that +/// the existing cache data may be used provided the origin source +/// confirms its validity, otherwise the URL is loaded from the +/// origin source. +enum NSURLRequestCachePolicy { + NSURLRequestUseProtocolCachePolicy(0), + NSURLRequestReloadIgnoringLocalCacheData(1), + NSURLRequestReloadIgnoringLocalAndRemoteCacheData(4), + NSURLRequestReturnCacheDataElseLoad(2), + NSURLRequestReturnCacheDataDontLoad(3), + NSURLRequestReloadRevalidatingCacheData(5); + + static const NSURLRequestReloadIgnoringCacheData = + NSURLRequestReloadIgnoringLocalCacheData; + + final int value; + const NSURLRequestCachePolicy(this.value); + + static NSURLRequestCachePolicy fromValue(int value) => switch (value) { + 0 => NSURLRequestUseProtocolCachePolicy, + 1 => NSURLRequestReloadIgnoringLocalCacheData, + 4 => NSURLRequestReloadIgnoringLocalAndRemoteCacheData, + 2 => NSURLRequestReturnCacheDataElseLoad, + 3 => NSURLRequestReturnCacheDataDontLoad, + 5 => NSURLRequestReloadRevalidatingCacheData, + _ => throw ArgumentError( + "Unknown value for NSURLRequestCachePolicy: $value"), + }; - void addOperation_(NSOperation op) { - _lib._objc_msgSend_408(_id, _lib._sel_addOperation_1, op._id); + @override + String toString() { + if (this == NSURLRequestReloadIgnoringLocalCacheData) + return "NSURLRequestCachePolicy.NSURLRequestReloadIgnoringLocalCacheData, NSURLRequestCachePolicy.NSURLRequestReloadIgnoringCacheData"; + return super.toString(); } +} - void addOperations_waitUntilFinished_(NSArray ops, bool wait) { - _lib._objc_msgSend_414( - _id, _lib._sel_addOperations_waitUntilFinished_1, ops._id, wait); - } +typedef NSTimeInterval = ffi.Double; +typedef DartNSTimeInterval = double; +late final _sel_requestWithURL_cachePolicy_timeoutInterval_ = + objc.registerName("requestWithURL:cachePolicy:timeoutInterval:"); +final _objc_msgSend_191svj = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSTimeInterval)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + double)>(); +late final _sel_initWithURL_ = objc.registerName("initWithURL:"); +late final _sel_initWithURL_cachePolicy_timeoutInterval_ = + objc.registerName("initWithURL:cachePolicy:timeoutInterval:"); +late final _sel_cachePolicy = objc.registerName("cachePolicy"); +final _objc_msgSend_2xak1q = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_timeoutInterval = objc.registerName("timeoutInterval"); +final _objc_msgSend_10noklm = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSTimeInterval Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_mainDocumentURL = objc.registerName("mainDocumentURL"); - void addOperationWithBlock_(ObjCBlock_ffiVoid block) { - _lib._objc_msgSend_415(_id, _lib._sel_addOperationWithBlock_1, block._id); - } +/// ! +/// @enum NSURLRequestNetworkServiceType +/// +/// @discussion The NSURLRequestNetworkServiceType enum defines constants that +/// can be used to specify the service type to associate with this request. The +/// service type is used to provide the networking layers a hint of the purpose +/// of the request. +/// +/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest +/// when created. This value should be left unchanged for the vast majority of requests. +/// +/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP +/// control traffic. +/// +/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video +/// traffic. +/// +/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background +/// traffic (such as a file download). +/// +/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. +/// +/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. +/// +/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. +enum NSURLRequestNetworkServiceType { + /// Standard internet traffic + NSURLNetworkServiceTypeDefault(0), - /// @method addBarrierBlock: - /// @param barrier A block to execute - /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and - /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the - /// `dispatch_barrier_async` function. - void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { - _lib._objc_msgSend_415(_id, _lib._sel_addBarrierBlock_1, barrier._id); - } + /// Voice over IP control traffic + NSURLNetworkServiceTypeVoIP(1), - DartNSInteger get maxConcurrentOperationCount { - return _lib._objc_msgSend_86(_id, _lib._sel_maxConcurrentOperationCount1); - } + /// Video traffic + NSURLNetworkServiceTypeVideo(2), - set maxConcurrentOperationCount(DartNSInteger value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setMaxConcurrentOperationCount_1, value); - } + /// Background traffic + NSURLNetworkServiceTypeBackground(3), - bool get suspended { - return _lib._objc_msgSend_11(_id, _lib._sel_isSuspended1); - } + /// Voice data + NSURLNetworkServiceTypeVoice(4), - set suspended(bool value) { - return _lib._objc_msgSend_386(_id, _lib._sel_setSuspended_1, value); - } + /// Responsive data + NSURLNetworkServiceTypeResponsiveData(6), - NSString? get name { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_name1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Multimedia Audio/Video Streaming + NSURLNetworkServiceTypeAVStreaming(8), - set name(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); - } + /// Responsive Multimedia Audio/Video + NSURLNetworkServiceTypeResponsiveAV(9), - int get qualityOfService { - return _lib._objc_msgSend_412(_id, _lib._sel_qualityOfService1); - } + /// Call Signaling + NSURLNetworkServiceTypeCallSignaling(11); + + final int value; + const NSURLRequestNetworkServiceType(this.value); + + static NSURLRequestNetworkServiceType fromValue(int value) => switch (value) { + 0 => NSURLNetworkServiceTypeDefault, + 1 => NSURLNetworkServiceTypeVoIP, + 2 => NSURLNetworkServiceTypeVideo, + 3 => NSURLNetworkServiceTypeBackground, + 4 => NSURLNetworkServiceTypeVoice, + 6 => NSURLNetworkServiceTypeResponsiveData, + 8 => NSURLNetworkServiceTypeAVStreaming, + 9 => NSURLNetworkServiceTypeResponsiveAV, + 11 => NSURLNetworkServiceTypeCallSignaling, + _ => throw ArgumentError( + "Unknown value for NSURLRequestNetworkServiceType: $value"), + }; +} + +late final _sel_networkServiceType = objc.registerName("networkServiceType"); +final _objc_msgSend_ttt73t = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allowsCellularAccess = + objc.registerName("allowsCellularAccess"); +late final _sel_allowsExpensiveNetworkAccess = + objc.registerName("allowsExpensiveNetworkAccess"); +late final _sel_allowsConstrainedNetworkAccess = + objc.registerName("allowsConstrainedNetworkAccess"); +late final _sel_assumesHTTP3Capable = objc.registerName("assumesHTTP3Capable"); - set qualityOfService(int value) { - return _lib._objc_msgSend_413(_id, _lib._sel_setQualityOfService_1, value); - } +/// ! +/// @enum NSURLRequestAttribution +/// +/// @discussion The NSURLRequestAttribution enum is used to indicate whether the +/// user or developer specified the URL. +/// +/// @constant NSURLRequestAttributionDeveloper Indicates that the URL was specified +/// by the developer. This is the default value for an NSURLRequest when created. +/// +/// @constant NSURLRequestAttributionUser Indicates that the URL was specified by +/// the user. +enum NSURLRequestAttribution { + NSURLRequestAttributionDeveloper(0), + NSURLRequestAttributionUser(1); + + final int value; + const NSURLRequestAttribution(this.value); + + static NSURLRequestAttribution fromValue(int value) => switch (value) { + 0 => NSURLRequestAttributionDeveloper, + 1 => NSURLRequestAttributionUser, + _ => throw ArgumentError( + "Unknown value for NSURLRequestAttribution: $value"), + }; +} + +late final _sel_attribution = objc.registerName("attribution"); +final _objc_msgSend_t5yka9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_requiresDNSSECValidation = + objc.registerName("requiresDNSSECValidation"); +late final _sel_HTTPMethod = objc.registerName("HTTPMethod"); +late final _sel_allHTTPHeaderFields = objc.registerName("allHTTPHeaderFields"); +late final _sel_valueForHTTPHeaderField_ = + objc.registerName("valueForHTTPHeaderField:"); +late final _sel_HTTPBody = objc.registerName("HTTPBody"); +late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); +late final _sel_HTTPShouldHandleCookies = + objc.registerName("HTTPShouldHandleCookies"); +late final _sel_HTTPShouldUsePipelining = + objc.registerName("HTTPShouldUsePipelining"); +late final _sel_cachedResponseForRequest_ = + objc.registerName("cachedResponseForRequest:"); +late final _sel_storeCachedResponse_forRequest_ = + objc.registerName("storeCachedResponse:forRequest:"); +final _objc_msgSend_1tjlcwl = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeCachedResponseForRequest_ = + objc.registerName("removeCachedResponseForRequest:"); +late final _sel_removeAllCachedResponses = + objc.registerName("removeAllCachedResponses"); +final _objc_msgSend_ksby9f = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeCachedResponsesSinceDate_ = + objc.registerName("removeCachedResponsesSinceDate:"); +late final _sel_memoryCapacity = objc.registerName("memoryCapacity"); +final _objc_msgSend_eldhrq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMemoryCapacity_ = objc.registerName("setMemoryCapacity:"); +final _objc_msgSend_1k4zaz5 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_diskCapacity = objc.registerName("diskCapacity"); +late final _sel_setDiskCapacity_ = objc.registerName("setDiskCapacity:"); +late final _sel_currentMemoryUsage = objc.registerName("currentMemoryUsage"); +late final _sel_currentDiskUsage = objc.registerName("currentDiskUsage"); + +/// NSURLSessionDataTask +class NSURLSessionDataTask extends NSURLSessionTask { + NSURLSessionDataTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// actually retain - dispatch_queue_t get underlyingQueue { - return _lib._objc_msgSend_417(_id, _lib._sel_underlyingQueue1); - } + /// Constructs a [NSURLSessionDataTask] that points to the same underlying object as [other]. + NSURLSessionDataTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// actually retain - set underlyingQueue(dispatch_queue_t value) { - return _lib._objc_msgSend_418(_id, _lib._sel_setUnderlyingQueue_1, value); - } + /// Constructs a [NSURLSessionDataTask] that wraps the given raw object pointer. + NSURLSessionDataTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - void cancelAllOperations() { - _lib._objc_msgSend_1(_id, _lib._sel_cancelAllOperations1); + /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); } - void waitUntilAllOperationsAreFinished() { - _lib._objc_msgSend_1(_id, _lib._sel_waitUntilAllOperationsAreFinished1); + /// init + NSURLSessionDataTask init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } - static NSOperationQueue? getCurrentQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_419( - _lib._class_NSOperationQueue1, _lib._sel_currentQueue1); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, _lib, retain: true, release: true); + /// new + static NSURLSessionDataTask new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDataTask, _sel_new); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } - static NSOperationQueue getMainQueue(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_420( - _lib._class_NSOperationQueue1, _lib._sel_mainQueue1); - return NSOperationQueue._(_ret, _lib, retain: true, release: true); + /// allocWithZone: + static NSURLSessionDataTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionDataTask, _sel_allocWithZone_, zone); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } - /// These two functions are inherently a race condition and should be avoided if possible - NSArray get operations { - final _ret = _lib._objc_msgSend_169(_id, _lib._sel_operations1); - return NSArray._(_ret, _lib, retain: true, release: true); + /// alloc + static NSURLSessionDataTask alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDataTask, _sel_alloc); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } +} - DartNSUInteger get operationCount { - return _lib._objc_msgSend_12(_id, _lib._sel_operationCount1); - } +late final _class_NSURLSessionDataTask = objc.getClass("NSURLSessionDataTask"); - @override - NSOperationQueue init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOperationQueue._(_ret, _lib, retain: true, release: true); - } +/// NSURLSessionTask - a cancelable object that refers to the lifetime +/// of processing a given request. +class NSURLSessionTask extends objc.NSObject { + NSURLSessionTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSOperationQueue new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_new1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); - } + /// Constructs a [NSURLSessionTask] that points to the same underlying object as [other]. + NSURLSessionTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - static NSOperationQueue allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOperationQueue1, _lib._sel_allocWithZone_1, zone); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); - } + /// Constructs a [NSURLSessionTask] that wraps the given raw object pointer. + NSURLSessionTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSOperationQueue alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperationQueue1, _lib._sel_alloc1); - return NSOperationQueue._(_ret, _lib, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionTask); } -} - -class NSOperation extends NSObject { - NSOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSOperation] that points to the same underlying object as [other]. - static NSOperation castFrom(T other) { - return NSOperation._(other._id, other._lib, retain: true, release: true); + /// an identifier for this task, assigned by and unique to the owning session + DartNSUInteger get taskIdentifier { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_taskIdentifier); } - /// Returns a [NSOperation] that wraps the given raw object pointer. - static NSOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperation._(other, lib, retain: retain, release: release); + /// may be nil if this is a stream task + NSURLRequest? get originalRequest { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_originalRequest); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSOperation1); + /// may differ from originalRequest due to http server redirection + NSURLRequest? get currentRequest { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentRequest); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - void start() { - _lib._objc_msgSend_1(_id, _lib._sel_start1); + /// may be nil if no response has been received + NSURLResponse? get response { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_response); + return _ret.address == 0 + ? null + : NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - void main() { - _lib._objc_msgSend_1(_id, _lib._sel_main1); + /// Sets a task-specific delegate. Methods not implemented on this delegate will + /// still be forwarded to the session delegate. + /// + /// Cannot be modified after task resumes. Not supported on background session. + /// + /// Delegate is strongly referenced until the task completes, after which it is + /// reset to `nil`. + objc.ObjCObjectBase? get delegate { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - bool get cancelled { - return _lib._objc_msgSend_11(_id, _lib._sel_isCancelled1); + /// Sets a task-specific delegate. Methods not implemented on this delegate will + /// still be forwarded to the session delegate. + /// + /// Cannot be modified after task resumes. Not supported on background session. + /// + /// Delegate is strongly referenced until the task completes, after which it is + /// reset to `nil`. + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } - void cancel() { - _lib._objc_msgSend_1(_id, _lib._sel_cancel1); + /// NSProgress object which represents the task progress. + /// It can be used for task progress tracking. + NSProgress get progress { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_progress); + return NSProgress.castFromPointer(_ret, retain: true, release: true); } - bool get executing { - return _lib._objc_msgSend_11(_id, _lib._sel_isExecuting1); + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + objc.NSDate? get earliestBeginDate { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_earliestBeginDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - bool get finished { - return _lib._objc_msgSend_11(_id, _lib._sel_isFinished1); + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + set earliestBeginDate(objc.NSDate? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setEarliestBeginDate_, + value?.ref.pointer ?? ffi.nullptr); } - /// To be deprecated; use and override 'asynchronous' below - bool get concurrent { - return _lib._objc_msgSend_11(_id, _lib._sel_isConcurrent1); + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + int get countOfBytesClientExpectsToSend { + return _objc_msgSend_1voti03( + this.ref.pointer, _sel_countOfBytesClientExpectsToSend); } - bool get asynchronous { - return _lib._objc_msgSend_11(_id, _lib._sel_isAsynchronous1); + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + set countOfBytesClientExpectsToSend(int value) { + return _objc_msgSend_rrr3q( + this.ref.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); } - bool get ready { - return _lib._objc_msgSend_11(_id, _lib._sel_isReady1); + /// countOfBytesClientExpectsToReceive + int get countOfBytesClientExpectsToReceive { + return _objc_msgSend_1voti03( + this.ref.pointer, _sel_countOfBytesClientExpectsToReceive); } - void addDependency_(NSOperation op) { - _lib._objc_msgSend_408(_id, _lib._sel_addDependency_1, op._id); + /// setCountOfBytesClientExpectsToReceive: + set countOfBytesClientExpectsToReceive(int value) { + return _objc_msgSend_rrr3q( + this.ref.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); } - void removeDependency_(NSOperation op) { - _lib._objc_msgSend_408(_id, _lib._sel_removeDependency_1, op._id); + /// number of body bytes already sent + int get countOfBytesSent { + return _objc_msgSend_1voti03(this.ref.pointer, _sel_countOfBytesSent); } - NSArray get dependencies { - final _ret = _lib._objc_msgSend_169(_id, _lib._sel_dependencies1); - return NSArray._(_ret, _lib, retain: true, release: true); + /// number of body bytes already received + int get countOfBytesReceived { + return _objc_msgSend_1voti03(this.ref.pointer, _sel_countOfBytesReceived); } - int get queuePriority { - return _lib._objc_msgSend_409(_id, _lib._sel_queuePriority1); + /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request + int get countOfBytesExpectedToSend { + return _objc_msgSend_1voti03( + this.ref.pointer, _sel_countOfBytesExpectedToSend); } - set queuePriority(int value) { - return _lib._objc_msgSend_410(_id, _lib._sel_setQueuePriority_1, value); + /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. + int get countOfBytesExpectedToReceive { + return _objc_msgSend_1voti03( + this.ref.pointer, _sel_countOfBytesExpectedToReceive); } - ObjCBlock_ffiVoid? get completionBlock { - final _ret = _lib._objc_msgSend_387(_id, _lib._sel_completionBlock1); + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + objc.NSString? get taskDescription { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_taskDescription); return _ret.address == 0 ? null - : ObjCBlock_ffiVoid._(_ret, _lib, retain: true, release: true); - } - - set completionBlock(ObjCBlock_ffiVoid? value) { - return _lib._objc_msgSend_388( - _id, _lib._sel_setCompletionBlock_1, value?._id ?? ffi.nullptr); - } - - void waitUntilFinished() { - _lib._objc_msgSend_1(_id, _lib._sel_waitUntilFinished1); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - double get threadPriority { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_threadPriority1) - : _lib._objc_msgSend_90(_id, _lib._sel_threadPriority1); - } - - set threadPriority(double value) { - return _lib._objc_msgSend_411(_id, _lib._sel_setThreadPriority_1, value); + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + set taskDescription(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTaskDescription_, + value?.ref.pointer ?? ffi.nullptr); } - int get qualityOfService { - return _lib._objc_msgSend_412(_id, _lib._sel_qualityOfService1); + /// -cancel returns immediately, but marks a task as being canceled. + /// The task will signal -URLSession:task:didCompleteWithError: with an + /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some + /// cases, the task may signal other work before it acknowledges the + /// cancelation. -cancel may be sent to a task that has been suspended. + void cancel() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); } - set qualityOfService(int value) { - return _lib._objc_msgSend_413(_id, _lib._sel_setQualityOfService_1, value); + /// The current state of the task within the session. + NSURLSessionTaskState get state { + final _ret = _objc_msgSend_8b7yc1(this.ref.pointer, _sel_state); + return NSURLSessionTaskState.fromValue(_ret); } - NSString? get name { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_name1); + /// The error, if any, delivered via -URLSession:task:didCompleteWithError: + /// This property will be nil in the event that no error occurred. + objc.NSError? get error { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_error); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set name(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setName_1, value?._id ?? ffi.nullptr); - } - - @override - NSOperation init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSOperation._(_ret, _lib, retain: true, release: true); - } - - static NSOperation new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_new1); - return NSOperation._(_ret, _lib, retain: false, release: true); + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } - static NSOperation allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSOperation1, _lib._sel_allocWithZone_1, zone); - return NSOperation._(_ret, _lib, retain: false, release: true); + /// Suspending a task will prevent the NSURLSession from continuing to + /// load data. There may still be delegate calls made on behalf of + /// this task (for instance, to report data received while suspending) + /// but no further transmissions will be made on behalf of the task + /// until -resume is sent. The timeout timer associated with the task + /// will be disabled while a task is suspended. -suspend and -resume are + /// nestable. + void suspend() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_suspend); } - static NSOperation alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSOperation1, _lib._sel_alloc1); - return NSOperation._(_ret, _lib, retain: false, release: true); + /// resume + void resume() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); } -} - -abstract class NSOperationQueuePriority { - static const int NSOperationQueuePriorityVeryLow = -8; - static const int NSOperationQueuePriorityLow = -4; - static const int NSOperationQueuePriorityNormal = 0; - static const int NSOperationQueuePriorityHigh = 4; - static const int NSOperationQueuePriorityVeryHigh = 8; -} - -typedef dispatch_queue_t = ffi.Pointer; - -final class dispatch_queue_s extends ffi.Opaque {} - -void _ObjCBlock_ffiVoid_NSNotification_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSNotification_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSNotification_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSNotification_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSNotification_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSNotification_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSNotification_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSNotification_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSNotification extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSNotification._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - /// Creates a block from a C function pointer. + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSNotification.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSNotification_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSNotification.fromFunction( - NativeCupertinoHttp lib, void Function(NSNotification) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSNotification_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSNotification_registerClosure((ffi - .Pointer - arg0) => - fn(NSNotification._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + double get priority { + return objc.useMsgSendVariants + ? _objc_msgSend_fcilgxFpret(this.ref.pointer, _sel_priority) + : _objc_msgSend_fcilgx(this.ref.pointer, _sel_priority); + } - /// Creates a listener block from a Dart function. + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSNotification.listener( - NativeCupertinoHttp lib, void Function(NSNotification) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSNotification_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSNotification_registerClosure( - (ffi.Pointer arg0) => fn(NSNotification._( - arg0, lib, - retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSNotification arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0._id); -} - -/// ! -/// @class NSMutableURLRequest -/// -/// @abstract An NSMutableURLRequest object represents a mutable URL load -/// request in a manner independent of protocol and URL scheme. -/// -/// @discussion This specialization of NSURLRequest is provided to aid -/// developers who may find it more convenient to mutate a single request -/// object for a series of URL loads instead of creating an immutable -/// NSURLRequest for each load. This programming model is supported by -/// the following contract stipulation between NSMutableURLRequest and -/// NSURLConnection: NSURLConnection makes a deep copy of each -/// NSMutableURLRequest object passed to one of its initializers. -///

NSMutableURLRequest is designed to be extended to support -/// protocol-specific data by adding categories to access a property -/// object provided in an interface targeted at protocol implementors. -///

    -///
  • Protocol implementors should direct their attention to the -/// NSMutableURLRequestExtensibility category on -/// NSMutableURLRequest for more information on how to provide -/// extensions on NSMutableURLRequest to support protocol-specific -/// request information. -///
  • Clients of this API who wish to create NSMutableURLRequest -/// objects to load URL content should consult the protocol-specific -/// NSMutableURLRequest categories that are available. The -/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an -/// example. -///
-class NSMutableURLRequest extends NSURLRequest { - NSMutableURLRequest._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. - static NSMutableURLRequest castFrom(T other) { - return NSMutableURLRequest._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. - static NSMutableURLRequest castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableURLRequest._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableURLRequest]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableURLRequest1); - } - - /// ! - /// @abstract The URL of the receiver. - @override - NSURL? get URL { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } - - /// ! - /// @abstract The URL of the receiver. - set URL(NSURL? value) { - return _lib._objc_msgSend_390( - _id, _lib._sel_setURL_1, value?._id ?? ffi.nullptr); - } - - /// ! - /// @abstract The cache policy of the receiver. - @override - int get cachePolicy { - return _lib._objc_msgSend_344(_id, _lib._sel_cachePolicy1); - } - - /// ! - /// @abstract The cache policy of the receiver. - set cachePolicy(int value) { - return _lib._objc_msgSend_422(_id, _lib._sel_setCachePolicy_1, value); + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + set priority(double value) { + return _objc_msgSend_s9gjzc(this.ref.pointer, _sel_setPriority_, value); } - /// ! - /// @abstract Sets the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - @override - DartNSTimeInterval get timeoutInterval { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_timeoutInterval1) - : _lib._objc_msgSend_90(_id, _lib._sel_timeoutInterval1); + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + bool get prefersIncrementalDelivery { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_prefersIncrementalDelivery); } - /// ! - /// @abstract Sets the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - set timeoutInterval(DartNSTimeInterval value) { - return _lib._objc_msgSend_411(_id, _lib._sel_setTimeoutInterval_1, value); + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + set prefersIncrementalDelivery(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setPrefersIncrementalDelivery_, value); } - /// ! - /// @abstract Sets the main document URL - /// @discussion The caller should pass the URL for an appropriate main - /// document, if known. For example, when loading a web page, the URL - /// of the main html document for the top-level frame should be - /// passed. This main document is used to implement the cookie "only - /// from same domain as main document" policy, attributing this request - /// as a sub-resource of a user-specified URL, and possibly other things - /// in the future. - @override - NSURL? get mainDocumentURL { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_mainDocumentURL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); + /// init + NSURLSessionTask init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } - /// ! - /// @abstract Sets the main document URL - /// @discussion The caller should pass the URL for an appropriate main - /// document, if known. For example, when loading a web page, the URL - /// of the main html document for the top-level frame should be - /// passed. This main document is used to implement the cookie "only - /// from same domain as main document" policy, attributing this request - /// as a sub-resource of a user-specified URL, and possibly other things - /// in the future. - set mainDocumentURL(NSURL? value) { - return _lib._objc_msgSend_390( - _id, _lib._sel_setMainDocumentURL_1, value?._id ?? ffi.nullptr); + /// new + static NSURLSessionTask new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionTask, _sel_new); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } - /// ! - /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request - /// @discussion This method is used to provide the network layers with a hint as to the purpose - /// of the request. Most clients should not need to use this method. - @override - int get networkServiceType { - return _lib._objc_msgSend_345(_id, _lib._sel_networkServiceType1); + /// allocWithZone: + static NSURLSessionTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionTask, _sel_allocWithZone_, zone); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } - /// ! - /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request - /// @discussion This method is used to provide the network layers with a hint as to the purpose - /// of the request. Most clients should not need to use this method. - set networkServiceType(int value) { - return _lib._objc_msgSend_423( - _id, _lib._sel_setNetworkServiceType_1, value); + /// alloc + static NSURLSessionTask alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionTask, _sel_alloc); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } +} - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @discussion NO if the receiver should not be allowed to use the built in - /// cellular radios to satisfy the request, YES otherwise. The default is YES. - @override - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } +late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); +late final _sel_taskIdentifier = objc.registerName("taskIdentifier"); +late final _sel_originalRequest = objc.registerName("originalRequest"); +late final _sel_currentRequest = objc.registerName("currentRequest"); +late final _sel_delegate = objc.registerName("delegate"); +late final _sel_setDelegate_ = objc.registerName("setDelegate:"); - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @discussion NO if the receiver should not be allowed to use the built in - /// cellular radios to satisfy the request, YES otherwise. The default is YES. - set allowsCellularAccess(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setAllowsCellularAccess_1, value); - } +/// NSProgress +class NSProgress extends objc.NSObject { + NSProgress._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to - /// satisfy the request, YES otherwise. - @override - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } + /// Constructs a [NSProgress] that points to the same underlying object as [other]. + NSProgress.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to - /// satisfy the request, YES otherwise. - set allowsExpensiveNetworkAccess(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); - } + /// Constructs a [NSProgress] that wraps the given raw object pointer. + NSProgress.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to - /// satisfy the request, YES otherwise. - @override - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); + /// Returns whether [obj] is an instance of [NSProgress]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSProgress); } - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to - /// satisfy the request, YES otherwise. - set allowsConstrainedNetworkAccess(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); + /// currentProgress + static NSProgress? currentProgress() { + final _ret = _objc_msgSend_1unuoxw(_class_NSProgress, _sel_currentProgress); + return _ret.address == 0 + ? null + : NSProgress.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - @override - bool get assumesHTTP3Capable { - return _lib._objc_msgSend_11(_id, _lib._sel_assumesHTTP3Capable1); + /// progressWithTotalUnitCount: + static NSProgress progressWithTotalUnitCount_(int unitCount) { + final _ret = _objc_msgSend_n9eq1n( + _class_NSProgress, _sel_progressWithTotalUnitCount_, unitCount); + return NSProgress.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - set assumesHTTP3Capable(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setAssumesHTTP3Capable_1, value); + /// discreteProgressWithTotalUnitCount: + static NSProgress discreteProgressWithTotalUnitCount_(int unitCount) { + final _ret = _objc_msgSend_n9eq1n( + _class_NSProgress, _sel_discreteProgressWithTotalUnitCount_, unitCount); + return NSProgress.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @abstract Sets the NSURLRequestAttribution to associate with this request. - /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the - /// user. Defaults to NSURLRequestAttributionDeveloper. - @override - int get attribution { - return _lib._objc_msgSend_346(_id, _lib._sel_attribution1); + /// progressWithTotalUnitCount:parent:pendingUnitCount: + static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( + int unitCount, NSProgress parent, int portionOfParentTotalUnitCount) { + final _ret = _objc_msgSend_105mybv( + _class_NSProgress, + _sel_progressWithTotalUnitCount_parent_pendingUnitCount_, + unitCount, + parent.ref.pointer, + portionOfParentTotalUnitCount); + return NSProgress.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @abstract Sets the NSURLRequestAttribution to associate with this request. - /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the - /// user. Defaults to NSURLRequestAttributionDeveloper. - set attribution(int value) { - return _lib._objc_msgSend_424(_id, _lib._sel_setAttribution_1, value); + /// initWithParent:userInfo: + NSProgress initWithParent_userInfo_( + NSProgress? parentProgressOrNil, objc.NSDictionary? userInfoOrNil) { + final _ret = _objc_msgSend_iq11qg( + this.ref.retainAndReturnPointer(), + _sel_initWithParent_userInfo_, + parentProgressOrNil?.ref.pointer ?? ffi.nullptr, + userInfoOrNil?.ref.pointer ?? ffi.nullptr); + return NSProgress.castFromPointer(_ret, retain: false, release: true); } - /// ! - /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. - /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, - /// No otherwise. Defaults to NO. - @override - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); + /// becomeCurrentWithPendingUnitCount: + void becomeCurrentWithPendingUnitCount_(int unitCount) { + _objc_msgSend_rrr3q( + this.ref.pointer, _sel_becomeCurrentWithPendingUnitCount_, unitCount); } - /// ! - /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. - /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, - /// No otherwise. Defaults to NO. - set requiresDNSSECValidation(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setRequiresDNSSECValidation_1, value); + /// performAsCurrentWithPendingUnitCount:usingBlock: + void performAsCurrentWithPendingUnitCount_usingBlock_( + int unitCount, objc.ObjCBlock work) { + _objc_msgSend_19q84do( + this.ref.pointer, + _sel_performAsCurrentWithPendingUnitCount_usingBlock_, + unitCount, + work.ref.pointer); } - /// ! - /// @abstract Sets the HTTP request method of the receiver. - NSString get HTTPMethod { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_HTTPMethod1); - return NSString._(_ret, _lib, retain: true, release: true); + /// resignCurrent + void resignCurrent() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_resignCurrent); } - /// ! - /// @abstract Sets the HTTP request method of the receiver. - set HTTPMethod(NSString value) { - return _lib._objc_msgSend_385(_id, _lib._sel_setHTTPMethod_1, value._id); + /// addChild:withPendingUnitCount: + void addChild_withPendingUnitCount_(NSProgress child, int inUnitCount) { + _objc_msgSend_2citz1(this.ref.pointer, _sel_addChild_withPendingUnitCount_, + child.ref.pointer, inUnitCount); } - /// ! - /// @abstract Sets the HTTP header fields of the receiver to the given - /// dictionary. - /// @discussion This method replaces all header fields that may have - /// existed before this method call. - ///

Since HTTP header fields must be string values, each object and - /// key in the dictionary passed to this method must answer YES when - /// sent an -isKindOfClass:[NSString class] message. If either - /// the key or value for a key-value pair answers NO when sent this - /// message, the key-value pair is skipped. - @override - NSDictionary? get allHTTPHeaderFields { - final _ret = _lib._objc_msgSend_288(_id, _lib._sel_allHTTPHeaderFields1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); + /// totalUnitCount + int get totalUnitCount { + return _objc_msgSend_1voti03(this.ref.pointer, _sel_totalUnitCount); } - /// ! - /// @abstract Sets the HTTP header fields of the receiver to the given - /// dictionary. - /// @discussion This method replaces all header fields that may have - /// existed before this method call. - ///

Since HTTP header fields must be string values, each object and - /// key in the dictionary passed to this method must answer YES when - /// sent an -isKindOfClass:[NSString class] message. If either - /// the key or value for a key-value pair answers NO when sent this - /// message, the key-value pair is skipped. - set allHTTPHeaderFields(NSDictionary? value) { - return _lib._objc_msgSend_425( - _id, _lib._sel_setAllHTTPHeaderFields_1, value?._id ?? ffi.nullptr); + /// setTotalUnitCount: + set totalUnitCount(int value) { + return _objc_msgSend_rrr3q( + this.ref.pointer, _sel_setTotalUnitCount_, value); } - /// ! - /// @method setValue:forHTTPHeaderField: - /// @abstract Sets the value of the given HTTP header field. - /// @discussion If a value was previously set for the given header - /// field, that value is replaced with the given value. Note that, in - /// keeping with the HTTP RFC, HTTP header field names are - /// case-insensitive. - /// @param value the header field value. - /// @param field the header field name (case-insensitive). - void setValue_forHTTPHeaderField_(NSString? value, NSString field) { - _lib._objc_msgSend_426(_id, _lib._sel_setValue_forHTTPHeaderField_1, - value?._id ?? ffi.nullptr, field._id); + /// completedUnitCount + int get completedUnitCount { + return _objc_msgSend_1voti03(this.ref.pointer, _sel_completedUnitCount); } - /// ! - /// @method addValue:forHTTPHeaderField: - /// @abstract Adds an HTTP header field in the current header - /// dictionary. - /// @discussion This method provides a way to add values to header - /// fields incrementally. If a value was previously set for the given - /// header field, the given value is appended to the previously-existing - /// value. The appropriate field delimiter, a comma in the case of HTTP, - /// is added by the implementation, and should not be added to the given - /// value by the caller. Note that, in keeping with the HTTP RFC, HTTP - /// header field names are case-insensitive. - /// @param value the header field value. - /// @param field the header field name (case-insensitive). - void addValue_forHTTPHeaderField_(NSString value, NSString field) { - _lib._objc_msgSend_427( - _id, _lib._sel_addValue_forHTTPHeaderField_1, value._id, field._id); + /// setCompletedUnitCount: + set completedUnitCount(int value) { + return _objc_msgSend_rrr3q( + this.ref.pointer, _sel_setCompletedUnitCount_, value); } - /// ! - /// @abstract Sets the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - @override - NSData? get HTTPBody { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_HTTPBody1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); + /// localizedDescription + objc.NSString get localizedDescription { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_localizedDescription); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @abstract Sets the request body data of the receiver. - /// @discussion This data is sent as the message body of the request, as - /// in done in an HTTP POST request. - set HTTPBody(NSData? value) { - return _lib._objc_msgSend_428( - _id, _lib._sel_setHTTPBody_1, value?._id ?? ffi.nullptr); + /// setLocalizedDescription: + set localizedDescription(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setLocalizedDescription_, value.ref.pointer); } - /// ! - /// @abstract Sets the request body to be the contents of the given stream. - /// @discussion The provided stream should be unopened; the request will take - /// over the stream's delegate. The entire stream's contents will be - /// transmitted as the HTTP body of the request. Note that the body stream - /// and the body data (set by setHTTPBody:, above) are mutually exclusive - /// - setting one will clear the other. - @override - NSInputStream? get HTTPBodyStream { - final _ret = _lib._objc_msgSend_362(_id, _lib._sel_HTTPBodyStream1); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, _lib, retain: true, release: true); + /// localizedAdditionalDescription + objc.NSString get localizedAdditionalDescription { + final _ret = _objc_msgSend_1unuoxw( + this.ref.pointer, _sel_localizedAdditionalDescription); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @abstract Sets the request body to be the contents of the given stream. - /// @discussion The provided stream should be unopened; the request will take - /// over the stream's delegate. The entire stream's contents will be - /// transmitted as the HTTP body of the request. Note that the body stream - /// and the body data (set by setHTTPBody:, above) are mutually exclusive - /// - setting one will clear the other. - set HTTPBodyStream(NSInputStream? value) { - return _lib._objc_msgSend_429( - _id, _lib._sel_setHTTPBodyStream_1, value?._id ?? ffi.nullptr); + /// setLocalizedAdditionalDescription: + set localizedAdditionalDescription(objc.NSString value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setLocalizedAdditionalDescription_, value.ref.pointer); } - /// ! - /// @abstract Decide whether default cookie handling will happen for - /// this request (YES if cookies should be sent with and set for this request; - /// otherwise NO). - /// @discussion The default is YES - in other words, cookies are sent from and - /// stored to the cookie manager by default. - /// NOTE: In releases prior to 10.3, this value is ignored - @override - bool get HTTPShouldHandleCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldHandleCookies1); + /// isCancellable + bool get cancellable { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isCancellable); } - /// ! - /// @abstract Decide whether default cookie handling will happen for - /// this request (YES if cookies should be sent with and set for this request; - /// otherwise NO). - /// @discussion The default is YES - in other words, cookies are sent from and - /// stored to the cookie manager by default. - /// NOTE: In releases prior to 10.3, this value is ignored - set HTTPShouldHandleCookies(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setHTTPShouldHandleCookies_1, value); + /// setCancellable: + set cancellable(bool value) { + return _objc_msgSend_117qins(this.ref.pointer, _sel_setCancellable_, value); } - /// ! - /// @abstract Sets whether the request should not wait for the previous response - /// before transmitting (YES if the receiver should transmit before the previous response is - /// received. NO to wait for the previous response before transmitting) - /// @discussion Calling this method with a YES value does not guarantee HTTP - /// pipelining behavior. This method may have no effect if an HTTP proxy is - /// configured, or if the HTTP request uses an unsafe request method (e.g., POST - /// requests will not pipeline). Pipelining behavior also may not begin until - /// the second request on a given TCP connection. There may be other situations - /// where pipelining does not occur even though YES was set. - /// HTTP 1.1 allows the client to send multiple requests to the server without - /// waiting for a response. Though HTTP 1.1 requires support for pipelining, - /// some servers report themselves as being HTTP 1.1 but do not support - /// pipelining (disconnecting, sending resources misordered, omitting part of - /// a resource, etc.). - @override - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); + /// isPausable + bool get pausable { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isPausable); } - /// ! - /// @abstract Sets whether the request should not wait for the previous response - /// before transmitting (YES if the receiver should transmit before the previous response is - /// received. NO to wait for the previous response before transmitting) - /// @discussion Calling this method with a YES value does not guarantee HTTP - /// pipelining behavior. This method may have no effect if an HTTP proxy is - /// configured, or if the HTTP request uses an unsafe request method (e.g., POST - /// requests will not pipeline). Pipelining behavior also may not begin until - /// the second request on a given TCP connection. There may be other situations - /// where pipelining does not occur even though YES was set. - /// HTTP 1.1 allows the client to send multiple requests to the server without - /// waiting for a response. Though HTTP 1.1 requires support for pipelining, - /// some servers report themselves as being HTTP 1.1 but do not support - /// pipelining (disconnecting, sending resources misordered, omitting part of - /// a resource, etc.). - set HTTPShouldUsePipelining(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setHTTPShouldUsePipelining_1, value); + /// setPausable: + set pausable(bool value) { + return _objc_msgSend_117qins(this.ref.pointer, _sel_setPausable_, value); } - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSMutableURLRequest requestWithURL_( - NativeCupertinoHttp _lib, NSURL URL) { - final _ret = _lib._objc_msgSend_211( - _lib._class_NSMutableURLRequest1, _lib._sel_requestWithURL_1, URL._id); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + /// isCancelled + bool get cancelled { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isCancelled); } - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_11( - _lib._class_NSMutableURLRequest1, _lib._sel_supportsSecureCoding1); + /// isPaused + bool get paused { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isPaused); } - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NativeCupertinoHttp _lib, - NSURL URL, - int cachePolicy, - DartNSTimeInterval timeoutInterval) { - final _ret = _lib._objc_msgSend_343( - _lib._class_NSMutableURLRequest1, - _lib._sel_requestWithURL_cachePolicy_timeoutInterval_1, - URL._id, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + /// cancellationHandler + objc.ObjCBlock? get cancellationHandler { + final _ret = + _objc_msgSend_2osec1(this.ref.pointer, _sel_cancellationHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result An initialized NSURLRequest. - @override - NSMutableURLRequest initWithURL_(NSURL URL) { - final _ret = _lib._objc_msgSend_211(_id, _lib._sel_initWithURL_1, URL._id); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + /// setCancellationHandler: + set cancellationHandler(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setCancellationHandler_, + value?.ref.pointer ?? ffi.nullptr); } - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL and - /// cache policy. - /// @discussion This is the designated initializer for the - /// NSURLRequest class. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result An initialized NSURLRequest. - @override - NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, DartNSTimeInterval timeoutInterval) { - final _ret = _lib._objc_msgSend_343( - _id, - _lib._sel_initWithURL_cachePolicy_timeoutInterval_1, - URL._id, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + /// pausingHandler + objc.ObjCBlock? get pausingHandler { + final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_pausingHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableURLRequest init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableURLRequest._(_ret, _lib, retain: true, release: true); + /// setPausingHandler: + set pausingHandler(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setPausingHandler_, + value?.ref.pointer ?? ffi.nullptr); } - static NSMutableURLRequest new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableURLRequest1, _lib._sel_new1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + /// resumingHandler + objc.ObjCBlock? get resumingHandler { + final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_resumingHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } - static NSMutableURLRequest allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableURLRequest1, _lib._sel_allocWithZone_1, zone); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + /// setResumingHandler: + set resumingHandler(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setResumingHandler_, + value?.ref.pointer ?? ffi.nullptr); } - static NSMutableURLRequest alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableURLRequest1, _lib._sel_alloc1); - return NSMutableURLRequest._(_ret, _lib, retain: false, release: true); + /// setUserInfoObject:forKey: + void setUserInfoObject_forKey_( + objc.ObjCObjectBase? objectOrNil, DartNSProgressUserInfoKey key) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_setUserInfoObject_forKey_, + objectOrNil?.ref.pointer ?? ffi.nullptr, key.ref.pointer); } -} -abstract class NSHTTPCookieAcceptPolicy { - static const int NSHTTPCookieAcceptPolicyAlways = 0; - static const int NSHTTPCookieAcceptPolicyNever = 1; - static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; -} + /// isIndeterminate + bool get indeterminate { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isIndeterminate); + } -class NSHTTPCookieStorage extends NSObject { - NSHTTPCookieStorage._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// fractionCompleted + double get fractionCompleted { + return _objc_msgSend_10noklm(this.ref.pointer, _sel_fractionCompleted); + } - /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. - static NSHTTPCookieStorage castFrom(T other) { - return NSHTTPCookieStorage._(other._id, other._lib, - retain: true, release: true); + /// isFinished + bool get finished { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isFinished); } - /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. - static NSHTTPCookieStorage castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookieStorage._(other, lib, retain: retain, release: release); + /// cancel + void cancel() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); } - /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSHTTPCookieStorage1); + /// pause + void pause() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_pause); } - static NSHTTPCookieStorage getSharedHTTPCookieStorage( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_430( - _lib._class_NSHTTPCookieStorage1, _lib._sel_sharedHTTPCookieStorage1); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + /// resume + void resume() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); } - static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( - NativeCupertinoHttp _lib, NSString identifier) { - final _ret = _lib._objc_msgSend_431( - _lib._class_NSHTTPCookieStorage1, - _lib._sel_sharedCookieStorageForGroupContainerIdentifier_1, - identifier._id); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + /// userInfo + objc.NSDictionary get userInfo { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_userInfo); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSArray? get cookies { - final _ret = _lib._objc_msgSend_188(_id, _lib._sel_cookies1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + /// kind + DartNSProgressKind get kind { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_kind); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void setCookie_(NSHTTPCookie cookie) { - _lib._objc_msgSend_432(_id, _lib._sel_setCookie_1, cookie._id); + /// setKind: + set kind(DartNSProgressKind value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setKind_, value.ref.pointer); } - void deleteCookie_(NSHTTPCookie cookie) { - _lib._objc_msgSend_432(_id, _lib._sel_deleteCookie_1, cookie._id); + /// estimatedTimeRemaining + objc.NSNumber? get estimatedTimeRemaining { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_estimatedTimeRemaining); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - void removeCookiesSinceDate_(NSDate date) { - _lib._objc_msgSend_373(_id, _lib._sel_removeCookiesSinceDate_1, date._id); + /// setEstimatedTimeRemaining: + set estimatedTimeRemaining(objc.NSNumber? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setEstimatedTimeRemaining_, value?.ref.pointer ?? ffi.nullptr); } - NSArray? cookiesForURL_(NSURL URL) { - final _ret = - _lib._objc_msgSend_167(_id, _lib._sel_cookiesForURL_1, URL._id); + /// throughput + objc.NSNumber? get throughput { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_throughput); return _ret.address == 0 ? null - : NSArray._(_ret, _lib, retain: true, release: true); + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - void setCookies_forURL_mainDocumentURL_( - NSArray cookies, NSURL? URL, NSURL? mainDocumentURL) { - _lib._objc_msgSend_433( - _id, - _lib._sel_setCookies_forURL_mainDocumentURL_1, - cookies._id, - URL?._id ?? ffi.nullptr, - mainDocumentURL?._id ?? ffi.nullptr); + /// setThroughput: + set throughput(objc.NSNumber? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setThroughput_, + value?.ref.pointer ?? ffi.nullptr); } - int get cookieAcceptPolicy { - return _lib._objc_msgSend_434(_id, _lib._sel_cookieAcceptPolicy1); + /// fileOperationKind + DartNSProgressFileOperationKind get fileOperationKind { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileOperationKind); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set cookieAcceptPolicy(int value) { - return _lib._objc_msgSend_435( - _id, _lib._sel_setCookieAcceptPolicy_1, value); + /// setFileOperationKind: + set fileOperationKind(DartNSProgressFileOperationKind value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setFileOperationKind_, value.ref.pointer); } - NSArray sortedCookiesUsingDescriptors_(NSArray sortOrder) { - final _ret = _lib._objc_msgSend_102( - _id, _lib._sel_sortedCookiesUsingDescriptors_1, sortOrder._id); - return NSArray._(_ret, _lib, retain: true, release: true); + /// fileURL + objc.NSURL? get fileURL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void storeCookies_forTask_(NSArray cookies, NSURLSessionTask task) { - _lib._objc_msgSend_436( - _id, _lib._sel_storeCookies_forTask_1, cookies._id, task._id); + /// setFileURL: + set fileURL(objc.NSURL? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setFileURL_, value?.ref.pointer ?? ffi.nullptr); } - void getCookiesForTask_completionHandler_( - NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { - _lib._objc_msgSend_437(_id, _lib._sel_getCookiesForTask_completionHandler_1, - task._id, completionHandler._id); + /// fileTotalCount + objc.NSNumber? get fileTotalCount { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileTotalCount); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - @override - NSHTTPCookieStorage init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); + /// setFileTotalCount: + set fileTotalCount(objc.NSNumber? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileTotalCount_, + value?.ref.pointer ?? ffi.nullptr); } - static NSHTTPCookieStorage new1(NativeCupertinoHttp _lib) { + /// fileCompletedCount + objc.NSNumber? get fileCompletedCount { final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPCookieStorage1, _lib._sel_new1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileCompletedCount); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - static NSHTTPCookieStorage allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSHTTPCookieStorage1, _lib._sel_allocWithZone_1, zone); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + /// setFileCompletedCount: + set fileCompletedCount(objc.NSNumber? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileCompletedCount_, + value?.ref.pointer ?? ffi.nullptr); } - static NSHTTPCookieStorage alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSHTTPCookieStorage1, _lib._sel_alloc1); - return NSHTTPCookieStorage._(_ret, _lib, retain: false, release: true); + /// publish + void publish() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_publish); } -} -class NSHTTPCookie extends _ObjCWrapper { - NSHTTPCookie._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// unpublish + void unpublish() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_unpublish); + } - /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. - static NSHTTPCookie castFrom(T other) { - return NSHTTPCookie._(other._id, other._lib, retain: true, release: true); + /// addSubscriberForFileURL:withPublishingHandler: + static objc.ObjCObjectBase addSubscriberForFileURL_withPublishingHandler_( + objc.NSURL url, DartNSProgressPublishingHandler publishingHandler) { + final _ret = _objc_msgSend_1kkhn3j( + _class_NSProgress, + _sel_addSubscriberForFileURL_withPublishingHandler_, + url.ref.pointer, + publishingHandler.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. - static NSHTTPCookie castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookie._(other, lib, retain: retain, release: release); + /// removeSubscriber: + static void removeSubscriber_(objc.ObjCObjectBase subscriber) { + _objc_msgSend_ukcdfq( + _class_NSProgress, _sel_removeSubscriber_, subscriber.ref.pointer); } - /// Returns whether [obj] is an instance of [NSHTTPCookie]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSHTTPCookie1); + /// isOld + bool get old { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isOld); } -} -void _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSArray_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSArray_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSArray_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// init + NSProgress init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSProgress.castFromPointer(_ret, retain: false, release: true); + } -void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSArray_closureRegistry[block.ref.target.address]!(arg0); + /// new + static NSProgress new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSProgress, _sel_new); + return NSProgress.castFromPointer(_ret, retain: false, release: true); + } -class ObjCBlock_ffiVoid_NSArray extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + /// allocWithZone: + static NSProgress allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSProgress, _sel_allocWithZone_, zone); + return NSProgress.castFromPointer(_ret, retain: false, release: true); + } + + /// alloc + static NSProgress alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSProgress, _sel_alloc); + return NSProgress.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSProgress = objc.getClass("NSProgress"); +late final _sel_currentProgress = objc.registerName("currentProgress"); +late final _sel_progressWithTotalUnitCount_ = + objc.registerName("progressWithTotalUnitCount:"); +final _objc_msgSend_n9eq1n = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int64)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_discreteProgressWithTotalUnitCount_ = + objc.registerName("discreteProgressWithTotalUnitCount:"); +late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_ = + objc.registerName("progressWithTotalUnitCount:parent:pendingUnitCount:"); +final _objc_msgSend_105mybv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer, + ffi.Int64)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + int)>(); +late final _sel_initWithParent_userInfo_ = + objc.registerName("initWithParent:userInfo:"); +late final _sel_becomeCurrentWithPendingUnitCount_ = + objc.registerName("becomeCurrentWithPendingUnitCount:"); +final _objc_msgSend_rrr3q = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int64)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_ = + objc.registerName("performAsCurrentWithPendingUnitCount:usingBlock:"); +final _objc_msgSend_19q84do = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_resignCurrent = objc.registerName("resignCurrent"); +late final _sel_addChild_withPendingUnitCount_ = + objc.registerName("addChild:withPendingUnitCount:"); +final _objc_msgSend_2citz1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_totalUnitCount = objc.registerName("totalUnitCount"); +final _objc_msgSend_1voti03 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int64 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTotalUnitCount_ = objc.registerName("setTotalUnitCount:"); +late final _sel_completedUnitCount = objc.registerName("completedUnitCount"); +late final _sel_setCompletedUnitCount_ = + objc.registerName("setCompletedUnitCount:"); +late final _sel_localizedDescription = + objc.registerName("localizedDescription"); +late final _sel_setLocalizedDescription_ = + objc.registerName("setLocalizedDescription:"); +late final _sel_localizedAdditionalDescription = + objc.registerName("localizedAdditionalDescription"); +late final _sel_setLocalizedAdditionalDescription_ = + objc.registerName("setLocalizedAdditionalDescription:"); +late final _sel_isCancellable = objc.registerName("isCancellable"); +late final _sel_setCancellable_ = objc.registerName("setCancellable:"); +final _objc_msgSend_117qins = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, bool)>(); +late final _sel_isPausable = objc.registerName("isPausable"); +late final _sel_setPausable_ = objc.registerName("setPausable:"); +late final _sel_isCancelled = objc.registerName("isCancelled"); +late final _sel_isPaused = objc.registerName("isPaused"); +late final _sel_cancellationHandler = objc.registerName("cancellationHandler"); +final _objc_msgSend_2osec1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCancellationHandler_ = + objc.registerName("setCancellationHandler:"); +final _objc_msgSend_4daxhl = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pausingHandler = objc.registerName("pausingHandler"); +late final _sel_setPausingHandler_ = objc.registerName("setPausingHandler:"); +late final _sel_resumingHandler = objc.registerName("resumingHandler"); +late final _sel_setResumingHandler_ = objc.registerName("setResumingHandler:"); +typedef NSProgressUserInfoKey = ffi.Pointer; +typedef DartNSProgressUserInfoKey = objc.NSString; +late final _sel_setUserInfoObject_forKey_ = + objc.registerName("setUserInfoObject:forKey:"); +late final _sel_isIndeterminate = objc.registerName("isIndeterminate"); +late final _sel_fractionCompleted = objc.registerName("fractionCompleted"); +late final _sel_isFinished = objc.registerName("isFinished"); +late final _sel_cancel = objc.registerName("cancel"); +late final _sel_pause = objc.registerName("pause"); +late final _sel_resume = objc.registerName("resume"); +typedef NSProgressKind = ffi.Pointer; +typedef DartNSProgressKind = objc.NSString; +late final _sel_kind = objc.registerName("kind"); +late final _sel_setKind_ = objc.registerName("setKind:"); +late final _sel_estimatedTimeRemaining = + objc.registerName("estimatedTimeRemaining"); +late final _sel_setEstimatedTimeRemaining_ = + objc.registerName("setEstimatedTimeRemaining:"); +late final _sel_throughput = objc.registerName("throughput"); +late final _sel_setThroughput_ = objc.registerName("setThroughput:"); +typedef NSProgressFileOperationKind = ffi.Pointer; +typedef DartNSProgressFileOperationKind = objc.NSString; +late final _sel_fileOperationKind = objc.registerName("fileOperationKind"); +late final _sel_setFileOperationKind_ = + objc.registerName("setFileOperationKind:"); +late final _sel_fileURL = objc.registerName("fileURL"); +late final _sel_setFileURL_ = objc.registerName("setFileURL:"); +late final _sel_fileTotalCount = objc.registerName("fileTotalCount"); +late final _sel_setFileTotalCount_ = objc.registerName("setFileTotalCount:"); +late final _sel_fileCompletedCount = objc.registerName("fileCompletedCount"); +late final _sel_setFileCompletedCount_ = + objc.registerName("setFileCompletedCount:"); +late final _sel_publish = objc.registerName("publish"); +late final _sel_unpublish = objc.registerName("unpublish"); +typedef NSProgressPublishingHandler = ffi.Pointer; +typedef DartNSProgressPublishingHandler + = objc.ObjCBlock Function(NSProgress)>; +NSProgressUnpublishingHandler + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer)>()(arg0); +ffi.Pointer + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrCallable = + ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrTrampoline) + .cast(); +NSProgressUnpublishingHandler + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as NSProgressUnpublishingHandler Function( + ffi.Pointer))(arg0); +ffi.Pointer + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureCallable = + ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock Function(NSProgress)>`. +abstract final class ObjCBlock_NSProgressUnpublishingHandler_NSProgress { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.ObjCBlock Function(NSProgress)> castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock Function(NSProgress)>( + pointer, + retain: retain, + release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSArray.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock Function(NSProgress)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock Function(NSProgress)>( + objc.newPointerBlock( + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSArray.fromFunction( - NativeCupertinoHttp lib, void Function(NSArray?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSArray_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSArray._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSArray.listener( - NativeCupertinoHttp lib, void Function(NSArray?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSArray_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSArray._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSArray? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); -} - -final class CFArrayCallBacks extends ffi.Struct { - @CFIndex() - external int version; - - external CFArrayRetainCallBack retain; - - external CFArrayReleaseCallBack release; - - external CFArrayCopyDescriptionCallBack copyDescription; - - external CFArrayEqualCallBack equal; -} - -typedef CFArrayRetainCallBack - = ffi.Pointer>; -typedef CFArrayRetainCallBackFunction = ffi.Pointer Function( - CFAllocatorRef allocator, ffi.Pointer value); -typedef CFArrayReleaseCallBack - = ffi.Pointer>; -typedef CFArrayReleaseCallBackFunction = ffi.Void Function( - CFAllocatorRef allocator, ffi.Pointer value); -typedef DartCFArrayReleaseCallBackFunction = void Function( - CFAllocatorRef allocator, ffi.Pointer value); -typedef CFArrayCopyDescriptionCallBack - = ffi.Pointer>; -typedef CFArrayCopyDescriptionCallBackFunction = CFStringRef Function( - ffi.Pointer value); -typedef CFArrayEqualCallBack - = ffi.Pointer>; -typedef CFArrayEqualCallBackFunction = Boolean Function( - ffi.Pointer value1, ffi.Pointer value2); -typedef DartCFArrayEqualCallBackFunction = DartBoolean Function( - ffi.Pointer value1, ffi.Pointer value2); - -final class __CFArray extends ffi.Opaque {} - -typedef CFArrayRef = ffi.Pointer<__CFArray>; -typedef CFMutableArrayRef = ffi.Pointer<__CFArray>; -typedef CFArrayApplierFunction - = ffi.Pointer>; -typedef CFArrayApplierFunctionFunction = ffi.Void Function( - ffi.Pointer value, ffi.Pointer context); -typedef DartCFArrayApplierFunctionFunction = void Function( - ffi.Pointer value, ffi.Pointer context); -typedef CFComparatorFunction - = ffi.Pointer>; -typedef CFComparatorFunctionFunction = ffi.Int32 Function( - ffi.Pointer val1, - ffi.Pointer val2, - ffi.Pointer context); -typedef DartCFComparatorFunctionFunction = int Function( - ffi.Pointer val1, - ffi.Pointer val2, - ffi.Pointer context); - -final class sec_object extends ffi.Opaque {} - -final class __SecCertificate extends ffi.Opaque {} - -final class __SecIdentity extends ffi.Opaque {} - -final class __SecKey extends ffi.Opaque {} - -final class __SecPolicy extends ffi.Opaque {} - -final class __SecAccessControl extends ffi.Opaque {} - -final class __SecKeychain extends ffi.Opaque {} - -final class __SecKeychainItem extends ffi.Opaque {} - -final class __SecKeychainSearch extends ffi.Opaque {} - -final class SecKeychainAttribute extends ffi.Struct { - @SecKeychainAttrType() - external int tag; - - @UInt32() - external int length; - - external ffi.Pointer data; -} - -typedef SecKeychainAttrType = OSType; -typedef OSType = FourCharCode; -typedef FourCharCode = UInt32; - -final class SecKeychainAttributeList extends ffi.Struct { - @UInt32() - external int count; - - external ffi.Pointer attr; -} - -final class __SecTrustedApplication extends ffi.Opaque {} - -final class __SecAccess extends ffi.Opaque {} - -final class __SecACL extends ffi.Opaque {} - -final class __SecPassword extends ffi.Opaque {} - -final class SecKeychainAttributeInfo extends ffi.Struct { - @UInt32() - external int count; - - external ffi.Pointer tag; - - external ffi.Pointer format; -} - -typedef OSStatus = SInt32; - -final class _RuneEntry extends ffi.Struct { - @__darwin_rune_t() - external int __min; - - @__darwin_rune_t() - external int __max; - - @__darwin_rune_t() - external int __map; - - external ffi.Pointer<__uint32_t> __types; -} - -typedef __darwin_rune_t = __darwin_wchar_t; -typedef __darwin_wchar_t = ffi.Int; -typedef Dart__darwin_wchar_t = int; - -final class _RuneRange extends ffi.Struct { - @ffi.Int() - external int __nranges; - - external ffi.Pointer<_RuneEntry> __ranges; -} - -final class _RuneCharClass extends ffi.Struct { - @ffi.Array.multi([14]) - external ffi.Array __name; - - @__uint32_t() - external int __mask; -} - -final class _RuneLocale extends ffi.Struct { - @ffi.Array.multi([8]) - external ffi.Array __magic; - - @ffi.Array.multi([32]) - external ffi.Array __encoding; - - external ffi.Pointer< - ffi.NativeFunction< - __darwin_rune_t Function(ffi.Pointer, __darwin_size_t, - ffi.Pointer>)>> __sgetrune; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(__darwin_rune_t, ffi.Pointer, - __darwin_size_t, ffi.Pointer>)>> __sputrune; - - @__darwin_rune_t() - external int __invalid_rune; - - @ffi.Array.multi([256]) - external ffi.Array<__uint32_t> __runetype; - - @ffi.Array.multi([256]) - external ffi.Array<__darwin_rune_t> __maplower; - - @ffi.Array.multi([256]) - external ffi.Array<__darwin_rune_t> __mapupper; - - external _RuneRange __runetype_ext; - - external _RuneRange __maplower_ext; - - external _RuneRange __mapupper_ext; - - external ffi.Pointer __variable; - - @ffi.Int() - external int __variable_len; - - @ffi.Int() - external int __ncharclasses; - - external ffi.Pointer<_RuneCharClass> __charclasses; -} - -typedef __darwin_ct_rune_t = ffi.Int; -typedef Dart__darwin_ct_rune_t = int; - -final class lconv extends ffi.Struct { - external ffi.Pointer decimal_point; - - external ffi.Pointer thousands_sep; - - external ffi.Pointer grouping; - - external ffi.Pointer int_curr_symbol; - - external ffi.Pointer currency_symbol; - - external ffi.Pointer mon_decimal_point; - - external ffi.Pointer mon_thousands_sep; - - external ffi.Pointer mon_grouping; - - external ffi.Pointer positive_sign; - - external ffi.Pointer negative_sign; - - @ffi.Char() - external int int_frac_digits; - - @ffi.Char() - external int frac_digits; - - @ffi.Char() - external int p_cs_precedes; - - @ffi.Char() - external int p_sep_by_space; - - @ffi.Char() - external int n_cs_precedes; - - @ffi.Char() - external int n_sep_by_space; - - @ffi.Char() - external int p_sign_posn; - - @ffi.Char() - external int n_sign_posn; - - @ffi.Char() - external int int_p_cs_precedes; - - @ffi.Char() - external int int_n_cs_precedes; - - @ffi.Char() - external int int_p_sep_by_space; - - @ffi.Char() - external int int_n_sep_by_space; - - @ffi.Char() - external int int_p_sign_posn; - - @ffi.Char() - external int int_n_sign_posn; -} - -final class exception extends ffi.Struct { - @ffi.Int() - external int type; - - external ffi.Pointer name; - - @ffi.Double() - external double arg1; - - @ffi.Double() - external double arg2; - - @ffi.Double() - external double retval; + static objc.ObjCBlock< + objc.ObjCBlock Function(NSProgress)> fromFunction( + DartNSProgressUnpublishingHandler Function(NSProgress) fn) => + objc.ObjCBlock Function(NSProgress)>( + objc.newClosureBlock( + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureCallable, + (ffi.Pointer arg0) => + fn(NSProgress.castFromPointer(arg0, retain: true, release: true)) + .ref + .retainAndAutorelease()), + retain: false, + release: true); } -typedef pthread_t = __darwin_pthread_t; -typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; -typedef stack_t = __darwin_sigaltstack; - -final class __sbuf extends ffi.Struct { - external ffi.Pointer _base; - - @ffi.Int() - external int _size; +/// Call operator for `objc.ObjCBlock Function(NSProgress)>`. +extension ObjCBlock_NSProgressUnpublishingHandler_NSProgress_CallExtension + on objc + .ObjCBlock Function(NSProgress)> { + DartNSProgressUnpublishingHandler call(NSProgress arg0) => + ObjCBlock_ffiVoid.castFromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer), + retain: true, + release: true); } -final class __sFILEX extends ffi.Opaque {} +typedef NSProgressUnpublishingHandler = ffi.Pointer; +typedef DartNSProgressUnpublishingHandler = objc.ObjCBlock; +late final _sel_addSubscriberForFileURL_withPublishingHandler_ = + objc.registerName("addSubscriberForFileURL:withPublishingHandler:"); +final _objc_msgSend_1kkhn3j = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSProgressPublishingHandler)>(); +late final _sel_removeSubscriber_ = objc.registerName("removeSubscriber:"); +late final _sel_isOld = objc.registerName("isOld"); +late final _sel_progress = objc.registerName("progress"); +late final _sel_earliestBeginDate = objc.registerName("earliestBeginDate"); +late final _sel_setEarliestBeginDate_ = + objc.registerName("setEarliestBeginDate:"); +late final _sel_countOfBytesClientExpectsToSend = + objc.registerName("countOfBytesClientExpectsToSend"); +late final _sel_setCountOfBytesClientExpectsToSend_ = + objc.registerName("setCountOfBytesClientExpectsToSend:"); +late final _sel_countOfBytesClientExpectsToReceive = + objc.registerName("countOfBytesClientExpectsToReceive"); +late final _sel_setCountOfBytesClientExpectsToReceive_ = + objc.registerName("setCountOfBytesClientExpectsToReceive:"); +late final _sel_countOfBytesSent = objc.registerName("countOfBytesSent"); +late final _sel_countOfBytesReceived = + objc.registerName("countOfBytesReceived"); +late final _sel_countOfBytesExpectedToSend = + objc.registerName("countOfBytesExpectedToSend"); +late final _sel_countOfBytesExpectedToReceive = + objc.registerName("countOfBytesExpectedToReceive"); +late final _sel_taskDescription = objc.registerName("taskDescription"); +late final _sel_setTaskDescription_ = objc.registerName("setTaskDescription:"); + +enum NSURLSessionTaskState { + /// The task is currently being serviced by the session + NSURLSessionTaskStateRunning(0), + NSURLSessionTaskStateSuspended(1), -final class __sFILE extends ffi.Struct { - external ffi.Pointer _p; + /// The task has been told to cancel. The session will receive a URLSession:task:didCompleteWithError: message. + NSURLSessionTaskStateCanceling(2), - @ffi.Int() - external int _r; + /// The task has completed and the session will receive no more delegate notifications + NSURLSessionTaskStateCompleted(3); + + final int value; + const NSURLSessionTaskState(this.value); + + static NSURLSessionTaskState fromValue(int value) => switch (value) { + 0 => NSURLSessionTaskStateRunning, + 1 => NSURLSessionTaskStateSuspended, + 2 => NSURLSessionTaskStateCanceling, + 3 => NSURLSessionTaskStateCompleted, + _ => throw ArgumentError( + "Unknown value for NSURLSessionTaskState: $value"), + }; +} + +late final _sel_state = objc.registerName("state"); +final _objc_msgSend_8b7yc1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_error = objc.registerName("error"); +late final _sel_suspend = objc.registerName("suspend"); +late final _sel_priority = objc.registerName("priority"); +final _objc_msgSend_fcilgx = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_fcilgxFpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPriority_ = objc.registerName("setPriority:"); +final _objc_msgSend_s9gjzc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_prefersIncrementalDelivery = + objc.registerName("prefersIncrementalDelivery"); +late final _sel_setPrefersIncrementalDelivery_ = + objc.registerName("setPrefersIncrementalDelivery:"); + +/// NSProgressReporting +abstract final class NSProgressReporting { + /// Builds an object that implements the NSProgressReporting protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {required NSProgress Function() progress}) { + final builder = objc.ObjCProtocolBuilder(); + NSProgressReporting.progress.implement(builder, progress); + return builder.build(); + } + + /// Adds the implementation of the NSProgressReporting protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {required NSProgress Function() progress}) { + NSProgressReporting.progress.implement(builder, progress); + } + + /// progress + static final progress = objc.ObjCProtocolMethod( + _sel_progress, + objc.getProtocolMethodSignature( + _protocol_NSProgressReporting, + _sel_progress, + isRequired: true, + isInstanceMethod: true, + ), + (NSProgress Function() func) => ObjCBlock_NSProgress_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); +} + +late final _protocol_NSProgressReporting = + objc.getProtocol("NSProgressReporting"); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer)>()(arg0); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoid_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSProgress_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); - @ffi.Int() - external int _w; + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_NSProgress_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - @ffi.Short() - external int _flags; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunction(NSProgress Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSProgress_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSProgress_ffiVoid_CallExtension + on objc.ObjCBlock)> { + NSProgress call(ffi.Pointer arg0) => NSProgress.castFromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); +} - @ffi.Short() - external int _file; +late final _sel_storeCachedResponse_forDataTask_ = + objc.registerName("storeCachedResponse:forDataTask:"); +void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSCachedURLResponse { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - external __sbuf _bf; + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - @ffi.Int() - external int _lbfsize; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(NSCachedURLResponse?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); - external ffi.Pointer _cookie; + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(NSCachedURLResponse?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} - external ffi - .Pointer)>> - _close; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSCachedURLResponse_CallExtension + on objc.ObjCBlock { + void call(NSCachedURLResponse? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_getCachedResponseForDataTask_completionHandler_ = + objc.registerName("getCachedResponseForDataTask:completionHandler:"); +final _objc_msgSend_cmbt6k = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeCachedResponseForDataTask_ = + objc.registerName("removeCachedResponseForDataTask:"); +typedef NSNotificationName = ffi.Pointer; +typedef DartNSNotificationName = objc.NSString; - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> _read; +/// ! +/// @class NSMutableURLRequest +/// +/// @abstract An NSMutableURLRequest object represents a mutable URL load +/// request in a manner independent of protocol and URL scheme. +/// +/// @discussion This specialization of NSURLRequest is provided to aid +/// developers who may find it more convenient to mutate a single request +/// object for a series of URL loads instead of creating an immutable +/// NSURLRequest for each load. This programming model is supported by +/// the following contract stipulation between NSMutableURLRequest and +/// NSURLConnection: NSURLConnection makes a deep copy of each +/// NSMutableURLRequest object passed to one of its initializers. +///

NSMutableURLRequest is designed to be extended to support +/// protocol-specific data by adding categories to access a property +/// object provided in an interface targeted at protocol implementors. +///

    +///
  • Protocol implementors should direct their attention to the +/// NSMutableURLRequestExtensibility category on +/// NSMutableURLRequest for more information on how to provide +/// extensions on NSMutableURLRequest to support protocol-specific +/// request information. +///
  • Clients of this API who wish to create NSMutableURLRequest +/// objects to load URL content should consult the protocol-specific +/// NSMutableURLRequest categories that are available. The +/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an +/// example. +///
+class NSMutableURLRequest extends NSURLRequest { + NSMutableURLRequest._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - external ffi.Pointer< - ffi.NativeFunction< - fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> _seek; + /// Constructs a [NSMutableURLRequest] that points to the same underlying object as [other]. + NSMutableURLRequest.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Pointer, ffi.Int)>> _write; + /// Constructs a [NSMutableURLRequest] that wraps the given raw object pointer. + NSMutableURLRequest.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - external __sbuf _ub; + /// Returns whether [obj] is an instance of [NSMutableURLRequest]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); + } - external ffi.Pointer<__sFILEX> _extra; + /// ! + /// @abstract The URL of the receiver. + objc.NSURL? get URL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } - @ffi.Int() - external int _ur; + /// ! + /// @abstract The URL of the receiver. + set URL(objc.NSURL? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setURL_, value?.ref.pointer ?? ffi.nullptr); + } - @ffi.Array.multi([3]) - external ffi.Array _ubuf; + /// ! + /// @abstract The cache policy of the receiver. + NSURLRequestCachePolicy get cachePolicy { + final _ret = _objc_msgSend_2xak1q(this.ref.pointer, _sel_cachePolicy); + return NSURLRequestCachePolicy.fromValue(_ret); + } - @ffi.Array.multi([1]) - external ffi.Array _nbuf; + /// ! + /// @abstract The cache policy of the receiver. + set cachePolicy(NSURLRequestCachePolicy value) { + return _objc_msgSend_12vaadl( + this.ref.pointer, _sel_setCachePolicy_, value.value); + } - external __sbuf _lb; + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + DartNSTimeInterval get timeoutInterval { + return _objc_msgSend_10noklm(this.ref.pointer, _sel_timeoutInterval); + } - @ffi.Int() - external int _blksize; + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + set timeoutInterval(DartNSTimeInterval value) { + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setTimeoutInterval_, value); + } - @fpos_t() - external int _offset; -} + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document is used to implement the cookie "only + /// from same domain as main document" policy, attributing this request + /// as a sub-resource of a user-specified URL, and possibly other things + /// in the future. + objc.NSURL? get mainDocumentURL { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_mainDocumentURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } -typedef fpos_t = __darwin_off_t; -typedef __darwin_off_t = __int64_t; -typedef __int64_t = ffi.LongLong; -typedef Dart__int64_t = int; -typedef FILE = __sFILE; -typedef off_t = __darwin_off_t; -typedef ssize_t = __darwin_ssize_t; -typedef __darwin_ssize_t = ffi.Long; -typedef Dart__darwin_ssize_t = int; -typedef errno_t = ffi.Int; -typedef Darterrno_t = int; -typedef rsize_t = ffi.UnsignedLong; -typedef Dartrsize_t = int; + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document is used to implement the cookie "only + /// from same domain as main document" policy, attributing this request + /// as a sub-resource of a user-specified URL, and possibly other things + /// in the future. + set mainDocumentURL(objc.NSURL? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMainDocumentURL_, + value?.ref.pointer ?? ffi.nullptr); + } -final class timespec extends ffi.Struct { - @__darwin_time_t() - external int tv_sec; + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + NSURLRequestNetworkServiceType get networkServiceType { + final _ret = + _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); + return NSURLRequestNetworkServiceType.fromValue(_ret); + } - @ffi.Long() - external int tv_nsec; -} + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + set networkServiceType(NSURLRequestNetworkServiceType value) { + return _objc_msgSend_br89tg( + this.ref.pointer, _sel_setNetworkServiceType_, value.value); + } -final class tm extends ffi.Struct { - @ffi.Int() - external int tm_sec; + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + bool get allowsCellularAccess { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsCellularAccess); + } - @ffi.Int() - external int tm_min; + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + set allowsCellularAccess(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsCellularAccess_, value); + } - @ffi.Int() - external int tm_hour; + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satisfy the request, YES otherwise. + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsExpensiveNetworkAccess); + } - @ffi.Int() - external int tm_mday; + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satisfy the request, YES otherwise. + set allowsExpensiveNetworkAccess(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); + } - @ffi.Int() - external int tm_mon; + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satisfy the request, YES otherwise. + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsConstrainedNetworkAccess); + } - @ffi.Int() - external int tm_year; + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satisfy the request, YES otherwise. + set allowsConstrainedNetworkAccess(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); + } - @ffi.Int() - external int tm_wday; + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + bool get assumesHTTP3Capable { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_assumesHTTP3Capable); + } - @ffi.Int() - external int tm_yday; + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + set assumesHTTP3Capable(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAssumesHTTP3Capable_, value); + } - @ffi.Int() - external int tm_isdst; + /// ! + /// @abstract Sets the NSURLRequestAttribution to associate with this request. + /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the + /// user. Defaults to NSURLRequestAttributionDeveloper. + NSURLRequestAttribution get attribution { + final _ret = _objc_msgSend_t5yka9(this.ref.pointer, _sel_attribution); + return NSURLRequestAttribution.fromValue(_ret); + } - @ffi.Long() - external int tm_gmtoff; + /// ! + /// @abstract Sets the NSURLRequestAttribution to associate with this request. + /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the + /// user. Defaults to NSURLRequestAttributionDeveloper. + set attribution(NSURLRequestAttribution value) { + return _objc_msgSend_1w8eyjo( + this.ref.pointer, _sel_setAttribution_, value.value); + } - external ffi.Pointer tm_zone; -} + /// ! + /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. + /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, + /// No otherwise. Defaults to NO. + bool get requiresDNSSECValidation { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_requiresDNSSECValidation); + } -typedef clock_t = __darwin_clock_t; -typedef __darwin_clock_t = ffi.UnsignedLong; -typedef Dart__darwin_clock_t = int; -typedef time_t = __darwin_time_t; + /// ! + /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. + /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, + /// No otherwise. Defaults to NO. + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setRequiresDNSSECValidation_, value); + } -abstract class clockid_t { - static const int _CLOCK_REALTIME = 0; - static const int _CLOCK_MONOTONIC = 6; - static const int _CLOCK_MONOTONIC_RAW = 4; - static const int _CLOCK_MONOTONIC_RAW_APPROX = 5; - static const int _CLOCK_UPTIME_RAW = 8; - static const int _CLOCK_UPTIME_RAW_APPROX = 9; - static const int _CLOCK_PROCESS_CPUTIME_ID = 12; - static const int _CLOCK_THREAD_CPUTIME_ID = 16; -} + /// HTTPMethod + objc.NSString get HTTPMethod { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPMethod); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -typedef intmax_t = ffi.Long; -typedef Dartintmax_t = int; + /// setHTTPMethod: + set HTTPMethod(objc.NSString value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setHTTPMethod_, value.ref.pointer); + } -final class imaxdiv_t extends ffi.Struct { - @intmax_t() - external int quot; + /// allHTTPHeaderFields + objc.NSDictionary? get allHTTPHeaderFields { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allHTTPHeaderFields); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } - @intmax_t() - external int rem; -} + /// setAllHTTPHeaderFields: + set allHTTPHeaderFields(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAllHTTPHeaderFields_, + value?.ref.pointer ?? ffi.nullptr); + } -typedef uintmax_t = ffi.UnsignedLong; -typedef Dartuintmax_t = int; + /// setValue:forHTTPHeaderField: + void setValue_forHTTPHeaderField_(objc.NSString? value, objc.NSString field) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_setValue_forHTTPHeaderField_, + value?.ref.pointer ?? ffi.nullptr, field.ref.pointer); + } -final class CFBagCallBacks extends ffi.Struct { - @CFIndex() - external int version; + /// addValue:forHTTPHeaderField: + void addValue_forHTTPHeaderField_(objc.NSString value, objc.NSString field) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_addValue_forHTTPHeaderField_, + value.ref.pointer, field.ref.pointer); + } - external CFBagRetainCallBack retain; + /// HTTPBody + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBody); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } - external CFBagReleaseCallBack release; + /// setHTTPBody: + set HTTPBody(objc.NSData? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setHTTPBody_, value?.ref.pointer ?? ffi.nullptr); + } - external CFBagCopyDescriptionCallBack copyDescription; + /// HTTPBodyStream + objc.NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBodyStream); + return _ret.address == 0 + ? null + : objc.NSInputStream.castFromPointer(_ret, retain: true, release: true); + } - external CFBagEqualCallBack equal; + /// setHTTPBodyStream: + set HTTPBodyStream(objc.NSInputStream? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPBodyStream_, + value?.ref.pointer ?? ffi.nullptr); + } - external CFBagHashCallBack hash; -} + /// HTTPShouldHandleCookies + bool get HTTPShouldHandleCookies { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldHandleCookies); + } -typedef CFBagRetainCallBack - = ffi.Pointer>; -typedef CFBagRetainCallBackFunction = ffi.Pointer Function( - CFAllocatorRef allocator, ffi.Pointer value); -typedef CFBagReleaseCallBack - = ffi.Pointer>; -typedef CFBagReleaseCallBackFunction = ffi.Void Function( - CFAllocatorRef allocator, ffi.Pointer value); -typedef DartCFBagReleaseCallBackFunction = void Function( - CFAllocatorRef allocator, ffi.Pointer value); -typedef CFBagCopyDescriptionCallBack - = ffi.Pointer>; -typedef CFBagCopyDescriptionCallBackFunction = CFStringRef Function( - ffi.Pointer value); -typedef CFBagEqualCallBack - = ffi.Pointer>; -typedef CFBagEqualCallBackFunction = Boolean Function( - ffi.Pointer value1, ffi.Pointer value2); -typedef DartCFBagEqualCallBackFunction = DartBoolean Function( - ffi.Pointer value1, ffi.Pointer value2); -typedef CFBagHashCallBack - = ffi.Pointer>; -typedef CFBagHashCallBackFunction = CFHashCode Function( - ffi.Pointer value); -typedef DartCFBagHashCallBackFunction = DartCFHashCode Function( - ffi.Pointer value); + /// setHTTPShouldHandleCookies: + set HTTPShouldHandleCookies(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHTTPShouldHandleCookies_, value); + } -final class __CFBag extends ffi.Opaque {} + /// HTTPShouldUsePipelining + bool get HTTPShouldUsePipelining { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldUsePipelining); + } -typedef CFBagRef = ffi.Pointer<__CFBag>; -typedef CFMutableBagRef = ffi.Pointer<__CFBag>; -typedef CFBagApplierFunction - = ffi.Pointer>; -typedef CFBagApplierFunctionFunction = ffi.Void Function( - ffi.Pointer value, ffi.Pointer context); -typedef DartCFBagApplierFunctionFunction = void Function( - ffi.Pointer value, ffi.Pointer context); + /// setHTTPShouldUsePipelining: + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHTTPShouldUsePipelining_, value); + } -final class CFBinaryHeapCompareContext extends ffi.Struct { - @CFIndex() - external int version; + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_juohf7( + _class_NSMutableURLRequest, _sel_requestWithURL_, URL.ref.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } - external ffi.Pointer info; + /// ! + /// @property supportsSecureCoding + /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. + /// @result A BOOL value set to YES. + static bool getSupportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSMutableURLRequest, _sel_supportsSecureCoding); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>> retain; + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, + NSURLRequestCachePolicy cachePolicy, + DartNSTimeInterval timeoutInterval) { + final _ret = _objc_msgSend_191svj( + _class_NSMutableURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.ref.pointer, + cachePolicy.value, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } - external ffi.Pointer< - ffi.NativeFunction info)>> - release; + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result An initialized NSURLRequest. + NSMutableURLRequest initWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_juohf7( + this.ref.retainAndReturnPointer(), _sel_initWithURL_, URL.ref.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); + } - external ffi.Pointer< - ffi.NativeFunction info)>> - copyDescription; -} + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL and + /// cache policy. + /// @discussion This is the designated initializer for the + /// NSURLRequest class. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result An initialized NSURLRequest. + NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, + NSURLRequestCachePolicy cachePolicy, DartNSTimeInterval timeoutInterval) { + final _ret = _objc_msgSend_191svj( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.ref.pointer, + cachePolicy.value, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); + } -final class CFBinaryHeapCallBacks extends ffi.Struct { - @CFIndex() - external int version; + /// init + NSMutableURLRequest init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - CFAllocatorRef allocator, ffi.Pointer ptr)>> retain; + /// new + static NSMutableURLRequest new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSMutableURLRequest, _sel_new); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - CFAllocatorRef allocator, ffi.Pointer ptr)>> release; + /// allocWithZone: + static NSMutableURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSMutableURLRequest, _sel_allocWithZone_, zone); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); + } - external ffi.Pointer< - ffi.NativeFunction ptr)>> - copyDescription; + /// alloc + static NSMutableURLRequest alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSMutableURLRequest, _sel_alloc); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer ptr1, - ffi.Pointer ptr2, - ffi.Pointer context)>> compare; -} + /// initWithCoder: + NSMutableURLRequest? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); + } +} + +late final _class_NSMutableURLRequest = objc.getClass("NSMutableURLRequest"); +late final _sel_setURL_ = objc.registerName("setURL:"); +late final _sel_setCachePolicy_ = objc.registerName("setCachePolicy:"); +final _objc_msgSend_12vaadl = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setTimeoutInterval_ = objc.registerName("setTimeoutInterval:"); +final _objc_msgSend_suh039 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSTimeInterval)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_setMainDocumentURL_ = objc.registerName("setMainDocumentURL:"); +late final _sel_setNetworkServiceType_ = + objc.registerName("setNetworkServiceType:"); +final _objc_msgSend_br89tg = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setAllowsCellularAccess_ = + objc.registerName("setAllowsCellularAccess:"); +late final _sel_setAllowsExpensiveNetworkAccess_ = + objc.registerName("setAllowsExpensiveNetworkAccess:"); +late final _sel_setAllowsConstrainedNetworkAccess_ = + objc.registerName("setAllowsConstrainedNetworkAccess:"); +late final _sel_setAssumesHTTP3Capable_ = + objc.registerName("setAssumesHTTP3Capable:"); +late final _sel_setAttribution_ = objc.registerName("setAttribution:"); +final _objc_msgSend_1w8eyjo = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setRequiresDNSSECValidation_ = + objc.registerName("setRequiresDNSSECValidation:"); +late final _sel_setHTTPMethod_ = objc.registerName("setHTTPMethod:"); +late final _sel_setAllHTTPHeaderFields_ = + objc.registerName("setAllHTTPHeaderFields:"); +late final _sel_setValue_forHTTPHeaderField_ = + objc.registerName("setValue:forHTTPHeaderField:"); +late final _sel_addValue_forHTTPHeaderField_ = + objc.registerName("addValue:forHTTPHeaderField:"); +late final _sel_setHTTPBody_ = objc.registerName("setHTTPBody:"); +late final _sel_setHTTPBodyStream_ = objc.registerName("setHTTPBodyStream:"); +late final _sel_setHTTPShouldHandleCookies_ = + objc.registerName("setHTTPShouldHandleCookies:"); +late final _sel_setHTTPShouldUsePipelining_ = + objc.registerName("setHTTPShouldUsePipelining:"); + +enum NSHTTPCookieAcceptPolicy { + NSHTTPCookieAcceptPolicyAlways(0), + NSHTTPCookieAcceptPolicyNever(1), + NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain(2); + + final int value; + const NSHTTPCookieAcceptPolicy(this.value); + + static NSHTTPCookieAcceptPolicy fromValue(int value) => switch (value) { + 0 => NSHTTPCookieAcceptPolicyAlways, + 1 => NSHTTPCookieAcceptPolicyNever, + 2 => NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, + _ => throw ArgumentError( + "Unknown value for NSHTTPCookieAcceptPolicy: $value"), + }; +} + +/// NSHTTPCookieStorage +class NSHTTPCookieStorage extends objc.NSObject { + NSHTTPCookieStorage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -final class __CFBinaryHeap extends ffi.Opaque {} + /// Constructs a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + NSHTTPCookieStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); -typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; -typedef CFBinaryHeapApplierFunction - = ffi.Pointer>; -typedef CFBinaryHeapApplierFunctionFunction = ffi.Void Function( - ffi.Pointer val, ffi.Pointer context); -typedef DartCFBinaryHeapApplierFunctionFunction = void Function( - ffi.Pointer val, ffi.Pointer context); + /// Constructs a [NSHTTPCookieStorage] that wraps the given raw object pointer. + NSHTTPCookieStorage.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); -final class __CFBitVector extends ffi.Opaque {} + /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSHTTPCookieStorage); + } -typedef CFBitVectorRef = ffi.Pointer<__CFBitVector>; -typedef CFMutableBitVectorRef = ffi.Pointer<__CFBitVector>; -typedef CFBit = UInt32; + /// sharedHTTPCookieStorage + static NSHTTPCookieStorage getSharedHTTPCookieStorage() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); + } -abstract class __CFByteOrder { - static const int CFByteOrderUnknown = 0; - static const int CFByteOrderLittleEndian = 1; - static const int CFByteOrderBigEndian = 2; -} + /// sharedCookieStorageForGroupContainerIdentifier: + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + objc.NSString identifier) { + final _ret = _objc_msgSend_juohf7( + _class_NSHTTPCookieStorage, + _sel_sharedCookieStorageForGroupContainerIdentifier_, + identifier.ref.pointer); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); + } -final class CFSwappedFloat32 extends ffi.Struct { - @ffi.Uint32() - external int v; -} + /// cookies + objc.ObjCObjectBase? get cookies { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_cookies); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } -final class CFSwappedFloat64 extends ffi.Struct { - @ffi.Uint64() - external int v; -} + /// setCookie: + void setCookie_(NSHTTPCookie cookie) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCookie_, cookie.ref.pointer); + } -final class CFDictionaryKeyCallBacks extends ffi.Struct { - @CFIndex() - external int version; + /// deleteCookie: + void deleteCookie_(NSHTTPCookie cookie) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_deleteCookie_, cookie.ref.pointer); + } - external CFDictionaryRetainCallBack retain; + /// removeCookiesSinceDate: + void removeCookiesSinceDate_(objc.NSDate date) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeCookiesSinceDate_, date.ref.pointer); + } - external CFDictionaryReleaseCallBack release; + /// cookiesForURL: + objc.ObjCObjectBase? cookiesForURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_cookiesForURL_, URL.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } - external CFDictionaryCopyDescriptionCallBack copyDescription; + /// setCookies:forURL:mainDocumentURL: + void setCookies_forURL_mainDocumentURL_(objc.ObjCObjectBase cookies, + objc.NSURL? URL, objc.NSURL? mainDocumentURL) { + _objc_msgSend_tenbla( + this.ref.pointer, + _sel_setCookies_forURL_mainDocumentURL_, + cookies.ref.pointer, + URL?.ref.pointer ?? ffi.nullptr, + mainDocumentURL?.ref.pointer ?? ffi.nullptr); + } - external CFDictionaryEqualCallBack equal; + /// cookieAcceptPolicy + NSHTTPCookieAcceptPolicy get cookieAcceptPolicy { + final _ret = + _objc_msgSend_1jpuqgg(this.ref.pointer, _sel_cookieAcceptPolicy); + return NSHTTPCookieAcceptPolicy.fromValue(_ret); + } - external CFDictionaryHashCallBack hash; -} + /// setCookieAcceptPolicy: + set cookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) { + return _objc_msgSend_199e8fv( + this.ref.pointer, _sel_setCookieAcceptPolicy_, value.value); + } -typedef CFDictionaryRetainCallBack - = ffi.Pointer>; -typedef CFDictionaryRetainCallBackFunction = ffi.Pointer Function( - CFAllocatorRef allocator, ffi.Pointer value); -typedef CFDictionaryReleaseCallBack - = ffi.Pointer>; -typedef CFDictionaryReleaseCallBackFunction = ffi.Void Function( - CFAllocatorRef allocator, ffi.Pointer value); -typedef DartCFDictionaryReleaseCallBackFunction = void Function( - CFAllocatorRef allocator, ffi.Pointer value); -typedef CFDictionaryCopyDescriptionCallBack = ffi - .Pointer>; -typedef CFDictionaryCopyDescriptionCallBackFunction = CFStringRef Function( - ffi.Pointer value); -typedef CFDictionaryEqualCallBack - = ffi.Pointer>; -typedef CFDictionaryEqualCallBackFunction = Boolean Function( - ffi.Pointer value1, ffi.Pointer value2); -typedef DartCFDictionaryEqualCallBackFunction = DartBoolean Function( - ffi.Pointer value1, ffi.Pointer value2); -typedef CFDictionaryHashCallBack - = ffi.Pointer>; -typedef CFDictionaryHashCallBackFunction = CFHashCode Function( - ffi.Pointer value); -typedef DartCFDictionaryHashCallBackFunction = DartCFHashCode Function( - ffi.Pointer value); + /// sortedCookiesUsingDescriptors: + objc.ObjCObjectBase sortedCookiesUsingDescriptors_( + objc.ObjCObjectBase sortOrder) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_sortedCookiesUsingDescriptors_, sortOrder.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } -final class CFDictionaryValueCallBacks extends ffi.Struct { - @CFIndex() - external int version; + /// storeCookies:forTask: + void storeCookies_forTask_(objc.NSArray cookies, NSURLSessionTask task) { + _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_storeCookies_forTask_, + cookies.ref.pointer, task.ref.pointer); + } - external CFDictionaryRetainCallBack retain; + /// getCookiesForTask:completionHandler: + void getCookiesForTask_completionHandler_(NSURLSessionTask task, + objc.ObjCBlock completionHandler) { + _objc_msgSend_cmbt6k( + this.ref.pointer, + _sel_getCookiesForTask_completionHandler_, + task.ref.pointer, + completionHandler.ref.pointer); + } - external CFDictionaryReleaseCallBack release; + /// init + NSHTTPCookieStorage init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); + } - external CFDictionaryCopyDescriptionCallBack copyDescription; + /// new + static NSHTTPCookieStorage new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookieStorage, _sel_new); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); + } - external CFDictionaryEqualCallBack equal; + /// allocWithZone: + static NSHTTPCookieStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSHTTPCookieStorage, _sel_allocWithZone_, zone); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); + } + + /// alloc + static NSHTTPCookieStorage alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookieStorage, _sel_alloc); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); + } } -final class __CFDictionary extends ffi.Opaque {} +late final _class_NSHTTPCookieStorage = objc.getClass("NSHTTPCookieStorage"); +late final _sel_sharedHTTPCookieStorage = + objc.registerName("sharedHTTPCookieStorage"); +late final _sel_sharedCookieStorageForGroupContainerIdentifier_ = + objc.registerName("sharedCookieStorageForGroupContainerIdentifier:"); +late final _sel_cookies = objc.registerName("cookies"); -typedef CFDictionaryRef = ffi.Pointer<__CFDictionary>; -typedef CFMutableDictionaryRef = ffi.Pointer<__CFDictionary>; -typedef CFDictionaryApplierFunction - = ffi.Pointer>; -typedef CFDictionaryApplierFunctionFunction = ffi.Void Function( - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer context); -typedef DartCFDictionaryApplierFunctionFunction = void Function( - ffi.Pointer key, - ffi.Pointer value, - ffi.Pointer context); +/// NSHTTPCookie +class NSHTTPCookie extends objc.ObjCObjectBase { + NSHTTPCookie._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); -final class __CFNotificationCenter extends ffi.Opaque {} + /// Constructs a [NSHTTPCookie] that points to the same underlying object as [other]. + NSHTTPCookie.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); -abstract class CFNotificationSuspensionBehavior { - static const int CFNotificationSuspensionBehaviorDrop = 1; - static const int CFNotificationSuspensionBehaviorCoalesce = 2; - static const int CFNotificationSuspensionBehaviorHold = 3; - static const int CFNotificationSuspensionBehaviorDeliverImmediately = 4; -} + /// Constructs a [NSHTTPCookie] that wraps the given raw object pointer. + NSHTTPCookie.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); -typedef CFNotificationCenterRef = ffi.Pointer<__CFNotificationCenter>; -typedef CFNotificationCallback - = ffi.Pointer>; -typedef CFNotificationCallbackFunction = ffi.Void Function( - CFNotificationCenterRef center, - ffi.Pointer observer, - CFNotificationName name, - ffi.Pointer object, - CFDictionaryRef userInfo); -typedef DartCFNotificationCallbackFunction = void Function( - CFNotificationCenterRef center, - ffi.Pointer observer, - CFNotificationName name, - ffi.Pointer object, - CFDictionaryRef userInfo); -typedef CFNotificationName = CFStringRef; + /// Returns whether [obj] is an instance of [NSHTTPCookie]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSHTTPCookie); + } +} + +late final _class_NSHTTPCookie = objc.getClass("NSHTTPCookie"); +late final _sel_setCookie_ = objc.registerName("setCookie:"); +late final _sel_deleteCookie_ = objc.registerName("deleteCookie:"); +late final _sel_removeCookiesSinceDate_ = + objc.registerName("removeCookiesSinceDate:"); +late final _sel_cookiesForURL_ = objc.registerName("cookiesForURL:"); +late final _sel_setCookies_forURL_mainDocumentURL_ = + objc.registerName("setCookies:forURL:mainDocumentURL:"); +final _objc_msgSend_tenbla = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_cookieAcceptPolicy = objc.registerName("cookieAcceptPolicy"); +final _objc_msgSend_1jpuqgg = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCookieAcceptPolicy_ = + objc.registerName("setCookieAcceptPolicy:"); +final _objc_msgSend_199e8fv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_sortedCookiesUsingDescriptors_ = + objc.registerName("sortedCookiesUsingDescriptors:"); +late final _sel_storeCookies_forTask_ = + objc.registerName("storeCookies:forTask:"); +void _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSArray_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSArray_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSArray { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); -final class __CFLocale extends ffi.Opaque {} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSArray_fnPtrCallable, ptr.cast()), + retain: false, + release: true); -typedef CFLocaleRef = ffi.Pointer<__CFLocale>; -typedef CFLocaleIdentifier = CFStringRef; -typedef LangCode = SInt16; -typedef RegionCode = SInt16; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(objc.NSArray?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSArray_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); -abstract class CFLocaleLanguageDirection { - static const int kCFLocaleLanguageDirectionUnknown = 0; - static const int kCFLocaleLanguageDirectionLeftToRight = 1; - static const int kCFLocaleLanguageDirectionRightToLeft = 2; - static const int kCFLocaleLanguageDirectionTopToBottom = 3; - static const int kCFLocaleLanguageDirectionBottomToTop = 4; + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(objc.NSArray?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSArray_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } } -typedef CFLocaleKey = CFStringRef; -typedef CFCalendarIdentifier = CFStringRef; -typedef CFAbsoluteTime = CFTimeInterval; -typedef CFTimeInterval = ffi.Double; -typedef DartCFTimeInterval = double; - -final class __CFDate extends ffi.Opaque {} +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSArray_CallExtension + on objc.ObjCBlock { + void call(objc.NSArray? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} -typedef CFDateRef = ffi.Pointer<__CFDate>; +late final _sel_getCookiesForTask_completionHandler_ = + objc.registerName("getCookiesForTask:completionHandler:"); -final class __CFTimeZone extends ffi.Opaque {} +final class CFArrayCallBacks extends ffi.Struct { + @CFIndex() + external int version; -final class CFGregorianDate extends ffi.Struct { - @SInt32() - external int year; + external CFArrayRetainCallBack retain; - @SInt8() - external int month; + external CFArrayReleaseCallBack release; - @SInt8() - external int day; + external CFArrayCopyDescriptionCallBack copyDescription; - @SInt8() - external int hour; + external CFArrayEqualCallBack equal; +} - @SInt8() - external int minute; +typedef CFArrayRetainCallBack + = ffi.Pointer>; +typedef CFArrayRetainCallBackFunction = ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFArrayReleaseCallBack + = ffi.Pointer>; +typedef CFArrayReleaseCallBackFunction = ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef DartCFArrayReleaseCallBackFunction = void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFArrayCopyDescriptionCallBack + = ffi.Pointer>; +typedef CFArrayCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer value); +typedef CFArrayEqualCallBack + = ffi.Pointer>; +typedef CFArrayEqualCallBackFunction = Boolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef DartCFArrayEqualCallBackFunction = DartBoolean Function( + ffi.Pointer value1, ffi.Pointer value2); - @ffi.Double() - external double second; -} +final class __CFArray extends ffi.Opaque {} -typedef SInt8 = ffi.SignedChar; -typedef DartSInt8 = int; +typedef CFArrayRef = ffi.Pointer<__CFArray>; +typedef CFMutableArrayRef = ffi.Pointer<__CFArray>; +typedef CFArrayApplierFunction + = ffi.Pointer>; +typedef CFArrayApplierFunctionFunction = ffi.Void Function( + ffi.Pointer value, ffi.Pointer context); +typedef DartCFArrayApplierFunctionFunction = void Function( + ffi.Pointer value, ffi.Pointer context); +typedef CFComparatorFunction + = ffi.Pointer>; +typedef CFComparatorFunctionFunction = CFIndex Function( + ffi.Pointer val1, + ffi.Pointer val2, + ffi.Pointer context); +typedef DartCFComparatorFunctionFunction = CFComparisonResult Function( + ffi.Pointer val1, + ffi.Pointer val2, + ffi.Pointer context); -final class CFGregorianUnits extends ffi.Struct { - @SInt32() - external int years; +enum CFComparisonResult { + kCFCompareLessThan(-1), + kCFCompareEqualTo(0), + kCFCompareGreaterThan(1); - @SInt32() - external int months; + final int value; + const CFComparisonResult(this.value); - @SInt32() - external int days; + static CFComparisonResult fromValue(int value) => switch (value) { + -1 => kCFCompareLessThan, + 0 => kCFCompareEqualTo, + 1 => kCFCompareGreaterThan, + _ => + throw ArgumentError("Unknown value for CFComparisonResult: $value"), + }; +} - @SInt32() - external int hours; +/// OS_sec_object +abstract final class OS_sec_object { + /// Builds an object that implements the OS_sec_object protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - @SInt32() - external int minutes; + return builder.build(); + } - @ffi.Double() - external double seconds; + /// Adds the implementation of the OS_sec_object protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -abstract class CFGregorianUnitFlags { - static const int kCFGregorianUnitsYears = 1; - static const int kCFGregorianUnitsMonths = 2; - static const int kCFGregorianUnitsDays = 4; - static const int kCFGregorianUnitsHours = 8; - static const int kCFGregorianUnitsMinutes = 16; - static const int kCFGregorianUnitsSeconds = 32; - static const int kCFGregorianAllUnits = 16777215; -} +late final _protocol_OS_sec_object = objc.getProtocol("OS_sec_object"); -typedef CFTimeZoneRef = ffi.Pointer<__CFTimeZone>; +final class __SecCertificate extends ffi.Opaque {} -final class __CFData extends ffi.Opaque {} +final class __SecIdentity extends ffi.Opaque {} -typedef CFDataRef = ffi.Pointer<__CFData>; -typedef CFMutableDataRef = ffi.Pointer<__CFData>; +final class __SecKey extends ffi.Opaque {} -abstract class CFDataSearchFlags { - static const int kCFDataSearchBackwards = 1; - static const int kCFDataSearchAnchored = 2; -} +final class __SecPolicy extends ffi.Opaque {} -final class __CFCharacterSet extends ffi.Opaque {} +final class __SecAccessControl extends ffi.Opaque {} -abstract class CFCharacterSetPredefinedSet { - static const int kCFCharacterSetControl = 1; - static const int kCFCharacterSetWhitespace = 2; - static const int kCFCharacterSetWhitespaceAndNewline = 3; - static const int kCFCharacterSetDecimalDigit = 4; - static const int kCFCharacterSetLetter = 5; - static const int kCFCharacterSetLowercaseLetter = 6; - static const int kCFCharacterSetUppercaseLetter = 7; - static const int kCFCharacterSetNonBase = 8; - static const int kCFCharacterSetDecomposable = 9; - static const int kCFCharacterSetAlphaNumeric = 10; - static const int kCFCharacterSetPunctuation = 11; - static const int kCFCharacterSetCapitalizedLetter = 13; - static const int kCFCharacterSetSymbol = 14; - static const int kCFCharacterSetNewline = 15; - static const int kCFCharacterSetIllegal = 12; -} +final class __SecKeychain extends ffi.Opaque {} -typedef CFCharacterSetRef = ffi.Pointer<__CFCharacterSet>; -typedef CFMutableCharacterSetRef = ffi.Pointer<__CFCharacterSet>; -typedef UniChar = UInt16; +final class __SecKeychainItem extends ffi.Opaque {} -final class __CFError extends ffi.Opaque {} +final class __SecKeychainSearch extends ffi.Opaque {} -typedef CFErrorDomain = CFStringRef; -typedef CFErrorRef = ffi.Pointer<__CFError>; +final class SecKeychainAttribute extends ffi.Struct { + @SecKeychainAttrType() + external int tag; + + @UInt32() + external int length; -abstract class CFStringBuiltInEncodings { - static const int kCFStringEncodingMacRoman = 0; - static const int kCFStringEncodingWindowsLatin1 = 1280; - static const int kCFStringEncodingISOLatin1 = 513; - static const int kCFStringEncodingNextStepLatin = 2817; - static const int kCFStringEncodingASCII = 1536; - static const int kCFStringEncodingUnicode = 256; - static const int kCFStringEncodingUTF8 = 134217984; - static const int kCFStringEncodingNonLossyASCII = 3071; - static const int kCFStringEncodingUTF16 = 256; - static const int kCFStringEncodingUTF16BE = 268435712; - static const int kCFStringEncodingUTF16LE = 335544576; - static const int kCFStringEncodingUTF32 = 201326848; - static const int kCFStringEncodingUTF32BE = 402653440; - static const int kCFStringEncodingUTF32LE = 469762304; + external ffi.Pointer data; } -typedef CFStringEncoding = UInt32; -typedef CFMutableStringRef = ffi.Pointer<__CFString>; -typedef StringPtr = ffi.Pointer; -typedef ConstStringPtr = ffi.Pointer; +typedef SecKeychainAttrType = OSType; +typedef OSType = FourCharCode; +typedef FourCharCode = UInt32; -abstract class CFStringCompareFlags { - static const int kCFCompareCaseInsensitive = 1; - static const int kCFCompareBackwards = 4; - static const int kCFCompareAnchored = 8; - static const int kCFCompareNonliteral = 16; - static const int kCFCompareLocalized = 32; - static const int kCFCompareNumerically = 64; - static const int kCFCompareDiacriticInsensitive = 128; - static const int kCFCompareWidthInsensitive = 256; - static const int kCFCompareForcedOrdering = 512; -} +final class SecKeychainAttributeList extends ffi.Struct { + @UInt32() + external int count; -abstract class CFStringNormalizationForm { - static const int kCFStringNormalizationFormD = 0; - static const int kCFStringNormalizationFormKD = 1; - static const int kCFStringNormalizationFormC = 2; - static const int kCFStringNormalizationFormKC = 3; + external ffi.Pointer attr; } -final class CFStringInlineBuffer extends ffi.Struct { - @ffi.Array.multi([64]) - external ffi.Array buffer; - - external CFStringRef theString; +final class __SecTrustedApplication extends ffi.Opaque {} - external ffi.Pointer directUniCharBuffer; +final class __SecAccess extends ffi.Opaque {} - external ffi.Pointer directCStringBuffer; +final class __SecACL extends ffi.Opaque {} - external CFRange rangeToBuffer; +final class __SecPassword extends ffi.Opaque {} - @CFIndex() - external int bufferedRangeStart; +final class SecKeychainAttributeInfo extends ffi.Struct { + @UInt32() + external int count; - @CFIndex() - external int bufferedRangeEnd; -} + external ffi.Pointer tag; -abstract class CFTimeZoneNameStyle { - static const int kCFTimeZoneNameStyleStandard = 0; - static const int kCFTimeZoneNameStyleShortStandard = 1; - static const int kCFTimeZoneNameStyleDaylightSaving = 2; - static const int kCFTimeZoneNameStyleShortDaylightSaving = 3; - static const int kCFTimeZoneNameStyleGeneric = 4; - static const int kCFTimeZoneNameStyleShortGeneric = 5; + external ffi.Pointer format; } -final class __CFCalendar extends ffi.Opaque {} +typedef OSStatus = SInt32; -typedef CFCalendarRef = ffi.Pointer<__CFCalendar>; +final class _RuneEntry extends ffi.Struct { + @__darwin_rune_t() + external int __min; -abstract class CFCalendarUnit { - static const int kCFCalendarUnitEra = 2; - static const int kCFCalendarUnitYear = 4; - static const int kCFCalendarUnitMonth = 8; - static const int kCFCalendarUnitDay = 16; - static const int kCFCalendarUnitHour = 32; - static const int kCFCalendarUnitMinute = 64; - static const int kCFCalendarUnitSecond = 128; - static const int kCFCalendarUnitWeek = 256; - static const int kCFCalendarUnitWeekday = 512; - static const int kCFCalendarUnitWeekdayOrdinal = 1024; - static const int kCFCalendarUnitQuarter = 2048; - static const int kCFCalendarUnitWeekOfMonth = 4096; - static const int kCFCalendarUnitWeekOfYear = 8192; - static const int kCFCalendarUnitYearForWeekOfYear = 16384; -} + @__darwin_rune_t() + external int __max; -final class CGPoint extends ffi.Struct { - @CGFloat() - external double x; + @__darwin_rune_t() + external int __map; - @CGFloat() - external double y; + external ffi.Pointer<__uint32_t> __types; } -typedef CGFloat = ffi.Double; -typedef DartCGFloat = double; +typedef __darwin_rune_t = __darwin_wchar_t; +typedef __darwin_wchar_t = ffi.Int; +typedef Dart__darwin_wchar_t = int; -final class CGSize extends ffi.Struct { - @CGFloat() - external double width; +final class _RuneRange extends ffi.Struct { + @ffi.Int() + external int __nranges; - @CGFloat() - external double height; + external ffi.Pointer<_RuneEntry> __ranges; } -final class CGVector extends ffi.Struct { - @CGFloat() - external double dx; +final class _RuneCharClass extends ffi.Struct { + @ffi.Array.multi([14]) + external ffi.Array __name; - @CGFloat() - external double dy; + @__uint32_t() + external int __mask; } -final class CGRect extends ffi.Struct { - external CGPoint origin; +final class _RuneLocale extends ffi.Struct { + @ffi.Array.multi([8]) + external ffi.Array __magic; - external CGSize size; -} + @ffi.Array.multi([32]) + external ffi.Array __encoding; -abstract class CGRectEdge { - static const int CGRectMinXEdge = 0; - static const int CGRectMinYEdge = 1; - static const int CGRectMaxXEdge = 2; - static const int CGRectMaxYEdge = 3; -} + external ffi.Pointer< + ffi.NativeFunction< + __darwin_rune_t Function(ffi.Pointer, __darwin_size_t, + ffi.Pointer>)>> __sgetrune; -final class CGAffineTransform extends ffi.Struct { - @CGFloat() - external double a; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function(__darwin_rune_t, ffi.Pointer, + __darwin_size_t, ffi.Pointer>)>> __sputrune; - @CGFloat() - external double b; + @__darwin_rune_t() + external int __invalid_rune; - @CGFloat() - external double c; + @ffi.Array.multi([256]) + external ffi.Array<__uint32_t> __runetype; - @CGFloat() - external double d; + @ffi.Array.multi([256]) + external ffi.Array<__darwin_rune_t> __maplower; - @CGFloat() - external double tx; + @ffi.Array.multi([256]) + external ffi.Array<__darwin_rune_t> __mapupper; - @CGFloat() - external double ty; -} + external _RuneRange __runetype_ext; -final class CGAffineTransformComponents extends ffi.Struct { - external CGSize scale; + external _RuneRange __maplower_ext; - @CGFloat() - external double horizontalShear; + external _RuneRange __mapupper_ext; - @CGFloat() - external double rotation; + external ffi.Pointer __variable; - external CGVector translation; -} + @ffi.Int() + external int __variable_len; -final class __CFDateFormatter extends ffi.Opaque {} + @ffi.Int() + external int __ncharclasses; -abstract class CFDateFormatterStyle { - static const int kCFDateFormatterNoStyle = 0; - static const int kCFDateFormatterShortStyle = 1; - static const int kCFDateFormatterMediumStyle = 2; - static const int kCFDateFormatterLongStyle = 3; - static const int kCFDateFormatterFullStyle = 4; -} - -abstract class CFISO8601DateFormatOptions { - static const int kCFISO8601DateFormatWithYear = 1; - static const int kCFISO8601DateFormatWithMonth = 2; - static const int kCFISO8601DateFormatWithWeekOfYear = 4; - static const int kCFISO8601DateFormatWithDay = 16; - static const int kCFISO8601DateFormatWithTime = 32; - static const int kCFISO8601DateFormatWithTimeZone = 64; - static const int kCFISO8601DateFormatWithSpaceBetweenDateAndTime = 128; - static const int kCFISO8601DateFormatWithDashSeparatorInDate = 256; - static const int kCFISO8601DateFormatWithColonSeparatorInTime = 512; - static const int kCFISO8601DateFormatWithColonSeparatorInTimeZone = 1024; - static const int kCFISO8601DateFormatWithFractionalSeconds = 2048; - static const int kCFISO8601DateFormatWithFullDate = 275; - static const int kCFISO8601DateFormatWithFullTime = 1632; - static const int kCFISO8601DateFormatWithInternetDateTime = 1907; + external ffi.Pointer<_RuneCharClass> __charclasses; } -typedef CFDateFormatterRef = ffi.Pointer<__CFDateFormatter>; -typedef CFDateFormatterKey = CFStringRef; +typedef __darwin_ct_rune_t = ffi.Int; +typedef Dart__darwin_ct_rune_t = int; -final class __CFBoolean extends ffi.Opaque {} +final class lconv extends ffi.Struct { + external ffi.Pointer decimal_point; -typedef CFBooleanRef = ffi.Pointer<__CFBoolean>; + external ffi.Pointer thousands_sep; -abstract class CFNumberType { - static const int kCFNumberSInt8Type = 1; - static const int kCFNumberSInt16Type = 2; - static const int kCFNumberSInt32Type = 3; - static const int kCFNumberSInt64Type = 4; - static const int kCFNumberFloat32Type = 5; - static const int kCFNumberFloat64Type = 6; - static const int kCFNumberCharType = 7; - static const int kCFNumberShortType = 8; - static const int kCFNumberIntType = 9; - static const int kCFNumberLongType = 10; - static const int kCFNumberLongLongType = 11; - static const int kCFNumberFloatType = 12; - static const int kCFNumberDoubleType = 13; - static const int kCFNumberCFIndexType = 14; - static const int kCFNumberNSIntegerType = 15; - static const int kCFNumberCGFloatType = 16; - static const int kCFNumberMaxType = 16; -} + external ffi.Pointer grouping; -final class __CFNumber extends ffi.Opaque {} + external ffi.Pointer int_curr_symbol; -typedef CFNumberRef = ffi.Pointer<__CFNumber>; + external ffi.Pointer currency_symbol; -final class __CFNumberFormatter extends ffi.Opaque {} + external ffi.Pointer mon_decimal_point; -abstract class CFNumberFormatterStyle { - static const int kCFNumberFormatterNoStyle = 0; - static const int kCFNumberFormatterDecimalStyle = 1; - static const int kCFNumberFormatterCurrencyStyle = 2; - static const int kCFNumberFormatterPercentStyle = 3; - static const int kCFNumberFormatterScientificStyle = 4; - static const int kCFNumberFormatterSpellOutStyle = 5; - static const int kCFNumberFormatterOrdinalStyle = 6; - static const int kCFNumberFormatterCurrencyISOCodeStyle = 8; - static const int kCFNumberFormatterCurrencyPluralStyle = 9; - static const int kCFNumberFormatterCurrencyAccountingStyle = 10; -} + external ffi.Pointer mon_thousands_sep; -typedef CFNumberFormatterRef = ffi.Pointer<__CFNumberFormatter>; + external ffi.Pointer mon_grouping; -abstract class CFNumberFormatterOptionFlags { - static const int kCFNumberFormatterParseIntegersOnly = 1; -} + external ffi.Pointer positive_sign; -typedef CFNumberFormatterKey = CFStringRef; + external ffi.Pointer negative_sign; -abstract class CFNumberFormatterRoundingMode { - static const int kCFNumberFormatterRoundCeiling = 0; - static const int kCFNumberFormatterRoundFloor = 1; - static const int kCFNumberFormatterRoundDown = 2; - static const int kCFNumberFormatterRoundUp = 3; - static const int kCFNumberFormatterRoundHalfEven = 4; - static const int kCFNumberFormatterRoundHalfDown = 5; - static const int kCFNumberFormatterRoundHalfUp = 6; -} + @ffi.Char() + external int int_frac_digits; -abstract class CFNumberFormatterPadPosition { - static const int kCFNumberFormatterPadBeforePrefix = 0; - static const int kCFNumberFormatterPadAfterPrefix = 1; - static const int kCFNumberFormatterPadBeforeSuffix = 2; - static const int kCFNumberFormatterPadAfterSuffix = 3; -} + @ffi.Char() + external int frac_digits; -typedef CFPropertyListRef = CFTypeRef; + @ffi.Char() + external int p_cs_precedes; -abstract class CFURLPathStyle { - static const int kCFURLPOSIXPathStyle = 0; - static const int kCFURLHFSPathStyle = 1; - static const int kCFURLWindowsPathStyle = 2; -} + @ffi.Char() + external int p_sep_by_space; -final class __CFURL extends ffi.Opaque {} + @ffi.Char() + external int n_cs_precedes; -typedef CFURLRef = ffi.Pointer<__CFURL>; + @ffi.Char() + external int n_sep_by_space; -abstract class CFURLComponentType { - static const int kCFURLComponentScheme = 1; - static const int kCFURLComponentNetLocation = 2; - static const int kCFURLComponentPath = 3; - static const int kCFURLComponentResourceSpecifier = 4; - static const int kCFURLComponentUser = 5; - static const int kCFURLComponentPassword = 6; - static const int kCFURLComponentUserInfo = 7; - static const int kCFURLComponentHost = 8; - static const int kCFURLComponentPort = 9; - static const int kCFURLComponentParameterString = 10; - static const int kCFURLComponentQuery = 11; - static const int kCFURLComponentFragment = 12; -} + @ffi.Char() + external int p_sign_posn; -final class FSRef extends ffi.Opaque {} + @ffi.Char() + external int n_sign_posn; -abstract class CFURLBookmarkCreationOptions { - static const int kCFURLBookmarkCreationMinimalBookmarkMask = 512; - static const int kCFURLBookmarkCreationSuitableForBookmarkFile = 1024; - static const int kCFURLBookmarkCreationWithSecurityScope = 2048; - static const int kCFURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = - 4096; - static const int kCFURLBookmarkCreationWithoutImplicitSecurityScope = - 536870912; - static const int kCFURLBookmarkCreationPreferFileIDResolutionMask = 256; -} + @ffi.Char() + external int int_p_cs_precedes; -abstract class CFURLBookmarkResolutionOptions { - static const int kCFURLBookmarkResolutionWithoutUIMask = 256; - static const int kCFURLBookmarkResolutionWithoutMountingMask = 512; - static const int kCFURLBookmarkResolutionWithSecurityScope = 1024; - static const int kCFURLBookmarkResolutionWithoutImplicitStartAccessing = - 32768; - static const int kCFBookmarkResolutionWithoutUIMask = 256; - static const int kCFBookmarkResolutionWithoutMountingMask = 512; -} + @ffi.Char() + external int int_n_cs_precedes; -typedef CFURLBookmarkFileCreationOptions = CFOptionFlags; + @ffi.Char() + external int int_p_sep_by_space; -final class mach_port_status extends ffi.Struct { - @mach_port_rights_t() - external int mps_pset; + @ffi.Char() + external int int_n_sep_by_space; - @mach_port_seqno_t() - external int mps_seqno; + @ffi.Char() + external int int_p_sign_posn; - @mach_port_mscount_t() - external int mps_mscount; + @ffi.Char() + external int int_n_sign_posn; +} - @mach_port_msgcount_t() - external int mps_qlimit; +final class __float2 extends ffi.Struct { + @ffi.Float() + external double __sinval; - @mach_port_msgcount_t() - external int mps_msgcount; + @ffi.Float() + external double __cosval; +} - @mach_port_rights_t() - external int mps_sorights; +final class __double2 extends ffi.Struct { + @ffi.Double() + external double __sinval; - @boolean_t() - external int mps_srights; + @ffi.Double() + external double __cosval; +} - @boolean_t() - external int mps_pdrequest; +final class exception extends ffi.Struct { + @ffi.Int() + external int type; - @boolean_t() - external int mps_nsrequest; + external ffi.Pointer name; - @natural_t() - external int mps_flags; -} + @ffi.Double() + external double arg1; -typedef mach_port_rights_t = natural_t; -typedef natural_t = __darwin_natural_t; -typedef __darwin_natural_t = ffi.UnsignedInt; -typedef Dart__darwin_natural_t = int; -typedef mach_port_seqno_t = natural_t; -typedef mach_port_mscount_t = natural_t; -typedef mach_port_msgcount_t = natural_t; -typedef boolean_t = ffi.Int; -typedef Dartboolean_t = int; + @ffi.Double() + external double arg2; -final class mach_port_limits extends ffi.Struct { - @mach_port_msgcount_t() - external int mpl_qlimit; + @ffi.Double() + external double retval; } -final class mach_port_info_ext extends ffi.Struct { - external mach_port_status_t mpie_status; +typedef pthread_t = __darwin_pthread_t; +typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; +typedef stack_t = __darwin_sigaltstack; - @mach_port_msgcount_t() - external int mpie_boost_cnt; +final class __sbuf extends ffi.Struct { + external ffi.Pointer _base; - @ffi.Array.multi([6]) - external ffi.Array reserved; + @ffi.Int() + external int _size; } -typedef mach_port_status_t = mach_port_status; +final class __sFILEX extends ffi.Opaque {} -final class mach_port_guard_info extends ffi.Struct { - @ffi.Uint64() - external int mpgi_guard; -} +final class __sFILE extends ffi.Struct { + external ffi.Pointer _p; -final class mach_port_qos extends ffi.Opaque {} + @ffi.Int() + external int _r; -final class mach_service_port_info extends ffi.Struct { - @ffi.Array.multi([255]) - external ffi.Array mspi_string_name; + @ffi.Int() + external int _w; - @ffi.Uint8() - external int mspi_domain_type; -} + @ffi.Short() + external int _flags; -final class mach_port_options extends ffi.Struct { - @ffi.Uint32() - external int flags; + @ffi.Short() + external int _file; - external mach_port_limits_t mpl; + external __sbuf _bf; - external UnnamedUnion1 unnamed; -} + @ffi.Int() + external int _lbfsize; -typedef mach_port_limits_t = mach_port_limits; + external ffi.Pointer _cookie; -final class UnnamedUnion1 extends ffi.Union { - @ffi.Array.multi([2]) - external ffi.Array reserved; + external ffi + .Pointer)>> + _close; - @mach_port_name_t() - external int work_interval_port; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> _read; - external mach_service_port_info_t service_port_info; + external ffi.Pointer< + ffi.NativeFunction< + fpos_t Function(ffi.Pointer, fpos_t, ffi.Int)>> _seek; - @mach_port_name_t() - external int service_port_name; -} + external ffi.Pointer< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, ffi.Pointer, ffi.Int)>> _write; -typedef mach_port_name_t = natural_t; -typedef mach_service_port_info_t = ffi.Pointer; + external __sbuf _ub; -abstract class mach_port_guard_exception_codes { - static const int kGUARD_EXC_DESTROY = 1; - static const int kGUARD_EXC_MOD_REFS = 2; - static const int kGUARD_EXC_INVALID_OPTIONS = 3; - static const int kGUARD_EXC_SET_CONTEXT = 4; - static const int kGUARD_EXC_THREAD_SET_STATE = 5; - static const int kGUARD_EXC_EXCEPTION_BEHAVIOR_ENFORCE = 6; - static const int kGUARD_EXC_UNGUARDED = 8; - static const int kGUARD_EXC_INCORRECT_GUARD = 16; - static const int kGUARD_EXC_IMMOVABLE = 32; - static const int kGUARD_EXC_STRICT_REPLY = 64; - static const int kGUARD_EXC_MSG_FILTERED = 128; - static const int kGUARD_EXC_INVALID_RIGHT = 256; - static const int kGUARD_EXC_INVALID_NAME = 512; - static const int kGUARD_EXC_INVALID_VALUE = 1024; - static const int kGUARD_EXC_INVALID_ARGUMENT = 2048; - static const int kGUARD_EXC_RIGHT_EXISTS = 4096; - static const int kGUARD_EXC_KERN_NO_SPACE = 8192; - static const int kGUARD_EXC_KERN_FAILURE = 16384; - static const int kGUARD_EXC_KERN_RESOURCE = 32768; - static const int kGUARD_EXC_SEND_INVALID_REPLY = 65536; - static const int kGUARD_EXC_SEND_INVALID_VOUCHER = 131072; - static const int kGUARD_EXC_SEND_INVALID_RIGHT = 262144; - static const int kGUARD_EXC_RCV_INVALID_NAME = 524288; - static const int kGUARD_EXC_RCV_GUARDED_DESC = 1048576; - static const int kGUARD_EXC_MOD_REFS_NON_FATAL = 2097152; - static const int kGUARD_EXC_IMMOVABLE_NON_FATAL = 4194304; - static const int kGUARD_EXC_REQUIRE_REPLY_PORT_SEMANTICS = 8388608; -} + external ffi.Pointer<__sFILEX> _extra; -final class __CFRunLoop extends ffi.Opaque {} + @ffi.Int() + external int _ur; -final class __CFRunLoopSource extends ffi.Opaque {} + @ffi.Array.multi([3]) + external ffi.Array _ubuf; -final class __CFRunLoopObserver extends ffi.Opaque {} + @ffi.Array.multi([1]) + external ffi.Array _nbuf; -final class __CFRunLoopTimer extends ffi.Opaque {} + external __sbuf _lb; -abstract class CFRunLoopRunResult { - static const int kCFRunLoopRunFinished = 1; - static const int kCFRunLoopRunStopped = 2; - static const int kCFRunLoopRunTimedOut = 3; - static const int kCFRunLoopRunHandledSource = 4; -} + @ffi.Int() + external int _blksize; -abstract class CFRunLoopActivity { - static const int kCFRunLoopEntry = 1; - static const int kCFRunLoopBeforeTimers = 2; - static const int kCFRunLoopBeforeSources = 4; - static const int kCFRunLoopBeforeWaiting = 32; - static const int kCFRunLoopAfterWaiting = 64; - static const int kCFRunLoopExit = 128; - static const int kCFRunLoopAllActivities = 268435455; + @fpos_t() + external int _offset; } -typedef CFRunLoopMode = CFStringRef; -typedef CFRunLoopRef = ffi.Pointer<__CFRunLoop>; -typedef CFRunLoopSourceRef = ffi.Pointer<__CFRunLoopSource>; -typedef CFRunLoopObserverRef = ffi.Pointer<__CFRunLoopObserver>; -typedef CFRunLoopTimerRef = ffi.Pointer<__CFRunLoopTimer>; - -final class CFRunLoopSourceContext extends ffi.Struct { - @CFIndex() - external int version; +typedef fpos_t = __darwin_off_t; +typedef __darwin_off_t = __int64_t; +typedef __int64_t = ffi.LongLong; +typedef Dart__int64_t = int; +typedef FILE = __sFILE; +typedef off_t = __darwin_off_t; +typedef ssize_t = __darwin_ssize_t; +typedef __darwin_ssize_t = ffi.Long; +typedef Dart__darwin_ssize_t = int; +typedef errno_t = ffi.Int; +typedef Darterrno_t = int; +typedef rsize_t = ffi.UnsignedLong; +typedef Dartrsize_t = int; - external ffi.Pointer info; +final class timespec extends ffi.Struct { + @__darwin_time_t() + external int tv_sec; - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>> retain; + @ffi.Long() + external int tv_nsec; +} - external ffi.Pointer< - ffi.NativeFunction info)>> - release; +final class tm extends ffi.Struct { + @ffi.Int() + external int tm_sec; - external ffi.Pointer< - ffi.NativeFunction info)>> - copyDescription; + @ffi.Int() + external int tm_min; - external ffi.Pointer< - ffi.NativeFunction< - Boolean Function( - ffi.Pointer info1, ffi.Pointer info2)>> equal; + @ffi.Int() + external int tm_hour; - external ffi.Pointer< - ffi.NativeFunction info)>> hash; + @ffi.Int() + external int tm_mday; - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer info, CFRunLoopRef rl, - CFRunLoopMode mode)>> schedule; + @ffi.Int() + external int tm_mon; - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer info, CFRunLoopRef rl, - CFRunLoopMode mode)>> cancel; + @ffi.Int() + external int tm_year; - external ffi.Pointer< - ffi.NativeFunction info)>> - perform; -} + @ffi.Int() + external int tm_wday; -final class CFRunLoopSourceContext1 extends ffi.Struct { - @CFIndex() - external int version; + @ffi.Int() + external int tm_yday; - external ffi.Pointer info; + @ffi.Int() + external int tm_isdst; - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>> retain; + @ffi.Long() + external int tm_gmtoff; - external ffi.Pointer< - ffi.NativeFunction info)>> - release; + external ffi.Pointer tm_zone; +} - external ffi.Pointer< - ffi.NativeFunction info)>> - copyDescription; +typedef clock_t = __darwin_clock_t; +typedef __darwin_clock_t = ffi.UnsignedLong; +typedef Dart__darwin_clock_t = int; +typedef time_t = __darwin_time_t; - external ffi.Pointer< - ffi.NativeFunction< - Boolean Function( - ffi.Pointer info1, ffi.Pointer info2)>> equal; +enum clockid_t { + _CLOCK_REALTIME(0), + _CLOCK_MONOTONIC(6), + _CLOCK_MONOTONIC_RAW(4), + _CLOCK_MONOTONIC_RAW_APPROX(5), + _CLOCK_UPTIME_RAW(8), + _CLOCK_UPTIME_RAW_APPROX(9), + _CLOCK_PROCESS_CPUTIME_ID(12), + _CLOCK_THREAD_CPUTIME_ID(16); + + final int value; + const clockid_t(this.value); + + static clockid_t fromValue(int value) => switch (value) { + 0 => _CLOCK_REALTIME, + 6 => _CLOCK_MONOTONIC, + 4 => _CLOCK_MONOTONIC_RAW, + 5 => _CLOCK_MONOTONIC_RAW_APPROX, + 8 => _CLOCK_UPTIME_RAW, + 9 => _CLOCK_UPTIME_RAW_APPROX, + 12 => _CLOCK_PROCESS_CPUTIME_ID, + 16 => _CLOCK_THREAD_CPUTIME_ID, + _ => throw ArgumentError("Unknown value for clockid_t: $value"), + }; +} - external ffi.Pointer< - ffi.NativeFunction info)>> hash; +typedef intmax_t = ffi.Long; +typedef Dartintmax_t = int; - external ffi.Pointer< - ffi.NativeFunction info)>> - getPort; +final class imaxdiv_t extends ffi.Struct { + @intmax_t() + external int quot; - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer msg, - CFIndex size, - CFAllocatorRef allocator, - ffi.Pointer info)>> perform; + @intmax_t() + external int rem; } -typedef mach_port_t = __darwin_mach_port_t; -typedef __darwin_mach_port_t = __darwin_mach_port_name_t; -typedef __darwin_mach_port_name_t = __darwin_natural_t; +typedef uintmax_t = ffi.UnsignedLong; +typedef Dartuintmax_t = int; -final class CFRunLoopObserverContext extends ffi.Struct { +final class CFBagCallBacks extends ffi.Struct { @CFIndex() external int version; - external ffi.Pointer info; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>> retain; + external CFBagRetainCallBack retain; - external ffi.Pointer< - ffi.NativeFunction info)>> - release; + external CFBagReleaseCallBack release; - external ffi.Pointer< - ffi.NativeFunction info)>> - copyDescription; -} + external CFBagCopyDescriptionCallBack copyDescription; -typedef CFRunLoopObserverCallBack - = ffi.Pointer>; -typedef CFRunLoopObserverCallBackFunction = ffi.Void Function( - CFRunLoopObserverRef observer, - ffi.Int32 activity, - ffi.Pointer info); -typedef DartCFRunLoopObserverCallBackFunction = void Function( - CFRunLoopObserverRef observer, int activity, ffi.Pointer info); -void _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() - .asFunction()(arg0, arg1); -final _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_registerClosure( - void Function(CFRunLoopObserverRef, int) fn) { - final id = - ++_ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureRegistryIndex; - _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopObserverRef arg0, int arg1) => - _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + external CFBagEqualCallBack equal; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(CFRunLoopObserverRef arg0, ffi.Int32 arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - CFRunLoopObserverRef, ffi.Int32)>( - _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CFBagHashCallBack hash; +} - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity.fromFunction( - NativeCupertinoHttp lib, void Function(CFRunLoopObserverRef, int) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - CFRunLoopObserverRef, ffi.Int32)>( - _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_registerClosure( - (CFRunLoopObserverRef arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +typedef CFBagRetainCallBack + = ffi.Pointer>; +typedef CFBagRetainCallBackFunction = ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFBagReleaseCallBack + = ffi.Pointer>; +typedef CFBagReleaseCallBackFunction = ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef DartCFBagReleaseCallBackFunction = void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFBagCopyDescriptionCallBack + = ffi.Pointer>; +typedef CFBagCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer value); +typedef CFBagEqualCallBack + = ffi.Pointer>; +typedef CFBagEqualCallBackFunction = Boolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef DartCFBagEqualCallBackFunction = DartBoolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef CFBagHashCallBack + = ffi.Pointer>; +typedef CFBagHashCallBackFunction = CFHashCode Function( + ffi.Pointer value); +typedef DartCFBagHashCallBackFunction = DartCFHashCode Function( + ffi.Pointer value); - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity.listener( - NativeCupertinoHttp lib, void Function(CFRunLoopObserverRef, int) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - CFRunLoopObserverRef, ffi.Int32)>.listener( - _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_registerClosure( - (CFRunLoopObserverRef arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, CFRunLoopObserverRef, ffi.Int32)>? - _dartFuncListenerTrampoline; +final class __CFBag extends ffi.Opaque {} - void call(CFRunLoopObserverRef arg0, int arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - CFRunLoopObserverRef arg0, ffi.Int32 arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, CFRunLoopObserverRef, - int)>()(_id, arg0, arg1); -} +typedef CFBagRef = ffi.Pointer<__CFBag>; +typedef CFMutableBagRef = ffi.Pointer<__CFBag>; +typedef CFBagApplierFunction + = ffi.Pointer>; +typedef CFBagApplierFunctionFunction = ffi.Void Function( + ffi.Pointer value, ffi.Pointer context); +typedef DartCFBagApplierFunctionFunction = void Function( + ffi.Pointer value, ffi.Pointer context); -final class CFRunLoopTimerContext extends ffi.Struct { +final class CFBinaryHeapCompareContext extends ffi.Struct { @CFIndex() external int version; @@ -76109,1022 +49235,1173 @@ final class CFRunLoopTimerContext extends ffi.Struct { copyDescription; } -typedef CFRunLoopTimerCallBack - = ffi.Pointer>; -typedef CFRunLoopTimerCallBackFunction = ffi.Void Function( - CFRunLoopTimerRef timer, ffi.Pointer info); -typedef DartCFRunLoopTimerCallBackFunction = void Function( - CFRunLoopTimerRef timer, ffi.Pointer info); -void _ObjCBlock_ffiVoid_CFRunLoopTimerRef_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -final _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_CFRunLoopTimerRef_registerClosure( - void Function(CFRunLoopTimerRef) fn) { - final id = ++_ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureRegistryIndex; - _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0) => - _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureRegistry[ - block.ref.target.address]!(arg0); +final class CFBinaryHeapCallBacks extends ffi.Struct { + @CFIndex() + external int version; -class ObjCBlock_ffiVoid_CFRunLoopTimerRef extends _ObjCBlockBase { - ObjCBlock_ffiVoid_CFRunLoopTimerRef._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer ptr)>> retain; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_CFRunLoopTimerRef.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, CFRunLoopTimerRef)>( - _ObjCBlock_ffiVoid_CFRunLoopTimerRef_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer ptr)>> release; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_CFRunLoopTimerRef.fromFunction( - NativeCupertinoHttp lib, void Function(CFRunLoopTimerRef) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, CFRunLoopTimerRef)>( - _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_CFRunLoopTimerRef_registerClosure( - (CFRunLoopTimerRef arg0) => fn(arg0))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + external ffi.Pointer< + ffi.NativeFunction ptr)>> + copyDescription; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_CFRunLoopTimerRef.listener( - NativeCupertinoHttp lib, void Function(CFRunLoopTimerRef) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - CFRunLoopTimerRef)>.listener( - _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_CFRunLoopTimerRef_registerClosure( - (CFRunLoopTimerRef arg0) => fn(arg0))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, CFRunLoopTimerRef)>? - _dartFuncListenerTrampoline; - - void call(CFRunLoopTimerRef arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, CFRunLoopTimerRef arg0)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, CFRunLoopTimerRef)>()(_id, arg0); + external ffi.Pointer< + ffi.NativeFunction< + CFIndex Function( + ffi.Pointer ptr1, + ffi.Pointer ptr2, + ffi.Pointer context)>> compare; } -final class __CFSocket extends ffi.Opaque {} - -abstract class CFSocketError { - static const int kCFSocketSuccess = 0; - static const int kCFSocketError = -1; - static const int kCFSocketTimeout = -2; -} +final class __CFBinaryHeap extends ffi.Opaque {} -final class CFSocketSignature extends ffi.Struct { - @SInt32() - external int protocolFamily; +typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; +typedef CFBinaryHeapApplierFunction + = ffi.Pointer>; +typedef CFBinaryHeapApplierFunctionFunction = ffi.Void Function( + ffi.Pointer val, ffi.Pointer context); +typedef DartCFBinaryHeapApplierFunctionFunction = void Function( + ffi.Pointer val, ffi.Pointer context); - @SInt32() - external int socketType; +final class __CFBitVector extends ffi.Opaque {} - @SInt32() - external int protocol; +typedef CFBitVectorRef = ffi.Pointer<__CFBitVector>; +typedef CFMutableBitVectorRef = ffi.Pointer<__CFBitVector>; +typedef CFBit = UInt32; - external CFDataRef address; +final class CFSwappedFloat32 extends ffi.Struct { + @ffi.Uint32() + external int v; } -abstract class CFSocketCallBackType { - static const int kCFSocketNoCallBack = 0; - static const int kCFSocketReadCallBack = 1; - static const int kCFSocketAcceptCallBack = 2; - static const int kCFSocketDataCallBack = 3; - static const int kCFSocketConnectCallBack = 4; - static const int kCFSocketWriteCallBack = 8; +final class CFSwappedFloat64 extends ffi.Struct { + @ffi.Uint64() + external int v; } -final class CFSocketContext extends ffi.Struct { +final class CFDictionaryKeyCallBacks extends ffi.Struct { @CFIndex() external int version; - external ffi.Pointer info; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>> retain; - - external ffi.Pointer< - ffi.NativeFunction info)>> - release; - - external ffi.Pointer< - ffi.NativeFunction info)>> - copyDescription; -} + external CFDictionaryRetainCallBack retain; -typedef CFSocketRef = ffi.Pointer<__CFSocket>; -typedef CFSocketCallBack - = ffi.Pointer>; -typedef CFSocketCallBackFunction = ffi.Void Function( - CFSocketRef s, - ffi.Int32 type, - CFDataRef address, - ffi.Pointer data, - ffi.Pointer info); -typedef DartCFSocketCallBackFunction = void Function(CFSocketRef s, int type, - CFDataRef address, ffi.Pointer data, ffi.Pointer info); -typedef CFSocketNativeHandle = ffi.Int; -typedef DartCFSocketNativeHandle = int; + external CFDictionaryReleaseCallBack release; -final class accessx_descriptor extends ffi.Struct { - @ffi.UnsignedInt() - external int ad_name_offset; + external CFDictionaryCopyDescriptionCallBack copyDescription; - @ffi.Int() - external int ad_flags; + external CFDictionaryEqualCallBack equal; - @ffi.Array.multi([2]) - external ffi.Array ad_pad; + external CFDictionaryHashCallBack hash; } -typedef gid_t = __darwin_gid_t; -typedef __darwin_gid_t = __uint32_t; -typedef useconds_t = __darwin_useconds_t; -typedef __darwin_useconds_t = __uint32_t; +typedef CFDictionaryRetainCallBack + = ffi.Pointer>; +typedef CFDictionaryRetainCallBackFunction = ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFDictionaryReleaseCallBack + = ffi.Pointer>; +typedef CFDictionaryReleaseCallBackFunction = ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef DartCFDictionaryReleaseCallBackFunction = void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFDictionaryCopyDescriptionCallBack = ffi + .Pointer>; +typedef CFDictionaryCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer value); +typedef CFDictionaryEqualCallBack + = ffi.Pointer>; +typedef CFDictionaryEqualCallBackFunction = Boolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef DartCFDictionaryEqualCallBackFunction = DartBoolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef CFDictionaryHashCallBack + = ffi.Pointer>; +typedef CFDictionaryHashCallBackFunction = CFHashCode Function( + ffi.Pointer value); +typedef DartCFDictionaryHashCallBackFunction = DartCFHashCode Function( + ffi.Pointer value); -final class fssearchblock extends ffi.Opaque {} +final class CFDictionaryValueCallBacks extends ffi.Struct { + @CFIndex() + external int version; -final class searchstate extends ffi.Opaque {} + external CFDictionaryRetainCallBack retain; -final class flock extends ffi.Struct { - @off_t() - external int l_start; + external CFDictionaryReleaseCallBack release; - @off_t() - external int l_len; + external CFDictionaryCopyDescriptionCallBack copyDescription; - @pid_t() - external int l_pid; + external CFDictionaryEqualCallBack equal; +} - @ffi.Short() - external int l_type; +final class __CFDictionary extends ffi.Opaque {} - @ffi.Short() - external int l_whence; -} +typedef CFDictionaryRef = ffi.Pointer<__CFDictionary>; +typedef CFMutableDictionaryRef = ffi.Pointer<__CFDictionary>; +typedef CFDictionaryApplierFunction + = ffi.Pointer>; +typedef CFDictionaryApplierFunctionFunction = ffi.Void Function( + ffi.Pointer key, + ffi.Pointer value, + ffi.Pointer context); +typedef DartCFDictionaryApplierFunctionFunction = void Function( + ffi.Pointer key, + ffi.Pointer value, + ffi.Pointer context); -final class flocktimeout extends ffi.Struct { - external flock fl; +final class __CFNotificationCenter extends ffi.Opaque {} + +typedef CFNotificationCenterRef = ffi.Pointer<__CFNotificationCenter>; +typedef CFNotificationCallback + = ffi.Pointer>; +typedef CFNotificationCallbackFunction = ffi.Void Function( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo); +typedef DartCFNotificationCallbackFunction = void Function( + CFNotificationCenterRef center, + ffi.Pointer observer, + CFNotificationName name, + ffi.Pointer object, + CFDictionaryRef userInfo); +typedef CFNotificationName = CFStringRef; - external timespec timeout; -} +enum CFNotificationSuspensionBehavior { + CFNotificationSuspensionBehaviorDrop(1), + CFNotificationSuspensionBehaviorCoalesce(2), + CFNotificationSuspensionBehaviorHold(3), + CFNotificationSuspensionBehaviorDeliverImmediately(4); -final class radvisory extends ffi.Struct { - @off_t() - external int ra_offset; + final int value; + const CFNotificationSuspensionBehavior(this.value); - @ffi.Int() - external int ra_count; + static CFNotificationSuspensionBehavior fromValue(int value) => + switch (value) { + 1 => CFNotificationSuspensionBehaviorDrop, + 2 => CFNotificationSuspensionBehaviorCoalesce, + 3 => CFNotificationSuspensionBehaviorHold, + 4 => CFNotificationSuspensionBehaviorDeliverImmediately, + _ => throw ArgumentError( + "Unknown value for CFNotificationSuspensionBehavior: $value"), + }; } -final class fsignatures extends ffi.Struct { - @off_t() - external int fs_file_start; - - external ffi.Pointer fs_blob_start; +final class __CFLocale extends ffi.Opaque {} - @ffi.Size() - external int fs_blob_size; +typedef CFLocaleRef = ffi.Pointer<__CFLocale>; +typedef CFLocaleIdentifier = CFStringRef; +typedef LangCode = SInt16; +typedef RegionCode = SInt16; - @ffi.Size() - external int fs_fsignatures_size; +enum CFLocaleLanguageDirection { + kCFLocaleLanguageDirectionUnknown(0), + kCFLocaleLanguageDirectionLeftToRight(1), + kCFLocaleLanguageDirectionRightToLeft(2), + kCFLocaleLanguageDirectionTopToBottom(3), + kCFLocaleLanguageDirectionBottomToTop(4); - @ffi.Array.multi([20]) - external ffi.Array fs_cdhash; + final int value; + const CFLocaleLanguageDirection(this.value); - @ffi.Int() - external int fs_hash_type; + static CFLocaleLanguageDirection fromValue(int value) => switch (value) { + 0 => kCFLocaleLanguageDirectionUnknown, + 1 => kCFLocaleLanguageDirectionLeftToRight, + 2 => kCFLocaleLanguageDirectionRightToLeft, + 3 => kCFLocaleLanguageDirectionTopToBottom, + 4 => kCFLocaleLanguageDirectionBottomToTop, + _ => throw ArgumentError( + "Unknown value for CFLocaleLanguageDirection: $value"), + }; } -final class fsupplement extends ffi.Struct { - @off_t() - external int fs_file_start; +typedef CFLocaleKey = CFStringRef; +typedef CFCalendarIdentifier = CFStringRef; +typedef CFAbsoluteTime = CFTimeInterval; +typedef CFTimeInterval = ffi.Double; +typedef DartCFTimeInterval = double; - @off_t() - external int fs_blob_start; +final class __CFDate extends ffi.Opaque {} - @ffi.Size() - external int fs_blob_size; +typedef CFDateRef = ffi.Pointer<__CFDate>; - @ffi.Int() - external int fs_orig_fd; -} +final class __CFTimeZone extends ffi.Opaque {} -final class fchecklv extends ffi.Struct { - @off_t() - external int lv_file_start; +final class CFGregorianDate extends ffi.Struct { + @SInt32() + external int year; - @ffi.Size() - external int lv_error_message_size; + @SInt8() + external int month; - external ffi.Pointer lv_error_message; -} + @SInt8() + external int day; -final class fgetsigsinfo extends ffi.Struct { - @off_t() - external int fg_file_start; + @SInt8() + external int hour; - @ffi.Int() - external int fg_info_request; + @SInt8() + external int minute; - @ffi.Int() - external int fg_sig_is_platform; + @ffi.Double() + external double second; } -final class fstore extends ffi.Struct { - @ffi.UnsignedInt() - external int fst_flags; - - @ffi.Int() - external int fst_posmode; - - @off_t() - external int fst_offset; +typedef SInt8 = ffi.SignedChar; +typedef DartSInt8 = int; - @off_t() - external int fst_length; +final class CFGregorianUnits extends ffi.Struct { + @SInt32() + external int years; - @off_t() - external int fst_bytesalloc; -} + @SInt32() + external int months; -final class fpunchhole extends ffi.Struct { - @ffi.UnsignedInt() - external int fp_flags; + @SInt32() + external int days; - @ffi.UnsignedInt() - external int reserved; + @SInt32() + external int hours; - @off_t() - external int fp_offset; + @SInt32() + external int minutes; - @off_t() - external int fp_length; + @ffi.Double() + external double seconds; } -final class ftrimactivefile extends ffi.Struct { - @off_t() - external int fta_offset; +typedef CFTimeZoneRef = ffi.Pointer<__CFTimeZone>; - @off_t() - external int fta_length; -} +final class __CFData extends ffi.Opaque {} -final class fspecread extends ffi.Struct { - @ffi.UnsignedInt() - external int fsr_flags; +typedef CFDataRef = ffi.Pointer<__CFData>; +typedef CFMutableDataRef = ffi.Pointer<__CFData>; - @ffi.UnsignedInt() - external int reserved; +enum CFDataSearchFlags { + kCFDataSearchBackwards(1), + kCFDataSearchAnchored(2); - @off_t() - external int fsr_offset; + final int value; + const CFDataSearchFlags(this.value); - @off_t() - external int fsr_length; + static CFDataSearchFlags fromValue(int value) => switch (value) { + 1 => kCFDataSearchBackwards, + 2 => kCFDataSearchAnchored, + _ => throw ArgumentError("Unknown value for CFDataSearchFlags: $value"), + }; } -final class fattributiontag extends ffi.Struct { - @ffi.UnsignedInt() - external int ft_flags; +final class __CFCharacterSet extends ffi.Opaque {} - @ffi.UnsignedLongLong() - external int ft_hash; +typedef CFCharacterSetRef = ffi.Pointer<__CFCharacterSet>; - @ffi.Array.multi([255]) - external ffi.Array ft_attribution_name; +enum CFCharacterSetPredefinedSet { + kCFCharacterSetControl(1), + kCFCharacterSetWhitespace(2), + kCFCharacterSetWhitespaceAndNewline(3), + kCFCharacterSetDecimalDigit(4), + kCFCharacterSetLetter(5), + kCFCharacterSetLowercaseLetter(6), + kCFCharacterSetUppercaseLetter(7), + kCFCharacterSetNonBase(8), + kCFCharacterSetDecomposable(9), + kCFCharacterSetAlphaNumeric(10), + kCFCharacterSetPunctuation(11), + kCFCharacterSetCapitalizedLetter(13), + kCFCharacterSetSymbol(14), + kCFCharacterSetNewline(15), + kCFCharacterSetIllegal(12); + + final int value; + const CFCharacterSetPredefinedSet(this.value); + + static CFCharacterSetPredefinedSet fromValue(int value) => switch (value) { + 1 => kCFCharacterSetControl, + 2 => kCFCharacterSetWhitespace, + 3 => kCFCharacterSetWhitespaceAndNewline, + 4 => kCFCharacterSetDecimalDigit, + 5 => kCFCharacterSetLetter, + 6 => kCFCharacterSetLowercaseLetter, + 7 => kCFCharacterSetUppercaseLetter, + 8 => kCFCharacterSetNonBase, + 9 => kCFCharacterSetDecomposable, + 10 => kCFCharacterSetAlphaNumeric, + 11 => kCFCharacterSetPunctuation, + 13 => kCFCharacterSetCapitalizedLetter, + 14 => kCFCharacterSetSymbol, + 15 => kCFCharacterSetNewline, + 12 => kCFCharacterSetIllegal, + _ => throw ArgumentError( + "Unknown value for CFCharacterSetPredefinedSet: $value"), + }; } -@ffi.Packed(4) -final class log2phys extends ffi.Struct { - @ffi.UnsignedInt() - external int l2p_flags; - - @off_t() - external int l2p_contigbytes; +typedef CFMutableCharacterSetRef = ffi.Pointer<__CFCharacterSet>; +typedef UniChar = UInt16; +typedef UTF32Char = UInt32; - @off_t() - external int l2p_devoffset; -} +final class __CFError extends ffi.Opaque {} -final class _filesec extends ffi.Opaque {} +typedef CFErrorDomain = CFStringRef; +typedef CFErrorRef = ffi.Pointer<__CFError>; +typedef CFStringEncoding = UInt32; +typedef CFMutableStringRef = ffi.Pointer<__CFString>; +typedef StringPtr = ffi.Pointer; +typedef ConstStringPtr = ffi.Pointer; -abstract class filesec_property_t { - static const int FILESEC_OWNER = 1; - static const int FILESEC_GROUP = 2; - static const int FILESEC_UUID = 3; - static const int FILESEC_MODE = 4; - static const int FILESEC_ACL = 5; - static const int FILESEC_GRPUUID = 6; - static const int FILESEC_ACL_RAW = 100; - static const int FILESEC_ACL_ALLOCSIZE = 101; +enum CFStringCompareFlags { + kCFCompareCaseInsensitive(1), + kCFCompareBackwards(4), + kCFCompareAnchored(8), + kCFCompareNonliteral(16), + kCFCompareLocalized(32), + kCFCompareNumerically(64), + kCFCompareDiacriticInsensitive(128), + kCFCompareWidthInsensitive(256), + kCFCompareForcedOrdering(512); + + final int value; + const CFStringCompareFlags(this.value); + + static CFStringCompareFlags fromValue(int value) => switch (value) { + 1 => kCFCompareCaseInsensitive, + 4 => kCFCompareBackwards, + 8 => kCFCompareAnchored, + 16 => kCFCompareNonliteral, + 32 => kCFCompareLocalized, + 64 => kCFCompareNumerically, + 128 => kCFCompareDiacriticInsensitive, + 256 => kCFCompareWidthInsensitive, + 512 => kCFCompareForcedOrdering, + _ => + throw ArgumentError("Unknown value for CFStringCompareFlags: $value"), + }; +} + +enum CFStringNormalizationForm { + kCFStringNormalizationFormD(0), + kCFStringNormalizationFormKD(1), + kCFStringNormalizationFormC(2), + kCFStringNormalizationFormKC(3); + + final int value; + const CFStringNormalizationForm(this.value); + + static CFStringNormalizationForm fromValue(int value) => switch (value) { + 0 => kCFStringNormalizationFormD, + 1 => kCFStringNormalizationFormKD, + 2 => kCFStringNormalizationFormC, + 3 => kCFStringNormalizationFormKC, + _ => throw ArgumentError( + "Unknown value for CFStringNormalizationForm: $value"), + }; } -typedef filesec_t = ffi.Pointer<_filesec>; +final class CFStringInlineBuffer extends ffi.Struct { + @ffi.Array.multi([64]) + external ffi.Array buffer; -abstract class os_clockid_t { - static const int OS_CLOCK_MACH_ABSOLUTE_TIME = 32; -} + external CFStringRef theString; -final class os_workgroup_attr_opaque_s extends ffi.Struct { - @ffi.Uint32() - external int sig; + external ffi.Pointer directUniCharBuffer; - @ffi.Array.multi([60]) - external ffi.Array opaque; -} + external ffi.Pointer directCStringBuffer; -final class os_workgroup_interval_data_opaque_s extends ffi.Struct { - @ffi.Uint32() - external int sig; + external CFRange rangeToBuffer; - @ffi.Array.multi([56]) - external ffi.Array opaque; + @CFIndex() + external int bufferedRangeStart; + + @CFIndex() + external int bufferedRangeEnd; } -final class os_workgroup_join_token_opaque_s extends ffi.Struct { - @ffi.Uint32() - external int sig; +enum CFTimeZoneNameStyle { + kCFTimeZoneNameStyleStandard(0), + kCFTimeZoneNameStyleShortStandard(1), + kCFTimeZoneNameStyleDaylightSaving(2), + kCFTimeZoneNameStyleShortDaylightSaving(3), + kCFTimeZoneNameStyleGeneric(4), + kCFTimeZoneNameStyleShortGeneric(5); - @ffi.Array.multi([36]) - external ffi.Array opaque; -} + final int value; + const CFTimeZoneNameStyle(this.value); -final class os_workgroup_s extends ffi.Opaque {} + static CFTimeZoneNameStyle fromValue(int value) => switch (value) { + 0 => kCFTimeZoneNameStyleStandard, + 1 => kCFTimeZoneNameStyleShortStandard, + 2 => kCFTimeZoneNameStyleDaylightSaving, + 3 => kCFTimeZoneNameStyleShortDaylightSaving, + 4 => kCFTimeZoneNameStyleGeneric, + 5 => kCFTimeZoneNameStyleShortGeneric, + _ => + throw ArgumentError("Unknown value for CFTimeZoneNameStyle: $value"), + }; +} -typedef os_workgroup_t = ffi.Pointer; -typedef os_workgroup_join_token_t - = ffi.Pointer; -typedef os_workgroup_working_arena_destructor_t = ffi.Pointer< - ffi.NativeFunction>; -typedef os_workgroup_working_arena_destructor_tFunction = ffi.Void Function( - ffi.Pointer); -typedef Dartos_workgroup_working_arena_destructor_tFunction = void Function( - ffi.Pointer); -typedef os_workgroup_index = ffi.Uint32; -typedef Dartos_workgroup_index = int; +final class __CFCalendar extends ffi.Opaque {} -final class os_workgroup_max_parallel_threads_attr_s extends ffi.Opaque {} +typedef CFCalendarRef = ffi.Pointer<__CFCalendar>; -typedef os_workgroup_mpt_attr_t - = ffi.Pointer; -typedef os_workgroup_interval_t = os_workgroup_t; -typedef os_workgroup_interval_data_t - = ffi.Pointer; -typedef os_workgroup_parallel_t = os_workgroup_t; -typedef os_workgroup_attr_t = ffi.Pointer; +enum CFCalendarUnit { + kCFCalendarUnitEra(2), + kCFCalendarUnitYear(4), + kCFCalendarUnitMonth(8), + kCFCalendarUnitDay(16), + kCFCalendarUnitHour(32), + kCFCalendarUnitMinute(64), + kCFCalendarUnitSecond(128), + kCFCalendarUnitWeek(256), + kCFCalendarUnitWeekday(512), + kCFCalendarUnitWeekdayOrdinal(1024), + kCFCalendarUnitQuarter(2048), + kCFCalendarUnitWeekOfMonth(4096), + kCFCalendarUnitWeekOfYear(8192), + kCFCalendarUnitYearForWeekOfYear(16384); + + final int value; + const CFCalendarUnit(this.value); + + static CFCalendarUnit fromValue(int value) => switch (value) { + 2 => kCFCalendarUnitEra, + 4 => kCFCalendarUnitYear, + 8 => kCFCalendarUnitMonth, + 16 => kCFCalendarUnitDay, + 32 => kCFCalendarUnitHour, + 64 => kCFCalendarUnitMinute, + 128 => kCFCalendarUnitSecond, + 256 => kCFCalendarUnitWeek, + 512 => kCFCalendarUnitWeekday, + 1024 => kCFCalendarUnitWeekdayOrdinal, + 2048 => kCFCalendarUnitQuarter, + 4096 => kCFCalendarUnitWeekOfMonth, + 8192 => kCFCalendarUnitWeekOfYear, + 16384 => kCFCalendarUnitYearForWeekOfYear, + _ => throw ArgumentError("Unknown value for CFCalendarUnit: $value"), + }; +} -final class time_value extends ffi.Struct { - @integer_t() - external int seconds; +final class CGPoint extends ffi.Struct { + @CGFloat() + external double x; - @integer_t() - external int microseconds; + @CGFloat() + external double y; } -typedef integer_t = ffi.Int; -typedef Dartinteger_t = int; +typedef CGFloat = ffi.Double; +typedef DartCGFloat = double; -final class mach_timespec extends ffi.Struct { - @ffi.UnsignedInt() - external int tv_sec; +final class CGSize extends ffi.Struct { + @CGFloat() + external double width; - @clock_res_t() - external int tv_nsec; + @CGFloat() + external double height; } -typedef clock_res_t = ffi.Int; -typedef Dartclock_res_t = int; -typedef dispatch_time_t = ffi.Uint64; -typedef Dartdispatch_time_t = int; +final class CGVector extends ffi.Struct { + @CGFloat() + external double dx; -abstract class qos_class_t { - static const int QOS_CLASS_USER_INTERACTIVE = 33; - static const int QOS_CLASS_USER_INITIATED = 25; - static const int QOS_CLASS_DEFAULT = 21; - static const int QOS_CLASS_UTILITY = 17; - static const int QOS_CLASS_BACKGROUND = 9; - static const int QOS_CLASS_UNSPECIFIED = 0; + @CGFloat() + external double dy; } -final class dispatch_object_t extends ffi.Union { - external ffi.Pointer<_os_object_s> _os_obj; +final class CGRect extends ffi.Struct { + external CGPoint origin; - external ffi.Pointer _do; + external CGSize size; +} - external ffi.Pointer _dq; +final class CGAffineTransform extends ffi.Struct { + @CGFloat() + external double a; - external ffi.Pointer _dqa; + @CGFloat() + external double b; - external ffi.Pointer _dg; + @CGFloat() + external double c; - external ffi.Pointer _ds; + @CGFloat() + external double d; - external ffi.Pointer _dch; + @CGFloat() + external double tx; - external ffi.Pointer _dm; + @CGFloat() + external double ty; +} - external ffi.Pointer _dmsg; +final class CGAffineTransformComponents extends ffi.Struct { + external CGSize scale; - external ffi.Pointer _dsema; + @CGFloat() + external double horizontalShear; - external ffi.Pointer _ddata; + @CGFloat() + external double rotation; - external ffi.Pointer _dchannel; + external CGVector translation; } -final class _os_object_s extends ffi.Opaque {} - -final class dispatch_object_s extends ffi.Opaque {} - -final class dispatch_queue_attr_s extends ffi.Opaque {} +final class __CFDateFormatter extends ffi.Opaque {} -final class dispatch_group_s extends ffi.Opaque {} +typedef CFDateFormatterRef = ffi.Pointer<__CFDateFormatter>; -final class dispatch_source_s extends ffi.Opaque {} +enum CFISO8601DateFormatOptions { + kCFISO8601DateFormatWithYear(1), + kCFISO8601DateFormatWithMonth(2), + kCFISO8601DateFormatWithWeekOfYear(4), + kCFISO8601DateFormatWithDay(16), + kCFISO8601DateFormatWithTime(32), + kCFISO8601DateFormatWithTimeZone(64), + kCFISO8601DateFormatWithSpaceBetweenDateAndTime(128), + kCFISO8601DateFormatWithDashSeparatorInDate(256), + kCFISO8601DateFormatWithColonSeparatorInTime(512), + kCFISO8601DateFormatWithColonSeparatorInTimeZone(1024), + kCFISO8601DateFormatWithFractionalSeconds(2048), + kCFISO8601DateFormatWithFullDate(275), + kCFISO8601DateFormatWithFullTime(1632), + kCFISO8601DateFormatWithInternetDateTime(1907); + + final int value; + const CFISO8601DateFormatOptions(this.value); + + static CFISO8601DateFormatOptions fromValue(int value) => switch (value) { + 1 => kCFISO8601DateFormatWithYear, + 2 => kCFISO8601DateFormatWithMonth, + 4 => kCFISO8601DateFormatWithWeekOfYear, + 16 => kCFISO8601DateFormatWithDay, + 32 => kCFISO8601DateFormatWithTime, + 64 => kCFISO8601DateFormatWithTimeZone, + 128 => kCFISO8601DateFormatWithSpaceBetweenDateAndTime, + 256 => kCFISO8601DateFormatWithDashSeparatorInDate, + 512 => kCFISO8601DateFormatWithColonSeparatorInTime, + 1024 => kCFISO8601DateFormatWithColonSeparatorInTimeZone, + 2048 => kCFISO8601DateFormatWithFractionalSeconds, + 275 => kCFISO8601DateFormatWithFullDate, + 1632 => kCFISO8601DateFormatWithFullTime, + 1907 => kCFISO8601DateFormatWithInternetDateTime, + _ => throw ArgumentError( + "Unknown value for CFISO8601DateFormatOptions: $value"), + }; +} + +enum CFDateFormatterStyle { + kCFDateFormatterNoStyle(0), + kCFDateFormatterShortStyle(1), + kCFDateFormatterMediumStyle(2), + kCFDateFormatterLongStyle(3), + kCFDateFormatterFullStyle(4); + + final int value; + const CFDateFormatterStyle(this.value); + + static CFDateFormatterStyle fromValue(int value) => switch (value) { + 0 => kCFDateFormatterNoStyle, + 1 => kCFDateFormatterShortStyle, + 2 => kCFDateFormatterMediumStyle, + 3 => kCFDateFormatterLongStyle, + 4 => kCFDateFormatterFullStyle, + _ => + throw ArgumentError("Unknown value for CFDateFormatterStyle: $value"), + }; +} -final class dispatch_channel_s extends ffi.Opaque {} +typedef CFDateFormatterKey = CFStringRef; -final class dispatch_mach_s extends ffi.Opaque {} +final class __CFBoolean extends ffi.Opaque {} -final class dispatch_mach_msg_s extends ffi.Opaque {} +typedef CFBooleanRef = ffi.Pointer<__CFBoolean>; -final class dispatch_semaphore_s extends ffi.Opaque {} +final class __CFNumber extends ffi.Opaque {} -final class dispatch_data_s extends ffi.Opaque {} +typedef CFNumberRef = ffi.Pointer<__CFNumber>; -final class dispatch_io_s extends ffi.Opaque {} +enum CFNumberType { + kCFNumberSInt8Type(1), + kCFNumberSInt16Type(2), + kCFNumberSInt32Type(3), + kCFNumberSInt64Type(4), + kCFNumberFloat32Type(5), + kCFNumberFloat64Type(6), + kCFNumberCharType(7), + kCFNumberShortType(8), + kCFNumberIntType(9), + kCFNumberLongType(10), + kCFNumberLongLongType(11), + kCFNumberFloatType(12), + kCFNumberDoubleType(13), + kCFNumberCFIndexType(14), + kCFNumberNSIntegerType(15), + kCFNumberCGFloatType(16); + + static const kCFNumberMaxType = kCFNumberCGFloatType; + + final int value; + const CFNumberType(this.value); + + static CFNumberType fromValue(int value) => switch (value) { + 1 => kCFNumberSInt8Type, + 2 => kCFNumberSInt16Type, + 3 => kCFNumberSInt32Type, + 4 => kCFNumberSInt64Type, + 5 => kCFNumberFloat32Type, + 6 => kCFNumberFloat64Type, + 7 => kCFNumberCharType, + 8 => kCFNumberShortType, + 9 => kCFNumberIntType, + 10 => kCFNumberLongType, + 11 => kCFNumberLongLongType, + 12 => kCFNumberFloatType, + 13 => kCFNumberDoubleType, + 14 => kCFNumberCFIndexType, + 15 => kCFNumberNSIntegerType, + 16 => kCFNumberCGFloatType, + _ => throw ArgumentError("Unknown value for CFNumberType: $value"), + }; -typedef dispatch_function_t - = ffi.Pointer>; -typedef dispatch_function_tFunction = ffi.Void Function(ffi.Pointer); -typedef Dartdispatch_function_tFunction = void Function(ffi.Pointer); -typedef dispatch_block_t = ffi.Pointer<_ObjCBlock>; -typedef Dartdispatch_block_t = ObjCBlock_ffiVoid; -void _ObjCBlock_ffiVoid_ffiSize_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -final _ObjCBlock_ffiVoid_ffiSize_closureRegistry = {}; -int _ObjCBlock_ffiVoid_ffiSize_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ffiSize_registerClosure( - void Function(int) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiSize_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiSize_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + @override + String toString() { + if (this == kCFNumberCGFloatType) + return "CFNumberType.kCFNumberCGFloatType, CFNumberType.kCFNumberMaxType"; + return super.toString(); + } } -void _ObjCBlock_ffiVoid_ffiSize_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0) => - _ObjCBlock_ffiVoid_ffiSize_closureRegistry[block.ref.target.address]!(arg0); +final class __CFNumberFormatter extends ffi.Opaque {} -class ObjCBlock_ffiVoid_ffiSize extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiSize._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +typedef CFNumberFormatterRef = ffi.Pointer<__CFNumberFormatter>; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiSize.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Size)>( - _ObjCBlock_ffiVoid_ffiSize_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +enum CFNumberFormatterStyle { + kCFNumberFormatterNoStyle(0), + kCFNumberFormatterDecimalStyle(1), + kCFNumberFormatterCurrencyStyle(2), + kCFNumberFormatterPercentStyle(3), + kCFNumberFormatterScientificStyle(4), + kCFNumberFormatterSpellOutStyle(5), + kCFNumberFormatterOrdinalStyle(6), + kCFNumberFormatterCurrencyISOCodeStyle(8), + kCFNumberFormatterCurrencyPluralStyle(9), + kCFNumberFormatterCurrencyAccountingStyle(10); + + final int value; + const CFNumberFormatterStyle(this.value); + + static CFNumberFormatterStyle fromValue(int value) => switch (value) { + 0 => kCFNumberFormatterNoStyle, + 1 => kCFNumberFormatterDecimalStyle, + 2 => kCFNumberFormatterCurrencyStyle, + 3 => kCFNumberFormatterPercentStyle, + 4 => kCFNumberFormatterScientificStyle, + 5 => kCFNumberFormatterSpellOutStyle, + 6 => kCFNumberFormatterOrdinalStyle, + 8 => kCFNumberFormatterCurrencyISOCodeStyle, + 9 => kCFNumberFormatterCurrencyPluralStyle, + 10 => kCFNumberFormatterCurrencyAccountingStyle, + _ => throw ArgumentError( + "Unknown value for CFNumberFormatterStyle: $value"), + }; +} - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiSize.fromFunction( - NativeCupertinoHttp lib, void Function(int) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Size)>( - _ObjCBlock_ffiVoid_ffiSize_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiSize_registerClosure( - (int arg0) => fn(arg0))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +typedef CFNumberFormatterKey = CFStringRef; +typedef CFPropertyListRef = CFTypeRef; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiSize.listener( - NativeCupertinoHttp lib, void Function(int) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Size)>.listener( - _ObjCBlock_ffiVoid_ffiSize_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiSize_registerClosure( - (int arg0) => fn(arg0))), - lib); - static ffi - .NativeCallable, ffi.Size)>? - _dartFuncListenerTrampoline; - - void call(int arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Size arg0)>>() - .asFunction, int)>()(_id, arg0); -} +final class __CFURL extends ffi.Opaque {} -typedef dispatch_queue_global_t = dispatch_queue_t; -typedef dispatch_queue_attr_t = ffi.Pointer; +typedef CFURLRef = ffi.Pointer<__CFURL>; -abstract class dispatch_autorelease_frequency_t { - static const int DISPATCH_AUTORELEASE_FREQUENCY_INHERIT = 0; - static const int DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM = 1; - static const int DISPATCH_AUTORELEASE_FREQUENCY_NEVER = 2; +enum CFURLPathStyle { + kCFURLPOSIXPathStyle(0), + kCFURLHFSPathStyle(1), + kCFURLWindowsPathStyle(2); + + final int value; + const CFURLPathStyle(this.value); + + static CFURLPathStyle fromValue(int value) => switch (value) { + 0 => kCFURLPOSIXPathStyle, + 1 => kCFURLHFSPathStyle, + 2 => kCFURLWindowsPathStyle, + _ => throw ArgumentError("Unknown value for CFURLPathStyle: $value"), + }; +} + +enum CFURLComponentType { + kCFURLComponentScheme(1), + kCFURLComponentNetLocation(2), + kCFURLComponentPath(3), + kCFURLComponentResourceSpecifier(4), + kCFURLComponentUser(5), + kCFURLComponentPassword(6), + kCFURLComponentUserInfo(7), + kCFURLComponentHost(8), + kCFURLComponentPort(9), + kCFURLComponentParameterString(10), + kCFURLComponentQuery(11), + kCFURLComponentFragment(12); + + final int value; + const CFURLComponentType(this.value); + + static CFURLComponentType fromValue(int value) => switch (value) { + 1 => kCFURLComponentScheme, + 2 => kCFURLComponentNetLocation, + 3 => kCFURLComponentPath, + 4 => kCFURLComponentResourceSpecifier, + 5 => kCFURLComponentUser, + 6 => kCFURLComponentPassword, + 7 => kCFURLComponentUserInfo, + 8 => kCFURLComponentHost, + 9 => kCFURLComponentPort, + 10 => kCFURLComponentParameterString, + 11 => kCFURLComponentQuery, + 12 => kCFURLComponentFragment, + _ => + throw ArgumentError("Unknown value for CFURLComponentType: $value"), + }; } -abstract class dispatch_block_flags_t { - static const int DISPATCH_BLOCK_BARRIER = 1; - static const int DISPATCH_BLOCK_DETACHED = 2; - static const int DISPATCH_BLOCK_ASSIGN_CURRENT = 4; - static const int DISPATCH_BLOCK_NO_QOS_CLASS = 8; - static const int DISPATCH_BLOCK_INHERIT_QOS_CLASS = 16; - static const int DISPATCH_BLOCK_ENFORCE_QOS_CLASS = 32; -} +final class FSRef extends ffi.Opaque {} -final class mach_msg_type_descriptor_t extends ffi.Opaque {} +enum CFURLBookmarkCreationOptions { + kCFURLBookmarkCreationMinimalBookmarkMask(512), + kCFURLBookmarkCreationSuitableForBookmarkFile(1024), + kCFURLBookmarkCreationWithSecurityScope(2048), + kCFURLBookmarkCreationSecurityScopeAllowOnlyReadAccess(4096), + kCFURLBookmarkCreationWithoutImplicitSecurityScope(536870912), + kCFURLBookmarkCreationPreferFileIDResolutionMask(256); + + final int value; + const CFURLBookmarkCreationOptions(this.value); + + static CFURLBookmarkCreationOptions fromValue(int value) => switch (value) { + 512 => kCFURLBookmarkCreationMinimalBookmarkMask, + 1024 => kCFURLBookmarkCreationSuitableForBookmarkFile, + 2048 => kCFURLBookmarkCreationWithSecurityScope, + 4096 => kCFURLBookmarkCreationSecurityScopeAllowOnlyReadAccess, + 536870912 => kCFURLBookmarkCreationWithoutImplicitSecurityScope, + 256 => kCFURLBookmarkCreationPreferFileIDResolutionMask, + _ => throw ArgumentError( + "Unknown value for CFURLBookmarkCreationOptions: $value"), + }; +} + +enum CFURLBookmarkResolutionOptions { + kCFURLBookmarkResolutionWithoutUIMask(256), + kCFURLBookmarkResolutionWithoutMountingMask(512), + kCFURLBookmarkResolutionWithSecurityScope(1024), + kCFURLBookmarkResolutionWithoutImplicitStartAccessing(32768); + + static const kCFBookmarkResolutionWithoutUIMask = + kCFURLBookmarkResolutionWithoutUIMask; + static const kCFBookmarkResolutionWithoutMountingMask = + kCFURLBookmarkResolutionWithoutMountingMask; + + final int value; + const CFURLBookmarkResolutionOptions(this.value); + + static CFURLBookmarkResolutionOptions fromValue(int value) => switch (value) { + 256 => kCFURLBookmarkResolutionWithoutUIMask, + 512 => kCFURLBookmarkResolutionWithoutMountingMask, + 1024 => kCFURLBookmarkResolutionWithSecurityScope, + 32768 => kCFURLBookmarkResolutionWithoutImplicitStartAccessing, + _ => throw ArgumentError( + "Unknown value for CFURLBookmarkResolutionOptions: $value"), + }; -final class mach_msg_port_descriptor_t extends ffi.Opaque {} + @override + String toString() { + if (this == kCFURLBookmarkResolutionWithoutUIMask) + return "CFURLBookmarkResolutionOptions.kCFURLBookmarkResolutionWithoutUIMask, CFURLBookmarkResolutionOptions.kCFBookmarkResolutionWithoutUIMask"; + if (this == kCFURLBookmarkResolutionWithoutMountingMask) + return "CFURLBookmarkResolutionOptions.kCFURLBookmarkResolutionWithoutMountingMask, CFURLBookmarkResolutionOptions.kCFBookmarkResolutionWithoutMountingMask"; + return super.toString(); + } +} -final class mach_msg_ool_descriptor32_t extends ffi.Opaque {} +typedef CFURLBookmarkFileCreationOptions = CFOptionFlags; -final class mach_msg_ool_descriptor64_t extends ffi.Opaque {} +final class mach_port_status extends ffi.Struct { + @mach_port_rights_t() + external int mps_pset; -final class mach_msg_ool_descriptor_t extends ffi.Opaque {} + @mach_port_seqno_t() + external int mps_seqno; -final class mach_msg_ool_ports_descriptor32_t extends ffi.Opaque {} + @mach_port_mscount_t() + external int mps_mscount; -final class mach_msg_ool_ports_descriptor64_t extends ffi.Opaque {} + @mach_port_msgcount_t() + external int mps_qlimit; -final class mach_msg_ool_ports_descriptor_t extends ffi.Opaque {} + @mach_port_msgcount_t() + external int mps_msgcount; -final class mach_msg_guarded_port_descriptor32_t extends ffi.Opaque {} + @mach_port_rights_t() + external int mps_sorights; -final class mach_msg_guarded_port_descriptor64_t extends ffi.Opaque {} + @boolean_t() + external int mps_srights; -final class mach_msg_guarded_port_descriptor_t extends ffi.Opaque {} + @boolean_t() + external int mps_pdrequest; -final class mach_msg_descriptor_t extends ffi.Opaque {} + @boolean_t() + external int mps_nsrequest; -final class mach_msg_body_t extends ffi.Struct { - @mach_msg_size_t() - external int msgh_descriptor_count; + @natural_t() + external int mps_flags; } -typedef mach_msg_size_t = natural_t; +typedef mach_port_rights_t = natural_t; +typedef natural_t = __darwin_natural_t; +typedef __darwin_natural_t = ffi.UnsignedInt; +typedef Dart__darwin_natural_t = int; +typedef mach_port_seqno_t = natural_t; +typedef mach_port_mscount_t = natural_t; +typedef mach_port_msgcount_t = natural_t; +typedef boolean_t = ffi.Int; +typedef Dartboolean_t = int; -final class mach_msg_header_t extends ffi.Struct { - @mach_msg_bits_t() - external int msgh_bits; +final class mach_port_limits extends ffi.Struct { + @mach_port_msgcount_t() + external int mpl_qlimit; +} - @mach_msg_size_t() - external int msgh_size; +final class mach_port_info_ext extends ffi.Struct { + external mach_port_status_t mpie_status; - @mach_port_t() - external int msgh_remote_port; + @mach_port_msgcount_t() + external int mpie_boost_cnt; - @mach_port_t() - external int msgh_local_port; + @ffi.Array.multi([6]) + external ffi.Array reserved; +} - @mach_port_name_t() - external int msgh_voucher_port; +typedef mach_port_status_t = mach_port_status; - @mach_msg_id_t() - external int msgh_id; +final class mach_port_guard_info extends ffi.Struct { + @ffi.Uint64() + external int mpgi_guard; } -typedef mach_msg_bits_t = ffi.UnsignedInt; -typedef Dartmach_msg_bits_t = int; -typedef mach_msg_id_t = integer_t; +final class mach_port_qos extends ffi.Opaque {} -final class mach_msg_base_t extends ffi.Struct { - external mach_msg_header_t header; +final class mach_service_port_info extends ffi.Struct { + @ffi.Array.multi([255]) + external ffi.Array mspi_string_name; - external mach_msg_body_t body; + @ffi.Uint8() + external int mspi_domain_type; } -final class mach_msg_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; +final class mach_port_options extends ffi.Struct { + @ffi.Uint32() + external int flags; - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + external mach_port_limits_t mpl; + + external UnnamedUnion1 unnamed; } -typedef mach_msg_trailer_type_t = ffi.UnsignedInt; -typedef Dartmach_msg_trailer_type_t = int; -typedef mach_msg_trailer_size_t = ffi.UnsignedInt; -typedef Dartmach_msg_trailer_size_t = int; +typedef mach_port_limits_t = mach_port_limits; -final class mach_msg_seqno_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; +final class UnnamedUnion1 extends ffi.Union { + @ffi.Array.multi([2]) + external ffi.Array reserved; - @mach_msg_trailer_size_t() - external int msgh_trailer_size; + @mach_port_name_t() + external int work_interval_port; - @mach_port_seqno_t() - external int msgh_seqno; -} + external mach_service_port_info_t service_port_info; -final class security_token_t extends ffi.Struct { - @ffi.Array.multi([2]) - external ffi.Array val; + @mach_port_name_t() + external int service_port_name; } -final class mach_msg_security_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; - - @mach_msg_trailer_size_t() - external int msgh_trailer_size; +typedef mach_port_name_t = natural_t; +typedef mach_service_port_info_t = ffi.Pointer; - @mach_port_seqno_t() - external int msgh_seqno; +final class __CFRunLoop extends ffi.Opaque {} - external security_token_t msgh_sender; -} +final class __CFRunLoopSource extends ffi.Opaque {} -final class audit_token_t extends ffi.Struct { - @ffi.Array.multi([8]) - external ffi.Array val; -} +final class __CFRunLoopObserver extends ffi.Opaque {} -final class mach_msg_audit_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; +final class __CFRunLoopTimer extends ffi.Opaque {} - @mach_msg_trailer_size_t() - external int msgh_trailer_size; +typedef CFRunLoopMode = CFStringRef; +typedef CFRunLoopRef = ffi.Pointer<__CFRunLoop>; - @mach_port_seqno_t() - external int msgh_seqno; +enum CFRunLoopRunResult { + kCFRunLoopRunFinished(1), + kCFRunLoopRunStopped(2), + kCFRunLoopRunTimedOut(3), + kCFRunLoopRunHandledSource(4); - external security_token_t msgh_sender; + final int value; + const CFRunLoopRunResult(this.value); - external audit_token_t msgh_audit; + static CFRunLoopRunResult fromValue(int value) => switch (value) { + 1 => kCFRunLoopRunFinished, + 2 => kCFRunLoopRunStopped, + 3 => kCFRunLoopRunTimedOut, + 4 => kCFRunLoopRunHandledSource, + _ => + throw ArgumentError("Unknown value for CFRunLoopRunResult: $value"), + }; } -@ffi.Packed(4) -final class mach_msg_context_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; +typedef CFRunLoopSourceRef = ffi.Pointer<__CFRunLoopSource>; +typedef CFRunLoopObserverRef = ffi.Pointer<__CFRunLoopObserver>; +typedef CFRunLoopTimerRef = ffi.Pointer<__CFRunLoopTimer>; - @mach_msg_trailer_size_t() - external int msgh_trailer_size; +final class CFRunLoopSourceContext extends ffi.Struct { + @CFIndex() + external int version; - @mach_port_seqno_t() - external int msgh_seqno; + external ffi.Pointer info; - external security_token_t msgh_sender; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; + + external ffi.Pointer< + ffi.NativeFunction info)>> + release; + + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; + + external ffi.Pointer< + ffi.NativeFunction< + Boolean Function( + ffi.Pointer info1, ffi.Pointer info2)>> equal; - external audit_token_t msgh_audit; + external ffi.Pointer< + ffi.NativeFunction info)>> hash; - @mach_port_context_t() - external int msgh_context; -} + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer info, CFRunLoopRef rl, + CFRunLoopMode mode)>> schedule; -typedef mach_port_context_t = vm_offset_t; -typedef vm_offset_t = ffi.UintPtr; -typedef Dartvm_offset_t = int; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer info, CFRunLoopRef rl, + CFRunLoopMode mode)>> cancel; -final class msg_labels_t extends ffi.Struct { - @mach_port_name_t() - external int sender; + external ffi.Pointer< + ffi.NativeFunction info)>> + perform; } -@ffi.Packed(4) -final class mach_msg_mac_trailer_t extends ffi.Struct { - @mach_msg_trailer_type_t() - external int msgh_trailer_type; - - @mach_msg_trailer_size_t() - external int msgh_trailer_size; +final class CFRunLoopSourceContext1 extends ffi.Struct { + @CFIndex() + external int version; - @mach_port_seqno_t() - external int msgh_seqno; + external ffi.Pointer info; - external security_token_t msgh_sender; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - external audit_token_t msgh_audit; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - @mach_port_context_t() - external int msgh_context; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; - @mach_msg_filter_id() - external int msgh_ad; + external ffi.Pointer< + ffi.NativeFunction< + Boolean Function( + ffi.Pointer info1, ffi.Pointer info2)>> equal; - external msg_labels_t msgh_labels; -} + external ffi.Pointer< + ffi.NativeFunction info)>> hash; -typedef mach_msg_filter_id = ffi.Int; -typedef Dartmach_msg_filter_id = int; + external ffi.Pointer< + ffi.NativeFunction info)>> + getPort; -final class mach_msg_empty_send_t extends ffi.Struct { - external mach_msg_header_t header; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer msg, + CFIndex size, + CFAllocatorRef allocator, + ffi.Pointer info)>> perform; } -final class mach_msg_empty_rcv_t extends ffi.Struct { - external mach_msg_header_t header; - - external mach_msg_trailer_t trailer; -} +typedef mach_port_t = __darwin_mach_port_t; +typedef __darwin_mach_port_t = __darwin_mach_port_name_t; +typedef __darwin_mach_port_name_t = __darwin_natural_t; -final class mach_msg_empty_t extends ffi.Union { - external mach_msg_empty_send_t send; +final class CFRunLoopObserverContext extends ffi.Struct { + @CFIndex() + external int version; - external mach_msg_empty_rcv_t rcv; -} + external ffi.Pointer info; -typedef mach_msg_return_t = kern_return_t; -typedef kern_return_t = ffi.Int; -typedef Dartkern_return_t = int; -typedef mach_msg_option_t = integer_t; -typedef mach_msg_timeout_t = natural_t; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; -final class dispatch_source_type_s extends ffi.Opaque {} + external ffi.Pointer< + ffi.NativeFunction info)>> + release; -typedef dispatch_source_t = ffi.Pointer; -typedef dispatch_source_type_t = ffi.Pointer; -typedef dispatch_group_t = ffi.Pointer; -typedef dispatch_semaphore_t = ffi.Pointer; -typedef dispatch_once_t = ffi.IntPtr; -typedef Dartdispatch_once_t = int; -typedef dispatch_data_t = ffi.Pointer; -typedef dispatch_data_applier_t = ffi.Pointer<_ObjCBlock>; -typedef Dartdispatch_data_applier_t - = ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize; -bool _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - int arg1, - ffi.Pointer arg2, - int arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, - ffi.Pointer arg2, ffi.Size arg3)>>() - .asFunction< - bool Function(dispatch_data_t, int, ffi.Pointer, - int)>()(arg0, arg1, arg2, arg3); -final _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureRegistry = - , int)>{}; -int _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_registerClosure( - bool Function(dispatch_data_t, int, ffi.Pointer, int) fn) { - final id = - ++_ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureRegistryIndex; - _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureRegistry[id] = - fn; - return ffi.Pointer.fromAddress(id); + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -bool _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - int arg1, - ffi.Pointer arg2, - int arg3) => - _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2, arg3); - -class ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize - extends _ObjCBlockBase { - ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, - ffi.Pointer arg2, ffi.Size arg3)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - dispatch_data_t, - ffi.Size, - ffi.Pointer, - ffi.Size)>( - _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_fnPtrTrampoline, - false) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +typedef CFRunLoopObserverCallBack + = ffi.Pointer>; +typedef CFRunLoopObserverCallBackFunction = ffi.Void Function( + CFRunLoopObserverRef observer, + CFOptionFlags activity, + ffi.Pointer info); +typedef DartCFRunLoopObserverCallBackFunction = void Function( + CFRunLoopObserverRef observer, + CFRunLoopActivity activity, + ffi.Pointer info); - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize.fromFunction( - NativeCupertinoHttp lib, - bool Function(dispatch_data_t, int, ffi.Pointer, int) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock>, - dispatch_data_t, - ffi.Size, - ffi.Pointer, - ffi.Size)>( - _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_registerClosure( - (dispatch_data_t arg0, int arg1, ffi.Pointer arg2, - int arg3) => - fn(arg0, arg1, arg2, arg3))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(dispatch_data_t arg0, int arg1, ffi.Pointer arg2, - int arg3) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - ffi.Size arg1, - ffi.Pointer arg2, - ffi.Size arg3)>>() - .asFunction< - bool Function(ffi.Pointer<_ObjCBlock>, dispatch_data_t, int, - ffi.Pointer, int)>()(_id, arg0, arg1, arg2, arg3); +enum CFRunLoopActivity { + kCFRunLoopEntry(1), + kCFRunLoopBeforeTimers(2), + kCFRunLoopBeforeSources(4), + kCFRunLoopBeforeWaiting(32), + kCFRunLoopAfterWaiting(64), + kCFRunLoopExit(128), + kCFRunLoopAllActivities(268435455); + + final int value; + const CFRunLoopActivity(this.value); + + static CFRunLoopActivity fromValue(int value) => switch (value) { + 1 => kCFRunLoopEntry, + 2 => kCFRunLoopBeforeTimers, + 4 => kCFRunLoopBeforeSources, + 32 => kCFRunLoopBeforeWaiting, + 64 => kCFRunLoopAfterWaiting, + 128 => kCFRunLoopExit, + 268435455 => kCFRunLoopAllActivities, + _ => throw ArgumentError("Unknown value for CFRunLoopActivity: $value"), + }; } -typedef dispatch_fd_t = ffi.Int; -typedef Dartdispatch_fd_t = int; -void _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) => +void _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_fnPtrTrampoline( + ffi.Pointer block, + CFRunLoopObserverRef arg0, + int arg1) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>>() - .asFunction()(arg0, arg1); -final _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_registerClosure( - void Function(dispatch_data_t, int) fn) { - final id = ++_ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureRegistryIndex; - _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0, int arg1) => - _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_dispatchdatat_ffiInt extends _ObjCBlockBase { - ObjCBlock_ffiVoid_dispatchdatat_ffiInt._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + ffi.Void Function( + CFRunLoopObserverRef arg0, CFOptionFlags arg1)>>() + .asFunction()(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + CFRunLoopObserverRef, CFOptionFlags)>( + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureTrampoline( + ffi.Pointer block, + CFRunLoopObserverRef arg0, + int arg1) => + (objc.getBlockClosure(block) as void Function( + CFRunLoopObserverRef, int))(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + CFRunLoopObserverRef, CFOptionFlags)>( + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_listenerTrampoline( + ffi.Pointer block, + CFRunLoopObserverRef arg0, + int arg1) { + (objc.getBlockClosure(block) as void Function(CFRunLoopObserverRef, int))( + arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, CFRunLoopObserverRef, + CFOptionFlags)> + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_listenerCallable = + ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + CFRunLoopObserverRef, CFOptionFlags)>.listener( + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, CFOptionFlags)>`. +abstract final class ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__CFRunLoopObserver>, CFOptionFlags)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__CFRunLoopObserver>, + CFOptionFlags)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_dispatchdatat_ffiInt.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - dispatch_data_t, ffi.Int)>( - _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__CFRunLoopObserver>, CFOptionFlags)> + fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock, CFOptionFlags)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_dispatchdatat_ffiInt.fromFunction( - NativeCupertinoHttp lib, void Function(dispatch_data_t, int) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - dispatch_data_t, ffi.Int)>( - _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_registerClosure( - (dispatch_data_t arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static objc + .ObjCBlock, CFOptionFlags)> + fromFunction(void Function(CFRunLoopObserverRef, CFRunLoopActivity) fn) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer<__CFRunLoopObserver>, CFOptionFlags)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_closureCallable, + (CFRunLoopObserverRef arg0, int arg1) => + fn(arg0, CFRunLoopActivity.fromValue(arg1))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -77135,213 +50412,136 @@ class ObjCBlock_ffiVoid_dispatchdatat_ffiInt extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_dispatchdatat_ffiInt.listener( - NativeCupertinoHttp lib, void Function(dispatch_data_t, int) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - dispatch_data_t, ffi.Int)>.listener( - _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_registerClosure( - (dispatch_data_t arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, dispatch_data_t, ffi.Int)>? - _dartFuncListenerTrampoline; - - void call(dispatch_data_t arg0, int arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, ffi.Int arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, dispatch_data_t, int)>()( - _id, arg0, arg1); -} - -typedef dispatch_io_t = ffi.Pointer; -typedef dispatch_io_type_t = ffi.UnsignedLong; -typedef Dartdispatch_io_type_t = int; -void _ObjCBlock_ffiVoid_ffiInt_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -final _ObjCBlock_ffiVoid_ffiInt_closureRegistry = {}; -int _ObjCBlock_ffiVoid_ffiInt_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ffiInt_registerClosure( - void Function(int) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiInt_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiInt_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__CFRunLoopObserver>, CFOptionFlags)> + listener(void Function(CFRunLoopObserverRef, CFRunLoopActivity) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_listenerCallable + .nativeFunction + .cast(), + (CFRunLoopObserverRef arg0, int arg1) => + fn(arg0, CFRunLoopActivity.fromValue(arg1))); + final wrapper = _wrapListenerBlock_ttt6u1(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__CFRunLoopObserver>, + CFOptionFlags)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, CFOptionFlags)>`. +extension ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__CFRunLoopObserver>, CFOptionFlags)> { + void call(CFRunLoopObserverRef arg0, CFRunLoopActivity arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + CFRunLoopObserverRef arg0, CFOptionFlags arg1)>>() + .asFunction< + void Function(ffi.Pointer, CFRunLoopObserverRef, + int)>()(ref.pointer, arg0, arg1.value); } -void _ObjCBlock_ffiVoid_ffiInt_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0) => - _ObjCBlock_ffiVoid_ffiInt_closureRegistry[block.ref.target.address]!(arg0); +final class CFRunLoopTimerContext extends ffi.Struct { + @CFIndex() + external int version; -class ObjCBlock_ffiVoid_ffiInt extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ffiInt._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + external ffi.Pointer info; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiInt.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Int)>(_ObjCBlock_ffiVoid_ffiInt_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiInt.fromFunction( - NativeCupertinoHttp lib, void Function(int) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Int)>( - _ObjCBlock_ffiVoid_ffiInt_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiInt_registerClosure( - (int arg0) => fn(arg0))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiInt.listener( - NativeCupertinoHttp lib, void Function(int) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Int)>.listener( - _ObjCBlock_ffiVoid_ffiInt_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiInt_registerClosure( - (int arg0) => fn(arg0))), - lib); - static ffi - .NativeCallable, ffi.Int)>? - _dartFuncListenerTrampoline; - - void call(int arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Int arg0)>>() - .asFunction, int)>()(_id, arg0); + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -typedef dispatch_io_handler_t = ffi.Pointer<_ObjCBlock>; -typedef Dartdispatch_io_handler_t = ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt; -void _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - bool arg0, - dispatch_data_t arg1, - int arg2) => +typedef CFRunLoopTimerCallBack + = ffi.Pointer>; +typedef CFRunLoopTimerCallBackFunction = ffi.Void Function( + CFRunLoopTimerRef timer, ffi.Pointer info); +typedef DartCFRunLoopTimerCallBackFunction = void Function( + CFRunLoopTimerRef timer, ffi.Pointer info); +void _ObjCBlock_ffiVoid_CFRunLoopTimerRef_fnPtrTrampoline( + ffi.Pointer block, CFRunLoopTimerRef arg0) => block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() - .asFunction()( - arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_registerClosure( - void Function(bool, dispatch_data_t, int) fn) { - final id = - ++_ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureRegistryIndex; - _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - bool arg0, - dispatch_data_t arg1, - int arg2) => - _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt extends _ObjCBlockBase { - ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + .cast>() + .asFunction()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_CFRunLoopTimerRef_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, CFRunLoopTimerRef)>( + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureTrampoline( + ffi.Pointer block, CFRunLoopTimerRef arg0) => + (objc.getBlockClosure(block) as void Function(CFRunLoopTimerRef))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, CFRunLoopTimerRef)>( + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_CFRunLoopTimerRef_listenerTrampoline( + ffi.Pointer block, CFRunLoopTimerRef arg0) { + (objc.getBlockClosure(block) as void Function(CFRunLoopTimerRef))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, CFRunLoopTimerRef)> + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_listenerCallable = ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, CFRunLoopTimerRef)>.listener( + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_CFRunLoopTimerRef { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>( + pointer, + retain: retain, + release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Bool, - dispatch_data_t, ffi.Int)>( - _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__CFRunLoopTimer>)> fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt.fromFunction( - NativeCupertinoHttp lib, void Function(bool, dispatch_data_t, int) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Bool, - dispatch_data_t, ffi.Int)>( - _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_registerClosure( - (bool arg0, dispatch_data_t arg1, int arg2) => - fn(arg0, arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock)> + fromFunction(void Function(CFRunLoopTimerRef) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_closureCallable, + (CFRunLoopTimerRef arg0) => fn(arg0)), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -77352,71 +50552,50 @@ class ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt.listener( - NativeCupertinoHttp lib, void Function(bool, dispatch_data_t, int) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Bool, - dispatch_data_t, ffi.Int)>.listener( - _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_registerClosure( - (bool arg0, dispatch_data_t arg1, int arg2) => - fn(arg0, arg1, arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Bool, dispatch_data_t, ffi.Int)>? - _dartFuncListenerTrampoline; + static objc.ObjCBlock)> + listener(void Function(CFRunLoopTimerRef) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_CFRunLoopTimerRef_listenerCallable.nativeFunction + .cast(), + (CFRunLoopTimerRef arg0) => fn(arg0)); + final wrapper = _wrapListenerBlock_1txhfzs(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock)>( + wrapper, + retain: false, + release: true); + } +} - void call(bool arg0, dispatch_data_t arg1, int arg2) => _id.ref.invoke +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_CFRunLoopTimerRef_CallExtension + on objc.ObjCBlock)> { + void call(CFRunLoopTimerRef arg0) => ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0, - dispatch_data_t arg1, ffi.Int arg2)>>() + ffi.Void Function(ffi.Pointer block, + CFRunLoopTimerRef arg0)>>() .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, bool, dispatch_data_t, - int)>()(_id, arg0, arg1, arg2); + void Function(ffi.Pointer, + CFRunLoopTimerRef)>()(ref.pointer, arg0); } -typedef dispatch_io_close_flags_t = ffi.UnsignedLong; -typedef Dartdispatch_io_close_flags_t = int; -typedef dispatch_io_interval_flags_t = ffi.UnsignedLong; -typedef Dartdispatch_io_interval_flags_t = int; -typedef dispatch_workloop_t = dispatch_queue_t; +final class __CFSocket extends ffi.Opaque {} -final class CFStreamError extends ffi.Struct { - @CFIndex() - external int domain; +final class CFSocketSignature extends ffi.Struct { + @SInt32() + external int protocolFamily; @SInt32() - external int error; -} + external int socketType; -abstract class CFStreamStatus { - static const int kCFStreamStatusNotOpen = 0; - static const int kCFStreamStatusOpening = 1; - static const int kCFStreamStatusOpen = 2; - static const int kCFStreamStatusReading = 3; - static const int kCFStreamStatusWriting = 4; - static const int kCFStreamStatusAtEnd = 5; - static const int kCFStreamStatusClosed = 6; - static const int kCFStreamStatusError = 7; -} + @SInt32() + external int protocol; -abstract class CFStreamEventType { - static const int kCFStreamEventNone = 0; - static const int kCFStreamEventOpenCompleted = 1; - static const int kCFStreamEventHasBytesAvailable = 2; - static const int kCFStreamEventCanAcceptBytes = 4; - static const int kCFStreamEventErrorOccurred = 8; - static const int kCFStreamEventEndEncountered = 16; + external CFDataRef address; } -final class CFStreamClientContext extends ffi.Struct { +final class CFSocketContext extends ffi.Struct { @CFIndex() external int version; @@ -77435,6459 +50614,5040 @@ final class CFStreamClientContext extends ffi.Struct { copyDescription; } -final class __CFReadStream extends ffi.Opaque {} +typedef CFSocketRef = ffi.Pointer<__CFSocket>; +typedef CFSocketCallBack + = ffi.Pointer>; +typedef CFSocketCallBackFunction = ffi.Void Function( + CFSocketRef s, + CFOptionFlags type, + CFDataRef address, + ffi.Pointer data, + ffi.Pointer info); +typedef DartCFSocketCallBackFunction = void Function( + CFSocketRef s, + CFSocketCallBackType type, + CFDataRef address, + ffi.Pointer data, + ffi.Pointer info); -final class __CFWriteStream extends ffi.Opaque {} +enum CFSocketCallBackType { + kCFSocketNoCallBack(0), + kCFSocketReadCallBack(1), + kCFSocketAcceptCallBack(2), + kCFSocketDataCallBack(3), + kCFSocketConnectCallBack(4), + kCFSocketWriteCallBack(8); + + final int value; + const CFSocketCallBackType(this.value); + + static CFSocketCallBackType fromValue(int value) => switch (value) { + 0 => kCFSocketNoCallBack, + 1 => kCFSocketReadCallBack, + 2 => kCFSocketAcceptCallBack, + 3 => kCFSocketDataCallBack, + 4 => kCFSocketConnectCallBack, + 8 => kCFSocketWriteCallBack, + _ => + throw ArgumentError("Unknown value for CFSocketCallBackType: $value"), + }; +} -typedef CFStreamPropertyKey = CFStringRef; -typedef CFReadStreamRef = ffi.Pointer<__CFReadStream>; -typedef CFWriteStreamRef = ffi.Pointer<__CFWriteStream>; -typedef CFReadStreamClientCallBack - = ffi.Pointer>; -typedef CFReadStreamClientCallBackFunction = ffi.Void Function( - CFReadStreamRef stream, - ffi.Int32 type, - ffi.Pointer clientCallBackInfo); -typedef DartCFReadStreamClientCallBackFunction = void Function( - CFReadStreamRef stream, int type, ffi.Pointer clientCallBackInfo); -typedef CFWriteStreamClientCallBack - = ffi.Pointer>; -typedef CFWriteStreamClientCallBackFunction = ffi.Void Function( - CFWriteStreamRef stream, - ffi.Int32 type, - ffi.Pointer clientCallBackInfo); -typedef DartCFWriteStreamClientCallBackFunction = void Function( - CFWriteStreamRef stream, - int type, - ffi.Pointer clientCallBackInfo); +typedef CFSocketNativeHandle = ffi.Int; +typedef DartCFSocketNativeHandle = int; -abstract class CFStreamErrorDomain { - static const int kCFStreamErrorDomainCustom = -1; - static const int kCFStreamErrorDomainPOSIX = 1; - static const int kCFStreamErrorDomainMacOSStatus = 2; -} +enum CFSocketError { + kCFSocketSuccess(0), + kCFSocketError(-1), + kCFSocketTimeout(-2); + + final int value; + const CFSocketError(this.value); -abstract class CFPropertyListMutabilityOptions { - static const int kCFPropertyListImmutable = 0; - static const int kCFPropertyListMutableContainers = 1; - static const int kCFPropertyListMutableContainersAndLeaves = 2; + static CFSocketError fromValue(int value) => switch (value) { + 0 => kCFSocketSuccess, + -1 => kCFSocketError, + -2 => kCFSocketTimeout, + _ => throw ArgumentError("Unknown value for CFSocketError: $value"), + }; } -abstract class CFPropertyListFormat { - static const int kCFPropertyListOpenStepFormat = 1; - static const int kCFPropertyListXMLFormat_v1_0 = 100; - static const int kCFPropertyListBinaryFormat_v1_0 = 200; +final class accessx_descriptor extends ffi.Struct { + @ffi.UnsignedInt() + external int ad_name_offset; + + @ffi.Int() + external int ad_flags; + + @ffi.Array.multi([2]) + external ffi.Array ad_pad; } -final class CFSetCallBacks extends ffi.Struct { - @CFIndex() - external int version; +typedef gid_t = __darwin_gid_t; +typedef __darwin_gid_t = __uint32_t; +typedef useconds_t = __darwin_useconds_t; +typedef __darwin_useconds_t = __uint32_t; - external CFSetRetainCallBack retain; +final class fssearchblock extends ffi.Opaque {} - external CFSetReleaseCallBack release; +final class searchstate extends ffi.Opaque {} - external CFSetCopyDescriptionCallBack copyDescription; +final class flock extends ffi.Struct { + @off_t() + external int l_start; - external CFSetEqualCallBack equal; + @off_t() + external int l_len; - external CFSetHashCallBack hash; + @pid_t() + external int l_pid; + + @ffi.Short() + external int l_type; + + @ffi.Short() + external int l_whence; } -typedef CFSetRetainCallBack - = ffi.Pointer>; -typedef CFSetRetainCallBackFunction = ffi.Pointer Function( - CFAllocatorRef allocator, ffi.Pointer value); -typedef CFSetReleaseCallBack - = ffi.Pointer>; -typedef CFSetReleaseCallBackFunction = ffi.Void Function( - CFAllocatorRef allocator, ffi.Pointer value); -typedef DartCFSetReleaseCallBackFunction = void Function( - CFAllocatorRef allocator, ffi.Pointer value); -typedef CFSetCopyDescriptionCallBack - = ffi.Pointer>; -typedef CFSetCopyDescriptionCallBackFunction = CFStringRef Function( - ffi.Pointer value); -typedef CFSetEqualCallBack - = ffi.Pointer>; -typedef CFSetEqualCallBackFunction = Boolean Function( - ffi.Pointer value1, ffi.Pointer value2); -typedef DartCFSetEqualCallBackFunction = DartBoolean Function( - ffi.Pointer value1, ffi.Pointer value2); -typedef CFSetHashCallBack - = ffi.Pointer>; -typedef CFSetHashCallBackFunction = CFHashCode Function( - ffi.Pointer value); -typedef DartCFSetHashCallBackFunction = DartCFHashCode Function( - ffi.Pointer value); +final class flocktimeout extends ffi.Struct { + external flock fl; -final class __CFSet extends ffi.Opaque {} + external timespec timeout; +} -typedef CFSetRef = ffi.Pointer<__CFSet>; -typedef CFMutableSetRef = ffi.Pointer<__CFSet>; -typedef CFSetApplierFunction - = ffi.Pointer>; -typedef CFSetApplierFunctionFunction = ffi.Void Function( - ffi.Pointer value, ffi.Pointer context); -typedef DartCFSetApplierFunctionFunction = void Function( - ffi.Pointer value, ffi.Pointer context); +final class radvisory extends ffi.Struct { + @off_t() + external int ra_offset; -abstract class CFStringEncodings { - static const int kCFStringEncodingMacJapanese = 1; - static const int kCFStringEncodingMacChineseTrad = 2; - static const int kCFStringEncodingMacKorean = 3; - static const int kCFStringEncodingMacArabic = 4; - static const int kCFStringEncodingMacHebrew = 5; - static const int kCFStringEncodingMacGreek = 6; - static const int kCFStringEncodingMacCyrillic = 7; - static const int kCFStringEncodingMacDevanagari = 9; - static const int kCFStringEncodingMacGurmukhi = 10; - static const int kCFStringEncodingMacGujarati = 11; - static const int kCFStringEncodingMacOriya = 12; - static const int kCFStringEncodingMacBengali = 13; - static const int kCFStringEncodingMacTamil = 14; - static const int kCFStringEncodingMacTelugu = 15; - static const int kCFStringEncodingMacKannada = 16; - static const int kCFStringEncodingMacMalayalam = 17; - static const int kCFStringEncodingMacSinhalese = 18; - static const int kCFStringEncodingMacBurmese = 19; - static const int kCFStringEncodingMacKhmer = 20; - static const int kCFStringEncodingMacThai = 21; - static const int kCFStringEncodingMacLaotian = 22; - static const int kCFStringEncodingMacGeorgian = 23; - static const int kCFStringEncodingMacArmenian = 24; - static const int kCFStringEncodingMacChineseSimp = 25; - static const int kCFStringEncodingMacTibetan = 26; - static const int kCFStringEncodingMacMongolian = 27; - static const int kCFStringEncodingMacEthiopic = 28; - static const int kCFStringEncodingMacCentralEurRoman = 29; - static const int kCFStringEncodingMacVietnamese = 30; - static const int kCFStringEncodingMacExtArabic = 31; - static const int kCFStringEncodingMacSymbol = 33; - static const int kCFStringEncodingMacDingbats = 34; - static const int kCFStringEncodingMacTurkish = 35; - static const int kCFStringEncodingMacCroatian = 36; - static const int kCFStringEncodingMacIcelandic = 37; - static const int kCFStringEncodingMacRomanian = 38; - static const int kCFStringEncodingMacCeltic = 39; - static const int kCFStringEncodingMacGaelic = 40; - static const int kCFStringEncodingMacFarsi = 140; - static const int kCFStringEncodingMacUkrainian = 152; - static const int kCFStringEncodingMacInuit = 236; - static const int kCFStringEncodingMacVT100 = 252; - static const int kCFStringEncodingMacHFS = 255; - static const int kCFStringEncodingISOLatin2 = 514; - static const int kCFStringEncodingISOLatin3 = 515; - static const int kCFStringEncodingISOLatin4 = 516; - static const int kCFStringEncodingISOLatinCyrillic = 517; - static const int kCFStringEncodingISOLatinArabic = 518; - static const int kCFStringEncodingISOLatinGreek = 519; - static const int kCFStringEncodingISOLatinHebrew = 520; - static const int kCFStringEncodingISOLatin5 = 521; - static const int kCFStringEncodingISOLatin6 = 522; - static const int kCFStringEncodingISOLatinThai = 523; - static const int kCFStringEncodingISOLatin7 = 525; - static const int kCFStringEncodingISOLatin8 = 526; - static const int kCFStringEncodingISOLatin9 = 527; - static const int kCFStringEncodingISOLatin10 = 528; - static const int kCFStringEncodingDOSLatinUS = 1024; - static const int kCFStringEncodingDOSGreek = 1029; - static const int kCFStringEncodingDOSBalticRim = 1030; - static const int kCFStringEncodingDOSLatin1 = 1040; - static const int kCFStringEncodingDOSGreek1 = 1041; - static const int kCFStringEncodingDOSLatin2 = 1042; - static const int kCFStringEncodingDOSCyrillic = 1043; - static const int kCFStringEncodingDOSTurkish = 1044; - static const int kCFStringEncodingDOSPortuguese = 1045; - static const int kCFStringEncodingDOSIcelandic = 1046; - static const int kCFStringEncodingDOSHebrew = 1047; - static const int kCFStringEncodingDOSCanadianFrench = 1048; - static const int kCFStringEncodingDOSArabic = 1049; - static const int kCFStringEncodingDOSNordic = 1050; - static const int kCFStringEncodingDOSRussian = 1051; - static const int kCFStringEncodingDOSGreek2 = 1052; - static const int kCFStringEncodingDOSThai = 1053; - static const int kCFStringEncodingDOSJapanese = 1056; - static const int kCFStringEncodingDOSChineseSimplif = 1057; - static const int kCFStringEncodingDOSKorean = 1058; - static const int kCFStringEncodingDOSChineseTrad = 1059; - static const int kCFStringEncodingWindowsLatin2 = 1281; - static const int kCFStringEncodingWindowsCyrillic = 1282; - static const int kCFStringEncodingWindowsGreek = 1283; - static const int kCFStringEncodingWindowsLatin5 = 1284; - static const int kCFStringEncodingWindowsHebrew = 1285; - static const int kCFStringEncodingWindowsArabic = 1286; - static const int kCFStringEncodingWindowsBalticRim = 1287; - static const int kCFStringEncodingWindowsVietnamese = 1288; - static const int kCFStringEncodingWindowsKoreanJohab = 1296; - static const int kCFStringEncodingANSEL = 1537; - static const int kCFStringEncodingJIS_X0201_76 = 1568; - static const int kCFStringEncodingJIS_X0208_83 = 1569; - static const int kCFStringEncodingJIS_X0208_90 = 1570; - static const int kCFStringEncodingJIS_X0212_90 = 1571; - static const int kCFStringEncodingJIS_C6226_78 = 1572; - static const int kCFStringEncodingShiftJIS_X0213 = 1576; - static const int kCFStringEncodingShiftJIS_X0213_MenKuTen = 1577; - static const int kCFStringEncodingGB_2312_80 = 1584; - static const int kCFStringEncodingGBK_95 = 1585; - static const int kCFStringEncodingGB_18030_2000 = 1586; - static const int kCFStringEncodingKSC_5601_87 = 1600; - static const int kCFStringEncodingKSC_5601_92_Johab = 1601; - static const int kCFStringEncodingCNS_11643_92_P1 = 1617; - static const int kCFStringEncodingCNS_11643_92_P2 = 1618; - static const int kCFStringEncodingCNS_11643_92_P3 = 1619; - static const int kCFStringEncodingISO_2022_JP = 2080; - static const int kCFStringEncodingISO_2022_JP_2 = 2081; - static const int kCFStringEncodingISO_2022_JP_1 = 2082; - static const int kCFStringEncodingISO_2022_JP_3 = 2083; - static const int kCFStringEncodingISO_2022_CN = 2096; - static const int kCFStringEncodingISO_2022_CN_EXT = 2097; - static const int kCFStringEncodingISO_2022_KR = 2112; - static const int kCFStringEncodingEUC_JP = 2336; - static const int kCFStringEncodingEUC_CN = 2352; - static const int kCFStringEncodingEUC_TW = 2353; - static const int kCFStringEncodingEUC_KR = 2368; - static const int kCFStringEncodingShiftJIS = 2561; - static const int kCFStringEncodingKOI8_R = 2562; - static const int kCFStringEncodingBig5 = 2563; - static const int kCFStringEncodingMacRomanLatin1 = 2564; - static const int kCFStringEncodingHZ_GB_2312 = 2565; - static const int kCFStringEncodingBig5_HKSCS_1999 = 2566; - static const int kCFStringEncodingVISCII = 2567; - static const int kCFStringEncodingKOI8_U = 2568; - static const int kCFStringEncodingBig5_E = 2569; - static const int kCFStringEncodingNextStepJapanese = 2818; - static const int kCFStringEncodingEBCDIC_US = 3073; - static const int kCFStringEncodingEBCDIC_CP037 = 3074; - static const int kCFStringEncodingUTF7 = 67109120; - static const int kCFStringEncodingUTF7_IMAP = 2576; - static const int kCFStringEncodingShiftJIS_X0213_00 = 1576; + @ffi.Int() + external int ra_count; } -final class CFTreeContext extends ffi.Struct { - @CFIndex() - external int version; +final class fsignatures extends ffi.Struct { + @off_t() + external int fs_file_start; - external ffi.Pointer info; + external ffi.Pointer fs_blob_start; - external CFTreeRetainCallBack retain; + @ffi.Size() + external int fs_blob_size; - external CFTreeReleaseCallBack release; + @ffi.Size() + external int fs_fsignatures_size; - external CFTreeCopyDescriptionCallBack copyDescription; + @ffi.Array.multi([20]) + external ffi.Array fs_cdhash; + + @ffi.Int() + external int fs_hash_type; } -typedef CFTreeRetainCallBack - = ffi.Pointer>; -typedef CFTreeRetainCallBackFunction = ffi.Pointer Function( - ffi.Pointer info); -typedef CFTreeReleaseCallBack - = ffi.Pointer>; -typedef CFTreeReleaseCallBackFunction = ffi.Void Function( - ffi.Pointer info); -typedef DartCFTreeReleaseCallBackFunction = void Function( - ffi.Pointer info); -typedef CFTreeCopyDescriptionCallBack - = ffi.Pointer>; -typedef CFTreeCopyDescriptionCallBackFunction = CFStringRef Function( - ffi.Pointer info); +final class fsupplement extends ffi.Struct { + @off_t() + external int fs_file_start; -final class __CFTree extends ffi.Opaque {} + @off_t() + external int fs_blob_start; -typedef CFTreeRef = ffi.Pointer<__CFTree>; -typedef CFTreeApplierFunction - = ffi.Pointer>; -typedef CFTreeApplierFunctionFunction = ffi.Void Function( - ffi.Pointer value, ffi.Pointer context); -typedef DartCFTreeApplierFunctionFunction = void Function( - ffi.Pointer value, ffi.Pointer context); + @ffi.Size() + external int fs_blob_size; -abstract class CFURLError { - static const int kCFURLUnknownError = -10; - static const int kCFURLUnknownSchemeError = -11; - static const int kCFURLResourceNotFoundError = -12; - static const int kCFURLResourceAccessViolationError = -13; - static const int kCFURLRemoteHostUnavailableError = -14; - static const int kCFURLImproperArgumentsError = -15; - static const int kCFURLUnknownPropertyKeyError = -16; - static const int kCFURLPropertyKeyUnavailableError = -17; - static const int kCFURLTimeoutError = -18; + @ffi.Int() + external int fs_orig_fd; } -final class __CFUUID extends ffi.Opaque {} +final class fchecklv extends ffi.Struct { + @off_t() + external int lv_file_start; -final class CFUUIDBytes extends ffi.Struct { - @UInt8() - external int byte0; + @ffi.Size() + external int lv_error_message_size; - @UInt8() - external int byte1; + external ffi.Pointer lv_error_message; +} - @UInt8() - external int byte2; +final class fgetsigsinfo extends ffi.Struct { + @off_t() + external int fg_file_start; - @UInt8() - external int byte3; + @ffi.Int() + external int fg_info_request; - @UInt8() - external int byte4; + @ffi.Int() + external int fg_sig_is_platform; +} + +final class fstore extends ffi.Struct { + @ffi.UnsignedInt() + external int fst_flags; + + @ffi.Int() + external int fst_posmode; + + @off_t() + external int fst_offset; + + @off_t() + external int fst_length; + + @off_t() + external int fst_bytesalloc; +} + +final class fpunchhole extends ffi.Struct { + @ffi.UnsignedInt() + external int fp_flags; + + @ffi.UnsignedInt() + external int reserved; + + @off_t() + external int fp_offset; + + @off_t() + external int fp_length; +} + +final class ftrimactivefile extends ffi.Struct { + @off_t() + external int fta_offset; - @UInt8() - external int byte5; + @off_t() + external int fta_length; +} - @UInt8() - external int byte6; +final class fspecread extends ffi.Struct { + @ffi.UnsignedInt() + external int fsr_flags; - @UInt8() - external int byte7; + @ffi.UnsignedInt() + external int reserved; - @UInt8() - external int byte8; + @off_t() + external int fsr_offset; - @UInt8() - external int byte9; + @off_t() + external int fsr_length; +} - @UInt8() - external int byte10; +final class fattributiontag extends ffi.Struct { + @ffi.UnsignedInt() + external int ft_flags; - @UInt8() - external int byte11; + @ffi.UnsignedLongLong() + external int ft_hash; - @UInt8() - external int byte12; + @ffi.Array.multi([255]) + external ffi.Array ft_attribution_name; +} - @UInt8() - external int byte13; +@ffi.Packed(4) +final class log2phys extends ffi.Struct { + @ffi.UnsignedInt() + external int l2p_flags; - @UInt8() - external int byte14; + @off_t() + external int l2p_contigbytes; - @UInt8() - external int byte15; + @off_t() + external int l2p_devoffset; } -typedef CFUUIDRef = ffi.Pointer<__CFUUID>; +final class _filesec extends ffi.Opaque {} -final class __CFBundle extends ffi.Opaque {} +typedef filesec_t = ffi.Pointer<_filesec>; -typedef CFBundleRef = ffi.Pointer<__CFBundle>; -typedef cpu_type_t = integer_t; -typedef CFPlugInRef = ffi.Pointer<__CFBundle>; -typedef CFBundleRefNum = ffi.Int; -typedef DartCFBundleRefNum = int; +enum filesec_property_t { + FILESEC_OWNER(1), + FILESEC_GROUP(2), + FILESEC_UUID(3), + FILESEC_MODE(4), + FILESEC_ACL(5), + FILESEC_GRPUUID(6), + FILESEC_ACL_RAW(100), + FILESEC_ACL_ALLOCSIZE(101); + + final int value; + const filesec_property_t(this.value); + + static filesec_property_t fromValue(int value) => switch (value) { + 1 => FILESEC_OWNER, + 2 => FILESEC_GROUP, + 3 => FILESEC_UUID, + 4 => FILESEC_MODE, + 5 => FILESEC_ACL, + 6 => FILESEC_GRPUUID, + 100 => FILESEC_ACL_RAW, + 101 => FILESEC_ACL_ALLOCSIZE, + _ => + throw ArgumentError("Unknown value for filesec_property_t: $value"), + }; +} -final class __CFMessagePort extends ffi.Opaque {} +final class os_workgroup_attr_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; -final class CFMessagePortContext extends ffi.Struct { - @CFIndex() - external int version; + @ffi.Array.multi([60]) + external ffi.Array opaque; +} - external ffi.Pointer info; +final class os_workgroup_interval_data_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>> retain; + @ffi.Array.multi([56]) + external ffi.Array opaque; +} - external ffi.Pointer< - ffi.NativeFunction info)>> - release; +final class os_workgroup_join_token_opaque_s extends ffi.Struct { + @ffi.Uint32() + external int sig; - external ffi.Pointer< - ffi.NativeFunction info)>> - copyDescription; + @ffi.Array.multi([36]) + external ffi.Array opaque; } -typedef CFMessagePortRef = ffi.Pointer<__CFMessagePort>; -typedef CFMessagePortCallBack - = ffi.Pointer>; -typedef CFMessagePortCallBackFunction = CFDataRef Function( - CFMessagePortRef local, - SInt32 msgid, - CFDataRef data, - ffi.Pointer info); -typedef DartCFMessagePortCallBackFunction = CFDataRef Function( - CFMessagePortRef local, - DartSInt32 msgid, - CFDataRef data, - ffi.Pointer info); -typedef CFMessagePortInvalidationCallBack = ffi - .Pointer>; -typedef CFMessagePortInvalidationCallBackFunction = ffi.Void Function( - CFMessagePortRef ms, ffi.Pointer info); -typedef DartCFMessagePortInvalidationCallBackFunction = void Function( - CFMessagePortRef ms, ffi.Pointer info); -typedef CFPlugInFactoryFunction - = ffi.Pointer>; -typedef CFPlugInFactoryFunctionFunction = ffi.Pointer Function( - CFAllocatorRef allocator, CFUUIDRef typeUUID); +typedef os_workgroup_t = ffi.Pointer; +typedef Dartos_workgroup_t = OS_os_workgroup; -final class __CFPlugInInstance extends ffi.Opaque {} +/// OS_os_workgroup +class OS_os_workgroup extends OS_object { + OS_os_workgroup._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -typedef CFPlugInInstanceRef = ffi.Pointer<__CFPlugInInstance>; -typedef CFPlugInInstanceDeallocateInstanceDataFunction = ffi.Pointer< - ffi.NativeFunction>; -typedef CFPlugInInstanceDeallocateInstanceDataFunctionFunction = ffi.Void - Function(ffi.Pointer instanceData); -typedef DartCFPlugInInstanceDeallocateInstanceDataFunctionFunction = void - Function(ffi.Pointer instanceData); -typedef CFPlugInInstanceGetInterfaceFunction = ffi - .Pointer>; -typedef CFPlugInInstanceGetInterfaceFunctionFunction = Boolean Function( - CFPlugInInstanceRef instance, - CFStringRef interfaceName, - ffi.Pointer> ftbl); -typedef DartCFPlugInInstanceGetInterfaceFunctionFunction = DartBoolean Function( - CFPlugInInstanceRef instance, - CFStringRef interfaceName, - ffi.Pointer> ftbl); + /// Constructs a [OS_os_workgroup] that points to the same underlying object as [other]. + OS_os_workgroup.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); -final class __CFMachPort extends ffi.Opaque {} + /// Constructs a [OS_os_workgroup] that wraps the given raw object pointer. + OS_os_workgroup.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); -final class CFMachPortContext extends ffi.Struct { - @CFIndex() - external int version; + /// Returns whether [obj] is an instance of [OS_os_workgroup]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_OS_os_workgroup); + } - external ffi.Pointer info; + /// init + OS_os_workgroup init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return OS_os_workgroup.castFromPointer(_ret, retain: false, release: true); + } - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>> retain; + /// new + static OS_os_workgroup new1() { + final _ret = _objc_msgSend_1unuoxw(_class_OS_os_workgroup, _sel_new); + return OS_os_workgroup.castFromPointer(_ret, retain: false, release: true); + } - external ffi.Pointer< - ffi.NativeFunction info)>> - release; + /// allocWithZone: + static OS_os_workgroup allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_OS_os_workgroup, _sel_allocWithZone_, zone); + return OS_os_workgroup.castFromPointer(_ret, retain: false, release: true); + } - external ffi.Pointer< - ffi.NativeFunction info)>> - copyDescription; + /// alloc + static OS_os_workgroup alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_OS_os_workgroup, _sel_alloc); + return OS_os_workgroup.castFromPointer(_ret, retain: false, release: true); + } } -typedef CFMachPortRef = ffi.Pointer<__CFMachPort>; -typedef CFMachPortCallBack - = ffi.Pointer>; -typedef CFMachPortCallBackFunction = ffi.Void Function(CFMachPortRef port, - ffi.Pointer msg, CFIndex size, ffi.Pointer info); -typedef DartCFMachPortCallBackFunction = void Function(CFMachPortRef port, - ffi.Pointer msg, DartCFIndex size, ffi.Pointer info); -typedef CFMachPortInvalidationCallBack - = ffi.Pointer>; -typedef CFMachPortInvalidationCallBackFunction = ffi.Void Function( - CFMachPortRef port, ffi.Pointer info); -typedef DartCFMachPortInvalidationCallBackFunction = void Function( - CFMachPortRef port, ffi.Pointer info); +late final _class_OS_os_workgroup = objc.getClass("OS_os_workgroup"); -final class __CFAttributedString extends ffi.Opaque {} +/// OS_object +class OS_object extends objc.NSObject { + OS_object._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -typedef CFAttributedStringRef = ffi.Pointer<__CFAttributedString>; -typedef CFMutableAttributedStringRef = ffi.Pointer<__CFAttributedString>; + /// Constructs a [OS_object] that points to the same underlying object as [other]. + OS_object.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); -final class __CFURLEnumerator extends ffi.Opaque {} + /// Constructs a [OS_object] that wraps the given raw object pointer. + OS_object.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); -abstract class CFURLEnumeratorOptions { - static const int kCFURLEnumeratorDefaultBehavior = 0; - static const int kCFURLEnumeratorDescendRecursively = 1; - static const int kCFURLEnumeratorSkipInvisibles = 2; - static const int kCFURLEnumeratorGenerateFileReferenceURLs = 4; - static const int kCFURLEnumeratorSkipPackageContents = 8; - static const int kCFURLEnumeratorIncludeDirectoriesPreOrder = 16; - static const int kCFURLEnumeratorIncludeDirectoriesPostOrder = 32; - static const int kCFURLEnumeratorGenerateRelativePathURLs = 64; -} + /// Returns whether [obj] is an instance of [OS_object]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_OS_object); + } -typedef CFURLEnumeratorRef = ffi.Pointer<__CFURLEnumerator>; + /// init + OS_object init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return OS_object.castFromPointer(_ret, retain: false, release: true); + } -abstract class CFURLEnumeratorResult { - static const int kCFURLEnumeratorSuccess = 1; - static const int kCFURLEnumeratorEnd = 2; - static const int kCFURLEnumeratorError = 3; - static const int kCFURLEnumeratorDirectoryPostOrderSuccess = 4; -} + /// new + static OS_object new1() { + final _ret = _objc_msgSend_1unuoxw(_class_OS_object, _sel_new); + return OS_object.castFromPointer(_ret, retain: false, release: true); + } -final class guid_t extends ffi.Union { - @ffi.Array.multi([16]) - external ffi.Array g_guid; + /// allocWithZone: + static OS_object allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_OS_object, _sel_allocWithZone_, zone); + return OS_object.castFromPointer(_ret, retain: false, release: true); + } - @ffi.Array.multi([4]) - external ffi.Array g_guid_asint; + /// alloc + static OS_object alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_OS_object, _sel_alloc); + return OS_object.castFromPointer(_ret, retain: false, release: true); + } } -@ffi.Packed(1) -final class ntsid_t extends ffi.Struct { - @u_int8_t() - external int sid_kind; +late final _class_OS_object = objc.getClass("OS_object"); +typedef os_workgroup_join_token_t + = ffi.Pointer; +typedef os_workgroup_working_arena_destructor_t = ffi.Pointer< + ffi.NativeFunction>; +typedef os_workgroup_working_arena_destructor_tFunction = ffi.Void Function( + ffi.Pointer); +typedef Dartos_workgroup_working_arena_destructor_tFunction = void Function( + ffi.Pointer); +typedef os_workgroup_index = ffi.Uint32; +typedef Dartos_workgroup_index = int; - @u_int8_t() - external int sid_authcount; +final class os_workgroup_max_parallel_threads_attr_s extends ffi.Opaque {} - @ffi.Array.multi([6]) - external ffi.Array sid_authority; +typedef os_workgroup_mpt_attr_t + = ffi.Pointer; - @ffi.Array.multi([16]) - external ffi.Array sid_authorities; -} +/// OS_os_workgroup_interval +abstract final class OS_os_workgroup_interval { + /// Builds an object that implements the OS_os_workgroup_interval protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); -typedef u_int8_t = ffi.UnsignedChar; -typedef Dartu_int8_t = int; -typedef u_int32_t = ffi.UnsignedInt; -typedef Dartu_int32_t = int; + return builder.build(); + } -final class kauth_identity_extlookup extends ffi.Struct { - @u_int32_t() - external int el_seqno; + /// Adds the implementation of the OS_os_workgroup_interval protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} +} - @u_int32_t() - external int el_result; +late final _protocol_OS_os_workgroup_interval = + objc.getProtocol("OS_os_workgroup_interval"); +typedef os_workgroup_interval_t = ffi.Pointer; +typedef Dartos_workgroup_interval_t = OS_os_workgroup; +typedef os_workgroup_interval_data_t + = ffi.Pointer; - @u_int32_t() - external int el_flags; +/// OS_os_workgroup_parallel +abstract final class OS_os_workgroup_parallel { + /// Builds an object that implements the OS_os_workgroup_parallel protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - @__darwin_pid_t() - external int el_info_pid; + return builder.build(); + } - @u_int64_t() - external int el_extend; + /// Adds the implementation of the OS_os_workgroup_parallel protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} +} - @u_int32_t() - external int el_info_reserved_1; +late final _protocol_OS_os_workgroup_parallel = + objc.getProtocol("OS_os_workgroup_parallel"); +typedef os_workgroup_parallel_t = ffi.Pointer; +typedef Dartos_workgroup_parallel_t = OS_os_workgroup; +typedef os_workgroup_attr_t = ffi.Pointer; - @uid_t() - external int el_uid; +final class time_value extends ffi.Struct { + @integer_t() + external int seconds; - external guid_t el_uguid; + @integer_t() + external int microseconds; +} - @u_int32_t() - external int el_uguid_valid; +typedef integer_t = ffi.Int; +typedef Dartinteger_t = int; - external ntsid_t el_usid; +final class mach_timespec extends ffi.Struct { + @ffi.UnsignedInt() + external int tv_sec; - @u_int32_t() - external int el_usid_valid; + @clock_res_t() + external int tv_nsec; +} - @gid_t() - external int el_gid; +typedef clock_res_t = ffi.Int; +typedef Dartclock_res_t = int; +typedef dispatch_time_t = ffi.Uint64; +typedef Dartdispatch_time_t = int; - external guid_t el_gguid; +enum qos_class_t { + QOS_CLASS_USER_INTERACTIVE(33), + QOS_CLASS_USER_INITIATED(25), + QOS_CLASS_DEFAULT(21), + QOS_CLASS_UTILITY(17), + QOS_CLASS_BACKGROUND(9), + QOS_CLASS_UNSPECIFIED(0); + + final int value; + const qos_class_t(this.value); + + static qos_class_t fromValue(int value) => switch (value) { + 33 => QOS_CLASS_USER_INTERACTIVE, + 25 => QOS_CLASS_USER_INITIATED, + 21 => QOS_CLASS_DEFAULT, + 17 => QOS_CLASS_UTILITY, + 9 => QOS_CLASS_BACKGROUND, + 0 => QOS_CLASS_UNSPECIFIED, + _ => throw ArgumentError("Unknown value for qos_class_t: $value"), + }; +} + +/// OS_dispatch_object +abstract final class OS_dispatch_object { + /// Builds an object that implements the OS_dispatch_object protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); + + return builder.build(); + } + + /// Adds the implementation of the OS_dispatch_object protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} +} + +late final _protocol_OS_dispatch_object = + objc.getProtocol("OS_dispatch_object"); +typedef dispatch_object_t = ffi.Pointer; +typedef Dartdispatch_object_t = objc.NSObject; +typedef dispatch_function_t + = ffi.Pointer>; +typedef dispatch_function_tFunction = ffi.Void Function(ffi.Pointer); +typedef Dartdispatch_function_tFunction = void Function(ffi.Pointer); +typedef dispatch_block_t = ffi.Pointer; +typedef Dartdispatch_block_t = objc.ObjCBlock; - @u_int32_t() - external int el_gguid_valid; +/// OS_dispatch_queue +abstract final class OS_dispatch_queue { + /// Builds an object that implements the OS_dispatch_queue protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - external ntsid_t el_gsid; + return builder.build(); + } - @u_int32_t() - external int el_gsid_valid; + /// Adds the implementation of the OS_dispatch_queue protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} +} - @u_int32_t() - external int el_member_valid; +late final _protocol_OS_dispatch_queue = objc.getProtocol("OS_dispatch_queue"); - @u_int32_t() - external int el_sup_grp_cnt; +/// OS_dispatch_queue_global +abstract final class OS_dispatch_queue_global { + /// Builds an object that implements the OS_dispatch_queue_global protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - @ffi.Array.multi([16]) - external ffi.Array el_sup_groups; + return builder.build(); + } + + /// Adds the implementation of the OS_dispatch_queue_global protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -typedef u_int64_t = ffi.UnsignedLongLong; -typedef Dartu_int64_t = int; +late final _protocol_OS_dispatch_queue_global = + objc.getProtocol("OS_dispatch_queue_global"); -final class kauth_cache_sizes extends ffi.Struct { - @u_int32_t() - external int kcs_group_size; +/// OS_dispatch_queue_serial_executor +abstract final class OS_dispatch_queue_serial_executor { + /// Builds an object that implements the OS_dispatch_queue_serial_executor protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - @u_int32_t() - external int kcs_id_size; + return builder.build(); + } + + /// Adds the implementation of the OS_dispatch_queue_serial_executor protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -final class kauth_ace extends ffi.Struct { - external guid_t ace_applicable; +late final _protocol_OS_dispatch_queue_serial_executor = + objc.getProtocol("OS_dispatch_queue_serial_executor"); - @u_int32_t() - external int ace_flags; +/// OS_dispatch_queue_serial +abstract final class OS_dispatch_queue_serial { + /// Builds an object that implements the OS_dispatch_queue_serial protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - @kauth_ace_rights_t() - external int ace_rights; + return builder.build(); + } + + /// Adds the implementation of the OS_dispatch_queue_serial protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -typedef kauth_ace_rights_t = u_int32_t; +late final _protocol_OS_dispatch_queue_serial = + objc.getProtocol("OS_dispatch_queue_serial"); -final class kauth_acl extends ffi.Struct { - @u_int32_t() - external int acl_entrycount; +/// OS_dispatch_queue_main +abstract final class OS_dispatch_queue_main { + /// Builds an object that implements the OS_dispatch_queue_main protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - @u_int32_t() - external int acl_flags; + return builder.build(); + } - @ffi.Array.multi([1]) - external ffi.Array acl_ace; + /// Adds the implementation of the OS_dispatch_queue_main protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -final class kauth_filesec extends ffi.Struct { - @u_int32_t() - external int fsec_magic; - - external guid_t fsec_owner; +late final _protocol_OS_dispatch_queue_main = + objc.getProtocol("OS_dispatch_queue_main"); - external guid_t fsec_group; +/// OS_dispatch_queue_concurrent +abstract final class OS_dispatch_queue_concurrent { + /// Builds an object that implements the OS_dispatch_queue_concurrent protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - external kauth_acl fsec_acl; -} + return builder.build(); + } -abstract class acl_perm_t { - static const int ACL_READ_DATA = 2; - static const int ACL_LIST_DIRECTORY = 2; - static const int ACL_WRITE_DATA = 4; - static const int ACL_ADD_FILE = 4; - static const int ACL_EXECUTE = 8; - static const int ACL_SEARCH = 8; - static const int ACL_DELETE = 16; - static const int ACL_APPEND_DATA = 32; - static const int ACL_ADD_SUBDIRECTORY = 32; - static const int ACL_DELETE_CHILD = 64; - static const int ACL_READ_ATTRIBUTES = 128; - static const int ACL_WRITE_ATTRIBUTES = 256; - static const int ACL_READ_EXTATTRIBUTES = 512; - static const int ACL_WRITE_EXTATTRIBUTES = 1024; - static const int ACL_READ_SECURITY = 2048; - static const int ACL_WRITE_SECURITY = 4096; - static const int ACL_CHANGE_OWNER = 8192; - static const int ACL_SYNCHRONIZE = 1048576; -} - -abstract class acl_tag_t { - static const int ACL_UNDEFINED_TAG = 0; - static const int ACL_EXTENDED_ALLOW = 1; - static const int ACL_EXTENDED_DENY = 2; -} - -abstract class acl_type_t { - static const int ACL_TYPE_EXTENDED = 256; - static const int ACL_TYPE_ACCESS = 0; - static const int ACL_TYPE_DEFAULT = 1; - static const int ACL_TYPE_AFS = 2; - static const int ACL_TYPE_CODA = 3; - static const int ACL_TYPE_NTFS = 4; - static const int ACL_TYPE_NWFS = 5; -} - -abstract class acl_entry_id_t { - static const int ACL_FIRST_ENTRY = 0; - static const int ACL_NEXT_ENTRY = -1; - static const int ACL_LAST_ENTRY = -2; -} - -abstract class acl_flag_t { - static const int ACL_FLAG_DEFER_INHERIT = 1; - static const int ACL_FLAG_NO_INHERIT = 131072; - static const int ACL_ENTRY_INHERITED = 16; - static const int ACL_ENTRY_FILE_INHERIT = 32; - static const int ACL_ENTRY_DIRECTORY_INHERIT = 64; - static const int ACL_ENTRY_LIMIT_INHERIT = 128; - static const int ACL_ENTRY_ONLY_INHERIT = 256; + /// Adds the implementation of the OS_dispatch_queue_concurrent protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -final class _acl extends ffi.Opaque {} +late final _protocol_OS_dispatch_queue_concurrent = + objc.getProtocol("OS_dispatch_queue_concurrent"); +typedef dispatch_queue_t = ffi.Pointer; +typedef Dartdispatch_queue_t = objc.NSObject; +void _ObjCBlock_ffiVoid_ffiSize_fnPtrTrampoline( + ffi.Pointer block, int arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_ffiSize_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Size)>(_ObjCBlock_ffiVoid_ffiSize_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiSize_closureTrampoline( + ffi.Pointer block, int arg0) => + (objc.getBlockClosure(block) as void Function(int))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_ffiSize_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Size)>(_ObjCBlock_ffiVoid_ffiSize_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiSize_listenerTrampoline( + ffi.Pointer block, int arg0) { + (objc.getBlockClosure(block) as void Function(int))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable, ffi.Size)> + _ObjCBlock_ffiVoid_ffiSize_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Size)>.listener(_ObjCBlock_ffiVoid_ffiSize_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_ffiSize { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); -final class _acl_entry extends ffi.Opaque {} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiSize_fnPtrCallable, ptr.cast()), + retain: false, + release: true); -final class _acl_permset extends ffi.Opaque {} + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(int) fn) => + objc.ObjCBlock( + objc.newClosureBlock(_ObjCBlock_ffiVoid_ffiSize_closureCallable, + (int arg0) => fn(arg0)), + retain: false, + release: true); -final class _acl_flagset extends ffi.Opaque {} + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(int) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiSize_listenerCallable.nativeFunction.cast(), + (int arg0) => fn(arg0)); + final wrapper = _wrapListenerBlock_1hmngv6(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} -typedef acl_t = ffi.Pointer<_acl>; -typedef acl_entry_t = ffi.Pointer<_acl_entry>; -typedef acl_permset_t = ffi.Pointer<_acl_permset>; -typedef acl_permset_mask_t = u_int64_t; -typedef acl_flagset_t = ffi.Pointer<_acl_flagset>; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_ffiSize_CallExtension + on objc.ObjCBlock { + void call(int arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, ffi.Size arg0)>>() + .asFunction, int)>()( + ref.pointer, arg0); +} -final class __CFFileSecurity extends ffi.Opaque {} +final class dispatch_queue_s extends ffi.Opaque {} -typedef CFFileSecurityRef = ffi.Pointer<__CFFileSecurity>; +typedef dispatch_queue_global_t = ffi.Pointer; +typedef Dartdispatch_queue_global_t = objc.NSObject; -abstract class CFFileSecurityClearOptions { - static const int kCFFileSecurityClearOwner = 1; - static const int kCFFileSecurityClearGroup = 2; - static const int kCFFileSecurityClearMode = 4; - static const int kCFFileSecurityClearOwnerUUID = 8; - static const int kCFFileSecurityClearGroupUUID = 16; - static const int kCFFileSecurityClearAccessControlList = 32; -} +/// OS_dispatch_queue_attr +abstract final class OS_dispatch_queue_attr { + /// Builds an object that implements the OS_dispatch_queue_attr protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); -final class __CFStringTokenizer extends ffi.Opaque {} + return builder.build(); + } -abstract class CFStringTokenizerTokenType { - static const int kCFStringTokenizerTokenNone = 0; - static const int kCFStringTokenizerTokenNormal = 1; - static const int kCFStringTokenizerTokenHasSubTokensMask = 2; - static const int kCFStringTokenizerTokenHasDerivedSubTokensMask = 4; - static const int kCFStringTokenizerTokenHasHasNumbersMask = 8; - static const int kCFStringTokenizerTokenHasNonLettersMask = 16; - static const int kCFStringTokenizerTokenIsCJWordMask = 32; + /// Adds the implementation of the OS_dispatch_queue_attr protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -typedef CFStringTokenizerRef = ffi.Pointer<__CFStringTokenizer>; - -final class __CFFileDescriptor extends ffi.Opaque {} +late final _protocol_OS_dispatch_queue_attr = + objc.getProtocol("OS_dispatch_queue_attr"); -final class CFFileDescriptorContext extends ffi.Struct { - @CFIndex() - external int version; +final class dispatch_queue_attr_s extends ffi.Opaque {} - external ffi.Pointer info; +typedef dispatch_queue_attr_t = ffi.Pointer; +typedef Dartdispatch_queue_attr_t = objc.NSObject; + +enum dispatch_autorelease_frequency_t { + DISPATCH_AUTORELEASE_FREQUENCY_INHERIT(0), + DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM(1), + DISPATCH_AUTORELEASE_FREQUENCY_NEVER(2); + + final int value; + const dispatch_autorelease_frequency_t(this.value); + + static dispatch_autorelease_frequency_t fromValue(int value) => + switch (value) { + 0 => DISPATCH_AUTORELEASE_FREQUENCY_INHERIT, + 1 => DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM, + 2 => DISPATCH_AUTORELEASE_FREQUENCY_NEVER, + _ => throw ArgumentError( + "Unknown value for dispatch_autorelease_frequency_t: $value"), + }; +} + +enum dispatch_block_flags_t { + DISPATCH_BLOCK_BARRIER(1), + DISPATCH_BLOCK_DETACHED(2), + DISPATCH_BLOCK_ASSIGN_CURRENT(4), + DISPATCH_BLOCK_NO_QOS_CLASS(8), + DISPATCH_BLOCK_INHERIT_QOS_CLASS(16), + DISPATCH_BLOCK_ENFORCE_QOS_CLASS(32); + + final int value; + const dispatch_block_flags_t(this.value); + + static dispatch_block_flags_t fromValue(int value) => switch (value) { + 1 => DISPATCH_BLOCK_BARRIER, + 2 => DISPATCH_BLOCK_DETACHED, + 4 => DISPATCH_BLOCK_ASSIGN_CURRENT, + 8 => DISPATCH_BLOCK_NO_QOS_CLASS, + 16 => DISPATCH_BLOCK_INHERIT_QOS_CLASS, + 32 => DISPATCH_BLOCK_ENFORCE_QOS_CLASS, + _ => throw ArgumentError( + "Unknown value for dispatch_block_flags_t: $value"), + }; +} - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>> retain; +final class mach_msg_type_descriptor_t extends ffi.Opaque {} - external ffi.Pointer< - ffi.NativeFunction info)>> - release; +final class mach_msg_port_descriptor_t extends ffi.Opaque {} - external ffi.Pointer< - ffi.NativeFunction info)>> - copyDescription; -} +final class mach_msg_ool_descriptor32_t extends ffi.Opaque {} -typedef CFFileDescriptorRef = ffi.Pointer<__CFFileDescriptor>; -typedef CFFileDescriptorNativeDescriptor = ffi.Int; -typedef DartCFFileDescriptorNativeDescriptor = int; -typedef CFFileDescriptorCallBack - = ffi.Pointer>; -typedef CFFileDescriptorCallBackFunction = ffi.Void Function( - CFFileDescriptorRef f, - CFOptionFlags callBackTypes, - ffi.Pointer info); -typedef DartCFFileDescriptorCallBackFunction = void Function( - CFFileDescriptorRef f, - DartCFOptionFlags callBackTypes, - ffi.Pointer info); +final class mach_msg_ool_descriptor64_t extends ffi.Opaque {} -final class __CFUserNotification extends ffi.Opaque {} +final class mach_msg_ool_descriptor_t extends ffi.Opaque {} -typedef CFUserNotificationRef = ffi.Pointer<__CFUserNotification>; -typedef CFUserNotificationCallBack - = ffi.Pointer>; -typedef CFUserNotificationCallBackFunction = ffi.Void Function( - CFUserNotificationRef userNotification, CFOptionFlags responseFlags); -typedef DartCFUserNotificationCallBackFunction = void Function( - CFUserNotificationRef userNotification, DartCFOptionFlags responseFlags); +final class mach_msg_ool_ports_descriptor32_t extends ffi.Opaque {} -final class __CFXMLNode extends ffi.Opaque {} +final class mach_msg_ool_ports_descriptor64_t extends ffi.Opaque {} -abstract class CFXMLNodeTypeCode { - static const int kCFXMLNodeTypeDocument = 1; - static const int kCFXMLNodeTypeElement = 2; - static const int kCFXMLNodeTypeAttribute = 3; - static const int kCFXMLNodeTypeProcessingInstruction = 4; - static const int kCFXMLNodeTypeComment = 5; - static const int kCFXMLNodeTypeText = 6; - static const int kCFXMLNodeTypeCDATASection = 7; - static const int kCFXMLNodeTypeDocumentFragment = 8; - static const int kCFXMLNodeTypeEntity = 9; - static const int kCFXMLNodeTypeEntityReference = 10; - static const int kCFXMLNodeTypeDocumentType = 11; - static const int kCFXMLNodeTypeWhitespace = 12; - static const int kCFXMLNodeTypeNotation = 13; - static const int kCFXMLNodeTypeElementTypeDeclaration = 14; - static const int kCFXMLNodeTypeAttributeListDeclaration = 15; -} +final class mach_msg_ool_ports_descriptor_t extends ffi.Opaque {} -final class CFXMLElementInfo extends ffi.Struct { - external CFDictionaryRef attributes; +final class mach_msg_guarded_port_descriptor32_t extends ffi.Opaque {} - external CFArrayRef attributeOrder; +final class mach_msg_guarded_port_descriptor64_t extends ffi.Opaque {} - @Boolean() - external int isEmpty; +final class mach_msg_guarded_port_descriptor_t extends ffi.Opaque {} - @ffi.Array.multi([3]) - external ffi.Array _reserved; -} +final class mach_msg_descriptor_t extends ffi.Opaque {} -final class CFXMLProcessingInstructionInfo extends ffi.Struct { - external CFStringRef dataString; +final class mach_msg_body_t extends ffi.Struct { + @mach_msg_size_t() + external int msgh_descriptor_count; } -final class CFXMLDocumentInfo extends ffi.Struct { - external CFURLRef sourceURL; +typedef mach_msg_size_t = natural_t; - @CFStringEncoding() - external int encoding; -} +final class mach_msg_header_t extends ffi.Struct { + @mach_msg_bits_t() + external int msgh_bits; -final class CFXMLExternalID extends ffi.Struct { - external CFURLRef systemID; + @mach_msg_size_t() + external int msgh_size; - external CFStringRef publicID; -} + @mach_port_t() + external int msgh_remote_port; -final class CFXMLDocumentTypeInfo extends ffi.Struct { - external CFXMLExternalID externalID; -} + @mach_port_t() + external int msgh_local_port; -final class CFXMLNotationInfo extends ffi.Struct { - external CFXMLExternalID externalID; -} + @mach_port_name_t() + external int msgh_voucher_port; -final class CFXMLElementTypeDeclarationInfo extends ffi.Struct { - external CFStringRef contentDescription; + @mach_msg_id_t() + external int msgh_id; } -final class CFXMLAttributeDeclarationInfo extends ffi.Struct { - external CFStringRef attributeName; +typedef mach_msg_bits_t = ffi.UnsignedInt; +typedef Dartmach_msg_bits_t = int; +typedef mach_msg_id_t = integer_t; - external CFStringRef typeString; +final class mach_msg_base_t extends ffi.Struct { + external mach_msg_header_t header; - external CFStringRef defaultString; + external mach_msg_body_t body; } -final class CFXMLAttributeListDeclarationInfo extends ffi.Struct { - @CFIndex() - external int numberOfAttributes; - - external ffi.Pointer attributes; -} +final class mach_msg_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -abstract class CFXMLEntityTypeCode { - static const int kCFXMLEntityTypeParameter = 0; - static const int kCFXMLEntityTypeParsedInternal = 1; - static const int kCFXMLEntityTypeParsedExternal = 2; - static const int kCFXMLEntityTypeUnparsed = 3; - static const int kCFXMLEntityTypeCharacter = 4; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; } -final class CFXMLEntityInfo extends ffi.Struct { - @ffi.Int32() - external int entityType; +typedef mach_msg_trailer_type_t = ffi.UnsignedInt; +typedef Dartmach_msg_trailer_type_t = int; +typedef mach_msg_trailer_size_t = ffi.UnsignedInt; +typedef Dartmach_msg_trailer_size_t = int; - external CFStringRef replacementText; +final class mach_msg_seqno_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; - external CFXMLExternalID entityID; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - external CFStringRef notationName; + @mach_port_seqno_t() + external int msgh_seqno; } -final class CFXMLEntityReferenceInfo extends ffi.Struct { - @ffi.Int32() - external int entityType; +final class security_token_t extends ffi.Struct { + @ffi.Array.multi([2]) + external ffi.Array val; } -typedef CFXMLNodeRef = ffi.Pointer<__CFXMLNode>; -typedef CFXMLTreeRef = CFTreeRef; +final class mach_msg_security_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -final class __CFXMLParser extends ffi.Opaque {} + @mach_msg_trailer_size_t() + external int msgh_trailer_size; + + @mach_port_seqno_t() + external int msgh_seqno; -abstract class CFXMLParserOptions { - static const int kCFXMLParserValidateDocument = 1; - static const int kCFXMLParserSkipMetaData = 2; - static const int kCFXMLParserReplacePhysicalEntities = 4; - static const int kCFXMLParserSkipWhitespace = 8; - static const int kCFXMLParserResolveExternalEntities = 16; - static const int kCFXMLParserAddImpliedAttributes = 32; - static const int kCFXMLParserAllOptions = 16777215; - static const int kCFXMLParserNoOptions = 0; -} - -abstract class CFXMLParserStatusCode { - static const int kCFXMLStatusParseNotBegun = -2; - static const int kCFXMLStatusParseInProgress = -1; - static const int kCFXMLStatusParseSuccessful = 0; - static const int kCFXMLErrorUnexpectedEOF = 1; - static const int kCFXMLErrorUnknownEncoding = 2; - static const int kCFXMLErrorEncodingConversionFailure = 3; - static const int kCFXMLErrorMalformedProcessingInstruction = 4; - static const int kCFXMLErrorMalformedDTD = 5; - static const int kCFXMLErrorMalformedName = 6; - static const int kCFXMLErrorMalformedCDSect = 7; - static const int kCFXMLErrorMalformedCloseTag = 8; - static const int kCFXMLErrorMalformedStartTag = 9; - static const int kCFXMLErrorMalformedDocument = 10; - static const int kCFXMLErrorElementlessDocument = 11; - static const int kCFXMLErrorMalformedComment = 12; - static const int kCFXMLErrorMalformedCharacterReference = 13; - static const int kCFXMLErrorMalformedParsedCharacterData = 14; - static const int kCFXMLErrorNoData = 15; + external security_token_t msgh_sender; } -final class CFXMLParserCallBacks extends ffi.Struct { - @CFIndex() - external int version; +final class audit_token_t extends ffi.Struct { + @ffi.Array.multi([8]) + external ffi.Array val; +} - external CFXMLParserCreateXMLStructureCallBack createXMLStructure; +final class mach_msg_audit_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; - external CFXMLParserAddChildCallBack addChild; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - external CFXMLParserEndXMLStructureCallBack endXMLStructure; + @mach_port_seqno_t() + external int msgh_seqno; - external CFXMLParserResolveExternalEntityCallBack resolveExternalEntity; + external security_token_t msgh_sender; - external CFXMLParserHandleErrorCallBack handleError; + external audit_token_t msgh_audit; } -typedef CFXMLParserCreateXMLStructureCallBack = ffi - .Pointer>; -typedef CFXMLParserCreateXMLStructureCallBackFunction - = ffi.Pointer Function(CFXMLParserRef parser, - CFXMLNodeRef nodeDesc, ffi.Pointer info); -typedef CFXMLParserRef = ffi.Pointer<__CFXMLParser>; -typedef CFXMLParserAddChildCallBack - = ffi.Pointer>; -typedef CFXMLParserAddChildCallBackFunction = ffi.Void Function( - CFXMLParserRef parser, - ffi.Pointer parent, - ffi.Pointer child, - ffi.Pointer info); -typedef DartCFXMLParserAddChildCallBackFunction = void Function( - CFXMLParserRef parser, - ffi.Pointer parent, - ffi.Pointer child, - ffi.Pointer info); -typedef CFXMLParserEndXMLStructureCallBack = ffi - .Pointer>; -typedef CFXMLParserEndXMLStructureCallBackFunction = ffi.Void Function( - CFXMLParserRef parser, - ffi.Pointer xmlType, - ffi.Pointer info); -typedef DartCFXMLParserEndXMLStructureCallBackFunction = void Function( - CFXMLParserRef parser, - ffi.Pointer xmlType, - ffi.Pointer info); -typedef CFXMLParserResolveExternalEntityCallBack = ffi.Pointer< - ffi.NativeFunction>; -typedef CFXMLParserResolveExternalEntityCallBackFunction = CFDataRef Function( - CFXMLParserRef parser, - ffi.Pointer extID, - ffi.Pointer info); -typedef CFXMLParserHandleErrorCallBack - = ffi.Pointer>; -typedef CFXMLParserHandleErrorCallBackFunction = Boolean Function( - CFXMLParserRef parser, ffi.Int32 error, ffi.Pointer info); -typedef DartCFXMLParserHandleErrorCallBackFunction = DartBoolean Function( - CFXMLParserRef parser, int error, ffi.Pointer info); +@ffi.Packed(4) +final class mach_msg_context_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -final class CFXMLParserContext extends ffi.Struct { - @CFIndex() - external int version; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; - external ffi.Pointer info; + @mach_port_seqno_t() + external int msgh_seqno; - external CFXMLParserRetainCallBack retain; + external security_token_t msgh_sender; - external CFXMLParserReleaseCallBack release; + external audit_token_t msgh_audit; - external CFXMLParserCopyDescriptionCallBack copyDescription; + @mach_port_context_t() + external int msgh_context; } -typedef CFXMLParserRetainCallBack - = ffi.Pointer>; -typedef CFXMLParserRetainCallBackFunction = ffi.Pointer Function( - ffi.Pointer info); -typedef CFXMLParserReleaseCallBack - = ffi.Pointer>; -typedef CFXMLParserReleaseCallBackFunction = ffi.Void Function( - ffi.Pointer info); -typedef DartCFXMLParserReleaseCallBackFunction = void Function( - ffi.Pointer info); -typedef CFXMLParserCopyDescriptionCallBack = ffi - .Pointer>; -typedef CFXMLParserCopyDescriptionCallBackFunction = CFStringRef Function( - ffi.Pointer info); - -final class cssm_data extends ffi.Struct { - @ffi.Size() - external int Length; +typedef mach_port_context_t = vm_offset_t; +typedef vm_offset_t = ffi.UintPtr; +typedef Dartvm_offset_t = int; - external ffi.Pointer Data; +final class msg_labels_t extends ffi.Struct { + @mach_port_name_t() + external int sender; } -final class SecAsn1AlgId extends ffi.Struct { - external SecAsn1Oid algorithm; - - external SecAsn1Item parameters; -} +@ffi.Packed(4) +final class mach_msg_mac_trailer_t extends ffi.Struct { + @mach_msg_trailer_type_t() + external int msgh_trailer_type; -typedef SecAsn1Oid = cssm_data; -typedef SecAsn1Item = cssm_data; + @mach_msg_trailer_size_t() + external int msgh_trailer_size; -final class SecAsn1PubKeyInfo extends ffi.Struct { - external SecAsn1AlgId algorithm; + @mach_port_seqno_t() + external int msgh_seqno; - external SecAsn1Item subjectPublicKey; -} + external security_token_t msgh_sender; -final class SecAsn1Template_struct extends ffi.Struct { - @ffi.Uint32() - external int kind; + external audit_token_t msgh_audit; - @ffi.Uint32() - external int offset; + @mach_port_context_t() + external int msgh_context; - external ffi.Pointer sub; + @mach_msg_filter_id() + external int msgh_ad; - @ffi.Uint32() - external int size; + external msg_labels_t msgh_labels; } -final class cssm_guid extends ffi.Struct { - @uint32() - external int Data1; +typedef mach_msg_filter_id = ffi.Int; +typedef Dartmach_msg_filter_id = int; - @uint16() - external int Data2; +final class mach_msg_empty_send_t extends ffi.Struct { + external mach_msg_header_t header; +} - @uint16() - external int Data3; +final class mach_msg_empty_rcv_t extends ffi.Struct { + external mach_msg_header_t header; - @ffi.Array.multi([8]) - external ffi.Array Data4; + external mach_msg_trailer_t trailer; } -typedef uint32 = ffi.Uint32; -typedef Dartuint32 = int; -typedef uint16 = ffi.Uint16; -typedef Dartuint16 = int; -typedef uint8 = ffi.Uint8; -typedef Dartuint8 = int; - -final class cssm_version extends ffi.Struct { - @uint32() - external int Major; +final class mach_msg_empty_t extends ffi.Union { + external mach_msg_empty_send_t send; - @uint32() - external int Minor; + external mach_msg_empty_rcv_t rcv; } -final class cssm_subservice_uid extends ffi.Struct { - external CSSM_GUID Guid; +typedef mach_msg_return_t = kern_return_t; +typedef kern_return_t = ffi.Int; +typedef Dartkern_return_t = int; +typedef mach_msg_option_t = integer_t; +typedef mach_msg_timeout_t = natural_t; - external CSSM_VERSION Version; +/// OS_dispatch_source +abstract final class OS_dispatch_source { + /// Builds an object that implements the OS_dispatch_source protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - @uint32() - external int SubserviceId; + return builder.build(); + } - @CSSM_SERVICE_TYPE() - external int SubserviceType; + /// Adds the implementation of the OS_dispatch_source protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -typedef CSSM_GUID = cssm_guid; -typedef CSSM_VERSION = cssm_version; -typedef CSSM_SERVICE_TYPE = CSSM_SERVICE_MASK; -typedef CSSM_SERVICE_MASK = uint32; - -final class cssm_net_address extends ffi.Struct { - @CSSM_NET_ADDRESS_TYPE() - external int AddressType; +late final _protocol_OS_dispatch_source = + objc.getProtocol("OS_dispatch_source"); - external SecAsn1Item Address; -} +final class dispatch_source_type_s extends ffi.Opaque {} -typedef CSSM_NET_ADDRESS_TYPE = uint32; +typedef dispatch_source_t = ffi.Pointer; +typedef Dartdispatch_source_t = objc.NSObject; +typedef dispatch_source_type_t = ffi.Pointer; -final class cssm_crypto_data extends ffi.Struct { - external SecAsn1Item Param; +/// OS_dispatch_group +abstract final class OS_dispatch_group { + /// Builds an object that implements the OS_dispatch_group protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - external CSSM_CALLBACK Callback; + return builder.build(); + } - external ffi.Pointer CallerCtx; + /// Adds the implementation of the OS_dispatch_group protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -typedef CSSM_CALLBACK = ffi.Pointer>; -typedef CSSM_CALLBACKFunction = CSSM_RETURN Function( - CSSM_DATA_PTR OutData, ffi.Pointer CallerCtx); -typedef DartCSSM_CALLBACKFunction = Dartsint32 Function( - CSSM_DATA_PTR OutData, ffi.Pointer CallerCtx); -typedef CSSM_RETURN = sint32; -typedef sint32 = ffi.Int32; -typedef Dartsint32 = int; -typedef CSSM_DATA_PTR = ffi.Pointer; - -final class cssm_list_element extends ffi.Struct { - external ffi.Pointer NextElement; +late final _protocol_OS_dispatch_group = objc.getProtocol("OS_dispatch_group"); +typedef dispatch_group_t = ffi.Pointer; +typedef Dartdispatch_group_t = objc.NSObject; - @CSSM_WORDID_TYPE() - external int WordID; +/// OS_dispatch_semaphore +abstract final class OS_dispatch_semaphore { + /// Builds an object that implements the OS_dispatch_semaphore protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - @CSSM_LIST_ELEMENT_TYPE() - external int ElementType; + return builder.build(); + } - external UnnamedUnion2 Element; + /// Adds the implementation of the OS_dispatch_semaphore protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -typedef CSSM_WORDID_TYPE = sint32; -typedef CSSM_LIST_ELEMENT_TYPE = uint32; +late final _protocol_OS_dispatch_semaphore = + objc.getProtocol("OS_dispatch_semaphore"); +typedef dispatch_semaphore_t = ffi.Pointer; +typedef Dartdispatch_semaphore_t = objc.NSObject; +typedef dispatch_once_t = ffi.IntPtr; +typedef Dartdispatch_once_t = int; -final class UnnamedUnion2 extends ffi.Union { - external CSSM_LIST Sublist; +/// OS_dispatch_data +abstract final class OS_dispatch_data { + /// Builds an object that implements the OS_dispatch_data protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - external SecAsn1Item Word; + return builder.build(); + } + + /// Adds the implementation of the OS_dispatch_data protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -typedef CSSM_LIST = cssm_list; +late final _protocol_OS_dispatch_data = objc.getProtocol("OS_dispatch_data"); -final class cssm_list extends ffi.Struct { - @CSSM_LIST_TYPE() - external int ListType; +final class dispatch_data_s extends ffi.Opaque {} - external CSSM_LIST_ELEMENT_PTR Head; +typedef dispatch_data_t = ffi.Pointer; +typedef Dartdispatch_data_t = objc.NSObject; +typedef dispatch_data_applier_t = ffi.Pointer; +typedef Dartdispatch_data_applier_t = objc.ObjCBlock< + ffi.Bool Function( + objc.NSObject, ffi.Size, ffi.Pointer, ffi.Size)>; +bool _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_fnPtrTrampoline( + ffi.Pointer block, + dispatch_data_t arg0, + int arg1, + ffi.Pointer arg2, + int arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(dispatch_data_t arg0, ffi.Size arg1, + ffi.Pointer arg2, ffi.Size arg3)>>() + .asFunction< + bool Function(dispatch_data_t, int, ffi.Pointer, + int)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + dispatch_data_t, + ffi.Size, + ffi.Pointer, + ffi.Size)>( + _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_fnPtrTrampoline, + false) + .cast(); +bool _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureTrampoline( + ffi.Pointer block, + dispatch_data_t arg0, + int arg1, + ffi.Pointer arg2, + int arg3) => + (objc.getBlockClosure(block) as bool Function(dispatch_data_t, int, + ffi.Pointer, int))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + dispatch_data_t, + ffi.Size, + ffi.Pointer, + ffi.Size)>( + _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureTrampoline, + false) + .cast(); + +/// Construction methods for `objc.ObjCBlock, ffi.Size)>`. +abstract final class ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Bool Function( + objc.NSObject, ffi.Size, ffi.Pointer, ffi.Size)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function(objc.NSObject, ffi.Size, ffi.Pointer, + ffi.Size)>(pointer, retain: retain, release: release); - external CSSM_LIST_ELEMENT_PTR Tail; -} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.Size)> + fromFunctionPointer(ffi.Pointer arg2, ffi.Size arg3)>> ptr) => + objc.ObjCBlock< + ffi.Bool Function( + objc.NSObject, ffi.Size, ffi.Pointer, ffi.Size)>( + objc.newPointerBlock( + _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); -typedef CSSM_LIST_TYPE = uint32; -typedef CSSM_LIST_ELEMENT_PTR = ffi.Pointer; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, ffi.Size)> fromFunction( + bool Function(Dartdispatch_data_t, int, ffi.Pointer, int) + fn) => + objc.ObjCBlock, ffi.Size)>( + objc.newClosureBlock( + _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_closureCallable, + (dispatch_data_t arg0, int arg1, ffi.Pointer arg2, + int arg3) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2, arg3)), + retain: false, + release: true); +} -final class CSSM_TUPLE extends ffi.Struct { - external CSSM_LIST Issuer; +/// Call operator for `objc.ObjCBlock, ffi.Size)>`. +extension ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_CallExtension + on objc.ObjCBlock< + ffi.Bool Function( + objc.NSObject, ffi.Size, ffi.Pointer, ffi.Size)> { + bool call(Dartdispatch_data_t arg0, int arg1, ffi.Pointer arg2, + int arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + dispatch_data_t arg0, + ffi.Size arg1, + ffi.Pointer arg2, + ffi.Size arg3)>>() + .asFunction< + bool Function( + ffi.Pointer, + dispatch_data_t, + int, + ffi.Pointer, + int)>()(ref.pointer, arg0.ref.pointer, arg1, arg2, arg3); +} - external CSSM_LIST Subject; +typedef dispatch_fd_t = ffi.Int; +typedef Dartdispatch_fd_t = int; +void _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_fnPtrTrampoline( + ffi.Pointer block, + dispatch_data_t arg0, + int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>>() + .asFunction()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, dispatch_data_t, ffi.Int)>( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureTrampoline( + ffi.Pointer block, + dispatch_data_t arg0, + int arg1) => + (objc.getBlockClosure(block) as void Function(dispatch_data_t, int))( + arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, dispatch_data_t, ffi.Int)>( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_listenerTrampoline( + ffi.Pointer block, dispatch_data_t arg0, int arg1) { + (objc.getBlockClosure(block) as void Function(dispatch_data_t, int))( + arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, dispatch_data_t, ffi.Int)> + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_listenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, dispatch_data_t, + ffi.Int)>.listener( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_dispatchdatat_ffiInt { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - @CSSM_BOOL() - external int Delegate; + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(objc.NSObject, ffi.Int)> fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - external CSSM_LIST AuthorizationTag; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(Dartdispatch_data_t, int) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_closureCallable, + (dispatch_data_t arg0, int arg1) => fn( + objc.NSObject.castFromPointer(arg0, + retain: true, release: true), + arg1)), + retain: false, + release: true); - external CSSM_LIST ValidityPeriod; + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(Dartdispatch_data_t, int) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_listenerCallable.nativeFunction + .cast(), + (dispatch_data_t arg0, int arg1) => fn( + objc.NSObject.castFromPointer(arg0, retain: false, release: true), + arg1)); + final wrapper = _wrapListenerBlock_108ugvk(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } } -typedef CSSM_BOOL = sint32; - -final class cssm_tuplegroup extends ffi.Struct { - @uint32() - external int NumberOfTuples; - - external CSSM_TUPLE_PTR Tuples; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_dispatchdatat_ffiInt_CallExtension + on objc.ObjCBlock { + void call(Dartdispatch_data_t arg0, int arg1) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + dispatch_data_t arg0, ffi.Int arg1)>>() + .asFunction< + void Function(ffi.Pointer, dispatch_data_t, + int)>()(ref.pointer, arg0.ref.pointer, arg1); } -typedef CSSM_TUPLE_PTR = ffi.Pointer; +/// OS_dispatch_io +abstract final class OS_dispatch_io { + /// Builds an object that implements the OS_dispatch_io protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); -final class cssm_sample extends ffi.Struct { - external CSSM_LIST TypedSample; + return builder.build(); + } - external ffi.Pointer Verifier; + /// Adds the implementation of the OS_dispatch_io protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -typedef CSSM_SUBSERVICE_UID = cssm_subservice_uid; +late final _protocol_OS_dispatch_io = objc.getProtocol("OS_dispatch_io"); +typedef dispatch_io_t = ffi.Pointer; +typedef Dartdispatch_io_t = objc.NSObject; +typedef dispatch_io_type_t = ffi.UnsignedLong; +typedef Dartdispatch_io_type_t = int; +void _ObjCBlock_ffiVoid_ffiInt_fnPtrTrampoline( + ffi.Pointer block, int arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_ffiInt_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Int)>(_ObjCBlock_ffiVoid_ffiInt_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiInt_closureTrampoline( + ffi.Pointer block, int arg0) => + (objc.getBlockClosure(block) as void Function(int))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_ffiInt_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Int)>(_ObjCBlock_ffiVoid_ffiInt_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiInt_listenerTrampoline( + ffi.Pointer block, int arg0) { + (objc.getBlockClosure(block) as void Function(int))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable, ffi.Int)> + _ObjCBlock_ffiVoid_ffiInt_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Int)>.listener(_ObjCBlock_ffiVoid_ffiInt_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_ffiInt { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); -final class cssm_samplegroup extends ffi.Struct { - @uint32() - external int NumberOfSamples; + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiInt_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - external ffi.Pointer Samples; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(int) fn) => + objc.ObjCBlock( + objc.newClosureBlock(_ObjCBlock_ffiVoid_ffiInt_closureCallable, + (int arg0) => fn(arg0)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(int) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiInt_listenerCallable.nativeFunction.cast(), + (int arg0) => fn(arg0)); + final wrapper = _wrapListenerBlock_1afulej(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } } -typedef CSSM_SAMPLE = cssm_sample; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_ffiInt_CallExtension + on objc.ObjCBlock { + void call(int arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, ffi.Int arg0)>>() + .asFunction, int)>()( + ref.pointer, arg0); +} -final class cssm_memory_funcs extends ffi.Struct { - external CSSM_MALLOC malloc_func; +typedef dispatch_io_handler_t = ffi.Pointer; +typedef Dartdispatch_io_handler_t + = objc.ObjCBlock; +void _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_fnPtrTrampoline( + ffi.Pointer block, + bool arg0, + dispatch_data_t arg1, + int arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() + .asFunction()( + arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, ffi.Bool, + dispatch_data_t, ffi.Int)>( + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureTrampoline( + ffi.Pointer block, + bool arg0, + dispatch_data_t arg1, + int arg2) => + (objc.getBlockClosure(block) as void Function(bool, dispatch_data_t, int))( + arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, ffi.Bool, + dispatch_data_t, ffi.Int)>( + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_listenerTrampoline( + ffi.Pointer block, + bool arg0, + dispatch_data_t arg1, + int arg2) { + (objc.getBlockClosure(block) as void Function(bool, dispatch_data_t, int))( + arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Bool, + dispatch_data_t, ffi.Int)> + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_listenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Bool, + dispatch_data_t, ffi.Int)>.listener( + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock( + pointer, + retain: retain, + release: release); - external CSSM_FREE free_func; + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Bool, objc.NSObject, ffi.Int)> fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - external CSSM_REALLOC realloc_func; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock + fromFunction(void Function(bool, Dartdispatch_data_t, int) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureCallable, + (bool arg0, dispatch_data_t arg1, int arg2) => fn( + arg0, + objc.NSObject.castFromPointer(arg1, + retain: true, release: true), + arg2)), + retain: false, + release: true); - external CSSM_CALLOC calloc_func; + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock + listener(void Function(bool, Dartdispatch_data_t, int) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_listenerCallable + .nativeFunction + .cast(), + (bool arg0, dispatch_data_t arg1, int arg2) => fn( + arg0, + objc.NSObject.castFromPointer(arg1, retain: false, release: true), + arg2)); + final wrapper = _wrapListenerBlock_elldw5(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true); + } +} - external ffi.Pointer AllocRef; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_CallExtension + on objc.ObjCBlock { + void call(bool arg0, Dartdispatch_data_t arg1, int arg2) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, dispatch_data_t, + int)>()(ref.pointer, arg0, arg1.ref.pointer, arg2); } -typedef CSSM_MALLOC = ffi.Pointer>; -typedef CSSM_MALLOCFunction = ffi.Pointer Function( - CSSM_SIZE size, ffi.Pointer allocref); -typedef DartCSSM_MALLOCFunction = ffi.Pointer Function( - DartCSSM_SIZE size, ffi.Pointer allocref); -typedef CSSM_SIZE = ffi.Size; -typedef DartCSSM_SIZE = int; -typedef CSSM_FREE = ffi.Pointer>; -typedef CSSM_FREEFunction = ffi.Void Function( - ffi.Pointer memblock, ffi.Pointer allocref); -typedef DartCSSM_FREEFunction = void Function( - ffi.Pointer memblock, ffi.Pointer allocref); -typedef CSSM_REALLOC = ffi.Pointer>; -typedef CSSM_REALLOCFunction = ffi.Pointer Function( - ffi.Pointer memblock, - CSSM_SIZE size, - ffi.Pointer allocref); -typedef DartCSSM_REALLOCFunction = ffi.Pointer Function( - ffi.Pointer memblock, - DartCSSM_SIZE size, - ffi.Pointer allocref); -typedef CSSM_CALLOC = ffi.Pointer>; -typedef CSSM_CALLOCFunction = ffi.Pointer Function( - uint32 num, CSSM_SIZE size, ffi.Pointer allocref); -typedef DartCSSM_CALLOCFunction = ffi.Pointer Function( - Dartuint32 num, DartCSSM_SIZE size, ffi.Pointer allocref); +typedef dispatch_io_close_flags_t = ffi.UnsignedLong; +typedef Dartdispatch_io_close_flags_t = int; +typedef dispatch_io_interval_flags_t = ffi.UnsignedLong; +typedef Dartdispatch_io_interval_flags_t = int; -final class cssm_encoded_cert extends ffi.Struct { - @CSSM_CERT_TYPE() - external int CertType; +/// OS_dispatch_workloop +abstract final class OS_dispatch_workloop { + /// Builds an object that implements the OS_dispatch_workloop protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - @CSSM_CERT_ENCODING() - external int CertEncoding; + return builder.build(); + } - external SecAsn1Item CertBlob; + /// Adds the implementation of the OS_dispatch_workloop protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} } -typedef CSSM_CERT_TYPE = uint32; -typedef CSSM_CERT_ENCODING = uint32; - -final class cssm_parsed_cert extends ffi.Struct { - @CSSM_CERT_TYPE() - external int CertType; +late final _protocol_OS_dispatch_workloop = + objc.getProtocol("OS_dispatch_workloop"); +typedef dispatch_workloop_t = ffi.Pointer; +typedef Dartdispatch_workloop_t = objc.NSObject; - @CSSM_CERT_PARSE_FORMAT() - external int ParsedCertFormat; +final class CFStreamError extends ffi.Struct { + @CFIndex() + external int domain; - external ffi.Pointer ParsedCert; + @SInt32() + external int error; } -typedef CSSM_CERT_PARSE_FORMAT = uint32; - -final class cssm_cert_pair extends ffi.Struct { - external CSSM_ENCODED_CERT EncodedCert; +final class CFStreamClientContext extends ffi.Struct { + @CFIndex() + external int version; - external CSSM_PARSED_CERT ParsedCert; -} + external ffi.Pointer info; -typedef CSSM_ENCODED_CERT = cssm_encoded_cert; -typedef CSSM_PARSED_CERT = cssm_parsed_cert; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; -final class cssm_certgroup extends ffi.Struct { - @CSSM_CERT_TYPE() - external int CertType; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - @CSSM_CERT_ENCODING() - external int CertEncoding; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; +} - @uint32() - external int NumCerts; +final class __CFReadStream extends ffi.Opaque {} - external UnnamedUnion3 GroupList; +final class __CFWriteStream extends ffi.Opaque {} - @CSSM_CERTGROUP_TYPE() - external int CertGroupType; +typedef CFStreamPropertyKey = CFStringRef; +typedef CFReadStreamRef = ffi.Pointer<__CFReadStream>; +typedef CFWriteStreamRef = ffi.Pointer<__CFWriteStream>; - external ffi.Pointer Reserved; +enum CFStreamStatus { + kCFStreamStatusNotOpen(0), + kCFStreamStatusOpening(1), + kCFStreamStatusOpen(2), + kCFStreamStatusReading(3), + kCFStreamStatusWriting(4), + kCFStreamStatusAtEnd(5), + kCFStreamStatusClosed(6), + kCFStreamStatusError(7); + + final int value; + const CFStreamStatus(this.value); + + static CFStreamStatus fromValue(int value) => switch (value) { + 0 => kCFStreamStatusNotOpen, + 1 => kCFStreamStatusOpening, + 2 => kCFStreamStatusOpen, + 3 => kCFStreamStatusReading, + 4 => kCFStreamStatusWriting, + 5 => kCFStreamStatusAtEnd, + 6 => kCFStreamStatusClosed, + 7 => kCFStreamStatusError, + _ => throw ArgumentError("Unknown value for CFStreamStatus: $value"), + }; } -final class UnnamedUnion3 extends ffi.Union { - external CSSM_DATA_PTR CertList; +typedef CFReadStreamClientCallBack + = ffi.Pointer>; +typedef CFReadStreamClientCallBackFunction = ffi.Void Function( + CFReadStreamRef stream, + CFOptionFlags type, + ffi.Pointer clientCallBackInfo); +typedef DartCFReadStreamClientCallBackFunction = void Function( + CFReadStreamRef stream, + CFStreamEventType type, + ffi.Pointer clientCallBackInfo); - external CSSM_ENCODED_CERT_PTR EncodedCertList; +enum CFStreamEventType { + kCFStreamEventNone(0), + kCFStreamEventOpenCompleted(1), + kCFStreamEventHasBytesAvailable(2), + kCFStreamEventCanAcceptBytes(4), + kCFStreamEventErrorOccurred(8), + kCFStreamEventEndEncountered(16); - external CSSM_PARSED_CERT_PTR ParsedCertList; + final int value; + const CFStreamEventType(this.value); - external CSSM_CERT_PAIR_PTR PairCertList; + static CFStreamEventType fromValue(int value) => switch (value) { + 0 => kCFStreamEventNone, + 1 => kCFStreamEventOpenCompleted, + 2 => kCFStreamEventHasBytesAvailable, + 4 => kCFStreamEventCanAcceptBytes, + 8 => kCFStreamEventErrorOccurred, + 16 => kCFStreamEventEndEncountered, + _ => throw ArgumentError("Unknown value for CFStreamEventType: $value"), + }; } -typedef CSSM_ENCODED_CERT_PTR = ffi.Pointer; -typedef CSSM_PARSED_CERT_PTR = ffi.Pointer; -typedef CSSM_CERT_PAIR_PTR = ffi.Pointer; -typedef CSSM_CERTGROUP_TYPE = uint32; +typedef CFWriteStreamClientCallBack + = ffi.Pointer>; +typedef CFWriteStreamClientCallBackFunction = ffi.Void Function( + CFWriteStreamRef stream, + CFOptionFlags type, + ffi.Pointer clientCallBackInfo); +typedef DartCFWriteStreamClientCallBackFunction = void Function( + CFWriteStreamRef stream, + CFStreamEventType type, + ffi.Pointer clientCallBackInfo); -final class cssm_base_certs extends ffi.Struct { - @CSSM_TP_HANDLE() - external int TPHandle; +enum CFPropertyListFormat { + kCFPropertyListOpenStepFormat(1), + kCFPropertyListXMLFormat_v1_0(100), + kCFPropertyListBinaryFormat_v1_0(200); - @CSSM_CL_HANDLE() - external int CLHandle; + final int value; + const CFPropertyListFormat(this.value); - external CSSM_CERTGROUP Certs; + static CFPropertyListFormat fromValue(int value) => switch (value) { + 1 => kCFPropertyListOpenStepFormat, + 100 => kCFPropertyListXMLFormat_v1_0, + 200 => kCFPropertyListBinaryFormat_v1_0, + _ => + throw ArgumentError("Unknown value for CFPropertyListFormat: $value"), + }; } -typedef CSSM_TP_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_MODULE_HANDLE = CSSM_HANDLE; -typedef CSSM_HANDLE = CSSM_INTPTR; -typedef CSSM_INTPTR = ffi.IntPtr; -typedef DartCSSM_INTPTR = int; -typedef CSSM_CL_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_CERTGROUP = cssm_certgroup; +final class CFSetCallBacks extends ffi.Struct { + @CFIndex() + external int version; -final class cssm_access_credentials extends ffi.Struct { - @ffi.Array.multi([68]) - external ffi.Array EntryTag; + external CFSetRetainCallBack retain; - external CSSM_BASE_CERTS BaseCerts; + external CFSetReleaseCallBack release; - external CSSM_SAMPLEGROUP Samples; + external CFSetCopyDescriptionCallBack copyDescription; - external CSSM_CHALLENGE_CALLBACK Callback; + external CFSetEqualCallBack equal; - external ffi.Pointer CallerCtx; + external CFSetHashCallBack hash; } -typedef CSSM_BASE_CERTS = cssm_base_certs; -typedef CSSM_SAMPLEGROUP = cssm_samplegroup; -typedef CSSM_CHALLENGE_CALLBACK - = ffi.Pointer>; -typedef CSSM_CHALLENGE_CALLBACKFunction = CSSM_RETURN Function( - ffi.Pointer Challenge, - CSSM_SAMPLEGROUP_PTR Response, - ffi.Pointer CallerCtx, - ffi.Pointer MemFuncs); -typedef DartCSSM_CHALLENGE_CALLBACKFunction = Dartsint32 Function( - ffi.Pointer Challenge, - CSSM_SAMPLEGROUP_PTR Response, - ffi.Pointer CallerCtx, - ffi.Pointer MemFuncs); -typedef CSSM_SAMPLEGROUP_PTR = ffi.Pointer; -typedef CSSM_MEMORY_FUNCS = cssm_memory_funcs; +typedef CFSetRetainCallBack + = ffi.Pointer>; +typedef CFSetRetainCallBackFunction = ffi.Pointer Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFSetReleaseCallBack + = ffi.Pointer>; +typedef CFSetReleaseCallBackFunction = ffi.Void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef DartCFSetReleaseCallBackFunction = void Function( + CFAllocatorRef allocator, ffi.Pointer value); +typedef CFSetCopyDescriptionCallBack + = ffi.Pointer>; +typedef CFSetCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer value); +typedef CFSetEqualCallBack + = ffi.Pointer>; +typedef CFSetEqualCallBackFunction = Boolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef DartCFSetEqualCallBackFunction = DartBoolean Function( + ffi.Pointer value1, ffi.Pointer value2); +typedef CFSetHashCallBack + = ffi.Pointer>; +typedef CFSetHashCallBackFunction = CFHashCode Function( + ffi.Pointer value); +typedef DartCFSetHashCallBackFunction = DartCFHashCode Function( + ffi.Pointer value); -final class cssm_authorizationgroup extends ffi.Struct { - @uint32() - external int NumberOfAuthTags; +final class __CFSet extends ffi.Opaque {} - external ffi.Pointer AuthTags; -} +typedef CFSetRef = ffi.Pointer<__CFSet>; +typedef CFMutableSetRef = ffi.Pointer<__CFSet>; +typedef CFSetApplierFunction + = ffi.Pointer>; +typedef CFSetApplierFunctionFunction = ffi.Void Function( + ffi.Pointer value, ffi.Pointer context); +typedef DartCFSetApplierFunctionFunction = void Function( + ffi.Pointer value, ffi.Pointer context); -typedef CSSM_ACL_AUTHORIZATION_TAG = sint32; +final class CFTreeContext extends ffi.Struct { + @CFIndex() + external int version; -final class cssm_acl_validity_period extends ffi.Struct { - external SecAsn1Item StartDate; + external ffi.Pointer info; - external SecAsn1Item EndDate; -} + external CFTreeRetainCallBack retain; -final class cssm_acl_entry_prototype extends ffi.Struct { - external CSSM_LIST TypedSubject; + external CFTreeReleaseCallBack release; - @CSSM_BOOL() - external int Delegate; + external CFTreeCopyDescriptionCallBack copyDescription; +} - external CSSM_AUTHORIZATIONGROUP Authorization; +typedef CFTreeRetainCallBack + = ffi.Pointer>; +typedef CFTreeRetainCallBackFunction = ffi.Pointer Function( + ffi.Pointer info); +typedef CFTreeReleaseCallBack + = ffi.Pointer>; +typedef CFTreeReleaseCallBackFunction = ffi.Void Function( + ffi.Pointer info); +typedef DartCFTreeReleaseCallBackFunction = void Function( + ffi.Pointer info); +typedef CFTreeCopyDescriptionCallBack + = ffi.Pointer>; +typedef CFTreeCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer info); - external CSSM_ACL_VALIDITY_PERIOD TimeRange; +final class __CFTree extends ffi.Opaque {} - @ffi.Array.multi([68]) - external ffi.Array EntryTag; -} +typedef CFTreeRef = ffi.Pointer<__CFTree>; +typedef CFTreeApplierFunction + = ffi.Pointer>; +typedef CFTreeApplierFunctionFunction = ffi.Void Function( + ffi.Pointer value, ffi.Pointer context); +typedef DartCFTreeApplierFunctionFunction = void Function( + ffi.Pointer value, ffi.Pointer context); -typedef CSSM_AUTHORIZATIONGROUP = cssm_authorizationgroup; -typedef CSSM_ACL_VALIDITY_PERIOD = cssm_acl_validity_period; +final class __CFUUID extends ffi.Opaque {} -final class cssm_acl_owner_prototype extends ffi.Struct { - external CSSM_LIST TypedSubject; +final class CFUUIDBytes extends ffi.Struct { + @UInt8() + external int byte0; - @CSSM_BOOL() - external int Delegate; -} + @UInt8() + external int byte1; -final class cssm_acl_entry_input extends ffi.Struct { - external CSSM_ACL_ENTRY_PROTOTYPE Prototype; + @UInt8() + external int byte2; - external CSSM_ACL_SUBJECT_CALLBACK Callback; + @UInt8() + external int byte3; - external ffi.Pointer CallerContext; -} + @UInt8() + external int byte4; -typedef CSSM_ACL_ENTRY_PROTOTYPE = cssm_acl_entry_prototype; -typedef CSSM_ACL_SUBJECT_CALLBACK - = ffi.Pointer>; -typedef CSSM_ACL_SUBJECT_CALLBACKFunction = CSSM_RETURN Function( - ffi.Pointer SubjectRequest, - CSSM_LIST_PTR SubjectResponse, - ffi.Pointer CallerContext, - ffi.Pointer MemFuncs); -typedef DartCSSM_ACL_SUBJECT_CALLBACKFunction = Dartsint32 Function( - ffi.Pointer SubjectRequest, - CSSM_LIST_PTR SubjectResponse, - ffi.Pointer CallerContext, - ffi.Pointer MemFuncs); -typedef CSSM_LIST_PTR = ffi.Pointer; + @UInt8() + external int byte5; -final class cssm_resource_control_context extends ffi.Struct { - external CSSM_ACCESS_CREDENTIALS_PTR AccessCred; + @UInt8() + external int byte6; - external CSSM_ACL_ENTRY_INPUT InitialAclEntry; -} + @UInt8() + external int byte7; -typedef CSSM_ACCESS_CREDENTIALS_PTR = ffi.Pointer; -typedef CSSM_ACL_ENTRY_INPUT = cssm_acl_entry_input; + @UInt8() + external int byte8; -final class cssm_acl_entry_info extends ffi.Struct { - external CSSM_ACL_ENTRY_PROTOTYPE EntryPublicInfo; + @UInt8() + external int byte9; - @CSSM_ACL_HANDLE() - external int EntryHandle; -} + @UInt8() + external int byte10; -typedef CSSM_ACL_HANDLE = CSSM_HANDLE; + @UInt8() + external int byte11; -final class cssm_acl_edit extends ffi.Struct { - @CSSM_ACL_EDIT_MODE() - external int EditMode; + @UInt8() + external int byte12; - @CSSM_ACL_HANDLE() - external int OldEntryHandle; + @UInt8() + external int byte13; - external ffi.Pointer NewEntry; + @UInt8() + external int byte14; + + @UInt8() + external int byte15; } -typedef CSSM_ACL_EDIT_MODE = uint32; +typedef CFUUIDRef = ffi.Pointer<__CFUUID>; -final class cssm_func_name_addr extends ffi.Struct { - @ffi.Array.multi([68]) - external ffi.Array Name; +final class __CFBundle extends ffi.Opaque {} - external CSSM_PROC_ADDR Address; -} +typedef CFBundleRef = ffi.Pointer<__CFBundle>; +typedef cpu_type_t = integer_t; +typedef CFPlugInRef = ffi.Pointer<__CFBundle>; +typedef CFBundleRefNum = ffi.Int; +typedef DartCFBundleRefNum = int; -typedef CSSM_PROC_ADDR - = ffi.Pointer>; -typedef CSSM_PROC_ADDRFunction = ffi.Void Function(); -typedef DartCSSM_PROC_ADDRFunction = void Function(); +final class __CFMessagePort extends ffi.Opaque {} -final class cssm_date extends ffi.Struct { - @ffi.Array.multi([4]) - external ffi.Array Year; +final class CFMessagePortContext extends ffi.Struct { + @CFIndex() + external int version; - @ffi.Array.multi([2]) - external ffi.Array Month; + external ffi.Pointer info; - @ffi.Array.multi([2]) - external ffi.Array Day; -} + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; -final class cssm_range extends ffi.Struct { - @uint32() - external int Min; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - @uint32() - external int Max; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -final class cssm_query_size_data extends ffi.Struct { - @uint32() - external int SizeInputBlock; - - @uint32() - external int SizeOutputBlock; -} +typedef CFMessagePortRef = ffi.Pointer<__CFMessagePort>; +typedef CFMessagePortCallBack + = ffi.Pointer>; +typedef CFMessagePortCallBackFunction = CFDataRef Function( + CFMessagePortRef local, + SInt32 msgid, + CFDataRef data, + ffi.Pointer info); +typedef DartCFMessagePortCallBackFunction = CFDataRef Function( + CFMessagePortRef local, + DartSInt32 msgid, + CFDataRef data, + ffi.Pointer info); +typedef CFMessagePortInvalidationCallBack = ffi + .Pointer>; +typedef CFMessagePortInvalidationCallBackFunction = ffi.Void Function( + CFMessagePortRef ms, ffi.Pointer info); +typedef DartCFMessagePortInvalidationCallBackFunction = void Function( + CFMessagePortRef ms, ffi.Pointer info); +typedef CFPlugInFactoryFunction + = ffi.Pointer>; +typedef CFPlugInFactoryFunctionFunction = ffi.Pointer Function( + CFAllocatorRef allocator, CFUUIDRef typeUUID); -final class cssm_key_size extends ffi.Struct { - @uint32() - external int LogicalKeySizeInBits; +final class __CFPlugInInstance extends ffi.Opaque {} - @uint32() - external int EffectiveKeySizeInBits; -} +typedef CFPlugInInstanceRef = ffi.Pointer<__CFPlugInInstance>; +typedef CFPlugInInstanceDeallocateInstanceDataFunction = ffi.Pointer< + ffi.NativeFunction>; +typedef CFPlugInInstanceDeallocateInstanceDataFunctionFunction = ffi.Void + Function(ffi.Pointer instanceData); +typedef DartCFPlugInInstanceDeallocateInstanceDataFunctionFunction = void + Function(ffi.Pointer instanceData); +typedef CFPlugInInstanceGetInterfaceFunction = ffi + .Pointer>; +typedef CFPlugInInstanceGetInterfaceFunctionFunction = Boolean Function( + CFPlugInInstanceRef instance, + CFStringRef interfaceName, + ffi.Pointer> ftbl); +typedef DartCFPlugInInstanceGetInterfaceFunctionFunction = DartBoolean Function( + CFPlugInInstanceRef instance, + CFStringRef interfaceName, + ffi.Pointer> ftbl); -final class cssm_keyheader extends ffi.Struct { - @CSSM_HEADERVERSION() - external int HeaderVersion; +final class __CFMachPort extends ffi.Opaque {} - external CSSM_GUID CspId; +final class CFMachPortContext extends ffi.Struct { + @CFIndex() + external int version; - @CSSM_KEYBLOB_TYPE() - external int BlobType; + external ffi.Pointer info; - @CSSM_KEYBLOB_FORMAT() - external int Format; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - @CSSM_ALGORITHMS() - external int AlgorithmId; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; - @CSSM_KEYCLASS() - external int KeyClass; + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; +} - @uint32() - external int LogicalKeySizeInBits; +typedef CFMachPortRef = ffi.Pointer<__CFMachPort>; +typedef CFMachPortCallBack + = ffi.Pointer>; +typedef CFMachPortCallBackFunction = ffi.Void Function(CFMachPortRef port, + ffi.Pointer msg, CFIndex size, ffi.Pointer info); +typedef DartCFMachPortCallBackFunction = void Function(CFMachPortRef port, + ffi.Pointer msg, DartCFIndex size, ffi.Pointer info); +typedef CFMachPortInvalidationCallBack + = ffi.Pointer>; +typedef CFMachPortInvalidationCallBackFunction = ffi.Void Function( + CFMachPortRef port, ffi.Pointer info); +typedef DartCFMachPortInvalidationCallBackFunction = void Function( + CFMachPortRef port, ffi.Pointer info); - @CSSM_KEYATTR_FLAGS() - external int KeyAttr; +final class __CFAttributedString extends ffi.Opaque {} - @CSSM_KEYUSE() - external int KeyUsage; +typedef CFAttributedStringRef = ffi.Pointer<__CFAttributedString>; +typedef CFMutableAttributedStringRef = ffi.Pointer<__CFAttributedString>; - external CSSM_DATE StartDate; +final class __CFURLEnumerator extends ffi.Opaque {} - external CSSM_DATE EndDate; +typedef CFURLEnumeratorRef = ffi.Pointer<__CFURLEnumerator>; - @CSSM_ALGORITHMS() - external int WrapAlgorithmId; +enum CFURLEnumeratorOptions { + kCFURLEnumeratorDefaultBehavior(0), + kCFURLEnumeratorDescendRecursively(1), + kCFURLEnumeratorSkipInvisibles(2), + kCFURLEnumeratorGenerateFileReferenceURLs(4), + kCFURLEnumeratorSkipPackageContents(8), + kCFURLEnumeratorIncludeDirectoriesPreOrder(16), + kCFURLEnumeratorIncludeDirectoriesPostOrder(32), + kCFURLEnumeratorGenerateRelativePathURLs(64); + + final int value; + const CFURLEnumeratorOptions(this.value); + + static CFURLEnumeratorOptions fromValue(int value) => switch (value) { + 0 => kCFURLEnumeratorDefaultBehavior, + 1 => kCFURLEnumeratorDescendRecursively, + 2 => kCFURLEnumeratorSkipInvisibles, + 4 => kCFURLEnumeratorGenerateFileReferenceURLs, + 8 => kCFURLEnumeratorSkipPackageContents, + 16 => kCFURLEnumeratorIncludeDirectoriesPreOrder, + 32 => kCFURLEnumeratorIncludeDirectoriesPostOrder, + 64 => kCFURLEnumeratorGenerateRelativePathURLs, + _ => throw ArgumentError( + "Unknown value for CFURLEnumeratorOptions: $value"), + }; +} + +enum CFURLEnumeratorResult { + kCFURLEnumeratorSuccess(1), + kCFURLEnumeratorEnd(2), + kCFURLEnumeratorError(3), + kCFURLEnumeratorDirectoryPostOrderSuccess(4); + + final int value; + const CFURLEnumeratorResult(this.value); + + static CFURLEnumeratorResult fromValue(int value) => switch (value) { + 1 => kCFURLEnumeratorSuccess, + 2 => kCFURLEnumeratorEnd, + 3 => kCFURLEnumeratorError, + 4 => kCFURLEnumeratorDirectoryPostOrderSuccess, + _ => throw ArgumentError( + "Unknown value for CFURLEnumeratorResult: $value"), + }; +} - @CSSM_ENCRYPT_MODE() - external int WrapMode; +final class guid_t extends ffi.Union { + @ffi.Array.multi([16]) + external ffi.Array g_guid; - @uint32() - external int Reserved; + @ffi.Array.multi([4]) + external ffi.Array g_guid_asint; } -typedef CSSM_HEADERVERSION = uint32; -typedef CSSM_KEYBLOB_TYPE = uint32; -typedef CSSM_KEYBLOB_FORMAT = uint32; -typedef CSSM_ALGORITHMS = uint32; -typedef CSSM_KEYCLASS = uint32; -typedef CSSM_KEYATTR_FLAGS = uint32; -typedef CSSM_KEYUSE = uint32; -typedef CSSM_DATE = cssm_date; -typedef CSSM_ENCRYPT_MODE = uint32; +@ffi.Packed(1) +final class ntsid_t extends ffi.Struct { + @u_int8_t() + external int sid_kind; -final class cssm_key extends ffi.Struct { - external CSSM_KEYHEADER KeyHeader; + @u_int8_t() + external int sid_authcount; - external SecAsn1Item KeyData; + @ffi.Array.multi([6]) + external ffi.Array sid_authority; + + @ffi.Array.multi([16]) + external ffi.Array sid_authorities; } -typedef CSSM_KEYHEADER = cssm_keyheader; +typedef u_int8_t = ffi.UnsignedChar; +typedef Dartu_int8_t = int; +typedef u_int32_t = ffi.UnsignedInt; +typedef Dartu_int32_t = int; -final class cssm_dl_db_handle extends ffi.Struct { - @CSSM_DL_HANDLE() - external int DLHandle; +final class kauth_identity_extlookup extends ffi.Struct { + @u_int32_t() + external int el_seqno; - @CSSM_DB_HANDLE() - external int DBHandle; -} + @u_int32_t() + external int el_result; -typedef CSSM_DL_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_DB_HANDLE = CSSM_MODULE_HANDLE; + @u_int32_t() + external int el_flags; -final class cssm_context_attribute extends ffi.Struct { - @CSSM_ATTRIBUTE_TYPE() - external int AttributeType; + @__darwin_pid_t() + external int el_info_pid; - @uint32() - external int AttributeLength; + @u_int64_t() + external int el_extend; - external cssm_context_attribute_value Attribute; -} + @u_int32_t() + external int el_info_reserved_1; -typedef CSSM_ATTRIBUTE_TYPE = uint32; + @uid_t() + external int el_uid; -final class cssm_context_attribute_value extends ffi.Union { - external ffi.Pointer String; + external guid_t el_uguid; - @uint32() - external int Uint32; + @u_int32_t() + external int el_uguid_valid; - external CSSM_ACCESS_CREDENTIALS_PTR AccessCredentials; + external ntsid_t el_usid; - external CSSM_KEY_PTR Key; + @u_int32_t() + external int el_usid_valid; - external CSSM_DATA_PTR Data; + @gid_t() + external int el_gid; - @CSSM_PADDING() - external int Padding; + external guid_t el_gguid; + + @u_int32_t() + external int el_gguid_valid; + + external ntsid_t el_gsid; + + @u_int32_t() + external int el_gsid_valid; - external CSSM_DATE_PTR Date; + @u_int32_t() + external int el_member_valid; - external CSSM_RANGE_PTR Range; + @u_int32_t() + external int el_sup_grp_cnt; - external CSSM_CRYPTO_DATA_PTR CryptoData; + @ffi.Array.multi([16]) + external ffi.Array el_sup_groups; +} - external CSSM_VERSION_PTR Version; +typedef u_int64_t = ffi.UnsignedLongLong; +typedef Dartu_int64_t = int; - external CSSM_DL_DB_HANDLE_PTR DLDBHandle; +final class kauth_cache_sizes extends ffi.Struct { + @u_int32_t() + external int kcs_group_size; - external ffi.Pointer KRProfile; + @u_int32_t() + external int kcs_id_size; } -typedef CSSM_KEY_PTR = ffi.Pointer; -typedef CSSM_PADDING = uint32; -typedef CSSM_DATE_PTR = ffi.Pointer; -typedef CSSM_RANGE_PTR = ffi.Pointer; -typedef CSSM_CRYPTO_DATA_PTR = ffi.Pointer; -typedef CSSM_VERSION_PTR = ffi.Pointer; -typedef CSSM_DL_DB_HANDLE_PTR = ffi.Pointer; +final class kauth_ace extends ffi.Struct { + external guid_t ace_applicable; -final class cssm_kr_profile extends ffi.Opaque {} + @u_int32_t() + external int ace_flags; -final class cssm_context extends ffi.Struct { - @CSSM_CONTEXT_TYPE() - external int ContextType; + @kauth_ace_rights_t() + external int ace_rights; +} - @CSSM_ALGORITHMS() - external int AlgorithmType; +typedef kauth_ace_rights_t = u_int32_t; - @uint32() - external int NumberOfAttributes; +final class kauth_acl extends ffi.Struct { + @u_int32_t() + external int acl_entrycount; - external CSSM_CONTEXT_ATTRIBUTE_PTR ContextAttributes; + @u_int32_t() + external int acl_flags; - @CSSM_CSP_HANDLE() - external int CSPHandle; + @ffi.Array.multi([1]) + external ffi.Array acl_ace; +} - @CSSM_BOOL() - external int Privileged; +final class kauth_filesec extends ffi.Struct { + @u_int32_t() + external int fsec_magic; - @uint32() - external int EncryptionProhibited; + external guid_t fsec_owner; - @uint32() - external int WorkFactor; + external guid_t fsec_group; - @uint32() - external int Reserved; + external kauth_acl fsec_acl; } -typedef CSSM_CONTEXT_TYPE = uint32; -typedef CSSM_CONTEXT_ATTRIBUTE_PTR = ffi.Pointer; -typedef CSSM_CSP_HANDLE = CSSM_MODULE_HANDLE; - -final class cssm_pkcs1_oaep_params extends ffi.Struct { - @uint32() - external int HashAlgorithm; +final class _acl extends ffi.Opaque {} - external SecAsn1Item HashParams; +final class _acl_entry extends ffi.Opaque {} - @CSSM_PKCS_OAEP_MGF() - external int MGF; +final class _acl_permset extends ffi.Opaque {} - external SecAsn1Item MGFParams; +final class _acl_flagset extends ffi.Opaque {} - @CSSM_PKCS_OAEP_PSOURCE() - external int PSource; +typedef acl_t = ffi.Pointer<_acl>; +typedef acl_entry_t = ffi.Pointer<_acl_entry>; - external SecAsn1Item PSourceParams; +enum acl_type_t { + ACL_TYPE_EXTENDED(256), + ACL_TYPE_ACCESS(0), + ACL_TYPE_DEFAULT(1), + ACL_TYPE_AFS(2), + ACL_TYPE_CODA(3), + ACL_TYPE_NTFS(4), + ACL_TYPE_NWFS(5); + + final int value; + const acl_type_t(this.value); + + static acl_type_t fromValue(int value) => switch (value) { + 256 => ACL_TYPE_EXTENDED, + 0 => ACL_TYPE_ACCESS, + 1 => ACL_TYPE_DEFAULT, + 2 => ACL_TYPE_AFS, + 3 => ACL_TYPE_CODA, + 4 => ACL_TYPE_NTFS, + 5 => ACL_TYPE_NWFS, + _ => throw ArgumentError("Unknown value for acl_type_t: $value"), + }; } -typedef CSSM_PKCS_OAEP_MGF = uint32; -typedef CSSM_PKCS_OAEP_PSOURCE = uint32; +typedef acl_permset_t = ffi.Pointer<_acl_permset>; -final class cssm_csp_operational_statistics extends ffi.Struct { - @CSSM_BOOL() - external int UserAuthenticated; +enum acl_perm_t { + ACL_READ_DATA(2), + ACL_WRITE_DATA(4), + ACL_EXECUTE(8), + ACL_DELETE(16), + ACL_APPEND_DATA(32), + ACL_DELETE_CHILD(64), + ACL_READ_ATTRIBUTES(128), + ACL_WRITE_ATTRIBUTES(256), + ACL_READ_EXTATTRIBUTES(512), + ACL_WRITE_EXTATTRIBUTES(1024), + ACL_READ_SECURITY(2048), + ACL_WRITE_SECURITY(4096), + ACL_CHANGE_OWNER(8192), + ACL_SYNCHRONIZE(1048576); + + static const ACL_LIST_DIRECTORY = ACL_READ_DATA; + static const ACL_ADD_FILE = ACL_WRITE_DATA; + static const ACL_SEARCH = ACL_EXECUTE; + static const ACL_ADD_SUBDIRECTORY = ACL_APPEND_DATA; + + final int value; + const acl_perm_t(this.value); + + static acl_perm_t fromValue(int value) => switch (value) { + 2 => ACL_READ_DATA, + 4 => ACL_WRITE_DATA, + 8 => ACL_EXECUTE, + 16 => ACL_DELETE, + 32 => ACL_APPEND_DATA, + 64 => ACL_DELETE_CHILD, + 128 => ACL_READ_ATTRIBUTES, + 256 => ACL_WRITE_ATTRIBUTES, + 512 => ACL_READ_EXTATTRIBUTES, + 1024 => ACL_WRITE_EXTATTRIBUTES, + 2048 => ACL_READ_SECURITY, + 4096 => ACL_WRITE_SECURITY, + 8192 => ACL_CHANGE_OWNER, + 1048576 => ACL_SYNCHRONIZE, + _ => throw ArgumentError("Unknown value for acl_perm_t: $value"), + }; - @CSSM_CSP_FLAGS() - external int DeviceFlags; + @override + String toString() { + if (this == ACL_READ_DATA) + return "acl_perm_t.ACL_READ_DATA, acl_perm_t.ACL_LIST_DIRECTORY"; + if (this == ACL_WRITE_DATA) + return "acl_perm_t.ACL_WRITE_DATA, acl_perm_t.ACL_ADD_FILE"; + if (this == ACL_EXECUTE) + return "acl_perm_t.ACL_EXECUTE, acl_perm_t.ACL_SEARCH"; + if (this == ACL_APPEND_DATA) + return "acl_perm_t.ACL_APPEND_DATA, acl_perm_t.ACL_ADD_SUBDIRECTORY"; + return super.toString(); + } +} - @uint32() - external int TokenMaxSessionCount; +typedef acl_permset_mask_t = u_int64_t; +typedef acl_flagset_t = ffi.Pointer<_acl_flagset>; - @uint32() - external int TokenOpenedSessionCount; +enum acl_flag_t { + ACL_FLAG_DEFER_INHERIT(1), + ACL_FLAG_NO_INHERIT(131072), + ACL_ENTRY_INHERITED(16), + ACL_ENTRY_FILE_INHERIT(32), + ACL_ENTRY_DIRECTORY_INHERIT(64), + ACL_ENTRY_LIMIT_INHERIT(128), + ACL_ENTRY_ONLY_INHERIT(256); + + final int value; + const acl_flag_t(this.value); + + static acl_flag_t fromValue(int value) => switch (value) { + 1 => ACL_FLAG_DEFER_INHERIT, + 131072 => ACL_FLAG_NO_INHERIT, + 16 => ACL_ENTRY_INHERITED, + 32 => ACL_ENTRY_FILE_INHERIT, + 64 => ACL_ENTRY_DIRECTORY_INHERIT, + 128 => ACL_ENTRY_LIMIT_INHERIT, + 256 => ACL_ENTRY_ONLY_INHERIT, + _ => throw ArgumentError("Unknown value for acl_flag_t: $value"), + }; +} + +enum acl_tag_t { + ACL_UNDEFINED_TAG(0), + ACL_EXTENDED_ALLOW(1), + ACL_EXTENDED_DENY(2); + + final int value; + const acl_tag_t(this.value); + + static acl_tag_t fromValue(int value) => switch (value) { + 0 => ACL_UNDEFINED_TAG, + 1 => ACL_EXTENDED_ALLOW, + 2 => ACL_EXTENDED_DENY, + _ => throw ArgumentError("Unknown value for acl_tag_t: $value"), + }; +} - @uint32() - external int TokenMaxRWSessionCount; +final class __CFFileSecurity extends ffi.Opaque {} - @uint32() - external int TokenOpenedRWSessionCount; +typedef CFFileSecurityRef = ffi.Pointer<__CFFileSecurity>; - @uint32() - external int TokenTotalPublicMem; +enum CFFileSecurityClearOptions { + kCFFileSecurityClearOwner(1), + kCFFileSecurityClearGroup(2), + kCFFileSecurityClearMode(4), + kCFFileSecurityClearOwnerUUID(8), + kCFFileSecurityClearGroupUUID(16), + kCFFileSecurityClearAccessControlList(32); + + final int value; + const CFFileSecurityClearOptions(this.value); + + static CFFileSecurityClearOptions fromValue(int value) => switch (value) { + 1 => kCFFileSecurityClearOwner, + 2 => kCFFileSecurityClearGroup, + 4 => kCFFileSecurityClearMode, + 8 => kCFFileSecurityClearOwnerUUID, + 16 => kCFFileSecurityClearGroupUUID, + 32 => kCFFileSecurityClearAccessControlList, + _ => throw ArgumentError( + "Unknown value for CFFileSecurityClearOptions: $value"), + }; +} - @uint32() - external int TokenFreePublicMem; +final class __CFStringTokenizer extends ffi.Opaque {} - @uint32() - external int TokenTotalPrivateMem; +typedef CFStringTokenizerRef = ffi.Pointer<__CFStringTokenizer>; - @uint32() - external int TokenFreePrivateMem; +enum CFStringTokenizerTokenType { + kCFStringTokenizerTokenNone(0), + kCFStringTokenizerTokenNormal(1), + kCFStringTokenizerTokenHasSubTokensMask(2), + kCFStringTokenizerTokenHasDerivedSubTokensMask(4), + kCFStringTokenizerTokenHasHasNumbersMask(8), + kCFStringTokenizerTokenHasNonLettersMask(16), + kCFStringTokenizerTokenIsCJWordMask(32); + + final int value; + const CFStringTokenizerTokenType(this.value); + + static CFStringTokenizerTokenType fromValue(int value) => switch (value) { + 0 => kCFStringTokenizerTokenNone, + 1 => kCFStringTokenizerTokenNormal, + 2 => kCFStringTokenizerTokenHasSubTokensMask, + 4 => kCFStringTokenizerTokenHasDerivedSubTokensMask, + 8 => kCFStringTokenizerTokenHasHasNumbersMask, + 16 => kCFStringTokenizerTokenHasNonLettersMask, + 32 => kCFStringTokenizerTokenIsCJWordMask, + _ => throw ArgumentError( + "Unknown value for CFStringTokenizerTokenType: $value"), + }; } -typedef CSSM_CSP_FLAGS = uint32; +final class __CFFileDescriptor extends ffi.Opaque {} -final class cssm_pkcs5_pbkdf1_params extends ffi.Struct { - external SecAsn1Item Passphrase; +final class CFFileDescriptorContext extends ffi.Struct { + @CFIndex() + external int version; - external SecAsn1Item InitVector; -} + external ffi.Pointer info; -final class cssm_pkcs5_pbkdf2_params extends ffi.Struct { - external SecAsn1Item Passphrase; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; - @CSSM_PKCS5_PBKDF2_PRF() - external int PseudoRandomFunction; + external ffi.Pointer< + ffi.NativeFunction info)>> + release; + + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } -typedef CSSM_PKCS5_PBKDF2_PRF = uint32; +typedef CFFileDescriptorRef = ffi.Pointer<__CFFileDescriptor>; +typedef CFFileDescriptorNativeDescriptor = ffi.Int; +typedef DartCFFileDescriptorNativeDescriptor = int; +typedef CFFileDescriptorCallBack + = ffi.Pointer>; +typedef CFFileDescriptorCallBackFunction = ffi.Void Function( + CFFileDescriptorRef f, + CFOptionFlags callBackTypes, + ffi.Pointer info); +typedef DartCFFileDescriptorCallBackFunction = void Function( + CFFileDescriptorRef f, + DartCFOptionFlags callBackTypes, + ffi.Pointer info); -final class cssm_kea_derive_params extends ffi.Struct { - external SecAsn1Item Rb; +final class __CFUserNotification extends ffi.Opaque {} - external SecAsn1Item Yb; -} +typedef CFUserNotificationRef = ffi.Pointer<__CFUserNotification>; +typedef CFUserNotificationCallBack + = ffi.Pointer>; +typedef CFUserNotificationCallBackFunction = ffi.Void Function( + CFUserNotificationRef userNotification, CFOptionFlags responseFlags); +typedef DartCFUserNotificationCallBackFunction = void Function( + CFUserNotificationRef userNotification, DartCFOptionFlags responseFlags); -final class cssm_tp_authority_id extends ffi.Struct { - external ffi.Pointer AuthorityCert; +final class __CFXMLNode extends ffi.Opaque {} - external CSSM_NET_ADDRESS_PTR AuthorityLocation; -} +final class CFXMLElementInfo extends ffi.Struct { + external CFDictionaryRef attributes; -typedef CSSM_NET_ADDRESS_PTR = ffi.Pointer; + external CFArrayRef attributeOrder; -final class cssm_field extends ffi.Struct { - external SecAsn1Oid FieldOid; + @Boolean() + external int isEmpty; - external SecAsn1Item FieldValue; + @ffi.Array.multi([3]) + external ffi.Array _reserved; } -final class cssm_tp_policyinfo extends ffi.Struct { - @uint32() - external int NumberOfPolicyIds; +final class CFXMLProcessingInstructionInfo extends ffi.Struct { + external CFStringRef dataString; +} - external CSSM_FIELD_PTR PolicyIds; +final class CFXMLDocumentInfo extends ffi.Struct { + external CFURLRef sourceURL; - external ffi.Pointer PolicyControl; + @CFStringEncoding() + external int encoding; } -typedef CSSM_FIELD_PTR = ffi.Pointer; - -final class cssm_dl_db_list extends ffi.Struct { - @uint32() - external int NumHandles; +final class CFXMLExternalID extends ffi.Struct { + external CFURLRef systemID; - external CSSM_DL_DB_HANDLE_PTR DLDBHandle; + external CFStringRef publicID; } -final class cssm_tp_callerauth_context extends ffi.Struct { - external CSSM_TP_POLICYINFO Policy; +final class CFXMLDocumentTypeInfo extends ffi.Struct { + external CFXMLExternalID externalID; +} - external CSSM_TIMESTRING VerifyTime; +final class CFXMLNotationInfo extends ffi.Struct { + external CFXMLExternalID externalID; +} - @CSSM_TP_STOP_ON() - external int VerificationAbortOn; +final class CFXMLElementTypeDeclarationInfo extends ffi.Struct { + external CFStringRef contentDescription; +} - external CSSM_TP_VERIFICATION_RESULTS_CALLBACK CallbackWithVerifiedCert; +final class CFXMLAttributeDeclarationInfo extends ffi.Struct { + external CFStringRef attributeName; - @uint32() - external int NumberOfAnchorCerts; + external CFStringRef typeString; - external CSSM_DATA_PTR AnchorCerts; + external CFStringRef defaultString; +} - external CSSM_DL_DB_LIST_PTR DBList; +final class CFXMLAttributeListDeclarationInfo extends ffi.Struct { + @CFIndex() + external int numberOfAttributes; - external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; + external ffi.Pointer attributes; } -typedef CSSM_TP_POLICYINFO = cssm_tp_policyinfo; -typedef CSSM_TIMESTRING = ffi.Pointer; -typedef CSSM_TP_STOP_ON = uint32; -typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACK = ffi - .Pointer>; -typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACKFunction = CSSM_RETURN Function( - CSSM_MODULE_HANDLE ModuleHandle, - ffi.Pointer CallerCtx, - CSSM_DATA_PTR VerifiedCert); -typedef DartCSSM_TP_VERIFICATION_RESULTS_CALLBACKFunction = Dartsint32 Function( - DartCSSM_INTPTR ModuleHandle, - ffi.Pointer CallerCtx, - CSSM_DATA_PTR VerifiedCert); -typedef CSSM_DL_DB_LIST_PTR = ffi.Pointer; +final class CFXMLEntityInfo extends ffi.Struct { + @CFIndex() + external int entityTypeAsInt; -final class cssm_encoded_crl extends ffi.Struct { - @CSSM_CRL_TYPE() - external int CrlType; + CFXMLEntityTypeCode get entityType => + CFXMLEntityTypeCode.fromValue(entityTypeAsInt); - @CSSM_CRL_ENCODING() - external int CrlEncoding; + external CFStringRef replacementText; - external SecAsn1Item CrlBlob; -} + external CFXMLExternalID entityID; -typedef CSSM_CRL_TYPE = uint32; -typedef CSSM_CRL_ENCODING = uint32; + external CFStringRef notationName; +} -final class cssm_parsed_crl extends ffi.Struct { - @CSSM_CRL_TYPE() - external int CrlType; +enum CFXMLEntityTypeCode { + kCFXMLEntityTypeParameter(0), + kCFXMLEntityTypeParsedInternal(1), + kCFXMLEntityTypeParsedExternal(2), + kCFXMLEntityTypeUnparsed(3), + kCFXMLEntityTypeCharacter(4); - @CSSM_CRL_PARSE_FORMAT() - external int ParsedCrlFormat; + final int value; + const CFXMLEntityTypeCode(this.value); - external ffi.Pointer ParsedCrl; + static CFXMLEntityTypeCode fromValue(int value) => switch (value) { + 0 => kCFXMLEntityTypeParameter, + 1 => kCFXMLEntityTypeParsedInternal, + 2 => kCFXMLEntityTypeParsedExternal, + 3 => kCFXMLEntityTypeUnparsed, + 4 => kCFXMLEntityTypeCharacter, + _ => + throw ArgumentError("Unknown value for CFXMLEntityTypeCode: $value"), + }; } -typedef CSSM_CRL_PARSE_FORMAT = uint32; +final class CFXMLEntityReferenceInfo extends ffi.Struct { + @CFIndex() + external int entityTypeAsInt; -final class cssm_crl_pair extends ffi.Struct { - external CSSM_ENCODED_CRL EncodedCrl; + CFXMLEntityTypeCode get entityType => + CFXMLEntityTypeCode.fromValue(entityTypeAsInt); +} - external CSSM_PARSED_CRL ParsedCrl; +typedef CFXMLNodeRef = ffi.Pointer<__CFXMLNode>; + +enum CFXMLNodeTypeCode { + kCFXMLNodeTypeDocument(1), + kCFXMLNodeTypeElement(2), + kCFXMLNodeTypeAttribute(3), + kCFXMLNodeTypeProcessingInstruction(4), + kCFXMLNodeTypeComment(5), + kCFXMLNodeTypeText(6), + kCFXMLNodeTypeCDATASection(7), + kCFXMLNodeTypeDocumentFragment(8), + kCFXMLNodeTypeEntity(9), + kCFXMLNodeTypeEntityReference(10), + kCFXMLNodeTypeDocumentType(11), + kCFXMLNodeTypeWhitespace(12), + kCFXMLNodeTypeNotation(13), + kCFXMLNodeTypeElementTypeDeclaration(14), + kCFXMLNodeTypeAttributeListDeclaration(15); + + final int value; + const CFXMLNodeTypeCode(this.value); + + static CFXMLNodeTypeCode fromValue(int value) => switch (value) { + 1 => kCFXMLNodeTypeDocument, + 2 => kCFXMLNodeTypeElement, + 3 => kCFXMLNodeTypeAttribute, + 4 => kCFXMLNodeTypeProcessingInstruction, + 5 => kCFXMLNodeTypeComment, + 6 => kCFXMLNodeTypeText, + 7 => kCFXMLNodeTypeCDATASection, + 8 => kCFXMLNodeTypeDocumentFragment, + 9 => kCFXMLNodeTypeEntity, + 10 => kCFXMLNodeTypeEntityReference, + 11 => kCFXMLNodeTypeDocumentType, + 12 => kCFXMLNodeTypeWhitespace, + 13 => kCFXMLNodeTypeNotation, + 14 => kCFXMLNodeTypeElementTypeDeclaration, + 15 => kCFXMLNodeTypeAttributeListDeclaration, + _ => throw ArgumentError("Unknown value for CFXMLNodeTypeCode: $value"), + }; } -typedef CSSM_ENCODED_CRL = cssm_encoded_crl; -typedef CSSM_PARSED_CRL = cssm_parsed_crl; +typedef CFXMLTreeRef = CFTreeRef; -final class cssm_crlgroup extends ffi.Struct { - @CSSM_CRL_TYPE() - external int CrlType; +final class __CFXMLParser extends ffi.Opaque {} - @CSSM_CRL_ENCODING() - external int CrlEncoding; +final class CFXMLParserCallBacks extends ffi.Struct { + @CFIndex() + external int version; - @uint32() - external int NumberOfCrls; + external CFXMLParserCreateXMLStructureCallBack createXMLStructure; - external UnnamedUnion4 GroupCrlList; + external CFXMLParserAddChildCallBack addChild; - @CSSM_CRLGROUP_TYPE() - external int CrlGroupType; -} + external CFXMLParserEndXMLStructureCallBack endXMLStructure; -final class UnnamedUnion4 extends ffi.Union { - external CSSM_DATA_PTR CrlList; + external CFXMLParserResolveExternalEntityCallBack resolveExternalEntity; - external CSSM_ENCODED_CRL_PTR EncodedCrlList; + external CFXMLParserHandleErrorCallBack handleError; +} - external CSSM_PARSED_CRL_PTR ParsedCrlList; +typedef CFXMLParserCreateXMLStructureCallBack = ffi + .Pointer>; +typedef CFXMLParserCreateXMLStructureCallBackFunction + = ffi.Pointer Function(CFXMLParserRef parser, + CFXMLNodeRef nodeDesc, ffi.Pointer info); +typedef CFXMLParserRef = ffi.Pointer<__CFXMLParser>; +typedef CFXMLParserAddChildCallBack + = ffi.Pointer>; +typedef CFXMLParserAddChildCallBackFunction = ffi.Void Function( + CFXMLParserRef parser, + ffi.Pointer parent, + ffi.Pointer child, + ffi.Pointer info); +typedef DartCFXMLParserAddChildCallBackFunction = void Function( + CFXMLParserRef parser, + ffi.Pointer parent, + ffi.Pointer child, + ffi.Pointer info); +typedef CFXMLParserEndXMLStructureCallBack = ffi + .Pointer>; +typedef CFXMLParserEndXMLStructureCallBackFunction = ffi.Void Function( + CFXMLParserRef parser, + ffi.Pointer xmlType, + ffi.Pointer info); +typedef DartCFXMLParserEndXMLStructureCallBackFunction = void Function( + CFXMLParserRef parser, + ffi.Pointer xmlType, + ffi.Pointer info); +typedef CFXMLParserResolveExternalEntityCallBack = ffi.Pointer< + ffi.NativeFunction>; +typedef CFXMLParserResolveExternalEntityCallBackFunction = CFDataRef Function( + CFXMLParserRef parser, + ffi.Pointer extID, + ffi.Pointer info); +typedef CFXMLParserHandleErrorCallBack + = ffi.Pointer>; +typedef CFXMLParserHandleErrorCallBackFunction = Boolean Function( + CFXMLParserRef parser, CFIndex error, ffi.Pointer info); +typedef DartCFXMLParserHandleErrorCallBackFunction = DartBoolean Function( + CFXMLParserRef parser, + CFXMLParserStatusCode error, + ffi.Pointer info); - external CSSM_CRL_PAIR_PTR PairCrlList; +enum CFXMLParserStatusCode { + kCFXMLStatusParseNotBegun(-2), + kCFXMLStatusParseInProgress(-1), + kCFXMLStatusParseSuccessful(0), + kCFXMLErrorUnexpectedEOF(1), + kCFXMLErrorUnknownEncoding(2), + kCFXMLErrorEncodingConversionFailure(3), + kCFXMLErrorMalformedProcessingInstruction(4), + kCFXMLErrorMalformedDTD(5), + kCFXMLErrorMalformedName(6), + kCFXMLErrorMalformedCDSect(7), + kCFXMLErrorMalformedCloseTag(8), + kCFXMLErrorMalformedStartTag(9), + kCFXMLErrorMalformedDocument(10), + kCFXMLErrorElementlessDocument(11), + kCFXMLErrorMalformedComment(12), + kCFXMLErrorMalformedCharacterReference(13), + kCFXMLErrorMalformedParsedCharacterData(14), + kCFXMLErrorNoData(15); + + final int value; + const CFXMLParserStatusCode(this.value); + + static CFXMLParserStatusCode fromValue(int value) => switch (value) { + -2 => kCFXMLStatusParseNotBegun, + -1 => kCFXMLStatusParseInProgress, + 0 => kCFXMLStatusParseSuccessful, + 1 => kCFXMLErrorUnexpectedEOF, + 2 => kCFXMLErrorUnknownEncoding, + 3 => kCFXMLErrorEncodingConversionFailure, + 4 => kCFXMLErrorMalformedProcessingInstruction, + 5 => kCFXMLErrorMalformedDTD, + 6 => kCFXMLErrorMalformedName, + 7 => kCFXMLErrorMalformedCDSect, + 8 => kCFXMLErrorMalformedCloseTag, + 9 => kCFXMLErrorMalformedStartTag, + 10 => kCFXMLErrorMalformedDocument, + 11 => kCFXMLErrorElementlessDocument, + 12 => kCFXMLErrorMalformedComment, + 13 => kCFXMLErrorMalformedCharacterReference, + 14 => kCFXMLErrorMalformedParsedCharacterData, + 15 => kCFXMLErrorNoData, + _ => throw ArgumentError( + "Unknown value for CFXMLParserStatusCode: $value"), + }; } -typedef CSSM_ENCODED_CRL_PTR = ffi.Pointer; -typedef CSSM_PARSED_CRL_PTR = ffi.Pointer; -typedef CSSM_CRL_PAIR_PTR = ffi.Pointer; -typedef CSSM_CRLGROUP_TYPE = uint32; +final class CFXMLParserContext extends ffi.Struct { + @CFIndex() + external int version; -final class cssm_fieldgroup extends ffi.Struct { - @ffi.Int() - external int NumberOfFields; + external ffi.Pointer info; - external CSSM_FIELD_PTR Fields; -} + external CFXMLParserRetainCallBack retain; -final class cssm_evidence extends ffi.Struct { - @CSSM_EVIDENCE_FORM() - external int EvidenceForm; + external CFXMLParserReleaseCallBack release; - external ffi.Pointer Evidence; + external CFXMLParserCopyDescriptionCallBack copyDescription; } -typedef CSSM_EVIDENCE_FORM = uint32; +typedef CFXMLParserRetainCallBack + = ffi.Pointer>; +typedef CFXMLParserRetainCallBackFunction = ffi.Pointer Function( + ffi.Pointer info); +typedef CFXMLParserReleaseCallBack + = ffi.Pointer>; +typedef CFXMLParserReleaseCallBackFunction = ffi.Void Function( + ffi.Pointer info); +typedef DartCFXMLParserReleaseCallBackFunction = void Function( + ffi.Pointer info); +typedef CFXMLParserCopyDescriptionCallBack = ffi + .Pointer>; +typedef CFXMLParserCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer info); -final class cssm_tp_verify_context extends ffi.Struct { - @CSSM_TP_ACTION() - external int Action; +final class cssm_data extends ffi.Struct { + @ffi.Size() + external int Length; - external SecAsn1Item ActionData; + external ffi.Pointer Data; +} - external CSSM_CRLGROUP Crls; +final class SecAsn1AlgId extends ffi.Struct { + external SecAsn1Oid algorithm; - external CSSM_TP_CALLERAUTH_CONTEXT_PTR Cred; + external SecAsn1Item parameters; } -typedef CSSM_TP_ACTION = uint32; -typedef CSSM_CRLGROUP = cssm_crlgroup; -typedef CSSM_TP_CALLERAUTH_CONTEXT_PTR - = ffi.Pointer; +typedef SecAsn1Oid = cssm_data; +typedef SecAsn1Item = cssm_data; -final class cssm_tp_verify_context_result extends ffi.Struct { - @uint32() - external int NumberOfEvidences; +final class SecAsn1PubKeyInfo extends ffi.Struct { + external SecAsn1AlgId algorithm; - external CSSM_EVIDENCE_PTR Evidence; + external SecAsn1Item subjectPublicKey; } -typedef CSSM_EVIDENCE_PTR = ffi.Pointer; +final class SecAsn1Template_struct extends ffi.Struct { + @ffi.Uint32() + external int kind; -final class cssm_tp_request_set extends ffi.Struct { - @uint32() - external int NumberOfRequests; + @ffi.Uint32() + external int offset; - external ffi.Pointer Requests; + external ffi.Pointer sub; + + @ffi.Uint32() + external int size; } -final class cssm_tp_result_set extends ffi.Struct { +final class cssm_guid extends ffi.Struct { @uint32() - external int NumberOfResults; + external int Data1; - external ffi.Pointer Results; -} + @uint16() + external int Data2; -final class cssm_tp_confirm_response extends ffi.Struct { - @uint32() - external int NumberOfResponses; + @uint16() + external int Data3; - external CSSM_TP_CONFIRM_STATUS_PTR Responses; + @ffi.Array.multi([8]) + external ffi.Array Data4; } -typedef CSSM_TP_CONFIRM_STATUS_PTR = ffi.Pointer; - -final class cssm_tp_certissue_input extends ffi.Struct { - external CSSM_SUBSERVICE_UID CSPSubserviceUid; +typedef uint32 = ffi.Uint32; +typedef Dartuint32 = int; +typedef uint16 = ffi.Uint16; +typedef Dartuint16 = int; +typedef uint8 = ffi.Uint8; +typedef Dartuint8 = int; - @CSSM_CL_HANDLE() - external int CLHandle; +final class cssm_version extends ffi.Struct { + @uint32() + external int Major; @uint32() - external int NumberOfTemplateFields; + external int Minor; +} - external CSSM_FIELD_PTR SubjectCertFields; +final class cssm_subservice_uid extends ffi.Struct { + external CSSM_GUID Guid; - @CSSM_TP_SERVICES() - external int MoreServiceRequests; + external CSSM_VERSION Version; @uint32() - external int NumberOfServiceControls; - - external CSSM_FIELD_PTR ServiceControls; + external int SubserviceId; - external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; + @CSSM_SERVICE_TYPE() + external int SubserviceType; } -typedef CSSM_TP_SERVICES = uint32; - -final class cssm_tp_certissue_output extends ffi.Struct { - @CSSM_TP_CERTISSUE_STATUS() - external int IssueStatus; +typedef CSSM_GUID = cssm_guid; +typedef CSSM_VERSION = cssm_version; +typedef CSSM_SERVICE_TYPE = CSSM_SERVICE_MASK; +typedef CSSM_SERVICE_MASK = uint32; - external CSSM_CERTGROUP_PTR CertGroup; +final class cssm_net_address extends ffi.Struct { + @CSSM_NET_ADDRESS_TYPE() + external int AddressType; - @CSSM_TP_SERVICES() - external int PerformedServiceRequests; + external SecAsn1Item Address; } -typedef CSSM_TP_CERTISSUE_STATUS = uint32; -typedef CSSM_CERTGROUP_PTR = ffi.Pointer; +typedef CSSM_NET_ADDRESS_TYPE = uint32; -final class cssm_tp_certchange_input extends ffi.Struct { - @CSSM_TP_CERTCHANGE_ACTION() - external int Action; +final class cssm_crypto_data extends ffi.Struct { + external SecAsn1Item Param; - @CSSM_TP_CERTCHANGE_REASON() - external int Reason; + external CSSM_CALLBACK Callback; - @CSSM_CL_HANDLE() - external int CLHandle; + external ffi.Pointer CallerCtx; +} + +typedef CSSM_CALLBACK = ffi.Pointer>; +typedef CSSM_CALLBACKFunction = CSSM_RETURN Function( + CSSM_DATA_PTR OutData, ffi.Pointer CallerCtx); +typedef DartCSSM_CALLBACKFunction = Dartsint32 Function( + CSSM_DATA_PTR OutData, ffi.Pointer CallerCtx); +typedef CSSM_RETURN = sint32; +typedef sint32 = ffi.Int32; +typedef Dartsint32 = int; +typedef CSSM_DATA_PTR = ffi.Pointer; - external CSSM_DATA_PTR Cert; +final class cssm_list_element extends ffi.Struct { + external ffi.Pointer NextElement; - external CSSM_FIELD_PTR ChangeInfo; + @CSSM_WORDID_TYPE() + external int WordID; - external CSSM_TIMESTRING StartTime; + @CSSM_LIST_ELEMENT_TYPE() + external int ElementType; - external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; + external UnnamedUnion2 Element; } -typedef CSSM_TP_CERTCHANGE_ACTION = uint32; -typedef CSSM_TP_CERTCHANGE_REASON = uint32; +typedef CSSM_WORDID_TYPE = sint32; +typedef CSSM_LIST_ELEMENT_TYPE = uint32; -final class cssm_tp_certchange_output extends ffi.Struct { - @CSSM_TP_CERTCHANGE_STATUS() - external int ActionStatus; +final class UnnamedUnion2 extends ffi.Union { + external CSSM_LIST Sublist; - external CSSM_FIELD RevokeInfo; + external SecAsn1Item Word; } -typedef CSSM_TP_CERTCHANGE_STATUS = uint32; -typedef CSSM_FIELD = cssm_field; +typedef CSSM_LIST = cssm_list; -final class cssm_tp_certverify_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; +final class cssm_list extends ffi.Struct { + @CSSM_LIST_TYPE() + external int ListType; - external CSSM_DATA_PTR Cert; + external CSSM_LIST_ELEMENT_PTR Head; - external CSSM_TP_VERIFY_CONTEXT_PTR VerifyContext; + external CSSM_LIST_ELEMENT_PTR Tail; } -typedef CSSM_TP_VERIFY_CONTEXT_PTR = ffi.Pointer; - -final class cssm_tp_certverify_output extends ffi.Struct { - @CSSM_TP_CERTVERIFY_STATUS() - external int VerifyStatus; - - @uint32() - external int NumberOfEvidence; +typedef CSSM_LIST_TYPE = uint32; +typedef CSSM_LIST_ELEMENT_PTR = ffi.Pointer; - external CSSM_EVIDENCE_PTR Evidence; -} +final class CSSM_TUPLE extends ffi.Struct { + external CSSM_LIST Issuer; -typedef CSSM_TP_CERTVERIFY_STATUS = uint32; + external CSSM_LIST Subject; -final class cssm_tp_certnotarize_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; + @CSSM_BOOL() + external int Delegate; - @uint32() - external int NumberOfFields; + external CSSM_LIST AuthorizationTag; - external CSSM_FIELD_PTR MoreFields; + external CSSM_LIST ValidityPeriod; +} - external CSSM_FIELD_PTR SignScope; +typedef CSSM_BOOL = sint32; +final class cssm_tuplegroup extends ffi.Struct { @uint32() - external int ScopeSize; + external int NumberOfTuples; - @CSSM_TP_SERVICES() - external int MoreServiceRequests; + external CSSM_TUPLE_PTR Tuples; +} - @uint32() - external int NumberOfServiceControls; +typedef CSSM_TUPLE_PTR = ffi.Pointer; - external CSSM_FIELD_PTR ServiceControls; +final class cssm_sample extends ffi.Struct { + external CSSM_LIST TypedSample; - external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; + external ffi.Pointer Verifier; } -final class cssm_tp_certnotarize_output extends ffi.Struct { - @CSSM_TP_CERTNOTARIZE_STATUS() - external int NotarizeStatus; +typedef CSSM_SUBSERVICE_UID = cssm_subservice_uid; - external CSSM_CERTGROUP_PTR NotarizedCertGroup; +final class cssm_samplegroup extends ffi.Struct { + @uint32() + external int NumberOfSamples; - @CSSM_TP_SERVICES() - external int PerformedServiceRequests; + external ffi.Pointer Samples; } -typedef CSSM_TP_CERTNOTARIZE_STATUS = uint32; +typedef CSSM_SAMPLE = cssm_sample; -final class cssm_tp_certreclaim_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; +final class cssm_memory_funcs extends ffi.Struct { + external CSSM_MALLOC malloc_func; - @uint32() - external int NumberOfSelectionFields; + external CSSM_FREE free_func; - external CSSM_FIELD_PTR SelectionFields; + external CSSM_REALLOC realloc_func; - external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; + external CSSM_CALLOC calloc_func; + + external ffi.Pointer AllocRef; } -final class cssm_tp_certreclaim_output extends ffi.Struct { - @CSSM_TP_CERTRECLAIM_STATUS() - external int ReclaimStatus; +typedef CSSM_MALLOC = ffi.Pointer>; +typedef CSSM_MALLOCFunction = ffi.Pointer Function( + CSSM_SIZE size, ffi.Pointer allocref); +typedef DartCSSM_MALLOCFunction = ffi.Pointer Function( + DartCSSM_SIZE size, ffi.Pointer allocref); +typedef CSSM_SIZE = ffi.Size; +typedef DartCSSM_SIZE = int; +typedef CSSM_FREE = ffi.Pointer>; +typedef CSSM_FREEFunction = ffi.Void Function( + ffi.Pointer memblock, ffi.Pointer allocref); +typedef DartCSSM_FREEFunction = void Function( + ffi.Pointer memblock, ffi.Pointer allocref); +typedef CSSM_REALLOC = ffi.Pointer>; +typedef CSSM_REALLOCFunction = ffi.Pointer Function( + ffi.Pointer memblock, + CSSM_SIZE size, + ffi.Pointer allocref); +typedef DartCSSM_REALLOCFunction = ffi.Pointer Function( + ffi.Pointer memblock, + DartCSSM_SIZE size, + ffi.Pointer allocref); +typedef CSSM_CALLOC = ffi.Pointer>; +typedef CSSM_CALLOCFunction = ffi.Pointer Function( + uint32 num, CSSM_SIZE size, ffi.Pointer allocref); +typedef DartCSSM_CALLOCFunction = ffi.Pointer Function( + Dartuint32 num, DartCSSM_SIZE size, ffi.Pointer allocref); - external CSSM_CERTGROUP_PTR ReclaimedCertGroup; +final class cssm_encoded_cert extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; - @CSSM_LONG_HANDLE() - external int KeyCacheHandle; + @CSSM_CERT_ENCODING() + external int CertEncoding; + + external SecAsn1Item CertBlob; } -typedef CSSM_TP_CERTRECLAIM_STATUS = uint32; -typedef CSSM_LONG_HANDLE = uint64; -typedef uint64 = ffi.Uint64; -typedef Dartuint64 = int; +typedef CSSM_CERT_TYPE = uint32; +typedef CSSM_CERT_ENCODING = uint32; -final class cssm_tp_crlissue_input extends ffi.Struct { - @CSSM_CL_HANDLE() - external int CLHandle; +final class cssm_parsed_cert extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; - @uint32() - external int CrlIdentifier; + @CSSM_CERT_PARSE_FORMAT() + external int ParsedCertFormat; - external CSSM_TIMESTRING CrlThisTime; + external ffi.Pointer ParsedCert; +} - external CSSM_FIELD_PTR PolicyIdentifier; +typedef CSSM_CERT_PARSE_FORMAT = uint32; - external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; +final class cssm_cert_pair extends ffi.Struct { + external CSSM_ENCODED_CERT EncodedCert; + + external CSSM_PARSED_CERT ParsedCert; } -final class cssm_tp_crlissue_output extends ffi.Struct { - @CSSM_TP_CRLISSUE_STATUS() - external int IssueStatus; +typedef CSSM_ENCODED_CERT = cssm_encoded_cert; +typedef CSSM_PARSED_CERT = cssm_parsed_cert; - external CSSM_ENCODED_CRL_PTR Crl; +final class cssm_certgroup extends ffi.Struct { + @CSSM_CERT_TYPE() + external int CertType; - external CSSM_TIMESTRING CrlNextTime; -} + @CSSM_CERT_ENCODING() + external int CertEncoding; -typedef CSSM_TP_CRLISSUE_STATUS = uint32; + @uint32() + external int NumCerts; -final class cssm_cert_bundle_header extends ffi.Struct { - @CSSM_CERT_BUNDLE_TYPE() - external int BundleType; + external UnnamedUnion3 GroupList; - @CSSM_CERT_BUNDLE_ENCODING() - external int BundleEncoding; + @CSSM_CERTGROUP_TYPE() + external int CertGroupType; + + external ffi.Pointer Reserved; } -typedef CSSM_CERT_BUNDLE_TYPE = uint32; -typedef CSSM_CERT_BUNDLE_ENCODING = uint32; +final class UnnamedUnion3 extends ffi.Union { + external CSSM_DATA_PTR CertList; -final class cssm_cert_bundle extends ffi.Struct { - external CSSM_CERT_BUNDLE_HEADER BundleHeader; + external CSSM_ENCODED_CERT_PTR EncodedCertList; - external SecAsn1Item Bundle; + external CSSM_PARSED_CERT_PTR ParsedCertList; + + external CSSM_CERT_PAIR_PTR PairCertList; } -typedef CSSM_CERT_BUNDLE_HEADER = cssm_cert_bundle_header; +typedef CSSM_ENCODED_CERT_PTR = ffi.Pointer; +typedef CSSM_PARSED_CERT_PTR = ffi.Pointer; +typedef CSSM_CERT_PAIR_PTR = ffi.Pointer; +typedef CSSM_CERTGROUP_TYPE = uint32; -final class cssm_db_attribute_info extends ffi.Struct { - @CSSM_DB_ATTRIBUTE_NAME_FORMAT() - external int AttributeNameFormat; +final class cssm_base_certs extends ffi.Struct { + @CSSM_TP_HANDLE() + external int TPHandle; - external cssm_db_attribute_label Label; + @CSSM_CL_HANDLE() + external int CLHandle; - @CSSM_DB_ATTRIBUTE_FORMAT() - external int AttributeFormat; + external CSSM_CERTGROUP Certs; } -typedef CSSM_DB_ATTRIBUTE_NAME_FORMAT = uint32; +typedef CSSM_TP_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_MODULE_HANDLE = CSSM_HANDLE; +typedef CSSM_HANDLE = CSSM_INTPTR; +typedef CSSM_INTPTR = ffi.IntPtr; +typedef DartCSSM_INTPTR = int; +typedef CSSM_CL_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_CERTGROUP = cssm_certgroup; -final class cssm_db_attribute_label extends ffi.Union { - external ffi.Pointer AttributeName; +final class cssm_access_credentials extends ffi.Struct { + @ffi.Array.multi([68]) + external ffi.Array EntryTag; - external SecAsn1Oid AttributeOID; + external CSSM_BASE_CERTS BaseCerts; - @uint32() - external int AttributeID; -} + external CSSM_SAMPLEGROUP Samples; -typedef CSSM_DB_ATTRIBUTE_FORMAT = uint32; + external CSSM_CHALLENGE_CALLBACK Callback; -final class cssm_db_attribute_data extends ffi.Struct { - external CSSM_DB_ATTRIBUTE_INFO Info; + external ffi.Pointer CallerCtx; +} + +typedef CSSM_BASE_CERTS = cssm_base_certs; +typedef CSSM_SAMPLEGROUP = cssm_samplegroup; +typedef CSSM_CHALLENGE_CALLBACK + = ffi.Pointer>; +typedef CSSM_CHALLENGE_CALLBACKFunction = CSSM_RETURN Function( + ffi.Pointer Challenge, + CSSM_SAMPLEGROUP_PTR Response, + ffi.Pointer CallerCtx, + ffi.Pointer MemFuncs); +typedef DartCSSM_CHALLENGE_CALLBACKFunction = Dartsint32 Function( + ffi.Pointer Challenge, + CSSM_SAMPLEGROUP_PTR Response, + ffi.Pointer CallerCtx, + ffi.Pointer MemFuncs); +typedef CSSM_SAMPLEGROUP_PTR = ffi.Pointer; +typedef CSSM_MEMORY_FUNCS = cssm_memory_funcs; +final class cssm_authorizationgroup extends ffi.Struct { @uint32() - external int NumberOfValues; + external int NumberOfAuthTags; - external CSSM_DATA_PTR Value; + external ffi.Pointer AuthTags; } -typedef CSSM_DB_ATTRIBUTE_INFO = cssm_db_attribute_info; - -final class cssm_db_record_attribute_info extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int DataRecordType; +typedef CSSM_ACL_AUTHORIZATION_TAG = sint32; - @uint32() - external int NumberOfAttributes; +final class cssm_acl_validity_period extends ffi.Struct { + external SecAsn1Item StartDate; - external CSSM_DB_ATTRIBUTE_INFO_PTR AttributeInfo; + external SecAsn1Item EndDate; } -typedef CSSM_DB_RECORDTYPE = uint32; -typedef CSSM_DB_ATTRIBUTE_INFO_PTR = ffi.Pointer; +final class cssm_acl_entry_prototype extends ffi.Struct { + external CSSM_LIST TypedSubject; -final class cssm_db_record_attribute_data extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int DataRecordType; + @CSSM_BOOL() + external int Delegate; - @uint32() - external int SemanticInformation; + external CSSM_AUTHORIZATIONGROUP Authorization; - @uint32() - external int NumberOfAttributes; + external CSSM_ACL_VALIDITY_PERIOD TimeRange; - external CSSM_DB_ATTRIBUTE_DATA_PTR AttributeData; + @ffi.Array.multi([68]) + external ffi.Array EntryTag; } -typedef CSSM_DB_ATTRIBUTE_DATA_PTR = ffi.Pointer; +typedef CSSM_AUTHORIZATIONGROUP = cssm_authorizationgroup; +typedef CSSM_ACL_VALIDITY_PERIOD = cssm_acl_validity_period; -final class cssm_db_parsing_module_info extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int RecordType; +final class cssm_acl_owner_prototype extends ffi.Struct { + external CSSM_LIST TypedSubject; - external CSSM_SUBSERVICE_UID ModuleSubserviceUid; + @CSSM_BOOL() + external int Delegate; } -final class cssm_db_index_info extends ffi.Struct { - @CSSM_DB_INDEX_TYPE() - external int IndexType; +final class cssm_acl_entry_input extends ffi.Struct { + external CSSM_ACL_ENTRY_PROTOTYPE Prototype; - @CSSM_DB_INDEXED_DATA_LOCATION() - external int IndexedDataLocation; + external CSSM_ACL_SUBJECT_CALLBACK Callback; - external CSSM_DB_ATTRIBUTE_INFO Info; + external ffi.Pointer CallerContext; } -typedef CSSM_DB_INDEX_TYPE = uint32; -typedef CSSM_DB_INDEXED_DATA_LOCATION = uint32; +typedef CSSM_ACL_ENTRY_PROTOTYPE = cssm_acl_entry_prototype; +typedef CSSM_ACL_SUBJECT_CALLBACK + = ffi.Pointer>; +typedef CSSM_ACL_SUBJECT_CALLBACKFunction = CSSM_RETURN Function( + ffi.Pointer SubjectRequest, + CSSM_LIST_PTR SubjectResponse, + ffi.Pointer CallerContext, + ffi.Pointer MemFuncs); +typedef DartCSSM_ACL_SUBJECT_CALLBACKFunction = Dartsint32 Function( + ffi.Pointer SubjectRequest, + CSSM_LIST_PTR SubjectResponse, + ffi.Pointer CallerContext, + ffi.Pointer MemFuncs); +typedef CSSM_LIST_PTR = ffi.Pointer; -final class cssm_db_unique_record extends ffi.Struct { - external CSSM_DB_INDEX_INFO RecordLocator; +final class cssm_resource_control_context extends ffi.Struct { + external CSSM_ACCESS_CREDENTIALS_PTR AccessCred; - external SecAsn1Item RecordIdentifier; + external CSSM_ACL_ENTRY_INPUT InitialAclEntry; } -typedef CSSM_DB_INDEX_INFO = cssm_db_index_info; - -final class cssm_db_record_index_info extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int DataRecordType; +typedef CSSM_ACCESS_CREDENTIALS_PTR = ffi.Pointer; +typedef CSSM_ACL_ENTRY_INPUT = cssm_acl_entry_input; - @uint32() - external int NumberOfIndexes; +final class cssm_acl_entry_info extends ffi.Struct { + external CSSM_ACL_ENTRY_PROTOTYPE EntryPublicInfo; - external CSSM_DB_INDEX_INFO_PTR IndexInfo; + @CSSM_ACL_HANDLE() + external int EntryHandle; } -typedef CSSM_DB_INDEX_INFO_PTR = ffi.Pointer; - -final class cssm_dbinfo extends ffi.Struct { - @uint32() - external int NumberOfRecordTypes; +typedef CSSM_ACL_HANDLE = CSSM_HANDLE; - external CSSM_DB_PARSING_MODULE_INFO_PTR DefaultParsingModules; +final class cssm_acl_edit extends ffi.Struct { + @CSSM_ACL_EDIT_MODE() + external int EditMode; - external CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR RecordAttributeNames; + @CSSM_ACL_HANDLE() + external int OldEntryHandle; - external CSSM_DB_RECORD_INDEX_INFO_PTR RecordIndexes; + external ffi.Pointer NewEntry; +} - @CSSM_BOOL() - external int IsLocal; +typedef CSSM_ACL_EDIT_MODE = uint32; - external ffi.Pointer AccessPath; +final class cssm_func_name_addr extends ffi.Struct { + @ffi.Array.multi([68]) + external ffi.Array Name; - external ffi.Pointer Reserved; + external CSSM_PROC_ADDR Address; } -typedef CSSM_DB_PARSING_MODULE_INFO_PTR - = ffi.Pointer; -typedef CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR - = ffi.Pointer; -typedef CSSM_DB_RECORD_INDEX_INFO_PTR = ffi.Pointer; +typedef CSSM_PROC_ADDR + = ffi.Pointer>; +typedef CSSM_PROC_ADDRFunction = ffi.Void Function(); +typedef DartCSSM_PROC_ADDRFunction = void Function(); -final class cssm_selection_predicate extends ffi.Struct { - @CSSM_DB_OPERATOR() - external int DbOperator; +final class cssm_date extends ffi.Struct { + @ffi.Array.multi([4]) + external ffi.Array Year; - external CSSM_DB_ATTRIBUTE_DATA Attribute; -} + @ffi.Array.multi([2]) + external ffi.Array Month; -typedef CSSM_DB_OPERATOR = uint32; -typedef CSSM_DB_ATTRIBUTE_DATA = cssm_db_attribute_data; + @ffi.Array.multi([2]) + external ffi.Array Day; +} -final class cssm_query_limits extends ffi.Struct { +final class cssm_range extends ffi.Struct { @uint32() - external int TimeLimit; + external int Min; @uint32() - external int SizeLimit; + external int Max; } -final class cssm_query extends ffi.Struct { - @CSSM_DB_RECORDTYPE() - external int RecordType; +final class cssm_query_size_data extends ffi.Struct { + @uint32() + external int SizeInputBlock; - @CSSM_DB_CONJUNCTIVE() - external int Conjunctive; + @uint32() + external int SizeOutputBlock; +} +final class cssm_key_size extends ffi.Struct { @uint32() - external int NumSelectionPredicates; + external int LogicalKeySizeInBits; - external CSSM_SELECTION_PREDICATE_PTR SelectionPredicate; + @uint32() + external int EffectiveKeySizeInBits; +} - external CSSM_QUERY_LIMITS QueryLimits; +final class cssm_keyheader extends ffi.Struct { + @CSSM_HEADERVERSION() + external int HeaderVersion; - @CSSM_QUERY_FLAGS() - external int QueryFlags; -} + external CSSM_GUID CspId; -typedef CSSM_DB_CONJUNCTIVE = uint32; -typedef CSSM_SELECTION_PREDICATE_PTR = ffi.Pointer; -typedef CSSM_QUERY_LIMITS = cssm_query_limits; -typedef CSSM_QUERY_FLAGS = uint32; + @CSSM_KEYBLOB_TYPE() + external int BlobType; -final class cssm_dl_pkcs11_attributes extends ffi.Struct { - @uint32() - external int DeviceAccessFlags; -} + @CSSM_KEYBLOB_FORMAT() + external int Format; -final class cssm_name_list extends ffi.Struct { - @uint32() - external int NumStrings; + @CSSM_ALGORITHMS() + external int AlgorithmId; - external ffi.Pointer> String; -} + @CSSM_KEYCLASS() + external int KeyClass; -final class cssm_db_schema_attribute_info extends ffi.Struct { @uint32() - external int AttributeId; + external int LogicalKeySizeInBits; - external ffi.Pointer AttributeName; + @CSSM_KEYATTR_FLAGS() + external int KeyAttr; - external SecAsn1Oid AttributeNameID; + @CSSM_KEYUSE() + external int KeyUsage; - @CSSM_DB_ATTRIBUTE_FORMAT() - external int DataType; -} + external CSSM_DATE StartDate; -final class cssm_db_schema_index_info extends ffi.Struct { - @uint32() - external int AttributeId; + external CSSM_DATE EndDate; + + @CSSM_ALGORITHMS() + external int WrapAlgorithmId; + + @CSSM_ENCRYPT_MODE() + external int WrapMode; @uint32() - external int IndexId; + external int Reserved; +} - @CSSM_DB_INDEX_TYPE() - external int IndexType; +typedef CSSM_HEADERVERSION = uint32; +typedef CSSM_KEYBLOB_TYPE = uint32; +typedef CSSM_KEYBLOB_FORMAT = uint32; +typedef CSSM_ALGORITHMS = uint32; +typedef CSSM_KEYCLASS = uint32; +typedef CSSM_KEYATTR_FLAGS = uint32; +typedef CSSM_KEYUSE = uint32; +typedef CSSM_DATE = cssm_date; +typedef CSSM_ENCRYPT_MODE = uint32; - @CSSM_DB_INDEXED_DATA_LOCATION() - external int IndexedDataLocation; +final class cssm_key extends ffi.Struct { + external CSSM_KEYHEADER KeyHeader; + + external SecAsn1Item KeyData; } -final class cssm_x509_type_value_pair extends ffi.Struct { - external SecAsn1Oid type; +typedef CSSM_KEYHEADER = cssm_keyheader; - @CSSM_BER_TAG() - external int valueType; +final class cssm_dl_db_handle extends ffi.Struct { + @CSSM_DL_HANDLE() + external int DLHandle; - external SecAsn1Item value; + @CSSM_DB_HANDLE() + external int DBHandle; } -typedef CSSM_BER_TAG = uint8; +typedef CSSM_DL_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_DB_HANDLE = CSSM_MODULE_HANDLE; + +final class cssm_context_attribute extends ffi.Struct { + @CSSM_ATTRIBUTE_TYPE() + external int AttributeType; -final class cssm_x509_rdn extends ffi.Struct { @uint32() - external int numberOfPairs; + external int AttributeLength; - external CSSM_X509_TYPE_VALUE_PAIR_PTR AttributeTypeAndValue; + external cssm_context_attribute_value Attribute; } -typedef CSSM_X509_TYPE_VALUE_PAIR_PTR = ffi.Pointer; +typedef CSSM_ATTRIBUTE_TYPE = uint32; + +final class cssm_context_attribute_value extends ffi.Union { + external ffi.Pointer String; -final class cssm_x509_name extends ffi.Struct { @uint32() - external int numberOfRDNs; + external int Uint32; - external CSSM_X509_RDN_PTR RelativeDistinguishedName; -} + external CSSM_ACCESS_CREDENTIALS_PTR AccessCredentials; -typedef CSSM_X509_RDN_PTR = ffi.Pointer; + external CSSM_KEY_PTR Key; -final class cssm_x509_time extends ffi.Struct { - @CSSM_BER_TAG() - external int timeType; + external CSSM_DATA_PTR Data; - external SecAsn1Item time; -} + @CSSM_PADDING() + external int Padding; -final class x509_validity extends ffi.Struct { - external CSSM_X509_TIME notBefore; + external CSSM_DATE_PTR Date; - external CSSM_X509_TIME notAfter; -} + external CSSM_RANGE_PTR Range; -typedef CSSM_X509_TIME = cssm_x509_time; + external CSSM_CRYPTO_DATA_PTR CryptoData; -final class cssm_x509ext_basicConstraints extends ffi.Struct { - @CSSM_BOOL() - external int cA; + external CSSM_VERSION_PTR Version; - @CSSM_X509_OPTION() - external int pathLenConstraintPresent; + external CSSM_DL_DB_HANDLE_PTR DLDBHandle; - @uint32() - external int pathLenConstraint; + external ffi.Pointer KRProfile; } -typedef CSSM_X509_OPTION = CSSM_BOOL; - -abstract class extension_data_format { - static const int CSSM_X509_DATAFORMAT_ENCODED = 0; - static const int CSSM_X509_DATAFORMAT_PARSED = 1; - static const int CSSM_X509_DATAFORMAT_PAIR = 2; -} +typedef CSSM_KEY_PTR = ffi.Pointer; +typedef CSSM_PADDING = uint32; +typedef CSSM_DATE_PTR = ffi.Pointer; +typedef CSSM_RANGE_PTR = ffi.Pointer; +typedef CSSM_CRYPTO_DATA_PTR = ffi.Pointer; +typedef CSSM_VERSION_PTR = ffi.Pointer; +typedef CSSM_DL_DB_HANDLE_PTR = ffi.Pointer; -final class cssm_x509_extensionTagAndValue extends ffi.Struct { - @CSSM_BER_TAG() - external int type; +final class cssm_kr_profile extends ffi.Opaque {} - external SecAsn1Item value; -} +final class cssm_context extends ffi.Struct { + @CSSM_CONTEXT_TYPE() + external int ContextType; -final class cssm_x509ext_pair extends ffi.Struct { - external CSSM_X509EXT_TAGandVALUE tagAndValue; + @CSSM_ALGORITHMS() + external int AlgorithmType; - external ffi.Pointer parsedValue; -} + @uint32() + external int NumberOfAttributes; -typedef CSSM_X509EXT_TAGandVALUE = cssm_x509_extensionTagAndValue; + external CSSM_CONTEXT_ATTRIBUTE_PTR ContextAttributes; -final class cssm_x509_extension extends ffi.Struct { - external SecAsn1Oid extnId; + @CSSM_CSP_HANDLE() + external int CSPHandle; @CSSM_BOOL() - external int critical; + external int Privileged; - @ffi.Int32() - external int format; + @uint32() + external int EncryptionProhibited; - external cssm_x509ext_value value; + @uint32() + external int WorkFactor; - external SecAsn1Item BERvalue; + @uint32() + external int Reserved; } -final class cssm_x509ext_value extends ffi.Union { - external ffi.Pointer tagAndValue; +typedef CSSM_CONTEXT_TYPE = uint32; +typedef CSSM_CONTEXT_ATTRIBUTE_PTR = ffi.Pointer; +typedef CSSM_CSP_HANDLE = CSSM_MODULE_HANDLE; - external ffi.Pointer parsedValue; +final class cssm_pkcs1_oaep_params extends ffi.Struct { + @uint32() + external int HashAlgorithm; - external ffi.Pointer valuePair; -} + external SecAsn1Item HashParams; -typedef CSSM_X509EXT_PAIR = cssm_x509ext_pair; + @CSSM_PKCS_OAEP_MGF() + external int MGF; -final class cssm_x509_extensions extends ffi.Struct { - @uint32() - external int numberOfExtensions; + external SecAsn1Item MGFParams; - external CSSM_X509_EXTENSION_PTR extensions; + @CSSM_PKCS_OAEP_PSOURCE() + external int PSource; + + external SecAsn1Item PSourceParams; } -typedef CSSM_X509_EXTENSION_PTR = ffi.Pointer; +typedef CSSM_PKCS_OAEP_MGF = uint32; +typedef CSSM_PKCS_OAEP_PSOURCE = uint32; -final class cssm_x509_tbs_certificate extends ffi.Struct { - external SecAsn1Item version; +final class cssm_csp_operational_statistics extends ffi.Struct { + @CSSM_BOOL() + external int UserAuthenticated; - external SecAsn1Item serialNumber; + @CSSM_CSP_FLAGS() + external int DeviceFlags; - external SecAsn1AlgId signature; + @uint32() + external int TokenMaxSessionCount; - external CSSM_X509_NAME issuer; + @uint32() + external int TokenOpenedSessionCount; - external CSSM_X509_VALIDITY validity; + @uint32() + external int TokenMaxRWSessionCount; - external CSSM_X509_NAME subject; + @uint32() + external int TokenOpenedRWSessionCount; - external SecAsn1PubKeyInfo subjectPublicKeyInfo; + @uint32() + external int TokenTotalPublicMem; - external SecAsn1Item issuerUniqueIdentifier; + @uint32() + external int TokenFreePublicMem; - external SecAsn1Item subjectUniqueIdentifier; + @uint32() + external int TokenTotalPrivateMem; - external CSSM_X509_EXTENSIONS extensions; + @uint32() + external int TokenFreePrivateMem; } -typedef CSSM_X509_NAME = cssm_x509_name; -typedef CSSM_X509_VALIDITY = x509_validity; -typedef CSSM_X509_EXTENSIONS = cssm_x509_extensions; +typedef CSSM_CSP_FLAGS = uint32; -final class cssm_x509_signature extends ffi.Struct { - external SecAsn1AlgId algorithmIdentifier; +final class cssm_pkcs5_pbkdf1_params extends ffi.Struct { + external SecAsn1Item Passphrase; - external SecAsn1Item encrypted; + external SecAsn1Item InitVector; } -final class cssm_x509_signed_certificate extends ffi.Struct { - external CSSM_X509_TBS_CERTIFICATE certificate; +final class cssm_pkcs5_pbkdf2_params extends ffi.Struct { + external SecAsn1Item Passphrase; - external CSSM_X509_SIGNATURE signature; + @CSSM_PKCS5_PBKDF2_PRF() + external int PseudoRandomFunction; } -typedef CSSM_X509_TBS_CERTIFICATE = cssm_x509_tbs_certificate; -typedef CSSM_X509_SIGNATURE = cssm_x509_signature; +typedef CSSM_PKCS5_PBKDF2_PRF = uint32; -final class cssm_x509ext_policyQualifierInfo extends ffi.Struct { - external SecAsn1Oid policyQualifierId; +final class cssm_kea_derive_params extends ffi.Struct { + external SecAsn1Item Rb; - external SecAsn1Item value; + external SecAsn1Item Yb; } -final class cssm_x509ext_policyQualifiers extends ffi.Struct { - @uint32() - external int numberOfPolicyQualifiers; +final class cssm_tp_authority_id extends ffi.Struct { + external ffi.Pointer AuthorityCert; - external ffi.Pointer policyQualifier; + external CSSM_NET_ADDRESS_PTR AuthorityLocation; } -typedef CSSM_X509EXT_POLICYQUALIFIERINFO = cssm_x509ext_policyQualifierInfo; +typedef CSSM_NET_ADDRESS_PTR = ffi.Pointer; -final class cssm_x509ext_policyInfo extends ffi.Struct { - external SecAsn1Oid policyIdentifier; +final class cssm_field extends ffi.Struct { + external SecAsn1Oid FieldOid; - external CSSM_X509EXT_POLICYQUALIFIERS policyQualifiers; + external SecAsn1Item FieldValue; } -typedef CSSM_X509EXT_POLICYQUALIFIERS = cssm_x509ext_policyQualifiers; - -final class cssm_x509_revoked_cert_entry extends ffi.Struct { - external SecAsn1Item certificateSerialNumber; +final class cssm_tp_policyinfo extends ffi.Struct { + @uint32() + external int NumberOfPolicyIds; - external CSSM_X509_TIME revocationDate; + external CSSM_FIELD_PTR PolicyIds; - external CSSM_X509_EXTENSIONS extensions; + external ffi.Pointer PolicyControl; } -final class cssm_x509_revoked_cert_list extends ffi.Struct { +typedef CSSM_FIELD_PTR = ffi.Pointer; + +final class cssm_dl_db_list extends ffi.Struct { @uint32() - external int numberOfRevokedCertEntries; + external int NumHandles; - external CSSM_X509_REVOKED_CERT_ENTRY_PTR revokedCertEntry; + external CSSM_DL_DB_HANDLE_PTR DLDBHandle; } -typedef CSSM_X509_REVOKED_CERT_ENTRY_PTR - = ffi.Pointer; +final class cssm_tp_callerauth_context extends ffi.Struct { + external CSSM_TP_POLICYINFO Policy; -final class cssm_x509_tbs_certlist extends ffi.Struct { - external SecAsn1Item version; + external CSSM_TIMESTRING VerifyTime; - external SecAsn1AlgId signature; + @CSSM_TP_STOP_ON() + external int VerificationAbortOn; - external CSSM_X509_NAME issuer; + external CSSM_TP_VERIFICATION_RESULTS_CALLBACK CallbackWithVerifiedCert; - external CSSM_X509_TIME thisUpdate; + @uint32() + external int NumberOfAnchorCerts; - external CSSM_X509_TIME nextUpdate; + external CSSM_DATA_PTR AnchorCerts; - external CSSM_X509_REVOKED_CERT_LIST_PTR revokedCertificates; + external CSSM_DL_DB_LIST_PTR DBList; - external CSSM_X509_EXTENSIONS extensions; + external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } -typedef CSSM_X509_REVOKED_CERT_LIST_PTR - = ffi.Pointer; +typedef CSSM_TP_POLICYINFO = cssm_tp_policyinfo; +typedef CSSM_TIMESTRING = ffi.Pointer; +typedef CSSM_TP_STOP_ON = uint32; +typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACK = ffi + .Pointer>; +typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACKFunction = CSSM_RETURN Function( + CSSM_MODULE_HANDLE ModuleHandle, + ffi.Pointer CallerCtx, + CSSM_DATA_PTR VerifiedCert); +typedef DartCSSM_TP_VERIFICATION_RESULTS_CALLBACKFunction = Dartsint32 Function( + DartCSSM_INTPTR ModuleHandle, + ffi.Pointer CallerCtx, + CSSM_DATA_PTR VerifiedCert); +typedef CSSM_DL_DB_LIST_PTR = ffi.Pointer; -final class cssm_x509_signed_crl extends ffi.Struct { - external CSSM_X509_TBS_CERTLIST tbsCertList; +final class cssm_encoded_crl extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; - external CSSM_X509_SIGNATURE signature; + @CSSM_CRL_ENCODING() + external int CrlEncoding; + + external SecAsn1Item CrlBlob; } -typedef CSSM_X509_TBS_CERTLIST = cssm_x509_tbs_certlist; +typedef CSSM_CRL_TYPE = uint32; +typedef CSSM_CRL_ENCODING = uint32; -abstract class __CE_GeneralNameType { - static const int GNT_OtherName = 0; - static const int GNT_RFC822Name = 1; - static const int GNT_DNSName = 2; - static const int GNT_X400Address = 3; - static const int GNT_DirectoryName = 4; - static const int GNT_EdiPartyName = 5; - static const int GNT_URI = 6; - static const int GNT_IPAddress = 7; - static const int GNT_RegisteredID = 8; -} +final class cssm_parsed_crl extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; -final class __CE_OtherName extends ffi.Struct { - external SecAsn1Oid typeId; + @CSSM_CRL_PARSE_FORMAT() + external int ParsedCrlFormat; - external SecAsn1Item value; + external ffi.Pointer ParsedCrl; } -final class __CE_GeneralName extends ffi.Struct { - @ffi.Int32() - external int nameType; +typedef CSSM_CRL_PARSE_FORMAT = uint32; - @CSSM_BOOL() - external int berEncoded; +final class cssm_crl_pair extends ffi.Struct { + external CSSM_ENCODED_CRL EncodedCrl; - external SecAsn1Item name; + external CSSM_PARSED_CRL ParsedCrl; } -final class __CE_GeneralNames extends ffi.Struct { - @uint32() - external int numNames; +typedef CSSM_ENCODED_CRL = cssm_encoded_crl; +typedef CSSM_PARSED_CRL = cssm_parsed_crl; - external ffi.Pointer generalName; -} +final class cssm_crlgroup extends ffi.Struct { + @CSSM_CRL_TYPE() + external int CrlType; -typedef CE_GeneralName = __CE_GeneralName; + @CSSM_CRL_ENCODING() + external int CrlEncoding; -final class __CE_AuthorityKeyID extends ffi.Struct { - @CSSM_BOOL() - external int keyIdentifierPresent; + @uint32() + external int NumberOfCrls; - external SecAsn1Item keyIdentifier; + external UnnamedUnion4 GroupCrlList; - @CSSM_BOOL() - external int generalNamesPresent; + @CSSM_CRLGROUP_TYPE() + external int CrlGroupType; +} - external ffi.Pointer generalNames; +final class UnnamedUnion4 extends ffi.Union { + external CSSM_DATA_PTR CrlList; - @CSSM_BOOL() - external int serialNumberPresent; + external CSSM_ENCODED_CRL_PTR EncodedCrlList; - external SecAsn1Item serialNumber; + external CSSM_PARSED_CRL_PTR ParsedCrlList; + + external CSSM_CRL_PAIR_PTR PairCrlList; } -typedef CE_GeneralNames = __CE_GeneralNames; +typedef CSSM_ENCODED_CRL_PTR = ffi.Pointer; +typedef CSSM_PARSED_CRL_PTR = ffi.Pointer; +typedef CSSM_CRL_PAIR_PTR = ffi.Pointer; +typedef CSSM_CRLGROUP_TYPE = uint32; -final class __CE_ExtendedKeyUsage extends ffi.Struct { - @uint32() - external int numPurposes; +final class cssm_fieldgroup extends ffi.Struct { + @ffi.Int() + external int NumberOfFields; - external CSSM_OID_PTR purposes; + external CSSM_FIELD_PTR Fields; } -typedef CSSM_OID_PTR = ffi.Pointer; +final class cssm_evidence extends ffi.Struct { + @CSSM_EVIDENCE_FORM() + external int EvidenceForm; -final class __CE_BasicConstraints extends ffi.Struct { - @CSSM_BOOL() - external int cA; + external ffi.Pointer Evidence; +} - @CSSM_BOOL() - external int pathLenConstraintPresent; +typedef CSSM_EVIDENCE_FORM = uint32; - @uint32() - external int pathLenConstraint; -} +final class cssm_tp_verify_context extends ffi.Struct { + @CSSM_TP_ACTION() + external int Action; -final class __CE_PolicyQualifierInfo extends ffi.Struct { - external SecAsn1Oid policyQualifierId; + external SecAsn1Item ActionData; - external SecAsn1Item qualifier; + external CSSM_CRLGROUP Crls; + + external CSSM_TP_CALLERAUTH_CONTEXT_PTR Cred; } -final class __CE_PolicyInformation extends ffi.Struct { - external SecAsn1Oid certPolicyId; +typedef CSSM_TP_ACTION = uint32; +typedef CSSM_CRLGROUP = cssm_crlgroup; +typedef CSSM_TP_CALLERAUTH_CONTEXT_PTR + = ffi.Pointer; +final class cssm_tp_verify_context_result extends ffi.Struct { @uint32() - external int numPolicyQualifiers; + external int NumberOfEvidences; - external ffi.Pointer policyQualifiers; + external CSSM_EVIDENCE_PTR Evidence; } -typedef CE_PolicyQualifierInfo = __CE_PolicyQualifierInfo; +typedef CSSM_EVIDENCE_PTR = ffi.Pointer; -final class __CE_CertPolicies extends ffi.Struct { +final class cssm_tp_request_set extends ffi.Struct { @uint32() - external int numPolicies; + external int NumberOfRequests; - external ffi.Pointer policies; + external ffi.Pointer Requests; } -typedef CE_PolicyInformation = __CE_PolicyInformation; +final class cssm_tp_result_set extends ffi.Struct { + @uint32() + external int NumberOfResults; -abstract class __CE_CrlDistributionPointNameType { - static const int CE_CDNT_FullName = 0; - static const int CE_CDNT_NameRelativeToCrlIssuer = 1; + external ffi.Pointer Results; } -final class __CE_DistributionPointName extends ffi.Struct { - @ffi.Int32() - external int nameType; +final class cssm_tp_confirm_response extends ffi.Struct { + @uint32() + external int NumberOfResponses; - external UnnamedUnion5 dpn; + external CSSM_TP_CONFIRM_STATUS_PTR Responses; } -final class UnnamedUnion5 extends ffi.Union { - external ffi.Pointer fullName; - - external CSSM_X509_RDN_PTR rdn; -} +typedef CSSM_TP_CONFIRM_STATUS_PTR = ffi.Pointer; -final class __CE_CRLDistributionPoint extends ffi.Struct { - external ffi.Pointer distPointName; +final class cssm_tp_certissue_input extends ffi.Struct { + external CSSM_SUBSERVICE_UID CSPSubserviceUid; - @CSSM_BOOL() - external int reasonsPresent; + @CSSM_CL_HANDLE() + external int CLHandle; - @CE_CrlDistReasonFlags() - external int reasons; + @uint32() + external int NumberOfTemplateFields; - external ffi.Pointer crlIssuer; -} + external CSSM_FIELD_PTR SubjectCertFields; -typedef CE_DistributionPointName = __CE_DistributionPointName; -typedef CE_CrlDistReasonFlags = uint8; + @CSSM_TP_SERVICES() + external int MoreServiceRequests; -final class __CE_CRLDistPointsSyntax extends ffi.Struct { @uint32() - external int numDistPoints; + external int NumberOfServiceControls; - external ffi.Pointer distPoints; -} + external CSSM_FIELD_PTR ServiceControls; -typedef CE_CRLDistributionPoint = __CE_CRLDistributionPoint; + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; +} -final class __CE_AccessDescription extends ffi.Struct { - external SecAsn1Oid accessMethod; +typedef CSSM_TP_SERVICES = uint32; - external CE_GeneralName accessLocation; -} +final class cssm_tp_certissue_output extends ffi.Struct { + @CSSM_TP_CERTISSUE_STATUS() + external int IssueStatus; -final class __CE_AuthorityInfoAccess extends ffi.Struct { - @uint32() - external int numAccessDescriptions; + external CSSM_CERTGROUP_PTR CertGroup; - external ffi.Pointer accessDescriptions; + @CSSM_TP_SERVICES() + external int PerformedServiceRequests; } -typedef CE_AccessDescription = __CE_AccessDescription; +typedef CSSM_TP_CERTISSUE_STATUS = uint32; +typedef CSSM_CERTGROUP_PTR = ffi.Pointer; -final class __CE_SemanticsInformation extends ffi.Struct { - external ffi.Pointer semanticsIdentifier; +final class cssm_tp_certchange_input extends ffi.Struct { + @CSSM_TP_CERTCHANGE_ACTION() + external int Action; - external ffi.Pointer - nameRegistrationAuthorities; -} + @CSSM_TP_CERTCHANGE_REASON() + external int Reason; -typedef CE_NameRegistrationAuthorities = CE_GeneralNames; + @CSSM_CL_HANDLE() + external int CLHandle; -final class __CE_QC_Statement extends ffi.Struct { - external SecAsn1Oid statementId; + external CSSM_DATA_PTR Cert; - external ffi.Pointer semanticsInfo; + external CSSM_FIELD_PTR ChangeInfo; - external ffi.Pointer otherInfo; + external CSSM_TIMESTRING StartTime; + + external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } -typedef CE_SemanticsInformation = __CE_SemanticsInformation; +typedef CSSM_TP_CERTCHANGE_ACTION = uint32; +typedef CSSM_TP_CERTCHANGE_REASON = uint32; -final class __CE_QC_Statements extends ffi.Struct { - @uint32() - external int numQCStatements; +final class cssm_tp_certchange_output extends ffi.Struct { + @CSSM_TP_CERTCHANGE_STATUS() + external int ActionStatus; - external ffi.Pointer qcStatements; + external CSSM_FIELD RevokeInfo; } -typedef CE_QC_Statement = __CE_QC_Statement; - -final class __CE_IssuingDistributionPoint extends ffi.Struct { - external ffi.Pointer distPointName; - - @CSSM_BOOL() - external int onlyUserCertsPresent; +typedef CSSM_TP_CERTCHANGE_STATUS = uint32; +typedef CSSM_FIELD = cssm_field; - @CSSM_BOOL() - external int onlyUserCerts; +final class cssm_tp_certverify_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; - @CSSM_BOOL() - external int onlyCACertsPresent; + external CSSM_DATA_PTR Cert; - @CSSM_BOOL() - external int onlyCACerts; + external CSSM_TP_VERIFY_CONTEXT_PTR VerifyContext; +} - @CSSM_BOOL() - external int onlySomeReasonsPresent; +typedef CSSM_TP_VERIFY_CONTEXT_PTR = ffi.Pointer; - @CE_CrlDistReasonFlags() - external int onlySomeReasons; +final class cssm_tp_certverify_output extends ffi.Struct { + @CSSM_TP_CERTVERIFY_STATUS() + external int VerifyStatus; - @CSSM_BOOL() - external int indirectCrlPresent; + @uint32() + external int NumberOfEvidence; - @CSSM_BOOL() - external int indirectCrl; + external CSSM_EVIDENCE_PTR Evidence; } -final class __CE_GeneralSubtree extends ffi.Struct { - external ffi.Pointer base; +typedef CSSM_TP_CERTVERIFY_STATUS = uint32; + +final class cssm_tp_certnotarize_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; @uint32() - external int minimum; + external int NumberOfFields; - @CSSM_BOOL() - external int maximumPresent; + external CSSM_FIELD_PTR MoreFields; - @uint32() - external int maximum; -} + external CSSM_FIELD_PTR SignScope; -final class __CE_GeneralSubtrees extends ffi.Struct { @uint32() - external int numSubtrees; + external int ScopeSize; - external ffi.Pointer subtrees; -} + @CSSM_TP_SERVICES() + external int MoreServiceRequests; -typedef CE_GeneralSubtree = __CE_GeneralSubtree; + @uint32() + external int NumberOfServiceControls; -final class __CE_NameConstraints extends ffi.Struct { - external ffi.Pointer permitted; + external CSSM_FIELD_PTR ServiceControls; - external ffi.Pointer excluded; + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; } -typedef CE_GeneralSubtrees = __CE_GeneralSubtrees; - -final class __CE_PolicyMapping extends ffi.Struct { - external SecAsn1Oid issuerDomainPolicy; - - external SecAsn1Oid subjectDomainPolicy; -} +final class cssm_tp_certnotarize_output extends ffi.Struct { + @CSSM_TP_CERTNOTARIZE_STATUS() + external int NotarizeStatus; -final class __CE_PolicyMappings extends ffi.Struct { - @uint32() - external int numPolicyMappings; + external CSSM_CERTGROUP_PTR NotarizedCertGroup; - external ffi.Pointer policyMappings; + @CSSM_TP_SERVICES() + external int PerformedServiceRequests; } -typedef CE_PolicyMapping = __CE_PolicyMapping; +typedef CSSM_TP_CERTNOTARIZE_STATUS = uint32; -final class __CE_PolicyConstraints extends ffi.Struct { - @CSSM_BOOL() - external int requireExplicitPolicyPresent; +final class cssm_tp_certreclaim_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; @uint32() - external int requireExplicitPolicy; + external int NumberOfSelectionFields; - @CSSM_BOOL() - external int inhibitPolicyMappingPresent; + external CSSM_FIELD_PTR SelectionFields; - @uint32() - external int inhibitPolicyMapping; + external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; } -abstract class __CE_DataType { - static const int DT_AuthorityKeyID = 0; - static const int DT_SubjectKeyID = 1; - static const int DT_KeyUsage = 2; - static const int DT_SubjectAltName = 3; - static const int DT_IssuerAltName = 4; - static const int DT_ExtendedKeyUsage = 5; - static const int DT_BasicConstraints = 6; - static const int DT_CertPolicies = 7; - static const int DT_NetscapeCertType = 8; - static const int DT_CrlNumber = 9; - static const int DT_DeltaCrl = 10; - static const int DT_CrlReason = 11; - static const int DT_CrlDistributionPoints = 12; - static const int DT_IssuingDistributionPoint = 13; - static const int DT_AuthorityInfoAccess = 14; - static const int DT_Other = 15; - static const int DT_QC_Statements = 16; - static const int DT_NameConstraints = 17; - static const int DT_PolicyMappings = 18; - static const int DT_PolicyConstraints = 19; - static const int DT_InhibitAnyPolicy = 20; -} +final class cssm_tp_certreclaim_output extends ffi.Struct { + @CSSM_TP_CERTRECLAIM_STATUS() + external int ReclaimStatus; -final class CE_Data extends ffi.Union { - external CE_AuthorityKeyID authorityKeyID; + external CSSM_CERTGROUP_PTR ReclaimedCertGroup; - external CE_SubjectKeyID subjectKeyID; + @CSSM_LONG_HANDLE() + external int KeyCacheHandle; +} - @CE_KeyUsage() - external int keyUsage; +typedef CSSM_TP_CERTRECLAIM_STATUS = uint32; +typedef CSSM_LONG_HANDLE = uint64; +typedef uint64 = ffi.Uint64; +typedef Dartuint64 = int; - external CE_GeneralNames subjectAltName; +final class cssm_tp_crlissue_input extends ffi.Struct { + @CSSM_CL_HANDLE() + external int CLHandle; - external CE_GeneralNames issuerAltName; + @uint32() + external int CrlIdentifier; - external CE_ExtendedKeyUsage extendedKeyUsage; + external CSSM_TIMESTRING CrlThisTime; - external CE_BasicConstraints basicConstraints; + external CSSM_FIELD_PTR PolicyIdentifier; - external CE_CertPolicies certPolicies; + external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; +} - @CE_NetscapeCertType() - external int netscapeCertType; +final class cssm_tp_crlissue_output extends ffi.Struct { + @CSSM_TP_CRLISSUE_STATUS() + external int IssueStatus; - @CE_CrlNumber() - external int crlNumber; + external CSSM_ENCODED_CRL_PTR Crl; - @CE_DeltaCrl() - external int deltaCrl; + external CSSM_TIMESTRING CrlNextTime; +} - @CE_CrlReason() - external int crlReason; +typedef CSSM_TP_CRLISSUE_STATUS = uint32; - external CE_CRLDistPointsSyntax crlDistPoints; +final class cssm_cert_bundle_header extends ffi.Struct { + @CSSM_CERT_BUNDLE_TYPE() + external int BundleType; - external CE_IssuingDistributionPoint issuingDistPoint; + @CSSM_CERT_BUNDLE_ENCODING() + external int BundleEncoding; +} - external CE_AuthorityInfoAccess authorityInfoAccess; +typedef CSSM_CERT_BUNDLE_TYPE = uint32; +typedef CSSM_CERT_BUNDLE_ENCODING = uint32; - external CE_QC_Statements qualifiedCertStatements; +final class cssm_cert_bundle extends ffi.Struct { + external CSSM_CERT_BUNDLE_HEADER BundleHeader; - external CE_NameConstraints nameConstraints; + external SecAsn1Item Bundle; +} - external CE_PolicyMappings policyMappings; +typedef CSSM_CERT_BUNDLE_HEADER = cssm_cert_bundle_header; - external CE_PolicyConstraints policyConstraints; +final class cssm_db_attribute_info extends ffi.Struct { + @CSSM_DB_ATTRIBUTE_NAME_FORMAT() + external int AttributeNameFormat; - @CE_InhibitAnyPolicy() - external int inhibitAnyPolicy; + external cssm_db_attribute_label Label; - external SecAsn1Item rawData; + @CSSM_DB_ATTRIBUTE_FORMAT() + external int AttributeFormat; } -typedef CE_AuthorityKeyID = __CE_AuthorityKeyID; -typedef CE_SubjectKeyID = SecAsn1Item; -typedef CE_KeyUsage = uint16; -typedef CE_ExtendedKeyUsage = __CE_ExtendedKeyUsage; -typedef CE_BasicConstraints = __CE_BasicConstraints; -typedef CE_CertPolicies = __CE_CertPolicies; -typedef CE_NetscapeCertType = uint16; -typedef CE_CrlNumber = uint32; -typedef CE_DeltaCrl = uint32; -typedef CE_CrlReason = uint32; -typedef CE_CRLDistPointsSyntax = __CE_CRLDistPointsSyntax; -typedef CE_IssuingDistributionPoint = __CE_IssuingDistributionPoint; -typedef CE_AuthorityInfoAccess = __CE_AuthorityInfoAccess; -typedef CE_QC_Statements = __CE_QC_Statements; -typedef CE_NameConstraints = __CE_NameConstraints; -typedef CE_PolicyMappings = __CE_PolicyMappings; -typedef CE_PolicyConstraints = __CE_PolicyConstraints; -typedef CE_InhibitAnyPolicy = uint32; +typedef CSSM_DB_ATTRIBUTE_NAME_FORMAT = uint32; -final class __CE_DataAndType extends ffi.Struct { - @ffi.Int32() - external int type; +final class cssm_db_attribute_label extends ffi.Union { + external ffi.Pointer AttributeName; - external CE_Data extension1; + external SecAsn1Oid AttributeOID; - @CSSM_BOOL() - external int critical; + @uint32() + external int AttributeID; } -final class cssm_acl_process_subject_selector extends ffi.Struct { - @uint16() - external int version; +typedef CSSM_DB_ATTRIBUTE_FORMAT = uint32; - @uint16() - external int mask; +final class cssm_db_attribute_data extends ffi.Struct { + external CSSM_DB_ATTRIBUTE_INFO Info; @uint32() - external int uid; + external int NumberOfValues; - @uint32() - external int gid; + external CSSM_DATA_PTR Value; } -final class cssm_acl_keychain_prompt_selector extends ffi.Struct { - @uint16() - external int version; +typedef CSSM_DB_ATTRIBUTE_INFO = cssm_db_attribute_info; - @uint16() - external int flags; -} +final class cssm_db_record_attribute_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; -abstract class cssm_appledl_open_parameters_mask { - static const int kCSSM_APPLEDL_MASK_MODE = 1; + @uint32() + external int NumberOfAttributes; + + external CSSM_DB_ATTRIBUTE_INFO_PTR AttributeInfo; } -final class cssm_appledl_open_parameters extends ffi.Struct { - @uint32() - external int length; +typedef CSSM_DB_RECORDTYPE = uint32; +typedef CSSM_DB_ATTRIBUTE_INFO_PTR = ffi.Pointer; - @uint32() - external int version; +final class cssm_db_record_attribute_data extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; - @CSSM_BOOL() - external int autoCommit; + @uint32() + external int SemanticInformation; @uint32() - external int mask; + external int NumberOfAttributes; - @mode_t() - external int mode; + external CSSM_DB_ATTRIBUTE_DATA_PTR AttributeData; } -final class cssm_applecspdl_db_settings_parameters extends ffi.Struct { - @uint32() - external int idleTimeout; +typedef CSSM_DB_ATTRIBUTE_DATA_PTR = ffi.Pointer; - @uint8() - external int lockOnSleep; -} +final class cssm_db_parsing_module_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int RecordType; -final class cssm_applecspdl_db_is_locked_parameters extends ffi.Struct { - @uint8() - external int isLocked; + external CSSM_SUBSERVICE_UID ModuleSubserviceUid; } -final class cssm_applecspdl_db_change_password_parameters extends ffi.Struct { - external ffi.Pointer accessCredentials; +final class cssm_db_index_info extends ffi.Struct { + @CSSM_DB_INDEX_TYPE() + external int IndexType; + + @CSSM_DB_INDEXED_DATA_LOCATION() + external int IndexedDataLocation; + + external CSSM_DB_ATTRIBUTE_INFO Info; } -typedef CSSM_ACCESS_CREDENTIALS = cssm_access_credentials; +typedef CSSM_DB_INDEX_TYPE = uint32; +typedef CSSM_DB_INDEXED_DATA_LOCATION = uint32; -final class CSSM_APPLE_TP_NAME_OID extends ffi.Struct { - external ffi.Pointer string; +final class cssm_db_unique_record extends ffi.Struct { + external CSSM_DB_INDEX_INFO RecordLocator; - external ffi.Pointer oid; + external SecAsn1Item RecordIdentifier; } -final class CSSM_APPLE_TP_CERT_REQUEST extends ffi.Struct { - @CSSM_CSP_HANDLE() - external int cspHand; +typedef CSSM_DB_INDEX_INFO = cssm_db_index_info; - @CSSM_CL_HANDLE() - external int clHand; +final class cssm_db_record_index_info extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int DataRecordType; @uint32() - external int serialNumber; + external int NumberOfIndexes; - @uint32() - external int numSubjectNames; + external CSSM_DB_INDEX_INFO_PTR IndexInfo; +} - external ffi.Pointer subjectNames; +typedef CSSM_DB_INDEX_INFO_PTR = ffi.Pointer; +final class cssm_dbinfo extends ffi.Struct { @uint32() - external int numIssuerNames; - - external ffi.Pointer issuerNames; - - external CSSM_X509_NAME_PTR issuerNameX509; + external int NumberOfRecordTypes; - external ffi.Pointer certPublicKey; + external CSSM_DB_PARSING_MODULE_INFO_PTR DefaultParsingModules; - external ffi.Pointer issuerPrivateKey; + external CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR RecordAttributeNames; - @CSSM_ALGORITHMS() - external int signatureAlg; + external CSSM_DB_RECORD_INDEX_INFO_PTR RecordIndexes; - external SecAsn1Oid signatureOid; + @CSSM_BOOL() + external int IsLocal; - @uint32() - external int notBefore; + external ffi.Pointer AccessPath; - @uint32() - external int notAfter; + external ffi.Pointer Reserved; +} - @uint32() - external int numExtensions; +typedef CSSM_DB_PARSING_MODULE_INFO_PTR + = ffi.Pointer; +typedef CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR + = ffi.Pointer; +typedef CSSM_DB_RECORD_INDEX_INFO_PTR = ffi.Pointer; - external ffi.Pointer extensions; +final class cssm_selection_predicate extends ffi.Struct { + @CSSM_DB_OPERATOR() + external int DbOperator; - external ffi.Pointer challengeString; + external CSSM_DB_ATTRIBUTE_DATA Attribute; } -typedef CSSM_X509_NAME_PTR = ffi.Pointer; -typedef CSSM_KEY = cssm_key; -typedef CE_DataAndType = __CE_DataAndType; +typedef CSSM_DB_OPERATOR = uint32; +typedef CSSM_DB_ATTRIBUTE_DATA = cssm_db_attribute_data; -final class CSSM_APPLE_TP_SSL_OPTIONS extends ffi.Struct { +final class cssm_query_limits extends ffi.Struct { @uint32() - external int Version; + external int TimeLimit; @uint32() - external int ServerNameLen; + external int SizeLimit; +} - external ffi.Pointer ServerName; +final class cssm_query extends ffi.Struct { + @CSSM_DB_RECORDTYPE() + external int RecordType; - @uint32() - external int Flags; -} + @CSSM_DB_CONJUNCTIVE() + external int Conjunctive; -final class CSSM_APPLE_TP_CRL_OPTIONS extends ffi.Struct { @uint32() - external int Version; - - @CSSM_APPLE_TP_CRL_OPT_FLAGS() - external int CrlFlags; + external int NumSelectionPredicates; - external CSSM_DL_DB_HANDLE_PTR crlStore; -} + external CSSM_SELECTION_PREDICATE_PTR SelectionPredicate; -typedef CSSM_APPLE_TP_CRL_OPT_FLAGS = uint32; + external CSSM_QUERY_LIMITS QueryLimits; -final class CSSM_APPLE_TP_SMIME_OPTIONS extends ffi.Struct { - @uint32() - external int Version; + @CSSM_QUERY_FLAGS() + external int QueryFlags; +} - @CE_KeyUsage() - external int IntendedUsage; +typedef CSSM_DB_CONJUNCTIVE = uint32; +typedef CSSM_SELECTION_PREDICATE_PTR = ffi.Pointer; +typedef CSSM_QUERY_LIMITS = cssm_query_limits; +typedef CSSM_QUERY_FLAGS = uint32; +final class cssm_dl_pkcs11_attributes extends ffi.Struct { @uint32() - external int SenderEmailLen; - - external ffi.Pointer SenderEmail; + external int DeviceAccessFlags; } -final class CSSM_APPLE_TP_ACTION_DATA extends ffi.Struct { +final class cssm_name_list extends ffi.Struct { @uint32() - external int Version; + external int NumStrings; - @CSSM_APPLE_TP_ACTION_FLAGS() - external int ActionFlags; + external ffi.Pointer> String; } -typedef CSSM_APPLE_TP_ACTION_FLAGS = uint32; - -final class CSSM_TP_APPLE_EVIDENCE_INFO extends ffi.Struct { - @CSSM_TP_APPLE_CERT_STATUS() - external int StatusBits; - +final class cssm_db_schema_attribute_info extends ffi.Struct { @uint32() - external int NumStatusCodes; - - external ffi.Pointer StatusCodes; + external int AttributeId; - @uint32() - external int Index; + external ffi.Pointer AttributeName; - external CSSM_DL_DB_HANDLE DlDbHandle; + external SecAsn1Oid AttributeNameID; - external CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord; + @CSSM_DB_ATTRIBUTE_FORMAT() + external int DataType; } -typedef CSSM_TP_APPLE_CERT_STATUS = uint32; -typedef CSSM_DL_DB_HANDLE = cssm_dl_db_handle; -typedef CSSM_DB_UNIQUE_RECORD_PTR = ffi.Pointer; - -final class CSSM_TP_APPLE_EVIDENCE_HEADER extends ffi.Struct { +final class cssm_db_schema_index_info extends ffi.Struct { @uint32() - external int Version; -} - -final class CSSM_APPLE_CL_CSR_REQUEST extends ffi.Struct { - external CSSM_X509_NAME_PTR subjectNameX509; - - @CSSM_ALGORITHMS() - external int signatureAlg; - - external SecAsn1Oid signatureOid; - - @CSSM_CSP_HANDLE() - external int cspHand; + external int AttributeId; - external ffi.Pointer subjectPublicKey; + @uint32() + external int IndexId; - external ffi.Pointer subjectPrivateKey; + @CSSM_DB_INDEX_TYPE() + external int IndexType; - external ffi.Pointer challengeString; + @CSSM_DB_INDEXED_DATA_LOCATION() + external int IndexedDataLocation; } -abstract class SecTrustResultType { - static const int kSecTrustResultInvalid = 0; - static const int kSecTrustResultProceed = 1; - static const int kSecTrustResultConfirm = 2; - static const int kSecTrustResultDeny = 3; - static const int kSecTrustResultUnspecified = 4; - static const int kSecTrustResultRecoverableTrustFailure = 5; - static const int kSecTrustResultFatalTrustFailure = 6; - static const int kSecTrustResultOtherError = 7; -} +final class cssm_x509_type_value_pair extends ffi.Struct { + external SecAsn1Oid type; -final class __SecTrust extends ffi.Opaque {} + @CSSM_BER_TAG() + external int valueType; -typedef SecTrustRef = ffi.Pointer<__SecTrust>; -typedef SecTrustCallback = ffi.Pointer<_ObjCBlock>; -typedef DartSecTrustCallback = ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType; -void _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>>() - .asFunction()(arg0, arg1); -final _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_registerClosure( - void Function(SecTrustRef, int) fn) { - final id = - ++_ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureRegistryIndex; - _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + external SecAsn1Item value; } -void _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, int arg1) => - _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType extends _ObjCBlockBase { - ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(SecTrustRef arg0, ffi.Int32 arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - SecTrustRef, ffi.Int32)>( - _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType.fromFunction( - NativeCupertinoHttp lib, void Function(SecTrustRef, int) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - SecTrustRef, ffi.Int32)>( - _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_registerClosure( - (SecTrustRef arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +typedef CSSM_BER_TAG = uint8; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType.listener( - NativeCupertinoHttp lib, void Function(SecTrustRef, int) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - SecTrustRef, ffi.Int32)>.listener( - _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_registerClosure( - (SecTrustRef arg0, int arg1) => fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, SecTrustRef, ffi.Int32)>? - _dartFuncListenerTrampoline; - - void call(SecTrustRef arg0, int arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, - ffi.Int32 arg1)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, SecTrustRef, int)>()(_id, arg0, arg1); -} +final class cssm_x509_rdn extends ffi.Struct { + @uint32() + external int numberOfPairs; -typedef SecTrustWithErrorCallback = ffi.Pointer<_ObjCBlock>; -typedef DartSecTrustWithErrorCallback - = ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef; -void _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - bool arg1, - CFErrorRef arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() - .asFunction()( - arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_registerClosure( - void Function(SecTrustRef, bool, CFErrorRef) fn) { - final id = - ++_ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureRegistryIndex; - _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + external CSSM_X509_TYPE_VALUE_PAIR_PTR AttributeTypeAndValue; } -void _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - SecTrustRef arg0, - bool arg1, - CFErrorRef arg2) => - _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +typedef CSSM_X509_TYPE_VALUE_PAIR_PTR = ffi.Pointer; -class ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef extends _ObjCBlockBase { - ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +final class cssm_x509_name extends ffi.Struct { + @uint32() + external int numberOfRDNs; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - SecTrustRef, ffi.Bool, CFErrorRef)>( - _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CSSM_X509_RDN_PTR RelativeDistinguishedName; +} - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef.fromFunction( - NativeCupertinoHttp lib, void Function(SecTrustRef, bool, CFErrorRef) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - SecTrustRef, ffi.Bool, CFErrorRef)>( - _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_registerClosure( - (SecTrustRef arg0, bool arg1, CFErrorRef arg2) => - fn(arg0, arg1, arg2))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +typedef CSSM_X509_RDN_PTR = ffi.Pointer; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef.listener( - NativeCupertinoHttp lib, void Function(SecTrustRef, bool, CFErrorRef) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - SecTrustRef, ffi.Bool, CFErrorRef)>.listener( - _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_registerClosure( - (SecTrustRef arg0, bool arg1, CFErrorRef arg2) => - fn(arg0, arg1, arg2))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, SecTrustRef, ffi.Bool, CFErrorRef)>? - _dartFuncListenerTrampoline; +final class cssm_x509_time extends ffi.Struct { + @CSSM_BER_TAG() + external int timeType; - void call(SecTrustRef arg0, bool arg1, CFErrorRef arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, SecTrustRef arg0, - ffi.Bool arg1, CFErrorRef arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, SecTrustRef, bool, - CFErrorRef)>()(_id, arg0, arg1, arg2); + external SecAsn1Item time; } -typedef SecKeyRef = ffi.Pointer<__SecKey>; -typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; +final class x509_validity extends ffi.Struct { + external CSSM_X509_TIME notBefore; -abstract class SecTrustOptionFlags { - static const int kSecTrustOptionAllowExpired = 1; - static const int kSecTrustOptionLeafIsCA = 2; - static const int kSecTrustOptionFetchIssuerFromNet = 4; - static const int kSecTrustOptionAllowExpiredRoot = 8; - static const int kSecTrustOptionRequireRevPerCert = 16; - static const int kSecTrustOptionUseTrustSettings = 32; - static const int kSecTrustOptionImplicitAnchors = 64; + external CSSM_X509_TIME notAfter; } -typedef CSSM_TP_VERIFY_CONTEXT_RESULT_PTR - = ffi.Pointer; -typedef SecKeychainRef = ffi.Pointer<__SecKeychain>; +typedef CSSM_X509_TIME = cssm_x509_time; -abstract class SecKeyUsage { - static const int kSecKeyUsageUnspecified = 0; - static const int kSecKeyUsageDigitalSignature = 1; - static const int kSecKeyUsageNonRepudiation = 2; - static const int kSecKeyUsageContentCommitment = 2; - static const int kSecKeyUsageKeyEncipherment = 4; - static const int kSecKeyUsageDataEncipherment = 8; - static const int kSecKeyUsageKeyAgreement = 16; - static const int kSecKeyUsageKeyCertSign = 32; - static const int kSecKeyUsageCRLSign = 64; - static const int kSecKeyUsageEncipherOnly = 128; - static const int kSecKeyUsageDecipherOnly = 256; - static const int kSecKeyUsageCritical = -2147483648; - static const int kSecKeyUsageAll = 2147483647; -} +final class cssm_x509ext_basicConstraints extends ffi.Struct { + @CSSM_BOOL() + external int cA; -typedef SecIdentityRef = ffi.Pointer<__SecIdentity>; + @CSSM_X509_OPTION() + external int pathLenConstraintPresent; -abstract class SSLCiphersuiteGroup { - static const int kSSLCiphersuiteGroupDefault = 0; - static const int kSSLCiphersuiteGroupCompatibility = 1; - static const int kSSLCiphersuiteGroupLegacy = 2; - static const int kSSLCiphersuiteGroupATS = 3; - static const int kSSLCiphersuiteGroupATSCompatibility = 4; -} - -final class sec_trust extends ffi.Opaque {} - -final class sec_identity extends ffi.Opaque {} - -final class sec_certificate extends ffi.Opaque {} - -abstract class tls_protocol_version_t { - static const int tls_protocol_version_TLSv10 = 769; - static const int tls_protocol_version_TLSv11 = 770; - static const int tls_protocol_version_TLSv12 = 771; - static const int tls_protocol_version_TLSv13 = 772; - static const int tls_protocol_version_DTLSv10 = -257; - static const int tls_protocol_version_DTLSv12 = -259; -} - -abstract class tls_ciphersuite_t { - static const int tls_ciphersuite_RSA_WITH_3DES_EDE_CBC_SHA = 10; - static const int tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA = 47; - static const int tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA = 53; - static const int tls_ciphersuite_RSA_WITH_AES_128_GCM_SHA256 = 156; - static const int tls_ciphersuite_RSA_WITH_AES_256_GCM_SHA384 = 157; - static const int tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA256 = 60; - static const int tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA256 = 61; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; - static const int tls_ciphersuite_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; - static const int tls_ciphersuite_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; - static const int tls_ciphersuite_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = - -13144; - static const int tls_ciphersuite_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = - -13143; - static const int tls_ciphersuite_AES_128_GCM_SHA256 = 4865; - static const int tls_ciphersuite_AES_256_GCM_SHA384 = 4866; - static const int tls_ciphersuite_CHACHA20_POLY1305_SHA256 = 4867; -} - -abstract class tls_ciphersuite_group_t { - static const int tls_ciphersuite_group_default = 0; - static const int tls_ciphersuite_group_compatibility = 1; - static const int tls_ciphersuite_group_legacy = 2; - static const int tls_ciphersuite_group_ats = 3; - static const int tls_ciphersuite_group_ats_compatibility = 4; -} - -abstract class SSLProtocol { - static const int kSSLProtocolUnknown = 0; - static const int kTLSProtocol1 = 4; - static const int kTLSProtocol11 = 7; - static const int kTLSProtocol12 = 8; - static const int kDTLSProtocol1 = 9; - static const int kTLSProtocol13 = 10; - static const int kDTLSProtocol12 = 11; - static const int kTLSProtocolMaxSupported = 999; - static const int kSSLProtocol2 = 1; - static const int kSSLProtocol3 = 2; - static const int kSSLProtocol3Only = 3; - static const int kTLSProtocol1Only = 5; - static const int kSSLProtocolAll = 6; -} - -typedef sec_trust_t = ffi.Pointer; -typedef sec_identity_t = ffi.Pointer; -void _ObjCBlock_ffiVoid_seccertificatet_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -final _ObjCBlock_ffiVoid_seccertificatet_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_seccertificatet_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_seccertificatet_registerClosure( - void Function(sec_certificate_t) fn) { - final id = ++_ObjCBlock_ffiVoid_seccertificatet_closureRegistryIndex; - _ObjCBlock_ffiVoid_seccertificatet_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + @uint32() + external int pathLenConstraint; } -void _ObjCBlock_ffiVoid_seccertificatet_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0) => - _ObjCBlock_ffiVoid_seccertificatet_closureRegistry[ - block.ref.target.address]!(arg0); +typedef CSSM_X509_OPTION = CSSM_BOOL; -class ObjCBlock_ffiVoid_seccertificatet extends _ObjCBlockBase { - ObjCBlock_ffiVoid_seccertificatet._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +final class cssm_x509_extensionTagAndValue extends ffi.Struct { + @CSSM_BER_TAG() + external int type; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_seccertificatet.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, sec_certificate_t)>( - _ObjCBlock_ffiVoid_seccertificatet_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external SecAsn1Item value; +} - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_seccertificatet.fromFunction( - NativeCupertinoHttp lib, void Function(sec_certificate_t) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, sec_certificate_t)>( - _ObjCBlock_ffiVoid_seccertificatet_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_seccertificatet_registerClosure( - (sec_certificate_t arg0) => fn(arg0))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +final class cssm_x509ext_pair extends ffi.Struct { + external CSSM_X509EXT_TAGandVALUE tagAndValue; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_seccertificatet.listener( - NativeCupertinoHttp lib, void Function(sec_certificate_t) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - sec_certificate_t)>.listener( - _ObjCBlock_ffiVoid_seccertificatet_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_seccertificatet_registerClosure( - (sec_certificate_t arg0) => fn(arg0))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, sec_certificate_t)>? - _dartFuncListenerTrampoline; - - void call(sec_certificate_t arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, sec_certificate_t arg0)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, sec_certificate_t)>()(_id, arg0); + external ffi.Pointer parsedValue; } -typedef sec_certificate_t = ffi.Pointer; +typedef CSSM_X509EXT_TAGandVALUE = cssm_x509_extensionTagAndValue; -final class sec_protocol_metadata extends ffi.Opaque {} +final class cssm_x509_extension extends ffi.Struct { + external SecAsn1Oid extnId; -typedef sec_protocol_metadata_t = ffi.Pointer; -typedef SSLCipherSuite = ffi.Uint16; -typedef DartSSLCipherSuite = int; -void _ObjCBlock_ffiVoid_dispatchdatat_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -final _ObjCBlock_ffiVoid_dispatchdatat_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_dispatchdatat_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_dispatchdatat_registerClosure( - void Function(dispatch_data_t) fn) { - final id = ++_ObjCBlock_ffiVoid_dispatchdatat_closureRegistryIndex; - _ObjCBlock_ffiVoid_dispatchdatat_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_dispatchdatat_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0) => - _ObjCBlock_ffiVoid_dispatchdatat_closureRegistry[block.ref.target.address]!( - arg0); - -class ObjCBlock_ffiVoid_dispatchdatat extends _ObjCBlockBase { - ObjCBlock_ffiVoid_dispatchdatat._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + @CSSM_BOOL() + external int critical; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_dispatchdatat.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, dispatch_data_t)>( - _ObjCBlock_ffiVoid_dispatchdatat_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @ffi.UnsignedInt() + external int formatAsInt; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_dispatchdatat.fromFunction( - NativeCupertinoHttp lib, void Function(dispatch_data_t) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, dispatch_data_t)>( - _ObjCBlock_ffiVoid_dispatchdatat_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_dispatchdatat_registerClosure( - (dispatch_data_t arg0) => fn(arg0))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + extension_data_format get format => + extension_data_format.fromValue(formatAsInt); - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_dispatchdatat.listener( - NativeCupertinoHttp lib, void Function(dispatch_data_t) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - dispatch_data_t)>.listener( - _ObjCBlock_ffiVoid_dispatchdatat_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_dispatchdatat_registerClosure( - (dispatch_data_t arg0) => fn(arg0))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, dispatch_data_t)>? - _dartFuncListenerTrampoline; - - void call(dispatch_data_t arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, dispatch_data_t arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, dispatch_data_t)>()(_id, arg0); -} + external cssm_x509ext_value value; -void _ObjCBlock_ffiVoid_Uint16_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -final _ObjCBlock_ffiVoid_Uint16_closureRegistry = {}; -int _ObjCBlock_ffiVoid_Uint16_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_Uint16_registerClosure( - void Function(int) fn) { - final id = ++_ObjCBlock_ffiVoid_Uint16_closureRegistryIndex; - _ObjCBlock_ffiVoid_Uint16_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + external SecAsn1Item BERvalue; } -void _ObjCBlock_ffiVoid_Uint16_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, int arg0) => - _ObjCBlock_ffiVoid_Uint16_closureRegistry[block.ref.target.address]!(arg0); +enum extension_data_format { + CSSM_X509_DATAFORMAT_ENCODED(0), + CSSM_X509_DATAFORMAT_PARSED(1), + CSSM_X509_DATAFORMAT_PAIR(2); -class ObjCBlock_ffiVoid_Uint16 extends _ObjCBlockBase { - ObjCBlock_ffiVoid_Uint16._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + final int value; + const extension_data_format(this.value); - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_Uint16.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Uint16)>( - _ObjCBlock_ffiVoid_Uint16_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static extension_data_format fromValue(int value) => switch (value) { + 0 => CSSM_X509_DATAFORMAT_ENCODED, + 1 => CSSM_X509_DATAFORMAT_PARSED, + 2 => CSSM_X509_DATAFORMAT_PAIR, + _ => throw ArgumentError( + "Unknown value for extension_data_format: $value"), + }; +} - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_Uint16.fromFunction( - NativeCupertinoHttp lib, void Function(int) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Uint16)>( - _ObjCBlock_ffiVoid_Uint16_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_Uint16_registerClosure( - (int arg0) => fn(arg0))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +final class cssm_x509ext_value extends ffi.Union { + external ffi.Pointer tagAndValue; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_Uint16.listener( - NativeCupertinoHttp lib, void Function(int) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Uint16)>.listener( - _ObjCBlock_ffiVoid_Uint16_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_Uint16_registerClosure( - (int arg0) => fn(arg0))), - lib); - static ffi - .NativeCallable, ffi.Uint16)>? - _dartFuncListenerTrampoline; - - void call(int arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Uint16 arg0)>>() - .asFunction, int)>()(_id, arg0); -} + external ffi.Pointer parsedValue; -void _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - dispatch_data_t arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - dispatch_data_t arg0, dispatch_data_t arg1)>>() - .asFunction()( - arg0, arg1); -final _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_registerClosure( - void Function(dispatch_data_t, dispatch_data_t) fn) { - final id = - ++_ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureRegistryIndex; - _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + external ffi.Pointer valuePair; } -void _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, - dispatch_data_t arg1) => - _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureRegistry[ - block.ref.target.address]!(arg0, arg1); +typedef CSSM_X509EXT_PAIR = cssm_x509ext_pair; -class ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat extends _ObjCBlockBase { - ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +final class cssm_x509_extensions extends ffi.Struct { + @uint32() + external int numberOfExtensions; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - dispatch_data_t arg0, dispatch_data_t arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - dispatch_data_t, dispatch_data_t)>( - _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CSSM_X509_EXTENSION_PTR extensions; +} - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat.fromFunction( - NativeCupertinoHttp lib, - void Function(dispatch_data_t, dispatch_data_t) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - dispatch_data_t, dispatch_data_t)>( - _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_registerClosure( - (dispatch_data_t arg0, dispatch_data_t arg1) => - fn(arg0, arg1))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +typedef CSSM_X509_EXTENSION_PTR = ffi.Pointer; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat.listener( - NativeCupertinoHttp lib, - void Function(dispatch_data_t, dispatch_data_t) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - dispatch_data_t, dispatch_data_t)>.listener( - _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_registerClosure( - (dispatch_data_t arg0, dispatch_data_t arg1) => - fn(arg0, arg1))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, dispatch_data_t, dispatch_data_t)>? - _dartFuncListenerTrampoline; +final class cssm_x509_tbs_certificate extends ffi.Struct { + external SecAsn1Item version; - void call(dispatch_data_t arg0, dispatch_data_t arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - dispatch_data_t arg0, dispatch_data_t arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, dispatch_data_t, - dispatch_data_t)>()(_id, arg0, arg1); -} + external SecAsn1Item serialNumber; -final class sec_protocol_options extends ffi.Opaque {} + external SecAsn1AlgId signature; -typedef sec_protocol_options_t = ffi.Pointer; -typedef sec_protocol_pre_shared_key_selection_t = ffi.Pointer<_ObjCBlock>; -typedef Dartsec_protocol_pre_shared_key_selection_t - = ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet; -void - _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>>() - .asFunction< - void Function(sec_protocol_metadata_t, dispatch_data_t, - sec_protocol_pre_shared_key_selection_complete_t)>()( - arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_registerClosure( - void Function(sec_protocol_metadata_t, dispatch_data_t, - sec_protocol_pre_shared_key_selection_complete_t) - fn) { - final id = - ++_ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureRegistryIndex; - _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) => - _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + external CSSM_X509_NAME issuer; -class ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + external CSSM_X509_VALIDITY validity; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - sec_protocol_metadata_t, - dispatch_data_t, - sec_protocol_pre_shared_key_selection_complete_t)>( - _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external CSSM_X509_NAME subject; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet.fromFunction( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t, dispatch_data_t, - Dartsec_protocol_pre_shared_key_selection_complete_t) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, sec_protocol_metadata_t, dispatch_data_t, sec_protocol_pre_shared_key_selection_complete_t)>( - _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_registerClosure( - (sec_protocol_metadata_t arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) => - fn(arg0, arg1, ObjCBlock_ffiVoid_dispatchdatat._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + external SecAsn1PubKeyInfo subjectPublicKeyInfo; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet.listener( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t, dispatch_data_t, - Dartsec_protocol_pre_shared_key_selection_complete_t) - fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, sec_protocol_metadata_t, dispatch_data_t, sec_protocol_pre_shared_key_selection_complete_t)>.listener( - _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_registerClosure( - (sec_protocol_metadata_t arg0, dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t arg2) => - fn(arg0, arg1, ObjCBlock_ffiVoid_dispatchdatat._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - sec_protocol_metadata_t, - dispatch_data_t, - sec_protocol_pre_shared_key_selection_complete_t)>? - _dartFuncListenerTrampoline; + external SecAsn1Item issuerUniqueIdentifier; - void - call(sec_protocol_metadata_t arg0, dispatch_data_t arg1, - Dartsec_protocol_pre_shared_key_selection_complete_t arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - dispatch_data_t arg1, - sec_protocol_pre_shared_key_selection_complete_t - arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - sec_protocol_metadata_t, - dispatch_data_t, - sec_protocol_pre_shared_key_selection_complete_t)>()( - _id, arg0, arg1, arg2._id); -} + external SecAsn1Item subjectUniqueIdentifier; -typedef sec_protocol_pre_shared_key_selection_complete_t - = ffi.Pointer<_ObjCBlock>; -typedef Dartsec_protocol_pre_shared_key_selection_complete_t - = ObjCBlock_ffiVoid_dispatchdatat; -typedef sec_protocol_key_update_t = ffi.Pointer<_ObjCBlock>; -typedef Dartsec_protocol_key_update_t - = ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet; -void - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>>() - .asFunction< - void Function(sec_protocol_metadata_t, - sec_protocol_key_update_complete_t)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_registerClosure( - void Function( - sec_protocol_metadata_t, sec_protocol_key_update_complete_t) - fn) { - final id = - ++_ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureRegistryIndex; - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); + external CSSM_X509_EXTENSIONS extensions; } -void _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1) => - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureRegistry[ - block.ref.target.address]!(arg0, arg1); +typedef CSSM_X509_NAME = cssm_x509_name; +typedef CSSM_X509_VALIDITY = x509_validity; +typedef CSSM_X509_EXTENSIONS = cssm_x509_extensions; -class ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +final class cssm_x509_signature extends ffi.Struct { + external SecAsn1AlgId algorithmIdentifier; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - sec_protocol_metadata_t, - sec_protocol_key_update_complete_t)>( - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + external SecAsn1Item encrypted; +} - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet.fromFunction( - NativeCupertinoHttp lib, - void Function( - sec_protocol_metadata_t, Dartsec_protocol_key_update_complete_t) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - sec_protocol_metadata_t, - sec_protocol_key_update_complete_t)>( - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_registerClosure( - (sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) => - fn(arg0, ObjCBlock_ffiVoid._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +final class cssm_x509_signed_certificate extends ffi.Struct { + external CSSM_X509_TBS_CERTIFICATE certificate; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet.listener( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t, Dartsec_protocol_key_update_complete_t) - fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - sec_protocol_metadata_t, - sec_protocol_key_update_complete_t)>.listener( - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_registerClosure( - (sec_protocol_metadata_t arg0, sec_protocol_key_update_complete_t arg1) => - fn(arg0, ObjCBlock_ffiVoid._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, sec_protocol_metadata_t, - sec_protocol_key_update_complete_t)>? _dartFuncListenerTrampoline; - - void call(sec_protocol_metadata_t arg0, - Dartsec_protocol_key_update_complete_t arg1) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_key_update_complete_t arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, sec_protocol_metadata_t, - sec_protocol_key_update_complete_t)>()(_id, arg0, arg1._id); + external CSSM_X509_SIGNATURE signature; } -typedef sec_protocol_key_update_complete_t = ffi.Pointer<_ObjCBlock>; -typedef Dartsec_protocol_key_update_complete_t = ObjCBlock_ffiVoid; -typedef sec_protocol_challenge_t = ffi.Pointer<_ObjCBlock>; -typedef Dartsec_protocol_challenge_t - = ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet; -void - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>>() - .asFunction< - void Function(sec_protocol_metadata_t, - sec_protocol_challenge_complete_t)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_registerClosure( - void Function( - sec_protocol_metadata_t, sec_protocol_challenge_complete_t) - fn) { - final id = - ++_ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureRegistryIndex; - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); +typedef CSSM_X509_TBS_CERTIFICATE = cssm_x509_tbs_certificate; +typedef CSSM_X509_SIGNATURE = cssm_x509_signature; + +final class cssm_x509ext_policyQualifierInfo extends ffi.Struct { + external SecAsn1Oid policyQualifierId; + + external SecAsn1Item value; } -void _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1) => - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureRegistry[ - block.ref.target.address]!(arg0, arg1); +final class cssm_x509ext_policyQualifiers extends ffi.Struct { + @uint32() + external int numberOfPolicyQualifiers; -class ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + external ffi.Pointer policyQualifier; +} - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - sec_protocol_metadata_t, - sec_protocol_challenge_complete_t)>( - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +typedef CSSM_X509EXT_POLICYQUALIFIERINFO = cssm_x509ext_policyQualifierInfo; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet.fromFunction( - NativeCupertinoHttp lib, - void Function( - sec_protocol_metadata_t, Dartsec_protocol_challenge_complete_t) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - sec_protocol_metadata_t, - sec_protocol_challenge_complete_t)>( - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_registerClosure( - (sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) => - fn(arg0, ObjCBlock_ffiVoid_secidentityt._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +final class cssm_x509ext_policyInfo extends ffi.Struct { + external SecAsn1Oid policyIdentifier; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet.listener( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t, Dartsec_protocol_challenge_complete_t) - fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, sec_protocol_metadata_t, sec_protocol_challenge_complete_t)>.listener( - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_registerClosure( - (sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) => - fn(arg0, ObjCBlock_ffiVoid_secidentityt._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, sec_protocol_metadata_t, - sec_protocol_challenge_complete_t)>? _dartFuncListenerTrampoline; - - void call(sec_protocol_metadata_t arg0, - Dartsec_protocol_challenge_complete_t arg1) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_protocol_challenge_complete_t arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, sec_protocol_metadata_t, - sec_protocol_challenge_complete_t)>()(_id, arg0, arg1._id); + external CSSM_X509EXT_POLICYQUALIFIERS policyQualifiers; } -typedef sec_protocol_challenge_complete_t = ffi.Pointer<_ObjCBlock>; -typedef Dartsec_protocol_challenge_complete_t = ObjCBlock_ffiVoid_secidentityt; -void _ObjCBlock_ffiVoid_secidentityt_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, sec_identity_t arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -final _ObjCBlock_ffiVoid_secidentityt_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_secidentityt_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_secidentityt_registerClosure( - void Function(sec_identity_t) fn) { - final id = ++_ObjCBlock_ffiVoid_secidentityt_closureRegistryIndex; - _ObjCBlock_ffiVoid_secidentityt_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_secidentityt_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, sec_identity_t arg0) => - _ObjCBlock_ffiVoid_secidentityt_closureRegistry[block.ref.target.address]!( - arg0); - -class ObjCBlock_ffiVoid_secidentityt extends _ObjCBlockBase { - ObjCBlock_ffiVoid_secidentityt._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_X509EXT_POLICYQUALIFIERS = cssm_x509ext_policyQualifiers; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_secidentityt.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, sec_identity_t)>( - _ObjCBlock_ffiVoid_secidentityt_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class cssm_x509_revoked_cert_entry extends ffi.Struct { + external SecAsn1Item certificateSerialNumber; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_secidentityt.fromFunction( - NativeCupertinoHttp lib, void Function(sec_identity_t) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, sec_identity_t)>( - _ObjCBlock_ffiVoid_secidentityt_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_secidentityt_registerClosure( - (sec_identity_t arg0) => fn(arg0))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + external CSSM_X509_TIME revocationDate; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_secidentityt.listener( - NativeCupertinoHttp lib, void Function(sec_identity_t) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - sec_identity_t)>.listener( - _ObjCBlock_ffiVoid_secidentityt_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_secidentityt_registerClosure( - (sec_identity_t arg0) => fn(arg0))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, sec_identity_t)>? - _dartFuncListenerTrampoline; - - void call(sec_identity_t arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, sec_identity_t arg0)>>() - .asFunction, sec_identity_t)>()( - _id, arg0); + external CSSM_X509_EXTENSIONS extensions; } -typedef sec_protocol_verify_t = ffi.Pointer<_ObjCBlock>; -typedef Dartsec_protocol_verify_t - = ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet; -void - _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>>() - .asFunction< - void Function(sec_protocol_metadata_t, sec_trust_t, - sec_protocol_verify_complete_t)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureRegistry = - {}; -int _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_registerClosure( - void Function(sec_protocol_metadata_t, sec_trust_t, - sec_protocol_verify_complete_t) - fn) { - final id = - ++_ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureRegistryIndex; - _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) => - _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +final class cssm_x509_revoked_cert_list extends ffi.Struct { + @uint32() + external int numberOfRevokedCertEntries; -class ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + external CSSM_X509_REVOKED_CERT_ENTRY_PTR revokedCertEntry; +} - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(sec_protocol_metadata_t arg0, - sec_trust_t arg1, sec_protocol_verify_complete_t arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - sec_protocol_metadata_t, - sec_trust_t, - sec_protocol_verify_complete_t)>( - _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +typedef CSSM_X509_REVOKED_CERT_ENTRY_PTR + = ffi.Pointer; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet.fromFunction( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t, sec_trust_t, Dartsec_protocol_verify_complete_t) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - sec_protocol_metadata_t, - sec_trust_t, - sec_protocol_verify_complete_t)>( - _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_registerClosure( - (sec_protocol_metadata_t arg0, sec_trust_t arg1, sec_protocol_verify_complete_t arg2) => - fn(arg0, arg1, ObjCBlock_ffiVoid_bool._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +final class cssm_x509_tbs_certlist extends ffi.Struct { + external SecAsn1Item version; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet.listener( - NativeCupertinoHttp lib, - void Function(sec_protocol_metadata_t, sec_trust_t, - Dartsec_protocol_verify_complete_t) - fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, sec_protocol_metadata_t, sec_trust_t, sec_protocol_verify_complete_t)>.listener( - _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_registerClosure( - (sec_protocol_metadata_t arg0, sec_trust_t arg1, - sec_protocol_verify_complete_t arg2) => - fn(arg0, arg1, ObjCBlock_ffiVoid_bool._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - sec_protocol_metadata_t, - sec_trust_t, - sec_protocol_verify_complete_t)>? _dartFuncListenerTrampoline; + external SecAsn1AlgId signature; - void call(sec_protocol_metadata_t arg0, sec_trust_t arg1, - Dartsec_protocol_verify_complete_t arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - sec_protocol_metadata_t arg0, - sec_trust_t arg1, - sec_protocol_verify_complete_t arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - sec_protocol_metadata_t, - sec_trust_t, - sec_protocol_verify_complete_t)>()(_id, arg0, arg1, arg2._id); -} + external CSSM_X509_NAME issuer; -typedef sec_protocol_verify_complete_t = ffi.Pointer<_ObjCBlock>; -typedef Dartsec_protocol_verify_complete_t = ObjCBlock_ffiVoid_bool; -void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -final _ObjCBlock_ffiVoid_bool_closureRegistry = {}; -int _ObjCBlock_ffiVoid_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_bool_registerClosure( - void Function(bool) fn) { - final id = ++_ObjCBlock_ffiVoid_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + external CSSM_X509_TIME thisUpdate; -void _ObjCBlock_ffiVoid_bool_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, bool arg0) => - _ObjCBlock_ffiVoid_bool_closureRegistry[block.ref.target.address]!(arg0); + external CSSM_X509_TIME nextUpdate; + + external CSSM_X509_REVOKED_CERT_LIST_PTR revokedCertificates; -class ObjCBlock_ffiVoid_bool extends _ObjCBlockBase { - ObjCBlock_ffiVoid_bool._(ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + external CSSM_X509_EXTENSIONS extensions; +} - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_bool.fromFunctionPointer(NativeCupertinoHttp lib, - ffi.Pointer> ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +typedef CSSM_X509_REVOKED_CERT_LIST_PTR + = ffi.Pointer; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_bool.fromFunction( - NativeCupertinoHttp lib, void Function(bool) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Bool)>( - _ObjCBlock_ffiVoid_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_bool_registerClosure( - (bool arg0) => fn(arg0))), - lib); - static ffi.Pointer? _dartFuncTrampoline; +final class cssm_x509_signed_crl extends ffi.Struct { + external CSSM_X509_TBS_CERTLIST tbsCertList; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_bool.listener( - NativeCupertinoHttp lib, void Function(bool) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Bool)>.listener( - _ObjCBlock_ffiVoid_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_bool_registerClosure( - (bool arg0) => fn(arg0))), - lib); - static ffi - .NativeCallable, ffi.Bool)>? - _dartFuncListenerTrampoline; - - void call(bool arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, ffi.Bool arg0)>>() - .asFunction, bool)>()(_id, arg0); + external CSSM_X509_SIGNATURE signature; } -final class SSLContext extends ffi.Opaque {} +typedef CSSM_X509_TBS_CERTLIST = cssm_x509_tbs_certlist; -abstract class SSLSessionOption { - static const int kSSLSessionOptionBreakOnServerAuth = 0; - static const int kSSLSessionOptionBreakOnCertRequested = 1; - static const int kSSLSessionOptionBreakOnClientAuth = 2; - static const int kSSLSessionOptionFalseStart = 3; - static const int kSSLSessionOptionSendOneByteRecord = 4; - static const int kSSLSessionOptionAllowServerIdentityChange = 5; - static const int kSSLSessionOptionFallback = 6; - static const int kSSLSessionOptionBreakOnClientHello = 7; - static const int kSSLSessionOptionAllowRenegotiation = 8; - static const int kSSLSessionOptionEnableSessionTickets = 9; -} +final class __CE_OtherName extends ffi.Struct { + external SecAsn1Oid typeId; -abstract class SSLSessionState { - static const int kSSLIdle = 0; - static const int kSSLHandshake = 1; - static const int kSSLConnected = 2; - static const int kSSLClosed = 3; - static const int kSSLAborted = 4; + external SecAsn1Item value; } -abstract class SSLClientCertificateState { - static const int kSSLClientCertNone = 0; - static const int kSSLClientCertRequested = 1; - static const int kSSLClientCertSent = 2; - static const int kSSLClientCertRejected = 3; -} +final class __CE_GeneralName extends ffi.Struct { + @ffi.UnsignedInt() + external int nameTypeAsInt; + + __CE_GeneralNameType get nameType => + __CE_GeneralNameType.fromValue(nameTypeAsInt); -abstract class SSLProtocolSide { - static const int kSSLServerSide = 0; - static const int kSSLClientSide = 1; + @CSSM_BOOL() + external int berEncoded; + + external SecAsn1Item name; } -abstract class SSLConnectionType { - static const int kSSLStreamType = 0; - static const int kSSLDatagramType = 1; +enum __CE_GeneralNameType { + GNT_OtherName(0), + GNT_RFC822Name(1), + GNT_DNSName(2), + GNT_X400Address(3), + GNT_DirectoryName(4), + GNT_EdiPartyName(5), + GNT_URI(6), + GNT_IPAddress(7), + GNT_RegisteredID(8); + + final int value; + const __CE_GeneralNameType(this.value); + + static __CE_GeneralNameType fromValue(int value) => switch (value) { + 0 => GNT_OtherName, + 1 => GNT_RFC822Name, + 2 => GNT_DNSName, + 3 => GNT_X400Address, + 4 => GNT_DirectoryName, + 5 => GNT_EdiPartyName, + 6 => GNT_URI, + 7 => GNT_IPAddress, + 8 => GNT_RegisteredID, + _ => + throw ArgumentError("Unknown value for __CE_GeneralNameType: $value"), + }; } -typedef SSLContextRef = ffi.Pointer; -typedef SSLReadFunc = ffi.Pointer>; -typedef SSLReadFuncFunction = OSStatus Function(SSLConnectionRef connection, - ffi.Pointer data, ffi.Pointer dataLength); -typedef DartSSLReadFuncFunction = DartSInt32 Function( - SSLConnectionRef connection, - ffi.Pointer data, - ffi.Pointer dataLength); -typedef SSLConnectionRef = ffi.Pointer; -typedef SSLWriteFunc = ffi.Pointer>; -typedef SSLWriteFuncFunction = OSStatus Function(SSLConnectionRef connection, - ffi.Pointer data, ffi.Pointer dataLength); -typedef DartSSLWriteFuncFunction = DartSInt32 Function( - SSLConnectionRef connection, - ffi.Pointer data, - ffi.Pointer dataLength); +final class __CE_GeneralNames extends ffi.Struct { + @uint32() + external int numNames; -abstract class SSLAuthenticate { - static const int kNeverAuthenticate = 0; - static const int kAlwaysAuthenticate = 1; - static const int kTryAuthenticate = 2; + external ffi.Pointer generalName; } -/// NSURLSession is a replacement API for NSURLConnection. It provides -/// options that affect the policy of, and various aspects of the -/// mechanism by which NSURLRequest objects are retrieved from the -/// network. -/// -/// An NSURLSession may be bound to a delegate object. The delegate is -/// invoked for certain events during the lifetime of a session, such as -/// server authentication or determining whether a resource to be loaded -/// should be converted into a download. -/// -/// NSURLSession instances are thread-safe. -/// -/// The default NSURLSession uses a system provided delegate and is -/// appropriate to use in place of existing code that uses -/// +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] -/// -/// An NSURLSession creates NSURLSessionTask objects which represent the -/// action of a resource being loaded. These are analogous to -/// NSURLConnection objects but provide for more control and a unified -/// delegate model. -/// -/// NSURLSessionTask objects are always created in a suspended state and -/// must be sent the -resume message before they will execute. -/// -/// Subclasses of NSURLSessionTask are used to syntactically -/// differentiate between data and file downloads. -/// -/// An NSURLSessionDataTask receives the resource as a series of calls to -/// the URLSession:dataTask:didReceiveData: delegate method. This is type of -/// task most commonly associated with retrieving objects for immediate parsing -/// by the consumer. -/// -/// An NSURLSessionUploadTask differs from an NSURLSessionDataTask -/// in how its instance is constructed. Upload tasks are explicitly created -/// by referencing a file or data object to upload, or by utilizing the -/// -URLSession:task:needNewBodyStream: delegate message to supply an upload -/// body. -/// -/// An NSURLSessionDownloadTask will directly write the response data to -/// a temporary file. When completed, the delegate is sent -/// URLSession:downloadTask:didFinishDownloadingToURL: and given an opportunity -/// to move this file to a permanent location in its sandboxed container, or to -/// otherwise read the file. If canceled, an NSURLSessionDownloadTask can -/// produce a data blob that can be used to resume a download at a later -/// time. -/// -/// Beginning with iOS 9 and Mac OS X 10.11, NSURLSessionStream is -/// available as a task type. This allows for direct TCP/IP connection -/// to a given host and port with optional secure handshaking and -/// navigation of proxies. Data tasks may also be upgraded to a -/// NSURLSessionStream task via the HTTP Upgrade: header and appropriate -/// use of the pipelining option of NSURLSessionConfiguration. See RFC -/// 2817 and RFC 6455 for information about the Upgrade: header, and -/// comments below on turning data tasks into stream tasks. -/// -/// An NSURLSessionWebSocketTask is a task that allows clients to connect to servers supporting -/// WebSocket. The task will perform the HTTP handshake to upgrade the connection -/// and once the WebSocket handshake is successful, the client can read and write -/// messages that will be framed using the WebSocket protocol by the framework. -class NSURLSession extends NSObject { - NSURLSession._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CE_GeneralName = __CE_GeneralName; - /// Returns a [NSURLSession] that points to the same underlying object as [other]. - static NSURLSession castFrom(T other) { - return NSURLSession._(other._id, other._lib, retain: true, release: true); - } +final class __CE_AuthorityKeyID extends ffi.Struct { + @CSSM_BOOL() + external int keyIdentifierPresent; - /// Returns a [NSURLSession] that wraps the given raw object pointer. - static NSURLSession castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSession._(other, lib, retain: retain, release: release); - } + external SecAsn1Item keyIdentifier; - /// Returns whether [obj] is an instance of [NSURLSession]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSURLSession1); - } + @CSSM_BOOL() + external int generalNamesPresent; - /// The shared session uses the currently set global NSURLCache, - /// NSHTTPCookieStorage and NSURLCredentialStorage objects. - static NSURLSession getSharedSession(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_438( - _lib._class_NSURLSession1, _lib._sel_sharedSession1); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer generalNames; - /// Customization of NSURLSession occurs during creation of a new session. - /// If you only need to use the convenience routines with custom - /// configuration options it is not necessary to specify a delegate. - /// If you do specify a delegate, the delegate will be retained until after - /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. - static NSURLSession sessionWithConfiguration_( - NativeCupertinoHttp _lib, NSURLSessionConfiguration configuration) { - final _ret = _lib._objc_msgSend_454(_lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_1, configuration._id); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } + @CSSM_BOOL() + external int serialNumberPresent; - static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( - NativeCupertinoHttp _lib, - NSURLSessionConfiguration configuration, - NSObject? delegate, - NSOperationQueue? queue) { - final _ret = _lib._objc_msgSend_455( - _lib._class_NSURLSession1, - _lib._sel_sessionWithConfiguration_delegate_delegateQueue_1, - configuration._id, - delegate?._id ?? ffi.nullptr, - queue?._id ?? ffi.nullptr); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } + external SecAsn1Item serialNumber; +} - NSOperationQueue get delegateQueue { - final _ret = _lib._objc_msgSend_420(_id, _lib._sel_delegateQueue1); - return NSOperationQueue._(_ret, _lib, retain: true, release: true); - } +typedef CE_GeneralNames = __CE_GeneralNames; - NSObject? get delegate { - final _ret = _lib._objc_msgSend_61(_id, _lib._sel_delegate1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } +final class __CE_ExtendedKeyUsage extends ffi.Struct { + @uint32() + external int numPurposes; - NSURLSessionConfiguration get configuration { - final _ret = _lib._objc_msgSend_439(_id, _lib._sel_configuration1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } + external CSSM_OID_PTR purposes; +} - /// The sessionDescription property is available for the developer to - /// provide a descriptive label for the session. - NSString? get sessionDescription { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_sessionDescription1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +typedef CSSM_OID_PTR = ffi.Pointer; - /// The sessionDescription property is available for the developer to - /// provide a descriptive label for the session. - set sessionDescription(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setSessionDescription_1, value?._id ?? ffi.nullptr); - } +final class __CE_BasicConstraints extends ffi.Struct { + @CSSM_BOOL() + external int cA; - /// -finishTasksAndInvalidate returns immediately and existing tasks will be allowed - /// to run to completion. New tasks may not be created. The session - /// will continue to make delegate callbacks until URLSession:didBecomeInvalidWithError: - /// has been issued. - /// - /// -finishTasksAndInvalidate and -invalidateAndCancel do not - /// have any effect on the shared session singleton. - /// - /// When invalidating a background session, it is not safe to create another background - /// session with the same identifier until URLSession:didBecomeInvalidWithError: has - /// been issued. - void finishTasksAndInvalidate() { - _lib._objc_msgSend_1(_id, _lib._sel_finishTasksAndInvalidate1); - } + @CSSM_BOOL() + external int pathLenConstraintPresent; - /// -invalidateAndCancel acts as -finishTasksAndInvalidate, but issues - /// -cancel to all outstanding tasks for this session. Note task - /// cancellation is subject to the state of the task, and some tasks may - /// have already have completed at the time they are sent -cancel. - void invalidateAndCancel() { - _lib._objc_msgSend_1(_id, _lib._sel_invalidateAndCancel1); - } + @uint32() + external int pathLenConstraint; +} - /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue. - void resetWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { - _lib._objc_msgSend_415( - _id, _lib._sel_resetWithCompletionHandler_1, completionHandler._id); - } +final class __CE_PolicyQualifierInfo extends ffi.Struct { + external SecAsn1Oid policyQualifierId; - /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue. - void flushWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { - _lib._objc_msgSend_415( - _id, _lib._sel_flushWithCompletionHandler_1, completionHandler._id); - } + external SecAsn1Item qualifier; +} - /// invokes completionHandler with outstanding data, upload and download tasks. - void getTasksWithCompletionHandler_( - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray completionHandler) { - _lib._objc_msgSend_456( - _id, _lib._sel_getTasksWithCompletionHandler_1, completionHandler._id); - } +final class __CE_PolicyInformation extends ffi.Struct { + external SecAsn1Oid certPolicyId; - /// invokes completionHandler with all outstanding tasks. - void getAllTasksWithCompletionHandler_( - ObjCBlock_ffiVoid_NSArray1 completionHandler) { - _lib._objc_msgSend_457(_id, _lib._sel_getAllTasksWithCompletionHandler_1, - completionHandler._id); - } + @uint32() + external int numPolicyQualifiers; - /// Creates a data task with the given request. The request may have a body stream. - NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_458( - _id, _lib._sel_dataTaskWithRequest_1, request._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer policyQualifiers; +} - /// Creates a data task to retrieve the contents of the given URL. - NSURLSessionDataTask dataTaskWithURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_459(_id, _lib._sel_dataTaskWithURL_1, url._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } +typedef CE_PolicyQualifierInfo = __CE_PolicyQualifierInfo; - /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( - NSURLRequest request, NSURL fileURL) { - final _ret = _lib._objc_msgSend_461(_id, - _lib._sel_uploadTaskWithRequest_fromFile_1, request._id, fileURL._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } +final class __CE_CertPolicies extends ffi.Struct { + @uint32() + external int numPolicies; - /// Creates an upload task with the given request. The body of the request is provided from the bodyData. - NSURLSessionUploadTask uploadTaskWithRequest_fromData_( - NSURLRequest request, NSData bodyData) { - final _ret = _lib._objc_msgSend_462(_id, - _lib._sel_uploadTaskWithRequest_fromData_1, request._id, bodyData._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer policies; +} - /// Creates an upload task from a resume data blob. Requires the server to support the latest resumable uploads - /// Internet-Draft from the HTTP Working Group, found at - /// https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/ - /// If resuming from an upload file, the file must still exist and be unmodified. If the upload cannot be successfully - /// resumed, URLSession:task:didCompleteWithError: will be called. - /// - /// - Parameter resumeData: Resume data blob from an incomplete upload, such as data returned by the cancelByProducingResumeData: method. - /// - Returns: A new session upload task, or nil if the resumeData is invalid. - NSURLSessionUploadTask uploadTaskWithResumeData_(NSData resumeData) { - final _ret = _lib._objc_msgSend_463( - _id, _lib._sel_uploadTaskWithResumeData_1, resumeData._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } +typedef CE_PolicyInformation = __CE_PolicyInformation; - /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. - NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_464( - _id, _lib._sel_uploadTaskWithStreamedRequest_1, request._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } +final class __CE_DistributionPointName extends ffi.Struct { + @ffi.UnsignedInt() + external int nameTypeAsInt; - /// Creates a download task with the given request. - NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_465( - _id, _lib._sel_downloadTaskWithRequest_1, request._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } + __CE_CrlDistributionPointNameType get nameType => + __CE_CrlDistributionPointNameType.fromValue(nameTypeAsInt); - /// Creates a download task to download the contents of the given URL. - NSURLSessionDownloadTask downloadTaskWithURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_466(_id, _lib._sel_downloadTaskWithURL_1, url._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } + external UnnamedUnion5 dpn; +} - /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. - NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData resumeData) { - final _ret = _lib._objc_msgSend_467( - _id, _lib._sel_downloadTaskWithResumeData_1, resumeData._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +enum __CE_CrlDistributionPointNameType { + CE_CDNT_FullName(0), + CE_CDNT_NameRelativeToCrlIssuer(1); - /// Creates a bidirectional stream task to a given host and port. - NSURLSessionStreamTask streamTaskWithHostName_port_( - NSString hostname, DartNSInteger port) { - final _ret = _lib._objc_msgSend_470( - _id, _lib._sel_streamTaskWithHostName_port_1, hostname._id, port); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } + final int value; + const __CE_CrlDistributionPointNameType(this.value); - /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. - /// The NSNetService will be resolved before any IO completes. - NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { - final _ret = _lib._objc_msgSend_471( - _id, _lib._sel_streamTaskWithNetService_1, service._id); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } + static __CE_CrlDistributionPointNameType fromValue(int value) => + switch (value) { + 0 => CE_CDNT_FullName, + 1 => CE_CDNT_NameRelativeToCrlIssuer, + _ => throw ArgumentError( + "Unknown value for __CE_CrlDistributionPointNameType: $value"), + }; +} - /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. - NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL url) { - final _ret = - _lib._objc_msgSend_478(_id, _lib._sel_webSocketTaskWithURL_1, url._id); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } +final class UnnamedUnion5 extends ffi.Union { + external ffi.Pointer fullName; - /// Creates a WebSocket task given the url and an array of protocols. The protocols will be used in the WebSocket handshake to - /// negotiate a preferred protocol with the server - /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC - NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( - NSURL url, NSArray protocols) { - final _ret = _lib._objc_msgSend_479(_id, - _lib._sel_webSocketTaskWithURL_protocols_1, url._id, protocols._id); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } + external CSSM_X509_RDN_PTR rdn; +} - /// Creates a WebSocket task given the request. The request properties can be modified and will be used by the task during the HTTP handshake phase. - /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol - /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. - NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { - final _ret = _lib._objc_msgSend_480( - _id, _lib._sel_webSocketTaskWithRequest_1, request._id); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } +final class __CE_CRLDistributionPoint extends ffi.Struct { + external ffi.Pointer distPointName; - @override - NSURLSession init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } + @CSSM_BOOL() + external int reasonsPresent; - static NSURLSession new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_new1); - return NSURLSession._(_ret, _lib, retain: false, release: true); - } + @CE_CrlDistReasonFlags() + external int reasons; - /// data task convenience methods. These methods create tasks that - /// bypass the normal delegate calls for response and data delivery, - /// and provide a simple cancelable asynchronous interface to receiving - /// data. Errors will be returned in the NSURLErrorDomain, - /// see . The delegate, if any, will still be - /// called for authentication challenges. - NSURLSessionDataTask dataTaskWithRequest_completionHandler_( - NSURLRequest request, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_481( - _id, - _lib._sel_dataTaskWithRequest_completionHandler_1, - request._id, - completionHandler._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } - - NSURLSessionDataTask dataTaskWithURL_completionHandler_(NSURL url, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_482( - _id, - _lib._sel_dataTaskWithURL_completionHandler_1, - url._id, - completionHandler._id); - return NSURLSessionDataTask._(_ret, _lib, retain: true, release: true); - } - - /// upload convenience method. - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( - NSURLRequest request, - NSURL fileURL, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_483( - _id, - _lib._sel_uploadTaskWithRequest_fromFile_completionHandler_1, - request._id, - fileURL._id, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer crlIssuer; +} - NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( - NSURLRequest request, - NSData? bodyData, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_484( - _id, - _lib._sel_uploadTaskWithRequest_fromData_completionHandler_1, - request._id, - bodyData?._id ?? ffi.nullptr, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } - - /// Creates a URLSessionUploadTask from a resume data blob. If resuming from an upload - /// file, the file must still exist and be unmodified. - /// - /// - Parameter resumeData: Resume data blob from an incomplete upload, such as data returned by the cancelByProducingResumeData: method. - /// - Parameter completionHandler: The completion handler to call when the load request is complete. - /// - Returns: A new session upload task, or nil if the resumeData is invalid. - NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( - NSData resumeData, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_485( - _id, - _lib._sel_uploadTaskWithResumeData_completionHandler_1, - resumeData._id, - completionHandler._id); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } - - /// download task convenience methods. When a download successfully - /// completes, the NSURL will point to a file that must be read or - /// copied during the invocation of the completion routine. The file - /// will be removed automatically. - NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( - NSURLRequest request, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_486( - _id, - _lib._sel_downloadTaskWithRequest_completionHandler_1, - request._id, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +typedef CE_DistributionPointName = __CE_DistributionPointName; +typedef CE_CrlDistReasonFlags = uint8; - NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_(NSURL url, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_487( - _id, - _lib._sel_downloadTaskWithURL_completionHandler_1, - url._id, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } +final class __CE_CRLDistPointsSyntax extends ffi.Struct { + @uint32() + external int numDistPoints; - NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( - NSData resumeData, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _lib._objc_msgSend_488( - _id, - _lib._sel_downloadTaskWithResumeData_completionHandler_1, - resumeData._id, - completionHandler._id); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer distPoints; +} - static NSURLSession allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSession1, _lib._sel_allocWithZone_1, zone); - return NSURLSession._(_ret, _lib, retain: false, release: true); - } +typedef CE_CRLDistributionPoint = __CE_CRLDistributionPoint; - static NSURLSession alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLSession1, _lib._sel_alloc1); - return NSURLSession._(_ret, _lib, retain: false, release: true); - } +final class __CE_AccessDescription extends ffi.Struct { + external SecAsn1Oid accessMethod; + + external CE_GeneralName accessLocation; } -/// Configuration options for an NSURLSession. When a session is -/// created, a copy of the configuration object is made - you cannot -/// modify the configuration of a session after it has been created. -/// -/// The shared session uses the global singleton credential, cache -/// and cookie storage objects. -/// -/// An ephemeral session has no persistent disk storage for cookies, -/// cache or credentials. -/// -/// A background session can be used to perform networking operations -/// on behalf of a suspended application, within certain constraints. -class NSURLSessionConfiguration extends NSObject { - NSURLSessionConfiguration._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final class __CE_AuthorityInfoAccess extends ffi.Struct { + @uint32() + external int numAccessDescriptions; - /// Returns a [NSURLSessionConfiguration] that points to the same underlying object as [other]. - static NSURLSessionConfiguration castFrom(T other) { - return NSURLSessionConfiguration._(other._id, other._lib, - retain: true, release: true); - } + external ffi.Pointer accessDescriptions; +} - /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. - static NSURLSessionConfiguration castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionConfiguration._(other, lib, - retain: retain, release: release); - } +typedef CE_AccessDescription = __CE_AccessDescription; - /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionConfiguration1); - } +final class __CE_SemanticsInformation extends ffi.Struct { + external ffi.Pointer semanticsIdentifier; - static NSURLSessionConfiguration getDefaultSessionConfiguration( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_439(_lib._class_NSURLSessionConfiguration1, - _lib._sel_defaultSessionConfiguration1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer + nameRegistrationAuthorities; +} - static NSURLSessionConfiguration getEphemeralSessionConfiguration( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_439(_lib._class_NSURLSessionConfiguration1, - _lib._sel_ephemeralSessionConfiguration1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +typedef CE_NameRegistrationAuthorities = CE_GeneralNames; - static NSURLSessionConfiguration - backgroundSessionConfigurationWithIdentifier_( - NativeCupertinoHttp _lib, NSString identifier) { - final _ret = _lib._objc_msgSend_440( - _lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfigurationWithIdentifier_1, - identifier._id); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +final class __CE_QC_Statement extends ffi.Struct { + external SecAsn1Oid statementId; - /// identifier for the background session configuration - NSString? get identifier { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_identifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + external ffi.Pointer semanticsInfo; - /// default cache policy for requests - int get requestCachePolicy { - return _lib._objc_msgSend_344(_id, _lib._sel_requestCachePolicy1); - } + external ffi.Pointer otherInfo; +} - /// default cache policy for requests - set requestCachePolicy(int value) { - return _lib._objc_msgSend_422( - _id, _lib._sel_setRequestCachePolicy_1, value); - } +typedef CE_SemanticsInformation = __CE_SemanticsInformation; - /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. - DartNSTimeInterval get timeoutIntervalForRequest { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_90_fpret(_id, _lib._sel_timeoutIntervalForRequest1) - : _lib._objc_msgSend_90(_id, _lib._sel_timeoutIntervalForRequest1); - } +final class __CE_QC_Statements extends ffi.Struct { + @uint32() + external int numQCStatements; - /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. - set timeoutIntervalForRequest(DartNSTimeInterval value) { - return _lib._objc_msgSend_411( - _id, _lib._sel_setTimeoutIntervalForRequest_1, value); - } + external ffi.Pointer qcStatements; +} - /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. - DartNSTimeInterval get timeoutIntervalForResource { - return _lib._objc_msgSend_useVariants1 - ? _lib._objc_msgSend_90_fpret( - _id, _lib._sel_timeoutIntervalForResource1) - : _lib._objc_msgSend_90(_id, _lib._sel_timeoutIntervalForResource1); - } +typedef CE_QC_Statement = __CE_QC_Statement; - /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. - set timeoutIntervalForResource(DartNSTimeInterval value) { - return _lib._objc_msgSend_411( - _id, _lib._sel_setTimeoutIntervalForResource_1, value); - } +final class __CE_IssuingDistributionPoint extends ffi.Struct { + external ffi.Pointer distPointName; - /// type of service for requests. - int get networkServiceType { - return _lib._objc_msgSend_345(_id, _lib._sel_networkServiceType1); - } + @CSSM_BOOL() + external int onlyUserCertsPresent; - /// type of service for requests. - set networkServiceType(int value) { - return _lib._objc_msgSend_423( - _id, _lib._sel_setNetworkServiceType_1, value); - } + @CSSM_BOOL() + external int onlyUserCerts; - /// allow request to route over cellular. - bool get allowsCellularAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsCellularAccess1); - } + @CSSM_BOOL() + external int onlyCACertsPresent; - /// allow request to route over cellular. - set allowsCellularAccess(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setAllowsCellularAccess_1, value); - } + @CSSM_BOOL() + external int onlyCACerts; - /// allow request to route over expensive networks. Defaults to YES. - bool get allowsExpensiveNetworkAccess { - return _lib._objc_msgSend_11(_id, _lib._sel_allowsExpensiveNetworkAccess1); - } + @CSSM_BOOL() + external int onlySomeReasonsPresent; - /// allow request to route over expensive networks. Defaults to YES. - set allowsExpensiveNetworkAccess(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setAllowsExpensiveNetworkAccess_1, value); - } + @CE_CrlDistReasonFlags() + external int onlySomeReasons; - /// allow request to route over networks in constrained mode. Defaults to YES. - bool get allowsConstrainedNetworkAccess { - return _lib._objc_msgSend_11( - _id, _lib._sel_allowsConstrainedNetworkAccess1); - } + @CSSM_BOOL() + external int indirectCrlPresent; - /// allow request to route over networks in constrained mode. Defaults to YES. - set allowsConstrainedNetworkAccess(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setAllowsConstrainedNetworkAccess_1, value); - } + @CSSM_BOOL() + external int indirectCrl; +} - /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. - bool get requiresDNSSECValidation { - return _lib._objc_msgSend_11(_id, _lib._sel_requiresDNSSECValidation1); - } +final class __CE_GeneralSubtree extends ffi.Struct { + external ffi.Pointer base; - /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. - set requiresDNSSECValidation(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setRequiresDNSSECValidation_1, value); - } + @uint32() + external int minimum; - /// Causes tasks to wait for network connectivity to become available, rather - /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) - /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest - /// property does not apply, but the timeoutIntervalForResource property does. - /// - /// Unsatisfactory connectivity (that requires waiting) includes cases where the - /// device has limited or insufficient connectivity for a task (e.g., only has a - /// cellular connection but the allowsCellularAccess property is NO, or requires - /// a VPN connection in order to reach the desired host). - /// - /// Default value is NO. Ignored by background sessions, as background sessions - /// always wait for connectivity. - bool get waitsForConnectivity { - return _lib._objc_msgSend_11(_id, _lib._sel_waitsForConnectivity1); - } + @CSSM_BOOL() + external int maximumPresent; - /// Causes tasks to wait for network connectivity to become available, rather - /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) - /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest - /// property does not apply, but the timeoutIntervalForResource property does. - /// - /// Unsatisfactory connectivity (that requires waiting) includes cases where the - /// device has limited or insufficient connectivity for a task (e.g., only has a - /// cellular connection but the allowsCellularAccess property is NO, or requires - /// a VPN connection in order to reach the desired host). - /// - /// Default value is NO. Ignored by background sessions, as background sessions - /// always wait for connectivity. - set waitsForConnectivity(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setWaitsForConnectivity_1, value); - } + @uint32() + external int maximum; +} - /// allows background tasks to be scheduled at the discretion of the system for optimal performance. - bool get discretionary { - return _lib._objc_msgSend_11(_id, _lib._sel_isDiscretionary1); - } +final class __CE_GeneralSubtrees extends ffi.Struct { + @uint32() + external int numSubtrees; - /// allows background tasks to be scheduled at the discretion of the system for optimal performance. - set discretionary(bool value) { - return _lib._objc_msgSend_386(_id, _lib._sel_setDiscretionary_1, value); - } + external ffi.Pointer subtrees; +} - /// The identifier of the shared data container into which files in background sessions should be downloaded. - /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or - /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. - NSString? get sharedContainerIdentifier { - final _ret = - _lib._objc_msgSend_55(_id, _lib._sel_sharedContainerIdentifier1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +typedef CE_GeneralSubtree = __CE_GeneralSubtree; - /// The identifier of the shared data container into which files in background sessions should be downloaded. - /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or - /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. - set sharedContainerIdentifier(NSString? value) { - return _lib._objc_msgSend_395(_id, _lib._sel_setSharedContainerIdentifier_1, - value?._id ?? ffi.nullptr); - } +final class __CE_NameConstraints extends ffi.Struct { + external ffi.Pointer permitted; - /// Allows the app to be resumed or launched in the background when tasks in background sessions complete - /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: - /// and the default value is YES. - /// - /// NOTE: macOS apps based on AppKit do not support background launch. - bool get sessionSendsLaunchEvents { - return _lib._objc_msgSend_11(_id, _lib._sel_sessionSendsLaunchEvents1); - } + external ffi.Pointer excluded; +} - /// Allows the app to be resumed or launched in the background when tasks in background sessions complete - /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: - /// and the default value is YES. - /// - /// NOTE: macOS apps based on AppKit do not support background launch. - set sessionSendsLaunchEvents(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setSessionSendsLaunchEvents_1, value); - } +typedef CE_GeneralSubtrees = __CE_GeneralSubtrees; - /// The proxy dictionary, as described by - NSDictionary? get connectionProxyDictionary { - final _ret = - _lib._objc_msgSend_288(_id, _lib._sel_connectionProxyDictionary1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } +final class __CE_PolicyMapping extends ffi.Struct { + external SecAsn1Oid issuerDomainPolicy; - /// The proxy dictionary, as described by - set connectionProxyDictionary(NSDictionary? value) { - return _lib._objc_msgSend_425(_id, _lib._sel_setConnectionProxyDictionary_1, - value?._id ?? ffi.nullptr); - } + external SecAsn1Oid subjectDomainPolicy; +} - /// The minimum allowable versions of the TLS protocol, from - int get TLSMinimumSupportedProtocol { - return _lib._objc_msgSend_441(_id, _lib._sel_TLSMinimumSupportedProtocol1); - } +final class __CE_PolicyMappings extends ffi.Struct { + @uint32() + external int numPolicyMappings; - /// The minimum allowable versions of the TLS protocol, from - set TLSMinimumSupportedProtocol(int value) { - return _lib._objc_msgSend_442( - _id, _lib._sel_setTLSMinimumSupportedProtocol_1, value); - } + external ffi.Pointer policyMappings; +} - /// The maximum allowable versions of the TLS protocol, from - int get TLSMaximumSupportedProtocol { - return _lib._objc_msgSend_441(_id, _lib._sel_TLSMaximumSupportedProtocol1); - } +typedef CE_PolicyMapping = __CE_PolicyMapping; - /// The maximum allowable versions of the TLS protocol, from - set TLSMaximumSupportedProtocol(int value) { - return _lib._objc_msgSend_442( - _id, _lib._sel_setTLSMaximumSupportedProtocol_1, value); - } +final class __CE_PolicyConstraints extends ffi.Struct { + @CSSM_BOOL() + external int requireExplicitPolicyPresent; - /// The minimum allowable versions of the TLS protocol, from - int get TLSMinimumSupportedProtocolVersion { - return _lib._objc_msgSend_443( - _id, _lib._sel_TLSMinimumSupportedProtocolVersion1); - } + @uint32() + external int requireExplicitPolicy; - /// The minimum allowable versions of the TLS protocol, from - set TLSMinimumSupportedProtocolVersion(int value) { - return _lib._objc_msgSend_444( - _id, _lib._sel_setTLSMinimumSupportedProtocolVersion_1, value); - } + @CSSM_BOOL() + external int inhibitPolicyMappingPresent; + + @uint32() + external int inhibitPolicyMapping; +} + +final class CE_Data extends ffi.Union { + external CE_AuthorityKeyID authorityKeyID; + + external CE_SubjectKeyID subjectKeyID; + + @CE_KeyUsage() + external int keyUsage; - /// The maximum allowable versions of the TLS protocol, from - int get TLSMaximumSupportedProtocolVersion { - return _lib._objc_msgSend_443( - _id, _lib._sel_TLSMaximumSupportedProtocolVersion1); - } + external CE_GeneralNames subjectAltName; - /// The maximum allowable versions of the TLS protocol, from - set TLSMaximumSupportedProtocolVersion(int value) { - return _lib._objc_msgSend_444( - _id, _lib._sel_setTLSMaximumSupportedProtocolVersion_1, value); - } + external CE_GeneralNames issuerAltName; - /// Allow the use of HTTP pipelining - bool get HTTPShouldUsePipelining { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldUsePipelining1); - } + external CE_ExtendedKeyUsage extendedKeyUsage; - /// Allow the use of HTTP pipelining - set HTTPShouldUsePipelining(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setHTTPShouldUsePipelining_1, value); - } + external CE_BasicConstraints basicConstraints; - /// Allow the session to set cookies on requests - bool get HTTPShouldSetCookies { - return _lib._objc_msgSend_11(_id, _lib._sel_HTTPShouldSetCookies1); - } + external CE_CertPolicies certPolicies; - /// Allow the session to set cookies on requests - set HTTPShouldSetCookies(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setHTTPShouldSetCookies_1, value); - } + @CE_NetscapeCertType() + external int netscapeCertType; - /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. - int get HTTPCookieAcceptPolicy { - return _lib._objc_msgSend_434(_id, _lib._sel_HTTPCookieAcceptPolicy1); - } + @CE_CrlNumber() + external int crlNumber; - /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. - set HTTPCookieAcceptPolicy(int value) { - return _lib._objc_msgSend_435( - _id, _lib._sel_setHTTPCookieAcceptPolicy_1, value); - } + @CE_DeltaCrl() + external int deltaCrl; - /// Specifies additional headers which will be set on outgoing requests. - /// Note that these headers are added to the request only if not already present. - NSDictionary? get HTTPAdditionalHeaders { - final _ret = _lib._objc_msgSend_288(_id, _lib._sel_HTTPAdditionalHeaders1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } + @CE_CrlReason() + external int crlReason; - /// Specifies additional headers which will be set on outgoing requests. - /// Note that these headers are added to the request only if not already present. - set HTTPAdditionalHeaders(NSDictionary? value) { - return _lib._objc_msgSend_425( - _id, _lib._sel_setHTTPAdditionalHeaders_1, value?._id ?? ffi.nullptr); - } + external CE_CRLDistPointsSyntax crlDistPoints; - /// The maximum number of simultaneous persistent connections per host - DartNSInteger get HTTPMaximumConnectionsPerHost { - return _lib._objc_msgSend_86(_id, _lib._sel_HTTPMaximumConnectionsPerHost1); - } + external CE_IssuingDistributionPoint issuingDistPoint; - /// The maximum number of simultaneous persistent connections per host - set HTTPMaximumConnectionsPerHost(DartNSInteger value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setHTTPMaximumConnectionsPerHost_1, value); - } + external CE_AuthorityInfoAccess authorityInfoAccess; - /// The cookie storage object to use, or nil to indicate that no cookies should be handled - NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _lib._objc_msgSend_445(_id, _lib._sel_HTTPCookieStorage1); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, _lib, retain: true, release: true); - } + external CE_QC_Statements qualifiedCertStatements; - /// The cookie storage object to use, or nil to indicate that no cookies should be handled - set HTTPCookieStorage(NSHTTPCookieStorage? value) { - return _lib._objc_msgSend_446( - _id, _lib._sel_setHTTPCookieStorage_1, value?._id ?? ffi.nullptr); - } + external CE_NameConstraints nameConstraints; - /// The credential storage object, or nil to indicate that no credential storage is to be used - NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _lib._objc_msgSend_447(_id, _lib._sel_URLCredentialStorage1); - return _ret.address == 0 - ? null - : NSURLCredentialStorage._(_ret, _lib, retain: true, release: true); - } + external CE_PolicyMappings policyMappings; - /// The credential storage object, or nil to indicate that no credential storage is to be used - set URLCredentialStorage(NSURLCredentialStorage? value) { - return _lib._objc_msgSend_448( - _id, _lib._sel_setURLCredentialStorage_1, value?._id ?? ffi.nullptr); - } + external CE_PolicyConstraints policyConstraints; - /// The URL resource cache, or nil to indicate that no caching is to be performed - NSURLCache? get URLCache { - final _ret = _lib._objc_msgSend_449(_id, _lib._sel_URLCache1); - return _ret.address == 0 - ? null - : NSURLCache._(_ret, _lib, retain: true, release: true); - } + @CE_InhibitAnyPolicy() + external int inhibitAnyPolicy; - /// The URL resource cache, or nil to indicate that no caching is to be performed - set URLCache(NSURLCache? value) { - return _lib._objc_msgSend_450( - _id, _lib._sel_setURLCache_1, value?._id ?? ffi.nullptr); - } + external SecAsn1Item rawData; +} - /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open - /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) - bool get shouldUseExtendedBackgroundIdleMode { - return _lib._objc_msgSend_11( - _id, _lib._sel_shouldUseExtendedBackgroundIdleMode1); - } +typedef CE_AuthorityKeyID = __CE_AuthorityKeyID; +typedef CE_SubjectKeyID = SecAsn1Item; +typedef CE_KeyUsage = uint16; +typedef CE_ExtendedKeyUsage = __CE_ExtendedKeyUsage; +typedef CE_BasicConstraints = __CE_BasicConstraints; +typedef CE_CertPolicies = __CE_CertPolicies; +typedef CE_NetscapeCertType = uint16; +typedef CE_CrlNumber = uint32; +typedef CE_DeltaCrl = uint32; +typedef CE_CrlReason = uint32; +typedef CE_CRLDistPointsSyntax = __CE_CRLDistPointsSyntax; +typedef CE_IssuingDistributionPoint = __CE_IssuingDistributionPoint; +typedef CE_AuthorityInfoAccess = __CE_AuthorityInfoAccess; +typedef CE_QC_Statements = __CE_QC_Statements; +typedef CE_NameConstraints = __CE_NameConstraints; +typedef CE_PolicyMappings = __CE_PolicyMappings; +typedef CE_PolicyConstraints = __CE_PolicyConstraints; +typedef CE_InhibitAnyPolicy = uint32; - /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open - /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) - set shouldUseExtendedBackgroundIdleMode(bool value) { - return _lib._objc_msgSend_386( - _id, _lib._sel_setShouldUseExtendedBackgroundIdleMode_1, value); - } +final class __CE_DataAndType extends ffi.Struct { + @ffi.UnsignedInt() + external int typeAsInt; - /// An optional array of Class objects which subclass NSURLProtocol. - /// The Class will be sent +canInitWithRequest: when determining if - /// an instance of the class can be used for a given URL scheme. - /// You should not use +[NSURLProtocol registerClass:], as that - /// method will register your class with the default session rather - /// than with an instance of NSURLSession. - /// Custom NSURLProtocol subclasses are not available to background - /// sessions. - NSArray? get protocolClasses { - final _ret = _lib._objc_msgSend_188(_id, _lib._sel_protocolClasses1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } + __CE_DataType get type => __CE_DataType.fromValue(typeAsInt); - /// An optional array of Class objects which subclass NSURLProtocol. - /// The Class will be sent +canInitWithRequest: when determining if - /// an instance of the class can be used for a given URL scheme. - /// You should not use +[NSURLProtocol registerClass:], as that - /// method will register your class with the default session rather - /// than with an instance of NSURLSession. - /// Custom NSURLProtocol subclasses are not available to background - /// sessions. - set protocolClasses(NSArray? value) { - return _lib._objc_msgSend_451( - _id, _lib._sel_setProtocolClasses_1, value?._id ?? ffi.nullptr); - } + external CE_Data extension1; - /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone - int get multipathServiceType { - return _lib._objc_msgSend_452(_id, _lib._sel_multipathServiceType1); - } + @CSSM_BOOL() + external int critical; +} - /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone - set multipathServiceType(int value) { - return _lib._objc_msgSend_453( - _id, _lib._sel_setMultipathServiceType_1, value); - } +enum __CE_DataType { + DT_AuthorityKeyID(0), + DT_SubjectKeyID(1), + DT_KeyUsage(2), + DT_SubjectAltName(3), + DT_IssuerAltName(4), + DT_ExtendedKeyUsage(5), + DT_BasicConstraints(6), + DT_CertPolicies(7), + DT_NetscapeCertType(8), + DT_CrlNumber(9), + DT_DeltaCrl(10), + DT_CrlReason(11), + DT_CrlDistributionPoints(12), + DT_IssuingDistributionPoint(13), + DT_AuthorityInfoAccess(14), + DT_Other(15), + DT_QC_Statements(16), + DT_NameConstraints(17), + DT_PolicyMappings(18), + DT_PolicyConstraints(19), + DT_InhibitAnyPolicy(20); + + final int value; + const __CE_DataType(this.value); + + static __CE_DataType fromValue(int value) => switch (value) { + 0 => DT_AuthorityKeyID, + 1 => DT_SubjectKeyID, + 2 => DT_KeyUsage, + 3 => DT_SubjectAltName, + 4 => DT_IssuerAltName, + 5 => DT_ExtendedKeyUsage, + 6 => DT_BasicConstraints, + 7 => DT_CertPolicies, + 8 => DT_NetscapeCertType, + 9 => DT_CrlNumber, + 10 => DT_DeltaCrl, + 11 => DT_CrlReason, + 12 => DT_CrlDistributionPoints, + 13 => DT_IssuingDistributionPoint, + 14 => DT_AuthorityInfoAccess, + 15 => DT_Other, + 16 => DT_QC_Statements, + 17 => DT_NameConstraints, + 18 => DT_PolicyMappings, + 19 => DT_PolicyConstraints, + 20 => DT_InhibitAnyPolicy, + _ => throw ArgumentError("Unknown value for __CE_DataType: $value"), + }; +} - @override - NSURLSessionConfiguration init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } +final class cssm_acl_process_subject_selector extends ffi.Struct { + @uint16() + external int version; - static NSURLSessionConfiguration new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionConfiguration1, _lib._sel_new1); - return NSURLSessionConfiguration._(_ret, _lib, - retain: false, release: true); - } + @uint16() + external int mask; - static NSURLSessionConfiguration backgroundSessionConfiguration_( - NativeCupertinoHttp _lib, NSString identifier) { - final _ret = _lib._objc_msgSend_440(_lib._class_NSURLSessionConfiguration1, - _lib._sel_backgroundSessionConfiguration_1, identifier._id); - return NSURLSessionConfiguration._(_ret, _lib, retain: true, release: true); - } + @uint32() + external int uid; - static NSURLSessionConfiguration allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionConfiguration1, - _lib._sel_allocWithZone_1, zone); - return NSURLSessionConfiguration._(_ret, _lib, - retain: false, release: true); - } + @uint32() + external int gid; +} - static NSURLSessionConfiguration alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionConfiguration1, _lib._sel_alloc1); - return NSURLSessionConfiguration._(_ret, _lib, - retain: false, release: true); - } +final class cssm_acl_keychain_prompt_selector extends ffi.Struct { + @uint16() + external int version; + + @uint16() + external int flags; } -class NSURLCredentialStorage extends _ObjCWrapper { - NSURLCredentialStorage._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final class cssm_appledl_open_parameters extends ffi.Struct { + @uint32() + external int length; - /// Returns a [NSURLCredentialStorage] that points to the same underlying object as [other]. - static NSURLCredentialStorage castFrom(T other) { - return NSURLCredentialStorage._(other._id, other._lib, - retain: true, release: true); - } + @uint32() + external int version; - /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. - static NSURLCredentialStorage castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCredentialStorage._(other, lib, - retain: retain, release: release); - } + @CSSM_BOOL() + external int autoCommit; - /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLCredentialStorage1); - } + @uint32() + external int mask; + + @mode_t() + external int mode; } -/// ! -/// @enum NSURLSessionMultipathServiceType -/// -/// @discussion The NSURLSessionMultipathServiceType enum defines constants that -/// can be used to specify the multipath service type to associate an NSURLSession. The -/// multipath service type determines whether multipath TCP should be attempted and the conditions -/// for creating and switching between subflows. Using these service types requires the appropriate entitlement. Any connection attempt will fail if the process does not have the required entitlement. -/// A primary interface is a generally less expensive interface in terms of both cost and power (such as WiFi or ethernet). A secondary interface is more expensive (such as 3G or LTE). -/// -/// @constant NSURLSessionMultipathServiceTypeNone Specifies that multipath tcp should not be used. Connections will use a single flow. -/// This is the default value. No entitlement is required to set this value. -/// -/// @constant NSURLSessionMultipathServiceTypeHandover Specifies that a secondary subflow should only be used -/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entitlement. -/// -/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secondary subflow should be used if the -/// primary subflow is not performing adequately (packet loss, high round trip times, bandwidth issues). The secondary -/// subflow will be created more aggressively than with NSURLSessionMultipathServiceTypeHandover. Requires the com.apple.developer.networking.multipath entitlement. -/// -/// @constant NSURLSessionMultipathServiceTypeAggregate Specifies that multiple subflows across multiple interfaces should be -/// used for better bandwidth. This mode is only available for experimentation on devices configured for development use. -/// It can be enabled in the Developer section of the Settings app. -abstract class NSURLSessionMultipathServiceType { - /// None - no multipath (default) - static const int NSURLSessionMultipathServiceTypeNone = 0; +final class cssm_applecspdl_db_settings_parameters extends ffi.Struct { + @uint32() + external int idleTimeout; - /// Handover - secondary flows brought up when primary flow is not performing adequately. - static const int NSURLSessionMultipathServiceTypeHandover = 1; + @uint8() + external int lockOnSleep; +} - /// Interactive - secondary flows created more aggressively. - static const int NSURLSessionMultipathServiceTypeInteractive = 2; +final class cssm_applecspdl_db_is_locked_parameters extends ffi.Struct { + @uint8() + external int isLocked; +} - /// Aggregate - multiple subflows used for greater bandwidth. - static const int NSURLSessionMultipathServiceTypeAggregate = 3; +final class cssm_applecspdl_db_change_password_parameters extends ffi.Struct { + external ffi.Pointer accessCredentials; } -void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_ACCESS_CREDENTIALS = cssm_access_credentials; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +final class CSSM_APPLE_TP_NAME_OID extends ffi.Struct { + external ffi.Pointer string; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.fromFunction(NativeCupertinoHttp lib, void Function(NSArray, NSArray, NSArray) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - NSArray._(arg0, lib, retain: true, release: true), - NSArray._(arg1, lib, retain: true, release: true), - NSArray._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + external ffi.Pointer oid; +} - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray.listener(NativeCupertinoHttp lib, void Function(NSArray, NSArray, NSArray) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - NSArray._(arg0, lib, retain: true, release: true), - NSArray._(arg1, lib, retain: true, release: true), - NSArray._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; +final class CSSM_APPLE_TP_CERT_REQUEST extends ffi.Struct { + @CSSM_CSP_HANDLE() + external int cspHand; - void call(NSArray arg0, NSArray arg1, NSArray arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(_id, arg0._id, arg1._id, arg2._id); -} + @CSSM_CL_HANDLE() + external int clHand; -void _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSArray1_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray1_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSArray1_closureRegistry[block.ref.target.address]!( - arg0); - -class ObjCBlock_ffiVoid_NSArray1 extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray1._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + @uint32() + external int serialNumber; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSArray1.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @uint32() + external int numSubjectNames; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSArray1.fromFunction( - NativeCupertinoHttp lib, void Function(NSArray) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSArray1_registerClosure( - (ffi.Pointer arg0) => - fn(NSArray._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + external ffi.Pointer subjectNames; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSArray1.listener( - NativeCupertinoHttp lib, void Function(NSArray) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSArray1_registerClosure( - (ffi.Pointer arg0) => - fn(NSArray._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSArray arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0._id); -} + @uint32() + external int numIssuerNames; -/// An NSURLSessionUploadTask does not currently provide any additional -/// functionality over an NSURLSessionDataTask. All delegate messages -/// that may be sent referencing an NSURLSessionDataTask equally apply -/// to NSURLSessionUploadTasks. -class NSURLSessionUploadTask extends NSURLSessionDataTask { - NSURLSessionUploadTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + external ffi.Pointer issuerNames; - /// Returns a [NSURLSessionUploadTask] that points to the same underlying object as [other]. - static NSURLSessionUploadTask castFrom(T other) { - return NSURLSessionUploadTask._(other._id, other._lib, - retain: true, release: true); - } + external CSSM_X509_NAME_PTR issuerNameX509; - /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. - static NSURLSessionUploadTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionUploadTask._(other, lib, - retain: retain, release: release); - } + external ffi.Pointer certPublicKey; - /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionUploadTask1); - } + external ffi.Pointer issuerPrivateKey; - @override - NSURLSessionUploadTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionUploadTask._(_ret, _lib, retain: true, release: true); - } + @CSSM_ALGORITHMS() + external int signatureAlg; - static NSURLSessionUploadTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionUploadTask1, _lib._sel_new1); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } + external SecAsn1Oid signatureOid; - /// Cancels an upload and calls the completion handler with resume data for later use. - /// resumeData will be nil if the server does not support the latest resumable uploads - /// Internet-Draft from the HTTP Working Group, found at - /// https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/ - /// - /// - Parameter completionHandler: The completion handler to call when the upload has been successfully canceled. - void cancelByProducingResumeData_( - ObjCBlock_ffiVoid_NSData completionHandler) { - _lib._objc_msgSend_460( - _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); - } + @uint32() + external int notBefore; - static NSURLSessionUploadTask allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionUploadTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } + @uint32() + external int notAfter; - static NSURLSessionUploadTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionUploadTask1, _lib._sel_alloc1); - return NSURLSessionUploadTask._(_ret, _lib, retain: false, release: true); - } -} + @uint32() + external int numExtensions; -void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSData_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSData_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + external ffi.Pointer extensions; + + external ffi.Pointer challengeString; } -void _ObjCBlock_ffiVoid_NSData_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSData_closureRegistry[block.ref.target.address]!(arg0); +typedef CSSM_X509_NAME_PTR = ffi.Pointer; +typedef CSSM_KEY = cssm_key; +typedef CE_DataAndType = __CE_DataAndType; -class ObjCBlock_ffiVoid_NSData extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSData._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +final class CSSM_APPLE_TP_SSL_OPTIONS extends ffi.Struct { + @uint32() + external int Version; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + @uint32() + external int ServerNameLen; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData.fromFunction( - NativeCupertinoHttp lib, void Function(NSData?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + external ffi.Pointer ServerName; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData.listener( - NativeCupertinoHttp lib, void Function(NSData?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSData? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); + @uint32() + external int Flags; } -/// NSURLSessionDownloadTask is a task that represents a download to -/// local storage. -class NSURLSessionDownloadTask extends NSURLSessionTask { - NSURLSessionDownloadTask._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +final class CSSM_APPLE_TP_CRL_OPTIONS extends ffi.Struct { + @uint32() + external int Version; - /// Returns a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. - static NSURLSessionDownloadTask castFrom(T other) { - return NSURLSessionDownloadTask._(other._id, other._lib, - retain: true, release: true); - } + @CSSM_APPLE_TP_CRL_OPT_FLAGS() + external int CrlFlags; - /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. - static NSURLSessionDownloadTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionDownloadTask._(other, lib, - retain: retain, release: release); - } + external CSSM_DL_DB_HANDLE_PTR crlStore; +} - /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionDownloadTask1); - } +typedef CSSM_APPLE_TP_CRL_OPT_FLAGS = uint32; - /// Cancel the download (and calls the superclass -cancel). If - /// conditions will allow for resuming the download in the future, the - /// callback will be called with an opaque data blob, which may be used - /// with -downloadTaskWithResumeData: to attempt to resume the download. - /// If resume data cannot be created, the completion handler will be - /// called with nil resumeData. - void cancelByProducingResumeData_( - ObjCBlock_ffiVoid_NSData completionHandler) { - _lib._objc_msgSend_460( - _id, _lib._sel_cancelByProducingResumeData_1, completionHandler._id); - } +final class CSSM_APPLE_TP_SMIME_OPTIONS extends ffi.Struct { + @uint32() + external int Version; - @override - NSURLSessionDownloadTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: true, release: true); - } + @CE_KeyUsage() + external int IntendedUsage; - static NSURLSessionDownloadTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_new1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); - } + @uint32() + external int SenderEmailLen; - static NSURLSessionDownloadTask allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer SenderEmail; +} - static NSURLSessionDownloadTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionDownloadTask1, _lib._sel_alloc1); - return NSURLSessionDownloadTask._(_ret, _lib, retain: false, release: true); - } +final class CSSM_APPLE_TP_ACTION_DATA extends ffi.Struct { + @uint32() + external int Version; + + @CSSM_APPLE_TP_ACTION_FLAGS() + external int ActionFlags; } -/// An NSURLSessionStreamTask provides an interface to perform reads -/// and writes to a TCP/IP stream created via NSURLSession. This task -/// may be explicitly created from an NSURLSession, or created as a -/// result of the appropriate disposition response to a -/// -URLSession:dataTask:didReceiveResponse: delegate message. -/// -/// NSURLSessionStreamTask can be used to perform asynchronous reads -/// and writes. Reads and writes are enqueued and executed serially, -/// with the completion handler being invoked on the sessions delegate -/// queue. If an error occurs, or the task is canceled, all -/// outstanding read and write calls will have their completion -/// handlers invoked with an appropriate error. -/// -/// It is also possible to create NSInputStream and NSOutputStream -/// instances from an NSURLSessionTask by sending -/// -captureStreams to the task. All outstanding reads and writes are -/// completed before the streams are created. Once the streams are -/// delivered to the session delegate, the task is considered complete -/// and will receive no more messages. These streams are -/// disassociated from the underlying session. -class NSURLSessionStreamTask extends NSURLSessionTask { - NSURLSessionStreamTask._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_APPLE_TP_ACTION_FLAGS = uint32; - /// Returns a [NSURLSessionStreamTask] that points to the same underlying object as [other]. - static NSURLSessionStreamTask castFrom(T other) { - return NSURLSessionStreamTask._(other._id, other._lib, - retain: true, release: true); - } +final class CSSM_TP_APPLE_EVIDENCE_INFO extends ffi.Struct { + @CSSM_TP_APPLE_CERT_STATUS() + external int StatusBits; - /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. - static NSURLSessionStreamTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionStreamTask._(other, lib, - retain: retain, release: release); - } + @uint32() + external int NumStatusCodes; - /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionStreamTask1); - } + external ffi.Pointer StatusCodes; - /// Read minBytes, or at most maxBytes bytes and invoke the completion - /// handler on the sessions delegate queue with the data or an error. - /// If an error occurs, any outstanding reads will also fail, and new - /// read requests will error out immediately. - void readDataOfMinLength_maxLength_timeout_completionHandler_( - DartNSUInteger minBytes, - DartNSUInteger maxBytes, - DartNSTimeInterval timeout, - ObjCBlock_ffiVoid_NSData_bool_NSError completionHandler) { - _lib._objc_msgSend_468( - _id, - _lib._sel_readDataOfMinLength_maxLength_timeout_completionHandler_1, - minBytes, - maxBytes, - timeout, - completionHandler._id); - } + @uint32() + external int Index; - /// Write the data completely to the underlying socket. If all the - /// bytes have not been written by the timeout, a timeout error will - /// occur. Note that invocation of the completion handler does not - /// guarantee that the remote side has received all the bytes, only - /// that they have been written to the kernel. - void writeData_timeout_completionHandler_(NSData data, - DartNSTimeInterval timeout, ObjCBlock_ffiVoid_NSError completionHandler) { - _lib._objc_msgSend_469(_id, _lib._sel_writeData_timeout_completionHandler_1, - data._id, timeout, completionHandler._id); - } + external CSSM_DL_DB_HANDLE DlDbHandle; - /// -captureStreams completes any already enqueued reads - /// and writes, and then invokes the - /// URLSession:streamTask:didBecomeInputStream:outputStream: delegate - /// message. When that message is received, the task object is - /// considered completed and will not receive any more delegate - /// messages. - void captureStreams() { - _lib._objc_msgSend_1(_id, _lib._sel_captureStreams1); - } + external CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord; +} - /// Enqueue a request to close the write end of the underlying socket. - /// All outstanding IO will complete before the write side of the - /// socket is closed. The server, however, may continue to write bytes - /// back to the client, so best practice is to continue reading from - /// the server until you receive EOF. - void closeWrite() { - _lib._objc_msgSend_1(_id, _lib._sel_closeWrite1); - } +typedef CSSM_TP_APPLE_CERT_STATUS = uint32; +typedef CSSM_DL_DB_HANDLE = cssm_dl_db_handle; +typedef CSSM_DB_UNIQUE_RECORD_PTR = ffi.Pointer; - /// Enqueue a request to close the read side of the underlying socket. - /// All outstanding IO will complete before the read side is closed. - /// You may continue writing to the server. - void closeRead() { - _lib._objc_msgSend_1(_id, _lib._sel_closeRead1); - } +final class CSSM_TP_APPLE_EVIDENCE_HEADER extends ffi.Struct { + @uint32() + external int Version; +} + +final class CSSM_APPLE_CL_CSR_REQUEST extends ffi.Struct { + external CSSM_X509_NAME_PTR subjectNameX509; - /// Begin encrypted handshake. The handshake begins after all pending - /// IO has completed. TLS authentication callbacks are sent to the - /// session's -URLSession:task:didReceiveChallenge:completionHandler: - void startSecureConnection() { - _lib._objc_msgSend_1(_id, _lib._sel_startSecureConnection1); - } + @CSSM_ALGORITHMS() + external int signatureAlg; - /// Cleanly close a secure connection after all pending secure IO has - /// completed. - /// - /// @warning This API is non-functional. - void stopSecureConnection() { - _lib._objc_msgSend_1(_id, _lib._sel_stopSecureConnection1); - } + external SecAsn1Oid signatureOid; - @override - NSURLSessionStreamTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionStreamTask._(_ret, _lib, retain: true, release: true); - } + @CSSM_CSP_HANDLE() + external int cspHand; - static NSURLSessionStreamTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionStreamTask1, _lib._sel_new1); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer subjectPublicKey; - static NSURLSessionStreamTask allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionStreamTask1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer subjectPrivateKey; - static NSURLSessionStreamTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionStreamTask1, _lib._sel_alloc1); - return NSURLSessionStreamTask._(_ret, _lib, retain: false, release: true); - } + external ffi.Pointer challengeString; } -void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => +final class __SecTrust extends ffi.Opaque {} + +typedef SecTrustRef = ffi.Pointer<__SecTrust>; + +enum SecTrustResultType { + kSecTrustResultInvalid(0), + kSecTrustResultProceed(1), + kSecTrustResultConfirm(2), + kSecTrustResultDeny(3), + kSecTrustResultUnspecified(4), + kSecTrustResultRecoverableTrustFailure(5), + kSecTrustResultFatalTrustFailure(6), + kSecTrustResultOtherError(7); + + final int value; + const SecTrustResultType(this.value); + + static SecTrustResultType fromValue(int value) => switch (value) { + 0 => kSecTrustResultInvalid, + 1 => kSecTrustResultProceed, + 2 => kSecTrustResultConfirm, + 3 => kSecTrustResultDeny, + 4 => kSecTrustResultUnspecified, + 5 => kSecTrustResultRecoverableTrustFailure, + 6 => kSecTrustResultFatalTrustFailure, + 7 => kSecTrustResultOtherError, + _ => + throw ArgumentError("Unknown value for SecTrustResultType: $value"), + }; +} + +typedef SecTrustCallback = ffi.Pointer; +typedef DartSecTrustCallback + = objc.ObjCBlock, ffi.Uint32)>; +void _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_fnPtrTrampoline( + ffi.Pointer block, SecTrustRef arg0, int arg1) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - void Function(ffi.Pointer, bool, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_NSData_bool_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_bool_NSError._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + ffi.Void Function(SecTrustRef arg0, ffi.Uint32 arg1)>>() + .asFunction()(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, SecTrustRef, ffi.Uint32)>( + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureTrampoline( + ffi.Pointer block, SecTrustRef arg0, int arg1) => + (objc.getBlockClosure(block) as void Function(SecTrustRef, int))( + arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, SecTrustRef, ffi.Uint32)>( + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_listenerTrampoline( + ffi.Pointer block, SecTrustRef arg0, int arg1) { + (objc.getBlockClosure(block) as void Function(SecTrustRef, int))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, SecTrustRef, ffi.Uint32)> + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_listenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, SecTrustRef, + ffi.Uint32)>.listener( + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, ffi.Uint32)>`. +abstract final class ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock, ffi.Uint32)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__SecTrust>, + ffi.Uint32)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__SecTrust>, ffi.Uint32)> fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock, ffi.Uint32)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSData_bool_NSError.fromFunction( - NativeCupertinoHttp lib, void Function(NSData, bool, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Bool, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( - NSData._(arg0, lib, retain: true, release: true), - arg1, - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__SecTrust>, ffi.Uint32)> fromFunction( + void Function(SecTrustRef, SecTrustResultType) fn) => + objc.ObjCBlock, ffi.Uint32)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_closureCallable, + (SecTrustRef arg0, int arg1) => + fn(arg0, SecTrustResultType.fromValue(arg1))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -83898,112 +55658,138 @@ class ObjCBlock_ffiVoid_NSData_bool_NSError extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData_bool_NSError.listener( - NativeCupertinoHttp lib, void Function(NSData, bool, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(NSData._(arg0, lib, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSData arg0, bool arg1, NSError? arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - bool, ffi.Pointer)>()( - _id, arg0._id, arg1, arg2?._id ?? ffi.nullptr); + static objc.ObjCBlock, ffi.Uint32)> + listener(void Function(SecTrustRef, SecTrustResultType) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_listenerCallable + .nativeFunction + .cast(), + (SecTrustRef arg0, int arg1) => + fn(arg0, SecTrustResultType.fromValue(arg1))); + final wrapper = _wrapListenerBlock_129ffij(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__SecTrust>, ffi.Uint32)>(wrapper, + retain: false, release: true); + } } -void _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSError_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSError_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +/// Call operator for `objc.ObjCBlock, ffi.Uint32)>`. +extension ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_CallExtension + on objc.ObjCBlock, ffi.Uint32)> { + void call(SecTrustRef arg0, SecTrustResultType arg1) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + SecTrustRef arg0, ffi.Uint32 arg1)>>() + .asFunction< + void Function(ffi.Pointer, SecTrustRef, + int)>()(ref.pointer, arg0, arg1.value); } -void _ObjCBlock_ffiVoid_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSError_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSError._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +typedef SecTrustWithErrorCallback = ffi.Pointer; +typedef DartSecTrustWithErrorCallback = objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer<__SecTrust>, ffi.Bool, ffi.Pointer<__CFError>)>; +void _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_fnPtrTrampoline( + ffi.Pointer block, + SecTrustRef arg0, + bool arg1, + CFErrorRef arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() + .asFunction()( + arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, SecTrustRef, + ffi.Bool, CFErrorRef)>( + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureTrampoline( + ffi.Pointer block, + SecTrustRef arg0, + bool arg1, + CFErrorRef arg2) => + (objc.getBlockClosure(block) as void Function( + SecTrustRef, bool, CFErrorRef))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, SecTrustRef, + ffi.Bool, CFErrorRef)>( + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_listenerTrampoline( + ffi.Pointer block, + SecTrustRef arg0, + bool arg1, + CFErrorRef arg2) { + (objc.getBlockClosure(block) as void Function(SecTrustRef, bool, CFErrorRef))( + arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, SecTrustRef, ffi.Bool, CFErrorRef)> + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_listenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, SecTrustRef, + ffi.Bool, CFErrorRef)>.listener( + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, ffi.Bool, ffi.Pointer<__CFError>)>`. +abstract final class ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer<__SecTrust>, ffi.Bool, ffi.Pointer<__CFError>)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__SecTrust>, ffi.Bool, + ffi.Pointer<__CFError>)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSError.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi - .NativeFunction arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static objc + .ObjCBlock, ffi.Bool, ffi.Pointer<__CFError>)> + fromFunctionPointer(ffi.Pointer> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__SecTrust>, ffi.Bool, + ffi.Pointer<__CFError>)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSError.fromFunction( - NativeCupertinoHttp lib, void Function(NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSError_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSError._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock, ffi.Bool, ffi.Pointer<__CFError>)> + fromFunction(void Function(SecTrustRef, bool, CFErrorRef) fn) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__SecTrust>, ffi.Bool, + ffi.Pointer<__CFError>)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_closureCallable, + (SecTrustRef arg0, bool arg1, CFErrorRef arg2) => + fn(arg0, arg1, arg2)), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -84014,371 +55800,1000 @@ class ObjCBlock_ffiVoid_NSError extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSError.listener( - NativeCupertinoHttp lib, void Function(NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSError_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSError._(arg0, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSError? arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, - ffi.Pointer)>()(_id, arg0?._id ?? ffi.nullptr); + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer<__SecTrust>, ffi.Bool, ffi.Pointer<__CFError>)> listener( + void Function(SecTrustRef, bool, CFErrorRef) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_listenerCallable + .nativeFunction + .cast(), + (SecTrustRef arg0, bool arg1, CFErrorRef arg2) => fn(arg0, arg1, arg2)); + final wrapper = _wrapListenerBlock_1458n52(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer<__SecTrust>, ffi.Bool, + ffi.Pointer<__CFError>)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, ffi.Bool, ffi.Pointer<__CFError>)>`. +extension ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer<__SecTrust>, ffi.Bool, ffi.Pointer<__CFError>)> { + void call(SecTrustRef arg0, bool arg1, CFErrorRef arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + SecTrustRef arg0, ffi.Bool arg1, CFErrorRef arg2)>>() + .asFunction< + void Function(ffi.Pointer, SecTrustRef, bool, + CFErrorRef)>()(ref.pointer, arg0, arg1, arg2); } -class NSNetService extends _ObjCWrapper { - NSNetService._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSNetService] that points to the same underlying object as [other]. - static NSNetService castFrom(T other) { - return NSNetService._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSNetService] that wraps the given raw object pointer. - static NSNetService castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNetService._(other, lib, retain: retain, release: release); - } +typedef SecKeyRef = ffi.Pointer<__SecKey>; +typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; - /// Returns whether [obj] is an instance of [NSNetService]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSNetService1); - } +enum SecTrustOptionFlags { + kSecTrustOptionAllowExpired(1), + kSecTrustOptionLeafIsCA(2), + kSecTrustOptionFetchIssuerFromNet(4), + kSecTrustOptionAllowExpiredRoot(8), + kSecTrustOptionRequireRevPerCert(16), + kSecTrustOptionUseTrustSettings(32), + kSecTrustOptionImplicitAnchors(64); + + final int value; + const SecTrustOptionFlags(this.value); + + static SecTrustOptionFlags fromValue(int value) => switch (value) { + 1 => kSecTrustOptionAllowExpired, + 2 => kSecTrustOptionLeafIsCA, + 4 => kSecTrustOptionFetchIssuerFromNet, + 8 => kSecTrustOptionAllowExpiredRoot, + 16 => kSecTrustOptionRequireRevPerCert, + 32 => kSecTrustOptionUseTrustSettings, + 64 => kSecTrustOptionImplicitAnchors, + _ => + throw ArgumentError("Unknown value for SecTrustOptionFlags: $value"), + }; } -/// A WebSocket task can be created with a ws or wss url. A client can also provide -/// a list of protocols it wishes to advertise during the WebSocket handshake phase. -/// Once the handshake is successfully completed the client will be notified through an optional delegate. -/// All reads and writes enqueued before the completion of the handshake will be queued up and -/// executed once the handshake succeeds. Before the handshake completes, the client can be called to handle -/// redirection or authentication using the same delegates as NSURLSessionTask. WebSocket task will also provide -/// support for cookies and will store cookies to the cookie storage on the session and will attach cookies to -/// outgoing HTTP handshake requests. -class NSURLSessionWebSocketTask extends NSURLSessionTask { - NSURLSessionWebSocketTask._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +typedef CSSM_TP_VERIFY_CONTEXT_RESULT_PTR + = ffi.Pointer; +typedef SecKeychainRef = ffi.Pointer<__SecKeychain>; +typedef SecIdentityRef = ffi.Pointer<__SecIdentity>; +typedef SSLCipherSuite = ffi.Uint16; +typedef DartSSLCipherSuite = int; - /// Returns a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. - static NSURLSessionWebSocketTask castFrom(T other) { - return NSURLSessionWebSocketTask._(other._id, other._lib, - retain: true, release: true); - } +/// OS_sec_trust +abstract final class OS_sec_trust { + /// Builds an object that implements the OS_sec_trust protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. - static NSURLSessionWebSocketTask castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionWebSocketTask._(other, lib, - retain: retain, release: release); + return builder.build(); } - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionWebSocketTask1); - } + /// Adds the implementation of the OS_sec_trust protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} +} - /// Sends a WebSocket message. If an error occurs, any outstanding work will also fail. - /// Note that invocation of the completion handler does not - /// guarantee that the remote side has received all the bytes, only - /// that they have been written to the kernel. - void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, - ObjCBlock_ffiVoid_NSError completionHandler) { - _lib._objc_msgSend_473(_id, _lib._sel_sendMessage_completionHandler_1, - message._id, completionHandler._id); - } +late final _protocol_OS_sec_trust = objc.getProtocol("OS_sec_trust"); - /// Reads a WebSocket message once all the frames of the message are available. - /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out - /// and all outstanding work will also fail resulting in the end of the task. - void receiveMessageWithCompletionHandler_( - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError - completionHandler) { - _lib._objc_msgSend_474(_id, _lib._sel_receiveMessageWithCompletionHandler_1, - completionHandler._id); - } +/// OS_sec_identity +abstract final class OS_sec_identity { + /// Builds an object that implements the OS_sec_identity protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - /// Sends a ping frame from the client side. The pongReceiveHandler is invoked when the client - /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving - /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. - /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. - void sendPingWithPongReceiveHandler_( - ObjCBlock_ffiVoid_NSError pongReceiveHandler) { - _lib._objc_msgSend_475(_id, _lib._sel_sendPingWithPongReceiveHandler_1, - pongReceiveHandler._id); + return builder.build(); } - /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. - /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. - void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { - _lib._objc_msgSend_476(_id, _lib._sel_cancelWithCloseCode_reason_1, - closeCode, reason?._id ?? ffi.nullptr); - } + /// Adds the implementation of the OS_sec_identity protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} +} - /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached - DartNSInteger get maximumMessageSize { - return _lib._objc_msgSend_86(_id, _lib._sel_maximumMessageSize1); - } +late final _protocol_OS_sec_identity = objc.getProtocol("OS_sec_identity"); - /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached - set maximumMessageSize(DartNSInteger value) { - return _lib._objc_msgSend_416( - _id, _lib._sel_setMaximumMessageSize_1, value); - } +/// OS_sec_certificate +abstract final class OS_sec_certificate { + /// Builds an object that implements the OS_sec_certificate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); - /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid - int get closeCode { - return _lib._objc_msgSend_477(_id, _lib._sel_closeCode1); + return builder.build(); } - /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running - NSData? get closeReason { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_closeReason1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } + /// Adds the implementation of the OS_sec_certificate protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} +} - @override - NSURLSessionWebSocketTask init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketTask._(_ret, _lib, retain: true, release: true); - } +late final _protocol_OS_sec_certificate = + objc.getProtocol("OS_sec_certificate"); +typedef sec_trust_t = ffi.Pointer; +typedef Dartsec_trust_t = objc.NSObject; +typedef sec_identity_t = ffi.Pointer; +typedef Dartsec_identity_t = objc.NSObject; +void _ObjCBlock_ffiVoid_seccertificatet_fnPtrTrampoline( + ffi.Pointer block, sec_certificate_t arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_seccertificatet_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, sec_certificate_t)>( + _ObjCBlock_ffiVoid_seccertificatet_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_seccertificatet_closureTrampoline( + ffi.Pointer block, sec_certificate_t arg0) => + (objc.getBlockClosure(block) as void Function(sec_certificate_t))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_seccertificatet_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, sec_certificate_t)>( + _ObjCBlock_ffiVoid_seccertificatet_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_seccertificatet_listenerTrampoline( + ffi.Pointer block, sec_certificate_t arg0) { + (objc.getBlockClosure(block) as void Function(sec_certificate_t))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, sec_certificate_t)> + _ObjCBlock_ffiVoid_seccertificatet_listenerCallable = ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, sec_certificate_t)>.listener( + _ObjCBlock_ffiVoid_seccertificatet_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_seccertificatet { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - static NSURLSessionWebSocketTask new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_new1); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_seccertificatet_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static NSURLSessionWebSocketTask allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionWebSocketTask1, - _lib._sel_allocWithZone_1, zone); - return NSURLSessionWebSocketTask._(_ret, _lib, - retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(Dartsec_certificate_t) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_seccertificatet_closureCallable, + (sec_certificate_t arg0) => fn(objc.NSObject.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); - static NSURLSessionWebSocketTask alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketTask1, _lib._sel_alloc1); - return NSURLSessionWebSocketTask._(_ret, _lib, + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(Dartsec_certificate_t) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_seccertificatet_listenerCallable.nativeFunction + .cast(), + (sec_certificate_t arg0) => fn( + objc.NSObject.castFromPointer(arg0, retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, retain: false, release: true); } } -/// The client can create a WebSocket message object that will be passed to the send calls -/// and will be delivered from the receive calls. The message can be initialized with data or string. -/// If initialized with data, the string property will be nil and vice versa. -class NSURLSessionWebSocketMessage extends NSObject { - NSURLSessionWebSocketMessage._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_seccertificatet_CallExtension + on objc.ObjCBlock { + void call(Dartsec_certificate_t arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + sec_certificate_t arg0)>>() + .asFunction< + void Function(ffi.Pointer, + sec_certificate_t)>()(ref.pointer, arg0.ref.pointer); +} + +typedef sec_certificate_t = ffi.Pointer; +typedef Dartsec_certificate_t = objc.NSObject; + +/// OS_sec_protocol_metadata +abstract final class OS_sec_protocol_metadata { + /// Builds an object that implements the OS_sec_protocol_metadata protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); + + return builder.build(); + } + + /// Adds the implementation of the OS_sec_protocol_metadata protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} +} + +late final _protocol_OS_sec_protocol_metadata = + objc.getProtocol("OS_sec_protocol_metadata"); +typedef sec_protocol_metadata_t = ffi.Pointer; +typedef Dartsec_protocol_metadata_t = objc.NSObject; + +enum tls_protocol_version_t { + tls_protocol_version_TLSv10(769), + tls_protocol_version_TLSv11(770), + tls_protocol_version_TLSv12(771), + tls_protocol_version_TLSv13(772), + tls_protocol_version_DTLSv10(-257), + tls_protocol_version_DTLSv12(-259); + + final int value; + const tls_protocol_version_t(this.value); + + static tls_protocol_version_t fromValue(int value) => switch (value) { + 769 => tls_protocol_version_TLSv10, + 770 => tls_protocol_version_TLSv11, + 771 => tls_protocol_version_TLSv12, + 772 => tls_protocol_version_TLSv13, + -257 => tls_protocol_version_DTLSv10, + -259 => tls_protocol_version_DTLSv12, + _ => throw ArgumentError( + "Unknown value for tls_protocol_version_t: $value"), + }; +} + +enum SSLProtocol { + kSSLProtocolUnknown(0), + kTLSProtocol1(4), + kTLSProtocol11(7), + kTLSProtocol12(8), + kDTLSProtocol1(9), + kTLSProtocol13(10), + kDTLSProtocol12(11), + kTLSProtocolMaxSupported(999), + kSSLProtocol2(1), + kSSLProtocol3(2), + kSSLProtocol3Only(3), + kTLSProtocol1Only(5), + kSSLProtocolAll(6); + + final int value; + const SSLProtocol(this.value); + + static SSLProtocol fromValue(int value) => switch (value) { + 0 => kSSLProtocolUnknown, + 4 => kTLSProtocol1, + 7 => kTLSProtocol11, + 8 => kTLSProtocol12, + 9 => kDTLSProtocol1, + 10 => kTLSProtocol13, + 11 => kDTLSProtocol12, + 999 => kTLSProtocolMaxSupported, + 1 => kSSLProtocol2, + 2 => kSSLProtocol3, + 3 => kSSLProtocol3Only, + 5 => kTLSProtocol1Only, + 6 => kSSLProtocolAll, + _ => throw ArgumentError("Unknown value for SSLProtocol: $value"), + }; +} + +enum tls_ciphersuite_t { + tls_ciphersuite_RSA_WITH_3DES_EDE_CBC_SHA(10), + tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA(47), + tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA(53), + tls_ciphersuite_RSA_WITH_AES_128_GCM_SHA256(156), + tls_ciphersuite_RSA_WITH_AES_256_GCM_SHA384(157), + tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA256(60), + tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA256(61), + tls_ciphersuite_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA(-16376), + tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA(-16375), + tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA(-16374), + tls_ciphersuite_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA(-16366), + tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA(-16365), + tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA(-16364), + tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256(-16349), + tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384(-16348), + tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA256(-16345), + tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA384(-16344), + tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256(-16341), + tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384(-16340), + tls_ciphersuite_ECDHE_RSA_WITH_AES_128_GCM_SHA256(-16337), + tls_ciphersuite_ECDHE_RSA_WITH_AES_256_GCM_SHA384(-16336), + tls_ciphersuite_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256(-13144), + tls_ciphersuite_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256(-13143), + tls_ciphersuite_AES_128_GCM_SHA256(4865), + tls_ciphersuite_AES_256_GCM_SHA384(4866), + tls_ciphersuite_CHACHA20_POLY1305_SHA256(4867); + + final int value; + const tls_ciphersuite_t(this.value); + + static tls_ciphersuite_t fromValue(int value) => switch (value) { + 10 => tls_ciphersuite_RSA_WITH_3DES_EDE_CBC_SHA, + 47 => tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA, + 53 => tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA, + 156 => tls_ciphersuite_RSA_WITH_AES_128_GCM_SHA256, + 157 => tls_ciphersuite_RSA_WITH_AES_256_GCM_SHA384, + 60 => tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA256, + 61 => tls_ciphersuite_RSA_WITH_AES_256_CBC_SHA256, + -16376 => tls_ciphersuite_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, + -16375 => tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, + -16374 => tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, + -16366 => tls_ciphersuite_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, + -16365 => tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA, + -16364 => tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA, + -16349 => tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, + -16348 => tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, + -16345 => tls_ciphersuite_ECDHE_RSA_WITH_AES_128_CBC_SHA256, + -16344 => tls_ciphersuite_ECDHE_RSA_WITH_AES_256_CBC_SHA384, + -16341 => tls_ciphersuite_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, + -16340 => tls_ciphersuite_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, + -16337 => tls_ciphersuite_ECDHE_RSA_WITH_AES_128_GCM_SHA256, + -16336 => tls_ciphersuite_ECDHE_RSA_WITH_AES_256_GCM_SHA384, + -13144 => tls_ciphersuite_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, + -13143 => tls_ciphersuite_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, + 4865 => tls_ciphersuite_AES_128_GCM_SHA256, + 4866 => tls_ciphersuite_AES_256_GCM_SHA384, + 4867 => tls_ciphersuite_CHACHA20_POLY1305_SHA256, + _ => throw ArgumentError("Unknown value for tls_ciphersuite_t: $value"), + }; +} - /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. - static NSURLSessionWebSocketMessage castFrom( - T other) { - return NSURLSessionWebSocketMessage._(other._id, other._lib, - retain: true, release: true); - } +void _ObjCBlock_ffiVoid_Uint16_fnPtrTrampoline( + ffi.Pointer block, int arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_Uint16_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Uint16)>(_ObjCBlock_ffiVoid_Uint16_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_Uint16_closureTrampoline( + ffi.Pointer block, int arg0) => + (objc.getBlockClosure(block) as void Function(int))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_Uint16_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Uint16)>(_ObjCBlock_ffiVoid_Uint16_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_Uint16_listenerTrampoline( + ffi.Pointer block, int arg0) { + (objc.getBlockClosure(block) as void Function(int))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Uint16)> + _ObjCBlock_ffiVoid_Uint16_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Uint16)>.listener(_ObjCBlock_ffiVoid_Uint16_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_Uint16 { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. - static NSURLSessionWebSocketMessage castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionWebSocketMessage._(other, lib, - retain: retain, release: release); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_Uint16_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionWebSocketMessage1); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(int) fn) => + objc.ObjCBlock( + objc.newClosureBlock(_ObjCBlock_ffiVoid_Uint16_closureCallable, + (int arg0) => fn(arg0)), + retain: false, + release: true); - /// Create a message with data type - NSURLSessionWebSocketMessage initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_228(_id, _lib._sel_initWithData_1, data._id); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(int) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_Uint16_listenerCallable.nativeFunction.cast(), + (int arg0) => fn(arg0)); + final wrapper = _wrapListenerBlock_yo3tv0(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } +} - /// Create a message with string type - NSURLSessionWebSocketMessage initWithString_(NSString string) { - final _ret = - _lib._objc_msgSend_42(_id, _lib._sel_initWithString_1, string._id); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_Uint16_CallExtension + on objc.ObjCBlock { + void call(int arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Uint16 arg0)>>() + .asFunction, int)>()( + ref.pointer, arg0); +} - int get type { - return _lib._objc_msgSend_472(_id, _lib._sel_type1); - } +void _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_fnPtrTrampoline( + ffi.Pointer block, + dispatch_data_t arg0, + dispatch_data_t arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + dispatch_data_t arg0, dispatch_data_t arg1)>>() + .asFunction()( + arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + dispatch_data_t, dispatch_data_t)>( + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureTrampoline( + ffi.Pointer block, + dispatch_data_t arg0, + dispatch_data_t arg1) => + (objc.getBlockClosure(block) as void Function( + dispatch_data_t, dispatch_data_t))(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + dispatch_data_t, dispatch_data_t)>( + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_listenerTrampoline( + ffi.Pointer block, + dispatch_data_t arg0, + dispatch_data_t arg1) { + (objc.getBlockClosure(block) as void Function( + dispatch_data_t, dispatch_data_t))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, dispatch_data_t, dispatch_data_t)> + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_listenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, dispatch_data_t, + dispatch_data_t)>.listener( + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock( + pointer, + retain: retain, + release: release); - NSData? get data { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_data1); - return _ret.address == 0 - ? null - : NSData._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject)> fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - NSString? get string { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_string1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(Dartdispatch_data_t, Dartdispatch_data_t) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_closureCallable, + (dispatch_data_t arg0, dispatch_data_t arg1) => fn( + objc.NSObject.castFromPointer(arg0, + retain: true, release: true), + objc.NSObject.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); - @override - NSURLSessionWebSocketMessage init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock + listener(void Function(Dartdispatch_data_t, Dartdispatch_data_t) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_listenerCallable + .nativeFunction + .cast(), + (dispatch_data_t arg0, dispatch_data_t arg1) => fn( + objc.NSObject.castFromPointer(arg0, retain: false, release: true), + objc.NSObject.castFromPointer(arg1, retain: false, release: true))); + final wrapper = _wrapListenerBlock_1tjlcwl(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true); } +} - static NSURLSessionWebSocketMessage new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_new1); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_CallExtension + on objc.ObjCBlock { + void call(Dartdispatch_data_t arg0, Dartdispatch_data_t arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + dispatch_data_t arg0, dispatch_data_t arg1)>>() + .asFunction< + void Function(ffi.Pointer, + dispatch_data_t, dispatch_data_t)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer); +} + +/// OS_sec_protocol_options +abstract final class OS_sec_protocol_options { + /// Builds an object that implements the OS_sec_protocol_options protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement() { + final builder = objc.ObjCProtocolBuilder(); + + return builder.build(); + } + + /// Adds the implementation of the OS_sec_protocol_options protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder( + objc.ObjCProtocolBuilder builder, + ) {} +} + +late final _protocol_OS_sec_protocol_options = + objc.getProtocol("OS_sec_protocol_options"); +typedef sec_protocol_options_t = ffi.Pointer; +typedef Dartsec_protocol_options_t = objc.NSObject; + +enum tls_ciphersuite_group_t { + tls_ciphersuite_group_default(0), + tls_ciphersuite_group_compatibility(1), + tls_ciphersuite_group_legacy(2), + tls_ciphersuite_group_ats(3), + tls_ciphersuite_group_ats_compatibility(4); + + final int value; + const tls_ciphersuite_group_t(this.value); + + static tls_ciphersuite_group_t fromValue(int value) => switch (value) { + 0 => tls_ciphersuite_group_default, + 1 => tls_ciphersuite_group_compatibility, + 2 => tls_ciphersuite_group_legacy, + 3 => tls_ciphersuite_group_ats, + 4 => tls_ciphersuite_group_ats_compatibility, + _ => throw ArgumentError( + "Unknown value for tls_ciphersuite_group_t: $value"), + }; +} + +enum SSLCiphersuiteGroup { + kSSLCiphersuiteGroupDefault(0), + kSSLCiphersuiteGroupCompatibility(1), + kSSLCiphersuiteGroupLegacy(2), + kSSLCiphersuiteGroupATS(3), + kSSLCiphersuiteGroupATSCompatibility(4); + + final int value; + const SSLCiphersuiteGroup(this.value); + + static SSLCiphersuiteGroup fromValue(int value) => switch (value) { + 0 => kSSLCiphersuiteGroupDefault, + 1 => kSSLCiphersuiteGroupCompatibility, + 2 => kSSLCiphersuiteGroupLegacy, + 3 => kSSLCiphersuiteGroupATS, + 4 => kSSLCiphersuiteGroupATSCompatibility, + _ => + throw ArgumentError("Unknown value for SSLCiphersuiteGroup: $value"), + }; +} + +typedef sec_protocol_pre_shared_key_selection_t + = ffi.Pointer; +typedef Dartsec_protocol_pre_shared_key_selection_t = objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)>; +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_fnPtrTrampoline( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>>() + .asFunction< + void Function(sec_protocol_metadata_t, dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t)>()( + arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureTrampoline( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) => + (objc.getBlockClosure(block) as void Function( + sec_protocol_metadata_t, + dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t))( + arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_listenerTrampoline( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) { + (objc.getBlockClosure(block) as void Function( + sec_protocol_metadata_t, + dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t)> + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t)>.listener( + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)>(pointer, + retain: retain, release: release); - static NSURLSessionWebSocketMessage allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3(_lib._class_NSURLSessionWebSocketMessage1, - _lib._sel_allocWithZone_1, zone); - return NSURLSessionWebSocketMessage._(_ret, _lib, - retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)> + fromFunctionPointer(ffi.Pointer> ptr) => + objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunction(void Function(Dartsec_protocol_metadata_t, Dartdispatch_data_t, Dartsec_protocol_pre_shared_key_selection_complete_t) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureCallable, + (sec_protocol_metadata_t arg0, dispatch_data_t arg1, sec_protocol_pre_shared_key_selection_complete_t arg2) => fn( + objc.NSObject.castFromPointer(arg0, retain: true, release: true), + objc.NSObject.castFromPointer(arg1, retain: true, release: true), + ObjCBlock_ffiVoid_seccertificatet.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); - static NSURLSessionWebSocketMessage alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionWebSocketMessage1, _lib._sel_alloc1); - return NSURLSessionWebSocketMessage._(_ret, _lib, + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)> listener( + void Function(Dartsec_protocol_metadata_t, Dartdispatch_data_t, + Dartsec_protocol_pre_shared_key_selection_complete_t) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_listenerCallable + .nativeFunction + .cast(), + (sec_protocol_metadata_t arg0, dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t arg2) => + fn( + objc.NSObject.castFromPointer(arg0, + retain: false, release: true), + objc.NSObject.castFromPointer(arg1, + retain: false, release: true), + ObjCBlock_ffiVoid_seccertificatet.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_10t0qpd(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)>(wrapper, retain: false, release: true); } } -abstract class NSURLSessionWebSocketMessageType { - static const int NSURLSessionWebSocketMessageTypeData = 0; - static const int NSURLSessionWebSocketMessageTypeString = 1; +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_CallExtension + on objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)> { + void + call(Dartsec_protocol_metadata_t arg0, Dartdispatch_data_t arg1, + Dartsec_protocol_pre_shared_key_selection_complete_t arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + dispatch_data_t arg1, + sec_protocol_pre_shared_key_selection_complete_t + arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + sec_protocol_metadata_t, + dispatch_data_t, + sec_protocol_pre_shared_key_selection_complete_t)>()( + ref.pointer, + arg0.ref.pointer, + arg1.ref.pointer, + arg2.ref.pointer); } -void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex = - 0; +typedef sec_protocol_pre_shared_key_selection_complete_t + = ffi.Pointer; +typedef Dartsec_protocol_pre_shared_key_selection_complete_t + = objc.ObjCBlock; +typedef sec_protocol_key_update_t = ffi.Pointer; +typedef Dartsec_protocol_key_update_t = objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.ObjCBlock)>; +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_fnPtrTrampoline( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>>() + .asFunction< + void Function(sec_protocol_metadata_t, + sec_protocol_key_update_complete_t)>()(arg0, arg1); ffi.Pointer - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[id] = - fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + sec_protocol_key_update_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureTrampoline( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1) => + (objc.getBlockClosure(block) as void Function(sec_protocol_metadata_t, + sec_protocol_key_update_complete_t))(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + sec_protocol_key_update_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_listenerTrampoline( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1) { + (objc.getBlockClosure(block) as void Function( + sec_protocol_metadata_t, sec_protocol_key_update_complete_t))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + sec_protocol_metadata_t, sec_protocol_key_update_complete_t)> + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + sec_protocol_key_update_complete_t)>.listener( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + objc.NSObject, objc.ObjCBlock)>( + pointer, + retain: retain, + release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.fromFunction( - NativeCupertinoHttp lib, - void Function(NSURLSessionWebSocketMessage?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSURLSessionWebSocketMessage._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock)> + fromFunction(void Function(Dartsec_protocol_metadata_t, Dartsec_protocol_key_update_complete_t) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_closureCallable, + (sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), + ObjCBlock_ffiVoid.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -84389,159 +56804,351 @@ class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError.listener( - NativeCupertinoHttp lib, - void Function(NSURLSessionWebSocketMessage?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSURLSessionWebSocketMessage._(arg0, lib, - retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSURLSessionWebSocketMessage? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} - -/// The WebSocket close codes follow the close codes given in the RFC -abstract class NSURLSessionWebSocketCloseCode { - static const int NSURLSessionWebSocketCloseCodeInvalid = 0; - static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; - static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; - static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; - static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; - static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; - static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; - static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; - static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; - static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; - static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = - 1010; - static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; - static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; + static objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.ObjCBlock)> + listener( + void Function(Dartsec_protocol_metadata_t, + Dartsec_protocol_key_update_complete_t) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_listenerCallable + .nativeFunction + .cast(), + (sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1) => + fn( + objc.NSObject.castFromPointer(arg0, + retain: false, release: true), + ObjCBlock_ffiVoid.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_cmbt6k(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + objc.NSObject, objc.ObjCBlock)>(wrapper, + retain: false, release: true); + } } -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_CallExtension + on objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.ObjCBlock)> { + void call(Dartsec_protocol_metadata_t arg0, + Dartsec_protocol_key_update_complete_t arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + sec_protocol_key_update_complete_t arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + sec_protocol_metadata_t, + sec_protocol_key_update_complete_t)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer); +} + +typedef sec_protocol_key_update_complete_t = ffi.Pointer; +typedef Dartsec_protocol_key_update_complete_t + = objc.ObjCBlock; +typedef sec_protocol_challenge_t = ffi.Pointer; +typedef Dartsec_protocol_challenge_t = objc.ObjCBlock< + ffi.Void Function( + objc.NSObject, objc.ObjCBlock)>; +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_fnPtrTrampoline( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>>() + .asFunction< + void Function(sec_protocol_metadata_t, + sec_protocol_challenge_complete_t)>()(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_fnPtrCallable = + ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex = 0; + ffi.Pointer, + sec_protocol_metadata_t, + sec_protocol_challenge_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureTrampoline( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1) => + (objc.getBlockClosure(block) as void Function(sec_protocol_metadata_t, + sec_protocol_challenge_complete_t))(arg0, arg1); ffi.Pointer - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + sec_protocol_challenge_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_listenerTrampoline( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1) { + (objc.getBlockClosure(block) as void Function( + sec_protocol_metadata_t, sec_protocol_challenge_complete_t))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + sec_protocol_metadata_t, sec_protocol_challenge_complete_t)> + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + sec_protocol_challenge_complete_t)>.listener( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + objc.NSObject, objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSObject, + objc.ObjCBlock)>( + pointer, + retain: retain, + release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock)> + fromFunctionPointer(ffi.Pointer> ptr) => + objc.ObjCBlock< + ffi.Void Function(objc.NSObject, + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock)> + fromFunction(void Function(Dartsec_protocol_metadata_t, Dartsec_protocol_challenge_complete_t) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureCallable, + (sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) => fn( + objc.NSObject.castFromPointer(arg0, retain: true, release: true), + ObjCBlock_ffiVoid_seccertificatet.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + objc.NSObject, objc.ObjCBlock)> + listener( + void Function(Dartsec_protocol_metadata_t, + Dartsec_protocol_challenge_complete_t) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_listenerCallable + .nativeFunction + .cast(), + (sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1) => + fn( + objc.NSObject.castFromPointer(arg0, + retain: false, release: true), + ObjCBlock_ffiVoid_seccertificatet.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_cmbt6k(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSObject, + objc.ObjCBlock)>(wrapper, + retain: false, release: true); + } } -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + objc.NSObject, objc.ObjCBlock)> { + void call(Dartsec_protocol_metadata_t arg0, + Dartsec_protocol_challenge_complete_t arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + sec_protocol_challenge_complete_t arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + sec_protocol_metadata_t, + sec_protocol_challenge_complete_t)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer); +} + +typedef sec_protocol_challenge_complete_t = ffi.Pointer; +typedef Dartsec_protocol_challenge_complete_t + = objc.ObjCBlock; +typedef sec_protocol_verify_t = ffi.Pointer; +typedef Dartsec_protocol_verify_t = objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)>; +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_fnPtrTrampoline( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>>() + .asFunction< + void Function(sec_protocol_metadata_t, sec_trust_t, + sec_protocol_verify_complete_t)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + sec_trust_t, + sec_protocol_verify_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureTrampoline( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) => + (objc.getBlockClosure(block) as void Function(sec_protocol_metadata_t, + sec_trust_t, sec_protocol_verify_complete_t))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + sec_trust_t, + sec_protocol_verify_complete_t)>( + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_listenerTrampoline( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) { + (objc.getBlockClosure(block) as void Function(sec_protocol_metadata_t, + sec_trust_t, sec_protocol_verify_complete_t))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + sec_trust_t, + sec_protocol_verify_complete_t)> + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + sec_protocol_metadata_t, + sec_trust_t, + sec_protocol_verify_complete_t)>.listener( + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)> + fromFunctionPointer(ffi.Pointer> ptr) => + objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunction( - NativeCupertinoHttp lib, - void Function(NSData?, NSURLResponse?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static objc + .ObjCBlock)> + fromFunction(void Function(Dartsec_protocol_metadata_t, Dartsec_trust_t, Dartsec_protocol_verify_complete_t) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_closureCallable, + (sec_protocol_metadata_t arg0, sec_trust_t arg1, sec_protocol_verify_complete_t arg2) => fn( + objc.NSObject.castFromPointer(arg0, retain: true, release: true), + objc.NSObject.castFromPointer(arg1, retain: true, release: true), + ObjCBlock_ffiVoid_bool.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -84552,150 +57159,127 @@ class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.listener( - NativeCupertinoHttp lib, - void Function(NSData?, NSURLResponse?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure((ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSURLResponse._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSData? arg0, NSURLResponse? arg1, NSError? arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - _id, - arg0?._id ?? ffi.nullptr, - arg1?._id ?? ffi.nullptr, - arg2?._id ?? ffi.nullptr); + static objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)> listener( + void Function(Dartsec_protocol_metadata_t, Dartsec_trust_t, + Dartsec_protocol_verify_complete_t) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_listenerCallable + .nativeFunction + .cast(), + (sec_protocol_metadata_t arg0, sec_trust_t arg1, + sec_protocol_verify_complete_t arg2) => + fn( + objc.NSObject.castFromPointer(arg0, + retain: false, release: true), + objc.NSObject.castFromPointer(arg1, + retain: false, release: true), + ObjCBlock_ffiVoid_bool.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_10t0qpd(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)>(wrapper, + retain: false, release: true); + } } -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_CallExtension + on objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)> { + void call(Dartsec_protocol_metadata_t arg0, Dartsec_trust_t arg1, + Dartsec_protocol_verify_complete_t arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + sec_protocol_metadata_t arg0, + sec_trust_t arg1, + sec_protocol_verify_complete_t arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + sec_protocol_metadata_t, + sec_trust_t, + sec_protocol_verify_complete_t)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2.ref.pointer); } -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +typedef sec_protocol_verify_complete_t = ffi.Pointer; +typedef Dartsec_protocol_verify_complete_t + = objc.ObjCBlock; +void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( + ffi.Pointer block, bool arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_bool_closureTrampoline( + ffi.Pointer block, bool arg0) => + (objc.getBlockClosure(block) as void Function(bool))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_bool_listenerTrampoline( + ffi.Pointer block, bool arg0) { + (objc.getBlockClosure(block) as void Function(bool))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable, ffi.Bool)> + _ObjCBlock_ffiVoid_bool_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>.listener(_ObjCBlock_ffiVoid_bool_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_bool_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunction( - NativeCupertinoHttp lib, - void Function(NSURL?, NSURLResponse?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + static objc.ObjCBlock fromFunction( + void Function(bool) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_bool_closureCallable, (bool arg0) => fn(arg0)), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -84706,4570 +57290,6311 @@ class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError extends _ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.listener( - NativeCupertinoHttp lib, - void Function(NSURL?, NSURLResponse?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure((ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSURLResponse._(arg1, lib, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static objc.ObjCBlock listener( + void Function(bool) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_bool_listenerCallable.nativeFunction.cast(), + (bool arg0) => fn(arg0)); + final wrapper = _wrapListenerBlock_117qins(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} - void call(NSURL? arg0, NSURLResponse? arg1, NSError? arg2) => _id.ref.invoke +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_bool_CallExtension + on objc.ObjCBlock { + void call(bool arg0) => ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - _id, - arg0?._id ?? ffi.nullptr, - arg1?._id ?? ffi.nullptr, - arg2?._id ?? ffi.nullptr); -} - -/// Disposition options for various delegate messages -abstract class NSURLSessionDelayedRequestDisposition { - /// Use the original request provided when the task was created; the request parameter is ignored. - static const int NSURLSessionDelayedRequestContinueLoading = 0; - - /// Use the specified request, which may not be nil. - static const int NSURLSessionDelayedRequestUseNewRequest = 1; - - /// Cancel the task; the request parameter is ignored. - static const int NSURLSessionDelayedRequestCancel = 2; -} - -abstract class NSURLSessionAuthChallengeDisposition { - /// Use the specified credential, which may be nil - static const int NSURLSessionAuthChallengeUseCredential = 0; - - /// Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored. - static const int NSURLSessionAuthChallengePerformDefaultHandling = 1; - - /// The entire request will be canceled; the credential parameter is ignored. - static const int NSURLSessionAuthChallengeCancelAuthenticationChallenge = 2; - - /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. - static const int NSURLSessionAuthChallengeRejectProtectionSpace = 3; + ffi.Pointer block, ffi.Bool arg0)>>() + .asFunction, bool)>()( + ref.pointer, arg0); } -abstract class NSURLSessionResponseDisposition { - /// Cancel the load, this is the same as -[task cancel] - static const int NSURLSessionResponseCancel = 0; - - /// Allow the load to continue - static const int NSURLSessionResponseAllow = 1; +final class SSLContext extends ffi.Opaque {} - /// Turn this request into a download - static const int NSURLSessionResponseBecomeDownload = 2; +typedef SSLContextRef = ffi.Pointer; - /// Turn this task into a stream task - static const int NSURLSessionResponseBecomeStream = 3; +enum SSLProtocolSide { + kSSLServerSide(0), + kSSLClientSide(1); + + final int value; + const SSLProtocolSide(this.value); + + static SSLProtocolSide fromValue(int value) => switch (value) { + 0 => kSSLServerSide, + 1 => kSSLClientSide, + _ => throw ArgumentError("Unknown value for SSLProtocolSide: $value"), + }; +} + +enum SSLConnectionType { + kSSLStreamType(0), + kSSLDatagramType(1); + + final int value; + const SSLConnectionType(this.value); + + static SSLConnectionType fromValue(int value) => switch (value) { + 0 => kSSLStreamType, + 1 => kSSLDatagramType, + _ => throw ArgumentError("Unknown value for SSLConnectionType: $value"), + }; +} + +enum SSLSessionState { + kSSLIdle(0), + kSSLHandshake(1), + kSSLConnected(2), + kSSLClosed(3), + kSSLAborted(4); + + final int value; + const SSLSessionState(this.value); + + static SSLSessionState fromValue(int value) => switch (value) { + 0 => kSSLIdle, + 1 => kSSLHandshake, + 2 => kSSLConnected, + 3 => kSSLClosed, + 4 => kSSLAborted, + _ => throw ArgumentError("Unknown value for SSLSessionState: $value"), + }; +} + +enum SSLSessionOption { + kSSLSessionOptionBreakOnServerAuth(0), + kSSLSessionOptionBreakOnCertRequested(1), + kSSLSessionOptionBreakOnClientAuth(2), + kSSLSessionOptionFalseStart(3), + kSSLSessionOptionSendOneByteRecord(4), + kSSLSessionOptionAllowServerIdentityChange(5), + kSSLSessionOptionFallback(6), + kSSLSessionOptionBreakOnClientHello(7), + kSSLSessionOptionAllowRenegotiation(8), + kSSLSessionOptionEnableSessionTickets(9); + + final int value; + const SSLSessionOption(this.value); + + static SSLSessionOption fromValue(int value) => switch (value) { + 0 => kSSLSessionOptionBreakOnServerAuth, + 1 => kSSLSessionOptionBreakOnCertRequested, + 2 => kSSLSessionOptionBreakOnClientAuth, + 3 => kSSLSessionOptionFalseStart, + 4 => kSSLSessionOptionSendOneByteRecord, + 5 => kSSLSessionOptionAllowServerIdentityChange, + 6 => kSSLSessionOptionFallback, + 7 => kSSLSessionOptionBreakOnClientHello, + 8 => kSSLSessionOptionAllowRenegotiation, + 9 => kSSLSessionOptionEnableSessionTickets, + _ => throw ArgumentError("Unknown value for SSLSessionOption: $value"), + }; } -/// The resource fetch type. -abstract class NSURLSessionTaskMetricsResourceFetchType { - static const int NSURLSessionTaskMetricsResourceFetchTypeUnknown = 0; +typedef SSLReadFunc = ffi.Pointer>; +typedef SSLReadFuncFunction = OSStatus Function(SSLConnectionRef connection, + ffi.Pointer data, ffi.Pointer dataLength); +typedef DartSSLReadFuncFunction = DartSInt32 Function( + SSLConnectionRef connection, + ffi.Pointer data, + ffi.Pointer dataLength); +typedef SSLConnectionRef = ffi.Pointer; +typedef SSLWriteFunc = ffi.Pointer>; +typedef SSLWriteFuncFunction = OSStatus Function(SSLConnectionRef connection, + ffi.Pointer data, ffi.Pointer dataLength); +typedef DartSSLWriteFuncFunction = DartSInt32 Function( + SSLConnectionRef connection, + ffi.Pointer data, + ffi.Pointer dataLength); - /// The resource was loaded over the network. - static const int NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad = 1; +enum SSLAuthenticate { + kNeverAuthenticate(0), + kAlwaysAuthenticate(1), + kTryAuthenticate(2); - /// The resource was pushed by the server to the client. - static const int NSURLSessionTaskMetricsResourceFetchTypeServerPush = 2; + final int value; + const SSLAuthenticate(this.value); - /// The resource was retrieved from the local storage. - static const int NSURLSessionTaskMetricsResourceFetchTypeLocalCache = 3; + static SSLAuthenticate fromValue(int value) => switch (value) { + 0 => kNeverAuthenticate, + 1 => kAlwaysAuthenticate, + 2 => kTryAuthenticate, + _ => throw ArgumentError("Unknown value for SSLAuthenticate: $value"), + }; } -/// DNS protocol used for domain resolution. -abstract class NSURLSessionTaskMetricsDomainResolutionProtocol { - static const int NSURLSessionTaskMetricsDomainResolutionProtocolUnknown = 0; - - /// Resolution used DNS over UDP. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolUDP = 1; - - /// Resolution used DNS over TCP. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolTCP = 2; +enum SSLClientCertificateState { + kSSLClientCertNone(0), + kSSLClientCertRequested(1), + kSSLClientCertSent(2), + kSSLClientCertRejected(3); - /// Resolution used DNS over TLS. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolTLS = 3; + final int value; + const SSLClientCertificateState(this.value); - /// Resolution used DNS over HTTPS. - static const int NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS = 4; + static SSLClientCertificateState fromValue(int value) => switch (value) { + 0 => kSSLClientCertNone, + 1 => kSSLClientCertRequested, + 2 => kSSLClientCertSent, + 3 => kSSLClientCertRejected, + _ => throw ArgumentError( + "Unknown value for SSLClientCertificateState: $value"), + }; } -/// This class defines the performance metrics collected for a request/response transaction during the task execution. -class NSURLSessionTaskTransactionMetrics extends NSObject { - NSURLSessionTaskTransactionMetrics._( - ffi.Pointer id, NativeCupertinoHttp lib, +/// NSURLSession is a replacement API for NSURLConnection. It provides +/// options that affect the policy of, and various aspects of the +/// mechanism by which NSURLRequest objects are retrieved from the +/// network. +/// +/// An NSURLSession may be bound to a delegate object. The delegate is +/// invoked for certain events during the lifetime of a session, such as +/// server authentication or determining whether a resource to be loaded +/// should be converted into a download. +/// +/// NSURLSession instances are thread-safe. +/// +/// The default NSURLSession uses a system provided delegate and is +/// appropriate to use in place of existing code that uses +/// +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] +/// +/// An NSURLSession creates NSURLSessionTask objects which represent the +/// action of a resource being loaded. These are analogous to +/// NSURLConnection objects but provide for more control and a unified +/// delegate model. +/// +/// NSURLSessionTask objects are always created in a suspended state and +/// must be sent the -resume message before they will execute. +/// +/// Subclasses of NSURLSessionTask are used to syntactically +/// differentiate between data and file downloads. +/// +/// An NSURLSessionDataTask receives the resource as a series of calls to +/// the URLSession:dataTask:didReceiveData: delegate method. This is type of +/// task most commonly associated with retrieving objects for immediate parsing +/// by the consumer. +/// +/// An NSURLSessionUploadTask differs from an NSURLSessionDataTask +/// in how its instance is constructed. Upload tasks are explicitly created +/// by referencing a file or data object to upload, or by utilizing the +/// -URLSession:task:needNewBodyStream: delegate message to supply an upload +/// body. +/// +/// An NSURLSessionDownloadTask will directly write the response data to +/// a temporary file. When completed, the delegate is sent +/// URLSession:downloadTask:didFinishDownloadingToURL: and given an opportunity +/// to move this file to a permanent location in its sandboxed container, or to +/// otherwise read the file. If canceled, an NSURLSessionDownloadTask can +/// produce a data blob that can be used to resume a download at a later +/// time. +/// +/// Beginning with iOS 9 and Mac OS X 10.11, NSURLSessionStream is +/// available as a task type. This allows for direct TCP/IP connection +/// to a given host and port with optional secure handshaking and +/// navigation of proxies. Data tasks may also be upgraded to a +/// NSURLSessionStream task via the HTTP Upgrade: header and appropriate +/// use of the pipelining option of NSURLSessionConfiguration. See RFC +/// 2817 and RFC 6455 for information about the Upgrade: header, and +/// comments below on turning data tasks into stream tasks. +/// +/// An NSURLSessionWebSocketTask is a task that allows clients to connect to servers supporting +/// WebSocket. The task will perform the HTTP handshake to upgrade the connection +/// and once the WebSocket handshake is successful, the client can read and write +/// messages that will be framed using the WebSocket protocol by the framework. +class NSURLSession extends objc.NSObject { + NSURLSession._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLSessionTaskTransactionMetrics] that points to the same underlying object as [other]. - static NSURLSessionTaskTransactionMetrics castFrom( - T other) { - return NSURLSessionTaskTransactionMetrics._(other._id, other._lib, - retain: true, release: true); - } + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLSessionTaskTransactionMetrics] that wraps the given raw object pointer. - static NSURLSessionTaskTransactionMetrics castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTaskTransactionMetrics._(other, lib, - retain: retain, release: release); - } + /// Constructs a [NSURLSession] that points to the same underlying object as [other]. + NSURLSession.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Returns whether [obj] is an instance of [NSURLSessionTaskTransactionMetrics]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTaskTransactionMetrics1); - } + /// Constructs a [NSURLSession] that wraps the given raw object pointer. + NSURLSession.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Represents the transaction request. - NSURLRequest get request { - final _ret = _lib._objc_msgSend_489(_id, _lib._sel_request1); - return NSURLRequest._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLSession]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSession); } - /// Represents the transaction response. Can be nil if error occurred and no response was generated. - NSURLResponse? get response { - final _ret = _lib._objc_msgSend_375(_id, _lib._sel_response1); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, _lib, retain: true, release: true); + /// The shared session uses the currently set global NSURLCache, + /// NSHTTPCookieStorage and NSURLCredentialStorage objects. + static NSURLSession getSharedSession() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSession, _sel_sharedSession); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - /// fetchStartDate returns the time when the user agent started fetching the resource, whether or not the resource was retrieved from the server or local resources. - /// - /// The following metrics will be set to nil, if a persistent connection was used or the resource was retrieved from local resources: - /// - /// domainLookupStartDate - /// domainLookupEndDate - /// connectStartDate - /// connectEndDate - /// secureConnectionStartDate - /// secureConnectionEndDate - NSDate? get fetchStartDate { - final _ret = _lib._objc_msgSend_393(_id, _lib._sel_fetchStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + /// Customization of NSURLSession occurs during creation of a new session. + /// If you only need to use the convenience routines with custom + /// configuration options it is not necessary to specify a delegate. + /// If you do specify a delegate, the delegate will be retained until after + /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. + static NSURLSession sessionWithConfiguration_( + NSURLSessionConfiguration configuration) { + final _ret = _objc_msgSend_juohf7(_class_NSURLSession, + _sel_sessionWithConfiguration_, configuration.ref.pointer); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - /// domainLookupStartDate returns the time immediately before the user agent started the name lookup for the resource. - NSDate? get domainLookupStartDate { - final _ret = _lib._objc_msgSend_393(_id, _lib._sel_domainLookupStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + /// sessionWithConfiguration:delegate:delegateQueue: + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NSURLSessionConfiguration configuration, + objc.ObjCObjectBase? delegate, + NSOperationQueue? queue) { + final _ret = _objc_msgSend_aud7dn( + _class_NSURLSession, + _sel_sessionWithConfiguration_delegate_delegateQueue_, + configuration.ref.pointer, + delegate?.ref.pointer ?? ffi.nullptr, + queue?.ref.pointer ?? ffi.nullptr); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - /// domainLookupEndDate returns the time after the name lookup was completed. - NSDate? get domainLookupEndDate { - final _ret = _lib._objc_msgSend_393(_id, _lib._sel_domainLookupEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + /// delegateQueue + NSOperationQueue get delegateQueue { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegateQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - /// connectStartDate is the time immediately before the user agent started establishing the connection to the server. - /// - /// For example, this would correspond to the time immediately before the user agent started trying to establish the TCP connection. - NSDate? get connectStartDate { - final _ret = _lib._objc_msgSend_393(_id, _lib._sel_connectStartDate1); + /// delegate + objc.ObjCObjectBase? get delegate { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// If an encrypted connection was used, secureConnectionStartDate is the time immediately before the user agent started the security handshake to secure the current connection. - /// - /// For example, this would correspond to the time immediately before the user agent started the TLS handshake. - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSDate? get secureConnectionStartDate { - final _ret = - _lib._objc_msgSend_393(_id, _lib._sel_secureConnectionStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + /// configuration + NSURLSessionConfiguration get configuration { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_configuration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - /// If an encrypted connection was used, secureConnectionEndDate is the time immediately after the security handshake completed. - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSDate? get secureConnectionEndDate { + /// The sessionDescription property is available for the developer to + /// provide a descriptive label for the session. + objc.NSString? get sessionDescription { final _ret = - _lib._objc_msgSend_393(_id, _lib._sel_secureConnectionEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - /// connectEndDate is the time immediately after the user agent finished establishing the connection to the server, including completion of security-related and other handshakes. - NSDate? get connectEndDate { - final _ret = _lib._objc_msgSend_393(_id, _lib._sel_connectEndDate1); + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sessionDescription); return _ret.address == 0 ? null - : NSDate._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// requestStartDate is the time immediately before the user agent started requesting the source, regardless of whether the resource was retrieved from the server or local resources. - /// - /// For example, this would correspond to the time immediately before the user agent sent an HTTP GET request. - NSDate? get requestStartDate { - final _ret = _lib._objc_msgSend_393(_id, _lib._sel_requestStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - /// requestEndDate is the time immediately after the user agent finished requesting the source, regardless of whether the resource was retrieved from the server or local resources. - /// - /// For example, this would correspond to the time immediately after the user agent finished sending the last byte of the request. - NSDate? get requestEndDate { - final _ret = _lib._objc_msgSend_393(_id, _lib._sel_requestEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - /// responseStartDate is the time immediately after the user agent received the first byte of the response from the server or from local resources. - /// - /// For example, this would correspond to the time immediately after the user agent received the first byte of an HTTP response. - NSDate? get responseStartDate { - final _ret = _lib._objc_msgSend_393(_id, _lib._sel_responseStartDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); - } - - /// responseEndDate is the time immediately after the user agent received the last byte of the resource. - NSDate? get responseEndDate { - final _ret = _lib._objc_msgSend_393(_id, _lib._sel_responseEndDate1); - return _ret.address == 0 - ? null - : NSDate._(_ret, _lib, retain: true, release: true); + /// The sessionDescription property is available for the developer to + /// provide a descriptive label for the session. + set sessionDescription(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setSessionDescription_, + value?.ref.pointer ?? ffi.nullptr); } - /// The network protocol used to fetch the resource, as identified by the ALPN Protocol ID Identification Sequence [RFC7301]. - /// E.g., h3, h2, http/1.1. + /// -finishTasksAndInvalidate returns immediately and existing tasks will be allowed + /// to run to completion. New tasks may not be created. The session + /// will continue to make delegate callbacks until URLSession:didBecomeInvalidWithError: + /// has been issued. /// - /// When a proxy is configured AND a tunnel connection is established, then this attribute returns the value for the tunneled protocol. + /// -finishTasksAndInvalidate and -invalidateAndCancel do not + /// have any effect on the shared session singleton. /// - /// For example: - /// If no proxy were used, and HTTP/2 was negotiated, then h2 would be returned. - /// If HTTP/1.1 were used to the proxy, and the tunneled connection was HTTP/2, then h2 would be returned. - /// If HTTP/1.1 were used to the proxy, and there were no tunnel, then http/1.1 would be returned. - NSString? get networkProtocolName { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_networkProtocolName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - /// This property is set to YES if a proxy connection was used to fetch the resource. - bool get proxyConnection { - return _lib._objc_msgSend_11(_id, _lib._sel_isProxyConnection1); - } - - /// This property is set to YES if a persistent connection was used to fetch the resource. - bool get reusedConnection { - return _lib._objc_msgSend_11(_id, _lib._sel_isReusedConnection1); - } - - /// Indicates whether the resource was loaded, pushed or retrieved from the local cache. - int get resourceFetchType { - return _lib._objc_msgSend_490(_id, _lib._sel_resourceFetchType1); - } - - /// countOfRequestHeaderBytesSent is the number of bytes transferred for request header. - int get countOfRequestHeaderBytesSent { - return _lib._objc_msgSend_383( - _id, _lib._sel_countOfRequestHeaderBytesSent1); - } - - /// countOfRequestBodyBytesSent is the number of bytes transferred for request body. - /// It includes protocol-specific framing, transfer encoding, and content encoding. - int get countOfRequestBodyBytesSent { - return _lib._objc_msgSend_383(_id, _lib._sel_countOfRequestBodyBytesSent1); + /// When invalidating a background session, it is not safe to create another background + /// session with the same identifier until URLSession:didBecomeInvalidWithError: has + /// been issued. + void finishTasksAndInvalidate() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_finishTasksAndInvalidate); } - /// countOfRequestBodyBytesBeforeEncoding is the size of upload body data, file, or stream. - int get countOfRequestBodyBytesBeforeEncoding { - return _lib._objc_msgSend_383( - _id, _lib._sel_countOfRequestBodyBytesBeforeEncoding1); + /// -invalidateAndCancel acts as -finishTasksAndInvalidate, but issues + /// -cancel to all outstanding tasks for this session. Note task + /// cancellation is subject to the state of the task, and some tasks may + /// have already have completed at the time they are sent -cancel. + void invalidateAndCancel() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidateAndCancel); } - /// countOfResponseHeaderBytesReceived is the number of bytes transferred for response header. - int get countOfResponseHeaderBytesReceived { - return _lib._objc_msgSend_383( - _id, _lib._sel_countOfResponseHeaderBytesReceived1); + /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue. + void resetWithCompletionHandler_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_resetWithCompletionHandler_, + completionHandler.ref.pointer); } - /// countOfResponseBodyBytesReceived is the number of bytes transferred for response header. - /// It includes protocol-specific framing, transfer encoding, and content encoding. - int get countOfResponseBodyBytesReceived { - return _lib._objc_msgSend_383( - _id, _lib._sel_countOfResponseBodyBytesReceived1); + /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue. + void flushWithCompletionHandler_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_flushWithCompletionHandler_, + completionHandler.ref.pointer); } - /// countOfResponseBodyBytesAfterDecoding is the size of data delivered to your delegate or completion handler. - int get countOfResponseBodyBytesAfterDecoding { - return _lib._objc_msgSend_383( - _id, _lib._sel_countOfResponseBodyBytesAfterDecoding1); + /// invokes completionHandler with outstanding data, upload and download tasks. + void getTasksWithCompletionHandler_( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_getTasksWithCompletionHandler_, + completionHandler.ref.pointer); } - /// localAddress is the IP address string of the local interface for the connection. - /// - /// For multipath protocols, this is the local address of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSString? get localAddress { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_localAddress1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// invokes completionHandler with all outstanding tasks. + void getAllTasksWithCompletionHandler_( + objc.ObjCBlock)> + completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, + _sel_getAllTasksWithCompletionHandler_, completionHandler.ref.pointer); } - /// localPort is the port number of the local interface for the connection. - /// - /// For multipath protocols, this is the local port of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSNumber? get localPort { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_localPort1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + /// Creates a data task with the given request. The request may have a body stream. + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_dataTaskWithRequest_, request.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - /// remoteAddress is the IP address string of the remote interface for the connection. - /// - /// For multipath protocols, this is the remote address of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSString? get remoteAddress { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_remoteAddress1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates a data task to retrieve the contents of the given URL. + NSURLSessionDataTask dataTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_dataTaskWithURL_, url.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - /// remotePort is the port number of the remote interface for the connection. - /// - /// For multipath protocols, this is the remote port of the initial flow. - /// - /// If a connection was not used, this attribute is set to nil. - NSNumber? get remotePort { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_remotePort1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest request, objc.NSURL fileURL) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromFile_, + request.ref.pointer, + fileURL.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - /// negotiatedTLSProtocolVersion is the TLS protocol version negotiated for the connection. - /// It is a 2-byte sequence in host byte order. - /// - /// Please refer to tls_protocol_version_t enum in Security/SecProtocolTypes.h - /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSNumber? get negotiatedTLSProtocolVersion { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_negotiatedTLSProtocolVersion1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); + /// Creates an upload task with the given request. The body of the request is provided from the bodyData. + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest request, objc.NSData bodyData) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromData_, + request.ref.pointer, + bodyData.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - /// negotiatedTLSCipherSuite is the TLS cipher suite negotiated for the connection. - /// It is a 2-byte sequence in host byte order. - /// - /// Please refer to tls_ciphersuite_t enum in Security/SecProtocolTypes.h + /// Creates an upload task from a resume data blob. Requires the server to support the latest resumable uploads + /// Internet-Draft from the HTTP Working Group, found at + /// https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/ + /// If resuming from an upload file, the file must still exist and be unmodified. If the upload cannot be successfully + /// resumed, URLSession:task:didCompleteWithError: will be called. /// - /// If an encrypted connection was not used, this attribute is set to nil. - NSNumber? get negotiatedTLSCipherSuite { - final _ret = - _lib._objc_msgSend_94(_id, _lib._sel_negotiatedTLSCipherSuite1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } - - /// Whether the connection is established over a cellular interface. - bool get cellular { - return _lib._objc_msgSend_11(_id, _lib._sel_isCellular1); - } - - /// Whether the connection is established over an expensive interface. - bool get expensive { - return _lib._objc_msgSend_11(_id, _lib._sel_isExpensive1); - } - - /// Whether the connection is established over a constrained interface. - bool get constrained { - return _lib._objc_msgSend_11(_id, _lib._sel_isConstrained1); - } - - /// Whether a multipath protocol is successfully negotiated for the connection. - bool get multipath { - return _lib._objc_msgSend_11(_id, _lib._sel_isMultipath1); - } - - /// DNS protocol used for domain resolution. - int get domainResolutionProtocol { - return _lib._objc_msgSend_491(_id, _lib._sel_domainResolutionProtocol1); - } - - @override - NSURLSessionTaskTransactionMetrics init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, + /// - Parameter resumeData: Resume data blob from an incomplete upload, such as data returned by the cancelByProducingResumeData: method. + /// - Returns: A new session upload task, or nil if the resumeData is invalid. + NSURLSessionUploadTask uploadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_uploadTaskWithResumeData_, resumeData.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionTaskTransactionMetrics new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_new1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: false, release: true); - } - - static NSURLSessionTaskTransactionMetrics allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionTaskTransactionMetrics1, - _lib._sel_allocWithZone_1, - zone); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: false, release: true); - } - - static NSURLSessionTaskTransactionMetrics alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskTransactionMetrics1, _lib._sel_alloc1); - return NSURLSessionTaskTransactionMetrics._(_ret, _lib, - retain: false, release: true); - } -} - -class NSURLSessionTaskMetrics extends NSObject { - NSURLSessionTaskMetrics._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSURLSessionTaskMetrics] that points to the same underlying object as [other]. - static NSURLSessionTaskMetrics castFrom(T other) { - return NSURLSessionTaskMetrics._(other._id, other._lib, + /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_uploadTaskWithStreamedRequest_, request.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSURLSessionTaskMetrics] that wraps the given raw object pointer. - static NSURLSessionTaskMetrics castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTaskMetrics._(other, lib, - retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLSessionTaskMetrics]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLSessionTaskMetrics1); - } - - /// transactionMetrics array contains the metrics collected for every request/response transaction created during the task execution. - NSArray get transactionMetrics { - final _ret = _lib._objc_msgSend_169(_id, _lib._sel_transactionMetrics1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - /// Interval from the task creation time to the task completion time. - /// Task creation time is the time when the task was instantiated. - /// Task completion time is the time when the task is about to change its internal state to completed. - NSDateInterval get taskInterval { - final _ret = _lib._objc_msgSend_492(_id, _lib._sel_taskInterval1); - return NSDateInterval._(_ret, _lib, retain: true, release: true); - } - - /// redirectCount is the number of redirects that were recorded. - DartNSUInteger get redirectCount { - return _lib._objc_msgSend_12(_id, _lib._sel_redirectCount1); - } - - @override - NSURLSessionTaskMetrics init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: true, release: true); - } - - static NSURLSessionTaskMetrics new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskMetrics1, _lib._sel_new1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); - } - - static NSURLSessionTaskMetrics allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLSessionTaskMetrics1, _lib._sel_allocWithZone_1, zone); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); - } - - static NSURLSessionTaskMetrics alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSURLSessionTaskMetrics1, _lib._sel_alloc1); - return NSURLSessionTaskMetrics._(_ret, _lib, retain: false, release: true); - } -} - -class NSDateInterval extends _ObjCWrapper { - NSDateInterval._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSDateInterval] that points to the same underlying object as [other]. - static NSDateInterval castFrom(T other) { - return NSDateInterval._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSDateInterval] that wraps the given raw object pointer. - static NSDateInterval castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDateInterval._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSDateInterval]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSDateInterval1); - } -} - -abstract class NSItemProviderRepresentationVisibility { - static const int NSItemProviderRepresentationVisibilityAll = 0; - static const int NSItemProviderRepresentationVisibilityTeam = 1; - static const int NSItemProviderRepresentationVisibilityGroup = 2; - static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; -} - -abstract class NSItemProviderFileOptions { - static const int NSItemProviderFileOptionOpenInPlace = 1; -} - -class NSItemProvider extends NSObject { - NSItemProvider._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSItemProvider] that points to the same underlying object as [other]. - static NSItemProvider castFrom(T other) { - return NSItemProvider._(other._id, other._lib, retain: true, release: true); - } - - /// Returns a [NSItemProvider] that wraps the given raw object pointer. - static NSItemProvider castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSItemProvider._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSItemProvider]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSItemProvider1); - } - - @override - NSItemProvider init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } - - void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( - NSString typeIdentifier, - int visibility, - ObjCBlock_NSProgress_ffiVoidNSDataNSError loadHandler) { - _lib._objc_msgSend_493( - _id, - _lib._sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_1, - typeIdentifier._id, - visibility, - loadHandler._id); - } - - void - registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( - NSString typeIdentifier, - int fileOptions, - int visibility, - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError loadHandler) { - _lib._objc_msgSend_494( - _id, - _lib._sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_1, - typeIdentifier._id, - fileOptions, - visibility, - loadHandler._id); - } - - NSArray get registeredTypeIdentifiers { - final _ret = - _lib._objc_msgSend_169(_id, _lib._sel_registeredTypeIdentifiers1); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { - final _ret = _lib._objc_msgSend_495( - _id, _lib._sel_registeredTypeIdentifiersWithFileOptions_1, fileOptions); - return NSArray._(_ret, _lib, retain: true, release: true); - } - - bool hasItemConformingToTypeIdentifier_(NSString typeIdentifier) { - return _lib._objc_msgSend_22( - _id, _lib._sel_hasItemConformingToTypeIdentifier_1, typeIdentifier._id); - } - - bool hasRepresentationConformingToTypeIdentifier_fileOptions_( - NSString typeIdentifier, int fileOptions) { - return _lib._objc_msgSend_496( - _id, - _lib._sel_hasRepresentationConformingToTypeIdentifier_fileOptions_1, - typeIdentifier._id, - fileOptions); - } - - NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSData_NSError completionHandler) { - final _ret = _lib._objc_msgSend_497( - _id, - _lib._sel_loadDataRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier._id, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); - } - - NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSURL_NSError completionHandler) { - final _ret = _lib._objc_msgSend_498( - _id, - _lib._sel_loadFileRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier._id, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); - } - - NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSURL_bool_NSError completionHandler) { - final _ret = _lib._objc_msgSend_499( - _id, - _lib._sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_1, - typeIdentifier._id, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); - } - - NSString? get suggestedName { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_suggestedName1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } - - set suggestedName(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setSuggestedName_1, value?._id ?? ffi.nullptr); - } - - NSItemProvider initWithObject_(NSObject object) { - final _ret = - _lib._objc_msgSend_149(_id, _lib._sel_initWithObject_1, object._id); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } - - void registerObject_visibility_(NSObject object, int visibility) { - _lib._objc_msgSend_500( - _id, _lib._sel_registerObject_visibility_1, object._id, visibility); - } - - void registerObjectOfClass_visibility_loadHandler_( - NSObject aClass, - int visibility, - ObjCBlock_NSProgress_ffiVoidObjCObjectNSError loadHandler) { - _lib._objc_msgSend_501( - _id, - _lib._sel_registerObjectOfClass_visibility_loadHandler_1, - aClass._id, - visibility, - loadHandler._id); - } - - bool canLoadObjectOfClass_(NSObject aClass) { - return _lib._objc_msgSend_0( - _id, _lib._sel_canLoadObjectOfClass_1, aClass._id); - } - - NSProgress loadObjectOfClass_completionHandler_( - NSObject aClass, ObjCBlock_ffiVoid_ObjCObject_NSError completionHandler) { - final _ret = _lib._objc_msgSend_502( - _id, - _lib._sel_loadObjectOfClass_completionHandler_1, - aClass._id, - completionHandler._id); - return NSProgress._(_ret, _lib, retain: true, release: true); - } - - NSItemProvider initWithItem_typeIdentifier_( - NSObject? item, NSString? typeIdentifier) { - final _ret = _lib._objc_msgSend_503( - _id, - _lib._sel_initWithItem_typeIdentifier_1, - item?._id ?? ffi.nullptr, - typeIdentifier?._id ?? ffi.nullptr); - return NSItemProvider._(_ret, _lib, retain: true, release: true); - } - - NSItemProvider? initWithContentsOfURL_(NSURL fileURL) { - final _ret = _lib._objc_msgSend_226( - _id, _lib._sel_initWithContentsOfURL_1, fileURL._id); - return _ret.address == 0 - ? null - : NSItemProvider._(_ret, _lib, retain: true, release: true); - } - - void registerItemForTypeIdentifier_loadHandler_( - NSString typeIdentifier, DartNSItemProviderLoadHandler loadHandler) { - _lib._objc_msgSend_504( - _id, - _lib._sel_registerItemForTypeIdentifier_loadHandler_1, - typeIdentifier._id, - loadHandler._id); - } - - void loadItemForTypeIdentifier_options_completionHandler_( - NSString typeIdentifier, - NSDictionary? options, - DartNSItemProviderCompletionHandler completionHandler) { - _lib._objc_msgSend_505( - _id, - _lib._sel_loadItemForTypeIdentifier_options_completionHandler_1, - typeIdentifier._id, - options?._id ?? ffi.nullptr, - completionHandler._id); - } - - DartNSItemProviderLoadHandler get previewImageHandler { - final _ret = _lib._objc_msgSend_506(_id, _lib._sel_previewImageHandler1); - return ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary - ._(_ret, _lib, retain: true, release: true); - } - - set previewImageHandler(DartNSItemProviderLoadHandler value) { - return _lib._objc_msgSend_507( - _id, _lib._sel_setPreviewImageHandler_1, value._id); - } - - void loadPreviewImageWithOptions_completionHandler_(NSDictionary options, - DartNSItemProviderCompletionHandler completionHandler) { - _lib._objc_msgSend_508( - _id, - _lib._sel_loadPreviewImageWithOptions_completionHandler_1, - options._id, - completionHandler._id); + /// Creates a download task with the given request. + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_downloadTaskWithRequest_, request.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSItemProvider new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_new1); - return NSItemProvider._(_ret, _lib, retain: false, release: true); + /// Creates a download task to download the contents of the given URL. + NSURLSessionDownloadTask downloadTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_downloadTaskWithURL_, url.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSItemProvider allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSItemProvider1, _lib._sel_allocWithZone_1, zone); - return NSItemProvider._(_ret, _lib, retain: false, release: true); + /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. + NSURLSessionDownloadTask downloadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_juohf7(this.ref.pointer, + _sel_downloadTaskWithResumeData_, resumeData.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSItemProvider alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSItemProvider1, _lib._sel_alloc1); - return NSItemProvider._(_ret, _lib, retain: false, release: true); + /// Creates a bidirectional stream task to a given host and port. + NSURLSessionStreamTask streamTaskWithHostName_port_( + objc.NSString hostname, DartNSInteger port) { + final _ret = _objc_msgSend_spwp90(this.ref.pointer, + _sel_streamTaskWithHostName_port_, hostname.ref.pointer, port); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } -} - -ffi.Pointer< - ObjCObject> _ObjCBlock_NSProgress_ffiVoidNSDataNSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>)>()(arg0); -final _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry = - Function(ffi.Pointer<_ObjCBlock>)>{}; -int _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { - final id = ++_ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_NSProgress_ffiVoidNSDataNSError extends _ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidNSDataNSError._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidNSDataNSError.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidNSDataNSError.fromFunction( - NativeCupertinoHttp lib, - NSProgress? Function(ObjCBlock_ffiVoid_NSData_NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure((ffi - .Pointer<_ObjCBlock> - arg0) => - fn(ObjCBlock_ffiVoid_NSData_NSError._(arg0, lib, retain: true, release: true)) - ?._retainAndReturnId() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - NSProgress? call(ObjCBlock_ffiVoid_NSData_NSError arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() - (_id, arg0._id) - .address == - 0 - ? null - : NSProgress._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), - _lib, - retain: false, - release: true); -} - -void _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_NSData_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_NSError._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSError.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSError.fromFunction( - NativeCupertinoHttp lib, void Function(NSData?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSData_NSError.listener( - NativeCupertinoHttp lib, void Function(NSData?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSData._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, - retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSData? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>)>()(arg0); -final _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry = - Function(ffi.Pointer<_ObjCBlock>)>{}; -int _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { - final id = - ++_ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError extends _ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunction( - NativeCupertinoHttp lib, - NSProgress? Function(ObjCBlock_ffiVoid_NSURL_bool_NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( - (ffi.Pointer<_ObjCBlock> arg0) => - fn(ObjCBlock_ffiVoid_NSURL_bool_NSError._(arg0, lib, retain: true, release: true)) - ?._retainAndReturnId() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - NSProgress? call(ObjCBlock_ffiVoid_NSURL_bool_NSError arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() - (_id, arg0._id) - .address == - 0 - ? null - : NSProgress._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), - _lib, - retain: false, - release: true); -} + /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. + /// The NSNetService will be resolved before any IO completes. + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_streamTaskWithNetService_, service.ref.pointer); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - void Function(ffi.Pointer, bool, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. + NSURLSessionWebSocketTask webSocketTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_webSocketTaskWithURL_, url.ref.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } -class ObjCBlock_ffiVoid_NSURL_bool_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_bool_NSError._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + /// Creates a WebSocket task given the url and an array of protocols. The protocols will be used in the WebSocket handshake to + /// negotiate a preferred protocol with the server + /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + objc.NSURL url, objc.ObjCObjectBase protocols) { + final _ret = _objc_msgSend_iq11qg( + this.ref.pointer, + _sel_webSocketTaskWithURL_protocols_, + url.ref.pointer, + protocols.ref.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// Creates a WebSocket task given the request. The request properties can be modified and will be used by the task during the HTTP handshake phase. + /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol + /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_webSocketTaskWithRequest_, request.ref.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunction( - NativeCupertinoHttp lib, void Function(NSURL?, bool, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Bool, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1, - arg2.address == 0 - ? null - : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + /// init + NSURLSession init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURL_bool_NSError.listener( - NativeCupertinoHttp lib, void Function(NSURL?, bool, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Bool, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, ffi.Pointer arg2) => fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1, - arg2.address == 0 - ? null - : NSError._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSURL? arg0, bool arg1, NSError? arg2) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - bool, ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1, arg2?._id ?? ffi.nullptr); -} + /// new + static NSURLSession new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSession, _sel_new); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); + } -void _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[block.ref.target.address]!( - arg0, arg1); + /// dataTaskWithRequest:completionHandler: + NSURLSessionDataTask dataTaskWithRequest_completionHandler_( + NSURLRequest request, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_dataTaskWithRequest_completionHandler_, + request.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } -class ObjCBlock_ffiVoid_NSURL_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_NSError._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + /// dataTaskWithURL:completionHandler: + NSURLSessionDataTask dataTaskWithURL_completionHandler_( + objc.NSURL url, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_dataTaskWithURL_completionHandler_, + url.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSError.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// uploadTaskWithRequest:fromFile:completionHandler: + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest request, + objc.NSURL fileURL, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_37obke( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromFile_completionHandler_, + request.ref.pointer, + fileURL.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURL_NSError.fromFunction( - NativeCupertinoHttp lib, void Function(NSURL?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + /// uploadTaskWithRequest:fromData:completionHandler: + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest request, + objc.NSData? bodyData, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_37obke( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromData_completionHandler_, + request.ref.pointer, + bodyData?.ref.pointer ?? ffi.nullptr, + completionHandler.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURL_NSError.listener( - NativeCupertinoHttp lib, void Function(NSURL?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSURL._(arg0, lib, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, - retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSURL? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} + /// uploadTaskWithResumeData:completionHandler: + NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_uploadTaskWithResumeData_completionHandler_, + resumeData.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>)>()(arg0); -final _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry = - Function(ffi.Pointer<_ObjCBlock>)>{}; -int _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer<_ObjCBlock>) fn) { - final id = - ++_ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0) => - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_NSProgress_ffiVoidObjCObjectNSError extends _ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidObjCObjectNSError._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + /// downloadTaskWithRequest:completionHandler: + NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( + NSURLRequest request, + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_downloadTaskWithRequest_completionHandler_, + request.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidObjCObjectNSError.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> arg0)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// downloadTaskWithURL:completionHandler: + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( + objc.NSURL url, + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_downloadTaskWithURL_completionHandler_, + url.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_NSProgress_ffiVoidObjCObjectNSError.fromFunction( - NativeCupertinoHttp lib, - NSProgress? Function(ObjCBlock_ffiVoid_ObjCObject_NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer<_ObjCBlock>)>( - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidObjCObjectNSError_registerClosure( - (ffi.Pointer<_ObjCBlock> arg0) => - fn(ObjCBlock_ffiVoid_ObjCObject_NSError._(arg0, lib, retain: true, release: true)) - ?._retainAndReturnId() ?? - ffi.nullptr)), - lib); - static ffi.Pointer? _dartFuncTrampoline; - - NSProgress? call(ObjCBlock_ffiVoid_ObjCObject_NSError arg0) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>() - (_id, arg0._id) - .address == - 0 - ? null - : NSProgress._( - _id.ref.invoke - .cast Function(ffi.Pointer<_ObjCBlock> block, ffi.Pointer<_ObjCBlock> arg0)>>() - .asFunction Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer<_ObjCBlock>)>()(_id, arg0._id), - _lib, - retain: false, - release: true); + /// downloadTaskWithResumeData:completionHandler: + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)> + completionHandler) { + final _ret = _objc_msgSend_1kkhn3j( + this.ref.pointer, + _sel_downloadTaskWithResumeData_completionHandler_, + resumeData.ref.pointer, + completionHandler.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// allocWithZone: + static NSURLSession allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSURLSession, _sel_allocWithZone_, zone); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); + } + + /// alloc + static NSURLSession alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSession, _sel_alloc); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); + } } -void _ObjCBlock_ffiVoid_ObjCObject_NSError_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_ObjCObject_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ObjCObject_NSError extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_NSError._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); +late final _class_NSURLSession = objc.getClass("NSURLSession"); +late final _sel_sharedSession = objc.registerName("sharedSession"); - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSError.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSError_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; +/// Configuration options for an NSURLSession. When a session is +/// created, a copy of the configuration object is made - you cannot +/// modify the configuration of a session after it has been created. +/// +/// The shared session uses the global singleton credential, cache +/// and cookie storage objects. +/// +/// An ephemeral session has no persistent disk storage for cookies, +/// cache or credentials. +/// +/// A background session can be used to perform networking operations +/// on behalf of a suspended application, within certain constraints. +class NSURLSessionConfiguration extends objc.NSObject { + NSURLSessionConfiguration._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSError.fromFunction( - NativeCupertinoHttp lib, void Function(NSObject?, NSError?) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + /// Constructs a [NSURLSessionConfiguration] that points to the same underlying object as [other]. + NSURLSessionConfiguration.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_NSError.listener( - NativeCupertinoHttp lib, void Function(NSObject?, NSError?) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSObject._(arg0, lib, - retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject? arg0, NSError? arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1?._id ?? ffi.nullptr); -} + /// Constructs a [NSURLSessionConfiguration] that wraps the given raw object pointer. + NSURLSessionConfiguration.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); -typedef NSItemProviderLoadHandler = ffi.Pointer<_ObjCBlock>; -typedef DartNSItemProviderLoadHandler - = ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary; -void - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - NSItemProviderCompletionHandler, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureRegistry = - , - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_registerClosure( - void Function(NSItemProviderCompletionHandler, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary - extends _ObjCBlockBase { - ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionConfiguration); + } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - NSItemProviderCompletionHandler, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// defaultSessionConfiguration + static NSURLSessionConfiguration getDefaultSessionConfiguration() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionConfiguration, _sel_defaultSessionConfiguration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary.fromFunction( - NativeCupertinoHttp lib, - void Function(DartNSItemProviderCompletionHandler, NSObject, NSDictionary) - fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, NSItemProviderCompletionHandler, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_registerClosure( - (NSItemProviderCompletionHandler arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - ObjCBlock_ffiVoid_ObjCObject_NSError1._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true), - NSDictionary._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + /// ephemeralSessionConfiguration + static NSURLSessionConfiguration getEphemeralSessionConfiguration() { + final _ret = _objc_msgSend_1unuoxw( + _class_NSURLSessionConfiguration, _sel_ephemeralSessionConfiguration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary.listener( - NativeCupertinoHttp lib, - void Function(DartNSItemProviderCompletionHandler, NSObject, NSDictionary) - fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable, NSItemProviderCompletionHandler, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_ObjCObject_NSDictionary_registerClosure( - (NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - ObjCBlock_ffiVoid_ObjCObject_NSError1._(arg0, lib, retain: true, release: true), - NSObject._(arg1, lib, retain: true, release: true), - NSDictionary._(arg2, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - NSItemProviderCompletionHandler, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(DartNSItemProviderCompletionHandler arg0, NSObject arg1, - NSDictionary arg2) => - _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - NSItemProviderCompletionHandler arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer<_ObjCBlock>, - NSItemProviderCompletionHandler, - ffi.Pointer, - ffi.Pointer)>()( - _id, arg0._id, arg1._id, arg2._id); -} - -typedef NSItemProviderCompletionHandler = ffi.Pointer<_ObjCBlock>; -typedef DartNSItemProviderCompletionHandler - = ObjCBlock_ffiVoid_ObjCObject_NSError1; -void _ObjCBlock_ffiVoid_ObjCObject_NSError1_fnPtrTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistryIndex; - _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ObjCObject_NSError1 extends _ObjCBlockBase { - ObjCBlock_ffiVoid_ObjCObject_NSError1._( - ffi.Pointer<_ObjCBlock> id, NativeCupertinoHttp lib, - {bool retain = false, bool release = true}) - : super._(id, lib, retain: retain, release: release); + /// backgroundSessionConfigurationWithIdentifier: + static NSURLSessionConfiguration + backgroundSessionConfigurationWithIdentifier_(objc.NSString identifier) { + final _ret = _objc_msgSend_juohf7( + _class_NSURLSessionConfiguration, + _sel_backgroundSessionConfigurationWithIdentifier_, + identifier.ref.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSError1.fromFunctionPointer( - NativeCupertinoHttp lib, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - lib._newBlock1( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSError1_fnPtrTrampoline) - .cast(), - ptr.cast()), - lib); - static ffi.Pointer? _cFuncTrampoline; + /// identifier for the background session configuration + objc.NSString? get identifier { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_identifier); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ObjCObject_NSError1.fromFunction( - NativeCupertinoHttp lib, void Function(NSObject?, NSError) fn) - : this._( - lib._newBlock1( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock>, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSObject._(arg0, lib, retain: true, release: true), - NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.Pointer? _dartFuncTrampoline; + /// default cache policy for requests + NSURLRequestCachePolicy get requestCachePolicy { + final _ret = + _objc_msgSend_2xak1q(this.ref.pointer, _sel_requestCachePolicy); + return NSURLRequestCachePolicy.fromValue(_ret); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ObjCObject_NSError1.listener( - NativeCupertinoHttp lib, void Function(NSObject?, NSError) fn) - : this._( - lib._newBlock1( - (_dartFuncListenerTrampoline ??= ffi - .NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ObjCObject_NSError1_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ObjCObject_NSError1_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSObject._(arg0, lib, retain: true, release: true), - NSError._(arg1, lib, retain: true, release: true)))), - lib); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject? arg0, NSError arg1) => _id.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer<_ObjCBlock>, ffi.Pointer, - ffi.Pointer)>()( - _id, arg0?._id ?? ffi.nullptr, arg1._id); -} + /// default cache policy for requests + set requestCachePolicy(NSURLRequestCachePolicy value) { + return _objc_msgSend_12vaadl( + this.ref.pointer, _sel_setRequestCachePolicy_, value.value); + } -abstract class NSItemProviderErrorCode { - static const int NSItemProviderUnknownError = -1; - static const int NSItemProviderItemUnavailableError = -1000; - static const int NSItemProviderUnexpectedValueClassError = -1100; - static const int NSItemProviderUnavailableCoercionError = -1200; -} + /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. + DartNSTimeInterval get timeoutIntervalForRequest { + return _objc_msgSend_10noklm( + this.ref.pointer, _sel_timeoutIntervalForRequest); + } -typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; -typedef DartNSStringEncodingDetectionOptionsKey = NSString; + /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. + set timeoutIntervalForRequest(DartNSTimeInterval value) { + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setTimeoutIntervalForRequest_, value); + } -class NSMutableString extends NSString { - NSMutableString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. + DartNSTimeInterval get timeoutIntervalForResource { + return _objc_msgSend_10noklm( + this.ref.pointer, _sel_timeoutIntervalForResource); + } - /// Returns a [NSMutableString] that points to the same underlying object as [other]. - static NSMutableString castFrom(T other) { - return NSMutableString._(other._id, other._lib, - retain: true, release: true); + /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. + set timeoutIntervalForResource(DartNSTimeInterval value) { + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setTimeoutIntervalForResource_, value); + } + + /// type of service for requests. + NSURLRequestNetworkServiceType get networkServiceType { + final _ret = + _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); + return NSURLRequestNetworkServiceType.fromValue(_ret); } - /// Returns a [NSMutableString] that wraps the given raw object pointer. - static NSMutableString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableString._(other, lib, retain: retain, release: release); + /// type of service for requests. + set networkServiceType(NSURLRequestNetworkServiceType value) { + return _objc_msgSend_br89tg( + this.ref.pointer, _sel_setNetworkServiceType_, value.value); } - /// Returns whether [obj] is an instance of [NSMutableString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableString1); + /// allow request to route over cellular. + bool get allowsCellularAccess { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsCellularAccess); } - void replaceCharactersInRange_withString_(NSRange range, NSString aString) { - _lib._objc_msgSend_509(_id, _lib._sel_replaceCharactersInRange_withString_1, - range, aString._id); + /// allow request to route over cellular. + set allowsCellularAccess(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsCellularAccess_, value); } - void insertString_atIndex_(NSString aString, DartNSUInteger loc) { - _lib._objc_msgSend_510( - _id, _lib._sel_insertString_atIndex_1, aString._id, loc); + /// allow request to route over expensive networks. Defaults to YES. + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsExpensiveNetworkAccess); } - void deleteCharactersInRange_(NSRange range) { - _lib._objc_msgSend_304(_id, _lib._sel_deleteCharactersInRange_1, range); + /// allow request to route over expensive networks. Defaults to YES. + set allowsExpensiveNetworkAccess(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } - void appendString_(NSString aString) { - _lib._objc_msgSend_195(_id, _lib._sel_appendString_1, aString._id); + /// allow request to route over networks in constrained mode. Defaults to YES. + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_allowsConstrainedNetworkAccess); } - void appendFormat_(NSString format) { - _lib._objc_msgSend_195(_id, _lib._sel_appendFormat_1, format._id); + /// allow request to route over networks in constrained mode. Defaults to YES. + set allowsConstrainedNetworkAccess(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } - void setString_(NSString aString) { - _lib._objc_msgSend_195(_id, _lib._sel_setString_1, aString._id); + /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. + bool get requiresDNSSECValidation { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_requiresDNSSECValidation); } - DartNSUInteger replaceOccurrencesOfString_withString_options_range_( - NSString target, NSString replacement, int options, NSRange searchRange) { - return _lib._objc_msgSend_511( - _id, - _lib._sel_replaceOccurrencesOfString_withString_options_range_1, - target._id, - replacement._id, - options, - searchRange); + /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setRequiresDNSSECValidation_, value); } - bool applyTransform_reverse_range_updatedRange_( - DartNSStringTransform transform, - bool reverse, - NSRange range, - NSRangePointer resultingRange) { - return _lib._objc_msgSend_512( - _id, - _lib._sel_applyTransform_reverse_range_updatedRange_1, - transform._id, - reverse, - range, - resultingRange); + /// Causes tasks to wait for network connectivity to become available, rather + /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) + /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest + /// property does not apply, but the timeoutIntervalForResource property does. + /// + /// Unsatisfactory connectivity (that requires waiting) includes cases where the + /// device has limited or insufficient connectivity for a task (e.g., only has a + /// cellular connection but the allowsCellularAccess property is NO, or requires + /// a VPN connection in order to reach the desired host). + /// + /// Default value is NO. Ignored by background sessions, as background sessions + /// always wait for connectivity. + bool get waitsForConnectivity { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_waitsForConnectivity); } - NSMutableString initWithCapacity_(DartNSUInteger capacity) { - final _ret = - _lib._objc_msgSend_513(_id, _lib._sel_initWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); + /// Causes tasks to wait for network connectivity to become available, rather + /// than immediately failing with an error (such as NSURLErrorNotConnectedToInternet) + /// when it is not. When waiting for connectivity, the timeoutIntervalForRequest + /// property does not apply, but the timeoutIntervalForResource property does. + /// + /// Unsatisfactory connectivity (that requires waiting) includes cases where the + /// device has limited or insufficient connectivity for a task (e.g., only has a + /// cellular connection but the allowsCellularAccess property is NO, or requires + /// a VPN connection in order to reach the desired host). + /// + /// Default value is NO. Ignored by background sessions, as background sessions + /// always wait for connectivity. + set waitsForConnectivity(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setWaitsForConnectivity_, value); } - static NSMutableString stringWithCapacity_( - NativeCupertinoHttp _lib, DartNSUInteger capacity) { - final _ret = _lib._objc_msgSend_513( - _lib._class_NSMutableString1, _lib._sel_stringWithCapacity_1, capacity); - return NSMutableString._(_ret, _lib, retain: true, release: true); + /// allows background tasks to be scheduled at the discretion of the system for optimal performance. + bool get discretionary { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isDiscretionary); } - @override - NSMutableString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableString._(_ret, _lib, retain: true, release: true); + /// allows background tasks to be scheduled at the discretion of the system for optimal performance. + set discretionary(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setDiscretionary_, value); } - @override - NSMutableString? initWithCoder_(NSCoder coder) { + /// The identifier of the shared data container into which files in background sessions should be downloaded. + /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or + /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. + objc.NSString? get sharedContainerIdentifier { final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sharedContainerIdentifier); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_255( - _lib._class_NSMutableString1, _lib._sel_availableStringEncodings1); + /// The identifier of the shared data container into which files in background sessions should be downloaded. + /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or + /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. + set sharedContainerIdentifier(objc.NSString? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setSharedContainerIdentifier_, value?.ref.pointer ?? ffi.nullptr); } - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSMutableString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + /// Allows the app to be resumed or launched in the background when tasks in background sessions complete + /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: + /// and the default value is YES. + /// + /// NOTE: macOS apps based on AppKit do not support background launch. + bool get sessionSendsLaunchEvents { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_sessionSendsLaunchEvents); } - static DartNSUInteger getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSMutableString1, _lib._sel_defaultCStringEncoding1); + /// Allows the app to be resumed or launched in the background when tasks in background sessions complete + /// or when auth is required. This only applies to configurations created with +backgroundSessionConfigurationWithIdentifier: + /// and the default value is YES. + /// + /// NOTE: macOS apps based on AppKit do not support background launch. + set sessionSendsLaunchEvents(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setSessionSendsLaunchEvents_, value); } - @override - NSMutableString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, DartNSUInteger length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_267( - _id, - _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, - characters, - length, - freeBuffer); - return NSMutableString._(_ret, _lib, retain: false, release: true); + /// The proxy dictionary, as described by + objc.NSDictionary? get connectionProxyDictionary { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_connectionProxyDictionary); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, - DartNSUInteger len, - ObjCBlock_ffiVoid_unichar_NSUInteger? deallocator) { - final _ret = _lib._objc_msgSend_268( - _id, - _lib._sel_initWithCharactersNoCopy_length_deallocator_1, - chars, - len, - deallocator?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: false, release: true); + /// The proxy dictionary, as described by + set connectionProxyDictionary(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setConnectionProxyDictionary_, value?.ref.pointer ?? ffi.nullptr); } - @override - NSMutableString initWithCharacters_length_( - ffi.Pointer characters, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_269( - _id, _lib._sel_initWithCharacters_length_1, characters, length); - return NSMutableString._(_ret, _lib, retain: true, release: true); + /// The minimum allowable versions of the TLS protocol, from + SSLProtocol get TLSMinimumSupportedProtocol { + final _ret = _objc_msgSend_ewo6ux( + this.ref.pointer, _sel_TLSMinimumSupportedProtocol); + return SSLProtocol.fromValue(_ret); } - @override - NSMutableString? initWithUTF8String_( - ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_270( - _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + /// The minimum allowable versions of the TLS protocol, from + set TLSMinimumSupportedProtocol(SSLProtocol value) { + return _objc_msgSend_hcgw10( + this.ref.pointer, _sel_setTLSMinimumSupportedProtocol_, value.value); } - @override - NSMutableString initWithString_(NSString aString) { - final _ret = - _lib._objc_msgSend_42(_id, _lib._sel_initWithString_1, aString._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + /// The maximum allowable versions of the TLS protocol, from + SSLProtocol get TLSMaximumSupportedProtocol { + final _ret = _objc_msgSend_ewo6ux( + this.ref.pointer, _sel_TLSMaximumSupportedProtocol); + return SSLProtocol.fromValue(_ret); } - @override - NSMutableString initWithFormat_(NSString format) { - final _ret = - _lib._objc_msgSend_42(_id, _lib._sel_initWithFormat_1, format._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + /// The maximum allowable versions of the TLS protocol, from + set TLSMaximumSupportedProtocol(SSLProtocol value) { + return _objc_msgSend_hcgw10( + this.ref.pointer, _sel_setTLSMaximumSupportedProtocol_, value.value); } - @override - NSMutableString initWithFormat_arguments_(NSString format, va_list argList) { - final _ret = _lib._objc_msgSend_271( - _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); - return NSMutableString._(_ret, _lib, retain: true, release: true); + /// The minimum allowable versions of the TLS protocol, from + tls_protocol_version_t get TLSMinimumSupportedProtocolVersion { + final _ret = _objc_msgSend_a6qtz( + this.ref.pointer, _sel_TLSMinimumSupportedProtocolVersion); + return tls_protocol_version_t.fromValue(_ret); } - @override - NSMutableString initWithFormat_locale_(NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_272(_id, _lib._sel_initWithFormat_locale_1, - format._id, locale?._id ?? ffi.nullptr); - return NSMutableString._(_ret, _lib, retain: true, release: true); + /// The minimum allowable versions of the TLS protocol, from + set TLSMinimumSupportedProtocolVersion(tls_protocol_version_t value) { + return _objc_msgSend_yb8bfm(this.ref.pointer, + _sel_setTLSMinimumSupportedProtocolVersion_, value.value); } - @override - NSMutableString initWithFormat_locale_arguments_( - NSString format, NSObject? locale, va_list argList) { - final _ret = _lib._objc_msgSend_273( - _id, - _lib._sel_initWithFormat_locale_arguments_1, - format._id, - locale?._id ?? ffi.nullptr, - argList); - return NSMutableString._(_ret, _lib, retain: true, release: true); + /// The maximum allowable versions of the TLS protocol, from + tls_protocol_version_t get TLSMaximumSupportedProtocolVersion { + final _ret = _objc_msgSend_a6qtz( + this.ref.pointer, _sel_TLSMaximumSupportedProtocolVersion); + return tls_protocol_version_t.fromValue(_ret); } - @override - NSMutableString? initWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_274( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + /// The maximum allowable versions of the TLS protocol, from + set TLSMaximumSupportedProtocolVersion(tls_protocol_version_t value) { + return _objc_msgSend_yb8bfm(this.ref.pointer, + _sel_setTLSMaximumSupportedProtocolVersion_, value.value); } - @override - NSMutableString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_275( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + /// Allow the use of HTTP pipelining + bool get HTTPShouldUsePipelining { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldUsePipelining); } - @override - NSMutableString? - initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - va_list argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_276( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, - format._id, - validFormatSpecifiers._id, - argList, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + /// Allow the use of HTTP pipelining + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHTTPShouldUsePipelining_, value); } - @override - NSMutableString? - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - va_list argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_277( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - argList, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + /// Allow the session to set cookies on requests + bool get HTTPShouldSetCookies { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldSetCookies); } - @override - NSMutableString? initWithData_encoding_( - NSData data, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_278( - _id, _lib._sel_initWithData_encoding_1, data._id, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + /// Allow the session to set cookies on requests + set HTTPShouldSetCookies(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setHTTPShouldSetCookies_, value); } - @override - NSMutableString? initWithBytes_length_encoding_(ffi.Pointer bytes, - DartNSUInteger len, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_279( - _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. + NSHTTPCookieAcceptPolicy get HTTPCookieAcceptPolicy { + final _ret = + _objc_msgSend_1jpuqgg(this.ref.pointer, _sel_HTTPCookieAcceptPolicy); + return NSHTTPCookieAcceptPolicy.fromValue(_ret); } - @override - NSMutableString? initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, - DartNSUInteger len, - DartNSUInteger encoding, - bool freeBuffer) { - final _ret = _lib._objc_msgSend_280( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, - bytes, - len, - encoding, - freeBuffer); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: false, release: true); + /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. + set HTTPCookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) { + return _objc_msgSend_199e8fv( + this.ref.pointer, _sel_setHTTPCookieAcceptPolicy_, value.value); } - @override - NSMutableString? initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - DartNSUInteger len, - DartNSUInteger encoding, - ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { - final _ret = _lib._objc_msgSend_281( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, - bytes, - len, - encoding, - deallocator?._id ?? ffi.nullptr); + /// Specifies additional headers which will be set on outgoing requests. + /// Note that these headers are added to the request only if not already present. + objc.NSDictionary? get HTTPAdditionalHeaders { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPAdditionalHeaders); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: false, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString string(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_string1); - return NSMutableString._(_ret, _lib, retain: true, release: true); + /// Specifies additional headers which will be set on outgoing requests. + /// Note that these headers are added to the request only if not already present. + set HTTPAdditionalHeaders(objc.NSDictionary? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, + _sel_setHTTPAdditionalHeaders_, value?.ref.pointer ?? ffi.nullptr); } - static NSMutableString stringWithString_( - NativeCupertinoHttp _lib, NSString string) { - final _ret = _lib._objc_msgSend_42( - _lib._class_NSMutableString1, _lib._sel_stringWithString_1, string._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); + /// The maximum number of simultaneous persistent connections per host + DartNSInteger get HTTPMaximumConnectionsPerHost { + return _objc_msgSend_z1fx1b( + this.ref.pointer, _sel_HTTPMaximumConnectionsPerHost); } - static NSMutableString stringWithCharacters_length_(NativeCupertinoHttp _lib, - ffi.Pointer characters, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_269(_lib._class_NSMutableString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSMutableString._(_ret, _lib, retain: true, release: true); + /// The maximum number of simultaneous persistent connections per host + set HTTPMaximumConnectionsPerHost(DartNSInteger value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setHTTPMaximumConnectionsPerHost_, value); } - static NSMutableString? stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_270(_lib._class_NSMutableString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString stringWithFormat_( - NativeCupertinoHttp _lib, NSString format) { - final _ret = _lib._objc_msgSend_42( - _lib._class_NSMutableString1, _lib._sel_stringWithFormat_1, format._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSMutableString1, - _lib._sel_localizedStringWithFormat_1, format._id); - return NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? - stringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_274( - _lib._class_NSMutableString1, - _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_274( - _lib._class_NSMutableString1, - _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); + /// The cookie storage object to use, or nil to indicate that no cookies should be handled + NSHTTPCookieStorage? get HTTPCookieStorage { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPCookieStorage); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + : NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - @override - NSMutableString? initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_282(_id, - _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + /// The cookie storage object to use, or nil to indicate that no cookies should be handled + set HTTPCookieStorage(NSHTTPCookieStorage? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPCookieStorage_, + value?.ref.pointer ?? ffi.nullptr); } - static NSMutableString? stringWithCString_encoding_(NativeCupertinoHttp _lib, - ffi.Pointer cString, DartNSUInteger enc) { - final _ret = _lib._objc_msgSend_282(_lib._class_NSMutableString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); + /// The credential storage object, or nil to indicate that no credential storage is to be used + NSURLCredentialStorage? get URLCredentialStorage { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URLCredentialStorage); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + : NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } - @override - NSMutableString? initWithContentsOfURL_encoding_error_(NSURL url, - DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_283(_id, - _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + /// The credential storage object, or nil to indicate that no credential storage is to be used + set URLCredentialStorage(NSURLCredentialStorage? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setURLCredentialStorage_, + value?.ref.pointer ?? ffi.nullptr); } - @override - NSMutableString? initWithContentsOfFile_encoding_error_(NSString path, - DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284( - _id, - _lib._sel_initWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL url, - DartNSUInteger enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_283( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString path, - DartNSUInteger enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); + /// The URL resource cache, or nil to indicate that no caching is to be performed + NSURLCache? get URLCache { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URLCache); return _ret.address == 0 ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + : NSURLCache.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_285( - _id, - _lib._sel_initWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); + /// The URL resource cache, or nil to indicate that no caching is to be performed + set URLCache(NSURLCache? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setURLCache_, value?.ref.pointer ?? ffi.nullptr); } - @override - NSMutableString? initWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_286( - _id, - _lib._sel_initWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_285( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_286( - _lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, _lib, retain: true, release: true); - } - - static DartNSUInteger - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_287( - _lib._class_NSMutableString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data._id, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } - - static NSObject? stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open + /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) + bool get shouldUseExtendedBackgroundIdleMode { + return _objc_msgSend_olxnu1( + this.ref.pointer, _sel_shouldUseExtendedBackgroundIdleMode); } - static NSObject? stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_226(_lib._class_NSMutableString1, - _lib._sel_stringWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open + /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) + set shouldUseExtendedBackgroundIdleMode(bool value) { + return _objc_msgSend_117qins( + this.ref.pointer, _sel_setShouldUseExtendedBackgroundIdleMode_, value); } - static NSObject? stringWithCString_length_(NativeCupertinoHttp _lib, - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_282(_lib._class_NSMutableString1, - _lib._sel_stringWithCString_length_1, bytes, length); + /// An optional array of Class objects which subclass NSURLProtocol. + /// The Class will be sent +canInitWithRequest: when determining if + /// an instance of the class can be used for a given URL scheme. + /// You should not use +[NSURLProtocol registerClass:], as that + /// method will register your class with the default session rather + /// than with an instance of NSURLSession. + /// Custom NSURLProtocol subclasses are not available to background + /// sessions. + objc.ObjCObjectBase? get protocolClasses { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_protocolClasses); return _ret.address == 0 ? null - : NSObject._(_ret, _lib, retain: true, release: true); + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - static NSObject? stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_270( - _lib._class_NSMutableString1, _lib._sel_stringWithCString_1, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + /// An optional array of Class objects which subclass NSURLProtocol. + /// The Class will be sent +canInitWithRequest: when determining if + /// an instance of the class can be used for a given URL scheme. + /// You should not use +[NSURLProtocol registerClass:], as that + /// method will register your class with the default session rather + /// than with an instance of NSURLSession. + /// Custom NSURLProtocol subclasses are not available to background + /// sessions. + set protocolClasses(objc.ObjCObjectBase? value) { + return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setProtocolClasses_, + value?.ref.pointer ?? ffi.nullptr); + } + + /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone + NSURLSessionMultipathServiceType get multipathServiceType { + final _ret = + _objc_msgSend_zqvllq(this.ref.pointer, _sel_multipathServiceType); + return NSURLSessionMultipathServiceType.fromValue(_ret); + } + + /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone + set multipathServiceType(NSURLSessionMultipathServiceType value) { + return _objc_msgSend_1ngj1qh( + this.ref.pointer, _sel_setMultipathServiceType_, value.value); + } + + /// init + NSURLSessionConfiguration init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } - static NSMutableString new1(NativeCupertinoHttp _lib) { + /// new + static NSURLSessionConfiguration new1() { final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_new1); - return NSMutableString._(_ret, _lib, retain: false, release: true); + _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_new); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); + } + + /// backgroundSessionConfiguration: + static NSURLSessionConfiguration backgroundSessionConfiguration_( + objc.NSString identifier) { + final _ret = _objc_msgSend_juohf7(_class_NSURLSessionConfiguration, + _sel_backgroundSessionConfiguration_, identifier.ref.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - static NSMutableString allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableString1, _lib._sel_allocWithZone_1, zone); - return NSMutableString._(_ret, _lib, retain: false, release: true); + /// allocWithZone: + static NSURLSessionConfiguration allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionConfiguration, _sel_allocWithZone_, zone); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } - static NSMutableString alloc(NativeCupertinoHttp _lib) { + /// alloc + static NSURLSessionConfiguration alloc() { final _ret = - _lib._objc_msgSend_2(_lib._class_NSMutableString1, _lib._sel_alloc1); - return NSMutableString._(_ret, _lib, retain: false, release: true); + _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_alloc); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } } -typedef NSExceptionName = ffi.Pointer; -typedef DartNSExceptionName = NSString; +late final _class_NSURLSessionConfiguration = + objc.getClass("NSURLSessionConfiguration"); +late final _sel_defaultSessionConfiguration = + objc.registerName("defaultSessionConfiguration"); +late final _sel_ephemeralSessionConfiguration = + objc.registerName("ephemeralSessionConfiguration"); +late final _sel_backgroundSessionConfigurationWithIdentifier_ = + objc.registerName("backgroundSessionConfigurationWithIdentifier:"); +late final _sel_identifier = objc.registerName("identifier"); +late final _sel_requestCachePolicy = objc.registerName("requestCachePolicy"); +late final _sel_setRequestCachePolicy_ = + objc.registerName("setRequestCachePolicy:"); +late final _sel_timeoutIntervalForRequest = + objc.registerName("timeoutIntervalForRequest"); +late final _sel_setTimeoutIntervalForRequest_ = + objc.registerName("setTimeoutIntervalForRequest:"); +late final _sel_timeoutIntervalForResource = + objc.registerName("timeoutIntervalForResource"); +late final _sel_setTimeoutIntervalForResource_ = + objc.registerName("setTimeoutIntervalForResource:"); +late final _sel_waitsForConnectivity = + objc.registerName("waitsForConnectivity"); +late final _sel_setWaitsForConnectivity_ = + objc.registerName("setWaitsForConnectivity:"); +late final _sel_isDiscretionary = objc.registerName("isDiscretionary"); +late final _sel_setDiscretionary_ = objc.registerName("setDiscretionary:"); +late final _sel_sharedContainerIdentifier = + objc.registerName("sharedContainerIdentifier"); +late final _sel_setSharedContainerIdentifier_ = + objc.registerName("setSharedContainerIdentifier:"); +late final _sel_sessionSendsLaunchEvents = + objc.registerName("sessionSendsLaunchEvents"); +late final _sel_setSessionSendsLaunchEvents_ = + objc.registerName("setSessionSendsLaunchEvents:"); +late final _sel_connectionProxyDictionary = + objc.registerName("connectionProxyDictionary"); +late final _sel_setConnectionProxyDictionary_ = + objc.registerName("setConnectionProxyDictionary:"); +late final _sel_TLSMinimumSupportedProtocol = + objc.registerName("TLSMinimumSupportedProtocol"); +final _objc_msgSend_ewo6ux = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocol_ = + objc.registerName("setTLSMinimumSupportedProtocol:"); +final _objc_msgSend_hcgw10 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocol = + objc.registerName("TLSMaximumSupportedProtocol"); +late final _sel_setTLSMaximumSupportedProtocol_ = + objc.registerName("setTLSMaximumSupportedProtocol:"); +late final _sel_TLSMinimumSupportedProtocolVersion = + objc.registerName("TLSMinimumSupportedProtocolVersion"); +final _objc_msgSend_a6qtz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Uint16 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocolVersion_ = + objc.registerName("setTLSMinimumSupportedProtocolVersion:"); +final _objc_msgSend_yb8bfm = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Uint16)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocolVersion = + objc.registerName("TLSMaximumSupportedProtocolVersion"); +late final _sel_setTLSMaximumSupportedProtocolVersion_ = + objc.registerName("setTLSMaximumSupportedProtocolVersion:"); +late final _sel_HTTPShouldSetCookies = + objc.registerName("HTTPShouldSetCookies"); +late final _sel_setHTTPShouldSetCookies_ = + objc.registerName("setHTTPShouldSetCookies:"); +late final _sel_HTTPCookieAcceptPolicy = + objc.registerName("HTTPCookieAcceptPolicy"); +late final _sel_setHTTPCookieAcceptPolicy_ = + objc.registerName("setHTTPCookieAcceptPolicy:"); +late final _sel_HTTPAdditionalHeaders = + objc.registerName("HTTPAdditionalHeaders"); +late final _sel_setHTTPAdditionalHeaders_ = + objc.registerName("setHTTPAdditionalHeaders:"); +late final _sel_HTTPMaximumConnectionsPerHost = + objc.registerName("HTTPMaximumConnectionsPerHost"); +final _objc_msgSend_z1fx1b = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setHTTPMaximumConnectionsPerHost_ = + objc.registerName("setHTTPMaximumConnectionsPerHost:"); +final _objc_msgSend_ke7qz2 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_HTTPCookieStorage = objc.registerName("HTTPCookieStorage"); +late final _sel_setHTTPCookieStorage_ = + objc.registerName("setHTTPCookieStorage:"); + +/// NSURLCredentialStorage +class NSURLCredentialStorage extends objc.ObjCObjectBase { + NSURLCredentialStorage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSURLCredentialStorage] that points to the same underlying object as [other]. + NSURLCredentialStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); -class NSSimpleCString extends NSString { - NSSimpleCString._(ffi.Pointer id, NativeCupertinoHttp lib, + /// Constructs a [NSURLCredentialStorage] that wraps the given raw object pointer. + NSURLCredentialStorage.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSSimpleCString] that points to the same underlying object as [other]. - static NSSimpleCString castFrom(T other) { - return NSSimpleCString._(other._id, other._lib, - retain: true, release: true); - } + /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); + } +} + +late final _class_NSURLCredentialStorage = + objc.getClass("NSURLCredentialStorage"); +late final _sel_URLCredentialStorage = + objc.registerName("URLCredentialStorage"); +late final _sel_setURLCredentialStorage_ = + objc.registerName("setURLCredentialStorage:"); +late final _sel_URLCache = objc.registerName("URLCache"); +late final _sel_setURLCache_ = objc.registerName("setURLCache:"); +late final _sel_shouldUseExtendedBackgroundIdleMode = + objc.registerName("shouldUseExtendedBackgroundIdleMode"); +late final _sel_setShouldUseExtendedBackgroundIdleMode_ = + objc.registerName("setShouldUseExtendedBackgroundIdleMode:"); +late final _sel_protocolClasses = objc.registerName("protocolClasses"); +late final _sel_setProtocolClasses_ = objc.registerName("setProtocolClasses:"); - /// Returns a [NSSimpleCString] that wraps the given raw object pointer. - static NSSimpleCString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSSimpleCString._(other, lib, retain: retain, release: release); - } +/// ! +/// @enum NSURLSessionMultipathServiceType +/// +/// @discussion The NSURLSessionMultipathServiceType enum defines constants that +/// can be used to specify the multipath service type to associate an NSURLSession. The +/// multipath service type determines whether multipath TCP should be attempted and the conditions +/// for creating and switching between subflows. Using these service types requires the appropriate entitlement. Any connection attempt will fail if the process does not have the required entitlement. +/// A primary interface is a generally less expensive interface in terms of both cost and power (such as WiFi or ethernet). A secondary interface is more expensive (such as 3G or LTE). +/// +/// @constant NSURLSessionMultipathServiceTypeNone Specifies that multipath tcp should not be used. Connections will use a single flow. +/// This is the default value. No entitlement is required to set this value. +/// +/// @constant NSURLSessionMultipathServiceTypeHandover Specifies that a secondary subflow should only be used +/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entitlement. +/// +/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secondary subflow should be used if the +/// primary subflow is not performing adequately (packet loss, high round trip times, bandwidth issues). The secondary +/// subflow will be created more aggressively than with NSURLSessionMultipathServiceTypeHandover. Requires the com.apple.developer.networking.multipath entitlement. +/// +/// @constant NSURLSessionMultipathServiceTypeAggregate Specifies that multiple subflows across multiple interfaces should be +/// used for better bandwidth. This mode is only available for experimentation on devices configured for development use. +/// It can be enabled in the Developer section of the Settings app. +enum NSURLSessionMultipathServiceType { + /// None - no multipath (default) + NSURLSessionMultipathServiceTypeNone(0), - /// Returns whether [obj] is an instance of [NSSimpleCString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSSimpleCString1); - } + /// Handover - secondary flows brought up when primary flow is not performing adequately. + NSURLSessionMultipathServiceTypeHandover(1), - @override - NSSimpleCString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + /// Interactive - secondary flows created more aggressively. + NSURLSessionMultipathServiceTypeInteractive(2), - @override - NSSimpleCString? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); - } + /// Aggregate - multiple subflows used for greater bandwidth. + NSURLSessionMultipathServiceTypeAggregate(3); + + final int value; + const NSURLSessionMultipathServiceType(this.value); + + static NSURLSessionMultipathServiceType fromValue(int value) => + switch (value) { + 0 => NSURLSessionMultipathServiceTypeNone, + 1 => NSURLSessionMultipathServiceTypeHandover, + 2 => NSURLSessionMultipathServiceTypeInteractive, + 3 => NSURLSessionMultipathServiceTypeAggregate, + _ => throw ArgumentError( + "Unknown value for NSURLSessionMultipathServiceType: $value"), + }; +} + +late final _sel_multipathServiceType = + objc.registerName("multipathServiceType"); +final _objc_msgSend_zqvllq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMultipathServiceType_ = + objc.registerName("setMultipathServiceType:"); +final _objc_msgSend_1ngj1qh = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_backgroundSessionConfiguration_ = + objc.registerName("backgroundSessionConfiguration:"); +late final _sel_sessionWithConfiguration_ = + objc.registerName("sessionWithConfiguration:"); + +/// NSOperationQueue +class NSOperationQueue extends objc.NSObject { + NSOperationQueue._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_255( - _lib._class_NSSimpleCString1, _lib._sel_availableStringEncodings1); - } + /// Constructs a [NSOperationQueue] that points to the same underlying object as [other]. + NSOperationQueue.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSSimpleCString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSOperationQueue] that wraps the given raw object pointer. + NSOperationQueue.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static DartNSUInteger getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSSimpleCString1, _lib._sel_defaultCStringEncoding1); + /// Returns whether [obj] is an instance of [NSOperationQueue]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSOperationQueue); } - @override - NSSimpleCString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, DartNSUInteger length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_267( - _id, - _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, - characters, - length, - freeBuffer); - return NSSimpleCString._(_ret, _lib, retain: false, release: true); + /// @property progress + /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue + /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the + /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the + /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super + /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress + /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% + /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 + /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be + /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by + /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving + /// progress scenario. + /// + /// @example + /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; + /// queue.progress.totalUnitCount = 10; + NSProgress get progress { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_progress); + return NSProgress.castFromPointer(_ret, retain: true, release: true); } - @override - NSSimpleCString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, - DartNSUInteger len, - ObjCBlock_ffiVoid_unichar_NSUInteger? deallocator) { - final _ret = _lib._objc_msgSend_268( - _id, - _lib._sel_initWithCharactersNoCopy_length_deallocator_1, - chars, - len, - deallocator?._id ?? ffi.nullptr); - return NSSimpleCString._(_ret, _lib, retain: false, release: true); + /// addOperation: + void addOperation_(NSOperation op) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addOperation_, op.ref.pointer); } - @override - NSSimpleCString initWithCharacters_length_( - ffi.Pointer characters, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_269( - _id, _lib._sel_initWithCharacters_length_1, characters, length); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// addOperations:waitUntilFinished: + void addOperations_waitUntilFinished_(objc.NSArray ops, bool wait) { + _objc_msgSend_1n1qwdd(this.ref.pointer, + _sel_addOperations_waitUntilFinished_, ops.ref.pointer, wait); } - @override - NSSimpleCString? initWithUTF8String_( - ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_270( - _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// addOperationWithBlock: + void addOperationWithBlock_(objc.ObjCBlock block) { + _objc_msgSend_4daxhl( + this.ref.pointer, _sel_addOperationWithBlock_, block.ref.pointer); } - @override - NSSimpleCString initWithString_(NSString aString) { - final _ret = - _lib._objc_msgSend_42(_id, _lib._sel_initWithString_1, aString._id); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// @method addBarrierBlock: + /// @param barrier A block to execute + /// @discussion The `addBarrierBlock:` method executes the block when the NSOperationQueue has finished all enqueued operations and + /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the + /// `dispatch_barrier_async` function. + void addBarrierBlock_(objc.ObjCBlock barrier) { + _objc_msgSend_4daxhl( + this.ref.pointer, _sel_addBarrierBlock_, barrier.ref.pointer); } - @override - NSSimpleCString initWithFormat_(NSString format) { - final _ret = - _lib._objc_msgSend_42(_id, _lib._sel_initWithFormat_1, format._id); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// maxConcurrentOperationCount + DartNSInteger get maxConcurrentOperationCount { + return _objc_msgSend_z1fx1b( + this.ref.pointer, _sel_maxConcurrentOperationCount); } - @override - NSSimpleCString initWithFormat_arguments_(NSString format, va_list argList) { - final _ret = _lib._objc_msgSend_271( - _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// setMaxConcurrentOperationCount: + set maxConcurrentOperationCount(DartNSInteger value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setMaxConcurrentOperationCount_, value); } - @override - NSSimpleCString initWithFormat_locale_(NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_272(_id, _lib._sel_initWithFormat_locale_1, - format._id, locale?._id ?? ffi.nullptr); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// isSuspended + bool get suspended { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isSuspended); } - @override - NSSimpleCString initWithFormat_locale_arguments_( - NSString format, NSObject? locale, va_list argList) { - final _ret = _lib._objc_msgSend_273( - _id, - _lib._sel_initWithFormat_locale_arguments_1, - format._id, - locale?._id ?? ffi.nullptr, - argList); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// setSuspended: + set suspended(bool value) { + return _objc_msgSend_117qins(this.ref.pointer, _sel_setSuspended_, value); } - @override - NSSimpleCString? initWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_274( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); + /// name + objc.NSString? get name { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); return _ret.address == 0 ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSSimpleCString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_275( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// setName: + set name(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); } - @override - NSSimpleCString? - initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - va_list argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_276( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, - format._id, - validFormatSpecifiers._id, - argList, - error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// qualityOfService + NSQualityOfService get qualityOfService { + final _ret = _objc_msgSend_17dnyeh(this.ref.pointer, _sel_qualityOfService); + return NSQualityOfService.fromValue(_ret); } - @override - NSSimpleCString? - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - va_list argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_277( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - argList, - error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// setQualityOfService: + set qualityOfService(NSQualityOfService value) { + return _objc_msgSend_1fcr8u4( + this.ref.pointer, _sel_setQualityOfService_, value.value); } - @override - NSSimpleCString? initWithData_encoding_( - NSData data, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_278( - _id, _lib._sel_initWithData_encoding_1, data._id, encoding); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// actually retain + Dartdispatch_queue_t get underlyingQueue { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_underlyingQueue); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - @override - NSSimpleCString? initWithBytes_length_encoding_(ffi.Pointer bytes, - DartNSUInteger len, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_279( - _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// actually retain + set underlyingQueue(Dartdispatch_queue_t value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setUnderlyingQueue_, value.ref.pointer); } - @override - NSSimpleCString? initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, - DartNSUInteger len, - DartNSUInteger encoding, - bool freeBuffer) { - final _ret = _lib._objc_msgSend_280( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, - bytes, - len, - encoding, - freeBuffer); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: false, release: true); + /// cancelAllOperations + void cancelAllOperations() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancelAllOperations); } - @override - NSSimpleCString? initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - DartNSUInteger len, - DartNSUInteger encoding, - ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { - final _ret = _lib._objc_msgSend_281( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, - bytes, - len, - encoding, - deallocator?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: false, release: true); + /// waitUntilAllOperationsAreFinished + void waitUntilAllOperationsAreFinished() { + _objc_msgSend_ksby9f( + this.ref.pointer, _sel_waitUntilAllOperationsAreFinished); } - static NSSimpleCString string(NativeCupertinoHttp _lib) { + /// currentQueue + static NSOperationQueue? getCurrentQueue() { final _ret = - _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_string1); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_currentQueue); + return _ret.address == 0 + ? null + : NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - static NSSimpleCString stringWithString_( - NativeCupertinoHttp _lib, NSString string) { - final _ret = _lib._objc_msgSend_42( - _lib._class_NSSimpleCString1, _lib._sel_stringWithString_1, string._id); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// mainQueue + static NSOperationQueue getMainQueue() { + final _ret = _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_mainQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - static NSSimpleCString stringWithCharacters_length_(NativeCupertinoHttp _lib, - ffi.Pointer characters, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_269(_lib._class_NSSimpleCString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// These two functions are inherently a race condition and should be avoided if possible + objc.NSArray get operations { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_operations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSSimpleCString? stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_270(_lib._class_NSSimpleCString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); - } - - static NSSimpleCString stringWithFormat_( - NativeCupertinoHttp _lib, NSString format) { - final _ret = _lib._objc_msgSend_42( - _lib._class_NSSimpleCString1, _lib._sel_stringWithFormat_1, format._id); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } - - static NSSimpleCString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSSimpleCString1, - _lib._sel_localizedStringWithFormat_1, format._id); - return NSSimpleCString._(_ret, _lib, retain: true, release: true); - } - - static NSSimpleCString? - stringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_274( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); - } - - static NSSimpleCString? - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_274( - _lib._class_NSSimpleCString1, - _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// operationCount + DartNSUInteger get operationCount { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_operationCount); } - @override - NSSimpleCString? initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_282(_id, - _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// init + NSOperationQueue init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } - static NSSimpleCString? stringWithCString_encoding_(NativeCupertinoHttp _lib, - ffi.Pointer cString, DartNSUInteger enc) { - final _ret = _lib._objc_msgSend_282(_lib._class_NSSimpleCString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// new + static NSOperationQueue new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_new); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } - @override - NSSimpleCString? initWithContentsOfURL_encoding_error_(NSURL url, - DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_283(_id, - _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// allocWithZone: + static NSOperationQueue allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSOperationQueue, _sel_allocWithZone_, zone); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } - @override - NSSimpleCString? initWithContentsOfFile_encoding_error_(NSString path, - DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284( - _id, - _lib._sel_initWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); - } - - static NSSimpleCString? stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL url, - DartNSUInteger enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_283( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); - } - - static NSSimpleCString? stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString path, - DartNSUInteger enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); + /// alloc + static NSOperationQueue alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_alloc); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } +} - @override - NSSimpleCString? initWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_285( - _id, - _lib._sel_initWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); - } +late final _class_NSOperationQueue = objc.getClass("NSOperationQueue"); - @override - NSSimpleCString? initWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_286( - _id, - _lib._sel_initWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); - } - - static NSSimpleCString? stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_285( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); - } - - static NSSimpleCString? stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_286( - _lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSSimpleCString._(_ret, _lib, retain: true, release: true); - } - - static DartNSUInteger - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_287( - _lib._class_NSSimpleCString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data._id, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } - - static NSObject? stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } +/// NSOperation +class NSOperation extends objc.NSObject { + NSOperation._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSObject? stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_226(_lib._class_NSSimpleCString1, - _lib._sel_stringWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSOperation] that points to the same underlying object as [other]. + NSOperation.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - static NSObject? stringWithCString_length_(NativeCupertinoHttp _lib, - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_282(_lib._class_NSSimpleCString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSOperation] that wraps the given raw object pointer. + NSOperation.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSObject? stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_270( - _lib._class_NSSimpleCString1, _lib._sel_stringWithCString_1, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSOperation]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSOperation); } - static NSSimpleCString new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_new1); - return NSSimpleCString._(_ret, _lib, retain: false, release: true); + /// start + void start() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_start); } - static NSSimpleCString allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSSimpleCString1, _lib._sel_allocWithZone_1, zone); - return NSSimpleCString._(_ret, _lib, retain: false, release: true); + /// main + void main() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_main); } - static NSSimpleCString alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSSimpleCString1, _lib._sel_alloc1); - return NSSimpleCString._(_ret, _lib, retain: false, release: true); + /// isCancelled + bool get cancelled { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isCancelled); } -} - -class NSConstantString extends NSSimpleCString { - NSConstantString._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSConstantString] that points to the same underlying object as [other]. - static NSConstantString castFrom(T other) { - return NSConstantString._(other._id, other._lib, - retain: true, release: true); + /// cancel + void cancel() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); } - /// Returns a [NSConstantString] that wraps the given raw object pointer. - static NSConstantString castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSConstantString._(other, lib, retain: retain, release: release); + /// isExecuting + bool get executing { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isExecuting); } - /// Returns whether [obj] is an instance of [NSConstantString]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSConstantString1); + /// isFinished + bool get finished { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isFinished); } - @override - NSConstantString init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSConstantString._(_ret, _lib, retain: true, release: true); + /// To be deprecated; use and override 'asynchronous' below + bool get concurrent { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isConcurrent); } - @override - NSConstantString? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); + /// isAsynchronous + bool get asynchronous { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isAsynchronous); } - static ffi.Pointer getAvailableStringEncodings( - NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_255( - _lib._class_NSConstantString1, _lib._sel_availableStringEncodings1); + /// isReady + bool get ready { + return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isReady); } - static NSString localizedNameOfStringEncoding_( - NativeCupertinoHttp _lib, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_15(_lib._class_NSConstantString1, - _lib._sel_localizedNameOfStringEncoding_1, encoding); - return NSString._(_ret, _lib, retain: true, release: true); + /// addDependency: + void addDependency_(NSOperation op) { + _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addDependency_, op.ref.pointer); } - static DartNSUInteger getDefaultCStringEncoding(NativeCupertinoHttp _lib) { - return _lib._objc_msgSend_12( - _lib._class_NSConstantString1, _lib._sel_defaultCStringEncoding1); + /// removeDependency: + void removeDependency_(NSOperation op) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_removeDependency_, op.ref.pointer); } - @override - NSConstantString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, DartNSUInteger length, bool freeBuffer) { - final _ret = _lib._objc_msgSend_267( - _id, - _lib._sel_initWithCharactersNoCopy_length_freeWhenDone_1, - characters, - length, - freeBuffer); - return NSConstantString._(_ret, _lib, retain: false, release: true); + /// dependencies + objc.NSArray get dependencies { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_dependencies); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - @override - NSConstantString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, - DartNSUInteger len, - ObjCBlock_ffiVoid_unichar_NSUInteger? deallocator) { - final _ret = _lib._objc_msgSend_268( - _id, - _lib._sel_initWithCharactersNoCopy_length_deallocator_1, - chars, - len, - deallocator?._id ?? ffi.nullptr); - return NSConstantString._(_ret, _lib, retain: false, release: true); + /// queuePriority + NSOperationQueuePriority get queuePriority { + final _ret = _objc_msgSend_10n15g8(this.ref.pointer, _sel_queuePriority); + return NSOperationQueuePriority.fromValue(_ret); } - @override - NSConstantString initWithCharacters_length_( - ffi.Pointer characters, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_269( - _id, _lib._sel_initWithCharacters_length_1, characters, length); - return NSConstantString._(_ret, _lib, retain: true, release: true); + /// setQueuePriority: + set queuePriority(NSOperationQueuePriority value) { + return _objc_msgSend_d8yjnr( + this.ref.pointer, _sel_setQueuePriority_, value.value); } - @override - NSConstantString? initWithUTF8String_( - ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_270( - _id, _lib._sel_initWithUTF8String_1, nullTerminatedCString); + /// completionBlock + objc.ObjCBlock? get completionBlock { + final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_completionBlock); return _ret.address == 0 ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } - @override - NSConstantString initWithString_(NSString aString) { - final _ret = - _lib._objc_msgSend_42(_id, _lib._sel_initWithString_1, aString._id); - return NSConstantString._(_ret, _lib, retain: true, release: true); + /// setCompletionBlock: + set completionBlock(objc.ObjCBlock? value) { + return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setCompletionBlock_, + value?.ref.pointer ?? ffi.nullptr); } - @override - NSConstantString initWithFormat_(NSString format) { - final _ret = - _lib._objc_msgSend_42(_id, _lib._sel_initWithFormat_1, format._id); - return NSConstantString._(_ret, _lib, retain: true, release: true); + /// waitUntilFinished + void waitUntilFinished() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilFinished); } - @override - NSConstantString initWithFormat_arguments_(NSString format, va_list argList) { - final _ret = _lib._objc_msgSend_271( - _id, _lib._sel_initWithFormat_arguments_1, format._id, argList); - return NSConstantString._(_ret, _lib, retain: true, release: true); + /// threadPriority + double get threadPriority { + return _objc_msgSend_10noklm(this.ref.pointer, _sel_threadPriority); } - @override - NSConstantString initWithFormat_locale_(NSString format, NSObject? locale) { - final _ret = _lib._objc_msgSend_272(_id, _lib._sel_initWithFormat_locale_1, - format._id, locale?._id ?? ffi.nullptr); - return NSConstantString._(_ret, _lib, retain: true, release: true); + /// setThreadPriority: + set threadPriority(double value) { + return _objc_msgSend_suh039( + this.ref.pointer, _sel_setThreadPriority_, value); } - @override - NSConstantString initWithFormat_locale_arguments_( - NSString format, NSObject? locale, va_list argList) { - final _ret = _lib._objc_msgSend_273( - _id, - _lib._sel_initWithFormat_locale_arguments_1, - format._id, - locale?._id ?? ffi.nullptr, - argList); - return NSConstantString._(_ret, _lib, retain: true, release: true); + /// qualityOfService + NSQualityOfService get qualityOfService { + final _ret = _objc_msgSend_17dnyeh(this.ref.pointer, _sel_qualityOfService); + return NSQualityOfService.fromValue(_ret); } - @override - NSConstantString? initWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_274( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); + /// setQualityOfService: + set qualityOfService(NSQualityOfService value) { + return _objc_msgSend_1fcr8u4( + this.ref.pointer, _sel_setQualityOfService_, value.value); } - @override - NSConstantString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_275( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - error); + /// name + objc.NSString? get name { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); return _ret.address == 0 ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSConstantString? - initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - va_list argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_276( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_1, - format._id, - validFormatSpecifiers._id, - argList, - error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); + /// setName: + set name(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); } - @override - NSConstantString? - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - va_list argList, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_277( - _id, - _lib._sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_1, - format._id, - validFormatSpecifiers._id, - locale?._id ?? ffi.nullptr, - argList, - error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); + /// init + NSOperation init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSOperation.castFromPointer(_ret, retain: false, release: true); } - @override - NSConstantString? initWithData_encoding_( - NSData data, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_278( - _id, _lib._sel_initWithData_encoding_1, data._id, encoding); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); + /// new + static NSOperation new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSOperation, _sel_new); + return NSOperation.castFromPointer(_ret, retain: false, release: true); } - @override - NSConstantString? initWithBytes_length_encoding_(ffi.Pointer bytes, - DartNSUInteger len, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_279( - _id, _lib._sel_initWithBytes_length_encoding_1, bytes, len, encoding); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); - } + /// allocWithZone: + static NSOperation allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSOperation, _sel_allocWithZone_, zone); + return NSOperation.castFromPointer(_ret, retain: false, release: true); + } + + /// alloc + static NSOperation alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSOperation, _sel_alloc); + return NSOperation.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSOperation = objc.getClass("NSOperation"); +late final _sel_start = objc.registerName("start"); +late final _sel_main = objc.registerName("main"); +late final _sel_isExecuting = objc.registerName("isExecuting"); +late final _sel_isConcurrent = objc.registerName("isConcurrent"); +late final _sel_isAsynchronous = objc.registerName("isAsynchronous"); +late final _sel_isReady = objc.registerName("isReady"); +late final _sel_addDependency_ = objc.registerName("addDependency:"); +late final _sel_removeDependency_ = objc.registerName("removeDependency:"); +late final _sel_dependencies = objc.registerName("dependencies"); + +enum NSOperationQueuePriority { + NSOperationQueuePriorityVeryLow(-8), + NSOperationQueuePriorityLow(-4), + NSOperationQueuePriorityNormal(0), + NSOperationQueuePriorityHigh(4), + NSOperationQueuePriorityVeryHigh(8); + + final int value; + const NSOperationQueuePriority(this.value); + + static NSOperationQueuePriority fromValue(int value) => switch (value) { + -8 => NSOperationQueuePriorityVeryLow, + -4 => NSOperationQueuePriorityLow, + 0 => NSOperationQueuePriorityNormal, + 4 => NSOperationQueuePriorityHigh, + 8 => NSOperationQueuePriorityVeryHigh, + _ => throw ArgumentError( + "Unknown value for NSOperationQueuePriority: $value"), + }; +} + +late final _sel_queuePriority = objc.registerName("queuePriority"); +final _objc_msgSend_10n15g8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setQueuePriority_ = objc.registerName("setQueuePriority:"); +final _objc_msgSend_d8yjnr = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_completionBlock = objc.registerName("completionBlock"); +late final _sel_setCompletionBlock_ = objc.registerName("setCompletionBlock:"); +late final _sel_waitUntilFinished = objc.registerName("waitUntilFinished"); +late final _sel_threadPriority = objc.registerName("threadPriority"); +late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); + +enum NSQualityOfService { + NSQualityOfServiceUserInteractive(33), + NSQualityOfServiceUserInitiated(25), + NSQualityOfServiceUtility(17), + NSQualityOfServiceBackground(9), + NSQualityOfServiceDefault(-1); + + final int value; + const NSQualityOfService(this.value); + + static NSQualityOfService fromValue(int value) => switch (value) { + 33 => NSQualityOfServiceUserInteractive, + 25 => NSQualityOfServiceUserInitiated, + 17 => NSQualityOfServiceUtility, + 9 => NSQualityOfServiceBackground, + -1 => NSQualityOfServiceDefault, + _ => + throw ArgumentError("Unknown value for NSQualityOfService: $value"), + }; +} + +late final _sel_qualityOfService = objc.registerName("qualityOfService"); +final _objc_msgSend_17dnyeh = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setQualityOfService_ = + objc.registerName("setQualityOfService:"); +final _objc_msgSend_1fcr8u4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_name = objc.registerName("name"); +late final _sel_setName_ = objc.registerName("setName:"); +late final _sel_addOperation_ = objc.registerName("addOperation:"); +late final _sel_addOperations_waitUntilFinished_ = + objc.registerName("addOperations:waitUntilFinished:"); +final _objc_msgSend_1n1qwdd = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_addOperationWithBlock_ = + objc.registerName("addOperationWithBlock:"); +late final _sel_addBarrierBlock_ = objc.registerName("addBarrierBlock:"); +late final _sel_maxConcurrentOperationCount = + objc.registerName("maxConcurrentOperationCount"); +late final _sel_setMaxConcurrentOperationCount_ = + objc.registerName("setMaxConcurrentOperationCount:"); +late final _sel_isSuspended = objc.registerName("isSuspended"); +late final _sel_setSuspended_ = objc.registerName("setSuspended:"); +late final _sel_underlyingQueue = objc.registerName("underlyingQueue"); +late final _sel_setUnderlyingQueue_ = objc.registerName("setUnderlyingQueue:"); +late final _sel_cancelAllOperations = objc.registerName("cancelAllOperations"); +late final _sel_waitUntilAllOperationsAreFinished = + objc.registerName("waitUntilAllOperationsAreFinished"); +late final _sel_currentQueue = objc.registerName("currentQueue"); +late final _sel_mainQueue = objc.registerName("mainQueue"); +late final _sel_operations = objc.registerName("operations"); +late final _sel_operationCount = objc.registerName("operationCount"); +late final _sel_sessionWithConfiguration_delegate_delegateQueue_ = + objc.registerName("sessionWithConfiguration:delegate:delegateQueue:"); +final _objc_msgSend_aud7dn = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_delegateQueue = objc.registerName("delegateQueue"); +late final _sel_configuration = objc.registerName("configuration"); +late final _sel_sessionDescription = objc.registerName("sessionDescription"); +late final _sel_setSessionDescription_ = + objc.registerName("setSessionDescription:"); +late final _sel_finishTasksAndInvalidate = + objc.registerName("finishTasksAndInvalidate"); +late final _sel_invalidateAndCancel = objc.registerName("invalidateAndCancel"); +late final _sel_resetWithCompletionHandler_ = + objc.registerName("resetWithCompletionHandler:"); +late final _sel_flushWithCompletionHandler_ = + objc.registerName("flushWithCompletionHandler:"); +void + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(pointer, + retain: retain, release: release); - @override - NSConstantString? initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, - DartNSUInteger len, - DartNSUInteger encoding, - bool freeBuffer) { - final _ret = _lib._objc_msgSend_280( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_freeWhenDone_1, - bytes, - len, - encoding, - freeBuffer); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - @override - NSConstantString? initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - DartNSUInteger len, - DartNSUInteger encoding, - ObjCBlock_ffiVoid_ffiVoid_NSUInteger? deallocator) { - final _ret = _lib._objc_msgSend_281( - _id, - _lib._sel_initWithBytesNoCopy_length_encoding_deallocator_1, - bytes, - len, - encoding, - deallocator?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.Pointer, ffi.Pointer)> + fromFunction(void Function(objc.ObjCObjectBase, objc.ObjCObjectBase, objc.ObjCObjectBase) fn) => + objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + objc.ObjCObjectBase(arg0, retain: true, release: true), + objc.ObjCObjectBase(arg1, retain: true, release: true), + objc.ObjCObjectBase(arg2, retain: true, release: true))), + retain: false, + release: true); - static NSConstantString string(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_string1); - return NSConstantString._(_ret, _lib, retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> listener( + void Function( + objc.ObjCObjectBase, objc.ObjCObjectBase, objc.ObjCObjectBase) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + objc.ObjCObjectBase(arg0, retain: false, release: true), + objc.ObjCObjectBase(arg1, retain: false, release: true), + objc.ObjCObjectBase(arg2, retain: false, release: true))); + final wrapper = _wrapListenerBlock_tenbla(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(wrapper, + retain: false, release: true); } +} - static NSConstantString stringWithString_( - NativeCupertinoHttp _lib, NSString string) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithString_1, string._id); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> { + void call(objc.ObjCObjectBase arg0, objc.ObjCObjectBase arg1, + objc.ObjCObjectBase arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2.ref.pointer); +} + +late final _sel_getTasksWithCompletionHandler_ = + objc.registerName("getTasksWithCompletionHandler:"); +void _ObjCBlock_ffiVoid_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_objcObjCObject_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_objcObjCObject { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>( + pointer, + retain: retain, + release: release); - static NSConstantString stringWithCharacters_length_(NativeCupertinoHttp _lib, - ffi.Pointer characters, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_269(_lib._class_NSConstantString1, - _lib._sel_stringWithCharacters_length_1, characters, length); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_objcObjCObject_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static NSConstantString? stringWithUTF8String_( - NativeCupertinoHttp _lib, ffi.Pointer nullTerminatedCString) { - final _ret = _lib._objc_msgSend_270(_lib._class_NSConstantString1, - _lib._sel_stringWithUTF8String_1, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); - } - - static NSConstantString stringWithFormat_( - NativeCupertinoHttp _lib, NSString format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_stringWithFormat_1, format._id); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } - - static NSConstantString localizedStringWithFormat_( - NativeCupertinoHttp _lib, NSString format) { - final _ret = _lib._objc_msgSend_42(_lib._class_NSConstantString1, - _lib._sel_localizedStringWithFormat_1, format._id); - return NSConstantString._(_ret, _lib, retain: true, release: true); - } - - static NSConstantString? - stringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_274( - _lib._class_NSConstantString1, - _lib._sel_stringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); - } - - static NSConstantString? - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - NativeCupertinoHttp _lib, - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_274( - _lib._class_NSConstantString1, - _lib._sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_1, - format._id, - validFormatSpecifiers._id, - error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunction(void Function(objc.ObjCObjectBase) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_closureCallable, + (ffi.Pointer arg0) => fn( + objc.ObjCObjectBase(arg0, retain: true, release: true))), + retain: false, + release: true); - @override - NSConstantString? initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, DartNSUInteger encoding) { - final _ret = _lib._objc_msgSend_282(_id, - _lib._sel_initWithCString_encoding_1, nullTerminatedCString, encoding); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock)> + listener(void Function(objc.ObjCObjectBase) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0) => + fn(objc.ObjCObjectBase(arg0, retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock)>( + wrapper, + retain: false, + release: true); } +} - static NSConstantString? stringWithCString_encoding_(NativeCupertinoHttp _lib, - ffi.Pointer cString, DartNSUInteger enc) { - final _ret = _lib._objc_msgSend_282(_lib._class_NSConstantString1, - _lib._sel_stringWithCString_encoding_1, cString, enc); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); - } +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_objcObjCObject_CallExtension + on objc.ObjCBlock)> { + void call(objc.ObjCObjectBase arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0.ref.pointer); +} - @override - NSConstantString? initWithContentsOfURL_encoding_error_(NSURL url, - DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_283(_id, - _lib._sel_initWithContentsOfURL_encoding_error_1, url._id, enc, error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); - } +late final _sel_getAllTasksWithCompletionHandler_ = + objc.registerName("getAllTasksWithCompletionHandler:"); +late final _sel_dataTaskWithRequest_ = + objc.registerName("dataTaskWithRequest:"); +late final _sel_dataTaskWithURL_ = objc.registerName("dataTaskWithURL:"); - @override - NSConstantString? initWithContentsOfFile_encoding_error_(NSString path, - DartNSUInteger enc, ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284( - _id, - _lib._sel_initWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); - } - - static NSConstantString? stringWithContentsOfURL_encoding_error_( - NativeCupertinoHttp _lib, - NSURL url, - DartNSUInteger enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_283( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_encoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); - } - - static NSConstantString? stringWithContentsOfFile_encoding_error_( - NativeCupertinoHttp _lib, - NSString path, - DartNSUInteger enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_284( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_encoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); - } +/// An NSURLSessionUploadTask does not currently provide any additional +/// functionality over an NSURLSessionDataTask. All delegate messages +/// that may be sent referencing an NSURLSessionDataTask equally apply +/// to NSURLSessionUploadTasks. +class NSURLSessionUploadTask extends NSURLSessionDataTask { + NSURLSessionUploadTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - @override - NSConstantString? initWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_285( - _id, - _lib._sel_initWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); + /// Constructs a [NSURLSessionUploadTask] that points to the same underlying object as [other]. + NSURLSessionUploadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionUploadTask] that wraps the given raw object pointer. + NSURLSessionUploadTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionUploadTask); } - @override - NSConstantString? initWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_286( - _id, - _lib._sel_initWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); - } - - static NSConstantString? stringWithContentsOfURL_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_285( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_usedEncoding_error_1, - url._id, - enc, - error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); - } - - static NSConstantString? stringWithContentsOfFile_usedEncoding_error_( - NativeCupertinoHttp _lib, - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _lib._objc_msgSend_286( - _lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_usedEncoding_error_1, - path._id, - enc, - error); - return _ret.address == 0 - ? null - : NSConstantString._(_ret, _lib, retain: true, release: true); - } - - static DartNSUInteger - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NativeCupertinoHttp _lib, - NSData data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _lib._objc_msgSend_287( - _lib._class_NSConstantString1, - _lib._sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_1, - data._id, - opts?._id ?? ffi.nullptr, - string, - usedLossyConversion); - } - - static NSObject? stringWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfFile_1, path._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + /// init + NSURLSessionUploadTask init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } - static NSObject? stringWithContentsOfURL_( - NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_226(_lib._class_NSConstantString1, - _lib._sel_stringWithContentsOfURL_1, url._id); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + /// new + static NSURLSessionUploadTask new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionUploadTask, _sel_new); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } - static NSObject? stringWithCString_length_(NativeCupertinoHttp _lib, - ffi.Pointer bytes, DartNSUInteger length) { - final _ret = _lib._objc_msgSend_282(_lib._class_NSConstantString1, - _lib._sel_stringWithCString_length_1, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + /// Cancels an upload and calls the completion handler with resume data for later use. + /// resumeData will be nil if the server does not support the latest resumable uploads + /// Internet-Draft from the HTTP Working Group, found at + /// https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/ + /// + /// - Parameter completionHandler: The completion handler to call when the upload has been successfully canceled. + void cancelByProducingResumeData_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_cancelByProducingResumeData_, + completionHandler.ref.pointer); } - static NSObject? stringWithCString_( - NativeCupertinoHttp _lib, ffi.Pointer bytes) { - final _ret = _lib._objc_msgSend_270( - _lib._class_NSConstantString1, _lib._sel_stringWithCString_1, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + /// allocWithZone: + static NSURLSessionUploadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionUploadTask, _sel_allocWithZone_, zone); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } - static NSConstantString new1(NativeCupertinoHttp _lib) { + /// alloc + static NSURLSessionUploadTask alloc() { final _ret = - _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_new1); - return NSConstantString._(_ret, _lib, retain: false, release: true); + _objc_msgSend_1unuoxw(_class_NSURLSessionUploadTask, _sel_alloc); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } +} - static NSConstantString allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSConstantString1, _lib._sel_allocWithZone_1, zone); - return NSConstantString._(_ret, _lib, retain: false, release: true); - } +late final _class_NSURLSessionUploadTask = + objc.getClass("NSURLSessionUploadTask"); +void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSData { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - static NSConstantString alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSConstantString1, _lib._sel_alloc1); - return NSConstantString._(_ret, _lib, retain: false, release: true); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSData_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(objc.NSData?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(objc.NSData?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } -class NSMutableCharacterSet extends NSCharacterSet { - NSMutableCharacterSet._(ffi.Pointer id, NativeCupertinoHttp lib, +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSData_CallExtension + on objc.ObjCBlock { + void call(objc.NSData? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_cancelByProducingResumeData_ = + objc.registerName("cancelByProducingResumeData:"); +late final _sel_uploadTaskWithRequest_fromFile_ = + objc.registerName("uploadTaskWithRequest:fromFile:"); +late final _sel_uploadTaskWithRequest_fromData_ = + objc.registerName("uploadTaskWithRequest:fromData:"); +late final _sel_uploadTaskWithResumeData_ = + objc.registerName("uploadTaskWithResumeData:"); +late final _sel_uploadTaskWithStreamedRequest_ = + objc.registerName("uploadTaskWithStreamedRequest:"); + +/// NSURLSessionDownloadTask is a task that represents a download to +/// local storage. +class NSURLSessionDownloadTask extends NSURLSessionTask { + NSURLSessionDownloadTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSMutableCharacterSet] that points to the same underlying object as [other]. - static NSMutableCharacterSet castFrom(T other) { - return NSMutableCharacterSet._(other._id, other._lib, - retain: true, release: true); - } + /// Constructs a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. + NSURLSessionDownloadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Returns a [NSMutableCharacterSet] that wraps the given raw object pointer. - static NSMutableCharacterSet castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableCharacterSet._(other, lib, - retain: retain, release: release); - } + /// Constructs a [NSURLSessionDownloadTask] that wraps the given raw object pointer. + NSURLSessionDownloadTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSMutableCharacterSet]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSMutableCharacterSet1); + /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); } - void addCharactersInRange_(NSRange aRange) { - _lib._objc_msgSend_304(_id, _lib._sel_addCharactersInRange_1, aRange); + /// Cancel the download (and calls the superclass -cancel). If + /// conditions will allow for resuming the download in the future, the + /// callback will be called with an opaque data blob, which may be used + /// with -downloadTaskWithResumeData: to attempt to resume the download. + /// If resume data cannot be created, the completion handler will be + /// called with nil resumeData. + void cancelByProducingResumeData_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_cancelByProducingResumeData_, + completionHandler.ref.pointer); } - void removeCharactersInRange_(NSRange aRange) { - _lib._objc_msgSend_304(_id, _lib._sel_removeCharactersInRange_1, aRange); + /// init + NSURLSessionDownloadTask init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - void addCharactersInString_(NSString aString) { - _lib._objc_msgSend_195(_id, _lib._sel_addCharactersInString_1, aString._id); + /// new + static NSURLSessionDownloadTask new1() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionDownloadTask, _sel_new); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - void removeCharactersInString_(NSString aString) { - _lib._objc_msgSend_195( - _id, _lib._sel_removeCharactersInString_1, aString._id); + /// allocWithZone: + static NSURLSessionDownloadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - void formUnionWithCharacterSet_(NSCharacterSet otherSet) { - _lib._objc_msgSend_514( - _id, _lib._sel_formUnionWithCharacterSet_1, otherSet._id); + /// alloc + static NSURLSessionDownloadTask alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionDownloadTask, _sel_alloc); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } +} - void formIntersectionWithCharacterSet_(NSCharacterSet otherSet) { - _lib._objc_msgSend_514( - _id, _lib._sel_formIntersectionWithCharacterSet_1, otherSet._id); - } +late final _class_NSURLSessionDownloadTask = + objc.getClass("NSURLSessionDownloadTask"); +late final _sel_downloadTaskWithRequest_ = + objc.registerName("downloadTaskWithRequest:"); +late final _sel_downloadTaskWithURL_ = + objc.registerName("downloadTaskWithURL:"); +late final _sel_downloadTaskWithResumeData_ = + objc.registerName("downloadTaskWithResumeData:"); - void invert() { - _lib._objc_msgSend_1(_id, _lib._sel_invert1); - } +/// An NSURLSessionStreamTask provides an interface to perform reads +/// and writes to a TCP/IP stream created via NSURLSession. This task +/// may be explicitly created from an NSURLSession, or created as a +/// result of the appropriate disposition response to a +/// -URLSession:dataTask:didReceiveResponse: delegate message. +/// +/// NSURLSessionStreamTask can be used to perform asynchronous reads +/// and writes. Reads and writes are enqueued and executed serially, +/// with the completion handler being invoked on the sessions delegate +/// queue. If an error occurs, or the task is canceled, all +/// outstanding read and write calls will have their completion +/// handlers invoked with an appropriate error. +/// +/// It is also possible to create NSInputStream and NSOutputStream +/// instances from an NSURLSessionTask by sending +/// -captureStreams to the task. All outstanding reads and writes are +/// completed before the streams are created. Once the streams are +/// delivered to the session delegate, the task is considered complete +/// and will receive no more messages. These streams are +/// disassociated from the underlying session. +class NSURLSessionStreamTask extends NSURLSessionTask { + NSURLSessionStreamTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionStreamTask] that points to the same underlying object as [other]. + NSURLSessionStreamTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionStreamTask] that wraps the given raw object pointer. + NSURLSessionStreamTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSCharacterSet getControlCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_controlCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionStreamTask); } - static NSCharacterSet getWhitespaceCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_whitespaceCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Read minBytes, or at most maxBytes bytes and invoke the completion + /// handler on the sessions delegate queue with the data or an error. + /// If an error occurs, any outstanding reads will also fail, and new + /// read requests will error out immediately. + void readDataOfMinLength_maxLength_timeout_completionHandler_( + DartNSUInteger minBytes, + DartNSUInteger maxBytes, + DartNSTimeInterval timeout, + objc.ObjCBlock + completionHandler) { + _objc_msgSend_15i4521( + this.ref.pointer, + _sel_readDataOfMinLength_maxLength_timeout_completionHandler_, + minBytes, + maxBytes, + timeout, + completionHandler.ref.pointer); } - static NSCharacterSet getWhitespaceAndNewlineCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_whitespaceAndNewlineCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Write the data completely to the underlying socket. If all the + /// bytes have not been written by the timeout, a timeout error will + /// occur. Note that invocation of the completion handler does not + /// guarantee that the remote side has received all the bytes, only + /// that they have been written to the kernel. + void writeData_timeout_completionHandler_( + objc.NSData data, + DartNSTimeInterval timeout, + objc.ObjCBlock completionHandler) { + _objc_msgSend_5qmwfe( + this.ref.pointer, + _sel_writeData_timeout_completionHandler_, + data.ref.pointer, + timeout, + completionHandler.ref.pointer); } - static NSCharacterSet getDecimalDigitCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_decimalDigitCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// -captureStreams completes any already enqueued reads + /// and writes, and then invokes the + /// URLSession:streamTask:didBecomeInputStream:outputStream: delegate + /// message. When that message is received, the task object is + /// considered completed and will not receive any more delegate + /// messages. + void captureStreams() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_captureStreams); } - static NSCharacterSet getLetterCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_letterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Enqueue a request to close the write end of the underlying socket. + /// All outstanding IO will complete before the write side of the + /// socket is closed. The server, however, may continue to write bytes + /// back to the client, so best practice is to continue reading from + /// the server until you receive EOF. + void closeWrite() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_closeWrite); } - static NSCharacterSet getLowercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_lowercaseLetterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Enqueue a request to close the read side of the underlying socket. + /// All outstanding IO will complete before the read side is closed. + /// You may continue writing to the server. + void closeRead() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_closeRead); } - static NSCharacterSet getUppercaseLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_uppercaseLetterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Begin encrypted handshake. The handshake begins after all pending + /// IO has completed. TLS authentication callbacks are sent to the + /// session's -URLSession:task:didReceiveChallenge:completionHandler: + void startSecureConnection() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_startSecureConnection); } - static NSCharacterSet getNonBaseCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_nonBaseCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Cleanly close a secure connection after all pending secure IO has + /// completed. + /// + /// @warning This API is non-functional. + void stopSecureConnection() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_stopSecureConnection); } - static NSCharacterSet getAlphanumericCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_alphanumericCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// init + NSURLSessionStreamTask init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } - static NSCharacterSet getDecomposableCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_decomposableCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// new + static NSURLSessionStreamTask new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionStreamTask, _sel_new); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } - static NSCharacterSet getIllegalCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_illegalCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// allocWithZone: + static NSURLSessionStreamTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionStreamTask, _sel_allocWithZone_, zone); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } - static NSCharacterSet getPunctuationCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_punctuationCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// alloc + static NSURLSessionStreamTask alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionStreamTask, _sel_alloc); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } +} - static NSCharacterSet getCapitalizedLetterCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_capitalizedLetterCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +late final _class_NSURLSessionStreamTask = + objc.getClass("NSURLSessionStreamTask"); +void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + bool, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + bool, ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSData_bool_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSData, ffi.Bool, + objc.NSError?)>(pointer, retain: retain, release: release); - static NSCharacterSet getSymbolCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_symbolCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static NSCharacterSet getNewlineCharacterSet(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28( - _lib._class_NSMutableCharacterSet1, _lib._sel_newlineCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock + fromFunction(void Function(objc.NSData, bool, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureCallable, + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn( + objc.NSData.castFromPointer(arg0, retain: true, release: true), + arg1, + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); - static NSMutableCharacterSet characterSetWithRange_( - NativeCupertinoHttp _lib, NSRange aRange) { - final _ret = _lib._objc_msgSend_515(_lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithRange_1, aRange); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock + listener(void Function(objc.NSData, bool, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn( + objc.NSData.castFromPointer(arg0, retain: false, release: true), + arg1, + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_hfhq9m(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSData, ffi.Bool, objc.NSError?)>(wrapper, + retain: false, release: true); } +} - static NSMutableCharacterSet characterSetWithCharactersInString_( - NativeCupertinoHttp _lib, NSString aString) { - final _ret = _lib._objc_msgSend_516(_lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithCharactersInString_1, aString._id); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSData_bool_NSError_CallExtension + on objc.ObjCBlock { + void call(objc.NSData arg0, bool arg1, objc.NSError? arg2) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1, arg2?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_ = objc + .registerName("readDataOfMinLength:maxLength:timeout:completionHandler:"); +final _objc_msgSend_15i4521 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + NSUInteger, + NSTimeInterval, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + double, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSError_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSError_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - static NSMutableCharacterSet characterSetWithBitmapRepresentation_( - NativeCupertinoHttp _lib, NSData data) { - final _ret = _lib._objc_msgSend_517(_lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithBitmapRepresentation_1, data._id); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static NSMutableCharacterSet? characterSetWithContentsOfFile_( - NativeCupertinoHttp _lib, NSString fName) { - final _ret = _lib._objc_msgSend_518(_lib._class_NSMutableCharacterSet1, - _lib._sel_characterSetWithContentsOfFile_1, fName._id); - return _ret.address == 0 - ? null - : NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSError_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); - @override - NSMutableCharacterSet initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_236(_id, _lib._sel_initWithCoder_1, coder._id); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSError_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } +} - /// Returns a character set containing the characters allowed in a URL's user subcomponent. - static NSCharacterSet getURLUserAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLUserAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSError_CallExtension + on objc.ObjCBlock { + void call(objc.NSError? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_writeData_timeout_completionHandler_ = + objc.registerName("writeData:timeout:completionHandler:"); +final _objc_msgSend_5qmwfe = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSTimeInterval, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer)>(); +late final _sel_captureStreams = objc.registerName("captureStreams"); +late final _sel_closeWrite = objc.registerName("closeWrite"); +late final _sel_closeRead = objc.registerName("closeRead"); +late final _sel_startSecureConnection = + objc.registerName("startSecureConnection"); +late final _sel_stopSecureConnection = + objc.registerName("stopSecureConnection"); +late final _sel_streamTaskWithHostName_port_ = + objc.registerName("streamTaskWithHostName:port:"); +final _objc_msgSend_spwp90 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + +/// NSNetService +class NSNetService extends objc.ObjCObjectBase { + NSNetService._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); - /// Returns a character set containing the characters allowed in a URL's password subcomponent. - static NSCharacterSet getURLPasswordAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLPasswordAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSNetService] that points to the same underlying object as [other]. + NSNetService.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Returns a character set containing the characters allowed in a URL's host subcomponent. - static NSCharacterSet getURLHostAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLHostAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSNetService] that wraps the given raw object pointer. + NSNetService.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns a character set containing the characters allowed in a URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - static NSCharacterSet getURLPathAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLPathAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSNetService]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSNetService); } +} - /// Returns a character set containing the characters allowed in a URL's query component. - static NSCharacterSet getURLQueryAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLQueryAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +late final _class_NSNetService = objc.getClass("NSNetService"); +late final _sel_streamTaskWithNetService_ = + objc.registerName("streamTaskWithNetService:"); - /// Returns a character set containing the characters allowed in a URL's fragment component. - static NSCharacterSet getURLFragmentAllowedCharacterSet( - NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_28(_lib._class_NSMutableCharacterSet1, - _lib._sel_URLFragmentAllowedCharacterSet1); - return NSCharacterSet._(_ret, _lib, retain: true, release: true); - } +/// A WebSocket task can be created with a ws or wss url. A client can also provide +/// a list of protocols it wishes to advertise during the WebSocket handshake phase. +/// Once the handshake is successfully completed the client will be notified through an optional delegate. +/// All reads and writes enqueued before the completion of the handshake will be queued up and +/// executed once the handshake succeeds. Before the handshake completes, the client can be called to handle +/// redirection or authentication using the same delegates as NSURLSessionTask. WebSocket task will also provide +/// support for cookies and will store cookies to the cookie storage on the session and will attach cookies to +/// outgoing HTTP handshake requests. +class NSURLSessionWebSocketTask extends NSURLSessionTask { + NSURLSessionWebSocketTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - @override - NSMutableCharacterSet init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSMutableCharacterSet._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. + NSURLSessionWebSocketTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - static NSMutableCharacterSet new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableCharacterSet1, _lib._sel_new1); - return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); - } + /// Constructs a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. + NSURLSessionWebSocketTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - static NSMutableCharacterSet allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSMutableCharacterSet1, _lib._sel_allocWithZone_1, zone); - return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); } - static NSMutableCharacterSet alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSMutableCharacterSet1, _lib._sel_alloc1); - return NSMutableCharacterSet._(_ret, _lib, retain: false, release: true); + /// Sends a WebSocket message. If an error occurs, any outstanding work will also fail. + /// Note that invocation of the completion handler does not + /// guarantee that the remote side has received all the bytes, only + /// that they have been written to the kernel. + void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, + objc.ObjCBlock completionHandler) { + _objc_msgSend_cmbt6k(this.ref.pointer, _sel_sendMessage_completionHandler_, + message.ref.pointer, completionHandler.ref.pointer); } -} - -typedef NSURLFileResourceType = ffi.Pointer; -typedef DartNSURLFileResourceType = NSString; -typedef NSURLThumbnailDictionaryItem = ffi.Pointer; -typedef DartNSURLThumbnailDictionaryItem = NSString; -typedef NSURLFileProtectionType = ffi.Pointer; -typedef DartNSURLFileProtectionType = NSString; -typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; -typedef DartNSURLUbiquitousItemDownloadingStatus = NSString; -typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; -typedef DartNSURLUbiquitousSharedItemRole = NSString; -typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; -typedef DartNSURLUbiquitousSharedItemPermissions = NSString; - -/// NSURLQueryItem encapsulates a single query name-value pair. The name and value strings of a query name-value pair are not percent encoded. For use with the NSURLComponents queryItems property. -class NSURLQueryItem extends NSObject { - NSURLQueryItem._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - /// Returns a [NSURLQueryItem] that points to the same underlying object as [other]. - static NSURLQueryItem castFrom(T other) { - return NSURLQueryItem._(other._id, other._lib, retain: true, release: true); + /// Reads a WebSocket message once all the frames of the message are available. + /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out + /// and all outstanding work will also fail resulting in the end of the task. + void receiveMessageWithCompletionHandler_( + objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> + completionHandler) { + _objc_msgSend_4daxhl( + this.ref.pointer, + _sel_receiveMessageWithCompletionHandler_, + completionHandler.ref.pointer); } - /// Returns a [NSURLQueryItem] that wraps the given raw object pointer. - static NSURLQueryItem castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLQueryItem._(other, lib, retain: retain, release: release); + /// Sends a ping frame from the client side. The pongReceiveHandler is invoked when the client + /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving + /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. + /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. + void sendPingWithPongReceiveHandler_( + objc.ObjCBlock pongReceiveHandler) { + _objc_msgSend_4daxhl(this.ref.pointer, _sel_sendPingWithPongReceiveHandler_, + pongReceiveHandler.ref.pointer); } - /// Returns whether [obj] is an instance of [NSURLQueryItem]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLQueryItem1); + /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. + /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. + void cancelWithCloseCode_reason_( + DartNSInteger closeCode, objc.NSData? reason) { + _objc_msgSend_18im7ej(this.ref.pointer, _sel_cancelWithCloseCode_reason_, + closeCode, reason?.ref.pointer ?? ffi.nullptr); } - NSURLQueryItem initWithName_value_(NSString name, NSString? value) { - final _ret = _lib._objc_msgSend_519(_id, _lib._sel_initWithName_value_1, - name._id, value?._id ?? ffi.nullptr); - return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached + DartNSInteger get maximumMessageSize { + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_maximumMessageSize); } - static NSURLQueryItem queryItemWithName_value_( - NativeCupertinoHttp _lib, NSString name, NSString? value) { - final _ret = _lib._objc_msgSend_519( - _lib._class_NSURLQueryItem1, - _lib._sel_queryItemWithName_value_1, - name._id, - value?._id ?? ffi.nullptr); - return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached + set maximumMessageSize(DartNSInteger value) { + return _objc_msgSend_ke7qz2( + this.ref.pointer, _sel_setMaximumMessageSize_, value); } - NSString get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); + /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid + DartNSInteger get closeCode { + return _objc_msgSend_a13zbl(this.ref.pointer, _sel_closeCode); } - NSString? get value { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_value1); + /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running + objc.NSData? get closeReason { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_closeReason); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - @override - NSURLQueryItem init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLQueryItem._(_ret, _lib, retain: true, release: true); + /// init + NSURLSessionWebSocketTask init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - static NSURLQueryItem new1(NativeCupertinoHttp _lib) { + /// new + static NSURLSessionWebSocketTask new1() { final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_new1); - return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketTask, _sel_new); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - static NSURLQueryItem allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLQueryItem1, _lib._sel_allocWithZone_1, zone); - return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + /// allocWithZone: + static NSURLSessionWebSocketTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - static NSURLQueryItem alloc(NativeCupertinoHttp _lib) { + /// alloc + static NSURLSessionWebSocketTask alloc() { final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLQueryItem1, _lib._sel_alloc1); - return NSURLQueryItem._(_ret, _lib, retain: false, release: true); + _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketTask, _sel_alloc); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } } -class NSURLComponents extends NSObject { - NSURLComponents._(ffi.Pointer id, NativeCupertinoHttp lib, +late final _class_NSURLSessionWebSocketTask = + objc.getClass("NSURLSessionWebSocketTask"); + +/// The client can create a WebSocket message object that will be passed to the send calls +/// and will be delivered from the receive calls. The message can be initialized with data or string. +/// If initialized with data, the string property will be nil and vice versa. +class NSURLSessionWebSocketMessage extends objc.NSObject { + NSURLSessionWebSocketMessage._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLComponents] that points to the same underlying object as [other]. - static NSURLComponents castFrom(T other) { - return NSURLComponents._(other._id, other._lib, - retain: true, release: true); + /// Constructs a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. + NSURLSessionWebSocketMessage.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. + NSURLSessionWebSocketMessage.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, + _class_NSURLSessionWebSocketMessage); } - /// Returns a [NSURLComponents] that wraps the given raw object pointer. - static NSURLComponents castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLComponents._(other, lib, retain: retain, release: release); + /// Create a message with data type + NSURLSessionWebSocketMessage initWithData_(objc.NSData data) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithData_, data.ref.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSURLComponents]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSURLComponents1); + /// Create a message with string type + NSURLSessionWebSocketMessage initWithString_(objc.NSString string) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithString_, string.ref.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } - /// Initialize a NSURLComponents with all components undefined. Designated initializer. - @override - NSURLComponents init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSURLComponents._(_ret, _lib, retain: true, release: true); + /// type + NSURLSessionWebSocketMessageType get type { + final _ret = _objc_msgSend_1kew1r(this.ref.pointer, _sel_type); + return NSURLSessionWebSocketMessageType.fromValue(_ret); } - /// Initialize a NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. - NSURLComponents? initWithURL_resolvingAgainstBaseURL_( - NSURL url, bool resolve) { - final _ret = _lib._objc_msgSend_356( - _id, _lib._sel_initWithURL_resolvingAgainstBaseURL_1, url._id, resolve); + /// data + objc.NSData? get data { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_data); return _ret.address == 0 ? null - : NSURLComponents._(_ret, _lib, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// Initializes and returns a newly created NSURLComponents with the components of a URL. If resolvingAgainstBaseURL is YES and url is a relative URL, the components of [url absoluteURL] are used. If the url string from the NSURL is malformed, nil is returned. - static NSURLComponents? componentsWithURL_resolvingAgainstBaseURL_( - NativeCupertinoHttp _lib, NSURL url, bool resolve) { - final _ret = _lib._objc_msgSend_356( - _lib._class_NSURLComponents1, - _lib._sel_componentsWithURL_resolvingAgainstBaseURL_1, - url._id, - resolve); + /// string + objc.NSString? get string { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_string); return _ret.address == 0 ? null - : NSURLComponents._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Initialize a NSURLComponents with a URL string. If the URLString is malformed, nil is returned. - NSURLComponents? initWithString_(NSString URLString) { + /// init + NSURLSessionWebSocketMessage init() { final _ret = - _lib._objc_msgSend_49(_id, _lib._sel_initWithString_1, URLString._id); - return _ret.address == 0 - ? null - : NSURLComponents._(_ret, _lib, retain: true, release: true); + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } - /// Initializes and returns a newly created NSURLComponents with a URL string. If the URLString is malformed, nil is returned. - static NSURLComponents? componentsWithString_( - NativeCupertinoHttp _lib, NSString URLString) { - final _ret = _lib._objc_msgSend_49(_lib._class_NSURLComponents1, - _lib._sel_componentsWithString_1, URLString._id); - return _ret.address == 0 - ? null - : NSURLComponents._(_ret, _lib, retain: true, release: true); + /// new + static NSURLSessionWebSocketMessage new1() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_new); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } - /// Initializes an `NSURLComponents` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters. - /// If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned. - /// If `encodingInvalidCharacters` is true, `NSURLComponents` will try to encode the string to create a valid URL. - /// If the URL string is still invalid after encoding, `nil` is returned. - /// - /// - Parameter URLString: The URL string. - /// - Parameter encodingInvalidCharacters: True if `NSURLComponents` should try to encode an invalid URL string, false otherwise. - /// - Returns: An `NSURLComponents` instance for a valid URL, or `nil` if the URL is invalid. - NSURLComponents? initWithString_encodingInvalidCharacters_( - NSString URLString, bool encodingInvalidCharacters) { - final _ret = _lib._objc_msgSend_51( - _id, - _lib._sel_initWithString_encodingInvalidCharacters_1, - URLString._id, - encodingInvalidCharacters); - return _ret.address == 0 - ? null - : NSURLComponents._(_ret, _lib, retain: true, release: true); + /// allocWithZone: + static NSURLSessionWebSocketMessage allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionWebSocketMessage, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } - /// Initializes and returns a newly created `NSURLComponents` with a URL string and the option to add (or skip) IDNA- and percent-encoding of invalid characters. - /// If `encodingInvalidCharacters` is false, and the URL string is invalid according to RFC 3986, `nil` is returned. - /// If `encodingInvalidCharacters` is true, `NSURLComponents` will try to encode the string to create a valid URL. - /// If the URL string is still invalid after encoding, nil is returned. - /// - /// - Parameter URLString: The URL string. - /// - Parameter encodingInvalidCharacters: True if `NSURLComponents` should try to encode an invalid URL string, false otherwise. - /// - Returns: An `NSURLComponents` instance for a valid URL, or `nil` if the URL is invalid. - static NSURLComponents? componentsWithString_encodingInvalidCharacters_( - NativeCupertinoHttp _lib, - NSString URLString, - bool encodingInvalidCharacters) { - final _ret = _lib._objc_msgSend_51( - _lib._class_NSURLComponents1, - _lib._sel_componentsWithString_encodingInvalidCharacters_1, - URLString._id, - encodingInvalidCharacters); - return _ret.address == 0 - ? null - : NSURLComponents._(_ret, _lib, retain: true, release: true); + /// alloc + static NSURLSessionWebSocketMessage alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_alloc); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } +} - /// Returns a URL created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSURL? get URL { - final _ret = _lib._objc_msgSend_56(_id, _lib._sel_URL1); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } +late final _class_NSURLSessionWebSocketMessage = + objc.getClass("NSURLSessionWebSocketMessage"); +late final _sel_initWithData_ = objc.registerName("initWithData:"); +late final _sel_initWithString_ = objc.registerName("initWithString:"); + +enum NSURLSessionWebSocketMessageType { + NSURLSessionWebSocketMessageTypeData(0), + NSURLSessionWebSocketMessageTypeString(1); + + final int value; + const NSURLSessionWebSocketMessageType(this.value); + + static NSURLSessionWebSocketMessageType fromValue(int value) => + switch (value) { + 0 => NSURLSessionWebSocketMessageTypeData, + 1 => NSURLSessionWebSocketMessageTypeString, + _ => throw ArgumentError( + "Unknown value for NSURLSessionWebSocketMessageType: $value"), + }; +} + +late final _sel_type = objc.registerName("type"); +final _objc_msgSend_1kew1r = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_string = objc.registerName("string"); +late final _sel_sendMessage_completionHandler_ = + objc.registerName("sendMessage:completionHandler:"); +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, + objc.NSError?)>(pointer, retain: retain, release: release); - /// Returns a URL created from the NSURLComponents relative to a base URL. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSURL? URLRelativeToURL_(NSURL? baseURL) { - final _ret = _lib._objc_msgSend_520( - _id, _lib._sel_URLRelativeToURL_1, baseURL?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Returns a URL string created from the NSURLComponents. If the NSURLComponents has an authority component (user, password, host or port) and a path component, then the path must either begin with "/" or be an empty string. If the NSURLComponents does not have an authority component (user, password, host or port) and has a path component, the path component must not start with "//". If those requirements are not met, nil is returned. - NSString? get string { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_string1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURLSessionWebSocketMessage.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); - /// Attempting to set the scheme with an invalid scheme string will cause an exception. - NSString? get scheme { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_scheme1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> + listener(void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn( + arg0.address == 0 + ? null + : NSURLSessionWebSocketMessage.castFromPointer(arg0, + retain: false, release: true), + arg1.address == 0 + ? null + : objc.NSError.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1tjlcwl(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, + objc.NSError?)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_CallExtension + on objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> { + void call(NSURLSessionWebSocketMessage? arg0, objc.NSError? arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr); +} - /// Attempting to set the scheme with an invalid scheme string will cause an exception. - set scheme(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setScheme_1, value?._id ?? ffi.nullptr); - } +late final _sel_receiveMessageWithCompletionHandler_ = + objc.registerName("receiveMessageWithCompletionHandler:"); +late final _sel_sendPingWithPongReceiveHandler_ = + objc.registerName("sendPingWithPongReceiveHandler:"); - NSString? get user { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_user1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +/// The WebSocket close codes follow the close codes given in the RFC +sealed class NSURLSessionWebSocketCloseCode { + static const NSURLSessionWebSocketCloseCodeInvalid = 0; + static const NSURLSessionWebSocketCloseCodeNormalClosure = 1000; + static const NSURLSessionWebSocketCloseCodeGoingAway = 1001; + static const NSURLSessionWebSocketCloseCodeProtocolError = 1002; + static const NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; + static const NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; + static const NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; + static const NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; + static const NSURLSessionWebSocketCloseCodePolicyViolation = 1008; + static const NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; + static const NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = 1010; + static const NSURLSessionWebSocketCloseCodeInternalServerError = 1011; + static const NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; +} + +late final _sel_cancelWithCloseCode_reason_ = + objc.registerName("cancelWithCloseCode:reason:"); +final _objc_msgSend_18im7ej = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_maximumMessageSize = objc.registerName("maximumMessageSize"); +late final _sel_setMaximumMessageSize_ = + objc.registerName("setMaximumMessageSize:"); +late final _sel_closeCode = objc.registerName("closeCode"); +final _objc_msgSend_a13zbl = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_closeReason = objc.registerName("closeReason"); +late final _sel_webSocketTaskWithURL_ = + objc.registerName("webSocketTaskWithURL:"); +late final _sel_webSocketTaskWithURL_protocols_ = + objc.registerName("webSocketTaskWithURL:protocols:"); +late final _sel_webSocketTaskWithRequest_ = + objc.registerName("webSocketTaskWithRequest:"); +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, + objc.NSError?)>(pointer, retain: retain, release: release); - set user(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setUser_1, value?._id ?? ffi.nullptr); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - NSString? get password { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_password1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : objc.NSData.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); - set password(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setPassword_1, value?._id ?? ffi.nullptr); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc + .ObjCBlock + listener(void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: false, release: true), + arg1.address == 0 + ? null + : NSURLResponse.castFromPointer(arg1, + retain: false, release: true), + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_tenbla(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, + objc.NSError?)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_CallExtension on objc + .ObjCBlock { + void call(objc.NSData? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_dataTaskWithRequest_completionHandler_ = + objc.registerName("dataTaskWithRequest:completionHandler:"); +late final _sel_dataTaskWithURL_completionHandler_ = + objc.registerName("dataTaskWithURL:completionHandler:"); +late final _sel_uploadTaskWithRequest_fromFile_completionHandler_ = + objc.registerName("uploadTaskWithRequest:fromFile:completionHandler:"); +final _objc_msgSend_37obke = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromData_completionHandler_ = + objc.registerName("uploadTaskWithRequest:fromData:completionHandler:"); +late final _sel_uploadTaskWithResumeData_completionHandler_ = + objc.registerName("uploadTaskWithResumeData:completionHandler:"); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, + objc.NSError?)>(pointer, retain: retain, release: release); - NSString? get host { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_host1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - set host(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setHost_1, value?._id ?? ffi.nullptr); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : objc.NSURL.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); - /// Attempting to set a negative port number will cause an exception. - NSNumber? get port { - final _ret = _lib._objc_msgSend_94(_id, _lib._sel_port1); - return _ret.address == 0 - ? null - : NSNumber._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc + .ObjCBlock + listener(void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSURL + .castFromPointer(arg0, retain: false, release: true), + arg1.address == 0 + ? null + : NSURLResponse.castFromPointer(arg1, + retain: false, release: true), + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_tenbla(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, + objc.NSError?)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_CallExtension on objc + .ObjCBlock { + void call(objc.NSURL? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_downloadTaskWithRequest_completionHandler_ = + objc.registerName("downloadTaskWithRequest:completionHandler:"); +late final _sel_downloadTaskWithURL_completionHandler_ = + objc.registerName("downloadTaskWithURL:completionHandler:"); +late final _sel_downloadTaskWithResumeData_completionHandler_ = + objc.registerName("downloadTaskWithResumeData:completionHandler:"); + +enum NSURLSessionResponseDisposition { + /// Cancel the load, this is the same as -[task cancel] + NSURLSessionResponseCancel(0), - /// Attempting to set a negative port number will cause an exception. - set port(NSNumber? value) { - return _lib._objc_msgSend_389( - _id, _lib._sel_setPort_1, value?._id ?? ffi.nullptr); - } + /// Allow the load to continue + NSURLSessionResponseAllow(1), - NSString? get path { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_path1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Turn this request into a download + NSURLSessionResponseBecomeDownload(2), - set path(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setPath_1, value?._id ?? ffi.nullptr); - } + /// Turn this task into a stream task + NSURLSessionResponseBecomeStream(3); + + final int value; + const NSURLSessionResponseDisposition(this.value); + + static NSURLSessionResponseDisposition fromValue(int value) => + switch (value) { + 0 => NSURLSessionResponseCancel, + 1 => NSURLSessionResponseAllow, + 2 => NSURLSessionResponseBecomeDownload, + 3 => NSURLSessionResponseBecomeStream, + _ => throw ArgumentError( + "Unknown value for NSURLSessionResponseDisposition: $value"), + }; +} + +/// Messages related to the URL session as a whole +abstract final class NSURLSessionDelegate { + /// Builds an object that implements the NSURLSessionDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {void Function(NSURLSession, objc.NSError?)? + URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? + URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionDelegate.URLSession_didBecomeInvalidWithError_.implement( + builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, objc.NSError?)? + URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? + URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionDelegate.URLSession_didBecomeInvalidWithError_.implement( + builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Builds an object that implements the NSURLSessionDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {void Function(NSURLSession, objc.NSError?)? + URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? + URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, objc.NSError?)? + URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? + URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// The last message a session receives. A session will only become + /// invalid because of a systemic error or when it has been + /// explicitly invalidated, in which case the error parameter will be nil. + static final URLSession_didBecomeInvalidWithError_ = objc + .ObjCProtocolListenableMethod( + _sel_URLSession_didBecomeInvalidWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDelegate, + _sel_URLSession_didBecomeInvalidWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + ); + + /// If implemented, when a connection level authentication challenge + /// has occurred, this delegate will be given the opportunity to + /// provide authentication credentials to the underlying + /// connection. Some types of authentication will apply to more than + /// one request on a given connection to a server (SSL Server Trust + /// challenges). If this delegate message is not implemented, the + /// behavior will be to use the default handling, which may involve user + /// interaction. + static final URLSession_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _sel_URLSession_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDelegate, + _sel_URLSession_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + ); + + /// If an application has received an + /// -application:handleEventsForBackgroundURLSession:completionHandler: + /// message, the session delegate will receive this message to indicate + /// that all messages previously enqueued for this session have been + /// delivered. At this time it is safe to invoke the previously stored + /// completion handler, or to begin any internal updates that will + /// result in invoking the completion handler. + static final URLSessionDidFinishEventsForBackgroundURLSession_ = + objc.ObjCProtocolListenableMethod( + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDelegate, + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + ); +} + +late final _protocol_NSURLSessionDelegate = + objc.getProtocol("NSURLSessionDelegate"); +late final _sel_URLSession_didBecomeInvalidWithError_ = + objc.registerName("URLSession:didBecomeInvalidWithError:"); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, objc.NSError?)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, objc.NSError?)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + objc.NSError?)>(pointer, retain: retain, release: release); - NSString? get query { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_query1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, NSURLSession, objc.NSError?)> + fromFunctionPointer( + ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock, NSURLSession, objc.NSError?)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - set query(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setQuery_1, value?._id ?? ffi.nullptr); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, NSURLSession, objc.NSError?)> + fromFunction(void Function(ffi.Pointer, NSURLSession, objc.NSError?) fn) => + objc.ObjCBlock, NSURLSession, objc.NSError?)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); - NSString? get fragment { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_fragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, NSURLSession, objc.NSError?)> listener( + void Function(ffi.Pointer, NSURLSession, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_tm2na8(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + objc.NSError?)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, objc.NSError?)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, objc.NSError?)> { + void call( + ffi.Pointer arg0, NSURLSession arg1, objc.NSError? arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2?.ref.pointer ?? ffi.nullptr); +} - set fragment(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setFragment_1, value?._id ?? ffi.nullptr); - } +/// NSURLAuthenticationChallenge +class NSURLAuthenticationChallenge extends objc.ObjCObjectBase { + NSURLAuthenticationChallenge._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); - /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - NSString? get percentEncodedUser { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_percentEncodedUser1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Constructs a [NSURLAuthenticationChallenge] that points to the same underlying object as [other]. + NSURLAuthenticationChallenge.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Getting these properties retains any percent encoding these components may have. Setting these properties assumes the component string is already correctly percent encoded. Attempting to set an incorrectly percent encoded string will cause an exception. Although ';' is a legal path character, it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). - set percentEncodedUser(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setPercentEncodedUser_1, value?._id ?? ffi.nullptr); - } + /// Constructs a [NSURLAuthenticationChallenge] that wraps the given raw object pointer. + NSURLAuthenticationChallenge.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); - NSString? get percentEncodedPassword { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_percentEncodedPassword1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLAuthenticationChallenge]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, + _class_NSURLAuthenticationChallenge); } +} - set percentEncodedPassword(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setPercentEncodedPassword_1, value?._id ?? ffi.nullptr); - } +late final _class_NSURLAuthenticationChallenge = + objc.getClass("NSURLAuthenticationChallenge"); +void + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_fnPtrTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSInteger arg0, + ffi.Pointer arg1)>>() + .asFunction)>()( + arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, NSInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_closureTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + int, ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, NSInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_listenerTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + int, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, NSInteger, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_listenerCallable = + ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, NSInteger, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock( + pointer, + retain: retain, + release: release); - NSString? get percentEncodedHost { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_percentEncodedHost1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> fromFunctionPointer( + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - set percentEncodedHost(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setPercentEncodedHost_1, value?._id ?? ffi.nullptr); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock + fromFunction(void Function(NSURLSessionAuthChallengeDisposition, NSURLCredential?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_closureCallable, + (int arg0, ffi.Pointer arg1) => fn( + NSURLSessionAuthChallengeDisposition.fromValue(arg0), + arg1.address == 0 + ? null + : NSURLCredential.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); - NSString? get percentEncodedPath { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_percentEncodedPath1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock + listener( + void Function(NSURLSessionAuthChallengeDisposition, NSURLCredential?) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_listenerCallable + .nativeFunction + .cast(), + (int arg0, ffi.Pointer arg1) => fn( + NSURLSessionAuthChallengeDisposition.fromValue(arg0), + arg1.address == 0 + ? null + : NSURLCredential.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1najo2h(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true); } +} - set percentEncodedPath(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setPercentEncodedPath_1, value?._id ?? ffi.nullptr); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_CallExtension + on objc.ObjCBlock { + void call(NSURLSessionAuthChallengeDisposition arg0, NSURLCredential? arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + NSInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()( + ref.pointer, arg0.value, arg1?.ref.pointer ?? ffi.nullptr); +} - NSString? get percentEncodedQuery { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_percentEncodedQuery1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } +enum NSURLSessionAuthChallengeDisposition { + /// Use the specified credential, which may be nil + NSURLSessionAuthChallengeUseCredential(0), - set percentEncodedQuery(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setPercentEncodedQuery_1, value?._id ?? ffi.nullptr); - } + /// Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored. + NSURLSessionAuthChallengePerformDefaultHandling(1), - NSString? get percentEncodedFragment { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_percentEncodedFragment1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + /// The entire request will be canceled; the credential parameter is ignored. + NSURLSessionAuthChallengeCancelAuthenticationChallenge(2), - set percentEncodedFragment(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setPercentEncodedFragment_1, value?._id ?? ffi.nullptr); - } + /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. + NSURLSessionAuthChallengeRejectProtectionSpace(3); - NSString? get encodedHost { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_encodedHost1); - return _ret.address == 0 - ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + final int value; + const NSURLSessionAuthChallengeDisposition(this.value); - set encodedHost(NSString? value) { - return _lib._objc_msgSend_395( - _id, _lib._sel_setEncodedHost_1, value?._id ?? ffi.nullptr); - } + static NSURLSessionAuthChallengeDisposition fromValue(int value) => + switch (value) { + 0 => NSURLSessionAuthChallengeUseCredential, + 1 => NSURLSessionAuthChallengePerformDefaultHandling, + 2 => NSURLSessionAuthChallengeCancelAuthenticationChallenge, + 3 => NSURLSessionAuthChallengeRejectProtectionSpace, + _ => throw ArgumentError( + "Unknown value for NSURLSessionAuthChallengeDisposition: $value"), + }; +} - /// These properties return the character range of a component in the URL string returned by -[NSURLComponents string]. If the component does not exist in the NSURLComponents object, {NSNotFound, 0} is returned. Note: Zero length components are legal. For example, the URL string "scheme://:@/?#" has a zero length user, password, host, query and fragment; the URL strings "scheme:" and "" both have a zero length path. - NSRange get rangeOfScheme { - return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfScheme1); - } +/// NSURLCredential +class NSURLCredential extends objc.ObjCObjectBase { + NSURLCredential._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); - NSRange get rangeOfUser { - return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfUser1); - } + /// Constructs a [NSURLCredential] that points to the same underlying object as [other]. + NSURLCredential.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - NSRange get rangeOfPassword { - return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfPassword1); - } + /// Constructs a [NSURLCredential] that wraps the given raw object pointer. + NSURLCredential.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSRange get rangeOfHost { - return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfHost1); + /// Returns whether [obj] is an instance of [NSURLCredential]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCredential); } +} - NSRange get rangeOfPort { - return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfPort1); - } +late final _class_NSURLCredential = objc.getClass("NSURLCredential"); +late final _sel_URLSession_didReceiveChallenge_completionHandler_ = + objc.registerName("URLSession:didReceiveChallenge:completionHandler:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock)>(pointer, + retain: retain, release: release); - NSRange get rangeOfPath { - return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfPath1); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock) fn) => + objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLAuthenticationChallenge.castFromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); - NSRange get rangeOfQuery { - return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfQuery1); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)>)> listener( + void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLAuthenticationChallenge.castFromPointer(arg2, + retain: false, release: true), + ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential + .castFromPointer(arg3, retain: false, release: true))); + final wrapper = _wrapListenerBlock_1wmulza(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)>)>(wrapper, + retain: false, release: true); } +} - NSRange get rangeOfFragment { - return _lib._objc_msgSend_66(_id, _lib._sel_rangeOfFragment1); - } +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock + arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); +} + +late final _sel_URLSessionDidFinishEventsForBackgroundURLSession_ = + objc.registerName("URLSessionDidFinishEventsForBackgroundURLSession:"); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_listenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock, NSURLSession)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + NSURLSession)>(pointer, retain: retain, release: release); - /// The query component as an array of NSURLQueryItems for this NSURLComponents. - /// - /// Each NSURLQueryItem represents a single key-value pair, + /// Creates a block from a C function pointer. /// - /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, NSURLSession)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. /// - /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession)> + fromFunction(void Function(ffi.Pointer, NSURLSession) fn) => + objc.ObjCBlock, NSURLSession)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. /// - /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. /// - /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. - NSArray? get queryItems { - final _ret = _lib._objc_msgSend_188(_id, _lib._sel_queryItems1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock, NSURLSession)> + listener(void Function(ffi.Pointer, NSURLSession) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: false, release: true))); + final wrapper = _wrapListenerBlock_sjfpmz(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession)>(wrapper, + retain: false, release: true); } +} - /// The query component as an array of NSURLQueryItems for this NSURLComponents. - /// - /// Each NSURLQueryItem represents a single key-value pair, +/// Call operator for `objc.ObjCBlock, NSURLSession)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_CallExtension + on objc.ObjCBlock, NSURLSession)> { + void call(ffi.Pointer arg0, NSURLSession arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer); +} + +/// Messages related to the operation of a specific task. +abstract final class NSURLSessionTaskDelegate { + /// Builds an object that implements the NSURLSessionTaskDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function( + NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? + URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionTaskDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionTaskDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionTaskDelegate.URLSession_taskIsWaitingForConnectivity_.implement( + builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionTaskDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionTaskDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionTaskDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionTaskDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionTaskDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionTaskDelegate.URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionTaskDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionTaskDelegate.URLSession_task_didCompleteWithError_.implement( + builder, URLSession_task_didCompleteWithError_); + NSURLSessionTaskDelegate.URLSession_didBecomeInvalidWithError_.implement( + builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionTaskDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionTaskDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionTaskDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock)? + URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionTaskDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionTaskDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionTaskDelegate.URLSession_taskIsWaitingForConnectivity_.implement( + builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionTaskDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionTaskDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionTaskDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionTaskDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionTaskDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionTaskDelegate.URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionTaskDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionTaskDelegate.URLSession_task_didCompleteWithError_.implement( + builder, URLSession_task_didCompleteWithError_); + NSURLSessionTaskDelegate.URLSession_didBecomeInvalidWithError_.implement( + builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionTaskDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionTaskDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Builds an object that implements the NSURLSessionTaskDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function( + NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? + URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionTaskDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionTaskDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionTaskDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionTaskDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionTaskDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionTaskDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionTaskDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionTaskDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionTaskDelegate.URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionTaskDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionTaskDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionTaskDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionTaskDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionTaskDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionTaskDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock)? + URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionTaskDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionTaskDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionTaskDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionTaskDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionTaskDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionTaskDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionTaskDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionTaskDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionTaskDelegate.URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionTaskDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionTaskDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionTaskDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionTaskDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionTaskDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Notification that a task has been created. This method is the first message + /// a task sends, providing a place to configure the task before it is resumed. + /// + /// This delegate callback is *NOT* dispatched to the delegate queue. It is + /// invoked synchronously before the task creation method returns. + static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _sel_URLSession_didCreateTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_didCreateTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// Sent when the system is ready to begin work for a task with a delayed start + /// time set (using the earliestBeginDate property). The completionHandler must + /// be invoked in order for loading to proceed. The disposition provided to the + /// completion handler continues the load with the original request provided to + /// the task, replaces the request with the specified task, or cancels the task. + /// If this delegate is not implemented, loading will proceed with the original + /// request. + /// + /// Recommendation: only implement this delegate if tasks that have the + /// earliestBeginDate property set may become stale and require alteration prior + /// to starting the network load. + /// + /// If a new request is specified, the allowsExpensiveNetworkAccess, + /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties + /// from the new request will not be used; the properties from the + /// original request will continue to be used. + /// + /// Canceling the task is equivalent to calling the task's cancel method; the + /// URLSession:task:didCompleteWithError: task delegate will be called with error + /// NSURLErrorCancelled. + static final URLSession_task_willBeginDelayedRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)>( + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent when a task cannot start the network loading process because the current + /// network connectivity is not available or sufficient for the task's request. + /// + /// This delegate will be called at most one time per task, and is only called if + /// the waitsForConnectivity property in the NSURLSessionConfiguration has been + /// set to YES. + /// + /// This delegate callback will never be called for background sessions, because + /// the waitForConnectivity property is ignored by those sessions. + static final URLSession_taskIsWaitingForConnectivity_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _sel_URLSession_taskIsWaitingForConnectivity_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_taskIsWaitingForConnectivity_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// An HTTP request is attempting to perform a redirection to a different + /// URL. You must invoke the completion routine to allow the + /// redirection, allow the redirection with a modified request, or + /// pass nil to the completionHandler to cause the body of the redirection + /// response to be delivered as the payload of this request. The default + /// is to follow redirections. + /// + /// For tasks in background sessions, redirections will always be followed and this method will not be called. + static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)>( + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// The task has received a request specific authentication challenge. + /// If this delegate is not implemented, the session specific authentication challenge + /// will *NOT* be called and the behavior will be the same as using the default handling + /// disposition. + static final URLSession_task_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent if a task requires a new, unopened body stream. This may be + /// necessary when authentication has failed for any request that + /// involves a body stream. + static final URLSession_task_needNewBodyStream_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)>( + _sel_URLSession_task_needNewBodyStream_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_task_needNewBodyStream_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + ); + + /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be + /// necessary when resuming a failed upload task. + /// + /// - Parameter session: The session containing the task that needs a new body stream from the given offset. + /// - Parameter task: The task that needs a new body stream. + /// - Parameter offset: The starting offset required for the body stream. + /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. + static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock)>( + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent periodically to notify the delegate of upload progress. This + /// information is also available as properties of the task. + static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, int, int)>( + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// Sent for each informational response received except 101 switching protocols. + static final URLSession_task_didReceiveInformationalResponse_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( + _sel_URLSession_task_didReceiveInformationalResponse_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_task_didReceiveInformationalResponse_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent when complete statistics information has been collected for the task. + static final URLSession_task_didFinishCollectingMetrics_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( + _sel_URLSession_task_didFinishCollectingMetrics_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_task_didFinishCollectingMetrics_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent as the last message related to a specific task. Error may be + /// nil, which implies that no error occurred and this task is complete. + static final URLSession_task_didCompleteWithError_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( + _sel_URLSession_task_didCompleteWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_task_didCompleteWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + ); + + /// The last message a session receives. A session will only become + /// invalid because of a systemic error or when it has been + /// explicitly invalidated, in which case the error parameter will be nil. + static final URLSession_didBecomeInvalidWithError_ = objc + .ObjCProtocolListenableMethod( + _sel_URLSession_didBecomeInvalidWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_didBecomeInvalidWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + ); + + /// If implemented, when a connection level authentication challenge + /// has occurred, this delegate will be given the opportunity to + /// provide authentication credentials to the underlying + /// connection. Some types of authentication will apply to more than + /// one request on a given connection to a server (SSL Server Trust + /// challenges). If this delegate message is not implemented, the + /// behavior will be to use the default handling, which may involve user + /// interaction. + static final URLSession_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _sel_URLSession_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSession_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + ); + + /// If an application has received an + /// -application:handleEventsForBackgroundURLSession:completionHandler: + /// message, the session delegate will receive this message to indicate + /// that all messages previously enqueued for this session have been + /// delivered. At this time it is safe to invoke the previously stored + /// completion handler, or to begin any internal updates that will + /// result in invoking the completion handler. + static final URLSessionDidFinishEventsForBackgroundURLSession_ = + objc.ObjCProtocolListenableMethod( + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionTaskDelegate, + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + ); +} + +late final _protocol_NSURLSessionTaskDelegate = + objc.getProtocol("NSURLSessionTaskDelegate"); +late final _sel_URLSession_didCreateTask_ = + objc.registerName("URLSession:didCreateTask:"); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionTask)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, NSURLSession, NSURLSessionTask)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. /// - /// Note that a name may appear more than once in a single query string, so the name values are not guaranteed to be unique. If the NSURLComponents has an empty query component, returns an empty array. If the NSURLComponents has no query component, returns nil. + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock, NSURLSession, NSURLSessionTask)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. /// - /// The queryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is removed. + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask)> + fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionTask) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionTask)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionTask.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. /// - /// The queryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. If the NSURLQueryItems name or value strings contain any characters not allowed in a URL's query component, those characters are percent-encoded. In addition, any '&' and '=' characters in a NSURLQueryItem name are percent-encoded. Passing an empty array sets the query component of the NSURLComponents to an empty string. Passing nil removes the query component of the NSURLComponents. + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. /// - /// - note: If a NSURLQueryItem name-value pair is empty (i.e. the query string starts with '&', ends with '&', or has "&&" within it), you get a NSURLQueryItem with a zero-length name and a nil value. If a NSURLQueryItem name-value pair has nothing before the equals sign, you get a zero-length name. If a NSURLQueryItem name-value pair has nothing after the equals sign, you get a zero-length value. If a NSURLQueryItem name-value pair has no equals sign, the NSURLQueryItem name-value pair string is the name and you get a nil value. - set queryItems(NSArray? value) { - return _lib._objc_msgSend_451( - _id, _lib._sel_setQueryItems_1, value?._id ?? ffi.nullptr); - } + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, NSURLSession, NSURLSessionTask)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionTask) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionTask.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_tm2na8(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionTask)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, NSURLSession, NSURLSessionTask)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionTask arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer); +} - /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. - /// - /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. - NSArray? get percentEncodedQueryItems { - final _ret = - _lib._objc_msgSend_188(_id, _lib._sel_percentEncodedQueryItems1); - return _ret.address == 0 - ? null - : NSArray._(_ret, _lib, retain: true, release: true); - } +void + _ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_fnPtrTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSInteger arg0, + ffi.Pointer arg1)>>() + .asFunction)>()( + arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, NSInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_closureTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + int, ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, NSInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_listenerTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + int, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, NSInteger, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_listenerCallable = + ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, NSInteger, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - /// The percentEncodedQueryItems getter returns an array of NSURLQueryItems in the order in which they appear in the original query string. Any percent-encoding in a NSURLQueryItem name or value is retained. + /// Creates a block from a C function pointer. /// - /// The percentEncodedQueryItems setter combines an array containing any number of NSURLQueryItems, each of which represents a single key-value pair, into a query string and sets the NSURLComponents query property. This property assumes the NSURLQueryItem names and values are already correctly percent-encoded, and that the NSURLQueryItem names do not contain the query item delimiter characters '&' and '='. Attempting to set an incorrectly percent-encoded NSURLQueryItem or a NSURLQueryItem name with the query item delimiter characters '&' and '=' will cause an exception. - set percentEncodedQueryItems(NSArray? value) { - return _lib._objc_msgSend_451(_id, _lib._sel_setPercentEncodedQueryItems_1, - value?._id ?? ffi.nullptr); - } + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLRequest?)> fromFunctionPointer( + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - static NSURLComponents new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_new1); - return NSURLComponents._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock + fromFunction(void Function(NSURLSessionDelayedRequestDisposition, NSURLRequest?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_closureCallable, + (int arg0, ffi.Pointer arg1) => fn( + NSURLSessionDelayedRequestDisposition.fromValue(arg0), + arg1.address == 0 + ? null + : NSURLRequest.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); - static NSURLComponents allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSURLComponents1, _lib._sel_allocWithZone_1, zone); - return NSURLComponents._(_ret, _lib, retain: false, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(NSURLSessionDelayedRequestDisposition, NSURLRequest?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_listenerCallable + .nativeFunction + .cast(), + (int arg0, ffi.Pointer arg1) => fn( + NSURLSessionDelayedRequestDisposition.fromValue(arg0), + arg1.address == 0 + ? null + : NSURLRequest.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_wnmjgj(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } +} - static NSURLComponents alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSURLComponents1, _lib._sel_alloc1); - return NSURLComponents._(_ret, _lib, retain: false, release: true); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_CallExtension + on objc.ObjCBlock { + void call(NSURLSessionDelayedRequestDisposition arg0, NSURLRequest? arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + NSInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()( + ref.pointer, arg0.value, arg1?.ref.pointer ?? ffi.nullptr); } -/// NSFileSecurity encapsulates a file system object's security information. NSFileSecurity and CFFileSecurity are toll-free bridged. Use the CFFileSecurity API for access to the low-level file security properties encapsulated by NSFileSecurity. -class NSFileSecurity extends NSObject { - NSFileSecurity._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); +/// Disposition options for various delegate messages +enum NSURLSessionDelayedRequestDisposition { + /// Use the original request provided when the task was created; the request parameter is ignored. + NSURLSessionDelayedRequestContinueLoading(0), - /// Returns a [NSFileSecurity] that points to the same underlying object as [other]. - static NSFileSecurity castFrom(T other) { - return NSFileSecurity._(other._id, other._lib, retain: true, release: true); - } + /// Use the specified request, which may not be nil. + NSURLSessionDelayedRequestUseNewRequest(1), - /// Returns a [NSFileSecurity] that wraps the given raw object pointer. - static NSFileSecurity castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileSecurity._(other, lib, retain: retain, release: release); - } + /// Cancel the task; the request parameter is ignored. + NSURLSessionDelayedRequestCancel(2); - /// Returns whether [obj] is an instance of [NSFileSecurity]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSFileSecurity1); - } + final int value; + const NSURLSessionDelayedRequestDisposition(this.value); - NSFileSecurity? initWithCoder_(NSCoder coder) { - final _ret = - _lib._objc_msgSend_14(_id, _lib._sel_initWithCoder_1, coder._id); - return _ret.address == 0 - ? null - : NSFileSecurity._(_ret, _lib, retain: true, release: true); - } + static NSURLSessionDelayedRequestDisposition fromValue(int value) => + switch (value) { + 0 => NSURLSessionDelayedRequestContinueLoading, + 1 => NSURLSessionDelayedRequestUseNewRequest, + 2 => NSURLSessionDelayedRequestCancel, + _ => throw ArgumentError( + "Unknown value for NSURLSessionDelayedRequestDisposition: $value"), + }; +} - @override - NSFileSecurity init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSFileSecurity._(_ret, _lib, retain: true, release: true); - } +late final _sel_URLSession_task_willBeginDelayedRequest_completionHandler_ = + objc.registerName( + "URLSession:task:willBeginDelayedRequest:completionHandler:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLRequest, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLRequest, + objc.ObjCBlock)>(pointer, retain: retain, release: release); - static NSFileSecurity new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_new1); - return NSFileSecurity._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLRequest, + objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLRequest, + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static NSFileSecurity allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSFileSecurity1, _lib._sel_allocWithZone_1, zone); - return NSFileSecurity._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)> + fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionTask.castFromPointer(arg2, retain: true, release: true), + NSURLRequest.castFromPointer(arg3, retain: true, release: true), + ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest.castFromPointer(arg4, retain: true, release: true))), + retain: false, + release: true); - static NSFileSecurity alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSFileSecurity1, _lib._sel_alloc1); - return NSFileSecurity._(_ret, _lib, retain: false, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLRequest, + objc.ObjCBlock)> + listener( + void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLRequest, + objc.ObjCBlock) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionTask.castFromPointer(arg2, + retain: false, release: true), + NSURLRequest.castFromPointer(arg3, + retain: false, release: true), + ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest + .castFromPointer(arg4, retain: false, release: true))); + final wrapper = _wrapListenerBlock_1nnj9ov(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLRequest, + objc.ObjCBlock)>( + wrapper, + retain: false, + release: true); } } -/// ! -/// @class NSHTTPURLResponse -/// -/// @abstract An NSHTTPURLResponse object represents a response to an -/// HTTP URL load. It is a specialization of NSURLResponse which -/// provides conveniences for accessing information specific to HTTP -/// protocol responses. +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLRequest, + objc.ObjCBlock)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0, + arg1.ref.pointer, + arg2.ref.pointer, + arg3.ref.pointer, + arg4.ref.pointer); +} + +late final _sel_URLSession_taskIsWaitingForConnectivity_ = + objc.registerName("URLSession:taskIsWaitingForConnectivity:"); + +/// NSHTTPURLResponse class NSHTTPURLResponse extends NSURLResponse { - NSHTTPURLResponse._(ffi.Pointer id, NativeCupertinoHttp lib, + NSHTTPURLResponse._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSHTTPURLResponse] that points to the same underlying object as [other]. - static NSHTTPURLResponse castFrom(T other) { - return NSHTTPURLResponse._(other._id, other._lib, - retain: true, release: true); - } + /// Constructs a [NSHTTPURLResponse] that points to the same underlying object as [other]. + NSHTTPURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Returns a [NSHTTPURLResponse] that wraps the given raw object pointer. - static NSHTTPURLResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPURLResponse._(other, lib, retain: retain, release: release); - } + /// Constructs a [NSHTTPURLResponse] that wraps the given raw object pointer. + NSHTTPURLResponse.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [NSHTTPURLResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSHTTPURLResponse1); + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSHTTPURLResponse); } /// ! @@ -89282,27 +63607,27 @@ class NSHTTPURLResponse extends NSURLResponse { /// @result the instance of the object, or NULL if an error occurred during initialization. /// @discussion This API was introduced in Mac OS X 10.7.2 and iOS 5.0 and is not available prior to those releases. NSHTTPURLResponse? initWithURL_statusCode_HTTPVersion_headerFields_( - NSURL url, + objc.NSURL url, DartNSInteger statusCode, - NSString? HTTPVersion, - NSDictionary? headerFields) { - final _ret = _lib._objc_msgSend_521( - _id, - _lib._sel_initWithURL_statusCode_HTTPVersion_headerFields_1, - url._id, + objc.NSString? HTTPVersion, + objc.NSDictionary? headerFields) { + final _ret = _objc_msgSend_1j5aquk( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_statusCode_HTTPVersion_headerFields_, + url.ref.pointer, statusCode, - HTTPVersion?._id ?? ffi.nullptr, - headerFields?._id ?? ffi.nullptr); + HTTPVersion?.ref.pointer ?? ffi.nullptr, + headerFields?.ref.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + : NSHTTPURLResponse.castFromPointer(_ret, retain: false, release: true); } /// ! /// @abstract Returns the HTTP status code of the receiver. /// @result The HTTP status code of the receiver. DartNSInteger get statusCode { - return _lib._objc_msgSend_86(_id, _lib._sel_statusCode1); + return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_statusCode); } /// ! @@ -89314,9 +63639,9 @@ class NSHTTPURLResponse extends NSURLResponse { /// sophisticated or special-purpose HTTP clients. /// @result A dictionary containing all the HTTP header fields of the /// receiver. - NSDictionary get allHeaderFields { - final _ret = _lib._objc_msgSend_187(_id, _lib._sel_allHeaderFields1); - return NSDictionary._(_ret, _lib, retain: true, release: true); + objc.NSDictionary get allHeaderFields { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allHeaderFields); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// ! @@ -89328,12 +63653,12 @@ class NSHTTPURLResponse extends NSURLResponse { /// (case-insensitive). /// @result the value associated with the given header field, or nil if /// there is no value associated with the given header field. - NSString? valueForHTTPHeaderField_(NSString field) { - final _ret = _lib._objc_msgSend_347( - _id, _lib._sel_valueForHTTPHeaderField_1, field._id); + objc.NSString? valueForHTTPHeaderField_(objc.NSString field) { + final _ret = _objc_msgSend_juohf7( + this.ref.pointer, _sel_valueForHTTPHeaderField_, field.ref.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// ! @@ -89342,11 +63667,10 @@ class NSHTTPURLResponse extends NSURLResponse { /// corresponding to the status code for this response. /// @param statusCode the status code to use to produce a localized string. /// @result A localized string corresponding to the given status code. - static NSString localizedStringForStatusCode_( - NativeCupertinoHttp _lib, DartNSInteger statusCode) { - final _ret = _lib._objc_msgSend_522(_lib._class_NSHTTPURLResponse1, - _lib._sel_localizedStringForStatusCode_1, statusCode); - return NSString._(_ret, _lib, retain: true, release: true); + static objc.NSString localizedStringForStatusCode_(DartNSInteger statusCode) { + final _ret = _objc_msgSend_crtxa9(_class_NSHTTPURLResponse, + _sel_localizedStringForStatusCode_, statusCode); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// ! @@ -89358,2458 +63682,11037 @@ class NSHTTPURLResponse extends NSURLResponse { /// @param name the name of the text encoding for the associated data, if applicable, else nil /// @result The initialized NSURLResponse. /// @discussion This is the designated initializer for NSURLResponse. - @override NSHTTPURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - NSURL URL, NSString? MIMEType, DartNSInteger length, NSString? name) { - final _ret = _lib._objc_msgSend_334( - _id, - _lib._sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_1, - URL._id, - MIMEType?._id ?? ffi.nullptr, + objc.NSURL URL, + objc.NSString? MIMEType, + DartNSInteger length, + objc.NSString? name) { + final _ret = _objc_msgSend_eyseqq( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, + URL.ref.pointer, + MIMEType?.ref.pointer ?? ffi.nullptr, length, - name?._id ?? ffi.nullptr); - return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); + name?.ref.pointer ?? ffi.nullptr); + return NSHTTPURLResponse.castFromPointer(_ret, + retain: false, release: true); } - @override + /// init NSHTTPURLResponse init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); - } - - static NSHTTPURLResponse new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_new1); - return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); - } - - static NSHTTPURLResponse allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSHTTPURLResponse1, _lib._sel_allocWithZone_1, zone); - return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); - } - - static NSHTTPURLResponse alloc(NativeCupertinoHttp _lib) { final _ret = - _lib._objc_msgSend_2(_lib._class_NSHTTPURLResponse1, _lib._sel_alloc1); - return NSHTTPURLResponse._(_ret, _lib, retain: false, release: true); - } -} - -class NSException extends NSObject { - NSException._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSException] that points to the same underlying object as [other]. - static NSException castFrom(T other) { - return NSException._(other._id, other._lib, retain: true, release: true); + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSHTTPURLResponse.castFromPointer(_ret, + retain: false, release: true); } - /// Returns a [NSException] that wraps the given raw object pointer. - static NSException castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSException._(other, lib, retain: retain, release: release); + /// new + static NSHTTPURLResponse new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPURLResponse, _sel_new); + return NSHTTPURLResponse.castFromPointer(_ret, + retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSException]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSException1); + /// allocWithZone: + static NSHTTPURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSHTTPURLResponse, _sel_allocWithZone_, zone); + return NSHTTPURLResponse.castFromPointer(_ret, + retain: false, release: true); } - static NSException exceptionWithName_reason_userInfo_( - NativeCupertinoHttp _lib, - DartNSExceptionName name, - NSString? reason, - NSDictionary? userInfo) { - final _ret = _lib._objc_msgSend_523( - _lib._class_NSException1, - _lib._sel_exceptionWithName_reason_userInfo_1, - name._id, - reason?._id ?? ffi.nullptr, - userInfo?._id ?? ffi.nullptr); - return NSException._(_ret, _lib, retain: true, release: true); - } - - NSException initWithName_reason_userInfo_( - DartNSExceptionName aName, NSString? aReason, NSDictionary? aUserInfo) { - final _ret = _lib._objc_msgSend_524( - _id, - _lib._sel_initWithName_reason_userInfo_1, - aName._id, - aReason?._id ?? ffi.nullptr, - aUserInfo?._id ?? ffi.nullptr); - return NSException._(_ret, _lib, retain: true, release: true); + /// alloc + static NSHTTPURLResponse alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPURLResponse, _sel_alloc); + return NSHTTPURLResponse.castFromPointer(_ret, + retain: false, release: true); } - DartNSExceptionName get name { - final _ret = _lib._objc_msgSend_32(_id, _lib._sel_name1); - return NSString._(_ret, _lib, retain: true, release: true); + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1( + _class_NSHTTPURLResponse, _sel_supportsSecureCoding); } - NSString? get reason { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_reason1); + /// initWithCoder: + NSHTTPURLResponse? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); - } + : NSHTTPURLResponse.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSHTTPURLResponse = objc.getClass("NSHTTPURLResponse"); +late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_ = + objc.registerName("initWithURL:statusCode:HTTPVersion:headerFields:"); +final _objc_msgSend_1j5aquk = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_statusCode = objc.registerName("statusCode"); +late final _sel_allHeaderFields = objc.registerName("allHeaderFields"); +late final _sel_localizedStringForStatusCode_ = + objc.registerName("localizedStringForStatusCode:"); +final _objc_msgSend_crtxa9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, NSInteger)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +void _ObjCBlock_ffiVoid_NSURLRequest_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSURLRequest_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLRequest_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLRequest_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSURLRequest_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLRequest_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLRequest_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURLRequest_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLRequest_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURLRequest { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - NSDictionary? get userInfo { - final _ret = _lib._objc_msgSend_288(_id, _lib._sel_userInfo1); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSURLRequest_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - NSArray get callStackReturnAddresses { - final _ret = - _lib._objc_msgSend_169(_id, _lib._sel_callStackReturnAddresses1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(NSURLRequest?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLRequest_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLRequest.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); - NSArray get callStackSymbols { - final _ret = _lib._objc_msgSend_169(_id, _lib._sel_callStackSymbols1); - return NSArray._(_ret, _lib, retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(NSURLRequest?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLRequest_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLRequest.castFromPointer(arg0, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } +} - void raise() { - _lib._objc_msgSend_1(_id, _lib._sel_raise1); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURLRequest_CallExtension + on objc.ObjCBlock { + void call(NSURLRequest? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} - static void raise_format_( - NativeCupertinoHttp _lib, DartNSExceptionName name, NSString format) { - _lib._objc_msgSend_427(_lib._class_NSException1, _lib._sel_raise_format_1, - name._id, format._id); - } +late final _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = + objc.registerName( + "URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + arg0, arg1, arg2, arg3, arg4, arg5); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))( + arg0, arg1, arg2, arg3, arg4, arg5); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4, arg5); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSHTTPURLResponse, + NSURLRequest, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSHTTPURLResponse, + NSURLRequest, + objc.ObjCBlock)>(pointer, retain: retain, release: release); - static void raise_format_arguments_(NativeCupertinoHttp _lib, - DartNSExceptionName name, NSString format, va_list argList) { - _lib._objc_msgSend_525(_lib._class_NSException1, - _lib._sel_raise_format_arguments_1, name._id, format._id, argList); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSHTTPURLResponse, + NSURLRequest, + objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4, ffi.Pointer arg5)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSHTTPURLResponse, + NSURLRequest, + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - @override - NSException init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSException._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest, objc.ObjCBlock)> + fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest, objc.ObjCBlock) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest, objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4, ffi.Pointer arg5) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionTask.castFromPointer(arg2, retain: true, release: true), + NSHTTPURLResponse.castFromPointer(arg3, retain: true, release: true), + NSURLRequest.castFromPointer(arg4, retain: true, release: true), + ObjCBlock_ffiVoid_NSURLRequest.castFromPointer(arg5, retain: true, release: true))), + retain: false, + release: true); - static NSException new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_new1); - return NSException._(_ret, _lib, retain: false, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSHTTPURLResponse, + NSURLRequest, + objc.ObjCBlock)> listener( + void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSHTTPURLResponse, + NSURLRequest, + objc.ObjCBlock) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionTask.castFromPointer(arg2, + retain: false, release: true), + NSHTTPURLResponse.castFromPointer(arg3, + retain: false, release: true), + NSURLRequest.castFromPointer(arg4, + retain: false, release: true), + ObjCBlock_ffiVoid_NSURLRequest.castFromPointer(arg5, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_dmve6(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSHTTPURLResponse, + NSURLRequest, + objc.ObjCBlock)>(wrapper, + retain: false, release: true); } +} - static NSException allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSException1, _lib._sel_allocWithZone_1, zone); - return NSException._(_ret, _lib, retain: false, release: true); - } +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSHTTPURLResponse, NSURLRequest, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSHTTPURLResponse, + NSURLRequest, + objc.ObjCBlock)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4, + ffi.Pointer arg5)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0, + arg1.ref.pointer, + arg2.ref.pointer, + arg3.ref.pointer, + arg4.ref.pointer, + arg5.ref.pointer); +} + +late final _sel_URLSession_task_didReceiveChallenge_completionHandler_ = + objc.registerName("URLSession:task:didReceiveChallenge:completionHandler:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)>(pointer, retain: retain, release: release); - static NSException alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSException1, _lib._sel_alloc1); - return NSException._(_ret, _lib, retain: false, release: true); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)> + fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionTask.castFromPointer(arg2, retain: true, release: true), + NSURLAuthenticationChallenge.castFromPointer(arg3, retain: true, release: true), + ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential.castFromPointer(arg4, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)>)> listener( + void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionTask.castFromPointer(arg2, + retain: false, release: true), + NSURLAuthenticationChallenge.castFromPointer(arg3, + retain: false, release: true), + ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential + .castFromPointer(arg4, retain: false, release: true))); + final wrapper = _wrapListenerBlock_1nnj9ov(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)>)>(wrapper, + retain: false, release: true); } } -typedef NSUncaughtExceptionHandler - = ffi.NativeFunction exception)>; +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock + arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer, arg4.ref.pointer); +} + +void _ObjCBlock_ffiVoid_NSInputStream_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSInputStream_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSInputStream_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSInputStream_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSInputStream_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSInputStream_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSInputStream_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSInputStream_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSInputStream_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSInputStream { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); -class NSAssertionHandler extends NSObject { - NSAssertionHandler._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSInputStream_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Returns a [NSAssertionHandler] that points to the same underlying object as [other]. - static NSAssertionHandler castFrom(T other) { - return NSAssertionHandler._(other._id, other._lib, - retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(objc.NSInputStream?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSInputStream_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSInputStream.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); - /// Returns a [NSAssertionHandler] that wraps the given raw object pointer. - static NSAssertionHandler castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSAssertionHandler._(other, lib, retain: retain, release: release); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(objc.NSInputStream?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSInputStream_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSInputStream.castFromPointer(arg0, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_ukcdfq(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } +} - /// Returns whether [obj] is an instance of [NSAssertionHandler]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSAssertionHandler1); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSInputStream_CallExtension + on objc.ObjCBlock { + void call(objc.NSInputStream? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} - static NSAssertionHandler getCurrentHandler(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_526( - _lib._class_NSAssertionHandler1, _lib._sel_currentHandler1); - return NSAssertionHandler._(_ret, _lib, retain: true, release: true); - } +late final _sel_URLSession_task_needNewBodyStream_ = + objc.registerName("URLSession:task:needNewBodyStream:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + objc.ObjCBlock)>(pointer, + retain: retain, release: release); - void handleFailureInMethod_object_file_lineNumber_description_( - ffi.Pointer selector, - NSObject object, - NSString fileName, - DartNSInteger line, - NSString? format) { - _lib._objc_msgSend_527( - _id, - _lib._sel_handleFailureInMethod_object_file_lineNumber_description_1, - selector, - object._id, - fileName._id, - line, - format?._id ?? ffi.nullptr); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask, objc.ObjCBlock)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - void handleFailureInFunction_file_lineNumber_description_( - NSString functionName, - NSString fileName, - DartNSInteger line, - NSString? format) { - _lib._objc_msgSend_528( - _id, - _lib._sel_handleFailureInFunction_file_lineNumber_description_1, - functionName._id, - fileName._id, - line, - format?._id ?? ffi.nullptr); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask, objc.ObjCBlock)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, objc.ObjCBlock) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionTask, objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionTask.castFromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NSInputStream.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); - @override - NSAssertionHandler init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSAssertionHandler._(_ret, _lib, retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + objc.ObjCBlock)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionTask.castFromPointer(arg2, + retain: false, release: true), + ObjCBlock_ffiVoid_NSInputStream.castFromPointer(arg3, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1wmulza(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + objc.ObjCBlock)>( + wrapper, + retain: false, + release: true); } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + objc.ObjCBlock)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); +} + +late final _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = + objc.registerName( + "URLSession:task:needNewBodyStreamFromOffset:completionHandler:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Int64 arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()( + arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, ffi.Int64, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + ffi.Int64, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + ffi.Int64, + objc.ObjCBlock)>(pointer, retain: retain, release: release); - static NSAssertionHandler new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_new1); - return NSAssertionHandler._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask, ffi.Int64, objc.ObjCBlock)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Int64 arg3, ffi.Pointer arg4)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + ffi.Int64, + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - static NSAssertionHandler allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSAssertionHandler1, _lib._sel_allocWithZone_1, zone); - return NSAssertionHandler._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask, ffi.Int64, objc.ObjCBlock)> + fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, int, objc.ObjCBlock) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionTask, ffi.Int64, objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, int arg3, ffi.Pointer arg4) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionTask.castFromPointer(arg2, retain: true, release: true), + arg3, + ObjCBlock_ffiVoid_NSInputStream.castFromPointer(arg4, retain: true, release: true))), + retain: false, + release: true); - static NSAssertionHandler alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSAssertionHandler1, _lib._sel_alloc1); - return NSAssertionHandler._(_ret, _lib, retain: false, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + ffi.Int64, + objc.ObjCBlock)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionTask.castFromPointer(arg2, + retain: false, release: true), + arg3, + ObjCBlock_ffiVoid_NSInputStream.castFromPointer(arg4, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_qxeqyf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + ffi.Int64, + objc.ObjCBlock)>( + wrapper, + retain: false, + release: true); } } -class NSBlockOperation extends NSOperation { - NSBlockOperation._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSBlockOperation] that points to the same underlying object as [other]. - static NSBlockOperation castFrom(T other) { - return NSBlockOperation._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [NSBlockOperation] that wraps the given raw object pointer. - static NSBlockOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSBlockOperation._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSBlockOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSBlockOperation1); - } - - static NSBlockOperation blockOperationWithBlock_( - NativeCupertinoHttp _lib, ObjCBlock_ffiVoid block) { - final _ret = _lib._objc_msgSend_529(_lib._class_NSBlockOperation1, - _lib._sel_blockOperationWithBlock_1, block._id); - return NSBlockOperation._(_ret, _lib, retain: true, release: true); - } +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, ffi.Int64, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + ffi.Int64, + objc.ObjCBlock)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Int64 arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3, arg4.ref.pointer); +} + +late final _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = + objc.registerName( + "URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Int64 arg3, + ffi.Int64 arg4, + ffi.Int64 arg5)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int)>()(arg0, arg1, arg2, arg3, arg4, arg5); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int))(arg0, arg1, arg2, arg3, arg4, arg5); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int))(arg0, arg1, arg2, arg3, arg4, arg5); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, ffi.Int64, ffi.Int64, ffi.Int64)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask, ffi.Int64, ffi.Int64, ffi.Int64)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + ffi.Int64, + ffi.Int64, + ffi.Int64)>(pointer, retain: retain, release: release); - void addExecutionBlock_(ObjCBlock_ffiVoid block) { - _lib._objc_msgSend_415(_id, _lib._sel_addExecutionBlock_1, block._id); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + ffi.Int64, + ffi.Int64, + ffi.Int64)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Int64 arg3, ffi.Int64 arg4, ffi.Int64 arg5)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask, ffi.Int64, ffi.Int64, ffi.Int64)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - NSArray get executionBlocks { - final _ret = _lib._objc_msgSend_169(_id, _lib._sel_executionBlocks1); - return NSArray._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask, ffi.Int64, ffi.Int64, ffi.Int64)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, int, int, int) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionTask, ffi.Int64, ffi.Int64, ffi.Int64)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionTask.castFromPointer(arg2, retain: true, release: true), + arg3, + arg4, + arg5)), + retain: false, + release: true); - @override - NSBlockOperation init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSBlockOperation._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + ffi.Int64, ffi.Int64, ffi.Int64)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, int, + int, int) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionTask.castFromPointer(arg2, + retain: false, release: true), + arg3, + arg4, + arg5)); + final wrapper = _wrapListenerBlock_jzggzf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + ffi.Int64, + ffi.Int64, + ffi.Int64)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, ffi.Int64, ffi.Int64, ffi.Int64)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + ffi.Int64, ffi.Int64, ffi.Int64)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Int64 arg3, + ffi.Int64 arg4, + ffi.Int64 arg5)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int)>()(ref.pointer, arg0, arg1.ref.pointer, + arg2.ref.pointer, arg3, arg4, arg5); +} + +late final _sel_URLSession_task_didReceiveInformationalResponse_ = + objc.registerName("URLSession:task:didReceiveInformationalResponse:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask, NSHTTPURLResponse)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask, NSHTTPURLResponse)>(pointer, + retain: retain, release: release); - static NSBlockOperation new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_new1); - return NSBlockOperation._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, NSURLSession, NSURLSessionTask, NSHTTPURLResponse)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask, NSHTTPURLResponse)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - static NSBlockOperation allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSBlockOperation1, _lib._sel_allocWithZone_1, zone); - return NSBlockOperation._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSHTTPURLResponse)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, NSHTTPURLResponse) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionTask.castFromPointer(arg2, retain: true, release: true), + NSHTTPURLResponse.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); - static NSBlockOperation alloc(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_NSBlockOperation1, _lib._sel_alloc1); - return NSBlockOperation._(_ret, _lib, retain: false, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + NSHTTPURLResponse)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + NSHTTPURLResponse) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionTask.castFromPointer(arg2, + retain: false, release: true), + NSHTTPURLResponse.castFromPointer(arg3, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1a6kixf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + NSHTTPURLResponse)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + NSHTTPURLResponse)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); } -class NSInvocationOperation extends NSOperation { - NSInvocationOperation._(ffi.Pointer id, NativeCupertinoHttp lib, +/// NSURLSessionTaskMetrics +class NSURLSessionTaskMetrics extends objc.NSObject { + NSURLSessionTaskMetrics._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSInvocationOperation] that points to the same underlying object as [other]. - static NSInvocationOperation castFrom(T other) { - return NSInvocationOperation._(other._id, other._lib, - retain: true, release: true); - } + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSInvocationOperation] that wraps the given raw object pointer. - static NSInvocationOperation castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInvocationOperation._(other, lib, - retain: retain, release: release); - } + /// Constructs a [NSURLSessionTaskMetrics] that points to the same underlying object as [other]. + NSURLSessionTaskMetrics.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Returns whether [obj] is an instance of [NSInvocationOperation]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_NSInvocationOperation1); - } + /// Constructs a [NSURLSessionTaskMetrics] that wraps the given raw object pointer. + NSURLSessionTaskMetrics.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSInvocationOperation? initWithTarget_selector_object_( - NSObject target, ffi.Pointer sel, NSObject? arg) { - final _ret = _lib._objc_msgSend_530( - _id, - _lib._sel_initWithTarget_selector_object_1, - target._id, - sel, - arg?._id ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSInvocationOperation._(_ret, _lib, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionTaskMetrics]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionTaskMetrics); } - NSInvocationOperation initWithInvocation_(NSInvocation inv) { + /// transactionMetrics array contains the metrics collected for every request/response transaction created during the task execution. + objc.ObjCObjectBase get transactionMetrics { final _ret = - _lib._objc_msgSend_531(_id, _lib._sel_initWithInvocation_1, inv._id); - return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_transactionMetrics); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - NSInvocation get invocation { - final _ret = _lib._objc_msgSend_532(_id, _lib._sel_invocation1); - return NSInvocation._(_ret, _lib, retain: true, release: true); + /// Interval from the task creation time to the task completion time. + /// Task creation time is the time when the task was instantiated. + /// Task completion time is the time when the task is about to change its internal state to completed. + NSDateInterval get taskInterval { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_taskInterval); + return NSDateInterval.castFromPointer(_ret, retain: true, release: true); } - NSObject? get result { - final _ret = _lib._objc_msgSend_61(_id, _lib._sel_result1); - return _ret.address == 0 - ? null - : NSObject._(_ret, _lib, retain: true, release: true); + /// redirectCount is the number of redirects that were recorded. + DartNSUInteger get redirectCount { + return _objc_msgSend_eldhrq(this.ref.pointer, _sel_redirectCount); } - @override - NSInvocationOperation init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return NSInvocationOperation._(_ret, _lib, retain: true, release: true); + /// init + NSURLSessionTaskMetrics init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionTaskMetrics.castFromPointer(_ret, + retain: false, release: true); } - static NSInvocationOperation new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocationOperation1, _lib._sel_new1); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + /// new + static NSURLSessionTaskMetrics new1() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionTaskMetrics, _sel_new); + return NSURLSessionTaskMetrics.castFromPointer(_ret, + retain: false, release: true); } - static NSInvocationOperation allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_NSInvocationOperation1, _lib._sel_allocWithZone_1, zone); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + /// allocWithZone: + static NSURLSessionTaskMetrics allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_1b3ihd0( + _class_NSURLSessionTaskMetrics, _sel_allocWithZone_, zone); + return NSURLSessionTaskMetrics.castFromPointer(_ret, + retain: false, release: true); } - static NSInvocationOperation alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_NSInvocationOperation1, _lib._sel_alloc1); - return NSInvocationOperation._(_ret, _lib, retain: false, release: true); + /// alloc + static NSURLSessionTaskMetrics alloc() { + final _ret = + _objc_msgSend_1unuoxw(_class_NSURLSessionTaskMetrics, _sel_alloc); + return NSURLSessionTaskMetrics.castFromPointer(_ret, + retain: false, release: true); } } -final class _Dart_Isolate extends ffi.Opaque {} - -final class _Dart_IsolateGroup extends ffi.Opaque {} - -final class _Dart_Handle extends ffi.Opaque {} - -final class _Dart_WeakPersistentHandle extends ffi.Opaque {} - -final class _Dart_FinalizableHandle extends ffi.Opaque {} - -typedef Dart_WeakPersistentHandle = ffi.Pointer<_Dart_WeakPersistentHandle>; - -/// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the -/// version when changing this struct. -typedef Dart_HandleFinalizer - = ffi.Pointer>; -typedef Dart_HandleFinalizerFunction = ffi.Void Function( - ffi.Pointer isolate_callback_data, ffi.Pointer peer); -typedef DartDart_HandleFinalizerFunction = void Function( - ffi.Pointer isolate_callback_data, ffi.Pointer peer); -typedef Dart_FinalizableHandle = ffi.Pointer<_Dart_FinalizableHandle>; - -final class Dart_IsolateFlags extends ffi.Struct { - @ffi.Int32() - external int version; - - @ffi.Bool() - external bool enable_asserts; - - @ffi.Bool() - external bool use_field_guards; - - @ffi.Bool() - external bool use_osr; - - @ffi.Bool() - external bool obfuscate; - - @ffi.Bool() - external bool load_vmservice_library; - - @ffi.Bool() - external bool copy_parent_code; - - @ffi.Bool() - external bool null_safety; - - @ffi.Bool() - external bool is_system_isolate; -} - -/// Forward declaration -final class Dart_CodeObserver extends ffi.Struct { - external ffi.Pointer data; - - external Dart_OnNewCodeCallback on_new_code; -} - -/// Callback provided by the embedder that is used by the VM to notify on code -/// object creation, *before* it is invoked the first time. -/// This is useful for embedders wanting to e.g. keep track of PCs beyond -/// the lifetime of the garbage collected code objects. -/// Note that an address range may be used by more than one code object over the -/// lifecycle of a process. Clients of this function should record timestamps for -/// these compilation events and when collecting PCs to disambiguate reused -/// address ranges. -typedef Dart_OnNewCodeCallback - = ffi.Pointer>; -typedef Dart_OnNewCodeCallbackFunction = ffi.Void Function( - ffi.Pointer observer, - ffi.Pointer name, - ffi.UintPtr base, - ffi.UintPtr size); -typedef DartDart_OnNewCodeCallbackFunction = void Function( - ffi.Pointer observer, - ffi.Pointer name, - int base, - int size); - -/// Describes how to initialize the VM. Used with Dart_Initialize. -/// -/// \param version Identifies the version of the struct used by the client. -/// should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. -/// \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate -/// or NULL if no snapshot is provided. If provided, the buffer must remain -/// valid until Dart_Cleanup returns. -/// \param instructions_snapshot A buffer containing a snapshot of precompiled -/// instructions, or NULL if no snapshot is provided. If provided, the buffer -/// must remain valid until Dart_Cleanup returns. -/// \param initialize_isolate A function to be called during isolate -/// initialization inside an existing isolate group. -/// See Dart_InitializeIsolateCallback. -/// \param create_group A function to be called during isolate group creation. -/// See Dart_IsolateGroupCreateCallback. -/// \param shutdown A function to be called right before an isolate is shutdown. -/// See Dart_IsolateShutdownCallback. -/// \param cleanup A function to be called after an isolate was shutdown. -/// See Dart_IsolateCleanupCallback. -/// \param cleanup_group A function to be called after an isolate group is shutdown. -/// See Dart_IsolateGroupCleanupCallback. -/// \param get_service_assets A function to be called by the service isolate when -/// it requires the vmservice assets archive. -/// See Dart_GetVMServiceAssetsArchive. -/// \param code_observer An external code observer callback function. -/// The observer can be invoked as early as during the Dart_Initialize() call. -final class Dart_InitializeParams extends ffi.Struct { - @ffi.Int32() - external int version; - - external ffi.Pointer vm_snapshot_data; - - external ffi.Pointer vm_snapshot_instructions; - - external Dart_IsolateGroupCreateCallback create_group; - - external Dart_InitializeIsolateCallback initialize_isolate; - - external Dart_IsolateShutdownCallback shutdown_isolate; - - external Dart_IsolateCleanupCallback cleanup_isolate; - - external Dart_IsolateGroupCleanupCallback cleanup_group; - - external Dart_ThreadExitCallback thread_exit; - - external Dart_FileOpenCallback file_open; - - external Dart_FileReadCallback file_read; - - external Dart_FileWriteCallback file_write; - - external Dart_FileCloseCallback file_close; - - external Dart_EntropySource entropy_source; - - external Dart_GetVMServiceAssetsArchive get_service_assets; - - @ffi.Bool() - external bool start_kernel_isolate; - - external ffi.Pointer code_observer; -} - -/// An isolate creation and initialization callback function. -/// -/// This callback, provided by the embedder, is called when the VM -/// needs to create an isolate. The callback should create an isolate -/// by calling Dart_CreateIsolateGroup and load any scripts required for -/// execution. -/// -/// This callback may be called on a different thread than the one -/// running the parent isolate. -/// -/// When the function returns NULL, it is the responsibility of this -/// function to ensure that Dart_ShutdownIsolate has been called if -/// required (for example, if the isolate was created successfully by -/// Dart_CreateIsolateGroup() but the root library fails to load -/// successfully, then the function should call Dart_ShutdownIsolate -/// before returning). -/// -/// When the function returns NULL, the function should set *error to -/// a malloc-allocated buffer containing a useful error message. The -/// caller of this function (the VM) will make sure that the buffer is -/// freed. -/// -/// \param script_uri The uri of the main source file or snapshot to load. -/// Either the URI of the parent isolate set in Dart_CreateIsolateGroup for -/// Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the -/// library tag handler of the parent isolate. -/// The callback is responsible for loading the program by a call to -/// Dart_LoadScriptFromKernel. -/// \param main The name of the main entry point this isolate will -/// eventually run. This is provided for advisory purposes only to -/// improve debugging messages. The main function is not invoked by -/// this function. -/// \param package_root Ignored. -/// \param package_config Uri of the package configuration file (either in format -/// of .packages or .dart_tool/package_config.json) for this isolate -/// to resolve package imports against. If this parameter is not passed the -/// package resolution of the parent isolate should be used. -/// \param flags Default flags for this isolate being spawned. Either inherited -/// from the spawning isolate or passed as parameters when spawning the -/// isolate from Dart code. -/// \param isolate_data The isolate data which was passed to the -/// parent isolate when it was created by calling Dart_CreateIsolateGroup(). -/// \param error A structure into which the embedder can place a -/// C string containing an error message in the case of failures. -/// -/// \return The embedder returns NULL if the creation and -/// initialization was not successful and the isolate if successful. -typedef Dart_IsolateGroupCreateCallback - = ffi.Pointer>; -typedef Dart_IsolateGroupCreateCallbackFunction = Dart_Isolate Function( - ffi.Pointer script_uri, - ffi.Pointer main, - ffi.Pointer package_root, - ffi.Pointer package_config, - ffi.Pointer flags, - ffi.Pointer isolate_data, - ffi.Pointer> error); - -/// An isolate is the unit of concurrency in Dart. Each isolate has -/// its own memory and thread of control. No state is shared between -/// isolates. Instead, isolates communicate by message passing. -/// -/// Each thread keeps track of its current isolate, which is the -/// isolate which is ready to execute on the current thread. The -/// current isolate may be NULL, in which case no isolate is ready to -/// execute. Most of the Dart apis require there to be a current -/// isolate in order to function without error. The current isolate is -/// set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. -typedef Dart_Isolate = ffi.Pointer<_Dart_Isolate>; - -/// An isolate initialization callback function. -/// -/// This callback, provided by the embedder, is called when the VM has created an -/// isolate within an existing isolate group (i.e. from the same source as an -/// existing isolate). -/// -/// The callback should setup native resolvers and might want to set a custom -/// message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as -/// runnable. -/// -/// This callback may be called on a different thread than the one -/// running the parent isolate. -/// -/// When the function returns `false`, it is the responsibility of this -/// function to ensure that `Dart_ShutdownIsolate` has been called. -/// -/// When the function returns `false`, the function should set *error to -/// a malloc-allocated buffer containing a useful error message. The -/// caller of this function (the VM) will make sure that the buffer is -/// freed. -/// -/// \param child_isolate_data The callback data to associate with the new -/// child isolate. -/// \param error A structure into which the embedder can place a -/// C string containing an error message in the case the initialization fails. -/// -/// \return The embedder returns true if the initialization was successful and -/// false otherwise (in which case the VM will terminate the isolate). -typedef Dart_InitializeIsolateCallback - = ffi.Pointer>; -typedef Dart_InitializeIsolateCallbackFunction = ffi.Bool Function( - ffi.Pointer> child_isolate_data, - ffi.Pointer> error); -typedef DartDart_InitializeIsolateCallbackFunction = bool Function( - ffi.Pointer> child_isolate_data, - ffi.Pointer> error); - -/// An isolate shutdown callback function. -/// -/// This callback, provided by the embedder, is called before the vm -/// shuts down an isolate. The isolate being shutdown will be the current -/// isolate. It is safe to run Dart code. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -/// \param isolate_data The same callback data which was passed to the isolate -/// when it was created. -typedef Dart_IsolateShutdownCallback - = ffi.Pointer>; -typedef Dart_IsolateShutdownCallbackFunction = ffi.Void Function( - ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data); -typedef DartDart_IsolateShutdownCallbackFunction = void Function( - ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data); - -/// An isolate cleanup callback function. -/// -/// This callback, provided by the embedder, is called after the vm -/// shuts down an isolate. There will be no current isolate and it is *not* -/// safe to run Dart code. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -/// \param isolate_data The same callback data which was passed to the isolate -/// when it was created. -typedef Dart_IsolateCleanupCallback - = ffi.Pointer>; -typedef Dart_IsolateCleanupCallbackFunction = ffi.Void Function( - ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data); -typedef DartDart_IsolateCleanupCallbackFunction = void Function( - ffi.Pointer isolate_group_data, - ffi.Pointer isolate_data); - -/// An isolate group cleanup callback function. -/// -/// This callback, provided by the embedder, is called after the vm -/// shuts down an isolate group. -/// -/// This function should be used to dispose of native resources that -/// are allocated to an isolate in order to avoid leaks. -/// -/// \param isolate_group_data The same callback data which was passed to the -/// isolate group when it was created. -typedef Dart_IsolateGroupCleanupCallback - = ffi.Pointer>; -typedef Dart_IsolateGroupCleanupCallbackFunction = ffi.Void Function( - ffi.Pointer isolate_group_data); -typedef DartDart_IsolateGroupCleanupCallbackFunction = void Function( - ffi.Pointer isolate_group_data); - -/// A thread death callback function. -/// This callback, provided by the embedder, is called before a thread in the -/// vm thread pool exits. -/// This function could be used to dispose of native resources that -/// are associated and attached to the thread, in order to avoid leaks. -typedef Dart_ThreadExitCallback - = ffi.Pointer>; -typedef Dart_ThreadExitCallbackFunction = ffi.Void Function(); -typedef DartDart_ThreadExitCallbackFunction = void Function(); - -/// Callbacks provided by the embedder for file operations. If the -/// embedder does not allow file operations these callbacks can be -/// NULL. -/// -/// Dart_FileOpenCallback - opens a file for reading or writing. -/// \param name The name of the file to open. -/// \param write A boolean variable which indicates if the file is to -/// opened for writing. If there is an existing file it needs to truncated. -/// -/// Dart_FileReadCallback - Read contents of file. -/// \param data Buffer allocated in the callback into which the contents -/// of the file are read into. It is the responsibility of the caller to -/// free this buffer. -/// \param file_length A variable into which the length of the file is returned. -/// In the case of an error this value would be -1. -/// \param stream Handle to the opened file. -/// -/// Dart_FileWriteCallback - Write data into file. -/// \param data Buffer which needs to be written into the file. -/// \param length Length of the buffer. -/// \param stream Handle to the opened file. -/// -/// Dart_FileCloseCallback - Closes the opened file. -/// \param stream Handle to the opened file. -typedef Dart_FileOpenCallback - = ffi.Pointer>; -typedef Dart_FileOpenCallbackFunction = ffi.Pointer Function( - ffi.Pointer name, ffi.Bool write); -typedef DartDart_FileOpenCallbackFunction = ffi.Pointer Function( - ffi.Pointer name, bool write); -typedef Dart_FileReadCallback - = ffi.Pointer>; -typedef Dart_FileReadCallbackFunction = ffi.Void Function( - ffi.Pointer> data, - ffi.Pointer file_length, - ffi.Pointer stream); -typedef DartDart_FileReadCallbackFunction = void Function( - ffi.Pointer> data, - ffi.Pointer file_length, - ffi.Pointer stream); -typedef Dart_FileWriteCallback - = ffi.Pointer>; -typedef Dart_FileWriteCallbackFunction = ffi.Void Function( - ffi.Pointer data, - ffi.IntPtr length, - ffi.Pointer stream); -typedef DartDart_FileWriteCallbackFunction = void Function( - ffi.Pointer data, int length, ffi.Pointer stream); -typedef Dart_FileCloseCallback - = ffi.Pointer>; -typedef Dart_FileCloseCallbackFunction = ffi.Void Function( - ffi.Pointer stream); -typedef DartDart_FileCloseCallbackFunction = void Function( - ffi.Pointer stream); -typedef Dart_EntropySource - = ffi.Pointer>; -typedef Dart_EntropySourceFunction = ffi.Bool Function( - ffi.Pointer buffer, ffi.IntPtr length); -typedef DartDart_EntropySourceFunction = bool Function( - ffi.Pointer buffer, int length); - -/// Callback provided by the embedder that is used by the vmservice isolate -/// to request the asset archive. The asset archive must be an uncompressed tar -/// archive that is stored in a Uint8List. -/// -/// If the embedder has no vmservice isolate assets, the callback can be NULL. -/// -/// \return The embedder must return a handle to a Uint8List containing an -/// uncompressed tar archive or null. -typedef Dart_GetVMServiceAssetsArchive - = ffi.Pointer>; -typedef Dart_GetVMServiceAssetsArchiveFunction = ffi.Handle Function(); -typedef DartDart_GetVMServiceAssetsArchiveFunction = Object Function(); -typedef Dart_IsolateGroup = ffi.Pointer<_Dart_IsolateGroup>; - -/// A message notification callback. -/// -/// This callback allows the embedder to provide an alternate wakeup -/// mechanism for the delivery of inter-isolate messages. It is the -/// responsibility of the embedder to call Dart_HandleMessage to -/// process the message. -typedef Dart_MessageNotifyCallback - = ffi.Pointer>; -typedef Dart_MessageNotifyCallbackFunction = ffi.Void Function( - Dart_Isolate dest_isolate); -typedef DartDart_MessageNotifyCallbackFunction = void Function( - Dart_Isolate dest_isolate); - -/// A port is used to send or receive inter-isolate messages -typedef Dart_Port = ffi.Int64; -typedef DartDart_Port = int; - -abstract class Dart_CoreType_Id { - static const int Dart_CoreType_Dynamic = 0; - static const int Dart_CoreType_Int = 1; - static const int Dart_CoreType_String = 2; -} - -/// ========== -/// Typed Data -/// ========== -abstract class Dart_TypedData_Type { - static const int Dart_TypedData_kByteData = 0; - static const int Dart_TypedData_kInt8 = 1; - static const int Dart_TypedData_kUint8 = 2; - static const int Dart_TypedData_kUint8Clamped = 3; - static const int Dart_TypedData_kInt16 = 4; - static const int Dart_TypedData_kUint16 = 5; - static const int Dart_TypedData_kInt32 = 6; - static const int Dart_TypedData_kUint32 = 7; - static const int Dart_TypedData_kInt64 = 8; - static const int Dart_TypedData_kUint64 = 9; - static const int Dart_TypedData_kFloat32 = 10; - static const int Dart_TypedData_kFloat64 = 11; - static const int Dart_TypedData_kInt32x4 = 12; - static const int Dart_TypedData_kFloat32x4 = 13; - static const int Dart_TypedData_kFloat64x2 = 14; - static const int Dart_TypedData_kInvalid = 15; -} - -final class _Dart_NativeArguments extends ffi.Opaque {} - -/// The arguments to a native function. -/// -/// This object is passed to a native function to represent its -/// arguments and return value. It allows access to the arguments to a -/// native function by index. It also allows the return value of a -/// native function to be set. -typedef Dart_NativeArguments = ffi.Pointer<_Dart_NativeArguments>; - -abstract class Dart_NativeArgument_Type { - static const int Dart_NativeArgument_kBool = 0; - static const int Dart_NativeArgument_kInt32 = 1; - static const int Dart_NativeArgument_kUint32 = 2; - static const int Dart_NativeArgument_kInt64 = 3; - static const int Dart_NativeArgument_kUint64 = 4; - static const int Dart_NativeArgument_kDouble = 5; - static const int Dart_NativeArgument_kString = 6; - static const int Dart_NativeArgument_kInstance = 7; - static const int Dart_NativeArgument_kNativeFields = 8; -} - -final class _Dart_NativeArgument_Descriptor extends ffi.Struct { - @ffi.Uint8() - external int type; - - @ffi.Uint8() - external int index; -} - -final class _Dart_NativeArgument_Value extends ffi.Opaque {} +late final _class_NSURLSessionTaskMetrics = + objc.getClass("NSURLSessionTaskMetrics"); +late final _sel_transactionMetrics = objc.registerName("transactionMetrics"); -typedef Dart_NativeArgument_Descriptor = _Dart_NativeArgument_Descriptor; -typedef Dart_NativeArgument_Value = _Dart_NativeArgument_Value; - -/// An environment lookup callback function. -/// -/// \param name The name of the value to lookup in the environment. -/// -/// \return A valid handle to a string if the name exists in the -/// current environment or Dart_Null() if not. -typedef Dart_EnvironmentCallback - = ffi.Pointer>; -typedef Dart_EnvironmentCallbackFunction = ffi.Handle Function(ffi.Handle name); -typedef DartDart_EnvironmentCallbackFunction = Object Function(Object name); - -/// Native entry resolution callback. -/// -/// For libraries and scripts which have native functions, the embedder -/// can provide a native entry resolver. This callback is used to map a -/// name/arity to a Dart_NativeFunction. If no function is found, the -/// callback should return NULL. -/// -/// The parameters to the native resolver function are: -/// \param name a Dart string which is the name of the native function. -/// \param num_of_arguments is the number of arguments expected by the -/// native function. -/// \param auto_setup_scope is a boolean flag that can be set by the resolver -/// to indicate if this function needs a Dart API scope (see Dart_EnterScope/ -/// Dart_ExitScope) to be setup automatically by the VM before calling into -/// the native function. By default most native functions would require this -/// to be true but some light weight native functions which do not call back -/// into the VM through the Dart API may not require a Dart scope to be -/// setup automatically. -/// -/// \return A valid Dart_NativeFunction which resolves to a native entry point -/// for the native function. -/// -/// See Dart_SetNativeResolver. -typedef Dart_NativeEntryResolver - = ffi.Pointer>; -typedef Dart_NativeEntryResolverFunction = Dart_NativeFunction Function( - ffi.Handle name, - ffi.Int num_of_arguments, - ffi.Pointer auto_setup_scope); -typedef DartDart_NativeEntryResolverFunction = Dart_NativeFunction Function( - Object name, int num_of_arguments, ffi.Pointer auto_setup_scope); - -/// A native function. -typedef Dart_NativeFunction - = ffi.Pointer>; -typedef Dart_NativeFunctionFunction = ffi.Void Function( - Dart_NativeArguments arguments); -typedef DartDart_NativeFunctionFunction = void Function( - Dart_NativeArguments arguments); - -/// Native entry symbol lookup callback. -/// -/// For libraries and scripts which have native functions, the embedder -/// can provide a callback for mapping a native entry to a symbol. This callback -/// maps a native function entry PC to the native function name. If no native -/// entry symbol can be found, the callback should return NULL. -/// -/// The parameters to the native reverse resolver function are: -/// \param nf A Dart_NativeFunction. -/// -/// \return A const UTF-8 string containing the symbol name or NULL. -/// -/// See Dart_SetNativeResolver. -typedef Dart_NativeEntrySymbol - = ffi.Pointer>; -typedef Dart_NativeEntrySymbolFunction = ffi.Pointer Function( - Dart_NativeFunction nf); - -/// FFI Native C function pointer resolver callback. -/// -/// See Dart_SetFfiNativeResolver. -typedef Dart_FfiNativeResolver - = ffi.Pointer>; -typedef Dart_FfiNativeResolverFunction = ffi.Pointer Function( - ffi.Pointer name, ffi.UintPtr args_n); -typedef DartDart_FfiNativeResolverFunction = ffi.Pointer Function( - ffi.Pointer name, int args_n); - -/// ===================== -/// Scripts and Libraries -/// ===================== -abstract class Dart_LibraryTag { - static const int Dart_kCanonicalizeUrl = 0; - static const int Dart_kImportTag = 1; - static const int Dart_kKernelTag = 2; -} - -/// The library tag handler is a multi-purpose callback provided by the -/// embedder to the Dart VM. The embedder implements the tag handler to -/// provide the ability to load Dart scripts and imports. -/// -/// -- TAGS -- -/// -/// Dart_kCanonicalizeUrl -/// -/// This tag indicates that the embedder should canonicalize 'url' with -/// respect to 'library'. For most embedders, the -/// Dart_DefaultCanonicalizeUrl function is a sufficient implementation -/// of this tag. The return value should be a string holding the -/// canonicalized url. -/// -/// Dart_kImportTag -/// -/// This tag is used to load a library from IsolateMirror.loadUri. The embedder -/// should call Dart_LoadLibraryFromKernel to provide the library to the VM. The -/// return value should be an error or library (the result from -/// Dart_LoadLibraryFromKernel). -/// -/// Dart_kKernelTag -/// -/// This tag is used to load the intermediate file (kernel) generated by -/// the Dart front end. This tag is typically used when a 'hot-reload' -/// of an application is needed and the VM is 'use dart front end' mode. -/// The dart front end typically compiles all the scripts, imports and part -/// files into one intermediate file hence we don't use the source/import or -/// script tags. The return value should be an error or a TypedData containing -/// the kernel bytes. -typedef Dart_LibraryTagHandler - = ffi.Pointer>; -typedef Dart_LibraryTagHandlerFunction = ffi.Handle Function( - ffi.Int32 tag, ffi.Handle library_or_package_map_url, ffi.Handle url); -typedef DartDart_LibraryTagHandlerFunction = Object Function( - int tag, Object library_or_package_map_url, Object url); - -/// Handles deferred loading requests. When this handler is invoked, it should -/// eventually load the deferred loading unit with the given id and call -/// Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is -/// recommended that the loading occur asynchronously, but it is permitted to -/// call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the -/// handler returns. -/// -/// If an error is returned, it will be propogated through -/// `prefix.loadLibrary()`. This is useful for synchronous -/// implementations, which must propogate any unwind errors from -/// Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler -/// should return a non-error such as `Dart_Null()`. -typedef Dart_DeferredLoadHandler - = ffi.Pointer>; -typedef Dart_DeferredLoadHandlerFunction = ffi.Handle Function( - ffi.IntPtr loading_unit_id); -typedef DartDart_DeferredLoadHandlerFunction = Object Function( - int loading_unit_id); - -/// TODO(33433): Remove kernel service from the embedding API. -abstract class Dart_KernelCompilationStatus { - static const int Dart_KernelCompilationStatus_Unknown = -1; - static const int Dart_KernelCompilationStatus_Ok = 0; - static const int Dart_KernelCompilationStatus_Error = 1; - static const int Dart_KernelCompilationStatus_Crash = 2; - static const int Dart_KernelCompilationStatus_MsgFailed = 3; -} - -final class Dart_KernelCompilationResult extends ffi.Struct { - @ffi.Int32() - external int status; - - @ffi.Bool() - external bool null_safety; - - external ffi.Pointer error; - - external ffi.Pointer kernel; - - @ffi.IntPtr() - external int kernel_size; -} - -abstract class Dart_KernelCompilationVerbosityLevel { - static const int Dart_KernelCompilationVerbosityLevel_Error = 0; - static const int Dart_KernelCompilationVerbosityLevel_Warning = 1; - static const int Dart_KernelCompilationVerbosityLevel_Info = 2; - static const int Dart_KernelCompilationVerbosityLevel_All = 3; -} - -final class Dart_SourceFile extends ffi.Struct { - external ffi.Pointer uri; - - external ffi.Pointer source; -} - -typedef Dart_StreamingWriteCallback - = ffi.Pointer>; -typedef Dart_StreamingWriteCallbackFunction = ffi.Void Function( - ffi.Pointer callback_data, - ffi.Pointer buffer, - ffi.IntPtr size); -typedef DartDart_StreamingWriteCallbackFunction = void Function( - ffi.Pointer callback_data, - ffi.Pointer buffer, - int size); -typedef Dart_CreateLoadingUnitCallback - = ffi.Pointer>; -typedef Dart_CreateLoadingUnitCallbackFunction = ffi.Void Function( - ffi.Pointer callback_data, - ffi.IntPtr loading_unit_id, - ffi.Pointer> write_callback_data, - ffi.Pointer> write_debug_callback_data); -typedef DartDart_CreateLoadingUnitCallbackFunction = void Function( - ffi.Pointer callback_data, - int loading_unit_id, - ffi.Pointer> write_callback_data, - ffi.Pointer> write_debug_callback_data); -typedef Dart_StreamingCloseCallback - = ffi.Pointer>; -typedef Dart_StreamingCloseCallbackFunction = ffi.Void Function( - ffi.Pointer callback_data); -typedef DartDart_StreamingCloseCallbackFunction = void Function( - ffi.Pointer callback_data); - -/// A Dart_CObject is used for representing Dart objects as native C -/// data outside the Dart heap. These objects are totally detached from -/// the Dart heap. Only a subset of the Dart objects have a -/// representation as a Dart_CObject. -/// -/// The string encoding in the 'value.as_string' is UTF-8. -/// -/// All the different types from dart:typed_data are exposed as type -/// kTypedData. The specific type from dart:typed_data is in the type -/// field of the as_typed_data structure. The length in the -/// as_typed_data structure is always in bytes. -/// -/// The data for kTypedData is copied on message send and ownership remains with -/// the caller. The ownership of data for kExternalTyped is passed to the VM on -/// message send and returned when the VM invokes the -/// Dart_HandleFinalizer callback; a non-NULL callback must be provided. -abstract class Dart_CObject_Type { - static const int Dart_CObject_kNull = 0; - static const int Dart_CObject_kBool = 1; - static const int Dart_CObject_kInt32 = 2; - static const int Dart_CObject_kInt64 = 3; - static const int Dart_CObject_kDouble = 4; - static const int Dart_CObject_kString = 5; - static const int Dart_CObject_kArray = 6; - static const int Dart_CObject_kTypedData = 7; - static const int Dart_CObject_kExternalTypedData = 8; - static const int Dart_CObject_kSendPort = 9; - static const int Dart_CObject_kCapability = 10; - static const int Dart_CObject_kNativePointer = 11; - static const int Dart_CObject_kUnsupported = 12; - static const int Dart_CObject_kNumberOfTypes = 13; -} - -final class _Dart_CObject extends ffi.Struct { - @ffi.Int32() - external int type; - - external UnnamedUnion6 value; -} - -final class UnnamedUnion6 extends ffi.Union { - @ffi.Bool() - external bool as_bool; - - @ffi.Int32() - external int as_int32; - - @ffi.Int64() - external int as_int64; - - @ffi.Double() - external double as_double; - - external ffi.Pointer as_string; - - external UnnamedStruct5 as_send_port; - - external UnnamedStruct6 as_capability; - - external UnnamedStruct7 as_array; +/// NSDateInterval +class NSDateInterval extends objc.ObjCObjectBase { + NSDateInterval._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); - external UnnamedStruct8 as_typed_data; + /// Constructs a [NSDateInterval] that points to the same underlying object as [other]. + NSDateInterval.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - external UnnamedStruct9 as_external_typed_data; + /// Constructs a [NSDateInterval] that wraps the given raw object pointer. + NSDateInterval.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - external UnnamedStruct10 as_native_pointer; + /// Returns whether [obj] is an instance of [NSDateInterval]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSDateInterval); + } } -final class UnnamedStruct5 extends ffi.Struct { - @Dart_Port() - external int id; - - @Dart_Port() - external int origin_id; -} +late final _class_NSDateInterval = objc.getClass("NSDateInterval"); +late final _sel_taskInterval = objc.registerName("taskInterval"); +late final _sel_redirectCount = objc.registerName("redirectCount"); +late final _sel_URLSession_task_didFinishCollectingMetrics_ = + objc.registerName("URLSession:task:didFinishCollectingMetrics:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask, NSURLSessionTaskMetrics)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask, NSURLSessionTaskMetrics)>(pointer, + retain: retain, release: release); -final class UnnamedStruct6 extends ffi.Struct { - @ffi.Int64() - external int id; -} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask, NSURLSessionTaskMetrics)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask, NSURLSessionTaskMetrics)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_fnPtrCallable, ptr.cast()), + retain: false, + release: true); -final class UnnamedStruct7 extends ffi.Struct { - @ffi.IntPtr() - external int length; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionTask.castFromPointer(arg2, retain: true, release: true), + NSURLSessionTaskMetrics.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); - external ffi.Pointer> values; + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + NSURLSessionTaskMetrics)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + NSURLSessionTaskMetrics) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionTask.castFromPointer(arg2, + retain: false, release: true), + NSURLSessionTaskMetrics.castFromPointer(arg3, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1a6kixf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + NSURLSessionTaskMetrics)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + NSURLSessionTaskMetrics)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); } -final class UnnamedStruct8 extends ffi.Struct { - @ffi.Int32() - external int type; - - /// in elements, not bytes - @ffi.IntPtr() - external int length; +late final _sel_URLSession_task_didCompleteWithError_ = + objc.registerName("URLSession:task:didCompleteWithError:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, objc.NSError?)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask, objc.NSError?)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionTask, + objc.NSError?)>(pointer, retain: retain, release: release); - external ffi.Pointer values; -} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask, objc.NSError?)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionTask, objc.NSError?)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); -final class UnnamedStruct9 extends ffi.Struct { - @ffi.Int32() - external int type; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionTask, objc.NSError?)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, objc.NSError?) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionTask, objc.NSError?)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionTask.castFromPointer(arg2, retain: true, release: true), + arg3.address == 0 ? null : objc.NSError.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); - /// in elements, not bytes - @ffi.IntPtr() - external int length; + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + objc.NSError?)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + objc.NSError?) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionTask.castFromPointer(arg2, + retain: false, release: true), + arg3.address == 0 + ? null + : objc.NSError.castFromPointer(arg3, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1a6kixf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + objc.NSError?)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionTask, objc.NSError?)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, + objc.NSError?)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3?.ref.pointer ?? ffi.nullptr); +} + +/// Messages related to the operation of a task that delivers data +/// directly to the delegate. +abstract final class NSURLSessionDataDelegate { + /// Builds an object that implements the NSURLSessionDataDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)? + URLSession_dataTask_didReceiveResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)? + URLSession_dataTask_didBecomeDownloadTask_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)? + URLSession_dataTask_didBecomeStreamTask_, + void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)? + URLSession_dataTask_didReceiveData_, + void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock)? + URLSession_dataTask_willCacheResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionDataDelegate + .URLSession_dataTask_didReceiveResponse_completionHandler_ + .implement( + builder, URLSession_dataTask_didReceiveResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeDownloadTask_ + .implement(builder, URLSession_dataTask_didBecomeDownloadTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeStreamTask_.implement( + builder, URLSession_dataTask_didBecomeStreamTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_.implement( + builder, URLSession_dataTask_didReceiveData_); + NSURLSessionDataDelegate + .URLSession_dataTask_willCacheResponse_completionHandler_ + .implement( + builder, URLSession_dataTask_willCacheResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionDataDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDataDelegate.URLSession_taskIsWaitingForConnectivity_.implement( + builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDataDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionDataDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDataDelegate.URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDataDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_.implement( + builder, URLSession_task_didCompleteWithError_); + NSURLSessionDataDelegate.URLSession_didBecomeInvalidWithError_.implement( + builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDataDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionDataDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)? + URLSession_dataTask_didReceiveResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)? + URLSession_dataTask_didBecomeDownloadTask_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)? + URLSession_dataTask_didBecomeStreamTask_, + void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)? + URLSession_dataTask_didReceiveData_, + void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock)? + URLSession_dataTask_willCacheResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionDataDelegate + .URLSession_dataTask_didReceiveResponse_completionHandler_ + .implement( + builder, URLSession_dataTask_didReceiveResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeDownloadTask_ + .implement(builder, URLSession_dataTask_didBecomeDownloadTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeStreamTask_.implement( + builder, URLSession_dataTask_didBecomeStreamTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_.implement( + builder, URLSession_dataTask_didReceiveData_); + NSURLSessionDataDelegate + .URLSession_dataTask_willCacheResponse_completionHandler_ + .implement( + builder, URLSession_dataTask_willCacheResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionDataDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDataDelegate.URLSession_taskIsWaitingForConnectivity_.implement( + builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDataDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionDataDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDataDelegate.URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDataDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_.implement( + builder, URLSession_task_didCompleteWithError_); + NSURLSessionDataDelegate.URLSession_didBecomeInvalidWithError_.implement( + builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDataDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Builds an object that implements the NSURLSessionDataDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)? + URLSession_dataTask_didReceiveResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)? + URLSession_dataTask_didBecomeDownloadTask_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)? + URLSession_dataTask_didBecomeStreamTask_, + void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)? + URLSession_dataTask_didReceiveData_, + void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock)? + URLSession_dataTask_willCacheResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionDataDelegate + .URLSession_dataTask_didReceiveResponse_completionHandler_ + .implementAsListener( + builder, URLSession_dataTask_didReceiveResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeDownloadTask_ + .implementAsListener( + builder, URLSession_dataTask_didBecomeDownloadTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeStreamTask_ + .implementAsListener(builder, URLSession_dataTask_didBecomeStreamTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_ + .implementAsListener(builder, URLSession_dataTask_didReceiveData_); + NSURLSessionDataDelegate + .URLSession_dataTask_willCacheResponse_completionHandler_ + .implementAsListener( + builder, URLSession_dataTask_willCacheResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionDataDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDataDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDataDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionDataDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDataDelegate.URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDataDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionDataDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDataDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionDataDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)? + URLSession_dataTask_didReceiveResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)? + URLSession_dataTask_didBecomeDownloadTask_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)? + URLSession_dataTask_didBecomeStreamTask_, + void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)? + URLSession_dataTask_didReceiveData_, + void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock)? + URLSession_dataTask_willCacheResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionDataDelegate + .URLSession_dataTask_didReceiveResponse_completionHandler_ + .implementAsListener( + builder, URLSession_dataTask_didReceiveResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeDownloadTask_ + .implementAsListener( + builder, URLSession_dataTask_didBecomeDownloadTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeStreamTask_ + .implementAsListener(builder, URLSession_dataTask_didBecomeStreamTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_ + .implementAsListener(builder, URLSession_dataTask_didReceiveData_); + NSURLSessionDataDelegate + .URLSession_dataTask_willCacheResponse_completionHandler_ + .implementAsListener( + builder, URLSession_dataTask_willCacheResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionDataDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDataDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDataDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionDataDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDataDelegate.URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDataDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionDataDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDataDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// The task has received a response and no further messages will be + /// received until the completion block is called. The disposition + /// allows you to cancel a request or to turn a data task into a + /// download task. This delegate message is optional - if you do not + /// implement it, you can get the response as a property of the task. + /// + /// This method will not be called for background upload tasks (which cannot be converted to download tasks). + static final URLSession_dataTask_didReceiveResponse_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, + objc.ObjCBlock)>( + _sel_URLSession_dataTask_didReceiveResponse_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_didReceiveResponse_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionDataTask arg2, + NSURLResponse arg3, + objc.ObjCBlock arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionDataTask arg2, + NSURLResponse arg3, + objc.ObjCBlock arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Notification that a data task has become a download task. No + /// future messages will be sent to the data task. + static final URLSession_dataTask_didBecomeDownloadTask_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)>( + _sel_URLSession_dataTask_didBecomeDownloadTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_didBecomeDownloadTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDataTask arg2, NSURLSessionDownloadTask arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDataTask arg2, NSURLSessionDownloadTask arg3) => + func(arg1, arg2, arg3)), + ); + + /// Notification that a data task has become a bidirectional stream + /// task. No future messages will be sent to the data task. The newly + /// created streamTask will carry the original request and response as + /// properties. + /// + /// For requests that were pipelined, the stream object will only allow + /// reading, and the object will immediately issue a + /// -URLSession:writeClosedForStream:. Pipelining can be disabled for + /// all requests in a session, or by the NSURLRequest + /// HTTPShouldUsePipelining property. + /// + /// The underlying connection is no longer considered part of the HTTP + /// connection cache and won't count against the total number of + /// connections per host. + static final URLSession_dataTask_didBecomeStreamTask_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)>( + _sel_URLSession_dataTask_didBecomeStreamTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_didBecomeStreamTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDataTask arg2, NSURLSessionStreamTask arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDataTask arg2, NSURLSessionStreamTask arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent when data is available for the delegate to consume. As the + /// data may be discontiguous, you should use + /// [NSData enumerateByteRangesUsingBlock:] to access it. + static final URLSession_dataTask_didReceiveData_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)>( + _sel_URLSession_dataTask_didReceiveData_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_didReceiveData_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDataTask, objc.NSData) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDataTask arg2, objc.NSData arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionDataTask, objc.NSData) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDataTask arg2, objc.NSData arg3) => + func(arg1, arg2, arg3)), + ); + + /// Invoke the completion routine with a valid NSCachedURLResponse to + /// allow the resulting data to be cached, or pass nil to prevent + /// caching. Note that there is no guarantee that caching will be + /// attempted for a given resource, and you should not rely on this + /// message to receive the resource data. + static final URLSession_dataTask_willCacheResponse_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock)>( + _sel_URLSession_dataTask_willCacheResponse_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_willCacheResponse_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionDataTask arg2, + NSCachedURLResponse arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionDataTask arg2, + NSCachedURLResponse arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Notification that a task has been created. This method is the first message + /// a task sends, providing a place to configure the task before it is resumed. + /// + /// This delegate callback is *NOT* dispatched to the delegate queue. It is + /// invoked synchronously before the task creation method returns. + static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _sel_URLSession_didCreateTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_didCreateTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// Sent when the system is ready to begin work for a task with a delayed start + /// time set (using the earliestBeginDate property). The completionHandler must + /// be invoked in order for loading to proceed. The disposition provided to the + /// completion handler continues the load with the original request provided to + /// the task, replaces the request with the specified task, or cancels the task. + /// If this delegate is not implemented, loading will proceed with the original + /// request. + /// + /// Recommendation: only implement this delegate if tasks that have the + /// earliestBeginDate property set may become stale and require alteration prior + /// to starting the network load. + /// + /// If a new request is specified, the allowsExpensiveNetworkAccess, + /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties + /// from the new request will not be used; the properties from the + /// original request will continue to be used. + /// + /// Canceling the task is equivalent to calling the task's cancel method; the + /// URLSession:task:didCompleteWithError: task delegate will be called with error + /// NSURLErrorCancelled. + static final URLSession_task_willBeginDelayedRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)>( + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent when a task cannot start the network loading process because the current + /// network connectivity is not available or sufficient for the task's request. + /// + /// This delegate will be called at most one time per task, and is only called if + /// the waitsForConnectivity property in the NSURLSessionConfiguration has been + /// set to YES. + /// + /// This delegate callback will never be called for background sessions, because + /// the waitForConnectivity property is ignored by those sessions. + static final URLSession_taskIsWaitingForConnectivity_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _sel_URLSession_taskIsWaitingForConnectivity_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_taskIsWaitingForConnectivity_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// An HTTP request is attempting to perform a redirection to a different + /// URL. You must invoke the completion routine to allow the + /// redirection, allow the redirection with a modified request, or + /// pass nil to the completionHandler to cause the body of the redirection + /// response to be delivered as the payload of this request. The default + /// is to follow redirections. + /// + /// For tasks in background sessions, redirections will always be followed and this method will not be called. + static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)>( + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// The task has received a request specific authentication challenge. + /// If this delegate is not implemented, the session specific authentication challenge + /// will *NOT* be called and the behavior will be the same as using the default handling + /// disposition. + static final URLSession_task_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent if a task requires a new, unopened body stream. This may be + /// necessary when authentication has failed for any request that + /// involves a body stream. + static final URLSession_task_needNewBodyStream_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)>( + _sel_URLSession_task_needNewBodyStream_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_needNewBodyStream_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + ); + + /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be + /// necessary when resuming a failed upload task. + /// + /// - Parameter session: The session containing the task that needs a new body stream from the given offset. + /// - Parameter task: The task that needs a new body stream. + /// - Parameter offset: The starting offset required for the body stream. + /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. + static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock)>( + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent periodically to notify the delegate of upload progress. This + /// information is also available as properties of the task. + static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, int, int)>( + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// Sent for each informational response received except 101 switching protocols. + static final URLSession_task_didReceiveInformationalResponse_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( + _sel_URLSession_task_didReceiveInformationalResponse_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didReceiveInformationalResponse_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent when complete statistics information has been collected for the task. + static final URLSession_task_didFinishCollectingMetrics_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( + _sel_URLSession_task_didFinishCollectingMetrics_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didFinishCollectingMetrics_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent as the last message related to a specific task. Error may be + /// nil, which implies that no error occurred and this task is complete. + static final URLSession_task_didCompleteWithError_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( + _sel_URLSession_task_didCompleteWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didCompleteWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + ); + + /// The last message a session receives. A session will only become + /// invalid because of a systemic error or when it has been + /// explicitly invalidated, in which case the error parameter will be nil. + static final URLSession_didBecomeInvalidWithError_ = objc + .ObjCProtocolListenableMethod( + _sel_URLSession_didBecomeInvalidWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_didBecomeInvalidWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + ); + + /// If implemented, when a connection level authentication challenge + /// has occurred, this delegate will be given the opportunity to + /// provide authentication credentials to the underlying + /// connection. Some types of authentication will apply to more than + /// one request on a given connection to a server (SSL Server Trust + /// challenges). If this delegate message is not implemented, the + /// behavior will be to use the default handling, which may involve user + /// interaction. + static final URLSession_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _sel_URLSession_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + ); + + /// If an application has received an + /// -application:handleEventsForBackgroundURLSession:completionHandler: + /// message, the session delegate will receive this message to indicate + /// that all messages previously enqueued for this session have been + /// delivered. At this time it is safe to invoke the previously stored + /// completion handler, or to begin any internal updates that will + /// result in invoking the completion handler. + static final URLSessionDidFinishEventsForBackgroundURLSession_ = + objc.ObjCProtocolListenableMethod( + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + ); +} + +late final _protocol_NSURLSessionDataDelegate = + objc.getProtocol("NSURLSessionDataDelegate"); +void _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_fnPtrTrampoline( + ffi.Pointer block, int arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, NSInteger)>( + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_closureTrampoline( + ffi.Pointer block, int arg0) => + (objc.getBlockClosure(block) as void Function(int))(arg0); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, NSInteger)>( + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_listenerTrampoline( + ffi.Pointer block, int arg0) { + (objc.getBlockClosure(block) as void Function(int))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, NSInteger)> + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, NSInteger)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURLSessionResponseDisposition { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - external ffi.Pointer data; + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - external ffi.Pointer peer; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(NSURLSessionResponseDisposition) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_closureCallable, + (int arg0) => + fn(NSURLSessionResponseDisposition.fromValue(arg0))), + retain: false, + release: true); - external Dart_HandleFinalizer callback; + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(NSURLSessionResponseDisposition) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_listenerCallable + .nativeFunction + .cast(), + (int arg0) => fn(NSURLSessionResponseDisposition.fromValue(arg0))); + final wrapper = _wrapListenerBlock_ci81hw(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } } -final class UnnamedStruct10 extends ffi.Struct { - @ffi.IntPtr() - external int ptr; - - @ffi.IntPtr() - external int size; - - external Dart_HandleFinalizer callback; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_CallExtension + on objc.ObjCBlock { + void call(NSURLSessionResponseDisposition arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, NSInteger arg0)>>() + .asFunction, int)>()( + ref.pointer, arg0.value); } -typedef Dart_CObject = _Dart_CObject; - -/// A native message handler. -/// -/// This handler is associated with a native port by calling -/// Dart_NewNativePort. -/// -/// The message received is decoded into the message structure. The -/// lifetime of the message data is controlled by the caller. All the -/// data references from the message are allocated by the caller and -/// will be reclaimed when returning to it. -typedef Dart_NativeMessageHandler - = ffi.Pointer>; -typedef Dart_NativeMessageHandlerFunction = ffi.Void Function( - Dart_Port dest_port_id, ffi.Pointer message); -typedef DartDart_NativeMessageHandlerFunction = void Function( - DartDart_Port dest_port_id, ffi.Pointer message); -typedef Dart_PostCObject_Type - = ffi.Pointer>; -typedef Dart_PostCObject_TypeFunction = ffi.Bool Function( - Dart_Port_DL port_id, ffi.Pointer message); -typedef DartDart_PostCObject_TypeFunction = bool Function( - DartDart_Port_DL port_id, ffi.Pointer message); - -/// ============================================================================ -/// IMPORTANT! Never update these signatures without properly updating -/// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. -/// -/// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types -/// to trigger compile-time errors if the sybols in those files are updated -/// without updating these. -/// -/// Function return and argument types, and typedefs are carbon copied. Structs -/// are typechecked nominally in C/C++, so they are not copied, instead a -/// comment is added to their definition. -typedef Dart_Port_DL = ffi.Int64; -typedef DartDart_Port_DL = int; -typedef Dart_PostInteger_Type - = ffi.Pointer>; -typedef Dart_PostInteger_TypeFunction = ffi.Bool Function( - Dart_Port_DL port_id, ffi.Int64 message); -typedef DartDart_PostInteger_TypeFunction = bool Function( - DartDart_Port_DL port_id, int message); -typedef Dart_NewNativePort_Type - = ffi.Pointer>; -typedef Dart_NewNativePort_TypeFunction = Dart_Port_DL Function( - ffi.Pointer name, - Dart_NativeMessageHandler_DL handler, - ffi.Bool handle_concurrently); -typedef DartDart_NewNativePort_TypeFunction = DartDart_Port_DL Function( - ffi.Pointer name, - Dart_NativeMessageHandler_DL handler, - bool handle_concurrently); -typedef Dart_NativeMessageHandler_DL - = ffi.Pointer>; -typedef Dart_NativeMessageHandler_DLFunction = ffi.Void Function( - Dart_Port_DL dest_port_id, ffi.Pointer message); -typedef DartDart_NativeMessageHandler_DLFunction = void Function( - DartDart_Port_DL dest_port_id, ffi.Pointer message); -typedef Dart_CloseNativePort_Type - = ffi.Pointer>; -typedef Dart_CloseNativePort_TypeFunction = ffi.Bool Function( - Dart_Port_DL native_port_id); -typedef DartDart_CloseNativePort_TypeFunction = bool Function( - DartDart_Port_DL native_port_id); -typedef Dart_IsError_Type - = ffi.Pointer>; -typedef Dart_IsError_TypeFunction = ffi.Bool Function(ffi.Handle handle); -typedef DartDart_IsError_TypeFunction = bool Function(Object handle); -typedef Dart_IsApiError_Type - = ffi.Pointer>; -typedef Dart_IsApiError_TypeFunction = ffi.Bool Function(ffi.Handle handle); -typedef DartDart_IsApiError_TypeFunction = bool Function(Object handle); -typedef Dart_IsUnhandledExceptionError_Type = ffi - .Pointer>; -typedef Dart_IsUnhandledExceptionError_TypeFunction = ffi.Bool Function( - ffi.Handle handle); -typedef DartDart_IsUnhandledExceptionError_TypeFunction = bool Function( - Object handle); -typedef Dart_IsCompilationError_Type - = ffi.Pointer>; -typedef Dart_IsCompilationError_TypeFunction = ffi.Bool Function( - ffi.Handle handle); -typedef DartDart_IsCompilationError_TypeFunction = bool Function(Object handle); -typedef Dart_IsFatalError_Type - = ffi.Pointer>; -typedef Dart_IsFatalError_TypeFunction = ffi.Bool Function(ffi.Handle handle); -typedef DartDart_IsFatalError_TypeFunction = bool Function(Object handle); -typedef Dart_GetError_Type - = ffi.Pointer>; -typedef Dart_GetError_TypeFunction = ffi.Pointer Function( - ffi.Handle handle); -typedef DartDart_GetError_TypeFunction = ffi.Pointer Function( - Object handle); -typedef Dart_ErrorHasException_Type - = ffi.Pointer>; -typedef Dart_ErrorHasException_TypeFunction = ffi.Bool Function( - ffi.Handle handle); -typedef DartDart_ErrorHasException_TypeFunction = bool Function(Object handle); -typedef Dart_ErrorGetException_Type - = ffi.Pointer>; -typedef Dart_ErrorGetException_TypeFunction = ffi.Handle Function( - ffi.Handle handle); -typedef DartDart_ErrorGetException_TypeFunction = Object Function( - Object handle); -typedef Dart_ErrorGetStackTrace_Type - = ffi.Pointer>; -typedef Dart_ErrorGetStackTrace_TypeFunction = ffi.Handle Function( - ffi.Handle handle); -typedef DartDart_ErrorGetStackTrace_TypeFunction = Object Function( - Object handle); -typedef Dart_NewApiError_Type - = ffi.Pointer>; -typedef Dart_NewApiError_TypeFunction = ffi.Handle Function( - ffi.Pointer error); -typedef DartDart_NewApiError_TypeFunction = Object Function( - ffi.Pointer error); -typedef Dart_NewCompilationError_Type - = ffi.Pointer>; -typedef Dart_NewCompilationError_TypeFunction = ffi.Handle Function( - ffi.Pointer error); -typedef DartDart_NewCompilationError_TypeFunction = Object Function( - ffi.Pointer error); -typedef Dart_NewUnhandledExceptionError_Type = ffi - .Pointer>; -typedef Dart_NewUnhandledExceptionError_TypeFunction = ffi.Handle Function( - ffi.Handle exception); -typedef DartDart_NewUnhandledExceptionError_TypeFunction = Object Function( - Object exception); -typedef Dart_PropagateError_Type - = ffi.Pointer>; -typedef Dart_PropagateError_TypeFunction = ffi.Void Function(ffi.Handle handle); -typedef DartDart_PropagateError_TypeFunction = void Function(Object handle); -typedef Dart_HandleFromPersistent_Type - = ffi.Pointer>; -typedef Dart_HandleFromPersistent_TypeFunction = ffi.Handle Function( - ffi.Handle object); -typedef DartDart_HandleFromPersistent_TypeFunction = Object Function( - Object object); -typedef Dart_HandleFromWeakPersistent_Type = ffi - .Pointer>; -typedef Dart_HandleFromWeakPersistent_TypeFunction = ffi.Handle Function( - Dart_WeakPersistentHandle object); -typedef DartDart_HandleFromWeakPersistent_TypeFunction = Object Function( - Dart_WeakPersistentHandle object); -typedef Dart_NewPersistentHandle_Type - = ffi.Pointer>; -typedef Dart_NewPersistentHandle_TypeFunction = ffi.Handle Function( - ffi.Handle object); -typedef DartDart_NewPersistentHandle_TypeFunction = Object Function( - Object object); -typedef Dart_SetPersistentHandle_Type - = ffi.Pointer>; -typedef Dart_SetPersistentHandle_TypeFunction = ffi.Void Function( - ffi.Handle obj1, ffi.Handle obj2); -typedef DartDart_SetPersistentHandle_TypeFunction = void Function( - Object obj1, Object obj2); -typedef Dart_DeletePersistentHandle_Type - = ffi.Pointer>; -typedef Dart_DeletePersistentHandle_TypeFunction = ffi.Void Function( - ffi.Handle object); -typedef DartDart_DeletePersistentHandle_TypeFunction = void Function( - Object object); -typedef Dart_NewWeakPersistentHandle_Type = ffi - .Pointer>; -typedef Dart_NewWeakPersistentHandle_TypeFunction - = Dart_WeakPersistentHandle Function( - ffi.Handle object, - ffi.Pointer peer, - ffi.IntPtr external_allocation_size, - Dart_HandleFinalizer callback); -typedef DartDart_NewWeakPersistentHandle_TypeFunction - = Dart_WeakPersistentHandle Function( - Object object, - ffi.Pointer peer, - int external_allocation_size, - Dart_HandleFinalizer callback); -typedef Dart_DeleteWeakPersistentHandle_Type = ffi - .Pointer>; -typedef Dart_DeleteWeakPersistentHandle_TypeFunction = ffi.Void Function( - Dart_WeakPersistentHandle object); -typedef DartDart_DeleteWeakPersistentHandle_TypeFunction = void Function( - Dart_WeakPersistentHandle object); -typedef Dart_UpdateExternalSize_Type - = ffi.Pointer>; -typedef Dart_UpdateExternalSize_TypeFunction = ffi.Void Function( - Dart_WeakPersistentHandle object, ffi.IntPtr external_allocation_size); -typedef DartDart_UpdateExternalSize_TypeFunction = void Function( - Dart_WeakPersistentHandle object, int external_allocation_size); -typedef Dart_NewFinalizableHandle_Type - = ffi.Pointer>; -typedef Dart_NewFinalizableHandle_TypeFunction - = Dart_FinalizableHandle Function( - ffi.Handle object, - ffi.Pointer peer, - ffi.IntPtr external_allocation_size, - Dart_HandleFinalizer callback); -typedef DartDart_NewFinalizableHandle_TypeFunction - = Dart_FinalizableHandle Function(Object object, ffi.Pointer peer, - int external_allocation_size, Dart_HandleFinalizer callback); -typedef Dart_DeleteFinalizableHandle_Type = ffi - .Pointer>; -typedef Dart_DeleteFinalizableHandle_TypeFunction = ffi.Void Function( - Dart_FinalizableHandle object, ffi.Handle strong_ref_to_object); -typedef DartDart_DeleteFinalizableHandle_TypeFunction = void Function( - Dart_FinalizableHandle object, Object strong_ref_to_object); -typedef Dart_UpdateFinalizableExternalSize_Type = ffi.Pointer< - ffi.NativeFunction>; -typedef Dart_UpdateFinalizableExternalSize_TypeFunction = ffi.Void Function( - Dart_FinalizableHandle object, - ffi.Handle strong_ref_to_object, - ffi.IntPtr external_allocation_size); -typedef DartDart_UpdateFinalizableExternalSize_TypeFunction = void Function( - Dart_FinalizableHandle object, - Object strong_ref_to_object, - int external_allocation_size); -typedef Dart_Post_Type - = ffi.Pointer>; -typedef Dart_Post_TypeFunction = ffi.Bool Function( - Dart_Port_DL port_id, ffi.Handle object); -typedef DartDart_Post_TypeFunction = bool Function( - DartDart_Port_DL port_id, Object object); -typedef Dart_NewSendPort_Type - = ffi.Pointer>; -typedef Dart_NewSendPort_TypeFunction = ffi.Handle Function( - Dart_Port_DL port_id); -typedef DartDart_NewSendPort_TypeFunction = Object Function( - DartDart_Port_DL port_id); -typedef Dart_SendPortGetId_Type - = ffi.Pointer>; -typedef Dart_SendPortGetId_TypeFunction = ffi.Handle Function( - ffi.Handle port, ffi.Pointer port_id); -typedef DartDart_SendPortGetId_TypeFunction = Object Function( - Object port, ffi.Pointer port_id); -typedef Dart_EnterScope_Type - = ffi.Pointer>; -typedef Dart_EnterScope_TypeFunction = ffi.Void Function(); -typedef DartDart_EnterScope_TypeFunction = void Function(); -typedef Dart_ExitScope_Type - = ffi.Pointer>; -typedef Dart_ExitScope_TypeFunction = ffi.Void Function(); -typedef DartDart_ExitScope_TypeFunction = void Function(); - -/// The type of message being sent to a Dart port. See CUPHTTPClientDelegate. -abstract class MessageType { - static const int ResponseMessage = 0; - static const int DataMessage = 1; - static const int CompletedMessage = 2; - static const int RedirectMessage = 3; - static const int FinishedDownloading = 4; - static const int WebSocketOpened = 5; - static const int WebSocketClosed = 6; -} - -/// The configuration associated with a NSURLSessionTask. -/// See CUPHTTPClientDelegate. -class CUPHTTPTaskConfiguration extends NSObject { - CUPHTTPTaskConfiguration._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [CUPHTTPTaskConfiguration] that points to the same underlying object as [other]. - static CUPHTTPTaskConfiguration castFrom(T other) { - return CUPHTTPTaskConfiguration._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [CUPHTTPTaskConfiguration] that wraps the given raw object pointer. - static CUPHTTPTaskConfiguration castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPTaskConfiguration._(other, lib, - retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [CUPHTTPTaskConfiguration]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPTaskConfiguration1); - } - - NSObject initWithPort_(DartDart_Port sendPort) { - final _ret = - _lib._objc_msgSend_533(_id, _lib._sel_initWithPort_1, sendPort); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - DartDart_Port get sendPort { - return _lib._objc_msgSend_383(_id, _lib._sel_sendPort1); - } - - @override - CUPHTTPTaskConfiguration init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return CUPHTTPTaskConfiguration._(_ret, _lib, retain: true, release: true); - } - - static CUPHTTPTaskConfiguration new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_new1); - return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); - } - - static CUPHTTPTaskConfiguration allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_allocWithZone_1, zone); - return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); - } +late final _sel_URLSession_dataTask_didReceiveResponse_completionHandler_ = objc + .registerName("URLSession:dataTask:didReceiveResponse:completionHandler:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)>(pointer, retain: retain, release: release); - static CUPHTTPTaskConfiguration alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPTaskConfiguration1, _lib._sel_alloc1); - return CUPHTTPTaskConfiguration._(_ret, _lib, retain: false, release: true); - } -} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_fnPtrCallable, ptr.cast()), + retain: false, + release: true); -/// A delegate for NSURLSession that forwards events for registered -/// NSURLSessionTasks and forwards them to a port for consumption in Dart. -/// -/// The messages sent to the port are contained in a List with one of 3 -/// possible formats: -/// -/// 1. When the delegate receives a HTTP redirect response: -/// [MessageType::RedirectMessage, ] -/// -/// 2. When the delegate receives a HTTP response: -/// [MessageType::ResponseMessage, ] -/// -/// 3. When the delegate receives some HTTP data: -/// [MessageType::DataMessage, ] -/// -/// 4. When the delegate is informed that the response is complete: -/// [MessageType::CompletedMessage, ] -class CUPHTTPClientDelegate extends NSObject { - CUPHTTPClientDelegate._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)> + fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), + NSURLResponse.castFromPointer(arg3, retain: true, release: true), + ObjCBlock_ffiVoid_NSURLSessionResponseDisposition.castFromPointer(arg4, retain: true, release: true))), + retain: false, + release: true); - /// Returns a [CUPHTTPClientDelegate] that points to the same underlying object as [other]. - static CUPHTTPClientDelegate castFrom(T other) { - return CUPHTTPClientDelegate._(other._id, other._lib, - retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, + NSURLResponse, objc.ObjCBlock) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDataTask.castFromPointer(arg2, + retain: false, release: true), + NSURLResponse.castFromPointer(arg3, + retain: false, release: true), + ObjCBlock_ffiVoid_NSURLSessionResponseDisposition + .castFromPointer(arg4, retain: false, release: true))); + final wrapper = _wrapListenerBlock_1nnj9ov(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)>(wrapper, + retain: false, release: true); } +} - /// Returns a [CUPHTTPClientDelegate] that wraps the given raw object pointer. - static CUPHTTPClientDelegate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPClientDelegate._(other, lib, - retain: retain, release: release); - } +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLSessionDataTask arg2, + NSURLResponse arg3, + objc.ObjCBlock arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0, + arg1.ref.pointer, + arg2.ref.pointer, + arg3.ref.pointer, + arg4.ref.pointer); +} + +late final _sel_URLSession_dataTask_didBecomeDownloadTask_ = + objc.registerName("URLSession:dataTask:didBecomeDownloadTask:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionDownloadTask)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionDownloadTask)>(pointer, + retain: retain, release: release); - /// Returns whether [obj] is an instance of [CUPHTTPClientDelegate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPClientDelegate1); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionDownloadTask)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionDownloadTask)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Instruct the delegate to forward events for the given task to the port - /// specified in the configuration. - void registerTask_withConfiguration_( - NSURLSessionTask task, CUPHTTPTaskConfiguration config) { - _lib._objc_msgSend_534( - _id, _lib._sel_registerTask_withConfiguration_1, task._id, config._id); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), + NSURLSessionDownloadTask.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); - @override - CUPHTTPClientDelegate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return CUPHTTPClientDelegate._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionDownloadTask)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, + NSURLSessionDownloadTask) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDataTask.castFromPointer(arg2, + retain: false, release: true), + NSURLSessionDownloadTask.castFromPointer(arg3, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1a6kixf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLSessionDownloadTask)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionDownloadTask)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionDataTask arg2, NSURLSessionDownloadTask arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); +} - static CUPHTTPClientDelegate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPClientDelegate1, _lib._sel_new1); - return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); - } +late final _sel_URLSession_dataTask_didBecomeStreamTask_ = + objc.registerName("URLSession:dataTask:didBecomeStreamTask:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionStreamTask)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionStreamTask)>(pointer, + retain: retain, release: release); - static CUPHTTPClientDelegate allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_CUPHTTPClientDelegate1, _lib._sel_allocWithZone_1, zone); - return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionStreamTask)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionStreamTask)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static CUPHTTPClientDelegate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPClientDelegate1, _lib._sel_alloc1); - return CUPHTTPClientDelegate._(_ret, _lib, retain: false, release: true); - } -} + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), + NSURLSessionStreamTask.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); -/// An object used to communicate redirect information to Dart code. -/// -/// The flow is: -/// 1. CUPHTTPClientDelegate receives a message from the URL Loading System. -/// 2. CUPHTTPClientDelegate creates a new CUPHTTPForwardedDelegate subclass. -/// 3. CUPHTTPClientDelegate sends the CUPHTTPForwardedDelegate to the -/// configured Dart_Port. -/// 4. CUPHTTPClientDelegate waits on CUPHTTPForwardedDelegate.lock -/// 5. When the Dart code is done process the message received on the port, -/// it calls [CUPHTTPForwardedDelegate finish*], which releases the lock. -/// 6. CUPHTTPClientDelegate continues running. -class CUPHTTPForwardedDelegate extends NSObject { - CUPHTTPForwardedDelegate._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionStreamTask)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, + NSURLSessionStreamTask) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDataTask.castFromPointer(arg2, + retain: false, release: true), + NSURLSessionStreamTask.castFromPointer(arg3, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1a6kixf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLSessionStreamTask)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionStreamTask)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionDataTask arg2, NSURLSessionStreamTask arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); +} - /// Returns a [CUPHTTPForwardedDelegate] that points to the same underlying object as [other]. - static CUPHTTPForwardedDelegate castFrom(T other) { - return CUPHTTPForwardedDelegate._(other._id, other._lib, - retain: true, release: true); - } +late final _sel_URLSession_dataTask_didReceiveData_ = + objc.registerName("URLSession:dataTask:didReceiveData:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, objc.NSData)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, objc.NSData)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + objc.NSData)>(pointer, retain: retain, release: release); - /// Returns a [CUPHTTPForwardedDelegate] that wraps the given raw object pointer. - static CUPHTTPForwardedDelegate castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedDelegate._(other, lib, - retain: retain, release: release); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, objc.NSData)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, objc.NSData)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Returns whether [obj] is an instance of [CUPHTTPForwardedDelegate]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedDelegate1); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, objc.NSData)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, objc.NSData) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, objc.NSData)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), + objc.NSData.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); - NSObject initWithSession_task_(NSURLSession session, NSURLSessionTask task) { - final _ret = _lib._objc_msgSend_535( - _id, _lib._sel_initWithSession_task_1, session._id, task._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, objc.NSData)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, + objc.NSData) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDataTask.castFromPointer(arg2, + retain: false, release: true), + objc.NSData.castFromPointer(arg3, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1a6kixf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + objc.NSData)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, objc.NSData)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, objc.NSData)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionDataTask arg2, objc.NSData arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); +} - /// Indicates that the task should continue executing using the given request. - void finish() { - _lib._objc_msgSend_1(_id, _lib._sel_finish1); - } +late final _sel_URLSession_dataTask_willCacheResponse_completionHandler_ = objc + .registerName("URLSession:dataTask:willCacheResponse:completionHandler:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)>(pointer, retain: retain, release: release); - NSURLSession get session { - final _ret = _lib._objc_msgSend_438(_id, _lib._sel_session1); - return NSURLSession._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - NSURLSessionTask get task { - final _ret = _lib._objc_msgSend_536(_id, _lib._sel_task1); - return NSURLSessionTask._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock)> + fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), + NSCachedURLResponse.castFromPointer(arg3, retain: true, release: true), + ObjCBlock_ffiVoid_NSCachedURLResponse.castFromPointer(arg4, retain: true, release: true))), + retain: false, + release: true); - /// This property is meant to be used only by CUPHTTPClientDelegate. - NSLock get lock { - final _ret = _lib._objc_msgSend_537(_id, _lib._sel_lock1); - return NSLock._(_ret, _lib, retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)> listener( + void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDataTask.castFromPointer(arg2, + retain: false, release: true), + NSCachedURLResponse.castFromPointer(arg3, + retain: false, release: true), + ObjCBlock_ffiVoid_NSCachedURLResponse.castFromPointer(arg4, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1nnj9ov(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)>( + wrapper, + retain: false, + release: true); } +} - @override - CUPHTTPForwardedDelegate init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return CUPHTTPForwardedDelegate._(_ret, _lib, retain: true, release: true); - } +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLSessionDataTask arg2, + NSCachedURLResponse arg3, + objc.ObjCBlock arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0, + arg1.ref.pointer, + arg2.ref.pointer, + arg3.ref.pointer, + arg4.ref.pointer); +} + +/// Messages related to the operation of a task that writes data to a +/// file and notifies the delegate upon completion. +abstract final class NSURLSessionDownloadDelegate { + /// Builds an object that implements the NSURLSessionDownloadDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {required void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) + URLSession_downloadTask_didFinishDownloadingToURL_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)? + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int)? + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didFinishDownloadingToURL_ + .implement(builder, URLSession_downloadTask_didFinishDownloadingToURL_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ + .implement(builder, + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ + .implement(builder, + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_); + NSURLSessionDownloadDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionDownloadDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_taskIsWaitingForConnectivity_ + .implement(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDownloadDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionDownloadDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDownloadDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDownloadDelegate.URLSession_task_didCompleteWithError_ + .implement(builder, URLSession_task_didCompleteWithError_); + NSURLSessionDownloadDelegate.URLSession_didBecomeInvalidWithError_ + .implement(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDownloadDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionDownloadDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {required void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) + URLSession_downloadTask_didFinishDownloadingToURL_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)? + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int)? + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didFinishDownloadingToURL_ + .implement(builder, URLSession_downloadTask_didFinishDownloadingToURL_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ + .implement(builder, + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ + .implement(builder, + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_); + NSURLSessionDownloadDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionDownloadDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_taskIsWaitingForConnectivity_ + .implement(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDownloadDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionDownloadDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDownloadDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDownloadDelegate.URLSession_task_didCompleteWithError_ + .implement(builder, URLSession_task_didCompleteWithError_); + NSURLSessionDownloadDelegate.URLSession_didBecomeInvalidWithError_ + .implement(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDownloadDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Builds an object that implements the NSURLSessionDownloadDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {required void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) + URLSession_downloadTask_didFinishDownloadingToURL_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)? + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int)? + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didFinishDownloadingToURL_ + .implementAsListener( + builder, URLSession_downloadTask_didFinishDownloadingToURL_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ + .implementAsListener(builder, + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ + .implementAsListener(builder, + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_); + NSURLSessionDownloadDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionDownloadDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDownloadDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionDownloadDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDownloadDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDownloadDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionDownloadDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDownloadDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionDownloadDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {required void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) + URLSession_downloadTask_didFinishDownloadingToURL_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)? + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int)? + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didFinishDownloadingToURL_ + .implementAsListener( + builder, URLSession_downloadTask_didFinishDownloadingToURL_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ + .implementAsListener(builder, + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ + .implementAsListener(builder, + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_); + NSURLSessionDownloadDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionDownloadDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDownloadDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionDownloadDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDownloadDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDownloadDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionDownloadDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDownloadDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Sent when a download task that has completed a download. The delegate should + /// copy or move the file at the given location to a new location as it will be + /// removed when the delegate message returns. URLSession:task:didCompleteWithError: will + /// still be called. + static final URLSession_downloadTask_didFinishDownloadingToURL_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>( + _sel_URLSession_downloadTask_didFinishDownloadingToURL_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_downloadTask_didFinishDownloadingToURL_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDownloadTask arg2, objc.NSURL arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDownloadTask arg2, objc.NSURL arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent periodically to notify the delegate of download progress. + static final URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)>( + _sel_URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64 + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionDownloadTask arg2, + int arg3, + int arg4, + int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64 + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionDownloadTask arg2, + int arg3, + int arg4, + int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// Sent when a download has been resumed. If a download failed with an + /// error, the -userInfo dictionary of the error will contain an + /// NSURLSessionDownloadTaskResumeData key, whose value is the resume + /// data. + static final URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionDownloadTask, int, int)>( + _sel_URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDownloadTask, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64 + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDownloadTask arg2, int arg3, int arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionDownloadTask, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64 + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDownloadTask arg2, int arg3, int arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Notification that a task has been created. This method is the first message + /// a task sends, providing a place to configure the task before it is resumed. + /// + /// This delegate callback is *NOT* dispatched to the delegate queue. It is + /// invoked synchronously before the task creation method returns. + static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _sel_URLSession_didCreateTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_didCreateTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// Sent when the system is ready to begin work for a task with a delayed start + /// time set (using the earliestBeginDate property). The completionHandler must + /// be invoked in order for loading to proceed. The disposition provided to the + /// completion handler continues the load with the original request provided to + /// the task, replaces the request with the specified task, or cancels the task. + /// If this delegate is not implemented, loading will proceed with the original + /// request. + /// + /// Recommendation: only implement this delegate if tasks that have the + /// earliestBeginDate property set may become stale and require alteration prior + /// to starting the network load. + /// + /// If a new request is specified, the allowsExpensiveNetworkAccess, + /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties + /// from the new request will not be used; the properties from the + /// original request will continue to be used. + /// + /// Canceling the task is equivalent to calling the task's cancel method; the + /// URLSession:task:didCompleteWithError: task delegate will be called with error + /// NSURLErrorCancelled. + static final URLSession_task_willBeginDelayedRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)>( + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent when a task cannot start the network loading process because the current + /// network connectivity is not available or sufficient for the task's request. + /// + /// This delegate will be called at most one time per task, and is only called if + /// the waitsForConnectivity property in the NSURLSessionConfiguration has been + /// set to YES. + /// + /// This delegate callback will never be called for background sessions, because + /// the waitForConnectivity property is ignored by those sessions. + static final URLSession_taskIsWaitingForConnectivity_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _sel_URLSession_taskIsWaitingForConnectivity_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_taskIsWaitingForConnectivity_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// An HTTP request is attempting to perform a redirection to a different + /// URL. You must invoke the completion routine to allow the + /// redirection, allow the redirection with a modified request, or + /// pass nil to the completionHandler to cause the body of the redirection + /// response to be delivered as the payload of this request. The default + /// is to follow redirections. + /// + /// For tasks in background sessions, redirections will always be followed and this method will not be called. + static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)>( + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// The task has received a request specific authentication challenge. + /// If this delegate is not implemented, the session specific authentication challenge + /// will *NOT* be called and the behavior will be the same as using the default handling + /// disposition. + static final URLSession_task_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent if a task requires a new, unopened body stream. This may be + /// necessary when authentication has failed for any request that + /// involves a body stream. + static final URLSession_task_needNewBodyStream_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)>( + _sel_URLSession_task_needNewBodyStream_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_needNewBodyStream_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + ); + + /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be + /// necessary when resuming a failed upload task. + /// + /// - Parameter session: The session containing the task that needs a new body stream from the given offset. + /// - Parameter task: The task that needs a new body stream. + /// - Parameter offset: The starting offset required for the body stream. + /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. + static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock)>( + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent periodically to notify the delegate of upload progress. This + /// information is also available as properties of the task. + static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, int, int)>( + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// Sent for each informational response received except 101 switching protocols. + static final URLSession_task_didReceiveInformationalResponse_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( + _sel_URLSession_task_didReceiveInformationalResponse_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didReceiveInformationalResponse_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent when complete statistics information has been collected for the task. + static final URLSession_task_didFinishCollectingMetrics_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( + _sel_URLSession_task_didFinishCollectingMetrics_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didFinishCollectingMetrics_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent as the last message related to a specific task. Error may be + /// nil, which implies that no error occurred and this task is complete. + static final URLSession_task_didCompleteWithError_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( + _sel_URLSession_task_didCompleteWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didCompleteWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + ); + + /// The last message a session receives. A session will only become + /// invalid because of a systemic error or when it has been + /// explicitly invalidated, in which case the error parameter will be nil. + static final URLSession_didBecomeInvalidWithError_ = objc + .ObjCProtocolListenableMethod( + _sel_URLSession_didBecomeInvalidWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_didBecomeInvalidWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + ); + + /// If implemented, when a connection level authentication challenge + /// has occurred, this delegate will be given the opportunity to + /// provide authentication credentials to the underlying + /// connection. Some types of authentication will apply to more than + /// one request on a given connection to a server (SSL Server Trust + /// challenges). If this delegate message is not implemented, the + /// behavior will be to use the default handling, which may involve user + /// interaction. + static final URLSession_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _sel_URLSession_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + ); + + /// If an application has received an + /// -application:handleEventsForBackgroundURLSession:completionHandler: + /// message, the session delegate will receive this message to indicate + /// that all messages previously enqueued for this session have been + /// delivered. At this time it is safe to invoke the previously stored + /// completion handler, or to begin any internal updates that will + /// result in invoking the completion handler. + static final URLSessionDidFinishEventsForBackgroundURLSession_ = + objc.ObjCProtocolListenableMethod( + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + ); +} + +late final _protocol_NSURLSessionDownloadDelegate = + objc.getProtocol("NSURLSessionDownloadDelegate"); +late final _sel_URLSession_downloadTask_didFinishDownloadingToURL_ = + objc.registerName("URLSession:downloadTask:didFinishDownloadingToURL:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + objc.NSURL)>(pointer, retain: retain, release: release); - static CUPHTTPForwardedDelegate new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_new1); - return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static CUPHTTPForwardedDelegate allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_allocWithZone_1, zone); - return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDownloadTask, objc.NSURL) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, retain: true, release: true), + objc.NSURL.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); - static CUPHTTPForwardedDelegate alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedDelegate1, _lib._sel_alloc1); - return CUPHTTPForwardedDelegate._(_ret, _lib, retain: false, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)> listener( + void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, + retain: false, release: true), + objc.NSURL + .castFromPointer(arg3, retain: false, release: true))); + final wrapper = _wrapListenerBlock_1a6kixf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + objc.NSURL)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionDownloadTask arg2, objc.NSURL arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); } -class NSLock extends _ObjCWrapper { - NSLock._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [NSLock] that points to the same underlying object as [other]. - static NSLock castFrom(T other) { - return NSLock._(other._id, other._lib, retain: true, release: true); - } +late final _sel_URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ = + objc.registerName( + "URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Int64 arg3, + ffi.Int64 arg4, + ffi.Int64 arg5)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int)>()(arg0, arg1, arg2, arg3, arg4, arg5); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int))(arg0, arg1, arg2, arg3, arg4, arg5); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int))(arg0, arg1, arg2, arg3, arg4, arg5); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64 { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + ffi.Int64, + ffi.Int64, + ffi.Int64)>(pointer, retain: retain, release: release); - /// Returns a [NSLock] that wraps the given raw object pointer. - static NSLock castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSLock._(other, lib, retain: retain, release: release); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + ffi.Int64, + ffi.Int64, + ffi.Int64)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Int64 arg3, ffi.Int64 arg4, ffi.Int64 arg5)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Returns whether [obj] is an instance of [NSLock]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0( - obj._id, obj._lib._sel_isKindOfClass_1, obj._lib._class_NSLock1); - } -} + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDownloadTask, int, int, int) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, retain: true, release: true), + arg3, + arg4, + arg5)), + retain: false, + release: true); -class CUPHTTPForwardedRedirect extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedRedirect._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)> listener( + void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, int, int, int) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, + retain: false, release: true), + arg3, + arg4, + arg5)); + final wrapper = _wrapListenerBlock_jzggzf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + ffi.Int64, + ffi.Int64, + ffi.Int64)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionDownloadTask arg2, int arg3, int arg4, int arg5) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Int64 arg3, + ffi.Int64 arg4, + ffi.Int64 arg5)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int)>()(ref.pointer, arg0, arg1.ref.pointer, + arg2.ref.pointer, arg3, arg4, arg5); +} + +late final _sel_URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ = + objc.registerName( + "URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Int64 arg3, + ffi.Int64 arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int)>()(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int))(arg0, arg1, arg2, arg3, arg4); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64 { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + ffi.Int64, + ffi.Int64)>(pointer, retain: retain, release: release); - /// Returns a [CUPHTTPForwardedRedirect] that points to the same underlying object as [other]. - static CUPHTTPForwardedRedirect castFrom(T other) { - return CUPHTTPForwardedRedirect._(other._id, other._lib, - retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Int64 arg3, ffi.Int64 arg4)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Returns a [CUPHTTPForwardedRedirect] that wraps the given raw object pointer. - static CUPHTTPForwardedRedirect castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedRedirect._(other, lib, - retain: retain, release: release); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> + fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDownloadTask, int, int) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, int arg3, int arg4) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, retain: true, release: true), + arg3, + arg4)), + retain: false, + release: true); - /// Returns whether [obj] is an instance of [CUPHTTPForwardedRedirect]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedRedirect1); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> listener( + void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, int, int) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, int arg3, int arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, + retain: false, release: true), + arg3, + arg4)); + final wrapper = _wrapListenerBlock_1wl7fts(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + ffi.Int64, + ffi.Int64)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionDownloadTask arg2, int arg3, int arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Int64 arg3, + ffi.Int64 arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int)>()( + ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3, arg4); +} + +/// NSURLSessionStreamDelegate +abstract final class NSURLSessionStreamDelegate { + /// Builds an object that implements the NSURLSessionStreamDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {void Function(NSURLSession, NSURLSessionStreamTask)? + URLSession_readClosedForStreamTask_, + void Function(NSURLSession, NSURLSessionStreamTask)? + URLSession_writeClosedForStreamTask_, + void Function(NSURLSession, NSURLSessionStreamTask)? + URLSession_betterRouteDiscoveredForStreamTask_, + void Function(NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)? + URLSession_streamTask_didBecomeInputStream_outputStream_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function( + NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionStreamDelegate.URLSession_readClosedForStreamTask_.implement( + builder, URLSession_readClosedForStreamTask_); + NSURLSessionStreamDelegate.URLSession_writeClosedForStreamTask_.implement( + builder, URLSession_writeClosedForStreamTask_); + NSURLSessionStreamDelegate.URLSession_betterRouteDiscoveredForStreamTask_ + .implement(builder, URLSession_betterRouteDiscoveredForStreamTask_); + NSURLSessionStreamDelegate + .URLSession_streamTask_didBecomeInputStream_outputStream_ + .implement( + builder, URLSession_streamTask_didBecomeInputStream_outputStream_); + NSURLSessionStreamDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionStreamDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionStreamDelegate.URLSession_taskIsWaitingForConnectivity_ + .implement(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionStreamDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionStreamDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionStreamDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionStreamDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionStreamDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionStreamDelegate.URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionStreamDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionStreamDelegate.URLSession_task_didCompleteWithError_.implement( + builder, URLSession_task_didCompleteWithError_); + NSURLSessionStreamDelegate.URLSession_didBecomeInvalidWithError_.implement( + builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionStreamDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionStreamDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionStreamDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, NSURLSessionStreamTask)? + URLSession_readClosedForStreamTask_, + void Function(NSURLSession, NSURLSessionStreamTask)? + URLSession_writeClosedForStreamTask_, + void Function(NSURLSession, NSURLSessionStreamTask)? + URLSession_betterRouteDiscoveredForStreamTask_, + void Function(NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)? + URLSession_streamTask_didBecomeInputStream_outputStream_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function( + NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionStreamDelegate.URLSession_readClosedForStreamTask_.implement( + builder, URLSession_readClosedForStreamTask_); + NSURLSessionStreamDelegate.URLSession_writeClosedForStreamTask_.implement( + builder, URLSession_writeClosedForStreamTask_); + NSURLSessionStreamDelegate.URLSession_betterRouteDiscoveredForStreamTask_ + .implement(builder, URLSession_betterRouteDiscoveredForStreamTask_); + NSURLSessionStreamDelegate + .URLSession_streamTask_didBecomeInputStream_outputStream_ + .implement( + builder, URLSession_streamTask_didBecomeInputStream_outputStream_); + NSURLSessionStreamDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionStreamDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionStreamDelegate.URLSession_taskIsWaitingForConnectivity_ + .implement(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionStreamDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionStreamDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionStreamDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionStreamDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionStreamDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionStreamDelegate.URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionStreamDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionStreamDelegate.URLSession_task_didCompleteWithError_.implement( + builder, URLSession_task_didCompleteWithError_); + NSURLSessionStreamDelegate.URLSession_didBecomeInvalidWithError_.implement( + builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionStreamDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionStreamDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Builds an object that implements the NSURLSessionStreamDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {void Function(NSURLSession, NSURLSessionStreamTask)? + URLSession_readClosedForStreamTask_, + void Function(NSURLSession, NSURLSessionStreamTask)? + URLSession_writeClosedForStreamTask_, + void Function(NSURLSession, NSURLSessionStreamTask)? + URLSession_betterRouteDiscoveredForStreamTask_, + void Function(NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)? + URLSession_streamTask_didBecomeInputStream_outputStream_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function( + NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionStreamDelegate.URLSession_readClosedForStreamTask_ + .implementAsListener(builder, URLSession_readClosedForStreamTask_); + NSURLSessionStreamDelegate.URLSession_writeClosedForStreamTask_ + .implementAsListener(builder, URLSession_writeClosedForStreamTask_); + NSURLSessionStreamDelegate.URLSession_betterRouteDiscoveredForStreamTask_ + .implementAsListener( + builder, URLSession_betterRouteDiscoveredForStreamTask_); + NSURLSessionStreamDelegate + .URLSession_streamTask_didBecomeInputStream_outputStream_ + .implementAsListener( + builder, URLSession_streamTask_didBecomeInputStream_outputStream_); + NSURLSessionStreamDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionStreamDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionStreamDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionStreamDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionStreamDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionStreamDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionStreamDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionStreamDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionStreamDelegate.URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionStreamDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionStreamDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionStreamDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionStreamDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionStreamDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionStreamDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, NSURLSessionStreamTask)? + URLSession_readClosedForStreamTask_, + void Function(NSURLSession, NSURLSessionStreamTask)? + URLSession_writeClosedForStreamTask_, + void Function(NSURLSession, NSURLSessionStreamTask)? + URLSession_betterRouteDiscoveredForStreamTask_, + void Function(NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)? + URLSession_streamTask_didBecomeInputStream_outputStream_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function( + NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionStreamDelegate.URLSession_readClosedForStreamTask_ + .implementAsListener(builder, URLSession_readClosedForStreamTask_); + NSURLSessionStreamDelegate.URLSession_writeClosedForStreamTask_ + .implementAsListener(builder, URLSession_writeClosedForStreamTask_); + NSURLSessionStreamDelegate.URLSession_betterRouteDiscoveredForStreamTask_ + .implementAsListener( + builder, URLSession_betterRouteDiscoveredForStreamTask_); + NSURLSessionStreamDelegate + .URLSession_streamTask_didBecomeInputStream_outputStream_ + .implementAsListener( + builder, URLSession_streamTask_didBecomeInputStream_outputStream_); + NSURLSessionStreamDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionStreamDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionStreamDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionStreamDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionStreamDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionStreamDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionStreamDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionStreamDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionStreamDelegate.URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionStreamDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionStreamDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionStreamDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionStreamDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionStreamDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Indicates that the read side of a connection has been closed. Any + /// outstanding reads complete, but future reads will immediately fail. + /// This may be sent even when no reads are in progress. However, when + /// this delegate message is received, there may still be bytes + /// available. You only know that no more bytes are available when you + /// are able to read until EOF. + static final URLSession_readClosedForStreamTask_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionStreamTask)>( + _sel_URLSession_readClosedForStreamTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_readClosedForStreamTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionStreamTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionStreamTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionStreamTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionStreamTask arg2) => + func(arg1, arg2)), + ); + + /// Indicates that the write side of a connection has been closed. + /// Any outstanding writes complete, but future writes will immediately + /// fail. + static final URLSession_writeClosedForStreamTask_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionStreamTask)>( + _sel_URLSession_writeClosedForStreamTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_writeClosedForStreamTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionStreamTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionStreamTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionStreamTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionStreamTask arg2) => + func(arg1, arg2)), + ); + + /// A notification that the system has determined that a better route + /// to the host has been detected (eg, a wi-fi interface becoming + /// available.) This is a hint to the delegate that it may be + /// desirable to create a new task for subsequent work. Note that + /// there is no guarantee that the future task will be able to connect + /// to the host, so callers should should be prepared for failure of + /// reads and writes over any new interface. + static final URLSession_betterRouteDiscoveredForStreamTask_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionStreamTask)>( + _sel_URLSession_betterRouteDiscoveredForStreamTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_betterRouteDiscoveredForStreamTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionStreamTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionStreamTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionStreamTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionStreamTask arg2) => + func(arg1, arg2)), + ); + + /// The given task has been completed, and unopened NSInputStream and + /// NSOutputStream objects are created from the underlying network + /// connection. This will only be invoked after all enqueued IO has + /// completed (including any necessary handshakes.) The streamTask + /// will not receive any further delegate messages. + static final URLSession_streamTask_didBecomeInputStream_outputStream_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionStreamTask, + objc.NSInputStream, objc.NSOutputStream)>( + _sel_URLSession_streamTask_didBecomeInputStream_outputStream_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_streamTask_didBecomeInputStream_outputStream_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, + objc.NSOutputStream) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionStreamTask arg2, + objc.NSInputStream arg3, + objc.NSOutputStream arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, + objc.NSOutputStream) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionStreamTask arg2, + objc.NSInputStream arg3, + objc.NSOutputStream arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Notification that a task has been created. This method is the first message + /// a task sends, providing a place to configure the task before it is resumed. + /// + /// This delegate callback is *NOT* dispatched to the delegate queue. It is + /// invoked synchronously before the task creation method returns. + static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _sel_URLSession_didCreateTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_didCreateTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// Sent when the system is ready to begin work for a task with a delayed start + /// time set (using the earliestBeginDate property). The completionHandler must + /// be invoked in order for loading to proceed. The disposition provided to the + /// completion handler continues the load with the original request provided to + /// the task, replaces the request with the specified task, or cancels the task. + /// If this delegate is not implemented, loading will proceed with the original + /// request. + /// + /// Recommendation: only implement this delegate if tasks that have the + /// earliestBeginDate property set may become stale and require alteration prior + /// to starting the network load. + /// + /// If a new request is specified, the allowsExpensiveNetworkAccess, + /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties + /// from the new request will not be used; the properties from the + /// original request will continue to be used. + /// + /// Canceling the task is equivalent to calling the task's cancel method; the + /// URLSession:task:didCompleteWithError: task delegate will be called with error + /// NSURLErrorCancelled. + static final URLSession_task_willBeginDelayedRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)>( + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent when a task cannot start the network loading process because the current + /// network connectivity is not available or sufficient for the task's request. + /// + /// This delegate will be called at most one time per task, and is only called if + /// the waitsForConnectivity property in the NSURLSessionConfiguration has been + /// set to YES. + /// + /// This delegate callback will never be called for background sessions, because + /// the waitForConnectivity property is ignored by those sessions. + static final URLSession_taskIsWaitingForConnectivity_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _sel_URLSession_taskIsWaitingForConnectivity_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_taskIsWaitingForConnectivity_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// An HTTP request is attempting to perform a redirection to a different + /// URL. You must invoke the completion routine to allow the + /// redirection, allow the redirection with a modified request, or + /// pass nil to the completionHandler to cause the body of the redirection + /// response to be delivered as the payload of this request. The default + /// is to follow redirections. + /// + /// For tasks in background sessions, redirections will always be followed and this method will not be called. + static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)>( + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// The task has received a request specific authentication challenge. + /// If this delegate is not implemented, the session specific authentication challenge + /// will *NOT* be called and the behavior will be the same as using the default handling + /// disposition. + static final URLSession_task_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent if a task requires a new, unopened body stream. This may be + /// necessary when authentication has failed for any request that + /// involves a body stream. + static final URLSession_task_needNewBodyStream_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)>( + _sel_URLSession_task_needNewBodyStream_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_task_needNewBodyStream_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + ); + + /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be + /// necessary when resuming a failed upload task. + /// + /// - Parameter session: The session containing the task that needs a new body stream from the given offset. + /// - Parameter task: The task that needs a new body stream. + /// - Parameter offset: The starting offset required for the body stream. + /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. + static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock)>( + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent periodically to notify the delegate of upload progress. This + /// information is also available as properties of the task. + static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, int, int)>( + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// Sent for each informational response received except 101 switching protocols. + static final URLSession_task_didReceiveInformationalResponse_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( + _sel_URLSession_task_didReceiveInformationalResponse_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_task_didReceiveInformationalResponse_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent when complete statistics information has been collected for the task. + static final URLSession_task_didFinishCollectingMetrics_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( + _sel_URLSession_task_didFinishCollectingMetrics_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_task_didFinishCollectingMetrics_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent as the last message related to a specific task. Error may be + /// nil, which implies that no error occurred and this task is complete. + static final URLSession_task_didCompleteWithError_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( + _sel_URLSession_task_didCompleteWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_task_didCompleteWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + ); + + /// The last message a session receives. A session will only become + /// invalid because of a systemic error or when it has been + /// explicitly invalidated, in which case the error parameter will be nil. + static final URLSession_didBecomeInvalidWithError_ = objc + .ObjCProtocolListenableMethod( + _sel_URLSession_didBecomeInvalidWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_didBecomeInvalidWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + ); + + /// If implemented, when a connection level authentication challenge + /// has occurred, this delegate will be given the opportunity to + /// provide authentication credentials to the underlying + /// connection. Some types of authentication will apply to more than + /// one request on a given connection to a server (SSL Server Trust + /// challenges). If this delegate message is not implemented, the + /// behavior will be to use the default handling, which may involve user + /// interaction. + static final URLSession_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _sel_URLSession_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSession_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + ); + + /// If an application has received an + /// -application:handleEventsForBackgroundURLSession:completionHandler: + /// message, the session delegate will receive this message to indicate + /// that all messages previously enqueued for this session have been + /// delivered. At this time it is safe to invoke the previously stored + /// completion handler, or to begin any internal updates that will + /// result in invoking the completion handler. + static final URLSessionDidFinishEventsForBackgroundURLSession_ = + objc.ObjCProtocolListenableMethod( + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionStreamDelegate, + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + ); +} + +late final _protocol_NSURLSessionStreamDelegate = + objc.getProtocol("NSURLSessionStreamDelegate"); +late final _sel_URLSession_readClosedForStreamTask_ = + objc.registerName("URLSession:readClosedForStreamTask:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, NSURLSession, NSURLSessionStreamTask)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionStreamTask)>(pointer, + retain: retain, release: release); - NSObject initWithSession_task_response_request_(NSURLSession session, - NSURLSessionTask task, NSHTTPURLResponse response, NSURLRequest request) { - final _ret = _lib._objc_msgSend_538( - _id, - _lib._sel_initWithSession_task_response_request_1, - session._id, - task._id, - response._id, - request._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Indicates that the task should continue executing using the given request. - /// If the request is NIL then the redirect is not followed and the task is - /// complete. - void finishWithRequest_(NSURLRequest? request) { - _lib._objc_msgSend_539( - _id, _lib._sel_finishWithRequest_1, request?._id ?? ffi.nullptr); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask)> + fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionStreamTask) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionStreamTask.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); - NSHTTPURLResponse get response { - final _ret = _lib._objc_msgSend_540(_id, _lib._sel_response1); - return NSHTTPURLResponse._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionStreamTask)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionStreamTask) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionStreamTask.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_tm2na8(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionStreamTask)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, NSURLSession, NSURLSessionStreamTask)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionStreamTask arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer); +} + +late final _sel_URLSession_writeClosedForStreamTask_ = + objc.registerName("URLSession:writeClosedForStreamTask:"); +late final _sel_URLSession_betterRouteDiscoveredForStreamTask_ = + objc.registerName("URLSession:betterRouteDiscoveredForStreamTask:"); +late final _sel_URLSession_streamTask_didBecomeInputStream_outputStream_ = objc + .registerName("URLSession:streamTask:didBecomeInputStream:outputStream:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionStreamTask, + objc.NSInputStream, + objc.NSOutputStream)>(pointer, retain: retain, release: release); - NSURLRequest get request { - final _ret = _lib._objc_msgSend_489(_id, _lib._sel_request1); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionStreamTask, + objc.NSInputStream, + objc.NSOutputStream)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// This property is meant to be used only by CUPHTTPClientDelegate. - NSURLRequest get redirectRequest { - final _ret = _lib._objc_msgSend_489(_id, _lib._sel_redirectRequest1); - return NSURLRequest._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionStreamTask.castFromPointer(arg2, retain: true, release: true), + objc.NSInputStream.castFromPointer(arg3, retain: true, release: true), + objc.NSOutputStream.castFromPointer(arg4, retain: true, release: true))), + retain: false, + release: true); - @override - CUPHTTPForwardedRedirect init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return CUPHTTPForwardedRedirect._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionStreamTask, + objc.NSInputStream, + objc.NSOutputStream)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionStreamTask, + objc.NSInputStream, objc.NSOutputStream) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionStreamTask.castFromPointer(arg2, + retain: false, release: true), + objc.NSInputStream.castFromPointer(arg3, + retain: false, release: true), + objc.NSOutputStream.castFromPointer(arg4, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_no6pyg(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionStreamTask, + objc.NSInputStream, + objc.NSOutputStream)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLSessionStreamTask arg2, + objc.NSInputStream arg3, + objc.NSOutputStream arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0, + arg1.ref.pointer, + arg2.ref.pointer, + arg3.ref.pointer, + arg4.ref.pointer); +} + +/// NSURLSessionWebSocketDelegate +abstract final class NSURLSessionWebSocketDelegate { + /// Builds an object that implements the NSURLSessionWebSocketDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)? + URLSession_webSocketTask_didOpenWithProtocol_, + void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?)? + URLSession_webSocketTask_didCloseWithCode_reason_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function( + NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionWebSocketDelegate.URLSession_webSocketTask_didOpenWithProtocol_ + .implement(builder, URLSession_webSocketTask_didOpenWithProtocol_); + NSURLSessionWebSocketDelegate + .URLSession_webSocketTask_didCloseWithCode_reason_ + .implement(builder, URLSession_webSocketTask_didCloseWithCode_reason_); + NSURLSessionWebSocketDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionWebSocketDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_taskIsWaitingForConnectivity_ + .implement(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionWebSocketDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionWebSocketDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionWebSocketDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionWebSocketDelegate.URLSession_task_didCompleteWithError_ + .implement(builder, URLSession_task_didCompleteWithError_); + NSURLSessionWebSocketDelegate.URLSession_didBecomeInvalidWithError_ + .implement(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionWebSocketDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionWebSocketDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)? + URLSession_webSocketTask_didOpenWithProtocol_, + void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?)? + URLSession_webSocketTask_didCloseWithCode_reason_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function( + NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionWebSocketDelegate.URLSession_webSocketTask_didOpenWithProtocol_ + .implement(builder, URLSession_webSocketTask_didOpenWithProtocol_); + NSURLSessionWebSocketDelegate + .URLSession_webSocketTask_didCloseWithCode_reason_ + .implement(builder, URLSession_webSocketTask_didCloseWithCode_reason_); + NSURLSessionWebSocketDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionWebSocketDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_taskIsWaitingForConnectivity_ + .implement(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionWebSocketDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionWebSocketDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionWebSocketDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionWebSocketDelegate.URLSession_task_didCompleteWithError_ + .implement(builder, URLSession_task_didCompleteWithError_); + NSURLSessionWebSocketDelegate.URLSession_didBecomeInvalidWithError_ + .implement(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionWebSocketDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Builds an object that implements the NSURLSessionWebSocketDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)? + URLSession_webSocketTask_didOpenWithProtocol_, + void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?)? + URLSession_webSocketTask_didCloseWithCode_reason_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function( + NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionWebSocketDelegate.URLSession_webSocketTask_didOpenWithProtocol_ + .implementAsListener( + builder, URLSession_webSocketTask_didOpenWithProtocol_); + NSURLSessionWebSocketDelegate + .URLSession_webSocketTask_didCloseWithCode_reason_ + .implementAsListener( + builder, URLSession_webSocketTask_didCloseWithCode_reason_); + NSURLSessionWebSocketDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionWebSocketDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionWebSocketDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionWebSocketDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionWebSocketDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionWebSocketDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionWebSocketDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionWebSocketDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionWebSocketDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)? + URLSession_webSocketTask_didOpenWithProtocol_, + void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?)? + URLSession_webSocketTask_didCloseWithCode_reason_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function( + NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionWebSocketDelegate.URLSession_webSocketTask_didOpenWithProtocol_ + .implementAsListener( + builder, URLSession_webSocketTask_didOpenWithProtocol_); + NSURLSessionWebSocketDelegate + .URLSession_webSocketTask_didCloseWithCode_reason_ + .implementAsListener( + builder, URLSession_webSocketTask_didCloseWithCode_reason_); + NSURLSessionWebSocketDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionWebSocketDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionWebSocketDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionWebSocketDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionWebSocketDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionWebSocketDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionWebSocketDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionWebSocketDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Indicates that the WebSocket handshake was successful and the connection has been upgraded to webSockets. + /// It will also provide the protocol that is picked in the handshake. If the handshake fails, this delegate will not be invoked. + static final URLSession_webSocketTask_didOpenWithProtocol_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)>( + _sel_URLSession_webSocketTask_didOpenWithProtocol_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_webSocketTask_didOpenWithProtocol_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionWebSocketTask arg2, objc.NSString? arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionWebSocketTask arg2, objc.NSString? arg3) => + func(arg1, arg2, arg3)), + ); + + /// Indicates that the WebSocket has received a close frame from the server endpoint. + /// The close code and the close reason may be provided by the delegate if the server elects to send + /// this information in the close frame + static final URLSession_webSocketTask_didCloseWithCode_reason_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, + objc.NSData?)>( + _sel_URLSession_webSocketTask_didCloseWithCode_reason_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_webSocketTask_didCloseWithCode_reason_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, + objc.NSData?) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionWebSocketTask arg2, + DartNSInteger arg3, + objc.NSData? arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, + objc.NSData?) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionWebSocketTask arg2, + DartNSInteger arg3, + objc.NSData? arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Notification that a task has been created. This method is the first message + /// a task sends, providing a place to configure the task before it is resumed. + /// + /// This delegate callback is *NOT* dispatched to the delegate queue. It is + /// invoked synchronously before the task creation method returns. + static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _sel_URLSession_didCreateTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_didCreateTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// Sent when the system is ready to begin work for a task with a delayed start + /// time set (using the earliestBeginDate property). The completionHandler must + /// be invoked in order for loading to proceed. The disposition provided to the + /// completion handler continues the load with the original request provided to + /// the task, replaces the request with the specified task, or cancels the task. + /// If this delegate is not implemented, loading will proceed with the original + /// request. + /// + /// Recommendation: only implement this delegate if tasks that have the + /// earliestBeginDate property set may become stale and require alteration prior + /// to starting the network load. + /// + /// If a new request is specified, the allowsExpensiveNetworkAccess, + /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties + /// from the new request will not be used; the properties from the + /// original request will continue to be used. + /// + /// Canceling the task is equivalent to calling the task's cancel method; the + /// URLSession:task:didCompleteWithError: task delegate will be called with error + /// NSURLErrorCancelled. + static final URLSession_task_willBeginDelayedRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)>( + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent when a task cannot start the network loading process because the current + /// network connectivity is not available or sufficient for the task's request. + /// + /// This delegate will be called at most one time per task, and is only called if + /// the waitsForConnectivity property in the NSURLSessionConfiguration has been + /// set to YES. + /// + /// This delegate callback will never be called for background sessions, because + /// the waitForConnectivity property is ignored by those sessions. + static final URLSession_taskIsWaitingForConnectivity_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _sel_URLSession_taskIsWaitingForConnectivity_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_taskIsWaitingForConnectivity_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// An HTTP request is attempting to perform a redirection to a different + /// URL. You must invoke the completion routine to allow the + /// redirection, allow the redirection with a modified request, or + /// pass nil to the completionHandler to cause the body of the redirection + /// response to be delivered as the payload of this request. The default + /// is to follow redirections. + /// + /// For tasks in background sessions, redirections will always be followed and this method will not be called. + static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)>( + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// The task has received a request specific authentication challenge. + /// If this delegate is not implemented, the session specific authentication challenge + /// will *NOT* be called and the behavior will be the same as using the default handling + /// disposition. + static final URLSession_task_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent if a task requires a new, unopened body stream. This may be + /// necessary when authentication has failed for any request that + /// involves a body stream. + static final URLSession_task_needNewBodyStream_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)>( + _sel_URLSession_task_needNewBodyStream_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_needNewBodyStream_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + ); + + /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be + /// necessary when resuming a failed upload task. + /// + /// - Parameter session: The session containing the task that needs a new body stream from the given offset. + /// - Parameter task: The task that needs a new body stream. + /// - Parameter offset: The starting offset required for the body stream. + /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. + static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock)>( + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent periodically to notify the delegate of upload progress. This + /// information is also available as properties of the task. + static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, int, int)>( + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// Sent for each informational response received except 101 switching protocols. + static final URLSession_task_didReceiveInformationalResponse_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( + _sel_URLSession_task_didReceiveInformationalResponse_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didReceiveInformationalResponse_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent when complete statistics information has been collected for the task. + static final URLSession_task_didFinishCollectingMetrics_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( + _sel_URLSession_task_didFinishCollectingMetrics_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didFinishCollectingMetrics_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent as the last message related to a specific task. Error may be + /// nil, which implies that no error occurred and this task is complete. + static final URLSession_task_didCompleteWithError_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( + _sel_URLSession_task_didCompleteWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didCompleteWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + ); + + /// The last message a session receives. A session will only become + /// invalid because of a systemic error or when it has been + /// explicitly invalidated, in which case the error parameter will be nil. + static final URLSession_didBecomeInvalidWithError_ = objc + .ObjCProtocolListenableMethod( + _sel_URLSession_didBecomeInvalidWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_didBecomeInvalidWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + ); + + /// If implemented, when a connection level authentication challenge + /// has occurred, this delegate will be given the opportunity to + /// provide authentication credentials to the underlying + /// connection. Some types of authentication will apply to more than + /// one request on a given connection to a server (SSL Server Trust + /// challenges). If this delegate message is not implemented, the + /// behavior will be to use the default handling, which may involve user + /// interaction. + static final URLSession_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _sel_URLSession_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + ); + + /// If an application has received an + /// -application:handleEventsForBackgroundURLSession:completionHandler: + /// message, the session delegate will receive this message to indicate + /// that all messages previously enqueued for this session have been + /// delivered. At this time it is safe to invoke the previously stored + /// completion handler, or to begin any internal updates that will + /// result in invoking the completion handler. + static final URLSessionDidFinishEventsForBackgroundURLSession_ = + objc.ObjCProtocolListenableMethod( + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + ); +} + +late final _protocol_NSURLSessionWebSocketDelegate = + objc.getProtocol("NSURLSessionWebSocketDelegate"); +late final _sel_URLSession_webSocketTask_didOpenWithProtocol_ = + objc.registerName("URLSession:webSocketTask:didOpenWithProtocol:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, objc.NSString?)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionWebSocketTask, + objc.NSString?)>(pointer, retain: retain, release: release); - static CUPHTTPForwardedRedirect new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_new1); - return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, objc.NSString?)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, objc.NSString?)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static CUPHTTPForwardedRedirect allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_allocWithZone_1, zone); - return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionWebSocketTask.castFromPointer(arg2, retain: true, release: true), + arg3.address == 0 ? null : objc.NSString.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); - static CUPHTTPForwardedRedirect alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedRedirect1, _lib._sel_alloc1); - return CUPHTTPForwardedRedirect._(_ret, _lib, retain: false, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, objc.NSString?)> listener( + void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, objc.NSString?) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionWebSocketTask.castFromPointer(arg2, + retain: false, release: true), + arg3.address == 0 + ? null + : objc.NSString.castFromPointer(arg3, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1a6kixf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionWebSocketTask, + objc.NSString?)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, objc.NSString?)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionWebSocketTask arg2, objc.NSString? arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3?.ref.pointer ?? ffi.nullptr); } -class CUPHTTPForwardedResponse extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedResponse._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [CUPHTTPForwardedResponse] that points to the same underlying object as [other]. - static CUPHTTPForwardedResponse castFrom(T other) { - return CUPHTTPForwardedResponse._(other._id, other._lib, - retain: true, release: true); - } +late final _sel_URLSession_webSocketTask_didCloseWithCode_reason_ = + objc.registerName("URLSession:webSocketTask:didCloseWithCode:reason:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + NSInteger arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()( + arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, NSInteger, objc.NSData?)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionWebSocketTask, + NSInteger, + objc.NSData?)>(pointer, retain: retain, release: release); - /// Returns a [CUPHTTPForwardedResponse] that wraps the given raw object pointer. - static CUPHTTPForwardedResponse castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedResponse._(other, lib, - retain: retain, release: release); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, NSInteger arg3, ffi.Pointer arg4)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, NSInteger, objc.NSData?)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Returns whether [obj] is an instance of [CUPHTTPForwardedResponse]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedResponse1); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, NSInteger, objc.NSData?)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionWebSocketTask.castFromPointer(arg2, retain: true, release: true), + arg3, + arg4.address == 0 ? null : objc.NSData.castFromPointer(arg4, retain: true, release: true))), + retain: false, + release: true); - NSObject initWithSession_task_response_( - NSURLSession session, NSURLSessionTask task, NSURLResponse response) { - final _ret = _lib._objc_msgSend_541( - _id, - _lib._sel_initWithSession_task_response_1, - session._id, - task._id, - response._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> listener( + void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionWebSocketTask.castFromPointer(arg2, + retain: false, release: true), + arg3, + arg4.address == 0 + ? null + : objc.NSData.castFromPointer(arg4, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_10hgvcc(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionWebSocketTask, + NSInteger, + objc.NSData?)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, NSInteger, objc.NSData?)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLSessionWebSocketTask arg2, + DartNSInteger arg3, + objc.NSData? arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + NSInteger arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()( + ref.pointer, + arg0, + arg1.ref.pointer, + arg2.ref.pointer, + arg3, + arg4?.ref.pointer ?? ffi.nullptr); +} + +typedef NSRange = objc.NSRange; + +/// NSItemProviderWriting +abstract final class NSItemProviderWriting { + /// Builds an object that implements the NSItemProviderWriting protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {objc.NSItemProviderRepresentationVisibility Function(objc.NSString)? + itemProviderVisibilityForRepresentationWithTypeIdentifier_, + required NSProgress? Function(objc.NSString, + objc.ObjCBlock) + loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + objc.NSArray Function()? writableTypeIdentifiersForItemProvider}) { + final builder = objc.ObjCProtocolBuilder(); + NSItemProviderWriting + .itemProviderVisibilityForRepresentationWithTypeIdentifier_ + .implement(builder, + itemProviderVisibilityForRepresentationWithTypeIdentifier_); + NSItemProviderWriting + .loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ + .implement(builder, + loadDataWithTypeIdentifier_forItemProviderCompletionHandler_); + NSItemProviderWriting.writableTypeIdentifiersForItemProvider + .implement(builder, writableTypeIdentifiersForItemProvider); + return builder.build(); + } + + /// Adds the implementation of the NSItemProviderWriting protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {objc.NSItemProviderRepresentationVisibility Function(objc.NSString)? + itemProviderVisibilityForRepresentationWithTypeIdentifier_, + required NSProgress? Function(objc.NSString, + objc.ObjCBlock) + loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + objc.NSArray Function()? writableTypeIdentifiersForItemProvider}) { + NSItemProviderWriting + .itemProviderVisibilityForRepresentationWithTypeIdentifier_ + .implement(builder, + itemProviderVisibilityForRepresentationWithTypeIdentifier_); + NSItemProviderWriting + .loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ + .implement(builder, + loadDataWithTypeIdentifier_forItemProviderCompletionHandler_); + NSItemProviderWriting.writableTypeIdentifiersForItemProvider + .implement(builder, writableTypeIdentifiersForItemProvider); + } + + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + static final itemProviderVisibilityForRepresentationWithTypeIdentifier_ = + objc.ObjCProtocolMethod< + objc.NSItemProviderRepresentationVisibility Function(objc.NSString)>( + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + objc.getProtocolMethodSignature( + _protocol_NSItemProviderWriting, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + isRequired: false, + isInstanceMethod: true, + ), + (objc.NSItemProviderRepresentationVisibility Function(objc.NSString) + func) => + ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString + .fromFunction( + (ffi.Pointer _, objc.NSString arg1) => func(arg1)), + ); + + /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: + static final loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ = + objc.ObjCProtocolMethod< + NSProgress? Function(objc.NSString, + objc.ObjCBlock)>( + _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSItemProviderWriting, + _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + (NSProgress? Function(objc.NSString, + objc.ObjCBlock) + func) => + ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError.fromFunction( + (ffi.Pointer _, + objc.NSString arg1, + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, objc.NSError?)> + arg2) => + func(arg1, arg2)), + ); + + /// writableTypeIdentifiersForItemProvider + static final writableTypeIdentifiersForItemProvider = + objc.ObjCProtocolMethod( + _sel_writableTypeIdentifiersForItemProvider, + objc.getProtocolMethodSignature( + _protocol_NSItemProviderWriting, + _sel_writableTypeIdentifiersForItemProvider, + isRequired: false, + isInstanceMethod: true, + ), + (objc.NSArray Function() func) => ObjCBlock_NSArray_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); +} + +late final _protocol_NSItemProviderWriting = + objc.getProtocol("NSItemProviderWriting"); +late final _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_ = + objc.registerName( + "itemProviderVisibilityForRepresentationWithTypeIdentifier:"); +int _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer + _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_fnPtrCallable = + ffi.Pointer.fromFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_fnPtrTrampoline, + 0) + .cast(); +int _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as int Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_closureCallable = + ffi.Pointer.fromFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_closureTrampoline, + 0) + .cast(); + +/// Construction methods for `objc.ObjCBlock, objc.NSString)>`. +abstract final class ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NSInteger Function(ffi.Pointer, objc.NSString)> castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock, objc.NSString)>( + pointer, + retain: retain, + release: release); - void finishWithDisposition_(int disposition) { - _lib._objc_msgSend_542(_id, _lib._sel_finishWithDisposition_1, disposition); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.NSString)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, objc.NSString)>( + objc.newPointerBlock(_ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - NSURLResponse get response { - final _ret = _lib._objc_msgSend_337(_id, _lib._sel_response1); - return NSURLResponse._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.NSString)> fromFunction( + objc.NSItemProviderRepresentationVisibility Function( + ffi.Pointer, objc.NSString) + fn) => + objc.ObjCBlock, objc.NSString)>( + objc.newClosureBlock( + _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, objc.NSString.castFromPointer(arg1, retain: true, release: true)) + .value), + retain: false, + release: true); +} - /// This property is meant to be used only by CUPHTTPClientDelegate. - int get disposition { - return _lib._objc_msgSend_543(_id, _lib._sel_disposition1); - } +/// Call operator for `objc.ObjCBlock, objc.NSString)>`. +extension ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_CallExtension + on objc + .ObjCBlock, objc.NSString)> { + objc.NSItemProviderRepresentationVisibility call( + ffi.Pointer arg0, objc.NSString arg1) => + objc.NSItemProviderRepresentationVisibility.fromValue(ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + NSInteger Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction, ffi.Pointer, ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer)); +} - @override - CUPHTTPForwardedResponse init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return CUPHTTPForwardedResponse._(_ret, _lib, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_NSError_listenerCallable = ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSData_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock( + pointer, + retain: retain, + release: release); - static CUPHTTPForwardedResponse new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedResponse1, _lib._sel_new1); - return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static CUPHTTPForwardedResponse allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_CUPHTTPForwardedResponse1, _lib._sel_allocWithZone_1, zone); - return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(objc.NSData?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_NSError_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: true, release: true), + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); - static CUPHTTPForwardedResponse alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedResponse1, _lib._sel_alloc1); - return CUPHTTPForwardedResponse._(_ret, _lib, retain: false, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock + listener(void Function(objc.NSData?, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_NSError_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn( + arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: false, release: true), + arg1.address == 0 + ? null + : objc.NSError.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_1tjlcwl(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true); } } -class CUPHTTPForwardedData extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedData._(ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [CUPHTTPForwardedData] that points to the same underlying object as [other]. - static CUPHTTPForwardedData castFrom(T other) { - return CUPHTTPForwardedData._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [CUPHTTPForwardedData] that wraps the given raw object pointer. - static CUPHTTPForwardedData castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedData._(other, lib, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [CUPHTTPForwardedData]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedData1); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSData_NSError_CallExtension + on objc.ObjCBlock { + void call(objc.NSData? arg0, objc.NSError? arg1) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ = + objc.registerName( + "loadDataWithTypeIdentifier:forItemProviderCompletionHandler:"); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock, objc.NSString, objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NSProgress? Function(ffi.Pointer, objc.NSString, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + NSProgress? Function(ffi.Pointer, objc.NSString, + objc.ObjCBlock)>(pointer, + retain: retain, release: release); - NSObject initWithSession_task_data_( - NSURLSession session, NSURLSessionTask task, NSData data) { - final _ret = _lib._objc_msgSend_544(_id, - _lib._sel_initWithSession_task_data_1, session._id, task._id, data._id); - return NSObject._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + NSProgress? Function(ffi.Pointer, objc.NSString, + objc.ObjCBlock)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + NSProgress? Function(ffi.Pointer, objc.NSString, + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - NSData get data { - final _ret = _lib._objc_msgSend_54(_id, _lib._sel_data1); - return NSData._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.NSString, objc.ObjCBlock)> + fromFunction(NSProgress? Function(ffi.Pointer, objc.NSString, objc.ObjCBlock) fn) => + objc.ObjCBlock, objc.NSString, objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(arg0, objc.NSString.castFromPointer(arg1, retain: true, release: true), ObjCBlock_ffiVoid_NSData_NSError.castFromPointer(arg2, retain: true, release: true)) + ?.ref + .retainAndAutorelease() ?? + ffi.nullptr), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, objc.NSString, objc.ObjCBlock)>`. +extension ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_CallExtension + on objc.ObjCBlock< + NSProgress? Function(ffi.Pointer, objc.NSString, + objc.ObjCBlock)> { + NSProgress? call(ffi.Pointer arg0, objc.NSString arg1, objc.ObjCBlock arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>() + (ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer) + .address == + 0 + ? null + : NSProgress.castFromPointer( + ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>().asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer), + retain: true, + release: true); +} + +late final _sel_writableTypeIdentifiersForItemProvider = + objc.registerName("writableTypeIdentifiersForItemProvider"); +ffi.Pointer _ObjCBlock_NSArray_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer)>()(arg0); +ffi.Pointer _ObjCBlock_NSArray_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSArray_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer _ObjCBlock_NSArray_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSArray_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSArray_ffiVoid_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSArray_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); - @override - CUPHTTPForwardedData init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return CUPHTTPForwardedData._(_ret, _lib, retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_NSArray_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static CUPHTTPForwardedData new1(NativeCupertinoHttp _lib) { - final _ret = - _lib._objc_msgSend_2(_lib._class_CUPHTTPForwardedData1, _lib._sel_new1); - return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunction(objc.NSArray Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSArray_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSArray_ffiVoid_CallExtension + on objc.ObjCBlock)> { + objc.NSArray call(ffi.Pointer arg0) => objc.NSArray.castFromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); +} + +/// NSItemProviderReading +abstract final class NSItemProviderReading { + /// Builds an object that implements the NSItemProviderReading protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {required Dartinstancetype? Function(objc.NSData, objc.NSString, + ffi.Pointer>) + objectWithItemProviderData_typeIdentifier_error_, + required objc.NSArray Function() + readableTypeIdentifiersForItemProvider}) { + final builder = objc.ObjCProtocolBuilder(); + NSItemProviderReading.objectWithItemProviderData_typeIdentifier_error_ + .implement(builder, objectWithItemProviderData_typeIdentifier_error_); + NSItemProviderReading.readableTypeIdentifiersForItemProvider + .implement(builder, readableTypeIdentifiersForItemProvider); + return builder.build(); + } + + /// Adds the implementation of the NSItemProviderReading protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {required Dartinstancetype? Function(objc.NSData, objc.NSString, + ffi.Pointer>) + objectWithItemProviderData_typeIdentifier_error_, + required objc.NSArray Function() + readableTypeIdentifiersForItemProvider}) { + NSItemProviderReading.objectWithItemProviderData_typeIdentifier_error_ + .implement(builder, objectWithItemProviderData_typeIdentifier_error_); + NSItemProviderReading.readableTypeIdentifiersForItemProvider + .implement(builder, readableTypeIdentifiersForItemProvider); + } + + /// objectWithItemProviderData:typeIdentifier:error: + static final objectWithItemProviderData_typeIdentifier_error_ = + objc.ObjCProtocolMethod< + Dartinstancetype? Function(objc.NSData, objc.NSString, + ffi.Pointer>)>( + _sel_objectWithItemProviderData_typeIdentifier_error_, + objc.getProtocolMethodSignature( + _protocol_NSItemProviderReading, + _sel_objectWithItemProviderData_typeIdentifier_error_, + isRequired: true, + isInstanceMethod: false, + ), + (Dartinstancetype? Function(objc.NSData, objc.NSString, + ffi.Pointer>) + func) => + ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError.fromFunction( + (ffi.Pointer _, objc.NSData arg1, objc.NSString arg2, + ffi.Pointer> arg3) => + func(arg1, arg2, arg3)), + ); + + /// readableTypeIdentifiersForItemProvider + static final readableTypeIdentifiersForItemProvider = + objc.ObjCProtocolMethod( + _sel_readableTypeIdentifiersForItemProvider, + objc.getProtocolMethodSignature( + _protocol_NSItemProviderReading, + _sel_readableTypeIdentifiersForItemProvider, + isRequired: true, + isInstanceMethod: false, + ), + (objc.NSArray Function() func) => ObjCBlock_NSArray_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + ); +} + +late final _protocol_NSItemProviderReading = + objc.getProtocol("NSItemProviderReading"); +late final _sel_objectWithItemProviderData_typeIdentifier_error_ = + objc.registerName("objectWithItemProviderData:typeIdentifier:error:"); +instancetype + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>()( + arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>( + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline) + .cast(); +instancetype + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3) => + (objc.getBlockClosure(block) as instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable = + ffi.Pointer.fromFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>( + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)>`. +abstract final class ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Pointer? Function( + ffi.Pointer, + objc.NSData, + objc.NSString, + ffi.Pointer>)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer? Function( + ffi.Pointer, + objc.NSData, + objc.NSString, + ffi.Pointer>)>(pointer, retain: retain, release: release); - static CUPHTTPForwardedData allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_CUPHTTPForwardedData1, _lib._sel_allocWithZone_1, zone); - return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Pointer? Function( + ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>> ptr) => + objc.ObjCBlock< + ffi.Pointer? Function( + ffi.Pointer, + objc.NSData, + objc.NSString, + ffi.Pointer>)>( + objc.newPointerBlock(_ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - static CUPHTTPForwardedData alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedData1, _lib._sel_alloc1); - return CUPHTTPForwardedData._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)> + fromFunction(Dartinstancetype? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>) fn) => + objc.ObjCBlock? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)>( + objc.newClosureBlock( + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3) => + fn(arg0, objc.NSData.castFromPointer(arg1, retain: true, release: true), objc.NSString.castFromPointer(arg2, retain: true, release: true), arg3)?.ref.retainAndAutorelease() ?? + ffi.nullptr), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)>`. +extension ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_CallExtension + on objc.ObjCBlock< + ffi.Pointer? Function( + ffi.Pointer, + objc.NSData, + objc.NSString, + ffi.Pointer>)> { + Dartinstancetype? call(ffi.Pointer arg0, objc.NSData arg1, objc.NSString arg2, ffi.Pointer> arg3) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>() + (ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3) + .address == + 0 + ? null + : objc.ObjCObjectBase( + ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>>().asFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>()(ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3), + retain: true, + release: true); } -class CUPHTTPForwardedComplete extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedComplete._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [CUPHTTPForwardedComplete] that points to the same underlying object as [other]. - static CUPHTTPForwardedComplete castFrom(T other) { - return CUPHTTPForwardedComplete._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [CUPHTTPForwardedComplete] that wraps the given raw object pointer. - static CUPHTTPForwardedComplete castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedComplete._(other, lib, - retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [CUPHTTPForwardedComplete]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedComplete1); - } - - NSObject initWithSession_task_error_( - NSURLSession session, NSURLSessionTask task, NSError? error) { - final _ret = _lib._objc_msgSend_545( - _id, - _lib._sel_initWithSession_task_error_1, - session._id, - task._id, - error?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); - } - - NSError? get error { - final _ret = _lib._objc_msgSend_353(_id, _lib._sel_error1); - return _ret.address == 0 - ? null - : NSError._(_ret, _lib, retain: true, release: true); - } - - @override - CUPHTTPForwardedComplete init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return CUPHTTPForwardedComplete._(_ret, _lib, retain: true, release: true); - } +late final _sel_readableTypeIdentifiersForItemProvider = + objc.registerName("readableTypeIdentifiersForItemProvider"); +typedef NSStringEncoding = NSUInteger; +typedef NSStringTransform = ffi.Pointer; +typedef DartNSStringTransform = objc.NSString; +typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; +typedef DartNSStringEncodingDetectionOptionsKey = objc.NSString; +typedef NSExceptionName = ffi.Pointer; +typedef DartNSExceptionName = objc.NSString; + +/// NSURLHandleClient +abstract final class NSURLHandleClient { + /// Builds an object that implements the NSURLHandleClient protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {required void Function(objc.NSURLHandle, objc.NSData) + URLHandle_resourceDataDidBecomeAvailable_, + required void Function(objc.NSURLHandle) + URLHandleResourceDidBeginLoading_, + required void Function(objc.NSURLHandle) + URLHandleResourceDidFinishLoading_, + required void Function(objc.NSURLHandle) + URLHandleResourceDidCancelLoading_, + required void Function(objc.NSURLHandle, objc.NSString) + URLHandle_resourceDidFailLoadingWithReason_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLHandleClient.URLHandle_resourceDataDidBecomeAvailable_.implement( + builder, URLHandle_resourceDataDidBecomeAvailable_); + NSURLHandleClient.URLHandleResourceDidBeginLoading_.implement( + builder, URLHandleResourceDidBeginLoading_); + NSURLHandleClient.URLHandleResourceDidFinishLoading_.implement( + builder, URLHandleResourceDidFinishLoading_); + NSURLHandleClient.URLHandleResourceDidCancelLoading_.implement( + builder, URLHandleResourceDidCancelLoading_); + NSURLHandleClient.URLHandle_resourceDidFailLoadingWithReason_.implement( + builder, URLHandle_resourceDidFailLoadingWithReason_); + return builder.build(); + } + + /// Adds the implementation of the NSURLHandleClient protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {required void Function(objc.NSURLHandle, objc.NSData) + URLHandle_resourceDataDidBecomeAvailable_, + required void Function(objc.NSURLHandle) + URLHandleResourceDidBeginLoading_, + required void Function(objc.NSURLHandle) + URLHandleResourceDidFinishLoading_, + required void Function(objc.NSURLHandle) + URLHandleResourceDidCancelLoading_, + required void Function(objc.NSURLHandle, objc.NSString) + URLHandle_resourceDidFailLoadingWithReason_}) { + NSURLHandleClient.URLHandle_resourceDataDidBecomeAvailable_.implement( + builder, URLHandle_resourceDataDidBecomeAvailable_); + NSURLHandleClient.URLHandleResourceDidBeginLoading_.implement( + builder, URLHandleResourceDidBeginLoading_); + NSURLHandleClient.URLHandleResourceDidFinishLoading_.implement( + builder, URLHandleResourceDidFinishLoading_); + NSURLHandleClient.URLHandleResourceDidCancelLoading_.implement( + builder, URLHandleResourceDidCancelLoading_); + NSURLHandleClient.URLHandle_resourceDidFailLoadingWithReason_.implement( + builder, URLHandle_resourceDidFailLoadingWithReason_); + } + + /// Builds an object that implements the NSURLHandleClient protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {required void Function(objc.NSURLHandle, objc.NSData) + URLHandle_resourceDataDidBecomeAvailable_, + required void Function(objc.NSURLHandle) + URLHandleResourceDidBeginLoading_, + required void Function(objc.NSURLHandle) + URLHandleResourceDidFinishLoading_, + required void Function(objc.NSURLHandle) + URLHandleResourceDidCancelLoading_, + required void Function(objc.NSURLHandle, objc.NSString) + URLHandle_resourceDidFailLoadingWithReason_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLHandleClient.URLHandle_resourceDataDidBecomeAvailable_ + .implementAsListener( + builder, URLHandle_resourceDataDidBecomeAvailable_); + NSURLHandleClient.URLHandleResourceDidBeginLoading_.implementAsListener( + builder, URLHandleResourceDidBeginLoading_); + NSURLHandleClient.URLHandleResourceDidFinishLoading_.implementAsListener( + builder, URLHandleResourceDidFinishLoading_); + NSURLHandleClient.URLHandleResourceDidCancelLoading_.implementAsListener( + builder, URLHandleResourceDidCancelLoading_); + NSURLHandleClient.URLHandle_resourceDidFailLoadingWithReason_ + .implementAsListener( + builder, URLHandle_resourceDidFailLoadingWithReason_); + return builder.build(); + } + + /// Adds the implementation of the NSURLHandleClient protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {required void Function(objc.NSURLHandle, objc.NSData) + URLHandle_resourceDataDidBecomeAvailable_, + required void Function(objc.NSURLHandle) + URLHandleResourceDidBeginLoading_, + required void Function(objc.NSURLHandle) + URLHandleResourceDidFinishLoading_, + required void Function(objc.NSURLHandle) + URLHandleResourceDidCancelLoading_, + required void Function(objc.NSURLHandle, objc.NSString) + URLHandle_resourceDidFailLoadingWithReason_}) { + NSURLHandleClient.URLHandle_resourceDataDidBecomeAvailable_ + .implementAsListener( + builder, URLHandle_resourceDataDidBecomeAvailable_); + NSURLHandleClient.URLHandleResourceDidBeginLoading_.implementAsListener( + builder, URLHandleResourceDidBeginLoading_); + NSURLHandleClient.URLHandleResourceDidFinishLoading_.implementAsListener( + builder, URLHandleResourceDidFinishLoading_); + NSURLHandleClient.URLHandleResourceDidCancelLoading_.implementAsListener( + builder, URLHandleResourceDidCancelLoading_); + NSURLHandleClient.URLHandle_resourceDidFailLoadingWithReason_ + .implementAsListener( + builder, URLHandle_resourceDidFailLoadingWithReason_); + } + + /// URLHandle:resourceDataDidBecomeAvailable: + static final URLHandle_resourceDataDidBecomeAvailable_ = + objc.ObjCProtocolListenableMethod< + void Function(objc.NSURLHandle, objc.NSData)>( + _sel_URLHandle_resourceDataDidBecomeAvailable_, + objc.getProtocolMethodSignature( + _protocol_NSURLHandleClient, + _sel_URLHandle_resourceDataDidBecomeAvailable_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(objc.NSURLHandle, objc.NSData) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData.fromFunction( + (ffi.Pointer _, objc.NSURLHandle arg1, + objc.NSData arg2) => + func(arg1, arg2)), + (void Function(objc.NSURLHandle, objc.NSData) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData.listener( + (ffi.Pointer _, objc.NSURLHandle arg1, + objc.NSData arg2) => + func(arg1, arg2)), + ); + + /// URLHandleResourceDidBeginLoading: + static final URLHandleResourceDidBeginLoading_ = + objc.ObjCProtocolListenableMethod( + _sel_URLHandleResourceDidBeginLoading_, + objc.getProtocolMethodSignature( + _protocol_NSURLHandleClient, + _sel_URLHandleResourceDidBeginLoading_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(objc.NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.fromFunction( + (ffi.Pointer _, objc.NSURLHandle arg1) => func(arg1)), + (void Function(objc.NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.listener( + (ffi.Pointer _, objc.NSURLHandle arg1) => func(arg1)), + ); + + /// URLHandleResourceDidFinishLoading: + static final URLHandleResourceDidFinishLoading_ = + objc.ObjCProtocolListenableMethod( + _sel_URLHandleResourceDidFinishLoading_, + objc.getProtocolMethodSignature( + _protocol_NSURLHandleClient, + _sel_URLHandleResourceDidFinishLoading_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(objc.NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.fromFunction( + (ffi.Pointer _, objc.NSURLHandle arg1) => func(arg1)), + (void Function(objc.NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.listener( + (ffi.Pointer _, objc.NSURLHandle arg1) => func(arg1)), + ); + + /// URLHandleResourceDidCancelLoading: + static final URLHandleResourceDidCancelLoading_ = + objc.ObjCProtocolListenableMethod( + _sel_URLHandleResourceDidCancelLoading_, + objc.getProtocolMethodSignature( + _protocol_NSURLHandleClient, + _sel_URLHandleResourceDidCancelLoading_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(objc.NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.fromFunction( + (ffi.Pointer _, objc.NSURLHandle arg1) => func(arg1)), + (void Function(objc.NSURLHandle) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.listener( + (ffi.Pointer _, objc.NSURLHandle arg1) => func(arg1)), + ); + + /// URLHandle:resourceDidFailLoadingWithReason: + static final URLHandle_resourceDidFailLoadingWithReason_ = + objc.ObjCProtocolListenableMethod< + void Function(objc.NSURLHandle, objc.NSString)>( + _sel_URLHandle_resourceDidFailLoadingWithReason_, + objc.getProtocolMethodSignature( + _protocol_NSURLHandleClient, + _sel_URLHandle_resourceDidFailLoadingWithReason_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(objc.NSURLHandle, objc.NSString) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString.fromFunction( + (ffi.Pointer _, objc.NSURLHandle arg1, + objc.NSString arg2) => + func(arg1, arg2)), + (void Function(objc.NSURLHandle, objc.NSString) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString.listener( + (ffi.Pointer _, objc.NSURLHandle arg1, + objc.NSString arg2) => + func(arg1, arg2)), + ); +} + +late final _protocol_NSURLHandleClient = objc.getProtocol("NSURLHandleClient"); +late final _sel_URLHandle_resourceDataDidBecomeAvailable_ = + objc.registerName("URLHandle:resourceDataDidBecomeAvailable:"); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, objc.NSURLHandle, objc.NSData)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, objc.NSURLHandle, objc.NSData)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, objc.NSURLHandle, + objc.NSData)>(pointer, retain: retain, release: release); - static CUPHTTPForwardedComplete new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedComplete1, _lib._sel_new1); - return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, objc.NSURLHandle, objc.NSData)> + fromFunctionPointer( + ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock, objc.NSURLHandle, objc.NSData)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - static CUPHTTPForwardedComplete allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_CUPHTTPForwardedComplete1, _lib._sel_allocWithZone_1, zone); - return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, objc.NSURLHandle, objc.NSData)> + fromFunction(void Function(ffi.Pointer, objc.NSURLHandle, objc.NSData) fn) => + objc.ObjCBlock, objc.NSURLHandle, objc.NSData)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + arg0, + objc.NSURLHandle.castFromPointer(arg1, retain: true, release: true), + objc.NSData.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); - static CUPHTTPForwardedComplete alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedComplete1, _lib._sel_alloc1); - return CUPHTTPForwardedComplete._(_ret, _lib, retain: false, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, objc.NSURLHandle, objc.NSData)> listener( + void Function(ffi.Pointer, objc.NSURLHandle, objc.NSData) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0, + objc.NSURLHandle.castFromPointer(arg1, + retain: false, release: true), + objc.NSData.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_tm2na8(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, objc.NSURLHandle, + objc.NSData)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, objc.NSURLHandle, objc.NSData)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, objc.NSURLHandle, objc.NSData)> { + void call(ffi.Pointer arg0, objc.NSURLHandle arg1, + objc.NSData arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer); } -class CUPHTTPForwardedFinishedDownloading extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedFinishedDownloading._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [CUPHTTPForwardedFinishedDownloading] that points to the same underlying object as [other]. - static CUPHTTPForwardedFinishedDownloading castFrom( - T other) { - return CUPHTTPForwardedFinishedDownloading._(other._id, other._lib, - retain: true, release: true); - } +late final _sel_URLHandleResourceDidBeginLoading_ = + objc.registerName("URLHandleResourceDidBeginLoading:"); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_listenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, objc.NSURLHandle)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock, objc.NSURLHandle)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + objc.NSURLHandle)>(pointer, retain: retain, release: release); - /// Returns a [CUPHTTPForwardedFinishedDownloading] that wraps the given raw object pointer. - static CUPHTTPForwardedFinishedDownloading castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedFinishedDownloading._(other, lib, - retain: retain, release: release); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.NSURLHandle)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, objc.NSURLHandle)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Returns whether [obj] is an instance of [CUPHTTPForwardedFinishedDownloading]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedFinishedDownloading1); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.NSURLHandle)> + fromFunction(void Function(ffi.Pointer, objc.NSURLHandle) fn) => + objc.ObjCBlock, objc.NSURLHandle)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + objc.NSURLHandle.castFromPointer(arg1, + retain: true, release: true))), + retain: false, + release: true); - NSObject initWithSession_downloadTask_url_(NSURLSession session, - NSURLSessionDownloadTask downloadTask, NSURL location) { - final _ret = _lib._objc_msgSend_546( - _id, - _lib._sel_initWithSession_downloadTask_url_1, - session._id, - downloadTask._id, - location._id); - return NSObject._(_ret, _lib, retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc + .ObjCBlock, objc.NSURLHandle)> + listener(void Function(ffi.Pointer, objc.NSURLHandle) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + objc.NSURLHandle.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_sjfpmz(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, objc.NSURLHandle)>(wrapper, + retain: false, release: true); } +} - NSURL get location { - final _ret = _lib._objc_msgSend_547(_id, _lib._sel_location1); - return NSURL._(_ret, _lib, retain: true, release: true); - } +/// Call operator for `objc.ObjCBlock, objc.NSURLHandle)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_CallExtension on objc + .ObjCBlock, objc.NSURLHandle)> { + void call(ffi.Pointer arg0, objc.NSURLHandle arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer); +} + +late final _sel_URLHandleResourceDidFinishLoading_ = + objc.registerName("URLHandleResourceDidFinishLoading:"); +late final _sel_URLHandleResourceDidCancelLoading_ = + objc.registerName("URLHandleResourceDidCancelLoading:"); +late final _sel_URLHandle_resourceDidFailLoadingWithReason_ = + objc.registerName("URLHandle:resourceDidFailLoadingWithReason:"); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, objc.NSURLHandle, objc.NSString)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, objc.NSURLHandle, objc.NSString)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, objc.NSURLHandle, + objc.NSString)>(pointer, retain: retain, release: release); - @override - CUPHTTPForwardedFinishedDownloading init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, - retain: true, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, objc.NSURLHandle, objc.NSString)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, objc.NSURLHandle, objc.NSString)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); - static CUPHTTPForwardedFinishedDownloading new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_new1); - return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, - retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, objc.NSURLHandle, objc.NSString)> + fromFunction(void Function(ffi.Pointer, objc.NSURLHandle, objc.NSString) fn) => + objc.ObjCBlock, objc.NSURLHandle, objc.NSString)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + arg0, + objc.NSURLHandle.castFromPointer(arg1, retain: true, release: true), + objc.NSString.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); - static CUPHTTPForwardedFinishedDownloading allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_CUPHTTPForwardedFinishedDownloading1, - _lib._sel_allocWithZone_1, - zone); - return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, - retain: false, release: true); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, objc.NSURLHandle, objc.NSString)> listener( + void Function(ffi.Pointer, objc.NSURLHandle, objc.NSString) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0, + objc.NSURLHandle.castFromPointer(arg1, + retain: false, release: true), + objc.NSString.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _wrapListenerBlock_tm2na8(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, objc.NSURLHandle, + objc.NSString)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, objc.NSURLHandle, objc.NSString)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, objc.NSURLHandle, objc.NSString)> { + void call(ffi.Pointer arg0, objc.NSURLHandle arg1, + objc.NSString arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer); +} + +typedef NSURLResourceKey = ffi.Pointer; +typedef DartNSURLResourceKey = objc.NSString; +typedef NSURLFileResourceType = ffi.Pointer; +typedef DartNSURLFileResourceType = objc.NSString; +typedef NSURLThumbnailDictionaryItem = ffi.Pointer; +typedef DartNSURLThumbnailDictionaryItem = objc.NSString; +typedef NSURLFileProtectionType = ffi.Pointer; +typedef DartNSURLFileProtectionType = objc.NSString; +typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; +typedef DartNSURLUbiquitousItemDownloadingStatus = objc.NSString; +typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; +typedef DartNSURLUbiquitousSharedItemRole = objc.NSString; +typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; +typedef DartNSURLUbiquitousSharedItemPermissions = objc.NSString; + +/// NSLocking +abstract final class NSLocking { + /// Builds an object that implements the NSLocking protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {required void Function() lock, required void Function() unlock}) { + final builder = objc.ObjCProtocolBuilder(); + NSLocking.lock.implement(builder, lock); + NSLocking.unlock.implement(builder, unlock); + return builder.build(); + } + + /// Adds the implementation of the NSLocking protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {required void Function() lock, required void Function() unlock}) { + NSLocking.lock.implement(builder, lock); + NSLocking.unlock.implement(builder, unlock); + } + + /// Builds an object that implements the NSLocking protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {required void Function() lock, required void Function() unlock}) { + final builder = objc.ObjCProtocolBuilder(); + NSLocking.lock.implementAsListener(builder, lock); + NSLocking.unlock.implementAsListener(builder, unlock); + return builder.build(); + } + + /// Adds the implementation of the NSLocking protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {required void Function() lock, required void Function() unlock}) { + NSLocking.lock.implementAsListener(builder, lock); + NSLocking.unlock.implementAsListener(builder, unlock); + } + + /// lock + static final lock = objc.ObjCProtocolListenableMethod( + _sel_lock, + objc.getProtocolMethodSignature( + _protocol_NSLocking, + _sel_lock, + isRequired: true, + isInstanceMethod: true, + ), + (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.listener(( + ffi.Pointer _, + ) => + func()), + ); + + /// unlock + static final unlock = objc.ObjCProtocolListenableMethod( + _sel_unlock, + objc.getProtocolMethodSignature( + _protocol_NSLocking, + _sel_unlock, + isRequired: true, + isInstanceMethod: true, + ), + (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.fromFunction(( + ffi.Pointer _, + ) => + func()), + (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.listener(( + ffi.Pointer _, + ) => + func()), + ); +} + +late final _protocol_NSLocking = objc.getProtocol("NSLocking"); +late final _sel_lock = objc.registerName("lock"); +late final _sel_unlock = objc.registerName("unlock"); + +/// NSException +class NSException extends objc.NSObject { + NSException._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static CUPHTTPForwardedFinishedDownloading alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedFinishedDownloading1, _lib._sel_alloc1); - return CUPHTTPForwardedFinishedDownloading._(_ret, _lib, - retain: false, release: true); - } -} + /// Constructs a [NSException] that points to the same underlying object as [other]. + NSException.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); -class CUPHTTPForwardedWebSocketOpened extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedWebSocketOpened._( - ffi.Pointer id, NativeCupertinoHttp lib, + /// Constructs a [NSException] that wraps the given raw object pointer. + NSException.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); - - /// Returns a [CUPHTTPForwardedWebSocketOpened] that points to the same underlying object as [other]. - static CUPHTTPForwardedWebSocketOpened castFrom( - T other) { - return CUPHTTPForwardedWebSocketOpened._(other._id, other._lib, - retain: true, release: true); - } + : this._(other, retain: retain, release: release); - /// Returns a [CUPHTTPForwardedWebSocketOpened] that wraps the given raw object pointer. - static CUPHTTPForwardedWebSocketOpened castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedWebSocketOpened._(other, lib, - retain: retain, release: release); + /// Returns whether [obj] is an instance of [NSException]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSException); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedWebSocketOpened]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedWebSocketOpened1); + /// exceptionWithName:reason:userInfo: + static NSException exceptionWithName_reason_userInfo_( + DartNSExceptionName name, + objc.NSString? reason, + objc.NSDictionary? userInfo) { + final _ret = _objc_msgSend_aud7dn( + _class_NSException, + _sel_exceptionWithName_reason_userInfo_, + name.ref.pointer, + reason?.ref.pointer ?? ffi.nullptr, + userInfo?.ref.pointer ?? ffi.nullptr); + return NSException.castFromPointer(_ret, retain: true, release: true); + } + + /// initWithName:reason:userInfo: + NSException initWithName_reason_userInfo_(DartNSExceptionName aName, + objc.NSString? aReason, objc.NSDictionary? aUserInfo) { + final _ret = _objc_msgSend_aud7dn( + this.ref.retainAndReturnPointer(), + _sel_initWithName_reason_userInfo_, + aName.ref.pointer, + aReason?.ref.pointer ?? ffi.nullptr, + aUserInfo?.ref.pointer ?? ffi.nullptr); + return NSException.castFromPointer(_ret, retain: false, release: true); + } + + /// name + DartNSExceptionName get name { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject initWithSession_webSocketTask_didOpenWithProtocol_( - NSURLSession session, - NSURLSessionWebSocketTask webSocketTask, - NSString? protocol) { - final _ret = _lib._objc_msgSend_548( - _id, - _lib._sel_initWithSession_webSocketTask_didOpenWithProtocol_1, - session._id, - webSocketTask._id, - protocol?._id ?? ffi.nullptr); - return NSObject._(_ret, _lib, retain: true, release: true); + /// reason + objc.NSString? get reason { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_reason); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get protocol { - final _ret = _lib._objc_msgSend_55(_id, _lib._sel_protocol1); + /// userInfo + objc.NSDictionary? get userInfo { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_userInfo); return _ret.address == 0 ? null - : NSString._(_ret, _lib, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - @override - CUPHTTPForwardedWebSocketOpened init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return CUPHTTPForwardedWebSocketOpened._(_ret, _lib, - retain: true, release: true); + /// callStackReturnAddresses + objc.NSArray get callStackReturnAddresses { + final _ret = + _objc_msgSend_1unuoxw(this.ref.pointer, _sel_callStackReturnAddresses); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static CUPHTTPForwardedWebSocketOpened new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedWebSocketOpened1, _lib._sel_new1); - return CUPHTTPForwardedWebSocketOpened._(_ret, _lib, - retain: false, release: true); + /// callStackSymbols + objc.NSArray get callStackSymbols { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_callStackSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static CUPHTTPForwardedWebSocketOpened allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_CUPHTTPForwardedWebSocketOpened1, - _lib._sel_allocWithZone_1, - zone); - return CUPHTTPForwardedWebSocketOpened._(_ret, _lib, - retain: false, release: true); + /// raise + void raise() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_raise); } - static CUPHTTPForwardedWebSocketOpened alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedWebSocketOpened1, _lib._sel_alloc1); - return CUPHTTPForwardedWebSocketOpened._(_ret, _lib, - retain: false, release: true); + /// raise:format: + static void raise_format_(DartNSExceptionName name, objc.NSString format) { + _objc_msgSend_1tjlcwl(_class_NSException, _sel_raise_format_, + name.ref.pointer, format.ref.pointer); } -} -class CUPHTTPForwardedWebSocketClosed extends CUPHTTPForwardedDelegate { - CUPHTTPForwardedWebSocketClosed._( - ffi.Pointer id, NativeCupertinoHttp lib, - {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + /// init + NSException init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSException.castFromPointer(_ret, retain: false, release: true); + } - /// Returns a [CUPHTTPForwardedWebSocketClosed] that points to the same underlying object as [other]. - static CUPHTTPForwardedWebSocketClosed castFrom( - T other) { - return CUPHTTPForwardedWebSocketClosed._(other._id, other._lib, - retain: true, release: true); + /// new + static NSException new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSException, _sel_new); + return NSException.castFromPointer(_ret, retain: false, release: true); } - /// Returns a [CUPHTTPForwardedWebSocketClosed] that wraps the given raw object pointer. - static CUPHTTPForwardedWebSocketClosed castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPForwardedWebSocketClosed._(other, lib, - retain: retain, release: release); + /// allocWithZone: + static NSException allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSException, _sel_allocWithZone_, zone); + return NSException.castFromPointer(_ret, retain: false, release: true); } - /// Returns whether [obj] is an instance of [CUPHTTPForwardedWebSocketClosed]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPForwardedWebSocketClosed1); + /// alloc + static NSException alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSException, _sel_alloc); + return NSException.castFromPointer(_ret, retain: false, release: true); } - NSObject initWithSession_webSocketTask_code_reason_(NSURLSession session, - NSURLSessionWebSocketTask webSocketTask, int closeCode, NSData reason) { - final _ret = _lib._objc_msgSend_549( - _id, - _lib._sel_initWithSession_webSocketTask_code_reason_1, - session._id, - webSocketTask._id, - closeCode, - reason._id); - return NSObject._(_ret, _lib, retain: true, release: true); + /// supportsSecureCoding + static bool supportsSecureCoding() { + return _objc_msgSend_olxnu1(_class_NSException, _sel_supportsSecureCoding); } - int get closeCode { - return _lib._objc_msgSend_477(_id, _lib._sel_closeCode1); + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } - NSData? get reason { - final _ret = _lib._objc_msgSend_348(_id, _lib._sel_reason1); + /// initWithCoder: + NSException? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null - : NSData._(_ret, _lib, retain: true, release: true); - } - - @override - CUPHTTPForwardedWebSocketClosed init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return CUPHTTPForwardedWebSocketClosed._(_ret, _lib, - retain: true, release: true); - } - - static CUPHTTPForwardedWebSocketClosed new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedWebSocketClosed1, _lib._sel_new1); - return CUPHTTPForwardedWebSocketClosed._(_ret, _lib, - retain: false, release: true); - } - - static CUPHTTPForwardedWebSocketClosed allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_CUPHTTPForwardedWebSocketClosed1, - _lib._sel_allocWithZone_1, - zone); - return CUPHTTPForwardedWebSocketClosed._(_ret, _lib, - retain: false, release: true); - } - - static CUPHTTPForwardedWebSocketClosed alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPForwardedWebSocketClosed1, _lib._sel_alloc1); - return CUPHTTPForwardedWebSocketClosed._(_ret, _lib, - retain: false, release: true); - } -} + : NSException.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSException = objc.getClass("NSException"); +late final _sel_exceptionWithName_reason_userInfo_ = + objc.registerName("exceptionWithName:reason:userInfo:"); +late final _sel_initWithName_reason_userInfo_ = + objc.registerName("initWithName:reason:userInfo:"); +late final _sel_reason = objc.registerName("reason"); +late final _sel_callStackReturnAddresses = + objc.registerName("callStackReturnAddresses"); +late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); +late final _sel_raise = objc.registerName("raise"); +late final _sel_raise_format_ = objc.registerName("raise:format:"); +typedef NSUncaughtExceptionHandler = ffi + .NativeFunction exception)>; +typedef NSErrorDomain = ffi.Pointer; +typedef DartNSErrorDomain = objc.NSString; +typedef NSErrorUserInfoKey = ffi.Pointer; +typedef DartNSErrorUserInfoKey = objc.NSString; +typedef _DidFinish = ffi.Pointer; +typedef Dart_DidFinish = objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)>; +typedef _DidFinishWithLock = ffi.Pointer; +typedef Dart_DidFinishWithLock = objc.ObjCBlock< + ffi.Void Function( + NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>; +void + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + NSCondition, + NSURLSession, + NSURLSessionDownloadTask, + objc.NSURL)>(pointer, retain: retain, release: release); -abstract class NSStreamEvent { - static const int NSStreamEventNone = 0; - static const int NSStreamEventOpenCompleted = 1; - static const int NSStreamEventHasBytesAvailable = 2; - static const int NSStreamEventHasSpaceAvailable = 4; - static const int NSStreamEventErrorOccurred = 8; - static const int NSStreamEventEndEncountered = 16; -} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(NSCondition, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); -typedef NSStreamSocketSecurityLevel = ffi.Pointer; -typedef DartNSStreamSocketSecurityLevel = NSString; -typedef NSStreamSOCKSProxyConfiguration = ffi.Pointer; -typedef DartNSStreamSOCKSProxyConfiguration = NSString; -typedef NSStreamSOCKSProxyVersion = ffi.Pointer; -typedef DartNSStreamSOCKSProxyVersion = NSString; -typedef NSErrorDomain1 = ffi.Pointer; -typedef DartNSErrorDomain1 = NSString; -typedef NSStreamNetworkServiceTypeValue = ffi.Pointer; -typedef DartNSStreamNetworkServiceTypeValue = NSString; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction(void Function(NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + NSCondition.castFromPointer(arg0, retain: true, release: true), + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, retain: true, release: true), + objc.NSURL.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); -/// A helper to convert a Dart Stream> into an Objective-C input stream. -class CUPHTTPStreamToNSInputStreamAdapter extends NSInputStream { - CUPHTTPStreamToNSInputStreamAdapter._( - ffi.Pointer id, NativeCupertinoHttp lib, + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(NSCondition, NSURLSession, NSURLSessionDownloadTask, + objc.NSURL)> listener( + void Function( + NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + NSCondition.castFromPointer(arg0, retain: false, release: true), + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, + retain: false, release: true), + objc.NSURL + .castFromPointer(arg3, retain: false, release: true))); + final wrapper = _wrapListenerBlock_19b8ge5(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(NSCondition, NSURLSession, NSURLSessionDownloadTask, + objc.NSURL)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)> { + void call(NSCondition arg0, NSURLSession arg1, NSURLSessionDownloadTask arg2, + objc.NSURL arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0.ref.pointer, + arg1.ref.pointer, + arg2.ref.pointer, + arg3.ref.pointer); +} + +/// NSCondition +class NSCondition extends objc.NSObject { + NSCondition._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(id, lib, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [CUPHTTPStreamToNSInputStreamAdapter] that points to the same underlying object as [other]. - static CUPHTTPStreamToNSInputStreamAdapter castFrom( - T other) { - return CUPHTTPStreamToNSInputStreamAdapter._(other._id, other._lib, - retain: true, release: true); - } - - /// Returns a [CUPHTTPStreamToNSInputStreamAdapter] that wraps the given raw object pointer. - static CUPHTTPStreamToNSInputStreamAdapter castFromPointer( - NativeCupertinoHttp lib, ffi.Pointer other, - {bool retain = false, bool release = false}) { - return CUPHTTPStreamToNSInputStreamAdapter._(other, lib, - retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [CUPHTTPStreamToNSInputStreamAdapter]. - static bool isInstance(_ObjCWrapper obj) { - return obj._lib._objc_msgSend_0(obj._id, obj._lib._sel_isKindOfClass_1, - obj._lib._class_CUPHTTPStreamToNSInputStreamAdapter1); - } - - CUPHTTPStreamToNSInputStreamAdapter initWithPort_(DartDart_Port sendPort) { - final _ret = - _lib._objc_msgSend_533(_id, _lib._sel_initWithPort_1, sendPort); - return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: true, release: true); - } + /// Constructs a [NSCondition] that points to the same underlying object as [other]. + NSCondition.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - DartNSUInteger addData_(NSData data) { - return _lib._objc_msgSend_550(_id, _lib._sel_addData_1, data._id); - } + /// Constructs a [NSCondition] that wraps the given raw object pointer. + NSCondition.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - void setDone() { - _lib._objc_msgSend_1(_id, _lib._sel_setDone1); + /// Returns whether [obj] is an instance of [NSCondition]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_l8lotg( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSCondition); } - void setError_(NSError error) { - _lib._objc_msgSend_551(_id, _lib._sel_setError_1, error._id); + /// wait + void wait1() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_wait); } - @override - CUPHTTPStreamToNSInputStreamAdapter initWithData_(NSData data) { - final _ret = - _lib._objc_msgSend_228(_id, _lib._sel_initWithData_1, data._id); - return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: true, release: true); + /// waitUntilDate: + bool waitUntilDate_(objc.NSDate limit) { + return _objc_msgSend_l8lotg( + this.ref.pointer, _sel_waitUntilDate_, limit.ref.pointer); } - @override - CUPHTTPStreamToNSInputStreamAdapter? initWithURL_(NSURL url) { - final _ret = _lib._objc_msgSend_226(_id, _lib._sel_initWithURL_1, url._id); - return _ret.address == 0 - ? null - : CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: true, release: true); + /// signal + void signal() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_signal); } - @override - CUPHTTPStreamToNSInputStreamAdapter? initWithFileAtPath_(NSString path) { - final _ret = - _lib._objc_msgSend_49(_id, _lib._sel_initWithFileAtPath_1, path._id); - return _ret.address == 0 - ? null - : CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: true, release: true); + /// broadcast + void broadcast() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_broadcast); } - static CUPHTTPStreamToNSInputStreamAdapter? inputStreamWithData_( - NativeCupertinoHttp _lib, NSData data) { - final _ret = _lib._objc_msgSend_361( - _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, - _lib._sel_inputStreamWithData_1, - data._id); + /// name + objc.NSString? get name { + final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); return _ret.address == 0 ? null - : CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static CUPHTTPStreamToNSInputStreamAdapter? inputStreamWithFileAtPath_( - NativeCupertinoHttp _lib, NSString path) { - final _ret = _lib._objc_msgSend_49( - _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, - _lib._sel_inputStreamWithFileAtPath_1, - path._id); - return _ret.address == 0 - ? null - : CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: true, release: true); + /// setName: + set name(objc.NSString? value) { + return _objc_msgSend_ukcdfq( + this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); } - static CUPHTTPStreamToNSInputStreamAdapter? inputStreamWithURL_( - NativeCupertinoHttp _lib, NSURL url) { - final _ret = _lib._objc_msgSend_226( - _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, - _lib._sel_inputStreamWithURL_1, - url._id); - return _ret.address == 0 - ? null - : CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: true, release: true); + /// init + NSCondition init() { + final _ret = + _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + return NSCondition.castFromPointer(_ret, retain: false, release: true); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSString hostname, - DartNSInteger port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_357( - _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, - _lib._sel_getStreamsToHostWithName_port_inputStream_outputStream_1, - hostname._id, - port, - inputStream, - outputStream); - } - - static void getStreamsToHost_port_inputStream_outputStream_( - NativeCupertinoHttp _lib, - NSHost host, - DartNSInteger port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_358( - _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, - _lib._sel_getStreamsToHost_port_inputStream_outputStream_1, - host._id, - port, - inputStream, - outputStream); - } - - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - NativeCupertinoHttp _lib, - DartNSUInteger bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _lib._objc_msgSend_359( - _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, - _lib._sel_getBoundStreamsWithBufferSize_inputStream_outputStream_1, - bufferSize, - inputStream, - outputStream); + /// new + static NSCondition new1() { + final _ret = _objc_msgSend_1unuoxw(_class_NSCondition, _sel_new); + return NSCondition.castFromPointer(_ret, retain: false, release: true); } - @override - CUPHTTPStreamToNSInputStreamAdapter init() { - final _ret = _lib._objc_msgSend_2(_id, _lib._sel_init1); - return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: true, release: true); + /// allocWithZone: + static NSCondition allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_1b3ihd0(_class_NSCondition, _sel_allocWithZone_, zone); + return NSCondition.castFromPointer(_ret, retain: false, release: true); } - static CUPHTTPStreamToNSInputStreamAdapter new1(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_new1); - return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: false, release: true); + /// alloc + static NSCondition alloc() { + final _ret = _objc_msgSend_1unuoxw(_class_NSCondition, _sel_alloc); + return NSCondition.castFromPointer(_ret, retain: false, release: true); } - static CUPHTTPStreamToNSInputStreamAdapter allocWithZone_( - NativeCupertinoHttp _lib, ffi.Pointer<_NSZone> zone) { - final _ret = _lib._objc_msgSend_3( - _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, - _lib._sel_allocWithZone_1, - zone); - return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: false, release: true); + /// lock + void lock() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_lock); } - static CUPHTTPStreamToNSInputStreamAdapter alloc(NativeCupertinoHttp _lib) { - final _ret = _lib._objc_msgSend_2( - _lib._class_CUPHTTPStreamToNSInputStreamAdapter1, _lib._sel_alloc1); - return CUPHTTPStreamToNSInputStreamAdapter._(_ret, _lib, - retain: false, release: true); + /// unlock + void unlock() { + _objc_msgSend_ksby9f(this.ref.pointer, _sel_unlock); } } +late final _class_NSCondition = objc.getClass("NSCondition"); +late final _sel_wait = objc.registerName("wait"); +late final _sel_waitUntilDate_ = objc.registerName("waitUntilDate:"); +final _objc_msgSend_l8lotg = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_signal = objc.registerName("signal"); +late final _sel_broadcast = objc.registerName("broadcast"); + const int noErr = 0; const int kNilOptions = 0; @@ -95996,6 +78899,8 @@ const int CSSM_APPLE_PRIVATE_CSPDL_CODE_27 = 27; const int CSSM_APPLECSP_KEYDIGEST = 256; +const int CSSM_APPLECSP_PUBKEY = 257; + const int CSSM_KEYBLOB_WRAPPED_FORMAT_APPLE_CUSTOM = 100; const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSL = 101; @@ -96512,14 +79417,6 @@ const int NSProprietaryStringEncoding = 65536; const int NSOpenStepUnicodeReservedBase = 62464; -const int kNativeArgNumberPos = 0; - -const int kNativeArgNumberSize = 8; - -const int kNativeArgTypePos = 8; - -const int kNativeArgTypeSize = 8; - const int __API_TO_BE_DEPRECATED = 100000; const int __API_TO_BE_DEPRECATED_MACOS = 100000; @@ -96652,6 +79549,12 @@ const int __MAC_14_1 = 140100; const int __MAC_14_2 = 140200; +const int __MAC_14_3 = 140300; + +const int __MAC_14_4 = 140400; + +const int __MAC_14_5 = 140500; + const int __IPHONE_2_0 = 20000; const int __IPHONE_2_1 = 20100; @@ -96778,6 +79681,10 @@ const int __IPHONE_15_5 = 150500; const int __IPHONE_15_6 = 150600; +const int __IPHONE_15_7 = 150700; + +const int __IPHONE_15_8 = 150800; + const int __IPHONE_16_0 = 160000; const int __IPHONE_16_1 = 160100; @@ -96800,6 +79707,12 @@ const int __IPHONE_17_1 = 170100; const int __IPHONE_17_2 = 170200; +const int __IPHONE_17_3 = 170300; + +const int __IPHONE_17_4 = 170400; + +const int __IPHONE_17_5 = 170500; + const int __WATCHOS_1_0 = 10000; const int __WATCHOS_2_0 = 20000; @@ -96866,6 +79779,8 @@ const int __WATCHOS_8_6 = 80600; const int __WATCHOS_8_7 = 80700; +const int __WATCHOS_8_8 = 80800; + const int __WATCHOS_9_0 = 90000; const int __WATCHOS_9_1 = 90100; @@ -96886,6 +79801,12 @@ const int __WATCHOS_10_1 = 100100; const int __WATCHOS_10_2 = 100200; +const int __WATCHOS_10_3 = 100300; + +const int __WATCHOS_10_4 = 100400; + +const int __WATCHOS_10_5 = 100500; + const int __TVOS_9_0 = 90000; const int __TVOS_9_1 = 90100; @@ -96976,6 +79897,12 @@ const int __TVOS_17_1 = 170100; const int __TVOS_17_2 = 170200; +const int __TVOS_17_3 = 170300; + +const int __TVOS_17_4 = 170400; + +const int __TVOS_17_5 = 170500; + const int __BRIDGEOS_2_0 = 20000; const int __BRIDGEOS_3_0 = 30000; @@ -97022,6 +79949,12 @@ const int __BRIDGEOS_8_1 = 80100; const int __BRIDGEOS_8_2 = 80200; +const int __BRIDGEOS_8_3 = 80300; + +const int __BRIDGEOS_8_4 = 80400; + +const int __BRIDGEOS_8_5 = 80500; + const int __DRIVERKIT_19_0 = 190000; const int __DRIVERKIT_20_0 = 200000; @@ -97042,8 +79975,18 @@ const int __DRIVERKIT_23_1 = 230100; const int __DRIVERKIT_23_2 = 230200; +const int __DRIVERKIT_23_3 = 230300; + +const int __DRIVERKIT_23_4 = 230400; + +const int __DRIVERKIT_23_5 = 230500; + const int __VISIONOS_1_0 = 10000; +const int __VISIONOS_1_1 = 10100; + +const int __VISIONOS_1_2 = 10200; + const int MAC_OS_X_VERSION_10_0 = 1000; const int MAC_OS_X_VERSION_10_1 = 1010; @@ -97160,10 +80103,20 @@ const int MAC_OS_VERSION_14_1 = 140100; const int MAC_OS_VERSION_14_2 = 140200; -const int __MAC_OS_X_VERSION_MAX_ALLOWED = 140200; +const int MAC_OS_VERSION_14_3 = 140300; + +const int MAC_OS_VERSION_14_4 = 140400; + +const int MAC_OS_VERSION_14_5 = 140500; + +const int __MAC_OS_X_VERSION_MIN_REQUIRED = 140000; + +const int __MAC_OS_X_VERSION_MAX_ALLOWED = 140500; const int __ENABLE_LEGACY_MAC_AVAILABILITY = 1; +const int __has_safe_buffers = 1; + const int __DARWIN_ONLY_64_BIT_INO_T = 1; const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; @@ -97776,47 +80729,25 @@ const int EXIT_SUCCESS = 0; const int RAND_MAX = 2147483647; -const int DYNAMIC_TARGETS_ENABLED = 0; +const int MAC_OS_X_VERSION_MIN_REQUIRED = 140000; -const int TARGET_OS_WIN32 = 0; +const int MAC_OS_X_VERSION_MAX_ALLOWED = 140000; -const int TARGET_OS_WINDOWS = 0; +const int __AVAILABILITY_MACROS_USES_AVAILABILITY = 1; -const int TARGET_OS_UNIX = 0; - -const int TARGET_OS_LINUX = 0; - -const int TARGET_OS_MAC = 1; - -const int TARGET_OS_OSX = 1; - -const int TARGET_OS_IPHONE = 0; - -const int TARGET_OS_IOS = 0; - -const int TARGET_OS_WATCH = 0; - -const int TARGET_OS_TV = 0; - -const int TARGET_OS_MACCATALYST = 0; - -const int TARGET_OS_VISION = 0; - -const int TARGET_OS_UIKITFORMAC = 0; - -const int TARGET_OS_SIMULATOR = 0; +const int TARGET_OS_RTKIT = 0; -const int TARGET_OS_EMBEDDED = 0; +const int TARGET_RT_LITTLE_ENDIAN = 1; -const int TARGET_OS_RTKIT = 0; +const int TARGET_RT_BIG_ENDIAN = 0; -const int TARGET_OS_DRIVERKIT = 0; +const int TARGET_RT_64_BIT = 1; -const int TARGET_IPHONE_SIMULATOR = 0; +const int TARGET_RT_MAC_CFM = 0; -const int TARGET_OS_NANO = 0; +const int TARGET_RT_MAC_MACHO = 1; -const int TARGET_ABI_USES_IOS_VALUES = 1; +const int TARGET_CPU_ARM64 = 1; const int TARGET_CPU_PPC = 0; @@ -97830,23 +80761,13 @@ const int TARGET_CPU_X86_64 = 0; const int TARGET_CPU_ARM = 0; -const int TARGET_CPU_ARM64 = 1; - const int TARGET_CPU_MIPS = 0; const int TARGET_CPU_SPARC = 0; const int TARGET_CPU_ALPHA = 0; -const int TARGET_RT_MAC_CFM = 0; - -const int TARGET_RT_MAC_MACHO = 1; - -const int TARGET_RT_LITTLE_ENDIAN = 1; - -const int TARGET_RT_BIG_ENDIAN = 0; - -const int TARGET_RT_64_BIT = 1; +const int TARGET_ABI_USES_IOS_VALUES = 1; const int __DARWIN_FD_SETSIZE = 1024; @@ -97860,12 +80781,34 @@ const int NFDBITS = 32; const int FD_SETSIZE = 1024; +const int OBJC_API_VERSION = 2; + +const int OBJC_NO_GC = 1; + +const int NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER = 1; + +const int OBJC_OLD_DISPATCH_PROTOTYPES = 0; + const int __bool_true_false_are_defined = 1; const int true1 = 1; const int false1 = 0; +const int OBJC_BOOL_IS_BOOL = 1; + +const int YES = 1; + +const int NO = 0; + +const int NSIntegerMax = 9223372036854775807; + +const int NSIntegerMin = -9223372036854775808; + +const int NSUIntegerMax = -1; + +const int NSINTEGER_DEFINED = 1; + const int __GNUC_VA_LIST = 1; const int __DARWIN_CLK_TCK = 100; @@ -97924,8 +80867,184 @@ const int QUAD_MAX = 9223372036854775807; const int QUAD_MIN = -9223372036854775808; +const int ARG_MAX = 1048576; + +const int CHILD_MAX = 266; + +const int GID_MAX = 2147483647; + +const int LINK_MAX = 32767; + +const int MAX_CANON = 1024; + +const int MAX_INPUT = 1024; + +const int NAME_MAX = 255; + +const int NGROUPS_MAX = 16; + +const int UID_MAX = 2147483647; + +const int OPEN_MAX = 10240; + +const int PATH_MAX = 1024; + +const int PIPE_BUF = 512; + +const int BC_BASE_MAX = 99; + +const int BC_DIM_MAX = 2048; + +const int BC_SCALE_MAX = 99; + +const int BC_STRING_MAX = 1000; + +const int CHARCLASS_NAME_MAX = 14; + +const int COLL_WEIGHTS_MAX = 2; + +const int EQUIV_CLASS_MAX = 2; + +const int EXPR_NEST_MAX = 32; + +const int LINE_MAX = 2048; + +const int RE_DUP_MAX = 255; + +const int NZERO = 20; + +const int _POSIX_ARG_MAX = 4096; + +const int _POSIX_CHILD_MAX = 25; + +const int _POSIX_LINK_MAX = 8; + +const int _POSIX_MAX_CANON = 255; + +const int _POSIX_MAX_INPUT = 255; + +const int _POSIX_NAME_MAX = 14; + +const int _POSIX_NGROUPS_MAX = 8; + +const int _POSIX_OPEN_MAX = 20; + +const int _POSIX_PATH_MAX = 256; + +const int _POSIX_PIPE_BUF = 512; + +const int _POSIX_SSIZE_MAX = 32767; + +const int _POSIX_STREAM_MAX = 8; + +const int _POSIX_TZNAME_MAX = 6; + +const int _POSIX2_BC_BASE_MAX = 99; + +const int _POSIX2_BC_DIM_MAX = 2048; + +const int _POSIX2_BC_SCALE_MAX = 99; + +const int _POSIX2_BC_STRING_MAX = 1000; + +const int _POSIX2_EQUIV_CLASS_MAX = 2; + +const int _POSIX2_EXPR_NEST_MAX = 32; + +const int _POSIX2_LINE_MAX = 2048; + +const int _POSIX2_RE_DUP_MAX = 255; + +const int _POSIX_AIO_LISTIO_MAX = 2; + +const int _POSIX_AIO_MAX = 1; + +const int _POSIX_DELAYTIMER_MAX = 32; + +const int _POSIX_MQ_OPEN_MAX = 8; + +const int _POSIX_MQ_PRIO_MAX = 32; + +const int _POSIX_RTSIG_MAX = 8; + +const int _POSIX_SEM_NSEMS_MAX = 256; + +const int _POSIX_SEM_VALUE_MAX = 32767; + +const int _POSIX_SIGQUEUE_MAX = 32; + +const int _POSIX_TIMER_MAX = 32; + +const int _POSIX_CLOCKRES_MIN = 20000000; + +const int _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4; + const int _POSIX_THREAD_KEYS_MAX = 128; +const int _POSIX_THREAD_THREADS_MAX = 64; + +const int PTHREAD_DESTRUCTOR_ITERATIONS = 4; + +const int PTHREAD_KEYS_MAX = 512; + +const int PTHREAD_STACK_MIN = 16384; + +const int _POSIX_HOST_NAME_MAX = 255; + +const int _POSIX_LOGIN_NAME_MAX = 9; + +const int _POSIX_SS_REPL_MAX = 4; + +const int _POSIX_SYMLINK_MAX = 255; + +const int _POSIX_SYMLOOP_MAX = 8; + +const int _POSIX_TRACE_EVENT_NAME_MAX = 30; + +const int _POSIX_TRACE_NAME_MAX = 8; + +const int _POSIX_TRACE_SYS_MAX = 8; + +const int _POSIX_TRACE_USER_EVENT_MAX = 32; + +const int _POSIX_TTY_NAME_MAX = 9; + +const int _POSIX2_CHARCLASS_NAME_MAX = 14; + +const int _POSIX2_COLL_WEIGHTS_MAX = 2; + +const int _POSIX_RE_DUP_MAX = 255; + +const int OFF_MIN = -9223372036854775808; + +const int OFF_MAX = 9223372036854775807; + +const int PASS_MAX = 128; + +const int NL_ARGMAX = 9; + +const int NL_LANGMAX = 14; + +const int NL_MSGMAX = 32767; + +const int NL_NMAX = 1; + +const int NL_SETMAX = 255; + +const int NL_TEXTMAX = 2048; + +const int _XOPEN_IOV_MAX = 16; + +const int IOV_MAX = 1024; + +const int _XOPEN_NAME_MAX = 255; + +const int _XOPEN_PATH_MAX = 1024; + +const int NS_BLOCKS_AVAILABLE = 1; + +const int __COREFOUNDATION_CFAVAILABILITY__ = 1; + const int API_TO_BE_DEPRECATED = 100000; const int API_TO_BE_DEPRECATED_MACOS = 100000; @@ -97940,10 +81059,412 @@ const int API_TO_BE_DEPRECATED_DRIVERKIT = 100000; const int API_TO_BE_DEPRECATED_VISIONOS = 100000; +const int __CF_ENUM_FIXED_IS_AVAILABLE = 1; + +const double NSFoundationVersionNumber10_0 = 397.4; + +const double NSFoundationVersionNumber10_1 = 425.0; + +const double NSFoundationVersionNumber10_1_1 = 425.0; + +const double NSFoundationVersionNumber10_1_2 = 425.0; + +const double NSFoundationVersionNumber10_1_3 = 425.0; + +const double NSFoundationVersionNumber10_1_4 = 425.0; + +const double NSFoundationVersionNumber10_2 = 462.0; + +const double NSFoundationVersionNumber10_2_1 = 462.0; + +const double NSFoundationVersionNumber10_2_2 = 462.0; + +const double NSFoundationVersionNumber10_2_3 = 462.0; + +const double NSFoundationVersionNumber10_2_4 = 462.0; + +const double NSFoundationVersionNumber10_2_5 = 462.0; + +const double NSFoundationVersionNumber10_2_6 = 462.0; + +const double NSFoundationVersionNumber10_2_7 = 462.7; + +const double NSFoundationVersionNumber10_2_8 = 462.7; + +const double NSFoundationVersionNumber10_3 = 500.0; + +const double NSFoundationVersionNumber10_3_1 = 500.0; + +const double NSFoundationVersionNumber10_3_2 = 500.3; + +const double NSFoundationVersionNumber10_3_3 = 500.54; + +const double NSFoundationVersionNumber10_3_4 = 500.56; + +const double NSFoundationVersionNumber10_3_5 = 500.56; + +const double NSFoundationVersionNumber10_3_6 = 500.56; + +const double NSFoundationVersionNumber10_3_7 = 500.56; + +const double NSFoundationVersionNumber10_3_8 = 500.56; + +const double NSFoundationVersionNumber10_3_9 = 500.58; + +const double NSFoundationVersionNumber10_4 = 567.0; + +const double NSFoundationVersionNumber10_4_1 = 567.0; + +const double NSFoundationVersionNumber10_4_2 = 567.12; + +const double NSFoundationVersionNumber10_4_3 = 567.21; + +const double NSFoundationVersionNumber10_4_4_Intel = 567.23; + +const double NSFoundationVersionNumber10_4_4_PowerPC = 567.21; + +const double NSFoundationVersionNumber10_4_5 = 567.25; + +const double NSFoundationVersionNumber10_4_6 = 567.26; + +const double NSFoundationVersionNumber10_4_7 = 567.27; + +const double NSFoundationVersionNumber10_4_8 = 567.28; + +const double NSFoundationVersionNumber10_4_9 = 567.29; + +const double NSFoundationVersionNumber10_4_10 = 567.29; + +const double NSFoundationVersionNumber10_4_11 = 567.36; + +const double NSFoundationVersionNumber10_5 = 677.0; + +const double NSFoundationVersionNumber10_5_1 = 677.1; + +const double NSFoundationVersionNumber10_5_2 = 677.15; + +const double NSFoundationVersionNumber10_5_3 = 677.19; + +const double NSFoundationVersionNumber10_5_4 = 677.19; + +const double NSFoundationVersionNumber10_5_5 = 677.21; + +const double NSFoundationVersionNumber10_5_6 = 677.22; + +const double NSFoundationVersionNumber10_5_7 = 677.24; + +const double NSFoundationVersionNumber10_5_8 = 677.26; + +const double NSFoundationVersionNumber10_6 = 751.0; + +const double NSFoundationVersionNumber10_6_1 = 751.0; + +const double NSFoundationVersionNumber10_6_2 = 751.14; + +const double NSFoundationVersionNumber10_6_3 = 751.21; + +const double NSFoundationVersionNumber10_6_4 = 751.29; + +const double NSFoundationVersionNumber10_6_5 = 751.42; + +const double NSFoundationVersionNumber10_6_6 = 751.53; + +const double NSFoundationVersionNumber10_6_7 = 751.53; + +const double NSFoundationVersionNumber10_6_8 = 751.62; + +const double NSFoundationVersionNumber10_7 = 833.1; + +const double NSFoundationVersionNumber10_7_1 = 833.1; + +const double NSFoundationVersionNumber10_7_2 = 833.2; + +const double NSFoundationVersionNumber10_7_3 = 833.24; + +const double NSFoundationVersionNumber10_7_4 = 833.25; + +const double NSFoundationVersionNumber10_8 = 945.0; + +const double NSFoundationVersionNumber10_8_1 = 945.0; + +const double NSFoundationVersionNumber10_8_2 = 945.11; + +const double NSFoundationVersionNumber10_8_3 = 945.16; + +const double NSFoundationVersionNumber10_8_4 = 945.18; + +const int NSFoundationVersionNumber10_9 = 1056; + +const int NSFoundationVersionNumber10_9_1 = 1056; + +const double NSFoundationVersionNumber10_9_2 = 1056.13; + +const double NSFoundationVersionNumber10_10 = 1151.16; + +const double NSFoundationVersionNumber10_10_1 = 1151.16; + +const double NSFoundationVersionNumber10_10_2 = 1152.14; + +const double NSFoundationVersionNumber10_10_3 = 1153.2; + +const double NSFoundationVersionNumber10_10_4 = 1153.2; + +const int NSFoundationVersionNumber10_10_5 = 1154; + +const int NSFoundationVersionNumber10_10_Max = 1199; + +const int NSFoundationVersionNumber10_11 = 1252; + +const double NSFoundationVersionNumber10_11_1 = 1255.1; + +const double NSFoundationVersionNumber10_11_2 = 1256.1; + +const double NSFoundationVersionNumber10_11_3 = 1256.1; + +const int NSFoundationVersionNumber10_11_4 = 1258; + +const int NSFoundationVersionNumber10_11_Max = 1299; + +const int __COREFOUNDATION_CFBASE__ = 1; + +const int UNIVERSAL_INTERFACES_VERSION = 1024; + +const int PRAGMA_IMPORT = 0; + +const int PRAGMA_ONCE = 0; + +const int PRAGMA_STRUCT_PACK = 1; + +const int PRAGMA_STRUCT_PACKPUSH = 1; + +const int PRAGMA_STRUCT_ALIGN = 0; + +const int PRAGMA_ENUM_PACK = 0; + +const int PRAGMA_ENUM_ALWAYSINT = 0; + +const int PRAGMA_ENUM_OPTIONS = 0; + +const int TYPE_EXTENDED = 0; + +const int TYPE_LONGDOUBLE_IS_DOUBLE = 0; + +const int TYPE_LONGLONG = 1; + +const int FUNCTION_PASCAL = 0; + +const int FUNCTION_DECLSPEC = 0; + +const int FUNCTION_WIN32CC = 0; + +const int TARGET_API_MAC_OS8 = 0; + +const int TARGET_API_MAC_CARBON = 1; + +const int TARGET_API_MAC_OSX = 1; + +const int TARGET_CARBON = 1; + +const int OLDROUTINENAMES = 0; + +const int OPAQUE_TOOLBOX_STRUCTS = 1; + +const int OPAQUE_UPP_TYPES = 1; + +const int ACCESSOR_CALLS_ARE_FUNCTIONS = 1; + +const int CALL_NOT_IN_CARBON = 0; + +const int MIXEDMODE_CALLS_ARE_FUNCTIONS = 1; + +const int ALLOW_OBSOLETE_CARBON_MACMEMORY = 0; + +const int ALLOW_OBSOLETE_CARBON_OSUTILS = 0; + +const int kInvalidID = 0; + const int TRUE = 1; const int FALSE = 0; +const double kCFCoreFoundationVersionNumber10_0 = 196.4; + +const double kCFCoreFoundationVersionNumber10_0_3 = 196.5; + +const double kCFCoreFoundationVersionNumber10_1 = 226.0; + +const double kCFCoreFoundationVersionNumber10_1_1 = 226.0; + +const double kCFCoreFoundationVersionNumber10_1_2 = 227.2; + +const double kCFCoreFoundationVersionNumber10_1_3 = 227.2; + +const double kCFCoreFoundationVersionNumber10_1_4 = 227.3; + +const double kCFCoreFoundationVersionNumber10_2 = 263.0; + +const double kCFCoreFoundationVersionNumber10_2_1 = 263.1; + +const double kCFCoreFoundationVersionNumber10_2_2 = 263.1; + +const double kCFCoreFoundationVersionNumber10_2_3 = 263.3; + +const double kCFCoreFoundationVersionNumber10_2_4 = 263.3; + +const double kCFCoreFoundationVersionNumber10_2_5 = 263.5; + +const double kCFCoreFoundationVersionNumber10_2_6 = 263.5; + +const double kCFCoreFoundationVersionNumber10_2_7 = 263.5; + +const double kCFCoreFoundationVersionNumber10_2_8 = 263.5; + +const double kCFCoreFoundationVersionNumber10_3 = 299.0; + +const double kCFCoreFoundationVersionNumber10_3_1 = 299.0; + +const double kCFCoreFoundationVersionNumber10_3_2 = 299.0; + +const double kCFCoreFoundationVersionNumber10_3_3 = 299.3; + +const double kCFCoreFoundationVersionNumber10_3_4 = 299.31; + +const double kCFCoreFoundationVersionNumber10_3_5 = 299.31; + +const double kCFCoreFoundationVersionNumber10_3_6 = 299.32; + +const double kCFCoreFoundationVersionNumber10_3_7 = 299.33; + +const double kCFCoreFoundationVersionNumber10_3_8 = 299.33; + +const double kCFCoreFoundationVersionNumber10_3_9 = 299.35; + +const double kCFCoreFoundationVersionNumber10_4 = 368.0; + +const double kCFCoreFoundationVersionNumber10_4_1 = 368.1; + +const double kCFCoreFoundationVersionNumber10_4_2 = 368.11; + +const double kCFCoreFoundationVersionNumber10_4_3 = 368.18; + +const double kCFCoreFoundationVersionNumber10_4_4_Intel = 368.26; + +const double kCFCoreFoundationVersionNumber10_4_4_PowerPC = 368.25; + +const double kCFCoreFoundationVersionNumber10_4_5_Intel = 368.26; + +const double kCFCoreFoundationVersionNumber10_4_5_PowerPC = 368.25; + +const double kCFCoreFoundationVersionNumber10_4_6_Intel = 368.26; + +const double kCFCoreFoundationVersionNumber10_4_6_PowerPC = 368.25; + +const double kCFCoreFoundationVersionNumber10_4_7 = 368.27; + +const double kCFCoreFoundationVersionNumber10_4_8 = 368.27; + +const double kCFCoreFoundationVersionNumber10_4_9 = 368.28; + +const double kCFCoreFoundationVersionNumber10_4_10 = 368.28; + +const double kCFCoreFoundationVersionNumber10_4_11 = 368.31; + +const double kCFCoreFoundationVersionNumber10_5 = 476.0; + +const double kCFCoreFoundationVersionNumber10_5_1 = 476.0; + +const double kCFCoreFoundationVersionNumber10_5_2 = 476.1; + +const double kCFCoreFoundationVersionNumber10_5_3 = 476.13; + +const double kCFCoreFoundationVersionNumber10_5_4 = 476.14; + +const double kCFCoreFoundationVersionNumber10_5_5 = 476.15; + +const double kCFCoreFoundationVersionNumber10_5_6 = 476.17; + +const double kCFCoreFoundationVersionNumber10_5_7 = 476.18; + +const double kCFCoreFoundationVersionNumber10_5_8 = 476.19; + +const double kCFCoreFoundationVersionNumber10_6 = 550.0; + +const double kCFCoreFoundationVersionNumber10_6_1 = 550.0; + +const double kCFCoreFoundationVersionNumber10_6_2 = 550.13; + +const double kCFCoreFoundationVersionNumber10_6_3 = 550.19; + +const double kCFCoreFoundationVersionNumber10_6_4 = 550.29; + +const double kCFCoreFoundationVersionNumber10_6_5 = 550.42; + +const double kCFCoreFoundationVersionNumber10_6_6 = 550.42; + +const double kCFCoreFoundationVersionNumber10_6_7 = 550.42; + +const double kCFCoreFoundationVersionNumber10_6_8 = 550.43; + +const double kCFCoreFoundationVersionNumber10_7 = 635.0; + +const double kCFCoreFoundationVersionNumber10_7_1 = 635.0; + +const double kCFCoreFoundationVersionNumber10_7_2 = 635.15; + +const double kCFCoreFoundationVersionNumber10_7_3 = 635.19; + +const double kCFCoreFoundationVersionNumber10_7_4 = 635.21; + +const double kCFCoreFoundationVersionNumber10_7_5 = 635.21; + +const double kCFCoreFoundationVersionNumber10_8 = 744.0; + +const double kCFCoreFoundationVersionNumber10_8_1 = 744.0; + +const double kCFCoreFoundationVersionNumber10_8_2 = 744.12; + +const double kCFCoreFoundationVersionNumber10_8_3 = 744.18; + +const double kCFCoreFoundationVersionNumber10_8_4 = 744.19; + +const double kCFCoreFoundationVersionNumber10_9 = 855.11; + +const double kCFCoreFoundationVersionNumber10_9_1 = 855.11; + +const double kCFCoreFoundationVersionNumber10_9_2 = 855.14; + +const double kCFCoreFoundationVersionNumber10_10 = 1151.16; + +const double kCFCoreFoundationVersionNumber10_10_1 = 1151.16; + +const int kCFCoreFoundationVersionNumber10_10_2 = 1152; + +const double kCFCoreFoundationVersionNumber10_10_3 = 1153.18; + +const double kCFCoreFoundationVersionNumber10_10_4 = 1153.18; + +const double kCFCoreFoundationVersionNumber10_10_5 = 1153.18; + +const int kCFCoreFoundationVersionNumber10_10_Max = 1199; + +const int kCFCoreFoundationVersionNumber10_11 = 1253; + +const double kCFCoreFoundationVersionNumber10_11_1 = 1255.1; + +const double kCFCoreFoundationVersionNumber10_11_2 = 1256.14; + +const double kCFCoreFoundationVersionNumber10_11_3 = 1256.14; + +const double kCFCoreFoundationVersionNumber10_11_4 = 1258.1; + +const int kCFCoreFoundationVersionNumber10_11_Max = 1299; + +const int ISA_PTRAUTH_DISCRIMINATOR = 27361; + +const double NSTimeIntervalSince1970 = 978307200.0; + +const int __COREFOUNDATION_CFARRAY__ = 1; + const int OS_OBJECT_HAVE_OBJC_SUPPORT = 0; const int OS_OBJECT_USE_OBJC = 0; @@ -97952,335 +81473,619 @@ const int OS_OBJECT_SWIFT3 = 0; const int OS_OBJECT_USE_OBJC_RETAIN_RELEASE = 0; +const int SEC_OS_IPHONE = 0; + +const int SEC_OS_OSX = 1; + +const int SEC_OS_OSX_INCLUDES = 1; + +const int SECURITY_TYPE_UNIFICATION = 1; + +const int __COREFOUNDATION_COREFOUNDATION__ = 1; + +const int __COREFOUNDATION__ = 1; + const String __ASSERT_FILE_NAME = 'temp_for_macros.hpp'; -const int SEEK_SET = 0; +const int _CACHED_RUNES = 256; -const int SEEK_CUR = 1; +const int _CRMASK = -256; -const int SEEK_END = 2; +const String _RUNE_MAGIC_A = 'RuneMagA'; -const int SEEK_HOLE = 3; +const int _CTYPE_A = 256; -const int SEEK_DATA = 4; +const int _CTYPE_C = 512; + +const int _CTYPE_D = 1024; + +const int _CTYPE_G = 2048; + +const int _CTYPE_L = 4096; + +const int _CTYPE_P = 8192; + +const int _CTYPE_S = 16384; + +const int _CTYPE_U = 32768; + +const int _CTYPE_X = 65536; + +const int _CTYPE_B = 131072; + +const int _CTYPE_R = 262144; + +const int _CTYPE_I = 524288; + +const int _CTYPE_T = 1048576; + +const int _CTYPE_Q = 2097152; + +const int _CTYPE_SW0 = 536870912; + +const int _CTYPE_SW1 = 1073741824; + +const int _CTYPE_SW2 = 2147483648; + +const int _CTYPE_SW3 = 3221225472; + +const int _CTYPE_SWM = 3758096384; + +const int _CTYPE_SWS = 30; + +const int EPERM = 1; + +const int ENOENT = 2; + +const int ESRCH = 3; -const String __PRI_8_LENGTH_MODIFIER__ = 'hh'; +const int EINTR = 4; -const String __PRI_64_LENGTH_MODIFIER__ = 'll'; +const int EIO = 5; -const String __SCN_64_LENGTH_MODIFIER__ = 'll'; +const int ENXIO = 6; -const String __PRI_MAX_LENGTH_MODIFIER__ = 'j'; +const int E2BIG = 7; -const String __SCN_MAX_LENGTH_MODIFIER__ = 'j'; +const int ENOEXEC = 8; -const String PRId8 = 'hhd'; +const int EBADF = 9; -const String PRIi8 = 'hhi'; +const int ECHILD = 10; -const String PRIo8 = 'hho'; +const int EDEADLK = 11; -const String PRIu8 = 'hhu'; +const int ENOMEM = 12; -const String PRIx8 = 'hhx'; +const int EACCES = 13; -const String PRIX8 = 'hhX'; +const int EFAULT = 14; -const String PRId16 = 'hd'; +const int ENOTBLK = 15; -const String PRIi16 = 'hi'; +const int EBUSY = 16; -const String PRIo16 = 'ho'; +const int EEXIST = 17; -const String PRIu16 = 'hu'; +const int EXDEV = 18; -const String PRIx16 = 'hx'; +const int ENODEV = 19; -const String PRIX16 = 'hX'; +const int ENOTDIR = 20; -const String PRId32 = 'd'; +const int EISDIR = 21; -const String PRIi32 = 'i'; +const int EINVAL = 22; -const String PRIo32 = 'o'; +const int ENFILE = 23; -const String PRIu32 = 'u'; +const int EMFILE = 24; -const String PRIx32 = 'x'; +const int ENOTTY = 25; -const String PRIX32 = 'X'; +const int ETXTBSY = 26; -const String PRId64 = 'lld'; +const int EFBIG = 27; -const String PRIi64 = 'lli'; +const int ENOSPC = 28; -const String PRIo64 = 'llo'; +const int ESPIPE = 29; -const String PRIu64 = 'llu'; +const int EROFS = 30; -const String PRIx64 = 'llx'; +const int EMLINK = 31; -const String PRIX64 = 'llX'; +const int EPIPE = 32; -const String PRIdLEAST8 = 'hhd'; +const int EDOM = 33; -const String PRIiLEAST8 = 'hhi'; +const int ERANGE = 34; -const String PRIoLEAST8 = 'hho'; +const int EAGAIN = 35; -const String PRIuLEAST8 = 'hhu'; +const int EWOULDBLOCK = 35; -const String PRIxLEAST8 = 'hhx'; +const int EINPROGRESS = 36; -const String PRIXLEAST8 = 'hhX'; +const int EALREADY = 37; -const String PRIdLEAST16 = 'hd'; +const int ENOTSOCK = 38; -const String PRIiLEAST16 = 'hi'; +const int EDESTADDRREQ = 39; -const String PRIoLEAST16 = 'ho'; +const int EMSGSIZE = 40; -const String PRIuLEAST16 = 'hu'; +const int EPROTOTYPE = 41; -const String PRIxLEAST16 = 'hx'; +const int ENOPROTOOPT = 42; -const String PRIXLEAST16 = 'hX'; +const int EPROTONOSUPPORT = 43; -const String PRIdLEAST32 = 'd'; +const int ESOCKTNOSUPPORT = 44; -const String PRIiLEAST32 = 'i'; +const int ENOTSUP = 45; -const String PRIoLEAST32 = 'o'; +const int EPFNOSUPPORT = 46; -const String PRIuLEAST32 = 'u'; +const int EAFNOSUPPORT = 47; -const String PRIxLEAST32 = 'x'; +const int EADDRINUSE = 48; -const String PRIXLEAST32 = 'X'; +const int EADDRNOTAVAIL = 49; -const String PRIdLEAST64 = 'lld'; +const int ENETDOWN = 50; -const String PRIiLEAST64 = 'lli'; +const int ENETUNREACH = 51; -const String PRIoLEAST64 = 'llo'; +const int ENETRESET = 52; -const String PRIuLEAST64 = 'llu'; +const int ECONNABORTED = 53; -const String PRIxLEAST64 = 'llx'; +const int ECONNRESET = 54; -const String PRIXLEAST64 = 'llX'; +const int ENOBUFS = 55; -const String PRIdFAST8 = 'hhd'; +const int EISCONN = 56; -const String PRIiFAST8 = 'hhi'; +const int ENOTCONN = 57; -const String PRIoFAST8 = 'hho'; +const int ESHUTDOWN = 58; -const String PRIuFAST8 = 'hhu'; +const int ETOOMANYREFS = 59; -const String PRIxFAST8 = 'hhx'; +const int ETIMEDOUT = 60; -const String PRIXFAST8 = 'hhX'; +const int ECONNREFUSED = 61; -const String PRIdFAST16 = 'hd'; +const int ELOOP = 62; -const String PRIiFAST16 = 'hi'; +const int ENAMETOOLONG = 63; -const String PRIoFAST16 = 'ho'; +const int EHOSTDOWN = 64; -const String PRIuFAST16 = 'hu'; +const int EHOSTUNREACH = 65; -const String PRIxFAST16 = 'hx'; +const int ENOTEMPTY = 66; -const String PRIXFAST16 = 'hX'; +const int EPROCLIM = 67; -const String PRIdFAST32 = 'd'; +const int EUSERS = 68; -const String PRIiFAST32 = 'i'; +const int EDQUOT = 69; -const String PRIoFAST32 = 'o'; +const int ESTALE = 70; -const String PRIuFAST32 = 'u'; +const int EREMOTE = 71; -const String PRIxFAST32 = 'x'; +const int EBADRPC = 72; -const String PRIXFAST32 = 'X'; +const int ERPCMISMATCH = 73; -const String PRIdFAST64 = 'lld'; +const int EPROGUNAVAIL = 74; -const String PRIiFAST64 = 'lli'; +const int EPROGMISMATCH = 75; -const String PRIoFAST64 = 'llo'; +const int EPROCUNAVAIL = 76; -const String PRIuFAST64 = 'llu'; +const int ENOLCK = 77; -const String PRIxFAST64 = 'llx'; +const int ENOSYS = 78; -const String PRIXFAST64 = 'llX'; +const int EFTYPE = 79; -const String PRIdPTR = 'ld'; +const int EAUTH = 80; -const String PRIiPTR = 'li'; +const int ENEEDAUTH = 81; -const String PRIoPTR = 'lo'; +const int EPWROFF = 82; -const String PRIuPTR = 'lu'; +const int EDEVERR = 83; -const String PRIxPTR = 'lx'; +const int EOVERFLOW = 84; -const String PRIXPTR = 'lX'; +const int EBADEXEC = 85; -const String PRIdMAX = 'jd'; +const int EBADARCH = 86; -const String PRIiMAX = 'ji'; +const int ESHLIBVERS = 87; -const String PRIoMAX = 'jo'; +const int EBADMACHO = 88; -const String PRIuMAX = 'ju'; +const int ECANCELED = 89; -const String PRIxMAX = 'jx'; +const int EIDRM = 90; -const String PRIXMAX = 'jX'; +const int ENOMSG = 91; -const String SCNd8 = 'hhd'; +const int EILSEQ = 92; -const String SCNi8 = 'hhi'; +const int ENOATTR = 93; -const String SCNo8 = 'hho'; +const int EBADMSG = 94; -const String SCNu8 = 'hhu'; +const int EMULTIHOP = 95; -const String SCNx8 = 'hhx'; +const int ENODATA = 96; -const String SCNd16 = 'hd'; +const int ENOLINK = 97; -const String SCNi16 = 'hi'; +const int ENOSR = 98; -const String SCNo16 = 'ho'; +const int ENOSTR = 99; -const String SCNu16 = 'hu'; +const int EPROTO = 100; -const String SCNx16 = 'hx'; +const int ETIME = 101; -const String SCNd32 = 'd'; +const int EOPNOTSUPP = 102; -const String SCNi32 = 'i'; +const int ENOPOLICY = 103; -const String SCNo32 = 'o'; +const int ENOTRECOVERABLE = 104; -const String SCNu32 = 'u'; +const int EOWNERDEAD = 105; -const String SCNx32 = 'x'; +const int EQFULL = 106; -const String SCNd64 = 'lld'; +const int ELAST = 106; -const String SCNi64 = 'lli'; +const int FLT_EVAL_METHOD = 0; -const String SCNo64 = 'llo'; +const int FLT_RADIX = 2; -const String SCNu64 = 'llu'; +const int FLT_MANT_DIG = 24; -const String SCNx64 = 'llx'; +const int DBL_MANT_DIG = 53; -const String SCNdLEAST8 = 'hhd'; +const int LDBL_MANT_DIG = 53; -const String SCNiLEAST8 = 'hhi'; +const int FLT_DIG = 6; -const String SCNoLEAST8 = 'hho'; +const int DBL_DIG = 15; -const String SCNuLEAST8 = 'hhu'; +const int LDBL_DIG = 15; -const String SCNxLEAST8 = 'hhx'; +const int FLT_MIN_EXP = -125; -const String SCNdLEAST16 = 'hd'; +const int DBL_MIN_EXP = -1021; -const String SCNiLEAST16 = 'hi'; +const int LDBL_MIN_EXP = -1021; -const String SCNoLEAST16 = 'ho'; +const int FLT_MIN_10_EXP = -37; -const String SCNuLEAST16 = 'hu'; +const int DBL_MIN_10_EXP = -307; -const String SCNxLEAST16 = 'hx'; +const int LDBL_MIN_10_EXP = -307; -const String SCNdLEAST32 = 'd'; +const int FLT_MAX_EXP = 128; -const String SCNiLEAST32 = 'i'; +const int DBL_MAX_EXP = 1024; -const String SCNoLEAST32 = 'o'; +const int LDBL_MAX_EXP = 1024; -const String SCNuLEAST32 = 'u'; +const int FLT_MAX_10_EXP = 38; -const String SCNxLEAST32 = 'x'; +const int DBL_MAX_10_EXP = 308; -const String SCNdLEAST64 = 'lld'; +const int LDBL_MAX_10_EXP = 308; -const String SCNiLEAST64 = 'lli'; +const double FLT_MAX = 3.4028234663852886e+38; -const String SCNoLEAST64 = 'llo'; +const double DBL_MAX = 1.7976931348623157e+308; -const String SCNuLEAST64 = 'llu'; +const double LDBL_MAX = 1.7976931348623157e+308; -const String SCNxLEAST64 = 'llx'; +const double FLT_EPSILON = 1.1920928955078125e-7; -const String SCNdFAST8 = 'hhd'; +const double DBL_EPSILON = 2.220446049250313e-16; -const String SCNiFAST8 = 'hhi'; +const double LDBL_EPSILON = 2.220446049250313e-16; -const String SCNoFAST8 = 'hho'; +const double FLT_MIN = 1.1754943508222875e-38; -const String SCNuFAST8 = 'hhu'; +const double DBL_MIN = 2.2250738585072014e-308; -const String SCNxFAST8 = 'hhx'; +const double LDBL_MIN = 2.2250738585072014e-308; -const String SCNdFAST16 = 'hd'; +const int DECIMAL_DIG = 17; -const String SCNiFAST16 = 'hi'; +const int FLT_HAS_SUBNORM = 1; -const String SCNoFAST16 = 'ho'; +const int DBL_HAS_SUBNORM = 1; -const String SCNuFAST16 = 'hu'; +const int LDBL_HAS_SUBNORM = 1; -const String SCNxFAST16 = 'hx'; +const double FLT_TRUE_MIN = 1.401298464324817e-45; -const String SCNdFAST32 = 'd'; +const double DBL_TRUE_MIN = 5e-324; -const String SCNiFAST32 = 'i'; +const double LDBL_TRUE_MIN = 5e-324; -const String SCNoFAST32 = 'o'; +const int FLT_DECIMAL_DIG = 9; -const String SCNuFAST32 = 'u'; +const int DBL_DECIMAL_DIG = 17; -const String SCNxFAST32 = 'x'; +const int LDBL_DECIMAL_DIG = 17; -const String SCNdFAST64 = 'lld'; +const int LC_ALL = 0; -const String SCNiFAST64 = 'lli'; +const int LC_COLLATE = 1; -const String SCNoFAST64 = 'llo'; +const int LC_CTYPE = 2; -const String SCNuFAST64 = 'llu'; +const int LC_MONETARY = 3; -const String SCNxFAST64 = 'llx'; +const int LC_NUMERIC = 4; -const String SCNdPTR = 'ld'; +const int LC_TIME = 5; -const String SCNiPTR = 'li'; +const int LC_MESSAGES = 6; -const String SCNoPTR = 'lo'; +const int _LC_LAST = 7; -const String SCNuPTR = 'lu'; +const double HUGE_VAL = double.infinity; -const String SCNxPTR = 'lx'; +const double HUGE_VALF = double.infinity; -const String SCNdMAX = 'jd'; +const double HUGE_VALL = double.infinity; -const String SCNiMAX = 'ji'; +const double NAN = double.nan; -const String SCNoMAX = 'jo'; +const double INFINITY = double.infinity; -const String SCNuMAX = 'ju'; +const int FP_NAN = 1; -const String SCNxMAX = 'jx'; +const int FP_INFINITE = 2; + +const int FP_ZERO = 3; + +const int FP_NORMAL = 4; + +const int FP_SUBNORMAL = 5; + +const int FP_SUPERNORMAL = 6; + +const int FP_FAST_FMA = 1; + +const int FP_FAST_FMAF = 1; + +const int FP_FAST_FMAL = 1; + +const int FP_ILOGB0 = -2147483648; + +const int FP_ILOGBNAN = -2147483648; + +const int MATH_ERRNO = 1; + +const int MATH_ERREXCEPT = 2; + +const double M_E = 2.718281828459045; + +const double M_LOG2E = 1.4426950408889634; + +const double M_LOG10E = 0.4342944819032518; + +const double M_LN2 = 0.6931471805599453; + +const double M_LN10 = 2.302585092994046; + +const double M_PI = 3.141592653589793; + +const double M_PI_2 = 1.5707963267948966; + +const double M_PI_4 = 0.7853981633974483; + +const double M_1_PI = 0.3183098861837907; + +const double M_2_PI = 0.6366197723675814; + +const double M_2_SQRTPI = 1.1283791670955126; + +const double M_SQRT2 = 1.4142135623730951; + +const double M_SQRT1_2 = 0.7071067811865476; + +const double MAXFLOAT = 3.4028234663852886e+38; + +const int FP_SNAN = 1; + +const int FP_QNAN = 1; + +const double HUGE = 3.4028234663852886e+38; + +const double X_TLOSS = 14148475504056880.0; + +const int DOMAIN = 1; + +const int SING = 2; + +const int OVERFLOW = 3; + +const int UNDERFLOW = 4; + +const int TLOSS = 5; + +const int PLOSS = 6; + +const int _JBLEN = 48; + +const int RENAME_SECLUDE = 1; + +const int RENAME_SWAP = 2; + +const int RENAME_EXCL = 4; + +const int RENAME_RESERVED1 = 8; + +const int RENAME_NOFOLLOW_ANY = 16; + +const int SEEK_SET = 0; + +const int SEEK_CUR = 1; + +const int SEEK_END = 2; + +const int SEEK_HOLE = 3; + +const int SEEK_DATA = 4; + +const int __SLBF = 1; + +const int __SNBF = 2; + +const int __SRD = 4; + +const int __SWR = 8; + +const int __SRW = 16; + +const int __SEOF = 32; + +const int __SERR = 64; + +const int __SMBF = 128; + +const int __SAPP = 256; + +const int __SSTR = 512; + +const int __SOPT = 1024; + +const int __SNPT = 2048; + +const int __SOFF = 4096; + +const int __SMOD = 8192; + +const int __SALC = 16384; + +const int __SIGN = 32768; + +const int _IOFBF = 0; + +const int _IOLBF = 1; + +const int _IONBF = 2; + +const int BUFSIZ = 1024; + +const int EOF = -1; + +const int FOPEN_MAX = 20; + +const int FILENAME_MAX = 1024; + +const String P_tmpdir = '/var/tmp/'; + +const int L_tmpnam = 1024; + +const int TMP_MAX = 308915776; + +const int L_ctermid = 1024; + +const int CLOCKS_PER_SEC = 1000000; + +const int CLOCK_REALTIME = 0; + +const int CLOCK_MONOTONIC = 6; + +const int CLOCK_MONOTONIC_RAW = 4; + +const int CLOCK_MONOTONIC_RAW_APPROX = 5; + +const int CLOCK_UPTIME_RAW = 8; + +const int CLOCK_UPTIME_RAW_APPROX = 9; + +const int CLOCK_PROCESS_CPUTIME_ID = 12; + +const int CLOCK_THREAD_CPUTIME_ID = 16; + +const int TIME_UTC = 1; + +const int __COREFOUNDATION_CFBAG__ = 1; + +const int __COREFOUNDATION_CFBINARYHEAP__ = 1; + +const int __COREFOUNDATION_CFBITVECTOR__ = 1; + +const int __COREFOUNDATION_CFBYTEORDER__ = 1; + +const int CF_USE_OSBYTEORDER_H = 1; + +const int __COREFOUNDATION_CFCALENDAR__ = 1; + +const int __COREFOUNDATION_CFLOCALE__ = 1; + +const int __COREFOUNDATION_CFDICTIONARY__ = 1; + +const int __COREFOUNDATION_CFNOTIFICATIONCENTER__ = 1; + +const int __COREFOUNDATION_CFDATE__ = 1; + +const int __COREFOUNDATION_CFTIMEZONE__ = 1; + +const int __COREFOUNDATION_CFDATA__ = 1; + +const int __COREFOUNDATION_CFSTRING__ = 1; + +const int __COREFOUNDATION_CFCHARACTERSET__ = 1; + +const int __COREFOUNDATION_CFERROR__ = 1; + +const int kCFStringEncodingInvalidId = 4294967295; + +const int __kCFStringInlineBufferLength = 64; + +const int __COREFOUNDATION_CFCGTYPES__ = 1; + +const int CGFLOAT_IS_DOUBLE = 1; + +const double CGFLOAT_MIN = 2.2250738585072014e-308; + +const double CGFLOAT_MAX = 1.7976931348623157e+308; + +const double CGFLOAT_EPSILON = 2.220446049250313e-16; + +const int CGFLOAT_DEFINED = 1; + +const int CGVECTOR_DEFINED = 1; + +const int __COREFOUNDATION_CFDATEFORMATTER__ = 1; + +const int __COREFOUNDATION_CFNUMBER__ = 1; + +const int __COREFOUNDATION_CFNUMBERFORMATTER__ = 1; + +const int __COREFOUNDATION_CFPREFERENCES__ = 1; + +const int __COREFOUNDATION_CFPROPERTYLIST__ = 1; + +const int __COREFOUNDATION_CFSTREAM__ = 1; + +const int __COREFOUNDATION_CFURL__ = 1; + +const int __COREFOUNDATION_CFRUNLOOP__ = 1; const int MACH_PORT_NULL = 0; @@ -98464,6 +82269,8 @@ const int MPG_STRICT = 1; const int MPG_IMMOVABLE_RECEIVE = 2; +const int __COREFOUNDATION_CFSOCKET__ = 1; + const int _POSIX_VERSION = 200112; const int _POSIX2_VERSION = 200112; @@ -99468,7 +83275,7 @@ const int DISPATCH_TIME_FOREVER = -1; const int QOS_MIN_RELATIVE_PRIORITY = -15; -const int DISPATCH_APPLY_AUTO_AVAILABLE = 0; +const int DISPATCH_APPLY_AUTO_AVAILABLE = 1; const int DISPATCH_QUEUE_PRIORITY_HIGH = 2; @@ -99924,44 +83731,924 @@ const int DISPATCH_IO_STOP = 1; const int DISPATCH_IO_STRICT_INTERVAL = 1; -const int NSURLResponseUnknownLength = -1; +const int __COREFOUNDATION_CFSET__ = 1; + +const int __COREFOUNDATION_CFSTRINGENCODINGEXT__ = 1; + +const int __COREFOUNDATION_CFTREE__ = 1; + +const int __COREFOUNDATION_CFURLACCESS__ = 1; + +const int __COREFOUNDATION_CFUUID__ = 1; + +const int __COREFOUNDATION_CFUTILITIES__ = 1; + +const int __COREFOUNDATION_CFBUNDLE__ = 1; + +const int CPU_STATE_MAX = 4; + +const int CPU_STATE_USER = 0; + +const int CPU_STATE_SYSTEM = 1; + +const int CPU_STATE_IDLE = 2; + +const int CPU_STATE_NICE = 3; + +const int CPU_ARCH_MASK = 4278190080; + +const int CPU_ARCH_ABI64 = 16777216; + +const int CPU_ARCH_ABI64_32 = 33554432; + +const int CPU_TYPE_ANY = -1; + +const int CPU_TYPE_VAX = 1; + +const int CPU_TYPE_MC680x0 = 6; + +const int CPU_TYPE_X86 = 7; + +const int CPU_TYPE_I386 = 7; + +const int CPU_TYPE_X86_64 = 16777223; + +const int CPU_TYPE_MC98000 = 10; + +const int CPU_TYPE_HPPA = 11; + +const int CPU_TYPE_ARM = 12; + +const int CPU_TYPE_ARM64 = 16777228; + +const int CPU_TYPE_ARM64_32 = 33554444; + +const int CPU_TYPE_MC88000 = 13; + +const int CPU_TYPE_SPARC = 14; + +const int CPU_TYPE_I860 = 15; + +const int CPU_TYPE_POWERPC = 18; + +const int CPU_TYPE_POWERPC64 = 16777234; + +const int CPU_SUBTYPE_MASK = 4278190080; + +const int CPU_SUBTYPE_LIB64 = 2147483648; + +const int CPU_SUBTYPE_PTRAUTH_ABI = 2147483648; + +const int CPU_SUBTYPE_ANY = -1; + +const int CPU_SUBTYPE_MULTIPLE = -1; + +const int CPU_SUBTYPE_LITTLE_ENDIAN = 0; + +const int CPU_SUBTYPE_BIG_ENDIAN = 1; + +const int CPU_THREADTYPE_NONE = 0; + +const int CPU_SUBTYPE_VAX_ALL = 0; + +const int CPU_SUBTYPE_VAX780 = 1; + +const int CPU_SUBTYPE_VAX785 = 2; + +const int CPU_SUBTYPE_VAX750 = 3; + +const int CPU_SUBTYPE_VAX730 = 4; + +const int CPU_SUBTYPE_UVAXI = 5; + +const int CPU_SUBTYPE_UVAXII = 6; + +const int CPU_SUBTYPE_VAX8200 = 7; + +const int CPU_SUBTYPE_VAX8500 = 8; + +const int CPU_SUBTYPE_VAX8600 = 9; + +const int CPU_SUBTYPE_VAX8650 = 10; + +const int CPU_SUBTYPE_VAX8800 = 11; + +const int CPU_SUBTYPE_UVAXIII = 12; + +const int CPU_SUBTYPE_MC680x0_ALL = 1; + +const int CPU_SUBTYPE_MC68030 = 1; + +const int CPU_SUBTYPE_MC68040 = 2; + +const int CPU_SUBTYPE_MC68030_ONLY = 3; + +const int CPU_SUBTYPE_I386_ALL = 3; + +const int CPU_SUBTYPE_386 = 3; + +const int CPU_SUBTYPE_486 = 4; + +const int CPU_SUBTYPE_486SX = 132; + +const int CPU_SUBTYPE_586 = 5; + +const int CPU_SUBTYPE_PENT = 5; + +const int CPU_SUBTYPE_PENTPRO = 22; + +const int CPU_SUBTYPE_PENTII_M3 = 54; + +const int CPU_SUBTYPE_PENTII_M5 = 86; + +const int CPU_SUBTYPE_CELERON = 103; + +const int CPU_SUBTYPE_CELERON_MOBILE = 119; + +const int CPU_SUBTYPE_PENTIUM_3 = 8; + +const int CPU_SUBTYPE_PENTIUM_3_M = 24; + +const int CPU_SUBTYPE_PENTIUM_3_XEON = 40; + +const int CPU_SUBTYPE_PENTIUM_M = 9; + +const int CPU_SUBTYPE_PENTIUM_4 = 10; + +const int CPU_SUBTYPE_PENTIUM_4_M = 26; + +const int CPU_SUBTYPE_ITANIUM = 11; + +const int CPU_SUBTYPE_ITANIUM_2 = 27; + +const int CPU_SUBTYPE_XEON = 12; + +const int CPU_SUBTYPE_XEON_MP = 28; + +const int CPU_SUBTYPE_INTEL_FAMILY_MAX = 15; + +const int CPU_SUBTYPE_INTEL_MODEL_ALL = 0; + +const int CPU_SUBTYPE_X86_ALL = 3; + +const int CPU_SUBTYPE_X86_64_ALL = 3; + +const int CPU_SUBTYPE_X86_ARCH1 = 4; + +const int CPU_SUBTYPE_X86_64_H = 8; + +const int CPU_THREADTYPE_INTEL_HTT = 1; + +const int CPU_SUBTYPE_MIPS_ALL = 0; + +const int CPU_SUBTYPE_MIPS_R2300 = 1; + +const int CPU_SUBTYPE_MIPS_R2600 = 2; + +const int CPU_SUBTYPE_MIPS_R2800 = 3; + +const int CPU_SUBTYPE_MIPS_R2000a = 4; + +const int CPU_SUBTYPE_MIPS_R2000 = 5; + +const int CPU_SUBTYPE_MIPS_R3000a = 6; + +const int CPU_SUBTYPE_MIPS_R3000 = 7; + +const int CPU_SUBTYPE_MC98000_ALL = 0; + +const int CPU_SUBTYPE_MC98601 = 1; + +const int CPU_SUBTYPE_HPPA_ALL = 0; + +const int CPU_SUBTYPE_HPPA_7100 = 0; + +const int CPU_SUBTYPE_HPPA_7100LC = 1; + +const int CPU_SUBTYPE_MC88000_ALL = 0; + +const int CPU_SUBTYPE_MC88100 = 1; + +const int CPU_SUBTYPE_MC88110 = 2; + +const int CPU_SUBTYPE_SPARC_ALL = 0; + +const int CPU_SUBTYPE_I860_ALL = 0; + +const int CPU_SUBTYPE_I860_860 = 1; + +const int CPU_SUBTYPE_POWERPC_ALL = 0; + +const int CPU_SUBTYPE_POWERPC_601 = 1; + +const int CPU_SUBTYPE_POWERPC_602 = 2; + +const int CPU_SUBTYPE_POWERPC_603 = 3; + +const int CPU_SUBTYPE_POWERPC_603e = 4; + +const int CPU_SUBTYPE_POWERPC_603ev = 5; + +const int CPU_SUBTYPE_POWERPC_604 = 6; + +const int CPU_SUBTYPE_POWERPC_604e = 7; + +const int CPU_SUBTYPE_POWERPC_620 = 8; + +const int CPU_SUBTYPE_POWERPC_750 = 9; + +const int CPU_SUBTYPE_POWERPC_7400 = 10; + +const int CPU_SUBTYPE_POWERPC_7450 = 11; + +const int CPU_SUBTYPE_POWERPC_970 = 100; + +const int CPU_SUBTYPE_ARM_ALL = 0; + +const int CPU_SUBTYPE_ARM_V4T = 5; + +const int CPU_SUBTYPE_ARM_V6 = 6; + +const int CPU_SUBTYPE_ARM_V5TEJ = 7; + +const int CPU_SUBTYPE_ARM_XSCALE = 8; + +const int CPU_SUBTYPE_ARM_V7 = 9; + +const int CPU_SUBTYPE_ARM_V7F = 10; + +const int CPU_SUBTYPE_ARM_V7S = 11; + +const int CPU_SUBTYPE_ARM_V7K = 12; + +const int CPU_SUBTYPE_ARM_V8 = 13; + +const int CPU_SUBTYPE_ARM_V6M = 14; + +const int CPU_SUBTYPE_ARM_V7M = 15; + +const int CPU_SUBTYPE_ARM_V7EM = 16; + +const int CPU_SUBTYPE_ARM_V8M = 17; + +const int CPU_SUBTYPE_ARM64_ALL = 0; + +const int CPU_SUBTYPE_ARM64_V8 = 1; + +const int CPU_SUBTYPE_ARM64E = 2; + +const int CPU_SUBTYPE_ARM64_PTR_AUTH_MASK = 251658240; + +const int CPU_SUBTYPE_ARM64_32_ALL = 0; + +const int CPU_SUBTYPE_ARM64_32_V8 = 1; + +const int CPUFAMILY_UNKNOWN = 0; + +const int CPUFAMILY_POWERPC_G3 = 3471054153; + +const int CPUFAMILY_POWERPC_G4 = 2009171118; + +const int CPUFAMILY_POWERPC_G5 = 3983988906; + +const int CPUFAMILY_INTEL_6_13 = 2855483691; + +const int CPUFAMILY_INTEL_PENRYN = 2028621756; + +const int CPUFAMILY_INTEL_NEHALEM = 1801080018; + +const int CPUFAMILY_INTEL_WESTMERE = 1463508716; + +const int CPUFAMILY_INTEL_SANDYBRIDGE = 1418770316; + +const int CPUFAMILY_INTEL_IVYBRIDGE = 526772277; + +const int CPUFAMILY_INTEL_HASWELL = 280134364; + +const int CPUFAMILY_INTEL_BROADWELL = 1479463068; + +const int CPUFAMILY_INTEL_SKYLAKE = 939270559; + +const int CPUFAMILY_INTEL_KABYLAKE = 260141638; + +const int CPUFAMILY_INTEL_ICELAKE = 943936839; + +const int CPUFAMILY_INTEL_COMETLAKE = 486055998; + +const int CPUFAMILY_ARM_9 = 3878847406; + +const int CPUFAMILY_ARM_11 = 2415272152; + +const int CPUFAMILY_ARM_XSCALE = 1404044789; + +const int CPUFAMILY_ARM_12 = 3172666089; + +const int CPUFAMILY_ARM_13 = 214503012; + +const int CPUFAMILY_ARM_14 = 2517073649; + +const int CPUFAMILY_ARM_15 = 2823887818; + +const int CPUFAMILY_ARM_SWIFT = 506291073; + +const int CPUFAMILY_ARM_CYCLONE = 933271106; + +const int CPUFAMILY_ARM_TYPHOON = 747742334; + +const int CPUFAMILY_ARM_TWISTER = 2465937352; + +const int CPUFAMILY_ARM_HURRICANE = 1741614739; + +const int CPUFAMILY_ARM_MONSOON_MISTRAL = 3894312694; + +const int CPUFAMILY_ARM_VORTEX_TEMPEST = 131287967; + +const int CPUFAMILY_ARM_LIGHTNING_THUNDER = 1176831186; + +const int CPUFAMILY_ARM_FIRESTORM_ICESTORM = 458787763; + +const int CPUFAMILY_ARM_BLIZZARD_AVALANCHE = 3660830781; + +const int CPUFAMILY_ARM_EVEREST_SAWTOOTH = 2271604202; + +const int CPUFAMILY_ARM_IBIZA = 4197663070; + +const int CPUFAMILY_ARM_PALMA = 1912690738; + +const int CPUFAMILY_ARM_COLL = 678884789; + +const int CPUFAMILY_ARM_LOBOS = 1598941843; + +const int CPUFAMILY_ARM_DONAN = 1867590060; + +const int CPUSUBFAMILY_UNKNOWN = 0; + +const int CPUSUBFAMILY_ARM_HP = 1; + +const int CPUSUBFAMILY_ARM_HG = 2; + +const int CPUSUBFAMILY_ARM_M = 3; + +const int CPUSUBFAMILY_ARM_HS = 4; + +const int CPUSUBFAMILY_ARM_HC_HD = 5; + +const int CPUSUBFAMILY_ARM_HA = 6; + +const int CPUFAMILY_INTEL_6_23 = 2028621756; + +const int CPUFAMILY_INTEL_6_26 = 1801080018; + +const int __COREFOUNDATION_CFMESSAGEPORT__ = 1; + +const int __COREFOUNDATION_CFPLUGIN__ = 1; + +const int COREFOUNDATION_CFPLUGINCOM_SEPARATE = 1; + +const int __COREFOUNDATION_CFMACHPORT__ = 1; + +const int __COREFOUNDATION_CFATTRIBUTEDSTRING__ = 1; + +const int __COREFOUNDATION_CFURLENUMERATOR__ = 1; + +const int __COREFOUNDATION_CFFILESECURITY__ = 1; + +const int KAUTH_GUID_SIZE = 16; + +const int KAUTH_UID_NONE = 4294967195; + +const int KAUTH_GID_NONE = 4294967195; + +const int KAUTH_NTSID_MAX_AUTHORITIES = 16; + +const int KAUTH_NTSID_HDRSIZE = 8; + +const int KAUTH_EXTLOOKUP_SUCCESS = 0; + +const int KAUTH_EXTLOOKUP_BADRQ = 1; + +const int KAUTH_EXTLOOKUP_FAILURE = 2; + +const int KAUTH_EXTLOOKUP_FATAL = 3; + +const int KAUTH_EXTLOOKUP_INPROG = 100; + +const int KAUTH_EXTLOOKUP_VALID_UID = 1; + +const int KAUTH_EXTLOOKUP_VALID_UGUID = 2; + +const int KAUTH_EXTLOOKUP_VALID_USID = 4; + +const int KAUTH_EXTLOOKUP_VALID_GID = 8; + +const int KAUTH_EXTLOOKUP_VALID_GGUID = 16; + +const int KAUTH_EXTLOOKUP_VALID_GSID = 32; + +const int KAUTH_EXTLOOKUP_WANT_UID = 64; + +const int KAUTH_EXTLOOKUP_WANT_UGUID = 128; + +const int KAUTH_EXTLOOKUP_WANT_USID = 256; + +const int KAUTH_EXTLOOKUP_WANT_GID = 512; + +const int KAUTH_EXTLOOKUP_WANT_GGUID = 1024; + +const int KAUTH_EXTLOOKUP_WANT_GSID = 2048; + +const int KAUTH_EXTLOOKUP_WANT_MEMBERSHIP = 4096; + +const int KAUTH_EXTLOOKUP_VALID_MEMBERSHIP = 8192; + +const int KAUTH_EXTLOOKUP_ISMEMBER = 16384; + +const int KAUTH_EXTLOOKUP_VALID_PWNAM = 32768; + +const int KAUTH_EXTLOOKUP_WANT_PWNAM = 65536; + +const int KAUTH_EXTLOOKUP_VALID_GRNAM = 131072; + +const int KAUTH_EXTLOOKUP_WANT_GRNAM = 262144; + +const int KAUTH_EXTLOOKUP_VALID_SUPGRPS = 524288; + +const int KAUTH_EXTLOOKUP_WANT_SUPGRPS = 1048576; -const int DART_FLAGS_CURRENT_VERSION = 12; +const int KAUTH_EXTLOOKUP_REGISTER = 0; -const int DART_INITIALIZE_PARAMS_CURRENT_VERSION = 4; +const int KAUTH_EXTLOOKUP_RESULT = 1; -const int ILLEGAL_PORT = 0; +const int KAUTH_EXTLOOKUP_WORKER = 2; -const String DART_KERNEL_ISOLATE_NAME = 'kernel-service'; +const int KAUTH_EXTLOOKUP_DEREGISTER = 4; -const String DART_VM_SERVICE_ISOLATE_NAME = 'vm-service'; +const int KAUTH_GET_CACHE_SIZES = 8; -const String kSnapshotBuildIdCSymbol = 'kDartSnapshotBuildId'; +const int KAUTH_SET_CACHE_SIZES = 16; -const String kVmSnapshotDataCSymbol = 'kDartVmSnapshotData'; +const int KAUTH_CLEAR_CACHES = 32; -const String kVmSnapshotInstructionsCSymbol = 'kDartVmSnapshotInstructions'; +const String IDENTITYSVC_ENTITLEMENT = 'com.apple.private.identitysvc'; -const String kVmSnapshotBssCSymbol = 'kDartVmSnapshotBss'; +const int KAUTH_ACE_KINDMASK = 15; -const String kIsolateSnapshotDataCSymbol = 'kDartIsolateSnapshotData'; +const int KAUTH_ACE_PERMIT = 1; -const String kIsolateSnapshotInstructionsCSymbol = - 'kDartIsolateSnapshotInstructions'; +const int KAUTH_ACE_DENY = 2; -const String kIsolateSnapshotBssCSymbol = 'kDartIsolateSnapshotBss'; +const int KAUTH_ACE_AUDIT = 3; -const String kSnapshotBuildIdAsmSymbol = '_kDartSnapshotBuildId'; +const int KAUTH_ACE_ALARM = 4; -const String kVmSnapshotDataAsmSymbol = '_kDartVmSnapshotData'; +const int KAUTH_ACE_INHERITED = 16; -const String kVmSnapshotInstructionsAsmSymbol = '_kDartVmSnapshotInstructions'; +const int KAUTH_ACE_FILE_INHERIT = 32; + +const int KAUTH_ACE_DIRECTORY_INHERIT = 64; + +const int KAUTH_ACE_LIMIT_INHERIT = 128; + +const int KAUTH_ACE_ONLY_INHERIT = 256; + +const int KAUTH_ACE_SUCCESS = 512; + +const int KAUTH_ACE_FAILURE = 1024; + +const int KAUTH_ACE_INHERIT_CONTROL_FLAGS = 480; + +const int KAUTH_ACE_GENERIC_ALL = 2097152; + +const int KAUTH_ACE_GENERIC_EXECUTE = 4194304; + +const int KAUTH_ACE_GENERIC_WRITE = 8388608; + +const int KAUTH_ACE_GENERIC_READ = 16777216; + +const int KAUTH_ACL_MAX_ENTRIES = 128; + +const int KAUTH_ACL_FLAGS_PRIVATE = 65535; + +const int KAUTH_ACL_DEFER_INHERIT = 65536; + +const int KAUTH_ACL_NO_INHERIT = 131072; + +const int KAUTH_FILESEC_NOACL = 4294967295; + +const int KAUTH_FILESEC_MAGIC = 19710317; + +const int KAUTH_FILESEC_FLAGS_PRIVATE = 65535; + +const int KAUTH_FILESEC_DEFER_INHERIT = 65536; + +const int KAUTH_FILESEC_NO_INHERIT = 131072; + +const String KAUTH_FILESEC_XATTR = 'com.apple.system.Security'; + +const int KAUTH_ENDIAN_HOST = 1; + +const int KAUTH_ENDIAN_DISK = 2; + +const int KAUTH_VNODE_READ_DATA = 2; + +const int KAUTH_VNODE_LIST_DIRECTORY = 2; + +const int KAUTH_VNODE_WRITE_DATA = 4; + +const int KAUTH_VNODE_ADD_FILE = 4; + +const int KAUTH_VNODE_EXECUTE = 8; + +const int KAUTH_VNODE_SEARCH = 8; + +const int KAUTH_VNODE_DELETE = 16; + +const int KAUTH_VNODE_APPEND_DATA = 32; + +const int KAUTH_VNODE_ADD_SUBDIRECTORY = 32; + +const int KAUTH_VNODE_DELETE_CHILD = 64; + +const int KAUTH_VNODE_READ_ATTRIBUTES = 128; + +const int KAUTH_VNODE_WRITE_ATTRIBUTES = 256; + +const int KAUTH_VNODE_READ_EXTATTRIBUTES = 512; + +const int KAUTH_VNODE_WRITE_EXTATTRIBUTES = 1024; + +const int KAUTH_VNODE_READ_SECURITY = 2048; + +const int KAUTH_VNODE_WRITE_SECURITY = 4096; + +const int KAUTH_VNODE_TAKE_OWNERSHIP = 8192; + +const int KAUTH_VNODE_CHANGE_OWNER = 8192; + +const int KAUTH_VNODE_SYNCHRONIZE = 1048576; + +const int KAUTH_VNODE_LINKTARGET = 33554432; + +const int KAUTH_VNODE_CHECKIMMUTABLE = 67108864; + +const int KAUTH_VNODE_ACCESS = 2147483648; + +const int KAUTH_VNODE_NOIMMUTABLE = 1073741824; + +const int KAUTH_VNODE_SEARCHBYANYONE = 536870912; + +const int KAUTH_VNODE_GENERIC_READ_BITS = 2690; + +const int KAUTH_VNODE_GENERIC_WRITE_BITS = 5492; + +const int KAUTH_VNODE_GENERIC_EXECUTE_BITS = 8; + +const int KAUTH_VNODE_GENERIC_ALL_BITS = 8190; + +const int KAUTH_VNODE_WRITE_RIGHTS = 100676980; + +const int __DARWIN_ACL_READ_DATA = 2; + +const int __DARWIN_ACL_LIST_DIRECTORY = 2; + +const int __DARWIN_ACL_WRITE_DATA = 4; + +const int __DARWIN_ACL_ADD_FILE = 4; + +const int __DARWIN_ACL_EXECUTE = 8; + +const int __DARWIN_ACL_SEARCH = 8; + +const int __DARWIN_ACL_DELETE = 16; + +const int __DARWIN_ACL_APPEND_DATA = 32; + +const int __DARWIN_ACL_ADD_SUBDIRECTORY = 32; + +const int __DARWIN_ACL_DELETE_CHILD = 64; + +const int __DARWIN_ACL_READ_ATTRIBUTES = 128; + +const int __DARWIN_ACL_WRITE_ATTRIBUTES = 256; + +const int __DARWIN_ACL_READ_EXTATTRIBUTES = 512; + +const int __DARWIN_ACL_WRITE_EXTATTRIBUTES = 1024; + +const int __DARWIN_ACL_READ_SECURITY = 2048; + +const int __DARWIN_ACL_WRITE_SECURITY = 4096; + +const int __DARWIN_ACL_CHANGE_OWNER = 8192; + +const int __DARWIN_ACL_SYNCHRONIZE = 1048576; + +const int __DARWIN_ACL_EXTENDED_ALLOW = 1; + +const int __DARWIN_ACL_EXTENDED_DENY = 2; + +const int __DARWIN_ACL_ENTRY_INHERITED = 16; + +const int __DARWIN_ACL_ENTRY_FILE_INHERIT = 32; + +const int __DARWIN_ACL_ENTRY_DIRECTORY_INHERIT = 64; + +const int __DARWIN_ACL_ENTRY_LIMIT_INHERIT = 128; + +const int __DARWIN_ACL_ENTRY_ONLY_INHERIT = 256; + +const int __DARWIN_ACL_FLAG_NO_INHERIT = 131072; + +const int ACL_MAX_ENTRIES = 128; + +const int ACL_UNDEFINED_ID = 0; + +const int __COREFOUNDATION_CFSTRINGTOKENIZER__ = 1; + +const int __COREFOUNDATION_CFFILEDESCRIPTOR__ = 1; + +const int __COREFOUNDATION_CFUSERNOTIFICATION__ = 1; + +const int __COREFOUNDATION_CFXMLNODE__ = 1; + +const int __COREFOUNDATION_CFXMLPARSER__ = 1; + +const int _CSSMTYPE_H_ = 1; + +const int _CSSMCONFIG_H_ = 1; + +const int SEC_ASN1_TAG_MASK = 255; + +const int SEC_ASN1_TAGNUM_MASK = 31; + +const int SEC_ASN1_BOOLEAN = 1; + +const int SEC_ASN1_INTEGER = 2; + +const int SEC_ASN1_BIT_STRING = 3; + +const int SEC_ASN1_OCTET_STRING = 4; + +const int SEC_ASN1_NULL = 5; + +const int SEC_ASN1_OBJECT_ID = 6; + +const int SEC_ASN1_OBJECT_DESCRIPTOR = 7; + +const int SEC_ASN1_REAL = 9; + +const int SEC_ASN1_ENUMERATED = 10; + +const int SEC_ASN1_EMBEDDED_PDV = 11; + +const int SEC_ASN1_UTF8_STRING = 12; + +const int SEC_ASN1_SEQUENCE = 16; + +const int SEC_ASN1_SET = 17; + +const int SEC_ASN1_NUMERIC_STRING = 18; + +const int SEC_ASN1_PRINTABLE_STRING = 19; + +const int SEC_ASN1_T61_STRING = 20; + +const int SEC_ASN1_VIDEOTEX_STRING = 21; + +const int SEC_ASN1_IA5_STRING = 22; + +const int SEC_ASN1_UTC_TIME = 23; + +const int SEC_ASN1_GENERALIZED_TIME = 24; + +const int SEC_ASN1_GRAPHIC_STRING = 25; + +const int SEC_ASN1_VISIBLE_STRING = 26; + +const int SEC_ASN1_GENERAL_STRING = 27; + +const int SEC_ASN1_UNIVERSAL_STRING = 28; + +const int SEC_ASN1_BMP_STRING = 30; + +const int SEC_ASN1_HIGH_TAG_NUMBER = 31; + +const int SEC_ASN1_TELETEX_STRING = 20; + +const int SEC_ASN1_METHOD_MASK = 32; + +const int SEC_ASN1_PRIMITIVE = 0; + +const int SEC_ASN1_CONSTRUCTED = 32; + +const int SEC_ASN1_CLASS_MASK = 192; + +const int SEC_ASN1_UNIVERSAL = 0; + +const int SEC_ASN1_APPLICATION = 64; + +const int SEC_ASN1_CONTEXT_SPECIFIC = 128; + +const int SEC_ASN1_PRIVATE = 192; + +const int SEC_ASN1_OPTIONAL = 256; + +const int SEC_ASN1_EXPLICIT = 512; + +const int SEC_ASN1_ANY = 1024; + +const int SEC_ASN1_INLINE = 2048; + +const int SEC_ASN1_POINTER = 4096; + +const int SEC_ASN1_GROUP = 8192; + +const int SEC_ASN1_DYNAMIC = 16384; + +const int SEC_ASN1_SKIP = 32768; + +const int SEC_ASN1_INNER = 65536; + +const int SEC_ASN1_SAVE = 131072; + +const int SEC_ASN1_SKIP_REST = 524288; + +const int SEC_ASN1_CHOICE = 1048576; + +const int SEC_ASN1_SIGNED_INT = 8388608; + +const int SEC_ASN1_SEQUENCE_OF = 8208; + +const int SEC_ASN1_SET_OF = 8209; + +const int SEC_ASN1_ANY_CONTENTS = 66560; + +const int _CSSMAPPLE_H_ = 1; + +const int _CSSMERR_H_ = 1; + +const int _X509DEFS_H_ = 1; + +const int BER_TAG_UNKNOWN = 0; + +const int BER_TAG_BOOLEAN = 1; + +const int BER_TAG_INTEGER = 2; + +const int BER_TAG_BIT_STRING = 3; + +const int BER_TAG_OCTET_STRING = 4; + +const int BER_TAG_NULL = 5; + +const int BER_TAG_OID = 6; + +const int BER_TAG_OBJECT_DESCRIPTOR = 7; + +const int BER_TAG_EXTERNAL = 8; + +const int BER_TAG_REAL = 9; + +const int BER_TAG_ENUMERATED = 10; + +const int BER_TAG_PKIX_UTF8_STRING = 12; + +const int BER_TAG_SEQUENCE = 16; + +const int BER_TAG_SET = 17; + +const int BER_TAG_NUMERIC_STRING = 18; + +const int BER_TAG_PRINTABLE_STRING = 19; + +const int BER_TAG_T61_STRING = 20; + +const int BER_TAG_TELETEX_STRING = 20; + +const int BER_TAG_VIDEOTEX_STRING = 21; + +const int BER_TAG_IA5_STRING = 22; + +const int BER_TAG_UTC_TIME = 23; + +const int BER_TAG_GENERALIZED_TIME = 24; + +const int BER_TAG_GRAPHIC_STRING = 25; + +const int BER_TAG_ISO646_STRING = 26; + +const int BER_TAG_GENERAL_STRING = 27; + +const int BER_TAG_VISIBLE_STRING = 26; + +const int BER_TAG_PKIX_UNIVERSAL_STRING = 28; + +const int BER_TAG_PKIX_BMP_STRING = 30; + +const int CSSM_X509_OPTION_PRESENT = 1; + +const int CSSM_X509_OPTION_NOT_PRESENT = 0; + +const int CE_KU_DigitalSignature = 32768; + +const int CE_KU_NonRepudiation = 16384; + +const int CE_KU_KeyEncipherment = 8192; + +const int CE_KU_DataEncipherment = 4096; + +const int CE_KU_KeyAgreement = 2048; + +const int CE_KU_KeyCertSign = 1024; + +const int CE_KU_CRLSign = 512; + +const int CE_KU_EncipherOnly = 256; + +const int CE_KU_DecipherOnly = 128; + +const int CE_CR_Unspecified = 0; + +const int CE_CR_KeyCompromise = 1; + +const int CE_CR_CACompromise = 2; + +const int CE_CR_AffiliationChanged = 3; + +const int CE_CR_Superseded = 4; + +const int CE_CR_CessationOfOperation = 5; + +const int CE_CR_CertificateHold = 6; + +const int CE_CR_RemoveFromCRL = 8; + +const int CE_CD_Unspecified = 128; + +const int CE_CD_KeyCompromise = 64; + +const int CE_CD_CACompromise = 32; + +const int CE_CD_AffiliationChanged = 16; + +const int CE_CD_Superseded = 8; + +const int CE_CD_CessationOfOperation = 4; + +const int CE_CD_CertificateHold = 2; + +const int CSSM_APPLE_TP_SSL_OPTS_VERSION = 1; + +const int CSSM_APPLE_TP_SSL_CLIENT = 1; + +const int CSSM_APPLE_TP_CRL_OPTS_VERSION = 0; + +const int CSSM_APPLE_TP_SMIME_OPTS_VERSION = 0; + +const int CSSM_APPLE_TP_ACTION_VERSION = 0; + +const int CSSM_TP_APPLE_EVIDENCE_VERSION = 0; + +const int CSSM_EVIDENCE_FORM_APPLE_CUSTOM = 2147483648; + +const String CSSM_APPLE_CRL_END_OF_TIME = '99991231235959'; + +const String kKeychainSuffix = '.keychain'; + +const String kKeychainDbSuffix = '.keychain-db'; + +const String kSystemKeychainName = 'System.keychain'; + +const String kSystemKeychainDir = '/Library/Keychains/'; + +const String kSystemUnlockFile = '/var/db/SystemKey'; + +const String kSystemKeychainPath = '/Library/Keychains/System.keychain'; + +const String CSSM_APPLE_ACL_TAG_PARTITION_ID = '___PARTITION___'; + +const String CSSM_APPLE_ACL_TAG_INTEGRITY = '___INTEGRITY___'; + +const int errSecErrnoBase = 100000; + +const int errSecErrnoLimit = 100255; + +const int errSSLServerAuthCompleted = -9841; + +const int errSSLClientAuthCompleted = -9841; + +const int errSSLLast = -9849; + +const int NSMaximumStringLength = 2147483646; + +const int NS_UNICHAR_IS_EIGHT_BIT = 0; + +const int NSURLResponseUnknownLength = -1; -const String kVmSnapshotBssAsmSymbol = '_kDartVmSnapshotBss'; +const int NSOperationQualityOfServiceUserInteractive = 33; -const String kIsolateSnapshotDataAsmSymbol = '_kDartIsolateSnapshotData'; +const int NSOperationQualityOfServiceUserInitiated = 25; -const String kIsolateSnapshotInstructionsAsmSymbol = - '_kDartIsolateSnapshotInstructions'; +const int NSOperationQualityOfServiceUtility = 17; -const String kIsolateSnapshotBssAsmSymbol = '_kDartIsolateSnapshotBss'; +const int NSOperationQualityOfServiceBackground = 9; diff --git a/pkgs/cupertino_http/lib/src/utils.dart b/pkgs/cupertino_http/lib/src/utils.dart index 7bc87aa87c..8712c34dd8 100644 --- a/pkgs/cupertino_http/lib/src/utils.dart +++ b/pkgs/cupertino_http/lib/src/utils.dart @@ -5,10 +5,9 @@ import 'dart:ffi'; import 'dart:io'; -import 'native_cupertino_bindings.dart' as ncb; +import 'package:objective_c/objective_c.dart'; -const _packageName = 'cupertino_http'; -const _libName = _packageName; +import 'native_cupertino_bindings.dart' as ncb; /// Access to symbols that are linked into the process. /// @@ -23,70 +22,37 @@ final ncb.NativeCupertinoHttp linkedLibs = () { 'Platform ${Platform.operatingSystem} is not supported'); }(); -/// Access to symbols that are available in the cupertino_http helper shared -/// library. -final ncb.NativeCupertinoHttp helperLibs = _loadHelperLibrary(); - -DynamicLibrary _loadHelperDynamicLibrary() { - if (Platform.isMacOS || Platform.isIOS) { - return DynamicLibrary.open('$_libName.framework/$_libName'); - } - - throw UnsupportedError( - 'Platform ${Platform.operatingSystem} is not supported'); -} - -ncb.NativeCupertinoHttp _loadHelperLibrary() { - final lib = _loadHelperDynamicLibrary(); - - final initializeApi = lib.lookupFunction), - int Function(Pointer)>('Dart_InitializeApiDL'); - final initializeResult = initializeApi(NativeApi.initializeApiDLData); - if (initializeResult != 0) { - throw StateError('failed to init API.'); - } - - return ncb.NativeCupertinoHttp(lib); -} - -String? toStringOrNull(ncb.NSString? s) { - if (s == null) { - return null; - } - - return s.toString(); -} - /// Converts a NSDictionary containing NSString keys and NSString values into /// an equivalent map. -Map stringNSDictionaryToMap(ncb.NSDictionary d) { - // TODO(https://github.com/dart-lang/ffigen/issues/374): Make this - // function type safe. Currently it will unconditionally cast both keys and - // values to NSString with a likely crash down the line if that isn't their - // true types. +Map stringNSDictionaryToMap(NSDictionary d) { final m = {}; - - final keys = ncb.NSArray.castFrom(d.allKeys); + final keys = NSArray.castFrom(d.allKeys); for (var i = 0; i < keys.count; ++i) { final nsKey = keys.objectAtIndex_(i); - final key = ncb.NSString.castFrom(nsKey).toString(); - final value = ncb.NSString.castFrom(d.objectForKey_(nsKey)!).toString(); + if (!NSString.isInstance(nsKey)) { + throw UnsupportedError('keys must be strings'); + } + final key = NSString.castFrom(nsKey).toString(); + final nsValue = d.objectForKey_(nsKey); + if (nsValue == null || !NSString.isInstance(nsValue)) { + throw UnsupportedError('values must be strings'); + } + final value = NSString.castFrom(nsValue).toString(); m[key] = value; } return m; } -ncb.NSArray stringIterableToNSArray(Iterable strings) { - final array = - ncb.NSMutableArray.arrayWithCapacity_(linkedLibs, strings.length); +NSArray stringIterableToNSArray(Iterable strings) { + final array = NSMutableArray.arrayWithCapacity_(strings.length); var index = 0; for (var s in strings) { - array.setObject_atIndexedSubscript_(s.toNSString(linkedLibs), index++); + array.setObject_atIndexedSubscript_(s.toNSString(), index++); } return array; } -ncb.NSURL uriToNSURL(Uri uri) => ncb.NSURL - .URLWithString_(linkedLibs, uri.toString().toNSString(linkedLibs))!; +NSURL uriToNSURL(Uri uri) => NSURL.URLWithString_(uri.toString().toNSString())!; +Uri nsurlToUri(NSURL url) => Uri.parse(url.absoluteString!.toString()); diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index cff2546b3e..dbdda7067b 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -7,7 +7,7 @@ repository: https://github.com/dart-lang/http/tree/master/pkgs/cupertino_http environment: sdk: ^3.4.0 - flutter: '>=3.22.0' # If changed, update test matrix. + flutter: '>=3.24.0' # If changed, update test matrix. dependencies: async: ^2.5.0 @@ -16,11 +16,12 @@ dependencies: sdk: flutter http: ^1.2.0 http_profile: ^0.1.0 + objective_c: ^3.0.0 web_socket: ^0.1.0 dev_dependencies: dart_flutter_team_lints: ^3.0.0 - ffigen: ^11.0.0 + ffigen: ^15.0.0 flutter: plugin: diff --git a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.h b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.h deleted file mode 100644 index 775b70af56..0000000000 --- a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Normally, we'd "import " -// but that would mean that ffigen would process every file in the Foundation -// framework, which is huge. So just import the headers that we need. -#import -#import - -#include "dart-sdk/include/dart_api_dl.h" - -/** - * The type of message being sent to a Dart port. See CUPHTTPClientDelegate. - */ -typedef NS_ENUM(NSInteger, MessageType) { - ResponseMessage = 0, - DataMessage = 1, - CompletedMessage = 2, - RedirectMessage = 3, - FinishedDownloading = 4, - WebSocketOpened = 5, - WebSocketClosed = 6, -}; - -/** - * The configuration associated with a NSURLSessionTask. - * See CUPHTTPClientDelegate. - */ -@interface CUPHTTPTaskConfiguration : NSObject - -- (id) initWithPort:(Dart_Port)sendPort; - -@property (readonly) Dart_Port sendPort; - -@end - -/** - * A delegate for NSURLSession that forwards events for registered - * NSURLSessionTasks and forwards them to a port for consumption in Dart. - * - * The messages sent to the port are contained in a List with one of 3 - * possible formats: - * - * 1. When the delegate receives a HTTP redirect response: - * [MessageType::RedirectMessage, ] - * - * 2. When the delegate receives a HTTP response: - * [MessageType::ResponseMessage, ] - * - * 3. When the delegate receives some HTTP data: - * [MessageType::DataMessage, ] - * - * 4. When the delegate is informed that the response is complete: - * [MessageType::CompletedMessage, ] - */ -@interface CUPHTTPClientDelegate : NSObject - -/** - * Instruct the delegate to forward events for the given task to the port - * specified in the configuration. - */ -- (void)registerTask:(NSURLSessionTask *)task - withConfiguration:(CUPHTTPTaskConfiguration *)config; -@end diff --git a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m b/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m deleted file mode 100644 index b0f2fb742c..0000000000 --- a/pkgs/cupertino_http/src/CUPHTTPClientDelegate.m +++ /dev/null @@ -1,277 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -#import "CUPHTTPClientDelegate.h" - -#import -#include - -#import "CUPHTTPCompletionHelper.h" -#import "CUPHTTPForwardedDelegate.h" - -static Dart_CObject MessageTypeToCObject(MessageType messageType) { - Dart_CObject cobj; - cobj.type = Dart_CObject_kInt64; - cobj.value.as_int64 = messageType; - return cobj; -} - -@implementation CUPHTTPTaskConfiguration - -- (id) initWithPort:(Dart_Port)sendPort { - self = [super init]; - if (self != nil) { - self->_sendPort = sendPort; - } - return self; -} - -@end - -@implementation CUPHTTPClientDelegate { - NSMapTable *taskConfigurations; -} - -- (instancetype)init { - self = [super init]; - if (self != nil) { - taskConfigurations = [[NSMapTable strongToStrongObjectsMapTable] retain]; - } - return self; -} - -- (void)dealloc { - [taskConfigurations release]; - [super dealloc]; -} - -- (void)registerTask:(NSURLSessionTask *) task - withConfiguration:(CUPHTTPTaskConfiguration *)config { - [taskConfigurations setObject:config forKey:task]; -} - --(void)unregisterTask:(NSURLSessionTask *) task { - [taskConfigurations removeObjectForKey:task]; -} - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task -willPerformHTTPRedirection:(NSHTTPURLResponse *)response - newRequest:(NSURLRequest *)request - completionHandler:(void (^)(NSURLRequest *))completionHandler { - CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; - NSAssert(config != nil, @"No configuration for task."); - - CUPHTTPForwardedRedirect *forwardedRedirect = [[CUPHTTPForwardedRedirect alloc] - initWithSession:session task:task - response:response request:request]; - Dart_CObject ctype = MessageTypeToCObject(RedirectMessage); - Dart_CObject credirect = NSObjectToCObject(forwardedRedirect); - Dart_CObject* message_carray[] = { &ctype, &credirect }; - - Dart_CObject message_cobj; - message_cobj.type = Dart_CObject_kArray; - message_cobj.value.as_array.length = 2; - message_cobj.value.as_array.values = message_carray; - - [forwardedRedirect.lock lock]; // After this line, any attempt to acquire the lock will wait. - const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); - NSAssert(success, @"Dart_PostCObject_DL failed."); - - // Will be unlocked by [CUPHTTPRedirect continueWithRequest:], which will - // set `redirect.redirectRequest`. - // - // See the @interface description for CUPHTTPRedirect. - [forwardedRedirect.lock lock]; - - completionHandler(forwardedRedirect.redirectRequest); - [forwardedRedirect release]; -} - -- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)task -didReceiveResponse:(NSURLResponse *)response - completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler -{ - CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; - NSAssert(config != nil, @"No configuration for task."); - - CUPHTTPForwardedResponse *forwardedResponse = [[CUPHTTPForwardedResponse alloc] - initWithSession:session - task:task - response:response]; - - - Dart_CObject ctype = MessageTypeToCObject(ResponseMessage); - Dart_CObject cRsponseReceived = NSObjectToCObject(forwardedResponse); - Dart_CObject* message_carray[] = { &ctype, &cRsponseReceived }; - - Dart_CObject message_cobj; - message_cobj.type = Dart_CObject_kArray; - message_cobj.value.as_array.length = 2; - message_cobj.value.as_array.values = message_carray; - - [forwardedResponse.lock lock]; // After this line, any attempt to acquire the lock will wait. - const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); - NSAssert(success, @"Dart_PostCObject_DL failed."); - - // Will be unlocked by [CUPHTTPRedirect continueWithRequest:], which will - // set `redirect.redirectRequest`. - // - // See the @interface description for CUPHTTPRedirect. - [forwardedResponse.lock lock]; - completionHandler(forwardedResponse.disposition); - [forwardedResponse release]; -} - - -- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)task - didReceiveData:(NSData *)data { - CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; - NSAssert(config != nil, @"No configuration for task."); - - CUPHTTPForwardedData *forwardedData = [[CUPHTTPForwardedData alloc] - initWithSession:session task:task data: data] - ; - - Dart_CObject ctype = MessageTypeToCObject(DataMessage); - Dart_CObject cReceiveData = NSObjectToCObject(forwardedData); - Dart_CObject* message_carray[] = { &ctype, &cReceiveData }; - - Dart_CObject message_cobj; - message_cobj.type = Dart_CObject_kArray; - message_cobj.value.as_array.length = 2; - message_cobj.value.as_array.values = message_carray; - - [forwardedData.lock lock]; // After this line, any attempt to acquire the lock will wait. - const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); - NSAssert(success, @"Dart_PostCObject_DL failed."); - - // Will be unlocked by [CUPHTTPRedirect continueWithRequest:], which will - // set `redirect.redirectRequest`. - // - // See the @interface description for CUPHTTPRedirect. - [forwardedData.lock lock]; - [forwardedData release]; -} - -- (void)URLSession:(NSURLSession *)session - downloadTask:(NSURLSessionDownloadTask *)downloadTask -didFinishDownloadingToURL:(NSURL *)location { - CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:downloadTask]; - NSAssert(config != nil, @"No configuration for task."); - - CUPHTTPForwardedFinishedDownloading *forwardedFinishedDownload = [ - [CUPHTTPForwardedFinishedDownloading alloc] - initWithSession:session downloadTask:downloadTask url: location]; - - Dart_CObject ctype = MessageTypeToCObject(FinishedDownloading); - Dart_CObject cReceiveData = NSObjectToCObject(forwardedFinishedDownload); - Dart_CObject* message_carray[] = { &ctype, &cReceiveData }; - - Dart_CObject message_cobj; - message_cobj.type = Dart_CObject_kArray; - message_cobj.value.as_array.length = 2; - message_cobj.value.as_array.values = message_carray; - - // After this line, any attempt to acquire the lock will wait. - [forwardedFinishedDownload.lock lock]; - const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); - NSAssert(success, @"Dart_PostCObject_DL failed."); - - [forwardedFinishedDownload.lock lock]; - [forwardedFinishedDownload release]; -} - -- (void)URLSession:(NSURLSession *)session - task:(NSURLSessionTask *)task -didCompleteWithError:(nullable NSError *)error { - CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; - NSAssert(config != nil, @"No configuration for task."); - - CUPHTTPForwardedComplete *forwardedComplete = [[CUPHTTPForwardedComplete alloc] - initWithSession:session task:task error: error]; - - - Dart_CObject ctype = MessageTypeToCObject(CompletedMessage); - Dart_CObject cComplete = NSObjectToCObject(forwardedComplete); - Dart_CObject* message_carray[] = { &ctype, &cComplete }; - - Dart_CObject message_cobj; - message_cobj.type = Dart_CObject_kArray; - message_cobj.value.as_array.length = 2; - message_cobj.value.as_array.values = message_carray; - - [forwardedComplete.lock lock]; // After this line, any attempt to acquire the lock will wait. - const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); - NSAssert(success, @"Dart_PostCObject_DL failed."); - - // Will be unlocked by [CUPHTTPRedirect continueWithRequest:], which will - // set `redirect.redirectRequest`. - // - // See the @interface description for CUPHTTPRedirect. - [forwardedComplete.lock lock]; - [forwardedComplete release]; -} - -// https://developer.apple.com/documentation/foundation/nsurlsessionwebsocketdelegate?language=objc - - -- (void)URLSession:(NSURLSession *)session - webSocketTask:(NSURLSessionWebSocketTask *)task -didOpenWithProtocol:(nullable NSString *)protocol { - CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; - NSAssert(config != nil, @"No configuration for task."); - - CUPHTTPForwardedWebSocketOpened *opened = [[CUPHTTPForwardedWebSocketOpened alloc] - initWithSession:session webSocketTask:task - didOpenWithProtocol: protocol]; - - Dart_CObject ctype = MessageTypeToCObject(WebSocketOpened); - Dart_CObject cComplete = NSObjectToCObject(opened); - Dart_CObject* message_carray[] = { &ctype, &cComplete }; - - Dart_CObject message_cobj; - message_cobj.type = Dart_CObject_kArray; - message_cobj.value.as_array.length = 2; - message_cobj.value.as_array.values = message_carray; - - [opened.lock lock]; // After this line, any attempt to acquire the lock will wait. - const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); - NSAssert(success, @"Dart_PostCObject_DL failed."); - - [opened.lock lock]; - [opened release]; -} - - -- (void)URLSession:(NSURLSession *)session - webSocketTask:(NSURLSessionWebSocketTask *)task - didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode - reason:(nullable NSData *)reason { - CUPHTTPTaskConfiguration *config = [taskConfigurations objectForKey:task]; - NSAssert(config != nil, @"No configuration for task."); - - CUPHTTPForwardedWebSocketClosed *closed = [[CUPHTTPForwardedWebSocketClosed alloc] - initWithSession:session webSocketTask:task - code: closeCode - reason: reason]; - - Dart_CObject ctype = MessageTypeToCObject(WebSocketClosed); - Dart_CObject cComplete = NSObjectToCObject(closed); - Dart_CObject* message_carray[] = { &ctype, &cComplete }; - - Dart_CObject message_cobj; - message_cobj.type = Dart_CObject_kArray; - message_cobj.value.as_array.length = 2; - message_cobj.value.as_array.values = message_carray; - - [closed.lock lock]; // After this line, any attempt to acquire the lock will wait. - const bool success = Dart_PostCObject_DL(config.sendPort, &message_cobj); - NSAssert(success, @"Dart_PostCObject_DL failed."); - - [closed.lock lock]; - [closed release]; -} - -@end diff --git a/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h b/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h deleted file mode 100644 index 501b80b1fc..0000000000 --- a/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.h +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Normally, we'd "import " -// but that would mean that ffigen would process every file in the Foundation -// framework, which is huge. So just import the headers that we need. -#import -#import - -#include "dart-sdk/include/dart_api_dl.h" - -/** - * Creates a `Dart_CObject` containing the given `NSObject` pointer as an int. - */ -Dart_CObject NSObjectToCObject(NSObject* n); - -/** - * Executes [NSURLSessionWebSocketTask sendMessage:completionHandler:] and - * sends the results of the completion handler to the given `Dart_Port`. - */ -extern void CUPHTTPSendMessage(NSURLSessionWebSocketTask *task, - NSURLSessionWebSocketMessage *message, - Dart_Port sendPort); - -/** - * Executes [NSURLSessionWebSocketTask receiveMessageWithCompletionHandler:] - * and sends the results of the completion handler to the given `Dart_Port`. - */ -extern void CUPHTTPReceiveMessage(NSURLSessionWebSocketTask *task, - Dart_Port sendPort); diff --git a/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m b/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m deleted file mode 100644 index 9f8137d395..0000000000 --- a/pkgs/cupertino_http/src/CUPHTTPCompletionHelper.m +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -#import "CUPHTTPCompletionHelper.h" - -#import -#include - -Dart_CObject NSObjectToCObject(NSObject* n) { - Dart_CObject cobj; - cobj.type = Dart_CObject_kInt64; - cobj.value.as_int64 = (int64_t) n; - return cobj; -} - -void CUPHTTPSendMessage(NSURLSessionWebSocketTask *task, NSURLSessionWebSocketMessage *message, Dart_Port sendPort) { - [task sendMessage: message - completionHandler: ^(NSError *error) { - [error retain]; - Dart_CObject message_cobj = NSObjectToCObject(error); - const bool success = Dart_PostCObject_DL(sendPort, &message_cobj); - NSCAssert(success, @"Dart_PostCObject_DL failed."); - }]; -} - -void CUPHTTPReceiveMessage(NSURLSessionWebSocketTask *task, Dart_Port sendPort) { - [task - receiveMessageWithCompletionHandler: ^(NSURLSessionWebSocketMessage *message, NSError *error) { - [message retain]; - [error retain]; - - Dart_CObject cmessage = NSObjectToCObject(message); - Dart_CObject cerror = NSObjectToCObject(error); - Dart_CObject* message_carray[] = { &cmessage, &cerror }; - - Dart_CObject message_cobj; - message_cobj.type = Dart_CObject_kArray; - message_cobj.value.as_array.length = 2; - message_cobj.value.as_array.values = message_carray; - - const bool success = Dart_PostCObject_DL(sendPort, &message_cobj); - NSCAssert(success, @"Dart_PostCObject_DL failed."); - }]; -} diff --git a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h deleted file mode 100644 index 3e61ed494b..0000000000 --- a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.h +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Normally, we'd "import " -// but that would mean that ffigen would process every file in the Foundation -// framework, which is huge. So just import the headers that we need. -#import -#import - - -/** - * An object used to communicate redirect information to Dart code. - * - * The flow is: - * 1. CUPHTTPClientDelegate receives a message from the URL Loading System. - * 2. CUPHTTPClientDelegate creates a new CUPHTTPForwardedDelegate subclass. - * 3. CUPHTTPClientDelegate sends the CUPHTTPForwardedDelegate to the - * configured Dart_Port. - * 4. CUPHTTPClientDelegate waits on CUPHTTPForwardedDelegate.lock - * 5. When the Dart code is done process the message received on the port, - * it calls [CUPHTTPForwardedDelegate finish*], which releases the lock. - * 6. CUPHTTPClientDelegate continues running. - */ -@interface CUPHTTPForwardedDelegate : NSObject -- (id) initWithSession:(NSURLSession *)session - task:(NSURLSessionTask *) task; - -/** - * Indicates that the task should continue executing using the given request. - */ -- (void) finish;; - -@property (readonly) NSURLSession *session; -@property (readonly) NSURLSessionTask *task; - -// This property is meant to be used only by CUPHTTPClientDelegate. -@property (readonly) NSLock *lock; - -@end - -@interface CUPHTTPForwardedRedirect : CUPHTTPForwardedDelegate - -- (id) initWithSession:(NSURLSession *)session - task:(NSURLSessionTask *) task - response:(NSHTTPURLResponse *)response - request:(NSURLRequest *)request; - -/** - * Indicates that the task should continue executing using the given request. - * If the request is NIL then the redirect is not followed and the task is - * complete. - */ -- (void) finishWithRequest:(nullable NSURLRequest *) request; - -@property (readonly) NSHTTPURLResponse *response; -@property (readonly) NSURLRequest *request; - -// This property is meant to be used only by CUPHTTPClientDelegate. -@property (readonly) NSURLRequest *redirectRequest; - -@end - -@interface CUPHTTPForwardedResponse : CUPHTTPForwardedDelegate - -- (id) initWithSession:(NSURLSession *)session - task:(NSURLSessionTask *) task - response:(NSURLResponse *)response; - -- (void) finishWithDisposition:(NSURLSessionResponseDisposition) disposition; - -@property (readonly) NSURLResponse *response; - -// This property is meant to be used only by CUPHTTPClientDelegate. -@property (readonly) NSURLSessionResponseDisposition disposition; - -@end - -@interface CUPHTTPForwardedData : CUPHTTPForwardedDelegate - -- (id) initWithSession:(NSURLSession *)session - task:(NSURLSessionTask *) task - data:(NSData *)data; - -@property (readonly) NSData* data; - -@end - - -@interface CUPHTTPForwardedComplete : CUPHTTPForwardedDelegate - -- (id) initWithSession:(NSURLSession *)session - task:(NSURLSessionTask *) task - error:(nullable NSError *)error; - -@property (nullable, readonly) NSError* error; - -@end - -@interface CUPHTTPForwardedFinishedDownloading : CUPHTTPForwardedDelegate - -- (id) initWithSession:(NSURLSession *)session - downloadTask:(NSURLSessionDownloadTask *)downloadTask - url:(NSURL *)location; - -@property (readonly) NSURL* location; - -@end - -@interface CUPHTTPForwardedWebSocketOpened : CUPHTTPForwardedDelegate - -- (id) initWithSession:(NSURLSession *)session - webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask - didOpenWithProtocol:(nullable NSString *)protocol; - -@property (nullable, readonly) NSString* protocol; - -@end - -@interface CUPHTTPForwardedWebSocketClosed : CUPHTTPForwardedDelegate - -- (id) initWithSession:(NSURLSession *)session - webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask - code:(NSURLSessionWebSocketCloseCode)closeCode - reason:(NSData *)reason; - -@property (readonly) NSURLSessionWebSocketCloseCode closeCode; -@property (nullable, readonly) NSData* reason; - -@end diff --git a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m b/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m deleted file mode 100644 index a9a401d5aa..0000000000 --- a/pkgs/cupertino_http/src/CUPHTTPForwardedDelegate.m +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -#import "CUPHTTPForwardedDelegate.h" - -#import -#include - -@implementation CUPHTTPForwardedDelegate - -- (id) initWithSession:(NSURLSession *)session - task:(NSURLSessionTask *) task { - self = [super init]; - if (self != nil) { - self->_session = [session retain]; - self->_task = [task retain]; - self->_lock = [NSLock new]; - } - return self; -} - -- (void) dealloc { - [self->_session release]; - [self->_task release]; - [self->_lock release]; - [super dealloc]; -} - -- (void) finish { - [self->_lock unlock]; -} - -@end - -@implementation CUPHTTPForwardedRedirect - -- (id) initWithSession:(NSURLSession *)session - task:(NSURLSessionTask *) task - response:(NSHTTPURLResponse *)response - request:(NSURLRequest *)request{ - self = [super initWithSession: session task: task]; - if (self != nil) { - self->_response = [response retain]; - self->_request = [request retain]; - } - return self; -} - -- (void) dealloc { - [self->_response release]; - [self->_request release]; - [super dealloc]; -} - -- (void) finishWithRequest:(nullable NSURLRequest *) request { - self->_redirectRequest = [request retain]; - [super finish]; -} - -@end - -@implementation CUPHTTPForwardedResponse - -- (id) initWithSession:(NSURLSession *)session - task:(NSURLSessionTask *) task - response:(NSURLResponse *)response { - self = [super initWithSession: session task: task]; - if (self != nil) { - self->_response = [response retain]; - } - return self; -} - -- (void) dealloc { - [self->_response release]; - [super dealloc]; -} - -- (void) finishWithDisposition:(NSURLSessionResponseDisposition) disposition { - self->_disposition = disposition; - [super finish]; -} - -@end - -@implementation CUPHTTPForwardedData - -- (id) initWithSession:(NSURLSession *)session - task:(NSURLSessionTask *) task - data:(NSData *)data { - self = [super initWithSession: session task: task]; - if (self != nil) { - self->_data = [data retain]; - } - return self; -} - -- (void) dealloc { - [self->_data release]; - [super dealloc]; -} - -@end - -@implementation CUPHTTPForwardedComplete - -- (id) initWithSession:(NSURLSession *)session - task:(NSURLSessionTask *) task - error:(NSError *)error { - self = [super initWithSession: session task: task]; - if (self != nil) { - self->_error = [error retain]; - } - return self; -} - -- (void) dealloc { - [self->_error release]; - [super dealloc]; -} - -@end - -@implementation CUPHTTPForwardedFinishedDownloading - -- (id) initWithSession:(NSURLSession *)session - downloadTask:(NSURLSessionDownloadTask *)downloadTask - url:(NSURL *)location { - self = [super initWithSession: session task: downloadTask]; - if (self != nil) { - self->_location = [location retain]; - } - return self; -} - -- (void) dealloc { - [self->_location release]; - [super dealloc]; -} - -@end - -@implementation CUPHTTPForwardedWebSocketOpened - -- (id) initWithSession:(NSURLSession *)session - webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask - didOpenWithProtocol:(NSString *)protocol { - self = [super initWithSession: session task: webSocketTask]; - if (self != nil) { - self->_protocol = [protocol retain]; - } - return self; -} - -- (void) dealloc { - [self->_protocol release]; - [super dealloc]; -} - -@end - -@implementation CUPHTTPForwardedWebSocketClosed - -- (id) initWithSession:(NSURLSession *)session - webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask - code:(NSURLSessionWebSocketCloseCode)closeCode - reason:(NSData *)reason { - self = [super initWithSession: session task: webSocketTask]; - if (self != nil) { - self->_closeCode = closeCode; - self->_reason = [reason retain]; - } - return self; -} - -- (void) dealloc { - [self->_reason release]; - [super dealloc]; -} - -@end - diff --git a/pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.h b/pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.h deleted file mode 100644 index 6b0e2242d0..0000000000 --- a/pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// Normally, we'd "import " -// but that would mean that ffigen would process every file in the Foundation -// framework, which is huge. So just import the headers that we need. -#import -#import - -#include "dart-sdk/include/dart_api_dl.h" - -/** - * A helper to convert a Dart Stream> into an Objective-C input stream. - */ -@interface CUPHTTPStreamToNSInputStreamAdapter : NSInputStream - -- (instancetype)initWithPort:(Dart_Port)sendPort; -- (NSUInteger)addData:(NSData *)data; -- (void)setDone; -- (void)setError:(NSError *)error; - -@end diff --git a/pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.m b/pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.m deleted file mode 100644 index ae4b0e223b..0000000000 --- a/pkgs/cupertino_http/src/CUPHTTPStreamToNSInputStreamAdapter.m +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -#import "CUPHTTPStreamToNSInputStreamAdapter.h" - -#import -#include - -@implementation CUPHTTPStreamToNSInputStreamAdapter { - Dart_Port _sendPort; - NSCondition* _dataCondition; - NSMutableData * _data; - NSStreamStatus _status; - BOOL _done; - NSError* _error; - id _delegate; // This is a weak reference. -} - -- (instancetype)initWithPort:(Dart_Port)sendPort { - self = [super init]; - if (self != nil) { - _sendPort = sendPort; - _dataCondition = [[NSCondition alloc] init]; - _data = [[NSMutableData alloc] init]; - _done = NO; - _status = NSStreamStatusNotOpen; - _error = nil; - _delegate = self; - } - return self; -} - -- (void)dealloc { - [_dataCondition release]; - [_data release]; - [_error release]; - [super dealloc]; -} - -- (NSUInteger)addData:(NSData *)data { - [_dataCondition lock]; - [_data appendData: data]; - [_dataCondition broadcast]; - [_dataCondition unlock]; - return [_data length]; -} - -- (void)setDone { - [_dataCondition lock]; - _done = YES; - [_dataCondition broadcast]; - [_dataCondition unlock]; -} - -- (void)setError:(NSError *)error { - [_dataCondition lock]; - [_error release]; - _error = [error retain]; - _status = NSStreamStatusError; - [_dataCondition broadcast]; - [_dataCondition unlock]; -} - - -#pragma mark - NSStream - -- (void)scheduleInRunLoop:(NSRunLoop*)runLoop forMode:(NSString*)mode { -} - -- (void)removeFromRunLoop:(NSRunLoop*)runLoop forMode:(NSString*)mode { -} - -- (void)open { - [_dataCondition lock]; - _status = NSStreamStatusOpen; - [_dataCondition unlock]; -} - -- (void)close { - [_dataCondition lock]; - _status = NSStreamStatusClosed; - [_dataCondition unlock]; -} - -- (id)propertyForKey:(NSStreamPropertyKey)key { - return nil; -} - -- (BOOL)setProperty:(id)property forKey:(NSStreamPropertyKey)key { - return NO; -} - -- (id)delegate { - return _delegate; -} - -- (void)setDelegate:(id)delegate { - if (delegate == nil) { - _delegate = self; - } else { - _delegate = delegate; - } -} - -- (NSError*)streamError { - return _error; -} - -- (NSStreamStatus)streamStatus { - return _status; -} - -#pragma mark - NSInputStream - -- (NSInteger)read:(uint8_t*)buffer maxLength:(NSUInteger)len { - os_log_with_type(OS_LOG_DEFAULT, - OS_LOG_TYPE_DEBUG, - "CUPHTTPStreamToNSInputStreamAdapter: read len=%tu", len); - [_dataCondition lock]; - - while ([_data length] == 0 && !_done && _error == nil) { - // There is no data to return so signal the Dart code that it should add more data through - // [self addData:]. - Dart_CObject message_cobj; - message_cobj.type = Dart_CObject_kInt64; - message_cobj.value.as_int64 = len; - - const bool success = Dart_PostCObject_DL(_sendPort, &message_cobj); - NSCAssert(success, @"Dart_PostCObject_DL failed."); - - [_dataCondition wait]; - } - - NSInteger copySize; - if (_error == nil) { - copySize = MIN(len, [_data length]); - NSRange readRange = NSMakeRange(0, copySize); - [_data getBytes:(void *)buffer range: readRange]; - // Shift the remaining data over to the beginning of the buffer. - [_data replaceBytesInRange: readRange withBytes: NULL length: 0]; - - if (_done && [_data length] == 0) { - _status = NSStreamStatusAtEnd; - } - } else { - copySize = -1; - } - - [_dataCondition unlock]; - return copySize; -} - -- (BOOL)getBuffer:(uint8_t**)buffer length:(NSUInteger*)len { - return NO; -} - -- (BOOL)hasBytesAvailable { - return YES; -} - -#pragma mark - NSStreamDelegate - -- (void)stream:(NSStream *)theStream handleEvent:(NSStreamEvent)streamEvent { - id delegate = _delegate; - if (delegate != self) { - os_log_with_type(OS_LOG_DEFAULT, - OS_LOG_TYPE_ERROR, - "CUPHTTPStreamToNSInputStreamAdapter: non-self delegate was invoked"); - } -} - -@end diff --git a/pkgs/cupertino_http/src/dart-sdk/include/dart_api.h b/pkgs/cupertino_http/src/dart-sdk/include/dart_api.h deleted file mode 100644 index abc0291836..0000000000 --- a/pkgs/cupertino_http/src/dart-sdk/include/dart_api.h +++ /dev/null @@ -1,3909 +0,0 @@ -/* - * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file - * for details. All rights reserved. Use of this source code is governed by a - * BSD-style license that can be found in the LICENSE file. - */ - -#ifndef RUNTIME_INCLUDE_DART_API_H_ -#define RUNTIME_INCLUDE_DART_API_H_ - -/** \mainpage Dart Embedding API Reference - * - * This reference describes the Dart Embedding API, which is used to embed the - * Dart Virtual Machine within C/C++ applications. - * - * This reference is generated from the header include/dart_api.h. - */ - -/* __STDC_FORMAT_MACROS has to be defined before including to - * enable platform independent printf format specifiers. */ -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS -#endif - -#include -#include -#include - -#ifdef __cplusplus -#define DART_EXTERN_C extern "C" -#else -#define DART_EXTERN_C extern -#endif - -#if defined(__CYGWIN__) -#error Tool chain and platform not supported. -#elif defined(_WIN32) -#if defined(DART_SHARED_LIB) -#define DART_EXPORT DART_EXTERN_C __declspec(dllexport) -#else -#define DART_EXPORT DART_EXTERN_C -#endif -#else -#if __GNUC__ >= 4 -#if defined(DART_SHARED_LIB) -#define DART_EXPORT \ - DART_EXTERN_C __attribute__((visibility("default"))) __attribute((used)) -#else -#define DART_EXPORT DART_EXTERN_C -#endif -#else -#error Tool chain not supported. -#endif -#endif - -#if __GNUC__ -#define DART_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#elif _MSC_VER -#define DART_WARN_UNUSED_RESULT _Check_return_ -#else -#define DART_WARN_UNUSED_RESULT -#endif - -/* - * ======= - * Handles - * ======= - */ - -/** - * An isolate is the unit of concurrency in Dart. Each isolate has - * its own memory and thread of control. No state is shared between - * isolates. Instead, isolates communicate by message passing. - * - * Each thread keeps track of its current isolate, which is the - * isolate which is ready to execute on the current thread. The - * current isolate may be NULL, in which case no isolate is ready to - * execute. Most of the Dart apis require there to be a current - * isolate in order to function without error. The current isolate is - * set by any call to Dart_CreateIsolateGroup or Dart_EnterIsolate. - */ -typedef struct _Dart_Isolate* Dart_Isolate; -typedef struct _Dart_IsolateGroup* Dart_IsolateGroup; - -/** - * An object reference managed by the Dart VM garbage collector. - * - * Because the garbage collector may move objects, it is unsafe to - * refer to objects directly. Instead, we refer to objects through - * handles, which are known to the garbage collector and updated - * automatically when the object is moved. Handles should be passed - * by value (except in cases like out-parameters) and should never be - * allocated on the heap. - * - * Most functions in the Dart Embedding API return a handle. When a - * function completes normally, this will be a valid handle to an - * object in the Dart VM heap. This handle may represent the result of - * the operation or it may be a special valid handle used merely to - * indicate successful completion. Note that a valid handle may in - * some cases refer to the null object. - * - * --- Error handles --- - * - * When a function encounters a problem that prevents it from - * completing normally, it returns an error handle (See Dart_IsError). - * An error handle has an associated error message that gives more - * details about the problem (See Dart_GetError). - * - * There are four kinds of error handles that can be produced, - * depending on what goes wrong: - * - * - Api error handles are produced when an api function is misused. - * This happens when a Dart embedding api function is called with - * invalid arguments or in an invalid context. - * - * - Unhandled exception error handles are produced when, during the - * execution of Dart code, an exception is thrown but not caught. - * Prototypically this would occur during a call to Dart_Invoke, but - * it can occur in any function which triggers the execution of Dart - * code (for example, Dart_ToString). - * - * An unhandled exception error provides access to an exception and - * stacktrace via the functions Dart_ErrorGetException and - * Dart_ErrorGetStackTrace. - * - * - Compilation error handles are produced when, during the execution - * of Dart code, a compile-time error occurs. As above, this can - * occur in any function which triggers the execution of Dart code. - * - * - Fatal error handles are produced when the system wants to shut - * down the current isolate. - * - * --- Propagating errors --- - * - * When an error handle is returned from the top level invocation of - * Dart code in a program, the embedder must handle the error as they - * see fit. Often, the embedder will print the error message produced - * by Dart_Error and exit the program. - * - * When an error is returned while in the body of a native function, - * it can be propagated up the call stack by calling - * Dart_PropagateError, Dart_SetReturnValue, or Dart_ThrowException. - * Errors should be propagated unless there is a specific reason not - * to. If an error is not propagated then it is ignored. For - * example, if an unhandled exception error is ignored, that - * effectively "catches" the unhandled exception. Fatal errors must - * always be propagated. - * - * When an error is propagated, any current scopes created by - * Dart_EnterScope will be exited. - * - * Using Dart_SetReturnValue to propagate an exception is somewhat - * more convenient than using Dart_PropagateError, and should be - * preferred for reasons discussed below. - * - * Dart_PropagateError and Dart_ThrowException do not return. Instead - * they transfer control non-locally using a setjmp-like mechanism. - * This can be inconvenient if you have resources that you need to - * clean up before propagating the error. - * - * When relying on Dart_PropagateError, we often return error handles - * rather than propagating them from helper functions. Consider the - * following contrived example: - * - * 1 Dart_Handle isLongStringHelper(Dart_Handle arg) { - * 2 intptr_t* length = 0; - * 3 result = Dart_StringLength(arg, &length); - * 4 if (Dart_IsError(result)) { - * 5 return result; - * 6 } - * 7 return Dart_NewBoolean(length > 100); - * 8 } - * 9 - * 10 void NativeFunction_isLongString(Dart_NativeArguments args) { - * 11 Dart_EnterScope(); - * 12 AllocateMyResource(); - * 13 Dart_Handle arg = Dart_GetNativeArgument(args, 0); - * 14 Dart_Handle result = isLongStringHelper(arg); - * 15 if (Dart_IsError(result)) { - * 16 FreeMyResource(); - * 17 Dart_PropagateError(result); - * 18 abort(); // will not reach here - * 19 } - * 20 Dart_SetReturnValue(result); - * 21 FreeMyResource(); - * 22 Dart_ExitScope(); - * 23 } - * - * In this example, we have a native function which calls a helper - * function to do its work. On line 5, the helper function could call - * Dart_PropagateError, but that would not give the native function a - * chance to call FreeMyResource(), causing a leak. Instead, the - * helper function returns the error handle to the caller, giving the - * caller a chance to clean up before propagating the error handle. - * - * When an error is propagated by calling Dart_SetReturnValue, the - * native function will be allowed to complete normally and then the - * exception will be propagated only once the native call - * returns. This can be convenient, as it allows the C code to clean - * up normally. - * - * The example can be written more simply using Dart_SetReturnValue to - * propagate the error. - * - * 1 Dart_Handle isLongStringHelper(Dart_Handle arg) { - * 2 intptr_t* length = 0; - * 3 result = Dart_StringLength(arg, &length); - * 4 if (Dart_IsError(result)) { - * 5 return result - * 6 } - * 7 return Dart_NewBoolean(length > 100); - * 8 } - * 9 - * 10 void NativeFunction_isLongString(Dart_NativeArguments args) { - * 11 Dart_EnterScope(); - * 12 AllocateMyResource(); - * 13 Dart_Handle arg = Dart_GetNativeArgument(args, 0); - * 14 Dart_SetReturnValue(isLongStringHelper(arg)); - * 15 FreeMyResource(); - * 16 Dart_ExitScope(); - * 17 } - * - * In this example, the call to Dart_SetReturnValue on line 14 will - * either return the normal return value or the error (potentially - * generated on line 3). The call to FreeMyResource on line 15 will - * execute in either case. - * - * --- Local and persistent handles --- - * - * Local handles are allocated within the current scope (see - * Dart_EnterScope) and go away when the current scope exits. Unless - * otherwise indicated, callers should assume that all functions in - * the Dart embedding api return local handles. - * - * Persistent handles are allocated within the current isolate. They - * can be used to store objects across scopes. Persistent handles have - * the lifetime of the current isolate unless they are explicitly - * deallocated (see Dart_DeletePersistentHandle). - * The type Dart_Handle represents a handle (both local and persistent). - * The type Dart_PersistentHandle is a Dart_Handle and it is used to - * document that a persistent handle is expected as a parameter to a call - * or the return value from a call is a persistent handle. - * - * FinalizableHandles are persistent handles which are auto deleted when - * the object is garbage collected. It is never safe to use these handles - * unless you know the object is still reachable. - * - * WeakPersistentHandles are persistent handles which are automatically set - * to point Dart_Null when the object is garbage collected. They are not auto - * deleted, so it is safe to use them after the object has become unreachable. - */ -typedef struct _Dart_Handle* Dart_Handle; -typedef Dart_Handle Dart_PersistentHandle; -typedef struct _Dart_WeakPersistentHandle* Dart_WeakPersistentHandle; -typedef struct _Dart_FinalizableHandle* Dart_FinalizableHandle; -// These structs are versioned by DART_API_DL_MAJOR_VERSION, bump the -// version when changing this struct. - -typedef void (*Dart_HandleFinalizer)(void* isolate_callback_data, void* peer); - -/** - * Is this an error handle? - * - * Requires there to be a current isolate. - */ -DART_EXPORT bool Dart_IsError(Dart_Handle handle); - -/** - * Is this an api error handle? - * - * Api error handles are produced when an api function is misused. - * This happens when a Dart embedding api function is called with - * invalid arguments or in an invalid context. - * - * Requires there to be a current isolate. - */ -DART_EXPORT bool Dart_IsApiError(Dart_Handle handle); - -/** - * Is this an unhandled exception error handle? - * - * Unhandled exception error handles are produced when, during the - * execution of Dart code, an exception is thrown but not caught. - * This can occur in any function which triggers the execution of Dart - * code. - * - * See Dart_ErrorGetException and Dart_ErrorGetStackTrace. - * - * Requires there to be a current isolate. - */ -DART_EXPORT bool Dart_IsUnhandledExceptionError(Dart_Handle handle); - -/** - * Is this a compilation error handle? - * - * Compilation error handles are produced when, during the execution - * of Dart code, a compile-time error occurs. This can occur in any - * function which triggers the execution of Dart code. - * - * Requires there to be a current isolate. - */ -DART_EXPORT bool Dart_IsCompilationError(Dart_Handle handle); - -/** - * Is this a fatal error handle? - * - * Fatal error handles are produced when the system wants to shut down - * the current isolate. - * - * Requires there to be a current isolate. - */ -DART_EXPORT bool Dart_IsFatalError(Dart_Handle handle); - -/** - * Gets the error message from an error handle. - * - * Requires there to be a current isolate. - * - * \return A C string containing an error message if the handle is - * error. An empty C string ("") if the handle is valid. This C - * String is scope allocated and is only valid until the next call - * to Dart_ExitScope. -*/ -DART_EXPORT const char* Dart_GetError(Dart_Handle handle); - -/** - * Is this an error handle for an unhandled exception? - */ -DART_EXPORT bool Dart_ErrorHasException(Dart_Handle handle); - -/** - * Gets the exception Object from an unhandled exception error handle. - */ -DART_EXPORT Dart_Handle Dart_ErrorGetException(Dart_Handle handle); - -/** - * Gets the stack trace Object from an unhandled exception error handle. - */ -DART_EXPORT Dart_Handle Dart_ErrorGetStackTrace(Dart_Handle handle); - -/** - * Produces an api error handle with the provided error message. - * - * Requires there to be a current isolate. - * - * \param error the error message. - */ -DART_EXPORT Dart_Handle Dart_NewApiError(const char* error); -DART_EXPORT Dart_Handle Dart_NewCompilationError(const char* error); - -/** - * Produces a new unhandled exception error handle. - * - * Requires there to be a current isolate. - * - * \param exception An instance of a Dart object to be thrown or - * an ApiError or CompilationError handle. - * When an ApiError or CompilationError handle is passed in - * a string object of the error message is created and it becomes - * the Dart object to be thrown. - */ -DART_EXPORT Dart_Handle Dart_NewUnhandledExceptionError(Dart_Handle exception); - -/** - * Propagates an error. - * - * If the provided handle is an unhandled exception error, this - * function will cause the unhandled exception to be rethrown. This - * will proceed in the standard way, walking up Dart frames until an - * appropriate 'catch' block is found, executing 'finally' blocks, - * etc. - * - * If the error is not an unhandled exception error, we will unwind - * the stack to the next C frame. Intervening Dart frames will be - * discarded; specifically, 'finally' blocks will not execute. This - * is the standard way that compilation errors (and the like) are - * handled by the Dart runtime. - * - * In either case, when an error is propagated any current scopes - * created by Dart_EnterScope will be exited. - * - * See the additional discussion under "Propagating Errors" at the - * beginning of this file. - * - * \param An error handle (See Dart_IsError) - * - * \return On success, this function does not return. On failure, the - * process is terminated. - */ -DART_EXPORT void Dart_PropagateError(Dart_Handle handle); - -/** - * Converts an object to a string. - * - * May generate an unhandled exception error. - * - * \return The converted string if no error occurs during - * the conversion. If an error does occur, an error handle is - * returned. - */ -DART_EXPORT Dart_Handle Dart_ToString(Dart_Handle object); - -/** - * Checks to see if two handles refer to identically equal objects. - * - * If both handles refer to instances, this is equivalent to using the top-level - * function identical() from dart:core. Otherwise, returns whether the two - * argument handles refer to the same object. - * - * \param obj1 An object to be compared. - * \param obj2 An object to be compared. - * - * \return True if the objects are identically equal. False otherwise. - */ -DART_EXPORT bool Dart_IdentityEquals(Dart_Handle obj1, Dart_Handle obj2); - -/** - * Allocates a handle in the current scope from a persistent handle. - */ -DART_EXPORT Dart_Handle Dart_HandleFromPersistent(Dart_PersistentHandle object); - -/** - * Allocates a handle in the current scope from a weak persistent handle. - * - * This will be a handle to Dart_Null if the object has been garbage collected. - */ -DART_EXPORT Dart_Handle -Dart_HandleFromWeakPersistent(Dart_WeakPersistentHandle object); - -/** - * Allocates a persistent handle for an object. - * - * This handle has the lifetime of the current isolate unless it is - * explicitly deallocated by calling Dart_DeletePersistentHandle. - * - * Requires there to be a current isolate. - */ -DART_EXPORT Dart_PersistentHandle Dart_NewPersistentHandle(Dart_Handle object); - -/** - * Assign value of local handle to a persistent handle. - * - * Requires there to be a current isolate. - * - * \param obj1 A persistent handle whose value needs to be set. - * \param obj2 An object whose value needs to be set to the persistent handle. - * - * \return Success if the persistent handle was set - * Otherwise, returns an error. - */ -DART_EXPORT void Dart_SetPersistentHandle(Dart_PersistentHandle obj1, - Dart_Handle obj2); - -/** - * Deallocates a persistent handle. - * - * Requires there to be a current isolate group. - */ -DART_EXPORT void Dart_DeletePersistentHandle(Dart_PersistentHandle object); - -/** - * Allocates a weak persistent handle for an object. - * - * This handle has the lifetime of the current isolate. The handle can also be - * explicitly deallocated by calling Dart_DeleteWeakPersistentHandle. - * - * If the object becomes unreachable the callback is invoked with the peer as - * argument. The callback can be executed on any thread, will have a current - * isolate group, but will not have a current isolate. The callback can only - * call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. This - * gives the embedder the ability to cleanup data associated with the object. - * The handle will point to the Dart_Null object after the finalizer has been - * run. It is illegal to call into the VM with any other Dart_* functions from - * the callback. If the handle is deleted before the object becomes - * unreachable, the callback is never invoked. - * - * Requires there to be a current isolate. - * - * \param object An object with identity. - * \param peer A pointer to a native object or NULL. This value is - * provided to callback when it is invoked. - * \param external_allocation_size The number of externally allocated - * bytes for peer. Used to inform the garbage collector. - * \param callback A function pointer that will be invoked sometime - * after the object is garbage collected, unless the handle has been deleted. - * A valid callback needs to be specified it cannot be NULL. - * - * \return The weak persistent handle or NULL. NULL is returned in case of bad - * parameters. - */ -DART_EXPORT Dart_WeakPersistentHandle -Dart_NewWeakPersistentHandle(Dart_Handle object, - void* peer, - intptr_t external_allocation_size, - Dart_HandleFinalizer callback); - -/** - * Deletes the given weak persistent [object] handle. - * - * Requires there to be a current isolate group. - */ -DART_EXPORT void Dart_DeleteWeakPersistentHandle( - Dart_WeakPersistentHandle object); - -/** - * Updates the external memory size for the given weak persistent handle. - * - * May trigger garbage collection. - */ -DART_EXPORT void Dart_UpdateExternalSize(Dart_WeakPersistentHandle object, - intptr_t external_allocation_size); - -/** - * Allocates a finalizable handle for an object. - * - * This handle has the lifetime of the current isolate group unless the object - * pointed to by the handle is garbage collected, in this case the VM - * automatically deletes the handle after invoking the callback associated - * with the handle. The handle can also be explicitly deallocated by - * calling Dart_DeleteFinalizableHandle. - * - * If the object becomes unreachable the callback is invoked with the - * the peer as argument. The callback can be executed on any thread, will have - * an isolate group, but will not have a current isolate. The callback can only - * call Dart_DeletePersistentHandle or Dart_DeleteWeakPersistentHandle. - * This gives the embedder the ability to cleanup data associated with the - * object and clear out any cached references to the handle. All references to - * this handle after the callback will be invalid. It is illegal to call into - * the VM with any other Dart_* functions from the callback. If the handle is - * deleted before the object becomes unreachable, the callback is never - * invoked. - * - * Requires there to be a current isolate. - * - * \param object An object with identity. - * \param peer A pointer to a native object or NULL. This value is - * provided to callback when it is invoked. - * \param external_allocation_size The number of externally allocated - * bytes for peer. Used to inform the garbage collector. - * \param callback A function pointer that will be invoked sometime - * after the object is garbage collected, unless the handle has been deleted. - * A valid callback needs to be specified it cannot be NULL. - * - * \return The finalizable handle or NULL. NULL is returned in case of bad - * parameters. - */ -DART_EXPORT Dart_FinalizableHandle -Dart_NewFinalizableHandle(Dart_Handle object, - void* peer, - intptr_t external_allocation_size, - Dart_HandleFinalizer callback); - -/** - * Deletes the given finalizable [object] handle. - * - * The caller has to provide the actual Dart object the handle was created from - * to prove the object (and therefore the finalizable handle) is still alive. - * - * Requires there to be a current isolate. - */ -DART_EXPORT void Dart_DeleteFinalizableHandle(Dart_FinalizableHandle object, - Dart_Handle strong_ref_to_object); - -/** - * Updates the external memory size for the given finalizable handle. - * - * The caller has to provide the actual Dart object the handle was created from - * to prove the object (and therefore the finalizable handle) is still alive. - * - * May trigger garbage collection. - */ -DART_EXPORT void Dart_UpdateFinalizableExternalSize( - Dart_FinalizableHandle object, - Dart_Handle strong_ref_to_object, - intptr_t external_allocation_size); - -/* - * ========================== - * Initialization and Globals - * ========================== - */ - -/** - * Gets the version string for the Dart VM. - * - * The version of the Dart VM can be accessed without initializing the VM. - * - * \return The version string for the embedded Dart VM. - */ -DART_EXPORT const char* Dart_VersionString(); - -/** - * Isolate specific flags are set when creating a new isolate using the - * Dart_IsolateFlags structure. - * - * Current version of flags is encoded in a 32-bit integer with 16 bits used - * for each part. - */ - -#define DART_FLAGS_CURRENT_VERSION (0x0000000c) - -typedef struct { - int32_t version; - bool enable_asserts; - bool use_field_guards; - bool use_osr; - bool obfuscate; - bool load_vmservice_library; - bool copy_parent_code; - bool null_safety; - bool is_system_isolate; -} Dart_IsolateFlags; - -/** - * Initialize Dart_IsolateFlags with correct version and default values. - */ -DART_EXPORT void Dart_IsolateFlagsInitialize(Dart_IsolateFlags* flags); - -/** - * An isolate creation and initialization callback function. - * - * This callback, provided by the embedder, is called when the VM - * needs to create an isolate. The callback should create an isolate - * by calling Dart_CreateIsolateGroup and load any scripts required for - * execution. - * - * This callback may be called on a different thread than the one - * running the parent isolate. - * - * When the function returns NULL, it is the responsibility of this - * function to ensure that Dart_ShutdownIsolate has been called if - * required (for example, if the isolate was created successfully by - * Dart_CreateIsolateGroup() but the root library fails to load - * successfully, then the function should call Dart_ShutdownIsolate - * before returning). - * - * When the function returns NULL, the function should set *error to - * a malloc-allocated buffer containing a useful error message. The - * caller of this function (the VM) will make sure that the buffer is - * freed. - * - * \param script_uri The uri of the main source file or snapshot to load. - * Either the URI of the parent isolate set in Dart_CreateIsolateGroup for - * Isolate.spawn, or the argument to Isolate.spawnUri canonicalized by the - * library tag handler of the parent isolate. - * The callback is responsible for loading the program by a call to - * Dart_LoadScriptFromKernel. - * \param main The name of the main entry point this isolate will - * eventually run. This is provided for advisory purposes only to - * improve debugging messages. The main function is not invoked by - * this function. - * \param package_root Ignored. - * \param package_config Uri of the package configuration file (either in format - * of .packages or .dart_tool/package_config.json) for this isolate - * to resolve package imports against. If this parameter is not passed the - * package resolution of the parent isolate should be used. - * \param flags Default flags for this isolate being spawned. Either inherited - * from the spawning isolate or passed as parameters when spawning the - * isolate from Dart code. - * \param isolate_data The isolate data which was passed to the - * parent isolate when it was created by calling Dart_CreateIsolateGroup(). - * \param error A structure into which the embedder can place a - * C string containing an error message in the case of failures. - * - * \return The embedder returns NULL if the creation and - * initialization was not successful and the isolate if successful. - */ -typedef Dart_Isolate (*Dart_IsolateGroupCreateCallback)( - const char* script_uri, - const char* main, - const char* package_root, - const char* package_config, - Dart_IsolateFlags* flags, - void* isolate_data, - char** error); - -/** - * An isolate initialization callback function. - * - * This callback, provided by the embedder, is called when the VM has created an - * isolate within an existing isolate group (i.e. from the same source as an - * existing isolate). - * - * The callback should setup native resolvers and might want to set a custom - * message handler via [Dart_SetMessageNotifyCallback] and mark the isolate as - * runnable. - * - * This callback may be called on a different thread than the one - * running the parent isolate. - * - * When the function returns `false`, it is the responsibility of this - * function to ensure that `Dart_ShutdownIsolate` has been called. - * - * When the function returns `false`, the function should set *error to - * a malloc-allocated buffer containing a useful error message. The - * caller of this function (the VM) will make sure that the buffer is - * freed. - * - * \param child_isolate_data The callback data to associate with the new - * child isolate. - * \param error A structure into which the embedder can place a - * C string containing an error message in the case the initialization fails. - * - * \return The embedder returns true if the initialization was successful and - * false otherwise (in which case the VM will terminate the isolate). - */ -typedef bool (*Dart_InitializeIsolateCallback)(void** child_isolate_data, - char** error); - -/** - * An isolate unhandled exception callback function. - * - * This callback has been DEPRECATED. - */ -typedef void (*Dart_IsolateUnhandledExceptionCallback)(Dart_Handle error); - -/** - * An isolate shutdown callback function. - * - * This callback, provided by the embedder, is called before the vm - * shuts down an isolate. The isolate being shutdown will be the current - * isolate. It is safe to run Dart code. - * - * This function should be used to dispose of native resources that - * are allocated to an isolate in order to avoid leaks. - * - * \param isolate_group_data The same callback data which was passed to the - * isolate group when it was created. - * \param isolate_data The same callback data which was passed to the isolate - * when it was created. - */ -typedef void (*Dart_IsolateShutdownCallback)(void* isolate_group_data, - void* isolate_data); - -/** - * An isolate cleanup callback function. - * - * This callback, provided by the embedder, is called after the vm - * shuts down an isolate. There will be no current isolate and it is *not* - * safe to run Dart code. - * - * This function should be used to dispose of native resources that - * are allocated to an isolate in order to avoid leaks. - * - * \param isolate_group_data The same callback data which was passed to the - * isolate group when it was created. - * \param isolate_data The same callback data which was passed to the isolate - * when it was created. - */ -typedef void (*Dart_IsolateCleanupCallback)(void* isolate_group_data, - void* isolate_data); - -/** - * An isolate group cleanup callback function. - * - * This callback, provided by the embedder, is called after the vm - * shuts down an isolate group. - * - * This function should be used to dispose of native resources that - * are allocated to an isolate in order to avoid leaks. - * - * \param isolate_group_data The same callback data which was passed to the - * isolate group when it was created. - * - */ -typedef void (*Dart_IsolateGroupCleanupCallback)(void* isolate_group_data); - -/** - * A thread death callback function. - * This callback, provided by the embedder, is called before a thread in the - * vm thread pool exits. - * This function could be used to dispose of native resources that - * are associated and attached to the thread, in order to avoid leaks. - */ -typedef void (*Dart_ThreadExitCallback)(); - -/** - * Callbacks provided by the embedder for file operations. If the - * embedder does not allow file operations these callbacks can be - * NULL. - * - * Dart_FileOpenCallback - opens a file for reading or writing. - * \param name The name of the file to open. - * \param write A boolean variable which indicates if the file is to - * opened for writing. If there is an existing file it needs to truncated. - * - * Dart_FileReadCallback - Read contents of file. - * \param data Buffer allocated in the callback into which the contents - * of the file are read into. It is the responsibility of the caller to - * free this buffer. - * \param file_length A variable into which the length of the file is returned. - * In the case of an error this value would be -1. - * \param stream Handle to the opened file. - * - * Dart_FileWriteCallback - Write data into file. - * \param data Buffer which needs to be written into the file. - * \param length Length of the buffer. - * \param stream Handle to the opened file. - * - * Dart_FileCloseCallback - Closes the opened file. - * \param stream Handle to the opened file. - * - */ -typedef void* (*Dart_FileOpenCallback)(const char* name, bool write); - -typedef void (*Dart_FileReadCallback)(uint8_t** data, - intptr_t* file_length, - void* stream); - -typedef void (*Dart_FileWriteCallback)(const void* data, - intptr_t length, - void* stream); - -typedef void (*Dart_FileCloseCallback)(void* stream); - -typedef bool (*Dart_EntropySource)(uint8_t* buffer, intptr_t length); - -/** - * Callback provided by the embedder that is used by the vmservice isolate - * to request the asset archive. The asset archive must be an uncompressed tar - * archive that is stored in a Uint8List. - * - * If the embedder has no vmservice isolate assets, the callback can be NULL. - * - * \return The embedder must return a handle to a Uint8List containing an - * uncompressed tar archive or null. - */ -typedef Dart_Handle (*Dart_GetVMServiceAssetsArchive)(); - -/** - * The current version of the Dart_InitializeFlags. Should be incremented every - * time Dart_InitializeFlags changes in a binary incompatible way. - */ -#define DART_INITIALIZE_PARAMS_CURRENT_VERSION (0x00000004) - -/** Forward declaration */ -struct Dart_CodeObserver; - -/** - * Callback provided by the embedder that is used by the VM to notify on code - * object creation, *before* it is invoked the first time. - * This is useful for embedders wanting to e.g. keep track of PCs beyond - * the lifetime of the garbage collected code objects. - * Note that an address range may be used by more than one code object over the - * lifecycle of a process. Clients of this function should record timestamps for - * these compilation events and when collecting PCs to disambiguate reused - * address ranges. - */ -typedef void (*Dart_OnNewCodeCallback)(struct Dart_CodeObserver* observer, - const char* name, - uintptr_t base, - uintptr_t size); - -typedef struct Dart_CodeObserver { - void* data; - - Dart_OnNewCodeCallback on_new_code; -} Dart_CodeObserver; - -/** - * Describes how to initialize the VM. Used with Dart_Initialize. - * - * \param version Identifies the version of the struct used by the client. - * should be initialized to DART_INITIALIZE_PARAMS_CURRENT_VERSION. - * \param vm_isolate_snapshot A buffer containing a snapshot of the VM isolate - * or NULL if no snapshot is provided. If provided, the buffer must remain - * valid until Dart_Cleanup returns. - * \param instructions_snapshot A buffer containing a snapshot of precompiled - * instructions, or NULL if no snapshot is provided. If provided, the buffer - * must remain valid until Dart_Cleanup returns. - * \param initialize_isolate A function to be called during isolate - * initialization inside an existing isolate group. - * See Dart_InitializeIsolateCallback. - * \param create_group A function to be called during isolate group creation. - * See Dart_IsolateGroupCreateCallback. - * \param shutdown A function to be called right before an isolate is shutdown. - * See Dart_IsolateShutdownCallback. - * \param cleanup A function to be called after an isolate was shutdown. - * See Dart_IsolateCleanupCallback. - * \param cleanup_group A function to be called after an isolate group is shutdown. - * See Dart_IsolateGroupCleanupCallback. - * \param get_service_assets A function to be called by the service isolate when - * it requires the vmservice assets archive. - * See Dart_GetVMServiceAssetsArchive. - * \param code_observer An external code observer callback function. - * The observer can be invoked as early as during the Dart_Initialize() call. - */ -typedef struct { - int32_t version; - const uint8_t* vm_snapshot_data; - const uint8_t* vm_snapshot_instructions; - Dart_IsolateGroupCreateCallback create_group; - Dart_InitializeIsolateCallback initialize_isolate; - Dart_IsolateShutdownCallback shutdown_isolate; - Dart_IsolateCleanupCallback cleanup_isolate; - Dart_IsolateGroupCleanupCallback cleanup_group; - Dart_ThreadExitCallback thread_exit; - Dart_FileOpenCallback file_open; - Dart_FileReadCallback file_read; - Dart_FileWriteCallback file_write; - Dart_FileCloseCallback file_close; - Dart_EntropySource entropy_source; - Dart_GetVMServiceAssetsArchive get_service_assets; - bool start_kernel_isolate; - Dart_CodeObserver* code_observer; -} Dart_InitializeParams; - -/** - * Initializes the VM. - * - * \param params A struct containing initialization information. The version - * field of the struct must be DART_INITIALIZE_PARAMS_CURRENT_VERSION. - * - * \return NULL if initialization is successful. Returns an error message - * otherwise. The caller is responsible for freeing the error message. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_Initialize( - Dart_InitializeParams* params); - -/** - * Cleanup state in the VM before process termination. - * - * \return NULL if cleanup is successful. Returns an error message otherwise. - * The caller is responsible for freeing the error message. - * - * NOTE: This function must not be called on a thread that was created by the VM - * itself. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_Cleanup(); - -/** - * Sets command line flags. Should be called before Dart_Initialize. - * - * \param argc The length of the arguments array. - * \param argv An array of arguments. - * - * \return NULL if successful. Returns an error message otherwise. - * The caller is responsible for freeing the error message. - * - * NOTE: This call does not store references to the passed in c-strings. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_SetVMFlags(int argc, - const char** argv); - -/** - * Returns true if the named VM flag is of boolean type, specified, and set to - * true. - * - * \param flag_name The name of the flag without leading punctuation - * (example: "enable_asserts"). - */ -DART_EXPORT bool Dart_IsVMFlagSet(const char* flag_name); - -/* - * ======== - * Isolates - * ======== - */ - -/** - * Creates a new isolate. The new isolate becomes the current isolate. - * - * A snapshot can be used to restore the VM quickly to a saved state - * and is useful for fast startup. If snapshot data is provided, the - * isolate will be started using that snapshot data. Requires a core snapshot or - * an app snapshot created by Dart_CreateSnapshot or - * Dart_CreatePrecompiledSnapshot* from a VM with the same version. - * - * Requires there to be no current isolate. - * - * \param script_uri The main source file or snapshot this isolate will load. - * The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child - * isolate is created by Isolate.spawn. The embedder should use a URI that - * allows it to load the same program into such a child isolate. - * \param name A short name for the isolate to improve debugging messages. - * Typically of the format 'foo.dart:main()'. - * \param isolate_snapshot_data - * \param isolate_snapshot_instructions Buffers containing a snapshot of the - * isolate or NULL if no snapshot is provided. If provided, the buffers must - * remain valid until the isolate shuts down. - * \param flags Pointer to VM specific flags or NULL for default flags. - * \param isolate_group_data Embedder group data. This data can be obtained - * by calling Dart_IsolateGroupData and will be passed to the - * Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and - * Dart_IsolateGroupCleanupCallback. - * \param isolate_data Embedder data. This data will be passed to - * the Dart_IsolateGroupCreateCallback when new isolates are spawned from - * this parent isolate. - * \param error Returns NULL if creation is successful, an error message - * otherwise. The caller is responsible for calling free() on the error - * message. - * - * \return The new isolate on success, or NULL if isolate creation failed. - */ -DART_EXPORT Dart_Isolate -Dart_CreateIsolateGroup(const char* script_uri, - const char* name, - const uint8_t* isolate_snapshot_data, - const uint8_t* isolate_snapshot_instructions, - Dart_IsolateFlags* flags, - void* isolate_group_data, - void* isolate_data, - char** error); -/** - * Creates a new isolate inside the isolate group of [group_member]. - * - * Requires there to be no current isolate. - * - * \param group_member An isolate from the same group into which the newly created - * isolate should be born into. Other threads may not have entered / enter this - * member isolate. - * \param name A short name for the isolate for debugging purposes. - * \param shutdown_callback A callback to be called when the isolate is being - * shutdown (may be NULL). - * \param cleanup_callback A callback to be called when the isolate is being - * cleaned up (may be NULL). - * \param isolate_data The embedder-specific data associated with this isolate. - * \param error Set to NULL if creation is successful, set to an error - * message otherwise. The caller is responsible for calling free() on the - * error message. - * - * \return The newly created isolate on success, or NULL if isolate creation - * failed. - * - * If successful, the newly created isolate will become the current isolate. - */ -DART_EXPORT Dart_Isolate -Dart_CreateIsolateInGroup(Dart_Isolate group_member, - const char* name, - Dart_IsolateShutdownCallback shutdown_callback, - Dart_IsolateCleanupCallback cleanup_callback, - void* child_isolate_data, - char** error); - -/* TODO(turnidge): Document behavior when there is already a current - * isolate. */ - -/** - * Creates a new isolate from a Dart Kernel file. The new isolate - * becomes the current isolate. - * - * Requires there to be no current isolate. - * - * \param script_uri The main source file or snapshot this isolate will load. - * The VM will provide this URI to the Dart_IsolateGroupCreateCallback when a child - * isolate is created by Isolate.spawn. The embedder should use a URI that - * allows it to load the same program into such a child isolate. - * \param name A short name for the isolate to improve debugging messages. - * Typically of the format 'foo.dart:main()'. - * \param kernel_buffer - * \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must - * remain valid until isolate shutdown. - * \param flags Pointer to VM specific flags or NULL for default flags. - * \param isolate_group_data Embedder group data. This data can be obtained - * by calling Dart_IsolateGroupData and will be passed to the - * Dart_IsolateShutdownCallback, Dart_IsolateCleanupCallback, and - * Dart_IsolateGroupCleanupCallback. - * \param isolate_data Embedder data. This data will be passed to - * the Dart_IsolateGroupCreateCallback when new isolates are spawned from - * this parent isolate. - * \param error Returns NULL if creation is successful, an error message - * otherwise. The caller is responsible for calling free() on the error - * message. - * - * \return The new isolate on success, or NULL if isolate creation failed. - */ -DART_EXPORT Dart_Isolate -Dart_CreateIsolateGroupFromKernel(const char* script_uri, - const char* name, - const uint8_t* kernel_buffer, - intptr_t kernel_buffer_size, - Dart_IsolateFlags* flags, - void* isolate_group_data, - void* isolate_data, - char** error); -/** - * Shuts down the current isolate. After this call, the current isolate is NULL. - * Any current scopes created by Dart_EnterScope will be exited. Invokes the - * shutdown callback and any callbacks of remaining weak persistent handles. - * - * Requires there to be a current isolate. - */ -DART_EXPORT void Dart_ShutdownIsolate(); -/* TODO(turnidge): Document behavior when there is no current isolate. */ - -/** - * Returns the current isolate. Will return NULL if there is no - * current isolate. - */ -DART_EXPORT Dart_Isolate Dart_CurrentIsolate(); - -/** - * Returns the callback data associated with the current isolate. This - * data was set when the isolate got created or initialized. - */ -DART_EXPORT void* Dart_CurrentIsolateData(); - -/** - * Returns the callback data associated with the given isolate. This - * data was set when the isolate got created or initialized. - */ -DART_EXPORT void* Dart_IsolateData(Dart_Isolate isolate); - -/** - * Returns the current isolate group. Will return NULL if there is no - * current isolate group. - */ -DART_EXPORT Dart_IsolateGroup Dart_CurrentIsolateGroup(); - -/** - * Returns the callback data associated with the current isolate group. This - * data was passed to the isolate group when it was created. - */ -DART_EXPORT void* Dart_CurrentIsolateGroupData(); - -/** - * Returns the callback data associated with the specified isolate group. This - * data was passed to the isolate when it was created. - * The embedder is responsible for ensuring the consistency of this data - * with respect to the lifecycle of an isolate group. - */ -DART_EXPORT void* Dart_IsolateGroupData(Dart_Isolate isolate); - -/** - * Returns the debugging name for the current isolate. - * - * This name is unique to each isolate and should only be used to make - * debugging messages more comprehensible. - */ -DART_EXPORT Dart_Handle Dart_DebugName(); - -/** - * Returns the ID for an isolate which is used to query the service protocol. - * - * It is the responsibility of the caller to free the returned ID. - */ -DART_EXPORT const char* Dart_IsolateServiceId(Dart_Isolate isolate); - -/** - * Enters an isolate. After calling this function, - * the current isolate will be set to the provided isolate. - * - * Requires there to be no current isolate. Multiple threads may not be in - * the same isolate at once. - */ -DART_EXPORT void Dart_EnterIsolate(Dart_Isolate isolate); - -/** - * Kills the given isolate. - * - * This function has the same effect as dart:isolate's - * Isolate.kill(priority:immediate). - * It can interrupt ordinary Dart code but not native code. If the isolate is - * in the middle of a long running native function, the isolate will not be - * killed until control returns to Dart. - * - * Does not require a current isolate. It is safe to kill the current isolate if - * there is one. - */ -DART_EXPORT void Dart_KillIsolate(Dart_Isolate isolate); - -/** - * Notifies the VM that the embedder expects |size| bytes of memory have become - * unreachable. The VM may use this hint to adjust the garbage collector's - * growth policy. - * - * Multiple calls are interpreted as increasing, not replacing, the estimate of - * unreachable memory. - * - * Requires there to be a current isolate. - */ -DART_EXPORT void Dart_HintFreed(intptr_t size); - -/** - * Notifies the VM that the embedder expects to be idle until |deadline|. The VM - * may use this time to perform garbage collection or other tasks to avoid - * delays during execution of Dart code in the future. - * - * |deadline| is measured in microseconds against the system's monotonic time. - * This clock can be accessed via Dart_TimelineGetMicros(). - * - * Requires there to be a current isolate. - */ -DART_EXPORT void Dart_NotifyIdle(int64_t deadline); - -/** - * Notifies the VM that the system is running low on memory. - * - * Does not require a current isolate. Only valid after calling Dart_Initialize. - */ -DART_EXPORT void Dart_NotifyLowMemory(); - -/** - * Starts the CPU sampling profiler. - */ -DART_EXPORT void Dart_StartProfiling(); - -/** - * Stops the CPU sampling profiler. - * - * Note that some profile samples might still be taken after this fucntion - * returns due to the asynchronous nature of the implementation on some - * platforms. - */ -DART_EXPORT void Dart_StopProfiling(); - -/** - * Notifies the VM that the current thread should not be profiled until a - * matching call to Dart_ThreadEnableProfiling is made. - * - * NOTE: By default, if a thread has entered an isolate it will be profiled. - * This function should be used when an embedder knows a thread is about - * to make a blocking call and wants to avoid unnecessary interrupts by - * the profiler. - */ -DART_EXPORT void Dart_ThreadDisableProfiling(); - -/** - * Notifies the VM that the current thread should be profiled. - * - * NOTE: It is only legal to call this function *after* calling - * Dart_ThreadDisableProfiling. - * - * NOTE: By default, if a thread has entered an isolate it will be profiled. - */ -DART_EXPORT void Dart_ThreadEnableProfiling(); - -/** - * Register symbol information for the Dart VM's profiler and crash dumps. - * - * This consumes the output of //topaz/runtime/dart/profiler_symbols, which - * should be treated as opaque. - */ -DART_EXPORT void Dart_AddSymbols(const char* dso_name, - void* buffer, - intptr_t buffer_size); - -/** - * Exits an isolate. After this call, Dart_CurrentIsolate will - * return NULL. - * - * Requires there to be a current isolate. - */ -DART_EXPORT void Dart_ExitIsolate(); -/* TODO(turnidge): We don't want users of the api to be able to exit a - * "pure" dart isolate. Implement and document. */ - -/** - * Creates a full snapshot of the current isolate heap. - * - * A full snapshot is a compact representation of the dart vm isolate heap - * and dart isolate heap states. These snapshots are used to initialize - * the vm isolate on startup and fast initialization of an isolate. - * A Snapshot of the heap is created before any dart code has executed. - * - * Requires there to be a current isolate. Not available in the precompiled - * runtime (check Dart_IsPrecompiledRuntime). - * - * \param buffer Returns a pointer to a buffer containing the - * snapshot. This buffer is scope allocated and is only valid - * until the next call to Dart_ExitScope. - * \param size Returns the size of the buffer. - * \param is_core Create a snapshot containing core libraries. - * Such snapshot should be agnostic to null safety mode. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_CreateSnapshot(uint8_t** vm_snapshot_data_buffer, - intptr_t* vm_snapshot_data_size, - uint8_t** isolate_snapshot_data_buffer, - intptr_t* isolate_snapshot_data_size, - bool is_core); - -/** - * Returns whether the buffer contains a kernel file. - * - * \param buffer Pointer to a buffer that might contain a kernel binary. - * \param buffer_size Size of the buffer. - * - * \return Whether the buffer contains a kernel binary (full or partial). - */ -DART_EXPORT bool Dart_IsKernel(const uint8_t* buffer, intptr_t buffer_size); - -/** - * Make isolate runnable. - * - * When isolates are spawned, this function is used to indicate that - * the creation and initialization (including script loading) of the - * isolate is complete and the isolate can start. - * This function expects there to be no current isolate. - * - * \param isolate The isolate to be made runnable. - * - * \return NULL if successful. Returns an error message otherwise. The caller - * is responsible for freeing the error message. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_IsolateMakeRunnable( - Dart_Isolate isolate); - -/* - * ================== - * Messages and Ports - * ================== - */ - -/** - * A port is used to send or receive inter-isolate messages - */ -typedef int64_t Dart_Port; - -/** - * ILLEGAL_PORT is a port number guaranteed never to be associated with a valid - * port. - */ -#define ILLEGAL_PORT ((Dart_Port)0) - -/** - * A message notification callback. - * - * This callback allows the embedder to provide an alternate wakeup - * mechanism for the delivery of inter-isolate messages. It is the - * responsibility of the embedder to call Dart_HandleMessage to - * process the message. - */ -typedef void (*Dart_MessageNotifyCallback)(Dart_Isolate dest_isolate); - -/** - * Allows embedders to provide an alternative wakeup mechanism for the - * delivery of inter-isolate messages. This setting only applies to - * the current isolate. - * - * Most embedders will only call this function once, before isolate - * execution begins. If this function is called after isolate - * execution begins, the embedder is responsible for threading issues. - */ -DART_EXPORT void Dart_SetMessageNotifyCallback( - Dart_MessageNotifyCallback message_notify_callback); -/* TODO(turnidge): Consider moving this to isolate creation so that it - * is impossible to mess up. */ - -/** - * Query the current message notify callback for the isolate. - * - * \return The current message notify callback for the isolate. - */ -DART_EXPORT Dart_MessageNotifyCallback Dart_GetMessageNotifyCallback(); - -/** - * The VM's default message handler supports pausing an isolate before it - * processes the first message and right after the it processes the isolate's - * final message. This can be controlled for all isolates by two VM flags: - * - * `--pause-isolates-on-start` - * `--pause-isolates-on-exit` - * - * Additionally, Dart_SetShouldPauseOnStart and Dart_SetShouldPauseOnExit can be - * used to control this behaviour on a per-isolate basis. - * - * When an embedder is using a Dart_MessageNotifyCallback the embedder - * needs to cooperate with the VM so that the service protocol can report - * accurate information about isolates and so that tools such as debuggers - * work reliably. - * - * The following functions can be used to implement pausing on start and exit. - */ - -/** - * If the VM flag `--pause-isolates-on-start` was passed this will be true. - * - * \return A boolean value indicating if pause on start was requested. - */ -DART_EXPORT bool Dart_ShouldPauseOnStart(); - -/** - * Override the VM flag `--pause-isolates-on-start` for the current isolate. - * - * \param should_pause Should the isolate be paused on start? - * - * NOTE: This must be called before Dart_IsolateMakeRunnable. - */ -DART_EXPORT void Dart_SetShouldPauseOnStart(bool should_pause); - -/** - * Is the current isolate paused on start? - * - * \return A boolean value indicating if the isolate is paused on start. - */ -DART_EXPORT bool Dart_IsPausedOnStart(); - -/** - * Called when the embedder has paused the current isolate on start and when - * the embedder has resumed the isolate. - * - * \param paused Is the isolate paused on start? - */ -DART_EXPORT void Dart_SetPausedOnStart(bool paused); - -/** - * If the VM flag `--pause-isolates-on-exit` was passed this will be true. - * - * \return A boolean value indicating if pause on exit was requested. - */ -DART_EXPORT bool Dart_ShouldPauseOnExit(); - -/** - * Override the VM flag `--pause-isolates-on-exit` for the current isolate. - * - * \param should_pause Should the isolate be paused on exit? - * - */ -DART_EXPORT void Dart_SetShouldPauseOnExit(bool should_pause); - -/** - * Is the current isolate paused on exit? - * - * \return A boolean value indicating if the isolate is paused on exit. - */ -DART_EXPORT bool Dart_IsPausedOnExit(); - -/** - * Called when the embedder has paused the current isolate on exit and when - * the embedder has resumed the isolate. - * - * \param paused Is the isolate paused on exit? - */ -DART_EXPORT void Dart_SetPausedOnExit(bool paused); - -/** - * Called when the embedder has caught a top level unhandled exception error - * in the current isolate. - * - * NOTE: It is illegal to call this twice on the same isolate without first - * clearing the sticky error to null. - * - * \param error The unhandled exception error. - */ -DART_EXPORT void Dart_SetStickyError(Dart_Handle error); - -/** - * Does the current isolate have a sticky error? - */ -DART_EXPORT bool Dart_HasStickyError(); - -/** - * Gets the sticky error for the current isolate. - * - * \return A handle to the sticky error object or null. - */ -DART_EXPORT Dart_Handle Dart_GetStickyError(); - -/** - * Handles the next pending message for the current isolate. - * - * May generate an unhandled exception error. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_HandleMessage(); - -/** - * Drains the microtask queue, then blocks the calling thread until the current - * isolate recieves a message, then handles all messages. - * - * \param timeout_millis When non-zero, the call returns after the indicated - number of milliseconds even if no message was received. - * \return A valid handle if no error occurs, otherwise an error handle. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_WaitForEvent(int64_t timeout_millis); - -/** - * Handles any pending messages for the vm service for the current - * isolate. - * - * This function may be used by an embedder at a breakpoint to avoid - * pausing the vm service. - * - * This function can indirectly cause the message notify callback to - * be called. - * - * \return true if the vm service requests the program resume - * execution, false otherwise - */ -DART_EXPORT bool Dart_HandleServiceMessages(); - -/** - * Does the current isolate have pending service messages? - * - * \return true if the isolate has pending service messages, false otherwise. - */ -DART_EXPORT bool Dart_HasServiceMessages(); - -/** - * Processes any incoming messages for the current isolate. - * - * This function may only be used when the embedder has not provided - * an alternate message delivery mechanism with - * Dart_SetMessageCallbacks. It is provided for convenience. - * - * This function waits for incoming messages for the current - * isolate. As new messages arrive, they are handled using - * Dart_HandleMessage. The routine exits when all ports to the - * current isolate are closed. - * - * \return A valid handle if the run loop exited successfully. If an - * exception or other error occurs while processing messages, an - * error handle is returned. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_RunLoop(); - -/** - * Lets the VM run message processing for the isolate. - * - * This function expects there to a current isolate and the current isolate - * must not have an active api scope. The VM will take care of making the - * isolate runnable (if not already), handles its message loop and will take - * care of shutting the isolate down once it's done. - * - * \param errors_are_fatal Whether uncaught errors should be fatal. - * \param on_error_port A port to notify on uncaught errors (or ILLEGAL_PORT). - * \param on_exit_port A port to notify on exit (or ILLEGAL_PORT). - * \param error A non-NULL pointer which will hold an error message if the call - * fails. The error has to be free()ed by the caller. - * - * \return If successfull the VM takes owernship of the isolate and takes care - * of its message loop. If not successful the caller retains owernship of the - * isolate. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT bool Dart_RunLoopAsync( - bool errors_are_fatal, - Dart_Port on_error_port, - Dart_Port on_exit_port, - char** error); - -/* TODO(turnidge): Should this be removed from the public api? */ - -/** - * Gets the main port id for the current isolate. - */ -DART_EXPORT Dart_Port Dart_GetMainPortId(); - -/** - * Does the current isolate have live ReceivePorts? - * - * A ReceivePort is live when it has not been closed. - */ -DART_EXPORT bool Dart_HasLivePorts(); - -/** - * Posts a message for some isolate. The message is a serialized - * object. - * - * Requires there to be a current isolate. - * - * \param port The destination port. - * \param object An object from the current isolate. - * - * \return True if the message was posted. - */ -DART_EXPORT bool Dart_Post(Dart_Port port_id, Dart_Handle object); - -/** - * Returns a new SendPort with the provided port id. - * - * \param port_id The destination port. - * - * \return A new SendPort if no errors occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewSendPort(Dart_Port port_id); - -/** - * Gets the SendPort id for the provided SendPort. - * \param port A SendPort object whose id is desired. - * \param port_id Returns the id of the SendPort. - * \return Success if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_SendPortGetId(Dart_Handle port, - Dart_Port* port_id); - -/* - * ====== - * Scopes - * ====== - */ - -/** - * Enters a new scope. - * - * All new local handles will be created in this scope. Additionally, - * some functions may return "scope allocated" memory which is only - * valid within this scope. - * - * Requires there to be a current isolate. - */ -DART_EXPORT void Dart_EnterScope(); - -/** - * Exits a scope. - * - * The previous scope (if any) becomes the current scope. - * - * Requires there to be a current isolate. - */ -DART_EXPORT void Dart_ExitScope(); - -/** - * The Dart VM uses "zone allocation" for temporary structures. Zones - * support very fast allocation of small chunks of memory. The chunks - * cannot be deallocated individually, but instead zones support - * deallocating all chunks in one fast operation. - * - * This function makes it possible for the embedder to allocate - * temporary data in the VMs zone allocator. - * - * Zone allocation is possible: - * 1. when inside a scope where local handles can be allocated - * 2. when processing a message from a native port in a native port - * handler - * - * All the memory allocated this way will be reclaimed either on the - * next call to Dart_ExitScope or when the native port handler exits. - * - * \param size Size of the memory to allocate. - * - * \return A pointer to the allocated memory. NULL if allocation - * failed. Failure might due to is no current VM zone. - */ -DART_EXPORT uint8_t* Dart_ScopeAllocate(intptr_t size); - -/* - * ======= - * Objects - * ======= - */ - -/** - * Returns the null object. - * - * \return A handle to the null object. - */ -DART_EXPORT Dart_Handle Dart_Null(); - -/** - * Is this object null? - */ -DART_EXPORT bool Dart_IsNull(Dart_Handle object); - -/** - * Returns the empty string object. - * - * \return A handle to the empty string object. - */ -DART_EXPORT Dart_Handle Dart_EmptyString(); - -/** - * Returns types that are not classes, and which therefore cannot be looked up - * as library members by Dart_GetType. - * - * \return A handle to the dynamic, void or Never type. - */ -DART_EXPORT Dart_Handle Dart_TypeDynamic(); -DART_EXPORT Dart_Handle Dart_TypeVoid(); -DART_EXPORT Dart_Handle Dart_TypeNever(); - -/** - * Checks if the two objects are equal. - * - * The result of the comparison is returned through the 'equal' - * parameter. The return value itself is used to indicate success or - * failure, not equality. - * - * May generate an unhandled exception error. - * - * \param obj1 An object to be compared. - * \param obj2 An object to be compared. - * \param equal Returns the result of the equality comparison. - * - * \return A valid handle if no error occurs during the comparison. - */ -DART_EXPORT Dart_Handle Dart_ObjectEquals(Dart_Handle obj1, - Dart_Handle obj2, - bool* equal); - -/** - * Is this object an instance of some type? - * - * The result of the test is returned through the 'instanceof' parameter. - * The return value itself is used to indicate success or failure. - * - * \param object An object. - * \param type A type. - * \param instanceof Return true if 'object' is an instance of type 'type'. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_ObjectIsType(Dart_Handle object, - Dart_Handle type, - bool* instanceof); - -/** - * Query object type. - * - * \param object Some Object. - * - * \return true if Object is of the specified type. - */ -DART_EXPORT bool Dart_IsInstance(Dart_Handle object); -DART_EXPORT bool Dart_IsNumber(Dart_Handle object); -DART_EXPORT bool Dart_IsInteger(Dart_Handle object); -DART_EXPORT bool Dart_IsDouble(Dart_Handle object); -DART_EXPORT bool Dart_IsBoolean(Dart_Handle object); -DART_EXPORT bool Dart_IsString(Dart_Handle object); -DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object); /* (ISO-8859-1) */ -DART_EXPORT bool Dart_IsExternalString(Dart_Handle object); -DART_EXPORT bool Dart_IsList(Dart_Handle object); -DART_EXPORT bool Dart_IsMap(Dart_Handle object); -DART_EXPORT bool Dart_IsLibrary(Dart_Handle object); -DART_EXPORT bool Dart_IsType(Dart_Handle handle); -DART_EXPORT bool Dart_IsFunction(Dart_Handle handle); -DART_EXPORT bool Dart_IsVariable(Dart_Handle handle); -DART_EXPORT bool Dart_IsTypeVariable(Dart_Handle handle); -DART_EXPORT bool Dart_IsClosure(Dart_Handle object); -DART_EXPORT bool Dart_IsTypedData(Dart_Handle object); -DART_EXPORT bool Dart_IsByteBuffer(Dart_Handle object); -DART_EXPORT bool Dart_IsFuture(Dart_Handle object); - -/* - * ========= - * Instances - * ========= - */ - -/* - * For the purposes of the embedding api, not all objects returned are - * Dart language objects. Within the api, we use the term 'Instance' - * to indicate handles which refer to true Dart language objects. - * - * TODO(turnidge): Reorganize the "Object" section above, pulling down - * any functions that more properly belong here. */ - -/** - * Gets the type of a Dart language object. - * - * \param instance Some Dart object. - * - * \return If no error occurs, the type is returned. Otherwise an - * error handle is returned. - */ -DART_EXPORT Dart_Handle Dart_InstanceGetType(Dart_Handle instance); - -/** - * Returns the name for the provided class type. - * - * \return A valid string handle if no error occurs during the - * operation. - */ -DART_EXPORT Dart_Handle Dart_ClassName(Dart_Handle cls_type); - -/** - * Returns the name for the provided function or method. - * - * \return A valid string handle if no error occurs during the - * operation. - */ -DART_EXPORT Dart_Handle Dart_FunctionName(Dart_Handle function); - -/** - * Returns a handle to the owner of a function. - * - * The owner of an instance method or a static method is its defining - * class. The owner of a top-level function is its defining - * library. The owner of the function of a non-implicit closure is the - * function of the method or closure that defines the non-implicit - * closure. - * - * \return A valid handle to the owner of the function, or an error - * handle if the argument is not a valid handle to a function. - */ -DART_EXPORT Dart_Handle Dart_FunctionOwner(Dart_Handle function); - -/** - * Determines whether a function handle referes to a static function - * of method. - * - * For the purposes of the embedding API, a top-level function is - * implicitly declared static. - * - * \param function A handle to a function or method declaration. - * \param is_static Returns whether the function or method is declared static. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_FunctionIsStatic(Dart_Handle function, - bool* is_static); - -/** - * Is this object a closure resulting from a tear-off (closurized method)? - * - * Returns true for closures produced when an ordinary method is accessed - * through a getter call. Returns false otherwise, in particular for closures - * produced from local function declarations. - * - * \param object Some Object. - * - * \return true if Object is a tear-off. - */ -DART_EXPORT bool Dart_IsTearOff(Dart_Handle object); - -/** - * Retrieves the function of a closure. - * - * \return A handle to the function of the closure, or an error handle if the - * argument is not a closure. - */ -DART_EXPORT Dart_Handle Dart_ClosureFunction(Dart_Handle closure); - -/** - * Returns a handle to the library which contains class. - * - * \return A valid handle to the library with owns class, null if the class - * has no library or an error handle if the argument is not a valid handle - * to a class type. - */ -DART_EXPORT Dart_Handle Dart_ClassLibrary(Dart_Handle cls_type); - -/* - * ============================= - * Numbers, Integers and Doubles - * ============================= - */ - -/** - * Does this Integer fit into a 64-bit signed integer? - * - * \param integer An integer. - * \param fits Returns true if the integer fits into a 64-bit signed integer. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_IntegerFitsIntoInt64(Dart_Handle integer, - bool* fits); - -/** - * Does this Integer fit into a 64-bit unsigned integer? - * - * \param integer An integer. - * \param fits Returns true if the integer fits into a 64-bit unsigned integer. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_IntegerFitsIntoUint64(Dart_Handle integer, - bool* fits); - -/** - * Returns an Integer with the provided value. - * - * \param value The value of the integer. - * - * \return The Integer object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewInteger(int64_t value); - -/** - * Returns an Integer with the provided value. - * - * \param value The unsigned value of the integer. - * - * \return The Integer object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewIntegerFromUint64(uint64_t value); - -/** - * Returns an Integer with the provided value. - * - * \param value The value of the integer represented as a C string - * containing a hexadecimal number. - * - * \return The Integer object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewIntegerFromHexCString(const char* value); - -/** - * Gets the value of an Integer. - * - * The integer must fit into a 64-bit signed integer, otherwise an error occurs. - * - * \param integer An Integer. - * \param value Returns the value of the Integer. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_IntegerToInt64(Dart_Handle integer, - int64_t* value); - -/** - * Gets the value of an Integer. - * - * The integer must fit into a 64-bit unsigned integer, otherwise an - * error occurs. - * - * \param integer An Integer. - * \param value Returns the value of the Integer. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_IntegerToUint64(Dart_Handle integer, - uint64_t* value); - -/** - * Gets the value of an integer as a hexadecimal C string. - * - * \param integer An Integer. - * \param value Returns the value of the Integer as a hexadecimal C - * string. This C string is scope allocated and is only valid until - * the next call to Dart_ExitScope. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_IntegerToHexCString(Dart_Handle integer, - const char** value); - -/** - * Returns a Double with the provided value. - * - * \param value A double. - * - * \return The Double object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewDouble(double value); - -/** - * Gets the value of a Double - * - * \param double_obj A Double - * \param value Returns the value of the Double. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_DoubleValue(Dart_Handle double_obj, double* value); - -/** - * Returns a closure of static function 'function_name' in the class 'class_name' - * in the exported namespace of specified 'library'. - * - * \param library Library object - * \param cls_type Type object representing a Class - * \param function_name Name of the static function in the class - * - * \return A valid Dart instance if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_GetStaticMethodClosure(Dart_Handle library, - Dart_Handle cls_type, - Dart_Handle function_name); - -/* - * ======== - * Booleans - * ======== - */ - -/** - * Returns the True object. - * - * Requires there to be a current isolate. - * - * \return A handle to the True object. - */ -DART_EXPORT Dart_Handle Dart_True(); - -/** - * Returns the False object. - * - * Requires there to be a current isolate. - * - * \return A handle to the False object. - */ -DART_EXPORT Dart_Handle Dart_False(); - -/** - * Returns a Boolean with the provided value. - * - * \param value true or false. - * - * \return The Boolean object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewBoolean(bool value); - -/** - * Gets the value of a Boolean - * - * \param boolean_obj A Boolean - * \param value Returns the value of the Boolean. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_BooleanValue(Dart_Handle boolean_obj, bool* value); - -/* - * ======= - * Strings - * ======= - */ - -/** - * Gets the length of a String. - * - * \param str A String. - * \param length Returns the length of the String. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_StringLength(Dart_Handle str, intptr_t* length); - -/** - * Returns a String built from the provided C string - * (There is an implicit assumption that the C string passed in contains - * UTF-8 encoded characters and '\0' is considered as a termination - * character). - * - * \param value A C String - * - * \return The String object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewStringFromCString(const char* str); -/* TODO(turnidge): Document what happens when we run out of memory - * during this call. */ - -/** - * Returns a String built from an array of UTF-8 encoded characters. - * - * \param utf8_array An array of UTF-8 encoded characters. - * \param length The length of the codepoints array. - * - * \return The String object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewStringFromUTF8(const uint8_t* utf8_array, - intptr_t length); - -/** - * Returns a String built from an array of UTF-16 encoded characters. - * - * \param utf16_array An array of UTF-16 encoded characters. - * \param length The length of the codepoints array. - * - * \return The String object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewStringFromUTF16(const uint16_t* utf16_array, - intptr_t length); - -/** - * Returns a String built from an array of UTF-32 encoded characters. - * - * \param utf32_array An array of UTF-32 encoded characters. - * \param length The length of the codepoints array. - * - * \return The String object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewStringFromUTF32(const int32_t* utf32_array, - intptr_t length); - -/** - * Returns a String which references an external array of - * Latin-1 (ISO-8859-1) encoded characters. - * - * \param latin1_array Array of Latin-1 encoded characters. This must not move. - * \param length The length of the characters array. - * \param peer An external pointer to associate with this string. - * \param external_allocation_size The number of externally allocated - * bytes for peer. Used to inform the garbage collector. - * \param callback A callback to be called when this string is finalized. - * - * \return The String object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle -Dart_NewExternalLatin1String(const uint8_t* latin1_array, - intptr_t length, - void* peer, - intptr_t external_allocation_size, - Dart_HandleFinalizer callback); - -/** - * Returns a String which references an external array of UTF-16 encoded - * characters. - * - * \param utf16_array An array of UTF-16 encoded characters. This must not move. - * \param length The length of the characters array. - * \param peer An external pointer to associate with this string. - * \param external_allocation_size The number of externally allocated - * bytes for peer. Used to inform the garbage collector. - * \param callback A callback to be called when this string is finalized. - * - * \return The String object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle -Dart_NewExternalUTF16String(const uint16_t* utf16_array, - intptr_t length, - void* peer, - intptr_t external_allocation_size, - Dart_HandleFinalizer callback); - -/** - * Gets the C string representation of a String. - * (It is a sequence of UTF-8 encoded values with a '\0' termination.) - * - * \param str A string. - * \param cstr Returns the String represented as a C string. - * This C string is scope allocated and is only valid until - * the next call to Dart_ExitScope. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle str, - const char** cstr); - -/** - * Gets a UTF-8 encoded representation of a String. - * - * Any unpaired surrogate code points in the string will be converted as - * replacement characters (U+FFFD, 0xEF 0xBF 0xBD in UTF-8). If you need - * to preserve unpaired surrogates, use the Dart_StringToUTF16 function. - * - * \param str A string. - * \param utf8_array Returns the String represented as UTF-8 code - * units. This UTF-8 array is scope allocated and is only valid - * until the next call to Dart_ExitScope. - * \param length Used to return the length of the array which was - * actually used. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_StringToUTF8(Dart_Handle str, - uint8_t** utf8_array, - intptr_t* length); - -/** - * Gets the data corresponding to the string object. This function returns - * the data only for Latin-1 (ISO-8859-1) string objects. For all other - * string objects it returns an error. - * - * \param str A string. - * \param latin1_array An array allocated by the caller, used to return - * the string data. - * \param length Used to pass in the length of the provided array. - * Used to return the length of the array which was actually used. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_StringToLatin1(Dart_Handle str, - uint8_t* latin1_array, - intptr_t* length); - -/** - * Gets the UTF-16 encoded representation of a string. - * - * \param str A string. - * \param utf16_array An array allocated by the caller, used to return - * the array of UTF-16 encoded characters. - * \param length Used to pass in the length of the provided array. - * Used to return the length of the array which was actually used. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_StringToUTF16(Dart_Handle str, - uint16_t* utf16_array, - intptr_t* length); - -/** - * Gets the storage size in bytes of a String. - * - * \param str A String. - * \param length Returns the storage size in bytes of the String. - * This is the size in bytes needed to store the String. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_StringStorageSize(Dart_Handle str, intptr_t* size); - -/** - * Retrieves some properties associated with a String. - * Properties retrieved are: - * - character size of the string (one or two byte) - * - length of the string - * - peer pointer of string if it is an external string. - * \param str A String. - * \param char_size Returns the character size of the String. - * \param str_len Returns the length of the String. - * \param peer Returns the peer pointer associated with the String or 0 if - * there is no peer pointer for it. - * \return Success if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_StringGetProperties(Dart_Handle str, - intptr_t* char_size, - intptr_t* str_len, - void** peer); - -/* - * ===== - * Lists - * ===== - */ - -/** - * Returns a List of the desired length. - * - * \param length The length of the list. - * - * \return The List object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewList(intptr_t length); - -typedef enum { - Dart_CoreType_Dynamic, - Dart_CoreType_Int, - Dart_CoreType_String, -} Dart_CoreType_Id; - -// TODO(bkonyi): convert this to use nullable types once NNBD is enabled. -/** - * Returns a List of the desired length with the desired legacy element type. - * - * \param element_type_id The type of elements of the list. - * \param length The length of the list. - * - * \return The List object if no error occurs. Otherwise returns an error - * handle. - */ -DART_EXPORT Dart_Handle Dart_NewListOf(Dart_CoreType_Id element_type_id, - intptr_t length); - -/** - * Returns a List of the desired length with the desired element type. - * - * \param element_type Handle to a nullable type object. E.g., from - * Dart_GetType or Dart_GetNullableType. - * - * \param length The length of the list. - * - * \return The List object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewListOfType(Dart_Handle element_type, - intptr_t length); - -/** - * Returns a List of the desired length with the desired element type, filled - * with the provided object. - * - * \param element_type Handle to a type object. E.g., from Dart_GetType. - * - * \param fill_object Handle to an object of type 'element_type' that will be - * used to populate the list. This parameter can only be Dart_Null() if the - * length of the list is 0 or 'element_type' is a nullable type. - * - * \param length The length of the list. - * - * \return The List object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewListOfTypeFilled(Dart_Handle element_type, - Dart_Handle fill_object, - intptr_t length); - -/** - * Gets the length of a List. - * - * May generate an unhandled exception error. - * - * \param list A List. - * \param length Returns the length of the List. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_ListLength(Dart_Handle list, intptr_t* length); - -/** - * Gets the Object at some index of a List. - * - * If the index is out of bounds, an error occurs. - * - * May generate an unhandled exception error. - * - * \param list A List. - * \param index A valid index into the List. - * - * \return The Object in the List at the specified index if no error - * occurs. Otherwise returns an error handle. - */ -DART_EXPORT Dart_Handle Dart_ListGetAt(Dart_Handle list, intptr_t index); - -/** -* Gets a range of Objects from a List. -* -* If any of the requested index values are out of bounds, an error occurs. -* -* May generate an unhandled exception error. -* -* \param list A List. -* \param offset The offset of the first item to get. -* \param length The number of items to get. -* \param result A pointer to fill with the objects. -* -* \return Success if no error occurs during the operation. -*/ -DART_EXPORT Dart_Handle Dart_ListGetRange(Dart_Handle list, - intptr_t offset, - intptr_t length, - Dart_Handle* result); - -/** - * Sets the Object at some index of a List. - * - * If the index is out of bounds, an error occurs. - * - * May generate an unhandled exception error. - * - * \param array A List. - * \param index A valid index into the List. - * \param value The Object to put in the List. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT Dart_Handle Dart_ListSetAt(Dart_Handle list, - intptr_t index, - Dart_Handle value); - -/** - * May generate an unhandled exception error. - */ -DART_EXPORT Dart_Handle Dart_ListGetAsBytes(Dart_Handle list, - intptr_t offset, - uint8_t* native_array, - intptr_t length); - -/** - * May generate an unhandled exception error. - */ -DART_EXPORT Dart_Handle Dart_ListSetAsBytes(Dart_Handle list, - intptr_t offset, - const uint8_t* native_array, - intptr_t length); - -/* - * ==== - * Maps - * ==== - */ - -/** - * Gets the Object at some key of a Map. - * - * May generate an unhandled exception error. - * - * \param map A Map. - * \param key An Object. - * - * \return The value in the map at the specified key, null if the map does not - * contain the key, or an error handle. - */ -DART_EXPORT Dart_Handle Dart_MapGetAt(Dart_Handle map, Dart_Handle key); - -/** - * Returns whether the Map contains a given key. - * - * May generate an unhandled exception error. - * - * \param map A Map. - * - * \return A handle on a boolean indicating whether map contains the key. - * Otherwise returns an error handle. - */ -DART_EXPORT Dart_Handle Dart_MapContainsKey(Dart_Handle map, Dart_Handle key); - -/** - * Gets the list of keys of a Map. - * - * May generate an unhandled exception error. - * - * \param map A Map. - * - * \return The list of key Objects if no error occurs. Otherwise returns an - * error handle. - */ -DART_EXPORT Dart_Handle Dart_MapKeys(Dart_Handle map); - -/* - * ========== - * Typed Data - * ========== - */ - -typedef enum { - Dart_TypedData_kByteData = 0, - Dart_TypedData_kInt8, - Dart_TypedData_kUint8, - Dart_TypedData_kUint8Clamped, - Dart_TypedData_kInt16, - Dart_TypedData_kUint16, - Dart_TypedData_kInt32, - Dart_TypedData_kUint32, - Dart_TypedData_kInt64, - Dart_TypedData_kUint64, - Dart_TypedData_kFloat32, - Dart_TypedData_kFloat64, - Dart_TypedData_kInt32x4, - Dart_TypedData_kFloat32x4, - Dart_TypedData_kFloat64x2, - Dart_TypedData_kInvalid -} Dart_TypedData_Type; - -/** - * Return type if this object is a TypedData object. - * - * \return kInvalid if the object is not a TypedData object or the appropriate - * Dart_TypedData_Type. - */ -DART_EXPORT Dart_TypedData_Type Dart_GetTypeOfTypedData(Dart_Handle object); - -/** - * Return type if this object is an external TypedData object. - * - * \return kInvalid if the object is not an external TypedData object or - * the appropriate Dart_TypedData_Type. - */ -DART_EXPORT Dart_TypedData_Type -Dart_GetTypeOfExternalTypedData(Dart_Handle object); - -/** - * Returns a TypedData object of the desired length and type. - * - * \param type The type of the TypedData object. - * \param length The length of the TypedData object (length in type units). - * - * \return The TypedData object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewTypedData(Dart_TypedData_Type type, - intptr_t length); - -/** - * Returns a TypedData object which references an external data array. - * - * \param type The type of the data array. - * \param data A data array. This array must not move. - * \param length The length of the data array (length in type units). - * - * \return The TypedData object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewExternalTypedData(Dart_TypedData_Type type, - void* data, - intptr_t length); - -/** - * Returns a TypedData object which references an external data array. - * - * \param type The type of the data array. - * \param data A data array. This array must not move. - * \param length The length of the data array (length in type units). - * \param peer A pointer to a native object or NULL. This value is - * provided to callback when it is invoked. - * \param external_allocation_size The number of externally allocated - * bytes for peer. Used to inform the garbage collector. - * \param callback A function pointer that will be invoked sometime - * after the object is garbage collected, unless the handle has been deleted. - * A valid callback needs to be specified it cannot be NULL. - * - * \return The TypedData object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle -Dart_NewExternalTypedDataWithFinalizer(Dart_TypedData_Type type, - void* data, - intptr_t length, - void* peer, - intptr_t external_allocation_size, - Dart_HandleFinalizer callback); - -/** - * Returns a ByteBuffer object for the typed data. - * - * \param type_data The TypedData object. - * - * \return The ByteBuffer object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewByteBuffer(Dart_Handle typed_data); - -/** - * Acquires access to the internal data address of a TypedData object. - * - * \param object The typed data object whose internal data address is to - * be accessed. - * \param type The type of the object is returned here. - * \param data The internal data address is returned here. - * \param len Size of the typed array is returned here. - * - * Notes: - * When the internal address of the object is acquired any calls to a - * Dart API function that could potentially allocate an object or run - * any Dart code will return an error. - * - * Any Dart API functions for accessing the data should not be called - * before the corresponding release. In particular, the object should - * not be acquired again before its release. This leads to undefined - * behavior. - * - * \return Success if the internal data address is acquired successfully. - * Otherwise, returns an error handle. - */ -DART_EXPORT Dart_Handle Dart_TypedDataAcquireData(Dart_Handle object, - Dart_TypedData_Type* type, - void** data, - intptr_t* len); - -/** - * Releases access to the internal data address that was acquired earlier using - * Dart_TypedDataAcquireData. - * - * \param object The typed data object whose internal data address is to be - * released. - * - * \return Success if the internal data address is released successfully. - * Otherwise, returns an error handle. - */ -DART_EXPORT Dart_Handle Dart_TypedDataReleaseData(Dart_Handle object); - -/** - * Returns the TypedData object associated with the ByteBuffer object. - * - * \param byte_buffer The ByteBuffer object. - * - * \return The TypedData object if no error occurs. Otherwise returns - * an error handle. - */ -DART_EXPORT Dart_Handle Dart_GetDataFromByteBuffer(Dart_Handle byte_buffer); - -/* - * ============================================================ - * Invoking Constructors, Methods, Closures and Field accessors - * ============================================================ - */ - -/** - * Invokes a constructor, creating a new object. - * - * This function allows hidden constructors (constructors with leading - * underscores) to be called. - * - * \param type Type of object to be constructed. - * \param constructor_name The name of the constructor to invoke. Use - * Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. - * This name should not include the name of the class. - * \param number_of_arguments Size of the arguments array. - * \param arguments An array of arguments to the constructor. - * - * \return If the constructor is called and completes successfully, - * then the new object. If an error occurs during execution, then an - * error handle is returned. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_New(Dart_Handle type, - Dart_Handle constructor_name, - int number_of_arguments, - Dart_Handle* arguments); - -/** - * Allocate a new object without invoking a constructor. - * - * \param type The type of an object to be allocated. - * - * \return The new object. If an error occurs during execution, then an - * error handle is returned. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_Allocate(Dart_Handle type); - -/** - * Allocate a new object without invoking a constructor, and sets specified - * native fields. - * - * \param type The type of an object to be allocated. - * \param num_native_fields The number of native fields to set. - * \param native_fields An array containing the value of native fields. - * - * \return The new object. If an error occurs during execution, then an - * error handle is returned. - */ -DART_EXPORT Dart_Handle -Dart_AllocateWithNativeFields(Dart_Handle type, - intptr_t num_native_fields, - const intptr_t* native_fields); - -/** - * Invokes a method or function. - * - * The 'target' parameter may be an object, type, or library. If - * 'target' is an object, then this function will invoke an instance - * method. If 'target' is a type, then this function will invoke a - * static method. If 'target' is a library, then this function will - * invoke a top-level function from that library. - * NOTE: This API call cannot be used to invoke methods of a type object. - * - * This function ignores visibility (leading underscores in names). - * - * May generate an unhandled exception error. - * - * \param target An object, type, or library. - * \param name The name of the function or method to invoke. - * \param number_of_arguments Size of the arguments array. - * \param arguments An array of arguments to the function. - * - * \return If the function or method is called and completes - * successfully, then the return value is returned. If an error - * occurs during execution, then an error handle is returned. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_Invoke(Dart_Handle target, - Dart_Handle name, - int number_of_arguments, - Dart_Handle* arguments); -/* TODO(turnidge): Document how to invoke operators. */ - -/** - * Invokes a Closure with the given arguments. - * - * May generate an unhandled exception error. - * - * \return If no error occurs during execution, then the result of - * invoking the closure is returned. If an error occurs during - * execution, then an error handle is returned. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_InvokeClosure(Dart_Handle closure, - int number_of_arguments, - Dart_Handle* arguments); - -/** - * Invokes a Generative Constructor on an object that was previously - * allocated using Dart_Allocate/Dart_AllocateWithNativeFields. - * - * The 'target' parameter must be an object. - * - * This function ignores visibility (leading underscores in names). - * - * May generate an unhandled exception error. - * - * \param target An object. - * \param name The name of the constructor to invoke. - * Use Dart_Null() or Dart_EmptyString() to invoke the unnamed constructor. - * \param number_of_arguments Size of the arguments array. - * \param arguments An array of arguments to the function. - * - * \return If the constructor is called and completes - * successfully, then the object is returned. If an error - * occurs during execution, then an error handle is returned. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_InvokeConstructor(Dart_Handle object, - Dart_Handle name, - int number_of_arguments, - Dart_Handle* arguments); - -/** - * Gets the value of a field. - * - * The 'container' parameter may be an object, type, or library. If - * 'container' is an object, then this function will access an - * instance field. If 'container' is a type, then this function will - * access a static field. If 'container' is a library, then this - * function will access a top-level variable. - * NOTE: This API call cannot be used to access fields of a type object. - * - * This function ignores field visibility (leading underscores in names). - * - * May generate an unhandled exception error. - * - * \param container An object, type, or library. - * \param name A field name. - * - * \return If no error occurs, then the value of the field is - * returned. Otherwise an error handle is returned. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_GetField(Dart_Handle container, Dart_Handle name); - -/** - * Sets the value of a field. - * - * The 'container' parameter may actually be an object, type, or - * library. If 'container' is an object, then this function will - * access an instance field. If 'container' is a type, then this - * function will access a static field. If 'container' is a library, - * then this function will access a top-level variable. - * NOTE: This API call cannot be used to access fields of a type object. - * - * This function ignores field visibility (leading underscores in names). - * - * May generate an unhandled exception error. - * - * \param container An object, type, or library. - * \param name A field name. - * \param value The new field value. - * - * \return A valid handle if no error occurs. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_SetField(Dart_Handle container, Dart_Handle name, Dart_Handle value); - -/* - * ========== - * Exceptions - * ========== - */ - -/* - * TODO(turnidge): Remove these functions from the api and replace all - * uses with Dart_NewUnhandledExceptionError. */ - -/** - * Throws an exception. - * - * This function causes a Dart language exception to be thrown. This - * will proceed in the standard way, walking up Dart frames until an - * appropriate 'catch' block is found, executing 'finally' blocks, - * etc. - * - * If an error handle is passed into this function, the error is - * propagated immediately. See Dart_PropagateError for a discussion - * of error propagation. - * - * If successful, this function does not return. Note that this means - * that the destructors of any stack-allocated C++ objects will not be - * called. If there are no Dart frames on the stack, an error occurs. - * - * \return An error handle if the exception was not thrown. - * Otherwise the function does not return. - */ -DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception); - -/** - * Rethrows an exception. - * - * Rethrows an exception, unwinding all dart frames on the stack. If - * successful, this function does not return. Note that this means - * that the destructors of any stack-allocated C++ objects will not be - * called. If there are no Dart frames on the stack, an error occurs. - * - * \return An error handle if the exception was not thrown. - * Otherwise the function does not return. - */ -DART_EXPORT Dart_Handle Dart_ReThrowException(Dart_Handle exception, - Dart_Handle stacktrace); - -/* - * =========================== - * Native fields and functions - * =========================== - */ - -/** - * Gets the number of native instance fields in an object. - */ -DART_EXPORT Dart_Handle Dart_GetNativeInstanceFieldCount(Dart_Handle obj, - int* count); - -/** - * Gets the value of a native field. - * - * TODO(turnidge): Document. - */ -DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj, - int index, - intptr_t* value); - -/** - * Sets the value of a native field. - * - * TODO(turnidge): Document. - */ -DART_EXPORT Dart_Handle Dart_SetNativeInstanceField(Dart_Handle obj, - int index, - intptr_t value); - -/** - * The arguments to a native function. - * - * This object is passed to a native function to represent its - * arguments and return value. It allows access to the arguments to a - * native function by index. It also allows the return value of a - * native function to be set. - */ -typedef struct _Dart_NativeArguments* Dart_NativeArguments; - -/** - * Extracts current isolate group data from the native arguments structure. - */ -DART_EXPORT void* Dart_GetNativeIsolateGroupData(Dart_NativeArguments args); - -typedef enum { - Dart_NativeArgument_kBool = 0, - Dart_NativeArgument_kInt32, - Dart_NativeArgument_kUint32, - Dart_NativeArgument_kInt64, - Dart_NativeArgument_kUint64, - Dart_NativeArgument_kDouble, - Dart_NativeArgument_kString, - Dart_NativeArgument_kInstance, - Dart_NativeArgument_kNativeFields, -} Dart_NativeArgument_Type; - -typedef struct _Dart_NativeArgument_Descriptor { - uint8_t type; - uint8_t index; -} Dart_NativeArgument_Descriptor; - -typedef union _Dart_NativeArgument_Value { - bool as_bool; - int32_t as_int32; - uint32_t as_uint32; - int64_t as_int64; - uint64_t as_uint64; - double as_double; - struct { - Dart_Handle dart_str; - void* peer; - } as_string; - struct { - intptr_t num_fields; - intptr_t* values; - } as_native_fields; - Dart_Handle as_instance; -} Dart_NativeArgument_Value; - -enum { - kNativeArgNumberPos = 0, - kNativeArgNumberSize = 8, - kNativeArgTypePos = kNativeArgNumberPos + kNativeArgNumberSize, - kNativeArgTypeSize = 8, -}; - -#define BITMASK(size) ((1 << size) - 1) -#define DART_NATIVE_ARG_DESCRIPTOR(type, position) \ - (((type & BITMASK(kNativeArgTypeSize)) << kNativeArgTypePos) | \ - (position & BITMASK(kNativeArgNumberSize))) - -/** - * Gets the native arguments based on the types passed in and populates - * the passed arguments buffer with appropriate native values. - * - * \param args the Native arguments block passed into the native call. - * \param num_arguments length of argument descriptor array and argument - * values array passed in. - * \param arg_descriptors an array that describes the arguments that - * need to be retrieved. For each argument to be retrieved the descriptor - * contains the argument number (0, 1 etc.) and the argument type - * described using Dart_NativeArgument_Type, e.g: - * DART_NATIVE_ARG_DESCRIPTOR(Dart_NativeArgument_kBool, 1) indicates - * that the first argument is to be retrieved and it should be a boolean. - * \param arg_values array into which the native arguments need to be - * extracted into, the array is allocated by the caller (it could be - * stack allocated to avoid the malloc/free performance overhead). - * - * \return Success if all the arguments could be extracted correctly, - * returns an error handle if there were any errors while extracting the - * arguments (mismatched number of arguments, incorrect types, etc.). - */ -DART_EXPORT Dart_Handle -Dart_GetNativeArguments(Dart_NativeArguments args, - int num_arguments, - const Dart_NativeArgument_Descriptor* arg_descriptors, - Dart_NativeArgument_Value* arg_values); - -/** - * Gets the native argument at some index. - */ -DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, - int index); -/* TODO(turnidge): Specify the behavior of an out-of-bounds access. */ - -/** - * Gets the number of native arguments. - */ -DART_EXPORT int Dart_GetNativeArgumentCount(Dart_NativeArguments args); - -/** - * Gets all the native fields of the native argument at some index. - * \param args Native arguments structure. - * \param arg_index Index of the desired argument in the structure above. - * \param num_fields size of the intptr_t array 'field_values' passed in. - * \param field_values intptr_t array in which native field values are returned. - * \return Success if the native fields where copied in successfully. Otherwise - * returns an error handle. On success the native field values are copied - * into the 'field_values' array, if the argument at 'arg_index' is a - * null object then 0 is copied as the native field values into the - * 'field_values' array. - */ -DART_EXPORT Dart_Handle -Dart_GetNativeFieldsOfArgument(Dart_NativeArguments args, - int arg_index, - int num_fields, - intptr_t* field_values); - -/** - * Gets the native field of the receiver. - */ -DART_EXPORT Dart_Handle Dart_GetNativeReceiver(Dart_NativeArguments args, - intptr_t* value); - -/** - * Gets a string native argument at some index. - * \param args Native arguments structure. - * \param arg_index Index of the desired argument in the structure above. - * \param peer Returns the peer pointer if the string argument has one. - * \return Success if the string argument has a peer, if it does not - * have a peer then the String object is returned. Otherwise returns - * an error handle (argument is not a String object). - */ -DART_EXPORT Dart_Handle Dart_GetNativeStringArgument(Dart_NativeArguments args, - int arg_index, - void** peer); - -/** - * Gets an integer native argument at some index. - * \param args Native arguments structure. - * \param arg_index Index of the desired argument in the structure above. - * \param value Returns the integer value if the argument is an Integer. - * \return Success if no error occurs. Otherwise returns an error handle. - */ -DART_EXPORT Dart_Handle Dart_GetNativeIntegerArgument(Dart_NativeArguments args, - int index, - int64_t* value); - -/** - * Gets a boolean native argument at some index. - * \param args Native arguments structure. - * \param arg_index Index of the desired argument in the structure above. - * \param value Returns the boolean value if the argument is a Boolean. - * \return Success if no error occurs. Otherwise returns an error handle. - */ -DART_EXPORT Dart_Handle Dart_GetNativeBooleanArgument(Dart_NativeArguments args, - int index, - bool* value); - -/** - * Gets a double native argument at some index. - * \param args Native arguments structure. - * \param arg_index Index of the desired argument in the structure above. - * \param value Returns the double value if the argument is a double. - * \return Success if no error occurs. Otherwise returns an error handle. - */ -DART_EXPORT Dart_Handle Dart_GetNativeDoubleArgument(Dart_NativeArguments args, - int index, - double* value); - -/** - * Sets the return value for a native function. - * - * If retval is an Error handle, then error will be propagated once - * the native functions exits. See Dart_PropagateError for a - * discussion of how different types of errors are propagated. - */ -DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, - Dart_Handle retval); - -DART_EXPORT void Dart_SetWeakHandleReturnValue(Dart_NativeArguments args, - Dart_WeakPersistentHandle rval); - -DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args, - bool retval); - -DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args, - int64_t retval); - -DART_EXPORT void Dart_SetDoubleReturnValue(Dart_NativeArguments args, - double retval); - -/** - * A native function. - */ -typedef void (*Dart_NativeFunction)(Dart_NativeArguments arguments); - -/** - * Native entry resolution callback. - * - * For libraries and scripts which have native functions, the embedder - * can provide a native entry resolver. This callback is used to map a - * name/arity to a Dart_NativeFunction. If no function is found, the - * callback should return NULL. - * - * The parameters to the native resolver function are: - * \param name a Dart string which is the name of the native function. - * \param num_of_arguments is the number of arguments expected by the - * native function. - * \param auto_setup_scope is a boolean flag that can be set by the resolver - * to indicate if this function needs a Dart API scope (see Dart_EnterScope/ - * Dart_ExitScope) to be setup automatically by the VM before calling into - * the native function. By default most native functions would require this - * to be true but some light weight native functions which do not call back - * into the VM through the Dart API may not require a Dart scope to be - * setup automatically. - * - * \return A valid Dart_NativeFunction which resolves to a native entry point - * for the native function. - * - * See Dart_SetNativeResolver. - */ -typedef Dart_NativeFunction (*Dart_NativeEntryResolver)(Dart_Handle name, - int num_of_arguments, - bool* auto_setup_scope); -/* TODO(turnidge): Consider renaming to NativeFunctionResolver or - * NativeResolver. */ - -/** - * Native entry symbol lookup callback. - * - * For libraries and scripts which have native functions, the embedder - * can provide a callback for mapping a native entry to a symbol. This callback - * maps a native function entry PC to the native function name. If no native - * entry symbol can be found, the callback should return NULL. - * - * The parameters to the native reverse resolver function are: - * \param nf A Dart_NativeFunction. - * - * \return A const UTF-8 string containing the symbol name or NULL. - * - * See Dart_SetNativeResolver. - */ -typedef const uint8_t* (*Dart_NativeEntrySymbol)(Dart_NativeFunction nf); - -/** - * FFI Native C function pointer resolver callback. - * - * See Dart_SetFfiNativeResolver. - */ -typedef void* (*Dart_FfiNativeResolver)(const char* name, uintptr_t args_n); - -/* - * =========== - * Environment - * =========== - */ - -/** - * An environment lookup callback function. - * - * \param name The name of the value to lookup in the environment. - * - * \return A valid handle to a string if the name exists in the - * current environment or Dart_Null() if not. - */ -typedef Dart_Handle (*Dart_EnvironmentCallback)(Dart_Handle name); - -/** - * Sets the environment callback for the current isolate. This - * callback is used to lookup environment values by name in the - * current environment. This enables the embedder to supply values for - * the const constructors bool.fromEnvironment, int.fromEnvironment - * and String.fromEnvironment. - */ -DART_EXPORT Dart_Handle -Dart_SetEnvironmentCallback(Dart_EnvironmentCallback callback); - -/** - * Sets the callback used to resolve native functions for a library. - * - * \param library A library. - * \param resolver A native entry resolver. - * - * \return A valid handle if the native resolver was set successfully. - */ -DART_EXPORT Dart_Handle -Dart_SetNativeResolver(Dart_Handle library, - Dart_NativeEntryResolver resolver, - Dart_NativeEntrySymbol symbol); -/* TODO(turnidge): Rename to Dart_LibrarySetNativeResolver? */ - -/** - * Returns the callback used to resolve native functions for a library. - * - * \param library A library. - * \param resolver a pointer to a Dart_NativeEntryResolver - * - * \return A valid handle if the library was found. - */ -DART_EXPORT Dart_Handle -Dart_GetNativeResolver(Dart_Handle library, Dart_NativeEntryResolver* resolver); - -/** - * Returns the callback used to resolve native function symbols for a library. - * - * \param library A library. - * \param resolver a pointer to a Dart_NativeEntrySymbol. - * - * \return A valid handle if the library was found. - */ -DART_EXPORT Dart_Handle Dart_GetNativeSymbol(Dart_Handle library, - Dart_NativeEntrySymbol* resolver); - -/** - * Sets the callback used to resolve FFI native functions for a library. - * The resolved functions are expected to be a C function pointer of the - * correct signature (as specified in the `@FfiNative()` function - * annotation in Dart code). - * - * NOTE: This is an experimental feature and might change in the future. - * - * \param library A library. - * \param resolver A native function resolver. - * - * \return A valid handle if the native resolver was set successfully. - */ -DART_EXPORT Dart_Handle -Dart_SetFfiNativeResolver(Dart_Handle library, Dart_FfiNativeResolver resolver); - -/* - * ===================== - * Scripts and Libraries - * ===================== - */ - -typedef enum { - Dart_kCanonicalizeUrl = 0, - Dart_kImportTag, - Dart_kKernelTag, -} Dart_LibraryTag; - -/** - * The library tag handler is a multi-purpose callback provided by the - * embedder to the Dart VM. The embedder implements the tag handler to - * provide the ability to load Dart scripts and imports. - * - * -- TAGS -- - * - * Dart_kCanonicalizeUrl - * - * This tag indicates that the embedder should canonicalize 'url' with - * respect to 'library'. For most embedders, the - * Dart_DefaultCanonicalizeUrl function is a sufficient implementation - * of this tag. The return value should be a string holding the - * canonicalized url. - * - * Dart_kImportTag - * - * This tag is used to load a library from IsolateMirror.loadUri. The embedder - * should call Dart_LoadLibraryFromKernel to provide the library to the VM. The - * return value should be an error or library (the result from - * Dart_LoadLibraryFromKernel). - * - * Dart_kKernelTag - * - * This tag is used to load the intermediate file (kernel) generated by - * the Dart front end. This tag is typically used when a 'hot-reload' - * of an application is needed and the VM is 'use dart front end' mode. - * The dart front end typically compiles all the scripts, imports and part - * files into one intermediate file hence we don't use the source/import or - * script tags. The return value should be an error or a TypedData containing - * the kernel bytes. - * - */ -typedef Dart_Handle (*Dart_LibraryTagHandler)( - Dart_LibraryTag tag, - Dart_Handle library_or_package_map_url, - Dart_Handle url); - -/** - * Sets library tag handler for the current isolate. This handler is - * used to handle the various tags encountered while loading libraries - * or scripts in the isolate. - * - * \param handler Handler code to be used for handling the various tags - * encountered while loading libraries or scripts in the isolate. - * - * \return If no error occurs, the handler is set for the isolate. - * Otherwise an error handle is returned. - * - * TODO(turnidge): Document. - */ -DART_EXPORT Dart_Handle -Dart_SetLibraryTagHandler(Dart_LibraryTagHandler handler); - -/** - * Handles deferred loading requests. When this handler is invoked, it should - * eventually load the deferred loading unit with the given id and call - * Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError. It is - * recommended that the loading occur asynchronously, but it is permitted to - * call Dart_DeferredLoadComplete or Dart_DeferredLoadCompleteError before the - * handler returns. - * - * If an error is returned, it will be propogated through - * `prefix.loadLibrary()`. This is useful for synchronous - * implementations, which must propogate any unwind errors from - * Dart_DeferredLoadComplete or Dart_DeferredLoadComplete. Otherwise the handler - * should return a non-error such as `Dart_Null()`. - */ -typedef Dart_Handle (*Dart_DeferredLoadHandler)(intptr_t loading_unit_id); - -/** - * Sets the deferred load handler for the current isolate. This handler is - * used to handle loading deferred imports in an AppJIT or AppAOT program. - */ -DART_EXPORT Dart_Handle -Dart_SetDeferredLoadHandler(Dart_DeferredLoadHandler handler); - -/** - * Notifies the VM that a deferred load completed successfully. This function - * will eventually cause the corresponding `prefix.loadLibrary()` futures to - * complete. - * - * Requires the current isolate to be the same current isolate during the - * invocation of the Dart_DeferredLoadHandler. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_DeferredLoadComplete(intptr_t loading_unit_id, - const uint8_t* snapshot_data, - const uint8_t* snapshot_instructions); - -/** - * Notifies the VM that a deferred load failed. This function - * will eventually cause the corresponding `prefix.loadLibrary()` futures to - * complete with an error. - * - * If `transient` is true, future invocations of `prefix.loadLibrary()` will - * trigger new load requests. If false, futures invocation will complete with - * the same error. - * - * Requires the current isolate to be the same current isolate during the - * invocation of the Dart_DeferredLoadHandler. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_DeferredLoadCompleteError(intptr_t loading_unit_id, - const char* error_message, - bool transient); - -/** - * Canonicalizes a url with respect to some library. - * - * The url is resolved with respect to the library's url and some url - * normalizations are performed. - * - * This canonicalization function should be sufficient for most - * embedders to implement the Dart_kCanonicalizeUrl tag. - * - * \param base_url The base url relative to which the url is - * being resolved. - * \param url The url being resolved and canonicalized. This - * parameter is a string handle. - * - * \return If no error occurs, a String object is returned. Otherwise - * an error handle is returned. - */ -DART_EXPORT Dart_Handle Dart_DefaultCanonicalizeUrl(Dart_Handle base_url, - Dart_Handle url); - -/** - * Loads the root library for the current isolate. - * - * Requires there to be no current root library. - * - * \param buffer A buffer which contains a kernel binary (see - * pkg/kernel/binary.md). Must remain valid until isolate group shutdown. - * \param buffer_size Length of the passed in buffer. - * - * \return A handle to the root library, or an error. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_LoadScriptFromKernel(const uint8_t* kernel_buffer, intptr_t kernel_size); - -/** - * Gets the library for the root script for the current isolate. - * - * If the root script has not yet been set for the current isolate, - * this function returns Dart_Null(). This function never returns an - * error handle. - * - * \return Returns the root Library for the current isolate or Dart_Null(). - */ -DART_EXPORT Dart_Handle Dart_RootLibrary(); - -/** - * Sets the root library for the current isolate. - * - * \return Returns an error handle if `library` is not a library handle. - */ -DART_EXPORT Dart_Handle Dart_SetRootLibrary(Dart_Handle library); - -/** - * Lookup or instantiate a legacy type by name and type arguments from a - * Library. - * - * \param library The library containing the class or interface. - * \param class_name The class name for the type. - * \param number_of_type_arguments Number of type arguments. - * For non parametric types the number of type arguments would be 0. - * \param type_arguments Pointer to an array of type arguments. - * For non parameteric types a NULL would be passed in for this argument. - * - * \return If no error occurs, the type is returned. - * Otherwise an error handle is returned. - */ -DART_EXPORT Dart_Handle Dart_GetType(Dart_Handle library, - Dart_Handle class_name, - intptr_t number_of_type_arguments, - Dart_Handle* type_arguments); - -/** - * Lookup or instantiate a nullable type by name and type arguments from - * Library. - * - * \param library The library containing the class or interface. - * \param class_name The class name for the type. - * \param number_of_type_arguments Number of type arguments. - * For non parametric types the number of type arguments would be 0. - * \param type_arguments Pointer to an array of type arguments. - * For non parameteric types a NULL would be passed in for this argument. - * - * \return If no error occurs, the type is returned. - * Otherwise an error handle is returned. - */ -DART_EXPORT Dart_Handle Dart_GetNullableType(Dart_Handle library, - Dart_Handle class_name, - intptr_t number_of_type_arguments, - Dart_Handle* type_arguments); - -/** - * Lookup or instantiate a non-nullable type by name and type arguments from - * Library. - * - * \param library The library containing the class or interface. - * \param class_name The class name for the type. - * \param number_of_type_arguments Number of type arguments. - * For non parametric types the number of type arguments would be 0. - * \param type_arguments Pointer to an array of type arguments. - * For non parameteric types a NULL would be passed in for this argument. - * - * \return If no error occurs, the type is returned. - * Otherwise an error handle is returned. - */ -DART_EXPORT Dart_Handle -Dart_GetNonNullableType(Dart_Handle library, - Dart_Handle class_name, - intptr_t number_of_type_arguments, - Dart_Handle* type_arguments); - -/** - * Creates a nullable version of the provided type. - * - * \param type The type to be converted to a nullable type. - * - * \return If no error occurs, a nullable type is returned. - * Otherwise an error handle is returned. - */ -DART_EXPORT Dart_Handle Dart_TypeToNullableType(Dart_Handle type); - -/** - * Creates a non-nullable version of the provided type. - * - * \param type The type to be converted to a non-nullable type. - * - * \return If no error occurs, a non-nullable type is returned. - * Otherwise an error handle is returned. - */ -DART_EXPORT Dart_Handle Dart_TypeToNonNullableType(Dart_Handle type); - -/** - * A type's nullability. - * - * \param type A Dart type. - * \param result An out parameter containing the result of the check. True if - * the type is of the specified nullability, false otherwise. - * - * \return Returns an error handle if type is not of type Type. - */ -DART_EXPORT Dart_Handle Dart_IsNullableType(Dart_Handle type, bool* result); -DART_EXPORT Dart_Handle Dart_IsNonNullableType(Dart_Handle type, bool* result); -DART_EXPORT Dart_Handle Dart_IsLegacyType(Dart_Handle type, bool* result); - -/** - * Lookup a class or interface by name from a Library. - * - * \param library The library containing the class or interface. - * \param class_name The name of the class or interface. - * - * \return If no error occurs, the class or interface is - * returned. Otherwise an error handle is returned. - */ -DART_EXPORT Dart_Handle Dart_GetClass(Dart_Handle library, - Dart_Handle class_name); -/* TODO(asiva): The above method needs to be removed once all uses - * of it are removed from the embedder code. */ - -/** - * Returns an import path to a Library, such as "file:///test.dart" or - * "dart:core". - */ -DART_EXPORT Dart_Handle Dart_LibraryUrl(Dart_Handle library); - -/** - * Returns a URL from which a Library was loaded. - */ -DART_EXPORT Dart_Handle Dart_LibraryResolvedUrl(Dart_Handle library); - -/** - * \return An array of libraries. - */ -DART_EXPORT Dart_Handle Dart_GetLoadedLibraries(); - -DART_EXPORT Dart_Handle Dart_LookupLibrary(Dart_Handle url); -/* TODO(turnidge): Consider returning Dart_Null() when the library is - * not found to distinguish that from a true error case. */ - -/** - * Report an loading error for the library. - * - * \param library The library that failed to load. - * \param error The Dart error instance containing the load error. - * - * \return If the VM handles the error, the return value is - * a null handle. If it doesn't handle the error, the error - * object is returned. - */ -DART_EXPORT Dart_Handle Dart_LibraryHandleError(Dart_Handle library, - Dart_Handle error); - -/** - * Called by the embedder to load a partial program. Does not set the root - * library. - * - * \param buffer A buffer which contains a kernel binary (see - * pkg/kernel/binary.md). Must remain valid until isolate shutdown. - * \param buffer_size Length of the passed in buffer. - * - * \return A handle to the main library of the compilation unit, or an error. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_LoadLibraryFromKernel(const uint8_t* kernel_buffer, - intptr_t kernel_buffer_size); - -/** - * Indicates that all outstanding load requests have been satisfied. - * This finalizes all the new classes loaded and optionally completes - * deferred library futures. - * - * Requires there to be a current isolate. - * - * \param complete_futures Specify true if all deferred library - * futures should be completed, false otherwise. - * - * \return Success if all classes have been finalized and deferred library - * futures are completed. Otherwise, returns an error. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_FinalizeLoading(bool complete_futures); - -/* - * ===== - * Peers - * ===== - */ - -/** - * The peer field is a lazily allocated field intended for storage of - * an uncommonly used values. Most instances types can have a peer - * field allocated. The exceptions are subtypes of Null, num, and - * bool. - */ - -/** - * Returns the value of peer field of 'object' in 'peer'. - * - * \param object An object. - * \param peer An out parameter that returns the value of the peer - * field. - * - * \return Returns an error if 'object' is a subtype of Null, num, or - * bool. - */ -DART_EXPORT Dart_Handle Dart_GetPeer(Dart_Handle object, void** peer); - -/** - * Sets the value of the peer field of 'object' to the value of - * 'peer'. - * - * \param object An object. - * \param peer A value to store in the peer field. - * - * \return Returns an error if 'object' is a subtype of Null, num, or - * bool. - */ -DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); - -/* - * ====== - * Kernel - * ====== - */ - -/** - * Experimental support for Dart to Kernel parser isolate. - * - * TODO(hausner): Document finalized interface. - * - */ - -// TODO(33433): Remove kernel service from the embedding API. - -typedef enum { - Dart_KernelCompilationStatus_Unknown = -1, - Dart_KernelCompilationStatus_Ok = 0, - Dart_KernelCompilationStatus_Error = 1, - Dart_KernelCompilationStatus_Crash = 2, - Dart_KernelCompilationStatus_MsgFailed = 3, -} Dart_KernelCompilationStatus; - -typedef struct { - Dart_KernelCompilationStatus status; - bool null_safety; - char* error; - uint8_t* kernel; - intptr_t kernel_size; -} Dart_KernelCompilationResult; - -typedef enum { - Dart_KernelCompilationVerbosityLevel_Error = 0, - Dart_KernelCompilationVerbosityLevel_Warning, - Dart_KernelCompilationVerbosityLevel_Info, - Dart_KernelCompilationVerbosityLevel_All, -} Dart_KernelCompilationVerbosityLevel; - -DART_EXPORT bool Dart_IsKernelIsolate(Dart_Isolate isolate); -DART_EXPORT bool Dart_KernelIsolateIsRunning(); -DART_EXPORT Dart_Port Dart_KernelPort(); - -/** - * Compiles the given `script_uri` to a kernel file. - * - * \param platform_kernel A buffer containing the kernel of the platform (e.g. - * `vm_platform_strong.dill`). The VM does not take ownership of this memory. - * - * \param platform_kernel_size The length of the platform_kernel buffer. - * - * \param snapshot_compile Set to `true` when the compilation is for a snapshot. - * This is used by the frontend to determine if compilation related information - * should be printed to console (e.g., null safety mode). - * - * \param verbosity Specifies the logging behavior of the kernel compilation - * service. - * - * \return Returns the result of the compilation. - * - * On a successful compilation the returned [Dart_KernelCompilationResult] has - * a status of [Dart_KernelCompilationStatus_Ok] and the `kernel`/`kernel_size` - * fields are set. The caller takes ownership of the malloc()ed buffer. - * - * On a failed compilation the `error` might be set describing the reason for - * the failed compilation. The caller takes ownership of the malloc()ed - * error. - * - * Requires there to be a current isolate. - */ -DART_EXPORT Dart_KernelCompilationResult -Dart_CompileToKernel(const char* script_uri, - const uint8_t* platform_kernel, - const intptr_t platform_kernel_size, - bool incremental_compile, - bool snapshot_compile, - const char* package_config, - Dart_KernelCompilationVerbosityLevel verbosity); - -typedef struct { - const char* uri; - const char* source; -} Dart_SourceFile; - -DART_EXPORT Dart_KernelCompilationResult Dart_KernelListDependencies(); - -/** - * Sets the kernel buffer which will be used to load Dart SDK sources - * dynamically at runtime. - * - * \param platform_kernel A buffer containing kernel which has sources for the - * Dart SDK populated. Note: The VM does not take ownership of this memory. - * - * \param platform_kernel_size The length of the platform_kernel buffer. - */ -DART_EXPORT void Dart_SetDartLibrarySourcesKernel( - const uint8_t* platform_kernel, - const intptr_t platform_kernel_size); - -/** - * Detect the null safety opt-in status. - * - * When running from source, it is based on the opt-in status of `script_uri`. - * When running from a kernel buffer, it is based on the mode used when - * generating `kernel_buffer`. - * When running from an appJIT or AOT snapshot, it is based on the mode used - * when generating `snapshot_data`. - * - * \param script_uri Uri of the script that contains the source code - * - * \param package_config Uri of the package configuration file (either in format - * of .packages or .dart_tool/package_config.json) for the null safety - * detection to resolve package imports against. If this parameter is not - * passed the package resolution of the parent isolate should be used. - * - * \param original_working_directory current working directory when the VM - * process was launched, this is used to correctly resolve the path specified - * for package_config. - * - * \param snapshot_data - * - * \param snapshot_instructions Buffers containing a snapshot of the - * isolate or NULL if no snapshot is provided. If provided, the buffers must - * remain valid until the isolate shuts down. - * - * \param kernel_buffer - * - * \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must - * remain valid until isolate shutdown. - * - * \return Returns true if the null safety is opted in by the input being - * run `script_uri`, `snapshot_data` or `kernel_buffer`. - * - */ -DART_EXPORT bool Dart_DetectNullSafety(const char* script_uri, - const char* package_config, - const char* original_working_directory, - const uint8_t* snapshot_data, - const uint8_t* snapshot_instructions, - const uint8_t* kernel_buffer, - intptr_t kernel_buffer_size); - -#define DART_KERNEL_ISOLATE_NAME "kernel-service" - -/* - * ======= - * Service - * ======= - */ - -#define DART_VM_SERVICE_ISOLATE_NAME "vm-service" - -/** - * Returns true if isolate is the service isolate. - * - * \param isolate An isolate - * - * \return Returns true if 'isolate' is the service isolate. - */ -DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate); - -/** - * Writes the CPU profile to the timeline as a series of 'instant' events. - * - * Note that this is an expensive operation. - * - * \param main_port The main port of the Isolate whose profile samples to write. - * \param error An optional error, must be free()ed by caller. - * - * \return Returns true if the profile is successfully written and false - * otherwise. - */ -DART_EXPORT bool Dart_WriteProfileToTimeline(Dart_Port main_port, char** error); - -/* - * ============== - * Precompilation - * ============== - */ - -/** - * Compiles all functions reachable from entry points and marks - * the isolate to disallow future compilation. - * - * Entry points should be specified using `@pragma("vm:entry-point")` - * annotation. - * - * \return An error handle if a compilation error or runtime error running const - * constructors was encountered. - */ -DART_EXPORT Dart_Handle Dart_Precompile(); - -typedef void (*Dart_CreateLoadingUnitCallback)( - void* callback_data, - intptr_t loading_unit_id, - void** write_callback_data, - void** write_debug_callback_data); -typedef void (*Dart_StreamingWriteCallback)(void* callback_data, - const uint8_t* buffer, - intptr_t size); -typedef void (*Dart_StreamingCloseCallback)(void* callback_data); - -DART_EXPORT Dart_Handle Dart_LoadingUnitLibraryUris(intptr_t loading_unit_id); - -// On Darwin systems, 'dlsym' adds an '_' to the beginning of the symbol name. -// Use the '...CSymbol' definitions for resolving through 'dlsym'. The actual -// symbol names in the objects are given by the '...AsmSymbol' definitions. -#if defined(__APPLE__) -#define kSnapshotBuildIdCSymbol "kDartSnapshotBuildId" -#define kVmSnapshotDataCSymbol "kDartVmSnapshotData" -#define kVmSnapshotInstructionsCSymbol "kDartVmSnapshotInstructions" -#define kVmSnapshotBssCSymbol "kDartVmSnapshotBss" -#define kIsolateSnapshotDataCSymbol "kDartIsolateSnapshotData" -#define kIsolateSnapshotInstructionsCSymbol "kDartIsolateSnapshotInstructions" -#define kIsolateSnapshotBssCSymbol "kDartIsolateSnapshotBss" -#else -#define kSnapshotBuildIdCSymbol "_kDartSnapshotBuildId" -#define kVmSnapshotDataCSymbol "_kDartVmSnapshotData" -#define kVmSnapshotInstructionsCSymbol "_kDartVmSnapshotInstructions" -#define kVmSnapshotBssCSymbol "_kDartVmSnapshotBss" -#define kIsolateSnapshotDataCSymbol "_kDartIsolateSnapshotData" -#define kIsolateSnapshotInstructionsCSymbol "_kDartIsolateSnapshotInstructions" -#define kIsolateSnapshotBssCSymbol "_kDartIsolateSnapshotBss" -#endif - -#define kSnapshotBuildIdAsmSymbol "_kDartSnapshotBuildId" -#define kVmSnapshotDataAsmSymbol "_kDartVmSnapshotData" -#define kVmSnapshotInstructionsAsmSymbol "_kDartVmSnapshotInstructions" -#define kVmSnapshotBssAsmSymbol "_kDartVmSnapshotBss" -#define kIsolateSnapshotDataAsmSymbol "_kDartIsolateSnapshotData" -#define kIsolateSnapshotInstructionsAsmSymbol \ - "_kDartIsolateSnapshotInstructions" -#define kIsolateSnapshotBssAsmSymbol "_kDartIsolateSnapshotBss" - -/** - * Creates a precompiled snapshot. - * - A root library must have been loaded. - * - Dart_Precompile must have been called. - * - * Outputs an assembly file defining the symbols listed in the definitions - * above. - * - * The assembly should be compiled as a static or shared library and linked or - * loaded by the embedder. Running this snapshot requires a VM compiled with - * DART_PRECOMPILED_SNAPSHOT. The kDartVmSnapshotData and - * kDartVmSnapshotInstructions should be passed to Dart_Initialize. The - * kDartIsolateSnapshotData and kDartIsolateSnapshotInstructions should be - * passed to Dart_CreateIsolateGroup. - * - * The callback will be invoked one or more times to provide the assembly code. - * - * If stripped is true, then the assembly code will not include DWARF - * debugging sections. - * - * If debug_callback_data is provided, debug_callback_data will be used with - * the callback to provide separate debugging information. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_CreateAppAOTSnapshotAsAssembly(Dart_StreamingWriteCallback callback, - void* callback_data, - bool stripped, - void* debug_callback_data); -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_CreateAppAOTSnapshotAsAssemblies( - Dart_CreateLoadingUnitCallback next_callback, - void* next_callback_data, - bool stripped, - Dart_StreamingWriteCallback write_callback, - Dart_StreamingCloseCallback close_callback); - -/** - * Creates a precompiled snapshot. - * - A root library must have been loaded. - * - Dart_Precompile must have been called. - * - * Outputs an ELF shared library defining the symbols - * - _kDartVmSnapshotData - * - _kDartVmSnapshotInstructions - * - _kDartIsolateSnapshotData - * - _kDartIsolateSnapshotInstructions - * - * The shared library should be dynamically loaded by the embedder. - * Running this snapshot requires a VM compiled with DART_PRECOMPILED_SNAPSHOT. - * The kDartVmSnapshotData and kDartVmSnapshotInstructions should be passed to - * Dart_Initialize. The kDartIsolateSnapshotData and - * kDartIsolateSnapshotInstructions should be passed to Dart_CreateIsolate. - * - * The callback will be invoked one or more times to provide the binary output. - * - * If stripped is true, then the binary output will not include DWARF - * debugging sections. - * - * If debug_callback_data is provided, debug_callback_data will be used with - * the callback to provide separate debugging information. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_CreateAppAOTSnapshotAsElf(Dart_StreamingWriteCallback callback, - void* callback_data, - bool stripped, - void* debug_callback_data); -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_CreateAppAOTSnapshotAsElfs(Dart_CreateLoadingUnitCallback next_callback, - void* next_callback_data, - bool stripped, - Dart_StreamingWriteCallback write_callback, - Dart_StreamingCloseCallback close_callback); - -/** - * Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes - * kDartVmSnapshotData and kDartVmSnapshotInstructions. It also does - * not strip DWARF information from the generated assembly or allow for - * separate debug information. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_CreateVMAOTSnapshotAsAssembly(Dart_StreamingWriteCallback callback, - void* callback_data); - -/** - * Sorts the class-ids in depth first traversal order of the inheritance - * tree. This is a costly operation, but it can make method dispatch - * more efficient and is done before writing snapshots. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_SortClasses(); - -/** - * Creates a snapshot that caches compiled code and type feedback for faster - * startup and quicker warmup in a subsequent process. - * - * Outputs a snapshot in two pieces. The pieces should be passed to - * Dart_CreateIsolateGroup in a VM using the same VM snapshot pieces used in the - * current VM. The instructions piece must be loaded with read and execute - * permissions; the data piece may be loaded as read-only. - * - * - Requires the VM to have not been started with --precompilation. - * - Not supported when targeting IA32. - * - The VM writing the snapshot and the VM reading the snapshot must be the - * same version, must be built in the same DEBUG/RELEASE/PRODUCT mode, must - * be targeting the same architecture, and must both be in checked mode or - * both in unchecked mode. - * - * The buffers are scope allocated and are only valid until the next call to - * Dart_ExitScope. - * - * \return A valid handle if no error occurs during the operation. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_CreateAppJITSnapshotAsBlobs(uint8_t** isolate_snapshot_data_buffer, - intptr_t* isolate_snapshot_data_size, - uint8_t** isolate_snapshot_instructions_buffer, - intptr_t* isolate_snapshot_instructions_size); - -/** - * Like Dart_CreateAppJITSnapshotAsBlobs, but also creates a new VM snapshot. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_CreateCoreJITSnapshotAsBlobs( - uint8_t** vm_snapshot_data_buffer, - intptr_t* vm_snapshot_data_size, - uint8_t** vm_snapshot_instructions_buffer, - intptr_t* vm_snapshot_instructions_size, - uint8_t** isolate_snapshot_data_buffer, - intptr_t* isolate_snapshot_data_size, - uint8_t** isolate_snapshot_instructions_buffer, - intptr_t* isolate_snapshot_instructions_size); - -/** - * Get obfuscation map for precompiled code. - * - * Obfuscation map is encoded as a JSON array of pairs (original name, - * obfuscated name). - * - * \return Returns an error handler if the VM was built in a mode that does not - * support obfuscation. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle -Dart_GetObfuscationMap(uint8_t** buffer, intptr_t* buffer_length); - -/** - * Returns whether the VM only supports running from precompiled snapshots and - * not from any other kind of snapshot or from source (that is, the VM was - * compiled with DART_PRECOMPILED_RUNTIME). - */ -DART_EXPORT bool Dart_IsPrecompiledRuntime(); - -/** - * Print a native stack trace. Used for crash handling. - * - * If context is NULL, prints the current stack trace. Otherwise, context - * should be a CONTEXT* (Windows) or ucontext_t* (POSIX) from a signal handler - * running on the current thread. - */ -DART_EXPORT void Dart_DumpNativeStackTrace(void* context); - -/** - * Indicate that the process is about to abort, and the Dart VM should not - * attempt to cleanup resources. - */ -DART_EXPORT void Dart_PrepareToAbort(); - -#endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ diff --git a/pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.c b/pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.c deleted file mode 100644 index c4a68f4449..0000000000 --- a/pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file - * for details. All rights reserved. Use of this source code is governed by a - * BSD-style license that can be found in the LICENSE file. - */ - -#include "dart_api_dl.h" /* NOLINT */ -#include "dart_version.h" /* NOLINT */ -#include "internal/dart_api_dl_impl.h" /* NOLINT */ - -#include - -#define DART_API_DL_DEFINITIONS(name, R, A) name##_Type name##_DL = NULL; - -DART_API_ALL_DL_SYMBOLS(DART_API_DL_DEFINITIONS) - -#undef DART_API_DL_DEFINITIONS - -typedef void* DartApiEntry_function; - -DartApiEntry_function FindFunctionPointer(const DartApiEntry* entries, - const char* name) { - while (entries->name != NULL) { - if (strcmp(entries->name, name) == 0) return entries->function; - entries++; - } - return NULL; -} - -intptr_t Dart_InitializeApiDL(void* data) { - DartApi* dart_api_data = (DartApi*)data; - - if (dart_api_data->major != DART_API_DL_MAJOR_VERSION) { - // If the DartVM we're running on does not have the same version as this - // file was compiled against, refuse to initialize. The symbols are not - // compatible. - return -1; - } - // Minor versions are allowed to be different. - // If the DartVM has a higher minor version, it will provide more symbols - // than we initialize here. - // If the DartVM has a lower minor version, it will not provide all symbols. - // In that case, we leave the missing symbols un-initialized. Those symbols - // should not be used by the Dart and native code. The client is responsible - // for checking the minor version number himself based on which symbols it - // is using. - // (If we would error out on this case, recompiling native code against a - // newer SDK would break all uses on older SDKs, which is too strict.) - - const DartApiEntry* dart_api_function_pointers = dart_api_data->functions; - -#define DART_API_DL_INIT(name, R, A) \ - name##_DL = \ - (name##_Type)(FindFunctionPointer(dart_api_function_pointers, #name)); - DART_API_ALL_DL_SYMBOLS(DART_API_DL_INIT) -#undef DART_API_DL_INIT - - return 0; -} diff --git a/pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.h b/pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.h deleted file mode 100644 index 62f48b63f6..0000000000 --- a/pkgs/cupertino_http/src/dart-sdk/include/dart_api_dl.h +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file - * for details. All rights reserved. Use of this source code is governed by a - * BSD-style license that can be found in the LICENSE file. - */ - -#ifndef RUNTIME_INCLUDE_DART_API_DL_H_ -#define RUNTIME_INCLUDE_DART_API_DL_H_ - -#include "dart_api.h" /* NOLINT */ -#include "dart_native_api.h" /* NOLINT */ - -/** \mainpage Dynamically Linked Dart API - * - * This exposes a subset of symbols from dart_api.h and dart_native_api.h - * available in every Dart embedder through dynamic linking. - * - * All symbols are postfixed with _DL to indicate that they are dynamically - * linked and to prevent conflicts with the original symbol. - * - * Link `dart_api_dl.c` file into your library and invoke - * `Dart_InitializeApiDL` with `NativeApi.initializeApiDLData`. - */ - -DART_EXPORT intptr_t Dart_InitializeApiDL(void* data); - -// ============================================================================ -// IMPORTANT! Never update these signatures without properly updating -// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. -// -// Verbatim copy of `dart_native_api.h` and `dart_api.h` symbol names and types -// to trigger compile-time errors if the sybols in those files are updated -// without updating these. -// -// Function return and argument types, and typedefs are carbon copied. Structs -// are typechecked nominally in C/C++, so they are not copied, instead a -// comment is added to their definition. -typedef int64_t Dart_Port_DL; - -typedef void (*Dart_NativeMessageHandler_DL)(Dart_Port_DL dest_port_id, - Dart_CObject* message); - -// dart_native_api.h symbols can be called on any thread. -#define DART_NATIVE_API_DL_SYMBOLS(F) \ - /***** dart_native_api.h *****/ \ - /* Dart_Port */ \ - F(Dart_PostCObject, bool, (Dart_Port_DL port_id, Dart_CObject * message)) \ - F(Dart_PostInteger, bool, (Dart_Port_DL port_id, int64_t message)) \ - F(Dart_NewNativePort, Dart_Port_DL, \ - (const char* name, Dart_NativeMessageHandler_DL handler, \ - bool handle_concurrently)) \ - F(Dart_CloseNativePort, bool, (Dart_Port_DL native_port_id)) - -// dart_api.h symbols can only be called on Dart threads. -#define DART_API_DL_SYMBOLS(F) \ - /***** dart_api.h *****/ \ - /* Errors */ \ - F(Dart_IsError, bool, (Dart_Handle handle)) \ - F(Dart_IsApiError, bool, (Dart_Handle handle)) \ - F(Dart_IsUnhandledExceptionError, bool, (Dart_Handle handle)) \ - F(Dart_IsCompilationError, bool, (Dart_Handle handle)) \ - F(Dart_IsFatalError, bool, (Dart_Handle handle)) \ - F(Dart_GetError, const char*, (Dart_Handle handle)) \ - F(Dart_ErrorHasException, bool, (Dart_Handle handle)) \ - F(Dart_ErrorGetException, Dart_Handle, (Dart_Handle handle)) \ - F(Dart_ErrorGetStackTrace, Dart_Handle, (Dart_Handle handle)) \ - F(Dart_NewApiError, Dart_Handle, (const char* error)) \ - F(Dart_NewCompilationError, Dart_Handle, (const char* error)) \ - F(Dart_NewUnhandledExceptionError, Dart_Handle, (Dart_Handle exception)) \ - F(Dart_PropagateError, void, (Dart_Handle handle)) \ - /* Dart_Handle, Dart_PersistentHandle, Dart_WeakPersistentHandle */ \ - F(Dart_HandleFromPersistent, Dart_Handle, (Dart_PersistentHandle object)) \ - F(Dart_HandleFromWeakPersistent, Dart_Handle, \ - (Dart_WeakPersistentHandle object)) \ - F(Dart_NewPersistentHandle, Dart_PersistentHandle, (Dart_Handle object)) \ - F(Dart_SetPersistentHandle, void, \ - (Dart_PersistentHandle obj1, Dart_Handle obj2)) \ - F(Dart_DeletePersistentHandle, void, (Dart_PersistentHandle object)) \ - F(Dart_NewWeakPersistentHandle, Dart_WeakPersistentHandle, \ - (Dart_Handle object, void* peer, intptr_t external_allocation_size, \ - Dart_HandleFinalizer callback)) \ - F(Dart_DeleteWeakPersistentHandle, void, (Dart_WeakPersistentHandle object)) \ - F(Dart_UpdateExternalSize, void, \ - (Dart_WeakPersistentHandle object, intptr_t external_allocation_size)) \ - F(Dart_NewFinalizableHandle, Dart_FinalizableHandle, \ - (Dart_Handle object, void* peer, intptr_t external_allocation_size, \ - Dart_HandleFinalizer callback)) \ - F(Dart_DeleteFinalizableHandle, void, \ - (Dart_FinalizableHandle object, Dart_Handle strong_ref_to_object)) \ - F(Dart_UpdateFinalizableExternalSize, void, \ - (Dart_FinalizableHandle object, Dart_Handle strong_ref_to_object, \ - intptr_t external_allocation_size)) \ - /* Dart_Port */ \ - F(Dart_Post, bool, (Dart_Port_DL port_id, Dart_Handle object)) \ - F(Dart_NewSendPort, Dart_Handle, (Dart_Port_DL port_id)) \ - F(Dart_SendPortGetId, Dart_Handle, \ - (Dart_Handle port, Dart_Port_DL * port_id)) \ - /* Scopes */ \ - F(Dart_EnterScope, void, ()) \ - F(Dart_ExitScope, void, ()) - -#define DART_API_ALL_DL_SYMBOLS(F) \ - DART_NATIVE_API_DL_SYMBOLS(F) \ - DART_API_DL_SYMBOLS(F) -// IMPORTANT! Never update these signatures without properly updating -// DART_API_DL_MAJOR_VERSION and DART_API_DL_MINOR_VERSION. -// -// End of verbatim copy. -// ============================================================================ - -// Copy of definition of DART_EXPORT without 'used' attribute. -// -// The 'used' attribute cannot be used with DART_API_ALL_DL_SYMBOLS because -// they are not function declarations, but variable declarations with a -// function pointer type. -// -// The function pointer variables are initialized with the addresses of the -// functions in the VM. If we were to use function declarations instead, we -// would need to forward the call to the VM adding indirection. -#if defined(__CYGWIN__) -#error Tool chain and platform not supported. -#elif defined(_WIN32) -#if defined(DART_SHARED_LIB) -#define DART_EXPORT_DL DART_EXTERN_C __declspec(dllexport) -#else -#define DART_EXPORT_DL DART_EXTERN_C -#endif -#else -#if __GNUC__ >= 4 -#if defined(DART_SHARED_LIB) -#define DART_EXPORT_DL DART_EXTERN_C __attribute__((visibility("default"))) -#else -#define DART_EXPORT_DL DART_EXTERN_C -#endif -#else -#error Tool chain not supported. -#endif -#endif - -#define DART_API_DL_DECLARATIONS(name, R, A) \ - typedef R(*name##_Type) A; \ - DART_EXPORT_DL name##_Type name##_DL; - -DART_API_ALL_DL_SYMBOLS(DART_API_DL_DECLARATIONS) - -#undef DART_API_DL_DECLARATIONS - -#undef DART_EXPORT_DL - -#endif /* RUNTIME_INCLUDE_DART_API_DL_H_ */ /* NOLINT */ \ No newline at end of file diff --git a/pkgs/cupertino_http/src/dart-sdk/include/dart_native_api.h b/pkgs/cupertino_http/src/dart-sdk/include/dart_native_api.h deleted file mode 100644 index f99fff1150..0000000000 --- a/pkgs/cupertino_http/src/dart-sdk/include/dart_native_api.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file - * for details. All rights reserved. Use of this source code is governed by a - * BSD-style license that can be found in the LICENSE file. - */ - -#ifndef RUNTIME_INCLUDE_DART_NATIVE_API_H_ -#define RUNTIME_INCLUDE_DART_NATIVE_API_H_ - -#include "dart_api.h" /* NOLINT */ - -/* - * ========================================== - * Message sending/receiving from native code - * ========================================== - */ - -/** - * A Dart_CObject is used for representing Dart objects as native C - * data outside the Dart heap. These objects are totally detached from - * the Dart heap. Only a subset of the Dart objects have a - * representation as a Dart_CObject. - * - * The string encoding in the 'value.as_string' is UTF-8. - * - * All the different types from dart:typed_data are exposed as type - * kTypedData. The specific type from dart:typed_data is in the type - * field of the as_typed_data structure. The length in the - * as_typed_data structure is always in bytes. - * - * The data for kTypedData is copied on message send and ownership remains with - * the caller. The ownership of data for kExternalTyped is passed to the VM on - * message send and returned when the VM invokes the - * Dart_HandleFinalizer callback; a non-NULL callback must be provided. - */ -typedef enum { - Dart_CObject_kNull = 0, - Dart_CObject_kBool, - Dart_CObject_kInt32, - Dart_CObject_kInt64, - Dart_CObject_kDouble, - Dart_CObject_kString, - Dart_CObject_kArray, - Dart_CObject_kTypedData, - Dart_CObject_kExternalTypedData, - Dart_CObject_kSendPort, - Dart_CObject_kCapability, - Dart_CObject_kNativePointer, - Dart_CObject_kUnsupported, - Dart_CObject_kNumberOfTypes -} Dart_CObject_Type; - -typedef struct _Dart_CObject { - Dart_CObject_Type type; - union { - bool as_bool; - int32_t as_int32; - int64_t as_int64; - double as_double; - char* as_string; - struct { - Dart_Port id; - Dart_Port origin_id; - } as_send_port; - struct { - int64_t id; - } as_capability; - struct { - intptr_t length; - struct _Dart_CObject** values; - } as_array; - struct { - Dart_TypedData_Type type; - intptr_t length; /* in elements, not bytes */ - uint8_t* values; - } as_typed_data; - struct { - Dart_TypedData_Type type; - intptr_t length; /* in elements, not bytes */ - uint8_t* data; - void* peer; - Dart_HandleFinalizer callback; - } as_external_typed_data; - struct { - intptr_t ptr; - intptr_t size; - Dart_HandleFinalizer callback; - } as_native_pointer; - } value; -} Dart_CObject; -// This struct is versioned by DART_API_DL_MAJOR_VERSION, bump the version when -// changing this struct. - -/** - * Posts a message on some port. The message will contain the Dart_CObject - * object graph rooted in 'message'. - * - * While the message is being sent the state of the graph of Dart_CObject - * structures rooted in 'message' should not be accessed, as the message - * generation will make temporary modifications to the data. When the message - * has been sent the graph will be fully restored. - * - * If true is returned, the message was enqueued, and finalizers for external - * typed data will eventually run, even if the receiving isolate shuts down - * before processing the message. If false is returned, the message was not - * enqueued and ownership of external typed data in the message remains with the - * caller. - * - * This function may be called on any thread when the VM is running (that is, - * after Dart_Initialize has returned and before Dart_Cleanup has been called). - * - * \param port_id The destination port. - * \param message The message to send. - * - * \return True if the message was posted. - */ -DART_EXPORT bool Dart_PostCObject(Dart_Port port_id, Dart_CObject* message); - -/** - * Posts a message on some port. The message will contain the integer 'message'. - * - * \param port_id The destination port. - * \param message The message to send. - * - * \return True if the message was posted. - */ -DART_EXPORT bool Dart_PostInteger(Dart_Port port_id, int64_t message); - -/** - * A native message handler. - * - * This handler is associated with a native port by calling - * Dart_NewNativePort. - * - * The message received is decoded into the message structure. The - * lifetime of the message data is controlled by the caller. All the - * data references from the message are allocated by the caller and - * will be reclaimed when returning to it. - */ -typedef void (*Dart_NativeMessageHandler)(Dart_Port dest_port_id, - Dart_CObject* message); - -/** - * Creates a new native port. When messages are received on this - * native port, then they will be dispatched to the provided native - * message handler. - * - * \param name The name of this port in debugging messages. - * \param handler The C handler to run when messages arrive on the port. - * \param handle_concurrently Is it okay to process requests on this - * native port concurrently? - * - * \return If successful, returns the port id for the native port. In - * case of error, returns ILLEGAL_PORT. - */ -DART_EXPORT Dart_Port Dart_NewNativePort(const char* name, - Dart_NativeMessageHandler handler, - bool handle_concurrently); -/* TODO(turnidge): Currently handle_concurrently is ignored. */ - -/** - * Closes the native port with the given id. - * - * The port must have been allocated by a call to Dart_NewNativePort. - * - * \param native_port_id The id of the native port to close. - * - * \return Returns true if the port was closed successfully. - */ -DART_EXPORT bool Dart_CloseNativePort(Dart_Port native_port_id); - -/* - * ================== - * Verification Tools - * ================== - */ - -/** - * Forces all loaded classes and functions to be compiled eagerly in - * the current isolate.. - * - * TODO(turnidge): Document. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_CompileAll(); - -/** - * Finalizes all classes. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT Dart_Handle Dart_FinalizeAllClasses(); - -/* This function is intentionally undocumented. - * - * It should not be used outside internal tests. - */ -DART_EXPORT void* Dart_ExecuteInternalCommand(const char* command, void* arg); - -#endif /* INCLUDE_DART_NATIVE_API_H_ */ /* NOLINT */ diff --git a/pkgs/cupertino_http/src/dart-sdk/include/dart_tools_api.h b/pkgs/cupertino_http/src/dart-sdk/include/dart_tools_api.h deleted file mode 100644 index f36ec6b561..0000000000 --- a/pkgs/cupertino_http/src/dart-sdk/include/dart_tools_api.h +++ /dev/null @@ -1,526 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -#ifndef RUNTIME_INCLUDE_DART_TOOLS_API_H_ -#define RUNTIME_INCLUDE_DART_TOOLS_API_H_ - -#include "dart_api.h" /* NOLINT */ - -/** \mainpage Dart Tools Embedding API Reference - * - * This reference describes the Dart embedding API for tools. Tools include - * a debugger, service protocol, and timeline. - * - * NOTE: The APIs described in this file are unstable and subject to change. - * - * This reference is generated from the header include/dart_tools_api.h. - */ - -/* - * ======== - * Debugger - * ======== - */ - -/** - * ILLEGAL_ISOLATE_ID is a number guaranteed never to be associated with a - * valid isolate. - */ -#define ILLEGAL_ISOLATE_ID ILLEGAL_PORT - - -/* - * ======= - * Service - * ======= - */ - -/** - * A service request callback function. - * - * These callbacks, registered by the embedder, are called when the VM receives - * a service request it can't handle and the service request command name - * matches one of the embedder registered handlers. - * - * The return value of the callback indicates whether the response - * should be used as a regular result or an error result. - * Specifically, if the callback returns true, a regular JSON-RPC - * response is built in the following way: - * - * { - * "jsonrpc": "2.0", - * "result": , - * "id": , - * } - * - * If the callback returns false, a JSON-RPC error is built like this: - * - * { - * "jsonrpc": "2.0", - * "error": , - * "id": , - * } - * - * \param method The rpc method name. - * \param param_keys Service requests can have key-value pair parameters. The - * keys and values are flattened and stored in arrays. - * \param param_values The values associated with the keys. - * \param num_params The length of the param_keys and param_values arrays. - * \param user_data The user_data pointer registered with this handler. - * \param result A C string containing a valid JSON object. The returned - * pointer will be freed by the VM by calling free. - * - * \return True if the result is a regular JSON-RPC response, false if the - * result is a JSON-RPC error. - */ -typedef bool (*Dart_ServiceRequestCallback)(const char* method, - const char** param_keys, - const char** param_values, - intptr_t num_params, - void* user_data, - const char** json_object); - -/** - * Register a Dart_ServiceRequestCallback to be called to handle - * requests for the named rpc on a specific isolate. The callback will - * be invoked with the current isolate set to the request target. - * - * \param method The name of the method that this callback is responsible for. - * \param callback The callback to invoke. - * \param user_data The user data passed to the callback. - * - * NOTE: If multiple callbacks with the same name are registered, only - * the last callback registered will be remembered. - */ -DART_EXPORT void Dart_RegisterIsolateServiceRequestCallback( - const char* method, - Dart_ServiceRequestCallback callback, - void* user_data); - -/** - * Register a Dart_ServiceRequestCallback to be called to handle - * requests for the named rpc. The callback will be invoked without a - * current isolate. - * - * \param method The name of the command that this callback is responsible for. - * \param callback The callback to invoke. - * \param user_data The user data passed to the callback. - * - * NOTE: If multiple callbacks with the same name are registered, only - * the last callback registered will be remembered. - */ -DART_EXPORT void Dart_RegisterRootServiceRequestCallback( - const char* method, - Dart_ServiceRequestCallback callback, - void* user_data); - -/** - * Embedder information which can be requested by the VM for internal or - * reporting purposes. - * - * The pointers in this structure are not going to be cached or freed by the VM. - */ - - #define DART_EMBEDDER_INFORMATION_CURRENT_VERSION (0x00000001) - -typedef struct { - int32_t version; - const char* name; // [optional] The name of the embedder - int64_t current_rss; // [optional] the current RSS of the embedder - int64_t max_rss; // [optional] the maximum RSS of the embedder -} Dart_EmbedderInformation; - -/** - * Callback provided by the embedder that is used by the vm to request - * information. - * - * \return Returns a pointer to a Dart_EmbedderInformation structure. - * The embedder keeps the ownership of the structure and any field in it. - * The embedder must ensure that the structure will remain valid until the - * next invokation of the callback. - */ -typedef void (*Dart_EmbedderInformationCallback)( - Dart_EmbedderInformation* info); - -/** - * Register a Dart_ServiceRequestCallback to be called to handle - * requests for the named rpc. The callback will be invoked without a - * current isolate. - * - * \param method The name of the command that this callback is responsible for. - * \param callback The callback to invoke. - * \param user_data The user data passed to the callback. - * - * NOTE: If multiple callbacks with the same name are registered, only - * the last callback registered will be remembered. - */ -DART_EXPORT void Dart_SetEmbedderInformationCallback( - Dart_EmbedderInformationCallback callback); - -/** - * Invoke a vm-service method and wait for its result. - * - * \param request_json The utf8-encoded json-rpc request. - * \param request_json_length The length of the json-rpc request. - * - * \param response_json The returned utf8-encoded json response, must be - * free()ed by caller. - * \param response_json_length The length of the returned json response. - * \param error An optional error, must be free()ed by caller. - * - * \return Whether the call was sucessfully performed. - * - * NOTE: This method does not need a current isolate and must not have the - * vm-isolate being the current isolate. It must be called after - * Dart_Initialize() and before Dart_Cleanup(). - */ -DART_EXPORT bool Dart_InvokeVMServiceMethod(uint8_t* request_json, - intptr_t request_json_length, - uint8_t** response_json, - intptr_t* response_json_length, - char** error); - -/* - * ======== - * Event Streams - * ======== - */ - -/** - * A callback invoked when the VM service gets a request to listen to - * some stream. - * - * \return Returns true iff the embedder supports the named stream id. - */ -typedef bool (*Dart_ServiceStreamListenCallback)(const char* stream_id); - -/** - * A callback invoked when the VM service gets a request to cancel - * some stream. - */ -typedef void (*Dart_ServiceStreamCancelCallback)(const char* stream_id); - -/** - * Adds VM service stream callbacks. - * - * \param listen_callback A function pointer to a listen callback function. - * A listen callback function should not be already set when this function - * is called. A NULL value removes the existing listen callback function - * if any. - * - * \param cancel_callback A function pointer to a cancel callback function. - * A cancel callback function should not be already set when this function - * is called. A NULL value removes the existing cancel callback function - * if any. - * - * \return Success if the callbacks were added. Otherwise, returns an - * error handle. - */ -DART_EXPORT char* Dart_SetServiceStreamCallbacks( - Dart_ServiceStreamListenCallback listen_callback, - Dart_ServiceStreamCancelCallback cancel_callback); - -/** - * A callback invoked when the VM service receives an event. - */ -typedef void (*Dart_NativeStreamConsumer)(const uint8_t* event_json, - intptr_t event_json_length); - -/** - * Sets the native VM service stream callbacks for a particular stream. - * Note: The function may be called on multiple threads concurrently. - * - * \param consumer A function pointer to an event handler callback function. - * A NULL value removes the existing listen callback function if any. - * - * \param stream_id The ID of the stream on which to set the callback. - */ -DART_EXPORT void Dart_SetNativeServiceStreamCallback( - Dart_NativeStreamConsumer consumer, - const char* stream_id); - -/** - * Sends a data event to clients of the VM Service. - * - * A data event is used to pass an array of bytes to subscribed VM - * Service clients. For example, in the standalone embedder, this is - * function used to provide WriteEvents on the Stdout and Stderr - * streams. - * - * If the embedder passes in a stream id for which no client is - * subscribed, then the event is ignored. - * - * \param stream_id The id of the stream on which to post the event. - * - * \param event_kind A string identifying what kind of event this is. - * For example, 'WriteEvent'. - * - * \param bytes A pointer to an array of bytes. - * - * \param bytes_length The length of the byte array. - * - * \return NULL if the arguments are well formed. Otherwise, returns an - * error string. The caller is responsible for freeing the error message. - */ -DART_EXPORT char* Dart_ServiceSendDataEvent(const char* stream_id, - const char* event_kind, - const uint8_t* bytes, - intptr_t bytes_length); - -/** - * Usage statistics for a space/generation at a particular moment in time. - * - * \param used Amount of memory used, in bytes. - * - * \param capacity Memory capacity, in bytes. - * - * \param external External memory, in bytes. - * - * \param collections How many times the garbage collector has run in this - * space. - * - * \param time Cumulative time spent collecting garbage in this space, in - * seconds. - * - * \param avg_collection_period Average time between garbage collector running - * in this space, in milliseconds. - */ -typedef struct { - intptr_t used; - intptr_t capacity; - intptr_t external; - intptr_t collections; - double time; - double avg_collection_period; -} Dart_GCStats; - -/** - * A Garbage Collection event with memory usage statistics. - * - * \param type The event type. Static lifetime. - * - * \param reason The reason for the GC event. Static lifetime. - * - * \param new_space Data for New Space. - * - * \param old_space Data for Old Space. - */ -typedef struct { - const char* type; - const char* reason; - const char* isolate_id; - - Dart_GCStats new_space; - Dart_GCStats old_space; -} Dart_GCEvent; - -/** - * A callback invoked when the VM emits a GC event. - * - * \param event The GC event data. Pointer only valid for the duration of the - * callback. - */ -typedef void (*Dart_GCEventCallback)(Dart_GCEvent* event); - -/** - * Sets the native GC event callback. - * - * \param callback A function pointer to an event handler callback function. - * A NULL value removes the existing listen callback function if any. - */ -DART_EXPORT void Dart_SetGCEventCallback(Dart_GCEventCallback callback); - -/* - * ======== - * Reload support - * ======== - * - * These functions are used to implement reloading in the Dart VM. - * This is an experimental feature, so embedders should be prepared - * for these functions to change. - */ - -/** - * A callback which determines whether the file at some url has been - * modified since some time. If the file cannot be found, true should - * be returned. - */ -typedef bool (*Dart_FileModifiedCallback)(const char* url, int64_t since); - -DART_EXPORT char* Dart_SetFileModifiedCallback( - Dart_FileModifiedCallback file_modified_callback); - -/** - * Returns true if isolate is currently reloading. - */ -DART_EXPORT bool Dart_IsReloading(); - -/* - * ======== - * Timeline - * ======== - */ - -/** - * Returns a timestamp in microseconds. This timestamp is suitable for - * passing into the timeline system, and uses the same monotonic clock - * as dart:developer's Timeline.now. - * - * \return A timestamp that can be passed to the timeline system. - */ -DART_EXPORT int64_t Dart_TimelineGetMicros(); - -/** - * Returns a raw timestamp in from the monotonic clock. - * - * \return A raw timestamp from the monotonic clock. - */ -DART_EXPORT int64_t Dart_TimelineGetTicks(); - -/** - * Returns the frequency of the monotonic clock. - * - * \return The frequency of the monotonic clock. - */ -DART_EXPORT int64_t Dart_TimelineGetTicksFrequency(); - -typedef enum { - Dart_Timeline_Event_Begin, // Phase = 'B'. - Dart_Timeline_Event_End, // Phase = 'E'. - Dart_Timeline_Event_Instant, // Phase = 'i'. - Dart_Timeline_Event_Duration, // Phase = 'X'. - Dart_Timeline_Event_Async_Begin, // Phase = 'b'. - Dart_Timeline_Event_Async_End, // Phase = 'e'. - Dart_Timeline_Event_Async_Instant, // Phase = 'n'. - Dart_Timeline_Event_Counter, // Phase = 'C'. - Dart_Timeline_Event_Flow_Begin, // Phase = 's'. - Dart_Timeline_Event_Flow_Step, // Phase = 't'. - Dart_Timeline_Event_Flow_End, // Phase = 'f'. -} Dart_Timeline_Event_Type; - -/** - * Add a timeline event to the embedder stream. - * - * \param label The name of the event. Its lifetime must extend at least until - * Dart_Cleanup. - * \param timestamp0 The first timestamp of the event. - * \param timestamp1_or_async_id The second timestamp of the event or - * the async id. - * \param argument_count The number of argument names and values. - * \param argument_names An array of names of the arguments. The lifetime of the - * names must extend at least until Dart_Cleanup. The array may be reclaimed - * when this call returns. - * \param argument_values An array of values of the arguments. The values and - * the array may be reclaimed when this call returns. - */ -DART_EXPORT void Dart_TimelineEvent(const char* label, - int64_t timestamp0, - int64_t timestamp1_or_async_id, - Dart_Timeline_Event_Type type, - intptr_t argument_count, - const char** argument_names, - const char** argument_values); - -/** - * Associates a name with the current thread. This name will be used to name - * threads in the timeline. Can only be called after a call to Dart_Initialize. - * - * \param name The name of the thread. - */ -DART_EXPORT void Dart_SetThreadName(const char* name); - -/* - * ======= - * Metrics - * ======= - */ - -/** - * Return metrics gathered for the VM and individual isolates. - * - * NOTE: Non-heap metrics are not available in PRODUCT builds of Dart. - * Calling the non-heap metric functions on a PRODUCT build might return invalid metrics. - */ -DART_EXPORT int64_t Dart_VMIsolateCountMetric(); // Counter -DART_EXPORT int64_t Dart_VMCurrentRSSMetric(); // Byte -DART_EXPORT int64_t Dart_VMPeakRSSMetric(); // Byte -DART_EXPORT int64_t -Dart_IsolateHeapOldUsedMetric(Dart_Isolate isolate); // Byte -DART_EXPORT int64_t -Dart_IsolateHeapOldUsedMaxMetric(Dart_Isolate isolate); // Byte -DART_EXPORT int64_t -Dart_IsolateHeapOldCapacityMetric(Dart_Isolate isolate); // Byte -DART_EXPORT int64_t -Dart_IsolateHeapOldCapacityMaxMetric(Dart_Isolate isolate); // Byte -DART_EXPORT int64_t -Dart_IsolateHeapOldExternalMetric(Dart_Isolate isolate); // Byte -DART_EXPORT int64_t -Dart_IsolateHeapNewUsedMetric(Dart_Isolate isolate); // Byte -DART_EXPORT int64_t -Dart_IsolateHeapNewUsedMaxMetric(Dart_Isolate isolate); // Byte -DART_EXPORT int64_t -Dart_IsolateHeapNewCapacityMetric(Dart_Isolate isolate); // Byte -DART_EXPORT int64_t -Dart_IsolateHeapNewCapacityMaxMetric(Dart_Isolate isolate); // Byte -DART_EXPORT int64_t -Dart_IsolateHeapNewExternalMetric(Dart_Isolate isolate); // Byte -DART_EXPORT int64_t -Dart_IsolateHeapGlobalUsedMetric(Dart_Isolate isolate); // Byte -DART_EXPORT int64_t -Dart_IsolateHeapGlobalUsedMaxMetric(Dart_Isolate isolate); // Byte -DART_EXPORT int64_t -Dart_IsolateRunnableLatencyMetric(Dart_Isolate isolate); // Microsecond -DART_EXPORT int64_t -Dart_IsolateRunnableHeapSizeMetric(Dart_Isolate isolate); // Byte - -/* - * ======== - * UserTags - * ======== - */ - -/* - * Gets the current isolate's currently set UserTag instance. - * - * \return The currently set UserTag instance. - */ -DART_EXPORT Dart_Handle Dart_GetCurrentUserTag(); - -/* - * Gets the current isolate's default UserTag instance. - * - * \return The default UserTag with label 'Default' - */ -DART_EXPORT Dart_Handle Dart_GetDefaultUserTag(); - -/* - * Creates a new UserTag instance. - * - * \param label The name of the new UserTag. - * - * \return The newly created UserTag instance or an error handle. - */ -DART_EXPORT Dart_Handle Dart_NewUserTag(const char* label); - -/* - * Updates the current isolate's UserTag to a new value. - * - * \param user_tag The UserTag to be set as the current UserTag. - * - * \return The previously set UserTag instance or an error handle. - */ -DART_EXPORT Dart_Handle Dart_SetCurrentUserTag(Dart_Handle user_tag); - -/* - * Returns the label of a given UserTag instance. - * - * \param user_tag The UserTag from which the label will be retrieved. - * - * \return The UserTag's label. NULL if the user_tag is invalid. The caller is - * responsible for freeing the returned label. - */ -DART_EXPORT DART_WARN_UNUSED_RESULT char* Dart_GetUserTagLabel( - Dart_Handle user_tag); - -#endif // RUNTIME_INCLUDE_DART_TOOLS_API_H_ diff --git a/pkgs/cupertino_http/src/dart-sdk/include/dart_version.h b/pkgs/cupertino_http/src/dart-sdk/include/dart_version.h deleted file mode 100644 index b3b4924392..0000000000 --- a/pkgs/cupertino_http/src/dart-sdk/include/dart_version.h +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file - * for details. All rights reserved. Use of this source code is governed by a - * BSD-style license that can be found in the LICENSE file. - */ - -#ifndef RUNTIME_INCLUDE_DART_VERSION_H_ -#define RUNTIME_INCLUDE_DART_VERSION_H_ - -// On breaking changes the major version is increased. -// On backwards compatible changes the minor version is increased. -// The versioning covers the symbols exposed in dart_api_dl.h -#define DART_API_DL_MAJOR_VERSION 2 -#define DART_API_DL_MINOR_VERSION 0 - -#endif /* RUNTIME_INCLUDE_DART_VERSION_H_ */ /* NOLINT */ diff --git a/pkgs/cupertino_http/src/dart-sdk/include/internal/dart_api_dl_impl.h b/pkgs/cupertino_http/src/dart-sdk/include/internal/dart_api_dl_impl.h deleted file mode 100644 index ad13a4b811..0000000000 --- a/pkgs/cupertino_http/src/dart-sdk/include/internal/dart_api_dl_impl.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file - * for details. All rights reserved. Use of this source code is governed by a - * BSD-style license that can be found in the LICENSE file. - */ - -#ifndef RUNTIME_INCLUDE_INTERNAL_DART_API_DL_IMPL_H_ -#define RUNTIME_INCLUDE_INTERNAL_DART_API_DL_IMPL_H_ - -typedef struct { - const char* name; - void (*function)(); -} DartApiEntry; - -typedef struct { - const int major; - const int minor; - const DartApiEntry* const functions; -} DartApi; - -#endif /* RUNTIME_INCLUDE_INTERNAL_DART_API_DL_IMPL_H_ */ /* NOLINT */ diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 8c37cff9b1..06eb639ef4 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -9,7 +9,7 @@ topics: - protocols environment: - sdk: ^3.3.0 + sdk: ^3.4.0 dependencies: async: ^2.5.0 diff --git a/pkgs/http_client_conformance_tests/pubspec.yaml b/pkgs/http_client_conformance_tests/pubspec.yaml index ae2662b693..74d165e6f9 100644 --- a/pkgs/http_client_conformance_tests/pubspec.yaml +++ b/pkgs/http_client_conformance_tests/pubspec.yaml @@ -7,7 +7,7 @@ repository: https://github.com/dart-lang/http/tree/master/pkgs/http_client_confo publish_to: none environment: - sdk: ^3.2.0 + sdk: ^3.4.0 dependencies: async: ^2.8.2 diff --git a/pkgs/web_socket/pubspec.yaml b/pkgs/web_socket/pubspec.yaml index 9c0cab597f..57d243ed80 100644 --- a/pkgs/web_socket/pubspec.yaml +++ b/pkgs/web_socket/pubspec.yaml @@ -6,7 +6,7 @@ repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket version: 0.1.6 environment: - sdk: ^3.3.0 + sdk: ^3.4.0 dependencies: web: '>=0.5.0 <2.0.0' diff --git a/pkgs/web_socket_conformance_tests/bin/generate_server_wrappers.dart b/pkgs/web_socket_conformance_tests/bin/generate_server_wrappers.dart index 546d795688..045b7ba3f5 100644 --- a/pkgs/web_socket_conformance_tests/bin/generate_server_wrappers.dart +++ b/pkgs/web_socket_conformance_tests/bin/generate_server_wrappers.dart @@ -37,8 +37,8 @@ Future> startServer() async => spawnHybridUri(Uri( void main() async { final files = await Directory('lib/src').list().toList(); - final formatter = DartFormatter( - languageVersion: DartFormatter.latestLanguageVersion); + final formatter = + DartFormatter(languageVersion: DartFormatter.latestLanguageVersion); files.where((file) => file.path.endsWith('_server.dart')).forEach((file) { final vmPath = file.path.replaceAll('_server.dart', '_server_vm.dart'); diff --git a/pkgs/web_socket_conformance_tests/pubspec.yaml b/pkgs/web_socket_conformance_tests/pubspec.yaml index 84329c461e..d7b64f2e36 100644 --- a/pkgs/web_socket_conformance_tests/pubspec.yaml +++ b/pkgs/web_socket_conformance_tests/pubspec.yaml @@ -7,12 +7,12 @@ repository: https://github.com/dart-lang/http/tree/master/pkgs/web_socket_confor publish_to: none environment: - sdk: ^3.3.0 + sdk: ^3.4.0 dependencies: async: ^2.11.0 crypto: ^3.0.3 - dart_style: ^2.3.4 + dart_style: ^2.3.7 stream_channel: ^2.1.2 test: ^1.24.0 web_socket: ^0.1.0 diff --git a/tool/ci.sh b/tool/ci.sh index 864885d1fe..133b358da3 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.6.1 +# Created with package:mono_repo v6.6.2 # Support built in commands on windows out of the box. From b88ccb85ec222370c2bb43b0443563b8fa4bf208 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Thu, 24 Oct 2024 13:06:59 -0700 Subject: [PATCH 435/448] Remove package:java_http (#1389) --- .github/workflows/java.yml | 48 - pkgs/java_http/.gitattributes | 5 - pkgs/java_http/.gitignore | 3 - pkgs/java_http/CHANGELOG.md | 3 - pkgs/java_http/LICENSE | 27 - pkgs/java_http/README.md | 25 - pkgs/java_http/analysis_options.yaml | 5 - pkgs/java_http/example/java_http_example.dart | 12 - pkgs/java_http/jnigen.yaml | 21 - pkgs/java_http/lib/java_http.dart | 6 - pkgs/java_http/lib/src/java_client.dart | 291 ------ pkgs/java_http/lib/src/java_http_base.dart | 9 - .../java/io/BufferedInputStream.dart | 248 ------ .../src/third_party/java/io/InputStream.dart | 226 ----- .../src/third_party/java/io/OutputStream.dart | 136 --- .../lib/src/third_party/java/io/_package.dart | 3 - .../lib/src/third_party/java/lang/System.dart | 466 ---------- .../src/third_party/java/lang/_package.dart | 1 - .../java/net/HttpURLConnection.dart | 523 ----------- .../lib/src/third_party/java/net/URL.dart | 403 --------- .../third_party/java/net/URLConnection.dart | 836 ------------------ .../src/third_party/java/net/_package.dart | 3 - pkgs/java_http/pubspec.yaml | 23 - pkgs/java_http/test/java_client_test.dart | 20 - 24 files changed, 3343 deletions(-) delete mode 100644 .github/workflows/java.yml delete mode 100644 pkgs/java_http/.gitattributes delete mode 100644 pkgs/java_http/.gitignore delete mode 100644 pkgs/java_http/CHANGELOG.md delete mode 100644 pkgs/java_http/LICENSE delete mode 100644 pkgs/java_http/README.md delete mode 100644 pkgs/java_http/analysis_options.yaml delete mode 100644 pkgs/java_http/example/java_http_example.dart delete mode 100644 pkgs/java_http/jnigen.yaml delete mode 100644 pkgs/java_http/lib/java_http.dart delete mode 100644 pkgs/java_http/lib/src/java_client.dart delete mode 100644 pkgs/java_http/lib/src/java_http_base.dart delete mode 100644 pkgs/java_http/lib/src/third_party/java/io/BufferedInputStream.dart delete mode 100644 pkgs/java_http/lib/src/third_party/java/io/InputStream.dart delete mode 100644 pkgs/java_http/lib/src/third_party/java/io/OutputStream.dart delete mode 100644 pkgs/java_http/lib/src/third_party/java/io/_package.dart delete mode 100644 pkgs/java_http/lib/src/third_party/java/lang/System.dart delete mode 100644 pkgs/java_http/lib/src/third_party/java/lang/_package.dart delete mode 100644 pkgs/java_http/lib/src/third_party/java/net/HttpURLConnection.dart delete mode 100644 pkgs/java_http/lib/src/third_party/java/net/URL.dart delete mode 100644 pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart delete mode 100644 pkgs/java_http/lib/src/third_party/java/net/_package.dart delete mode 100644 pkgs/java_http/pubspec.yaml delete mode 100644 pkgs/java_http/test/java_client_test.dart diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml deleted file mode 100644 index f9ae20d336..0000000000 --- a/.github/workflows/java.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: package:java_http CI - -on: - push: - branches: - - main - - master - paths: - - '.github/workflows/java.yml' - - 'pkgs/http_client_conformance_tests/**' - - 'pkgs/java_http/**' - pull_request: - paths: - - '.github/workflows/java.yml' - - 'pkgs/http_client_conformance_tests/**' - - 'pkgs/java_http/**' - schedule: - # Runs every Sunday at midnight (00:00 UTC). - - cron: "0 0 * * 0" - -env: - PUB_ENVIRONMENT: bot.github - -jobs: - verify: - name: Format & Analyze & Test - runs-on: ubuntu-latest - defaults: - run: - working-directory: pkgs/java_http - steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 - with: - channel: 'stable' - - id: install - name: Install dependencies - run: dart pub get - - name: Check formatting - run: dart format --output=none --set-exit-if-changed . - if: always() && steps.install.outcome == 'success' - - name: Analyze code - run: dart analyze --fatal-infos - if: always() && steps.install.outcome == 'success' - - name: Build jni dynamic libraries - run: dart run jni:setup - - name: Run tests - run: dart test diff --git a/pkgs/java_http/.gitattributes b/pkgs/java_http/.gitattributes deleted file mode 100644 index 9def68ab79..0000000000 --- a/pkgs/java_http/.gitattributes +++ /dev/null @@ -1,5 +0,0 @@ -# Vendored code is excluded from language stats in the GitHub repo. -lib/src/third_party/** linguist-vendored - -# jnigen generated code is hidden in GitHub diffs. -lib/src/third_party/java/** linguist-generated diff --git a/pkgs/java_http/.gitignore b/pkgs/java_http/.gitignore deleted file mode 100644 index 28e4a6c94b..0000000000 --- a/pkgs/java_http/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -build/ -.flutter-plugins -.flutter-plugins-dependencies diff --git a/pkgs/java_http/CHANGELOG.md b/pkgs/java_http/CHANGELOG.md deleted file mode 100644 index 65e52db74c..0000000000 --- a/pkgs/java_http/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## 0.0.1 - -- Initial development release. diff --git a/pkgs/java_http/LICENSE b/pkgs/java_http/LICENSE deleted file mode 100644 index cf6aefe5df..0000000000 --- a/pkgs/java_http/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2023, the Dart project authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - * Neither the name of Google LLC nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/pkgs/java_http/README.md b/pkgs/java_http/README.md deleted file mode 100644 index 5f54bd298b..0000000000 --- a/pkgs/java_http/README.md +++ /dev/null @@ -1,25 +0,0 @@ -A Dart package for making HTTP requests using native Java APIs -([java.net.HttpURLConnection](https://docs.oracle.com/javase/8/docs/api/java/net/HttpURLConnection.html)). - -Using native Java APIs has several advantages on Android: - - * Support for `KeyStore` `PrivateKey`s ([#50669](https://github.com/dart-lang/sdk/issues/50669)) - * Support for the system proxy ([#50434](https://github.com/dart-lang/sdk/issues/50434)) - * Support for user-installed certificates ([#50435](https://github.com/dart-lang/sdk/issues/50435)) - -## Status: Experimental - -**NOTE**: This package is currently experimental and published under the -[labs.dart.dev](https://dart.dev/dart-team-packages) pub publisher in order to -solicit feedback. - -For packages in the labs.dart.dev publisher we generally plan to either graduate -the package into a supported publisher (dart.dev, tools.dart.dev) after a period -of feedback and iteration, or discontinue the package. These packages have a -much higher expected rate of API and breaking changes. - -Your feedback is valuable and will help us evolve this package. -For general feedback and suggestions please comment in the -[feedback issue](https://github.com/dart-lang/http/issues/764). -For bugs, please file an issue in the -[bug tracker](https://github.com/dart-lang/http/issues). \ No newline at end of file diff --git a/pkgs/java_http/analysis_options.yaml b/pkgs/java_http/analysis_options.yaml deleted file mode 100644 index 1bff4c9f23..0000000000 --- a/pkgs/java_http/analysis_options.yaml +++ /dev/null @@ -1,5 +0,0 @@ -include: ../../analysis_options.yaml - -analyzer: - exclude: - - lib/src/third_party/** diff --git a/pkgs/java_http/example/java_http_example.dart b/pkgs/java_http/example/java_http_example.dart deleted file mode 100644 index 8b5e33d6f5..0000000000 --- a/pkgs/java_http/example/java_http_example.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// This code was generated by the Dart create command with the package template. - -import 'package:java_http/java_http.dart'; - -void main() { - var awesome = Awesome(); - print('awesome: ${awesome.isAwesome}'); -} diff --git a/pkgs/java_http/jnigen.yaml b/pkgs/java_http/jnigen.yaml deleted file mode 100644 index a99320fc26..0000000000 --- a/pkgs/java_http/jnigen.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# Regenerate bindings with `dart run jnigen --config jnigen.yaml`. - -summarizer: - backend: asm - -output: - bindings_type: dart_only - dart: - path: 'lib/src/third_party/' - -class_path: - - 'classes.jar' - -classes: - - 'java.io.BufferedInputStream' - - 'java.io.InputStream' - - 'java.io.OutputStream' - - 'java.lang.System' - - 'java.net.HttpURLConnection' - - 'java.net.URL' - - 'java.net.URLConnection' diff --git a/pkgs/java_http/lib/java_http.dart b/pkgs/java_http/lib/java_http.dart deleted file mode 100644 index 743aa40223..0000000000 --- a/pkgs/java_http/lib/java_http.dart +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -export 'src/java_client.dart'; -export 'src/java_http_base.dart'; diff --git a/pkgs/java_http/lib/src/java_client.dart b/pkgs/java_http/lib/src/java_client.dart deleted file mode 100644 index 379c640b1d..0000000000 --- a/pkgs/java_http/lib/src/java_client.dart +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -import 'dart:async'; -import 'dart:io'; -import 'dart:isolate'; -import 'dart:typed_data'; - -import 'package:async/async.dart'; -import 'package:http/http.dart'; -import 'package:jni/jni.dart'; -import 'package:path/path.dart'; - -import 'third_party/java/io/BufferedInputStream.dart'; -import 'third_party/java/lang/System.dart'; -import 'third_party/java/net/HttpURLConnection.dart'; -import 'third_party/java/net/URL.dart'; - -final _digitRegex = RegExp(r'^\d+$'); - -// TODO: Add a description of the implementation. -// Look at the description of cronet_client.dart and cupertino_client.dart for -// examples. -// See https://github.com/dart-lang/http/pull/980#discussion_r1253697461. -class JavaClient extends BaseClient { - void _initJVM() { - if (!Platform.isAndroid) { - Jni.spawnIfNotExists(dylibDir: join('build', 'jni_libs')); - } - - // TODO: Determine if we can remove this. - // It's a workaround to fix the tests not passing on GitHub CI. - // See https://github.com/dart-lang/http/pull/987#issuecomment-1636170371. - System.setProperty( - 'java.net.preferIPv6Addresses'.toJString(), 'true'.toJString()); - } - - @override - Future send(BaseRequest request) async { - // TODO: Move the call to _initJVM() to the JavaClient constructor. - // See https://github.com/dart-lang/http/pull/980#discussion_r1253700470. - _initJVM(); - - final receivePort = ReceivePort(); - final events = StreamQueue(receivePort); - - // We can't send a StreamedRequest to another Isolate. - // But we can send Map, String, UInt8List, Uri. - final isolateRequest = ( - sendPort: receivePort.sendPort, - url: request.url, - method: request.method, - headers: request.headers, - body: await request.finalize().toBytes(), - ); - - // Could create a new class to hold the data for the isolate instead - // of using a record. - await Isolate.spawn(_isolateMethod, isolateRequest); - - final statusCodeEvent = await events.next; - late int statusCode; - if (statusCodeEvent is ClientException) { - // Do we need to close the ReceivePort here as well? - receivePort.close(); - throw statusCodeEvent; - } else { - statusCode = statusCodeEvent as int; - } - - final reasonPhrase = await events.next as String?; - final responseHeaders = await events.next as Map; - - Stream> responseBodyStream(Stream events) async* { - try { - await for (final event in events) { - if (event is List) { - yield event; - } else if (event is ClientException) { - throw event; - } else if (event == null) { - return; - } - } - } finally { - // TODO: Should we kill the isolate here? - receivePort.close(); - } - } - - return StreamedResponse(responseBodyStream(events.rest), statusCode, - contentLength: _parseContentLengthHeader(request.url, responseHeaders), - request: request, - headers: responseHeaders, - reasonPhrase: reasonPhrase); - } - - // TODO: Rename _isolateMethod to something more descriptive. - Future _isolateMethod( - ({ - SendPort sendPort, - Uint8List body, - Map headers, - String method, - Uri url, - }) request, - ) async { - final httpUrlConnection = URL - .ctor3(request.url.toString().toJString()) - .openConnection() - .castTo(HttpURLConnection.type, deleteOriginal: true); - - request.headers.forEach((headerName, headerValue) { - httpUrlConnection.setRequestProperty( - headerName.toJString(), headerValue.toJString()); - }); - - httpUrlConnection.setRequestMethod(request.method.toJString()); - _setRequestBody(httpUrlConnection, request.body); - - try { - final statusCode = _statusCode(request.url, httpUrlConnection); - request.sendPort.send(statusCode); - } on ClientException catch (e) { - request.sendPort.send(e); - httpUrlConnection.disconnect(); - return; - } - - final reasonPhrase = _reasonPhrase(httpUrlConnection); - request.sendPort.send(reasonPhrase); - - final responseHeaders = _responseHeaders(httpUrlConnection); - request.sendPort.send(responseHeaders); - - // TODO: Throws a ClientException if the content length header is invalid. - // I think we need to send the ClientException over the SendPort. - final contentLengthHeader = _parseContentLengthHeader( - request.url, - responseHeaders, - ); - - await _responseBody( - request.url, - httpUrlConnection, - request.sendPort, - contentLengthHeader, - ); - - httpUrlConnection.disconnect(); - - // Signals to the receiving isolate that we are done sending events. - request.sendPort.send(null); - } - - void _setRequestBody( - HttpURLConnection httpUrlConnection, - Uint8List requestBody, - ) { - if (requestBody.isEmpty) return; - - httpUrlConnection.setDoOutput(true); - - httpUrlConnection.getOutputStream() - ..write1(requestBody.toJArray()) - ..flush() - ..close(); - } - - int _statusCode(Uri requestUrl, HttpURLConnection httpUrlConnection) { - final statusCode = httpUrlConnection.getResponseCode(); - - if (statusCode == -1) { - throw ClientException( - 'Status code can not be discerned from the response.', requestUrl); - } - - return statusCode; - } - - String? _reasonPhrase(HttpURLConnection httpUrlConnection) { - final reasonPhrase = httpUrlConnection.getResponseMessage(); - - return reasonPhrase.isNull - ? null - : reasonPhrase.toDartString(deleteOriginal: true); - } - - Map _responseHeaders(HttpURLConnection httpUrlConnection) { - final headers = >{}; - - for (var i = 0;; i++) { - final headerName = httpUrlConnection.getHeaderFieldKey(i); - final headerValue = httpUrlConnection.getHeaderField1(i); - - // If the header name and header value are both null then we have reached - // the end of the response headers. - if (headerName.isNull && headerValue.isNull) break; - - // The HTTP response header status line is returned as a header field - // where the field key is null and the field is the status line. - // Other package:http implementations don't include the status line as a - // header. So we don't add the status line to the headers. - if (headerName.isNull) continue; - - headers - .putIfAbsent(headerName.toDartString().toLowerCase(), () => []) - .add(headerValue.toDartString()); - } - - return headers.map((key, value) => MapEntry(key, value.join(','))); - } - - int? _parseContentLengthHeader( - Uri requestUrl, - Map headers, - ) { - int? contentLength; - switch (headers['content-length']) { - case final contentLengthHeader? - when !_digitRegex.hasMatch(contentLengthHeader): - throw ClientException( - 'Invalid content-length header [$contentLengthHeader].', - requestUrl, - ); - case final contentLengthHeader?: - contentLength = int.parse(contentLengthHeader); - } - - return contentLength; - } - - Future _responseBody( - Uri requestUrl, - HttpURLConnection httpUrlConnection, - SendPort sendPort, - int? expectedBodyLength, - ) async { - final responseCode = httpUrlConnection.getResponseCode(); - - final responseBodyStream = (responseCode >= 200 && responseCode <= 299) - ? BufferedInputStream(httpUrlConnection.getInputStream()) - : BufferedInputStream(httpUrlConnection.getErrorStream()); - - var actualBodyLength = 0; - final bytesBuffer = JArray(jbyte.type, 4096); - - while (true) { - // TODO: read1() could throw IOException. - final bytesCount = - responseBodyStream.read1(bytesBuffer, 0, bytesBuffer.length); - - if (bytesCount == -1) { - break; - } - - if (bytesCount == 0) { - // No more data is available without blocking so give other Isolates an - // opportunity to run. - await Future.delayed(Duration.zero); - continue; - } - - sendPort.send(bytesBuffer.toUint8List(length: bytesCount)); - actualBodyLength += bytesCount; - } - - if (expectedBodyLength != null && actualBodyLength < expectedBodyLength) { - sendPort.send(ClientException('Unexpected end of body', requestUrl)); - } - - responseBodyStream.close(); - } -} - -extension on Uint8List { - JArray toJArray() => - JArray(jbyte.type, length)..setRange(0, length, this); -} - -extension on JArray { - Uint8List toUint8List({int? length}) { - length ??= this.length; - final list = Uint8List(length); - for (var i = 0; i < length; i++) { - list[i] = this[i]; - } - return list; - } -} diff --git a/pkgs/java_http/lib/src/java_http_base.dart b/pkgs/java_http/lib/src/java_http_base.dart deleted file mode 100644 index 8660e18936..0000000000 --- a/pkgs/java_http/lib/src/java_http_base.dart +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -// This code was generated by the Dart create command with the package template. - -class Awesome { - bool get isAwesome => true; -} diff --git a/pkgs/java_http/lib/src/third_party/java/io/BufferedInputStream.dart b/pkgs/java_http/lib/src/third_party/java/io/BufferedInputStream.dart deleted file mode 100644 index c732e12b0c..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/io/BufferedInputStream.dart +++ /dev/null @@ -1,248 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: file_names -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_shown_name - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "InputStream.dart" as inputstream_; - -/// from: java.io.BufferedInputStream -class BufferedInputStream extends jni.JObject { - @override - late final jni.JObjType $type = type; - - BufferedInputStream.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/io/BufferedInputStream"); - - /// The type which includes information such as the signature of this class. - static const type = $BufferedInputStreamType(); - static final _id_buf = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"buf", - r"[B", - ); - - /// from: protected byte[] buf - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JArray get buf => - const jni.JArrayType(jni.jbyteType()).fromRef(jni.Jni.accessors - .getField(reference, _id_buf, jni.JniCallType.objectType) - .object); - - /// from: protected byte[] buf - /// The returned object must be deleted after use, by calling the `delete` method. - set buf(jni.JArray value) => - jni.Jni.env.SetObjectField(reference, _id_buf, value.reference); - - static final _id_count = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"count", - r"I", - ); - - /// from: protected int count - int get count => jni.Jni.accessors - .getField(reference, _id_count, jni.JniCallType.intType) - .integer; - - /// from: protected int count - set count(int value) => jni.Jni.env.SetIntField(reference, _id_count, value); - - static final _id_pos = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"pos", - r"I", - ); - - /// from: protected int pos - int get pos => jni.Jni.accessors - .getField(reference, _id_pos, jni.JniCallType.intType) - .integer; - - /// from: protected int pos - set pos(int value) => jni.Jni.env.SetIntField(reference, _id_pos, value); - - static final _id_markpos = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"markpos", - r"I", - ); - - /// from: protected int markpos - int get markpos => jni.Jni.accessors - .getField(reference, _id_markpos, jni.JniCallType.intType) - .integer; - - /// from: protected int markpos - set markpos(int value) => - jni.Jni.env.SetIntField(reference, _id_markpos, value); - - static final _id_marklimit = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"marklimit", - r"I", - ); - - /// from: protected int marklimit - int get marklimit => jni.Jni.accessors - .getField(reference, _id_marklimit, jni.JniCallType.intType) - .integer; - - /// from: protected int marklimit - set marklimit(int value) => - jni.Jni.env.SetIntField(reference, _id_marklimit, value); - - static final _id_ctor = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"", r"(Ljava/io/InputStream;)V"); - - /// from: public void (java.io.InputStream inputStream) - /// The returned object must be deleted after use, by calling the `delete` method. - factory BufferedInputStream( - inputstream_.InputStream inputStream, - ) { - return BufferedInputStream.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_ctor, [inputStream.reference]).object); - } - - static final _id_ctor1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"", r"(Ljava/io/InputStream;I)V"); - - /// from: public void (java.io.InputStream inputStream, int i) - /// The returned object must be deleted after use, by calling the `delete` method. - factory BufferedInputStream.ctor1( - inputstream_.InputStream inputStream, - int i, - ) { - return BufferedInputStream.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, - _id_ctor1, - [inputStream.reference, jni.JValueInt(i)]).object); - } - - static final _id_read = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"()I"); - - /// from: public int read() - int read() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_read, jni.JniCallType.intType, []).integer; - } - - static final _id_read1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"([BII)I"); - - /// from: public int read(byte[] bs, int i, int i1) - int read1( - jni.JArray bs, - int i, - int i1, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_read1, - jni.JniCallType.intType, - [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).integer; - } - - static final _id_skip = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"skip", r"(J)J"); - - /// from: public long skip(long j) - int skip( - int j, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_skip, jni.JniCallType.longType, [j]).long; - } - - static final _id_available = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"available", r"()I"); - - /// from: public int available() - int available() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_available, jni.JniCallType.intType, []).integer; - } - - static final _id_mark = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"mark", r"(I)V"); - - /// from: public void mark(int i) - void mark( - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_mark, - jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); - } - - static final _id_reset = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"reset", r"()V"); - - /// from: public void reset() - void reset() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_reset, jni.JniCallType.voidType, []).check(); - } - - static final _id_markSupported = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"markSupported", r"()Z"); - - /// from: public boolean markSupported() - bool markSupported() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_markSupported, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_close = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"close", r"()V"); - - /// from: public void close() - void close() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_close, jni.JniCallType.voidType, []).check(); - } -} - -class $BufferedInputStreamType extends jni.JObjType { - const $BufferedInputStreamType(); - - @override - String get signature => r"Ljava/io/BufferedInputStream;"; - - @override - BufferedInputStream fromRef(jni.JObjectPtr ref) => - BufferedInputStream.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($BufferedInputStreamType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($BufferedInputStreamType) && - other is $BufferedInputStreamType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart b/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart deleted file mode 100644 index 3b930d49cd..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/io/InputStream.dart +++ /dev/null @@ -1,226 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: file_names -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_shown_name - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "OutputStream.dart" as outputstream_; - -/// from: java.io.InputStream -class InputStream extends jni.JObject { - @override - late final jni.JObjType $type = type; - - InputStream.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/io/InputStream"); - - /// The type which includes information such as the signature of this class. - static const type = $InputStreamType(); - static final _id_ctor = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"", r"()V"); - - /// from: public void () - /// The returned object must be deleted after use, by calling the `delete` method. - factory InputStream() { - return InputStream.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_ctor, []).object); - } - - static final _id_nullInputStream = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"nullInputStream", r"()Ljava/io/InputStream;"); - - /// from: static public java.io.InputStream nullInputStream() - /// The returned object must be deleted after use, by calling the `delete` method. - static InputStream nullInputStream() { - return const $InputStreamType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_nullInputStream, - jni.JniCallType.objectType, []).object); - } - - static final _id_read = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"()I"); - - /// from: public abstract int read() - int read() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_read, jni.JniCallType.intType, []).integer; - } - - static final _id_read1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"([B)I"); - - /// from: public int read(byte[] bs) - int read1( - jni.JArray bs, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_read1, jni.JniCallType.intType, [bs.reference]).integer; - } - - static final _id_read2 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"read", r"([BII)I"); - - /// from: public int read(byte[] bs, int i, int i1) - int read2( - jni.JArray bs, - int i, - int i1, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_read2, - jni.JniCallType.intType, - [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).integer; - } - - static final _id_readAllBytes = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"readAllBytes", r"()[B"); - - /// from: public byte[] readAllBytes() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JArray readAllBytes() { - return const jni.JArrayType(jni.jbyteType()).fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_readAllBytes, - jni.JniCallType.objectType, []).object); - } - - static final _id_readNBytes = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"readNBytes", r"(I)[B"); - - /// from: public byte[] readNBytes(int i) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JArray readNBytes( - int i, - ) { - return const jni.JArrayType(jni.jbyteType()).fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_readNBytes, - jni.JniCallType.objectType, [jni.JValueInt(i)]).object); - } - - static final _id_readNBytes1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"readNBytes", r"([BII)I"); - - /// from: public int readNBytes(byte[] bs, int i, int i1) - int readNBytes1( - jni.JArray bs, - int i, - int i1, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_readNBytes1, - jni.JniCallType.intType, - [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).integer; - } - - static final _id_skip = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"skip", r"(J)J"); - - /// from: public long skip(long j) - int skip( - int j, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_skip, jni.JniCallType.longType, [j]).long; - } - - static final _id_available = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"available", r"()I"); - - /// from: public int available() - int available() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_available, jni.JniCallType.intType, []).integer; - } - - static final _id_close = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"close", r"()V"); - - /// from: public void close() - void close() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_close, jni.JniCallType.voidType, []).check(); - } - - static final _id_mark = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"mark", r"(I)V"); - - /// from: public void mark(int i) - void mark( - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_mark, - jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); - } - - static final _id_reset = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"reset", r"()V"); - - /// from: public void reset() - void reset() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_reset, jni.JniCallType.voidType, []).check(); - } - - static final _id_markSupported = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"markSupported", r"()Z"); - - /// from: public boolean markSupported() - bool markSupported() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_markSupported, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_transferTo = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"transferTo", r"(Ljava/io/OutputStream;)J"); - - /// from: public long transferTo(java.io.OutputStream outputStream) - int transferTo( - outputstream_.OutputStream outputStream, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_transferTo, - jni.JniCallType.longType, [outputStream.reference]).long; - } -} - -class $InputStreamType extends jni.JObjType { - const $InputStreamType(); - - @override - String get signature => r"Ljava/io/InputStream;"; - - @override - InputStream fromRef(jni.JObjectPtr ref) => InputStream.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($InputStreamType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($InputStreamType) && other is $InputStreamType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/io/OutputStream.dart b/pkgs/java_http/lib/src/third_party/java/io/OutputStream.dart deleted file mode 100644 index ce4966c0aa..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/io/OutputStream.dart +++ /dev/null @@ -1,136 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: file_names -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_shown_name - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -/// from: java.io.OutputStream -class OutputStream extends jni.JObject { - @override - late final jni.JObjType $type = type; - - OutputStream.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/io/OutputStream"); - - /// The type which includes information such as the signature of this class. - static const type = $OutputStreamType(); - static final _id_ctor = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"", r"()V"); - - /// from: public void () - /// The returned object must be deleted after use, by calling the `delete` method. - factory OutputStream() { - return OutputStream.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_ctor, []).object); - } - - static final _id_nullOutputStream = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"nullOutputStream", r"()Ljava/io/OutputStream;"); - - /// from: static public java.io.OutputStream nullOutputStream() - /// The returned object must be deleted after use, by calling the `delete` method. - static OutputStream nullOutputStream() { - return const $OutputStreamType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_nullOutputStream, - jni.JniCallType.objectType, []).object); - } - - static final _id_write = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"write", r"(I)V"); - - /// from: public abstract void write(int i) - void write( - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_write, - jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); - } - - static final _id_write1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"write", r"([B)V"); - - /// from: public void write(byte[] bs) - void write1( - jni.JArray bs, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_write1, - jni.JniCallType.voidType, [bs.reference]).check(); - } - - static final _id_write2 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"write", r"([BII)V"); - - /// from: public void write(byte[] bs, int i, int i1) - void write2( - jni.JArray bs, - int i, - int i1, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_write2, - jni.JniCallType.voidType, - [bs.reference, jni.JValueInt(i), jni.JValueInt(i1)]).check(); - } - - static final _id_flush = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"flush", r"()V"); - - /// from: public void flush() - void flush() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_flush, jni.JniCallType.voidType, []).check(); - } - - static final _id_close = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"close", r"()V"); - - /// from: public void close() - void close() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_close, jni.JniCallType.voidType, []).check(); - } -} - -class $OutputStreamType extends jni.JObjType { - const $OutputStreamType(); - - @override - String get signature => r"Ljava/io/OutputStream;"; - - @override - OutputStream fromRef(jni.JObjectPtr ref) => OutputStream.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($OutputStreamType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($OutputStreamType) && - other is $OutputStreamType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/io/_package.dart b/pkgs/java_http/lib/src/third_party/java/io/_package.dart deleted file mode 100644 index a25d6e85d2..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/io/_package.dart +++ /dev/null @@ -1,3 +0,0 @@ -export "BufferedInputStream.dart"; -export "InputStream.dart"; -export "OutputStream.dart"; diff --git a/pkgs/java_http/lib/src/third_party/java/lang/System.dart b/pkgs/java_http/lib/src/third_party/java/lang/System.dart deleted file mode 100644 index 42b3b860d6..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/lang/System.dart +++ /dev/null @@ -1,466 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: file_names -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_shown_name - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "../io/InputStream.dart" as inputstream_; - -/// from: java.lang.System -class System extends jni.JObject { - @override - late final jni.JObjType $type = type; - - System.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/lang/System"); - - /// The type which includes information such as the signature of this class. - static const type = $SystemType(); - static final _id_in0 = jni.Jni.accessors.getStaticFieldIDOf( - _class.reference, - r"in", - r"Ljava/io/InputStream;", - ); - - /// from: static public final java.io.InputStream in - /// The returned object must be deleted after use, by calling the `delete` method. - static inputstream_.InputStream get in0 => - const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors - .getStaticField(_class.reference, _id_in0, jni.JniCallType.objectType) - .object); - - static final _id_out = jni.Jni.accessors.getStaticFieldIDOf( - _class.reference, - r"out", - r"Ljava/io/PrintStream;", - ); - - /// from: static public final java.io.PrintStream out - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject get out => - const jni.JObjectType().fromRef(jni.Jni.accessors - .getStaticField(_class.reference, _id_out, jni.JniCallType.objectType) - .object); - - static final _id_err = jni.Jni.accessors.getStaticFieldIDOf( - _class.reference, - r"err", - r"Ljava/io/PrintStream;", - ); - - /// from: static public final java.io.PrintStream err - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject get err => - const jni.JObjectType().fromRef(jni.Jni.accessors - .getStaticField(_class.reference, _id_err, jni.JniCallType.objectType) - .object); - - static final _id_setIn = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"setIn", r"(Ljava/io/InputStream;)V"); - - /// from: static public void setIn(java.io.InputStream inputStream) - static void setIn( - inputstream_.InputStream inputStream, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_setIn, jni.JniCallType.voidType, [inputStream.reference]).check(); - } - - static final _id_setOut = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"setOut", r"(Ljava/io/PrintStream;)V"); - - /// from: static public void setOut(java.io.PrintStream printStream) - static void setOut( - jni.JObject printStream, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_setOut, jni.JniCallType.voidType, [printStream.reference]).check(); - } - - static final _id_setErr = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"setErr", r"(Ljava/io/PrintStream;)V"); - - /// from: static public void setErr(java.io.PrintStream printStream) - static void setErr( - jni.JObject printStream, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_setErr, jni.JniCallType.voidType, [printStream.reference]).check(); - } - - static final _id_console = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"console", r"()Ljava/io/Console;"); - - /// from: static public java.io.Console console() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject console() { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_console, - jni.JniCallType.objectType, []).object); - } - - static final _id_inheritedChannel = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"inheritedChannel", r"()Ljava/nio/channels/Channel;"); - - /// from: static public java.nio.channels.Channel inheritedChannel() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject inheritedChannel() { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_inheritedChannel, - jni.JniCallType.objectType, []).object); - } - - static final _id_setSecurityManager = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"setSecurityManager", - r"(Ljava/lang/SecurityManager;)V"); - - /// from: static public void setSecurityManager(java.lang.SecurityManager securityManager) - static void setSecurityManager( - jni.JObject securityManager, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setSecurityManager, - jni.JniCallType.voidType, - [securityManager.reference]).check(); - } - - static final _id_getSecurityManager = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"getSecurityManager", - r"()Ljava/lang/SecurityManager;"); - - /// from: static public java.lang.SecurityManager getSecurityManager() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject getSecurityManager() { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_getSecurityManager, - jni.JniCallType.objectType, []).object); - } - - static final _id_currentTimeMillis = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"currentTimeMillis", r"()J"); - - /// from: static public native long currentTimeMillis() - static int currentTimeMillis() { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_currentTimeMillis, jni.JniCallType.longType, []).long; - } - - static final _id_nanoTime = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"nanoTime", r"()J"); - - /// from: static public native long nanoTime() - static int nanoTime() { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, _id_nanoTime, jni.JniCallType.longType, []).long; - } - - static final _id_arraycopy = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"arraycopy", - r"(Ljava/lang/Object;ILjava/lang/Object;II)V"); - - /// from: static public native void arraycopy(java.lang.Object object, int i, java.lang.Object object1, int i1, int i2) - static void arraycopy( - jni.JObject object, - int i, - jni.JObject object1, - int i1, - int i2, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, _id_arraycopy, jni.JniCallType.voidType, [ - object.reference, - jni.JValueInt(i), - object1.reference, - jni.JValueInt(i1), - jni.JValueInt(i2) - ]).check(); - } - - static final _id_identityHashCode = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"identityHashCode", r"(Ljava/lang/Object;)I"); - - /// from: static public native int identityHashCode(java.lang.Object object) - static int identityHashCode( - jni.JObject object, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_identityHashCode, - jni.JniCallType.intType, - [object.reference]).integer; - } - - static final _id_getProperties = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"getProperties", r"()Ljava/util/Properties;"); - - /// from: static public java.util.Properties getProperties() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject getProperties() { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_getProperties, - jni.JniCallType.objectType, []).object); - } - - static final _id_lineSeparator = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"lineSeparator", r"()Ljava/lang/String;"); - - /// from: static public java.lang.String lineSeparator() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString lineSeparator() { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_lineSeparator, - jni.JniCallType.objectType, []).object); - } - - static final _id_setProperties = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"setProperties", r"(Ljava/util/Properties;)V"); - - /// from: static public void setProperties(java.util.Properties properties) - static void setProperties( - jni.JObject properties, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setProperties, - jni.JniCallType.voidType, - [properties.reference]).check(); - } - - static final _id_getProperty = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"getProperty", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String getProperty(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString getProperty( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_getProperty, - jni.JniCallType.objectType, [string.reference]).object); - } - - static final _id_getProperty1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"getProperty", - r"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String getProperty(java.lang.String string, java.lang.String string1) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString getProperty1( - jni.JString string, - jni.JString string1, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_getProperty1, - jni.JniCallType.objectType, - [string.reference, string1.reference]).object); - } - - static final _id_setProperty = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"setProperty", - r"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String setProperty(java.lang.String string, java.lang.String string1) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString setProperty( - jni.JString string, - jni.JString string1, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_setProperty, - jni.JniCallType.objectType, - [string.reference, string1.reference]).object); - } - - static final _id_clearProperty = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"clearProperty", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String clearProperty(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString clearProperty( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_clearProperty, - jni.JniCallType.objectType, [string.reference]).object); - } - - static final _id_getenv = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"getenv", r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String getenv(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString getenv( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_getenv, - jni.JniCallType.objectType, [string.reference]).object); - } - - static final _id_getenv1 = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"getenv", r"()Ljava/util/Map;"); - - /// from: static public java.util.Map getenv() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JMap getenv1() { - return const jni.JMapType(jni.JStringType(), jni.JStringType()).fromRef( - jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_getenv1, jni.JniCallType.objectType, []).object); - } - - static final _id_getLogger = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"getLogger", - r"(Ljava/lang/String;)Ljava/lang/System$Logger;"); - - /// from: static public java.lang.System$Logger getLogger(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject getLogger( - jni.JString string, - ) { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_getLogger, - jni.JniCallType.objectType, [string.reference]).object); - } - - static final _id_getLogger1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"getLogger", - r"(Ljava/lang/String;Ljava/util/ResourceBundle;)Ljava/lang/System$Logger;"); - - /// from: static public java.lang.System$Logger getLogger(java.lang.String string, java.util.ResourceBundle resourceBundle) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject getLogger1( - jni.JString string, - jni.JObject resourceBundle, - ) { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_getLogger1, - jni.JniCallType.objectType, - [string.reference, resourceBundle.reference]).object); - } - - static final _id_exit = - jni.Jni.accessors.getStaticMethodIDOf(_class.reference, r"exit", r"(I)V"); - - /// from: static public void exit(int i) - static void exit( - int i, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_exit, jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); - } - - static final _id_gc = - jni.Jni.accessors.getStaticMethodIDOf(_class.reference, r"gc", r"()V"); - - /// from: static public void gc() - static void gc() { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, _id_gc, jni.JniCallType.voidType, []).check(); - } - - static final _id_runFinalization = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"runFinalization", r"()V"); - - /// from: static public void runFinalization() - static void runFinalization() { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_runFinalization, jni.JniCallType.voidType, []).check(); - } - - static final _id_load = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"load", r"(Ljava/lang/String;)V"); - - /// from: static public void load(java.lang.String string) - static void load( - jni.JString string, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_load, jni.JniCallType.voidType, [string.reference]).check(); - } - - static final _id_loadLibrary = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"loadLibrary", r"(Ljava/lang/String;)V"); - - /// from: static public void loadLibrary(java.lang.String string) - static void loadLibrary( - jni.JString string, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_loadLibrary, jni.JniCallType.voidType, [string.reference]).check(); - } - - static final _id_mapLibraryName = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, - r"mapLibraryName", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public native java.lang.String mapLibraryName(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString mapLibraryName( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_mapLibraryName, - jni.JniCallType.objectType, [string.reference]).object); - } -} - -class $SystemType extends jni.JObjType { - const $SystemType(); - - @override - String get signature => r"Ljava/lang/System;"; - - @override - System fromRef(jni.JObjectPtr ref) => System.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($SystemType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($SystemType) && other is $SystemType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/lang/_package.dart b/pkgs/java_http/lib/src/third_party/java/lang/_package.dart deleted file mode 100644 index b468ec065d..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/lang/_package.dart +++ /dev/null @@ -1 +0,0 @@ -export "System.dart"; diff --git a/pkgs/java_http/lib/src/third_party/java/net/HttpURLConnection.dart b/pkgs/java_http/lib/src/third_party/java/net/HttpURLConnection.dart deleted file mode 100644 index ba1954b02d..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/net/HttpURLConnection.dart +++ /dev/null @@ -1,523 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: file_names -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_shown_name - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "URLConnection.dart" as urlconnection_; - -import "URL.dart" as url_; - -import "../io/InputStream.dart" as inputstream_; - -/// from: java.net.HttpURLConnection -class HttpURLConnection extends urlconnection_.URLConnection { - @override - late final jni.JObjType $type = type; - - HttpURLConnection.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/net/HttpURLConnection"); - - /// The type which includes information such as the signature of this class. - static const type = $HttpURLConnectionType(); - static final _id_method = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"method", - r"Ljava/lang/String;", - ); - - /// from: protected java.lang.String method - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString get method => const jni.JStringType().fromRef(jni.Jni.accessors - .getField(reference, _id_method, jni.JniCallType.objectType) - .object); - - /// from: protected java.lang.String method - /// The returned object must be deleted after use, by calling the `delete` method. - set method(jni.JString value) => - jni.Jni.env.SetObjectField(reference, _id_method, value.reference); - - static final _id_chunkLength = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"chunkLength", - r"I", - ); - - /// from: protected int chunkLength - int get chunkLength => jni.Jni.accessors - .getField(reference, _id_chunkLength, jni.JniCallType.intType) - .integer; - - /// from: protected int chunkLength - set chunkLength(int value) => - jni.Jni.env.SetIntField(reference, _id_chunkLength, value); - - static final _id_fixedContentLength = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"fixedContentLength", - r"I", - ); - - /// from: protected int fixedContentLength - int get fixedContentLength => jni.Jni.accessors - .getField(reference, _id_fixedContentLength, jni.JniCallType.intType) - .integer; - - /// from: protected int fixedContentLength - set fixedContentLength(int value) => - jni.Jni.env.SetIntField(reference, _id_fixedContentLength, value); - - static final _id_fixedContentLengthLong = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"fixedContentLengthLong", - r"J", - ); - - /// from: protected long fixedContentLengthLong - int get fixedContentLengthLong => jni.Jni.accessors - .getField(reference, _id_fixedContentLengthLong, jni.JniCallType.longType) - .long; - - /// from: protected long fixedContentLengthLong - set fixedContentLengthLong(int value) => - jni.Jni.env.SetLongField(reference, _id_fixedContentLengthLong, value); - - static final _id_responseCode = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"responseCode", - r"I", - ); - - /// from: protected int responseCode - int get responseCode => jni.Jni.accessors - .getField(reference, _id_responseCode, jni.JniCallType.intType) - .integer; - - /// from: protected int responseCode - set responseCode(int value) => - jni.Jni.env.SetIntField(reference, _id_responseCode, value); - - static final _id_responseMessage = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"responseMessage", - r"Ljava/lang/String;", - ); - - /// from: protected java.lang.String responseMessage - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString get responseMessage => - const jni.JStringType().fromRef(jni.Jni.accessors - .getField(reference, _id_responseMessage, jni.JniCallType.objectType) - .object); - - /// from: protected java.lang.String responseMessage - /// The returned object must be deleted after use, by calling the `delete` method. - set responseMessage(jni.JString value) => jni.Jni.env - .SetObjectField(reference, _id_responseMessage, value.reference); - - static final _id_instanceFollowRedirects = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"instanceFollowRedirects", - r"Z", - ); - - /// from: protected boolean instanceFollowRedirects - bool get instanceFollowRedirects => jni.Jni.accessors - .getField( - reference, _id_instanceFollowRedirects, jni.JniCallType.booleanType) - .boolean; - - /// from: protected boolean instanceFollowRedirects - set instanceFollowRedirects(bool value) => jni.Jni.env - .SetBooleanField(reference, _id_instanceFollowRedirects, value ? 1 : 0); - - /// from: static public final int HTTP_OK - static const HTTP_OK = 200; - - /// from: static public final int HTTP_CREATED - static const HTTP_CREATED = 201; - - /// from: static public final int HTTP_ACCEPTED - static const HTTP_ACCEPTED = 202; - - /// from: static public final int HTTP_NOT_AUTHORITATIVE - static const HTTP_NOT_AUTHORITATIVE = 203; - - /// from: static public final int HTTP_NO_CONTENT - static const HTTP_NO_CONTENT = 204; - - /// from: static public final int HTTP_RESET - static const HTTP_RESET = 205; - - /// from: static public final int HTTP_PARTIAL - static const HTTP_PARTIAL = 206; - - /// from: static public final int HTTP_MULT_CHOICE - static const HTTP_MULT_CHOICE = 300; - - /// from: static public final int HTTP_MOVED_PERM - static const HTTP_MOVED_PERM = 301; - - /// from: static public final int HTTP_MOVED_TEMP - static const HTTP_MOVED_TEMP = 302; - - /// from: static public final int HTTP_SEE_OTHER - static const HTTP_SEE_OTHER = 303; - - /// from: static public final int HTTP_NOT_MODIFIED - static const HTTP_NOT_MODIFIED = 304; - - /// from: static public final int HTTP_USE_PROXY - static const HTTP_USE_PROXY = 305; - - /// from: static public final int HTTP_BAD_REQUEST - static const HTTP_BAD_REQUEST = 400; - - /// from: static public final int HTTP_UNAUTHORIZED - static const HTTP_UNAUTHORIZED = 401; - - /// from: static public final int HTTP_PAYMENT_REQUIRED - static const HTTP_PAYMENT_REQUIRED = 402; - - /// from: static public final int HTTP_FORBIDDEN - static const HTTP_FORBIDDEN = 403; - - /// from: static public final int HTTP_NOT_FOUND - static const HTTP_NOT_FOUND = 404; - - /// from: static public final int HTTP_BAD_METHOD - static const HTTP_BAD_METHOD = 405; - - /// from: static public final int HTTP_NOT_ACCEPTABLE - static const HTTP_NOT_ACCEPTABLE = 406; - - /// from: static public final int HTTP_PROXY_AUTH - static const HTTP_PROXY_AUTH = 407; - - /// from: static public final int HTTP_CLIENT_TIMEOUT - static const HTTP_CLIENT_TIMEOUT = 408; - - /// from: static public final int HTTP_CONFLICT - static const HTTP_CONFLICT = 409; - - /// from: static public final int HTTP_GONE - static const HTTP_GONE = 410; - - /// from: static public final int HTTP_LENGTH_REQUIRED - static const HTTP_LENGTH_REQUIRED = 411; - - /// from: static public final int HTTP_PRECON_FAILED - static const HTTP_PRECON_FAILED = 412; - - /// from: static public final int HTTP_ENTITY_TOO_LARGE - static const HTTP_ENTITY_TOO_LARGE = 413; - - /// from: static public final int HTTP_REQ_TOO_LONG - static const HTTP_REQ_TOO_LONG = 414; - - /// from: static public final int HTTP_UNSUPPORTED_TYPE - static const HTTP_UNSUPPORTED_TYPE = 415; - - /// from: static public final int HTTP_SERVER_ERROR - static const HTTP_SERVER_ERROR = 500; - - /// from: static public final int HTTP_INTERNAL_ERROR - static const HTTP_INTERNAL_ERROR = 500; - - /// from: static public final int HTTP_NOT_IMPLEMENTED - static const HTTP_NOT_IMPLEMENTED = 501; - - /// from: static public final int HTTP_BAD_GATEWAY - static const HTTP_BAD_GATEWAY = 502; - - /// from: static public final int HTTP_UNAVAILABLE - static const HTTP_UNAVAILABLE = 503; - - /// from: static public final int HTTP_GATEWAY_TIMEOUT - static const HTTP_GATEWAY_TIMEOUT = 504; - - /// from: static public final int HTTP_VERSION - static const HTTP_VERSION = 505; - - static final _id_setAuthenticator = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"setAuthenticator", r"(Ljava/net/Authenticator;)V"); - - /// from: public void setAuthenticator(java.net.Authenticator authenticator) - void setAuthenticator( - jni.JObject authenticator, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_setAuthenticator, - jni.JniCallType.voidType, [authenticator.reference]).check(); - } - - static final _id_getHeaderFieldKey = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getHeaderFieldKey", r"(I)Ljava/lang/String;"); - - /// from: public java.lang.String getHeaderFieldKey(int i) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getHeaderFieldKey( - int i, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHeaderFieldKey, - jni.JniCallType.objectType, - [jni.JValueInt(i)]).object); - } - - static final _id_setFixedLengthStreamingMode = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setFixedLengthStreamingMode", r"(I)V"); - - /// from: public void setFixedLengthStreamingMode(int i) - void setFixedLengthStreamingMode( - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_setFixedLengthStreamingMode, - jni.JniCallType.voidType, - [jni.JValueInt(i)]).check(); - } - - static final _id_setFixedLengthStreamingMode1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setFixedLengthStreamingMode", r"(J)V"); - - /// from: public void setFixedLengthStreamingMode(long j) - void setFixedLengthStreamingMode1( - int j, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_setFixedLengthStreamingMode1, - jni.JniCallType.voidType, - [j]).check(); - } - - static final _id_setChunkedStreamingMode = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setChunkedStreamingMode", r"(I)V"); - - /// from: public void setChunkedStreamingMode(int i) - void setChunkedStreamingMode( - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_setChunkedStreamingMode, - jni.JniCallType.voidType, - [jni.JValueInt(i)]).check(); - } - - static final _id_getHeaderField1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getHeaderField", r"(I)Ljava/lang/String;"); - - /// from: public java.lang.String getHeaderField(int i) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getHeaderField1( - int i, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHeaderField1, - jni.JniCallType.objectType, - [jni.JValueInt(i)]).object); - } - - static final _id_ctor = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"", r"(Ljava/net/URL;)V"); - - /// from: protected void (java.net.URL uRL) - /// The returned object must be deleted after use, by calling the `delete` method. - factory HttpURLConnection( - url_.URL uRL, - ) { - return HttpURLConnection.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_ctor, [uRL.reference]).object); - } - - static final _id_setFollowRedirects = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"setFollowRedirects", r"(Z)V"); - - /// from: static public void setFollowRedirects(boolean z) - static void setFollowRedirects( - bool z, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_setFollowRedirects, jni.JniCallType.voidType, [z ? 1 : 0]).check(); - } - - static final _id_getFollowRedirects = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"getFollowRedirects", r"()Z"); - - /// from: static public boolean getFollowRedirects() - static bool getFollowRedirects() { - return jni.Jni.accessors.callStaticMethodWithArgs(_class.reference, - _id_getFollowRedirects, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setInstanceFollowRedirects = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setInstanceFollowRedirects", r"(Z)V"); - - /// from: public void setInstanceFollowRedirects(boolean z) - void setInstanceFollowRedirects( - bool z, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_setInstanceFollowRedirects, - jni.JniCallType.voidType, - [z ? 1 : 0]).check(); - } - - static final _id_getInstanceFollowRedirects = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getInstanceFollowRedirects", r"()Z"); - - /// from: public boolean getInstanceFollowRedirects() - bool getInstanceFollowRedirects() { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getInstanceFollowRedirects, - jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setRequestMethod = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"setRequestMethod", r"(Ljava/lang/String;)V"); - - /// from: public void setRequestMethod(java.lang.String string) - void setRequestMethod( - jni.JString string, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_setRequestMethod, - jni.JniCallType.voidType, [string.reference]).check(); - } - - static final _id_getRequestMethod = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getRequestMethod", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getRequestMethod() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getRequestMethod() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getRequestMethod, - jni.JniCallType.objectType, []).object); - } - - static final _id_getResponseCode = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getResponseCode", r"()I"); - - /// from: public int getResponseCode() - int getResponseCode() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getResponseCode, jni.JniCallType.intType, []).integer; - } - - static final _id_getResponseMessage = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getResponseMessage", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getResponseMessage() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getResponseMessage() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getResponseMessage, - jni.JniCallType.objectType, []).object); - } - - static final _id_getHeaderFieldDate = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getHeaderFieldDate", r"(Ljava/lang/String;J)J"); - - /// from: public long getHeaderFieldDate(java.lang.String string, long j) - int getHeaderFieldDate( - jni.JString string, - int j, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHeaderFieldDate, - jni.JniCallType.longType, - [string.reference, j]).long; - } - - static final _id_disconnect = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"disconnect", r"()V"); - - /// from: public abstract void disconnect() - void disconnect() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_disconnect, jni.JniCallType.voidType, []).check(); - } - - static final _id_usingProxy = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"usingProxy", r"()Z"); - - /// from: public abstract boolean usingProxy() - bool usingProxy() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_usingProxy, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_getPermission = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getPermission", r"()Ljava/security/Permission;"); - - /// from: public java.security.Permission getPermission() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject getPermission() { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getPermission, jni.JniCallType.objectType, []).object); - } - - static final _id_getErrorStream = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getErrorStream", r"()Ljava/io/InputStream;"); - - /// from: public java.io.InputStream getErrorStream() - /// The returned object must be deleted after use, by calling the `delete` method. - inputstream_.InputStream getErrorStream() { - return const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_getErrorStream, - jni.JniCallType.objectType, []).object); - } -} - -class $HttpURLConnectionType extends jni.JObjType { - const $HttpURLConnectionType(); - - @override - String get signature => r"Ljava/net/HttpURLConnection;"; - - @override - HttpURLConnection fromRef(jni.JObjectPtr ref) => - HttpURLConnection.fromRef(ref); - - @override - jni.JObjType get superType => const urlconnection_.$URLConnectionType(); - - @override - final superCount = 2; - - @override - int get hashCode => ($HttpURLConnectionType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($HttpURLConnectionType) && - other is $HttpURLConnectionType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/net/URL.dart b/pkgs/java_http/lib/src/third_party/java/net/URL.dart deleted file mode 100644 index 3c6e5e6ba6..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/net/URL.dart +++ /dev/null @@ -1,403 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: file_names -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_shown_name - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "URLConnection.dart" as urlconnection_; - -import "../io/InputStream.dart" as inputstream_; - -/// from: java.net.URL -class URL extends jni.JObject { - @override - late final jni.JObjType $type = type; - - URL.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/net/URL"); - - /// The type which includes information such as the signature of this class. - static const type = $URLType(); - static final _id_ctor = jni.Jni.accessors.getMethodIDOf(_class.reference, - r"", r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V"); - - /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URL( - jni.JString string, - jni.JString string1, - int i, - jni.JString string2, - ) { - return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_ctor, [ - string.reference, - string1.reference, - jni.JValueInt(i), - string2.reference - ]).object); - } - - static final _id_ctor1 = jni.Jni.accessors.getMethodIDOf(_class.reference, - r"", r"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"); - - /// from: public void (java.lang.String string, java.lang.String string1, java.lang.String string2) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URL.ctor1( - jni.JString string, - jni.JString string1, - jni.JString string2, - ) { - return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, - _id_ctor1, - [string.reference, string1.reference, string2.reference]).object); - } - - static final _id_ctor2 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"", - r"(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/net/URLStreamHandler;)V"); - - /// from: public void (java.lang.String string, java.lang.String string1, int i, java.lang.String string2, java.net.URLStreamHandler uRLStreamHandler) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URL.ctor2( - jni.JString string, - jni.JString string1, - int i, - jni.JString string2, - jni.JObject uRLStreamHandler, - ) { - return URL.fromRef( - jni.Jni.accessors.newObjectWithArgs(_class.reference, _id_ctor2, [ - string.reference, - string1.reference, - jni.JValueInt(i), - string2.reference, - uRLStreamHandler.reference - ]).object); - } - - static final _id_ctor3 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"", r"(Ljava/lang/String;)V"); - - /// from: public void (java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URL.ctor3( - jni.JString string, - ) { - return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_ctor3, [string.reference]).object); - } - - static final _id_ctor4 = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"", r"(Ljava/net/URL;Ljava/lang/String;)V"); - - /// from: public void (java.net.URL uRL, java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URL.ctor4( - URL uRL, - jni.JString string, - ) { - return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, _id_ctor4, [uRL.reference, string.reference]).object); - } - - static final _id_ctor5 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"", - r"(Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V"); - - /// from: public void (java.net.URL uRL, java.lang.String string, java.net.URLStreamHandler uRLStreamHandler) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URL.ctor5( - URL uRL, - jni.JString string, - jni.JObject uRLStreamHandler, - ) { - return URL.fromRef(jni.Jni.accessors.newObjectWithArgs( - _class.reference, - _id_ctor5, - [uRL.reference, string.reference, uRLStreamHandler.reference]).object); - } - - static final _id_getQuery = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getQuery", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getQuery() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getQuery() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getQuery, jni.JniCallType.objectType, []).object); - } - - static final _id_getPath = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getPath", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getPath() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getPath() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getPath, jni.JniCallType.objectType, []).object); - } - - static final _id_getUserInfo = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getUserInfo", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getUserInfo() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getUserInfo() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getUserInfo, jni.JniCallType.objectType, []).object); - } - - static final _id_getAuthority = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getAuthority", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getAuthority() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getAuthority() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getAuthority, jni.JniCallType.objectType, []).object); - } - - static final _id_getPort = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"getPort", r"()I"); - - /// from: public int getPort() - int getPort() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getPort, jni.JniCallType.intType, []).integer; - } - - static final _id_getDefaultPort = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getDefaultPort", r"()I"); - - /// from: public int getDefaultPort() - int getDefaultPort() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getDefaultPort, jni.JniCallType.intType, []).integer; - } - - static final _id_getProtocol = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getProtocol", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getProtocol() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getProtocol() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getProtocol, jni.JniCallType.objectType, []).object); - } - - static final _id_getHost = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getHost", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getHost() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getHost() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getHost, jni.JniCallType.objectType, []).object); - } - - static final _id_getFile = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getFile", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getFile() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getFile() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getFile, jni.JniCallType.objectType, []).object); - } - - static final _id_getRef = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getRef", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getRef() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getRef() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getRef, jni.JniCallType.objectType, []).object); - } - - static final _id_equals1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"equals", r"(Ljava/lang/Object;)Z"); - - /// from: public boolean equals(java.lang.Object object) - bool equals1( - jni.JObject object, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_equals1, - jni.JniCallType.booleanType, [object.reference]).boolean; - } - - static final _id_hashCode1 = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"hashCode", r"()I"); - - /// from: public int hashCode() - int hashCode1() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_hashCode1, jni.JniCallType.intType, []).integer; - } - - static final _id_sameFile = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"sameFile", r"(Ljava/net/URL;)Z"); - - /// from: public boolean sameFile(java.net.URL uRL) - bool sameFile( - URL uRL, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_sameFile, - jni.JniCallType.booleanType, [uRL.reference]).boolean; - } - - static final _id_toString1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"toString", r"()Ljava/lang/String;"); - - /// from: public java.lang.String toString() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString toString1() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_toString1, jni.JniCallType.objectType, []).object); - } - - static final _id_toExternalForm = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"toExternalForm", r"()Ljava/lang/String;"); - - /// from: public java.lang.String toExternalForm() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString toExternalForm() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_toExternalForm, jni.JniCallType.objectType, []).object); - } - - static final _id_toURI = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"toURI", r"()Ljava/net/URI;"); - - /// from: public java.net.URI toURI() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject toURI() { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_toURI, jni.JniCallType.objectType, []).object); - } - - static final _id_openConnection = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"openConnection", r"()Ljava/net/URLConnection;"); - - /// from: public java.net.URLConnection openConnection() - /// The returned object must be deleted after use, by calling the `delete` method. - urlconnection_.URLConnection openConnection() { - return const urlconnection_.$URLConnectionType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_openConnection, - jni.JniCallType.objectType, []).object); - } - - static final _id_openConnection1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"openConnection", - r"(Ljava/net/Proxy;)Ljava/net/URLConnection;"); - - /// from: public java.net.URLConnection openConnection(java.net.Proxy proxy) - /// The returned object must be deleted after use, by calling the `delete` method. - urlconnection_.URLConnection openConnection1( - jni.JObject proxy, - ) { - return const urlconnection_.$URLConnectionType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_openConnection1, - jni.JniCallType.objectType, [proxy.reference]).object); - } - - static final _id_openStream = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"openStream", r"()Ljava/io/InputStream;"); - - /// from: public final java.io.InputStream openStream() - /// The returned object must be deleted after use, by calling the `delete` method. - inputstream_.InputStream openStream() { - return const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors - .callMethodWithArgs( - reference, _id_openStream, jni.JniCallType.objectType, []).object); - } - - static final _id_getContent = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getContent", r"()Ljava/lang/Object;"); - - /// from: public final java.lang.Object getContent() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject getContent() { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getContent, jni.JniCallType.objectType, []).object); - } - - static final _id_getContent1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"getContent", - r"([Ljava/lang/Class;)Ljava/lang/Object;"); - - /// from: public final java.lang.Object getContent(java.lang.Object[] classs) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject getContent1( - jni.JArray classs, - ) { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getContent1, - jni.JniCallType.objectType, - [classs.reference]).object); - } - - static final _id_setURLStreamHandlerFactory = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"setURLStreamHandlerFactory", - r"(Ljava/net/URLStreamHandlerFactory;)V"); - - /// from: static public void setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory uRLStreamHandlerFactory) - static void setURLStreamHandlerFactory( - jni.JObject uRLStreamHandlerFactory, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setURLStreamHandlerFactory, - jni.JniCallType.voidType, - [uRLStreamHandlerFactory.reference]).check(); - } -} - -class $URLType extends jni.JObjType { - const $URLType(); - - @override - String get signature => r"Ljava/net/URL;"; - - @override - URL fromRef(jni.JObjectPtr ref) => URL.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($URLType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($URLType) && other is $URLType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart b/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart deleted file mode 100644 index 6dd56e1df9..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/net/URLConnection.dart +++ /dev/null @@ -1,836 +0,0 @@ -// Autogenerated by jnigen. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: file_names -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: overridden_fields -// ignore_for_file: unnecessary_cast -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// ignore_for_file: unused_import -// ignore_for_file: unused_shown_name - -import "dart:isolate" show ReceivePort; -import "dart:ffi" as ffi; -import "package:jni/internal_helpers_for_jnigen.dart"; -import "package:jni/jni.dart" as jni; - -import "URL.dart" as url_; - -import "../io/InputStream.dart" as inputstream_; - -import "../io/OutputStream.dart" as outputstream_; - -/// from: java.net.URLConnection -class URLConnection extends jni.JObject { - @override - late final jni.JObjType $type = type; - - URLConnection.fromRef( - jni.JObjectPtr ref, - ) : super.fromRef(ref); - - static final _class = jni.Jni.findJClass(r"java/net/URLConnection"); - - /// The type which includes information such as the signature of this class. - static const type = $URLConnectionType(); - static final _id_url = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"url", - r"Ljava/net/URL;", - ); - - /// from: protected java.net.URL url - /// The returned object must be deleted after use, by calling the `delete` method. - url_.URL get url => const url_.$URLType().fromRef(jni.Jni.accessors - .getField(reference, _id_url, jni.JniCallType.objectType) - .object); - - /// from: protected java.net.URL url - /// The returned object must be deleted after use, by calling the `delete` method. - set url(url_.URL value) => - jni.Jni.env.SetObjectField(reference, _id_url, value.reference); - - static final _id_doInput = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"doInput", - r"Z", - ); - - /// from: protected boolean doInput - bool get doInput => jni.Jni.accessors - .getField(reference, _id_doInput, jni.JniCallType.booleanType) - .boolean; - - /// from: protected boolean doInput - set doInput(bool value) => - jni.Jni.env.SetBooleanField(reference, _id_doInput, value ? 1 : 0); - - static final _id_doOutput = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"doOutput", - r"Z", - ); - - /// from: protected boolean doOutput - bool get doOutput => jni.Jni.accessors - .getField(reference, _id_doOutput, jni.JniCallType.booleanType) - .boolean; - - /// from: protected boolean doOutput - set doOutput(bool value) => - jni.Jni.env.SetBooleanField(reference, _id_doOutput, value ? 1 : 0); - - static final _id_allowUserInteraction = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"allowUserInteraction", - r"Z", - ); - - /// from: protected boolean allowUserInteraction - bool get allowUserInteraction => jni.Jni.accessors - .getField( - reference, _id_allowUserInteraction, jni.JniCallType.booleanType) - .boolean; - - /// from: protected boolean allowUserInteraction - set allowUserInteraction(bool value) => jni.Jni.env - .SetBooleanField(reference, _id_allowUserInteraction, value ? 1 : 0); - - static final _id_useCaches = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"useCaches", - r"Z", - ); - - /// from: protected boolean useCaches - bool get useCaches => jni.Jni.accessors - .getField(reference, _id_useCaches, jni.JniCallType.booleanType) - .boolean; - - /// from: protected boolean useCaches - set useCaches(bool value) => - jni.Jni.env.SetBooleanField(reference, _id_useCaches, value ? 1 : 0); - - static final _id_ifModifiedSince = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"ifModifiedSince", - r"J", - ); - - /// from: protected long ifModifiedSince - int get ifModifiedSince => jni.Jni.accessors - .getField(reference, _id_ifModifiedSince, jni.JniCallType.longType) - .long; - - /// from: protected long ifModifiedSince - set ifModifiedSince(int value) => - jni.Jni.env.SetLongField(reference, _id_ifModifiedSince, value); - - static final _id_connected = jni.Jni.accessors.getFieldIDOf( - _class.reference, - r"connected", - r"Z", - ); - - /// from: protected boolean connected - bool get connected => jni.Jni.accessors - .getField(reference, _id_connected, jni.JniCallType.booleanType) - .boolean; - - /// from: protected boolean connected - set connected(bool value) => - jni.Jni.env.SetBooleanField(reference, _id_connected, value ? 1 : 0); - - static final _id_getFileNameMap = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"getFileNameMap", r"()Ljava/net/FileNameMap;"); - - /// from: static public java.net.FileNameMap getFileNameMap() - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JObject getFileNameMap() { - return const jni.JObjectType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs(_class.reference, _id_getFileNameMap, - jni.JniCallType.objectType, []).object); - } - - static final _id_setFileNameMap = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"setFileNameMap", r"(Ljava/net/FileNameMap;)V"); - - /// from: static public void setFileNameMap(java.net.FileNameMap fileNameMap) - static void setFileNameMap( - jni.JObject fileNameMap, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setFileNameMap, - jni.JniCallType.voidType, - [fileNameMap.reference]).check(); - } - - static final _id_connect = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"connect", r"()V"); - - /// from: public abstract void connect() - void connect() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_connect, jni.JniCallType.voidType, []).check(); - } - - static final _id_setConnectTimeout = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setConnectTimeout", r"(I)V"); - - /// from: public void setConnectTimeout(int i) - void setConnectTimeout( - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_setConnectTimeout, - jni.JniCallType.voidType, - [jni.JValueInt(i)]).check(); - } - - static final _id_getConnectTimeout = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getConnectTimeout", r"()I"); - - /// from: public int getConnectTimeout() - int getConnectTimeout() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getConnectTimeout, jni.JniCallType.intType, []).integer; - } - - static final _id_setReadTimeout = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setReadTimeout", r"(I)V"); - - /// from: public void setReadTimeout(int i) - void setReadTimeout( - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_setReadTimeout, - jni.JniCallType.voidType, [jni.JValueInt(i)]).check(); - } - - static final _id_getReadTimeout = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getReadTimeout", r"()I"); - - /// from: public int getReadTimeout() - int getReadTimeout() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getReadTimeout, jni.JniCallType.intType, []).integer; - } - - static final _id_ctor = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"", r"(Ljava/net/URL;)V"); - - /// from: protected void (java.net.URL uRL) - /// The returned object must be deleted after use, by calling the `delete` method. - factory URLConnection( - url_.URL uRL, - ) { - return URLConnection.fromRef(jni.Jni.accessors - .newObjectWithArgs(_class.reference, _id_ctor, [uRL.reference]).object); - } - - static final _id_getURL = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getURL", r"()Ljava/net/URL;"); - - /// from: public java.net.URL getURL() - /// The returned object must be deleted after use, by calling the `delete` method. - url_.URL getURL() { - return const url_.$URLType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getURL, jni.JniCallType.objectType, []).object); - } - - static final _id_getContentLength = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getContentLength", r"()I"); - - /// from: public int getContentLength() - int getContentLength() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getContentLength, jni.JniCallType.intType, []).integer; - } - - static final _id_getContentLengthLong = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getContentLengthLong", r"()J"); - - /// from: public long getContentLengthLong() - int getContentLengthLong() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getContentLengthLong, jni.JniCallType.longType, []).long; - } - - static final _id_getContentType = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getContentType", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getContentType() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getContentType() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getContentType, jni.JniCallType.objectType, []).object); - } - - static final _id_getContentEncoding = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getContentEncoding", r"()Ljava/lang/String;"); - - /// from: public java.lang.String getContentEncoding() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getContentEncoding() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getContentEncoding, - jni.JniCallType.objectType, []).object); - } - - static final _id_getExpiration = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getExpiration", r"()J"); - - /// from: public long getExpiration() - int getExpiration() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getExpiration, jni.JniCallType.longType, []).long; - } - - static final _id_getDate = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"getDate", r"()J"); - - /// from: public long getDate() - int getDate() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getDate, jni.JniCallType.longType, []).long; - } - - static final _id_getLastModified = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getLastModified", r"()J"); - - /// from: public long getLastModified() - int getLastModified() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getLastModified, jni.JniCallType.longType, []).long; - } - - static final _id_getHeaderField = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"getHeaderField", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: public java.lang.String getHeaderField(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getHeaderField( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHeaderField, - jni.JniCallType.objectType, - [string.reference]).object); - } - - static final _id_getHeaderFields = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getHeaderFields", r"()Ljava/util/Map;"); - - /// from: public java.util.Map getHeaderFields() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JMap> getHeaderFields() { - return const jni.JMapType( - jni.JStringType(), jni.JListType(jni.JStringType())) - .fromRef(jni.Jni.accessors.callMethodWithArgs(reference, - _id_getHeaderFields, jni.JniCallType.objectType, []).object); - } - - static final _id_getHeaderFieldInt = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getHeaderFieldInt", r"(Ljava/lang/String;I)I"); - - /// from: public int getHeaderFieldInt(java.lang.String string, int i) - int getHeaderFieldInt( - jni.JString string, - int i, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHeaderFieldInt, - jni.JniCallType.intType, - [string.reference, jni.JValueInt(i)]).integer; - } - - static final _id_getHeaderFieldLong = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getHeaderFieldLong", r"(Ljava/lang/String;J)J"); - - /// from: public long getHeaderFieldLong(java.lang.String string, long j) - int getHeaderFieldLong( - jni.JString string, - int j, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHeaderFieldLong, - jni.JniCallType.longType, - [string.reference, j]).long; - } - - static final _id_getHeaderFieldDate = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getHeaderFieldDate", r"(Ljava/lang/String;J)J"); - - /// from: public long getHeaderFieldDate(java.lang.String string, long j) - int getHeaderFieldDate( - jni.JString string, - int j, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHeaderFieldDate, - jni.JniCallType.longType, - [string.reference, j]).long; - } - - static final _id_getHeaderFieldKey = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getHeaderFieldKey", r"(I)Ljava/lang/String;"); - - /// from: public java.lang.String getHeaderFieldKey(int i) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getHeaderFieldKey( - int i, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHeaderFieldKey, - jni.JniCallType.objectType, - [jni.JValueInt(i)]).object); - } - - static final _id_getHeaderField1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getHeaderField", r"(I)Ljava/lang/String;"); - - /// from: public java.lang.String getHeaderField(int i) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getHeaderField1( - int i, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getHeaderField1, - jni.JniCallType.objectType, - [jni.JValueInt(i)]).object); - } - - static final _id_getContent = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getContent", r"()Ljava/lang/Object;"); - - /// from: public java.lang.Object getContent() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject getContent() { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getContent, jni.JniCallType.objectType, []).object); - } - - static final _id_getContent1 = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"getContent", - r"([Ljava/lang/Class;)Ljava/lang/Object;"); - - /// from: public java.lang.Object getContent(java.lang.Object[] classs) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject getContent1( - jni.JArray classs, - ) { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getContent1, - jni.JniCallType.objectType, - [classs.reference]).object); - } - - static final _id_getPermission = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getPermission", r"()Ljava/security/Permission;"); - - /// from: public java.security.Permission getPermission() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JObject getPermission() { - return const jni.JObjectType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_getPermission, jni.JniCallType.objectType, []).object); - } - - static final _id_getInputStream = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getInputStream", r"()Ljava/io/InputStream;"); - - /// from: public java.io.InputStream getInputStream() - /// The returned object must be deleted after use, by calling the `delete` method. - inputstream_.InputStream getInputStream() { - return const inputstream_.$InputStreamType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_getInputStream, - jni.JniCallType.objectType, []).object); - } - - static final _id_getOutputStream = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getOutputStream", r"()Ljava/io/OutputStream;"); - - /// from: public java.io.OutputStream getOutputStream() - /// The returned object must be deleted after use, by calling the `delete` method. - outputstream_.OutputStream getOutputStream() { - return const outputstream_.$OutputStreamType().fromRef(jni.Jni.accessors - .callMethodWithArgs(reference, _id_getOutputStream, - jni.JniCallType.objectType, []).object); - } - - static final _id_toString1 = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"toString", r"()Ljava/lang/String;"); - - /// from: public java.lang.String toString() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString toString1() { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, _id_toString1, jni.JniCallType.objectType, []).object); - } - - static final _id_setDoInput = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"setDoInput", r"(Z)V"); - - /// from: public void setDoInput(boolean z) - void setDoInput( - bool z, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_setDoInput, - jni.JniCallType.voidType, [z ? 1 : 0]).check(); - } - - static final _id_getDoInput = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"getDoInput", r"()Z"); - - /// from: public boolean getDoInput() - bool getDoInput() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getDoInput, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setDoOutput = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setDoOutput", r"(Z)V"); - - /// from: public void setDoOutput(boolean z) - void setDoOutput( - bool z, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_setDoOutput, - jni.JniCallType.voidType, [z ? 1 : 0]).check(); - } - - static final _id_getDoOutput = - jni.Jni.accessors.getMethodIDOf(_class.reference, r"getDoOutput", r"()Z"); - - /// from: public boolean getDoOutput() - bool getDoOutput() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getDoOutput, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setAllowUserInteraction = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setAllowUserInteraction", r"(Z)V"); - - /// from: public void setAllowUserInteraction(boolean z) - void setAllowUserInteraction( - bool z, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_setAllowUserInteraction, - jni.JniCallType.voidType, - [z ? 1 : 0]).check(); - } - - static final _id_getAllowUserInteraction = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getAllowUserInteraction", r"()Z"); - - /// from: public boolean getAllowUserInteraction() - bool getAllowUserInteraction() { - return jni.Jni.accessors.callMethodWithArgs(reference, - _id_getAllowUserInteraction, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setDefaultAllowUserInteraction = jni.Jni.accessors - .getStaticMethodIDOf( - _class.reference, r"setDefaultAllowUserInteraction", r"(Z)V"); - - /// from: static public void setDefaultAllowUserInteraction(boolean z) - static void setDefaultAllowUserInteraction( - bool z, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setDefaultAllowUserInteraction, - jni.JniCallType.voidType, - [z ? 1 : 0]).check(); - } - - static final _id_getDefaultAllowUserInteraction = jni.Jni.accessors - .getStaticMethodIDOf( - _class.reference, r"getDefaultAllowUserInteraction", r"()Z"); - - /// from: static public boolean getDefaultAllowUserInteraction() - static bool getDefaultAllowUserInteraction() { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_getDefaultAllowUserInteraction, - jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setUseCaches = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setUseCaches", r"(Z)V"); - - /// from: public void setUseCaches(boolean z) - void setUseCaches( - bool z, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, _id_setUseCaches, - jni.JniCallType.voidType, [z ? 1 : 0]).check(); - } - - static final _id_getUseCaches = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getUseCaches", r"()Z"); - - /// from: public boolean getUseCaches() - bool getUseCaches() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getUseCaches, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setIfModifiedSince = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setIfModifiedSince", r"(J)V"); - - /// from: public void setIfModifiedSince(long j) - void setIfModifiedSince( - int j, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, - _id_setIfModifiedSince, jni.JniCallType.voidType, [j]).check(); - } - - static final _id_getIfModifiedSince = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getIfModifiedSince", r"()J"); - - /// from: public long getIfModifiedSince() - int getIfModifiedSince() { - return jni.Jni.accessors.callMethodWithArgs( - reference, _id_getIfModifiedSince, jni.JniCallType.longType, []).long; - } - - static final _id_getDefaultUseCaches = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"getDefaultUseCaches", r"()Z"); - - /// from: public boolean getDefaultUseCaches() - bool getDefaultUseCaches() { - return jni.Jni.accessors.callMethodWithArgs(reference, - _id_getDefaultUseCaches, jni.JniCallType.booleanType, []).boolean; - } - - static final _id_setDefaultUseCaches = jni.Jni.accessors - .getMethodIDOf(_class.reference, r"setDefaultUseCaches", r"(Z)V"); - - /// from: public void setDefaultUseCaches(boolean z) - void setDefaultUseCaches( - bool z, - ) { - return jni.Jni.accessors.callMethodWithArgs(reference, - _id_setDefaultUseCaches, jni.JniCallType.voidType, [z ? 1 : 0]).check(); - } - - static final _id_setDefaultUseCaches1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"setDefaultUseCaches", r"(Ljava/lang/String;Z)V"); - - /// from: static public void setDefaultUseCaches(java.lang.String string, boolean z) - static void setDefaultUseCaches1( - jni.JString string, - bool z, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setDefaultUseCaches1, - jni.JniCallType.voidType, - [string.reference, z ? 1 : 0]).check(); - } - - static final _id_getDefaultUseCaches1 = jni.Jni.accessors.getStaticMethodIDOf( - _class.reference, r"getDefaultUseCaches", r"(Ljava/lang/String;)Z"); - - /// from: static public boolean getDefaultUseCaches(java.lang.String string) - static bool getDefaultUseCaches1( - jni.JString string, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_getDefaultUseCaches1, - jni.JniCallType.booleanType, - [string.reference]).boolean; - } - - static final _id_setRequestProperty = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"setRequestProperty", - r"(Ljava/lang/String;Ljava/lang/String;)V"); - - /// from: public void setRequestProperty(java.lang.String string, java.lang.String string1) - void setRequestProperty( - jni.JString string, - jni.JString string1, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_setRequestProperty, - jni.JniCallType.voidType, - [string.reference, string1.reference]).check(); - } - - static final _id_addRequestProperty = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"addRequestProperty", - r"(Ljava/lang/String;Ljava/lang/String;)V"); - - /// from: public void addRequestProperty(java.lang.String string, java.lang.String string1) - void addRequestProperty( - jni.JString string, - jni.JString string1, - ) { - return jni.Jni.accessors.callMethodWithArgs( - reference, - _id_addRequestProperty, - jni.JniCallType.voidType, - [string.reference, string1.reference]).check(); - } - - static final _id_getRequestProperty = jni.Jni.accessors.getMethodIDOf( - _class.reference, - r"getRequestProperty", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: public java.lang.String getRequestProperty(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JString getRequestProperty( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors.callMethodWithArgs( - reference, - _id_getRequestProperty, - jni.JniCallType.objectType, - [string.reference]).object); - } - - static final _id_getRequestProperties = jni.Jni.accessors.getMethodIDOf( - _class.reference, r"getRequestProperties", r"()Ljava/util/Map;"); - - /// from: public java.util.Map getRequestProperties() - /// The returned object must be deleted after use, by calling the `delete` method. - jni.JMap> getRequestProperties() { - return const jni.JMapType( - jni.JStringType(), jni.JListType(jni.JStringType())) - .fromRef(jni.Jni.accessors.callMethodWithArgs(reference, - _id_getRequestProperties, jni.JniCallType.objectType, []).object); - } - - static final _id_setDefaultRequestProperty = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"setDefaultRequestProperty", - r"(Ljava/lang/String;Ljava/lang/String;)V"); - - /// from: static public void setDefaultRequestProperty(java.lang.String string, java.lang.String string1) - static void setDefaultRequestProperty( - jni.JString string, - jni.JString string1, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setDefaultRequestProperty, - jni.JniCallType.voidType, - [string.reference, string1.reference]).check(); - } - - static final _id_getDefaultRequestProperty = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"getDefaultRequestProperty", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String getDefaultRequestProperty(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString getDefaultRequestProperty( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_getDefaultRequestProperty, - jni.JniCallType.objectType, - [string.reference]).object); - } - - static final _id_setContentHandlerFactory = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"setContentHandlerFactory", - r"(Ljava/net/ContentHandlerFactory;)V"); - - /// from: static public void setContentHandlerFactory(java.net.ContentHandlerFactory contentHandlerFactory) - static void setContentHandlerFactory( - jni.JObject contentHandlerFactory, - ) { - return jni.Jni.accessors.callStaticMethodWithArgs( - _class.reference, - _id_setContentHandlerFactory, - jni.JniCallType.voidType, - [contentHandlerFactory.reference]).check(); - } - - static final _id_guessContentTypeFromName = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"guessContentTypeFromName", - r"(Ljava/lang/String;)Ljava/lang/String;"); - - /// from: static public java.lang.String guessContentTypeFromName(java.lang.String string) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString guessContentTypeFromName( - jni.JString string, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_guessContentTypeFromName, - jni.JniCallType.objectType, - [string.reference]).object); - } - - static final _id_guessContentTypeFromStream = jni.Jni.accessors - .getStaticMethodIDOf(_class.reference, r"guessContentTypeFromStream", - r"(Ljava/io/InputStream;)Ljava/lang/String;"); - - /// from: static public java.lang.String guessContentTypeFromStream(java.io.InputStream inputStream) - /// The returned object must be deleted after use, by calling the `delete` method. - static jni.JString guessContentTypeFromStream( - inputstream_.InputStream inputStream, - ) { - return const jni.JStringType().fromRef(jni.Jni.accessors - .callStaticMethodWithArgs( - _class.reference, - _id_guessContentTypeFromStream, - jni.JniCallType.objectType, - [inputStream.reference]).object); - } -} - -class $URLConnectionType extends jni.JObjType { - const $URLConnectionType(); - - @override - String get signature => r"Ljava/net/URLConnection;"; - - @override - URLConnection fromRef(jni.JObjectPtr ref) => URLConnection.fromRef(ref); - - @override - jni.JObjType get superType => const jni.JObjectType(); - - @override - final superCount = 1; - - @override - int get hashCode => ($URLConnectionType).hashCode; - - @override - bool operator ==(Object other) { - return other.runtimeType == ($URLConnectionType) && - other is $URLConnectionType; - } -} diff --git a/pkgs/java_http/lib/src/third_party/java/net/_package.dart b/pkgs/java_http/lib/src/third_party/java/net/_package.dart deleted file mode 100644 index f52baa0ff1..0000000000 --- a/pkgs/java_http/lib/src/third_party/java/net/_package.dart +++ /dev/null @@ -1,3 +0,0 @@ -export "HttpURLConnection.dart"; -export "URL.dart"; -export "URLConnection.dart"; diff --git a/pkgs/java_http/pubspec.yaml b/pkgs/java_http/pubspec.yaml deleted file mode 100644 index 129bc08e47..0000000000 --- a/pkgs/java_http/pubspec.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: java_http -version: 0.0.1 -description: >- - A Dart package for making HTTP requests using java.net.HttpURLConnection. -repository: https://github.com/dart-lang/http/tree/master/pkgs/java_http - -publish_to: none - -environment: - sdk: ^3.0.0 - -dependencies: - async: ^2.11.0 - http: '>=0.13.4 <2.0.0' - jni: ^0.5.0 - path: ^1.8.0 - -dev_dependencies: - dart_flutter_team_lints: ^3.0.0 - http_client_conformance_tests: - path: ../http_client_conformance_tests/ - jnigen: ^0.5.0 - test: ^1.21.0 diff --git a/pkgs/java_http/test/java_client_test.dart b/pkgs/java_http/test/java_client_test.dart deleted file mode 100644 index c6e769ca6f..0000000000 --- a/pkgs/java_http/test/java_client_test.dart +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file -// for details. 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:http_client_conformance_tests/http_client_conformance_tests.dart'; -import 'package:java_http/java_http.dart'; -import 'package:test/test.dart'; - -void main() { - group('java_http client conformance tests', () { - testIsolate(JavaClient.new); - testResponseBody(JavaClient()); - testResponseBodyStreamed(JavaClient()); - testResponseHeaders(JavaClient()); - testResponseStatusLine(JavaClient()); - testRequestBody(JavaClient()); - testRequestHeaders(JavaClient()); - testMultipleClients(JavaClient.new); - }); -} From 8cc9862ff757198e61360b90b056bed89d2155c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2024 10:25:03 -0700 Subject: [PATCH 436/448] Bump the github-actions group across 1 directory with 5 updates (#1392) Bumps the github-actions group with 5 updates in the / directory: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `4.1.7` | `4.2.2` | | [actions/setup-java](https://github.com/actions/setup-java) | `4.2.1` | `4.5.0` | | [reactivecircus/android-emulator-runner](https://github.com/reactivecircus/android-emulator-runner) | `2.31.0` | `2.33.0` | | [futureware-tech/simulator-action](https://github.com/futureware-tech/simulator-action) | `3` | `4` | | [actions/cache](https://github.com/actions/cache) | `4.0.2` | `4.1.2` | Updates `actions/checkout` from 4.1.7 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.1.7...11bd71901bbe5b1630ceea73d27597364c9af683) Updates `actions/setup-java` from 4.2.1 to 4.5.0 - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/99b8673ff64fbf99d8d325f52d9a5bdedb8483e9...8df1039502a15bceb9433410b1a100fbe190c53b) Updates `reactivecircus/android-emulator-runner` from 2.31.0 to 2.33.0 - [Release notes](https://github.com/reactivecircus/android-emulator-runner/releases) - [Changelog](https://github.com/ReactiveCircus/android-emulator-runner/blob/main/CHANGELOG.md) - [Commits](https://github.com/reactivecircus/android-emulator-runner/compare/77986be26589807b8ebab3fde7bbf5c60dabec32...62dbb605bba737720e10b196cb4220d374026a6d) Updates `futureware-tech/simulator-action` from 3 to 4 - [Release notes](https://github.com/futureware-tech/simulator-action/releases) - [Changelog](https://github.com/futureware-tech/simulator-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/futureware-tech/simulator-action/compare/bfa03d93ec9de6dacb0c5553bbf8da8afc6c2ee9...dab10d813144ef59b48d401cd95da151222ef8cd) Updates `actions/cache` from 4.0.2 to 4.1.2 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9...6849a6489940f00c2f30c0fb92c6274307ccb58a) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: reactivecircus/android-emulator-runner dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: futureware-tech/simulator-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/cronet.yml | 6 +-- .github/workflows/cupertino.yml | 4 +- .github/workflows/dart.yml | 82 +++++++++++++++--------------- .github/workflows/http2.yaml | 4 +- .github/workflows/http_parser.yaml | 4 +- .github/workflows/okhttp.yaml | 6 +-- 6 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.github/workflows/cronet.yml b/.github/workflows/cronet.yml index 9b2a4cfcf6..6747d38d79 100644 --- a/.github/workflows/cronet.yml +++ b/.github/workflows/cronet.yml @@ -37,8 +37,8 @@ jobs: uses: jlumbroso/free-disk-space@v1.3.1 with: android: false # Don't remove Android tools - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b with: distribution: 'zulu' java-version: '17' @@ -55,7 +55,7 @@ jobs: if: always() && steps.install.outcome == 'success' run: flutter analyze --fatal-infos - name: Run tests - uses: reactivecircus/android-emulator-runner@77986be26589807b8ebab3fde7bbf5c60dabec32 + uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d if: always() && steps.install.outcome == 'success' with: # api-level/minSdkVersion should be help in sync in: diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 68213aa069..3c1865a4ec 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -34,7 +34,7 @@ jobs: # version. flutter-version: ["3.24.0", "any"] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 with: flutter-version: ${{ matrix.flutter-version }} @@ -48,7 +48,7 @@ jobs: - name: Analyze code run: flutter analyze --fatal-infos if: always() && steps.install.outcome == 'success' - - uses: futureware-tech/simulator-action@bfa03d93ec9de6dacb0c5553bbf8da8afc6c2ee9 + - uses: futureware-tech/simulator-action@dab10d813144ef59b48d401cd95da151222ef8cd with: os: iOS os_version: '>=13.0' diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 038e0cdfdc..331256a9b4 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -34,7 +34,7 @@ jobs: sdk: stable - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: mono_repo self validate run: dart pub global activate mono_repo 6.6.2 - name: mono_repo self validate @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:analyze_1" @@ -59,7 +59,7 @@ jobs: sdk: "3.4.0" - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -110,7 +110,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:analyze_1" @@ -125,7 +125,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -176,7 +176,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_client_conformance_tests-pkgs/http_profile-pkgs/web_socket-pkgs/web_socket_conformance_tests;commands:format" @@ -191,7 +191,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -242,7 +242,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:format" @@ -257,7 +257,7 @@ jobs: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -272,7 +272,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:analyze_0" @@ -287,7 +287,7 @@ jobs: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -302,7 +302,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http;commands:command_1" @@ -317,7 +317,7 @@ jobs: sdk: "3.4.0" - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -339,7 +339,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http;commands:test_3" @@ -354,7 +354,7 @@ jobs: sdk: "3.4.0" - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -376,7 +376,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/http-pkgs/http_profile;commands:test_2" @@ -391,7 +391,7 @@ jobs: sdk: "3.4.0" - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -422,7 +422,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/web_socket;commands:test_6" @@ -437,7 +437,7 @@ jobs: sdk: "3.4.0" - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -459,7 +459,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.4.0;packages:pkgs/web_socket;commands:test_5" @@ -474,7 +474,7 @@ jobs: sdk: "3.4.0" - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -496,7 +496,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:command_1" @@ -511,7 +511,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -533,7 +533,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_3" @@ -548,7 +548,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -570,7 +570,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http-pkgs/http_profile;commands:test_2" @@ -585,7 +585,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -616,7 +616,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/http;commands:test_4" @@ -631,7 +631,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_http_pub_upgrade name: pkgs/http; dart pub upgrade run: dart pub upgrade @@ -653,7 +653,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/web_socket;commands:test_6" @@ -668,7 +668,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -690,7 +690,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/web_socket;commands:test_5" @@ -705,7 +705,7 @@ jobs: sdk: dev - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_web_socket_pub_upgrade name: pkgs/web_socket; dart pub upgrade run: dart pub upgrade @@ -727,7 +727,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:test_1" @@ -742,7 +742,7 @@ jobs: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -764,7 +764,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:command_0" @@ -779,7 +779,7 @@ jobs: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -801,7 +801,7 @@ jobs: runs-on: macos-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 + uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a with: path: "~/.pub-cache/hosted" key: "os:macos-latest;pub-cache-hosted;sdk:stable;packages:pkgs/flutter_http_example;commands:command_0" @@ -816,7 +816,7 @@ jobs: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade @@ -843,7 +843,7 @@ jobs: channel: stable - id: checkout name: Checkout repository - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - id: pkgs_flutter_http_example_pub_upgrade name: pkgs/flutter_http_example; flutter pub upgrade run: flutter pub upgrade diff --git a/.github/workflows/http2.yaml b/.github/workflows/http2.yaml index eb3dc28010..9ab5ad9214 100644 --- a/.github/workflows/http2.yaml +++ b/.github/workflows/http2.yaml @@ -31,7 +31,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} @@ -58,7 +58,7 @@ jobs: os: [ubuntu-latest] sdk: [3.2, dev] steps: - - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} diff --git a/.github/workflows/http_parser.yaml b/.github/workflows/http_parser.yaml index b4dd271d31..d8b2ae33a8 100644 --- a/.github/workflows/http_parser.yaml +++ b/.github/workflows/http_parser.yaml @@ -33,7 +33,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} @@ -56,7 +56,7 @@ jobs: os: [ubuntu-latest] sdk: [3.4, dev] steps: - - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} diff --git a/.github/workflows/okhttp.yaml b/.github/workflows/okhttp.yaml index 367bcf2732..cfdb28b11d 100644 --- a/.github/workflows/okhttp.yaml +++ b/.github/workflows/okhttp.yaml @@ -28,8 +28,8 @@ jobs: run: working-directory: pkgs/ok_http steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 - - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b with: distribution: 'zulu' java-version: '17' @@ -46,7 +46,7 @@ jobs: if: always() && steps.install.outcome == 'success' run: flutter analyze --fatal-infos - name: Run tests - uses: reactivecircus/android-emulator-runner@77986be26589807b8ebab3fde7bbf5c60dabec32 + uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d if: always() && steps.install.outcome == 'success' with: # api-level/minSdkVersion should be help in sync in: From c9cb9ac9586490168205732db65781aece6d4996 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 28 Oct 2024 15:39:15 -0700 Subject: [PATCH 437/448] Switch to http_image_provider 1.0 (#1391) --- pkgs/cronet_http/example/pubspec.yaml | 2 +- pkgs/cupertino_http/example/pubspec.yaml | 2 +- pkgs/flutter_http_example/pubspec.yaml | 2 +- pkgs/ok_http/example/pubspec.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/cronet_http/example/pubspec.yaml b/pkgs/cronet_http/example/pubspec.yaml index a2ed4b03cb..dfaa39a8e7 100644 --- a/pkgs/cronet_http/example/pubspec.yaml +++ b/pkgs/cronet_http/example/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - http_image_provider: ^0.0.3 + http_image_provider: ^1.0.0 provider: ^6.1.1 dev_dependencies: diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index 5d15cf4a47..153a11826e 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - http_image_provider: ^0.0.3 + http_image_provider: ^1.0.0 provider: ^6.1.1 dev_dependencies: diff --git a/pkgs/flutter_http_example/pubspec.yaml b/pkgs/flutter_http_example/pubspec.yaml index 272f50d854..08d1b70430 100644 --- a/pkgs/flutter_http_example/pubspec.yaml +++ b/pkgs/flutter_http_example/pubspec.yaml @@ -16,7 +16,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - http_image_provider: ^0.0.3 + http_image_provider: ^1.0.0 provider: ^6.0.5 dev_dependencies: diff --git a/pkgs/ok_http/example/pubspec.yaml b/pkgs/ok_http/example/pubspec.yaml index 8a394364fe..38b21c5923 100644 --- a/pkgs/ok_http/example/pubspec.yaml +++ b/pkgs/ok_http/example/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: flutter: sdk: flutter http: ^1.0.0 - http_image_provider: ^0.0.3 + http_image_provider: ^1.0.0 ok_http: path: ../ provider: ^6.1.1 From d37f11215dc92548b57d33b4e1a181099245dc6e Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 28 Oct 2024 15:41:24 -0700 Subject: [PATCH 438/448] Prepare to publish cupertino_http 2.0.0 (#1390) --- pkgs/cupertino_http/CHANGELOG.md | 2 +- pkgs/cupertino_http/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 04b2ed6a65..616e07b6cb 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.0.0-wip +## 2.0.0 * The behavior of `CupertinoClient` and `CupertinoWebSocket` has not changed. * **Breaking:** `MutableURLRequest.httpBodyStream` now takes a `NSInputStream` diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index dbdda7067b..8a442de791 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 1.5.2-wip +version: 2.0.0 description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. From 7fb131e8d1811f0a7e52d3ea0bf929505f1f1d0e Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 30 Oct 2024 13:53:44 -0700 Subject: [PATCH 439/448] Drop outdated lint (#1395) --- pkgs/http_parser/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/http_parser/analysis_options.yaml b/pkgs/http_parser/analysis_options.yaml index c0bcfca91e..4def62c655 100644 --- a/pkgs/http_parser/analysis_options.yaml +++ b/pkgs/http_parser/analysis_options.yaml @@ -22,7 +22,6 @@ linter: - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - - package_api_docs - prefer_const_declarations - prefer_expression_function_bodies - prefer_final_locals From bcd07ab4d6259e0339905aab2311dfa6798dc9c2 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 5 Nov 2024 15:34:30 -0800 Subject: [PATCH 440/448] Fix a bug where cupertino_http did not work on iOS<17. (#1399) - Fixes https://github.com/dart-lang/http/issues/1398 --- pkgs/cupertino_http/CHANGELOG.md | 5 ++ .../cupertino_http/lib/src/cupertino_api.dart | 52 ++++++++++--------- pkgs/cupertino_http/pubspec.yaml | 2 +- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index 616e07b6cb..d0d5124631 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.1-wip + +* Fix a [bug](https://github.com/dart-lang/http/issues/1398) where + `package:cupertino_http` only worked with iOS 17+. + ## 2.0.0 * The behavior of `CupertinoClient` and `CupertinoWebSocket` has not changed. diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 99fb2ee041..2be208f308 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -850,24 +850,26 @@ class URLSession extends _ObjectHolder { }) { final protoBuilder = objc.ObjCProtocolBuilder(); - ncb.NSURLSessionDataDelegate.addToBuilderAsListener( - protoBuilder, - URLSession_task_didCompleteWithError_: (nsSession, nsTask, nsError) { - _decrementTaskCount(); - if (onComplete != null) { - onComplete( - URLSession._(nsSession, - isBackground: isBackground, hasDelegate: true), - URLSessionTask._(nsTask), - nsError); - } - }, - ); + ncb.NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(protoBuilder, (nsSession, nsTask, nsError) { + _decrementTaskCount(); + if (onComplete != null) { + onComplete( + URLSession._(nsSession, + isBackground: isBackground, hasDelegate: true), + URLSessionTask._(nsTask), + nsError); + } + }); if (onRedirect != null) { - ncb.NSURLSessionDataDelegate.addToBuilderAsListener(protoBuilder, + ncb + .NSURLSessionDataDelegate // ignore: lines_longer_than_80_chars - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_: + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(protoBuilder, + // ignore: lines_longer_than_80_chars + (nsSession, nsTask, nsResponse, nsRequest, nsRequestCompleter) { final request = URLRequest._(nsRequest); URLRequest? redirectRequest; @@ -891,8 +893,9 @@ class URLSession extends _ObjectHolder { } if (onResponse != null) { - ncb.NSURLSessionDataDelegate.addToBuilderAsListener(protoBuilder, - URLSession_dataTask_didReceiveResponse_completionHandler_: + ncb.NSURLSessionDataDelegate + .URLSession_dataTask_didReceiveResponse_completionHandler_ + .implementAsListener(protoBuilder, (nsSession, nsDataTask, nsResponse, nsCompletionHandler) { final exactResponse = URLResponse._exactURLResponseType(nsResponse); final disposition = onResponse( @@ -905,8 +908,8 @@ class URLSession extends _ObjectHolder { } if (onData != null) { - ncb.NSURLSessionDataDelegate.addToBuilderAsListener(protoBuilder, - URLSession_dataTask_didReceiveData_: (nsSession, nsDataTask, nsData) { + ncb.NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_ + .implementAsListener(protoBuilder, (nsSession, nsDataTask, nsData) { onData( URLSession._(nsSession, isBackground: isBackground, hasDelegate: true), @@ -942,9 +945,9 @@ class URLSession extends _ObjectHolder { } if (onWebSocketTaskOpened != null) { - ncb.NSURLSessionWebSocketDelegate.addToBuilderAsListener(protoBuilder, - URLSession_webSocketTask_didOpenWithProtocol_: - (nsSession, nsTask, nsProtocol) { + ncb.NSURLSessionWebSocketDelegate + .URLSession_webSocketTask_didOpenWithProtocol_ + .implementAsListener(protoBuilder, (nsSession, nsTask, nsProtocol) { onWebSocketTaskOpened( URLSession._(nsSession, isBackground: isBackground, hasDelegate: true), @@ -954,8 +957,9 @@ class URLSession extends _ObjectHolder { } if (onWebSocketTaskClosed != null) { - ncb.NSURLSessionWebSocketDelegate.addToBuilderAsListener(protoBuilder, - URLSession_webSocketTask_didCloseWithCode_reason_: + ncb.NSURLSessionWebSocketDelegate + .URLSession_webSocketTask_didCloseWithCode_reason_ + .implementAsListener(protoBuilder, (nsSession, nsTask, closeCode, reason) { onWebSocketTaskClosed( URLSession._(nsSession, diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 8a442de791..94ceb6bdff 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 2.0.0 +version: 2.0.1-wip description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. From 4e031e121fb26313664613f8fd74590012d19b9c Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 5 Nov 2024 15:57:50 -0800 Subject: [PATCH 441/448] Release package:cupertino_http 2.0.1 (#1400) --- pkgs/cupertino_http/CHANGELOG.md | 2 +- pkgs/cupertino_http/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index d0d5124631..e903e336a3 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.0.1-wip +## 2.0.1 * Fix a [bug](https://github.com/dart-lang/http/issues/1398) where `package:cupertino_http` only worked with iOS 17+. diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 94ceb6bdff..0e53691da2 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 2.0.1-wip +version: 2.0.1 description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. From 4e49aed6407eb5b1f408821a93010bf01f3ff8cf Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 6 Nov 2024 13:48:36 -0800 Subject: [PATCH 442/448] Upgrade flutter_http_example to cupertino_http (#1393) --- .../ios/Flutter/AppFrameworkInfo.plist | 2 +- .../ios/Flutter/Debug.xcconfig | 1 + .../ios/Flutter/Release.xcconfig | 1 + pkgs/flutter_http_example/ios/Podfile | 44 ++++++ .../ios/Runner.xcodeproj/project.pbxproj | 146 +++++++++++++++--- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../contents.xcworkspacedata | 3 + .../ios/Runner/AppDelegate.swift | 2 +- .../linux/flutter/generated_plugins.cmake | 1 + .../macos/Flutter/Flutter-Debug.xcconfig | 1 + .../macos/Flutter/Flutter-Release.xcconfig | 1 + pkgs/flutter_http_example/macos/Podfile | 43 ++++++ .../macos/Runner.xcodeproj/project.pbxproj | 106 ++++++++++++- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../contents.xcworkspacedata | 3 + .../macos/Runner/AppDelegate.swift | 2 +- pkgs/flutter_http_example/pubspec.yaml | 2 +- .../windows/flutter/generated_plugins.cmake | 1 + 18 files changed, 333 insertions(+), 30 deletions(-) create mode 100644 pkgs/flutter_http_example/ios/Podfile create mode 100644 pkgs/flutter_http_example/macos/Podfile diff --git a/pkgs/flutter_http_example/ios/Flutter/AppFrameworkInfo.plist b/pkgs/flutter_http_example/ios/Flutter/AppFrameworkInfo.plist index 9625e105df..1dc6cf7652 100644 --- a/pkgs/flutter_http_example/ios/Flutter/AppFrameworkInfo.plist +++ b/pkgs/flutter_http_example/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 13.0 diff --git a/pkgs/flutter_http_example/ios/Flutter/Debug.xcconfig b/pkgs/flutter_http_example/ios/Flutter/Debug.xcconfig index 592ceee85b..ec97fc6f30 100644 --- a/pkgs/flutter_http_example/ios/Flutter/Debug.xcconfig +++ b/pkgs/flutter_http_example/ios/Flutter/Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "Generated.xcconfig" diff --git a/pkgs/flutter_http_example/ios/Flutter/Release.xcconfig b/pkgs/flutter_http_example/ios/Flutter/Release.xcconfig index 592ceee85b..c4855bfe20 100644 --- a/pkgs/flutter_http_example/ios/Flutter/Release.xcconfig +++ b/pkgs/flutter_http_example/ios/Flutter/Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/pkgs/flutter_http_example/ios/Podfile b/pkgs/flutter_http_example/ios/Podfile new file mode 100644 index 0000000000..3e44f9c6f7 --- /dev/null +++ b/pkgs/flutter_http_example/ios/Podfile @@ -0,0 +1,44 @@ +# Uncomment this line to define a global platform for your project +platform :ios, '13.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.pbxproj b/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.pbxproj index 96ff3b4c1d..a14d83b242 100644 --- a/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.pbxproj +++ b/pkgs/flutter_http_example/ios/Runner.xcodeproj/project.pbxproj @@ -8,12 +8,14 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B1448C25079CE55D20090E7 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93328B4024A7886CC6CC2DDD /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 61B31556395186C35F97BF5D /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C17079534AD2CBE4823B8AB /* Pods_RunnerTests.framework */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -42,10 +44,17 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 236A97BA0F5813CD1920FC16 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 4251B236F12508EAFB1CDADF /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 4C17079534AD2CBE4823B8AB /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 91755F2B95DCD0D57CD9CA33 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 93328B4024A7886CC6CC2DDD /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -53,21 +62,39 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; - 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + AD8548E7DA6210BD4651A868 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + C262D7CEC60AFDBA943D3587 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + F959075C01F519C8B7CB7566 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 621B34BD5B8B923F614770C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 61B31556395186C35F97BF5D /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 97C146EB1CF9000F007C117D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 3B1448C25079CE55D20090E7 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -79,14 +106,6 @@ name = Flutter; sourceTree = ""; }; - 331C8082294A63A400263BE5 /* RunnerTests */ = { - isa = PBXGroup; - children = ( - 331C807B294A618700263BE5 /* RunnerTests.swift */, - ); - path = RunnerTests; - sourceTree = ""; - }; 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( @@ -94,6 +113,8 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, + C9FE60B8C6333C2F69900430 /* Pods */, + A4E774287DA6E5C815BF9BA2 /* Frameworks */, ); sourceTree = ""; }; @@ -121,6 +142,29 @@ path = Runner; sourceTree = ""; }; + A4E774287DA6E5C815BF9BA2 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 93328B4024A7886CC6CC2DDD /* Pods_Runner.framework */, + 4C17079534AD2CBE4823B8AB /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + C9FE60B8C6333C2F69900430 /* Pods */ = { + isa = PBXGroup; + children = ( + 91755F2B95DCD0D57CD9CA33 /* Pods-Runner.debug.xcconfig */, + 4251B236F12508EAFB1CDADF /* Pods-Runner.release.xcconfig */, + C262D7CEC60AFDBA943D3587 /* Pods-Runner.profile.xcconfig */, + F959075C01F519C8B7CB7566 /* Pods-RunnerTests.debug.xcconfig */, + AD8548E7DA6210BD4651A868 /* Pods-RunnerTests.release.xcconfig */, + 236A97BA0F5813CD1920FC16 /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -128,9 +172,10 @@ isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( + C47239DAC40DFB94662F62CC /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, - 331C807E294A63A400263BE5 /* Frameworks */, 331C807F294A63A400263BE5 /* Resources */, + 621B34BD5B8B923F614770C7 /* Frameworks */, ); buildRules = ( ); @@ -146,12 +191,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 86DB308CAFB66EE46BD07D10 /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 2AC1FEE86C19F56DF01677C5 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -169,7 +216,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C8080294A63A400263BE5 = { @@ -223,6 +270,23 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 2AC1FEE86C19F56DF01677C5 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -239,6 +303,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; }; + 86DB308CAFB66EE46BD07D10 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -254,6 +340,28 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + C47239DAC40DFB94662F62CC /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -345,7 +453,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -377,7 +485,7 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */; + baseConfigurationReference = F959075C01F519C8B7CB7566 /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -395,7 +503,7 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */; + baseConfigurationReference = AD8548E7DA6210BD4651A868 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -411,7 +519,7 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */; + baseConfigurationReference = 236A97BA0F5813CD1920FC16 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; @@ -472,7 +580,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -521,7 +629,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/pkgs/flutter_http_example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/pkgs/flutter_http_example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 87131a09be..8e3ca5dfe1 100644 --- a/pkgs/flutter_http_example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/pkgs/flutter_http_example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ + + diff --git a/pkgs/flutter_http_example/ios/Runner/AppDelegate.swift b/pkgs/flutter_http_example/ios/Runner/AppDelegate.swift index 70693e4a8c..b636303481 100644 --- a/pkgs/flutter_http_example/ios/Runner/AppDelegate.swift +++ b/pkgs/flutter_http_example/ios/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import UIKit import Flutter -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, diff --git a/pkgs/flutter_http_example/linux/flutter/generated_plugins.cmake b/pkgs/flutter_http_example/linux/flutter/generated_plugins.cmake index 2e1de87a7e..be1ee3e5b4 100644 --- a/pkgs/flutter_http_example/linux/flutter/generated_plugins.cmake +++ b/pkgs/flutter_http_example/linux/flutter/generated_plugins.cmake @@ -6,6 +6,7 @@ list(APPEND FLUTTER_PLUGIN_LIST ) list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni ) set(PLUGIN_BUNDLED_LIBRARIES) diff --git a/pkgs/flutter_http_example/macos/Flutter/Flutter-Debug.xcconfig b/pkgs/flutter_http_example/macos/Flutter/Flutter-Debug.xcconfig index c2efd0b608..4b81f9b2d2 100644 --- a/pkgs/flutter_http_example/macos/Flutter/Flutter-Debug.xcconfig +++ b/pkgs/flutter_http_example/macos/Flutter/Flutter-Debug.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/pkgs/flutter_http_example/macos/Flutter/Flutter-Release.xcconfig b/pkgs/flutter_http_example/macos/Flutter/Flutter-Release.xcconfig index c2efd0b608..5caa9d1579 100644 --- a/pkgs/flutter_http_example/macos/Flutter/Flutter-Release.xcconfig +++ b/pkgs/flutter_http_example/macos/Flutter/Flutter-Release.xcconfig @@ -1 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/pkgs/flutter_http_example/macos/Podfile b/pkgs/flutter_http_example/macos/Podfile new file mode 100644 index 0000000000..b52666a103 --- /dev/null +++ b/pkgs/flutter_http_example/macos/Podfile @@ -0,0 +1,43 @@ +platform :osx, '10.15' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/pkgs/flutter_http_example/macos/Runner.xcodeproj/project.pbxproj b/pkgs/flutter_http_example/macos/Runner.xcodeproj/project.pbxproj index 7ec768d2e6..02b4091aa8 100644 --- a/pkgs/flutter_http_example/macos/Runner.xcodeproj/project.pbxproj +++ b/pkgs/flutter_http_example/macos/Runner.xcodeproj/project.pbxproj @@ -27,6 +27,8 @@ 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; + 6CD517E234CF360701C08A8A /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0591765108BEADEC34532D04 /* Pods_Runner.framework */; }; + 6E1ABF5DCC1A42E71A734FBC /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 40BBC97A1163C755D4A704A2 /* Pods_RunnerTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -60,11 +62,12 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0591765108BEADEC34532D04 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* flutter_http_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "flutter_http_example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* flutter_http_example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = flutter_http_example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -76,8 +79,15 @@ 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 40BBC97A1163C755D4A704A2 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 551FEB853C026A902F0A92E6 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 78519086C5EEDD58132888E3 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + 7AA9FD2C114520277F572574 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 94B1D590F47CFBED674D1E29 /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; + 9DBC0FAE0731CAA1D0B0070A /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + A9635687BEA632F3738488B1 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -85,6 +95,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 6E1ABF5DCC1A42E71A734FBC /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -92,6 +103,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 6CD517E234CF360701C08A8A /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -125,6 +137,7 @@ 331C80D6294CF71000263BE5 /* RunnerTests */, 33CC10EE2044A3C60003C045 /* Products */, D73912EC22F37F3D000D13A0 /* Frameworks */, + B9ADB9664E4467E254712B67 /* Pods */, ); sourceTree = ""; }; @@ -172,9 +185,25 @@ path = Runner; sourceTree = ""; }; + B9ADB9664E4467E254712B67 /* Pods */ = { + isa = PBXGroup; + children = ( + A9635687BEA632F3738488B1 /* Pods-Runner.debug.xcconfig */, + 78519086C5EEDD58132888E3 /* Pods-Runner.release.xcconfig */, + 7AA9FD2C114520277F572574 /* Pods-Runner.profile.xcconfig */, + 9DBC0FAE0731CAA1D0B0070A /* Pods-RunnerTests.debug.xcconfig */, + 551FEB853C026A902F0A92E6 /* Pods-RunnerTests.release.xcconfig */, + 94B1D590F47CFBED674D1E29 /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; D73912EC22F37F3D000D13A0 /* Frameworks */ = { isa = PBXGroup; children = ( + 0591765108BEADEC34532D04 /* Pods_Runner.framework */, + 40BBC97A1163C755D4A704A2 /* Pods_RunnerTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -186,6 +215,7 @@ isa = PBXNativeTarget; buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( + D6B96CFD862468F06D71CD1E /* [CP] Check Pods Manifest.lock */, 331C80D1294CF70F00263BE5 /* Sources */, 331C80D2294CF70F00263BE5 /* Frameworks */, 331C80D3294CF70F00263BE5 /* Resources */, @@ -204,11 +234,13 @@ isa = PBXNativeTarget; buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 06AE03905AE54589A920DA1D /* [CP] Check Pods Manifest.lock */, 33CC10E92044A3C60003C045 /* Sources */, 33CC10EA2044A3C60003C045 /* Frameworks */, 33CC10EB2044A3C60003C045 /* Resources */, 33CC110E2044A8840003C045 /* Bundle Framework */, 3399D490228B24CF009A79C7 /* ShellScript */, + 07BDB66C6CC1CF49E12920D9 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -227,7 +259,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C80D4294CF70F00263BE5 = { @@ -290,6 +322,45 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 06AE03905AE54589A920DA1D /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 07BDB66C6CC1CF49E12920D9 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 3399D490228B24CF009A79C7 /* ShellScript */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -328,6 +399,28 @@ shellPath = /bin/sh; shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; }; + D6B96CFD862468F06D71CD1E /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -379,6 +472,7 @@ /* Begin XCBuildConfiguration section */ 331C80DB294CF71000263BE5 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 9DBC0FAE0731CAA1D0B0070A /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -393,6 +487,7 @@ }; 331C80DC294CF71000263BE5 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 551FEB853C026A902F0A92E6 /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -407,6 +502,7 @@ }; 331C80DD294CF71000263BE5 /* Profile */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 94B1D590F47CFBED674D1E29 /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CURRENT_PROJECT_VERSION = 1; @@ -457,7 +553,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -536,7 +632,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -583,7 +679,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.14; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/pkgs/flutter_http_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/pkgs/flutter_http_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 109fe9a3cc..a88e082977 100644 --- a/pkgs/flutter_http_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/pkgs/flutter_http_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ + + diff --git a/pkgs/flutter_http_example/macos/Runner/AppDelegate.swift b/pkgs/flutter_http_example/macos/Runner/AppDelegate.swift index d53ef64377..8e02df2888 100644 --- a/pkgs/flutter_http_example/macos/Runner/AppDelegate.swift +++ b/pkgs/flutter_http_example/macos/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import Cocoa import FlutterMacOS -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true diff --git a/pkgs/flutter_http_example/pubspec.yaml b/pkgs/flutter_http_example/pubspec.yaml index 08d1b70430..92844828d2 100644 --- a/pkgs/flutter_http_example/pubspec.yaml +++ b/pkgs/flutter_http_example/pubspec.yaml @@ -10,7 +10,7 @@ environment: dependencies: cronet_http: ^1.0.0 - cupertino_http: ^1.2.0 + cupertino_http: ^2.0.0 cupertino_icons: ^1.0.2 fetch_client: ^1.0.2 flutter: diff --git a/pkgs/flutter_http_example/windows/flutter/generated_plugins.cmake b/pkgs/flutter_http_example/windows/flutter/generated_plugins.cmake index b93c4c30c1..3ad69c6125 100644 --- a/pkgs/flutter_http_example/windows/flutter/generated_plugins.cmake +++ b/pkgs/flutter_http_example/windows/flutter/generated_plugins.cmake @@ -6,6 +6,7 @@ list(APPEND FLUTTER_PLUGIN_LIST ) list(APPEND FLUTTER_FFI_PLUGIN_LIST + jni ) set(PLUGIN_BUNDLED_LIBRARIES) From f10ed1ac3e23066caf46874658f0f2940b352e48 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 11 Nov 2024 15:31:14 -0800 Subject: [PATCH 443/448] Add macOS tests for `package:cupertino_http` (#1403) --- .github/workflows/cupertino.yml | 34 ++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cupertino.yml b/.github/workflows/cupertino.yml index 3c1865a4ec..3b52d1a189 100644 --- a/.github/workflows/cupertino.yml +++ b/.github/workflows/cupertino.yml @@ -21,18 +21,20 @@ env: PUB_ENVIRONMENT: bot.github jobs: - verify: - name: Format & Analyze & Test + macos: + name: "macOS: Format & Analyze & Test" runs-on: macos-latest defaults: run: working-directory: pkgs/cupertino_http strategy: - fail-fast: false matrix: # Test on the minimum supported flutter version and the latest # version. flutter-version: ["3.24.0", "any"] + # It would be nice to test on older versions of macOS but macOS 13 is + # the oldest supported by GitHub. + os: [macos-13, macos-latest] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 @@ -48,6 +50,32 @@ jobs: - name: Analyze code run: flutter analyze --fatal-infos if: always() && steps.install.outcome == 'success' + - name: Run tests + run: | + cd example + flutter pub get + flutter test -d macos integration_test/main.dart --test-randomize-ordering-seed=random + ios: + name: "iOS: Test" + runs-on: macos-latest + defaults: + run: + working-directory: pkgs/cupertino_http + strategy: + fail-fast: false + matrix: + # Test on the minimum supported flutter version and the latest + # version. + flutter-version: ["3.24.0", "any"] + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 + with: + flutter-version: ${{ matrix.flutter-version }} + channel: 'stable' + - id: install + name: Install dependencies + run: flutter pub get - uses: futureware-tech/simulator-action@dab10d813144ef59b48d401cd95da151222ef8cd with: os: iOS From bf2fce2e9b53cb46794ccd77bc7b7205bc19f325 Mon Sep 17 00:00:00 2001 From: Slava Egorov Date: Thu, 14 Nov 2024 13:24:45 -0800 Subject: [PATCH 444/448] Switch browser_client.dart to use fetch (#1401) Issue #595 --- pkgs/http/CHANGELOG.md | 5 +- pkgs/http/lib/src/browser_client.dart | 200 +++++++++++------- pkgs/http/pubspec.yaml | 2 +- .../test/html/client_conformance_test.dart | 2 +- pkgs/http/test/html/client_test.dart | 3 +- 5 files changed, 125 insertions(+), 87 deletions(-) diff --git a/pkgs/http/CHANGELOG.md b/pkgs/http/CHANGELOG.md index 18e71333b7..bbedcd21cc 100644 --- a/pkgs/http/CHANGELOG.md +++ b/pkgs/http/CHANGELOG.md @@ -1,6 +1,7 @@ -## 1.2.3-wip +## 1.3.0-wip -* Fixed unintended HTML tags in doc comments. +* Fixed unintended HTML tags in doc comments. +* Switched `BrowserClient` to use Fetch API instead of `XMLHttpRequest`. ## 1.2.2 diff --git a/pkgs/http/lib/src/browser_client.dart b/pkgs/http/lib/src/browser_client.dart index 6ea112486b..f19bddb464 100644 --- a/pkgs/http/lib/src/browser_client.dart +++ b/pkgs/http/lib/src/browser_client.dart @@ -5,16 +5,20 @@ import 'dart:async'; import 'dart:js_interop'; -import 'package:web/web.dart' show XHRGetters, XMLHttpRequest; +import 'package:web/web.dart' + show + AbortController, + HeadersInit, + ReadableStreamDefaultReader, + RequestInit, + Response, + window; import 'base_client.dart'; import 'base_request.dart'; -import 'byte_stream.dart'; import 'exception.dart'; import 'streamed_response.dart'; -final _digitRegex = RegExp(r'^\d+$'); - /// Create a [BrowserClient]. /// /// Used from conditional imports, matches the definition in `client_stub.dart`. @@ -27,18 +31,19 @@ BaseClient createClient() { } /// A `package:web`-based HTTP client that runs in the browser and is backed by -/// [XMLHttpRequest]. +/// [`window.fetch`](https://fetch.spec.whatwg.org/). +/// +/// This client inherits some limitations of `window.fetch`: +/// +/// - [BaseRequest.persistentConnection] is ignored; +/// - Setting [BaseRequest.followRedirects] to `false` will cause +/// [ClientException] when a redirect is encountered; +/// - The value of [BaseRequest.maxRedirects] is ignored. /// -/// This client inherits some of the limitations of XMLHttpRequest. It ignores -/// the [BaseRequest.contentLength], [BaseRequest.persistentConnection], -/// [BaseRequest.followRedirects], and [BaseRequest.maxRedirects] fields. It is -/// also unable to stream requests or responses; a request will only be sent and -/// a response will only be returned once all the data is available. +/// Responses are streamed but requests are not. A request will only be sent +/// once all the data is available. class BrowserClient extends BaseClient { - /// The currently active XHRs. - /// - /// These are aborted if the client is closed. - final _xhrs = {}; + final _abortController = AbortController(); /// Whether to send credentials such as cookies or authorization headers for /// cross-site requests. @@ -55,55 +60,58 @@ class BrowserClient extends BaseClient { throw ClientException( 'HTTP request failed. Client is already closed.', request.url); } - var bytes = await request.finalize().toBytes(); - var xhr = XMLHttpRequest(); - _xhrs.add(xhr); - xhr - ..open(request.method, '${request.url}', true) - ..responseType = 'arraybuffer' - ..withCredentials = withCredentials; - for (var header in request.headers.entries) { - xhr.setRequestHeader(header.key, header.value); - } - var completer = Completer(); - - unawaited(xhr.onLoad.first.then((_) { - if (xhr.responseHeaders['content-length'] case final contentLengthHeader - when contentLengthHeader != null && - !_digitRegex.hasMatch(contentLengthHeader)) { - completer.completeError(ClientException( + final bodyBytes = await request.finalize().toBytes(); + try { + final response = await window + .fetch( + '${request.url}'.toJS, + RequestInit( + method: request.method, + body: bodyBytes.isNotEmpty ? bodyBytes.toJS : null, + credentials: withCredentials ? 'include' : 'same-origin', + headers: { + if (request.contentLength case final contentLength?) + 'content-length': contentLength, + for (var header in request.headers.entries) + header.key: header.value, + }.jsify()! as HeadersInit, + signal: _abortController.signal, + redirect: request.followRedirects ? 'follow' : 'error', + ), + ) + .toDart; + + final contentLengthHeader = response.headers.get('content-length'); + + final contentLength = contentLengthHeader != null + ? int.tryParse(contentLengthHeader) + : null; + + if (contentLength == null && contentLengthHeader != null) { + throw ClientException( 'Invalid content-length header [$contentLengthHeader].', request.url, - )); - return; + ); } - var body = (xhr.response as JSArrayBuffer).toDart.asUint8List(); - var responseUrl = xhr.responseURL; - var url = responseUrl.isNotEmpty ? Uri.parse(responseUrl) : request.url; - completer.complete(StreamedResponseV2( - ByteStream.fromBytes(body), xhr.status, - contentLength: body.length, - request: request, - url: url, - headers: xhr.responseHeaders, - reasonPhrase: xhr.statusText)); - })); - - unawaited(xhr.onError.first.then((_) { - // Unfortunately, the underlying XMLHttpRequest API doesn't expose any - // specific information about the error itself. - completer.completeError( - ClientException('XMLHttpRequest error.', request.url), - StackTrace.current); - })); - - xhr.send(bytes.toJS); - try { - return await completer.future; - } finally { - _xhrs.remove(xhr); + final headers = {}; + (response.headers as _IterableHeaders) + .forEach((String value, String header, [JSAny? _]) { + headers[header.toLowerCase()] = value; + }.toJS); + + return StreamedResponseV2( + _readBody(request, response), + response.status, + headers: headers, + request: request, + contentLength: contentLength, + url: Uri.parse(response.url), + reasonPhrase: response.statusText, + ); + } catch (e, st) { + _rethrowAsClientException(e, st, request); } } @@ -113,36 +121,66 @@ class BrowserClient extends BaseClient { @override void close() { _isClosed = true; - for (var xhr in _xhrs) { - xhr.abort(); + _abortController.abort(); + } +} + +Never _rethrowAsClientException(Object e, StackTrace st, BaseRequest request) { + if (e is! ClientException) { + var message = e.toString(); + if (message.startsWith('TypeError: ')) { + message = message.substring('TypeError: '.length); } - _xhrs.clear(); + e = ClientException(message, request.url); } + Error.throwWithStackTrace(e, st); } -extension on XMLHttpRequest { - Map get responseHeaders { - // from Closure's goog.net.Xhrio.getResponseHeaders. - var headers = {}; - var headersString = getAllResponseHeaders(); - var headersList = headersString.split('\r\n'); - for (var header in headersList) { - if (header.isEmpty) { - continue; - } +Stream> _readBody(BaseRequest request, Response response) async* { + final bodyStreamReader = + response.body?.getReader() as ReadableStreamDefaultReader?; + + if (bodyStreamReader == null) { + return; + } - var splitIdx = header.indexOf(': '); - if (splitIdx == -1) { - continue; + var isDone = false, isError = false; + try { + while (true) { + final chunk = await bodyStreamReader.read().toDart; + if (chunk.done) { + isDone = true; + break; } - var key = header.substring(0, splitIdx).toLowerCase(); - var value = header.substring(splitIdx + 2); - if (headers.containsKey(key)) { - headers[key] = '${headers[key]}, $value'; - } else { - headers[key] = value; + yield (chunk.value! as JSUint8Array).toDart; + } + } catch (e, st) { + isError = true; + _rethrowAsClientException(e, st, request); + } finally { + if (!isDone) { + try { + // catchError here is a temporary workaround for + // http://dartbug.com/57046: an exception from cancel() will + // clobber an exception which is currently in flight. + await bodyStreamReader + .cancel() + .toDart + .catchError((_) => null, test: (_) => isError); + } catch (e, st) { + // If we have already encountered an error swallow the + // error from cancel and simply let the original error to be + // rethrown. + if (!isError) { + _rethrowAsClientException(e, st, request); + } } } - return headers; } } + +/// Workaround for `Headers` not providing a way to iterate the headers. +@JS() +extension type _IterableHeaders._(JSObject _) implements JSObject { + external void forEach(JSFunction fn); +} diff --git a/pkgs/http/pubspec.yaml b/pkgs/http/pubspec.yaml index 06eb639ef4..9685a17148 100644 --- a/pkgs/http/pubspec.yaml +++ b/pkgs/http/pubspec.yaml @@ -1,5 +1,5 @@ name: http -version: 1.2.3-wip +version: 1.3.0-wip description: A composable, multi-platform, Future-based API for HTTP requests. repository: https://github.com/dart-lang/http/tree/master/pkgs/http diff --git a/pkgs/http/test/html/client_conformance_test.dart b/pkgs/http/test/html/client_conformance_test.dart index 9505239564..4400c6a8a1 100644 --- a/pkgs/http/test/html/client_conformance_test.dart +++ b/pkgs/http/test/html/client_conformance_test.dart @@ -13,7 +13,7 @@ void main() { testAll(BrowserClient.new, redirectAlwaysAllowed: true, canStreamRequestBody: false, - canStreamResponseBody: false, + canStreamResponseBody: true, canWorkInIsolates: false, supportsMultipartRequest: false); } diff --git a/pkgs/http/test/html/client_test.dart b/pkgs/http/test/html/client_test.dart index 1a6c634362..f62e75c119 100644 --- a/pkgs/http/test/html/client_test.dart +++ b/pkgs/http/test/html/client_test.dart @@ -34,8 +34,7 @@ void main() { var url = Uri.http('http.invalid', ''); var request = http.StreamedRequest('POST', url); - expect( - client.send(request), throwsClientException('XMLHttpRequest error.')); + expect(client.send(request), throwsClientException()); request.sink.add('{"hello": "world"}'.codeUnits); request.sink.close(); From fde0878f75023a3b8a3cf49f869a39cc77e61bc0 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Fri, 15 Nov 2024 13:55:45 -0800 Subject: [PATCH 445/448] Upgrade to `package:`objective_c` 4.0 (#1406) --- pkgs/cupertino_http/CHANGELOG.md | 4 + .../native_cupertino_bindings.m | 196 +- .../Sources/cupertino_http/utils.m | 9 - .../example/integration_test/utils_test.dart | 4 +- pkgs/cupertino_http/example/pubspec.yaml | 2 +- pkgs/cupertino_http/ffigen.yaml | 6 + .../cupertino_http/lib/src/cupertino_api.dart | 2 +- .../lib/src/native_cupertino_bindings.dart | 51774 +++++++++------- pkgs/cupertino_http/pubspec.yaml | 6 +- 9 files changed, 29541 insertions(+), 22462 deletions(-) diff --git a/pkgs/cupertino_http/CHANGELOG.md b/pkgs/cupertino_http/CHANGELOG.md index e903e336a3..0878800a33 100644 --- a/pkgs/cupertino_http/CHANGELOG.md +++ b/pkgs/cupertino_http/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.2-wip + +* Upgrade to `package:objective_c` 4.0. + ## 2.0.1 * Fix a [bug](https://github.com/dart-lang/http/issues/1398) where diff --git a/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/native_cupertino_bindings.m b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/native_cupertino_bindings.m index 20bed4c2b7..3bc6c93307 100644 --- a/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/native_cupertino_bindings.m +++ b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/native_cupertino_bindings.m @@ -20,39 +20,39 @@ id objc_retainBlock(id); typedef void (^_ListenerTrampoline)(); -_ListenerTrampoline _wrapListenerBlock_ksby9f(_ListenerTrampoline block) NS_RETURNS_RETAINED { +_ListenerTrampoline _NativeCupertinoHttp_wrapListenerBlock_1pl9qdv(_ListenerTrampoline block) NS_RETURNS_RETAINED { return ^void() { objc_retainBlock(block); block(); }; } -typedef void (^_ListenerTrampoline1)(void * arg0); -_ListenerTrampoline1 _wrapListenerBlock_hepzs(_ListenerTrampoline1 block) NS_RETURNS_RETAINED { - return ^void(void * arg0) { +typedef void (^_ListenerTrampoline1)(id arg0); +_ListenerTrampoline1 _NativeCupertinoHttp_wrapListenerBlock_1jdvcbf(_ListenerTrampoline1 block) NS_RETURNS_RETAINED { + return ^void(id arg0) { objc_retainBlock(block); - block(arg0); + block(objc_retain(arg0)); }; } typedef void (^_ListenerTrampoline2)(void * arg0, id arg1); -_ListenerTrampoline2 _wrapListenerBlock_sjfpmz(_ListenerTrampoline2 block) NS_RETURNS_RETAINED { +_ListenerTrampoline2 _NativeCupertinoHttp_wrapListenerBlock_wjovn7(_ListenerTrampoline2 block) NS_RETURNS_RETAINED { return ^void(void * arg0, id arg1) { objc_retainBlock(block); block(arg0, objc_retain(arg1)); }; } -typedef void (^_ListenerTrampoline3)(id arg0); -_ListenerTrampoline3 _wrapListenerBlock_ukcdfq(_ListenerTrampoline3 block) NS_RETURNS_RETAINED { - return ^void(id arg0) { +typedef void (^_ListenerTrampoline3)(id arg0, id arg1, BOOL * arg2); +_ListenerTrampoline3 _NativeCupertinoHttp_wrapListenerBlock_1krhfwz(_ListenerTrampoline3 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1, BOOL * arg2) { objc_retainBlock(block); - block(objc_retain(arg0)); + block(objc_retain(arg0), objc_retain(arg1), arg2); }; } typedef void (^_ListenerTrampoline4)(struct __CFRunLoopObserver * arg0, CFRunLoopActivity arg1); -_ListenerTrampoline4 _wrapListenerBlock_ttt6u1(_ListenerTrampoline4 block) NS_RETURNS_RETAINED { +_ListenerTrampoline4 _NativeCupertinoHttp_wrapListenerBlock_tg5tbv(_ListenerTrampoline4 block) NS_RETURNS_RETAINED { return ^void(struct __CFRunLoopObserver * arg0, CFRunLoopActivity arg1) { objc_retainBlock(block); block(arg0, arg1); @@ -60,7 +60,7 @@ _ListenerTrampoline4 _wrapListenerBlock_ttt6u1(_ListenerTrampoline4 block) NS_RE } typedef void (^_ListenerTrampoline5)(struct __CFRunLoopTimer * arg0); -_ListenerTrampoline5 _wrapListenerBlock_1txhfzs(_ListenerTrampoline5 block) NS_RETURNS_RETAINED { +_ListenerTrampoline5 _NativeCupertinoHttp_wrapListenerBlock_1dqvvol(_ListenerTrampoline5 block) NS_RETURNS_RETAINED { return ^void(struct __CFRunLoopTimer * arg0) { objc_retainBlock(block); block(arg0); @@ -68,7 +68,7 @@ _ListenerTrampoline5 _wrapListenerBlock_1txhfzs(_ListenerTrampoline5 block) NS_R } typedef void (^_ListenerTrampoline6)(size_t arg0); -_ListenerTrampoline6 _wrapListenerBlock_1hmngv6(_ListenerTrampoline6 block) NS_RETURNS_RETAINED { +_ListenerTrampoline6 _NativeCupertinoHttp_wrapListenerBlock_6enxqz(_ListenerTrampoline6 block) NS_RETURNS_RETAINED { return ^void(size_t arg0) { objc_retainBlock(block); block(arg0); @@ -76,7 +76,7 @@ _ListenerTrampoline6 _wrapListenerBlock_1hmngv6(_ListenerTrampoline6 block) NS_R } typedef void (^_ListenerTrampoline7)(id arg0, int arg1); -_ListenerTrampoline7 _wrapListenerBlock_108ugvk(_ListenerTrampoline7 block) NS_RETURNS_RETAINED { +_ListenerTrampoline7 _NativeCupertinoHttp_wrapListenerBlock_qxvyq2(_ListenerTrampoline7 block) NS_RETURNS_RETAINED { return ^void(id arg0, int arg1) { objc_retainBlock(block); block(objc_retain(arg0), arg1); @@ -84,7 +84,7 @@ _ListenerTrampoline7 _wrapListenerBlock_108ugvk(_ListenerTrampoline7 block) NS_R } typedef void (^_ListenerTrampoline8)(int arg0); -_ListenerTrampoline8 _wrapListenerBlock_1afulej(_ListenerTrampoline8 block) NS_RETURNS_RETAINED { +_ListenerTrampoline8 _NativeCupertinoHttp_wrapListenerBlock_9o8504(_ListenerTrampoline8 block) NS_RETURNS_RETAINED { return ^void(int arg0) { objc_retainBlock(block); block(arg0); @@ -92,7 +92,7 @@ _ListenerTrampoline8 _wrapListenerBlock_1afulej(_ListenerTrampoline8 block) NS_R } typedef void (^_ListenerTrampoline9)(BOOL arg0, id arg1, int arg2); -_ListenerTrampoline9 _wrapListenerBlock_elldw5(_ListenerTrampoline9 block) NS_RETURNS_RETAINED { +_ListenerTrampoline9 _NativeCupertinoHttp_wrapListenerBlock_12a4qua(_ListenerTrampoline9 block) NS_RETURNS_RETAINED { return ^void(BOOL arg0, id arg1, int arg2) { objc_retainBlock(block); block(arg0, objc_retain(arg1), arg2); @@ -100,7 +100,7 @@ _ListenerTrampoline9 _wrapListenerBlock_elldw5(_ListenerTrampoline9 block) NS_RE } typedef void (^_ListenerTrampoline10)(struct __SecTrust * arg0, SecTrustResultType arg1); -_ListenerTrampoline10 _wrapListenerBlock_129ffij(_ListenerTrampoline10 block) NS_RETURNS_RETAINED { +_ListenerTrampoline10 _NativeCupertinoHttp_wrapListenerBlock_gwxhxt(_ListenerTrampoline10 block) NS_RETURNS_RETAINED { return ^void(struct __SecTrust * arg0, SecTrustResultType arg1) { objc_retainBlock(block); block(arg0, arg1); @@ -108,7 +108,7 @@ _ListenerTrampoline10 _wrapListenerBlock_129ffij(_ListenerTrampoline10 block) NS } typedef void (^_ListenerTrampoline11)(struct __SecTrust * arg0, BOOL arg1, struct __CFError * arg2); -_ListenerTrampoline11 _wrapListenerBlock_1458n52(_ListenerTrampoline11 block) NS_RETURNS_RETAINED { +_ListenerTrampoline11 _NativeCupertinoHttp_wrapListenerBlock_k73ff5(_ListenerTrampoline11 block) NS_RETURNS_RETAINED { return ^void(struct __SecTrust * arg0, BOOL arg1, struct __CFError * arg2) { objc_retainBlock(block); block(arg0, arg1, arg2); @@ -116,7 +116,7 @@ _ListenerTrampoline11 _wrapListenerBlock_1458n52(_ListenerTrampoline11 block) NS } typedef void (^_ListenerTrampoline12)(uint16_t arg0); -_ListenerTrampoline12 _wrapListenerBlock_yo3tv0(_ListenerTrampoline12 block) NS_RETURNS_RETAINED { +_ListenerTrampoline12 _NativeCupertinoHttp_wrapListenerBlock_15f11yh(_ListenerTrampoline12 block) NS_RETURNS_RETAINED { return ^void(uint16_t arg0) { objc_retainBlock(block); block(arg0); @@ -124,7 +124,7 @@ _ListenerTrampoline12 _wrapListenerBlock_yo3tv0(_ListenerTrampoline12 block) NS_ } typedef void (^_ListenerTrampoline13)(id arg0, id arg1); -_ListenerTrampoline13 _wrapListenerBlock_1tjlcwl(_ListenerTrampoline13 block) NS_RETURNS_RETAINED { +_ListenerTrampoline13 _NativeCupertinoHttp_wrapListenerBlock_wjvic9(_ListenerTrampoline13 block) NS_RETURNS_RETAINED { return ^void(id arg0, id arg1) { objc_retainBlock(block); block(objc_retain(arg0), objc_retain(arg1)); @@ -132,7 +132,7 @@ _ListenerTrampoline13 _wrapListenerBlock_1tjlcwl(_ListenerTrampoline13 block) NS } typedef void (^_ListenerTrampoline14)(id arg0, id arg1, id arg2); -_ListenerTrampoline14 _wrapListenerBlock_10t0qpd(_ListenerTrampoline14 block) NS_RETURNS_RETAINED { +_ListenerTrampoline14 _NativeCupertinoHttp_wrapListenerBlock_91c9gi(_ListenerTrampoline14 block) NS_RETURNS_RETAINED { return ^void(id arg0, id arg1, id arg2) { objc_retainBlock(block); block(objc_retain(arg0), objc_retain(arg1), objc_retainBlock(arg2)); @@ -140,7 +140,7 @@ _ListenerTrampoline14 _wrapListenerBlock_10t0qpd(_ListenerTrampoline14 block) NS } typedef void (^_ListenerTrampoline15)(id arg0, id arg1); -_ListenerTrampoline15 _wrapListenerBlock_cmbt6k(_ListenerTrampoline15 block) NS_RETURNS_RETAINED { +_ListenerTrampoline15 _NativeCupertinoHttp_wrapListenerBlock_14pxqbs(_ListenerTrampoline15 block) NS_RETURNS_RETAINED { return ^void(id arg0, id arg1) { objc_retainBlock(block); block(objc_retain(arg0), objc_retainBlock(arg1)); @@ -148,7 +148,7 @@ _ListenerTrampoline15 _wrapListenerBlock_cmbt6k(_ListenerTrampoline15 block) NS_ } typedef void (^_ListenerTrampoline16)(BOOL arg0); -_ListenerTrampoline16 _wrapListenerBlock_117qins(_ListenerTrampoline16 block) NS_RETURNS_RETAINED { +_ListenerTrampoline16 _NativeCupertinoHttp_wrapListenerBlock_1s56lr9(_ListenerTrampoline16 block) NS_RETURNS_RETAINED { return ^void(BOOL arg0) { objc_retainBlock(block); block(arg0); @@ -156,127 +156,173 @@ _ListenerTrampoline16 _wrapListenerBlock_117qins(_ListenerTrampoline16 block) NS } typedef void (^_ListenerTrampoline17)(id arg0, id arg1, id arg2); -_ListenerTrampoline17 _wrapListenerBlock_tenbla(_ListenerTrampoline17 block) NS_RETURNS_RETAINED { +_ListenerTrampoline17 _NativeCupertinoHttp_wrapListenerBlock_1hcfngn(_ListenerTrampoline17 block) NS_RETURNS_RETAINED { return ^void(id arg0, id arg1, id arg2) { objc_retainBlock(block); block(objc_retain(arg0), objc_retain(arg1), objc_retain(arg2)); }; } -typedef void (^_ListenerTrampoline18)(id arg0, BOOL arg1, id arg2); -_ListenerTrampoline18 _wrapListenerBlock_hfhq9m(_ListenerTrampoline18 block) NS_RETURNS_RETAINED { - return ^void(id arg0, BOOL arg1, id arg2) { +typedef void (^_ListenerTrampoline18)(NSURLSessionResponseDisposition arg0); +_ListenerTrampoline18 _NativeCupertinoHttp_wrapListenerBlock_16sve1d(_ListenerTrampoline18 block) NS_RETURNS_RETAINED { + return ^void(NSURLSessionResponseDisposition arg0) { objc_retainBlock(block); - block(objc_retain(arg0), arg1, objc_retain(arg2)); + block(arg0); }; } -typedef void (^_ListenerTrampoline19)(void * arg0, id arg1, id arg2); -_ListenerTrampoline19 _wrapListenerBlock_tm2na8(_ListenerTrampoline19 block) NS_RETURNS_RETAINED { - return ^void(void * arg0, id arg1, id arg2) { +typedef void (^_ListenerTrampoline19)(void * arg0, id arg1, id arg2, id arg3, id arg4); +_ListenerTrampoline19 _NativeCupertinoHttp_wrapListenerBlock_1f43wec(_ListenerTrampoline19 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, id arg3, id arg4) { objc_retainBlock(block); - block(arg0, objc_retain(arg1), objc_retain(arg2)); + block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retain(arg3), objc_retainBlock(arg4)); }; } -typedef void (^_ListenerTrampoline20)(NSURLSessionAuthChallengeDisposition arg0, id arg1); -_ListenerTrampoline20 _wrapListenerBlock_1najo2h(_ListenerTrampoline20 block) NS_RETURNS_RETAINED { - return ^void(NSURLSessionAuthChallengeDisposition arg0, id arg1) { +typedef void (^_ListenerTrampoline20)(void * arg0, id arg1, id arg2, id arg3); +_ListenerTrampoline20 _NativeCupertinoHttp_wrapListenerBlock_1r3kn8f(_ListenerTrampoline20 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, id arg3) { objc_retainBlock(block); - block(arg0, objc_retain(arg1)); + block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retain(arg3)); }; } -typedef void (^_ListenerTrampoline21)(void * arg0, id arg1, id arg2, id arg3); -_ListenerTrampoline21 _wrapListenerBlock_1wmulza(_ListenerTrampoline21 block) NS_RETURNS_RETAINED { - return ^void(void * arg0, id arg1, id arg2, id arg3) { +typedef void (^_ListenerTrampoline21)(void * arg0, id arg1, id arg2); +_ListenerTrampoline21 _NativeCupertinoHttp_wrapListenerBlock_ao4xm9(_ListenerTrampoline21 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2) { objc_retainBlock(block); - block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retainBlock(arg3)); + block(arg0, objc_retain(arg1), objc_retain(arg2)); }; } typedef void (^_ListenerTrampoline22)(NSURLSessionDelayedRequestDisposition arg0, id arg1); -_ListenerTrampoline22 _wrapListenerBlock_wnmjgj(_ListenerTrampoline22 block) NS_RETURNS_RETAINED { +_ListenerTrampoline22 _NativeCupertinoHttp_wrapListenerBlock_mn1xu3(_ListenerTrampoline22 block) NS_RETURNS_RETAINED { return ^void(NSURLSessionDelayedRequestDisposition arg0, id arg1) { objc_retainBlock(block); block(arg0, objc_retain(arg1)); }; } -typedef void (^_ListenerTrampoline23)(void * arg0, id arg1, id arg2, id arg3, id arg4); -_ListenerTrampoline23 _wrapListenerBlock_1nnj9ov(_ListenerTrampoline23 block) NS_RETURNS_RETAINED { - return ^void(void * arg0, id arg1, id arg2, id arg3, id arg4) { +typedef void (^_ListenerTrampoline23)(void * arg0, id arg1, id arg2, id arg3, id arg4, id arg5); +_ListenerTrampoline23 _NativeCupertinoHttp_wrapListenerBlock_13vswqm(_ListenerTrampoline23 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, id arg3, id arg4, id arg5) { objc_retainBlock(block); - block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retain(arg3), objc_retainBlock(arg4)); + block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retain(arg3), objc_retain(arg4), objc_retainBlock(arg5)); }; } -typedef void (^_ListenerTrampoline24)(void * arg0, id arg1, id arg2, id arg3, id arg4, id arg5); -_ListenerTrampoline24 _wrapListenerBlock_dmve6(_ListenerTrampoline24 block) NS_RETURNS_RETAINED { - return ^void(void * arg0, id arg1, id arg2, id arg3, id arg4, id arg5) { +typedef void (^_ListenerTrampoline24)(NSURLSessionAuthChallengeDisposition arg0, id arg1); +_ListenerTrampoline24 _NativeCupertinoHttp_wrapListenerBlock_37btrl(_ListenerTrampoline24 block) NS_RETURNS_RETAINED { + return ^void(NSURLSessionAuthChallengeDisposition arg0, id arg1) { objc_retainBlock(block); - block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retain(arg3), objc_retain(arg4), objc_retainBlock(arg5)); + block(arg0, objc_retain(arg1)); }; } -typedef void (^_ListenerTrampoline25)(void * arg0, id arg1, id arg2, int64_t arg3, id arg4); -_ListenerTrampoline25 _wrapListenerBlock_qxeqyf(_ListenerTrampoline25 block) NS_RETURNS_RETAINED { +typedef void (^_ListenerTrampoline25)(void * arg0, id arg1, id arg2, id arg3); +_ListenerTrampoline25 _NativeCupertinoHttp_wrapListenerBlock_12nszru(_ListenerTrampoline25 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, id arg3) { + objc_retainBlock(block); + block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retainBlock(arg3)); + }; +} + +typedef void (^_ListenerTrampoline26)(void * arg0, id arg1, id arg2, int64_t arg3, id arg4); +_ListenerTrampoline26 _NativeCupertinoHttp_wrapListenerBlock_qm01og(_ListenerTrampoline26 block) NS_RETURNS_RETAINED { return ^void(void * arg0, id arg1, id arg2, int64_t arg3, id arg4) { objc_retainBlock(block); block(arg0, objc_retain(arg1), objc_retain(arg2), arg3, objc_retainBlock(arg4)); }; } -typedef void (^_ListenerTrampoline26)(void * arg0, id arg1, id arg2, int64_t arg3, int64_t arg4, int64_t arg5); -_ListenerTrampoline26 _wrapListenerBlock_jzggzf(_ListenerTrampoline26 block) NS_RETURNS_RETAINED { +typedef void (^_ListenerTrampoline27)(void * arg0, id arg1, id arg2, int64_t arg3, int64_t arg4, int64_t arg5); +_ListenerTrampoline27 _NativeCupertinoHttp_wrapListenerBlock_1uuez7b(_ListenerTrampoline27 block) NS_RETURNS_RETAINED { return ^void(void * arg0, id arg1, id arg2, int64_t arg3, int64_t arg4, int64_t arg5) { objc_retainBlock(block); block(arg0, objc_retain(arg1), objc_retain(arg2), arg3, arg4, arg5); }; } -typedef void (^_ListenerTrampoline27)(void * arg0, id arg1, id arg2, id arg3); -_ListenerTrampoline27 _wrapListenerBlock_1a6kixf(_ListenerTrampoline27 block) NS_RETURNS_RETAINED { - return ^void(void * arg0, id arg1, id arg2, id arg3) { +Protocol* _NativeCupertinoHttp_NSURLSessionDataDelegate() { return @protocol(NSURLSessionDataDelegate); } + +typedef void (^_ListenerTrampoline28)(void * arg0, id arg1, id arg2, int64_t arg3, int64_t arg4); +_ListenerTrampoline28 _NativeCupertinoHttp_wrapListenerBlock_9qxjkl(_ListenerTrampoline28 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, int64_t arg3, int64_t arg4) { objc_retainBlock(block); - block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retain(arg3)); + block(arg0, objc_retain(arg1), objc_retain(arg2), arg3, arg4); }; } -typedef void (^_ListenerTrampoline28)(NSURLSessionResponseDisposition arg0); -_ListenerTrampoline28 _wrapListenerBlock_ci81hw(_ListenerTrampoline28 block) NS_RETURNS_RETAINED { - return ^void(NSURLSessionResponseDisposition arg0) { +Protocol* _NativeCupertinoHttp_NSURLSessionDownloadDelegate() { return @protocol(NSURLSessionDownloadDelegate); } + +typedef void (^_ListenerTrampoline29)(void * arg0, id arg1, id arg2, NSURLSessionWebSocketCloseCode arg3, id arg4); +_ListenerTrampoline29 _NativeCupertinoHttp_wrapListenerBlock_3lo3bb(_ListenerTrampoline29 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, id arg1, id arg2, NSURLSessionWebSocketCloseCode arg3, id arg4) { objc_retainBlock(block); - block(arg0); + block(arg0, objc_retain(arg1), objc_retain(arg2), arg3, objc_retain(arg4)); }; } -typedef void (^_ListenerTrampoline29)(void * arg0, id arg1, id arg2, int64_t arg3, int64_t arg4); -_ListenerTrampoline29 _wrapListenerBlock_1wl7fts(_ListenerTrampoline29 block) NS_RETURNS_RETAINED { - return ^void(void * arg0, id arg1, id arg2, int64_t arg3, int64_t arg4) { +Protocol* _NativeCupertinoHttp_NSURLSessionWebSocketDelegate() { return @protocol(NSURLSessionWebSocketDelegate); } + +typedef void (^_ListenerTrampoline30)(id arg0, unsigned long arg1, BOOL * arg2); +_ListenerTrampoline30 _NativeCupertinoHttp_wrapListenerBlock_16ko9u(_ListenerTrampoline30 block) NS_RETURNS_RETAINED { + return ^void(id arg0, unsigned long arg1, BOOL * arg2) { objc_retainBlock(block); - block(arg0, objc_retain(arg1), objc_retain(arg2), arg3, arg4); + block(objc_retain(arg0), arg1, arg2); }; } -typedef void (^_ListenerTrampoline30)(void * arg0, id arg1, id arg2, id arg3, id arg4); -_ListenerTrampoline30 _wrapListenerBlock_no6pyg(_ListenerTrampoline30 block) NS_RETURNS_RETAINED { - return ^void(void * arg0, id arg1, id arg2, id arg3, id arg4) { +typedef void (^_ListenerTrampoline31)(id arg0, id arg1, id arg2); +_ListenerTrampoline31 _NativeCupertinoHttp_wrapListenerBlock_1j2nt86(_ListenerTrampoline31 block) NS_RETURNS_RETAINED { + return ^void(id arg0, id arg1, id arg2) { objc_retainBlock(block); - block(arg0, objc_retain(arg1), objc_retain(arg2), objc_retain(arg3), objc_retain(arg4)); + block(objc_retainBlock(arg0), objc_retain(arg1), objc_retain(arg2)); }; } -typedef void (^_ListenerTrampoline31)(void * arg0, id arg1, id arg2, NSURLSessionWebSocketCloseCode arg3, id arg4); -_ListenerTrampoline31 _wrapListenerBlock_10hgvcc(_ListenerTrampoline31 block) NS_RETURNS_RETAINED { - return ^void(void * arg0, id arg1, id arg2, NSURLSessionWebSocketCloseCode arg3, id arg4) { +typedef void (^_ListenerTrampoline32)(id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3); +_ListenerTrampoline32 _NativeCupertinoHttp_wrapListenerBlock_8wbg7l(_ListenerTrampoline32 block) NS_RETURNS_RETAINED { + return ^void(id arg0, struct _NSRange arg1, struct _NSRange arg2, BOOL * arg3) { objc_retainBlock(block); - block(arg0, objc_retain(arg1), objc_retain(arg2), arg3, objc_retain(arg4)); + block(objc_retain(arg0), arg1, arg2, arg3); + }; +} + +typedef void (^_ListenerTrampoline33)(id arg0, BOOL * arg1); +_ListenerTrampoline33 _NativeCupertinoHttp_wrapListenerBlock_148br51(_ListenerTrampoline33 block) NS_RETURNS_RETAINED { + return ^void(id arg0, BOOL * arg1) { + objc_retainBlock(block); + block(objc_retain(arg0), arg1); + }; +} + +typedef void (^_ListenerTrampoline34)(unsigned short * arg0, unsigned long arg1); +_ListenerTrampoline34 _NativeCupertinoHttp_wrapListenerBlock_vhbh5h(_ListenerTrampoline34 block) NS_RETURNS_RETAINED { + return ^void(unsigned short * arg0, unsigned long arg1) { + objc_retainBlock(block); + block(arg0, arg1); + }; +} + +typedef void (^_ListenerTrampoline35)(void * arg0, unsigned long arg1); +_ListenerTrampoline35 _NativeCupertinoHttp_wrapListenerBlock_zuf90e(_ListenerTrampoline35 block) NS_RETURNS_RETAINED { + return ^void(void * arg0, unsigned long arg1) { + objc_retainBlock(block); + block(arg0, arg1); + }; +} + +typedef void (^_ListenerTrampoline36)(void * arg0); +_ListenerTrampoline36 _NativeCupertinoHttp_wrapListenerBlock_ovsamd(_ListenerTrampoline36 block) NS_RETURNS_RETAINED { + return ^void(void * arg0) { + objc_retainBlock(block); + block(arg0); }; } -typedef void (^_ListenerTrampoline32)(id arg0, id arg1, id arg2, id arg3); -_ListenerTrampoline32 _wrapListenerBlock_19b8ge5(_ListenerTrampoline32 block) NS_RETURNS_RETAINED { +typedef void (^_ListenerTrampoline37)(id arg0, id arg1, id arg2, id arg3); +_ListenerTrampoline37 _NativeCupertinoHttp_wrapListenerBlock_4ya7yd(_ListenerTrampoline37 block) NS_RETURNS_RETAINED { return ^void(id arg0, id arg1, id arg2, id arg3) { objc_retainBlock(block); block(objc_retain(arg0), objc_retain(arg1), objc_retain(arg2), objc_retain(arg3)); diff --git a/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m index ff5f771f5d..4f17a3415e 100644 --- a/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m +++ b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m @@ -10,12 +10,3 @@ _DidFinish adaptFinishWithLock(_DidFinishWithLock block) { [lock unlock]; }; } - -void doNotCall() { - // TODO(https://github.com/dart-lang/native/issues/1672): Remove - // when fixed. - // Force the protocol information to be available at runtime. - @protocol (NSURLSessionDataDelegate); - @protocol (NSURLSessionDownloadDelegate); - @protocol (NSURLSessionWebSocketDelegate); -} diff --git a/pkgs/cupertino_http/example/integration_test/utils_test.dart b/pkgs/cupertino_http/example/integration_test/utils_test.dart index d075927863..80c2c1caad 100644 --- a/pkgs/cupertino_http/example/integration_test/utils_test.dart +++ b/pkgs/cupertino_http/example/integration_test/utils_test.dart @@ -36,14 +36,14 @@ void main() { test('non-string value', () { final d = objc.NSMutableDictionary.new1() ..setObject_forKey_( - objc.NSNumber.numberWithInteger_(5), 'key'.toNSString()); + objc.NSNumberCreation.numberWithInteger_(5), 'key'.toNSString()); expect(() => stringNSDictionaryToMap(d), throwsUnsupportedError); }); test('non-string key', () { final d = objc.NSMutableDictionary.new1() ..setObject_forKey_( - 'value'.toNSString(), objc.NSNumber.numberWithInteger_(5)); + 'value'.toNSString(), objc.NSNumberCreation.numberWithInteger_(5)); expect(() => stringNSDictionaryToMap(d), throwsUnsupportedError); }); }); diff --git a/pkgs/cupertino_http/example/pubspec.yaml b/pkgs/cupertino_http/example/pubspec.yaml index 153a11826e..b302ff3aec 100644 --- a/pkgs/cupertino_http/example/pubspec.yaml +++ b/pkgs/cupertino_http/example/pubspec.yaml @@ -31,7 +31,7 @@ dev_dependencies: http_profile: ^0.1.0 integration_test: sdk: flutter - objective_c: ^3.0.0 + objective_c: ^4.0.0 test: ^1.21.1 web_socket_conformance_tests: path: ../../web_socket_conformance_tests/ diff --git a/pkgs/cupertino_http/ffigen.yaml b/pkgs/cupertino_http/ffigen.yaml index 9ec658d8bc..a67084acc4 100644 --- a/pkgs/cupertino_http/ffigen.yaml +++ b/pkgs/cupertino_http/ffigen.yaml @@ -31,6 +31,7 @@ preamble: | // ignore_for_file: return_of_invalid_type objc-interfaces: include: + - 'NSCondition' - 'NSHTTPURLResponse' - 'NSMutableURLRequest' - 'NSOperationQueue' @@ -43,6 +44,11 @@ objc-interfaces: - 'NSURLSessionTask' - 'NSURLSessionWebSocketMessage' - 'NSURLSessionWebSocketTask' +objc-protocols: + include: + - 'NSURLSessionDataDelegate' + - 'NSURLSessionDownloadDelegate' + - 'NSURLSessionWebSocketDelegate' comments: style: any length: full diff --git a/pkgs/cupertino_http/lib/src/cupertino_api.dart b/pkgs/cupertino_http/lib/src/cupertino_api.dart index 2be208f308..a87fa9c43d 100644 --- a/pkgs/cupertino_http/lib/src/cupertino_api.dart +++ b/pkgs/cupertino_http/lib/src/cupertino_api.dart @@ -939,7 +939,7 @@ class URLSession extends _ObjectHolder { .registerName('URLSession:downloadTask:didFinishDownloadingToURL:'); final signature = objc.getProtocolMethodSignature( downloadDelegate, didFinishDownloadingToURL, - isRequired: true, isInstanceMethod: true); + isRequired: true, isInstanceMethod: true)!; protoBuilder.implementMethod(didFinishDownloadingToURL, signature, linkedLibs.adaptFinishWithLock(asyncFinishDownloading)); } diff --git a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart index a4f2e61ccf..9cc83b62e0 100644 --- a/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart +++ b/pkgs/cupertino_http/lib/src/native_cupertino_bindings.dart @@ -11,6 +11,7 @@ // ignore_for_file: type=lint import 'dart:ffi' as ffi; import 'package:objective_c/objective_c.dart' as objc; +import 'package:ffi/ffi.dart' as pkg_ffi; /// Bindings for the Foundation URL Loading System and supporting libraries. /// @@ -23375,17 +23376,23 @@ class NativeCupertinoHttp { late final _os_workgroup_copy_port = _os_workgroup_copy_portPtr .asFunction)>(); - Dartos_workgroup_t os_workgroup_create_with_port( + Dartos_workgroup_t? os_workgroup_create_with_port( ffi.Pointer name, Dart__darwin_natural_t mach_port, ) { - return OS_os_workgroup.castFromPointer( - _os_workgroup_create_with_port( - name, - mach_port, - ), - retain: false, - release: true); + return _os_workgroup_create_with_port( + name, + mach_port, + ).address == + 0 + ? null + : OS_os_workgroup.castFromPointer( + _os_workgroup_create_with_port( + name, + mach_port, + ), + retain: false, + release: true); } late final _os_workgroup_create_with_portPtr = _lookup< @@ -23395,17 +23402,23 @@ class NativeCupertinoHttp { late final _os_workgroup_create_with_port = _os_workgroup_create_with_portPtr .asFunction, int)>(); - Dartos_workgroup_t os_workgroup_create_with_workgroup( + Dartos_workgroup_t? os_workgroup_create_with_workgroup( ffi.Pointer name, Dartos_workgroup_t wg, ) { - return OS_os_workgroup.castFromPointer( - _os_workgroup_create_with_workgroup( - name, - wg.ref.pointer, - ), - retain: false, - release: true); + return _os_workgroup_create_with_workgroup( + name, + wg.ref.pointer, + ).address == + 0 + ? null + : OS_os_workgroup.castFromPointer( + _os_workgroup_create_with_workgroup( + name, + wg.ref.pointer, + ), + retain: false, + release: true); } late final _os_workgroup_create_with_workgroupPtr = _lookup< @@ -23603,17 +23616,23 @@ class NativeCupertinoHttp { int Function( os_workgroup_interval_t, os_workgroup_interval_data_t)>(); - Dartos_workgroup_parallel_t os_workgroup_parallel_create( + Dartos_workgroup_parallel_t? os_workgroup_parallel_create( ffi.Pointer name, os_workgroup_attr_t attr, ) { - return OS_os_workgroup.castFromPointer( - _os_workgroup_parallel_create( - name, - attr, - ), - retain: false, - release: true); + return _os_workgroup_parallel_create( + name, + attr, + ).address == + 0 + ? null + : OS_os_workgroup.castFromPointer( + _os_workgroup_parallel_create( + name, + attr, + ), + retain: false, + release: true); } late final _os_workgroup_parallel_createPtr = _lookup< @@ -24028,12 +24047,12 @@ class NativeCupertinoHttp { void dispatch_apply( int iterations, - Dartdispatch_queue_t queue, + Dartdispatch_queue_t? queue, objc.ObjCBlock block, ) { return _dispatch_apply( iterations, - queue.ref.pointer, + queue?.ref.pointer ?? ffi.nullptr, block.ref.pointer, ); } @@ -24047,7 +24066,7 @@ class NativeCupertinoHttp { void dispatch_apply_f( int iterations, - Dartdispatch_queue_t queue, + Dartdispatch_queue_t? queue, ffi.Pointer context, ffi.Pointer< ffi.NativeFunction< @@ -24057,7 +24076,7 @@ class NativeCupertinoHttp { ) { return _dispatch_apply_f( iterations, - queue.ref.pointer, + queue?.ref.pointer ?? ffi.nullptr, context, work, ); @@ -24127,11 +24146,11 @@ class NativeCupertinoHttp { __dispatch_queue_attr_concurrent; Dartdispatch_queue_attr_t dispatch_queue_attr_make_initially_inactive( - Dartdispatch_queue_attr_t attr, + Dartdispatch_queue_attr_t? attr, ) { return objc.NSObject.castFromPointer( _dispatch_queue_attr_make_initially_inactive( - attr.ref.pointer, + attr?.ref.pointer ?? ffi.nullptr, ), retain: true, release: true); @@ -24146,12 +24165,12 @@ class NativeCupertinoHttp { .asFunction(); Dartdispatch_queue_attr_t dispatch_queue_attr_make_with_autorelease_frequency( - Dartdispatch_queue_attr_t attr, + Dartdispatch_queue_attr_t? attr, dispatch_autorelease_frequency_t frequency, ) { return objc.NSObject.castFromPointer( _dispatch_queue_attr_make_with_autorelease_frequency( - attr.ref.pointer, + attr?.ref.pointer ?? ffi.nullptr, frequency.value, ), retain: true, @@ -24168,13 +24187,13 @@ class NativeCupertinoHttp { dispatch_queue_attr_t Function(dispatch_queue_attr_t, int)>(); Dartdispatch_queue_attr_t dispatch_queue_attr_make_with_qos_class( - Dartdispatch_queue_attr_t attr, + Dartdispatch_queue_attr_t? attr, qos_class_t qos_class, int relative_priority, ) { return objc.NSObject.castFromPointer( _dispatch_queue_attr_make_with_qos_class( - attr.ref.pointer, + attr?.ref.pointer ?? ffi.nullptr, qos_class.value, relative_priority, ), @@ -24192,14 +24211,14 @@ class NativeCupertinoHttp { Dartdispatch_queue_t dispatch_queue_create_with_target( ffi.Pointer label, - Dartdispatch_queue_attr_t attr, - Dartdispatch_queue_t target, + Dartdispatch_queue_attr_t? attr, + Dartdispatch_queue_t? target, ) { return objc.NSObject.castFromPointer( _dispatch_queue_create_with_target( label, - attr.ref.pointer, - target.ref.pointer, + attr?.ref.pointer ?? ffi.nullptr, + target?.ref.pointer ?? ffi.nullptr, ), retain: false, release: true); @@ -24218,12 +24237,12 @@ class NativeCupertinoHttp { Dartdispatch_queue_t dispatch_queue_create( ffi.Pointer label, - Dartdispatch_queue_attr_t attr, + Dartdispatch_queue_attr_t? attr, ) { return objc.NSObject.castFromPointer( _dispatch_queue_create( label, - attr.ref.pointer, + attr?.ref.pointer ?? ffi.nullptr, ), retain: false, release: true); @@ -24238,10 +24257,10 @@ class NativeCupertinoHttp { ffi.Pointer, dispatch_queue_attr_t)>(); ffi.Pointer dispatch_queue_get_label( - Dartdispatch_queue_t queue, + Dartdispatch_queue_t? queue, ) { return _dispatch_queue_get_label( - queue.ref.pointer, + queue?.ref.pointer ?? ffi.nullptr, ); } @@ -24270,11 +24289,11 @@ class NativeCupertinoHttp { void dispatch_set_target_queue( Dartdispatch_object_t object, - Dartdispatch_queue_t queue, + Dartdispatch_queue_t? queue, ) { return _dispatch_set_target_queue( object.ref.pointer, - queue.ref.pointer, + queue?.ref.pointer ?? ffi.nullptr, ); } @@ -24871,14 +24890,14 @@ class NativeCupertinoHttp { dispatch_source_type_t type, int handle, int mask, - Dartdispatch_queue_t queue, + Dartdispatch_queue_t? queue, ) { return objc.NSObject.castFromPointer( _dispatch_source_create( type, handle, mask, - queue.ref.pointer, + queue?.ref.pointer ?? ffi.nullptr, ), retain: false, release: true); @@ -24894,11 +24913,11 @@ class NativeCupertinoHttp { void dispatch_source_set_event_handler( Dartdispatch_source_t source, - Dartdispatch_block_t handler, + Dartdispatch_block_t? handler, ) { return _dispatch_source_set_event_handler( source.ref.pointer, - handler.ref.pointer, + handler?.ref.pointer ?? ffi.nullptr, ); } @@ -24930,11 +24949,11 @@ class NativeCupertinoHttp { void dispatch_source_set_cancel_handler( Dartdispatch_source_t source, - Dartdispatch_block_t handler, + Dartdispatch_block_t? handler, ) { return _dispatch_source_set_cancel_handler( source.ref.pointer, - handler.ref.pointer, + handler?.ref.pointer ?? ffi.nullptr, ); } @@ -25074,11 +25093,11 @@ class NativeCupertinoHttp { void dispatch_source_set_registration_handler( Dartdispatch_source_t source, - Dartdispatch_block_t handler, + Dartdispatch_block_t? handler, ) { return _dispatch_source_set_registration_handler( source.ref.pointer, - handler.ref.pointer, + handler?.ref.pointer ?? ffi.nullptr, ); } @@ -25377,15 +25396,15 @@ class NativeCupertinoHttp { Dartdispatch_data_t dispatch_data_create( ffi.Pointer buffer, int size, - Dartdispatch_queue_t queue, - Dartdispatch_block_t destructor, + Dartdispatch_queue_t? queue, + Dartdispatch_block_t? destructor, ) { return objc.NSObject.castFromPointer( _dispatch_data_create( buffer, size, - queue.ref.pointer, - destructor.ref.pointer, + queue?.ref.pointer ?? ffi.nullptr, + destructor?.ref.pointer ?? ffi.nullptr, ), retain: false, release: true); @@ -25548,7 +25567,7 @@ class NativeCupertinoHttp { Dartdispatch_fd_t fd, Dartdispatch_data_t data, Dartdispatch_queue_t queue, - objc.ObjCBlock handler, + objc.ObjCBlock handler, ) { return _dispatch_write( fd, @@ -32789,12 +32808,12 @@ class NativeCupertinoHttp { DartSInt32 SecTrustEvaluateAsync( SecTrustRef trust, - Dartdispatch_queue_t queue, + Dartdispatch_queue_t? queue, DartSecTrustCallback result, ) { return _SecTrustEvaluateAsync( trust, - queue.ref.pointer, + queue?.ref.pointer ?? ffi.nullptr, result.ref.pointer, ); } @@ -33997,15 +34016,20 @@ class NativeCupertinoHttp { set kSecIdentityDomainKerberosKDC(CFStringRef value) => _kSecIdentityDomainKerberosKDC.value = value; - Dartsec_trust_t sec_trust_create( + Dartsec_trust_t? sec_trust_create( SecTrustRef trust, ) { - return objc.NSObject.castFromPointer( - _sec_trust_create( - trust, - ), - retain: false, - release: true); + return _sec_trust_create( + trust, + ).address == + 0 + ? null + : objc.NSObject.castFromPointer( + _sec_trust_create( + trust, + ), + retain: false, + release: true); } late final _sec_trust_createPtr = @@ -34028,15 +34052,20 @@ class NativeCupertinoHttp { late final _sec_trust_copy_ref = _sec_trust_copy_refPtr.asFunction(); - Dartsec_identity_t sec_identity_create( + Dartsec_identity_t? sec_identity_create( SecIdentityRef identity, ) { - return objc.NSObject.castFromPointer( - _sec_identity_create( - identity, - ), - retain: false, - release: true); + return _sec_identity_create( + identity, + ).address == + 0 + ? null + : objc.NSObject.castFromPointer( + _sec_identity_create( + identity, + ), + retain: false, + release: true); } late final _sec_identity_createPtr = @@ -34045,17 +34074,23 @@ class NativeCupertinoHttp { late final _sec_identity_create = _sec_identity_createPtr .asFunction(); - Dartsec_identity_t sec_identity_create_with_certificates( + Dartsec_identity_t? sec_identity_create_with_certificates( SecIdentityRef identity, CFArrayRef certificates, ) { - return objc.NSObject.castFromPointer( - _sec_identity_create_with_certificates( - identity, - certificates, - ), - retain: false, - release: true); + return _sec_identity_create_with_certificates( + identity, + certificates, + ).address == + 0 + ? null + : objc.NSObject.castFromPointer( + _sec_identity_create_with_certificates( + identity, + certificates, + ), + retain: false, + release: true); } late final _sec_identity_create_with_certificatesPtr = _lookup< @@ -34114,15 +34149,20 @@ class NativeCupertinoHttp { _sec_identity_copy_certificates_refPtr .asFunction(); - Dartsec_certificate_t sec_certificate_create( + Dartsec_certificate_t? sec_certificate_create( SecCertificateRef certificate, ) { - return objc.NSObject.castFromPointer( - _sec_certificate_create( - certificate, - ), - retain: false, - release: true); + return _sec_certificate_create( + certificate, + ).address == + 0 + ? null + : objc.NSObject.castFromPointer( + _sec_certificate_create( + certificate, + ), + retain: false, + release: true); } late final _sec_certificate_createPtr = _lookup< @@ -34161,15 +34201,20 @@ class NativeCupertinoHttp { _sec_protocol_metadata_get_negotiated_protocolPtr.asFunction< ffi.Pointer Function(sec_protocol_metadata_t)>(); - Dartdispatch_data_t sec_protocol_metadata_copy_peer_public_key( + Dartdispatch_data_t? sec_protocol_metadata_copy_peer_public_key( Dartsec_protocol_metadata_t metadata, ) { - return objc.NSObject.castFromPointer( - _sec_protocol_metadata_copy_peer_public_key( - metadata.ref.pointer, - ), - retain: false, - release: true); + return _sec_protocol_metadata_copy_peer_public_key( + metadata.ref.pointer, + ).address == + 0 + ? null + : objc.NSObject.castFromPointer( + _sec_protocol_metadata_copy_peer_public_key( + metadata.ref.pointer, + ), + retain: false, + release: true); } late final _sec_protocol_metadata_copy_peer_public_keyPtr = _lookup< @@ -34417,21 +34462,29 @@ class NativeCupertinoHttp { _sec_protocol_metadata_challenge_parameters_are_equalPtr.asFunction< bool Function(sec_protocol_metadata_t, sec_protocol_metadata_t)>(); - Dartdispatch_data_t sec_protocol_metadata_create_secret( + Dartdispatch_data_t? sec_protocol_metadata_create_secret( Dartsec_protocol_metadata_t metadata, int label_len, ffi.Pointer label, int exporter_length, ) { - return objc.NSObject.castFromPointer( - _sec_protocol_metadata_create_secret( - metadata.ref.pointer, - label_len, - label, - exporter_length, - ), - retain: false, - release: true); + return _sec_protocol_metadata_create_secret( + metadata.ref.pointer, + label_len, + label, + exporter_length, + ).address == + 0 + ? null + : objc.NSObject.castFromPointer( + _sec_protocol_metadata_create_secret( + metadata.ref.pointer, + label_len, + label, + exporter_length, + ), + retain: false, + release: true); } late final _sec_protocol_metadata_create_secretPtr = _lookup< @@ -34446,7 +34499,7 @@ class NativeCupertinoHttp { dispatch_data_t Function( sec_protocol_metadata_t, int, ffi.Pointer, int)>(); - Dartdispatch_data_t sec_protocol_metadata_create_secret_with_context( + Dartdispatch_data_t? sec_protocol_metadata_create_secret_with_context( Dartsec_protocol_metadata_t metadata, int label_len, ffi.Pointer label, @@ -34454,17 +34507,27 @@ class NativeCupertinoHttp { ffi.Pointer context, int exporter_length, ) { - return objc.NSObject.castFromPointer( - _sec_protocol_metadata_create_secret_with_context( - metadata.ref.pointer, - label_len, - label, - context_len, - context, - exporter_length, - ), - retain: false, - release: true); + return _sec_protocol_metadata_create_secret_with_context( + metadata.ref.pointer, + label_len, + label, + context_len, + context, + exporter_length, + ).address == + 0 + ? null + : objc.NSObject.castFromPointer( + _sec_protocol_metadata_create_secret_with_context( + metadata.ref.pointer, + label_len, + label, + context_len, + context, + exporter_length, + ), + retain: false, + release: true); } late final _sec_protocol_metadata_create_secret_with_contextPtr = _lookup< @@ -40439,234 +40502,330 @@ class NativeCupertinoHttp { @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_ksby9f( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_1pl9qdv( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_1jdvcbf( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_wjovn7( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_1krhfwz( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_tg5tbv( + ffi.Pointer block, +); + +@ffi.Native< + ffi.Pointer Function( + ffi.Pointer)>(isLeaf: true) +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_1dqvvol( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_hepzs( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_6enxqz( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_sjfpmz( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_qxvyq2( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_ukcdfq( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_9o8504( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_ttt6u1( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_12a4qua( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1txhfzs( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_gwxhxt( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1hmngv6( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_k73ff5( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_108ugvk( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_15f11yh( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1afulej( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_wjvic9( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_elldw5( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_91c9gi( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_129ffij( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_14pxqbs( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1458n52( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_1s56lr9( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_yo3tv0( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_1hcfngn( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1tjlcwl( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_16sve1d( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_10t0qpd( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_1f43wec( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_cmbt6k( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_1r3kn8f( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_117qins( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_ao4xm9( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_tenbla( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_mn1xu3( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_hfhq9m( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_13vswqm( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_tm2na8( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_37btrl( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1najo2h( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_12nszru( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1wmulza( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_qm01og( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_wnmjgj( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_1uuez7b( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1nnj9ov( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_9qxjkl( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_dmve6( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_3lo3bb( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_qxeqyf( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_16ko9u( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_jzggzf( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_1j2nt86( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1a6kixf( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_8wbg7l( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_ci81hw( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_148br51( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_1wl7fts( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_vhbh5h( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_no6pyg( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_zuf90e( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_10hgvcc( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_ovsamd( ffi.Pointer block, ); @ffi.Native< ffi.Pointer Function( ffi.Pointer)>(isLeaf: true) -external ffi.Pointer _wrapListenerBlock_19b8ge5( +external ffi.Pointer + _NativeCupertinoHttp_wrapListenerBlock_4ya7yd( ffi.Pointer block, ); +typedef __int8_t = ffi.SignedChar; +typedef Dart__int8_t = int; +typedef __uint8_t = ffi.UnsignedChar; +typedef Dart__uint8_t = int; +typedef __int16_t = ffi.Short; +typedef Dart__int16_t = int; +typedef __uint16_t = ffi.UnsignedShort; +typedef Dart__uint16_t = int; +typedef __int32_t = ffi.Int; +typedef Dart__int32_t = int; +typedef __uint32_t = ffi.UnsignedInt; +typedef Dart__uint32_t = int; +typedef __int64_t = ffi.LongLong; +typedef Dart__int64_t = int; +typedef __uint64_t = ffi.UnsignedLongLong; +typedef Dart__uint64_t = int; +typedef __darwin_intptr_t = ffi.Long; +typedef Dart__darwin_intptr_t = int; +typedef __darwin_natural_t = ffi.UnsignedInt; +typedef Dart__darwin_natural_t = int; +typedef __darwin_ct_rune_t = ffi.Int; +typedef Dart__darwin_ct_rune_t = int; + final class __mbstate_t extends ffi.Union { @ffi.Array.multi([128]) external ffi.Array __mbstate8; @@ -40675,6 +40834,46 @@ final class __mbstate_t extends ffi.Union { external int _mbstateL; } +typedef __darwin_mbstate_t = __mbstate_t; +typedef __darwin_ptrdiff_t = ffi.Long; +typedef Dart__darwin_ptrdiff_t = int; +typedef __darwin_size_t = ffi.UnsignedLong; +typedef Dart__darwin_size_t = int; +typedef __builtin_va_list = ffi.Pointer; +typedef __darwin_va_list = __builtin_va_list; +typedef __darwin_wchar_t = ffi.Int; +typedef Dart__darwin_wchar_t = int; +typedef __darwin_rune_t = __darwin_wchar_t; +typedef __darwin_wint_t = ffi.Int; +typedef Dart__darwin_wint_t = int; +typedef __darwin_clock_t = ffi.UnsignedLong; +typedef Dart__darwin_clock_t = int; +typedef __darwin_socklen_t = __uint32_t; +typedef __darwin_ssize_t = ffi.Long; +typedef Dart__darwin_ssize_t = int; +typedef __darwin_time_t = ffi.Long; +typedef Dart__darwin_time_t = int; +typedef __darwin_blkcnt_t = __int64_t; +typedef __darwin_blksize_t = __int32_t; +typedef __darwin_dev_t = __int32_t; +typedef __darwin_fsblkcnt_t = ffi.UnsignedInt; +typedef Dart__darwin_fsblkcnt_t = int; +typedef __darwin_fsfilcnt_t = ffi.UnsignedInt; +typedef Dart__darwin_fsfilcnt_t = int; +typedef __darwin_gid_t = __uint32_t; +typedef __darwin_id_t = __uint32_t; +typedef __darwin_ino64_t = __uint64_t; +typedef __darwin_ino_t = __darwin_ino64_t; +typedef __darwin_mach_port_name_t = __darwin_natural_t; +typedef __darwin_mach_port_t = __darwin_mach_port_name_t; +typedef __darwin_mode_t = __uint16_t; +typedef __darwin_off_t = __int64_t; +typedef __darwin_pid_t = __int32_t; +typedef __darwin_sigset_t = __uint32_t; +typedef __darwin_suseconds_t = __int32_t; +typedef __darwin_uid_t = __uint32_t; +typedef __darwin_useconds_t = __uint32_t; + final class __darwin_pthread_handler_rec extends ffi.Struct { external ffi .Pointer)>> @@ -40759,6 +40958,66 @@ final class _opaque_pthread_t extends ffi.Struct { external ffi.Array __opaque; } +typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; +typedef __darwin_pthread_cond_t = _opaque_pthread_cond_t; +typedef __darwin_pthread_condattr_t = _opaque_pthread_condattr_t; +typedef __darwin_pthread_key_t = ffi.UnsignedLong; +typedef Dart__darwin_pthread_key_t = int; +typedef __darwin_pthread_mutex_t = _opaque_pthread_mutex_t; +typedef __darwin_pthread_mutexattr_t = _opaque_pthread_mutexattr_t; +typedef __darwin_pthread_once_t = _opaque_pthread_once_t; +typedef __darwin_pthread_rwlock_t = _opaque_pthread_rwlock_t; +typedef __darwin_pthread_rwlockattr_t = _opaque_pthread_rwlockattr_t; +typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; +typedef __darwin_nl_item = ffi.Int; +typedef Dart__darwin_nl_item = int; +typedef __darwin_wctrans_t = ffi.Int; +typedef Dart__darwin_wctrans_t = int; +typedef __darwin_wctype_t = __uint32_t; + +enum idtype_t { + P_ALL(0), + P_PID(1), + P_PGID(2); + + final int value; + const idtype_t(this.value); + + static idtype_t fromValue(int value) => switch (value) { + 0 => P_ALL, + 1 => P_PID, + 2 => P_PGID, + _ => throw ArgumentError("Unknown value for idtype_t: $value"), + }; +} + +typedef pid_t = __darwin_pid_t; +typedef id_t = __darwin_id_t; +typedef sig_atomic_t = ffi.Int; +typedef Dartsig_atomic_t = int; +typedef u_int8_t = ffi.UnsignedChar; +typedef Dartu_int8_t = int; +typedef u_int16_t = ffi.UnsignedShort; +typedef Dartu_int16_t = int; +typedef u_int32_t = ffi.UnsignedInt; +typedef Dartu_int32_t = int; +typedef u_int64_t = ffi.UnsignedLongLong; +typedef Dartu_int64_t = int; +typedef register_t = ffi.Int64; +typedef Dartregister_t = int; +typedef user_addr_t = u_int64_t; +typedef user_size_t = u_int64_t; +typedef user_ssize_t = ffi.Int64; +typedef Dartuser_ssize_t = int; +typedef user_long_t = ffi.Int64; +typedef Dartuser_long_t = int; +typedef user_ulong_t = u_int64_t; +typedef user_time_t = ffi.Int64; +typedef Dartuser_time_t = int; +typedef user_off_t = ffi.Int64; +typedef Dartuser_off_t = int; +typedef syscall_arg_t = u_int64_t; + final class __darwin_arm_exception_state extends ffi.Struct { @__uint32_t() external int __exception; @@ -40770,9 +41029,6 @@ final class __darwin_arm_exception_state extends ffi.Struct { external int __far; } -typedef __uint32_t = ffi.UnsignedInt; -typedef Dart__uint32_t = int; - final class __darwin_arm_exception_state64 extends ffi.Struct { @__uint64_t() external int __far; @@ -40784,9 +41040,6 @@ final class __darwin_arm_exception_state64 extends ffi.Struct { external int __exception; } -typedef __uint64_t = ffi.UnsignedLongLong; -typedef Dart__uint64_t = int; - final class __darwin_arm_thread_state extends ffi.Struct { @ffi.Array.multi([13]) external ffi.Array<__uint32_t> __r; @@ -40907,6 +41160,9 @@ final class __darwin_mcontext32 extends ffi.Struct { final class __darwin_mcontext64 extends ffi.Opaque {} +typedef mcontext_t = ffi.Pointer<__darwin_mcontext64>; +typedef pthread_attr_t = __darwin_pthread_attr_t; + final class __darwin_sigaltstack extends ffi.Struct { external ffi.Pointer ss_sp; @@ -40917,8 +41173,7 @@ final class __darwin_sigaltstack extends ffi.Struct { external int ss_flags; } -typedef __darwin_size_t = ffi.UnsignedLong; -typedef Dart__darwin_size_t = int; +typedef stack_t = __darwin_sigaltstack; final class __darwin_ucontext extends ffi.Struct { @ffi.Int() @@ -40937,7 +41192,9 @@ final class __darwin_ucontext extends ffi.Struct { external ffi.Pointer<__darwin_mcontext64> uc_mcontext; } -typedef __darwin_sigset_t = __uint32_t; +typedef ucontext_t = __darwin_ucontext; +typedef sigset_t = __darwin_sigset_t; +typedef uid_t = __darwin_uid_t; final class sigval extends ffi.Union { @ffi.Int() @@ -40961,9 +41218,6 @@ final class sigevent extends ffi.Struct { external ffi.Pointer sigev_notify_attributes; } -typedef pthread_attr_t = __darwin_pthread_attr_t; -typedef __darwin_pthread_attr_t = _opaque_pthread_attr_t; - final class __siginfo extends ffi.Struct { @ffi.Int() external int si_signo; @@ -40994,12 +41248,7 @@ final class __siginfo extends ffi.Struct { external ffi.Array __pad; } -typedef pid_t = __darwin_pid_t; -typedef __darwin_pid_t = __int32_t; -typedef __int32_t = ffi.Int; -typedef Dart__int32_t = int; -typedef uid_t = __darwin_uid_t; -typedef __darwin_uid_t = __uint32_t; +typedef siginfo_t = __siginfo; final class __sigaction_u extends ffi.Union { external ffi.Pointer> @@ -41027,9 +41276,6 @@ final class __sigaction extends ffi.Struct { external int sa_flags; } -typedef siginfo_t = __siginfo; -typedef sigset_t = __darwin_sigset_t; - final class sigaction extends ffi.Struct { external __sigaction_u __sigaction_u1; @@ -41040,6 +41286,10 @@ final class sigaction extends ffi.Struct { external int sa_flags; } +typedef sig_tFunction = ffi.Void Function(ffi.Int); +typedef Dartsig_tFunction = void Function(int); +typedef sig_t = ffi.Pointer>; + final class sigvec extends ffi.Struct { external ffi.Pointer> sv_handler; @@ -41058,6 +41308,43 @@ final class sigstack extends ffi.Struct { external int ss_onstack; } +typedef int_least8_t = ffi.Int8; +typedef Dartint_least8_t = int; +typedef int_least16_t = ffi.Int16; +typedef Dartint_least16_t = int; +typedef int_least32_t = ffi.Int32; +typedef Dartint_least32_t = int; +typedef int_least64_t = ffi.Int64; +typedef Dartint_least64_t = int; +typedef uint_least8_t = ffi.Uint8; +typedef Dartuint_least8_t = int; +typedef uint_least16_t = ffi.Uint16; +typedef Dartuint_least16_t = int; +typedef uint_least32_t = ffi.Uint32; +typedef Dartuint_least32_t = int; +typedef uint_least64_t = ffi.Uint64; +typedef Dartuint_least64_t = int; +typedef int_fast8_t = ffi.Int8; +typedef Dartint_fast8_t = int; +typedef int_fast16_t = ffi.Int16; +typedef Dartint_fast16_t = int; +typedef int_fast32_t = ffi.Int32; +typedef Dartint_fast32_t = int; +typedef int_fast64_t = ffi.Int64; +typedef Dartint_fast64_t = int; +typedef uint_fast8_t = ffi.Uint8; +typedef Dartuint_fast8_t = int; +typedef uint_fast16_t = ffi.Uint16; +typedef Dartuint_fast16_t = int; +typedef uint_fast32_t = ffi.Uint32; +typedef Dartuint_fast32_t = int; +typedef uint_fast64_t = ffi.Uint64; +typedef Dartuint_fast64_t = int; +typedef intmax_t = ffi.Long; +typedef Dartintmax_t = int; +typedef uintmax_t = ffi.UnsignedLong; +typedef Dartuintmax_t = int; + final class timeval extends ffi.Struct { @__darwin_time_t() external int tv_sec; @@ -41066,9 +41353,7 @@ final class timeval extends ffi.Struct { external int tv_usec; } -typedef __darwin_time_t = ffi.Long; -typedef Dart__darwin_time_t = int; -typedef __darwin_suseconds_t = __int32_t; +typedef rlim_t = __uint64_t; final class rusage extends ffi.Struct { external timeval ru_utime; @@ -41118,6 +41403,8 @@ final class rusage extends ffi.Struct { external int ru_nivcsw; } +typedef rusage_info_t = ffi.Pointer; + final class rusage_info_v0 extends ffi.Struct { @ffi.Array.multi([16]) external ffi.Array ri_uuid; @@ -41714,6 +42001,8 @@ final class rusage_info_v6 extends ffi.Struct { external ffi.Array ri_reserved; } +typedef rusage_info_current = rusage_info_v6; + final class rlimit extends ffi.Struct { @rlim_t() external int rlim_cur; @@ -41722,8 +42011,6 @@ final class rlimit extends ffi.Struct { external int rlim_max; } -typedef rlim_t = __uint64_t; - final class proc_rlimit_control_wakeupmon extends ffi.Struct { @ffi.Uint32() external int wm_flags; @@ -41732,9 +42019,6 @@ final class proc_rlimit_control_wakeupmon extends ffi.Struct { external int wm_rate; } -typedef id_t = __darwin_id_t; -typedef __darwin_id_t = __uint32_t; - @ffi.Packed(1) final class _OSUnalignedU16 extends ffi.Struct { @ffi.Uint16() @@ -41755,21 +42039,8 @@ final class _OSUnalignedU64 extends ffi.Struct { final class wait extends ffi.Opaque {} -enum idtype_t { - P_ALL(0), - P_PID(1), - P_PGID(2); - - final int value; - const idtype_t(this.value); - - static idtype_t fromValue(int value) => switch (value) { - 0 => P_ALL, - 1 => P_PID, - 2 => P_PGID, - _ => throw ArgumentError("Unknown value for idtype_t: $value"), - }; -} +typedef ct_rune_t = __darwin_ct_rune_t; +typedef rune_t = __darwin_rune_t; final class div_t extends ffi.Struct { @ffi.Int() @@ -41801,6 +42072,8 @@ typedef Dartmalloc_type_id_t = int; final class _malloc_zone_t extends ffi.Opaque {} typedef malloc_zone_t = _malloc_zone_t; +typedef dev_t = __darwin_dev_t; +typedef mode_t = __darwin_mode_t; void _ObjCBlock_ffiVoid_fnPtrTrampoline( ffi.Pointer block, ) => @@ -41877,7 +42150,7 @@ abstract final class ObjCBlock_ffiVoid { static objc.ObjCBlock listener(void Function() fn) { final raw = objc.newClosureBlock( _ObjCBlock_ffiVoid_listenerCallable.nativeFunction.cast(), () => fn()); - final wrapper = _wrapListenerBlock_ksby9f(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1pl9qdv(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock(wrapper, retain: false, release: true); @@ -41992,18 +42265,70 @@ extension ObjCBlock_ffiInt_ffiVoid_ffiVoid_CallExtension on objc ffi.Pointer)>()(ref.pointer, arg0, arg1); } -typedef dev_t = __darwin_dev_t; -typedef __darwin_dev_t = __int32_t; -typedef mode_t = __darwin_mode_t; -typedef __darwin_mode_t = __uint16_t; -typedef __uint16_t = ffi.UnsignedShort; -typedef Dart__uint16_t = int; +typedef ptrdiff_t = ffi.Long; +typedef Dartptrdiff_t = int; +typedef rsize_t = ffi.UnsignedLong; +typedef Dartrsize_t = int; +typedef u_char = ffi.UnsignedChar; +typedef Dartu_char = int; +typedef u_short = ffi.UnsignedShort; +typedef Dartu_short = int; +typedef u_int = ffi.UnsignedInt; +typedef Dartu_int = int; +typedef u_long = ffi.UnsignedLong; +typedef Dartu_long = int; +typedef ushort = ffi.UnsignedShort; +typedef Dartushort = int; +typedef uint = ffi.UnsignedInt; +typedef Dartuint = int; +typedef u_quad_t = u_int64_t; +typedef quad_t = ffi.Int64; +typedef Dartquad_t = int; +typedef qaddr_t = ffi.Pointer; +typedef caddr_t = ffi.Pointer; +typedef daddr_t = ffi.Int32; +typedef Dartdaddr_t = int; +typedef fixpt_t = u_int32_t; +typedef blkcnt_t = __darwin_blkcnt_t; +typedef blksize_t = __darwin_blksize_t; +typedef gid_t = __darwin_gid_t; +typedef in_addr_t = __uint32_t; +typedef in_port_t = __uint16_t; +typedef ino_t = __darwin_ino_t; +typedef ino64_t = __darwin_ino64_t; +typedef key_t = __int32_t; +typedef nlink_t = __uint16_t; +typedef off_t = __darwin_off_t; +typedef segsz_t = ffi.Int32; +typedef Dartsegsz_t = int; +typedef swblk_t = ffi.Int32; +typedef Dartswblk_t = int; +typedef clock_t = __darwin_clock_t; +typedef ssize_t = __darwin_ssize_t; +typedef time_t = __darwin_time_t; +typedef useconds_t = __darwin_useconds_t; +typedef suseconds_t = __darwin_suseconds_t; +typedef errno_t = ffi.Int; +typedef Darterrno_t = int; final class fd_set extends ffi.Struct { @ffi.Array.multi([32]) external ffi.Array<__int32_t> fds_bits; } +typedef fd_mask = __int32_t; +typedef pthread_cond_t = __darwin_pthread_cond_t; +typedef pthread_condattr_t = __darwin_pthread_condattr_t; +typedef pthread_mutex_t = __darwin_pthread_mutex_t; +typedef pthread_mutexattr_t = __darwin_pthread_mutexattr_t; +typedef pthread_once_t = __darwin_pthread_once_t; +typedef pthread_rwlock_t = __darwin_pthread_rwlock_t; +typedef pthread_rwlockattr_t = __darwin_pthread_rwlockattr_t; +typedef pthread_t = __darwin_pthread_t; +typedef pthread_key_t = __darwin_pthread_key_t; +typedef fsblkcnt_t = __darwin_fsblkcnt_t; +typedef fsfilcnt_t = __darwin_fsfilcnt_t; + final class objc_class extends ffi.Opaque {} final class objc_object extends ffi.Struct { @@ -42012,1961 +42337,412 @@ final class objc_object extends ffi.Struct { final class objc_selector extends ffi.Opaque {} +typedef IMPFunction = ffi.Void Function(); +typedef DartIMPFunction = void Function(); +typedef IMP = ffi.Pointer>; +typedef objc_zone_t = ffi.Pointer<_malloc_zone_t>; typedef objc_objectptr_t = ffi.Pointer; +typedef NSInteger = ffi.Long; +typedef DartNSInteger = int; +typedef NSUInteger = ffi.UnsignedLong; +typedef DartNSUInteger = int; -/// NSObject -abstract final class NSObject { - /// Builds an object that implements the NSObject protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {required bool Function(objc.ObjCObjectBase) isEqual_, - required objc.ObjCObjectBase Function() class1, - required objc.ObjCObjectBase Function() self, - required objc.ObjCObjectBase Function(ffi.Pointer) - performSelector_, - required objc.ObjCObjectBase Function( - ffi.Pointer, objc.ObjCObjectBase) - performSelector_withObject_, - required objc.ObjCObjectBase Function(ffi.Pointer, - objc.ObjCObjectBase, objc.ObjCObjectBase) - performSelector_withObject_withObject_, - required bool Function() isProxy, - required bool Function(objc.ObjCObjectBase) isKindOfClass_, - required bool Function(objc.ObjCObjectBase) isMemberOfClass_, - required bool Function(objc.Protocol) conformsToProtocol_, - required bool Function(ffi.Pointer) - respondsToSelector_, - required objc.ObjCObjectBase Function() retain, - required void Function() release, - required objc.ObjCObjectBase Function() autorelease, - required DartNSUInteger Function() retainCount, - required ffi.Pointer<_NSZone> Function() zone, - required DartNSUInteger Function() hash, - required objc.ObjCObjectBase Function() superclass, - required objc.NSString Function() description, - objc.NSString Function()? debugDescription}) { - final builder = objc.ObjCProtocolBuilder(); - NSObject.isEqual_.implement(builder, isEqual_); - NSObject.class1.implement(builder, class1); - NSObject.self.implement(builder, self); - NSObject.performSelector_.implement(builder, performSelector_); - NSObject.performSelector_withObject_ - .implement(builder, performSelector_withObject_); - NSObject.performSelector_withObject_withObject_ - .implement(builder, performSelector_withObject_withObject_); - NSObject.isProxy.implement(builder, isProxy); - NSObject.isKindOfClass_.implement(builder, isKindOfClass_); - NSObject.isMemberOfClass_.implement(builder, isMemberOfClass_); - NSObject.conformsToProtocol_.implement(builder, conformsToProtocol_); - NSObject.respondsToSelector_.implement(builder, respondsToSelector_); - NSObject.retain.implement(builder, retain); - NSObject.release.implement(builder, release); - NSObject.autorelease.implement(builder, autorelease); - NSObject.retainCount.implement(builder, retainCount); - NSObject.zone.implement(builder, zone); - NSObject.hash.implement(builder, hash); - NSObject.superclass.implement(builder, superclass); - NSObject.description.implement(builder, description); - NSObject.debugDescription.implement(builder, debugDescription); - return builder.build(); - } - - /// Adds the implementation of the NSObject protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {required bool Function(objc.ObjCObjectBase) isEqual_, - required objc.ObjCObjectBase Function() class1, - required objc.ObjCObjectBase Function() self, - required objc.ObjCObjectBase Function(ffi.Pointer) - performSelector_, - required objc.ObjCObjectBase Function( - ffi.Pointer, objc.ObjCObjectBase) - performSelector_withObject_, - required objc.ObjCObjectBase Function(ffi.Pointer, - objc.ObjCObjectBase, objc.ObjCObjectBase) - performSelector_withObject_withObject_, - required bool Function() isProxy, - required bool Function(objc.ObjCObjectBase) isKindOfClass_, - required bool Function(objc.ObjCObjectBase) isMemberOfClass_, - required bool Function(objc.Protocol) conformsToProtocol_, - required bool Function(ffi.Pointer) - respondsToSelector_, - required objc.ObjCObjectBase Function() retain, - required void Function() release, - required objc.ObjCObjectBase Function() autorelease, - required DartNSUInteger Function() retainCount, - required ffi.Pointer<_NSZone> Function() zone, - required DartNSUInteger Function() hash, - required objc.ObjCObjectBase Function() superclass, - required objc.NSString Function() description, - objc.NSString Function()? debugDescription}) { - NSObject.isEqual_.implement(builder, isEqual_); - NSObject.class1.implement(builder, class1); - NSObject.self.implement(builder, self); - NSObject.performSelector_.implement(builder, performSelector_); - NSObject.performSelector_withObject_ - .implement(builder, performSelector_withObject_); - NSObject.performSelector_withObject_withObject_ - .implement(builder, performSelector_withObject_withObject_); - NSObject.isProxy.implement(builder, isProxy); - NSObject.isKindOfClass_.implement(builder, isKindOfClass_); - NSObject.isMemberOfClass_.implement(builder, isMemberOfClass_); - NSObject.conformsToProtocol_.implement(builder, conformsToProtocol_); - NSObject.respondsToSelector_.implement(builder, respondsToSelector_); - NSObject.retain.implement(builder, retain); - NSObject.release.implement(builder, release); - NSObject.autorelease.implement(builder, autorelease); - NSObject.retainCount.implement(builder, retainCount); - NSObject.zone.implement(builder, zone); - NSObject.hash.implement(builder, hash); - NSObject.superclass.implement(builder, superclass); - NSObject.description.implement(builder, description); - NSObject.debugDescription.implement(builder, debugDescription); - } - - /// Builds an object that implements the NSObject protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - static objc.ObjCObjectBase implementAsListener( - {required bool Function(objc.ObjCObjectBase) isEqual_, - required objc.ObjCObjectBase Function() class1, - required objc.ObjCObjectBase Function() self, - required objc.ObjCObjectBase Function(ffi.Pointer) - performSelector_, - required objc.ObjCObjectBase Function( - ffi.Pointer, objc.ObjCObjectBase) - performSelector_withObject_, - required objc.ObjCObjectBase Function(ffi.Pointer, - objc.ObjCObjectBase, objc.ObjCObjectBase) - performSelector_withObject_withObject_, - required bool Function() isProxy, - required bool Function(objc.ObjCObjectBase) isKindOfClass_, - required bool Function(objc.ObjCObjectBase) isMemberOfClass_, - required bool Function(objc.Protocol) conformsToProtocol_, - required bool Function(ffi.Pointer) - respondsToSelector_, - required objc.ObjCObjectBase Function() retain, - required void Function() release, - required objc.ObjCObjectBase Function() autorelease, - required DartNSUInteger Function() retainCount, - required ffi.Pointer<_NSZone> Function() zone, - required DartNSUInteger Function() hash, - required objc.ObjCObjectBase Function() superclass, - required objc.NSString Function() description, - objc.NSString Function()? debugDescription}) { - final builder = objc.ObjCProtocolBuilder(); - NSObject.isEqual_.implement(builder, isEqual_); - NSObject.class1.implement(builder, class1); - NSObject.self.implement(builder, self); - NSObject.performSelector_.implement(builder, performSelector_); - NSObject.performSelector_withObject_ - .implement(builder, performSelector_withObject_); - NSObject.performSelector_withObject_withObject_ - .implement(builder, performSelector_withObject_withObject_); - NSObject.isProxy.implement(builder, isProxy); - NSObject.isKindOfClass_.implement(builder, isKindOfClass_); - NSObject.isMemberOfClass_.implement(builder, isMemberOfClass_); - NSObject.conformsToProtocol_.implement(builder, conformsToProtocol_); - NSObject.respondsToSelector_.implement(builder, respondsToSelector_); - NSObject.retain.implement(builder, retain); - NSObject.release.implementAsListener(builder, release); - NSObject.autorelease.implement(builder, autorelease); - NSObject.retainCount.implement(builder, retainCount); - NSObject.zone.implement(builder, zone); - NSObject.hash.implement(builder, hash); - NSObject.superclass.implement(builder, superclass); - NSObject.description.implement(builder, description); - NSObject.debugDescription.implement(builder, debugDescription); - return builder.build(); - } - - /// Adds the implementation of the NSObject protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, - {required bool Function(objc.ObjCObjectBase) isEqual_, - required objc.ObjCObjectBase Function() class1, - required objc.ObjCObjectBase Function() self, - required objc.ObjCObjectBase Function(ffi.Pointer) - performSelector_, - required objc.ObjCObjectBase Function( - ffi.Pointer, objc.ObjCObjectBase) - performSelector_withObject_, - required objc.ObjCObjectBase Function(ffi.Pointer, - objc.ObjCObjectBase, objc.ObjCObjectBase) - performSelector_withObject_withObject_, - required bool Function() isProxy, - required bool Function(objc.ObjCObjectBase) isKindOfClass_, - required bool Function(objc.ObjCObjectBase) isMemberOfClass_, - required bool Function(objc.Protocol) conformsToProtocol_, - required bool Function(ffi.Pointer) - respondsToSelector_, - required objc.ObjCObjectBase Function() retain, - required void Function() release, - required objc.ObjCObjectBase Function() autorelease, - required DartNSUInteger Function() retainCount, - required ffi.Pointer<_NSZone> Function() zone, - required DartNSUInteger Function() hash, - required objc.ObjCObjectBase Function() superclass, - required objc.NSString Function() description, - objc.NSString Function()? debugDescription}) { - NSObject.isEqual_.implement(builder, isEqual_); - NSObject.class1.implement(builder, class1); - NSObject.self.implement(builder, self); - NSObject.performSelector_.implement(builder, performSelector_); - NSObject.performSelector_withObject_ - .implement(builder, performSelector_withObject_); - NSObject.performSelector_withObject_withObject_ - .implement(builder, performSelector_withObject_withObject_); - NSObject.isProxy.implement(builder, isProxy); - NSObject.isKindOfClass_.implement(builder, isKindOfClass_); - NSObject.isMemberOfClass_.implement(builder, isMemberOfClass_); - NSObject.conformsToProtocol_.implement(builder, conformsToProtocol_); - NSObject.respondsToSelector_.implement(builder, respondsToSelector_); - NSObject.retain.implement(builder, retain); - NSObject.release.implementAsListener(builder, release); - NSObject.autorelease.implement(builder, autorelease); - NSObject.retainCount.implement(builder, retainCount); - NSObject.zone.implement(builder, zone); - NSObject.hash.implement(builder, hash); - NSObject.superclass.implement(builder, superclass); - NSObject.description.implement(builder, description); - NSObject.debugDescription.implement(builder, debugDescription); - } - - /// isEqual: - static final isEqual_ = - objc.ObjCProtocolMethod( - _sel_isEqual_, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_isEqual_, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function(objc.ObjCObjectBase) func) => - ObjCBlock_bool_ffiVoid_objcObjCObject.fromFunction( - (ffi.Pointer _, objc.ObjCObjectBase arg1) => func(arg1)), - ); - - /// class - static final class1 = objc.ObjCProtocolMethod( - _sel_class, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_class, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObjectBase Function() func) => - ObjCBlock_objcObjCObject_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); - - /// self - static final self = objc.ObjCProtocolMethod( - _sel_self, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_self, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObjectBase Function() func) => - ObjCBlock_objcObjCObject_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); - - /// performSelector: - static final performSelector_ = objc.ObjCProtocolMethod< - objc.ObjCObjectBase Function(ffi.Pointer)>( - _sel_performSelector_, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_performSelector_, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObjectBase Function(ffi.Pointer) func) => - ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector.fromFunction( - (ffi.Pointer _, ffi.Pointer arg1) => - func(arg1)), - ); - - /// performSelector:withObject: - static final performSelector_withObject_ = objc.ObjCProtocolMethod< - objc.ObjCObjectBase Function( - ffi.Pointer, objc.ObjCObjectBase)>( - _sel_performSelector_withObject_, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_performSelector_withObject_, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObjectBase Function( - ffi.Pointer, objc.ObjCObjectBase) - func) => - ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject - .fromFunction((ffi.Pointer _, - ffi.Pointer arg1, - objc.ObjCObjectBase arg2) => - func(arg1, arg2)), - ); - - /// performSelector:withObject:withObject: - static final performSelector_withObject_withObject_ = objc.ObjCProtocolMethod< - objc.ObjCObjectBase Function(ffi.Pointer, - objc.ObjCObjectBase, objc.ObjCObjectBase)>( - _sel_performSelector_withObject_withObject_, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_performSelector_withObject_withObject_, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObjectBase Function(ffi.Pointer, - objc.ObjCObjectBase, objc.ObjCObjectBase) - func) => - ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject - .fromFunction((ffi.Pointer _, - ffi.Pointer arg1, - objc.ObjCObjectBase arg2, - objc.ObjCObjectBase arg3) => - func(arg1, arg2, arg3)), - ); - - /// isProxy - static final isProxy = objc.ObjCProtocolMethod( - _sel_isProxy, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_isProxy, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function() func) => ObjCBlock_bool_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); - - /// isKindOfClass: - static final isKindOfClass_ = - objc.ObjCProtocolMethod( - _sel_isKindOfClass_, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_isKindOfClass_, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function(objc.ObjCObjectBase) func) => - ObjCBlock_bool_ffiVoid_objcObjCObject.fromFunction( - (ffi.Pointer _, objc.ObjCObjectBase arg1) => func(arg1)), - ); - - /// isMemberOfClass: - static final isMemberOfClass_ = - objc.ObjCProtocolMethod( - _sel_isMemberOfClass_, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_isMemberOfClass_, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function(objc.ObjCObjectBase) func) => - ObjCBlock_bool_ffiVoid_objcObjCObject.fromFunction( - (ffi.Pointer _, objc.ObjCObjectBase arg1) => func(arg1)), - ); - - /// conformsToProtocol: - static final conformsToProtocol_ = - objc.ObjCProtocolMethod( - _sel_conformsToProtocol_, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_conformsToProtocol_, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function(objc.Protocol) func) => - ObjCBlock_bool_ffiVoid_Protocol.fromFunction( - (ffi.Pointer _, objc.Protocol arg1) => func(arg1)), - ); - - /// respondsToSelector: - static final respondsToSelector_ = - objc.ObjCProtocolMethod)>( - _sel_respondsToSelector_, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_respondsToSelector_, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function(ffi.Pointer) func) => - ObjCBlock_bool_ffiVoid_objcObjCSelector.fromFunction( - (ffi.Pointer _, ffi.Pointer arg1) => - func(arg1)), - ); - - /// retain - static final retain = objc.ObjCProtocolMethod( - _sel_retain, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_retain, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObjectBase Function() func) => - ObjCBlock_objcObjCObject_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); - - /// release - static final release = objc.ObjCProtocolListenableMethod( - _sel_release, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_release, - isRequired: true, - isInstanceMethod: true, - ), - (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.listener(( - ffi.Pointer _, - ) => - func()), - ); - - /// autorelease - static final autorelease = - objc.ObjCProtocolMethod( - _sel_autorelease, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_autorelease, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObjectBase Function() func) => - ObjCBlock_objcObjCObject_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); - - /// retainCount - static final retainCount = objc.ObjCProtocolMethod( - _sel_retainCount, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_retainCount, - isRequired: true, - isInstanceMethod: true, - ), - (DartNSUInteger Function() func) => - ObjCBlock_NSUInteger_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); - - /// zone - static final zone = objc.ObjCProtocolMethod Function()>( - _sel_zone, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_zone, - isRequired: true, - isInstanceMethod: true, - ), - (ffi.Pointer<_NSZone> Function() func) => - ObjCBlock_NSZone_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); - - /// hash - static final hash = objc.ObjCProtocolMethod( - _sel_hash, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_hash, - isRequired: true, - isInstanceMethod: true, - ), - (DartNSUInteger Function() func) => - ObjCBlock_NSUInteger_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); - - /// superclass - static final superclass = - objc.ObjCProtocolMethod( - _sel_superclass, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_superclass, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObjectBase Function() func) => - ObjCBlock_objcObjCObject_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); - - /// description - static final description = objc.ObjCProtocolMethod( - _sel_description, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_description, - isRequired: true, - isInstanceMethod: true, - ), - (objc.NSString Function() func) => ObjCBlock_NSString_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); - - /// debugDescription - static final debugDescription = - objc.ObjCProtocolMethod( - _sel_debugDescription, - objc.getProtocolMethodSignature( - _protocol_NSObject, - _sel_debugDescription, - isRequired: false, - isInstanceMethod: true, - ), - (objc.NSString Function() func) => ObjCBlock_NSString_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); -} +final class _NSZone extends ffi.Opaque {} -late final _protocol_NSObject = objc.getProtocol("NSObject"); -late final _sel_isEqual_ = objc.registerName("isEqual:"); -bool _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline( +typedef va_list = __builtin_va_list; +typedef __gnuc_va_list = __builtin_va_list; +typedef NSExceptionName = ffi.Pointer; +typedef DartNSExceptionName = objc.NSString; +typedef NSRunLoopMode = ffi.Pointer; +typedef DartNSRunLoopMode = objc.NSString; +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1) => block.ref.target .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, + NSInteger Function(ffi.Pointer arg0, ffi.Pointer arg1)>>() .asFunction< - bool Function(ffi.Pointer, + int Function(ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable = +ffi.Pointer + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrTrampoline, false) + NSInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline, + 0) .cast(); -bool _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline( +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1) => - (objc.getBlockClosure(block) as bool Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable = + (objc.getBlockClosure(block) as int Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureCallable = ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_objcObjCObject_closureTrampoline, false) + NSInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline, + 0) .cast(); -/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_ffiVoid_objcObjCObject { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)> + NSInteger Function( + ffi.Pointer, ffi.Pointer)> castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>( - pointer, - retain: retain, - release: release); + NSInteger Function(ffi.Pointer, + ffi.Pointer)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock, ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_objcObjCObject_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + static objc + .ObjCBlock, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + objc.ObjCBlock< + NSInteger Function(ffi.Pointer, + ffi.Pointer)>( + objc.newPointerBlock( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer)> - fromFunction( - bool Function(ffi.Pointer, objc.ObjCObjectBase) fn) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>( + static objc.ObjCBlock, ffi.Pointer)> + fromFunction(objc.NSComparisonResult Function(objc.ObjCObjectBase, objc.ObjCObjectBase) fn) => + objc.ObjCBlock, ffi.Pointer)>( objc.newClosureBlock( - _ObjCBlock_bool_ffiVoid_objcObjCObject_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, objc.ObjCObjectBase(arg1, retain: true, release: true))), + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(objc.ObjCObjectBase(arg0, retain: true, release: true), + objc.ObjCObjectBase(arg1, retain: true, release: true)) + .value), retain: false, release: true); } -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ffiVoid_objcObjCObject_CallExtension on objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, ffi.Pointer)> { - bool call(ffi.Pointer arg0, objc.ObjCObjectBase arg1) => - ref.pointer.ref.invoke +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_CallExtension + on objc.ObjCBlock< + NSInteger Function( + ffi.Pointer, ffi.Pointer)> { + objc.NSComparisonResult call( + objc.ObjCObjectBase arg0, objc.ObjCObjectBase arg1) => + objc.NSComparisonResult.fromValue(ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Bool Function( + NSInteger Function( ffi.Pointer block, - ffi.Pointer arg0, + ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer); + .asFunction, ffi.Pointer, ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer)); } -late final _sel_class = objc.registerName("class"); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer)>()(arg0); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline) - .cast(); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline) - .cast(); +typedef NSComparator = ffi.Pointer; +typedef DartNSComparator = objc.ObjCBlock< + NSInteger Function( + ffi.Pointer, ffi.Pointer)>; -/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. -abstract final class ObjCBlock_objcObjCObject_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc - .ObjCBlock Function(ffi.Pointer)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Pointer Function(ffi.Pointer)>( - pointer, - retain: retain, - release: release); +enum NSQualityOfService { + NSQualityOfServiceUserInteractive(33), + NSQualityOfServiceUserInitiated(25), + NSQualityOfServiceUtility(17), + NSQualityOfServiceBackground(9), + NSQualityOfServiceDefault(-1); - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock Function(ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + final int value; + const NSQualityOfService(this.value); - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc - .ObjCBlock Function(ffi.Pointer)> - fromFunction(objc.ObjCObjectBase Function(ffi.Pointer) fn) => - objc.ObjCBlock< - ffi.Pointer Function(ffi.Pointer)>( - objc.newClosureBlock( - _ObjCBlock_objcObjCObject_ffiVoid_closureCallable, - (ffi.Pointer arg0) => - fn(arg0).ref.retainAndAutorelease()), - retain: false, - release: true); + static NSQualityOfService fromValue(int value) => switch (value) { + 33 => NSQualityOfServiceUserInteractive, + 25 => NSQualityOfServiceUserInitiated, + 17 => NSQualityOfServiceUtility, + 9 => NSQualityOfServiceBackground, + -1 => NSQualityOfServiceDefault, + _ => + throw ArgumentError("Unknown value for NSQualityOfService: $value"), + }; } -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_CallExtension on objc - .ObjCBlock Function(ffi.Pointer)> { - objc.ObjCObjectBase call(ffi.Pointer arg0) => objc.ObjCObjectBase( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0), - retain: true, - release: true); -} +typedef ptrauth_extra_data_t = ffi.UnsignedLong; +typedef Dartptrauth_extra_data_t = int; +typedef ptrauth_generic_signature_t = ffi.UnsignedLong; +typedef Dartptrauth_generic_signature_t = int; +typedef UInt8 = ffi.UnsignedChar; +typedef DartUInt8 = int; +typedef SInt8 = ffi.SignedChar; +typedef DartSInt8 = int; +typedef UInt16 = ffi.UnsignedShort; +typedef DartUInt16 = int; +typedef SInt16 = ffi.Short; +typedef DartSInt16 = int; +typedef UInt32 = ffi.UnsignedInt; +typedef DartUInt32 = int; +typedef SInt32 = ffi.Int; +typedef DartSInt32 = int; -typedef instancetype = ffi.Pointer; -typedef Dartinstancetype = objc.ObjCObjectBase; -late final _sel_self = objc.registerName("self"); -late final _sel_performSelector_ = objc.registerName("performSelector:"); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrTrampoline) - .cast(); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureTrampoline) - .cast(); +@ffi.Packed(2) +final class wide extends ffi.Struct { + @UInt32() + external int lo; -/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>`. -abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - pointer, - retain: retain, - release: release); + @SInt32() + external int hi; +} - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)> - fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +@ffi.Packed(2) +final class UnsignedWide extends ffi.Struct { + @UInt32() + external int lo; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)> - fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer) fn) => - objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - objc.newClosureBlock( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, arg1).ref.retainAndAutorelease()), - retain: false, - release: true); + @UInt32() + external int hi; } -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_CallExtension - on objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)> { - objc.ObjCObjectBase call( - ffi.Pointer arg0, ffi.Pointer arg1) => - objc.ObjCObjectBase( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0, arg1), - retain: true, - release: true); +typedef SInt64 = ffi.LongLong; +typedef DartSInt64 = int; +typedef UInt64 = ffi.UnsignedLongLong; +typedef DartUInt64 = int; +typedef Fixed = SInt32; +typedef FixedPtr = ffi.Pointer; +typedef Fract = SInt32; +typedef FractPtr = ffi.Pointer; +typedef UnsignedFixed = UInt32; +typedef UnsignedFixedPtr = ffi.Pointer; +typedef ShortFixed = ffi.Short; +typedef DartShortFixed = int; +typedef ShortFixedPtr = ffi.Pointer; +typedef Float32 = ffi.Float; +typedef DartFloat32 = double; +typedef Float64 = ffi.Double; +typedef DartFloat64 = double; + +final class Float80 extends ffi.Struct { + @SInt16() + external int exp; + + @ffi.Array.multi([4]) + external ffi.Array man; } -late final _sel_performSelector_withObject_ = - objc.registerName("performSelector:withObject:"); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrTrampoline) - .cast(); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureTrampoline) - .cast(); +final class Float96 extends ffi.Struct { + @ffi.Array.multi([2]) + external ffi.Array exp; -/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. -abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(pointer, - retain: retain, release: release); + @ffi.Array.multi([4]) + external ffi.Array man; +} - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> - fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +@ffi.Packed(2) +final class Float32Point extends ffi.Struct { + @Float32() + external double x; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)> - fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase) fn) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - objc.newClosureBlock( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true)) - .ref - .retainAndAutorelease()), - retain: false, - release: true); + @Float32() + external double y; } -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_CallExtension - on objc.ObjCBlock< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> { - objc.ObjCObjectBase call(ffi.Pointer arg0, - ffi.Pointer arg1, objc.ObjCObjectBase arg2) => - objc.ObjCObjectBase( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0, arg1, arg2.ref.pointer), - retain: true, - release: true); -} +typedef Ptr = ffi.Pointer; +typedef Handle = ffi.Pointer; +typedef Size = ffi.Long; +typedef DartSize = int; +typedef OSErr = SInt16; +typedef OSStatus = SInt32; +typedef LogicalAddress = ffi.Pointer; +typedef ConstLogicalAddress = ffi.Pointer; +typedef PhysicalAddress = ffi.Pointer; +typedef BytePtr = ffi.Pointer; +typedef ByteCount = ffi.UnsignedLong; +typedef DartByteCount = int; +typedef ByteOffset = ffi.UnsignedLong; +typedef DartByteOffset = int; +typedef Duration = SInt32; +typedef AbsoluteTime = UnsignedWide; +typedef OptionBits = UInt32; +typedef ItemCount = ffi.UnsignedLong; +typedef DartItemCount = int; +typedef PBVersion = UInt32; +typedef ScriptCode = SInt16; +typedef LangCode = SInt16; +typedef RegionCode = SInt16; +typedef FourCharCode = UInt32; +typedef OSType = FourCharCode; +typedef ResType = FourCharCode; +typedef OSTypePtr = ffi.Pointer; +typedef ResTypePtr = ffi.Pointer; +typedef Boolean = ffi.UnsignedChar; +typedef DartBoolean = int; +typedef ProcPtrFunction = ffi.Long Function(); +typedef DartProcPtrFunction = int Function(); +typedef ProcPtr = ffi.Pointer>; +typedef Register68kProcPtrFunction = ffi.Void Function(); +typedef DartRegister68kProcPtrFunction = void Function(); +typedef Register68kProcPtr + = ffi.Pointer>; +typedef UniversalProcPtr = ProcPtr; +typedef ProcHandle = ffi.Pointer; +typedef UniversalProcHandle = ffi.Pointer; +typedef PRefCon = ffi.Pointer; +typedef URefCon = ffi.Pointer; +typedef SRefCon = ffi.Pointer; +typedef UnicodeScalarValue = UInt32; +typedef UTF32Char = UInt32; +typedef UniChar = UInt16; +typedef UTF16Char = UInt16; +typedef UTF8Char = UInt8; +typedef UniCharPtr = ffi.Pointer; +typedef UniCharCount = ffi.UnsignedLong; +typedef DartUniCharCount = int; +typedef UniCharCountPtr = ffi.Pointer; +typedef StringPtr = ffi.Pointer; +typedef StringHandle = ffi.Pointer; +typedef ConstStringPtr = ffi.Pointer; +typedef ConstStr255Param = ffi.Pointer; +typedef ConstStr63Param = ffi.Pointer; +typedef ConstStr32Param = ffi.Pointer; +typedef ConstStr31Param = ffi.Pointer; +typedef ConstStr27Param = ffi.Pointer; +typedef ConstStr15Param = ffi.Pointer; +typedef ConstStrFileNameParam = ConstStr63Param; -late final _sel_performSelector_withObject_withObject_ = - objc.registerName("performSelector:withObject:withObject:"); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrTrampoline) - .cast(); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureTrampoline) - .cast(); +@ffi.Packed(2) +final class ProcessSerialNumber extends ffi.Struct { + @UInt32() + external int highLongOfPSN; -/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. -abstract final class ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(pointer, retain: retain, release: release); + @UInt32() + external int lowLongOfPSN; +} - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => - objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +typedef ProcessSerialNumberPtr = ffi.Pointer; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)> - fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer, objc.ObjCObjectBase, objc.ObjCObjectBase) fn) => - objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - objc.newClosureBlock( - _ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn(arg0, arg1, objc.ObjCObjectBase(arg2, retain: true, release: true), objc.ObjCObjectBase(arg3, retain: true, release: true)) - .ref - .retainAndAutorelease()), - retain: false, - release: true); -} +final class Point extends ffi.Struct { + @ffi.Short() + external int v; -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_objcObjCSelector_objcObjCObject_objcObjCObject_CallExtension - on objc.ObjCBlock< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> { - objc.ObjCObjectBase call( - ffi.Pointer arg0, - ffi.Pointer arg1, - objc.ObjCObjectBase arg2, - objc.ObjCObjectBase arg3) => - objc.ObjCObjectBase( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0, arg1, arg2.ref.pointer, arg3.ref.pointer), - retain: true, - release: true); + @ffi.Short() + external int h; } -late final _sel_isProxy = objc.registerName("isProxy"); -bool _ObjCBlock_bool_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction)>()(arg0); -ffi.Pointer _ObjCBlock_bool_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_fnPtrTrampoline, false) - .cast(); -bool _ObjCBlock_bool_ffiVoid_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as bool Function(ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_bool_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_closureTrampoline, false) - .cast(); +typedef PointPtr = ffi.Pointer; -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_bool_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, - retain: retain, release: release); +final class Rect extends ffi.Struct { + @ffi.Short() + external int top; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock)>( - objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + @ffi.Short() + external int left; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> fromFunction( - bool Function(ffi.Pointer) fn) => - objc.ObjCBlock)>( - objc.newClosureBlock(_ObjCBlock_bool_ffiVoid_closureCallable, - (ffi.Pointer arg0) => fn(arg0)), - retain: false, - release: true); + @ffi.Short() + external int bottom; + + @ffi.Short() + external int right; } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_bool_ffiVoid_CallExtension - on objc.ObjCBlock)> { - bool call(ffi.Pointer arg0) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0); +typedef RectPtr = ffi.Pointer; + +@ffi.Packed(2) +final class FixedPoint extends ffi.Struct { + @Fixed() + external int x; + + @Fixed() + external int y; } -late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); -late final _sel_isMemberOfClass_ = objc.registerName("isMemberOfClass:"); -late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); -bool _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_Protocol_fnPtrTrampoline, false) - .cast(); -bool _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - (objc.getBlockClosure(block) as bool Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_Protocol_closureCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_Protocol_closureTrampoline, false) - .cast(); +@ffi.Packed(2) +final class FixedRect extends ffi.Struct { + @Fixed() + external int left; -/// Construction methods for `objc.ObjCBlock, objc.Protocol)>`. -abstract final class ObjCBlock_bool_ffiVoid_Protocol { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, objc.Protocol)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Bool Function(ffi.Pointer, - objc.Protocol)>(pointer, retain: retain, release: release); + @Fixed() + external int top; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, objc.Protocol)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock, objc.Protocol)>( - objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_Protocol_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + @Fixed() + external int right; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, objc.Protocol)> - fromFunction(bool Function(ffi.Pointer, objc.Protocol) fn) => - objc.ObjCBlock, objc.Protocol)>( - objc.newClosureBlock( - _ObjCBlock_bool_ffiVoid_Protocol_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn( - arg0, - objc.Protocol.castFromPointer(arg1, - retain: true, release: true))), - retain: false, - release: true); + @Fixed() + external int bottom; } -/// Call operator for `objc.ObjCBlock, objc.Protocol)>`. -extension ObjCBlock_bool_ffiVoid_Protocol_CallExtension - on objc.ObjCBlock, objc.Protocol)> { - bool call(ffi.Pointer arg0, objc.Protocol arg1) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer); -} +typedef CharParameter = ffi.Short; +typedef DartCharParameter = int; +typedef Style = ffi.UnsignedChar; +typedef DartStyle = int; +typedef StyleParameter = ffi.Short; +typedef DartStyleParameter = int; +typedef StyleField = Style; +typedef TimeValue = SInt32; +typedef TimeScale = SInt32; +typedef CompTimeValue = wide; +typedef TimeValue64 = SInt64; -late final _sel_respondsToSelector_ = objc.registerName("respondsToSelector:"); -bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrTrampoline, false) - .cast(); -bool _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - (objc.getBlockClosure(block) as bool Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable = - ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureTrampoline, false) - .cast(); +final class TimeBaseRecord extends ffi.Opaque {} -/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. -abstract final class ObjCBlock_bool_ffiVoid_objcObjCSelector { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>( - pointer, - retain: retain, - release: release); +typedef TimeBase = ffi.Pointer; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, ffi.Pointer)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock, ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_objcObjCSelector_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +@ffi.Packed(2) +final class TimeRecord extends ffi.Struct { + external CompTimeValue value; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc - .ObjCBlock, ffi.Pointer)> - fromFunction(bool Function(ffi.Pointer, ffi.Pointer) fn) => - objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)>( - objc.newClosureBlock( - _ObjCBlock_bool_ffiVoid_objcObjCSelector_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, arg1)), - retain: false, - release: true); -} + @TimeScale() + external int scale; -/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. -extension ObjCBlock_bool_ffiVoid_objcObjCSelector_CallExtension - on objc.ObjCBlock< - ffi.Bool Function( - ffi.Pointer, ffi.Pointer)> { - bool call(ffi.Pointer arg0, ffi.Pointer arg1) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0, arg1); + external TimeBase base; } -late final _sel_retain = objc.registerName("retain"); -late final _sel_release = objc.registerName("release"); -void _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction arg0)>>() - .asFunction)>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline( - ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); - objc.objectRelease(block.cast()); -} +final class NumVersion extends ffi.Struct { + @UInt8() + external int nonRelRev; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_listenerCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline) - ..keepIsolateAlive = false; + @UInt8() + external int stage; -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, - retain: retain, release: release); + @UInt8() + external int minorAndBugRev; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock)>( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + @UInt8() + external int majorRev; +} - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> fromFunction( - void Function(ffi.Pointer) fn) => - objc.ObjCBlock)>( - objc.newClosureBlock(_ObjCBlock_ffiVoid_ffiVoid_closureCallable, - (ffi.Pointer arg0) => fn(arg0)), - retain: false, - release: true); +final class NumVersionVariant extends ffi.Union { + external NumVersion parts; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock)> listener( - void Function(ffi.Pointer) fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_listenerCallable.nativeFunction.cast(), - (ffi.Pointer arg0) => fn(arg0)); - final wrapper = _wrapListenerBlock_hepzs(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock)>(wrapper, - retain: false, release: true); - } + @UInt32() + external int whole; } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_ffiVoid_CallExtension - on objc.ObjCBlock)> { - void call(ffi.Pointer arg0) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0); -} +typedef NumVersionVariantPtr = ffi.Pointer; +typedef NumVersionVariantHandle = ffi.Pointer; -late final _sel_autorelease = objc.registerName("autorelease"); -typedef NSUInteger = ffi.UnsignedLong; -typedef DartNSUInteger = int; -late final _sel_retainCount = objc.registerName("retainCount"); -int _ObjCBlock_NSUInteger_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi - .NativeFunction arg0)>>() - .asFunction)>()(arg0); -ffi.Pointer _ObjCBlock_NSUInteger_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - NSUInteger Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSUInteger_ffiVoid_fnPtrTrampoline, 0) - .cast(); -int _ObjCBlock_NSUInteger_ffiVoid_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as int Function(ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_NSUInteger_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - NSUInteger Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSUInteger_ffiVoid_closureTrampoline, 0) - .cast(); +final class VersRec extends ffi.Struct { + external NumVersion numericVersion; -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_NSUInteger_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>( - pointer, - retain: retain, - release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.UnsignedLong Function(ffi.Pointer)> fromFunctionPointer( - ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock)>( - objc.newPointerBlock( - _ObjCBlock_NSUInteger_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> - fromFunction(DartNSUInteger Function(ffi.Pointer) fn) => - objc.ObjCBlock)>( - objc.newClosureBlock( - _ObjCBlock_NSUInteger_ffiVoid_closureCallable, - (ffi.Pointer arg0) => fn(arg0)), - retain: false, - release: true); -} - -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSUInteger_ffiVoid_CallExtension - on objc.ObjCBlock)> { - DartNSUInteger call(ffi.Pointer arg0) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0); -} - -final class _NSZone extends ffi.Opaque {} - -late final _sel_zone = objc.registerName("zone"); -ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer)>()(arg0); -ffi.Pointer _ObjCBlock_NSZone_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSZone_ffiVoid_fnPtrTrampoline) - .cast(); -ffi.Pointer<_NSZone> _ObjCBlock_NSZone_ffiVoid_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer<_NSZone> Function( - ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_NSZone_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSZone_ffiVoid_closureTrampoline) - .cast(); - -/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. -abstract final class ObjCBlock_NSZone_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock Function(ffi.Pointer)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock Function(ffi.Pointer)>( - pointer, - retain: retain, - release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock Function(ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_NSZone_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock Function(ffi.Pointer)> - fromFunction(ffi.Pointer<_NSZone> Function(ffi.Pointer) fn) => - objc.ObjCBlock Function(ffi.Pointer)>( - objc.newClosureBlock(_ObjCBlock_NSZone_ffiVoid_closureCallable, - (ffi.Pointer arg0) => fn(arg0)), - retain: false, - release: true); -} - -/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. -extension ObjCBlock_NSZone_ffiVoid_CallExtension - on objc.ObjCBlock Function(ffi.Pointer)> { - ffi.Pointer<_NSZone> call(ffi.Pointer arg0) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0); -} - -late final _sel_hash = objc.registerName("hash"); -late final _sel_superclass = objc.registerName("superclass"); -late final _sel_description = objc.registerName("description"); -ffi.Pointer _ObjCBlock_NSString_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer)>()(arg0); -ffi.Pointer _ObjCBlock_NSString_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSString_ffiVoid_fnPtrTrampoline) - .cast(); -ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_NSString_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSString_ffiVoid_closureTrampoline) - .cast(); - -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_NSString_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, - retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock)>( - objc.newPointerBlock(_ObjCBlock_NSString_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> - fromFunction(objc.NSString Function(ffi.Pointer) fn) => - objc.ObjCBlock)>( - objc.newClosureBlock( - _ObjCBlock_NSString_ffiVoid_closureCallable, - (ffi.Pointer arg0) => - fn(arg0).ref.retainAndAutorelease()), - retain: false, - release: true); -} - -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSString_ffiVoid_CallExtension - on objc.ObjCBlock)> { - objc.NSString call(ffi.Pointer arg0) => - objc.NSString.castFromPointer( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0), - retain: true, - release: true); -} - -late final _sel_debugDescription = objc.registerName("debugDescription"); -typedef va_list = __builtin_va_list; -typedef __builtin_va_list = ffi.Pointer; -typedef NSInteger = ffi.Long; -typedef DartNSInteger = int; - -@ffi.Packed(2) -final class wide extends ffi.Struct { - @UInt32() - external int lo; - - @SInt32() - external int hi; -} - -typedef UInt32 = ffi.UnsignedInt; -typedef DartUInt32 = int; -typedef SInt32 = ffi.Int; -typedef DartSInt32 = int; - -@ffi.Packed(2) -final class UnsignedWide extends ffi.Struct { - @UInt32() - external int lo; - - @UInt32() - external int hi; -} - -final class Float80 extends ffi.Struct { - @SInt16() - external int exp; - - @ffi.Array.multi([4]) - external ffi.Array man; -} - -typedef SInt16 = ffi.Short; -typedef DartSInt16 = int; -typedef UInt16 = ffi.UnsignedShort; -typedef DartUInt16 = int; - -final class Float96 extends ffi.Struct { - @ffi.Array.multi([2]) - external ffi.Array exp; - - @ffi.Array.multi([4]) - external ffi.Array man; -} - -@ffi.Packed(2) -final class Float32Point extends ffi.Struct { - @Float32() - external double x; - - @Float32() - external double y; -} - -typedef Float32 = ffi.Float; -typedef DartFloat32 = double; - -@ffi.Packed(2) -final class ProcessSerialNumber extends ffi.Struct { - @UInt32() - external int highLongOfPSN; - - @UInt32() - external int lowLongOfPSN; -} - -final class Point extends ffi.Struct { - @ffi.Short() - external int v; - - @ffi.Short() - external int h; -} - -final class Rect extends ffi.Struct { - @ffi.Short() - external int top; - - @ffi.Short() - external int left; - - @ffi.Short() - external int bottom; - - @ffi.Short() - external int right; -} - -@ffi.Packed(2) -final class FixedPoint extends ffi.Struct { - @Fixed() - external int x; - - @Fixed() - external int y; -} - -typedef Fixed = SInt32; - -@ffi.Packed(2) -final class FixedRect extends ffi.Struct { - @Fixed() - external int left; - - @Fixed() - external int top; - - @Fixed() - external int right; - - @Fixed() - external int bottom; -} - -final class TimeBaseRecord extends ffi.Opaque {} - -@ffi.Packed(2) -final class TimeRecord extends ffi.Struct { - external CompTimeValue value; - - @TimeScale() - external int scale; - - external TimeBase base; -} - -typedef CompTimeValue = wide; -typedef TimeScale = SInt32; -typedef TimeBase = ffi.Pointer; - -final class NumVersion extends ffi.Struct { - @UInt8() - external int nonRelRev; - - @UInt8() - external int stage; - - @UInt8() - external int minorAndBugRev; - - @UInt8() - external int majorRev; -} - -typedef UInt8 = ffi.UnsignedChar; -typedef DartUInt8 = int; - -final class NumVersionVariant extends ffi.Union { - external NumVersion parts; - - @UInt32() - external int whole; -} - -final class VersRec extends ffi.Struct { - external NumVersion numericVersion; - - @ffi.Short() - external int countryCode; + @ffi.Short() + external int countryCode; @ffi.Array.multi([256]) external ffi.Array shortVersion; @@ -43975,12 +42751,58 @@ final class VersRec extends ffi.Struct { external ffi.Array reserved; } -typedef ConstStr255Param = ffi.Pointer; +typedef VersRecPtr = ffi.Pointer; +typedef VersRecHndl = ffi.Pointer; +typedef Byte = UInt8; +typedef SignedByte = SInt8; +typedef WidePtr = ffi.Pointer; +typedef UnsignedWidePtr = ffi.Pointer; +typedef extended80 = Float80; +typedef extended96 = Float96; +typedef VHSelect = SInt8; +typedef CFTypeID = ffi.UnsignedLong; +typedef DartCFTypeID = int; +typedef CFOptionFlags = ffi.UnsignedLong; +typedef DartCFOptionFlags = int; +typedef CFHashCode = ffi.UnsignedLong; +typedef DartCFHashCode = int; +typedef CFIndex = ffi.Long; +typedef DartCFIndex = int; +typedef CFTypeRef = ffi.Pointer; final class __CFString extends ffi.Opaque {} -typedef CFIndex = ffi.Long; -typedef DartCFIndex = int; +typedef CFStringRef = ffi.Pointer<__CFString>; +typedef CFMutableStringRef = ffi.Pointer<__CFString>; +typedef CFPropertyListRef = CFTypeRef; + +enum CFComparisonResult { + kCFCompareLessThan(-1), + kCFCompareEqualTo(0), + kCFCompareGreaterThan(1); + + final int value; + const CFComparisonResult(this.value); + + static CFComparisonResult fromValue(int value) => switch (value) { + -1 => kCFCompareLessThan, + 0 => kCFCompareEqualTo, + 1 => kCFCompareGreaterThan, + _ => + throw ArgumentError("Unknown value for CFComparisonResult: $value"), + }; +} + +typedef CFComparatorFunctionFunction = CFIndex Function( + ffi.Pointer val1, + ffi.Pointer val2, + ffi.Pointer context); +typedef DartCFComparatorFunctionFunction = CFComparisonResult Function( + ffi.Pointer val1, + ffi.Pointer val2, + ffi.Pointer context); +typedef CFComparatorFunction + = ffi.Pointer>; final class CFRange extends ffi.Struct { @CFIndex() @@ -43992,61 +42814,32 @@ final class CFRange extends ffi.Struct { final class __CFNull extends ffi.Opaque {} -typedef CFTypeID = ffi.UnsignedLong; -typedef DartCFTypeID = int; typedef CFNullRef = ffi.Pointer<__CFNull>; final class __CFAllocator extends ffi.Opaque {} typedef CFAllocatorRef = ffi.Pointer<__CFAllocator>; - -final class CFAllocatorContext extends ffi.Struct { - @CFIndex() - external int version; - - external ffi.Pointer info; - - external CFAllocatorRetainCallBack retain; - - external CFAllocatorReleaseCallBack release; - - external CFAllocatorCopyDescriptionCallBack copyDescription; - - external CFAllocatorAllocateCallBack allocate; - - external CFAllocatorReallocateCallBack reallocate; - - external CFAllocatorDeallocateCallBack deallocate; - - external CFAllocatorPreferredSizeCallBack preferredSize; -} - -typedef CFAllocatorRetainCallBack - = ffi.Pointer>; typedef CFAllocatorRetainCallBackFunction = ffi.Pointer Function( ffi.Pointer info); -typedef CFAllocatorReleaseCallBack - = ffi.Pointer>; +typedef CFAllocatorRetainCallBack + = ffi.Pointer>; typedef CFAllocatorReleaseCallBackFunction = ffi.Void Function( ffi.Pointer info); typedef DartCFAllocatorReleaseCallBackFunction = void Function( ffi.Pointer info); -typedef CFAllocatorCopyDescriptionCallBack = ffi - .Pointer>; +typedef CFAllocatorReleaseCallBack + = ffi.Pointer>; typedef CFAllocatorCopyDescriptionCallBackFunction = CFStringRef Function( ffi.Pointer info); -typedef CFStringRef = ffi.Pointer<__CFString>; -typedef CFAllocatorAllocateCallBack - = ffi.Pointer>; +typedef CFAllocatorCopyDescriptionCallBack = ffi + .Pointer>; typedef CFAllocatorAllocateCallBackFunction = ffi.Pointer Function( CFIndex allocSize, CFOptionFlags hint, ffi.Pointer info); typedef DartCFAllocatorAllocateCallBackFunction = ffi.Pointer Function(DartCFIndex allocSize, DartCFOptionFlags hint, ffi.Pointer info); -typedef CFOptionFlags = ffi.UnsignedLong; -typedef DartCFOptionFlags = int; -typedef CFAllocatorReallocateCallBack - = ffi.Pointer>; +typedef CFAllocatorAllocateCallBack + = ffi.Pointer>; typedef CFAllocatorReallocateCallBackFunction = ffi.Pointer Function( ffi.Pointer ptr, CFIndex newsize, @@ -44058,386 +42851,348 @@ typedef DartCFAllocatorReallocateCallBackFunction DartCFIndex newsize, DartCFOptionFlags hint, ffi.Pointer info); -typedef CFAllocatorDeallocateCallBack - = ffi.Pointer>; +typedef CFAllocatorReallocateCallBack + = ffi.Pointer>; typedef CFAllocatorDeallocateCallBackFunction = ffi.Void Function( ffi.Pointer ptr, ffi.Pointer info); typedef DartCFAllocatorDeallocateCallBackFunction = void Function( ffi.Pointer ptr, ffi.Pointer info); -typedef CFAllocatorPreferredSizeCallBack - = ffi.Pointer>; +typedef CFAllocatorDeallocateCallBack + = ffi.Pointer>; typedef CFAllocatorPreferredSizeCallBackFunction = CFIndex Function( CFIndex size, CFOptionFlags hint, ffi.Pointer info); typedef DartCFAllocatorPreferredSizeCallBackFunction = DartCFIndex Function( DartCFIndex size, DartCFOptionFlags hint, ffi.Pointer info); -typedef CFTypeRef = ffi.Pointer; -typedef Boolean = ffi.UnsignedChar; -typedef DartBoolean = int; -typedef CFHashCode = ffi.UnsignedLong; -typedef DartCFHashCode = int; -typedef NSZone = _NSZone; - -/// NSCopying -abstract final class NSCopying { - /// Builds an object that implements the NSCopying protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {required objc.ObjCObjectBase Function(ffi.Pointer) - copyWithZone_}) { - final builder = objc.ObjCProtocolBuilder(); - NSCopying.copyWithZone_.implement(builder, copyWithZone_); - return builder.build(); - } +typedef CFAllocatorPreferredSizeCallBack + = ffi.Pointer>; - /// Adds the implementation of the NSCopying protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {required objc.ObjCObjectBase Function(ffi.Pointer) - copyWithZone_}) { - NSCopying.copyWithZone_.implement(builder, copyWithZone_); - } +final class CFAllocatorContext extends ffi.Struct { + @CFIndex() + external int version; - /// copyWithZone: - static final copyWithZone_ = objc.ObjCProtocolMethod< - objc.ObjCObjectBase Function(ffi.Pointer)>( - _sel_copyWithZone_, - objc.getProtocolMethodSignature( - _protocol_NSCopying, - _sel_copyWithZone_, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObjectBase Function(ffi.Pointer) func) => - ObjCBlock_objcObjCObject_ffiVoid_NSZone.fromFunction( - (ffi.Pointer _, ffi.Pointer arg1) => func(arg1)), - ); -} + external ffi.Pointer info; -late final _protocol_NSCopying = objc.getProtocol("NSCopying"); -late final _sel_copyWithZone_ = objc.registerName("copyWithZone:"); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrTrampoline) - .cast(); -ffi.Pointer - _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureTrampoline) - .cast(); + external CFAllocatorRetainCallBack retain; -/// Construction methods for `objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer)>`. -abstract final class ObjCBlock_objcObjCObject_ffiVoid_NSZone { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - objc.Retained> Function( - ffi.Pointer, ffi.Pointer)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - objc.Retained> Function( - ffi.Pointer, ffi.Pointer)>(pointer, - retain: retain, release: release); + external CFAllocatorReleaseCallBack release; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - objc.Retained> Function( - ffi.Pointer, ffi.Pointer)> - fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock< - objc.Retained> Function( - ffi.Pointer, ffi.Pointer)>( - objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_NSZone_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + external CFAllocatorCopyDescriptionCallBack copyDescription; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc - .ObjCBlock> Function(ffi.Pointer, ffi.Pointer)> - fromFunction(objc.ObjCObjectBase Function(ffi.Pointer, ffi.Pointer) fn) => - objc.ObjCBlock< - objc.Retained> Function( - ffi.Pointer, ffi.Pointer)>( - objc.newClosureBlock( - _ObjCBlock_objcObjCObject_ffiVoid_NSZone_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, arg1).ref.retainAndReturnPointer()), - retain: false, - release: true); -} + external CFAllocatorAllocateCallBack allocate; -/// Call operator for `objc.ObjCBlock> Function(ffi.Pointer, ffi.Pointer)>`. -extension ObjCBlock_objcObjCObject_ffiVoid_NSZone_CallExtension - on objc.ObjCBlock< - objc.Retained> Function( - ffi.Pointer, ffi.Pointer)> { - objc.ObjCObjectBase call( - ffi.Pointer arg0, ffi.Pointer arg1) => - objc.ObjCObjectBase( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0, arg1), - retain: false, - release: true); -} + external CFAllocatorReallocateCallBack reallocate; -/// NSMutableCopying -abstract final class NSMutableCopying { - /// Builds an object that implements the NSMutableCopying protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {required objc.ObjCObjectBase Function(ffi.Pointer) - mutableCopyWithZone_}) { - final builder = objc.ObjCProtocolBuilder(); - NSMutableCopying.mutableCopyWithZone_ - .implement(builder, mutableCopyWithZone_); - return builder.build(); - } + external CFAllocatorDeallocateCallBack deallocate; - /// Adds the implementation of the NSMutableCopying protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {required objc.ObjCObjectBase Function(ffi.Pointer) - mutableCopyWithZone_}) { - NSMutableCopying.mutableCopyWithZone_ - .implement(builder, mutableCopyWithZone_); - } + external CFAllocatorPreferredSizeCallBack preferredSize; +} - /// mutableCopyWithZone: - static final mutableCopyWithZone_ = objc.ObjCProtocolMethod< - objc.ObjCObjectBase Function(ffi.Pointer)>( - _sel_mutableCopyWithZone_, - objc.getProtocolMethodSignature( - _protocol_NSMutableCopying, - _sel_mutableCopyWithZone_, - isRequired: true, - isInstanceMethod: true, - ), - (objc.ObjCObjectBase Function(ffi.Pointer) func) => - ObjCBlock_objcObjCObject_ffiVoid_NSZone.fromFunction( - (ffi.Pointer _, ffi.Pointer arg1) => func(arg1)), - ); -} +typedef NSZone = _NSZone; +late final _class_NSObject = objc.getClass("NSObject"); +late final _sel_version = objc.registerName("version"); +final _objc_msgSend_1hz7y9r = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setVersion_ = objc.registerName("setVersion:"); +final _objc_msgSend_4sp4xj = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_classForCoder = objc.registerName("classForCoder"); +final _objc_msgSend_1x359cv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_replacementObjectForCoder_ = + objc.registerName("replacementObjectForCoder:"); +final _objc_msgSend_62nh5j = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_awakeAfterUsingCoder_ = + objc.registerName("awakeAfterUsingCoder:"); -late final _protocol_NSMutableCopying = objc.getProtocol("NSMutableCopying"); -late final _sel_mutableCopyWithZone_ = - objc.registerName("mutableCopyWithZone:"); +/// NSCoderMethods +extension NSCoderMethods on objc.NSObject { + /// version + static DartNSInteger version() { + return _objc_msgSend_1hz7y9r(_class_NSObject, _sel_version); + } -/// NSCoding -abstract final class NSCoding { - /// Builds an object that implements the NSCoding protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {required void Function(objc.NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { - final builder = objc.ObjCProtocolBuilder(); - NSCoding.encodeWithCoder_.implement(builder, encodeWithCoder_); - NSCoding.initWithCoder_.implement(builder, initWithCoder_); - return builder.build(); + /// setVersion: + static void setVersion_(DartNSInteger aVersion) { + _objc_msgSend_4sp4xj(_class_NSObject, _sel_setVersion_, aVersion); } - /// Adds the implementation of the NSCoding protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {required void Function(objc.NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { - NSCoding.encodeWithCoder_.implement(builder, encodeWithCoder_); - NSCoding.initWithCoder_.implement(builder, initWithCoder_); + /// classForCoder + objc.ObjCObjectBase get classForCoder { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_classForCoder); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// Builds an object that implements the NSCoding protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - static objc.ObjCObjectBase implementAsListener( - {required void Function(objc.NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { - final builder = objc.ObjCProtocolBuilder(); - NSCoding.encodeWithCoder_.implementAsListener(builder, encodeWithCoder_); - NSCoding.initWithCoder_.implement(builder, initWithCoder_); - return builder.build(); + /// replacementObjectForCoder: + objc.ObjCObjectBase? replacementObjectForCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_replacementObjectForCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// Adds the implementation of the NSCoding protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, - {required void Function(objc.NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { - NSCoding.encodeWithCoder_.implementAsListener(builder, encodeWithCoder_); - NSCoding.initWithCoder_.implement(builder, initWithCoder_); + /// awakeAfterUsingCoder: + objc.ObjCObjectBase? awakeAfterUsingCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_awakeAfterUsingCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: false, release: true); } +} - /// encodeWithCoder: - static final encodeWithCoder_ = - objc.ObjCProtocolListenableMethod( - _sel_encodeWithCoder_, - objc.getProtocolMethodSignature( - _protocol_NSCoding, - _sel_encodeWithCoder_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(objc.NSCoder) func) => - ObjCBlock_ffiVoid_ffiVoid_NSCoder.fromFunction( - (ffi.Pointer _, objc.NSCoder arg1) => func(arg1)), - (void Function(objc.NSCoder) func) => - ObjCBlock_ffiVoid_ffiVoid_NSCoder.listener( - (ffi.Pointer _, objc.NSCoder arg1) => func(arg1)), - ); +late final _sel_poseAsClass_ = objc.registerName("poseAsClass:"); +final _objc_msgSend_1jdvcbf = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - /// initWithCoder: - static final initWithCoder_ = - objc.ObjCProtocolMethod( - _sel_initWithCoder_, - objc.getProtocolMethodSignature( - _protocol_NSCoding, - _sel_initWithCoder_, - isRequired: true, - isInstanceMethod: true, - ), - (Dartinstancetype? Function(objc.NSCoder) func) => - ObjCBlock_instancetype_ffiVoid_NSCoder.fromFunction( - (ffi.Pointer _, objc.NSCoder arg1) => func(arg1)), - ); +/// NSDeprecatedMethods +extension NSDeprecatedMethods on objc.NSObject { + /// poseAsClass: + static void poseAsClass_(objc.ObjCObjectBase aClass) { + _objc_msgSend_1jdvcbf( + _class_NSObject, _sel_poseAsClass_, aClass.ref.pointer); + } } -late final _protocol_NSCoding = objc.getProtocol("NSCoding"); -late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); -void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline( +late final _sel_autoContentAccessingProxy = + objc.registerName("autoContentAccessingProxy"); + +/// NSDiscardableContentProxy +extension NSDiscardableContentProxy on objc.NSObject { + /// autoContentAccessingProxy + objc.ObjCObjectBase get autoContentAccessingProxy { + final _ret = + _objc_msgSend_1x359cv(this.ref.pointer, _sel_autoContentAccessingProxy); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } +} + +/// ! +/// @enum NSURLCacheStoragePolicy +/// +/// @discussion The NSURLCacheStoragePolicy enum defines constants that +/// can be used to specify the type of storage that is allowable for an +/// NSCachedURLResponse object that is to be stored in an NSURLCache. +/// +/// @constant NSURLCacheStorageAllowed Specifies that storage in an +/// NSURLCache is allowed without restriction. +/// +/// @constant NSURLCacheStorageAllowedInMemoryOnly Specifies that +/// storage in an NSURLCache is allowed; however storage should be +/// done in memory only, no disk storage should be done. +/// +/// @constant NSURLCacheStorageNotAllowed Specifies that storage in an +/// NSURLCache is not allowed in any fashion, either in memory or on +/// disk. +enum NSURLCacheStoragePolicy { + NSURLCacheStorageAllowed(0), + NSURLCacheStorageAllowedInMemoryOnly(1), + NSURLCacheStorageNotAllowed(2); + + final int value; + const NSURLCacheStoragePolicy(this.value); + + static NSURLCacheStoragePolicy fromValue(int value) => switch (value) { + 0 => NSURLCacheStorageAllowed, + 1 => NSURLCacheStorageAllowedInMemoryOnly, + 2 => NSURLCacheStorageNotAllowed, + _ => throw ArgumentError( + "Unknown value for NSURLCacheStoragePolicy: $value"), + }; +} + +/// WARNING: NSCachedURLResponse is a stub. To generate bindings for this class, include +/// NSCachedURLResponse in your config's objc-interfaces list. +/// +/// ! +/// @class NSCachedURLResponse +/// NSCachedURLResponse is a class whose objects functions as a wrapper for +/// objects that are stored in the framework's caching system. +/// It is used to maintain characteristics and attributes of a cached +/// object. +class NSCachedURLResponse extends objc.NSObject { + NSCachedURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSCachedURLResponse] that points to the same underlying object as [other]. + NSCachedURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSCachedURLResponse] that wraps the given raw object pointer. + NSCachedURLResponse.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); +} + +late final _class_NSURLCache = objc.getClass("NSURLCache"); +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +final _objc_msgSend_69e0x1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +/// WARNING: NSURLSessionDataTask is a stub. To generate bindings for this class, include +/// NSURLSessionDataTask in your config's objc-interfaces list. +/// +/// NSURLSessionDataTask +class NSURLSessionDataTask extends NSURLSessionTask { + NSURLSessionDataTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionDataTask] that points to the same underlying object as [other]. + NSURLSessionDataTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionDataTask] that wraps the given raw object pointer. + NSURLSessionDataTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); +} + +late final _sel_storeCachedResponse_forDataTask_ = + objc.registerName("storeCachedResponse:forDataTask:"); +final _objc_msgSend_wjvic9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => + ffi.Pointer arg0) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable = + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline) + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline( +void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => + ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable = + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_closureCallable = ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline) + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) { +void _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); + ffi.Pointer))(arg0); objc.objectRelease(block.cast()); } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable = ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerCallable = ffi + .NativeCallable< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline) + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline) ..keepIsolateAlive = false; -/// Construction methods for `objc.ObjCBlock, objc.NSCoder)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSCachedURLResponse { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, objc.NSCoder)> + static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, - objc.NSCoder)>(pointer, retain: retain, release: release); + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, objc.NSCoder)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock, objc.NSCoder)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + static objc.ObjCBlock + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, objc.NSCoder)> - fromFunction(void Function(ffi.Pointer, objc.NSCoder) fn) => - objc.ObjCBlock, objc.NSCoder)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn( - arg0, - objc.NSCoder.castFromPointer(arg1, - retain: true, release: true))), - retain: false, - release: true); + static objc.ObjCBlock fromFunction( + void Function(NSCachedURLResponse?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -44448,738 +43203,103 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock, objc.NSCoder)> - listener(void Function(ffi.Pointer, objc.NSCoder) fn) { + static objc.ObjCBlock listener( + void Function(NSCachedURLResponse?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable.nativeFunction + _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerCallable.nativeFunction .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0, - objc.NSCoder.castFromPointer(arg1, retain: false, release: true))); - final wrapper = _wrapListenerBlock_sjfpmz(raw); + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1jdvcbf(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, objc.NSCoder)>(wrapper, + return objc.ObjCBlock(wrapper, retain: false, release: true); } } -/// Call operator for `objc.ObjCBlock, objc.NSCoder)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSCoder_CallExtension - on objc.ObjCBlock, objc.NSCoder)> { - void call(ffi.Pointer arg0, objc.NSCoder arg1) => ref - .pointer.ref.invoke +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSCachedURLResponse_CallExtension + on objc.ObjCBlock { + void call(NSCachedURLResponse? arg0) => ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer); -} - -late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); -instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable = - ffi.Pointer.fromFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline) - .cast(); -instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - (objc.getBlockClosure(block) as instancetype Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable = - ffi.Pointer.fromFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline) - .cast(); - -/// Construction methods for `objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>`. -abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - objc.Retained?> Function( - ffi.Pointer, objc.NSCoder)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - objc.Retained?> Function( - ffi.Pointer, - objc.NSCoder)>(pointer, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - objc.Retained?> Function( - ffi.Pointer, objc.NSCoder)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => - objc.ObjCBlock< - objc.Retained?> Function( - ffi.Pointer, objc.NSCoder)>( - objc.newPointerBlock( - _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), - retain: false, - release: true); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)> fromFunction( - Dartinstancetype? Function(ffi.Pointer, objc.NSCoder) fn) => - objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>( - objc.newClosureBlock( - _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, objc.NSCoder.castFromPointer(arg1, retain: true, release: true)) - ?.ref - .retainAndReturnPointer() ?? - ffi.nullptr), - retain: false, - release: true); -} - -/// Call operator for `objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>`. -extension ObjCBlock_instancetype_ffiVoid_NSCoder_CallExtension - on objc.ObjCBlock< - objc.Retained?> Function( - ffi.Pointer, objc.NSCoder)> { - Dartinstancetype? call(ffi.Pointer arg0, objc.NSCoder arg1) => ref - .pointer.ref.invoke - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction, ffi.Pointer, ffi.Pointer)>() - (ref.pointer, arg0, arg1.ref.pointer) - .address == - 0 - ? null - : objc.ObjCObjectBase( - ref.pointer.ref.invoke - .cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0, arg1.ref.pointer), - retain: false, - release: true); + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); } -/// NSSecureCoding -abstract final class NSSecureCoding { - /// Builds an object that implements the NSSecureCoding protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {required bool Function() supportsSecureCoding, - required void Function(objc.NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { - final builder = objc.ObjCProtocolBuilder(); - NSSecureCoding.supportsSecureCoding - .implement(builder, supportsSecureCoding); - NSSecureCoding.encodeWithCoder_.implement(builder, encodeWithCoder_); - NSSecureCoding.initWithCoder_.implement(builder, initWithCoder_); - return builder.build(); - } +late final _sel_getCachedResponseForDataTask_completionHandler_ = + objc.registerName("getCachedResponseForDataTask:completionHandler:"); +final _objc_msgSend_14pxqbs = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeCachedResponseForDataTask_ = + objc.registerName("removeCachedResponseForDataTask:"); - /// Adds the implementation of the NSSecureCoding protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {required bool Function() supportsSecureCoding, - required void Function(objc.NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { - NSSecureCoding.supportsSecureCoding - .implement(builder, supportsSecureCoding); - NSSecureCoding.encodeWithCoder_.implement(builder, encodeWithCoder_); - NSSecureCoding.initWithCoder_.implement(builder, initWithCoder_); +/// NSURLSessionTaskAdditions +extension NSURLSessionTaskAdditions on NSURLCache { + /// storeCachedResponse:forDataTask: + void storeCachedResponse_forDataTask_( + NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { + _objc_msgSend_wjvic9( + this.ref.pointer, + _sel_storeCachedResponse_forDataTask_, + cachedResponse.ref.pointer, + dataTask.ref.pointer); } - /// Builds an object that implements the NSSecureCoding protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - static objc.ObjCObjectBase implementAsListener( - {required bool Function() supportsSecureCoding, - required void Function(objc.NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { - final builder = objc.ObjCProtocolBuilder(); - NSSecureCoding.supportsSecureCoding - .implement(builder, supportsSecureCoding); - NSSecureCoding.encodeWithCoder_ - .implementAsListener(builder, encodeWithCoder_); - NSSecureCoding.initWithCoder_.implement(builder, initWithCoder_); - return builder.build(); + /// getCachedResponseForDataTask:completionHandler: + void getCachedResponseForDataTask_completionHandler_( + NSURLSessionDataTask dataTask, + objc.ObjCBlock + completionHandler) { + _objc_msgSend_14pxqbs( + this.ref.pointer, + _sel_getCachedResponseForDataTask_completionHandler_, + dataTask.ref.pointer, + completionHandler.ref.pointer); } - /// Adds the implementation of the NSSecureCoding protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, - {required bool Function() supportsSecureCoding, - required void Function(objc.NSCoder) encodeWithCoder_, - required Dartinstancetype? Function(objc.NSCoder) initWithCoder_}) { - NSSecureCoding.supportsSecureCoding - .implement(builder, supportsSecureCoding); - NSSecureCoding.encodeWithCoder_ - .implementAsListener(builder, encodeWithCoder_); - NSSecureCoding.initWithCoder_.implement(builder, initWithCoder_); + /// removeCachedResponseForDataTask: + void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { + _objc_msgSend_1jdvcbf(this.ref.pointer, + _sel_removeCachedResponseForDataTask_, dataTask.ref.pointer); } - - /// supportsSecureCoding - static final supportsSecureCoding = objc.ObjCProtocolMethod( - _sel_supportsSecureCoding, - objc.getProtocolMethodSignature( - _protocol_NSSecureCoding, - _sel_supportsSecureCoding, - isRequired: true, - isInstanceMethod: false, - ), - (bool Function() func) => ObjCBlock_bool_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); - - /// encodeWithCoder: - static final encodeWithCoder_ = - objc.ObjCProtocolListenableMethod( - _sel_encodeWithCoder_, - objc.getProtocolMethodSignature( - _protocol_NSSecureCoding, - _sel_encodeWithCoder_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(objc.NSCoder) func) => - ObjCBlock_ffiVoid_ffiVoid_NSCoder.fromFunction( - (ffi.Pointer _, objc.NSCoder arg1) => func(arg1)), - (void Function(objc.NSCoder) func) => - ObjCBlock_ffiVoid_ffiVoid_NSCoder.listener( - (ffi.Pointer _, objc.NSCoder arg1) => func(arg1)), - ); - - /// initWithCoder: - static final initWithCoder_ = - objc.ObjCProtocolMethod( - _sel_initWithCoder_, - objc.getProtocolMethodSignature( - _protocol_NSSecureCoding, - _sel_initWithCoder_, - isRequired: true, - isInstanceMethod: true, - ), - (Dartinstancetype? Function(objc.NSCoder) func) => - ObjCBlock_instancetype_ffiVoid_NSCoder.fromFunction( - (ffi.Pointer _, objc.NSCoder arg1) => func(arg1)), - ); } -late final _protocol_NSSecureCoding = objc.getProtocol("NSSecureCoding"); -late final _sel_supportsSecureCoding = - objc.registerName("supportsSecureCoding"); - -/// NSDiscardableContent -abstract final class NSDiscardableContent { - /// Builds an object that implements the NSDiscardableContent protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {required bool Function() beginContentAccess, - required void Function() endContentAccess, - required void Function() discardContentIfPossible, - required bool Function() isContentDiscarded}) { - final builder = objc.ObjCProtocolBuilder(); - NSDiscardableContent.beginContentAccess - .implement(builder, beginContentAccess); - NSDiscardableContent.endContentAccess.implement(builder, endContentAccess); - NSDiscardableContent.discardContentIfPossible - .implement(builder, discardContentIfPossible); - NSDiscardableContent.isContentDiscarded - .implement(builder, isContentDiscarded); - return builder.build(); - } - - /// Adds the implementation of the NSDiscardableContent protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {required bool Function() beginContentAccess, - required void Function() endContentAccess, - required void Function() discardContentIfPossible, - required bool Function() isContentDiscarded}) { - NSDiscardableContent.beginContentAccess - .implement(builder, beginContentAccess); - NSDiscardableContent.endContentAccess.implement(builder, endContentAccess); - NSDiscardableContent.discardContentIfPossible - .implement(builder, discardContentIfPossible); - NSDiscardableContent.isContentDiscarded - .implement(builder, isContentDiscarded); - } - - /// Builds an object that implements the NSDiscardableContent protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - static objc.ObjCObjectBase implementAsListener( - {required bool Function() beginContentAccess, - required void Function() endContentAccess, - required void Function() discardContentIfPossible, - required bool Function() isContentDiscarded}) { - final builder = objc.ObjCProtocolBuilder(); - NSDiscardableContent.beginContentAccess - .implement(builder, beginContentAccess); - NSDiscardableContent.endContentAccess - .implementAsListener(builder, endContentAccess); - NSDiscardableContent.discardContentIfPossible - .implementAsListener(builder, discardContentIfPossible); - NSDiscardableContent.isContentDiscarded - .implement(builder, isContentDiscarded); - return builder.build(); - } - - /// Adds the implementation of the NSDiscardableContent protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, - {required bool Function() beginContentAccess, - required void Function() endContentAccess, - required void Function() discardContentIfPossible, - required bool Function() isContentDiscarded}) { - NSDiscardableContent.beginContentAccess - .implement(builder, beginContentAccess); - NSDiscardableContent.endContentAccess - .implementAsListener(builder, endContentAccess); - NSDiscardableContent.discardContentIfPossible - .implementAsListener(builder, discardContentIfPossible); - NSDiscardableContent.isContentDiscarded - .implement(builder, isContentDiscarded); - } - - /// beginContentAccess - static final beginContentAccess = objc.ObjCProtocolMethod( - _sel_beginContentAccess, - objc.getProtocolMethodSignature( - _protocol_NSDiscardableContent, - _sel_beginContentAccess, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function() func) => ObjCBlock_bool_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); - - /// endContentAccess - static final endContentAccess = - objc.ObjCProtocolListenableMethod( - _sel_endContentAccess, - objc.getProtocolMethodSignature( - _protocol_NSDiscardableContent, - _sel_endContentAccess, - isRequired: true, - isInstanceMethod: true, - ), - (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.listener(( - ffi.Pointer _, - ) => - func()), - ); - - /// discardContentIfPossible - static final discardContentIfPossible = - objc.ObjCProtocolListenableMethod( - _sel_discardContentIfPossible, - objc.getProtocolMethodSignature( - _protocol_NSDiscardableContent, - _sel_discardContentIfPossible, - isRequired: true, - isInstanceMethod: true, - ), - (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.listener(( - ffi.Pointer _, - ) => - func()), - ); - - /// isContentDiscarded - static final isContentDiscarded = objc.ObjCProtocolMethod( - _sel_isContentDiscarded, - objc.getProtocolMethodSignature( - _protocol_NSDiscardableContent, - _sel_isContentDiscarded, - isRequired: true, - isInstanceMethod: true, - ), - (bool Function() func) => ObjCBlock_bool_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); -} - -late final _protocol_NSDiscardableContent = - objc.getProtocol("NSDiscardableContent"); -late final _sel_beginContentAccess = objc.registerName("beginContentAccess"); -late final _sel_endContentAccess = objc.registerName("endContentAccess"); -late final _sel_discardContentIfPossible = - objc.registerName("discardContentIfPossible"); -late final _sel_isContentDiscarded = objc.registerName("isContentDiscarded"); - -/// NSURLCache -class NSURLCache extends objc.NSObject { - NSURLCache._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSURLCache] that points to the same underlying object as [other]. - NSURLCache.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSURLCache] that wraps the given raw object pointer. - NSURLCache.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSURLCache]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCache); - } - - /// ! - /// @property sharedURLCache - /// @abstract Returns the shared NSURLCache instance or - /// sets the NSURLCache instance shared by all clients of - /// the current process. This will be the new object returned when - /// calls to the sharedURLCache method are made. - /// @discussion Unless set explicitly through a call to - /// +setSharedURLCache:, this method returns an NSURLCache - /// instance created with the following default values: - ///
    - ///
  • Memory capacity: 4 megabytes (4 * 1024 * 1024 bytes) - ///
  • Disk capacity: 20 megabytes (20 * 1024 * 1024 bytes) - ///
  • Disk path: (user home directory)/Library/Caches/(application bundle id) - ///
- ///

Users who do not have special caching requirements or - /// constraints should find the default shared cache instance - /// acceptable. If this default shared cache instance is not - /// acceptable, +setSharedURLCache: can be called to set a - /// different NSURLCache instance to be returned from this method. - /// Callers should take care to ensure that the setter is called - /// at a time when no other caller has a reference to the previously-set - /// shared URL cache. This is to prevent storing cache data from - /// becoming unexpectedly unretrievable. - /// @result the shared NSURLCache instance. - static NSURLCache getSharedURLCache() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_sharedURLCache); - return NSURLCache.castFromPointer(_ret, retain: true, release: true); - } - - /// ! - /// @property sharedURLCache - /// @abstract Returns the shared NSURLCache instance or - /// sets the NSURLCache instance shared by all clients of - /// the current process. This will be the new object returned when - /// calls to the sharedURLCache method are made. - /// @discussion Unless set explicitly through a call to - /// +setSharedURLCache:, this method returns an NSURLCache - /// instance created with the following default values: - ///

    - ///
  • Memory capacity: 4 megabytes (4 * 1024 * 1024 bytes) - ///
  • Disk capacity: 20 megabytes (20 * 1024 * 1024 bytes) - ///
  • Disk path: (user home directory)/Library/Caches/(application bundle id) - ///
- ///

Users who do not have special caching requirements or - /// constraints should find the default shared cache instance - /// acceptable. If this default shared cache instance is not - /// acceptable, +setSharedURLCache: can be called to set a - /// different NSURLCache instance to be returned from this method. - /// Callers should take care to ensure that the setter is called - /// at a time when no other caller has a reference to the previously-set - /// shared URL cache. This is to prevent storing cache data from - /// becoming unexpectedly unretrievable. - /// @result the shared NSURLCache instance. - static void setSharedURLCache(NSURLCache value) { - return _objc_msgSend_ukcdfq( - _class_NSURLCache, _sel_setSharedURLCache_, value.ref.pointer); - } - - /// ! - /// @method initWithMemoryCapacity:diskCapacity:diskPath: - /// @abstract Initializes an NSURLCache with the given capacity and - /// path. - /// @discussion The returned NSURLCache is backed by disk, so - /// developers can be more liberal with space when choosing the - /// capacity for this kind of cache. A disk cache measured in the tens - /// of megabytes should be acceptable in most cases. - /// @param memoryCapacity the capacity, measured in bytes, for the cache in memory. - /// @param diskCapacity the capacity, measured in bytes, for the cache on disk. - /// @param path the path on disk where the cache data is stored. - /// @result an initialized NSURLCache, with the given capacity, backed - /// by disk. - NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( - DartNSUInteger memoryCapacity, - DartNSUInteger diskCapacity, - objc.NSString? path) { - final _ret = _objc_msgSend_ebb7er( - this.ref.retainAndReturnPointer(), - _sel_initWithMemoryCapacity_diskCapacity_diskPath_, - memoryCapacity, - diskCapacity, - path?.ref.pointer ?? ffi.nullptr); - return NSURLCache.castFromPointer(_ret, retain: false, release: true); - } - - /// ! - /// @method initWithMemoryCapacity:diskCapacity:directoryURL: - /// @abstract Initializes an NSURLCache with the given capacity and directory. - /// @param memoryCapacity the capacity, measured in bytes, for the cache in memory. Or 0 to disable memory cache. - /// @param diskCapacity the capacity, measured in bytes, for the cache on disk. Or 0 to disable disk cache. - /// @param directoryURL the path to a directory on disk where the cache data is stored. Or nil for default directory. - /// @result an initialized NSURLCache, with the given capacity, optionally backed by disk. - NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( - DartNSUInteger memoryCapacity, - DartNSUInteger diskCapacity, - objc.NSURL? directoryURL) { - final _ret = _objc_msgSend_ebb7er( - this.ref.retainAndReturnPointer(), - _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, - memoryCapacity, - diskCapacity, - directoryURL?.ref.pointer ?? ffi.nullptr); - return NSURLCache.castFromPointer(_ret, retain: false, release: true); - } - - /// ! - /// @method cachedResponseForRequest: - /// @abstract Returns the NSCachedURLResponse stored in the cache with - /// the given request. - /// @discussion The method returns nil if there is no - /// NSCachedURLResponse stored using the given request. - /// @param request the NSURLRequest to use as a key for the lookup. - /// @result The NSCachedURLResponse stored in the cache with the given - /// request, or nil if there is no NSCachedURLResponse stored with the - /// given request. - NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_juohf7( - this.ref.pointer, _sel_cachedResponseForRequest_, request.ref.pointer); - return _ret.address == 0 - ? null - : NSCachedURLResponse.castFromPointer(_ret, - retain: true, release: true); - } - - /// ! - /// @method storeCachedResponse:forRequest: - /// @abstract Stores the given NSCachedURLResponse in the cache using - /// the given request. - /// @param cachedResponse The cached response to store. - /// @param request the NSURLRequest to use as a key for the storage. - void storeCachedResponse_forRequest_( - NSCachedURLResponse cachedResponse, NSURLRequest request) { - _objc_msgSend_1tjlcwl( - this.ref.pointer, - _sel_storeCachedResponse_forRequest_, - cachedResponse.ref.pointer, - request.ref.pointer); - } - - /// ! - /// @method removeCachedResponseForRequest: - /// @abstract Removes the NSCachedURLResponse from the cache that is - /// stored using the given request. - /// @discussion No action is taken if there is no NSCachedURLResponse - /// stored with the given request. - /// @param request the NSURLRequest to use as a key for the lookup. - void removeCachedResponseForRequest_(NSURLRequest request) { - _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponseForRequest_, - request.ref.pointer); - } - - /// ! - /// @method removeAllCachedResponses - /// @abstract Clears the given cache, removing all NSCachedURLResponse - /// objects that it stores. - void removeAllCachedResponses() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_removeAllCachedResponses); - } - - /// ! - /// @method removeCachedResponsesSince: - /// @abstract Clears the given cache of any cached responses since the provided date. - void removeCachedResponsesSinceDate_(objc.NSDate date) { - _objc_msgSend_ukcdfq(this.ref.pointer, _sel_removeCachedResponsesSinceDate_, - date.ref.pointer); - } - - /// ! - /// @abstract In-memory capacity of the receiver. - /// @discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary. - /// @result The in-memory capacity, measured in bytes, for the receiver. - DartNSUInteger get memoryCapacity { - return _objc_msgSend_eldhrq(this.ref.pointer, _sel_memoryCapacity); - } - - /// ! - /// @abstract In-memory capacity of the receiver. - /// @discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary. - /// @result The in-memory capacity, measured in bytes, for the receiver. - set memoryCapacity(DartNSUInteger value) { - return _objc_msgSend_1k4zaz5( - this.ref.pointer, _sel_setMemoryCapacity_, value); - } - - /// ! - /// @abstract The on-disk capacity of the receiver. - /// @discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary. - DartNSUInteger get diskCapacity { - return _objc_msgSend_eldhrq(this.ref.pointer, _sel_diskCapacity); - } - - /// ! - /// @abstract The on-disk capacity of the receiver. - /// @discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary. - set diskCapacity(DartNSUInteger value) { - return _objc_msgSend_1k4zaz5( - this.ref.pointer, _sel_setDiskCapacity_, value); - } - - /// ! - /// @abstract Returns the current amount of space consumed by the - /// in-memory cache of the receiver. - /// @discussion This size, measured in bytes, indicates the current - /// usage of the in-memory cache. - /// @result the current usage of the in-memory cache of the receiver. - DartNSUInteger get currentMemoryUsage { - return _objc_msgSend_eldhrq(this.ref.pointer, _sel_currentMemoryUsage); - } - - /// ! - /// @abstract Returns the current amount of space consumed by the - /// on-disk cache of the receiver. - /// @discussion This size, measured in bytes, indicates the current - /// usage of the on-disk cache. - /// @result the current usage of the on-disk cache of the receiver. - DartNSUInteger get currentDiskUsage { - return _objc_msgSend_eldhrq(this.ref.pointer, _sel_currentDiskUsage); - } - - /// storeCachedResponse:forDataTask: - void storeCachedResponse_forDataTask_( - NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { - _objc_msgSend_1tjlcwl( - this.ref.pointer, - _sel_storeCachedResponse_forDataTask_, - cachedResponse.ref.pointer, - dataTask.ref.pointer); - } - - /// getCachedResponseForDataTask:completionHandler: - void getCachedResponseForDataTask_completionHandler_( - NSURLSessionDataTask dataTask, - objc.ObjCBlock - completionHandler) { - _objc_msgSend_cmbt6k( - this.ref.pointer, - _sel_getCachedResponseForDataTask_completionHandler_, - dataTask.ref.pointer, - completionHandler.ref.pointer); - } - - /// removeCachedResponseForDataTask: - void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { - _objc_msgSend_ukcdfq(this.ref.pointer, - _sel_removeCachedResponseForDataTask_, dataTask.ref.pointer); - } - - /// init - NSURLCache init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLCache.castFromPointer(_ret, retain: false, release: true); - } - - /// new - static NSURLCache new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_new); - return NSURLCache.castFromPointer(_ret, retain: false, release: true); - } - - /// allocWithZone: - static NSURLCache allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_1b3ihd0(_class_NSURLCache, _sel_allocWithZone_, zone); - return NSURLCache.castFromPointer(_ret, retain: false, release: true); - } - - /// alloc - static NSURLCache alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLCache, _sel_alloc); - return NSURLCache.castFromPointer(_ret, retain: false, release: true); - } -} - -late final _class_NSURLCache = objc.getClass("NSURLCache"); late final _sel_sharedURLCache = objc.registerName("sharedURLCache"); -final _objc_msgSend_1unuoxw = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); late final _sel_setSharedURLCache_ = objc.registerName("setSharedURLCache:"); -final _objc_msgSend_ukcdfq = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); +typedef instancetype = ffi.Pointer; +typedef Dartinstancetype = objc.ObjCObjectBase; late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_ = objc.registerName("initWithMemoryCapacity:diskCapacity:diskPath:"); -final _objc_msgSend_ebb7er = objc.msgSendPointer +final _objc_msgSend_1dlfwfh = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - NSUInteger, - NSUInteger, + ffi.UnsignedLong, + ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int, @@ -45187,478 +43307,406 @@ final _objc_msgSend_ebb7er = objc.msgSendPointer ffi.Pointer)>(); late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_ = objc.registerName("initWithMemoryCapacity:diskCapacity:directoryURL:"); +late final _class_NSURLRequest = objc.getClass("NSURLRequest"); +late final _sel_HTTPMethod = objc.registerName("HTTPMethod"); +late final _sel_allHTTPHeaderFields = objc.registerName("allHTTPHeaderFields"); +late final _sel_valueForHTTPHeaderField_ = + objc.registerName("valueForHTTPHeaderField:"); +late final _sel_HTTPBody = objc.registerName("HTTPBody"); +late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); +late final _sel_HTTPShouldHandleCookies = + objc.registerName("HTTPShouldHandleCookies"); +final _objc_msgSend_91o635 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_HTTPShouldUsePipelining = + objc.registerName("HTTPShouldUsePipelining"); /// ! -/// @class NSCachedURLResponse -/// NSCachedURLResponse is a class whose objects functions as a wrapper for -/// objects that are stored in the framework's caching system. -/// It is used to maintain characteristics and attributes of a cached -/// object. -class NSCachedURLResponse extends objc.NSObject { - NSCachedURLResponse._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSCachedURLResponse] that points to the same underlying object as [other]. - NSCachedURLResponse.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSCachedURLResponse] that wraps the given raw object pointer. - NSCachedURLResponse.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSCachedURLResponse]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); - } - - /// ! - /// @method initWithResponse:data - /// @abstract Initializes an NSCachedURLResponse with the given - /// response and data. - /// @discussion A default NSURLCacheStoragePolicy is used for - /// NSCachedURLResponse objects initialized with this method: - /// NSURLCacheStorageAllowed. - /// @param response a NSURLResponse object. - /// @param data an NSData object representing the URL content - /// corresponding to the given response. - /// @result an initialized NSCachedURLResponse. - NSCachedURLResponse initWithResponse_data_( - NSURLResponse response, objc.NSData data) { - final _ret = _objc_msgSend_iq11qg(this.ref.retainAndReturnPointer(), - _sel_initWithResponse_data_, response.ref.pointer, data.ref.pointer); - return NSCachedURLResponse.castFromPointer(_ret, - retain: false, release: true); - } - - /// ! - /// @method initWithResponse:data:userInfo:storagePolicy: - /// @abstract Initializes an NSCachedURLResponse with the given - /// response, data, user-info dictionary, and storage policy. - /// @param response a NSURLResponse object. - /// @param data an NSData object representing the URL content - /// corresponding to the given response. - /// @param userInfo a dictionary user-specified information to be - /// stored with the NSCachedURLResponse. - /// @param storagePolicy an NSURLCacheStoragePolicy constant. - /// @result an initialized NSCachedURLResponse. - NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( - NSURLResponse response, - objc.NSData data, - objc.NSDictionary? userInfo, - NSURLCacheStoragePolicy storagePolicy) { - final _ret = _objc_msgSend_nhp99d( - this.ref.retainAndReturnPointer(), - _sel_initWithResponse_data_userInfo_storagePolicy_, - response.ref.pointer, - data.ref.pointer, - userInfo?.ref.pointer ?? ffi.nullptr, - storagePolicy.value); - return NSCachedURLResponse.castFromPointer(_ret, - retain: false, release: true); - } - - /// ! - /// @abstract Returns the response wrapped by this instance. - /// @result The response wrapped by this instance. - NSURLResponse get response { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_response); - return NSURLResponse.castFromPointer(_ret, retain: true, release: true); - } - - /// ! - /// @abstract Returns the data of the receiver. - /// @result The data of the receiver. - objc.NSData get data { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_data); - return objc.NSData.castFromPointer(_ret, retain: true, release: true); - } - +/// @category NSURLRequest(NSHTTPURLRequest) +/// The NSHTTPURLRequest on NSURLRequest provides methods for accessing +/// information specific to HTTP protocol requests. +extension NSHTTPURLRequest on NSURLRequest { /// ! - /// @abstract Returns the userInfo dictionary of the receiver. - /// @result The userInfo dictionary of the receiver. - objc.NSDictionary? get userInfo { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_userInfo); + /// @abstract Returns the HTTP request method of the receiver. + /// @result the HTTP request method of the receiver. + objc.NSString? get HTTPMethod { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_HTTPMethod); return _ret.address == 0 ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// ! - /// @abstract Returns the NSURLCacheStoragePolicy constant of the receiver. - /// @result The NSURLCacheStoragePolicy constant of the receiver. - NSURLCacheStoragePolicy get storagePolicy { - final _ret = _objc_msgSend_1xh4qg4(this.ref.pointer, _sel_storagePolicy); - return NSURLCacheStoragePolicy.fromValue(_ret); - } - - /// init - NSCachedURLResponse init() { + /// @abstract Returns a dictionary containing all the HTTP header fields + /// of the receiver. + /// @result a dictionary containing all the HTTP header fields of the + /// receiver. + objc.NSDictionary? get allHTTPHeaderFields { final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSCachedURLResponse.castFromPointer(_ret, - retain: false, release: true); - } - - /// new - static NSCachedURLResponse new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSCachedURLResponse, _sel_new); - return NSCachedURLResponse.castFromPointer(_ret, - retain: false, release: true); - } - - /// allocWithZone: - static NSCachedURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( - _class_NSCachedURLResponse, _sel_allocWithZone_, zone); - return NSCachedURLResponse.castFromPointer(_ret, - retain: false, release: true); - } - - /// alloc - static NSCachedURLResponse alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSCachedURLResponse, _sel_alloc); - return NSCachedURLResponse.castFromPointer(_ret, - retain: false, release: true); - } - - /// supportsSecureCoding - static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1( - _class_NSCachedURLResponse, _sel_supportsSecureCoding); - } - - /// encodeWithCoder: - void encodeWithCoder_(objc.NSCoder coder) { - _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - } - - /// initWithCoder: - NSCachedURLResponse? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), - _sel_initWithCoder_, coder.ref.pointer); + _objc_msgSend_1x359cv(this.ref.pointer, _sel_allHTTPHeaderFields); return _ret.address == 0 ? null - : NSCachedURLResponse.castFromPointer(_ret, - retain: false, release: true); - } -} - -late final _class_NSCachedURLResponse = objc.getClass("NSCachedURLResponse"); - -/// NSURLResponse -class NSURLResponse extends objc.NSObject { - NSURLResponse._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSURLResponse] that points to the same underlying object as [other]. - NSURLResponse.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSURLResponse] that wraps the given raw object pointer. - NSURLResponse.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSURLResponse]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLResponse); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } /// ! - /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: - /// @abstract Initialize an NSURLResponse with the provided values. - /// @param URL the URL - /// @param MIMEType the MIME content type of the response - /// @param length the expected content length of the associated data - /// @param name the name of the text encoding for the associated data, if applicable, else nil - /// @result The initialized NSURLResponse. - /// @discussion This is the designated initializer for NSURLResponse. - NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - objc.NSURL URL, - objc.NSString? MIMEType, - DartNSInteger length, - objc.NSString? name) { - final _ret = _objc_msgSend_eyseqq( - this.ref.retainAndReturnPointer(), - _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, - URL.ref.pointer, - MIMEType?.ref.pointer ?? ffi.nullptr, - length, - name?.ref.pointer ?? ffi.nullptr); - return NSURLResponse.castFromPointer(_ret, retain: false, release: true); + /// @method valueForHTTPHeaderField: + /// @abstract Returns the value which corresponds to the given header + /// field. Note that, in keeping with the HTTP RFC, HTTP header field + /// names are case-insensitive. + /// @param field the header field name to use for the lookup + /// (case-insensitive). + /// @result the value associated with the given header field, or nil if + /// there is no value associated with the given header field. + objc.NSString? valueForHTTPHeaderField_(objc.NSString field) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_valueForHTTPHeaderField_, field.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// ! - /// @abstract Returns the URL of the receiver. - /// @result The URL of the receiver. - objc.NSURL? get URL { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); + /// @abstract Returns the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + /// @result The request body data of the receiver. + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_HTTPBody); return _ret.address == 0 ? null - : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } /// ! - /// @abstract Returns the MIME type of the receiver. - /// @discussion The MIME type is based on the information provided - /// from an origin source. However, that value may be changed or - /// corrected by a protocol implementation if it can be determined - /// that the origin server or source reported the information - /// incorrectly or imprecisely. An attempt to guess the MIME type may - /// be made if the origin source did not report any such information. - /// @result The MIME type of the receiver. - objc.NSString? get MIMEType { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_MIMEType); + /// @abstract Returns the request body stream of the receiver + /// if any has been set + /// @discussion The stream is returned for examination only; it is + /// not safe for the caller to manipulate the stream in any way. Also + /// note that the HTTPBodyStream and HTTPBody are mutually exclusive - only + /// one can be set on a given request. Also note that the body stream is + /// preserved across copies, but is LOST when the request is coded via the + /// NSCoding protocol + /// @result The request body stream of the receiver. + objc.NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_HTTPBodyStream); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : objc.NSInputStream.castFromPointer(_ret, retain: true, release: true); } /// ! - /// @abstract Returns the expected content length of the receiver. - /// @discussion Some protocol implementations report a content length - /// as part of delivering load metadata, but not all protocols - /// guarantee the amount of data that will be delivered in actuality. - /// Hence, this method returns an expected amount. Clients should use - /// this value as an advisory, and should be prepared to deal with - /// either more or less data. - /// @result The expected content length of the receiver, or -1 if - /// there is no expectation that can be arrived at regarding expected - /// content length. - int get expectedContentLength { - return _objc_msgSend_e94jsr(this.ref.pointer, _sel_expectedContentLength); + /// @abstract Determine whether default cookie handling will happen for + /// this request. + /// @discussion NOTE: This value is not used prior to 10.3 + /// @result YES if cookies will be sent with and set for this request; + /// otherwise NO. + bool get HTTPShouldHandleCookies { + return _objc_msgSend_91o635(this.ref.pointer, _sel_HTTPShouldHandleCookies); } /// ! - /// @abstract Returns the name of the text encoding of the receiver. - /// @discussion This name will be the actual string reported by the - /// origin source during the course of performing a protocol-specific - /// URL load. Clients can inspect this string and convert it to an - /// NSStringEncoding or CFStringEncoding using the methods and - /// functions made available in the appropriate framework. - /// @result The name of the text encoding of the receiver, or nil if no - /// text encoding was specified. - objc.NSString? get textEncodingName { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_textEncodingName); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// @abstract Reports whether the receiver is not expected to wait for the + /// previous response before transmitting. + /// @result YES if the receiver should transmit before the previous response + /// is received. NO if the receiver should wait for the previous response + /// before transmitting. + bool get HTTPShouldUsePipelining { + return _objc_msgSend_91o635(this.ref.pointer, _sel_HTTPShouldUsePipelining); } +} - /// ! - /// @abstract Returns a suggested filename if the resource were saved to disk. - /// @discussion The method first checks if the server has specified a filename using the - /// content disposition header. If no valid filename is specified using that mechanism, - /// this method checks the last path component of the URL. If no valid filename can be - /// obtained using the last path component, this method uses the URL's host as the filename. - /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. - /// In most cases, this method appends the proper file extension based on the MIME type. - /// This method always returns a valid filename. - /// @result A suggested filename to use if saving the resource to disk. - objc.NSString? get suggestedFilename { - final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_suggestedFilename); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } +late final _sel_requestWithURL_ = objc.registerName("requestWithURL:"); +late final _sel_supportsSecureCoding = + objc.registerName("supportsSecureCoding"); +bool _ObjCBlock_bool_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_bool_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_fnPtrTrampoline, false) + .cast(); +bool _ObjCBlock_bool_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as bool Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_bool_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_ffiVoid_closureTrampoline, false) + .cast(); - /// init - NSURLResponse init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLResponse.castFromPointer(_ret, retain: false, release: true); - } +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_bool_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); - /// new - static NSURLResponse new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLResponse, _sel_new); - return NSURLResponse.castFromPointer(_ret, retain: false, release: true); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_bool_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// allocWithZone: - static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_1b3ihd0(_class_NSURLResponse, _sel_allocWithZone_, zone); - return NSURLResponse.castFromPointer(_ret, retain: false, release: true); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunction( + bool Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock(_ObjCBlock_bool_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); +} - /// alloc - static NSURLResponse alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLResponse, _sel_alloc); - return NSURLResponse.castFromPointer(_ret, retain: false, release: true); - } +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_bool_ffiVoid_CallExtension + on objc.ObjCBlock)> { + bool call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); +} - /// supportsSecureCoding - static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1( - _class_NSURLResponse, _sel_supportsSecureCoding); - } +/// ! +/// @enum NSURLRequestCachePolicy +/// +/// @discussion The NSURLRequestCachePolicy enum defines constants that +/// can be used to specify the type of interactions that take place with +/// the caching system when the URL loading system processes a request. +/// Specifically, these constants cover interactions that have to do +/// with whether already-existing cache data is returned to satisfy a +/// URL load request. +/// +/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the +/// caching logic defined in the protocol implementation, if any, is +/// used for a particular URL load request. This is the default policy +/// for URL load requests. +/// +/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the +/// data for the URL load should be loaded from the origin source. No +/// existing local cache data, regardless of its freshness or validity, +/// should be used to satisfy a URL load request. +/// +/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that +/// not only should the local cache data be ignored, but that proxies and +/// other intermediates should be instructed to disregard their caches +/// so far as the protocol allows. +/// +/// @constant NSURLRequestReloadIgnoringCacheData Older name for +/// NSURLRequestReloadIgnoringLocalCacheData. +/// +/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, +/// the URL is loaded from the origin source. +/// +/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the +/// existing cache data should be used to satisfy a URL load request, +/// regardless of its age or expiration date. However, if there is no +/// existing data in the cache corresponding to a URL load request, no +/// attempt is made to load the URL from the origin source, and the +/// load is considered to have failed. This constant specifies a +/// behavior that is similar to an "offline" mode. +/// +/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that +/// the existing cache data may be used provided the origin source +/// confirms its validity, otherwise the URL is loaded from the +/// origin source. +enum NSURLRequestCachePolicy { + NSURLRequestUseProtocolCachePolicy(0), + NSURLRequestReloadIgnoringLocalCacheData(1), + NSURLRequestReloadIgnoringLocalAndRemoteCacheData(4), + NSURLRequestReturnCacheDataElseLoad(2), + NSURLRequestReturnCacheDataDontLoad(3), + NSURLRequestReloadRevalidatingCacheData(5); - /// encodeWithCoder: - void encodeWithCoder_(objc.NSCoder coder) { - _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - } + static const NSURLRequestReloadIgnoringCacheData = + NSURLRequestReloadIgnoringLocalCacheData; - /// initWithCoder: - NSURLResponse? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), - _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 - ? null - : NSURLResponse.castFromPointer(_ret, retain: false, release: true); + final int value; + const NSURLRequestCachePolicy(this.value); + + static NSURLRequestCachePolicy fromValue(int value) => switch (value) { + 0 => NSURLRequestUseProtocolCachePolicy, + 1 => NSURLRequestReloadIgnoringLocalCacheData, + 4 => NSURLRequestReloadIgnoringLocalAndRemoteCacheData, + 2 => NSURLRequestReturnCacheDataElseLoad, + 3 => NSURLRequestReturnCacheDataDontLoad, + 5 => NSURLRequestReloadRevalidatingCacheData, + _ => throw ArgumentError( + "Unknown value for NSURLRequestCachePolicy: $value"), + }; + + @override + String toString() { + if (this == NSURLRequestReloadIgnoringLocalCacheData) + return "NSURLRequestCachePolicy.NSURLRequestReloadIgnoringLocalCacheData, NSURLRequestCachePolicy.NSURLRequestReloadIgnoringCacheData"; + return super.toString(); } } -late final _class_NSURLResponse = objc.getClass("NSURLResponse"); -late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = - objc.registerName( - "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); -final _objc_msgSend_eyseqq = objc.msgSendPointer +typedef NSTimeInterval = ffi.Double; +typedef DartNSTimeInterval = double; +late final _sel_requestWithURL_cachePolicy_timeoutInterval_ = + objc.registerName("requestWithURL:cachePolicy:timeoutInterval:"); +final _objc_msgSend_3phu9v = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>>() + NSUInteger, + ffi.Double)>>() .asFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, - ffi.Pointer)>(); + double)>(); +late final _sel_initWithURL_ = objc.registerName("initWithURL:"); +late final _sel_initWithURL_cachePolicy_timeoutInterval_ = + objc.registerName("initWithURL:cachePolicy:timeoutInterval:"); late final _sel_URL = objc.registerName("URL"); -late final _sel_MIMEType = objc.registerName("MIMEType"); -late final _sel_expectedContentLength = - objc.registerName("expectedContentLength"); -final _objc_msgSend_e94jsr = objc.msgSendPointer +late final _sel_cachePolicy = objc.registerName("cachePolicy"); +final _objc_msgSend_8jm3uo = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, + NSUInteger Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_textEncodingName = objc.registerName("textEncodingName"); -late final _sel_suggestedFilename = objc.registerName("suggestedFilename"); -late final _sel_init = objc.registerName("init"); -late final _sel_new = objc.registerName("new"); -late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); -final _objc_msgSend_1b3ihd0 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>(); -late final _sel_alloc = objc.registerName("alloc"); -final _objc_msgSend_olxnu1 = objc.msgSendPointer +late final _sel_timeoutInterval = objc.registerName("timeoutInterval"); +final _objc_msgSend_1ukqyt8 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, + ffi.Double Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - bool Function( + double Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_juohf7 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithResponse_data_ = - objc.registerName("initWithResponse:data:"); -final _objc_msgSend_iq11qg = objc.msgSendPointer +final _objc_msgSend_1ukqyt8Fpret = objc.msgSendFpretPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_mainDocumentURL = objc.registerName("mainDocumentURL"); /// ! -/// @enum NSURLCacheStoragePolicy +/// @enum NSURLRequestNetworkServiceType /// -/// @discussion The NSURLCacheStoragePolicy enum defines constants that -/// can be used to specify the type of storage that is allowable for an -/// NSCachedURLResponse object that is to be stored in an NSURLCache. +/// @discussion The NSURLRequestNetworkServiceType enum defines constants that +/// can be used to specify the service type to associate with this request. The +/// service type is used to provide the networking layers a hint of the purpose +/// of the request. /// -/// @constant NSURLCacheStorageAllowed Specifies that storage in an -/// NSURLCache is allowed without restriction. +/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest +/// when created. This value should be left unchanged for the vast majority of requests. /// -/// @constant NSURLCacheStorageAllowedInMemoryOnly Specifies that -/// storage in an NSURLCache is allowed; however storage should be -/// done in memory only, no disk storage should be done. +/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP +/// control traffic. /// -/// @constant NSURLCacheStorageNotAllowed Specifies that storage in an -/// NSURLCache is not allowed in any fashion, either in memory or on -/// disk. -enum NSURLCacheStoragePolicy { - NSURLCacheStorageAllowed(0), - NSURLCacheStorageAllowedInMemoryOnly(1), - NSURLCacheStorageNotAllowed(2); +/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video +/// traffic. +/// +/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background +/// traffic (such as a file download). +/// +/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. +/// +/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. +/// +/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. +/// +/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. +enum NSURLRequestNetworkServiceType { + /// Standard internet traffic + NSURLNetworkServiceTypeDefault(0), + + /// Voice over IP control traffic + NSURLNetworkServiceTypeVoIP(1), + + /// Video traffic + NSURLNetworkServiceTypeVideo(2), + + /// Background traffic + NSURLNetworkServiceTypeBackground(3), + + /// Voice data + NSURLNetworkServiceTypeVoice(4), + + /// Responsive data + NSURLNetworkServiceTypeResponsiveData(6), + + /// Multimedia Audio/Video Streaming + NSURLNetworkServiceTypeAVStreaming(8), + + /// Responsive Multimedia Audio/Video + NSURLNetworkServiceTypeResponsiveAV(9), + + /// Call Signaling + NSURLNetworkServiceTypeCallSignaling(11); final int value; - const NSURLCacheStoragePolicy(this.value); + const NSURLRequestNetworkServiceType(this.value); - static NSURLCacheStoragePolicy fromValue(int value) => switch (value) { - 0 => NSURLCacheStorageAllowed, - 1 => NSURLCacheStorageAllowedInMemoryOnly, - 2 => NSURLCacheStorageNotAllowed, + static NSURLRequestNetworkServiceType fromValue(int value) => switch (value) { + 0 => NSURLNetworkServiceTypeDefault, + 1 => NSURLNetworkServiceTypeVoIP, + 2 => NSURLNetworkServiceTypeVideo, + 3 => NSURLNetworkServiceTypeBackground, + 4 => NSURLNetworkServiceTypeVoice, + 6 => NSURLNetworkServiceTypeResponsiveData, + 8 => NSURLNetworkServiceTypeAVStreaming, + 9 => NSURLNetworkServiceTypeResponsiveAV, + 11 => NSURLNetworkServiceTypeCallSignaling, _ => throw ArgumentError( - "Unknown value for NSURLCacheStoragePolicy: $value"), + "Unknown value for NSURLRequestNetworkServiceType: $value"), }; } -late final _sel_initWithResponse_data_userInfo_storagePolicy_ = - objc.registerName("initWithResponse:data:userInfo:storagePolicy:"); -final _objc_msgSend_nhp99d = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_response = objc.registerName("response"); -late final _sel_data = objc.registerName("data"); -late final _sel_userInfo = objc.registerName("userInfo"); -late final _sel_storagePolicy = objc.registerName("storagePolicy"); -final _objc_msgSend_1xh4qg4 = objc.msgSendPointer +late final _sel_networkServiceType = objc.registerName("networkServiceType"); +final _objc_msgSend_t4uaw1 = objc.msgSendPointer .cast< ffi.NativeFunction< NSUInteger Function(ffi.Pointer, @@ -45666,56 +43714,449 @@ final _objc_msgSend_1xh4qg4 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); +late final _sel_allowsCellularAccess = + objc.registerName("allowsCellularAccess"); +late final _sel_allowsExpensiveNetworkAccess = + objc.registerName("allowsExpensiveNetworkAccess"); +late final _sel_allowsConstrainedNetworkAccess = + objc.registerName("allowsConstrainedNetworkAccess"); +late final _sel_assumesHTTP3Capable = objc.registerName("assumesHTTP3Capable"); -/// NSURLRequest -class NSURLRequest extends objc.NSObject { - NSURLRequest._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); +/// ! +/// @enum NSURLRequestAttribution +/// +/// @discussion The NSURLRequestAttribution enum is used to indicate whether the +/// user or developer specified the URL. +/// +/// @constant NSURLRequestAttributionDeveloper Indicates that the URL was specified +/// by the developer. This is the default value for an NSURLRequest when created. +/// +/// @constant NSURLRequestAttributionUser Indicates that the URL was specified by +/// the user. +enum NSURLRequestAttribution { + NSURLRequestAttributionDeveloper(0), + NSURLRequestAttributionUser(1); - /// Constructs a [NSURLRequest] that points to the same underlying object as [other]. - NSURLRequest.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); + final int value; + const NSURLRequestAttribution(this.value); - /// Constructs a [NSURLRequest] that wraps the given raw object pointer. - NSURLRequest.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); + static NSURLRequestAttribution fromValue(int value) => switch (value) { + 0 => NSURLRequestAttributionDeveloper, + 1 => NSURLRequestAttributionUser, + _ => throw ArgumentError( + "Unknown value for NSURLRequestAttribution: $value"), + }; +} - /// Returns whether [obj] is an instance of [NSURLRequest]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLRequest); - } +late final _sel_attribution = objc.registerName("attribution"); +final _objc_msgSend_i3avs9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_requiresDNSSECValidation = + objc.registerName("requiresDNSSECValidation"); +late final _sel_init = objc.registerName("init"); +late final _sel_new = objc.registerName("new"); +late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +final _objc_msgSend_hzlb60 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>(); +late final _sel_alloc = objc.registerName("alloc"); +late final _sel_self = objc.registerName("self"); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer)>()(arg0); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_objcObjCObject_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_objcObjCObject_ffiVoid_closureTrampoline) + .cast(); - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSURLRequest requestWithURL_(objc.NSURL URL) { - final _ret = _objc_msgSend_juohf7( - _class_NSURLRequest, _sel_requestWithURL_, URL.ref.pointer); - return NSURLRequest.castFromPointer(_ret, retain: true, release: true); - } +/// Construction methods for `objc.ObjCBlock Function(ffi.Pointer)>`. +abstract final class ObjCBlock_objcObjCObject_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock Function(ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer)>( + pointer, + retain: retain, + release: release); - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSURLRequest, _sel_supportsSecureCoding); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock Function(ffi.Pointer)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock Function(ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_objcObjCObject_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock Function(ffi.Pointer)> + fromFunction(objc.ObjCObjectBase Function(ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Pointer Function(ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_objcObjCObject_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock Function(ffi.Pointer)>`. +extension ObjCBlock_objcObjCObject_ffiVoid_CallExtension on objc + .ObjCBlock Function(ffi.Pointer)> { + objc.ObjCObjectBase call(ffi.Pointer arg0) => objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); +} + +late final _sel_retain = objc.registerName("retain"); +late final _sel_autorelease = objc.registerName("autorelease"); +late final _sel_encodeWithCoder_ = objc.registerName("encodeWithCoder:"); +void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, objc.NSCoder)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSCoder { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock, objc.NSCoder)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + objc.NSCoder)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.NSCoder)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, objc.NSCoder)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.NSCoder)> + fromFunction(void Function(ffi.Pointer, objc.NSCoder) fn) => + objc.ObjCBlock, objc.NSCoder)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn( + arg0, + objc.NSCoder.castFromPointer(arg1, + retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock, objc.NSCoder)> + listener(void Function(ffi.Pointer, objc.NSCoder) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSCoder_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + objc.NSCoder.castFromPointer(arg1, retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_wjovn7(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, objc.NSCoder)>(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, objc.NSCoder)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSCoder_CallExtension + on objc.ObjCBlock, objc.NSCoder)> { + void call(ffi.Pointer arg0, objc.NSCoder arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer); +} + +late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable = + ffi.Pointer.fromFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrTrampoline) + .cast(); +instancetype _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as instancetype Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable = + ffi.Pointer.fromFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_instancetype_ffiVoid_NSCoder_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>`. +abstract final class ObjCBlock_instancetype_ffiVoid_NSCoder { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, + objc.NSCoder)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)>( + objc.newPointerBlock( + _ObjCBlock_instancetype_ffiVoid_NSCoder_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)> fromFunction( + Dartinstancetype? Function(ffi.Pointer, objc.NSCoder) fn) => + objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>( + objc.newClosureBlock( + _ObjCBlock_instancetype_ffiVoid_NSCoder_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, objc.NSCoder.castFromPointer(arg1, retain: true, release: true)) + ?.ref + .retainAndReturnPointer() ?? + ffi.nullptr), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock?> Function(ffi.Pointer, objc.NSCoder)>`. +extension ObjCBlock_instancetype_ffiVoid_NSCoder_CallExtension + on objc.ObjCBlock< + objc.Retained?> Function( + ffi.Pointer, objc.NSCoder)> { + Dartinstancetype? call(ffi.Pointer arg0, objc.NSCoder arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction, ffi.Pointer, ffi.Pointer)>() + (ref.pointer, arg0, arg1.ref.pointer) + .address == + 0 + ? null + : objc.ObjCObjectBase( + ref.pointer.ref.invoke + .cast block, ffi.Pointer arg0, ffi.Pointer arg1)>>() + .asFunction, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0, arg1.ref.pointer), + retain: false, + release: true); +} + +/// NSURLRequest +class NSURLRequest extends objc.NSObject { + NSURLRequest._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLRequest] that points to the same underlying object as [other]. + NSURLRequest.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLRequest] that wraps the given raw object pointer. + NSURLRequest.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLRequest]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_69e0x1( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLRequest); + } + + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_62nh5j( + _class_NSURLRequest, _sel_requestWithURL_, URL.ref.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635(_class_NSURLRequest, _sel_supportsSecureCoding); + } + + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. /// @param cachePolicy The cache policy for the request. /// @param timeoutInterval The timeout interval for the request. See the /// commentary for the timeoutInterval for more information on @@ -45725,7 +44166,7 @@ class NSURLRequest extends objc.NSObject { objc.NSURL URL, NSURLRequestCachePolicy cachePolicy, DartNSTimeInterval timeoutInterval) { - final _ret = _objc_msgSend_191svj( + final _ret = _objc_msgSend_3phu9v( _class_NSURLRequest, _sel_requestWithURL_cachePolicy_timeoutInterval_, URL.ref.pointer, @@ -45743,7 +44184,7 @@ class NSURLRequest extends objc.NSObject { /// @param URL The URL for the request. /// @result An initialized NSURLRequest. NSURLRequest initWithURL_(objc.NSURL URL) { - final _ret = _objc_msgSend_juohf7( + final _ret = _objc_msgSend_62nh5j( this.ref.retainAndReturnPointer(), _sel_initWithURL_, URL.ref.pointer); return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } @@ -45762,7 +44203,7 @@ class NSURLRequest extends objc.NSObject { /// @result An initialized NSURLRequest. NSURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, NSURLRequestCachePolicy cachePolicy, DartNSTimeInterval timeoutInterval) { - final _ret = _objc_msgSend_191svj( + final _ret = _objc_msgSend_3phu9v( this.ref.retainAndReturnPointer(), _sel_initWithURL_cachePolicy_timeoutInterval_, URL.ref.pointer, @@ -45775,7 +44216,7 @@ class NSURLRequest extends objc.NSObject { /// @abstract Returns the URL of the receiver. /// @result The URL of the receiver. objc.NSURL? get URL { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_URL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); @@ -45785,7 +44226,7 @@ class NSURLRequest extends objc.NSObject { /// @abstract Returns the cache policy of the receiver. /// @result The cache policy of the receiver. NSURLRequestCachePolicy get cachePolicy { - final _ret = _objc_msgSend_2xak1q(this.ref.pointer, _sel_cachePolicy); + final _ret = _objc_msgSend_8jm3uo(this.ref.pointer, _sel_cachePolicy); return NSURLRequestCachePolicy.fromValue(_ret); } @@ -45803,7 +44244,9 @@ class NSURLRequest extends objc.NSObject { /// in seconds. /// @result The timeout interval of the receiver. DartNSTimeInterval get timeoutInterval { - return _objc_msgSend_10noklm(this.ref.pointer, _sel_timeoutInterval); + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(this.ref.pointer, _sel_timeoutInterval) + : _objc_msgSend_1ukqyt8(this.ref.pointer, _sel_timeoutInterval); } /// ! @@ -45814,7 +44257,7 @@ class NSURLRequest extends objc.NSObject { /// See setMainDocumentURL: /// @result The main document URL. objc.NSURL? get mainDocumentURL { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_mainDocumentURL); + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_mainDocumentURL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); @@ -45827,7 +44270,7 @@ class NSURLRequest extends objc.NSObject { /// @result The NSURLRequestNetworkServiceType associated with this request. NSURLRequestNetworkServiceType get networkServiceType { final _ret = - _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); + _objc_msgSend_t4uaw1(this.ref.pointer, _sel_networkServiceType); return NSURLRequestNetworkServiceType.fromValue(_ret); } @@ -45837,7 +44280,7 @@ class NSURLRequest extends objc.NSObject { /// @result YES if the receiver is allowed to use the built in cellular radios to /// satisfy the request, NO otherwise. bool get allowsCellularAccess { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsCellularAccess); + return _objc_msgSend_91o635(this.ref.pointer, _sel_allowsCellularAccess); } /// ! @@ -45846,7 +44289,7 @@ class NSURLRequest extends objc.NSObject { /// @result YES if the receiver is allowed to use an interface marked as expensive to /// satisfy the request, NO otherwise. bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_olxnu1( + return _objc_msgSend_91o635( this.ref.pointer, _sel_allowsExpensiveNetworkAccess); } @@ -45856,7 +44299,7 @@ class NSURLRequest extends objc.NSObject { /// @result YES if the receiver is allowed to use an interface marked as constrained to /// satisfy the request, NO otherwise. bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_olxnu1( + return _objc_msgSend_91o635( this.ref.pointer, _sel_allowsConstrainedNetworkAccess); } @@ -45866,7 +44309,7 @@ class NSURLRequest extends objc.NSObject { /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. /// The default may be YES in a future OS update. bool get assumesHTTP3Capable { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_assumesHTTP3Capable); + return _objc_msgSend_91o635(this.ref.pointer, _sel_assumesHTTP3Capable); } /// ! @@ -45875,7 +44318,7 @@ class NSURLRequest extends objc.NSObject { /// have not explicitly set an attribution. /// @result The NSURLRequestAttribution associated with this request. NSURLRequestAttribution get attribution { - final _ret = _objc_msgSend_t5yka9(this.ref.pointer, _sel_attribution); + final _ret = _objc_msgSend_i3avs9(this.ref.pointer, _sel_attribution); return NSURLRequestAttribution.fromValue(_ret); } @@ -45884,97 +44327,63 @@ class NSURLRequest extends objc.NSObject { /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, /// No otherwise. Defaults to NO. bool get requiresDNSSECValidation { - return _objc_msgSend_olxnu1( + return _objc_msgSend_91o635( this.ref.pointer, _sel_requiresDNSSECValidation); } - /// HTTPMethod - objc.NSString? get HTTPMethod { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPMethod); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// allHTTPHeaderFields - objc.NSDictionary? get allHTTPHeaderFields { - final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allHTTPHeaderFields); - return _ret.address == 0 - ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); - } - - /// valueForHTTPHeaderField: - objc.NSString? valueForHTTPHeaderField_(objc.NSString field) { - final _ret = _objc_msgSend_juohf7( - this.ref.pointer, _sel_valueForHTTPHeaderField_, field.ref.pointer); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// HTTPBody - objc.NSData? get HTTPBody { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBody); - return _ret.address == 0 - ? null - : objc.NSData.castFromPointer(_ret, retain: true, release: true); - } - - /// HTTPBodyStream - objc.NSInputStream? get HTTPBodyStream { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBodyStream); - return _ret.address == 0 - ? null - : objc.NSInputStream.castFromPointer(_ret, retain: true, release: true); - } - - /// HTTPShouldHandleCookies - bool get HTTPShouldHandleCookies { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldHandleCookies); - } - - /// HTTPShouldUsePipelining - bool get HTTPShouldUsePipelining { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldUsePipelining); - } - /// init NSURLRequest init() { final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } /// new static NSURLRequest new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLRequest, _sel_new); + final _ret = _objc_msgSend_1x359cv(_class_NSURLRequest, _sel_new); return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_1b3ihd0(_class_NSURLRequest, _sel_allocWithZone_, zone); + _objc_msgSend_hzlb60(_class_NSURLRequest, _sel_allocWithZone_, zone); return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSURLRequest alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLRequest, _sel_alloc); + final _ret = _objc_msgSend_1x359cv(_class_NSURLRequest, _sel_alloc); return NSURLRequest.castFromPointer(_ret, retain: false, release: true); } + /// self + NSURLRequest self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSURLRequest retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSURLRequest autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + /// encodeWithCoder: void encodeWithCoder_(objc.NSCoder coder) { - _objc_msgSend_ukcdfq( + _objc_msgSend_1jdvcbf( this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } /// initWithCoder: NSURLRequest? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -45982,1180 +44391,1734 @@ class NSURLRequest extends objc.NSObject { } } -late final _class_NSURLRequest = objc.getClass("NSURLRequest"); -late final _sel_requestWithURL_ = objc.registerName("requestWithURL:"); - -/// ! -/// @enum NSURLRequestCachePolicy -/// -/// @discussion The NSURLRequestCachePolicy enum defines constants that -/// can be used to specify the type of interactions that take place with -/// the caching system when the URL loading system processes a request. -/// Specifically, these constants cover interactions that have to do -/// with whether already-existing cache data is returned to satisfy a -/// URL load request. -/// -/// @constant NSURLRequestUseProtocolCachePolicy Specifies that the -/// caching logic defined in the protocol implementation, if any, is -/// used for a particular URL load request. This is the default policy -/// for URL load requests. -/// -/// @constant NSURLRequestReloadIgnoringLocalCacheData Specifies that the -/// data for the URL load should be loaded from the origin source. No -/// existing local cache data, regardless of its freshness or validity, -/// should be used to satisfy a URL load request. -/// -/// @constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData Specifies that -/// not only should the local cache data be ignored, but that proxies and -/// other intermediates should be instructed to disregard their caches -/// so far as the protocol allows. -/// -/// @constant NSURLRequestReloadIgnoringCacheData Older name for -/// NSURLRequestReloadIgnoringLocalCacheData. -/// -/// @constant NSURLRequestReturnCacheDataElseLoad Specifies that the -/// existing cache data should be used to satisfy a URL load request, -/// regardless of its age or expiration date. However, if there is no -/// existing data in the cache corresponding to a URL load request, -/// the URL is loaded from the origin source. -/// -/// @constant NSURLRequestReturnCacheDataDontLoad Specifies that the -/// existing cache data should be used to satisfy a URL load request, -/// regardless of its age or expiration date. However, if there is no -/// existing data in the cache corresponding to a URL load request, no -/// attempt is made to load the URL from the origin source, and the -/// load is considered to have failed. This constant specifies a -/// behavior that is similar to an "offline" mode. -/// -/// @constant NSURLRequestReloadRevalidatingCacheData Specifies that -/// the existing cache data may be used provided the origin source -/// confirms its validity, otherwise the URL is loaded from the -/// origin source. -enum NSURLRequestCachePolicy { - NSURLRequestUseProtocolCachePolicy(0), - NSURLRequestReloadIgnoringLocalCacheData(1), - NSURLRequestReloadIgnoringLocalAndRemoteCacheData(4), - NSURLRequestReturnCacheDataElseLoad(2), - NSURLRequestReturnCacheDataDontLoad(3), - NSURLRequestReloadRevalidatingCacheData(5); - - static const NSURLRequestReloadIgnoringCacheData = - NSURLRequestReloadIgnoringLocalCacheData; - - final int value; - const NSURLRequestCachePolicy(this.value); - - static NSURLRequestCachePolicy fromValue(int value) => switch (value) { - 0 => NSURLRequestUseProtocolCachePolicy, - 1 => NSURLRequestReloadIgnoringLocalCacheData, - 4 => NSURLRequestReloadIgnoringLocalAndRemoteCacheData, - 2 => NSURLRequestReturnCacheDataElseLoad, - 3 => NSURLRequestReturnCacheDataDontLoad, - 5 => NSURLRequestReloadRevalidatingCacheData, - _ => throw ArgumentError( - "Unknown value for NSURLRequestCachePolicy: $value"), - }; - - @override - String toString() { - if (this == NSURLRequestReloadIgnoringLocalCacheData) - return "NSURLRequestCachePolicy.NSURLRequestReloadIgnoringLocalCacheData, NSURLRequestCachePolicy.NSURLRequestReloadIgnoringCacheData"; - return super.toString(); - } -} - -typedef NSTimeInterval = ffi.Double; -typedef DartNSTimeInterval = double; -late final _sel_requestWithURL_cachePolicy_timeoutInterval_ = - objc.registerName("requestWithURL:cachePolicy:timeoutInterval:"); -final _objc_msgSend_191svj = objc.msgSendPointer +late final _sel_cachedResponseForRequest_ = + objc.registerName("cachedResponseForRequest:"); +late final _sel_storeCachedResponse_forRequest_ = + objc.registerName("storeCachedResponse:forRequest:"); +late final _sel_removeCachedResponseForRequest_ = + objc.registerName("removeCachedResponseForRequest:"); +late final _sel_removeAllCachedResponses = + objc.registerName("removeAllCachedResponses"); +final _objc_msgSend_1pl9qdv = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSTimeInterval)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - double)>(); -late final _sel_initWithURL_ = objc.registerName("initWithURL:"); -late final _sel_initWithURL_cachePolicy_timeoutInterval_ = - objc.registerName("initWithURL:cachePolicy:timeoutInterval:"); -late final _sel_cachePolicy = objc.registerName("cachePolicy"); -final _objc_msgSend_2xak1q = objc.msgSendPointer + void Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeCachedResponsesSinceDate_ = + objc.registerName("removeCachedResponsesSinceDate:"); +late final _sel_memoryCapacity = objc.registerName("memoryCapacity"); +final _objc_msgSend_xw2lbc = objc.msgSendPointer .cast< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, + ffi.UnsignedLong Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_timeoutInterval = objc.registerName("timeoutInterval"); -final _objc_msgSend_10noklm = objc.msgSendPointer +late final _sel_setMemoryCapacity_ = objc.registerName("setMemoryCapacity:"); +final _objc_msgSend_1i9r4xy = objc.msgSendPointer .cast< ffi.NativeFunction< - NSTimeInterval Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - double Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_mainDocumentURL = objc.registerName("mainDocumentURL"); + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_diskCapacity = objc.registerName("diskCapacity"); +late final _sel_setDiskCapacity_ = objc.registerName("setDiskCapacity:"); +late final _sel_currentMemoryUsage = objc.registerName("currentMemoryUsage"); +late final _sel_currentDiskUsage = objc.registerName("currentDiskUsage"); -/// ! -/// @enum NSURLRequestNetworkServiceType -/// -/// @discussion The NSURLRequestNetworkServiceType enum defines constants that -/// can be used to specify the service type to associate with this request. The -/// service type is used to provide the networking layers a hint of the purpose -/// of the request. -/// -/// @constant NSURLNetworkServiceTypeDefault Is the default value for an NSURLRequest -/// when created. This value should be left unchanged for the vast majority of requests. -/// -/// @constant NSURLNetworkServiceTypeVoIP Specifies that the request is for voice over IP -/// control traffic. -/// -/// @constant NSURLNetworkServiceTypeVideo Specifies that the request is for video -/// traffic. -/// -/// @constant NSURLNetworkServiceTypeBackground Specifies that the request is for background -/// traffic (such as a file download). -/// -/// @constant NSURLNetworkServiceTypeVoice Specifies that the request is for voice data. -/// -/// @constant NSURLNetworkServiceTypeResponsiveData Specifies that the request is for responsive (time sensitive) data. -/// -/// @constant NSURLNetworkServiceTypeAVStreaming Specifies that the request is streaming audio/video data. -/// -/// @constant NSURLNetworkServiceTypeResponsiveAV Specifies that the request is for responsive (time sensitive) audio/video data. -/// -/// @constant NSURLNetworkServiceTypeCallSignaling Specifies that the request is for call signaling. -enum NSURLRequestNetworkServiceType { - /// Standard internet traffic - NSURLNetworkServiceTypeDefault(0), +/// NSURLCache +class NSURLCache extends objc.NSObject { + NSURLCache._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - /// Voice over IP control traffic - NSURLNetworkServiceTypeVoIP(1), + /// Constructs a [NSURLCache] that points to the same underlying object as [other]. + NSURLCache.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Video traffic - NSURLNetworkServiceTypeVideo(2), + /// Constructs a [NSURLCache] that wraps the given raw object pointer. + NSURLCache.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Background traffic - NSURLNetworkServiceTypeBackground(3), + /// Returns whether [obj] is an instance of [NSURLCache]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_69e0x1( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCache); + } - /// Voice data - NSURLNetworkServiceTypeVoice(4), + /// ! + /// @property sharedURLCache + /// @abstract Returns the shared NSURLCache instance or + /// sets the NSURLCache instance shared by all clients of + /// the current process. This will be the new object returned when + /// calls to the sharedURLCache method are made. + /// @discussion Unless set explicitly through a call to + /// +setSharedURLCache:, this method returns an NSURLCache + /// instance created with the following default values: + ///

    + ///
  • Memory capacity: 4 megabytes (4 * 1024 * 1024 bytes) + ///
  • Disk capacity: 20 megabytes (20 * 1024 * 1024 bytes) + ///
  • Disk path: (user home directory)/Library/Caches/(application bundle id) + ///
+ ///

Users who do not have special caching requirements or + /// constraints should find the default shared cache instance + /// acceptable. If this default shared cache instance is not + /// acceptable, +setSharedURLCache: can be called to set a + /// different NSURLCache instance to be returned from this method. + /// Callers should take care to ensure that the setter is called + /// at a time when no other caller has a reference to the previously-set + /// shared URL cache. This is to prevent storing cache data from + /// becoming unexpectedly unretrievable. + /// @result the shared NSURLCache instance. + static NSURLCache getSharedURLCache() { + final _ret = _objc_msgSend_1x359cv(_class_NSURLCache, _sel_sharedURLCache); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); + } - /// Responsive data - NSURLNetworkServiceTypeResponsiveData(6), + /// ! + /// @property sharedURLCache + /// @abstract Returns the shared NSURLCache instance or + /// sets the NSURLCache instance shared by all clients of + /// the current process. This will be the new object returned when + /// calls to the sharedURLCache method are made. + /// @discussion Unless set explicitly through a call to + /// +setSharedURLCache:, this method returns an NSURLCache + /// instance created with the following default values: + ///

    + ///
  • Memory capacity: 4 megabytes (4 * 1024 * 1024 bytes) + ///
  • Disk capacity: 20 megabytes (20 * 1024 * 1024 bytes) + ///
  • Disk path: (user home directory)/Library/Caches/(application bundle id) + ///
+ ///

Users who do not have special caching requirements or + /// constraints should find the default shared cache instance + /// acceptable. If this default shared cache instance is not + /// acceptable, +setSharedURLCache: can be called to set a + /// different NSURLCache instance to be returned from this method. + /// Callers should take care to ensure that the setter is called + /// at a time when no other caller has a reference to the previously-set + /// shared URL cache. This is to prevent storing cache data from + /// becoming unexpectedly unretrievable. + /// @result the shared NSURLCache instance. + static void setSharedURLCache(NSURLCache value) { + return _objc_msgSend_1jdvcbf( + _class_NSURLCache, _sel_setSharedURLCache_, value.ref.pointer); + } - /// Multimedia Audio/Video Streaming - NSURLNetworkServiceTypeAVStreaming(8), + /// ! + /// @method initWithMemoryCapacity:diskCapacity:diskPath: + /// @abstract Initializes an NSURLCache with the given capacity and + /// path. + /// @discussion The returned NSURLCache is backed by disk, so + /// developers can be more liberal with space when choosing the + /// capacity for this kind of cache. A disk cache measured in the tens + /// of megabytes should be acceptable in most cases. + /// @param memoryCapacity the capacity, measured in bytes, for the cache in memory. + /// @param diskCapacity the capacity, measured in bytes, for the cache on disk. + /// @param path the path on disk where the cache data is stored. + /// @result an initialized NSURLCache, with the given capacity, backed + /// by disk. + NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( + DartNSUInteger memoryCapacity, + DartNSUInteger diskCapacity, + objc.NSString? path) { + final _ret = _objc_msgSend_1dlfwfh( + this.ref.retainAndReturnPointer(), + _sel_initWithMemoryCapacity_diskCapacity_diskPath_, + memoryCapacity, + diskCapacity, + path?.ref.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); + } - /// Responsive Multimedia Audio/Video - NSURLNetworkServiceTypeResponsiveAV(9), + /// ! + /// @method initWithMemoryCapacity:diskCapacity:directoryURL: + /// @abstract Initializes an NSURLCache with the given capacity and directory. + /// @param memoryCapacity the capacity, measured in bytes, for the cache in memory. Or 0 to disable memory cache. + /// @param diskCapacity the capacity, measured in bytes, for the cache on disk. Or 0 to disable disk cache. + /// @param directoryURL the path to a directory on disk where the cache data is stored. Or nil for default directory. + /// @result an initialized NSURLCache, with the given capacity, optionally backed by disk. + NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( + DartNSUInteger memoryCapacity, + DartNSUInteger diskCapacity, + objc.NSURL? directoryURL) { + final _ret = _objc_msgSend_1dlfwfh( + this.ref.retainAndReturnPointer(), + _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, + memoryCapacity, + diskCapacity, + directoryURL?.ref.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); + } - /// Call Signaling - NSURLNetworkServiceTypeCallSignaling(11); + /// ! + /// @method cachedResponseForRequest: + /// @abstract Returns the NSCachedURLResponse stored in the cache with + /// the given request. + /// @discussion The method returns nil if there is no + /// NSCachedURLResponse stored using the given request. + /// @param request the NSURLRequest to use as a key for the lookup. + /// @result The NSCachedURLResponse stored in the cache with the given + /// request, or nil if there is no NSCachedURLResponse stored with the + /// given request. + NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_cachedResponseForRequest_, request.ref.pointer); + return _ret.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); + } - final int value; - const NSURLRequestNetworkServiceType(this.value); + /// ! + /// @method storeCachedResponse:forRequest: + /// @abstract Stores the given NSCachedURLResponse in the cache using + /// the given request. + /// @param cachedResponse The cached response to store. + /// @param request the NSURLRequest to use as a key for the storage. + void storeCachedResponse_forRequest_( + NSCachedURLResponse cachedResponse, NSURLRequest request) { + _objc_msgSend_wjvic9(this.ref.pointer, _sel_storeCachedResponse_forRequest_, + cachedResponse.ref.pointer, request.ref.pointer); + } - static NSURLRequestNetworkServiceType fromValue(int value) => switch (value) { - 0 => NSURLNetworkServiceTypeDefault, - 1 => NSURLNetworkServiceTypeVoIP, - 2 => NSURLNetworkServiceTypeVideo, - 3 => NSURLNetworkServiceTypeBackground, - 4 => NSURLNetworkServiceTypeVoice, - 6 => NSURLNetworkServiceTypeResponsiveData, - 8 => NSURLNetworkServiceTypeAVStreaming, - 9 => NSURLNetworkServiceTypeResponsiveAV, - 11 => NSURLNetworkServiceTypeCallSignaling, - _ => throw ArgumentError( - "Unknown value for NSURLRequestNetworkServiceType: $value"), - }; -} + /// ! + /// @method removeCachedResponseForRequest: + /// @abstract Removes the NSCachedURLResponse from the cache that is + /// stored using the given request. + /// @discussion No action is taken if there is no NSCachedURLResponse + /// stored with the given request. + /// @param request the NSURLRequest to use as a key for the lookup. + void removeCachedResponseForRequest_(NSURLRequest request) { + _objc_msgSend_1jdvcbf(this.ref.pointer, + _sel_removeCachedResponseForRequest_, request.ref.pointer); + } -late final _sel_networkServiceType = objc.registerName("networkServiceType"); -final _objc_msgSend_ttt73t = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_allowsCellularAccess = - objc.registerName("allowsCellularAccess"); -late final _sel_allowsExpensiveNetworkAccess = - objc.registerName("allowsExpensiveNetworkAccess"); -late final _sel_allowsConstrainedNetworkAccess = - objc.registerName("allowsConstrainedNetworkAccess"); -late final _sel_assumesHTTP3Capable = objc.registerName("assumesHTTP3Capable"); + /// ! + /// @method removeAllCachedResponses + /// @abstract Clears the given cache, removing all NSCachedURLResponse + /// objects that it stores. + void removeAllCachedResponses() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_removeAllCachedResponses); + } -/// ! -/// @enum NSURLRequestAttribution -/// -/// @discussion The NSURLRequestAttribution enum is used to indicate whether the -/// user or developer specified the URL. -/// -/// @constant NSURLRequestAttributionDeveloper Indicates that the URL was specified -/// by the developer. This is the default value for an NSURLRequest when created. -/// -/// @constant NSURLRequestAttributionUser Indicates that the URL was specified by -/// the user. -enum NSURLRequestAttribution { - NSURLRequestAttributionDeveloper(0), - NSURLRequestAttributionUser(1); + /// ! + /// @method removeCachedResponsesSince: + /// @abstract Clears the given cache of any cached responses since the provided date. + void removeCachedResponsesSinceDate_(objc.NSDate date) { + _objc_msgSend_1jdvcbf(this.ref.pointer, + _sel_removeCachedResponsesSinceDate_, date.ref.pointer); + } - final int value; - const NSURLRequestAttribution(this.value); + /// ! + /// @abstract In-memory capacity of the receiver. + /// @discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary. + /// @result The in-memory capacity, measured in bytes, for the receiver. + DartNSUInteger get memoryCapacity { + return _objc_msgSend_xw2lbc(this.ref.pointer, _sel_memoryCapacity); + } - static NSURLRequestAttribution fromValue(int value) => switch (value) { - 0 => NSURLRequestAttributionDeveloper, - 1 => NSURLRequestAttributionUser, - _ => throw ArgumentError( - "Unknown value for NSURLRequestAttribution: $value"), - }; + /// ! + /// @abstract In-memory capacity of the receiver. + /// @discussion At the time this call is made, the in-memory cache will truncate its contents to the size given, if necessary. + /// @result The in-memory capacity, measured in bytes, for the receiver. + set memoryCapacity(DartNSUInteger value) { + return _objc_msgSend_1i9r4xy( + this.ref.pointer, _sel_setMemoryCapacity_, value); + } + + /// ! + /// @abstract The on-disk capacity of the receiver. + /// @discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary. + DartNSUInteger get diskCapacity { + return _objc_msgSend_xw2lbc(this.ref.pointer, _sel_diskCapacity); + } + + /// ! + /// @abstract The on-disk capacity of the receiver. + /// @discussion The on-disk capacity, measured in bytes, for the receiver. On mutation the on-disk cache will truncate its contents to the size given, if necessary. + set diskCapacity(DartNSUInteger value) { + return _objc_msgSend_1i9r4xy( + this.ref.pointer, _sel_setDiskCapacity_, value); + } + + /// ! + /// @abstract Returns the current amount of space consumed by the + /// in-memory cache of the receiver. + /// @discussion This size, measured in bytes, indicates the current + /// usage of the in-memory cache. + /// @result the current usage of the in-memory cache of the receiver. + DartNSUInteger get currentMemoryUsage { + return _objc_msgSend_xw2lbc(this.ref.pointer, _sel_currentMemoryUsage); + } + + /// ! + /// @abstract Returns the current amount of space consumed by the + /// on-disk cache of the receiver. + /// @discussion This size, measured in bytes, indicates the current + /// usage of the on-disk cache. + /// @result the current usage of the on-disk cache of the receiver. + DartNSUInteger get currentDiskUsage { + return _objc_msgSend_xw2lbc(this.ref.pointer, _sel_currentDiskUsage); + } + + /// init + NSURLCache init() { + final _ret = + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); + } + + /// new + static NSURLCache new1() { + final _ret = _objc_msgSend_1x359cv(_class_NSURLCache, _sel_new); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); + } + + /// allocWithZone: + static NSURLCache allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_hzlb60(_class_NSURLCache, _sel_allocWithZone_, zone); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); + } + + /// alloc + static NSURLCache alloc() { + final _ret = _objc_msgSend_1x359cv(_class_NSURLCache, _sel_alloc); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); + } + + /// self + NSURLCache self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSURLCache retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSURLCache autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); + } } -late final _sel_attribution = objc.registerName("attribution"); -final _objc_msgSend_t5yka9 = objc.msgSendPointer +typedef NSNotificationName = ffi.Pointer; +typedef DartNSNotificationName = objc.NSString; +late final _class_NSNotification = objc.getClass("NSNotification"); +late final _sel_notificationWithName_object_ = + objc.registerName("notificationWithName:object:"); +final _objc_msgSend_rsfdlh = objc.msgSendPointer .cast< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_requiresDNSSECValidation = - objc.registerName("requiresDNSSECValidation"); -late final _sel_HTTPMethod = objc.registerName("HTTPMethod"); -late final _sel_allHTTPHeaderFields = objc.registerName("allHTTPHeaderFields"); -late final _sel_valueForHTTPHeaderField_ = - objc.registerName("valueForHTTPHeaderField:"); -late final _sel_HTTPBody = objc.registerName("HTTPBody"); -late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); -late final _sel_HTTPShouldHandleCookies = - objc.registerName("HTTPShouldHandleCookies"); -late final _sel_HTTPShouldUsePipelining = - objc.registerName("HTTPShouldUsePipelining"); -late final _sel_cachedResponseForRequest_ = - objc.registerName("cachedResponseForRequest:"); -late final _sel_storeCachedResponse_forRequest_ = - objc.registerName("storeCachedResponse:forRequest:"); -final _objc_msgSend_1tjlcwl = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_notificationWithName_object_userInfo_ = + objc.registerName("notificationWithName:object:userInfo:"); +final _objc_msgSend_582s3n = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -late final _sel_removeCachedResponseForRequest_ = - objc.registerName("removeCachedResponseForRequest:"); -late final _sel_removeAllCachedResponses = - objc.registerName("removeAllCachedResponses"); -final _objc_msgSend_ksby9f = objc.msgSendPointer + +/// NSNotificationCreation +extension NSNotificationCreation on objc.NSNotification { + /// notificationWithName:object: + static objc.NSNotification notificationWithName_object_( + DartNSNotificationName aName, objc.ObjCObjectBase? anObject) { + final _ret = _objc_msgSend_rsfdlh( + _class_NSNotification, + _sel_notificationWithName_object_, + aName.ref.pointer, + anObject?.ref.pointer ?? ffi.nullptr); + return objc.NSNotification.castFromPointer(_ret, + retain: true, release: true); + } + + /// notificationWithName:object:userInfo: + static objc.NSNotification notificationWithName_object_userInfo_( + DartNSNotificationName aName, + objc.ObjCObjectBase? anObject, + objc.NSDictionary? aUserInfo) { + final _ret = _objc_msgSend_582s3n( + _class_NSNotification, + _sel_notificationWithName_object_userInfo_, + aName.ref.pointer, + anObject?.ref.pointer ?? ffi.nullptr, + aUserInfo?.ref.pointer ?? ffi.nullptr); + return objc.NSNotification.castFromPointer(_ret, + retain: true, release: true); + } + + /// init + objc.NSNotification init() { + final _ret = + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + return objc.NSNotification.castFromPointer(_ret, + retain: false, release: true); + } +} + +late final _class_NSDate = objc.getClass("NSDate"); +late final _sel_timeIntervalSinceDate_ = + objc.registerName("timeIntervalSinceDate:"); +final _objc_msgSend_hlyk7w = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_removeCachedResponsesSinceDate_ = - objc.registerName("removeCachedResponsesSinceDate:"); -late final _sel_memoryCapacity = objc.registerName("memoryCapacity"); -final _objc_msgSend_eldhrq = objc.msgSendPointer + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_hlyk7wFpret = objc.msgSendFpretPointer .cast< ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setMemoryCapacity_ = objc.registerName("setMemoryCapacity:"); -final _objc_msgSend_1k4zaz5 = objc.msgSendPointer + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_timeIntervalSinceNow = + objc.registerName("timeIntervalSinceNow"); +late final _sel_timeIntervalSince1970 = + objc.registerName("timeIntervalSince1970"); +late final _sel_addTimeInterval_ = objc.registerName("addTimeInterval:"); +final _objc_msgSend_1x911p2 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_diskCapacity = objc.registerName("diskCapacity"); -late final _sel_setDiskCapacity_ = objc.registerName("setDiskCapacity:"); -late final _sel_currentMemoryUsage = objc.registerName("currentMemoryUsage"); -late final _sel_currentDiskUsage = objc.registerName("currentDiskUsage"); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_dateByAddingTimeInterval_ = + objc.registerName("dateByAddingTimeInterval:"); +late final _sel_earlierDate_ = objc.registerName("earlierDate:"); +late final _sel_laterDate_ = objc.registerName("laterDate:"); +late final _sel_compare_ = objc.registerName("compare:"); +final _objc_msgSend_1wpduvy = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isEqualToDate_ = objc.registerName("isEqualToDate:"); +late final _sel_description = objc.registerName("description"); +late final _sel_descriptionWithLocale_ = + objc.registerName("descriptionWithLocale:"); +late final _sel_timeIntervalSinceReferenceDate = + objc.registerName("timeIntervalSinceReferenceDate"); + +/// NSExtendedDate +extension NSExtendedDate on objc.NSDate { + /// timeIntervalSinceDate: + DartNSTimeInterval timeIntervalSinceDate_(objc.NSDate anotherDate) { + return objc.useMsgSendVariants + ? _objc_msgSend_hlyk7wFpret(this.ref.pointer, + _sel_timeIntervalSinceDate_, anotherDate.ref.pointer) + : _objc_msgSend_hlyk7w(this.ref.pointer, _sel_timeIntervalSinceDate_, + anotherDate.ref.pointer); + } -/// NSURLSessionDataTask -class NSURLSessionDataTask extends NSURLSessionTask { - NSURLSessionDataTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); + /// timeIntervalSinceNow + DartNSTimeInterval get timeIntervalSinceNow { + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret( + this.ref.pointer, _sel_timeIntervalSinceNow) + : _objc_msgSend_1ukqyt8(this.ref.pointer, _sel_timeIntervalSinceNow); + } - /// Constructs a [NSURLSessionDataTask] that points to the same underlying object as [other]. - NSURLSessionDataTask.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); + /// timeIntervalSince1970 + DartNSTimeInterval get timeIntervalSince1970 { + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret( + this.ref.pointer, _sel_timeIntervalSince1970) + : _objc_msgSend_1ukqyt8(this.ref.pointer, _sel_timeIntervalSince1970); + } - /// Constructs a [NSURLSessionDataTask] that wraps the given raw object pointer. - NSURLSessionDataTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); + /// addTimeInterval: + objc.ObjCObjectBase addTimeInterval_(DartNSTimeInterval seconds) { + final _ret = + _objc_msgSend_1x911p2(this.ref.pointer, _sel_addTimeInterval_, seconds); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } - /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); + /// dateByAddingTimeInterval: + objc.NSDate dateByAddingTimeInterval_(DartNSTimeInterval ti) { + final _ret = _objc_msgSend_1x911p2( + this.ref.pointer, _sel_dateByAddingTimeInterval_, ti); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// init - NSURLSessionDataTask init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionDataTask.castFromPointer(_ret, - retain: false, release: true); + /// earlierDate: + objc.NSDate earlierDate_(objc.NSDate anotherDate) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_earlierDate_, anotherDate.ref.pointer); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// new - static NSURLSessionDataTask new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDataTask, _sel_new); - return NSURLSessionDataTask.castFromPointer(_ret, - retain: false, release: true); + /// laterDate: + objc.NSDate laterDate_(objc.NSDate anotherDate) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_laterDate_, anotherDate.ref.pointer); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// allocWithZone: - static NSURLSessionDataTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( - _class_NSURLSessionDataTask, _sel_allocWithZone_, zone); - return NSURLSessionDataTask.castFromPointer(_ret, - retain: false, release: true); + /// compare: + objc.NSComparisonResult compare_(objc.NSDate other) { + final _ret = _objc_msgSend_1wpduvy( + this.ref.pointer, _sel_compare_, other.ref.pointer); + return objc.NSComparisonResult.fromValue(_ret); } - /// alloc - static NSURLSessionDataTask alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionDataTask, _sel_alloc); - return NSURLSessionDataTask.castFromPointer(_ret, - retain: false, release: true); + /// isEqualToDate: + bool isEqualToDate_(objc.NSDate otherDate) { + return _objc_msgSend_69e0x1( + this.ref.pointer, _sel_isEqualToDate_, otherDate.ref.pointer); } -} -late final _class_NSURLSessionDataTask = objc.getClass("NSURLSessionDataTask"); + /// description + objc.NSString get description { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -/// NSURLSessionTask - a cancelable object that refers to the lifetime -/// of processing a given request. -class NSURLSessionTask extends objc.NSObject { - NSURLSessionTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); + /// descriptionWithLocale: + objc.NSString descriptionWithLocale_(objc.ObjCObjectBase? locale) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_descriptionWithLocale_, locale?.ref.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// Constructs a [NSURLSessionTask] that points to the same underlying object as [other]. - NSURLSessionTask.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); + /// timeIntervalSinceReferenceDate + static DartNSTimeInterval getTimeIntervalSinceReferenceDate() { + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret( + _class_NSDate, _sel_timeIntervalSinceReferenceDate) + : _objc_msgSend_1ukqyt8( + _class_NSDate, _sel_timeIntervalSinceReferenceDate); + } +} + +late final _sel_date = objc.registerName("date"); +late final _sel_dateWithTimeIntervalSinceNow_ = + objc.registerName("dateWithTimeIntervalSinceNow:"); +late final _sel_dateWithTimeIntervalSinceReferenceDate_ = + objc.registerName("dateWithTimeIntervalSinceReferenceDate:"); +late final _sel_dateWithTimeIntervalSince1970_ = + objc.registerName("dateWithTimeIntervalSince1970:"); +late final _sel_dateWithTimeInterval_sinceDate_ = + objc.registerName("dateWithTimeInterval:sinceDate:"); +final _objc_msgSend_xh7c7e = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Double, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + double, + ffi.Pointer)>(); +late final _sel_distantFuture = objc.registerName("distantFuture"); +late final _sel_distantPast = objc.registerName("distantPast"); +late final _sel_now = objc.registerName("now"); +late final _sel_initWithTimeIntervalSinceNow_ = + objc.registerName("initWithTimeIntervalSinceNow:"); +late final _sel_initWithTimeIntervalSince1970_ = + objc.registerName("initWithTimeIntervalSince1970:"); +late final _sel_initWithTimeInterval_sinceDate_ = + objc.registerName("initWithTimeInterval:sinceDate:"); - /// Constructs a [NSURLSessionTask] that wraps the given raw object pointer. - NSURLSessionTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); +/// NSDateCreation +extension NSDateCreation on objc.NSDate { + /// date + static objc.NSDate date() { + final _ret = _objc_msgSend_1x359cv(_class_NSDate, _sel_date); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); + } - /// Returns whether [obj] is an instance of [NSURLSessionTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionTask); + /// dateWithTimeIntervalSinceNow: + static objc.NSDate dateWithTimeIntervalSinceNow_(DartNSTimeInterval secs) { + final _ret = _objc_msgSend_1x911p2( + _class_NSDate, _sel_dateWithTimeIntervalSinceNow_, secs); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// an identifier for this task, assigned by and unique to the owning session - DartNSUInteger get taskIdentifier { - return _objc_msgSend_eldhrq(this.ref.pointer, _sel_taskIdentifier); + /// dateWithTimeIntervalSinceReferenceDate: + static objc.NSDate dateWithTimeIntervalSinceReferenceDate_( + DartNSTimeInterval ti) { + final _ret = _objc_msgSend_1x911p2( + _class_NSDate, _sel_dateWithTimeIntervalSinceReferenceDate_, ti); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// may be nil if this is a stream task - NSURLRequest? get originalRequest { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_originalRequest); - return _ret.address == 0 - ? null - : NSURLRequest.castFromPointer(_ret, retain: true, release: true); + /// dateWithTimeIntervalSince1970: + static objc.NSDate dateWithTimeIntervalSince1970_(DartNSTimeInterval secs) { + final _ret = _objc_msgSend_1x911p2( + _class_NSDate, _sel_dateWithTimeIntervalSince1970_, secs); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// may differ from originalRequest due to http server redirection - NSURLRequest? get currentRequest { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_currentRequest); - return _ret.address == 0 - ? null - : NSURLRequest.castFromPointer(_ret, retain: true, release: true); + /// dateWithTimeInterval:sinceDate: + static objc.NSDate dateWithTimeInterval_sinceDate_( + DartNSTimeInterval secsToBeAdded, objc.NSDate date) { + final _ret = _objc_msgSend_xh7c7e(_class_NSDate, + _sel_dateWithTimeInterval_sinceDate_, secsToBeAdded, date.ref.pointer); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// may be nil if no response has been received - NSURLResponse? get response { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_response); - return _ret.address == 0 - ? null - : NSURLResponse.castFromPointer(_ret, retain: true, release: true); + /// distantFuture + static objc.NSDate getDistantFuture() { + final _ret = _objc_msgSend_1x359cv(_class_NSDate, _sel_distantFuture); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// Sets a task-specific delegate. Methods not implemented on this delegate will - /// still be forwarded to the session delegate. - /// - /// Cannot be modified after task resumes. Not supported on background session. - /// - /// Delegate is strongly referenced until the task completes, after which it is - /// reset to `nil`. - objc.ObjCObjectBase? get delegate { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// Sets a task-specific delegate. Methods not implemented on this delegate will - /// still be forwarded to the session delegate. - /// - /// Cannot be modified after task resumes. Not supported on background session. - /// - /// Delegate is strongly referenced until the task completes, after which it is - /// reset to `nil`. - set delegate(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); - } - - /// NSProgress object which represents the task progress. - /// It can be used for task progress tracking. - NSProgress get progress { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_progress); - return NSProgress.castFromPointer(_ret, retain: true, release: true); - } - - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - objc.NSDate? get earliestBeginDate { - final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_earliestBeginDate); - return _ret.address == 0 - ? null - : objc.NSDate.castFromPointer(_ret, retain: true, release: true); - } - - /// Start the network load for this task no earlier than the specified date. If - /// not specified, no start delay is used. - /// - /// Only applies to tasks created from background NSURLSession instances; has no - /// effect for tasks created from other session types. - set earliestBeginDate(objc.NSDate? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setEarliestBeginDate_, - value?.ref.pointer ?? ffi.nullptr); - } - - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - int get countOfBytesClientExpectsToSend { - return _objc_msgSend_1voti03( - this.ref.pointer, _sel_countOfBytesClientExpectsToSend); + /// distantPast + static objc.NSDate getDistantPast() { + final _ret = _objc_msgSend_1x359cv(_class_NSDate, _sel_distantPast); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// The number of bytes that the client expects (a best-guess upper-bound) will - /// be sent and received by this task. These values are used by system scheduling - /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. - set countOfBytesClientExpectsToSend(int value) { - return _objc_msgSend_rrr3q( - this.ref.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); + /// now + static objc.NSDate getNow() { + final _ret = _objc_msgSend_1x359cv(_class_NSDate, _sel_now); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// countOfBytesClientExpectsToReceive - int get countOfBytesClientExpectsToReceive { - return _objc_msgSend_1voti03( - this.ref.pointer, _sel_countOfBytesClientExpectsToReceive); + /// initWithTimeIntervalSinceNow: + objc.NSDate initWithTimeIntervalSinceNow_(DartNSTimeInterval secs) { + final _ret = _objc_msgSend_1x911p2(this.ref.retainAndReturnPointer(), + _sel_initWithTimeIntervalSinceNow_, secs); + return objc.NSDate.castFromPointer(_ret, retain: false, release: true); } - /// setCountOfBytesClientExpectsToReceive: - set countOfBytesClientExpectsToReceive(int value) { - return _objc_msgSend_rrr3q( - this.ref.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); + /// initWithTimeIntervalSince1970: + objc.NSDate initWithTimeIntervalSince1970_(DartNSTimeInterval secs) { + final _ret = _objc_msgSend_1x911p2(this.ref.retainAndReturnPointer(), + _sel_initWithTimeIntervalSince1970_, secs); + return objc.NSDate.castFromPointer(_ret, retain: false, release: true); } - /// number of body bytes already sent - int get countOfBytesSent { - return _objc_msgSend_1voti03(this.ref.pointer, _sel_countOfBytesSent); + /// initWithTimeInterval:sinceDate: + objc.NSDate initWithTimeInterval_sinceDate_( + DartNSTimeInterval secsToBeAdded, objc.NSDate date) { + final _ret = _objc_msgSend_xh7c7e(this.ref.retainAndReturnPointer(), + _sel_initWithTimeInterval_sinceDate_, secsToBeAdded, date.ref.pointer); + return objc.NSDate.castFromPointer(_ret, retain: false, release: true); } +} - /// number of body bytes already received - int get countOfBytesReceived { - return _objc_msgSend_1voti03(this.ref.pointer, _sel_countOfBytesReceived); - } +late final _class_NSMutableURLRequest = objc.getClass("NSMutableURLRequest"); +late final _sel_setHTTPMethod_ = objc.registerName("setHTTPMethod:"); +late final _sel_setAllHTTPHeaderFields_ = + objc.registerName("setAllHTTPHeaderFields:"); +late final _sel_setValue_forHTTPHeaderField_ = + objc.registerName("setValue:forHTTPHeaderField:"); +late final _sel_addValue_forHTTPHeaderField_ = + objc.registerName("addValue:forHTTPHeaderField:"); +late final _sel_setHTTPBody_ = objc.registerName("setHTTPBody:"); +late final _sel_setHTTPBodyStream_ = objc.registerName("setHTTPBodyStream:"); +late final _sel_setHTTPShouldHandleCookies_ = + objc.registerName("setHTTPShouldHandleCookies:"); +final _objc_msgSend_1s56lr9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, bool)>(); +late final _sel_setHTTPShouldUsePipelining_ = + objc.registerName("setHTTPShouldUsePipelining:"); - /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request - int get countOfBytesExpectedToSend { - return _objc_msgSend_1voti03( - this.ref.pointer, _sel_countOfBytesExpectedToSend); +/// ! +/// @category NSMutableURLRequest(NSMutableHTTPURLRequest) +/// The NSMutableHTTPURLRequest on NSMutableURLRequest provides methods +/// for configuring information specific to HTTP protocol requests. +extension NSMutableHTTPURLRequest on NSMutableURLRequest { + /// ! + /// @abstract Sets the HTTP request method of the receiver. + objc.NSString get HTTPMethod { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_HTTPMethod); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. - int get countOfBytesExpectedToReceive { - return _objc_msgSend_1voti03( - this.ref.pointer, _sel_countOfBytesExpectedToReceive); + /// ! + /// @abstract Sets the HTTP request method of the receiver. + set HTTPMethod(objc.NSString value) { + return _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_setHTTPMethod_, value.ref.pointer); } - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - objc.NSString? get taskDescription { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_taskDescription); + /// ! + /// @abstract Sets the HTTP header fields of the receiver to the given + /// dictionary. + /// @discussion This method replaces all header fields that may have + /// existed before this method call. + ///

Since HTTP header fields must be string values, each object and + /// key in the dictionary passed to this method must answer YES when + /// sent an -isKindOfClass:[NSString class] message. If either + /// the key or value for a key-value pair answers NO when sent this + /// message, the key-value pair is skipped. + objc.NSDictionary? get allHTTPHeaderFields { + final _ret = + _objc_msgSend_1x359cv(this.ref.pointer, _sel_allHTTPHeaderFields); return _ret.address == 0 ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// The taskDescription property is available for the developer to - /// provide a descriptive label for the task. - set taskDescription(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setTaskDescription_, + /// ! + /// @abstract Sets the HTTP header fields of the receiver to the given + /// dictionary. + /// @discussion This method replaces all header fields that may have + /// existed before this method call. + ///

Since HTTP header fields must be string values, each object and + /// key in the dictionary passed to this method must answer YES when + /// sent an -isKindOfClass:[NSString class] message. If either + /// the key or value for a key-value pair answers NO when sent this + /// message, the key-value pair is skipped. + set allHTTPHeaderFields(objc.NSDictionary? value) { + return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setAllHTTPHeaderFields_, value?.ref.pointer ?? ffi.nullptr); } - /// -cancel returns immediately, but marks a task as being canceled. - /// The task will signal -URLSession:task:didCompleteWithError: with an - /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some - /// cases, the task may signal other work before it acknowledges the - /// cancelation. -cancel may be sent to a task that has been suspended. - void cancel() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); + /// ! + /// @method setValue:forHTTPHeaderField: + /// @abstract Sets the value of the given HTTP header field. + /// @discussion If a value was previously set for the given header + /// field, that value is replaced with the given value. Note that, in + /// keeping with the HTTP RFC, HTTP header field names are + /// case-insensitive. + /// @param value the header field value. + /// @param field the header field name (case-insensitive). + void setValue_forHTTPHeaderField_(objc.NSString? value, objc.NSString field) { + _objc_msgSend_wjvic9(this.ref.pointer, _sel_setValue_forHTTPHeaderField_, + value?.ref.pointer ?? ffi.nullptr, field.ref.pointer); } - /// The current state of the task within the session. - NSURLSessionTaskState get state { - final _ret = _objc_msgSend_8b7yc1(this.ref.pointer, _sel_state); - return NSURLSessionTaskState.fromValue(_ret); + /// ! + /// @method addValue:forHTTPHeaderField: + /// @abstract Adds an HTTP header field in the current header + /// dictionary. + /// @discussion This method provides a way to add values to header + /// fields incrementally. If a value was previously set for the given + /// header field, the given value is appended to the previously-existing + /// value. The appropriate field delimiter, a comma in the case of HTTP, + /// is added by the implementation, and should not be added to the given + /// value by the caller. Note that, in keeping with the HTTP RFC, HTTP + /// header field names are case-insensitive. + /// @param value the header field value. + /// @param field the header field name (case-insensitive). + void addValue_forHTTPHeaderField_(objc.NSString value, objc.NSString field) { + _objc_msgSend_wjvic9(this.ref.pointer, _sel_addValue_forHTTPHeaderField_, + value.ref.pointer, field.ref.pointer); } - /// The error, if any, delivered via -URLSession:task:didCompleteWithError: - /// This property will be nil in the event that no error occurred. - objc.NSError? get error { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_error); + /// ! + /// @abstract Sets the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_HTTPBody); return _ret.address == 0 ? null - : objc.NSError.castFromPointer(_ret, retain: true, release: true); - } - - /// Suspending a task will prevent the NSURLSession from continuing to - /// load data. There may still be delegate calls made on behalf of - /// this task (for instance, to report data received while suspending) - /// but no further transmissions will be made on behalf of the task - /// until -resume is sent. The timeout timer associated with the task - /// will be disabled while a task is suspended. -suspend and -resume are - /// nestable. - void suspend() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_suspend); - } - - /// resume - void resume() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); - } - - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. - /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. - /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - double get priority { - return objc.useMsgSendVariants - ? _objc_msgSend_fcilgxFpret(this.ref.pointer, _sel_priority) - : _objc_msgSend_fcilgx(this.ref.pointer, _sel_priority); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// Sets a scaling factor for the priority of the task. The scaling factor is a - /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest - /// priority and 1.0 is considered the highest. - /// - /// The priority is a hint and not a hard requirement of task performance. The - /// priority of a task may be changed using this API at any time, but not all - /// protocols support this; in these cases, the last priority that took effect - /// will be used. - /// - /// If no priority is specified, the task will operate with the default priority - /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional - /// priority levels are provided: NSURLSessionTaskPriorityLow and - /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. - set priority(double value) { - return _objc_msgSend_s9gjzc(this.ref.pointer, _sel_setPriority_, value); + /// ! + /// @abstract Sets the request body data of the receiver. + /// @discussion This data is sent as the message body of the request, as + /// in done in an HTTP POST request. + set HTTPBody(objc.NSData? value) { + return _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_setHTTPBody_, value?.ref.pointer ?? ffi.nullptr); } - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. - /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - bool get prefersIncrementalDelivery { - return _objc_msgSend_olxnu1( - this.ref.pointer, _sel_prefersIncrementalDelivery); + /// ! + /// @abstract Sets the request body to be the contents of the given stream. + /// @discussion The provided stream should be unopened; the request will take + /// over the stream's delegate. The entire stream's contents will be + /// transmitted as the HTTP body of the request. Note that the body stream + /// and the body data (set by setHTTPBody:, above) are mutually exclusive + /// - setting one will clear the other. + objc.NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_HTTPBodyStream); + return _ret.address == 0 + ? null + : objc.NSInputStream.castFromPointer(_ret, retain: true, release: true); } - /// Provides a hint indicating if incremental delivery of a partial response body - /// would be useful for the application, or if it cannot process the response - /// until it is complete. Indicating that incremental delivery is not desired may - /// improve task performance. For example, if a response cannot be decoded until - /// the entire content is received, set this property to false. - /// - /// Defaults to true unless this task is created with completion-handler based - /// convenience methods, or if it is a download task. - set prefersIncrementalDelivery(bool value) { - return _objc_msgSend_117qins( - this.ref.pointer, _sel_setPrefersIncrementalDelivery_, value); + /// ! + /// @abstract Sets the request body to be the contents of the given stream. + /// @discussion The provided stream should be unopened; the request will take + /// over the stream's delegate. The entire stream's contents will be + /// transmitted as the HTTP body of the request. Note that the body stream + /// and the body data (set by setHTTPBody:, above) are mutually exclusive + /// - setting one will clear the other. + set HTTPBodyStream(objc.NSInputStream? value) { + return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setHTTPBodyStream_, + value?.ref.pointer ?? ffi.nullptr); } - /// init - NSURLSessionTask init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); + /// ! + /// @abstract Decide whether default cookie handling will happen for + /// this request (YES if cookies should be sent with and set for this request; + /// otherwise NO). + /// @discussion The default is YES - in other words, cookies are sent from and + /// stored to the cookie manager by default. + /// NOTE: In releases prior to 10.3, this value is ignored + bool get HTTPShouldHandleCookies { + return _objc_msgSend_91o635(this.ref.pointer, _sel_HTTPShouldHandleCookies); } - /// new - static NSURLSessionTask new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionTask, _sel_new); - return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); + /// ! + /// @abstract Decide whether default cookie handling will happen for + /// this request (YES if cookies should be sent with and set for this request; + /// otherwise NO). + /// @discussion The default is YES - in other words, cookies are sent from and + /// stored to the cookie manager by default. + /// NOTE: In releases prior to 10.3, this value is ignored + set HTTPShouldHandleCookies(bool value) { + return _objc_msgSend_1s56lr9( + this.ref.pointer, _sel_setHTTPShouldHandleCookies_, value); } - /// allocWithZone: - static NSURLSessionTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( - _class_NSURLSessionTask, _sel_allocWithZone_, zone); - return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); + /// ! + /// @abstract Sets whether the request should not wait for the previous response + /// before transmitting (YES if the receiver should transmit before the previous response is + /// received. NO to wait for the previous response before transmitting) + /// @discussion Calling this method with a YES value does not guarantee HTTP + /// pipelining behavior. This method may have no effect if an HTTP proxy is + /// configured, or if the HTTP request uses an unsafe request method (e.g., POST + /// requests will not pipeline). Pipelining behavior also may not begin until + /// the second request on a given TCP connection. There may be other situations + /// where pipelining does not occur even though YES was set. + /// HTTP 1.1 allows the client to send multiple requests to the server without + /// waiting for a response. Though HTTP 1.1 requires support for pipelining, + /// some servers report themselves as being HTTP 1.1 but do not support + /// pipelining (disconnecting, sending resources misordered, omitting part of + /// a resource, etc.). + bool get HTTPShouldUsePipelining { + return _objc_msgSend_91o635(this.ref.pointer, _sel_HTTPShouldUsePipelining); } - /// alloc - static NSURLSessionTask alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionTask, _sel_alloc); - return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); + /// ! + /// @abstract Sets whether the request should not wait for the previous response + /// before transmitting (YES if the receiver should transmit before the previous response is + /// received. NO to wait for the previous response before transmitting) + /// @discussion Calling this method with a YES value does not guarantee HTTP + /// pipelining behavior. This method may have no effect if an HTTP proxy is + /// configured, or if the HTTP request uses an unsafe request method (e.g., POST + /// requests will not pipeline). Pipelining behavior also may not begin until + /// the second request on a given TCP connection. There may be other situations + /// where pipelining does not occur even though YES was set. + /// HTTP 1.1 allows the client to send multiple requests to the server without + /// waiting for a response. Though HTTP 1.1 requires support for pipelining, + /// some servers report themselves as being HTTP 1.1 but do not support + /// pipelining (disconnecting, sending resources misordered, omitting part of + /// a resource, etc.). + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_1s56lr9( + this.ref.pointer, _sel_setHTTPShouldUsePipelining_, value); } } -late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); -late final _sel_taskIdentifier = objc.registerName("taskIdentifier"); -late final _sel_originalRequest = objc.registerName("originalRequest"); -late final _sel_currentRequest = objc.registerName("currentRequest"); -late final _sel_delegate = objc.registerName("delegate"); -late final _sel_setDelegate_ = objc.registerName("setDelegate:"); +late final _sel_setURL_ = objc.registerName("setURL:"); +late final _sel_setCachePolicy_ = objc.registerName("setCachePolicy:"); +final _objc_msgSend_1yjxuv2 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setTimeoutInterval_ = objc.registerName("setTimeoutInterval:"); +final _objc_msgSend_hwm8nu = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_setMainDocumentURL_ = objc.registerName("setMainDocumentURL:"); +late final _sel_setNetworkServiceType_ = + objc.registerName("setNetworkServiceType:"); +final _objc_msgSend_1mse4s1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setAllowsCellularAccess_ = + objc.registerName("setAllowsCellularAccess:"); +late final _sel_setAllowsExpensiveNetworkAccess_ = + objc.registerName("setAllowsExpensiveNetworkAccess:"); +late final _sel_setAllowsConstrainedNetworkAccess_ = + objc.registerName("setAllowsConstrainedNetworkAccess:"); +late final _sel_setAssumesHTTP3Capable_ = + objc.registerName("setAssumesHTTP3Capable:"); +late final _sel_setAttribution_ = objc.registerName("setAttribution:"); +final _objc_msgSend_1nw1jep = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setRequiresDNSSECValidation_ = + objc.registerName("setRequiresDNSSECValidation:"); -/// NSProgress -class NSProgress extends objc.NSObject { - NSProgress._(ffi.Pointer pointer, +/// ! +/// @class NSMutableURLRequest +/// +/// @abstract An NSMutableURLRequest object represents a mutable URL load +/// request in a manner independent of protocol and URL scheme. +/// +/// @discussion This specialization of NSURLRequest is provided to aid +/// developers who may find it more convenient to mutate a single request +/// object for a series of URL loads instead of creating an immutable +/// NSURLRequest for each load. This programming model is supported by +/// the following contract stipulation between NSMutableURLRequest and +/// NSURLConnection: NSURLConnection makes a deep copy of each +/// NSMutableURLRequest object passed to one of its initializers. +///

NSMutableURLRequest is designed to be extended to support +/// protocol-specific data by adding categories to access a property +/// object provided in an interface targeted at protocol implementors. +///

    +///
  • Protocol implementors should direct their attention to the +/// NSMutableURLRequestExtensibility category on +/// NSMutableURLRequest for more information on how to provide +/// extensions on NSMutableURLRequest to support protocol-specific +/// request information. +///
  • Clients of this API who wish to create NSMutableURLRequest +/// objects to load URL content should consult the protocol-specific +/// NSMutableURLRequest categories that are available. The +/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an +/// example. +///
+class NSMutableURLRequest extends NSURLRequest { + NSMutableURLRequest._(ffi.Pointer pointer, {bool retain = false, bool release = false}) : super.castFromPointer(pointer, retain: retain, release: release); - /// Constructs a [NSProgress] that points to the same underlying object as [other]. - NSProgress.castFrom(objc.ObjCObjectBase other) + /// Constructs a [NSMutableURLRequest] that points to the same underlying object as [other]. + NSMutableURLRequest.castFrom(objc.ObjCObjectBase other) : this._(other.ref.pointer, retain: true, release: true); - /// Constructs a [NSProgress] that wraps the given raw object pointer. - NSProgress.castFromPointer(ffi.Pointer other, + /// Constructs a [NSMutableURLRequest] that wraps the given raw object pointer. + NSMutableURLRequest.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSProgress]. + /// Returns whether [obj] is an instance of [NSMutableURLRequest]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSProgress); + return _objc_msgSend_69e0x1( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); } - /// currentProgress - static NSProgress? currentProgress() { - final _ret = _objc_msgSend_1unuoxw(_class_NSProgress, _sel_currentProgress); + /// ! + /// @abstract The URL of the receiver. + objc.NSURL? get URL { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_URL); return _ret.address == 0 ? null - : NSProgress.castFromPointer(_ret, retain: true, release: true); - } - - /// progressWithTotalUnitCount: - static NSProgress progressWithTotalUnitCount_(int unitCount) { - final _ret = _objc_msgSend_n9eq1n( - _class_NSProgress, _sel_progressWithTotalUnitCount_, unitCount); - return NSProgress.castFromPointer(_ret, retain: true, release: true); - } - - /// discreteProgressWithTotalUnitCount: - static NSProgress discreteProgressWithTotalUnitCount_(int unitCount) { - final _ret = _objc_msgSend_n9eq1n( - _class_NSProgress, _sel_discreteProgressWithTotalUnitCount_, unitCount); - return NSProgress.castFromPointer(_ret, retain: true, release: true); - } - - /// progressWithTotalUnitCount:parent:pendingUnitCount: - static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( - int unitCount, NSProgress parent, int portionOfParentTotalUnitCount) { - final _ret = _objc_msgSend_105mybv( - _class_NSProgress, - _sel_progressWithTotalUnitCount_parent_pendingUnitCount_, - unitCount, - parent.ref.pointer, - portionOfParentTotalUnitCount); - return NSProgress.castFromPointer(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// initWithParent:userInfo: - NSProgress initWithParent_userInfo_( - NSProgress? parentProgressOrNil, objc.NSDictionary? userInfoOrNil) { - final _ret = _objc_msgSend_iq11qg( - this.ref.retainAndReturnPointer(), - _sel_initWithParent_userInfo_, - parentProgressOrNil?.ref.pointer ?? ffi.nullptr, - userInfoOrNil?.ref.pointer ?? ffi.nullptr); - return NSProgress.castFromPointer(_ret, retain: false, release: true); + /// ! + /// @abstract The URL of the receiver. + set URL(objc.NSURL? value) { + return _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_setURL_, value?.ref.pointer ?? ffi.nullptr); } - /// becomeCurrentWithPendingUnitCount: - void becomeCurrentWithPendingUnitCount_(int unitCount) { - _objc_msgSend_rrr3q( - this.ref.pointer, _sel_becomeCurrentWithPendingUnitCount_, unitCount); + /// ! + /// @abstract The cache policy of the receiver. + NSURLRequestCachePolicy get cachePolicy { + final _ret = _objc_msgSend_8jm3uo(this.ref.pointer, _sel_cachePolicy); + return NSURLRequestCachePolicy.fromValue(_ret); } - /// performAsCurrentWithPendingUnitCount:usingBlock: - void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, objc.ObjCBlock work) { - _objc_msgSend_19q84do( - this.ref.pointer, - _sel_performAsCurrentWithPendingUnitCount_usingBlock_, - unitCount, - work.ref.pointer); + /// ! + /// @abstract The cache policy of the receiver. + set cachePolicy(NSURLRequestCachePolicy value) { + return _objc_msgSend_1yjxuv2( + this.ref.pointer, _sel_setCachePolicy_, value.value); } - /// resignCurrent - void resignCurrent() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_resignCurrent); + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + DartNSTimeInterval get timeoutInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(this.ref.pointer, _sel_timeoutInterval) + : _objc_msgSend_1ukqyt8(this.ref.pointer, _sel_timeoutInterval); } - /// addChild:withPendingUnitCount: - void addChild_withPendingUnitCount_(NSProgress child, int inUnitCount) { - _objc_msgSend_2citz1(this.ref.pointer, _sel_addChild_withPendingUnitCount_, - child.ref.pointer, inUnitCount); + /// ! + /// @abstract Sets the timeout interval of the receiver. + /// @discussion The timeout interval specifies the limit on the idle + /// interval allotted to a request in the process of loading. The "idle + /// interval" is defined as the period of time that has passed since the + /// last instance of load activity occurred for a request that is in the + /// process of loading. Hence, when an instance of load activity occurs + /// (e.g. bytes are received from the network for a request), the idle + /// interval for a request is reset to 0. If the idle interval ever + /// becomes greater than or equal to the timeout interval, the request + /// is considered to have timed out. This timeout interval is measured + /// in seconds. + set timeoutInterval(DartNSTimeInterval value) { + return _objc_msgSend_hwm8nu( + this.ref.pointer, _sel_setTimeoutInterval_, value); } - /// totalUnitCount - int get totalUnitCount { - return _objc_msgSend_1voti03(this.ref.pointer, _sel_totalUnitCount); + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document is used to implement the cookie "only + /// from same domain as main document" policy, attributing this request + /// as a sub-resource of a user-specified URL, and possibly other things + /// in the future. + objc.NSURL? get mainDocumentURL { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_mainDocumentURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// setTotalUnitCount: - set totalUnitCount(int value) { - return _objc_msgSend_rrr3q( - this.ref.pointer, _sel_setTotalUnitCount_, value); + /// ! + /// @abstract Sets the main document URL + /// @discussion The caller should pass the URL for an appropriate main + /// document, if known. For example, when loading a web page, the URL + /// of the main html document for the top-level frame should be + /// passed. This main document is used to implement the cookie "only + /// from same domain as main document" policy, attributing this request + /// as a sub-resource of a user-specified URL, and possibly other things + /// in the future. + set mainDocumentURL(objc.NSURL? value) { + return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setMainDocumentURL_, + value?.ref.pointer ?? ffi.nullptr); } - /// completedUnitCount - int get completedUnitCount { - return _objc_msgSend_1voti03(this.ref.pointer, _sel_completedUnitCount); + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + NSURLRequestNetworkServiceType get networkServiceType { + final _ret = + _objc_msgSend_t4uaw1(this.ref.pointer, _sel_networkServiceType); + return NSURLRequestNetworkServiceType.fromValue(_ret); } - /// setCompletedUnitCount: - set completedUnitCount(int value) { - return _objc_msgSend_rrr3q( - this.ref.pointer, _sel_setCompletedUnitCount_, value); + /// ! + /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request + /// @discussion This method is used to provide the network layers with a hint as to the purpose + /// of the request. Most clients should not need to use this method. + set networkServiceType(NSURLRequestNetworkServiceType value) { + return _objc_msgSend_1mse4s1( + this.ref.pointer, _sel_setNetworkServiceType_, value.value); } - /// localizedDescription - objc.NSString get localizedDescription { - final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_localizedDescription); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + bool get allowsCellularAccess { + return _objc_msgSend_91o635(this.ref.pointer, _sel_allowsCellularAccess); } - /// setLocalizedDescription: - set localizedDescription(objc.NSString value) { - return _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_setLocalizedDescription_, value.ref.pointer); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// the built in cellular radios (if present). + /// @discussion NO if the receiver should not be allowed to use the built in + /// cellular radios to satisfy the request, YES otherwise. The default is YES. + set allowsCellularAccess(bool value) { + return _objc_msgSend_1s56lr9( + this.ref.pointer, _sel_setAllowsCellularAccess_, value); } - /// localizedAdditionalDescription - objc.NSString get localizedAdditionalDescription { - final _ret = _objc_msgSend_1unuoxw( - this.ref.pointer, _sel_localizedAdditionalDescription); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satisfy the request, YES otherwise. + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_91o635( + this.ref.pointer, _sel_allowsExpensiveNetworkAccess); } - /// setLocalizedAdditionalDescription: - set localizedAdditionalDescription(objc.NSString value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, - _sel_setLocalizedAdditionalDescription_, value.ref.pointer); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as expensive. + /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to + /// satisfy the request, YES otherwise. + set allowsExpensiveNetworkAccess(bool value) { + return _objc_msgSend_1s56lr9( + this.ref.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } - /// isCancellable - bool get cancellable { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isCancellable); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satisfy the request, YES otherwise. + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_91o635( + this.ref.pointer, _sel_allowsConstrainedNetworkAccess); } - /// setCancellable: - set cancellable(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setCancellable_, value); + /// ! + /// @abstract sets whether a connection created with this request is allowed to use + /// network interfaces which have been marked as constrained. + /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to + /// satisfy the request, YES otherwise. + set allowsConstrainedNetworkAccess(bool value) { + return _objc_msgSend_1s56lr9( + this.ref.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } - /// isPausable - bool get pausable { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isPausable); + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + bool get assumesHTTP3Capable { + return _objc_msgSend_91o635(this.ref.pointer, _sel_assumesHTTP3Capable); } - /// setPausable: - set pausable(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setPausable_, value); + /// ! + /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC + /// racing without HTTP/3 service discovery. + /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. + /// The default may be YES in a future OS update. + set assumesHTTP3Capable(bool value) { + return _objc_msgSend_1s56lr9( + this.ref.pointer, _sel_setAssumesHTTP3Capable_, value); } - /// isCancelled - bool get cancelled { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isCancelled); + /// ! + /// @abstract Sets the NSURLRequestAttribution to associate with this request. + /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the + /// user. Defaults to NSURLRequestAttributionDeveloper. + NSURLRequestAttribution get attribution { + final _ret = _objc_msgSend_i3avs9(this.ref.pointer, _sel_attribution); + return NSURLRequestAttribution.fromValue(_ret); } - /// isPaused - bool get paused { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isPaused); + /// ! + /// @abstract Sets the NSURLRequestAttribution to associate with this request. + /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the + /// user. Defaults to NSURLRequestAttributionDeveloper. + set attribution(NSURLRequestAttribution value) { + return _objc_msgSend_1nw1jep( + this.ref.pointer, _sel_setAttribution_, value.value); } - /// cancellationHandler - objc.ObjCBlock? get cancellationHandler { - final _ret = - _objc_msgSend_2osec1(this.ref.pointer, _sel_cancellationHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); + /// ! + /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. + /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, + /// No otherwise. Defaults to NO. + bool get requiresDNSSECValidation { + return _objc_msgSend_91o635( + this.ref.pointer, _sel_requiresDNSSECValidation); } - /// setCancellationHandler: - set cancellationHandler(objc.ObjCBlock? value) { - return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setCancellationHandler_, - value?.ref.pointer ?? ffi.nullptr); + /// ! + /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. + /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, + /// No otherwise. Defaults to NO. + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_1s56lr9( + this.ref.pointer, _sel_setRequiresDNSSECValidation_, value); } - /// pausingHandler - objc.ObjCBlock? get pausingHandler { - final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_pausingHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); - } - - /// setPausingHandler: - set pausingHandler(objc.ObjCBlock? value) { - return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setPausingHandler_, - value?.ref.pointer ?? ffi.nullptr); - } - - /// resumingHandler - objc.ObjCBlock? get resumingHandler { - final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_resumingHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); + /// ! + /// @method requestWithURL: + /// @abstract Allocates and initializes an NSURLRequest with the given + /// URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_62nh5j( + _class_NSMutableURLRequest, _sel_requestWithURL_, URL.ref.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - /// setResumingHandler: - set resumingHandler(objc.ObjCBlock? value) { - return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setResumingHandler_, - value?.ref.pointer ?? ffi.nullptr); + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635( + _class_NSMutableURLRequest, _sel_supportsSecureCoding); } - /// setUserInfoObject:forKey: - void setUserInfoObject_forKey_( - objc.ObjCObjectBase? objectOrNil, DartNSProgressUserInfoKey key) { - _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_setUserInfoObject_forKey_, - objectOrNil?.ref.pointer ?? ffi.nullptr, key.ref.pointer); + /// ! + /// @method requestWithURL:cachePolicy:timeoutInterval: + /// @abstract Allocates and initializes a NSURLRequest with the given + /// URL and cache policy. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result A newly-created and autoreleased NSURLRequest instance. + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, + NSURLRequestCachePolicy cachePolicy, + DartNSTimeInterval timeoutInterval) { + final _ret = _objc_msgSend_3phu9v( + _class_NSMutableURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.ref.pointer, + cachePolicy.value, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - /// isIndeterminate - bool get indeterminate { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isIndeterminate); + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL. + /// @discussion Default values are used for cache policy + /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 + /// seconds). + /// @param URL The URL for the request. + /// @result An initialized NSURLRequest. + NSMutableURLRequest initWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_62nh5j( + this.ref.retainAndReturnPointer(), _sel_initWithURL_, URL.ref.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } - /// fractionCompleted - double get fractionCompleted { - return _objc_msgSend_10noklm(this.ref.pointer, _sel_fractionCompleted); + /// ! + /// @method initWithURL: + /// @abstract Initializes an NSURLRequest with the given URL and + /// cache policy. + /// @discussion This is the designated initializer for the + /// NSURLRequest class. + /// @param URL The URL for the request. + /// @param cachePolicy The cache policy for the request. + /// @param timeoutInterval The timeout interval for the request. See the + /// commentary for the timeoutInterval for more information on + /// timeout intervals. + /// @result An initialized NSURLRequest. + NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, + NSURLRequestCachePolicy cachePolicy, DartNSTimeInterval timeoutInterval) { + final _ret = _objc_msgSend_3phu9v( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.ref.pointer, + cachePolicy.value, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } - /// isFinished - bool get finished { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isFinished); + /// init + NSMutableURLRequest init() { + final _ret = + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } - /// cancel - void cancel() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); + /// new + static NSMutableURLRequest new1() { + final _ret = _objc_msgSend_1x359cv(_class_NSMutableURLRequest, _sel_new); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } - /// pause - void pause() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_pause); + /// allocWithZone: + static NSMutableURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_hzlb60( + _class_NSMutableURLRequest, _sel_allocWithZone_, zone); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } - /// resume - void resume() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_resume); + /// alloc + static NSMutableURLRequest alloc() { + final _ret = _objc_msgSend_1x359cv(_class_NSMutableURLRequest, _sel_alloc); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } - /// userInfo - objc.NSDictionary get userInfo { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_userInfo); - return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + /// self + NSMutableURLRequest self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - /// kind - DartNSProgressKind get kind { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_kind); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// retain + NSMutableURLRequest retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - /// setKind: - set kind(DartNSProgressKind value) { - return _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_setKind_, value.ref.pointer); + /// autorelease + NSMutableURLRequest autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - /// estimatedTimeRemaining - objc.NSNumber? get estimatedTimeRemaining { - final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_estimatedTimeRemaining); + /// initWithCoder: + NSMutableURLRequest? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null - : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + : NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } +} - /// setEstimatedTimeRemaining: - set estimatedTimeRemaining(objc.NSNumber? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, - _sel_setEstimatedTimeRemaining_, value?.ref.pointer ?? ffi.nullptr); - } +enum NSHTTPCookieAcceptPolicy { + NSHTTPCookieAcceptPolicyAlways(0), + NSHTTPCookieAcceptPolicyNever(1), + NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain(2); - /// throughput - objc.NSNumber? get throughput { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_throughput); - return _ret.address == 0 - ? null - : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); - } + final int value; + const NSHTTPCookieAcceptPolicy(this.value); - /// setThroughput: - set throughput(objc.NSNumber? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setThroughput_, - value?.ref.pointer ?? ffi.nullptr); - } + static NSHTTPCookieAcceptPolicy fromValue(int value) => switch (value) { + 0 => NSHTTPCookieAcceptPolicyAlways, + 1 => NSHTTPCookieAcceptPolicyNever, + 2 => NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, + _ => throw ArgumentError( + "Unknown value for NSHTTPCookieAcceptPolicy: $value"), + }; +} - /// fileOperationKind - DartNSProgressFileOperationKind get fileOperationKind { - final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileOperationKind); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); +/// WARNING: NSHTTPCookieStorage is a stub. To generate bindings for this class, include +/// NSHTTPCookieStorage in your config's objc-interfaces list. +/// +/// NSHTTPCookieStorage +class NSHTTPCookieStorage extends objc.NSObject { + NSHTTPCookieStorage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + NSHTTPCookieStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSHTTPCookieStorage] that wraps the given raw object pointer. + NSHTTPCookieStorage.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); +} + +late final _class_NSHTTPCookieStorage = objc.getClass("NSHTTPCookieStorage"); +late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); +late final _sel_taskIdentifier = objc.registerName("taskIdentifier"); +late final _sel_originalRequest = objc.registerName("originalRequest"); +late final _sel_currentRequest = objc.registerName("currentRequest"); +late final _class_NSURLResponse = objc.getClass("NSURLResponse"); +late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = + objc.registerName( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); +final _objc_msgSend_13tl325 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_MIMEType = objc.registerName("MIMEType"); +late final _sel_expectedContentLength = + objc.registerName("expectedContentLength"); +final _objc_msgSend_1k101e3 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_textEncodingName = objc.registerName("textEncodingName"); +late final _sel_suggestedFilename = objc.registerName("suggestedFilename"); + +/// NSURLResponse +class NSURLResponse extends objc.NSObject { + NSURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLResponse] that points to the same underlying object as [other]. + NSURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLResponse] that wraps the given raw object pointer. + NSURLResponse.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLResponse]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_69e0x1( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLResponse); } - /// setFileOperationKind: - set fileOperationKind(DartNSProgressFileOperationKind value) { - return _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_setFileOperationKind_, value.ref.pointer); + /// ! + /// @method initWithURL:MIMEType:expectedContentLength:textEncodingName: + /// @abstract Initialize an NSURLResponse with the provided values. + /// @param URL the URL + /// @param MIMEType the MIME content type of the response + /// @param length the expected content length of the associated data + /// @param name the name of the text encoding for the associated data, if applicable, else nil + /// @result The initialized NSURLResponse. + /// @discussion This is the designated initializer for NSURLResponse. + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + objc.NSURL URL, + objc.NSString? MIMEType, + DartNSInteger length, + objc.NSString? name) { + final _ret = _objc_msgSend_13tl325( + this.ref.retainAndReturnPointer(), + _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, + URL.ref.pointer, + MIMEType?.ref.pointer ?? ffi.nullptr, + length, + name?.ref.pointer ?? ffi.nullptr); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - /// fileURL - objc.NSURL? get fileURL { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileURL); + /// ! + /// @abstract Returns the URL of the receiver. + /// @result The URL of the receiver. + objc.NSURL? get URL { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_URL); return _ret.address == 0 ? null : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - /// setFileURL: - set fileURL(objc.NSURL? value) { - return _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_setFileURL_, value?.ref.pointer ?? ffi.nullptr); - } - - /// fileTotalCount - objc.NSNumber? get fileTotalCount { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileTotalCount); + /// ! + /// @abstract Returns the MIME type of the receiver. + /// @discussion The MIME type is based on the information provided + /// from an origin source. However, that value may be changed or + /// corrected by a protocol implementation if it can be determined + /// that the origin server or source reported the information + /// incorrectly or imprecisely. An attempt to guess the MIME type may + /// be made if the origin source did not report any such information. + /// @result The MIME type of the receiver. + objc.NSString? get MIMEType { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_MIMEType); return _ret.address == 0 ? null - : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setFileTotalCount: - set fileTotalCount(objc.NSNumber? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileTotalCount_, - value?.ref.pointer ?? ffi.nullptr); + /// ! + /// @abstract Returns the expected content length of the receiver. + /// @discussion Some protocol implementations report a content length + /// as part of delivering load metadata, but not all protocols + /// guarantee the amount of data that will be delivered in actuality. + /// Hence, this method returns an expected amount. Clients should use + /// this value as an advisory, and should be prepared to deal with + /// either more or less data. + /// @result The expected content length of the receiver, or -1 if + /// there is no expectation that can be arrived at regarding expected + /// content length. + int get expectedContentLength { + return _objc_msgSend_1k101e3(this.ref.pointer, _sel_expectedContentLength); + } + + /// ! + /// @abstract Returns the name of the text encoding of the receiver. + /// @discussion This name will be the actual string reported by the + /// origin source during the course of performing a protocol-specific + /// URL load. Clients can inspect this string and convert it to an + /// NSStringEncoding or CFStringEncoding using the methods and + /// functions made available in the appropriate framework. + /// @result The name of the text encoding of the receiver, or nil if no + /// text encoding was specified. + objc.NSString? get textEncodingName { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_textEncodingName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// fileCompletedCount - objc.NSNumber? get fileCompletedCount { + /// ! + /// @abstract Returns a suggested filename if the resource were saved to disk. + /// @discussion The method first checks if the server has specified a filename using the + /// content disposition header. If no valid filename is specified using that mechanism, + /// this method checks the last path component of the URL. If no valid filename can be + /// obtained using the last path component, this method uses the URL's host as the filename. + /// If the URL's host can't be converted to a valid filename, the filename "unknown" is used. + /// In most cases, this method appends the proper file extension based on the MIME type. + /// This method always returns a valid filename. + /// @result A suggested filename to use if saving the resource to disk. + objc.NSString? get suggestedFilename { final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_fileCompletedCount); + _objc_msgSend_1x359cv(this.ref.pointer, _sel_suggestedFilename); return _ret.address == 0 ? null - : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// setFileCompletedCount: - set fileCompletedCount(objc.NSNumber? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setFileCompletedCount_, - value?.ref.pointer ?? ffi.nullptr); + /// init + NSURLResponse init() { + final _ret = + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - /// publish - void publish() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_publish); + /// new + static NSURLResponse new1() { + final _ret = _objc_msgSend_1x359cv(_class_NSURLResponse, _sel_new); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - /// unpublish - void unpublish() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_unpublish); + /// allocWithZone: + static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_hzlb60(_class_NSURLResponse, _sel_allocWithZone_, zone); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - /// addSubscriberForFileURL:withPublishingHandler: - static objc.ObjCObjectBase addSubscriberForFileURL_withPublishingHandler_( - objc.NSURL url, DartNSProgressPublishingHandler publishingHandler) { - final _ret = _objc_msgSend_1kkhn3j( - _class_NSProgress, - _sel_addSubscriberForFileURL_withPublishingHandler_, - url.ref.pointer, - publishingHandler.ref.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); + /// alloc + static NSURLResponse alloc() { + final _ret = _objc_msgSend_1x359cv(_class_NSURLResponse, _sel_alloc); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - /// removeSubscriber: - static void removeSubscriber_(objc.ObjCObjectBase subscriber) { - _objc_msgSend_ukcdfq( - _class_NSProgress, _sel_removeSubscriber_, subscriber.ref.pointer); + /// self + NSURLResponse self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - /// isOld - bool get old { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isOld); + /// retain + NSURLResponse retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - /// init - NSProgress init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSProgress.castFromPointer(_ret, retain: false, release: true); + /// autorelease + NSURLResponse autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - /// new - static NSProgress new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSProgress, _sel_new); - return NSProgress.castFromPointer(_ret, retain: false, release: true); + /// supportsSecureCoding + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635( + _class_NSURLResponse, _sel_supportsSecureCoding); } - /// allocWithZone: - static NSProgress allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_1b3ihd0(_class_NSProgress, _sel_allocWithZone_, zone); - return NSProgress.castFromPointer(_ret, retain: false, release: true); + /// encodeWithCoder: + void encodeWithCoder_(objc.NSCoder coder) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); } - /// alloc - static NSProgress alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSProgress, _sel_alloc); - return NSProgress.castFromPointer(_ret, retain: false, release: true); + /// initWithCoder: + NSURLResponse? initWithCoder_(objc.NSCoder coder) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithCoder_, coder.ref.pointer); + return _ret.address == 0 + ? null + : NSURLResponse.castFromPointer(_ret, retain: false, release: true); } } -late final _class_NSProgress = objc.getClass("NSProgress"); -late final _sel_currentProgress = objc.registerName("currentProgress"); -late final _sel_progressWithTotalUnitCount_ = - objc.registerName("progressWithTotalUnitCount:"); -final _objc_msgSend_n9eq1n = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int64)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_discreteProgressWithTotalUnitCount_ = - objc.registerName("discreteProgressWithTotalUnitCount:"); -late final _sel_progressWithTotalUnitCount_parent_pendingUnitCount_ = - objc.registerName("progressWithTotalUnitCount:parent:pendingUnitCount:"); -final _objc_msgSend_105mybv = objc.msgSendPointer - .cast< - ffi.NativeFunction< +late final _sel_response = objc.registerName("response"); +late final _sel_delegate = objc.registerName("delegate"); +late final _sel_setDelegate_ = objc.registerName("setDelegate:"); + +/// WARNING: NSProgress is a stub. To generate bindings for this class, include +/// NSProgress in your config's objc-interfaces list. +/// +/// NSProgress +class NSProgress extends objc.NSObject { + NSProgress._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSProgress] that points to the same underlying object as [other]. + NSProgress.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSProgress] that wraps the given raw object pointer. + NSProgress.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); +} + +late final _sel_progress = objc.registerName("progress"); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>() + .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Pointer, - ffi.Int64)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int)>(); -late final _sel_initWithParent_userInfo_ = - objc.registerName("initWithParent:userInfo:"); -late final _sel_becomeCurrentWithPendingUnitCount_ = - objc.registerName("becomeCurrentWithPendingUnitCount:"); -final _objc_msgSend_rrr3q = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int64)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_performAsCurrentWithPendingUnitCount_usingBlock_ = - objc.registerName("performAsCurrentWithPendingUnitCount:usingBlock:"); -final _objc_msgSend_19q84do = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_resignCurrent = objc.registerName("resignCurrent"); -late final _sel_addChild_withPendingUnitCount_ = - objc.registerName("addChild:withPendingUnitCount:"); -final _objc_msgSend_2citz1 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_totalUnitCount = objc.registerName("totalUnitCount"); -final _objc_msgSend_1voti03 = objc.msgSendPointer + ffi.Pointer)>()(arg0); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoid_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSProgress_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_NSProgress_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunction(NSProgress Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSProgress_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSProgress_ffiVoid_CallExtension + on objc.ObjCBlock)> { + NSProgress call(ffi.Pointer arg0) => NSProgress.castFromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); +} + +late final _sel_earliestBeginDate = objc.registerName("earliestBeginDate"); +late final _sel_setEarliestBeginDate_ = + objc.registerName("setEarliestBeginDate:"); +late final _sel_countOfBytesClientExpectsToSend = + objc.registerName("countOfBytesClientExpectsToSend"); +final _objc_msgSend_pysgoz = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int64 Function(ffi.Pointer, @@ -47163,228 +46126,16 @@ final _objc_msgSend_1voti03 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setTotalUnitCount_ = objc.registerName("setTotalUnitCount:"); -late final _sel_completedUnitCount = objc.registerName("completedUnitCount"); -late final _sel_setCompletedUnitCount_ = - objc.registerName("setCompletedUnitCount:"); -late final _sel_localizedDescription = - objc.registerName("localizedDescription"); -late final _sel_setLocalizedDescription_ = - objc.registerName("setLocalizedDescription:"); -late final _sel_localizedAdditionalDescription = - objc.registerName("localizedAdditionalDescription"); -late final _sel_setLocalizedAdditionalDescription_ = - objc.registerName("setLocalizedAdditionalDescription:"); -late final _sel_isCancellable = objc.registerName("isCancellable"); -late final _sel_setCancellable_ = objc.registerName("setCancellable:"); -final _objc_msgSend_117qins = objc.msgSendPointer +late final _sel_setCountOfBytesClientExpectsToSend_ = + objc.registerName("setCountOfBytesClientExpectsToSend:"); +final _objc_msgSend_17gvxvj = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>() + ffi.Pointer, ffi.Int64)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, bool)>(); -late final _sel_isPausable = objc.registerName("isPausable"); -late final _sel_setPausable_ = objc.registerName("setPausable:"); -late final _sel_isCancelled = objc.registerName("isCancelled"); -late final _sel_isPaused = objc.registerName("isPaused"); -late final _sel_cancellationHandler = objc.registerName("cancellationHandler"); -final _objc_msgSend_2osec1 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setCancellationHandler_ = - objc.registerName("setCancellationHandler:"); -final _objc_msgSend_4daxhl = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_pausingHandler = objc.registerName("pausingHandler"); -late final _sel_setPausingHandler_ = objc.registerName("setPausingHandler:"); -late final _sel_resumingHandler = objc.registerName("resumingHandler"); -late final _sel_setResumingHandler_ = objc.registerName("setResumingHandler:"); -typedef NSProgressUserInfoKey = ffi.Pointer; -typedef DartNSProgressUserInfoKey = objc.NSString; -late final _sel_setUserInfoObject_forKey_ = - objc.registerName("setUserInfoObject:forKey:"); -late final _sel_isIndeterminate = objc.registerName("isIndeterminate"); -late final _sel_fractionCompleted = objc.registerName("fractionCompleted"); -late final _sel_isFinished = objc.registerName("isFinished"); -late final _sel_cancel = objc.registerName("cancel"); -late final _sel_pause = objc.registerName("pause"); -late final _sel_resume = objc.registerName("resume"); -typedef NSProgressKind = ffi.Pointer; -typedef DartNSProgressKind = objc.NSString; -late final _sel_kind = objc.registerName("kind"); -late final _sel_setKind_ = objc.registerName("setKind:"); -late final _sel_estimatedTimeRemaining = - objc.registerName("estimatedTimeRemaining"); -late final _sel_setEstimatedTimeRemaining_ = - objc.registerName("setEstimatedTimeRemaining:"); -late final _sel_throughput = objc.registerName("throughput"); -late final _sel_setThroughput_ = objc.registerName("setThroughput:"); -typedef NSProgressFileOperationKind = ffi.Pointer; -typedef DartNSProgressFileOperationKind = objc.NSString; -late final _sel_fileOperationKind = objc.registerName("fileOperationKind"); -late final _sel_setFileOperationKind_ = - objc.registerName("setFileOperationKind:"); -late final _sel_fileURL = objc.registerName("fileURL"); -late final _sel_setFileURL_ = objc.registerName("setFileURL:"); -late final _sel_fileTotalCount = objc.registerName("fileTotalCount"); -late final _sel_setFileTotalCount_ = objc.registerName("setFileTotalCount:"); -late final _sel_fileCompletedCount = objc.registerName("fileCompletedCount"); -late final _sel_setFileCompletedCount_ = - objc.registerName("setFileCompletedCount:"); -late final _sel_publish = objc.registerName("publish"); -late final _sel_unpublish = objc.registerName("unpublish"); -typedef NSProgressPublishingHandler = ffi.Pointer; -typedef DartNSProgressPublishingHandler - = objc.ObjCBlock Function(NSProgress)>; -NSProgressUnpublishingHandler - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer)>()(arg0); -ffi.Pointer - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrCallable = - ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrTrampoline) - .cast(); -NSProgressUnpublishingHandler - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0) => - (objc.getBlockClosure(block) as NSProgressUnpublishingHandler Function( - ffi.Pointer))(arg0); -ffi.Pointer - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureCallable = - ffi.Pointer.fromFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureTrampoline) - .cast(); - -/// Construction methods for `objc.ObjCBlock Function(NSProgress)>`. -abstract final class ObjCBlock_NSProgressUnpublishingHandler_NSProgress { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - objc.ObjCBlock Function(NSProgress)> castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) => - objc.ObjCBlock Function(NSProgress)>( - pointer, - retain: retain, - release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock Function(NSProgress)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock Function(NSProgress)>( - objc.newPointerBlock( - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrCallable, ptr.cast()), - retain: false, - release: true); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - objc.ObjCBlock Function(NSProgress)> fromFunction( - DartNSProgressUnpublishingHandler Function(NSProgress) fn) => - objc.ObjCBlock Function(NSProgress)>( - objc.newClosureBlock( - _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureCallable, - (ffi.Pointer arg0) => - fn(NSProgress.castFromPointer(arg0, retain: true, release: true)) - .ref - .retainAndAutorelease()), - retain: false, - release: true); -} - -/// Call operator for `objc.ObjCBlock Function(NSProgress)>`. -extension ObjCBlock_NSProgressUnpublishingHandler_NSProgress_CallExtension - on objc - .ObjCBlock Function(NSProgress)> { - DartNSProgressUnpublishingHandler call(NSProgress arg0) => - ObjCBlock_ffiVoid.castFromPointer( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - NSProgressUnpublishingHandler Function( - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0.ref.pointer), - retain: true, - release: true); -} - -typedef NSProgressUnpublishingHandler = ffi.Pointer; -typedef DartNSProgressUnpublishingHandler = objc.ObjCBlock; -late final _sel_addSubscriberForFileURL_withPublishingHandler_ = - objc.registerName("addSubscriberForFileURL:withPublishingHandler:"); -final _objc_msgSend_1kkhn3j = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSProgressPublishingHandler)>(); -late final _sel_removeSubscriber_ = objc.registerName("removeSubscriber:"); -late final _sel_isOld = objc.registerName("isOld"); -late final _sel_progress = objc.registerName("progress"); -late final _sel_earliestBeginDate = objc.registerName("earliestBeginDate"); -late final _sel_setEarliestBeginDate_ = - objc.registerName("setEarliestBeginDate:"); -late final _sel_countOfBytesClientExpectsToSend = - objc.registerName("countOfBytesClientExpectsToSend"); -late final _sel_setCountOfBytesClientExpectsToSend_ = - objc.registerName("setCountOfBytesClientExpectsToSend:"); + ffi.Pointer, int)>(); late final _sel_countOfBytesClientExpectsToReceive = objc.registerName("countOfBytesClientExpectsToReceive"); late final _sel_setCountOfBytesClientExpectsToReceive_ = @@ -47398,6 +46149,7 @@ late final _sel_countOfBytesExpectedToReceive = objc.registerName("countOfBytesExpectedToReceive"); late final _sel_taskDescription = objc.registerName("taskDescription"); late final _sel_setTaskDescription_ = objc.registerName("setTaskDescription:"); +late final _sel_cancel = objc.registerName("cancel"); enum NSURLSessionTaskState { /// The task is currently being serviced by the session @@ -47424,7 +46176,7 @@ enum NSURLSessionTaskState { } late final _sel_state = objc.registerName("state"); -final _objc_msgSend_8b7yc1 = objc.msgSendPointer +final _objc_msgSend_1vze0g9 = objc.msgSendPointer .cast< ffi.NativeFunction< NSInteger Function(ffi.Pointer, @@ -47434,8 +46186,9 @@ final _objc_msgSend_8b7yc1 = objc.msgSendPointer ffi.Pointer, ffi.Pointer)>(); late final _sel_error = objc.registerName("error"); late final _sel_suspend = objc.registerName("suspend"); +late final _sel_resume = objc.registerName("resume"); late final _sel_priority = objc.registerName("priority"); -final _objc_msgSend_fcilgx = objc.msgSendPointer +final _objc_msgSend_2cgrxl = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Float Function(ffi.Pointer, @@ -47443,7 +46196,7 @@ final _objc_msgSend_fcilgx = objc.msgSendPointer .asFunction< double Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_fcilgxFpret = objc.msgSendFpretPointer +final _objc_msgSend_2cgrxlFpret = objc.msgSendFpretPointer .cast< ffi.NativeFunction< ffi.Float Function(ffi.Pointer, @@ -47452,7 +46205,7 @@ final _objc_msgSend_fcilgxFpret = objc.msgSendFpretPointer double Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_setPriority_ = objc.registerName("setPriority:"); -final _objc_msgSend_s9gjzc = objc.msgSendPointer +final _objc_msgSend_v5hmet = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, @@ -47465,132 +46218,328 @@ late final _sel_prefersIncrementalDelivery = late final _sel_setPrefersIncrementalDelivery_ = objc.registerName("setPrefersIncrementalDelivery:"); -/// NSProgressReporting -abstract final class NSProgressReporting { - /// Builds an object that implements the NSProgressReporting protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {required NSProgress Function() progress}) { - final builder = objc.ObjCProtocolBuilder(); - NSProgressReporting.progress.implement(builder, progress); - return builder.build(); +/// NSURLSessionTask - a cancelable object that refers to the lifetime +/// of processing a given request. +class NSURLSessionTask extends objc.NSObject { + NSURLSessionTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionTask] that points to the same underlying object as [other]. + NSURLSessionTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionTask] that wraps the given raw object pointer. + NSURLSessionTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_69e0x1( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionTask); } - /// Adds the implementation of the NSProgressReporting protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {required NSProgress Function() progress}) { - NSProgressReporting.progress.implement(builder, progress); + /// an identifier for this task, assigned by and unique to the owning session + DartNSUInteger get taskIdentifier { + return _objc_msgSend_xw2lbc(this.ref.pointer, _sel_taskIdentifier); + } + + /// may be nil if this is a stream task + NSURLRequest? get originalRequest { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_originalRequest); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + /// may differ from originalRequest due to http server redirection + NSURLRequest? get currentRequest { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_currentRequest); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + /// may be nil if no response has been received + NSURLResponse? get response { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_response); + return _ret.address == 0 + ? null + : NSURLResponse.castFromPointer(_ret, retain: true, release: true); + } + + /// Sets a task-specific delegate. Methods not implemented on this delegate will + /// still be forwarded to the session delegate. + /// + /// Cannot be modified after task resumes. Not supported on background session. + /// + /// Delegate is strongly referenced until the task completes, after which it is + /// reset to `nil`. + objc.ObjCObjectBase? get delegate { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// Sets a task-specific delegate. Methods not implemented on this delegate will + /// still be forwarded to the session delegate. + /// + /// Cannot be modified after task resumes. Not supported on background session. + /// + /// Delegate is strongly referenced until the task completes, after which it is + /// reset to `nil`. + set delegate(objc.ObjCObjectBase? value) { + return _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_setDelegate_, value?.ref.pointer ?? ffi.nullptr); } /// progress - static final progress = objc.ObjCProtocolMethod( - _sel_progress, - objc.getProtocolMethodSignature( - _protocol_NSProgressReporting, - _sel_progress, - isRequired: true, - isInstanceMethod: true, - ), - (NSProgress Function() func) => ObjCBlock_NSProgress_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); -} + NSProgress get progress { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_progress); + return NSProgress.castFromPointer(_ret, retain: true, release: true); + } -late final _protocol_NSProgressReporting = - objc.getProtocol("NSProgressReporting"); -ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer)>()(arg0); -ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoid_fnPtrTrampoline) - .cast(); -ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_NSProgress_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoid_closureTrampoline) - .cast(); + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + objc.NSDate? get earliestBeginDate { + final _ret = + _objc_msgSend_1x359cv(this.ref.pointer, _sel_earliestBeginDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + } -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_NSProgress_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, - retain: retain, release: release); + /// Start the network load for this task no earlier than the specified date. If + /// not specified, no start delay is used. + /// + /// Only applies to tasks created from background NSURLSession instances; has no + /// effect for tasks created from other session types. + set earliestBeginDate(objc.NSDate? value) { + return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setEarliestBeginDate_, + value?.ref.pointer ?? ffi.nullptr); + } - /// Creates a block from a C function pointer. + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + int get countOfBytesClientExpectsToSend { + return _objc_msgSend_pysgoz( + this.ref.pointer, _sel_countOfBytesClientExpectsToSend); + } + + /// The number of bytes that the client expects (a best-guess upper-bound) will + /// be sent and received by this task. These values are used by system scheduling + /// policy. If unspecified, NSURLSessionTransferSizeUnknown is used. + set countOfBytesClientExpectsToSend(int value) { + return _objc_msgSend_17gvxvj( + this.ref.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); + } + + /// countOfBytesClientExpectsToReceive + int get countOfBytesClientExpectsToReceive { + return _objc_msgSend_pysgoz( + this.ref.pointer, _sel_countOfBytesClientExpectsToReceive); + } + + /// setCountOfBytesClientExpectsToReceive: + set countOfBytesClientExpectsToReceive(int value) { + return _objc_msgSend_17gvxvj( + this.ref.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); + } + + /// number of body bytes already sent + int get countOfBytesSent { + return _objc_msgSend_pysgoz(this.ref.pointer, _sel_countOfBytesSent); + } + + /// number of body bytes already received + int get countOfBytesReceived { + return _objc_msgSend_pysgoz(this.ref.pointer, _sel_countOfBytesReceived); + } + + /// number of body bytes we expect to send, derived from the Content-Length of the HTTP request + int get countOfBytesExpectedToSend { + return _objc_msgSend_pysgoz( + this.ref.pointer, _sel_countOfBytesExpectedToSend); + } + + /// number of byte bytes we expect to receive, usually derived from the Content-Length header of an HTTP response. + int get countOfBytesExpectedToReceive { + return _objc_msgSend_pysgoz( + this.ref.pointer, _sel_countOfBytesExpectedToReceive); + } + + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + objc.NSString? get taskDescription { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_taskDescription); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// The taskDescription property is available for the developer to + /// provide a descriptive label for the task. + set taskDescription(objc.NSString? value) { + return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setTaskDescription_, + value?.ref.pointer ?? ffi.nullptr); + } + + /// -cancel returns immediately, but marks a task as being canceled. + /// The task will signal -URLSession:task:didCompleteWithError: with an + /// error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some + /// cases, the task may signal other work before it acknowledges the + /// cancelation. -cancel may be sent to a task that has been suspended. + void cancel() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_cancel); + } + + /// The current state of the task within the session. + NSURLSessionTaskState get state { + final _ret = _objc_msgSend_1vze0g9(this.ref.pointer, _sel_state); + return NSURLSessionTaskState.fromValue(_ret); + } + + /// The error, if any, delivered via -URLSession:task:didCompleteWithError: + /// This property will be nil in the event that no error occurred. + objc.NSError? get error { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_error); + return _ret.address == 0 + ? null + : objc.NSError.castFromPointer(_ret, retain: true, release: true); + } + + /// Suspending a task will prevent the NSURLSession from continuing to + /// load data. There may still be delegate calls made on behalf of + /// this task (for instance, to report data received while suspending) + /// but no further transmissions will be made on behalf of the task + /// until -resume is sent. The timeout timer associated with the task + /// will be disabled while a task is suspended. -suspend and -resume are + /// nestable. + void suspend() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_suspend); + } + + /// resume + void resume() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_resume); + } + + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock)>( - objc.newPointerBlock( - _ObjCBlock_NSProgress_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + double get priority { + return objc.useMsgSendVariants + ? _objc_msgSend_2cgrxlFpret(this.ref.pointer, _sel_priority) + : _objc_msgSend_2cgrxl(this.ref.pointer, _sel_priority); + } - /// Creates a block from a Dart function. + /// Sets a scaling factor for the priority of the task. The scaling factor is a + /// value between 0.0 and 1.0 (inclusive), where 0.0 is considered the lowest + /// priority and 1.0 is considered the highest. /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> - fromFunction(NSProgress Function(ffi.Pointer) fn) => - objc.ObjCBlock)>( - objc.newClosureBlock( - _ObjCBlock_NSProgress_ffiVoid_closureCallable, - (ffi.Pointer arg0) => - fn(arg0).ref.retainAndAutorelease()), - retain: false, - release: true); -} + /// The priority is a hint and not a hard requirement of task performance. The + /// priority of a task may be changed using this API at any time, but not all + /// protocols support this; in these cases, the last priority that took effect + /// will be used. + /// + /// If no priority is specified, the task will operate with the default priority + /// as defined by the constant NSURLSessionTaskPriorityDefault. Two additional + /// priority levels are provided: NSURLSessionTaskPriorityLow and + /// NSURLSessionTaskPriorityHigh, but use is not restricted to these. + set priority(double value) { + return _objc_msgSend_v5hmet(this.ref.pointer, _sel_setPriority_, value); + } -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSProgress_ffiVoid_CallExtension - on objc.ObjCBlock)> { - NSProgress call(ffi.Pointer arg0) => NSProgress.castFromPointer( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0), - retain: true, - release: true); + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + bool get prefersIncrementalDelivery { + return _objc_msgSend_91o635( + this.ref.pointer, _sel_prefersIncrementalDelivery); + } + + /// Provides a hint indicating if incremental delivery of a partial response body + /// would be useful for the application, or if it cannot process the response + /// until it is complete. Indicating that incremental delivery is not desired may + /// improve task performance. For example, if a response cannot be decoded until + /// the entire content is received, set this property to false. + /// + /// Defaults to true unless this task is created with completion-handler based + /// convenience methods, or if it is a download task. + set prefersIncrementalDelivery(bool value) { + return _objc_msgSend_1s56lr9( + this.ref.pointer, _sel_setPrefersIncrementalDelivery_, value); + } + + /// init + NSURLSessionTask init() { + final _ret = + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); + } + + /// new + static NSURLSessionTask new1() { + final _ret = _objc_msgSend_1x359cv(_class_NSURLSessionTask, _sel_new); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); + } + + /// allocWithZone: + static NSURLSessionTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_hzlb60( + _class_NSURLSessionTask, _sel_allocWithZone_, zone); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); + } + + /// alloc + static NSURLSessionTask alloc() { + final _ret = _objc_msgSend_1x359cv(_class_NSURLSessionTask, _sel_alloc); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); + } + + /// self + NSURLSessionTask self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSURLSessionTask retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSURLSessionTask autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); + } } -late final _sel_storeCachedResponse_forDataTask_ = - objc.registerName("storeCachedResponse:forDataTask:"); -void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( +late final _sel_storeCookies_forTask_ = + objc.registerName("storeCookies:forTask:"); +void _ObjCBlock_ffiVoid_objcObjCObject_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0) => block.ref.target @@ -47598,24 +46547,24 @@ void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrCallable = +ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) + _ObjCBlock_ffiVoid_objcObjCObject_fnPtrTrampoline) .cast(); -void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( +void _ObjCBlock_ffiVoid_objcObjCObject_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_closureCallable = +ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_closureCallable = ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + _ObjCBlock_ffiVoid_objcObjCObject_closureTrampoline) .cast(); -void _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline( +void _ObjCBlock_ffiVoid_objcObjCObject_listenerTrampoline( ffi.Pointer block, ffi.Pointer arg0) { (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); @@ -47625,56 +46574,55 @@ void _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline( ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer)> - _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerCallable = ffi - .NativeCallable< + _ObjCBlock_ffiVoid_objcObjCObject_listenerCallable = ffi.NativeCallable< ffi.Void Function(ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerTrampoline) + _ObjCBlock_ffiVoid_objcObjCObject_listenerTrampoline) ..keepIsolateAlive = false; -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSCachedURLResponse { +/// Construction methods for `objc.ObjCBlock?)>`. +abstract final class ObjCBlock_ffiVoid_objcObjCObject { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock + static objc.ObjCBlock?)> castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => - objc.ObjCBlock(pointer, - retain: retain, release: release); - - /// Creates a block from a C function pointer. + objc.ObjCBlock?)>( + pointer, + retain: retain, + release: release); + + /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrCallable, - ptr.cast()), - retain: false, - release: true); + static objc.ObjCBlock?)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock?)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_objcObjCObject_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction( - void Function(NSCachedURLResponse?) fn) => - objc.ObjCBlock( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureCallable, - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSCachedURLResponse.castFromPointer(arg0, - retain: true, release: true))), - retain: false, - release: true); + static objc.ObjCBlock?)> + fromFunction(void Function(objc.ObjCObjectBase?) fn) => + objc.ObjCBlock?)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, + retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -47685,26 +46633,27 @@ abstract final class ObjCBlock_ffiVoid_NSCachedURLResponse { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener( - void Function(NSCachedURLResponse?) fn) { + static objc.ObjCBlock?)> + listener(void Function(objc.ObjCObjectBase?) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSCachedURLResponse_listenerCallable.nativeFunction + _ObjCBlock_ffiVoid_objcObjCObject_listenerCallable.nativeFunction .cast(), (ffi.Pointer arg0) => fn(arg0.address == 0 ? null - : NSCachedURLResponse.castFromPointer(arg0, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_ukcdfq(raw); + : objc.ObjCObjectBase(arg0, retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1jdvcbf(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, - retain: false, release: true); + return objc.ObjCBlock?)>( + wrapper, + retain: false, + release: true); } } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSCachedURLResponse_CallExtension - on objc.ObjCBlock { - void call(NSCachedURLResponse? arg0) => ref.pointer.ref.invoke +/// Call operator for `objc.ObjCBlock?)>`. +extension ObjCBlock_ffiVoid_objcObjCObject_CallExtension + on objc.ObjCBlock?)> { + void call(objc.ObjCObjectBase? arg0) => ref.pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer block, @@ -47715,1061 +46664,1482 @@ extension ObjCBlock_ffiVoid_NSCachedURLResponse_CallExtension ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); } -late final _sel_getCachedResponseForDataTask_completionHandler_ = - objc.registerName("getCachedResponseForDataTask:completionHandler:"); -final _objc_msgSend_cmbt6k = objc.msgSendPointer +late final _sel_getCookiesForTask_completionHandler_ = + objc.registerName("getCookiesForTask:completionHandler:"); + +/// NSURLSessionTaskAdditions +extension NSURLSessionTaskAdditions1 on NSHTTPCookieStorage { + /// storeCookies:forTask: + void storeCookies_forTask_( + objc.ObjCObjectBase cookies, NSURLSessionTask task) { + _objc_msgSend_wjvic9(this.ref.pointer, _sel_storeCookies_forTask_, + cookies.ref.pointer, task.ref.pointer); + } + + /// getCookiesForTask:completionHandler: + void getCookiesForTask_completionHandler_( + NSURLSessionTask task, + objc.ObjCBlock?)> + completionHandler) { + _objc_msgSend_14pxqbs( + this.ref.pointer, + _sel_getCookiesForTask_completionHandler_, + task.ref.pointer, + completionHandler.ref.pointer); + } +} + +late final _class_NSEnumerator = objc.getClass("NSEnumerator"); +late final _sel_allObjects = objc.registerName("allObjects"); + +/// NSExtendedEnumerator +extension NSExtendedEnumerator on objc.NSEnumerator { + /// allObjects + objc.ObjCObjectBase get allObjects { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_allObjects); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } +} + +late final _class_NSDictionary = objc.getClass("NSDictionary"); +late final _sel_allKeys = objc.registerName("allKeys"); +late final _sel_allKeysForObject_ = objc.registerName("allKeysForObject:"); +late final _sel_allValues = objc.registerName("allValues"); +late final _sel_descriptionInStringsFileFormat = + objc.registerName("descriptionInStringsFileFormat"); +late final _sel_descriptionWithLocale_indent_ = + objc.registerName("descriptionWithLocale:indent:"); +final _objc_msgSend_dcd68g = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_isEqualToDictionary_ = + objc.registerName("isEqualToDictionary:"); +late final _sel_objectEnumerator = objc.registerName("objectEnumerator"); +late final _sel_objectsForKeys_notFoundMarker_ = + objc.registerName("objectsForKeys:notFoundMarker:"); +late final _sel_writeToURL_error_ = objc.registerName("writeToURL:error:"); +final _objc_msgSend_blqzg8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_keysSortedByValueUsingSelector_ = + objc.registerName("keysSortedByValueUsingSelector:"); +final _objc_msgSend_19hbqky = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getObjects_andKeys_count_ = + objc.registerName("getObjects:andKeys:count:"); +final _objc_msgSend_n2svg2 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); +late final _sel_objectForKeyedSubscript_ = + objc.registerName("objectForKeyedSubscript:"); +void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.Pointer, ffi.Pointer)> + fromFunction(void Function(objc.ObjCObjectBase, objc.ObjCObjectBase, ffi.Pointer) fn) => + objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + objc.ObjCObjectBase(arg0, retain: true, release: true), + objc.ObjCObjectBase(arg1, retain: true, release: true), + arg2)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> listener( + void Function( + objc.ObjCObjectBase, objc.ObjCObjectBase, ffi.Pointer) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(objc.ObjCObjectBase(arg0, retain: false, release: true), + objc.ObjCObjectBase(arg1, retain: false, release: true), arg2)); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1krhfwz(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> { + void call(objc.ObjCObjectBase arg0, objc.ObjCObjectBase arg1, + ffi.Pointer arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2); +} + +late final _sel_enumerateKeysAndObjectsUsingBlock_ = + objc.registerName("enumerateKeysAndObjectsUsingBlock:"); +final _objc_msgSend_f167m6 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_enumerateKeysAndObjectsWithOptions_usingBlock_ = + objc.registerName("enumerateKeysAndObjectsWithOptions:usingBlock:"); +final _objc_msgSend_yx8yc6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, + ffi.Pointer, + NSUInteger, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_keysSortedByValueUsingComparator_ = + objc.registerName("keysSortedByValueUsingComparator:"); +final _objc_msgSend_cy99le = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_keysSortedByValueWithOptions_usingComparator_ = + objc.registerName("keysSortedByValueWithOptions:usingComparator:"); +final _objc_msgSend_1u2b7ut = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( ffi.Pointer, + ffi.Pointer, + int, ffi.Pointer)>(); -late final _sel_removeCachedResponseForDataTask_ = - objc.registerName("removeCachedResponseForDataTask:"); -typedef NSNotificationName = ffi.Pointer; -typedef DartNSNotificationName = objc.NSString; +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline, + false) + .cast(); +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureTrampoline, + false) + .cast(); -/// ! -/// @class NSMutableURLRequest -/// -/// @abstract An NSMutableURLRequest object represents a mutable URL load -/// request in a manner independent of protocol and URL scheme. -/// -/// @discussion This specialization of NSURLRequest is provided to aid -/// developers who may find it more convenient to mutate a single request -/// object for a series of URL loads instead of creating an immutable -/// NSURLRequest for each load. This programming model is supported by -/// the following contract stipulation between NSMutableURLRequest and -/// NSURLConnection: NSURLConnection makes a deep copy of each -/// NSMutableURLRequest object passed to one of its initializers. -///

NSMutableURLRequest is designed to be extended to support -/// protocol-specific data by adding categories to access a property -/// object provided in an interface targeted at protocol implementors. -///

    -///
  • Protocol implementors should direct their attention to the -/// NSMutableURLRequestExtensibility category on -/// NSMutableURLRequest for more information on how to provide -/// extensions on NSMutableURLRequest to support protocol-specific -/// request information. -///
  • Clients of this API who wish to create NSMutableURLRequest -/// objects to load URL content should consult the protocol-specific -/// NSMutableURLRequest categories that are available. The -/// NSMutableHTTPURLRequest category on NSMutableURLRequest is an -/// example. -///
-class NSMutableURLRequest extends NSURLRequest { - NSMutableURLRequest._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); +/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_objcObjCObject_objcObjCObject_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(pointer, + retain: retain, release: release); - /// Constructs a [NSMutableURLRequest] that points to the same underlying object as [other]. - NSMutableURLRequest.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + objc.newPointerBlock(_ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Constructs a [NSMutableURLRequest] that wraps the given raw object pointer. - NSMutableURLRequest.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.Pointer, ffi.Pointer)> + fromFunction(bool Function(objc.ObjCObjectBase, objc.ObjCObjectBase, ffi.Pointer) fn) => + objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + objc.ObjCObjectBase(arg0, retain: true, release: true), + objc.ObjCObjectBase(arg1, retain: true, release: true), + arg2)), + retain: false, + release: true); +} - /// Returns whether [obj] is an instance of [NSMutableURLRequest]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer)>`. +extension ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_CallExtension + on objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> { + bool call(objc.ObjCObjectBase arg0, objc.ObjCObjectBase arg1, + ffi.Pointer arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2); +} + +late final _sel_keysOfEntriesPassingTest_ = + objc.registerName("keysOfEntriesPassingTest:"); +late final _sel_keysOfEntriesWithOptions_passingTest_ = + objc.registerName("keysOfEntriesWithOptions:passingTest:"); +final _objc_msgSend_hd4f96 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +/// NSExtendedDictionary +extension NSExtendedDictionary on objc.NSDictionary { + /// allKeys + objc.ObjCObjectBase get allKeys { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_allKeys); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// ! - /// @abstract The URL of the receiver. - objc.NSURL? get URL { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URL); - return _ret.address == 0 - ? null - : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + /// allKeysForObject: + objc.ObjCObjectBase allKeysForObject_(objc.ObjCObjectBase anObject) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_allKeysForObject_, anObject.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// ! - /// @abstract The URL of the receiver. - set URL(objc.NSURL? value) { - return _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_setURL_, value?.ref.pointer ?? ffi.nullptr); + /// allValues + objc.ObjCObjectBase get allValues { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_allValues); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// ! - /// @abstract The cache policy of the receiver. - NSURLRequestCachePolicy get cachePolicy { - final _ret = _objc_msgSend_2xak1q(this.ref.pointer, _sel_cachePolicy); - return NSURLRequestCachePolicy.fromValue(_ret); + /// description + objc.NSString get description { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @abstract The cache policy of the receiver. - set cachePolicy(NSURLRequestCachePolicy value) { - return _objc_msgSend_12vaadl( - this.ref.pointer, _sel_setCachePolicy_, value.value); + /// descriptionInStringsFileFormat + objc.NSString get descriptionInStringsFileFormat { + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_descriptionInStringsFileFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @abstract Sets the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - DartNSTimeInterval get timeoutInterval { - return _objc_msgSend_10noklm(this.ref.pointer, _sel_timeoutInterval); + /// descriptionWithLocale: + objc.NSString descriptionWithLocale_(objc.ObjCObjectBase? locale) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_descriptionWithLocale_, locale?.ref.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @abstract Sets the timeout interval of the receiver. - /// @discussion The timeout interval specifies the limit on the idle - /// interval allotted to a request in the process of loading. The "idle - /// interval" is defined as the period of time that has passed since the - /// last instance of load activity occurred for a request that is in the - /// process of loading. Hence, when an instance of load activity occurs - /// (e.g. bytes are received from the network for a request), the idle - /// interval for a request is reset to 0. If the idle interval ever - /// becomes greater than or equal to the timeout interval, the request - /// is considered to have timed out. This timeout interval is measured - /// in seconds. - set timeoutInterval(DartNSTimeInterval value) { - return _objc_msgSend_suh039( - this.ref.pointer, _sel_setTimeoutInterval_, value); + /// descriptionWithLocale:indent: + objc.NSString descriptionWithLocale_indent_( + objc.ObjCObjectBase? locale, DartNSUInteger level) { + final _ret = _objc_msgSend_dcd68g( + this.ref.pointer, + _sel_descriptionWithLocale_indent_, + locale?.ref.pointer ?? ffi.nullptr, + level); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @abstract Sets the main document URL - /// @discussion The caller should pass the URL for an appropriate main - /// document, if known. For example, when loading a web page, the URL - /// of the main html document for the top-level frame should be - /// passed. This main document is used to implement the cookie "only - /// from same domain as main document" policy, attributing this request - /// as a sub-resource of a user-specified URL, and possibly other things - /// in the future. - objc.NSURL? get mainDocumentURL { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_mainDocumentURL); - return _ret.address == 0 - ? null - : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + /// isEqualToDictionary: + bool isEqualToDictionary_(objc.NSDictionary otherDictionary) { + return _objc_msgSend_69e0x1(this.ref.pointer, _sel_isEqualToDictionary_, + otherDictionary.ref.pointer); } - /// ! - /// @abstract Sets the main document URL - /// @discussion The caller should pass the URL for an appropriate main - /// document, if known. For example, when loading a web page, the URL - /// of the main html document for the top-level frame should be - /// passed. This main document is used to implement the cookie "only - /// from same domain as main document" policy, attributing this request - /// as a sub-resource of a user-specified URL, and possibly other things - /// in the future. - set mainDocumentURL(objc.NSURL? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setMainDocumentURL_, - value?.ref.pointer ?? ffi.nullptr); + /// objectEnumerator + objc.NSEnumerator objectEnumerator() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_objectEnumerator); + return objc.NSEnumerator.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request - /// @discussion This method is used to provide the network layers with a hint as to the purpose - /// of the request. Most clients should not need to use this method. - NSURLRequestNetworkServiceType get networkServiceType { - final _ret = - _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); - return NSURLRequestNetworkServiceType.fromValue(_ret); + /// objectsForKeys:notFoundMarker: + objc.ObjCObjectBase objectsForKeys_notFoundMarker_( + objc.ObjCObjectBase keys, objc.ObjCObjectBase marker) { + final _ret = _objc_msgSend_rsfdlh( + this.ref.pointer, + _sel_objectsForKeys_notFoundMarker_, + keys.ref.pointer, + marker.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// ! - /// @abstract Sets the NSURLRequestNetworkServiceType to associate with this request - /// @discussion This method is used to provide the network layers with a hint as to the purpose - /// of the request. Most clients should not need to use this method. - set networkServiceType(NSURLRequestNetworkServiceType value) { - return _objc_msgSend_br89tg( - this.ref.pointer, _sel_setNetworkServiceType_, value.value); + /// writeToURL:error: + bool writeToURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_blqzg8( + this.ref.pointer, _sel_writeToURL_error_, url.ref.pointer, error); } - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @discussion NO if the receiver should not be allowed to use the built in - /// cellular radios to satisfy the request, YES otherwise. The default is YES. - bool get allowsCellularAccess { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsCellularAccess); - } - - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// the built in cellular radios (if present). - /// @discussion NO if the receiver should not be allowed to use the built in - /// cellular radios to satisfy the request, YES otherwise. The default is YES. - set allowsCellularAccess(bool value) { - return _objc_msgSend_117qins( - this.ref.pointer, _sel_setAllowsCellularAccess_, value); - } - - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to - /// satisfy the request, YES otherwise. - bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_olxnu1( - this.ref.pointer, _sel_allowsExpensiveNetworkAccess); - } - - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as expensive. - /// @discussion NO if the receiver should not be allowed to use an interface marked as expensive to - /// satisfy the request, YES otherwise. - set allowsExpensiveNetworkAccess(bool value) { - return _objc_msgSend_117qins( - this.ref.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); - } - - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to - /// satisfy the request, YES otherwise. - bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_olxnu1( - this.ref.pointer, _sel_allowsConstrainedNetworkAccess); - } - - /// ! - /// @abstract sets whether a connection created with this request is allowed to use - /// network interfaces which have been marked as constrained. - /// @discussion NO if the receiver should not be allowed to use an interface marked as constrained to - /// satisfy the request, YES otherwise. - set allowsConstrainedNetworkAccess(bool value) { - return _objc_msgSend_117qins( - this.ref.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); + /// keysSortedByValueUsingSelector: + objc.ObjCObjectBase keysSortedByValueUsingSelector_( + ffi.Pointer comparator) { + final _ret = _objc_msgSend_19hbqky( + this.ref.pointer, _sel_keysSortedByValueUsingSelector_, comparator); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - bool get assumesHTTP3Capable { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_assumesHTTP3Capable); + /// getObjects:andKeys:count: + void getObjects_andKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + DartNSUInteger count) { + _objc_msgSend_n2svg2( + this.ref.pointer, _sel_getObjects_andKeys_count_, objects, keys, count); } - /// ! - /// @abstract returns whether we assume that server supports HTTP/3. Enables QUIC - /// racing without HTTP/3 service discovery. - /// @result YES if server endpoint is known to support HTTP/3. Defaults to NO. - /// The default may be YES in a future OS update. - set assumesHTTP3Capable(bool value) { - return _objc_msgSend_117qins( - this.ref.pointer, _sel_setAssumesHTTP3Capable_, value); + /// objectForKeyedSubscript: + objc.ObjCObjectBase? objectForKeyedSubscript_(objc.ObjCObjectBase key) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_objectForKeyedSubscript_, key.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// ! - /// @abstract Sets the NSURLRequestAttribution to associate with this request. - /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the - /// user. Defaults to NSURLRequestAttributionDeveloper. - NSURLRequestAttribution get attribution { - final _ret = _objc_msgSend_t5yka9(this.ref.pointer, _sel_attribution); - return NSURLRequestAttribution.fromValue(_ret); + /// enumerateKeysAndObjectsUsingBlock: + void enumerateKeysAndObjectsUsingBlock_( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + block) { + _objc_msgSend_f167m6(this.ref.pointer, + _sel_enumerateKeysAndObjectsUsingBlock_, block.ref.pointer); } - /// ! - /// @abstract Sets the NSURLRequestAttribution to associate with this request. - /// @discussion Set to NSURLRequestAttributionUser if the URL was specified by the - /// user. Defaults to NSURLRequestAttributionDeveloper. - set attribution(NSURLRequestAttribution value) { - return _objc_msgSend_1w8eyjo( - this.ref.pointer, _sel_setAttribution_, value.value); + /// enumerateKeysAndObjectsWithOptions:usingBlock: + void enumerateKeysAndObjectsWithOptions_usingBlock_( + objc.NSEnumerationOptions opts, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + block) { + _objc_msgSend_yx8yc6( + this.ref.pointer, + _sel_enumerateKeysAndObjectsWithOptions_usingBlock_, + opts.value, + block.ref.pointer); } - /// ! - /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. - /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, - /// No otherwise. Defaults to NO. - bool get requiresDNSSECValidation { - return _objc_msgSend_olxnu1( - this.ref.pointer, _sel_requiresDNSSECValidation); + /// keysSortedByValueUsingComparator: + objc.ObjCObjectBase keysSortedByValueUsingComparator_( + DartNSComparator cmptr) { + final _ret = _objc_msgSend_cy99le(this.ref.pointer, + _sel_keysSortedByValueUsingComparator_, cmptr.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// ! - /// @abstract sets whether a request is required to do DNSSEC validation during DNS lookup. - /// @discussion YES, if the DNS lookup for this request should require DNSSEC validation, - /// No otherwise. Defaults to NO. - set requiresDNSSECValidation(bool value) { - return _objc_msgSend_117qins( - this.ref.pointer, _sel_setRequiresDNSSECValidation_, value); + /// keysSortedByValueWithOptions:usingComparator: + objc.ObjCObjectBase keysSortedByValueWithOptions_usingComparator_( + objc.NSSortOptions opts, DartNSComparator cmptr) { + final _ret = _objc_msgSend_1u2b7ut( + this.ref.pointer, + _sel_keysSortedByValueWithOptions_usingComparator_, + opts.value, + cmptr.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// HTTPMethod - objc.NSString get HTTPMethod { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPMethod); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); + /// keysOfEntriesPassingTest: + objc.ObjCObjectBase keysOfEntriesPassingTest_( + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + predicate) { + final _ret = _objc_msgSend_cy99le(this.ref.pointer, + _sel_keysOfEntriesPassingTest_, predicate.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } - /// setHTTPMethod: - set HTTPMethod(objc.NSString value) { - return _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_setHTTPMethod_, value.ref.pointer); + /// keysOfEntriesWithOptions:passingTest: + objc.ObjCObjectBase keysOfEntriesWithOptions_passingTest_( + objc.NSEnumerationOptions opts, + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + predicate) { + final _ret = _objc_msgSend_hd4f96( + this.ref.pointer, + _sel_keysOfEntriesWithOptions_passingTest_, + opts.value, + predicate.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } +} - /// allHTTPHeaderFields - objc.NSDictionary? get allHTTPHeaderFields { - final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allHTTPHeaderFields); +late final _sel_getObjects_andKeys_ = objc.registerName("getObjects:andKeys:"); +final _objc_msgSend_hefmm1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_dictionaryWithContentsOfFile_ = + objc.registerName("dictionaryWithContentsOfFile:"); +late final _sel_dictionaryWithContentsOfURL_ = + objc.registerName("dictionaryWithContentsOfURL:"); +late final _sel_initWithContentsOfFile_ = + objc.registerName("initWithContentsOfFile:"); +late final _sel_initWithContentsOfURL_ = + objc.registerName("initWithContentsOfURL:"); +late final _sel_writeToFile_atomically_ = + objc.registerName("writeToFile:atomically:"); +final _objc_msgSend_w8pbfh = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_writeToURL_atomically_ = + objc.registerName("writeToURL:atomically:"); + +/// NSDeprecated +extension NSDeprecated on objc.NSDictionary { + /// getObjects:andKeys: + void getObjects_andKeys_(ffi.Pointer> objects, + ffi.Pointer> keys) { + _objc_msgSend_hefmm1( + this.ref.pointer, _sel_getObjects_andKeys_, objects, keys); + } + + /// dictionaryWithContentsOfFile: + static objc.NSDictionary? dictionaryWithContentsOfFile_(objc.NSString path) { + final _ret = _objc_msgSend_62nh5j(_class_NSDictionary, + _sel_dictionaryWithContentsOfFile_, path.ref.pointer); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// setAllHTTPHeaderFields: - set allHTTPHeaderFields(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setAllHTTPHeaderFields_, - value?.ref.pointer ?? ffi.nullptr); - } - - /// setValue:forHTTPHeaderField: - void setValue_forHTTPHeaderField_(objc.NSString? value, objc.NSString field) { - _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_setValue_forHTTPHeaderField_, - value?.ref.pointer ?? ffi.nullptr, field.ref.pointer); - } - - /// addValue:forHTTPHeaderField: - void addValue_forHTTPHeaderField_(objc.NSString value, objc.NSString field) { - _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_addValue_forHTTPHeaderField_, - value.ref.pointer, field.ref.pointer); - } - - /// HTTPBody - objc.NSData? get HTTPBody { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBody); + /// dictionaryWithContentsOfURL: + static objc.NSDictionary? dictionaryWithContentsOfURL_(objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j(_class_NSDictionary, + _sel_dictionaryWithContentsOfURL_, url.ref.pointer); return _ret.address == 0 ? null - : objc.NSData.castFromPointer(_ret, retain: true, release: true); - } - - /// setHTTPBody: - set HTTPBody(objc.NSData? value) { - return _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_setHTTPBody_, value?.ref.pointer ?? ffi.nullptr); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// HTTPBodyStream - objc.NSInputStream? get HTTPBodyStream { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPBodyStream); + /// initWithContentsOfFile: + objc.NSDictionary? initWithContentsOfFile_(objc.NSString path) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_, path.ref.pointer); return _ret.address == 0 ? null - : objc.NSInputStream.castFromPointer(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: false, release: true); } - /// setHTTPBodyStream: - set HTTPBodyStream(objc.NSInputStream? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPBodyStream_, - value?.ref.pointer ?? ffi.nullptr); + /// initWithContentsOfURL: + objc.NSDictionary? initWithContentsOfURL_(objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: false, release: true); } - /// HTTPShouldHandleCookies - bool get HTTPShouldHandleCookies { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldHandleCookies); + /// writeToFile:atomically: + bool writeToFile_atomically_(objc.NSString path, bool useAuxiliaryFile) { + return _objc_msgSend_w8pbfh(this.ref.pointer, _sel_writeToFile_atomically_, + path.ref.pointer, useAuxiliaryFile); } - /// setHTTPShouldHandleCookies: - set HTTPShouldHandleCookies(bool value) { - return _objc_msgSend_117qins( - this.ref.pointer, _sel_setHTTPShouldHandleCookies_, value); + /// writeToURL:atomically: + bool writeToURL_atomically_(objc.NSURL url, bool atomically) { + return _objc_msgSend_w8pbfh(this.ref.pointer, _sel_writeToURL_atomically_, + url.ref.pointer, atomically); } +} - /// HTTPShouldUsePipelining - bool get HTTPShouldUsePipelining { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldUsePipelining); +late final _sel_dictionary = objc.registerName("dictionary"); +late final _sel_dictionaryWithObject_forKey_ = + objc.registerName("dictionaryWithObject:forKey:"); +late final _sel_dictionaryWithObjects_forKeys_count_ = + objc.registerName("dictionaryWithObjects:forKeys:count:"); +final _objc_msgSend_cfqbni = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); +late final _sel_dictionaryWithObjectsAndKeys_ = + objc.registerName("dictionaryWithObjectsAndKeys:"); +late final _sel_dictionaryWithDictionary_ = + objc.registerName("dictionaryWithDictionary:"); +late final _sel_dictionaryWithObjects_forKeys_ = + objc.registerName("dictionaryWithObjects:forKeys:"); +late final _sel_initWithObjectsAndKeys_ = + objc.registerName("initWithObjectsAndKeys:"); +late final _sel_initWithDictionary_ = objc.registerName("initWithDictionary:"); +late final _sel_initWithDictionary_copyItems_ = + objc.registerName("initWithDictionary:copyItems:"); +final _objc_msgSend_1bdmr5f = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithObjects_forKeys_ = + objc.registerName("initWithObjects:forKeys:"); +late final _sel_initWithContentsOfURL_error_ = + objc.registerName("initWithContentsOfURL:error:"); +final _objc_msgSend_1705co6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_dictionaryWithContentsOfURL_error_ = + objc.registerName("dictionaryWithContentsOfURL:error:"); + +/// NSDictionaryCreation +extension NSDictionaryCreation on objc.NSDictionary { + /// dictionary + static objc.NSDictionary dictionary() { + final _ret = _objc_msgSend_1x359cv(_class_NSDictionary, _sel_dictionary); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// setHTTPShouldUsePipelining: - set HTTPShouldUsePipelining(bool value) { - return _objc_msgSend_117qins( - this.ref.pointer, _sel_setHTTPShouldUsePipelining_, value); + /// dictionaryWithObject:forKey: + static objc.NSDictionary dictionaryWithObject_forKey_( + objc.ObjCObjectBase object, objc.ObjCObjectBase key) { + final _ret = _objc_msgSend_rsfdlh(_class_NSDictionary, + _sel_dictionaryWithObject_forKey_, object.ref.pointer, key.ref.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @method requestWithURL: - /// @abstract Allocates and initializes an NSURLRequest with the given - /// URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSMutableURLRequest requestWithURL_(objc.NSURL URL) { - final _ret = _objc_msgSend_juohf7( - _class_NSMutableURLRequest, _sel_requestWithURL_, URL.ref.pointer); - return NSMutableURLRequest.castFromPointer(_ret, - retain: true, release: true); + /// dictionaryWithObjects:forKeys:count: + static objc.NSDictionary dictionaryWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + DartNSUInteger cnt) { + final _ret = _objc_msgSend_cfqbni(_class_NSDictionary, + _sel_dictionaryWithObjects_forKeys_count_, objects, keys, cnt); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @property supportsSecureCoding - /// @abstract Indicates that NSURLRequest implements the NSSecureCoding protocol. - /// @result A BOOL value set to YES. - static bool getSupportsSecureCoding() { - return _objc_msgSend_olxnu1( - _class_NSMutableURLRequest, _sel_supportsSecureCoding); + /// dictionaryWithObjectsAndKeys: + static objc.NSDictionary dictionaryWithObjectsAndKeys_( + objc.ObjCObjectBase firstObject) { + final _ret = _objc_msgSend_62nh5j(_class_NSDictionary, + _sel_dictionaryWithObjectsAndKeys_, firstObject.ref.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @method requestWithURL:cachePolicy:timeoutInterval: - /// @abstract Allocates and initializes a NSURLRequest with the given - /// URL and cache policy. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result A newly-created and autoreleased NSURLRequest instance. - static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( - objc.NSURL URL, - NSURLRequestCachePolicy cachePolicy, - DartNSTimeInterval timeoutInterval) { - final _ret = _objc_msgSend_191svj( - _class_NSMutableURLRequest, - _sel_requestWithURL_cachePolicy_timeoutInterval_, - URL.ref.pointer, - cachePolicy.value, - timeoutInterval); - return NSMutableURLRequest.castFromPointer(_ret, - retain: true, release: true); + /// dictionaryWithDictionary: + static objc.NSDictionary dictionaryWithDictionary_(objc.NSDictionary dict) { + final _ret = _objc_msgSend_62nh5j( + _class_NSDictionary, _sel_dictionaryWithDictionary_, dict.ref.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL. - /// @discussion Default values are used for cache policy - /// (NSURLRequestUseProtocolCachePolicy) and timeout interval (60 - /// seconds). - /// @param URL The URL for the request. - /// @result An initialized NSURLRequest. - NSMutableURLRequest initWithURL_(objc.NSURL URL) { - final _ret = _objc_msgSend_juohf7( - this.ref.retainAndReturnPointer(), _sel_initWithURL_, URL.ref.pointer); - return NSMutableURLRequest.castFromPointer(_ret, - retain: false, release: true); + /// dictionaryWithObjects:forKeys: + static objc.NSDictionary dictionaryWithObjects_forKeys_( + objc.ObjCObjectBase objects, objc.ObjCObjectBase keys) { + final _ret = _objc_msgSend_rsfdlh( + _class_NSDictionary, + _sel_dictionaryWithObjects_forKeys_, + objects.ref.pointer, + keys.ref.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - /// ! - /// @method initWithURL: - /// @abstract Initializes an NSURLRequest with the given URL and - /// cache policy. - /// @discussion This is the designated initializer for the - /// NSURLRequest class. - /// @param URL The URL for the request. - /// @param cachePolicy The cache policy for the request. - /// @param timeoutInterval The timeout interval for the request. See the - /// commentary for the timeoutInterval for more information on - /// timeout intervals. - /// @result An initialized NSURLRequest. - NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_(objc.NSURL URL, - NSURLRequestCachePolicy cachePolicy, DartNSTimeInterval timeoutInterval) { - final _ret = _objc_msgSend_191svj( - this.ref.retainAndReturnPointer(), - _sel_initWithURL_cachePolicy_timeoutInterval_, - URL.ref.pointer, - cachePolicy.value, - timeoutInterval); - return NSMutableURLRequest.castFromPointer(_ret, + /// initWithObjectsAndKeys: + objc.NSDictionary initWithObjectsAndKeys_(objc.ObjCObjectBase firstObject) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithObjectsAndKeys_, firstObject.ref.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: false, release: true); } - /// init - NSMutableURLRequest init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSMutableURLRequest.castFromPointer(_ret, + /// initWithDictionary: + objc.NSDictionary initWithDictionary_(objc.NSDictionary otherDictionary) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithDictionary_, otherDictionary.ref.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: false, release: true); } - /// new - static NSMutableURLRequest new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMutableURLRequest, _sel_new); - return NSMutableURLRequest.castFromPointer(_ret, + /// initWithDictionary:copyItems: + objc.NSDictionary initWithDictionary_copyItems_( + objc.NSDictionary otherDictionary, bool flag) { + final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + _sel_initWithDictionary_copyItems_, otherDictionary.ref.pointer, flag); + return objc.NSDictionary.castFromPointer(_ret, retain: false, release: true); } - /// allocWithZone: - static NSMutableURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( - _class_NSMutableURLRequest, _sel_allocWithZone_, zone); - return NSMutableURLRequest.castFromPointer(_ret, + /// initWithObjects:forKeys: + objc.NSDictionary initWithObjects_forKeys_( + objc.ObjCObjectBase objects, objc.ObjCObjectBase keys) { + final _ret = _objc_msgSend_rsfdlh(this.ref.retainAndReturnPointer(), + _sel_initWithObjects_forKeys_, objects.ref.pointer, keys.ref.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: false, release: true); } - /// alloc - static NSMutableURLRequest alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSMutableURLRequest, _sel_alloc); - return NSMutableURLRequest.castFromPointer(_ret, - retain: false, release: true); + /// initWithContentsOfURL:error: + objc.NSDictionary? initWithContentsOfURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_1705co6(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_error_, url.ref.pointer, error); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: false, release: true); } - /// initWithCoder: - NSMutableURLRequest? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), - _sel_initWithCoder_, coder.ref.pointer); + /// dictionaryWithContentsOfURL:error: + static objc.NSDictionary? dictionaryWithContentsOfURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_1705co6(_class_NSDictionary, + _sel_dictionaryWithContentsOfURL_error_, url.ref.pointer, error); return _ret.address == 0 ? null - : NSMutableURLRequest.castFromPointer(_ret, - retain: false, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSMutableURLRequest = objc.getClass("NSMutableURLRequest"); -late final _sel_setURL_ = objc.registerName("setURL:"); -late final _sel_setCachePolicy_ = objc.registerName("setCachePolicy:"); -final _objc_msgSend_12vaadl = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_setTimeoutInterval_ = objc.registerName("setTimeoutInterval:"); -final _objc_msgSend_suh039 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, NSTimeInterval)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, double)>(); -late final _sel_setMainDocumentURL_ = objc.registerName("setMainDocumentURL:"); -late final _sel_setNetworkServiceType_ = - objc.registerName("setNetworkServiceType:"); -final _objc_msgSend_br89tg = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_setAllowsCellularAccess_ = - objc.registerName("setAllowsCellularAccess:"); -late final _sel_setAllowsExpensiveNetworkAccess_ = - objc.registerName("setAllowsExpensiveNetworkAccess:"); -late final _sel_setAllowsConstrainedNetworkAccess_ = - objc.registerName("setAllowsConstrainedNetworkAccess:"); -late final _sel_setAssumesHTTP3Capable_ = - objc.registerName("setAssumesHTTP3Capable:"); -late final _sel_setAttribution_ = objc.registerName("setAttribution:"); -final _objc_msgSend_1w8eyjo = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_setRequiresDNSSECValidation_ = - objc.registerName("setRequiresDNSSECValidation:"); -late final _sel_setHTTPMethod_ = objc.registerName("setHTTPMethod:"); -late final _sel_setAllHTTPHeaderFields_ = - objc.registerName("setAllHTTPHeaderFields:"); -late final _sel_setValue_forHTTPHeaderField_ = - objc.registerName("setValue:forHTTPHeaderField:"); -late final _sel_addValue_forHTTPHeaderField_ = - objc.registerName("addValue:forHTTPHeaderField:"); -late final _sel_setHTTPBody_ = objc.registerName("setHTTPBody:"); -late final _sel_setHTTPBodyStream_ = objc.registerName("setHTTPBodyStream:"); -late final _sel_setHTTPShouldHandleCookies_ = - objc.registerName("setHTTPShouldHandleCookies:"); -late final _sel_setHTTPShouldUsePipelining_ = - objc.registerName("setHTTPShouldUsePipelining:"); - -enum NSHTTPCookieAcceptPolicy { - NSHTTPCookieAcceptPolicyAlways(0), - NSHTTPCookieAcceptPolicyNever(1), - NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain(2); - - final int value; - const NSHTTPCookieAcceptPolicy(this.value); - - static NSHTTPCookieAcceptPolicy fromValue(int value) => switch (value) { - 0 => NSHTTPCookieAcceptPolicyAlways, - 1 => NSHTTPCookieAcceptPolicyNever, - 2 => NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain, - _ => throw ArgumentError( - "Unknown value for NSHTTPCookieAcceptPolicy: $value"), - }; -} - -/// NSHTTPCookieStorage -class NSHTTPCookieStorage extends objc.NSObject { - NSHTTPCookieStorage._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSHTTPCookieStorage] that points to the same underlying object as [other]. - NSHTTPCookieStorage.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSHTTPCookieStorage] that wraps the given raw object pointer. - NSHTTPCookieStorage.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); +late final _class_NSMutableDictionary = objc.getClass("NSMutableDictionary"); +late final _sel_addEntriesFromDictionary_ = + objc.registerName("addEntriesFromDictionary:"); +late final _sel_removeAllObjects = objc.registerName("removeAllObjects"); +late final _sel_removeObjectsForKeys_ = + objc.registerName("removeObjectsForKeys:"); +late final _sel_setDictionary_ = objc.registerName("setDictionary:"); +late final _sel_setObject_forKeyedSubscript_ = + objc.registerName("setObject:forKeyedSubscript:"); - /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSHTTPCookieStorage); +/// NSExtendedMutableDictionary +extension NSExtendedMutableDictionary on objc.NSMutableDictionary { + /// addEntriesFromDictionary: + void addEntriesFromDictionary_(objc.NSDictionary otherDictionary) { + _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_addEntriesFromDictionary_, + otherDictionary.ref.pointer); } - /// sharedHTTPCookieStorage - static NSHTTPCookieStorage getSharedHTTPCookieStorage() { - final _ret = _objc_msgSend_1unuoxw( - _class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); - return NSHTTPCookieStorage.castFromPointer(_ret, - retain: true, release: true); + /// removeAllObjects + void removeAllObjects() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_removeAllObjects); } - /// sharedCookieStorageForGroupContainerIdentifier: - static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( - objc.NSString identifier) { - final _ret = _objc_msgSend_juohf7( - _class_NSHTTPCookieStorage, - _sel_sharedCookieStorageForGroupContainerIdentifier_, - identifier.ref.pointer); - return NSHTTPCookieStorage.castFromPointer(_ret, - retain: true, release: true); + /// removeObjectsForKeys: + void removeObjectsForKeys_(objc.ObjCObjectBase keyArray) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_removeObjectsForKeys_, keyArray.ref.pointer); } - /// cookies - objc.ObjCObjectBase? get cookies { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_cookies); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); + /// setDictionary: + void setDictionary_(objc.NSDictionary otherDictionary) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_setDictionary_, otherDictionary.ref.pointer); } - /// setCookie: - void setCookie_(NSHTTPCookie cookie) { - _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setCookie_, cookie.ref.pointer); + /// setObject:forKeyedSubscript: + void setObject_forKeyedSubscript_( + objc.ObjCObjectBase? obj, objc.ObjCObjectBase key) { + _objc_msgSend_wjvic9(this.ref.pointer, _sel_setObject_forKeyedSubscript_, + obj?.ref.pointer ?? ffi.nullptr, key.ref.pointer); } +} - /// deleteCookie: - void deleteCookie_(NSHTTPCookie cookie) { - _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_deleteCookie_, cookie.ref.pointer); - } +late final _sel_dictionaryWithCapacity_ = + objc.registerName("dictionaryWithCapacity:"); +final _objc_msgSend_1qrcblu = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); - /// removeCookiesSinceDate: - void removeCookiesSinceDate_(objc.NSDate date) { - _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_removeCookiesSinceDate_, date.ref.pointer); +/// NSMutableDictionaryCreation +extension NSMutableDictionaryCreation on objc.NSMutableDictionary { + /// dictionaryWithCapacity: + static objc.NSMutableDictionary dictionaryWithCapacity_( + DartNSUInteger numItems) { + final _ret = _objc_msgSend_1qrcblu( + _class_NSMutableDictionary, _sel_dictionaryWithCapacity_, numItems); + return objc.NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); } - /// cookiesForURL: - objc.ObjCObjectBase? cookiesForURL_(objc.NSURL URL) { - final _ret = _objc_msgSend_juohf7( - this.ref.pointer, _sel_cookiesForURL_, URL.ref.pointer); + /// dictionaryWithContentsOfFile: + static objc.NSMutableDictionary? dictionaryWithContentsOfFile_( + objc.NSString path) { + final _ret = _objc_msgSend_62nh5j(_class_NSMutableDictionary, + _sel_dictionaryWithContentsOfFile_, path.ref.pointer); return _ret.address == 0 ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// setCookies:forURL:mainDocumentURL: - void setCookies_forURL_mainDocumentURL_(objc.ObjCObjectBase cookies, - objc.NSURL? URL, objc.NSURL? mainDocumentURL) { - _objc_msgSend_tenbla( - this.ref.pointer, - _sel_setCookies_forURL_mainDocumentURL_, - cookies.ref.pointer, - URL?.ref.pointer ?? ffi.nullptr, - mainDocumentURL?.ref.pointer ?? ffi.nullptr); - } - - /// cookieAcceptPolicy - NSHTTPCookieAcceptPolicy get cookieAcceptPolicy { - final _ret = - _objc_msgSend_1jpuqgg(this.ref.pointer, _sel_cookieAcceptPolicy); - return NSHTTPCookieAcceptPolicy.fromValue(_ret); - } - - /// setCookieAcceptPolicy: - set cookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) { - return _objc_msgSend_199e8fv( - this.ref.pointer, _sel_setCookieAcceptPolicy_, value.value); - } - - /// sortedCookiesUsingDescriptors: - objc.ObjCObjectBase sortedCookiesUsingDescriptors_( - objc.ObjCObjectBase sortOrder) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, - _sel_sortedCookiesUsingDescriptors_, sortOrder.ref.pointer); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// storeCookies:forTask: - void storeCookies_forTask_(objc.NSArray cookies, NSURLSessionTask task) { - _objc_msgSend_1tjlcwl(this.ref.pointer, _sel_storeCookies_forTask_, - cookies.ref.pointer, task.ref.pointer); + : objc.NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); } - /// getCookiesForTask:completionHandler: - void getCookiesForTask_completionHandler_(NSURLSessionTask task, - objc.ObjCBlock completionHandler) { - _objc_msgSend_cmbt6k( - this.ref.pointer, - _sel_getCookiesForTask_completionHandler_, - task.ref.pointer, - completionHandler.ref.pointer); + /// dictionaryWithContentsOfURL: + static objc.NSMutableDictionary? dictionaryWithContentsOfURL_( + objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j(_class_NSMutableDictionary, + _sel_dictionaryWithContentsOfURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); } - /// init - NSHTTPCookieStorage init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSHTTPCookieStorage.castFromPointer(_ret, - retain: false, release: true); + /// initWithContentsOfFile: + objc.NSMutableDictionary? initWithContentsOfFile_(objc.NSString path) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_, path.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSMutableDictionary.castFromPointer(_ret, + retain: false, release: true); } - /// new - static NSHTTPCookieStorage new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookieStorage, _sel_new); - return NSHTTPCookieStorage.castFromPointer(_ret, - retain: false, release: true); + /// initWithContentsOfURL: + objc.NSMutableDictionary? initWithContentsOfURL_(objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSMutableDictionary.castFromPointer(_ret, + retain: false, release: true); } +} - /// allocWithZone: - static NSHTTPCookieStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( - _class_NSHTTPCookieStorage, _sel_allocWithZone_, zone); - return NSHTTPCookieStorage.castFromPointer(_ret, - retain: false, release: true); - } +late final _sel_sharedKeySetForKeys_ = + objc.registerName("sharedKeySetForKeys:"); - /// alloc - static NSHTTPCookieStorage alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPCookieStorage, _sel_alloc); - return NSHTTPCookieStorage.castFromPointer(_ret, - retain: false, release: true); +/// NSSharedKeySetDictionary +extension NSSharedKeySetDictionary on objc.NSDictionary { + /// sharedKeySetForKeys: + static objc.ObjCObjectBase sharedKeySetForKeys_(objc.ObjCObjectBase keys) { + final _ret = _objc_msgSend_62nh5j( + _class_NSDictionary, _sel_sharedKeySetForKeys_, keys.ref.pointer); + return objc.ObjCObjectBase(_ret, retain: true, release: true); } } -late final _class_NSHTTPCookieStorage = objc.getClass("NSHTTPCookieStorage"); -late final _sel_sharedHTTPCookieStorage = - objc.registerName("sharedHTTPCookieStorage"); -late final _sel_sharedCookieStorageForGroupContainerIdentifier_ = - objc.registerName("sharedCookieStorageForGroupContainerIdentifier:"); -late final _sel_cookies = objc.registerName("cookies"); - -/// NSHTTPCookie -class NSHTTPCookie extends objc.ObjCObjectBase { - NSHTTPCookie._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super(pointer, retain: retain, release: release); - - /// Constructs a [NSHTTPCookie] that points to the same underlying object as [other]. - NSHTTPCookie.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSHTTPCookie] that wraps the given raw object pointer. - NSHTTPCookie.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); +late final _sel_dictionaryWithSharedKeySet_ = + objc.registerName("dictionaryWithSharedKeySet:"); - /// Returns whether [obj] is an instance of [NSHTTPCookie]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSHTTPCookie); +/// NSSharedKeySetDictionary +extension NSSharedKeySetDictionary1 on objc.NSMutableDictionary { + /// dictionaryWithSharedKeySet: + static objc.NSMutableDictionary dictionaryWithSharedKeySet_( + objc.ObjCObjectBase keyset) { + final _ret = _objc_msgSend_62nh5j(_class_NSMutableDictionary, + _sel_dictionaryWithSharedKeySet_, keyset.ref.pointer); + return objc.NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); } } -late final _class_NSHTTPCookie = objc.getClass("NSHTTPCookie"); -late final _sel_setCookie_ = objc.registerName("setCookie:"); -late final _sel_deleteCookie_ = objc.registerName("deleteCookie:"); -late final _sel_removeCookiesSinceDate_ = - objc.registerName("removeCookiesSinceDate:"); -late final _sel_cookiesForURL_ = objc.registerName("cookiesForURL:"); -late final _sel_setCookies_forURL_mainDocumentURL_ = - objc.registerName("setCookies:forURL:mainDocumentURL:"); -final _objc_msgSend_tenbla = objc.msgSendPointer +late final _sel_countByEnumeratingWithState_objects_count_ = + objc.registerName("countByEnumeratingWithState:objects:count:"); +final _objc_msgSend_1b5ysjl = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>() .asFunction< - void Function( + int Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_cookieAcceptPolicy = objc.registerName("cookieAcceptPolicy"); -final _objc_msgSend_1jpuqgg = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setCookieAcceptPolicy_ = - objc.registerName("setCookieAcceptPolicy:"); -final _objc_msgSend_199e8fv = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, NSUInteger)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_sortedCookiesUsingDescriptors_ = - objc.registerName("sortedCookiesUsingDescriptors:"); -late final _sel_storeCookies_forTask_ = - objc.registerName("storeCookies:forTask:"); -void _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline( + ffi.Pointer, + ffi.Pointer>, + int)>(); +int _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrTrampoline( ffi.Pointer block, - ffi.Pointer arg0) => + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>>() - .asFunction)>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSArray_fnPtrCallable = + NSUInteger Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + NSUInteger arg3)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSUInteger)>( + _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrTrampoline, + 0) .cast(); -void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( +int _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureTrampoline( ffi.Pointer block, - ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSArray_closureCallable = + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + int arg3) => + (objc.getBlockClosure(block) as int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + NSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + NSUInteger)>( + _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureTrampoline, + 0) .cast(); -void _ObjCBlock_ffiVoid_NSArray_listenerTrampoline( - ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer))(arg0); - objc.objectRelease(block.cast()); -} - -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)> - _ObjCBlock_ffiVoid_NSArray_listenerCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray_listenerTrampoline) - ..keepIsolateAlive = false; -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSArray { +/// Construction methods for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. +abstract final class ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) => - objc.ObjCBlock(pointer, - retain: retain, release: release); + static objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_NSArray_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + static objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, NSUInteger arg3)>> ptr) => + objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>( + objc.newPointerBlock(_ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_fnPtrCallable, ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock fromFunction( - void Function(objc.NSArray?) fn) => - objc.ObjCBlock( + static objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)> fromFunction( + DartNSUInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + DartNSUInteger) + fn) => + objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>( objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSArray_closureCallable, - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : objc.NSArray.castFromPointer(arg0, - retain: true, release: true))), + _ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer> arg2, int arg3) => + fn(arg0, arg1, arg2, arg3)), retain: false, release: true); - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener( - void Function(objc.NSArray?) fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSArray_listenerCallable.nativeFunction.cast(), - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : objc.NSArray.castFromPointer(arg0, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_ukcdfq(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, - retain: false, release: true); - } } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSArray_CallExtension - on objc.ObjCBlock { - void call(objc.NSArray? arg0) => ref.pointer.ref.invoke +/// Call operator for `objc.ObjCBlock, ffi.Pointer, ffi.Pointer>, ffi.UnsignedLong)>`. +extension ObjCBlock_NSUInteger_ffiVoid_NSFastEnumerationState_objcObjCObject_NSUInteger_CallExtension + on objc.ObjCBlock< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)> { + DartNSUInteger call( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + DartNSUInteger arg3) => + ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() + NSUInteger Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer> arg2, + NSUInteger arg3)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>()(ref.pointer, arg0, arg1, arg2, arg3); } -late final _sel_getCookiesForTask_completionHandler_ = - objc.registerName("getCookiesForTask:completionHandler:"); +/// NSGenericFastEnumeration +extension NSGenericFastEnumeration on objc.NSDictionary { + /// countByEnumeratingWithState:objects:count: + DartNSUInteger countByEnumeratingWithState_objects_count_( + ffi.Pointer state, + ffi.Pointer> buffer, + DartNSUInteger len) { + return _objc_msgSend_1b5ysjl(this.ref.pointer, + _sel_countByEnumeratingWithState_objects_count_, state, buffer, len); + } +} -final class CFArrayCallBacks extends ffi.Struct { - @CFIndex() - external int version; +typedef NSProgressKind = ffi.Pointer; +typedef DartNSProgressKind = objc.NSString; +typedef NSProgressUserInfoKey = ffi.Pointer; +typedef DartNSProgressUserInfoKey = objc.NSString; +typedef NSProgressFileOperationKind = ffi.Pointer; +typedef DartNSProgressFileOperationKind = objc.NSString; +typedef NSProgressUnpublishingHandler = ffi.Pointer; +typedef DartNSProgressUnpublishingHandler = objc.ObjCBlock; +NSProgressUnpublishingHandler + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>>() + .asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer)>()(arg0); +ffi.Pointer + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrCallable = + ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrTrampoline) + .cast(); +NSProgressUnpublishingHandler + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as NSProgressUnpublishingHandler Function( + ffi.Pointer))(arg0); +ffi.Pointer + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureCallable = + ffi.Pointer.fromFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureTrampoline) + .cast(); - external CFArrayRetainCallBack retain; +/// Construction methods for `objc.ObjCBlock? Function(NSProgress)>`. +abstract final class ObjCBlock_NSProgressUnpublishingHandler_NSProgress { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock? Function(NSProgress)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + objc.ObjCBlock? Function( + NSProgress)>(pointer, retain: retain, release: release); - external CFArrayReleaseCallBack release; + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock? Function(NSProgress)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock? Function(NSProgress)>( + objc.newPointerBlock( + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - external CFArrayCopyDescriptionCallBack copyDescription; + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + objc.ObjCBlock? Function(NSProgress)> fromFunction( + DartNSProgressUnpublishingHandler? Function(NSProgress) fn) => + objc.ObjCBlock? Function(NSProgress)>( + objc.newClosureBlock( + _ObjCBlock_NSProgressUnpublishingHandler_NSProgress_closureCallable, + (ffi.Pointer arg0) => + fn(NSProgress.castFromPointer(arg0, retain: true, release: true)) + ?.ref + .retainAndAutorelease() ?? + ffi.nullptr), + retain: false, + release: true); +} - external CFArrayEqualCallBack equal; +/// Call operator for `objc.ObjCBlock? Function(NSProgress)>`. +extension ObjCBlock_NSProgressUnpublishingHandler_NSProgress_CallExtension + on objc + .ObjCBlock? Function(NSProgress)> { + DartNSProgressUnpublishingHandler? call(NSProgress arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction, ffi.Pointer)>() + (ref.pointer, arg0.ref.pointer) + .address == + 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer( + ref.pointer.ref.invoke.cast block, ffi.Pointer arg0)>>().asFunction< + NSProgressUnpublishingHandler Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0.ref.pointer), + retain: true, + release: true); } -typedef CFArrayRetainCallBack - = ffi.Pointer>; +typedef NSProgressPublishingHandler = ffi.Pointer; +typedef DartNSProgressPublishingHandler + = objc.ObjCBlock? Function(NSProgress)>; typedef CFArrayRetainCallBackFunction = ffi.Pointer Function( CFAllocatorRef allocator, ffi.Pointer value); -typedef CFArrayReleaseCallBack - = ffi.Pointer>; +typedef CFArrayRetainCallBack + = ffi.Pointer>; typedef CFArrayReleaseCallBackFunction = ffi.Void Function( CFAllocatorRef allocator, ffi.Pointer value); typedef DartCFArrayReleaseCallBackFunction = void Function( CFAllocatorRef allocator, ffi.Pointer value); -typedef CFArrayCopyDescriptionCallBack - = ffi.Pointer>; +typedef CFArrayReleaseCallBack + = ffi.Pointer>; typedef CFArrayCopyDescriptionCallBackFunction = CFStringRef Function( ffi.Pointer value); -typedef CFArrayEqualCallBack - = ffi.Pointer>; +typedef CFArrayCopyDescriptionCallBack + = ffi.Pointer>; typedef CFArrayEqualCallBackFunction = Boolean Function( ffi.Pointer value1, ffi.Pointer value2); typedef DartCFArrayEqualCallBackFunction = DartBoolean Function( ffi.Pointer value1, ffi.Pointer value2); +typedef CFArrayEqualCallBack + = ffi.Pointer>; -final class __CFArray extends ffi.Opaque {} +final class CFArrayCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external CFArrayRetainCallBack retain; + + external CFArrayReleaseCallBack release; + + external CFArrayCopyDescriptionCallBack copyDescription; + + external CFArrayEqualCallBack equal; +} -typedef CFArrayRef = ffi.Pointer<__CFArray>; -typedef CFMutableArrayRef = ffi.Pointer<__CFArray>; -typedef CFArrayApplierFunction - = ffi.Pointer>; typedef CFArrayApplierFunctionFunction = ffi.Void Function( ffi.Pointer value, ffi.Pointer context); typedef DartCFArrayApplierFunctionFunction = void Function( ffi.Pointer value, ffi.Pointer context); -typedef CFComparatorFunction - = ffi.Pointer>; -typedef CFComparatorFunctionFunction = CFIndex Function( - ffi.Pointer val1, - ffi.Pointer val2, - ffi.Pointer context); -typedef DartCFComparatorFunctionFunction = CFComparisonResult Function( - ffi.Pointer val1, - ffi.Pointer val2, - ffi.Pointer context); - -enum CFComparisonResult { - kCFCompareLessThan(-1), - kCFCompareEqualTo(0), - kCFCompareGreaterThan(1); - - final int value; - const CFComparisonResult(this.value); +typedef CFArrayApplierFunction + = ffi.Pointer>; - static CFComparisonResult fromValue(int value) => switch (value) { - -1 => kCFCompareLessThan, - 0 => kCFCompareEqualTo, - 1 => kCFCompareGreaterThan, - _ => - throw ArgumentError("Unknown value for CFComparisonResult: $value"), - }; -} +final class __CFArray extends ffi.Opaque {} -/// OS_sec_object -abstract final class OS_sec_object { - /// Builds an object that implements the OS_sec_object protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); +typedef CFArrayRef = ffi.Pointer<__CFArray>; +typedef CFMutableArrayRef = ffi.Pointer<__CFArray>; +typedef os_function_tFunction = ffi.Void Function(ffi.Pointer); +typedef Dartos_function_tFunction = void Function(ffi.Pointer); +typedef os_function_t = ffi.Pointer>; +typedef os_block_t = ffi.Pointer; +typedef Dartos_block_t = objc.ObjCBlock; + +/// WARNING: OS_object is a stub. To generate bindings for this class, include +/// OS_object in your config's objc-interfaces list. +/// +/// OS_object +class OS_object extends objc.NSObject { + OS_object._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - return builder.build(); - } + /// Constructs a [OS_object] that points to the same underlying object as [other]. + OS_object.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Adds the implementation of the OS_sec_object protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} + /// Constructs a [OS_object] that wraps the given raw object pointer. + OS_object.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); } -late final _protocol_OS_sec_object = objc.getProtocol("OS_sec_object"); +typedef sec_object_t = ffi.Pointer; +typedef Dartsec_object_t = objc.NSObject; final class __SecCertificate extends ffi.Opaque {} +typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; +typedef OpaqueSecCertificateRef = __SecCertificate; + final class __SecIdentity extends ffi.Opaque {} +typedef SecIdentityRef = ffi.Pointer<__SecIdentity>; +typedef OpaqueSecIdentityRef = __SecIdentity; + final class __SecKey extends ffi.Opaque {} +typedef SecKeyRef = ffi.Pointer<__SecKey>; +typedef OpaqueSecKeyRef = __SecKey; + final class __SecPolicy extends ffi.Opaque {} +typedef SecPolicyRef = ffi.Pointer<__SecPolicy>; + final class __SecAccessControl extends ffi.Opaque {} +typedef SecAccessControlRef = ffi.Pointer<__SecAccessControl>; + final class __SecKeychain extends ffi.Opaque {} +typedef SecKeychainRef = ffi.Pointer<__SecKeychain>; + final class __SecKeychainItem extends ffi.Opaque {} +typedef SecKeychainItemRef = ffi.Pointer<__SecKeychainItem>; + final class __SecKeychainSearch extends ffi.Opaque {} +typedef SecKeychainSearchRef = ffi.Pointer<__SecKeychainSearch>; +typedef SecKeychainAttrType = OSType; + final class SecKeychainAttribute extends ffi.Struct { @SecKeychainAttrType() external int tag; @@ -48780,9 +48150,7 @@ final class SecKeychainAttribute extends ffi.Struct { external ffi.Pointer data; } -typedef SecKeychainAttrType = OSType; -typedef OSType = FourCharCode; -typedef FourCharCode = UInt32; +typedef SecKeychainAttributePtr = ffi.Pointer; final class SecKeychainAttributeList extends ffi.Struct { @UInt32() @@ -48791,14 +48159,25 @@ final class SecKeychainAttributeList extends ffi.Struct { external ffi.Pointer attr; } +typedef SecKeychainStatus = UInt32; + final class __SecTrustedApplication extends ffi.Opaque {} +typedef SecTrustedApplicationRef = ffi.Pointer<__SecTrustedApplication>; + final class __SecAccess extends ffi.Opaque {} +typedef SecAccessRef = ffi.Pointer<__SecAccess>; +typedef OpaqueSecAccessRef = __SecAccess; + final class __SecACL extends ffi.Opaque {} +typedef SecACLRef = ffi.Pointer<__SecACL>; + final class __SecPassword extends ffi.Opaque {} +typedef SecPasswordRef = ffi.Pointer<__SecPassword>; + final class SecKeychainAttributeInfo extends ffi.Struct { @UInt32() external int count; @@ -48808,7 +48187,7 @@ final class SecKeychainAttributeInfo extends ffi.Struct { external ffi.Pointer format; } -typedef OSStatus = SInt32; +typedef wint_t = __darwin_wint_t; final class _RuneEntry extends ffi.Struct { @__darwin_rune_t() @@ -48823,10 +48202,6 @@ final class _RuneEntry extends ffi.Struct { external ffi.Pointer<__uint32_t> __types; } -typedef __darwin_rune_t = __darwin_wchar_t; -typedef __darwin_wchar_t = ffi.Int; -typedef Dart__darwin_wchar_t = int; - final class _RuneRange extends ffi.Struct { @ffi.Int() external int __nranges; @@ -48888,9 +48263,6 @@ final class _RuneLocale extends ffi.Struct { external ffi.Pointer<_RuneCharClass> __charclasses; } -typedef __darwin_ct_rune_t = ffi.Int; -typedef Dart__darwin_ct_rune_t = int; - final class lconv extends ffi.Struct { external ffi.Pointer decimal_point; @@ -48955,6 +48327,11 @@ final class lconv extends ffi.Struct { external int int_n_sign_posn; } +typedef float_t = ffi.Float; +typedef Dartfloat_t = double; +typedef double_t = ffi.Double; +typedef Dartdouble_t = double; + final class __float2 extends ffi.Struct { @ffi.Float() external double __sinval; @@ -48987,9 +48364,7 @@ final class exception extends ffi.Struct { external double retval; } -typedef pthread_t = __darwin_pthread_t; -typedef __darwin_pthread_t = ffi.Pointer<_opaque_pthread_t>; -typedef stack_t = __darwin_sigaltstack; +typedef fpos_t = __darwin_off_t; final class __sbuf extends ffi.Struct { external ffi.Pointer _base; @@ -49062,19 +48437,7 @@ final class __sFILE extends ffi.Struct { external int _offset; } -typedef fpos_t = __darwin_off_t; -typedef __darwin_off_t = __int64_t; -typedef __int64_t = ffi.LongLong; -typedef Dart__int64_t = int; typedef FILE = __sFILE; -typedef off_t = __darwin_off_t; -typedef ssize_t = __darwin_ssize_t; -typedef __darwin_ssize_t = ffi.Long; -typedef Dart__darwin_ssize_t = int; -typedef errno_t = ffi.Int; -typedef Darterrno_t = int; -typedef rsize_t = ffi.UnsignedLong; -typedef Dartrsize_t = int; final class timespec extends ffi.Struct { @__darwin_time_t() @@ -49118,11 +48481,6 @@ final class tm extends ffi.Struct { external ffi.Pointer tm_zone; } -typedef clock_t = __darwin_clock_t; -typedef __darwin_clock_t = ffi.UnsignedLong; -typedef Dart__darwin_clock_t = int; -typedef time_t = __darwin_time_t; - enum clockid_t { _CLOCK_REALTIME(0), _CLOCK_MONOTONIC(6), @@ -49149,9 +48507,6 @@ enum clockid_t { }; } -typedef intmax_t = ffi.Long; -typedef Dartintmax_t = int; - final class imaxdiv_t extends ffi.Struct { @intmax_t() external int quot; @@ -49160,61 +48515,59 @@ final class imaxdiv_t extends ffi.Struct { external int rem; } -typedef uintmax_t = ffi.UnsignedLong; -typedef Dartuintmax_t = int; - -final class CFBagCallBacks extends ffi.Struct { - @CFIndex() - external int version; - - external CFBagRetainCallBack retain; - - external CFBagReleaseCallBack release; - - external CFBagCopyDescriptionCallBack copyDescription; - - external CFBagEqualCallBack equal; - - external CFBagHashCallBack hash; -} - -typedef CFBagRetainCallBack - = ffi.Pointer>; typedef CFBagRetainCallBackFunction = ffi.Pointer Function( CFAllocatorRef allocator, ffi.Pointer value); -typedef CFBagReleaseCallBack - = ffi.Pointer>; +typedef CFBagRetainCallBack + = ffi.Pointer>; typedef CFBagReleaseCallBackFunction = ffi.Void Function( CFAllocatorRef allocator, ffi.Pointer value); typedef DartCFBagReleaseCallBackFunction = void Function( CFAllocatorRef allocator, ffi.Pointer value); -typedef CFBagCopyDescriptionCallBack - = ffi.Pointer>; +typedef CFBagReleaseCallBack + = ffi.Pointer>; typedef CFBagCopyDescriptionCallBackFunction = CFStringRef Function( ffi.Pointer value); -typedef CFBagEqualCallBack - = ffi.Pointer>; +typedef CFBagCopyDescriptionCallBack + = ffi.Pointer>; typedef CFBagEqualCallBackFunction = Boolean Function( ffi.Pointer value1, ffi.Pointer value2); typedef DartCFBagEqualCallBackFunction = DartBoolean Function( ffi.Pointer value1, ffi.Pointer value2); -typedef CFBagHashCallBack - = ffi.Pointer>; +typedef CFBagEqualCallBack + = ffi.Pointer>; typedef CFBagHashCallBackFunction = CFHashCode Function( ffi.Pointer value); typedef DartCFBagHashCallBackFunction = DartCFHashCode Function( ffi.Pointer value); +typedef CFBagHashCallBack + = ffi.Pointer>; -final class __CFBag extends ffi.Opaque {} +final class CFBagCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external CFBagRetainCallBack retain; + + external CFBagReleaseCallBack release; + + external CFBagCopyDescriptionCallBack copyDescription; + + external CFBagEqualCallBack equal; + + external CFBagHashCallBack hash; +} -typedef CFBagRef = ffi.Pointer<__CFBag>; -typedef CFMutableBagRef = ffi.Pointer<__CFBag>; -typedef CFBagApplierFunction - = ffi.Pointer>; typedef CFBagApplierFunctionFunction = ffi.Void Function( ffi.Pointer value, ffi.Pointer context); typedef DartCFBagApplierFunctionFunction = void Function( ffi.Pointer value, ffi.Pointer context); +typedef CFBagApplierFunction + = ffi.Pointer>; + +final class __CFBag extends ffi.Opaque {} + +typedef CFBagRef = ffi.Pointer<__CFBag>; +typedef CFMutableBagRef = ffi.Pointer<__CFBag>; final class CFBinaryHeapCompareContext extends ffi.Struct { @CFIndex() @@ -49261,21 +48614,23 @@ final class CFBinaryHeapCallBacks extends ffi.Struct { ffi.Pointer context)>> compare; } -final class __CFBinaryHeap extends ffi.Opaque {} - -typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; -typedef CFBinaryHeapApplierFunction - = ffi.Pointer>; typedef CFBinaryHeapApplierFunctionFunction = ffi.Void Function( ffi.Pointer val, ffi.Pointer context); typedef DartCFBinaryHeapApplierFunctionFunction = void Function( ffi.Pointer val, ffi.Pointer context); +typedef CFBinaryHeapApplierFunction + = ffi.Pointer>; + +final class __CFBinaryHeap extends ffi.Opaque {} + +typedef CFBinaryHeapRef = ffi.Pointer<__CFBinaryHeap>; +typedef CFBit = UInt32; final class __CFBitVector extends ffi.Opaque {} typedef CFBitVectorRef = ffi.Pointer<__CFBitVector>; typedef CFMutableBitVectorRef = ffi.Pointer<__CFBitVector>; -typedef CFBit = UInt32; +typedef CFByteOrder = CFIndex; final class CFSwappedFloat32 extends ffi.Struct { @ffi.Uint32() @@ -49287,49 +48642,34 @@ final class CFSwappedFloat64 extends ffi.Struct { external int v; } -final class CFDictionaryKeyCallBacks extends ffi.Struct { - @CFIndex() - external int version; - - external CFDictionaryRetainCallBack retain; - - external CFDictionaryReleaseCallBack release; - - external CFDictionaryCopyDescriptionCallBack copyDescription; - - external CFDictionaryEqualCallBack equal; - - external CFDictionaryHashCallBack hash; -} - -typedef CFDictionaryRetainCallBack - = ffi.Pointer>; typedef CFDictionaryRetainCallBackFunction = ffi.Pointer Function( CFAllocatorRef allocator, ffi.Pointer value); -typedef CFDictionaryReleaseCallBack - = ffi.Pointer>; +typedef CFDictionaryRetainCallBack + = ffi.Pointer>; typedef CFDictionaryReleaseCallBackFunction = ffi.Void Function( CFAllocatorRef allocator, ffi.Pointer value); typedef DartCFDictionaryReleaseCallBackFunction = void Function( CFAllocatorRef allocator, ffi.Pointer value); -typedef CFDictionaryCopyDescriptionCallBack = ffi - .Pointer>; +typedef CFDictionaryReleaseCallBack + = ffi.Pointer>; typedef CFDictionaryCopyDescriptionCallBackFunction = CFStringRef Function( ffi.Pointer value); -typedef CFDictionaryEqualCallBack - = ffi.Pointer>; +typedef CFDictionaryCopyDescriptionCallBack = ffi + .Pointer>; typedef CFDictionaryEqualCallBackFunction = Boolean Function( ffi.Pointer value1, ffi.Pointer value2); typedef DartCFDictionaryEqualCallBackFunction = DartBoolean Function( ffi.Pointer value1, ffi.Pointer value2); -typedef CFDictionaryHashCallBack - = ffi.Pointer>; +typedef CFDictionaryEqualCallBack + = ffi.Pointer>; typedef CFDictionaryHashCallBackFunction = CFHashCode Function( ffi.Pointer value); typedef DartCFDictionaryHashCallBackFunction = DartCFHashCode Function( ffi.Pointer value); +typedef CFDictionaryHashCallBack + = ffi.Pointer>; -final class CFDictionaryValueCallBacks extends ffi.Struct { +final class CFDictionaryKeyCallBacks extends ffi.Struct { @CFIndex() external int version; @@ -49340,14 +48680,23 @@ final class CFDictionaryValueCallBacks extends ffi.Struct { external CFDictionaryCopyDescriptionCallBack copyDescription; external CFDictionaryEqualCallBack equal; + + external CFDictionaryHashCallBack hash; } -final class __CFDictionary extends ffi.Opaque {} +final class CFDictionaryValueCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external CFDictionaryRetainCallBack retain; + + external CFDictionaryReleaseCallBack release; + + external CFDictionaryCopyDescriptionCallBack copyDescription; + + external CFDictionaryEqualCallBack equal; +} -typedef CFDictionaryRef = ffi.Pointer<__CFDictionary>; -typedef CFMutableDictionaryRef = ffi.Pointer<__CFDictionary>; -typedef CFDictionaryApplierFunction - = ffi.Pointer>; typedef CFDictionaryApplierFunctionFunction = ffi.Void Function( ffi.Pointer key, ffi.Pointer value, @@ -49356,12 +48705,18 @@ typedef DartCFDictionaryApplierFunctionFunction = void Function( ffi.Pointer key, ffi.Pointer value, ffi.Pointer context); +typedef CFDictionaryApplierFunction + = ffi.Pointer>; + +final class __CFDictionary extends ffi.Opaque {} + +typedef CFDictionaryRef = ffi.Pointer<__CFDictionary>; +typedef CFMutableDictionaryRef = ffi.Pointer<__CFDictionary>; +typedef CFNotificationName = CFStringRef; final class __CFNotificationCenter extends ffi.Opaque {} typedef CFNotificationCenterRef = ffi.Pointer<__CFNotificationCenter>; -typedef CFNotificationCallback - = ffi.Pointer>; typedef CFNotificationCallbackFunction = ffi.Void Function( CFNotificationCenterRef center, ffi.Pointer observer, @@ -49374,7 +48729,8 @@ typedef DartCFNotificationCallbackFunction = void Function( CFNotificationName name, ffi.Pointer object, CFDictionaryRef userInfo); -typedef CFNotificationName = CFStringRef; +typedef CFNotificationCallback + = ffi.Pointer>; enum CFNotificationSuspensionBehavior { CFNotificationSuspensionBehaviorDrop(1), @@ -49396,12 +48752,12 @@ enum CFNotificationSuspensionBehavior { }; } +typedef CFLocaleIdentifier = CFStringRef; +typedef CFLocaleKey = CFStringRef; + final class __CFLocale extends ffi.Opaque {} typedef CFLocaleRef = ffi.Pointer<__CFLocale>; -typedef CFLocaleIdentifier = CFStringRef; -typedef LangCode = SInt16; -typedef RegionCode = SInt16; enum CFLocaleLanguageDirection { kCFLocaleLanguageDirectionUnknown(0), @@ -49424,11 +48780,10 @@ enum CFLocaleLanguageDirection { }; } -typedef CFLocaleKey = CFStringRef; typedef CFCalendarIdentifier = CFStringRef; -typedef CFAbsoluteTime = CFTimeInterval; typedef CFTimeInterval = ffi.Double; typedef DartCFTimeInterval = double; +typedef CFAbsoluteTime = CFTimeInterval; final class __CFDate extends ffi.Opaque {} @@ -49436,6 +48791,8 @@ typedef CFDateRef = ffi.Pointer<__CFDate>; final class __CFTimeZone extends ffi.Opaque {} +typedef CFTimeZoneRef = ffi.Pointer<__CFTimeZone>; + final class CFGregorianDate extends ffi.Struct { @SInt32() external int year; @@ -49456,9 +48813,6 @@ final class CFGregorianDate extends ffi.Struct { external double second; } -typedef SInt8 = ffi.SignedChar; -typedef DartSInt8 = int; - final class CFGregorianUnits extends ffi.Struct { @SInt32() external int years; @@ -49479,8 +48833,6 @@ final class CFGregorianUnits extends ffi.Struct { external double seconds; } -typedef CFTimeZoneRef = ffi.Pointer<__CFTimeZone>; - final class __CFData extends ffi.Opaque {} typedef CFDataRef = ffi.Pointer<__CFData>; @@ -49503,6 +48855,7 @@ enum CFDataSearchFlags { final class __CFCharacterSet extends ffi.Opaque {} typedef CFCharacterSetRef = ffi.Pointer<__CFCharacterSet>; +typedef CFMutableCharacterSetRef = ffi.Pointer<__CFCharacterSet>; enum CFCharacterSetPredefinedSet { kCFCharacterSetControl(1), @@ -49545,18 +48898,12 @@ enum CFCharacterSetPredefinedSet { }; } -typedef CFMutableCharacterSetRef = ffi.Pointer<__CFCharacterSet>; -typedef UniChar = UInt16; -typedef UTF32Char = UInt32; +typedef CFErrorDomain = CFStringRef; final class __CFError extends ffi.Opaque {} -typedef CFErrorDomain = CFStringRef; typedef CFErrorRef = ffi.Pointer<__CFError>; typedef CFStringEncoding = UInt32; -typedef CFMutableStringRef = ffi.Pointer<__CFString>; -typedef StringPtr = ffi.Pointer; -typedef ConstStringPtr = ffi.Pointer; enum CFStringCompareFlags { kCFCompareCaseInsensitive(1), @@ -49690,6 +49037,9 @@ enum CFCalendarUnit { }; } +typedef CGFloat = ffi.Double; +typedef DartCGFloat = double; + final class CGPoint extends ffi.Struct { @CGFloat() external double x; @@ -49698,9 +49048,6 @@ final class CGPoint extends ffi.Struct { external double y; } -typedef CGFloat = ffi.Double; -typedef DartCGFloat = double; - final class CGSize extends ffi.Struct { @CGFloat() external double width; @@ -49755,10 +49102,33 @@ final class CGAffineTransformComponents extends ffi.Struct { external CGVector translation; } +typedef CFDateFormatterKey = CFStringRef; + final class __CFDateFormatter extends ffi.Opaque {} typedef CFDateFormatterRef = ffi.Pointer<__CFDateFormatter>; +enum CFDateFormatterStyle { + kCFDateFormatterNoStyle(0), + kCFDateFormatterShortStyle(1), + kCFDateFormatterMediumStyle(2), + kCFDateFormatterLongStyle(3), + kCFDateFormatterFullStyle(4); + + final int value; + const CFDateFormatterStyle(this.value); + + static CFDateFormatterStyle fromValue(int value) => switch (value) { + 0 => kCFDateFormatterNoStyle, + 1 => kCFDateFormatterShortStyle, + 2 => kCFDateFormatterMediumStyle, + 3 => kCFDateFormatterLongStyle, + 4 => kCFDateFormatterFullStyle, + _ => + throw ArgumentError("Unknown value for CFDateFormatterStyle: $value"), + }; +} + enum CFISO8601DateFormatOptions { kCFISO8601DateFormatWithYear(1), kCFISO8601DateFormatWithMonth(2), @@ -49798,37 +49168,10 @@ enum CFISO8601DateFormatOptions { }; } -enum CFDateFormatterStyle { - kCFDateFormatterNoStyle(0), - kCFDateFormatterShortStyle(1), - kCFDateFormatterMediumStyle(2), - kCFDateFormatterLongStyle(3), - kCFDateFormatterFullStyle(4); - - final int value; - const CFDateFormatterStyle(this.value); - - static CFDateFormatterStyle fromValue(int value) => switch (value) { - 0 => kCFDateFormatterNoStyle, - 1 => kCFDateFormatterShortStyle, - 2 => kCFDateFormatterMediumStyle, - 3 => kCFDateFormatterLongStyle, - 4 => kCFDateFormatterFullStyle, - _ => - throw ArgumentError("Unknown value for CFDateFormatterStyle: $value"), - }; -} - -typedef CFDateFormatterKey = CFStringRef; - final class __CFBoolean extends ffi.Opaque {} typedef CFBooleanRef = ffi.Pointer<__CFBoolean>; -final class __CFNumber extends ffi.Opaque {} - -typedef CFNumberRef = ffi.Pointer<__CFNumber>; - enum CFNumberType { kCFNumberSInt8Type(1), kCFNumberSInt16Type(2), @@ -49880,6 +49223,11 @@ enum CFNumberType { } } +final class __CFNumber extends ffi.Opaque {} + +typedef CFNumberRef = ffi.Pointer<__CFNumber>; +typedef CFNumberFormatterKey = CFStringRef; + final class __CFNumberFormatter extends ffi.Opaque {} typedef CFNumberFormatterRef = ffi.Pointer<__CFNumberFormatter>; @@ -49915,13 +49263,6 @@ enum CFNumberFormatterStyle { }; } -typedef CFNumberFormatterKey = CFStringRef; -typedef CFPropertyListRef = CFTypeRef; - -final class __CFURL extends ffi.Opaque {} - -typedef CFURLRef = ffi.Pointer<__CFURL>; - enum CFURLPathStyle { kCFURLPOSIXPathStyle(0), kCFURLHFSPathStyle(1), @@ -49938,6 +49279,10 @@ enum CFURLPathStyle { }; } +final class __CFURL extends ffi.Opaque {} + +typedef CFURLRef = ffi.Pointer<__CFURL>; + enum CFURLComponentType { kCFURLComponentScheme(1), kCFURLComponentNetLocation(2), @@ -50032,6 +49377,49 @@ enum CFURLBookmarkResolutionOptions { } typedef CFURLBookmarkFileCreationOptions = CFOptionFlags; +typedef boolean_t = ffi.Int; +typedef Dartboolean_t = int; +typedef natural_t = __darwin_natural_t; +typedef integer_t = ffi.Int; +typedef Dartinteger_t = int; +typedef vm_offset_t = ffi.UintPtr; +typedef Dartvm_offset_t = int; +typedef vm_size_t = ffi.UintPtr; +typedef Dartvm_size_t = int; +typedef mach_vm_address_t = ffi.Uint64; +typedef Dartmach_vm_address_t = int; +typedef mach_vm_offset_t = ffi.Uint64; +typedef Dartmach_vm_offset_t = int; +typedef mach_vm_size_t = ffi.Uint64; +typedef Dartmach_vm_size_t = int; +typedef vm_map_offset_t = ffi.Uint64; +typedef Dartvm_map_offset_t = int; +typedef vm_map_address_t = ffi.Uint64; +typedef Dartvm_map_address_t = int; +typedef vm_map_size_t = ffi.Uint64; +typedef Dartvm_map_size_t = int; +typedef vm32_offset_t = ffi.Uint32; +typedef Dartvm32_offset_t = int; +typedef vm32_address_t = ffi.Uint32; +typedef Dartvm32_address_t = int; +typedef vm32_size_t = ffi.Uint32; +typedef Dartvm32_size_t = int; +typedef mach_port_context_t = vm_offset_t; +typedef mach_port_name_t = natural_t; +typedef mach_port_name_array_t = ffi.Pointer; +typedef mach_port_t = __darwin_mach_port_t; +typedef mach_port_array_t = ffi.Pointer; +typedef mach_port_right_t = natural_t; +typedef mach_port_type_t = natural_t; +typedef mach_port_type_array_t = ffi.Pointer; +typedef mach_port_urefs_t = natural_t; +typedef mach_port_delta_t = integer_t; +typedef mach_port_seqno_t = natural_t; +typedef mach_port_mscount_t = natural_t; +typedef mach_port_msgcount_t = natural_t; +typedef mach_port_rights_t = natural_t; +typedef mach_port_srights_t = ffi.UnsignedInt; +typedef Dartmach_port_srights_t = int; final class mach_port_status extends ffi.Struct { @mach_port_rights_t() @@ -50065,21 +49453,15 @@ final class mach_port_status extends ffi.Struct { external int mps_flags; } -typedef mach_port_rights_t = natural_t; -typedef natural_t = __darwin_natural_t; -typedef __darwin_natural_t = ffi.UnsignedInt; -typedef Dart__darwin_natural_t = int; -typedef mach_port_seqno_t = natural_t; -typedef mach_port_mscount_t = natural_t; -typedef mach_port_msgcount_t = natural_t; -typedef boolean_t = ffi.Int; -typedef Dartboolean_t = int; +typedef mach_port_status_t = mach_port_status; final class mach_port_limits extends ffi.Struct { @mach_port_msgcount_t() external int mpl_qlimit; } +typedef mach_port_limits_t = mach_port_limits; + final class mach_port_info_ext extends ffi.Struct { external mach_port_status_t mpie_status; @@ -50090,15 +49472,22 @@ final class mach_port_info_ext extends ffi.Struct { external ffi.Array reserved; } -typedef mach_port_status_t = mach_port_status; +typedef mach_port_info_ext_t = mach_port_info_ext; final class mach_port_guard_info extends ffi.Struct { @ffi.Uint64() external int mpgi_guard; } +typedef mach_port_guard_info_t = mach_port_guard_info; +typedef mach_port_info_t = ffi.Pointer; +typedef mach_port_flavor_t = ffi.Int; +typedef Dartmach_port_flavor_t = int; + final class mach_port_qos extends ffi.Opaque {} +typedef mach_port_qos_t = mach_port_qos; + final class mach_service_port_info extends ffi.Struct { @ffi.Array.multi([255]) external ffi.Array mspi_string_name; @@ -50107,16 +49496,8 @@ final class mach_service_port_info extends ffi.Struct { external int mspi_domain_type; } -final class mach_port_options extends ffi.Struct { - @ffi.Uint32() - external int flags; - - external mach_port_limits_t mpl; - - external UnnamedUnion1 unnamed; -} - -typedef mach_port_limits_t = mach_port_limits; +typedef mach_service_port_info_data_t = mach_service_port_info; +typedef mach_service_port_info_t = ffi.Pointer; final class UnnamedUnion1 extends ffi.Union { @ffi.Array.multi([2]) @@ -50131,19 +49512,34 @@ final class UnnamedUnion1 extends ffi.Union { external int service_port_name; } -typedef mach_port_name_t = natural_t; -typedef mach_service_port_info_t = ffi.Pointer; +final class mach_port_options extends ffi.Struct { + @ffi.Uint32() + external int flags; + + external mach_port_limits_t mpl; + + external UnnamedUnion1 unnamed; +} + +typedef mach_port_options_t = mach_port_options; +typedef mach_port_options_ptr_t = ffi.Pointer; +typedef CFRunLoopMode = CFStringRef; final class __CFRunLoop extends ffi.Opaque {} +typedef CFRunLoopRef = ffi.Pointer<__CFRunLoop>; + final class __CFRunLoopSource extends ffi.Opaque {} +typedef CFRunLoopSourceRef = ffi.Pointer<__CFRunLoopSource>; + final class __CFRunLoopObserver extends ffi.Opaque {} +typedef CFRunLoopObserverRef = ffi.Pointer<__CFRunLoopObserver>; + final class __CFRunLoopTimer extends ffi.Opaque {} -typedef CFRunLoopMode = CFStringRef; -typedef CFRunLoopRef = ffi.Pointer<__CFRunLoop>; +typedef CFRunLoopTimerRef = ffi.Pointer<__CFRunLoopTimer>; enum CFRunLoopRunResult { kCFRunLoopRunFinished(1), @@ -50164,9 +49560,29 @@ enum CFRunLoopRunResult { }; } -typedef CFRunLoopSourceRef = ffi.Pointer<__CFRunLoopSource>; -typedef CFRunLoopObserverRef = ffi.Pointer<__CFRunLoopObserver>; -typedef CFRunLoopTimerRef = ffi.Pointer<__CFRunLoopTimer>; +enum CFRunLoopActivity { + kCFRunLoopEntry(1), + kCFRunLoopBeforeTimers(2), + kCFRunLoopBeforeSources(4), + kCFRunLoopBeforeWaiting(32), + kCFRunLoopAfterWaiting(64), + kCFRunLoopExit(128), + kCFRunLoopAllActivities(268435455); + + final int value; + const CFRunLoopActivity(this.value); + + static CFRunLoopActivity fromValue(int value) => switch (value) { + 1 => kCFRunLoopEntry, + 2 => kCFRunLoopBeforeTimers, + 4 => kCFRunLoopBeforeSources, + 32 => kCFRunLoopBeforeWaiting, + 64 => kCFRunLoopAfterWaiting, + 128 => kCFRunLoopExit, + 268435455 => kCFRunLoopAllActivities, + _ => throw ArgumentError("Unknown value for CFRunLoopActivity: $value"), + }; +} final class CFRunLoopSourceContext extends ffi.Struct { @CFIndex() @@ -50248,10 +49664,6 @@ final class CFRunLoopSourceContext1 extends ffi.Struct { ffi.Pointer info)>> perform; } -typedef mach_port_t = __darwin_mach_port_t; -typedef __darwin_mach_port_t = __darwin_mach_port_name_t; -typedef __darwin_mach_port_name_t = __darwin_natural_t; - final class CFRunLoopObserverContext extends ffi.Struct { @CFIndex() external int version; @@ -50271,8 +49683,6 @@ final class CFRunLoopObserverContext extends ffi.Struct { copyDescription; } -typedef CFRunLoopObserverCallBack - = ffi.Pointer>; typedef CFRunLoopObserverCallBackFunction = ffi.Void Function( CFRunLoopObserverRef observer, CFOptionFlags activity, @@ -50281,31 +49691,8 @@ typedef DartCFRunLoopObserverCallBackFunction = void Function( CFRunLoopObserverRef observer, CFRunLoopActivity activity, ffi.Pointer info); - -enum CFRunLoopActivity { - kCFRunLoopEntry(1), - kCFRunLoopBeforeTimers(2), - kCFRunLoopBeforeSources(4), - kCFRunLoopBeforeWaiting(32), - kCFRunLoopAfterWaiting(64), - kCFRunLoopExit(128), - kCFRunLoopAllActivities(268435455); - - final int value; - const CFRunLoopActivity(this.value); - - static CFRunLoopActivity fromValue(int value) => switch (value) { - 1 => kCFRunLoopEntry, - 2 => kCFRunLoopBeforeTimers, - 4 => kCFRunLoopBeforeSources, - 32 => kCFRunLoopBeforeWaiting, - 64 => kCFRunLoopAfterWaiting, - 128 => kCFRunLoopExit, - 268435455 => kCFRunLoopAllActivities, - _ => throw ArgumentError("Unknown value for CFRunLoopActivity: $value"), - }; -} - +typedef CFRunLoopObserverCallBack + = ffi.Pointer>; void _ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity_fnPtrTrampoline( ffi.Pointer block, CFRunLoopObserverRef arg0, @@ -50421,7 +49808,7 @@ abstract final class ObjCBlock_ffiVoid_CFRunLoopObserverRef_CFRunLoopActivity { .cast(), (CFRunLoopObserverRef arg0, int arg1) => fn(arg0, CFRunLoopActivity.fromValue(arg1))); - final wrapper = _wrapListenerBlock_ttt6u1(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_tg5tbv(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function(ffi.Pointer<__CFRunLoopObserver>, @@ -50463,12 +49850,12 @@ final class CFRunLoopTimerContext extends ffi.Struct { copyDescription; } -typedef CFRunLoopTimerCallBack - = ffi.Pointer>; typedef CFRunLoopTimerCallBackFunction = ffi.Void Function( CFRunLoopTimerRef timer, ffi.Pointer info); typedef DartCFRunLoopTimerCallBackFunction = void Function( CFRunLoopTimerRef timer, ffi.Pointer info); +typedef CFRunLoopTimerCallBack + = ffi.Pointer>; void _ObjCBlock_ffiVoid_CFRunLoopTimerRef_fnPtrTrampoline( ffi.Pointer block, CFRunLoopTimerRef arg0) => block.ref.target @@ -50558,7 +49945,7 @@ abstract final class ObjCBlock_ffiVoid_CFRunLoopTimerRef { _ObjCBlock_ffiVoid_CFRunLoopTimerRef_listenerCallable.nativeFunction .cast(), (CFRunLoopTimerRef arg0) => fn(arg0)); - final wrapper = _wrapListenerBlock_1txhfzs(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1dqvvol(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock)>( wrapper, @@ -50582,6 +49969,24 @@ extension ObjCBlock_ffiVoid_CFRunLoopTimerRef_CallExtension final class __CFSocket extends ffi.Opaque {} +typedef CFSocketRef = ffi.Pointer<__CFSocket>; + +enum CFSocketError { + kCFSocketSuccess(0), + kCFSocketError(-1), + kCFSocketTimeout(-2); + + final int value; + const CFSocketError(this.value); + + static CFSocketError fromValue(int value) => switch (value) { + 0 => kCFSocketSuccess, + -1 => kCFSocketError, + -2 => kCFSocketTimeout, + _ => throw ArgumentError("Unknown value for CFSocketError: $value"), + }; +} + final class CFSocketSignature extends ffi.Struct { @SInt32() external int protocolFamily; @@ -50595,41 +50000,6 @@ final class CFSocketSignature extends ffi.Struct { external CFDataRef address; } -final class CFSocketContext extends ffi.Struct { - @CFIndex() - external int version; - - external ffi.Pointer info; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>> retain; - - external ffi.Pointer< - ffi.NativeFunction info)>> - release; - - external ffi.Pointer< - ffi.NativeFunction info)>> - copyDescription; -} - -typedef CFSocketRef = ffi.Pointer<__CFSocket>; -typedef CFSocketCallBack - = ffi.Pointer>; -typedef CFSocketCallBackFunction = ffi.Void Function( - CFSocketRef s, - CFOptionFlags type, - CFDataRef address, - ffi.Pointer data, - ffi.Pointer info); -typedef DartCFSocketCallBackFunction = void Function( - CFSocketRef s, - CFSocketCallBackType type, - CFDataRef address, - ffi.Pointer data, - ffi.Pointer info); - enum CFSocketCallBackType { kCFSocketNoCallBack(0), kCFSocketReadCallBack(1), @@ -50653,25 +50023,43 @@ enum CFSocketCallBackType { }; } -typedef CFSocketNativeHandle = ffi.Int; -typedef DartCFSocketNativeHandle = int; +typedef CFSocketCallBackFunction = ffi.Void Function( + CFSocketRef s, + CFOptionFlags type, + CFDataRef address, + ffi.Pointer data, + ffi.Pointer info); +typedef DartCFSocketCallBackFunction = void Function( + CFSocketRef s, + CFSocketCallBackType type, + CFDataRef address, + ffi.Pointer data, + ffi.Pointer info); +typedef CFSocketCallBack + = ffi.Pointer>; -enum CFSocketError { - kCFSocketSuccess(0), - kCFSocketError(-1), - kCFSocketTimeout(-2); +final class CFSocketContext extends ffi.Struct { + @CFIndex() + external int version; - final int value; - const CFSocketError(this.value); + external ffi.Pointer info; - static CFSocketError fromValue(int value) => switch (value) { - 0 => kCFSocketSuccess, - -1 => kCFSocketError, - -2 => kCFSocketTimeout, - _ => throw ArgumentError("Unknown value for CFSocketError: $value"), - }; + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; + + external ffi.Pointer< + ffi.NativeFunction info)>> + release; + + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; } +typedef CFSocketNativeHandle = ffi.Int; +typedef DartCFSocketNativeHandle = int; + final class accessx_descriptor extends ffi.Struct { @ffi.UnsignedInt() external int ad_name_offset; @@ -50683,11 +50071,6 @@ final class accessx_descriptor extends ffi.Struct { external ffi.Array ad_pad; } -typedef gid_t = __darwin_gid_t; -typedef __darwin_gid_t = __uint32_t; -typedef useconds_t = __darwin_useconds_t; -typedef __darwin_useconds_t = __uint32_t; - final class fssearchblock extends ffi.Opaque {} final class searchstate extends ffi.Opaque {} @@ -50742,6 +50125,8 @@ final class fsignatures extends ffi.Struct { external int fs_hash_type; } +typedef fsignatures_t = fsignatures; + final class fsupplement extends ffi.Struct { @off_t() external int fs_file_start; @@ -50756,6 +50141,8 @@ final class fsupplement extends ffi.Struct { external int fs_orig_fd; } +typedef fsupplement_t = fsupplement; + final class fchecklv extends ffi.Struct { @off_t() external int lv_file_start; @@ -50766,6 +50153,8 @@ final class fchecklv extends ffi.Struct { external ffi.Pointer lv_error_message; } +typedef fchecklv_t = fchecklv; + final class fgetsigsinfo extends ffi.Struct { @off_t() external int fg_file_start; @@ -50777,6 +50166,8 @@ final class fgetsigsinfo extends ffi.Struct { external int fg_sig_is_platform; } +typedef fgetsigsinfo_t = fgetsigsinfo; + final class fstore extends ffi.Struct { @ffi.UnsignedInt() external int fst_flags; @@ -50794,6 +50185,8 @@ final class fstore extends ffi.Struct { external int fst_bytesalloc; } +typedef fstore_t = fstore; + final class fpunchhole extends ffi.Struct { @ffi.UnsignedInt() external int fp_flags; @@ -50808,6 +50201,8 @@ final class fpunchhole extends ffi.Struct { external int fp_length; } +typedef fpunchhole_t = fpunchhole; + final class ftrimactivefile extends ffi.Struct { @off_t() external int fta_offset; @@ -50816,6 +50211,8 @@ final class ftrimactivefile extends ffi.Struct { external int fta_length; } +typedef ftrimactivefile_t = ftrimactivefile; + final class fspecread extends ffi.Struct { @ffi.UnsignedInt() external int fsr_flags; @@ -50830,6 +50227,8 @@ final class fspecread extends ffi.Struct { external int fsr_length; } +typedef fspecread_t = fspecread; + final class fattributiontag extends ffi.Struct { @ffi.UnsignedInt() external int ft_flags; @@ -50841,6 +50240,8 @@ final class fattributiontag extends ffi.Struct { external ffi.Array ft_attribution_name; } +typedef fattributiontag_t = fattributiontag; + @ffi.Packed(4) final class log2phys extends ffi.Struct { @ffi.UnsignedInt() @@ -50908,9 +50309,9 @@ final class os_workgroup_join_token_opaque_s extends ffi.Struct { external ffi.Array opaque; } -typedef os_workgroup_t = ffi.Pointer; -typedef Dartos_workgroup_t = OS_os_workgroup; - +/// WARNING: OS_os_workgroup is a stub. To generate bindings for this class, include +/// OS_os_workgroup in your config's objc-interfaces list. +/// /// OS_os_workgroup class OS_os_workgroup extends OS_object { OS_os_workgroup._(ffi.Pointer pointer, @@ -50925,153 +50326,40 @@ class OS_os_workgroup extends OS_object { OS_os_workgroup.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [OS_os_workgroup]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_OS_os_workgroup); - } - - /// init - OS_os_workgroup init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return OS_os_workgroup.castFromPointer(_ret, retain: false, release: true); - } - - /// new - static OS_os_workgroup new1() { - final _ret = _objc_msgSend_1unuoxw(_class_OS_os_workgroup, _sel_new); - return OS_os_workgroup.castFromPointer(_ret, retain: false, release: true); - } - - /// allocWithZone: - static OS_os_workgroup allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( - _class_OS_os_workgroup, _sel_allocWithZone_, zone); - return OS_os_workgroup.castFromPointer(_ret, retain: false, release: true); - } - - /// alloc - static OS_os_workgroup alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_OS_os_workgroup, _sel_alloc); - return OS_os_workgroup.castFromPointer(_ret, retain: false, release: true); - } -} - -late final _class_OS_os_workgroup = objc.getClass("OS_os_workgroup"); - -/// OS_object -class OS_object extends objc.NSObject { - OS_object._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [OS_object] that points to the same underlying object as [other]. - OS_object.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [OS_object] that wraps the given raw object pointer. - OS_object.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [OS_object]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_OS_object); - } - - /// init - OS_object init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return OS_object.castFromPointer(_ret, retain: false, release: true); - } - - /// new - static OS_object new1() { - final _ret = _objc_msgSend_1unuoxw(_class_OS_object, _sel_new); - return OS_object.castFromPointer(_ret, retain: false, release: true); - } - - /// allocWithZone: - static OS_object allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_1b3ihd0(_class_OS_object, _sel_allocWithZone_, zone); - return OS_object.castFromPointer(_ret, retain: false, release: true); - } - - /// alloc - static OS_object alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_OS_object, _sel_alloc); - return OS_object.castFromPointer(_ret, retain: false, release: true); - } } -late final _class_OS_object = objc.getClass("OS_object"); +typedef os_workgroup_t = ffi.Pointer; +typedef Dartos_workgroup_t = OS_os_workgroup; +typedef os_workgroup_attr_s = os_workgroup_attr_opaque_s; +typedef os_workgroup_attr_t = ffi.Pointer; +typedef os_workgroup_join_token_s = os_workgroup_join_token_opaque_s; typedef os_workgroup_join_token_t = ffi.Pointer; -typedef os_workgroup_working_arena_destructor_t = ffi.Pointer< - ffi.NativeFunction>; +typedef os_workgroup_index = ffi.Uint32; +typedef Dartos_workgroup_index = int; typedef os_workgroup_working_arena_destructor_tFunction = ffi.Void Function( ffi.Pointer); typedef Dartos_workgroup_working_arena_destructor_tFunction = void Function( ffi.Pointer); -typedef os_workgroup_index = ffi.Uint32; -typedef Dartos_workgroup_index = int; +typedef os_workgroup_working_arena_destructor_t = ffi.Pointer< + ffi.NativeFunction>; final class os_workgroup_max_parallel_threads_attr_s extends ffi.Opaque {} +typedef os_workgroup_mpt_attr_s = os_workgroup_max_parallel_threads_attr_s; typedef os_workgroup_mpt_attr_t = ffi.Pointer; - -/// OS_os_workgroup_interval -abstract final class OS_os_workgroup_interval { - /// Builds an object that implements the OS_os_workgroup_interval protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_os_workgroup_interval protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_os_workgroup_interval = - objc.getProtocol("OS_os_workgroup_interval"); typedef os_workgroup_interval_t = ffi.Pointer; typedef Dartos_workgroup_interval_t = OS_os_workgroup; +typedef os_workgroup_interval_data_s = os_workgroup_interval_data_opaque_s; typedef os_workgroup_interval_data_t = ffi.Pointer; - -/// OS_os_workgroup_parallel -abstract final class OS_os_workgroup_parallel { - /// Builds an object that implements the OS_os_workgroup_parallel protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_os_workgroup_parallel protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_os_workgroup_parallel = - objc.getProtocol("OS_os_workgroup_parallel"); typedef os_workgroup_parallel_t = ffi.Pointer; typedef Dartos_workgroup_parallel_t = OS_os_workgroup; -typedef os_workgroup_attr_t = ffi.Pointer; +typedef dispatch_function_tFunction = ffi.Void Function(ffi.Pointer); +typedef Dartdispatch_function_tFunction = void Function(ffi.Pointer); +typedef dispatch_function_t + = ffi.Pointer>; final class time_value extends ffi.Struct { @integer_t() @@ -51081,8 +50369,18 @@ final class time_value extends ffi.Struct { external int microseconds; } -typedef integer_t = ffi.Int; -typedef Dartinteger_t = int; +typedef time_value_t = time_value; +typedef alarm_type_t = ffi.Int; +typedef Dartalarm_type_t = int; +typedef sleep_type_t = ffi.Int; +typedef Dartsleep_type_t = int; +typedef clock_id_t = ffi.Int; +typedef Dartclock_id_t = int; +typedef clock_flavor_t = ffi.Int; +typedef Dartclock_flavor_t = int; +typedef clock_attr_t = ffi.Pointer; +typedef clock_res_t = ffi.Int; +typedef Dartclock_res_t = int; final class mach_timespec extends ffi.Struct { @ffi.UnsignedInt() @@ -51092,8 +50390,7 @@ final class mach_timespec extends ffi.Struct { external int tv_nsec; } -typedef clock_res_t = ffi.Int; -typedef Dartclock_res_t = int; +typedef mach_timespec_t = mach_timespec; typedef dispatch_time_t = ffi.Uint64; typedef Dartdispatch_time_t = int; @@ -51119,154 +50416,22 @@ enum qos_class_t { }; } -/// OS_dispatch_object -abstract final class OS_dispatch_object { - /// Builds an object that implements the OS_dispatch_object protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_object protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_dispatch_object = - objc.getProtocol("OS_dispatch_object"); typedef dispatch_object_t = ffi.Pointer; typedef Dartdispatch_object_t = objc.NSObject; -typedef dispatch_function_t - = ffi.Pointer>; -typedef dispatch_function_tFunction = ffi.Void Function(ffi.Pointer); -typedef Dartdispatch_function_tFunction = void Function(ffi.Pointer); typedef dispatch_block_t = ffi.Pointer; typedef Dartdispatch_block_t = objc.ObjCBlock; - -/// OS_dispatch_queue -abstract final class OS_dispatch_queue { - /// Builds an object that implements the OS_dispatch_queue protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_queue protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_dispatch_queue = objc.getProtocol("OS_dispatch_queue"); - -/// OS_dispatch_queue_global -abstract final class OS_dispatch_queue_global { - /// Builds an object that implements the OS_dispatch_queue_global protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_queue_global protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_dispatch_queue_global = - objc.getProtocol("OS_dispatch_queue_global"); - -/// OS_dispatch_queue_serial_executor -abstract final class OS_dispatch_queue_serial_executor { - /// Builds an object that implements the OS_dispatch_queue_serial_executor protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_queue_serial_executor protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_dispatch_queue_serial_executor = - objc.getProtocol("OS_dispatch_queue_serial_executor"); - -/// OS_dispatch_queue_serial -abstract final class OS_dispatch_queue_serial { - /// Builds an object that implements the OS_dispatch_queue_serial protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_queue_serial protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_dispatch_queue_serial = - objc.getProtocol("OS_dispatch_queue_serial"); - -/// OS_dispatch_queue_main -abstract final class OS_dispatch_queue_main { - /// Builds an object that implements the OS_dispatch_queue_main protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_queue_main protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_dispatch_queue_main = - objc.getProtocol("OS_dispatch_queue_main"); - -/// OS_dispatch_queue_concurrent -abstract final class OS_dispatch_queue_concurrent { - /// Builds an object that implements the OS_dispatch_queue_concurrent protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_queue_concurrent protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_dispatch_queue_concurrent = - objc.getProtocol("OS_dispatch_queue_concurrent"); typedef dispatch_queue_t = ffi.Pointer; typedef Dartdispatch_queue_t = objc.NSObject; +typedef dispatch_queue_global_t = ffi.Pointer; +typedef Dartdispatch_queue_global_t = objc.NSObject; +typedef dispatch_queue_serial_executor_t = ffi.Pointer; +typedef Dartdispatch_queue_serial_executor_t = objc.NSObject; +typedef dispatch_queue_serial_t = ffi.Pointer; +typedef Dartdispatch_queue_serial_t = objc.NSObject; +typedef dispatch_queue_main_t = ffi.Pointer; +typedef Dartdispatch_queue_main_t = objc.NSObject; +typedef dispatch_queue_concurrent_t = ffi.Pointer; +typedef Dartdispatch_queue_concurrent_t = objc.NSObject; void _ObjCBlock_ffiVoid_ffiSize_fnPtrTrampoline( ffi.Pointer block, int arg0) => block.ref.target @@ -51348,7 +50513,7 @@ abstract final class ObjCBlock_ffiVoid_ffiSize { final raw = objc.newClosureBlock( _ObjCBlock_ffiVoid_ffiSize_listenerCallable.nativeFunction.cast(), (int arg0) => fn(arg0)); - final wrapper = _wrapListenerBlock_1hmngv6(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_6enxqz(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock(wrapper, retain: false, release: true); @@ -51369,34 +50534,13 @@ extension ObjCBlock_ffiVoid_ffiSize_CallExtension final class dispatch_queue_s extends ffi.Opaque {} -typedef dispatch_queue_global_t = ffi.Pointer; -typedef Dartdispatch_queue_global_t = objc.NSObject; - -/// OS_dispatch_queue_attr -abstract final class OS_dispatch_queue_attr { - /// Builds an object that implements the OS_dispatch_queue_attr protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_queue_attr protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_dispatch_queue_attr = - objc.getProtocol("OS_dispatch_queue_attr"); - -final class dispatch_queue_attr_s extends ffi.Opaque {} - +typedef dispatch_queue_priority_t = ffi.Long; +typedef Dartdispatch_queue_priority_t = int; typedef dispatch_queue_attr_t = ffi.Pointer; typedef Dartdispatch_queue_attr_t = objc.NSObject; +final class dispatch_queue_attr_s extends ffi.Opaque {} + enum dispatch_autorelease_frequency_t { DISPATCH_AUTORELEASE_FREQUENCY_INHERIT(0), DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM(1), @@ -51438,6 +50582,24 @@ enum dispatch_block_flags_t { }; } +typedef kern_return_t = ffi.Int; +typedef Dartkern_return_t = int; +typedef mach_msg_timeout_t = natural_t; +typedef mach_msg_bits_t = ffi.UnsignedInt; +typedef Dartmach_msg_bits_t = int; +typedef mach_msg_size_t = natural_t; +typedef mach_msg_id_t = integer_t; +typedef mach_msg_priority_t = ffi.UnsignedInt; +typedef Dartmach_msg_priority_t = int; +typedef mach_msg_type_name_t = ffi.UnsignedInt; +typedef Dartmach_msg_type_name_t = int; +typedef mach_msg_copy_options_t = ffi.UnsignedInt; +typedef Dartmach_msg_copy_options_t = int; +typedef mach_msg_guard_flags_t = ffi.UnsignedInt; +typedef Dartmach_msg_guard_flags_t = int; +typedef mach_msg_descriptor_type_t = ffi.UnsignedInt; +typedef Dartmach_msg_descriptor_type_t = int; + final class mach_msg_type_descriptor_t extends ffi.Opaque {} final class mach_msg_port_descriptor_t extends ffi.Opaque {} @@ -51467,8 +50629,6 @@ final class mach_msg_body_t extends ffi.Struct { external int msgh_descriptor_count; } -typedef mach_msg_size_t = natural_t; - final class mach_msg_header_t extends ffi.Struct { @mach_msg_bits_t() external int msgh_bits; @@ -51489,16 +50649,18 @@ final class mach_msg_header_t extends ffi.Struct { external int msgh_id; } -typedef mach_msg_bits_t = ffi.UnsignedInt; -typedef Dartmach_msg_bits_t = int; -typedef mach_msg_id_t = integer_t; - final class mach_msg_base_t extends ffi.Struct { external mach_msg_header_t header; external mach_msg_body_t body; } +typedef mach_msg_trailer_type_t = ffi.UnsignedInt; +typedef Dartmach_msg_trailer_type_t = int; +typedef mach_msg_trailer_size_t = ffi.UnsignedInt; +typedef Dartmach_msg_trailer_size_t = int; +typedef mach_msg_trailer_info_t = ffi.Pointer; + final class mach_msg_trailer_t extends ffi.Struct { @mach_msg_trailer_type_t() external int msgh_trailer_type; @@ -51507,11 +50669,6 @@ final class mach_msg_trailer_t extends ffi.Struct { external int msgh_trailer_size; } -typedef mach_msg_trailer_type_t = ffi.UnsignedInt; -typedef Dartmach_msg_trailer_type_t = int; -typedef mach_msg_trailer_size_t = ffi.UnsignedInt; -typedef Dartmach_msg_trailer_size_t = int; - final class mach_msg_seqno_trailer_t extends ffi.Struct { @mach_msg_trailer_type_t() external int msgh_trailer_type; @@ -51580,15 +50737,14 @@ final class mach_msg_context_trailer_t extends ffi.Struct { external int msgh_context; } -typedef mach_port_context_t = vm_offset_t; -typedef vm_offset_t = ffi.UintPtr; -typedef Dartvm_offset_t = int; - final class msg_labels_t extends ffi.Struct { @mach_port_name_t() external int sender; } +typedef mach_msg_filter_id = ffi.Int; +typedef Dartmach_msg_filter_id = int; + @ffi.Packed(4) final class mach_msg_mac_trailer_t extends ffi.Struct { @mach_msg_trailer_type_t() @@ -51613,8 +50769,9 @@ final class mach_msg_mac_trailer_t extends ffi.Struct { external msg_labels_t msgh_labels; } -typedef mach_msg_filter_id = ffi.Int; -typedef Dartmach_msg_filter_id = int; +typedef mach_msg_max_trailer_t = mach_msg_mac_trailer_t; +typedef mach_msg_format_0_trailer_t = mach_msg_security_trailer_t; +typedef mach_msg_options_t = integer_t; final class mach_msg_empty_send_t extends ffi.Struct { external mach_msg_header_t header; @@ -51632,110 +50789,39 @@ final class mach_msg_empty_t extends ffi.Union { external mach_msg_empty_rcv_t rcv; } -typedef mach_msg_return_t = kern_return_t; -typedef kern_return_t = ffi.Int; -typedef Dartkern_return_t = int; +typedef mach_msg_type_size_t = natural_t; +typedef mach_msg_type_number_t = natural_t; typedef mach_msg_option_t = integer_t; -typedef mach_msg_timeout_t = natural_t; - -/// OS_dispatch_source -abstract final class OS_dispatch_source { - /// Builds an object that implements the OS_dispatch_source protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_source protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_dispatch_source = - objc.getProtocol("OS_dispatch_source"); - -final class dispatch_source_type_s extends ffi.Opaque {} - +typedef mach_msg_return_t = kern_return_t; typedef dispatch_source_t = ffi.Pointer; typedef Dartdispatch_source_t = objc.NSObject; -typedef dispatch_source_type_t = ffi.Pointer; - -/// OS_dispatch_group -abstract final class OS_dispatch_group { - /// Builds an object that implements the OS_dispatch_group protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_group protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} +final class dispatch_source_type_s extends ffi.Opaque {} -late final _protocol_OS_dispatch_group = objc.getProtocol("OS_dispatch_group"); +typedef dispatch_source_type_t = ffi.Pointer; +typedef dispatch_source_mach_send_flags_t = ffi.UnsignedLong; +typedef Dartdispatch_source_mach_send_flags_t = int; +typedef dispatch_source_mach_recv_flags_t = ffi.UnsignedLong; +typedef Dartdispatch_source_mach_recv_flags_t = int; +typedef dispatch_source_memorypressure_flags_t = ffi.UnsignedLong; +typedef Dartdispatch_source_memorypressure_flags_t = int; +typedef dispatch_source_proc_flags_t = ffi.UnsignedLong; +typedef Dartdispatch_source_proc_flags_t = int; +typedef dispatch_source_vnode_flags_t = ffi.UnsignedLong; +typedef Dartdispatch_source_vnode_flags_t = int; +typedef dispatch_source_timer_flags_t = ffi.UnsignedLong; +typedef Dartdispatch_source_timer_flags_t = int; typedef dispatch_group_t = ffi.Pointer; typedef Dartdispatch_group_t = objc.NSObject; - -/// OS_dispatch_semaphore -abstract final class OS_dispatch_semaphore { - /// Builds an object that implements the OS_dispatch_semaphore protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_semaphore protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_dispatch_semaphore = - objc.getProtocol("OS_dispatch_semaphore"); typedef dispatch_semaphore_t = ffi.Pointer; typedef Dartdispatch_semaphore_t = objc.NSObject; typedef dispatch_once_t = ffi.IntPtr; typedef Dartdispatch_once_t = int; - -/// OS_dispatch_data -abstract final class OS_dispatch_data { - /// Builds an object that implements the OS_dispatch_data protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_data protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_dispatch_data = objc.getProtocol("OS_dispatch_data"); +typedef dispatch_data_t = ffi.Pointer; +typedef Dartdispatch_data_t = objc.NSObject; final class dispatch_data_s extends ffi.Opaque {} -typedef dispatch_data_t = ffi.Pointer; -typedef Dartdispatch_data_t = objc.NSObject; -typedef dispatch_data_applier_t = ffi.Pointer; -typedef Dartdispatch_data_applier_t = objc.ObjCBlock< - ffi.Bool Function( - objc.NSObject, ffi.Size, ffi.Pointer, ffi.Size)>; bool _ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_fnPtrTrampoline( ffi.Pointer block, dispatch_data_t arg0, @@ -51855,6 +50941,10 @@ extension ObjCBlock_bool_dispatchdatat_ffiSize_ffiVoid_ffiSize_CallExtension int)>()(ref.pointer, arg0.ref.pointer, arg1, arg2, arg3); } +typedef dispatch_data_applier_t = ffi.Pointer; +typedef Dartdispatch_data_applier_t = objc.ObjCBlock< + ffi.Bool Function( + objc.NSObject, ffi.Size, ffi.Pointer, ffi.Size)>; typedef dispatch_fd_t = ffi.Int; typedef Dartdispatch_fd_t = int; void _ObjCBlock_ffiVoid_dispatchdatat_ffiInt_fnPtrTrampoline( @@ -51960,7 +51050,7 @@ abstract final class ObjCBlock_ffiVoid_dispatchdatat_ffiInt { (dispatch_data_t arg0, int arg1) => fn( objc.NSObject.castFromPointer(arg0, retain: false, release: true), arg1)); - final wrapper = _wrapListenerBlock_108ugvk(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_qxvyq2(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock(wrapper, retain: false, release: true); @@ -51980,24 +51070,134 @@ extension ObjCBlock_ffiVoid_dispatchdatat_ffiInt_CallExtension int)>()(ref.pointer, arg0.ref.pointer, arg1); } -/// OS_dispatch_io -abstract final class OS_dispatch_io { - /// Builds an object that implements the OS_dispatch_io protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); +void _ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_fnPtrTrampoline( + ffi.Pointer block, + dispatch_data_t arg0, + int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(dispatch_data_t arg0, ffi.Int arg1)>>() + .asFunction()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, dispatch_data_t, ffi.Int)>( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_closureTrampoline( + ffi.Pointer block, + dispatch_data_t arg0, + int arg1) => + (objc.getBlockClosure(block) as void Function(dispatch_data_t, int))( + arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, dispatch_data_t, ffi.Int)>( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_listenerTrampoline( + ffi.Pointer block, dispatch_data_t arg0, int arg1) { + (objc.getBlockClosure(block) as void Function(dispatch_data_t, int))( + arg0, arg1); + objc.objectRelease(block.cast()); +} - return builder.build(); +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, dispatch_data_t, ffi.Int)> + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_listenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, dispatch_data_t, + ffi.Int)>.listener( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_dispatchdatat_ffiInt1 { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(objc.NSObject?, ffi.Int)> fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(Dartdispatch_data_t?, int) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_closureCallable, + (dispatch_data_t arg0, int arg1) => fn( + arg0.address == 0 + ? null + : objc.NSObject.castFromPointer(arg0, + retain: true, release: true), + arg1)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(Dartdispatch_data_t?, int) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_listenerCallable.nativeFunction + .cast(), + (dispatch_data_t arg0, int arg1) => fn( + arg0.address == 0 + ? null + : objc.NSObject.castFromPointer(arg0, + retain: false, release: true), + arg1)); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_qxvyq2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } +} - /// Adds the implementation of the OS_dispatch_io protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_dispatchdatat_ffiInt1_CallExtension + on objc.ObjCBlock { + void call(Dartdispatch_data_t? arg0, int arg1) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + dispatch_data_t arg0, ffi.Int arg1)>>() + .asFunction< + void Function(ffi.Pointer, dispatch_data_t, + int)>()(ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1); } -late final _protocol_OS_dispatch_io = objc.getProtocol("OS_dispatch_io"); typedef dispatch_io_t = ffi.Pointer; typedef Dartdispatch_io_t = objc.NSObject; typedef dispatch_io_type_t = ffi.UnsignedLong; @@ -52083,7 +51283,7 @@ abstract final class ObjCBlock_ffiVoid_ffiInt { final raw = objc.newClosureBlock( _ObjCBlock_ffiVoid_ffiInt_listenerCallable.nativeFunction.cast(), (int arg0) => fn(arg0)); - final wrapper = _wrapListenerBlock_1afulej(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_9o8504(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock(wrapper, retain: false, release: true); @@ -52102,9 +51302,6 @@ extension ObjCBlock_ffiVoid_ffiInt_CallExtension ref.pointer, arg0); } -typedef dispatch_io_handler_t = ffi.Pointer; -typedef Dartdispatch_io_handler_t - = objc.ObjCBlock; void _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_fnPtrTrampoline( ffi.Pointer block, bool arg0, @@ -52158,13 +51355,13 @@ ffi.NativeCallable< _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_listenerTrampoline) ..keepIsolateAlive = false; -/// Construction methods for `objc.ObjCBlock`. +/// Construction methods for `objc.ObjCBlock`. abstract final class ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock + static objc.ObjCBlock castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => - objc.ObjCBlock( + objc.ObjCBlock( pointer, retain: retain, release: release); @@ -52175,10 +51372,10 @@ abstract final class ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt { /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(ffi.Bool, objc.NSObject, ffi.Int)> fromFunctionPointer( + ffi.Void Function(ffi.Bool, objc.NSObject?, ffi.Int)> fromFunctionPointer( ffi.Pointer> ptr) => - objc.ObjCBlock( + objc.ObjCBlock( objc.newPointerBlock( _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_fnPtrCallable, ptr.cast()), @@ -52190,15 +51387,16 @@ abstract final class ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock - fromFunction(void Function(bool, Dartdispatch_data_t, int) fn) => - objc.ObjCBlock( + static objc.ObjCBlock + fromFunction(void Function(bool, Dartdispatch_data_t?, int) fn) => + objc.ObjCBlock( objc.newClosureBlock( _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_closureCallable, (bool arg0, dispatch_data_t arg1, int arg2) => fn( arg0, - objc.NSObject.castFromPointer(arg1, - retain: true, release: true), + arg1.address == 0 + ? null + : objc.NSObject.castFromPointer(arg1, retain: true, release: true), arg2)), retain: false, release: true); @@ -52212,63 +51410,50 @@ abstract final class ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock - listener(void Function(bool, Dartdispatch_data_t, int) fn) { + static objc.ObjCBlock + listener(void Function(bool, Dartdispatch_data_t?, int) fn) { final raw = objc.newClosureBlock( _ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_listenerCallable .nativeFunction .cast(), (bool arg0, dispatch_data_t arg1, int arg2) => fn( arg0, - objc.NSObject.castFromPointer(arg1, retain: false, release: true), + arg1.address == 0 + ? null + : objc.NSObject.castFromPointer(arg1, + retain: false, release: true), arg2)); - final wrapper = _wrapListenerBlock_elldw5(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_12a4qua(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock( + return objc.ObjCBlock( wrapper, retain: false, release: true); } } -/// Call operator for `objc.ObjCBlock`. +/// Call operator for `objc.ObjCBlock`. extension ObjCBlock_ffiVoid_bool_dispatchdatat_ffiInt_CallExtension - on objc.ObjCBlock { - void call(bool arg0, Dartdispatch_data_t arg1, int arg2) => ref - .pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() - .asFunction< - void Function(ffi.Pointer, bool, dispatch_data_t, - int)>()(ref.pointer, arg0, arg1.ref.pointer, arg2); + on objc.ObjCBlock { + void call(bool arg0, Dartdispatch_data_t? arg1, int arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Bool arg0, dispatch_data_t arg1, ffi.Int arg2)>>() + .asFunction< + void Function(ffi.Pointer, bool, + dispatch_data_t, int)>()( + ref.pointer, arg0, arg1?.ref.pointer ?? ffi.nullptr, arg2); } +typedef dispatch_io_handler_t = ffi.Pointer; +typedef Dartdispatch_io_handler_t + = objc.ObjCBlock; typedef dispatch_io_close_flags_t = ffi.UnsignedLong; typedef Dartdispatch_io_close_flags_t = int; typedef dispatch_io_interval_flags_t = ffi.UnsignedLong; typedef Dartdispatch_io_interval_flags_t = int; - -/// OS_dispatch_workloop -abstract final class OS_dispatch_workloop { - /// Builds an object that implements the OS_dispatch_workloop protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_dispatch_workloop protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_dispatch_workloop = - objc.getProtocol("OS_dispatch_workloop"); typedef dispatch_workloop_t = ffi.Pointer; typedef Dartdispatch_workloop_t = objc.NSObject; @@ -52280,32 +51465,7 @@ final class CFStreamError extends ffi.Struct { external int error; } -final class CFStreamClientContext extends ffi.Struct { - @CFIndex() - external int version; - - external ffi.Pointer info; - - external ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer info)>> retain; - - external ffi.Pointer< - ffi.NativeFunction info)>> - release; - - external ffi.Pointer< - ffi.NativeFunction info)>> - copyDescription; -} - -final class __CFReadStream extends ffi.Opaque {} - -final class __CFWriteStream extends ffi.Opaque {} - typedef CFStreamPropertyKey = CFStringRef; -typedef CFReadStreamRef = ffi.Pointer<__CFReadStream>; -typedef CFWriteStreamRef = ffi.Pointer<__CFWriteStream>; enum CFStreamStatus { kCFStreamStatusNotOpen(0), @@ -52333,17 +51493,6 @@ enum CFStreamStatus { }; } -typedef CFReadStreamClientCallBack - = ffi.Pointer>; -typedef CFReadStreamClientCallBackFunction = ffi.Void Function( - CFReadStreamRef stream, - CFOptionFlags type, - ffi.Pointer clientCallBackInfo); -typedef DartCFReadStreamClientCallBackFunction = void Function( - CFReadStreamRef stream, - CFStreamEventType type, - ffi.Pointer clientCallBackInfo); - enum CFStreamEventType { kCFStreamEventNone(0), kCFStreamEventOpenCompleted(1), @@ -52366,8 +51515,42 @@ enum CFStreamEventType { }; } -typedef CFWriteStreamClientCallBack - = ffi.Pointer>; +final class CFStreamClientContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer info)>> retain; + + external ffi.Pointer< + ffi.NativeFunction info)>> + release; + + external ffi.Pointer< + ffi.NativeFunction info)>> + copyDescription; +} + +final class __CFReadStream extends ffi.Opaque {} + +typedef CFReadStreamRef = ffi.Pointer<__CFReadStream>; + +final class __CFWriteStream extends ffi.Opaque {} + +typedef CFWriteStreamRef = ffi.Pointer<__CFWriteStream>; +typedef CFReadStreamClientCallBackFunction = ffi.Void Function( + CFReadStreamRef stream, + CFOptionFlags type, + ffi.Pointer clientCallBackInfo); +typedef DartCFReadStreamClientCallBackFunction = void Function( + CFReadStreamRef stream, + CFStreamEventType type, + ffi.Pointer clientCallBackInfo); +typedef CFReadStreamClientCallBack + = ffi.Pointer>; typedef CFWriteStreamClientCallBackFunction = ffi.Void Function( CFWriteStreamRef stream, CFOptionFlags type, @@ -52376,6 +51559,8 @@ typedef DartCFWriteStreamClientCallBackFunction = void Function( CFWriteStreamRef stream, CFStreamEventType type, ffi.Pointer clientCallBackInfo); +typedef CFWriteStreamClientCallBack + = ffi.Pointer>; enum CFPropertyListFormat { kCFPropertyListOpenStepFormat(1), @@ -52394,58 +51579,73 @@ enum CFPropertyListFormat { }; } -final class CFSetCallBacks extends ffi.Struct { - @CFIndex() - external int version; - - external CFSetRetainCallBack retain; - - external CFSetReleaseCallBack release; - - external CFSetCopyDescriptionCallBack copyDescription; - - external CFSetEqualCallBack equal; - - external CFSetHashCallBack hash; -} - -typedef CFSetRetainCallBack - = ffi.Pointer>; typedef CFSetRetainCallBackFunction = ffi.Pointer Function( CFAllocatorRef allocator, ffi.Pointer value); -typedef CFSetReleaseCallBack - = ffi.Pointer>; +typedef CFSetRetainCallBack + = ffi.Pointer>; typedef CFSetReleaseCallBackFunction = ffi.Void Function( CFAllocatorRef allocator, ffi.Pointer value); typedef DartCFSetReleaseCallBackFunction = void Function( CFAllocatorRef allocator, ffi.Pointer value); -typedef CFSetCopyDescriptionCallBack - = ffi.Pointer>; +typedef CFSetReleaseCallBack + = ffi.Pointer>; typedef CFSetCopyDescriptionCallBackFunction = CFStringRef Function( ffi.Pointer value); -typedef CFSetEqualCallBack - = ffi.Pointer>; +typedef CFSetCopyDescriptionCallBack + = ffi.Pointer>; typedef CFSetEqualCallBackFunction = Boolean Function( ffi.Pointer value1, ffi.Pointer value2); typedef DartCFSetEqualCallBackFunction = DartBoolean Function( ffi.Pointer value1, ffi.Pointer value2); -typedef CFSetHashCallBack - = ffi.Pointer>; +typedef CFSetEqualCallBack + = ffi.Pointer>; typedef CFSetHashCallBackFunction = CFHashCode Function( ffi.Pointer value); typedef DartCFSetHashCallBackFunction = DartCFHashCode Function( ffi.Pointer value); +typedef CFSetHashCallBack + = ffi.Pointer>; -final class __CFSet extends ffi.Opaque {} +final class CFSetCallBacks extends ffi.Struct { + @CFIndex() + external int version; + + external CFSetRetainCallBack retain; + + external CFSetReleaseCallBack release; + + external CFSetCopyDescriptionCallBack copyDescription; + + external CFSetEqualCallBack equal; + + external CFSetHashCallBack hash; +} -typedef CFSetRef = ffi.Pointer<__CFSet>; -typedef CFMutableSetRef = ffi.Pointer<__CFSet>; -typedef CFSetApplierFunction - = ffi.Pointer>; typedef CFSetApplierFunctionFunction = ffi.Void Function( ffi.Pointer value, ffi.Pointer context); typedef DartCFSetApplierFunctionFunction = void Function( ffi.Pointer value, ffi.Pointer context); +typedef CFSetApplierFunction + = ffi.Pointer>; + +final class __CFSet extends ffi.Opaque {} + +typedef CFSetRef = ffi.Pointer<__CFSet>; +typedef CFMutableSetRef = ffi.Pointer<__CFSet>; +typedef CFTreeRetainCallBackFunction = ffi.Pointer Function( + ffi.Pointer info); +typedef CFTreeRetainCallBack + = ffi.Pointer>; +typedef CFTreeReleaseCallBackFunction = ffi.Void Function( + ffi.Pointer info); +typedef DartCFTreeReleaseCallBackFunction = void Function( + ffi.Pointer info); +typedef CFTreeReleaseCallBack + = ffi.Pointer>; +typedef CFTreeCopyDescriptionCallBackFunction = CFStringRef Function( + ffi.Pointer info); +typedef CFTreeCopyDescriptionCallBack + = ffi.Pointer>; final class CFTreeContext extends ffi.Struct { @CFIndex() @@ -52460,33 +51660,21 @@ final class CFTreeContext extends ffi.Struct { external CFTreeCopyDescriptionCallBack copyDescription; } -typedef CFTreeRetainCallBack - = ffi.Pointer>; -typedef CFTreeRetainCallBackFunction = ffi.Pointer Function( - ffi.Pointer info); -typedef CFTreeReleaseCallBack - = ffi.Pointer>; -typedef CFTreeReleaseCallBackFunction = ffi.Void Function( - ffi.Pointer info); -typedef DartCFTreeReleaseCallBackFunction = void Function( - ffi.Pointer info); -typedef CFTreeCopyDescriptionCallBack - = ffi.Pointer>; -typedef CFTreeCopyDescriptionCallBackFunction = CFStringRef Function( - ffi.Pointer info); - -final class __CFTree extends ffi.Opaque {} - -typedef CFTreeRef = ffi.Pointer<__CFTree>; -typedef CFTreeApplierFunction - = ffi.Pointer>; typedef CFTreeApplierFunctionFunction = ffi.Void Function( ffi.Pointer value, ffi.Pointer context); typedef DartCFTreeApplierFunctionFunction = void Function( ffi.Pointer value, ffi.Pointer context); +typedef CFTreeApplierFunction + = ffi.Pointer>; + +final class __CFTree extends ffi.Opaque {} + +typedef CFTreeRef = ffi.Pointer<__CFTree>; final class __CFUUID extends ffi.Opaque {} +typedef CFUUIDRef = ffi.Pointer<__CFUUID>; + final class CFUUIDBytes extends ffi.Struct { @UInt8() external int byte0; @@ -52537,18 +51725,21 @@ final class CFUUIDBytes extends ffi.Struct { external int byte15; } -typedef CFUUIDRef = ffi.Pointer<__CFUUID>; +typedef cpu_type_t = integer_t; +typedef cpu_subtype_t = integer_t; +typedef cpu_threadtype_t = integer_t; final class __CFBundle extends ffi.Opaque {} typedef CFBundleRef = ffi.Pointer<__CFBundle>; -typedef cpu_type_t = integer_t; typedef CFPlugInRef = ffi.Pointer<__CFBundle>; typedef CFBundleRefNum = ffi.Int; typedef DartCFBundleRefNum = int; final class __CFMessagePort extends ffi.Opaque {} +typedef CFMessagePortRef = ffi.Pointer<__CFMessagePort>; + final class CFMessagePortContext extends ffi.Struct { @CFIndex() external int version; @@ -52568,9 +51759,6 @@ final class CFMessagePortContext extends ffi.Struct { copyDescription; } -typedef CFMessagePortRef = ffi.Pointer<__CFMessagePort>; -typedef CFMessagePortCallBack - = ffi.Pointer>; typedef CFMessagePortCallBackFunction = CFDataRef Function( CFMessagePortRef local, SInt32 msgid, @@ -52581,28 +51769,32 @@ typedef DartCFMessagePortCallBackFunction = CFDataRef Function( DartSInt32 msgid, CFDataRef data, ffi.Pointer info); -typedef CFMessagePortInvalidationCallBack = ffi - .Pointer>; +typedef CFMessagePortCallBack + = ffi.Pointer>; typedef CFMessagePortInvalidationCallBackFunction = ffi.Void Function( CFMessagePortRef ms, ffi.Pointer info); typedef DartCFMessagePortInvalidationCallBackFunction = void Function( CFMessagePortRef ms, ffi.Pointer info); -typedef CFPlugInFactoryFunction - = ffi.Pointer>; +typedef CFMessagePortInvalidationCallBack = ffi + .Pointer>; +typedef CFPlugInDynamicRegisterFunctionFunction = ffi.Void Function( + CFPlugInRef plugIn); +typedef DartCFPlugInDynamicRegisterFunctionFunction = void Function( + CFPlugInRef plugIn); +typedef CFPlugInDynamicRegisterFunction + = ffi.Pointer>; +typedef CFPlugInUnloadFunctionFunction = ffi.Void Function(CFPlugInRef plugIn); +typedef DartCFPlugInUnloadFunctionFunction = void Function(CFPlugInRef plugIn); +typedef CFPlugInUnloadFunction + = ffi.Pointer>; typedef CFPlugInFactoryFunctionFunction = ffi.Pointer Function( CFAllocatorRef allocator, CFUUIDRef typeUUID); +typedef CFPlugInFactoryFunction + = ffi.Pointer>; final class __CFPlugInInstance extends ffi.Opaque {} typedef CFPlugInInstanceRef = ffi.Pointer<__CFPlugInInstance>; -typedef CFPlugInInstanceDeallocateInstanceDataFunction = ffi.Pointer< - ffi.NativeFunction>; -typedef CFPlugInInstanceDeallocateInstanceDataFunctionFunction = ffi.Void - Function(ffi.Pointer instanceData); -typedef DartCFPlugInInstanceDeallocateInstanceDataFunctionFunction = void - Function(ffi.Pointer instanceData); -typedef CFPlugInInstanceGetInterfaceFunction = ffi - .Pointer>; typedef CFPlugInInstanceGetInterfaceFunctionFunction = Boolean Function( CFPlugInInstanceRef instance, CFStringRef interfaceName, @@ -52611,9 +51803,19 @@ typedef DartCFPlugInInstanceGetInterfaceFunctionFunction = DartBoolean Function( CFPlugInInstanceRef instance, CFStringRef interfaceName, ffi.Pointer> ftbl); +typedef CFPlugInInstanceGetInterfaceFunction = ffi + .Pointer>; +typedef CFPlugInInstanceDeallocateInstanceDataFunctionFunction = ffi.Void + Function(ffi.Pointer instanceData); +typedef DartCFPlugInInstanceDeallocateInstanceDataFunctionFunction = void + Function(ffi.Pointer instanceData); +typedef CFPlugInInstanceDeallocateInstanceDataFunction = ffi.Pointer< + ffi.NativeFunction>; final class __CFMachPort extends ffi.Opaque {} +typedef CFMachPortRef = ffi.Pointer<__CFMachPort>; + final class CFMachPortContext extends ffi.Struct { @CFIndex() external int version; @@ -52633,19 +51835,18 @@ final class CFMachPortContext extends ffi.Struct { copyDescription; } -typedef CFMachPortRef = ffi.Pointer<__CFMachPort>; -typedef CFMachPortCallBack - = ffi.Pointer>; typedef CFMachPortCallBackFunction = ffi.Void Function(CFMachPortRef port, ffi.Pointer msg, CFIndex size, ffi.Pointer info); typedef DartCFMachPortCallBackFunction = void Function(CFMachPortRef port, ffi.Pointer msg, DartCFIndex size, ffi.Pointer info); -typedef CFMachPortInvalidationCallBack - = ffi.Pointer>; +typedef CFMachPortCallBack + = ffi.Pointer>; typedef CFMachPortInvalidationCallBackFunction = ffi.Void Function( CFMachPortRef port, ffi.Pointer info); typedef DartCFMachPortInvalidationCallBackFunction = void Function( CFMachPortRef port, ffi.Pointer info); +typedef CFMachPortInvalidationCallBack + = ffi.Pointer>; final class __CFAttributedString extends ffi.Opaque {} @@ -52725,11 +51926,6 @@ final class ntsid_t extends ffi.Struct { external ffi.Array sid_authorities; } -typedef u_int8_t = ffi.UnsignedChar; -typedef Dartu_int8_t = int; -typedef u_int32_t = ffi.UnsignedInt; -typedef Dartu_int32_t = int; - final class kauth_identity_extlookup extends ffi.Struct { @u_int32_t() external int el_seqno; @@ -52785,9 +51981,6 @@ final class kauth_identity_extlookup extends ffi.Struct { external ffi.Array el_sup_groups; } -typedef u_int64_t = ffi.UnsignedLongLong; -typedef Dartu_int64_t = int; - final class kauth_cache_sizes extends ffi.Struct { @u_int32_t() external int kcs_group_size; @@ -52796,6 +51989,8 @@ final class kauth_cache_sizes extends ffi.Struct { external int kcs_id_size; } +typedef kauth_ace_rights_t = u_int32_t; + final class kauth_ace extends ffi.Struct { external guid_t ace_applicable; @@ -52806,7 +52001,7 @@ final class kauth_ace extends ffi.Struct { external int ace_rights; } -typedef kauth_ace_rights_t = u_int32_t; +typedef kauth_ace_t = ffi.Pointer; final class kauth_acl extends ffi.Struct { @u_int32_t() @@ -52819,6 +52014,8 @@ final class kauth_acl extends ffi.Struct { external ffi.Array acl_ace; } +typedef kauth_acl_t = ffi.Pointer; + final class kauth_filesec extends ffi.Struct { @u_int32_t() external int fsec_magic; @@ -52830,42 +52027,7 @@ final class kauth_filesec extends ffi.Struct { external kauth_acl fsec_acl; } -final class _acl extends ffi.Opaque {} - -final class _acl_entry extends ffi.Opaque {} - -final class _acl_permset extends ffi.Opaque {} - -final class _acl_flagset extends ffi.Opaque {} - -typedef acl_t = ffi.Pointer<_acl>; -typedef acl_entry_t = ffi.Pointer<_acl_entry>; - -enum acl_type_t { - ACL_TYPE_EXTENDED(256), - ACL_TYPE_ACCESS(0), - ACL_TYPE_DEFAULT(1), - ACL_TYPE_AFS(2), - ACL_TYPE_CODA(3), - ACL_TYPE_NTFS(4), - ACL_TYPE_NWFS(5); - - final int value; - const acl_type_t(this.value); - - static acl_type_t fromValue(int value) => switch (value) { - 256 => ACL_TYPE_EXTENDED, - 0 => ACL_TYPE_ACCESS, - 1 => ACL_TYPE_DEFAULT, - 2 => ACL_TYPE_AFS, - 3 => ACL_TYPE_CODA, - 4 => ACL_TYPE_NTFS, - 5 => ACL_TYPE_NWFS, - _ => throw ArgumentError("Unknown value for acl_type_t: $value"), - }; -} - -typedef acl_permset_t = ffi.Pointer<_acl_permset>; +typedef kauth_filesec_t = ffi.Pointer; enum acl_perm_t { ACL_READ_DATA(2), @@ -52923,8 +52085,45 @@ enum acl_perm_t { } } -typedef acl_permset_mask_t = u_int64_t; -typedef acl_flagset_t = ffi.Pointer<_acl_flagset>; +enum acl_tag_t { + ACL_UNDEFINED_TAG(0), + ACL_EXTENDED_ALLOW(1), + ACL_EXTENDED_DENY(2); + + final int value; + const acl_tag_t(this.value); + + static acl_tag_t fromValue(int value) => switch (value) { + 0 => ACL_UNDEFINED_TAG, + 1 => ACL_EXTENDED_ALLOW, + 2 => ACL_EXTENDED_DENY, + _ => throw ArgumentError("Unknown value for acl_tag_t: $value"), + }; +} + +enum acl_type_t { + ACL_TYPE_EXTENDED(256), + ACL_TYPE_ACCESS(0), + ACL_TYPE_DEFAULT(1), + ACL_TYPE_AFS(2), + ACL_TYPE_CODA(3), + ACL_TYPE_NTFS(4), + ACL_TYPE_NWFS(5); + + final int value; + const acl_type_t(this.value); + + static acl_type_t fromValue(int value) => switch (value) { + 256 => ACL_TYPE_EXTENDED, + 0 => ACL_TYPE_ACCESS, + 1 => ACL_TYPE_DEFAULT, + 2 => ACL_TYPE_AFS, + 3 => ACL_TYPE_CODA, + 4 => ACL_TYPE_NTFS, + 5 => ACL_TYPE_NWFS, + _ => throw ArgumentError("Unknown value for acl_type_t: $value"), + }; +} enum acl_flag_t { ACL_FLAG_DEFER_INHERIT(1), @@ -52950,21 +52149,19 @@ enum acl_flag_t { }; } -enum acl_tag_t { - ACL_UNDEFINED_TAG(0), - ACL_EXTENDED_ALLOW(1), - ACL_EXTENDED_DENY(2); +final class _acl extends ffi.Opaque {} - final int value; - const acl_tag_t(this.value); +final class _acl_entry extends ffi.Opaque {} - static acl_tag_t fromValue(int value) => switch (value) { - 0 => ACL_UNDEFINED_TAG, - 1 => ACL_EXTENDED_ALLOW, - 2 => ACL_EXTENDED_DENY, - _ => throw ArgumentError("Unknown value for acl_tag_t: $value"), - }; -} +final class _acl_permset extends ffi.Opaque {} + +final class _acl_flagset extends ffi.Opaque {} + +typedef acl_t = ffi.Pointer<_acl>; +typedef acl_entry_t = ffi.Pointer<_acl_entry>; +typedef acl_permset_t = ffi.Pointer<_acl_permset>; +typedef acl_flagset_t = ffi.Pointer<_acl_flagset>; +typedef acl_permset_mask_t = u_int64_t; final class __CFFileSecurity extends ffi.Opaque {} @@ -53022,8 +52219,23 @@ enum CFStringTokenizerTokenType { }; } +typedef CFFileDescriptorNativeDescriptor = ffi.Int; +typedef DartCFFileDescriptorNativeDescriptor = int; + final class __CFFileDescriptor extends ffi.Opaque {} +typedef CFFileDescriptorRef = ffi.Pointer<__CFFileDescriptor>; +typedef CFFileDescriptorCallBackFunction = ffi.Void Function( + CFFileDescriptorRef f, + CFOptionFlags callBackTypes, + ffi.Pointer info); +typedef DartCFFileDescriptorCallBackFunction = void Function( + CFFileDescriptorRef f, + DartCFOptionFlags callBackTypes, + ffi.Pointer info); +typedef CFFileDescriptorCallBack + = ffi.Pointer>; + final class CFFileDescriptorContext extends ffi.Struct { @CFIndex() external int version; @@ -53043,32 +52255,61 @@ final class CFFileDescriptorContext extends ffi.Struct { copyDescription; } -typedef CFFileDescriptorRef = ffi.Pointer<__CFFileDescriptor>; -typedef CFFileDescriptorNativeDescriptor = ffi.Int; -typedef DartCFFileDescriptorNativeDescriptor = int; -typedef CFFileDescriptorCallBack - = ffi.Pointer>; -typedef CFFileDescriptorCallBackFunction = ffi.Void Function( - CFFileDescriptorRef f, - CFOptionFlags callBackTypes, - ffi.Pointer info); -typedef DartCFFileDescriptorCallBackFunction = void Function( - CFFileDescriptorRef f, - DartCFOptionFlags callBackTypes, - ffi.Pointer info); - final class __CFUserNotification extends ffi.Opaque {} typedef CFUserNotificationRef = ffi.Pointer<__CFUserNotification>; -typedef CFUserNotificationCallBack - = ffi.Pointer>; typedef CFUserNotificationCallBackFunction = ffi.Void Function( CFUserNotificationRef userNotification, CFOptionFlags responseFlags); typedef DartCFUserNotificationCallBackFunction = void Function( CFUserNotificationRef userNotification, DartCFOptionFlags responseFlags); +typedef CFUserNotificationCallBack + = ffi.Pointer>; final class __CFXMLNode extends ffi.Opaque {} +typedef CFXMLNodeRef = ffi.Pointer<__CFXMLNode>; +typedef CFXMLTreeRef = CFTreeRef; + +enum CFXMLNodeTypeCode { + kCFXMLNodeTypeDocument(1), + kCFXMLNodeTypeElement(2), + kCFXMLNodeTypeAttribute(3), + kCFXMLNodeTypeProcessingInstruction(4), + kCFXMLNodeTypeComment(5), + kCFXMLNodeTypeText(6), + kCFXMLNodeTypeCDATASection(7), + kCFXMLNodeTypeDocumentFragment(8), + kCFXMLNodeTypeEntity(9), + kCFXMLNodeTypeEntityReference(10), + kCFXMLNodeTypeDocumentType(11), + kCFXMLNodeTypeWhitespace(12), + kCFXMLNodeTypeNotation(13), + kCFXMLNodeTypeElementTypeDeclaration(14), + kCFXMLNodeTypeAttributeListDeclaration(15); + + final int value; + const CFXMLNodeTypeCode(this.value); + + static CFXMLNodeTypeCode fromValue(int value) => switch (value) { + 1 => kCFXMLNodeTypeDocument, + 2 => kCFXMLNodeTypeElement, + 3 => kCFXMLNodeTypeAttribute, + 4 => kCFXMLNodeTypeProcessingInstruction, + 5 => kCFXMLNodeTypeComment, + 6 => kCFXMLNodeTypeText, + 7 => kCFXMLNodeTypeCDATASection, + 8 => kCFXMLNodeTypeDocumentFragment, + 9 => kCFXMLNodeTypeEntity, + 10 => kCFXMLNodeTypeEntityReference, + 11 => kCFXMLNodeTypeDocumentType, + 12 => kCFXMLNodeTypeWhitespace, + 13 => kCFXMLNodeTypeNotation, + 14 => kCFXMLNodeTypeElementTypeDeclaration, + 15 => kCFXMLNodeTypeAttributeListDeclaration, + _ => throw ArgumentError("Unknown value for CFXMLNodeTypeCode: $value"), + }; +} + final class CFXMLElementInfo extends ffi.Struct { external CFDictionaryRef attributes; @@ -53125,20 +52366,6 @@ final class CFXMLAttributeListDeclarationInfo extends ffi.Struct { external ffi.Pointer attributes; } -final class CFXMLEntityInfo extends ffi.Struct { - @CFIndex() - external int entityTypeAsInt; - - CFXMLEntityTypeCode get entityType => - CFXMLEntityTypeCode.fromValue(entityTypeAsInt); - - external CFStringRef replacementText; - - external CFXMLExternalID entityID; - - external CFStringRef notationName; -} - enum CFXMLEntityTypeCode { kCFXMLEntityTypeParameter(0), kCFXMLEntityTypeParsedInternal(1), @@ -53160,117 +52387,31 @@ enum CFXMLEntityTypeCode { }; } -final class CFXMLEntityReferenceInfo extends ffi.Struct { +final class CFXMLEntityInfo extends ffi.Struct { @CFIndex() external int entityTypeAsInt; CFXMLEntityTypeCode get entityType => CFXMLEntityTypeCode.fromValue(entityTypeAsInt); -} - -typedef CFXMLNodeRef = ffi.Pointer<__CFXMLNode>; -enum CFXMLNodeTypeCode { - kCFXMLNodeTypeDocument(1), - kCFXMLNodeTypeElement(2), - kCFXMLNodeTypeAttribute(3), - kCFXMLNodeTypeProcessingInstruction(4), - kCFXMLNodeTypeComment(5), - kCFXMLNodeTypeText(6), - kCFXMLNodeTypeCDATASection(7), - kCFXMLNodeTypeDocumentFragment(8), - kCFXMLNodeTypeEntity(9), - kCFXMLNodeTypeEntityReference(10), - kCFXMLNodeTypeDocumentType(11), - kCFXMLNodeTypeWhitespace(12), - kCFXMLNodeTypeNotation(13), - kCFXMLNodeTypeElementTypeDeclaration(14), - kCFXMLNodeTypeAttributeListDeclaration(15); + external CFStringRef replacementText; - final int value; - const CFXMLNodeTypeCode(this.value); + external CFXMLExternalID entityID; - static CFXMLNodeTypeCode fromValue(int value) => switch (value) { - 1 => kCFXMLNodeTypeDocument, - 2 => kCFXMLNodeTypeElement, - 3 => kCFXMLNodeTypeAttribute, - 4 => kCFXMLNodeTypeProcessingInstruction, - 5 => kCFXMLNodeTypeComment, - 6 => kCFXMLNodeTypeText, - 7 => kCFXMLNodeTypeCDATASection, - 8 => kCFXMLNodeTypeDocumentFragment, - 9 => kCFXMLNodeTypeEntity, - 10 => kCFXMLNodeTypeEntityReference, - 11 => kCFXMLNodeTypeDocumentType, - 12 => kCFXMLNodeTypeWhitespace, - 13 => kCFXMLNodeTypeNotation, - 14 => kCFXMLNodeTypeElementTypeDeclaration, - 15 => kCFXMLNodeTypeAttributeListDeclaration, - _ => throw ArgumentError("Unknown value for CFXMLNodeTypeCode: $value"), - }; + external CFStringRef notationName; } -typedef CFXMLTreeRef = CFTreeRef; - -final class __CFXMLParser extends ffi.Opaque {} - -final class CFXMLParserCallBacks extends ffi.Struct { +final class CFXMLEntityReferenceInfo extends ffi.Struct { @CFIndex() - external int version; - - external CFXMLParserCreateXMLStructureCallBack createXMLStructure; - - external CFXMLParserAddChildCallBack addChild; - - external CFXMLParserEndXMLStructureCallBack endXMLStructure; - - external CFXMLParserResolveExternalEntityCallBack resolveExternalEntity; + external int entityTypeAsInt; - external CFXMLParserHandleErrorCallBack handleError; + CFXMLEntityTypeCode get entityType => + CFXMLEntityTypeCode.fromValue(entityTypeAsInt); } -typedef CFXMLParserCreateXMLStructureCallBack = ffi - .Pointer>; -typedef CFXMLParserCreateXMLStructureCallBackFunction - = ffi.Pointer Function(CFXMLParserRef parser, - CFXMLNodeRef nodeDesc, ffi.Pointer info); +final class __CFXMLParser extends ffi.Opaque {} + typedef CFXMLParserRef = ffi.Pointer<__CFXMLParser>; -typedef CFXMLParserAddChildCallBack - = ffi.Pointer>; -typedef CFXMLParserAddChildCallBackFunction = ffi.Void Function( - CFXMLParserRef parser, - ffi.Pointer parent, - ffi.Pointer child, - ffi.Pointer info); -typedef DartCFXMLParserAddChildCallBackFunction = void Function( - CFXMLParserRef parser, - ffi.Pointer parent, - ffi.Pointer child, - ffi.Pointer info); -typedef CFXMLParserEndXMLStructureCallBack = ffi - .Pointer>; -typedef CFXMLParserEndXMLStructureCallBackFunction = ffi.Void Function( - CFXMLParserRef parser, - ffi.Pointer xmlType, - ffi.Pointer info); -typedef DartCFXMLParserEndXMLStructureCallBackFunction = void Function( - CFXMLParserRef parser, - ffi.Pointer xmlType, - ffi.Pointer info); -typedef CFXMLParserResolveExternalEntityCallBack = ffi.Pointer< - ffi.NativeFunction>; -typedef CFXMLParserResolveExternalEntityCallBackFunction = CFDataRef Function( - CFXMLParserRef parser, - ffi.Pointer extID, - ffi.Pointer info); -typedef CFXMLParserHandleErrorCallBack - = ffi.Pointer>; -typedef CFXMLParserHandleErrorCallBackFunction = Boolean Function( - CFXMLParserRef parser, CFIndex error, ffi.Pointer info); -typedef DartCFXMLParserHandleErrorCallBackFunction = DartBoolean Function( - CFXMLParserRef parser, - CFXMLParserStatusCode error, - ffi.Pointer info); enum CFXMLParserStatusCode { kCFXMLStatusParseNotBegun(-2), @@ -53319,33 +52460,111 @@ enum CFXMLParserStatusCode { }; } -final class CFXMLParserContext extends ffi.Struct { +typedef CFXMLParserCreateXMLStructureCallBackFunction + = ffi.Pointer Function(CFXMLParserRef parser, + CFXMLNodeRef nodeDesc, ffi.Pointer info); +typedef CFXMLParserCreateXMLStructureCallBack = ffi + .Pointer>; +typedef CFXMLParserAddChildCallBackFunction = ffi.Void Function( + CFXMLParserRef parser, + ffi.Pointer parent, + ffi.Pointer child, + ffi.Pointer info); +typedef DartCFXMLParserAddChildCallBackFunction = void Function( + CFXMLParserRef parser, + ffi.Pointer parent, + ffi.Pointer child, + ffi.Pointer info); +typedef CFXMLParserAddChildCallBack + = ffi.Pointer>; +typedef CFXMLParserEndXMLStructureCallBackFunction = ffi.Void Function( + CFXMLParserRef parser, + ffi.Pointer xmlType, + ffi.Pointer info); +typedef DartCFXMLParserEndXMLStructureCallBackFunction = void Function( + CFXMLParserRef parser, + ffi.Pointer xmlType, + ffi.Pointer info); +typedef CFXMLParserEndXMLStructureCallBack = ffi + .Pointer>; +typedef CFXMLParserResolveExternalEntityCallBackFunction = CFDataRef Function( + CFXMLParserRef parser, + ffi.Pointer extID, + ffi.Pointer info); +typedef CFXMLParserResolveExternalEntityCallBack = ffi.Pointer< + ffi.NativeFunction>; +typedef CFXMLParserHandleErrorCallBackFunction = Boolean Function( + CFXMLParserRef parser, CFIndex error, ffi.Pointer info); +typedef DartCFXMLParserHandleErrorCallBackFunction = DartBoolean Function( + CFXMLParserRef parser, + CFXMLParserStatusCode error, + ffi.Pointer info); +typedef CFXMLParserHandleErrorCallBack + = ffi.Pointer>; + +final class CFXMLParserCallBacks extends ffi.Struct { @CFIndex() external int version; - external ffi.Pointer info; + external CFXMLParserCreateXMLStructureCallBack createXMLStructure; - external CFXMLParserRetainCallBack retain; + external CFXMLParserAddChildCallBack addChild; - external CFXMLParserReleaseCallBack release; + external CFXMLParserEndXMLStructureCallBack endXMLStructure; - external CFXMLParserCopyDescriptionCallBack copyDescription; + external CFXMLParserResolveExternalEntityCallBack resolveExternalEntity; + + external CFXMLParserHandleErrorCallBack handleError; } -typedef CFXMLParserRetainCallBack - = ffi.Pointer>; typedef CFXMLParserRetainCallBackFunction = ffi.Pointer Function( ffi.Pointer info); -typedef CFXMLParserReleaseCallBack - = ffi.Pointer>; +typedef CFXMLParserRetainCallBack + = ffi.Pointer>; typedef CFXMLParserReleaseCallBackFunction = ffi.Void Function( ffi.Pointer info); typedef DartCFXMLParserReleaseCallBackFunction = void Function( ffi.Pointer info); -typedef CFXMLParserCopyDescriptionCallBack = ffi - .Pointer>; +typedef CFXMLParserReleaseCallBack + = ffi.Pointer>; typedef CFXMLParserCopyDescriptionCallBackFunction = CFStringRef Function( ffi.Pointer info); +typedef CFXMLParserCopyDescriptionCallBack = ffi + .Pointer>; + +final class CFXMLParserContext extends ffi.Struct { + @CFIndex() + external int version; + + external ffi.Pointer info; + + external CFXMLParserRetainCallBack retain; + + external CFXMLParserReleaseCallBack release; + + external CFXMLParserCopyDescriptionCallBack copyDescription; +} + +typedef sint64 = ffi.Int64; +typedef Dartsint64 = int; +typedef uint64 = ffi.Uint64; +typedef Dartuint64 = int; +typedef sint32 = ffi.Int32; +typedef Dartsint32 = int; +typedef sint16 = ffi.Int16; +typedef Dartsint16 = int; +typedef sint8 = ffi.Int8; +typedef Dartsint8 = int; +typedef uint32 = ffi.Uint32; +typedef Dartuint32 = int; +typedef uint16 = ffi.Uint16; +typedef Dartuint16 = int; +typedef uint8 = ffi.Uint8; +typedef Dartuint8 = int; +typedef CSSM_INTPTR = ffi.IntPtr; +typedef DartCSSM_INTPTR = int; +typedef CSSM_SIZE = ffi.Size; +typedef DartCSSM_SIZE = int; final class cssm_data extends ffi.Struct { @ffi.Size() @@ -53354,15 +52573,15 @@ final class cssm_data extends ffi.Struct { external ffi.Pointer Data; } +typedef SecAsn1Item = cssm_data; +typedef SecAsn1Oid = cssm_data; + final class SecAsn1AlgId extends ffi.Struct { external SecAsn1Oid algorithm; external SecAsn1Item parameters; } -typedef SecAsn1Oid = cssm_data; -typedef SecAsn1Item = cssm_data; - final class SecAsn1PubKeyInfo extends ffi.Struct { external SecAsn1AlgId algorithm; @@ -53382,6 +52601,32 @@ final class SecAsn1Template_struct extends ffi.Struct { external int size; } +typedef SecAsn1Template = SecAsn1Template_struct; +typedef SecAsn1TemplateChooser = ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg, + Boolean enc, + ffi.Pointer buf, + ffi.Size len, + ffi.Pointer dest)>; +typedef SecAsn1TemplateChooserPtr = ffi.Pointer; +typedef CSSM_HANDLE = CSSM_INTPTR; +typedef CSSM_HANDLE_PTR = ffi.Pointer; +typedef CSSM_LONG_HANDLE = uint64; +typedef CSSM_LONG_HANDLE_PTR = ffi.Pointer; +typedef CSSM_MODULE_HANDLE = CSSM_HANDLE; +typedef CSSM_MODULE_HANDLE_PTR = ffi.Pointer; +typedef CSSM_CC_HANDLE = CSSM_LONG_HANDLE; +typedef CSSM_CSP_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_TP_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_AC_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_CL_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_DL_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_DB_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_BOOL = sint32; +typedef CSSM_RETURN = sint32; +typedef CSSM_DATA_PTR = ffi.Pointer; + final class cssm_guid extends ffi.Struct { @uint32() external int Data1; @@ -53396,12 +52641,12 @@ final class cssm_guid extends ffi.Struct { external ffi.Array Data4; } -typedef uint32 = ffi.Uint32; -typedef Dartuint32 = int; -typedef uint16 = ffi.Uint16; -typedef Dartuint16 = int; -typedef uint8 = ffi.Uint8; -typedef Dartuint8 = int; +typedef CSSM_GUID = cssm_guid; +typedef CSSM_GUID_PTR = ffi.Pointer; +typedef CSSM_BITMASK = uint32; +typedef CSSM_KEY_HIERARCHY = CSSM_BITMASK; +typedef CSSM_PVC_MODE = CSSM_BITMASK; +typedef CSSM_PRIVILEGE_SCOPE = uint32; final class cssm_version extends ffi.Struct { @uint32() @@ -53411,6 +52656,11 @@ final class cssm_version extends ffi.Struct { external int Minor; } +typedef CSSM_VERSION = cssm_version; +typedef CSSM_VERSION_PTR = ffi.Pointer; +typedef CSSM_SERVICE_MASK = uint32; +typedef CSSM_SERVICE_TYPE = CSSM_SERVICE_MASK; + final class cssm_subservice_uid extends ffi.Struct { external CSSM_GUID Guid; @@ -53423,10 +52673,28 @@ final class cssm_subservice_uid extends ffi.Struct { external int SubserviceType; } -typedef CSSM_GUID = cssm_guid; -typedef CSSM_VERSION = cssm_version; -typedef CSSM_SERVICE_TYPE = CSSM_SERVICE_MASK; -typedef CSSM_SERVICE_MASK = uint32; +typedef CSSM_SUBSERVICE_UID = cssm_subservice_uid; +typedef CSSM_SUBSERVICE_UID_PTR = ffi.Pointer; +typedef CSSM_MODULE_EVENT = uint32; +typedef CSSM_MODULE_EVENT_PTR = ffi.Pointer; +typedef CSSM_API_ModuleEventHandlerFunction = CSSM_RETURN Function( + ffi.Pointer ModuleGuid, + ffi.Pointer AppNotifyCallbackCtx, + uint32 SubserviceId, + CSSM_SERVICE_TYPE ServiceType, + CSSM_MODULE_EVENT EventType); +typedef DartCSSM_API_ModuleEventHandlerFunction = Dartsint32 Function( + ffi.Pointer ModuleGuid, + ffi.Pointer AppNotifyCallbackCtx, + Dartuint32 SubserviceId, + Dartuint32 ServiceType, + Dartuint32 EventType); +typedef CSSM_API_ModuleEventHandler + = ffi.Pointer>; +typedef CSSM_ATTACH_FLAGS = uint32; +typedef CSSM_PRIVILEGE = uint64; +typedef CSSM_USEE_TAG = CSSM_PRIVILEGE; +typedef CSSM_NET_ADDRESS_TYPE = uint32; final class cssm_net_address extends ffi.Struct { @CSSM_NET_ADDRESS_TYPE() @@ -53435,7 +52703,14 @@ final class cssm_net_address extends ffi.Struct { external SecAsn1Item Address; } -typedef CSSM_NET_ADDRESS_TYPE = uint32; +typedef CSSM_NET_ADDRESS = cssm_net_address; +typedef CSSM_NET_ADDRESS_PTR = ffi.Pointer; +typedef CSSM_NET_PROTOCOL = uint32; +typedef CSSM_CALLBACKFunction = CSSM_RETURN Function( + CSSM_DATA_PTR OutData, ffi.Pointer CallerCtx); +typedef DartCSSM_CALLBACKFunction = Dartsint32 Function( + CSSM_DATA_PTR OutData, ffi.Pointer CallerCtx); +typedef CSSM_CALLBACK = ffi.Pointer>; final class cssm_crypto_data extends ffi.Struct { external SecAsn1Item Param; @@ -53445,30 +52720,25 @@ final class cssm_crypto_data extends ffi.Struct { external ffi.Pointer CallerCtx; } -typedef CSSM_CALLBACK = ffi.Pointer>; -typedef CSSM_CALLBACKFunction = CSSM_RETURN Function( - CSSM_DATA_PTR OutData, ffi.Pointer CallerCtx); -typedef DartCSSM_CALLBACKFunction = Dartsint32 Function( - CSSM_DATA_PTR OutData, ffi.Pointer CallerCtx); -typedef CSSM_RETURN = sint32; -typedef sint32 = ffi.Int32; -typedef Dartsint32 = int; -typedef CSSM_DATA_PTR = ffi.Pointer; - -final class cssm_list_element extends ffi.Struct { - external ffi.Pointer NextElement; +typedef CSSM_CRYPTO_DATA = cssm_crypto_data; +typedef CSSM_CRYPTO_DATA_PTR = ffi.Pointer; +typedef CSSM_WORDID_TYPE = sint32; +typedef CSSM_LIST_ELEMENT_TYPE = uint32; +typedef CSSM_LIST_ELEMENT_TYPE_PTR = ffi.Pointer; +typedef CSSM_LIST_TYPE = uint32; +typedef CSSM_LIST_TYPE_PTR = ffi.Pointer; +typedef CSSM_LIST_ELEMENT_PTR = ffi.Pointer; - @CSSM_WORDID_TYPE() - external int WordID; +final class cssm_list extends ffi.Struct { + @CSSM_LIST_TYPE() + external int ListType; - @CSSM_LIST_ELEMENT_TYPE() - external int ElementType; + external CSSM_LIST_ELEMENT_PTR Head; - external UnnamedUnion2 Element; + external CSSM_LIST_ELEMENT_PTR Tail; } -typedef CSSM_WORDID_TYPE = sint32; -typedef CSSM_LIST_ELEMENT_TYPE = uint32; +typedef CSSM_LIST = cssm_list; final class UnnamedUnion2 extends ffi.Union { external CSSM_LIST Sublist; @@ -53476,19 +52746,20 @@ final class UnnamedUnion2 extends ffi.Union { external SecAsn1Item Word; } -typedef CSSM_LIST = cssm_list; +final class cssm_list_element extends ffi.Struct { + external ffi.Pointer NextElement; -final class cssm_list extends ffi.Struct { - @CSSM_LIST_TYPE() - external int ListType; + @CSSM_WORDID_TYPE() + external int WordID; - external CSSM_LIST_ELEMENT_PTR Head; + @CSSM_LIST_ELEMENT_TYPE() + external int ElementType; - external CSSM_LIST_ELEMENT_PTR Tail; + external UnnamedUnion2 Element; } -typedef CSSM_LIST_TYPE = uint32; -typedef CSSM_LIST_ELEMENT_PTR = ffi.Pointer; +typedef CSSM_LIST_PTR = ffi.Pointer; +typedef CSSM_LIST_ELEMENT = cssm_list_element; final class CSSM_TUPLE extends ffi.Struct { external CSSM_LIST Issuer; @@ -53503,7 +52774,7 @@ final class CSSM_TUPLE extends ffi.Struct { external CSSM_LIST ValidityPeriod; } -typedef CSSM_BOOL = sint32; +typedef CSSM_TUPLE_PTR = ffi.Pointer; final class cssm_tuplegroup extends ffi.Struct { @uint32() @@ -53512,7 +52783,9 @@ final class cssm_tuplegroup extends ffi.Struct { external CSSM_TUPLE_PTR Tuples; } -typedef CSSM_TUPLE_PTR = ffi.Pointer; +typedef CSSM_TUPLEGROUP = cssm_tuplegroup; +typedef CSSM_TUPLEGROUP_PTR = ffi.Pointer; +typedef CSSM_SAMPLE_TYPE = CSSM_WORDID_TYPE; final class cssm_sample extends ffi.Struct { external CSSM_LIST TypedSample; @@ -53520,7 +52793,8 @@ final class cssm_sample extends ffi.Struct { external ffi.Pointer Verifier; } -typedef CSSM_SUBSERVICE_UID = cssm_subservice_uid; +typedef CSSM_SAMPLE = cssm_sample; +typedef CSSM_SAMPLE_PTR = ffi.Pointer; final class cssm_samplegroup extends ffi.Struct { @uint32() @@ -53529,33 +52803,18 @@ final class cssm_samplegroup extends ffi.Struct { external ffi.Pointer Samples; } -typedef CSSM_SAMPLE = cssm_sample; - -final class cssm_memory_funcs extends ffi.Struct { - external CSSM_MALLOC malloc_func; - - external CSSM_FREE free_func; - - external CSSM_REALLOC realloc_func; - - external CSSM_CALLOC calloc_func; - - external ffi.Pointer AllocRef; -} - -typedef CSSM_MALLOC = ffi.Pointer>; +typedef CSSM_SAMPLEGROUP = cssm_samplegroup; +typedef CSSM_SAMPLEGROUP_PTR = ffi.Pointer; typedef CSSM_MALLOCFunction = ffi.Pointer Function( CSSM_SIZE size, ffi.Pointer allocref); typedef DartCSSM_MALLOCFunction = ffi.Pointer Function( DartCSSM_SIZE size, ffi.Pointer allocref); -typedef CSSM_SIZE = ffi.Size; -typedef DartCSSM_SIZE = int; -typedef CSSM_FREE = ffi.Pointer>; +typedef CSSM_MALLOC = ffi.Pointer>; typedef CSSM_FREEFunction = ffi.Void Function( ffi.Pointer memblock, ffi.Pointer allocref); typedef DartCSSM_FREEFunction = void Function( ffi.Pointer memblock, ffi.Pointer allocref); -typedef CSSM_REALLOC = ffi.Pointer>; +typedef CSSM_FREE = ffi.Pointer>; typedef CSSM_REALLOCFunction = ffi.Pointer Function( ffi.Pointer memblock, CSSM_SIZE size, @@ -53564,11 +52823,45 @@ typedef DartCSSM_REALLOCFunction = ffi.Pointer Function( ffi.Pointer memblock, DartCSSM_SIZE size, ffi.Pointer allocref); -typedef CSSM_CALLOC = ffi.Pointer>; +typedef CSSM_REALLOC = ffi.Pointer>; typedef CSSM_CALLOCFunction = ffi.Pointer Function( uint32 num, CSSM_SIZE size, ffi.Pointer allocref); typedef DartCSSM_CALLOCFunction = ffi.Pointer Function( Dartuint32 num, DartCSSM_SIZE size, ffi.Pointer allocref); +typedef CSSM_CALLOC = ffi.Pointer>; + +final class cssm_memory_funcs extends ffi.Struct { + external CSSM_MALLOC malloc_func; + + external CSSM_FREE free_func; + + external CSSM_REALLOC realloc_func; + + external CSSM_CALLOC calloc_func; + + external ffi.Pointer AllocRef; +} + +typedef CSSM_MEMORY_FUNCS = cssm_memory_funcs; +typedef CSSM_MEMORY_FUNCS_PTR = ffi.Pointer; +typedef CSSM_API_MEMORY_FUNCS = CSSM_MEMORY_FUNCS; +typedef CSSM_API_MEMORY_FUNCS_PTR = ffi.Pointer; +typedef CSSM_CHALLENGE_CALLBACKFunction = CSSM_RETURN Function( + ffi.Pointer Challenge, + CSSM_SAMPLEGROUP_PTR Response, + ffi.Pointer CallerCtx, + ffi.Pointer MemFuncs); +typedef DartCSSM_CHALLENGE_CALLBACKFunction = Dartsint32 Function( + ffi.Pointer Challenge, + CSSM_SAMPLEGROUP_PTR Response, + ffi.Pointer CallerCtx, + ffi.Pointer MemFuncs); +typedef CSSM_CHALLENGE_CALLBACK + = ffi.Pointer>; +typedef CSSM_CERT_TYPE = uint32; +typedef CSSM_CERT_TYPE_PTR = ffi.Pointer; +typedef CSSM_CERT_ENCODING = uint32; +typedef CSSM_CERT_ENCODING_PTR = ffi.Pointer; final class cssm_encoded_cert extends ffi.Struct { @CSSM_CERT_TYPE() @@ -53580,8 +52873,10 @@ final class cssm_encoded_cert extends ffi.Struct { external SecAsn1Item CertBlob; } -typedef CSSM_CERT_TYPE = uint32; -typedef CSSM_CERT_ENCODING = uint32; +typedef CSSM_ENCODED_CERT = cssm_encoded_cert; +typedef CSSM_ENCODED_CERT_PTR = ffi.Pointer; +typedef CSSM_CERT_PARSE_FORMAT = uint32; +typedef CSSM_CERT_PARSE_FORMAT_PTR = ffi.Pointer; final class cssm_parsed_cert extends ffi.Struct { @CSSM_CERT_TYPE() @@ -53593,7 +52888,8 @@ final class cssm_parsed_cert extends ffi.Struct { external ffi.Pointer ParsedCert; } -typedef CSSM_CERT_PARSE_FORMAT = uint32; +typedef CSSM_PARSED_CERT = cssm_parsed_cert; +typedef CSSM_PARSED_CERT_PTR = ffi.Pointer; final class cssm_cert_pair extends ffi.Struct { external CSSM_ENCODED_CERT EncodedCert; @@ -53601,8 +52897,20 @@ final class cssm_cert_pair extends ffi.Struct { external CSSM_PARSED_CERT ParsedCert; } -typedef CSSM_ENCODED_CERT = cssm_encoded_cert; -typedef CSSM_PARSED_CERT = cssm_parsed_cert; +typedef CSSM_CERT_PAIR = cssm_cert_pair; +typedef CSSM_CERT_PAIR_PTR = ffi.Pointer; +typedef CSSM_CERTGROUP_TYPE = uint32; +typedef CSSM_CERTGROUP_TYPE_PTR = ffi.Pointer; + +final class UnnamedUnion3 extends ffi.Union { + external CSSM_DATA_PTR CertList; + + external CSSM_ENCODED_CERT_PTR EncodedCertList; + + external CSSM_PARSED_CERT_PTR ParsedCertList; + + external CSSM_CERT_PAIR_PTR PairCertList; +} final class cssm_certgroup extends ffi.Struct { @CSSM_CERT_TYPE() @@ -53622,20 +52930,8 @@ final class cssm_certgroup extends ffi.Struct { external ffi.Pointer Reserved; } -final class UnnamedUnion3 extends ffi.Union { - external CSSM_DATA_PTR CertList; - - external CSSM_ENCODED_CERT_PTR EncodedCertList; - - external CSSM_PARSED_CERT_PTR ParsedCertList; - - external CSSM_CERT_PAIR_PTR PairCertList; -} - -typedef CSSM_ENCODED_CERT_PTR = ffi.Pointer; -typedef CSSM_PARSED_CERT_PTR = ffi.Pointer; -typedef CSSM_CERT_PAIR_PTR = ffi.Pointer; -typedef CSSM_CERTGROUP_TYPE = uint32; +typedef CSSM_CERTGROUP = cssm_certgroup; +typedef CSSM_CERTGROUP_PTR = ffi.Pointer; final class cssm_base_certs extends ffi.Struct { @CSSM_TP_HANDLE() @@ -53647,13 +52943,8 @@ final class cssm_base_certs extends ffi.Struct { external CSSM_CERTGROUP Certs; } -typedef CSSM_TP_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_MODULE_HANDLE = CSSM_HANDLE; -typedef CSSM_HANDLE = CSSM_INTPTR; -typedef CSSM_INTPTR = ffi.IntPtr; -typedef DartCSSM_INTPTR = int; -typedef CSSM_CL_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_CERTGROUP = cssm_certgroup; +typedef CSSM_BASE_CERTS = cssm_base_certs; +typedef CSSM_BASE_CERTS_PTR = ffi.Pointer; final class cssm_access_credentials extends ffi.Struct { @ffi.Array.multi([68]) @@ -53668,22 +52959,10 @@ final class cssm_access_credentials extends ffi.Struct { external ffi.Pointer CallerCtx; } -typedef CSSM_BASE_CERTS = cssm_base_certs; -typedef CSSM_SAMPLEGROUP = cssm_samplegroup; -typedef CSSM_CHALLENGE_CALLBACK - = ffi.Pointer>; -typedef CSSM_CHALLENGE_CALLBACKFunction = CSSM_RETURN Function( - ffi.Pointer Challenge, - CSSM_SAMPLEGROUP_PTR Response, - ffi.Pointer CallerCtx, - ffi.Pointer MemFuncs); -typedef DartCSSM_CHALLENGE_CALLBACKFunction = Dartsint32 Function( - ffi.Pointer Challenge, - CSSM_SAMPLEGROUP_PTR Response, - ffi.Pointer CallerCtx, - ffi.Pointer MemFuncs); -typedef CSSM_SAMPLEGROUP_PTR = ffi.Pointer; -typedef CSSM_MEMORY_FUNCS = cssm_memory_funcs; +typedef CSSM_ACCESS_CREDENTIALS = cssm_access_credentials; +typedef CSSM_ACCESS_CREDENTIALS_PTR = ffi.Pointer; +typedef CSSM_ACL_SUBJECT_TYPE = sint32; +typedef CSSM_ACL_AUTHORIZATION_TAG = sint32; final class cssm_authorizationgroup extends ffi.Struct { @uint32() @@ -53692,7 +52971,8 @@ final class cssm_authorizationgroup extends ffi.Struct { external ffi.Pointer AuthTags; } -typedef CSSM_ACL_AUTHORIZATION_TAG = sint32; +typedef CSSM_AUTHORIZATIONGROUP = cssm_authorizationgroup; +typedef CSSM_AUTHORIZATIONGROUP_PTR = ffi.Pointer; final class cssm_acl_validity_period extends ffi.Struct { external SecAsn1Item StartDate; @@ -53700,6 +52980,9 @@ final class cssm_acl_validity_period extends ffi.Struct { external SecAsn1Item EndDate; } +typedef CSSM_ACL_VALIDITY_PERIOD = cssm_acl_validity_period; +typedef CSSM_ACL_VALIDITY_PERIOD_PTR = ffi.Pointer; + final class cssm_acl_entry_prototype extends ffi.Struct { external CSSM_LIST TypedSubject; @@ -53714,8 +52997,8 @@ final class cssm_acl_entry_prototype extends ffi.Struct { external ffi.Array EntryTag; } -typedef CSSM_AUTHORIZATIONGROUP = cssm_authorizationgroup; -typedef CSSM_ACL_VALIDITY_PERIOD = cssm_acl_validity_period; +typedef CSSM_ACL_ENTRY_PROTOTYPE = cssm_acl_entry_prototype; +typedef CSSM_ACL_ENTRY_PROTOTYPE_PTR = ffi.Pointer; final class cssm_acl_owner_prototype extends ffi.Struct { external CSSM_LIST TypedSubject; @@ -53724,17 +53007,8 @@ final class cssm_acl_owner_prototype extends ffi.Struct { external int Delegate; } -final class cssm_acl_entry_input extends ffi.Struct { - external CSSM_ACL_ENTRY_PROTOTYPE Prototype; - - external CSSM_ACL_SUBJECT_CALLBACK Callback; - - external ffi.Pointer CallerContext; -} - -typedef CSSM_ACL_ENTRY_PROTOTYPE = cssm_acl_entry_prototype; -typedef CSSM_ACL_SUBJECT_CALLBACK - = ffi.Pointer>; +typedef CSSM_ACL_OWNER_PROTOTYPE = cssm_acl_owner_prototype; +typedef CSSM_ACL_OWNER_PROTOTYPE_PTR = ffi.Pointer; typedef CSSM_ACL_SUBJECT_CALLBACKFunction = CSSM_RETURN Function( ffi.Pointer SubjectRequest, CSSM_LIST_PTR SubjectResponse, @@ -53745,7 +53019,19 @@ typedef DartCSSM_ACL_SUBJECT_CALLBACKFunction = Dartsint32 Function( CSSM_LIST_PTR SubjectResponse, ffi.Pointer CallerContext, ffi.Pointer MemFuncs); -typedef CSSM_LIST_PTR = ffi.Pointer; +typedef CSSM_ACL_SUBJECT_CALLBACK + = ffi.Pointer>; + +final class cssm_acl_entry_input extends ffi.Struct { + external CSSM_ACL_ENTRY_PROTOTYPE Prototype; + + external CSSM_ACL_SUBJECT_CALLBACK Callback; + + external ffi.Pointer CallerContext; +} + +typedef CSSM_ACL_ENTRY_INPUT = cssm_acl_entry_input; +typedef CSSM_ACL_ENTRY_INPUT_PTR = ffi.Pointer; final class cssm_resource_control_context extends ffi.Struct { external CSSM_ACCESS_CREDENTIALS_PTR AccessCred; @@ -53753,8 +53039,10 @@ final class cssm_resource_control_context extends ffi.Struct { external CSSM_ACL_ENTRY_INPUT InitialAclEntry; } -typedef CSSM_ACCESS_CREDENTIALS_PTR = ffi.Pointer; -typedef CSSM_ACL_ENTRY_INPUT = cssm_acl_entry_input; +typedef CSSM_RESOURCE_CONTROL_CONTEXT = cssm_resource_control_context; +typedef CSSM_RESOURCE_CONTROL_CONTEXT_PTR + = ffi.Pointer; +typedef CSSM_ACL_HANDLE = CSSM_HANDLE; final class cssm_acl_entry_info extends ffi.Struct { external CSSM_ACL_ENTRY_PROTOTYPE EntryPublicInfo; @@ -53763,7 +53051,9 @@ final class cssm_acl_entry_info extends ffi.Struct { external int EntryHandle; } -typedef CSSM_ACL_HANDLE = CSSM_HANDLE; +typedef CSSM_ACL_ENTRY_INFO = cssm_acl_entry_info; +typedef CSSM_ACL_ENTRY_INFO_PTR = ffi.Pointer; +typedef CSSM_ACL_EDIT_MODE = uint32; final class cssm_acl_edit extends ffi.Struct { @CSSM_ACL_EDIT_MODE() @@ -53775,7 +53065,13 @@ final class cssm_acl_edit extends ffi.Struct { external ffi.Pointer NewEntry; } -typedef CSSM_ACL_EDIT_MODE = uint32; +typedef CSSM_ACL_EDIT = cssm_acl_edit; +typedef CSSM_ACL_EDIT_PTR = ffi.Pointer; +typedef CSSM_PROC_ADDRFunction = ffi.Void Function(); +typedef DartCSSM_PROC_ADDRFunction = void Function(); +typedef CSSM_PROC_ADDR + = ffi.Pointer>; +typedef CSSM_PROC_ADDR_PTR = ffi.Pointer; final class cssm_func_name_addr extends ffi.Struct { @ffi.Array.multi([68]) @@ -53784,10 +53080,8 @@ final class cssm_func_name_addr extends ffi.Struct { external CSSM_PROC_ADDR Address; } -typedef CSSM_PROC_ADDR - = ffi.Pointer>; -typedef CSSM_PROC_ADDRFunction = ffi.Void Function(); -typedef DartCSSM_PROC_ADDRFunction = void Function(); +typedef CSSM_FUNC_NAME_ADDR = cssm_func_name_addr; +typedef CSSM_FUNC_NAME_ADDR_PTR = ffi.Pointer; final class cssm_date extends ffi.Struct { @ffi.Array.multi([4]) @@ -53800,6 +53094,9 @@ final class cssm_date extends ffi.Struct { external ffi.Array Day; } +typedef CSSM_DATE = cssm_date; +typedef CSSM_DATE_PTR = ffi.Pointer; + final class cssm_range extends ffi.Struct { @uint32() external int Min; @@ -53808,6 +53105,9 @@ final class cssm_range extends ffi.Struct { external int Max; } +typedef CSSM_RANGE = cssm_range; +typedef CSSM_RANGE_PTR = ffi.Pointer; + final class cssm_query_size_data extends ffi.Struct { @uint32() external int SizeInputBlock; @@ -53816,6 +53116,10 @@ final class cssm_query_size_data extends ffi.Struct { external int SizeOutputBlock; } +typedef CSSM_QUERY_SIZE_DATA = cssm_query_size_data; +typedef CSSM_QUERY_SIZE_DATA_PTR = ffi.Pointer; +typedef CSSM_HEADERVERSION = uint32; + final class cssm_key_size extends ffi.Struct { @uint32() external int LogicalKeySizeInBits; @@ -53824,6 +53128,16 @@ final class cssm_key_size extends ffi.Struct { external int EffectiveKeySizeInBits; } +typedef CSSM_KEY_SIZE = cssm_key_size; +typedef CSSM_KEY_SIZE_PTR = ffi.Pointer; +typedef CSSM_KEYBLOB_TYPE = uint32; +typedef CSSM_KEYBLOB_FORMAT = uint32; +typedef CSSM_KEYCLASS = uint32; +typedef CSSM_KEYATTR_FLAGS = uint32; +typedef CSSM_KEYUSE = uint32; +typedef CSSM_ALGORITHMS = uint32; +typedef CSSM_ENCRYPT_MODE = uint32; + final class cssm_keyheader extends ffi.Struct { @CSSM_HEADERVERSION() external int HeaderVersion; @@ -53865,15 +53179,8 @@ final class cssm_keyheader extends ffi.Struct { external int Reserved; } -typedef CSSM_HEADERVERSION = uint32; -typedef CSSM_KEYBLOB_TYPE = uint32; -typedef CSSM_KEYBLOB_FORMAT = uint32; -typedef CSSM_ALGORITHMS = uint32; -typedef CSSM_KEYCLASS = uint32; -typedef CSSM_KEYATTR_FLAGS = uint32; -typedef CSSM_KEYUSE = uint32; -typedef CSSM_DATE = cssm_date; -typedef CSSM_ENCRYPT_MODE = uint32; +typedef CSSM_KEYHEADER = cssm_keyheader; +typedef CSSM_KEYHEADER_PTR = ffi.Pointer; final class cssm_key extends ffi.Struct { external CSSM_KEYHEADER KeyHeader; @@ -53881,7 +53188,11 @@ final class cssm_key extends ffi.Struct { external SecAsn1Item KeyData; } -typedef CSSM_KEYHEADER = cssm_keyheader; +typedef CSSM_KEY = cssm_key; +typedef CSSM_KEY_PTR = ffi.Pointer; +typedef CSSM_WRAP_KEY = CSSM_KEY; +typedef CSSM_WRAP_KEY_PTR = ffi.Pointer; +typedef CSSM_CSPTYPE = uint32; final class cssm_dl_db_handle extends ffi.Struct { @CSSM_DL_HANDLE() @@ -53891,20 +53202,14 @@ final class cssm_dl_db_handle extends ffi.Struct { external int DBHandle; } -typedef CSSM_DL_HANDLE = CSSM_MODULE_HANDLE; -typedef CSSM_DB_HANDLE = CSSM_MODULE_HANDLE; - -final class cssm_context_attribute extends ffi.Struct { - @CSSM_ATTRIBUTE_TYPE() - external int AttributeType; - - @uint32() - external int AttributeLength; - - external cssm_context_attribute_value Attribute; -} - +typedef CSSM_DL_DB_HANDLE = cssm_dl_db_handle; +typedef CSSM_DL_DB_HANDLE_PTR = ffi.Pointer; +typedef CSSM_CONTEXT_TYPE = uint32; typedef CSSM_ATTRIBUTE_TYPE = uint32; +typedef CSSM_PADDING = uint32; +typedef CSSM_KEY_TYPE = CSSM_ALGORITHMS; + +final class cssm_kr_profile extends ffi.Opaque {} final class cssm_context_attribute_value extends ffi.Union { external ffi.Pointer String; @@ -53934,15 +53239,18 @@ final class cssm_context_attribute_value extends ffi.Union { external ffi.Pointer KRProfile; } -typedef CSSM_KEY_PTR = ffi.Pointer; -typedef CSSM_PADDING = uint32; -typedef CSSM_DATE_PTR = ffi.Pointer; -typedef CSSM_RANGE_PTR = ffi.Pointer; -typedef CSSM_CRYPTO_DATA_PTR = ffi.Pointer; -typedef CSSM_VERSION_PTR = ffi.Pointer; -typedef CSSM_DL_DB_HANDLE_PTR = ffi.Pointer; +final class cssm_context_attribute extends ffi.Struct { + @CSSM_ATTRIBUTE_TYPE() + external int AttributeType; -final class cssm_kr_profile extends ffi.Opaque {} + @uint32() + external int AttributeLength; + + external cssm_context_attribute_value Attribute; +} + +typedef CSSM_CONTEXT_ATTRIBUTE = cssm_context_attribute; +typedef CSSM_CONTEXT_ATTRIBUTE_PTR = ffi.Pointer; final class cssm_context extends ffi.Struct { @CSSM_CONTEXT_TYPE() @@ -53972,9 +53280,13 @@ final class cssm_context extends ffi.Struct { external int Reserved; } -typedef CSSM_CONTEXT_TYPE = uint32; -typedef CSSM_CONTEXT_ATTRIBUTE_PTR = ffi.Pointer; -typedef CSSM_CSP_HANDLE = CSSM_MODULE_HANDLE; +typedef CSSM_CONTEXT = cssm_context; +typedef CSSM_CONTEXT_PTR = ffi.Pointer; +typedef CSSM_SC_FLAGS = uint32; +typedef CSSM_CSP_READER_FLAGS = uint32; +typedef CSSM_CSP_FLAGS = uint32; +typedef CSSM_PKCS_OAEP_MGF = uint32; +typedef CSSM_PKCS_OAEP_PSOURCE = uint32; final class cssm_pkcs1_oaep_params extends ffi.Struct { @uint32() @@ -53993,8 +53305,8 @@ final class cssm_pkcs1_oaep_params extends ffi.Struct { external SecAsn1Item PSourceParams; } -typedef CSSM_PKCS_OAEP_MGF = uint32; -typedef CSSM_PKCS_OAEP_PSOURCE = uint32; +typedef CSSM_PKCS1_OAEP_PARAMS = cssm_pkcs1_oaep_params; +typedef CSSM_PKCS1_OAEP_PARAMS_PTR = ffi.Pointer; final class cssm_csp_operational_statistics extends ffi.Struct { @CSSM_BOOL() @@ -54028,7 +53340,9 @@ final class cssm_csp_operational_statistics extends ffi.Struct { external int TokenFreePrivateMem; } -typedef CSSM_CSP_FLAGS = uint32; +typedef CSSM_CSP_OPERATIONAL_STATISTICS = cssm_csp_operational_statistics; +typedef CSSM_CSP_OPERATIONAL_STATISTICS_PTR + = ffi.Pointer; final class cssm_pkcs5_pbkdf1_params extends ffi.Struct { external SecAsn1Item Passphrase; @@ -54036,6 +53350,10 @@ final class cssm_pkcs5_pbkdf1_params extends ffi.Struct { external SecAsn1Item InitVector; } +typedef CSSM_PKCS5_PBKDF1_PARAMS = cssm_pkcs5_pbkdf1_params; +typedef CSSM_PKCS5_PBKDF1_PARAMS_PTR = ffi.Pointer; +typedef CSSM_PKCS5_PBKDF2_PRF = uint32; + final class cssm_pkcs5_pbkdf2_params extends ffi.Struct { external SecAsn1Item Passphrase; @@ -54043,7 +53361,8 @@ final class cssm_pkcs5_pbkdf2_params extends ffi.Struct { external int PseudoRandomFunction; } -typedef CSSM_PKCS5_PBKDF2_PRF = uint32; +typedef CSSM_PKCS5_PBKDF2_PARAMS = cssm_pkcs5_pbkdf2_params; +typedef CSSM_PKCS5_PBKDF2_PARAMS_PTR = ffi.Pointer; final class cssm_kea_derive_params extends ffi.Struct { external SecAsn1Item Rb; @@ -54051,13 +53370,30 @@ final class cssm_kea_derive_params extends ffi.Struct { external SecAsn1Item Yb; } +typedef CSSM_KEA_DERIVE_PARAMS = cssm_kea_derive_params; +typedef CSSM_KEA_DERIVE_PARAMS_PTR = ffi.Pointer; + final class cssm_tp_authority_id extends ffi.Struct { external ffi.Pointer AuthorityCert; external CSSM_NET_ADDRESS_PTR AuthorityLocation; } -typedef CSSM_NET_ADDRESS_PTR = ffi.Pointer; +typedef CSSM_TP_AUTHORITY_ID = cssm_tp_authority_id; +typedef CSSM_TP_AUTHORITY_ID_PTR = ffi.Pointer; +typedef CSSM_TP_AUTHORITY_REQUEST_TYPE = uint32; +typedef CSSM_TP_AUTHORITY_REQUEST_TYPE_PTR = ffi.Pointer; +typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACKFunction = CSSM_RETURN Function( + CSSM_MODULE_HANDLE ModuleHandle, + ffi.Pointer CallerCtx, + CSSM_DATA_PTR VerifiedCert); +typedef DartCSSM_TP_VERIFICATION_RESULTS_CALLBACKFunction = Dartsint32 Function( + DartCSSM_INTPTR ModuleHandle, + ffi.Pointer CallerCtx, + CSSM_DATA_PTR VerifiedCert); +typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACK = ffi + .Pointer>; +typedef CSSM_OID_PTR = ffi.Pointer; final class cssm_field extends ffi.Struct { external SecAsn1Oid FieldOid; @@ -54065,6 +53401,9 @@ final class cssm_field extends ffi.Struct { external SecAsn1Item FieldValue; } +typedef CSSM_FIELD = cssm_field; +typedef CSSM_FIELD_PTR = ffi.Pointer; + final class cssm_tp_policyinfo extends ffi.Struct { @uint32() external int NumberOfPolicyIds; @@ -54074,7 +53413,12 @@ final class cssm_tp_policyinfo extends ffi.Struct { external ffi.Pointer PolicyControl; } -typedef CSSM_FIELD_PTR = ffi.Pointer; +typedef CSSM_TP_POLICYINFO = cssm_tp_policyinfo; +typedef CSSM_TP_POLICYINFO_PTR = ffi.Pointer; +typedef CSSM_TP_SERVICES = uint32; +typedef CSSM_TP_ACTION = uint32; +typedef CSSM_TP_STOP_ON = uint32; +typedef CSSM_TIMESTRING = ffi.Pointer; final class cssm_dl_db_list extends ffi.Struct { @uint32() @@ -54083,6 +53427,9 @@ final class cssm_dl_db_list extends ffi.Struct { external CSSM_DL_DB_HANDLE_PTR DLDBHandle; } +typedef CSSM_DL_DB_LIST = cssm_dl_db_list; +typedef CSSM_DL_DB_LIST_PTR = ffi.Pointer; + final class cssm_tp_callerauth_context extends ffi.Struct { external CSSM_TP_POLICYINFO Policy; @@ -54103,20 +53450,15 @@ final class cssm_tp_callerauth_context extends ffi.Struct { external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } -typedef CSSM_TP_POLICYINFO = cssm_tp_policyinfo; -typedef CSSM_TIMESTRING = ffi.Pointer; -typedef CSSM_TP_STOP_ON = uint32; -typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACK = ffi - .Pointer>; -typedef CSSM_TP_VERIFICATION_RESULTS_CALLBACKFunction = CSSM_RETURN Function( - CSSM_MODULE_HANDLE ModuleHandle, - ffi.Pointer CallerCtx, - CSSM_DATA_PTR VerifiedCert); -typedef DartCSSM_TP_VERIFICATION_RESULTS_CALLBACKFunction = Dartsint32 Function( - DartCSSM_INTPTR ModuleHandle, - ffi.Pointer CallerCtx, - CSSM_DATA_PTR VerifiedCert); -typedef CSSM_DL_DB_LIST_PTR = ffi.Pointer; +typedef CSSM_TP_CALLERAUTH_CONTEXT = cssm_tp_callerauth_context; +typedef CSSM_TP_CALLERAUTH_CONTEXT_PTR + = ffi.Pointer; +typedef CSSM_CRL_PARSE_FORMAT = uint32; +typedef CSSM_CRL_PARSE_FORMAT_PTR = ffi.Pointer; +typedef CSSM_CRL_TYPE = uint32; +typedef CSSM_CRL_TYPE_PTR = ffi.Pointer; +typedef CSSM_CRL_ENCODING = uint32; +typedef CSSM_CRL_ENCODING_PTR = ffi.Pointer; final class cssm_encoded_crl extends ffi.Struct { @CSSM_CRL_TYPE() @@ -54128,8 +53470,8 @@ final class cssm_encoded_crl extends ffi.Struct { external SecAsn1Item CrlBlob; } -typedef CSSM_CRL_TYPE = uint32; -typedef CSSM_CRL_ENCODING = uint32; +typedef CSSM_ENCODED_CRL = cssm_encoded_crl; +typedef CSSM_ENCODED_CRL_PTR = ffi.Pointer; final class cssm_parsed_crl extends ffi.Struct { @CSSM_CRL_TYPE() @@ -54141,7 +53483,8 @@ final class cssm_parsed_crl extends ffi.Struct { external ffi.Pointer ParsedCrl; } -typedef CSSM_CRL_PARSE_FORMAT = uint32; +typedef CSSM_PARSED_CRL = cssm_parsed_crl; +typedef CSSM_PARSED_CRL_PTR = ffi.Pointer; final class cssm_crl_pair extends ffi.Struct { external CSSM_ENCODED_CRL EncodedCrl; @@ -54149,8 +53492,20 @@ final class cssm_crl_pair extends ffi.Struct { external CSSM_PARSED_CRL ParsedCrl; } -typedef CSSM_ENCODED_CRL = cssm_encoded_crl; -typedef CSSM_PARSED_CRL = cssm_parsed_crl; +typedef CSSM_CRL_PAIR = cssm_crl_pair; +typedef CSSM_CRL_PAIR_PTR = ffi.Pointer; +typedef CSSM_CRLGROUP_TYPE = uint32; +typedef CSSM_CRLGROUP_TYPE_PTR = ffi.Pointer; + +final class UnnamedUnion4 extends ffi.Union { + external CSSM_DATA_PTR CrlList; + + external CSSM_ENCODED_CRL_PTR EncodedCrlList; + + external CSSM_PARSED_CRL_PTR ParsedCrlList; + + external CSSM_CRL_PAIR_PTR PairCrlList; +} final class cssm_crlgroup extends ffi.Struct { @CSSM_CRL_TYPE() @@ -54168,20 +53523,8 @@ final class cssm_crlgroup extends ffi.Struct { external int CrlGroupType; } -final class UnnamedUnion4 extends ffi.Union { - external CSSM_DATA_PTR CrlList; - - external CSSM_ENCODED_CRL_PTR EncodedCrlList; - - external CSSM_PARSED_CRL_PTR ParsedCrlList; - - external CSSM_CRL_PAIR_PTR PairCrlList; -} - -typedef CSSM_ENCODED_CRL_PTR = ffi.Pointer; -typedef CSSM_PARSED_CRL_PTR = ffi.Pointer; -typedef CSSM_CRL_PAIR_PTR = ffi.Pointer; -typedef CSSM_CRLGROUP_TYPE = uint32; +typedef CSSM_CRLGROUP = cssm_crlgroup; +typedef CSSM_CRLGROUP_PTR = ffi.Pointer; final class cssm_fieldgroup extends ffi.Struct { @ffi.Int() @@ -54190,6 +53533,10 @@ final class cssm_fieldgroup extends ffi.Struct { external CSSM_FIELD_PTR Fields; } +typedef CSSM_FIELDGROUP = cssm_fieldgroup; +typedef CSSM_FIELDGROUP_PTR = ffi.Pointer; +typedef CSSM_EVIDENCE_FORM = uint32; + final class cssm_evidence extends ffi.Struct { @CSSM_EVIDENCE_FORM() external int EvidenceForm; @@ -54197,7 +53544,8 @@ final class cssm_evidence extends ffi.Struct { external ffi.Pointer Evidence; } -typedef CSSM_EVIDENCE_FORM = uint32; +typedef CSSM_EVIDENCE = cssm_evidence; +typedef CSSM_EVIDENCE_PTR = ffi.Pointer; final class cssm_tp_verify_context extends ffi.Struct { @CSSM_TP_ACTION() @@ -54210,10 +53558,8 @@ final class cssm_tp_verify_context extends ffi.Struct { external CSSM_TP_CALLERAUTH_CONTEXT_PTR Cred; } -typedef CSSM_TP_ACTION = uint32; -typedef CSSM_CRLGROUP = cssm_crlgroup; -typedef CSSM_TP_CALLERAUTH_CONTEXT_PTR - = ffi.Pointer; +typedef CSSM_TP_VERIFY_CONTEXT = cssm_tp_verify_context; +typedef CSSM_TP_VERIFY_CONTEXT_PTR = ffi.Pointer; final class cssm_tp_verify_context_result extends ffi.Struct { @uint32() @@ -54222,7 +53568,9 @@ final class cssm_tp_verify_context_result extends ffi.Struct { external CSSM_EVIDENCE_PTR Evidence; } -typedef CSSM_EVIDENCE_PTR = ffi.Pointer; +typedef CSSM_TP_VERIFY_CONTEXT_RESULT = cssm_tp_verify_context_result; +typedef CSSM_TP_VERIFY_CONTEXT_RESULT_PTR + = ffi.Pointer; final class cssm_tp_request_set extends ffi.Struct { @uint32() @@ -54231,6 +53579,9 @@ final class cssm_tp_request_set extends ffi.Struct { external ffi.Pointer Requests; } +typedef CSSM_TP_REQUEST_SET = cssm_tp_request_set; +typedef CSSM_TP_REQUEST_SET_PTR = ffi.Pointer; + final class cssm_tp_result_set extends ffi.Struct { @uint32() external int NumberOfResults; @@ -54238,6 +53589,11 @@ final class cssm_tp_result_set extends ffi.Struct { external ffi.Pointer Results; } +typedef CSSM_TP_RESULT_SET = cssm_tp_result_set; +typedef CSSM_TP_RESULT_SET_PTR = ffi.Pointer; +typedef CSSM_TP_CONFIRM_STATUS = uint32; +typedef CSSM_TP_CONFIRM_STATUS_PTR = ffi.Pointer; + final class cssm_tp_confirm_response extends ffi.Struct { @uint32() external int NumberOfResponses; @@ -54245,7 +53601,8 @@ final class cssm_tp_confirm_response extends ffi.Struct { external CSSM_TP_CONFIRM_STATUS_PTR Responses; } -typedef CSSM_TP_CONFIRM_STATUS_PTR = ffi.Pointer; +typedef CSSM_TP_CONFIRM_RESPONSE = cssm_tp_confirm_response; +typedef CSSM_TP_CONFIRM_RESPONSE_PTR = ffi.Pointer; final class cssm_tp_certissue_input extends ffi.Struct { external CSSM_SUBSERVICE_UID CSPSubserviceUid; @@ -54269,7 +53626,9 @@ final class cssm_tp_certissue_input extends ffi.Struct { external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; } -typedef CSSM_TP_SERVICES = uint32; +typedef CSSM_TP_CERTISSUE_INPUT = cssm_tp_certissue_input; +typedef CSSM_TP_CERTISSUE_INPUT_PTR = ffi.Pointer; +typedef CSSM_TP_CERTISSUE_STATUS = uint32; final class cssm_tp_certissue_output extends ffi.Struct { @CSSM_TP_CERTISSUE_STATUS() @@ -54281,8 +53640,10 @@ final class cssm_tp_certissue_output extends ffi.Struct { external int PerformedServiceRequests; } -typedef CSSM_TP_CERTISSUE_STATUS = uint32; -typedef CSSM_CERTGROUP_PTR = ffi.Pointer; +typedef CSSM_TP_CERTISSUE_OUTPUT = cssm_tp_certissue_output; +typedef CSSM_TP_CERTISSUE_OUTPUT_PTR = ffi.Pointer; +typedef CSSM_TP_CERTCHANGE_ACTION = uint32; +typedef CSSM_TP_CERTCHANGE_REASON = uint32; final class cssm_tp_certchange_input extends ffi.Struct { @CSSM_TP_CERTCHANGE_ACTION() @@ -54303,8 +53664,9 @@ final class cssm_tp_certchange_input extends ffi.Struct { external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } -typedef CSSM_TP_CERTCHANGE_ACTION = uint32; -typedef CSSM_TP_CERTCHANGE_REASON = uint32; +typedef CSSM_TP_CERTCHANGE_INPUT = cssm_tp_certchange_input; +typedef CSSM_TP_CERTCHANGE_INPUT_PTR = ffi.Pointer; +typedef CSSM_TP_CERTCHANGE_STATUS = uint32; final class cssm_tp_certchange_output extends ffi.Struct { @CSSM_TP_CERTCHANGE_STATUS() @@ -54313,8 +53675,8 @@ final class cssm_tp_certchange_output extends ffi.Struct { external CSSM_FIELD RevokeInfo; } -typedef CSSM_TP_CERTCHANGE_STATUS = uint32; -typedef CSSM_FIELD = cssm_field; +typedef CSSM_TP_CERTCHANGE_OUTPUT = cssm_tp_certchange_output; +typedef CSSM_TP_CERTCHANGE_OUTPUT_PTR = ffi.Pointer; final class cssm_tp_certverify_input extends ffi.Struct { @CSSM_CL_HANDLE() @@ -54325,7 +53687,9 @@ final class cssm_tp_certverify_input extends ffi.Struct { external CSSM_TP_VERIFY_CONTEXT_PTR VerifyContext; } -typedef CSSM_TP_VERIFY_CONTEXT_PTR = ffi.Pointer; +typedef CSSM_TP_CERTVERIFY_INPUT = cssm_tp_certverify_input; +typedef CSSM_TP_CERTVERIFY_INPUT_PTR = ffi.Pointer; +typedef CSSM_TP_CERTVERIFY_STATUS = uint32; final class cssm_tp_certverify_output extends ffi.Struct { @CSSM_TP_CERTVERIFY_STATUS() @@ -54337,7 +53701,8 @@ final class cssm_tp_certverify_output extends ffi.Struct { external CSSM_EVIDENCE_PTR Evidence; } -typedef CSSM_TP_CERTVERIFY_STATUS = uint32; +typedef CSSM_TP_CERTVERIFY_OUTPUT = cssm_tp_certverify_output; +typedef CSSM_TP_CERTVERIFY_OUTPUT_PTR = ffi.Pointer; final class cssm_tp_certnotarize_input extends ffi.Struct { @CSSM_CL_HANDLE() @@ -54364,6 +53729,11 @@ final class cssm_tp_certnotarize_input extends ffi.Struct { external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; } +typedef CSSM_TP_CERTNOTARIZE_INPUT = cssm_tp_certnotarize_input; +typedef CSSM_TP_CERTNOTARIZE_INPUT_PTR + = ffi.Pointer; +typedef CSSM_TP_CERTNOTARIZE_STATUS = uint32; + final class cssm_tp_certnotarize_output extends ffi.Struct { @CSSM_TP_CERTNOTARIZE_STATUS() external int NotarizeStatus; @@ -54374,7 +53744,9 @@ final class cssm_tp_certnotarize_output extends ffi.Struct { external int PerformedServiceRequests; } -typedef CSSM_TP_CERTNOTARIZE_STATUS = uint32; +typedef CSSM_TP_CERTNOTARIZE_OUTPUT = cssm_tp_certnotarize_output; +typedef CSSM_TP_CERTNOTARIZE_OUTPUT_PTR + = ffi.Pointer; final class cssm_tp_certreclaim_input extends ffi.Struct { @CSSM_CL_HANDLE() @@ -54388,6 +53760,10 @@ final class cssm_tp_certreclaim_input extends ffi.Struct { external CSSM_ACCESS_CREDENTIALS_PTR UserCredentials; } +typedef CSSM_TP_CERTRECLAIM_INPUT = cssm_tp_certreclaim_input; +typedef CSSM_TP_CERTRECLAIM_INPUT_PTR = ffi.Pointer; +typedef CSSM_TP_CERTRECLAIM_STATUS = uint32; + final class cssm_tp_certreclaim_output extends ffi.Struct { @CSSM_TP_CERTRECLAIM_STATUS() external int ReclaimStatus; @@ -54398,10 +53774,9 @@ final class cssm_tp_certreclaim_output extends ffi.Struct { external int KeyCacheHandle; } -typedef CSSM_TP_CERTRECLAIM_STATUS = uint32; -typedef CSSM_LONG_HANDLE = uint64; -typedef uint64 = ffi.Uint64; -typedef Dartuint64 = int; +typedef CSSM_TP_CERTRECLAIM_OUTPUT = cssm_tp_certreclaim_output; +typedef CSSM_TP_CERTRECLAIM_OUTPUT_PTR + = ffi.Pointer; final class cssm_tp_crlissue_input extends ffi.Struct { @CSSM_CL_HANDLE() @@ -54417,6 +53792,10 @@ final class cssm_tp_crlissue_input extends ffi.Struct { external CSSM_ACCESS_CREDENTIALS_PTR CallerCredentials; } +typedef CSSM_TP_CRLISSUE_INPUT = cssm_tp_crlissue_input; +typedef CSSM_TP_CRLISSUE_INPUT_PTR = ffi.Pointer; +typedef CSSM_TP_CRLISSUE_STATUS = uint32; + final class cssm_tp_crlissue_output extends ffi.Struct { @CSSM_TP_CRLISSUE_STATUS() external int IssueStatus; @@ -54426,7 +53805,12 @@ final class cssm_tp_crlissue_output extends ffi.Struct { external CSSM_TIMESTRING CrlNextTime; } -typedef CSSM_TP_CRLISSUE_STATUS = uint32; +typedef CSSM_TP_CRLISSUE_OUTPUT = cssm_tp_crlissue_output; +typedef CSSM_TP_CRLISSUE_OUTPUT_PTR = ffi.Pointer; +typedef CSSM_TP_FORM_TYPE = uint32; +typedef CSSM_CL_TEMPLATE_TYPE = uint32; +typedef CSSM_CERT_BUNDLE_TYPE = uint32; +typedef CSSM_CERT_BUNDLE_ENCODING = uint32; final class cssm_cert_bundle_header extends ffi.Struct { @CSSM_CERT_BUNDLE_TYPE() @@ -54436,8 +53820,8 @@ final class cssm_cert_bundle_header extends ffi.Struct { external int BundleEncoding; } -typedef CSSM_CERT_BUNDLE_TYPE = uint32; -typedef CSSM_CERT_BUNDLE_ENCODING = uint32; +typedef CSSM_CERT_BUNDLE_HEADER = cssm_cert_bundle_header; +typedef CSSM_CERT_BUNDLE_HEADER_PTR = ffi.Pointer; final class cssm_cert_bundle extends ffi.Struct { external CSSM_CERT_BUNDLE_HEADER BundleHeader; @@ -54445,19 +53829,12 @@ final class cssm_cert_bundle extends ffi.Struct { external SecAsn1Item Bundle; } -typedef CSSM_CERT_BUNDLE_HEADER = cssm_cert_bundle_header; - -final class cssm_db_attribute_info extends ffi.Struct { - @CSSM_DB_ATTRIBUTE_NAME_FORMAT() - external int AttributeNameFormat; - - external cssm_db_attribute_label Label; - - @CSSM_DB_ATTRIBUTE_FORMAT() - external int AttributeFormat; -} - +typedef CSSM_CERT_BUNDLE = cssm_cert_bundle; +typedef CSSM_CERT_BUNDLE_PTR = ffi.Pointer; typedef CSSM_DB_ATTRIBUTE_NAME_FORMAT = uint32; +typedef CSSM_DB_ATTRIBUTE_NAME_FORMAT_PTR = ffi.Pointer; +typedef CSSM_DB_ATTRIBUTE_FORMAT = uint32; +typedef CSSM_DB_ATTRIBUTE_FORMAT_PTR = ffi.Pointer; final class cssm_db_attribute_label extends ffi.Union { external ffi.Pointer AttributeName; @@ -54468,7 +53845,18 @@ final class cssm_db_attribute_label extends ffi.Union { external int AttributeID; } -typedef CSSM_DB_ATTRIBUTE_FORMAT = uint32; +final class cssm_db_attribute_info extends ffi.Struct { + @CSSM_DB_ATTRIBUTE_NAME_FORMAT() + external int AttributeNameFormat; + + external cssm_db_attribute_label Label; + + @CSSM_DB_ATTRIBUTE_FORMAT() + external int AttributeFormat; +} + +typedef CSSM_DB_ATTRIBUTE_INFO = cssm_db_attribute_info; +typedef CSSM_DB_ATTRIBUTE_INFO_PTR = ffi.Pointer; final class cssm_db_attribute_data extends ffi.Struct { external CSSM_DB_ATTRIBUTE_INFO Info; @@ -54479,7 +53867,9 @@ final class cssm_db_attribute_data extends ffi.Struct { external CSSM_DATA_PTR Value; } -typedef CSSM_DB_ATTRIBUTE_INFO = cssm_db_attribute_info; +typedef CSSM_DB_ATTRIBUTE_DATA = cssm_db_attribute_data; +typedef CSSM_DB_ATTRIBUTE_DATA_PTR = ffi.Pointer; +typedef CSSM_DB_RECORDTYPE = uint32; final class cssm_db_record_attribute_info extends ffi.Struct { @CSSM_DB_RECORDTYPE() @@ -54491,8 +53881,9 @@ final class cssm_db_record_attribute_info extends ffi.Struct { external CSSM_DB_ATTRIBUTE_INFO_PTR AttributeInfo; } -typedef CSSM_DB_RECORDTYPE = uint32; -typedef CSSM_DB_ATTRIBUTE_INFO_PTR = ffi.Pointer; +typedef CSSM_DB_RECORD_ATTRIBUTE_INFO = cssm_db_record_attribute_info; +typedef CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR + = ffi.Pointer; final class cssm_db_record_attribute_data extends ffi.Struct { @CSSM_DB_RECORDTYPE() @@ -54507,7 +53898,9 @@ final class cssm_db_record_attribute_data extends ffi.Struct { external CSSM_DB_ATTRIBUTE_DATA_PTR AttributeData; } -typedef CSSM_DB_ATTRIBUTE_DATA_PTR = ffi.Pointer; +typedef CSSM_DB_RECORD_ATTRIBUTE_DATA = cssm_db_record_attribute_data; +typedef CSSM_DB_RECORD_ATTRIBUTE_DATA_PTR + = ffi.Pointer; final class cssm_db_parsing_module_info extends ffi.Struct { @CSSM_DB_RECORDTYPE() @@ -54516,6 +53909,12 @@ final class cssm_db_parsing_module_info extends ffi.Struct { external CSSM_SUBSERVICE_UID ModuleSubserviceUid; } +typedef CSSM_DB_PARSING_MODULE_INFO = cssm_db_parsing_module_info; +typedef CSSM_DB_PARSING_MODULE_INFO_PTR + = ffi.Pointer; +typedef CSSM_DB_INDEX_TYPE = uint32; +typedef CSSM_DB_INDEXED_DATA_LOCATION = uint32; + final class cssm_db_index_info extends ffi.Struct { @CSSM_DB_INDEX_TYPE() external int IndexType; @@ -54526,8 +53925,8 @@ final class cssm_db_index_info extends ffi.Struct { external CSSM_DB_ATTRIBUTE_INFO Info; } -typedef CSSM_DB_INDEX_TYPE = uint32; -typedef CSSM_DB_INDEXED_DATA_LOCATION = uint32; +typedef CSSM_DB_INDEX_INFO = cssm_db_index_info; +typedef CSSM_DB_INDEX_INFO_PTR = ffi.Pointer; final class cssm_db_unique_record extends ffi.Struct { external CSSM_DB_INDEX_INFO RecordLocator; @@ -54535,7 +53934,8 @@ final class cssm_db_unique_record extends ffi.Struct { external SecAsn1Item RecordIdentifier; } -typedef CSSM_DB_INDEX_INFO = cssm_db_index_info; +typedef CSSM_DB_UNIQUE_RECORD = cssm_db_unique_record; +typedef CSSM_DB_UNIQUE_RECORD_PTR = ffi.Pointer; final class cssm_db_record_index_info extends ffi.Struct { @CSSM_DB_RECORDTYPE() @@ -54547,7 +53947,11 @@ final class cssm_db_record_index_info extends ffi.Struct { external CSSM_DB_INDEX_INFO_PTR IndexInfo; } -typedef CSSM_DB_INDEX_INFO_PTR = ffi.Pointer; +typedef CSSM_DB_RECORD_INDEX_INFO = cssm_db_record_index_info; +typedef CSSM_DB_RECORD_INDEX_INFO_PTR = ffi.Pointer; +typedef CSSM_DB_ACCESS_TYPE = uint32; +typedef CSSM_DB_ACCESS_TYPE_PTR = ffi.Pointer; +typedef CSSM_DB_MODIFY_MODE = uint32; final class cssm_dbinfo extends ffi.Struct { @uint32() @@ -54567,11 +53971,12 @@ final class cssm_dbinfo extends ffi.Struct { external ffi.Pointer Reserved; } -typedef CSSM_DB_PARSING_MODULE_INFO_PTR - = ffi.Pointer; -typedef CSSM_DB_RECORD_ATTRIBUTE_INFO_PTR - = ffi.Pointer; -typedef CSSM_DB_RECORD_INDEX_INFO_PTR = ffi.Pointer; +typedef CSSM_DBINFO = cssm_dbinfo; +typedef CSSM_DBINFO_PTR = ffi.Pointer; +typedef CSSM_DB_OPERATOR = uint32; +typedef CSSM_DB_OPERATOR_PTR = ffi.Pointer; +typedef CSSM_DB_CONJUNCTIVE = uint32; +typedef CSSM_DB_CONJUNCTIVE_PTR = ffi.Pointer; final class cssm_selection_predicate extends ffi.Struct { @CSSM_DB_OPERATOR() @@ -54580,8 +53985,8 @@ final class cssm_selection_predicate extends ffi.Struct { external CSSM_DB_ATTRIBUTE_DATA Attribute; } -typedef CSSM_DB_OPERATOR = uint32; -typedef CSSM_DB_ATTRIBUTE_DATA = cssm_db_attribute_data; +typedef CSSM_SELECTION_PREDICATE = cssm_selection_predicate; +typedef CSSM_SELECTION_PREDICATE_PTR = ffi.Pointer; final class cssm_query_limits extends ffi.Struct { @uint32() @@ -54591,6 +53996,10 @@ final class cssm_query_limits extends ffi.Struct { external int SizeLimit; } +typedef CSSM_QUERY_LIMITS = cssm_query_limits; +typedef CSSM_QUERY_LIMITS_PTR = ffi.Pointer; +typedef CSSM_QUERY_FLAGS = uint32; + final class cssm_query extends ffi.Struct { @CSSM_DB_RECORDTYPE() external int RecordType; @@ -54609,16 +54018,23 @@ final class cssm_query extends ffi.Struct { external int QueryFlags; } -typedef CSSM_DB_CONJUNCTIVE = uint32; -typedef CSSM_SELECTION_PREDICATE_PTR = ffi.Pointer; -typedef CSSM_QUERY_LIMITS = cssm_query_limits; -typedef CSSM_QUERY_FLAGS = uint32; +typedef CSSM_QUERY = cssm_query; +typedef CSSM_QUERY_PTR = ffi.Pointer; +typedef CSSM_DLTYPE = uint32; +typedef CSSM_DLTYPE_PTR = ffi.Pointer; +typedef CSSM_DL_CUSTOM_ATTRIBUTES = ffi.Pointer; +typedef CSSM_DL_LDAP_ATTRIBUTES = ffi.Pointer; +typedef CSSM_DL_ODBC_ATTRIBUTES = ffi.Pointer; +typedef CSSM_DL_FFS_ATTRIBUTES = ffi.Pointer; final class cssm_dl_pkcs11_attributes extends ffi.Struct { @uint32() external int DeviceAccessFlags; } +typedef CSSM_DL_PKCS11_ATTRIBUTE = ffi.Pointer; +typedef CSSM_DL_PKCS11_ATTRIBUTE_PTR = ffi.Pointer; + final class cssm_name_list extends ffi.Struct { @uint32() external int NumStrings; @@ -54626,6 +54042,10 @@ final class cssm_name_list extends ffi.Struct { external ffi.Pointer> String; } +typedef CSSM_NAME_LIST = cssm_name_list; +typedef CSSM_NAME_LIST_PTR = ffi.Pointer; +typedef CSSM_DB_RETRIEVAL_MODES = uint32; + final class cssm_db_schema_attribute_info extends ffi.Struct { @uint32() external int AttributeId; @@ -54638,6 +54058,10 @@ final class cssm_db_schema_attribute_info extends ffi.Struct { external int DataType; } +typedef CSSM_DB_SCHEMA_ATTRIBUTE_INFO = cssm_db_schema_attribute_info; +typedef CSSM_DB_SCHEMA_ATTRIBUTE_INFO_PTR + = ffi.Pointer; + final class cssm_db_schema_index_info extends ffi.Struct { @uint32() external int AttributeId; @@ -54652,6 +54076,11 @@ final class cssm_db_schema_index_info extends ffi.Struct { external int IndexedDataLocation; } +typedef CSSM_DB_SCHEMA_INDEX_INFO = cssm_db_schema_index_info; +typedef CSSM_DB_SCHEMA_INDEX_INFO_PTR = ffi.Pointer; +typedef CSSM_BER_TAG = uint8; +typedef CSSM_X509_ALGORITHM_IDENTIFIER_PTR = ffi.Pointer; + final class cssm_x509_type_value_pair extends ffi.Struct { external SecAsn1Oid type; @@ -54661,7 +54090,8 @@ final class cssm_x509_type_value_pair extends ffi.Struct { external SecAsn1Item value; } -typedef CSSM_BER_TAG = uint8; +typedef CSSM_X509_TYPE_VALUE_PAIR = cssm_x509_type_value_pair; +typedef CSSM_X509_TYPE_VALUE_PAIR_PTR = ffi.Pointer; final class cssm_x509_rdn extends ffi.Struct { @uint32() @@ -54670,7 +54100,8 @@ final class cssm_x509_rdn extends ffi.Struct { external CSSM_X509_TYPE_VALUE_PAIR_PTR AttributeTypeAndValue; } -typedef CSSM_X509_TYPE_VALUE_PAIR_PTR = ffi.Pointer; +typedef CSSM_X509_RDN = cssm_x509_rdn; +typedef CSSM_X509_RDN_PTR = ffi.Pointer; final class cssm_x509_name extends ffi.Struct { @uint32() @@ -54679,7 +54110,9 @@ final class cssm_x509_name extends ffi.Struct { external CSSM_X509_RDN_PTR RelativeDistinguishedName; } -typedef CSSM_X509_RDN_PTR = ffi.Pointer; +typedef CSSM_X509_NAME = cssm_x509_name; +typedef CSSM_X509_NAME_PTR = ffi.Pointer; +typedef CSSM_X509_SUBJECT_PUBLIC_KEY_INFO_PTR = ffi.Pointer; final class cssm_x509_time extends ffi.Struct { @CSSM_BER_TAG() @@ -54688,13 +54121,18 @@ final class cssm_x509_time extends ffi.Struct { external SecAsn1Item time; } +typedef CSSM_X509_TIME = cssm_x509_time; +typedef CSSM_X509_TIME_PTR = ffi.Pointer; + final class x509_validity extends ffi.Struct { external CSSM_X509_TIME notBefore; external CSSM_X509_TIME notAfter; } -typedef CSSM_X509_TIME = cssm_x509_time; +typedef CSSM_X509_VALIDITY = x509_validity; +typedef CSSM_X509_VALIDITY_PTR = ffi.Pointer; +typedef CSSM_X509_OPTION = CSSM_BOOL; final class cssm_x509ext_basicConstraints extends ffi.Struct { @CSSM_BOOL() @@ -54707,7 +54145,26 @@ final class cssm_x509ext_basicConstraints extends ffi.Struct { external int pathLenConstraint; } -typedef CSSM_X509_OPTION = CSSM_BOOL; +typedef CSSM_X509EXT_BASICCONSTRAINTS = cssm_x509ext_basicConstraints; +typedef CSSM_X509EXT_BASICCONSTRAINTS_PTR + = ffi.Pointer; + +enum extension_data_format { + CSSM_X509_DATAFORMAT_ENCODED(0), + CSSM_X509_DATAFORMAT_PARSED(1), + CSSM_X509_DATAFORMAT_PAIR(2); + + final int value; + const extension_data_format(this.value); + + static extension_data_format fromValue(int value) => switch (value) { + 0 => CSSM_X509_DATAFORMAT_ENCODED, + 1 => CSSM_X509_DATAFORMAT_PARSED, + 2 => CSSM_X509_DATAFORMAT_PAIR, + _ => throw ArgumentError( + "Unknown value for extension_data_format: $value"), + }; +} final class cssm_x509_extensionTagAndValue extends ffi.Struct { @CSSM_BER_TAG() @@ -54716,13 +54173,26 @@ final class cssm_x509_extensionTagAndValue extends ffi.Struct { external SecAsn1Item value; } +typedef CSSM_X509EXT_TAGandVALUE = cssm_x509_extensionTagAndValue; +typedef CSSM_X509EXT_TAGandVALUE_PTR + = ffi.Pointer; + final class cssm_x509ext_pair extends ffi.Struct { external CSSM_X509EXT_TAGandVALUE tagAndValue; external ffi.Pointer parsedValue; } -typedef CSSM_X509EXT_TAGandVALUE = cssm_x509_extensionTagAndValue; +typedef CSSM_X509EXT_PAIR = cssm_x509ext_pair; +typedef CSSM_X509EXT_PAIR_PTR = ffi.Pointer; + +final class cssm_x509ext_value extends ffi.Union { + external ffi.Pointer tagAndValue; + + external ffi.Pointer parsedValue; + + external ffi.Pointer valuePair; +} final class cssm_x509_extension extends ffi.Struct { external SecAsn1Oid extnId; @@ -54741,32 +54211,8 @@ final class cssm_x509_extension extends ffi.Struct { external SecAsn1Item BERvalue; } -enum extension_data_format { - CSSM_X509_DATAFORMAT_ENCODED(0), - CSSM_X509_DATAFORMAT_PARSED(1), - CSSM_X509_DATAFORMAT_PAIR(2); - - final int value; - const extension_data_format(this.value); - - static extension_data_format fromValue(int value) => switch (value) { - 0 => CSSM_X509_DATAFORMAT_ENCODED, - 1 => CSSM_X509_DATAFORMAT_PARSED, - 2 => CSSM_X509_DATAFORMAT_PAIR, - _ => throw ArgumentError( - "Unknown value for extension_data_format: $value"), - }; -} - -final class cssm_x509ext_value extends ffi.Union { - external ffi.Pointer tagAndValue; - - external ffi.Pointer parsedValue; - - external ffi.Pointer valuePair; -} - -typedef CSSM_X509EXT_PAIR = cssm_x509ext_pair; +typedef CSSM_X509_EXTENSION = cssm_x509_extension; +typedef CSSM_X509_EXTENSION_PTR = ffi.Pointer; final class cssm_x509_extensions extends ffi.Struct { @uint32() @@ -54775,7 +54221,8 @@ final class cssm_x509_extensions extends ffi.Struct { external CSSM_X509_EXTENSION_PTR extensions; } -typedef CSSM_X509_EXTENSION_PTR = ffi.Pointer; +typedef CSSM_X509_EXTENSIONS = cssm_x509_extensions; +typedef CSSM_X509_EXTENSIONS_PTR = ffi.Pointer; final class cssm_x509_tbs_certificate extends ffi.Struct { external SecAsn1Item version; @@ -54799,9 +54246,8 @@ final class cssm_x509_tbs_certificate extends ffi.Struct { external CSSM_X509_EXTENSIONS extensions; } -typedef CSSM_X509_NAME = cssm_x509_name; -typedef CSSM_X509_VALIDITY = x509_validity; -typedef CSSM_X509_EXTENSIONS = cssm_x509_extensions; +typedef CSSM_X509_TBS_CERTIFICATE = cssm_x509_tbs_certificate; +typedef CSSM_X509_TBS_CERTIFICATE_PTR = ffi.Pointer; final class cssm_x509_signature extends ffi.Struct { external SecAsn1AlgId algorithmIdentifier; @@ -54809,14 +54255,18 @@ final class cssm_x509_signature extends ffi.Struct { external SecAsn1Item encrypted; } +typedef CSSM_X509_SIGNATURE = cssm_x509_signature; +typedef CSSM_X509_SIGNATURE_PTR = ffi.Pointer; + final class cssm_x509_signed_certificate extends ffi.Struct { external CSSM_X509_TBS_CERTIFICATE certificate; external CSSM_X509_SIGNATURE signature; } -typedef CSSM_X509_TBS_CERTIFICATE = cssm_x509_tbs_certificate; -typedef CSSM_X509_SIGNATURE = cssm_x509_signature; +typedef CSSM_X509_SIGNED_CERTIFICATE = cssm_x509_signed_certificate; +typedef CSSM_X509_SIGNED_CERTIFICATE_PTR + = ffi.Pointer; final class cssm_x509ext_policyQualifierInfo extends ffi.Struct { external SecAsn1Oid policyQualifierId; @@ -54824,6 +54274,10 @@ final class cssm_x509ext_policyQualifierInfo extends ffi.Struct { external SecAsn1Item value; } +typedef CSSM_X509EXT_POLICYQUALIFIERINFO = cssm_x509ext_policyQualifierInfo; +typedef CSSM_X509EXT_POLICYQUALIFIERINFO_PTR + = ffi.Pointer; + final class cssm_x509ext_policyQualifiers extends ffi.Struct { @uint32() external int numberOfPolicyQualifiers; @@ -54831,7 +54285,9 @@ final class cssm_x509ext_policyQualifiers extends ffi.Struct { external ffi.Pointer policyQualifier; } -typedef CSSM_X509EXT_POLICYQUALIFIERINFO = cssm_x509ext_policyQualifierInfo; +typedef CSSM_X509EXT_POLICYQUALIFIERS = cssm_x509ext_policyQualifiers; +typedef CSSM_X509EXT_POLICYQUALIFIERS_PTR + = ffi.Pointer; final class cssm_x509ext_policyInfo extends ffi.Struct { external SecAsn1Oid policyIdentifier; @@ -54839,7 +54295,8 @@ final class cssm_x509ext_policyInfo extends ffi.Struct { external CSSM_X509EXT_POLICYQUALIFIERS policyQualifiers; } -typedef CSSM_X509EXT_POLICYQUALIFIERS = cssm_x509ext_policyQualifiers; +typedef CSSM_X509EXT_POLICYINFO = cssm_x509ext_policyInfo; +typedef CSSM_X509EXT_POLICYINFO_PTR = ffi.Pointer; final class cssm_x509_revoked_cert_entry extends ffi.Struct { external SecAsn1Item certificateSerialNumber; @@ -54849,6 +54306,10 @@ final class cssm_x509_revoked_cert_entry extends ffi.Struct { external CSSM_X509_EXTENSIONS extensions; } +typedef CSSM_X509_REVOKED_CERT_ENTRY = cssm_x509_revoked_cert_entry; +typedef CSSM_X509_REVOKED_CERT_ENTRY_PTR + = ffi.Pointer; + final class cssm_x509_revoked_cert_list extends ffi.Struct { @uint32() external int numberOfRevokedCertEntries; @@ -54856,8 +54317,9 @@ final class cssm_x509_revoked_cert_list extends ffi.Struct { external CSSM_X509_REVOKED_CERT_ENTRY_PTR revokedCertEntry; } -typedef CSSM_X509_REVOKED_CERT_ENTRY_PTR - = ffi.Pointer; +typedef CSSM_X509_REVOKED_CERT_LIST = cssm_x509_revoked_cert_list; +typedef CSSM_X509_REVOKED_CERT_LIST_PTR + = ffi.Pointer; final class cssm_x509_tbs_certlist extends ffi.Struct { external SecAsn1Item version; @@ -54875,8 +54337,8 @@ final class cssm_x509_tbs_certlist extends ffi.Struct { external CSSM_X509_EXTENSIONS extensions; } -typedef CSSM_X509_REVOKED_CERT_LIST_PTR - = ffi.Pointer; +typedef CSSM_X509_TBS_CERTLIST = cssm_x509_tbs_certlist; +typedef CSSM_X509_TBS_CERTLIST_PTR = ffi.Pointer; final class cssm_x509_signed_crl extends ffi.Struct { external CSSM_X509_TBS_CERTLIST tbsCertList; @@ -54884,26 +54346,8 @@ final class cssm_x509_signed_crl extends ffi.Struct { external CSSM_X509_SIGNATURE signature; } -typedef CSSM_X509_TBS_CERTLIST = cssm_x509_tbs_certlist; - -final class __CE_OtherName extends ffi.Struct { - external SecAsn1Oid typeId; - - external SecAsn1Item value; -} - -final class __CE_GeneralName extends ffi.Struct { - @ffi.UnsignedInt() - external int nameTypeAsInt; - - __CE_GeneralNameType get nameType => - __CE_GeneralNameType.fromValue(nameTypeAsInt); - - @CSSM_BOOL() - external int berEncoded; - - external SecAsn1Item name; -} +typedef CSSM_X509_SIGNED_CRL = cssm_x509_signed_crl; +typedef CSSM_X509_SIGNED_CRL_PTR = ffi.Pointer; enum __CE_GeneralNameType { GNT_OtherName(0), @@ -54934,6 +54378,29 @@ enum __CE_GeneralNameType { }; } +final class __CE_OtherName extends ffi.Struct { + external SecAsn1Oid typeId; + + external SecAsn1Item value; +} + +typedef CE_OtherName = __CE_OtherName; + +final class __CE_GeneralName extends ffi.Struct { + @ffi.UnsignedInt() + external int nameTypeAsInt; + + __CE_GeneralNameType get nameType => + __CE_GeneralNameType.fromValue(nameTypeAsInt); + + @CSSM_BOOL() + external int berEncoded; + + external SecAsn1Item name; +} + +typedef CE_GeneralName = __CE_GeneralName; + final class __CE_GeneralNames extends ffi.Struct { @uint32() external int numNames; @@ -54941,7 +54408,7 @@ final class __CE_GeneralNames extends ffi.Struct { external ffi.Pointer generalName; } -typedef CE_GeneralName = __CE_GeneralName; +typedef CE_GeneralNames = __CE_GeneralNames; final class __CE_AuthorityKeyID extends ffi.Struct { @CSSM_BOOL() @@ -54960,7 +54427,10 @@ final class __CE_AuthorityKeyID extends ffi.Struct { external SecAsn1Item serialNumber; } -typedef CE_GeneralNames = __CE_GeneralNames; +typedef CE_AuthorityKeyID = __CE_AuthorityKeyID; +typedef CE_SubjectKeyID = SecAsn1Item; +typedef CE_KeyUsage = uint16; +typedef CE_CrlReason = uint32; final class __CE_ExtendedKeyUsage extends ffi.Struct { @uint32() @@ -54969,7 +54439,7 @@ final class __CE_ExtendedKeyUsage extends ffi.Struct { external CSSM_OID_PTR purposes; } -typedef CSSM_OID_PTR = ffi.Pointer; +typedef CE_ExtendedKeyUsage = __CE_ExtendedKeyUsage; final class __CE_BasicConstraints extends ffi.Struct { @CSSM_BOOL() @@ -54982,12 +54452,16 @@ final class __CE_BasicConstraints extends ffi.Struct { external int pathLenConstraint; } +typedef CE_BasicConstraints = __CE_BasicConstraints; + final class __CE_PolicyQualifierInfo extends ffi.Struct { external SecAsn1Oid policyQualifierId; external SecAsn1Item qualifier; } +typedef CE_PolicyQualifierInfo = __CE_PolicyQualifierInfo; + final class __CE_PolicyInformation extends ffi.Struct { external SecAsn1Oid certPolicyId; @@ -54997,7 +54471,7 @@ final class __CE_PolicyInformation extends ffi.Struct { external ffi.Pointer policyQualifiers; } -typedef CE_PolicyQualifierInfo = __CE_PolicyQualifierInfo; +typedef CE_PolicyInformation = __CE_PolicyInformation; final class __CE_CertPolicies extends ffi.Struct { @uint32() @@ -55006,17 +54480,9 @@ final class __CE_CertPolicies extends ffi.Struct { external ffi.Pointer policies; } -typedef CE_PolicyInformation = __CE_PolicyInformation; - -final class __CE_DistributionPointName extends ffi.Struct { - @ffi.UnsignedInt() - external int nameTypeAsInt; - - __CE_CrlDistributionPointNameType get nameType => - __CE_CrlDistributionPointNameType.fromValue(nameTypeAsInt); - - external UnnamedUnion5 dpn; -} +typedef CE_CertPolicies = __CE_CertPolicies; +typedef CE_NetscapeCertType = uint16; +typedef CE_CrlDistReasonFlags = uint8; enum __CE_CrlDistributionPointNameType { CE_CDNT_FullName(0), @@ -55040,6 +54506,18 @@ final class UnnamedUnion5 extends ffi.Union { external CSSM_X509_RDN_PTR rdn; } +final class __CE_DistributionPointName extends ffi.Struct { + @ffi.UnsignedInt() + external int nameTypeAsInt; + + __CE_CrlDistributionPointNameType get nameType => + __CE_CrlDistributionPointNameType.fromValue(nameTypeAsInt); + + external UnnamedUnion5 dpn; +} + +typedef CE_DistributionPointName = __CE_DistributionPointName; + final class __CE_CRLDistributionPoint extends ffi.Struct { external ffi.Pointer distPointName; @@ -55052,8 +54530,7 @@ final class __CE_CRLDistributionPoint extends ffi.Struct { external ffi.Pointer crlIssuer; } -typedef CE_DistributionPointName = __CE_DistributionPointName; -typedef CE_CrlDistReasonFlags = uint8; +typedef CE_CRLDistributionPoint = __CE_CRLDistributionPoint; final class __CE_CRLDistPointsSyntax extends ffi.Struct { @uint32() @@ -55062,7 +54539,7 @@ final class __CE_CRLDistPointsSyntax extends ffi.Struct { external ffi.Pointer distPoints; } -typedef CE_CRLDistributionPoint = __CE_CRLDistributionPoint; +typedef CE_CRLDistPointsSyntax = __CE_CRLDistPointsSyntax; final class __CE_AccessDescription extends ffi.Struct { external SecAsn1Oid accessMethod; @@ -55070,6 +54547,8 @@ final class __CE_AccessDescription extends ffi.Struct { external CE_GeneralName accessLocation; } +typedef CE_AccessDescription = __CE_AccessDescription; + final class __CE_AuthorityInfoAccess extends ffi.Struct { @uint32() external int numAccessDescriptions; @@ -55077,7 +54556,8 @@ final class __CE_AuthorityInfoAccess extends ffi.Struct { external ffi.Pointer accessDescriptions; } -typedef CE_AccessDescription = __CE_AccessDescription; +typedef CE_AuthorityInfoAccess = __CE_AuthorityInfoAccess; +typedef CE_NameRegistrationAuthorities = CE_GeneralNames; final class __CE_SemanticsInformation extends ffi.Struct { external ffi.Pointer semanticsIdentifier; @@ -55086,7 +54566,7 @@ final class __CE_SemanticsInformation extends ffi.Struct { nameRegistrationAuthorities; } -typedef CE_NameRegistrationAuthorities = CE_GeneralNames; +typedef CE_SemanticsInformation = __CE_SemanticsInformation; final class __CE_QC_Statement extends ffi.Struct { external SecAsn1Oid statementId; @@ -55096,7 +54576,7 @@ final class __CE_QC_Statement extends ffi.Struct { external ffi.Pointer otherInfo; } -typedef CE_SemanticsInformation = __CE_SemanticsInformation; +typedef CE_QC_Statement = __CE_QC_Statement; final class __CE_QC_Statements extends ffi.Struct { @uint32() @@ -55105,7 +54585,9 @@ final class __CE_QC_Statements extends ffi.Struct { external ffi.Pointer qcStatements; } -typedef CE_QC_Statement = __CE_QC_Statement; +typedef CE_QC_Statements = __CE_QC_Statements; +typedef CE_CrlNumber = uint32; +typedef CE_DeltaCrl = uint32; final class __CE_IssuingDistributionPoint extends ffi.Struct { external ffi.Pointer distPointName; @@ -55135,6 +54617,8 @@ final class __CE_IssuingDistributionPoint extends ffi.Struct { external int indirectCrl; } +typedef CE_IssuingDistributionPoint = __CE_IssuingDistributionPoint; + final class __CE_GeneralSubtree extends ffi.Struct { external ffi.Pointer base; @@ -55148,6 +54632,8 @@ final class __CE_GeneralSubtree extends ffi.Struct { external int maximum; } +typedef CE_GeneralSubtree = __CE_GeneralSubtree; + final class __CE_GeneralSubtrees extends ffi.Struct { @uint32() external int numSubtrees; @@ -55155,7 +54641,7 @@ final class __CE_GeneralSubtrees extends ffi.Struct { external ffi.Pointer subtrees; } -typedef CE_GeneralSubtree = __CE_GeneralSubtree; +typedef CE_GeneralSubtrees = __CE_GeneralSubtrees; final class __CE_NameConstraints extends ffi.Struct { external ffi.Pointer permitted; @@ -55163,7 +54649,7 @@ final class __CE_NameConstraints extends ffi.Struct { external ffi.Pointer excluded; } -typedef CE_GeneralSubtrees = __CE_GeneralSubtrees; +typedef CE_NameConstraints = __CE_NameConstraints; final class __CE_PolicyMapping extends ffi.Struct { external SecAsn1Oid issuerDomainPolicy; @@ -55171,6 +54657,8 @@ final class __CE_PolicyMapping extends ffi.Struct { external SecAsn1Oid subjectDomainPolicy; } +typedef CE_PolicyMapping = __CE_PolicyMapping; + final class __CE_PolicyMappings extends ffi.Struct { @uint32() external int numPolicyMappings; @@ -55178,7 +54666,7 @@ final class __CE_PolicyMappings extends ffi.Struct { external ffi.Pointer policyMappings; } -typedef CE_PolicyMapping = __CE_PolicyMapping; +typedef CE_PolicyMappings = __CE_PolicyMappings; final class __CE_PolicyConstraints extends ffi.Struct { @CSSM_BOOL() @@ -55194,6 +54682,61 @@ final class __CE_PolicyConstraints extends ffi.Struct { external int inhibitPolicyMapping; } +typedef CE_PolicyConstraints = __CE_PolicyConstraints; +typedef CE_InhibitAnyPolicy = uint32; + +enum __CE_DataType { + DT_AuthorityKeyID(0), + DT_SubjectKeyID(1), + DT_KeyUsage(2), + DT_SubjectAltName(3), + DT_IssuerAltName(4), + DT_ExtendedKeyUsage(5), + DT_BasicConstraints(6), + DT_CertPolicies(7), + DT_NetscapeCertType(8), + DT_CrlNumber(9), + DT_DeltaCrl(10), + DT_CrlReason(11), + DT_CrlDistributionPoints(12), + DT_IssuingDistributionPoint(13), + DT_AuthorityInfoAccess(14), + DT_Other(15), + DT_QC_Statements(16), + DT_NameConstraints(17), + DT_PolicyMappings(18), + DT_PolicyConstraints(19), + DT_InhibitAnyPolicy(20); + + final int value; + const __CE_DataType(this.value); + + static __CE_DataType fromValue(int value) => switch (value) { + 0 => DT_AuthorityKeyID, + 1 => DT_SubjectKeyID, + 2 => DT_KeyUsage, + 3 => DT_SubjectAltName, + 4 => DT_IssuerAltName, + 5 => DT_ExtendedKeyUsage, + 6 => DT_BasicConstraints, + 7 => DT_CertPolicies, + 8 => DT_NetscapeCertType, + 9 => DT_CrlNumber, + 10 => DT_DeltaCrl, + 11 => DT_CrlReason, + 12 => DT_CrlDistributionPoints, + 13 => DT_IssuingDistributionPoint, + 14 => DT_AuthorityInfoAccess, + 15 => DT_Other, + 16 => DT_QC_Statements, + 17 => DT_NameConstraints, + 18 => DT_PolicyMappings, + 19 => DT_PolicyConstraints, + 20 => DT_InhibitAnyPolicy, + _ => throw ArgumentError("Unknown value for __CE_DataType: $value"), + }; +} + final class CE_Data extends ffi.Union { external CE_AuthorityKeyID authorityKeyID; @@ -55244,25 +54787,6 @@ final class CE_Data extends ffi.Union { external SecAsn1Item rawData; } -typedef CE_AuthorityKeyID = __CE_AuthorityKeyID; -typedef CE_SubjectKeyID = SecAsn1Item; -typedef CE_KeyUsage = uint16; -typedef CE_ExtendedKeyUsage = __CE_ExtendedKeyUsage; -typedef CE_BasicConstraints = __CE_BasicConstraints; -typedef CE_CertPolicies = __CE_CertPolicies; -typedef CE_NetscapeCertType = uint16; -typedef CE_CrlNumber = uint32; -typedef CE_DeltaCrl = uint32; -typedef CE_CrlReason = uint32; -typedef CE_CRLDistPointsSyntax = __CE_CRLDistPointsSyntax; -typedef CE_IssuingDistributionPoint = __CE_IssuingDistributionPoint; -typedef CE_AuthorityInfoAccess = __CE_AuthorityInfoAccess; -typedef CE_QC_Statements = __CE_QC_Statements; -typedef CE_NameConstraints = __CE_NameConstraints; -typedef CE_PolicyMappings = __CE_PolicyMappings; -typedef CE_PolicyConstraints = __CE_PolicyConstraints; -typedef CE_InhibitAnyPolicy = uint32; - final class __CE_DataAndType extends ffi.Struct { @ffi.UnsignedInt() external int typeAsInt; @@ -55275,57 +54799,7 @@ final class __CE_DataAndType extends ffi.Struct { external int critical; } -enum __CE_DataType { - DT_AuthorityKeyID(0), - DT_SubjectKeyID(1), - DT_KeyUsage(2), - DT_SubjectAltName(3), - DT_IssuerAltName(4), - DT_ExtendedKeyUsage(5), - DT_BasicConstraints(6), - DT_CertPolicies(7), - DT_NetscapeCertType(8), - DT_CrlNumber(9), - DT_DeltaCrl(10), - DT_CrlReason(11), - DT_CrlDistributionPoints(12), - DT_IssuingDistributionPoint(13), - DT_AuthorityInfoAccess(14), - DT_Other(15), - DT_QC_Statements(16), - DT_NameConstraints(17), - DT_PolicyMappings(18), - DT_PolicyConstraints(19), - DT_InhibitAnyPolicy(20); - - final int value; - const __CE_DataType(this.value); - - static __CE_DataType fromValue(int value) => switch (value) { - 0 => DT_AuthorityKeyID, - 1 => DT_SubjectKeyID, - 2 => DT_KeyUsage, - 3 => DT_SubjectAltName, - 4 => DT_IssuerAltName, - 5 => DT_ExtendedKeyUsage, - 6 => DT_BasicConstraints, - 7 => DT_CertPolicies, - 8 => DT_NetscapeCertType, - 9 => DT_CrlNumber, - 10 => DT_DeltaCrl, - 11 => DT_CrlReason, - 12 => DT_CrlDistributionPoints, - 13 => DT_IssuingDistributionPoint, - 14 => DT_AuthorityInfoAccess, - 15 => DT_Other, - 16 => DT_QC_Statements, - 17 => DT_NameConstraints, - 18 => DT_PolicyMappings, - 19 => DT_PolicyConstraints, - 20 => DT_InhibitAnyPolicy, - _ => throw ArgumentError("Unknown value for __CE_DataType: $value"), - }; -} +typedef CE_DataAndType = __CE_DataAndType; final class cssm_acl_process_subject_selector extends ffi.Struct { @uint16() @@ -55341,6 +54815,8 @@ final class cssm_acl_process_subject_selector extends ffi.Struct { external int gid; } +typedef CSSM_ACL_PROCESS_SUBJECT_SELECTOR = cssm_acl_process_subject_selector; + final class cssm_acl_keychain_prompt_selector extends ffi.Struct { @uint16() external int version; @@ -55349,6 +54825,9 @@ final class cssm_acl_keychain_prompt_selector extends ffi.Struct { external int flags; } +typedef CSSM_ACL_KEYCHAIN_PROMPT_SELECTOR = cssm_acl_keychain_prompt_selector; +typedef CSSM_ACL_PREAUTH_TRACKING_STATE = uint32; + final class cssm_appledl_open_parameters extends ffi.Struct { @uint32() external int length; @@ -55366,6 +54845,10 @@ final class cssm_appledl_open_parameters extends ffi.Struct { external int mode; } +typedef CSSM_APPLEDL_OPEN_PARAMETERS = cssm_appledl_open_parameters; +typedef CSSM_APPLEDL_OPEN_PARAMETERS_PTR + = ffi.Pointer; + final class cssm_applecspdl_db_settings_parameters extends ffi.Struct { @uint32() external int idleTimeout; @@ -55374,16 +54857,29 @@ final class cssm_applecspdl_db_settings_parameters extends ffi.Struct { external int lockOnSleep; } +typedef CSSM_APPLECSPDL_DB_SETTINGS_PARAMETERS + = cssm_applecspdl_db_settings_parameters; +typedef CSSM_APPLECSPDL_DB_SETTINGS_PARAMETERS_PTR + = ffi.Pointer; + final class cssm_applecspdl_db_is_locked_parameters extends ffi.Struct { @uint8() external int isLocked; } +typedef CSSM_APPLECSPDL_DB_IS_LOCKED_PARAMETERS + = cssm_applecspdl_db_is_locked_parameters; +typedef CSSM_APPLECSPDL_DB_IS_LOCKED_PARAMETERS_PTR + = ffi.Pointer; + final class cssm_applecspdl_db_change_password_parameters extends ffi.Struct { external ffi.Pointer accessCredentials; } -typedef CSSM_ACCESS_CREDENTIALS = cssm_access_credentials; +typedef CSSM_APPLECSPDL_DB_CHANGE_PASSWORD_PARAMETERS + = cssm_applecspdl_db_change_password_parameters; +typedef CSSM_APPLECSPDL_DB_CHANGE_PASSWORD_PARAMETERS_PTR + = ffi.Pointer; final class CSSM_APPLE_TP_NAME_OID extends ffi.Struct { external ffi.Pointer string; @@ -55436,10 +54932,6 @@ final class CSSM_APPLE_TP_CERT_REQUEST extends ffi.Struct { external ffi.Pointer challengeString; } -typedef CSSM_X509_NAME_PTR = ffi.Pointer; -typedef CSSM_KEY = cssm_key; -typedef CE_DataAndType = __CE_DataAndType; - final class CSSM_APPLE_TP_SSL_OPTIONS extends ffi.Struct { @uint32() external int Version; @@ -55453,6 +54945,8 @@ final class CSSM_APPLE_TP_SSL_OPTIONS extends ffi.Struct { external int Flags; } +typedef CSSM_APPLE_TP_CRL_OPT_FLAGS = uint32; + final class CSSM_APPLE_TP_CRL_OPTIONS extends ffi.Struct { @uint32() external int Version; @@ -55463,8 +54957,6 @@ final class CSSM_APPLE_TP_CRL_OPTIONS extends ffi.Struct { external CSSM_DL_DB_HANDLE_PTR crlStore; } -typedef CSSM_APPLE_TP_CRL_OPT_FLAGS = uint32; - final class CSSM_APPLE_TP_SMIME_OPTIONS extends ffi.Struct { @uint32() external int Version; @@ -55478,6 +54970,8 @@ final class CSSM_APPLE_TP_SMIME_OPTIONS extends ffi.Struct { external ffi.Pointer SenderEmail; } +typedef CSSM_APPLE_TP_ACTION_FLAGS = uint32; + final class CSSM_APPLE_TP_ACTION_DATA extends ffi.Struct { @uint32() external int Version; @@ -55486,7 +54980,7 @@ final class CSSM_APPLE_TP_ACTION_DATA extends ffi.Struct { external int ActionFlags; } -typedef CSSM_APPLE_TP_ACTION_FLAGS = uint32; +typedef CSSM_TP_APPLE_CERT_STATUS = uint32; final class CSSM_TP_APPLE_EVIDENCE_INFO extends ffi.Struct { @CSSM_TP_APPLE_CERT_STATUS() @@ -55505,10 +54999,6 @@ final class CSSM_TP_APPLE_EVIDENCE_INFO extends ffi.Struct { external CSSM_DB_UNIQUE_RECORD_PTR UniqueRecord; } -typedef CSSM_TP_APPLE_CERT_STATUS = uint32; -typedef CSSM_DL_DB_HANDLE = cssm_dl_db_handle; -typedef CSSM_DB_UNIQUE_RECORD_PTR = ffi.Pointer; - final class CSSM_TP_APPLE_EVIDENCE_HEADER extends ffi.Struct { @uint32() external int Version; @@ -55532,10 +55022,6 @@ final class CSSM_APPLE_CL_CSR_REQUEST extends ffi.Struct { external ffi.Pointer challengeString; } -final class __SecTrust extends ffi.Opaque {} - -typedef SecTrustRef = ffi.Pointer<__SecTrust>; - enum SecTrustResultType { kSecTrustResultInvalid(0), kSecTrustResultProceed(1), @@ -55563,9 +55049,9 @@ enum SecTrustResultType { }; } -typedef SecTrustCallback = ffi.Pointer; -typedef DartSecTrustCallback - = objc.ObjCBlock, ffi.Uint32)>; +final class __SecTrust extends ffi.Opaque {} + +typedef SecTrustRef = ffi.Pointer<__SecTrust>; void _ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_fnPtrTrampoline( ffi.Pointer block, SecTrustRef arg0, int arg1) => block.ref.target @@ -55666,7 +55152,7 @@ abstract final class ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType { .cast(), (SecTrustRef arg0, int arg1) => fn(arg0, SecTrustResultType.fromValue(arg1))); - final wrapper = _wrapListenerBlock_129ffij(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_gwxhxt(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function(ffi.Pointer<__SecTrust>, ffi.Uint32)>(wrapper, @@ -55687,10 +55173,9 @@ extension ObjCBlock_ffiVoid_SecTrustRef_SecTrustResultType_CallExtension int)>()(ref.pointer, arg0, arg1.value); } -typedef SecTrustWithErrorCallback = ffi.Pointer; -typedef DartSecTrustWithErrorCallback = objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer<__SecTrust>, ffi.Bool, ffi.Pointer<__CFError>)>; +typedef SecTrustCallback = ffi.Pointer; +typedef DartSecTrustCallback + = objc.ObjCBlock, ffi.Uint32)>; void _ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_fnPtrTrampoline( ffi.Pointer block, SecTrustRef arg0, @@ -55809,7 +55294,7 @@ abstract final class ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef { .nativeFunction .cast(), (SecTrustRef arg0, bool arg1, CFErrorRef arg2) => fn(arg0, arg1, arg2)); - final wrapper = _wrapListenerBlock_1458n52(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_k73ff5(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function(ffi.Pointer<__SecTrust>, ffi.Bool, @@ -55833,8 +55318,10 @@ extension ObjCBlock_ffiVoid_SecTrustRef_bool_CFErrorRef_CallExtension CFErrorRef)>()(ref.pointer, arg0, arg1, arg2); } -typedef SecKeyRef = ffi.Pointer<__SecKey>; -typedef SecCertificateRef = ffi.Pointer<__SecCertificate>; +typedef SecTrustWithErrorCallback = ffi.Pointer; +typedef DartSecTrustWithErrorCallback = objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer<__SecTrust>, ffi.Bool, ffi.Pointer<__CFError>)>; enum SecTrustOptionFlags { kSecTrustOptionAllowExpired(1), @@ -55861,209 +55348,37 @@ enum SecTrustOptionFlags { }; } -typedef CSSM_TP_VERIFY_CONTEXT_RESULT_PTR - = ffi.Pointer; -typedef SecKeychainRef = ffi.Pointer<__SecKeychain>; -typedef SecIdentityRef = ffi.Pointer<__SecIdentity>; typedef SSLCipherSuite = ffi.Uint16; typedef DartSSLCipherSuite = int; -/// OS_sec_trust -abstract final class OS_sec_trust { - /// Builds an object that implements the OS_sec_trust protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_sec_trust protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_sec_trust = objc.getProtocol("OS_sec_trust"); - -/// OS_sec_identity -abstract final class OS_sec_identity { - /// Builds an object that implements the OS_sec_identity protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_sec_identity protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_sec_identity = objc.getProtocol("OS_sec_identity"); - -/// OS_sec_certificate -abstract final class OS_sec_certificate { - /// Builds an object that implements the OS_sec_certificate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); +enum SSLCiphersuiteGroup { + kSSLCiphersuiteGroupDefault(0), + kSSLCiphersuiteGroupCompatibility(1), + kSSLCiphersuiteGroupLegacy(2), + kSSLCiphersuiteGroupATS(3), + kSSLCiphersuiteGroupATSCompatibility(4); - return builder.build(); - } + final int value; + const SSLCiphersuiteGroup(this.value); - /// Adds the implementation of the OS_sec_certificate protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} + static SSLCiphersuiteGroup fromValue(int value) => switch (value) { + 0 => kSSLCiphersuiteGroupDefault, + 1 => kSSLCiphersuiteGroupCompatibility, + 2 => kSSLCiphersuiteGroupLegacy, + 3 => kSSLCiphersuiteGroupATS, + 4 => kSSLCiphersuiteGroupATSCompatibility, + _ => + throw ArgumentError("Unknown value for SSLCiphersuiteGroup: $value"), + }; } -late final _protocol_OS_sec_certificate = - objc.getProtocol("OS_sec_certificate"); typedef sec_trust_t = ffi.Pointer; typedef Dartsec_trust_t = objc.NSObject; typedef sec_identity_t = ffi.Pointer; typedef Dartsec_identity_t = objc.NSObject; -void _ObjCBlock_ffiVoid_seccertificatet_fnPtrTrampoline( - ffi.Pointer block, sec_certificate_t arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_seccertificatet_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, sec_certificate_t)>( - _ObjCBlock_ffiVoid_seccertificatet_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_seccertificatet_closureTrampoline( - ffi.Pointer block, sec_certificate_t arg0) => - (objc.getBlockClosure(block) as void Function(sec_certificate_t))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_seccertificatet_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, sec_certificate_t)>( - _ObjCBlock_ffiVoid_seccertificatet_closureTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_seccertificatet_listenerTrampoline( - ffi.Pointer block, sec_certificate_t arg0) { - (objc.getBlockClosure(block) as void Function(sec_certificate_t))(arg0); - objc.objectRelease(block.cast()); -} - -ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, sec_certificate_t)> - _ObjCBlock_ffiVoid_seccertificatet_listenerCallable = ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, sec_certificate_t)>.listener( - _ObjCBlock_ffiVoid_seccertificatet_listenerTrampoline) - ..keepIsolateAlive = false; - -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_seccertificatet { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) => - objc.ObjCBlock(pointer, - retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction> - ptr) => - objc.ObjCBlock( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_seccertificatet_fnPtrCallable, ptr.cast()), - retain: false, - release: true); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunction( - void Function(Dartsec_certificate_t) fn) => - objc.ObjCBlock( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_seccertificatet_closureCallable, - (sec_certificate_t arg0) => fn(objc.NSObject.castFromPointer(arg0, - retain: true, release: true))), - retain: false, - release: true); - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener( - void Function(Dartsec_certificate_t) fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_seccertificatet_listenerCallable.nativeFunction - .cast(), - (sec_certificate_t arg0) => fn( - objc.NSObject.castFromPointer(arg0, retain: false, release: true))); - final wrapper = _wrapListenerBlock_ukcdfq(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, - retain: false, release: true); - } -} - -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_seccertificatet_CallExtension - on objc.ObjCBlock { - void call(Dartsec_certificate_t arg0) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - sec_certificate_t arg0)>>() - .asFunction< - void Function(ffi.Pointer, - sec_certificate_t)>()(ref.pointer, arg0.ref.pointer); -} - typedef sec_certificate_t = ffi.Pointer; typedef Dartsec_certificate_t = objc.NSObject; -/// OS_sec_protocol_metadata -abstract final class OS_sec_protocol_metadata { - /// Builds an object that implements the OS_sec_protocol_metadata protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_sec_protocol_metadata protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_sec_protocol_metadata = - objc.getProtocol("OS_sec_protocol_metadata"); -typedef sec_protocol_metadata_t = ffi.Pointer; -typedef Dartsec_protocol_metadata_t = objc.NSObject; - enum tls_protocol_version_t { tls_protocol_version_TLSv10(769), tls_protocol_version_TLSv11(770), @@ -56087,42 +55402,6 @@ enum tls_protocol_version_t { }; } -enum SSLProtocol { - kSSLProtocolUnknown(0), - kTLSProtocol1(4), - kTLSProtocol11(7), - kTLSProtocol12(8), - kDTLSProtocol1(9), - kTLSProtocol13(10), - kDTLSProtocol12(11), - kTLSProtocolMaxSupported(999), - kSSLProtocol2(1), - kSSLProtocol3(2), - kSSLProtocol3Only(3), - kTLSProtocol1Only(5), - kSSLProtocolAll(6); - - final int value; - const SSLProtocol(this.value); - - static SSLProtocol fromValue(int value) => switch (value) { - 0 => kSSLProtocolUnknown, - 4 => kTLSProtocol1, - 7 => kTLSProtocol11, - 8 => kTLSProtocol12, - 9 => kDTLSProtocol1, - 10 => kTLSProtocol13, - 11 => kDTLSProtocol12, - 999 => kTLSProtocolMaxSupported, - 1 => kSSLProtocol2, - 2 => kSSLProtocol3, - 3 => kSSLProtocol3Only, - 5 => kTLSProtocol1Only, - 6 => kSSLProtocolAll, - _ => throw ArgumentError("Unknown value for SSLProtocol: $value"), - }; -} - enum tls_ciphersuite_t { tls_ciphersuite_RSA_WITH_3DES_EDE_CBC_SHA(10), tls_ciphersuite_RSA_WITH_AES_128_CBC_SHA(47), @@ -56185,6 +55464,175 @@ enum tls_ciphersuite_t { }; } +enum tls_ciphersuite_group_t { + tls_ciphersuite_group_default(0), + tls_ciphersuite_group_compatibility(1), + tls_ciphersuite_group_legacy(2), + tls_ciphersuite_group_ats(3), + tls_ciphersuite_group_ats_compatibility(4); + + final int value; + const tls_ciphersuite_group_t(this.value); + + static tls_ciphersuite_group_t fromValue(int value) => switch (value) { + 0 => tls_ciphersuite_group_default, + 1 => tls_ciphersuite_group_compatibility, + 2 => tls_ciphersuite_group_legacy, + 3 => tls_ciphersuite_group_ats, + 4 => tls_ciphersuite_group_ats_compatibility, + _ => throw ArgumentError( + "Unknown value for tls_ciphersuite_group_t: $value"), + }; +} + +enum SSLProtocol { + kSSLProtocolUnknown(0), + kTLSProtocol1(4), + kTLSProtocol11(7), + kTLSProtocol12(8), + kDTLSProtocol1(9), + kTLSProtocol13(10), + kDTLSProtocol12(11), + kTLSProtocolMaxSupported(999), + kSSLProtocol2(1), + kSSLProtocol3(2), + kSSLProtocol3Only(3), + kTLSProtocol1Only(5), + kSSLProtocolAll(6); + + final int value; + const SSLProtocol(this.value); + + static SSLProtocol fromValue(int value) => switch (value) { + 0 => kSSLProtocolUnknown, + 4 => kTLSProtocol1, + 7 => kTLSProtocol11, + 8 => kTLSProtocol12, + 9 => kDTLSProtocol1, + 10 => kTLSProtocol13, + 11 => kDTLSProtocol12, + 999 => kTLSProtocolMaxSupported, + 1 => kSSLProtocol2, + 2 => kSSLProtocol3, + 3 => kSSLProtocol3Only, + 5 => kTLSProtocol1Only, + 6 => kSSLProtocolAll, + _ => throw ArgumentError("Unknown value for SSLProtocol: $value"), + }; +} + +void _ObjCBlock_ffiVoid_seccertificatet_fnPtrTrampoline( + ffi.Pointer block, sec_certificate_t arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_seccertificatet_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, sec_certificate_t)>( + _ObjCBlock_ffiVoid_seccertificatet_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_seccertificatet_closureTrampoline( + ffi.Pointer block, sec_certificate_t arg0) => + (objc.getBlockClosure(block) as void Function(sec_certificate_t))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_seccertificatet_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, sec_certificate_t)>( + _ObjCBlock_ffiVoid_seccertificatet_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_seccertificatet_listenerTrampoline( + ffi.Pointer block, sec_certificate_t arg0) { + (objc.getBlockClosure(block) as void Function(sec_certificate_t))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, sec_certificate_t)> + _ObjCBlock_ffiVoid_seccertificatet_listenerCallable = ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, sec_certificate_t)>.listener( + _ObjCBlock_ffiVoid_seccertificatet_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_seccertificatet { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_seccertificatet_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(Dartsec_certificate_t) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_seccertificatet_closureCallable, + (sec_certificate_t arg0) => fn(objc.NSObject.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(Dartsec_certificate_t) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_seccertificatet_listenerCallable.nativeFunction + .cast(), + (sec_certificate_t arg0) => fn( + objc.NSObject.castFromPointer(arg0, retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1jdvcbf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_seccertificatet_CallExtension + on objc.ObjCBlock { + void call(Dartsec_certificate_t arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + sec_certificate_t arg0)>>() + .asFunction< + void Function(ffi.Pointer, + sec_certificate_t)>()(ref.pointer, arg0.ref.pointer); +} + +typedef sec_protocol_metadata_t = ffi.Pointer; +typedef Dartsec_protocol_metadata_t = objc.NSObject; void _ObjCBlock_ffiVoid_Uint16_fnPtrTrampoline( ffi.Pointer block, int arg0) => block.ref.target @@ -56267,7 +55715,7 @@ abstract final class ObjCBlock_ffiVoid_Uint16 { final raw = objc.newClosureBlock( _ObjCBlock_ffiVoid_Uint16_listenerCallable.nativeFunction.cast(), (int arg0) => fn(arg0)); - final wrapper = _wrapListenerBlock_yo3tv0(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_15f11yh(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock(wrapper, retain: false, release: true); @@ -56398,7 +55846,7 @@ abstract final class ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat { (dispatch_data_t arg0, dispatch_data_t arg1) => fn( objc.NSObject.castFromPointer(arg0, retain: false, release: true), objc.NSObject.castFromPointer(arg1, retain: false, release: true))); - final wrapper = _wrapListenerBlock_1tjlcwl(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_wjvic9(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock( wrapper, @@ -56422,75 +55870,126 @@ extension ObjCBlock_ffiVoid_dispatchdatat_dispatchdatat_CallExtension ref.pointer, arg0.ref.pointer, arg1.ref.pointer); } -/// OS_sec_protocol_options -abstract final class OS_sec_protocol_options { - /// Builds an object that implements the OS_sec_protocol_options protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement() { - final builder = objc.ObjCProtocolBuilder(); - - return builder.build(); - } - - /// Adds the implementation of the OS_sec_protocol_options protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder( - objc.ObjCProtocolBuilder builder, - ) {} -} - -late final _protocol_OS_sec_protocol_options = - objc.getProtocol("OS_sec_protocol_options"); typedef sec_protocol_options_t = ffi.Pointer; typedef Dartsec_protocol_options_t = objc.NSObject; +void _ObjCBlock_ffiVoid_dispatchdatat_fnPtrTrampoline( + ffi.Pointer block, dispatch_data_t arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_dispatchdatat_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, dispatch_data_t)>( + _ObjCBlock_ffiVoid_dispatchdatat_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_dispatchdatat_closureTrampoline( + ffi.Pointer block, dispatch_data_t arg0) => + (objc.getBlockClosure(block) as void Function(dispatch_data_t))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_dispatchdatat_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, dispatch_data_t)>( + _ObjCBlock_ffiVoid_dispatchdatat_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_dispatchdatat_listenerTrampoline( + ffi.Pointer block, dispatch_data_t arg0) { + (objc.getBlockClosure(block) as void Function(dispatch_data_t))(arg0); + objc.objectRelease(block.cast()); +} -enum tls_ciphersuite_group_t { - tls_ciphersuite_group_default(0), - tls_ciphersuite_group_compatibility(1), - tls_ciphersuite_group_legacy(2), - tls_ciphersuite_group_ats(3), - tls_ciphersuite_group_ats_compatibility(4); +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, dispatch_data_t)> + _ObjCBlock_ffiVoid_dispatchdatat_listenerCallable = ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, dispatch_data_t)>.listener( + _ObjCBlock_ffiVoid_dispatchdatat_listenerTrampoline) + ..keepIsolateAlive = false; - final int value; - const tls_ciphersuite_group_t(this.value); +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_dispatchdatat { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); - static tls_ciphersuite_group_t fromValue(int value) => switch (value) { - 0 => tls_ciphersuite_group_default, - 1 => tls_ciphersuite_group_compatibility, - 2 => tls_ciphersuite_group_legacy, - 3 => tls_ciphersuite_group_ats, - 4 => tls_ciphersuite_group_ats_compatibility, - _ => throw ArgumentError( - "Unknown value for tls_ciphersuite_group_t: $value"), - }; -} + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_dispatchdatat_fnPtrCallable, ptr.cast()), + retain: false, + release: true); -enum SSLCiphersuiteGroup { - kSSLCiphersuiteGroupDefault(0), - kSSLCiphersuiteGroupCompatibility(1), - kSSLCiphersuiteGroupLegacy(2), - kSSLCiphersuiteGroupATS(3), - kSSLCiphersuiteGroupATSCompatibility(4); + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(Dartdispatch_data_t?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_dispatchdatat_closureCallable, + (dispatch_data_t arg0) => fn(arg0.address == 0 + ? null + : objc.NSObject.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); - final int value; - const SSLCiphersuiteGroup(this.value); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(Dartdispatch_data_t?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_dispatchdatat_listenerCallable.nativeFunction.cast(), + (dispatch_data_t arg0) => fn(arg0.address == 0 + ? null + : objc.NSObject.castFromPointer(arg0, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1jdvcbf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} - static SSLCiphersuiteGroup fromValue(int value) => switch (value) { - 0 => kSSLCiphersuiteGroupDefault, - 1 => kSSLCiphersuiteGroupCompatibility, - 2 => kSSLCiphersuiteGroupLegacy, - 3 => kSSLCiphersuiteGroupATS, - 4 => kSSLCiphersuiteGroupATSCompatibility, - _ => - throw ArgumentError("Unknown value for SSLCiphersuiteGroup: $value"), - }; +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_dispatchdatat_CallExtension + on objc.ObjCBlock { + void call(Dartdispatch_data_t? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + dispatch_data_t arg0)>>() + .asFunction< + void Function( + ffi.Pointer, dispatch_data_t)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); } -typedef sec_protocol_pre_shared_key_selection_t +typedef sec_protocol_pre_shared_key_selection_complete_t = ffi.Pointer; -typedef Dartsec_protocol_pre_shared_key_selection_t = objc.ObjCBlock< - ffi.Void Function(objc.NSObject, objc.NSObject, - objc.ObjCBlock)>; +typedef Dartsec_protocol_pre_shared_key_selection_complete_t + = objc.ObjCBlock; void _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_fnPtrTrampoline( ffi.Pointer block, @@ -56569,17 +56068,17 @@ ffi.NativeCallable< _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_listenerTrampoline) ..keepIsolateAlive = false; -/// Construction methods for `objc.ObjCBlock)>`. +/// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function(objc.NSObject, objc.NSObject, - objc.ObjCBlock)> + ffi.Void Function( + objc.NSObject, objc.NSObject?, objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => objc.ObjCBlock< - ffi.Void Function(objc.NSObject, objc.NSObject, - objc.ObjCBlock)>(pointer, + ffi.Void Function(objc.NSObject, objc.NSObject?, + objc.ObjCBlock)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -56588,12 +56087,12 @@ abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secpro /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(objc.NSObject, objc.NSObject, - objc.ObjCBlock)> + ffi.Void Function(objc.NSObject, objc.NSObject?, + objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer> ptr) => objc.ObjCBlock< - ffi.Void Function(objc.NSObject, objc.NSObject, - objc.ObjCBlock)>( + ffi.Void Function(objc.NSObject, objc.NSObject?, + objc.ObjCBlock)>( objc.newPointerBlock(_ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_fnPtrCallable, ptr.cast()), retain: false, release: true); @@ -56603,15 +56102,15 @@ abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secpro /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock)> - fromFunction(void Function(Dartsec_protocol_metadata_t, Dartdispatch_data_t, Dartsec_protocol_pre_shared_key_selection_complete_t) fn) => - objc.ObjCBlock)>( + static objc.ObjCBlock)> + fromFunction(void Function(Dartsec_protocol_metadata_t, Dartdispatch_data_t?, Dartsec_protocol_pre_shared_key_selection_complete_t) fn) => + objc.ObjCBlock)>( objc.newClosureBlock( _ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_closureCallable, (sec_protocol_metadata_t arg0, dispatch_data_t arg1, sec_protocol_pre_shared_key_selection_complete_t arg2) => fn( objc.NSObject.castFromPointer(arg0, retain: true, release: true), - objc.NSObject.castFromPointer(arg1, retain: true, release: true), - ObjCBlock_ffiVoid_seccertificatet.castFromPointer(arg2, retain: true, release: true))), + arg1.address == 0 ? null : objc.NSObject.castFromPointer(arg1, retain: true, release: true), + ObjCBlock_ffiVoid_dispatchdatat.castFromPointer(arg2, retain: true, release: true))), retain: false, release: true); @@ -56625,9 +56124,9 @@ abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secpro /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. static objc.ObjCBlock< - ffi.Void Function(objc.NSObject, objc.NSObject, - objc.ObjCBlock)> listener( - void Function(Dartsec_protocol_metadata_t, Dartdispatch_data_t, + ffi.Void Function(objc.NSObject, objc.NSObject?, + objc.ObjCBlock)> listener( + void Function(Dartsec_protocol_metadata_t, Dartdispatch_data_t?, Dartsec_protocol_pre_shared_key_selection_complete_t) fn) { final raw = objc.newClosureBlock( @@ -56639,26 +56138,28 @@ abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secpro fn( objc.NSObject.castFromPointer(arg0, retain: false, release: true), - objc.NSObject.castFromPointer(arg1, - retain: false, release: true), - ObjCBlock_ffiVoid_seccertificatet.castFromPointer(arg2, + arg1.address == 0 + ? null + : objc.NSObject.castFromPointer(arg1, + retain: false, release: true), + ObjCBlock_ffiVoid_dispatchdatat.castFromPointer(arg2, retain: false, release: true))); - final wrapper = _wrapListenerBlock_10t0qpd(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_91c9gi(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function(objc.NSObject, objc.NSObject, - objc.ObjCBlock)>(wrapper, + ffi.Void Function(objc.NSObject, objc.NSObject?, + objc.ObjCBlock)>(wrapper, retain: false, release: true); } } -/// Call operator for `objc.ObjCBlock)>`. +/// Call operator for `objc.ObjCBlock)>`. extension ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_CallExtension on objc.ObjCBlock< - ffi.Void Function(objc.NSObject, objc.NSObject, - objc.ObjCBlock)> { + ffi.Void Function(objc.NSObject, objc.NSObject?, + objc.ObjCBlock)> { void - call(Dartsec_protocol_metadata_t arg0, Dartdispatch_data_t arg1, + call(Dartsec_protocol_metadata_t arg0, Dartdispatch_data_t? arg1, Dartsec_protocol_pre_shared_key_selection_complete_t arg2) => ref.pointer.ref.invoke .cast< @@ -56677,17 +56178,18 @@ extension ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresha sec_protocol_pre_shared_key_selection_complete_t)>()( ref.pointer, arg0.ref.pointer, - arg1.ref.pointer, + arg1?.ref.pointer ?? ffi.nullptr, arg2.ref.pointer); } -typedef sec_protocol_pre_shared_key_selection_complete_t +typedef sec_protocol_pre_shared_key_selection_t = ffi.Pointer; -typedef Dartsec_protocol_pre_shared_key_selection_complete_t - = objc.ObjCBlock; -typedef sec_protocol_key_update_t = ffi.Pointer; -typedef Dartsec_protocol_key_update_t = objc.ObjCBlock< - ffi.Void Function(objc.NSObject, objc.ObjCBlock)>; +typedef Dartsec_protocol_pre_shared_key_selection_t = objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject?, + objc.ObjCBlock)>; +typedef sec_protocol_key_update_complete_t = ffi.Pointer; +typedef Dartsec_protocol_key_update_complete_t + = objc.ObjCBlock; void _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_fnPtrTrampoline( ffi.Pointer block, @@ -56821,7 +56323,7 @@ abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdate retain: false, release: true), ObjCBlock_ffiVoid.castFromPointer(arg1, retain: false, release: true))); - final wrapper = _wrapListenerBlock_cmbt6k(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_14pxqbs(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function( @@ -56851,13 +56353,12 @@ extension ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolkeyupdatecompletet_C ref.pointer, arg0.ref.pointer, arg1.ref.pointer); } -typedef sec_protocol_key_update_complete_t = ffi.Pointer; -typedef Dartsec_protocol_key_update_complete_t - = objc.ObjCBlock; -typedef sec_protocol_challenge_t = ffi.Pointer; -typedef Dartsec_protocol_challenge_t = objc.ObjCBlock< - ffi.Void Function( - objc.NSObject, objc.ObjCBlock)>; +typedef sec_protocol_key_update_t = ffi.Pointer; +typedef Dartsec_protocol_key_update_t = objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.ObjCBlock)>; +typedef sec_protocol_challenge_complete_t = ffi.Pointer; +typedef Dartsec_protocol_challenge_complete_t + = objc.ObjCBlock; void _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_fnPtrTrampoline( ffi.Pointer block, @@ -56918,17 +56419,17 @@ ffi.NativeCallable< _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_listenerTrampoline) ..keepIsolateAlive = false; -/// Construction methods for `objc.ObjCBlock)>`. +/// Construction methods for `objc.ObjCBlock)>`. abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< ffi.Void Function( - objc.NSObject, objc.ObjCBlock)> + objc.NSObject, objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => objc.ObjCBlock< ffi.Void Function(objc.NSObject, - objc.ObjCBlock)>( + objc.ObjCBlock)>( pointer, retain: retain, release: release); @@ -56939,11 +56440,11 @@ abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallenge /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc - .ObjCBlock)> + .ObjCBlock)> fromFunctionPointer(ffi.Pointer> ptr) => objc.ObjCBlock< ffi.Void Function(objc.NSObject, - objc.ObjCBlock)>( + objc.ObjCBlock)>( objc.newPointerBlock( _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_fnPtrCallable, ptr.cast()), @@ -56956,14 +56457,14 @@ abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallenge /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc - .ObjCBlock)> + .ObjCBlock)> fromFunction(void Function(Dartsec_protocol_metadata_t, Dartsec_protocol_challenge_complete_t) fn) => - objc.ObjCBlock)>( + objc.ObjCBlock)>( objc.newClosureBlock( _ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_closureCallable, (sec_protocol_metadata_t arg0, sec_protocol_challenge_complete_t arg1) => fn( objc.NSObject.castFromPointer(arg0, retain: true, release: true), - ObjCBlock_ffiVoid_seccertificatet.castFromPointer(arg1, retain: true, release: true))), + ObjCBlock_ffiVoid_dispatchdatat.castFromPointer(arg1, retain: true, release: true))), retain: false, release: true); @@ -56978,7 +56479,7 @@ abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallenge /// blocks do not keep the isolate alive. static objc.ObjCBlock< ffi.Void Function( - objc.NSObject, objc.ObjCBlock)> + objc.NSObject, objc.ObjCBlock)> listener( void Function(Dartsec_protocol_metadata_t, Dartsec_protocol_challenge_complete_t) @@ -56992,22 +56493,22 @@ abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallenge fn( objc.NSObject.castFromPointer(arg0, retain: false, release: true), - ObjCBlock_ffiVoid_seccertificatet.castFromPointer(arg1, + ObjCBlock_ffiVoid_dispatchdatat.castFromPointer(arg1, retain: false, release: true))); - final wrapper = _wrapListenerBlock_cmbt6k(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_14pxqbs(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function(objc.NSObject, - objc.ObjCBlock)>(wrapper, + objc.ObjCBlock)>(wrapper, retain: false, release: true); } } -/// Call operator for `objc.ObjCBlock)>`. +/// Call operator for `objc.ObjCBlock)>`. extension ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_CallExtension on objc.ObjCBlock< ffi.Void Function( - objc.NSObject, objc.ObjCBlock)> { + objc.NSObject, objc.ObjCBlock)> { void call(Dartsec_protocol_metadata_t arg0, Dartsec_protocol_challenge_complete_t arg1) => ref.pointer.ref.invoke @@ -57025,13 +56526,113 @@ extension ObjCBlock_ffiVoid_secprotocolmetadatat_secprotocolchallengecompletet_C ref.pointer, arg0.ref.pointer, arg1.ref.pointer); } -typedef sec_protocol_challenge_complete_t = ffi.Pointer; -typedef Dartsec_protocol_challenge_complete_t - = objc.ObjCBlock; -typedef sec_protocol_verify_t = ffi.Pointer; -typedef Dartsec_protocol_verify_t = objc.ObjCBlock< - ffi.Void Function(objc.NSObject, objc.NSObject, - objc.ObjCBlock)>; +typedef sec_protocol_challenge_t = ffi.Pointer; +typedef Dartsec_protocol_challenge_t = objc.ObjCBlock< + ffi.Void Function( + objc.NSObject, objc.ObjCBlock)>; +void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( + ffi.Pointer block, bool arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_bool_closureTrampoline( + ffi.Pointer block, bool arg0) => + (objc.getBlockClosure(block) as void Function(bool))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_bool_listenerTrampoline( + ffi.Pointer block, bool arg0) { + (objc.getBlockClosure(block) as void Function(bool))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable, ffi.Bool)> + _ObjCBlock_ffiVoid_bool_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>.listener(_ObjCBlock_ffiVoid_bool_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_bool_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(bool) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_bool_closureCallable, (bool arg0) => fn(arg0)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(bool) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_bool_listenerCallable.nativeFunction.cast(), + (bool arg0) => fn(arg0)); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1s56lr9(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_bool_CallExtension + on objc.ObjCBlock { + void call(bool arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, ffi.Bool arg0)>>() + .asFunction, bool)>()( + ref.pointer, arg0); +} + +typedef sec_protocol_verify_complete_t = ffi.Pointer; +typedef Dartsec_protocol_verify_complete_t + = objc.ObjCBlock; void _ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycompletet_fnPtrTrampoline( ffi.Pointer block, @@ -57178,7 +56779,7 @@ abstract final class ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotoco retain: false, release: true), ObjCBlock_ffiVoid_bool.castFromPointer(arg2, retain: false, release: true))); - final wrapper = _wrapListenerBlock_10t0qpd(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_91c9gi(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function(objc.NSObject, objc.NSObject, @@ -57211,160 +56812,15 @@ extension ObjCBlock_ffiVoid_secprotocolmetadatat_sectrustt_secprotocolverifycomp ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2.ref.pointer); } -typedef sec_protocol_verify_complete_t = ffi.Pointer; -typedef Dartsec_protocol_verify_complete_t - = objc.ObjCBlock; -void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( - ffi.Pointer block, bool arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_bool_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_bool_closureTrampoline( - ffi.Pointer block, bool arg0) => - (objc.getBlockClosure(block) as void Function(bool))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_bool_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Bool)>(_ObjCBlock_ffiVoid_bool_closureTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_bool_listenerTrampoline( - ffi.Pointer block, bool arg0) { - (objc.getBlockClosure(block) as void Function(bool))(arg0); - objc.objectRelease(block.cast()); -} - -ffi.NativeCallable, ffi.Bool)> - _ObjCBlock_ffiVoid_bool_listenerCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Bool)>.listener(_ObjCBlock_ffiVoid_bool_listenerTrampoline) - ..keepIsolateAlive = false; - -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_bool { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) => - objc.ObjCBlock(pointer, - retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer( - ffi.Pointer> - ptr) => - objc.ObjCBlock( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_bool_fnPtrCallable, ptr.cast()), - retain: false, - release: true); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunction( - void Function(bool) fn) => - objc.ObjCBlock( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_bool_closureCallable, (bool arg0) => fn(arg0)), - retain: false, - release: true); - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener( - void Function(bool) fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_bool_listenerCallable.nativeFunction.cast(), - (bool arg0) => fn(arg0)); - final wrapper = _wrapListenerBlock_117qins(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, - retain: false, release: true); - } -} - -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_bool_CallExtension - on objc.ObjCBlock { - void call(bool arg0) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, ffi.Bool arg0)>>() - .asFunction, bool)>()( - ref.pointer, arg0); -} +typedef sec_protocol_verify_t = ffi.Pointer; +typedef Dartsec_protocol_verify_t = objc.ObjCBlock< + ffi.Void Function(objc.NSObject, objc.NSObject, + objc.ObjCBlock)>; final class SSLContext extends ffi.Opaque {} typedef SSLContextRef = ffi.Pointer; - -enum SSLProtocolSide { - kSSLServerSide(0), - kSSLClientSide(1); - - final int value; - const SSLProtocolSide(this.value); - - static SSLProtocolSide fromValue(int value) => switch (value) { - 0 => kSSLServerSide, - 1 => kSSLClientSide, - _ => throw ArgumentError("Unknown value for SSLProtocolSide: $value"), - }; -} - -enum SSLConnectionType { - kSSLStreamType(0), - kSSLDatagramType(1); - - final int value; - const SSLConnectionType(this.value); - - static SSLConnectionType fromValue(int value) => switch (value) { - 0 => kSSLStreamType, - 1 => kSSLDatagramType, - _ => throw ArgumentError("Unknown value for SSLConnectionType: $value"), - }; -} - -enum SSLSessionState { - kSSLIdle(0), - kSSLHandshake(1), - kSSLConnected(2), - kSSLClosed(3), - kSSLAborted(4); - - final int value; - const SSLSessionState(this.value); - - static SSLSessionState fromValue(int value) => switch (value) { - 0 => kSSLIdle, - 1 => kSSLHandshake, - 2 => kSSLConnected, - 3 => kSSLClosed, - 4 => kSSLAborted, - _ => throw ArgumentError("Unknown value for SSLSessionState: $value"), - }; -} +typedef SSLConnectionRef = ffi.Pointer; enum SSLSessionOption { kSSLSessionOptionBreakOnServerAuth(0), @@ -57396,35 +56852,23 @@ enum SSLSessionOption { }; } -typedef SSLReadFunc = ffi.Pointer>; -typedef SSLReadFuncFunction = OSStatus Function(SSLConnectionRef connection, - ffi.Pointer data, ffi.Pointer dataLength); -typedef DartSSLReadFuncFunction = DartSInt32 Function( - SSLConnectionRef connection, - ffi.Pointer data, - ffi.Pointer dataLength); -typedef SSLConnectionRef = ffi.Pointer; -typedef SSLWriteFunc = ffi.Pointer>; -typedef SSLWriteFuncFunction = OSStatus Function(SSLConnectionRef connection, - ffi.Pointer data, ffi.Pointer dataLength); -typedef DartSSLWriteFuncFunction = DartSInt32 Function( - SSLConnectionRef connection, - ffi.Pointer data, - ffi.Pointer dataLength); - -enum SSLAuthenticate { - kNeverAuthenticate(0), - kAlwaysAuthenticate(1), - kTryAuthenticate(2); +enum SSLSessionState { + kSSLIdle(0), + kSSLHandshake(1), + kSSLConnected(2), + kSSLClosed(3), + kSSLAborted(4); final int value; - const SSLAuthenticate(this.value); + const SSLSessionState(this.value); - static SSLAuthenticate fromValue(int value) => switch (value) { - 0 => kNeverAuthenticate, - 1 => kAlwaysAuthenticate, - 2 => kTryAuthenticate, - _ => throw ArgumentError("Unknown value for SSLAuthenticate: $value"), + static SSLSessionState fromValue(int value) => switch (value) { + 0 => kSSLIdle, + 1 => kSSLHandshake, + 2 => kSSLConnected, + 3 => kSSLClosed, + 4 => kSSLAborted, + _ => throw ArgumentError("Unknown value for SSLSessionState: $value"), }; } @@ -57447,368 +56891,742 @@ enum SSLClientCertificateState { }; } -/// NSURLSession is a replacement API for NSURLConnection. It provides -/// options that affect the policy of, and various aspects of the -/// mechanism by which NSURLRequest objects are retrieved from the -/// network. -/// -/// An NSURLSession may be bound to a delegate object. The delegate is -/// invoked for certain events during the lifetime of a session, such as -/// server authentication or determining whether a resource to be loaded -/// should be converted into a download. -/// -/// NSURLSession instances are thread-safe. -/// -/// The default NSURLSession uses a system provided delegate and is -/// appropriate to use in place of existing code that uses -/// +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] -/// -/// An NSURLSession creates NSURLSessionTask objects which represent the -/// action of a resource being loaded. These are analogous to -/// NSURLConnection objects but provide for more control and a unified -/// delegate model. -/// -/// NSURLSessionTask objects are always created in a suspended state and -/// must be sent the -resume message before they will execute. -/// -/// Subclasses of NSURLSessionTask are used to syntactically -/// differentiate between data and file downloads. -/// -/// An NSURLSessionDataTask receives the resource as a series of calls to -/// the URLSession:dataTask:didReceiveData: delegate method. This is type of -/// task most commonly associated with retrieving objects for immediate parsing -/// by the consumer. -/// -/// An NSURLSessionUploadTask differs from an NSURLSessionDataTask -/// in how its instance is constructed. Upload tasks are explicitly created -/// by referencing a file or data object to upload, or by utilizing the -/// -URLSession:task:needNewBodyStream: delegate message to supply an upload -/// body. -/// -/// An NSURLSessionDownloadTask will directly write the response data to -/// a temporary file. When completed, the delegate is sent -/// URLSession:downloadTask:didFinishDownloadingToURL: and given an opportunity -/// to move this file to a permanent location in its sandboxed container, or to -/// otherwise read the file. If canceled, an NSURLSessionDownloadTask can -/// produce a data blob that can be used to resume a download at a later -/// time. -/// -/// Beginning with iOS 9 and Mac OS X 10.11, NSURLSessionStream is -/// available as a task type. This allows for direct TCP/IP connection -/// to a given host and port with optional secure handshaking and -/// navigation of proxies. Data tasks may also be upgraded to a -/// NSURLSessionStream task via the HTTP Upgrade: header and appropriate -/// use of the pipelining option of NSURLSessionConfiguration. See RFC -/// 2817 and RFC 6455 for information about the Upgrade: header, and -/// comments below on turning data tasks into stream tasks. -/// -/// An NSURLSessionWebSocketTask is a task that allows clients to connect to servers supporting -/// WebSocket. The task will perform the HTTP handshake to upgrade the connection -/// and once the WebSocket handshake is successful, the client can read and write -/// messages that will be framed using the WebSocket protocol by the framework. -class NSURLSession extends objc.NSObject { - NSURLSession._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSURLSession] that points to the same underlying object as [other]. - NSURLSession.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSURLSession] that wraps the given raw object pointer. - NSURLSession.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSURLSession]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSession); - } +typedef SSLReadFuncFunction = OSStatus Function(SSLConnectionRef connection, + ffi.Pointer data, ffi.Pointer dataLength); +typedef DartSSLReadFuncFunction = DartSInt32 Function( + SSLConnectionRef connection, + ffi.Pointer data, + ffi.Pointer dataLength); +typedef SSLReadFunc = ffi.Pointer>; +typedef SSLWriteFuncFunction = OSStatus Function(SSLConnectionRef connection, + ffi.Pointer data, ffi.Pointer dataLength); +typedef DartSSLWriteFuncFunction = DartSInt32 Function( + SSLConnectionRef connection, + ffi.Pointer data, + ffi.Pointer dataLength); +typedef SSLWriteFunc = ffi.Pointer>; - /// The shared session uses the currently set global NSURLCache, - /// NSHTTPCookieStorage and NSURLCredentialStorage objects. - static NSURLSession getSharedSession() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSession, _sel_sharedSession); - return NSURLSession.castFromPointer(_ret, retain: true, release: true); - } +enum SSLProtocolSide { + kSSLServerSide(0), + kSSLClientSide(1); - /// Customization of NSURLSession occurs during creation of a new session. - /// If you only need to use the convenience routines with custom - /// configuration options it is not necessary to specify a delegate. - /// If you do specify a delegate, the delegate will be retained until after - /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. - static NSURLSession sessionWithConfiguration_( - NSURLSessionConfiguration configuration) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSession, - _sel_sessionWithConfiguration_, configuration.ref.pointer); - return NSURLSession.castFromPointer(_ret, retain: true, release: true); - } + final int value; + const SSLProtocolSide(this.value); - /// sessionWithConfiguration:delegate:delegateQueue: - static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( - NSURLSessionConfiguration configuration, - objc.ObjCObjectBase? delegate, - NSOperationQueue? queue) { - final _ret = _objc_msgSend_aud7dn( - _class_NSURLSession, - _sel_sessionWithConfiguration_delegate_delegateQueue_, - configuration.ref.pointer, - delegate?.ref.pointer ?? ffi.nullptr, - queue?.ref.pointer ?? ffi.nullptr); - return NSURLSession.castFromPointer(_ret, retain: true, release: true); - } + static SSLProtocolSide fromValue(int value) => switch (value) { + 0 => kSSLServerSide, + 1 => kSSLClientSide, + _ => throw ArgumentError("Unknown value for SSLProtocolSide: $value"), + }; +} - /// delegateQueue - NSOperationQueue get delegateQueue { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegateQueue); - return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); - } +enum SSLConnectionType { + kSSLStreamType(0), + kSSLDatagramType(1); - /// delegate - objc.ObjCObjectBase? get delegate { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : objc.ObjCObjectBase(_ret, retain: true, release: true); - } + final int value; + const SSLConnectionType(this.value); - /// configuration - NSURLSessionConfiguration get configuration { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_configuration); - return NSURLSessionConfiguration.castFromPointer(_ret, - retain: true, release: true); - } + static SSLConnectionType fromValue(int value) => switch (value) { + 0 => kSSLStreamType, + 1 => kSSLDatagramType, + _ => throw ArgumentError("Unknown value for SSLConnectionType: $value"), + }; +} - /// The sessionDescription property is available for the developer to - /// provide a descriptive label for the session. - objc.NSString? get sessionDescription { - final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sessionDescription); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } +enum SSLAuthenticate { + kNeverAuthenticate(0), + kAlwaysAuthenticate(1), + kTryAuthenticate(2); - /// The sessionDescription property is available for the developer to - /// provide a descriptive label for the session. - set sessionDescription(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setSessionDescription_, - value?.ref.pointer ?? ffi.nullptr); - } + final int value; + const SSLAuthenticate(this.value); - /// -finishTasksAndInvalidate returns immediately and existing tasks will be allowed - /// to run to completion. New tasks may not be created. The session - /// will continue to make delegate callbacks until URLSession:didBecomeInvalidWithError: - /// has been issued. - /// - /// -finishTasksAndInvalidate and -invalidateAndCancel do not - /// have any effect on the shared session singleton. - /// - /// When invalidating a background session, it is not safe to create another background - /// session with the same identifier until URLSession:didBecomeInvalidWithError: has - /// been issued. - void finishTasksAndInvalidate() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_finishTasksAndInvalidate); - } + static SSLAuthenticate fromValue(int value) => switch (value) { + 0 => kNeverAuthenticate, + 1 => kAlwaysAuthenticate, + 2 => kTryAuthenticate, + _ => throw ArgumentError("Unknown value for SSLAuthenticate: $value"), + }; +} - /// -invalidateAndCancel acts as -finishTasksAndInvalidate, but issues - /// -cancel to all outstanding tasks for this session. Note task - /// cancellation is subject to the state of the task, and some tasks may - /// have already have completed at the time they are sent -cancel. - void invalidateAndCancel() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_invalidateAndCancel); - } +late final _class_NSURLSession = objc.getClass("NSURLSession"); +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} - /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue. - void resetWithCompletionHandler_( - objc.ObjCBlock completionHandler) { - _objc_msgSend_4daxhl(this.ref.pointer, _sel_resetWithCompletionHandler_, - completionHandler.ref.pointer); - } +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerTrampoline) + ..keepIsolateAlive = false; - /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue. - void flushWithCompletionHandler_( - objc.ObjCBlock completionHandler) { - _objc_msgSend_4daxhl(this.ref.pointer, _sel_flushWithCompletionHandler_, - completionHandler.ref.pointer); - } +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, + objc.NSError?)>(pointer, retain: retain, release: release); - /// invokes completionHandler with outstanding data, upload and download tasks. - void getTasksWithCompletionHandler_( - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> - completionHandler) { - _objc_msgSend_4daxhl(this.ref.pointer, _sel_getTasksWithCompletionHandler_, - completionHandler.ref.pointer); - } + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// invokes completionHandler with all outstanding tasks. - void getAllTasksWithCompletionHandler_( - objc.ObjCBlock)> - completionHandler) { - _objc_msgSend_4daxhl(this.ref.pointer, - _sel_getAllTasksWithCompletionHandler_, completionHandler.ref.pointer); - } + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : objc.NSData.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); - /// Creates a data task with the given request. The request may have a body stream. - NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_juohf7( - this.ref.pointer, _sel_dataTaskWithRequest_, request.ref.pointer); - return NSURLSessionDataTask.castFromPointer(_ret, - retain: true, release: true); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc + .ObjCBlock + listener(void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: false, release: true), + arg1.address == 0 + ? null + : NSURLResponse.castFromPointer(arg1, + retain: false, release: true), + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1hcfngn(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSData?, NSURLResponse?, + objc.NSError?)>(wrapper, retain: false, release: true); } +} - /// Creates a data task to retrieve the contents of the given URL. - NSURLSessionDataTask dataTaskWithURL_(objc.NSURL url) { - final _ret = _objc_msgSend_juohf7( - this.ref.pointer, _sel_dataTaskWithURL_, url.ref.pointer); - return NSURLSessionDataTask.castFromPointer(_ret, - retain: true, release: true); - } +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_CallExtension on objc + .ObjCBlock { + void call(objc.NSData? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr); +} - /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( - NSURLRequest request, objc.NSURL fileURL) { - final _ret = _objc_msgSend_iq11qg( - this.ref.pointer, - _sel_uploadTaskWithRequest_fromFile_, - request.ref.pointer, - fileURL.ref.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: true, release: true); +late final _sel_dataTaskWithRequest_completionHandler_ = + objc.registerName("dataTaskWithRequest:completionHandler:"); +final _objc_msgSend_o4sqyk = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_dataTaskWithURL_completionHandler_ = + objc.registerName("dataTaskWithURL:completionHandler:"); + +/// WARNING: NSURLSessionUploadTask is a stub. To generate bindings for this class, include +/// NSURLSessionUploadTask in your config's objc-interfaces list. +/// +/// An NSURLSessionUploadTask does not currently provide any additional +/// functionality over an NSURLSessionDataTask. All delegate messages +/// that may be sent referencing an NSURLSessionDataTask equally apply +/// to NSURLSessionUploadTasks. +class NSURLSessionUploadTask extends NSURLSessionDataTask { + NSURLSessionUploadTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionUploadTask] that points to the same underlying object as [other]. + NSURLSessionUploadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionUploadTask] that wraps the given raw object pointer. + NSURLSessionUploadTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); +} + +late final _sel_uploadTaskWithRequest_fromFile_completionHandler_ = + objc.registerName("uploadTaskWithRequest:fromFile:completionHandler:"); +final _objc_msgSend_but05y = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromData_completionHandler_ = + objc.registerName("uploadTaskWithRequest:fromData:completionHandler:"); +late final _sel_uploadTaskWithResumeData_completionHandler_ = + objc.registerName("uploadTaskWithResumeData:completionHandler:"); +late final _class_NSURLSessionDownloadTask = + objc.getClass("NSURLSessionDownloadTask"); +void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSData { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSData_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(objc.NSData?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_closureCallable, + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock listener( + void Function(objc.NSData?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1jdvcbf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } +} - /// Creates an upload task with the given request. The body of the request is provided from the bodyData. - NSURLSessionUploadTask uploadTaskWithRequest_fromData_( - NSURLRequest request, objc.NSData bodyData) { - final _ret = _objc_msgSend_iq11qg( - this.ref.pointer, - _sel_uploadTaskWithRequest_fromData_, - request.ref.pointer, - bodyData.ref.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: true, release: true); +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSData_CallExtension + on objc.ObjCBlock { + void call(objc.NSData? arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_cancelByProducingResumeData_ = + objc.registerName("cancelByProducingResumeData:"); + +/// NSURLSessionDownloadTask is a task that represents a download to +/// local storage. +class NSURLSessionDownloadTask extends NSURLSessionTask { + NSURLSessionDownloadTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. + NSURLSessionDownloadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionDownloadTask] that wraps the given raw object pointer. + NSURLSessionDownloadTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_69e0x1( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); } - /// Creates an upload task from a resume data blob. Requires the server to support the latest resumable uploads - /// Internet-Draft from the HTTP Working Group, found at - /// https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/ - /// If resuming from an upload file, the file must still exist and be unmodified. If the upload cannot be successfully - /// resumed, URLSession:task:didCompleteWithError: will be called. - /// - /// - Parameter resumeData: Resume data blob from an incomplete upload, such as data returned by the cancelByProducingResumeData: method. - /// - Returns: A new session upload task, or nil if the resumeData is invalid. - NSURLSessionUploadTask uploadTaskWithResumeData_(objc.NSData resumeData) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, - _sel_uploadTaskWithResumeData_, resumeData.ref.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: true, release: true); + /// Cancel the download (and calls the superclass -cancel). If + /// conditions will allow for resuming the download in the future, the + /// callback will be called with an opaque data blob, which may be used + /// with -downloadTaskWithResumeData: to attempt to resume the download. + /// If resume data cannot be created, the completion handler will be + /// called with nil resumeData. + void cancelByProducingResumeData_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_f167m6(this.ref.pointer, _sel_cancelByProducingResumeData_, + completionHandler.ref.pointer); } - /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. - NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, - _sel_uploadTaskWithStreamedRequest_, request.ref.pointer); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: true, release: true); + /// init + NSURLSessionDownloadTask init() { + final _ret = + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - /// Creates a download task with the given request. - NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_juohf7( - this.ref.pointer, _sel_downloadTaskWithRequest_, request.ref.pointer); + /// new + static NSURLSessionDownloadTask new1() { + final _ret = + _objc_msgSend_1x359cv(_class_NSURLSessionDownloadTask, _sel_new); return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } - /// Creates a download task to download the contents of the given URL. - NSURLSessionDownloadTask downloadTaskWithURL_(objc.NSURL url) { - final _ret = _objc_msgSend_juohf7( - this.ref.pointer, _sel_downloadTaskWithURL_, url.ref.pointer); + /// allocWithZone: + static NSURLSessionDownloadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_hzlb60( + _class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } - /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. - NSURLSessionDownloadTask downloadTaskWithResumeData_(objc.NSData resumeData) { - final _ret = _objc_msgSend_juohf7(this.ref.pointer, - _sel_downloadTaskWithResumeData_, resumeData.ref.pointer); + /// alloc + static NSURLSessionDownloadTask alloc() { + final _ret = + _objc_msgSend_1x359cv(_class_NSURLSessionDownloadTask, _sel_alloc); return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: true, release: true); + retain: false, release: true); } - /// Creates a bidirectional stream task to a given host and port. - NSURLSessionStreamTask streamTaskWithHostName_port_( - objc.NSString hostname, DartNSInteger port) { - final _ret = _objc_msgSend_spwp90(this.ref.pointer, - _sel_streamTaskWithHostName_port_, hostname.ref.pointer, port); - return NSURLSessionStreamTask.castFromPointer(_ret, + /// self + NSURLSessionDownloadTask self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); } - /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. - /// The NSNetService will be resolved before any IO completes. - NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { - final _ret = _objc_msgSend_juohf7( - this.ref.pointer, _sel_streamTaskWithNetService_, service.ref.pointer); - return NSURLSessionStreamTask.castFromPointer(_ret, + /// retain + NSURLSessionDownloadTask retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); } - /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. - NSURLSessionWebSocketTask webSocketTaskWithURL_(objc.NSURL url) { - final _ret = _objc_msgSend_juohf7( - this.ref.pointer, _sel_webSocketTaskWithURL_, url.ref.pointer); - return NSURLSessionWebSocketTask.castFromPointer(_ret, + /// autorelease + NSURLSessionDownloadTask autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); } +} - /// Creates a WebSocket task given the url and an array of protocols. The protocols will be used in the WebSocket handshake to - /// negotiate a preferred protocol with the server - /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC - NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( - objc.NSURL url, objc.ObjCObjectBase protocols) { - final _ret = _objc_msgSend_iq11qg( - this.ref.pointer, - _sel_webSocketTaskWithURL_protocols_, - url.ref.pointer, - protocols.ref.pointer); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: true, release: true); - } +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} - /// Creates a WebSocket task given the request. The request properties can be modified and will be used by the task during the HTTP handshake phase. - /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol - /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. - NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_juohf7( - this.ref.pointer, _sel_webSocketTaskWithRequest_, request.ref.pointer); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: true, release: true); - } +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerTrampoline) + ..keepIsolateAlive = false; - /// init - NSURLSession init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSession.castFromPointer(_ret, retain: false, release: true); - } +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, + objc.NSError?)>(pointer, retain: retain, release: release); - /// new - static NSURLSession new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSession, _sel_new); - return NSURLSession.castFromPointer(_ret, retain: false, release: true); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : objc.NSURL.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc + .ObjCBlock + listener(void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : objc.NSURL + .castFromPointer(arg0, retain: false, release: true), + arg1.address == 0 + ? null + : NSURLResponse.castFromPointer(arg1, + retain: false, release: true), + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1hcfngn(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSURL?, NSURLResponse?, + objc.NSError?)>(wrapper, retain: false, release: true); } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_CallExtension on objc + .ObjCBlock { + void call(objc.NSURL? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, + arg1?.ref.pointer ?? ffi.nullptr, + arg2?.ref.pointer ?? ffi.nullptr); +} - /// dataTaskWithRequest:completionHandler: +late final _sel_downloadTaskWithRequest_completionHandler_ = + objc.registerName("downloadTaskWithRequest:completionHandler:"); +late final _sel_downloadTaskWithURL_completionHandler_ = + objc.registerName("downloadTaskWithURL:completionHandler:"); +late final _sel_downloadTaskWithResumeData_completionHandler_ = + objc.registerName("downloadTaskWithResumeData:completionHandler:"); + +/// NSURLSession convenience routines deliver results to +/// a completion handler block. These convenience routines +/// are not available to NSURLSessions that are configured +/// as background sessions. +/// +/// Task objects are always created in a suspended state and +/// must be sent the -resume message before they will execute. +extension NSURLSessionAsynchronousConvenience on NSURLSession { + /// data task convenience methods. These methods create tasks that + /// bypass the normal delegate calls for response and data delivery, + /// and provide a simple cancelable asynchronous interface to receiving + /// data. Errors will be returned in the NSURLErrorDomain, + /// see . The delegate, if any, will still be + /// called for authentication challenges. NSURLSessionDataTask dataTaskWithRequest_completionHandler_( NSURLRequest request, objc.ObjCBlock< ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> completionHandler) { - final _ret = _objc_msgSend_1kkhn3j( + final _ret = _objc_msgSend_o4sqyk( this.ref.pointer, _sel_dataTaskWithRequest_completionHandler_, request.ref.pointer, @@ -57823,7 +57641,7 @@ class NSURLSession extends objc.NSObject { objc.ObjCBlock< ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> completionHandler) { - final _ret = _objc_msgSend_1kkhn3j( + final _ret = _objc_msgSend_o4sqyk( this.ref.pointer, _sel_dataTaskWithURL_completionHandler_, url.ref.pointer, @@ -57832,14 +57650,14 @@ class NSURLSession extends objc.NSObject { retain: true, release: true); } - /// uploadTaskWithRequest:fromFile:completionHandler: + /// upload convenience method. NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( NSURLRequest request, objc.NSURL fileURL, objc.ObjCBlock< ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> completionHandler) { - final _ret = _objc_msgSend_37obke( + final _ret = _objc_msgSend_but05y( this.ref.pointer, _sel_uploadTaskWithRequest_fromFile_completionHandler_, request.ref.pointer, @@ -57856,7 +57674,7 @@ class NSURLSession extends objc.NSObject { objc.ObjCBlock< ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> completionHandler) { - final _ret = _objc_msgSend_37obke( + final _ret = _objc_msgSend_but05y( this.ref.pointer, _sel_uploadTaskWithRequest_fromData_completionHandler_, request.ref.pointer, @@ -57866,13 +57684,18 @@ class NSURLSession extends objc.NSObject { retain: true, release: true); } - /// uploadTaskWithResumeData:completionHandler: + /// Creates a URLSessionUploadTask from a resume data blob. If resuming from an upload + /// file, the file must still exist and be unmodified. + /// + /// - Parameter resumeData: Resume data blob from an incomplete upload, such as data returned by the cancelByProducingResumeData: method. + /// - Parameter completionHandler: The completion handler to call when the load request is complete. + /// - Returns: A new session upload task, or nil if the resumeData is invalid. NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( objc.NSData resumeData, objc.ObjCBlock< ffi.Void Function(objc.NSData?, NSURLResponse?, objc.NSError?)> completionHandler) { - final _ret = _objc_msgSend_1kkhn3j( + final _ret = _objc_msgSend_o4sqyk( this.ref.pointer, _sel_uploadTaskWithResumeData_completionHandler_, resumeData.ref.pointer, @@ -57881,13 +57704,16 @@ class NSURLSession extends objc.NSObject { retain: true, release: true); } - /// downloadTaskWithRequest:completionHandler: + /// download task convenience methods. When a download successfully + /// completes, the NSURL will point to a file that must be read or + /// copied during the invocation of the completion routine. The file + /// will be removed automatically. NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( NSURLRequest request, objc.ObjCBlock< ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)> completionHandler) { - final _ret = _objc_msgSend_1kkhn3j( + final _ret = _objc_msgSend_o4sqyk( this.ref.pointer, _sel_downloadTaskWithRequest_completionHandler_, request.ref.pointer, @@ -57902,7 +57728,7 @@ class NSURLSession extends objc.NSObject { objc.ObjCBlock< ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)> completionHandler) { - final _ret = _objc_msgSend_1kkhn3j( + final _ret = _objc_msgSend_o4sqyk( this.ref.pointer, _sel_downloadTaskWithURL_completionHandler_, url.ref.pointer, @@ -57917,7 +57743,7 @@ class NSURLSession extends objc.NSObject { objc.ObjCBlock< ffi.Void Function(objc.NSURL?, NSURLResponse?, objc.NSError?)> completionHandler) { - final _ret = _objc_msgSend_1kkhn3j( + final _ret = _objc_msgSend_o4sqyk( this.ref.pointer, _sel_downloadTaskWithResumeData_completionHandler_, resumeData.ref.pointer, @@ -57925,23 +57751,247 @@ class NSURLSession extends objc.NSObject { return NSURLSessionDownloadTask.castFromPointer(_ret, retain: true, release: true); } +} - /// allocWithZone: - static NSURLSession allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_1b3ihd0(_class_NSURLSession, _sel_allocWithZone_, zone); - return NSURLSession.castFromPointer(_ret, retain: false, release: true); - } +late final _sel_sharedSession = objc.registerName("sharedSession"); +late final _class_NSURLSessionConfiguration = + objc.getClass("NSURLSessionConfiguration"); +late final _sel_backgroundSessionConfiguration_ = + objc.registerName("backgroundSessionConfiguration:"); - /// alloc - static NSURLSession alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSession, _sel_alloc); - return NSURLSession.castFromPointer(_ret, retain: false, release: true); +/// NSURLSessionDeprecated +extension NSURLSessionDeprecated on NSURLSessionConfiguration { + /// backgroundSessionConfiguration: + static NSURLSessionConfiguration backgroundSessionConfiguration_( + objc.NSString identifier) { + final _ret = _objc_msgSend_62nh5j(_class_NSURLSessionConfiguration, + _sel_backgroundSessionConfiguration_, identifier.ref.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } } -late final _class_NSURLSession = objc.getClass("NSURLSession"); -late final _sel_sharedSession = objc.registerName("sharedSession"); +late final _sel_defaultSessionConfiguration = + objc.registerName("defaultSessionConfiguration"); +late final _sel_ephemeralSessionConfiguration = + objc.registerName("ephemeralSessionConfiguration"); +late final _sel_backgroundSessionConfigurationWithIdentifier_ = + objc.registerName("backgroundSessionConfigurationWithIdentifier:"); +late final _sel_identifier = objc.registerName("identifier"); +late final _sel_requestCachePolicy = objc.registerName("requestCachePolicy"); +late final _sel_setRequestCachePolicy_ = + objc.registerName("setRequestCachePolicy:"); +late final _sel_timeoutIntervalForRequest = + objc.registerName("timeoutIntervalForRequest"); +late final _sel_setTimeoutIntervalForRequest_ = + objc.registerName("setTimeoutIntervalForRequest:"); +late final _sel_timeoutIntervalForResource = + objc.registerName("timeoutIntervalForResource"); +late final _sel_setTimeoutIntervalForResource_ = + objc.registerName("setTimeoutIntervalForResource:"); +late final _sel_waitsForConnectivity = + objc.registerName("waitsForConnectivity"); +late final _sel_setWaitsForConnectivity_ = + objc.registerName("setWaitsForConnectivity:"); +late final _sel_isDiscretionary = objc.registerName("isDiscretionary"); +late final _sel_setDiscretionary_ = objc.registerName("setDiscretionary:"); +late final _sel_sharedContainerIdentifier = + objc.registerName("sharedContainerIdentifier"); +late final _sel_setSharedContainerIdentifier_ = + objc.registerName("setSharedContainerIdentifier:"); +late final _sel_sessionSendsLaunchEvents = + objc.registerName("sessionSendsLaunchEvents"); +late final _sel_setSessionSendsLaunchEvents_ = + objc.registerName("setSessionSendsLaunchEvents:"); +late final _sel_connectionProxyDictionary = + objc.registerName("connectionProxyDictionary"); +late final _sel_setConnectionProxyDictionary_ = + objc.registerName("setConnectionProxyDictionary:"); +late final _sel_TLSMinimumSupportedProtocol = + objc.registerName("TLSMinimumSupportedProtocol"); +final _objc_msgSend_cbopi9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocol_ = + objc.registerName("setTLSMinimumSupportedProtocol:"); +final _objc_msgSend_268k8x = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocol = + objc.registerName("TLSMaximumSupportedProtocol"); +late final _sel_setTLSMaximumSupportedProtocol_ = + objc.registerName("setTLSMaximumSupportedProtocol:"); +late final _sel_TLSMinimumSupportedProtocolVersion = + objc.registerName("TLSMinimumSupportedProtocolVersion"); +final _objc_msgSend_9jpwfb = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Uint16 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocolVersion_ = + objc.registerName("setTLSMinimumSupportedProtocolVersion:"); +final _objc_msgSend_1mvuct7 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Uint16)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocolVersion = + objc.registerName("TLSMaximumSupportedProtocolVersion"); +late final _sel_setTLSMaximumSupportedProtocolVersion_ = + objc.registerName("setTLSMaximumSupportedProtocolVersion:"); +late final _sel_HTTPShouldSetCookies = + objc.registerName("HTTPShouldSetCookies"); +late final _sel_setHTTPShouldSetCookies_ = + objc.registerName("setHTTPShouldSetCookies:"); +late final _sel_HTTPCookieAcceptPolicy = + objc.registerName("HTTPCookieAcceptPolicy"); +final _objc_msgSend_104dkoq = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSUInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setHTTPCookieAcceptPolicy_ = + objc.registerName("setHTTPCookieAcceptPolicy:"); +final _objc_msgSend_3q55ys = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_HTTPAdditionalHeaders = + objc.registerName("HTTPAdditionalHeaders"); +late final _sel_setHTTPAdditionalHeaders_ = + objc.registerName("setHTTPAdditionalHeaders:"); +late final _sel_HTTPMaximumConnectionsPerHost = + objc.registerName("HTTPMaximumConnectionsPerHost"); +late final _sel_setHTTPMaximumConnectionsPerHost_ = + objc.registerName("setHTTPMaximumConnectionsPerHost:"); +late final _sel_HTTPCookieStorage = objc.registerName("HTTPCookieStorage"); +late final _sel_setHTTPCookieStorage_ = + objc.registerName("setHTTPCookieStorage:"); + +/// WARNING: NSURLCredentialStorage is a stub. To generate bindings for this class, include +/// NSURLCredentialStorage in your config's objc-interfaces list. +/// +/// NSURLCredentialStorage +class NSURLCredentialStorage extends objc.ObjCObjectBase { + NSURLCredentialStorage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSURLCredentialStorage] that points to the same underlying object as [other]. + NSURLCredentialStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLCredentialStorage] that wraps the given raw object pointer. + NSURLCredentialStorage.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); +} + +late final _sel_URLCredentialStorage = + objc.registerName("URLCredentialStorage"); +late final _sel_setURLCredentialStorage_ = + objc.registerName("setURLCredentialStorage:"); +late final _sel_URLCache = objc.registerName("URLCache"); +late final _sel_setURLCache_ = objc.registerName("setURLCache:"); +late final _sel_shouldUseExtendedBackgroundIdleMode = + objc.registerName("shouldUseExtendedBackgroundIdleMode"); +late final _sel_setShouldUseExtendedBackgroundIdleMode_ = + objc.registerName("setShouldUseExtendedBackgroundIdleMode:"); +late final _sel_protocolClasses = objc.registerName("protocolClasses"); +late final _sel_setProtocolClasses_ = objc.registerName("setProtocolClasses:"); + +/// ! +/// @enum NSURLSessionMultipathServiceType +/// +/// @discussion The NSURLSessionMultipathServiceType enum defines constants that +/// can be used to specify the multipath service type to associate an NSURLSession. The +/// multipath service type determines whether multipath TCP should be attempted and the conditions +/// for creating and switching between subflows. Using these service types requires the appropriate entitlement. Any connection attempt will fail if the process does not have the required entitlement. +/// A primary interface is a generally less expensive interface in terms of both cost and power (such as WiFi or ethernet). A secondary interface is more expensive (such as 3G or LTE). +/// +/// @constant NSURLSessionMultipathServiceTypeNone Specifies that multipath tcp should not be used. Connections will use a single flow. +/// This is the default value. No entitlement is required to set this value. +/// +/// @constant NSURLSessionMultipathServiceTypeHandover Specifies that a secondary subflow should only be used +/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entitlement. +/// +/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secondary subflow should be used if the +/// primary subflow is not performing adequately (packet loss, high round trip times, bandwidth issues). The secondary +/// subflow will be created more aggressively than with NSURLSessionMultipathServiceTypeHandover. Requires the com.apple.developer.networking.multipath entitlement. +/// +/// @constant NSURLSessionMultipathServiceTypeAggregate Specifies that multiple subflows across multiple interfaces should be +/// used for better bandwidth. This mode is only available for experimentation on devices configured for development use. +/// It can be enabled in the Developer section of the Settings app. +enum NSURLSessionMultipathServiceType { + /// None - no multipath (default) + NSURLSessionMultipathServiceTypeNone(0), + + /// Handover - secondary flows brought up when primary flow is not performing adequately. + NSURLSessionMultipathServiceTypeHandover(1), + + /// Interactive - secondary flows created more aggressively. + NSURLSessionMultipathServiceTypeInteractive(2), + + /// Aggregate - multiple subflows used for greater bandwidth. + NSURLSessionMultipathServiceTypeAggregate(3); + + final int value; + const NSURLSessionMultipathServiceType(this.value); + + static NSURLSessionMultipathServiceType fromValue(int value) => + switch (value) { + 0 => NSURLSessionMultipathServiceTypeNone, + 1 => NSURLSessionMultipathServiceTypeHandover, + 2 => NSURLSessionMultipathServiceTypeInteractive, + 3 => NSURLSessionMultipathServiceTypeAggregate, + _ => throw ArgumentError( + "Unknown value for NSURLSessionMultipathServiceType: $value"), + }; +} + +late final _sel_multipathServiceType = + objc.registerName("multipathServiceType"); +final _objc_msgSend_1wxwnc0 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMultipathServiceType_ = + objc.registerName("setMultipathServiceType:"); +final _objc_msgSend_1hx005a = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSInteger)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); /// Configuration options for an NSURLSession. When a session is /// created, a copy of the configuration object is made - you cannot @@ -57971,13 +58021,13 @@ class NSURLSessionConfiguration extends objc.NSObject { /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( + return _objc_msgSend_69e0x1( obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionConfiguration); } /// defaultSessionConfiguration static NSURLSessionConfiguration getDefaultSessionConfiguration() { - final _ret = _objc_msgSend_1unuoxw( + final _ret = _objc_msgSend_1x359cv( _class_NSURLSessionConfiguration, _sel_defaultSessionConfiguration); return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); @@ -57985,7 +58035,7 @@ class NSURLSessionConfiguration extends objc.NSObject { /// ephemeralSessionConfiguration static NSURLSessionConfiguration getEphemeralSessionConfiguration() { - final _ret = _objc_msgSend_1unuoxw( + final _ret = _objc_msgSend_1x359cv( _class_NSURLSessionConfiguration, _sel_ephemeralSessionConfiguration); return NSURLSessionConfiguration.castFromPointer(_ret, retain: true, release: true); @@ -57994,7 +58044,7 @@ class NSURLSessionConfiguration extends objc.NSObject { /// backgroundSessionConfigurationWithIdentifier: static NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier_(objc.NSString identifier) { - final _ret = _objc_msgSend_juohf7( + final _ret = _objc_msgSend_62nh5j( _class_NSURLSessionConfiguration, _sel_backgroundSessionConfigurationWithIdentifier_, identifier.ref.pointer); @@ -58004,7 +58054,7 @@ class NSURLSessionConfiguration extends objc.NSObject { /// identifier for the background session configuration objc.NSString? get identifier { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_identifier); + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_identifier); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -58013,97 +58063,103 @@ class NSURLSessionConfiguration extends objc.NSObject { /// default cache policy for requests NSURLRequestCachePolicy get requestCachePolicy { final _ret = - _objc_msgSend_2xak1q(this.ref.pointer, _sel_requestCachePolicy); + _objc_msgSend_8jm3uo(this.ref.pointer, _sel_requestCachePolicy); return NSURLRequestCachePolicy.fromValue(_ret); } /// default cache policy for requests set requestCachePolicy(NSURLRequestCachePolicy value) { - return _objc_msgSend_12vaadl( + return _objc_msgSend_1yjxuv2( this.ref.pointer, _sel_setRequestCachePolicy_, value.value); } /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. DartNSTimeInterval get timeoutIntervalForRequest { - return _objc_msgSend_10noklm( - this.ref.pointer, _sel_timeoutIntervalForRequest); + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret( + this.ref.pointer, _sel_timeoutIntervalForRequest) + : _objc_msgSend_1ukqyt8( + this.ref.pointer, _sel_timeoutIntervalForRequest); } /// default timeout for requests. This will cause a timeout if no data is transmitted for the given timeout value, and is reset whenever data is transmitted. set timeoutIntervalForRequest(DartNSTimeInterval value) { - return _objc_msgSend_suh039( + return _objc_msgSend_hwm8nu( this.ref.pointer, _sel_setTimeoutIntervalForRequest_, value); } /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. DartNSTimeInterval get timeoutIntervalForResource { - return _objc_msgSend_10noklm( - this.ref.pointer, _sel_timeoutIntervalForResource); + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret( + this.ref.pointer, _sel_timeoutIntervalForResource) + : _objc_msgSend_1ukqyt8( + this.ref.pointer, _sel_timeoutIntervalForResource); } /// default timeout for requests. This will cause a timeout if a resource is not able to be retrieved within a given timeout. set timeoutIntervalForResource(DartNSTimeInterval value) { - return _objc_msgSend_suh039( + return _objc_msgSend_hwm8nu( this.ref.pointer, _sel_setTimeoutIntervalForResource_, value); } /// type of service for requests. NSURLRequestNetworkServiceType get networkServiceType { final _ret = - _objc_msgSend_ttt73t(this.ref.pointer, _sel_networkServiceType); + _objc_msgSend_t4uaw1(this.ref.pointer, _sel_networkServiceType); return NSURLRequestNetworkServiceType.fromValue(_ret); } /// type of service for requests. set networkServiceType(NSURLRequestNetworkServiceType value) { - return _objc_msgSend_br89tg( + return _objc_msgSend_1mse4s1( this.ref.pointer, _sel_setNetworkServiceType_, value.value); } /// allow request to route over cellular. bool get allowsCellularAccess { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_allowsCellularAccess); + return _objc_msgSend_91o635(this.ref.pointer, _sel_allowsCellularAccess); } /// allow request to route over cellular. set allowsCellularAccess(bool value) { - return _objc_msgSend_117qins( + return _objc_msgSend_1s56lr9( this.ref.pointer, _sel_setAllowsCellularAccess_, value); } /// allow request to route over expensive networks. Defaults to YES. bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_olxnu1( + return _objc_msgSend_91o635( this.ref.pointer, _sel_allowsExpensiveNetworkAccess); } /// allow request to route over expensive networks. Defaults to YES. set allowsExpensiveNetworkAccess(bool value) { - return _objc_msgSend_117qins( + return _objc_msgSend_1s56lr9( this.ref.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } /// allow request to route over networks in constrained mode. Defaults to YES. bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_olxnu1( + return _objc_msgSend_91o635( this.ref.pointer, _sel_allowsConstrainedNetworkAccess); } /// allow request to route over networks in constrained mode. Defaults to YES. set allowsConstrainedNetworkAccess(bool value) { - return _objc_msgSend_117qins( + return _objc_msgSend_1s56lr9( this.ref.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. bool get requiresDNSSECValidation { - return _objc_msgSend_olxnu1( + return _objc_msgSend_91o635( this.ref.pointer, _sel_requiresDNSSECValidation); } /// requires requests from the session to be made with DNSSEC validation enabled. Defaults to NO. set requiresDNSSECValidation(bool value) { - return _objc_msgSend_117qins( + return _objc_msgSend_1s56lr9( this.ref.pointer, _sel_setRequiresDNSSECValidation_, value); } @@ -58120,7 +58176,7 @@ class NSURLSessionConfiguration extends objc.NSObject { /// Default value is NO. Ignored by background sessions, as background sessions /// always wait for connectivity. bool get waitsForConnectivity { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_waitsForConnectivity); + return _objc_msgSend_91o635(this.ref.pointer, _sel_waitsForConnectivity); } /// Causes tasks to wait for network connectivity to become available, rather @@ -58136,18 +58192,18 @@ class NSURLSessionConfiguration extends objc.NSObject { /// Default value is NO. Ignored by background sessions, as background sessions /// always wait for connectivity. set waitsForConnectivity(bool value) { - return _objc_msgSend_117qins( + return _objc_msgSend_1s56lr9( this.ref.pointer, _sel_setWaitsForConnectivity_, value); } /// allows background tasks to be scheduled at the discretion of the system for optimal performance. bool get discretionary { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isDiscretionary); + return _objc_msgSend_91o635(this.ref.pointer, _sel_isDiscretionary); } /// allows background tasks to be scheduled at the discretion of the system for optimal performance. set discretionary(bool value) { - return _objc_msgSend_117qins( + return _objc_msgSend_1s56lr9( this.ref.pointer, _sel_setDiscretionary_, value); } @@ -58156,7 +58212,7 @@ class NSURLSessionConfiguration extends objc.NSObject { /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. objc.NSString? get sharedContainerIdentifier { final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_sharedContainerIdentifier); + _objc_msgSend_1x359cv(this.ref.pointer, _sel_sharedContainerIdentifier); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -58166,7 +58222,7 @@ class NSURLSessionConfiguration extends objc.NSObject { /// App extensions wishing to use background sessions *must* set this property to a valid container identifier, or /// all transfers in that session will fail with NSURLErrorBackgroundSessionRequiresSharedContainer. set sharedContainerIdentifier(objc.NSString? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, + return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setSharedContainerIdentifier_, value?.ref.pointer ?? ffi.nullptr); } @@ -58176,7 +58232,7 @@ class NSURLSessionConfiguration extends objc.NSObject { /// /// NOTE: macOS apps based on AppKit do not support background launch. bool get sessionSendsLaunchEvents { - return _objc_msgSend_olxnu1( + return _objc_msgSend_91o635( this.ref.pointer, _sel_sessionSendsLaunchEvents); } @@ -58186,14 +58242,14 @@ class NSURLSessionConfiguration extends objc.NSObject { /// /// NOTE: macOS apps based on AppKit do not support background launch. set sessionSendsLaunchEvents(bool value) { - return _objc_msgSend_117qins( + return _objc_msgSend_1s56lr9( this.ref.pointer, _sel_setSessionSendsLaunchEvents_, value); } /// The proxy dictionary, as described by objc.NSDictionary? get connectionProxyDictionary { final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_connectionProxyDictionary); + _objc_msgSend_1x359cv(this.ref.pointer, _sel_connectionProxyDictionary); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -58201,94 +58257,94 @@ class NSURLSessionConfiguration extends objc.NSObject { /// The proxy dictionary, as described by set connectionProxyDictionary(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, + return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setConnectionProxyDictionary_, value?.ref.pointer ?? ffi.nullptr); } /// The minimum allowable versions of the TLS protocol, from SSLProtocol get TLSMinimumSupportedProtocol { - final _ret = _objc_msgSend_ewo6ux( + final _ret = _objc_msgSend_cbopi9( this.ref.pointer, _sel_TLSMinimumSupportedProtocol); return SSLProtocol.fromValue(_ret); } /// The minimum allowable versions of the TLS protocol, from set TLSMinimumSupportedProtocol(SSLProtocol value) { - return _objc_msgSend_hcgw10( + return _objc_msgSend_268k8x( this.ref.pointer, _sel_setTLSMinimumSupportedProtocol_, value.value); } /// The maximum allowable versions of the TLS protocol, from SSLProtocol get TLSMaximumSupportedProtocol { - final _ret = _objc_msgSend_ewo6ux( + final _ret = _objc_msgSend_cbopi9( this.ref.pointer, _sel_TLSMaximumSupportedProtocol); return SSLProtocol.fromValue(_ret); } /// The maximum allowable versions of the TLS protocol, from set TLSMaximumSupportedProtocol(SSLProtocol value) { - return _objc_msgSend_hcgw10( + return _objc_msgSend_268k8x( this.ref.pointer, _sel_setTLSMaximumSupportedProtocol_, value.value); } /// The minimum allowable versions of the TLS protocol, from tls_protocol_version_t get TLSMinimumSupportedProtocolVersion { - final _ret = _objc_msgSend_a6qtz( + final _ret = _objc_msgSend_9jpwfb( this.ref.pointer, _sel_TLSMinimumSupportedProtocolVersion); return tls_protocol_version_t.fromValue(_ret); } /// The minimum allowable versions of the TLS protocol, from set TLSMinimumSupportedProtocolVersion(tls_protocol_version_t value) { - return _objc_msgSend_yb8bfm(this.ref.pointer, + return _objc_msgSend_1mvuct7(this.ref.pointer, _sel_setTLSMinimumSupportedProtocolVersion_, value.value); } /// The maximum allowable versions of the TLS protocol, from tls_protocol_version_t get TLSMaximumSupportedProtocolVersion { - final _ret = _objc_msgSend_a6qtz( + final _ret = _objc_msgSend_9jpwfb( this.ref.pointer, _sel_TLSMaximumSupportedProtocolVersion); return tls_protocol_version_t.fromValue(_ret); } /// The maximum allowable versions of the TLS protocol, from set TLSMaximumSupportedProtocolVersion(tls_protocol_version_t value) { - return _objc_msgSend_yb8bfm(this.ref.pointer, + return _objc_msgSend_1mvuct7(this.ref.pointer, _sel_setTLSMaximumSupportedProtocolVersion_, value.value); } /// Allow the use of HTTP pipelining bool get HTTPShouldUsePipelining { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldUsePipelining); + return _objc_msgSend_91o635(this.ref.pointer, _sel_HTTPShouldUsePipelining); } /// Allow the use of HTTP pipelining set HTTPShouldUsePipelining(bool value) { - return _objc_msgSend_117qins( + return _objc_msgSend_1s56lr9( this.ref.pointer, _sel_setHTTPShouldUsePipelining_, value); } /// Allow the session to set cookies on requests bool get HTTPShouldSetCookies { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_HTTPShouldSetCookies); + return _objc_msgSend_91o635(this.ref.pointer, _sel_HTTPShouldSetCookies); } /// Allow the session to set cookies on requests set HTTPShouldSetCookies(bool value) { - return _objc_msgSend_117qins( + return _objc_msgSend_1s56lr9( this.ref.pointer, _sel_setHTTPShouldSetCookies_, value); } /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. NSHTTPCookieAcceptPolicy get HTTPCookieAcceptPolicy { final _ret = - _objc_msgSend_1jpuqgg(this.ref.pointer, _sel_HTTPCookieAcceptPolicy); + _objc_msgSend_104dkoq(this.ref.pointer, _sel_HTTPCookieAcceptPolicy); return NSHTTPCookieAcceptPolicy.fromValue(_ret); } /// Policy for accepting cookies. This overrides the policy otherwise specified by the cookie storage. set HTTPCookieAcceptPolicy(NSHTTPCookieAcceptPolicy value) { - return _objc_msgSend_199e8fv( + return _objc_msgSend_3q55ys( this.ref.pointer, _sel_setHTTPCookieAcceptPolicy_, value.value); } @@ -58296,7 +58352,7 @@ class NSURLSessionConfiguration extends objc.NSObject { /// Note that these headers are added to the request only if not already present. objc.NSDictionary? get HTTPAdditionalHeaders { final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPAdditionalHeaders); + _objc_msgSend_1x359cv(this.ref.pointer, _sel_HTTPAdditionalHeaders); return _ret.address == 0 ? null : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); @@ -58305,26 +58361,26 @@ class NSURLSessionConfiguration extends objc.NSObject { /// Specifies additional headers which will be set on outgoing requests. /// Note that these headers are added to the request only if not already present. set HTTPAdditionalHeaders(objc.NSDictionary? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, + return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setHTTPAdditionalHeaders_, value?.ref.pointer ?? ffi.nullptr); } /// The maximum number of simultaneous persistent connections per host DartNSInteger get HTTPMaximumConnectionsPerHost { - return _objc_msgSend_z1fx1b( + return _objc_msgSend_1hz7y9r( this.ref.pointer, _sel_HTTPMaximumConnectionsPerHost); } /// The maximum number of simultaneous persistent connections per host set HTTPMaximumConnectionsPerHost(DartNSInteger value) { - return _objc_msgSend_ke7qz2( + return _objc_msgSend_4sp4xj( this.ref.pointer, _sel_setHTTPMaximumConnectionsPerHost_, value); } /// The cookie storage object to use, or nil to indicate that no cookies should be handled NSHTTPCookieStorage? get HTTPCookieStorage { final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_HTTPCookieStorage); + _objc_msgSend_1x359cv(this.ref.pointer, _sel_HTTPCookieStorage); return _ret.address == 0 ? null : NSHTTPCookieStorage.castFromPointer(_ret, @@ -58333,14 +58389,14 @@ class NSURLSessionConfiguration extends objc.NSObject { /// The cookie storage object to use, or nil to indicate that no cookies should be handled set HTTPCookieStorage(NSHTTPCookieStorage? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setHTTPCookieStorage_, + return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setHTTPCookieStorage_, value?.ref.pointer ?? ffi.nullptr); } /// The credential storage object, or nil to indicate that no credential storage is to be used NSURLCredentialStorage? get URLCredentialStorage { final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URLCredentialStorage); + _objc_msgSend_1x359cv(this.ref.pointer, _sel_URLCredentialStorage); return _ret.address == 0 ? null : NSURLCredentialStorage.castFromPointer(_ret, @@ -58349,13 +58405,13 @@ class NSURLSessionConfiguration extends objc.NSObject { /// The credential storage object, or nil to indicate that no credential storage is to be used set URLCredentialStorage(NSURLCredentialStorage? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setURLCredentialStorage_, - value?.ref.pointer ?? ffi.nullptr); + return _objc_msgSend_1jdvcbf(this.ref.pointer, + _sel_setURLCredentialStorage_, value?.ref.pointer ?? ffi.nullptr); } /// The URL resource cache, or nil to indicate that no caching is to be performed NSURLCache? get URLCache { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_URLCache); + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_URLCache); return _ret.address == 0 ? null : NSURLCache.castFromPointer(_ret, retain: true, release: true); @@ -58363,21 +58419,21 @@ class NSURLSessionConfiguration extends objc.NSObject { /// The URL resource cache, or nil to indicate that no caching is to be performed set URLCache(NSURLCache? value) { - return _objc_msgSend_ukcdfq( + return _objc_msgSend_1jdvcbf( this.ref.pointer, _sel_setURLCache_, value?.ref.pointer ?? ffi.nullptr); } /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) bool get shouldUseExtendedBackgroundIdleMode { - return _objc_msgSend_olxnu1( + return _objc_msgSend_91o635( this.ref.pointer, _sel_shouldUseExtendedBackgroundIdleMode); } /// Enable extended background idle mode for any tcp sockets created. Enabling this mode asks the system to keep the socket open /// and delay reclaiming it when the process moves to the background (see https://developer.apple.com/library/ios/technotes/tn2277/_index.html) set shouldUseExtendedBackgroundIdleMode(bool value) { - return _objc_msgSend_117qins( + return _objc_msgSend_1s56lr9( this.ref.pointer, _sel_setShouldUseExtendedBackgroundIdleMode_, value); } @@ -58390,7 +58446,7 @@ class NSURLSessionConfiguration extends objc.NSObject { /// Custom NSURLProtocol subclasses are not available to background /// sessions. objc.ObjCObjectBase? get protocolClasses { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_protocolClasses); + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_protocolClasses); return _ret.address == 0 ? null : objc.ObjCObjectBase(_ret, retain: true, release: true); @@ -58405,27 +58461,27 @@ class NSURLSessionConfiguration extends objc.NSObject { /// Custom NSURLProtocol subclasses are not available to background /// sessions. set protocolClasses(objc.ObjCObjectBase? value) { - return _objc_msgSend_ukcdfq(this.ref.pointer, _sel_setProtocolClasses_, + return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setProtocolClasses_, value?.ref.pointer ?? ffi.nullptr); } /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone NSURLSessionMultipathServiceType get multipathServiceType { final _ret = - _objc_msgSend_zqvllq(this.ref.pointer, _sel_multipathServiceType); + _objc_msgSend_1wxwnc0(this.ref.pointer, _sel_multipathServiceType); return NSURLSessionMultipathServiceType.fromValue(_ret); } /// multipath service type to use for connections. The default is NSURLSessionMultipathServiceTypeNone set multipathServiceType(NSURLSessionMultipathServiceType value) { - return _objc_msgSend_1ngj1qh( + return _objc_msgSend_1hx005a( this.ref.pointer, _sel_setMultipathServiceType_, value.value); } /// init NSURLSessionConfiguration init() { final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); return NSURLSessionConfiguration.castFromPointer(_ret, retain: false, release: true); } @@ -58433,23 +58489,14 @@ class NSURLSessionConfiguration extends objc.NSObject { /// new static NSURLSessionConfiguration new1() { final _ret = - _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_new); + _objc_msgSend_1x359cv(_class_NSURLSessionConfiguration, _sel_new); return NSURLSessionConfiguration.castFromPointer(_ret, retain: false, release: true); } - /// backgroundSessionConfiguration: - static NSURLSessionConfiguration backgroundSessionConfiguration_( - objc.NSString identifier) { - final _ret = _objc_msgSend_juohf7(_class_NSURLSessionConfiguration, - _sel_backgroundSessionConfiguration_, identifier.ref.pointer); - return NSURLSessionConfiguration.castFromPointer(_ret, - retain: true, release: true); - } - /// allocWithZone: static NSURLSessionConfiguration allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( + final _ret = _objc_msgSend_hzlb60( _class_NSURLSessionConfiguration, _sel_allocWithZone_, zone); return NSURLSessionConfiguration.castFromPointer(_ret, retain: false, release: true); @@ -58458,223 +58505,102 @@ class NSURLSessionConfiguration extends objc.NSObject { /// alloc static NSURLSessionConfiguration alloc() { final _ret = - _objc_msgSend_1unuoxw(_class_NSURLSessionConfiguration, _sel_alloc); + _objc_msgSend_1x359cv(_class_NSURLSessionConfiguration, _sel_alloc); return NSURLSessionConfiguration.castFromPointer(_ret, retain: false, release: true); } + + /// self + NSURLSessionConfiguration self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } + + /// retain + NSURLSessionConfiguration retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } + + /// autorelease + NSURLSessionConfiguration autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } } -late final _class_NSURLSessionConfiguration = - objc.getClass("NSURLSessionConfiguration"); -late final _sel_defaultSessionConfiguration = - objc.registerName("defaultSessionConfiguration"); -late final _sel_ephemeralSessionConfiguration = - objc.registerName("ephemeralSessionConfiguration"); -late final _sel_backgroundSessionConfigurationWithIdentifier_ = - objc.registerName("backgroundSessionConfigurationWithIdentifier:"); -late final _sel_identifier = objc.registerName("identifier"); -late final _sel_requestCachePolicy = objc.registerName("requestCachePolicy"); -late final _sel_setRequestCachePolicy_ = - objc.registerName("setRequestCachePolicy:"); -late final _sel_timeoutIntervalForRequest = - objc.registerName("timeoutIntervalForRequest"); -late final _sel_setTimeoutIntervalForRequest_ = - objc.registerName("setTimeoutIntervalForRequest:"); -late final _sel_timeoutIntervalForResource = - objc.registerName("timeoutIntervalForResource"); -late final _sel_setTimeoutIntervalForResource_ = - objc.registerName("setTimeoutIntervalForResource:"); -late final _sel_waitsForConnectivity = - objc.registerName("waitsForConnectivity"); -late final _sel_setWaitsForConnectivity_ = - objc.registerName("setWaitsForConnectivity:"); -late final _sel_isDiscretionary = objc.registerName("isDiscretionary"); -late final _sel_setDiscretionary_ = objc.registerName("setDiscretionary:"); -late final _sel_sharedContainerIdentifier = - objc.registerName("sharedContainerIdentifier"); -late final _sel_setSharedContainerIdentifier_ = - objc.registerName("setSharedContainerIdentifier:"); -late final _sel_sessionSendsLaunchEvents = - objc.registerName("sessionSendsLaunchEvents"); -late final _sel_setSessionSendsLaunchEvents_ = - objc.registerName("setSessionSendsLaunchEvents:"); -late final _sel_connectionProxyDictionary = - objc.registerName("connectionProxyDictionary"); -late final _sel_setConnectionProxyDictionary_ = - objc.registerName("setConnectionProxyDictionary:"); -late final _sel_TLSMinimumSupportedProtocol = - objc.registerName("TLSMinimumSupportedProtocol"); -final _objc_msgSend_ewo6ux = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setTLSMinimumSupportedProtocol_ = - objc.registerName("setTLSMinimumSupportedProtocol:"); -final _objc_msgSend_hcgw10 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_TLSMaximumSupportedProtocol = - objc.registerName("TLSMaximumSupportedProtocol"); -late final _sel_setTLSMaximumSupportedProtocol_ = - objc.registerName("setTLSMaximumSupportedProtocol:"); -late final _sel_TLSMinimumSupportedProtocolVersion = - objc.registerName("TLSMinimumSupportedProtocolVersion"); -final _objc_msgSend_a6qtz = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Uint16 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setTLSMinimumSupportedProtocolVersion_ = - objc.registerName("setTLSMinimumSupportedProtocolVersion:"); -final _objc_msgSend_yb8bfm = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Uint16)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_TLSMaximumSupportedProtocolVersion = - objc.registerName("TLSMaximumSupportedProtocolVersion"); -late final _sel_setTLSMaximumSupportedProtocolVersion_ = - objc.registerName("setTLSMaximumSupportedProtocolVersion:"); -late final _sel_HTTPShouldSetCookies = - objc.registerName("HTTPShouldSetCookies"); -late final _sel_setHTTPShouldSetCookies_ = - objc.registerName("setHTTPShouldSetCookies:"); -late final _sel_HTTPCookieAcceptPolicy = - objc.registerName("HTTPCookieAcceptPolicy"); -late final _sel_setHTTPCookieAcceptPolicy_ = - objc.registerName("setHTTPCookieAcceptPolicy:"); -late final _sel_HTTPAdditionalHeaders = - objc.registerName("HTTPAdditionalHeaders"); -late final _sel_setHTTPAdditionalHeaders_ = - objc.registerName("setHTTPAdditionalHeaders:"); -late final _sel_HTTPMaximumConnectionsPerHost = - objc.registerName("HTTPMaximumConnectionsPerHost"); -final _objc_msgSend_z1fx1b = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setHTTPMaximumConnectionsPerHost_ = - objc.registerName("setHTTPMaximumConnectionsPerHost:"); -final _objc_msgSend_ke7qz2 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, NSInteger)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_HTTPCookieStorage = objc.registerName("HTTPCookieStorage"); -late final _sel_setHTTPCookieStorage_ = - objc.registerName("setHTTPCookieStorage:"); - -/// NSURLCredentialStorage -class NSURLCredentialStorage extends objc.ObjCObjectBase { - NSURLCredentialStorage._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super(pointer, retain: retain, release: release); - - /// Constructs a [NSURLCredentialStorage] that points to the same underlying object as [other]. - NSURLCredentialStorage.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); +late final _sel_sessionWithConfiguration_ = + objc.registerName("sessionWithConfiguration:"); +late final _class_NSOperationQueue = objc.getClass("NSOperationQueue"); +late final _sel_operations = objc.registerName("operations"); +late final _sel_operationCount = objc.registerName("operationCount"); - /// Constructs a [NSURLCredentialStorage] that wraps the given raw object pointer. - NSURLCredentialStorage.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); +/// NSDeprecated +extension NSDeprecated1 on NSOperationQueue { + /// These two functions are inherently a race condition and should be avoided if possible + objc.NSArray get operations { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_operations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } - /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); + /// operationCount + DartNSUInteger get operationCount { + return _objc_msgSend_xw2lbc(this.ref.pointer, _sel_operationCount); } } -late final _class_NSURLCredentialStorage = - objc.getClass("NSURLCredentialStorage"); -late final _sel_URLCredentialStorage = - objc.registerName("URLCredentialStorage"); -late final _sel_setURLCredentialStorage_ = - objc.registerName("setURLCredentialStorage:"); -late final _sel_URLCache = objc.registerName("URLCache"); -late final _sel_setURLCache_ = objc.registerName("setURLCache:"); -late final _sel_shouldUseExtendedBackgroundIdleMode = - objc.registerName("shouldUseExtendedBackgroundIdleMode"); -late final _sel_setShouldUseExtendedBackgroundIdleMode_ = - objc.registerName("setShouldUseExtendedBackgroundIdleMode:"); -late final _sel_protocolClasses = objc.registerName("protocolClasses"); -late final _sel_setProtocolClasses_ = objc.registerName("setProtocolClasses:"); - -/// ! -/// @enum NSURLSessionMultipathServiceType -/// -/// @discussion The NSURLSessionMultipathServiceType enum defines constants that -/// can be used to specify the multipath service type to associate an NSURLSession. The -/// multipath service type determines whether multipath TCP should be attempted and the conditions -/// for creating and switching between subflows. Using these service types requires the appropriate entitlement. Any connection attempt will fail if the process does not have the required entitlement. -/// A primary interface is a generally less expensive interface in terms of both cost and power (such as WiFi or ethernet). A secondary interface is more expensive (such as 3G or LTE). -/// -/// @constant NSURLSessionMultipathServiceTypeNone Specifies that multipath tcp should not be used. Connections will use a single flow. -/// This is the default value. No entitlement is required to set this value. -/// -/// @constant NSURLSessionMultipathServiceTypeHandover Specifies that a secondary subflow should only be used -/// when the primary subflow is not performing adequately. Requires the com.apple.developer.networking.multipath entitlement. -/// -/// @constant NSURLSessionMultipathServiceTypeInteractive Specifies that a secondary subflow should be used if the -/// primary subflow is not performing adequately (packet loss, high round trip times, bandwidth issues). The secondary -/// subflow will be created more aggressively than with NSURLSessionMultipathServiceTypeHandover. Requires the com.apple.developer.networking.multipath entitlement. +/// WARNING: NSOperation is a stub. To generate bindings for this class, include +/// NSOperation in your config's objc-interfaces list. /// -/// @constant NSURLSessionMultipathServiceTypeAggregate Specifies that multiple subflows across multiple interfaces should be -/// used for better bandwidth. This mode is only available for experimentation on devices configured for development use. -/// It can be enabled in the Developer section of the Settings app. -enum NSURLSessionMultipathServiceType { - /// None - no multipath (default) - NSURLSessionMultipathServiceTypeNone(0), - - /// Handover - secondary flows brought up when primary flow is not performing adequately. - NSURLSessionMultipathServiceTypeHandover(1), - - /// Interactive - secondary flows created more aggressively. - NSURLSessionMultipathServiceTypeInteractive(2), - - /// Aggregate - multiple subflows used for greater bandwidth. - NSURLSessionMultipathServiceTypeAggregate(3); +/// NSOperation +class NSOperation extends objc.NSObject { + NSOperation._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - final int value; - const NSURLSessionMultipathServiceType(this.value); + /// Constructs a [NSOperation] that points to the same underlying object as [other]. + NSOperation.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - static NSURLSessionMultipathServiceType fromValue(int value) => - switch (value) { - 0 => NSURLSessionMultipathServiceTypeNone, - 1 => NSURLSessionMultipathServiceTypeHandover, - 2 => NSURLSessionMultipathServiceTypeInteractive, - 3 => NSURLSessionMultipathServiceTypeAggregate, - _ => throw ArgumentError( - "Unknown value for NSURLSessionMultipathServiceType: $value"), - }; + /// Constructs a [NSOperation] that wraps the given raw object pointer. + NSOperation.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); } -late final _sel_multipathServiceType = - objc.registerName("multipathServiceType"); -final _objc_msgSend_zqvllq = objc.msgSendPointer +late final _sel_addOperation_ = objc.registerName("addOperation:"); +late final _sel_addOperations_waitUntilFinished_ = + objc.registerName("addOperations:waitUntilFinished:"); +final _objc_msgSend_gk45w7 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_addOperationWithBlock_ = + objc.registerName("addOperationWithBlock:"); +late final _sel_addBarrierBlock_ = objc.registerName("addBarrierBlock:"); +late final _sel_maxConcurrentOperationCount = + objc.registerName("maxConcurrentOperationCount"); +late final _sel_setMaxConcurrentOperationCount_ = + objc.registerName("setMaxConcurrentOperationCount:"); +late final _sel_isSuspended = objc.registerName("isSuspended"); +late final _sel_setSuspended_ = objc.registerName("setSuspended:"); +late final _sel_name = objc.registerName("name"); +late final _sel_setName_ = objc.registerName("setName:"); +late final _sel_qualityOfService = objc.registerName("qualityOfService"); +final _objc_msgSend_oi8iq9 = objc.msgSendPointer .cast< ffi.NativeFunction< NSInteger Function(ffi.Pointer, @@ -58682,9 +58608,9 @@ final _objc_msgSend_zqvllq = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setMultipathServiceType_ = - objc.registerName("setMultipathServiceType:"); -final _objc_msgSend_1ngj1qh = objc.msgSendPointer +late final _sel_setQualityOfService_ = + objc.registerName("setQualityOfService:"); +final _objc_msgSend_n2da1l = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, @@ -58692,10 +58618,13 @@ final _objc_msgSend_1ngj1qh = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_backgroundSessionConfiguration_ = - objc.registerName("backgroundSessionConfiguration:"); -late final _sel_sessionWithConfiguration_ = - objc.registerName("sessionWithConfiguration:"); +late final _sel_underlyingQueue = objc.registerName("underlyingQueue"); +late final _sel_setUnderlyingQueue_ = objc.registerName("setUnderlyingQueue:"); +late final _sel_cancelAllOperations = objc.registerName("cancelAllOperations"); +late final _sel_waitUntilAllOperationsAreFinished = + objc.registerName("waitUntilAllOperationsAreFinished"); +late final _sel_currentQueue = objc.registerName("currentQueue"); +late final _sel_mainQueue = objc.registerName("mainQueue"); /// NSOperationQueue class NSOperationQueue extends objc.NSObject { @@ -58714,45 +58643,30 @@ class NSOperationQueue extends objc.NSObject { /// Returns whether [obj] is an instance of [NSOperationQueue]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( + return _objc_msgSend_69e0x1( obj.ref.pointer, _sel_isKindOfClass_, _class_NSOperationQueue); } - /// @property progress - /// @discussion The `progress` property represents a total progress of the operations executed in the queue. By default NSOperationQueue - /// does not report progress until the `totalUnitCount` of the progress is set. When the `totalUnitCount` property of the progress is set the - /// queue then opts into participating in progress reporting. When enabled, each operation will contribute 1 unit of completion to the - /// overall progress of the queue for operations that are finished by the end of main (operations that override start and do not invoke super - /// will not contribute to progress). Special attention to race conditions should be made when updating the `totalUnitCount` of the progress - /// as well as care should be taken to avoid 'backwards progress'. For example; when a NSOperationQueue's progress is 5/10, representing 50% - /// completed, and there are 90 more operations about to be added and the `totalUnitCount` that would then make the progress report as 5/100 - /// which represents 5%. In this example it would mean that any progress bar would jump from displaying 50% back to 5%, which might not be - /// desirable. In the cases where the `totalUnitCount` needs to be adjusted it is suggested to do this for thread-safety in a barrier by - /// using the `addBarrierBlock:` API. This ensures that no un-expected execution state occurs adjusting into a potentially backwards moving - /// progress scenario. - /// - /// @example - /// NSOperationQueue *queue = [[NSOperationQueue alloc] init]; - /// queue.progress.totalUnitCount = 10; + /// progress NSProgress get progress { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_progress); + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_progress); return NSProgress.castFromPointer(_ret, retain: true, release: true); } /// addOperation: void addOperation_(NSOperation op) { - _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addOperation_, op.ref.pointer); + _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_addOperation_, op.ref.pointer); } /// addOperations:waitUntilFinished: void addOperations_waitUntilFinished_(objc.NSArray ops, bool wait) { - _objc_msgSend_1n1qwdd(this.ref.pointer, + _objc_msgSend_gk45w7(this.ref.pointer, _sel_addOperations_waitUntilFinished_, ops.ref.pointer, wait); } /// addOperationWithBlock: void addOperationWithBlock_(objc.ObjCBlock block) { - _objc_msgSend_4daxhl( + _objc_msgSend_f167m6( this.ref.pointer, _sel_addOperationWithBlock_, block.ref.pointer); } @@ -58762,35 +58676,35 @@ class NSOperationQueue extends objc.NSObject { /// prevents any subsequent operations to be executed until the barrier has been completed. This acts similarly to the /// `dispatch_barrier_async` function. void addBarrierBlock_(objc.ObjCBlock barrier) { - _objc_msgSend_4daxhl( + _objc_msgSend_f167m6( this.ref.pointer, _sel_addBarrierBlock_, barrier.ref.pointer); } /// maxConcurrentOperationCount DartNSInteger get maxConcurrentOperationCount { - return _objc_msgSend_z1fx1b( + return _objc_msgSend_1hz7y9r( this.ref.pointer, _sel_maxConcurrentOperationCount); } /// setMaxConcurrentOperationCount: set maxConcurrentOperationCount(DartNSInteger value) { - return _objc_msgSend_ke7qz2( + return _objc_msgSend_4sp4xj( this.ref.pointer, _sel_setMaxConcurrentOperationCount_, value); } /// isSuspended bool get suspended { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isSuspended); + return _objc_msgSend_91o635(this.ref.pointer, _sel_isSuspended); } /// setSuspended: set suspended(bool value) { - return _objc_msgSend_117qins(this.ref.pointer, _sel_setSuspended_, value); + return _objc_msgSend_1s56lr9(this.ref.pointer, _sel_setSuspended_, value); } /// name objc.NSString? get name { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_name); return _ret.address == 0 ? null : objc.NSString.castFromPointer(_ret, retain: true, release: true); @@ -58798,49 +58712,51 @@ class NSOperationQueue extends objc.NSObject { /// setName: set name(objc.NSString? value) { - return _objc_msgSend_ukcdfq( + return _objc_msgSend_1jdvcbf( this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); } /// qualityOfService NSQualityOfService get qualityOfService { - final _ret = _objc_msgSend_17dnyeh(this.ref.pointer, _sel_qualityOfService); + final _ret = _objc_msgSend_oi8iq9(this.ref.pointer, _sel_qualityOfService); return NSQualityOfService.fromValue(_ret); } /// setQualityOfService: set qualityOfService(NSQualityOfService value) { - return _objc_msgSend_1fcr8u4( + return _objc_msgSend_n2da1l( this.ref.pointer, _sel_setQualityOfService_, value.value); } /// actually retain - Dartdispatch_queue_t get underlyingQueue { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_underlyingQueue); - return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + Dartdispatch_queue_t? get underlyingQueue { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_underlyingQueue); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } /// actually retain - set underlyingQueue(Dartdispatch_queue_t value) { - return _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_setUnderlyingQueue_, value.ref.pointer); + set underlyingQueue(Dartdispatch_queue_t? value) { + return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setUnderlyingQueue_, + value?.ref.pointer ?? ffi.nullptr); } /// cancelAllOperations void cancelAllOperations() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancelAllOperations); + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_cancelAllOperations); } /// waitUntilAllOperationsAreFinished void waitUntilAllOperationsAreFinished() { - _objc_msgSend_ksby9f( + _objc_msgSend_1pl9qdv( this.ref.pointer, _sel_waitUntilAllOperationsAreFinished); } /// currentQueue static NSOperationQueue? getCurrentQueue() { final _ret = - _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_currentQueue); + _objc_msgSend_1x359cv(_class_NSOperationQueue, _sel_currentQueue); return _ret.address == 0 ? null : NSOperationQueue.castFromPointer(_ret, retain: true, release: true); @@ -58848,379 +58764,57 @@ class NSOperationQueue extends objc.NSObject { /// mainQueue static NSOperationQueue getMainQueue() { - final _ret = _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_mainQueue); + final _ret = _objc_msgSend_1x359cv(_class_NSOperationQueue, _sel_mainQueue); return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - /// These two functions are inherently a race condition and should be avoided if possible - objc.NSArray get operations { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_operations); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// operationCount - DartNSUInteger get operationCount { - return _objc_msgSend_eldhrq(this.ref.pointer, _sel_operationCount); - } - /// init NSOperationQueue init() { final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } /// new static NSOperationQueue new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_new); + final _ret = _objc_msgSend_1x359cv(_class_NSOperationQueue, _sel_new); return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSOperationQueue allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( + final _ret = _objc_msgSend_hzlb60( _class_NSOperationQueue, _sel_allocWithZone_, zone); return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } /// alloc static NSOperationQueue alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSOperationQueue, _sel_alloc); + final _ret = _objc_msgSend_1x359cv(_class_NSOperationQueue, _sel_alloc); return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } -} - -late final _class_NSOperationQueue = objc.getClass("NSOperationQueue"); - -/// NSOperation -class NSOperation extends objc.NSObject { - NSOperation._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSOperation] that points to the same underlying object as [other]. - NSOperation.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSOperation] that wraps the given raw object pointer. - NSOperation.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSOperation]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSOperation); - } - - /// start - void start() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_start); - } - - /// main - void main() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_main); - } - - /// isCancelled - bool get cancelled { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isCancelled); - } - - /// cancel - void cancel() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_cancel); - } - - /// isExecuting - bool get executing { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isExecuting); - } - - /// isFinished - bool get finished { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isFinished); - } - - /// To be deprecated; use and override 'asynchronous' below - bool get concurrent { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isConcurrent); - } - - /// isAsynchronous - bool get asynchronous { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isAsynchronous); - } - - /// isReady - bool get ready { - return _objc_msgSend_olxnu1(this.ref.pointer, _sel_isReady); - } - - /// addDependency: - void addDependency_(NSOperation op) { - _objc_msgSend_ukcdfq(this.ref.pointer, _sel_addDependency_, op.ref.pointer); - } - - /// removeDependency: - void removeDependency_(NSOperation op) { - _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_removeDependency_, op.ref.pointer); - } - - /// dependencies - objc.NSArray get dependencies { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_dependencies); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } - - /// queuePriority - NSOperationQueuePriority get queuePriority { - final _ret = _objc_msgSend_10n15g8(this.ref.pointer, _sel_queuePriority); - return NSOperationQueuePriority.fromValue(_ret); - } - - /// setQueuePriority: - set queuePriority(NSOperationQueuePriority value) { - return _objc_msgSend_d8yjnr( - this.ref.pointer, _sel_setQueuePriority_, value.value); - } - - /// completionBlock - objc.ObjCBlock? get completionBlock { - final _ret = _objc_msgSend_2osec1(this.ref.pointer, _sel_completionBlock); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); - } - - /// setCompletionBlock: - set completionBlock(objc.ObjCBlock? value) { - return _objc_msgSend_4daxhl(this.ref.pointer, _sel_setCompletionBlock_, - value?.ref.pointer ?? ffi.nullptr); - } - - /// waitUntilFinished - void waitUntilFinished() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_waitUntilFinished); - } - - /// threadPriority - double get threadPriority { - return _objc_msgSend_10noklm(this.ref.pointer, _sel_threadPriority); - } - - /// setThreadPriority: - set threadPriority(double value) { - return _objc_msgSend_suh039( - this.ref.pointer, _sel_setThreadPriority_, value); - } - - /// qualityOfService - NSQualityOfService get qualityOfService { - final _ret = _objc_msgSend_17dnyeh(this.ref.pointer, _sel_qualityOfService); - return NSQualityOfService.fromValue(_ret); - } - - /// setQualityOfService: - set qualityOfService(NSQualityOfService value) { - return _objc_msgSend_1fcr8u4( - this.ref.pointer, _sel_setQualityOfService_, value.value); - } - - /// name - objc.NSString? get name { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// setName: - set name(objc.NSString? value) { - return _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); - } - - /// init - NSOperation init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSOperation.castFromPointer(_ret, retain: false, release: true); - } - /// new - static NSOperation new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSOperation, _sel_new); - return NSOperation.castFromPointer(_ret, retain: false, release: true); + /// self + NSOperationQueue self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - /// allocWithZone: - static NSOperation allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_1b3ihd0(_class_NSOperation, _sel_allocWithZone_, zone); - return NSOperation.castFromPointer(_ret, retain: false, release: true); + /// retain + NSOperationQueue retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - /// alloc - static NSOperation alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSOperation, _sel_alloc); - return NSOperation.castFromPointer(_ret, retain: false, release: true); + /// autorelease + NSOperationQueue autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSOperation = objc.getClass("NSOperation"); -late final _sel_start = objc.registerName("start"); -late final _sel_main = objc.registerName("main"); -late final _sel_isExecuting = objc.registerName("isExecuting"); -late final _sel_isConcurrent = objc.registerName("isConcurrent"); -late final _sel_isAsynchronous = objc.registerName("isAsynchronous"); -late final _sel_isReady = objc.registerName("isReady"); -late final _sel_addDependency_ = objc.registerName("addDependency:"); -late final _sel_removeDependency_ = objc.registerName("removeDependency:"); -late final _sel_dependencies = objc.registerName("dependencies"); - -enum NSOperationQueuePriority { - NSOperationQueuePriorityVeryLow(-8), - NSOperationQueuePriorityLow(-4), - NSOperationQueuePriorityNormal(0), - NSOperationQueuePriorityHigh(4), - NSOperationQueuePriorityVeryHigh(8); - - final int value; - const NSOperationQueuePriority(this.value); - - static NSOperationQueuePriority fromValue(int value) => switch (value) { - -8 => NSOperationQueuePriorityVeryLow, - -4 => NSOperationQueuePriorityLow, - 0 => NSOperationQueuePriorityNormal, - 4 => NSOperationQueuePriorityHigh, - 8 => NSOperationQueuePriorityVeryHigh, - _ => throw ArgumentError( - "Unknown value for NSOperationQueuePriority: $value"), - }; -} - -late final _sel_queuePriority = objc.registerName("queuePriority"); -final _objc_msgSend_10n15g8 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setQueuePriority_ = objc.registerName("setQueuePriority:"); -final _objc_msgSend_d8yjnr = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, NSInteger)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_completionBlock = objc.registerName("completionBlock"); -late final _sel_setCompletionBlock_ = objc.registerName("setCompletionBlock:"); -late final _sel_waitUntilFinished = objc.registerName("waitUntilFinished"); -late final _sel_threadPriority = objc.registerName("threadPriority"); -late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); - -enum NSQualityOfService { - NSQualityOfServiceUserInteractive(33), - NSQualityOfServiceUserInitiated(25), - NSQualityOfServiceUtility(17), - NSQualityOfServiceBackground(9), - NSQualityOfServiceDefault(-1); - - final int value; - const NSQualityOfService(this.value); - - static NSQualityOfService fromValue(int value) => switch (value) { - 33 => NSQualityOfServiceUserInteractive, - 25 => NSQualityOfServiceUserInitiated, - 17 => NSQualityOfServiceUtility, - 9 => NSQualityOfServiceBackground, - -1 => NSQualityOfServiceDefault, - _ => - throw ArgumentError("Unknown value for NSQualityOfService: $value"), - }; -} - -late final _sel_qualityOfService = objc.registerName("qualityOfService"); -final _objc_msgSend_17dnyeh = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setQualityOfService_ = - objc.registerName("setQualityOfService:"); -final _objc_msgSend_1fcr8u4 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, NSInteger)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_name = objc.registerName("name"); -late final _sel_setName_ = objc.registerName("setName:"); -late final _sel_addOperation_ = objc.registerName("addOperation:"); -late final _sel_addOperations_waitUntilFinished_ = - objc.registerName("addOperations:waitUntilFinished:"); -final _objc_msgSend_1n1qwdd = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_addOperationWithBlock_ = - objc.registerName("addOperationWithBlock:"); -late final _sel_addBarrierBlock_ = objc.registerName("addBarrierBlock:"); -late final _sel_maxConcurrentOperationCount = - objc.registerName("maxConcurrentOperationCount"); -late final _sel_setMaxConcurrentOperationCount_ = - objc.registerName("setMaxConcurrentOperationCount:"); -late final _sel_isSuspended = objc.registerName("isSuspended"); -late final _sel_setSuspended_ = objc.registerName("setSuspended:"); -late final _sel_underlyingQueue = objc.registerName("underlyingQueue"); -late final _sel_setUnderlyingQueue_ = objc.registerName("setUnderlyingQueue:"); -late final _sel_cancelAllOperations = objc.registerName("cancelAllOperations"); -late final _sel_waitUntilAllOperationsAreFinished = - objc.registerName("waitUntilAllOperationsAreFinished"); -late final _sel_currentQueue = objc.registerName("currentQueue"); -late final _sel_mainQueue = objc.registerName("mainQueue"); -late final _sel_operations = objc.registerName("operations"); -late final _sel_operationCount = objc.registerName("operationCount"); late final _sel_sessionWithConfiguration_delegate_delegateQueue_ = objc.registerName("sessionWithConfiguration:delegate:delegateQueue:"); -final _objc_msgSend_aud7dn = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); late final _sel_delegateQueue = objc.registerName("delegateQueue"); late final _sel_configuration = objc.registerName("configuration"); late final _sel_sessionDescription = objc.registerName("sessionDescription"); @@ -59386,7 +58980,7 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObj objc.ObjCObjectBase(arg0, retain: false, release: true), objc.ObjCObjectBase(arg1, retain: false, release: true), objc.ObjCObjectBase(arg2, retain: false, release: true))); - final wrapper = _wrapListenerBlock_tenbla(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1hcfngn(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function( @@ -59423,7 +59017,7 @@ extension ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_objcObjCObject_CallExt late final _sel_getTasksWithCompletionHandler_ = objc.registerName("getTasksWithCompletionHandler:"); -void _ObjCBlock_ffiVoid_objcObjCObject_fnPtrTrampoline( +void _ObjCBlock_ffiVoid_objcObjCObject1_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0) => block.ref.target @@ -59431,24 +59025,24 @@ void _ObjCBlock_ffiVoid_objcObjCObject_fnPtrTrampoline( ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>>() .asFunction)>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_fnPtrCallable = +ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject1_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_fnPtrTrampoline) + _ObjCBlock_ffiVoid_objcObjCObject1_fnPtrTrampoline) .cast(); -void _ObjCBlock_ffiVoid_objcObjCObject_closureTrampoline( +void _ObjCBlock_ffiVoid_objcObjCObject1_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0) => (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_closureCallable = +ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject1_closureCallable = ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_closureTrampoline) + _ObjCBlock_ffiVoid_objcObjCObject1_closureTrampoline) .cast(); -void _ObjCBlock_ffiVoid_objcObjCObject_listenerTrampoline( +void _ObjCBlock_ffiVoid_objcObjCObject1_listenerTrampoline( ffi.Pointer block, ffi.Pointer arg0) { (objc.getBlockClosure(block) as void Function( ffi.Pointer))(arg0); @@ -59458,14 +59052,14 @@ void _ObjCBlock_ffiVoid_objcObjCObject_listenerTrampoline( ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer)> - _ObjCBlock_ffiVoid_objcObjCObject_listenerCallable = ffi.NativeCallable< + _ObjCBlock_ffiVoid_objcObjCObject1_listenerCallable = ffi.NativeCallable< ffi.Void Function(ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_listenerTrampoline) + _ObjCBlock_ffiVoid_objcObjCObject1_listenerTrampoline) ..keepIsolateAlive = false; /// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_objcObjCObject { +abstract final class ObjCBlock_ffiVoid_objcObjCObject1 { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, @@ -59487,7 +59081,7 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject { ptr) => objc.ObjCBlock)>( objc.newPointerBlock( - _ObjCBlock_ffiVoid_objcObjCObject_fnPtrCallable, ptr.cast()), + _ObjCBlock_ffiVoid_objcObjCObject1_fnPtrCallable, ptr.cast()), retain: false, release: true); @@ -59500,7 +59094,7 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject { fromFunction(void Function(objc.ObjCObjectBase) fn) => objc.ObjCBlock)>( objc.newClosureBlock( - _ObjCBlock_ffiVoid_objcObjCObject_closureCallable, + _ObjCBlock_ffiVoid_objcObjCObject1_closureCallable, (ffi.Pointer arg0) => fn( objc.ObjCObjectBase(arg0, retain: true, release: true))), retain: false, @@ -59518,11 +59112,11 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject { static objc.ObjCBlock)> listener(void Function(objc.ObjCObjectBase) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_objcObjCObject_listenerCallable.nativeFunction + _ObjCBlock_ffiVoid_objcObjCObject1_listenerCallable.nativeFunction .cast(), (ffi.Pointer arg0) => fn(objc.ObjCObjectBase(arg0, retain: false, release: true))); - final wrapper = _wrapListenerBlock_ukcdfq(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1jdvcbf(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock)>( wrapper, @@ -59532,7 +59126,7 @@ abstract final class ObjCBlock_ffiVoid_objcObjCObject { } /// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_objcObjCObject_CallExtension +extension ObjCBlock_ffiVoid_objcObjCObject1_CallExtension on objc.ObjCBlock)> { void call(objc.ObjCObjectBase arg0) => ref.pointer.ref.invoke .cast< @@ -59549,285 +59143,24 @@ late final _sel_getAllTasksWithCompletionHandler_ = late final _sel_dataTaskWithRequest_ = objc.registerName("dataTaskWithRequest:"); late final _sel_dataTaskWithURL_ = objc.registerName("dataTaskWithURL:"); +late final _sel_uploadTaskWithRequest_fromFile_ = + objc.registerName("uploadTaskWithRequest:fromFile:"); +late final _sel_uploadTaskWithRequest_fromData_ = + objc.registerName("uploadTaskWithRequest:fromData:"); +late final _sel_uploadTaskWithResumeData_ = + objc.registerName("uploadTaskWithResumeData:"); +late final _sel_uploadTaskWithStreamedRequest_ = + objc.registerName("uploadTaskWithStreamedRequest:"); +late final _sel_downloadTaskWithRequest_ = + objc.registerName("downloadTaskWithRequest:"); +late final _sel_downloadTaskWithURL_ = + objc.registerName("downloadTaskWithURL:"); +late final _sel_downloadTaskWithResumeData_ = + objc.registerName("downloadTaskWithResumeData:"); -/// An NSURLSessionUploadTask does not currently provide any additional -/// functionality over an NSURLSessionDataTask. All delegate messages -/// that may be sent referencing an NSURLSessionDataTask equally apply -/// to NSURLSessionUploadTasks. -class NSURLSessionUploadTask extends NSURLSessionDataTask { - NSURLSessionUploadTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSURLSessionUploadTask] that points to the same underlying object as [other]. - NSURLSessionUploadTask.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSURLSessionUploadTask] that wraps the given raw object pointer. - NSURLSessionUploadTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionUploadTask); - } - - /// init - NSURLSessionUploadTask init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: false, release: true); - } - - /// new - static NSURLSessionUploadTask new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionUploadTask, _sel_new); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: false, release: true); - } - - /// Cancels an upload and calls the completion handler with resume data for later use. - /// resumeData will be nil if the server does not support the latest resumable uploads - /// Internet-Draft from the HTTP Working Group, found at - /// https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/ - /// - /// - Parameter completionHandler: The completion handler to call when the upload has been successfully canceled. - void cancelByProducingResumeData_( - objc.ObjCBlock completionHandler) { - _objc_msgSend_4daxhl(this.ref.pointer, _sel_cancelByProducingResumeData_, - completionHandler.ref.pointer); - } - - /// allocWithZone: - static NSURLSessionUploadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( - _class_NSURLSessionUploadTask, _sel_allocWithZone_, zone); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: false, release: true); - } - - /// alloc - static NSURLSessionUploadTask alloc() { - final _ret = - _objc_msgSend_1unuoxw(_class_NSURLSessionUploadTask, _sel_alloc); - return NSURLSessionUploadTask.castFromPointer(_ret, - retain: false, release: true); - } -} - -late final _class_NSURLSessionUploadTask = - objc.getClass("NSURLSessionUploadTask"); -void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>>() - .asFunction)>()(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSData_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_NSData_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_ffiVoid_NSData_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_NSData_listenerTrampoline( - ffi.Pointer block, ffi.Pointer arg0) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer))(arg0); - objc.objectRelease(block.cast()); -} - -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)> - _ObjCBlock_ffiVoid_NSData_listenerCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_listenerTrampoline) - ..keepIsolateAlive = false; - -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSData { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) => - objc.ObjCBlock(pointer, - retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_NSData_fnPtrCallable, ptr.cast()), - retain: false, - release: true); - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunction( - void Function(objc.NSData?) fn) => - objc.ObjCBlock( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSData_closureCallable, - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : objc.NSData.castFromPointer(arg0, - retain: true, release: true))), - retain: false, - release: true); - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener( - void Function(objc.NSData?) fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSData_listenerCallable.nativeFunction.cast(), - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : objc.NSData.castFromPointer(arg0, retain: false, release: true))); - final wrapper = _wrapListenerBlock_ukcdfq(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, - retain: false, release: true); - } -} - -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSData_CallExtension - on objc.ObjCBlock { - void call(objc.NSData? arg0) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); -} - -late final _sel_cancelByProducingResumeData_ = - objc.registerName("cancelByProducingResumeData:"); -late final _sel_uploadTaskWithRequest_fromFile_ = - objc.registerName("uploadTaskWithRequest:fromFile:"); -late final _sel_uploadTaskWithRequest_fromData_ = - objc.registerName("uploadTaskWithRequest:fromData:"); -late final _sel_uploadTaskWithResumeData_ = - objc.registerName("uploadTaskWithResumeData:"); -late final _sel_uploadTaskWithStreamedRequest_ = - objc.registerName("uploadTaskWithStreamedRequest:"); - -/// NSURLSessionDownloadTask is a task that represents a download to -/// local storage. -class NSURLSessionDownloadTask extends NSURLSessionTask { - NSURLSessionDownloadTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. - NSURLSessionDownloadTask.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSURLSessionDownloadTask] that wraps the given raw object pointer. - NSURLSessionDownloadTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); - } - - /// Cancel the download (and calls the superclass -cancel). If - /// conditions will allow for resuming the download in the future, the - /// callback will be called with an opaque data blob, which may be used - /// with -downloadTaskWithResumeData: to attempt to resume the download. - /// If resume data cannot be created, the completion handler will be - /// called with nil resumeData. - void cancelByProducingResumeData_( - objc.ObjCBlock completionHandler) { - _objc_msgSend_4daxhl(this.ref.pointer, _sel_cancelByProducingResumeData_, - completionHandler.ref.pointer); - } - - /// init - NSURLSessionDownloadTask init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: false, release: true); - } - - /// new - static NSURLSessionDownloadTask new1() { - final _ret = - _objc_msgSend_1unuoxw(_class_NSURLSessionDownloadTask, _sel_new); - return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: false, release: true); - } - - /// allocWithZone: - static NSURLSessionDownloadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( - _class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); - return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: false, release: true); - } - - /// alloc - static NSURLSessionDownloadTask alloc() { - final _ret = - _objc_msgSend_1unuoxw(_class_NSURLSessionDownloadTask, _sel_alloc); - return NSURLSessionDownloadTask.castFromPointer(_ret, - retain: false, release: true); - } -} - -late final _class_NSURLSessionDownloadTask = - objc.getClass("NSURLSessionDownloadTask"); -late final _sel_downloadTaskWithRequest_ = - objc.registerName("downloadTaskWithRequest:"); -late final _sel_downloadTaskWithURL_ = - objc.registerName("downloadTaskWithURL:"); -late final _sel_downloadTaskWithResumeData_ = - objc.registerName("downloadTaskWithResumeData:"); - +/// WARNING: NSURLSessionStreamTask is a stub. To generate bindings for this class, include +/// NSURLSessionStreamTask in your config's objc-interfaces list. +/// /// An NSURLSessionStreamTask provides an interface to perform reads /// and writes to a TCP/IP stream created via NSURLSession. This task /// may be explicitly created from an NSURLSession, or created as a @@ -59861,305 +59194,199 @@ class NSURLSessionStreamTask extends NSURLSessionTask { NSURLSessionStreamTask.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); +} - /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionStreamTask); - } - - /// Read minBytes, or at most maxBytes bytes and invoke the completion - /// handler on the sessions delegate queue with the data or an error. - /// If an error occurs, any outstanding reads will also fail, and new - /// read requests will error out immediately. - void readDataOfMinLength_maxLength_timeout_completionHandler_( - DartNSUInteger minBytes, - DartNSUInteger maxBytes, - DartNSTimeInterval timeout, - objc.ObjCBlock - completionHandler) { - _objc_msgSend_15i4521( - this.ref.pointer, - _sel_readDataOfMinLength_maxLength_timeout_completionHandler_, - minBytes, - maxBytes, - timeout, - completionHandler.ref.pointer); - } +late final _sel_streamTaskWithHostName_port_ = + objc.registerName("streamTaskWithHostName:port:"); +final _objc_msgSend_1i26p99 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - /// Write the data completely to the underlying socket. If all the - /// bytes have not been written by the timeout, a timeout error will - /// occur. Note that invocation of the completion handler does not - /// guarantee that the remote side has received all the bytes, only - /// that they have been written to the kernel. - void writeData_timeout_completionHandler_( - objc.NSData data, - DartNSTimeInterval timeout, - objc.ObjCBlock completionHandler) { - _objc_msgSend_5qmwfe( - this.ref.pointer, - _sel_writeData_timeout_completionHandler_, - data.ref.pointer, - timeout, - completionHandler.ref.pointer); +/// WARNING: NSNetService is a stub. To generate bindings for this class, include +/// NSNetService in your config's objc-interfaces list. +/// +/// NSNetService +class NSNetService extends objc.ObjCObjectBase { + NSNetService._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSNetService] that points to the same underlying object as [other]. + NSNetService.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSNetService] that wraps the given raw object pointer. + NSNetService.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); +} + +late final _sel_streamTaskWithNetService_ = + objc.registerName("streamTaskWithNetService:"); +late final _class_NSURLSessionWebSocketTask = + objc.getClass("NSURLSessionWebSocketTask"); +late final _class_NSURLSessionWebSocketMessage = + objc.getClass("NSURLSessionWebSocketMessage"); +late final _sel_initWithData_ = objc.registerName("initWithData:"); +late final _sel_initWithString_ = objc.registerName("initWithString:"); + +enum NSURLSessionWebSocketMessageType { + NSURLSessionWebSocketMessageTypeData(0), + NSURLSessionWebSocketMessageTypeString(1); + + final int value; + const NSURLSessionWebSocketMessageType(this.value); + + static NSURLSessionWebSocketMessageType fromValue(int value) => + switch (value) { + 0 => NSURLSessionWebSocketMessageTypeData, + 1 => NSURLSessionWebSocketMessageTypeString, + _ => throw ArgumentError( + "Unknown value for NSURLSessionWebSocketMessageType: $value"), + }; +} + +late final _sel_type = objc.registerName("type"); +final _objc_msgSend_1qouven = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_data = objc.registerName("data"); +late final _sel_string = objc.registerName("string"); + +/// The client can create a WebSocket message object that will be passed to the send calls +/// and will be delivered from the receive calls. The message can be initialized with data or string. +/// If initialized with data, the string property will be nil and vice versa. +class NSURLSessionWebSocketMessage extends objc.NSObject { + NSURLSessionWebSocketMessage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. + NSURLSessionWebSocketMessage.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. + NSURLSessionWebSocketMessage.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_69e0x1(obj.ref.pointer, _sel_isKindOfClass_, + _class_NSURLSessionWebSocketMessage); } - /// -captureStreams completes any already enqueued reads - /// and writes, and then invokes the - /// URLSession:streamTask:didBecomeInputStream:outputStream: delegate - /// message. When that message is received, the task object is - /// considered completed and will not receive any more delegate - /// messages. - void captureStreams() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_captureStreams); + /// Create a message with data type + NSURLSessionWebSocketMessage initWithData_(objc.NSData data) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithData_, data.ref.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } - /// Enqueue a request to close the write end of the underlying socket. - /// All outstanding IO will complete before the write side of the - /// socket is closed. The server, however, may continue to write bytes - /// back to the client, so best practice is to continue reading from - /// the server until you receive EOF. - void closeWrite() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_closeWrite); + /// Create a message with string type + NSURLSessionWebSocketMessage initWithString_(objc.NSString string) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithString_, string.ref.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } - /// Enqueue a request to close the read side of the underlying socket. - /// All outstanding IO will complete before the read side is closed. - /// You may continue writing to the server. - void closeRead() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_closeRead); + /// type + NSURLSessionWebSocketMessageType get type { + final _ret = _objc_msgSend_1qouven(this.ref.pointer, _sel_type); + return NSURLSessionWebSocketMessageType.fromValue(_ret); } - /// Begin encrypted handshake. The handshake begins after all pending - /// IO has completed. TLS authentication callbacks are sent to the - /// session's -URLSession:task:didReceiveChallenge:completionHandler: - void startSecureConnection() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_startSecureConnection); + /// data + objc.NSData? get data { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_data); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - /// Cleanly close a secure connection after all pending secure IO has - /// completed. - /// - /// @warning This API is non-functional. - void stopSecureConnection() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_stopSecureConnection); + /// string + objc.NSString? get string { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_string); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } /// init - NSURLSessionStreamTask init() { + NSURLSessionWebSocketMessage init() { final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionStreamTask.castFromPointer(_ret, + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); } /// new - static NSURLSessionStreamTask new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSURLSessionStreamTask, _sel_new); - return NSURLSessionStreamTask.castFromPointer(_ret, + static NSURLSessionWebSocketMessage new1() { + final _ret = + _objc_msgSend_1x359cv(_class_NSURLSessionWebSocketMessage, _sel_new); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: - static NSURLSessionStreamTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( - _class_NSURLSessionStreamTask, _sel_allocWithZone_, zone); - return NSURLSessionStreamTask.castFromPointer(_ret, + static NSURLSessionWebSocketMessage allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_hzlb60( + _class_NSURLSessionWebSocketMessage, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); } /// alloc - static NSURLSessionStreamTask alloc() { + static NSURLSessionWebSocketMessage alloc() { final _ret = - _objc_msgSend_1unuoxw(_class_NSURLSessionStreamTask, _sel_alloc); - return NSURLSessionStreamTask.castFromPointer(_ret, + _objc_msgSend_1x359cv(_class_NSURLSessionWebSocketMessage, _sel_alloc); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, retain: false, release: true); } -} - -late final _class_NSURLSessionStreamTask = - objc.getClass("NSURLSessionStreamTask"); -void _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Bool arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer, - bool, ffi.Pointer))(arg0, arg1, arg2); -ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) { - (objc.getBlockClosure(block) as void Function(ffi.Pointer, - bool, ffi.Pointer))(arg0, arg1, arg2); - objc.objectRelease(block.cast()); -} - -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)> - _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerCallable = ffi - .NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerTrampoline) - ..keepIsolateAlive = false; - -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSData_bool_NSError { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function(objc.NSData, ffi.Bool, - objc.NSError?)>(pointer, retain: retain, release: release); - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Bool arg1, ffi.Pointer arg2)>> - ptr) => - objc.ObjCBlock( - objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrCallable, ptr.cast()), - retain: false, - release: true); - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock - fromFunction(void Function(objc.NSData, bool, objc.NSError?) fn) => - objc.ObjCBlock( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureCallable, - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn( - objc.NSData.castFromPointer(arg0, retain: true, release: true), - arg1, - arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), - retain: false, - release: true); + /// self + NSURLSessionWebSocketMessage self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock - listener(void Function(objc.NSData, bool, objc.NSError?) fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSData_bool_NSError_listenerCallable.nativeFunction - .cast(), - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn( - objc.NSData.castFromPointer(arg0, retain: false, release: true), - arg1, - arg2.address == 0 - ? null - : objc.NSError.castFromPointer(arg2, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_hfhq9m(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function(objc.NSData, ffi.Bool, objc.NSError?)>(wrapper, - retain: false, release: true); + /// retain + NSURLSessionWebSocketMessage retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } -} -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSData_bool_NSError_CallExtension - on objc.ObjCBlock { - void call(objc.NSData arg0, bool arg1, objc.NSError? arg2) => ref - .pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Bool arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>()( - ref.pointer, arg0.ref.pointer, arg1, arg2?.ref.pointer ?? ffi.nullptr); + /// autorelease + NSURLSessionWebSocketMessage autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); + } } -late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_ = objc - .registerName("readDataOfMinLength:maxLength:timeout:completionHandler:"); -final _objc_msgSend_15i4521 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - NSUInteger, - NSUInteger, - NSTimeInterval, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - double, - ffi.Pointer)>(); void _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0) => @@ -60261,7 +59488,7 @@ abstract final class ObjCBlock_ffiVoid_NSError { ? null : objc.NSError.castFromPointer(arg0, retain: false, release: true))); - final wrapper = _wrapListenerBlock_ukcdfq(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1jdvcbf(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock(wrapper, retain: false, release: true); @@ -60282,331 +59509,6 @@ extension ObjCBlock_ffiVoid_NSError_CallExtension ref.pointer, arg0?.ref.pointer ?? ffi.nullptr); } -late final _sel_writeData_timeout_completionHandler_ = - objc.registerName("writeData:timeout:completionHandler:"); -final _objc_msgSend_5qmwfe = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSTimeInterval, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer)>(); -late final _sel_captureStreams = objc.registerName("captureStreams"); -late final _sel_closeWrite = objc.registerName("closeWrite"); -late final _sel_closeRead = objc.registerName("closeRead"); -late final _sel_startSecureConnection = - objc.registerName("startSecureConnection"); -late final _sel_stopSecureConnection = - objc.registerName("stopSecureConnection"); -late final _sel_streamTaskWithHostName_port_ = - objc.registerName("streamTaskWithHostName:port:"); -final _objc_msgSend_spwp90 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - -/// NSNetService -class NSNetService extends objc.ObjCObjectBase { - NSNetService._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super(pointer, retain: retain, release: release); - - /// Constructs a [NSNetService] that points to the same underlying object as [other]. - NSNetService.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSNetService] that wraps the given raw object pointer. - NSNetService.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSNetService]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSNetService); - } -} - -late final _class_NSNetService = objc.getClass("NSNetService"); -late final _sel_streamTaskWithNetService_ = - objc.registerName("streamTaskWithNetService:"); - -/// A WebSocket task can be created with a ws or wss url. A client can also provide -/// a list of protocols it wishes to advertise during the WebSocket handshake phase. -/// Once the handshake is successfully completed the client will be notified through an optional delegate. -/// All reads and writes enqueued before the completion of the handshake will be queued up and -/// executed once the handshake succeeds. Before the handshake completes, the client can be called to handle -/// redirection or authentication using the same delegates as NSURLSessionTask. WebSocket task will also provide -/// support for cookies and will store cookies to the cookie storage on the session and will attach cookies to -/// outgoing HTTP handshake requests. -class NSURLSessionWebSocketTask extends NSURLSessionTask { - NSURLSessionWebSocketTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. - NSURLSessionWebSocketTask.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. - NSURLSessionWebSocketTask.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); - } - - /// Sends a WebSocket message. If an error occurs, any outstanding work will also fail. - /// Note that invocation of the completion handler does not - /// guarantee that the remote side has received all the bytes, only - /// that they have been written to the kernel. - void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, - objc.ObjCBlock completionHandler) { - _objc_msgSend_cmbt6k(this.ref.pointer, _sel_sendMessage_completionHandler_, - message.ref.pointer, completionHandler.ref.pointer); - } - - /// Reads a WebSocket message once all the frames of the message are available. - /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out - /// and all outstanding work will also fail resulting in the end of the task. - void receiveMessageWithCompletionHandler_( - objc.ObjCBlock< - ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> - completionHandler) { - _objc_msgSend_4daxhl( - this.ref.pointer, - _sel_receiveMessageWithCompletionHandler_, - completionHandler.ref.pointer); - } - - /// Sends a ping frame from the client side. The pongReceiveHandler is invoked when the client - /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving - /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. - /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. - void sendPingWithPongReceiveHandler_( - objc.ObjCBlock pongReceiveHandler) { - _objc_msgSend_4daxhl(this.ref.pointer, _sel_sendPingWithPongReceiveHandler_, - pongReceiveHandler.ref.pointer); - } - - /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. - /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. - void cancelWithCloseCode_reason_( - DartNSInteger closeCode, objc.NSData? reason) { - _objc_msgSend_18im7ej(this.ref.pointer, _sel_cancelWithCloseCode_reason_, - closeCode, reason?.ref.pointer ?? ffi.nullptr); - } - - /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached - DartNSInteger get maximumMessageSize { - return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_maximumMessageSize); - } - - /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached - set maximumMessageSize(DartNSInteger value) { - return _objc_msgSend_ke7qz2( - this.ref.pointer, _sel_setMaximumMessageSize_, value); - } - - /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid - DartNSInteger get closeCode { - return _objc_msgSend_a13zbl(this.ref.pointer, _sel_closeCode); - } - - /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running - objc.NSData? get closeReason { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_closeReason); - return _ret.address == 0 - ? null - : objc.NSData.castFromPointer(_ret, retain: true, release: true); - } - - /// init - NSURLSessionWebSocketTask init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: false, release: true); - } - - /// new - static NSURLSessionWebSocketTask new1() { - final _ret = - _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketTask, _sel_new); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: false, release: true); - } - - /// allocWithZone: - static NSURLSessionWebSocketTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( - _class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: false, release: true); - } - - /// alloc - static NSURLSessionWebSocketTask alloc() { - final _ret = - _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketTask, _sel_alloc); - return NSURLSessionWebSocketTask.castFromPointer(_ret, - retain: false, release: true); - } -} - -late final _class_NSURLSessionWebSocketTask = - objc.getClass("NSURLSessionWebSocketTask"); - -/// The client can create a WebSocket message object that will be passed to the send calls -/// and will be delivered from the receive calls. The message can be initialized with data or string. -/// If initialized with data, the string property will be nil and vice versa. -class NSURLSessionWebSocketMessage extends objc.NSObject { - NSURLSessionWebSocketMessage._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); - - /// Constructs a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. - NSURLSessionWebSocketMessage.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. - NSURLSessionWebSocketMessage.castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, - _class_NSURLSessionWebSocketMessage); - } - - /// Create a message with data type - NSURLSessionWebSocketMessage initWithData_(objc.NSData data) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), - _sel_initWithData_, data.ref.pointer); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, - retain: false, release: true); - } - - /// Create a message with string type - NSURLSessionWebSocketMessage initWithString_(objc.NSString string) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), - _sel_initWithString_, string.ref.pointer); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, - retain: false, release: true); - } - - /// type - NSURLSessionWebSocketMessageType get type { - final _ret = _objc_msgSend_1kew1r(this.ref.pointer, _sel_type); - return NSURLSessionWebSocketMessageType.fromValue(_ret); - } - - /// data - objc.NSData? get data { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_data); - return _ret.address == 0 - ? null - : objc.NSData.castFromPointer(_ret, retain: true, release: true); - } - - /// string - objc.NSString? get string { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_string); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } - - /// init - NSURLSessionWebSocketMessage init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, - retain: false, release: true); - } - - /// new - static NSURLSessionWebSocketMessage new1() { - final _ret = - _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_new); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, - retain: false, release: true); - } - - /// allocWithZone: - static NSURLSessionWebSocketMessage allocWithZone_( - ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( - _class_NSURLSessionWebSocketMessage, _sel_allocWithZone_, zone); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, - retain: false, release: true); - } - - /// alloc - static NSURLSessionWebSocketMessage alloc() { - final _ret = - _objc_msgSend_1unuoxw(_class_NSURLSessionWebSocketMessage, _sel_alloc); - return NSURLSessionWebSocketMessage.castFromPointer(_ret, - retain: false, release: true); - } -} - -late final _class_NSURLSessionWebSocketMessage = - objc.getClass("NSURLSessionWebSocketMessage"); -late final _sel_initWithData_ = objc.registerName("initWithData:"); -late final _sel_initWithString_ = objc.registerName("initWithString:"); - -enum NSURLSessionWebSocketMessageType { - NSURLSessionWebSocketMessageTypeData(0), - NSURLSessionWebSocketMessageTypeString(1); - - final int value; - const NSURLSessionWebSocketMessageType(this.value); - - static NSURLSessionWebSocketMessageType fromValue(int value) => - switch (value) { - 0 => NSURLSessionWebSocketMessageTypeData, - 1 => NSURLSessionWebSocketMessageTypeString, - _ => throw ArgumentError( - "Unknown value for NSURLSessionWebSocketMessageType: $value"), - }; -} - -late final _sel_type = objc.registerName("type"); -final _objc_msgSend_1kew1r = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_string = objc.registerName("string"); late final _sel_sendMessage_completionHandler_ = objc.registerName("sendMessage:completionHandler:"); void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_fnPtrTrampoline( @@ -60738,7 +59640,7 @@ abstract final class ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError { ? null : objc.NSError.castFromPointer(arg1, retain: false, release: true))); - final wrapper = _wrapListenerBlock_1tjlcwl(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_wjvic9(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function(NSURLSessionWebSocketMessage?, @@ -60790,7 +59692,7 @@ sealed class NSURLSessionWebSocketCloseCode { late final _sel_cancelWithCloseCode_reason_ = objc.registerName("cancelWithCloseCode:reason:"); -final _objc_msgSend_18im7ej = objc.msgSendPointer +final _objc_msgSend_xb0psz = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -60808,7 +59710,7 @@ late final _sel_maximumMessageSize = objc.registerName("maximumMessageSize"); late final _sel_setMaximumMessageSize_ = objc.registerName("setMaximumMessageSize:"); late final _sel_closeCode = objc.registerName("closeCode"); -final _objc_msgSend_a13zbl = objc.msgSendPointer +final _objc_msgSend_1rhk8uh = objc.msgSendPointer .cast< ffi.NativeFunction< NSInteger Function(ffi.Pointer, @@ -60817,739 +59719,702 @@ final _objc_msgSend_a13zbl = objc.msgSendPointer int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_closeReason = objc.registerName("closeReason"); -late final _sel_webSocketTaskWithURL_ = - objc.registerName("webSocketTaskWithURL:"); -late final _sel_webSocketTaskWithURL_protocols_ = - objc.registerName("webSocketTaskWithURL:protocols:"); -late final _sel_webSocketTaskWithRequest_ = - objc.registerName("webSocketTaskWithRequest:"); -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); - objc.objectRelease(block.cast()); -} -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerCallable = ffi - .NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerTrampoline) - ..keepIsolateAlive = false; +/// A WebSocket task can be created with a ws or wss url. A client can also provide +/// a list of protocols it wishes to advertise during the WebSocket handshake phase. +/// Once the handshake is successfully completed the client will be notified through an optional delegate. +/// All reads and writes enqueued before the completion of the handshake will be queued up and +/// executed once the handshake succeeds. Before the handshake completes, the client can be called to handle +/// redirection or authentication using the same delegates as NSURLSessionTask. WebSocket task will also provide +/// support for cookies and will store cookies to the cookie storage on the session and will attach cookies to +/// outgoing HTTP handshake requests. +class NSURLSessionWebSocketTask extends NSURLSessionTask { + NSURLSessionWebSocketTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError { - /// Returns a block that wraps the given raw block pointer. - static objc - .ObjCBlock - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function(objc.NSData?, NSURLResponse?, - objc.NSError?)>(pointer, retain: retain, release: release); + /// Constructs a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. + NSURLSessionWebSocketTask.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) => - objc.ObjCBlock( - objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + /// Constructs a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. + NSURLSessionWebSocketTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunction( - void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) => - objc.ObjCBlock( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 ? null : objc.NSData.castFromPointer(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), - arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), - retain: false, - release: true); + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_69e0x1( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc - .ObjCBlock - listener(void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : objc.NSData.castFromPointer(arg0, - retain: false, release: true), - arg1.address == 0 - ? null - : NSURLResponse.castFromPointer(arg1, - retain: false, release: true), - arg2.address == 0 - ? null - : objc.NSError.castFromPointer(arg2, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_tenbla(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function(objc.NSData?, NSURLResponse?, - objc.NSError?)>(wrapper, retain: false, release: true); + /// Sends a WebSocket message. If an error occurs, any outstanding work will also fail. + /// Note that invocation of the completion handler does not + /// guarantee that the remote side has received all the bytes, only + /// that they have been written to the kernel. + void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, + objc.ObjCBlock completionHandler) { + _objc_msgSend_14pxqbs(this.ref.pointer, _sel_sendMessage_completionHandler_, + message.ref.pointer, completionHandler.ref.pointer); } -} -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_CallExtension on objc - .ObjCBlock { - void call(objc.NSData? arg0, NSURLResponse? arg1, objc.NSError? arg2) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, - arg0?.ref.pointer ?? ffi.nullptr, - arg1?.ref.pointer ?? ffi.nullptr, - arg2?.ref.pointer ?? ffi.nullptr); -} + /// Reads a WebSocket message once all the frames of the message are available. + /// If the maximumMessage size is hit while buffering the frames, the receiveMessage call will error out + /// and all outstanding work will also fail resulting in the end of the task. + void receiveMessageWithCompletionHandler_( + objc.ObjCBlock< + ffi.Void Function(NSURLSessionWebSocketMessage?, objc.NSError?)> + completionHandler) { + _objc_msgSend_f167m6( + this.ref.pointer, + _sel_receiveMessageWithCompletionHandler_, + completionHandler.ref.pointer); + } -late final _sel_dataTaskWithRequest_completionHandler_ = - objc.registerName("dataTaskWithRequest:completionHandler:"); -late final _sel_dataTaskWithURL_completionHandler_ = - objc.registerName("dataTaskWithURL:completionHandler:"); -late final _sel_uploadTaskWithRequest_fromFile_completionHandler_ = - objc.registerName("uploadTaskWithRequest:fromFile:completionHandler:"); -final _objc_msgSend_37obke = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_uploadTaskWithRequest_fromData_completionHandler_ = - objc.registerName("uploadTaskWithRequest:fromData:completionHandler:"); -late final _sel_uploadTaskWithResumeData_completionHandler_ = - objc.registerName("uploadTaskWithResumeData:completionHandler:"); -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); - objc.objectRelease(block.cast()); -} - -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerCallable = ffi - .NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerTrampoline) - ..keepIsolateAlive = false; + /// Sends a ping frame from the client side. The pongReceiveHandler is invoked when the client + /// receives a pong from the server endpoint. If a connection is lost or an error occurs before receiving + /// the pong from the endpoint, the pongReceiveHandler block will be invoked with an error. + /// Note - the pongReceiveHandler will always be called in the order in which the pings were sent. + void sendPingWithPongReceiveHandler_( + objc.ObjCBlock pongReceiveHandler) { + _objc_msgSend_f167m6(this.ref.pointer, _sel_sendPingWithPongReceiveHandler_, + pongReceiveHandler.ref.pointer); + } -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError { - /// Returns a block that wraps the given raw block pointer. - static objc - .ObjCBlock - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function(objc.NSURL?, NSURLResponse?, - objc.NSError?)>(pointer, retain: retain, release: release); + /// Sends a close frame with the given closeCode. An optional reason can be provided while sending the close frame. + /// Simply calling cancel on the task will result in a cancellation frame being sent without any reason. + void cancelWithCloseCode_reason_( + DartNSInteger closeCode, objc.NSData? reason) { + _objc_msgSend_xb0psz(this.ref.pointer, _sel_cancelWithCloseCode_reason_, + closeCode, reason?.ref.pointer ?? ffi.nullptr); + } - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) => - objc.ObjCBlock( - objc.newPointerBlock(_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrCallable, ptr.cast()), - retain: false, - release: true); + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached + DartNSInteger get maximumMessageSize { + return _objc_msgSend_1hz7y9r(this.ref.pointer, _sel_maximumMessageSize); + } - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunction( - void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) => - objc.ObjCBlock( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 ? null : objc.NSURL.castFromPointer(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse.castFromPointer(arg1, retain: true, release: true), - arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), - retain: false, - release: true); + /// The maximum number of bytes to be buffered before erroring out. This includes the sum of all bytes from continuation frames. Receive calls will error out if this value is reached + set maximumMessageSize(DartNSInteger value) { + return _objc_msgSend_4sp4xj( + this.ref.pointer, _sel_setMaximumMessageSize_, value); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc - .ObjCBlock - listener(void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : objc.NSURL - .castFromPointer(arg0, retain: false, release: true), - arg1.address == 0 - ? null - : NSURLResponse.castFromPointer(arg1, - retain: false, release: true), - arg2.address == 0 - ? null - : objc.NSError.castFromPointer(arg2, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_tenbla(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function(objc.NSURL?, NSURLResponse?, - objc.NSError?)>(wrapper, retain: false, release: true); + /// A task can be queried for it's close code at any point. When the task is not closed, it will be set to NSURLSessionWebSocketCloseCodeInvalid + DartNSInteger get closeCode { + return _objc_msgSend_1rhk8uh(this.ref.pointer, _sel_closeCode); } -} -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_CallExtension on objc - .ObjCBlock { - void call(objc.NSURL? arg0, NSURLResponse? arg1, objc.NSError? arg2) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, - arg0?.ref.pointer ?? ffi.nullptr, - arg1?.ref.pointer ?? ffi.nullptr, - arg2?.ref.pointer ?? ffi.nullptr); -} + /// A task can be queried for it's close reason at any point. A nil value indicates no closeReason or that the task is still running + objc.NSData? get closeReason { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_closeReason); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_downloadTaskWithRequest_completionHandler_ = - objc.registerName("downloadTaskWithRequest:completionHandler:"); -late final _sel_downloadTaskWithURL_completionHandler_ = - objc.registerName("downloadTaskWithURL:completionHandler:"); -late final _sel_downloadTaskWithResumeData_completionHandler_ = - objc.registerName("downloadTaskWithResumeData:completionHandler:"); + /// init + NSURLSessionWebSocketTask init() { + final _ret = + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); + } -enum NSURLSessionResponseDisposition { - /// Cancel the load, this is the same as -[task cancel] - NSURLSessionResponseCancel(0), + /// new + static NSURLSessionWebSocketTask new1() { + final _ret = + _objc_msgSend_1x359cv(_class_NSURLSessionWebSocketTask, _sel_new); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); + } - /// Allow the load to continue - NSURLSessionResponseAllow(1), + /// allocWithZone: + static NSURLSessionWebSocketTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_hzlb60( + _class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); + } - /// Turn this request into a download - NSURLSessionResponseBecomeDownload(2), + /// alloc + static NSURLSessionWebSocketTask alloc() { + final _ret = + _objc_msgSend_1x359cv(_class_NSURLSessionWebSocketTask, _sel_alloc); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); + } - /// Turn this task into a stream task - NSURLSessionResponseBecomeStream(3); + /// self + NSURLSessionWebSocketTask self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } - final int value; - const NSURLSessionResponseDisposition(this.value); + /// retain + NSURLSessionWebSocketTask retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } - static NSURLSessionResponseDisposition fromValue(int value) => - switch (value) { - 0 => NSURLSessionResponseCancel, - 1 => NSURLSessionResponseAllow, - 2 => NSURLSessionResponseBecomeDownload, - 3 => NSURLSessionResponseBecomeStream, - _ => throw ArgumentError( - "Unknown value for NSURLSessionResponseDisposition: $value"), - }; + /// autorelease + NSURLSessionWebSocketTask autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } } -/// Messages related to the URL session as a whole -abstract final class NSURLSessionDelegate { - /// Builds an object that implements the NSURLSessionDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {void Function(NSURLSession, objc.NSError?)? - URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? - URLSessionDidFinishEventsForBackgroundURLSession_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLSessionDelegate.URLSession_didBecomeInvalidWithError_.implement( - builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implement(builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); - return builder.build(); +late final _sel_webSocketTaskWithURL_ = + objc.registerName("webSocketTaskWithURL:"); +late final _sel_webSocketTaskWithURL_protocols_ = + objc.registerName("webSocketTaskWithURL:protocols:"); +late final _sel_webSocketTaskWithRequest_ = + objc.registerName("webSocketTaskWithRequest:"); + +/// NSURLSession is a replacement API for NSURLConnection. It provides +/// options that affect the policy of, and various aspects of the +/// mechanism by which NSURLRequest objects are retrieved from the +/// network. +/// +/// An NSURLSession may be bound to a delegate object. The delegate is +/// invoked for certain events during the lifetime of a session, such as +/// server authentication or determining whether a resource to be loaded +/// should be converted into a download. +/// +/// NSURLSession instances are thread-safe. +/// +/// The default NSURLSession uses a system provided delegate and is +/// appropriate to use in place of existing code that uses +/// +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] +/// +/// An NSURLSession creates NSURLSessionTask objects which represent the +/// action of a resource being loaded. These are analogous to +/// NSURLConnection objects but provide for more control and a unified +/// delegate model. +/// +/// NSURLSessionTask objects are always created in a suspended state and +/// must be sent the -resume message before they will execute. +/// +/// Subclasses of NSURLSessionTask are used to syntactically +/// differentiate between data and file downloads. +/// +/// An NSURLSessionDataTask receives the resource as a series of calls to +/// the URLSession:dataTask:didReceiveData: delegate method. This is type of +/// task most commonly associated with retrieving objects for immediate parsing +/// by the consumer. +/// +/// An NSURLSessionUploadTask differs from an NSURLSessionDataTask +/// in how its instance is constructed. Upload tasks are explicitly created +/// by referencing a file or data object to upload, or by utilizing the +/// -URLSession:task:needNewBodyStream: delegate message to supply an upload +/// body. +/// +/// An NSURLSessionDownloadTask will directly write the response data to +/// a temporary file. When completed, the delegate is sent +/// URLSession:downloadTask:didFinishDownloadingToURL: and given an opportunity +/// to move this file to a permanent location in its sandboxed container, or to +/// otherwise read the file. If canceled, an NSURLSessionDownloadTask can +/// produce a data blob that can be used to resume a download at a later +/// time. +/// +/// Beginning with iOS 9 and Mac OS X 10.11, NSURLSessionStream is +/// available as a task type. This allows for direct TCP/IP connection +/// to a given host and port with optional secure handshaking and +/// navigation of proxies. Data tasks may also be upgraded to a +/// NSURLSessionStream task via the HTTP Upgrade: header and appropriate +/// use of the pipelining option of NSURLSessionConfiguration. See RFC +/// 2817 and RFC 6455 for information about the Upgrade: header, and +/// comments below on turning data tasks into stream tasks. +/// +/// An NSURLSessionWebSocketTask is a task that allows clients to connect to servers supporting +/// WebSocket. The task will perform the HTTP handshake to upgrade the connection +/// and once the WebSocket handshake is successful, the client can read and write +/// messages that will be framed using the WebSocket protocol by the framework. +class NSURLSession extends objc.NSObject { + NSURLSession._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLSession] that points to the same underlying object as [other]. + NSURLSession.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLSession] that wraps the given raw object pointer. + NSURLSession.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSession]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_69e0x1( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSession); } - /// Adds the implementation of the NSURLSessionDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {void Function(NSURLSession, objc.NSError?)? - URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? - URLSessionDidFinishEventsForBackgroundURLSession_}) { - NSURLSessionDelegate.URLSession_didBecomeInvalidWithError_.implement( - builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implement(builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + /// The shared session uses the currently set global NSURLCache, + /// NSHTTPCookieStorage and NSURLCredentialStorage objects. + static NSURLSession getSharedSession() { + final _ret = _objc_msgSend_1x359cv(_class_NSURLSession, _sel_sharedSession); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - /// Builds an object that implements the NSURLSessionDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - static objc.ObjCObjectBase implementAsListener( - {void Function(NSURLSession, objc.NSError?)? - URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? - URLSessionDidFinishEventsForBackgroundURLSession_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLSessionDelegate.URLSession_didBecomeInvalidWithError_ - .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implementAsListener( - builder, URLSessionDidFinishEventsForBackgroundURLSession_); - return builder.build(); + /// Customization of NSURLSession occurs during creation of a new session. + /// If you only need to use the convenience routines with custom + /// configuration options it is not necessary to specify a delegate. + /// If you do specify a delegate, the delegate will be retained until after + /// the delegate has been sent the URLSession:didBecomeInvalidWithError: message. + static NSURLSession sessionWithConfiguration_( + NSURLSessionConfiguration configuration) { + final _ret = _objc_msgSend_62nh5j(_class_NSURLSession, + _sel_sessionWithConfiguration_, configuration.ref.pointer); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - /// Adds the implementation of the NSURLSessionDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, - {void Function(NSURLSession, objc.NSError?)? - URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? - URLSessionDidFinishEventsForBackgroundURLSession_}) { - NSURLSessionDelegate.URLSession_didBecomeInvalidWithError_ - .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implementAsListener( - builder, URLSessionDidFinishEventsForBackgroundURLSession_); + /// sessionWithConfiguration:delegate:delegateQueue: + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NSURLSessionConfiguration configuration, + objc.ObjCObjectBase? delegate, + NSOperationQueue? queue) { + final _ret = _objc_msgSend_582s3n( + _class_NSURLSession, + _sel_sessionWithConfiguration_delegate_delegateQueue_, + configuration.ref.pointer, + delegate?.ref.pointer ?? ffi.nullptr, + queue?.ref.pointer ?? ffi.nullptr); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - /// The last message a session receives. A session will only become - /// invalid because of a systemic error or when it has been - /// explicitly invalidated, in which case the error parameter will be nil. - static final URLSession_didBecomeInvalidWithError_ = objc - .ObjCProtocolListenableMethod( - _sel_URLSession_didBecomeInvalidWithError_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDelegate, - _sel_URLSession_didBecomeInvalidWithError_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( - (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( - (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => - func(arg1, arg2)), - ); + /// delegateQueue + NSOperationQueue get delegateQueue { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_delegateQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + } - /// If implemented, when a connection level authentication challenge - /// has occurred, this delegate will be given the opportunity to - /// provide authentication credentials to the underlying - /// connection. Some types of authentication will apply to more than - /// one request on a given connection to a server (SSL Server Trust - /// challenges). If this delegate message is not implemented, the - /// behavior will be to use the default handling, which may involve user - /// interaction. - static final URLSession_didReceiveChallenge_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock)>( - _sel_URLSession_didReceiveChallenge_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDelegate, - _sel_URLSession_didReceiveChallenge_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg3) => - func(arg1, arg2, arg3)), - ); + /// delegate + objc.ObjCObjectBase? get delegate { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } - /// If an application has received an - /// -application:handleEventsForBackgroundURLSession:completionHandler: - /// message, the session delegate will receive this message to indicate - /// that all messages previously enqueued for this session have been - /// delivered. At this time it is safe to invoke the previously stored - /// completion handler, or to begin any internal updates that will - /// result in invoking the completion handler. - static final URLSessionDidFinishEventsForBackgroundURLSession_ = - objc.ObjCProtocolListenableMethod( - _sel_URLSessionDidFinishEventsForBackgroundURLSession_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDelegate, - _sel_URLSessionDidFinishEventsForBackgroundURLSession_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( - (ffi.Pointer _, NSURLSession arg1) => func(arg1)), - (void Function(NSURLSession) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( - (ffi.Pointer _, NSURLSession arg1) => func(arg1)), - ); + /// configuration + NSURLSessionConfiguration get configuration { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_configuration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } + + /// The sessionDescription property is available for the developer to + /// provide a descriptive label for the session. + objc.NSString? get sessionDescription { + final _ret = + _objc_msgSend_1x359cv(this.ref.pointer, _sel_sessionDescription); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// The sessionDescription property is available for the developer to + /// provide a descriptive label for the session. + set sessionDescription(objc.NSString? value) { + return _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_setSessionDescription_, + value?.ref.pointer ?? ffi.nullptr); + } + + /// -finishTasksAndInvalidate returns immediately and existing tasks will be allowed + /// to run to completion. New tasks may not be created. The session + /// will continue to make delegate callbacks until URLSession:didBecomeInvalidWithError: + /// has been issued. + /// + /// -finishTasksAndInvalidate and -invalidateAndCancel do not + /// have any effect on the shared session singleton. + /// + /// When invalidating a background session, it is not safe to create another background + /// session with the same identifier until URLSession:didBecomeInvalidWithError: has + /// been issued. + void finishTasksAndInvalidate() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_finishTasksAndInvalidate); + } + + /// -invalidateAndCancel acts as -finishTasksAndInvalidate, but issues + /// -cancel to all outstanding tasks for this session. Note task + /// cancellation is subject to the state of the task, and some tasks may + /// have already have completed at the time they are sent -cancel. + void invalidateAndCancel() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_invalidateAndCancel); + } + + /// empty all cookies, cache and credential stores, removes disk files, issues -flushWithCompletionHandler:. Invokes completionHandler() on the delegate queue. + void resetWithCompletionHandler_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_f167m6(this.ref.pointer, _sel_resetWithCompletionHandler_, + completionHandler.ref.pointer); + } + + /// flush storage to disk and clear transient network caches. Invokes completionHandler() on the delegate queue. + void flushWithCompletionHandler_( + objc.ObjCBlock completionHandler) { + _objc_msgSend_f167m6(this.ref.pointer, _sel_flushWithCompletionHandler_, + completionHandler.ref.pointer); + } + + /// invokes completionHandler with outstanding data, upload and download tasks. + void getTasksWithCompletionHandler_( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + completionHandler) { + _objc_msgSend_f167m6(this.ref.pointer, _sel_getTasksWithCompletionHandler_, + completionHandler.ref.pointer); + } + + /// invokes completionHandler with all outstanding tasks. + void getAllTasksWithCompletionHandler_( + objc.ObjCBlock)> + completionHandler) { + _objc_msgSend_f167m6(this.ref.pointer, + _sel_getAllTasksWithCompletionHandler_, completionHandler.ref.pointer); + } + + /// Creates a data task with the given request. The request may have a body stream. + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_dataTaskWithRequest_, request.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates a data task to retrieve the contents of the given URL. + NSURLSessionDataTask dataTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_dataTaskWithURL_, url.ref.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates an upload task with the given request. The body of the request will be created from the file referenced by fileURL + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest request, objc.NSURL fileURL) { + final _ret = _objc_msgSend_rsfdlh( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromFile_, + request.ref.pointer, + fileURL.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates an upload task with the given request. The body of the request is provided from the bodyData. + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest request, objc.NSData bodyData) { + final _ret = _objc_msgSend_rsfdlh( + this.ref.pointer, + _sel_uploadTaskWithRequest_fromData_, + request.ref.pointer, + bodyData.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates an upload task from a resume data blob. Requires the server to support the latest resumable uploads + /// Internet-Draft from the HTTP Working Group, found at + /// https://datatracker.ietf.org/doc/draft-ietf-httpbis-resumable-upload/ + /// If resuming from an upload file, the file must still exist and be unmodified. If the upload cannot be successfully + /// resumed, URLSession:task:didCompleteWithError: will be called. + /// + /// - Parameter resumeData: Resume data blob from an incomplete upload, such as data returned by the cancelByProducingResumeData: method. + /// - Returns: A new session upload task, or nil if the resumeData is invalid. + NSURLSessionUploadTask uploadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_uploadTaskWithResumeData_, resumeData.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates an upload task with the given request. The previously set body stream of the request (if any) is ignored and the URLSession:task:needNewBodyStream: delegate will be called when the body payload is required. + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_uploadTaskWithStreamedRequest_, request.ref.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates a download task with the given request. + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_downloadTaskWithRequest_, request.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates a download task to download the contents of the given URL. + NSURLSessionDownloadTask downloadTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_downloadTaskWithURL_, url.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates a download task with the resume data. If the download cannot be successfully resumed, URLSession:task:didCompleteWithError: will be called. + NSURLSessionDownloadTask downloadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_downloadTaskWithResumeData_, resumeData.ref.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates a bidirectional stream task to a given host and port. + NSURLSessionStreamTask streamTaskWithHostName_port_( + objc.NSString hostname, DartNSInteger port) { + final _ret = _objc_msgSend_1i26p99(this.ref.pointer, + _sel_streamTaskWithHostName_port_, hostname.ref.pointer, port); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates a bidirectional stream task with an NSNetService to identify the endpoint. + /// The NSNetService will be resolved before any IO completes. + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_streamTaskWithNetService_, service.ref.pointer); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates a WebSocket task given the url. The given url must have a ws or wss scheme. + NSURLSessionWebSocketTask webSocketTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_webSocketTaskWithURL_, url.ref.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates a WebSocket task given the url and an array of protocols. The protocols will be used in the WebSocket handshake to + /// negotiate a preferred protocol with the server + /// Note - The protocol will not affect the WebSocket framing. More details on the protocol can be found by reading the WebSocket RFC + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + objc.NSURL url, objc.ObjCObjectBase protocols) { + final _ret = _objc_msgSend_rsfdlh( + this.ref.pointer, + _sel_webSocketTaskWithURL_protocols_, + url.ref.pointer, + protocols.ref.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// Creates a WebSocket task given the request. The request properties can be modified and will be used by the task during the HTTP handshake phase. + /// Clients who want to add custom protocols can do so by directly adding headers with the key Sec-WebSocket-Protocol + /// and a comma separated list of protocols they wish to negotiate with the server. The custom HTTP headers provided by the client will remain unchanged for the handshake with the server. + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_webSocketTaskWithRequest_, request.ref.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); + } + + /// init + NSURLSession init() { + final _ret = + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); + } + + /// new + static NSURLSession new1() { + final _ret = _objc_msgSend_1x359cv(_class_NSURLSession, _sel_new); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); + } + + /// allocWithZone: + static NSURLSession allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_hzlb60(_class_NSURLSession, _sel_allocWithZone_, zone); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); + } + + /// alloc + static NSURLSession alloc() { + final _ret = _objc_msgSend_1x359cv(_class_NSURLSession, _sel_alloc); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); + } + + /// self + NSURLSession self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSURLSession retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSURLSession autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); + } } -late final _protocol_NSURLSessionDelegate = - objc.getProtocol("NSURLSessionDelegate"); -late final _sel_URLSession_didBecomeInvalidWithError_ = - objc.registerName("URLSession:didBecomeInvalidWithError:"); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => +/// Disposition options for various delegate messages +enum NSURLSessionDelayedRequestDisposition { + /// Use the original request provided when the task was created; the request parameter is ignored. + NSURLSessionDelayedRequestContinueLoading(0), + + /// Use the specified request, which may not be nil. + NSURLSessionDelayedRequestUseNewRequest(1), + + /// Cancel the task; the request parameter is ignored. + NSURLSessionDelayedRequestCancel(2); + + final int value; + const NSURLSessionDelayedRequestDisposition(this.value); + + static NSURLSessionDelayedRequestDisposition fromValue(int value) => + switch (value) { + 0 => NSURLSessionDelayedRequestContinueLoading, + 1 => NSURLSessionDelayedRequestUseNewRequest, + 2 => NSURLSessionDelayedRequestCancel, + _ => throw ArgumentError( + "Unknown value for NSURLSessionDelayedRequestDisposition: $value"), + }; +} + +enum NSURLSessionAuthChallengeDisposition { + /// Use the specified credential, which may be nil + NSURLSessionAuthChallengeUseCredential(0), + + /// Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored. + NSURLSessionAuthChallengePerformDefaultHandling(1), + + /// The entire request will be canceled; the credential parameter is ignored. + NSURLSessionAuthChallengeCancelAuthenticationChallenge(2), + + /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. + NSURLSessionAuthChallengeRejectProtectionSpace(3); + + final int value; + const NSURLSessionAuthChallengeDisposition(this.value); + + static NSURLSessionAuthChallengeDisposition fromValue(int value) => + switch (value) { + 0 => NSURLSessionAuthChallengeUseCredential, + 1 => NSURLSessionAuthChallengePerformDefaultHandling, + 2 => NSURLSessionAuthChallengeCancelAuthenticationChallenge, + 3 => NSURLSessionAuthChallengeRejectProtectionSpace, + _ => throw ArgumentError( + "Unknown value for NSURLSessionAuthChallengeDisposition: $value"), + }; +} + +enum NSURLSessionResponseDisposition { + /// Cancel the load, this is the same as -[task cancel] + NSURLSessionResponseCancel(0), + + /// Allow the load to continue + NSURLSessionResponseAllow(1), + + /// Turn this request into a download + NSURLSessionResponseBecomeDownload(2), + + /// Turn this task into a stream task + NSURLSessionResponseBecomeStream(3); + + final int value; + const NSURLSessionResponseDisposition(this.value); + + static NSURLSessionResponseDisposition fromValue(int value) => + switch (value) { + 0 => NSURLSessionResponseCancel, + 1 => NSURLSessionResponseAllow, + 2 => NSURLSessionResponseBecomeDownload, + 3 => NSURLSessionResponseBecomeStream, + _ => throw ArgumentError( + "Unknown value for NSURLSessionResponseDisposition: $value"), + }; +} + +late final _protocol_NSURLSessionDataDelegate = + objc.getProtocol("NSURLSessionDataDelegate"); +void _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_fnPtrTrampoline( + ffi.Pointer block, int arg0) => block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); + .cast>() + .asFunction()(arg0); ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_fnPtrCallable = + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer, NSInteger)>( + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_fnPtrTrampoline) .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_closureTrampoline( + ffi.Pointer block, int arg0) => + (objc.getBlockClosure(block) as void Function(int))(arg0); ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_closureCallable = + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_closureTrampoline) + ffi.Void Function(ffi.Pointer, NSInteger)>( + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_closureTrampoline) .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_listenerTrampoline( + ffi.Pointer block, int arg0) { + (objc.getBlockClosure(block) as void Function(int))(arg0); objc.objectRelease(block.cast()); } ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_listenerCallable = ffi + ffi.Void Function(ffi.Pointer, NSInteger)> + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_listenerCallable = ffi .NativeCallable< ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_listenerTrampoline) + ffi.Pointer, NSInteger)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_listenerTrampoline) ..keepIsolateAlive = false; -/// Construction methods for `objc.ObjCBlock, NSURLSession, objc.NSError?)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError { +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURLSessionResponseDisposition { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, objc.NSError?)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - objc.NSError?)>(pointer, retain: retain, release: release); + static objc.ObjCBlock castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc - .ObjCBlock, NSURLSession, objc.NSError?)> - fromFunctionPointer( - ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> - ptr) => - objc.ObjCBlock, NSURLSession, objc.NSError?)>( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_fnPtrCallable, - ptr.cast()), - retain: false, - release: true); + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); /// Creates a block from a Dart function. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc - .ObjCBlock, NSURLSession, objc.NSError?)> - fromFunction(void Function(ffi.Pointer, NSURLSession, objc.NSError?) fn) => - objc.ObjCBlock, NSURLSession, objc.NSError?)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), - retain: false, - release: true); + static objc.ObjCBlock fromFunction( + void Function(NSURLSessionResponseDisposition) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_closureCallable, + (int arg0) => + fn(NSURLSessionResponseDisposition.fromValue(arg0))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -61560,144 +60425,153 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, NSURLSession, objc.NSError?)> listener( - void Function(ffi.Pointer, NSURLSession, objc.NSError?) fn) { + static objc.ObjCBlock listener( + void Function(NSURLSessionResponseDisposition) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_listenerCallable + _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_listenerCallable .nativeFunction .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - arg2.address == 0 - ? null - : objc.NSError.castFromPointer(arg2, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_tm2na8(raw); + (int arg0) => fn(NSURLSessionResponseDisposition.fromValue(arg0))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_16sve1d(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - objc.NSError?)>(wrapper, retain: false, release: true); + return objc.ObjCBlock(wrapper, + retain: false, release: true); } } -/// Call operator for `objc.ObjCBlock, NSURLSession, objc.NSError?)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_CallExtension - on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, objc.NSError?)> { - void call( - ffi.Pointer arg0, NSURLSession arg1, objc.NSError? arg2) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0, - arg1.ref.pointer, arg2?.ref.pointer ?? ffi.nullptr); +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_CallExtension + on objc.ObjCBlock { + void call(NSURLSessionResponseDisposition arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, NSInteger arg0)>>() + .asFunction, int)>()( + ref.pointer, arg0.value); } -/// NSURLAuthenticationChallenge -class NSURLAuthenticationChallenge extends objc.ObjCObjectBase { - NSURLAuthenticationChallenge._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super(pointer, retain: retain, release: release); - - /// Constructs a [NSURLAuthenticationChallenge] that points to the same underlying object as [other]. - NSURLAuthenticationChallenge.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSURLAuthenticationChallenge] that wraps the given raw object pointer. - NSURLAuthenticationChallenge.castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSURLAuthenticationChallenge]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg(obj.ref.pointer, _sel_isKindOfClass_, - _class_NSURLAuthenticationChallenge); - } -} - -late final _class_NSURLAuthenticationChallenge = - objc.getClass("NSURLAuthenticationChallenge"); +late final _sel_URLSession_dataTask_didReceiveResponse_completionHandler_ = objc + .registerName("URLSession:dataTask:didReceiveResponse:completionHandler:"); void - _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_fnPtrTrampoline( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_fnPtrTrampoline( ffi.Pointer block, - int arg0, - ffi.Pointer arg1) => + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(NSInteger arg0, - ffi.Pointer arg1)>>() - .asFunction)>()( - arg0, arg1); + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + arg0, arg1, arg2, arg3, arg4); ffi.Pointer - _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_fnPtrCallable = + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_fnPtrCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, NSInteger, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_fnPtrTrampoline) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_fnPtrTrampoline) .cast(); void - _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_closureTrampoline( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_closureTrampoline( ffi.Pointer block, - int arg0, - ffi.Pointer arg1) => + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => (objc.getBlockClosure(block) as void Function( - int, ffi.Pointer))(arg0, arg1); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); ffi.Pointer - _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_closureCallable = + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_closureCallable = ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, NSInteger, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_closureTrampoline) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_closureTrampoline) .cast(); void - _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_listenerTrampoline( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_listenerTrampoline( ffi.Pointer block, - int arg0, - ffi.Pointer arg1) { + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) { (objc.getBlockClosure(block) as void Function( - int, ffi.Pointer))(arg0, arg1); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); objc.objectRelease(block.cast()); } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, NSInteger, - ffi.Pointer)> - _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_listenerCallable = + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_listenerCallable = ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, NSInteger, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_listenerTrampoline) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_listenerTrampoline) ..keepIsolateAlive = false; -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential { +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)> castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => - objc.ObjCBlock( - pointer, - retain: retain, - release: release); + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. /// @@ -61705,13 +60579,20 @@ abstract final class ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSUR /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> fromFunctionPointer( - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_fnPtrCallable, - ptr.cast()), + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_fnPtrCallable, ptr.cast()), retain: false, release: true); @@ -61720,16 +60601,17 @@ abstract final class ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSUR /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock - fromFunction(void Function(NSURLSessionAuthChallengeDisposition, NSURLCredential?) fn) => - objc.ObjCBlock( + static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)> + fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)>( objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_closureCallable, - (int arg0, ffi.Pointer arg1) => fn( - NSURLSessionAuthChallengeDisposition.fromValue(arg0), - arg1.address == 0 - ? null - : NSURLCredential.castFromPointer(arg1, retain: true, release: true))), + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), + NSURLResponse.castFromPointer(arg3, retain: true, release: true), + ObjCBlock_ffiVoid_NSURLSessionResponseDisposition.castFromPointer(arg4, retain: true, release: true))), retain: false, release: true); @@ -61742,103 +60624,98 @@ abstract final class ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSUR /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock - listener( - void Function(NSURLSessionAuthChallengeDisposition, NSURLCredential?) - fn) { + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, + NSURLResponse, objc.ObjCBlock) + fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_listenerCallable + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_listenerCallable .nativeFunction .cast(), - (int arg0, ffi.Pointer arg1) => fn( - NSURLSessionAuthChallengeDisposition.fromValue(arg0), - arg1.address == 0 - ? null - : NSURLCredential.castFromPointer(arg1, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_1najo2h(raw); + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDataTask.castFromPointer(arg2, + retain: false, release: true), + NSURLResponse.castFromPointer(arg3, + retain: false, release: true), + ObjCBlock_ffiVoid_NSURLSessionResponseDisposition + .castFromPointer(arg4, retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1f43wec(raw); objc.objectRelease(raw.cast()); - return objc.ObjCBlock( - wrapper, - retain: false, - release: true); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)>(wrapper, + retain: false, release: true); } } -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_CallExtension - on objc.ObjCBlock { - void call(NSURLSessionAuthChallengeDisposition arg0, NSURLCredential? arg1) => +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLResponse, + objc.ObjCBlock)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLSessionDataTask arg2, + NSURLResponse arg3, + objc.ObjCBlock arg4) => ref.pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - NSInteger arg0, ffi.Pointer arg1)>>() + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() .asFunction< - void Function(ffi.Pointer, int, - ffi.Pointer)>()( - ref.pointer, arg0.value, arg1?.ref.pointer ?? ffi.nullptr); -} - -enum NSURLSessionAuthChallengeDisposition { - /// Use the specified credential, which may be nil - NSURLSessionAuthChallengeUseCredential(0), - - /// Default handling for the challenge - as if this delegate were not implemented; the credential parameter is ignored. - NSURLSessionAuthChallengePerformDefaultHandling(1), - - /// The entire request will be canceled; the credential parameter is ignored. - NSURLSessionAuthChallengeCancelAuthenticationChallenge(2), - - /// This challenge is rejected and the next authentication protection space should be tried; the credential parameter is ignored. - NSURLSessionAuthChallengeRejectProtectionSpace(3); - - final int value; - const NSURLSessionAuthChallengeDisposition(this.value); - - static NSURLSessionAuthChallengeDisposition fromValue(int value) => - switch (value) { - 0 => NSURLSessionAuthChallengeUseCredential, - 1 => NSURLSessionAuthChallengePerformDefaultHandling, - 2 => NSURLSessionAuthChallengeCancelAuthenticationChallenge, - 3 => NSURLSessionAuthChallengeRejectProtectionSpace, - _ => throw ArgumentError( - "Unknown value for NSURLSessionAuthChallengeDisposition: $value"), - }; -} - -/// NSURLCredential -class NSURLCredential extends objc.ObjCObjectBase { - NSURLCredential._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super(pointer, retain: retain, release: release); - - /// Constructs a [NSURLCredential] that points to the same underlying object as [other]. - NSURLCredential.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSURLCredential] that wraps the given raw object pointer. - NSURLCredential.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSURLCredential]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLCredential); - } + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0, + arg1.ref.pointer, + arg2.ref.pointer, + arg3.ref.pointer, + arg4.ref.pointer); } -late final _class_NSURLCredential = objc.getClass("NSURLCredential"); -late final _sel_URLSession_didReceiveChallenge_completionHandler_ = - objc.registerName("URLSession:didReceiveChallenge:completionHandler:"); +late final _sel_URLSession_dataTask_didBecomeDownloadTask_ = + objc.registerName("URLSession:dataTask:didBecomeDownloadTask:"); void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrTrampoline( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3) => + ffi.Pointer arg3) => block.ref.target .cast< ffi.NativeFunction< @@ -61846,59 +60723,59 @@ void ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3)>>() + ffi.Pointer arg3)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); + ffi.Pointer)>()(arg0, arg1, arg2, arg3); ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrCallable = + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_fnPtrCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrTrampoline) + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_fnPtrTrampoline) .cast(); void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureTrampoline( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3) => + ffi.Pointer arg3) => (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); + ffi.Pointer))(arg0, arg1, arg2, arg3); ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureCallable = + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_closureCallable = ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureTrampoline) + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_closureTrampoline) .cast(); void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerTrampoline( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_listenerTrampoline( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3) { + ffi.Pointer arg3) { (objc.getBlockClosure(block) as void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); + ffi.Pointer))(arg0, arg1, arg2, arg3); objc.objectRelease(block.cast()); } @@ -61908,34 +60785,29 @@ ffi.NativeCallable< ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerCallable = + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_listenerCallable = ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerTrampoline) + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_listenerTrampoline) ..keepIsolateAlive = false; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential { +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask { /// Returns a block that wraps the given raw block pointer. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLAuthenticationChallenge, - objc.ObjCBlock)> - castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionDownloadTask)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLAuthenticationChallenge, - objc.ObjCBlock)>(pointer, + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionDownloadTask)>(pointer, retain: retain, release: release); /// Creates a block from a C function pointer. @@ -61944,16 +60816,13 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationC /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLAuthenticationChallenge, - objc.ObjCBlock)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => - objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)>( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrCallable, - ptr.cast()), + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionDownloadTask)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionDownloadTask)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_fnPtrCallable, ptr.cast()), retain: false, release: true); @@ -61962,19 +60831,19 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationC /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock) fn) => - objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)>( + static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)>( objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureCallable, + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_closureCallable, (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3) => + ffi.Pointer arg3) => fn( arg0, NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLAuthenticationChallenge.castFromPointer(arg2, retain: true, release: true), - ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential.castFromPointer(arg3, retain: true, release: true))), + NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), + NSURLSessionDownloadTask.castFromPointer(arg3, retain: true, release: true))), retain: false, release: true); @@ -61988,61 +60857,45 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationC /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLAuthenticationChallenge, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)>)> listener( - void Function( - ffi.Pointer, - NSURLSession, - NSURLAuthenticationChallenge, - objc.ObjCBlock) + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionDownloadTask)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, + NSURLSessionDownloadTask) fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerCallable + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_listenerCallable .nativeFunction .cast(), (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3) => + ffi.Pointer arg3) => fn( arg0, NSURLSession.castFromPointer(arg1, retain: false, release: true), - NSURLAuthenticationChallenge.castFromPointer(arg2, + NSURLSessionDataTask.castFromPointer(arg2, retain: false, release: true), - ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential - .castFromPointer(arg3, retain: false, release: true))); - final wrapper = _wrapListenerBlock_1wmulza(raw); + NSURLSessionDownloadTask.castFromPointer(arg3, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1r3kn8f(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLAuthenticationChallenge, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)>)>(wrapper, - retain: false, release: true); + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLSessionDownloadTask)>(wrapper, retain: false, release: true); } } -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_CallExtension +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_CallExtension on objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLAuthenticationChallenge, - objc.ObjCBlock)> { - void call( - ffi.Pointer arg0, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock - arg3) => + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionDownloadTask)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionDataTask arg2, NSURLSessionDownloadTask arg3) => ref.pointer.ref.invoke .cast< ffi.NativeFunction< @@ -62051,92 +60904,133 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ff ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, - ffi.Pointer arg3)>>() + ffi.Pointer arg3)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); } -late final _sel_URLSessionDidFinishEventsForBackgroundURLSession_ = - objc.registerName("URLSessionDidFinishEventsForBackgroundURLSession:"); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_closureTrampoline) +late final _sel_URLSession_dataTask_didBecomeStreamTask_ = + objc.registerName("URLSession:dataTask:didBecomeStreamTask:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_fnPtrTrampoline) .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) { +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); objc.objectRelease(block.cast()); } ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_listenerCallable = ffi - .NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_listenerTrampoline) + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_listenerTrampoline) ..keepIsolateAlive = false; -/// Construction methods for `objc.ObjCBlock, NSURLSession)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession { +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask { /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock, NSURLSession)> + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionStreamTask)> castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, - NSURLSession)>(pointer, retain: retain, release: release); + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionStreamTask)>(pointer, + retain: retain, release: release); /// Creates a block from a C function pointer. /// /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, NSURLSession)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock, NSURLSession)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_fnPtrCallable, ptr.cast()), + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionStreamTask)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionStreamTask)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_fnPtrCallable, ptr.cast()), retain: false, release: true); @@ -62145,18 +61039,21 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession { /// This block must be invoked by native code running on the same thread as /// the isolate that registered it. Invoking the block on the wrong thread /// will result in a crash. - static objc.ObjCBlock, NSURLSession)> - fromFunction(void Function(ffi.Pointer, NSURLSession) fn) => - objc.ObjCBlock, NSURLSession)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: true, release: true))), - retain: false, - release: true); + static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), + NSURLSessionStreamTask.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); /// Creates a listener block from a Dart function. /// @@ -62167,803 +61064,537 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - static objc.ObjCBlock, NSURLSession)> - listener(void Function(ffi.Pointer, NSURLSession) fn) { + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionStreamTask)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, + NSURLSessionStreamTask) + fn) { final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_listenerCallable.nativeFunction + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_listenerCallable + .nativeFunction .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: false, release: true))); - final wrapper = _wrapListenerBlock_sjfpmz(raw); + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDataTask.castFromPointer(arg2, + retain: false, release: true), + NSURLSessionStreamTask.castFromPointer(arg3, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1r3kn8f(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession)>(wrapper, - retain: false, release: true); + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSURLSessionStreamTask)>(wrapper, retain: false, release: true); } } -/// Call operator for `objc.ObjCBlock, NSURLSession)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_CallExtension - on objc.ObjCBlock, NSURLSession)> { - void call(ffi.Pointer arg0, NSURLSession arg1) => ref - .pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer); +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, NSURLSessionStreamTask)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionDataTask arg2, NSURLSessionStreamTask arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); } -/// Messages related to the operation of a specific task. -abstract final class NSURLSessionTaskDelegate { - /// Builds an object that implements the NSURLSessionTaskDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function( - NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? - URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLSessionTaskDelegate.URLSession_didCreateTask_.implement( - builder, URLSession_didCreateTask_); - NSURLSessionTaskDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implement(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionTaskDelegate.URLSession_taskIsWaitingForConnectivity_.implement( - builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionTaskDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implement(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionTaskDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implement( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionTaskDelegate.URLSession_task_needNewBodyStream_.implement( - builder, URLSession_task_needNewBodyStream_); - NSURLSessionTaskDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implement(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionTaskDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implement(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionTaskDelegate.URLSession_task_didReceiveInformationalResponse_ - .implement(builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionTaskDelegate.URLSession_task_didFinishCollectingMetrics_ - .implement(builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionTaskDelegate.URLSession_task_didCompleteWithError_.implement( - builder, URLSession_task_didCompleteWithError_); - NSURLSessionTaskDelegate.URLSession_didBecomeInvalidWithError_.implement( - builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionTaskDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implement(builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionTaskDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); - return builder.build(); - } +late final _sel_URLSession_dataTask_didReceiveData_ = + objc.registerName("URLSession:dataTask:didReceiveData:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} - /// Adds the implementation of the NSURLSessionTaskDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock)? - URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - NSURLSessionTaskDelegate.URLSession_didCreateTask_.implement( - builder, URLSession_didCreateTask_); - NSURLSessionTaskDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implement(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionTaskDelegate.URLSession_taskIsWaitingForConnectivity_.implement( - builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionTaskDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implement(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionTaskDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implement( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionTaskDelegate.URLSession_task_needNewBodyStream_.implement( - builder, URLSession_task_needNewBodyStream_); - NSURLSessionTaskDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implement(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionTaskDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implement(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionTaskDelegate.URLSession_task_didReceiveInformationalResponse_ - .implement(builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionTaskDelegate.URLSession_task_didFinishCollectingMetrics_ - .implement(builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionTaskDelegate.URLSession_task_didCompleteWithError_.implement( - builder, URLSession_task_didCompleteWithError_); - NSURLSessionTaskDelegate.URLSession_didBecomeInvalidWithError_.implement( - builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionTaskDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implement(builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionTaskDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); - } +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_listenerTrampoline) + ..keepIsolateAlive = false; - /// Builds an object that implements the NSURLSessionTaskDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - static objc.ObjCObjectBase implementAsListener( - {void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function( - NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? - URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLSessionTaskDelegate.URLSession_didCreateTask_.implementAsListener( - builder, URLSession_didCreateTask_); - NSURLSessionTaskDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionTaskDelegate.URLSession_taskIsWaitingForConnectivity_ - .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionTaskDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionTaskDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionTaskDelegate.URLSession_task_needNewBodyStream_ - .implementAsListener(builder, URLSession_task_needNewBodyStream_); - NSURLSessionTaskDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implementAsListener(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionTaskDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implementAsListener(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionTaskDelegate.URLSession_task_didReceiveInformationalResponse_ - .implementAsListener( - builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionTaskDelegate.URLSession_task_didFinishCollectingMetrics_ - .implementAsListener( - builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionTaskDelegate.URLSession_task_didCompleteWithError_ - .implementAsListener(builder, URLSession_task_didCompleteWithError_); - NSURLSessionTaskDelegate.URLSession_didBecomeInvalidWithError_ - .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionTaskDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionTaskDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implementAsListener( - builder, URLSessionDidFinishEventsForBackgroundURLSession_); - return builder.build(); - } +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, objc.NSData)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, objc.NSData)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + objc.NSData)>(pointer, retain: retain, release: release); - /// Adds the implementation of the NSURLSessionTaskDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, - {void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock)? - URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - NSURLSessionTaskDelegate.URLSession_didCreateTask_.implementAsListener( - builder, URLSession_didCreateTask_); - NSURLSessionTaskDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionTaskDelegate.URLSession_taskIsWaitingForConnectivity_ - .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionTaskDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionTaskDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionTaskDelegate.URLSession_task_needNewBodyStream_ - .implementAsListener(builder, URLSession_task_needNewBodyStream_); - NSURLSessionTaskDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implementAsListener(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionTaskDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implementAsListener(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionTaskDelegate.URLSession_task_didReceiveInformationalResponse_ - .implementAsListener( - builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionTaskDelegate.URLSession_task_didFinishCollectingMetrics_ - .implementAsListener( - builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionTaskDelegate.URLSession_task_didCompleteWithError_ - .implementAsListener(builder, URLSession_task_didCompleteWithError_); - NSURLSessionTaskDelegate.URLSession_didBecomeInvalidWithError_ - .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionTaskDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionTaskDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implementAsListener( - builder, URLSessionDidFinishEventsForBackgroundURLSession_); - } - - /// Notification that a task has been created. This method is the first message - /// a task sends, providing a place to configure the task before it is resumed. + /// Creates a block from a C function pointer. /// - /// This delegate callback is *NOT* dispatched to the delegate queue. It is - /// invoked synchronously before the task creation method returns. - static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask)>( - _sel_URLSession_didCreateTask_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_didCreateTask_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - ); + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, objc.NSData)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, objc.NSData)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Sent when the system is ready to begin work for a task with a delayed start - /// time set (using the earliestBeginDate property). The completionHandler must - /// be invoked in order for loading to proceed. The disposition provided to the - /// completion handler continues the load with the original request provided to - /// the task, replaces the request with the specified task, or cancels the task. - /// If this delegate is not implemented, loading will proceed with the original - /// request. - /// - /// Recommendation: only implement this delegate if tasks that have the - /// earliestBeginDate property set may become stale and require alteration prior - /// to starting the network load. - /// - /// If a new request is specified, the allowsExpensiveNetworkAccess, - /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties - /// from the new request will not be used; the properties from the - /// original request will continue to be used. + /// Creates a block from a Dart function. /// - /// Canceling the task is equivalent to calling the task's cancel method; the - /// URLSession:task:didCompleteWithError: task delegate will be called with error - /// NSURLErrorCancelled. - static final URLSession_task_willBeginDelayedRequest_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)>( - _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLRequest arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLRequest arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - ); + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, objc.NSData)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, objc.NSData) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, objc.NSData)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), + objc.NSData.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); - /// Sent when a task cannot start the network loading process because the current - /// network connectivity is not available or sufficient for the task's request. + /// Creates a listener block from a Dart function. /// - /// This delegate will be called at most one time per task, and is only called if - /// the waitsForConnectivity property in the NSURLSessionConfiguration has been - /// set to YES. + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. /// - /// This delegate callback will never be called for background sessions, because - /// the waitForConnectivity property is ignored by those sessions. - static final URLSession_taskIsWaitingForConnectivity_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask)>( - _sel_URLSession_taskIsWaitingForConnectivity_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_taskIsWaitingForConnectivity_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - ); + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, objc.NSData)> listener( + void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, + objc.NSData) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDataTask.castFromPointer(arg2, + retain: false, release: true), + objc.NSData.castFromPointer(arg3, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1r3kn8f(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + objc.NSData)>(wrapper, retain: false, release: true); + } +} - /// An HTTP request is attempting to perform a redirection to a different - /// URL. You must invoke the completion routine to allow the - /// redirection, allow the redirection with a modified request, or - /// pass nil to the completionHandler to cause the body of the redirection - /// response to be delivered as the payload of this request. The default - /// is to follow redirections. - /// - /// For tasks in background sessions, redirections will always be followed and this method will not be called. - static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)>( - _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSHTTPURLResponse arg3, - NSURLRequest arg4, - objc.ObjCBlock arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSHTTPURLResponse arg3, - NSURLRequest arg4, - objc.ObjCBlock arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - ); +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, objc.NSData)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDataTask, objc.NSData)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionDataTask arg2, objc.NSData arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); +} - /// The task has received a request specific authentication challenge. - /// If this delegate is not implemented, the session specific authentication challenge - /// will *NOT* be called and the behavior will be the same as using the default handling - /// disposition. - static final URLSession_task_didReceiveChallenge_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function( +late final _sel_URLSession_dataTask_willCacheResponse_completionHandler_ = objc + .registerName("URLSession:dataTask:willCacheResponse:completionHandler:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)>( - _sel_URLSession_task_didReceiveChallenge_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_task_didReceiveChallenge_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLAuthenticationChallenge arg3, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLAuthenticationChallenge arg3, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg4) => - func(arg1, arg2, arg3, arg4)), - ); + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)>(pointer, retain: retain, release: release); - /// Sent if a task requires a new, unopened body stream. This may be - /// necessary when authentication has failed for any request that - /// involves a body stream. - static final URLSession_task_needNewBodyStream_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock)>( - _sel_URLSession_task_needNewBodyStream_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_task_needNewBodyStream_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - objc.ObjCBlock - arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - objc.ObjCBlock - arg3) => - func(arg1, arg2, arg3)), - ); + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_fnPtrCallable, ptr.cast()), + retain: false, + release: true); - /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be - /// necessary when resuming a failed upload task. + /// Creates a block from a Dart function. /// - /// - Parameter session: The session containing the task that needs a new body stream from the given offset. - /// - Parameter task: The task that needs a new body stream. - /// - Parameter offset: The starting offset required for the body stream. - /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock)>( - _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - int arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - int arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - ); - - /// Sent periodically to notify the delegate of upload progress. This - /// information is also available as properties of the task. - static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, int, int, int)>( - _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, int arg3, int arg4, int arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, int arg3, int arg4, int arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - ); - - /// Sent for each informational response received except 101 switching protocols. - static final URLSession_task_didReceiveInformationalResponse_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( - _sel_URLSession_task_didReceiveInformationalResponse_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_task_didReceiveInformationalResponse_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSHTTPURLResponse arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSHTTPURLResponse arg3) => - func(arg1, arg2, arg3)), - ); - - /// Sent when complete statistics information has been collected for the task. - static final URLSession_task_didFinishCollectingMetrics_ = - objc.ObjCProtocolListenableMethod< - void Function( - NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( - _sel_URLSession_task_didFinishCollectingMetrics_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_task_didFinishCollectingMetrics_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => - func(arg1, arg2, arg3)), - ); - - /// Sent as the last message related to a specific task. Error may be - /// nil, which implies that no error occurred and this task is complete. - static final URLSession_task_didCompleteWithError_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( - _sel_URLSession_task_didCompleteWithError_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_task_didCompleteWithError_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, objc.NSError? arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, objc.NSError? arg3) => - func(arg1, arg2, arg3)), - ); - - /// The last message a session receives. A session will only become - /// invalid because of a systemic error or when it has been - /// explicitly invalidated, in which case the error parameter will be nil. - static final URLSession_didBecomeInvalidWithError_ = objc - .ObjCProtocolListenableMethod( - _sel_URLSession_didBecomeInvalidWithError_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_didBecomeInvalidWithError_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( - (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( - (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => - func(arg1, arg2)), - ); + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock)> + fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), + NSCachedURLResponse.castFromPointer(arg3, retain: true, release: true), + ObjCBlock_ffiVoid_NSCachedURLResponse.castFromPointer(arg4, retain: true, release: true))), + retain: false, + release: true); - /// If implemented, when a connection level authentication challenge - /// has occurred, this delegate will be given the opportunity to - /// provide authentication credentials to the underlying - /// connection. Some types of authentication will apply to more than - /// one request on a given connection to a server (SSL Server Trust - /// challenges). If this delegate message is not implemented, the - /// behavior will be to use the default handling, which may involve user - /// interaction. - static final URLSession_didReceiveChallenge_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock)>( - _sel_URLSession_didReceiveChallenge_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSession_didReceiveChallenge_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg3) => - func(arg1, arg2, arg3)), - ); + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)> listener( + void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDataTask.castFromPointer(arg2, + retain: false, release: true), + NSCachedURLResponse.castFromPointer(arg3, + retain: false, release: true), + ObjCBlock_ffiVoid_NSCachedURLResponse.castFromPointer(arg4, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1f43wec(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)>( + wrapper, + retain: false, + release: true); + } +} - /// If an application has received an - /// -application:handleEventsForBackgroundURLSession:completionHandler: - /// message, the session delegate will receive this message to indicate - /// that all messages previously enqueued for this session have been - /// delivered. At this time it is safe to invoke the previously stored - /// completion handler, or to begin any internal updates that will - /// result in invoking the completion handler. - static final URLSessionDidFinishEventsForBackgroundURLSession_ = - objc.ObjCProtocolListenableMethod( - _sel_URLSessionDidFinishEventsForBackgroundURLSession_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionTaskDelegate, - _sel_URLSessionDidFinishEventsForBackgroundURLSession_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( - (ffi.Pointer _, NSURLSession arg1) => func(arg1)), - (void Function(NSURLSession) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( - (ffi.Pointer _, NSURLSession arg1) => func(arg1)), - ); +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDataTask, + NSCachedURLResponse, + objc.ObjCBlock)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLSessionDataTask arg2, + NSCachedURLResponse arg3, + objc.ObjCBlock arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0, + arg1.ref.pointer, + arg2.ref.pointer, + arg3.ref.pointer, + arg4.ref.pointer); } -late final _protocol_NSURLSessionTaskDelegate = - objc.getProtocol("NSURLSessionTaskDelegate"); late final _sel_URLSession_didCreateTask_ = objc.registerName("URLSession:didCreateTask:"); void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_fnPtrTrampoline( @@ -63114,7 +61745,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask { retain: false, release: true), NSURLSessionTask.castFromPointer(arg2, retain: false, release: true))); - final wrapper = _wrapListenerBlock_tm2na8(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_ao4xm9(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function(ffi.Pointer, NSURLSession, @@ -63263,7 +61894,7 @@ abstract final class ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSU ? null : NSURLRequest.castFromPointer(arg1, retain: false, release: true))); - final wrapper = _wrapListenerBlock_wnmjgj(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_mn1xu3(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock(wrapper, retain: false, release: true); @@ -63285,30 +61916,6 @@ extension ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest_C ref.pointer, arg0.value, arg1?.ref.pointer ?? ffi.nullptr); } -/// Disposition options for various delegate messages -enum NSURLSessionDelayedRequestDisposition { - /// Use the original request provided when the task was created; the request parameter is ignored. - NSURLSessionDelayedRequestContinueLoading(0), - - /// Use the specified request, which may not be nil. - NSURLSessionDelayedRequestUseNewRequest(1), - - /// Cancel the task; the request parameter is ignored. - NSURLSessionDelayedRequestCancel(2); - - final int value; - const NSURLSessionDelayedRequestDisposition(this.value); - - static NSURLSessionDelayedRequestDisposition fromValue(int value) => - switch (value) { - 0 => NSURLSessionDelayedRequestContinueLoading, - 1 => NSURLSessionDelayedRequestUseNewRequest, - 2 => NSURLSessionDelayedRequestCancel, - _ => throw ArgumentError( - "Unknown value for NSURLSessionDelayedRequestDisposition: $value"), - }; -} - late final _sel_URLSession_task_willBeginDelayedRequest_completionHandler_ = objc.registerName( "URLSession:task:willBeginDelayedRequest:completionHandler:"); @@ -63517,7 +62124,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSU retain: false, release: true), ObjCBlock_ffiVoid_NSURLSessionDelayedRequestDisposition_NSURLRequest .castFromPointer(arg4, retain: false, release: true))); - final wrapper = _wrapListenerBlock_1nnj9ov(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1f43wec(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function( @@ -63575,6 +62182,39 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_f late final _sel_URLSession_taskIsWaitingForConnectivity_ = objc.registerName("URLSession:taskIsWaitingForConnectivity:"); +late final _class_NSHTTPURLResponse = objc.getClass("NSHTTPURLResponse"); +late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_ = + objc.registerName("initWithURL:statusCode:HTTPVersion:headerFields:"); +final _objc_msgSend_1pmy6mh = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Long, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_statusCode = objc.registerName("statusCode"); +late final _sel_allHeaderFields = objc.registerName("allHeaderFields"); +late final _sel_localizedStringForStatusCode_ = + objc.registerName("localizedStringForStatusCode:"); +final _objc_msgSend_8o14b = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); /// NSHTTPURLResponse class NSHTTPURLResponse extends NSURLResponse { @@ -63593,7 +62233,7 @@ class NSHTTPURLResponse extends NSURLResponse { /// Returns whether [obj] is an instance of [NSHTTPURLResponse]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( + return _objc_msgSend_69e0x1( obj.ref.pointer, _sel_isKindOfClass_, _class_NSHTTPURLResponse); } @@ -63611,7 +62251,7 @@ class NSHTTPURLResponse extends NSURLResponse { DartNSInteger statusCode, objc.NSString? HTTPVersion, objc.NSDictionary? headerFields) { - final _ret = _objc_msgSend_1j5aquk( + final _ret = _objc_msgSend_1pmy6mh( this.ref.retainAndReturnPointer(), _sel_initWithURL_statusCode_HTTPVersion_headerFields_, url.ref.pointer, @@ -63627,7 +62267,7 @@ class NSHTTPURLResponse extends NSURLResponse { /// @abstract Returns the HTTP status code of the receiver. /// @result The HTTP status code of the receiver. DartNSInteger get statusCode { - return _objc_msgSend_z1fx1b(this.ref.pointer, _sel_statusCode); + return _objc_msgSend_1hz7y9r(this.ref.pointer, _sel_statusCode); } /// ! @@ -63640,7 +62280,7 @@ class NSHTTPURLResponse extends NSURLResponse { /// @result A dictionary containing all the HTTP header fields of the /// receiver. objc.NSDictionary get allHeaderFields { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_allHeaderFields); + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_allHeaderFields); return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } @@ -63654,7 +62294,7 @@ class NSHTTPURLResponse extends NSURLResponse { /// @result the value associated with the given header field, or nil if /// there is no value associated with the given header field. objc.NSString? valueForHTTPHeaderField_(objc.NSString field) { - final _ret = _objc_msgSend_juohf7( + final _ret = _objc_msgSend_62nh5j( this.ref.pointer, _sel_valueForHTTPHeaderField_, field.ref.pointer); return _ret.address == 0 ? null @@ -63668,7 +62308,7 @@ class NSHTTPURLResponse extends NSURLResponse { /// @param statusCode the status code to use to produce a localized string. /// @result A localized string corresponding to the given status code. static objc.NSString localizedStringForStatusCode_(DartNSInteger statusCode) { - final _ret = _objc_msgSend_crtxa9(_class_NSHTTPURLResponse, + final _ret = _objc_msgSend_8o14b(_class_NSHTTPURLResponse, _sel_localizedStringForStatusCode_, statusCode); return objc.NSString.castFromPointer(_ret, retain: true, release: true); } @@ -63688,7 +62328,7 @@ class NSHTTPURLResponse extends NSURLResponse { objc.NSString? MIMEType, DartNSInteger length, objc.NSString? name) { - final _ret = _objc_msgSend_eyseqq( + final _ret = _objc_msgSend_13tl325( this.ref.retainAndReturnPointer(), _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, URL.ref.pointer, @@ -63702,21 +62342,21 @@ class NSHTTPURLResponse extends NSURLResponse { /// init NSHTTPURLResponse init() { final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); return NSHTTPURLResponse.castFromPointer(_ret, retain: false, release: true); } /// new static NSHTTPURLResponse new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPURLResponse, _sel_new); + final _ret = _objc_msgSend_1x359cv(_class_NSHTTPURLResponse, _sel_new); return NSHTTPURLResponse.castFromPointer(_ret, retain: false, release: true); } /// allocWithZone: static NSHTTPURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( + final _ret = _objc_msgSend_hzlb60( _class_NSHTTPURLResponse, _sel_allocWithZone_, zone); return NSHTTPURLResponse.castFromPointer(_ret, retain: false, release: true); @@ -63724,20 +62364,38 @@ class NSHTTPURLResponse extends NSURLResponse { /// alloc static NSHTTPURLResponse alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSHTTPURLResponse, _sel_alloc); + final _ret = _objc_msgSend_1x359cv(_class_NSHTTPURLResponse, _sel_alloc); return NSHTTPURLResponse.castFromPointer(_ret, retain: false, release: true); } + /// self + NSHTTPURLResponse self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSHTTPURLResponse.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSHTTPURLResponse retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSHTTPURLResponse.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSHTTPURLResponse autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSHTTPURLResponse.castFromPointer(_ret, retain: true, release: true); + } + /// supportsSecureCoding - static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1( + static bool getSupportsSecureCoding() { + return _objc_msgSend_91o635( _class_NSHTTPURLResponse, _sel_supportsSecureCoding); } /// initWithCoder: NSHTTPURLResponse? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), _sel_initWithCoder_, coder.ref.pointer); return _ret.address == 0 ? null @@ -63745,39 +62403,6 @@ class NSHTTPURLResponse extends NSURLResponse { } } -late final _class_NSHTTPURLResponse = objc.getClass("NSHTTPURLResponse"); -late final _sel_initWithURL_statusCode_HTTPVersion_headerFields_ = - objc.registerName("initWithURL:statusCode:HTTPVersion:headerFields:"); -final _objc_msgSend_1j5aquk = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_statusCode = objc.registerName("statusCode"); -late final _sel_allHeaderFields = objc.registerName("allHeaderFields"); -late final _sel_localizedStringForStatusCode_ = - objc.registerName("localizedStringForStatusCode:"); -final _objc_msgSend_crtxa9 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSInteger)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); void _ObjCBlock_ffiVoid_NSURLRequest_fnPtrTrampoline( ffi.Pointer block, ffi.Pointer arg0) => @@ -63879,7 +62504,7 @@ abstract final class ObjCBlock_ffiVoid_NSURLRequest { ? null : NSURLRequest.castFromPointer(arg0, retain: false, release: true))); - final wrapper = _wrapListenerBlock_ukcdfq(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1jdvcbf(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock(wrapper, retain: false, release: true); @@ -64129,7 +62754,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSH retain: false, release: true), ObjCBlock_ffiVoid_NSURLRequest.castFromPointer(arg5, retain: false, release: true))); - final wrapper = _wrapListenerBlock_dmve6(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_13vswqm(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function( @@ -64189,6 +62814,191 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLRespo arg5.ref.pointer); } +/// WARNING: NSURLAuthenticationChallenge is a stub. To generate bindings for this class, include +/// NSURLAuthenticationChallenge in your config's objc-interfaces list. +/// +/// NSURLAuthenticationChallenge +class NSURLAuthenticationChallenge extends objc.ObjCObjectBase { + NSURLAuthenticationChallenge._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSURLAuthenticationChallenge] that points to the same underlying object as [other]. + NSURLAuthenticationChallenge.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLAuthenticationChallenge] that wraps the given raw object pointer. + NSURLAuthenticationChallenge.castFromPointer( + ffi.Pointer other, + {bool retain = false, + bool release = false}) + : this._(other, retain: retain, release: release); +} + +/// WARNING: NSURLCredential is a stub. To generate bindings for this class, include +/// NSURLCredential in your config's objc-interfaces list. +/// +/// NSURLCredential +class NSURLCredential extends objc.ObjCObjectBase { + NSURLCredential._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSURLCredential] that points to the same underlying object as [other]. + NSURLCredential.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSURLCredential] that wraps the given raw object pointer. + NSURLCredential.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); +} + +void + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_fnPtrTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(NSInteger arg0, + ffi.Pointer arg1)>>() + .asFunction)>()( + arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, NSInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_closureTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + int, ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, NSInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_listenerTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + int, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, NSInteger, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_listenerCallable = + ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, NSInteger, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock( + pointer, + retain: retain, + release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> fromFunctionPointer( + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock + fromFunction(void Function(NSURLSessionAuthChallengeDisposition, NSURLCredential?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_closureCallable, + (int arg0, ffi.Pointer arg1) => fn( + NSURLSessionAuthChallengeDisposition.fromValue(arg0), + arg1.address == 0 + ? null + : NSURLCredential.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock + listener( + void Function(NSURLSessionAuthChallengeDisposition, NSURLCredential?) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_listenerCallable + .nativeFunction + .cast(), + (int arg0, ffi.Pointer arg1) => fn( + NSURLSessionAuthChallengeDisposition.fromValue(arg0), + arg1.address == 0 + ? null + : NSURLCredential.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_37btrl(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential_CallExtension + on objc.ObjCBlock { + void call(NSURLSessionAuthChallengeDisposition arg0, NSURLCredential? arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + NSInteger arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()( + ref.pointer, arg0.value, arg1?.ref.pointer ?? ffi.nullptr); +} + late final _sel_URLSession_task_didReceiveChallenge_completionHandler_ = objc.registerName("URLSession:task:didReceiveChallenge:completionHandler:"); void @@ -64396,7 +63206,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSU retain: false, release: true), ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential .castFromPointer(arg4, retain: false, release: true))); - final wrapper = _wrapListenerBlock_1nnj9ov(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1f43wec(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function( @@ -64548,7 +63358,7 @@ abstract final class ObjCBlock_ffiVoid_NSInputStream { ? null : objc.NSInputStream.castFromPointer(arg0, retain: false, release: true))); - final wrapper = _wrapListenerBlock_ukcdfq(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1jdvcbf(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock(wrapper, retain: false, release: true); @@ -64748,7 +63558,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffi retain: false, release: true), ObjCBlock_ffiVoid_NSInputStream.castFromPointer(arg3, retain: false, release: true))); - final wrapper = _wrapListenerBlock_1wmulza(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_12nszru(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function( @@ -64990,7 +63800,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int arg3, ObjCBlock_ffiVoid_NSInputStream.castFromPointer(arg4, retain: false, release: true))); - final wrapper = _wrapListenerBlock_qxeqyf(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_qm01og(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function( @@ -65250,7 +64060,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int arg3, arg4, arg5)); - final wrapper = _wrapListenerBlock_jzggzf(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1uuez7b(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function( @@ -65465,7 +64275,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSH retain: false, release: true), NSHTTPURLResponse.castFromPointer(arg3, retain: false, release: true))); - final wrapper = _wrapListenerBlock_1a6kixf(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1r3kn8f(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, @@ -65499,6 +64309,9 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLRespo arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); } +/// WARNING: NSURLSessionTaskMetrics is a stub. To generate bindings for this class, include +/// NSURLSessionTaskMetrics in your config's objc-interfaces list. +/// /// NSURLSessionTaskMetrics class NSURLSessionTaskMetrics extends objc.NSObject { NSURLSessionTaskMetrics._(ffi.Pointer pointer, @@ -65513,95 +64326,8 @@ class NSURLSessionTaskMetrics extends objc.NSObject { NSURLSessionTaskMetrics.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSURLSessionTaskMetrics]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSURLSessionTaskMetrics); - } - - /// transactionMetrics array contains the metrics collected for every request/response transaction created during the task execution. - objc.ObjCObjectBase get transactionMetrics { - final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_transactionMetrics); - return objc.ObjCObjectBase(_ret, retain: true, release: true); - } - - /// Interval from the task creation time to the task completion time. - /// Task creation time is the time when the task was instantiated. - /// Task completion time is the time when the task is about to change its internal state to completed. - NSDateInterval get taskInterval { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_taskInterval); - return NSDateInterval.castFromPointer(_ret, retain: true, release: true); - } - - /// redirectCount is the number of redirects that were recorded. - DartNSUInteger get redirectCount { - return _objc_msgSend_eldhrq(this.ref.pointer, _sel_redirectCount); - } - - /// init - NSURLSessionTaskMetrics init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSURLSessionTaskMetrics.castFromPointer(_ret, - retain: false, release: true); - } - - /// new - static NSURLSessionTaskMetrics new1() { - final _ret = - _objc_msgSend_1unuoxw(_class_NSURLSessionTaskMetrics, _sel_new); - return NSURLSessionTaskMetrics.castFromPointer(_ret, - retain: false, release: true); - } - - /// allocWithZone: - static NSURLSessionTaskMetrics allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_1b3ihd0( - _class_NSURLSessionTaskMetrics, _sel_allocWithZone_, zone); - return NSURLSessionTaskMetrics.castFromPointer(_ret, - retain: false, release: true); - } - - /// alloc - static NSURLSessionTaskMetrics alloc() { - final _ret = - _objc_msgSend_1unuoxw(_class_NSURLSessionTaskMetrics, _sel_alloc); - return NSURLSessionTaskMetrics.castFromPointer(_ret, - retain: false, release: true); - } -} - -late final _class_NSURLSessionTaskMetrics = - objc.getClass("NSURLSessionTaskMetrics"); -late final _sel_transactionMetrics = objc.registerName("transactionMetrics"); - -/// NSDateInterval -class NSDateInterval extends objc.ObjCObjectBase { - NSDateInterval._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super(pointer, retain: retain, release: release); - - /// Constructs a [NSDateInterval] that points to the same underlying object as [other]. - NSDateInterval.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); - - /// Constructs a [NSDateInterval] that wraps the given raw object pointer. - NSDateInterval.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); - - /// Returns whether [obj] is an instance of [NSDateInterval]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSDateInterval); - } } -late final _class_NSDateInterval = objc.getClass("NSDateInterval"); -late final _sel_taskInterval = objc.registerName("taskInterval"); -late final _sel_redirectCount = objc.registerName("redirectCount"); late final _sel_URLSession_task_didFinishCollectingMetrics_ = objc.registerName("URLSession:task:didFinishCollectingMetrics:"); void @@ -65773,7 +64499,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSU retain: false, release: true), NSURLSessionTaskMetrics.castFromPointer(arg3, retain: false, release: true))); - final wrapper = _wrapListenerBlock_1a6kixf(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1r3kn8f(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, @@ -65982,7 +64708,7 @@ abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSE ? null : objc.NSError.castFromPointer(arg3, retain: false, release: true))); - final wrapper = _wrapListenerBlock_1a6kixf(raw); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1r3kn8f(raw); objc.objectRelease(raw.cast()); return objc.ObjCBlock< ffi.Void Function(ffi.Pointer, NSURLSession, NSURLSessionTask, @@ -66016,13406 +64742,21712 @@ extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError_CallEx arg1.ref.pointer, arg2.ref.pointer, arg3?.ref.pointer ?? ffi.nullptr); } -/// Messages related to the operation of a task that delivers data -/// directly to the delegate. -abstract final class NSURLSessionDataDelegate { - /// Builds an object that implements the NSURLSessionDataDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)? - URLSession_dataTask_didReceiveResponse_completionHandler_, - void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)? - URLSession_dataTask_didBecomeDownloadTask_, - void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)? - URLSession_dataTask_didBecomeStreamTask_, - void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)? - URLSession_dataTask_didReceiveData_, - void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, - objc.ObjCBlock)? - URLSession_dataTask_willCacheResponse_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_task_didReceiveChallenge_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLSessionDataDelegate - .URLSession_dataTask_didReceiveResponse_completionHandler_ - .implement( - builder, URLSession_dataTask_didReceiveResponse_completionHandler_); - NSURLSessionDataDelegate.URLSession_dataTask_didBecomeDownloadTask_ - .implement(builder, URLSession_dataTask_didBecomeDownloadTask_); - NSURLSessionDataDelegate.URLSession_dataTask_didBecomeStreamTask_.implement( - builder, URLSession_dataTask_didBecomeStreamTask_); - NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_.implement( - builder, URLSession_dataTask_didReceiveData_); - NSURLSessionDataDelegate - .URLSession_dataTask_willCacheResponse_completionHandler_ - .implement( - builder, URLSession_dataTask_willCacheResponse_completionHandler_); - NSURLSessionDataDelegate.URLSession_didCreateTask_.implement( - builder, URLSession_didCreateTask_); - NSURLSessionDataDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implement(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionDataDelegate.URLSession_taskIsWaitingForConnectivity_.implement( - builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionDataDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implement(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionDataDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implement( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionDataDelegate.URLSession_task_needNewBodyStream_.implement( - builder, URLSession_task_needNewBodyStream_); - NSURLSessionDataDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implement(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionDataDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implement(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionDataDelegate.URLSession_task_didReceiveInformationalResponse_ - .implement(builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionDataDelegate.URLSession_task_didFinishCollectingMetrics_ - .implement(builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_.implement( - builder, URLSession_task_didCompleteWithError_); - NSURLSessionDataDelegate.URLSession_didBecomeInvalidWithError_.implement( - builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionDataDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implement(builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionDataDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); - return builder.build(); - } +late final _sel_URLSession_didBecomeInvalidWithError_ = + objc.registerName("URLSession:didBecomeInvalidWithError:"); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} - /// Adds the implementation of the NSURLSessionDataDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)? - URLSession_dataTask_didReceiveResponse_completionHandler_, - void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)? - URLSession_dataTask_didBecomeDownloadTask_, - void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)? - URLSession_dataTask_didBecomeStreamTask_, - void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)? - URLSession_dataTask_didReceiveData_, - void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, - objc.ObjCBlock)? - URLSession_dataTask_willCacheResponse_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_task_didReceiveChallenge_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - NSURLSessionDataDelegate - .URLSession_dataTask_didReceiveResponse_completionHandler_ - .implement( - builder, URLSession_dataTask_didReceiveResponse_completionHandler_); - NSURLSessionDataDelegate.URLSession_dataTask_didBecomeDownloadTask_ - .implement(builder, URLSession_dataTask_didBecomeDownloadTask_); - NSURLSessionDataDelegate.URLSession_dataTask_didBecomeStreamTask_.implement( - builder, URLSession_dataTask_didBecomeStreamTask_); - NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_.implement( - builder, URLSession_dataTask_didReceiveData_); - NSURLSessionDataDelegate - .URLSession_dataTask_willCacheResponse_completionHandler_ - .implement( - builder, URLSession_dataTask_willCacheResponse_completionHandler_); - NSURLSessionDataDelegate.URLSession_didCreateTask_.implement( - builder, URLSession_didCreateTask_); - NSURLSessionDataDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implement(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionDataDelegate.URLSession_taskIsWaitingForConnectivity_.implement( - builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionDataDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implement(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionDataDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implement( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionDataDelegate.URLSession_task_needNewBodyStream_.implement( - builder, URLSession_task_needNewBodyStream_); - NSURLSessionDataDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implement(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionDataDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implement(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionDataDelegate.URLSession_task_didReceiveInformationalResponse_ - .implement(builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionDataDelegate.URLSession_task_didFinishCollectingMetrics_ - .implement(builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_.implement( - builder, URLSession_task_didCompleteWithError_); - NSURLSessionDataDelegate.URLSession_didBecomeInvalidWithError_.implement( - builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionDataDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implement(builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionDataDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); - } +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_listenerTrampoline) + ..keepIsolateAlive = false; - /// Builds an object that implements the NSURLSessionDataDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - static objc.ObjCObjectBase implementAsListener( - {void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)? - URLSession_dataTask_didReceiveResponse_completionHandler_, - void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)? - URLSession_dataTask_didBecomeDownloadTask_, - void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)? - URLSession_dataTask_didBecomeStreamTask_, - void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)? - URLSession_dataTask_didReceiveData_, - void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, - objc.ObjCBlock)? - URLSession_dataTask_willCacheResponse_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_task_didReceiveChallenge_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLSessionDataDelegate - .URLSession_dataTask_didReceiveResponse_completionHandler_ - .implementAsListener( - builder, URLSession_dataTask_didReceiveResponse_completionHandler_); - NSURLSessionDataDelegate.URLSession_dataTask_didBecomeDownloadTask_ - .implementAsListener( - builder, URLSession_dataTask_didBecomeDownloadTask_); - NSURLSessionDataDelegate.URLSession_dataTask_didBecomeStreamTask_ - .implementAsListener(builder, URLSession_dataTask_didBecomeStreamTask_); - NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_ - .implementAsListener(builder, URLSession_dataTask_didReceiveData_); - NSURLSessionDataDelegate - .URLSession_dataTask_willCacheResponse_completionHandler_ - .implementAsListener( - builder, URLSession_dataTask_willCacheResponse_completionHandler_); - NSURLSessionDataDelegate.URLSession_didCreateTask_.implementAsListener( - builder, URLSession_didCreateTask_); - NSURLSessionDataDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionDataDelegate.URLSession_taskIsWaitingForConnectivity_ - .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionDataDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionDataDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionDataDelegate.URLSession_task_needNewBodyStream_ - .implementAsListener(builder, URLSession_task_needNewBodyStream_); - NSURLSessionDataDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implementAsListener(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionDataDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implementAsListener(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionDataDelegate.URLSession_task_didReceiveInformationalResponse_ - .implementAsListener( - builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionDataDelegate.URLSession_task_didFinishCollectingMetrics_ - .implementAsListener( - builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_ - .implementAsListener(builder, URLSession_task_didCompleteWithError_); - NSURLSessionDataDelegate.URLSession_didBecomeInvalidWithError_ - .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionDataDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionDataDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implementAsListener( - builder, URLSessionDidFinishEventsForBackgroundURLSession_); - return builder.build(); +/// Construction methods for `objc.ObjCBlock, NSURLSession, objc.NSError?)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, objc.NSError?)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + objc.NSError?)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, NSURLSession, objc.NSError?)> + fromFunctionPointer( + ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> + ptr) => + objc.ObjCBlock, NSURLSession, objc.NSError?)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, NSURLSession, objc.NSError?)> + fromFunction(void Function(ffi.Pointer, NSURLSession, objc.NSError?) fn) => + objc.ObjCBlock, NSURLSession, objc.NSError?)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, NSURLSession, objc.NSError?)> listener( + void Function(ffi.Pointer, NSURLSession, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + arg2.address == 0 + ? null + : objc.NSError.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_ao4xm9(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + objc.NSError?)>(wrapper, retain: false, release: true); } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, objc.NSError?)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, objc.NSError?)> { + void call( + ffi.Pointer arg0, NSURLSession arg1, objc.NSError? arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_URLSession_didReceiveChallenge_completionHandler_ = + objc.registerName("URLSession:didReceiveChallenge:completionHandler:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock) fn) => + objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLAuthenticationChallenge.castFromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)>)> listener( + void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLAuthenticationChallenge.castFromPointer(arg2, + retain: false, release: true), + ObjCBlock_ffiVoid_NSURLSessionAuthChallengeDisposition_NSURLCredential + .castFromPointer(arg3, retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_12nszru(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)>)>(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLAuthenticationChallenge, + objc.ObjCBlock)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock + arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); +} + +late final _sel_URLSessionDidFinishEventsForBackgroundURLSession_ = + objc.registerName("URLSessionDidFinishEventsForBackgroundURLSession:"); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_listenerCallable = ffi + .NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock, NSURLSession)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + NSURLSession)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, NSURLSession)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession)> + fromFunction(void Function(ffi.Pointer, NSURLSession) fn) => + objc.ObjCBlock, NSURLSession)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock, NSURLSession)> + listener(void Function(ffi.Pointer, NSURLSession) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_wjovn7(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession)>(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_CallExtension + on objc.ObjCBlock, NSURLSession)> { + void call(ffi.Pointer arg0, NSURLSession arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer); +} + +/// Messages related to the operation of a task that delivers data +/// directly to the delegate. +abstract final class NSURLSessionDataDelegate { + /// Builds an object that implements the NSURLSessionDataDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)? + URLSession_dataTask_didReceiveResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)? + URLSession_dataTask_didBecomeDownloadTask_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)? + URLSession_dataTask_didBecomeStreamTask_, + void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)? + URLSession_dataTask_didReceiveData_, + void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock)? + URLSession_dataTask_willCacheResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionDataDelegate + .URLSession_dataTask_didReceiveResponse_completionHandler_ + .implement( + builder, URLSession_dataTask_didReceiveResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeDownloadTask_ + .implement(builder, URLSession_dataTask_didBecomeDownloadTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeStreamTask_.implement( + builder, URLSession_dataTask_didBecomeStreamTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_.implement( + builder, URLSession_dataTask_didReceiveData_); + NSURLSessionDataDelegate + .URLSession_dataTask_willCacheResponse_completionHandler_ + .implement( + builder, URLSession_dataTask_willCacheResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionDataDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDataDelegate.URLSession_taskIsWaitingForConnectivity_.implement( + builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDataDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionDataDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDataDelegate.URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDataDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_.implement( + builder, URLSession_task_didCompleteWithError_); + NSURLSessionDataDelegate.URLSession_didBecomeInvalidWithError_.implement( + builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDataDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionDataDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)? + URLSession_dataTask_didReceiveResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)? + URLSession_dataTask_didBecomeDownloadTask_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)? + URLSession_dataTask_didBecomeStreamTask_, + void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)? + URLSession_dataTask_didReceiveData_, + void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock)? + URLSession_dataTask_willCacheResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionDataDelegate + .URLSession_dataTask_didReceiveResponse_completionHandler_ + .implement( + builder, URLSession_dataTask_didReceiveResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeDownloadTask_ + .implement(builder, URLSession_dataTask_didBecomeDownloadTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeStreamTask_.implement( + builder, URLSession_dataTask_didBecomeStreamTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_.implement( + builder, URLSession_dataTask_didReceiveData_); + NSURLSessionDataDelegate + .URLSession_dataTask_willCacheResponse_completionHandler_ + .implement( + builder, URLSession_dataTask_willCacheResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionDataDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDataDelegate.URLSession_taskIsWaitingForConnectivity_.implement( + builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDataDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionDataDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDataDelegate.URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDataDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_.implement( + builder, URLSession_task_didCompleteWithError_); + NSURLSessionDataDelegate.URLSession_didBecomeInvalidWithError_.implement( + builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDataDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Builds an object that implements the NSURLSessionDataDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)? + URLSession_dataTask_didReceiveResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)? + URLSession_dataTask_didBecomeDownloadTask_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)? + URLSession_dataTask_didBecomeStreamTask_, + void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)? + URLSession_dataTask_didReceiveData_, + void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock)? + URLSession_dataTask_willCacheResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionDataDelegate + .URLSession_dataTask_didReceiveResponse_completionHandler_ + .implementAsListener( + builder, URLSession_dataTask_didReceiveResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeDownloadTask_ + .implementAsListener( + builder, URLSession_dataTask_didBecomeDownloadTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeStreamTask_ + .implementAsListener(builder, URLSession_dataTask_didBecomeStreamTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_ + .implementAsListener(builder, URLSession_dataTask_didReceiveData_); + NSURLSessionDataDelegate + .URLSession_dataTask_willCacheResponse_completionHandler_ + .implementAsListener( + builder, URLSession_dataTask_willCacheResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionDataDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDataDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDataDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionDataDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDataDelegate.URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDataDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionDataDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDataDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionDataDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)? + URLSession_dataTask_didReceiveResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)? + URLSession_dataTask_didBecomeDownloadTask_, + void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)? + URLSession_dataTask_didBecomeStreamTask_, + void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)? + URLSession_dataTask_didReceiveData_, + void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock)? + URLSession_dataTask_willCacheResponse_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionDataDelegate + .URLSession_dataTask_didReceiveResponse_completionHandler_ + .implementAsListener( + builder, URLSession_dataTask_didReceiveResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeDownloadTask_ + .implementAsListener( + builder, URLSession_dataTask_didBecomeDownloadTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didBecomeStreamTask_ + .implementAsListener(builder, URLSession_dataTask_didBecomeStreamTask_); + NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_ + .implementAsListener(builder, URLSession_dataTask_didReceiveData_); + NSURLSessionDataDelegate + .URLSession_dataTask_willCacheResponse_completionHandler_ + .implementAsListener( + builder, URLSession_dataTask_willCacheResponse_completionHandler_); + NSURLSessionDataDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionDataDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDataDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDataDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionDataDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDataDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDataDelegate.URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDataDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionDataDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDataDelegate.URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDataDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// The task has received a response and no further messages will be + /// received until the completion block is called. The disposition + /// allows you to cancel a request or to turn a data task into a + /// download task. This delegate message is optional - if you do not + /// implement it, you can get the response as a property of the task. + /// + /// This method will not be called for background upload tasks (which cannot be converted to download tasks). + static final URLSession_dataTask_didReceiveResponse_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, + objc.ObjCBlock)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_didReceiveResponse_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_didReceiveResponse_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionDataTask arg2, + NSURLResponse arg3, + objc.ObjCBlock arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionDataTask arg2, + NSURLResponse arg3, + objc.ObjCBlock arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Notification that a data task has become a download task. No + /// future messages will be sent to the data task. + static final URLSession_dataTask_didBecomeDownloadTask_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_didBecomeDownloadTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_didBecomeDownloadTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDataTask arg2, NSURLSessionDownloadTask arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDataTask arg2, NSURLSessionDownloadTask arg3) => + func(arg1, arg2, arg3)), + ); + + /// Notification that a data task has become a bidirectional stream + /// task. No future messages will be sent to the data task. The newly + /// created streamTask will carry the original request and response as + /// properties. + /// + /// For requests that were pipelined, the stream object will only allow + /// reading, and the object will immediately issue a + /// -URLSession:writeClosedForStream:. Pipelining can be disabled for + /// all requests in a session, or by the NSURLRequest + /// HTTPShouldUsePipelining property. + /// + /// The underlying connection is no longer considered part of the HTTP + /// connection cache and won't count against the total number of + /// connections per host. + static final URLSession_dataTask_didBecomeStreamTask_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_didBecomeStreamTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_didBecomeStreamTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDataTask arg2, NSURLSessionStreamTask arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDataTask arg2, NSURLSessionStreamTask arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent when data is available for the delegate to consume. As the + /// data may be discontiguous, you should use + /// [NSData enumerateByteRangesUsingBlock:] to access it. + static final URLSession_dataTask_didReceiveData_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_didReceiveData_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_didReceiveData_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDataTask, objc.NSData) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDataTask arg2, objc.NSData arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionDataTask, objc.NSData) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDataTask arg2, objc.NSData arg3) => + func(arg1, arg2, arg3)), + ); + + /// Invoke the completion routine with a valid NSCachedURLResponse to + /// allow the resulting data to be cached, or pass nil to prevent + /// caching. Note that there is no guarantee that caching will be + /// attempted for a given resource, and you should not rely on this + /// message to receive the resource data. + static final URLSession_dataTask_willCacheResponse_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_willCacheResponse_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_dataTask_willCacheResponse_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionDataTask arg2, + NSCachedURLResponse arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionDataTask arg2, + NSCachedURLResponse arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Notification that a task has been created. This method is the first message + /// a task sends, providing a place to configure the task before it is resumed. + /// + /// This delegate callback is *NOT* dispatched to the delegate queue. It is + /// invoked synchronously before the task creation method returns. + static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_didCreateTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_didCreateTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// Sent when the system is ready to begin work for a task with a delayed start + /// time set (using the earliestBeginDate property). The completionHandler must + /// be invoked in order for loading to proceed. The disposition provided to the + /// completion handler continues the load with the original request provided to + /// the task, replaces the request with the specified task, or cancels the task. + /// If this delegate is not implemented, loading will proceed with the original + /// request. + /// + /// Recommendation: only implement this delegate if tasks that have the + /// earliestBeginDate property set may become stale and require alteration prior + /// to starting the network load. + /// + /// If a new request is specified, the allowsExpensiveNetworkAccess, + /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties + /// from the new request will not be used; the properties from the + /// original request will continue to be used. + /// + /// Canceling the task is equivalent to calling the task's cancel method; the + /// URLSession:task:didCompleteWithError: task delegate will be called with error + /// NSURLErrorCancelled. + static final URLSession_task_willBeginDelayedRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent when a task cannot start the network loading process because the current + /// network connectivity is not available or sufficient for the task's request. + /// + /// This delegate will be called at most one time per task, and is only called if + /// the waitsForConnectivity property in the NSURLSessionConfiguration has been + /// set to YES. + /// + /// This delegate callback will never be called for background sessions, because + /// the waitForConnectivity property is ignored by those sessions. + static final URLSession_taskIsWaitingForConnectivity_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_taskIsWaitingForConnectivity_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_taskIsWaitingForConnectivity_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// An HTTP request is attempting to perform a redirection to a different + /// URL. You must invoke the completion routine to allow the + /// redirection, allow the redirection with a modified request, or + /// pass nil to the completionHandler to cause the body of the redirection + /// response to be delivered as the payload of this request. The default + /// is to follow redirections. + /// + /// For tasks in background sessions, redirections will always be followed and this method will not be called. + static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// The task has received a request specific authentication challenge. + /// If this delegate is not implemented, the session specific authentication challenge + /// will *NOT* be called and the behavior will be the same as using the default handling + /// disposition. + static final URLSession_task_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent if a task requires a new, unopened body stream. This may be + /// necessary when authentication has failed for any request that + /// involves a body stream. + static final URLSession_task_needNewBodyStream_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_needNewBodyStream_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_needNewBodyStream_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + ); + + /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be + /// necessary when resuming a failed upload task. + /// + /// - Parameter session: The session containing the task that needs a new body stream from the given offset. + /// - Parameter task: The task that needs a new body stream. + /// - Parameter offset: The starting offset required for the body stream. + /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. + static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent periodically to notify the delegate of upload progress. This + /// information is also available as properties of the task. + static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, int, int)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// Sent for each informational response received except 101 switching protocols. + static final URLSession_task_didReceiveInformationalResponse_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didReceiveInformationalResponse_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didReceiveInformationalResponse_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent when complete statistics information has been collected for the task. + static final URLSession_task_didFinishCollectingMetrics_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didFinishCollectingMetrics_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didFinishCollectingMetrics_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent as the last message related to a specific task. Error may be + /// nil, which implies that no error occurred and this task is complete. + static final URLSession_task_didCompleteWithError_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didCompleteWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_task_didCompleteWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + ); + + /// The last message a session receives. A session will only become + /// invalid because of a systemic error or when it has been + /// explicitly invalidated, in which case the error parameter will be nil. + static final URLSession_didBecomeInvalidWithError_ = objc + .ObjCProtocolListenableMethod( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_didBecomeInvalidWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_didBecomeInvalidWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + ); + + /// If implemented, when a connection level authentication challenge + /// has occurred, this delegate will be given the opportunity to + /// provide authentication credentials to the underlying + /// connection. Some types of authentication will apply to more than + /// one request on a given connection to a server (SSL Server Trust + /// challenges). If this delegate message is not implemented, the + /// behavior will be to use the default handling, which may involve user + /// interaction. + static final URLSession_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSession_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + ); + + /// If an application has received an + /// -application:handleEventsForBackgroundURLSession:completionHandler: + /// message, the session delegate will receive this message to indicate + /// that all messages previously enqueued for this session have been + /// delivered. At this time it is safe to invoke the previously stored + /// completion handler, or to begin any internal updates that will + /// result in invoking the completion handler. + static final URLSessionDidFinishEventsForBackgroundURLSession_ = + objc.ObjCProtocolListenableMethod( + _protocol_NSURLSessionDataDelegate, + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDataDelegate, + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + ); +} + +late final _protocol_NSURLSessionDownloadDelegate = + objc.getProtocol("NSURLSessionDownloadDelegate"); +late final _sel_URLSession_downloadTask_didFinishDownloadingToURL_ = + objc.registerName("URLSession:downloadTask:didFinishDownloadingToURL:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + objc.NSURL)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDownloadTask, objc.NSURL) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, retain: true, release: true), + objc.NSURL.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)> listener( + void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, + retain: false, release: true), + objc.NSURL + .castFromPointer(arg3, retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1r3kn8f(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + objc.NSURL)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionDownloadTask arg2, objc.NSURL arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); +} + +late final _sel_URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ = + objc.registerName( + "URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Int64 arg3, + ffi.Int64 arg4, + ffi.Int64 arg5)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int)>()(arg0, arg1, arg2, arg3, arg4, arg5); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int))(arg0, arg1, arg2, arg3, arg4, arg5); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int))(arg0, arg1, arg2, arg3, arg4, arg5); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64, + ffi.Int64)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64 { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + ffi.Int64, + ffi.Int64, + ffi.Int64)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + ffi.Int64, + ffi.Int64, + ffi.Int64)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Int64 arg3, ffi.Int64 arg4, ffi.Int64 arg5)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDownloadTask, int, int, int) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, retain: true, release: true), + arg3, + arg4, + arg5)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)> listener( + void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, int, int, int) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4, + int arg5) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, + retain: false, release: true), + arg3, + arg4, + arg5)); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1uuez7b(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + ffi.Int64, + ffi.Int64, + ffi.Int64)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionDownloadTask arg2, int arg3, int arg4, int arg5) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Int64 arg3, + ffi.Int64 arg4, + ffi.Int64 arg5)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + int)>()(ref.pointer, arg0, arg1.ref.pointer, + arg2.ref.pointer, arg3, arg4, arg5); +} + +late final _sel_URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ = + objc.registerName( + "URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Int64 arg3, + ffi.Int64 arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int)>()(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + int arg4) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int))(arg0, arg1, arg2, arg3, arg4); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int64, + ffi.Int64)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64 { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + ffi.Int64, + ffi.Int64)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Int64 arg3, ffi.Int64 arg4)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> + fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDownloadTask, int, int) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, int arg3, int arg4) => fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, retain: true, release: true), + arg3, + arg4)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> listener( + void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, int, int) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, ffi.Pointer arg1, + ffi.Pointer arg2, int arg3, int arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, + retain: false, release: true), + arg3, + arg4)); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_9qxjkl(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionDownloadTask, + ffi.Int64, + ffi.Int64)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionDownloadTask arg2, int arg3, int arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Int64 arg3, + ffi.Int64 arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int)>()( + ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3, arg4); +} + +/// Messages related to the operation of a task that writes data to a +/// file and notifies the delegate upon completion. +abstract final class NSURLSessionDownloadDelegate { + /// Builds an object that implements the NSURLSessionDownloadDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {required void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) + URLSession_downloadTask_didFinishDownloadingToURL_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)? + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int)? + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didFinishDownloadingToURL_ + .implement(builder, URLSession_downloadTask_didFinishDownloadingToURL_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ + .implement(builder, + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ + .implement(builder, + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_); + NSURLSessionDownloadDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionDownloadDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_taskIsWaitingForConnectivity_ + .implement(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDownloadDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionDownloadDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDownloadDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDownloadDelegate.URLSession_task_didCompleteWithError_ + .implement(builder, URLSession_task_didCompleteWithError_); + NSURLSessionDownloadDelegate.URLSession_didBecomeInvalidWithError_ + .implement(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDownloadDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionDownloadDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {required void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) + URLSession_downloadTask_didFinishDownloadingToURL_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)? + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int)? + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didFinishDownloadingToURL_ + .implement(builder, URLSession_downloadTask_didFinishDownloadingToURL_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ + .implement(builder, + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ + .implement(builder, + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_); + NSURLSessionDownloadDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionDownloadDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_taskIsWaitingForConnectivity_ + .implement(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDownloadDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionDownloadDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDownloadDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDownloadDelegate.URLSession_task_didCompleteWithError_ + .implement(builder, URLSession_task_didCompleteWithError_); + NSURLSessionDownloadDelegate.URLSession_didBecomeInvalidWithError_ + .implement(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDownloadDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Builds an object that implements the NSURLSessionDownloadDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {required void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) + URLSession_downloadTask_didFinishDownloadingToURL_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)? + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int)? + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didFinishDownloadingToURL_ + .implementAsListener( + builder, URLSession_downloadTask_didFinishDownloadingToURL_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ + .implementAsListener(builder, + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ + .implementAsListener(builder, + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_); + NSURLSessionDownloadDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionDownloadDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDownloadDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionDownloadDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDownloadDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDownloadDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionDownloadDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDownloadDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionDownloadDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {required void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) + URLSession_downloadTask_didFinishDownloadingToURL_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)? + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, + void Function(NSURLSession, NSURLSessionDownloadTask, int, int)? + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didFinishDownloadingToURL_ + .implementAsListener( + builder, URLSession_downloadTask_didFinishDownloadingToURL_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ + .implementAsListener(builder, + URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_); + NSURLSessionDownloadDelegate + .URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ + .implementAsListener(builder, + URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_); + NSURLSessionDownloadDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionDownloadDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionDownloadDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionDownloadDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionDownloadDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionDownloadDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionDownloadDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionDownloadDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionDownloadDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionDownloadDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionDownloadDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Sent when a download task that has completed a download. The delegate should + /// copy or move the file at the given location to a new location as it will be + /// removed when the delegate message returns. URLSession:task:didCompleteWithError: will + /// still be called. + static final URLSession_downloadTask_didFinishDownloadingToURL_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_downloadTask_didFinishDownloadingToURL_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_downloadTask_didFinishDownloadingToURL_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDownloadTask arg2, objc.NSURL arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDownloadTask arg2, objc.NSURL arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent periodically to notify the delegate of download progress. + static final URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64 + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionDownloadTask arg2, + int arg3, + int arg4, + int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64 + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionDownloadTask arg2, + int arg3, + int arg4, + int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// Sent when a download has been resumed. If a download failed with an + /// error, the -userInfo dictionary of the error will contain an + /// NSURLSessionDownloadTaskResumeData key, whose value is the resume + /// data. + static final URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionDownloadTask, int, int)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionDownloadTask, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64 + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDownloadTask arg2, int arg3, int arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionDownloadTask, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64 + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionDownloadTask arg2, int arg3, int arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Notification that a task has been created. This method is the first message + /// a task sends, providing a place to configure the task before it is resumed. + /// + /// This delegate callback is *NOT* dispatched to the delegate queue. It is + /// invoked synchronously before the task creation method returns. + static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_didCreateTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_didCreateTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// Sent when the system is ready to begin work for a task with a delayed start + /// time set (using the earliestBeginDate property). The completionHandler must + /// be invoked in order for loading to proceed. The disposition provided to the + /// completion handler continues the load with the original request provided to + /// the task, replaces the request with the specified task, or cancels the task. + /// If this delegate is not implemented, loading will proceed with the original + /// request. + /// + /// Recommendation: only implement this delegate if tasks that have the + /// earliestBeginDate property set may become stale and require alteration prior + /// to starting the network load. + /// + /// If a new request is specified, the allowsExpensiveNetworkAccess, + /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties + /// from the new request will not be used; the properties from the + /// original request will continue to be used. + /// + /// Canceling the task is equivalent to calling the task's cancel method; the + /// URLSession:task:didCompleteWithError: task delegate will be called with error + /// NSURLErrorCancelled. + static final URLSession_task_willBeginDelayedRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent when a task cannot start the network loading process because the current + /// network connectivity is not available or sufficient for the task's request. + /// + /// This delegate will be called at most one time per task, and is only called if + /// the waitsForConnectivity property in the NSURLSessionConfiguration has been + /// set to YES. + /// + /// This delegate callback will never be called for background sessions, because + /// the waitForConnectivity property is ignored by those sessions. + static final URLSession_taskIsWaitingForConnectivity_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_taskIsWaitingForConnectivity_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_taskIsWaitingForConnectivity_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// An HTTP request is attempting to perform a redirection to a different + /// URL. You must invoke the completion routine to allow the + /// redirection, allow the redirection with a modified request, or + /// pass nil to the completionHandler to cause the body of the redirection + /// response to be delivered as the payload of this request. The default + /// is to follow redirections. + /// + /// For tasks in background sessions, redirections will always be followed and this method will not be called. + static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// The task has received a request specific authentication challenge. + /// If this delegate is not implemented, the session specific authentication challenge + /// will *NOT* be called and the behavior will be the same as using the default handling + /// disposition. + static final URLSession_task_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent if a task requires a new, unopened body stream. This may be + /// necessary when authentication has failed for any request that + /// involves a body stream. + static final URLSession_task_needNewBodyStream_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_needNewBodyStream_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_needNewBodyStream_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + ); + + /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be + /// necessary when resuming a failed upload task. + /// + /// - Parameter session: The session containing the task that needs a new body stream from the given offset. + /// - Parameter task: The task that needs a new body stream. + /// - Parameter offset: The starting offset required for the body stream. + /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. + static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent periodically to notify the delegate of upload progress. This + /// information is also available as properties of the task. + static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, int, int)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// Sent for each informational response received except 101 switching protocols. + static final URLSession_task_didReceiveInformationalResponse_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didReceiveInformationalResponse_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didReceiveInformationalResponse_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent when complete statistics information has been collected for the task. + static final URLSession_task_didFinishCollectingMetrics_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didFinishCollectingMetrics_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didFinishCollectingMetrics_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent as the last message related to a specific task. Error may be + /// nil, which implies that no error occurred and this task is complete. + static final URLSession_task_didCompleteWithError_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didCompleteWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_task_didCompleteWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + ); + + /// The last message a session receives. A session will only become + /// invalid because of a systemic error or when it has been + /// explicitly invalidated, in which case the error parameter will be nil. + static final URLSession_didBecomeInvalidWithError_ = objc + .ObjCProtocolListenableMethod( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_didBecomeInvalidWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_didBecomeInvalidWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + ); + + /// If implemented, when a connection level authentication challenge + /// has occurred, this delegate will be given the opportunity to + /// provide authentication credentials to the underlying + /// connection. Some types of authentication will apply to more than + /// one request on a given connection to a server (SSL Server Trust + /// challenges). If this delegate message is not implemented, the + /// behavior will be to use the default handling, which may involve user + /// interaction. + static final URLSession_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSession_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + ); + + /// If an application has received an + /// -application:handleEventsForBackgroundURLSession:completionHandler: + /// message, the session delegate will receive this message to indicate + /// that all messages previously enqueued for this session have been + /// delivered. At this time it is safe to invoke the previously stored + /// completion handler, or to begin any internal updates that will + /// result in invoking the completion handler. + static final URLSessionDidFinishEventsForBackgroundURLSession_ = + objc.ObjCProtocolListenableMethod( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionDownloadDelegate, + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + ); +} + +late final _protocol_NSURLSessionWebSocketDelegate = + objc.getProtocol("NSURLSessionWebSocketDelegate"); +late final _sel_URLSession_webSocketTask_didOpenWithProtocol_ = + objc.registerName("URLSession:webSocketTask:didOpenWithProtocol:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, objc.NSString?)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionWebSocketTask, + objc.NSString?)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, objc.NSString?)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, objc.NSString?)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionWebSocketTask.castFromPointer(arg2, retain: true, release: true), + arg3.address == 0 ? null : objc.NSString.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, objc.NSString?)> listener( + void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, objc.NSString?) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionWebSocketTask.castFromPointer(arg2, + retain: false, release: true), + arg3.address == 0 + ? null + : objc.NSString.castFromPointer(arg3, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1r3kn8f(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionWebSocketTask, + objc.NSString?)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, objc.NSString?)> { + void call(ffi.Pointer arg0, NSURLSession arg1, + NSURLSessionWebSocketTask arg2, objc.NSString? arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0, + arg1.ref.pointer, arg2.ref.pointer, arg3?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_URLSession_webSocketTask_didCloseWithCode_reason_ = + objc.registerName("URLSession:webSocketTask:didCloseWithCode:reason:"); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + NSInteger arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()( + arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSInteger, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, NSInteger, objc.NSData?)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionWebSocketTask, + NSInteger, + objc.NSData?)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, NSInteger arg3, ffi.Pointer arg4)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, NSInteger, objc.NSData?)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?) fn) => + objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, NSInteger, objc.NSData?)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionWebSocketTask.castFromPointer(arg2, retain: true, release: true), + arg3, + arg4.address == 0 ? null : objc.NSData.castFromPointer(arg4, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> listener( + void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + int arg3, + ffi.Pointer arg4) => + fn( + arg0, + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionWebSocketTask.castFromPointer(arg2, + retain: false, release: true), + arg3, + arg4.address == 0 + ? null + : objc.NSData.castFromPointer(arg4, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_3lo3bb(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NSURLSession, + NSURLSessionWebSocketTask, + NSInteger, + objc.NSData?)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, NSInteger, objc.NSData?)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> { + void call( + ffi.Pointer arg0, + NSURLSession arg1, + NSURLSessionWebSocketTask arg2, + DartNSInteger arg3, + objc.NSData? arg4) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + NSInteger arg3, + ffi.Pointer arg4)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()( + ref.pointer, + arg0, + arg1.ref.pointer, + arg2.ref.pointer, + arg3, + arg4?.ref.pointer ?? ffi.nullptr); +} + +/// NSURLSessionWebSocketDelegate +abstract final class NSURLSessionWebSocketDelegate { + /// Builds an object that implements the NSURLSessionWebSocketDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. + static objc.ObjCObjectBase implement( + {void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)? + URLSession_webSocketTask_didOpenWithProtocol_, + void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?)? + URLSession_webSocketTask_didCloseWithCode_reason_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function( + NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionWebSocketDelegate.URLSession_webSocketTask_didOpenWithProtocol_ + .implement(builder, URLSession_webSocketTask_didOpenWithProtocol_); + NSURLSessionWebSocketDelegate + .URLSession_webSocketTask_didCloseWithCode_reason_ + .implement(builder, URLSession_webSocketTask_didCloseWithCode_reason_); + NSURLSessionWebSocketDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionWebSocketDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_taskIsWaitingForConnectivity_ + .implement(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionWebSocketDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionWebSocketDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionWebSocketDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionWebSocketDelegate.URLSession_task_didCompleteWithError_ + .implement(builder, URLSession_task_didCompleteWithError_); + NSURLSessionWebSocketDelegate.URLSession_didBecomeInvalidWithError_ + .implement(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionWebSocketDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionWebSocketDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. + static void addToBuilder(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)? + URLSession_webSocketTask_didOpenWithProtocol_, + void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?)? + URLSession_webSocketTask_didCloseWithCode_reason_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function( + NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionWebSocketDelegate.URLSession_webSocketTask_didOpenWithProtocol_ + .implement(builder, URLSession_webSocketTask_didOpenWithProtocol_); + NSURLSessionWebSocketDelegate + .URLSession_webSocketTask_didCloseWithCode_reason_ + .implement(builder, URLSession_webSocketTask_didCloseWithCode_reason_); + NSURLSessionWebSocketDelegate.URLSession_didCreateTask_.implement( + builder, URLSession_didCreateTask_); + NSURLSessionWebSocketDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implement(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_taskIsWaitingForConnectivity_ + .implement(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionWebSocketDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implement(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implement( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_task_needNewBodyStream_.implement( + builder, URLSession_task_needNewBodyStream_); + NSURLSessionWebSocketDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implement(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implement(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implement(builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionWebSocketDelegate.URLSession_task_didFinishCollectingMetrics_ + .implement(builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionWebSocketDelegate.URLSession_task_didCompleteWithError_ + .implement(builder, URLSession_task_didCompleteWithError_); + NSURLSessionWebSocketDelegate.URLSession_didBecomeInvalidWithError_ + .implement(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionWebSocketDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implement(builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Builds an object that implements the NSURLSessionWebSocketDelegate protocol. To implement + /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All + /// methods that can be implemented as listeners will be. + static objc.ObjCObjectBase implementAsListener( + {void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)? + URLSession_webSocketTask_didOpenWithProtocol_, + void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?)? + URLSession_webSocketTask_didCloseWithCode_reason_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function( + NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + final builder = objc.ObjCProtocolBuilder(); + NSURLSessionWebSocketDelegate.URLSession_webSocketTask_didOpenWithProtocol_ + .implementAsListener( + builder, URLSession_webSocketTask_didOpenWithProtocol_); + NSURLSessionWebSocketDelegate + .URLSession_webSocketTask_didCloseWithCode_reason_ + .implementAsListener( + builder, URLSession_webSocketTask_didCloseWithCode_reason_); + NSURLSessionWebSocketDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionWebSocketDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionWebSocketDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionWebSocketDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionWebSocketDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionWebSocketDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionWebSocketDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionWebSocketDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + return builder.build(); + } + + /// Adds the implementation of the NSURLSessionWebSocketDelegate protocol to an existing + /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will + /// be. + static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, + {void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)? + URLSession_webSocketTask_didOpenWithProtocol_, + void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?)? + URLSession_webSocketTask_didCloseWithCode_reason_, + void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)? + URLSession_task_willBeginDelayedRequest_completionHandler_, + void Function(NSURLSession, NSURLSessionTask)? + URLSession_taskIsWaitingForConnectivity_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)? + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)? + URLSession_task_didReceiveChallenge_completionHandler_, + void Function( + NSURLSession, NSURLSessionTask, objc.ObjCBlock)? + URLSession_task_needNewBodyStream_, + void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, + void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, + void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, + void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, + void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { + NSURLSessionWebSocketDelegate.URLSession_webSocketTask_didOpenWithProtocol_ + .implementAsListener( + builder, URLSession_webSocketTask_didOpenWithProtocol_); + NSURLSessionWebSocketDelegate + .URLSession_webSocketTask_didCloseWithCode_reason_ + .implementAsListener( + builder, URLSession_webSocketTask_didCloseWithCode_reason_); + NSURLSessionWebSocketDelegate.URLSession_didCreateTask_.implementAsListener( + builder, URLSession_didCreateTask_); + NSURLSessionWebSocketDelegate + .URLSession_task_willBeginDelayedRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willBeginDelayedRequest_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_taskIsWaitingForConnectivity_ + .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); + NSURLSessionWebSocketDelegate + .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ + .implementAsListener(builder, + URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_task_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate.URLSession_task_needNewBodyStream_ + .implementAsListener(builder, URLSession_task_needNewBodyStream_); + NSURLSessionWebSocketDelegate + .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ + .implementAsListener(builder, + URLSession_task_needNewBodyStreamFromOffset_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ + .implementAsListener(builder, + URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); + NSURLSessionWebSocketDelegate + .URLSession_task_didReceiveInformationalResponse_ + .implementAsListener( + builder, URLSession_task_didReceiveInformationalResponse_); + NSURLSessionWebSocketDelegate.URLSession_task_didFinishCollectingMetrics_ + .implementAsListener( + builder, URLSession_task_didFinishCollectingMetrics_); + NSURLSessionWebSocketDelegate.URLSession_task_didCompleteWithError_ + .implementAsListener(builder, URLSession_task_didCompleteWithError_); + NSURLSessionWebSocketDelegate.URLSession_didBecomeInvalidWithError_ + .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); + NSURLSessionWebSocketDelegate + .URLSession_didReceiveChallenge_completionHandler_ + .implementAsListener( + builder, URLSession_didReceiveChallenge_completionHandler_); + NSURLSessionWebSocketDelegate + .URLSessionDidFinishEventsForBackgroundURLSession_ + .implementAsListener( + builder, URLSessionDidFinishEventsForBackgroundURLSession_); + } + + /// Indicates that the WebSocket handshake was successful and the connection has been upgraded to webSockets. + /// It will also provide the protocol that is picked in the handshake. If the handshake fails, this delegate will not be invoked. + static final URLSession_webSocketTask_didOpenWithProtocol_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_webSocketTask_didOpenWithProtocol_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_webSocketTask_didOpenWithProtocol_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionWebSocketTask arg2, objc.NSString? arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionWebSocketTask arg2, objc.NSString? arg3) => + func(arg1, arg2, arg3)), + ); + + /// Indicates that the WebSocket has received a close frame from the server endpoint. + /// The close code and the close reason may be provided by the delegate if the server elects to send + /// this information in the close frame + static final URLSession_webSocketTask_didCloseWithCode_reason_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, + objc.NSData?)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_webSocketTask_didCloseWithCode_reason_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_webSocketTask_didCloseWithCode_reason_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, + objc.NSData?) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionWebSocketTask arg2, + DartNSInteger arg3, + objc.NSData? arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, + objc.NSData?) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionWebSocketTask arg2, + DartNSInteger arg3, + objc.NSData? arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Notification that a task has been created. This method is the first message + /// a task sends, providing a place to configure the task before it is resumed. + /// + /// This delegate callback is *NOT* dispatched to the delegate queue. It is + /// invoked synchronously before the task creation method returns. + static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_didCreateTask_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_didCreateTask_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// Sent when the system is ready to begin work for a task with a delayed start + /// time set (using the earliestBeginDate property). The completionHandler must + /// be invoked in order for loading to proceed. The disposition provided to the + /// completion handler continues the load with the original request provided to + /// the task, replaces the request with the specified task, or cancels the task. + /// If this delegate is not implemented, loading will proceed with the original + /// request. + /// + /// Recommendation: only implement this delegate if tasks that have the + /// earliestBeginDate property set may become stale and require alteration prior + /// to starting the network load. + /// + /// If a new request is specified, the allowsExpensiveNetworkAccess, + /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties + /// from the new request will not be used; the properties from the + /// original request will continue to be used. + /// + /// Canceling the task is equivalent to calling the task's cancel method; the + /// URLSession:task:didCompleteWithError: task delegate will be called with error + /// NSURLErrorCancelled. + static final URLSession_task_willBeginDelayedRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLRequest arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent when a task cannot start the network loading process because the current + /// network connectivity is not available or sufficient for the task's request. + /// + /// This delegate will be called at most one time per task, and is only called if + /// the waitsForConnectivity property in the NSURLSessionConfiguration has been + /// set to YES. + /// + /// This delegate callback will never be called for background sessions, because + /// the waitForConnectivity property is ignored by those sessions. + static final URLSession_taskIsWaitingForConnectivity_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_taskIsWaitingForConnectivity_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_taskIsWaitingForConnectivity_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, NSURLSessionTask) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( + (ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2) => + func(arg1, arg2)), + ); + + /// An HTTP request is attempting to perform a redirection to a different + /// URL. You must invoke the completion routine to allow the + /// redirection, allow the redirection with a modified request, or + /// pass nil to the completionHandler to cause the body of the redirection + /// response to be delivered as the payload of this request. The default + /// is to follow redirections. + /// + /// For tasks in background sessions, redirections will always be followed and this method will not be called. + static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, + NSURLRequest, objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSHTTPURLResponse arg3, + NSURLRequest arg4, + objc.ObjCBlock arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// The task has received a request specific authentication challenge. + /// If this delegate is not implemented, the session specific authentication challenge + /// will *NOT* be called and the behavior will be the same as using the default handling + /// disposition. + static final URLSession_task_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, + NSURLSessionTask, + NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + NSURLAuthenticationChallenge arg3, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent if a task requires a new, unopened body stream. This may be + /// necessary when authentication has failed for any request that + /// involves a body stream. + static final URLSession_task_needNewBodyStream_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_needNewBodyStream_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_needNewBodyStream_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + objc.ObjCBlock + arg3) => + func(arg1, arg2, arg3)), + ); + + /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be + /// necessary when resuming a failed upload task. + /// + /// - Parameter session: The session containing the task that needs a new body stream from the given offset. + /// - Parameter task: The task that needs a new body stream. + /// - Parameter offset: The starting offset required for the body stream. + /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. + static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + (void Function(NSURLSession, NSURLSessionTask, int, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLSessionTask arg2, + int arg3, + objc.ObjCBlock + arg4) => + func(arg1, arg2, arg3, arg4)), + ); + + /// Sent periodically to notify the delegate of upload progress. This + /// information is also available as properties of the task. + static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, int, int, int)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, int arg3, int arg4, int arg5) => + func(arg1, arg2, arg3, arg4, arg5)), + ); + + /// Sent for each informational response received except 101 switching protocols. + static final URLSession_task_didReceiveInformationalResponse_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didReceiveInformationalResponse_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didReceiveInformationalResponse_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSHTTPURLResponse arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent when complete statistics information has been collected for the task. + static final URLSession_task_didFinishCollectingMetrics_ = + objc.ObjCProtocolListenableMethod< + void Function( + NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didFinishCollectingMetrics_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didFinishCollectingMetrics_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => + func(arg1, arg2, arg3)), + ); + + /// Sent as the last message related to a specific task. Error may be + /// nil, which implies that no error occurred and this task is complete. + static final URLSession_task_didCompleteWithError_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didCompleteWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_task_didCompleteWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .fromFunction((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError + .listener((ffi.Pointer _, NSURLSession arg1, + NSURLSessionTask arg2, objc.NSError? arg3) => + func(arg1, arg2, arg3)), + ); + + /// The last message a session receives. A session will only become + /// invalid because of a systemic error or when it has been + /// explicitly invalidated, in which case the error parameter will be nil. + static final URLSession_didBecomeInvalidWithError_ = objc + .ObjCProtocolListenableMethod( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_didBecomeInvalidWithError_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_didBecomeInvalidWithError_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + (void Function(NSURLSession, objc.NSError?) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( + (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => + func(arg1, arg2)), + ); + + /// If implemented, when a connection level authentication challenge + /// has occurred, this delegate will be given the opportunity to + /// provide authentication credentials to the underlying + /// connection. Some types of authentication will apply to more than + /// one request on a given connection to a server (SSL Server Trust + /// challenges). If this delegate message is not implemented, the + /// behavior will be to use the default handling, which may involve user + /// interaction. + static final URLSession_didReceiveChallenge_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock)>( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_didReceiveChallenge_completionHandler_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSession_didReceiveChallenge_completionHandler_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .fromFunction((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + (void Function(NSURLSession, NSURLAuthenticationChallenge, + objc.ObjCBlock) + func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential + .listener((ffi.Pointer _, + NSURLSession arg1, + NSURLAuthenticationChallenge arg2, + objc.ObjCBlock< + ffi.Void Function(NSInteger, NSURLCredential?)> + arg3) => + func(arg1, arg2, arg3)), + ); + + /// If an application has received an + /// -application:handleEventsForBackgroundURLSession:completionHandler: + /// message, the session delegate will receive this message to indicate + /// that all messages previously enqueued for this session have been + /// delivered. At this time it is safe to invoke the previously stored + /// completion handler, or to begin any internal updates that will + /// result in invoking the completion handler. + static final URLSessionDidFinishEventsForBackgroundURLSession_ = + objc.ObjCProtocolListenableMethod( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + objc.getProtocolMethodSignature( + _protocol_NSURLSessionWebSocketDelegate, + _sel_URLSessionDidFinishEventsForBackgroundURLSession_, + isRequired: false, + isInstanceMethod: true, + ), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + (void Function(NSURLSession) func) => + ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( + (ffi.Pointer _, NSURLSession arg1) => func(arg1)), + ); +} + +typedef unichar = ffi.UnsignedShort; +typedef Dartunichar = int; +late final _class_NSValue = objc.getClass("NSValue"); +late final _sel_valueWithBytes_objCType_ = + objc.registerName("valueWithBytes:objCType:"); +final _objc_msgSend_qtxoq7 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_value_withObjCType_ = objc.registerName("value:withObjCType:"); + +/// NSValueCreation +extension NSValueCreation on objc.NSValue { + /// valueWithBytes:objCType: + static objc.NSValue valueWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_qtxoq7( + _class_NSValue, _sel_valueWithBytes_objCType_, value, type); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } + + /// value:withObjCType: + static objc.NSValue value_withObjCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_qtxoq7( + _class_NSValue, _sel_value_withObjCType_, value, type); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _sel_valueWithNonretainedObject_ = + objc.registerName("valueWithNonretainedObject:"); +late final _sel_nonretainedObjectValue = + objc.registerName("nonretainedObjectValue"); +late final _sel_valueWithPointer_ = objc.registerName("valueWithPointer:"); +final _objc_msgSend_1yesha9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pointerValue = objc.registerName("pointerValue"); +final _objc_msgSend_6ex6p5 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isEqualToValue_ = objc.registerName("isEqualToValue:"); + +/// NSValueExtensionMethods +extension NSValueExtensionMethods on objc.NSValue { + /// valueWithNonretainedObject: + static objc.NSValue valueWithNonretainedObject_( + objc.ObjCObjectBase? anObject) { + final _ret = _objc_msgSend_62nh5j(_class_NSValue, + _sel_valueWithNonretainedObject_, anObject?.ref.pointer ?? ffi.nullptr); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } + + /// nonretainedObjectValue + objc.ObjCObjectBase? get nonretainedObjectValue { + final _ret = + _objc_msgSend_1x359cv(this.ref.pointer, _sel_nonretainedObjectValue); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// valueWithPointer: + static objc.NSValue valueWithPointer_(ffi.Pointer pointer) { + final _ret = + _objc_msgSend_1yesha9(_class_NSValue, _sel_valueWithPointer_, pointer); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } + + /// pointerValue + ffi.Pointer get pointerValue { + return _objc_msgSend_6ex6p5(this.ref.pointer, _sel_pointerValue); + } + + /// isEqualToValue: + bool isEqualToValue_(objc.NSValue value) { + return _objc_msgSend_69e0x1( + this.ref.pointer, _sel_isEqualToValue_, value.ref.pointer); + } +} + +late final _class_NSNumber = objc.getClass("NSNumber"); +late final _sel_numberWithChar_ = objc.registerName("numberWithChar:"); +final _objc_msgSend_vx1f2d = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Char)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithUnsignedChar_ = + objc.registerName("numberWithUnsignedChar:"); +final _objc_msgSend_uzucl8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedChar)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithShort_ = objc.registerName("numberWithShort:"); +final _objc_msgSend_cvzqr9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Short)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithUnsignedShort_ = + objc.registerName("numberWithUnsignedShort:"); +final _objc_msgSend_onx6bi = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedShort)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithInt_ = objc.registerName("numberWithInt:"); +final _objc_msgSend_1a0iyvk = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithUnsignedInt_ = + objc.registerName("numberWithUnsignedInt:"); +final _objc_msgSend_12mhqtk = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithLong_ = objc.registerName("numberWithLong:"); +late final _sel_numberWithUnsignedLong_ = + objc.registerName("numberWithUnsignedLong:"); +late final _sel_numberWithLongLong_ = objc.registerName("numberWithLongLong:"); +final _objc_msgSend_94zdgv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.LongLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithUnsignedLongLong_ = + objc.registerName("numberWithUnsignedLongLong:"); +final _objc_msgSend_98pnic = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberWithFloat_ = objc.registerName("numberWithFloat:"); +final _objc_msgSend_1f4qa0h = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Float)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_numberWithDouble_ = objc.registerName("numberWithDouble:"); +late final _sel_numberWithBool_ = objc.registerName("numberWithBool:"); +final _objc_msgSend_1l3kbc1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); +late final _sel_numberWithInteger_ = objc.registerName("numberWithInteger:"); +late final _sel_numberWithUnsignedInteger_ = + objc.registerName("numberWithUnsignedInteger:"); + +/// NSNumberCreation +extension NSNumberCreation on objc.NSNumber { + /// numberWithChar: + static objc.NSNumber numberWithChar_(int value) { + final _ret = + _objc_msgSend_vx1f2d(_class_NSNumber, _sel_numberWithChar_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithUnsignedChar: + static objc.NSNumber numberWithUnsignedChar_(int value) { + final _ret = _objc_msgSend_uzucl8( + _class_NSNumber, _sel_numberWithUnsignedChar_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithShort: + static objc.NSNumber numberWithShort_(int value) { + final _ret = + _objc_msgSend_cvzqr9(_class_NSNumber, _sel_numberWithShort_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithUnsignedShort: + static objc.NSNumber numberWithUnsignedShort_(int value) { + final _ret = _objc_msgSend_onx6bi( + _class_NSNumber, _sel_numberWithUnsignedShort_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithInt: + static objc.NSNumber numberWithInt_(int value) { + final _ret = + _objc_msgSend_1a0iyvk(_class_NSNumber, _sel_numberWithInt_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithUnsignedInt: + static objc.NSNumber numberWithUnsignedInt_(int value) { + final _ret = _objc_msgSend_12mhqtk( + _class_NSNumber, _sel_numberWithUnsignedInt_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithLong: + static objc.NSNumber numberWithLong_(int value) { + final _ret = + _objc_msgSend_8o14b(_class_NSNumber, _sel_numberWithLong_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithUnsignedLong: + static objc.NSNumber numberWithUnsignedLong_(int value) { + final _ret = _objc_msgSend_1qrcblu( + _class_NSNumber, _sel_numberWithUnsignedLong_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithLongLong: + static objc.NSNumber numberWithLongLong_(int value) { + final _ret = + _objc_msgSend_94zdgv(_class_NSNumber, _sel_numberWithLongLong_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithUnsignedLongLong: + static objc.NSNumber numberWithUnsignedLongLong_(int value) { + final _ret = _objc_msgSend_98pnic( + _class_NSNumber, _sel_numberWithUnsignedLongLong_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithFloat: + static objc.NSNumber numberWithFloat_(double value) { + final _ret = + _objc_msgSend_1f4qa0h(_class_NSNumber, _sel_numberWithFloat_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithDouble: + static objc.NSNumber numberWithDouble_(double value) { + final _ret = + _objc_msgSend_1x911p2(_class_NSNumber, _sel_numberWithDouble_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithBool: + static objc.NSNumber numberWithBool_(bool value) { + final _ret = + _objc_msgSend_1l3kbc1(_class_NSNumber, _sel_numberWithBool_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithInteger: + static objc.NSNumber numberWithInteger_(DartNSInteger value) { + final _ret = + _objc_msgSend_8o14b(_class_NSNumber, _sel_numberWithInteger_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + /// numberWithUnsignedInteger: + static objc.NSNumber numberWithUnsignedInteger_(DartNSUInteger value) { + final _ret = _objc_msgSend_1qrcblu( + _class_NSNumber, _sel_numberWithUnsignedInteger_, value); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _sel_getValue_ = objc.registerName("getValue:"); +final _objc_msgSend_ovsamd = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +/// NSDeprecated +extension NSDeprecated2 on objc.NSValue { + /// getValue: + void getValue_(ffi.Pointer value) { + _objc_msgSend_ovsamd(this.ref.pointer, _sel_getValue_, value); + } +} + +typedef NSRange = objc.NSRange; +typedef NSRangePointer = ffi.Pointer; +late final _sel_valueWithRange_ = objc.registerName("valueWithRange:"); +final _objc_msgSend_83z673 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, objc.NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, objc.NSRange)>(); +late final _sel_rangeValue = objc.registerName("rangeValue"); +final _objc_msgSend_1u11dbb = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + objc.NSRange Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_1u11dbbStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + +/// NSValueRangeExtensions +extension NSValueRangeExtensions on objc.NSValue { + /// valueWithRange: + static objc.NSValue valueWithRange_(NSRange range) { + final _ret = + _objc_msgSend_83z673(_class_NSValue, _sel_valueWithRange_, range); + return objc.NSValue.castFromPointer(_ret, retain: true, release: true); + } + + /// rangeValue + NSRange get rangeValue { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1u11dbbStret(_ptr, this.ref.pointer, _sel_rangeValue) + : _ptr.ref = _objc_msgSend_1u11dbb(this.ref.pointer, _sel_rangeValue); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } +} + +late final _class_NSArray = objc.getClass("NSArray"); +late final _sel_arrayByAddingObject_ = + objc.registerName("arrayByAddingObject:"); +late final _sel_arrayByAddingObjectsFromArray_ = + objc.registerName("arrayByAddingObjectsFromArray:"); +late final _sel_componentsJoinedByString_ = + objc.registerName("componentsJoinedByString:"); +late final _sel_containsObject_ = objc.registerName("containsObject:"); +late final _sel_firstObjectCommonWithArray_ = + objc.registerName("firstObjectCommonWithArray:"); +late final _sel_getObjects_range_ = objc.registerName("getObjects:range:"); +final _objc_msgSend_o16d3k = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + objc.NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + objc.NSRange)>(); +late final _sel_indexOfObject_ = objc.registerName("indexOfObject:"); +final _objc_msgSend_1p4b7x4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexOfObject_inRange_ = + objc.registerName("indexOfObject:inRange:"); +final _objc_msgSend_1c913oo = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>(); +late final _sel_indexOfObjectIdenticalTo_ = + objc.registerName("indexOfObjectIdenticalTo:"); +late final _sel_indexOfObjectIdenticalTo_inRange_ = + objc.registerName("indexOfObjectIdenticalTo:inRange:"); +late final _sel_isEqualToArray_ = objc.registerName("isEqualToArray:"); +late final _sel_firstObject = objc.registerName("firstObject"); +late final _sel_lastObject = objc.registerName("lastObject"); +late final _sel_reverseObjectEnumerator = + objc.registerName("reverseObjectEnumerator"); +late final _sel_sortedArrayHint = objc.registerName("sortedArrayHint"); +late final _sel_sortedArrayUsingFunction_context_ = + objc.registerName("sortedArrayUsingFunction:context:"); +final _objc_msgSend_1iiv4px = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingFunction_context_hint_ = + objc.registerName("sortedArrayUsingFunction:context:hint:"); +final _objc_msgSend_iqbzrn = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingSelector_ = + objc.registerName("sortedArrayUsingSelector:"); +late final _sel_subarrayWithRange_ = objc.registerName("subarrayWithRange:"); +late final _sel_makeObjectsPerformSelector_ = + objc.registerName("makeObjectsPerformSelector:"); +final _objc_msgSend_1d9e4oe = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_makeObjectsPerformSelector_withObject_ = + objc.registerName("makeObjectsPerformSelector:withObject:"); +final _objc_msgSend_1c03bya = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_objectsAtIndexes_ = objc.registerName("objectsAtIndexes:"); +late final _sel_objectAtIndexedSubscript_ = + objc.registerName("objectAtIndexedSubscript:"); +void _ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + NSUInteger arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + int, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + int, ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger, ffi.Pointer)> + _ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)>`. +abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.UnsignedLong, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer arg0, NSUInteger arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)> + fromFunction(void Function(objc.ObjCObjectBase, DartNSUInteger, ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_closureCallable, + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(objc.ObjCObjectBase(arg0, retain: true, release: true), arg1, arg2)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> listener( + void Function(objc.ObjCObjectBase, DartNSUInteger, ffi.Pointer) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(objc.ObjCObjectBase(arg0, retain: false, release: true), arg1, + arg2)); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_16ko9u(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)>`. +extension ObjCBlock_ffiVoid_objcObjCObject_NSUInteger_bool_CallExtension + on objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> { + void call(objc.ObjCObjectBase arg0, DartNSUInteger arg1, + ffi.Pointer arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1, arg2); +} + +late final _sel_enumerateObjectsUsingBlock_ = + objc.registerName("enumerateObjectsUsingBlock:"); +late final _sel_enumerateObjectsWithOptions_usingBlock_ = + objc.registerName("enumerateObjectsWithOptions:usingBlock:"); +late final _sel_enumerateObjectsAtIndexes_options_usingBlock_ = + objc.registerName("enumerateObjectsAtIndexes:options:usingBlock:"); +final _objc_msgSend_p1bhs = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +bool _ObjCBlock_bool_objcObjCObject_NSUInteger_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + NSUInteger arg1, ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_NSUInteger_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_NSUInteger_bool_fnPtrTrampoline, + false) + .cast(); +bool _ObjCBlock_bool_objcObjCObject_NSUInteger_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as bool Function(ffi.Pointer, + int, ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_NSUInteger_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_NSUInteger_bool_closureTrampoline, + false) + .cast(); + +/// Construction methods for `objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_objcObjCObject_NSUInteger_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.UnsignedLong, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer arg0, NSUInteger arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>( + objc.newPointerBlock( + _ObjCBlock_bool_objcObjCObject_NSUInteger_bool_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)> + fromFunction(bool Function(objc.ObjCObjectBase, DartNSUInteger, ffi.Pointer) fn) => + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_bool_objcObjCObject_NSUInteger_bool_closureCallable, + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(objc.ObjCObjectBase(arg0, retain: true, release: true), arg1, arg2)), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, ffi.UnsignedLong, ffi.Pointer)>`. +extension ObjCBlock_bool_objcObjCObject_NSUInteger_bool_CallExtension + on objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> { + bool call(objc.ObjCObjectBase arg0, DartNSUInteger arg1, + ffi.Pointer arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1, arg2); +} + +late final _sel_indexOfObjectPassingTest_ = + objc.registerName("indexOfObjectPassingTest:"); +final _objc_msgSend_10mlopr = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexOfObjectWithOptions_passingTest_ = + objc.registerName("indexOfObjectWithOptions:passingTest:"); +final _objc_msgSend_1698hqz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexOfObjectAtIndexes_options_passingTest_ = + objc.registerName("indexOfObjectAtIndexes:options:passingTest:"); +final _objc_msgSend_viax9j = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsPassingTest_ = + objc.registerName("indexesOfObjectsPassingTest:"); +late final _sel_indexesOfObjectsWithOptions_passingTest_ = + objc.registerName("indexesOfObjectsWithOptions:passingTest:"); +late final _sel_indexesOfObjectsAtIndexes_options_passingTest_ = + objc.registerName("indexesOfObjectsAtIndexes:options:passingTest:"); +final _objc_msgSend_1bj2f0k = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingComparator_ = + objc.registerName("sortedArrayUsingComparator:"); +late final _sel_sortedArrayWithOptions_usingComparator_ = + objc.registerName("sortedArrayWithOptions:usingComparator:"); +late final _sel_indexOfObject_inSortedRange_options_usingComparator_ = + objc.registerName("indexOfObject:inSortedRange:options:usingComparator:"); +final _objc_msgSend_9efhbf = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + NSUInteger, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + int, + ffi.Pointer)>(); + +/// NSExtendedArray +extension NSExtendedArray on objc.NSArray { + /// arrayByAddingObject: + objc.NSArray arrayByAddingObject_(objc.ObjCObjectBase anObject) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_arrayByAddingObject_, anObject.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// arrayByAddingObjectsFromArray: + objc.NSArray arrayByAddingObjectsFromArray_(objc.NSArray otherArray) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_arrayByAddingObjectsFromArray_, otherArray.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// componentsJoinedByString: + objc.NSString componentsJoinedByString_(objc.NSString separator) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_componentsJoinedByString_, separator.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// containsObject: + bool containsObject_(objc.ObjCObjectBase anObject) { + return _objc_msgSend_69e0x1( + this.ref.pointer, _sel_containsObject_, anObject.ref.pointer); + } + + /// description + objc.NSString get description { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// descriptionWithLocale: + objc.NSString descriptionWithLocale_(objc.ObjCObjectBase? locale) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_descriptionWithLocale_, locale?.ref.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// descriptionWithLocale:indent: + objc.NSString descriptionWithLocale_indent_( + objc.ObjCObjectBase? locale, DartNSUInteger level) { + final _ret = _objc_msgSend_dcd68g( + this.ref.pointer, + _sel_descriptionWithLocale_indent_, + locale?.ref.pointer ?? ffi.nullptr, + level); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// firstObjectCommonWithArray: + objc.ObjCObjectBase? firstObjectCommonWithArray_(objc.NSArray otherArray) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_firstObjectCommonWithArray_, otherArray.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// getObjects:range: + void getObjects_range_( + ffi.Pointer> objects, NSRange range) { + _objc_msgSend_o16d3k( + this.ref.pointer, _sel_getObjects_range_, objects, range); + } + + /// indexOfObject: + DartNSUInteger indexOfObject_(objc.ObjCObjectBase anObject) { + return _objc_msgSend_1p4b7x4( + this.ref.pointer, _sel_indexOfObject_, anObject.ref.pointer); + } + + /// indexOfObject:inRange: + DartNSUInteger indexOfObject_inRange_( + objc.ObjCObjectBase anObject, NSRange range) { + return _objc_msgSend_1c913oo(this.ref.pointer, _sel_indexOfObject_inRange_, + anObject.ref.pointer, range); + } + + /// indexOfObjectIdenticalTo: + DartNSUInteger indexOfObjectIdenticalTo_(objc.ObjCObjectBase anObject) { + return _objc_msgSend_1p4b7x4( + this.ref.pointer, _sel_indexOfObjectIdenticalTo_, anObject.ref.pointer); + } + + /// indexOfObjectIdenticalTo:inRange: + DartNSUInteger indexOfObjectIdenticalTo_inRange_( + objc.ObjCObjectBase anObject, NSRange range) { + return _objc_msgSend_1c913oo(this.ref.pointer, + _sel_indexOfObjectIdenticalTo_inRange_, anObject.ref.pointer, range); + } + + /// isEqualToArray: + bool isEqualToArray_(objc.NSArray otherArray) { + return _objc_msgSend_69e0x1( + this.ref.pointer, _sel_isEqualToArray_, otherArray.ref.pointer); + } + + /// firstObject + objc.ObjCObjectBase? get firstObject { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_firstObject); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// lastObject + objc.ObjCObjectBase? get lastObject { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_lastObject); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// objectEnumerator + objc.NSEnumerator objectEnumerator() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_objectEnumerator); + return objc.NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + /// reverseObjectEnumerator + objc.NSEnumerator reverseObjectEnumerator() { + final _ret = + _objc_msgSend_1x359cv(this.ref.pointer, _sel_reverseObjectEnumerator); + return objc.NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + /// sortedArrayHint + objc.NSData get sortedArrayHint { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_sortedArrayHint); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + /// sortedArrayUsingFunction:context: + objc.NSArray sortedArrayUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context) { + final _ret = _objc_msgSend_1iiv4px(this.ref.pointer, + _sel_sortedArrayUsingFunction_context_, comparator, context); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// sortedArrayUsingFunction:context:hint: + objc.NSArray sortedArrayUsingFunction_context_hint_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + objc.NSData? hint) { + final _ret = _objc_msgSend_iqbzrn( + this.ref.pointer, + _sel_sortedArrayUsingFunction_context_hint_, + comparator, + context, + hint?.ref.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// sortedArrayUsingSelector: + objc.NSArray sortedArrayUsingSelector_( + ffi.Pointer comparator) { + final _ret = _objc_msgSend_19hbqky( + this.ref.pointer, _sel_sortedArrayUsingSelector_, comparator); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// subarrayWithRange: + objc.NSArray subarrayWithRange_(NSRange range) { + final _ret = + _objc_msgSend_83z673(this.ref.pointer, _sel_subarrayWithRange_, range); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// writeToURL:error: + bool writeToURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_blqzg8( + this.ref.pointer, _sel_writeToURL_error_, url.ref.pointer, error); + } + + /// makeObjectsPerformSelector: + void makeObjectsPerformSelector_(ffi.Pointer aSelector) { + _objc_msgSend_1d9e4oe( + this.ref.pointer, _sel_makeObjectsPerformSelector_, aSelector); + } + + /// makeObjectsPerformSelector:withObject: + void makeObjectsPerformSelector_withObject_( + ffi.Pointer aSelector, objc.ObjCObjectBase? argument) { + _objc_msgSend_1c03bya( + this.ref.pointer, + _sel_makeObjectsPerformSelector_withObject_, + aSelector, + argument?.ref.pointer ?? ffi.nullptr); + } + + /// objectsAtIndexes: + objc.NSArray objectsAtIndexes_(objc.NSIndexSet indexes) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_objectsAtIndexes_, indexes.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// objectAtIndexedSubscript: + objc.ObjCObjectBase objectAtIndexedSubscript_(DartNSUInteger idx) { + final _ret = _objc_msgSend_1qrcblu( + this.ref.pointer, _sel_objectAtIndexedSubscript_, idx); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// enumerateObjectsUsingBlock: + void enumerateObjectsUsingBlock_( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> + block) { + _objc_msgSend_f167m6( + this.ref.pointer, _sel_enumerateObjectsUsingBlock_, block.ref.pointer); + } + + /// enumerateObjectsWithOptions:usingBlock: + void enumerateObjectsWithOptions_usingBlock_( + objc.NSEnumerationOptions opts, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> + block) { + _objc_msgSend_yx8yc6( + this.ref.pointer, + _sel_enumerateObjectsWithOptions_usingBlock_, + opts.value, + block.ref.pointer); + } + + /// enumerateObjectsAtIndexes:options:usingBlock: + void enumerateObjectsAtIndexes_options_usingBlock_( + objc.NSIndexSet s, + objc.NSEnumerationOptions opts, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> + block) { + _objc_msgSend_p1bhs( + this.ref.pointer, + _sel_enumerateObjectsAtIndexes_options_usingBlock_, + s.ref.pointer, + opts.value, + block.ref.pointer); + } + + /// indexOfObjectPassingTest: + DartNSUInteger indexOfObjectPassingTest_( + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> + predicate) { + return _objc_msgSend_10mlopr(this.ref.pointer, + _sel_indexOfObjectPassingTest_, predicate.ref.pointer); + } + + /// indexOfObjectWithOptions:passingTest: + DartNSUInteger indexOfObjectWithOptions_passingTest_( + objc.NSEnumerationOptions opts, + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> + predicate) { + return _objc_msgSend_1698hqz( + this.ref.pointer, + _sel_indexOfObjectWithOptions_passingTest_, + opts.value, + predicate.ref.pointer); + } + + /// indexOfObjectAtIndexes:options:passingTest: + DartNSUInteger indexOfObjectAtIndexes_options_passingTest_( + objc.NSIndexSet s, + objc.NSEnumerationOptions opts, + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> + predicate) { + return _objc_msgSend_viax9j( + this.ref.pointer, + _sel_indexOfObjectAtIndexes_options_passingTest_, + s.ref.pointer, + opts.value, + predicate.ref.pointer); + } + + /// indexesOfObjectsPassingTest: + objc.NSIndexSet indexesOfObjectsPassingTest_( + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> + predicate) { + final _ret = _objc_msgSend_cy99le(this.ref.pointer, + _sel_indexesOfObjectsPassingTest_, predicate.ref.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + /// indexesOfObjectsWithOptions:passingTest: + objc.NSIndexSet indexesOfObjectsWithOptions_passingTest_( + objc.NSEnumerationOptions opts, + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> + predicate) { + final _ret = _objc_msgSend_hd4f96( + this.ref.pointer, + _sel_indexesOfObjectsWithOptions_passingTest_, + opts.value, + predicate.ref.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + /// indexesOfObjectsAtIndexes:options:passingTest: + objc.NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( + objc.NSIndexSet s, + objc.NSEnumerationOptions opts, + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)> + predicate) { + final _ret = _objc_msgSend_1bj2f0k( + this.ref.pointer, + _sel_indexesOfObjectsAtIndexes_options_passingTest_, + s.ref.pointer, + opts.value, + predicate.ref.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + /// sortedArrayUsingComparator: + objc.NSArray sortedArrayUsingComparator_(DartNSComparator cmptr) { + final _ret = _objc_msgSend_cy99le( + this.ref.pointer, _sel_sortedArrayUsingComparator_, cmptr.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// sortedArrayWithOptions:usingComparator: + objc.NSArray sortedArrayWithOptions_usingComparator_( + objc.NSSortOptions opts, DartNSComparator cmptr) { + final _ret = _objc_msgSend_1u2b7ut( + this.ref.pointer, + _sel_sortedArrayWithOptions_usingComparator_, + opts.value, + cmptr.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// indexOfObject:inSortedRange:options:usingComparator: + DartNSUInteger indexOfObject_inSortedRange_options_usingComparator_( + objc.ObjCObjectBase obj, + NSRange r, + objc.NSBinarySearchingOptions opts, + DartNSComparator cmp) { + return _objc_msgSend_9efhbf( + this.ref.pointer, + _sel_indexOfObject_inSortedRange_options_usingComparator_, + obj.ref.pointer, + r, + opts.value, + cmp.ref.pointer); + } +} + +late final _sel_array = objc.registerName("array"); +late final _sel_arrayWithObject_ = objc.registerName("arrayWithObject:"); +late final _sel_arrayWithObjects_count_ = + objc.registerName("arrayWithObjects:count:"); +final _objc_msgSend_1lqqdvl = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); +late final _sel_arrayWithObjects_ = objc.registerName("arrayWithObjects:"); +late final _sel_arrayWithArray_ = objc.registerName("arrayWithArray:"); +late final _sel_initWithObjects_ = objc.registerName("initWithObjects:"); +late final _sel_initWithArray_ = objc.registerName("initWithArray:"); +late final _sel_initWithArray_copyItems_ = + objc.registerName("initWithArray:copyItems:"); +late final _sel_arrayWithContentsOfURL_error_ = + objc.registerName("arrayWithContentsOfURL:error:"); + +/// NSArrayCreation +extension NSArrayCreation on objc.NSArray { + /// array + static objc.NSArray array() { + final _ret = _objc_msgSend_1x359cv(_class_NSArray, _sel_array); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// arrayWithObject: + static objc.NSArray arrayWithObject_(objc.ObjCObjectBase anObject) { + final _ret = _objc_msgSend_62nh5j( + _class_NSArray, _sel_arrayWithObject_, anObject.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// arrayWithObjects:count: + static objc.NSArray arrayWithObjects_count_( + ffi.Pointer> objects, DartNSUInteger cnt) { + final _ret = _objc_msgSend_1lqqdvl( + _class_NSArray, _sel_arrayWithObjects_count_, objects, cnt); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// arrayWithObjects: + static objc.NSArray arrayWithObjects_(objc.ObjCObjectBase firstObj) { + final _ret = _objc_msgSend_62nh5j( + _class_NSArray, _sel_arrayWithObjects_, firstObj.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// arrayWithArray: + static objc.NSArray arrayWithArray_(objc.NSArray array) { + final _ret = _objc_msgSend_62nh5j( + _class_NSArray, _sel_arrayWithArray_, array.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// initWithObjects: + objc.NSArray initWithObjects_(objc.ObjCObjectBase firstObj) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithObjects_, firstObj.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithArray: + objc.NSArray initWithArray_(objc.NSArray array) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithArray_, array.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithArray:copyItems: + objc.NSArray initWithArray_copyItems_(objc.NSArray array, bool flag) { + final _ret = _objc_msgSend_1bdmr5f(this.ref.retainAndReturnPointer(), + _sel_initWithArray_copyItems_, array.ref.pointer, flag); + return objc.NSArray.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithContentsOfURL:error: + objc.NSArray? initWithContentsOfURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_1705co6(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_error_, url.ref.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: false, release: true); + } + + /// arrayWithContentsOfURL:error: + static objc.NSArray? arrayWithContentsOfURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_1705co6(_class_NSArray, + _sel_arrayWithContentsOfURL_error_, url.ref.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } +} + +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline, + false) + .cast(); +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as bool Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureCallable = + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline, + false) + .cast(); + +/// Construction methods for `objc.ObjCBlock, ffi.Pointer)>`. +abstract final class ObjCBlock_bool_objcObjCObject_objcObjCObject { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.Pointer)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1)>> ptr) => + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>( + objc.newPointerBlock( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.Pointer)> + fromFunction(bool Function(objc.ObjCObjectBase, objc.ObjCObjectBase) fn) => + objc.ObjCBlock, ffi.Pointer)>( + objc.newClosureBlock( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + objc.ObjCObjectBase(arg0, retain: true, release: true), + objc.ObjCObjectBase(arg1, retain: true, release: true))), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, ffi.Pointer)>`. +extension ObjCBlock_bool_objcObjCObject_objcObjCObject_CallExtension + on objc.ObjCBlock< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer)> { + bool call(objc.ObjCObjectBase arg0, objc.ObjCObjectBase arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer); +} + +late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_ = + objc.registerName("differenceFromArray:withOptions:usingEquivalenceTest:"); +final _objc_msgSend_1jy28v8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_differenceFromArray_withOptions_ = + objc.registerName("differenceFromArray:withOptions:"); +final _objc_msgSend_4yz83j = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_differenceFromArray_ = + objc.registerName("differenceFromArray:"); +late final _sel_arrayByApplyingDifference_ = + objc.registerName("arrayByApplyingDifference:"); + +/// NSArrayDiffing +extension NSArrayDiffing on objc.NSArray { + /// differenceFromArray:withOptions:usingEquivalenceTest: + objc.NSOrderedCollectionDifference + differenceFromArray_withOptions_usingEquivalenceTest_( + objc.NSArray other, + objc.NSOrderedCollectionDifferenceCalculationOptions options, + objc.ObjCBlock< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)> + block) { + final _ret = _objc_msgSend_1jy28v8( + this.ref.pointer, + _sel_differenceFromArray_withOptions_usingEquivalenceTest_, + other.ref.pointer, + options.value, + block.ref.pointer); + return objc.NSOrderedCollectionDifference.castFromPointer(_ret, + retain: true, release: true); + } + + /// differenceFromArray:withOptions: + objc.NSOrderedCollectionDifference differenceFromArray_withOptions_( + objc.NSArray other, + objc.NSOrderedCollectionDifferenceCalculationOptions options) { + final _ret = _objc_msgSend_4yz83j( + this.ref.pointer, + _sel_differenceFromArray_withOptions_, + other.ref.pointer, + options.value); + return objc.NSOrderedCollectionDifference.castFromPointer(_ret, + retain: true, release: true); + } + + /// differenceFromArray: + objc.NSOrderedCollectionDifference differenceFromArray_(objc.NSArray other) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_differenceFromArray_, other.ref.pointer); + return objc.NSOrderedCollectionDifference.castFromPointer(_ret, + retain: true, release: true); + } + + /// arrayByApplyingDifference: + objc.NSArray? arrayByApplyingDifference_( + objc.NSOrderedCollectionDifference difference) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_arrayByApplyingDifference_, difference.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _sel_getObjects_ = objc.registerName("getObjects:"); +final _objc_msgSend_1dau4w = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_arrayWithContentsOfFile_ = + objc.registerName("arrayWithContentsOfFile:"); +late final _sel_arrayWithContentsOfURL_ = + objc.registerName("arrayWithContentsOfURL:"); + +/// NSDeprecated +extension NSDeprecated3 on objc.NSArray { + /// getObjects: + void getObjects_(ffi.Pointer> objects) { + _objc_msgSend_1dau4w(this.ref.pointer, _sel_getObjects_, objects); + } + + /// arrayWithContentsOfFile: + static objc.NSArray? arrayWithContentsOfFile_(objc.NSString path) { + final _ret = _objc_msgSend_62nh5j( + _class_NSArray, _sel_arrayWithContentsOfFile_, path.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// arrayWithContentsOfURL: + static objc.NSArray? arrayWithContentsOfURL_(objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j( + _class_NSArray, _sel_arrayWithContentsOfURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// initWithContentsOfFile: + objc.NSArray? initWithContentsOfFile_(objc.NSString path) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_, path.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithContentsOfURL: + objc.NSArray? initWithContentsOfURL_(objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: false, release: true); + } + + /// writeToFile:atomically: + bool writeToFile_atomically_(objc.NSString path, bool useAuxiliaryFile) { + return _objc_msgSend_w8pbfh(this.ref.pointer, _sel_writeToFile_atomically_, + path.ref.pointer, useAuxiliaryFile); + } + + /// writeToURL:atomically: + bool writeToURL_atomically_(objc.NSURL url, bool atomically) { + return _objc_msgSend_w8pbfh(this.ref.pointer, _sel_writeToURL_atomically_, + url.ref.pointer, atomically); + } +} + +late final _class_NSMutableArray = objc.getClass("NSMutableArray"); +late final _sel_addObjectsFromArray_ = + objc.registerName("addObjectsFromArray:"); +late final _sel_exchangeObjectAtIndex_withObjectAtIndex_ = + objc.registerName("exchangeObjectAtIndex:withObjectAtIndex:"); +final _objc_msgSend_bfp043 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_removeObject_inRange_ = + objc.registerName("removeObject:inRange:"); +final _objc_msgSend_16f6m81 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>(); +late final _sel_removeObject_ = objc.registerName("removeObject:"); +late final _sel_removeObjectIdenticalTo_inRange_ = + objc.registerName("removeObjectIdenticalTo:inRange:"); +late final _sel_removeObjectIdenticalTo_ = + objc.registerName("removeObjectIdenticalTo:"); +late final _sel_removeObjectsFromIndices_numIndices_ = + objc.registerName("removeObjectsFromIndices:numIndices:"); +final _objc_msgSend_swohtd = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_removeObjectsInArray_ = + objc.registerName("removeObjectsInArray:"); +late final _sel_removeObjectsInRange_ = + objc.registerName("removeObjectsInRange:"); +final _objc_msgSend_1e3pm0z = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, objc.NSRange)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, objc.NSRange)>(); +late final _sel_replaceObjectsInRange_withObjectsFromArray_range_ = + objc.registerName("replaceObjectsInRange:withObjectsFromArray:range:"); +final _objc_msgSend_169h6dj = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer, + objc.NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer, + objc.NSRange)>(); +late final _sel_replaceObjectsInRange_withObjectsFromArray_ = + objc.registerName("replaceObjectsInRange:withObjectsFromArray:"); +final _objc_msgSend_i4ny2p = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_setArray_ = objc.registerName("setArray:"); +late final _sel_sortUsingFunction_context_ = + objc.registerName("sortUsingFunction:context:"); +final _objc_msgSend_1bvics1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); +late final _sel_sortUsingSelector_ = objc.registerName("sortUsingSelector:"); +late final _sel_insertObjects_atIndexes_ = + objc.registerName("insertObjects:atIndexes:"); +late final _sel_removeObjectsAtIndexes_ = + objc.registerName("removeObjectsAtIndexes:"); +late final _sel_replaceObjectsAtIndexes_withObjects_ = + objc.registerName("replaceObjectsAtIndexes:withObjects:"); +late final _sel_setObject_atIndexedSubscript_ = + objc.registerName("setObject:atIndexedSubscript:"); +final _objc_msgSend_10i1axw = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_sortUsingComparator_ = + objc.registerName("sortUsingComparator:"); +late final _sel_sortWithOptions_usingComparator_ = + objc.registerName("sortWithOptions:usingComparator:"); +final _objc_msgSend_jjgvjt = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +/// NSExtendedMutableArray +extension NSExtendedMutableArray on objc.NSMutableArray { + /// addObjectsFromArray: + void addObjectsFromArray_(objc.NSArray otherArray) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_addObjectsFromArray_, otherArray.ref.pointer); + } + + /// exchangeObjectAtIndex:withObjectAtIndex: + void exchangeObjectAtIndex_withObjectAtIndex_( + DartNSUInteger idx1, DartNSUInteger idx2) { + _objc_msgSend_bfp043(this.ref.pointer, + _sel_exchangeObjectAtIndex_withObjectAtIndex_, idx1, idx2); + } + + /// removeAllObjects + void removeAllObjects() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_removeAllObjects); + } + + /// removeObject:inRange: + void removeObject_inRange_(objc.ObjCObjectBase anObject, NSRange range) { + _objc_msgSend_16f6m81(this.ref.pointer, _sel_removeObject_inRange_, + anObject.ref.pointer, range); + } + + /// removeObject: + void removeObject_(objc.ObjCObjectBase anObject) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_removeObject_, anObject.ref.pointer); + } + + /// removeObjectIdenticalTo:inRange: + void removeObjectIdenticalTo_inRange_( + objc.ObjCObjectBase anObject, NSRange range) { + _objc_msgSend_16f6m81(this.ref.pointer, + _sel_removeObjectIdenticalTo_inRange_, anObject.ref.pointer, range); + } + + /// removeObjectIdenticalTo: + void removeObjectIdenticalTo_(objc.ObjCObjectBase anObject) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_removeObjectIdenticalTo_, anObject.ref.pointer); + } + + /// removeObjectsFromIndices:numIndices: + void removeObjectsFromIndices_numIndices_( + ffi.Pointer indices, DartNSUInteger cnt) { + _objc_msgSend_swohtd(this.ref.pointer, + _sel_removeObjectsFromIndices_numIndices_, indices, cnt); + } + + /// removeObjectsInArray: + void removeObjectsInArray_(objc.NSArray otherArray) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_removeObjectsInArray_, otherArray.ref.pointer); + } + + /// removeObjectsInRange: + void removeObjectsInRange_(NSRange range) { + _objc_msgSend_1e3pm0z(this.ref.pointer, _sel_removeObjectsInRange_, range); + } + + /// replaceObjectsInRange:withObjectsFromArray:range: + void replaceObjectsInRange_withObjectsFromArray_range_( + NSRange range, objc.NSArray otherArray, NSRange otherRange) { + _objc_msgSend_169h6dj( + this.ref.pointer, + _sel_replaceObjectsInRange_withObjectsFromArray_range_, + range, + otherArray.ref.pointer, + otherRange); + } + + /// replaceObjectsInRange:withObjectsFromArray: + void replaceObjectsInRange_withObjectsFromArray_( + NSRange range, objc.NSArray otherArray) { + _objc_msgSend_i4ny2p( + this.ref.pointer, + _sel_replaceObjectsInRange_withObjectsFromArray_, + range, + otherArray.ref.pointer); + } + + /// setArray: + void setArray_(objc.NSArray otherArray) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_setArray_, otherArray.ref.pointer); + } + + /// sortUsingFunction:context: + void sortUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context) { + _objc_msgSend_1bvics1( + this.ref.pointer, _sel_sortUsingFunction_context_, compare, context); + } + + /// sortUsingSelector: + void sortUsingSelector_(ffi.Pointer comparator) { + _objc_msgSend_1d9e4oe( + this.ref.pointer, _sel_sortUsingSelector_, comparator); + } + + /// insertObjects:atIndexes: + void insertObjects_atIndexes_(objc.NSArray objects, objc.NSIndexSet indexes) { + _objc_msgSend_wjvic9(this.ref.pointer, _sel_insertObjects_atIndexes_, + objects.ref.pointer, indexes.ref.pointer); + } + + /// removeObjectsAtIndexes: + void removeObjectsAtIndexes_(objc.NSIndexSet indexes) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_removeObjectsAtIndexes_, indexes.ref.pointer); + } + + /// replaceObjectsAtIndexes:withObjects: + void replaceObjectsAtIndexes_withObjects_( + objc.NSIndexSet indexes, objc.NSArray objects) { + _objc_msgSend_wjvic9( + this.ref.pointer, + _sel_replaceObjectsAtIndexes_withObjects_, + indexes.ref.pointer, + objects.ref.pointer); + } + + /// setObject:atIndexedSubscript: + void setObject_atIndexedSubscript_( + objc.ObjCObjectBase obj, DartNSUInteger idx) { + _objc_msgSend_10i1axw(this.ref.pointer, _sel_setObject_atIndexedSubscript_, + obj.ref.pointer, idx); + } + + /// sortUsingComparator: + void sortUsingComparator_(DartNSComparator cmptr) { + _objc_msgSend_f167m6( + this.ref.pointer, _sel_sortUsingComparator_, cmptr.ref.pointer); + } + + /// sortWithOptions:usingComparator: + void sortWithOptions_usingComparator_( + objc.NSSortOptions opts, DartNSComparator cmptr) { + _objc_msgSend_jjgvjt(this.ref.pointer, + _sel_sortWithOptions_usingComparator_, opts.value, cmptr.ref.pointer); + } +} + +late final _sel_arrayWithCapacity_ = objc.registerName("arrayWithCapacity:"); + +/// NSMutableArrayCreation +extension NSMutableArrayCreation on objc.NSMutableArray { + /// arrayWithCapacity: + static objc.NSMutableArray arrayWithCapacity_(DartNSUInteger numItems) { + final _ret = _objc_msgSend_1qrcblu( + _class_NSMutableArray, _sel_arrayWithCapacity_, numItems); + return objc.NSMutableArray.castFromPointer(_ret, + retain: true, release: true); + } + + /// arrayWithContentsOfFile: + static objc.NSMutableArray? arrayWithContentsOfFile_(objc.NSString path) { + final _ret = _objc_msgSend_62nh5j( + _class_NSMutableArray, _sel_arrayWithContentsOfFile_, path.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSMutableArray.castFromPointer(_ret, + retain: true, release: true); + } + + /// arrayWithContentsOfURL: + static objc.NSMutableArray? arrayWithContentsOfURL_(objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j( + _class_NSMutableArray, _sel_arrayWithContentsOfURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSMutableArray.castFromPointer(_ret, + retain: true, release: true); + } + + /// initWithContentsOfFile: + objc.NSMutableArray? initWithContentsOfFile_(objc.NSString path) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_, path.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSMutableArray.castFromPointer(_ret, + retain: false, release: true); + } + + /// initWithContentsOfURL: + objc.NSMutableArray? initWithContentsOfURL_(objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSMutableArray.castFromPointer(_ret, + retain: false, release: true); + } +} + +late final _sel_applyDifference_ = objc.registerName("applyDifference:"); + +/// NSMutableArrayDiffing +extension NSMutableArrayDiffing on objc.NSMutableArray { + /// applyDifference: + void applyDifference_(objc.NSOrderedCollectionDifference difference) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_applyDifference_, difference.ref.pointer); + } +} + +void _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock?, objc.NSError)>`. +abstract final class ObjCBlock_ffiVoid_objcObjCObject_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock?, objc.NSError)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, + objc.NSError)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock?, objc.NSError)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock?, objc.NSError)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock?, objc.NSError)> fromFunction( + void Function(objc.ObjCObjectBase?, objc.NSError) fn) => + objc.ObjCBlock?, objc.NSError)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, retain: true, release: true), + objc.NSError.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc + .ObjCBlock?, objc.NSError)> + listener(void Function(objc.ObjCObjectBase?, objc.NSError) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn( + arg0.address == 0 + ? null + : objc.ObjCObjectBase(arg0, retain: false, release: true), + objc.NSError.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_wjvic9(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, + objc.NSError)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock?, objc.NSError)>`. +extension ObjCBlock_ffiVoid_objcObjCObject_NSError_CallExtension on objc + .ObjCBlock?, objc.NSError)> { + void call(objc.ObjCObjectBase? arg0, objc.NSError arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1.ref.pointer); +} + +typedef NSItemProviderCompletionHandler = ffi.Pointer; +typedef DartNSItemProviderCompletionHandler = objc + .ObjCBlock?, objc.NSError)>; +void + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrTrampoline( + ffi.Pointer block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + NSItemProviderCompletionHandler, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + NSItemProviderCompletionHandler, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureTrampoline( + ffi.Pointer block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as void Function( + NSItemProviderCompletionHandler, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + NSItemProviderCompletionHandler, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_listenerTrampoline( + ffi.Pointer block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) { + (objc.getBlockClosure(block) as void Function( + NSItemProviderCompletionHandler, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + NSItemProviderCompletionHandler, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + NSItemProviderCompletionHandler, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock?, objc.NSError)>, ffi.Pointer, objc.NSDictionary)>`. +abstract final class ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSError)>, + ffi.Pointer, + objc.NSDictionary)> + castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock?, objc.NSError)>, + ffi.Pointer, + objc.NSDictionary)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSError)>, + ffi.Pointer, + objc.NSDictionary)> + fromFunctionPointer(ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock?, objc.NSError)>, + ffi.Pointer, + objc.NSDictionary)>(objc.newPointerBlock(_ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_fnPtrCallable, ptr.cast()), retain: false, release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock?, objc.NSError)>, ffi.Pointer, objc.NSDictionary)> + fromFunction(void Function(DartNSItemProviderCompletionHandler, objc.ObjCObjectBase, objc.NSDictionary) fn) => + objc.ObjCBlock?, objc.NSError)>, ffi.Pointer, objc.NSDictionary)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_closureCallable, + (NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, retain: true, release: true), + objc.ObjCObjectBase(arg1, retain: true, release: true), + objc.NSDictionary.castFromPointer(arg2, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSError)>, + ffi.Pointer, + objc.NSDictionary)> listener( + void Function(DartNSItemProviderCompletionHandler, objc.ObjCObjectBase, + objc.NSDictionary) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_listenerCallable + .nativeFunction + .cast(), + (NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, + retain: false, release: true), + objc.ObjCObjectBase(arg1, retain: false, release: true), + objc.NSDictionary.castFromPointer(arg2, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_1j2nt86(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSError)>, + ffi.Pointer, + objc.NSDictionary)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock?, objc.NSError)>, ffi.Pointer, objc.NSDictionary)>`. +extension ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSError)>, + ffi.Pointer, + objc.NSDictionary)> { + void call(DartNSItemProviderCompletionHandler arg0, objc.ObjCObjectBase arg1, + objc.NSDictionary arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + NSItemProviderCompletionHandler arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + NSItemProviderCompletionHandler, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, arg0.ref.pointer, arg1.ref.pointer, arg2.ref.pointer); +} + +typedef NSItemProviderLoadHandler = ffi.Pointer; +typedef DartNSItemProviderLoadHandler = objc.ObjCBlock< + ffi.Void Function( + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer?, objc.NSError)>, + ffi.Pointer, + objc.NSDictionary)>; +late final _class_NSItemProvider = objc.getClass("NSItemProvider"); +late final _sel_previewImageHandler = objc.registerName("previewImageHandler"); +final _objc_msgSend_uwvaik = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPreviewImageHandler_ = + objc.registerName("setPreviewImageHandler:"); +late final _sel_loadPreviewImageWithOptions_completionHandler_ = + objc.registerName("loadPreviewImageWithOptions:completionHandler:"); + +/// NSPreviewSupport +extension NSPreviewSupport on objc.NSItemProvider { + /// previewImageHandler + DartNSItemProviderLoadHandler? get previewImageHandler { + final _ret = + _objc_msgSend_uwvaik(this.ref.pointer, _sel_previewImageHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSItemProviderCompletionHandler_objcObjCObject_NSDictionary + .castFromPointer(_ret, retain: true, release: true); + } + + /// setPreviewImageHandler: + set previewImageHandler(DartNSItemProviderLoadHandler? value) { + return _objc_msgSend_f167m6(this.ref.pointer, _sel_setPreviewImageHandler_, + value?.ref.pointer ?? ffi.nullptr); + } + + /// loadPreviewImageWithOptions:completionHandler: + void loadPreviewImageWithOptions_completionHandler_(objc.NSDictionary options, + DartNSItemProviderCompletionHandler completionHandler) { + _objc_msgSend_14pxqbs( + this.ref.pointer, + _sel_loadPreviewImageWithOptions_completionHandler_, + options.ref.pointer, + completionHandler.ref.pointer); + } +} + +typedef NSStringEncoding = NSUInteger; +late final _class_NSString = objc.getClass("NSString"); +late final _sel_substringFromIndex_ = objc.registerName("substringFromIndex:"); +late final _sel_substringToIndex_ = objc.registerName("substringToIndex:"); +late final _sel_substringWithRange_ = objc.registerName("substringWithRange:"); +late final _sel_getCharacters_range_ = + objc.registerName("getCharacters:range:"); +final _objc_msgSend_898fog = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>(); +late final _sel_compare_options_ = objc.registerName("compare:options:"); +final _objc_msgSend_16ydezh = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_compare_options_range_ = + objc.registerName("compare:options:range:"); +final _objc_msgSend_eeuxub = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + objc.NSRange)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +late final _sel_compare_options_range_locale_ = + objc.registerName("compare:options:range:locale:"); +final _objc_msgSend_i4hdht = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_caseInsensitiveCompare_ = + objc.registerName("caseInsensitiveCompare:"); +late final _sel_localizedCompare_ = objc.registerName("localizedCompare:"); +late final _sel_localizedCaseInsensitiveCompare_ = + objc.registerName("localizedCaseInsensitiveCompare:"); +late final _sel_localizedStandardCompare_ = + objc.registerName("localizedStandardCompare:"); +late final _sel_isEqualToString_ = objc.registerName("isEqualToString:"); +late final _sel_hasPrefix_ = objc.registerName("hasPrefix:"); +late final _sel_hasSuffix_ = objc.registerName("hasSuffix:"); +late final _sel_commonPrefixWithString_options_ = + objc.registerName("commonPrefixWithString:options:"); +final _objc_msgSend_fcs5vo = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_containsString_ = objc.registerName("containsString:"); +late final _sel_localizedCaseInsensitiveContainsString_ = + objc.registerName("localizedCaseInsensitiveContainsString:"); +late final _sel_localizedStandardContainsString_ = + objc.registerName("localizedStandardContainsString:"); +late final _sel_localizedStandardRangeOfString_ = + objc.registerName("localizedStandardRangeOfString:"); +final _objc_msgSend_x4muu7 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_x4muu7Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_rangeOfString_ = objc.registerName("rangeOfString:"); +late final _sel_rangeOfString_options_ = + objc.registerName("rangeOfString:options:"); +final _objc_msgSend_1kwndnw = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger)>>() + .asFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +final _objc_msgSend_1kwndnwStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_rangeOfString_options_range_ = + objc.registerName("rangeOfString:options:range:"); +final _objc_msgSend_ackzik = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + objc.NSRange)>>() + .asFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +final _objc_msgSend_ackzikStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + objc.NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +late final _sel_rangeOfString_options_range_locale_ = + objc.registerName("rangeOfString:options:range:locale:"); +final _objc_msgSend_198mga8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + objc.NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange, + ffi.Pointer)>(); +final _objc_msgSend_198mga8Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_rangeOfCharacterFromSet_ = + objc.registerName("rangeOfCharacterFromSet:"); +late final _sel_rangeOfCharacterFromSet_options_ = + objc.registerName("rangeOfCharacterFromSet:options:"); +late final _sel_rangeOfCharacterFromSet_options_range_ = + objc.registerName("rangeOfCharacterFromSet:options:range:"); +late final _sel_rangeOfComposedCharacterSequenceAtIndex_ = + objc.registerName("rangeOfComposedCharacterSequenceAtIndex:"); +final _objc_msgSend_d3i1uy = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_d3i1uyStret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_rangeOfComposedCharacterSequencesForRange_ = + objc.registerName("rangeOfComposedCharacterSequencesForRange:"); +final _objc_msgSend_uimyc7 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, objc.NSRange)>>() + .asFunction< + objc.NSRange Function(ffi.Pointer, + ffi.Pointer, objc.NSRange)>(); +final _objc_msgSend_uimyc7Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer, objc.NSRange)>(); +late final _sel_stringByAppendingString_ = + objc.registerName("stringByAppendingString:"); +late final _sel_stringByAppendingFormat_ = + objc.registerName("stringByAppendingFormat:"); +late final _sel_doubleValue = objc.registerName("doubleValue"); +late final _sel_floatValue = objc.registerName("floatValue"); +late final _sel_intValue = objc.registerName("intValue"); +final _objc_msgSend_13yqbb6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_integerValue = objc.registerName("integerValue"); +late final _sel_longLongValue = objc.registerName("longLongValue"); +late final _sel_boolValue = objc.registerName("boolValue"); +late final _sel_uppercaseString = objc.registerName("uppercaseString"); +late final _sel_lowercaseString = objc.registerName("lowercaseString"); +late final _sel_capitalizedString = objc.registerName("capitalizedString"); +late final _sel_localizedUppercaseString = + objc.registerName("localizedUppercaseString"); +late final _sel_localizedLowercaseString = + objc.registerName("localizedLowercaseString"); +late final _sel_localizedCapitalizedString = + objc.registerName("localizedCapitalizedString"); +late final _sel_uppercaseStringWithLocale_ = + objc.registerName("uppercaseStringWithLocale:"); +late final _sel_lowercaseStringWithLocale_ = + objc.registerName("lowercaseStringWithLocale:"); +late final _sel_capitalizedStringWithLocale_ = + objc.registerName("capitalizedStringWithLocale:"); +late final _sel_getLineStart_end_contentsEnd_forRange_ = + objc.registerName("getLineStart:end:contentsEnd:forRange:"); +final _objc_msgSend_ourvf2 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + objc.NSRange)>(); +late final _sel_lineRangeForRange_ = objc.registerName("lineRangeForRange:"); +late final _sel_getParagraphStart_end_contentsEnd_forRange_ = + objc.registerName("getParagraphStart:end:contentsEnd:forRange:"); +late final _sel_paragraphRangeForRange_ = + objc.registerName("paragraphRangeForRange:"); +void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + NSRange arg1, NSRange arg2, ffi.Pointer arg3)>>() + .asFunction< + void Function(ffi.Pointer, NSRange, NSRange, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + NSRange, NSRange, ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + NSRange, NSRange, ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_listenerCallable = ffi + .NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + objc.NSString?, objc.NSRange, objc.NSRange, ffi.Pointer)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSString?, objc.NSRange, objc.NSRange, + ffi.Pointer)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunctionPointer(ffi.Pointer arg0, NSRange arg1, NSRange arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(objc.NSString?, objc.NSRange, objc.NSRange, + ffi.Pointer)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunction( + void Function(objc.NSString?, NSRange, NSRange, ffi.Pointer) + fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureCallable, + (ffi.Pointer arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) => + fn(arg0.address == 0 ? null : objc.NSString.castFromPointer(arg0, retain: true, release: true), arg1, arg2, arg3)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(objc.NSString?, objc.NSRange, objc.NSRange, + ffi.Pointer)> listener( + void Function(objc.NSString?, NSRange, NSRange, ffi.Pointer) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) => + fn( + arg0.address == 0 + ? null + : objc.NSString.castFromPointer(arg0, + retain: false, release: true), + arg1, + arg2, + arg3)); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_8wbg7l(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSString?, objc.NSRange, objc.NSRange, + ffi.Pointer)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_CallExtension + on objc.ObjCBlock< + ffi.Void Function(objc.NSString?, objc.NSRange, objc.NSRange, + ffi.Pointer)> { + void call(objc.NSString? arg0, NSRange arg1, NSRange arg2, + ffi.Pointer arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + NSRange arg1, + NSRange arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + NSRange, + NSRange, + ffi.Pointer)>()( + ref.pointer, arg0?.ref.pointer ?? ffi.nullptr, arg1, arg2, arg3); +} + +late final _sel_enumerateSubstringsInRange_options_usingBlock_ = + objc.registerName("enumerateSubstringsInRange:options:usingBlock:"); +final _objc_msgSend_14ew8zr = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + NSUInteger, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + int, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_NSString_bool_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_bool_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_NSString_bool_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSString_bool_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSString_bool_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSString_bool_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_NSString_bool { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(objc.NSString, ffi.Pointer)>( + pointer, + retain: retain, + release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSString_bool_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunction(void Function(objc.NSString, ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSString_bool_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + objc.NSString.castFromPointer(arg0, + retain: true, release: true), + arg1)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock)> + listener(void Function(objc.NSString, ffi.Pointer) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSString_bool_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + objc.NSString.castFromPointer(arg0, retain: false, release: true), + arg1)); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_148br51(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(objc.NSString, ffi.Pointer)>(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_NSString_bool_CallExtension + on objc.ObjCBlock)> { + void call(objc.NSString arg0, ffi.Pointer arg1) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0.ref.pointer, arg1); +} + +late final _sel_enumerateLinesUsingBlock_ = + objc.registerName("enumerateLinesUsingBlock:"); +late final _sel_UTF8String = objc.registerName("UTF8String"); +final _objc_msgSend_1fuqfwb = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_fastestEncoding = objc.registerName("fastestEncoding"); +late final _sel_smallestEncoding = objc.registerName("smallestEncoding"); +late final _sel_dataUsingEncoding_allowLossyConversion_ = + objc.registerName("dataUsingEncoding:allowLossyConversion:"); +final _objc_msgSend_rubz6a = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, bool)>(); +late final _sel_dataUsingEncoding_ = objc.registerName("dataUsingEncoding:"); +late final _sel_canBeConvertedToEncoding_ = + objc.registerName("canBeConvertedToEncoding:"); +final _objc_msgSend_6peh6o = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_cStringUsingEncoding_ = + objc.registerName("cStringUsingEncoding:"); +final _objc_msgSend_1jtxufi = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_getCString_maxLength_encoding_ = + objc.registerName("getCString:maxLength:encoding:"); +final _objc_msgSend_1lv8yz3 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); +late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_ = + objc.registerName( + "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); +final _objc_msgSend_i30zh3 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.UnsignedLong, + NSUInteger, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + int, + int, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_maximumLengthOfBytesUsingEncoding_ = + objc.registerName("maximumLengthOfBytesUsingEncoding:"); +final _objc_msgSend_12py2ux = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_lengthOfBytesUsingEncoding_ = + objc.registerName("lengthOfBytesUsingEncoding:"); +late final _sel_availableStringEncodings = + objc.registerName("availableStringEncodings"); +final _objc_msgSend_1h2q612 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_localizedNameOfStringEncoding_ = + objc.registerName("localizedNameOfStringEncoding:"); +late final _sel_defaultCStringEncoding = + objc.registerName("defaultCStringEncoding"); +late final _sel_decomposedStringWithCanonicalMapping = + objc.registerName("decomposedStringWithCanonicalMapping"); +late final _sel_precomposedStringWithCanonicalMapping = + objc.registerName("precomposedStringWithCanonicalMapping"); +late final _sel_decomposedStringWithCompatibilityMapping = + objc.registerName("decomposedStringWithCompatibilityMapping"); +late final _sel_precomposedStringWithCompatibilityMapping = + objc.registerName("precomposedStringWithCompatibilityMapping"); +late final _sel_componentsSeparatedByString_ = + objc.registerName("componentsSeparatedByString:"); +late final _sel_componentsSeparatedByCharactersInSet_ = + objc.registerName("componentsSeparatedByCharactersInSet:"); +late final _sel_stringByTrimmingCharactersInSet_ = + objc.registerName("stringByTrimmingCharactersInSet:"); +late final _sel_stringByPaddingToLength_withString_startingAtIndex_ = + objc.registerName("stringByPaddingToLength:withString:startingAtIndex:"); +final _objc_msgSend_exgdqb = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + int)>(); +late final _sel_stringByFoldingWithOptions_locale_ = + objc.registerName("stringByFoldingWithOptions:locale:"); +final _objc_msgSend_146986e = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + NSUInteger, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_ = + objc.registerName( + "stringByReplacingOccurrencesOfString:withString:options:range:"); +final _objc_msgSend_1wrs2o6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + objc.NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +late final _sel_stringByReplacingOccurrencesOfString_withString_ = + objc.registerName("stringByReplacingOccurrencesOfString:withString:"); +late final _sel_stringByReplacingCharactersInRange_withString_ = + objc.registerName("stringByReplacingCharactersInRange:withString:"); +final _objc_msgSend_197wcu5 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + objc.NSRange, + ffi.Pointer)>(); +typedef NSStringTransform = ffi.Pointer; +typedef DartNSStringTransform = objc.NSString; +late final _sel_stringByApplyingTransform_reverse_ = + objc.registerName("stringByApplyingTransform:reverse:"); +late final _sel_writeToURL_atomically_encoding_error_ = + objc.registerName("writeToURL:atomically:encoding:error:"); +final _objc_msgSend_1140663 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); +late final _sel_writeToFile_atomically_encoding_error_ = + objc.registerName("writeToFile:atomically:encoding:error:"); +late final _sel_hash = objc.registerName("hash"); +late final _sel_initWithCharactersNoCopy_length_freeWhenDone_ = + objc.registerName("initWithCharactersNoCopy:length:freeWhenDone:"); +final _objc_msgSend_zsd8q9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + bool)>(); +void _ObjCBlock_ffiVoid_unichar_NSUInteger_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction, int)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_unichar_NSUInteger_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>( + _ObjCBlock_ffiVoid_unichar_NSUInteger_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_unichar_NSUInteger_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, int))( + arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_unichar_NSUInteger_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>( + _ObjCBlock_ffiVoid_unichar_NSUInteger_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_unichar_NSUInteger_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, int))( + arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, NSUInteger)> + _ObjCBlock_ffiVoid_unichar_NSUInteger_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>.listener( + _ObjCBlock_ffiVoid_unichar_NSUInteger_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, ffi.UnsignedLong)>`. +abstract final class ObjCBlock_ffiVoid_unichar_NSUInteger { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock, ffi.UnsignedLong)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.UnsignedLong)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong)> fromFunctionPointer( + ffi.Pointer arg0, NSUInteger arg1)>> + ptr) => + objc.ObjCBlock, ffi.UnsignedLong)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_unichar_NSUInteger_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong)> fromFunction( + void Function(ffi.Pointer, DartNSUInteger) fn) => + objc.ObjCBlock, ffi.UnsignedLong)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_unichar_NSUInteger_closureCallable, + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc + .ObjCBlock, ffi.UnsignedLong)> + listener(void Function(ffi.Pointer, DartNSUInteger) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_unichar_NSUInteger_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1)); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_vhbh5h(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong)>(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, ffi.UnsignedLong)>`. +extension ObjCBlock_ffiVoid_unichar_NSUInteger_CallExtension on objc + .ObjCBlock, ffi.UnsignedLong)> { + void call(ffi.Pointer arg0, DartNSUInteger arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>()(ref.pointer, arg0, arg1); +} + +late final _sel_initWithCharactersNoCopy_length_deallocator_ = + objc.registerName("initWithCharactersNoCopy:length:deallocator:"); +final _objc_msgSend_1pr13r6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_initWithCharacters_length_ = + objc.registerName("initWithCharacters:length:"); +final _objc_msgSend_13z9dkp = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_initWithUTF8String_ = objc.registerName("initWithUTF8String:"); +final _objc_msgSend_rqwdif = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithFormat_ = objc.registerName("initWithFormat:"); +late final _sel_initWithFormat_locale_ = + objc.registerName("initWithFormat:locale:"); +late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_ = + objc.registerName("initWithValidatedFormat:validFormatSpecifiers:error:"); +final _objc_msgSend_bo6ep4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_ = + objc.registerName( + "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); +final _objc_msgSend_2izev6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithData_encoding_ = + objc.registerName("initWithData:encoding:"); +late final _sel_initWithBytes_length_encoding_ = + objc.registerName("initWithBytes:length:encoding:"); +final _objc_msgSend_i38ton = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); +late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_ = + objc.registerName("initWithBytesNoCopy:length:encoding:freeWhenDone:"); +final _objc_msgSend_o2ktnn = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + bool)>(); +void _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction, int)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>( + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, int))( + arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>( + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer, int))( + arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer, NSUInteger)> + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, NSUInteger)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock, ffi.UnsignedLong)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSUInteger { + /// Returns a block that wraps the given raw block pointer. + static objc + .ObjCBlock, ffi.UnsignedLong)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, + ffi.UnsignedLong)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong)> fromFunctionPointer( + ffi.Pointer arg0, NSUInteger arg1)>> + ptr) => + objc.ObjCBlock, ffi.UnsignedLong)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc + .ObjCBlock, ffi.UnsignedLong)> + fromFunction(void Function(ffi.Pointer, DartNSUInteger) fn) => + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong)>( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_closureCallable, + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc + .ObjCBlock, ffi.UnsignedLong)> + listener(void Function(ffi.Pointer, DartNSUInteger) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_NSUInteger_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1)); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_zuf90e(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong)>(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock, ffi.UnsignedLong)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSUInteger_CallExtension on objc + .ObjCBlock, ffi.UnsignedLong)> { + void call(ffi.Pointer arg0, DartNSUInteger arg1) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0, NSUInteger arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>()(ref.pointer, arg0, arg1); +} + +late final _sel_initWithBytesNoCopy_length_encoding_deallocator_ = + objc.registerName("initWithBytesNoCopy:length:encoding:deallocator:"); +final _objc_msgSend_1nnfqvg = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_stringWithString_ = objc.registerName("stringWithString:"); +late final _sel_stringWithCharacters_length_ = + objc.registerName("stringWithCharacters:length:"); +late final _sel_stringWithUTF8String_ = + objc.registerName("stringWithUTF8String:"); +late final _sel_stringWithFormat_ = objc.registerName("stringWithFormat:"); +late final _sel_localizedStringWithFormat_ = + objc.registerName("localizedStringWithFormat:"); +late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_ = + objc.registerName("stringWithValidatedFormat:validFormatSpecifiers:error:"); +late final _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_ = + objc.registerName( + "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); +late final _sel_initWithCString_encoding_ = + objc.registerName("initWithCString:encoding:"); +final _objc_msgSend_a15xhc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_stringWithCString_encoding_ = + objc.registerName("stringWithCString:encoding:"); +late final _sel_initWithContentsOfURL_encoding_error_ = + objc.registerName("initWithContentsOfURL:encoding:error:"); +final _objc_msgSend_94cet5 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initWithContentsOfFile_encoding_error_ = + objc.registerName("initWithContentsOfFile:encoding:error:"); +late final _sel_stringWithContentsOfURL_encoding_error_ = + objc.registerName("stringWithContentsOfURL:encoding:error:"); +late final _sel_stringWithContentsOfFile_encoding_error_ = + objc.registerName("stringWithContentsOfFile:encoding:error:"); +late final _sel_initWithContentsOfURL_usedEncoding_error_ = + objc.registerName("initWithContentsOfURL:usedEncoding:error:"); +final _objc_msgSend_1gxo8gv = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithContentsOfFile_usedEncoding_error_ = + objc.registerName("initWithContentsOfFile:usedEncoding:error:"); +late final _sel_stringWithContentsOfURL_usedEncoding_error_ = + objc.registerName("stringWithContentsOfURL:usedEncoding:error:"); +late final _sel_stringWithContentsOfFile_usedEncoding_error_ = + objc.registerName("stringWithContentsOfFile:usedEncoding:error:"); + +/// NSStringExtensionMethods +extension NSStringExtensionMethods on objc.NSString { + /// substringFromIndex: + objc.NSString substringFromIndex_(DartNSUInteger from) { + final _ret = + _objc_msgSend_1qrcblu(this.ref.pointer, _sel_substringFromIndex_, from); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// substringToIndex: + objc.NSString substringToIndex_(DartNSUInteger to) { + final _ret = + _objc_msgSend_1qrcblu(this.ref.pointer, _sel_substringToIndex_, to); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// substringWithRange: + objc.NSString substringWithRange_(NSRange range) { + final _ret = + _objc_msgSend_83z673(this.ref.pointer, _sel_substringWithRange_, range); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// getCharacters:range: + void getCharacters_range_(ffi.Pointer buffer, NSRange range) { + _objc_msgSend_898fog( + this.ref.pointer, _sel_getCharacters_range_, buffer, range); + } + + /// compare: + objc.NSComparisonResult compare_(objc.NSString string) { + final _ret = _objc_msgSend_1wpduvy( + this.ref.pointer, _sel_compare_, string.ref.pointer); + return objc.NSComparisonResult.fromValue(_ret); + } + + /// compare:options: + objc.NSComparisonResult compare_options_( + objc.NSString string, objc.NSStringCompareOptions mask) { + final _ret = _objc_msgSend_16ydezh(this.ref.pointer, _sel_compare_options_, + string.ref.pointer, mask.value); + return objc.NSComparisonResult.fromValue(_ret); + } + + /// compare:options:range: + objc.NSComparisonResult compare_options_range_(objc.NSString string, + objc.NSStringCompareOptions mask, NSRange rangeOfReceiverToCompare) { + final _ret = _objc_msgSend_eeuxub( + this.ref.pointer, + _sel_compare_options_range_, + string.ref.pointer, + mask.value, + rangeOfReceiverToCompare); + return objc.NSComparisonResult.fromValue(_ret); + } + + /// compare:options:range:locale: + objc.NSComparisonResult compare_options_range_locale_( + objc.NSString string, + objc.NSStringCompareOptions mask, + NSRange rangeOfReceiverToCompare, + objc.ObjCObjectBase? locale) { + final _ret = _objc_msgSend_i4hdht( + this.ref.pointer, + _sel_compare_options_range_locale_, + string.ref.pointer, + mask.value, + rangeOfReceiverToCompare, + locale?.ref.pointer ?? ffi.nullptr); + return objc.NSComparisonResult.fromValue(_ret); + } + + /// caseInsensitiveCompare: + objc.NSComparisonResult caseInsensitiveCompare_(objc.NSString string) { + final _ret = _objc_msgSend_1wpduvy( + this.ref.pointer, _sel_caseInsensitiveCompare_, string.ref.pointer); + return objc.NSComparisonResult.fromValue(_ret); + } + + /// localizedCompare: + objc.NSComparisonResult localizedCompare_(objc.NSString string) { + final _ret = _objc_msgSend_1wpduvy( + this.ref.pointer, _sel_localizedCompare_, string.ref.pointer); + return objc.NSComparisonResult.fromValue(_ret); + } + + /// localizedCaseInsensitiveCompare: + objc.NSComparisonResult localizedCaseInsensitiveCompare_( + objc.NSString string) { + final _ret = _objc_msgSend_1wpduvy(this.ref.pointer, + _sel_localizedCaseInsensitiveCompare_, string.ref.pointer); + return objc.NSComparisonResult.fromValue(_ret); + } + + /// localizedStandardCompare: + objc.NSComparisonResult localizedStandardCompare_(objc.NSString string) { + final _ret = _objc_msgSend_1wpduvy( + this.ref.pointer, _sel_localizedStandardCompare_, string.ref.pointer); + return objc.NSComparisonResult.fromValue(_ret); + } + + /// isEqualToString: + bool isEqualToString_(objc.NSString aString) { + return _objc_msgSend_69e0x1( + this.ref.pointer, _sel_isEqualToString_, aString.ref.pointer); + } + + /// hasPrefix: + bool hasPrefix_(objc.NSString str) { + return _objc_msgSend_69e0x1( + this.ref.pointer, _sel_hasPrefix_, str.ref.pointer); + } + + /// hasSuffix: + bool hasSuffix_(objc.NSString str) { + return _objc_msgSend_69e0x1( + this.ref.pointer, _sel_hasSuffix_, str.ref.pointer); + } + + /// commonPrefixWithString:options: + objc.NSString commonPrefixWithString_options_( + objc.NSString str, objc.NSStringCompareOptions mask) { + final _ret = _objc_msgSend_fcs5vo(this.ref.pointer, + _sel_commonPrefixWithString_options_, str.ref.pointer, mask.value); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// containsString: + bool containsString_(objc.NSString str) { + return _objc_msgSend_69e0x1( + this.ref.pointer, _sel_containsString_, str.ref.pointer); + } + + /// localizedCaseInsensitiveContainsString: + bool localizedCaseInsensitiveContainsString_(objc.NSString str) { + return _objc_msgSend_69e0x1(this.ref.pointer, + _sel_localizedCaseInsensitiveContainsString_, str.ref.pointer); + } + + /// localizedStandardContainsString: + bool localizedStandardContainsString_(objc.NSString str) { + return _objc_msgSend_69e0x1(this.ref.pointer, + _sel_localizedStandardContainsString_, str.ref.pointer); + } + + /// localizedStandardRangeOfString: + NSRange localizedStandardRangeOfString_(objc.NSString str) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_x4muu7Stret(_ptr, this.ref.pointer, + _sel_localizedStandardRangeOfString_, str.ref.pointer) + : _ptr.ref = _objc_msgSend_x4muu7(this.ref.pointer, + _sel_localizedStandardRangeOfString_, str.ref.pointer); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// rangeOfString: + NSRange rangeOfString_(objc.NSString searchString) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_x4muu7Stret(_ptr, this.ref.pointer, _sel_rangeOfString_, + searchString.ref.pointer) + : _ptr.ref = _objc_msgSend_x4muu7( + this.ref.pointer, _sel_rangeOfString_, searchString.ref.pointer); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// rangeOfString:options: + NSRange rangeOfString_options_( + objc.NSString searchString, objc.NSStringCompareOptions mask) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1kwndnwStret(_ptr, this.ref.pointer, + _sel_rangeOfString_options_, searchString.ref.pointer, mask.value) + : _ptr.ref = _objc_msgSend_1kwndnw(this.ref.pointer, + _sel_rangeOfString_options_, searchString.ref.pointer, mask.value); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// rangeOfString:options:range: + NSRange rangeOfString_options_range_(objc.NSString searchString, + objc.NSStringCompareOptions mask, NSRange rangeOfReceiverToSearch) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_ackzikStret( + _ptr, + this.ref.pointer, + _sel_rangeOfString_options_range_, + searchString.ref.pointer, + mask.value, + rangeOfReceiverToSearch) + : _ptr.ref = _objc_msgSend_ackzik( + this.ref.pointer, + _sel_rangeOfString_options_range_, + searchString.ref.pointer, + mask.value, + rangeOfReceiverToSearch); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// rangeOfString:options:range:locale: + NSRange rangeOfString_options_range_locale_( + objc.NSString searchString, + objc.NSStringCompareOptions mask, + NSRange rangeOfReceiverToSearch, + objc.NSLocale? locale) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_198mga8Stret( + _ptr, + this.ref.pointer, + _sel_rangeOfString_options_range_locale_, + searchString.ref.pointer, + mask.value, + rangeOfReceiverToSearch, + locale?.ref.pointer ?? ffi.nullptr) + : _ptr.ref = _objc_msgSend_198mga8( + this.ref.pointer, + _sel_rangeOfString_options_range_locale_, + searchString.ref.pointer, + mask.value, + rangeOfReceiverToSearch, + locale?.ref.pointer ?? ffi.nullptr); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// rangeOfCharacterFromSet: + NSRange rangeOfCharacterFromSet_(objc.NSCharacterSet searchSet) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_x4muu7Stret(_ptr, this.ref.pointer, + _sel_rangeOfCharacterFromSet_, searchSet.ref.pointer) + : _ptr.ref = _objc_msgSend_x4muu7(this.ref.pointer, + _sel_rangeOfCharacterFromSet_, searchSet.ref.pointer); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// rangeOfCharacterFromSet:options: + NSRange rangeOfCharacterFromSet_options_( + objc.NSCharacterSet searchSet, objc.NSStringCompareOptions mask) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_1kwndnwStret( + _ptr, + this.ref.pointer, + _sel_rangeOfCharacterFromSet_options_, + searchSet.ref.pointer, + mask.value) + : _ptr.ref = _objc_msgSend_1kwndnw( + this.ref.pointer, + _sel_rangeOfCharacterFromSet_options_, + searchSet.ref.pointer, + mask.value); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// rangeOfCharacterFromSet:options:range: + NSRange rangeOfCharacterFromSet_options_range_(objc.NSCharacterSet searchSet, + objc.NSStringCompareOptions mask, NSRange rangeOfReceiverToSearch) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_ackzikStret( + _ptr, + this.ref.pointer, + _sel_rangeOfCharacterFromSet_options_range_, + searchSet.ref.pointer, + mask.value, + rangeOfReceiverToSearch) + : _ptr.ref = _objc_msgSend_ackzik( + this.ref.pointer, + _sel_rangeOfCharacterFromSet_options_range_, + searchSet.ref.pointer, + mask.value, + rangeOfReceiverToSearch); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// rangeOfComposedCharacterSequenceAtIndex: + NSRange rangeOfComposedCharacterSequenceAtIndex_(DartNSUInteger index) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_d3i1uyStret(_ptr, this.ref.pointer, + _sel_rangeOfComposedCharacterSequenceAtIndex_, index) + : _ptr.ref = _objc_msgSend_d3i1uy(this.ref.pointer, + _sel_rangeOfComposedCharacterSequenceAtIndex_, index); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// rangeOfComposedCharacterSequencesForRange: + NSRange rangeOfComposedCharacterSequencesForRange_(NSRange range) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_uimyc7Stret(_ptr, this.ref.pointer, + _sel_rangeOfComposedCharacterSequencesForRange_, range) + : _ptr.ref = _objc_msgSend_uimyc7(this.ref.pointer, + _sel_rangeOfComposedCharacterSequencesForRange_, range); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// stringByAppendingString: + objc.NSString stringByAppendingString_(objc.NSString aString) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_stringByAppendingString_, aString.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringByAppendingFormat: + objc.NSString stringByAppendingFormat_(objc.NSString format) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_stringByAppendingFormat_, format.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// doubleValue + double get doubleValue { + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(this.ref.pointer, _sel_doubleValue) + : _objc_msgSend_1ukqyt8(this.ref.pointer, _sel_doubleValue); + } + + /// floatValue + double get floatValue { + return objc.useMsgSendVariants + ? _objc_msgSend_2cgrxlFpret(this.ref.pointer, _sel_floatValue) + : _objc_msgSend_2cgrxl(this.ref.pointer, _sel_floatValue); + } + + /// intValue + int get intValue { + return _objc_msgSend_13yqbb6(this.ref.pointer, _sel_intValue); + } + + /// integerValue + DartNSInteger get integerValue { + return _objc_msgSend_1hz7y9r(this.ref.pointer, _sel_integerValue); + } + + /// longLongValue + int get longLongValue { + return _objc_msgSend_1k101e3(this.ref.pointer, _sel_longLongValue); + } + + /// boolValue + bool get boolValue { + return _objc_msgSend_91o635(this.ref.pointer, _sel_boolValue); + } + + /// uppercaseString + objc.NSString get uppercaseString { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_uppercaseString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// lowercaseString + objc.NSString get lowercaseString { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_lowercaseString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// capitalizedString + objc.NSString get capitalizedString { + final _ret = + _objc_msgSend_1x359cv(this.ref.pointer, _sel_capitalizedString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// localizedUppercaseString + objc.NSString get localizedUppercaseString { + final _ret = + _objc_msgSend_1x359cv(this.ref.pointer, _sel_localizedUppercaseString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// localizedLowercaseString + objc.NSString get localizedLowercaseString { + final _ret = + _objc_msgSend_1x359cv(this.ref.pointer, _sel_localizedLowercaseString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// localizedCapitalizedString + objc.NSString get localizedCapitalizedString { + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_localizedCapitalizedString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// uppercaseStringWithLocale: + objc.NSString uppercaseStringWithLocale_(objc.NSLocale? locale) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_uppercaseStringWithLocale_, locale?.ref.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// lowercaseStringWithLocale: + objc.NSString lowercaseStringWithLocale_(objc.NSLocale? locale) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_lowercaseStringWithLocale_, locale?.ref.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// capitalizedStringWithLocale: + objc.NSString capitalizedStringWithLocale_(objc.NSLocale? locale) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_capitalizedStringWithLocale_, locale?.ref.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// getLineStart:end:contentsEnd:forRange: + void getLineStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range) { + _objc_msgSend_ourvf2( + this.ref.pointer, + _sel_getLineStart_end_contentsEnd_forRange_, + startPtr, + lineEndPtr, + contentsEndPtr, + range); + } + + /// lineRangeForRange: + NSRange lineRangeForRange_(NSRange range) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_uimyc7Stret( + _ptr, this.ref.pointer, _sel_lineRangeForRange_, range) + : _ptr.ref = _objc_msgSend_uimyc7( + this.ref.pointer, _sel_lineRangeForRange_, range); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// getParagraphStart:end:contentsEnd:forRange: + void getParagraphStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer parEndPtr, + ffi.Pointer contentsEndPtr, + NSRange range) { + _objc_msgSend_ourvf2( + this.ref.pointer, + _sel_getParagraphStart_end_contentsEnd_forRange_, + startPtr, + parEndPtr, + contentsEndPtr, + range); + } + + /// paragraphRangeForRange: + NSRange paragraphRangeForRange_(NSRange range) { + final _ptr = pkg_ffi.calloc(); + objc.useMsgSendVariants + ? _objc_msgSend_uimyc7Stret( + _ptr, this.ref.pointer, _sel_paragraphRangeForRange_, range) + : _ptr.ref = _objc_msgSend_uimyc7( + this.ref.pointer, _sel_paragraphRangeForRange_, range); + final _finalizable = _ptr.cast().asTypedList( + ffi.sizeOf(), + finalizer: pkg_ffi.calloc.nativeFree); + return ffi.Struct.create(_finalizable); + } + + /// enumerateSubstringsInRange:options:usingBlock: + void enumerateSubstringsInRange_options_usingBlock_( + NSRange range, + objc.NSStringEnumerationOptions opts, + objc.ObjCBlock< + ffi.Void Function(objc.NSString?, objc.NSRange, objc.NSRange, + ffi.Pointer)> + block) { + _objc_msgSend_14ew8zr( + this.ref.pointer, + _sel_enumerateSubstringsInRange_options_usingBlock_, + range, + opts.value, + block.ref.pointer); + } + + /// enumerateLinesUsingBlock: + void enumerateLinesUsingBlock_( + objc.ObjCBlock)> + block) { + _objc_msgSend_f167m6( + this.ref.pointer, _sel_enumerateLinesUsingBlock_, block.ref.pointer); + } + + /// UTF8String + ffi.Pointer get UTF8String { + return _objc_msgSend_1fuqfwb(this.ref.pointer, _sel_UTF8String); + } + + /// fastestEncoding + DartNSUInteger get fastestEncoding { + return _objc_msgSend_xw2lbc(this.ref.pointer, _sel_fastestEncoding); + } + + /// smallestEncoding + DartNSUInteger get smallestEncoding { + return _objc_msgSend_xw2lbc(this.ref.pointer, _sel_smallestEncoding); + } + + /// dataUsingEncoding:allowLossyConversion: + objc.NSData? dataUsingEncoding_allowLossyConversion_( + DartNSUInteger encoding, bool lossy) { + final _ret = _objc_msgSend_rubz6a(this.ref.pointer, + _sel_dataUsingEncoding_allowLossyConversion_, encoding, lossy); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + /// dataUsingEncoding: + objc.NSData? dataUsingEncoding_(DartNSUInteger encoding) { + final _ret = _objc_msgSend_1qrcblu( + this.ref.pointer, _sel_dataUsingEncoding_, encoding); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + /// canBeConvertedToEncoding: + bool canBeConvertedToEncoding_(DartNSUInteger encoding) { + return _objc_msgSend_6peh6o( + this.ref.pointer, _sel_canBeConvertedToEncoding_, encoding); + } + + /// cStringUsingEncoding: + ffi.Pointer cStringUsingEncoding_(DartNSUInteger encoding) { + return _objc_msgSend_1jtxufi( + this.ref.pointer, _sel_cStringUsingEncoding_, encoding); + } + + /// getCString:maxLength:encoding: + bool getCString_maxLength_encoding_(ffi.Pointer buffer, + DartNSUInteger maxBufferCount, DartNSUInteger encoding) { + return _objc_msgSend_1lv8yz3(this.ref.pointer, + _sel_getCString_maxLength_encoding_, buffer, maxBufferCount, encoding); + } + + /// getBytes:maxLength:usedLength:encoding:options:range:remainingRange: + bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( + ffi.Pointer buffer, + DartNSUInteger maxBufferCount, + ffi.Pointer usedBufferCount, + DartNSUInteger encoding, + objc.NSStringEncodingConversionOptions options, + NSRange range, + NSRangePointer leftover) { + return _objc_msgSend_i30zh3( + this.ref.pointer, + _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options.value, + range, + leftover); + } + + /// maximumLengthOfBytesUsingEncoding: + DartNSUInteger maximumLengthOfBytesUsingEncoding_(DartNSUInteger enc) { + return _objc_msgSend_12py2ux( + this.ref.pointer, _sel_maximumLengthOfBytesUsingEncoding_, enc); + } + + /// lengthOfBytesUsingEncoding: + DartNSUInteger lengthOfBytesUsingEncoding_(DartNSUInteger enc) { + return _objc_msgSend_12py2ux( + this.ref.pointer, _sel_lengthOfBytesUsingEncoding_, enc); + } + + /// availableStringEncodings + static ffi.Pointer getAvailableStringEncodings() { + return _objc_msgSend_1h2q612( + _class_NSString, _sel_availableStringEncodings); + } + + /// localizedNameOfStringEncoding: + static objc.NSString localizedNameOfStringEncoding_(DartNSUInteger encoding) { + final _ret = _objc_msgSend_1qrcblu( + _class_NSString, _sel_localizedNameOfStringEncoding_, encoding); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// defaultCStringEncoding + static DartNSUInteger getDefaultCStringEncoding() { + return _objc_msgSend_xw2lbc(_class_NSString, _sel_defaultCStringEncoding); + } + + /// decomposedStringWithCanonicalMapping + objc.NSString get decomposedStringWithCanonicalMapping { + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_decomposedStringWithCanonicalMapping); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// precomposedStringWithCanonicalMapping + objc.NSString get precomposedStringWithCanonicalMapping { + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_precomposedStringWithCanonicalMapping); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// decomposedStringWithCompatibilityMapping + objc.NSString get decomposedStringWithCompatibilityMapping { + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_decomposedStringWithCompatibilityMapping); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// precomposedStringWithCompatibilityMapping + objc.NSString get precomposedStringWithCompatibilityMapping { + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_precomposedStringWithCompatibilityMapping); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// componentsSeparatedByString: + objc.NSArray componentsSeparatedByString_(objc.NSString separator) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_componentsSeparatedByString_, separator.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// componentsSeparatedByCharactersInSet: + objc.NSArray componentsSeparatedByCharactersInSet_( + objc.NSCharacterSet separator) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_componentsSeparatedByCharactersInSet_, separator.ref.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// stringByTrimmingCharactersInSet: + objc.NSString stringByTrimmingCharactersInSet_(objc.NSCharacterSet set) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_stringByTrimmingCharactersInSet_, set.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringByPaddingToLength:withString:startingAtIndex: + objc.NSString stringByPaddingToLength_withString_startingAtIndex_( + DartNSUInteger newLength, + objc.NSString padString, + DartNSUInteger padIndex) { + final _ret = _objc_msgSend_exgdqb( + this.ref.pointer, + _sel_stringByPaddingToLength_withString_startingAtIndex_, + newLength, + padString.ref.pointer, + padIndex); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringByFoldingWithOptions:locale: + objc.NSString stringByFoldingWithOptions_locale_( + objc.NSStringCompareOptions options, objc.NSLocale? locale) { + final _ret = _objc_msgSend_146986e( + this.ref.pointer, + _sel_stringByFoldingWithOptions_locale_, + options.value, + locale?.ref.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringByReplacingOccurrencesOfString:withString:options:range: + objc.NSString stringByReplacingOccurrencesOfString_withString_options_range_( + objc.NSString target, + objc.NSString replacement, + objc.NSStringCompareOptions options, + NSRange searchRange) { + final _ret = _objc_msgSend_1wrs2o6( + this.ref.pointer, + _sel_stringByReplacingOccurrencesOfString_withString_options_range_, + target.ref.pointer, + replacement.ref.pointer, + options.value, + searchRange); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringByReplacingOccurrencesOfString:withString: + objc.NSString stringByReplacingOccurrencesOfString_withString_( + objc.NSString target, objc.NSString replacement) { + final _ret = _objc_msgSend_rsfdlh( + this.ref.pointer, + _sel_stringByReplacingOccurrencesOfString_withString_, + target.ref.pointer, + replacement.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringByReplacingCharactersInRange:withString: + objc.NSString stringByReplacingCharactersInRange_withString_( + NSRange range, objc.NSString replacement) { + final _ret = _objc_msgSend_197wcu5( + this.ref.pointer, + _sel_stringByReplacingCharactersInRange_withString_, + range, + replacement.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringByApplyingTransform:reverse: + objc.NSString? stringByApplyingTransform_reverse_( + DartNSStringTransform transform, bool reverse) { + final _ret = _objc_msgSend_1bdmr5f( + this.ref.pointer, + _sel_stringByApplyingTransform_reverse_, + transform.ref.pointer, + reverse); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// writeToURL:atomically:encoding:error: + bool writeToURL_atomically_encoding_error_( + objc.NSURL url, + bool useAuxiliaryFile, + DartNSUInteger enc, + ffi.Pointer> error) { + return _objc_msgSend_1140663( + this.ref.pointer, + _sel_writeToURL_atomically_encoding_error_, + url.ref.pointer, + useAuxiliaryFile, + enc, + error); + } + + /// writeToFile:atomically:encoding:error: + bool writeToFile_atomically_encoding_error_( + objc.NSString path, + bool useAuxiliaryFile, + DartNSUInteger enc, + ffi.Pointer> error) { + return _objc_msgSend_1140663( + this.ref.pointer, + _sel_writeToFile_atomically_encoding_error_, + path.ref.pointer, + useAuxiliaryFile, + enc, + error); + } + + /// description + objc.NSString get description { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// hash + DartNSUInteger get hash { + return _objc_msgSend_xw2lbc(this.ref.pointer, _sel_hash); + } + + /// initWithCharactersNoCopy:length:freeWhenDone: + objc.NSString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, DartNSUInteger length, bool freeBuffer) { + final _ret = _objc_msgSend_zsd8q9( + this.ref.retainAndReturnPointer(), + _sel_initWithCharactersNoCopy_length_freeWhenDone_, + characters, + length, + freeBuffer); + return objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithCharactersNoCopy:length:deallocator: + objc.NSString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, + DartNSUInteger len, + objc.ObjCBlock, ffi.UnsignedLong)>? + deallocator) { + final _ret = _objc_msgSend_1pr13r6( + this.ref.retainAndReturnPointer(), + _sel_initWithCharactersNoCopy_length_deallocator_, + chars, + len, + deallocator?.ref.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithCharacters:length: + objc.NSString initWithCharacters_length_( + ffi.Pointer characters, DartNSUInteger length) { + final _ret = _objc_msgSend_13z9dkp(this.ref.retainAndReturnPointer(), + _sel_initWithCharacters_length_, characters, length); + return objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithUTF8String: + objc.NSString? initWithUTF8String_( + ffi.Pointer nullTerminatedCString) { + final _ret = _objc_msgSend_rqwdif(this.ref.retainAndReturnPointer(), + _sel_initWithUTF8String_, nullTerminatedCString); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithString: + objc.NSString initWithString_(objc.NSString aString) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithString_, aString.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithFormat: + objc.NSString initWithFormat_(objc.NSString format) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithFormat_, format.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithFormat:locale: + objc.NSString initWithFormat_locale_( + objc.NSString format, objc.ObjCObjectBase? locale) { + final _ret = _objc_msgSend_rsfdlh( + this.ref.retainAndReturnPointer(), + _sel_initWithFormat_locale_, + format.ref.pointer, + locale?.ref.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithValidatedFormat:validFormatSpecifiers:error: + objc.NSString? initWithValidatedFormat_validFormatSpecifiers_error_( + objc.NSString format, + objc.NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_bo6ep4( + this.ref.retainAndReturnPointer(), + _sel_initWithValidatedFormat_validFormatSpecifiers_error_, + format.ref.pointer, + validFormatSpecifiers.ref.pointer, + error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithValidatedFormat:validFormatSpecifiers:locale:error: + objc.NSString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( + objc.NSString format, + objc.NSString validFormatSpecifiers, + objc.ObjCObjectBase? locale, + ffi.Pointer> error) { + final _ret = _objc_msgSend_2izev6( + this.ref.retainAndReturnPointer(), + _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, + format.ref.pointer, + validFormatSpecifiers.ref.pointer, + locale?.ref.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithData:encoding: + objc.NSString? initWithData_encoding_( + objc.NSData data, DartNSUInteger encoding) { + final _ret = _objc_msgSend_dcd68g(this.ref.retainAndReturnPointer(), + _sel_initWithData_encoding_, data.ref.pointer, encoding); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithBytes:length:encoding: + objc.NSString? initWithBytes_length_encoding_(ffi.Pointer bytes, + DartNSUInteger len, DartNSUInteger encoding) { + final _ret = _objc_msgSend_i38ton(this.ref.retainAndReturnPointer(), + _sel_initWithBytes_length_encoding_, bytes, len, encoding); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithBytesNoCopy:length:encoding:freeWhenDone: + objc.NSString? initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, + DartNSUInteger len, + DartNSUInteger encoding, + bool freeBuffer) { + final _ret = _objc_msgSend_o2ktnn( + this.ref.retainAndReturnPointer(), + _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, + bytes, + len, + encoding, + freeBuffer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithBytesNoCopy:length:encoding:deallocator: + objc.NSString? initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + DartNSUInteger len, + DartNSUInteger encoding, + objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong)>? + deallocator) { + final _ret = _objc_msgSend_1nnfqvg( + this.ref.retainAndReturnPointer(), + _sel_initWithBytesNoCopy_length_encoding_deallocator_, + bytes, + len, + encoding, + deallocator?.ref.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// string + static objc.NSString string() { + final _ret = _objc_msgSend_1x359cv(_class_NSString, _sel_string); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringWithString: + static objc.NSString stringWithString_(objc.NSString string) { + final _ret = _objc_msgSend_62nh5j( + _class_NSString, _sel_stringWithString_, string.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringWithCharacters:length: + static objc.NSString stringWithCharacters_length_( + ffi.Pointer characters, DartNSUInteger length) { + final _ret = _objc_msgSend_13z9dkp( + _class_NSString, _sel_stringWithCharacters_length_, characters, length); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringWithUTF8String: + static objc.NSString? stringWithUTF8String_( + ffi.Pointer nullTerminatedCString) { + final _ret = _objc_msgSend_rqwdif( + _class_NSString, _sel_stringWithUTF8String_, nullTerminatedCString); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringWithFormat: + static objc.NSString stringWithFormat_(objc.NSString format) { + final _ret = _objc_msgSend_62nh5j( + _class_NSString, _sel_stringWithFormat_, format.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// localizedStringWithFormat: + static objc.NSString localizedStringWithFormat_(objc.NSString format) { + final _ret = _objc_msgSend_62nh5j( + _class_NSString, _sel_localizedStringWithFormat_, format.ref.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringWithValidatedFormat:validFormatSpecifiers:error: + static objc.NSString? stringWithValidatedFormat_validFormatSpecifiers_error_( + objc.NSString format, + objc.NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_bo6ep4( + _class_NSString, + _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, + format.ref.pointer, + validFormatSpecifiers.ref.pointer, + error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// localizedStringWithValidatedFormat:validFormatSpecifiers:error: + static objc.NSString? + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + objc.NSString format, + objc.NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_bo6ep4( + _class_NSString, + _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, + format.ref.pointer, + validFormatSpecifiers.ref.pointer, + error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// initWithCString:encoding: + objc.NSString? initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, DartNSUInteger encoding) { + final _ret = _objc_msgSend_a15xhc(this.ref.retainAndReturnPointer(), + _sel_initWithCString_encoding_, nullTerminatedCString, encoding); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// stringWithCString:encoding: + static objc.NSString? stringWithCString_encoding_( + ffi.Pointer cString, DartNSUInteger enc) { + final _ret = _objc_msgSend_a15xhc( + _class_NSString, _sel_stringWithCString_encoding_, cString, enc); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// initWithContentsOfURL:encoding:error: + objc.NSString? initWithContentsOfURL_encoding_error_(objc.NSURL url, + DartNSUInteger enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_94cet5( + this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_encoding_error_, + url.ref.pointer, + enc, + error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithContentsOfFile:encoding:error: + objc.NSString? initWithContentsOfFile_encoding_error_(objc.NSString path, + DartNSUInteger enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_94cet5( + this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_encoding_error_, + path.ref.pointer, + enc, + error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// stringWithContentsOfURL:encoding:error: + static objc.NSString? stringWithContentsOfURL_encoding_error_(objc.NSURL url, + DartNSUInteger enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_94cet5( + _class_NSString, + _sel_stringWithContentsOfURL_encoding_error_, + url.ref.pointer, + enc, + error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringWithContentsOfFile:encoding:error: + static objc.NSString? stringWithContentsOfFile_encoding_error_( + objc.NSString path, + DartNSUInteger enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_94cet5( + _class_NSString, + _sel_stringWithContentsOfFile_encoding_error_, + path.ref.pointer, + enc, + error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// initWithContentsOfURL:usedEncoding:error: + objc.NSString? initWithContentsOfURL_usedEncoding_error_( + objc.NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1gxo8gv( + this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_usedEncoding_error_, + url.ref.pointer, + enc, + error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// initWithContentsOfFile:usedEncoding:error: + objc.NSString? initWithContentsOfFile_usedEncoding_error_( + objc.NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1gxo8gv( + this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_usedEncoding_error_, + path.ref.pointer, + enc, + error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: false, release: true); + } + + /// stringWithContentsOfURL:usedEncoding:error: + static objc.NSString? stringWithContentsOfURL_usedEncoding_error_( + objc.NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1gxo8gv( + _class_NSString, + _sel_stringWithContentsOfURL_usedEncoding_error_, + url.ref.pointer, + enc, + error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringWithContentsOfFile:usedEncoding:error: + static objc.NSString? stringWithContentsOfFile_usedEncoding_error_( + objc.NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_1gxo8gv( + _class_NSString, + _sel_stringWithContentsOfFile_usedEncoding_error_, + path.ref.pointer, + enc, + error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } +} + +typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; +typedef DartNSStringEncodingDetectionOptionsKey = objc.NSString; +late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_ = + objc.registerName( + "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); +final _objc_msgSend_pi68en = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); + +/// NSStringEncodingDetection +extension NSStringEncodingDetection on objc.NSString { + /// stringEncodingForData:encodingOptions:convertedString:usedLossyConversion: + static DartNSUInteger + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + objc.NSData data, + objc.NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _objc_msgSend_pi68en( + _class_NSString, + _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_, + data.ref.pointer, + opts?.ref.pointer ?? ffi.nullptr, + string, + usedLossyConversion); + } +} + +late final _sel_readableTypeIdentifiersForItemProvider = + objc.registerName("readableTypeIdentifiersForItemProvider"); +ffi.Pointer _ObjCBlock_NSArray_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer)>()(arg0); +ffi.Pointer _ObjCBlock_NSArray_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSArray_ffiVoid_fnPtrTrampoline) + .cast(); +ffi.Pointer _ObjCBlock_NSArray_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_NSArray_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSArray_ffiVoid_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSArray_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_NSArray_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> + fromFunction(objc.NSArray Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSArray_ffiVoid_closureCallable, + (ffi.Pointer arg0) => + fn(arg0).ref.retainAndAutorelease()), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_NSArray_ffiVoid_CallExtension + on objc.ObjCBlock)> { + objc.NSArray call(ffi.Pointer arg0) => objc.NSArray.castFromPointer( + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0), + retain: true, + release: true); +} + +late final _sel_objectWithItemProviderData_typeIdentifier_error_ = + objc.registerName("objectWithItemProviderData:typeIdentifier:error:"); +instancetype + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>()( + arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>( + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline) + .cast(); +instancetype + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3) => + (objc.getBlockClosure(block) as instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable = + ffi.Pointer.fromFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>( + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)>`. +abstract final class ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Pointer? Function( + ffi.Pointer, + objc.NSData, + objc.NSString, + ffi.Pointer>)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Pointer? Function( + ffi.Pointer, + objc.NSData, + objc.NSString, + ffi.Pointer>)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + ffi.Pointer? Function( + ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)> + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>> ptr) => + objc.ObjCBlock< + ffi.Pointer? Function( + ffi.Pointer, + objc.NSData, + objc.NSString, + ffi.Pointer>)>( + objc.newPointerBlock(_ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)> + fromFunction(Dartinstancetype? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>) fn) => + objc.ObjCBlock? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)>( + objc.newClosureBlock( + _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3) => + fn(arg0, objc.NSData.castFromPointer(arg1, retain: true, release: true), objc.NSString.castFromPointer(arg2, retain: true, release: true), arg3)?.ref.retainAndAutorelease() ?? + ffi.nullptr), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)>`. +extension ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_CallExtension + on objc.ObjCBlock< + ffi.Pointer? Function( + ffi.Pointer, + objc.NSData, + objc.NSString, + ffi.Pointer>)> { + Dartinstancetype? call(ffi.Pointer arg0, objc.NSData arg1, objc.NSString arg2, ffi.Pointer> arg3) => ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer> arg3)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>() + (ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3) + .address == + 0 + ? null + : objc.ObjCObjectBase( + ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>>().asFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>()(ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3), + retain: true, + release: true); +} + +late final _sel_writableTypeIdentifiersForItemProvider = + objc.registerName("writableTypeIdentifiersForItemProvider"); +late final _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_ = + objc.registerName( + "itemProviderVisibilityForRepresentationWithTypeIdentifier:"); +final _objc_msgSend_96wwe1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + NSInteger Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +int _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer + _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_fnPtrCallable = + ffi.Pointer.fromFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_fnPtrTrampoline, + 0) + .cast(); +int _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as int Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); +ffi.Pointer + _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_closureCallable = + ffi.Pointer.fromFunction< + NSInteger Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_closureTrampoline, + 0) + .cast(); + +/// Construction methods for `objc.ObjCBlock, objc.NSString)>`. +abstract final class ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NSInteger Function(ffi.Pointer, objc.NSString)> castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) => + objc.ObjCBlock, objc.NSString)>( + pointer, + retain: retain, + release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.NSString)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + NSInteger Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock, objc.NSString)>( + objc.newPointerBlock(_ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.NSString)> fromFunction( + objc.NSItemProviderRepresentationVisibility Function( + ffi.Pointer, objc.NSString) + fn) => + objc.ObjCBlock, objc.NSString)>( + objc.newClosureBlock( + _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, objc.NSString.castFromPointer(arg1, retain: true, release: true)) + .value), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, objc.NSString)>`. +extension ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_CallExtension + on objc + .ObjCBlock, objc.NSString)> { + objc.NSItemProviderRepresentationVisibility call( + ffi.Pointer arg0, objc.NSString arg1) => + objc.NSItemProviderRepresentationVisibility.fromValue(ref + .pointer.ref.invoke + .cast< + ffi.NativeFunction< + NSInteger Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction, ffi.Pointer, ffi.Pointer)>()( + ref.pointer, arg0, arg1.ref.pointer)); +} + +void _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer, + ffi.Pointer))(arg0, arg1); +ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_NSData_NSError_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, ffi.Pointer))(arg0, arg1); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_NSData_NSError_listenerCallable = ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSError_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSData_NSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock( + pointer, + retain: retain, + release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) => + objc.ObjCBlock( + objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_NSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction( + void Function(objc.NSData?, objc.NSError?) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_NSError_closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: true, release: true), + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock + listener(void Function(objc.NSData?, objc.NSError?) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSData_NSError_listenerCallable.nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn( + arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, + retain: false, release: true), + arg1.address == 0 + ? null + : objc.NSError.castFromPointer(arg1, + retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_wjvic9(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock( + wrapper, + retain: false, + release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSData_NSError_CallExtension + on objc.ObjCBlock { + void call(objc.NSData? arg0, objc.NSError? arg1) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(ref.pointer, + arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr); +} + +late final _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ = + objc.registerName( + "loadDataWithTypeIdentifier:forItemProviderCompletionHandler:"); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_fnPtrTrampoline) + .cast(); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + (objc.getBlockClosure(block) as ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_closureCallable = + ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_closureTrampoline) + .cast(); + +/// Construction methods for `objc.ObjCBlock, objc.NSString, objc.ObjCBlock)>`. +abstract final class ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NSProgress? Function(ffi.Pointer, objc.NSString, + objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + NSProgress? Function(ffi.Pointer, objc.NSString, + objc.ObjCBlock)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock< + NSProgress? Function(ffi.Pointer, objc.NSString, + objc.ObjCBlock)> + fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => + objc.ObjCBlock< + NSProgress? Function(ffi.Pointer, objc.NSString, + objc.ObjCBlock)>( + objc.newPointerBlock(_ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock, objc.NSString, objc.ObjCBlock)> + fromFunction(NSProgress? Function(ffi.Pointer, objc.NSString, objc.ObjCBlock) fn) => + objc.ObjCBlock, objc.NSString, objc.ObjCBlock)>( + objc.newClosureBlock( + _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(arg0, objc.NSString.castFromPointer(arg1, retain: true, release: true), ObjCBlock_ffiVoid_NSData_NSError.castFromPointer(arg2, retain: true, release: true)) + ?.ref + .retainAndAutorelease() ?? + ffi.nullptr), + retain: false, + release: true); +} + +/// Call operator for `objc.ObjCBlock, objc.NSString, objc.ObjCBlock)>`. +extension ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_CallExtension + on objc.ObjCBlock< + NSProgress? Function(ffi.Pointer, objc.NSString, + objc.ObjCBlock)> { + NSProgress? call(ffi.Pointer arg0, objc.NSString arg1, objc.ObjCBlock arg2) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>() + (ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer) + .address == + 0 + ? null + : NSProgress.castFromPointer( + ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>().asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer), + retain: true, + release: true); +} + +/// NSItemProvider +extension NSItemProvider on objc.NSString { + /// readableTypeIdentifiersForItemProvider + static objc.NSArray getReadableTypeIdentifiersForItemProvider() { + final _ret = _objc_msgSend_1x359cv( + _class_NSString, _sel_readableTypeIdentifiersForItemProvider); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// objectWithItemProviderData:typeIdentifier:error: + static objc.NSString? objectWithItemProviderData_typeIdentifier_error_( + objc.NSData data, + objc.NSString typeIdentifier, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_bo6ep4( + _class_NSString, + _sel_objectWithItemProviderData_typeIdentifier_error_, + data.ref.pointer, + typeIdentifier.ref.pointer, + outError); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// writableTypeIdentifiersForItemProvider + static objc.NSArray getWritableTypeIdentifiersForItemProvider() { + final _ret = _objc_msgSend_1x359cv( + _class_NSString, _sel_writableTypeIdentifiersForItemProvider); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// writableTypeIdentifiersForItemProvider + objc.NSArray get writableTypeIdentifiersForItemProvider1 { + if (!objc.respondsToSelector( + this.ref.pointer, _sel_writableTypeIdentifiersForItemProvider)) { + throw objc.UnimplementedOptionalMethodException( + 'NSString', 'writableTypeIdentifiersForItemProvider'); + } + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_writableTypeIdentifiersForItemProvider); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + static objc.NSItemProviderRepresentationVisibility + itemProviderVisibilityForRepresentationWithTypeIdentifier_( + objc.NSString typeIdentifier) { + if (!objc.respondsToSelector(_class_NSString, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_)) { + throw objc.UnimplementedOptionalMethodException('NSString', + 'itemProviderVisibilityForRepresentationWithTypeIdentifier:'); + } + final _ret = _objc_msgSend_96wwe1( + _class_NSString, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + typeIdentifier.ref.pointer); + return objc.NSItemProviderRepresentationVisibility.fromValue(_ret); + } + + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + objc.NSItemProviderRepresentationVisibility + itemProviderVisibilityForRepresentationWithTypeIdentifier_1( + objc.NSString typeIdentifier) { + if (!objc.respondsToSelector(this.ref.pointer, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_)) { + throw objc.UnimplementedOptionalMethodException('NSString', + 'itemProviderVisibilityForRepresentationWithTypeIdentifier:'); + } + final _ret = _objc_msgSend_96wwe1( + this.ref.pointer, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + typeIdentifier.ref.pointer); + return objc.NSItemProviderRepresentationVisibility.fromValue(_ret); + } + + /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: + NSProgress? loadDataWithTypeIdentifier_forItemProviderCompletionHandler_( + objc.NSString typeIdentifier, + objc.ObjCBlock + completionHandler) { + final _ret = _objc_msgSend_o4sqyk( + this.ref.pointer, + _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + typeIdentifier.ref.pointer, + completionHandler.ref.pointer); + return _ret.address == 0 + ? null + : NSProgress.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSMutableString = objc.getClass("NSMutableString"); +late final _sel_insertString_atIndex_ = + objc.registerName("insertString:atIndex:"); +late final _sel_deleteCharactersInRange_ = + objc.registerName("deleteCharactersInRange:"); +late final _sel_appendString_ = objc.registerName("appendString:"); +late final _sel_appendFormat_ = objc.registerName("appendFormat:"); +late final _sel_setString_ = objc.registerName("setString:"); +late final _sel_replaceOccurrencesOfString_withString_options_range_ = + objc.registerName("replaceOccurrencesOfString:withString:options:range:"); +final _objc_msgSend_19rhlmt = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + NSUInteger, + objc.NSRange)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange)>(); +late final _sel_applyTransform_reverse_range_updatedRange_ = + objc.registerName("applyTransform:reverse:range:updatedRange:"); +final _objc_msgSend_1wfeihn = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_initWithCapacity_ = objc.registerName("initWithCapacity:"); +late final _sel_stringWithCapacity_ = objc.registerName("stringWithCapacity:"); + +/// NSMutableStringExtensionMethods +extension NSMutableStringExtensionMethods on objc.NSMutableString { + /// insertString:atIndex: + void insertString_atIndex_(objc.NSString aString, DartNSUInteger loc) { + _objc_msgSend_10i1axw( + this.ref.pointer, _sel_insertString_atIndex_, aString.ref.pointer, loc); + } + + /// deleteCharactersInRange: + void deleteCharactersInRange_(NSRange range) { + _objc_msgSend_1e3pm0z( + this.ref.pointer, _sel_deleteCharactersInRange_, range); + } + + /// appendString: + void appendString_(objc.NSString aString) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_appendString_, aString.ref.pointer); + } + + /// appendFormat: + void appendFormat_(objc.NSString format) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_appendFormat_, format.ref.pointer); + } + + /// setString: + void setString_(objc.NSString aString) { + _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_setString_, aString.ref.pointer); + } + + /// replaceOccurrencesOfString:withString:options:range: + DartNSUInteger replaceOccurrencesOfString_withString_options_range_( + objc.NSString target, + objc.NSString replacement, + objc.NSStringCompareOptions options, + NSRange searchRange) { + return _objc_msgSend_19rhlmt( + this.ref.pointer, + _sel_replaceOccurrencesOfString_withString_options_range_, + target.ref.pointer, + replacement.ref.pointer, + options.value, + searchRange); + } + + /// applyTransform:reverse:range:updatedRange: + bool applyTransform_reverse_range_updatedRange_( + DartNSStringTransform transform, + bool reverse, + NSRange range, + NSRangePointer resultingRange) { + return _objc_msgSend_1wfeihn( + this.ref.pointer, + _sel_applyTransform_reverse_range_updatedRange_, + transform.ref.pointer, + reverse, + range, + resultingRange); + } + + /// initWithCapacity: + objc.NSMutableString initWithCapacity_(DartNSUInteger capacity) { + final _ret = _objc_msgSend_1qrcblu( + this.ref.retainAndReturnPointer(), _sel_initWithCapacity_, capacity); + return objc.NSMutableString.castFromPointer(_ret, + retain: false, release: true); + } + + /// stringWithCapacity: + static objc.NSMutableString stringWithCapacity_(DartNSUInteger capacity) { + final _ret = _objc_msgSend_1qrcblu( + _class_NSMutableString, _sel_stringWithCapacity_, capacity); + return objc.NSMutableString.castFromPointer(_ret, + retain: true, release: true); + } +} + +late final _sel_propertyList = objc.registerName("propertyList"); +late final _sel_propertyListFromStringsFileFormat = + objc.registerName("propertyListFromStringsFileFormat"); + +/// NSExtendedStringPropertyListParsing +extension NSExtendedStringPropertyListParsing on objc.NSString { + /// propertyList + objc.ObjCObjectBase propertyList() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_propertyList); + return objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// propertyListFromStringsFileFormat + objc.NSDictionary? propertyListFromStringsFileFormat() { + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_propertyListFromStringsFileFormat); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _sel_cString = objc.registerName("cString"); +late final _sel_lossyCString = objc.registerName("lossyCString"); +late final _sel_cStringLength = objc.registerName("cStringLength"); +late final _sel_getCString_ = objc.registerName("getCString:"); +final _objc_msgSend_1r7ue5f = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getCString_maxLength_ = + objc.registerName("getCString:maxLength:"); +final _objc_msgSend_1h3mito = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_getCString_maxLength_range_remainingRange_ = + objc.registerName("getCString:maxLength:range:remainingRange:"); +final _objc_msgSend_3gpdva = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + objc.NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + objc.NSRange, + ffi.Pointer)>(); +late final _sel_stringWithContentsOfFile_ = + objc.registerName("stringWithContentsOfFile:"); +late final _sel_stringWithContentsOfURL_ = + objc.registerName("stringWithContentsOfURL:"); +late final _sel_initWithCStringNoCopy_length_freeWhenDone_ = + objc.registerName("initWithCStringNoCopy:length:freeWhenDone:"); +final _objc_msgSend_fjj4b8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + bool)>(); +late final _sel_initWithCString_length_ = + objc.registerName("initWithCString:length:"); +late final _sel_initWithCString_ = objc.registerName("initWithCString:"); +late final _sel_stringWithCString_length_ = + objc.registerName("stringWithCString:length:"); +late final _sel_stringWithCString_ = objc.registerName("stringWithCString:"); +late final _sel_getCharacters_ = objc.registerName("getCharacters:"); +final _objc_msgSend_g3kdhc = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +/// NSStringDeprecated +extension NSStringDeprecated on objc.NSString { + /// cString + ffi.Pointer cString() { + return _objc_msgSend_1fuqfwb(this.ref.pointer, _sel_cString); + } + + /// lossyCString + ffi.Pointer lossyCString() { + return _objc_msgSend_1fuqfwb(this.ref.pointer, _sel_lossyCString); + } + + /// cStringLength + DartNSUInteger cStringLength() { + return _objc_msgSend_xw2lbc(this.ref.pointer, _sel_cStringLength); + } + + /// getCString: + void getCString_(ffi.Pointer bytes) { + _objc_msgSend_1r7ue5f(this.ref.pointer, _sel_getCString_, bytes); + } + + /// getCString:maxLength: + void getCString_maxLength_( + ffi.Pointer bytes, DartNSUInteger maxLength) { + _objc_msgSend_1h3mito( + this.ref.pointer, _sel_getCString_maxLength_, bytes, maxLength); + } + + /// getCString:maxLength:range:remainingRange: + void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, + DartNSUInteger maxLength, NSRange aRange, NSRangePointer leftoverRange) { + _objc_msgSend_3gpdva( + this.ref.pointer, + _sel_getCString_maxLength_range_remainingRange_, + bytes, + maxLength, + aRange, + leftoverRange); + } + + /// writeToFile:atomically: + bool writeToFile_atomically_(objc.NSString path, bool useAuxiliaryFile) { + return _objc_msgSend_w8pbfh(this.ref.pointer, _sel_writeToFile_atomically_, + path.ref.pointer, useAuxiliaryFile); + } + + /// writeToURL:atomically: + bool writeToURL_atomically_(objc.NSURL url, bool atomically) { + return _objc_msgSend_w8pbfh(this.ref.pointer, _sel_writeToURL_atomically_, + url.ref.pointer, atomically); + } + + /// initWithContentsOfFile: + objc.ObjCObjectBase? initWithContentsOfFile_(objc.NSString path) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfFile_, path.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: false, release: true); + } + + /// initWithContentsOfURL: + objc.ObjCObjectBase? initWithContentsOfURL_(objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j(this.ref.retainAndReturnPointer(), + _sel_initWithContentsOfURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: false, release: true); + } + + /// stringWithContentsOfFile: + static objc.ObjCObjectBase? stringWithContentsOfFile_(objc.NSString path) { + final _ret = _objc_msgSend_62nh5j( + _class_NSString, _sel_stringWithContentsOfFile_, path.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// stringWithContentsOfURL: + static objc.ObjCObjectBase? stringWithContentsOfURL_(objc.NSURL url) { + final _ret = _objc_msgSend_62nh5j( + _class_NSString, _sel_stringWithContentsOfURL_, url.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// initWithCStringNoCopy:length:freeWhenDone: + objc.ObjCObjectBase? initWithCStringNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, DartNSUInteger length, bool freeBuffer) { + final _ret = _objc_msgSend_fjj4b8( + this.ref.retainAndReturnPointer(), + _sel_initWithCStringNoCopy_length_freeWhenDone_, + bytes, + length, + freeBuffer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: false, release: true); + } + + /// initWithCString:length: + objc.ObjCObjectBase? initWithCString_length_( + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _objc_msgSend_a15xhc(this.ref.retainAndReturnPointer(), + _sel_initWithCString_length_, bytes, length); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: false, release: true); + } + + /// initWithCString: + objc.ObjCObjectBase? initWithCString_(ffi.Pointer bytes) { + final _ret = _objc_msgSend_rqwdif( + this.ref.retainAndReturnPointer(), _sel_initWithCString_, bytes); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: false, release: true); + } + + /// stringWithCString:length: + static objc.ObjCObjectBase? stringWithCString_length_( + ffi.Pointer bytes, DartNSUInteger length) { + final _ret = _objc_msgSend_a15xhc( + _class_NSString, _sel_stringWithCString_length_, bytes, length); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// stringWithCString: + static objc.ObjCObjectBase? stringWithCString_(ffi.Pointer bytes) { + final _ret = + _objc_msgSend_rqwdif(_class_NSString, _sel_stringWithCString_, bytes); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// getCharacters: + void getCharacters_(ffi.Pointer buffer) { + _objc_msgSend_g3kdhc(this.ref.pointer, _sel_getCharacters_, buffer); + } +} + +typedef NSURLResourceKey = ffi.Pointer; +typedef DartNSURLResourceKey = objc.NSString; +typedef NSURLFileResourceType = ffi.Pointer; +typedef DartNSURLFileResourceType = objc.NSString; +typedef NSURLThumbnailDictionaryItem = ffi.Pointer; +typedef DartNSURLThumbnailDictionaryItem = objc.NSString; +typedef NSURLFileProtectionType = ffi.Pointer; +typedef DartNSURLFileProtectionType = objc.NSString; +typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; +typedef DartNSURLUbiquitousItemDownloadingStatus = objc.NSString; +typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; +typedef DartNSURLUbiquitousSharedItemRole = objc.NSString; +typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; +typedef DartNSURLUbiquitousSharedItemPermissions = objc.NSString; +typedef NSURLBookmarkFileCreationOptions = NSUInteger; +late final _class_NSURL = objc.getClass("NSURL"); +late final _sel_getPromisedItemResourceValue_forKey_error_ = + objc.registerName("getPromisedItemResourceValue:forKey:error:"); +final _objc_msgSend_7iv28v = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_promisedItemResourceValuesForKeys_error_ = + objc.registerName("promisedItemResourceValuesForKeys:error:"); +late final _sel_checkPromisedItemIsReachableAndReturnError_ = + objc.registerName("checkPromisedItemIsReachableAndReturnError:"); +final _objc_msgSend_1dom33q = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + +/// NSPromisedItems +extension NSPromisedItems on objc.NSURL { + /// Get resource values from URLs of 'promised' items. A promised item is not guaranteed to have its contents in the file system until you use NSFileCoordinator to perform a coordinated read on its URL, which causes the contents to be downloaded or otherwise generated. Promised item URLs are returned by various APIs, including currently: + /// - NSMetadataQueryUbiquitousDataScope + /// - NSMetadataQueryUbiquitousDocumentsScope + /// - An NSFilePresenter presenting the contents of the directory located by -URLForUbiquitousContainerIdentifier: or a subdirectory thereof + /// + /// The following methods behave identically to their similarly named methods above (-getResourceValue:forKey:error:, etc.), except that they allow you to get resource values and check for presence regardless of whether the promised item's contents currently exist at the URL. You must use these APIs instead of the normal NSURL resource value APIs if and only if any of the following are true: + /// - You are using a URL that you know came directly from one of the above APIs + /// - You are inside the accessor block of a coordinated read or write that used NSFileCoordinatorReadingImmediatelyAvailableMetadataOnly, NSFileCoordinatorWritingForDeleting, NSFileCoordinatorWritingForMoving, or NSFileCoordinatorWritingContentIndependentMetadataOnly + /// + /// Most of the NSURL resource value keys will work with these APIs. However, there are some that are tied to the item's contents that will not work, such as NSURLContentAccessDateKey or NSURLGenerationIdentifierKey. If one of these keys is used, the method will return YES, but the value for the key will be nil. + bool getPromisedItemResourceValue_forKey_error_( + ffi.Pointer> value, + DartNSURLResourceKey key, + ffi.Pointer> error) { + return _objc_msgSend_7iv28v( + this.ref.pointer, + _sel_getPromisedItemResourceValue_forKey_error_, + value, + key.ref.pointer, + error); + } + + /// promisedItemResourceValuesForKeys:error: + objc.NSDictionary? promisedItemResourceValuesForKeys_error_( + objc.NSArray keys, ffi.Pointer> error) { + final _ret = _objc_msgSend_1705co6(this.ref.pointer, + _sel_promisedItemResourceValuesForKeys_error_, keys.ref.pointer, error); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + /// checkPromisedItemIsReachableAndReturnError: + bool checkPromisedItemIsReachableAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_1dom33q(this.ref.pointer, + _sel_checkPromisedItemIsReachableAndReturnError_, error); + } +} + +/// NSItemProvider +extension NSItemProvider1 on objc.NSURL { + /// readableTypeIdentifiersForItemProvider + static objc.NSArray getReadableTypeIdentifiersForItemProvider() { + final _ret = _objc_msgSend_1x359cv( + _class_NSURL, _sel_readableTypeIdentifiersForItemProvider); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// objectWithItemProviderData:typeIdentifier:error: + static objc.NSURL? objectWithItemProviderData_typeIdentifier_error_( + objc.NSData data, + objc.NSString typeIdentifier, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_bo6ep4( + _class_NSURL, + _sel_objectWithItemProviderData_typeIdentifier_error_, + data.ref.pointer, + typeIdentifier.ref.pointer, + outError); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// writableTypeIdentifiersForItemProvider + static objc.NSArray getWritableTypeIdentifiersForItemProvider() { + final _ret = _objc_msgSend_1x359cv( + _class_NSURL, _sel_writableTypeIdentifiersForItemProvider); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// writableTypeIdentifiersForItemProvider + objc.NSArray get writableTypeIdentifiersForItemProvider1 { + if (!objc.respondsToSelector( + this.ref.pointer, _sel_writableTypeIdentifiersForItemProvider)) { + throw objc.UnimplementedOptionalMethodException( + 'NSURL', 'writableTypeIdentifiersForItemProvider'); + } + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_writableTypeIdentifiersForItemProvider); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + static objc.NSItemProviderRepresentationVisibility + itemProviderVisibilityForRepresentationWithTypeIdentifier_( + objc.NSString typeIdentifier) { + if (!objc.respondsToSelector(_class_NSURL, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_)) { + throw objc.UnimplementedOptionalMethodException('NSURL', + 'itemProviderVisibilityForRepresentationWithTypeIdentifier:'); + } + final _ret = _objc_msgSend_96wwe1( + _class_NSURL, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + typeIdentifier.ref.pointer); + return objc.NSItemProviderRepresentationVisibility.fromValue(_ret); + } + + /// itemProviderVisibilityForRepresentationWithTypeIdentifier: + objc.NSItemProviderRepresentationVisibility + itemProviderVisibilityForRepresentationWithTypeIdentifier_1( + objc.NSString typeIdentifier) { + if (!objc.respondsToSelector(this.ref.pointer, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_)) { + throw objc.UnimplementedOptionalMethodException('NSURL', + 'itemProviderVisibilityForRepresentationWithTypeIdentifier:'); + } + final _ret = _objc_msgSend_96wwe1( + this.ref.pointer, + _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, + typeIdentifier.ref.pointer); + return objc.NSItemProviderRepresentationVisibility.fromValue(_ret); + } + + /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: + NSProgress? loadDataWithTypeIdentifier_forItemProviderCompletionHandler_( + objc.NSString typeIdentifier, + objc.ObjCBlock + completionHandler) { + final _ret = _objc_msgSend_o4sqyk( + this.ref.pointer, + _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, + typeIdentifier.ref.pointer, + completionHandler.ref.pointer); + return _ret.address == 0 + ? null + : NSProgress.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSCharacterSet = objc.getClass("NSCharacterSet"); +late final _sel_URLUserAllowedCharacterSet = + objc.registerName("URLUserAllowedCharacterSet"); +late final _sel_URLPasswordAllowedCharacterSet = + objc.registerName("URLPasswordAllowedCharacterSet"); +late final _sel_URLHostAllowedCharacterSet = + objc.registerName("URLHostAllowedCharacterSet"); +late final _sel_URLPathAllowedCharacterSet = + objc.registerName("URLPathAllowedCharacterSet"); +late final _sel_URLQueryAllowedCharacterSet = + objc.registerName("URLQueryAllowedCharacterSet"); +late final _sel_URLFragmentAllowedCharacterSet = + objc.registerName("URLFragmentAllowedCharacterSet"); + +/// NSURLUtilities +extension NSURLUtilities on objc.NSCharacterSet { + /// Returns a character set containing the characters allowed in a URL's user subcomponent. + static objc.NSCharacterSet getURLUserAllowedCharacterSet() { + final _ret = _objc_msgSend_1x359cv( + _class_NSCharacterSet, _sel_URLUserAllowedCharacterSet); + return objc.NSCharacterSet.castFromPointer(_ret, + retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in a URL's password subcomponent. + static objc.NSCharacterSet getURLPasswordAllowedCharacterSet() { + final _ret = _objc_msgSend_1x359cv( + _class_NSCharacterSet, _sel_URLPasswordAllowedCharacterSet); + return objc.NSCharacterSet.castFromPointer(_ret, + retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in a URL's host subcomponent. + static objc.NSCharacterSet getURLHostAllowedCharacterSet() { + final _ret = _objc_msgSend_1x359cv( + _class_NSCharacterSet, _sel_URLHostAllowedCharacterSet); + return objc.NSCharacterSet.castFromPointer(_ret, + retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in a URL's path component. ';' is a legal path character, but it is recommended that it be percent-encoded for best compatibility with NSURL (-stringByAddingPercentEncodingWithAllowedCharacters: will percent-encode any ';' characters if you pass the URLPathAllowedCharacterSet). + static objc.NSCharacterSet getURLPathAllowedCharacterSet() { + final _ret = _objc_msgSend_1x359cv( + _class_NSCharacterSet, _sel_URLPathAllowedCharacterSet); + return objc.NSCharacterSet.castFromPointer(_ret, + retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in a URL's query component. + static objc.NSCharacterSet getURLQueryAllowedCharacterSet() { + final _ret = _objc_msgSend_1x359cv( + _class_NSCharacterSet, _sel_URLQueryAllowedCharacterSet); + return objc.NSCharacterSet.castFromPointer(_ret, + retain: true, release: true); + } + + /// Returns a character set containing the characters allowed in a URL's fragment component. + static objc.NSCharacterSet getURLFragmentAllowedCharacterSet() { + final _ret = _objc_msgSend_1x359cv( + _class_NSCharacterSet, _sel_URLFragmentAllowedCharacterSet); + return objc.NSCharacterSet.castFromPointer(_ret, + retain: true, release: true); + } +} + +late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_ = + objc.registerName("stringByAddingPercentEncodingWithAllowedCharacters:"); +late final _sel_stringByRemovingPercentEncoding = + objc.registerName("stringByRemovingPercentEncoding"); +late final _sel_stringByAddingPercentEscapesUsingEncoding_ = + objc.registerName("stringByAddingPercentEscapesUsingEncoding:"); +late final _sel_stringByReplacingPercentEscapesUsingEncoding_ = + objc.registerName("stringByReplacingPercentEscapesUsingEncoding:"); + +/// NSURLUtilities +extension NSURLUtilities1 on objc.NSString { + /// Returns a new string made from the receiver by replacing all characters not in the allowedCharacters set with percent encoded characters. UTF-8 encoding is used to determine the correct percent encoded characters. Entire URL strings cannot be percent-encoded. This method is intended to percent-encode a URL component or subcomponent string, NOT the entire URL string. Any characters in allowedCharacters outside of the 7-bit ASCII range are ignored. + objc.NSString? stringByAddingPercentEncodingWithAllowedCharacters_( + objc.NSCharacterSet allowedCharacters) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, + _sel_stringByAddingPercentEncodingWithAllowedCharacters_, + allowedCharacters.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// Returns a new string made from the receiver by replacing all percent encoded sequences with the matching UTF-8 characters. + objc.NSString? get stringByRemovingPercentEncoding { + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_stringByRemovingPercentEncoding); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringByAddingPercentEscapesUsingEncoding: + objc.NSString? stringByAddingPercentEscapesUsingEncoding_( + DartNSUInteger enc) { + final _ret = _objc_msgSend_1qrcblu( + this.ref.pointer, _sel_stringByAddingPercentEscapesUsingEncoding_, enc); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// stringByReplacingPercentEscapesUsingEncoding: + objc.NSString? stringByReplacingPercentEscapesUsingEncoding_( + DartNSUInteger enc) { + final _ret = _objc_msgSend_1qrcblu(this.ref.pointer, + _sel_stringByReplacingPercentEscapesUsingEncoding_, enc); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _sel_fileURLWithPathComponents_ = + objc.registerName("fileURLWithPathComponents:"); +late final _sel_pathComponents = objc.registerName("pathComponents"); +late final _sel_lastPathComponent = objc.registerName("lastPathComponent"); +late final _sel_pathExtension = objc.registerName("pathExtension"); +late final _sel_URLByAppendingPathComponent_ = + objc.registerName("URLByAppendingPathComponent:"); +late final _sel_URLByAppendingPathComponent_isDirectory_ = + objc.registerName("URLByAppendingPathComponent:isDirectory:"); +late final _sel_URLByDeletingLastPathComponent = + objc.registerName("URLByDeletingLastPathComponent"); +late final _sel_URLByAppendingPathExtension_ = + objc.registerName("URLByAppendingPathExtension:"); +late final _sel_URLByDeletingPathExtension = + objc.registerName("URLByDeletingPathExtension"); +late final _sel_checkResourceIsReachableAndReturnError_ = + objc.registerName("checkResourceIsReachableAndReturnError:"); +late final _sel_URLByStandardizingPath = + objc.registerName("URLByStandardizingPath"); +late final _sel_URLByResolvingSymlinksInPath = + objc.registerName("URLByResolvingSymlinksInPath"); + +/// NSURLPathUtilities +extension NSURLPathUtilities on objc.NSURL { + /// The following methods work on the path portion of a URL in the same manner that the NSPathUtilities methods on NSString do. + static objc.NSURL? fileURLWithPathComponents_(objc.NSArray components) { + final _ret = _objc_msgSend_62nh5j( + _class_NSURL, _sel_fileURLWithPathComponents_, components.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// pathComponents + objc.NSArray? get pathComponents { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_pathComponents); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + /// lastPathComponent + objc.NSString? get lastPathComponent { + final _ret = + _objc_msgSend_1x359cv(this.ref.pointer, _sel_lastPathComponent); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// pathExtension + objc.NSString? get pathExtension { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_pathExtension); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// URLByAppendingPathComponent: + objc.NSURL? URLByAppendingPathComponent_(objc.NSString pathComponent) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_URLByAppendingPathComponent_, pathComponent.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// URLByAppendingPathComponent:isDirectory: + objc.NSURL? URLByAppendingPathComponent_isDirectory_( + objc.NSString pathComponent, bool isDirectory) { + final _ret = _objc_msgSend_1bdmr5f( + this.ref.pointer, + _sel_URLByAppendingPathComponent_isDirectory_, + pathComponent.ref.pointer, + isDirectory); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// URLByDeletingLastPathComponent + objc.NSURL? get URLByDeletingLastPathComponent { + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_URLByDeletingLastPathComponent); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// URLByAppendingPathExtension: + objc.NSURL? URLByAppendingPathExtension_(objc.NSString pathExtension) { + final _ret = _objc_msgSend_62nh5j(this.ref.pointer, + _sel_URLByAppendingPathExtension_, pathExtension.ref.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// URLByDeletingPathExtension + objc.NSURL? get URLByDeletingPathExtension { + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_URLByDeletingPathExtension); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// Returns whether the URL's resource exists and is reachable. This method synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. If this method returns NO, the optional error is populated. This method is currently applicable only to URLs for file system resources. For other URL types, NO is returned. Symbol is present in iOS 4, but performs no operation. + bool checkResourceIsReachableAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_1dom33q( + this.ref.pointer, _sel_checkResourceIsReachableAndReturnError_, error); + } + + /// URLByStandardizingPath + objc.NSURL? get URLByStandardizingPath { + final _ret = + _objc_msgSend_1x359cv(this.ref.pointer, _sel_URLByStandardizingPath); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + /// URLByResolvingSymlinksInPath + objc.NSURL? get URLByResolvingSymlinksInPath { + final _ret = _objc_msgSend_1x359cv( + this.ref.pointer, _sel_URLByResolvingSymlinksInPath); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _sel_URL_resourceDataDidBecomeAvailable_ = + objc.registerName("URL:resourceDataDidBecomeAvailable:"); +late final _sel_URLResourceDidFinishLoading_ = + objc.registerName("URLResourceDidFinishLoading:"); +late final _sel_URLResourceDidCancelLoading_ = + objc.registerName("URLResourceDidCancelLoading:"); +late final _sel_URL_resourceDidFailLoadingWithReason_ = + objc.registerName("URL:resourceDidFailLoadingWithReason:"); + +/// NSURLClient +extension NSURLClient on objc.NSObject { + /// URL:resourceDataDidBecomeAvailable: + void URL_resourceDataDidBecomeAvailable_( + objc.NSURL sender, objc.NSData newBytes) { + _objc_msgSend_wjvic9( + this.ref.pointer, + _sel_URL_resourceDataDidBecomeAvailable_, + sender.ref.pointer, + newBytes.ref.pointer); + } + + /// URLResourceDidFinishLoading: + void URLResourceDidFinishLoading_(objc.NSURL sender) { + _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_URLResourceDidFinishLoading_, + sender.ref.pointer); + } + + /// URLResourceDidCancelLoading: + void URLResourceDidCancelLoading_(objc.NSURL sender) { + _objc_msgSend_1jdvcbf(this.ref.pointer, _sel_URLResourceDidCancelLoading_, + sender.ref.pointer); + } + + /// URL:resourceDidFailLoadingWithReason: + void URL_resourceDidFailLoadingWithReason_( + objc.NSURL sender, objc.NSString reason) { + _objc_msgSend_wjvic9( + this.ref.pointer, + _sel_URL_resourceDidFailLoadingWithReason_, + sender.ref.pointer, + reason.ref.pointer); + } +} + +late final _sel_resourceDataUsingCache_ = + objc.registerName("resourceDataUsingCache:"); +late final _sel_loadResourceDataNotifyingClient_usingCache_ = + objc.registerName("loadResourceDataNotifyingClient:usingCache:"); +late final _sel_propertyForKey_ = objc.registerName("propertyForKey:"); +late final _sel_setResourceData_ = objc.registerName("setResourceData:"); +late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); +final _objc_msgSend_1lqxdg3 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_URLHandleUsingCache_ = + objc.registerName("URLHandleUsingCache:"); + +/// NSURLLoading +extension NSURLLoading on objc.NSURL { + /// Blocks to load the data if necessary. If shouldUseCache is YES, then if an equivalent URL has already been loaded and cached, its resource data will be returned immediately. If shouldUseCache is NO, a new load will be started + objc.NSData? resourceDataUsingCache_(bool shouldUseCache) { + final _ret = _objc_msgSend_1l3kbc1( + this.ref.pointer, _sel_resourceDataUsingCache_, shouldUseCache); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + /// Starts an asynchronous load of the data, registering delegate to receive notification. Only one such background load can proceed at a time. + void loadResourceDataNotifyingClient_usingCache_( + objc.ObjCObjectBase client, bool shouldUseCache) { + _objc_msgSend_gk45w7( + this.ref.pointer, + _sel_loadResourceDataNotifyingClient_usingCache_, + client.ref.pointer, + shouldUseCache); + } + + /// propertyForKey: + objc.ObjCObjectBase? propertyForKey_(objc.NSString propertyKey) { + final _ret = _objc_msgSend_62nh5j( + this.ref.pointer, _sel_propertyForKey_, propertyKey.ref.pointer); + return _ret.address == 0 + ? null + : objc.ObjCObjectBase(_ret, retain: true, release: true); + } + + /// These attempt to write the given arguments for the resource specified by the URL; they return success or failure + bool setResourceData_(objc.NSData data) { + return _objc_msgSend_69e0x1( + this.ref.pointer, _sel_setResourceData_, data.ref.pointer); + } + + /// setProperty:forKey: + bool setProperty_forKey_( + objc.ObjCObjectBase property, objc.NSString propertyKey) { + return _objc_msgSend_1lqxdg3(this.ref.pointer, _sel_setProperty_forKey_, + property.ref.pointer, propertyKey.ref.pointer); + } + + /// Sophisticated clients will want to ask for this, then message the handle directly. If shouldUseCache is NO, a newly instantiated handle is returned, even if an equivalent URL has been loaded + objc.NSURLHandle? URLHandleUsingCache_(bool shouldUseCache) { + final _ret = _objc_msgSend_1l3kbc1( + this.ref.pointer, _sel_URLHandleUsingCache_, shouldUseCache); + return _ret.address == 0 + ? null + : objc.NSURLHandle.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSCondition = objc.getClass("NSCondition"); +late final _sel_wait = objc.registerName("wait"); +late final _sel_waitUntilDate_ = objc.registerName("waitUntilDate:"); +late final _sel_signal = objc.registerName("signal"); +late final _sel_broadcast = objc.registerName("broadcast"); +late final _sel_lock = objc.registerName("lock"); +void _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction arg0)>>() + .asFunction)>()(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_fnPtrTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_closureTrampoline) + .cast(); +void _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline( + ffi.Pointer block, ffi.Pointer arg0) { + (objc.getBlockClosure(block) as void Function(ffi.Pointer))(arg0); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)> + _ObjCBlock_ffiVoid_ffiVoid_listenerCallable = ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock)>(pointer, + retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) => + objc.ObjCBlock)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_ffiVoid_fnPtrCallable, ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock)> fromFunction( + void Function(ffi.Pointer) fn) => + objc.ObjCBlock)>( + objc.newClosureBlock(_ObjCBlock_ffiVoid_ffiVoid_closureCallable, + (ffi.Pointer arg0) => fn(arg0)), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock)> listener( + void Function(ffi.Pointer) fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_ffiVoid_listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn(arg0)); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_ovsamd(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock)>(wrapper, + retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_CallExtension + on objc.ObjCBlock)> { + void call(ffi.Pointer arg0) => ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(ref.pointer, arg0); +} + +late final _sel_unlock = objc.registerName("unlock"); + +/// NSCondition +class NSCondition extends objc.NSObject { + NSCondition._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSCondition] that points to the same underlying object as [other]. + NSCondition.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSCondition] that wraps the given raw object pointer. + NSCondition.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSCondition]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_69e0x1( + obj.ref.pointer, _sel_isKindOfClass_, _class_NSCondition); + } + + /// wait + void wait1() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_wait); + } + + /// waitUntilDate: + bool waitUntilDate_(objc.NSDate limit) { + return _objc_msgSend_69e0x1( + this.ref.pointer, _sel_waitUntilDate_, limit.ref.pointer); + } + + /// signal + void signal() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_signal); + } + + /// broadcast + void broadcast() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_broadcast); + } + + /// name + objc.NSString? get name { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_name); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + /// setName: + set name(objc.NSString? value) { + return _objc_msgSend_1jdvcbf( + this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); + } + + /// init + NSCondition init() { + final _ret = + _objc_msgSend_1x359cv(this.ref.retainAndReturnPointer(), _sel_init); + return NSCondition.castFromPointer(_ret, retain: false, release: true); + } + + /// new + static NSCondition new1() { + final _ret = _objc_msgSend_1x359cv(_class_NSCondition, _sel_new); + return NSCondition.castFromPointer(_ret, retain: false, release: true); + } + + /// allocWithZone: + static NSCondition allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_hzlb60(_class_NSCondition, _sel_allocWithZone_, zone); + return NSCondition.castFromPointer(_ret, retain: false, release: true); + } + + /// alloc + static NSCondition alloc() { + final _ret = _objc_msgSend_1x359cv(_class_NSCondition, _sel_alloc); + return NSCondition.castFromPointer(_ret, retain: false, release: true); + } + + /// self + NSCondition self() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_self); + return NSCondition.castFromPointer(_ret, retain: true, release: true); + } + + /// retain + NSCondition retain() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_retain); + return NSCondition.castFromPointer(_ret, retain: true, release: true); + } + + /// autorelease + NSCondition autorelease() { + final _ret = _objc_msgSend_1x359cv(this.ref.pointer, _sel_autorelease); + return NSCondition.castFromPointer(_ret, retain: true, release: true); + } + + /// lock + void lock() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_lock); + } + + /// unlock + void unlock() { + _objc_msgSend_1pl9qdv(this.ref.pointer, _sel_unlock); + } +} + +typedef NSProgressKind1 = ffi.Pointer; +typedef DartNSProgressKind1 = objc.NSString; +typedef NSProgressUserInfoKey1 = ffi.Pointer; +typedef DartNSProgressUserInfoKey1 = objc.NSString; +typedef NSProgressFileOperationKind1 = ffi.Pointer; +typedef DartNSProgressFileOperationKind1 = objc.NSString; +typedef NSProgressUnpublishingHandler1 = ffi.Pointer; +typedef DartNSProgressUnpublishingHandler1 + = objc.ObjCBlock; +typedef NSProgressPublishingHandler1 = ffi.Pointer; +typedef DartNSProgressPublishingHandler1 + = objc.ObjCBlock? Function(NSProgress)>; + +/// WARNING: NSException is a stub. To generate bindings for this class, include +/// NSException in your config's objc-interfaces list. +/// +/// NSException +class NSException extends objc.NSObject { + NSException._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSException] that points to the same underlying object as [other]. + NSException.castFrom(objc.ObjCObjectBase other) + : this._(other.ref.pointer, retain: true, release: true); + + /// Constructs a [NSException] that wraps the given raw object pointer. + NSException.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); +} + +late final _class_NSException = objc.getClass("NSException"); +late final _sel_raise_format_ = objc.registerName("raise:format:"); + +/// NSExceptionRaisingConveniences +extension NSExceptionRaisingConveniences on NSException { + /// raise:format: + static void raise_format_(DartNSExceptionName name, objc.NSString format) { + _objc_msgSend_wjvic9(_class_NSException, _sel_raise_format_, + name.ref.pointer, format.ref.pointer); + } +} + +typedef NSUncaughtExceptionHandler = ffi + .NativeFunction exception)>; + +enum NSOperationQueuePriority { + NSOperationQueuePriorityVeryLow(-8), + NSOperationQueuePriorityLow(-4), + NSOperationQueuePriorityNormal(0), + NSOperationQueuePriorityHigh(4), + NSOperationQueuePriorityVeryHigh(8); + + final int value; + const NSOperationQueuePriority(this.value); + + static NSOperationQueuePriority fromValue(int value) => switch (value) { + -8 => NSOperationQueuePriorityVeryLow, + -4 => NSOperationQueuePriorityLow, + 0 => NSOperationQueuePriorityNormal, + 4 => NSOperationQueuePriorityHigh, + 8 => NSOperationQueuePriorityVeryHigh, + _ => throw ArgumentError( + "Unknown value for NSOperationQueuePriority: $value"), + }; +} + +typedef NSErrorDomain = ffi.Pointer; +typedef DartNSErrorDomain = objc.NSString; +typedef NSErrorUserInfoKey = ffi.Pointer; +typedef DartNSErrorUserInfoKey = objc.NSString; +late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_ = + objc.registerName( + "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); +final _objc_msgSend_3kga1r = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_attemptRecoveryFromError_optionIndex_ = + objc.registerName("attemptRecoveryFromError:optionIndex:"); +final _objc_msgSend_1yvrem6 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + +/// NSErrorRecoveryAttempting +extension NSErrorRecoveryAttempting on objc.NSObject { + /// Given that an error alert has been presented document-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and send the selected message to the specified delegate. The option index is an index into the error's array of localized recovery options. The method selected by didRecoverSelector must have the same signature as: + /// + /// - (void)didPresentErrorWithRecovery:(BOOL)didRecover contextInfo:(void *)contextInfo; + /// + /// The value passed for didRecover must be YES if error recovery was completely successful, NO otherwise. + void + attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( + objc.NSError error, + DartNSUInteger recoveryOptionIndex, + objc.ObjCObjectBase? delegate, + ffi.Pointer didRecoverSelector, + ffi.Pointer contextInfo) { + _objc_msgSend_3kga1r( + this.ref.pointer, + _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_, + error.ref.pointer, + recoveryOptionIndex, + delegate?.ref.pointer ?? ffi.nullptr, + didRecoverSelector, + contextInfo); + } + + /// Given that an error alert has been presented applicaton-modally to the user, and the user has chosen one of the error's recovery options, attempt recovery from the error, and return YES if error recovery was completely successful, NO otherwise. The recovery option index is an index into the error's array of localized recovery options. + bool attemptRecoveryFromError_optionIndex_( + objc.NSError error, DartNSUInteger recoveryOptionIndex) { + return _objc_msgSend_1yvrem6( + this.ref.pointer, + _sel_attemptRecoveryFromError_optionIndex_, + error.ref.pointer, + recoveryOptionIndex); + } +} + +typedef NSURLResourceKey1 = ffi.Pointer; +typedef DartNSURLResourceKey1 = objc.NSString; +typedef NSURLFileResourceType1 = ffi.Pointer; +typedef DartNSURLFileResourceType1 = objc.NSString; +typedef NSURLThumbnailDictionaryItem1 = ffi.Pointer; +typedef DartNSURLThumbnailDictionaryItem1 = objc.NSString; +typedef NSURLFileProtectionType1 = ffi.Pointer; +typedef DartNSURLFileProtectionType1 = objc.NSString; +typedef NSURLUbiquitousItemDownloadingStatus1 = ffi.Pointer; +typedef DartNSURLUbiquitousItemDownloadingStatus1 = objc.NSString; +typedef NSURLUbiquitousSharedItemRole1 = ffi.Pointer; +typedef DartNSURLUbiquitousSharedItemRole1 = objc.NSString; +typedef NSURLUbiquitousSharedItemPermissions1 = ffi.Pointer; +typedef DartNSURLUbiquitousSharedItemPermissions1 = objc.NSString; +typedef NSURLBookmarkFileCreationOptions1 = NSUInteger; +typedef _DidFinish = ffi.Pointer; +typedef Dart_DidFinish = objc.ObjCBlock< + ffi.Void Function(ffi.Pointer, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)>; +void + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); +ffi.Pointer + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_closureCallable = + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_closureTrampoline) + .cast(); +void + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) { + (objc.getBlockClosure(block) as void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer))(arg0, arg1, arg2, arg3); + objc.objectRelease(block.cast()); +} + +ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)> + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerCallable = + ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerTrampoline) + ..keepIsolateAlive = false; + +/// Construction methods for `objc.ObjCBlock`. +abstract final class ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)> + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) => + objc.ObjCBlock< + ffi.Void Function( + NSCondition, + NSURLSession, + NSURLSessionDownloadTask, + objc.NSURL)>(pointer, retain: retain, release: release); + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock + fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => + objc.ObjCBlock< + ffi.Void Function(NSCondition, NSURLSession, + NSURLSessionDownloadTask, objc.NSURL)>( + objc.newPointerBlock( + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrCallable, + ptr.cast()), + retain: false, + release: true); + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + static objc.ObjCBlock fromFunction(void Function(NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL) fn) => + objc.ObjCBlock( + objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_closureCallable, + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + NSCondition.castFromPointer(arg0, retain: true, release: true), + NSURLSession.castFromPointer(arg1, retain: true, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, retain: true, release: true), + objc.NSURL.castFromPointer(arg3, retain: true, release: true))), + retain: false, + release: true); + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + static objc.ObjCBlock< + ffi.Void Function(NSCondition, NSURLSession, NSURLSessionDownloadTask, + objc.NSURL)> listener( + void Function( + NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL) + fn) { + final raw = objc.newClosureBlock( + _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerCallable + .nativeFunction + .cast(), + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3) => + fn( + NSCondition.castFromPointer(arg0, retain: false, release: true), + NSURLSession.castFromPointer(arg1, + retain: false, release: true), + NSURLSessionDownloadTask.castFromPointer(arg2, + retain: false, release: true), + objc.NSURL + .castFromPointer(arg3, retain: false, release: true))); + final wrapper = _NativeCupertinoHttp_wrapListenerBlock_4ya7yd(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function(NSCondition, NSURLSession, NSURLSessionDownloadTask, + objc.NSURL)>(wrapper, retain: false, release: true); + } +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_CallExtension + on objc.ObjCBlock< + ffi.Void Function( + NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)> { + void call(NSCondition arg0, NSURLSession arg1, NSURLSessionDownloadTask arg2, + objc.NSURL arg3) => + ref.pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + ref.pointer, + arg0.ref.pointer, + arg1.ref.pointer, + arg2.ref.pointer, + arg3.ref.pointer); +} + +typedef _DidFinishWithLock = ffi.Pointer; +typedef Dart_DidFinishWithLock = objc.ObjCBlock< + ffi.Void Function( + NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>; + +const int noErr = 0; + +const int kNilOptions = 0; + +const int kVariableLengthArray = 1; + +const int kUnknownType = 1061109567; + +const int normal = 0; + +const int bold = 1; + +const int italic = 2; + +const int underline = 4; + +const int outline = 8; + +const int shadow = 16; + +const int condense = 32; + +const int extend = 64; + +const int developStage = 32; + +const int alphaStage = 64; + +const int betaStage = 96; + +const int finalStage = 128; + +const int NSScannedOption = 1; + +const int NSCollectorDisabledOption = 2; + +const int noErr1 = 0; + +const int kNilOptions1 = 0; + +const int kVariableLengthArray1 = 1; + +const int kUnknownType1 = 1061109567; + +const int normal1 = 0; + +const int bold1 = 1; + +const int italic1 = 2; + +const int underline1 = 4; + +const int outline1 = 8; + +const int shadow1 = 16; + +const int condense1 = 32; + +const int extend1 = 64; + +const int developStage1 = 32; + +const int alphaStage1 = 64; + +const int betaStage1 = 96; + +const int finalStage1 = 128; + +const int NSScannedOption1 = 1; + +const int NSCollectorDisabledOption1 = 2; + +const int noErr2 = 0; + +const int kNilOptions2 = 0; + +const int kVariableLengthArray2 = 1; + +const int kUnknownType2 = 1061109567; + +const int normal2 = 0; + +const int bold2 = 1; + +const int italic2 = 2; + +const int underline2 = 4; + +const int outline2 = 8; + +const int shadow2 = 16; + +const int condense2 = 32; + +const int extend2 = 64; + +const int developStage2 = 32; + +const int alphaStage2 = 64; + +const int betaStage2 = 96; + +const int finalStage2 = 128; + +const int NSScannedOption2 = 1; + +const int NSCollectorDisabledOption2 = 2; + +const int errSecSuccess = 0; + +const int errSecUnimplemented = -4; + +const int errSecDiskFull = -34; + +const int errSecDskFull = -34; + +const int errSecIO = -36; + +const int errSecOpWr = -49; + +const int errSecParam = -50; + +const int errSecWrPerm = -61; + +const int errSecAllocate = -108; + +const int errSecUserCanceled = -128; + +const int errSecBadReq = -909; + +const int errSecInternalComponent = -2070; + +const int errSecCoreFoundationUnknown = -4960; + +const int errSecMissingEntitlement = -34018; + +const int errSecRestrictedAPI = -34020; + +const int errSecNotAvailable = -25291; + +const int errSecReadOnly = -25292; + +const int errSecAuthFailed = -25293; + +const int errSecNoSuchKeychain = -25294; + +const int errSecInvalidKeychain = -25295; + +const int errSecDuplicateKeychain = -25296; + +const int errSecDuplicateCallback = -25297; + +const int errSecInvalidCallback = -25298; + +const int errSecDuplicateItem = -25299; + +const int errSecItemNotFound = -25300; + +const int errSecBufferTooSmall = -25301; + +const int errSecDataTooLarge = -25302; + +const int errSecNoSuchAttr = -25303; + +const int errSecInvalidItemRef = -25304; + +const int errSecInvalidSearchRef = -25305; + +const int errSecNoSuchClass = -25306; + +const int errSecNoDefaultKeychain = -25307; + +const int errSecInteractionNotAllowed = -25308; + +const int errSecReadOnlyAttr = -25309; + +const int errSecWrongSecVersion = -25310; + +const int errSecKeySizeNotAllowed = -25311; + +const int errSecNoStorageModule = -25312; + +const int errSecNoCertificateModule = -25313; + +const int errSecNoPolicyModule = -25314; + +const int errSecInteractionRequired = -25315; + +const int errSecDataNotAvailable = -25316; + +const int errSecDataNotModifiable = -25317; + +const int errSecCreateChainFailed = -25318; + +const int errSecInvalidPrefsDomain = -25319; + +const int errSecInDarkWake = -25320; + +const int errSecACLNotSimple = -25240; + +const int errSecPolicyNotFound = -25241; + +const int errSecInvalidTrustSetting = -25242; + +const int errSecNoAccessForItem = -25243; + +const int errSecInvalidOwnerEdit = -25244; + +const int errSecTrustNotAvailable = -25245; + +const int errSecUnsupportedFormat = -25256; + +const int errSecUnknownFormat = -25257; + +const int errSecKeyIsSensitive = -25258; + +const int errSecMultiplePrivKeys = -25259; + +const int errSecPassphraseRequired = -25260; + +const int errSecInvalidPasswordRef = -25261; + +const int errSecInvalidTrustSettings = -25262; + +const int errSecNoTrustSettings = -25263; + +const int errSecPkcs12VerifyFailure = -25264; + +const int errSecNotSigner = -26267; + +const int errSecDecode = -26275; + +const int errSecServiceNotAvailable = -67585; + +const int errSecInsufficientClientID = -67586; + +const int errSecDeviceReset = -67587; + +const int errSecDeviceFailed = -67588; + +const int errSecAppleAddAppACLSubject = -67589; + +const int errSecApplePublicKeyIncomplete = -67590; + +const int errSecAppleSignatureMismatch = -67591; + +const int errSecAppleInvalidKeyStartDate = -67592; + +const int errSecAppleInvalidKeyEndDate = -67593; + +const int errSecConversionError = -67594; + +const int errSecAppleSSLv2Rollback = -67595; + +const int errSecQuotaExceeded = -67596; + +const int errSecFileTooBig = -67597; + +const int errSecInvalidDatabaseBlob = -67598; + +const int errSecInvalidKeyBlob = -67599; + +const int errSecIncompatibleDatabaseBlob = -67600; + +const int errSecIncompatibleKeyBlob = -67601; + +const int errSecHostNameMismatch = -67602; + +const int errSecUnknownCriticalExtensionFlag = -67603; + +const int errSecNoBasicConstraints = -67604; + +const int errSecNoBasicConstraintsCA = -67605; + +const int errSecInvalidAuthorityKeyID = -67606; + +const int errSecInvalidSubjectKeyID = -67607; + +const int errSecInvalidKeyUsageForPolicy = -67608; + +const int errSecInvalidExtendedKeyUsage = -67609; + +const int errSecInvalidIDLinkage = -67610; + +const int errSecPathLengthConstraintExceeded = -67611; + +const int errSecInvalidRoot = -67612; + +const int errSecCRLExpired = -67613; + +const int errSecCRLNotValidYet = -67614; + +const int errSecCRLNotFound = -67615; + +const int errSecCRLServerDown = -67616; + +const int errSecCRLBadURI = -67617; + +const int errSecUnknownCertExtension = -67618; + +const int errSecUnknownCRLExtension = -67619; + +const int errSecCRLNotTrusted = -67620; + +const int errSecCRLPolicyFailed = -67621; + +const int errSecIDPFailure = -67622; + +const int errSecSMIMEEmailAddressesNotFound = -67623; + +const int errSecSMIMEBadExtendedKeyUsage = -67624; + +const int errSecSMIMEBadKeyUsage = -67625; + +const int errSecSMIMEKeyUsageNotCritical = -67626; + +const int errSecSMIMENoEmailAddress = -67627; + +const int errSecSMIMESubjAltNameNotCritical = -67628; + +const int errSecSSLBadExtendedKeyUsage = -67629; + +const int errSecOCSPBadResponse = -67630; + +const int errSecOCSPBadRequest = -67631; + +const int errSecOCSPUnavailable = -67632; + +const int errSecOCSPStatusUnrecognized = -67633; + +const int errSecEndOfData = -67634; + +const int errSecIncompleteCertRevocationCheck = -67635; + +const int errSecNetworkFailure = -67636; + +const int errSecOCSPNotTrustedToAnchor = -67637; + +const int errSecRecordModified = -67638; + +const int errSecOCSPSignatureError = -67639; + +const int errSecOCSPNoSigner = -67640; + +const int errSecOCSPResponderMalformedReq = -67641; + +const int errSecOCSPResponderInternalError = -67642; + +const int errSecOCSPResponderTryLater = -67643; + +const int errSecOCSPResponderSignatureRequired = -67644; + +const int errSecOCSPResponderUnauthorized = -67645; + +const int errSecOCSPResponseNonceMismatch = -67646; + +const int errSecCodeSigningBadCertChainLength = -67647; + +const int errSecCodeSigningNoBasicConstraints = -67648; + +const int errSecCodeSigningBadPathLengthConstraint = -67649; + +const int errSecCodeSigningNoExtendedKeyUsage = -67650; + +const int errSecCodeSigningDevelopment = -67651; + +const int errSecResourceSignBadCertChainLength = -67652; + +const int errSecResourceSignBadExtKeyUsage = -67653; + +const int errSecTrustSettingDeny = -67654; + +const int errSecInvalidSubjectName = -67655; + +const int errSecUnknownQualifiedCertStatement = -67656; + +const int errSecMobileMeRequestQueued = -67657; + +const int errSecMobileMeRequestRedirected = -67658; + +const int errSecMobileMeServerError = -67659; + +const int errSecMobileMeServerNotAvailable = -67660; + +const int errSecMobileMeServerAlreadyExists = -67661; + +const int errSecMobileMeServerServiceErr = -67662; + +const int errSecMobileMeRequestAlreadyPending = -67663; + +const int errSecMobileMeNoRequestPending = -67664; + +const int errSecMobileMeCSRVerifyFailure = -67665; + +const int errSecMobileMeFailedConsistencyCheck = -67666; + +const int errSecNotInitialized = -67667; + +const int errSecInvalidHandleUsage = -67668; + +const int errSecPVCReferentNotFound = -67669; + +const int errSecFunctionIntegrityFail = -67670; + +const int errSecInternalError = -67671; + +const int errSecMemoryError = -67672; + +const int errSecInvalidData = -67673; + +const int errSecMDSError = -67674; + +const int errSecInvalidPointer = -67675; + +const int errSecSelfCheckFailed = -67676; + +const int errSecFunctionFailed = -67677; + +const int errSecModuleManifestVerifyFailed = -67678; + +const int errSecInvalidGUID = -67679; + +const int errSecInvalidHandle = -67680; + +const int errSecInvalidDBList = -67681; + +const int errSecInvalidPassthroughID = -67682; + +const int errSecInvalidNetworkAddress = -67683; + +const int errSecCRLAlreadySigned = -67684; + +const int errSecInvalidNumberOfFields = -67685; + +const int errSecVerificationFailure = -67686; + +const int errSecUnknownTag = -67687; + +const int errSecInvalidSignature = -67688; + +const int errSecInvalidName = -67689; + +const int errSecInvalidCertificateRef = -67690; + +const int errSecInvalidCertificateGroup = -67691; + +const int errSecTagNotFound = -67692; + +const int errSecInvalidQuery = -67693; + +const int errSecInvalidValue = -67694; + +const int errSecCallbackFailed = -67695; + +const int errSecACLDeleteFailed = -67696; + +const int errSecACLReplaceFailed = -67697; + +const int errSecACLAddFailed = -67698; + +const int errSecACLChangeFailed = -67699; + +const int errSecInvalidAccessCredentials = -67700; + +const int errSecInvalidRecord = -67701; + +const int errSecInvalidACL = -67702; + +const int errSecInvalidSampleValue = -67703; + +const int errSecIncompatibleVersion = -67704; + +const int errSecPrivilegeNotGranted = -67705; + +const int errSecInvalidScope = -67706; + +const int errSecPVCAlreadyConfigured = -67707; + +const int errSecInvalidPVC = -67708; + +const int errSecEMMLoadFailed = -67709; + +const int errSecEMMUnloadFailed = -67710; + +const int errSecAddinLoadFailed = -67711; + +const int errSecInvalidKeyRef = -67712; + +const int errSecInvalidKeyHierarchy = -67713; + +const int errSecAddinUnloadFailed = -67714; + +const int errSecLibraryReferenceNotFound = -67715; + +const int errSecInvalidAddinFunctionTable = -67716; + +const int errSecInvalidServiceMask = -67717; + +const int errSecModuleNotLoaded = -67718; + +const int errSecInvalidSubServiceID = -67719; + +const int errSecAttributeNotInContext = -67720; + +const int errSecModuleManagerInitializeFailed = -67721; + +const int errSecModuleManagerNotFound = -67722; + +const int errSecEventNotificationCallbackNotFound = -67723; + +const int errSecInputLengthError = -67724; + +const int errSecOutputLengthError = -67725; + +const int errSecPrivilegeNotSupported = -67726; + +const int errSecDeviceError = -67727; + +const int errSecAttachHandleBusy = -67728; + +const int errSecNotLoggedIn = -67729; + +const int errSecAlgorithmMismatch = -67730; + +const int errSecKeyUsageIncorrect = -67731; + +const int errSecKeyBlobTypeIncorrect = -67732; + +const int errSecKeyHeaderInconsistent = -67733; + +const int errSecUnsupportedKeyFormat = -67734; + +const int errSecUnsupportedKeySize = -67735; + +const int errSecInvalidKeyUsageMask = -67736; + +const int errSecUnsupportedKeyUsageMask = -67737; + +const int errSecInvalidKeyAttributeMask = -67738; + +const int errSecUnsupportedKeyAttributeMask = -67739; + +const int errSecInvalidKeyLabel = -67740; + +const int errSecUnsupportedKeyLabel = -67741; + +const int errSecInvalidKeyFormat = -67742; + +const int errSecUnsupportedVectorOfBuffers = -67743; + +const int errSecInvalidInputVector = -67744; + +const int errSecInvalidOutputVector = -67745; + +const int errSecInvalidContext = -67746; + +const int errSecInvalidAlgorithm = -67747; + +const int errSecInvalidAttributeKey = -67748; + +const int errSecMissingAttributeKey = -67749; + +const int errSecInvalidAttributeInitVector = -67750; + +const int errSecMissingAttributeInitVector = -67751; + +const int errSecInvalidAttributeSalt = -67752; + +const int errSecMissingAttributeSalt = -67753; + +const int errSecInvalidAttributePadding = -67754; + +const int errSecMissingAttributePadding = -67755; + +const int errSecInvalidAttributeRandom = -67756; + +const int errSecMissingAttributeRandom = -67757; + +const int errSecInvalidAttributeSeed = -67758; + +const int errSecMissingAttributeSeed = -67759; + +const int errSecInvalidAttributePassphrase = -67760; + +const int errSecMissingAttributePassphrase = -67761; + +const int errSecInvalidAttributeKeyLength = -67762; + +const int errSecMissingAttributeKeyLength = -67763; + +const int errSecInvalidAttributeBlockSize = -67764; + +const int errSecMissingAttributeBlockSize = -67765; + +const int errSecInvalidAttributeOutputSize = -67766; + +const int errSecMissingAttributeOutputSize = -67767; + +const int errSecInvalidAttributeRounds = -67768; + +const int errSecMissingAttributeRounds = -67769; + +const int errSecInvalidAlgorithmParms = -67770; + +const int errSecMissingAlgorithmParms = -67771; + +const int errSecInvalidAttributeLabel = -67772; + +const int errSecMissingAttributeLabel = -67773; + +const int errSecInvalidAttributeKeyType = -67774; + +const int errSecMissingAttributeKeyType = -67775; + +const int errSecInvalidAttributeMode = -67776; + +const int errSecMissingAttributeMode = -67777; + +const int errSecInvalidAttributeEffectiveBits = -67778; + +const int errSecMissingAttributeEffectiveBits = -67779; + +const int errSecInvalidAttributeStartDate = -67780; + +const int errSecMissingAttributeStartDate = -67781; + +const int errSecInvalidAttributeEndDate = -67782; + +const int errSecMissingAttributeEndDate = -67783; + +const int errSecInvalidAttributeVersion = -67784; + +const int errSecMissingAttributeVersion = -67785; + +const int errSecInvalidAttributePrime = -67786; + +const int errSecMissingAttributePrime = -67787; + +const int errSecInvalidAttributeBase = -67788; + +const int errSecMissingAttributeBase = -67789; + +const int errSecInvalidAttributeSubprime = -67790; + +const int errSecMissingAttributeSubprime = -67791; + +const int errSecInvalidAttributeIterationCount = -67792; + +const int errSecMissingAttributeIterationCount = -67793; + +const int errSecInvalidAttributeDLDBHandle = -67794; + +const int errSecMissingAttributeDLDBHandle = -67795; + +const int errSecInvalidAttributeAccessCredentials = -67796; + +const int errSecMissingAttributeAccessCredentials = -67797; + +const int errSecInvalidAttributePublicKeyFormat = -67798; + +const int errSecMissingAttributePublicKeyFormat = -67799; + +const int errSecInvalidAttributePrivateKeyFormat = -67800; + +const int errSecMissingAttributePrivateKeyFormat = -67801; + +const int errSecInvalidAttributeSymmetricKeyFormat = -67802; + +const int errSecMissingAttributeSymmetricKeyFormat = -67803; + +const int errSecInvalidAttributeWrappedKeyFormat = -67804; + +const int errSecMissingAttributeWrappedKeyFormat = -67805; + +const int errSecStagedOperationInProgress = -67806; + +const int errSecStagedOperationNotStarted = -67807; + +const int errSecVerifyFailed = -67808; + +const int errSecQuerySizeUnknown = -67809; + +const int errSecBlockSizeMismatch = -67810; + +const int errSecPublicKeyInconsistent = -67811; + +const int errSecDeviceVerifyFailed = -67812; + +const int errSecInvalidLoginName = -67813; + +const int errSecAlreadyLoggedIn = -67814; + +const int errSecInvalidDigestAlgorithm = -67815; + +const int errSecInvalidCRLGroup = -67816; + +const int errSecCertificateCannotOperate = -67817; + +const int errSecCertificateExpired = -67818; + +const int errSecCertificateNotValidYet = -67819; + +const int errSecCertificateRevoked = -67820; + +const int errSecCertificateSuspended = -67821; + +const int errSecInsufficientCredentials = -67822; + +const int errSecInvalidAction = -67823; + +const int errSecInvalidAuthority = -67824; + +const int errSecVerifyActionFailed = -67825; + +const int errSecInvalidCertAuthority = -67826; + +const int errSecInvalidCRLAuthority = -67827; + +const int errSecInvaldCRLAuthority = -67827; + +const int errSecInvalidCRLEncoding = -67828; + +const int errSecInvalidCRLType = -67829; + +const int errSecInvalidCRL = -67830; + +const int errSecInvalidFormType = -67831; + +const int errSecInvalidID = -67832; + +const int errSecInvalidIdentifier = -67833; + +const int errSecInvalidIndex = -67834; + +const int errSecInvalidPolicyIdentifiers = -67835; + +const int errSecInvalidTimeString = -67836; + +const int errSecInvalidReason = -67837; + +const int errSecInvalidRequestInputs = -67838; + +const int errSecInvalidResponseVector = -67839; + +const int errSecInvalidStopOnPolicy = -67840; + +const int errSecInvalidTuple = -67841; + +const int errSecMultipleValuesUnsupported = -67842; + +const int errSecNotTrusted = -67843; + +const int errSecNoDefaultAuthority = -67844; + +const int errSecRejectedForm = -67845; + +const int errSecRequestLost = -67846; + +const int errSecRequestRejected = -67847; + +const int errSecUnsupportedAddressType = -67848; + +const int errSecUnsupportedService = -67849; + +const int errSecInvalidTupleGroup = -67850; + +const int errSecInvalidBaseACLs = -67851; + +const int errSecInvalidTupleCredentials = -67852; + +const int errSecInvalidTupleCredendtials = -67852; + +const int errSecInvalidEncoding = -67853; + +const int errSecInvalidValidityPeriod = -67854; + +const int errSecInvalidRequestor = -67855; + +const int errSecRequestDescriptor = -67856; + +const int errSecInvalidBundleInfo = -67857; + +const int errSecInvalidCRLIndex = -67858; + +const int errSecNoFieldValues = -67859; + +const int errSecUnsupportedFieldFormat = -67860; + +const int errSecUnsupportedIndexInfo = -67861; + +const int errSecUnsupportedLocality = -67862; + +const int errSecUnsupportedNumAttributes = -67863; + +const int errSecUnsupportedNumIndexes = -67864; + +const int errSecUnsupportedNumRecordTypes = -67865; + +const int errSecFieldSpecifiedMultiple = -67866; + +const int errSecIncompatibleFieldFormat = -67867; + +const int errSecInvalidParsingModule = -67868; + +const int errSecDatabaseLocked = -67869; + +const int errSecDatastoreIsOpen = -67870; + +const int errSecMissingValue = -67871; + +const int errSecUnsupportedQueryLimits = -67872; + +const int errSecUnsupportedNumSelectionPreds = -67873; + +const int errSecUnsupportedOperator = -67874; + +const int errSecInvalidDBLocation = -67875; + +const int errSecInvalidAccessRequest = -67876; + +const int errSecInvalidIndexInfo = -67877; + +const int errSecInvalidNewOwner = -67878; + +const int errSecInvalidModifyMode = -67879; + +const int errSecMissingRequiredExtension = -67880; + +const int errSecExtendedKeyUsageNotCritical = -67881; + +const int errSecTimestampMissing = -67882; + +const int errSecTimestampInvalid = -67883; + +const int errSecTimestampNotTrusted = -67884; + +const int errSecTimestampServiceNotAvailable = -67885; + +const int errSecTimestampBadAlg = -67886; + +const int errSecTimestampBadRequest = -67887; + +const int errSecTimestampBadDataFormat = -67888; + +const int errSecTimestampTimeNotAvailable = -67889; + +const int errSecTimestampUnacceptedPolicy = -67890; + +const int errSecTimestampUnacceptedExtension = -67891; + +const int errSecTimestampAddInfoNotAvailable = -67892; + +const int errSecTimestampSystemFailure = -67893; + +const int errSecSigningTimeMissing = -67894; + +const int errSecTimestampRejection = -67895; + +const int errSecTimestampWaiting = -67896; + +const int errSecTimestampRevocationWarning = -67897; + +const int errSecTimestampRevocationNotification = -67898; + +const int errSecCertificatePolicyNotAllowed = -67899; + +const int errSecCertificateNameNotAllowed = -67900; + +const int errSecCertificateValidityPeriodTooLong = -67901; + +const int errSecCertificateIsCA = -67902; + +const int errSecCertificateDuplicateExtension = -67903; + +const int errSSLProtocol = -9800; + +const int errSSLNegotiation = -9801; + +const int errSSLFatalAlert = -9802; + +const int errSSLWouldBlock = -9803; + +const int errSSLSessionNotFound = -9804; + +const int errSSLClosedGraceful = -9805; + +const int errSSLClosedAbort = -9806; + +const int errSSLXCertChainInvalid = -9807; + +const int errSSLBadCert = -9808; + +const int errSSLCrypto = -9809; + +const int errSSLInternal = -9810; + +const int errSSLModuleAttach = -9811; + +const int errSSLUnknownRootCert = -9812; + +const int errSSLNoRootCert = -9813; + +const int errSSLCertExpired = -9814; + +const int errSSLCertNotYetValid = -9815; + +const int errSSLClosedNoNotify = -9816; + +const int errSSLBufferOverflow = -9817; + +const int errSSLBadCipherSuite = -9818; + +const int errSSLPeerUnexpectedMsg = -9819; + +const int errSSLPeerBadRecordMac = -9820; + +const int errSSLPeerDecryptionFail = -9821; + +const int errSSLPeerRecordOverflow = -9822; + +const int errSSLPeerDecompressFail = -9823; + +const int errSSLPeerHandshakeFail = -9824; + +const int errSSLPeerBadCert = -9825; + +const int errSSLPeerUnsupportedCert = -9826; + +const int errSSLPeerCertRevoked = -9827; + +const int errSSLPeerCertExpired = -9828; + +const int errSSLPeerCertUnknown = -9829; + +const int errSSLIllegalParam = -9830; + +const int errSSLPeerUnknownCA = -9831; + +const int errSSLPeerAccessDenied = -9832; + +const int errSSLPeerDecodeError = -9833; + +const int errSSLPeerDecryptError = -9834; + +const int errSSLPeerExportRestriction = -9835; + +const int errSSLPeerProtocolVersion = -9836; + +const int errSSLPeerInsufficientSecurity = -9837; + +const int errSSLPeerInternalError = -9838; + +const int errSSLPeerUserCancelled = -9839; + +const int errSSLPeerNoRenegotiation = -9840; + +const int errSSLPeerAuthCompleted = -9841; + +const int errSSLClientCertRequested = -9842; + +const int errSSLHostNameMismatch = -9843; + +const int errSSLConnectionRefused = -9844; + +const int errSSLDecryptionFail = -9845; + +const int errSSLBadRecordMac = -9846; + +const int errSSLRecordOverflow = -9847; + +const int errSSLBadConfiguration = -9848; + +const int errSSLUnexpectedRecord = -9849; + +const int errSSLWeakPeerEphemeralDHKey = -9850; + +const int errSSLClientHelloReceived = -9851; + +const int errSSLTransportReset = -9852; + +const int errSSLNetworkTimeout = -9853; + +const int errSSLConfigurationFailed = -9854; + +const int errSSLUnsupportedExtension = -9855; + +const int errSSLUnexpectedMessage = -9856; + +const int errSSLDecompressFail = -9857; + +const int errSSLHandshakeFail = -9858; + +const int errSSLDecodeError = -9859; + +const int errSSLInappropriateFallback = -9860; + +const int errSSLMissingExtension = -9861; + +const int errSSLBadCertificateStatusResponse = -9862; + +const int errSSLCertificateRequired = -9863; + +const int errSSLUnknownPSKIdentity = -9864; + +const int errSSLUnrecognizedName = -9865; + +const int errSSLATSViolation = -9880; + +const int errSSLATSMinimumVersionViolation = -9881; + +const int errSSLATSCiphersuiteViolation = -9882; + +const int errSSLATSMinimumKeySizeViolation = -9883; + +const int errSSLATSLeafCertificateHashAlgorithmViolation = -9884; + +const int errSSLATSCertificateHashAlgorithmViolation = -9885; + +const int errSSLATSCertificateTrustViolation = -9886; + +const int errSSLEarlyDataRejected = -9890; + +const int OSUnknownByteOrder = 0; + +const int OSLittleEndian = 1; + +const int OSBigEndian = 2; + +const int kCFNotificationDeliverImmediately = 1; + +const int kCFNotificationPostToAllSessions = 2; + +const int kCFCalendarComponentsWrap = 1; + +const int kCFSocketAutomaticallyReenableReadCallBack = 1; + +const int kCFSocketAutomaticallyReenableAcceptCallBack = 2; + +const int kCFSocketAutomaticallyReenableDataCallBack = 3; + +const int kCFSocketAutomaticallyReenableWriteCallBack = 8; + +const int kCFSocketLeaveErrors = 64; + +const int kCFSocketCloseOnInvalidate = 128; + +const int DISPATCH_WALLTIME_NOW = -2; + +const int kCFPropertyListReadCorruptError = 3840; + +const int kCFPropertyListReadUnknownVersionError = 3841; + +const int kCFPropertyListReadStreamError = 3842; + +const int kCFPropertyListWriteStreamError = 3851; + +const int kCFBundleExecutableArchitectureI386 = 7; + +const int kCFBundleExecutableArchitecturePPC = 18; + +const int kCFBundleExecutableArchitectureX86_64 = 16777223; + +const int kCFBundleExecutableArchitecturePPC64 = 16777234; + +const int kCFBundleExecutableArchitectureARM64 = 16777228; + +const int kCFMessagePortSuccess = 0; + +const int kCFMessagePortSendTimeout = -1; + +const int kCFMessagePortReceiveTimeout = -2; + +const int kCFMessagePortIsInvalid = -3; + +const int kCFMessagePortTransportError = -4; + +const int kCFMessagePortBecameInvalidError = -5; + +const int kCFStringTokenizerUnitWord = 0; + +const int kCFStringTokenizerUnitSentence = 1; + +const int kCFStringTokenizerUnitParagraph = 2; + +const int kCFStringTokenizerUnitLineBreak = 3; + +const int kCFStringTokenizerUnitWordBoundary = 4; + +const int kCFStringTokenizerAttributeLatinTranscription = 65536; + +const int kCFStringTokenizerAttributeLanguage = 131072; + +const int kCFFileDescriptorReadCallBack = 1; + +const int kCFFileDescriptorWriteCallBack = 2; + +const int kCFUserNotificationStopAlertLevel = 0; + +const int kCFUserNotificationNoteAlertLevel = 1; + +const int kCFUserNotificationCautionAlertLevel = 2; + +const int kCFUserNotificationPlainAlertLevel = 3; + +const int kCFUserNotificationDefaultResponse = 0; + +const int kCFUserNotificationAlternateResponse = 1; + +const int kCFUserNotificationOtherResponse = 2; + +const int kCFUserNotificationCancelResponse = 3; + +const int kCFUserNotificationNoDefaultButtonFlag = 32; + +const int kCFUserNotificationUseRadioButtonsFlag = 64; + +const int kCFXMLNodeCurrentVersion = 1; + +const int CSSM_INVALID_HANDLE = 0; + +const int CSSM_FALSE = 0; + +const int CSSM_TRUE = 1; + +const int CSSM_OK = 0; + +const int CSSM_MODULE_STRING_SIZE = 64; + +const int CSSM_KEY_HIERARCHY_NONE = 0; + +const int CSSM_KEY_HIERARCHY_INTEG = 1; + +const int CSSM_KEY_HIERARCHY_EXPORT = 2; + +const int CSSM_PVC_NONE = 0; + +const int CSSM_PVC_APP = 1; + +const int CSSM_PVC_SP = 2; + +const int CSSM_PRIVILEGE_SCOPE_NONE = 0; + +const int CSSM_PRIVILEGE_SCOPE_PROCESS = 1; + +const int CSSM_PRIVILEGE_SCOPE_THREAD = 2; + +const int CSSM_SERVICE_CSSM = 1; + +const int CSSM_SERVICE_CSP = 2; + +const int CSSM_SERVICE_DL = 4; + +const int CSSM_SERVICE_CL = 8; + +const int CSSM_SERVICE_TP = 16; + +const int CSSM_SERVICE_AC = 32; + +const int CSSM_SERVICE_KR = 64; + +const int CSSM_NOTIFY_INSERT = 1; + +const int CSSM_NOTIFY_REMOVE = 2; + +const int CSSM_NOTIFY_FAULT = 3; + +const int CSSM_ATTACH_READ_ONLY = 1; + +const int CSSM_USEE_LAST = 255; + +const int CSSM_USEE_NONE = 0; + +const int CSSM_USEE_DOMESTIC = 1; + +const int CSSM_USEE_FINANCIAL = 2; + +const int CSSM_USEE_KRLE = 3; + +const int CSSM_USEE_KRENT = 4; + +const int CSSM_USEE_SSL = 5; + +const int CSSM_USEE_AUTHENTICATION = 6; + +const int CSSM_USEE_KEYEXCH = 7; + +const int CSSM_USEE_MEDICAL = 8; + +const int CSSM_USEE_INSURANCE = 9; + +const int CSSM_USEE_WEAK = 10; + +const int CSSM_ADDR_NONE = 0; + +const int CSSM_ADDR_CUSTOM = 1; + +const int CSSM_ADDR_URL = 2; + +const int CSSM_ADDR_SOCKADDR = 3; + +const int CSSM_ADDR_NAME = 4; + +const int CSSM_NET_PROTO_NONE = 0; + +const int CSSM_NET_PROTO_CUSTOM = 1; + +const int CSSM_NET_PROTO_UNSPECIFIED = 2; + +const int CSSM_NET_PROTO_LDAP = 3; + +const int CSSM_NET_PROTO_LDAPS = 4; + +const int CSSM_NET_PROTO_LDAPNS = 5; + +const int CSSM_NET_PROTO_X500DAP = 6; + +const int CSSM_NET_PROTO_FTP = 7; + +const int CSSM_NET_PROTO_FTPS = 8; + +const int CSSM_NET_PROTO_OCSP = 9; + +const int CSSM_NET_PROTO_CMP = 10; + +const int CSSM_NET_PROTO_CMPS = 11; + +const int CSSM_WORDID__UNK_ = -1; + +const int CSSM_WORDID__NLU_ = 0; + +const int CSSM_WORDID__STAR_ = 1; + +const int CSSM_WORDID_A = 2; + +const int CSSM_WORDID_ACL = 3; + +const int CSSM_WORDID_ALPHA = 4; + +const int CSSM_WORDID_B = 5; + +const int CSSM_WORDID_BER = 6; + +const int CSSM_WORDID_BINARY = 7; + +const int CSSM_WORDID_BIOMETRIC = 8; + +const int CSSM_WORDID_C = 9; + +const int CSSM_WORDID_CANCELED = 10; + +const int CSSM_WORDID_CERT = 11; + +const int CSSM_WORDID_COMMENT = 12; + +const int CSSM_WORDID_CRL = 13; + +const int CSSM_WORDID_CUSTOM = 14; + +const int CSSM_WORDID_D = 15; + +const int CSSM_WORDID_DATE = 16; + +const int CSSM_WORDID_DB_DELETE = 17; + +const int CSSM_WORDID_DB_EXEC_STORED_QUERY = 18; + +const int CSSM_WORDID_DB_INSERT = 19; + +const int CSSM_WORDID_DB_MODIFY = 20; + +const int CSSM_WORDID_DB_READ = 21; + +const int CSSM_WORDID_DBS_CREATE = 22; + +const int CSSM_WORDID_DBS_DELETE = 23; + +const int CSSM_WORDID_DECRYPT = 24; + +const int CSSM_WORDID_DELETE = 25; + +const int CSSM_WORDID_DELTA_CRL = 26; + +const int CSSM_WORDID_DER = 27; + +const int CSSM_WORDID_DERIVE = 28; + +const int CSSM_WORDID_DISPLAY = 29; + +const int CSSM_WORDID_DO = 30; + +const int CSSM_WORDID_DSA = 31; + +const int CSSM_WORDID_DSA_SHA1 = 32; + +const int CSSM_WORDID_E = 33; + +const int CSSM_WORDID_ELGAMAL = 34; + +const int CSSM_WORDID_ENCRYPT = 35; + +const int CSSM_WORDID_ENTRY = 36; + +const int CSSM_WORDID_EXPORT_CLEAR = 37; + +const int CSSM_WORDID_EXPORT_WRAPPED = 38; + +const int CSSM_WORDID_G = 39; + +const int CSSM_WORDID_GE = 40; + +const int CSSM_WORDID_GENKEY = 41; + +const int CSSM_WORDID_HASH = 42; + +const int CSSM_WORDID_HASHED_PASSWORD = 43; + +const int CSSM_WORDID_HASHED_SUBJECT = 44; + +const int CSSM_WORDID_HAVAL = 45; + +const int CSSM_WORDID_IBCHASH = 46; + +const int CSSM_WORDID_IMPORT_CLEAR = 47; + +const int CSSM_WORDID_IMPORT_WRAPPED = 48; + +const int CSSM_WORDID_INTEL = 49; + +const int CSSM_WORDID_ISSUER = 50; + +const int CSSM_WORDID_ISSUER_INFO = 51; + +const int CSSM_WORDID_K_OF_N = 52; + +const int CSSM_WORDID_KEA = 53; + +const int CSSM_WORDID_KEYHOLDER = 54; + +const int CSSM_WORDID_L = 55; + +const int CSSM_WORDID_LE = 56; + +const int CSSM_WORDID_LOGIN = 57; + +const int CSSM_WORDID_LOGIN_NAME = 58; + +const int CSSM_WORDID_MAC = 59; + +const int CSSM_WORDID_MD2 = 60; + +const int CSSM_WORDID_MD2WITHRSA = 61; + +const int CSSM_WORDID_MD4 = 62; + +const int CSSM_WORDID_MD5 = 63; + +const int CSSM_WORDID_MD5WITHRSA = 64; + +const int CSSM_WORDID_N = 65; + +const int CSSM_WORDID_NAME = 66; + +const int CSSM_WORDID_NDR = 67; + +const int CSSM_WORDID_NHASH = 68; + +const int CSSM_WORDID_NOT_AFTER = 69; + +const int CSSM_WORDID_NOT_BEFORE = 70; + +const int CSSM_WORDID_NULL = 71; + +const int CSSM_WORDID_NUMERIC = 72; + +const int CSSM_WORDID_OBJECT_HASH = 73; + +const int CSSM_WORDID_ONE_TIME = 74; + +const int CSSM_WORDID_ONLINE = 75; + +const int CSSM_WORDID_OWNER = 76; + +const int CSSM_WORDID_P = 77; + +const int CSSM_WORDID_PAM_NAME = 78; + +const int CSSM_WORDID_PASSWORD = 79; + +const int CSSM_WORDID_PGP = 80; + +const int CSSM_WORDID_PREFIX = 81; + +const int CSSM_WORDID_PRIVATE_KEY = 82; + +const int CSSM_WORDID_PROMPTED_BIOMETRIC = 83; + +const int CSSM_WORDID_PROMPTED_PASSWORD = 84; + +const int CSSM_WORDID_PROPAGATE = 85; + +const int CSSM_WORDID_PROTECTED_BIOMETRIC = 86; + +const int CSSM_WORDID_PROTECTED_PASSWORD = 87; + +const int CSSM_WORDID_PROTECTED_PIN = 88; + +const int CSSM_WORDID_PUBLIC_KEY = 89; + +const int CSSM_WORDID_PUBLIC_KEY_FROM_CERT = 90; + +const int CSSM_WORDID_Q = 91; + +const int CSSM_WORDID_RANGE = 92; + +const int CSSM_WORDID_REVAL = 93; + +const int CSSM_WORDID_RIPEMAC = 94; + +const int CSSM_WORDID_RIPEMD = 95; + +const int CSSM_WORDID_RIPEMD160 = 96; + +const int CSSM_WORDID_RSA = 97; + +const int CSSM_WORDID_RSA_ISO9796 = 98; + +const int CSSM_WORDID_RSA_PKCS = 99; + +const int CSSM_WORDID_RSA_PKCS_MD5 = 100; + +const int CSSM_WORDID_RSA_PKCS_SHA1 = 101; + +const int CSSM_WORDID_RSA_PKCS1 = 102; + +const int CSSM_WORDID_RSA_PKCS1_MD5 = 103; + +const int CSSM_WORDID_RSA_PKCS1_SHA1 = 104; + +const int CSSM_WORDID_RSA_PKCS1_SIG = 105; + +const int CSSM_WORDID_RSA_RAW = 106; + +const int CSSM_WORDID_SDSIV1 = 107; + +const int CSSM_WORDID_SEQUENCE = 108; + +const int CSSM_WORDID_SET = 109; + +const int CSSM_WORDID_SEXPR = 110; + +const int CSSM_WORDID_SHA1 = 111; + +const int CSSM_WORDID_SHA1WITHDSA = 112; + +const int CSSM_WORDID_SHA1WITHECDSA = 113; + +const int CSSM_WORDID_SHA1WITHRSA = 114; + +const int CSSM_WORDID_SIGN = 115; + +const int CSSM_WORDID_SIGNATURE = 116; + +const int CSSM_WORDID_SIGNED_NONCE = 117; + +const int CSSM_WORDID_SIGNED_SECRET = 118; + +const int CSSM_WORDID_SPKI = 119; + +const int CSSM_WORDID_SUBJECT = 120; + +const int CSSM_WORDID_SUBJECT_INFO = 121; + +const int CSSM_WORDID_TAG = 122; + +const int CSSM_WORDID_THRESHOLD = 123; + +const int CSSM_WORDID_TIME = 124; + +const int CSSM_WORDID_URI = 125; + +const int CSSM_WORDID_VERSION = 126; + +const int CSSM_WORDID_X509_ATTRIBUTE = 127; + +const int CSSM_WORDID_X509V1 = 128; + +const int CSSM_WORDID_X509V2 = 129; + +const int CSSM_WORDID_X509V3 = 130; + +const int CSSM_WORDID_X9_ATTRIBUTE = 131; + +const int CSSM_WORDID_VENDOR_START = 65536; + +const int CSSM_WORDID_VENDOR_END = 2147418112; + +const int CSSM_LIST_ELEMENT_DATUM = 0; + +const int CSSM_LIST_ELEMENT_SUBLIST = 1; + +const int CSSM_LIST_ELEMENT_WORDID = 2; + +const int CSSM_LIST_TYPE_UNKNOWN = 0; + +const int CSSM_LIST_TYPE_CUSTOM = 1; + +const int CSSM_LIST_TYPE_SEXPR = 2; + +const int CSSM_SAMPLE_TYPE_PASSWORD = 79; + +const int CSSM_SAMPLE_TYPE_HASHED_PASSWORD = 43; + +const int CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD = 87; + +const int CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD = 84; + +const int CSSM_SAMPLE_TYPE_SIGNED_NONCE = 117; + +const int CSSM_SAMPLE_TYPE_SIGNED_SECRET = 118; + +const int CSSM_SAMPLE_TYPE_BIOMETRIC = 8; + +const int CSSM_SAMPLE_TYPE_PROTECTED_BIOMETRIC = 86; + +const int CSSM_SAMPLE_TYPE_PROMPTED_BIOMETRIC = 83; + +const int CSSM_SAMPLE_TYPE_THRESHOLD = 123; + +const int CSSM_CERT_UNKNOWN = 0; + +const int CSSM_CERT_X_509v1 = 1; + +const int CSSM_CERT_X_509v2 = 2; + +const int CSSM_CERT_X_509v3 = 3; + +const int CSSM_CERT_PGP = 4; + +const int CSSM_CERT_SPKI = 5; + +const int CSSM_CERT_SDSIv1 = 6; + +const int CSSM_CERT_Intel = 8; + +const int CSSM_CERT_X_509_ATTRIBUTE = 9; + +const int CSSM_CERT_X9_ATTRIBUTE = 10; + +const int CSSM_CERT_TUPLE = 11; + +const int CSSM_CERT_ACL_ENTRY = 12; + +const int CSSM_CERT_MULTIPLE = 32766; + +const int CSSM_CERT_LAST = 32767; + +const int CSSM_CL_CUSTOM_CERT_TYPE = 32768; + +const int CSSM_CERT_ENCODING_UNKNOWN = 0; + +const int CSSM_CERT_ENCODING_CUSTOM = 1; + +const int CSSM_CERT_ENCODING_BER = 2; + +const int CSSM_CERT_ENCODING_DER = 3; + +const int CSSM_CERT_ENCODING_NDR = 4; + +const int CSSM_CERT_ENCODING_SEXPR = 5; + +const int CSSM_CERT_ENCODING_PGP = 6; + +const int CSSM_CERT_ENCODING_MULTIPLE = 32766; + +const int CSSM_CERT_ENCODING_LAST = 32767; + +const int CSSM_CL_CUSTOM_CERT_ENCODING = 32768; + +const int CSSM_CERT_PARSE_FORMAT_NONE = 0; + +const int CSSM_CERT_PARSE_FORMAT_CUSTOM = 1; + +const int CSSM_CERT_PARSE_FORMAT_SEXPR = 2; + +const int CSSM_CERT_PARSE_FORMAT_COMPLEX = 3; + +const int CSSM_CERT_PARSE_FORMAT_OID_NAMED = 4; + +const int CSSM_CERT_PARSE_FORMAT_TUPLE = 5; + +const int CSSM_CERT_PARSE_FORMAT_MULTIPLE = 32766; + +const int CSSM_CERT_PARSE_FORMAT_LAST = 32767; + +const int CSSM_CL_CUSTOM_CERT_PARSE_FORMAT = 32768; + +const int CSSM_CERTGROUP_DATA = 0; + +const int CSSM_CERTGROUP_ENCODED_CERT = 1; + +const int CSSM_CERTGROUP_PARSED_CERT = 2; + +const int CSSM_CERTGROUP_CERT_PAIR = 3; + +const int CSSM_ACL_SUBJECT_TYPE_ANY = 1; + +const int CSSM_ACL_SUBJECT_TYPE_THRESHOLD = 123; + +const int CSSM_ACL_SUBJECT_TYPE_PASSWORD = 79; + +const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD = 87; + +const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD = 84; + +const int CSSM_ACL_SUBJECT_TYPE_PUBLIC_KEY = 89; + +const int CSSM_ACL_SUBJECT_TYPE_HASHED_SUBJECT = 44; + +const int CSSM_ACL_SUBJECT_TYPE_BIOMETRIC = 8; + +const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_BIOMETRIC = 86; + +const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_BIOMETRIC = 83; + +const int CSSM_ACL_SUBJECT_TYPE_LOGIN_NAME = 58; + +const int CSSM_ACL_SUBJECT_TYPE_EXT_PAM_NAME = 78; + +const int CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START = 65536; + +const int CSSM_ACL_AUTHORIZATION_ANY = 1; + +const int CSSM_ACL_AUTHORIZATION_LOGIN = 57; + +const int CSSM_ACL_AUTHORIZATION_GENKEY = 41; + +const int CSSM_ACL_AUTHORIZATION_DELETE = 25; + +const int CSSM_ACL_AUTHORIZATION_EXPORT_WRAPPED = 38; + +const int CSSM_ACL_AUTHORIZATION_EXPORT_CLEAR = 37; + +const int CSSM_ACL_AUTHORIZATION_IMPORT_WRAPPED = 48; + +const int CSSM_ACL_AUTHORIZATION_IMPORT_CLEAR = 47; + +const int CSSM_ACL_AUTHORIZATION_SIGN = 115; + +const int CSSM_ACL_AUTHORIZATION_ENCRYPT = 35; + +const int CSSM_ACL_AUTHORIZATION_DECRYPT = 24; + +const int CSSM_ACL_AUTHORIZATION_MAC = 59; + +const int CSSM_ACL_AUTHORIZATION_DERIVE = 28; + +const int CSSM_ACL_AUTHORIZATION_DBS_CREATE = 22; + +const int CSSM_ACL_AUTHORIZATION_DBS_DELETE = 23; + +const int CSSM_ACL_AUTHORIZATION_DB_READ = 21; + +const int CSSM_ACL_AUTHORIZATION_DB_INSERT = 19; + +const int CSSM_ACL_AUTHORIZATION_DB_MODIFY = 20; + +const int CSSM_ACL_AUTHORIZATION_DB_DELETE = 17; + +const int CSSM_ACL_EDIT_MODE_ADD = 1; + +const int CSSM_ACL_EDIT_MODE_DELETE = 2; + +const int CSSM_ACL_EDIT_MODE_REPLACE = 3; + +const int CSSM_KEYHEADER_VERSION = 2; + +const int CSSM_KEYBLOB_RAW = 0; + +const int CSSM_KEYBLOB_REFERENCE = 2; + +const int CSSM_KEYBLOB_WRAPPED = 3; + +const int CSSM_KEYBLOB_OTHER = -1; + +const int CSSM_KEYBLOB_RAW_FORMAT_NONE = 0; + +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS1 = 1; + +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS3 = 2; + +const int CSSM_KEYBLOB_RAW_FORMAT_MSCAPI = 3; + +const int CSSM_KEYBLOB_RAW_FORMAT_PGP = 4; + +const int CSSM_KEYBLOB_RAW_FORMAT_FIPS186 = 5; + +const int CSSM_KEYBLOB_RAW_FORMAT_BSAFE = 6; + +const int CSSM_KEYBLOB_RAW_FORMAT_CCA = 9; + +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS8 = 10; + +const int CSSM_KEYBLOB_RAW_FORMAT_SPKI = 11; + +const int CSSM_KEYBLOB_RAW_FORMAT_OCTET_STRING = 12; + +const int CSSM_KEYBLOB_RAW_FORMAT_OTHER = -1; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_NONE = 0; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS8 = 1; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS7 = 2; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_MSCAPI = 3; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OTHER = -1; + +const int CSSM_KEYBLOB_REF_FORMAT_INTEGER = 0; + +const int CSSM_KEYBLOB_REF_FORMAT_STRING = 1; + +const int CSSM_KEYBLOB_REF_FORMAT_SPKI = 2; + +const int CSSM_KEYBLOB_REF_FORMAT_OTHER = -1; + +const int CSSM_KEYCLASS_PUBLIC_KEY = 0; + +const int CSSM_KEYCLASS_PRIVATE_KEY = 1; + +const int CSSM_KEYCLASS_SESSION_KEY = 2; + +const int CSSM_KEYCLASS_SECRET_PART = 3; + +const int CSSM_KEYCLASS_OTHER = -1; + +const int CSSM_KEYATTR_RETURN_DEFAULT = 0; + +const int CSSM_KEYATTR_RETURN_DATA = 268435456; + +const int CSSM_KEYATTR_RETURN_REF = 536870912; + +const int CSSM_KEYATTR_RETURN_NONE = 1073741824; + +const int CSSM_KEYATTR_PERMANENT = 1; + +const int CSSM_KEYATTR_PRIVATE = 2; + +const int CSSM_KEYATTR_MODIFIABLE = 4; + +const int CSSM_KEYATTR_SENSITIVE = 8; + +const int CSSM_KEYATTR_EXTRACTABLE = 32; + +const int CSSM_KEYATTR_ALWAYS_SENSITIVE = 16; + +const int CSSM_KEYATTR_NEVER_EXTRACTABLE = 64; + +const int CSSM_KEYUSE_ANY = -2147483648; + +const int CSSM_KEYUSE_ENCRYPT = 1; + +const int CSSM_KEYUSE_DECRYPT = 2; + +const int CSSM_KEYUSE_SIGN = 4; + +const int CSSM_KEYUSE_VERIFY = 8; + +const int CSSM_KEYUSE_SIGN_RECOVER = 16; + +const int CSSM_KEYUSE_VERIFY_RECOVER = 32; + +const int CSSM_KEYUSE_WRAP = 64; + +const int CSSM_KEYUSE_UNWRAP = 128; + +const int CSSM_KEYUSE_DERIVE = 256; + +const int CSSM_ALGID_NONE = 0; + +const int CSSM_ALGID_CUSTOM = 1; + +const int CSSM_ALGID_DH = 2; + +const int CSSM_ALGID_PH = 3; + +const int CSSM_ALGID_KEA = 4; + +const int CSSM_ALGID_MD2 = 5; + +const int CSSM_ALGID_MD4 = 6; + +const int CSSM_ALGID_MD5 = 7; + +const int CSSM_ALGID_SHA1 = 8; + +const int CSSM_ALGID_NHASH = 9; + +const int CSSM_ALGID_HAVAL = 10; + +const int CSSM_ALGID_RIPEMD = 11; + +const int CSSM_ALGID_IBCHASH = 12; + +const int CSSM_ALGID_RIPEMAC = 13; + +const int CSSM_ALGID_DES = 14; + +const int CSSM_ALGID_DESX = 15; + +const int CSSM_ALGID_RDES = 16; + +const int CSSM_ALGID_3DES_3KEY_EDE = 17; + +const int CSSM_ALGID_3DES_2KEY_EDE = 18; + +const int CSSM_ALGID_3DES_1KEY_EEE = 19; + +const int CSSM_ALGID_3DES_3KEY = 17; + +const int CSSM_ALGID_3DES_3KEY_EEE = 20; + +const int CSSM_ALGID_3DES_2KEY = 18; + +const int CSSM_ALGID_3DES_2KEY_EEE = 21; + +const int CSSM_ALGID_3DES_1KEY = 20; + +const int CSSM_ALGID_IDEA = 22; + +const int CSSM_ALGID_RC2 = 23; + +const int CSSM_ALGID_RC5 = 24; + +const int CSSM_ALGID_RC4 = 25; + +const int CSSM_ALGID_SEAL = 26; + +const int CSSM_ALGID_CAST = 27; + +const int CSSM_ALGID_BLOWFISH = 28; + +const int CSSM_ALGID_SKIPJACK = 29; + +const int CSSM_ALGID_LUCIFER = 30; + +const int CSSM_ALGID_MADRYGA = 31; + +const int CSSM_ALGID_FEAL = 32; + +const int CSSM_ALGID_REDOC = 33; + +const int CSSM_ALGID_REDOC3 = 34; + +const int CSSM_ALGID_LOKI = 35; + +const int CSSM_ALGID_KHUFU = 36; + +const int CSSM_ALGID_KHAFRE = 37; + +const int CSSM_ALGID_MMB = 38; + +const int CSSM_ALGID_GOST = 39; + +const int CSSM_ALGID_SAFER = 40; + +const int CSSM_ALGID_CRAB = 41; + +const int CSSM_ALGID_RSA = 42; + +const int CSSM_ALGID_DSA = 43; + +const int CSSM_ALGID_MD5WithRSA = 44; + +const int CSSM_ALGID_MD2WithRSA = 45; + +const int CSSM_ALGID_ElGamal = 46; + +const int CSSM_ALGID_MD2Random = 47; + +const int CSSM_ALGID_MD5Random = 48; + +const int CSSM_ALGID_SHARandom = 49; + +const int CSSM_ALGID_DESRandom = 50; + +const int CSSM_ALGID_SHA1WithRSA = 51; + +const int CSSM_ALGID_CDMF = 52; + +const int CSSM_ALGID_CAST3 = 53; + +const int CSSM_ALGID_CAST5 = 54; + +const int CSSM_ALGID_GenericSecret = 55; + +const int CSSM_ALGID_ConcatBaseAndKey = 56; + +const int CSSM_ALGID_ConcatKeyAndBase = 57; + +const int CSSM_ALGID_ConcatBaseAndData = 58; + +const int CSSM_ALGID_ConcatDataAndBase = 59; + +const int CSSM_ALGID_XORBaseAndData = 60; + +const int CSSM_ALGID_ExtractFromKey = 61; + +const int CSSM_ALGID_SSL3PrePrimaryGen = 62; + +const int CSSM_ALGID_SSL3PreMasterGen = 62; + +const int CSSM_ALGID_SSL3PrimaryDerive = 63; + +const int CSSM_ALGID_SSL3MasterDerive = 63; + +const int CSSM_ALGID_SSL3KeyAndMacDerive = 64; + +const int CSSM_ALGID_SSL3MD5_MAC = 65; + +const int CSSM_ALGID_SSL3SHA1_MAC = 66; + +const int CSSM_ALGID_PKCS5_PBKDF1_MD5 = 67; + +const int CSSM_ALGID_PKCS5_PBKDF1_MD2 = 68; + +const int CSSM_ALGID_PKCS5_PBKDF1_SHA1 = 69; + +const int CSSM_ALGID_WrapLynks = 70; + +const int CSSM_ALGID_WrapSET_OAEP = 71; + +const int CSSM_ALGID_BATON = 72; + +const int CSSM_ALGID_ECDSA = 73; + +const int CSSM_ALGID_MAYFLY = 74; + +const int CSSM_ALGID_JUNIPER = 75; + +const int CSSM_ALGID_FASTHASH = 76; + +const int CSSM_ALGID_3DES = 77; + +const int CSSM_ALGID_SSL3MD5 = 78; + +const int CSSM_ALGID_SSL3SHA1 = 79; + +const int CSSM_ALGID_FortezzaTimestamp = 80; + +const int CSSM_ALGID_SHA1WithDSA = 81; + +const int CSSM_ALGID_SHA1WithECDSA = 82; + +const int CSSM_ALGID_DSA_BSAFE = 83; + +const int CSSM_ALGID_ECDH = 84; + +const int CSSM_ALGID_ECMQV = 85; + +const int CSSM_ALGID_PKCS12_SHA1_PBE = 86; + +const int CSSM_ALGID_ECNRA = 87; + +const int CSSM_ALGID_SHA1WithECNRA = 88; + +const int CSSM_ALGID_ECES = 89; + +const int CSSM_ALGID_ECAES = 90; + +const int CSSM_ALGID_SHA1HMAC = 91; + +const int CSSM_ALGID_FIPS186Random = 92; + +const int CSSM_ALGID_ECC = 93; + +const int CSSM_ALGID_MQV = 94; + +const int CSSM_ALGID_NRA = 95; + +const int CSSM_ALGID_IntelPlatformRandom = 96; + +const int CSSM_ALGID_UTC = 97; + +const int CSSM_ALGID_HAVAL3 = 98; + +const int CSSM_ALGID_HAVAL4 = 99; + +const int CSSM_ALGID_HAVAL5 = 100; + +const int CSSM_ALGID_TIGER = 101; + +const int CSSM_ALGID_MD5HMAC = 102; + +const int CSSM_ALGID_PKCS5_PBKDF2 = 103; + +const int CSSM_ALGID_RUNNING_COUNTER = 104; + +const int CSSM_ALGID_LAST = 2147483647; + +const int CSSM_ALGID_VENDOR_DEFINED = -2147483648; + +const int CSSM_ALGMODE_NONE = 0; + +const int CSSM_ALGMODE_CUSTOM = 1; + +const int CSSM_ALGMODE_ECB = 2; + +const int CSSM_ALGMODE_ECBPad = 3; + +const int CSSM_ALGMODE_CBC = 4; + +const int CSSM_ALGMODE_CBC_IV8 = 5; + +const int CSSM_ALGMODE_CBCPadIV8 = 6; + +const int CSSM_ALGMODE_CFB = 7; + +const int CSSM_ALGMODE_CFB_IV8 = 8; + +const int CSSM_ALGMODE_CFBPadIV8 = 9; + +const int CSSM_ALGMODE_OFB = 10; + +const int CSSM_ALGMODE_OFB_IV8 = 11; + +const int CSSM_ALGMODE_OFBPadIV8 = 12; + +const int CSSM_ALGMODE_COUNTER = 13; + +const int CSSM_ALGMODE_BC = 14; + +const int CSSM_ALGMODE_PCBC = 15; + +const int CSSM_ALGMODE_CBCC = 16; + +const int CSSM_ALGMODE_OFBNLF = 17; + +const int CSSM_ALGMODE_PBC = 18; + +const int CSSM_ALGMODE_PFB = 19; + +const int CSSM_ALGMODE_CBCPD = 20; + +const int CSSM_ALGMODE_PUBLIC_KEY = 21; + +const int CSSM_ALGMODE_PRIVATE_KEY = 22; + +const int CSSM_ALGMODE_SHUFFLE = 23; + +const int CSSM_ALGMODE_ECB64 = 24; + +const int CSSM_ALGMODE_CBC64 = 25; + +const int CSSM_ALGMODE_OFB64 = 26; + +const int CSSM_ALGMODE_CFB32 = 28; + +const int CSSM_ALGMODE_CFB16 = 29; + +const int CSSM_ALGMODE_CFB8 = 30; + +const int CSSM_ALGMODE_WRAP = 31; + +const int CSSM_ALGMODE_PRIVATE_WRAP = 32; + +const int CSSM_ALGMODE_RELAYX = 33; + +const int CSSM_ALGMODE_ECB128 = 34; + +const int CSSM_ALGMODE_ECB96 = 35; + +const int CSSM_ALGMODE_CBC128 = 36; + +const int CSSM_ALGMODE_OAEP_HASH = 37; + +const int CSSM_ALGMODE_PKCS1_EME_V15 = 38; + +const int CSSM_ALGMODE_PKCS1_EME_OAEP = 39; + +const int CSSM_ALGMODE_PKCS1_EMSA_V15 = 40; + +const int CSSM_ALGMODE_ISO_9796 = 41; + +const int CSSM_ALGMODE_X9_31 = 42; + +const int CSSM_ALGMODE_LAST = 2147483647; + +const int CSSM_ALGMODE_VENDOR_DEFINED = -2147483648; + +const int CSSM_CSP_SOFTWARE = 1; + +const int CSSM_CSP_HARDWARE = 2; + +const int CSSM_CSP_HYBRID = 3; + +const int CSSM_ALGCLASS_NONE = 0; + +const int CSSM_ALGCLASS_CUSTOM = 1; + +const int CSSM_ALGCLASS_SIGNATURE = 2; + +const int CSSM_ALGCLASS_SYMMETRIC = 3; + +const int CSSM_ALGCLASS_DIGEST = 4; + +const int CSSM_ALGCLASS_RANDOMGEN = 5; + +const int CSSM_ALGCLASS_UNIQUEGEN = 6; + +const int CSSM_ALGCLASS_MAC = 7; + +const int CSSM_ALGCLASS_ASYMMETRIC = 8; + +const int CSSM_ALGCLASS_KEYGEN = 9; + +const int CSSM_ALGCLASS_DERIVEKEY = 10; + +const int CSSM_ATTRIBUTE_DATA_NONE = 0; + +const int CSSM_ATTRIBUTE_DATA_UINT32 = 268435456; + +const int CSSM_ATTRIBUTE_DATA_CSSM_DATA = 536870912; + +const int CSSM_ATTRIBUTE_DATA_CRYPTO_DATA = 805306368; + +const int CSSM_ATTRIBUTE_DATA_KEY = 1073741824; + +const int CSSM_ATTRIBUTE_DATA_STRING = 1342177280; + +const int CSSM_ATTRIBUTE_DATA_DATE = 1610612736; + +const int CSSM_ATTRIBUTE_DATA_RANGE = 1879048192; + +const int CSSM_ATTRIBUTE_DATA_ACCESS_CREDENTIALS = -2147483648; + +const int CSSM_ATTRIBUTE_DATA_VERSION = 16777216; + +const int CSSM_ATTRIBUTE_DATA_DL_DB_HANDLE = 33554432; + +const int CSSM_ATTRIBUTE_DATA_KR_PROFILE = 50331648; + +const int CSSM_ATTRIBUTE_TYPE_MASK = -16777216; + +const int CSSM_ATTRIBUTE_NONE = 0; + +const int CSSM_ATTRIBUTE_CUSTOM = 536870913; + +const int CSSM_ATTRIBUTE_DESCRIPTION = 1342177282; + +const int CSSM_ATTRIBUTE_KEY = 1073741827; + +const int CSSM_ATTRIBUTE_INIT_VECTOR = 536870916; + +const int CSSM_ATTRIBUTE_SALT = 536870917; + +const int CSSM_ATTRIBUTE_PADDING = 268435462; + +const int CSSM_ATTRIBUTE_RANDOM = 536870919; + +const int CSSM_ATTRIBUTE_SEED = 805306376; + +const int CSSM_ATTRIBUTE_PASSPHRASE = 805306377; + +const int CSSM_ATTRIBUTE_KEY_LENGTH = 268435466; + +const int CSSM_ATTRIBUTE_KEY_LENGTH_RANGE = 1879048203; + +const int CSSM_ATTRIBUTE_BLOCK_SIZE = 268435468; + +const int CSSM_ATTRIBUTE_OUTPUT_SIZE = 268435469; + +const int CSSM_ATTRIBUTE_ROUNDS = 268435470; + +const int CSSM_ATTRIBUTE_IV_SIZE = 268435471; + +const int CSSM_ATTRIBUTE_ALG_PARAMS = 536870928; + +const int CSSM_ATTRIBUTE_LABEL = 536870929; + +const int CSSM_ATTRIBUTE_KEY_TYPE = 268435474; + +const int CSSM_ATTRIBUTE_MODE = 268435475; + +const int CSSM_ATTRIBUTE_EFFECTIVE_BITS = 268435476; + +const int CSSM_ATTRIBUTE_START_DATE = 1610612757; + +const int CSSM_ATTRIBUTE_END_DATE = 1610612758; + +const int CSSM_ATTRIBUTE_KEYUSAGE = 268435479; + +const int CSSM_ATTRIBUTE_KEYATTR = 268435480; + +const int CSSM_ATTRIBUTE_VERSION = 16777241; + +const int CSSM_ATTRIBUTE_PRIME = 536870938; + +const int CSSM_ATTRIBUTE_BASE = 536870939; + +const int CSSM_ATTRIBUTE_SUBPRIME = 536870940; + +const int CSSM_ATTRIBUTE_ALG_ID = 268435485; + +const int CSSM_ATTRIBUTE_ITERATION_COUNT = 268435486; + +const int CSSM_ATTRIBUTE_ROUNDS_RANGE = 1879048223; + +const int CSSM_ATTRIBUTE_KRPROFILE_LOCAL = 50331680; + +const int CSSM_ATTRIBUTE_KRPROFILE_REMOTE = 50331681; + +const int CSSM_ATTRIBUTE_CSP_HANDLE = 268435490; + +const int CSSM_ATTRIBUTE_DL_DB_HANDLE = 33554467; + +const int CSSM_ATTRIBUTE_ACCESS_CREDENTIALS = -2147483612; + +const int CSSM_ATTRIBUTE_PUBLIC_KEY_FORMAT = 268435493; + +const int CSSM_ATTRIBUTE_PRIVATE_KEY_FORMAT = 268435494; + +const int CSSM_ATTRIBUTE_SYMMETRIC_KEY_FORMAT = 268435495; + +const int CSSM_ATTRIBUTE_WRAPPED_KEY_FORMAT = 268435496; + +const int CSSM_PADDING_NONE = 0; + +const int CSSM_PADDING_CUSTOM = 1; + +const int CSSM_PADDING_ZERO = 2; + +const int CSSM_PADDING_ONE = 3; + +const int CSSM_PADDING_ALTERNATE = 4; + +const int CSSM_PADDING_FF = 5; + +const int CSSM_PADDING_PKCS5 = 6; + +const int CSSM_PADDING_PKCS7 = 7; + +const int CSSM_PADDING_CIPHERSTEALING = 8; + +const int CSSM_PADDING_RANDOM = 9; + +const int CSSM_PADDING_PKCS1 = 10; + +const int CSSM_PADDING_SIGRAW = 11; + +const int CSSM_PADDING_VENDOR_DEFINED = -2147483648; + +const int CSSM_CSP_TOK_RNG = 1; + +const int CSSM_CSP_TOK_CLOCK_EXISTS = 64; + +const int CSSM_CSP_RDR_TOKENPRESENT = 1; + +const int CSSM_CSP_RDR_EXISTS = 2; + +const int CSSM_CSP_RDR_HW = 4; + +const int CSSM_CSP_TOK_WRITE_PROTECTED = 2; + +const int CSSM_CSP_TOK_LOGIN_REQUIRED = 4; + +const int CSSM_CSP_TOK_USER_PIN_INITIALIZED = 8; + +const int CSSM_CSP_TOK_PROT_AUTHENTICATION = 256; + +const int CSSM_CSP_TOK_USER_PIN_EXPIRED = 1048576; + +const int CSSM_CSP_TOK_SESSION_KEY_PASSWORD = 2097152; + +const int CSSM_CSP_TOK_PRIVATE_KEY_PASSWORD = 4194304; + +const int CSSM_CSP_STORES_PRIVATE_KEYS = 16777216; + +const int CSSM_CSP_STORES_PUBLIC_KEYS = 33554432; + +const int CSSM_CSP_STORES_SESSION_KEYS = 67108864; + +const int CSSM_CSP_STORES_CERTIFICATES = 134217728; + +const int CSSM_CSP_STORES_GENERIC = 268435456; + +const int CSSM_PKCS_OAEP_MGF_NONE = 0; + +const int CSSM_PKCS_OAEP_MGF1_SHA1 = 1; + +const int CSSM_PKCS_OAEP_MGF1_MD5 = 2; + +const int CSSM_PKCS_OAEP_PSOURCE_NONE = 0; + +const int CSSM_PKCS_OAEP_PSOURCE_Pspecified = 1; + +const int CSSM_VALUE_NOT_AVAILABLE = -1; + +const int CSSM_PKCS5_PBKDF2_PRF_HMAC_SHA1 = 0; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTISSUE = 1; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTREVOKE = 2; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTSUSPEND = 3; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTRESUME = 4; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTVERIFY = 5; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTNOTARIZE = 6; + +const int CSSM_TP_AUTHORITY_REQUEST_CERTUSERECOVER = 7; + +const int CSSM_TP_AUTHORITY_REQUEST_CRLISSUE = 256; + +const int CSSM_TP_KEY_ARCHIVE = 1; + +const int CSSM_TP_CERT_PUBLISH = 2; + +const int CSSM_TP_CERT_NOTIFY_RENEW = 4; + +const int CSSM_TP_CERT_DIR_UPDATE = 8; + +const int CSSM_TP_CRL_DISTRIBUTE = 16; + +const int CSSM_TP_ACTION_DEFAULT = 0; + +const int CSSM_TP_STOP_ON_POLICY = 0; + +const int CSSM_TP_STOP_ON_NONE = 1; + +const int CSSM_TP_STOP_ON_FIRST_PASS = 2; + +const int CSSM_TP_STOP_ON_FIRST_FAIL = 3; + +const int CSSM_CRL_PARSE_FORMAT_NONE = 0; + +const int CSSM_CRL_PARSE_FORMAT_CUSTOM = 1; + +const int CSSM_CRL_PARSE_FORMAT_SEXPR = 2; + +const int CSSM_CRL_PARSE_FORMAT_COMPLEX = 3; + +const int CSSM_CRL_PARSE_FORMAT_OID_NAMED = 4; + +const int CSSM_CRL_PARSE_FORMAT_TUPLE = 5; + +const int CSSM_CRL_PARSE_FORMAT_MULTIPLE = 32766; + +const int CSSM_CRL_PARSE_FORMAT_LAST = 32767; + +const int CSSM_CL_CUSTOM_CRL_PARSE_FORMAT = 32768; + +const int CSSM_CRL_TYPE_UNKNOWN = 0; + +const int CSSM_CRL_TYPE_X_509v1 = 1; + +const int CSSM_CRL_TYPE_X_509v2 = 2; + +const int CSSM_CRL_TYPE_SPKI = 3; + +const int CSSM_CRL_TYPE_MULTIPLE = 32766; + +const int CSSM_CRL_ENCODING_UNKNOWN = 0; + +const int CSSM_CRL_ENCODING_CUSTOM = 1; + +const int CSSM_CRL_ENCODING_BER = 2; + +const int CSSM_CRL_ENCODING_DER = 3; + +const int CSSM_CRL_ENCODING_BLOOM = 4; + +const int CSSM_CRL_ENCODING_SEXPR = 5; + +const int CSSM_CRL_ENCODING_MULTIPLE = 32766; + +const int CSSM_CRLGROUP_DATA = 0; + +const int CSSM_CRLGROUP_ENCODED_CRL = 1; + +const int CSSM_CRLGROUP_PARSED_CRL = 2; + +const int CSSM_CRLGROUP_CRL_PAIR = 3; + +const int CSSM_EVIDENCE_FORM_UNSPECIFIC = 0; + +const int CSSM_EVIDENCE_FORM_CERT = 1; + +const int CSSM_EVIDENCE_FORM_CRL = 2; + +const int CSSM_EVIDENCE_FORM_CERT_ID = 3; + +const int CSSM_EVIDENCE_FORM_CRL_ID = 4; + +const int CSSM_EVIDENCE_FORM_VERIFIER_TIME = 5; + +const int CSSM_EVIDENCE_FORM_CRL_THISTIME = 6; + +const int CSSM_EVIDENCE_FORM_CRL_NEXTTIME = 7; + +const int CSSM_EVIDENCE_FORM_POLICYINFO = 8; + +const int CSSM_EVIDENCE_FORM_TUPLEGROUP = 9; + +const int CSSM_TP_CONFIRM_STATUS_UNKNOWN = 0; + +const int CSSM_TP_CONFIRM_ACCEPT = 1; + +const int CSSM_TP_CONFIRM_REJECT = 2; + +const int CSSM_ESTIMATED_TIME_UNKNOWN = -1; + +const int CSSM_ELAPSED_TIME_UNKNOWN = -1; + +const int CSSM_ELAPSED_TIME_COMPLETE = -2; + +const int CSSM_TP_CERTISSUE_STATUS_UNKNOWN = 0; + +const int CSSM_TP_CERTISSUE_OK = 1; + +const int CSSM_TP_CERTISSUE_OKWITHCERTMODS = 2; + +const int CSSM_TP_CERTISSUE_OKWITHSERVICEMODS = 3; + +const int CSSM_TP_CERTISSUE_REJECTED = 4; + +const int CSSM_TP_CERTISSUE_NOT_AUTHORIZED = 5; + +const int CSSM_TP_CERTISSUE_WILL_BE_REVOKED = 6; + +const int CSSM_TP_CERTCHANGE_NONE = 0; + +const int CSSM_TP_CERTCHANGE_REVOKE = 1; + +const int CSSM_TP_CERTCHANGE_HOLD = 2; + +const int CSSM_TP_CERTCHANGE_RELEASE = 3; + +const int CSSM_TP_CERTCHANGE_REASON_UNKNOWN = 0; + +const int CSSM_TP_CERTCHANGE_REASON_KEYCOMPROMISE = 1; + +const int CSSM_TP_CERTCHANGE_REASON_CACOMPROMISE = 2; + +const int CSSM_TP_CERTCHANGE_REASON_CEASEOPERATION = 3; + +const int CSSM_TP_CERTCHANGE_REASON_AFFILIATIONCHANGE = 4; + +const int CSSM_TP_CERTCHANGE_REASON_SUPERCEDED = 5; + +const int CSSM_TP_CERTCHANGE_REASON_SUSPECTEDCOMPROMISE = 6; + +const int CSSM_TP_CERTCHANGE_REASON_HOLDRELEASE = 7; + +const int CSSM_TP_CERTCHANGE_STATUS_UNKNOWN = 0; + +const int CSSM_TP_CERTCHANGE_OK = 1; + +const int CSSM_TP_CERTCHANGE_OKWITHNEWTIME = 2; + +const int CSSM_TP_CERTCHANGE_WRONGCA = 3; + +const int CSSM_TP_CERTCHANGE_REJECTED = 4; + +const int CSSM_TP_CERTCHANGE_NOT_AUTHORIZED = 5; + +const int CSSM_TP_CERTVERIFY_UNKNOWN = 0; + +const int CSSM_TP_CERTVERIFY_VALID = 1; + +const int CSSM_TP_CERTVERIFY_INVALID = 2; + +const int CSSM_TP_CERTVERIFY_REVOKED = 3; + +const int CSSM_TP_CERTVERIFY_SUSPENDED = 4; + +const int CSSM_TP_CERTVERIFY_EXPIRED = 5; + +const int CSSM_TP_CERTVERIFY_NOT_VALID_YET = 6; + +const int CSSM_TP_CERTVERIFY_INVALID_AUTHORITY = 7; + +const int CSSM_TP_CERTVERIFY_INVALID_SIGNATURE = 8; + +const int CSSM_TP_CERTVERIFY_INVALID_CERT_VALUE = 9; + +const int CSSM_TP_CERTVERIFY_INVALID_CERTGROUP = 10; + +const int CSSM_TP_CERTVERIFY_INVALID_POLICY = 11; + +const int CSSM_TP_CERTVERIFY_INVALID_POLICY_IDS = 12; + +const int CSSM_TP_CERTVERIFY_INVALID_BASIC_CONSTRAINTS = 13; + +const int CSSM_TP_CERTVERIFY_INVALID_CRL_DIST_PT = 14; + +const int CSSM_TP_CERTVERIFY_INVALID_NAME_TREE = 15; + +const int CSSM_TP_CERTVERIFY_UNKNOWN_CRITICAL_EXT = 16; + +const int CSSM_TP_CERTNOTARIZE_STATUS_UNKNOWN = 0; + +const int CSSM_TP_CERTNOTARIZE_OK = 1; + +const int CSSM_TP_CERTNOTARIZE_OKWITHOUTFIELDS = 2; + +const int CSSM_TP_CERTNOTARIZE_OKWITHSERVICEMODS = 3; + +const int CSSM_TP_CERTNOTARIZE_REJECTED = 4; + +const int CSSM_TP_CERTNOTARIZE_NOT_AUTHORIZED = 5; + +const int CSSM_TP_CERTRECLAIM_STATUS_UNKNOWN = 0; + +const int CSSM_TP_CERTRECLAIM_OK = 1; + +const int CSSM_TP_CERTRECLAIM_NOMATCH = 2; + +const int CSSM_TP_CERTRECLAIM_REJECTED = 3; + +const int CSSM_TP_CERTRECLAIM_NOT_AUTHORIZED = 4; + +const int CSSM_TP_CRLISSUE_STATUS_UNKNOWN = 0; + +const int CSSM_TP_CRLISSUE_OK = 1; + +const int CSSM_TP_CRLISSUE_NOT_CURRENT = 2; + +const int CSSM_TP_CRLISSUE_INVALID_DOMAIN = 3; + +const int CSSM_TP_CRLISSUE_UNKNOWN_IDENTIFIER = 4; + +const int CSSM_TP_CRLISSUE_REJECTED = 5; + +const int CSSM_TP_CRLISSUE_NOT_AUTHORIZED = 6; + +const int CSSM_TP_FORM_TYPE_GENERIC = 0; + +const int CSSM_TP_FORM_TYPE_REGISTRATION = 1; + +const int CSSM_CL_TEMPLATE_INTERMEDIATE_CERT = 1; + +const int CSSM_CL_TEMPLATE_PKIX_CERTTEMPLATE = 2; + +const int CSSM_CERT_BUNDLE_UNKNOWN = 0; + +const int CSSM_CERT_BUNDLE_CUSTOM = 1; + +const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_DATA = 2; + +const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_ENVELOPED_DATA = 3; + +const int CSSM_CERT_BUNDLE_PKCS12 = 4; + +const int CSSM_CERT_BUNDLE_PFX = 5; + +const int CSSM_CERT_BUNDLE_SPKI_SEQUENCE = 6; + +const int CSSM_CERT_BUNDLE_PGP_KEYRING = 7; + +const int CSSM_CERT_BUNDLE_LAST = 32767; + +const int CSSM_CL_CUSTOM_CERT_BUNDLE_TYPE = 32768; + +const int CSSM_CERT_BUNDLE_ENCODING_UNKNOWN = 0; + +const int CSSM_CERT_BUNDLE_ENCODING_CUSTOM = 1; + +const int CSSM_CERT_BUNDLE_ENCODING_BER = 2; + +const int CSSM_CERT_BUNDLE_ENCODING_DER = 3; + +const int CSSM_CERT_BUNDLE_ENCODING_SEXPR = 4; + +const int CSSM_CERT_BUNDLE_ENCODING_PGP = 5; + +const int CSSM_FIELDVALUE_COMPLEX_DATA_TYPE = -1; + +const int CSSM_DB_ATTRIBUTE_NAME_AS_STRING = 0; + +const int CSSM_DB_ATTRIBUTE_NAME_AS_OID = 1; + +const int CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER = 2; + +const int CSSM_DB_ATTRIBUTE_FORMAT_STRING = 0; + +const int CSSM_DB_ATTRIBUTE_FORMAT_SINT32 = 1; + +const int CSSM_DB_ATTRIBUTE_FORMAT_UINT32 = 2; + +const int CSSM_DB_ATTRIBUTE_FORMAT_BIG_NUM = 3; + +const int CSSM_DB_ATTRIBUTE_FORMAT_REAL = 4; + +const int CSSM_DB_ATTRIBUTE_FORMAT_TIME_DATE = 5; + +const int CSSM_DB_ATTRIBUTE_FORMAT_BLOB = 6; + +const int CSSM_DB_ATTRIBUTE_FORMAT_MULTI_UINT32 = 7; + +const int CSSM_DB_ATTRIBUTE_FORMAT_COMPLEX = 8; + +const int CSSM_DB_RECORDTYPE_SCHEMA_START = 0; + +const int CSSM_DB_RECORDTYPE_SCHEMA_END = 4; + +const int CSSM_DB_RECORDTYPE_OPEN_GROUP_START = 10; + +const int CSSM_DB_RECORDTYPE_OPEN_GROUP_END = 18; + +const int CSSM_DB_RECORDTYPE_APP_DEFINED_START = -2147483648; + +const int CSSM_DB_RECORDTYPE_APP_DEFINED_END = -1; + +const int CSSM_DL_DB_SCHEMA_INFO = 0; + +const int CSSM_DL_DB_SCHEMA_INDEXES = 1; + +const int CSSM_DL_DB_SCHEMA_ATTRIBUTES = 2; + +const int CSSM_DL_DB_SCHEMA_PARSING_MODULE = 3; + +const int CSSM_DL_DB_RECORD_ANY = 10; + +const int CSSM_DL_DB_RECORD_CERT = 11; + +const int CSSM_DL_DB_RECORD_CRL = 12; + +const int CSSM_DL_DB_RECORD_POLICY = 13; + +const int CSSM_DL_DB_RECORD_GENERIC = 14; + +const int CSSM_DL_DB_RECORD_PUBLIC_KEY = 15; + +const int CSSM_DL_DB_RECORD_PRIVATE_KEY = 16; + +const int CSSM_DL_DB_RECORD_SYMMETRIC_KEY = 17; + +const int CSSM_DL_DB_RECORD_ALL_KEYS = 18; + +const int CSSM_DB_CERT_USE_TRUSTED = 1; + +const int CSSM_DB_CERT_USE_SYSTEM = 2; + +const int CSSM_DB_CERT_USE_OWNER = 4; + +const int CSSM_DB_CERT_USE_REVOKED = 8; + +const int CSSM_DB_CERT_USE_SIGNING = 16; + +const int CSSM_DB_CERT_USE_PRIVACY = 32; + +const int CSSM_DB_INDEX_UNIQUE = 0; + +const int CSSM_DB_INDEX_NONUNIQUE = 1; + +const int CSSM_DB_INDEX_ON_UNKNOWN = 0; + +const int CSSM_DB_INDEX_ON_ATTRIBUTE = 1; + +const int CSSM_DB_INDEX_ON_RECORD = 2; + +const int CSSM_DB_ACCESS_READ = 1; + +const int CSSM_DB_ACCESS_WRITE = 2; + +const int CSSM_DB_ACCESS_PRIVILEGED = 4; + +const int CSSM_DB_MODIFY_ATTRIBUTE_NONE = 0; + +const int CSSM_DB_MODIFY_ATTRIBUTE_ADD = 1; + +const int CSSM_DB_MODIFY_ATTRIBUTE_DELETE = 2; + +const int CSSM_DB_MODIFY_ATTRIBUTE_REPLACE = 3; + +const int CSSM_DB_EQUAL = 0; + +const int CSSM_DB_NOT_EQUAL = 1; + +const int CSSM_DB_LESS_THAN = 2; + +const int CSSM_DB_GREATER_THAN = 3; + +const int CSSM_DB_CONTAINS = 4; + +const int CSSM_DB_CONTAINS_INITIAL_SUBSTRING = 5; + +const int CSSM_DB_CONTAINS_FINAL_SUBSTRING = 6; + +const int CSSM_DB_NONE = 0; + +const int CSSM_DB_AND = 1; + +const int CSSM_DB_OR = 2; + +const int CSSM_QUERY_TIMELIMIT_NONE = 0; + +const int CSSM_QUERY_SIZELIMIT_NONE = 0; + +const int CSSM_QUERY_RETURN_DATA = 1; + +const int CSSM_DL_UNKNOWN = 0; + +const int CSSM_DL_CUSTOM = 1; + +const int CSSM_DL_LDAP = 2; + +const int CSSM_DL_ODBC = 3; + +const int CSSM_DL_PKCS11 = 4; + +const int CSSM_DL_FFS = 5; + +const int CSSM_DL_MEMORY = 6; + +const int CSSM_DL_REMOTEDIR = 7; + +const int CSSM_DB_DATASTORES_UNKNOWN = -1; + +const int CSSM_DB_TRANSACTIONAL_MODE = 0; + +const int CSSM_DB_FILESYSTEMSCAN_MODE = 1; + +const int CSSM_BASE_ERROR = -2147418112; + +const int CSSM_ERRORCODE_MODULE_EXTENT = 2048; + +const int CSSM_ERRORCODE_CUSTOM_OFFSET = 1024; + +const int CSSM_ERRORCODE_COMMON_EXTENT = 256; + +const int CSSM_CSSM_BASE_ERROR = -2147418112; + +const int CSSM_CSSM_PRIVATE_ERROR = -2147417088; + +const int CSSM_CSP_BASE_ERROR = -2147416064; + +const int CSSM_CSP_PRIVATE_ERROR = -2147415040; + +const int CSSM_DL_BASE_ERROR = -2147414016; + +const int CSSM_DL_PRIVATE_ERROR = -2147412992; + +const int CSSM_CL_BASE_ERROR = -2147411968; + +const int CSSM_CL_PRIVATE_ERROR = -2147410944; + +const int CSSM_TP_BASE_ERROR = -2147409920; + +const int CSSM_TP_PRIVATE_ERROR = -2147408896; + +const int CSSM_KR_BASE_ERROR = -2147407872; + +const int CSSM_KR_PRIVATE_ERROR = -2147406848; + +const int CSSM_AC_BASE_ERROR = -2147405824; + +const int CSSM_AC_PRIVATE_ERROR = -2147404800; + +const int CSSM_MDS_BASE_ERROR = -2147414016; + +const int CSSM_MDS_PRIVATE_ERROR = -2147412992; + +const int CSSMERR_CSSM_INVALID_ADDIN_HANDLE = -2147417855; + +const int CSSMERR_CSSM_NOT_INITIALIZED = -2147417854; + +const int CSSMERR_CSSM_INVALID_HANDLE_USAGE = -2147417853; + +const int CSSMERR_CSSM_PVC_REFERENT_NOT_FOUND = -2147417852; + +const int CSSMERR_CSSM_FUNCTION_INTEGRITY_FAIL = -2147417851; + +const int CSSM_ERRCODE_INTERNAL_ERROR = 1; + +const int CSSM_ERRCODE_MEMORY_ERROR = 2; + +const int CSSM_ERRCODE_MDS_ERROR = 3; + +const int CSSM_ERRCODE_INVALID_POINTER = 4; + +const int CSSM_ERRCODE_INVALID_INPUT_POINTER = 5; + +const int CSSM_ERRCODE_INVALID_OUTPUT_POINTER = 6; + +const int CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED = 7; + +const int CSSM_ERRCODE_SELF_CHECK_FAILED = 8; + +const int CSSM_ERRCODE_OS_ACCESS_DENIED = 9; + +const int CSSM_ERRCODE_FUNCTION_FAILED = 10; + +const int CSSM_ERRCODE_MODULE_MANIFEST_VERIFY_FAILED = 11; + +const int CSSM_ERRCODE_INVALID_GUID = 12; + +const int CSSM_ERRCODE_OPERATION_AUTH_DENIED = 32; + +const int CSSM_ERRCODE_OBJECT_USE_AUTH_DENIED = 33; + +const int CSSM_ERRCODE_OBJECT_MANIP_AUTH_DENIED = 34; + +const int CSSM_ERRCODE_OBJECT_ACL_NOT_SUPPORTED = 35; + +const int CSSM_ERRCODE_OBJECT_ACL_REQUIRED = 36; + +const int CSSM_ERRCODE_INVALID_ACCESS_CREDENTIALS = 37; + +const int CSSM_ERRCODE_INVALID_ACL_BASE_CERTS = 38; + +const int CSSM_ERRCODE_ACL_BASE_CERTS_NOT_SUPPORTED = 39; + +const int CSSM_ERRCODE_INVALID_SAMPLE_VALUE = 40; + +const int CSSM_ERRCODE_SAMPLE_VALUE_NOT_SUPPORTED = 41; + +const int CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE = 42; + +const int CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED = 43; + +const int CSSM_ERRCODE_INVALID_ACL_CHALLENGE_CALLBACK = 44; + +const int CSSM_ERRCODE_ACL_CHALLENGE_CALLBACK_FAILED = 45; + +const int CSSM_ERRCODE_INVALID_ACL_ENTRY_TAG = 46; + +const int CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND = 47; + +const int CSSM_ERRCODE_INVALID_ACL_EDIT_MODE = 48; + +const int CSSM_ERRCODE_ACL_CHANGE_FAILED = 49; + +const int CSSM_ERRCODE_INVALID_NEW_ACL_ENTRY = 50; + +const int CSSM_ERRCODE_INVALID_NEW_ACL_OWNER = 51; + +const int CSSM_ERRCODE_ACL_DELETE_FAILED = 52; + +const int CSSM_ERRCODE_ACL_REPLACE_FAILED = 53; + +const int CSSM_ERRCODE_ACL_ADD_FAILED = 54; + +const int CSSM_ERRCODE_INVALID_CONTEXT_HANDLE = 64; + +const int CSSM_ERRCODE_INCOMPATIBLE_VERSION = 65; + +const int CSSM_ERRCODE_INVALID_CERTGROUP_POINTER = 66; + +const int CSSM_ERRCODE_INVALID_CERT_POINTER = 67; + +const int CSSM_ERRCODE_INVALID_CRL_POINTER = 68; + +const int CSSM_ERRCODE_INVALID_FIELD_POINTER = 69; + +const int CSSM_ERRCODE_INVALID_DATA = 70; + +const int CSSM_ERRCODE_CRL_ALREADY_SIGNED = 71; + +const int CSSM_ERRCODE_INVALID_NUMBER_OF_FIELDS = 72; + +const int CSSM_ERRCODE_VERIFICATION_FAILURE = 73; + +const int CSSM_ERRCODE_INVALID_DB_HANDLE = 74; + +const int CSSM_ERRCODE_PRIVILEGE_NOT_GRANTED = 75; + +const int CSSM_ERRCODE_INVALID_DB_LIST = 76; + +const int CSSM_ERRCODE_INVALID_DB_LIST_POINTER = 77; + +const int CSSM_ERRCODE_UNKNOWN_FORMAT = 78; + +const int CSSM_ERRCODE_UNKNOWN_TAG = 79; + +const int CSSM_ERRCODE_INVALID_CSP_HANDLE = 80; + +const int CSSM_ERRCODE_INVALID_DL_HANDLE = 81; + +const int CSSM_ERRCODE_INVALID_CL_HANDLE = 82; + +const int CSSM_ERRCODE_INVALID_TP_HANDLE = 83; + +const int CSSM_ERRCODE_INVALID_KR_HANDLE = 84; + +const int CSSM_ERRCODE_INVALID_AC_HANDLE = 85; + +const int CSSM_ERRCODE_INVALID_PASSTHROUGH_ID = 86; + +const int CSSM_ERRCODE_INVALID_NETWORK_ADDR = 87; + +const int CSSM_ERRCODE_INVALID_CRYPTO_DATA = 88; + +const int CSSMERR_CSSM_INTERNAL_ERROR = -2147418111; + +const int CSSMERR_CSSM_MEMORY_ERROR = -2147418110; + +const int CSSMERR_CSSM_MDS_ERROR = -2147418109; + +const int CSSMERR_CSSM_INVALID_POINTER = -2147418108; + +const int CSSMERR_CSSM_INVALID_INPUT_POINTER = -2147418107; + +const int CSSMERR_CSSM_INVALID_OUTPUT_POINTER = -2147418106; + +const int CSSMERR_CSSM_FUNCTION_NOT_IMPLEMENTED = -2147418105; + +const int CSSMERR_CSSM_SELF_CHECK_FAILED = -2147418104; + +const int CSSMERR_CSSM_OS_ACCESS_DENIED = -2147418103; + +const int CSSMERR_CSSM_FUNCTION_FAILED = -2147418102; + +const int CSSMERR_CSSM_MODULE_MANIFEST_VERIFY_FAILED = -2147418101; + +const int CSSMERR_CSSM_INVALID_GUID = -2147418100; + +const int CSSMERR_CSSM_INVALID_CONTEXT_HANDLE = -2147418048; + +const int CSSMERR_CSSM_INCOMPATIBLE_VERSION = -2147418047; + +const int CSSMERR_CSSM_PRIVILEGE_NOT_GRANTED = -2147418037; + +const int CSSM_CSSM_BASE_CSSM_ERROR = -2147417840; + +const int CSSMERR_CSSM_SCOPE_NOT_SUPPORTED = -2147417839; + +const int CSSMERR_CSSM_PVC_ALREADY_CONFIGURED = -2147417838; + +const int CSSMERR_CSSM_INVALID_PVC = -2147417837; + +const int CSSMERR_CSSM_EMM_LOAD_FAILED = -2147417836; + +const int CSSMERR_CSSM_EMM_UNLOAD_FAILED = -2147417835; + +const int CSSMERR_CSSM_ADDIN_LOAD_FAILED = -2147417834; + +const int CSSMERR_CSSM_INVALID_KEY_HIERARCHY = -2147417833; + +const int CSSMERR_CSSM_ADDIN_UNLOAD_FAILED = -2147417832; + +const int CSSMERR_CSSM_LIB_REF_NOT_FOUND = -2147417831; + +const int CSSMERR_CSSM_INVALID_ADDIN_FUNCTION_TABLE = -2147417830; + +const int CSSMERR_CSSM_EMM_AUTHENTICATE_FAILED = -2147417829; + +const int CSSMERR_CSSM_ADDIN_AUTHENTICATE_FAILED = -2147417828; + +const int CSSMERR_CSSM_INVALID_SERVICE_MASK = -2147417827; + +const int CSSMERR_CSSM_MODULE_NOT_LOADED = -2147417826; + +const int CSSMERR_CSSM_INVALID_SUBSERVICEID = -2147417825; + +const int CSSMERR_CSSM_BUFFER_TOO_SMALL = -2147417824; + +const int CSSMERR_CSSM_INVALID_ATTRIBUTE = -2147417823; + +const int CSSMERR_CSSM_ATTRIBUTE_NOT_IN_CONTEXT = -2147417822; + +const int CSSMERR_CSSM_MODULE_MANAGER_INITIALIZE_FAIL = -2147417821; + +const int CSSMERR_CSSM_MODULE_MANAGER_NOT_FOUND = -2147417820; + +const int CSSMERR_CSSM_EVENT_NOTIFICATION_CALLBACK_NOT_FOUND = -2147417819; + +const int CSSMERR_CSP_INTERNAL_ERROR = -2147416063; + +const int CSSMERR_CSP_MEMORY_ERROR = -2147416062; + +const int CSSMERR_CSP_MDS_ERROR = -2147416061; + +const int CSSMERR_CSP_INVALID_POINTER = -2147416060; + +const int CSSMERR_CSP_INVALID_INPUT_POINTER = -2147416059; + +const int CSSMERR_CSP_INVALID_OUTPUT_POINTER = -2147416058; + +const int CSSMERR_CSP_FUNCTION_NOT_IMPLEMENTED = -2147416057; + +const int CSSMERR_CSP_SELF_CHECK_FAILED = -2147416056; + +const int CSSMERR_CSP_OS_ACCESS_DENIED = -2147416055; + +const int CSSMERR_CSP_FUNCTION_FAILED = -2147416054; + +const int CSSMERR_CSP_OPERATION_AUTH_DENIED = -2147416032; + +const int CSSMERR_CSP_OBJECT_USE_AUTH_DENIED = -2147416031; + +const int CSSMERR_CSP_OBJECT_MANIP_AUTH_DENIED = -2147416030; + +const int CSSMERR_CSP_OBJECT_ACL_NOT_SUPPORTED = -2147416029; + +const int CSSMERR_CSP_OBJECT_ACL_REQUIRED = -2147416028; + +const int CSSMERR_CSP_INVALID_ACCESS_CREDENTIALS = -2147416027; + +const int CSSMERR_CSP_INVALID_ACL_BASE_CERTS = -2147416026; + +const int CSSMERR_CSP_ACL_BASE_CERTS_NOT_SUPPORTED = -2147416025; + +const int CSSMERR_CSP_INVALID_SAMPLE_VALUE = -2147416024; + +const int CSSMERR_CSP_SAMPLE_VALUE_NOT_SUPPORTED = -2147416023; + +const int CSSMERR_CSP_INVALID_ACL_SUBJECT_VALUE = -2147416022; + +const int CSSMERR_CSP_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147416021; + +const int CSSMERR_CSP_INVALID_ACL_CHALLENGE_CALLBACK = -2147416020; + +const int CSSMERR_CSP_ACL_CHALLENGE_CALLBACK_FAILED = -2147416019; + +const int CSSMERR_CSP_INVALID_ACL_ENTRY_TAG = -2147416018; + +const int CSSMERR_CSP_ACL_ENTRY_TAG_NOT_FOUND = -2147416017; + +const int CSSMERR_CSP_INVALID_ACL_EDIT_MODE = -2147416016; + +const int CSSMERR_CSP_ACL_CHANGE_FAILED = -2147416015; + +const int CSSMERR_CSP_INVALID_NEW_ACL_ENTRY = -2147416014; + +const int CSSMERR_CSP_INVALID_NEW_ACL_OWNER = -2147416013; + +const int CSSMERR_CSP_ACL_DELETE_FAILED = -2147416012; + +const int CSSMERR_CSP_ACL_REPLACE_FAILED = -2147416011; + +const int CSSMERR_CSP_ACL_ADD_FAILED = -2147416010; + +const int CSSMERR_CSP_INVALID_CONTEXT_HANDLE = -2147416000; + +const int CSSMERR_CSP_PRIVILEGE_NOT_GRANTED = -2147415989; + +const int CSSMERR_CSP_INVALID_DATA = -2147415994; + +const int CSSMERR_CSP_INVALID_PASSTHROUGH_ID = -2147415978; + +const int CSSMERR_CSP_INVALID_CRYPTO_DATA = -2147415976; + +const int CSSM_CSP_BASE_CSP_ERROR = -2147415808; + +const int CSSMERR_CSP_INPUT_LENGTH_ERROR = -2147415807; + +const int CSSMERR_CSP_OUTPUT_LENGTH_ERROR = -2147415806; + +const int CSSMERR_CSP_PRIVILEGE_NOT_SUPPORTED = -2147415805; + +const int CSSMERR_CSP_DEVICE_ERROR = -2147415804; + +const int CSSMERR_CSP_DEVICE_MEMORY_ERROR = -2147415803; + +const int CSSMERR_CSP_ATTACH_HANDLE_BUSY = -2147415802; + +const int CSSMERR_CSP_NOT_LOGGED_IN = -2147415801; + +const int CSSMERR_CSP_INVALID_KEY = -2147415792; + +const int CSSMERR_CSP_INVALID_KEY_REFERENCE = -2147415791; + +const int CSSMERR_CSP_INVALID_KEY_CLASS = -2147415790; + +const int CSSMERR_CSP_ALGID_MISMATCH = -2147415789; + +const int CSSMERR_CSP_KEY_USAGE_INCORRECT = -2147415788; + +const int CSSMERR_CSP_KEY_BLOB_TYPE_INCORRECT = -2147415787; + +const int CSSMERR_CSP_KEY_HEADER_INCONSISTENT = -2147415786; + +const int CSSMERR_CSP_UNSUPPORTED_KEY_FORMAT = -2147415785; + +const int CSSMERR_CSP_UNSUPPORTED_KEY_SIZE = -2147415784; + +const int CSSMERR_CSP_INVALID_KEY_POINTER = -2147415783; + +const int CSSMERR_CSP_INVALID_KEYUSAGE_MASK = -2147415782; + +const int CSSMERR_CSP_UNSUPPORTED_KEYUSAGE_MASK = -2147415781; + +const int CSSMERR_CSP_INVALID_KEYATTR_MASK = -2147415780; + +const int CSSMERR_CSP_UNSUPPORTED_KEYATTR_MASK = -2147415779; + +const int CSSMERR_CSP_INVALID_KEY_LABEL = -2147415778; + +const int CSSMERR_CSP_UNSUPPORTED_KEY_LABEL = -2147415777; + +const int CSSMERR_CSP_INVALID_KEY_FORMAT = -2147415776; + +const int CSSMERR_CSP_INVALID_DATA_COUNT = -2147415768; + +const int CSSMERR_CSP_VECTOR_OF_BUFS_UNSUPPORTED = -2147415767; + +const int CSSMERR_CSP_INVALID_INPUT_VECTOR = -2147415766; + +const int CSSMERR_CSP_INVALID_OUTPUT_VECTOR = -2147415765; + +const int CSSMERR_CSP_INVALID_CONTEXT = -2147415760; + +const int CSSMERR_CSP_INVALID_ALGORITHM = -2147415759; + +const int CSSMERR_CSP_INVALID_ATTR_KEY = -2147415754; + +const int CSSMERR_CSP_MISSING_ATTR_KEY = -2147415753; + +const int CSSMERR_CSP_INVALID_ATTR_INIT_VECTOR = -2147415752; + +const int CSSMERR_CSP_MISSING_ATTR_INIT_VECTOR = -2147415751; + +const int CSSMERR_CSP_INVALID_ATTR_SALT = -2147415750; + +const int CSSMERR_CSP_MISSING_ATTR_SALT = -2147415749; + +const int CSSMERR_CSP_INVALID_ATTR_PADDING = -2147415748; + +const int CSSMERR_CSP_MISSING_ATTR_PADDING = -2147415747; + +const int CSSMERR_CSP_INVALID_ATTR_RANDOM = -2147415746; + +const int CSSMERR_CSP_MISSING_ATTR_RANDOM = -2147415745; + +const int CSSMERR_CSP_INVALID_ATTR_SEED = -2147415744; + +const int CSSMERR_CSP_MISSING_ATTR_SEED = -2147415743; + +const int CSSMERR_CSP_INVALID_ATTR_PASSPHRASE = -2147415742; + +const int CSSMERR_CSP_MISSING_ATTR_PASSPHRASE = -2147415741; + +const int CSSMERR_CSP_INVALID_ATTR_KEY_LENGTH = -2147415740; + +const int CSSMERR_CSP_MISSING_ATTR_KEY_LENGTH = -2147415739; + +const int CSSMERR_CSP_INVALID_ATTR_BLOCK_SIZE = -2147415738; + +const int CSSMERR_CSP_MISSING_ATTR_BLOCK_SIZE = -2147415737; + +const int CSSMERR_CSP_INVALID_ATTR_OUTPUT_SIZE = -2147415708; + +const int CSSMERR_CSP_MISSING_ATTR_OUTPUT_SIZE = -2147415707; + +const int CSSMERR_CSP_INVALID_ATTR_ROUNDS = -2147415706; + +const int CSSMERR_CSP_MISSING_ATTR_ROUNDS = -2147415705; + +const int CSSMERR_CSP_INVALID_ATTR_ALG_PARAMS = -2147415704; + +const int CSSMERR_CSP_MISSING_ATTR_ALG_PARAMS = -2147415703; + +const int CSSMERR_CSP_INVALID_ATTR_LABEL = -2147415702; + +const int CSSMERR_CSP_MISSING_ATTR_LABEL = -2147415701; + +const int CSSMERR_CSP_INVALID_ATTR_KEY_TYPE = -2147415700; + +const int CSSMERR_CSP_MISSING_ATTR_KEY_TYPE = -2147415699; + +const int CSSMERR_CSP_INVALID_ATTR_MODE = -2147415698; + +const int CSSMERR_CSP_MISSING_ATTR_MODE = -2147415697; + +const int CSSMERR_CSP_INVALID_ATTR_EFFECTIVE_BITS = -2147415696; + +const int CSSMERR_CSP_MISSING_ATTR_EFFECTIVE_BITS = -2147415695; + +const int CSSMERR_CSP_INVALID_ATTR_START_DATE = -2147415694; + +const int CSSMERR_CSP_MISSING_ATTR_START_DATE = -2147415693; + +const int CSSMERR_CSP_INVALID_ATTR_END_DATE = -2147415692; + +const int CSSMERR_CSP_MISSING_ATTR_END_DATE = -2147415691; + +const int CSSMERR_CSP_INVALID_ATTR_VERSION = -2147415690; + +const int CSSMERR_CSP_MISSING_ATTR_VERSION = -2147415689; + +const int CSSMERR_CSP_INVALID_ATTR_PRIME = -2147415688; + +const int CSSMERR_CSP_MISSING_ATTR_PRIME = -2147415687; + +const int CSSMERR_CSP_INVALID_ATTR_BASE = -2147415686; + +const int CSSMERR_CSP_MISSING_ATTR_BASE = -2147415685; + +const int CSSMERR_CSP_INVALID_ATTR_SUBPRIME = -2147415684; + +const int CSSMERR_CSP_MISSING_ATTR_SUBPRIME = -2147415683; + +const int CSSMERR_CSP_INVALID_ATTR_ITERATION_COUNT = -2147415682; + +const int CSSMERR_CSP_MISSING_ATTR_ITERATION_COUNT = -2147415681; + +const int CSSMERR_CSP_INVALID_ATTR_DL_DB_HANDLE = -2147415680; + +const int CSSMERR_CSP_MISSING_ATTR_DL_DB_HANDLE = -2147415679; + +const int CSSMERR_CSP_INVALID_ATTR_ACCESS_CREDENTIALS = -2147415678; + +const int CSSMERR_CSP_MISSING_ATTR_ACCESS_CREDENTIALS = -2147415677; + +const int CSSMERR_CSP_INVALID_ATTR_PUBLIC_KEY_FORMAT = -2147415676; + +const int CSSMERR_CSP_MISSING_ATTR_PUBLIC_KEY_FORMAT = -2147415675; + +const int CSSMERR_CSP_INVALID_ATTR_PRIVATE_KEY_FORMAT = -2147415674; + +const int CSSMERR_CSP_MISSING_ATTR_PRIVATE_KEY_FORMAT = -2147415673; + +const int CSSMERR_CSP_INVALID_ATTR_SYMMETRIC_KEY_FORMAT = -2147415672; + +const int CSSMERR_CSP_MISSING_ATTR_SYMMETRIC_KEY_FORMAT = -2147415671; + +const int CSSMERR_CSP_INVALID_ATTR_WRAPPED_KEY_FORMAT = -2147415670; + +const int CSSMERR_CSP_MISSING_ATTR_WRAPPED_KEY_FORMAT = -2147415669; + +const int CSSMERR_CSP_STAGED_OPERATION_IN_PROGRESS = -2147415736; + +const int CSSMERR_CSP_STAGED_OPERATION_NOT_STARTED = -2147415735; + +const int CSSMERR_CSP_VERIFY_FAILED = -2147415734; + +const int CSSMERR_CSP_INVALID_SIGNATURE = -2147415733; + +const int CSSMERR_CSP_QUERY_SIZE_UNKNOWN = -2147415732; + +const int CSSMERR_CSP_BLOCK_SIZE_MISMATCH = -2147415731; + +const int CSSMERR_CSP_PRIVATE_KEY_NOT_FOUND = -2147415730; + +const int CSSMERR_CSP_PUBLIC_KEY_INCONSISTENT = -2147415729; + +const int CSSMERR_CSP_DEVICE_VERIFY_FAILED = -2147415728; + +const int CSSMERR_CSP_INVALID_LOGIN_NAME = -2147415727; + +const int CSSMERR_CSP_ALREADY_LOGGED_IN = -2147415726; + +const int CSSMERR_CSP_PRIVATE_KEY_ALREADY_EXISTS = -2147415725; + +const int CSSMERR_CSP_KEY_LABEL_ALREADY_EXISTS = -2147415724; + +const int CSSMERR_CSP_INVALID_DIGEST_ALGORITHM = -2147415723; + +const int CSSMERR_CSP_CRYPTO_DATA_CALLBACK_FAILED = -2147415722; + +const int CSSMERR_TP_INTERNAL_ERROR = -2147409919; + +const int CSSMERR_TP_MEMORY_ERROR = -2147409918; + +const int CSSMERR_TP_MDS_ERROR = -2147409917; + +const int CSSMERR_TP_INVALID_POINTER = -2147409916; + +const int CSSMERR_TP_INVALID_INPUT_POINTER = -2147409915; + +const int CSSMERR_TP_INVALID_OUTPUT_POINTER = -2147409914; + +const int CSSMERR_TP_FUNCTION_NOT_IMPLEMENTED = -2147409913; + +const int CSSMERR_TP_SELF_CHECK_FAILED = -2147409912; + +const int CSSMERR_TP_OS_ACCESS_DENIED = -2147409911; + +const int CSSMERR_TP_FUNCTION_FAILED = -2147409910; + +const int CSSMERR_TP_INVALID_CONTEXT_HANDLE = -2147409856; + +const int CSSMERR_TP_INVALID_DATA = -2147409850; + +const int CSSMERR_TP_INVALID_DB_LIST = -2147409844; + +const int CSSMERR_TP_INVALID_CERTGROUP_POINTER = -2147409854; + +const int CSSMERR_TP_INVALID_CERT_POINTER = -2147409853; + +const int CSSMERR_TP_INVALID_CRL_POINTER = -2147409852; + +const int CSSMERR_TP_INVALID_FIELD_POINTER = -2147409851; + +const int CSSMERR_TP_INVALID_NETWORK_ADDR = -2147409833; + +const int CSSMERR_TP_CRL_ALREADY_SIGNED = -2147409849; + +const int CSSMERR_TP_INVALID_NUMBER_OF_FIELDS = -2147409848; + +const int CSSMERR_TP_VERIFICATION_FAILURE = -2147409847; + +const int CSSMERR_TP_INVALID_DB_HANDLE = -2147409846; + +const int CSSMERR_TP_UNKNOWN_FORMAT = -2147409842; + +const int CSSMERR_TP_UNKNOWN_TAG = -2147409841; + +const int CSSMERR_TP_INVALID_PASSTHROUGH_ID = -2147409834; + +const int CSSMERR_TP_INVALID_CSP_HANDLE = -2147409840; + +const int CSSMERR_TP_INVALID_DL_HANDLE = -2147409839; + +const int CSSMERR_TP_INVALID_CL_HANDLE = -2147409838; + +const int CSSMERR_TP_INVALID_DB_LIST_POINTER = -2147409843; + +const int CSSM_TP_BASE_TP_ERROR = -2147409664; + +const int CSSMERR_TP_INVALID_CALLERAUTH_CONTEXT_POINTER = -2147409663; + +const int CSSMERR_TP_INVALID_IDENTIFIER_POINTER = -2147409662; + +const int CSSMERR_TP_INVALID_KEYCACHE_HANDLE = -2147409661; + +const int CSSMERR_TP_INVALID_CERTGROUP = -2147409660; + +const int CSSMERR_TP_INVALID_CRLGROUP = -2147409659; + +const int CSSMERR_TP_INVALID_CRLGROUP_POINTER = -2147409658; + +const int CSSMERR_TP_AUTHENTICATION_FAILED = -2147409657; + +const int CSSMERR_TP_CERTGROUP_INCOMPLETE = -2147409656; + +const int CSSMERR_TP_CERTIFICATE_CANT_OPERATE = -2147409655; + +const int CSSMERR_TP_CERT_EXPIRED = -2147409654; + +const int CSSMERR_TP_CERT_NOT_VALID_YET = -2147409653; + +const int CSSMERR_TP_CERT_REVOKED = -2147409652; + +const int CSSMERR_TP_CERT_SUSPENDED = -2147409651; + +const int CSSMERR_TP_INSUFFICIENT_CREDENTIALS = -2147409650; + +const int CSSMERR_TP_INVALID_ACTION = -2147409649; + +const int CSSMERR_TP_INVALID_ACTION_DATA = -2147409648; + +const int CSSMERR_TP_INVALID_ANCHOR_CERT = -2147409646; + +const int CSSMERR_TP_INVALID_AUTHORITY = -2147409645; + +const int CSSMERR_TP_VERIFY_ACTION_FAILED = -2147409644; + +const int CSSMERR_TP_INVALID_CERTIFICATE = -2147409643; + +const int CSSMERR_TP_INVALID_CERT_AUTHORITY = -2147409642; + +const int CSSMERR_TP_INVALID_CRL_AUTHORITY = -2147409641; + +const int CSSMERR_TP_INVALID_CRL_ENCODING = -2147409640; + +const int CSSMERR_TP_INVALID_CRL_TYPE = -2147409639; + +const int CSSMERR_TP_INVALID_CRL = -2147409638; + +const int CSSMERR_TP_INVALID_FORM_TYPE = -2147409637; + +const int CSSMERR_TP_INVALID_ID = -2147409636; + +const int CSSMERR_TP_INVALID_IDENTIFIER = -2147409635; + +const int CSSMERR_TP_INVALID_INDEX = -2147409634; + +const int CSSMERR_TP_INVALID_NAME = -2147409633; + +const int CSSMERR_TP_INVALID_POLICY_IDENTIFIERS = -2147409632; + +const int CSSMERR_TP_INVALID_TIMESTRING = -2147409631; + +const int CSSMERR_TP_INVALID_REASON = -2147409630; + +const int CSSMERR_TP_INVALID_REQUEST_INPUTS = -2147409629; + +const int CSSMERR_TP_INVALID_RESPONSE_VECTOR = -2147409628; + +const int CSSMERR_TP_INVALID_SIGNATURE = -2147409627; + +const int CSSMERR_TP_INVALID_STOP_ON_POLICY = -2147409626; + +const int CSSMERR_TP_INVALID_CALLBACK = -2147409625; + +const int CSSMERR_TP_INVALID_TUPLE = -2147409624; + +const int CSSMERR_TP_NOT_SIGNER = -2147409623; + +const int CSSMERR_TP_NOT_TRUSTED = -2147409622; + +const int CSSMERR_TP_NO_DEFAULT_AUTHORITY = -2147409621; + +const int CSSMERR_TP_REJECTED_FORM = -2147409620; + +const int CSSMERR_TP_REQUEST_LOST = -2147409619; + +const int CSSMERR_TP_REQUEST_REJECTED = -2147409618; + +const int CSSMERR_TP_UNSUPPORTED_ADDR_TYPE = -2147409617; + +const int CSSMERR_TP_UNSUPPORTED_SERVICE = -2147409616; + +const int CSSMERR_TP_INVALID_TUPLEGROUP_POINTER = -2147409615; + +const int CSSMERR_TP_INVALID_TUPLEGROUP = -2147409614; + +const int CSSMERR_AC_INTERNAL_ERROR = -2147405823; + +const int CSSMERR_AC_MEMORY_ERROR = -2147405822; + +const int CSSMERR_AC_MDS_ERROR = -2147405821; + +const int CSSMERR_AC_INVALID_POINTER = -2147405820; + +const int CSSMERR_AC_INVALID_INPUT_POINTER = -2147405819; + +const int CSSMERR_AC_INVALID_OUTPUT_POINTER = -2147405818; + +const int CSSMERR_AC_FUNCTION_NOT_IMPLEMENTED = -2147405817; + +const int CSSMERR_AC_SELF_CHECK_FAILED = -2147405816; + +const int CSSMERR_AC_OS_ACCESS_DENIED = -2147405815; + +const int CSSMERR_AC_FUNCTION_FAILED = -2147405814; + +const int CSSMERR_AC_INVALID_CONTEXT_HANDLE = -2147405760; + +const int CSSMERR_AC_INVALID_DATA = -2147405754; + +const int CSSMERR_AC_INVALID_DB_LIST = -2147405748; + +const int CSSMERR_AC_INVALID_PASSTHROUGH_ID = -2147405738; + +const int CSSMERR_AC_INVALID_DL_HANDLE = -2147405743; + +const int CSSMERR_AC_INVALID_CL_HANDLE = -2147405742; + +const int CSSMERR_AC_INVALID_TP_HANDLE = -2147405741; + +const int CSSMERR_AC_INVALID_DB_HANDLE = -2147405750; + +const int CSSMERR_AC_INVALID_DB_LIST_POINTER = -2147405747; + +const int CSSM_AC_BASE_AC_ERROR = -2147405568; + +const int CSSMERR_AC_INVALID_BASE_ACLS = -2147405567; + +const int CSSMERR_AC_INVALID_TUPLE_CREDENTIALS = -2147405566; + +const int CSSMERR_AC_INVALID_ENCODING = -2147405565; + +const int CSSMERR_AC_INVALID_VALIDITY_PERIOD = -2147405564; + +const int CSSMERR_AC_INVALID_REQUESTOR = -2147405563; + +const int CSSMERR_AC_INVALID_REQUEST_DESCRIPTOR = -2147405562; + +const int CSSMERR_CL_INTERNAL_ERROR = -2147411967; + +const int CSSMERR_CL_MEMORY_ERROR = -2147411966; + +const int CSSMERR_CL_MDS_ERROR = -2147411965; + +const int CSSMERR_CL_INVALID_POINTER = -2147411964; + +const int CSSMERR_CL_INVALID_INPUT_POINTER = -2147411963; + +const int CSSMERR_CL_INVALID_OUTPUT_POINTER = -2147411962; + +const int CSSMERR_CL_FUNCTION_NOT_IMPLEMENTED = -2147411961; + +const int CSSMERR_CL_SELF_CHECK_FAILED = -2147411960; + +const int CSSMERR_CL_OS_ACCESS_DENIED = -2147411959; + +const int CSSMERR_CL_FUNCTION_FAILED = -2147411958; + +const int CSSMERR_CL_INVALID_CONTEXT_HANDLE = -2147411904; + +const int CSSMERR_CL_INVALID_CERTGROUP_POINTER = -2147411902; + +const int CSSMERR_CL_INVALID_CERT_POINTER = -2147411901; + +const int CSSMERR_CL_INVALID_CRL_POINTER = -2147411900; + +const int CSSMERR_CL_INVALID_FIELD_POINTER = -2147411899; + +const int CSSMERR_CL_INVALID_DATA = -2147411898; + +const int CSSMERR_CL_CRL_ALREADY_SIGNED = -2147411897; + +const int CSSMERR_CL_INVALID_NUMBER_OF_FIELDS = -2147411896; + +const int CSSMERR_CL_VERIFICATION_FAILURE = -2147411895; + +const int CSSMERR_CL_UNKNOWN_FORMAT = -2147411890; + +const int CSSMERR_CL_UNKNOWN_TAG = -2147411889; + +const int CSSMERR_CL_INVALID_PASSTHROUGH_ID = -2147411882; + +const int CSSM_CL_BASE_CL_ERROR = -2147411712; + +const int CSSMERR_CL_INVALID_BUNDLE_POINTER = -2147411711; + +const int CSSMERR_CL_INVALID_CACHE_HANDLE = -2147411710; + +const int CSSMERR_CL_INVALID_RESULTS_HANDLE = -2147411709; + +const int CSSMERR_CL_INVALID_BUNDLE_INFO = -2147411708; + +const int CSSMERR_CL_INVALID_CRL_INDEX = -2147411707; + +const int CSSMERR_CL_INVALID_SCOPE = -2147411706; + +const int CSSMERR_CL_NO_FIELD_VALUES = -2147411705; + +const int CSSMERR_CL_SCOPE_NOT_SUPPORTED = -2147411704; + +const int CSSMERR_DL_INTERNAL_ERROR = -2147414015; + +const int CSSMERR_DL_MEMORY_ERROR = -2147414014; + +const int CSSMERR_DL_MDS_ERROR = -2147414013; + +const int CSSMERR_DL_INVALID_POINTER = -2147414012; + +const int CSSMERR_DL_INVALID_INPUT_POINTER = -2147414011; + +const int CSSMERR_DL_INVALID_OUTPUT_POINTER = -2147414010; + +const int CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED = -2147414009; + +const int CSSMERR_DL_SELF_CHECK_FAILED = -2147414008; + +const int CSSMERR_DL_OS_ACCESS_DENIED = -2147414007; + +const int CSSMERR_DL_FUNCTION_FAILED = -2147414006; + +const int CSSMERR_DL_INVALID_CSP_HANDLE = -2147413936; + +const int CSSMERR_DL_INVALID_DL_HANDLE = -2147413935; + +const int CSSMERR_DL_INVALID_CL_HANDLE = -2147413934; + +const int CSSMERR_DL_INVALID_DB_LIST_POINTER = -2147413939; + +const int CSSMERR_DL_OPERATION_AUTH_DENIED = -2147413984; + +const int CSSMERR_DL_OBJECT_USE_AUTH_DENIED = -2147413983; + +const int CSSMERR_DL_OBJECT_MANIP_AUTH_DENIED = -2147413982; + +const int CSSMERR_DL_OBJECT_ACL_NOT_SUPPORTED = -2147413981; + +const int CSSMERR_DL_OBJECT_ACL_REQUIRED = -2147413980; + +const int CSSMERR_DL_INVALID_ACCESS_CREDENTIALS = -2147413979; + +const int CSSMERR_DL_INVALID_ACL_BASE_CERTS = -2147413978; + +const int CSSMERR_DL_ACL_BASE_CERTS_NOT_SUPPORTED = -2147413977; + +const int CSSMERR_DL_INVALID_SAMPLE_VALUE = -2147413976; + +const int CSSMERR_DL_SAMPLE_VALUE_NOT_SUPPORTED = -2147413975; + +const int CSSMERR_DL_INVALID_ACL_SUBJECT_VALUE = -2147413974; + +const int CSSMERR_DL_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147413973; + +const int CSSMERR_DL_INVALID_ACL_CHALLENGE_CALLBACK = -2147413972; + +const int CSSMERR_DL_ACL_CHALLENGE_CALLBACK_FAILED = -2147413971; + +const int CSSMERR_DL_INVALID_ACL_ENTRY_TAG = -2147413970; + +const int CSSMERR_DL_ACL_ENTRY_TAG_NOT_FOUND = -2147413969; + +const int CSSMERR_DL_INVALID_ACL_EDIT_MODE = -2147413968; + +const int CSSMERR_DL_ACL_CHANGE_FAILED = -2147413967; + +const int CSSMERR_DL_INVALID_NEW_ACL_ENTRY = -2147413966; + +const int CSSMERR_DL_INVALID_NEW_ACL_OWNER = -2147413965; + +const int CSSMERR_DL_ACL_DELETE_FAILED = -2147413964; + +const int CSSMERR_DL_ACL_REPLACE_FAILED = -2147413963; + +const int CSSMERR_DL_ACL_ADD_FAILED = -2147413962; + +const int CSSMERR_DL_INVALID_DB_HANDLE = -2147413942; + +const int CSSMERR_DL_INVALID_PASSTHROUGH_ID = -2147413930; + +const int CSSMERR_DL_INVALID_NETWORK_ADDR = -2147413929; + +const int CSSM_DL_BASE_DL_ERROR = -2147413760; + +const int CSSMERR_DL_DATABASE_CORRUPT = -2147413759; + +const int CSSMERR_DL_INVALID_RECORD_INDEX = -2147413752; + +const int CSSMERR_DL_INVALID_RECORDTYPE = -2147413751; + +const int CSSMERR_DL_INVALID_FIELD_NAME = -2147413750; + +const int CSSMERR_DL_UNSUPPORTED_FIELD_FORMAT = -2147413749; + +const int CSSMERR_DL_UNSUPPORTED_INDEX_INFO = -2147413748; + +const int CSSMERR_DL_UNSUPPORTED_LOCALITY = -2147413747; + +const int CSSMERR_DL_UNSUPPORTED_NUM_ATTRIBUTES = -2147413746; + +const int CSSMERR_DL_UNSUPPORTED_NUM_INDEXES = -2147413745; + +const int CSSMERR_DL_UNSUPPORTED_NUM_RECORDTYPES = -2147413744; + +const int CSSMERR_DL_UNSUPPORTED_RECORDTYPE = -2147413743; + +const int CSSMERR_DL_FIELD_SPECIFIED_MULTIPLE = -2147413742; + +const int CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT = -2147413741; + +const int CSSMERR_DL_INVALID_PARSING_MODULE = -2147413740; + +const int CSSMERR_DL_INVALID_DB_NAME = -2147413738; + +const int CSSMERR_DL_DATASTORE_DOESNOT_EXIST = -2147413737; + +const int CSSMERR_DL_DATASTORE_ALREADY_EXISTS = -2147413736; + +const int CSSMERR_DL_DB_LOCKED = -2147413735; + +const int CSSMERR_DL_DATASTORE_IS_OPEN = -2147413734; + +const int CSSMERR_DL_RECORD_NOT_FOUND = -2147413733; + +const int CSSMERR_DL_MISSING_VALUE = -2147413732; + +const int CSSMERR_DL_UNSUPPORTED_QUERY = -2147413731; + +const int CSSMERR_DL_UNSUPPORTED_QUERY_LIMITS = -2147413730; + +const int CSSMERR_DL_UNSUPPORTED_NUM_SELECTION_PREDS = -2147413729; + +const int CSSMERR_DL_UNSUPPORTED_OPERATOR = -2147413727; + +const int CSSMERR_DL_INVALID_RESULTS_HANDLE = -2147413726; + +const int CSSMERR_DL_INVALID_DB_LOCATION = -2147413725; + +const int CSSMERR_DL_INVALID_ACCESS_REQUEST = -2147413724; + +const int CSSMERR_DL_INVALID_INDEX_INFO = -2147413723; + +const int CSSMERR_DL_INVALID_SELECTION_TAG = -2147413722; + +const int CSSMERR_DL_INVALID_NEW_OWNER = -2147413721; + +const int CSSMERR_DL_INVALID_RECORD_UID = -2147413720; + +const int CSSMERR_DL_INVALID_UNIQUE_INDEX_DATA = -2147413719; + +const int CSSMERR_DL_INVALID_MODIFY_MODE = -2147413718; + +const int CSSMERR_DL_INVALID_OPEN_PARAMETERS = -2147413717; + +const int CSSMERR_DL_RECORD_MODIFIED = -2147413716; + +const int CSSMERR_DL_ENDOFDATA = -2147413715; + +const int CSSMERR_DL_INVALID_QUERY = -2147413714; + +const int CSSMERR_DL_INVALID_VALUE = -2147413713; + +const int CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTED = -2147413712; + +const int CSSMERR_DL_STALE_UNIQUE_RECORD = -2147413711; + +const int CSSM_WORDID_KEYCHAIN_PROMPT = 65536; + +const int CSSM_WORDID_KEYCHAIN_LOCK = 65537; + +const int CSSM_WORDID_KEYCHAIN_CHANGE_LOCK = 65538; + +const int CSSM_WORDID_PROCESS = 65539; + +const int CSSM_WORDID__RESERVED_1 = 65540; + +const int CSSM_WORDID_SYMMETRIC_KEY = 65541; + +const int CSSM_WORDID_SYSTEM = 65542; + +const int CSSM_WORDID_KEY = 65543; + +const int CSSM_WORDID_PIN = 65544; + +const int CSSM_WORDID_PREAUTH = 65545; + +const int CSSM_WORDID_PREAUTH_SOURCE = 65546; + +const int CSSM_WORDID_ASYMMETRIC_KEY = 65547; + +const int CSSM_WORDID_PARTITION = 65548; + +const int CSSM_WORDID_KEYBAG_KEY = 65549; + +const int CSSM_WORDID__FIRST_UNUSED = 65550; + +const int CSSM_ACL_SUBJECT_TYPE_KEYCHAIN_PROMPT = 65536; + +const int CSSM_ACL_SUBJECT_TYPE_PROCESS = 65539; + +const int CSSM_ACL_SUBJECT_TYPE_CODE_SIGNATURE = 116; + +const int CSSM_ACL_SUBJECT_TYPE_COMMENT = 12; + +const int CSSM_ACL_SUBJECT_TYPE_SYMMETRIC_KEY = 65541; + +const int CSSM_ACL_SUBJECT_TYPE_PREAUTH = 65545; + +const int CSSM_ACL_SUBJECT_TYPE_PREAUTH_SOURCE = 65546; + +const int CSSM_ACL_SUBJECT_TYPE_ASYMMETRIC_KEY = 65547; + +const int CSSM_ACL_SUBJECT_TYPE_PARTITION = 65548; + +const int CSSM_SAMPLE_TYPE_KEYCHAIN_PROMPT = 65536; + +const int CSSM_SAMPLE_TYPE_KEYCHAIN_LOCK = 65537; + +const int CSSM_SAMPLE_TYPE_KEYCHAIN_CHANGE_LOCK = 65538; + +const int CSSM_SAMPLE_TYPE_PROCESS = 65539; + +const int CSSM_SAMPLE_TYPE_COMMENT = 12; + +const int CSSM_SAMPLE_TYPE_RETRY_ID = 85; + +const int CSSM_SAMPLE_TYPE_SYMMETRIC_KEY = 65541; + +const int CSSM_SAMPLE_TYPE_PREAUTH = 65545; + +const int CSSM_SAMPLE_TYPE_ASYMMETRIC_KEY = 65547; + +const int CSSM_SAMPLE_TYPE_KEYBAG_KEY = 65549; + +const int CSSM_ACL_AUTHORIZATION_CHANGE_ACL = 65536; + +const int CSSM_ACL_AUTHORIZATION_CHANGE_OWNER = 65537; + +const int CSSM_ACL_AUTHORIZATION_PARTITION_ID = 65538; + +const int CSSM_ACL_AUTHORIZATION_INTEGRITY = 65539; + +const int CSSM_ACL_AUTHORIZATION_PREAUTH_BASE = 16842752; + +const int CSSM_ACL_AUTHORIZATION_PREAUTH_END = 16908288; + +const int CSSM_ACL_CODE_SIGNATURE_INVALID = 0; + +const int CSSM_ACL_CODE_SIGNATURE_OSX = 1; + +const int CSSM_ACL_MATCH_UID = 1; + +const int CSSM_ACL_MATCH_GID = 2; + +const int CSSM_ACL_MATCH_HONOR_ROOT = 256; + +const int CSSM_ACL_MATCH_BITS = 3; + +const int CSSM_ACL_PROCESS_SELECTOR_CURRENT_VERSION = 257; + +const int CSSM_ACL_KEYCHAIN_PROMPT_CURRENT_VERSION = 257; + +const int CSSM_ACL_KEYCHAIN_PROMPT_REQUIRE_PASSPHRASE = 1; + +const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED = 16; + +const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED_ACT = 32; + +const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID = 64; + +const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID_ACT = 128; + +const int CSSM_ACL_PREAUTH_TRACKING_COUNT_MASK = 255; + +const int CSSM_ACL_PREAUTH_TRACKING_BLOCKED = 0; + +const int CSSM_ACL_PREAUTH_TRACKING_UNKNOWN = 1073741824; + +const int CSSM_ACL_PREAUTH_TRACKING_AUTHORIZED = -2147483648; + +const int CSSM_DB_ACCESS_RESET = 65536; + +const int CSSM_ALGID_APPLE_YARROW = -2147483648; + +const int CSSM_ALGID_AES = -2147483647; + +const int CSSM_ALGID_FEE = -2147483646; + +const int CSSM_ALGID_FEE_MD5 = -2147483645; + +const int CSSM_ALGID_FEE_SHA1 = -2147483644; + +const int CSSM_ALGID_FEED = -2147483643; + +const int CSSM_ALGID_FEEDEXP = -2147483642; + +const int CSSM_ALGID_ASC = -2147483641; + +const int CSSM_ALGID_SHA1HMAC_LEGACY = -2147483640; + +const int CSSM_ALGID_KEYCHAIN_KEY = -2147483639; + +const int CSSM_ALGID_PKCS12_PBE_ENCR = -2147483638; + +const int CSSM_ALGID_PKCS12_PBE_MAC = -2147483637; + +const int CSSM_ALGID_SECURE_PASSPHRASE = -2147483636; + +const int CSSM_ALGID_PBE_OPENSSL_MD5 = -2147483635; + +const int CSSM_ALGID_SHA256 = -2147483634; + +const int CSSM_ALGID_SHA384 = -2147483633; + +const int CSSM_ALGID_SHA512 = -2147483632; + +const int CSSM_ALGID_ENTROPY_DEFAULT = -2147483631; + +const int CSSM_ALGID_SHA224 = -2147483630; + +const int CSSM_ALGID_SHA224WithRSA = -2147483629; + +const int CSSM_ALGID_SHA256WithRSA = -2147483628; + +const int CSSM_ALGID_SHA384WithRSA = -2147483627; + +const int CSSM_ALGID_SHA512WithRSA = -2147483626; + +const int CSSM_ALGID_OPENSSH1 = -2147483625; + +const int CSSM_ALGID_SHA224WithECDSA = -2147483624; + +const int CSSM_ALGID_SHA256WithECDSA = -2147483623; + +const int CSSM_ALGID_SHA384WithECDSA = -2147483622; + +const int CSSM_ALGID_SHA512WithECDSA = -2147483621; + +const int CSSM_ALGID_ECDSA_SPECIFIED = -2147483620; + +const int CSSM_ALGID_ECDH_X963_KDF = -2147483619; + +const int CSSM_ALGID__FIRST_UNUSED = -2147483618; + +const int CSSM_PADDING_APPLE_SSLv2 = -2147483648; + +const int CSSM_KEYBLOB_RAW_FORMAT_VENDOR_DEFINED = -2147483648; + +const int CSSM_KEYBLOB_RAW_FORMAT_X509 = -2147483648; + +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH = -2147483647; + +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSL = -2147483646; + +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH2 = -2147483645; + +const int CSSM_CUSTOM_COMMON_ERROR_EXTENT = 224; + +const int CSSM_ERRCODE_NO_USER_INTERACTION = 224; + +const int CSSM_ERRCODE_USER_CANCELED = 225; + +const int CSSM_ERRCODE_SERVICE_NOT_AVAILABLE = 226; + +const int CSSM_ERRCODE_INSUFFICIENT_CLIENT_IDENTIFICATION = 227; + +const int CSSM_ERRCODE_DEVICE_RESET = 228; + +const int CSSM_ERRCODE_DEVICE_FAILED = 229; + +const int CSSM_ERRCODE_IN_DARK_WAKE = 230; + +const int CSSMERR_CSSM_NO_USER_INTERACTION = -2147417888; + +const int CSSMERR_AC_NO_USER_INTERACTION = -2147405600; + +const int CSSMERR_CSP_NO_USER_INTERACTION = -2147415840; + +const int CSSMERR_CL_NO_USER_INTERACTION = -2147411744; + +const int CSSMERR_DL_NO_USER_INTERACTION = -2147413792; + +const int CSSMERR_TP_NO_USER_INTERACTION = -2147409696; + +const int CSSMERR_CSSM_USER_CANCELED = -2147417887; + +const int CSSMERR_AC_USER_CANCELED = -2147405599; + +const int CSSMERR_CSP_USER_CANCELED = -2147415839; + +const int CSSMERR_CL_USER_CANCELED = -2147411743; + +const int CSSMERR_DL_USER_CANCELED = -2147413791; + +const int CSSMERR_TP_USER_CANCELED = -2147409695; + +const int CSSMERR_CSSM_SERVICE_NOT_AVAILABLE = -2147417886; + +const int CSSMERR_AC_SERVICE_NOT_AVAILABLE = -2147405598; + +const int CSSMERR_CSP_SERVICE_NOT_AVAILABLE = -2147415838; + +const int CSSMERR_CL_SERVICE_NOT_AVAILABLE = -2147411742; + +const int CSSMERR_DL_SERVICE_NOT_AVAILABLE = -2147413790; + +const int CSSMERR_TP_SERVICE_NOT_AVAILABLE = -2147409694; + +const int CSSMERR_CSSM_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147417885; + +const int CSSMERR_AC_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147405597; + +const int CSSMERR_CSP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147415837; + +const int CSSMERR_CL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147411741; + +const int CSSMERR_DL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147413789; + +const int CSSMERR_TP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147409693; + +const int CSSMERR_CSSM_DEVICE_RESET = -2147417884; + +const int CSSMERR_AC_DEVICE_RESET = -2147405596; + +const int CSSMERR_CSP_DEVICE_RESET = -2147415836; + +const int CSSMERR_CL_DEVICE_RESET = -2147411740; + +const int CSSMERR_DL_DEVICE_RESET = -2147413788; + +const int CSSMERR_TP_DEVICE_RESET = -2147409692; + +const int CSSMERR_CSSM_DEVICE_FAILED = -2147417883; + +const int CSSMERR_AC_DEVICE_FAILED = -2147405595; + +const int CSSMERR_CSP_DEVICE_FAILED = -2147415835; + +const int CSSMERR_CL_DEVICE_FAILED = -2147411739; + +const int CSSMERR_DL_DEVICE_FAILED = -2147413787; + +const int CSSMERR_TP_DEVICE_FAILED = -2147409691; + +const int CSSMERR_CSSM_IN_DARK_WAKE = -2147417882; + +const int CSSMERR_AC_IN_DARK_WAKE = -2147405594; + +const int CSSMERR_CSP_IN_DARK_WAKE = -2147415834; + +const int CSSMERR_CL_IN_DARK_WAKE = -2147411738; + +const int CSSMERR_DL_IN_DARK_WAKE = -2147413786; + +const int CSSMERR_TP_IN_DARK_WAKE = -2147409690; + +const int CSSMERR_CSP_APPLE_ADD_APPLICATION_ACL_SUBJECT = -2147415040; + +const int CSSMERR_CSP_APPLE_PUBLIC_KEY_INCOMPLETE = -2147415039; + +const int CSSMERR_CSP_APPLE_SIGNATURE_MISMATCH = -2147415038; + +const int CSSMERR_CSP_APPLE_INVALID_KEY_START_DATE = -2147415037; + +const int CSSMERR_CSP_APPLE_INVALID_KEY_END_DATE = -2147415036; + +const int CSSMERR_CSPDL_APPLE_DL_CONVERSION_ERROR = -2147415035; + +const int CSSMERR_CSP_APPLE_SSLv2_ROLLBACK = -2147415034; + +const int CSSM_DL_DB_RECORD_GENERIC_PASSWORD = -2147483648; + +const int CSSM_DL_DB_RECORD_INTERNET_PASSWORD = -2147483647; + +const int CSSM_DL_DB_RECORD_APPLESHARE_PASSWORD = -2147483646; + +const int CSSM_DL_DB_RECORD_X509_CERTIFICATE = -2147479552; + +const int CSSM_DL_DB_RECORD_USER_TRUST = -2147479551; + +const int CSSM_DL_DB_RECORD_X509_CRL = -2147479550; + +const int CSSM_DL_DB_RECORD_UNLOCK_REFERRAL = -2147479549; + +const int CSSM_DL_DB_RECORD_EXTENDED_ATTRIBUTE = -2147479548; + +const int CSSM_DL_DB_RECORD_METADATA = -2147450880; + +const int CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT = 0; + +const int CSSM_APPLEFILEDL_COMMIT = 1; + +const int CSSM_APPLEFILEDL_ROLLBACK = 2; + +const int CSSM_APPLEFILEDL_TAKE_FILE_LOCK = 3; + +const int CSSM_APPLEFILEDL_MAKE_BACKUP = 4; + +const int CSSM_APPLEFILEDL_MAKE_COPY = 5; + +const int CSSM_APPLEFILEDL_DELETE_FILE = 6; + +const int CSSM_APPLE_UNLOCK_TYPE_KEY_DIRECT = 1; + +const int CSSM_APPLE_UNLOCK_TYPE_WRAPPED_PRIVATE = 2; + +const int CSSM_APPLE_UNLOCK_TYPE_KEYBAG = 3; + +const int CSSMERR_APPLEDL_INVALID_OPEN_PARAMETERS = -2147412992; + +const int CSSMERR_APPLEDL_DISK_FULL = -2147412991; + +const int CSSMERR_APPLEDL_QUOTA_EXCEEDED = -2147412990; + +const int CSSMERR_APPLEDL_FILE_TOO_BIG = -2147412989; + +const int CSSMERR_APPLEDL_INVALID_DATABASE_BLOB = -2147412988; + +const int CSSMERR_APPLEDL_INVALID_KEY_BLOB = -2147412987; + +const int CSSMERR_APPLEDL_INCOMPATIBLE_DATABASE_BLOB = -2147412986; + +const int CSSMERR_APPLEDL_INCOMPATIBLE_KEY_BLOB = -2147412985; + +const int CSSMERR_APPLETP_HOSTNAME_MISMATCH = -2147408896; + +const int CSSMERR_APPLETP_UNKNOWN_CRITICAL_EXTEN = -2147408895; + +const int CSSMERR_APPLETP_NO_BASIC_CONSTRAINTS = -2147408894; + +const int CSSMERR_APPLETP_INVALID_CA = -2147408893; + +const int CSSMERR_APPLETP_INVALID_AUTHORITY_ID = -2147408892; + +const int CSSMERR_APPLETP_INVALID_SUBJECT_ID = -2147408891; + +const int CSSMERR_APPLETP_INVALID_KEY_USAGE = -2147408890; + +const int CSSMERR_APPLETP_INVALID_EXTENDED_KEY_USAGE = -2147408889; + +const int CSSMERR_APPLETP_INVALID_ID_LINKAGE = -2147408888; + +const int CSSMERR_APPLETP_PATH_LEN_CONSTRAINT = -2147408887; + +const int CSSMERR_APPLETP_INVALID_ROOT = -2147408886; + +const int CSSMERR_APPLETP_CRL_EXPIRED = -2147408885; + +const int CSSMERR_APPLETP_CRL_NOT_VALID_YET = -2147408884; + +const int CSSMERR_APPLETP_CRL_NOT_FOUND = -2147408883; + +const int CSSMERR_APPLETP_CRL_SERVER_DOWN = -2147408882; - /// Adds the implementation of the NSURLSessionDataDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, - {void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)? - URLSession_dataTask_didReceiveResponse_completionHandler_, - void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)? - URLSession_dataTask_didBecomeDownloadTask_, - void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)? - URLSession_dataTask_didBecomeStreamTask_, - void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)? - URLSession_dataTask_didReceiveData_, - void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, - objc.ObjCBlock)? - URLSession_dataTask_willCacheResponse_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_task_didReceiveChallenge_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, objc.ObjCBlock)? URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - NSURLSessionDataDelegate - .URLSession_dataTask_didReceiveResponse_completionHandler_ - .implementAsListener( - builder, URLSession_dataTask_didReceiveResponse_completionHandler_); - NSURLSessionDataDelegate.URLSession_dataTask_didBecomeDownloadTask_ - .implementAsListener( - builder, URLSession_dataTask_didBecomeDownloadTask_); - NSURLSessionDataDelegate.URLSession_dataTask_didBecomeStreamTask_ - .implementAsListener(builder, URLSession_dataTask_didBecomeStreamTask_); - NSURLSessionDataDelegate.URLSession_dataTask_didReceiveData_ - .implementAsListener(builder, URLSession_dataTask_didReceiveData_); - NSURLSessionDataDelegate - .URLSession_dataTask_willCacheResponse_completionHandler_ - .implementAsListener( - builder, URLSession_dataTask_willCacheResponse_completionHandler_); - NSURLSessionDataDelegate.URLSession_didCreateTask_.implementAsListener( - builder, URLSession_didCreateTask_); - NSURLSessionDataDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionDataDelegate.URLSession_taskIsWaitingForConnectivity_ - .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionDataDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionDataDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionDataDelegate.URLSession_task_needNewBodyStream_ - .implementAsListener(builder, URLSession_task_needNewBodyStream_); - NSURLSessionDataDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implementAsListener(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionDataDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implementAsListener(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionDataDelegate.URLSession_task_didReceiveInformationalResponse_ - .implementAsListener( - builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionDataDelegate.URLSession_task_didFinishCollectingMetrics_ - .implementAsListener( - builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionDataDelegate.URLSession_task_didCompleteWithError_ - .implementAsListener(builder, URLSession_task_didCompleteWithError_); - NSURLSessionDataDelegate.URLSession_didBecomeInvalidWithError_ - .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionDataDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionDataDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implementAsListener( - builder, URLSessionDidFinishEventsForBackgroundURLSession_); - } +const int CSSMERR_APPLETP_CRL_BAD_URI = -2147408881; - /// The task has received a response and no further messages will be - /// received until the completion block is called. The disposition - /// allows you to cancel a request or to turn a data task into a - /// download task. This delegate message is optional - if you do not - /// implement it, you can get the response as a property of the task. - /// - /// This method will not be called for background upload tasks (which cannot be converted to download tasks). - static final URLSession_dataTask_didReceiveResponse_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, - objc.ObjCBlock)>( - _sel_URLSession_dataTask_didReceiveResponse_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_dataTask_didReceiveResponse_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionDataTask arg2, - NSURLResponse arg3, - objc.ObjCBlock arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionDataTask, NSURLResponse, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionDataTask arg2, - NSURLResponse arg3, - objc.ObjCBlock arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int CSSMERR_APPLETP_UNKNOWN_CERT_EXTEN = -2147408880; - /// Notification that a data task has become a download task. No - /// future messages will be sent to the data task. - static final URLSession_dataTask_didBecomeDownloadTask_ = - objc.ObjCProtocolListenableMethod< - void Function( - NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)>( - _sel_URLSession_dataTask_didBecomeDownloadTask_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_dataTask_didBecomeDownloadTask_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionDataTask arg2, NSURLSessionDownloadTask arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionDataTask arg2, NSURLSessionDownloadTask arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSMERR_APPLETP_UNKNOWN_CRL_EXTEN = -2147408879; - /// Notification that a data task has become a bidirectional stream - /// task. No future messages will be sent to the data task. The newly - /// created streamTask will carry the original request and response as - /// properties. - /// - /// For requests that were pipelined, the stream object will only allow - /// reading, and the object will immediately issue a - /// -URLSession:writeClosedForStream:. Pipelining can be disabled for - /// all requests in a session, or by the NSURLRequest - /// HTTPShouldUsePipelining property. - /// - /// The underlying connection is no longer considered part of the HTTP - /// connection cache and won't count against the total number of - /// connections per host. - static final URLSession_dataTask_didBecomeStreamTask_ = - objc.ObjCProtocolListenableMethod< - void Function( - NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)>( - _sel_URLSession_dataTask_didBecomeStreamTask_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_dataTask_didBecomeStreamTask_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionDataTask arg2, NSURLSessionStreamTask arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionDataTask arg2, NSURLSessionStreamTask arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSMERR_APPLETP_CRL_NOT_TRUSTED = -2147408878; - /// Sent when data is available for the delegate to consume. As the - /// data may be discontiguous, you should use - /// [NSData enumerateByteRangesUsingBlock:] to access it. - static final URLSession_dataTask_didReceiveData_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionDataTask, objc.NSData)>( - _sel_URLSession_dataTask_didReceiveData_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_dataTask_didReceiveData_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionDataTask, objc.NSData) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionDataTask arg2, objc.NSData arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionDataTask, objc.NSData) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionDataTask arg2, objc.NSData arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSMERR_APPLETP_CRL_INVALID_ANCHOR_CERT = -2147408877; - /// Invoke the completion routine with a valid NSCachedURLResponse to - /// allow the resulting data to be cached, or pass nil to prevent - /// caching. Note that there is no guarantee that caching will be - /// attempted for a given resource, and you should not rely on this - /// message to receive the resource data. - static final URLSession_dataTask_willCacheResponse_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, - objc.ObjCBlock)>( - _sel_URLSession_dataTask_willCacheResponse_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_dataTask_willCacheResponse_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionDataTask arg2, - NSCachedURLResponse arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionDataTask arg2, - NSCachedURLResponse arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int CSSMERR_APPLETP_CRL_POLICY_FAIL = -2147408876; - /// Notification that a task has been created. This method is the first message - /// a task sends, providing a place to configure the task before it is resumed. - /// - /// This delegate callback is *NOT* dispatched to the delegate queue. It is - /// invoked synchronously before the task creation method returns. - static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask)>( - _sel_URLSession_didCreateTask_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_didCreateTask_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - ); +const int CSSMERR_APPLETP_IDP_FAIL = -2147408875; - /// Sent when the system is ready to begin work for a task with a delayed start - /// time set (using the earliestBeginDate property). The completionHandler must - /// be invoked in order for loading to proceed. The disposition provided to the - /// completion handler continues the load with the original request provided to - /// the task, replaces the request with the specified task, or cancels the task. - /// If this delegate is not implemented, loading will proceed with the original - /// request. - /// - /// Recommendation: only implement this delegate if tasks that have the - /// earliestBeginDate property set may become stale and require alteration prior - /// to starting the network load. - /// - /// If a new request is specified, the allowsExpensiveNetworkAccess, - /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties - /// from the new request will not be used; the properties from the - /// original request will continue to be used. - /// - /// Canceling the task is equivalent to calling the task's cancel method; the - /// URLSession:task:didCompleteWithError: task delegate will be called with error - /// NSURLErrorCancelled. - static final URLSession_task_willBeginDelayedRequest_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)>( - _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLRequest arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLRequest arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int CSSMERR_APPLETP_CERT_NOT_FOUND_FROM_ISSUER = -2147408874; - /// Sent when a task cannot start the network loading process because the current - /// network connectivity is not available or sufficient for the task's request. - /// - /// This delegate will be called at most one time per task, and is only called if - /// the waitsForConnectivity property in the NSURLSessionConfiguration has been - /// set to YES. - /// - /// This delegate callback will never be called for background sessions, because - /// the waitForConnectivity property is ignored by those sessions. - static final URLSession_taskIsWaitingForConnectivity_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask)>( - _sel_URLSession_taskIsWaitingForConnectivity_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_taskIsWaitingForConnectivity_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - ); +const int CSSMERR_APPLETP_BAD_CERT_FROM_ISSUER = -2147408873; - /// An HTTP request is attempting to perform a redirection to a different - /// URL. You must invoke the completion routine to allow the - /// redirection, allow the redirection with a modified request, or - /// pass nil to the completionHandler to cause the body of the redirection - /// response to be delivered as the payload of this request. The default - /// is to follow redirections. - /// - /// For tasks in background sessions, redirections will always be followed and this method will not be called. - static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)>( - _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSHTTPURLResponse arg3, - NSURLRequest arg4, - objc.ObjCBlock arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSHTTPURLResponse arg3, - NSURLRequest arg4, - objc.ObjCBlock arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - ); +const int CSSMERR_APPLETP_SMIME_EMAIL_ADDRS_NOT_FOUND = -2147408872; - /// The task has received a request specific authentication challenge. - /// If this delegate is not implemented, the session specific authentication challenge - /// will *NOT* be called and the behavior will be the same as using the default handling - /// disposition. - static final URLSession_task_didReceiveChallenge_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)>( - _sel_URLSession_task_didReceiveChallenge_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_task_didReceiveChallenge_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLAuthenticationChallenge arg3, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLAuthenticationChallenge arg3, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int CSSMERR_APPLETP_SMIME_BAD_EXT_KEY_USE = -2147408871; - /// Sent if a task requires a new, unopened body stream. This may be - /// necessary when authentication has failed for any request that - /// involves a body stream. - static final URLSession_task_needNewBodyStream_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock)>( - _sel_URLSession_task_needNewBodyStream_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_task_needNewBodyStream_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - objc.ObjCBlock - arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - objc.ObjCBlock - arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSMERR_APPLETP_SMIME_BAD_KEY_USE = -2147408870; + +const int CSSMERR_APPLETP_SMIME_KEYUSAGE_NOT_CRITICAL = -2147408869; + +const int CSSMERR_APPLETP_SMIME_NO_EMAIL_ADDRS = -2147408868; + +const int CSSMERR_APPLETP_SMIME_SUBJ_ALT_NAME_NOT_CRIT = -2147408867; + +const int CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE = -2147408866; + +const int CSSMERR_APPLETP_OCSP_BAD_RESPONSE = -2147408865; + +const int CSSMERR_APPLETP_OCSP_BAD_REQUEST = -2147408864; + +const int CSSMERR_APPLETP_OCSP_UNAVAILABLE = -2147408863; - /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be - /// necessary when resuming a failed upload task. - /// - /// - Parameter session: The session containing the task that needs a new body stream from the given offset. - /// - Parameter task: The task that needs a new body stream. - /// - Parameter offset: The starting offset required for the body stream. - /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock)>( - _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - int arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - int arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int CSSMERR_APPLETP_OCSP_STATUS_UNRECOGNIZED = -2147408862; - /// Sent periodically to notify the delegate of upload progress. This - /// information is also available as properties of the task. - static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, int, int, int)>( - _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, int arg3, int arg4, int arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, int arg3, int arg4, int arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - ); +const int CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK = -2147408861; - /// Sent for each informational response received except 101 switching protocols. - static final URLSession_task_didReceiveInformationalResponse_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( - _sel_URLSession_task_didReceiveInformationalResponse_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_task_didReceiveInformationalResponse_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSHTTPURLResponse arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSHTTPURLResponse arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSMERR_APPLETP_NETWORK_FAILURE = -2147408860; - /// Sent when complete statistics information has been collected for the task. - static final URLSession_task_didFinishCollectingMetrics_ = - objc.ObjCProtocolListenableMethod< - void Function( - NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( - _sel_URLSession_task_didFinishCollectingMetrics_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_task_didFinishCollectingMetrics_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSMERR_APPLETP_OCSP_NOT_TRUSTED = -2147408859; - /// Sent as the last message related to a specific task. Error may be - /// nil, which implies that no error occurred and this task is complete. - static final URLSession_task_didCompleteWithError_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( - _sel_URLSession_task_didCompleteWithError_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_task_didCompleteWithError_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, objc.NSError? arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, objc.NSError? arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSMERR_APPLETP_OCSP_INVALID_ANCHOR_CERT = -2147408858; - /// The last message a session receives. A session will only become - /// invalid because of a systemic error or when it has been - /// explicitly invalidated, in which case the error parameter will be nil. - static final URLSession_didBecomeInvalidWithError_ = objc - .ObjCProtocolListenableMethod( - _sel_URLSession_didBecomeInvalidWithError_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_didBecomeInvalidWithError_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( - (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( - (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => - func(arg1, arg2)), - ); +const int CSSMERR_APPLETP_OCSP_SIG_ERROR = -2147408857; - /// If implemented, when a connection level authentication challenge - /// has occurred, this delegate will be given the opportunity to - /// provide authentication credentials to the underlying - /// connection. Some types of authentication will apply to more than - /// one request on a given connection to a server (SSL Server Trust - /// challenges). If this delegate message is not implemented, the - /// behavior will be to use the default handling, which may involve user - /// interaction. - static final URLSession_didReceiveChallenge_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock)>( - _sel_URLSession_didReceiveChallenge_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSession_didReceiveChallenge_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSMERR_APPLETP_OCSP_NO_SIGNER = -2147408856; - /// If an application has received an - /// -application:handleEventsForBackgroundURLSession:completionHandler: - /// message, the session delegate will receive this message to indicate - /// that all messages previously enqueued for this session have been - /// delivered. At this time it is safe to invoke the previously stored - /// completion handler, or to begin any internal updates that will - /// result in invoking the completion handler. - static final URLSessionDidFinishEventsForBackgroundURLSession_ = - objc.ObjCProtocolListenableMethod( - _sel_URLSessionDidFinishEventsForBackgroundURLSession_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDataDelegate, - _sel_URLSessionDidFinishEventsForBackgroundURLSession_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( - (ffi.Pointer _, NSURLSession arg1) => func(arg1)), - (void Function(NSURLSession) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( - (ffi.Pointer _, NSURLSession arg1) => func(arg1)), - ); -} +const int CSSMERR_APPLETP_OCSP_RESP_MALFORMED_REQ = -2147408855; -late final _protocol_NSURLSessionDataDelegate = - objc.getProtocol("NSURLSessionDataDelegate"); -void _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_fnPtrTrampoline( - ffi.Pointer block, int arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -ffi.Pointer - _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, NSInteger)>( - _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_closureTrampoline( - ffi.Pointer block, int arg0) => - (objc.getBlockClosure(block) as void Function(int))(arg0); -ffi.Pointer - _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, NSInteger)>( - _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_closureTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_listenerTrampoline( - ffi.Pointer block, int arg0) { - (objc.getBlockClosure(block) as void Function(int))(arg0); - objc.objectRelease(block.cast()); -} +const int CSSMERR_APPLETP_OCSP_RESP_INTERNAL_ERR = -2147408854; -ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, NSInteger)> - _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_listenerCallable = ffi - .NativeCallable< - ffi.Void Function( - ffi.Pointer, NSInteger)>.listener( - _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_listenerTrampoline) - ..keepIsolateAlive = false; +const int CSSMERR_APPLETP_OCSP_RESP_TRY_LATER = -2147408853; -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSURLSessionResponseDisposition { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) => - objc.ObjCBlock(pointer, - retain: retain, release: release); +const int CSSMERR_APPLETP_OCSP_RESP_SIG_REQUIRED = -2147408852; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer( - ffi.Pointer> - ptr) => - objc.ObjCBlock( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_fnPtrCallable, - ptr.cast()), - retain: false, - release: true); +const int CSSMERR_APPLETP_OCSP_RESP_UNAUTHORIZED = -2147408851; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunction( - void Function(NSURLSessionResponseDisposition) fn) => - objc.ObjCBlock( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_closureCallable, - (int arg0) => - fn(NSURLSessionResponseDisposition.fromValue(arg0))), - retain: false, - release: true); +const int CSSMERR_APPLETP_OCSP_NONCE_MISMATCH = -2147408850; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock listener( - void Function(NSURLSessionResponseDisposition) fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_listenerCallable - .nativeFunction - .cast(), - (int arg0) => fn(NSURLSessionResponseDisposition.fromValue(arg0))); - final wrapper = _wrapListenerBlock_ci81hw(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock(wrapper, - retain: false, release: true); - } -} +const int CSSMERR_APPLETP_CS_BAD_CERT_CHAIN_LENGTH = -2147408849; -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSURLSessionResponseDisposition_CallExtension - on objc.ObjCBlock { - void call(NSURLSessionResponseDisposition arg0) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, NSInteger arg0)>>() - .asFunction, int)>()( - ref.pointer, arg0.value); -} +const int CSSMERR_APPLETP_CS_NO_BASIC_CONSTRAINTS = -2147408848; -late final _sel_URLSession_dataTask_didReceiveResponse_completionHandler_ = objc - .registerName("URLSession:dataTask:didReceiveResponse:completionHandler:"); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - arg0, arg1, arg2, arg3, arg4); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); - objc.objectRelease(block.cast()); -} +const int CSSMERR_APPLETP_CS_BAD_PATH_LENGTH = -2147408847; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_listenerTrampoline) - ..keepIsolateAlive = false; +const int CSSMERR_APPLETP_CS_NO_EXTENDED_KEY_USAGE = -2147408846; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSURLResponse, - objc.ObjCBlock)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSURLResponse, - objc.ObjCBlock)>(pointer, retain: retain, release: release); +const int CSSMERR_APPLETP_CODE_SIGN_DEVELOPMENT = -2147408845; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSURLResponse, - objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4)>> ptr) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSURLResponse, - objc.ObjCBlock)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int CSSMERR_APPLETP_RS_BAD_CERT_CHAIN_LENGTH = -2147408844; + +const int CSSMERR_APPLETP_RS_BAD_EXTENDED_KEY_USAGE = -2147408843; + +const int CSSMERR_APPLETP_TRUST_SETTING_DENY = -2147408842; + +const int CSSMERR_APPLETP_INVALID_EMPTY_SUBJECT = -2147408841; + +const int CSSMERR_APPLETP_UNKNOWN_QUAL_CERT_STATEMENT = -2147408840; + +const int CSSMERR_APPLETP_MISSING_REQUIRED_EXTENSION = -2147408839; + +const int CSSMERR_APPLETP_EXT_KEYUSAGE_NOT_CRITICAL = -2147408838; + +const int CSSMERR_APPLETP_IDENTIFIER_MISSING = -2147408837; + +const int CSSMERR_APPLETP_CA_PIN_MISMATCH = -2147408836; + +const int CSSMERR_APPLETP_LEAF_PIN_MISMATCH = -2147408835; + +const int CSSMERR_APPLE_DOTMAC_REQ_QUEUED = -2147408796; + +const int CSSMERR_APPLE_DOTMAC_REQ_REDIRECT = -2147408795; + +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ERR = -2147408794; + +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_PARAM = -2147408793; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)> - fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock) fn) => - objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4) => fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), - NSURLResponse.castFromPointer(arg3, retain: true, release: true), - ObjCBlock_ffiVoid_NSURLSessionResponseDisposition.castFromPointer(arg4, retain: true, release: true))), - retain: false, - release: true); +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_AUTH = -2147408792; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSURLResponse, - objc.ObjCBlock)> listener( - void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, - NSURLResponse, objc.ObjCBlock) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionDataTask.castFromPointer(arg2, - retain: false, release: true), - NSURLResponse.castFromPointer(arg3, - retain: false, release: true), - ObjCBlock_ffiVoid_NSURLSessionResponseDisposition - .castFromPointer(arg4, retain: false, release: true))); - final wrapper = _wrapListenerBlock_1nnj9ov(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSURLResponse, - objc.ObjCBlock)>(wrapper, - retain: false, release: true); - } -} +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_UNIMPL = -2147408791; -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLResponse, objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLResponse_ffiVoidNSURLSessionResponseDisposition_CallExtension - on objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSURLResponse, - objc.ObjCBlock)> { - void call( - ffi.Pointer arg0, - NSURLSession arg1, - NSURLSessionDataTask arg2, - NSURLResponse arg3, - objc.ObjCBlock arg4) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, - arg0, - arg1.ref.pointer, - arg2.ref.pointer, - arg3.ref.pointer, - arg4.ref.pointer); -} +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_NOT_AVAIL = -2147408790; -late final _sel_URLSession_dataTask_didBecomeDownloadTask_ = - objc.registerName("URLSession:dataTask:didBecomeDownloadTask:"); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); - objc.objectRelease(block.cast()); -} +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ALREADY_EXIST = -2147408789; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_listenerTrampoline) - ..keepIsolateAlive = false; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_SERVICE_ERROR = -2147408788; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, NSURLSessionDownloadTask)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, NSURLSessionDownloadTask)>(pointer, - retain: retain, release: release); +const int CSSMERR_APPLE_DOTMAC_REQ_IS_PENDING = -2147408787; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, NSURLSessionDownloadTask)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, NSURLSessionDownloadTask)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int CSSMERR_APPLE_DOTMAC_NO_REQ_PENDING = -2147408786; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask) fn) => - objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), - NSURLSessionDownloadTask.castFromPointer(arg3, retain: true, release: true))), - retain: false, - release: true); +const int CSSMERR_APPLE_DOTMAC_CSR_VERIFY_FAIL = -2147408785; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, NSURLSessionDownloadTask)> listener( - void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, - NSURLSessionDownloadTask) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionDataTask.castFromPointer(arg2, - retain: false, release: true), - NSURLSessionDownloadTask.castFromPointer(arg3, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_1a6kixf(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSURLSessionDownloadTask)>(wrapper, retain: false, release: true); - } -} +const int CSSMERR_APPLE_DOTMAC_FAILED_CONSISTENCY_CHECK = -2147408784; -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionDownloadTask)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionDownloadTask_CallExtension - on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, NSURLSessionDownloadTask)> { - void call(ffi.Pointer arg0, NSURLSession arg1, - NSURLSessionDataTask arg2, NSURLSessionDownloadTask arg3) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0, - arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); -} +const int CSSM_APPLEDL_OPEN_PARAMETERS_VERSION = 1; -late final _sel_URLSession_dataTask_didBecomeStreamTask_ = - objc.registerName("URLSession:dataTask:didBecomeStreamTask:"); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); - objc.objectRelease(block.cast()); -} +const int CSSM_APPLECSPDL_DB_LOCK = 0; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_listenerTrampoline) - ..keepIsolateAlive = false; +const int CSSM_APPLECSPDL_DB_UNLOCK = 1; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, NSURLSessionStreamTask)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, NSURLSessionStreamTask)>(pointer, - retain: retain, release: release); +const int CSSM_APPLECSPDL_DB_GET_SETTINGS = 2; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, NSURLSessionStreamTask)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, NSURLSessionStreamTask)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int CSSM_APPLECSPDL_DB_SET_SETTINGS = 3; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask) fn) => - objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), - NSURLSessionStreamTask.castFromPointer(arg3, retain: true, release: true))), - retain: false, - release: true); +const int CSSM_APPLECSPDL_DB_IS_LOCKED = 4; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, NSURLSessionStreamTask)> listener( - void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, - NSURLSessionStreamTask) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionDataTask.castFromPointer(arg2, - retain: false, release: true), - NSURLSessionStreamTask.castFromPointer(arg3, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_1a6kixf(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSURLSessionStreamTask)>(wrapper, retain: false, release: true); - } -} +const int CSSM_APPLECSPDL_DB_CHANGE_PASSWORD = 5; + +const int CSSM_APPLECSPDL_DB_GET_HANDLE = 6; + +const int CSSM_APPLESCPDL_CSP_GET_KEYHANDLE = 7; + +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_8 = 8; + +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_9 = 9; + +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_10 = 10; + +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_11 = 11; + +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_12 = 12; -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSURLSessionStreamTask)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSURLSessionStreamTask_CallExtension - on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, NSURLSessionStreamTask)> { - void call(ffi.Pointer arg0, NSURLSession arg1, - NSURLSessionDataTask arg2, NSURLSessionStreamTask arg3) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0, - arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); -} +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_13 = 13; -late final _sel_URLSession_dataTask_didReceiveData_ = - objc.registerName("URLSession:dataTask:didReceiveData:"); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); - objc.objectRelease(block.cast()); -} +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_14 = 14; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_listenerTrampoline) - ..keepIsolateAlive = false; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_15 = 15; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, objc.NSData)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, objc.NSData)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - objc.NSData)>(pointer, retain: retain, release: release); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_16 = 16; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, objc.NSData)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, objc.NSData)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_17 = 17; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, objc.NSData)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, objc.NSData) fn) => - objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, objc.NSData)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), - objc.NSData.castFromPointer(arg3, retain: true, release: true))), - retain: false, - release: true); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_18 = 18; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, objc.NSData)> listener( - void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, - objc.NSData) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionDataTask.castFromPointer(arg2, - retain: false, release: true), - objc.NSData.castFromPointer(arg3, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_1a6kixf(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - objc.NSData)>(wrapper, retain: false, release: true); - } -} +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_19 = 19; -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, objc.NSData)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSData_CallExtension - on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDataTask, objc.NSData)> { - void call(ffi.Pointer arg0, NSURLSession arg1, - NSURLSessionDataTask arg2, objc.NSData arg3) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0, - arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); -} +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_20 = 20; -late final _sel_URLSession_dataTask_willCacheResponse_completionHandler_ = objc - .registerName("URLSession:dataTask:willCacheResponse:completionHandler:"); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - arg0, arg1, arg2, arg3, arg4); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); - objc.objectRelease(block.cast()); -} +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_21 = 21; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_listenerTrampoline) - ..keepIsolateAlive = false; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_22 = 22; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSCachedURLResponse, - objc.ObjCBlock)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSCachedURLResponse, - objc.ObjCBlock)>(pointer, retain: retain, release: release); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_23 = 23; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSCachedURLResponse, - objc.ObjCBlock)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4)>> ptr) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSCachedURLResponse, - objc.ObjCBlock)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_24 = 24; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock)> - fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock) fn) => - objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4) => fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionDataTask.castFromPointer(arg2, retain: true, release: true), - NSCachedURLResponse.castFromPointer(arg3, retain: true, release: true), - ObjCBlock_ffiVoid_NSCachedURLResponse.castFromPointer(arg4, retain: true, release: true))), - retain: false, - release: true); +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_25 = 25; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSCachedURLResponse, - objc.ObjCBlock)> listener( - void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSCachedURLResponse, - objc.ObjCBlock) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionDataTask.castFromPointer(arg2, - retain: false, release: true), - NSCachedURLResponse.castFromPointer(arg3, - retain: false, release: true), - ObjCBlock_ffiVoid_NSCachedURLResponse.castFromPointer(arg4, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_1nnj9ov(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSCachedURLResponse, - objc.ObjCBlock)>( - wrapper, - retain: false, - release: true); - } -} +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_26 = 26; -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDataTask, NSCachedURLResponse, objc.ObjCBlock)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDataTask_NSCachedURLResponse_ffiVoidNSCachedURLResponse_CallExtension - on objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDataTask, - NSCachedURLResponse, - objc.ObjCBlock)> { - void call( - ffi.Pointer arg0, - NSURLSession arg1, - NSURLSessionDataTask arg2, - NSCachedURLResponse arg3, - objc.ObjCBlock arg4) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, - arg0, - arg1.ref.pointer, - arg2.ref.pointer, - arg3.ref.pointer, - arg4.ref.pointer); -} +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_27 = 27; + +const int CSSM_APPLECSP_KEYDIGEST = 256; + +const int CSSM_APPLECSP_PUBKEY = 257; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_APPLE_CUSTOM = 100; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSL = 101; + +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSH1 = 102; + +const int CSSM_ATTRIBUTE_VENDOR_DEFINED = 8388608; + +const int CSSM_ATTRIBUTE_PUBLIC_KEY = 1082130432; + +const int CSSM_ATTRIBUTE_FEE_PRIME_TYPE = 276824065; -/// Messages related to the operation of a task that writes data to a -/// file and notifies the delegate upon completion. -abstract final class NSURLSessionDownloadDelegate { - /// Builds an object that implements the NSURLSessionDownloadDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {required void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) - URLSession_downloadTask_didFinishDownloadingToURL_, - void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)? - URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, - void Function(NSURLSession, NSURLSessionDownloadTask, int, int)? - URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLSessionDownloadDelegate - .URLSession_downloadTask_didFinishDownloadingToURL_ - .implement(builder, URLSession_downloadTask_didFinishDownloadingToURL_); - NSURLSessionDownloadDelegate - .URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ - .implement(builder, - URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_); - NSURLSessionDownloadDelegate - .URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ - .implement(builder, - URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_); - NSURLSessionDownloadDelegate.URLSession_didCreateTask_.implement( - builder, URLSession_didCreateTask_); - NSURLSessionDownloadDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implement(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionDownloadDelegate.URLSession_taskIsWaitingForConnectivity_ - .implement(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionDownloadDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implement(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionDownloadDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implement( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionDownloadDelegate.URLSession_task_needNewBodyStream_.implement( - builder, URLSession_task_needNewBodyStream_); - NSURLSessionDownloadDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implement(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionDownloadDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implement(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionDownloadDelegate - .URLSession_task_didReceiveInformationalResponse_ - .implement(builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionDownloadDelegate.URLSession_task_didFinishCollectingMetrics_ - .implement(builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionDownloadDelegate.URLSession_task_didCompleteWithError_ - .implement(builder, URLSession_task_didCompleteWithError_); - NSURLSessionDownloadDelegate.URLSession_didBecomeInvalidWithError_ - .implement(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionDownloadDelegate - .URLSession_didReceiveChallenge_completionHandler_ - .implement(builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionDownloadDelegate - .URLSessionDidFinishEventsForBackgroundURLSession_ - .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); - return builder.build(); - } +const int CSSM_ATTRIBUTE_FEE_CURVE_TYPE = 276824066; - /// Adds the implementation of the NSURLSessionDownloadDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {required void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) - URLSession_downloadTask_didFinishDownloadingToURL_, - void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)? - URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, - void Function(NSURLSession, NSURLSessionDownloadTask, int, int)? - URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - NSURLSessionDownloadDelegate - .URLSession_downloadTask_didFinishDownloadingToURL_ - .implement(builder, URLSession_downloadTask_didFinishDownloadingToURL_); - NSURLSessionDownloadDelegate - .URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ - .implement(builder, - URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_); - NSURLSessionDownloadDelegate - .URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ - .implement(builder, - URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_); - NSURLSessionDownloadDelegate.URLSession_didCreateTask_.implement( - builder, URLSession_didCreateTask_); - NSURLSessionDownloadDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implement(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionDownloadDelegate.URLSession_taskIsWaitingForConnectivity_ - .implement(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionDownloadDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implement(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionDownloadDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implement( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionDownloadDelegate.URLSession_task_needNewBodyStream_.implement( - builder, URLSession_task_needNewBodyStream_); - NSURLSessionDownloadDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implement(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionDownloadDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implement(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionDownloadDelegate - .URLSession_task_didReceiveInformationalResponse_ - .implement(builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionDownloadDelegate.URLSession_task_didFinishCollectingMetrics_ - .implement(builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionDownloadDelegate.URLSession_task_didCompleteWithError_ - .implement(builder, URLSession_task_didCompleteWithError_); - NSURLSessionDownloadDelegate.URLSession_didBecomeInvalidWithError_ - .implement(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionDownloadDelegate - .URLSession_didReceiveChallenge_completionHandler_ - .implement(builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionDownloadDelegate - .URLSessionDidFinishEventsForBackgroundURLSession_ - .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); - } +const int CSSM_ATTRIBUTE_ASC_OPTIMIZATION = 276824067; - /// Builds an object that implements the NSURLSessionDownloadDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - static objc.ObjCObjectBase implementAsListener( - {required void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) - URLSession_downloadTask_didFinishDownloadingToURL_, - void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)? - URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, - void Function(NSURLSession, NSURLSessionDownloadTask, int, int)? - URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLSessionDownloadDelegate - .URLSession_downloadTask_didFinishDownloadingToURL_ - .implementAsListener( - builder, URLSession_downloadTask_didFinishDownloadingToURL_); - NSURLSessionDownloadDelegate - .URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ - .implementAsListener(builder, - URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_); - NSURLSessionDownloadDelegate - .URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ - .implementAsListener(builder, - URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_); - NSURLSessionDownloadDelegate.URLSession_didCreateTask_.implementAsListener( - builder, URLSession_didCreateTask_); - NSURLSessionDownloadDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionDownloadDelegate.URLSession_taskIsWaitingForConnectivity_ - .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionDownloadDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionDownloadDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionDownloadDelegate.URLSession_task_needNewBodyStream_ - .implementAsListener(builder, URLSession_task_needNewBodyStream_); - NSURLSessionDownloadDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implementAsListener(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionDownloadDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implementAsListener(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionDownloadDelegate - .URLSession_task_didReceiveInformationalResponse_ - .implementAsListener( - builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionDownloadDelegate.URLSession_task_didFinishCollectingMetrics_ - .implementAsListener( - builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionDownloadDelegate.URLSession_task_didCompleteWithError_ - .implementAsListener(builder, URLSession_task_didCompleteWithError_); - NSURLSessionDownloadDelegate.URLSession_didBecomeInvalidWithError_ - .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionDownloadDelegate - .URLSession_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionDownloadDelegate - .URLSessionDidFinishEventsForBackgroundURLSession_ - .implementAsListener( - builder, URLSessionDidFinishEventsForBackgroundURLSession_); - return builder.build(); - } +const int CSSM_ATTRIBUTE_RSA_BLINDING = 276824068; - /// Adds the implementation of the NSURLSessionDownloadDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, - {required void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) - URLSession_downloadTask_didFinishDownloadingToURL_, - void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)? - URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, - void Function(NSURLSession, NSURLSessionDownloadTask, int, int)? - URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - NSURLSessionDownloadDelegate - .URLSession_downloadTask_didFinishDownloadingToURL_ - .implementAsListener( - builder, URLSession_downloadTask_didFinishDownloadingToURL_); - NSURLSessionDownloadDelegate - .URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ - .implementAsListener(builder, - URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_); - NSURLSessionDownloadDelegate - .URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ - .implementAsListener(builder, - URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_); - NSURLSessionDownloadDelegate.URLSession_didCreateTask_.implementAsListener( - builder, URLSession_didCreateTask_); - NSURLSessionDownloadDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionDownloadDelegate.URLSession_taskIsWaitingForConnectivity_ - .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionDownloadDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionDownloadDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionDownloadDelegate.URLSession_task_needNewBodyStream_ - .implementAsListener(builder, URLSession_task_needNewBodyStream_); - NSURLSessionDownloadDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implementAsListener(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionDownloadDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implementAsListener(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionDownloadDelegate - .URLSession_task_didReceiveInformationalResponse_ - .implementAsListener( - builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionDownloadDelegate.URLSession_task_didFinishCollectingMetrics_ - .implementAsListener( - builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionDownloadDelegate.URLSession_task_didCompleteWithError_ - .implementAsListener(builder, URLSession_task_didCompleteWithError_); - NSURLSessionDownloadDelegate.URLSession_didBecomeInvalidWithError_ - .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionDownloadDelegate - .URLSession_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionDownloadDelegate - .URLSessionDidFinishEventsForBackgroundURLSession_ - .implementAsListener( - builder, URLSessionDidFinishEventsForBackgroundURLSession_); - } +const int CSSM_ATTRIBUTE_PARAM_KEY = 1082130437; - /// Sent when a download task that has completed a download. The delegate should - /// copy or move the file at the given location to a new location as it will be - /// removed when the delegate message returns. URLSession:task:didCompleteWithError: will - /// still be called. - static final URLSession_downloadTask_didFinishDownloadingToURL_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>( - _sel_URLSession_downloadTask_didFinishDownloadingToURL_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_downloadTask_didFinishDownloadingToURL_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionDownloadTask arg2, objc.NSURL arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionDownloadTask, objc.NSURL) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionDownloadTask arg2, objc.NSURL arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSM_ATTRIBUTE_PROMPT = 545259526; - /// Sent periodically to notify the delegate of download progress. - static final URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int)>( - _sel_URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64 - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionDownloadTask arg2, - int arg3, - int arg4, - int arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - (void Function(NSURLSession, NSURLSessionDownloadTask, int, int, int) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64 - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionDownloadTask arg2, - int arg3, - int arg4, - int arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - ); +const int CSSM_ATTRIBUTE_ALERT_TITLE = 545259527; - /// Sent when a download has been resumed. If a download failed with an - /// error, the -userInfo dictionary of the error will contain an - /// NSURLSessionDownloadTaskResumeData key, whose value is the resume - /// data. - static final URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionDownloadTask, int, int)>( - _sel_URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionDownloadTask, int, int) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64 - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionDownloadTask arg2, int arg3, int arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionDownloadTask, int, int) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64 - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionDownloadTask arg2, int arg3, int arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int CSSM_ATTRIBUTE_VERIFY_PASSPHRASE = 276824072; - /// Notification that a task has been created. This method is the first message - /// a task sends, providing a place to configure the task before it is resumed. - /// - /// This delegate callback is *NOT* dispatched to the delegate queue. It is - /// invoked synchronously before the task creation method returns. - static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask)>( - _sel_URLSession_didCreateTask_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_didCreateTask_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - ); +const int CSSM_FEE_PRIME_TYPE_DEFAULT = 0; + +const int CSSM_FEE_PRIME_TYPE_MERSENNE = 1; + +const int CSSM_FEE_PRIME_TYPE_FEE = 2; + +const int CSSM_FEE_PRIME_TYPE_GENERAL = 3; + +const int CSSM_FEE_CURVE_TYPE_DEFAULT = 0; + +const int CSSM_FEE_CURVE_TYPE_MONTGOMERY = 1; + +const int CSSM_FEE_CURVE_TYPE_WEIERSTRASS = 2; + +const int CSSM_FEE_CURVE_TYPE_ANSI_X9_62 = 3; + +const int CSSM_ASC_OPTIMIZE_DEFAULT = 0; + +const int CSSM_ASC_OPTIMIZE_SIZE = 1; + +const int CSSM_ASC_OPTIMIZE_SECURITY = 2; + +const int CSSM_ASC_OPTIMIZE_TIME = 3; + +const int CSSM_ASC_OPTIMIZE_TIME_SIZE = 4; + +const int CSSM_ASC_OPTIMIZE_ASCII = 5; - /// Sent when the system is ready to begin work for a task with a delayed start - /// time set (using the earliestBeginDate property). The completionHandler must - /// be invoked in order for loading to proceed. The disposition provided to the - /// completion handler continues the load with the original request provided to - /// the task, replaces the request with the specified task, or cancels the task. - /// If this delegate is not implemented, loading will proceed with the original - /// request. - /// - /// Recommendation: only implement this delegate if tasks that have the - /// earliestBeginDate property set may become stale and require alteration prior - /// to starting the network load. - /// - /// If a new request is specified, the allowsExpensiveNetworkAccess, - /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties - /// from the new request will not be used; the properties from the - /// original request will continue to be used. - /// - /// Canceling the task is equivalent to calling the task's cancel method; the - /// URLSession:task:didCompleteWithError: task delegate will be called with error - /// NSURLErrorCancelled. - static final URLSession_task_willBeginDelayedRequest_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)>( - _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLRequest arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLRequest arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int CSSM_KEYATTR_PARTIAL = 65536; - /// Sent when a task cannot start the network loading process because the current - /// network connectivity is not available or sufficient for the task's request. - /// - /// This delegate will be called at most one time per task, and is only called if - /// the waitsForConnectivity property in the NSURLSessionConfiguration has been - /// set to YES. - /// - /// This delegate callback will never be called for background sessions, because - /// the waitForConnectivity property is ignored by those sessions. - static final URLSession_taskIsWaitingForConnectivity_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask)>( - _sel_URLSession_taskIsWaitingForConnectivity_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_taskIsWaitingForConnectivity_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - ); +const int CSSM_KEYATTR_PUBLIC_KEY_ENCRYPT = 131072; - /// An HTTP request is attempting to perform a redirection to a different - /// URL. You must invoke the completion routine to allow the - /// redirection, allow the redirection with a modified request, or - /// pass nil to the completionHandler to cause the body of the redirection - /// response to be delivered as the payload of this request. The default - /// is to follow redirections. - /// - /// For tasks in background sessions, redirections will always be followed and this method will not be called. - static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)>( - _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSHTTPURLResponse arg3, - NSURLRequest arg4, - objc.ObjCBlock arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSHTTPURLResponse arg3, - NSURLRequest arg4, - objc.ObjCBlock arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - ); +const int CSSM_TP_ACTION_REQUIRE_CRL_PER_CERT = 1; - /// The task has received a request specific authentication challenge. - /// If this delegate is not implemented, the session specific authentication challenge - /// will *NOT* be called and the behavior will be the same as using the default handling - /// disposition. - static final URLSession_task_didReceiveChallenge_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)>( - _sel_URLSession_task_didReceiveChallenge_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_task_didReceiveChallenge_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLAuthenticationChallenge arg3, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLAuthenticationChallenge arg3, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int CSSM_TP_ACTION_FETCH_CRL_FROM_NET = 2; - /// Sent if a task requires a new, unopened body stream. This may be - /// necessary when authentication has failed for any request that - /// involves a body stream. - static final URLSession_task_needNewBodyStream_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock)>( - _sel_URLSession_task_needNewBodyStream_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_task_needNewBodyStream_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - objc.ObjCBlock - arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - objc.ObjCBlock - arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSM_TP_ACTION_CRL_SUFFICIENT = 4; - /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be - /// necessary when resuming a failed upload task. - /// - /// - Parameter session: The session containing the task that needs a new body stream from the given offset. - /// - Parameter task: The task that needs a new body stream. - /// - Parameter offset: The starting offset required for the body stream. - /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock)>( - _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - int arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - int arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int CSSM_TP_ACTION_REQUIRE_CRL_IF_PRESENT = 8; - /// Sent periodically to notify the delegate of upload progress. This - /// information is also available as properties of the task. - static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, int, int, int)>( - _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, int arg3, int arg4, int arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, int arg3, int arg4, int arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - ); +const int CSSM_TP_ACTION_ALLOW_EXPIRED = 1; - /// Sent for each informational response received except 101 switching protocols. - static final URLSession_task_didReceiveInformationalResponse_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( - _sel_URLSession_task_didReceiveInformationalResponse_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_task_didReceiveInformationalResponse_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSHTTPURLResponse arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSHTTPURLResponse arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSM_TP_ACTION_LEAF_IS_CA = 2; - /// Sent when complete statistics information has been collected for the task. - static final URLSession_task_didFinishCollectingMetrics_ = - objc.ObjCProtocolListenableMethod< - void Function( - NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( - _sel_URLSession_task_didFinishCollectingMetrics_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_task_didFinishCollectingMetrics_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSM_TP_ACTION_FETCH_CERT_FROM_NET = 4; - /// Sent as the last message related to a specific task. Error may be - /// nil, which implies that no error occurred and this task is complete. - static final URLSession_task_didCompleteWithError_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( - _sel_URLSession_task_didCompleteWithError_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_task_didCompleteWithError_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, objc.NSError? arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, objc.NSError? arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSM_TP_ACTION_ALLOW_EXPIRED_ROOT = 8; - /// The last message a session receives. A session will only become - /// invalid because of a systemic error or when it has been - /// explicitly invalidated, in which case the error parameter will be nil. - static final URLSession_didBecomeInvalidWithError_ = objc - .ObjCProtocolListenableMethod( - _sel_URLSession_didBecomeInvalidWithError_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_didBecomeInvalidWithError_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( - (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( - (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => - func(arg1, arg2)), - ); +const int CSSM_TP_ACTION_REQUIRE_REV_PER_CERT = 16; - /// If implemented, when a connection level authentication challenge - /// has occurred, this delegate will be given the opportunity to - /// provide authentication credentials to the underlying - /// connection. Some types of authentication will apply to more than - /// one request on a given connection to a server (SSL Server Trust - /// challenges). If this delegate message is not implemented, the - /// behavior will be to use the default handling, which may involve user - /// interaction. - static final URLSession_didReceiveChallenge_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock)>( - _sel_URLSession_didReceiveChallenge_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSession_didReceiveChallenge_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg3) => - func(arg1, arg2, arg3)), - ); +const int CSSM_TP_ACTION_TRUST_SETTINGS = 32; - /// If an application has received an - /// -application:handleEventsForBackgroundURLSession:completionHandler: - /// message, the session delegate will receive this message to indicate - /// that all messages previously enqueued for this session have been - /// delivered. At this time it is safe to invoke the previously stored - /// completion handler, or to begin any internal updates that will - /// result in invoking the completion handler. - static final URLSessionDidFinishEventsForBackgroundURLSession_ = - objc.ObjCProtocolListenableMethod( - _sel_URLSessionDidFinishEventsForBackgroundURLSession_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionDownloadDelegate, - _sel_URLSessionDidFinishEventsForBackgroundURLSession_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( - (ffi.Pointer _, NSURLSession arg1) => func(arg1)), - (void Function(NSURLSession) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( - (ffi.Pointer _, NSURLSession arg1) => func(arg1)), - ); -} +const int CSSM_TP_ACTION_IMPLICIT_ANCHORS = 64; -late final _protocol_NSURLSessionDownloadDelegate = - objc.getProtocol("NSURLSessionDownloadDelegate"); -late final _sel_URLSession_downloadTask_didFinishDownloadingToURL_ = - objc.registerName("URLSession:downloadTask:didFinishDownloadingToURL:"); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); - objc.objectRelease(block.cast()); -} +const int CSSM_CERT_STATUS_EXPIRED = 1; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerTrampoline) - ..keepIsolateAlive = false; +const int CSSM_CERT_STATUS_NOT_VALID_YET = 2; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, objc.NSURL)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDownloadTask, - objc.NSURL)>(pointer, retain: retain, release: release); +const int CSSM_CERT_STATUS_IS_IN_INPUT_CERTS = 4; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, objc.NSURL)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, objc.NSURL)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int CSSM_CERT_STATUS_IS_IN_ANCHORS = 8; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDownloadTask, objc.NSURL) fn) => - objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionDownloadTask.castFromPointer(arg2, retain: true, release: true), - objc.NSURL.castFromPointer(arg3, retain: true, release: true))), - retain: false, - release: true); +const int CSSM_CERT_STATUS_IS_ROOT = 16; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, objc.NSURL)> listener( - void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, objc.NSURL) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionDownloadTask.castFromPointer(arg2, - retain: false, release: true), - objc.NSURL - .castFromPointer(arg3, retain: false, release: true))); - final wrapper = _wrapListenerBlock_1a6kixf(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDownloadTask, - objc.NSURL)>(wrapper, retain: false, release: true); - } -} +const int CSSM_CERT_STATUS_IS_FROM_NET = 32; -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_NSURL_CallExtension - on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, objc.NSURL)> { - void call(ffi.Pointer arg0, NSURLSession arg1, - NSURLSessionDownloadTask arg2, objc.NSURL arg3) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0, - arg1.ref.pointer, arg2.ref.pointer, arg3.ref.pointer); -} +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_USER = 64; -late final _sel_URLSession_downloadTask_didWriteData_totalBytesWritten_totalBytesExpectedToWrite_ = - objc.registerName( - "URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:"); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, - int arg5) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Int64 arg3, - ffi.Int64 arg4, - ffi.Int64 arg5)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - int)>()(arg0, arg1, arg2, arg3, arg4, arg5); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64, - ffi.Int64)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, - int arg5) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - int))(arg0, arg1, arg2, arg3, arg4, arg5); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64, - ffi.Int64)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, - int arg5) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - int))(arg0, arg1, arg2, arg3, arg4, arg5); - objc.objectRelease(block.cast()); -} +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_ADMIN = 128; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64, - ffi.Int64)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64, - ffi.Int64)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_listenerTrampoline) - ..keepIsolateAlive = false; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_SYSTEM = 256; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64 { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDownloadTask, - ffi.Int64, - ffi.Int64, - ffi.Int64)>(pointer, retain: retain, release: release); +const int CSSM_CERT_STATUS_TRUST_SETTINGS_TRUST = 512; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDownloadTask, - ffi.Int64, - ffi.Int64, - ffi.Int64)> fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Int64 arg3, ffi.Int64 arg4, ffi.Int64 arg5)>> ptr) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int CSSM_CERT_STATUS_TRUST_SETTINGS_DENY = 1024; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDownloadTask, int, int, int) fn) => - objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, - int arg5) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionDownloadTask.castFromPointer(arg2, retain: true, release: true), - arg3, - arg4, - arg5)), - retain: false, - release: true); +const int CSSM_CERT_STATUS_TRUST_SETTINGS_IGNORED_ERROR = 2048; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)> listener( - void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, int, int, int) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4, - int arg5) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionDownloadTask.castFromPointer(arg2, - retain: false, release: true), - arg3, - arg4, - arg5)); - final wrapper = _wrapListenerBlock_jzggzf(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDownloadTask, - ffi.Int64, - ffi.Int64, - ffi.Int64)>(wrapper, retain: false, release: true); - } -} +const int CSSM_EVIDENCE_FORM_APPLE_HEADER = -2147483648; -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_Int64_CallExtension - on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, ffi.Int64, ffi.Int64, ffi.Int64)> { - void call(ffi.Pointer arg0, NSURLSession arg1, - NSURLSessionDownloadTask arg2, int arg3, int arg4, int arg5) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Int64 arg3, - ffi.Int64 arg4, - ffi.Int64 arg5)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - int)>()(ref.pointer, arg0, arg1.ref.pointer, - arg2.ref.pointer, arg3, arg4, arg5); -} +const int CSSM_EVIDENCE_FORM_APPLE_CERTGROUP = -2147483647; -late final _sel_URLSession_downloadTask_didResumeAtOffset_expectedTotalBytes_ = - objc.registerName( - "URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes:"); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Int64 arg3, - ffi.Int64 arg4)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int)>()(arg0, arg1, arg2, arg3, arg4); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int))(arg0, arg1, arg2, arg3, arg4); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - int arg4) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int))(arg0, arg1, arg2, arg3, arg4); - objc.objectRelease(block.cast()); -} +const int CSSM_EVIDENCE_FORM_APPLE_CERT_INFO = -2147483646; + +const int CSSM_APPLEX509CL_OBTAIN_CSR = 0; + +const int CSSM_APPLEX509CL_VERIFY_CSR = 1; + +const int kSecSubjectItemAttr = 1937072746; + +const int kSecIssuerItemAttr = 1769173877; + +const int kSecSerialNumberItemAttr = 1936614002; + +const int kSecPublicKeyHashItemAttr = 1752198009; + +const int kSecSubjectKeyIdentifierItemAttr = 1936419172; + +const int kSecCertTypeItemAttr = 1668577648; + +const int kSecCertEncodingItemAttr = 1667591779; + +const int SSL_NULL_WITH_NULL_NULL = 0; + +const int SSL_RSA_WITH_NULL_MD5 = 1; + +const int SSL_RSA_WITH_NULL_SHA = 2; + +const int SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3; + +const int SSL_RSA_WITH_RC4_128_MD5 = 4; + +const int SSL_RSA_WITH_RC4_128_SHA = 5; + +const int SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6; + +const int SSL_RSA_WITH_IDEA_CBC_SHA = 7; + +const int SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8; + +const int SSL_RSA_WITH_DES_CBC_SHA = 9; + +const int SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10; + +const int SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_listenerTrampoline) - ..keepIsolateAlive = false; +const int SSL_DH_DSS_WITH_DES_CBC_SHA = 12; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64 { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDownloadTask, - ffi.Int64, - ffi.Int64)>(pointer, retain: retain, release: release); +const int SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Int64 arg3, ffi.Int64 arg4)>> ptr) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> - fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionDownloadTask, int, int) fn) => - objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, int arg3, int arg4) => fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionDownloadTask.castFromPointer(arg2, retain: true, release: true), - arg3, - arg4)), - retain: false, - release: true); +const int SSL_DH_RSA_WITH_DES_CBC_SHA = 15; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> listener( - void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, int, int) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2, int arg3, int arg4) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionDownloadTask.castFromPointer(arg2, - retain: false, release: true), - arg3, - arg4)); - final wrapper = _wrapListenerBlock_1wl7fts(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionDownloadTask, - ffi.Int64, - ffi.Int64)>(wrapper, retain: false, release: true); - } -} +const int SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionDownloadTask_Int64_Int64_CallExtension - on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, ffi.Int64, ffi.Int64)> { - void call(ffi.Pointer arg0, NSURLSession arg1, - NSURLSessionDownloadTask arg2, int arg3, int arg4) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Int64 arg3, - ffi.Int64 arg4)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int)>()( - ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3, arg4); -} +const int SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17; -/// NSURLSessionStreamDelegate -abstract final class NSURLSessionStreamDelegate { - /// Builds an object that implements the NSURLSessionStreamDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {void Function(NSURLSession, NSURLSessionStreamTask)? - URLSession_readClosedForStreamTask_, - void Function(NSURLSession, NSURLSessionStreamTask)? - URLSession_writeClosedForStreamTask_, - void Function(NSURLSession, NSURLSessionStreamTask)? - URLSession_betterRouteDiscoveredForStreamTask_, - void Function(NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)? - URLSession_streamTask_didBecomeInputStream_outputStream_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function( - NSURLSession, NSURLSessionTask, objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLSessionStreamDelegate.URLSession_readClosedForStreamTask_.implement( - builder, URLSession_readClosedForStreamTask_); - NSURLSessionStreamDelegate.URLSession_writeClosedForStreamTask_.implement( - builder, URLSession_writeClosedForStreamTask_); - NSURLSessionStreamDelegate.URLSession_betterRouteDiscoveredForStreamTask_ - .implement(builder, URLSession_betterRouteDiscoveredForStreamTask_); - NSURLSessionStreamDelegate - .URLSession_streamTask_didBecomeInputStream_outputStream_ - .implement( - builder, URLSession_streamTask_didBecomeInputStream_outputStream_); - NSURLSessionStreamDelegate.URLSession_didCreateTask_.implement( - builder, URLSession_didCreateTask_); - NSURLSessionStreamDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implement(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionStreamDelegate.URLSession_taskIsWaitingForConnectivity_ - .implement(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionStreamDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implement(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionStreamDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implement( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionStreamDelegate.URLSession_task_needNewBodyStream_.implement( - builder, URLSession_task_needNewBodyStream_); - NSURLSessionStreamDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implement(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionStreamDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implement(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionStreamDelegate.URLSession_task_didReceiveInformationalResponse_ - .implement(builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionStreamDelegate.URLSession_task_didFinishCollectingMetrics_ - .implement(builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionStreamDelegate.URLSession_task_didCompleteWithError_.implement( - builder, URLSession_task_didCompleteWithError_); - NSURLSessionStreamDelegate.URLSession_didBecomeInvalidWithError_.implement( - builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionStreamDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implement(builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionStreamDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); - return builder.build(); - } +const int SSL_DHE_DSS_WITH_DES_CBC_SHA = 18; - /// Adds the implementation of the NSURLSessionStreamDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {void Function(NSURLSession, NSURLSessionStreamTask)? - URLSession_readClosedForStreamTask_, - void Function(NSURLSession, NSURLSessionStreamTask)? - URLSession_writeClosedForStreamTask_, - void Function(NSURLSession, NSURLSessionStreamTask)? - URLSession_betterRouteDiscoveredForStreamTask_, - void Function(NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)? - URLSession_streamTask_didBecomeInputStream_outputStream_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function( - NSURLSession, NSURLSessionTask, objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - NSURLSessionStreamDelegate.URLSession_readClosedForStreamTask_.implement( - builder, URLSession_readClosedForStreamTask_); - NSURLSessionStreamDelegate.URLSession_writeClosedForStreamTask_.implement( - builder, URLSession_writeClosedForStreamTask_); - NSURLSessionStreamDelegate.URLSession_betterRouteDiscoveredForStreamTask_ - .implement(builder, URLSession_betterRouteDiscoveredForStreamTask_); - NSURLSessionStreamDelegate - .URLSession_streamTask_didBecomeInputStream_outputStream_ - .implement( - builder, URLSession_streamTask_didBecomeInputStream_outputStream_); - NSURLSessionStreamDelegate.URLSession_didCreateTask_.implement( - builder, URLSession_didCreateTask_); - NSURLSessionStreamDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implement(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionStreamDelegate.URLSession_taskIsWaitingForConnectivity_ - .implement(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionStreamDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implement(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionStreamDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implement( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionStreamDelegate.URLSession_task_needNewBodyStream_.implement( - builder, URLSession_task_needNewBodyStream_); - NSURLSessionStreamDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implement(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionStreamDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implement(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionStreamDelegate.URLSession_task_didReceiveInformationalResponse_ - .implement(builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionStreamDelegate.URLSession_task_didFinishCollectingMetrics_ - .implement(builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionStreamDelegate.URLSession_task_didCompleteWithError_.implement( - builder, URLSession_task_didCompleteWithError_); - NSURLSessionStreamDelegate.URLSession_didBecomeInvalidWithError_.implement( - builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionStreamDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implement(builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionStreamDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); - } +const int SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; - /// Builds an object that implements the NSURLSessionStreamDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - static objc.ObjCObjectBase implementAsListener( - {void Function(NSURLSession, NSURLSessionStreamTask)? - URLSession_readClosedForStreamTask_, - void Function(NSURLSession, NSURLSessionStreamTask)? - URLSession_writeClosedForStreamTask_, - void Function(NSURLSession, NSURLSessionStreamTask)? - URLSession_betterRouteDiscoveredForStreamTask_, - void Function(NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)? - URLSession_streamTask_didBecomeInputStream_outputStream_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function( - NSURLSession, NSURLSessionTask, objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLSessionStreamDelegate.URLSession_readClosedForStreamTask_ - .implementAsListener(builder, URLSession_readClosedForStreamTask_); - NSURLSessionStreamDelegate.URLSession_writeClosedForStreamTask_ - .implementAsListener(builder, URLSession_writeClosedForStreamTask_); - NSURLSessionStreamDelegate.URLSession_betterRouteDiscoveredForStreamTask_ - .implementAsListener( - builder, URLSession_betterRouteDiscoveredForStreamTask_); - NSURLSessionStreamDelegate - .URLSession_streamTask_didBecomeInputStream_outputStream_ - .implementAsListener( - builder, URLSession_streamTask_didBecomeInputStream_outputStream_); - NSURLSessionStreamDelegate.URLSession_didCreateTask_.implementAsListener( - builder, URLSession_didCreateTask_); - NSURLSessionStreamDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionStreamDelegate.URLSession_taskIsWaitingForConnectivity_ - .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionStreamDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionStreamDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionStreamDelegate.URLSession_task_needNewBodyStream_ - .implementAsListener(builder, URLSession_task_needNewBodyStream_); - NSURLSessionStreamDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implementAsListener(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionStreamDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implementAsListener(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionStreamDelegate.URLSession_task_didReceiveInformationalResponse_ - .implementAsListener( - builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionStreamDelegate.URLSession_task_didFinishCollectingMetrics_ - .implementAsListener( - builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionStreamDelegate.URLSession_task_didCompleteWithError_ - .implementAsListener(builder, URLSession_task_didCompleteWithError_); - NSURLSessionStreamDelegate.URLSession_didBecomeInvalidWithError_ - .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionStreamDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionStreamDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implementAsListener( - builder, URLSessionDidFinishEventsForBackgroundURLSession_); - return builder.build(); - } +const int SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20; - /// Adds the implementation of the NSURLSessionStreamDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, - {void Function(NSURLSession, NSURLSessionStreamTask)? - URLSession_readClosedForStreamTask_, - void Function(NSURLSession, NSURLSessionStreamTask)? - URLSession_writeClosedForStreamTask_, - void Function(NSURLSession, NSURLSessionStreamTask)? - URLSession_betterRouteDiscoveredForStreamTask_, - void Function(NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)? - URLSession_streamTask_didBecomeInputStream_outputStream_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function( - NSURLSession, NSURLSessionTask, objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - NSURLSessionStreamDelegate.URLSession_readClosedForStreamTask_ - .implementAsListener(builder, URLSession_readClosedForStreamTask_); - NSURLSessionStreamDelegate.URLSession_writeClosedForStreamTask_ - .implementAsListener(builder, URLSession_writeClosedForStreamTask_); - NSURLSessionStreamDelegate.URLSession_betterRouteDiscoveredForStreamTask_ - .implementAsListener( - builder, URLSession_betterRouteDiscoveredForStreamTask_); - NSURLSessionStreamDelegate - .URLSession_streamTask_didBecomeInputStream_outputStream_ - .implementAsListener( - builder, URLSession_streamTask_didBecomeInputStream_outputStream_); - NSURLSessionStreamDelegate.URLSession_didCreateTask_.implementAsListener( - builder, URLSession_didCreateTask_); - NSURLSessionStreamDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionStreamDelegate.URLSession_taskIsWaitingForConnectivity_ - .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionStreamDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionStreamDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionStreamDelegate.URLSession_task_needNewBodyStream_ - .implementAsListener(builder, URLSession_task_needNewBodyStream_); - NSURLSessionStreamDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implementAsListener(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionStreamDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implementAsListener(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionStreamDelegate.URLSession_task_didReceiveInformationalResponse_ - .implementAsListener( - builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionStreamDelegate.URLSession_task_didFinishCollectingMetrics_ - .implementAsListener( - builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionStreamDelegate.URLSession_task_didCompleteWithError_ - .implementAsListener(builder, URLSession_task_didCompleteWithError_); - NSURLSessionStreamDelegate.URLSession_didBecomeInvalidWithError_ - .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionStreamDelegate.URLSession_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionStreamDelegate.URLSessionDidFinishEventsForBackgroundURLSession_ - .implementAsListener( - builder, URLSessionDidFinishEventsForBackgroundURLSession_); - } +const int SSL_DHE_RSA_WITH_DES_CBC_SHA = 21; - /// Indicates that the read side of a connection has been closed. Any - /// outstanding reads complete, but future reads will immediately fail. - /// This may be sent even when no reads are in progress. However, when - /// this delegate message is received, there may still be bytes - /// available. You only know that no more bytes are available when you - /// are able to read until EOF. - static final URLSession_readClosedForStreamTask_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionStreamTask)>( - _sel_URLSession_readClosedForStreamTask_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_readClosedForStreamTask_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionStreamTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionStreamTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionStreamTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionStreamTask arg2) => - func(arg1, arg2)), - ); +const int SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; - /// Indicates that the write side of a connection has been closed. - /// Any outstanding writes complete, but future writes will immediately - /// fail. - static final URLSession_writeClosedForStreamTask_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionStreamTask)>( - _sel_URLSession_writeClosedForStreamTask_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_writeClosedForStreamTask_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionStreamTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionStreamTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionStreamTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionStreamTask arg2) => - func(arg1, arg2)), - ); +const int SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23; - /// A notification that the system has determined that a better route - /// to the host has been detected (eg, a wi-fi interface becoming - /// available.) This is a hint to the delegate that it may be - /// desirable to create a new task for subsequent work. Note that - /// there is no guarantee that the future task will be able to connect - /// to the host, so callers should should be prepared for failure of - /// reads and writes over any new interface. - static final URLSession_betterRouteDiscoveredForStreamTask_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionStreamTask)>( - _sel_URLSession_betterRouteDiscoveredForStreamTask_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_betterRouteDiscoveredForStreamTask_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionStreamTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionStreamTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionStreamTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionStreamTask arg2) => - func(arg1, arg2)), - ); +const int SSL_DH_anon_WITH_RC4_128_MD5 = 24; - /// The given task has been completed, and unopened NSInputStream and - /// NSOutputStream objects are created from the underlying network - /// connection. This will only be invoked after all enqueued IO has - /// completed (including any necessary handshakes.) The streamTask - /// will not receive any further delegate messages. - static final URLSession_streamTask_didBecomeInputStream_outputStream_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionStreamTask, - objc.NSInputStream, objc.NSOutputStream)>( - _sel_URLSession_streamTask_didBecomeInputStream_outputStream_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_streamTask_didBecomeInputStream_outputStream_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, - objc.NSOutputStream) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionStreamTask arg2, - objc.NSInputStream arg3, - objc.NSOutputStream arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, - objc.NSOutputStream) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionStreamTask arg2, - objc.NSInputStream arg3, - objc.NSOutputStream arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25; - /// Notification that a task has been created. This method is the first message - /// a task sends, providing a place to configure the task before it is resumed. - /// - /// This delegate callback is *NOT* dispatched to the delegate queue. It is - /// invoked synchronously before the task creation method returns. - static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask)>( - _sel_URLSession_didCreateTask_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_didCreateTask_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - ); +const int SSL_DH_anon_WITH_DES_CBC_SHA = 26; - /// Sent when the system is ready to begin work for a task with a delayed start - /// time set (using the earliestBeginDate property). The completionHandler must - /// be invoked in order for loading to proceed. The disposition provided to the - /// completion handler continues the load with the original request provided to - /// the task, replaces the request with the specified task, or cancels the task. - /// If this delegate is not implemented, loading will proceed with the original - /// request. - /// - /// Recommendation: only implement this delegate if tasks that have the - /// earliestBeginDate property set may become stale and require alteration prior - /// to starting the network load. - /// - /// If a new request is specified, the allowsExpensiveNetworkAccess, - /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties - /// from the new request will not be used; the properties from the - /// original request will continue to be used. - /// - /// Canceling the task is equivalent to calling the task's cancel method; the - /// URLSession:task:didCompleteWithError: task delegate will be called with error - /// NSURLErrorCancelled. - static final URLSession_task_willBeginDelayedRequest_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)>( - _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLRequest arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLRequest arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; + +const int SSL_FORTEZZA_DMS_WITH_NULL_SHA = 28; + +const int SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = 29; + +const int TLS_RSA_WITH_AES_128_CBC_SHA = 47; + +const int TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48; + +const int TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49; - /// Sent when a task cannot start the network loading process because the current - /// network connectivity is not available or sufficient for the task's request. - /// - /// This delegate will be called at most one time per task, and is only called if - /// the waitsForConnectivity property in the NSURLSessionConfiguration has been - /// set to YES. - /// - /// This delegate callback will never be called for background sessions, because - /// the waitForConnectivity property is ignored by those sessions. - static final URLSession_taskIsWaitingForConnectivity_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask)>( - _sel_URLSession_taskIsWaitingForConnectivity_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_taskIsWaitingForConnectivity_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - ); +const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50; - /// An HTTP request is attempting to perform a redirection to a different - /// URL. You must invoke the completion routine to allow the - /// redirection, allow the redirection with a modified request, or - /// pass nil to the completionHandler to cause the body of the redirection - /// response to be delivered as the payload of this request. The default - /// is to follow redirections. - /// - /// For tasks in background sessions, redirections will always be followed and this method will not be called. - static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)>( - _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSHTTPURLResponse arg3, - NSURLRequest arg4, - objc.ObjCBlock arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSHTTPURLResponse arg3, - NSURLRequest arg4, - objc.ObjCBlock arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - ); +const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51; - /// The task has received a request specific authentication challenge. - /// If this delegate is not implemented, the session specific authentication challenge - /// will *NOT* be called and the behavior will be the same as using the default handling - /// disposition. - static final URLSession_task_didReceiveChallenge_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)>( - _sel_URLSession_task_didReceiveChallenge_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_task_didReceiveChallenge_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLAuthenticationChallenge arg3, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLAuthenticationChallenge arg3, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int TLS_DH_anon_WITH_AES_128_CBC_SHA = 52; - /// Sent if a task requires a new, unopened body stream. This may be - /// necessary when authentication has failed for any request that - /// involves a body stream. - static final URLSession_task_needNewBodyStream_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock)>( - _sel_URLSession_task_needNewBodyStream_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_task_needNewBodyStream_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - objc.ObjCBlock - arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - objc.ObjCBlock - arg3) => - func(arg1, arg2, arg3)), - ); +const int TLS_RSA_WITH_AES_256_CBC_SHA = 53; - /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be - /// necessary when resuming a failed upload task. - /// - /// - Parameter session: The session containing the task that needs a new body stream from the given offset. - /// - Parameter task: The task that needs a new body stream. - /// - Parameter offset: The starting offset required for the body stream. - /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock)>( - _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - int arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - int arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54; - /// Sent periodically to notify the delegate of upload progress. This - /// information is also available as properties of the task. - static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, int, int, int)>( - _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, int arg3, int arg4, int arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, int arg3, int arg4, int arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - ); +const int TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55; - /// Sent for each informational response received except 101 switching protocols. - static final URLSession_task_didReceiveInformationalResponse_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( - _sel_URLSession_task_didReceiveInformationalResponse_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_task_didReceiveInformationalResponse_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSHTTPURLResponse arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSHTTPURLResponse arg3) => - func(arg1, arg2, arg3)), - ); +const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56; - /// Sent when complete statistics information has been collected for the task. - static final URLSession_task_didFinishCollectingMetrics_ = - objc.ObjCProtocolListenableMethod< - void Function( - NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( - _sel_URLSession_task_didFinishCollectingMetrics_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_task_didFinishCollectingMetrics_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => - func(arg1, arg2, arg3)), - ); +const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57; - /// Sent as the last message related to a specific task. Error may be - /// nil, which implies that no error occurred and this task is complete. - static final URLSession_task_didCompleteWithError_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( - _sel_URLSession_task_didCompleteWithError_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_task_didCompleteWithError_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, objc.NSError? arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, objc.NSError? arg3) => - func(arg1, arg2, arg3)), - ); +const int TLS_DH_anon_WITH_AES_256_CBC_SHA = 58; - /// The last message a session receives. A session will only become - /// invalid because of a systemic error or when it has been - /// explicitly invalidated, in which case the error parameter will be nil. - static final URLSession_didBecomeInvalidWithError_ = objc - .ObjCProtocolListenableMethod( - _sel_URLSession_didBecomeInvalidWithError_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_didBecomeInvalidWithError_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( - (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( - (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => - func(arg1, arg2)), - ); +const int TLS_ECDH_ECDSA_WITH_NULL_SHA = -16383; - /// If implemented, when a connection level authentication challenge - /// has occurred, this delegate will be given the opportunity to - /// provide authentication credentials to the underlying - /// connection. Some types of authentication will apply to more than - /// one request on a given connection to a server (SSL Server Trust - /// challenges). If this delegate message is not implemented, the - /// behavior will be to use the default handling, which may involve user - /// interaction. - static final URLSession_didReceiveChallenge_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock)>( - _sel_URLSession_didReceiveChallenge_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSession_didReceiveChallenge_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg3) => - func(arg1, arg2, arg3)), - ); +const int TLS_ECDH_ECDSA_WITH_RC4_128_SHA = -16382; - /// If an application has received an - /// -application:handleEventsForBackgroundURLSession:completionHandler: - /// message, the session delegate will receive this message to indicate - /// that all messages previously enqueued for this session have been - /// delivered. At this time it is safe to invoke the previously stored - /// completion handler, or to begin any internal updates that will - /// result in invoking the completion handler. - static final URLSessionDidFinishEventsForBackgroundURLSession_ = - objc.ObjCProtocolListenableMethod( - _sel_URLSessionDidFinishEventsForBackgroundURLSession_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionStreamDelegate, - _sel_URLSessionDidFinishEventsForBackgroundURLSession_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( - (ffi.Pointer _, NSURLSession arg1) => func(arg1)), - (void Function(NSURLSession) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( - (ffi.Pointer _, NSURLSession arg1) => func(arg1)), - ); -} +const int TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = -16381; -late final _protocol_NSURLSessionStreamDelegate = - objc.getProtocol("NSURLSessionStreamDelegate"); -late final _sel_URLSession_readClosedForStreamTask_ = - objc.registerName("URLSession:readClosedForStreamTask:"); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); - objc.objectRelease(block.cast()); -} +const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = -16380; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_listenerTrampoline) - ..keepIsolateAlive = false; +const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = -16379; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, NSURLSession, NSURLSessionStreamTask)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionStreamTask)>(pointer, - retain: retain, release: release); +const int TLS_ECDHE_ECDSA_WITH_NULL_SHA = -16378; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) => - objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = -16377; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask)> - fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionStreamTask) fn) => - objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionStreamTask.castFromPointer(arg2, retain: true, release: true))), - retain: false, - release: true); +const int TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; + +const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; + +const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; + +const int TLS_ECDH_RSA_WITH_NULL_SHA = -16373; + +const int TLS_ECDH_RSA_WITH_RC4_128_SHA = -16372; + +const int TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = -16371; + +const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = -16370; + +const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = -16369; + +const int TLS_ECDHE_RSA_WITH_NULL_SHA = -16368; + +const int TLS_ECDHE_RSA_WITH_RC4_128_SHA = -16367; + +const int TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; + +const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; + +const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; + +const int TLS_ECDH_anon_WITH_NULL_SHA = -16363; + +const int TLS_ECDH_anon_WITH_RC4_128_SHA = -16362; + +const int TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = -16361; + +const int TLS_ECDH_anon_WITH_AES_128_CBC_SHA = -16360; + +const int TLS_ECDH_anon_WITH_AES_256_CBC_SHA = -16359; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionStreamTask)> listener( - void Function(ffi.Pointer, NSURLSession, NSURLSessionStreamTask) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionStreamTask.castFromPointer(arg2, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_tm2na8(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionStreamTask)>(wrapper, retain: false, release: true); - } -} +const int TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = -16331; -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_CallExtension - on objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, NSURLSession, NSURLSessionStreamTask)> { - void call(ffi.Pointer arg0, NSURLSession arg1, - NSURLSessionStreamTask arg2) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer); -} +const int TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = -16330; -late final _sel_URLSession_writeClosedForStreamTask_ = - objc.registerName("URLSession:writeClosedForStreamTask:"); -late final _sel_URLSession_betterRouteDiscoveredForStreamTask_ = - objc.registerName("URLSession:betterRouteDiscoveredForStreamTask:"); -late final _sel_URLSession_streamTask_didBecomeInputStream_outputStream_ = objc - .registerName("URLSession:streamTask:didBecomeInputStream:outputStream:"); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - arg0, arg1, arg2, arg3, arg4); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); - objc.objectRelease(block.cast()); -} +const int TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = -13141; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_listenerTrampoline) - ..keepIsolateAlive = false; +const int TLS_NULL_WITH_NULL_NULL = 0; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionStreamTask, - objc.NSInputStream, - objc.NSOutputStream)>(pointer, retain: retain, release: release); +const int TLS_RSA_WITH_NULL_MD5 = 1; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3, ffi.Pointer arg4)>> ptr) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionStreamTask, - objc.NSInputStream, - objc.NSOutputStream)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int TLS_RSA_WITH_NULL_SHA = 2; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream) fn) => - objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionStreamTask.castFromPointer(arg2, retain: true, release: true), - objc.NSInputStream.castFromPointer(arg3, retain: true, release: true), - objc.NSOutputStream.castFromPointer(arg4, retain: true, release: true))), - retain: false, - release: true); +const int TLS_RSA_WITH_RC4_128_MD5 = 4; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionStreamTask, - objc.NSInputStream, - objc.NSOutputStream)> listener( - void Function(ffi.Pointer, NSURLSession, NSURLSessionStreamTask, - objc.NSInputStream, objc.NSOutputStream) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionStreamTask.castFromPointer(arg2, - retain: false, release: true), - objc.NSInputStream.castFromPointer(arg3, - retain: false, release: true), - objc.NSOutputStream.castFromPointer(arg4, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_no6pyg(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionStreamTask, - objc.NSInputStream, - objc.NSOutputStream)>(wrapper, retain: false, release: true); - } -} +const int TLS_RSA_WITH_RC4_128_SHA = 5; -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionStreamTask_NSInputStream_NSOutputStream_CallExtension - on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionStreamTask, objc.NSInputStream, objc.NSOutputStream)> { - void call( - ffi.Pointer arg0, - NSURLSession arg1, - NSURLSessionStreamTask arg2, - objc.NSInputStream arg3, - objc.NSOutputStream arg4) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3, - ffi.Pointer arg4)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, - arg0, - arg1.ref.pointer, - arg2.ref.pointer, - arg3.ref.pointer, - arg4.ref.pointer); -} +const int TLS_RSA_WITH_3DES_EDE_CBC_SHA = 10; -/// NSURLSessionWebSocketDelegate -abstract final class NSURLSessionWebSocketDelegate { - /// Builds an object that implements the NSURLSessionWebSocketDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)? - URLSession_webSocketTask_didOpenWithProtocol_, - void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?)? - URLSession_webSocketTask_didCloseWithCode_reason_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function( - NSURLSession, NSURLSessionTask, objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLSessionWebSocketDelegate.URLSession_webSocketTask_didOpenWithProtocol_ - .implement(builder, URLSession_webSocketTask_didOpenWithProtocol_); - NSURLSessionWebSocketDelegate - .URLSession_webSocketTask_didCloseWithCode_reason_ - .implement(builder, URLSession_webSocketTask_didCloseWithCode_reason_); - NSURLSessionWebSocketDelegate.URLSession_didCreateTask_.implement( - builder, URLSession_didCreateTask_); - NSURLSessionWebSocketDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implement(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionWebSocketDelegate.URLSession_taskIsWaitingForConnectivity_ - .implement(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionWebSocketDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implement(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionWebSocketDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implement( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionWebSocketDelegate.URLSession_task_needNewBodyStream_.implement( - builder, URLSession_task_needNewBodyStream_); - NSURLSessionWebSocketDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implement(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionWebSocketDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implement(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionWebSocketDelegate - .URLSession_task_didReceiveInformationalResponse_ - .implement(builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionWebSocketDelegate.URLSession_task_didFinishCollectingMetrics_ - .implement(builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionWebSocketDelegate.URLSession_task_didCompleteWithError_ - .implement(builder, URLSession_task_didCompleteWithError_); - NSURLSessionWebSocketDelegate.URLSession_didBecomeInvalidWithError_ - .implement(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionWebSocketDelegate - .URLSession_didReceiveChallenge_completionHandler_ - .implement(builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionWebSocketDelegate - .URLSessionDidFinishEventsForBackgroundURLSession_ - .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); - return builder.build(); - } +const int TLS_RSA_WITH_NULL_SHA256 = 59; - /// Adds the implementation of the NSURLSessionWebSocketDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)? - URLSession_webSocketTask_didOpenWithProtocol_, - void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?)? - URLSession_webSocketTask_didCloseWithCode_reason_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function( - NSURLSession, NSURLSessionTask, objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - NSURLSessionWebSocketDelegate.URLSession_webSocketTask_didOpenWithProtocol_ - .implement(builder, URLSession_webSocketTask_didOpenWithProtocol_); - NSURLSessionWebSocketDelegate - .URLSession_webSocketTask_didCloseWithCode_reason_ - .implement(builder, URLSession_webSocketTask_didCloseWithCode_reason_); - NSURLSessionWebSocketDelegate.URLSession_didCreateTask_.implement( - builder, URLSession_didCreateTask_); - NSURLSessionWebSocketDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implement(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionWebSocketDelegate.URLSession_taskIsWaitingForConnectivity_ - .implement(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionWebSocketDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implement(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionWebSocketDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implement( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionWebSocketDelegate.URLSession_task_needNewBodyStream_.implement( - builder, URLSession_task_needNewBodyStream_); - NSURLSessionWebSocketDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implement(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionWebSocketDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implement(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionWebSocketDelegate - .URLSession_task_didReceiveInformationalResponse_ - .implement(builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionWebSocketDelegate.URLSession_task_didFinishCollectingMetrics_ - .implement(builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionWebSocketDelegate.URLSession_task_didCompleteWithError_ - .implement(builder, URLSession_task_didCompleteWithError_); - NSURLSessionWebSocketDelegate.URLSession_didBecomeInvalidWithError_ - .implement(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionWebSocketDelegate - .URLSession_didReceiveChallenge_completionHandler_ - .implement(builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionWebSocketDelegate - .URLSessionDidFinishEventsForBackgroundURLSession_ - .implement(builder, URLSessionDidFinishEventsForBackgroundURLSession_); - } +const int TLS_RSA_WITH_AES_128_CBC_SHA256 = 60; - /// Builds an object that implements the NSURLSessionWebSocketDelegate protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - static objc.ObjCObjectBase implementAsListener( - {void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)? - URLSession_webSocketTask_didOpenWithProtocol_, - void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?)? - URLSession_webSocketTask_didCloseWithCode_reason_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function( - NSURLSession, NSURLSessionTask, objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLSessionWebSocketDelegate.URLSession_webSocketTask_didOpenWithProtocol_ - .implementAsListener( - builder, URLSession_webSocketTask_didOpenWithProtocol_); - NSURLSessionWebSocketDelegate - .URLSession_webSocketTask_didCloseWithCode_reason_ - .implementAsListener( - builder, URLSession_webSocketTask_didCloseWithCode_reason_); - NSURLSessionWebSocketDelegate.URLSession_didCreateTask_.implementAsListener( - builder, URLSession_didCreateTask_); - NSURLSessionWebSocketDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionWebSocketDelegate.URLSession_taskIsWaitingForConnectivity_ - .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionWebSocketDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionWebSocketDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionWebSocketDelegate.URLSession_task_needNewBodyStream_ - .implementAsListener(builder, URLSession_task_needNewBodyStream_); - NSURLSessionWebSocketDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implementAsListener(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionWebSocketDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implementAsListener(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionWebSocketDelegate - .URLSession_task_didReceiveInformationalResponse_ - .implementAsListener( - builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionWebSocketDelegate.URLSession_task_didFinishCollectingMetrics_ - .implementAsListener( - builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionWebSocketDelegate.URLSession_task_didCompleteWithError_ - .implementAsListener(builder, URLSession_task_didCompleteWithError_); - NSURLSessionWebSocketDelegate.URLSession_didBecomeInvalidWithError_ - .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionWebSocketDelegate - .URLSession_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionWebSocketDelegate - .URLSessionDidFinishEventsForBackgroundURLSession_ - .implementAsListener( - builder, URLSessionDidFinishEventsForBackgroundURLSession_); - return builder.build(); - } +const int TLS_RSA_WITH_AES_256_CBC_SHA256 = 61; + +const int TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; + +const int TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; + +const int TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; + +const int TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; - /// Adds the implementation of the NSURLSessionWebSocketDelegate protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, - {void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)? - URLSession_webSocketTask_didOpenWithProtocol_, - void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?)? - URLSession_webSocketTask_didCloseWithCode_reason_, - void Function(NSURLSession, NSURLSessionTask)? URLSession_didCreateTask_, - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)? - URLSession_task_willBeginDelayedRequest_completionHandler_, - void Function(NSURLSession, NSURLSessionTask)? - URLSession_taskIsWaitingForConnectivity_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)? - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)? - URLSession_task_didReceiveChallenge_completionHandler_, - void Function( - NSURLSession, NSURLSessionTask, objc.ObjCBlock)? - URLSession_task_needNewBodyStream_, - void Function(NSURLSession, NSURLSessionTask, int, objc.ObjCBlock)? URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - void Function(NSURLSession, NSURLSessionTask, int, int, int)? URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)? URLSession_task_didReceiveInformationalResponse_, - void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)? URLSession_task_didFinishCollectingMetrics_, - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)? URLSession_task_didCompleteWithError_, - void Function(NSURLSession, objc.NSError?)? URLSession_didBecomeInvalidWithError_, - void Function(NSURLSession, NSURLAuthenticationChallenge, objc.ObjCBlock)? URLSession_didReceiveChallenge_completionHandler_, - void Function(NSURLSession)? URLSessionDidFinishEventsForBackgroundURLSession_}) { - NSURLSessionWebSocketDelegate.URLSession_webSocketTask_didOpenWithProtocol_ - .implementAsListener( - builder, URLSession_webSocketTask_didOpenWithProtocol_); - NSURLSessionWebSocketDelegate - .URLSession_webSocketTask_didCloseWithCode_reason_ - .implementAsListener( - builder, URLSession_webSocketTask_didCloseWithCode_reason_); - NSURLSessionWebSocketDelegate.URLSession_didCreateTask_.implementAsListener( - builder, URLSession_didCreateTask_); - NSURLSessionWebSocketDelegate - .URLSession_task_willBeginDelayedRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willBeginDelayedRequest_completionHandler_); - NSURLSessionWebSocketDelegate.URLSession_taskIsWaitingForConnectivity_ - .implementAsListener(builder, URLSession_taskIsWaitingForConnectivity_); - NSURLSessionWebSocketDelegate - .URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ - .implementAsListener(builder, - URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_); - NSURLSessionWebSocketDelegate - .URLSession_task_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_task_didReceiveChallenge_completionHandler_); - NSURLSessionWebSocketDelegate.URLSession_task_needNewBodyStream_ - .implementAsListener(builder, URLSession_task_needNewBodyStream_); - NSURLSessionWebSocketDelegate - .URLSession_task_needNewBodyStreamFromOffset_completionHandler_ - .implementAsListener(builder, - URLSession_task_needNewBodyStreamFromOffset_completionHandler_); - NSURLSessionWebSocketDelegate - .URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ - .implementAsListener(builder, - URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_); - NSURLSessionWebSocketDelegate - .URLSession_task_didReceiveInformationalResponse_ - .implementAsListener( - builder, URLSession_task_didReceiveInformationalResponse_); - NSURLSessionWebSocketDelegate.URLSession_task_didFinishCollectingMetrics_ - .implementAsListener( - builder, URLSession_task_didFinishCollectingMetrics_); - NSURLSessionWebSocketDelegate.URLSession_task_didCompleteWithError_ - .implementAsListener(builder, URLSession_task_didCompleteWithError_); - NSURLSessionWebSocketDelegate.URLSession_didBecomeInvalidWithError_ - .implementAsListener(builder, URLSession_didBecomeInvalidWithError_); - NSURLSessionWebSocketDelegate - .URLSession_didReceiveChallenge_completionHandler_ - .implementAsListener( - builder, URLSession_didReceiveChallenge_completionHandler_); - NSURLSessionWebSocketDelegate - .URLSessionDidFinishEventsForBackgroundURLSession_ - .implementAsListener( - builder, URLSessionDidFinishEventsForBackgroundURLSession_); - } +const int TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 62; - /// Indicates that the WebSocket handshake was successful and the connection has been upgraded to webSockets. - /// It will also provide the protocol that is picked in the handshake. If the handshake fails, this delegate will not be invoked. - static final URLSession_webSocketTask_didOpenWithProtocol_ = - objc.ObjCProtocolListenableMethod< - void Function( - NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)>( - _sel_URLSession_webSocketTask_didOpenWithProtocol_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_webSocketTask_didOpenWithProtocol_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionWebSocketTask arg2, objc.NSString? arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionWebSocketTask, objc.NSString?) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionWebSocketTask arg2, objc.NSString? arg3) => - func(arg1, arg2, arg3)), - ); +const int TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 63; - /// Indicates that the WebSocket has received a close frame from the server endpoint. - /// The close code and the close reason may be provided by the delegate if the server elects to send - /// this information in the close frame - static final URLSession_webSocketTask_didCloseWithCode_reason_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, - objc.NSData?)>( - _sel_URLSession_webSocketTask_didCloseWithCode_reason_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_webSocketTask_didCloseWithCode_reason_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, - objc.NSData?) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionWebSocketTask arg2, - DartNSInteger arg3, - objc.NSData? arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, - objc.NSData?) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionWebSocketTask arg2, - DartNSInteger arg3, - objc.NSData? arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 64; - /// Notification that a task has been created. This method is the first message - /// a task sends, providing a place to configure the task before it is resumed. - /// - /// This delegate callback is *NOT* dispatched to the delegate queue. It is - /// invoked synchronously before the task creation method returns. - static final URLSession_didCreateTask_ = objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask)>( - _sel_URLSession_didCreateTask_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_didCreateTask_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - ); +const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 103; - /// Sent when the system is ready to begin work for a task with a delayed start - /// time set (using the earliestBeginDate property). The completionHandler must - /// be invoked in order for loading to proceed. The disposition provided to the - /// completion handler continues the load with the original request provided to - /// the task, replaces the request with the specified task, or cancels the task. - /// If this delegate is not implemented, loading will proceed with the original - /// request. - /// - /// Recommendation: only implement this delegate if tasks that have the - /// earliestBeginDate property set may become stale and require alteration prior - /// to starting the network load. - /// - /// If a new request is specified, the allowsExpensiveNetworkAccess, - /// allowsConstrainedNetworkAccess, and allowsCellularAccess properties - /// from the new request will not be used; the properties from the - /// original request will continue to be used. - /// - /// Canceling the task is equivalent to calling the task's cancel method; the - /// URLSession:task:didCompleteWithError: task delegate will be called with error - /// NSURLErrorCancelled. - static final URLSession_task_willBeginDelayedRequest_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock)>( - _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_task_willBeginDelayedRequest_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLRequest arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, NSURLRequest, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLRequest_ffiVoidNSURLSessionDelayedRequestDispositionNSURLRequest - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLRequest arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 104; - /// Sent when a task cannot start the network loading process because the current - /// network connectivity is not available or sufficient for the task's request. - /// - /// This delegate will be called at most one time per task, and is only called if - /// the waitsForConnectivity property in the NSURLSessionConfiguration has been - /// set to YES. - /// - /// This delegate callback will never be called for background sessions, because - /// the waitForConnectivity property is ignored by those sessions. - static final URLSession_taskIsWaitingForConnectivity_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask)>( - _sel_URLSession_taskIsWaitingForConnectivity_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_taskIsWaitingForConnectivity_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.fromFunction( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, NSURLSessionTask) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask.listener( - (ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2) => - func(arg1, arg2)), - ); +const int TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 105; - /// An HTTP request is attempting to perform a redirection to a different - /// URL. You must invoke the completion routine to allow the - /// redirection, allow the redirection with a modified request, or - /// pass nil to the completionHandler to cause the body of the redirection - /// response to be delivered as the payload of this request. The default - /// is to follow redirections. - /// - /// For tasks in background sessions, redirections will always be followed and this method will not be called. - static final URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock)>( - _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_task_willPerformHTTPRedirection_newRequest_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSHTTPURLResponse arg3, - NSURLRequest arg4, - objc.ObjCBlock arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse, - NSURLRequest, objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse_NSURLRequest_ffiVoidNSURLRequest - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSHTTPURLResponse arg3, - NSURLRequest arg4, - objc.ObjCBlock arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - ); +const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 106; - /// The task has received a request specific authentication challenge. - /// If this delegate is not implemented, the session specific authentication challenge - /// will *NOT* be called and the behavior will be the same as using the default handling - /// disposition. - static final URLSession_task_didReceiveChallenge_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function( - NSURLSession, - NSURLSessionTask, - NSURLAuthenticationChallenge, - objc.ObjCBlock)>( - _sel_URLSession_task_didReceiveChallenge_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_task_didReceiveChallenge_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLAuthenticationChallenge arg3, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - NSURLAuthenticationChallenge arg3, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 107; - /// Sent if a task requires a new, unopened body stream. This may be - /// necessary when authentication has failed for any request that - /// involves a body stream. - static final URLSession_task_needNewBodyStream_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock)>( - _sel_URLSession_task_needNewBodyStream_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_task_needNewBodyStream_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - objc.ObjCBlock - arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_ffiVoidNSInputStream - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - objc.ObjCBlock - arg3) => - func(arg1, arg2, arg3)), - ); +const int TLS_DH_anon_WITH_RC4_128_MD5 = 24; - /// Tells the delegate if a task requires a new body stream starting from the given offset. This may be - /// necessary when resuming a failed upload task. - /// - /// - Parameter session: The session containing the task that needs a new body stream from the given offset. - /// - Parameter task: The task that needs a new body stream. - /// - Parameter offset: The starting offset required for the body stream. - /// - Parameter completionHandler: A completion handler that your delegate method should call with the new body stream. - static final URLSession_task_needNewBodyStreamFromOffset_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock)>( - _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_task_needNewBodyStreamFromOffset_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - int arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - (void Function(NSURLSession, NSURLSessionTask, int, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_ffiVoidNSInputStream - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLSessionTask arg2, - int arg3, - objc.ObjCBlock - arg4) => - func(arg1, arg2, arg3, arg4)), - ); +const int TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; + +const int TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 108; + +const int TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 109; + +const int TLS_PSK_WITH_RC4_128_SHA = 138; + +const int TLS_PSK_WITH_3DES_EDE_CBC_SHA = 139; + +const int TLS_PSK_WITH_AES_128_CBC_SHA = 140; + +const int TLS_PSK_WITH_AES_256_CBC_SHA = 141; + +const int TLS_DHE_PSK_WITH_RC4_128_SHA = 142; + +const int TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = 143; + +const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA = 144; + +const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA = 145; + +const int TLS_RSA_PSK_WITH_RC4_128_SHA = 146; + +const int TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = 147; + +const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA = 148; + +const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA = 149; + +const int TLS_PSK_WITH_NULL_SHA = 44; + +const int TLS_DHE_PSK_WITH_NULL_SHA = 45; + +const int TLS_RSA_PSK_WITH_NULL_SHA = 46; + +const int TLS_RSA_WITH_AES_128_GCM_SHA256 = 156; + +const int TLS_RSA_WITH_AES_256_GCM_SHA384 = 157; + +const int TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 158; + +const int TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 159; + +const int TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = 160; + +const int TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = 161; + +const int TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = 162; + +const int TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = 163; + +const int TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = 164; + +const int TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = 165; + +const int TLS_DH_anon_WITH_AES_128_GCM_SHA256 = 166; + +const int TLS_DH_anon_WITH_AES_256_GCM_SHA384 = 167; + +const int TLS_PSK_WITH_AES_128_GCM_SHA256 = 168; + +const int TLS_PSK_WITH_AES_256_GCM_SHA384 = 169; + +const int TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 170; + +const int TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 171; + +const int TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = 172; + +const int TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = 173; + +const int TLS_PSK_WITH_AES_128_CBC_SHA256 = 174; + +const int TLS_PSK_WITH_AES_256_CBC_SHA384 = 175; + +const int TLS_PSK_WITH_NULL_SHA256 = 176; + +const int TLS_PSK_WITH_NULL_SHA384 = 177; + +const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = 178; + +const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = 179; + +const int TLS_DHE_PSK_WITH_NULL_SHA256 = 180; - /// Sent periodically to notify the delegate of upload progress. This - /// information is also available as properties of the task. - static final URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, int, int, int)>( - _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_task_didSendBodyData_totalBytesSent_totalBytesExpectedToSend_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, int arg3, int arg4, int arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - (void Function(NSURLSession, NSURLSessionTask, int, int, int) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_Int64_Int64_Int64 - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, int arg3, int arg4, int arg5) => - func(arg1, arg2, arg3, arg4, arg5)), - ); +const int TLS_DHE_PSK_WITH_NULL_SHA384 = 181; - /// Sent for each informational response received except 101 switching protocols. - static final URLSession_task_didReceiveInformationalResponse_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse)>( - _sel_URLSession_task_didReceiveInformationalResponse_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_task_didReceiveInformationalResponse_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSHTTPURLResponse arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, NSHTTPURLResponse) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSHTTPURLResponse - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSHTTPURLResponse arg3) => - func(arg1, arg2, arg3)), - ); +const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = 182; - /// Sent when complete statistics information has been collected for the task. - static final URLSession_task_didFinishCollectingMetrics_ = - objc.ObjCProtocolListenableMethod< - void Function( - NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics)>( - _sel_URLSession_task_didFinishCollectingMetrics_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_task_didFinishCollectingMetrics_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, NSURLSessionTaskMetrics) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSURLSessionTaskMetrics - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, NSURLSessionTaskMetrics arg3) => - func(arg1, arg2, arg3)), - ); +const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = 183; - /// Sent as the last message related to a specific task. Error may be - /// nil, which implies that no error occurred and this task is complete. - static final URLSession_task_didCompleteWithError_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLSessionTask, objc.NSError?)>( - _sel_URLSession_task_didCompleteWithError_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_task_didCompleteWithError_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError - .fromFunction((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, objc.NSError? arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLSessionTask, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionTask_NSError - .listener((ffi.Pointer _, NSURLSession arg1, - NSURLSessionTask arg2, objc.NSError? arg3) => - func(arg1, arg2, arg3)), - ); +const int TLS_RSA_PSK_WITH_NULL_SHA256 = 184; - /// The last message a session receives. A session will only become - /// invalid because of a systemic error or when it has been - /// explicitly invalidated, in which case the error parameter will be nil. - static final URLSession_didBecomeInvalidWithError_ = objc - .ObjCProtocolListenableMethod( - _sel_URLSession_didBecomeInvalidWithError_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_didBecomeInvalidWithError_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.fromFunction( - (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => - func(arg1, arg2)), - (void Function(NSURLSession, objc.NSError?) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSError.listener( - (ffi.Pointer _, NSURLSession arg1, objc.NSError? arg2) => - func(arg1, arg2)), - ); +const int TLS_RSA_PSK_WITH_NULL_SHA384 = 185; - /// If implemented, when a connection level authentication challenge - /// has occurred, this delegate will be given the opportunity to - /// provide authentication credentials to the underlying - /// connection. Some types of authentication will apply to more than - /// one request on a given connection to a server (SSL Server Trust - /// challenges). If this delegate message is not implemented, the - /// behavior will be to use the default handling, which may involve user - /// interaction. - static final URLSession_didReceiveChallenge_completionHandler_ = - objc.ObjCProtocolListenableMethod< - void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock)>( - _sel_URLSession_didReceiveChallenge_completionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSession_didReceiveChallenge_completionHandler_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .fromFunction((ffi.Pointer _, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg3) => - func(arg1, arg2, arg3)), - (void Function(NSURLSession, NSURLAuthenticationChallenge, - objc.ObjCBlock) - func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLAuthenticationChallenge_ffiVoidNSURLSessionAuthChallengeDispositionNSURLCredential - .listener((ffi.Pointer _, - NSURLSession arg1, - NSURLAuthenticationChallenge arg2, - objc.ObjCBlock< - ffi.Void Function(NSInteger, NSURLCredential?)> - arg3) => - func(arg1, arg2, arg3)), - ); +const int TLS_AES_128_GCM_SHA256 = 4865; - /// If an application has received an - /// -application:handleEventsForBackgroundURLSession:completionHandler: - /// message, the session delegate will receive this message to indicate - /// that all messages previously enqueued for this session have been - /// delivered. At this time it is safe to invoke the previously stored - /// completion handler, or to begin any internal updates that will - /// result in invoking the completion handler. - static final URLSessionDidFinishEventsForBackgroundURLSession_ = - objc.ObjCProtocolListenableMethod( - _sel_URLSessionDidFinishEventsForBackgroundURLSession_, - objc.getProtocolMethodSignature( - _protocol_NSURLSessionWebSocketDelegate, - _sel_URLSessionDidFinishEventsForBackgroundURLSession_, - isRequired: false, - isInstanceMethod: true, - ), - (void Function(NSURLSession) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession.fromFunction( - (ffi.Pointer _, NSURLSession arg1) => func(arg1)), - (void Function(NSURLSession) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLSession.listener( - (ffi.Pointer _, NSURLSession arg1) => func(arg1)), - ); -} +const int TLS_AES_256_GCM_SHA384 = 4866; -late final _protocol_NSURLSessionWebSocketDelegate = - objc.getProtocol("NSURLSessionWebSocketDelegate"); -late final _sel_URLSession_webSocketTask_didOpenWithProtocol_ = - objc.registerName("URLSession:webSocketTask:didOpenWithProtocol:"); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); - objc.objectRelease(block.cast()); -} +const int TLS_CHACHA20_POLY1305_SHA256 = 4867; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_listenerTrampoline) - ..keepIsolateAlive = false; +const int TLS_AES_128_CCM_SHA256 = 4868; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionWebSocketTask, objc.NSString?)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionWebSocketTask, - objc.NSString?)>(pointer, retain: retain, release: release); +const int TLS_AES_128_CCM_8_SHA256 = 4869; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionWebSocketTask, objc.NSString?)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionWebSocketTask, objc.NSString?)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?) fn) => - objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionWebSocketTask.castFromPointer(arg2, retain: true, release: true), - arg3.address == 0 ? null : objc.NSString.castFromPointer(arg3, retain: true, release: true))), - retain: false, - release: true); +const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionWebSocketTask, objc.NSString?)> listener( - void Function(ffi.Pointer, NSURLSession, - NSURLSessionWebSocketTask, objc.NSString?) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionWebSocketTask.castFromPointer(arg2, - retain: false, release: true), - arg3.address == 0 - ? null - : objc.NSString.castFromPointer(arg3, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_1a6kixf(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionWebSocketTask, - objc.NSString?)>(wrapper, retain: false, release: true); - } -} +const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = -16347; -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, objc.NSString?)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSString_CallExtension - on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionWebSocketTask, objc.NSString?)> { - void call(ffi.Pointer arg0, NSURLSession arg1, - NSURLSessionWebSocketTask arg2, objc.NSString? arg3) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0, - arg1.ref.pointer, arg2.ref.pointer, arg3?.ref.pointer ?? ffi.nullptr); -} +const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = -16346; -late final _sel_URLSession_webSocketTask_didCloseWithCode_reason_ = - objc.registerName("URLSession:webSocketTask:didCloseWithCode:reason:"); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - ffi.Pointer arg4) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - NSInteger arg3, - ffi.Pointer arg4)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>()( - arg0, arg1, arg2, arg3, arg4); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - ffi.Pointer arg4) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - ffi.Pointer arg4) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer))(arg0, arg1, arg2, arg3, arg4); - objc.objectRelease(block.cast()); -} +const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; + +const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; + +const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = -16343; + +const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = -16342; + +const int TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; + +const int TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; + +const int TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = -16339; + +const int TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = -16338; + +const int TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; + +const int TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; + +const int TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = -16335; + +const int TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = -16334; + +const int TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = -13144; + +const int TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = -13143; + +const int TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 255; + +const int SSL_RSA_WITH_RC2_CBC_MD5 = -128; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - NSInteger, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_listenerTrampoline) - ..keepIsolateAlive = false; +const int SSL_RSA_WITH_IDEA_CBC_MD5 = -127; -/// Construction methods for `objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, NSInteger, objc.NSData?)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionWebSocketTask, - NSInteger, - objc.NSData?)>(pointer, retain: retain, release: release); +const int SSL_RSA_WITH_DES_CBC_MD5 = -126; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, NSInteger arg3, ffi.Pointer arg4)>> ptr) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionWebSocketTask, NSInteger, objc.NSData?)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int SSL_RSA_WITH_3DES_EDE_CBC_MD5 = -125; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> fromFunction(void Function(ffi.Pointer, NSURLSession, NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?) fn) => - objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, NSInteger, objc.NSData?)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - ffi.Pointer arg4) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionWebSocketTask.castFromPointer(arg2, retain: true, release: true), - arg3, - arg4.address == 0 ? null : objc.NSData.castFromPointer(arg4, retain: true, release: true))), - retain: false, - release: true); +const int SSL_NO_SUCH_CIPHERSUITE = -1; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> listener( - void Function(ffi.Pointer, NSURLSession, - NSURLSessionWebSocketTask, DartNSInteger, objc.NSData?) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - int arg3, - ffi.Pointer arg4) => - fn( - arg0, - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionWebSocketTask.castFromPointer(arg2, - retain: false, release: true), - arg3, - arg4.address == 0 - ? null - : objc.NSData.castFromPointer(arg4, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_10hgvcc(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, - NSURLSession, - NSURLSessionWebSocketTask, - NSInteger, - objc.NSData?)>(wrapper, retain: false, release: true); - } -} +const int noErr3 = 0; -/// Call operator for `objc.ObjCBlock, NSURLSession, NSURLSessionWebSocketTask, NSInteger, objc.NSData?)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLSession_NSURLSessionWebSocketTask_NSURLSessionWebSocketCloseCode_NSData_CallExtension - on objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionWebSocketTask, NSInteger, objc.NSData?)> { - void call( - ffi.Pointer arg0, - NSURLSession arg1, - NSURLSessionWebSocketTask arg2, - DartNSInteger arg3, - objc.NSData? arg4) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - NSInteger arg3, - ffi.Pointer arg4)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>()( - ref.pointer, - arg0, - arg1.ref.pointer, - arg2.ref.pointer, - arg3, - arg4?.ref.pointer ?? ffi.nullptr); -} +const int kNilOptions3 = 0; -typedef NSRange = objc.NSRange; +const int kVariableLengthArray3 = 1; -/// NSItemProviderWriting -abstract final class NSItemProviderWriting { - /// Builds an object that implements the NSItemProviderWriting protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {objc.NSItemProviderRepresentationVisibility Function(objc.NSString)? - itemProviderVisibilityForRepresentationWithTypeIdentifier_, - required NSProgress? Function(objc.NSString, - objc.ObjCBlock) - loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - objc.NSArray Function()? writableTypeIdentifiersForItemProvider}) { - final builder = objc.ObjCProtocolBuilder(); - NSItemProviderWriting - .itemProviderVisibilityForRepresentationWithTypeIdentifier_ - .implement(builder, - itemProviderVisibilityForRepresentationWithTypeIdentifier_); - NSItemProviderWriting - .loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ - .implement(builder, - loadDataWithTypeIdentifier_forItemProviderCompletionHandler_); - NSItemProviderWriting.writableTypeIdentifiersForItemProvider - .implement(builder, writableTypeIdentifiersForItemProvider); - return builder.build(); - } +const int kUnknownType3 = 1061109567; - /// Adds the implementation of the NSItemProviderWriting protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {objc.NSItemProviderRepresentationVisibility Function(objc.NSString)? - itemProviderVisibilityForRepresentationWithTypeIdentifier_, - required NSProgress? Function(objc.NSString, - objc.ObjCBlock) - loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - objc.NSArray Function()? writableTypeIdentifiersForItemProvider}) { - NSItemProviderWriting - .itemProviderVisibilityForRepresentationWithTypeIdentifier_ - .implement(builder, - itemProviderVisibilityForRepresentationWithTypeIdentifier_); - NSItemProviderWriting - .loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ - .implement(builder, - loadDataWithTypeIdentifier_forItemProviderCompletionHandler_); - NSItemProviderWriting.writableTypeIdentifiersForItemProvider - .implement(builder, writableTypeIdentifiersForItemProvider); - } +const int normal3 = 0; - /// itemProviderVisibilityForRepresentationWithTypeIdentifier: - static final itemProviderVisibilityForRepresentationWithTypeIdentifier_ = - objc.ObjCProtocolMethod< - objc.NSItemProviderRepresentationVisibility Function(objc.NSString)>( - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - objc.getProtocolMethodSignature( - _protocol_NSItemProviderWriting, - _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_, - isRequired: false, - isInstanceMethod: true, - ), - (objc.NSItemProviderRepresentationVisibility Function(objc.NSString) - func) => - ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString - .fromFunction( - (ffi.Pointer _, objc.NSString arg1) => func(arg1)), - ); +const int bold3 = 1; - /// loadDataWithTypeIdentifier:forItemProviderCompletionHandler: - static final loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ = - objc.ObjCProtocolMethod< - NSProgress? Function(objc.NSString, - objc.ObjCBlock)>( - _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - objc.getProtocolMethodSignature( - _protocol_NSItemProviderWriting, - _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_, - isRequired: true, - isInstanceMethod: true, - ), - (NSProgress? Function(objc.NSString, - objc.ObjCBlock) - func) => - ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError.fromFunction( - (ffi.Pointer _, - objc.NSString arg1, - objc.ObjCBlock< - ffi.Void Function(objc.NSData?, objc.NSError?)> - arg2) => - func(arg1, arg2)), - ); +const int italic3 = 2; - /// writableTypeIdentifiersForItemProvider - static final writableTypeIdentifiersForItemProvider = - objc.ObjCProtocolMethod( - _sel_writableTypeIdentifiersForItemProvider, - objc.getProtocolMethodSignature( - _protocol_NSItemProviderWriting, - _sel_writableTypeIdentifiersForItemProvider, - isRequired: false, - isInstanceMethod: true, - ), - (objc.NSArray Function() func) => ObjCBlock_NSArray_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); -} +const int underline3 = 4; -late final _protocol_NSItemProviderWriting = - objc.getProtocol("NSItemProviderWriting"); -late final _sel_itemProviderVisibilityForRepresentationWithTypeIdentifier_ = - objc.registerName( - "itemProviderVisibilityForRepresentationWithTypeIdentifier:"); -int _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -ffi.Pointer - _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_fnPtrCallable = - ffi.Pointer.fromFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_fnPtrTrampoline, - 0) - .cast(); -int _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - (objc.getBlockClosure(block) as int Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer - _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_closureCallable = - ffi.Pointer.fromFunction< - NSInteger Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_closureTrampoline, - 0) - .cast(); +const int outline3 = 8; -/// Construction methods for `objc.ObjCBlock, objc.NSString)>`. -abstract final class ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - NSInteger Function(ffi.Pointer, objc.NSString)> castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) => - objc.ObjCBlock, objc.NSString)>( - pointer, - retain: retain, - release: release); +const int shadow3 = 16; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, objc.NSString)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - NSInteger Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock, objc.NSString)>( - objc.newPointerBlock(_ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int condense3 = 32; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, objc.NSString)> fromFunction( - objc.NSItemProviderRepresentationVisibility Function( - ffi.Pointer, objc.NSString) - fn) => - objc.ObjCBlock, objc.NSString)>( - objc.newClosureBlock( - _ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0, objc.NSString.castFromPointer(arg1, retain: true, release: true)) - .value), - retain: false, - release: true); -} +const int extend3 = 64; -/// Call operator for `objc.ObjCBlock, objc.NSString)>`. -extension ObjCBlock_NSItemProviderRepresentationVisibility_ffiVoid_NSString_CallExtension - on objc - .ObjCBlock, objc.NSString)> { - objc.NSItemProviderRepresentationVisibility call( - ffi.Pointer arg0, objc.NSString arg1) => - objc.NSItemProviderRepresentationVisibility.fromValue(ref - .pointer.ref.invoke - .cast< - ffi.NativeFunction< - NSInteger Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction, ffi.Pointer, ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer)); -} +const int developStage3 = 32; -void _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - (objc.getBlockClosure(block) as void Function(ffi.Pointer, - ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_NSData_NSError_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); - objc.objectRelease(block.cast()); -} +const int alphaStage3 = 64; -ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> - _ObjCBlock_ffiVoid_NSData_NSError_listenerCallable = ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSError_listenerTrampoline) - ..keepIsolateAlive = false; +const int betaStage3 = 96; -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSData_NSError { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock( - pointer, - retain: retain, - release: release); +const int finalStage3 = 128; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock( - objc.newPointerBlock(_ObjCBlock_ffiVoid_NSData_NSError_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int NSScannedOption3 = 1; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunction( - void Function(objc.NSData?, objc.NSError?) fn) => - objc.ObjCBlock( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSData_NSError_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : objc.NSData.castFromPointer(arg0, - retain: true, release: true), - arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))), - retain: false, - release: true); +const int NSCollectorDisabledOption3 = 2; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock - listener(void Function(objc.NSData?, objc.NSError?) fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSData_NSError_listenerCallable.nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn( - arg0.address == 0 - ? null - : objc.NSData.castFromPointer(arg0, - retain: false, release: true), - arg1.address == 0 - ? null - : objc.NSError.castFromPointer(arg1, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_1tjlcwl(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock( - wrapper, - retain: false, - release: true); - } -} +const int NSASCIIStringEncoding = 1; -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSData_NSError_CallExtension - on objc.ObjCBlock { - void call(objc.NSData? arg0, objc.NSError? arg1) => ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, - arg0?.ref.pointer ?? ffi.nullptr, arg1?.ref.pointer ?? ffi.nullptr); -} +const int NSNEXTSTEPStringEncoding = 2; + +const int NSJapaneseEUCStringEncoding = 3; + +const int NSUTF8StringEncoding = 4; + +const int NSISOLatin1StringEncoding = 5; + +const int NSSymbolStringEncoding = 6; + +const int NSNonLossyASCIIStringEncoding = 7; + +const int NSShiftJISStringEncoding = 8; + +const int NSISOLatin2StringEncoding = 9; + +const int NSUnicodeStringEncoding = 10; + +const int NSWindowsCP1251StringEncoding = 11; + +const int NSWindowsCP1252StringEncoding = 12; + +const int NSWindowsCP1253StringEncoding = 13; + +const int NSWindowsCP1254StringEncoding = 14; + +const int NSWindowsCP1250StringEncoding = 15; + +const int NSISO2022JPStringEncoding = 21; + +const int NSMacOSRomanStringEncoding = 30; + +const int NSUTF16StringEncoding = 10; + +const int NSUTF16BigEndianStringEncoding = 2415919360; + +const int NSUTF16LittleEndianStringEncoding = 2483028224; + +const int NSUTF32StringEncoding = 2348810496; + +const int NSUTF32BigEndianStringEncoding = 2550137088; + +const int NSUTF32LittleEndianStringEncoding = 2617245952; + +const int NSProprietaryStringEncoding = 65536; + +const int NSOpenStepUnicodeReservedBase = 62464; + +const int noErr4 = 0; + +const int kNilOptions4 = 0; + +const int kVariableLengthArray4 = 1; + +const int kUnknownType4 = 1061109567; + +const int normal4 = 0; + +const int bold4 = 1; + +const int italic4 = 2; + +const int underline4 = 4; + +const int outline4 = 8; + +const int shadow4 = 16; + +const int condense4 = 32; + +const int extend4 = 64; + +const int developStage4 = 32; + +const int alphaStage4 = 64; + +const int betaStage4 = 96; + +const int finalStage4 = 128; + +const int NSScannedOption4 = 1; + +const int NSCollectorDisabledOption4 = 2; + +const int noErr5 = 0; + +const int kNilOptions5 = 0; + +const int kVariableLengthArray5 = 1; + +const int kUnknownType5 = 1061109567; + +const int normal5 = 0; + +const int bold5 = 1; + +const int italic5 = 2; + +const int underline5 = 4; + +const int outline5 = 8; + +const int shadow5 = 16; -late final _sel_loadDataWithTypeIdentifier_forItemProviderCompletionHandler_ = - objc.registerName( - "loadDataWithTypeIdentifier:forItemProviderCompletionHandler:"); -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_fnPtrTrampoline) - .cast(); -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_closureTrampoline) - .cast(); +const int condense5 = 32; -/// Construction methods for `objc.ObjCBlock, objc.NSString, objc.ObjCBlock)>`. -abstract final class ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - NSProgress? Function(ffi.Pointer, objc.NSString, - objc.ObjCBlock)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - NSProgress? Function(ffi.Pointer, objc.NSString, - objc.ObjCBlock)>(pointer, - retain: retain, release: release); +const int extend5 = 64; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - NSProgress? Function(ffi.Pointer, objc.NSString, - objc.ObjCBlock)> - fromFunctionPointer(ffi.Pointer Function(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock< - NSProgress? Function(ffi.Pointer, objc.NSString, - objc.ObjCBlock)>( - objc.newPointerBlock(_ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int developStage5 = 32; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, objc.NSString, objc.ObjCBlock)> - fromFunction(NSProgress? Function(ffi.Pointer, objc.NSString, objc.ObjCBlock) fn) => - objc.ObjCBlock, objc.NSString, objc.ObjCBlock)>( - objc.newClosureBlock( - _ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn(arg0, objc.NSString.castFromPointer(arg1, retain: true, release: true), ObjCBlock_ffiVoid_NSData_NSError.castFromPointer(arg2, retain: true, release: true)) - ?.ref - .retainAndAutorelease() ?? - ffi.nullptr), - retain: false, - release: true); -} +const int alphaStage5 = 64; -/// Call operator for `objc.ObjCBlock, objc.NSString, objc.ObjCBlock)>`. -extension ObjCBlock_NSProgress_ffiVoid_NSString_ffiVoidNSDataNSError_CallExtension - on objc.ObjCBlock< - NSProgress? Function(ffi.Pointer, objc.NSString, - objc.ObjCBlock)> { - NSProgress? call(ffi.Pointer arg0, objc.NSString arg1, objc.ObjCBlock arg2) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>() - (ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer) - .address == - 0 - ? null - : NSProgress.castFromPointer( - ref.pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>>().asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer), - retain: true, - release: true); -} +const int betaStage5 = 96; -late final _sel_writableTypeIdentifiersForItemProvider = - objc.registerName("writableTypeIdentifiersForItemProvider"); -ffi.Pointer _ObjCBlock_NSArray_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer)>()(arg0); -ffi.Pointer _ObjCBlock_NSArray_ffiVoid_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSArray_ffiVoid_fnPtrTrampoline) - .cast(); -ffi.Pointer _ObjCBlock_NSArray_ffiVoid_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - (objc.getBlockClosure(block) as ffi.Pointer Function( - ffi.Pointer))(arg0); -ffi.Pointer _ObjCBlock_NSArray_ffiVoid_closureCallable = - ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_NSArray_ffiVoid_closureTrampoline) - .cast(); +const int finalStage5 = 128; -/// Construction methods for `objc.ObjCBlock)>`. -abstract final class ObjCBlock_NSArray_ffiVoid { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock)>(pointer, - retain: retain, release: release); +const int NSScannedOption5 = 1; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> - fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) => - objc.ObjCBlock)>( - objc.newPointerBlock(_ObjCBlock_NSArray_ffiVoid_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int NSCollectorDisabledOption5 = 2; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock)> - fromFunction(objc.NSArray Function(ffi.Pointer) fn) => - objc.ObjCBlock)>( - objc.newClosureBlock( - _ObjCBlock_NSArray_ffiVoid_closureCallable, - (ffi.Pointer arg0) => - fn(arg0).ref.retainAndAutorelease()), - retain: false, - release: true); -} +const int noErr6 = 0; -/// Call operator for `objc.ObjCBlock)>`. -extension ObjCBlock_NSArray_ffiVoid_CallExtension - on objc.ObjCBlock)> { - objc.NSArray call(ffi.Pointer arg0) => objc.NSArray.castFromPointer( - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>()(ref.pointer, arg0), - retain: true, - release: true); -} +const int kNilOptions6 = 0; -/// NSItemProviderReading -abstract final class NSItemProviderReading { - /// Builds an object that implements the NSItemProviderReading protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {required Dartinstancetype? Function(objc.NSData, objc.NSString, - ffi.Pointer>) - objectWithItemProviderData_typeIdentifier_error_, - required objc.NSArray Function() - readableTypeIdentifiersForItemProvider}) { - final builder = objc.ObjCProtocolBuilder(); - NSItemProviderReading.objectWithItemProviderData_typeIdentifier_error_ - .implement(builder, objectWithItemProviderData_typeIdentifier_error_); - NSItemProviderReading.readableTypeIdentifiersForItemProvider - .implement(builder, readableTypeIdentifiersForItemProvider); - return builder.build(); - } +const int kVariableLengthArray6 = 1; - /// Adds the implementation of the NSItemProviderReading protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {required Dartinstancetype? Function(objc.NSData, objc.NSString, - ffi.Pointer>) - objectWithItemProviderData_typeIdentifier_error_, - required objc.NSArray Function() - readableTypeIdentifiersForItemProvider}) { - NSItemProviderReading.objectWithItemProviderData_typeIdentifier_error_ - .implement(builder, objectWithItemProviderData_typeIdentifier_error_); - NSItemProviderReading.readableTypeIdentifiersForItemProvider - .implement(builder, readableTypeIdentifiersForItemProvider); - } +const int kUnknownType6 = 1061109567; - /// objectWithItemProviderData:typeIdentifier:error: - static final objectWithItemProviderData_typeIdentifier_error_ = - objc.ObjCProtocolMethod< - Dartinstancetype? Function(objc.NSData, objc.NSString, - ffi.Pointer>)>( - _sel_objectWithItemProviderData_typeIdentifier_error_, - objc.getProtocolMethodSignature( - _protocol_NSItemProviderReading, - _sel_objectWithItemProviderData_typeIdentifier_error_, - isRequired: true, - isInstanceMethod: false, - ), - (Dartinstancetype? Function(objc.NSData, objc.NSString, - ffi.Pointer>) - func) => - ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError.fromFunction( - (ffi.Pointer _, objc.NSData arg1, objc.NSString arg2, - ffi.Pointer> arg3) => - func(arg1, arg2, arg3)), - ); +const int normal6 = 0; - /// readableTypeIdentifiersForItemProvider - static final readableTypeIdentifiersForItemProvider = - objc.ObjCProtocolMethod( - _sel_readableTypeIdentifiersForItemProvider, - objc.getProtocolMethodSignature( - _protocol_NSItemProviderReading, - _sel_readableTypeIdentifiersForItemProvider, - isRequired: true, - isInstanceMethod: false, - ), - (objc.NSArray Function() func) => ObjCBlock_NSArray_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - ); -} +const int bold6 = 1; -late final _protocol_NSItemProviderReading = - objc.getProtocol("NSItemProviderReading"); -late final _sel_objectWithItemProviderData_typeIdentifier_error_ = - objc.registerName("objectWithItemProviderData:typeIdentifier:error:"); -instancetype - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> arg3)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>()( - arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable = - ffi.Pointer.fromFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>( - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrTrampoline) - .cast(); -instancetype - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> arg3) => - (objc.getBlockClosure(block) as instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>))(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable = - ffi.Pointer.fromFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>( - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureTrampoline) - .cast(); +const int italic6 = 2; -/// Construction methods for `objc.ObjCBlock? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)>`. -abstract final class ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Pointer? Function( - ffi.Pointer, - objc.NSData, - objc.NSString, - ffi.Pointer>)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Pointer? Function( - ffi.Pointer, - objc.NSData, - objc.NSString, - ffi.Pointer>)>(pointer, retain: retain, release: release); +const int underline6 = 4; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock< - ffi.Pointer? Function( - ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>> ptr) => - objc.ObjCBlock< - ffi.Pointer? Function( - ffi.Pointer, - objc.NSData, - objc.NSString, - ffi.Pointer>)>( - objc.newPointerBlock(_ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int outline6 = 8; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)> - fromFunction(Dartinstancetype? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>) fn) => - objc.ObjCBlock? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)>( - objc.newClosureBlock( - _ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> arg3) => - fn(arg0, objc.NSData.castFromPointer(arg1, retain: true, release: true), objc.NSString.castFromPointer(arg2, retain: true, release: true), arg3)?.ref.retainAndAutorelease() ?? - ffi.nullptr), - retain: false, - release: true); -} +const int shadow6 = 16; -/// Call operator for `objc.ObjCBlock? Function(ffi.Pointer, objc.NSData, objc.NSString, ffi.Pointer>)>`. -extension ObjCBlock_instancetype_ffiVoid_NSData_NSString_NSError_CallExtension - on objc.ObjCBlock< - ffi.Pointer? Function( - ffi.Pointer, - objc.NSData, - objc.NSString, - ffi.Pointer>)> { - Dartinstancetype? call(ffi.Pointer arg0, objc.NSData arg1, objc.NSString arg2, ffi.Pointer> arg3) => ref - .pointer.ref.invoke - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer> arg3)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>() - (ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3) - .address == - 0 - ? null - : objc.ObjCObjectBase( - ref.pointer.ref.invoke.cast block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer> arg3)>>().asFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer>)>()(ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer, arg3), - retain: true, - release: true); -} +const int condense6 = 32; -late final _sel_readableTypeIdentifiersForItemProvider = - objc.registerName("readableTypeIdentifiersForItemProvider"); -typedef NSStringEncoding = NSUInteger; -typedef NSStringTransform = ffi.Pointer; -typedef DartNSStringTransform = objc.NSString; -typedef NSStringEncodingDetectionOptionsKey = ffi.Pointer; -typedef DartNSStringEncodingDetectionOptionsKey = objc.NSString; -typedef NSExceptionName = ffi.Pointer; -typedef DartNSExceptionName = objc.NSString; +const int extend6 = 64; -/// NSURLHandleClient -abstract final class NSURLHandleClient { - /// Builds an object that implements the NSURLHandleClient protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {required void Function(objc.NSURLHandle, objc.NSData) - URLHandle_resourceDataDidBecomeAvailable_, - required void Function(objc.NSURLHandle) - URLHandleResourceDidBeginLoading_, - required void Function(objc.NSURLHandle) - URLHandleResourceDidFinishLoading_, - required void Function(objc.NSURLHandle) - URLHandleResourceDidCancelLoading_, - required void Function(objc.NSURLHandle, objc.NSString) - URLHandle_resourceDidFailLoadingWithReason_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLHandleClient.URLHandle_resourceDataDidBecomeAvailable_.implement( - builder, URLHandle_resourceDataDidBecomeAvailable_); - NSURLHandleClient.URLHandleResourceDidBeginLoading_.implement( - builder, URLHandleResourceDidBeginLoading_); - NSURLHandleClient.URLHandleResourceDidFinishLoading_.implement( - builder, URLHandleResourceDidFinishLoading_); - NSURLHandleClient.URLHandleResourceDidCancelLoading_.implement( - builder, URLHandleResourceDidCancelLoading_); - NSURLHandleClient.URLHandle_resourceDidFailLoadingWithReason_.implement( - builder, URLHandle_resourceDidFailLoadingWithReason_); - return builder.build(); - } +const int developStage6 = 32; - /// Adds the implementation of the NSURLHandleClient protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {required void Function(objc.NSURLHandle, objc.NSData) - URLHandle_resourceDataDidBecomeAvailable_, - required void Function(objc.NSURLHandle) - URLHandleResourceDidBeginLoading_, - required void Function(objc.NSURLHandle) - URLHandleResourceDidFinishLoading_, - required void Function(objc.NSURLHandle) - URLHandleResourceDidCancelLoading_, - required void Function(objc.NSURLHandle, objc.NSString) - URLHandle_resourceDidFailLoadingWithReason_}) { - NSURLHandleClient.URLHandle_resourceDataDidBecomeAvailable_.implement( - builder, URLHandle_resourceDataDidBecomeAvailable_); - NSURLHandleClient.URLHandleResourceDidBeginLoading_.implement( - builder, URLHandleResourceDidBeginLoading_); - NSURLHandleClient.URLHandleResourceDidFinishLoading_.implement( - builder, URLHandleResourceDidFinishLoading_); - NSURLHandleClient.URLHandleResourceDidCancelLoading_.implement( - builder, URLHandleResourceDidCancelLoading_); - NSURLHandleClient.URLHandle_resourceDidFailLoadingWithReason_.implement( - builder, URLHandle_resourceDidFailLoadingWithReason_); - } - - /// Builds an object that implements the NSURLHandleClient protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - static objc.ObjCObjectBase implementAsListener( - {required void Function(objc.NSURLHandle, objc.NSData) - URLHandle_resourceDataDidBecomeAvailable_, - required void Function(objc.NSURLHandle) - URLHandleResourceDidBeginLoading_, - required void Function(objc.NSURLHandle) - URLHandleResourceDidFinishLoading_, - required void Function(objc.NSURLHandle) - URLHandleResourceDidCancelLoading_, - required void Function(objc.NSURLHandle, objc.NSString) - URLHandle_resourceDidFailLoadingWithReason_}) { - final builder = objc.ObjCProtocolBuilder(); - NSURLHandleClient.URLHandle_resourceDataDidBecomeAvailable_ - .implementAsListener( - builder, URLHandle_resourceDataDidBecomeAvailable_); - NSURLHandleClient.URLHandleResourceDidBeginLoading_.implementAsListener( - builder, URLHandleResourceDidBeginLoading_); - NSURLHandleClient.URLHandleResourceDidFinishLoading_.implementAsListener( - builder, URLHandleResourceDidFinishLoading_); - NSURLHandleClient.URLHandleResourceDidCancelLoading_.implementAsListener( - builder, URLHandleResourceDidCancelLoading_); - NSURLHandleClient.URLHandle_resourceDidFailLoadingWithReason_ - .implementAsListener( - builder, URLHandle_resourceDidFailLoadingWithReason_); - return builder.build(); - } +const int alphaStage6 = 64; - /// Adds the implementation of the NSURLHandleClient protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, - {required void Function(objc.NSURLHandle, objc.NSData) - URLHandle_resourceDataDidBecomeAvailable_, - required void Function(objc.NSURLHandle) - URLHandleResourceDidBeginLoading_, - required void Function(objc.NSURLHandle) - URLHandleResourceDidFinishLoading_, - required void Function(objc.NSURLHandle) - URLHandleResourceDidCancelLoading_, - required void Function(objc.NSURLHandle, objc.NSString) - URLHandle_resourceDidFailLoadingWithReason_}) { - NSURLHandleClient.URLHandle_resourceDataDidBecomeAvailable_ - .implementAsListener( - builder, URLHandle_resourceDataDidBecomeAvailable_); - NSURLHandleClient.URLHandleResourceDidBeginLoading_.implementAsListener( - builder, URLHandleResourceDidBeginLoading_); - NSURLHandleClient.URLHandleResourceDidFinishLoading_.implementAsListener( - builder, URLHandleResourceDidFinishLoading_); - NSURLHandleClient.URLHandleResourceDidCancelLoading_.implementAsListener( - builder, URLHandleResourceDidCancelLoading_); - NSURLHandleClient.URLHandle_resourceDidFailLoadingWithReason_ - .implementAsListener( - builder, URLHandle_resourceDidFailLoadingWithReason_); - } +const int betaStage6 = 96; - /// URLHandle:resourceDataDidBecomeAvailable: - static final URLHandle_resourceDataDidBecomeAvailable_ = - objc.ObjCProtocolListenableMethod< - void Function(objc.NSURLHandle, objc.NSData)>( - _sel_URLHandle_resourceDataDidBecomeAvailable_, - objc.getProtocolMethodSignature( - _protocol_NSURLHandleClient, - _sel_URLHandle_resourceDataDidBecomeAvailable_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(objc.NSURLHandle, objc.NSData) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData.fromFunction( - (ffi.Pointer _, objc.NSURLHandle arg1, - objc.NSData arg2) => - func(arg1, arg2)), - (void Function(objc.NSURLHandle, objc.NSData) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData.listener( - (ffi.Pointer _, objc.NSURLHandle arg1, - objc.NSData arg2) => - func(arg1, arg2)), - ); +const int finalStage6 = 128; - /// URLHandleResourceDidBeginLoading: - static final URLHandleResourceDidBeginLoading_ = - objc.ObjCProtocolListenableMethod( - _sel_URLHandleResourceDidBeginLoading_, - objc.getProtocolMethodSignature( - _protocol_NSURLHandleClient, - _sel_URLHandleResourceDidBeginLoading_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(objc.NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.fromFunction( - (ffi.Pointer _, objc.NSURLHandle arg1) => func(arg1)), - (void Function(objc.NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.listener( - (ffi.Pointer _, objc.NSURLHandle arg1) => func(arg1)), - ); +const int NSScannedOption6 = 1; - /// URLHandleResourceDidFinishLoading: - static final URLHandleResourceDidFinishLoading_ = - objc.ObjCProtocolListenableMethod( - _sel_URLHandleResourceDidFinishLoading_, - objc.getProtocolMethodSignature( - _protocol_NSURLHandleClient, - _sel_URLHandleResourceDidFinishLoading_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(objc.NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.fromFunction( - (ffi.Pointer _, objc.NSURLHandle arg1) => func(arg1)), - (void Function(objc.NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.listener( - (ffi.Pointer _, objc.NSURLHandle arg1) => func(arg1)), - ); +const int NSCollectorDisabledOption6 = 2; - /// URLHandleResourceDidCancelLoading: - static final URLHandleResourceDidCancelLoading_ = - objc.ObjCProtocolListenableMethod( - _sel_URLHandleResourceDidCancelLoading_, - objc.getProtocolMethodSignature( - _protocol_NSURLHandleClient, - _sel_URLHandleResourceDidCancelLoading_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(objc.NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.fromFunction( - (ffi.Pointer _, objc.NSURLHandle arg1) => func(arg1)), - (void Function(objc.NSURLHandle) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle.listener( - (ffi.Pointer _, objc.NSURLHandle arg1) => func(arg1)), - ); +const int noErr7 = 0; - /// URLHandle:resourceDidFailLoadingWithReason: - static final URLHandle_resourceDidFailLoadingWithReason_ = - objc.ObjCProtocolListenableMethod< - void Function(objc.NSURLHandle, objc.NSString)>( - _sel_URLHandle_resourceDidFailLoadingWithReason_, - objc.getProtocolMethodSignature( - _protocol_NSURLHandleClient, - _sel_URLHandle_resourceDidFailLoadingWithReason_, - isRequired: true, - isInstanceMethod: true, - ), - (void Function(objc.NSURLHandle, objc.NSString) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString.fromFunction( - (ffi.Pointer _, objc.NSURLHandle arg1, - objc.NSString arg2) => - func(arg1, arg2)), - (void Function(objc.NSURLHandle, objc.NSString) func) => - ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString.listener( - (ffi.Pointer _, objc.NSURLHandle arg1, - objc.NSString arg2) => - func(arg1, arg2)), - ); -} +const int kNilOptions7 = 0; -late final _protocol_NSURLHandleClient = objc.getProtocol("NSURLHandleClient"); -late final _sel_URLHandle_resourceDataDidBecomeAvailable_ = - objc.registerName("URLHandle:resourceDataDidBecomeAvailable:"); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_closureTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); - objc.objectRelease(block.cast()); -} +const int kVariableLengthArray7 = 1; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_listenerCallable = ffi - .NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_listenerTrampoline) - ..keepIsolateAlive = false; +const int kUnknownType7 = 1061109567; -/// Construction methods for `objc.ObjCBlock, objc.NSURLHandle, objc.NSData)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, objc.NSURLHandle, objc.NSData)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, objc.NSURLHandle, - objc.NSData)>(pointer, retain: retain, release: release); +const int normal7 = 0; + +const int bold7 = 1; + +const int italic7 = 2; + +const int underline7 = 4; + +const int outline7 = 8; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc - .ObjCBlock, objc.NSURLHandle, objc.NSData)> - fromFunctionPointer( - ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> - ptr) => - objc.ObjCBlock, objc.NSURLHandle, objc.NSData)>( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_fnPtrCallable, - ptr.cast()), - retain: false, - release: true); +const int shadow7 = 16; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc - .ObjCBlock, objc.NSURLHandle, objc.NSData)> - fromFunction(void Function(ffi.Pointer, objc.NSURLHandle, objc.NSData) fn) => - objc.ObjCBlock, objc.NSURLHandle, objc.NSData)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - arg0, - objc.NSURLHandle.castFromPointer(arg1, retain: true, release: true), - objc.NSData.castFromPointer(arg2, retain: true, release: true))), - retain: false, - release: true); +const int condense7 = 32; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, objc.NSURLHandle, objc.NSData)> listener( - void Function(ffi.Pointer, objc.NSURLHandle, objc.NSData) fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0, - objc.NSURLHandle.castFromPointer(arg1, - retain: false, release: true), - objc.NSData.castFromPointer(arg2, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_tm2na8(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, objc.NSURLHandle, - objc.NSData)>(wrapper, retain: false, release: true); - } -} +const int extend7 = 64; -/// Call operator for `objc.ObjCBlock, objc.NSURLHandle, objc.NSData)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSData_CallExtension - on objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, objc.NSURLHandle, objc.NSData)> { - void call(ffi.Pointer arg0, objc.NSURLHandle arg1, - objc.NSData arg2) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer); -} +const int developStage7 = 32; -late final _sel_URLHandleResourceDidBeginLoading_ = - objc.registerName("URLHandleResourceDidBeginLoading:"); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_closureTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, ffi.Pointer))(arg0, arg1); - objc.objectRelease(block.cast()); -} +const int alphaStage7 = 64; -ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_listenerCallable = ffi - .NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_listenerTrampoline) - ..keepIsolateAlive = false; +const int betaStage7 = 96; -/// Construction methods for `objc.ObjCBlock, objc.NSURLHandle)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle { - /// Returns a block that wraps the given raw block pointer. - static objc - .ObjCBlock, objc.NSURLHandle)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, - objc.NSURLHandle)>(pointer, retain: retain, release: release); +const int finalStage7 = 128; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, objc.NSURLHandle)> fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) => - objc.ObjCBlock, objc.NSURLHandle)>( - objc.newPointerBlock(_ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_fnPtrCallable, ptr.cast()), - retain: false, - release: true); +const int NSScannedOption7 = 1; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock, objc.NSURLHandle)> - fromFunction(void Function(ffi.Pointer, objc.NSURLHandle) fn) => - objc.ObjCBlock, objc.NSURLHandle)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0, - objc.NSURLHandle.castFromPointer(arg1, - retain: true, release: true))), - retain: false, - release: true); +const int NSCollectorDisabledOption7 = 2; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc - .ObjCBlock, objc.NSURLHandle)> - listener(void Function(ffi.Pointer, objc.NSURLHandle) fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_listenerCallable.nativeFunction - .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0, - objc.NSURLHandle.castFromPointer(arg1, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_sjfpmz(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, objc.NSURLHandle)>(wrapper, - retain: false, release: true); - } -} +const int noErr8 = 0; -/// Call operator for `objc.ObjCBlock, objc.NSURLHandle)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_CallExtension on objc - .ObjCBlock, objc.NSURLHandle)> { - void call(ffi.Pointer arg0, objc.NSURLHandle arg1) => ref - .pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer); -} +const int kNilOptions8 = 0; -late final _sel_URLHandleResourceDidFinishLoading_ = - objc.registerName("URLHandleResourceDidFinishLoading:"); -late final _sel_URLHandleResourceDidCancelLoading_ = - objc.registerName("URLHandleResourceDidCancelLoading:"); -late final _sel_URLHandle_resourceDidFailLoadingWithReason_ = - objc.registerName("URLHandle:resourceDidFailLoadingWithReason:"); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_fnPtrTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_closureTrampoline) - .cast(); -void _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2); - objc.objectRelease(block.cast()); -} +const int kVariableLengthArray8 = 1; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_listenerCallable = ffi - .NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_listenerTrampoline) - ..keepIsolateAlive = false; +const int kUnknownType8 = 1061109567; -/// Construction methods for `objc.ObjCBlock, objc.NSURLHandle, objc.NSString)>`. -abstract final class ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, objc.NSURLHandle, objc.NSString)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, objc.NSURLHandle, - objc.NSString)>(pointer, retain: retain, release: release); +const int normal8 = 0; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc - .ObjCBlock, objc.NSURLHandle, objc.NSString)> - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2)>> ptr) => - objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, objc.NSURLHandle, objc.NSString)>( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_fnPtrCallable, - ptr.cast()), - retain: false, - release: true); +const int bold8 = 1; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc - .ObjCBlock, objc.NSURLHandle, objc.NSString)> - fromFunction(void Function(ffi.Pointer, objc.NSURLHandle, objc.NSString) fn) => - objc.ObjCBlock, objc.NSURLHandle, objc.NSString)>( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_closureCallable, - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - arg0, - objc.NSURLHandle.castFromPointer(arg1, retain: true, release: true), - objc.NSString.castFromPointer(arg2, retain: true, release: true))), - retain: false, - release: true); +const int italic8 = 2; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, objc.NSURLHandle, objc.NSString)> listener( - void Function(ffi.Pointer, objc.NSURLHandle, objc.NSString) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0, - objc.NSURLHandle.castFromPointer(arg1, - retain: false, release: true), - objc.NSString.castFromPointer(arg2, - retain: false, release: true))); - final wrapper = _wrapListenerBlock_tm2na8(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, objc.NSURLHandle, - objc.NSString)>(wrapper, retain: false, release: true); - } -} +const int underline8 = 4; -/// Call operator for `objc.ObjCBlock, objc.NSURLHandle, objc.NSString)>`. -extension ObjCBlock_ffiVoid_ffiVoid_NSURLHandle_NSString_CallExtension - on objc.ObjCBlock< - ffi.Void Function( - ffi.Pointer, objc.NSURLHandle, objc.NSString)> { - void call(ffi.Pointer arg0, objc.NSURLHandle arg1, - objc.NSString arg2) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, arg0, arg1.ref.pointer, arg2.ref.pointer); -} +const int outline8 = 8; -typedef NSURLResourceKey = ffi.Pointer; -typedef DartNSURLResourceKey = objc.NSString; -typedef NSURLFileResourceType = ffi.Pointer; -typedef DartNSURLFileResourceType = objc.NSString; -typedef NSURLThumbnailDictionaryItem = ffi.Pointer; -typedef DartNSURLThumbnailDictionaryItem = objc.NSString; -typedef NSURLFileProtectionType = ffi.Pointer; -typedef DartNSURLFileProtectionType = objc.NSString; -typedef NSURLUbiquitousItemDownloadingStatus = ffi.Pointer; -typedef DartNSURLUbiquitousItemDownloadingStatus = objc.NSString; -typedef NSURLUbiquitousSharedItemRole = ffi.Pointer; -typedef DartNSURLUbiquitousSharedItemRole = objc.NSString; -typedef NSURLUbiquitousSharedItemPermissions = ffi.Pointer; -typedef DartNSURLUbiquitousSharedItemPermissions = objc.NSString; +const int shadow8 = 16; -/// NSLocking -abstract final class NSLocking { - /// Builds an object that implements the NSLocking protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. - static objc.ObjCObjectBase implement( - {required void Function() lock, required void Function() unlock}) { - final builder = objc.ObjCProtocolBuilder(); - NSLocking.lock.implement(builder, lock); - NSLocking.unlock.implement(builder, unlock); - return builder.build(); - } +const int condense8 = 32; - /// Adds the implementation of the NSLocking protocol to an existing - /// [objc.ObjCProtocolBuilder]. - static void addToBuilder(objc.ObjCProtocolBuilder builder, - {required void Function() lock, required void Function() unlock}) { - NSLocking.lock.implement(builder, lock); - NSLocking.unlock.implement(builder, unlock); - } +const int extend8 = 64; - /// Builds an object that implements the NSLocking protocol. To implement - /// multiple protocols, use [addToBuilder] or [objc.ObjCProtocolBuilder] directly. All - /// methods that can be implemented as listeners will be. - static objc.ObjCObjectBase implementAsListener( - {required void Function() lock, required void Function() unlock}) { - final builder = objc.ObjCProtocolBuilder(); - NSLocking.lock.implementAsListener(builder, lock); - NSLocking.unlock.implementAsListener(builder, unlock); - return builder.build(); - } +const int developStage8 = 32; - /// Adds the implementation of the NSLocking protocol to an existing - /// [objc.ObjCProtocolBuilder]. All methods that can be implemented as listeners will - /// be. - static void addToBuilderAsListener(objc.ObjCProtocolBuilder builder, - {required void Function() lock, required void Function() unlock}) { - NSLocking.lock.implementAsListener(builder, lock); - NSLocking.unlock.implementAsListener(builder, unlock); - } +const int alphaStage8 = 64; - /// lock - static final lock = objc.ObjCProtocolListenableMethod( - _sel_lock, - objc.getProtocolMethodSignature( - _protocol_NSLocking, - _sel_lock, - isRequired: true, - isInstanceMethod: true, - ), - (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.listener(( - ffi.Pointer _, - ) => - func()), - ); +const int betaStage8 = 96; - /// unlock - static final unlock = objc.ObjCProtocolListenableMethod( - _sel_unlock, - objc.getProtocolMethodSignature( - _protocol_NSLocking, - _sel_unlock, - isRequired: true, - isInstanceMethod: true, - ), - (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.fromFunction(( - ffi.Pointer _, - ) => - func()), - (void Function() func) => ObjCBlock_ffiVoid_ffiVoid.listener(( - ffi.Pointer _, - ) => - func()), - ); -} +const int finalStage8 = 128; -late final _protocol_NSLocking = objc.getProtocol("NSLocking"); -late final _sel_lock = objc.registerName("lock"); -late final _sel_unlock = objc.registerName("unlock"); +const int NSScannedOption8 = 1; -/// NSException -class NSException extends objc.NSObject { - NSException._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); +const int NSCollectorDisabledOption8 = 2; - /// Constructs a [NSException] that points to the same underlying object as [other]. - NSException.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); +const int NSASCIIStringEncoding1 = 1; - /// Constructs a [NSException] that wraps the given raw object pointer. - NSException.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); +const int NSNEXTSTEPStringEncoding1 = 2; - /// Returns whether [obj] is an instance of [NSException]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSException); - } - - /// exceptionWithName:reason:userInfo: - static NSException exceptionWithName_reason_userInfo_( - DartNSExceptionName name, - objc.NSString? reason, - objc.NSDictionary? userInfo) { - final _ret = _objc_msgSend_aud7dn( - _class_NSException, - _sel_exceptionWithName_reason_userInfo_, - name.ref.pointer, - reason?.ref.pointer ?? ffi.nullptr, - userInfo?.ref.pointer ?? ffi.nullptr); - return NSException.castFromPointer(_ret, retain: true, release: true); - } - - /// initWithName:reason:userInfo: - NSException initWithName_reason_userInfo_(DartNSExceptionName aName, - objc.NSString? aReason, objc.NSDictionary? aUserInfo) { - final _ret = _objc_msgSend_aud7dn( - this.ref.retainAndReturnPointer(), - _sel_initWithName_reason_userInfo_, - aName.ref.pointer, - aReason?.ref.pointer ?? ffi.nullptr, - aUserInfo?.ref.pointer ?? ffi.nullptr); - return NSException.castFromPointer(_ret, retain: false, release: true); - } +const int NSJapaneseEUCStringEncoding1 = 3; - /// name - DartNSExceptionName get name { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); - return objc.NSString.castFromPointer(_ret, retain: true, release: true); - } +const int NSUTF8StringEncoding1 = 4; - /// reason - objc.NSString? get reason { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_reason); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } +const int NSISOLatin1StringEncoding1 = 5; - /// userInfo - objc.NSDictionary? get userInfo { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_userInfo); - return _ret.address == 0 - ? null - : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); - } +const int NSSymbolStringEncoding1 = 6; - /// callStackReturnAddresses - objc.NSArray get callStackReturnAddresses { - final _ret = - _objc_msgSend_1unuoxw(this.ref.pointer, _sel_callStackReturnAddresses); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } +const int NSNonLossyASCIIStringEncoding1 = 7; - /// callStackSymbols - objc.NSArray get callStackSymbols { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_callStackSymbols); - return objc.NSArray.castFromPointer(_ret, retain: true, release: true); - } +const int NSShiftJISStringEncoding1 = 8; - /// raise - void raise() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_raise); - } +const int NSISOLatin2StringEncoding1 = 9; - /// raise:format: - static void raise_format_(DartNSExceptionName name, objc.NSString format) { - _objc_msgSend_1tjlcwl(_class_NSException, _sel_raise_format_, - name.ref.pointer, format.ref.pointer); - } +const int NSUnicodeStringEncoding1 = 10; - /// init - NSException init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSException.castFromPointer(_ret, retain: false, release: true); - } +const int NSWindowsCP1251StringEncoding1 = 11; - /// new - static NSException new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSException, _sel_new); - return NSException.castFromPointer(_ret, retain: false, release: true); - } +const int NSWindowsCP1252StringEncoding1 = 12; - /// allocWithZone: - static NSException allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_1b3ihd0(_class_NSException, _sel_allocWithZone_, zone); - return NSException.castFromPointer(_ret, retain: false, release: true); - } +const int NSWindowsCP1253StringEncoding1 = 13; - /// alloc - static NSException alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSException, _sel_alloc); - return NSException.castFromPointer(_ret, retain: false, release: true); - } +const int NSWindowsCP1254StringEncoding1 = 14; - /// supportsSecureCoding - static bool supportsSecureCoding() { - return _objc_msgSend_olxnu1(_class_NSException, _sel_supportsSecureCoding); - } +const int NSWindowsCP1250StringEncoding1 = 15; - /// encodeWithCoder: - void encodeWithCoder_(objc.NSCoder coder) { - _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_encodeWithCoder_, coder.ref.pointer); - } +const int NSISO2022JPStringEncoding1 = 21; - /// initWithCoder: - NSException? initWithCoder_(objc.NSCoder coder) { - final _ret = _objc_msgSend_juohf7(this.ref.retainAndReturnPointer(), - _sel_initWithCoder_, coder.ref.pointer); - return _ret.address == 0 - ? null - : NSException.castFromPointer(_ret, retain: false, release: true); - } -} +const int NSMacOSRomanStringEncoding1 = 30; -late final _class_NSException = objc.getClass("NSException"); -late final _sel_exceptionWithName_reason_userInfo_ = - objc.registerName("exceptionWithName:reason:userInfo:"); -late final _sel_initWithName_reason_userInfo_ = - objc.registerName("initWithName:reason:userInfo:"); -late final _sel_reason = objc.registerName("reason"); -late final _sel_callStackReturnAddresses = - objc.registerName("callStackReturnAddresses"); -late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); -late final _sel_raise = objc.registerName("raise"); -late final _sel_raise_format_ = objc.registerName("raise:format:"); -typedef NSUncaughtExceptionHandler = ffi - .NativeFunction exception)>; -typedef NSErrorDomain = ffi.Pointer; -typedef DartNSErrorDomain = objc.NSString; -typedef NSErrorUserInfoKey = ffi.Pointer; -typedef DartNSErrorUserInfoKey = objc.NSString; -typedef _DidFinish = ffi.Pointer; -typedef Dart_DidFinish = objc.ObjCBlock< - ffi.Void Function(ffi.Pointer, NSURLSession, - NSURLSessionDownloadTask, objc.NSURL)>; -typedef _DidFinishWithLock = ffi.Pointer; -typedef Dart_DidFinishWithLock = objc.ObjCBlock< - ffi.Void Function( - NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)>; -void - _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); -ffi.Pointer - _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_closureCallable = - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_closureTrampoline) - .cast(); -void - _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) { - (objc.getBlockClosure(block) as void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer))(arg0, arg1, arg2, arg3); - objc.objectRelease(block.cast()); -} +const int NSUTF16StringEncoding1 = 10; -ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)> - _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerCallable = - ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerTrampoline) - ..keepIsolateAlive = false; +const int NSUTF16BigEndianStringEncoding1 = 2415919360; + +const int NSUTF16LittleEndianStringEncoding1 = 2483028224; + +const int NSUTF32StringEncoding1 = 2348810496; + +const int NSUTF32BigEndianStringEncoding1 = 2550137088; + +const int NSUTF32LittleEndianStringEncoding1 = 2617245952; + +const int NSProprietaryStringEncoding1 = 65536; -/// Construction methods for `objc.ObjCBlock`. -abstract final class ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL { - /// Returns a block that wraps the given raw block pointer. - static objc.ObjCBlock< - ffi.Void Function( - NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)> - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) => - objc.ObjCBlock< - ffi.Void Function( - NSCondition, - NSURLSession, - NSURLSessionDownloadTask, - objc.NSURL)>(pointer, retain: retain, release: release); +const int DISPATCH_WALLTIME_NOW1 = -2; - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock - fromFunctionPointer(ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2, ffi.Pointer arg3)>> ptr) => - objc.ObjCBlock< - ffi.Void Function(NSCondition, NSURLSession, - NSURLSessionDownloadTask, objc.NSURL)>( - objc.newPointerBlock( - _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_fnPtrCallable, - ptr.cast()), - retain: false, - release: true); +const int noErr9 = 0; - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - static objc.ObjCBlock fromFunction(void Function(NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL) fn) => - objc.ObjCBlock( - objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_closureCallable, - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn( - NSCondition.castFromPointer(arg0, retain: true, release: true), - NSURLSession.castFromPointer(arg1, retain: true, release: true), - NSURLSessionDownloadTask.castFromPointer(arg2, retain: true, release: true), - objc.NSURL.castFromPointer(arg3, retain: true, release: true))), - retain: false, - release: true); +const int kNilOptions9 = 0; - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - static objc.ObjCBlock< - ffi.Void Function(NSCondition, NSURLSession, NSURLSessionDownloadTask, - objc.NSURL)> listener( - void Function( - NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL) - fn) { - final raw = objc.newClosureBlock( - _ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_listenerCallable - .nativeFunction - .cast(), - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3) => - fn( - NSCondition.castFromPointer(arg0, retain: false, release: true), - NSURLSession.castFromPointer(arg1, - retain: false, release: true), - NSURLSessionDownloadTask.castFromPointer(arg2, - retain: false, release: true), - objc.NSURL - .castFromPointer(arg3, retain: false, release: true))); - final wrapper = _wrapListenerBlock_19b8ge5(raw); - objc.objectRelease(raw.cast()); - return objc.ObjCBlock< - ffi.Void Function(NSCondition, NSURLSession, NSURLSessionDownloadTask, - objc.NSURL)>(wrapper, retain: false, release: true); - } -} +const int kVariableLengthArray9 = 1; -/// Call operator for `objc.ObjCBlock`. -extension ObjCBlock_ffiVoid_NSCondition_NSURLSession_NSURLSessionDownloadTask_NSURL_CallExtension - on objc.ObjCBlock< - ffi.Void Function( - NSCondition, NSURLSession, NSURLSessionDownloadTask, objc.NSURL)> { - void call(NSCondition arg0, NSURLSession arg1, NSURLSessionDownloadTask arg2, - objc.NSURL arg3) => - ref.pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - ref.pointer, - arg0.ref.pointer, - arg1.ref.pointer, - arg2.ref.pointer, - arg3.ref.pointer); -} +const int kUnknownType9 = 1061109567; -/// NSCondition -class NSCondition extends objc.NSObject { - NSCondition._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super.castFromPointer(pointer, retain: retain, release: release); +const int normal9 = 0; - /// Constructs a [NSCondition] that points to the same underlying object as [other]. - NSCondition.castFrom(objc.ObjCObjectBase other) - : this._(other.ref.pointer, retain: true, release: true); +const int bold9 = 1; - /// Constructs a [NSCondition] that wraps the given raw object pointer. - NSCondition.castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) - : this._(other, retain: retain, release: release); +const int italic9 = 2; - /// Returns whether [obj] is an instance of [NSCondition]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_l8lotg( - obj.ref.pointer, _sel_isKindOfClass_, _class_NSCondition); - } +const int underline9 = 4; - /// wait - void wait1() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_wait); - } +const int outline9 = 8; - /// waitUntilDate: - bool waitUntilDate_(objc.NSDate limit) { - return _objc_msgSend_l8lotg( - this.ref.pointer, _sel_waitUntilDate_, limit.ref.pointer); - } +const int shadow9 = 16; - /// signal - void signal() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_signal); - } +const int condense9 = 32; - /// broadcast - void broadcast() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_broadcast); - } +const int extend9 = 64; - /// name - objc.NSString? get name { - final _ret = _objc_msgSend_1unuoxw(this.ref.pointer, _sel_name); - return _ret.address == 0 - ? null - : objc.NSString.castFromPointer(_ret, retain: true, release: true); - } +const int developStage9 = 32; - /// setName: - set name(objc.NSString? value) { - return _objc_msgSend_ukcdfq( - this.ref.pointer, _sel_setName_, value?.ref.pointer ?? ffi.nullptr); - } +const int alphaStage9 = 64; - /// init - NSCondition init() { - final _ret = - _objc_msgSend_1unuoxw(this.ref.retainAndReturnPointer(), _sel_init); - return NSCondition.castFromPointer(_ret, retain: false, release: true); - } +const int betaStage9 = 96; - /// new - static NSCondition new1() { - final _ret = _objc_msgSend_1unuoxw(_class_NSCondition, _sel_new); - return NSCondition.castFromPointer(_ret, retain: false, release: true); - } +const int finalStage9 = 128; - /// allocWithZone: - static NSCondition allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_1b3ihd0(_class_NSCondition, _sel_allocWithZone_, zone); - return NSCondition.castFromPointer(_ret, retain: false, release: true); - } +const int NSScannedOption9 = 1; - /// alloc - static NSCondition alloc() { - final _ret = _objc_msgSend_1unuoxw(_class_NSCondition, _sel_alloc); - return NSCondition.castFromPointer(_ret, retain: false, release: true); - } +const int NSCollectorDisabledOption9 = 2; - /// lock - void lock() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_lock); - } +const int noErr10 = 0; - /// unlock - void unlock() { - _objc_msgSend_ksby9f(this.ref.pointer, _sel_unlock); - } -} +const int kNilOptions10 = 0; -late final _class_NSCondition = objc.getClass("NSCondition"); -late final _sel_wait = objc.registerName("wait"); -late final _sel_waitUntilDate_ = objc.registerName("waitUntilDate:"); -final _objc_msgSend_l8lotg = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_signal = objc.registerName("signal"); -late final _sel_broadcast = objc.registerName("broadcast"); +const int kVariableLengthArray10 = 1; -const int noErr = 0; +const int kUnknownType10 = 1061109567; -const int kNilOptions = 0; +const int normal10 = 0; -const int kVariableLengthArray = 1; +const int bold10 = 1; -const int kUnknownType = 1061109567; +const int italic10 = 2; -const int normal = 0; +const int underline10 = 4; -const int bold = 1; +const int outline10 = 8; -const int italic = 2; +const int shadow10 = 16; -const int underline = 4; +const int condense10 = 32; -const int outline = 8; +const int extend10 = 64; -const int shadow = 16; +const int developStage10 = 32; -const int condense = 32; +const int alphaStage10 = 64; -const int extend = 64; +const int betaStage10 = 96; -const int developStage = 32; +const int finalStage10 = 128; -const int alphaStage = 64; +const int NSScannedOption10 = 1; -const int betaStage = 96; +const int NSCollectorDisabledOption10 = 2; -const int finalStage = 128; +const int noErr11 = 0; -const int NSScannedOption = 1; +const int kNilOptions11 = 0; -const int NSCollectorDisabledOption = 2; +const int kVariableLengthArray11 = 1; -const int errSecSuccess = 0; +const int kUnknownType11 = 1061109567; -const int errSecUnimplemented = -4; +const int normal11 = 0; -const int errSecDiskFull = -34; +const int bold11 = 1; -const int errSecDskFull = -34; +const int italic11 = 2; -const int errSecIO = -36; +const int underline11 = 4; -const int errSecOpWr = -49; +const int outline11 = 8; -const int errSecParam = -50; +const int shadow11 = 16; -const int errSecWrPerm = -61; +const int condense11 = 32; -const int errSecAllocate = -108; +const int extend11 = 64; -const int errSecUserCanceled = -128; +const int developStage11 = 32; -const int errSecBadReq = -909; +const int alphaStage11 = 64; -const int errSecInternalComponent = -2070; +const int betaStage11 = 96; -const int errSecCoreFoundationUnknown = -4960; +const int finalStage11 = 128; -const int errSecMissingEntitlement = -34018; +const int NSScannedOption11 = 1; -const int errSecRestrictedAPI = -34020; +const int NSCollectorDisabledOption11 = 2; -const int errSecNotAvailable = -25291; +const int NSASCIIStringEncoding2 = 1; -const int errSecReadOnly = -25292; +const int NSNEXTSTEPStringEncoding2 = 2; -const int errSecAuthFailed = -25293; +const int NSJapaneseEUCStringEncoding2 = 3; -const int errSecNoSuchKeychain = -25294; +const int NSUTF8StringEncoding2 = 4; -const int errSecInvalidKeychain = -25295; +const int NSISOLatin1StringEncoding2 = 5; -const int errSecDuplicateKeychain = -25296; +const int NSSymbolStringEncoding2 = 6; -const int errSecDuplicateCallback = -25297; +const int NSNonLossyASCIIStringEncoding2 = 7; -const int errSecInvalidCallback = -25298; +const int NSShiftJISStringEncoding2 = 8; -const int errSecDuplicateItem = -25299; +const int NSISOLatin2StringEncoding2 = 9; -const int errSecItemNotFound = -25300; +const int NSUnicodeStringEncoding2 = 10; -const int errSecBufferTooSmall = -25301; +const int NSWindowsCP1251StringEncoding2 = 11; -const int errSecDataTooLarge = -25302; +const int NSWindowsCP1252StringEncoding2 = 12; -const int errSecNoSuchAttr = -25303; +const int NSWindowsCP1253StringEncoding2 = 13; -const int errSecInvalidItemRef = -25304; +const int NSWindowsCP1254StringEncoding2 = 14; -const int errSecInvalidSearchRef = -25305; +const int NSWindowsCP1250StringEncoding2 = 15; -const int errSecNoSuchClass = -25306; +const int NSISO2022JPStringEncoding2 = 21; -const int errSecNoDefaultKeychain = -25307; +const int NSMacOSRomanStringEncoding2 = 30; -const int errSecInteractionNotAllowed = -25308; +const int NSUTF16StringEncoding2 = 10; -const int errSecReadOnlyAttr = -25309; +const int NSUTF16BigEndianStringEncoding2 = 2415919360; -const int errSecWrongSecVersion = -25310; +const int NSUTF16LittleEndianStringEncoding2 = 2483028224; -const int errSecKeySizeNotAllowed = -25311; +const int NSUTF32StringEncoding2 = 2348810496; -const int errSecNoStorageModule = -25312; +const int NSUTF32BigEndianStringEncoding2 = 2550137088; -const int errSecNoCertificateModule = -25313; +const int NSUTF32LittleEndianStringEncoding2 = 2617245952; -const int errSecNoPolicyModule = -25314; +const int NSProprietaryStringEncoding2 = 65536; -const int errSecInteractionRequired = -25315; +const int NSOpenStepUnicodeReservedBase1 = 62464; -const int errSecDataNotAvailable = -25316; +const int errSecSuccess1 = 0; -const int errSecDataNotModifiable = -25317; +const int errSecUnimplemented1 = -4; -const int errSecCreateChainFailed = -25318; +const int errSecDiskFull1 = -34; -const int errSecInvalidPrefsDomain = -25319; +const int errSecDskFull1 = -34; -const int errSecInDarkWake = -25320; +const int errSecIO1 = -36; -const int errSecACLNotSimple = -25240; +const int errSecOpWr1 = -49; -const int errSecPolicyNotFound = -25241; +const int errSecParam1 = -50; -const int errSecInvalidTrustSetting = -25242; +const int errSecWrPerm1 = -61; -const int errSecNoAccessForItem = -25243; +const int errSecAllocate1 = -108; -const int errSecInvalidOwnerEdit = -25244; +const int errSecUserCanceled1 = -128; -const int errSecTrustNotAvailable = -25245; +const int errSecBadReq1 = -909; -const int errSecUnsupportedFormat = -25256; +const int errSecInternalComponent1 = -2070; -const int errSecUnknownFormat = -25257; +const int errSecCoreFoundationUnknown1 = -4960; -const int errSecKeyIsSensitive = -25258; +const int errSecMissingEntitlement1 = -34018; -const int errSecMultiplePrivKeys = -25259; +const int errSecRestrictedAPI1 = -34020; -const int errSecPassphraseRequired = -25260; +const int errSecNotAvailable1 = -25291; -const int errSecInvalidPasswordRef = -25261; +const int errSecReadOnly1 = -25292; -const int errSecInvalidTrustSettings = -25262; +const int errSecAuthFailed1 = -25293; -const int errSecNoTrustSettings = -25263; +const int errSecNoSuchKeychain1 = -25294; -const int errSecPkcs12VerifyFailure = -25264; +const int errSecInvalidKeychain1 = -25295; -const int errSecNotSigner = -26267; +const int errSecDuplicateKeychain1 = -25296; -const int errSecDecode = -26275; +const int errSecDuplicateCallback1 = -25297; -const int errSecServiceNotAvailable = -67585; +const int errSecInvalidCallback1 = -25298; -const int errSecInsufficientClientID = -67586; +const int errSecDuplicateItem1 = -25299; -const int errSecDeviceReset = -67587; +const int errSecItemNotFound1 = -25300; -const int errSecDeviceFailed = -67588; +const int errSecBufferTooSmall1 = -25301; -const int errSecAppleAddAppACLSubject = -67589; +const int errSecDataTooLarge1 = -25302; -const int errSecApplePublicKeyIncomplete = -67590; +const int errSecNoSuchAttr1 = -25303; -const int errSecAppleSignatureMismatch = -67591; +const int errSecInvalidItemRef1 = -25304; -const int errSecAppleInvalidKeyStartDate = -67592; +const int errSecInvalidSearchRef1 = -25305; -const int errSecAppleInvalidKeyEndDate = -67593; +const int errSecNoSuchClass1 = -25306; -const int errSecConversionError = -67594; +const int errSecNoDefaultKeychain1 = -25307; -const int errSecAppleSSLv2Rollback = -67595; +const int errSecInteractionNotAllowed1 = -25308; -const int errSecQuotaExceeded = -67596; +const int errSecReadOnlyAttr1 = -25309; -const int errSecFileTooBig = -67597; +const int errSecWrongSecVersion1 = -25310; -const int errSecInvalidDatabaseBlob = -67598; +const int errSecKeySizeNotAllowed1 = -25311; -const int errSecInvalidKeyBlob = -67599; +const int errSecNoStorageModule1 = -25312; -const int errSecIncompatibleDatabaseBlob = -67600; +const int errSecNoCertificateModule1 = -25313; -const int errSecIncompatibleKeyBlob = -67601; +const int errSecNoPolicyModule1 = -25314; -const int errSecHostNameMismatch = -67602; +const int errSecInteractionRequired1 = -25315; -const int errSecUnknownCriticalExtensionFlag = -67603; +const int errSecDataNotAvailable1 = -25316; -const int errSecNoBasicConstraints = -67604; +const int errSecDataNotModifiable1 = -25317; -const int errSecNoBasicConstraintsCA = -67605; +const int errSecCreateChainFailed1 = -25318; -const int errSecInvalidAuthorityKeyID = -67606; +const int errSecInvalidPrefsDomain1 = -25319; -const int errSecInvalidSubjectKeyID = -67607; +const int errSecInDarkWake1 = -25320; -const int errSecInvalidKeyUsageForPolicy = -67608; +const int errSecACLNotSimple1 = -25240; -const int errSecInvalidExtendedKeyUsage = -67609; +const int errSecPolicyNotFound1 = -25241; -const int errSecInvalidIDLinkage = -67610; +const int errSecInvalidTrustSetting1 = -25242; -const int errSecPathLengthConstraintExceeded = -67611; +const int errSecNoAccessForItem1 = -25243; -const int errSecInvalidRoot = -67612; +const int errSecInvalidOwnerEdit1 = -25244; -const int errSecCRLExpired = -67613; +const int errSecTrustNotAvailable1 = -25245; -const int errSecCRLNotValidYet = -67614; +const int errSecUnsupportedFormat1 = -25256; -const int errSecCRLNotFound = -67615; +const int errSecUnknownFormat1 = -25257; -const int errSecCRLServerDown = -67616; +const int errSecKeyIsSensitive1 = -25258; -const int errSecCRLBadURI = -67617; +const int errSecMultiplePrivKeys1 = -25259; -const int errSecUnknownCertExtension = -67618; +const int errSecPassphraseRequired1 = -25260; -const int errSecUnknownCRLExtension = -67619; +const int errSecInvalidPasswordRef1 = -25261; -const int errSecCRLNotTrusted = -67620; +const int errSecInvalidTrustSettings1 = -25262; -const int errSecCRLPolicyFailed = -67621; +const int errSecNoTrustSettings1 = -25263; -const int errSecIDPFailure = -67622; +const int errSecPkcs12VerifyFailure1 = -25264; -const int errSecSMIMEEmailAddressesNotFound = -67623; +const int errSecNotSigner1 = -26267; -const int errSecSMIMEBadExtendedKeyUsage = -67624; +const int errSecDecode1 = -26275; -const int errSecSMIMEBadKeyUsage = -67625; +const int errSecServiceNotAvailable1 = -67585; -const int errSecSMIMEKeyUsageNotCritical = -67626; +const int errSecInsufficientClientID1 = -67586; -const int errSecSMIMENoEmailAddress = -67627; +const int errSecDeviceReset1 = -67587; -const int errSecSMIMESubjAltNameNotCritical = -67628; +const int errSecDeviceFailed1 = -67588; -const int errSecSSLBadExtendedKeyUsage = -67629; +const int errSecAppleAddAppACLSubject1 = -67589; -const int errSecOCSPBadResponse = -67630; +const int errSecApplePublicKeyIncomplete1 = -67590; -const int errSecOCSPBadRequest = -67631; +const int errSecAppleSignatureMismatch1 = -67591; -const int errSecOCSPUnavailable = -67632; +const int errSecAppleInvalidKeyStartDate1 = -67592; -const int errSecOCSPStatusUnrecognized = -67633; +const int errSecAppleInvalidKeyEndDate1 = -67593; -const int errSecEndOfData = -67634; +const int errSecConversionError1 = -67594; -const int errSecIncompleteCertRevocationCheck = -67635; +const int errSecAppleSSLv2Rollback1 = -67595; -const int errSecNetworkFailure = -67636; +const int errSecQuotaExceeded1 = -67596; -const int errSecOCSPNotTrustedToAnchor = -67637; +const int errSecFileTooBig1 = -67597; -const int errSecRecordModified = -67638; +const int errSecInvalidDatabaseBlob1 = -67598; -const int errSecOCSPSignatureError = -67639; +const int errSecInvalidKeyBlob1 = -67599; -const int errSecOCSPNoSigner = -67640; +const int errSecIncompatibleDatabaseBlob1 = -67600; -const int errSecOCSPResponderMalformedReq = -67641; +const int errSecIncompatibleKeyBlob1 = -67601; -const int errSecOCSPResponderInternalError = -67642; +const int errSecHostNameMismatch1 = -67602; -const int errSecOCSPResponderTryLater = -67643; +const int errSecUnknownCriticalExtensionFlag1 = -67603; -const int errSecOCSPResponderSignatureRequired = -67644; +const int errSecNoBasicConstraints1 = -67604; -const int errSecOCSPResponderUnauthorized = -67645; +const int errSecNoBasicConstraintsCA1 = -67605; -const int errSecOCSPResponseNonceMismatch = -67646; +const int errSecInvalidAuthorityKeyID1 = -67606; -const int errSecCodeSigningBadCertChainLength = -67647; +const int errSecInvalidSubjectKeyID1 = -67607; -const int errSecCodeSigningNoBasicConstraints = -67648; +const int errSecInvalidKeyUsageForPolicy1 = -67608; -const int errSecCodeSigningBadPathLengthConstraint = -67649; +const int errSecInvalidExtendedKeyUsage1 = -67609; -const int errSecCodeSigningNoExtendedKeyUsage = -67650; +const int errSecInvalidIDLinkage1 = -67610; -const int errSecCodeSigningDevelopment = -67651; +const int errSecPathLengthConstraintExceeded1 = -67611; -const int errSecResourceSignBadCertChainLength = -67652; +const int errSecInvalidRoot1 = -67612; -const int errSecResourceSignBadExtKeyUsage = -67653; +const int errSecCRLExpired1 = -67613; -const int errSecTrustSettingDeny = -67654; +const int errSecCRLNotValidYet1 = -67614; -const int errSecInvalidSubjectName = -67655; +const int errSecCRLNotFound1 = -67615; -const int errSecUnknownQualifiedCertStatement = -67656; +const int errSecCRLServerDown1 = -67616; -const int errSecMobileMeRequestQueued = -67657; +const int errSecCRLBadURI1 = -67617; -const int errSecMobileMeRequestRedirected = -67658; +const int errSecUnknownCertExtension1 = -67618; -const int errSecMobileMeServerError = -67659; +const int errSecUnknownCRLExtension1 = -67619; -const int errSecMobileMeServerNotAvailable = -67660; +const int errSecCRLNotTrusted1 = -67620; -const int errSecMobileMeServerAlreadyExists = -67661; +const int errSecCRLPolicyFailed1 = -67621; -const int errSecMobileMeServerServiceErr = -67662; +const int errSecIDPFailure1 = -67622; -const int errSecMobileMeRequestAlreadyPending = -67663; +const int errSecSMIMEEmailAddressesNotFound1 = -67623; -const int errSecMobileMeNoRequestPending = -67664; +const int errSecSMIMEBadExtendedKeyUsage1 = -67624; -const int errSecMobileMeCSRVerifyFailure = -67665; +const int errSecSMIMEBadKeyUsage1 = -67625; -const int errSecMobileMeFailedConsistencyCheck = -67666; +const int errSecSMIMEKeyUsageNotCritical1 = -67626; -const int errSecNotInitialized = -67667; +const int errSecSMIMENoEmailAddress1 = -67627; -const int errSecInvalidHandleUsage = -67668; +const int errSecSMIMESubjAltNameNotCritical1 = -67628; -const int errSecPVCReferentNotFound = -67669; +const int errSecSSLBadExtendedKeyUsage1 = -67629; -const int errSecFunctionIntegrityFail = -67670; +const int errSecOCSPBadResponse1 = -67630; -const int errSecInternalError = -67671; +const int errSecOCSPBadRequest1 = -67631; -const int errSecMemoryError = -67672; +const int errSecOCSPUnavailable1 = -67632; -const int errSecInvalidData = -67673; +const int errSecOCSPStatusUnrecognized1 = -67633; -const int errSecMDSError = -67674; +const int errSecEndOfData1 = -67634; -const int errSecInvalidPointer = -67675; +const int errSecIncompleteCertRevocationCheck1 = -67635; -const int errSecSelfCheckFailed = -67676; +const int errSecNetworkFailure1 = -67636; -const int errSecFunctionFailed = -67677; +const int errSecOCSPNotTrustedToAnchor1 = -67637; -const int errSecModuleManifestVerifyFailed = -67678; +const int errSecRecordModified1 = -67638; -const int errSecInvalidGUID = -67679; +const int errSecOCSPSignatureError1 = -67639; -const int errSecInvalidHandle = -67680; +const int errSecOCSPNoSigner1 = -67640; -const int errSecInvalidDBList = -67681; +const int errSecOCSPResponderMalformedReq1 = -67641; -const int errSecInvalidPassthroughID = -67682; +const int errSecOCSPResponderInternalError1 = -67642; -const int errSecInvalidNetworkAddress = -67683; +const int errSecOCSPResponderTryLater1 = -67643; -const int errSecCRLAlreadySigned = -67684; +const int errSecOCSPResponderSignatureRequired1 = -67644; -const int errSecInvalidNumberOfFields = -67685; +const int errSecOCSPResponderUnauthorized1 = -67645; -const int errSecVerificationFailure = -67686; +const int errSecOCSPResponseNonceMismatch1 = -67646; -const int errSecUnknownTag = -67687; +const int errSecCodeSigningBadCertChainLength1 = -67647; -const int errSecInvalidSignature = -67688; +const int errSecCodeSigningNoBasicConstraints1 = -67648; -const int errSecInvalidName = -67689; +const int errSecCodeSigningBadPathLengthConstraint1 = -67649; -const int errSecInvalidCertificateRef = -67690; +const int errSecCodeSigningNoExtendedKeyUsage1 = -67650; -const int errSecInvalidCertificateGroup = -67691; +const int errSecCodeSigningDevelopment1 = -67651; -const int errSecTagNotFound = -67692; +const int errSecResourceSignBadCertChainLength1 = -67652; -const int errSecInvalidQuery = -67693; +const int errSecResourceSignBadExtKeyUsage1 = -67653; -const int errSecInvalidValue = -67694; +const int errSecTrustSettingDeny1 = -67654; -const int errSecCallbackFailed = -67695; +const int errSecInvalidSubjectName1 = -67655; -const int errSecACLDeleteFailed = -67696; +const int errSecUnknownQualifiedCertStatement1 = -67656; -const int errSecACLReplaceFailed = -67697; +const int errSecMobileMeRequestQueued1 = -67657; -const int errSecACLAddFailed = -67698; +const int errSecMobileMeRequestRedirected1 = -67658; -const int errSecACLChangeFailed = -67699; +const int errSecMobileMeServerError1 = -67659; -const int errSecInvalidAccessCredentials = -67700; +const int errSecMobileMeServerNotAvailable1 = -67660; -const int errSecInvalidRecord = -67701; +const int errSecMobileMeServerAlreadyExists1 = -67661; -const int errSecInvalidACL = -67702; +const int errSecMobileMeServerServiceErr1 = -67662; -const int errSecInvalidSampleValue = -67703; +const int errSecMobileMeRequestAlreadyPending1 = -67663; -const int errSecIncompatibleVersion = -67704; +const int errSecMobileMeNoRequestPending1 = -67664; -const int errSecPrivilegeNotGranted = -67705; +const int errSecMobileMeCSRVerifyFailure1 = -67665; -const int errSecInvalidScope = -67706; +const int errSecMobileMeFailedConsistencyCheck1 = -67666; -const int errSecPVCAlreadyConfigured = -67707; +const int errSecNotInitialized1 = -67667; -const int errSecInvalidPVC = -67708; +const int errSecInvalidHandleUsage1 = -67668; -const int errSecEMMLoadFailed = -67709; +const int errSecPVCReferentNotFound1 = -67669; -const int errSecEMMUnloadFailed = -67710; +const int errSecFunctionIntegrityFail1 = -67670; -const int errSecAddinLoadFailed = -67711; +const int errSecInternalError1 = -67671; -const int errSecInvalidKeyRef = -67712; +const int errSecMemoryError1 = -67672; -const int errSecInvalidKeyHierarchy = -67713; +const int errSecInvalidData1 = -67673; -const int errSecAddinUnloadFailed = -67714; +const int errSecMDSError1 = -67674; -const int errSecLibraryReferenceNotFound = -67715; +const int errSecInvalidPointer1 = -67675; -const int errSecInvalidAddinFunctionTable = -67716; +const int errSecSelfCheckFailed1 = -67676; -const int errSecInvalidServiceMask = -67717; +const int errSecFunctionFailed1 = -67677; -const int errSecModuleNotLoaded = -67718; +const int errSecModuleManifestVerifyFailed1 = -67678; -const int errSecInvalidSubServiceID = -67719; +const int errSecInvalidGUID1 = -67679; -const int errSecAttributeNotInContext = -67720; +const int errSecInvalidHandle1 = -67680; -const int errSecModuleManagerInitializeFailed = -67721; +const int errSecInvalidDBList1 = -67681; -const int errSecModuleManagerNotFound = -67722; +const int errSecInvalidPassthroughID1 = -67682; -const int errSecEventNotificationCallbackNotFound = -67723; +const int errSecInvalidNetworkAddress1 = -67683; -const int errSecInputLengthError = -67724; +const int errSecCRLAlreadySigned1 = -67684; -const int errSecOutputLengthError = -67725; +const int errSecInvalidNumberOfFields1 = -67685; -const int errSecPrivilegeNotSupported = -67726; +const int errSecVerificationFailure1 = -67686; -const int errSecDeviceError = -67727; +const int errSecUnknownTag1 = -67687; -const int errSecAttachHandleBusy = -67728; +const int errSecInvalidSignature1 = -67688; -const int errSecNotLoggedIn = -67729; +const int errSecInvalidName1 = -67689; -const int errSecAlgorithmMismatch = -67730; +const int errSecInvalidCertificateRef1 = -67690; -const int errSecKeyUsageIncorrect = -67731; +const int errSecInvalidCertificateGroup1 = -67691; -const int errSecKeyBlobTypeIncorrect = -67732; +const int errSecTagNotFound1 = -67692; -const int errSecKeyHeaderInconsistent = -67733; +const int errSecInvalidQuery1 = -67693; -const int errSecUnsupportedKeyFormat = -67734; +const int errSecInvalidValue1 = -67694; -const int errSecUnsupportedKeySize = -67735; +const int errSecCallbackFailed1 = -67695; -const int errSecInvalidKeyUsageMask = -67736; +const int errSecACLDeleteFailed1 = -67696; -const int errSecUnsupportedKeyUsageMask = -67737; +const int errSecACLReplaceFailed1 = -67697; -const int errSecInvalidKeyAttributeMask = -67738; +const int errSecACLAddFailed1 = -67698; -const int errSecUnsupportedKeyAttributeMask = -67739; +const int errSecACLChangeFailed1 = -67699; -const int errSecInvalidKeyLabel = -67740; +const int errSecInvalidAccessCredentials1 = -67700; -const int errSecUnsupportedKeyLabel = -67741; +const int errSecInvalidRecord1 = -67701; -const int errSecInvalidKeyFormat = -67742; +const int errSecInvalidACL1 = -67702; -const int errSecUnsupportedVectorOfBuffers = -67743; +const int errSecInvalidSampleValue1 = -67703; -const int errSecInvalidInputVector = -67744; +const int errSecIncompatibleVersion1 = -67704; -const int errSecInvalidOutputVector = -67745; +const int errSecPrivilegeNotGranted1 = -67705; -const int errSecInvalidContext = -67746; +const int errSecInvalidScope1 = -67706; -const int errSecInvalidAlgorithm = -67747; +const int errSecPVCAlreadyConfigured1 = -67707; -const int errSecInvalidAttributeKey = -67748; +const int errSecInvalidPVC1 = -67708; -const int errSecMissingAttributeKey = -67749; +const int errSecEMMLoadFailed1 = -67709; -const int errSecInvalidAttributeInitVector = -67750; +const int errSecEMMUnloadFailed1 = -67710; -const int errSecMissingAttributeInitVector = -67751; +const int errSecAddinLoadFailed1 = -67711; -const int errSecInvalidAttributeSalt = -67752; +const int errSecInvalidKeyRef1 = -67712; -const int errSecMissingAttributeSalt = -67753; +const int errSecInvalidKeyHierarchy1 = -67713; -const int errSecInvalidAttributePadding = -67754; +const int errSecAddinUnloadFailed1 = -67714; -const int errSecMissingAttributePadding = -67755; +const int errSecLibraryReferenceNotFound1 = -67715; -const int errSecInvalidAttributeRandom = -67756; +const int errSecInvalidAddinFunctionTable1 = -67716; -const int errSecMissingAttributeRandom = -67757; +const int errSecInvalidServiceMask1 = -67717; -const int errSecInvalidAttributeSeed = -67758; +const int errSecModuleNotLoaded1 = -67718; -const int errSecMissingAttributeSeed = -67759; +const int errSecInvalidSubServiceID1 = -67719; -const int errSecInvalidAttributePassphrase = -67760; +const int errSecAttributeNotInContext1 = -67720; -const int errSecMissingAttributePassphrase = -67761; +const int errSecModuleManagerInitializeFailed1 = -67721; -const int errSecInvalidAttributeKeyLength = -67762; +const int errSecModuleManagerNotFound1 = -67722; -const int errSecMissingAttributeKeyLength = -67763; +const int errSecEventNotificationCallbackNotFound1 = -67723; -const int errSecInvalidAttributeBlockSize = -67764; +const int errSecInputLengthError1 = -67724; -const int errSecMissingAttributeBlockSize = -67765; +const int errSecOutputLengthError1 = -67725; -const int errSecInvalidAttributeOutputSize = -67766; +const int errSecPrivilegeNotSupported1 = -67726; -const int errSecMissingAttributeOutputSize = -67767; +const int errSecDeviceError1 = -67727; -const int errSecInvalidAttributeRounds = -67768; +const int errSecAttachHandleBusy1 = -67728; -const int errSecMissingAttributeRounds = -67769; +const int errSecNotLoggedIn1 = -67729; -const int errSecInvalidAlgorithmParms = -67770; +const int errSecAlgorithmMismatch1 = -67730; -const int errSecMissingAlgorithmParms = -67771; +const int errSecKeyUsageIncorrect1 = -67731; -const int errSecInvalidAttributeLabel = -67772; +const int errSecKeyBlobTypeIncorrect1 = -67732; -const int errSecMissingAttributeLabel = -67773; +const int errSecKeyHeaderInconsistent1 = -67733; -const int errSecInvalidAttributeKeyType = -67774; +const int errSecUnsupportedKeyFormat1 = -67734; -const int errSecMissingAttributeKeyType = -67775; +const int errSecUnsupportedKeySize1 = -67735; -const int errSecInvalidAttributeMode = -67776; +const int errSecInvalidKeyUsageMask1 = -67736; -const int errSecMissingAttributeMode = -67777; +const int errSecUnsupportedKeyUsageMask1 = -67737; -const int errSecInvalidAttributeEffectiveBits = -67778; +const int errSecInvalidKeyAttributeMask1 = -67738; -const int errSecMissingAttributeEffectiveBits = -67779; +const int errSecUnsupportedKeyAttributeMask1 = -67739; -const int errSecInvalidAttributeStartDate = -67780; +const int errSecInvalidKeyLabel1 = -67740; -const int errSecMissingAttributeStartDate = -67781; +const int errSecUnsupportedKeyLabel1 = -67741; -const int errSecInvalidAttributeEndDate = -67782; +const int errSecInvalidKeyFormat1 = -67742; -const int errSecMissingAttributeEndDate = -67783; +const int errSecUnsupportedVectorOfBuffers1 = -67743; -const int errSecInvalidAttributeVersion = -67784; +const int errSecInvalidInputVector1 = -67744; -const int errSecMissingAttributeVersion = -67785; +const int errSecInvalidOutputVector1 = -67745; -const int errSecInvalidAttributePrime = -67786; +const int errSecInvalidContext1 = -67746; -const int errSecMissingAttributePrime = -67787; +const int errSecInvalidAlgorithm1 = -67747; -const int errSecInvalidAttributeBase = -67788; +const int errSecInvalidAttributeKey1 = -67748; -const int errSecMissingAttributeBase = -67789; +const int errSecMissingAttributeKey1 = -67749; -const int errSecInvalidAttributeSubprime = -67790; +const int errSecInvalidAttributeInitVector1 = -67750; -const int errSecMissingAttributeSubprime = -67791; +const int errSecMissingAttributeInitVector1 = -67751; -const int errSecInvalidAttributeIterationCount = -67792; +const int errSecInvalidAttributeSalt1 = -67752; -const int errSecMissingAttributeIterationCount = -67793; +const int errSecMissingAttributeSalt1 = -67753; -const int errSecInvalidAttributeDLDBHandle = -67794; +const int errSecInvalidAttributePadding1 = -67754; -const int errSecMissingAttributeDLDBHandle = -67795; +const int errSecMissingAttributePadding1 = -67755; -const int errSecInvalidAttributeAccessCredentials = -67796; +const int errSecInvalidAttributeRandom1 = -67756; -const int errSecMissingAttributeAccessCredentials = -67797; +const int errSecMissingAttributeRandom1 = -67757; -const int errSecInvalidAttributePublicKeyFormat = -67798; +const int errSecInvalidAttributeSeed1 = -67758; -const int errSecMissingAttributePublicKeyFormat = -67799; +const int errSecMissingAttributeSeed1 = -67759; -const int errSecInvalidAttributePrivateKeyFormat = -67800; +const int errSecInvalidAttributePassphrase1 = -67760; -const int errSecMissingAttributePrivateKeyFormat = -67801; +const int errSecMissingAttributePassphrase1 = -67761; -const int errSecInvalidAttributeSymmetricKeyFormat = -67802; +const int errSecInvalidAttributeKeyLength1 = -67762; -const int errSecMissingAttributeSymmetricKeyFormat = -67803; +const int errSecMissingAttributeKeyLength1 = -67763; -const int errSecInvalidAttributeWrappedKeyFormat = -67804; +const int errSecInvalidAttributeBlockSize1 = -67764; -const int errSecMissingAttributeWrappedKeyFormat = -67805; +const int errSecMissingAttributeBlockSize1 = -67765; -const int errSecStagedOperationInProgress = -67806; +const int errSecInvalidAttributeOutputSize1 = -67766; -const int errSecStagedOperationNotStarted = -67807; +const int errSecMissingAttributeOutputSize1 = -67767; -const int errSecVerifyFailed = -67808; +const int errSecInvalidAttributeRounds1 = -67768; + +const int errSecMissingAttributeRounds1 = -67769; + +const int errSecInvalidAlgorithmParms1 = -67770; + +const int errSecMissingAlgorithmParms1 = -67771; + +const int errSecInvalidAttributeLabel1 = -67772; + +const int errSecMissingAttributeLabel1 = -67773; + +const int errSecInvalidAttributeKeyType1 = -67774; + +const int errSecMissingAttributeKeyType1 = -67775; + +const int errSecInvalidAttributeMode1 = -67776; + +const int errSecMissingAttributeMode1 = -67777; + +const int errSecInvalidAttributeEffectiveBits1 = -67778; + +const int errSecMissingAttributeEffectiveBits1 = -67779; + +const int errSecInvalidAttributeStartDate1 = -67780; + +const int errSecMissingAttributeStartDate1 = -67781; + +const int errSecInvalidAttributeEndDate1 = -67782; + +const int errSecMissingAttributeEndDate1 = -67783; -const int errSecQuerySizeUnknown = -67809; +const int errSecInvalidAttributeVersion1 = -67784; -const int errSecBlockSizeMismatch = -67810; +const int errSecMissingAttributeVersion1 = -67785; -const int errSecPublicKeyInconsistent = -67811; +const int errSecInvalidAttributePrime1 = -67786; -const int errSecDeviceVerifyFailed = -67812; +const int errSecMissingAttributePrime1 = -67787; -const int errSecInvalidLoginName = -67813; +const int errSecInvalidAttributeBase1 = -67788; -const int errSecAlreadyLoggedIn = -67814; +const int errSecMissingAttributeBase1 = -67789; -const int errSecInvalidDigestAlgorithm = -67815; +const int errSecInvalidAttributeSubprime1 = -67790; -const int errSecInvalidCRLGroup = -67816; +const int errSecMissingAttributeSubprime1 = -67791; -const int errSecCertificateCannotOperate = -67817; +const int errSecInvalidAttributeIterationCount1 = -67792; -const int errSecCertificateExpired = -67818; +const int errSecMissingAttributeIterationCount1 = -67793; -const int errSecCertificateNotValidYet = -67819; +const int errSecInvalidAttributeDLDBHandle1 = -67794; -const int errSecCertificateRevoked = -67820; +const int errSecMissingAttributeDLDBHandle1 = -67795; -const int errSecCertificateSuspended = -67821; +const int errSecInvalidAttributeAccessCredentials1 = -67796; -const int errSecInsufficientCredentials = -67822; +const int errSecMissingAttributeAccessCredentials1 = -67797; -const int errSecInvalidAction = -67823; +const int errSecInvalidAttributePublicKeyFormat1 = -67798; -const int errSecInvalidAuthority = -67824; +const int errSecMissingAttributePublicKeyFormat1 = -67799; -const int errSecVerifyActionFailed = -67825; +const int errSecInvalidAttributePrivateKeyFormat1 = -67800; -const int errSecInvalidCertAuthority = -67826; +const int errSecMissingAttributePrivateKeyFormat1 = -67801; -const int errSecInvalidCRLAuthority = -67827; +const int errSecInvalidAttributeSymmetricKeyFormat1 = -67802; -const int errSecInvaldCRLAuthority = -67827; +const int errSecMissingAttributeSymmetricKeyFormat1 = -67803; -const int errSecInvalidCRLEncoding = -67828; +const int errSecInvalidAttributeWrappedKeyFormat1 = -67804; -const int errSecInvalidCRLType = -67829; +const int errSecMissingAttributeWrappedKeyFormat1 = -67805; -const int errSecInvalidCRL = -67830; +const int errSecStagedOperationInProgress1 = -67806; -const int errSecInvalidFormType = -67831; +const int errSecStagedOperationNotStarted1 = -67807; -const int errSecInvalidID = -67832; +const int errSecVerifyFailed1 = -67808; -const int errSecInvalidIdentifier = -67833; +const int errSecQuerySizeUnknown1 = -67809; -const int errSecInvalidIndex = -67834; +const int errSecBlockSizeMismatch1 = -67810; -const int errSecInvalidPolicyIdentifiers = -67835; +const int errSecPublicKeyInconsistent1 = -67811; -const int errSecInvalidTimeString = -67836; +const int errSecDeviceVerifyFailed1 = -67812; -const int errSecInvalidReason = -67837; +const int errSecInvalidLoginName1 = -67813; -const int errSecInvalidRequestInputs = -67838; +const int errSecAlreadyLoggedIn1 = -67814; -const int errSecInvalidResponseVector = -67839; +const int errSecInvalidDigestAlgorithm1 = -67815; -const int errSecInvalidStopOnPolicy = -67840; +const int errSecInvalidCRLGroup1 = -67816; -const int errSecInvalidTuple = -67841; +const int errSecCertificateCannotOperate1 = -67817; -const int errSecMultipleValuesUnsupported = -67842; +const int errSecCertificateExpired1 = -67818; -const int errSecNotTrusted = -67843; +const int errSecCertificateNotValidYet1 = -67819; -const int errSecNoDefaultAuthority = -67844; +const int errSecCertificateRevoked1 = -67820; -const int errSecRejectedForm = -67845; +const int errSecCertificateSuspended1 = -67821; -const int errSecRequestLost = -67846; +const int errSecInsufficientCredentials1 = -67822; -const int errSecRequestRejected = -67847; +const int errSecInvalidAction1 = -67823; -const int errSecUnsupportedAddressType = -67848; +const int errSecInvalidAuthority1 = -67824; -const int errSecUnsupportedService = -67849; +const int errSecVerifyActionFailed1 = -67825; -const int errSecInvalidTupleGroup = -67850; +const int errSecInvalidCertAuthority1 = -67826; -const int errSecInvalidBaseACLs = -67851; +const int errSecInvalidCRLAuthority1 = -67827; -const int errSecInvalidTupleCredentials = -67852; +const int errSecInvaldCRLAuthority1 = -67827; -const int errSecInvalidTupleCredendtials = -67852; +const int errSecInvalidCRLEncoding1 = -67828; -const int errSecInvalidEncoding = -67853; +const int errSecInvalidCRLType1 = -67829; -const int errSecInvalidValidityPeriod = -67854; +const int errSecInvalidCRL1 = -67830; -const int errSecInvalidRequestor = -67855; +const int errSecInvalidFormType1 = -67831; -const int errSecRequestDescriptor = -67856; +const int errSecInvalidID1 = -67832; -const int errSecInvalidBundleInfo = -67857; +const int errSecInvalidIdentifier1 = -67833; -const int errSecInvalidCRLIndex = -67858; +const int errSecInvalidIndex1 = -67834; -const int errSecNoFieldValues = -67859; +const int errSecInvalidPolicyIdentifiers1 = -67835; -const int errSecUnsupportedFieldFormat = -67860; +const int errSecInvalidTimeString1 = -67836; -const int errSecUnsupportedIndexInfo = -67861; +const int errSecInvalidReason1 = -67837; -const int errSecUnsupportedLocality = -67862; +const int errSecInvalidRequestInputs1 = -67838; -const int errSecUnsupportedNumAttributes = -67863; +const int errSecInvalidResponseVector1 = -67839; -const int errSecUnsupportedNumIndexes = -67864; +const int errSecInvalidStopOnPolicy1 = -67840; -const int errSecUnsupportedNumRecordTypes = -67865; +const int errSecInvalidTuple1 = -67841; -const int errSecFieldSpecifiedMultiple = -67866; +const int errSecMultipleValuesUnsupported1 = -67842; -const int errSecIncompatibleFieldFormat = -67867; +const int errSecNotTrusted1 = -67843; -const int errSecInvalidParsingModule = -67868; +const int errSecNoDefaultAuthority1 = -67844; -const int errSecDatabaseLocked = -67869; +const int errSecRejectedForm1 = -67845; -const int errSecDatastoreIsOpen = -67870; +const int errSecRequestLost1 = -67846; -const int errSecMissingValue = -67871; +const int errSecRequestRejected1 = -67847; -const int errSecUnsupportedQueryLimits = -67872; +const int errSecUnsupportedAddressType1 = -67848; -const int errSecUnsupportedNumSelectionPreds = -67873; +const int errSecUnsupportedService1 = -67849; -const int errSecUnsupportedOperator = -67874; +const int errSecInvalidTupleGroup1 = -67850; -const int errSecInvalidDBLocation = -67875; +const int errSecInvalidBaseACLs1 = -67851; -const int errSecInvalidAccessRequest = -67876; +const int errSecInvalidTupleCredentials1 = -67852; -const int errSecInvalidIndexInfo = -67877; +const int errSecInvalidTupleCredendtials1 = -67852; -const int errSecInvalidNewOwner = -67878; +const int errSecInvalidEncoding1 = -67853; -const int errSecInvalidModifyMode = -67879; +const int errSecInvalidValidityPeriod1 = -67854; -const int errSecMissingRequiredExtension = -67880; +const int errSecInvalidRequestor1 = -67855; -const int errSecExtendedKeyUsageNotCritical = -67881; +const int errSecRequestDescriptor1 = -67856; -const int errSecTimestampMissing = -67882; +const int errSecInvalidBundleInfo1 = -67857; -const int errSecTimestampInvalid = -67883; +const int errSecInvalidCRLIndex1 = -67858; -const int errSecTimestampNotTrusted = -67884; +const int errSecNoFieldValues1 = -67859; -const int errSecTimestampServiceNotAvailable = -67885; +const int errSecUnsupportedFieldFormat1 = -67860; -const int errSecTimestampBadAlg = -67886; +const int errSecUnsupportedIndexInfo1 = -67861; -const int errSecTimestampBadRequest = -67887; +const int errSecUnsupportedLocality1 = -67862; -const int errSecTimestampBadDataFormat = -67888; +const int errSecUnsupportedNumAttributes1 = -67863; -const int errSecTimestampTimeNotAvailable = -67889; +const int errSecUnsupportedNumIndexes1 = -67864; -const int errSecTimestampUnacceptedPolicy = -67890; +const int errSecUnsupportedNumRecordTypes1 = -67865; -const int errSecTimestampUnacceptedExtension = -67891; +const int errSecFieldSpecifiedMultiple1 = -67866; -const int errSecTimestampAddInfoNotAvailable = -67892; +const int errSecIncompatibleFieldFormat1 = -67867; -const int errSecTimestampSystemFailure = -67893; +const int errSecInvalidParsingModule1 = -67868; -const int errSecSigningTimeMissing = -67894; +const int errSecDatabaseLocked1 = -67869; -const int errSecTimestampRejection = -67895; +const int errSecDatastoreIsOpen1 = -67870; -const int errSecTimestampWaiting = -67896; +const int errSecMissingValue1 = -67871; -const int errSecTimestampRevocationWarning = -67897; +const int errSecUnsupportedQueryLimits1 = -67872; -const int errSecTimestampRevocationNotification = -67898; +const int errSecUnsupportedNumSelectionPreds1 = -67873; -const int errSecCertificatePolicyNotAllowed = -67899; +const int errSecUnsupportedOperator1 = -67874; -const int errSecCertificateNameNotAllowed = -67900; +const int errSecInvalidDBLocation1 = -67875; -const int errSecCertificateValidityPeriodTooLong = -67901; +const int errSecInvalidAccessRequest1 = -67876; -const int errSecCertificateIsCA = -67902; +const int errSecInvalidIndexInfo1 = -67877; -const int errSecCertificateDuplicateExtension = -67903; +const int errSecInvalidNewOwner1 = -67878; -const int errSSLProtocol = -9800; +const int errSecInvalidModifyMode1 = -67879; -const int errSSLNegotiation = -9801; +const int errSecMissingRequiredExtension1 = -67880; -const int errSSLFatalAlert = -9802; +const int errSecExtendedKeyUsageNotCritical1 = -67881; -const int errSSLWouldBlock = -9803; +const int errSecTimestampMissing1 = -67882; -const int errSSLSessionNotFound = -9804; +const int errSecTimestampInvalid1 = -67883; -const int errSSLClosedGraceful = -9805; +const int errSecTimestampNotTrusted1 = -67884; -const int errSSLClosedAbort = -9806; +const int errSecTimestampServiceNotAvailable1 = -67885; -const int errSSLXCertChainInvalid = -9807; +const int errSecTimestampBadAlg1 = -67886; -const int errSSLBadCert = -9808; +const int errSecTimestampBadRequest1 = -67887; -const int errSSLCrypto = -9809; +const int errSecTimestampBadDataFormat1 = -67888; -const int errSSLInternal = -9810; +const int errSecTimestampTimeNotAvailable1 = -67889; -const int errSSLModuleAttach = -9811; +const int errSecTimestampUnacceptedPolicy1 = -67890; -const int errSSLUnknownRootCert = -9812; +const int errSecTimestampUnacceptedExtension1 = -67891; -const int errSSLNoRootCert = -9813; +const int errSecTimestampAddInfoNotAvailable1 = -67892; -const int errSSLCertExpired = -9814; +const int errSecTimestampSystemFailure1 = -67893; -const int errSSLCertNotYetValid = -9815; +const int errSecSigningTimeMissing1 = -67894; -const int errSSLClosedNoNotify = -9816; +const int errSecTimestampRejection1 = -67895; -const int errSSLBufferOverflow = -9817; +const int errSecTimestampWaiting1 = -67896; -const int errSSLBadCipherSuite = -9818; +const int errSecTimestampRevocationWarning1 = -67897; -const int errSSLPeerUnexpectedMsg = -9819; +const int errSecTimestampRevocationNotification1 = -67898; -const int errSSLPeerBadRecordMac = -9820; +const int errSecCertificatePolicyNotAllowed1 = -67899; -const int errSSLPeerDecryptionFail = -9821; +const int errSecCertificateNameNotAllowed1 = -67900; -const int errSSLPeerRecordOverflow = -9822; +const int errSecCertificateValidityPeriodTooLong1 = -67901; -const int errSSLPeerDecompressFail = -9823; +const int errSecCertificateIsCA1 = -67902; -const int errSSLPeerHandshakeFail = -9824; +const int errSecCertificateDuplicateExtension1 = -67903; -const int errSSLPeerBadCert = -9825; +const int errSSLProtocol1 = -9800; -const int errSSLPeerUnsupportedCert = -9826; +const int errSSLNegotiation1 = -9801; -const int errSSLPeerCertRevoked = -9827; +const int errSSLFatalAlert1 = -9802; -const int errSSLPeerCertExpired = -9828; +const int errSSLWouldBlock1 = -9803; -const int errSSLPeerCertUnknown = -9829; +const int errSSLSessionNotFound1 = -9804; -const int errSSLIllegalParam = -9830; +const int errSSLClosedGraceful1 = -9805; -const int errSSLPeerUnknownCA = -9831; +const int errSSLClosedAbort1 = -9806; -const int errSSLPeerAccessDenied = -9832; +const int errSSLXCertChainInvalid1 = -9807; -const int errSSLPeerDecodeError = -9833; +const int errSSLBadCert1 = -9808; -const int errSSLPeerDecryptError = -9834; +const int errSSLCrypto1 = -9809; -const int errSSLPeerExportRestriction = -9835; +const int errSSLInternal1 = -9810; -const int errSSLPeerProtocolVersion = -9836; +const int errSSLModuleAttach1 = -9811; -const int errSSLPeerInsufficientSecurity = -9837; +const int errSSLUnknownRootCert1 = -9812; -const int errSSLPeerInternalError = -9838; +const int errSSLNoRootCert1 = -9813; -const int errSSLPeerUserCancelled = -9839; +const int errSSLCertExpired1 = -9814; -const int errSSLPeerNoRenegotiation = -9840; +const int errSSLCertNotYetValid1 = -9815; -const int errSSLPeerAuthCompleted = -9841; +const int errSSLClosedNoNotify1 = -9816; -const int errSSLClientCertRequested = -9842; +const int errSSLBufferOverflow1 = -9817; -const int errSSLHostNameMismatch = -9843; +const int errSSLBadCipherSuite1 = -9818; -const int errSSLConnectionRefused = -9844; +const int errSSLPeerUnexpectedMsg1 = -9819; -const int errSSLDecryptionFail = -9845; +const int errSSLPeerBadRecordMac1 = -9820; -const int errSSLBadRecordMac = -9846; +const int errSSLPeerDecryptionFail1 = -9821; -const int errSSLRecordOverflow = -9847; +const int errSSLPeerRecordOverflow1 = -9822; -const int errSSLBadConfiguration = -9848; +const int errSSLPeerDecompressFail1 = -9823; -const int errSSLUnexpectedRecord = -9849; +const int errSSLPeerHandshakeFail1 = -9824; -const int errSSLWeakPeerEphemeralDHKey = -9850; +const int errSSLPeerBadCert1 = -9825; -const int errSSLClientHelloReceived = -9851; +const int errSSLPeerUnsupportedCert1 = -9826; -const int errSSLTransportReset = -9852; +const int errSSLPeerCertRevoked1 = -9827; -const int errSSLNetworkTimeout = -9853; +const int errSSLPeerCertExpired1 = -9828; -const int errSSLConfigurationFailed = -9854; +const int errSSLPeerCertUnknown1 = -9829; -const int errSSLUnsupportedExtension = -9855; +const int errSSLIllegalParam1 = -9830; -const int errSSLUnexpectedMessage = -9856; +const int errSSLPeerUnknownCA1 = -9831; -const int errSSLDecompressFail = -9857; +const int errSSLPeerAccessDenied1 = -9832; -const int errSSLHandshakeFail = -9858; +const int errSSLPeerDecodeError1 = -9833; -const int errSSLDecodeError = -9859; +const int errSSLPeerDecryptError1 = -9834; -const int errSSLInappropriateFallback = -9860; +const int errSSLPeerExportRestriction1 = -9835; -const int errSSLMissingExtension = -9861; +const int errSSLPeerProtocolVersion1 = -9836; -const int errSSLBadCertificateStatusResponse = -9862; +const int errSSLPeerInsufficientSecurity1 = -9837; -const int errSSLCertificateRequired = -9863; +const int errSSLPeerInternalError1 = -9838; -const int errSSLUnknownPSKIdentity = -9864; +const int errSSLPeerUserCancelled1 = -9839; -const int errSSLUnrecognizedName = -9865; +const int errSSLPeerNoRenegotiation1 = -9840; -const int errSSLATSViolation = -9880; +const int errSSLPeerAuthCompleted1 = -9841; -const int errSSLATSMinimumVersionViolation = -9881; +const int errSSLClientCertRequested1 = -9842; -const int errSSLATSCiphersuiteViolation = -9882; +const int errSSLHostNameMismatch1 = -9843; -const int errSSLATSMinimumKeySizeViolation = -9883; +const int errSSLConnectionRefused1 = -9844; -const int errSSLATSLeafCertificateHashAlgorithmViolation = -9884; +const int errSSLDecryptionFail1 = -9845; -const int errSSLATSCertificateHashAlgorithmViolation = -9885; +const int errSSLBadRecordMac1 = -9846; -const int errSSLATSCertificateTrustViolation = -9886; +const int errSSLRecordOverflow1 = -9847; -const int errSSLEarlyDataRejected = -9890; +const int errSSLBadConfiguration1 = -9848; -const int OSUnknownByteOrder = 0; +const int errSSLUnexpectedRecord1 = -9849; -const int OSLittleEndian = 1; +const int errSSLWeakPeerEphemeralDHKey1 = -9850; -const int OSBigEndian = 2; +const int errSSLClientHelloReceived1 = -9851; -const int kCFNotificationDeliverImmediately = 1; +const int errSSLTransportReset1 = -9852; -const int kCFNotificationPostToAllSessions = 2; +const int errSSLNetworkTimeout1 = -9853; -const int kCFCalendarComponentsWrap = 1; +const int errSSLConfigurationFailed1 = -9854; -const int kCFSocketAutomaticallyReenableReadCallBack = 1; +const int errSSLUnsupportedExtension1 = -9855; -const int kCFSocketAutomaticallyReenableAcceptCallBack = 2; +const int errSSLUnexpectedMessage1 = -9856; -const int kCFSocketAutomaticallyReenableDataCallBack = 3; +const int errSSLDecompressFail1 = -9857; -const int kCFSocketAutomaticallyReenableWriteCallBack = 8; +const int errSSLHandshakeFail1 = -9858; -const int kCFSocketLeaveErrors = 64; +const int errSSLDecodeError1 = -9859; -const int kCFSocketCloseOnInvalidate = 128; +const int errSSLInappropriateFallback1 = -9860; -const int DISPATCH_WALLTIME_NOW = -2; +const int errSSLMissingExtension1 = -9861; -const int kCFPropertyListReadCorruptError = 3840; +const int errSSLBadCertificateStatusResponse1 = -9862; -const int kCFPropertyListReadUnknownVersionError = 3841; +const int errSSLCertificateRequired1 = -9863; -const int kCFPropertyListReadStreamError = 3842; +const int errSSLUnknownPSKIdentity1 = -9864; -const int kCFPropertyListWriteStreamError = 3851; +const int errSSLUnrecognizedName1 = -9865; -const int kCFBundleExecutableArchitectureI386 = 7; +const int errSSLATSViolation1 = -9880; -const int kCFBundleExecutableArchitecturePPC = 18; +const int errSSLATSMinimumVersionViolation1 = -9881; -const int kCFBundleExecutableArchitectureX86_64 = 16777223; +const int errSSLATSCiphersuiteViolation1 = -9882; -const int kCFBundleExecutableArchitecturePPC64 = 16777234; +const int errSSLATSMinimumKeySizeViolation1 = -9883; -const int kCFBundleExecutableArchitectureARM64 = 16777228; +const int errSSLATSLeafCertificateHashAlgorithmViolation1 = -9884; -const int kCFMessagePortSuccess = 0; +const int errSSLATSCertificateHashAlgorithmViolation1 = -9885; -const int kCFMessagePortSendTimeout = -1; +const int errSSLATSCertificateTrustViolation1 = -9886; -const int kCFMessagePortReceiveTimeout = -2; +const int errSSLEarlyDataRejected1 = -9890; -const int kCFMessagePortIsInvalid = -3; +const int OSUnknownByteOrder1 = 0; -const int kCFMessagePortTransportError = -4; +const int OSLittleEndian1 = 1; -const int kCFMessagePortBecameInvalidError = -5; +const int OSBigEndian1 = 2; -const int kCFStringTokenizerUnitWord = 0; +const int kCFNotificationDeliverImmediately1 = 1; -const int kCFStringTokenizerUnitSentence = 1; +const int kCFNotificationPostToAllSessions1 = 2; -const int kCFStringTokenizerUnitParagraph = 2; +const int kCFCalendarComponentsWrap1 = 1; -const int kCFStringTokenizerUnitLineBreak = 3; +const int kCFSocketAutomaticallyReenableReadCallBack1 = 1; -const int kCFStringTokenizerUnitWordBoundary = 4; +const int kCFSocketAutomaticallyReenableAcceptCallBack1 = 2; -const int kCFStringTokenizerAttributeLatinTranscription = 65536; +const int kCFSocketAutomaticallyReenableDataCallBack1 = 3; -const int kCFStringTokenizerAttributeLanguage = 131072; +const int kCFSocketAutomaticallyReenableWriteCallBack1 = 8; -const int kCFFileDescriptorReadCallBack = 1; +const int kCFSocketLeaveErrors1 = 64; -const int kCFFileDescriptorWriteCallBack = 2; +const int kCFSocketCloseOnInvalidate1 = 128; -const int kCFUserNotificationStopAlertLevel = 0; +const int DISPATCH_WALLTIME_NOW2 = -2; -const int kCFUserNotificationNoteAlertLevel = 1; +const int kCFPropertyListReadCorruptError1 = 3840; -const int kCFUserNotificationCautionAlertLevel = 2; +const int kCFPropertyListReadUnknownVersionError1 = 3841; -const int kCFUserNotificationPlainAlertLevel = 3; +const int kCFPropertyListReadStreamError1 = 3842; -const int kCFUserNotificationDefaultResponse = 0; +const int kCFPropertyListWriteStreamError1 = 3851; -const int kCFUserNotificationAlternateResponse = 1; +const int kCFBundleExecutableArchitectureI3861 = 7; -const int kCFUserNotificationOtherResponse = 2; +const int kCFBundleExecutableArchitecturePPC1 = 18; -const int kCFUserNotificationCancelResponse = 3; +const int kCFBundleExecutableArchitectureX86_641 = 16777223; -const int kCFUserNotificationNoDefaultButtonFlag = 32; +const int kCFBundleExecutableArchitecturePPC641 = 16777234; -const int kCFUserNotificationUseRadioButtonsFlag = 64; +const int kCFBundleExecutableArchitectureARM641 = 16777228; -const int kCFXMLNodeCurrentVersion = 1; +const int kCFMessagePortSuccess1 = 0; -const int CSSM_INVALID_HANDLE = 0; +const int kCFMessagePortSendTimeout1 = -1; -const int CSSM_FALSE = 0; +const int kCFMessagePortReceiveTimeout1 = -2; -const int CSSM_TRUE = 1; +const int kCFMessagePortIsInvalid1 = -3; -const int CSSM_OK = 0; +const int kCFMessagePortTransportError1 = -4; -const int CSSM_MODULE_STRING_SIZE = 64; +const int kCFMessagePortBecameInvalidError1 = -5; -const int CSSM_KEY_HIERARCHY_NONE = 0; +const int kCFStringTokenizerUnitWord1 = 0; -const int CSSM_KEY_HIERARCHY_INTEG = 1; +const int kCFStringTokenizerUnitSentence1 = 1; -const int CSSM_KEY_HIERARCHY_EXPORT = 2; +const int kCFStringTokenizerUnitParagraph1 = 2; -const int CSSM_PVC_NONE = 0; +const int kCFStringTokenizerUnitLineBreak1 = 3; -const int CSSM_PVC_APP = 1; +const int kCFStringTokenizerUnitWordBoundary1 = 4; -const int CSSM_PVC_SP = 2; +const int kCFStringTokenizerAttributeLatinTranscription1 = 65536; -const int CSSM_PRIVILEGE_SCOPE_NONE = 0; +const int kCFStringTokenizerAttributeLanguage1 = 131072; -const int CSSM_PRIVILEGE_SCOPE_PROCESS = 1; +const int kCFFileDescriptorReadCallBack1 = 1; -const int CSSM_PRIVILEGE_SCOPE_THREAD = 2; +const int kCFFileDescriptorWriteCallBack1 = 2; -const int CSSM_SERVICE_CSSM = 1; +const int kCFUserNotificationStopAlertLevel1 = 0; -const int CSSM_SERVICE_CSP = 2; +const int kCFUserNotificationNoteAlertLevel1 = 1; -const int CSSM_SERVICE_DL = 4; +const int kCFUserNotificationCautionAlertLevel1 = 2; -const int CSSM_SERVICE_CL = 8; +const int kCFUserNotificationPlainAlertLevel1 = 3; -const int CSSM_SERVICE_TP = 16; +const int kCFUserNotificationDefaultResponse1 = 0; -const int CSSM_SERVICE_AC = 32; +const int kCFUserNotificationAlternateResponse1 = 1; -const int CSSM_SERVICE_KR = 64; +const int kCFUserNotificationOtherResponse1 = 2; -const int CSSM_NOTIFY_INSERT = 1; +const int kCFUserNotificationCancelResponse1 = 3; -const int CSSM_NOTIFY_REMOVE = 2; +const int kCFUserNotificationNoDefaultButtonFlag1 = 32; -const int CSSM_NOTIFY_FAULT = 3; +const int kCFUserNotificationUseRadioButtonsFlag1 = 64; -const int CSSM_ATTACH_READ_ONLY = 1; +const int kCFXMLNodeCurrentVersion1 = 1; -const int CSSM_USEE_LAST = 255; +const int CSSM_INVALID_HANDLE1 = 0; -const int CSSM_USEE_NONE = 0; +const int CSSM_FALSE1 = 0; -const int CSSM_USEE_DOMESTIC = 1; +const int CSSM_TRUE1 = 1; -const int CSSM_USEE_FINANCIAL = 2; +const int CSSM_OK1 = 0; -const int CSSM_USEE_KRLE = 3; +const int CSSM_MODULE_STRING_SIZE1 = 64; -const int CSSM_USEE_KRENT = 4; +const int CSSM_KEY_HIERARCHY_NONE1 = 0; -const int CSSM_USEE_SSL = 5; +const int CSSM_KEY_HIERARCHY_INTEG1 = 1; -const int CSSM_USEE_AUTHENTICATION = 6; +const int CSSM_KEY_HIERARCHY_EXPORT1 = 2; -const int CSSM_USEE_KEYEXCH = 7; +const int CSSM_PVC_NONE1 = 0; -const int CSSM_USEE_MEDICAL = 8; +const int CSSM_PVC_APP1 = 1; -const int CSSM_USEE_INSURANCE = 9; +const int CSSM_PVC_SP1 = 2; -const int CSSM_USEE_WEAK = 10; +const int CSSM_PRIVILEGE_SCOPE_NONE1 = 0; -const int CSSM_ADDR_NONE = 0; +const int CSSM_PRIVILEGE_SCOPE_PROCESS1 = 1; -const int CSSM_ADDR_CUSTOM = 1; +const int CSSM_PRIVILEGE_SCOPE_THREAD1 = 2; -const int CSSM_ADDR_URL = 2; +const int CSSM_SERVICE_CSSM1 = 1; -const int CSSM_ADDR_SOCKADDR = 3; +const int CSSM_SERVICE_CSP1 = 2; -const int CSSM_ADDR_NAME = 4; +const int CSSM_SERVICE_DL1 = 4; -const int CSSM_NET_PROTO_NONE = 0; +const int CSSM_SERVICE_CL1 = 8; -const int CSSM_NET_PROTO_CUSTOM = 1; +const int CSSM_SERVICE_TP1 = 16; -const int CSSM_NET_PROTO_UNSPECIFIED = 2; +const int CSSM_SERVICE_AC1 = 32; -const int CSSM_NET_PROTO_LDAP = 3; +const int CSSM_SERVICE_KR1 = 64; -const int CSSM_NET_PROTO_LDAPS = 4; +const int CSSM_NOTIFY_INSERT1 = 1; -const int CSSM_NET_PROTO_LDAPNS = 5; +const int CSSM_NOTIFY_REMOVE1 = 2; -const int CSSM_NET_PROTO_X500DAP = 6; +const int CSSM_NOTIFY_FAULT1 = 3; -const int CSSM_NET_PROTO_FTP = 7; +const int CSSM_ATTACH_READ_ONLY1 = 1; -const int CSSM_NET_PROTO_FTPS = 8; +const int CSSM_USEE_LAST1 = 255; -const int CSSM_NET_PROTO_OCSP = 9; +const int CSSM_USEE_NONE1 = 0; -const int CSSM_NET_PROTO_CMP = 10; +const int CSSM_USEE_DOMESTIC1 = 1; -const int CSSM_NET_PROTO_CMPS = 11; +const int CSSM_USEE_FINANCIAL1 = 2; -const int CSSM_WORDID__UNK_ = -1; +const int CSSM_USEE_KRLE1 = 3; -const int CSSM_WORDID__NLU_ = 0; +const int CSSM_USEE_KRENT1 = 4; -const int CSSM_WORDID__STAR_ = 1; +const int CSSM_USEE_SSL1 = 5; -const int CSSM_WORDID_A = 2; +const int CSSM_USEE_AUTHENTICATION1 = 6; -const int CSSM_WORDID_ACL = 3; +const int CSSM_USEE_KEYEXCH1 = 7; -const int CSSM_WORDID_ALPHA = 4; +const int CSSM_USEE_MEDICAL1 = 8; -const int CSSM_WORDID_B = 5; +const int CSSM_USEE_INSURANCE1 = 9; -const int CSSM_WORDID_BER = 6; +const int CSSM_USEE_WEAK1 = 10; -const int CSSM_WORDID_BINARY = 7; +const int CSSM_ADDR_NONE1 = 0; -const int CSSM_WORDID_BIOMETRIC = 8; +const int CSSM_ADDR_CUSTOM1 = 1; -const int CSSM_WORDID_C = 9; +const int CSSM_ADDR_URL1 = 2; -const int CSSM_WORDID_CANCELED = 10; +const int CSSM_ADDR_SOCKADDR1 = 3; -const int CSSM_WORDID_CERT = 11; +const int CSSM_ADDR_NAME1 = 4; -const int CSSM_WORDID_COMMENT = 12; +const int CSSM_NET_PROTO_NONE1 = 0; -const int CSSM_WORDID_CRL = 13; +const int CSSM_NET_PROTO_CUSTOM1 = 1; -const int CSSM_WORDID_CUSTOM = 14; +const int CSSM_NET_PROTO_UNSPECIFIED1 = 2; -const int CSSM_WORDID_D = 15; +const int CSSM_NET_PROTO_LDAP1 = 3; -const int CSSM_WORDID_DATE = 16; +const int CSSM_NET_PROTO_LDAPS1 = 4; -const int CSSM_WORDID_DB_DELETE = 17; +const int CSSM_NET_PROTO_LDAPNS1 = 5; -const int CSSM_WORDID_DB_EXEC_STORED_QUERY = 18; +const int CSSM_NET_PROTO_X500DAP1 = 6; -const int CSSM_WORDID_DB_INSERT = 19; +const int CSSM_NET_PROTO_FTP1 = 7; -const int CSSM_WORDID_DB_MODIFY = 20; +const int CSSM_NET_PROTO_FTPS1 = 8; -const int CSSM_WORDID_DB_READ = 21; +const int CSSM_NET_PROTO_OCSP1 = 9; -const int CSSM_WORDID_DBS_CREATE = 22; +const int CSSM_NET_PROTO_CMP1 = 10; -const int CSSM_WORDID_DBS_DELETE = 23; +const int CSSM_NET_PROTO_CMPS1 = 11; -const int CSSM_WORDID_DECRYPT = 24; +const int CSSM_WORDID__UNK_1 = -1; -const int CSSM_WORDID_DELETE = 25; +const int CSSM_WORDID__NLU_1 = 0; -const int CSSM_WORDID_DELTA_CRL = 26; +const int CSSM_WORDID__STAR_1 = 1; -const int CSSM_WORDID_DER = 27; +const int CSSM_WORDID_A1 = 2; -const int CSSM_WORDID_DERIVE = 28; +const int CSSM_WORDID_ACL1 = 3; -const int CSSM_WORDID_DISPLAY = 29; +const int CSSM_WORDID_ALPHA1 = 4; -const int CSSM_WORDID_DO = 30; +const int CSSM_WORDID_B1 = 5; -const int CSSM_WORDID_DSA = 31; +const int CSSM_WORDID_BER1 = 6; -const int CSSM_WORDID_DSA_SHA1 = 32; +const int CSSM_WORDID_BINARY1 = 7; -const int CSSM_WORDID_E = 33; +const int CSSM_WORDID_BIOMETRIC1 = 8; -const int CSSM_WORDID_ELGAMAL = 34; +const int CSSM_WORDID_C1 = 9; -const int CSSM_WORDID_ENCRYPT = 35; +const int CSSM_WORDID_CANCELED1 = 10; -const int CSSM_WORDID_ENTRY = 36; +const int CSSM_WORDID_CERT1 = 11; -const int CSSM_WORDID_EXPORT_CLEAR = 37; +const int CSSM_WORDID_COMMENT1 = 12; -const int CSSM_WORDID_EXPORT_WRAPPED = 38; +const int CSSM_WORDID_CRL1 = 13; -const int CSSM_WORDID_G = 39; +const int CSSM_WORDID_CUSTOM1 = 14; -const int CSSM_WORDID_GE = 40; +const int CSSM_WORDID_D1 = 15; -const int CSSM_WORDID_GENKEY = 41; +const int CSSM_WORDID_DATE1 = 16; -const int CSSM_WORDID_HASH = 42; +const int CSSM_WORDID_DB_DELETE1 = 17; -const int CSSM_WORDID_HASHED_PASSWORD = 43; +const int CSSM_WORDID_DB_EXEC_STORED_QUERY1 = 18; -const int CSSM_WORDID_HASHED_SUBJECT = 44; +const int CSSM_WORDID_DB_INSERT1 = 19; -const int CSSM_WORDID_HAVAL = 45; +const int CSSM_WORDID_DB_MODIFY1 = 20; -const int CSSM_WORDID_IBCHASH = 46; +const int CSSM_WORDID_DB_READ1 = 21; -const int CSSM_WORDID_IMPORT_CLEAR = 47; +const int CSSM_WORDID_DBS_CREATE1 = 22; -const int CSSM_WORDID_IMPORT_WRAPPED = 48; +const int CSSM_WORDID_DBS_DELETE1 = 23; -const int CSSM_WORDID_INTEL = 49; +const int CSSM_WORDID_DECRYPT1 = 24; -const int CSSM_WORDID_ISSUER = 50; +const int CSSM_WORDID_DELETE1 = 25; -const int CSSM_WORDID_ISSUER_INFO = 51; +const int CSSM_WORDID_DELTA_CRL1 = 26; -const int CSSM_WORDID_K_OF_N = 52; +const int CSSM_WORDID_DER1 = 27; -const int CSSM_WORDID_KEA = 53; +const int CSSM_WORDID_DERIVE1 = 28; -const int CSSM_WORDID_KEYHOLDER = 54; +const int CSSM_WORDID_DISPLAY1 = 29; -const int CSSM_WORDID_L = 55; +const int CSSM_WORDID_DO1 = 30; -const int CSSM_WORDID_LE = 56; +const int CSSM_WORDID_DSA1 = 31; -const int CSSM_WORDID_LOGIN = 57; +const int CSSM_WORDID_DSA_SHA11 = 32; -const int CSSM_WORDID_LOGIN_NAME = 58; +const int CSSM_WORDID_E1 = 33; -const int CSSM_WORDID_MAC = 59; +const int CSSM_WORDID_ELGAMAL1 = 34; -const int CSSM_WORDID_MD2 = 60; +const int CSSM_WORDID_ENCRYPT1 = 35; -const int CSSM_WORDID_MD2WITHRSA = 61; +const int CSSM_WORDID_ENTRY1 = 36; -const int CSSM_WORDID_MD4 = 62; +const int CSSM_WORDID_EXPORT_CLEAR1 = 37; -const int CSSM_WORDID_MD5 = 63; +const int CSSM_WORDID_EXPORT_WRAPPED1 = 38; -const int CSSM_WORDID_MD5WITHRSA = 64; +const int CSSM_WORDID_G1 = 39; -const int CSSM_WORDID_N = 65; +const int CSSM_WORDID_GE1 = 40; -const int CSSM_WORDID_NAME = 66; +const int CSSM_WORDID_GENKEY1 = 41; -const int CSSM_WORDID_NDR = 67; +const int CSSM_WORDID_HASH1 = 42; -const int CSSM_WORDID_NHASH = 68; +const int CSSM_WORDID_HASHED_PASSWORD1 = 43; -const int CSSM_WORDID_NOT_AFTER = 69; +const int CSSM_WORDID_HASHED_SUBJECT1 = 44; -const int CSSM_WORDID_NOT_BEFORE = 70; +const int CSSM_WORDID_HAVAL1 = 45; -const int CSSM_WORDID_NULL = 71; +const int CSSM_WORDID_IBCHASH1 = 46; -const int CSSM_WORDID_NUMERIC = 72; +const int CSSM_WORDID_IMPORT_CLEAR1 = 47; -const int CSSM_WORDID_OBJECT_HASH = 73; +const int CSSM_WORDID_IMPORT_WRAPPED1 = 48; -const int CSSM_WORDID_ONE_TIME = 74; +const int CSSM_WORDID_INTEL1 = 49; -const int CSSM_WORDID_ONLINE = 75; +const int CSSM_WORDID_ISSUER1 = 50; -const int CSSM_WORDID_OWNER = 76; +const int CSSM_WORDID_ISSUER_INFO1 = 51; -const int CSSM_WORDID_P = 77; +const int CSSM_WORDID_K_OF_N1 = 52; -const int CSSM_WORDID_PAM_NAME = 78; +const int CSSM_WORDID_KEA1 = 53; -const int CSSM_WORDID_PASSWORD = 79; +const int CSSM_WORDID_KEYHOLDER1 = 54; -const int CSSM_WORDID_PGP = 80; +const int CSSM_WORDID_L1 = 55; -const int CSSM_WORDID_PREFIX = 81; +const int CSSM_WORDID_LE1 = 56; -const int CSSM_WORDID_PRIVATE_KEY = 82; +const int CSSM_WORDID_LOGIN1 = 57; -const int CSSM_WORDID_PROMPTED_BIOMETRIC = 83; +const int CSSM_WORDID_LOGIN_NAME1 = 58; -const int CSSM_WORDID_PROMPTED_PASSWORD = 84; +const int CSSM_WORDID_MAC1 = 59; -const int CSSM_WORDID_PROPAGATE = 85; +const int CSSM_WORDID_MD21 = 60; -const int CSSM_WORDID_PROTECTED_BIOMETRIC = 86; +const int CSSM_WORDID_MD2WITHRSA1 = 61; -const int CSSM_WORDID_PROTECTED_PASSWORD = 87; +const int CSSM_WORDID_MD41 = 62; -const int CSSM_WORDID_PROTECTED_PIN = 88; +const int CSSM_WORDID_MD51 = 63; -const int CSSM_WORDID_PUBLIC_KEY = 89; +const int CSSM_WORDID_MD5WITHRSA1 = 64; -const int CSSM_WORDID_PUBLIC_KEY_FROM_CERT = 90; +const int CSSM_WORDID_N1 = 65; -const int CSSM_WORDID_Q = 91; +const int CSSM_WORDID_NAME1 = 66; -const int CSSM_WORDID_RANGE = 92; +const int CSSM_WORDID_NDR1 = 67; -const int CSSM_WORDID_REVAL = 93; +const int CSSM_WORDID_NHASH1 = 68; -const int CSSM_WORDID_RIPEMAC = 94; +const int CSSM_WORDID_NOT_AFTER1 = 69; -const int CSSM_WORDID_RIPEMD = 95; +const int CSSM_WORDID_NOT_BEFORE1 = 70; -const int CSSM_WORDID_RIPEMD160 = 96; +const int CSSM_WORDID_NULL1 = 71; -const int CSSM_WORDID_RSA = 97; +const int CSSM_WORDID_NUMERIC1 = 72; -const int CSSM_WORDID_RSA_ISO9796 = 98; +const int CSSM_WORDID_OBJECT_HASH1 = 73; -const int CSSM_WORDID_RSA_PKCS = 99; +const int CSSM_WORDID_ONE_TIME1 = 74; -const int CSSM_WORDID_RSA_PKCS_MD5 = 100; +const int CSSM_WORDID_ONLINE1 = 75; -const int CSSM_WORDID_RSA_PKCS_SHA1 = 101; +const int CSSM_WORDID_OWNER1 = 76; -const int CSSM_WORDID_RSA_PKCS1 = 102; +const int CSSM_WORDID_P1 = 77; -const int CSSM_WORDID_RSA_PKCS1_MD5 = 103; +const int CSSM_WORDID_PAM_NAME1 = 78; -const int CSSM_WORDID_RSA_PKCS1_SHA1 = 104; +const int CSSM_WORDID_PASSWORD1 = 79; -const int CSSM_WORDID_RSA_PKCS1_SIG = 105; +const int CSSM_WORDID_PGP1 = 80; -const int CSSM_WORDID_RSA_RAW = 106; +const int CSSM_WORDID_PREFIX1 = 81; -const int CSSM_WORDID_SDSIV1 = 107; +const int CSSM_WORDID_PRIVATE_KEY1 = 82; -const int CSSM_WORDID_SEQUENCE = 108; +const int CSSM_WORDID_PROMPTED_BIOMETRIC1 = 83; -const int CSSM_WORDID_SET = 109; +const int CSSM_WORDID_PROMPTED_PASSWORD1 = 84; -const int CSSM_WORDID_SEXPR = 110; +const int CSSM_WORDID_PROPAGATE1 = 85; -const int CSSM_WORDID_SHA1 = 111; +const int CSSM_WORDID_PROTECTED_BIOMETRIC1 = 86; -const int CSSM_WORDID_SHA1WITHDSA = 112; +const int CSSM_WORDID_PROTECTED_PASSWORD1 = 87; -const int CSSM_WORDID_SHA1WITHECDSA = 113; +const int CSSM_WORDID_PROTECTED_PIN1 = 88; -const int CSSM_WORDID_SHA1WITHRSA = 114; +const int CSSM_WORDID_PUBLIC_KEY1 = 89; -const int CSSM_WORDID_SIGN = 115; +const int CSSM_WORDID_PUBLIC_KEY_FROM_CERT1 = 90; -const int CSSM_WORDID_SIGNATURE = 116; +const int CSSM_WORDID_Q1 = 91; -const int CSSM_WORDID_SIGNED_NONCE = 117; +const int CSSM_WORDID_RANGE1 = 92; -const int CSSM_WORDID_SIGNED_SECRET = 118; +const int CSSM_WORDID_REVAL1 = 93; -const int CSSM_WORDID_SPKI = 119; +const int CSSM_WORDID_RIPEMAC1 = 94; -const int CSSM_WORDID_SUBJECT = 120; +const int CSSM_WORDID_RIPEMD1 = 95; -const int CSSM_WORDID_SUBJECT_INFO = 121; +const int CSSM_WORDID_RIPEMD1601 = 96; -const int CSSM_WORDID_TAG = 122; +const int CSSM_WORDID_RSA1 = 97; -const int CSSM_WORDID_THRESHOLD = 123; +const int CSSM_WORDID_RSA_ISO97961 = 98; -const int CSSM_WORDID_TIME = 124; +const int CSSM_WORDID_RSA_PKCS2 = 99; -const int CSSM_WORDID_URI = 125; +const int CSSM_WORDID_RSA_PKCS_MD51 = 100; -const int CSSM_WORDID_VERSION = 126; +const int CSSM_WORDID_RSA_PKCS_SHA11 = 101; -const int CSSM_WORDID_X509_ATTRIBUTE = 127; +const int CSSM_WORDID_RSA_PKCS11 = 102; -const int CSSM_WORDID_X509V1 = 128; +const int CSSM_WORDID_RSA_PKCS1_MD51 = 103; -const int CSSM_WORDID_X509V2 = 129; +const int CSSM_WORDID_RSA_PKCS1_SHA11 = 104; -const int CSSM_WORDID_X509V3 = 130; +const int CSSM_WORDID_RSA_PKCS1_SIG1 = 105; -const int CSSM_WORDID_X9_ATTRIBUTE = 131; +const int CSSM_WORDID_RSA_RAW1 = 106; -const int CSSM_WORDID_VENDOR_START = 65536; +const int CSSM_WORDID_SDSIV11 = 107; -const int CSSM_WORDID_VENDOR_END = 2147418112; +const int CSSM_WORDID_SEQUENCE1 = 108; -const int CSSM_LIST_ELEMENT_DATUM = 0; +const int CSSM_WORDID_SET1 = 109; -const int CSSM_LIST_ELEMENT_SUBLIST = 1; +const int CSSM_WORDID_SEXPR1 = 110; -const int CSSM_LIST_ELEMENT_WORDID = 2; +const int CSSM_WORDID_SHA11 = 111; -const int CSSM_LIST_TYPE_UNKNOWN = 0; +const int CSSM_WORDID_SHA1WITHDSA1 = 112; -const int CSSM_LIST_TYPE_CUSTOM = 1; +const int CSSM_WORDID_SHA1WITHECDSA1 = 113; -const int CSSM_LIST_TYPE_SEXPR = 2; +const int CSSM_WORDID_SHA1WITHRSA1 = 114; -const int CSSM_SAMPLE_TYPE_PASSWORD = 79; +const int CSSM_WORDID_SIGN1 = 115; -const int CSSM_SAMPLE_TYPE_HASHED_PASSWORD = 43; +const int CSSM_WORDID_SIGNATURE1 = 116; -const int CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD = 87; +const int CSSM_WORDID_SIGNED_NONCE1 = 117; -const int CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD = 84; +const int CSSM_WORDID_SIGNED_SECRET1 = 118; -const int CSSM_SAMPLE_TYPE_SIGNED_NONCE = 117; +const int CSSM_WORDID_SPKI1 = 119; -const int CSSM_SAMPLE_TYPE_SIGNED_SECRET = 118; +const int CSSM_WORDID_SUBJECT1 = 120; -const int CSSM_SAMPLE_TYPE_BIOMETRIC = 8; +const int CSSM_WORDID_SUBJECT_INFO1 = 121; -const int CSSM_SAMPLE_TYPE_PROTECTED_BIOMETRIC = 86; +const int CSSM_WORDID_TAG1 = 122; -const int CSSM_SAMPLE_TYPE_PROMPTED_BIOMETRIC = 83; +const int CSSM_WORDID_THRESHOLD1 = 123; -const int CSSM_SAMPLE_TYPE_THRESHOLD = 123; +const int CSSM_WORDID_TIME1 = 124; -const int CSSM_CERT_UNKNOWN = 0; +const int CSSM_WORDID_URI1 = 125; -const int CSSM_CERT_X_509v1 = 1; +const int CSSM_WORDID_VERSION1 = 126; -const int CSSM_CERT_X_509v2 = 2; +const int CSSM_WORDID_X509_ATTRIBUTE1 = 127; -const int CSSM_CERT_X_509v3 = 3; +const int CSSM_WORDID_X509V11 = 128; -const int CSSM_CERT_PGP = 4; +const int CSSM_WORDID_X509V21 = 129; -const int CSSM_CERT_SPKI = 5; +const int CSSM_WORDID_X509V31 = 130; -const int CSSM_CERT_SDSIv1 = 6; +const int CSSM_WORDID_X9_ATTRIBUTE1 = 131; -const int CSSM_CERT_Intel = 8; +const int CSSM_WORDID_VENDOR_START1 = 65536; -const int CSSM_CERT_X_509_ATTRIBUTE = 9; +const int CSSM_WORDID_VENDOR_END1 = 2147418112; -const int CSSM_CERT_X9_ATTRIBUTE = 10; +const int CSSM_LIST_ELEMENT_DATUM1 = 0; -const int CSSM_CERT_TUPLE = 11; +const int CSSM_LIST_ELEMENT_SUBLIST1 = 1; -const int CSSM_CERT_ACL_ENTRY = 12; +const int CSSM_LIST_ELEMENT_WORDID1 = 2; -const int CSSM_CERT_MULTIPLE = 32766; +const int CSSM_LIST_TYPE_UNKNOWN1 = 0; -const int CSSM_CERT_LAST = 32767; +const int CSSM_LIST_TYPE_CUSTOM1 = 1; -const int CSSM_CL_CUSTOM_CERT_TYPE = 32768; +const int CSSM_LIST_TYPE_SEXPR1 = 2; -const int CSSM_CERT_ENCODING_UNKNOWN = 0; +const int CSSM_SAMPLE_TYPE_PASSWORD1 = 79; -const int CSSM_CERT_ENCODING_CUSTOM = 1; +const int CSSM_SAMPLE_TYPE_HASHED_PASSWORD1 = 43; -const int CSSM_CERT_ENCODING_BER = 2; +const int CSSM_SAMPLE_TYPE_PROTECTED_PASSWORD1 = 87; -const int CSSM_CERT_ENCODING_DER = 3; +const int CSSM_SAMPLE_TYPE_PROMPTED_PASSWORD1 = 84; -const int CSSM_CERT_ENCODING_NDR = 4; +const int CSSM_SAMPLE_TYPE_SIGNED_NONCE1 = 117; -const int CSSM_CERT_ENCODING_SEXPR = 5; +const int CSSM_SAMPLE_TYPE_SIGNED_SECRET1 = 118; -const int CSSM_CERT_ENCODING_PGP = 6; +const int CSSM_SAMPLE_TYPE_BIOMETRIC1 = 8; -const int CSSM_CERT_ENCODING_MULTIPLE = 32766; +const int CSSM_SAMPLE_TYPE_PROTECTED_BIOMETRIC1 = 86; -const int CSSM_CERT_ENCODING_LAST = 32767; +const int CSSM_SAMPLE_TYPE_PROMPTED_BIOMETRIC1 = 83; -const int CSSM_CL_CUSTOM_CERT_ENCODING = 32768; +const int CSSM_SAMPLE_TYPE_THRESHOLD1 = 123; -const int CSSM_CERT_PARSE_FORMAT_NONE = 0; +const int CSSM_CERT_UNKNOWN1 = 0; -const int CSSM_CERT_PARSE_FORMAT_CUSTOM = 1; +const int CSSM_CERT_X_509v11 = 1; -const int CSSM_CERT_PARSE_FORMAT_SEXPR = 2; +const int CSSM_CERT_X_509v21 = 2; -const int CSSM_CERT_PARSE_FORMAT_COMPLEX = 3; +const int CSSM_CERT_X_509v31 = 3; -const int CSSM_CERT_PARSE_FORMAT_OID_NAMED = 4; +const int CSSM_CERT_PGP1 = 4; -const int CSSM_CERT_PARSE_FORMAT_TUPLE = 5; +const int CSSM_CERT_SPKI1 = 5; -const int CSSM_CERT_PARSE_FORMAT_MULTIPLE = 32766; +const int CSSM_CERT_SDSIv11 = 6; -const int CSSM_CERT_PARSE_FORMAT_LAST = 32767; +const int CSSM_CERT_Intel1 = 8; -const int CSSM_CL_CUSTOM_CERT_PARSE_FORMAT = 32768; +const int CSSM_CERT_X_509_ATTRIBUTE1 = 9; -const int CSSM_CERTGROUP_DATA = 0; +const int CSSM_CERT_X9_ATTRIBUTE1 = 10; -const int CSSM_CERTGROUP_ENCODED_CERT = 1; +const int CSSM_CERT_TUPLE1 = 11; -const int CSSM_CERTGROUP_PARSED_CERT = 2; +const int CSSM_CERT_ACL_ENTRY1 = 12; -const int CSSM_CERTGROUP_CERT_PAIR = 3; +const int CSSM_CERT_MULTIPLE1 = 32766; -const int CSSM_ACL_SUBJECT_TYPE_ANY = 1; +const int CSSM_CERT_LAST1 = 32767; -const int CSSM_ACL_SUBJECT_TYPE_THRESHOLD = 123; +const int CSSM_CL_CUSTOM_CERT_TYPE1 = 32768; -const int CSSM_ACL_SUBJECT_TYPE_PASSWORD = 79; +const int CSSM_CERT_ENCODING_UNKNOWN1 = 0; -const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD = 87; +const int CSSM_CERT_ENCODING_CUSTOM1 = 1; -const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD = 84; +const int CSSM_CERT_ENCODING_BER1 = 2; -const int CSSM_ACL_SUBJECT_TYPE_PUBLIC_KEY = 89; +const int CSSM_CERT_ENCODING_DER1 = 3; -const int CSSM_ACL_SUBJECT_TYPE_HASHED_SUBJECT = 44; +const int CSSM_CERT_ENCODING_NDR1 = 4; -const int CSSM_ACL_SUBJECT_TYPE_BIOMETRIC = 8; +const int CSSM_CERT_ENCODING_SEXPR1 = 5; -const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_BIOMETRIC = 86; +const int CSSM_CERT_ENCODING_PGP1 = 6; -const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_BIOMETRIC = 83; +const int CSSM_CERT_ENCODING_MULTIPLE1 = 32766; -const int CSSM_ACL_SUBJECT_TYPE_LOGIN_NAME = 58; +const int CSSM_CERT_ENCODING_LAST1 = 32767; -const int CSSM_ACL_SUBJECT_TYPE_EXT_PAM_NAME = 78; +const int CSSM_CL_CUSTOM_CERT_ENCODING1 = 32768; -const int CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START = 65536; +const int CSSM_CERT_PARSE_FORMAT_NONE1 = 0; -const int CSSM_ACL_AUTHORIZATION_ANY = 1; +const int CSSM_CERT_PARSE_FORMAT_CUSTOM1 = 1; -const int CSSM_ACL_AUTHORIZATION_LOGIN = 57; +const int CSSM_CERT_PARSE_FORMAT_SEXPR1 = 2; -const int CSSM_ACL_AUTHORIZATION_GENKEY = 41; +const int CSSM_CERT_PARSE_FORMAT_COMPLEX1 = 3; -const int CSSM_ACL_AUTHORIZATION_DELETE = 25; +const int CSSM_CERT_PARSE_FORMAT_OID_NAMED1 = 4; -const int CSSM_ACL_AUTHORIZATION_EXPORT_WRAPPED = 38; +const int CSSM_CERT_PARSE_FORMAT_TUPLE1 = 5; -const int CSSM_ACL_AUTHORIZATION_EXPORT_CLEAR = 37; +const int CSSM_CERT_PARSE_FORMAT_MULTIPLE1 = 32766; -const int CSSM_ACL_AUTHORIZATION_IMPORT_WRAPPED = 48; +const int CSSM_CERT_PARSE_FORMAT_LAST1 = 32767; -const int CSSM_ACL_AUTHORIZATION_IMPORT_CLEAR = 47; +const int CSSM_CL_CUSTOM_CERT_PARSE_FORMAT1 = 32768; -const int CSSM_ACL_AUTHORIZATION_SIGN = 115; +const int CSSM_CERTGROUP_DATA1 = 0; -const int CSSM_ACL_AUTHORIZATION_ENCRYPT = 35; +const int CSSM_CERTGROUP_ENCODED_CERT1 = 1; -const int CSSM_ACL_AUTHORIZATION_DECRYPT = 24; +const int CSSM_CERTGROUP_PARSED_CERT1 = 2; -const int CSSM_ACL_AUTHORIZATION_MAC = 59; +const int CSSM_CERTGROUP_CERT_PAIR1 = 3; -const int CSSM_ACL_AUTHORIZATION_DERIVE = 28; +const int CSSM_ACL_SUBJECT_TYPE_ANY1 = 1; -const int CSSM_ACL_AUTHORIZATION_DBS_CREATE = 22; +const int CSSM_ACL_SUBJECT_TYPE_THRESHOLD1 = 123; -const int CSSM_ACL_AUTHORIZATION_DBS_DELETE = 23; +const int CSSM_ACL_SUBJECT_TYPE_PASSWORD1 = 79; -const int CSSM_ACL_AUTHORIZATION_DB_READ = 21; +const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_PASSWORD1 = 87; -const int CSSM_ACL_AUTHORIZATION_DB_INSERT = 19; +const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_PASSWORD1 = 84; -const int CSSM_ACL_AUTHORIZATION_DB_MODIFY = 20; +const int CSSM_ACL_SUBJECT_TYPE_PUBLIC_KEY1 = 89; -const int CSSM_ACL_AUTHORIZATION_DB_DELETE = 17; +const int CSSM_ACL_SUBJECT_TYPE_HASHED_SUBJECT1 = 44; -const int CSSM_ACL_EDIT_MODE_ADD = 1; +const int CSSM_ACL_SUBJECT_TYPE_BIOMETRIC1 = 8; -const int CSSM_ACL_EDIT_MODE_DELETE = 2; +const int CSSM_ACL_SUBJECT_TYPE_PROTECTED_BIOMETRIC1 = 86; -const int CSSM_ACL_EDIT_MODE_REPLACE = 3; +const int CSSM_ACL_SUBJECT_TYPE_PROMPTED_BIOMETRIC1 = 83; -const int CSSM_KEYHEADER_VERSION = 2; +const int CSSM_ACL_SUBJECT_TYPE_LOGIN_NAME1 = 58; -const int CSSM_KEYBLOB_RAW = 0; +const int CSSM_ACL_SUBJECT_TYPE_EXT_PAM_NAME1 = 78; -const int CSSM_KEYBLOB_REFERENCE = 2; +const int CSSM_ACL_AUTHORIZATION_TAG_VENDOR_DEFINED_START1 = 65536; -const int CSSM_KEYBLOB_WRAPPED = 3; +const int CSSM_ACL_AUTHORIZATION_ANY1 = 1; -const int CSSM_KEYBLOB_OTHER = -1; +const int CSSM_ACL_AUTHORIZATION_LOGIN1 = 57; -const int CSSM_KEYBLOB_RAW_FORMAT_NONE = 0; +const int CSSM_ACL_AUTHORIZATION_GENKEY1 = 41; -const int CSSM_KEYBLOB_RAW_FORMAT_PKCS1 = 1; +const int CSSM_ACL_AUTHORIZATION_DELETE1 = 25; -const int CSSM_KEYBLOB_RAW_FORMAT_PKCS3 = 2; +const int CSSM_ACL_AUTHORIZATION_EXPORT_WRAPPED1 = 38; -const int CSSM_KEYBLOB_RAW_FORMAT_MSCAPI = 3; +const int CSSM_ACL_AUTHORIZATION_EXPORT_CLEAR1 = 37; -const int CSSM_KEYBLOB_RAW_FORMAT_PGP = 4; +const int CSSM_ACL_AUTHORIZATION_IMPORT_WRAPPED1 = 48; -const int CSSM_KEYBLOB_RAW_FORMAT_FIPS186 = 5; +const int CSSM_ACL_AUTHORIZATION_IMPORT_CLEAR1 = 47; -const int CSSM_KEYBLOB_RAW_FORMAT_BSAFE = 6; +const int CSSM_ACL_AUTHORIZATION_SIGN1 = 115; -const int CSSM_KEYBLOB_RAW_FORMAT_CCA = 9; +const int CSSM_ACL_AUTHORIZATION_ENCRYPT1 = 35; -const int CSSM_KEYBLOB_RAW_FORMAT_PKCS8 = 10; +const int CSSM_ACL_AUTHORIZATION_DECRYPT1 = 24; -const int CSSM_KEYBLOB_RAW_FORMAT_SPKI = 11; +const int CSSM_ACL_AUTHORIZATION_MAC1 = 59; -const int CSSM_KEYBLOB_RAW_FORMAT_OCTET_STRING = 12; +const int CSSM_ACL_AUTHORIZATION_DERIVE1 = 28; -const int CSSM_KEYBLOB_RAW_FORMAT_OTHER = -1; +const int CSSM_ACL_AUTHORIZATION_DBS_CREATE1 = 22; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_NONE = 0; +const int CSSM_ACL_AUTHORIZATION_DBS_DELETE1 = 23; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS8 = 1; +const int CSSM_ACL_AUTHORIZATION_DB_READ1 = 21; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS7 = 2; +const int CSSM_ACL_AUTHORIZATION_DB_INSERT1 = 19; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_MSCAPI = 3; +const int CSSM_ACL_AUTHORIZATION_DB_MODIFY1 = 20; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_OTHER = -1; +const int CSSM_ACL_AUTHORIZATION_DB_DELETE1 = 17; -const int CSSM_KEYBLOB_REF_FORMAT_INTEGER = 0; +const int CSSM_ACL_EDIT_MODE_ADD1 = 1; -const int CSSM_KEYBLOB_REF_FORMAT_STRING = 1; +const int CSSM_ACL_EDIT_MODE_DELETE1 = 2; -const int CSSM_KEYBLOB_REF_FORMAT_SPKI = 2; +const int CSSM_ACL_EDIT_MODE_REPLACE1 = 3; -const int CSSM_KEYBLOB_REF_FORMAT_OTHER = -1; +const int CSSM_KEYHEADER_VERSION1 = 2; -const int CSSM_KEYCLASS_PUBLIC_KEY = 0; +const int CSSM_KEYBLOB_RAW1 = 0; -const int CSSM_KEYCLASS_PRIVATE_KEY = 1; +const int CSSM_KEYBLOB_REFERENCE1 = 2; -const int CSSM_KEYCLASS_SESSION_KEY = 2; +const int CSSM_KEYBLOB_WRAPPED1 = 3; -const int CSSM_KEYCLASS_SECRET_PART = 3; +const int CSSM_KEYBLOB_OTHER1 = -1; -const int CSSM_KEYCLASS_OTHER = -1; +const int CSSM_KEYBLOB_RAW_FORMAT_NONE1 = 0; -const int CSSM_KEYATTR_RETURN_DEFAULT = 0; +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS11 = 1; -const int CSSM_KEYATTR_RETURN_DATA = 268435456; +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS31 = 2; -const int CSSM_KEYATTR_RETURN_REF = 536870912; +const int CSSM_KEYBLOB_RAW_FORMAT_MSCAPI1 = 3; -const int CSSM_KEYATTR_RETURN_NONE = 1073741824; +const int CSSM_KEYBLOB_RAW_FORMAT_PGP1 = 4; -const int CSSM_KEYATTR_PERMANENT = 1; +const int CSSM_KEYBLOB_RAW_FORMAT_FIPS1861 = 5; -const int CSSM_KEYATTR_PRIVATE = 2; +const int CSSM_KEYBLOB_RAW_FORMAT_BSAFE1 = 6; -const int CSSM_KEYATTR_MODIFIABLE = 4; +const int CSSM_KEYBLOB_RAW_FORMAT_CCA1 = 9; -const int CSSM_KEYATTR_SENSITIVE = 8; +const int CSSM_KEYBLOB_RAW_FORMAT_PKCS81 = 10; -const int CSSM_KEYATTR_EXTRACTABLE = 32; +const int CSSM_KEYBLOB_RAW_FORMAT_SPKI1 = 11; -const int CSSM_KEYATTR_ALWAYS_SENSITIVE = 16; +const int CSSM_KEYBLOB_RAW_FORMAT_OCTET_STRING1 = 12; -const int CSSM_KEYATTR_NEVER_EXTRACTABLE = 64; +const int CSSM_KEYBLOB_RAW_FORMAT_OTHER1 = -1; -const int CSSM_KEYUSE_ANY = -2147483648; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_NONE1 = 0; -const int CSSM_KEYUSE_ENCRYPT = 1; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS81 = 1; -const int CSSM_KEYUSE_DECRYPT = 2; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_PKCS71 = 2; -const int CSSM_KEYUSE_SIGN = 4; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_MSCAPI1 = 3; -const int CSSM_KEYUSE_VERIFY = 8; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OTHER1 = -1; -const int CSSM_KEYUSE_SIGN_RECOVER = 16; +const int CSSM_KEYBLOB_REF_FORMAT_INTEGER1 = 0; -const int CSSM_KEYUSE_VERIFY_RECOVER = 32; +const int CSSM_KEYBLOB_REF_FORMAT_STRING1 = 1; -const int CSSM_KEYUSE_WRAP = 64; +const int CSSM_KEYBLOB_REF_FORMAT_SPKI1 = 2; -const int CSSM_KEYUSE_UNWRAP = 128; +const int CSSM_KEYBLOB_REF_FORMAT_OTHER1 = -1; -const int CSSM_KEYUSE_DERIVE = 256; +const int CSSM_KEYCLASS_PUBLIC_KEY1 = 0; -const int CSSM_ALGID_NONE = 0; +const int CSSM_KEYCLASS_PRIVATE_KEY1 = 1; -const int CSSM_ALGID_CUSTOM = 1; +const int CSSM_KEYCLASS_SESSION_KEY1 = 2; -const int CSSM_ALGID_DH = 2; +const int CSSM_KEYCLASS_SECRET_PART1 = 3; -const int CSSM_ALGID_PH = 3; +const int CSSM_KEYCLASS_OTHER1 = -1; -const int CSSM_ALGID_KEA = 4; +const int CSSM_KEYATTR_RETURN_DEFAULT1 = 0; -const int CSSM_ALGID_MD2 = 5; +const int CSSM_KEYATTR_RETURN_DATA1 = 268435456; -const int CSSM_ALGID_MD4 = 6; +const int CSSM_KEYATTR_RETURN_REF1 = 536870912; -const int CSSM_ALGID_MD5 = 7; +const int CSSM_KEYATTR_RETURN_NONE1 = 1073741824; -const int CSSM_ALGID_SHA1 = 8; +const int CSSM_KEYATTR_PERMANENT1 = 1; -const int CSSM_ALGID_NHASH = 9; +const int CSSM_KEYATTR_PRIVATE1 = 2; -const int CSSM_ALGID_HAVAL = 10; +const int CSSM_KEYATTR_MODIFIABLE1 = 4; -const int CSSM_ALGID_RIPEMD = 11; +const int CSSM_KEYATTR_SENSITIVE1 = 8; -const int CSSM_ALGID_IBCHASH = 12; +const int CSSM_KEYATTR_EXTRACTABLE1 = 32; -const int CSSM_ALGID_RIPEMAC = 13; +const int CSSM_KEYATTR_ALWAYS_SENSITIVE1 = 16; -const int CSSM_ALGID_DES = 14; +const int CSSM_KEYATTR_NEVER_EXTRACTABLE1 = 64; -const int CSSM_ALGID_DESX = 15; +const int CSSM_KEYUSE_ANY1 = -2147483648; -const int CSSM_ALGID_RDES = 16; +const int CSSM_KEYUSE_ENCRYPT1 = 1; -const int CSSM_ALGID_3DES_3KEY_EDE = 17; +const int CSSM_KEYUSE_DECRYPT1 = 2; -const int CSSM_ALGID_3DES_2KEY_EDE = 18; +const int CSSM_KEYUSE_SIGN1 = 4; -const int CSSM_ALGID_3DES_1KEY_EEE = 19; +const int CSSM_KEYUSE_VERIFY1 = 8; -const int CSSM_ALGID_3DES_3KEY = 17; +const int CSSM_KEYUSE_SIGN_RECOVER1 = 16; -const int CSSM_ALGID_3DES_3KEY_EEE = 20; +const int CSSM_KEYUSE_VERIFY_RECOVER1 = 32; -const int CSSM_ALGID_3DES_2KEY = 18; +const int CSSM_KEYUSE_WRAP1 = 64; -const int CSSM_ALGID_3DES_2KEY_EEE = 21; +const int CSSM_KEYUSE_UNWRAP1 = 128; -const int CSSM_ALGID_3DES_1KEY = 20; +const int CSSM_KEYUSE_DERIVE1 = 256; -const int CSSM_ALGID_IDEA = 22; +const int CSSM_ALGID_NONE1 = 0; -const int CSSM_ALGID_RC2 = 23; +const int CSSM_ALGID_CUSTOM1 = 1; -const int CSSM_ALGID_RC5 = 24; +const int CSSM_ALGID_DH1 = 2; -const int CSSM_ALGID_RC4 = 25; +const int CSSM_ALGID_PH1 = 3; -const int CSSM_ALGID_SEAL = 26; +const int CSSM_ALGID_KEA1 = 4; -const int CSSM_ALGID_CAST = 27; +const int CSSM_ALGID_MD21 = 5; -const int CSSM_ALGID_BLOWFISH = 28; +const int CSSM_ALGID_MD41 = 6; -const int CSSM_ALGID_SKIPJACK = 29; +const int CSSM_ALGID_MD51 = 7; -const int CSSM_ALGID_LUCIFER = 30; +const int CSSM_ALGID_SHA11 = 8; -const int CSSM_ALGID_MADRYGA = 31; +const int CSSM_ALGID_NHASH1 = 9; -const int CSSM_ALGID_FEAL = 32; +const int CSSM_ALGID_HAVAL1 = 10; -const int CSSM_ALGID_REDOC = 33; +const int CSSM_ALGID_RIPEMD1 = 11; -const int CSSM_ALGID_REDOC3 = 34; +const int CSSM_ALGID_IBCHASH1 = 12; -const int CSSM_ALGID_LOKI = 35; +const int CSSM_ALGID_RIPEMAC1 = 13; -const int CSSM_ALGID_KHUFU = 36; +const int CSSM_ALGID_DES1 = 14; -const int CSSM_ALGID_KHAFRE = 37; +const int CSSM_ALGID_DESX1 = 15; -const int CSSM_ALGID_MMB = 38; +const int CSSM_ALGID_RDES1 = 16; -const int CSSM_ALGID_GOST = 39; +const int CSSM_ALGID_3DES_3KEY_EDE1 = 17; -const int CSSM_ALGID_SAFER = 40; +const int CSSM_ALGID_3DES_2KEY_EDE1 = 18; -const int CSSM_ALGID_CRAB = 41; +const int CSSM_ALGID_3DES_1KEY_EEE1 = 19; -const int CSSM_ALGID_RSA = 42; +const int CSSM_ALGID_3DES_3KEY1 = 17; -const int CSSM_ALGID_DSA = 43; +const int CSSM_ALGID_3DES_3KEY_EEE1 = 20; -const int CSSM_ALGID_MD5WithRSA = 44; +const int CSSM_ALGID_3DES_2KEY1 = 18; -const int CSSM_ALGID_MD2WithRSA = 45; +const int CSSM_ALGID_3DES_2KEY_EEE1 = 21; -const int CSSM_ALGID_ElGamal = 46; +const int CSSM_ALGID_3DES_1KEY1 = 20; -const int CSSM_ALGID_MD2Random = 47; +const int CSSM_ALGID_IDEA1 = 22; -const int CSSM_ALGID_MD5Random = 48; +const int CSSM_ALGID_RC21 = 23; -const int CSSM_ALGID_SHARandom = 49; +const int CSSM_ALGID_RC51 = 24; -const int CSSM_ALGID_DESRandom = 50; +const int CSSM_ALGID_RC41 = 25; -const int CSSM_ALGID_SHA1WithRSA = 51; +const int CSSM_ALGID_SEAL1 = 26; -const int CSSM_ALGID_CDMF = 52; +const int CSSM_ALGID_CAST1 = 27; -const int CSSM_ALGID_CAST3 = 53; +const int CSSM_ALGID_BLOWFISH1 = 28; -const int CSSM_ALGID_CAST5 = 54; +const int CSSM_ALGID_SKIPJACK1 = 29; -const int CSSM_ALGID_GenericSecret = 55; +const int CSSM_ALGID_LUCIFER1 = 30; -const int CSSM_ALGID_ConcatBaseAndKey = 56; +const int CSSM_ALGID_MADRYGA1 = 31; -const int CSSM_ALGID_ConcatKeyAndBase = 57; +const int CSSM_ALGID_FEAL1 = 32; -const int CSSM_ALGID_ConcatBaseAndData = 58; +const int CSSM_ALGID_REDOC1 = 33; -const int CSSM_ALGID_ConcatDataAndBase = 59; +const int CSSM_ALGID_REDOC31 = 34; -const int CSSM_ALGID_XORBaseAndData = 60; +const int CSSM_ALGID_LOKI1 = 35; -const int CSSM_ALGID_ExtractFromKey = 61; +const int CSSM_ALGID_KHUFU1 = 36; -const int CSSM_ALGID_SSL3PrePrimaryGen = 62; +const int CSSM_ALGID_KHAFRE1 = 37; -const int CSSM_ALGID_SSL3PreMasterGen = 62; +const int CSSM_ALGID_MMB1 = 38; -const int CSSM_ALGID_SSL3PrimaryDerive = 63; +const int CSSM_ALGID_GOST1 = 39; -const int CSSM_ALGID_SSL3MasterDerive = 63; +const int CSSM_ALGID_SAFER1 = 40; -const int CSSM_ALGID_SSL3KeyAndMacDerive = 64; +const int CSSM_ALGID_CRAB1 = 41; -const int CSSM_ALGID_SSL3MD5_MAC = 65; +const int CSSM_ALGID_RSA1 = 42; -const int CSSM_ALGID_SSL3SHA1_MAC = 66; +const int CSSM_ALGID_DSA1 = 43; -const int CSSM_ALGID_PKCS5_PBKDF1_MD5 = 67; +const int CSSM_ALGID_MD5WithRSA1 = 44; -const int CSSM_ALGID_PKCS5_PBKDF1_MD2 = 68; +const int CSSM_ALGID_MD2WithRSA1 = 45; -const int CSSM_ALGID_PKCS5_PBKDF1_SHA1 = 69; +const int CSSM_ALGID_ElGamal1 = 46; -const int CSSM_ALGID_WrapLynks = 70; +const int CSSM_ALGID_MD2Random1 = 47; -const int CSSM_ALGID_WrapSET_OAEP = 71; +const int CSSM_ALGID_MD5Random1 = 48; -const int CSSM_ALGID_BATON = 72; +const int CSSM_ALGID_SHARandom1 = 49; -const int CSSM_ALGID_ECDSA = 73; +const int CSSM_ALGID_DESRandom1 = 50; -const int CSSM_ALGID_MAYFLY = 74; +const int CSSM_ALGID_SHA1WithRSA1 = 51; -const int CSSM_ALGID_JUNIPER = 75; +const int CSSM_ALGID_CDMF1 = 52; -const int CSSM_ALGID_FASTHASH = 76; +const int CSSM_ALGID_CAST31 = 53; -const int CSSM_ALGID_3DES = 77; +const int CSSM_ALGID_CAST51 = 54; -const int CSSM_ALGID_SSL3MD5 = 78; +const int CSSM_ALGID_GenericSecret1 = 55; -const int CSSM_ALGID_SSL3SHA1 = 79; +const int CSSM_ALGID_ConcatBaseAndKey1 = 56; -const int CSSM_ALGID_FortezzaTimestamp = 80; +const int CSSM_ALGID_ConcatKeyAndBase1 = 57; -const int CSSM_ALGID_SHA1WithDSA = 81; +const int CSSM_ALGID_ConcatBaseAndData1 = 58; -const int CSSM_ALGID_SHA1WithECDSA = 82; +const int CSSM_ALGID_ConcatDataAndBase1 = 59; -const int CSSM_ALGID_DSA_BSAFE = 83; +const int CSSM_ALGID_XORBaseAndData1 = 60; -const int CSSM_ALGID_ECDH = 84; +const int CSSM_ALGID_ExtractFromKey1 = 61; -const int CSSM_ALGID_ECMQV = 85; +const int CSSM_ALGID_SSL3PrePrimaryGen1 = 62; -const int CSSM_ALGID_PKCS12_SHA1_PBE = 86; +const int CSSM_ALGID_SSL3PreMasterGen1 = 62; -const int CSSM_ALGID_ECNRA = 87; +const int CSSM_ALGID_SSL3PrimaryDerive1 = 63; -const int CSSM_ALGID_SHA1WithECNRA = 88; +const int CSSM_ALGID_SSL3MasterDerive1 = 63; -const int CSSM_ALGID_ECES = 89; +const int CSSM_ALGID_SSL3KeyAndMacDerive1 = 64; -const int CSSM_ALGID_ECAES = 90; +const int CSSM_ALGID_SSL3MD5_MAC1 = 65; -const int CSSM_ALGID_SHA1HMAC = 91; +const int CSSM_ALGID_SSL3SHA1_MAC1 = 66; -const int CSSM_ALGID_FIPS186Random = 92; +const int CSSM_ALGID_PKCS5_PBKDF1_MD51 = 67; -const int CSSM_ALGID_ECC = 93; +const int CSSM_ALGID_PKCS5_PBKDF1_MD21 = 68; -const int CSSM_ALGID_MQV = 94; +const int CSSM_ALGID_PKCS5_PBKDF1_SHA11 = 69; -const int CSSM_ALGID_NRA = 95; +const int CSSM_ALGID_WrapLynks1 = 70; -const int CSSM_ALGID_IntelPlatformRandom = 96; +const int CSSM_ALGID_WrapSET_OAEP1 = 71; -const int CSSM_ALGID_UTC = 97; +const int CSSM_ALGID_BATON1 = 72; -const int CSSM_ALGID_HAVAL3 = 98; +const int CSSM_ALGID_ECDSA1 = 73; -const int CSSM_ALGID_HAVAL4 = 99; +const int CSSM_ALGID_MAYFLY1 = 74; -const int CSSM_ALGID_HAVAL5 = 100; +const int CSSM_ALGID_JUNIPER1 = 75; -const int CSSM_ALGID_TIGER = 101; +const int CSSM_ALGID_FASTHASH1 = 76; -const int CSSM_ALGID_MD5HMAC = 102; +const int CSSM_ALGID_3DES1 = 77; -const int CSSM_ALGID_PKCS5_PBKDF2 = 103; +const int CSSM_ALGID_SSL3MD51 = 78; -const int CSSM_ALGID_RUNNING_COUNTER = 104; +const int CSSM_ALGID_SSL3SHA11 = 79; -const int CSSM_ALGID_LAST = 2147483647; +const int CSSM_ALGID_FortezzaTimestamp1 = 80; -const int CSSM_ALGID_VENDOR_DEFINED = -2147483648; +const int CSSM_ALGID_SHA1WithDSA1 = 81; -const int CSSM_ALGMODE_NONE = 0; +const int CSSM_ALGID_SHA1WithECDSA1 = 82; -const int CSSM_ALGMODE_CUSTOM = 1; +const int CSSM_ALGID_DSA_BSAFE1 = 83; -const int CSSM_ALGMODE_ECB = 2; +const int CSSM_ALGID_ECDH1 = 84; -const int CSSM_ALGMODE_ECBPad = 3; +const int CSSM_ALGID_ECMQV1 = 85; -const int CSSM_ALGMODE_CBC = 4; +const int CSSM_ALGID_PKCS12_SHA1_PBE1 = 86; -const int CSSM_ALGMODE_CBC_IV8 = 5; +const int CSSM_ALGID_ECNRA1 = 87; -const int CSSM_ALGMODE_CBCPadIV8 = 6; +const int CSSM_ALGID_SHA1WithECNRA1 = 88; -const int CSSM_ALGMODE_CFB = 7; +const int CSSM_ALGID_ECES1 = 89; -const int CSSM_ALGMODE_CFB_IV8 = 8; +const int CSSM_ALGID_ECAES1 = 90; -const int CSSM_ALGMODE_CFBPadIV8 = 9; +const int CSSM_ALGID_SHA1HMAC1 = 91; -const int CSSM_ALGMODE_OFB = 10; +const int CSSM_ALGID_FIPS186Random1 = 92; -const int CSSM_ALGMODE_OFB_IV8 = 11; +const int CSSM_ALGID_ECC1 = 93; -const int CSSM_ALGMODE_OFBPadIV8 = 12; +const int CSSM_ALGID_MQV1 = 94; -const int CSSM_ALGMODE_COUNTER = 13; +const int CSSM_ALGID_NRA1 = 95; -const int CSSM_ALGMODE_BC = 14; +const int CSSM_ALGID_IntelPlatformRandom1 = 96; -const int CSSM_ALGMODE_PCBC = 15; +const int CSSM_ALGID_UTC1 = 97; -const int CSSM_ALGMODE_CBCC = 16; +const int CSSM_ALGID_HAVAL31 = 98; -const int CSSM_ALGMODE_OFBNLF = 17; +const int CSSM_ALGID_HAVAL41 = 99; -const int CSSM_ALGMODE_PBC = 18; +const int CSSM_ALGID_HAVAL51 = 100; -const int CSSM_ALGMODE_PFB = 19; +const int CSSM_ALGID_TIGER1 = 101; -const int CSSM_ALGMODE_CBCPD = 20; +const int CSSM_ALGID_MD5HMAC1 = 102; -const int CSSM_ALGMODE_PUBLIC_KEY = 21; +const int CSSM_ALGID_PKCS5_PBKDF21 = 103; -const int CSSM_ALGMODE_PRIVATE_KEY = 22; +const int CSSM_ALGID_RUNNING_COUNTER1 = 104; -const int CSSM_ALGMODE_SHUFFLE = 23; +const int CSSM_ALGID_LAST1 = 2147483647; -const int CSSM_ALGMODE_ECB64 = 24; +const int CSSM_ALGID_VENDOR_DEFINED1 = -2147483648; -const int CSSM_ALGMODE_CBC64 = 25; +const int CSSM_ALGMODE_NONE1 = 0; -const int CSSM_ALGMODE_OFB64 = 26; +const int CSSM_ALGMODE_CUSTOM1 = 1; -const int CSSM_ALGMODE_CFB32 = 28; +const int CSSM_ALGMODE_ECB1 = 2; -const int CSSM_ALGMODE_CFB16 = 29; +const int CSSM_ALGMODE_ECBPad1 = 3; -const int CSSM_ALGMODE_CFB8 = 30; +const int CSSM_ALGMODE_CBC1 = 4; -const int CSSM_ALGMODE_WRAP = 31; +const int CSSM_ALGMODE_CBC_IV81 = 5; -const int CSSM_ALGMODE_PRIVATE_WRAP = 32; +const int CSSM_ALGMODE_CBCPadIV81 = 6; -const int CSSM_ALGMODE_RELAYX = 33; +const int CSSM_ALGMODE_CFB1 = 7; -const int CSSM_ALGMODE_ECB128 = 34; +const int CSSM_ALGMODE_CFB_IV81 = 8; -const int CSSM_ALGMODE_ECB96 = 35; +const int CSSM_ALGMODE_CFBPadIV81 = 9; -const int CSSM_ALGMODE_CBC128 = 36; +const int CSSM_ALGMODE_OFB1 = 10; -const int CSSM_ALGMODE_OAEP_HASH = 37; +const int CSSM_ALGMODE_OFB_IV81 = 11; -const int CSSM_ALGMODE_PKCS1_EME_V15 = 38; +const int CSSM_ALGMODE_OFBPadIV81 = 12; -const int CSSM_ALGMODE_PKCS1_EME_OAEP = 39; +const int CSSM_ALGMODE_COUNTER1 = 13; -const int CSSM_ALGMODE_PKCS1_EMSA_V15 = 40; +const int CSSM_ALGMODE_BC1 = 14; -const int CSSM_ALGMODE_ISO_9796 = 41; +const int CSSM_ALGMODE_PCBC1 = 15; -const int CSSM_ALGMODE_X9_31 = 42; +const int CSSM_ALGMODE_CBCC1 = 16; -const int CSSM_ALGMODE_LAST = 2147483647; +const int CSSM_ALGMODE_OFBNLF1 = 17; -const int CSSM_ALGMODE_VENDOR_DEFINED = -2147483648; +const int CSSM_ALGMODE_PBC1 = 18; -const int CSSM_CSP_SOFTWARE = 1; +const int CSSM_ALGMODE_PFB1 = 19; -const int CSSM_CSP_HARDWARE = 2; +const int CSSM_ALGMODE_CBCPD1 = 20; -const int CSSM_CSP_HYBRID = 3; +const int CSSM_ALGMODE_PUBLIC_KEY1 = 21; -const int CSSM_ALGCLASS_NONE = 0; +const int CSSM_ALGMODE_PRIVATE_KEY1 = 22; -const int CSSM_ALGCLASS_CUSTOM = 1; +const int CSSM_ALGMODE_SHUFFLE1 = 23; -const int CSSM_ALGCLASS_SIGNATURE = 2; +const int CSSM_ALGMODE_ECB641 = 24; -const int CSSM_ALGCLASS_SYMMETRIC = 3; +const int CSSM_ALGMODE_CBC641 = 25; -const int CSSM_ALGCLASS_DIGEST = 4; +const int CSSM_ALGMODE_OFB641 = 26; -const int CSSM_ALGCLASS_RANDOMGEN = 5; +const int CSSM_ALGMODE_CFB321 = 28; -const int CSSM_ALGCLASS_UNIQUEGEN = 6; +const int CSSM_ALGMODE_CFB161 = 29; -const int CSSM_ALGCLASS_MAC = 7; +const int CSSM_ALGMODE_CFB81 = 30; -const int CSSM_ALGCLASS_ASYMMETRIC = 8; +const int CSSM_ALGMODE_WRAP1 = 31; -const int CSSM_ALGCLASS_KEYGEN = 9; +const int CSSM_ALGMODE_PRIVATE_WRAP1 = 32; -const int CSSM_ALGCLASS_DERIVEKEY = 10; +const int CSSM_ALGMODE_RELAYX1 = 33; -const int CSSM_ATTRIBUTE_DATA_NONE = 0; +const int CSSM_ALGMODE_ECB1281 = 34; -const int CSSM_ATTRIBUTE_DATA_UINT32 = 268435456; +const int CSSM_ALGMODE_ECB961 = 35; -const int CSSM_ATTRIBUTE_DATA_CSSM_DATA = 536870912; +const int CSSM_ALGMODE_CBC1281 = 36; -const int CSSM_ATTRIBUTE_DATA_CRYPTO_DATA = 805306368; +const int CSSM_ALGMODE_OAEP_HASH1 = 37; -const int CSSM_ATTRIBUTE_DATA_KEY = 1073741824; +const int CSSM_ALGMODE_PKCS1_EME_V151 = 38; -const int CSSM_ATTRIBUTE_DATA_STRING = 1342177280; +const int CSSM_ALGMODE_PKCS1_EME_OAEP1 = 39; -const int CSSM_ATTRIBUTE_DATA_DATE = 1610612736; +const int CSSM_ALGMODE_PKCS1_EMSA_V151 = 40; -const int CSSM_ATTRIBUTE_DATA_RANGE = 1879048192; +const int CSSM_ALGMODE_ISO_97961 = 41; -const int CSSM_ATTRIBUTE_DATA_ACCESS_CREDENTIALS = -2147483648; +const int CSSM_ALGMODE_X9_311 = 42; -const int CSSM_ATTRIBUTE_DATA_VERSION = 16777216; +const int CSSM_ALGMODE_LAST1 = 2147483647; -const int CSSM_ATTRIBUTE_DATA_DL_DB_HANDLE = 33554432; +const int CSSM_ALGMODE_VENDOR_DEFINED1 = -2147483648; -const int CSSM_ATTRIBUTE_DATA_KR_PROFILE = 50331648; +const int CSSM_CSP_SOFTWARE1 = 1; -const int CSSM_ATTRIBUTE_TYPE_MASK = -16777216; +const int CSSM_CSP_HARDWARE1 = 2; -const int CSSM_ATTRIBUTE_NONE = 0; +const int CSSM_CSP_HYBRID1 = 3; -const int CSSM_ATTRIBUTE_CUSTOM = 536870913; +const int CSSM_ALGCLASS_NONE1 = 0; -const int CSSM_ATTRIBUTE_DESCRIPTION = 1342177282; +const int CSSM_ALGCLASS_CUSTOM1 = 1; -const int CSSM_ATTRIBUTE_KEY = 1073741827; +const int CSSM_ALGCLASS_SIGNATURE1 = 2; -const int CSSM_ATTRIBUTE_INIT_VECTOR = 536870916; +const int CSSM_ALGCLASS_SYMMETRIC1 = 3; -const int CSSM_ATTRIBUTE_SALT = 536870917; +const int CSSM_ALGCLASS_DIGEST1 = 4; -const int CSSM_ATTRIBUTE_PADDING = 268435462; +const int CSSM_ALGCLASS_RANDOMGEN1 = 5; -const int CSSM_ATTRIBUTE_RANDOM = 536870919; +const int CSSM_ALGCLASS_UNIQUEGEN1 = 6; -const int CSSM_ATTRIBUTE_SEED = 805306376; +const int CSSM_ALGCLASS_MAC1 = 7; -const int CSSM_ATTRIBUTE_PASSPHRASE = 805306377; +const int CSSM_ALGCLASS_ASYMMETRIC1 = 8; -const int CSSM_ATTRIBUTE_KEY_LENGTH = 268435466; +const int CSSM_ALGCLASS_KEYGEN1 = 9; -const int CSSM_ATTRIBUTE_KEY_LENGTH_RANGE = 1879048203; +const int CSSM_ALGCLASS_DERIVEKEY1 = 10; -const int CSSM_ATTRIBUTE_BLOCK_SIZE = 268435468; +const int CSSM_ATTRIBUTE_DATA_NONE1 = 0; -const int CSSM_ATTRIBUTE_OUTPUT_SIZE = 268435469; +const int CSSM_ATTRIBUTE_DATA_UINT321 = 268435456; -const int CSSM_ATTRIBUTE_ROUNDS = 268435470; +const int CSSM_ATTRIBUTE_DATA_CSSM_DATA1 = 536870912; -const int CSSM_ATTRIBUTE_IV_SIZE = 268435471; +const int CSSM_ATTRIBUTE_DATA_CRYPTO_DATA1 = 805306368; -const int CSSM_ATTRIBUTE_ALG_PARAMS = 536870928; +const int CSSM_ATTRIBUTE_DATA_KEY1 = 1073741824; -const int CSSM_ATTRIBUTE_LABEL = 536870929; +const int CSSM_ATTRIBUTE_DATA_STRING1 = 1342177280; -const int CSSM_ATTRIBUTE_KEY_TYPE = 268435474; +const int CSSM_ATTRIBUTE_DATA_DATE1 = 1610612736; -const int CSSM_ATTRIBUTE_MODE = 268435475; +const int CSSM_ATTRIBUTE_DATA_RANGE1 = 1879048192; -const int CSSM_ATTRIBUTE_EFFECTIVE_BITS = 268435476; +const int CSSM_ATTRIBUTE_DATA_ACCESS_CREDENTIALS1 = -2147483648; -const int CSSM_ATTRIBUTE_START_DATE = 1610612757; +const int CSSM_ATTRIBUTE_DATA_VERSION1 = 16777216; -const int CSSM_ATTRIBUTE_END_DATE = 1610612758; +const int CSSM_ATTRIBUTE_DATA_DL_DB_HANDLE1 = 33554432; -const int CSSM_ATTRIBUTE_KEYUSAGE = 268435479; +const int CSSM_ATTRIBUTE_DATA_KR_PROFILE1 = 50331648; -const int CSSM_ATTRIBUTE_KEYATTR = 268435480; +const int CSSM_ATTRIBUTE_TYPE_MASK1 = -16777216; -const int CSSM_ATTRIBUTE_VERSION = 16777241; +const int CSSM_ATTRIBUTE_NONE1 = 0; -const int CSSM_ATTRIBUTE_PRIME = 536870938; +const int CSSM_ATTRIBUTE_CUSTOM1 = 536870913; -const int CSSM_ATTRIBUTE_BASE = 536870939; +const int CSSM_ATTRIBUTE_DESCRIPTION1 = 1342177282; -const int CSSM_ATTRIBUTE_SUBPRIME = 536870940; +const int CSSM_ATTRIBUTE_KEY1 = 1073741827; -const int CSSM_ATTRIBUTE_ALG_ID = 268435485; +const int CSSM_ATTRIBUTE_INIT_VECTOR1 = 536870916; -const int CSSM_ATTRIBUTE_ITERATION_COUNT = 268435486; +const int CSSM_ATTRIBUTE_SALT1 = 536870917; -const int CSSM_ATTRIBUTE_ROUNDS_RANGE = 1879048223; +const int CSSM_ATTRIBUTE_PADDING1 = 268435462; -const int CSSM_ATTRIBUTE_KRPROFILE_LOCAL = 50331680; +const int CSSM_ATTRIBUTE_RANDOM1 = 536870919; -const int CSSM_ATTRIBUTE_KRPROFILE_REMOTE = 50331681; +const int CSSM_ATTRIBUTE_SEED1 = 805306376; -const int CSSM_ATTRIBUTE_CSP_HANDLE = 268435490; +const int CSSM_ATTRIBUTE_PASSPHRASE1 = 805306377; -const int CSSM_ATTRIBUTE_DL_DB_HANDLE = 33554467; +const int CSSM_ATTRIBUTE_KEY_LENGTH1 = 268435466; -const int CSSM_ATTRIBUTE_ACCESS_CREDENTIALS = -2147483612; +const int CSSM_ATTRIBUTE_KEY_LENGTH_RANGE1 = 1879048203; -const int CSSM_ATTRIBUTE_PUBLIC_KEY_FORMAT = 268435493; +const int CSSM_ATTRIBUTE_BLOCK_SIZE1 = 268435468; -const int CSSM_ATTRIBUTE_PRIVATE_KEY_FORMAT = 268435494; +const int CSSM_ATTRIBUTE_OUTPUT_SIZE1 = 268435469; -const int CSSM_ATTRIBUTE_SYMMETRIC_KEY_FORMAT = 268435495; +const int CSSM_ATTRIBUTE_ROUNDS1 = 268435470; -const int CSSM_ATTRIBUTE_WRAPPED_KEY_FORMAT = 268435496; +const int CSSM_ATTRIBUTE_IV_SIZE1 = 268435471; -const int CSSM_PADDING_NONE = 0; +const int CSSM_ATTRIBUTE_ALG_PARAMS1 = 536870928; -const int CSSM_PADDING_CUSTOM = 1; +const int CSSM_ATTRIBUTE_LABEL1 = 536870929; -const int CSSM_PADDING_ZERO = 2; +const int CSSM_ATTRIBUTE_KEY_TYPE1 = 268435474; -const int CSSM_PADDING_ONE = 3; +const int CSSM_ATTRIBUTE_MODE1 = 268435475; -const int CSSM_PADDING_ALTERNATE = 4; +const int CSSM_ATTRIBUTE_EFFECTIVE_BITS1 = 268435476; -const int CSSM_PADDING_FF = 5; +const int CSSM_ATTRIBUTE_START_DATE1 = 1610612757; -const int CSSM_PADDING_PKCS5 = 6; +const int CSSM_ATTRIBUTE_END_DATE1 = 1610612758; -const int CSSM_PADDING_PKCS7 = 7; +const int CSSM_ATTRIBUTE_KEYUSAGE1 = 268435479; -const int CSSM_PADDING_CIPHERSTEALING = 8; +const int CSSM_ATTRIBUTE_KEYATTR1 = 268435480; -const int CSSM_PADDING_RANDOM = 9; +const int CSSM_ATTRIBUTE_VERSION1 = 16777241; -const int CSSM_PADDING_PKCS1 = 10; +const int CSSM_ATTRIBUTE_PRIME1 = 536870938; -const int CSSM_PADDING_SIGRAW = 11; +const int CSSM_ATTRIBUTE_BASE1 = 536870939; -const int CSSM_PADDING_VENDOR_DEFINED = -2147483648; +const int CSSM_ATTRIBUTE_SUBPRIME1 = 536870940; -const int CSSM_CSP_TOK_RNG = 1; +const int CSSM_ATTRIBUTE_ALG_ID1 = 268435485; -const int CSSM_CSP_TOK_CLOCK_EXISTS = 64; +const int CSSM_ATTRIBUTE_ITERATION_COUNT1 = 268435486; -const int CSSM_CSP_RDR_TOKENPRESENT = 1; +const int CSSM_ATTRIBUTE_ROUNDS_RANGE1 = 1879048223; -const int CSSM_CSP_RDR_EXISTS = 2; +const int CSSM_ATTRIBUTE_KRPROFILE_LOCAL1 = 50331680; -const int CSSM_CSP_RDR_HW = 4; +const int CSSM_ATTRIBUTE_KRPROFILE_REMOTE1 = 50331681; -const int CSSM_CSP_TOK_WRITE_PROTECTED = 2; +const int CSSM_ATTRIBUTE_CSP_HANDLE1 = 268435490; -const int CSSM_CSP_TOK_LOGIN_REQUIRED = 4; +const int CSSM_ATTRIBUTE_DL_DB_HANDLE1 = 33554467; -const int CSSM_CSP_TOK_USER_PIN_INITIALIZED = 8; +const int CSSM_ATTRIBUTE_ACCESS_CREDENTIALS1 = -2147483612; -const int CSSM_CSP_TOK_PROT_AUTHENTICATION = 256; +const int CSSM_ATTRIBUTE_PUBLIC_KEY_FORMAT1 = 268435493; -const int CSSM_CSP_TOK_USER_PIN_EXPIRED = 1048576; +const int CSSM_ATTRIBUTE_PRIVATE_KEY_FORMAT1 = 268435494; -const int CSSM_CSP_TOK_SESSION_KEY_PASSWORD = 2097152; +const int CSSM_ATTRIBUTE_SYMMETRIC_KEY_FORMAT1 = 268435495; -const int CSSM_CSP_TOK_PRIVATE_KEY_PASSWORD = 4194304; +const int CSSM_ATTRIBUTE_WRAPPED_KEY_FORMAT1 = 268435496; -const int CSSM_CSP_STORES_PRIVATE_KEYS = 16777216; +const int CSSM_PADDING_NONE1 = 0; -const int CSSM_CSP_STORES_PUBLIC_KEYS = 33554432; +const int CSSM_PADDING_CUSTOM1 = 1; -const int CSSM_CSP_STORES_SESSION_KEYS = 67108864; +const int CSSM_PADDING_ZERO1 = 2; -const int CSSM_CSP_STORES_CERTIFICATES = 134217728; +const int CSSM_PADDING_ONE1 = 3; -const int CSSM_CSP_STORES_GENERIC = 268435456; +const int CSSM_PADDING_ALTERNATE1 = 4; -const int CSSM_PKCS_OAEP_MGF_NONE = 0; +const int CSSM_PADDING_FF1 = 5; -const int CSSM_PKCS_OAEP_MGF1_SHA1 = 1; +const int CSSM_PADDING_PKCS51 = 6; -const int CSSM_PKCS_OAEP_MGF1_MD5 = 2; +const int CSSM_PADDING_PKCS71 = 7; -const int CSSM_PKCS_OAEP_PSOURCE_NONE = 0; +const int CSSM_PADDING_CIPHERSTEALING1 = 8; -const int CSSM_PKCS_OAEP_PSOURCE_Pspecified = 1; +const int CSSM_PADDING_RANDOM1 = 9; -const int CSSM_VALUE_NOT_AVAILABLE = -1; +const int CSSM_PADDING_PKCS11 = 10; -const int CSSM_PKCS5_PBKDF2_PRF_HMAC_SHA1 = 0; +const int CSSM_PADDING_SIGRAW1 = 11; -const int CSSM_TP_AUTHORITY_REQUEST_CERTISSUE = 1; +const int CSSM_PADDING_VENDOR_DEFINED1 = -2147483648; -const int CSSM_TP_AUTHORITY_REQUEST_CERTREVOKE = 2; +const int CSSM_CSP_TOK_RNG1 = 1; -const int CSSM_TP_AUTHORITY_REQUEST_CERTSUSPEND = 3; +const int CSSM_CSP_TOK_CLOCK_EXISTS1 = 64; -const int CSSM_TP_AUTHORITY_REQUEST_CERTRESUME = 4; +const int CSSM_CSP_RDR_TOKENPRESENT1 = 1; -const int CSSM_TP_AUTHORITY_REQUEST_CERTVERIFY = 5; +const int CSSM_CSP_RDR_EXISTS1 = 2; -const int CSSM_TP_AUTHORITY_REQUEST_CERTNOTARIZE = 6; +const int CSSM_CSP_RDR_HW1 = 4; -const int CSSM_TP_AUTHORITY_REQUEST_CERTUSERECOVER = 7; +const int CSSM_CSP_TOK_WRITE_PROTECTED1 = 2; -const int CSSM_TP_AUTHORITY_REQUEST_CRLISSUE = 256; +const int CSSM_CSP_TOK_LOGIN_REQUIRED1 = 4; -const int CSSM_TP_KEY_ARCHIVE = 1; +const int CSSM_CSP_TOK_USER_PIN_INITIALIZED1 = 8; -const int CSSM_TP_CERT_PUBLISH = 2; +const int CSSM_CSP_TOK_PROT_AUTHENTICATION1 = 256; -const int CSSM_TP_CERT_NOTIFY_RENEW = 4; +const int CSSM_CSP_TOK_USER_PIN_EXPIRED1 = 1048576; -const int CSSM_TP_CERT_DIR_UPDATE = 8; +const int CSSM_CSP_TOK_SESSION_KEY_PASSWORD1 = 2097152; -const int CSSM_TP_CRL_DISTRIBUTE = 16; +const int CSSM_CSP_TOK_PRIVATE_KEY_PASSWORD1 = 4194304; -const int CSSM_TP_ACTION_DEFAULT = 0; +const int CSSM_CSP_STORES_PRIVATE_KEYS1 = 16777216; -const int CSSM_TP_STOP_ON_POLICY = 0; +const int CSSM_CSP_STORES_PUBLIC_KEYS1 = 33554432; -const int CSSM_TP_STOP_ON_NONE = 1; +const int CSSM_CSP_STORES_SESSION_KEYS1 = 67108864; -const int CSSM_TP_STOP_ON_FIRST_PASS = 2; +const int CSSM_CSP_STORES_CERTIFICATES1 = 134217728; -const int CSSM_TP_STOP_ON_FIRST_FAIL = 3; +const int CSSM_CSP_STORES_GENERIC1 = 268435456; -const int CSSM_CRL_PARSE_FORMAT_NONE = 0; +const int CSSM_PKCS_OAEP_MGF_NONE1 = 0; -const int CSSM_CRL_PARSE_FORMAT_CUSTOM = 1; +const int CSSM_PKCS_OAEP_MGF1_SHA11 = 1; -const int CSSM_CRL_PARSE_FORMAT_SEXPR = 2; +const int CSSM_PKCS_OAEP_MGF1_MD51 = 2; -const int CSSM_CRL_PARSE_FORMAT_COMPLEX = 3; +const int CSSM_PKCS_OAEP_PSOURCE_NONE1 = 0; -const int CSSM_CRL_PARSE_FORMAT_OID_NAMED = 4; +const int CSSM_PKCS_OAEP_PSOURCE_Pspecified1 = 1; -const int CSSM_CRL_PARSE_FORMAT_TUPLE = 5; +const int CSSM_VALUE_NOT_AVAILABLE1 = -1; -const int CSSM_CRL_PARSE_FORMAT_MULTIPLE = 32766; +const int CSSM_PKCS5_PBKDF2_PRF_HMAC_SHA11 = 0; -const int CSSM_CRL_PARSE_FORMAT_LAST = 32767; +const int CSSM_TP_AUTHORITY_REQUEST_CERTISSUE1 = 1; -const int CSSM_CL_CUSTOM_CRL_PARSE_FORMAT = 32768; +const int CSSM_TP_AUTHORITY_REQUEST_CERTREVOKE1 = 2; -const int CSSM_CRL_TYPE_UNKNOWN = 0; +const int CSSM_TP_AUTHORITY_REQUEST_CERTSUSPEND1 = 3; -const int CSSM_CRL_TYPE_X_509v1 = 1; +const int CSSM_TP_AUTHORITY_REQUEST_CERTRESUME1 = 4; -const int CSSM_CRL_TYPE_X_509v2 = 2; +const int CSSM_TP_AUTHORITY_REQUEST_CERTVERIFY1 = 5; -const int CSSM_CRL_TYPE_SPKI = 3; +const int CSSM_TP_AUTHORITY_REQUEST_CERTNOTARIZE1 = 6; -const int CSSM_CRL_TYPE_MULTIPLE = 32766; +const int CSSM_TP_AUTHORITY_REQUEST_CERTUSERECOVER1 = 7; -const int CSSM_CRL_ENCODING_UNKNOWN = 0; +const int CSSM_TP_AUTHORITY_REQUEST_CRLISSUE1 = 256; -const int CSSM_CRL_ENCODING_CUSTOM = 1; +const int CSSM_TP_KEY_ARCHIVE1 = 1; -const int CSSM_CRL_ENCODING_BER = 2; +const int CSSM_TP_CERT_PUBLISH1 = 2; -const int CSSM_CRL_ENCODING_DER = 3; +const int CSSM_TP_CERT_NOTIFY_RENEW1 = 4; -const int CSSM_CRL_ENCODING_BLOOM = 4; +const int CSSM_TP_CERT_DIR_UPDATE1 = 8; -const int CSSM_CRL_ENCODING_SEXPR = 5; +const int CSSM_TP_CRL_DISTRIBUTE1 = 16; -const int CSSM_CRL_ENCODING_MULTIPLE = 32766; +const int CSSM_TP_ACTION_DEFAULT1 = 0; -const int CSSM_CRLGROUP_DATA = 0; +const int CSSM_TP_STOP_ON_POLICY1 = 0; -const int CSSM_CRLGROUP_ENCODED_CRL = 1; +const int CSSM_TP_STOP_ON_NONE1 = 1; -const int CSSM_CRLGROUP_PARSED_CRL = 2; +const int CSSM_TP_STOP_ON_FIRST_PASS1 = 2; -const int CSSM_CRLGROUP_CRL_PAIR = 3; +const int CSSM_TP_STOP_ON_FIRST_FAIL1 = 3; -const int CSSM_EVIDENCE_FORM_UNSPECIFIC = 0; +const int CSSM_CRL_PARSE_FORMAT_NONE1 = 0; -const int CSSM_EVIDENCE_FORM_CERT = 1; +const int CSSM_CRL_PARSE_FORMAT_CUSTOM1 = 1; -const int CSSM_EVIDENCE_FORM_CRL = 2; +const int CSSM_CRL_PARSE_FORMAT_SEXPR1 = 2; -const int CSSM_EVIDENCE_FORM_CERT_ID = 3; +const int CSSM_CRL_PARSE_FORMAT_COMPLEX1 = 3; -const int CSSM_EVIDENCE_FORM_CRL_ID = 4; +const int CSSM_CRL_PARSE_FORMAT_OID_NAMED1 = 4; -const int CSSM_EVIDENCE_FORM_VERIFIER_TIME = 5; +const int CSSM_CRL_PARSE_FORMAT_TUPLE1 = 5; -const int CSSM_EVIDENCE_FORM_CRL_THISTIME = 6; +const int CSSM_CRL_PARSE_FORMAT_MULTIPLE1 = 32766; -const int CSSM_EVIDENCE_FORM_CRL_NEXTTIME = 7; +const int CSSM_CRL_PARSE_FORMAT_LAST1 = 32767; -const int CSSM_EVIDENCE_FORM_POLICYINFO = 8; +const int CSSM_CL_CUSTOM_CRL_PARSE_FORMAT1 = 32768; -const int CSSM_EVIDENCE_FORM_TUPLEGROUP = 9; +const int CSSM_CRL_TYPE_UNKNOWN1 = 0; -const int CSSM_TP_CONFIRM_STATUS_UNKNOWN = 0; +const int CSSM_CRL_TYPE_X_509v11 = 1; -const int CSSM_TP_CONFIRM_ACCEPT = 1; +const int CSSM_CRL_TYPE_X_509v21 = 2; -const int CSSM_TP_CONFIRM_REJECT = 2; +const int CSSM_CRL_TYPE_SPKI1 = 3; -const int CSSM_ESTIMATED_TIME_UNKNOWN = -1; +const int CSSM_CRL_TYPE_MULTIPLE1 = 32766; -const int CSSM_ELAPSED_TIME_UNKNOWN = -1; +const int CSSM_CRL_ENCODING_UNKNOWN1 = 0; -const int CSSM_ELAPSED_TIME_COMPLETE = -2; +const int CSSM_CRL_ENCODING_CUSTOM1 = 1; -const int CSSM_TP_CERTISSUE_STATUS_UNKNOWN = 0; +const int CSSM_CRL_ENCODING_BER1 = 2; -const int CSSM_TP_CERTISSUE_OK = 1; +const int CSSM_CRL_ENCODING_DER1 = 3; -const int CSSM_TP_CERTISSUE_OKWITHCERTMODS = 2; +const int CSSM_CRL_ENCODING_BLOOM1 = 4; -const int CSSM_TP_CERTISSUE_OKWITHSERVICEMODS = 3; +const int CSSM_CRL_ENCODING_SEXPR1 = 5; -const int CSSM_TP_CERTISSUE_REJECTED = 4; +const int CSSM_CRL_ENCODING_MULTIPLE1 = 32766; -const int CSSM_TP_CERTISSUE_NOT_AUTHORIZED = 5; +const int CSSM_CRLGROUP_DATA1 = 0; -const int CSSM_TP_CERTISSUE_WILL_BE_REVOKED = 6; +const int CSSM_CRLGROUP_ENCODED_CRL1 = 1; -const int CSSM_TP_CERTCHANGE_NONE = 0; +const int CSSM_CRLGROUP_PARSED_CRL1 = 2; -const int CSSM_TP_CERTCHANGE_REVOKE = 1; +const int CSSM_CRLGROUP_CRL_PAIR1 = 3; -const int CSSM_TP_CERTCHANGE_HOLD = 2; +const int CSSM_EVIDENCE_FORM_UNSPECIFIC1 = 0; -const int CSSM_TP_CERTCHANGE_RELEASE = 3; +const int CSSM_EVIDENCE_FORM_CERT1 = 1; -const int CSSM_TP_CERTCHANGE_REASON_UNKNOWN = 0; +const int CSSM_EVIDENCE_FORM_CRL1 = 2; -const int CSSM_TP_CERTCHANGE_REASON_KEYCOMPROMISE = 1; +const int CSSM_EVIDENCE_FORM_CERT_ID1 = 3; -const int CSSM_TP_CERTCHANGE_REASON_CACOMPROMISE = 2; +const int CSSM_EVIDENCE_FORM_CRL_ID1 = 4; -const int CSSM_TP_CERTCHANGE_REASON_CEASEOPERATION = 3; +const int CSSM_EVIDENCE_FORM_VERIFIER_TIME1 = 5; -const int CSSM_TP_CERTCHANGE_REASON_AFFILIATIONCHANGE = 4; +const int CSSM_EVIDENCE_FORM_CRL_THISTIME1 = 6; -const int CSSM_TP_CERTCHANGE_REASON_SUPERCEDED = 5; +const int CSSM_EVIDENCE_FORM_CRL_NEXTTIME1 = 7; -const int CSSM_TP_CERTCHANGE_REASON_SUSPECTEDCOMPROMISE = 6; +const int CSSM_EVIDENCE_FORM_POLICYINFO1 = 8; -const int CSSM_TP_CERTCHANGE_REASON_HOLDRELEASE = 7; +const int CSSM_EVIDENCE_FORM_TUPLEGROUP1 = 9; -const int CSSM_TP_CERTCHANGE_STATUS_UNKNOWN = 0; +const int CSSM_TP_CONFIRM_STATUS_UNKNOWN1 = 0; -const int CSSM_TP_CERTCHANGE_OK = 1; +const int CSSM_TP_CONFIRM_ACCEPT1 = 1; -const int CSSM_TP_CERTCHANGE_OKWITHNEWTIME = 2; +const int CSSM_TP_CONFIRM_REJECT1 = 2; -const int CSSM_TP_CERTCHANGE_WRONGCA = 3; +const int CSSM_ESTIMATED_TIME_UNKNOWN1 = -1; -const int CSSM_TP_CERTCHANGE_REJECTED = 4; +const int CSSM_ELAPSED_TIME_UNKNOWN1 = -1; -const int CSSM_TP_CERTCHANGE_NOT_AUTHORIZED = 5; +const int CSSM_ELAPSED_TIME_COMPLETE1 = -2; -const int CSSM_TP_CERTVERIFY_UNKNOWN = 0; +const int CSSM_TP_CERTISSUE_STATUS_UNKNOWN1 = 0; -const int CSSM_TP_CERTVERIFY_VALID = 1; +const int CSSM_TP_CERTISSUE_OK1 = 1; -const int CSSM_TP_CERTVERIFY_INVALID = 2; +const int CSSM_TP_CERTISSUE_OKWITHCERTMODS1 = 2; -const int CSSM_TP_CERTVERIFY_REVOKED = 3; +const int CSSM_TP_CERTISSUE_OKWITHSERVICEMODS1 = 3; -const int CSSM_TP_CERTVERIFY_SUSPENDED = 4; +const int CSSM_TP_CERTISSUE_REJECTED1 = 4; -const int CSSM_TP_CERTVERIFY_EXPIRED = 5; +const int CSSM_TP_CERTISSUE_NOT_AUTHORIZED1 = 5; -const int CSSM_TP_CERTVERIFY_NOT_VALID_YET = 6; +const int CSSM_TP_CERTISSUE_WILL_BE_REVOKED1 = 6; -const int CSSM_TP_CERTVERIFY_INVALID_AUTHORITY = 7; +const int CSSM_TP_CERTCHANGE_NONE1 = 0; -const int CSSM_TP_CERTVERIFY_INVALID_SIGNATURE = 8; +const int CSSM_TP_CERTCHANGE_REVOKE1 = 1; -const int CSSM_TP_CERTVERIFY_INVALID_CERT_VALUE = 9; +const int CSSM_TP_CERTCHANGE_HOLD1 = 2; -const int CSSM_TP_CERTVERIFY_INVALID_CERTGROUP = 10; +const int CSSM_TP_CERTCHANGE_RELEASE1 = 3; -const int CSSM_TP_CERTVERIFY_INVALID_POLICY = 11; +const int CSSM_TP_CERTCHANGE_REASON_UNKNOWN1 = 0; -const int CSSM_TP_CERTVERIFY_INVALID_POLICY_IDS = 12; +const int CSSM_TP_CERTCHANGE_REASON_KEYCOMPROMISE1 = 1; -const int CSSM_TP_CERTVERIFY_INVALID_BASIC_CONSTRAINTS = 13; +const int CSSM_TP_CERTCHANGE_REASON_CACOMPROMISE1 = 2; -const int CSSM_TP_CERTVERIFY_INVALID_CRL_DIST_PT = 14; +const int CSSM_TP_CERTCHANGE_REASON_CEASEOPERATION1 = 3; -const int CSSM_TP_CERTVERIFY_INVALID_NAME_TREE = 15; +const int CSSM_TP_CERTCHANGE_REASON_AFFILIATIONCHANGE1 = 4; -const int CSSM_TP_CERTVERIFY_UNKNOWN_CRITICAL_EXT = 16; +const int CSSM_TP_CERTCHANGE_REASON_SUPERCEDED1 = 5; -const int CSSM_TP_CERTNOTARIZE_STATUS_UNKNOWN = 0; +const int CSSM_TP_CERTCHANGE_REASON_SUSPECTEDCOMPROMISE1 = 6; -const int CSSM_TP_CERTNOTARIZE_OK = 1; +const int CSSM_TP_CERTCHANGE_REASON_HOLDRELEASE1 = 7; -const int CSSM_TP_CERTNOTARIZE_OKWITHOUTFIELDS = 2; +const int CSSM_TP_CERTCHANGE_STATUS_UNKNOWN1 = 0; -const int CSSM_TP_CERTNOTARIZE_OKWITHSERVICEMODS = 3; +const int CSSM_TP_CERTCHANGE_OK1 = 1; -const int CSSM_TP_CERTNOTARIZE_REJECTED = 4; +const int CSSM_TP_CERTCHANGE_OKWITHNEWTIME1 = 2; -const int CSSM_TP_CERTNOTARIZE_NOT_AUTHORIZED = 5; +const int CSSM_TP_CERTCHANGE_WRONGCA1 = 3; -const int CSSM_TP_CERTRECLAIM_STATUS_UNKNOWN = 0; +const int CSSM_TP_CERTCHANGE_REJECTED1 = 4; -const int CSSM_TP_CERTRECLAIM_OK = 1; +const int CSSM_TP_CERTCHANGE_NOT_AUTHORIZED1 = 5; -const int CSSM_TP_CERTRECLAIM_NOMATCH = 2; +const int CSSM_TP_CERTVERIFY_UNKNOWN1 = 0; -const int CSSM_TP_CERTRECLAIM_REJECTED = 3; +const int CSSM_TP_CERTVERIFY_VALID1 = 1; -const int CSSM_TP_CERTRECLAIM_NOT_AUTHORIZED = 4; +const int CSSM_TP_CERTVERIFY_INVALID1 = 2; -const int CSSM_TP_CRLISSUE_STATUS_UNKNOWN = 0; +const int CSSM_TP_CERTVERIFY_REVOKED1 = 3; -const int CSSM_TP_CRLISSUE_OK = 1; +const int CSSM_TP_CERTVERIFY_SUSPENDED1 = 4; -const int CSSM_TP_CRLISSUE_NOT_CURRENT = 2; +const int CSSM_TP_CERTVERIFY_EXPIRED1 = 5; -const int CSSM_TP_CRLISSUE_INVALID_DOMAIN = 3; +const int CSSM_TP_CERTVERIFY_NOT_VALID_YET1 = 6; -const int CSSM_TP_CRLISSUE_UNKNOWN_IDENTIFIER = 4; +const int CSSM_TP_CERTVERIFY_INVALID_AUTHORITY1 = 7; -const int CSSM_TP_CRLISSUE_REJECTED = 5; +const int CSSM_TP_CERTVERIFY_INVALID_SIGNATURE1 = 8; -const int CSSM_TP_CRLISSUE_NOT_AUTHORIZED = 6; +const int CSSM_TP_CERTVERIFY_INVALID_CERT_VALUE1 = 9; -const int CSSM_TP_FORM_TYPE_GENERIC = 0; +const int CSSM_TP_CERTVERIFY_INVALID_CERTGROUP1 = 10; -const int CSSM_TP_FORM_TYPE_REGISTRATION = 1; +const int CSSM_TP_CERTVERIFY_INVALID_POLICY1 = 11; -const int CSSM_CL_TEMPLATE_INTERMEDIATE_CERT = 1; +const int CSSM_TP_CERTVERIFY_INVALID_POLICY_IDS1 = 12; -const int CSSM_CL_TEMPLATE_PKIX_CERTTEMPLATE = 2; +const int CSSM_TP_CERTVERIFY_INVALID_BASIC_CONSTRAINTS1 = 13; -const int CSSM_CERT_BUNDLE_UNKNOWN = 0; +const int CSSM_TP_CERTVERIFY_INVALID_CRL_DIST_PT1 = 14; -const int CSSM_CERT_BUNDLE_CUSTOM = 1; +const int CSSM_TP_CERTVERIFY_INVALID_NAME_TREE1 = 15; -const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_DATA = 2; +const int CSSM_TP_CERTVERIFY_UNKNOWN_CRITICAL_EXT1 = 16; -const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_ENVELOPED_DATA = 3; +const int CSSM_TP_CERTNOTARIZE_STATUS_UNKNOWN1 = 0; -const int CSSM_CERT_BUNDLE_PKCS12 = 4; +const int CSSM_TP_CERTNOTARIZE_OK1 = 1; -const int CSSM_CERT_BUNDLE_PFX = 5; +const int CSSM_TP_CERTNOTARIZE_OKWITHOUTFIELDS1 = 2; -const int CSSM_CERT_BUNDLE_SPKI_SEQUENCE = 6; +const int CSSM_TP_CERTNOTARIZE_OKWITHSERVICEMODS1 = 3; -const int CSSM_CERT_BUNDLE_PGP_KEYRING = 7; +const int CSSM_TP_CERTNOTARIZE_REJECTED1 = 4; -const int CSSM_CERT_BUNDLE_LAST = 32767; +const int CSSM_TP_CERTNOTARIZE_NOT_AUTHORIZED1 = 5; -const int CSSM_CL_CUSTOM_CERT_BUNDLE_TYPE = 32768; +const int CSSM_TP_CERTRECLAIM_STATUS_UNKNOWN1 = 0; -const int CSSM_CERT_BUNDLE_ENCODING_UNKNOWN = 0; +const int CSSM_TP_CERTRECLAIM_OK1 = 1; -const int CSSM_CERT_BUNDLE_ENCODING_CUSTOM = 1; +const int CSSM_TP_CERTRECLAIM_NOMATCH1 = 2; -const int CSSM_CERT_BUNDLE_ENCODING_BER = 2; +const int CSSM_TP_CERTRECLAIM_REJECTED1 = 3; -const int CSSM_CERT_BUNDLE_ENCODING_DER = 3; +const int CSSM_TP_CERTRECLAIM_NOT_AUTHORIZED1 = 4; -const int CSSM_CERT_BUNDLE_ENCODING_SEXPR = 4; +const int CSSM_TP_CRLISSUE_STATUS_UNKNOWN1 = 0; -const int CSSM_CERT_BUNDLE_ENCODING_PGP = 5; +const int CSSM_TP_CRLISSUE_OK1 = 1; -const int CSSM_FIELDVALUE_COMPLEX_DATA_TYPE = -1; +const int CSSM_TP_CRLISSUE_NOT_CURRENT1 = 2; -const int CSSM_DB_ATTRIBUTE_NAME_AS_STRING = 0; +const int CSSM_TP_CRLISSUE_INVALID_DOMAIN1 = 3; -const int CSSM_DB_ATTRIBUTE_NAME_AS_OID = 1; +const int CSSM_TP_CRLISSUE_UNKNOWN_IDENTIFIER1 = 4; -const int CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER = 2; +const int CSSM_TP_CRLISSUE_REJECTED1 = 5; -const int CSSM_DB_ATTRIBUTE_FORMAT_STRING = 0; +const int CSSM_TP_CRLISSUE_NOT_AUTHORIZED1 = 6; -const int CSSM_DB_ATTRIBUTE_FORMAT_SINT32 = 1; +const int CSSM_TP_FORM_TYPE_GENERIC1 = 0; -const int CSSM_DB_ATTRIBUTE_FORMAT_UINT32 = 2; +const int CSSM_TP_FORM_TYPE_REGISTRATION1 = 1; -const int CSSM_DB_ATTRIBUTE_FORMAT_BIG_NUM = 3; +const int CSSM_CL_TEMPLATE_INTERMEDIATE_CERT1 = 1; -const int CSSM_DB_ATTRIBUTE_FORMAT_REAL = 4; +const int CSSM_CL_TEMPLATE_PKIX_CERTTEMPLATE1 = 2; -const int CSSM_DB_ATTRIBUTE_FORMAT_TIME_DATE = 5; +const int CSSM_CERT_BUNDLE_UNKNOWN1 = 0; -const int CSSM_DB_ATTRIBUTE_FORMAT_BLOB = 6; +const int CSSM_CERT_BUNDLE_CUSTOM1 = 1; -const int CSSM_DB_ATTRIBUTE_FORMAT_MULTI_UINT32 = 7; +const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_DATA1 = 2; -const int CSSM_DB_ATTRIBUTE_FORMAT_COMPLEX = 8; +const int CSSM_CERT_BUNDLE_PKCS7_SIGNED_ENVELOPED_DATA1 = 3; -const int CSSM_DB_RECORDTYPE_SCHEMA_START = 0; +const int CSSM_CERT_BUNDLE_PKCS121 = 4; -const int CSSM_DB_RECORDTYPE_SCHEMA_END = 4; +const int CSSM_CERT_BUNDLE_PFX1 = 5; -const int CSSM_DB_RECORDTYPE_OPEN_GROUP_START = 10; +const int CSSM_CERT_BUNDLE_SPKI_SEQUENCE1 = 6; -const int CSSM_DB_RECORDTYPE_OPEN_GROUP_END = 18; +const int CSSM_CERT_BUNDLE_PGP_KEYRING1 = 7; -const int CSSM_DB_RECORDTYPE_APP_DEFINED_START = -2147483648; +const int CSSM_CERT_BUNDLE_LAST1 = 32767; -const int CSSM_DB_RECORDTYPE_APP_DEFINED_END = -1; +const int CSSM_CL_CUSTOM_CERT_BUNDLE_TYPE1 = 32768; -const int CSSM_DL_DB_SCHEMA_INFO = 0; +const int CSSM_CERT_BUNDLE_ENCODING_UNKNOWN1 = 0; -const int CSSM_DL_DB_SCHEMA_INDEXES = 1; +const int CSSM_CERT_BUNDLE_ENCODING_CUSTOM1 = 1; -const int CSSM_DL_DB_SCHEMA_ATTRIBUTES = 2; +const int CSSM_CERT_BUNDLE_ENCODING_BER1 = 2; -const int CSSM_DL_DB_SCHEMA_PARSING_MODULE = 3; +const int CSSM_CERT_BUNDLE_ENCODING_DER1 = 3; -const int CSSM_DL_DB_RECORD_ANY = 10; +const int CSSM_CERT_BUNDLE_ENCODING_SEXPR1 = 4; -const int CSSM_DL_DB_RECORD_CERT = 11; +const int CSSM_CERT_BUNDLE_ENCODING_PGP1 = 5; -const int CSSM_DL_DB_RECORD_CRL = 12; +const int CSSM_FIELDVALUE_COMPLEX_DATA_TYPE1 = -1; -const int CSSM_DL_DB_RECORD_POLICY = 13; +const int CSSM_DB_ATTRIBUTE_NAME_AS_STRING1 = 0; -const int CSSM_DL_DB_RECORD_GENERIC = 14; +const int CSSM_DB_ATTRIBUTE_NAME_AS_OID1 = 1; -const int CSSM_DL_DB_RECORD_PUBLIC_KEY = 15; +const int CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER1 = 2; -const int CSSM_DL_DB_RECORD_PRIVATE_KEY = 16; +const int CSSM_DB_ATTRIBUTE_FORMAT_STRING1 = 0; -const int CSSM_DL_DB_RECORD_SYMMETRIC_KEY = 17; +const int CSSM_DB_ATTRIBUTE_FORMAT_SINT321 = 1; -const int CSSM_DL_DB_RECORD_ALL_KEYS = 18; +const int CSSM_DB_ATTRIBUTE_FORMAT_UINT321 = 2; -const int CSSM_DB_CERT_USE_TRUSTED = 1; +const int CSSM_DB_ATTRIBUTE_FORMAT_BIG_NUM1 = 3; -const int CSSM_DB_CERT_USE_SYSTEM = 2; +const int CSSM_DB_ATTRIBUTE_FORMAT_REAL1 = 4; -const int CSSM_DB_CERT_USE_OWNER = 4; +const int CSSM_DB_ATTRIBUTE_FORMAT_TIME_DATE1 = 5; -const int CSSM_DB_CERT_USE_REVOKED = 8; +const int CSSM_DB_ATTRIBUTE_FORMAT_BLOB1 = 6; -const int CSSM_DB_CERT_USE_SIGNING = 16; +const int CSSM_DB_ATTRIBUTE_FORMAT_MULTI_UINT321 = 7; -const int CSSM_DB_CERT_USE_PRIVACY = 32; +const int CSSM_DB_ATTRIBUTE_FORMAT_COMPLEX1 = 8; -const int CSSM_DB_INDEX_UNIQUE = 0; +const int CSSM_DB_RECORDTYPE_SCHEMA_START1 = 0; -const int CSSM_DB_INDEX_NONUNIQUE = 1; +const int CSSM_DB_RECORDTYPE_SCHEMA_END1 = 4; -const int CSSM_DB_INDEX_ON_UNKNOWN = 0; +const int CSSM_DB_RECORDTYPE_OPEN_GROUP_START1 = 10; -const int CSSM_DB_INDEX_ON_ATTRIBUTE = 1; +const int CSSM_DB_RECORDTYPE_OPEN_GROUP_END1 = 18; -const int CSSM_DB_INDEX_ON_RECORD = 2; +const int CSSM_DB_RECORDTYPE_APP_DEFINED_START1 = -2147483648; -const int CSSM_DB_ACCESS_READ = 1; +const int CSSM_DB_RECORDTYPE_APP_DEFINED_END1 = -1; -const int CSSM_DB_ACCESS_WRITE = 2; +const int CSSM_DL_DB_SCHEMA_INFO1 = 0; -const int CSSM_DB_ACCESS_PRIVILEGED = 4; +const int CSSM_DL_DB_SCHEMA_INDEXES1 = 1; -const int CSSM_DB_MODIFY_ATTRIBUTE_NONE = 0; +const int CSSM_DL_DB_SCHEMA_ATTRIBUTES1 = 2; -const int CSSM_DB_MODIFY_ATTRIBUTE_ADD = 1; +const int CSSM_DL_DB_SCHEMA_PARSING_MODULE1 = 3; -const int CSSM_DB_MODIFY_ATTRIBUTE_DELETE = 2; +const int CSSM_DL_DB_RECORD_ANY1 = 10; -const int CSSM_DB_MODIFY_ATTRIBUTE_REPLACE = 3; +const int CSSM_DL_DB_RECORD_CERT1 = 11; -const int CSSM_DB_EQUAL = 0; +const int CSSM_DL_DB_RECORD_CRL1 = 12; -const int CSSM_DB_NOT_EQUAL = 1; +const int CSSM_DL_DB_RECORD_POLICY1 = 13; -const int CSSM_DB_LESS_THAN = 2; +const int CSSM_DL_DB_RECORD_GENERIC1 = 14; -const int CSSM_DB_GREATER_THAN = 3; +const int CSSM_DL_DB_RECORD_PUBLIC_KEY1 = 15; -const int CSSM_DB_CONTAINS = 4; +const int CSSM_DL_DB_RECORD_PRIVATE_KEY1 = 16; -const int CSSM_DB_CONTAINS_INITIAL_SUBSTRING = 5; +const int CSSM_DL_DB_RECORD_SYMMETRIC_KEY1 = 17; -const int CSSM_DB_CONTAINS_FINAL_SUBSTRING = 6; +const int CSSM_DL_DB_RECORD_ALL_KEYS1 = 18; -const int CSSM_DB_NONE = 0; +const int CSSM_DB_CERT_USE_TRUSTED1 = 1; -const int CSSM_DB_AND = 1; +const int CSSM_DB_CERT_USE_SYSTEM1 = 2; -const int CSSM_DB_OR = 2; +const int CSSM_DB_CERT_USE_OWNER1 = 4; -const int CSSM_QUERY_TIMELIMIT_NONE = 0; +const int CSSM_DB_CERT_USE_REVOKED1 = 8; -const int CSSM_QUERY_SIZELIMIT_NONE = 0; +const int CSSM_DB_CERT_USE_SIGNING1 = 16; -const int CSSM_QUERY_RETURN_DATA = 1; +const int CSSM_DB_CERT_USE_PRIVACY1 = 32; -const int CSSM_DL_UNKNOWN = 0; +const int CSSM_DB_INDEX_UNIQUE1 = 0; -const int CSSM_DL_CUSTOM = 1; +const int CSSM_DB_INDEX_NONUNIQUE1 = 1; -const int CSSM_DL_LDAP = 2; +const int CSSM_DB_INDEX_ON_UNKNOWN1 = 0; -const int CSSM_DL_ODBC = 3; +const int CSSM_DB_INDEX_ON_ATTRIBUTE1 = 1; -const int CSSM_DL_PKCS11 = 4; +const int CSSM_DB_INDEX_ON_RECORD1 = 2; -const int CSSM_DL_FFS = 5; +const int CSSM_DB_ACCESS_READ1 = 1; -const int CSSM_DL_MEMORY = 6; +const int CSSM_DB_ACCESS_WRITE1 = 2; -const int CSSM_DL_REMOTEDIR = 7; +const int CSSM_DB_ACCESS_PRIVILEGED1 = 4; -const int CSSM_DB_DATASTORES_UNKNOWN = -1; +const int CSSM_DB_MODIFY_ATTRIBUTE_NONE1 = 0; -const int CSSM_DB_TRANSACTIONAL_MODE = 0; +const int CSSM_DB_MODIFY_ATTRIBUTE_ADD1 = 1; -const int CSSM_DB_FILESYSTEMSCAN_MODE = 1; +const int CSSM_DB_MODIFY_ATTRIBUTE_DELETE1 = 2; -const int CSSM_BASE_ERROR = -2147418112; +const int CSSM_DB_MODIFY_ATTRIBUTE_REPLACE1 = 3; -const int CSSM_ERRORCODE_MODULE_EXTENT = 2048; +const int CSSM_DB_EQUAL1 = 0; -const int CSSM_ERRORCODE_CUSTOM_OFFSET = 1024; +const int CSSM_DB_NOT_EQUAL1 = 1; -const int CSSM_ERRORCODE_COMMON_EXTENT = 256; +const int CSSM_DB_LESS_THAN1 = 2; -const int CSSM_CSSM_BASE_ERROR = -2147418112; +const int CSSM_DB_GREATER_THAN1 = 3; -const int CSSM_CSSM_PRIVATE_ERROR = -2147417088; +const int CSSM_DB_CONTAINS1 = 4; -const int CSSM_CSP_BASE_ERROR = -2147416064; +const int CSSM_DB_CONTAINS_INITIAL_SUBSTRING1 = 5; -const int CSSM_CSP_PRIVATE_ERROR = -2147415040; +const int CSSM_DB_CONTAINS_FINAL_SUBSTRING1 = 6; -const int CSSM_DL_BASE_ERROR = -2147414016; +const int CSSM_DB_NONE1 = 0; -const int CSSM_DL_PRIVATE_ERROR = -2147412992; +const int CSSM_DB_AND1 = 1; -const int CSSM_CL_BASE_ERROR = -2147411968; +const int CSSM_DB_OR1 = 2; -const int CSSM_CL_PRIVATE_ERROR = -2147410944; +const int CSSM_QUERY_TIMELIMIT_NONE1 = 0; -const int CSSM_TP_BASE_ERROR = -2147409920; +const int CSSM_QUERY_SIZELIMIT_NONE1 = 0; -const int CSSM_TP_PRIVATE_ERROR = -2147408896; +const int CSSM_QUERY_RETURN_DATA1 = 1; -const int CSSM_KR_BASE_ERROR = -2147407872; +const int CSSM_DL_UNKNOWN1 = 0; -const int CSSM_KR_PRIVATE_ERROR = -2147406848; +const int CSSM_DL_CUSTOM1 = 1; -const int CSSM_AC_BASE_ERROR = -2147405824; +const int CSSM_DL_LDAP1 = 2; -const int CSSM_AC_PRIVATE_ERROR = -2147404800; +const int CSSM_DL_ODBC1 = 3; -const int CSSM_MDS_BASE_ERROR = -2147414016; +const int CSSM_DL_PKCS111 = 4; -const int CSSM_MDS_PRIVATE_ERROR = -2147412992; +const int CSSM_DL_FFS1 = 5; -const int CSSMERR_CSSM_INVALID_ADDIN_HANDLE = -2147417855; +const int CSSM_DL_MEMORY1 = 6; -const int CSSMERR_CSSM_NOT_INITIALIZED = -2147417854; +const int CSSM_DL_REMOTEDIR1 = 7; -const int CSSMERR_CSSM_INVALID_HANDLE_USAGE = -2147417853; +const int CSSM_DB_DATASTORES_UNKNOWN1 = -1; -const int CSSMERR_CSSM_PVC_REFERENT_NOT_FOUND = -2147417852; +const int CSSM_DB_TRANSACTIONAL_MODE1 = 0; -const int CSSMERR_CSSM_FUNCTION_INTEGRITY_FAIL = -2147417851; +const int CSSM_DB_FILESYSTEMSCAN_MODE1 = 1; -const int CSSM_ERRCODE_INTERNAL_ERROR = 1; +const int CSSM_BASE_ERROR1 = -2147418112; -const int CSSM_ERRCODE_MEMORY_ERROR = 2; +const int CSSM_ERRORCODE_MODULE_EXTENT1 = 2048; -const int CSSM_ERRCODE_MDS_ERROR = 3; +const int CSSM_ERRORCODE_CUSTOM_OFFSET1 = 1024; -const int CSSM_ERRCODE_INVALID_POINTER = 4; +const int CSSM_ERRORCODE_COMMON_EXTENT1 = 256; -const int CSSM_ERRCODE_INVALID_INPUT_POINTER = 5; +const int CSSM_CSSM_BASE_ERROR1 = -2147418112; -const int CSSM_ERRCODE_INVALID_OUTPUT_POINTER = 6; +const int CSSM_CSSM_PRIVATE_ERROR1 = -2147417088; -const int CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED = 7; +const int CSSM_CSP_BASE_ERROR1 = -2147416064; -const int CSSM_ERRCODE_SELF_CHECK_FAILED = 8; +const int CSSM_CSP_PRIVATE_ERROR1 = -2147415040; -const int CSSM_ERRCODE_OS_ACCESS_DENIED = 9; +const int CSSM_DL_BASE_ERROR1 = -2147414016; -const int CSSM_ERRCODE_FUNCTION_FAILED = 10; +const int CSSM_DL_PRIVATE_ERROR1 = -2147412992; -const int CSSM_ERRCODE_MODULE_MANIFEST_VERIFY_FAILED = 11; +const int CSSM_CL_BASE_ERROR1 = -2147411968; -const int CSSM_ERRCODE_INVALID_GUID = 12; +const int CSSM_CL_PRIVATE_ERROR1 = -2147410944; -const int CSSM_ERRCODE_OPERATION_AUTH_DENIED = 32; +const int CSSM_TP_BASE_ERROR1 = -2147409920; -const int CSSM_ERRCODE_OBJECT_USE_AUTH_DENIED = 33; +const int CSSM_TP_PRIVATE_ERROR1 = -2147408896; -const int CSSM_ERRCODE_OBJECT_MANIP_AUTH_DENIED = 34; +const int CSSM_KR_BASE_ERROR1 = -2147407872; -const int CSSM_ERRCODE_OBJECT_ACL_NOT_SUPPORTED = 35; +const int CSSM_KR_PRIVATE_ERROR1 = -2147406848; -const int CSSM_ERRCODE_OBJECT_ACL_REQUIRED = 36; +const int CSSM_AC_BASE_ERROR1 = -2147405824; -const int CSSM_ERRCODE_INVALID_ACCESS_CREDENTIALS = 37; +const int CSSM_AC_PRIVATE_ERROR1 = -2147404800; -const int CSSM_ERRCODE_INVALID_ACL_BASE_CERTS = 38; +const int CSSM_MDS_BASE_ERROR1 = -2147414016; -const int CSSM_ERRCODE_ACL_BASE_CERTS_NOT_SUPPORTED = 39; +const int CSSM_MDS_PRIVATE_ERROR1 = -2147412992; -const int CSSM_ERRCODE_INVALID_SAMPLE_VALUE = 40; +const int CSSMERR_CSSM_INVALID_ADDIN_HANDLE1 = -2147417855; -const int CSSM_ERRCODE_SAMPLE_VALUE_NOT_SUPPORTED = 41; +const int CSSMERR_CSSM_NOT_INITIALIZED1 = -2147417854; -const int CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE = 42; +const int CSSMERR_CSSM_INVALID_HANDLE_USAGE1 = -2147417853; -const int CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED = 43; +const int CSSMERR_CSSM_PVC_REFERENT_NOT_FOUND1 = -2147417852; -const int CSSM_ERRCODE_INVALID_ACL_CHALLENGE_CALLBACK = 44; +const int CSSMERR_CSSM_FUNCTION_INTEGRITY_FAIL1 = -2147417851; -const int CSSM_ERRCODE_ACL_CHALLENGE_CALLBACK_FAILED = 45; +const int CSSM_ERRCODE_INTERNAL_ERROR1 = 1; -const int CSSM_ERRCODE_INVALID_ACL_ENTRY_TAG = 46; +const int CSSM_ERRCODE_MEMORY_ERROR1 = 2; -const int CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND = 47; +const int CSSM_ERRCODE_MDS_ERROR1 = 3; -const int CSSM_ERRCODE_INVALID_ACL_EDIT_MODE = 48; +const int CSSM_ERRCODE_INVALID_POINTER1 = 4; -const int CSSM_ERRCODE_ACL_CHANGE_FAILED = 49; +const int CSSM_ERRCODE_INVALID_INPUT_POINTER1 = 5; -const int CSSM_ERRCODE_INVALID_NEW_ACL_ENTRY = 50; +const int CSSM_ERRCODE_INVALID_OUTPUT_POINTER1 = 6; -const int CSSM_ERRCODE_INVALID_NEW_ACL_OWNER = 51; +const int CSSM_ERRCODE_FUNCTION_NOT_IMPLEMENTED1 = 7; -const int CSSM_ERRCODE_ACL_DELETE_FAILED = 52; +const int CSSM_ERRCODE_SELF_CHECK_FAILED1 = 8; -const int CSSM_ERRCODE_ACL_REPLACE_FAILED = 53; +const int CSSM_ERRCODE_OS_ACCESS_DENIED1 = 9; -const int CSSM_ERRCODE_ACL_ADD_FAILED = 54; +const int CSSM_ERRCODE_FUNCTION_FAILED1 = 10; -const int CSSM_ERRCODE_INVALID_CONTEXT_HANDLE = 64; +const int CSSM_ERRCODE_MODULE_MANIFEST_VERIFY_FAILED1 = 11; -const int CSSM_ERRCODE_INCOMPATIBLE_VERSION = 65; +const int CSSM_ERRCODE_INVALID_GUID1 = 12; -const int CSSM_ERRCODE_INVALID_CERTGROUP_POINTER = 66; +const int CSSM_ERRCODE_OPERATION_AUTH_DENIED1 = 32; -const int CSSM_ERRCODE_INVALID_CERT_POINTER = 67; +const int CSSM_ERRCODE_OBJECT_USE_AUTH_DENIED1 = 33; -const int CSSM_ERRCODE_INVALID_CRL_POINTER = 68; +const int CSSM_ERRCODE_OBJECT_MANIP_AUTH_DENIED1 = 34; -const int CSSM_ERRCODE_INVALID_FIELD_POINTER = 69; +const int CSSM_ERRCODE_OBJECT_ACL_NOT_SUPPORTED1 = 35; -const int CSSM_ERRCODE_INVALID_DATA = 70; +const int CSSM_ERRCODE_OBJECT_ACL_REQUIRED1 = 36; -const int CSSM_ERRCODE_CRL_ALREADY_SIGNED = 71; +const int CSSM_ERRCODE_INVALID_ACCESS_CREDENTIALS1 = 37; -const int CSSM_ERRCODE_INVALID_NUMBER_OF_FIELDS = 72; +const int CSSM_ERRCODE_INVALID_ACL_BASE_CERTS1 = 38; -const int CSSM_ERRCODE_VERIFICATION_FAILURE = 73; +const int CSSM_ERRCODE_ACL_BASE_CERTS_NOT_SUPPORTED1 = 39; -const int CSSM_ERRCODE_INVALID_DB_HANDLE = 74; +const int CSSM_ERRCODE_INVALID_SAMPLE_VALUE1 = 40; -const int CSSM_ERRCODE_PRIVILEGE_NOT_GRANTED = 75; +const int CSSM_ERRCODE_SAMPLE_VALUE_NOT_SUPPORTED1 = 41; -const int CSSM_ERRCODE_INVALID_DB_LIST = 76; +const int CSSM_ERRCODE_INVALID_ACL_SUBJECT_VALUE1 = 42; -const int CSSM_ERRCODE_INVALID_DB_LIST_POINTER = 77; +const int CSSM_ERRCODE_ACL_SUBJECT_TYPE_NOT_SUPPORTED1 = 43; -const int CSSM_ERRCODE_UNKNOWN_FORMAT = 78; +const int CSSM_ERRCODE_INVALID_ACL_CHALLENGE_CALLBACK1 = 44; -const int CSSM_ERRCODE_UNKNOWN_TAG = 79; +const int CSSM_ERRCODE_ACL_CHALLENGE_CALLBACK_FAILED1 = 45; -const int CSSM_ERRCODE_INVALID_CSP_HANDLE = 80; +const int CSSM_ERRCODE_INVALID_ACL_ENTRY_TAG1 = 46; -const int CSSM_ERRCODE_INVALID_DL_HANDLE = 81; +const int CSSM_ERRCODE_ACL_ENTRY_TAG_NOT_FOUND1 = 47; -const int CSSM_ERRCODE_INVALID_CL_HANDLE = 82; +const int CSSM_ERRCODE_INVALID_ACL_EDIT_MODE1 = 48; -const int CSSM_ERRCODE_INVALID_TP_HANDLE = 83; +const int CSSM_ERRCODE_ACL_CHANGE_FAILED1 = 49; -const int CSSM_ERRCODE_INVALID_KR_HANDLE = 84; +const int CSSM_ERRCODE_INVALID_NEW_ACL_ENTRY1 = 50; -const int CSSM_ERRCODE_INVALID_AC_HANDLE = 85; +const int CSSM_ERRCODE_INVALID_NEW_ACL_OWNER1 = 51; -const int CSSM_ERRCODE_INVALID_PASSTHROUGH_ID = 86; +const int CSSM_ERRCODE_ACL_DELETE_FAILED1 = 52; -const int CSSM_ERRCODE_INVALID_NETWORK_ADDR = 87; +const int CSSM_ERRCODE_ACL_REPLACE_FAILED1 = 53; -const int CSSM_ERRCODE_INVALID_CRYPTO_DATA = 88; +const int CSSM_ERRCODE_ACL_ADD_FAILED1 = 54; -const int CSSMERR_CSSM_INTERNAL_ERROR = -2147418111; +const int CSSM_ERRCODE_INVALID_CONTEXT_HANDLE1 = 64; -const int CSSMERR_CSSM_MEMORY_ERROR = -2147418110; +const int CSSM_ERRCODE_INCOMPATIBLE_VERSION1 = 65; -const int CSSMERR_CSSM_MDS_ERROR = -2147418109; +const int CSSM_ERRCODE_INVALID_CERTGROUP_POINTER1 = 66; -const int CSSMERR_CSSM_INVALID_POINTER = -2147418108; +const int CSSM_ERRCODE_INVALID_CERT_POINTER1 = 67; -const int CSSMERR_CSSM_INVALID_INPUT_POINTER = -2147418107; +const int CSSM_ERRCODE_INVALID_CRL_POINTER1 = 68; -const int CSSMERR_CSSM_INVALID_OUTPUT_POINTER = -2147418106; +const int CSSM_ERRCODE_INVALID_FIELD_POINTER1 = 69; -const int CSSMERR_CSSM_FUNCTION_NOT_IMPLEMENTED = -2147418105; +const int CSSM_ERRCODE_INVALID_DATA1 = 70; -const int CSSMERR_CSSM_SELF_CHECK_FAILED = -2147418104; +const int CSSM_ERRCODE_CRL_ALREADY_SIGNED1 = 71; -const int CSSMERR_CSSM_OS_ACCESS_DENIED = -2147418103; +const int CSSM_ERRCODE_INVALID_NUMBER_OF_FIELDS1 = 72; -const int CSSMERR_CSSM_FUNCTION_FAILED = -2147418102; +const int CSSM_ERRCODE_VERIFICATION_FAILURE1 = 73; -const int CSSMERR_CSSM_MODULE_MANIFEST_VERIFY_FAILED = -2147418101; +const int CSSM_ERRCODE_INVALID_DB_HANDLE1 = 74; -const int CSSMERR_CSSM_INVALID_GUID = -2147418100; +const int CSSM_ERRCODE_PRIVILEGE_NOT_GRANTED1 = 75; -const int CSSMERR_CSSM_INVALID_CONTEXT_HANDLE = -2147418048; +const int CSSM_ERRCODE_INVALID_DB_LIST1 = 76; -const int CSSMERR_CSSM_INCOMPATIBLE_VERSION = -2147418047; +const int CSSM_ERRCODE_INVALID_DB_LIST_POINTER1 = 77; -const int CSSMERR_CSSM_PRIVILEGE_NOT_GRANTED = -2147418037; +const int CSSM_ERRCODE_UNKNOWN_FORMAT1 = 78; -const int CSSM_CSSM_BASE_CSSM_ERROR = -2147417840; +const int CSSM_ERRCODE_UNKNOWN_TAG1 = 79; -const int CSSMERR_CSSM_SCOPE_NOT_SUPPORTED = -2147417839; +const int CSSM_ERRCODE_INVALID_CSP_HANDLE1 = 80; -const int CSSMERR_CSSM_PVC_ALREADY_CONFIGURED = -2147417838; +const int CSSM_ERRCODE_INVALID_DL_HANDLE1 = 81; -const int CSSMERR_CSSM_INVALID_PVC = -2147417837; +const int CSSM_ERRCODE_INVALID_CL_HANDLE1 = 82; -const int CSSMERR_CSSM_EMM_LOAD_FAILED = -2147417836; +const int CSSM_ERRCODE_INVALID_TP_HANDLE1 = 83; -const int CSSMERR_CSSM_EMM_UNLOAD_FAILED = -2147417835; +const int CSSM_ERRCODE_INVALID_KR_HANDLE1 = 84; -const int CSSMERR_CSSM_ADDIN_LOAD_FAILED = -2147417834; +const int CSSM_ERRCODE_INVALID_AC_HANDLE1 = 85; -const int CSSMERR_CSSM_INVALID_KEY_HIERARCHY = -2147417833; +const int CSSM_ERRCODE_INVALID_PASSTHROUGH_ID1 = 86; -const int CSSMERR_CSSM_ADDIN_UNLOAD_FAILED = -2147417832; +const int CSSM_ERRCODE_INVALID_NETWORK_ADDR1 = 87; -const int CSSMERR_CSSM_LIB_REF_NOT_FOUND = -2147417831; +const int CSSM_ERRCODE_INVALID_CRYPTO_DATA1 = 88; -const int CSSMERR_CSSM_INVALID_ADDIN_FUNCTION_TABLE = -2147417830; +const int CSSMERR_CSSM_INTERNAL_ERROR1 = -2147418111; -const int CSSMERR_CSSM_EMM_AUTHENTICATE_FAILED = -2147417829; +const int CSSMERR_CSSM_MEMORY_ERROR1 = -2147418110; -const int CSSMERR_CSSM_ADDIN_AUTHENTICATE_FAILED = -2147417828; +const int CSSMERR_CSSM_MDS_ERROR1 = -2147418109; -const int CSSMERR_CSSM_INVALID_SERVICE_MASK = -2147417827; +const int CSSMERR_CSSM_INVALID_POINTER1 = -2147418108; -const int CSSMERR_CSSM_MODULE_NOT_LOADED = -2147417826; +const int CSSMERR_CSSM_INVALID_INPUT_POINTER1 = -2147418107; -const int CSSMERR_CSSM_INVALID_SUBSERVICEID = -2147417825; +const int CSSMERR_CSSM_INVALID_OUTPUT_POINTER1 = -2147418106; -const int CSSMERR_CSSM_BUFFER_TOO_SMALL = -2147417824; +const int CSSMERR_CSSM_FUNCTION_NOT_IMPLEMENTED1 = -2147418105; -const int CSSMERR_CSSM_INVALID_ATTRIBUTE = -2147417823; +const int CSSMERR_CSSM_SELF_CHECK_FAILED1 = -2147418104; -const int CSSMERR_CSSM_ATTRIBUTE_NOT_IN_CONTEXT = -2147417822; +const int CSSMERR_CSSM_OS_ACCESS_DENIED1 = -2147418103; -const int CSSMERR_CSSM_MODULE_MANAGER_INITIALIZE_FAIL = -2147417821; +const int CSSMERR_CSSM_FUNCTION_FAILED1 = -2147418102; -const int CSSMERR_CSSM_MODULE_MANAGER_NOT_FOUND = -2147417820; +const int CSSMERR_CSSM_MODULE_MANIFEST_VERIFY_FAILED1 = -2147418101; -const int CSSMERR_CSSM_EVENT_NOTIFICATION_CALLBACK_NOT_FOUND = -2147417819; +const int CSSMERR_CSSM_INVALID_GUID1 = -2147418100; -const int CSSMERR_CSP_INTERNAL_ERROR = -2147416063; +const int CSSMERR_CSSM_INVALID_CONTEXT_HANDLE1 = -2147418048; -const int CSSMERR_CSP_MEMORY_ERROR = -2147416062; +const int CSSMERR_CSSM_INCOMPATIBLE_VERSION1 = -2147418047; -const int CSSMERR_CSP_MDS_ERROR = -2147416061; +const int CSSMERR_CSSM_PRIVILEGE_NOT_GRANTED1 = -2147418037; -const int CSSMERR_CSP_INVALID_POINTER = -2147416060; +const int CSSM_CSSM_BASE_CSSM_ERROR1 = -2147417840; -const int CSSMERR_CSP_INVALID_INPUT_POINTER = -2147416059; +const int CSSMERR_CSSM_SCOPE_NOT_SUPPORTED1 = -2147417839; -const int CSSMERR_CSP_INVALID_OUTPUT_POINTER = -2147416058; +const int CSSMERR_CSSM_PVC_ALREADY_CONFIGURED1 = -2147417838; -const int CSSMERR_CSP_FUNCTION_NOT_IMPLEMENTED = -2147416057; +const int CSSMERR_CSSM_INVALID_PVC1 = -2147417837; -const int CSSMERR_CSP_SELF_CHECK_FAILED = -2147416056; +const int CSSMERR_CSSM_EMM_LOAD_FAILED1 = -2147417836; -const int CSSMERR_CSP_OS_ACCESS_DENIED = -2147416055; +const int CSSMERR_CSSM_EMM_UNLOAD_FAILED1 = -2147417835; -const int CSSMERR_CSP_FUNCTION_FAILED = -2147416054; +const int CSSMERR_CSSM_ADDIN_LOAD_FAILED1 = -2147417834; -const int CSSMERR_CSP_OPERATION_AUTH_DENIED = -2147416032; +const int CSSMERR_CSSM_INVALID_KEY_HIERARCHY1 = -2147417833; -const int CSSMERR_CSP_OBJECT_USE_AUTH_DENIED = -2147416031; +const int CSSMERR_CSSM_ADDIN_UNLOAD_FAILED1 = -2147417832; -const int CSSMERR_CSP_OBJECT_MANIP_AUTH_DENIED = -2147416030; +const int CSSMERR_CSSM_LIB_REF_NOT_FOUND1 = -2147417831; -const int CSSMERR_CSP_OBJECT_ACL_NOT_SUPPORTED = -2147416029; +const int CSSMERR_CSSM_INVALID_ADDIN_FUNCTION_TABLE1 = -2147417830; -const int CSSMERR_CSP_OBJECT_ACL_REQUIRED = -2147416028; +const int CSSMERR_CSSM_EMM_AUTHENTICATE_FAILED1 = -2147417829; -const int CSSMERR_CSP_INVALID_ACCESS_CREDENTIALS = -2147416027; +const int CSSMERR_CSSM_ADDIN_AUTHENTICATE_FAILED1 = -2147417828; -const int CSSMERR_CSP_INVALID_ACL_BASE_CERTS = -2147416026; +const int CSSMERR_CSSM_INVALID_SERVICE_MASK1 = -2147417827; -const int CSSMERR_CSP_ACL_BASE_CERTS_NOT_SUPPORTED = -2147416025; +const int CSSMERR_CSSM_MODULE_NOT_LOADED1 = -2147417826; -const int CSSMERR_CSP_INVALID_SAMPLE_VALUE = -2147416024; +const int CSSMERR_CSSM_INVALID_SUBSERVICEID1 = -2147417825; -const int CSSMERR_CSP_SAMPLE_VALUE_NOT_SUPPORTED = -2147416023; +const int CSSMERR_CSSM_BUFFER_TOO_SMALL1 = -2147417824; -const int CSSMERR_CSP_INVALID_ACL_SUBJECT_VALUE = -2147416022; +const int CSSMERR_CSSM_INVALID_ATTRIBUTE1 = -2147417823; -const int CSSMERR_CSP_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147416021; +const int CSSMERR_CSSM_ATTRIBUTE_NOT_IN_CONTEXT1 = -2147417822; -const int CSSMERR_CSP_INVALID_ACL_CHALLENGE_CALLBACK = -2147416020; +const int CSSMERR_CSSM_MODULE_MANAGER_INITIALIZE_FAIL1 = -2147417821; -const int CSSMERR_CSP_ACL_CHALLENGE_CALLBACK_FAILED = -2147416019; +const int CSSMERR_CSSM_MODULE_MANAGER_NOT_FOUND1 = -2147417820; -const int CSSMERR_CSP_INVALID_ACL_ENTRY_TAG = -2147416018; +const int CSSMERR_CSSM_EVENT_NOTIFICATION_CALLBACK_NOT_FOUND1 = -2147417819; -const int CSSMERR_CSP_ACL_ENTRY_TAG_NOT_FOUND = -2147416017; +const int CSSMERR_CSP_INTERNAL_ERROR1 = -2147416063; -const int CSSMERR_CSP_INVALID_ACL_EDIT_MODE = -2147416016; +const int CSSMERR_CSP_MEMORY_ERROR1 = -2147416062; -const int CSSMERR_CSP_ACL_CHANGE_FAILED = -2147416015; +const int CSSMERR_CSP_MDS_ERROR1 = -2147416061; -const int CSSMERR_CSP_INVALID_NEW_ACL_ENTRY = -2147416014; +const int CSSMERR_CSP_INVALID_POINTER1 = -2147416060; -const int CSSMERR_CSP_INVALID_NEW_ACL_OWNER = -2147416013; +const int CSSMERR_CSP_INVALID_INPUT_POINTER1 = -2147416059; -const int CSSMERR_CSP_ACL_DELETE_FAILED = -2147416012; +const int CSSMERR_CSP_INVALID_OUTPUT_POINTER1 = -2147416058; -const int CSSMERR_CSP_ACL_REPLACE_FAILED = -2147416011; +const int CSSMERR_CSP_FUNCTION_NOT_IMPLEMENTED1 = -2147416057; -const int CSSMERR_CSP_ACL_ADD_FAILED = -2147416010; +const int CSSMERR_CSP_SELF_CHECK_FAILED1 = -2147416056; -const int CSSMERR_CSP_INVALID_CONTEXT_HANDLE = -2147416000; +const int CSSMERR_CSP_OS_ACCESS_DENIED1 = -2147416055; -const int CSSMERR_CSP_PRIVILEGE_NOT_GRANTED = -2147415989; +const int CSSMERR_CSP_FUNCTION_FAILED1 = -2147416054; -const int CSSMERR_CSP_INVALID_DATA = -2147415994; +const int CSSMERR_CSP_OPERATION_AUTH_DENIED1 = -2147416032; -const int CSSMERR_CSP_INVALID_PASSTHROUGH_ID = -2147415978; +const int CSSMERR_CSP_OBJECT_USE_AUTH_DENIED1 = -2147416031; -const int CSSMERR_CSP_INVALID_CRYPTO_DATA = -2147415976; +const int CSSMERR_CSP_OBJECT_MANIP_AUTH_DENIED1 = -2147416030; -const int CSSM_CSP_BASE_CSP_ERROR = -2147415808; +const int CSSMERR_CSP_OBJECT_ACL_NOT_SUPPORTED1 = -2147416029; -const int CSSMERR_CSP_INPUT_LENGTH_ERROR = -2147415807; +const int CSSMERR_CSP_OBJECT_ACL_REQUIRED1 = -2147416028; -const int CSSMERR_CSP_OUTPUT_LENGTH_ERROR = -2147415806; +const int CSSMERR_CSP_INVALID_ACCESS_CREDENTIALS1 = -2147416027; -const int CSSMERR_CSP_PRIVILEGE_NOT_SUPPORTED = -2147415805; +const int CSSMERR_CSP_INVALID_ACL_BASE_CERTS1 = -2147416026; -const int CSSMERR_CSP_DEVICE_ERROR = -2147415804; +const int CSSMERR_CSP_ACL_BASE_CERTS_NOT_SUPPORTED1 = -2147416025; -const int CSSMERR_CSP_DEVICE_MEMORY_ERROR = -2147415803; +const int CSSMERR_CSP_INVALID_SAMPLE_VALUE1 = -2147416024; -const int CSSMERR_CSP_ATTACH_HANDLE_BUSY = -2147415802; +const int CSSMERR_CSP_SAMPLE_VALUE_NOT_SUPPORTED1 = -2147416023; -const int CSSMERR_CSP_NOT_LOGGED_IN = -2147415801; +const int CSSMERR_CSP_INVALID_ACL_SUBJECT_VALUE1 = -2147416022; -const int CSSMERR_CSP_INVALID_KEY = -2147415792; +const int CSSMERR_CSP_ACL_SUBJECT_TYPE_NOT_SUPPORTED1 = -2147416021; -const int CSSMERR_CSP_INVALID_KEY_REFERENCE = -2147415791; +const int CSSMERR_CSP_INVALID_ACL_CHALLENGE_CALLBACK1 = -2147416020; -const int CSSMERR_CSP_INVALID_KEY_CLASS = -2147415790; +const int CSSMERR_CSP_ACL_CHALLENGE_CALLBACK_FAILED1 = -2147416019; -const int CSSMERR_CSP_ALGID_MISMATCH = -2147415789; +const int CSSMERR_CSP_INVALID_ACL_ENTRY_TAG1 = -2147416018; -const int CSSMERR_CSP_KEY_USAGE_INCORRECT = -2147415788; +const int CSSMERR_CSP_ACL_ENTRY_TAG_NOT_FOUND1 = -2147416017; -const int CSSMERR_CSP_KEY_BLOB_TYPE_INCORRECT = -2147415787; +const int CSSMERR_CSP_INVALID_ACL_EDIT_MODE1 = -2147416016; -const int CSSMERR_CSP_KEY_HEADER_INCONSISTENT = -2147415786; +const int CSSMERR_CSP_ACL_CHANGE_FAILED1 = -2147416015; -const int CSSMERR_CSP_UNSUPPORTED_KEY_FORMAT = -2147415785; +const int CSSMERR_CSP_INVALID_NEW_ACL_ENTRY1 = -2147416014; -const int CSSMERR_CSP_UNSUPPORTED_KEY_SIZE = -2147415784; +const int CSSMERR_CSP_INVALID_NEW_ACL_OWNER1 = -2147416013; -const int CSSMERR_CSP_INVALID_KEY_POINTER = -2147415783; +const int CSSMERR_CSP_ACL_DELETE_FAILED1 = -2147416012; -const int CSSMERR_CSP_INVALID_KEYUSAGE_MASK = -2147415782; +const int CSSMERR_CSP_ACL_REPLACE_FAILED1 = -2147416011; -const int CSSMERR_CSP_UNSUPPORTED_KEYUSAGE_MASK = -2147415781; +const int CSSMERR_CSP_ACL_ADD_FAILED1 = -2147416010; -const int CSSMERR_CSP_INVALID_KEYATTR_MASK = -2147415780; +const int CSSMERR_CSP_INVALID_CONTEXT_HANDLE1 = -2147416000; -const int CSSMERR_CSP_UNSUPPORTED_KEYATTR_MASK = -2147415779; +const int CSSMERR_CSP_PRIVILEGE_NOT_GRANTED1 = -2147415989; -const int CSSMERR_CSP_INVALID_KEY_LABEL = -2147415778; +const int CSSMERR_CSP_INVALID_DATA1 = -2147415994; -const int CSSMERR_CSP_UNSUPPORTED_KEY_LABEL = -2147415777; +const int CSSMERR_CSP_INVALID_PASSTHROUGH_ID1 = -2147415978; -const int CSSMERR_CSP_INVALID_KEY_FORMAT = -2147415776; +const int CSSMERR_CSP_INVALID_CRYPTO_DATA1 = -2147415976; -const int CSSMERR_CSP_INVALID_DATA_COUNT = -2147415768; +const int CSSM_CSP_BASE_CSP_ERROR1 = -2147415808; -const int CSSMERR_CSP_VECTOR_OF_BUFS_UNSUPPORTED = -2147415767; +const int CSSMERR_CSP_INPUT_LENGTH_ERROR1 = -2147415807; -const int CSSMERR_CSP_INVALID_INPUT_VECTOR = -2147415766; +const int CSSMERR_CSP_OUTPUT_LENGTH_ERROR1 = -2147415806; -const int CSSMERR_CSP_INVALID_OUTPUT_VECTOR = -2147415765; +const int CSSMERR_CSP_PRIVILEGE_NOT_SUPPORTED1 = -2147415805; -const int CSSMERR_CSP_INVALID_CONTEXT = -2147415760; +const int CSSMERR_CSP_DEVICE_ERROR1 = -2147415804; -const int CSSMERR_CSP_INVALID_ALGORITHM = -2147415759; +const int CSSMERR_CSP_DEVICE_MEMORY_ERROR1 = -2147415803; -const int CSSMERR_CSP_INVALID_ATTR_KEY = -2147415754; +const int CSSMERR_CSP_ATTACH_HANDLE_BUSY1 = -2147415802; -const int CSSMERR_CSP_MISSING_ATTR_KEY = -2147415753; +const int CSSMERR_CSP_NOT_LOGGED_IN1 = -2147415801; -const int CSSMERR_CSP_INVALID_ATTR_INIT_VECTOR = -2147415752; +const int CSSMERR_CSP_INVALID_KEY1 = -2147415792; -const int CSSMERR_CSP_MISSING_ATTR_INIT_VECTOR = -2147415751; +const int CSSMERR_CSP_INVALID_KEY_REFERENCE1 = -2147415791; -const int CSSMERR_CSP_INVALID_ATTR_SALT = -2147415750; +const int CSSMERR_CSP_INVALID_KEY_CLASS1 = -2147415790; -const int CSSMERR_CSP_MISSING_ATTR_SALT = -2147415749; +const int CSSMERR_CSP_ALGID_MISMATCH1 = -2147415789; -const int CSSMERR_CSP_INVALID_ATTR_PADDING = -2147415748; +const int CSSMERR_CSP_KEY_USAGE_INCORRECT1 = -2147415788; -const int CSSMERR_CSP_MISSING_ATTR_PADDING = -2147415747; +const int CSSMERR_CSP_KEY_BLOB_TYPE_INCORRECT1 = -2147415787; -const int CSSMERR_CSP_INVALID_ATTR_RANDOM = -2147415746; +const int CSSMERR_CSP_KEY_HEADER_INCONSISTENT1 = -2147415786; -const int CSSMERR_CSP_MISSING_ATTR_RANDOM = -2147415745; +const int CSSMERR_CSP_UNSUPPORTED_KEY_FORMAT1 = -2147415785; -const int CSSMERR_CSP_INVALID_ATTR_SEED = -2147415744; +const int CSSMERR_CSP_UNSUPPORTED_KEY_SIZE1 = -2147415784; -const int CSSMERR_CSP_MISSING_ATTR_SEED = -2147415743; +const int CSSMERR_CSP_INVALID_KEY_POINTER1 = -2147415783; -const int CSSMERR_CSP_INVALID_ATTR_PASSPHRASE = -2147415742; +const int CSSMERR_CSP_INVALID_KEYUSAGE_MASK1 = -2147415782; -const int CSSMERR_CSP_MISSING_ATTR_PASSPHRASE = -2147415741; +const int CSSMERR_CSP_UNSUPPORTED_KEYUSAGE_MASK1 = -2147415781; -const int CSSMERR_CSP_INVALID_ATTR_KEY_LENGTH = -2147415740; +const int CSSMERR_CSP_INVALID_KEYATTR_MASK1 = -2147415780; -const int CSSMERR_CSP_MISSING_ATTR_KEY_LENGTH = -2147415739; +const int CSSMERR_CSP_UNSUPPORTED_KEYATTR_MASK1 = -2147415779; -const int CSSMERR_CSP_INVALID_ATTR_BLOCK_SIZE = -2147415738; +const int CSSMERR_CSP_INVALID_KEY_LABEL1 = -2147415778; -const int CSSMERR_CSP_MISSING_ATTR_BLOCK_SIZE = -2147415737; +const int CSSMERR_CSP_UNSUPPORTED_KEY_LABEL1 = -2147415777; -const int CSSMERR_CSP_INVALID_ATTR_OUTPUT_SIZE = -2147415708; +const int CSSMERR_CSP_INVALID_KEY_FORMAT1 = -2147415776; -const int CSSMERR_CSP_MISSING_ATTR_OUTPUT_SIZE = -2147415707; +const int CSSMERR_CSP_INVALID_DATA_COUNT1 = -2147415768; -const int CSSMERR_CSP_INVALID_ATTR_ROUNDS = -2147415706; +const int CSSMERR_CSP_VECTOR_OF_BUFS_UNSUPPORTED1 = -2147415767; -const int CSSMERR_CSP_MISSING_ATTR_ROUNDS = -2147415705; +const int CSSMERR_CSP_INVALID_INPUT_VECTOR1 = -2147415766; -const int CSSMERR_CSP_INVALID_ATTR_ALG_PARAMS = -2147415704; +const int CSSMERR_CSP_INVALID_OUTPUT_VECTOR1 = -2147415765; -const int CSSMERR_CSP_MISSING_ATTR_ALG_PARAMS = -2147415703; +const int CSSMERR_CSP_INVALID_CONTEXT1 = -2147415760; -const int CSSMERR_CSP_INVALID_ATTR_LABEL = -2147415702; +const int CSSMERR_CSP_INVALID_ALGORITHM1 = -2147415759; -const int CSSMERR_CSP_MISSING_ATTR_LABEL = -2147415701; +const int CSSMERR_CSP_INVALID_ATTR_KEY1 = -2147415754; -const int CSSMERR_CSP_INVALID_ATTR_KEY_TYPE = -2147415700; +const int CSSMERR_CSP_MISSING_ATTR_KEY1 = -2147415753; -const int CSSMERR_CSP_MISSING_ATTR_KEY_TYPE = -2147415699; +const int CSSMERR_CSP_INVALID_ATTR_INIT_VECTOR1 = -2147415752; -const int CSSMERR_CSP_INVALID_ATTR_MODE = -2147415698; +const int CSSMERR_CSP_MISSING_ATTR_INIT_VECTOR1 = -2147415751; -const int CSSMERR_CSP_MISSING_ATTR_MODE = -2147415697; +const int CSSMERR_CSP_INVALID_ATTR_SALT1 = -2147415750; -const int CSSMERR_CSP_INVALID_ATTR_EFFECTIVE_BITS = -2147415696; +const int CSSMERR_CSP_MISSING_ATTR_SALT1 = -2147415749; -const int CSSMERR_CSP_MISSING_ATTR_EFFECTIVE_BITS = -2147415695; +const int CSSMERR_CSP_INVALID_ATTR_PADDING1 = -2147415748; -const int CSSMERR_CSP_INVALID_ATTR_START_DATE = -2147415694; +const int CSSMERR_CSP_MISSING_ATTR_PADDING1 = -2147415747; -const int CSSMERR_CSP_MISSING_ATTR_START_DATE = -2147415693; +const int CSSMERR_CSP_INVALID_ATTR_RANDOM1 = -2147415746; -const int CSSMERR_CSP_INVALID_ATTR_END_DATE = -2147415692; +const int CSSMERR_CSP_MISSING_ATTR_RANDOM1 = -2147415745; -const int CSSMERR_CSP_MISSING_ATTR_END_DATE = -2147415691; +const int CSSMERR_CSP_INVALID_ATTR_SEED1 = -2147415744; -const int CSSMERR_CSP_INVALID_ATTR_VERSION = -2147415690; +const int CSSMERR_CSP_MISSING_ATTR_SEED1 = -2147415743; -const int CSSMERR_CSP_MISSING_ATTR_VERSION = -2147415689; +const int CSSMERR_CSP_INVALID_ATTR_PASSPHRASE1 = -2147415742; -const int CSSMERR_CSP_INVALID_ATTR_PRIME = -2147415688; +const int CSSMERR_CSP_MISSING_ATTR_PASSPHRASE1 = -2147415741; -const int CSSMERR_CSP_MISSING_ATTR_PRIME = -2147415687; +const int CSSMERR_CSP_INVALID_ATTR_KEY_LENGTH1 = -2147415740; -const int CSSMERR_CSP_INVALID_ATTR_BASE = -2147415686; +const int CSSMERR_CSP_MISSING_ATTR_KEY_LENGTH1 = -2147415739; -const int CSSMERR_CSP_MISSING_ATTR_BASE = -2147415685; +const int CSSMERR_CSP_INVALID_ATTR_BLOCK_SIZE1 = -2147415738; -const int CSSMERR_CSP_INVALID_ATTR_SUBPRIME = -2147415684; +const int CSSMERR_CSP_MISSING_ATTR_BLOCK_SIZE1 = -2147415737; -const int CSSMERR_CSP_MISSING_ATTR_SUBPRIME = -2147415683; +const int CSSMERR_CSP_INVALID_ATTR_OUTPUT_SIZE1 = -2147415708; -const int CSSMERR_CSP_INVALID_ATTR_ITERATION_COUNT = -2147415682; +const int CSSMERR_CSP_MISSING_ATTR_OUTPUT_SIZE1 = -2147415707; -const int CSSMERR_CSP_MISSING_ATTR_ITERATION_COUNT = -2147415681; +const int CSSMERR_CSP_INVALID_ATTR_ROUNDS1 = -2147415706; -const int CSSMERR_CSP_INVALID_ATTR_DL_DB_HANDLE = -2147415680; +const int CSSMERR_CSP_MISSING_ATTR_ROUNDS1 = -2147415705; -const int CSSMERR_CSP_MISSING_ATTR_DL_DB_HANDLE = -2147415679; +const int CSSMERR_CSP_INVALID_ATTR_ALG_PARAMS1 = -2147415704; -const int CSSMERR_CSP_INVALID_ATTR_ACCESS_CREDENTIALS = -2147415678; +const int CSSMERR_CSP_MISSING_ATTR_ALG_PARAMS1 = -2147415703; -const int CSSMERR_CSP_MISSING_ATTR_ACCESS_CREDENTIALS = -2147415677; +const int CSSMERR_CSP_INVALID_ATTR_LABEL1 = -2147415702; -const int CSSMERR_CSP_INVALID_ATTR_PUBLIC_KEY_FORMAT = -2147415676; +const int CSSMERR_CSP_MISSING_ATTR_LABEL1 = -2147415701; -const int CSSMERR_CSP_MISSING_ATTR_PUBLIC_KEY_FORMAT = -2147415675; +const int CSSMERR_CSP_INVALID_ATTR_KEY_TYPE1 = -2147415700; -const int CSSMERR_CSP_INVALID_ATTR_PRIVATE_KEY_FORMAT = -2147415674; +const int CSSMERR_CSP_MISSING_ATTR_KEY_TYPE1 = -2147415699; -const int CSSMERR_CSP_MISSING_ATTR_PRIVATE_KEY_FORMAT = -2147415673; +const int CSSMERR_CSP_INVALID_ATTR_MODE1 = -2147415698; -const int CSSMERR_CSP_INVALID_ATTR_SYMMETRIC_KEY_FORMAT = -2147415672; +const int CSSMERR_CSP_MISSING_ATTR_MODE1 = -2147415697; -const int CSSMERR_CSP_MISSING_ATTR_SYMMETRIC_KEY_FORMAT = -2147415671; +const int CSSMERR_CSP_INVALID_ATTR_EFFECTIVE_BITS1 = -2147415696; -const int CSSMERR_CSP_INVALID_ATTR_WRAPPED_KEY_FORMAT = -2147415670; +const int CSSMERR_CSP_MISSING_ATTR_EFFECTIVE_BITS1 = -2147415695; -const int CSSMERR_CSP_MISSING_ATTR_WRAPPED_KEY_FORMAT = -2147415669; +const int CSSMERR_CSP_INVALID_ATTR_START_DATE1 = -2147415694; -const int CSSMERR_CSP_STAGED_OPERATION_IN_PROGRESS = -2147415736; +const int CSSMERR_CSP_MISSING_ATTR_START_DATE1 = -2147415693; -const int CSSMERR_CSP_STAGED_OPERATION_NOT_STARTED = -2147415735; +const int CSSMERR_CSP_INVALID_ATTR_END_DATE1 = -2147415692; -const int CSSMERR_CSP_VERIFY_FAILED = -2147415734; +const int CSSMERR_CSP_MISSING_ATTR_END_DATE1 = -2147415691; -const int CSSMERR_CSP_INVALID_SIGNATURE = -2147415733; +const int CSSMERR_CSP_INVALID_ATTR_VERSION1 = -2147415690; -const int CSSMERR_CSP_QUERY_SIZE_UNKNOWN = -2147415732; +const int CSSMERR_CSP_MISSING_ATTR_VERSION1 = -2147415689; -const int CSSMERR_CSP_BLOCK_SIZE_MISMATCH = -2147415731; +const int CSSMERR_CSP_INVALID_ATTR_PRIME1 = -2147415688; -const int CSSMERR_CSP_PRIVATE_KEY_NOT_FOUND = -2147415730; +const int CSSMERR_CSP_MISSING_ATTR_PRIME1 = -2147415687; -const int CSSMERR_CSP_PUBLIC_KEY_INCONSISTENT = -2147415729; +const int CSSMERR_CSP_INVALID_ATTR_BASE1 = -2147415686; -const int CSSMERR_CSP_DEVICE_VERIFY_FAILED = -2147415728; +const int CSSMERR_CSP_MISSING_ATTR_BASE1 = -2147415685; -const int CSSMERR_CSP_INVALID_LOGIN_NAME = -2147415727; +const int CSSMERR_CSP_INVALID_ATTR_SUBPRIME1 = -2147415684; -const int CSSMERR_CSP_ALREADY_LOGGED_IN = -2147415726; +const int CSSMERR_CSP_MISSING_ATTR_SUBPRIME1 = -2147415683; -const int CSSMERR_CSP_PRIVATE_KEY_ALREADY_EXISTS = -2147415725; +const int CSSMERR_CSP_INVALID_ATTR_ITERATION_COUNT1 = -2147415682; -const int CSSMERR_CSP_KEY_LABEL_ALREADY_EXISTS = -2147415724; +const int CSSMERR_CSP_MISSING_ATTR_ITERATION_COUNT1 = -2147415681; -const int CSSMERR_CSP_INVALID_DIGEST_ALGORITHM = -2147415723; +const int CSSMERR_CSP_INVALID_ATTR_DL_DB_HANDLE1 = -2147415680; -const int CSSMERR_CSP_CRYPTO_DATA_CALLBACK_FAILED = -2147415722; +const int CSSMERR_CSP_MISSING_ATTR_DL_DB_HANDLE1 = -2147415679; -const int CSSMERR_TP_INTERNAL_ERROR = -2147409919; +const int CSSMERR_CSP_INVALID_ATTR_ACCESS_CREDENTIALS1 = -2147415678; -const int CSSMERR_TP_MEMORY_ERROR = -2147409918; +const int CSSMERR_CSP_MISSING_ATTR_ACCESS_CREDENTIALS1 = -2147415677; -const int CSSMERR_TP_MDS_ERROR = -2147409917; +const int CSSMERR_CSP_INVALID_ATTR_PUBLIC_KEY_FORMAT1 = -2147415676; -const int CSSMERR_TP_INVALID_POINTER = -2147409916; +const int CSSMERR_CSP_MISSING_ATTR_PUBLIC_KEY_FORMAT1 = -2147415675; -const int CSSMERR_TP_INVALID_INPUT_POINTER = -2147409915; +const int CSSMERR_CSP_INVALID_ATTR_PRIVATE_KEY_FORMAT1 = -2147415674; -const int CSSMERR_TP_INVALID_OUTPUT_POINTER = -2147409914; +const int CSSMERR_CSP_MISSING_ATTR_PRIVATE_KEY_FORMAT1 = -2147415673; -const int CSSMERR_TP_FUNCTION_NOT_IMPLEMENTED = -2147409913; +const int CSSMERR_CSP_INVALID_ATTR_SYMMETRIC_KEY_FORMAT1 = -2147415672; -const int CSSMERR_TP_SELF_CHECK_FAILED = -2147409912; +const int CSSMERR_CSP_MISSING_ATTR_SYMMETRIC_KEY_FORMAT1 = -2147415671; -const int CSSMERR_TP_OS_ACCESS_DENIED = -2147409911; +const int CSSMERR_CSP_INVALID_ATTR_WRAPPED_KEY_FORMAT1 = -2147415670; -const int CSSMERR_TP_FUNCTION_FAILED = -2147409910; +const int CSSMERR_CSP_MISSING_ATTR_WRAPPED_KEY_FORMAT1 = -2147415669; -const int CSSMERR_TP_INVALID_CONTEXT_HANDLE = -2147409856; +const int CSSMERR_CSP_STAGED_OPERATION_IN_PROGRESS1 = -2147415736; -const int CSSMERR_TP_INVALID_DATA = -2147409850; +const int CSSMERR_CSP_STAGED_OPERATION_NOT_STARTED1 = -2147415735; -const int CSSMERR_TP_INVALID_DB_LIST = -2147409844; +const int CSSMERR_CSP_VERIFY_FAILED1 = -2147415734; -const int CSSMERR_TP_INVALID_CERTGROUP_POINTER = -2147409854; +const int CSSMERR_CSP_INVALID_SIGNATURE1 = -2147415733; -const int CSSMERR_TP_INVALID_CERT_POINTER = -2147409853; +const int CSSMERR_CSP_QUERY_SIZE_UNKNOWN1 = -2147415732; -const int CSSMERR_TP_INVALID_CRL_POINTER = -2147409852; +const int CSSMERR_CSP_BLOCK_SIZE_MISMATCH1 = -2147415731; -const int CSSMERR_TP_INVALID_FIELD_POINTER = -2147409851; +const int CSSMERR_CSP_PRIVATE_KEY_NOT_FOUND1 = -2147415730; -const int CSSMERR_TP_INVALID_NETWORK_ADDR = -2147409833; +const int CSSMERR_CSP_PUBLIC_KEY_INCONSISTENT1 = -2147415729; -const int CSSMERR_TP_CRL_ALREADY_SIGNED = -2147409849; +const int CSSMERR_CSP_DEVICE_VERIFY_FAILED1 = -2147415728; -const int CSSMERR_TP_INVALID_NUMBER_OF_FIELDS = -2147409848; +const int CSSMERR_CSP_INVALID_LOGIN_NAME1 = -2147415727; -const int CSSMERR_TP_VERIFICATION_FAILURE = -2147409847; +const int CSSMERR_CSP_ALREADY_LOGGED_IN1 = -2147415726; -const int CSSMERR_TP_INVALID_DB_HANDLE = -2147409846; +const int CSSMERR_CSP_PRIVATE_KEY_ALREADY_EXISTS1 = -2147415725; -const int CSSMERR_TP_UNKNOWN_FORMAT = -2147409842; +const int CSSMERR_CSP_KEY_LABEL_ALREADY_EXISTS1 = -2147415724; -const int CSSMERR_TP_UNKNOWN_TAG = -2147409841; +const int CSSMERR_CSP_INVALID_DIGEST_ALGORITHM1 = -2147415723; -const int CSSMERR_TP_INVALID_PASSTHROUGH_ID = -2147409834; +const int CSSMERR_CSP_CRYPTO_DATA_CALLBACK_FAILED1 = -2147415722; -const int CSSMERR_TP_INVALID_CSP_HANDLE = -2147409840; +const int CSSMERR_TP_INTERNAL_ERROR1 = -2147409919; -const int CSSMERR_TP_INVALID_DL_HANDLE = -2147409839; +const int CSSMERR_TP_MEMORY_ERROR1 = -2147409918; -const int CSSMERR_TP_INVALID_CL_HANDLE = -2147409838; +const int CSSMERR_TP_MDS_ERROR1 = -2147409917; -const int CSSMERR_TP_INVALID_DB_LIST_POINTER = -2147409843; +const int CSSMERR_TP_INVALID_POINTER1 = -2147409916; -const int CSSM_TP_BASE_TP_ERROR = -2147409664; +const int CSSMERR_TP_INVALID_INPUT_POINTER1 = -2147409915; -const int CSSMERR_TP_INVALID_CALLERAUTH_CONTEXT_POINTER = -2147409663; +const int CSSMERR_TP_INVALID_OUTPUT_POINTER1 = -2147409914; -const int CSSMERR_TP_INVALID_IDENTIFIER_POINTER = -2147409662; +const int CSSMERR_TP_FUNCTION_NOT_IMPLEMENTED1 = -2147409913; -const int CSSMERR_TP_INVALID_KEYCACHE_HANDLE = -2147409661; +const int CSSMERR_TP_SELF_CHECK_FAILED1 = -2147409912; -const int CSSMERR_TP_INVALID_CERTGROUP = -2147409660; +const int CSSMERR_TP_OS_ACCESS_DENIED1 = -2147409911; -const int CSSMERR_TP_INVALID_CRLGROUP = -2147409659; +const int CSSMERR_TP_FUNCTION_FAILED1 = -2147409910; -const int CSSMERR_TP_INVALID_CRLGROUP_POINTER = -2147409658; +const int CSSMERR_TP_INVALID_CONTEXT_HANDLE1 = -2147409856; -const int CSSMERR_TP_AUTHENTICATION_FAILED = -2147409657; +const int CSSMERR_TP_INVALID_DATA1 = -2147409850; -const int CSSMERR_TP_CERTGROUP_INCOMPLETE = -2147409656; +const int CSSMERR_TP_INVALID_DB_LIST1 = -2147409844; -const int CSSMERR_TP_CERTIFICATE_CANT_OPERATE = -2147409655; +const int CSSMERR_TP_INVALID_CERTGROUP_POINTER1 = -2147409854; -const int CSSMERR_TP_CERT_EXPIRED = -2147409654; +const int CSSMERR_TP_INVALID_CERT_POINTER1 = -2147409853; -const int CSSMERR_TP_CERT_NOT_VALID_YET = -2147409653; +const int CSSMERR_TP_INVALID_CRL_POINTER1 = -2147409852; -const int CSSMERR_TP_CERT_REVOKED = -2147409652; +const int CSSMERR_TP_INVALID_FIELD_POINTER1 = -2147409851; -const int CSSMERR_TP_CERT_SUSPENDED = -2147409651; +const int CSSMERR_TP_INVALID_NETWORK_ADDR1 = -2147409833; -const int CSSMERR_TP_INSUFFICIENT_CREDENTIALS = -2147409650; +const int CSSMERR_TP_CRL_ALREADY_SIGNED1 = -2147409849; -const int CSSMERR_TP_INVALID_ACTION = -2147409649; +const int CSSMERR_TP_INVALID_NUMBER_OF_FIELDS1 = -2147409848; -const int CSSMERR_TP_INVALID_ACTION_DATA = -2147409648; +const int CSSMERR_TP_VERIFICATION_FAILURE1 = -2147409847; -const int CSSMERR_TP_INVALID_ANCHOR_CERT = -2147409646; +const int CSSMERR_TP_INVALID_DB_HANDLE1 = -2147409846; -const int CSSMERR_TP_INVALID_AUTHORITY = -2147409645; +const int CSSMERR_TP_UNKNOWN_FORMAT1 = -2147409842; -const int CSSMERR_TP_VERIFY_ACTION_FAILED = -2147409644; +const int CSSMERR_TP_UNKNOWN_TAG1 = -2147409841; -const int CSSMERR_TP_INVALID_CERTIFICATE = -2147409643; +const int CSSMERR_TP_INVALID_PASSTHROUGH_ID1 = -2147409834; -const int CSSMERR_TP_INVALID_CERT_AUTHORITY = -2147409642; +const int CSSMERR_TP_INVALID_CSP_HANDLE1 = -2147409840; -const int CSSMERR_TP_INVALID_CRL_AUTHORITY = -2147409641; +const int CSSMERR_TP_INVALID_DL_HANDLE1 = -2147409839; -const int CSSMERR_TP_INVALID_CRL_ENCODING = -2147409640; +const int CSSMERR_TP_INVALID_CL_HANDLE1 = -2147409838; -const int CSSMERR_TP_INVALID_CRL_TYPE = -2147409639; +const int CSSMERR_TP_INVALID_DB_LIST_POINTER1 = -2147409843; -const int CSSMERR_TP_INVALID_CRL = -2147409638; +const int CSSM_TP_BASE_TP_ERROR1 = -2147409664; -const int CSSMERR_TP_INVALID_FORM_TYPE = -2147409637; +const int CSSMERR_TP_INVALID_CALLERAUTH_CONTEXT_POINTER1 = -2147409663; -const int CSSMERR_TP_INVALID_ID = -2147409636; +const int CSSMERR_TP_INVALID_IDENTIFIER_POINTER1 = -2147409662; -const int CSSMERR_TP_INVALID_IDENTIFIER = -2147409635; +const int CSSMERR_TP_INVALID_KEYCACHE_HANDLE1 = -2147409661; -const int CSSMERR_TP_INVALID_INDEX = -2147409634; +const int CSSMERR_TP_INVALID_CERTGROUP1 = -2147409660; -const int CSSMERR_TP_INVALID_NAME = -2147409633; +const int CSSMERR_TP_INVALID_CRLGROUP1 = -2147409659; -const int CSSMERR_TP_INVALID_POLICY_IDENTIFIERS = -2147409632; +const int CSSMERR_TP_INVALID_CRLGROUP_POINTER1 = -2147409658; -const int CSSMERR_TP_INVALID_TIMESTRING = -2147409631; +const int CSSMERR_TP_AUTHENTICATION_FAILED1 = -2147409657; -const int CSSMERR_TP_INVALID_REASON = -2147409630; +const int CSSMERR_TP_CERTGROUP_INCOMPLETE1 = -2147409656; -const int CSSMERR_TP_INVALID_REQUEST_INPUTS = -2147409629; +const int CSSMERR_TP_CERTIFICATE_CANT_OPERATE1 = -2147409655; -const int CSSMERR_TP_INVALID_RESPONSE_VECTOR = -2147409628; +const int CSSMERR_TP_CERT_EXPIRED1 = -2147409654; -const int CSSMERR_TP_INVALID_SIGNATURE = -2147409627; +const int CSSMERR_TP_CERT_NOT_VALID_YET1 = -2147409653; -const int CSSMERR_TP_INVALID_STOP_ON_POLICY = -2147409626; +const int CSSMERR_TP_CERT_REVOKED1 = -2147409652; -const int CSSMERR_TP_INVALID_CALLBACK = -2147409625; +const int CSSMERR_TP_CERT_SUSPENDED1 = -2147409651; -const int CSSMERR_TP_INVALID_TUPLE = -2147409624; +const int CSSMERR_TP_INSUFFICIENT_CREDENTIALS1 = -2147409650; -const int CSSMERR_TP_NOT_SIGNER = -2147409623; +const int CSSMERR_TP_INVALID_ACTION1 = -2147409649; -const int CSSMERR_TP_NOT_TRUSTED = -2147409622; +const int CSSMERR_TP_INVALID_ACTION_DATA1 = -2147409648; -const int CSSMERR_TP_NO_DEFAULT_AUTHORITY = -2147409621; +const int CSSMERR_TP_INVALID_ANCHOR_CERT1 = -2147409646; -const int CSSMERR_TP_REJECTED_FORM = -2147409620; +const int CSSMERR_TP_INVALID_AUTHORITY1 = -2147409645; -const int CSSMERR_TP_REQUEST_LOST = -2147409619; +const int CSSMERR_TP_VERIFY_ACTION_FAILED1 = -2147409644; -const int CSSMERR_TP_REQUEST_REJECTED = -2147409618; +const int CSSMERR_TP_INVALID_CERTIFICATE1 = -2147409643; -const int CSSMERR_TP_UNSUPPORTED_ADDR_TYPE = -2147409617; +const int CSSMERR_TP_INVALID_CERT_AUTHORITY1 = -2147409642; -const int CSSMERR_TP_UNSUPPORTED_SERVICE = -2147409616; +const int CSSMERR_TP_INVALID_CRL_AUTHORITY1 = -2147409641; -const int CSSMERR_TP_INVALID_TUPLEGROUP_POINTER = -2147409615; +const int CSSMERR_TP_INVALID_CRL_ENCODING1 = -2147409640; -const int CSSMERR_TP_INVALID_TUPLEGROUP = -2147409614; +const int CSSMERR_TP_INVALID_CRL_TYPE1 = -2147409639; -const int CSSMERR_AC_INTERNAL_ERROR = -2147405823; +const int CSSMERR_TP_INVALID_CRL1 = -2147409638; -const int CSSMERR_AC_MEMORY_ERROR = -2147405822; +const int CSSMERR_TP_INVALID_FORM_TYPE1 = -2147409637; -const int CSSMERR_AC_MDS_ERROR = -2147405821; +const int CSSMERR_TP_INVALID_ID1 = -2147409636; -const int CSSMERR_AC_INVALID_POINTER = -2147405820; +const int CSSMERR_TP_INVALID_IDENTIFIER1 = -2147409635; -const int CSSMERR_AC_INVALID_INPUT_POINTER = -2147405819; +const int CSSMERR_TP_INVALID_INDEX1 = -2147409634; -const int CSSMERR_AC_INVALID_OUTPUT_POINTER = -2147405818; +const int CSSMERR_TP_INVALID_NAME1 = -2147409633; -const int CSSMERR_AC_FUNCTION_NOT_IMPLEMENTED = -2147405817; +const int CSSMERR_TP_INVALID_POLICY_IDENTIFIERS1 = -2147409632; -const int CSSMERR_AC_SELF_CHECK_FAILED = -2147405816; +const int CSSMERR_TP_INVALID_TIMESTRING1 = -2147409631; -const int CSSMERR_AC_OS_ACCESS_DENIED = -2147405815; +const int CSSMERR_TP_INVALID_REASON1 = -2147409630; -const int CSSMERR_AC_FUNCTION_FAILED = -2147405814; +const int CSSMERR_TP_INVALID_REQUEST_INPUTS1 = -2147409629; -const int CSSMERR_AC_INVALID_CONTEXT_HANDLE = -2147405760; +const int CSSMERR_TP_INVALID_RESPONSE_VECTOR1 = -2147409628; -const int CSSMERR_AC_INVALID_DATA = -2147405754; +const int CSSMERR_TP_INVALID_SIGNATURE1 = -2147409627; -const int CSSMERR_AC_INVALID_DB_LIST = -2147405748; +const int CSSMERR_TP_INVALID_STOP_ON_POLICY1 = -2147409626; -const int CSSMERR_AC_INVALID_PASSTHROUGH_ID = -2147405738; +const int CSSMERR_TP_INVALID_CALLBACK1 = -2147409625; -const int CSSMERR_AC_INVALID_DL_HANDLE = -2147405743; +const int CSSMERR_TP_INVALID_TUPLE1 = -2147409624; -const int CSSMERR_AC_INVALID_CL_HANDLE = -2147405742; +const int CSSMERR_TP_NOT_SIGNER1 = -2147409623; -const int CSSMERR_AC_INVALID_TP_HANDLE = -2147405741; +const int CSSMERR_TP_NOT_TRUSTED1 = -2147409622; -const int CSSMERR_AC_INVALID_DB_HANDLE = -2147405750; +const int CSSMERR_TP_NO_DEFAULT_AUTHORITY1 = -2147409621; -const int CSSMERR_AC_INVALID_DB_LIST_POINTER = -2147405747; +const int CSSMERR_TP_REJECTED_FORM1 = -2147409620; -const int CSSM_AC_BASE_AC_ERROR = -2147405568; +const int CSSMERR_TP_REQUEST_LOST1 = -2147409619; -const int CSSMERR_AC_INVALID_BASE_ACLS = -2147405567; +const int CSSMERR_TP_REQUEST_REJECTED1 = -2147409618; -const int CSSMERR_AC_INVALID_TUPLE_CREDENTIALS = -2147405566; +const int CSSMERR_TP_UNSUPPORTED_ADDR_TYPE1 = -2147409617; -const int CSSMERR_AC_INVALID_ENCODING = -2147405565; +const int CSSMERR_TP_UNSUPPORTED_SERVICE1 = -2147409616; -const int CSSMERR_AC_INVALID_VALIDITY_PERIOD = -2147405564; +const int CSSMERR_TP_INVALID_TUPLEGROUP_POINTER1 = -2147409615; -const int CSSMERR_AC_INVALID_REQUESTOR = -2147405563; +const int CSSMERR_TP_INVALID_TUPLEGROUP1 = -2147409614; -const int CSSMERR_AC_INVALID_REQUEST_DESCRIPTOR = -2147405562; +const int CSSMERR_AC_INTERNAL_ERROR1 = -2147405823; -const int CSSMERR_CL_INTERNAL_ERROR = -2147411967; +const int CSSMERR_AC_MEMORY_ERROR1 = -2147405822; -const int CSSMERR_CL_MEMORY_ERROR = -2147411966; +const int CSSMERR_AC_MDS_ERROR1 = -2147405821; -const int CSSMERR_CL_MDS_ERROR = -2147411965; +const int CSSMERR_AC_INVALID_POINTER1 = -2147405820; -const int CSSMERR_CL_INVALID_POINTER = -2147411964; +const int CSSMERR_AC_INVALID_INPUT_POINTER1 = -2147405819; -const int CSSMERR_CL_INVALID_INPUT_POINTER = -2147411963; +const int CSSMERR_AC_INVALID_OUTPUT_POINTER1 = -2147405818; -const int CSSMERR_CL_INVALID_OUTPUT_POINTER = -2147411962; +const int CSSMERR_AC_FUNCTION_NOT_IMPLEMENTED1 = -2147405817; -const int CSSMERR_CL_FUNCTION_NOT_IMPLEMENTED = -2147411961; +const int CSSMERR_AC_SELF_CHECK_FAILED1 = -2147405816; -const int CSSMERR_CL_SELF_CHECK_FAILED = -2147411960; +const int CSSMERR_AC_OS_ACCESS_DENIED1 = -2147405815; -const int CSSMERR_CL_OS_ACCESS_DENIED = -2147411959; +const int CSSMERR_AC_FUNCTION_FAILED1 = -2147405814; -const int CSSMERR_CL_FUNCTION_FAILED = -2147411958; +const int CSSMERR_AC_INVALID_CONTEXT_HANDLE1 = -2147405760; -const int CSSMERR_CL_INVALID_CONTEXT_HANDLE = -2147411904; +const int CSSMERR_AC_INVALID_DATA1 = -2147405754; -const int CSSMERR_CL_INVALID_CERTGROUP_POINTER = -2147411902; +const int CSSMERR_AC_INVALID_DB_LIST1 = -2147405748; -const int CSSMERR_CL_INVALID_CERT_POINTER = -2147411901; +const int CSSMERR_AC_INVALID_PASSTHROUGH_ID1 = -2147405738; -const int CSSMERR_CL_INVALID_CRL_POINTER = -2147411900; +const int CSSMERR_AC_INVALID_DL_HANDLE1 = -2147405743; -const int CSSMERR_CL_INVALID_FIELD_POINTER = -2147411899; +const int CSSMERR_AC_INVALID_CL_HANDLE1 = -2147405742; -const int CSSMERR_CL_INVALID_DATA = -2147411898; +const int CSSMERR_AC_INVALID_TP_HANDLE1 = -2147405741; -const int CSSMERR_CL_CRL_ALREADY_SIGNED = -2147411897; +const int CSSMERR_AC_INVALID_DB_HANDLE1 = -2147405750; -const int CSSMERR_CL_INVALID_NUMBER_OF_FIELDS = -2147411896; +const int CSSMERR_AC_INVALID_DB_LIST_POINTER1 = -2147405747; -const int CSSMERR_CL_VERIFICATION_FAILURE = -2147411895; +const int CSSM_AC_BASE_AC_ERROR1 = -2147405568; -const int CSSMERR_CL_UNKNOWN_FORMAT = -2147411890; +const int CSSMERR_AC_INVALID_BASE_ACLS1 = -2147405567; -const int CSSMERR_CL_UNKNOWN_TAG = -2147411889; +const int CSSMERR_AC_INVALID_TUPLE_CREDENTIALS1 = -2147405566; -const int CSSMERR_CL_INVALID_PASSTHROUGH_ID = -2147411882; +const int CSSMERR_AC_INVALID_ENCODING1 = -2147405565; -const int CSSM_CL_BASE_CL_ERROR = -2147411712; +const int CSSMERR_AC_INVALID_VALIDITY_PERIOD1 = -2147405564; -const int CSSMERR_CL_INVALID_BUNDLE_POINTER = -2147411711; +const int CSSMERR_AC_INVALID_REQUESTOR1 = -2147405563; -const int CSSMERR_CL_INVALID_CACHE_HANDLE = -2147411710; +const int CSSMERR_AC_INVALID_REQUEST_DESCRIPTOR1 = -2147405562; -const int CSSMERR_CL_INVALID_RESULTS_HANDLE = -2147411709; +const int CSSMERR_CL_INTERNAL_ERROR1 = -2147411967; -const int CSSMERR_CL_INVALID_BUNDLE_INFO = -2147411708; +const int CSSMERR_CL_MEMORY_ERROR1 = -2147411966; -const int CSSMERR_CL_INVALID_CRL_INDEX = -2147411707; +const int CSSMERR_CL_MDS_ERROR1 = -2147411965; -const int CSSMERR_CL_INVALID_SCOPE = -2147411706; +const int CSSMERR_CL_INVALID_POINTER1 = -2147411964; -const int CSSMERR_CL_NO_FIELD_VALUES = -2147411705; +const int CSSMERR_CL_INVALID_INPUT_POINTER1 = -2147411963; -const int CSSMERR_CL_SCOPE_NOT_SUPPORTED = -2147411704; +const int CSSMERR_CL_INVALID_OUTPUT_POINTER1 = -2147411962; -const int CSSMERR_DL_INTERNAL_ERROR = -2147414015; +const int CSSMERR_CL_FUNCTION_NOT_IMPLEMENTED1 = -2147411961; -const int CSSMERR_DL_MEMORY_ERROR = -2147414014; +const int CSSMERR_CL_SELF_CHECK_FAILED1 = -2147411960; -const int CSSMERR_DL_MDS_ERROR = -2147414013; +const int CSSMERR_CL_OS_ACCESS_DENIED1 = -2147411959; -const int CSSMERR_DL_INVALID_POINTER = -2147414012; +const int CSSMERR_CL_FUNCTION_FAILED1 = -2147411958; -const int CSSMERR_DL_INVALID_INPUT_POINTER = -2147414011; +const int CSSMERR_CL_INVALID_CONTEXT_HANDLE1 = -2147411904; -const int CSSMERR_DL_INVALID_OUTPUT_POINTER = -2147414010; +const int CSSMERR_CL_INVALID_CERTGROUP_POINTER1 = -2147411902; -const int CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED = -2147414009; +const int CSSMERR_CL_INVALID_CERT_POINTER1 = -2147411901; -const int CSSMERR_DL_SELF_CHECK_FAILED = -2147414008; +const int CSSMERR_CL_INVALID_CRL_POINTER1 = -2147411900; -const int CSSMERR_DL_OS_ACCESS_DENIED = -2147414007; +const int CSSMERR_CL_INVALID_FIELD_POINTER1 = -2147411899; -const int CSSMERR_DL_FUNCTION_FAILED = -2147414006; +const int CSSMERR_CL_INVALID_DATA1 = -2147411898; -const int CSSMERR_DL_INVALID_CSP_HANDLE = -2147413936; +const int CSSMERR_CL_CRL_ALREADY_SIGNED1 = -2147411897; -const int CSSMERR_DL_INVALID_DL_HANDLE = -2147413935; +const int CSSMERR_CL_INVALID_NUMBER_OF_FIELDS1 = -2147411896; -const int CSSMERR_DL_INVALID_CL_HANDLE = -2147413934; +const int CSSMERR_CL_VERIFICATION_FAILURE1 = -2147411895; -const int CSSMERR_DL_INVALID_DB_LIST_POINTER = -2147413939; +const int CSSMERR_CL_UNKNOWN_FORMAT1 = -2147411890; -const int CSSMERR_DL_OPERATION_AUTH_DENIED = -2147413984; +const int CSSMERR_CL_UNKNOWN_TAG1 = -2147411889; -const int CSSMERR_DL_OBJECT_USE_AUTH_DENIED = -2147413983; +const int CSSMERR_CL_INVALID_PASSTHROUGH_ID1 = -2147411882; -const int CSSMERR_DL_OBJECT_MANIP_AUTH_DENIED = -2147413982; +const int CSSM_CL_BASE_CL_ERROR1 = -2147411712; -const int CSSMERR_DL_OBJECT_ACL_NOT_SUPPORTED = -2147413981; +const int CSSMERR_CL_INVALID_BUNDLE_POINTER1 = -2147411711; -const int CSSMERR_DL_OBJECT_ACL_REQUIRED = -2147413980; +const int CSSMERR_CL_INVALID_CACHE_HANDLE1 = -2147411710; -const int CSSMERR_DL_INVALID_ACCESS_CREDENTIALS = -2147413979; +const int CSSMERR_CL_INVALID_RESULTS_HANDLE1 = -2147411709; -const int CSSMERR_DL_INVALID_ACL_BASE_CERTS = -2147413978; +const int CSSMERR_CL_INVALID_BUNDLE_INFO1 = -2147411708; -const int CSSMERR_DL_ACL_BASE_CERTS_NOT_SUPPORTED = -2147413977; +const int CSSMERR_CL_INVALID_CRL_INDEX1 = -2147411707; -const int CSSMERR_DL_INVALID_SAMPLE_VALUE = -2147413976; +const int CSSMERR_CL_INVALID_SCOPE1 = -2147411706; -const int CSSMERR_DL_SAMPLE_VALUE_NOT_SUPPORTED = -2147413975; +const int CSSMERR_CL_NO_FIELD_VALUES1 = -2147411705; -const int CSSMERR_DL_INVALID_ACL_SUBJECT_VALUE = -2147413974; +const int CSSMERR_CL_SCOPE_NOT_SUPPORTED1 = -2147411704; -const int CSSMERR_DL_ACL_SUBJECT_TYPE_NOT_SUPPORTED = -2147413973; +const int CSSMERR_DL_INTERNAL_ERROR1 = -2147414015; -const int CSSMERR_DL_INVALID_ACL_CHALLENGE_CALLBACK = -2147413972; +const int CSSMERR_DL_MEMORY_ERROR1 = -2147414014; -const int CSSMERR_DL_ACL_CHALLENGE_CALLBACK_FAILED = -2147413971; +const int CSSMERR_DL_MDS_ERROR1 = -2147414013; -const int CSSMERR_DL_INVALID_ACL_ENTRY_TAG = -2147413970; +const int CSSMERR_DL_INVALID_POINTER1 = -2147414012; -const int CSSMERR_DL_ACL_ENTRY_TAG_NOT_FOUND = -2147413969; +const int CSSMERR_DL_INVALID_INPUT_POINTER1 = -2147414011; -const int CSSMERR_DL_INVALID_ACL_EDIT_MODE = -2147413968; +const int CSSMERR_DL_INVALID_OUTPUT_POINTER1 = -2147414010; -const int CSSMERR_DL_ACL_CHANGE_FAILED = -2147413967; +const int CSSMERR_DL_FUNCTION_NOT_IMPLEMENTED1 = -2147414009; -const int CSSMERR_DL_INVALID_NEW_ACL_ENTRY = -2147413966; +const int CSSMERR_DL_SELF_CHECK_FAILED1 = -2147414008; -const int CSSMERR_DL_INVALID_NEW_ACL_OWNER = -2147413965; +const int CSSMERR_DL_OS_ACCESS_DENIED1 = -2147414007; -const int CSSMERR_DL_ACL_DELETE_FAILED = -2147413964; +const int CSSMERR_DL_FUNCTION_FAILED1 = -2147414006; -const int CSSMERR_DL_ACL_REPLACE_FAILED = -2147413963; +const int CSSMERR_DL_INVALID_CSP_HANDLE1 = -2147413936; -const int CSSMERR_DL_ACL_ADD_FAILED = -2147413962; +const int CSSMERR_DL_INVALID_DL_HANDLE1 = -2147413935; -const int CSSMERR_DL_INVALID_DB_HANDLE = -2147413942; +const int CSSMERR_DL_INVALID_CL_HANDLE1 = -2147413934; -const int CSSMERR_DL_INVALID_PASSTHROUGH_ID = -2147413930; +const int CSSMERR_DL_INVALID_DB_LIST_POINTER1 = -2147413939; -const int CSSMERR_DL_INVALID_NETWORK_ADDR = -2147413929; +const int CSSMERR_DL_OPERATION_AUTH_DENIED1 = -2147413984; -const int CSSM_DL_BASE_DL_ERROR = -2147413760; +const int CSSMERR_DL_OBJECT_USE_AUTH_DENIED1 = -2147413983; -const int CSSMERR_DL_DATABASE_CORRUPT = -2147413759; +const int CSSMERR_DL_OBJECT_MANIP_AUTH_DENIED1 = -2147413982; -const int CSSMERR_DL_INVALID_RECORD_INDEX = -2147413752; +const int CSSMERR_DL_OBJECT_ACL_NOT_SUPPORTED1 = -2147413981; -const int CSSMERR_DL_INVALID_RECORDTYPE = -2147413751; +const int CSSMERR_DL_OBJECT_ACL_REQUIRED1 = -2147413980; -const int CSSMERR_DL_INVALID_FIELD_NAME = -2147413750; +const int CSSMERR_DL_INVALID_ACCESS_CREDENTIALS1 = -2147413979; -const int CSSMERR_DL_UNSUPPORTED_FIELD_FORMAT = -2147413749; +const int CSSMERR_DL_INVALID_ACL_BASE_CERTS1 = -2147413978; -const int CSSMERR_DL_UNSUPPORTED_INDEX_INFO = -2147413748; +const int CSSMERR_DL_ACL_BASE_CERTS_NOT_SUPPORTED1 = -2147413977; -const int CSSMERR_DL_UNSUPPORTED_LOCALITY = -2147413747; +const int CSSMERR_DL_INVALID_SAMPLE_VALUE1 = -2147413976; -const int CSSMERR_DL_UNSUPPORTED_NUM_ATTRIBUTES = -2147413746; +const int CSSMERR_DL_SAMPLE_VALUE_NOT_SUPPORTED1 = -2147413975; -const int CSSMERR_DL_UNSUPPORTED_NUM_INDEXES = -2147413745; +const int CSSMERR_DL_INVALID_ACL_SUBJECT_VALUE1 = -2147413974; -const int CSSMERR_DL_UNSUPPORTED_NUM_RECORDTYPES = -2147413744; +const int CSSMERR_DL_ACL_SUBJECT_TYPE_NOT_SUPPORTED1 = -2147413973; -const int CSSMERR_DL_UNSUPPORTED_RECORDTYPE = -2147413743; +const int CSSMERR_DL_INVALID_ACL_CHALLENGE_CALLBACK1 = -2147413972; -const int CSSMERR_DL_FIELD_SPECIFIED_MULTIPLE = -2147413742; +const int CSSMERR_DL_ACL_CHALLENGE_CALLBACK_FAILED1 = -2147413971; -const int CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT = -2147413741; +const int CSSMERR_DL_INVALID_ACL_ENTRY_TAG1 = -2147413970; -const int CSSMERR_DL_INVALID_PARSING_MODULE = -2147413740; +const int CSSMERR_DL_ACL_ENTRY_TAG_NOT_FOUND1 = -2147413969; -const int CSSMERR_DL_INVALID_DB_NAME = -2147413738; +const int CSSMERR_DL_INVALID_ACL_EDIT_MODE1 = -2147413968; -const int CSSMERR_DL_DATASTORE_DOESNOT_EXIST = -2147413737; +const int CSSMERR_DL_ACL_CHANGE_FAILED1 = -2147413967; -const int CSSMERR_DL_DATASTORE_ALREADY_EXISTS = -2147413736; +const int CSSMERR_DL_INVALID_NEW_ACL_ENTRY1 = -2147413966; -const int CSSMERR_DL_DB_LOCKED = -2147413735; +const int CSSMERR_DL_INVALID_NEW_ACL_OWNER1 = -2147413965; -const int CSSMERR_DL_DATASTORE_IS_OPEN = -2147413734; +const int CSSMERR_DL_ACL_DELETE_FAILED1 = -2147413964; -const int CSSMERR_DL_RECORD_NOT_FOUND = -2147413733; +const int CSSMERR_DL_ACL_REPLACE_FAILED1 = -2147413963; -const int CSSMERR_DL_MISSING_VALUE = -2147413732; +const int CSSMERR_DL_ACL_ADD_FAILED1 = -2147413962; -const int CSSMERR_DL_UNSUPPORTED_QUERY = -2147413731; +const int CSSMERR_DL_INVALID_DB_HANDLE1 = -2147413942; -const int CSSMERR_DL_UNSUPPORTED_QUERY_LIMITS = -2147413730; +const int CSSMERR_DL_INVALID_PASSTHROUGH_ID1 = -2147413930; -const int CSSMERR_DL_UNSUPPORTED_NUM_SELECTION_PREDS = -2147413729; +const int CSSMERR_DL_INVALID_NETWORK_ADDR1 = -2147413929; -const int CSSMERR_DL_UNSUPPORTED_OPERATOR = -2147413727; +const int CSSM_DL_BASE_DL_ERROR1 = -2147413760; -const int CSSMERR_DL_INVALID_RESULTS_HANDLE = -2147413726; +const int CSSMERR_DL_DATABASE_CORRUPT1 = -2147413759; -const int CSSMERR_DL_INVALID_DB_LOCATION = -2147413725; +const int CSSMERR_DL_INVALID_RECORD_INDEX1 = -2147413752; -const int CSSMERR_DL_INVALID_ACCESS_REQUEST = -2147413724; +const int CSSMERR_DL_INVALID_RECORDTYPE1 = -2147413751; -const int CSSMERR_DL_INVALID_INDEX_INFO = -2147413723; +const int CSSMERR_DL_INVALID_FIELD_NAME1 = -2147413750; -const int CSSMERR_DL_INVALID_SELECTION_TAG = -2147413722; +const int CSSMERR_DL_UNSUPPORTED_FIELD_FORMAT1 = -2147413749; -const int CSSMERR_DL_INVALID_NEW_OWNER = -2147413721; +const int CSSMERR_DL_UNSUPPORTED_INDEX_INFO1 = -2147413748; -const int CSSMERR_DL_INVALID_RECORD_UID = -2147413720; +const int CSSMERR_DL_UNSUPPORTED_LOCALITY1 = -2147413747; -const int CSSMERR_DL_INVALID_UNIQUE_INDEX_DATA = -2147413719; +const int CSSMERR_DL_UNSUPPORTED_NUM_ATTRIBUTES1 = -2147413746; -const int CSSMERR_DL_INVALID_MODIFY_MODE = -2147413718; +const int CSSMERR_DL_UNSUPPORTED_NUM_INDEXES1 = -2147413745; -const int CSSMERR_DL_INVALID_OPEN_PARAMETERS = -2147413717; +const int CSSMERR_DL_UNSUPPORTED_NUM_RECORDTYPES1 = -2147413744; -const int CSSMERR_DL_RECORD_MODIFIED = -2147413716; +const int CSSMERR_DL_UNSUPPORTED_RECORDTYPE1 = -2147413743; -const int CSSMERR_DL_ENDOFDATA = -2147413715; +const int CSSMERR_DL_FIELD_SPECIFIED_MULTIPLE1 = -2147413742; -const int CSSMERR_DL_INVALID_QUERY = -2147413714; +const int CSSMERR_DL_INCOMPATIBLE_FIELD_FORMAT1 = -2147413741; -const int CSSMERR_DL_INVALID_VALUE = -2147413713; +const int CSSMERR_DL_INVALID_PARSING_MODULE1 = -2147413740; -const int CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTED = -2147413712; +const int CSSMERR_DL_INVALID_DB_NAME1 = -2147413738; -const int CSSMERR_DL_STALE_UNIQUE_RECORD = -2147413711; +const int CSSMERR_DL_DATASTORE_DOESNOT_EXIST1 = -2147413737; -const int CSSM_WORDID_KEYCHAIN_PROMPT = 65536; +const int CSSMERR_DL_DATASTORE_ALREADY_EXISTS1 = -2147413736; -const int CSSM_WORDID_KEYCHAIN_LOCK = 65537; +const int CSSMERR_DL_DB_LOCKED1 = -2147413735; -const int CSSM_WORDID_KEYCHAIN_CHANGE_LOCK = 65538; +const int CSSMERR_DL_DATASTORE_IS_OPEN1 = -2147413734; -const int CSSM_WORDID_PROCESS = 65539; +const int CSSMERR_DL_RECORD_NOT_FOUND1 = -2147413733; -const int CSSM_WORDID__RESERVED_1 = 65540; +const int CSSMERR_DL_MISSING_VALUE1 = -2147413732; -const int CSSM_WORDID_SYMMETRIC_KEY = 65541; +const int CSSMERR_DL_UNSUPPORTED_QUERY1 = -2147413731; -const int CSSM_WORDID_SYSTEM = 65542; +const int CSSMERR_DL_UNSUPPORTED_QUERY_LIMITS1 = -2147413730; -const int CSSM_WORDID_KEY = 65543; +const int CSSMERR_DL_UNSUPPORTED_NUM_SELECTION_PREDS1 = -2147413729; -const int CSSM_WORDID_PIN = 65544; +const int CSSMERR_DL_UNSUPPORTED_OPERATOR1 = -2147413727; -const int CSSM_WORDID_PREAUTH = 65545; +const int CSSMERR_DL_INVALID_RESULTS_HANDLE1 = -2147413726; -const int CSSM_WORDID_PREAUTH_SOURCE = 65546; +const int CSSMERR_DL_INVALID_DB_LOCATION1 = -2147413725; -const int CSSM_WORDID_ASYMMETRIC_KEY = 65547; +const int CSSMERR_DL_INVALID_ACCESS_REQUEST1 = -2147413724; -const int CSSM_WORDID_PARTITION = 65548; +const int CSSMERR_DL_INVALID_INDEX_INFO1 = -2147413723; -const int CSSM_WORDID_KEYBAG_KEY = 65549; +const int CSSMERR_DL_INVALID_SELECTION_TAG1 = -2147413722; -const int CSSM_WORDID__FIRST_UNUSED = 65550; +const int CSSMERR_DL_INVALID_NEW_OWNER1 = -2147413721; -const int CSSM_ACL_SUBJECT_TYPE_KEYCHAIN_PROMPT = 65536; +const int CSSMERR_DL_INVALID_RECORD_UID1 = -2147413720; -const int CSSM_ACL_SUBJECT_TYPE_PROCESS = 65539; +const int CSSMERR_DL_INVALID_UNIQUE_INDEX_DATA1 = -2147413719; -const int CSSM_ACL_SUBJECT_TYPE_CODE_SIGNATURE = 116; +const int CSSMERR_DL_INVALID_MODIFY_MODE1 = -2147413718; -const int CSSM_ACL_SUBJECT_TYPE_COMMENT = 12; +const int CSSMERR_DL_INVALID_OPEN_PARAMETERS1 = -2147413717; -const int CSSM_ACL_SUBJECT_TYPE_SYMMETRIC_KEY = 65541; +const int CSSMERR_DL_RECORD_MODIFIED1 = -2147413716; -const int CSSM_ACL_SUBJECT_TYPE_PREAUTH = 65545; +const int CSSMERR_DL_ENDOFDATA1 = -2147413715; -const int CSSM_ACL_SUBJECT_TYPE_PREAUTH_SOURCE = 65546; +const int CSSMERR_DL_INVALID_QUERY1 = -2147413714; -const int CSSM_ACL_SUBJECT_TYPE_ASYMMETRIC_KEY = 65547; +const int CSSMERR_DL_INVALID_VALUE1 = -2147413713; -const int CSSM_ACL_SUBJECT_TYPE_PARTITION = 65548; +const int CSSMERR_DL_MULTIPLE_VALUES_UNSUPPORTED1 = -2147413712; -const int CSSM_SAMPLE_TYPE_KEYCHAIN_PROMPT = 65536; +const int CSSMERR_DL_STALE_UNIQUE_RECORD1 = -2147413711; -const int CSSM_SAMPLE_TYPE_KEYCHAIN_LOCK = 65537; +const int CSSM_WORDID_KEYCHAIN_PROMPT1 = 65536; -const int CSSM_SAMPLE_TYPE_KEYCHAIN_CHANGE_LOCK = 65538; +const int CSSM_WORDID_KEYCHAIN_LOCK1 = 65537; -const int CSSM_SAMPLE_TYPE_PROCESS = 65539; +const int CSSM_WORDID_KEYCHAIN_CHANGE_LOCK1 = 65538; -const int CSSM_SAMPLE_TYPE_COMMENT = 12; +const int CSSM_WORDID_PROCESS1 = 65539; -const int CSSM_SAMPLE_TYPE_RETRY_ID = 85; +const int CSSM_WORDID__RESERVED_11 = 65540; -const int CSSM_SAMPLE_TYPE_SYMMETRIC_KEY = 65541; +const int CSSM_WORDID_SYMMETRIC_KEY1 = 65541; -const int CSSM_SAMPLE_TYPE_PREAUTH = 65545; +const int CSSM_WORDID_SYSTEM1 = 65542; -const int CSSM_SAMPLE_TYPE_ASYMMETRIC_KEY = 65547; +const int CSSM_WORDID_KEY1 = 65543; -const int CSSM_SAMPLE_TYPE_KEYBAG_KEY = 65549; +const int CSSM_WORDID_PIN1 = 65544; -const int CSSM_ACL_AUTHORIZATION_CHANGE_ACL = 65536; +const int CSSM_WORDID_PREAUTH1 = 65545; -const int CSSM_ACL_AUTHORIZATION_CHANGE_OWNER = 65537; +const int CSSM_WORDID_PREAUTH_SOURCE1 = 65546; -const int CSSM_ACL_AUTHORIZATION_PARTITION_ID = 65538; +const int CSSM_WORDID_ASYMMETRIC_KEY1 = 65547; -const int CSSM_ACL_AUTHORIZATION_INTEGRITY = 65539; +const int CSSM_WORDID_PARTITION1 = 65548; -const int CSSM_ACL_AUTHORIZATION_PREAUTH_BASE = 16842752; +const int CSSM_WORDID_KEYBAG_KEY1 = 65549; -const int CSSM_ACL_AUTHORIZATION_PREAUTH_END = 16908288; +const int CSSM_WORDID__FIRST_UNUSED1 = 65550; -const int CSSM_ACL_CODE_SIGNATURE_INVALID = 0; +const int CSSM_ACL_SUBJECT_TYPE_KEYCHAIN_PROMPT1 = 65536; -const int CSSM_ACL_CODE_SIGNATURE_OSX = 1; +const int CSSM_ACL_SUBJECT_TYPE_PROCESS1 = 65539; -const int CSSM_ACL_MATCH_UID = 1; +const int CSSM_ACL_SUBJECT_TYPE_CODE_SIGNATURE1 = 116; -const int CSSM_ACL_MATCH_GID = 2; +const int CSSM_ACL_SUBJECT_TYPE_COMMENT1 = 12; -const int CSSM_ACL_MATCH_HONOR_ROOT = 256; +const int CSSM_ACL_SUBJECT_TYPE_SYMMETRIC_KEY1 = 65541; -const int CSSM_ACL_MATCH_BITS = 3; +const int CSSM_ACL_SUBJECT_TYPE_PREAUTH1 = 65545; -const int CSSM_ACL_PROCESS_SELECTOR_CURRENT_VERSION = 257; +const int CSSM_ACL_SUBJECT_TYPE_PREAUTH_SOURCE1 = 65546; -const int CSSM_ACL_KEYCHAIN_PROMPT_CURRENT_VERSION = 257; +const int CSSM_ACL_SUBJECT_TYPE_ASYMMETRIC_KEY1 = 65547; -const int CSSM_ACL_KEYCHAIN_PROMPT_REQUIRE_PASSPHRASE = 1; +const int CSSM_ACL_SUBJECT_TYPE_PARTITION1 = 65548; -const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED = 16; +const int CSSM_SAMPLE_TYPE_KEYCHAIN_PROMPT1 = 65536; -const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED_ACT = 32; +const int CSSM_SAMPLE_TYPE_KEYCHAIN_LOCK1 = 65537; -const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID = 64; +const int CSSM_SAMPLE_TYPE_KEYCHAIN_CHANGE_LOCK1 = 65538; -const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID_ACT = 128; +const int CSSM_SAMPLE_TYPE_PROCESS1 = 65539; -const int CSSM_ACL_PREAUTH_TRACKING_COUNT_MASK = 255; +const int CSSM_SAMPLE_TYPE_COMMENT1 = 12; -const int CSSM_ACL_PREAUTH_TRACKING_BLOCKED = 0; +const int CSSM_SAMPLE_TYPE_RETRY_ID1 = 85; -const int CSSM_ACL_PREAUTH_TRACKING_UNKNOWN = 1073741824; +const int CSSM_SAMPLE_TYPE_SYMMETRIC_KEY1 = 65541; -const int CSSM_ACL_PREAUTH_TRACKING_AUTHORIZED = -2147483648; +const int CSSM_SAMPLE_TYPE_PREAUTH1 = 65545; -const int CSSM_DB_ACCESS_RESET = 65536; +const int CSSM_SAMPLE_TYPE_ASYMMETRIC_KEY1 = 65547; -const int CSSM_ALGID_APPLE_YARROW = -2147483648; +const int CSSM_SAMPLE_TYPE_KEYBAG_KEY1 = 65549; -const int CSSM_ALGID_AES = -2147483647; +const int CSSM_ACL_AUTHORIZATION_CHANGE_ACL1 = 65536; -const int CSSM_ALGID_FEE = -2147483646; +const int CSSM_ACL_AUTHORIZATION_CHANGE_OWNER1 = 65537; -const int CSSM_ALGID_FEE_MD5 = -2147483645; +const int CSSM_ACL_AUTHORIZATION_PARTITION_ID1 = 65538; -const int CSSM_ALGID_FEE_SHA1 = -2147483644; +const int CSSM_ACL_AUTHORIZATION_INTEGRITY1 = 65539; -const int CSSM_ALGID_FEED = -2147483643; +const int CSSM_ACL_AUTHORIZATION_PREAUTH_BASE1 = 16842752; -const int CSSM_ALGID_FEEDEXP = -2147483642; +const int CSSM_ACL_AUTHORIZATION_PREAUTH_END1 = 16908288; -const int CSSM_ALGID_ASC = -2147483641; +const int CSSM_ACL_CODE_SIGNATURE_INVALID1 = 0; -const int CSSM_ALGID_SHA1HMAC_LEGACY = -2147483640; +const int CSSM_ACL_CODE_SIGNATURE_OSX1 = 1; -const int CSSM_ALGID_KEYCHAIN_KEY = -2147483639; +const int CSSM_ACL_MATCH_UID1 = 1; -const int CSSM_ALGID_PKCS12_PBE_ENCR = -2147483638; +const int CSSM_ACL_MATCH_GID1 = 2; -const int CSSM_ALGID_PKCS12_PBE_MAC = -2147483637; +const int CSSM_ACL_MATCH_HONOR_ROOT1 = 256; -const int CSSM_ALGID_SECURE_PASSPHRASE = -2147483636; +const int CSSM_ACL_MATCH_BITS1 = 3; -const int CSSM_ALGID_PBE_OPENSSL_MD5 = -2147483635; +const int CSSM_ACL_PROCESS_SELECTOR_CURRENT_VERSION1 = 257; -const int CSSM_ALGID_SHA256 = -2147483634; +const int CSSM_ACL_KEYCHAIN_PROMPT_CURRENT_VERSION1 = 257; -const int CSSM_ALGID_SHA384 = -2147483633; +const int CSSM_ACL_KEYCHAIN_PROMPT_REQUIRE_PASSPHRASE1 = 1; -const int CSSM_ALGID_SHA512 = -2147483632; +const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED1 = 16; -const int CSSM_ALGID_ENTROPY_DEFAULT = -2147483631; +const int CSSM_ACL_KEYCHAIN_PROMPT_UNSIGNED_ACT1 = 32; -const int CSSM_ALGID_SHA224 = -2147483630; +const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID1 = 64; -const int CSSM_ALGID_SHA224WithRSA = -2147483629; +const int CSSM_ACL_KEYCHAIN_PROMPT_INVALID_ACT1 = 128; -const int CSSM_ALGID_SHA256WithRSA = -2147483628; +const int CSSM_ACL_PREAUTH_TRACKING_COUNT_MASK1 = 255; -const int CSSM_ALGID_SHA384WithRSA = -2147483627; +const int CSSM_ACL_PREAUTH_TRACKING_BLOCKED1 = 0; -const int CSSM_ALGID_SHA512WithRSA = -2147483626; +const int CSSM_ACL_PREAUTH_TRACKING_UNKNOWN1 = 1073741824; -const int CSSM_ALGID_OPENSSH1 = -2147483625; +const int CSSM_ACL_PREAUTH_TRACKING_AUTHORIZED1 = -2147483648; -const int CSSM_ALGID_SHA224WithECDSA = -2147483624; +const int CSSM_DB_ACCESS_RESET1 = 65536; -const int CSSM_ALGID_SHA256WithECDSA = -2147483623; +const int CSSM_ALGID_APPLE_YARROW1 = -2147483648; -const int CSSM_ALGID_SHA384WithECDSA = -2147483622; +const int CSSM_ALGID_AES1 = -2147483647; -const int CSSM_ALGID_SHA512WithECDSA = -2147483621; +const int CSSM_ALGID_FEE1 = -2147483646; -const int CSSM_ALGID_ECDSA_SPECIFIED = -2147483620; +const int CSSM_ALGID_FEE_MD51 = -2147483645; -const int CSSM_ALGID_ECDH_X963_KDF = -2147483619; +const int CSSM_ALGID_FEE_SHA11 = -2147483644; -const int CSSM_ALGID__FIRST_UNUSED = -2147483618; +const int CSSM_ALGID_FEED1 = -2147483643; -const int CSSM_PADDING_APPLE_SSLv2 = -2147483648; +const int CSSM_ALGID_FEEDEXP1 = -2147483642; -const int CSSM_KEYBLOB_RAW_FORMAT_VENDOR_DEFINED = -2147483648; +const int CSSM_ALGID_ASC1 = -2147483641; -const int CSSM_KEYBLOB_RAW_FORMAT_X509 = -2147483648; +const int CSSM_ALGID_SHA1HMAC_LEGACY1 = -2147483640; -const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH = -2147483647; +const int CSSM_ALGID_KEYCHAIN_KEY1 = -2147483639; -const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSL = -2147483646; +const int CSSM_ALGID_PKCS12_PBE_ENCR1 = -2147483638; -const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH2 = -2147483645; +const int CSSM_ALGID_PKCS12_PBE_MAC1 = -2147483637; -const int CSSM_CUSTOM_COMMON_ERROR_EXTENT = 224; +const int CSSM_ALGID_SECURE_PASSPHRASE1 = -2147483636; -const int CSSM_ERRCODE_NO_USER_INTERACTION = 224; +const int CSSM_ALGID_PBE_OPENSSL_MD51 = -2147483635; -const int CSSM_ERRCODE_USER_CANCELED = 225; +const int CSSM_ALGID_SHA2561 = -2147483634; -const int CSSM_ERRCODE_SERVICE_NOT_AVAILABLE = 226; +const int CSSM_ALGID_SHA3841 = -2147483633; -const int CSSM_ERRCODE_INSUFFICIENT_CLIENT_IDENTIFICATION = 227; +const int CSSM_ALGID_SHA5121 = -2147483632; -const int CSSM_ERRCODE_DEVICE_RESET = 228; +const int CSSM_ALGID_ENTROPY_DEFAULT1 = -2147483631; -const int CSSM_ERRCODE_DEVICE_FAILED = 229; +const int CSSM_ALGID_SHA2241 = -2147483630; -const int CSSM_ERRCODE_IN_DARK_WAKE = 230; +const int CSSM_ALGID_SHA224WithRSA1 = -2147483629; -const int CSSMERR_CSSM_NO_USER_INTERACTION = -2147417888; +const int CSSM_ALGID_SHA256WithRSA1 = -2147483628; -const int CSSMERR_AC_NO_USER_INTERACTION = -2147405600; +const int CSSM_ALGID_SHA384WithRSA1 = -2147483627; -const int CSSMERR_CSP_NO_USER_INTERACTION = -2147415840; +const int CSSM_ALGID_SHA512WithRSA1 = -2147483626; -const int CSSMERR_CL_NO_USER_INTERACTION = -2147411744; +const int CSSM_ALGID_OPENSSH11 = -2147483625; -const int CSSMERR_DL_NO_USER_INTERACTION = -2147413792; +const int CSSM_ALGID_SHA224WithECDSA1 = -2147483624; -const int CSSMERR_TP_NO_USER_INTERACTION = -2147409696; +const int CSSM_ALGID_SHA256WithECDSA1 = -2147483623; -const int CSSMERR_CSSM_USER_CANCELED = -2147417887; +const int CSSM_ALGID_SHA384WithECDSA1 = -2147483622; -const int CSSMERR_AC_USER_CANCELED = -2147405599; +const int CSSM_ALGID_SHA512WithECDSA1 = -2147483621; -const int CSSMERR_CSP_USER_CANCELED = -2147415839; +const int CSSM_ALGID_ECDSA_SPECIFIED1 = -2147483620; -const int CSSMERR_CL_USER_CANCELED = -2147411743; +const int CSSM_ALGID_ECDH_X963_KDF1 = -2147483619; -const int CSSMERR_DL_USER_CANCELED = -2147413791; +const int CSSM_ALGID__FIRST_UNUSED1 = -2147483618; -const int CSSMERR_TP_USER_CANCELED = -2147409695; +const int CSSM_PADDING_APPLE_SSLv21 = -2147483648; -const int CSSMERR_CSSM_SERVICE_NOT_AVAILABLE = -2147417886; +const int CSSM_KEYBLOB_RAW_FORMAT_VENDOR_DEFINED1 = -2147483648; -const int CSSMERR_AC_SERVICE_NOT_AVAILABLE = -2147405598; +const int CSSM_KEYBLOB_RAW_FORMAT_X5091 = -2147483648; -const int CSSMERR_CSP_SERVICE_NOT_AVAILABLE = -2147415838; +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH1 = -2147483647; -const int CSSMERR_CL_SERVICE_NOT_AVAILABLE = -2147411742; +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSL1 = -2147483646; -const int CSSMERR_DL_SERVICE_NOT_AVAILABLE = -2147413790; +const int CSSM_KEYBLOB_RAW_FORMAT_OPENSSH21 = -2147483645; -const int CSSMERR_TP_SERVICE_NOT_AVAILABLE = -2147409694; +const int CSSM_CUSTOM_COMMON_ERROR_EXTENT1 = 224; -const int CSSMERR_CSSM_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147417885; +const int CSSM_ERRCODE_NO_USER_INTERACTION1 = 224; -const int CSSMERR_AC_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147405597; +const int CSSM_ERRCODE_USER_CANCELED1 = 225; -const int CSSMERR_CSP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147415837; +const int CSSM_ERRCODE_SERVICE_NOT_AVAILABLE1 = 226; -const int CSSMERR_CL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147411741; +const int CSSM_ERRCODE_INSUFFICIENT_CLIENT_IDENTIFICATION1 = 227; -const int CSSMERR_DL_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147413789; +const int CSSM_ERRCODE_DEVICE_RESET1 = 228; -const int CSSMERR_TP_INSUFFICIENT_CLIENT_IDENTIFICATION = -2147409693; +const int CSSM_ERRCODE_DEVICE_FAILED1 = 229; -const int CSSMERR_CSSM_DEVICE_RESET = -2147417884; +const int CSSM_ERRCODE_IN_DARK_WAKE1 = 230; -const int CSSMERR_AC_DEVICE_RESET = -2147405596; +const int CSSMERR_CSSM_NO_USER_INTERACTION1 = -2147417888; -const int CSSMERR_CSP_DEVICE_RESET = -2147415836; +const int CSSMERR_AC_NO_USER_INTERACTION1 = -2147405600; -const int CSSMERR_CL_DEVICE_RESET = -2147411740; +const int CSSMERR_CSP_NO_USER_INTERACTION1 = -2147415840; -const int CSSMERR_DL_DEVICE_RESET = -2147413788; +const int CSSMERR_CL_NO_USER_INTERACTION1 = -2147411744; -const int CSSMERR_TP_DEVICE_RESET = -2147409692; +const int CSSMERR_DL_NO_USER_INTERACTION1 = -2147413792; -const int CSSMERR_CSSM_DEVICE_FAILED = -2147417883; +const int CSSMERR_TP_NO_USER_INTERACTION1 = -2147409696; -const int CSSMERR_AC_DEVICE_FAILED = -2147405595; +const int CSSMERR_CSSM_USER_CANCELED1 = -2147417887; -const int CSSMERR_CSP_DEVICE_FAILED = -2147415835; +const int CSSMERR_AC_USER_CANCELED1 = -2147405599; -const int CSSMERR_CL_DEVICE_FAILED = -2147411739; +const int CSSMERR_CSP_USER_CANCELED1 = -2147415839; -const int CSSMERR_DL_DEVICE_FAILED = -2147413787; +const int CSSMERR_CL_USER_CANCELED1 = -2147411743; -const int CSSMERR_TP_DEVICE_FAILED = -2147409691; +const int CSSMERR_DL_USER_CANCELED1 = -2147413791; -const int CSSMERR_CSSM_IN_DARK_WAKE = -2147417882; +const int CSSMERR_TP_USER_CANCELED1 = -2147409695; -const int CSSMERR_AC_IN_DARK_WAKE = -2147405594; +const int CSSMERR_CSSM_SERVICE_NOT_AVAILABLE1 = -2147417886; -const int CSSMERR_CSP_IN_DARK_WAKE = -2147415834; +const int CSSMERR_AC_SERVICE_NOT_AVAILABLE1 = -2147405598; -const int CSSMERR_CL_IN_DARK_WAKE = -2147411738; +const int CSSMERR_CSP_SERVICE_NOT_AVAILABLE1 = -2147415838; -const int CSSMERR_DL_IN_DARK_WAKE = -2147413786; +const int CSSMERR_CL_SERVICE_NOT_AVAILABLE1 = -2147411742; -const int CSSMERR_TP_IN_DARK_WAKE = -2147409690; +const int CSSMERR_DL_SERVICE_NOT_AVAILABLE1 = -2147413790; -const int CSSMERR_CSP_APPLE_ADD_APPLICATION_ACL_SUBJECT = -2147415040; +const int CSSMERR_TP_SERVICE_NOT_AVAILABLE1 = -2147409694; -const int CSSMERR_CSP_APPLE_PUBLIC_KEY_INCOMPLETE = -2147415039; +const int CSSMERR_CSSM_INSUFFICIENT_CLIENT_IDENTIFICATION1 = -2147417885; -const int CSSMERR_CSP_APPLE_SIGNATURE_MISMATCH = -2147415038; +const int CSSMERR_AC_INSUFFICIENT_CLIENT_IDENTIFICATION1 = -2147405597; -const int CSSMERR_CSP_APPLE_INVALID_KEY_START_DATE = -2147415037; +const int CSSMERR_CSP_INSUFFICIENT_CLIENT_IDENTIFICATION1 = -2147415837; -const int CSSMERR_CSP_APPLE_INVALID_KEY_END_DATE = -2147415036; +const int CSSMERR_CL_INSUFFICIENT_CLIENT_IDENTIFICATION1 = -2147411741; -const int CSSMERR_CSPDL_APPLE_DL_CONVERSION_ERROR = -2147415035; +const int CSSMERR_DL_INSUFFICIENT_CLIENT_IDENTIFICATION1 = -2147413789; -const int CSSMERR_CSP_APPLE_SSLv2_ROLLBACK = -2147415034; +const int CSSMERR_TP_INSUFFICIENT_CLIENT_IDENTIFICATION1 = -2147409693; -const int CSSM_DL_DB_RECORD_GENERIC_PASSWORD = -2147483648; +const int CSSMERR_CSSM_DEVICE_RESET1 = -2147417884; -const int CSSM_DL_DB_RECORD_INTERNET_PASSWORD = -2147483647; +const int CSSMERR_AC_DEVICE_RESET1 = -2147405596; -const int CSSM_DL_DB_RECORD_APPLESHARE_PASSWORD = -2147483646; +const int CSSMERR_CSP_DEVICE_RESET1 = -2147415836; -const int CSSM_DL_DB_RECORD_X509_CERTIFICATE = -2147479552; +const int CSSMERR_CL_DEVICE_RESET1 = -2147411740; -const int CSSM_DL_DB_RECORD_USER_TRUST = -2147479551; +const int CSSMERR_DL_DEVICE_RESET1 = -2147413788; -const int CSSM_DL_DB_RECORD_X509_CRL = -2147479550; +const int CSSMERR_TP_DEVICE_RESET1 = -2147409692; -const int CSSM_DL_DB_RECORD_UNLOCK_REFERRAL = -2147479549; +const int CSSMERR_CSSM_DEVICE_FAILED1 = -2147417883; -const int CSSM_DL_DB_RECORD_EXTENDED_ATTRIBUTE = -2147479548; +const int CSSMERR_AC_DEVICE_FAILED1 = -2147405595; -const int CSSM_DL_DB_RECORD_METADATA = -2147450880; +const int CSSMERR_CSP_DEVICE_FAILED1 = -2147415835; -const int CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT = 0; +const int CSSMERR_CL_DEVICE_FAILED1 = -2147411739; -const int CSSM_APPLEFILEDL_COMMIT = 1; +const int CSSMERR_DL_DEVICE_FAILED1 = -2147413787; -const int CSSM_APPLEFILEDL_ROLLBACK = 2; +const int CSSMERR_TP_DEVICE_FAILED1 = -2147409691; -const int CSSM_APPLEFILEDL_TAKE_FILE_LOCK = 3; +const int CSSMERR_CSSM_IN_DARK_WAKE1 = -2147417882; -const int CSSM_APPLEFILEDL_MAKE_BACKUP = 4; +const int CSSMERR_AC_IN_DARK_WAKE1 = -2147405594; -const int CSSM_APPLEFILEDL_MAKE_COPY = 5; +const int CSSMERR_CSP_IN_DARK_WAKE1 = -2147415834; -const int CSSM_APPLEFILEDL_DELETE_FILE = 6; +const int CSSMERR_CL_IN_DARK_WAKE1 = -2147411738; -const int CSSM_APPLE_UNLOCK_TYPE_KEY_DIRECT = 1; +const int CSSMERR_DL_IN_DARK_WAKE1 = -2147413786; -const int CSSM_APPLE_UNLOCK_TYPE_WRAPPED_PRIVATE = 2; +const int CSSMERR_TP_IN_DARK_WAKE1 = -2147409690; -const int CSSM_APPLE_UNLOCK_TYPE_KEYBAG = 3; +const int CSSMERR_CSP_APPLE_ADD_APPLICATION_ACL_SUBJECT1 = -2147415040; -const int CSSMERR_APPLEDL_INVALID_OPEN_PARAMETERS = -2147412992; +const int CSSMERR_CSP_APPLE_PUBLIC_KEY_INCOMPLETE1 = -2147415039; -const int CSSMERR_APPLEDL_DISK_FULL = -2147412991; +const int CSSMERR_CSP_APPLE_SIGNATURE_MISMATCH1 = -2147415038; -const int CSSMERR_APPLEDL_QUOTA_EXCEEDED = -2147412990; +const int CSSMERR_CSP_APPLE_INVALID_KEY_START_DATE1 = -2147415037; -const int CSSMERR_APPLEDL_FILE_TOO_BIG = -2147412989; +const int CSSMERR_CSP_APPLE_INVALID_KEY_END_DATE1 = -2147415036; -const int CSSMERR_APPLEDL_INVALID_DATABASE_BLOB = -2147412988; +const int CSSMERR_CSPDL_APPLE_DL_CONVERSION_ERROR1 = -2147415035; -const int CSSMERR_APPLEDL_INVALID_KEY_BLOB = -2147412987; +const int CSSMERR_CSP_APPLE_SSLv2_ROLLBACK1 = -2147415034; -const int CSSMERR_APPLEDL_INCOMPATIBLE_DATABASE_BLOB = -2147412986; +const int CSSM_DL_DB_RECORD_GENERIC_PASSWORD1 = -2147483648; -const int CSSMERR_APPLEDL_INCOMPATIBLE_KEY_BLOB = -2147412985; +const int CSSM_DL_DB_RECORD_INTERNET_PASSWORD1 = -2147483647; -const int CSSMERR_APPLETP_HOSTNAME_MISMATCH = -2147408896; +const int CSSM_DL_DB_RECORD_APPLESHARE_PASSWORD1 = -2147483646; -const int CSSMERR_APPLETP_UNKNOWN_CRITICAL_EXTEN = -2147408895; +const int CSSM_DL_DB_RECORD_X509_CERTIFICATE1 = -2147479552; -const int CSSMERR_APPLETP_NO_BASIC_CONSTRAINTS = -2147408894; +const int CSSM_DL_DB_RECORD_USER_TRUST1 = -2147479551; -const int CSSMERR_APPLETP_INVALID_CA = -2147408893; +const int CSSM_DL_DB_RECORD_X509_CRL1 = -2147479550; -const int CSSMERR_APPLETP_INVALID_AUTHORITY_ID = -2147408892; +const int CSSM_DL_DB_RECORD_UNLOCK_REFERRAL1 = -2147479549; -const int CSSMERR_APPLETP_INVALID_SUBJECT_ID = -2147408891; +const int CSSM_DL_DB_RECORD_EXTENDED_ATTRIBUTE1 = -2147479548; -const int CSSMERR_APPLETP_INVALID_KEY_USAGE = -2147408890; +const int CSSM_DL_DB_RECORD_METADATA1 = -2147450880; -const int CSSMERR_APPLETP_INVALID_EXTENDED_KEY_USAGE = -2147408889; +const int CSSM_APPLEFILEDL_TOGGLE_AUTOCOMMIT1 = 0; -const int CSSMERR_APPLETP_INVALID_ID_LINKAGE = -2147408888; +const int CSSM_APPLEFILEDL_COMMIT1 = 1; -const int CSSMERR_APPLETP_PATH_LEN_CONSTRAINT = -2147408887; +const int CSSM_APPLEFILEDL_ROLLBACK1 = 2; -const int CSSMERR_APPLETP_INVALID_ROOT = -2147408886; +const int CSSM_APPLEFILEDL_TAKE_FILE_LOCK1 = 3; -const int CSSMERR_APPLETP_CRL_EXPIRED = -2147408885; +const int CSSM_APPLEFILEDL_MAKE_BACKUP1 = 4; -const int CSSMERR_APPLETP_CRL_NOT_VALID_YET = -2147408884; +const int CSSM_APPLEFILEDL_MAKE_COPY1 = 5; -const int CSSMERR_APPLETP_CRL_NOT_FOUND = -2147408883; +const int CSSM_APPLEFILEDL_DELETE_FILE1 = 6; -const int CSSMERR_APPLETP_CRL_SERVER_DOWN = -2147408882; +const int CSSM_APPLE_UNLOCK_TYPE_KEY_DIRECT1 = 1; -const int CSSMERR_APPLETP_CRL_BAD_URI = -2147408881; +const int CSSM_APPLE_UNLOCK_TYPE_WRAPPED_PRIVATE1 = 2; -const int CSSMERR_APPLETP_UNKNOWN_CERT_EXTEN = -2147408880; +const int CSSM_APPLE_UNLOCK_TYPE_KEYBAG1 = 3; -const int CSSMERR_APPLETP_UNKNOWN_CRL_EXTEN = -2147408879; +const int CSSMERR_APPLEDL_INVALID_OPEN_PARAMETERS1 = -2147412992; -const int CSSMERR_APPLETP_CRL_NOT_TRUSTED = -2147408878; +const int CSSMERR_APPLEDL_DISK_FULL1 = -2147412991; -const int CSSMERR_APPLETP_CRL_INVALID_ANCHOR_CERT = -2147408877; +const int CSSMERR_APPLEDL_QUOTA_EXCEEDED1 = -2147412990; -const int CSSMERR_APPLETP_CRL_POLICY_FAIL = -2147408876; +const int CSSMERR_APPLEDL_FILE_TOO_BIG1 = -2147412989; -const int CSSMERR_APPLETP_IDP_FAIL = -2147408875; +const int CSSMERR_APPLEDL_INVALID_DATABASE_BLOB1 = -2147412988; -const int CSSMERR_APPLETP_CERT_NOT_FOUND_FROM_ISSUER = -2147408874; +const int CSSMERR_APPLEDL_INVALID_KEY_BLOB1 = -2147412987; -const int CSSMERR_APPLETP_BAD_CERT_FROM_ISSUER = -2147408873; +const int CSSMERR_APPLEDL_INCOMPATIBLE_DATABASE_BLOB1 = -2147412986; -const int CSSMERR_APPLETP_SMIME_EMAIL_ADDRS_NOT_FOUND = -2147408872; +const int CSSMERR_APPLEDL_INCOMPATIBLE_KEY_BLOB1 = -2147412985; -const int CSSMERR_APPLETP_SMIME_BAD_EXT_KEY_USE = -2147408871; +const int CSSMERR_APPLETP_HOSTNAME_MISMATCH1 = -2147408896; -const int CSSMERR_APPLETP_SMIME_BAD_KEY_USE = -2147408870; +const int CSSMERR_APPLETP_UNKNOWN_CRITICAL_EXTEN1 = -2147408895; -const int CSSMERR_APPLETP_SMIME_KEYUSAGE_NOT_CRITICAL = -2147408869; +const int CSSMERR_APPLETP_NO_BASIC_CONSTRAINTS1 = -2147408894; -const int CSSMERR_APPLETP_SMIME_NO_EMAIL_ADDRS = -2147408868; +const int CSSMERR_APPLETP_INVALID_CA1 = -2147408893; -const int CSSMERR_APPLETP_SMIME_SUBJ_ALT_NAME_NOT_CRIT = -2147408867; +const int CSSMERR_APPLETP_INVALID_AUTHORITY_ID1 = -2147408892; -const int CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE = -2147408866; +const int CSSMERR_APPLETP_INVALID_SUBJECT_ID1 = -2147408891; -const int CSSMERR_APPLETP_OCSP_BAD_RESPONSE = -2147408865; +const int CSSMERR_APPLETP_INVALID_KEY_USAGE1 = -2147408890; -const int CSSMERR_APPLETP_OCSP_BAD_REQUEST = -2147408864; +const int CSSMERR_APPLETP_INVALID_EXTENDED_KEY_USAGE1 = -2147408889; -const int CSSMERR_APPLETP_OCSP_UNAVAILABLE = -2147408863; +const int CSSMERR_APPLETP_INVALID_ID_LINKAGE1 = -2147408888; -const int CSSMERR_APPLETP_OCSP_STATUS_UNRECOGNIZED = -2147408862; +const int CSSMERR_APPLETP_PATH_LEN_CONSTRAINT1 = -2147408887; -const int CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK = -2147408861; +const int CSSMERR_APPLETP_INVALID_ROOT1 = -2147408886; -const int CSSMERR_APPLETP_NETWORK_FAILURE = -2147408860; +const int CSSMERR_APPLETP_CRL_EXPIRED1 = -2147408885; -const int CSSMERR_APPLETP_OCSP_NOT_TRUSTED = -2147408859; +const int CSSMERR_APPLETP_CRL_NOT_VALID_YET1 = -2147408884; -const int CSSMERR_APPLETP_OCSP_INVALID_ANCHOR_CERT = -2147408858; +const int CSSMERR_APPLETP_CRL_NOT_FOUND1 = -2147408883; -const int CSSMERR_APPLETP_OCSP_SIG_ERROR = -2147408857; +const int CSSMERR_APPLETP_CRL_SERVER_DOWN1 = -2147408882; -const int CSSMERR_APPLETP_OCSP_NO_SIGNER = -2147408856; +const int CSSMERR_APPLETP_CRL_BAD_URI1 = -2147408881; -const int CSSMERR_APPLETP_OCSP_RESP_MALFORMED_REQ = -2147408855; +const int CSSMERR_APPLETP_UNKNOWN_CERT_EXTEN1 = -2147408880; -const int CSSMERR_APPLETP_OCSP_RESP_INTERNAL_ERR = -2147408854; +const int CSSMERR_APPLETP_UNKNOWN_CRL_EXTEN1 = -2147408879; -const int CSSMERR_APPLETP_OCSP_RESP_TRY_LATER = -2147408853; +const int CSSMERR_APPLETP_CRL_NOT_TRUSTED1 = -2147408878; -const int CSSMERR_APPLETP_OCSP_RESP_SIG_REQUIRED = -2147408852; +const int CSSMERR_APPLETP_CRL_INVALID_ANCHOR_CERT1 = -2147408877; -const int CSSMERR_APPLETP_OCSP_RESP_UNAUTHORIZED = -2147408851; +const int CSSMERR_APPLETP_CRL_POLICY_FAIL1 = -2147408876; -const int CSSMERR_APPLETP_OCSP_NONCE_MISMATCH = -2147408850; +const int CSSMERR_APPLETP_IDP_FAIL1 = -2147408875; -const int CSSMERR_APPLETP_CS_BAD_CERT_CHAIN_LENGTH = -2147408849; +const int CSSMERR_APPLETP_CERT_NOT_FOUND_FROM_ISSUER1 = -2147408874; -const int CSSMERR_APPLETP_CS_NO_BASIC_CONSTRAINTS = -2147408848; +const int CSSMERR_APPLETP_BAD_CERT_FROM_ISSUER1 = -2147408873; -const int CSSMERR_APPLETP_CS_BAD_PATH_LENGTH = -2147408847; +const int CSSMERR_APPLETP_SMIME_EMAIL_ADDRS_NOT_FOUND1 = -2147408872; -const int CSSMERR_APPLETP_CS_NO_EXTENDED_KEY_USAGE = -2147408846; +const int CSSMERR_APPLETP_SMIME_BAD_EXT_KEY_USE1 = -2147408871; -const int CSSMERR_APPLETP_CODE_SIGN_DEVELOPMENT = -2147408845; +const int CSSMERR_APPLETP_SMIME_BAD_KEY_USE1 = -2147408870; -const int CSSMERR_APPLETP_RS_BAD_CERT_CHAIN_LENGTH = -2147408844; +const int CSSMERR_APPLETP_SMIME_KEYUSAGE_NOT_CRITICAL1 = -2147408869; -const int CSSMERR_APPLETP_RS_BAD_EXTENDED_KEY_USAGE = -2147408843; +const int CSSMERR_APPLETP_SMIME_NO_EMAIL_ADDRS1 = -2147408868; -const int CSSMERR_APPLETP_TRUST_SETTING_DENY = -2147408842; +const int CSSMERR_APPLETP_SMIME_SUBJ_ALT_NAME_NOT_CRIT1 = -2147408867; -const int CSSMERR_APPLETP_INVALID_EMPTY_SUBJECT = -2147408841; +const int CSSMERR_APPLETP_SSL_BAD_EXT_KEY_USE1 = -2147408866; -const int CSSMERR_APPLETP_UNKNOWN_QUAL_CERT_STATEMENT = -2147408840; +const int CSSMERR_APPLETP_OCSP_BAD_RESPONSE1 = -2147408865; -const int CSSMERR_APPLETP_MISSING_REQUIRED_EXTENSION = -2147408839; +const int CSSMERR_APPLETP_OCSP_BAD_REQUEST1 = -2147408864; -const int CSSMERR_APPLETP_EXT_KEYUSAGE_NOT_CRITICAL = -2147408838; +const int CSSMERR_APPLETP_OCSP_UNAVAILABLE1 = -2147408863; -const int CSSMERR_APPLETP_IDENTIFIER_MISSING = -2147408837; +const int CSSMERR_APPLETP_OCSP_STATUS_UNRECOGNIZED1 = -2147408862; -const int CSSMERR_APPLETP_CA_PIN_MISMATCH = -2147408836; +const int CSSMERR_APPLETP_INCOMPLETE_REVOCATION_CHECK1 = -2147408861; -const int CSSMERR_APPLETP_LEAF_PIN_MISMATCH = -2147408835; +const int CSSMERR_APPLETP_NETWORK_FAILURE1 = -2147408860; -const int CSSMERR_APPLE_DOTMAC_REQ_QUEUED = -2147408796; +const int CSSMERR_APPLETP_OCSP_NOT_TRUSTED1 = -2147408859; -const int CSSMERR_APPLE_DOTMAC_REQ_REDIRECT = -2147408795; +const int CSSMERR_APPLETP_OCSP_INVALID_ANCHOR_CERT1 = -2147408858; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ERR = -2147408794; +const int CSSMERR_APPLETP_OCSP_SIG_ERROR1 = -2147408857; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_PARAM = -2147408793; +const int CSSMERR_APPLETP_OCSP_NO_SIGNER1 = -2147408856; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_AUTH = -2147408792; +const int CSSMERR_APPLETP_OCSP_RESP_MALFORMED_REQ1 = -2147408855; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_UNIMPL = -2147408791; +const int CSSMERR_APPLETP_OCSP_RESP_INTERNAL_ERR1 = -2147408854; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_NOT_AVAIL = -2147408790; +const int CSSMERR_APPLETP_OCSP_RESP_TRY_LATER1 = -2147408853; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ALREADY_EXIST = -2147408789; +const int CSSMERR_APPLETP_OCSP_RESP_SIG_REQUIRED1 = -2147408852; -const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_SERVICE_ERROR = -2147408788; +const int CSSMERR_APPLETP_OCSP_RESP_UNAUTHORIZED1 = -2147408851; -const int CSSMERR_APPLE_DOTMAC_REQ_IS_PENDING = -2147408787; +const int CSSMERR_APPLETP_OCSP_NONCE_MISMATCH1 = -2147408850; -const int CSSMERR_APPLE_DOTMAC_NO_REQ_PENDING = -2147408786; +const int CSSMERR_APPLETP_CS_BAD_CERT_CHAIN_LENGTH1 = -2147408849; -const int CSSMERR_APPLE_DOTMAC_CSR_VERIFY_FAIL = -2147408785; +const int CSSMERR_APPLETP_CS_NO_BASIC_CONSTRAINTS1 = -2147408848; -const int CSSMERR_APPLE_DOTMAC_FAILED_CONSISTENCY_CHECK = -2147408784; +const int CSSMERR_APPLETP_CS_BAD_PATH_LENGTH1 = -2147408847; -const int CSSM_APPLEDL_OPEN_PARAMETERS_VERSION = 1; +const int CSSMERR_APPLETP_CS_NO_EXTENDED_KEY_USAGE1 = -2147408846; -const int CSSM_APPLECSPDL_DB_LOCK = 0; +const int CSSMERR_APPLETP_CODE_SIGN_DEVELOPMENT1 = -2147408845; -const int CSSM_APPLECSPDL_DB_UNLOCK = 1; +const int CSSMERR_APPLETP_RS_BAD_CERT_CHAIN_LENGTH1 = -2147408844; -const int CSSM_APPLECSPDL_DB_GET_SETTINGS = 2; +const int CSSMERR_APPLETP_RS_BAD_EXTENDED_KEY_USAGE1 = -2147408843; -const int CSSM_APPLECSPDL_DB_SET_SETTINGS = 3; +const int CSSMERR_APPLETP_TRUST_SETTING_DENY1 = -2147408842; -const int CSSM_APPLECSPDL_DB_IS_LOCKED = 4; +const int CSSMERR_APPLETP_INVALID_EMPTY_SUBJECT1 = -2147408841; -const int CSSM_APPLECSPDL_DB_CHANGE_PASSWORD = 5; +const int CSSMERR_APPLETP_UNKNOWN_QUAL_CERT_STATEMENT1 = -2147408840; -const int CSSM_APPLECSPDL_DB_GET_HANDLE = 6; +const int CSSMERR_APPLETP_MISSING_REQUIRED_EXTENSION1 = -2147408839; -const int CSSM_APPLESCPDL_CSP_GET_KEYHANDLE = 7; +const int CSSMERR_APPLETP_EXT_KEYUSAGE_NOT_CRITICAL1 = -2147408838; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_8 = 8; +const int CSSMERR_APPLETP_IDENTIFIER_MISSING1 = -2147408837; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_9 = 9; +const int CSSMERR_APPLETP_CA_PIN_MISMATCH1 = -2147408836; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_10 = 10; +const int CSSMERR_APPLETP_LEAF_PIN_MISMATCH1 = -2147408835; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_11 = 11; +const int CSSMERR_APPLE_DOTMAC_REQ_QUEUED1 = -2147408796; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_12 = 12; +const int CSSMERR_APPLE_DOTMAC_REQ_REDIRECT1 = -2147408795; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_13 = 13; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ERR1 = -2147408794; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_14 = 14; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_PARAM1 = -2147408793; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_15 = 15; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_AUTH1 = -2147408792; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_16 = 16; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_UNIMPL1 = -2147408791; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_17 = 17; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_NOT_AVAIL1 = -2147408790; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_18 = 18; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_ALREADY_EXIST1 = -2147408789; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_19 = 19; +const int CSSMERR_APPLE_DOTMAC_REQ_SERVER_SERVICE_ERROR1 = -2147408788; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_20 = 20; +const int CSSMERR_APPLE_DOTMAC_REQ_IS_PENDING1 = -2147408787; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_21 = 21; +const int CSSMERR_APPLE_DOTMAC_NO_REQ_PENDING1 = -2147408786; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_22 = 22; +const int CSSMERR_APPLE_DOTMAC_CSR_VERIFY_FAIL1 = -2147408785; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_23 = 23; +const int CSSMERR_APPLE_DOTMAC_FAILED_CONSISTENCY_CHECK1 = -2147408784; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_24 = 24; +const int CSSM_APPLEDL_OPEN_PARAMETERS_VERSION1 = 1; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_25 = 25; +const int CSSM_APPLECSPDL_DB_LOCK1 = 0; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_26 = 26; +const int CSSM_APPLECSPDL_DB_UNLOCK1 = 1; -const int CSSM_APPLE_PRIVATE_CSPDL_CODE_27 = 27; +const int CSSM_APPLECSPDL_DB_GET_SETTINGS1 = 2; -const int CSSM_APPLECSP_KEYDIGEST = 256; +const int CSSM_APPLECSPDL_DB_SET_SETTINGS1 = 3; -const int CSSM_APPLECSP_PUBKEY = 257; +const int CSSM_APPLECSPDL_DB_IS_LOCKED1 = 4; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_APPLE_CUSTOM = 100; +const int CSSM_APPLECSPDL_DB_CHANGE_PASSWORD1 = 5; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSL = 101; +const int CSSM_APPLECSPDL_DB_GET_HANDLE1 = 6; -const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSH1 = 102; +const int CSSM_APPLESCPDL_CSP_GET_KEYHANDLE1 = 7; -const int CSSM_ATTRIBUTE_VENDOR_DEFINED = 8388608; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_81 = 8; -const int CSSM_ATTRIBUTE_PUBLIC_KEY = 1082130432; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_91 = 9; -const int CSSM_ATTRIBUTE_FEE_PRIME_TYPE = 276824065; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_101 = 10; -const int CSSM_ATTRIBUTE_FEE_CURVE_TYPE = 276824066; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_111 = 11; -const int CSSM_ATTRIBUTE_ASC_OPTIMIZATION = 276824067; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_121 = 12; -const int CSSM_ATTRIBUTE_RSA_BLINDING = 276824068; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_131 = 13; -const int CSSM_ATTRIBUTE_PARAM_KEY = 1082130437; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_141 = 14; -const int CSSM_ATTRIBUTE_PROMPT = 545259526; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_151 = 15; -const int CSSM_ATTRIBUTE_ALERT_TITLE = 545259527; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_161 = 16; -const int CSSM_ATTRIBUTE_VERIFY_PASSPHRASE = 276824072; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_171 = 17; -const int CSSM_FEE_PRIME_TYPE_DEFAULT = 0; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_181 = 18; -const int CSSM_FEE_PRIME_TYPE_MERSENNE = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_191 = 19; -const int CSSM_FEE_PRIME_TYPE_FEE = 2; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_201 = 20; -const int CSSM_FEE_PRIME_TYPE_GENERAL = 3; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_211 = 21; -const int CSSM_FEE_CURVE_TYPE_DEFAULT = 0; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_221 = 22; -const int CSSM_FEE_CURVE_TYPE_MONTGOMERY = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_231 = 23; -const int CSSM_FEE_CURVE_TYPE_WEIERSTRASS = 2; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_241 = 24; -const int CSSM_FEE_CURVE_TYPE_ANSI_X9_62 = 3; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_251 = 25; -const int CSSM_ASC_OPTIMIZE_DEFAULT = 0; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_261 = 26; -const int CSSM_ASC_OPTIMIZE_SIZE = 1; +const int CSSM_APPLE_PRIVATE_CSPDL_CODE_271 = 27; -const int CSSM_ASC_OPTIMIZE_SECURITY = 2; +const int CSSM_APPLECSP_KEYDIGEST1 = 256; -const int CSSM_ASC_OPTIMIZE_TIME = 3; +const int CSSM_APPLECSP_PUBKEY1 = 257; -const int CSSM_ASC_OPTIMIZE_TIME_SIZE = 4; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_APPLE_CUSTOM1 = 100; -const int CSSM_ASC_OPTIMIZE_ASCII = 5; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSL1 = 101; -const int CSSM_KEYATTR_PARTIAL = 65536; +const int CSSM_KEYBLOB_WRAPPED_FORMAT_OPENSSH11 = 102; -const int CSSM_KEYATTR_PUBLIC_KEY_ENCRYPT = 131072; +const int CSSM_ATTRIBUTE_VENDOR_DEFINED1 = 8388608; -const int CSSM_TP_ACTION_REQUIRE_CRL_PER_CERT = 1; +const int CSSM_ATTRIBUTE_PUBLIC_KEY1 = 1082130432; -const int CSSM_TP_ACTION_FETCH_CRL_FROM_NET = 2; +const int CSSM_ATTRIBUTE_FEE_PRIME_TYPE1 = 276824065; -const int CSSM_TP_ACTION_CRL_SUFFICIENT = 4; +const int CSSM_ATTRIBUTE_FEE_CURVE_TYPE1 = 276824066; -const int CSSM_TP_ACTION_REQUIRE_CRL_IF_PRESENT = 8; +const int CSSM_ATTRIBUTE_ASC_OPTIMIZATION1 = 276824067; -const int CSSM_TP_ACTION_ALLOW_EXPIRED = 1; +const int CSSM_ATTRIBUTE_RSA_BLINDING1 = 276824068; -const int CSSM_TP_ACTION_LEAF_IS_CA = 2; +const int CSSM_ATTRIBUTE_PARAM_KEY1 = 1082130437; -const int CSSM_TP_ACTION_FETCH_CERT_FROM_NET = 4; +const int CSSM_ATTRIBUTE_PROMPT1 = 545259526; -const int CSSM_TP_ACTION_ALLOW_EXPIRED_ROOT = 8; +const int CSSM_ATTRIBUTE_ALERT_TITLE1 = 545259527; -const int CSSM_TP_ACTION_REQUIRE_REV_PER_CERT = 16; +const int CSSM_ATTRIBUTE_VERIFY_PASSPHRASE1 = 276824072; -const int CSSM_TP_ACTION_TRUST_SETTINGS = 32; +const int CSSM_FEE_PRIME_TYPE_DEFAULT1 = 0; -const int CSSM_TP_ACTION_IMPLICIT_ANCHORS = 64; +const int CSSM_FEE_PRIME_TYPE_MERSENNE1 = 1; -const int CSSM_CERT_STATUS_EXPIRED = 1; +const int CSSM_FEE_PRIME_TYPE_FEE1 = 2; -const int CSSM_CERT_STATUS_NOT_VALID_YET = 2; +const int CSSM_FEE_PRIME_TYPE_GENERAL1 = 3; -const int CSSM_CERT_STATUS_IS_IN_INPUT_CERTS = 4; +const int CSSM_FEE_CURVE_TYPE_DEFAULT1 = 0; -const int CSSM_CERT_STATUS_IS_IN_ANCHORS = 8; +const int CSSM_FEE_CURVE_TYPE_MONTGOMERY1 = 1; -const int CSSM_CERT_STATUS_IS_ROOT = 16; +const int CSSM_FEE_CURVE_TYPE_WEIERSTRASS1 = 2; -const int CSSM_CERT_STATUS_IS_FROM_NET = 32; +const int CSSM_FEE_CURVE_TYPE_ANSI_X9_621 = 3; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_USER = 64; +const int CSSM_ASC_OPTIMIZE_DEFAULT1 = 0; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_ADMIN = 128; +const int CSSM_ASC_OPTIMIZE_SIZE1 = 1; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_SYSTEM = 256; +const int CSSM_ASC_OPTIMIZE_SECURITY1 = 2; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_TRUST = 512; +const int CSSM_ASC_OPTIMIZE_TIME1 = 3; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_DENY = 1024; +const int CSSM_ASC_OPTIMIZE_TIME_SIZE1 = 4; -const int CSSM_CERT_STATUS_TRUST_SETTINGS_IGNORED_ERROR = 2048; +const int CSSM_ASC_OPTIMIZE_ASCII1 = 5; -const int CSSM_EVIDENCE_FORM_APPLE_HEADER = -2147483648; +const int CSSM_KEYATTR_PARTIAL1 = 65536; -const int CSSM_EVIDENCE_FORM_APPLE_CERTGROUP = -2147483647; +const int CSSM_KEYATTR_PUBLIC_KEY_ENCRYPT1 = 131072; -const int CSSM_EVIDENCE_FORM_APPLE_CERT_INFO = -2147483646; +const int CSSM_TP_ACTION_REQUIRE_CRL_PER_CERT1 = 1; -const int CSSM_APPLEX509CL_OBTAIN_CSR = 0; +const int CSSM_TP_ACTION_FETCH_CRL_FROM_NET1 = 2; -const int CSSM_APPLEX509CL_VERIFY_CSR = 1; +const int CSSM_TP_ACTION_CRL_SUFFICIENT1 = 4; -const int kSecSubjectItemAttr = 1937072746; +const int CSSM_TP_ACTION_REQUIRE_CRL_IF_PRESENT1 = 8; -const int kSecIssuerItemAttr = 1769173877; +const int CSSM_TP_ACTION_ALLOW_EXPIRED1 = 1; -const int kSecSerialNumberItemAttr = 1936614002; +const int CSSM_TP_ACTION_LEAF_IS_CA1 = 2; -const int kSecPublicKeyHashItemAttr = 1752198009; +const int CSSM_TP_ACTION_FETCH_CERT_FROM_NET1 = 4; -const int kSecSubjectKeyIdentifierItemAttr = 1936419172; +const int CSSM_TP_ACTION_ALLOW_EXPIRED_ROOT1 = 8; -const int kSecCertTypeItemAttr = 1668577648; +const int CSSM_TP_ACTION_REQUIRE_REV_PER_CERT1 = 16; -const int kSecCertEncodingItemAttr = 1667591779; +const int CSSM_TP_ACTION_TRUST_SETTINGS1 = 32; -const int SSL_NULL_WITH_NULL_NULL = 0; +const int CSSM_TP_ACTION_IMPLICIT_ANCHORS1 = 64; -const int SSL_RSA_WITH_NULL_MD5 = 1; +const int CSSM_CERT_STATUS_EXPIRED1 = 1; -const int SSL_RSA_WITH_NULL_SHA = 2; +const int CSSM_CERT_STATUS_NOT_VALID_YET1 = 2; -const int SSL_RSA_EXPORT_WITH_RC4_40_MD5 = 3; +const int CSSM_CERT_STATUS_IS_IN_INPUT_CERTS1 = 4; -const int SSL_RSA_WITH_RC4_128_MD5 = 4; +const int CSSM_CERT_STATUS_IS_IN_ANCHORS1 = 8; -const int SSL_RSA_WITH_RC4_128_SHA = 5; +const int CSSM_CERT_STATUS_IS_ROOT1 = 16; -const int SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = 6; +const int CSSM_CERT_STATUS_IS_FROM_NET1 = 32; -const int SSL_RSA_WITH_IDEA_CBC_SHA = 7; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_USER1 = 64; -const int SSL_RSA_EXPORT_WITH_DES40_CBC_SHA = 8; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_ADMIN1 = 128; -const int SSL_RSA_WITH_DES_CBC_SHA = 9; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_FOUND_SYSTEM1 = 256; -const int SSL_RSA_WITH_3DES_EDE_CBC_SHA = 10; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_TRUST1 = 512; -const int SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = 11; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_DENY1 = 1024; -const int SSL_DH_DSS_WITH_DES_CBC_SHA = 12; +const int CSSM_CERT_STATUS_TRUST_SETTINGS_IGNORED_ERROR1 = 2048; -const int SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; +const int CSSM_EVIDENCE_FORM_APPLE_HEADER1 = -2147483648; -const int SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = 14; +const int CSSM_EVIDENCE_FORM_APPLE_CERTGROUP1 = -2147483647; -const int SSL_DH_RSA_WITH_DES_CBC_SHA = 15; +const int CSSM_EVIDENCE_FORM_APPLE_CERT_INFO1 = -2147483646; -const int SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; +const int CSSM_APPLEX509CL_OBTAIN_CSR1 = 0; -const int SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = 17; +const int CSSM_APPLEX509CL_VERIFY_CSR1 = 1; -const int SSL_DHE_DSS_WITH_DES_CBC_SHA = 18; +const int kSecSubjectItemAttr1 = 1937072746; -const int SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; +const int kSecIssuerItemAttr1 = 1769173877; -const int SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = 20; +const int kSecSerialNumberItemAttr1 = 1936614002; -const int SSL_DHE_RSA_WITH_DES_CBC_SHA = 21; +const int kSecPublicKeyHashItemAttr1 = 1752198009; -const int SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; +const int kSecSubjectKeyIdentifierItemAttr1 = 1936419172; -const int SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 = 23; +const int kSecCertTypeItemAttr1 = 1668577648; -const int SSL_DH_anon_WITH_RC4_128_MD5 = 24; +const int kSecCertEncodingItemAttr1 = 1667591779; -const int SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA = 25; +const int SSL_NULL_WITH_NULL_NULL1 = 0; -const int SSL_DH_anon_WITH_DES_CBC_SHA = 26; +const int SSL_RSA_WITH_NULL_MD51 = 1; -const int SSL_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; +const int SSL_RSA_WITH_NULL_SHA1 = 2; -const int SSL_FORTEZZA_DMS_WITH_NULL_SHA = 28; +const int SSL_RSA_EXPORT_WITH_RC4_40_MD51 = 3; -const int SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA = 29; +const int SSL_RSA_WITH_RC4_128_MD51 = 4; -const int TLS_RSA_WITH_AES_128_CBC_SHA = 47; +const int SSL_RSA_WITH_RC4_128_SHA1 = 5; -const int TLS_DH_DSS_WITH_AES_128_CBC_SHA = 48; +const int SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD51 = 6; -const int TLS_DH_RSA_WITH_AES_128_CBC_SHA = 49; +const int SSL_RSA_WITH_IDEA_CBC_SHA1 = 7; -const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA = 50; +const int SSL_RSA_EXPORT_WITH_DES40_CBC_SHA1 = 8; -const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA = 51; +const int SSL_RSA_WITH_DES_CBC_SHA1 = 9; -const int TLS_DH_anon_WITH_AES_128_CBC_SHA = 52; +const int SSL_RSA_WITH_3DES_EDE_CBC_SHA1 = 10; -const int TLS_RSA_WITH_AES_256_CBC_SHA = 53; +const int SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA1 = 11; -const int TLS_DH_DSS_WITH_AES_256_CBC_SHA = 54; +const int SSL_DH_DSS_WITH_DES_CBC_SHA1 = 12; -const int TLS_DH_RSA_WITH_AES_256_CBC_SHA = 55; +const int SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA1 = 13; -const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA = 56; +const int SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA1 = 14; -const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA = 57; +const int SSL_DH_RSA_WITH_DES_CBC_SHA1 = 15; -const int TLS_DH_anon_WITH_AES_256_CBC_SHA = 58; +const int SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA1 = 16; -const int TLS_ECDH_ECDSA_WITH_NULL_SHA = -16383; +const int SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA1 = 17; -const int TLS_ECDH_ECDSA_WITH_RC4_128_SHA = -16382; +const int SSL_DHE_DSS_WITH_DES_CBC_SHA1 = 18; -const int TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA = -16381; +const int SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA1 = 19; -const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA = -16380; +const int SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA1 = 20; -const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA = -16379; +const int SSL_DHE_RSA_WITH_DES_CBC_SHA1 = 21; -const int TLS_ECDHE_ECDSA_WITH_NULL_SHA = -16378; +const int SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA1 = 22; -const int TLS_ECDHE_ECDSA_WITH_RC4_128_SHA = -16377; +const int SSL_DH_anon_EXPORT_WITH_RC4_40_MD51 = 23; -const int TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA = -16376; +const int SSL_DH_anon_WITH_RC4_128_MD51 = 24; -const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA = -16375; +const int SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA1 = 25; -const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA = -16374; +const int SSL_DH_anon_WITH_DES_CBC_SHA1 = 26; -const int TLS_ECDH_RSA_WITH_NULL_SHA = -16373; +const int SSL_DH_anon_WITH_3DES_EDE_CBC_SHA1 = 27; -const int TLS_ECDH_RSA_WITH_RC4_128_SHA = -16372; +const int SSL_FORTEZZA_DMS_WITH_NULL_SHA1 = 28; -const int TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA = -16371; +const int SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA1 = 29; -const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA = -16370; +const int TLS_RSA_WITH_AES_128_CBC_SHA1 = 47; -const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA = -16369; +const int TLS_DH_DSS_WITH_AES_128_CBC_SHA1 = 48; -const int TLS_ECDHE_RSA_WITH_NULL_SHA = -16368; +const int TLS_DH_RSA_WITH_AES_128_CBC_SHA1 = 49; -const int TLS_ECDHE_RSA_WITH_RC4_128_SHA = -16367; +const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA1 = 50; -const int TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA = -16366; +const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA1 = 51; -const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA = -16365; +const int TLS_DH_anon_WITH_AES_128_CBC_SHA1 = 52; -const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA = -16364; +const int TLS_RSA_WITH_AES_256_CBC_SHA1 = 53; -const int TLS_ECDH_anon_WITH_NULL_SHA = -16363; +const int TLS_DH_DSS_WITH_AES_256_CBC_SHA1 = 54; -const int TLS_ECDH_anon_WITH_RC4_128_SHA = -16362; +const int TLS_DH_RSA_WITH_AES_256_CBC_SHA1 = 55; -const int TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA = -16361; +const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA1 = 56; -const int TLS_ECDH_anon_WITH_AES_128_CBC_SHA = -16360; +const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA1 = 57; -const int TLS_ECDH_anon_WITH_AES_256_CBC_SHA = -16359; +const int TLS_DH_anon_WITH_AES_256_CBC_SHA1 = 58; -const int TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA = -16331; +const int TLS_ECDH_ECDSA_WITH_NULL_SHA1 = -16383; -const int TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA = -16330; +const int TLS_ECDH_ECDSA_WITH_RC4_128_SHA1 = -16382; -const int TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 = -13141; +const int TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA1 = -16381; -const int TLS_NULL_WITH_NULL_NULL = 0; +const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA1 = -16380; -const int TLS_RSA_WITH_NULL_MD5 = 1; +const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA1 = -16379; -const int TLS_RSA_WITH_NULL_SHA = 2; +const int TLS_ECDHE_ECDSA_WITH_NULL_SHA1 = -16378; -const int TLS_RSA_WITH_RC4_128_MD5 = 4; +const int TLS_ECDHE_ECDSA_WITH_RC4_128_SHA1 = -16377; -const int TLS_RSA_WITH_RC4_128_SHA = 5; +const int TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA1 = -16376; -const int TLS_RSA_WITH_3DES_EDE_CBC_SHA = 10; +const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA1 = -16375; -const int TLS_RSA_WITH_NULL_SHA256 = 59; +const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA1 = -16374; -const int TLS_RSA_WITH_AES_128_CBC_SHA256 = 60; +const int TLS_ECDH_RSA_WITH_NULL_SHA1 = -16373; -const int TLS_RSA_WITH_AES_256_CBC_SHA256 = 61; +const int TLS_ECDH_RSA_WITH_RC4_128_SHA1 = -16372; -const int TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = 13; +const int TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA1 = -16371; -const int TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = 16; +const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA1 = -16370; -const int TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = 19; +const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA1 = -16369; -const int TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = 22; +const int TLS_ECDHE_RSA_WITH_NULL_SHA1 = -16368; -const int TLS_DH_DSS_WITH_AES_128_CBC_SHA256 = 62; +const int TLS_ECDHE_RSA_WITH_RC4_128_SHA1 = -16367; -const int TLS_DH_RSA_WITH_AES_128_CBC_SHA256 = 63; +const int TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA1 = -16366; -const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 = 64; +const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA1 = -16365; -const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 = 103; +const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA1 = -16364; -const int TLS_DH_DSS_WITH_AES_256_CBC_SHA256 = 104; +const int TLS_ECDH_anon_WITH_NULL_SHA1 = -16363; -const int TLS_DH_RSA_WITH_AES_256_CBC_SHA256 = 105; +const int TLS_ECDH_anon_WITH_RC4_128_SHA1 = -16362; -const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 = 106; +const int TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA1 = -16361; -const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 = 107; +const int TLS_ECDH_anon_WITH_AES_128_CBC_SHA1 = -16360; -const int TLS_DH_anon_WITH_RC4_128_MD5 = 24; +const int TLS_ECDH_anon_WITH_AES_256_CBC_SHA1 = -16359; -const int TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = 27; +const int TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA1 = -16331; -const int TLS_DH_anon_WITH_AES_128_CBC_SHA256 = 108; +const int TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA1 = -16330; -const int TLS_DH_anon_WITH_AES_256_CBC_SHA256 = 109; +const int TLS_PSK_WITH_CHACHA20_POLY1305_SHA2561 = -13141; -const int TLS_PSK_WITH_RC4_128_SHA = 138; +const int TLS_NULL_WITH_NULL_NULL1 = 0; -const int TLS_PSK_WITH_3DES_EDE_CBC_SHA = 139; +const int TLS_RSA_WITH_NULL_MD51 = 1; -const int TLS_PSK_WITH_AES_128_CBC_SHA = 140; +const int TLS_RSA_WITH_NULL_SHA1 = 2; -const int TLS_PSK_WITH_AES_256_CBC_SHA = 141; +const int TLS_RSA_WITH_RC4_128_MD51 = 4; -const int TLS_DHE_PSK_WITH_RC4_128_SHA = 142; +const int TLS_RSA_WITH_RC4_128_SHA1 = 5; -const int TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA = 143; +const int TLS_RSA_WITH_3DES_EDE_CBC_SHA1 = 10; -const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA = 144; +const int TLS_RSA_WITH_NULL_SHA2561 = 59; -const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA = 145; +const int TLS_RSA_WITH_AES_128_CBC_SHA2561 = 60; -const int TLS_RSA_PSK_WITH_RC4_128_SHA = 146; +const int TLS_RSA_WITH_AES_256_CBC_SHA2561 = 61; -const int TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA = 147; +const int TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA1 = 13; -const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA = 148; +const int TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA1 = 16; -const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA = 149; +const int TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA1 = 19; -const int TLS_PSK_WITH_NULL_SHA = 44; +const int TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA1 = 22; -const int TLS_DHE_PSK_WITH_NULL_SHA = 45; +const int TLS_DH_DSS_WITH_AES_128_CBC_SHA2561 = 62; -const int TLS_RSA_PSK_WITH_NULL_SHA = 46; +const int TLS_DH_RSA_WITH_AES_128_CBC_SHA2561 = 63; -const int TLS_RSA_WITH_AES_128_GCM_SHA256 = 156; +const int TLS_DHE_DSS_WITH_AES_128_CBC_SHA2561 = 64; -const int TLS_RSA_WITH_AES_256_GCM_SHA384 = 157; +const int TLS_DHE_RSA_WITH_AES_128_CBC_SHA2561 = 103; -const int TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 = 158; +const int TLS_DH_DSS_WITH_AES_256_CBC_SHA2561 = 104; -const int TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 = 159; +const int TLS_DH_RSA_WITH_AES_256_CBC_SHA2561 = 105; -const int TLS_DH_RSA_WITH_AES_128_GCM_SHA256 = 160; +const int TLS_DHE_DSS_WITH_AES_256_CBC_SHA2561 = 106; -const int TLS_DH_RSA_WITH_AES_256_GCM_SHA384 = 161; +const int TLS_DHE_RSA_WITH_AES_256_CBC_SHA2561 = 107; -const int TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 = 162; +const int TLS_DH_anon_WITH_RC4_128_MD51 = 24; -const int TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 = 163; +const int TLS_DH_anon_WITH_3DES_EDE_CBC_SHA1 = 27; -const int TLS_DH_DSS_WITH_AES_128_GCM_SHA256 = 164; +const int TLS_DH_anon_WITH_AES_128_CBC_SHA2561 = 108; -const int TLS_DH_DSS_WITH_AES_256_GCM_SHA384 = 165; +const int TLS_DH_anon_WITH_AES_256_CBC_SHA2561 = 109; -const int TLS_DH_anon_WITH_AES_128_GCM_SHA256 = 166; +const int TLS_PSK_WITH_RC4_128_SHA1 = 138; -const int TLS_DH_anon_WITH_AES_256_GCM_SHA384 = 167; +const int TLS_PSK_WITH_3DES_EDE_CBC_SHA1 = 139; -const int TLS_PSK_WITH_AES_128_GCM_SHA256 = 168; +const int TLS_PSK_WITH_AES_128_CBC_SHA1 = 140; -const int TLS_PSK_WITH_AES_256_GCM_SHA384 = 169; +const int TLS_PSK_WITH_AES_256_CBC_SHA1 = 141; -const int TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 = 170; +const int TLS_DHE_PSK_WITH_RC4_128_SHA1 = 142; -const int TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 = 171; +const int TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA1 = 143; -const int TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 = 172; +const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA1 = 144; -const int TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 = 173; +const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA1 = 145; -const int TLS_PSK_WITH_AES_128_CBC_SHA256 = 174; +const int TLS_RSA_PSK_WITH_RC4_128_SHA1 = 146; -const int TLS_PSK_WITH_AES_256_CBC_SHA384 = 175; +const int TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA1 = 147; -const int TLS_PSK_WITH_NULL_SHA256 = 176; +const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA1 = 148; -const int TLS_PSK_WITH_NULL_SHA384 = 177; +const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA1 = 149; -const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 = 178; +const int TLS_PSK_WITH_NULL_SHA1 = 44; -const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 = 179; +const int TLS_DHE_PSK_WITH_NULL_SHA1 = 45; -const int TLS_DHE_PSK_WITH_NULL_SHA256 = 180; +const int TLS_RSA_PSK_WITH_NULL_SHA1 = 46; -const int TLS_DHE_PSK_WITH_NULL_SHA384 = 181; +const int TLS_RSA_WITH_AES_128_GCM_SHA2561 = 156; -const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 = 182; +const int TLS_RSA_WITH_AES_256_GCM_SHA3841 = 157; -const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 = 183; +const int TLS_DHE_RSA_WITH_AES_128_GCM_SHA2561 = 158; -const int TLS_RSA_PSK_WITH_NULL_SHA256 = 184; +const int TLS_DHE_RSA_WITH_AES_256_GCM_SHA3841 = 159; -const int TLS_RSA_PSK_WITH_NULL_SHA384 = 185; +const int TLS_DH_RSA_WITH_AES_128_GCM_SHA2561 = 160; -const int TLS_AES_128_GCM_SHA256 = 4865; +const int TLS_DH_RSA_WITH_AES_256_GCM_SHA3841 = 161; -const int TLS_AES_256_GCM_SHA384 = 4866; +const int TLS_DHE_DSS_WITH_AES_128_GCM_SHA2561 = 162; -const int TLS_CHACHA20_POLY1305_SHA256 = 4867; +const int TLS_DHE_DSS_WITH_AES_256_GCM_SHA3841 = 163; -const int TLS_AES_128_CCM_SHA256 = 4868; +const int TLS_DH_DSS_WITH_AES_128_GCM_SHA2561 = 164; -const int TLS_AES_128_CCM_8_SHA256 = 4869; +const int TLS_DH_DSS_WITH_AES_256_GCM_SHA3841 = 165; -const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 = -16349; +const int TLS_DH_anon_WITH_AES_128_GCM_SHA2561 = 166; -const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = -16348; +const int TLS_DH_anon_WITH_AES_256_GCM_SHA3841 = 167; -const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 = -16347; +const int TLS_PSK_WITH_AES_128_GCM_SHA2561 = 168; -const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 = -16346; +const int TLS_PSK_WITH_AES_256_GCM_SHA3841 = 169; -const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 = -16345; +const int TLS_DHE_PSK_WITH_AES_128_GCM_SHA2561 = 170; -const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 = -16344; +const int TLS_DHE_PSK_WITH_AES_256_GCM_SHA3841 = 171; -const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 = -16343; +const int TLS_RSA_PSK_WITH_AES_128_GCM_SHA2561 = 172; -const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 = -16342; +const int TLS_RSA_PSK_WITH_AES_256_GCM_SHA3841 = 173; -const int TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 = -16341; +const int TLS_PSK_WITH_AES_128_CBC_SHA2561 = 174; -const int TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 = -16340; +const int TLS_PSK_WITH_AES_256_CBC_SHA3841 = 175; -const int TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 = -16339; +const int TLS_PSK_WITH_NULL_SHA2561 = 176; -const int TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 = -16338; +const int TLS_PSK_WITH_NULL_SHA3841 = 177; -const int TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 = -16337; +const int TLS_DHE_PSK_WITH_AES_128_CBC_SHA2561 = 178; -const int TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 = -16336; +const int TLS_DHE_PSK_WITH_AES_256_CBC_SHA3841 = 179; -const int TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 = -16335; +const int TLS_DHE_PSK_WITH_NULL_SHA2561 = 180; -const int TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 = -16334; +const int TLS_DHE_PSK_WITH_NULL_SHA3841 = 181; -const int TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 = -13144; +const int TLS_RSA_PSK_WITH_AES_128_CBC_SHA2561 = 182; -const int TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 = -13143; +const int TLS_RSA_PSK_WITH_AES_256_CBC_SHA3841 = 183; -const int TLS_EMPTY_RENEGOTIATION_INFO_SCSV = 255; +const int TLS_RSA_PSK_WITH_NULL_SHA2561 = 184; -const int SSL_RSA_WITH_RC2_CBC_MD5 = -128; +const int TLS_RSA_PSK_WITH_NULL_SHA3841 = 185; -const int SSL_RSA_WITH_IDEA_CBC_MD5 = -127; +const int TLS_AES_128_GCM_SHA2561 = 4865; -const int SSL_RSA_WITH_DES_CBC_MD5 = -126; +const int TLS_AES_256_GCM_SHA3841 = 4866; -const int SSL_RSA_WITH_3DES_EDE_CBC_MD5 = -125; +const int TLS_CHACHA20_POLY1305_SHA2561 = 4867; -const int SSL_NO_SUCH_CIPHERSUITE = -1; +const int TLS_AES_128_CCM_SHA2561 = 4868; -const int NSASCIIStringEncoding = 1; +const int TLS_AES_128_CCM_8_SHA2561 = 4869; -const int NSNEXTSTEPStringEncoding = 2; +const int TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA2561 = -16349; -const int NSJapaneseEUCStringEncoding = 3; +const int TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA3841 = -16348; -const int NSUTF8StringEncoding = 4; +const int TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA2561 = -16347; -const int NSISOLatin1StringEncoding = 5; +const int TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA3841 = -16346; -const int NSSymbolStringEncoding = 6; +const int TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA2561 = -16345; -const int NSNonLossyASCIIStringEncoding = 7; +const int TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA3841 = -16344; -const int NSShiftJISStringEncoding = 8; +const int TLS_ECDH_RSA_WITH_AES_128_CBC_SHA2561 = -16343; -const int NSISOLatin2StringEncoding = 9; +const int TLS_ECDH_RSA_WITH_AES_256_CBC_SHA3841 = -16342; -const int NSUnicodeStringEncoding = 10; +const int TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA2561 = -16341; -const int NSWindowsCP1251StringEncoding = 11; +const int TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA3841 = -16340; -const int NSWindowsCP1252StringEncoding = 12; +const int TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA2561 = -16339; -const int NSWindowsCP1253StringEncoding = 13; +const int TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA3841 = -16338; -const int NSWindowsCP1254StringEncoding = 14; +const int TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA2561 = -16337; -const int NSWindowsCP1250StringEncoding = 15; +const int TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA3841 = -16336; -const int NSISO2022JPStringEncoding = 21; +const int TLS_ECDH_RSA_WITH_AES_128_GCM_SHA2561 = -16335; -const int NSMacOSRomanStringEncoding = 30; +const int TLS_ECDH_RSA_WITH_AES_256_GCM_SHA3841 = -16334; -const int NSUTF16StringEncoding = 10; +const int TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA2561 = -13144; -const int NSUTF16BigEndianStringEncoding = 2415919360; +const int TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA2561 = -13143; -const int NSUTF16LittleEndianStringEncoding = 2483028224; +const int TLS_EMPTY_RENEGOTIATION_INFO_SCSV1 = 255; -const int NSUTF32StringEncoding = 2348810496; +const int SSL_RSA_WITH_RC2_CBC_MD51 = -128; -const int NSUTF32BigEndianStringEncoding = 2550137088; +const int SSL_RSA_WITH_IDEA_CBC_MD51 = -127; -const int NSUTF32LittleEndianStringEncoding = 2617245952; +const int SSL_RSA_WITH_DES_CBC_MD51 = -126; -const int NSProprietaryStringEncoding = 65536; +const int SSL_RSA_WITH_3DES_EDE_CBC_MD51 = -125; -const int NSOpenStepUnicodeReservedBase = 62464; +const int SSL_NO_SUCH_CIPHERSUITE1 = -1; const int __API_TO_BE_DEPRECATED = 100000; diff --git a/pkgs/cupertino_http/pubspec.yaml b/pkgs/cupertino_http/pubspec.yaml index 0e53691da2..a463092423 100644 --- a/pkgs/cupertino_http/pubspec.yaml +++ b/pkgs/cupertino_http/pubspec.yaml @@ -1,5 +1,5 @@ name: cupertino_http -version: 2.0.1 +version: 2.0.2-wip description: >- A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. @@ -16,12 +16,12 @@ dependencies: sdk: flutter http: ^1.2.0 http_profile: ^0.1.0 - objective_c: ^3.0.0 + objective_c: ^4.0.0 web_socket: ^0.1.0 dev_dependencies: dart_flutter_team_lints: ^3.0.0 - ffigen: ^15.0.0 + ffigen: ^16.0.0 flutter: plugin: From 9226c602b40805d93e3c6d815f35be02f8da4e54 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Tue, 19 Nov 2024 14:29:11 -0800 Subject: [PATCH 446/448] Include names in argument lists (#1408) --- .../darwin/cupertino_http/Sources/cupertino_http/utils.h | 2 +- .../darwin/cupertino_http/Sources/cupertino_http/utils.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.h b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.h index 3dd8b2ae02..490b1d70b7 100644 --- a/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.h +++ b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.h @@ -7,7 +7,7 @@ #error "This file must be compiled with ARC enabled" #endif -typedef void (^_DidFinish)(void *, NSURLSession *session, +typedef void (^_DidFinish)(void *closure, NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location); typedef void (^_DidFinishWithLock)(NSCondition *lock, NSURLSession *session, diff --git a/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m index 4f17a3415e..bad263c96c 100644 --- a/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m +++ b/pkgs/cupertino_http/darwin/cupertino_http/Sources/cupertino_http/utils.m @@ -1,7 +1,7 @@ #import "utils.h" _DidFinish adaptFinishWithLock(_DidFinishWithLock block) { - return ^void(void *, NSURLSession *session, + return ^void(void *closure, NSURLSession *session, NSURLSessionDownloadTask *downloadTask, NSURL *location) { NSCondition *lock = [[NSCondition alloc] init]; [lock lock]; From e91be506b36f9a22ec27e4aa5dd13d460d05c07b Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 9 Dec 2024 11:09:09 -0800 Subject: [PATCH 447/448] Upgrade `ok_http` to `jnigen` 0.12.2 (#1405) --- pkgs/ok_http/CHANGELOG.md | 1 + pkgs/ok_http/jnigen.yaml | 71 - pkgs/ok_http/lib/src/jni/bindings.dart | 14448 +++++++++-------- pkgs/ok_http/lib/src/ok_http_client.dart | 12 +- pkgs/ok_http/lib/src/ok_http_web_socket.dart | 11 +- pkgs/ok_http/pubspec.yaml | 4 +- 6 files changed, 7845 insertions(+), 6702 deletions(-) diff --git a/pkgs/ok_http/CHANGELOG.md b/pkgs/ok_http/CHANGELOG.md index a6a2fd3f4e..baba046e98 100644 --- a/pkgs/ok_http/CHANGELOG.md +++ b/pkgs/ok_http/CHANGELOG.md @@ -2,6 +2,7 @@ - `OkHttpClient` now receives an `OkHttpClientConfiguration` to configure the client on a per-call basis. - `OkHttpClient` supports setting four types of timeouts: [`connectTimeout`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/-builder/connect-timeout.html), [`readTimeout`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/-builder/read-timeout.html), [`writeTimeout`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/-builder/write-timeout.html), and [`callTimeout`](https://square.github.io/okhttp/5.x/okhttp/okhttp3/-ok-http-client/-builder/call-timeout.html), using the `OkHttpClientConfiguration`. +- Update to `jnigen` 0.12.2 ## 0.1.0 diff --git a/pkgs/ok_http/jnigen.yaml b/pkgs/ok_http/jnigen.yaml index 2e7f87a45a..0ce3e1c414 100644 --- a/pkgs/ok_http/jnigen.yaml +++ b/pkgs/ok_http/jnigen.yaml @@ -12,9 +12,6 @@ android_sdk_config: add_gradle_deps: true android_example: "example/" -enable_experiment: - - "interface_implementation" - classes: - "okhttp3.Request" - "okhttp3.RequestBody" @@ -38,73 +35,5 @@ classes: - "com.example.ok_http.WebSocketInterceptor" - "java.util.concurrent.TimeUnit" -# Exclude the deprecated methods listed below -# They cause syntax errors during the `dart format` step of JNIGen. -exclude: - methods: - - "okhttp3.Request#-deprecated_url" - - "okhttp3.Request#-deprecated_method" - - "okhttp3.Request#-deprecated_headers" - - "okhttp3.Request#-deprecated_body" - - "okhttp3.Request#-deprecated_cacheControl" - - "okhttp3.Response#-deprecated_request" - - "okhttp3.Response#-deprecated_protocol" - - "okhttp3.Response#-deprecated_code" - - "okhttp3.Response#-deprecated_message" - - "okhttp3.Response#-deprecated_handshake" - - "okhttp3.Response#-deprecated_headers" - - "okhttp3.Response#-deprecated_body" - - "okhttp3.Response#-deprecated_networkResponse" - - "okhttp3.Response#-deprecated_priorResponse" - - "okhttp3.Response#-deprecated_cacheResponse" - - "okhttp3.Response#-deprecated_cacheControl" - - "okhttp3.Response#-deprecated_sentRequestAtMillis" - - "okhttp3.Response#-deprecated_receivedResponseAtMillis" - - "okhttp3.OkHttpClient#-deprecated_dispatcher" - - "okhttp3.OkHttpClient#-deprecated_connectionPool" - - "okhttp3.OkHttpClient#-deprecated_interceptors" - - "okhttp3.OkHttpClient#-deprecated_networkInterceptors" - - "okhttp3.OkHttpClient#-deprecated_eventListenerFactory" - - "okhttp3.OkHttpClient#-deprecated_retryOnConnectionFailure" - - "okhttp3.OkHttpClient#-deprecated_authenticator" - - "okhttp3.OkHttpClient#-deprecated_followRedirects" - - "okhttp3.OkHttpClient#-deprecated_followSslRedirects" - - "okhttp3.OkHttpClient#-deprecated_cookieJar" - - "okhttp3.OkHttpClient#-deprecated_cache" - - "okhttp3.OkHttpClient#-deprecated_dns" - - "okhttp3.OkHttpClient#-deprecated_proxy" - - "okhttp3.OkHttpClient#-deprecated_proxySelector" - - "okhttp3.OkHttpClient#-deprecated_proxyAuthenticator" - - "okhttp3.OkHttpClient#-deprecated_socketFactory" - - "okhttp3.OkHttpClient#-deprecated_sslSocketFactory" - - "okhttp3.OkHttpClient#-deprecated_connectionSpecs" - - "okhttp3.OkHttpClient#-deprecated_hostnameVerifier" - - "okhttp3.OkHttpClient#-deprecated_certificatePinner" - - "okhttp3.OkHttpClient#-deprecated_callTimeoutMillis" - - "okhttp3.OkHttpClient#-deprecated_connectTimeoutMillis" - - "okhttp3.OkHttpClient#-deprecated_readTimeoutMillis" - - "okhttp3.OkHttpClient#-deprecated_writeTimeoutMillis" - - "okhttp3.OkHttpClient#-deprecated_pingIntervalMillis" - - "okhttp3.OkHttpClient#-deprecated_protocols" - - 'okhttp3.OkHttpClient\$Builder#-addInterceptor' - - 'okhttp3.OkHttpClient\$Builder#-addNetworkInterceptor' - - 'okhttp3.Headers\$Companion#-deprecated_of' - - "okhttp3.Headers#-deprecated_size" - - "okhttp3.Dispatcher#-deprecated_executorService" - - "okhttp3.Cache#-deprecated_directory" - - "java.util.concurrent.ExecutorService#invokeAll" - - "java.util.concurrent.ExecutorService#invokeAny" - - "java.util.concurrent.ExecutorService#submit" - - "okio.ByteString$Companion#-deprecated_getByte" - - "okio.ByteString$Companion#-deprecated_size" - - 'okio.ByteString\$Companion#-deprecated_decodeBase64' - - 'okio.ByteString\$Companion#-deprecated_decodeHex' - - 'okio.ByteString\$Companion#-deprecated_encodeString' - - 'okio.ByteString\$Companion#-deprecated_encodeUtf8' - - 'okio.ByteString\$Companion#-deprecated_of' - - 'okio.ByteString\$Companion#-deprecated_read' - - "okio.ByteString#-deprecated_getByte" - - "okio.ByteString#-deprecated_size" - preamble: | // ignore_for_file: prefer_expression_function_bodies diff --git a/pkgs/ok_http/lib/src/jni/bindings.dart b/pkgs/ok_http/lib/src/jni/bindings.dart index 608384389a..833c40727a 100644 --- a/pkgs/ok_http/lib/src/jni/bindings.dart +++ b/pkgs/ok_http/lib/src/jni/bindings.dart @@ -9,12 +9,18 @@ // ignore_for_file: constant_identifier_names // ignore_for_file: doc_directive_unknown // ignore_for_file: file_names +// ignore_for_file: inference_failure_on_untyped_parameter +// ignore_for_file: invalid_internal_annotation +// ignore_for_file: invalid_use_of_internal_member +// ignore_for_file: library_prefixes // ignore_for_file: lines_longer_than_80_chars +// ignore_for_file: no_leading_underscores_for_library_prefixes // ignore_for_file: no_leading_underscores_for_local_identifiers // ignore_for_file: non_constant_identifier_names // ignore_for_file: only_throw_errors // ignore_for_file: overridden_fields // ignore_for_file: prefer_double_quotes +// ignore_for_file: unintended_html_in_doc_comment // ignore_for_file: unnecessary_cast // ignore_for_file: unnecessary_parenthesis // ignore_for_file: unused_element @@ -24,71 +30,74 @@ // ignore_for_file: unused_shown_name // ignore_for_file: use_super_parameters -import 'dart:ffi' as ffi; -import 'dart:isolate' show ReceivePort; +import 'dart:core' show Object, String, bool, double, int; +import 'dart:core' as _$core; -import 'package:jni/internal_helpers_for_jnigen.dart'; -import 'package:jni/jni.dart' as jni; +import 'package:jni/_internal.dart' as _$jni; +import 'package:jni/jni.dart' as _$jni; -/// from: okhttp3.Request$Builder -class Request_Builder extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Request$Builder` +class Request_Builder extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Request_Builder.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Request$Builder'); + static final _class = _$jni.JClass.forName(r'okhttp3/Request$Builder'); /// The type which includes information such as the signature of this class. - static const type = $Request_BuilderType(); - static final _id_new0 = _class.constructorId( + static const type = $Request_Builder$Type(); + static final _id_new$ = _class.constructorId( r'()V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void () + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. factory Request_Builder() { return Request_Builder.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) .reference); } - static final _id_new1 = _class.constructorId( + static final _id_new$1 = _class.constructorId( r'(Lokhttp3/Request;)V', ); - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (okhttp3.Request request) + /// from: `public void (okhttp3.Request request)` /// The returned object must be released after use, by calling the [release] method. - factory Request_Builder.new1( + factory Request_Builder.new$1( Request request, ) { - return Request_Builder.fromReference(_new1(_class.reference.pointer, - _id_new1 as jni.JMethodIDPtr, request.reference.pointer) + return Request_Builder.fromReference(_new$1(_class.reference.pointer, + _id_new$1 as _$jni.JMethodIDPtr, request.reference.pointer) .reference); } @@ -97,77 +106,77 @@ class Request_Builder extends jni.JObject { r'(Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder;', ); - static final _url = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _url = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder url(okhttp3.HttpUrl httpUrl) + /// from: `public okhttp3.Request$Builder url(okhttp3.HttpUrl httpUrl)` /// The returned object must be released after use, by calling the [release] method. Request_Builder url( - jni.JObject httpUrl, + _$jni.JObject httpUrl, ) { - return _url(reference.pointer, _id_url as jni.JMethodIDPtr, + return _url(reference.pointer, _id_url as _$jni.JMethodIDPtr, httpUrl.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } - static final _id_url1 = _class.instanceMethodId( + static final _id_url$1 = _class.instanceMethodId( r'url', r'(Ljava/lang/String;)Lokhttp3/Request$Builder;', ); - static final _url1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _url$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder url(java.lang.String string) + /// from: `public okhttp3.Request$Builder url(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - Request_Builder url1( - jni.JString string, + Request_Builder url$1( + _$jni.JString string, ) { - return _url1(reference.pointer, _id_url1 as jni.JMethodIDPtr, + return _url$1(reference.pointer, _id_url$1 as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } - static final _id_url2 = _class.instanceMethodId( + static final _id_url$2 = _class.instanceMethodId( r'url', r'(Ljava/net/URL;)Lokhttp3/Request$Builder;', ); - static final _url2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _url$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder url(java.net.URL uRL) + /// from: `public okhttp3.Request$Builder url(java.net.URL uRL)` /// The returned object must be released after use, by calling the [release] method. - Request_Builder url2( - jni.JObject uRL, + Request_Builder url$2( + _$jni.JObject uRL, ) { - return _url2(reference.pointer, _id_url2 as jni.JMethodIDPtr, + return _url$2(reference.pointer, _id_url$2 as _$jni.JMethodIDPtr, uRL.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } static final _id_header = _class.instanceMethodId( @@ -175,29 +184,32 @@ class Request_Builder extends jni.JObject { r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;', ); - static final _header = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _header = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder header(java.lang.String string, java.lang.String string1) + /// from: `public okhttp3.Request$Builder header(java.lang.String string, java.lang.String string1)` /// The returned object must be released after use, by calling the [release] method. Request_Builder header( - jni.JString string, - jni.JString string1, + _$jni.JString string, + _$jni.JString string1, ) { - return _header(reference.pointer, _id_header as jni.JMethodIDPtr, + return _header(reference.pointer, _id_header as _$jni.JMethodIDPtr, string.reference.pointer, string1.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } static final _id_addHeader = _class.instanceMethodId( @@ -205,29 +217,32 @@ class Request_Builder extends jni.JObject { r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;', ); - static final _addHeader = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _addHeader = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder addHeader(java.lang.String string, java.lang.String string1) + /// from: `public okhttp3.Request$Builder addHeader(java.lang.String string, java.lang.String string1)` /// The returned object must be released after use, by calling the [release] method. Request_Builder addHeader( - jni.JString string, - jni.JString string1, + _$jni.JString string, + _$jni.JString string1, ) { - return _addHeader(reference.pointer, _id_addHeader as jni.JMethodIDPtr, + return _addHeader(reference.pointer, _id_addHeader as _$jni.JMethodIDPtr, string.reference.pointer, string1.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } static final _id_removeHeader = _class.instanceMethodId( @@ -235,25 +250,25 @@ class Request_Builder extends jni.JObject { r'(Ljava/lang/String;)Lokhttp3/Request$Builder;', ); - static final _removeHeader = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _removeHeader = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder removeHeader(java.lang.String string) + /// from: `public okhttp3.Request$Builder removeHeader(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. Request_Builder removeHeader( - jni.JString string, + _$jni.JString string, ) { return _removeHeader(reference.pointer, - _id_removeHeader as jni.JMethodIDPtr, string.reference.pointer) - .object(const $Request_BuilderType()); + _id_removeHeader as _$jni.JMethodIDPtr, string.reference.pointer) + .object(const $Request_Builder$Type()); } static final _id_headers = _class.instanceMethodId( @@ -261,25 +276,25 @@ class Request_Builder extends jni.JObject { r'(Lokhttp3/Headers;)Lokhttp3/Request$Builder;', ); - static final _headers = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _headers = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder headers(okhttp3.Headers headers) + /// from: `public okhttp3.Request$Builder headers(okhttp3.Headers headers)` /// The returned object must be released after use, by calling the [release] method. Request_Builder headers( Headers headers, ) { - return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr, + return _headers(reference.pointer, _id_headers as _$jni.JMethodIDPtr, headers.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } static final _id_cacheControl = _class.instanceMethodId( @@ -287,51 +302,51 @@ class Request_Builder extends jni.JObject { r'(Lokhttp3/CacheControl;)Lokhttp3/Request$Builder;', ); - static final _cacheControl = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _cacheControl = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder cacheControl(okhttp3.CacheControl cacheControl) + /// from: `public okhttp3.Request$Builder cacheControl(okhttp3.CacheControl cacheControl)` /// The returned object must be released after use, by calling the [release] method. Request_Builder cacheControl( - jni.JObject cacheControl, + _$jni.JObject cacheControl, ) { return _cacheControl( reference.pointer, - _id_cacheControl as jni.JMethodIDPtr, + _id_cacheControl as _$jni.JMethodIDPtr, cacheControl.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } - static final _id_get0 = _class.instanceMethodId( + static final _id_get = _class.instanceMethodId( r'get', r'()Lokhttp3/Request$Builder;', ); - static final _get0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _get = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public okhttp3.Request$Builder get() + /// from: `public okhttp3.Request$Builder get()` /// The returned object must be released after use, by calling the [release] method. - Request_Builder get0() { - return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr) - .object(const $Request_BuilderType()); + Request_Builder get() { + return _get(reference.pointer, _id_get as _$jni.JMethodIDPtr) + .object(const $Request_Builder$Type()); } static final _id_head = _class.instanceMethodId( @@ -339,23 +354,23 @@ class Request_Builder extends jni.JObject { r'()Lokhttp3/Request$Builder;', ); - static final _head = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _head = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public okhttp3.Request$Builder head() + /// from: `public okhttp3.Request$Builder head()` /// The returned object must be released after use, by calling the [release] method. Request_Builder head() { - return _head(reference.pointer, _id_head as jni.JMethodIDPtr) - .object(const $Request_BuilderType()); + return _head(reference.pointer, _id_head as _$jni.JMethodIDPtr) + .object(const $Request_Builder$Type()); } static final _id_post = _class.instanceMethodId( @@ -363,25 +378,25 @@ class Request_Builder extends jni.JObject { r'(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); - static final _post = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _post = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder post(okhttp3.RequestBody requestBody) + /// from: `public okhttp3.Request$Builder post(okhttp3.RequestBody requestBody)` /// The returned object must be released after use, by calling the [release] method. Request_Builder post( RequestBody requestBody, ) { - return _post(reference.pointer, _id_post as jni.JMethodIDPtr, + return _post(reference.pointer, _id_post as _$jni.JMethodIDPtr, requestBody.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } static final _id_delete = _class.instanceMethodId( @@ -389,25 +404,25 @@ class Request_Builder extends jni.JObject { r'(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); - static final _delete = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _delete = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder delete(okhttp3.RequestBody requestBody) + /// from: `public okhttp3.Request$Builder delete(okhttp3.RequestBody requestBody)` /// The returned object must be released after use, by calling the [release] method. Request_Builder delete( RequestBody requestBody, ) { - return _delete(reference.pointer, _id_delete as jni.JMethodIDPtr, + return _delete(reference.pointer, _id_delete as _$jni.JMethodIDPtr, requestBody.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } static final _id_put = _class.instanceMethodId( @@ -415,25 +430,25 @@ class Request_Builder extends jni.JObject { r'(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); - static final _put = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _put = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder put(okhttp3.RequestBody requestBody) + /// from: `public okhttp3.Request$Builder put(okhttp3.RequestBody requestBody)` /// The returned object must be released after use, by calling the [release] method. Request_Builder put( RequestBody requestBody, ) { - return _put(reference.pointer, _id_put as jni.JMethodIDPtr, + return _put(reference.pointer, _id_put as _$jni.JMethodIDPtr, requestBody.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } static final _id_patch = _class.instanceMethodId( @@ -441,25 +456,25 @@ class Request_Builder extends jni.JObject { r'(Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); - static final _patch = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _patch = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder patch(okhttp3.RequestBody requestBody) + /// from: `public okhttp3.Request$Builder patch(okhttp3.RequestBody requestBody)` /// The returned object must be released after use, by calling the [release] method. Request_Builder patch( RequestBody requestBody, ) { - return _patch(reference.pointer, _id_patch as jni.JMethodIDPtr, + return _patch(reference.pointer, _id_patch as _$jni.JMethodIDPtr, requestBody.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } static final _id_method = _class.instanceMethodId( @@ -467,29 +482,32 @@ class Request_Builder extends jni.JObject { r'(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;', ); - static final _method = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _method = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder method(java.lang.String string, okhttp3.RequestBody requestBody) + /// from: `public okhttp3.Request$Builder method(java.lang.String string, okhttp3.RequestBody requestBody)` /// The returned object must be released after use, by calling the [release] method. Request_Builder method( - jni.JString string, + _$jni.JString string, RequestBody requestBody, ) { - return _method(reference.pointer, _id_method as jni.JMethodIDPtr, + return _method(reference.pointer, _id_method as _$jni.JMethodIDPtr, string.reference.pointer, requestBody.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } static final _id_tag = _class.instanceMethodId( @@ -497,59 +515,62 @@ class Request_Builder extends jni.JObject { r'(Ljava/lang/Object;)Lokhttp3/Request$Builder;', ); - static final _tag = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _tag = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder tag(java.lang.Object object) + /// from: `public okhttp3.Request$Builder tag(java.lang.Object object)` /// The returned object must be released after use, by calling the [release] method. Request_Builder tag( - jni.JObject object, + _$jni.JObject object, ) { - return _tag(reference.pointer, _id_tag as jni.JMethodIDPtr, + return _tag(reference.pointer, _id_tag as _$jni.JMethodIDPtr, object.reference.pointer) - .object(const $Request_BuilderType()); + .object(const $Request_Builder$Type()); } - static final _id_tag1 = _class.instanceMethodId( + static final _id_tag$1 = _class.instanceMethodId( r'tag', r'(Ljava/lang/Class;Ljava/lang/Object;)Lokhttp3/Request$Builder;', ); - static final _tag1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _tag$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Request$Builder tag(java.lang.Class class, T object) + /// from: `public okhttp3.Request$Builder tag(java.lang.Class class, T object)` /// The returned object must be released after use, by calling the [release] method. - Request_Builder tag1<$T extends jni.JObject>( - jni.JObject class0, + Request_Builder tag$1<$T extends _$jni.JObject>( + _$jni.JObject class$, $T object, { - jni.JObjType<$T>? T, + _$jni.JObjType<$T>? T, }) { - T ??= jni.lowestCommonSuperType([ + T ??= _$jni.lowestCommonSuperType([ object.$type, - ]) as jni.JObjType<$T>; - return _tag1(reference.pointer, _id_tag1 as jni.JMethodIDPtr, - class0.reference.pointer, object.reference.pointer) - .object(const $Request_BuilderType()); + ]) as _$jni.JObjType<$T>; + return _tag$1(reference.pointer, _id_tag$1 as _$jni.JMethodIDPtr, + class$.reference.pointer, object.reference.pointer) + .object(const $Request_Builder$Type()); } static final _id_build = _class.instanceMethodId( @@ -557,128 +578,136 @@ class Request_Builder extends jni.JObject { r'()Lokhttp3/Request;', ); - static final _build = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _build = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public okhttp3.Request build() + /// from: `public okhttp3.Request build()` /// The returned object must be released after use, by calling the [release] method. Request build() { - return _build(reference.pointer, _id_build as jni.JMethodIDPtr) - .object(const $RequestType()); + return _build(reference.pointer, _id_build as _$jni.JMethodIDPtr) + .object(const $Request$Type()); } - static final _id_delete1 = _class.instanceMethodId( + static final _id_delete$1 = _class.instanceMethodId( r'delete', r'()Lokhttp3/Request$Builder;', ); - static final _delete1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _delete$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Request$Builder delete() + /// from: `public final okhttp3.Request$Builder delete()` /// The returned object must be released after use, by calling the [release] method. - Request_Builder delete1() { - return _delete1(reference.pointer, _id_delete1 as jni.JMethodIDPtr) - .object(const $Request_BuilderType()); + Request_Builder delete$1() { + return _delete$1(reference.pointer, _id_delete$1 as _$jni.JMethodIDPtr) + .object(const $Request_Builder$Type()); } } -final class $Request_BuilderType extends jni.JObjType { - const $Request_BuilderType(); +final class $Request_Builder$Type extends _$jni.JObjType { + @_$jni.internal + const $Request_Builder$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Request$Builder;'; - @override - Request_Builder fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Request_Builder fromReference(_$jni.JReference reference) => Request_Builder.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($Request_BuilderType).hashCode; + @_$core.override + int get hashCode => ($Request_Builder$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($Request_BuilderType) && - other is $Request_BuilderType; + return other.runtimeType == ($Request_Builder$Type) && + other is $Request_Builder$Type; } } -/// from: okhttp3.Request -class Request extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Request` +class Request extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Request.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Request'); + static final _class = _$jni.JClass.forName(r'okhttp3/Request'); /// The type which includes information such as the signature of this class. - static const type = $RequestType(); - static final _id_new0 = _class.constructorId( + static const type = $Request$Type(); + static final _id_new$ = _class.constructorId( r'(Lokhttp3/HttpUrl;Ljava/lang/String;Lokhttp3/Headers;Lokhttp3/RequestBody;Ljava/util/Map;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (okhttp3.HttpUrl httpUrl, java.lang.String string, okhttp3.Headers headers, okhttp3.RequestBody requestBody, java.util.Map map) + /// from: `public void (okhttp3.HttpUrl httpUrl, java.lang.String string, okhttp3.Headers headers, okhttp3.RequestBody requestBody, java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. factory Request( - jni.JObject httpUrl, - jni.JString string, + _$jni.JObject httpUrl, + _$jni.JString string, Headers headers, RequestBody requestBody, - jni.JMap map, + _$jni.JMap<_$jni.JObject, _$jni.JObject> map, ) { - return Request.fromReference(_new0( + return Request.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, httpUrl.reference.pointer, string.reference.pointer, headers.reference.pointer, @@ -692,23 +721,23 @@ class Request extends jni.JObject { r'()Lokhttp3/HttpUrl;', ); - static final _url = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _url = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.HttpUrl url() + /// from: `public final okhttp3.HttpUrl url()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject url() { - return _url(reference.pointer, _id_url as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject url() { + return _url(reference.pointer, _id_url as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_method = _class.instanceMethodId( @@ -716,23 +745,23 @@ class Request extends jni.JObject { r'()Ljava/lang/String;', ); - static final _method = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _method = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.lang.String method() + /// from: `public final java.lang.String method()` /// The returned object must be released after use, by calling the [release] method. - jni.JString method() { - return _method(reference.pointer, _id_method as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString method() { + return _method(reference.pointer, _id_method as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_headers = _class.instanceMethodId( @@ -740,23 +769,23 @@ class Request extends jni.JObject { r'()Lokhttp3/Headers;', ); - static final _headers = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _headers = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Headers headers() + /// from: `public final okhttp3.Headers headers()` /// The returned object must be released after use, by calling the [release] method. Headers headers() { - return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr) - .object(const $HeadersType()); + return _headers(reference.pointer, _id_headers as _$jni.JMethodIDPtr) + .object(const $Headers$Type()); } static final _id_body = _class.instanceMethodId( @@ -764,23 +793,23 @@ class Request extends jni.JObject { r'()Lokhttp3/RequestBody;', ); - static final _body = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _body = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.RequestBody body() + /// from: `public final okhttp3.RequestBody body()` /// The returned object must be released after use, by calling the [release] method. RequestBody body() { - return _body(reference.pointer, _id_body as jni.JMethodIDPtr) - .object(const $RequestBodyType()); + return _body(reference.pointer, _id_body as _$jni.JMethodIDPtr) + .object(const $RequestBody$Type()); } static final _id_isHttps = _class.instanceMethodId( @@ -788,21 +817,22 @@ class Request extends jni.JObject { r'()Z', ); - static final _isHttps = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _isHttps = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final boolean isHttps() + /// from: `public final boolean isHttps()` bool isHttps() { - return _isHttps(reference.pointer, _id_isHttps as jni.JMethodIDPtr).boolean; + return _isHttps(reference.pointer, _id_isHttps as _$jni.JMethodIDPtr) + .boolean; } static final _id_header = _class.instanceMethodId( @@ -810,51 +840,51 @@ class Request extends jni.JObject { r'(Ljava/lang/String;)Ljava/lang/String;', ); - static final _header = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _header = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final java.lang.String header(java.lang.String string) + /// from: `public final java.lang.String header(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - jni.JString header( - jni.JString string, + _$jni.JString header( + _$jni.JString string, ) { - return _header(reference.pointer, _id_header as jni.JMethodIDPtr, + return _header(reference.pointer, _id_header as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const jni.JStringType()); + .object(const _$jni.JStringType()); } - static final _id_headers1 = _class.instanceMethodId( + static final _id_headers$1 = _class.instanceMethodId( r'headers', r'(Ljava/lang/String;)Ljava/util/List;', ); - static final _headers1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _headers$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final java.util.List headers(java.lang.String string) + /// from: `public final java.util.List headers(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - jni.JList headers1( - jni.JString string, + _$jni.JList<_$jni.JString> headers$1( + _$jni.JString string, ) { - return _headers1(reference.pointer, _id_headers1 as jni.JMethodIDPtr, + return _headers$1(reference.pointer, _id_headers$1 as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const jni.JListType(jni.JStringType())); + .object(const _$jni.JListType(_$jni.JStringType())); } static final _id_tag = _class.instanceMethodId( @@ -862,49 +892,49 @@ class Request extends jni.JObject { r'()Ljava/lang/Object;', ); - static final _tag = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _tag = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.lang.Object tag() + /// from: `public final java.lang.Object tag()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject tag() { - return _tag(reference.pointer, _id_tag as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject tag() { + return _tag(reference.pointer, _id_tag as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } - static final _id_tag1 = _class.instanceMethodId( + static final _id_tag$1 = _class.instanceMethodId( r'tag', r'(Ljava/lang/Class;)Ljava/lang/Object;', ); - static final _tag1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _tag$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final T tag(java.lang.Class class) + /// from: `public final T tag(java.lang.Class class)` /// The returned object must be released after use, by calling the [release] method. - $T tag1<$T extends jni.JObject>( - jni.JObject class0, { - required jni.JObjType<$T> T, + $T tag$1<$T extends _$jni.JObject>( + _$jni.JObject class$, { + required _$jni.JObjType<$T> T, }) { - return _tag1(reference.pointer, _id_tag1 as jni.JMethodIDPtr, - class0.reference.pointer) + return _tag$1(reference.pointer, _id_tag$1 as _$jni.JMethodIDPtr, + class$.reference.pointer) .object(T); } @@ -913,23 +943,23 @@ class Request extends jni.JObject { r'()Lokhttp3/Request$Builder;', ); - static final _newBuilder = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _newBuilder = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Request$Builder newBuilder() + /// from: `public final okhttp3.Request$Builder newBuilder()` /// The returned object must be released after use, by calling the [release] method. Request_Builder newBuilder() { - return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) - .object(const $Request_BuilderType()); + return _newBuilder(reference.pointer, _id_newBuilder as _$jni.JMethodIDPtr) + .object(const $Request_Builder$Type()); } static final _id_cacheControl = _class.instanceMethodId( @@ -937,611 +967,646 @@ class Request extends jni.JObject { r'()Lokhttp3/CacheControl;', ); - static final _cacheControl = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _cacheControl = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.CacheControl cacheControl() + /// from: `public final okhttp3.CacheControl cacheControl()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject cacheControl() { + _$jni.JObject cacheControl() { return _cacheControl( - reference.pointer, _id_cacheControl as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_cacheControl as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } - static final _id_toString1 = _class.instanceMethodId( + static final _id_toString$1 = _class.instanceMethodId( r'toString', r'()Ljava/lang/String;', ); - static final _toString1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _toString$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String toString() + /// from: `public java.lang.String toString()` /// The returned object must be released after use, by calling the [release] method. - jni.JString toString1() { - return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString toString$1() { + return _toString$1(reference.pointer, _id_toString$1 as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } } -final class $RequestType extends jni.JObjType { - const $RequestType(); +final class $Request$Type extends _$jni.JObjType { + @_$jni.internal + const $Request$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Request;'; - @override - Request fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Request fromReference(_$jni.JReference reference) => Request.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($RequestType).hashCode; + @_$core.override + int get hashCode => ($Request$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($RequestType) && other is $RequestType; + return other.runtimeType == ($Request$Type) && other is $Request$Type; } } -/// from: okhttp3.RequestBody$Companion -class RequestBody_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.RequestBody$Companion` +class RequestBody_Companion extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal RequestBody_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/RequestBody$Companion'); + static final _class = _$jni.JClass.forName(r'okhttp3/RequestBody$Companion'); /// The type which includes information such as the signature of this class. - static const type = $RequestBody_CompanionType(); + static const type = $RequestBody_Companion$Type(); static final _id_create = _class.instanceMethodId( r'create', r'(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); - static final _create = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.RequestBody create(java.lang.String string, okhttp3.MediaType mediaType) + /// from: `public final okhttp3.RequestBody create(java.lang.String string, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. RequestBody create( - jni.JString string, - jni.JObject mediaType, + _$jni.JString string, + _$jni.JObject mediaType, ) { - return _create(reference.pointer, _id_create as jni.JMethodIDPtr, + return _create(reference.pointer, _id_create as _$jni.JMethodIDPtr, string.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create1 = _class.instanceMethodId( + static final _id_create$1 = _class.instanceMethodId( r'create', r'(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); - static final _create1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) + /// from: `public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. - RequestBody create1( + RequestBody create$1( ByteString byteString, - jni.JObject mediaType, + _$jni.JObject mediaType, ) { - return _create1(reference.pointer, _id_create1 as jni.JMethodIDPtr, + return _create$1(reference.pointer, _id_create$1 as _$jni.JMethodIDPtr, byteString.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create2 = _class.instanceMethodId( + static final _id_create$2 = _class.instanceMethodId( r'create', r'([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;', ); - static final _create2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - $Int32, - $Int32 + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32 )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + int, + int)>(); - /// from: public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i, int i1) + /// from: `public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i, int i1)` /// The returned object must be released after use, by calling the [release] method. - RequestBody create2( - jni.JArray bs, - jni.JObject mediaType, + RequestBody create$2( + _$jni.JArray<_$jni.jbyte> bs, + _$jni.JObject mediaType, int i, int i1, ) { - return _create2(reference.pointer, _id_create2 as jni.JMethodIDPtr, + return _create$2(reference.pointer, _id_create$2 as _$jni.JMethodIDPtr, bs.reference.pointer, mediaType.reference.pointer, i, i1) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create3 = _class.instanceMethodId( + static final _id_create$3 = _class.instanceMethodId( r'create', r'(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); - static final _create3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.RequestBody create(java.io.File file, okhttp3.MediaType mediaType) + /// from: `public final okhttp3.RequestBody create(java.io.File file, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. - RequestBody create3( - jni.JObject file, - jni.JObject mediaType, + RequestBody create$3( + _$jni.JObject file, + _$jni.JObject mediaType, ) { - return _create3(reference.pointer, _id_create3 as jni.JMethodIDPtr, + return _create$3(reference.pointer, _id_create$3 as _$jni.JMethodIDPtr, file.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create4 = _class.instanceMethodId( + static final _id_create$4 = _class.instanceMethodId( r'create', r'(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;', ); - static final _create4 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$4 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.lang.String string) + /// from: `public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - RequestBody create4( - jni.JObject mediaType, - jni.JString string, + RequestBody create$4( + _$jni.JObject mediaType, + _$jni.JString string, ) { - return _create4(reference.pointer, _id_create4 as jni.JMethodIDPtr, + return _create$4(reference.pointer, _id_create$4 as _$jni.JMethodIDPtr, mediaType.reference.pointer, string.reference.pointer) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create5 = _class.instanceMethodId( + static final _id_create$5 = _class.instanceMethodId( r'create', r'(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;', ); - static final _create5 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$5 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) + /// from: `public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, okio.ByteString byteString)` /// The returned object must be released after use, by calling the [release] method. - RequestBody create5( - jni.JObject mediaType, + RequestBody create$5( + _$jni.JObject mediaType, ByteString byteString, ) { - return _create5(reference.pointer, _id_create5 as jni.JMethodIDPtr, + return _create$5(reference.pointer, _id_create$5 as _$jni.JMethodIDPtr, mediaType.reference.pointer, byteString.reference.pointer) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create6 = _class.instanceMethodId( + static final _id_create$6 = _class.instanceMethodId( r'create', r'(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;', ); - static final _create6 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$6 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - $Int32, - $Int32 + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32 )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + int, + int)>(); - /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i, int i1) + /// from: `public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i, int i1)` /// The returned object must be released after use, by calling the [release] method. - RequestBody create6( - jni.JObject mediaType, - jni.JArray bs, + RequestBody create$6( + _$jni.JObject mediaType, + _$jni.JArray<_$jni.jbyte> bs, int i, int i1, ) { - return _create6(reference.pointer, _id_create6 as jni.JMethodIDPtr, + return _create$6(reference.pointer, _id_create$6 as _$jni.JMethodIDPtr, mediaType.reference.pointer, bs.reference.pointer, i, i1) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create7 = _class.instanceMethodId( + static final _id_create$7 = _class.instanceMethodId( r'create', r'(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;', ); - static final _create7 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$7 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.io.File file) + /// from: `public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.io.File file)` /// The returned object must be released after use, by calling the [release] method. - RequestBody create7( - jni.JObject mediaType, - jni.JObject file, + RequestBody create$7( + _$jni.JObject mediaType, + _$jni.JObject file, ) { - return _create7(reference.pointer, _id_create7 as jni.JMethodIDPtr, + return _create$7(reference.pointer, _id_create$7 as _$jni.JMethodIDPtr, mediaType.reference.pointer, file.reference.pointer) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create8 = _class.instanceMethodId( + static final _id_create$8 = _class.instanceMethodId( r'create', r'([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;', ); - static final _create8 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$8 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - $Int32 + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32 )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + int)>(); - /// from: public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i) + /// from: `public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i)` /// The returned object must be released after use, by calling the [release] method. - RequestBody create8( - jni.JArray bs, - jni.JObject mediaType, + RequestBody create$8( + _$jni.JArray<_$jni.jbyte> bs, + _$jni.JObject mediaType, int i, ) { - return _create8(reference.pointer, _id_create8 as jni.JMethodIDPtr, + return _create$8(reference.pointer, _id_create$8 as _$jni.JMethodIDPtr, bs.reference.pointer, mediaType.reference.pointer, i) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create9 = _class.instanceMethodId( + static final _id_create$9 = _class.instanceMethodId( r'create', r'([BLokhttp3/MediaType;)Lokhttp3/RequestBody;', ); - static final _create9 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$9 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType) + /// from: `public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. - RequestBody create9( - jni.JArray bs, - jni.JObject mediaType, + RequestBody create$9( + _$jni.JArray<_$jni.jbyte> bs, + _$jni.JObject mediaType, ) { - return _create9(reference.pointer, _id_create9 as jni.JMethodIDPtr, + return _create$9(reference.pointer, _id_create$9 as _$jni.JMethodIDPtr, bs.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create10 = _class.instanceMethodId( + static final _id_create$10 = _class.instanceMethodId( r'create', r'([B)Lokhttp3/RequestBody;', ); - static final _create10 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _create$10 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.RequestBody create(byte[] bs) + /// from: `public final okhttp3.RequestBody create(byte[] bs)` /// The returned object must be released after use, by calling the [release] method. - RequestBody create10( - jni.JArray bs, + RequestBody create$10( + _$jni.JArray<_$jni.jbyte> bs, ) { - return _create10(reference.pointer, _id_create10 as jni.JMethodIDPtr, + return _create$10(reference.pointer, _id_create$10 as _$jni.JMethodIDPtr, bs.reference.pointer) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create11 = _class.instanceMethodId( + static final _id_create$11 = _class.instanceMethodId( r'create', r'(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;', ); - static final _create11 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$11 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - $Int32 + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32 )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + int)>(); - /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i) + /// from: `public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i)` /// The returned object must be released after use, by calling the [release] method. - RequestBody create11( - jni.JObject mediaType, - jni.JArray bs, + RequestBody create$11( + _$jni.JObject mediaType, + _$jni.JArray<_$jni.jbyte> bs, int i, ) { - return _create11(reference.pointer, _id_create11 as jni.JMethodIDPtr, + return _create$11(reference.pointer, _id_create$11 as _$jni.JMethodIDPtr, mediaType.reference.pointer, bs.reference.pointer, i) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create12 = _class.instanceMethodId( + static final _id_create$12 = _class.instanceMethodId( r'create', r'(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;', ); - static final _create12 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$12 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs) + /// from: `public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs)` /// The returned object must be released after use, by calling the [release] method. - RequestBody create12( - jni.JObject mediaType, - jni.JArray bs, + RequestBody create$12( + _$jni.JObject mediaType, + _$jni.JArray<_$jni.jbyte> bs, ) { - return _create12(reference.pointer, _id_create12 as jni.JMethodIDPtr, + return _create$12(reference.pointer, _id_create$12 as _$jni.JMethodIDPtr, mediaType.reference.pointer, bs.reference.pointer) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` /// The returned object must be released after use, by calling the [release] method. factory RequestBody_Companion( - jni.JObject defaultConstructorMarker, + _$jni.JObject defaultConstructorMarker, ) { - return RequestBody_Companion.fromReference(_new0( + return RequestBody_Companion.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, defaultConstructorMarker.reference.pointer) .reference); } } -final class $RequestBody_CompanionType - extends jni.JObjType { - const $RequestBody_CompanionType(); +final class $RequestBody_Companion$Type + extends _$jni.JObjType { + @_$jni.internal + const $RequestBody_Companion$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/RequestBody$Companion;'; - @override - RequestBody_Companion fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + RequestBody_Companion fromReference(_$jni.JReference reference) => RequestBody_Companion.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($RequestBody_CompanionType).hashCode; + @_$core.override + int get hashCode => ($RequestBody_Companion$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($RequestBody_CompanionType) && - other is $RequestBody_CompanionType; + return other.runtimeType == ($RequestBody_Companion$Type) && + other is $RequestBody_Companion$Type; } } -/// from: okhttp3.RequestBody -class RequestBody extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.RequestBody` +class RequestBody extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal RequestBody.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/RequestBody'); + static final _class = _$jni.JClass.forName(r'okhttp3/RequestBody'); /// The type which includes information such as the signature of this class. - static const type = $RequestBodyType(); + static const type = $RequestBody$Type(); static final _id_Companion = _class.staticFieldId( r'Companion', r'Lokhttp3/RequestBody$Companion;', ); - /// from: static public final okhttp3.RequestBody$Companion Companion + /// from: `static public final okhttp3.RequestBody$Companion Companion` /// The returned object must be released after use, by calling the [release] method. static RequestBody_Companion get Companion => - _id_Companion.get(_class, const $RequestBody_CompanionType()); - - static final _id_new0 = _class.constructorId( - r'()V', - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>('globalEnv_NewObject') - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory RequestBody() { - return RequestBody.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } + _id_Companion.get(_class, const $RequestBody_Companion$Type()); static final _id_contentType = _class.instanceMethodId( r'contentType', r'()Lokhttp3/MediaType;', ); - static final _contentType = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _contentType = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract okhttp3.MediaType contentType() + /// from: `public abstract okhttp3.MediaType contentType()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject contentType() { - return _contentType(reference.pointer, _id_contentType as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject contentType() { + return _contentType( + reference.pointer, _id_contentType as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_contentLength = _class.instanceMethodId( @@ -1549,22 +1614,22 @@ class RequestBody extends jni.JObject { r'()J', ); - static final _contentLength = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _contentLength = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public long contentLength() + /// from: `public long contentLength()` int contentLength() { return _contentLength( - reference.pointer, _id_contentLength as jni.JMethodIDPtr) + reference.pointer, _id_contentLength as _$jni.JMethodIDPtr) .long; } @@ -1573,22 +1638,22 @@ class RequestBody extends jni.JObject { r'(Lokio/BufferedSink;)V', ); - static final _writeTo = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _writeTo = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void writeTo(okio.BufferedSink bufferedSink) + /// from: `public abstract void writeTo(okio.BufferedSink bufferedSink)` void writeTo( - jni.JObject bufferedSink, + _$jni.JObject bufferedSink, ) { - _writeTo(reference.pointer, _id_writeTo as jni.JMethodIDPtr, + _writeTo(reference.pointer, _id_writeTo as _$jni.JMethodIDPtr, bufferedSink.reference.pointer) .check(); } @@ -1598,21 +1663,21 @@ class RequestBody extends jni.JObject { r'()Z', ); - static final _isDuplex = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _isDuplex = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public boolean isDuplex() + /// from: `public boolean isDuplex()` bool isDuplex() { - return _isDuplex(reference.pointer, _id_isDuplex as jni.JMethodIDPtr) + return _isDuplex(reference.pointer, _id_isDuplex as _$jni.JMethodIDPtr) .boolean; } @@ -1621,21 +1686,21 @@ class RequestBody extends jni.JObject { r'()Z', ); - static final _isOneShot = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _isOneShot = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public boolean isOneShot() + /// from: `public boolean isOneShot()` bool isOneShot() { - return _isOneShot(reference.pointer, _id_isOneShot as jni.JMethodIDPtr) + return _isOneShot(reference.pointer, _id_isOneShot as _$jni.JMethodIDPtr) .boolean; } @@ -1644,484 +1709,574 @@ class RequestBody extends jni.JObject { r'(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); - static final _create = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.RequestBody create(java.lang.String string, okhttp3.MediaType mediaType) + /// from: `static public final okhttp3.RequestBody create(java.lang.String string, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. static RequestBody create( - jni.JString string, - jni.JObject mediaType, + _$jni.JString string, + _$jni.JObject mediaType, ) { - return _create(_class.reference.pointer, _id_create as jni.JMethodIDPtr, + return _create(_class.reference.pointer, _id_create as _$jni.JMethodIDPtr, string.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); + .object(const $RequestBody$Type()); } - static final _id_create1 = _class.staticMethodId( + static final _id_create$1 = _class.staticMethodId( r'create', r'(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); - static final _create1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) + /// from: `static public final okhttp3.RequestBody create(okio.ByteString byteString, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. - static RequestBody create1( + static RequestBody create$1( ByteString byteString, - jni.JObject mediaType, + _$jni.JObject mediaType, ) { - return _create1(_class.reference.pointer, _id_create1 as jni.JMethodIDPtr, - byteString.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); + return _create$1( + _class.reference.pointer, + _id_create$1 as _$jni.JMethodIDPtr, + byteString.reference.pointer, + mediaType.reference.pointer) + .object(const $RequestBody$Type()); } - static final _id_create2 = _class.staticMethodId( + static final _id_create$2 = _class.staticMethodId( r'create', r'([BLokhttp3/MediaType;II)Lokhttp3/RequestBody;', ); - static final _create2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - $Int32, - $Int32 + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32 )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + int, + int)>(); - /// from: static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i, int i1) + /// from: `static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i, int i1)` /// The returned object must be released after use, by calling the [release] method. - static RequestBody create2( - jni.JArray bs, - jni.JObject mediaType, + static RequestBody create$2( + _$jni.JArray<_$jni.jbyte> bs, + _$jni.JObject mediaType, int i, int i1, ) { - return _create2(_class.reference.pointer, _id_create2 as jni.JMethodIDPtr, - bs.reference.pointer, mediaType.reference.pointer, i, i1) - .object(const $RequestBodyType()); + return _create$2( + _class.reference.pointer, + _id_create$2 as _$jni.JMethodIDPtr, + bs.reference.pointer, + mediaType.reference.pointer, + i, + i1) + .object(const $RequestBody$Type()); } - static final _id_create3 = _class.staticMethodId( + static final _id_create$3 = _class.staticMethodId( r'create', r'(Ljava/io/File;Lokhttp3/MediaType;)Lokhttp3/RequestBody;', ); - static final _create3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.RequestBody create(java.io.File file, okhttp3.MediaType mediaType) + /// from: `static public final okhttp3.RequestBody create(java.io.File file, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. - static RequestBody create3( - jni.JObject file, - jni.JObject mediaType, + static RequestBody create$3( + _$jni.JObject file, + _$jni.JObject mediaType, ) { - return _create3(_class.reference.pointer, _id_create3 as jni.JMethodIDPtr, - file.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); + return _create$3( + _class.reference.pointer, + _id_create$3 as _$jni.JMethodIDPtr, + file.reference.pointer, + mediaType.reference.pointer) + .object(const $RequestBody$Type()); } - static final _id_create4 = _class.staticMethodId( + static final _id_create$4 = _class.staticMethodId( r'create', r'(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/RequestBody;', ); - static final _create4 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$4 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.lang.String string) + /// from: `static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - static RequestBody create4( - jni.JObject mediaType, - jni.JString string, + static RequestBody create$4( + _$jni.JObject mediaType, + _$jni.JString string, ) { - return _create4(_class.reference.pointer, _id_create4 as jni.JMethodIDPtr, - mediaType.reference.pointer, string.reference.pointer) - .object(const $RequestBodyType()); + return _create$4( + _class.reference.pointer, + _id_create$4 as _$jni.JMethodIDPtr, + mediaType.reference.pointer, + string.reference.pointer) + .object(const $RequestBody$Type()); } - static final _id_create5 = _class.staticMethodId( + static final _id_create$5 = _class.staticMethodId( r'create', r'(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/RequestBody;', ); - static final _create5 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$5 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) + /// from: `static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, okio.ByteString byteString)` /// The returned object must be released after use, by calling the [release] method. - static RequestBody create5( - jni.JObject mediaType, + static RequestBody create$5( + _$jni.JObject mediaType, ByteString byteString, ) { - return _create5(_class.reference.pointer, _id_create5 as jni.JMethodIDPtr, - mediaType.reference.pointer, byteString.reference.pointer) - .object(const $RequestBodyType()); + return _create$5( + _class.reference.pointer, + _id_create$5 as _$jni.JMethodIDPtr, + mediaType.reference.pointer, + byteString.reference.pointer) + .object(const $RequestBody$Type()); } - static final _id_create6 = _class.staticMethodId( + static final _id_create$6 = _class.staticMethodId( r'create', r'(Lokhttp3/MediaType;[BII)Lokhttp3/RequestBody;', ); - static final _create6 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$6 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - $Int32, - $Int32 + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32 )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + int, + int)>(); - /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i, int i1) + /// from: `static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i, int i1)` /// The returned object must be released after use, by calling the [release] method. - static RequestBody create6( - jni.JObject mediaType, - jni.JArray bs, + static RequestBody create$6( + _$jni.JObject mediaType, + _$jni.JArray<_$jni.jbyte> bs, int i, int i1, ) { - return _create6(_class.reference.pointer, _id_create6 as jni.JMethodIDPtr, - mediaType.reference.pointer, bs.reference.pointer, i, i1) - .object(const $RequestBodyType()); + return _create$6( + _class.reference.pointer, + _id_create$6 as _$jni.JMethodIDPtr, + mediaType.reference.pointer, + bs.reference.pointer, + i, + i1) + .object(const $RequestBody$Type()); } - static final _id_create7 = _class.staticMethodId( + static final _id_create$7 = _class.staticMethodId( r'create', r'(Lokhttp3/MediaType;Ljava/io/File;)Lokhttp3/RequestBody;', ); - static final _create7 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$7 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.io.File file) + /// from: `static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, java.io.File file)` /// The returned object must be released after use, by calling the [release] method. - static RequestBody create7( - jni.JObject mediaType, - jni.JObject file, + static RequestBody create$7( + _$jni.JObject mediaType, + _$jni.JObject file, ) { - return _create7(_class.reference.pointer, _id_create7 as jni.JMethodIDPtr, - mediaType.reference.pointer, file.reference.pointer) - .object(const $RequestBodyType()); + return _create$7( + _class.reference.pointer, + _id_create$7 as _$jni.JMethodIDPtr, + mediaType.reference.pointer, + file.reference.pointer) + .object(const $RequestBody$Type()); } - static final _id_create8 = _class.staticMethodId( + static final _id_create$8 = _class.staticMethodId( r'create', r'([BLokhttp3/MediaType;I)Lokhttp3/RequestBody;', ); - static final _create8 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$8 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - $Int32 + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32 )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + int)>(); - /// from: static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i) + /// from: `static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType, int i)` /// The returned object must be released after use, by calling the [release] method. - static RequestBody create8( - jni.JArray bs, - jni.JObject mediaType, + static RequestBody create$8( + _$jni.JArray<_$jni.jbyte> bs, + _$jni.JObject mediaType, int i, ) { - return _create8(_class.reference.pointer, _id_create8 as jni.JMethodIDPtr, - bs.reference.pointer, mediaType.reference.pointer, i) - .object(const $RequestBodyType()); + return _create$8( + _class.reference.pointer, + _id_create$8 as _$jni.JMethodIDPtr, + bs.reference.pointer, + mediaType.reference.pointer, + i) + .object(const $RequestBody$Type()); } - static final _id_create9 = _class.staticMethodId( + static final _id_create$9 = _class.staticMethodId( r'create', r'([BLokhttp3/MediaType;)Lokhttp3/RequestBody;', ); - static final _create9 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$9 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType) + /// from: `static public final okhttp3.RequestBody create(byte[] bs, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. - static RequestBody create9( - jni.JArray bs, - jni.JObject mediaType, + static RequestBody create$9( + _$jni.JArray<_$jni.jbyte> bs, + _$jni.JObject mediaType, ) { - return _create9(_class.reference.pointer, _id_create9 as jni.JMethodIDPtr, - bs.reference.pointer, mediaType.reference.pointer) - .object(const $RequestBodyType()); + return _create$9( + _class.reference.pointer, + _id_create$9 as _$jni.JMethodIDPtr, + bs.reference.pointer, + mediaType.reference.pointer) + .object(const $RequestBody$Type()); } - static final _id_create10 = _class.staticMethodId( + static final _id_create$10 = _class.staticMethodId( r'create', r'([B)Lokhttp3/RequestBody;', ); - static final _create10 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _create$10 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.RequestBody create(byte[] bs) + /// from: `static public final okhttp3.RequestBody create(byte[] bs)` /// The returned object must be released after use, by calling the [release] method. - static RequestBody create10( - jni.JArray bs, + static RequestBody create$10( + _$jni.JArray<_$jni.jbyte> bs, ) { - return _create10(_class.reference.pointer, _id_create10 as jni.JMethodIDPtr, - bs.reference.pointer) - .object(const $RequestBodyType()); + return _create$10(_class.reference.pointer, + _id_create$10 as _$jni.JMethodIDPtr, bs.reference.pointer) + .object(const $RequestBody$Type()); } - static final _id_create11 = _class.staticMethodId( + static final _id_create$11 = _class.staticMethodId( r'create', r'(Lokhttp3/MediaType;[BI)Lokhttp3/RequestBody;', ); - static final _create11 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$11 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - $Int32 + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32 )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + int)>(); - /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i) + /// from: `static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs, int i)` /// The returned object must be released after use, by calling the [release] method. - static RequestBody create11( - jni.JObject mediaType, - jni.JArray bs, + static RequestBody create$11( + _$jni.JObject mediaType, + _$jni.JArray<_$jni.jbyte> bs, int i, ) { - return _create11(_class.reference.pointer, _id_create11 as jni.JMethodIDPtr, - mediaType.reference.pointer, bs.reference.pointer, i) - .object(const $RequestBodyType()); + return _create$11( + _class.reference.pointer, + _id_create$11 as _$jni.JMethodIDPtr, + mediaType.reference.pointer, + bs.reference.pointer, + i) + .object(const $RequestBody$Type()); } - static final _id_create12 = _class.staticMethodId( + static final _id_create$12 = _class.staticMethodId( r'create', r'(Lokhttp3/MediaType;[B)Lokhttp3/RequestBody;', ); - static final _create12 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$12 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs) + /// from: `static public final okhttp3.RequestBody create(okhttp3.MediaType mediaType, byte[] bs)` /// The returned object must be released after use, by calling the [release] method. - static RequestBody create12( - jni.JObject mediaType, - jni.JArray bs, + static RequestBody create$12( + _$jni.JObject mediaType, + _$jni.JArray<_$jni.jbyte> bs, ) { - return _create12(_class.reference.pointer, _id_create12 as jni.JMethodIDPtr, - mediaType.reference.pointer, bs.reference.pointer) - .object(const $RequestBodyType()); + return _create$12( + _class.reference.pointer, + _id_create$12 as _$jni.JMethodIDPtr, + mediaType.reference.pointer, + bs.reference.pointer) + .object(const $RequestBody$Type()); } } -final class $RequestBodyType extends jni.JObjType { - const $RequestBodyType(); +final class $RequestBody$Type extends _$jni.JObjType { + @_$jni.internal + const $RequestBody$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/RequestBody;'; - @override - RequestBody fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + RequestBody fromReference(_$jni.JReference reference) => RequestBody.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($RequestBodyType).hashCode; + @_$core.override + int get hashCode => ($RequestBody$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($RequestBodyType) && other is $RequestBodyType; + return other.runtimeType == ($RequestBody$Type) && + other is $RequestBody$Type; } } -/// from: okhttp3.Response$Builder -class Response_Builder extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Response$Builder` +class Response_Builder extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Response_Builder.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Response$Builder'); + static final _class = _$jni.JClass.forName(r'okhttp3/Response$Builder'); /// The type which includes information such as the signature of this class. - static const type = $Response_BuilderType(); - static final _id_new0 = _class.constructorId( + static const type = $Response_Builder$Type(); + static final _id_new$ = _class.constructorId( r'()V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void () + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. factory Response_Builder() { return Response_Builder.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) .reference); } - static final _id_new1 = _class.constructorId( + static final _id_new$1 = _class.constructorId( r'(Lokhttp3/Response;)V', ); - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (okhttp3.Response response) + /// from: `public void (okhttp3.Response response)` /// The returned object must be released after use, by calling the [release] method. - factory Response_Builder.new1( + factory Response_Builder.new$1( Response response, ) { - return Response_Builder.fromReference(_new1(_class.reference.pointer, - _id_new1 as jni.JMethodIDPtr, response.reference.pointer) + return Response_Builder.fromReference(_new$1(_class.reference.pointer, + _id_new$1 as _$jni.JMethodIDPtr, response.reference.pointer) .reference); } @@ -2130,25 +2285,25 @@ class Response_Builder extends jni.JObject { r'(Lokhttp3/Request;)Lokhttp3/Response$Builder;', ); - static final _request = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _request = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Response$Builder request(okhttp3.Request request) + /// from: `public okhttp3.Response$Builder request(okhttp3.Request request)` /// The returned object must be released after use, by calling the [release] method. Response_Builder request( Request request, ) { - return _request(reference.pointer, _id_request as jni.JMethodIDPtr, + return _request(reference.pointer, _id_request as _$jni.JMethodIDPtr, request.reference.pointer) - .object(const $Response_BuilderType()); + .object(const $Response_Builder$Type()); } static final _id_protocol = _class.instanceMethodId( @@ -2156,25 +2311,25 @@ class Response_Builder extends jni.JObject { r'(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;', ); - static final _protocol = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _protocol = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Response$Builder protocol(okhttp3.Protocol protocol) + /// from: `public okhttp3.Response$Builder protocol(okhttp3.Protocol protocol)` /// The returned object must be released after use, by calling the [release] method. Response_Builder protocol( - jni.JObject protocol, + _$jni.JObject protocol, ) { - return _protocol(reference.pointer, _id_protocol as jni.JMethodIDPtr, + return _protocol(reference.pointer, _id_protocol as _$jni.JMethodIDPtr, protocol.reference.pointer) - .object(const $Response_BuilderType()); + .object(const $Response_Builder$Type()); } static final _id_code = _class.instanceMethodId( @@ -2182,21 +2337,23 @@ class Response_Builder extends jni.JObject { r'(I)Lokhttp3/Response$Builder;', ); - static final _code = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + static final _code = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public okhttp3.Response$Builder code(int i) + /// from: `public okhttp3.Response$Builder code(int i)` /// The returned object must be released after use, by calling the [release] method. Response_Builder code( int i, ) { - return _code(reference.pointer, _id_code as jni.JMethodIDPtr, i) - .object(const $Response_BuilderType()); + return _code(reference.pointer, _id_code as _$jni.JMethodIDPtr, i) + .object(const $Response_Builder$Type()); } static final _id_message = _class.instanceMethodId( @@ -2204,25 +2361,25 @@ class Response_Builder extends jni.JObject { r'(Ljava/lang/String;)Lokhttp3/Response$Builder;', ); - static final _message = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _message = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Response$Builder message(java.lang.String string) + /// from: `public okhttp3.Response$Builder message(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. Response_Builder message( - jni.JString string, + _$jni.JString string, ) { - return _message(reference.pointer, _id_message as jni.JMethodIDPtr, + return _message(reference.pointer, _id_message as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const $Response_BuilderType()); + .object(const $Response_Builder$Type()); } static final _id_handshake = _class.instanceMethodId( @@ -2230,25 +2387,25 @@ class Response_Builder extends jni.JObject { r'(Lokhttp3/Handshake;)Lokhttp3/Response$Builder;', ); - static final _handshake = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _handshake = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Response$Builder handshake(okhttp3.Handshake handshake) + /// from: `public okhttp3.Response$Builder handshake(okhttp3.Handshake handshake)` /// The returned object must be released after use, by calling the [release] method. Response_Builder handshake( - jni.JObject handshake, + _$jni.JObject handshake, ) { - return _handshake(reference.pointer, _id_handshake as jni.JMethodIDPtr, + return _handshake(reference.pointer, _id_handshake as _$jni.JMethodIDPtr, handshake.reference.pointer) - .object(const $Response_BuilderType()); + .object(const $Response_Builder$Type()); } static final _id_header = _class.instanceMethodId( @@ -2256,29 +2413,32 @@ class Response_Builder extends jni.JObject { r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;', ); - static final _header = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _header = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Response$Builder header(java.lang.String string, java.lang.String string1) + /// from: `public okhttp3.Response$Builder header(java.lang.String string, java.lang.String string1)` /// The returned object must be released after use, by calling the [release] method. Response_Builder header( - jni.JString string, - jni.JString string1, + _$jni.JString string, + _$jni.JString string1, ) { - return _header(reference.pointer, _id_header as jni.JMethodIDPtr, + return _header(reference.pointer, _id_header as _$jni.JMethodIDPtr, string.reference.pointer, string1.reference.pointer) - .object(const $Response_BuilderType()); + .object(const $Response_Builder$Type()); } static final _id_addHeader = _class.instanceMethodId( @@ -2286,29 +2446,32 @@ class Response_Builder extends jni.JObject { r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;', ); - static final _addHeader = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _addHeader = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Response$Builder addHeader(java.lang.String string, java.lang.String string1) + /// from: `public okhttp3.Response$Builder addHeader(java.lang.String string, java.lang.String string1)` /// The returned object must be released after use, by calling the [release] method. Response_Builder addHeader( - jni.JString string, - jni.JString string1, + _$jni.JString string, + _$jni.JString string1, ) { - return _addHeader(reference.pointer, _id_addHeader as jni.JMethodIDPtr, + return _addHeader(reference.pointer, _id_addHeader as _$jni.JMethodIDPtr, string.reference.pointer, string1.reference.pointer) - .object(const $Response_BuilderType()); + .object(const $Response_Builder$Type()); } static final _id_removeHeader = _class.instanceMethodId( @@ -2316,25 +2479,25 @@ class Response_Builder extends jni.JObject { r'(Ljava/lang/String;)Lokhttp3/Response$Builder;', ); - static final _removeHeader = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _removeHeader = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Response$Builder removeHeader(java.lang.String string) + /// from: `public okhttp3.Response$Builder removeHeader(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. Response_Builder removeHeader( - jni.JString string, + _$jni.JString string, ) { return _removeHeader(reference.pointer, - _id_removeHeader as jni.JMethodIDPtr, string.reference.pointer) - .object(const $Response_BuilderType()); + _id_removeHeader as _$jni.JMethodIDPtr, string.reference.pointer) + .object(const $Response_Builder$Type()); } static final _id_headers = _class.instanceMethodId( @@ -2342,25 +2505,25 @@ class Response_Builder extends jni.JObject { r'(Lokhttp3/Headers;)Lokhttp3/Response$Builder;', ); - static final _headers = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _headers = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Response$Builder headers(okhttp3.Headers headers) + /// from: `public okhttp3.Response$Builder headers(okhttp3.Headers headers)` /// The returned object must be released after use, by calling the [release] method. Response_Builder headers( Headers headers, ) { - return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr, + return _headers(reference.pointer, _id_headers as _$jni.JMethodIDPtr, headers.reference.pointer) - .object(const $Response_BuilderType()); + .object(const $Response_Builder$Type()); } static final _id_body = _class.instanceMethodId( @@ -2368,25 +2531,25 @@ class Response_Builder extends jni.JObject { r'(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;', ); - static final _body = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _body = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Response$Builder body(okhttp3.ResponseBody responseBody) + /// from: `public okhttp3.Response$Builder body(okhttp3.ResponseBody responseBody)` /// The returned object must be released after use, by calling the [release] method. Response_Builder body( ResponseBody responseBody, ) { - return _body(reference.pointer, _id_body as jni.JMethodIDPtr, + return _body(reference.pointer, _id_body as _$jni.JMethodIDPtr, responseBody.reference.pointer) - .object(const $Response_BuilderType()); + .object(const $Response_Builder$Type()); } static final _id_networkResponse = _class.instanceMethodId( @@ -2394,25 +2557,27 @@ class Response_Builder extends jni.JObject { r'(Lokhttp3/Response;)Lokhttp3/Response$Builder;', ); - static final _networkResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _networkResponse = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Response$Builder networkResponse(okhttp3.Response response) + /// from: `public okhttp3.Response$Builder networkResponse(okhttp3.Response response)` /// The returned object must be released after use, by calling the [release] method. Response_Builder networkResponse( Response response, ) { - return _networkResponse(reference.pointer, - _id_networkResponse as jni.JMethodIDPtr, response.reference.pointer) - .object(const $Response_BuilderType()); + return _networkResponse( + reference.pointer, + _id_networkResponse as _$jni.JMethodIDPtr, + response.reference.pointer) + .object(const $Response_Builder$Type()); } static final _id_cacheResponse = _class.instanceMethodId( @@ -2420,25 +2585,25 @@ class Response_Builder extends jni.JObject { r'(Lokhttp3/Response;)Lokhttp3/Response$Builder;', ); - static final _cacheResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _cacheResponse = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Response$Builder cacheResponse(okhttp3.Response response) + /// from: `public okhttp3.Response$Builder cacheResponse(okhttp3.Response response)` /// The returned object must be released after use, by calling the [release] method. Response_Builder cacheResponse( Response response, ) { return _cacheResponse(reference.pointer, - _id_cacheResponse as jni.JMethodIDPtr, response.reference.pointer) - .object(const $Response_BuilderType()); + _id_cacheResponse as _$jni.JMethodIDPtr, response.reference.pointer) + .object(const $Response_Builder$Type()); } static final _id_priorResponse = _class.instanceMethodId( @@ -2446,25 +2611,25 @@ class Response_Builder extends jni.JObject { r'(Lokhttp3/Response;)Lokhttp3/Response$Builder;', ); - static final _priorResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _priorResponse = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Response$Builder priorResponse(okhttp3.Response response) + /// from: `public okhttp3.Response$Builder priorResponse(okhttp3.Response response)` /// The returned object must be released after use, by calling the [release] method. Response_Builder priorResponse( Response response, ) { return _priorResponse(reference.pointer, - _id_priorResponse as jni.JMethodIDPtr, response.reference.pointer) - .object(const $Response_BuilderType()); + _id_priorResponse as _$jni.JMethodIDPtr, response.reference.pointer) + .object(const $Response_Builder$Type()); } static final _id_sentRequestAtMillis = _class.instanceMethodId( @@ -2472,22 +2637,24 @@ class Response_Builder extends jni.JObject { r'(J)Lokhttp3/Response$Builder;', ); - static final _sentRequestAtMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallObjectMethod') + static final _sentRequestAtMillis = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int64,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public okhttp3.Response$Builder sentRequestAtMillis(long j) + /// from: `public okhttp3.Response$Builder sentRequestAtMillis(long j)` /// The returned object must be released after use, by calling the [release] method. Response_Builder sentRequestAtMillis( int j, ) { return _sentRequestAtMillis( - reference.pointer, _id_sentRequestAtMillis as jni.JMethodIDPtr, j) - .object(const $Response_BuilderType()); + reference.pointer, _id_sentRequestAtMillis as _$jni.JMethodIDPtr, j) + .object(const $Response_Builder$Type()); } static final _id_receivedResponseAtMillis = _class.instanceMethodId( @@ -2495,22 +2662,24 @@ class Response_Builder extends jni.JObject { r'(J)Lokhttp3/Response$Builder;', ); - static final _receivedResponseAtMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallObjectMethod') + static final _receivedResponseAtMillis = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int64,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public okhttp3.Response$Builder receivedResponseAtMillis(long j) + /// from: `public okhttp3.Response$Builder receivedResponseAtMillis(long j)` /// The returned object must be released after use, by calling the [release] method. Response_Builder receivedResponseAtMillis( int j, ) { return _receivedResponseAtMillis(reference.pointer, - _id_receivedResponseAtMillis as jni.JMethodIDPtr, j) - .object(const $Response_BuilderType()); + _id_receivedResponseAtMillis as _$jni.JMethodIDPtr, j) + .object(const $Response_Builder$Type()); } static final _id_build = _class.instanceMethodId( @@ -2518,116 +2687,124 @@ class Response_Builder extends jni.JObject { r'()Lokhttp3/Response;', ); - static final _build = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _build = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public okhttp3.Response build() + /// from: `public okhttp3.Response build()` /// The returned object must be released after use, by calling the [release] method. Response build() { - return _build(reference.pointer, _id_build as jni.JMethodIDPtr) - .object(const $ResponseType()); + return _build(reference.pointer, _id_build as _$jni.JMethodIDPtr) + .object(const $Response$Type()); } } -final class $Response_BuilderType extends jni.JObjType { - const $Response_BuilderType(); +final class $Response_Builder$Type extends _$jni.JObjType { + @_$jni.internal + const $Response_Builder$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Response$Builder;'; - @override - Response_Builder fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Response_Builder fromReference(_$jni.JReference reference) => Response_Builder.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($Response_BuilderType).hashCode; + @_$core.override + int get hashCode => ($Response_Builder$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($Response_BuilderType) && - other is $Response_BuilderType; + return other.runtimeType == ($Response_Builder$Type) && + other is $Response_Builder$Type; } } -/// from: okhttp3.Response -class Response extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Response` +class Response extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Response.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Response'); + static final _class = _$jni.JClass.forName(r'okhttp3/Response'); /// The type which includes information such as the signature of this class. - static const type = $ResponseType(); - static final _id_new0 = _class.constructorId( + static const type = $Response$Type(); + static final _id_new$ = _class.constructorId( r'(Lokhttp3/Request;Lokhttp3/Protocol;Ljava/lang/String;ILokhttp3/Handshake;Lokhttp3/Headers;Lokhttp3/ResponseBody;Lokhttp3/Response;Lokhttp3/Response;Lokhttp3/Response;JJLokhttp3/internal/connection/Exchange;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - $Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int64, - ffi.Int64, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int64, + _$jni.Int64, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, int, int, - ffi.Pointer)>(); + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (okhttp3.Request request, okhttp3.Protocol protocol, java.lang.String string, int i, okhttp3.Handshake handshake, okhttp3.Headers headers, okhttp3.ResponseBody responseBody, okhttp3.Response response, okhttp3.Response response1, okhttp3.Response response2, long j, long j1, okhttp3.internal.connection.Exchange exchange) + /// from: `public void (okhttp3.Request request, okhttp3.Protocol protocol, java.lang.String string, int i, okhttp3.Handshake handshake, okhttp3.Headers headers, okhttp3.ResponseBody responseBody, okhttp3.Response response, okhttp3.Response response1, okhttp3.Response response2, long j, long j1, okhttp3.internal.connection.Exchange exchange)` /// The returned object must be released after use, by calling the [release] method. factory Response( Request request, - jni.JObject protocol, - jni.JString string, + _$jni.JObject protocol, + _$jni.JString string, int i, - jni.JObject handshake, + _$jni.JObject handshake, Headers headers, ResponseBody responseBody, Response response, @@ -2635,11 +2812,11 @@ class Response extends jni.JObject { Response response2, int j, int j1, - jni.JObject exchange, + _$jni.JObject exchange, ) { - return Response.fromReference(_new0( + return Response.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, request.reference.pointer, protocol.reference.pointer, string.reference.pointer, @@ -2661,23 +2838,23 @@ class Response extends jni.JObject { r'()Lokhttp3/Request;', ); - static final _request = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _request = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Request request() + /// from: `public final okhttp3.Request request()` /// The returned object must be released after use, by calling the [release] method. Request request() { - return _request(reference.pointer, _id_request as jni.JMethodIDPtr) - .object(const $RequestType()); + return _request(reference.pointer, _id_request as _$jni.JMethodIDPtr) + .object(const $Request$Type()); } static final _id_protocol = _class.instanceMethodId( @@ -2685,23 +2862,23 @@ class Response extends jni.JObject { r'()Lokhttp3/Protocol;', ); - static final _protocol = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _protocol = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Protocol protocol() + /// from: `public final okhttp3.Protocol protocol()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject protocol() { - return _protocol(reference.pointer, _id_protocol as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject protocol() { + return _protocol(reference.pointer, _id_protocol as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_message = _class.instanceMethodId( @@ -2709,23 +2886,23 @@ class Response extends jni.JObject { r'()Ljava/lang/String;', ); - static final _message = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _message = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.lang.String message() + /// from: `public final java.lang.String message()` /// The returned object must be released after use, by calling the [release] method. - jni.JString message() { - return _message(reference.pointer, _id_message as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString message() { + return _message(reference.pointer, _id_message as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_code = _class.instanceMethodId( @@ -2733,21 +2910,21 @@ class Response extends jni.JObject { r'()I', ); - static final _code = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _code = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int code() + /// from: `public final int code()` int code() { - return _code(reference.pointer, _id_code as jni.JMethodIDPtr).integer; + return _code(reference.pointer, _id_code as _$jni.JMethodIDPtr).integer; } static final _id_handshake = _class.instanceMethodId( @@ -2755,23 +2932,23 @@ class Response extends jni.JObject { r'()Lokhttp3/Handshake;', ); - static final _handshake = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _handshake = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Handshake handshake() + /// from: `public final okhttp3.Handshake handshake()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject handshake() { - return _handshake(reference.pointer, _id_handshake as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject handshake() { + return _handshake(reference.pointer, _id_handshake as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_headers = _class.instanceMethodId( @@ -2779,23 +2956,23 @@ class Response extends jni.JObject { r'()Lokhttp3/Headers;', ); - static final _headers = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _headers = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Headers headers() + /// from: `public final okhttp3.Headers headers()` /// The returned object must be released after use, by calling the [release] method. Headers headers() { - return _headers(reference.pointer, _id_headers as jni.JMethodIDPtr) - .object(const $HeadersType()); + return _headers(reference.pointer, _id_headers as _$jni.JMethodIDPtr) + .object(const $Headers$Type()); } static final _id_body = _class.instanceMethodId( @@ -2803,23 +2980,23 @@ class Response extends jni.JObject { r'()Lokhttp3/ResponseBody;', ); - static final _body = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _body = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.ResponseBody body() + /// from: `public final okhttp3.ResponseBody body()` /// The returned object must be released after use, by calling the [release] method. ResponseBody body() { - return _body(reference.pointer, _id_body as jni.JMethodIDPtr) - .object(const $ResponseBodyType()); + return _body(reference.pointer, _id_body as _$jni.JMethodIDPtr) + .object(const $ResponseBody$Type()); } static final _id_networkResponse = _class.instanceMethodId( @@ -2827,24 +3004,24 @@ class Response extends jni.JObject { r'()Lokhttp3/Response;', ); - static final _networkResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _networkResponse = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Response networkResponse() + /// from: `public final okhttp3.Response networkResponse()` /// The returned object must be released after use, by calling the [release] method. Response networkResponse() { return _networkResponse( - reference.pointer, _id_networkResponse as jni.JMethodIDPtr) - .object(const $ResponseType()); + reference.pointer, _id_networkResponse as _$jni.JMethodIDPtr) + .object(const $Response$Type()); } static final _id_cacheResponse = _class.instanceMethodId( @@ -2852,24 +3029,24 @@ class Response extends jni.JObject { r'()Lokhttp3/Response;', ); - static final _cacheResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _cacheResponse = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Response cacheResponse() + /// from: `public final okhttp3.Response cacheResponse()` /// The returned object must be released after use, by calling the [release] method. Response cacheResponse() { return _cacheResponse( - reference.pointer, _id_cacheResponse as jni.JMethodIDPtr) - .object(const $ResponseType()); + reference.pointer, _id_cacheResponse as _$jni.JMethodIDPtr) + .object(const $Response$Type()); } static final _id_priorResponse = _class.instanceMethodId( @@ -2877,24 +3054,24 @@ class Response extends jni.JObject { r'()Lokhttp3/Response;', ); - static final _priorResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _priorResponse = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Response priorResponse() + /// from: `public final okhttp3.Response priorResponse()` /// The returned object must be released after use, by calling the [release] method. Response priorResponse() { return _priorResponse( - reference.pointer, _id_priorResponse as jni.JMethodIDPtr) - .object(const $ResponseType()); + reference.pointer, _id_priorResponse as _$jni.JMethodIDPtr) + .object(const $Response$Type()); } static final _id_sentRequestAtMillis = _class.instanceMethodId( @@ -2902,22 +3079,22 @@ class Response extends jni.JObject { r'()J', ); - static final _sentRequestAtMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _sentRequestAtMillis = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final long sentRequestAtMillis() + /// from: `public final long sentRequestAtMillis()` int sentRequestAtMillis() { return _sentRequestAtMillis( - reference.pointer, _id_sentRequestAtMillis as jni.JMethodIDPtr) + reference.pointer, _id_sentRequestAtMillis as _$jni.JMethodIDPtr) .long; } @@ -2926,22 +3103,22 @@ class Response extends jni.JObject { r'()J', ); - static final _receivedResponseAtMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _receivedResponseAtMillis = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final long receivedResponseAtMillis() + /// from: `public final long receivedResponseAtMillis()` int receivedResponseAtMillis() { - return _receivedResponseAtMillis( - reference.pointer, _id_receivedResponseAtMillis as jni.JMethodIDPtr) + return _receivedResponseAtMillis(reference.pointer, + _id_receivedResponseAtMillis as _$jni.JMethodIDPtr) .long; } @@ -2950,23 +3127,23 @@ class Response extends jni.JObject { r'()Lokhttp3/internal/connection/Exchange;', ); - static final _exchange = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _exchange = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.internal.connection.Exchange exchange() + /// from: `public final okhttp3.internal.connection.Exchange exchange()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject exchange() { - return _exchange(reference.pointer, _id_exchange as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject exchange() { + return _exchange(reference.pointer, _id_exchange as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_isSuccessful = _class.instanceMethodId( @@ -2974,49 +3151,49 @@ class Response extends jni.JObject { r'()Z', ); - static final _isSuccessful = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _isSuccessful = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final boolean isSuccessful() + /// from: `public final boolean isSuccessful()` bool isSuccessful() { return _isSuccessful( - reference.pointer, _id_isSuccessful as jni.JMethodIDPtr) + reference.pointer, _id_isSuccessful as _$jni.JMethodIDPtr) .boolean; } - static final _id_headers1 = _class.instanceMethodId( + static final _id_headers$1 = _class.instanceMethodId( r'headers', r'(Ljava/lang/String;)Ljava/util/List;', ); - static final _headers1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _headers$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final java.util.List headers(java.lang.String string) + /// from: `public final java.util.List headers(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - jni.JList headers1( - jni.JString string, + _$jni.JList<_$jni.JString> headers$1( + _$jni.JString string, ) { - return _headers1(reference.pointer, _id_headers1 as jni.JMethodIDPtr, + return _headers$1(reference.pointer, _id_headers$1 as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const jni.JListType(jni.JStringType())); + .object(const _$jni.JListType(_$jni.JStringType())); } static final _id_header = _class.instanceMethodId( @@ -3024,29 +3201,32 @@ class Response extends jni.JObject { r'(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;', ); - static final _header = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _header = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final java.lang.String header(java.lang.String string, java.lang.String string1) + /// from: `public final java.lang.String header(java.lang.String string, java.lang.String string1)` /// The returned object must be released after use, by calling the [release] method. - jni.JString header( - jni.JString string, - jni.JString string1, + _$jni.JString header( + _$jni.JString string, + _$jni.JString string1, ) { - return _header(reference.pointer, _id_header as jni.JMethodIDPtr, + return _header(reference.pointer, _id_header as _$jni.JMethodIDPtr, string.reference.pointer, string1.reference.pointer) - .object(const jni.JStringType()); + .object(const _$jni.JStringType()); } static final _id_trailers = _class.instanceMethodId( @@ -3054,23 +3234,23 @@ class Response extends jni.JObject { r'()Lokhttp3/Headers;', ); - static final _trailers = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _trailers = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Headers trailers() + /// from: `public final okhttp3.Headers trailers()` /// The returned object must be released after use, by calling the [release] method. Headers trailers() { - return _trailers(reference.pointer, _id_trailers as jni.JMethodIDPtr) - .object(const $HeadersType()); + return _trailers(reference.pointer, _id_trailers as _$jni.JMethodIDPtr) + .object(const $Headers$Type()); } static final _id_peekBody = _class.instanceMethodId( @@ -3078,21 +3258,23 @@ class Response extends jni.JObject { r'(J)Lokhttp3/ResponseBody;', ); - static final _peekBody = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallObjectMethod') + static final _peekBody = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int64,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public final okhttp3.ResponseBody peekBody(long j) + /// from: `public final okhttp3.ResponseBody peekBody(long j)` /// The returned object must be released after use, by calling the [release] method. ResponseBody peekBody( int j, ) { - return _peekBody(reference.pointer, _id_peekBody as jni.JMethodIDPtr, j) - .object(const $ResponseBodyType()); + return _peekBody(reference.pointer, _id_peekBody as _$jni.JMethodIDPtr, j) + .object(const $ResponseBody$Type()); } static final _id_newBuilder = _class.instanceMethodId( @@ -3100,23 +3282,23 @@ class Response extends jni.JObject { r'()Lokhttp3/Response$Builder;', ); - static final _newBuilder = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _newBuilder = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Response$Builder newBuilder() + /// from: `public final okhttp3.Response$Builder newBuilder()` /// The returned object must be released after use, by calling the [release] method. Response_Builder newBuilder() { - return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) - .object(const $Response_BuilderType()); + return _newBuilder(reference.pointer, _id_newBuilder as _$jni.JMethodIDPtr) + .object(const $Response_Builder$Type()); } static final _id_isRedirect = _class.instanceMethodId( @@ -3124,21 +3306,21 @@ class Response extends jni.JObject { r'()Z', ); - static final _isRedirect = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _isRedirect = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final boolean isRedirect() + /// from: `public final boolean isRedirect()` bool isRedirect() { - return _isRedirect(reference.pointer, _id_isRedirect as jni.JMethodIDPtr) + return _isRedirect(reference.pointer, _id_isRedirect as _$jni.JMethodIDPtr) .boolean; } @@ -3147,23 +3329,23 @@ class Response extends jni.JObject { r'()Ljava/util/List;', ); - static final _challenges = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _challenges = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.List challenges() + /// from: `public final java.util.List challenges()` /// The returned object must be released after use, by calling the [release] method. - jni.JList challenges() { - return _challenges(reference.pointer, _id_challenges as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); + _$jni.JList<_$jni.JObject> challenges() { + return _challenges(reference.pointer, _id_challenges as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JObjectType())); } static final _id_cacheControl = _class.instanceMethodId( @@ -3171,24 +3353,24 @@ class Response extends jni.JObject { r'()Lokhttp3/CacheControl;', ); - static final _cacheControl = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _cacheControl = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.CacheControl cacheControl() + /// from: `public final okhttp3.CacheControl cacheControl()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject cacheControl() { + _$jni.JObject cacheControl() { return _cacheControl( - reference.pointer, _id_cacheControl as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_cacheControl as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_close = _class.instanceMethodId( @@ -3196,140 +3378,151 @@ class Response extends jni.JObject { r'()V', ); - static final _close = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _close = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void close() + /// from: `public void close()` void close() { - _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); + _close(reference.pointer, _id_close as _$jni.JMethodIDPtr).check(); } - static final _id_toString1 = _class.instanceMethodId( + static final _id_toString$1 = _class.instanceMethodId( r'toString', r'()Ljava/lang/String;', ); - static final _toString1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _toString$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String toString() + /// from: `public java.lang.String toString()` /// The returned object must be released after use, by calling the [release] method. - jni.JString toString1() { - return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString toString$1() { + return _toString$1(reference.pointer, _id_toString$1 as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } - static final _id_header1 = _class.instanceMethodId( + static final _id_header$1 = _class.instanceMethodId( r'header', r'(Ljava/lang/String;)Ljava/lang/String;', ); - static final _header1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _header$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final java.lang.String header(java.lang.String string) + /// from: `public final java.lang.String header(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - jni.JString header1( - jni.JString string, + _$jni.JString header$1( + _$jni.JString string, ) { - return _header1(reference.pointer, _id_header1 as jni.JMethodIDPtr, + return _header$1(reference.pointer, _id_header$1 as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const jni.JStringType()); + .object(const _$jni.JStringType()); } } -final class $ResponseType extends jni.JObjType { - const $ResponseType(); +final class $Response$Type extends _$jni.JObjType { + @_$jni.internal + const $Response$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Response;'; - @override - Response fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Response fromReference(_$jni.JReference reference) => Response.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($ResponseType).hashCode; + @_$core.override + int get hashCode => ($Response$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($ResponseType) && other is $ResponseType; + return other.runtimeType == ($Response$Type) && other is $Response$Type; } } -/// from: okhttp3.ResponseBody$BomAwareReader -class ResponseBody_BomAwareReader extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.ResponseBody$BomAwareReader` +class ResponseBody_BomAwareReader extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal ResponseBody_BomAwareReader.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'okhttp3/ResponseBody$BomAwareReader'); + _$jni.JClass.forName(r'okhttp3/ResponseBody$BomAwareReader'); /// The type which includes information such as the signature of this class. - static const type = $ResponseBody_BomAwareReaderType(); - static final _id_new0 = _class.constructorId( + static const type = $ResponseBody_BomAwareReader$Type(); + static final _id_new$ = _class.constructorId( r'(Lokio/BufferedSource;Ljava/nio/charset/Charset;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (okio.BufferedSource bufferedSource, java.nio.charset.Charset charset) + /// from: `public void (okio.BufferedSource bufferedSource, java.nio.charset.Charset charset)` /// The returned object must be released after use, by calling the [release] method. factory ResponseBody_BomAwareReader( - jni.JObject bufferedSource, - jni.JObject charset, + _$jni.JObject bufferedSource, + _$jni.JObject charset, ) { - return ResponseBody_BomAwareReader.fromReference(_new0( + return ResponseBody_BomAwareReader.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, bufferedSource.reference.pointer, charset.reference.pointer) .reference); @@ -3340,24 +3533,28 @@ class ResponseBody_BomAwareReader extends jni.JObject { r'([CII)I', ); - static final _read = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( - 'globalEnv_CallIntMethod') + static final _read = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32 + )>)>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int, int)>(); - /// from: public int read(char[] cs, int i, int i1) + /// from: `public int read(char[] cs, int i, int i1)` int read( - jni.JArray cs, + _$jni.JArray<_$jni.jchar> cs, int i, int i1, ) { - return _read(reference.pointer, _id_read as jni.JMethodIDPtr, + return _read(reference.pointer, _id_read as _$jni.JMethodIDPtr, cs.reference.pointer, i, i1) .integer; } @@ -3367,432 +3564,451 @@ class ResponseBody_BomAwareReader extends jni.JObject { r'()V', ); - static final _close = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _close = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void close() + /// from: `public void close()` void close() { - _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); + _close(reference.pointer, _id_close as _$jni.JMethodIDPtr).check(); } } -final class $ResponseBody_BomAwareReaderType - extends jni.JObjType { - const $ResponseBody_BomAwareReaderType(); +final class $ResponseBody_BomAwareReader$Type + extends _$jni.JObjType { + @_$jni.internal + const $ResponseBody_BomAwareReader$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/ResponseBody$BomAwareReader;'; - @override - ResponseBody_BomAwareReader fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + ResponseBody_BomAwareReader fromReference(_$jni.JReference reference) => ResponseBody_BomAwareReader.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($ResponseBody_BomAwareReaderType).hashCode; + @_$core.override + int get hashCode => ($ResponseBody_BomAwareReader$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($ResponseBody_BomAwareReaderType) && - other is $ResponseBody_BomAwareReaderType; + return other.runtimeType == ($ResponseBody_BomAwareReader$Type) && + other is $ResponseBody_BomAwareReader$Type; } } -/// from: okhttp3.ResponseBody$Companion -class ResponseBody_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.ResponseBody$Companion` +class ResponseBody_Companion extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal ResponseBody_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/ResponseBody$Companion'); + static final _class = _$jni.JClass.forName(r'okhttp3/ResponseBody$Companion'); /// The type which includes information such as the signature of this class. - static const type = $ResponseBody_CompanionType(); + static const type = $ResponseBody_Companion$Type(); static final _id_create = _class.instanceMethodId( r'create', r'(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); - static final _create = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.ResponseBody create(java.lang.String string, okhttp3.MediaType mediaType) + /// from: `public final okhttp3.ResponseBody create(java.lang.String string, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. ResponseBody create( - jni.JString string, - jni.JObject mediaType, + _$jni.JString string, + _$jni.JObject mediaType, ) { - return _create(reference.pointer, _id_create as jni.JMethodIDPtr, + return _create(reference.pointer, _id_create as _$jni.JMethodIDPtr, string.reference.pointer, mediaType.reference.pointer) - .object(const $ResponseBodyType()); + .object(const $ResponseBody$Type()); } - static final _id_create1 = _class.instanceMethodId( + static final _id_create$1 = _class.instanceMethodId( r'create', r'([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); - static final _create1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.ResponseBody create(byte[] bs, okhttp3.MediaType mediaType) + /// from: `public final okhttp3.ResponseBody create(byte[] bs, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. - ResponseBody create1( - jni.JArray bs, - jni.JObject mediaType, + ResponseBody create$1( + _$jni.JArray<_$jni.jbyte> bs, + _$jni.JObject mediaType, ) { - return _create1(reference.pointer, _id_create1 as jni.JMethodIDPtr, + return _create$1(reference.pointer, _id_create$1 as _$jni.JMethodIDPtr, bs.reference.pointer, mediaType.reference.pointer) - .object(const $ResponseBodyType()); + .object(const $ResponseBody$Type()); } - static final _id_create2 = _class.instanceMethodId( + static final _id_create$2 = _class.instanceMethodId( r'create', r'(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); - static final _create2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) + /// from: `public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. - ResponseBody create2( + ResponseBody create$2( ByteString byteString, - jni.JObject mediaType, + _$jni.JObject mediaType, ) { - return _create2(reference.pointer, _id_create2 as jni.JMethodIDPtr, + return _create$2(reference.pointer, _id_create$2 as _$jni.JMethodIDPtr, byteString.reference.pointer, mediaType.reference.pointer) - .object(const $ResponseBodyType()); + .object(const $ResponseBody$Type()); } - static final _id_create3 = _class.instanceMethodId( + static final _id_create$3 = _class.instanceMethodId( r'create', r'(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;', ); - static final _create3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Int64 + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int64 )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + int)>(); - /// from: public final okhttp3.ResponseBody create(okio.BufferedSource bufferedSource, okhttp3.MediaType mediaType, long j) + /// from: `public final okhttp3.ResponseBody create(okio.BufferedSource bufferedSource, okhttp3.MediaType mediaType, long j)` /// The returned object must be released after use, by calling the [release] method. - ResponseBody create3( - jni.JObject bufferedSource, - jni.JObject mediaType, + ResponseBody create$3( + _$jni.JObject bufferedSource, + _$jni.JObject mediaType, int j, ) { - return _create3(reference.pointer, _id_create3 as jni.JMethodIDPtr, + return _create$3(reference.pointer, _id_create$3 as _$jni.JMethodIDPtr, bufferedSource.reference.pointer, mediaType.reference.pointer, j) - .object(const $ResponseBodyType()); + .object(const $ResponseBody$Type()); } - static final _id_create4 = _class.instanceMethodId( + static final _id_create$4 = _class.instanceMethodId( r'create', r'(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;', ); - static final _create4 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$4 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, java.lang.String string) + /// from: `public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - ResponseBody create4( - jni.JObject mediaType, - jni.JString string, + ResponseBody create$4( + _$jni.JObject mediaType, + _$jni.JString string, ) { - return _create4(reference.pointer, _id_create4 as jni.JMethodIDPtr, + return _create$4(reference.pointer, _id_create$4 as _$jni.JMethodIDPtr, mediaType.reference.pointer, string.reference.pointer) - .object(const $ResponseBodyType()); + .object(const $ResponseBody$Type()); } - static final _id_create5 = _class.instanceMethodId( + static final _id_create$5 = _class.instanceMethodId( r'create', r'(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;', ); - static final _create5 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$5 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, byte[] bs) + /// from: `public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, byte[] bs)` /// The returned object must be released after use, by calling the [release] method. - ResponseBody create5( - jni.JObject mediaType, - jni.JArray bs, + ResponseBody create$5( + _$jni.JObject mediaType, + _$jni.JArray<_$jni.jbyte> bs, ) { - return _create5(reference.pointer, _id_create5 as jni.JMethodIDPtr, + return _create$5(reference.pointer, _id_create$5 as _$jni.JMethodIDPtr, mediaType.reference.pointer, bs.reference.pointer) - .object(const $ResponseBodyType()); + .object(const $ResponseBody$Type()); } - static final _id_create6 = _class.instanceMethodId( + static final _id_create$6 = _class.instanceMethodId( r'create', r'(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;', ); - static final _create6 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$6 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) + /// from: `public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, okio.ByteString byteString)` /// The returned object must be released after use, by calling the [release] method. - ResponseBody create6( - jni.JObject mediaType, + ResponseBody create$6( + _$jni.JObject mediaType, ByteString byteString, ) { - return _create6(reference.pointer, _id_create6 as jni.JMethodIDPtr, + return _create$6(reference.pointer, _id_create$6 as _$jni.JMethodIDPtr, mediaType.reference.pointer, byteString.reference.pointer) - .object(const $ResponseBodyType()); + .object(const $ResponseBody$Type()); } - static final _id_create7 = _class.instanceMethodId( + static final _id_create$7 = _class.instanceMethodId( r'create', r'(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;', ); - static final _create7 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$7 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Int64, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Int64, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + int, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, long j, okio.BufferedSource bufferedSource) + /// from: `public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, long j, okio.BufferedSource bufferedSource)` /// The returned object must be released after use, by calling the [release] method. - ResponseBody create7( - jni.JObject mediaType, + ResponseBody create$7( + _$jni.JObject mediaType, int j, - jni.JObject bufferedSource, + _$jni.JObject bufferedSource, ) { - return _create7(reference.pointer, _id_create7 as jni.JMethodIDPtr, + return _create$7(reference.pointer, _id_create$7 as _$jni.JMethodIDPtr, mediaType.reference.pointer, j, bufferedSource.reference.pointer) - .object(const $ResponseBodyType()); + .object(const $ResponseBody$Type()); } - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` /// The returned object must be released after use, by calling the [release] method. factory ResponseBody_Companion( - jni.JObject defaultConstructorMarker, + _$jni.JObject defaultConstructorMarker, ) { - return ResponseBody_Companion.fromReference(_new0( + return ResponseBody_Companion.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, defaultConstructorMarker.reference.pointer) .reference); } } -final class $ResponseBody_CompanionType - extends jni.JObjType { - const $ResponseBody_CompanionType(); +final class $ResponseBody_Companion$Type + extends _$jni.JObjType { + @_$jni.internal + const $ResponseBody_Companion$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/ResponseBody$Companion;'; - @override - ResponseBody_Companion fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + ResponseBody_Companion fromReference(_$jni.JReference reference) => ResponseBody_Companion.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($ResponseBody_CompanionType).hashCode; + @_$core.override + int get hashCode => ($ResponseBody_Companion$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($ResponseBody_CompanionType) && - other is $ResponseBody_CompanionType; + return other.runtimeType == ($ResponseBody_Companion$Type) && + other is $ResponseBody_Companion$Type; } } -/// from: okhttp3.ResponseBody -class ResponseBody extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.ResponseBody` +class ResponseBody extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal ResponseBody.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/ResponseBody'); + static final _class = _$jni.JClass.forName(r'okhttp3/ResponseBody'); /// The type which includes information such as the signature of this class. - static const type = $ResponseBodyType(); + static const type = $ResponseBody$Type(); static final _id_Companion = _class.staticFieldId( r'Companion', r'Lokhttp3/ResponseBody$Companion;', ); - /// from: static public final okhttp3.ResponseBody$Companion Companion + /// from: `static public final okhttp3.ResponseBody$Companion Companion` /// The returned object must be released after use, by calling the [release] method. static ResponseBody_Companion get Companion => - _id_Companion.get(_class, const $ResponseBody_CompanionType()); - - static final _id_new0 = _class.constructorId( - r'()V', - ); - - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>('globalEnv_NewObject') - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public void () - /// The returned object must be released after use, by calling the [release] method. - factory ResponseBody() { - return ResponseBody.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) - .reference); - } + _id_Companion.get(_class, const $ResponseBody_Companion$Type()); static final _id_contentType = _class.instanceMethodId( r'contentType', r'()Lokhttp3/MediaType;', ); - static final _contentType = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _contentType = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract okhttp3.MediaType contentType() + /// from: `public abstract okhttp3.MediaType contentType()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject contentType() { - return _contentType(reference.pointer, _id_contentType as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject contentType() { + return _contentType( + reference.pointer, _id_contentType as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_contentLength = _class.instanceMethodId( @@ -3800,22 +4016,22 @@ class ResponseBody extends jni.JObject { r'()J', ); - static final _contentLength = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _contentLength = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract long contentLength() + /// from: `public abstract long contentLength()` int contentLength() { return _contentLength( - reference.pointer, _id_contentLength as jni.JMethodIDPtr) + reference.pointer, _id_contentLength as _$jni.JMethodIDPtr) .long; } @@ -3824,23 +4040,23 @@ class ResponseBody extends jni.JObject { r'()Ljava/io/InputStream;', ); - static final _byteStream = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _byteStream = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.io.InputStream byteStream() + /// from: `public final java.io.InputStream byteStream()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject byteStream() { - return _byteStream(reference.pointer, _id_byteStream as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject byteStream() { + return _byteStream(reference.pointer, _id_byteStream as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_source = _class.instanceMethodId( @@ -3848,23 +4064,23 @@ class ResponseBody extends jni.JObject { r'()Lokio/BufferedSource;', ); - static final _source = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _source = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract okio.BufferedSource source() + /// from: `public abstract okio.BufferedSource source()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject source() { - return _source(reference.pointer, _id_source as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject source() { + return _source(reference.pointer, _id_source as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_bytes = _class.instanceMethodId( @@ -3872,23 +4088,23 @@ class ResponseBody extends jni.JObject { r'()[B', ); - static final _bytes = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _bytes = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final byte[] bytes() + /// from: `public final byte[] bytes()` /// The returned object must be released after use, by calling the [release] method. - jni.JArray bytes() { - return _bytes(reference.pointer, _id_bytes as jni.JMethodIDPtr) - .object(const jni.JArrayType(jni.jbyteType())); + _$jni.JArray<_$jni.jbyte> bytes() { + return _bytes(reference.pointer, _id_bytes as _$jni.JMethodIDPtr) + .object(const _$jni.JArrayType(_$jni.jbyteType())); } static final _id_byteString = _class.instanceMethodId( @@ -3896,23 +4112,23 @@ class ResponseBody extends jni.JObject { r'()Lokio/ByteString;', ); - static final _byteString = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _byteString = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okio.ByteString byteString() + /// from: `public final okio.ByteString byteString()` /// The returned object must be released after use, by calling the [release] method. ByteString byteString() { - return _byteString(reference.pointer, _id_byteString as jni.JMethodIDPtr) - .object(const $ByteStringType()); + return _byteString(reference.pointer, _id_byteString as _$jni.JMethodIDPtr) + .object(const $ByteString$Type()); } static final _id_charStream = _class.instanceMethodId( @@ -3920,23 +4136,23 @@ class ResponseBody extends jni.JObject { r'()Ljava/io/Reader;', ); - static final _charStream = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _charStream = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.io.Reader charStream() + /// from: `public final java.io.Reader charStream()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject charStream() { - return _charStream(reference.pointer, _id_charStream as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject charStream() { + return _charStream(reference.pointer, _id_charStream as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_string = _class.instanceMethodId( @@ -3944,23 +4160,23 @@ class ResponseBody extends jni.JObject { r'()Ljava/lang/String;', ); - static final _string = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _string = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.lang.String string() + /// from: `public final java.lang.String string()` /// The returned object must be released after use, by calling the [release] method. - jni.JString string() { - return _string(reference.pointer, _id_string as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString string() { + return _string(reference.pointer, _id_string as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_close = _class.instanceMethodId( @@ -3968,21 +4184,21 @@ class ResponseBody extends jni.JObject { r'()V', ); - static final _close = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _close = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void close() + /// from: `public void close()` void close() { - _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); + _close(reference.pointer, _id_close as _$jni.JMethodIDPtr).check(); } static final _id_create = _class.staticMethodId( @@ -3990,331 +4206,388 @@ class ResponseBody extends jni.JObject { r'(Ljava/lang/String;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); - static final _create = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.ResponseBody create(java.lang.String string, okhttp3.MediaType mediaType) + /// from: `static public final okhttp3.ResponseBody create(java.lang.String string, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. static ResponseBody create( - jni.JString string, - jni.JObject mediaType, + _$jni.JString string, + _$jni.JObject mediaType, ) { - return _create(_class.reference.pointer, _id_create as jni.JMethodIDPtr, + return _create(_class.reference.pointer, _id_create as _$jni.JMethodIDPtr, string.reference.pointer, mediaType.reference.pointer) - .object(const $ResponseBodyType()); + .object(const $ResponseBody$Type()); } - static final _id_create1 = _class.staticMethodId( + static final _id_create$1 = _class.staticMethodId( r'create', r'([BLokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); - static final _create1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.ResponseBody create(byte[] bs, okhttp3.MediaType mediaType) + /// from: `static public final okhttp3.ResponseBody create(byte[] bs, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create1( - jni.JArray bs, - jni.JObject mediaType, + static ResponseBody create$1( + _$jni.JArray<_$jni.jbyte> bs, + _$jni.JObject mediaType, ) { - return _create1(_class.reference.pointer, _id_create1 as jni.JMethodIDPtr, - bs.reference.pointer, mediaType.reference.pointer) - .object(const $ResponseBodyType()); + return _create$1( + _class.reference.pointer, + _id_create$1 as _$jni.JMethodIDPtr, + bs.reference.pointer, + mediaType.reference.pointer) + .object(const $ResponseBody$Type()); } - static final _id_create2 = _class.staticMethodId( + static final _id_create$2 = _class.staticMethodId( r'create', r'(Lokio/ByteString;Lokhttp3/MediaType;)Lokhttp3/ResponseBody;', ); - static final _create2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType) + /// from: `static public final okhttp3.ResponseBody create(okio.ByteString byteString, okhttp3.MediaType mediaType)` /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create2( + static ResponseBody create$2( ByteString byteString, - jni.JObject mediaType, + _$jni.JObject mediaType, ) { - return _create2(_class.reference.pointer, _id_create2 as jni.JMethodIDPtr, - byteString.reference.pointer, mediaType.reference.pointer) - .object(const $ResponseBodyType()); + return _create$2( + _class.reference.pointer, + _id_create$2 as _$jni.JMethodIDPtr, + byteString.reference.pointer, + mediaType.reference.pointer) + .object(const $ResponseBody$Type()); } - static final _id_create3 = _class.staticMethodId( + static final _id_create$3 = _class.staticMethodId( r'create', r'(Lokio/BufferedSource;Lokhttp3/MediaType;J)Lokhttp3/ResponseBody;', ); - static final _create3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Int64 + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Int64 )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + int)>(); - /// from: static public final okhttp3.ResponseBody create(okio.BufferedSource bufferedSource, okhttp3.MediaType mediaType, long j) + /// from: `static public final okhttp3.ResponseBody create(okio.BufferedSource bufferedSource, okhttp3.MediaType mediaType, long j)` /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create3( - jni.JObject bufferedSource, - jni.JObject mediaType, + static ResponseBody create$3( + _$jni.JObject bufferedSource, + _$jni.JObject mediaType, int j, ) { - return _create3(_class.reference.pointer, _id_create3 as jni.JMethodIDPtr, - bufferedSource.reference.pointer, mediaType.reference.pointer, j) - .object(const $ResponseBodyType()); + return _create$3( + _class.reference.pointer, + _id_create$3 as _$jni.JMethodIDPtr, + bufferedSource.reference.pointer, + mediaType.reference.pointer, + j) + .object(const $ResponseBody$Type()); } - static final _id_create4 = _class.staticMethodId( + static final _id_create$4 = _class.staticMethodId( r'create', r'(Lokhttp3/MediaType;Ljava/lang/String;)Lokhttp3/ResponseBody;', ); - static final _create4 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$4 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, java.lang.String string) + /// from: `static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create4( - jni.JObject mediaType, - jni.JString string, + static ResponseBody create$4( + _$jni.JObject mediaType, + _$jni.JString string, ) { - return _create4(_class.reference.pointer, _id_create4 as jni.JMethodIDPtr, - mediaType.reference.pointer, string.reference.pointer) - .object(const $ResponseBodyType()); + return _create$4( + _class.reference.pointer, + _id_create$4 as _$jni.JMethodIDPtr, + mediaType.reference.pointer, + string.reference.pointer) + .object(const $ResponseBody$Type()); } - static final _id_create5 = _class.staticMethodId( + static final _id_create$5 = _class.staticMethodId( r'create', r'(Lokhttp3/MediaType;[B)Lokhttp3/ResponseBody;', ); - static final _create5 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$5 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, byte[] bs) + /// from: `static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, byte[] bs)` /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create5( - jni.JObject mediaType, - jni.JArray bs, + static ResponseBody create$5( + _$jni.JObject mediaType, + _$jni.JArray<_$jni.jbyte> bs, ) { - return _create5(_class.reference.pointer, _id_create5 as jni.JMethodIDPtr, - mediaType.reference.pointer, bs.reference.pointer) - .object(const $ResponseBodyType()); + return _create$5( + _class.reference.pointer, + _id_create$5 as _$jni.JMethodIDPtr, + mediaType.reference.pointer, + bs.reference.pointer) + .object(const $ResponseBody$Type()); } - static final _id_create6 = _class.staticMethodId( + static final _id_create$6 = _class.staticMethodId( r'create', r'(Lokhttp3/MediaType;Lokio/ByteString;)Lokhttp3/ResponseBody;', ); - static final _create6 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$6 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, okio.ByteString byteString) + /// from: `static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, okio.ByteString byteString)` /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create6( - jni.JObject mediaType, + static ResponseBody create$6( + _$jni.JObject mediaType, ByteString byteString, ) { - return _create6(_class.reference.pointer, _id_create6 as jni.JMethodIDPtr, - mediaType.reference.pointer, byteString.reference.pointer) - .object(const $ResponseBodyType()); + return _create$6( + _class.reference.pointer, + _id_create$6 as _$jni.JMethodIDPtr, + mediaType.reference.pointer, + byteString.reference.pointer) + .object(const $ResponseBody$Type()); } - static final _id_create7 = _class.staticMethodId( + static final _id_create$7 = _class.staticMethodId( r'create', r'(Lokhttp3/MediaType;JLokio/BufferedSource;)Lokhttp3/ResponseBody;', ); - static final _create7 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _create$7 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Int64, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Int64, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + int, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, long j, okio.BufferedSource bufferedSource) + /// from: `static public final okhttp3.ResponseBody create(okhttp3.MediaType mediaType, long j, okio.BufferedSource bufferedSource)` /// The returned object must be released after use, by calling the [release] method. - static ResponseBody create7( - jni.JObject mediaType, + static ResponseBody create$7( + _$jni.JObject mediaType, int j, - jni.JObject bufferedSource, + _$jni.JObject bufferedSource, ) { - return _create7(_class.reference.pointer, _id_create7 as jni.JMethodIDPtr, - mediaType.reference.pointer, j, bufferedSource.reference.pointer) - .object(const $ResponseBodyType()); + return _create$7( + _class.reference.pointer, + _id_create$7 as _$jni.JMethodIDPtr, + mediaType.reference.pointer, + j, + bufferedSource.reference.pointer) + .object(const $ResponseBody$Type()); } } -final class $ResponseBodyType extends jni.JObjType { - const $ResponseBodyType(); +final class $ResponseBody$Type extends _$jni.JObjType { + @_$jni.internal + const $ResponseBody$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/ResponseBody;'; - @override - ResponseBody fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + ResponseBody fromReference(_$jni.JReference reference) => ResponseBody.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($ResponseBodyType).hashCode; + @_$core.override + int get hashCode => ($ResponseBody$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($ResponseBodyType) && - other is $ResponseBodyType; + return other.runtimeType == ($ResponseBody$Type) && + other is $ResponseBody$Type; } } -/// from: okhttp3.OkHttpClient$Builder -class OkHttpClient_Builder extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.OkHttpClient$Builder` +class OkHttpClient_Builder extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal OkHttpClient_Builder.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/OkHttpClient$Builder'); + static final _class = _$jni.JClass.forName(r'okhttp3/OkHttpClient$Builder'); /// The type which includes information such as the signature of this class. - static const type = $OkHttpClient_BuilderType(); - static final _id_new0 = _class.constructorId( + static const type = $OkHttpClient_Builder$Type(); + static final _id_new$ = _class.constructorId( r'()V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void () + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. factory OkHttpClient_Builder() { return OkHttpClient_Builder.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) .reference); } - static final _id_new1 = _class.constructorId( + static final _id_new$1 = _class.constructorId( r'(Lokhttp3/OkHttpClient;)V', ); - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (okhttp3.OkHttpClient okHttpClient) + /// from: `public void (okhttp3.OkHttpClient okHttpClient)` /// The returned object must be released after use, by calling the [release] method. - factory OkHttpClient_Builder.new1( + factory OkHttpClient_Builder.new$1( OkHttpClient okHttpClient, ) { - return OkHttpClient_Builder.fromReference(_new1(_class.reference.pointer, - _id_new1 as jni.JMethodIDPtr, okHttpClient.reference.pointer) + return OkHttpClient_Builder.fromReference(_new$1(_class.reference.pointer, + _id_new$1 as _$jni.JMethodIDPtr, okHttpClient.reference.pointer) .reference); } @@ -4323,25 +4596,25 @@ class OkHttpClient_Builder extends jni.JObject { r'(Lokhttp3/Dispatcher;)Lokhttp3/OkHttpClient$Builder;', ); - static final _dispatcher = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _dispatcher = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder dispatcher(okhttp3.Dispatcher dispatcher) + /// from: `public final okhttp3.OkHttpClient$Builder dispatcher(okhttp3.Dispatcher dispatcher)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder dispatcher( Dispatcher dispatcher, ) { - return _dispatcher(reference.pointer, _id_dispatcher as jni.JMethodIDPtr, + return _dispatcher(reference.pointer, _id_dispatcher as _$jni.JMethodIDPtr, dispatcher.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_connectionPool = _class.instanceMethodId( @@ -4349,27 +4622,27 @@ class OkHttpClient_Builder extends jni.JObject { r'(Lokhttp3/ConnectionPool;)Lokhttp3/OkHttpClient$Builder;', ); - static final _connectionPool = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _connectionPool = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder connectionPool(okhttp3.ConnectionPool connectionPool) + /// from: `public final okhttp3.OkHttpClient$Builder connectionPool(okhttp3.ConnectionPool connectionPool)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder connectionPool( ConnectionPool connectionPool, ) { return _connectionPool( reference.pointer, - _id_connectionPool as jni.JMethodIDPtr, + _id_connectionPool as _$jni.JMethodIDPtr, connectionPool.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_interceptors = _class.instanceMethodId( @@ -4377,24 +4650,24 @@ class OkHttpClient_Builder extends jni.JObject { r'()Ljava/util/List;', ); - static final _interceptors = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _interceptors = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.List interceptors() + /// from: `public final java.util.List interceptors()` /// The returned object must be released after use, by calling the [release] method. - jni.JList interceptors() { + _$jni.JList<_$jni.JObject> interceptors() { return _interceptors( - reference.pointer, _id_interceptors as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); + reference.pointer, _id_interceptors as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JObjectType())); } static final _id_addInterceptor = _class.instanceMethodId( @@ -4402,27 +4675,27 @@ class OkHttpClient_Builder extends jni.JObject { r'(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;', ); - static final _addInterceptor = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _addInterceptor = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder addInterceptor(okhttp3.Interceptor interceptor) + /// from: `public final okhttp3.OkHttpClient$Builder addInterceptor(okhttp3.Interceptor interceptor)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder addInterceptor( - jni.JObject interceptor, + _$jni.JObject interceptor, ) { return _addInterceptor( reference.pointer, - _id_addInterceptor as jni.JMethodIDPtr, + _id_addInterceptor as _$jni.JMethodIDPtr, interceptor.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_networkInterceptors = _class.instanceMethodId( @@ -4430,24 +4703,24 @@ class OkHttpClient_Builder extends jni.JObject { r'()Ljava/util/List;', ); - static final _networkInterceptors = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _networkInterceptors = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.List networkInterceptors() + /// from: `public final java.util.List networkInterceptors()` /// The returned object must be released after use, by calling the [release] method. - jni.JList networkInterceptors() { + _$jni.JList<_$jni.JObject> networkInterceptors() { return _networkInterceptors( - reference.pointer, _id_networkInterceptors as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); + reference.pointer, _id_networkInterceptors as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JObjectType())); } static final _id_addNetworkInterceptor = _class.instanceMethodId( @@ -4455,27 +4728,27 @@ class OkHttpClient_Builder extends jni.JObject { r'(Lokhttp3/Interceptor;)Lokhttp3/OkHttpClient$Builder;', ); - static final _addNetworkInterceptor = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _addNetworkInterceptor = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder addNetworkInterceptor(okhttp3.Interceptor interceptor) + /// from: `public final okhttp3.OkHttpClient$Builder addNetworkInterceptor(okhttp3.Interceptor interceptor)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder addNetworkInterceptor( - jni.JObject interceptor, + _$jni.JObject interceptor, ) { return _addNetworkInterceptor( reference.pointer, - _id_addNetworkInterceptor as jni.JMethodIDPtr, + _id_addNetworkInterceptor as _$jni.JMethodIDPtr, interceptor.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_eventListener = _class.instanceMethodId( @@ -4483,27 +4756,27 @@ class OkHttpClient_Builder extends jni.JObject { r'(Lokhttp3/EventListener;)Lokhttp3/OkHttpClient$Builder;', ); - static final _eventListener = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _eventListener = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder eventListener(okhttp3.EventListener eventListener) + /// from: `public final okhttp3.OkHttpClient$Builder eventListener(okhttp3.EventListener eventListener)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder eventListener( - jni.JObject eventListener, + _$jni.JObject eventListener, ) { return _eventListener( reference.pointer, - _id_eventListener as jni.JMethodIDPtr, + _id_eventListener as _$jni.JMethodIDPtr, eventListener.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_eventListenerFactory = _class.instanceMethodId( @@ -4511,27 +4784,27 @@ class OkHttpClient_Builder extends jni.JObject { r'(Lokhttp3/EventListener$Factory;)Lokhttp3/OkHttpClient$Builder;', ); - static final _eventListenerFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _eventListenerFactory = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder eventListenerFactory(okhttp3.EventListener$Factory factory) + /// from: `public final okhttp3.OkHttpClient$Builder eventListenerFactory(okhttp3.EventListener$Factory factory)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder eventListenerFactory( - jni.JObject factory0, + _$jni.JObject factory, ) { return _eventListenerFactory( reference.pointer, - _id_eventListenerFactory as jni.JMethodIDPtr, - factory0.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + _id_eventListenerFactory as _$jni.JMethodIDPtr, + factory.reference.pointer) + .object(const $OkHttpClient_Builder$Type()); } static final _id_retryOnConnectionFailure = _class.instanceMethodId( @@ -4539,22 +4812,24 @@ class OkHttpClient_Builder extends jni.JObject { r'(Z)Lokhttp3/OkHttpClient$Builder;', ); - static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + static final _retryOnConnectionFailure = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public final okhttp3.OkHttpClient$Builder retryOnConnectionFailure(boolean z) + /// from: `public final okhttp3.OkHttpClient$Builder retryOnConnectionFailure(boolean z)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder retryOnConnectionFailure( bool z, ) { return _retryOnConnectionFailure(reference.pointer, - _id_retryOnConnectionFailure as jni.JMethodIDPtr, z ? 1 : 0) - .object(const $OkHttpClient_BuilderType()); + _id_retryOnConnectionFailure as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(const $OkHttpClient_Builder$Type()); } static final _id_authenticator = _class.instanceMethodId( @@ -4562,27 +4837,27 @@ class OkHttpClient_Builder extends jni.JObject { r'(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;', ); - static final _authenticator = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _authenticator = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder authenticator(okhttp3.Authenticator authenticator) + /// from: `public final okhttp3.OkHttpClient$Builder authenticator(okhttp3.Authenticator authenticator)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder authenticator( - jni.JObject authenticator, + _$jni.JObject authenticator, ) { return _authenticator( reference.pointer, - _id_authenticator as jni.JMethodIDPtr, + _id_authenticator as _$jni.JMethodIDPtr, authenticator.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_followRedirects = _class.instanceMethodId( @@ -4590,22 +4865,24 @@ class OkHttpClient_Builder extends jni.JObject { r'(Z)Lokhttp3/OkHttpClient$Builder;', ); - static final _followRedirects = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + static final _followRedirects = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public final okhttp3.OkHttpClient$Builder followRedirects(boolean z) + /// from: `public final okhttp3.OkHttpClient$Builder followRedirects(boolean z)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder followRedirects( bool z, ) { return _followRedirects(reference.pointer, - _id_followRedirects as jni.JMethodIDPtr, z ? 1 : 0) - .object(const $OkHttpClient_BuilderType()); + _id_followRedirects as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(const $OkHttpClient_Builder$Type()); } static final _id_followSslRedirects = _class.instanceMethodId( @@ -4613,22 +4890,24 @@ class OkHttpClient_Builder extends jni.JObject { r'(Z)Lokhttp3/OkHttpClient$Builder;', ); - static final _followSslRedirects = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + static final _followSslRedirects = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public final okhttp3.OkHttpClient$Builder followSslRedirects(boolean z) + /// from: `public final okhttp3.OkHttpClient$Builder followSslRedirects(boolean z)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder followSslRedirects( bool z, ) { return _followSslRedirects(reference.pointer, - _id_followSslRedirects as jni.JMethodIDPtr, z ? 1 : 0) - .object(const $OkHttpClient_BuilderType()); + _id_followSslRedirects as _$jni.JMethodIDPtr, z ? 1 : 0) + .object(const $OkHttpClient_Builder$Type()); } static final _id_cookieJar = _class.instanceMethodId( @@ -4636,25 +4915,25 @@ class OkHttpClient_Builder extends jni.JObject { r'(Lokhttp3/CookieJar;)Lokhttp3/OkHttpClient$Builder;', ); - static final _cookieJar = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _cookieJar = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder cookieJar(okhttp3.CookieJar cookieJar) + /// from: `public final okhttp3.OkHttpClient$Builder cookieJar(okhttp3.CookieJar cookieJar)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder cookieJar( - jni.JObject cookieJar, + _$jni.JObject cookieJar, ) { - return _cookieJar(reference.pointer, _id_cookieJar as jni.JMethodIDPtr, + return _cookieJar(reference.pointer, _id_cookieJar as _$jni.JMethodIDPtr, cookieJar.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_cache = _class.instanceMethodId( @@ -4662,25 +4941,25 @@ class OkHttpClient_Builder extends jni.JObject { r'(Lokhttp3/Cache;)Lokhttp3/OkHttpClient$Builder;', ); - static final _cache = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _cache = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder cache(okhttp3.Cache cache) + /// from: `public final okhttp3.OkHttpClient$Builder cache(okhttp3.Cache cache)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder cache( Cache cache, ) { - return _cache(reference.pointer, _id_cache as jni.JMethodIDPtr, + return _cache(reference.pointer, _id_cache as _$jni.JMethodIDPtr, cache.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_dns = _class.instanceMethodId( @@ -4688,25 +4967,25 @@ class OkHttpClient_Builder extends jni.JObject { r'(Lokhttp3/Dns;)Lokhttp3/OkHttpClient$Builder;', ); - static final _dns = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _dns = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder dns(okhttp3.Dns dns) + /// from: `public final okhttp3.OkHttpClient$Builder dns(okhttp3.Dns dns)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder dns( - jni.JObject dns, + _$jni.JObject dns, ) { - return _dns(reference.pointer, _id_dns as jni.JMethodIDPtr, + return _dns(reference.pointer, _id_dns as _$jni.JMethodIDPtr, dns.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_proxy = _class.instanceMethodId( @@ -4714,25 +4993,25 @@ class OkHttpClient_Builder extends jni.JObject { r'(Ljava/net/Proxy;)Lokhttp3/OkHttpClient$Builder;', ); - static final _proxy = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _proxy = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder proxy(java.net.Proxy proxy) + /// from: `public final okhttp3.OkHttpClient$Builder proxy(java.net.Proxy proxy)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder proxy( - jni.JObject proxy, + _$jni.JObject proxy, ) { - return _proxy(reference.pointer, _id_proxy as jni.JMethodIDPtr, + return _proxy(reference.pointer, _id_proxy as _$jni.JMethodIDPtr, proxy.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_proxySelector = _class.instanceMethodId( @@ -4740,27 +5019,27 @@ class OkHttpClient_Builder extends jni.JObject { r'(Ljava/net/ProxySelector;)Lokhttp3/OkHttpClient$Builder;', ); - static final _proxySelector = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _proxySelector = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder proxySelector(java.net.ProxySelector proxySelector) + /// from: `public final okhttp3.OkHttpClient$Builder proxySelector(java.net.ProxySelector proxySelector)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder proxySelector( - jni.JObject proxySelector, + _$jni.JObject proxySelector, ) { return _proxySelector( reference.pointer, - _id_proxySelector as jni.JMethodIDPtr, + _id_proxySelector as _$jni.JMethodIDPtr, proxySelector.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_proxyAuthenticator = _class.instanceMethodId( @@ -4768,27 +5047,27 @@ class OkHttpClient_Builder extends jni.JObject { r'(Lokhttp3/Authenticator;)Lokhttp3/OkHttpClient$Builder;', ); - static final _proxyAuthenticator = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _proxyAuthenticator = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder proxyAuthenticator(okhttp3.Authenticator authenticator) + /// from: `public final okhttp3.OkHttpClient$Builder proxyAuthenticator(okhttp3.Authenticator authenticator)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder proxyAuthenticator( - jni.JObject authenticator, + _$jni.JObject authenticator, ) { return _proxyAuthenticator( reference.pointer, - _id_proxyAuthenticator as jni.JMethodIDPtr, + _id_proxyAuthenticator as _$jni.JMethodIDPtr, authenticator.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_socketFactory = _class.instanceMethodId( @@ -4796,27 +5075,27 @@ class OkHttpClient_Builder extends jni.JObject { r'(Ljavax/net/SocketFactory;)Lokhttp3/OkHttpClient$Builder;', ); - static final _socketFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _socketFactory = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder socketFactory(javax.net.SocketFactory socketFactory) + /// from: `public final okhttp3.OkHttpClient$Builder socketFactory(javax.net.SocketFactory socketFactory)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder socketFactory( - jni.JObject socketFactory, + _$jni.JObject socketFactory, ) { return _socketFactory( reference.pointer, - _id_socketFactory as jni.JMethodIDPtr, + _id_socketFactory as _$jni.JMethodIDPtr, socketFactory.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_sslSocketFactory = _class.instanceMethodId( @@ -4824,60 +5103,63 @@ class OkHttpClient_Builder extends jni.JObject { r'(Ljavax/net/ssl/SSLSocketFactory;)Lokhttp3/OkHttpClient$Builder;', ); - static final _sslSocketFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _sslSocketFactory = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder sslSocketFactory(javax.net.ssl.SSLSocketFactory sSLSocketFactory) + /// from: `public final okhttp3.OkHttpClient$Builder sslSocketFactory(javax.net.ssl.SSLSocketFactory sSLSocketFactory)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder sslSocketFactory( - jni.JObject sSLSocketFactory, + _$jni.JObject sSLSocketFactory, ) { return _sslSocketFactory( reference.pointer, - _id_sslSocketFactory as jni.JMethodIDPtr, + _id_sslSocketFactory as _$jni.JMethodIDPtr, sSLSocketFactory.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } - static final _id_sslSocketFactory1 = _class.instanceMethodId( + static final _id_sslSocketFactory$1 = _class.instanceMethodId( r'sslSocketFactory', r'(Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/X509TrustManager;)Lokhttp3/OkHttpClient$Builder;', ); - static final _sslSocketFactory1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _sslSocketFactory$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder sslSocketFactory(javax.net.ssl.SSLSocketFactory sSLSocketFactory, javax.net.ssl.X509TrustManager x509TrustManager) + /// from: `public final okhttp3.OkHttpClient$Builder sslSocketFactory(javax.net.ssl.SSLSocketFactory sSLSocketFactory, javax.net.ssl.X509TrustManager x509TrustManager)` /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder sslSocketFactory1( - jni.JObject sSLSocketFactory, - jni.JObject x509TrustManager, + OkHttpClient_Builder sslSocketFactory$1( + _$jni.JObject sSLSocketFactory, + _$jni.JObject x509TrustManager, ) { - return _sslSocketFactory1( + return _sslSocketFactory$1( reference.pointer, - _id_sslSocketFactory1 as jni.JMethodIDPtr, + _id_sslSocketFactory$1 as _$jni.JMethodIDPtr, sSLSocketFactory.reference.pointer, x509TrustManager.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_connectionSpecs = _class.instanceMethodId( @@ -4885,25 +5167,25 @@ class OkHttpClient_Builder extends jni.JObject { r'(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;', ); - static final _connectionSpecs = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _connectionSpecs = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder connectionSpecs(java.util.List list) + /// from: `public final okhttp3.OkHttpClient$Builder connectionSpecs(java.util.List list)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder connectionSpecs( - jni.JList list, + _$jni.JList<_$jni.JObject> list, ) { return _connectionSpecs(reference.pointer, - _id_connectionSpecs as jni.JMethodIDPtr, list.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + _id_connectionSpecs as _$jni.JMethodIDPtr, list.reference.pointer) + .object(const $OkHttpClient_Builder$Type()); } static final _id_protocols = _class.instanceMethodId( @@ -4911,25 +5193,25 @@ class OkHttpClient_Builder extends jni.JObject { r'(Ljava/util/List;)Lokhttp3/OkHttpClient$Builder;', ); - static final _protocols = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _protocols = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder protocols(java.util.List list) + /// from: `public final okhttp3.OkHttpClient$Builder protocols(java.util.List list)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder protocols( - jni.JList list, + _$jni.JList<_$jni.JObject> list, ) { - return _protocols(reference.pointer, _id_protocols as jni.JMethodIDPtr, + return _protocols(reference.pointer, _id_protocols as _$jni.JMethodIDPtr, list.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_hostnameVerifier = _class.instanceMethodId( @@ -4937,27 +5219,27 @@ class OkHttpClient_Builder extends jni.JObject { r'(Ljavax/net/ssl/HostnameVerifier;)Lokhttp3/OkHttpClient$Builder;', ); - static final _hostnameVerifier = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _hostnameVerifier = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder hostnameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier) + /// from: `public final okhttp3.OkHttpClient$Builder hostnameVerifier(javax.net.ssl.HostnameVerifier hostnameVerifier)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder hostnameVerifier( - jni.JObject hostnameVerifier, + _$jni.JObject hostnameVerifier, ) { return _hostnameVerifier( reference.pointer, - _id_hostnameVerifier as jni.JMethodIDPtr, + _id_hostnameVerifier as _$jni.JMethodIDPtr, hostnameVerifier.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_certificatePinner = _class.instanceMethodId( @@ -4965,27 +5247,27 @@ class OkHttpClient_Builder extends jni.JObject { r'(Lokhttp3/CertificatePinner;)Lokhttp3/OkHttpClient$Builder;', ); - static final _certificatePinner = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _certificatePinner = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder certificatePinner(okhttp3.CertificatePinner certificatePinner) + /// from: `public final okhttp3.OkHttpClient$Builder certificatePinner(okhttp3.CertificatePinner certificatePinner)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder certificatePinner( - jni.JObject certificatePinner, + _$jni.JObject certificatePinner, ) { return _certificatePinner( reference.pointer, - _id_certificatePinner as jni.JMethodIDPtr, + _id_certificatePinner as _$jni.JMethodIDPtr, certificatePinner.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } static final _id_callTimeout = _class.instanceMethodId( @@ -4993,52 +5275,56 @@ class OkHttpClient_Builder extends jni.JObject { r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); - static final _callTimeout = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + static final _callTimeout = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Int64, _$jni.Pointer<_$jni.Void>)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder callTimeout(long j, java.util.concurrent.TimeUnit timeUnit) + /// from: `public final okhttp3.OkHttpClient$Builder callTimeout(long j, java.util.concurrent.TimeUnit timeUnit)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder callTimeout( int j, TimeUnit timeUnit, ) { - return _callTimeout(reference.pointer, _id_callTimeout as jni.JMethodIDPtr, - j, timeUnit.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + return _callTimeout( + reference.pointer, + _id_callTimeout as _$jni.JMethodIDPtr, + j, + timeUnit.reference.pointer) + .object(const $OkHttpClient_Builder$Type()); } - static final _id_callTimeout1 = _class.instanceMethodId( + static final _id_callTimeout$1 = _class.instanceMethodId( r'callTimeout', r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); - static final _callTimeout1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _callTimeout$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder callTimeout(java.time.Duration duration) + /// from: `public final okhttp3.OkHttpClient$Builder callTimeout(java.time.Duration duration)` /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder callTimeout1( - jni.JObject duration, + OkHttpClient_Builder callTimeout$1( + _$jni.JObject duration, ) { - return _callTimeout1(reference.pointer, - _id_callTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + return _callTimeout$1(reference.pointer, + _id_callTimeout$1 as _$jni.JMethodIDPtr, duration.reference.pointer) + .object(const $OkHttpClient_Builder$Type()); } static final _id_connectTimeout = _class.instanceMethodId( @@ -5046,18 +5332,19 @@ class OkHttpClient_Builder extends jni.JObject { r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); - static final _connectTimeout = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + static final _connectTimeout = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Int64, _$jni.Pointer<_$jni.Void>)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder connectTimeout(long j, java.util.concurrent.TimeUnit timeUnit) + /// from: `public final okhttp3.OkHttpClient$Builder connectTimeout(long j, java.util.concurrent.TimeUnit timeUnit)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder connectTimeout( int j, @@ -5065,36 +5352,38 @@ class OkHttpClient_Builder extends jni.JObject { ) { return _connectTimeout( reference.pointer, - _id_connectTimeout as jni.JMethodIDPtr, + _id_connectTimeout as _$jni.JMethodIDPtr, j, timeUnit.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } - static final _id_connectTimeout1 = _class.instanceMethodId( + static final _id_connectTimeout$1 = _class.instanceMethodId( r'connectTimeout', r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); - static final _connectTimeout1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _connectTimeout$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder connectTimeout(java.time.Duration duration) + /// from: `public final okhttp3.OkHttpClient$Builder connectTimeout(java.time.Duration duration)` /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder connectTimeout1( - jni.JObject duration, + OkHttpClient_Builder connectTimeout$1( + _$jni.JObject duration, ) { - return _connectTimeout1(reference.pointer, - _id_connectTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + return _connectTimeout$1( + reference.pointer, + _id_connectTimeout$1 as _$jni.JMethodIDPtr, + duration.reference.pointer) + .object(const $OkHttpClient_Builder$Type()); } static final _id_readTimeout = _class.instanceMethodId( @@ -5102,52 +5391,56 @@ class OkHttpClient_Builder extends jni.JObject { r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); - static final _readTimeout = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + static final _readTimeout = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Int64, _$jni.Pointer<_$jni.Void>)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder readTimeout(long j, java.util.concurrent.TimeUnit timeUnit) + /// from: `public final okhttp3.OkHttpClient$Builder readTimeout(long j, java.util.concurrent.TimeUnit timeUnit)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder readTimeout( int j, TimeUnit timeUnit, ) { - return _readTimeout(reference.pointer, _id_readTimeout as jni.JMethodIDPtr, - j, timeUnit.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + return _readTimeout( + reference.pointer, + _id_readTimeout as _$jni.JMethodIDPtr, + j, + timeUnit.reference.pointer) + .object(const $OkHttpClient_Builder$Type()); } - static final _id_readTimeout1 = _class.instanceMethodId( + static final _id_readTimeout$1 = _class.instanceMethodId( r'readTimeout', r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); - static final _readTimeout1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _readTimeout$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder readTimeout(java.time.Duration duration) + /// from: `public final okhttp3.OkHttpClient$Builder readTimeout(java.time.Duration duration)` /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder readTimeout1( - jni.JObject duration, + OkHttpClient_Builder readTimeout$1( + _$jni.JObject duration, ) { - return _readTimeout1(reference.pointer, - _id_readTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + return _readTimeout$1(reference.pointer, + _id_readTimeout$1 as _$jni.JMethodIDPtr, duration.reference.pointer) + .object(const $OkHttpClient_Builder$Type()); } static final _id_writeTimeout = _class.instanceMethodId( @@ -5155,52 +5448,58 @@ class OkHttpClient_Builder extends jni.JObject { r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); - static final _writeTimeout = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + static final _writeTimeout = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Int64, _$jni.Pointer<_$jni.Void>)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder writeTimeout(long j, java.util.concurrent.TimeUnit timeUnit) + /// from: `public final okhttp3.OkHttpClient$Builder writeTimeout(long j, java.util.concurrent.TimeUnit timeUnit)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder writeTimeout( int j, TimeUnit timeUnit, ) { - return _writeTimeout(reference.pointer, - _id_writeTimeout as jni.JMethodIDPtr, j, timeUnit.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + return _writeTimeout( + reference.pointer, + _id_writeTimeout as _$jni.JMethodIDPtr, + j, + timeUnit.reference.pointer) + .object(const $OkHttpClient_Builder$Type()); } - static final _id_writeTimeout1 = _class.instanceMethodId( + static final _id_writeTimeout$1 = _class.instanceMethodId( r'writeTimeout', r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); - static final _writeTimeout1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _writeTimeout$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder writeTimeout(java.time.Duration duration) + /// from: `public final okhttp3.OkHttpClient$Builder writeTimeout(java.time.Duration duration)` /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder writeTimeout1( - jni.JObject duration, + OkHttpClient_Builder writeTimeout$1( + _$jni.JObject duration, ) { - return _writeTimeout1(reference.pointer, - _id_writeTimeout1 as jni.JMethodIDPtr, duration.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + return _writeTimeout$1( + reference.pointer, + _id_writeTimeout$1 as _$jni.JMethodIDPtr, + duration.reference.pointer) + .object(const $OkHttpClient_Builder$Type()); } static final _id_pingInterval = _class.instanceMethodId( @@ -5208,52 +5507,58 @@ class OkHttpClient_Builder extends jni.JObject { r'(JLjava/util/concurrent/TimeUnit;)Lokhttp3/OkHttpClient$Builder;', ); - static final _pingInterval = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + static final _pingInterval = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Int64, _$jni.Pointer<_$jni.Void>)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder pingInterval(long j, java.util.concurrent.TimeUnit timeUnit) + /// from: `public final okhttp3.OkHttpClient$Builder pingInterval(long j, java.util.concurrent.TimeUnit timeUnit)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder pingInterval( int j, TimeUnit timeUnit, ) { - return _pingInterval(reference.pointer, - _id_pingInterval as jni.JMethodIDPtr, j, timeUnit.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + return _pingInterval( + reference.pointer, + _id_pingInterval as _$jni.JMethodIDPtr, + j, + timeUnit.reference.pointer) + .object(const $OkHttpClient_Builder$Type()); } - static final _id_pingInterval1 = _class.instanceMethodId( + static final _id_pingInterval$1 = _class.instanceMethodId( r'pingInterval', r'(Ljava/time/Duration;)Lokhttp3/OkHttpClient$Builder;', ); - static final _pingInterval1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _pingInterval$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder pingInterval(java.time.Duration duration) + /// from: `public final okhttp3.OkHttpClient$Builder pingInterval(java.time.Duration duration)` /// The returned object must be released after use, by calling the [release] method. - OkHttpClient_Builder pingInterval1( - jni.JObject duration, + OkHttpClient_Builder pingInterval$1( + _$jni.JObject duration, ) { - return _pingInterval1(reference.pointer, - _id_pingInterval1 as jni.JMethodIDPtr, duration.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + return _pingInterval$1( + reference.pointer, + _id_pingInterval$1 as _$jni.JMethodIDPtr, + duration.reference.pointer) + .object(const $OkHttpClient_Builder$Type()); } static final _id_minWebSocketMessageToCompress = _class.instanceMethodId( @@ -5261,22 +5566,24 @@ class OkHttpClient_Builder extends jni.JObject { r'(J)Lokhttp3/OkHttpClient$Builder;', ); - static final _minWebSocketMessageToCompress = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallObjectMethod') - .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + static final _minWebSocketMessageToCompress = + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.VarArgs<(_$jni.Int64,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public final okhttp3.OkHttpClient$Builder minWebSocketMessageToCompress(long j) + /// from: `public final okhttp3.OkHttpClient$Builder minWebSocketMessageToCompress(long j)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder minWebSocketMessageToCompress( int j, ) { return _minWebSocketMessageToCompress(reference.pointer, - _id_minWebSocketMessageToCompress as jni.JMethodIDPtr, j) - .object(const $OkHttpClient_BuilderType()); + _id_minWebSocketMessageToCompress as _$jni.JMethodIDPtr, j) + .object(const $OkHttpClient_Builder$Type()); } static final _id_build = _class.instanceMethodId( @@ -5284,166 +5591,182 @@ class OkHttpClient_Builder extends jni.JObject { r'()Lokhttp3/OkHttpClient;', ); - static final _build = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _build = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.OkHttpClient build() + /// from: `public final okhttp3.OkHttpClient build()` /// The returned object must be released after use, by calling the [release] method. OkHttpClient build() { - return _build(reference.pointer, _id_build as jni.JMethodIDPtr) - .object(const $OkHttpClientType()); + return _build(reference.pointer, _id_build as _$jni.JMethodIDPtr) + .object(const $OkHttpClient$Type()); } } -final class $OkHttpClient_BuilderType - extends jni.JObjType { - const $OkHttpClient_BuilderType(); +final class $OkHttpClient_Builder$Type + extends _$jni.JObjType { + @_$jni.internal + const $OkHttpClient_Builder$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/OkHttpClient$Builder;'; - @override - OkHttpClient_Builder fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + OkHttpClient_Builder fromReference(_$jni.JReference reference) => OkHttpClient_Builder.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($OkHttpClient_BuilderType).hashCode; + @_$core.override + int get hashCode => ($OkHttpClient_Builder$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($OkHttpClient_BuilderType) && - other is $OkHttpClient_BuilderType; + return other.runtimeType == ($OkHttpClient_Builder$Type) && + other is $OkHttpClient_Builder$Type; } } -/// from: okhttp3.OkHttpClient$Companion -class OkHttpClient_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.OkHttpClient$Companion` +class OkHttpClient_Companion extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal OkHttpClient_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/OkHttpClient$Companion'); + static final _class = _$jni.JClass.forName(r'okhttp3/OkHttpClient$Companion'); /// The type which includes information such as the signature of this class. - static const type = $OkHttpClient_CompanionType(); - static final _id_new0 = _class.constructorId( + static const type = $OkHttpClient_Companion$Type(); + static final _id_new$ = _class.constructorId( r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` /// The returned object must be released after use, by calling the [release] method. factory OkHttpClient_Companion( - jni.JObject defaultConstructorMarker, + _$jni.JObject defaultConstructorMarker, ) { - return OkHttpClient_Companion.fromReference(_new0( + return OkHttpClient_Companion.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, defaultConstructorMarker.reference.pointer) .reference); } } -final class $OkHttpClient_CompanionType - extends jni.JObjType { - const $OkHttpClient_CompanionType(); +final class $OkHttpClient_Companion$Type + extends _$jni.JObjType { + @_$jni.internal + const $OkHttpClient_Companion$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/OkHttpClient$Companion;'; - @override - OkHttpClient_Companion fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + OkHttpClient_Companion fromReference(_$jni.JReference reference) => OkHttpClient_Companion.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($OkHttpClient_CompanionType).hashCode; + @_$core.override + int get hashCode => ($OkHttpClient_Companion$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($OkHttpClient_CompanionType) && - other is $OkHttpClient_CompanionType; + return other.runtimeType == ($OkHttpClient_Companion$Type) && + other is $OkHttpClient_Companion$Type; } } -/// from: okhttp3.OkHttpClient -class OkHttpClient extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.OkHttpClient` +class OkHttpClient extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal OkHttpClient.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/OkHttpClient'); + static final _class = _$jni.JClass.forName(r'okhttp3/OkHttpClient'); /// The type which includes information such as the signature of this class. - static const type = $OkHttpClientType(); + static const type = $OkHttpClient$Type(); static final _id_Companion = _class.staticFieldId( r'Companion', r'Lokhttp3/OkHttpClient$Companion;', ); - /// from: static public final okhttp3.OkHttpClient$Companion Companion + /// from: `static public final okhttp3.OkHttpClient$Companion Companion` /// The returned object must be released after use, by calling the [release] method. static OkHttpClient_Companion get Companion => - _id_Companion.get(_class, const $OkHttpClient_CompanionType()); + _id_Companion.get(_class, const $OkHttpClient_Companion$Type()); - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'(Lokhttp3/OkHttpClient$Builder;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (okhttp3.OkHttpClient$Builder builder) + /// from: `public void (okhttp3.OkHttpClient$Builder builder)` /// The returned object must be released after use, by calling the [release] method. factory OkHttpClient( OkHttpClient_Builder builder, ) { - return OkHttpClient.fromReference(_new0(_class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, builder.reference.pointer) + return OkHttpClient.fromReference(_new$(_class.reference.pointer, + _id_new$ as _$jni.JMethodIDPtr, builder.reference.pointer) .reference); } @@ -5452,23 +5775,23 @@ class OkHttpClient extends jni.JObject { r'()Lokhttp3/Dispatcher;', ); - static final _dispatcher = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _dispatcher = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Dispatcher dispatcher() + /// from: `public final okhttp3.Dispatcher dispatcher()` /// The returned object must be released after use, by calling the [release] method. Dispatcher dispatcher() { - return _dispatcher(reference.pointer, _id_dispatcher as jni.JMethodIDPtr) - .object(const $DispatcherType()); + return _dispatcher(reference.pointer, _id_dispatcher as _$jni.JMethodIDPtr) + .object(const $Dispatcher$Type()); } static final _id_connectionPool = _class.instanceMethodId( @@ -5476,24 +5799,24 @@ class OkHttpClient extends jni.JObject { r'()Lokhttp3/ConnectionPool;', ); - static final _connectionPool = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _connectionPool = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.ConnectionPool connectionPool() + /// from: `public final okhttp3.ConnectionPool connectionPool()` /// The returned object must be released after use, by calling the [release] method. ConnectionPool connectionPool() { return _connectionPool( - reference.pointer, _id_connectionPool as jni.JMethodIDPtr) - .object(const $ConnectionPoolType()); + reference.pointer, _id_connectionPool as _$jni.JMethodIDPtr) + .object(const $ConnectionPool$Type()); } static final _id_interceptors = _class.instanceMethodId( @@ -5501,24 +5824,24 @@ class OkHttpClient extends jni.JObject { r'()Ljava/util/List;', ); - static final _interceptors = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _interceptors = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.List interceptors() + /// from: `public final java.util.List interceptors()` /// The returned object must be released after use, by calling the [release] method. - jni.JList interceptors() { + _$jni.JList<_$jni.JObject> interceptors() { return _interceptors( - reference.pointer, _id_interceptors as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); + reference.pointer, _id_interceptors as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JObjectType())); } static final _id_networkInterceptors = _class.instanceMethodId( @@ -5526,24 +5849,24 @@ class OkHttpClient extends jni.JObject { r'()Ljava/util/List;', ); - static final _networkInterceptors = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _networkInterceptors = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.List networkInterceptors() + /// from: `public final java.util.List networkInterceptors()` /// The returned object must be released after use, by calling the [release] method. - jni.JList networkInterceptors() { + _$jni.JList<_$jni.JObject> networkInterceptors() { return _networkInterceptors( - reference.pointer, _id_networkInterceptors as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); + reference.pointer, _id_networkInterceptors as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JObjectType())); } static final _id_eventListenerFactory = _class.instanceMethodId( @@ -5551,24 +5874,24 @@ class OkHttpClient extends jni.JObject { r'()Lokhttp3/EventListener$Factory;', ); - static final _eventListenerFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _eventListenerFactory = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.EventListener$Factory eventListenerFactory() + /// from: `public final okhttp3.EventListener$Factory eventListenerFactory()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject eventListenerFactory() { + _$jni.JObject eventListenerFactory() { return _eventListenerFactory( - reference.pointer, _id_eventListenerFactory as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_eventListenerFactory as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_retryOnConnectionFailure = _class.instanceMethodId( @@ -5576,22 +5899,22 @@ class OkHttpClient extends jni.JObject { r'()Z', ); - static final _retryOnConnectionFailure = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _retryOnConnectionFailure = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final boolean retryOnConnectionFailure() + /// from: `public final boolean retryOnConnectionFailure()` bool retryOnConnectionFailure() { - return _retryOnConnectionFailure( - reference.pointer, _id_retryOnConnectionFailure as jni.JMethodIDPtr) + return _retryOnConnectionFailure(reference.pointer, + _id_retryOnConnectionFailure as _$jni.JMethodIDPtr) .boolean; } @@ -5600,24 +5923,24 @@ class OkHttpClient extends jni.JObject { r'()Lokhttp3/Authenticator;', ); - static final _authenticator = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _authenticator = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Authenticator authenticator() + /// from: `public final okhttp3.Authenticator authenticator()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject authenticator() { + _$jni.JObject authenticator() { return _authenticator( - reference.pointer, _id_authenticator as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_authenticator as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_followRedirects = _class.instanceMethodId( @@ -5625,22 +5948,22 @@ class OkHttpClient extends jni.JObject { r'()Z', ); - static final _followRedirects = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _followRedirects = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final boolean followRedirects() + /// from: `public final boolean followRedirects()` bool followRedirects() { return _followRedirects( - reference.pointer, _id_followRedirects as jni.JMethodIDPtr) + reference.pointer, _id_followRedirects as _$jni.JMethodIDPtr) .boolean; } @@ -5649,22 +5972,22 @@ class OkHttpClient extends jni.JObject { r'()Z', ); - static final _followSslRedirects = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _followSslRedirects = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final boolean followSslRedirects() + /// from: `public final boolean followSslRedirects()` bool followSslRedirects() { return _followSslRedirects( - reference.pointer, _id_followSslRedirects as jni.JMethodIDPtr) + reference.pointer, _id_followSslRedirects as _$jni.JMethodIDPtr) .boolean; } @@ -5673,23 +5996,23 @@ class OkHttpClient extends jni.JObject { r'()Lokhttp3/CookieJar;', ); - static final _cookieJar = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _cookieJar = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.CookieJar cookieJar() + /// from: `public final okhttp3.CookieJar cookieJar()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject cookieJar() { - return _cookieJar(reference.pointer, _id_cookieJar as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject cookieJar() { + return _cookieJar(reference.pointer, _id_cookieJar as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_cache = _class.instanceMethodId( @@ -5697,23 +6020,23 @@ class OkHttpClient extends jni.JObject { r'()Lokhttp3/Cache;', ); - static final _cache = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _cache = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Cache cache() + /// from: `public final okhttp3.Cache cache()` /// The returned object must be released after use, by calling the [release] method. Cache cache() { - return _cache(reference.pointer, _id_cache as jni.JMethodIDPtr) - .object(const $CacheType()); + return _cache(reference.pointer, _id_cache as _$jni.JMethodIDPtr) + .object(const $Cache$Type()); } static final _id_dns = _class.instanceMethodId( @@ -5721,23 +6044,23 @@ class OkHttpClient extends jni.JObject { r'()Lokhttp3/Dns;', ); - static final _dns = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _dns = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Dns dns() + /// from: `public final okhttp3.Dns dns()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject dns() { - return _dns(reference.pointer, _id_dns as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject dns() { + return _dns(reference.pointer, _id_dns as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_proxy = _class.instanceMethodId( @@ -5745,23 +6068,23 @@ class OkHttpClient extends jni.JObject { r'()Ljava/net/Proxy;', ); - static final _proxy = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _proxy = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.net.Proxy proxy() + /// from: `public final java.net.Proxy proxy()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject proxy() { - return _proxy(reference.pointer, _id_proxy as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject proxy() { + return _proxy(reference.pointer, _id_proxy as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_proxySelector = _class.instanceMethodId( @@ -5769,24 +6092,24 @@ class OkHttpClient extends jni.JObject { r'()Ljava/net/ProxySelector;', ); - static final _proxySelector = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _proxySelector = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.net.ProxySelector proxySelector() + /// from: `public final java.net.ProxySelector proxySelector()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject proxySelector() { + _$jni.JObject proxySelector() { return _proxySelector( - reference.pointer, _id_proxySelector as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_proxySelector as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_proxyAuthenticator = _class.instanceMethodId( @@ -5794,24 +6117,24 @@ class OkHttpClient extends jni.JObject { r'()Lokhttp3/Authenticator;', ); - static final _proxyAuthenticator = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _proxyAuthenticator = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Authenticator proxyAuthenticator() + /// from: `public final okhttp3.Authenticator proxyAuthenticator()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject proxyAuthenticator() { + _$jni.JObject proxyAuthenticator() { return _proxyAuthenticator( - reference.pointer, _id_proxyAuthenticator as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_proxyAuthenticator as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_socketFactory = _class.instanceMethodId( @@ -5819,24 +6142,24 @@ class OkHttpClient extends jni.JObject { r'()Ljavax/net/SocketFactory;', ); - static final _socketFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _socketFactory = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final javax.net.SocketFactory socketFactory() + /// from: `public final javax.net.SocketFactory socketFactory()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject socketFactory() { + _$jni.JObject socketFactory() { return _socketFactory( - reference.pointer, _id_socketFactory as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_socketFactory as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_sslSocketFactory = _class.instanceMethodId( @@ -5844,24 +6167,24 @@ class OkHttpClient extends jni.JObject { r'()Ljavax/net/ssl/SSLSocketFactory;', ); - static final _sslSocketFactory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _sslSocketFactory = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final javax.net.ssl.SSLSocketFactory sslSocketFactory() + /// from: `public final javax.net.ssl.SSLSocketFactory sslSocketFactory()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject sslSocketFactory() { + _$jni.JObject sslSocketFactory() { return _sslSocketFactory( - reference.pointer, _id_sslSocketFactory as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_sslSocketFactory as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_x509TrustManager = _class.instanceMethodId( @@ -5869,24 +6192,24 @@ class OkHttpClient extends jni.JObject { r'()Ljavax/net/ssl/X509TrustManager;', ); - static final _x509TrustManager = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _x509TrustManager = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final javax.net.ssl.X509TrustManager x509TrustManager() + /// from: `public final javax.net.ssl.X509TrustManager x509TrustManager()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject x509TrustManager() { + _$jni.JObject x509TrustManager() { return _x509TrustManager( - reference.pointer, _id_x509TrustManager as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_x509TrustManager as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_connectionSpecs = _class.instanceMethodId( @@ -5894,24 +6217,24 @@ class OkHttpClient extends jni.JObject { r'()Ljava/util/List;', ); - static final _connectionSpecs = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _connectionSpecs = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.List connectionSpecs() + /// from: `public final java.util.List connectionSpecs()` /// The returned object must be released after use, by calling the [release] method. - jni.JList connectionSpecs() { + _$jni.JList<_$jni.JObject> connectionSpecs() { return _connectionSpecs( - reference.pointer, _id_connectionSpecs as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); + reference.pointer, _id_connectionSpecs as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JObjectType())); } static final _id_protocols = _class.instanceMethodId( @@ -5919,23 +6242,23 @@ class OkHttpClient extends jni.JObject { r'()Ljava/util/List;', ); - static final _protocols = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _protocols = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.List protocols() + /// from: `public final java.util.List protocols()` /// The returned object must be released after use, by calling the [release] method. - jni.JList protocols() { - return _protocols(reference.pointer, _id_protocols as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); + _$jni.JList<_$jni.JObject> protocols() { + return _protocols(reference.pointer, _id_protocols as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JObjectType())); } static final _id_hostnameVerifier = _class.instanceMethodId( @@ -5943,24 +6266,24 @@ class OkHttpClient extends jni.JObject { r'()Ljavax/net/ssl/HostnameVerifier;', ); - static final _hostnameVerifier = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _hostnameVerifier = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final javax.net.ssl.HostnameVerifier hostnameVerifier() + /// from: `public final javax.net.ssl.HostnameVerifier hostnameVerifier()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject hostnameVerifier() { + _$jni.JObject hostnameVerifier() { return _hostnameVerifier( - reference.pointer, _id_hostnameVerifier as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_hostnameVerifier as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_certificatePinner = _class.instanceMethodId( @@ -5968,24 +6291,24 @@ class OkHttpClient extends jni.JObject { r'()Lokhttp3/CertificatePinner;', ); - static final _certificatePinner = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _certificatePinner = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.CertificatePinner certificatePinner() + /// from: `public final okhttp3.CertificatePinner certificatePinner()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject certificatePinner() { + _$jni.JObject certificatePinner() { return _certificatePinner( - reference.pointer, _id_certificatePinner as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_certificatePinner as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_certificateChainCleaner = _class.instanceMethodId( @@ -5993,24 +6316,24 @@ class OkHttpClient extends jni.JObject { r'()Lokhttp3/internal/tls/CertificateChainCleaner;', ); - static final _certificateChainCleaner = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _certificateChainCleaner = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.internal.tls.CertificateChainCleaner certificateChainCleaner() + /// from: `public final okhttp3.internal.tls.CertificateChainCleaner certificateChainCleaner()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject certificateChainCleaner() { - return _certificateChainCleaner( - reference.pointer, _id_certificateChainCleaner as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject certificateChainCleaner() { + return _certificateChainCleaner(reference.pointer, + _id_certificateChainCleaner as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_callTimeoutMillis = _class.instanceMethodId( @@ -6018,22 +6341,22 @@ class OkHttpClient extends jni.JObject { r'()I', ); - static final _callTimeoutMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _callTimeoutMillis = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int callTimeoutMillis() + /// from: `public final int callTimeoutMillis()` int callTimeoutMillis() { return _callTimeoutMillis( - reference.pointer, _id_callTimeoutMillis as jni.JMethodIDPtr) + reference.pointer, _id_callTimeoutMillis as _$jni.JMethodIDPtr) .integer; } @@ -6042,22 +6365,22 @@ class OkHttpClient extends jni.JObject { r'()I', ); - static final _connectTimeoutMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _connectTimeoutMillis = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int connectTimeoutMillis() + /// from: `public final int connectTimeoutMillis()` int connectTimeoutMillis() { return _connectTimeoutMillis( - reference.pointer, _id_connectTimeoutMillis as jni.JMethodIDPtr) + reference.pointer, _id_connectTimeoutMillis as _$jni.JMethodIDPtr) .integer; } @@ -6066,22 +6389,22 @@ class OkHttpClient extends jni.JObject { r'()I', ); - static final _readTimeoutMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _readTimeoutMillis = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int readTimeoutMillis() + /// from: `public final int readTimeoutMillis()` int readTimeoutMillis() { return _readTimeoutMillis( - reference.pointer, _id_readTimeoutMillis as jni.JMethodIDPtr) + reference.pointer, _id_readTimeoutMillis as _$jni.JMethodIDPtr) .integer; } @@ -6090,22 +6413,22 @@ class OkHttpClient extends jni.JObject { r'()I', ); - static final _writeTimeoutMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _writeTimeoutMillis = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int writeTimeoutMillis() + /// from: `public final int writeTimeoutMillis()` int writeTimeoutMillis() { return _writeTimeoutMillis( - reference.pointer, _id_writeTimeoutMillis as jni.JMethodIDPtr) + reference.pointer, _id_writeTimeoutMillis as _$jni.JMethodIDPtr) .integer; } @@ -6114,22 +6437,22 @@ class OkHttpClient extends jni.JObject { r'()I', ); - static final _pingIntervalMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _pingIntervalMillis = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int pingIntervalMillis() + /// from: `public final int pingIntervalMillis()` int pingIntervalMillis() { return _pingIntervalMillis( - reference.pointer, _id_pingIntervalMillis as jni.JMethodIDPtr) + reference.pointer, _id_pingIntervalMillis as _$jni.JMethodIDPtr) .integer; } @@ -6138,22 +6461,23 @@ class OkHttpClient extends jni.JObject { r'()J', ); - static final _minWebSocketMessageToCompress = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>>('globalEnv_CallLongMethod') - .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - )>(); - - /// from: public final long minWebSocketMessageToCompress() + static final _minWebSocketMessageToCompress = + _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>>('globalEnv_CallLongMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + )>(); + + /// from: `public final long minWebSocketMessageToCompress()` int minWebSocketMessageToCompress() { return _minWebSocketMessageToCompress(reference.pointer, - _id_minWebSocketMessageToCompress as jni.JMethodIDPtr) + _id_minWebSocketMessageToCompress as _$jni.JMethodIDPtr) .long; } @@ -6162,47 +6486,47 @@ class OkHttpClient extends jni.JObject { r'()Lokhttp3/internal/connection/RouteDatabase;', ); - static final _getRouteDatabase = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getRouteDatabase = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.internal.connection.RouteDatabase getRouteDatabase() + /// from: `public final okhttp3.internal.connection.RouteDatabase getRouteDatabase()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject getRouteDatabase() { + _$jni.JObject getRouteDatabase() { return _getRouteDatabase( - reference.pointer, _id_getRouteDatabase as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_getRouteDatabase as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } - static final _id_new1 = _class.constructorId( + static final _id_new$1 = _class.constructorId( r'()V', ); - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _new$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void () + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. - factory OkHttpClient.new1() { + factory OkHttpClient.new$1() { return OkHttpClient.fromReference( - _new1(_class.reference.pointer, _id_new1 as jni.JMethodIDPtr) + _new$1(_class.reference.pointer, _id_new$1 as _$jni.JMethodIDPtr) .reference); } @@ -6211,25 +6535,25 @@ class OkHttpClient extends jni.JObject { r'(Lokhttp3/Request;)Lokhttp3/Call;', ); - static final _newCall = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _newCall = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.Call newCall(okhttp3.Request request) + /// from: `public okhttp3.Call newCall(okhttp3.Request request)` /// The returned object must be released after use, by calling the [release] method. Call newCall( Request request, ) { - return _newCall(reference.pointer, _id_newCall as jni.JMethodIDPtr, + return _newCall(reference.pointer, _id_newCall as _$jni.JMethodIDPtr, request.reference.pointer) - .object(const $CallType()); + .object(const $Call$Type()); } static final _id_newWebSocket = _class.instanceMethodId( @@ -6237,32 +6561,35 @@ class OkHttpClient extends jni.JObject { r'(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;', ); - static final _newWebSocket = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _newWebSocket = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public okhttp3.WebSocket newWebSocket(okhttp3.Request request, okhttp3.WebSocketListener webSocketListener) + /// from: `public okhttp3.WebSocket newWebSocket(okhttp3.Request request, okhttp3.WebSocketListener webSocketListener)` /// The returned object must be released after use, by calling the [release] method. WebSocket newWebSocket( Request request, - jni.JObject webSocketListener, + _$jni.JObject webSocketListener, ) { return _newWebSocket( reference.pointer, - _id_newWebSocket as jni.JMethodIDPtr, + _id_newWebSocket as _$jni.JMethodIDPtr, request.reference.pointer, webSocketListener.reference.pointer) - .object(const $WebSocketType()); + .object(const $WebSocket$Type()); } static final _id_newBuilder = _class.instanceMethodId( @@ -6270,23 +6597,23 @@ class OkHttpClient extends jni.JObject { r'()Lokhttp3/OkHttpClient$Builder;', ); - static final _newBuilder = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _newBuilder = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public okhttp3.OkHttpClient$Builder newBuilder() + /// from: `public okhttp3.OkHttpClient$Builder newBuilder()` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder newBuilder() { - return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) - .object(const $OkHttpClient_BuilderType()); + return _newBuilder(reference.pointer, _id_newBuilder as _$jni.JMethodIDPtr) + .object(const $OkHttpClient_Builder$Type()); } static final _id_clone = _class.instanceMethodId( @@ -6294,103 +6621,109 @@ class OkHttpClient extends jni.JObject { r'()Ljava/lang/Object;', ); - static final _clone = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _clone = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.Object clone() + /// from: `public java.lang.Object clone()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject clone() { - return _clone(reference.pointer, _id_clone as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject clone() { + return _clone(reference.pointer, _id_clone as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } } -final class $OkHttpClientType extends jni.JObjType { - const $OkHttpClientType(); +final class $OkHttpClient$Type extends _$jni.JObjType { + @_$jni.internal + const $OkHttpClient$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/OkHttpClient;'; - @override - OkHttpClient fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + OkHttpClient fromReference(_$jni.JReference reference) => OkHttpClient.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($OkHttpClientType).hashCode; + @_$core.override + int get hashCode => ($OkHttpClient$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($OkHttpClientType) && - other is $OkHttpClientType; + return other.runtimeType == ($OkHttpClient$Type) && + other is $OkHttpClient$Type; } } -/// from: okhttp3.Call$Factory -class Call_Factory extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Call$Factory` +class Call_Factory extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Call_Factory.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Call$Factory'); + static final _class = _$jni.JClass.forName(r'okhttp3/Call$Factory'); /// The type which includes information such as the signature of this class. - static const type = $Call_FactoryType(); + static const type = $Call_Factory$Type(); static final _id_newCall = _class.instanceMethodId( r'newCall', r'(Lokhttp3/Request;)Lokhttp3/Call;', ); - static final _newCall = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _newCall = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract okhttp3.Call newCall(okhttp3.Request request) + /// from: `public abstract okhttp3.Call newCall(okhttp3.Request request)` /// The returned object must be released after use, by calling the [release] method. Call newCall( Request request, ) { - return _newCall(reference.pointer, _id_newCall as jni.JMethodIDPtr, + return _newCall(reference.pointer, _id_newCall as _$jni.JMethodIDPtr, request.reference.pointer) - .object(const $CallType()); + .object(const $Call$Type()); } /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( + static final _$core.Map _$impls = {}; + static _$jni.JObjectPtr _$invoke( int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, ) { return _$invokeMethod( port, - $MethodInvocation.fromAddresses( + _$jni.MethodInvocation.fromAddresses( 0, descriptor.address, args.address, @@ -6398,71 +6731,80 @@ class Call_Factory extends jni.JObject { ); } - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); - static ffi.Pointer _$invokeMethod( + static _$jni.Pointer<_$jni.Void> _$invokeMethod( int $p, - $MethodInvocation $i, + _$jni.MethodInvocation $i, ) { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; if ($d == r'newCall(Lokhttp3/Request;)Lokhttp3/Call;') { final $r = _$impls[$p]!.newCall( - $a[0].castTo(const $RequestType(), releaseOriginal: true), + $a[0].as(const $Request$Type(), releaseOriginal: true), ); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) .reference .toPointer(); } } catch (e) { - return ProtectedJniExtensions.newDartException(e); + return _$jni.ProtectedJniExtensions.newDartException(e); } - return jni.nullptr; + return _$jni.nullptr; } - factory Call_Factory.implement( - $Call_FactoryImpl $impl, - ) { - final $p = ReceivePort(); - final $x = Call_Factory.fromReference( - ProtectedJniExtensions.newPortProxy( - r'okhttp3.Call$Factory', - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { + static void implementIn( + _$jni.JImplementer implementer, + $Call_Factory $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { if ($m == null) { _$impls.remove($p.sendPort.nativePort); $p.close(); return; } - final $i = $MethodInvocation.fromMessage($m as List); + final $i = _$jni.MethodInvocation.fromMessage($m); final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); }); - return $x; + implementer.add( + r'okhttp3.Call$Factory', + $p, + _$invokePointer, + [], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory Call_Factory.implement( + $Call_Factory $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return Call_Factory.fromReference( + $i.implementReference(), + ); } } -abstract interface class $Call_FactoryImpl { - factory $Call_FactoryImpl({ +abstract base mixin class $Call_Factory { + factory $Call_Factory({ required Call Function(Request request) newCall, - }) = _$Call_FactoryImpl; + }) = _$Call_Factory; Call newCall(Request request); } -class _$Call_FactoryImpl implements $Call_FactoryImpl { - _$Call_FactoryImpl({ +final class _$Call_Factory with $Call_Factory { + _$Call_Factory({ required Call Function(Request request) newCall, }) : _newCall = newCall; @@ -6473,67 +6815,75 @@ class _$Call_FactoryImpl implements $Call_FactoryImpl { } } -final class $Call_FactoryType extends jni.JObjType { - const $Call_FactoryType(); +final class $Call_Factory$Type extends _$jni.JObjType { + @_$jni.internal + const $Call_Factory$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Call$Factory;'; - @override - Call_Factory fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Call_Factory fromReference(_$jni.JReference reference) => Call_Factory.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($Call_FactoryType).hashCode; + @_$core.override + int get hashCode => ($Call_Factory$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($Call_FactoryType) && - other is $Call_FactoryType; + return other.runtimeType == ($Call_Factory$Type) && + other is $Call_Factory$Type; } } -/// from: okhttp3.Call -class Call extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Call` +class Call extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Call.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Call'); + static final _class = _$jni.JClass.forName(r'okhttp3/Call'); /// The type which includes information such as the signature of this class. - static const type = $CallType(); + static const type = $Call$Type(); static final _id_request = _class.instanceMethodId( r'request', r'()Lokhttp3/Request;', ); - static final _request = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _request = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract okhttp3.Request request() + /// from: `public abstract okhttp3.Request request()` /// The returned object must be released after use, by calling the [release] method. Request request() { - return _request(reference.pointer, _id_request as jni.JMethodIDPtr) - .object(const $RequestType()); + return _request(reference.pointer, _id_request as _$jni.JMethodIDPtr) + .object(const $Request$Type()); } static final _id_execute = _class.instanceMethodId( @@ -6541,23 +6891,23 @@ class Call extends jni.JObject { r'()Lokhttp3/Response;', ); - static final _execute = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _execute = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract okhttp3.Response execute() + /// from: `public abstract okhttp3.Response execute()` /// The returned object must be released after use, by calling the [release] method. Response execute() { - return _execute(reference.pointer, _id_execute as jni.JMethodIDPtr) - .object(const $ResponseType()); + return _execute(reference.pointer, _id_execute as _$jni.JMethodIDPtr) + .object(const $Response$Type()); } static final _id_enqueue = _class.instanceMethodId( @@ -6565,22 +6915,22 @@ class Call extends jni.JObject { r'(Lokhttp3/Callback;)V', ); - static final _enqueue = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _enqueue = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void enqueue(okhttp3.Callback callback) + /// from: `public abstract void enqueue(okhttp3.Callback callback)` void enqueue( Callback callback, ) { - _enqueue(reference.pointer, _id_enqueue as jni.JMethodIDPtr, + _enqueue(reference.pointer, _id_enqueue as _$jni.JMethodIDPtr, callback.reference.pointer) .check(); } @@ -6590,21 +6940,21 @@ class Call extends jni.JObject { r'()V', ); - static final _cancel = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _cancel = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract void cancel() + /// from: `public abstract void cancel()` void cancel() { - _cancel(reference.pointer, _id_cancel as jni.JMethodIDPtr).check(); + _cancel(reference.pointer, _id_cancel as _$jni.JMethodIDPtr).check(); } static final _id_isExecuted = _class.instanceMethodId( @@ -6612,21 +6962,21 @@ class Call extends jni.JObject { r'()Z', ); - static final _isExecuted = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _isExecuted = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract boolean isExecuted() + /// from: `public abstract boolean isExecuted()` bool isExecuted() { - return _isExecuted(reference.pointer, _id_isExecuted as jni.JMethodIDPtr) + return _isExecuted(reference.pointer, _id_isExecuted as _$jni.JMethodIDPtr) .boolean; } @@ -6635,21 +6985,21 @@ class Call extends jni.JObject { r'()Z', ); - static final _isCanceled = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _isCanceled = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract boolean isCanceled() + /// from: `public abstract boolean isCanceled()` bool isCanceled() { - return _isCanceled(reference.pointer, _id_isCanceled as jni.JMethodIDPtr) + return _isCanceled(reference.pointer, _id_isCanceled as _$jni.JMethodIDPtr) .boolean; } @@ -6658,23 +7008,23 @@ class Call extends jni.JObject { r'()Lokio/Timeout;', ); - static final _timeout = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _timeout = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract okio.Timeout timeout() + /// from: `public abstract okio.Timeout timeout()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject timeout() { - return _timeout(reference.pointer, _id_timeout as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject timeout() { + return _timeout(reference.pointer, _id_timeout as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_clone = _class.instanceMethodId( @@ -6682,37 +7032,35 @@ class Call extends jni.JObject { r'()Lokhttp3/Call;', ); - static final _clone = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _clone = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract okhttp3.Call clone() + /// from: `public abstract okhttp3.Call clone()` /// The returned object must be released after use, by calling the [release] method. Call clone() { - return _clone(reference.pointer, _id_clone as jni.JMethodIDPtr) - .object(const $CallType()); + return _clone(reference.pointer, _id_clone as _$jni.JMethodIDPtr) + .object(const $Call$Type()); } /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( + static final _$core.Map _$impls = {}; + static _$jni.JObjectPtr _$invoke( int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, ) { return _$invokeMethod( port, - $MethodInvocation.fromAddresses( + _$jni.MethodInvocation.fromAddresses( 0, descriptor.address, args.address, @@ -6720,129 +7068,147 @@ class Call extends jni.JObject { ); } - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); - static ffi.Pointer _$invokeMethod( + static _$jni.Pointer<_$jni.Void> _$invokeMethod( int $p, - $MethodInvocation $i, + _$jni.MethodInvocation $i, ) { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; if ($d == r'request()Lokhttp3/Request;') { final $r = _$impls[$p]!.request(); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) .reference .toPointer(); } if ($d == r'execute()Lokhttp3/Response;') { final $r = _$impls[$p]!.execute(); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) .reference .toPointer(); } if ($d == r'enqueue(Lokhttp3/Callback;)V') { _$impls[$p]!.enqueue( - $a[0].castTo(const $CallbackType(), releaseOriginal: true), + $a[0].as(const $Callback$Type(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'cancel()V') { _$impls[$p]!.cancel(); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'isExecuted()Z') { final $r = _$impls[$p]!.isExecuted(); - return jni.JBoolean($r).reference.toPointer(); + return _$jni.JBoolean($r).reference.toPointer(); } if ($d == r'isCanceled()Z') { final $r = _$impls[$p]!.isCanceled(); - return jni.JBoolean($r).reference.toPointer(); + return _$jni.JBoolean($r).reference.toPointer(); } if ($d == r'timeout()Lokio/Timeout;') { final $r = _$impls[$p]!.timeout(); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) .reference .toPointer(); } if ($d == r'clone()Lokhttp3/Call;') { final $r = _$impls[$p]!.clone(); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) .reference .toPointer(); } } catch (e) { - return ProtectedJniExtensions.newDartException(e); + return _$jni.ProtectedJniExtensions.newDartException(e); } - return jni.nullptr; + return _$jni.nullptr; } - factory Call.implement( - $CallImpl $impl, - ) { - final $p = ReceivePort(); - final $x = Call.fromReference( - ProtectedJniExtensions.newPortProxy( - r'okhttp3.Call', - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { + static void implementIn( + _$jni.JImplementer implementer, + $Call $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { if ($m == null) { _$impls.remove($p.sendPort.nativePort); $p.close(); return; } - final $i = $MethodInvocation.fromMessage($m as List); + final $i = _$jni.MethodInvocation.fromMessage($m); final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); }); - return $x; + implementer.add( + r'okhttp3.Call', + $p, + _$invokePointer, + [ + if ($impl.enqueue$async) r'enqueue(Lokhttp3/Callback;)V', + if ($impl.cancel$async) r'cancel()V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory Call.implement( + $Call $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return Call.fromReference( + $i.implementReference(), + ); } } -abstract interface class $CallImpl { - factory $CallImpl({ +abstract base mixin class $Call { + factory $Call({ required Request Function() request, required Response Function() execute, required void Function(Callback callback) enqueue, + bool enqueue$async, required void Function() cancel, + bool cancel$async, required bool Function() isExecuted, required bool Function() isCanceled, - required jni.JObject Function() timeout, + required _$jni.JObject Function() timeout, required Call Function() clone, - }) = _$CallImpl; + }) = _$Call; Request request(); Response execute(); void enqueue(Callback callback); + bool get enqueue$async => false; void cancel(); + bool get cancel$async => false; bool isExecuted(); bool isCanceled(); - jni.JObject timeout(); + _$jni.JObject timeout(); Call clone(); } -class _$CallImpl implements $CallImpl { - _$CallImpl({ +final class _$Call with $Call { + _$Call({ required Request Function() request, required Response Function() execute, required void Function(Callback callback) enqueue, + this.enqueue$async = false, required void Function() cancel, + this.cancel$async = false, required bool Function() isExecuted, required bool Function() isCanceled, - required jni.JObject Function() timeout, + required _$jni.JObject Function() timeout, required Call Function() clone, }) : _request = request, _execute = execute, @@ -6856,10 +7222,12 @@ class _$CallImpl implements $CallImpl { final Request Function() _request; final Response Function() _execute; final void Function(Callback callback) _enqueue; + final bool enqueue$async; final void Function() _cancel; + final bool cancel$async; final bool Function() _isExecuted; final bool Function() _isCanceled; - final jni.JObject Function() _timeout; + final _$jni.JObject Function() _timeout; final Call Function() _clone; Request request() { @@ -6886,7 +7254,7 @@ class _$CallImpl implements $CallImpl { return _isCanceled(); } - jni.JObject timeout() { + _$jni.JObject timeout() { return _timeout(); } @@ -6895,64 +7263,73 @@ class _$CallImpl implements $CallImpl { } } -final class $CallType extends jni.JObjType { - const $CallType(); +final class $Call$Type extends _$jni.JObjType { + @_$jni.internal + const $Call$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Call;'; - @override - Call fromReference(jni.JReference reference) => Call.fromReference(reference); + @_$jni.internal + @_$core.override + Call fromReference(_$jni.JReference reference) => + Call.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($CallType).hashCode; + @_$core.override + int get hashCode => ($Call$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($CallType) && other is $CallType; + return other.runtimeType == ($Call$Type) && other is $Call$Type; } } -/// from: okhttp3.Headers$Builder -class Headers_Builder extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Headers$Builder` +class Headers_Builder extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Headers_Builder.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Headers$Builder'); + static final _class = _$jni.JClass.forName(r'okhttp3/Headers$Builder'); /// The type which includes information such as the signature of this class. - static const type = $Headers_BuilderType(); - static final _id_new0 = _class.constructorId( + static const type = $Headers_Builder$Type(); + static final _id_new$ = _class.constructorId( r'()V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void () + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. factory Headers_Builder() { return Headers_Builder.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) .reference); } @@ -6961,55 +7338,58 @@ class Headers_Builder extends jni.JObject { r'(Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); - static final _add = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _add = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers$Builder add(java.lang.String string) + /// from: `public final okhttp3.Headers$Builder add(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. Headers_Builder add( - jni.JString string, + _$jni.JString string, ) { - return _add(reference.pointer, _id_add as jni.JMethodIDPtr, + return _add(reference.pointer, _id_add as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const $Headers_BuilderType()); + .object(const $Headers_Builder$Type()); } - static final _id_add1 = _class.instanceMethodId( + static final _id_add$1 = _class.instanceMethodId( r'add', r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); - static final _add1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _add$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers$Builder add(java.lang.String string, java.lang.String string1) + /// from: `public final okhttp3.Headers$Builder add(java.lang.String string, java.lang.String string1)` /// The returned object must be released after use, by calling the [release] method. - Headers_Builder add1( - jni.JString string, - jni.JString string1, + Headers_Builder add$1( + _$jni.JString string, + _$jni.JString string1, ) { - return _add1(reference.pointer, _id_add1 as jni.JMethodIDPtr, + return _add$1(reference.pointer, _id_add$1 as _$jni.JMethodIDPtr, string.reference.pointer, string1.reference.pointer) - .object(const $Headers_BuilderType()); + .object(const $Headers_Builder$Type()); } static final _id_addUnsafeNonAscii = _class.instanceMethodId( @@ -7017,32 +7397,35 @@ class Headers_Builder extends jni.JObject { r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); - static final _addUnsafeNonAscii = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _addUnsafeNonAscii = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers$Builder addUnsafeNonAscii(java.lang.String string, java.lang.String string1) + /// from: `public final okhttp3.Headers$Builder addUnsafeNonAscii(java.lang.String string, java.lang.String string1)` /// The returned object must be released after use, by calling the [release] method. Headers_Builder addUnsafeNonAscii( - jni.JString string, - jni.JString string1, + _$jni.JString string, + _$jni.JString string1, ) { return _addUnsafeNonAscii( reference.pointer, - _id_addUnsafeNonAscii as jni.JMethodIDPtr, + _id_addUnsafeNonAscii as _$jni.JMethodIDPtr, string.reference.pointer, string1.reference.pointer) - .object(const $Headers_BuilderType()); + .object(const $Headers_Builder$Type()); } static final _id_addAll = _class.instanceMethodId( @@ -7050,145 +7433,157 @@ class Headers_Builder extends jni.JObject { r'(Lokhttp3/Headers;)Lokhttp3/Headers$Builder;', ); - static final _addAll = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _addAll = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers$Builder addAll(okhttp3.Headers headers) + /// from: `public final okhttp3.Headers$Builder addAll(okhttp3.Headers headers)` /// The returned object must be released after use, by calling the [release] method. Headers_Builder addAll( Headers headers, ) { - return _addAll(reference.pointer, _id_addAll as jni.JMethodIDPtr, + return _addAll(reference.pointer, _id_addAll as _$jni.JMethodIDPtr, headers.reference.pointer) - .object(const $Headers_BuilderType()); + .object(const $Headers_Builder$Type()); } - static final _id_add2 = _class.instanceMethodId( + static final _id_add$2 = _class.instanceMethodId( r'add', r'(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;', ); - static final _add2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _add$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers$Builder add(java.lang.String string, java.util.Date date) + /// from: `public final okhttp3.Headers$Builder add(java.lang.String string, java.util.Date date)` /// The returned object must be released after use, by calling the [release] method. - Headers_Builder add2( - jni.JString string, - jni.JObject date, + Headers_Builder add$2( + _$jni.JString string, + _$jni.JObject date, ) { - return _add2(reference.pointer, _id_add2 as jni.JMethodIDPtr, + return _add$2(reference.pointer, _id_add$2 as _$jni.JMethodIDPtr, string.reference.pointer, date.reference.pointer) - .object(const $Headers_BuilderType()); + .object(const $Headers_Builder$Type()); } - static final _id_add3 = _class.instanceMethodId( + static final _id_add$3 = _class.instanceMethodId( r'add', r'(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;', ); - static final _add3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _add$3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers$Builder add(java.lang.String string, java.time.Instant instant) + /// from: `public final okhttp3.Headers$Builder add(java.lang.String string, java.time.Instant instant)` /// The returned object must be released after use, by calling the [release] method. - Headers_Builder add3( - jni.JString string, - jni.JObject instant, + Headers_Builder add$3( + _$jni.JString string, + _$jni.JObject instant, ) { - return _add3(reference.pointer, _id_add3 as jni.JMethodIDPtr, + return _add$3(reference.pointer, _id_add$3 as _$jni.JMethodIDPtr, string.reference.pointer, instant.reference.pointer) - .object(const $Headers_BuilderType()); + .object(const $Headers_Builder$Type()); } - static final _id_set0 = _class.instanceMethodId( + static final _id_set = _class.instanceMethodId( r'set', r'(Ljava/lang/String;Ljava/util/Date;)Lokhttp3/Headers$Builder;', ); - static final _set0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _set = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers$Builder set(java.lang.String string, java.util.Date date) + /// from: `public final okhttp3.Headers$Builder set(java.lang.String string, java.util.Date date)` /// The returned object must be released after use, by calling the [release] method. - Headers_Builder set0( - jni.JString string, - jni.JObject date, + Headers_Builder set( + _$jni.JString string, + _$jni.JObject date, ) { - return _set0(reference.pointer, _id_set0 as jni.JMethodIDPtr, + return _set(reference.pointer, _id_set as _$jni.JMethodIDPtr, string.reference.pointer, date.reference.pointer) - .object(const $Headers_BuilderType()); + .object(const $Headers_Builder$Type()); } - static final _id_set1 = _class.instanceMethodId( + static final _id_set$1 = _class.instanceMethodId( r'set', r'(Ljava/lang/String;Ljava/time/Instant;)Lokhttp3/Headers$Builder;', ); - static final _set1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _set$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers$Builder set(java.lang.String string, java.time.Instant instant) + /// from: `public final okhttp3.Headers$Builder set(java.lang.String string, java.time.Instant instant)` /// The returned object must be released after use, by calling the [release] method. - Headers_Builder set1( - jni.JString string, - jni.JObject instant, + Headers_Builder set$1( + _$jni.JString string, + _$jni.JObject instant, ) { - return _set1(reference.pointer, _id_set1 as jni.JMethodIDPtr, + return _set$1(reference.pointer, _id_set$1 as _$jni.JMethodIDPtr, string.reference.pointer, instant.reference.pointer) - .object(const $Headers_BuilderType()); + .object(const $Headers_Builder$Type()); } static final _id_removeAll = _class.instanceMethodId( @@ -7196,81 +7591,84 @@ class Headers_Builder extends jni.JObject { r'(Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); - static final _removeAll = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _removeAll = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers$Builder removeAll(java.lang.String string) + /// from: `public final okhttp3.Headers$Builder removeAll(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. Headers_Builder removeAll( - jni.JString string, + _$jni.JString string, ) { - return _removeAll(reference.pointer, _id_removeAll as jni.JMethodIDPtr, + return _removeAll(reference.pointer, _id_removeAll as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const $Headers_BuilderType()); + .object(const $Headers_Builder$Type()); } - static final _id_set2 = _class.instanceMethodId( + static final _id_set$2 = _class.instanceMethodId( r'set', r'(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Headers$Builder;', ); - static final _set2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _set$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers$Builder set(java.lang.String string, java.lang.String string1) + /// from: `public final okhttp3.Headers$Builder set(java.lang.String string, java.lang.String string1)` /// The returned object must be released after use, by calling the [release] method. - Headers_Builder set2( - jni.JString string, - jni.JString string1, + Headers_Builder set$2( + _$jni.JString string, + _$jni.JString string1, ) { - return _set2(reference.pointer, _id_set2 as jni.JMethodIDPtr, + return _set$2(reference.pointer, _id_set$2 as _$jni.JMethodIDPtr, string.reference.pointer, string1.reference.pointer) - .object(const $Headers_BuilderType()); + .object(const $Headers_Builder$Type()); } - static final _id_get0 = _class.instanceMethodId( + static final _id_get = _class.instanceMethodId( r'get', r'(Ljava/lang/String;)Ljava/lang/String;', ); - static final _get0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _get = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final java.lang.String get(java.lang.String string) + /// from: `public final java.lang.String get(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - jni.JString get0( - jni.JString string, + _$jni.JString get( + _$jni.JString string, ) { - return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr, + return _get(reference.pointer, _id_get as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const jni.JStringType()); + .object(const _$jni.JStringType()); } static final _id_build = _class.instanceMethodId( @@ -7278,218 +7676,234 @@ class Headers_Builder extends jni.JObject { r'()Lokhttp3/Headers;', ); - static final _build = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _build = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Headers build() + /// from: `public final okhttp3.Headers build()` /// The returned object must be released after use, by calling the [release] method. Headers build() { - return _build(reference.pointer, _id_build as jni.JMethodIDPtr) - .object(const $HeadersType()); + return _build(reference.pointer, _id_build as _$jni.JMethodIDPtr) + .object(const $Headers$Type()); } } -final class $Headers_BuilderType extends jni.JObjType { - const $Headers_BuilderType(); +final class $Headers_Builder$Type extends _$jni.JObjType { + @_$jni.internal + const $Headers_Builder$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Headers$Builder;'; - @override - Headers_Builder fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Headers_Builder fromReference(_$jni.JReference reference) => Headers_Builder.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($Headers_BuilderType).hashCode; + @_$core.override + int get hashCode => ($Headers_Builder$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($Headers_BuilderType) && - other is $Headers_BuilderType; + return other.runtimeType == ($Headers_Builder$Type) && + other is $Headers_Builder$Type; } } -/// from: okhttp3.Headers$Companion -class Headers_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Headers$Companion` +class Headers_Companion extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Headers_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Headers$Companion'); + static final _class = _$jni.JClass.forName(r'okhttp3/Headers$Companion'); /// The type which includes information such as the signature of this class. - static const type = $Headers_CompanionType(); + static const type = $Headers_Companion$Type(); static final _id_of = _class.instanceMethodId( r'of', r'([Ljava/lang/String;)Lokhttp3/Headers;', ); - static final _of = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _of = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers of(java.lang.String[] strings) + /// from: `public final okhttp3.Headers of(java.lang.String[] strings)` /// The returned object must be released after use, by calling the [release] method. Headers of( - jni.JArray strings, + _$jni.JArray<_$jni.JString> strings, ) { - return _of(reference.pointer, _id_of as jni.JMethodIDPtr, + return _of(reference.pointer, _id_of as _$jni.JMethodIDPtr, strings.reference.pointer) - .object(const $HeadersType()); + .object(const $Headers$Type()); } - static final _id_of1 = _class.instanceMethodId( + static final _id_of$1 = _class.instanceMethodId( r'of', r'(Ljava/util/Map;)Lokhttp3/Headers;', ); - static final _of1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _of$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers of(java.util.Map map) + /// from: `public final okhttp3.Headers of(java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. - Headers of1( - jni.JMap map, + Headers of$1( + _$jni.JMap<_$jni.JString, _$jni.JString> map, ) { - return _of1(reference.pointer, _id_of1 as jni.JMethodIDPtr, + return _of$1(reference.pointer, _id_of$1 as _$jni.JMethodIDPtr, map.reference.pointer) - .object(const $HeadersType()); + .object(const $Headers$Type()); } - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` /// The returned object must be released after use, by calling the [release] method. factory Headers_Companion( - jni.JObject defaultConstructorMarker, + _$jni.JObject defaultConstructorMarker, ) { - return Headers_Companion.fromReference(_new0( + return Headers_Companion.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, defaultConstructorMarker.reference.pointer) .reference); } } -final class $Headers_CompanionType extends jni.JObjType { - const $Headers_CompanionType(); +final class $Headers_Companion$Type extends _$jni.JObjType { + @_$jni.internal + const $Headers_Companion$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Headers$Companion;'; - @override - Headers_Companion fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Headers_Companion fromReference(_$jni.JReference reference) => Headers_Companion.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($Headers_CompanionType).hashCode; + @_$core.override + int get hashCode => ($Headers_Companion$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($Headers_CompanionType) && - other is $Headers_CompanionType; + return other.runtimeType == ($Headers_Companion$Type) && + other is $Headers_Companion$Type; } } -/// from: okhttp3.Headers -class Headers extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Headers` +class Headers extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Headers.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Headers'); + static final _class = _$jni.JClass.forName(r'okhttp3/Headers'); /// The type which includes information such as the signature of this class. - static const type = $HeadersType(); + static const type = $Headers$Type(); static final _id_Companion = _class.staticFieldId( r'Companion', r'Lokhttp3/Headers$Companion;', ); - /// from: static public final okhttp3.Headers$Companion Companion + /// from: `static public final okhttp3.Headers$Companion Companion` /// The returned object must be released after use, by calling the [release] method. static Headers_Companion get Companion => - _id_Companion.get(_class, const $Headers_CompanionType()); + _id_Companion.get(_class, const $Headers_Companion$Type()); - static final _id_get0 = _class.instanceMethodId( + static final _id_get = _class.instanceMethodId( r'get', r'(Ljava/lang/String;)Ljava/lang/String;', ); - static final _get0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _get = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final java.lang.String get(java.lang.String string) + /// from: `public final java.lang.String get(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - jni.JString get0( - jni.JString string, + _$jni.JString get( + _$jni.JString string, ) { - return _get0(reference.pointer, _id_get0 as jni.JMethodIDPtr, + return _get(reference.pointer, _id_get as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const jni.JStringType()); + .object(const _$jni.JStringType()); } static final _id_getDate = _class.instanceMethodId( @@ -7497,25 +7911,25 @@ class Headers extends jni.JObject { r'(Ljava/lang/String;)Ljava/util/Date;', ); - static final _getDate = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _getDate = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final java.util.Date getDate(java.lang.String string) + /// from: `public final java.util.Date getDate(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - jni.JObject getDate( - jni.JString string, + _$jni.JObject getDate( + _$jni.JString string, ) { - return _getDate(reference.pointer, _id_getDate as jni.JMethodIDPtr, + return _getDate(reference.pointer, _id_getDate as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } static final _id_getInstant = _class.instanceMethodId( @@ -7523,25 +7937,25 @@ class Headers extends jni.JObject { r'(Ljava/lang/String;)Ljava/time/Instant;', ); - static final _getInstant = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _getInstant = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final java.time.Instant getInstant(java.lang.String string) + /// from: `public final java.time.Instant getInstant(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - jni.JObject getInstant( - jni.JString string, + _$jni.JObject getInstant( + _$jni.JString string, ) { - return _getInstant(reference.pointer, _id_getInstant as jni.JMethodIDPtr, + return _getInstant(reference.pointer, _id_getInstant as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } static final _id_size = _class.instanceMethodId( @@ -7549,21 +7963,21 @@ class Headers extends jni.JObject { r'()I', ); - static final _size = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _size = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int size() + /// from: `public final int size()` int size() { - return _size(reference.pointer, _id_size as jni.JMethodIDPtr).integer; + return _size(reference.pointer, _id_size as _$jni.JMethodIDPtr).integer; } static final _id_name = _class.instanceMethodId( @@ -7571,21 +7985,23 @@ class Headers extends jni.JObject { r'(I)Ljava/lang/String;', ); - static final _name = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + static final _name = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public final java.lang.String name(int i) + /// from: `public final java.lang.String name(int i)` /// The returned object must be released after use, by calling the [release] method. - jni.JString name( + _$jni.JString name( int i, ) { - return _name(reference.pointer, _id_name as jni.JMethodIDPtr, i) - .object(const jni.JStringType()); + return _name(reference.pointer, _id_name as _$jni.JMethodIDPtr, i) + .object(const _$jni.JStringType()); } static final _id_value = _class.instanceMethodId( @@ -7593,21 +8009,23 @@ class Headers extends jni.JObject { r'(I)Ljava/lang/String;', ); - static final _value = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + static final _value = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public final java.lang.String value(int i) + /// from: `public final java.lang.String value(int i)` /// The returned object must be released after use, by calling the [release] method. - jni.JString value( + _$jni.JString value( int i, ) { - return _value(reference.pointer, _id_value as jni.JMethodIDPtr, i) - .object(const jni.JStringType()); + return _value(reference.pointer, _id_value as _$jni.JMethodIDPtr, i) + .object(const _$jni.JStringType()); } static final _id_names = _class.instanceMethodId( @@ -7615,23 +8033,23 @@ class Headers extends jni.JObject { r'()Ljava/util/Set;', ); - static final _names = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _names = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.Set names() + /// from: `public final java.util.Set names()` /// The returned object must be released after use, by calling the [release] method. - jni.JSet names() { - return _names(reference.pointer, _id_names as jni.JMethodIDPtr) - .object(const jni.JSetType(jni.JStringType())); + _$jni.JSet<_$jni.JString> names() { + return _names(reference.pointer, _id_names as _$jni.JMethodIDPtr) + .object(const _$jni.JSetType(_$jni.JStringType())); } static final _id_values = _class.instanceMethodId( @@ -7639,25 +8057,25 @@ class Headers extends jni.JObject { r'(Ljava/lang/String;)Ljava/util/List;', ); - static final _values = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _values = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final java.util.List values(java.lang.String string) + /// from: `public final java.util.List values(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. - jni.JList values( - jni.JString string, + _$jni.JList<_$jni.JString> values( + _$jni.JString string, ) { - return _values(reference.pointer, _id_values as jni.JMethodIDPtr, + return _values(reference.pointer, _id_values as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const jni.JListType(jni.JStringType())); + .object(const _$jni.JListType(_$jni.JStringType())); } static final _id_byteCount = _class.instanceMethodId( @@ -7665,21 +8083,21 @@ class Headers extends jni.JObject { r'()J', ); - static final _byteCount = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _byteCount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final long byteCount() + /// from: `public final long byteCount()` int byteCount() { - return _byteCount(reference.pointer, _id_byteCount as jni.JMethodIDPtr) + return _byteCount(reference.pointer, _id_byteCount as _$jni.JMethodIDPtr) .long; } @@ -7688,23 +8106,23 @@ class Headers extends jni.JObject { r'()Ljava/util/Iterator;', ); - static final _iterator = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _iterator = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.util.Iterator iterator() + /// from: `public java.util.Iterator iterator()` /// The returned object must be released after use, by calling the [release] method. - jni.JIterator iterator() { - return _iterator(reference.pointer, _id_iterator as jni.JMethodIDPtr) - .object(const jni.JIteratorType(jni.JObjectType())); + _$jni.JIterator<_$jni.JObject> iterator() { + return _iterator(reference.pointer, _id_iterator as _$jni.JMethodIDPtr) + .object(const _$jni.JIteratorType(_$jni.JObjectType())); } static final _id_newBuilder = _class.instanceMethodId( @@ -7712,23 +8130,23 @@ class Headers extends jni.JObject { r'()Lokhttp3/Headers$Builder;', ); - static final _newBuilder = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _newBuilder = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okhttp3.Headers$Builder newBuilder() + /// from: `public final okhttp3.Headers$Builder newBuilder()` /// The returned object must be released after use, by calling the [release] method. Headers_Builder newBuilder() { - return _newBuilder(reference.pointer, _id_newBuilder as jni.JMethodIDPtr) - .object(const $Headers_BuilderType()); + return _newBuilder(reference.pointer, _id_newBuilder as _$jni.JMethodIDPtr) + .object(const $Headers_Builder$Type()); } static final _id_equals = _class.instanceMethodId( @@ -7736,71 +8154,71 @@ class Headers extends jni.JObject { r'(Ljava/lang/Object;)Z', ); - static final _equals = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _equals = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public boolean equals(java.lang.Object object) + /// from: `public boolean equals(java.lang.Object object)` bool equals( - jni.JObject object, + _$jni.JObject object, ) { - return _equals(reference.pointer, _id_equals as jni.JMethodIDPtr, + return _equals(reference.pointer, _id_equals as _$jni.JMethodIDPtr, object.reference.pointer) .boolean; } - static final _id_hashCode1 = _class.instanceMethodId( + static final _id_hashCode$1 = _class.instanceMethodId( r'hashCode', r'()I', ); - static final _hashCode1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _hashCode$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public int hashCode() - int hashCode1() { - return _hashCode1(reference.pointer, _id_hashCode1 as jni.JMethodIDPtr) + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1 as _$jni.JMethodIDPtr) .integer; } - static final _id_toString1 = _class.instanceMethodId( + static final _id_toString$1 = _class.instanceMethodId( r'toString', r'()Ljava/lang/String;', ); - static final _toString1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _toString$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String toString() + /// from: `public java.lang.String toString()` /// The returned object must be released after use, by calling the [release] method. - jni.JString toString1() { - return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString toString$1() { + return _toString$1(reference.pointer, _id_toString$1 as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_toMultimap = _class.instanceMethodId( @@ -7808,24 +8226,24 @@ class Headers extends jni.JObject { r'()Ljava/util/Map;', ); - static final _toMultimap = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _toMultimap = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.Map toMultimap() + /// from: `public final java.util.Map toMultimap()` /// The returned object must be released after use, by calling the [release] method. - jni.JMap> toMultimap() { - return _toMultimap(reference.pointer, _id_toMultimap as jni.JMethodIDPtr) - .object(const jni.JMapType( - jni.JStringType(), jni.JListType(jni.JStringType()))); + _$jni.JMap<_$jni.JString, _$jni.JList<_$jni.JString>> toMultimap() { + return _toMultimap(reference.pointer, _id_toMultimap as _$jni.JMethodIDPtr) + .object(const _$jni.JMapType( + _$jni.JStringType(), _$jni.JListType(_$jni.JStringType()))); } static final _id_of = _class.staticMethodId( @@ -7833,149 +8251,163 @@ class Headers extends jni.JObject { r'([Ljava/lang/String;)Lokhttp3/Headers;', ); - static final _of = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _of = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.Headers of(java.lang.String[] strings) + /// from: `static public final okhttp3.Headers of(java.lang.String[] strings)` /// The returned object must be released after use, by calling the [release] method. static Headers of( - jni.JArray strings, + _$jni.JArray<_$jni.JString> strings, ) { - return _of(_class.reference.pointer, _id_of as jni.JMethodIDPtr, + return _of(_class.reference.pointer, _id_of as _$jni.JMethodIDPtr, strings.reference.pointer) - .object(const $HeadersType()); + .object(const $Headers$Type()); } - static final _id_of1 = _class.staticMethodId( + static final _id_of$1 = _class.staticMethodId( r'of', r'(Ljava/util/Map;)Lokhttp3/Headers;', ); - static final _of1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _of$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okhttp3.Headers of(java.util.Map map) + /// from: `static public final okhttp3.Headers of(java.util.Map map)` /// The returned object must be released after use, by calling the [release] method. - static Headers of1( - jni.JMap map, + static Headers of$1( + _$jni.JMap<_$jni.JString, _$jni.JString> map, ) { - return _of1(_class.reference.pointer, _id_of1 as jni.JMethodIDPtr, + return _of$1(_class.reference.pointer, _id_of$1 as _$jni.JMethodIDPtr, map.reference.pointer) - .object(const $HeadersType()); + .object(const $Headers$Type()); } - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (java.lang.String[] strings, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// from: `synthetic public void (java.lang.String[] strings, kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` /// The returned object must be released after use, by calling the [release] method. factory Headers( - jni.JArray strings, - jni.JObject defaultConstructorMarker, + _$jni.JArray<_$jni.JString> strings, + _$jni.JObject defaultConstructorMarker, ) { - return Headers.fromReference(_new0( + return Headers.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, strings.reference.pointer, defaultConstructorMarker.reference.pointer) .reference); } } -final class $HeadersType extends jni.JObjType { - const $HeadersType(); +final class $Headers$Type extends _$jni.JObjType { + @_$jni.internal + const $Headers$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Headers;'; - @override - Headers fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Headers fromReference(_$jni.JReference reference) => Headers.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($HeadersType).hashCode; + @_$core.override + int get hashCode => ($Headers$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($HeadersType) && other is $HeadersType; + return other.runtimeType == ($Headers$Type) && other is $Headers$Type; } } -/// from: okhttp3.Callback -class Callback extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Callback` +class Callback extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Callback.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Callback'); + static final _class = _$jni.JClass.forName(r'okhttp3/Callback'); /// The type which includes information such as the signature of this class. - static const type = $CallbackType(); + static const type = $Callback$Type(); static final _id_onFailure = _class.instanceMethodId( r'onFailure', r'(Lokhttp3/Call;Ljava/io/IOException;)V', ); - static final _onFailure = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onFailure = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onFailure(okhttp3.Call call, java.io.IOException iOException) + /// from: `public abstract void onFailure(okhttp3.Call call, java.io.IOException iOException)` void onFailure( Call call, - jni.JObject iOException, + _$jni.JObject iOException, ) { - _onFailure(reference.pointer, _id_onFailure as jni.JMethodIDPtr, + _onFailure(reference.pointer, _id_onFailure as _$jni.JMethodIDPtr, call.reference.pointer, iOException.reference.pointer) .check(); } @@ -7985,42 +8417,43 @@ class Callback extends jni.JObject { r'(Lokhttp3/Call;Lokhttp3/Response;)V', ); - static final _onResponse = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onResponse = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onResponse(okhttp3.Call call, okhttp3.Response response) + /// from: `public abstract void onResponse(okhttp3.Call call, okhttp3.Response response)` void onResponse( Call call, Response response, ) { - _onResponse(reference.pointer, _id_onResponse as jni.JMethodIDPtr, + _onResponse(reference.pointer, _id_onResponse as _$jni.JMethodIDPtr, call.reference.pointer, response.reference.pointer) .check(); } /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( + static final _$core.Map _$impls = {}; + static _$jni.JObjectPtr _$invoke( int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, ) { return _$invokeMethod( port, - $MethodInvocation.fromAddresses( + _$jni.MethodInvocation.fromAddresses( 0, descriptor.address, args.address, @@ -8028,87 +8461,109 @@ class Callback extends jni.JObject { ); } - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); - static ffi.Pointer _$invokeMethod( + static _$jni.Pointer<_$jni.Void> _$invokeMethod( int $p, - $MethodInvocation $i, + _$jni.MethodInvocation $i, ) { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; if ($d == r'onFailure(Lokhttp3/Call;Ljava/io/IOException;)V') { _$impls[$p]!.onFailure( - $a[0].castTo(const $CallType(), releaseOriginal: true), - $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), + $a[0].as(const $Call$Type(), releaseOriginal: true), + $a[1].as(const _$jni.JObjectType(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'onResponse(Lokhttp3/Call;Lokhttp3/Response;)V') { _$impls[$p]!.onResponse( - $a[0].castTo(const $CallType(), releaseOriginal: true), - $a[1].castTo(const $ResponseType(), releaseOriginal: true), + $a[0].as(const $Call$Type(), releaseOriginal: true), + $a[1].as(const $Response$Type(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e); + return _$jni.ProtectedJniExtensions.newDartException(e); } - return jni.nullptr; + return _$jni.nullptr; } - factory Callback.implement( - $CallbackImpl $impl, - ) { - final $p = ReceivePort(); - final $x = Callback.fromReference( - ProtectedJniExtensions.newPortProxy( - r'okhttp3.Callback', - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { + static void implementIn( + _$jni.JImplementer implementer, + $Callback $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { if ($m == null) { _$impls.remove($p.sendPort.nativePort); $p.close(); return; } - final $i = $MethodInvocation.fromMessage($m as List); + final $i = _$jni.MethodInvocation.fromMessage($m); final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); }); - return $x; + implementer.add( + r'okhttp3.Callback', + $p, + _$invokePointer, + [ + if ($impl.onFailure$async) + r'onFailure(Lokhttp3/Call;Ljava/io/IOException;)V', + if ($impl.onResponse$async) + r'onResponse(Lokhttp3/Call;Lokhttp3/Response;)V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory Callback.implement( + $Callback $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return Callback.fromReference( + $i.implementReference(), + ); } } -abstract interface class $CallbackImpl { - factory $CallbackImpl({ - required void Function(Call call, jni.JObject iOException) onFailure, +abstract base mixin class $Callback { + factory $Callback({ + required void Function(Call call, _$jni.JObject iOException) onFailure, + bool onFailure$async, required void Function(Call call, Response response) onResponse, - }) = _$CallbackImpl; + bool onResponse$async, + }) = _$Callback; - void onFailure(Call call, jni.JObject iOException); + void onFailure(Call call, _$jni.JObject iOException); + bool get onFailure$async => false; void onResponse(Call call, Response response); + bool get onResponse$async => false; } -class _$CallbackImpl implements $CallbackImpl { - _$CallbackImpl({ - required void Function(Call call, jni.JObject iOException) onFailure, +final class _$Callback with $Callback { + _$Callback({ + required void Function(Call call, _$jni.JObject iOException) onFailure, + this.onFailure$async = false, required void Function(Call call, Response response) onResponse, + this.onResponse$async = false, }) : _onFailure = onFailure, _onResponse = onResponse; - final void Function(Call call, jni.JObject iOException) _onFailure; + final void Function(Call call, _$jni.JObject iOException) _onFailure; + final bool onFailure$async; final void Function(Call call, Response response) _onResponse; + final bool onResponse$async; - void onFailure(Call call, jni.JObject iOException) { + void onFailure(Call call, _$jni.JObject iOException) { return _onFailure(call, iOException); } @@ -8117,121 +8572,131 @@ class _$CallbackImpl implements $CallbackImpl { } } -final class $CallbackType extends jni.JObjType { - const $CallbackType(); +final class $Callback$Type extends _$jni.JObjType { + @_$jni.internal + const $Callback$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Callback;'; - @override - Callback fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Callback fromReference(_$jni.JReference reference) => Callback.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($CallbackType).hashCode; + @_$core.override + int get hashCode => ($Callback$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($CallbackType) && other is $CallbackType; + return other.runtimeType == ($Callback$Type) && other is $Callback$Type; } } -/// from: okhttp3.ConnectionPool -class ConnectionPool extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.ConnectionPool` +class ConnectionPool extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal ConnectionPool.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/ConnectionPool'); + static final _class = _$jni.JClass.forName(r'okhttp3/ConnectionPool'); /// The type which includes information such as the signature of this class. - static const type = $ConnectionPoolType(); - static final _id_new0 = _class.constructorId( + static const type = $ConnectionPool$Type(); + static final _id_new$ = _class.constructorId( r'(Lokhttp3/internal/connection/RealConnectionPool;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (okhttp3.internal.connection.RealConnectionPool realConnectionPool) + /// from: `public void (okhttp3.internal.connection.RealConnectionPool realConnectionPool)` /// The returned object must be released after use, by calling the [release] method. factory ConnectionPool( - jni.JObject realConnectionPool, + _$jni.JObject realConnectionPool, ) { - return ConnectionPool.fromReference(_new0(_class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, realConnectionPool.reference.pointer) + return ConnectionPool.fromReference(_new$( + _class.reference.pointer, + _id_new$ as _$jni.JMethodIDPtr, + realConnectionPool.reference.pointer) .reference); } - static final _id_new1 = _class.constructorId( + static final _id_new$1 = _class.constructorId( r'(IJLjava/util/concurrent/TimeUnit;)V', ); - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _new$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - $Int32, - ffi.Int64, - ffi.Pointer + _$jni.Int32, + _$jni.Int64, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - int, ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, int, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (int i, long j, java.util.concurrent.TimeUnit timeUnit) + /// from: `public void (int i, long j, java.util.concurrent.TimeUnit timeUnit)` /// The returned object must be released after use, by calling the [release] method. - factory ConnectionPool.new1( + factory ConnectionPool.new$1( int i, int j, TimeUnit timeUnit, ) { - return ConnectionPool.fromReference(_new1(_class.reference.pointer, - _id_new1 as jni.JMethodIDPtr, i, j, timeUnit.reference.pointer) + return ConnectionPool.fromReference(_new$1(_class.reference.pointer, + _id_new$1 as _$jni.JMethodIDPtr, i, j, timeUnit.reference.pointer) .reference); } - static final _id_new2 = _class.constructorId( + static final _id_new$2 = _class.constructorId( r'()V', ); - static final _new2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _new$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void () + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. - factory ConnectionPool.new2() { + factory ConnectionPool.new$2() { return ConnectionPool.fromReference( - _new2(_class.reference.pointer, _id_new2 as jni.JMethodIDPtr) + _new$2(_class.reference.pointer, _id_new$2 as _$jni.JMethodIDPtr) .reference); } @@ -8240,22 +8705,22 @@ class ConnectionPool extends jni.JObject { r'()I', ); - static final _idleConnectionCount = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _idleConnectionCount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int idleConnectionCount() + /// from: `public final int idleConnectionCount()` int idleConnectionCount() { return _idleConnectionCount( - reference.pointer, _id_idleConnectionCount as jni.JMethodIDPtr) + reference.pointer, _id_idleConnectionCount as _$jni.JMethodIDPtr) .integer; } @@ -8264,22 +8729,22 @@ class ConnectionPool extends jni.JObject { r'()I', ); - static final _connectionCount = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _connectionCount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int connectionCount() + /// from: `public final int connectionCount()` int connectionCount() { return _connectionCount( - reference.pointer, _id_connectionCount as jni.JMethodIDPtr) + reference.pointer, _id_connectionCount as _$jni.JMethodIDPtr) .integer; } @@ -8288,84 +8753,92 @@ class ConnectionPool extends jni.JObject { r'()V', ); - static final _evictAll = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _evictAll = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final void evictAll() + /// from: `public final void evictAll()` void evictAll() { - _evictAll(reference.pointer, _id_evictAll as jni.JMethodIDPtr).check(); + _evictAll(reference.pointer, _id_evictAll as _$jni.JMethodIDPtr).check(); } } -final class $ConnectionPoolType extends jni.JObjType { - const $ConnectionPoolType(); +final class $ConnectionPool$Type extends _$jni.JObjType { + @_$jni.internal + const $ConnectionPool$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/ConnectionPool;'; - @override - ConnectionPool fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + ConnectionPool fromReference(_$jni.JReference reference) => ConnectionPool.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($ConnectionPoolType).hashCode; + @_$core.override + int get hashCode => ($ConnectionPool$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($ConnectionPoolType) && - other is $ConnectionPoolType; + return other.runtimeType == ($ConnectionPool$Type) && + other is $ConnectionPool$Type; } } -/// from: okhttp3.Dispatcher -class Dispatcher extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Dispatcher` +class Dispatcher extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Dispatcher.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Dispatcher'); + static final _class = _$jni.JClass.forName(r'okhttp3/Dispatcher'); /// The type which includes information such as the signature of this class. - static const type = $DispatcherType(); - static final _id_new0 = _class.constructorId( + static const type = $Dispatcher$Type(); + static final _id_new$ = _class.constructorId( r'()V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void () + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. factory Dispatcher() { return Dispatcher.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) .reference); } @@ -8374,22 +8847,22 @@ class Dispatcher extends jni.JObject { r'()I', ); - static final _getMaxRequests = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getMaxRequests = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int getMaxRequests() + /// from: `public final int getMaxRequests()` int getMaxRequests() { return _getMaxRequests( - reference.pointer, _id_getMaxRequests as jni.JMethodIDPtr) + reference.pointer, _id_getMaxRequests as _$jni.JMethodIDPtr) .integer; } @@ -8398,22 +8871,22 @@ class Dispatcher extends jni.JObject { r'(I)V', ); - static final _setMaxRequests = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallVoidMethod') + static final _setMaxRequests = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public final void setMaxRequests(int i) + /// from: `public final void setMaxRequests(int i)` void setMaxRequests( int i, ) { _setMaxRequests( - reference.pointer, _id_setMaxRequests as jni.JMethodIDPtr, i) + reference.pointer, _id_setMaxRequests as _$jni.JMethodIDPtr, i) .check(); } @@ -8422,22 +8895,22 @@ class Dispatcher extends jni.JObject { r'()I', ); - static final _getMaxRequestsPerHost = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getMaxRequestsPerHost = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int getMaxRequestsPerHost() + /// from: `public final int getMaxRequestsPerHost()` int getMaxRequestsPerHost() { return _getMaxRequestsPerHost( - reference.pointer, _id_getMaxRequestsPerHost as jni.JMethodIDPtr) + reference.pointer, _id_getMaxRequestsPerHost as _$jni.JMethodIDPtr) .integer; } @@ -8446,22 +8919,22 @@ class Dispatcher extends jni.JObject { r'(I)V', ); - static final _setMaxRequestsPerHost = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallVoidMethod') + static final _setMaxRequestsPerHost = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public final void setMaxRequestsPerHost(int i) + /// from: `public final void setMaxRequestsPerHost(int i)` void setMaxRequestsPerHost( int i, ) { - _setMaxRequestsPerHost( - reference.pointer, _id_setMaxRequestsPerHost as jni.JMethodIDPtr, i) + _setMaxRequestsPerHost(reference.pointer, + _id_setMaxRequestsPerHost as _$jni.JMethodIDPtr, i) .check(); } @@ -8470,24 +8943,24 @@ class Dispatcher extends jni.JObject { r'()Ljava/lang/Runnable;', ); - static final _getIdleCallback = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _getIdleCallback = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.lang.Runnable getIdleCallback() + /// from: `public final java.lang.Runnable getIdleCallback()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject getIdleCallback() { + _$jni.JObject getIdleCallback() { return _getIdleCallback( - reference.pointer, _id_getIdleCallback as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_getIdleCallback as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_setIdleCallback = _class.instanceMethodId( @@ -8495,22 +8968,24 @@ class Dispatcher extends jni.JObject { r'(Ljava/lang/Runnable;)V', ); - static final _setIdleCallback = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _setIdleCallback = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final void setIdleCallback(java.lang.Runnable runnable) + /// from: `public final void setIdleCallback(java.lang.Runnable runnable)` void setIdleCallback( - jni.JObject runnable, + _$jni.JObject runnable, ) { - _setIdleCallback(reference.pointer, _id_setIdleCallback as jni.JMethodIDPtr, + _setIdleCallback( + reference.pointer, + _id_setIdleCallback as _$jni.JMethodIDPtr, runnable.reference.pointer) .check(); } @@ -8520,48 +8995,48 @@ class Dispatcher extends jni.JObject { r'()Ljava/util/concurrent/ExecutorService;', ); - static final _executorService = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _executorService = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.concurrent.ExecutorService executorService() + /// from: `public final java.util.concurrent.ExecutorService executorService()` /// The returned object must be released after use, by calling the [release] method. ExecutorService executorService() { return _executorService( - reference.pointer, _id_executorService as jni.JMethodIDPtr) - .object(const $ExecutorServiceType()); + reference.pointer, _id_executorService as _$jni.JMethodIDPtr) + .object(const $ExecutorService$Type()); } - static final _id_new1 = _class.constructorId( + static final _id_new$1 = _class.constructorId( r'(Ljava/util/concurrent/ExecutorService;)V', ); - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (java.util.concurrent.ExecutorService executorService) + /// from: `public void (java.util.concurrent.ExecutorService executorService)` /// The returned object must be released after use, by calling the [release] method. - factory Dispatcher.new1( + factory Dispatcher.new$1( ExecutorService executorService, ) { - return Dispatcher.fromReference(_new1(_class.reference.pointer, - _id_new1 as jni.JMethodIDPtr, executorService.reference.pointer) + return Dispatcher.fromReference(_new$1(_class.reference.pointer, + _id_new$1 as _$jni.JMethodIDPtr, executorService.reference.pointer) .reference); } @@ -8570,21 +9045,21 @@ class Dispatcher extends jni.JObject { r'()V', ); - static final _cancelAll = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _cancelAll = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final void cancelAll() + /// from: `public final void cancelAll()` void cancelAll() { - _cancelAll(reference.pointer, _id_cancelAll as jni.JMethodIDPtr).check(); + _cancelAll(reference.pointer, _id_cancelAll as _$jni.JMethodIDPtr).check(); } static final _id_queuedCalls = _class.instanceMethodId( @@ -8592,23 +9067,24 @@ class Dispatcher extends jni.JObject { r'()Ljava/util/List;', ); - static final _queuedCalls = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _queuedCalls = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.List queuedCalls() + /// from: `public final java.util.List queuedCalls()` /// The returned object must be released after use, by calling the [release] method. - jni.JList queuedCalls() { - return _queuedCalls(reference.pointer, _id_queuedCalls as jni.JMethodIDPtr) - .object(const jni.JListType($CallType())); + _$jni.JList queuedCalls() { + return _queuedCalls( + reference.pointer, _id_queuedCalls as _$jni.JMethodIDPtr) + .object(const _$jni.JListType($Call$Type())); } static final _id_runningCalls = _class.instanceMethodId( @@ -8616,24 +9092,24 @@ class Dispatcher extends jni.JObject { r'()Ljava/util/List;', ); - static final _runningCalls = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _runningCalls = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.List runningCalls() + /// from: `public final java.util.List runningCalls()` /// The returned object must be released after use, by calling the [release] method. - jni.JList runningCalls() { + _$jni.JList runningCalls() { return _runningCalls( - reference.pointer, _id_runningCalls as jni.JMethodIDPtr) - .object(const jni.JListType($CallType())); + reference.pointer, _id_runningCalls as _$jni.JMethodIDPtr) + .object(const _$jni.JListType($Call$Type())); } static final _id_queuedCallsCount = _class.instanceMethodId( @@ -8641,22 +9117,22 @@ class Dispatcher extends jni.JObject { r'()I', ); - static final _queuedCallsCount = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _queuedCallsCount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int queuedCallsCount() + /// from: `public final int queuedCallsCount()` int queuedCallsCount() { return _queuedCallsCount( - reference.pointer, _id_queuedCallsCount as jni.JMethodIDPtr) + reference.pointer, _id_queuedCallsCount as _$jni.JMethodIDPtr) .integer; } @@ -8665,85 +9141,93 @@ class Dispatcher extends jni.JObject { r'()I', ); - static final _runningCallsCount = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _runningCallsCount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int runningCallsCount() + /// from: `public final int runningCallsCount()` int runningCallsCount() { return _runningCallsCount( - reference.pointer, _id_runningCallsCount as jni.JMethodIDPtr) + reference.pointer, _id_runningCallsCount as _$jni.JMethodIDPtr) .integer; } } -final class $DispatcherType extends jni.JObjType { - const $DispatcherType(); +final class $Dispatcher$Type extends _$jni.JObjType { + @_$jni.internal + const $Dispatcher$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Dispatcher;'; - @override - Dispatcher fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Dispatcher fromReference(_$jni.JReference reference) => Dispatcher.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($DispatcherType).hashCode; + @_$core.override + int get hashCode => ($Dispatcher$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($DispatcherType) && other is $DispatcherType; + return other.runtimeType == ($Dispatcher$Type) && other is $Dispatcher$Type; } } -/// from: java.util.concurrent.ExecutorService -class ExecutorService extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `java.util.concurrent.ExecutorService` +class ExecutorService extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal ExecutorService.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'java/util/concurrent/ExecutorService'); + _$jni.JClass.forName(r'java/util/concurrent/ExecutorService'); /// The type which includes information such as the signature of this class. - static const type = $ExecutorServiceType(); + static const type = $ExecutorService$Type(); static final _id_shutdown = _class.instanceMethodId( r'shutdown', r'()V', ); - static final _shutdown = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _shutdown = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract void shutdown() + /// from: `public abstract void shutdown()` void shutdown() { - _shutdown(reference.pointer, _id_shutdown as jni.JMethodIDPtr).check(); + _shutdown(reference.pointer, _id_shutdown as _$jni.JMethodIDPtr).check(); } static final _id_shutdownNow = _class.instanceMethodId( @@ -8751,23 +9235,24 @@ class ExecutorService extends jni.JObject { r'()Ljava/util/List;', ); - static final _shutdownNow = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _shutdownNow = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract java.util.List shutdownNow() + /// from: `public abstract java.util.List shutdownNow()` /// The returned object must be released after use, by calling the [release] method. - jni.JList shutdownNow() { - return _shutdownNow(reference.pointer, _id_shutdownNow as jni.JMethodIDPtr) - .object(const jni.JListType(jni.JObjectType())); + _$jni.JList<_$jni.JObject> shutdownNow() { + return _shutdownNow( + reference.pointer, _id_shutdownNow as _$jni.JMethodIDPtr) + .object(const _$jni.JListType(_$jni.JObjectType())); } static final _id_isShutdown = _class.instanceMethodId( @@ -8775,21 +9260,21 @@ class ExecutorService extends jni.JObject { r'()Z', ); - static final _isShutdown = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _isShutdown = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract boolean isShutdown() + /// from: `public abstract boolean isShutdown()` bool isShutdown() { - return _isShutdown(reference.pointer, _id_isShutdown as jni.JMethodIDPtr) + return _isShutdown(reference.pointer, _id_isShutdown as _$jni.JMethodIDPtr) .boolean; } @@ -8798,22 +9283,22 @@ class ExecutorService extends jni.JObject { r'()Z', ); - static final _isTerminated = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _isTerminated = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract boolean isTerminated() + /// from: `public abstract boolean isTerminated()` bool isTerminated() { return _isTerminated( - reference.pointer, _id_isTerminated as jni.JMethodIDPtr) + reference.pointer, _id_isTerminated as _$jni.JMethodIDPtr) .boolean; } @@ -8822,42 +9307,267 @@ class ExecutorService extends jni.JObject { r'(JLjava/util/concurrent/TimeUnit;)Z', ); - static final _awaitTermination = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + static final _awaitTermination = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Int64, _$jni.Pointer<_$jni.Void>)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract boolean awaitTermination(long j, java.util.concurrent.TimeUnit timeUnit) + /// from: `public abstract boolean awaitTermination(long j, java.util.concurrent.TimeUnit timeUnit)` bool awaitTermination( int j, TimeUnit timeUnit, ) { return _awaitTermination( reference.pointer, - _id_awaitTermination as jni.JMethodIDPtr, + _id_awaitTermination as _$jni.JMethodIDPtr, j, timeUnit.reference.pointer) .boolean; } - /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; + static final _id_submit = _class.instanceMethodId( + r'submit', + r'(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;', + ); + + static final _submit = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract java.util.concurrent.Future submit(java.util.concurrent.Callable callable)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JObject submit<$T extends _$jni.JObject>( + _$jni.JObject callable, { + required _$jni.JObjType<$T> T, + }) { + return _submit(reference.pointer, _id_submit as _$jni.JMethodIDPtr, + callable.reference.pointer) + .object(const _$jni.JObjectType()); + } + + static final _id_submit$1 = _class.instanceMethodId( + r'submit', + r'(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Future;', + ); + + static final _submit$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract java.util.concurrent.Future submit(java.lang.Runnable runnable, T object)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JObject submit$1<$T extends _$jni.JObject>( + _$jni.JObject runnable, + $T object, { + _$jni.JObjType<$T>? T, + }) { + T ??= _$jni.lowestCommonSuperType([ + object.$type, + ]) as _$jni.JObjType<$T>; + return _submit$1(reference.pointer, _id_submit$1 as _$jni.JMethodIDPtr, + runnable.reference.pointer, object.reference.pointer) + .object(const _$jni.JObjectType()); + } + + static final _id_submit$2 = _class.instanceMethodId( + r'submit', + r'(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;', + ); + + static final _submit$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract java.util.concurrent.Future submit(java.lang.Runnable runnable)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JObject submit$2( + _$jni.JObject runnable, + ) { + return _submit$2(reference.pointer, _id_submit$2 as _$jni.JMethodIDPtr, + runnable.reference.pointer) + .object(const _$jni.JObjectType()); + } + + static final _id_invokeAll = _class.instanceMethodId( + r'invokeAll', + r'(Ljava/util/Collection;)Ljava/util/List;', + ); + + static final _invokeAll = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract java.util.List invokeAll(java.util.Collection collection)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JList<_$jni.JObject> invokeAll<$T extends _$jni.JObject>( + _$jni.JObject collection, { + required _$jni.JObjType<$T> T, + }) { + return _invokeAll(reference.pointer, _id_invokeAll as _$jni.JMethodIDPtr, + collection.reference.pointer) + .object(const _$jni.JListType(_$jni.JObjectType())); + } + + static final _id_invokeAll$1 = _class.instanceMethodId( + r'invokeAll', + r'(Ljava/util/Collection;JLjava/util/concurrent/TimeUnit;)Ljava/util/List;', + ); - static jni.JObjectPtr _$invoke( + static final _invokeAll$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Int64, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + int, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract java.util.List invokeAll(java.util.Collection collection, long j, java.util.concurrent.TimeUnit timeUnit)` + /// The returned object must be released after use, by calling the [release] method. + _$jni.JList<_$jni.JObject> invokeAll$1<$T extends _$jni.JObject>( + _$jni.JObject collection, + int j, + TimeUnit timeUnit, { + required _$jni.JObjType<$T> T, + }) { + return _invokeAll$1( + reference.pointer, + _id_invokeAll$1 as _$jni.JMethodIDPtr, + collection.reference.pointer, + j, + timeUnit.reference.pointer) + .object(const _$jni.JListType(_$jni.JObjectType())); + } + + static final _id_invokeAny = _class.instanceMethodId( + r'invokeAny', + r'(Ljava/util/Collection;)Ljava/lang/Object;', + ); + + static final _invokeAny = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( + 'globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract T invokeAny(java.util.Collection collection)` + /// The returned object must be released after use, by calling the [release] method. + $T invokeAny<$T extends _$jni.JObject>( + _$jni.JObject collection, { + required _$jni.JObjType<$T> T, + }) { + return _invokeAny(reference.pointer, _id_invokeAny as _$jni.JMethodIDPtr, + collection.reference.pointer) + .object(T); + } + + static final _id_invokeAny$1 = _class.instanceMethodId( + r'invokeAny', + r'(Ljava/util/Collection;JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;', + ); + + static final _invokeAny$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Int64, + _$jni.Pointer<_$jni.Void> + )>)>>('globalEnv_CallObjectMethod') + .asFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + int, + _$jni.Pointer<_$jni.Void>)>(); + + /// from: `public abstract T invokeAny(java.util.Collection collection, long j, java.util.concurrent.TimeUnit timeUnit)` + /// The returned object must be released after use, by calling the [release] method. + $T invokeAny$1<$T extends _$jni.JObject>( + _$jni.JObject collection, + int j, + TimeUnit timeUnit, { + required _$jni.JObjType<$T> T, + }) { + return _invokeAny$1( + reference.pointer, + _id_invokeAny$1 as _$jni.JMethodIDPtr, + collection.reference.pointer, + j, + timeUnit.reference.pointer) + .object(T); + } + + /// Maps a specific port to the implemented interface. + static final _$core.Map _$impls = {}; + static _$jni.JObjectPtr _$invoke( int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, ) { return _$invokeMethod( port, - $MethodInvocation.fromAddresses( + _$jni.MethodInvocation.fromAddresses( 0, descriptor.address, args.address, @@ -8865,120 +9575,265 @@ class ExecutorService extends jni.JObject { ); } - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); - static ffi.Pointer _$invokeMethod( + static _$jni.Pointer<_$jni.Void> _$invokeMethod( int $p, - $MethodInvocation $i, + _$jni.MethodInvocation $i, ) { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; if ($d == r'shutdown()V') { _$impls[$p]!.shutdown(); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'shutdownNow()Ljava/util/List;') { final $r = _$impls[$p]!.shutdownNow(); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) .reference .toPointer(); } if ($d == r'isShutdown()Z') { final $r = _$impls[$p]!.isShutdown(); - return jni.JBoolean($r).reference.toPointer(); + return _$jni.JBoolean($r).reference.toPointer(); } if ($d == r'isTerminated()Z') { final $r = _$impls[$p]!.isTerminated(); - return jni.JBoolean($r).reference.toPointer(); + return _$jni.JBoolean($r).reference.toPointer(); } if ($d == r'awaitTermination(JLjava/util/concurrent/TimeUnit;)Z') { final $r = _$impls[$p]!.awaitTermination( $a[0] - .castTo(const jni.JLongType(), releaseOriginal: true) + .as(const _$jni.JLongType(), releaseOriginal: true) + .longValue(releaseOriginal: true), + $a[1].as(const $TimeUnit$Type(), releaseOriginal: true), + ); + return _$jni.JBoolean($r).reference.toPointer(); + } + if ($d == + r'submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;') { + final $r = _$impls[$p]!.submit( + $a[0].as(const _$jni.JObjectType(), releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == + r'submit(Ljava/lang/Runnable;Ljava/lang/Object;)Ljava/util/concurrent/Future;') { + final $r = _$impls[$p]!.submit$1( + $a[0].as(const _$jni.JObjectType(), releaseOriginal: true), + $a[1].as(const _$jni.JObjectType(), releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;') { + final $r = _$impls[$p]!.submit$2( + $a[0].as(const _$jni.JObjectType(), releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'invokeAll(Ljava/util/Collection;)Ljava/util/List;') { + final $r = _$impls[$p]!.invokeAll( + $a[0].as(const _$jni.JObjectType(), releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == + r'invokeAll(Ljava/util/Collection;JLjava/util/concurrent/TimeUnit;)Ljava/util/List;') { + final $r = _$impls[$p]!.invokeAll$1( + $a[0].as(const _$jni.JObjectType(), releaseOriginal: true), + $a[1] + .as(const _$jni.JLongType(), releaseOriginal: true) + .longValue(releaseOriginal: true), + $a[2].as(const $TimeUnit$Type(), releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == r'invokeAny(Ljava/util/Collection;)Ljava/lang/Object;') { + final $r = _$impls[$p]!.invokeAny( + $a[0].as(const _$jni.JObjectType(), releaseOriginal: true), + ); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); + } + if ($d == + r'invokeAny(Ljava/util/Collection;JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;') { + final $r = _$impls[$p]!.invokeAny$1( + $a[0].as(const _$jni.JObjectType(), releaseOriginal: true), + $a[1] + .as(const _$jni.JLongType(), releaseOriginal: true) .longValue(releaseOriginal: true), - $a[1].castTo(const $TimeUnitType(), releaseOriginal: true), + $a[2].as(const $TimeUnit$Type(), releaseOriginal: true), ); - return jni.JBoolean($r).reference.toPointer(); + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) + .reference + .toPointer(); } } catch (e) { - return ProtectedJniExtensions.newDartException(e); + return _$jni.ProtectedJniExtensions.newDartException(e); } - return jni.nullptr; + return _$jni.nullptr; } - factory ExecutorService.implement( - $ExecutorServiceImpl $impl, - ) { - final $p = ReceivePort(); - final $x = ExecutorService.fromReference( - ProtectedJniExtensions.newPortProxy( - r'java.util.concurrent.ExecutorService', - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { + static void implementIn( + _$jni.JImplementer implementer, + $ExecutorService $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { if ($m == null) { _$impls.remove($p.sendPort.nativePort); $p.close(); return; } - final $i = $MethodInvocation.fromMessage($m as List); + final $i = _$jni.MethodInvocation.fromMessage($m); final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); }); - return $x; + implementer.add( + r'java.util.concurrent.ExecutorService', + $p, + _$invokePointer, + [ + if ($impl.shutdown$async) r'shutdown()V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory ExecutorService.implement( + $ExecutorService $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return ExecutorService.fromReference( + $i.implementReference(), + ); } } -abstract interface class $ExecutorServiceImpl { - factory $ExecutorServiceImpl({ +abstract base mixin class $ExecutorService { + factory $ExecutorService({ required void Function() shutdown, - required jni.JList Function() shutdownNow, + bool shutdown$async, + required _$jni.JList<_$jni.JObject> Function() shutdownNow, required bool Function() isShutdown, required bool Function() isTerminated, required bool Function(int j, TimeUnit timeUnit) awaitTermination, - }) = _$ExecutorServiceImpl; + required _$jni.JObject Function(_$jni.JObject callable) submit, + required _$jni.JObject Function( + _$jni.JObject runnable, _$jni.JObject object) + submit$1, + required _$jni.JObject Function(_$jni.JObject runnable) submit$2, + required _$jni.JList<_$jni.JObject> Function(_$jni.JObject collection) + invokeAll, + required _$jni.JList<_$jni.JObject> Function( + _$jni.JObject collection, int j, TimeUnit timeUnit) + invokeAll$1, + required _$jni.JObject Function(_$jni.JObject collection) invokeAny, + required _$jni.JObject Function( + _$jni.JObject collection, int j, TimeUnit timeUnit) + invokeAny$1, + }) = _$ExecutorService; void shutdown(); - jni.JList shutdownNow(); + bool get shutdown$async => false; + _$jni.JList<_$jni.JObject> shutdownNow(); bool isShutdown(); bool isTerminated(); bool awaitTermination(int j, TimeUnit timeUnit); + _$jni.JObject submit(_$jni.JObject callable); + _$jni.JObject submit$1(_$jni.JObject runnable, _$jni.JObject object); + _$jni.JObject submit$2(_$jni.JObject runnable); + _$jni.JList<_$jni.JObject> invokeAll(_$jni.JObject collection); + _$jni.JList<_$jni.JObject> invokeAll$1( + _$jni.JObject collection, int j, TimeUnit timeUnit); + _$jni.JObject invokeAny(_$jni.JObject collection); + _$jni.JObject invokeAny$1(_$jni.JObject collection, int j, TimeUnit timeUnit); } -class _$ExecutorServiceImpl implements $ExecutorServiceImpl { - _$ExecutorServiceImpl({ +final class _$ExecutorService with $ExecutorService { + _$ExecutorService({ required void Function() shutdown, - required jni.JList Function() shutdownNow, + this.shutdown$async = false, + required _$jni.JList<_$jni.JObject> Function() shutdownNow, required bool Function() isShutdown, required bool Function() isTerminated, required bool Function(int j, TimeUnit timeUnit) awaitTermination, + required _$jni.JObject Function(_$jni.JObject callable) submit, + required _$jni.JObject Function( + _$jni.JObject runnable, _$jni.JObject object) + submit$1, + required _$jni.JObject Function(_$jni.JObject runnable) submit$2, + required _$jni.JList<_$jni.JObject> Function(_$jni.JObject collection) + invokeAll, + required _$jni.JList<_$jni.JObject> Function( + _$jni.JObject collection, int j, TimeUnit timeUnit) + invokeAll$1, + required _$jni.JObject Function(_$jni.JObject collection) invokeAny, + required _$jni.JObject Function( + _$jni.JObject collection, int j, TimeUnit timeUnit) + invokeAny$1, }) : _shutdown = shutdown, _shutdownNow = shutdownNow, _isShutdown = isShutdown, _isTerminated = isTerminated, - _awaitTermination = awaitTermination; + _awaitTermination = awaitTermination, + _submit = submit, + _submit$1 = submit$1, + _submit$2 = submit$2, + _invokeAll = invokeAll, + _invokeAll$1 = invokeAll$1, + _invokeAny = invokeAny, + _invokeAny$1 = invokeAny$1; final void Function() _shutdown; - final jni.JList Function() _shutdownNow; + final bool shutdown$async; + final _$jni.JList<_$jni.JObject> Function() _shutdownNow; final bool Function() _isShutdown; final bool Function() _isTerminated; final bool Function(int j, TimeUnit timeUnit) _awaitTermination; + final _$jni.JObject Function(_$jni.JObject callable) _submit; + final _$jni.JObject Function(_$jni.JObject runnable, _$jni.JObject object) + _submit$1; + final _$jni.JObject Function(_$jni.JObject runnable) _submit$2; + final _$jni.JList<_$jni.JObject> Function(_$jni.JObject collection) + _invokeAll; + final _$jni.JList<_$jni.JObject> Function( + _$jni.JObject collection, int j, TimeUnit timeUnit) _invokeAll$1; + final _$jni.JObject Function(_$jni.JObject collection) _invokeAny; + final _$jni.JObject Function( + _$jni.JObject collection, int j, TimeUnit timeUnit) _invokeAny$1; void shutdown() { return _shutdown(); } - jni.JList shutdownNow() { + _$jni.JList<_$jni.JObject> shutdownNow() { return _shutdownNow(); } @@ -8993,71 +9848,109 @@ class _$ExecutorServiceImpl implements $ExecutorServiceImpl { bool awaitTermination(int j, TimeUnit timeUnit) { return _awaitTermination(j, timeUnit); } + + _$jni.JObject submit(_$jni.JObject callable) { + return _submit(callable); + } + + _$jni.JObject submit$1(_$jni.JObject runnable, _$jni.JObject object) { + return _submit$1(runnable, object); + } + + _$jni.JObject submit$2(_$jni.JObject runnable) { + return _submit$2(runnable); + } + + _$jni.JList<_$jni.JObject> invokeAll(_$jni.JObject collection) { + return _invokeAll(collection); + } + + _$jni.JList<_$jni.JObject> invokeAll$1( + _$jni.JObject collection, int j, TimeUnit timeUnit) { + return _invokeAll$1(collection, j, timeUnit); + } + + _$jni.JObject invokeAny(_$jni.JObject collection) { + return _invokeAny(collection); + } + + _$jni.JObject invokeAny$1( + _$jni.JObject collection, int j, TimeUnit timeUnit) { + return _invokeAny$1(collection, j, timeUnit); + } } -final class $ExecutorServiceType extends jni.JObjType { - const $ExecutorServiceType(); +final class $ExecutorService$Type extends _$jni.JObjType { + @_$jni.internal + const $ExecutorService$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Ljava/util/concurrent/ExecutorService;'; - @override - ExecutorService fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + ExecutorService fromReference(_$jni.JReference reference) => ExecutorService.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($ExecutorServiceType).hashCode; + @_$core.override + int get hashCode => ($ExecutorService$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($ExecutorServiceType) && - other is $ExecutorServiceType; + return other.runtimeType == ($ExecutorService$Type) && + other is $ExecutorService$Type; } } -/// from: okhttp3.Cache$Companion -class Cache_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Cache$Companion` +class Cache_Companion extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Cache_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Cache$Companion'); + static final _class = _$jni.JClass.forName(r'okhttp3/Cache$Companion'); /// The type which includes information such as the signature of this class. - static const type = $Cache_CompanionType(); + static const type = $Cache_Companion$Type(); static final _id_key = _class.instanceMethodId( r'key', r'(Lokhttp3/HttpUrl;)Ljava/lang/String;', ); - static final _key = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _key = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final java.lang.String key(okhttp3.HttpUrl httpUrl) + /// from: `public final java.lang.String key(okhttp3.HttpUrl httpUrl)` /// The returned object must be released after use, by calling the [release] method. - jni.JString key( - jni.JObject httpUrl, + _$jni.JString key( + _$jni.JObject httpUrl, ) { - return _key(reference.pointer, _id_key as jni.JMethodIDPtr, + return _key(reference.pointer, _id_key as _$jni.JMethodIDPtr, httpUrl.reference.pointer) - .object(const jni.JStringType()); + .object(const _$jni.JStringType()); } static final _id_varyMatches = _class.instanceMethodId( @@ -9065,26 +9958,26 @@ class Cache_Companion extends jni.JObject { r'(Lokhttp3/Response;Lokhttp3/Headers;Lokhttp3/Request;)Z', ); - static final _varyMatches = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _varyMatches = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final boolean varyMatches(okhttp3.Response response, okhttp3.Headers headers, okhttp3.Request request) + /// from: `public final boolean varyMatches(okhttp3.Response response, okhttp3.Headers headers, okhttp3.Request request)` bool varyMatches( Response response, Headers headers, @@ -9092,7 +9985,7 @@ class Cache_Companion extends jni.JObject { ) { return _varyMatches( reference.pointer, - _id_varyMatches as jni.JMethodIDPtr, + _id_varyMatches as _$jni.JMethodIDPtr, response.reference.pointer, headers.reference.pointer, request.reference.pointer) @@ -9104,22 +9997,22 @@ class Cache_Companion extends jni.JObject { r'(Lokhttp3/Response;)Z', ); - static final _hasVaryAll = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _hasVaryAll = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final boolean hasVaryAll(okhttp3.Response response) + /// from: `public final boolean hasVaryAll(okhttp3.Response response)` bool hasVaryAll( Response response, ) { - return _hasVaryAll(reference.pointer, _id_hasVaryAll as jni.JMethodIDPtr, + return _hasVaryAll(reference.pointer, _id_hasVaryAll as _$jni.JMethodIDPtr, response.reference.pointer) .boolean; } @@ -9129,201 +10022,221 @@ class Cache_Companion extends jni.JObject { r'(Lokhttp3/Response;)Lokhttp3/Headers;', ); - static final _varyHeaders = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _varyHeaders = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.Headers varyHeaders(okhttp3.Response response) + /// from: `public final okhttp3.Headers varyHeaders(okhttp3.Response response)` /// The returned object must be released after use, by calling the [release] method. Headers varyHeaders( Response response, ) { - return _varyHeaders(reference.pointer, _id_varyHeaders as jni.JMethodIDPtr, - response.reference.pointer) - .object(const $HeadersType()); + return _varyHeaders(reference.pointer, + _id_varyHeaders as _$jni.JMethodIDPtr, response.reference.pointer) + .object(const $Headers$Type()); } - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` /// The returned object must be released after use, by calling the [release] method. factory Cache_Companion( - jni.JObject defaultConstructorMarker, + _$jni.JObject defaultConstructorMarker, ) { - return Cache_Companion.fromReference(_new0( + return Cache_Companion.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, defaultConstructorMarker.reference.pointer) .reference); } } -final class $Cache_CompanionType extends jni.JObjType { - const $Cache_CompanionType(); +final class $Cache_Companion$Type extends _$jni.JObjType { + @_$jni.internal + const $Cache_Companion$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Cache$Companion;'; - @override - Cache_Companion fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Cache_Companion fromReference(_$jni.JReference reference) => Cache_Companion.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($Cache_CompanionType).hashCode; + @_$core.override + int get hashCode => ($Cache_Companion$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($Cache_CompanionType) && - other is $Cache_CompanionType; + return other.runtimeType == ($Cache_Companion$Type) && + other is $Cache_Companion$Type; } } -/// from: okhttp3.Cache$Entry$Companion -class Cache_Entry_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Cache$Entry$Companion` +class Cache_Entry_Companion extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Cache_Entry_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Cache$Entry$Companion'); + static final _class = _$jni.JClass.forName(r'okhttp3/Cache$Entry$Companion'); /// The type which includes information such as the signature of this class. - static const type = $Cache_Entry_CompanionType(); - static final _id_new0 = _class.constructorId( + static const type = $Cache_Entry_Companion$Type(); + static final _id_new$ = _class.constructorId( r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` /// The returned object must be released after use, by calling the [release] method. factory Cache_Entry_Companion( - jni.JObject defaultConstructorMarker, + _$jni.JObject defaultConstructorMarker, ) { - return Cache_Entry_Companion.fromReference(_new0( + return Cache_Entry_Companion.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, defaultConstructorMarker.reference.pointer) .reference); } } -final class $Cache_Entry_CompanionType - extends jni.JObjType { - const $Cache_Entry_CompanionType(); +final class $Cache_Entry_Companion$Type + extends _$jni.JObjType { + @_$jni.internal + const $Cache_Entry_Companion$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Cache$Entry$Companion;'; - @override - Cache_Entry_Companion fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Cache_Entry_Companion fromReference(_$jni.JReference reference) => Cache_Entry_Companion.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($Cache_Entry_CompanionType).hashCode; + @_$core.override + int get hashCode => ($Cache_Entry_Companion$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($Cache_Entry_CompanionType) && - other is $Cache_Entry_CompanionType; + return other.runtimeType == ($Cache_Entry_Companion$Type) && + other is $Cache_Entry_Companion$Type; } } -/// from: okhttp3.Cache -class Cache extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.Cache` +class Cache extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal Cache.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/Cache'); + static final _class = _$jni.JClass.forName(r'okhttp3/Cache'); /// The type which includes information such as the signature of this class. - static const type = $CacheType(); + static const type = $Cache$Type(); static final _id_Companion = _class.staticFieldId( r'Companion', r'Lokhttp3/Cache$Companion;', ); - /// from: static public final okhttp3.Cache$Companion Companion + /// from: `static public final okhttp3.Cache$Companion Companion` /// The returned object must be released after use, by calling the [release] method. static Cache_Companion get Companion => - _id_Companion.get(_class, const $Cache_CompanionType()); + _id_Companion.get(_class, const $Cache_Companion$Type()); - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'(Ljava/io/File;JLokhttp3/internal/io/FileSystem;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Int64, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Int64, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + int, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (java.io.File file, long j, okhttp3.internal.io.FileSystem fileSystem) + /// from: `public void (java.io.File file, long j, okhttp3.internal.io.FileSystem fileSystem)` /// The returned object must be released after use, by calling the [release] method. factory Cache( - jni.JObject file, + _$jni.JObject file, int j, - jni.JObject fileSystem, + _$jni.JObject fileSystem, ) { - return Cache.fromReference(_new0( + return Cache.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, file.reference.pointer, j, fileSystem.reference.pointer) @@ -9335,47 +10248,48 @@ class Cache extends jni.JObject { r'()Z', ); - static final _isClosed = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _isClosed = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final boolean isClosed() + /// from: `public final boolean isClosed()` bool isClosed() { - return _isClosed(reference.pointer, _id_isClosed as jni.JMethodIDPtr) + return _isClosed(reference.pointer, _id_isClosed as _$jni.JMethodIDPtr) .boolean; } - static final _id_new1 = _class.constructorId( + static final _id_new$1 = _class.constructorId( r'(Ljava/io/File;J)V', ); - static final _new1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + static final _new$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Pointer<_$jni.Void>, _$jni.Int64)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int)>(); - /// from: public void (java.io.File file, long j) + /// from: `public void (java.io.File file, long j)` /// The returned object must be released after use, by calling the [release] method. - factory Cache.new1( - jni.JObject file, + factory Cache.new$1( + _$jni.JObject file, int j, ) { - return Cache.fromReference(_new1(_class.reference.pointer, - _id_new1 as jni.JMethodIDPtr, file.reference.pointer, j) + return Cache.fromReference(_new$1(_class.reference.pointer, + _id_new$1 as _$jni.JMethodIDPtr, file.reference.pointer, j) .reference); } @@ -9384,21 +10298,22 @@ class Cache extends jni.JObject { r'()V', ); - static final _initialize = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _initialize = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final void initialize() + /// from: `public final void initialize()` void initialize() { - _initialize(reference.pointer, _id_initialize as jni.JMethodIDPtr).check(); + _initialize(reference.pointer, _id_initialize as _$jni.JMethodIDPtr) + .check(); } static final _id_delete = _class.instanceMethodId( @@ -9406,21 +10321,21 @@ class Cache extends jni.JObject { r'()V', ); - static final _delete = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _delete = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final void delete() + /// from: `public final void delete()` void delete() { - _delete(reference.pointer, _id_delete as jni.JMethodIDPtr).check(); + _delete(reference.pointer, _id_delete as _$jni.JMethodIDPtr).check(); } static final _id_evictAll = _class.instanceMethodId( @@ -9428,21 +10343,21 @@ class Cache extends jni.JObject { r'()V', ); - static final _evictAll = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _evictAll = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final void evictAll() + /// from: `public final void evictAll()` void evictAll() { - _evictAll(reference.pointer, _id_evictAll as jni.JMethodIDPtr).check(); + _evictAll(reference.pointer, _id_evictAll as _$jni.JMethodIDPtr).check(); } static final _id_urls = _class.instanceMethodId( @@ -9450,23 +10365,23 @@ class Cache extends jni.JObject { r'()Ljava/util/Iterator;', ); - static final _urls = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _urls = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.util.Iterator urls() + /// from: `public final java.util.Iterator urls()` /// The returned object must be released after use, by calling the [release] method. - jni.JIterator urls() { - return _urls(reference.pointer, _id_urls as jni.JMethodIDPtr) - .object(const jni.JIteratorType(jni.JStringType())); + _$jni.JIterator<_$jni.JString> urls() { + return _urls(reference.pointer, _id_urls as _$jni.JMethodIDPtr) + .object(const _$jni.JIteratorType(_$jni.JStringType())); } static final _id_writeAbortCount = _class.instanceMethodId( @@ -9474,22 +10389,22 @@ class Cache extends jni.JObject { r'()I', ); - static final _writeAbortCount = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _writeAbortCount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int writeAbortCount() + /// from: `public final int writeAbortCount()` int writeAbortCount() { return _writeAbortCount( - reference.pointer, _id_writeAbortCount as jni.JMethodIDPtr) + reference.pointer, _id_writeAbortCount as _$jni.JMethodIDPtr) .integer; } @@ -9498,22 +10413,22 @@ class Cache extends jni.JObject { r'()I', ); - static final _writeSuccessCount = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _writeSuccessCount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int writeSuccessCount() + /// from: `public final int writeSuccessCount()` int writeSuccessCount() { return _writeSuccessCount( - reference.pointer, _id_writeSuccessCount as jni.JMethodIDPtr) + reference.pointer, _id_writeSuccessCount as _$jni.JMethodIDPtr) .integer; } @@ -9522,21 +10437,21 @@ class Cache extends jni.JObject { r'()J', ); - static final _size = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _size = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final long size() + /// from: `public final long size()` int size() { - return _size(reference.pointer, _id_size as jni.JMethodIDPtr).long; + return _size(reference.pointer, _id_size as _$jni.JMethodIDPtr).long; } static final _id_maxSize = _class.instanceMethodId( @@ -9544,21 +10459,21 @@ class Cache extends jni.JObject { r'()J', ); - static final _maxSize = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _maxSize = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final long maxSize() + /// from: `public final long maxSize()` int maxSize() { - return _maxSize(reference.pointer, _id_maxSize as jni.JMethodIDPtr).long; + return _maxSize(reference.pointer, _id_maxSize as _$jni.JMethodIDPtr).long; } static final _id_flush = _class.instanceMethodId( @@ -9566,21 +10481,21 @@ class Cache extends jni.JObject { r'()V', ); - static final _flush = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _flush = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void flush() + /// from: `public void flush()` void flush() { - _flush(reference.pointer, _id_flush as jni.JMethodIDPtr).check(); + _flush(reference.pointer, _id_flush as _$jni.JMethodIDPtr).check(); } static final _id_close = _class.instanceMethodId( @@ -9588,21 +10503,21 @@ class Cache extends jni.JObject { r'()V', ); - static final _close = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _close = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void close() + /// from: `public void close()` void close() { - _close(reference.pointer, _id_close as jni.JMethodIDPtr).check(); + _close(reference.pointer, _id_close as _$jni.JMethodIDPtr).check(); } static final _id_directory = _class.instanceMethodId( @@ -9610,23 +10525,23 @@ class Cache extends jni.JObject { r'()Ljava/io/File;', ); - static final _directory = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _directory = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final java.io.File directory() + /// from: `public final java.io.File directory()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject directory() { - return _directory(reference.pointer, _id_directory as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + _$jni.JObject directory() { + return _directory(reference.pointer, _id_directory as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_networkCount = _class.instanceMethodId( @@ -9634,22 +10549,22 @@ class Cache extends jni.JObject { r'()I', ); - static final _networkCount = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _networkCount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int networkCount() + /// from: `public final int networkCount()` int networkCount() { return _networkCount( - reference.pointer, _id_networkCount as jni.JMethodIDPtr) + reference.pointer, _id_networkCount as _$jni.JMethodIDPtr) .integer; } @@ -9658,21 +10573,21 @@ class Cache extends jni.JObject { r'()I', ); - static final _hitCount = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _hitCount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int hitCount() + /// from: `public final int hitCount()` int hitCount() { - return _hitCount(reference.pointer, _id_hitCount as jni.JMethodIDPtr) + return _hitCount(reference.pointer, _id_hitCount as _$jni.JMethodIDPtr) .integer; } @@ -9681,22 +10596,22 @@ class Cache extends jni.JObject { r'()I', ); - static final _requestCount = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _requestCount = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int requestCount() + /// from: `public final int requestCount()` int requestCount() { return _requestCount( - reference.pointer, _id_requestCount as jni.JMethodIDPtr) + reference.pointer, _id_requestCount as _$jni.JMethodIDPtr) .integer; } @@ -9705,111 +10620,120 @@ class Cache extends jni.JObject { r'(Lokhttp3/HttpUrl;)Ljava/lang/String;', ); - static final _key = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _key = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final java.lang.String key(okhttp3.HttpUrl httpUrl) + /// from: `static public final java.lang.String key(okhttp3.HttpUrl httpUrl)` /// The returned object must be released after use, by calling the [release] method. - static jni.JString key( - jni.JObject httpUrl, + static _$jni.JString key( + _$jni.JObject httpUrl, ) { - return _key(_class.reference.pointer, _id_key as jni.JMethodIDPtr, + return _key(_class.reference.pointer, _id_key as _$jni.JMethodIDPtr, httpUrl.reference.pointer) - .object(const jni.JStringType()); + .object(const _$jni.JStringType()); } } -final class $CacheType extends jni.JObjType { - const $CacheType(); +final class $Cache$Type extends _$jni.JObjType { + @_$jni.internal + const $Cache$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/Cache;'; - @override - Cache fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + Cache fromReference(_$jni.JReference reference) => Cache.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($CacheType).hashCode; + @_$core.override + int get hashCode => ($Cache$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($CacheType) && other is $CacheType; + return other.runtimeType == ($Cache$Type) && other is $Cache$Type; } } -/// from: com.example.ok_http.RedirectReceivedCallback -class RedirectReceivedCallback extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `com.example.ok_http.RedirectReceivedCallback` +class RedirectReceivedCallback extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal RedirectReceivedCallback.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'com/example/ok_http/RedirectReceivedCallback'); + _$jni.JClass.forName(r'com/example/ok_http/RedirectReceivedCallback'); /// The type which includes information such as the signature of this class. - static const type = $RedirectReceivedCallbackType(); + static const type = $RedirectReceivedCallback$Type(); static final _id_onRedirectReceived = _class.instanceMethodId( r'onRedirectReceived', r'(Lokhttp3/Response;Ljava/lang/String;)V', ); - static final _onRedirectReceived = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onRedirectReceived = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onRedirectReceived(okhttp3.Response response, java.lang.String string) + /// from: `public abstract void onRedirectReceived(okhttp3.Response response, java.lang.String string)` void onRedirectReceived( Response response, - jni.JString string, + _$jni.JString string, ) { _onRedirectReceived( reference.pointer, - _id_onRedirectReceived as jni.JMethodIDPtr, + _id_onRedirectReceived as _$jni.JMethodIDPtr, response.reference.pointer, string.reference.pointer) .check(); } /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( + static final _$core.Map _$impls = {}; + static _$jni.JObjectPtr _$invoke( int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, ) { return _$invokeMethod( port, - $MethodInvocation.fromAddresses( + _$jni.MethodInvocation.fromAddresses( 0, descriptor.address, args.address, @@ -9817,145 +10741,174 @@ class RedirectReceivedCallback extends jni.JObject { ); } - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); - static ffi.Pointer _$invokeMethod( + static _$jni.Pointer<_$jni.Void> _$invokeMethod( int $p, - $MethodInvocation $i, + _$jni.MethodInvocation $i, ) { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; if ($d == r'onRedirectReceived(Lokhttp3/Response;Ljava/lang/String;)V') { _$impls[$p]!.onRedirectReceived( - $a[0].castTo(const $ResponseType(), releaseOriginal: true), - $a[1].castTo(const jni.JStringType(), releaseOriginal: true), + $a[0].as(const $Response$Type(), releaseOriginal: true), + $a[1].as(const _$jni.JStringType(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e); + return _$jni.ProtectedJniExtensions.newDartException(e); } - return jni.nullptr; + return _$jni.nullptr; } - factory RedirectReceivedCallback.implement( - $RedirectReceivedCallbackImpl $impl, - ) { - final $p = ReceivePort(); - final $x = RedirectReceivedCallback.fromReference( - ProtectedJniExtensions.newPortProxy( - r'com.example.ok_http.RedirectReceivedCallback', - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { + static void implementIn( + _$jni.JImplementer implementer, + $RedirectReceivedCallback $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { if ($m == null) { _$impls.remove($p.sendPort.nativePort); $p.close(); return; } - final $i = $MethodInvocation.fromMessage($m as List); + final $i = _$jni.MethodInvocation.fromMessage($m); final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); }); - return $x; + implementer.add( + r'com.example.ok_http.RedirectReceivedCallback', + $p, + _$invokePointer, + [ + if ($impl.onRedirectReceived$async) + r'onRedirectReceived(Lokhttp3/Response;Ljava/lang/String;)V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory RedirectReceivedCallback.implement( + $RedirectReceivedCallback $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return RedirectReceivedCallback.fromReference( + $i.implementReference(), + ); } } -abstract interface class $RedirectReceivedCallbackImpl { - factory $RedirectReceivedCallbackImpl({ - required void Function(Response response, jni.JString string) +abstract base mixin class $RedirectReceivedCallback { + factory $RedirectReceivedCallback({ + required void Function(Response response, _$jni.JString string) onRedirectReceived, - }) = _$RedirectReceivedCallbackImpl; + bool onRedirectReceived$async, + }) = _$RedirectReceivedCallback; - void onRedirectReceived(Response response, jni.JString string); + void onRedirectReceived(Response response, _$jni.JString string); + bool get onRedirectReceived$async => false; } -class _$RedirectReceivedCallbackImpl implements $RedirectReceivedCallbackImpl { - _$RedirectReceivedCallbackImpl({ - required void Function(Response response, jni.JString string) +final class _$RedirectReceivedCallback with $RedirectReceivedCallback { + _$RedirectReceivedCallback({ + required void Function(Response response, _$jni.JString string) onRedirectReceived, + this.onRedirectReceived$async = false, }) : _onRedirectReceived = onRedirectReceived; - final void Function(Response response, jni.JString string) + final void Function(Response response, _$jni.JString string) _onRedirectReceived; + final bool onRedirectReceived$async; - void onRedirectReceived(Response response, jni.JString string) { + void onRedirectReceived(Response response, _$jni.JString string) { return _onRedirectReceived(response, string); } } -final class $RedirectReceivedCallbackType - extends jni.JObjType { - const $RedirectReceivedCallbackType(); +final class $RedirectReceivedCallback$Type + extends _$jni.JObjType { + @_$jni.internal + const $RedirectReceivedCallback$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lcom/example/ok_http/RedirectReceivedCallback;'; - @override - RedirectReceivedCallback fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + RedirectReceivedCallback fromReference(_$jni.JReference reference) => RedirectReceivedCallback.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($RedirectReceivedCallbackType).hashCode; + @_$core.override + int get hashCode => ($RedirectReceivedCallback$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($RedirectReceivedCallbackType) && - other is $RedirectReceivedCallbackType; + return other.runtimeType == ($RedirectReceivedCallback$Type) && + other is $RedirectReceivedCallback$Type; } } -/// from: com.example.ok_http.RedirectInterceptor$Companion -class RedirectInterceptor_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `com.example.ok_http.RedirectInterceptor$Companion` +class RedirectInterceptor_Companion extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal RedirectInterceptor_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = - jni.JClass.forName(r'com/example/ok_http/RedirectInterceptor$Companion'); + static final _class = _$jni.JClass.forName( + r'com/example/ok_http/RedirectInterceptor$Companion'); /// The type which includes information such as the signature of this class. - static const type = $RedirectInterceptor_CompanionType(); + static const type = $RedirectInterceptor_Companion$Type(); static final _id_addRedirectInterceptor = _class.instanceMethodId( r'addRedirectInterceptor', r'(Lokhttp3/OkHttpClient$Builder;IZLcom/example/ok_http/RedirectReceivedCallback;)Lokhttp3/OkHttpClient$Builder;', ); - static final _addRedirectInterceptor = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _addRedirectInterceptor = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - $Int32, - $Int32, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, int, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + int, + int, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder addRedirectInterceptor(okhttp3.OkHttpClient$Builder builder, int i, boolean z, com.example.ok_http.RedirectReceivedCallback redirectReceivedCallback) + /// from: `public final okhttp3.OkHttpClient$Builder addRedirectInterceptor(okhttp3.OkHttpClient$Builder builder, int i, boolean z, com.example.ok_http.RedirectReceivedCallback redirectReceivedCallback)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder addRedirectInterceptor( OkHttpClient_Builder builder, @@ -9965,180 +10918,197 @@ class RedirectInterceptor_Companion extends jni.JObject { ) { return _addRedirectInterceptor( reference.pointer, - _id_addRedirectInterceptor as jni.JMethodIDPtr, + _id_addRedirectInterceptor as _$jni.JMethodIDPtr, builder.reference.pointer, i, z ? 1 : 0, redirectReceivedCallback.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + .object(const $OkHttpClient_Builder$Type()); } - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` /// The returned object must be released after use, by calling the [release] method. factory RedirectInterceptor_Companion( - jni.JObject defaultConstructorMarker, + _$jni.JObject defaultConstructorMarker, ) { - return RedirectInterceptor_Companion.fromReference(_new0( + return RedirectInterceptor_Companion.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, defaultConstructorMarker.reference.pointer) .reference); } } -final class $RedirectInterceptor_CompanionType - extends jni.JObjType { - const $RedirectInterceptor_CompanionType(); +final class $RedirectInterceptor_Companion$Type + extends _$jni.JObjType { + @_$jni.internal + const $RedirectInterceptor_Companion$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lcom/example/ok_http/RedirectInterceptor$Companion;'; - @override - RedirectInterceptor_Companion fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + RedirectInterceptor_Companion fromReference(_$jni.JReference reference) => RedirectInterceptor_Companion.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($RedirectInterceptor_CompanionType).hashCode; + @_$core.override + int get hashCode => ($RedirectInterceptor_Companion$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($RedirectInterceptor_CompanionType) && - other is $RedirectInterceptor_CompanionType; + return other.runtimeType == ($RedirectInterceptor_Companion$Type) && + other is $RedirectInterceptor_Companion$Type; } } -/// from: com.example.ok_http.RedirectInterceptor -class RedirectInterceptor extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `com.example.ok_http.RedirectInterceptor` +class RedirectInterceptor extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal RedirectInterceptor.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'com/example/ok_http/RedirectInterceptor'); + _$jni.JClass.forName(r'com/example/ok_http/RedirectInterceptor'); /// The type which includes information such as the signature of this class. - static const type = $RedirectInterceptorType(); + static const type = $RedirectInterceptor$Type(); static final _id_Companion = _class.staticFieldId( r'Companion', r'Lcom/example/ok_http/RedirectInterceptor$Companion;', ); - /// from: static public final com.example.ok_http.RedirectInterceptor$Companion Companion + /// from: `static public final com.example.ok_http.RedirectInterceptor$Companion Companion` /// The returned object must be released after use, by calling the [release] method. static RedirectInterceptor_Companion get Companion => - _id_Companion.get(_class, const $RedirectInterceptor_CompanionType()); + _id_Companion.get(_class, const $RedirectInterceptor_Companion$Type()); - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'()V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void () + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. factory RedirectInterceptor() { return RedirectInterceptor.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) .reference); } } -final class $RedirectInterceptorType extends jni.JObjType { - const $RedirectInterceptorType(); +final class $RedirectInterceptor$Type + extends _$jni.JObjType { + @_$jni.internal + const $RedirectInterceptor$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lcom/example/ok_http/RedirectInterceptor;'; - @override - RedirectInterceptor fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + RedirectInterceptor fromReference(_$jni.JReference reference) => RedirectInterceptor.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($RedirectInterceptorType).hashCode; + @_$core.override + int get hashCode => ($RedirectInterceptor$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($RedirectInterceptorType) && - other is $RedirectInterceptorType; + return other.runtimeType == ($RedirectInterceptor$Type) && + other is $RedirectInterceptor$Type; } } -/// from: com.example.ok_http.AsyncInputStreamReader -class AsyncInputStreamReader extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `com.example.ok_http.AsyncInputStreamReader` +class AsyncInputStreamReader extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal AsyncInputStreamReader.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'com/example/ok_http/AsyncInputStreamReader'); + _$jni.JClass.forName(r'com/example/ok_http/AsyncInputStreamReader'); /// The type which includes information such as the signature of this class. - static const type = $AsyncInputStreamReaderType(); - static final _id_new0 = _class.constructorId( + static const type = $AsyncInputStreamReader$Type(); + static final _id_new$ = _class.constructorId( r'()V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void () + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. factory AsyncInputStreamReader() { return AsyncInputStreamReader.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) .reference); } @@ -10147,29 +11117,32 @@ class AsyncInputStreamReader extends jni.JObject { r'(Ljava/io/InputStream;Lcom/example/ok_http/DataCallback;)Ljava/util/concurrent/Future;', ); - static final _readAsync = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _readAsync = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final java.util.concurrent.Future readAsync(java.io.InputStream inputStream, com.example.ok_http.DataCallback dataCallback) + /// from: `public final java.util.concurrent.Future readAsync(java.io.InputStream inputStream, com.example.ok_http.DataCallback dataCallback)` /// The returned object must be released after use, by calling the [release] method. - jni.JObject readAsync( - jni.JObject inputStream, + _$jni.JObject readAsync( + _$jni.JObject inputStream, DataCallback dataCallback, ) { - return _readAsync(reference.pointer, _id_readAsync as jni.JMethodIDPtr, + return _readAsync(reference.pointer, _id_readAsync as _$jni.JMethodIDPtr, inputStream.reference.pointer, dataCallback.reference.pointer) - .object(const jni.JObjectType()); + .object(const _$jni.JObjectType()); } static final _id_shutdown = _class.instanceMethodId( @@ -10177,85 +11150,94 @@ class AsyncInputStreamReader extends jni.JObject { r'()V', ); - static final _shutdown = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _shutdown = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final void shutdown() + /// from: `public final void shutdown()` void shutdown() { - _shutdown(reference.pointer, _id_shutdown as jni.JMethodIDPtr).check(); + _shutdown(reference.pointer, _id_shutdown as _$jni.JMethodIDPtr).check(); } } -final class $AsyncInputStreamReaderType - extends jni.JObjType { - const $AsyncInputStreamReaderType(); +final class $AsyncInputStreamReader$Type + extends _$jni.JObjType { + @_$jni.internal + const $AsyncInputStreamReader$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lcom/example/ok_http/AsyncInputStreamReader;'; - @override - AsyncInputStreamReader fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + AsyncInputStreamReader fromReference(_$jni.JReference reference) => AsyncInputStreamReader.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($AsyncInputStreamReaderType).hashCode; + @_$core.override + int get hashCode => ($AsyncInputStreamReader$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($AsyncInputStreamReaderType) && - other is $AsyncInputStreamReaderType; + return other.runtimeType == ($AsyncInputStreamReader$Type) && + other is $AsyncInputStreamReader$Type; } } -/// from: com.example.ok_http.DataCallback -class DataCallback extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `com.example.ok_http.DataCallback` +class DataCallback extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal DataCallback.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'com/example/ok_http/DataCallback'); + static final _class = + _$jni.JClass.forName(r'com/example/ok_http/DataCallback'); /// The type which includes information such as the signature of this class. - static const type = $DataCallbackType(); + static const type = $DataCallback$Type(); static final _id_onDataRead = _class.instanceMethodId( r'onDataRead', r'([B)V', ); - static final _onDataRead = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _onDataRead = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onDataRead(byte[] bs) + /// from: `public abstract void onDataRead(byte[] bs)` void onDataRead( - jni.JArray bs, + _$jni.JArray<_$jni.jbyte> bs, ) { - _onDataRead(reference.pointer, _id_onDataRead as jni.JMethodIDPtr, + _onDataRead(reference.pointer, _id_onDataRead as _$jni.JMethodIDPtr, bs.reference.pointer) .check(); } @@ -10265,21 +11247,22 @@ class DataCallback extends jni.JObject { r'()V', ); - static final _onFinished = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _onFinished = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract void onFinished() + /// from: `public abstract void onFinished()` void onFinished() { - _onFinished(reference.pointer, _id_onFinished as jni.JMethodIDPtr).check(); + _onFinished(reference.pointer, _id_onFinished as _$jni.JMethodIDPtr) + .check(); } static final _id_onError = _class.instanceMethodId( @@ -10287,38 +11270,36 @@ class DataCallback extends jni.JObject { r'(Ljava/io/IOException;)V', ); - static final _onError = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _onError = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onError(java.io.IOException iOException) + /// from: `public abstract void onError(java.io.IOException iOException)` void onError( - jni.JObject iOException, + _$jni.JObject iOException, ) { - _onError(reference.pointer, _id_onError as jni.JMethodIDPtr, + _onError(reference.pointer, _id_onError as _$jni.JMethodIDPtr, iOException.reference.pointer) .check(); } /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( + static final _$core.Map _$impls = {}; + static _$jni.JObjectPtr _$invoke( int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, ) { return _$invokeMethod( port, - $MethodInvocation.fromAddresses( + _$jni.MethodInvocation.fromAddresses( 0, descriptor.address, args.address, @@ -10326,95 +11307,120 @@ class DataCallback extends jni.JObject { ); } - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); - static ffi.Pointer _$invokeMethod( + static _$jni.Pointer<_$jni.Void> _$invokeMethod( int $p, - $MethodInvocation $i, + _$jni.MethodInvocation $i, ) { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; if ($d == r'onDataRead([B)V') { _$impls[$p]!.onDataRead( - $a[0].castTo(const jni.JArrayType(jni.jbyteType()), + $a[0].as(const _$jni.JArrayType(_$jni.jbyteType()), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'onFinished()V') { _$impls[$p]!.onFinished(); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'onError(Ljava/io/IOException;)V') { _$impls[$p]!.onError( - $a[0].castTo(const jni.JObjectType(), releaseOriginal: true), + $a[0].as(const _$jni.JObjectType(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e); + return _$jni.ProtectedJniExtensions.newDartException(e); } - return jni.nullptr; + return _$jni.nullptr; } - factory DataCallback.implement( - $DataCallbackImpl $impl, - ) { - final $p = ReceivePort(); - final $x = DataCallback.fromReference( - ProtectedJniExtensions.newPortProxy( - r'com.example.ok_http.DataCallback', - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { + static void implementIn( + _$jni.JImplementer implementer, + $DataCallback $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { if ($m == null) { _$impls.remove($p.sendPort.nativePort); $p.close(); return; } - final $i = $MethodInvocation.fromMessage($m as List); + final $i = _$jni.MethodInvocation.fromMessage($m); final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); }); - return $x; + implementer.add( + r'com.example.ok_http.DataCallback', + $p, + _$invokePointer, + [ + if ($impl.onDataRead$async) r'onDataRead([B)V', + if ($impl.onFinished$async) r'onFinished()V', + if ($impl.onError$async) r'onError(Ljava/io/IOException;)V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory DataCallback.implement( + $DataCallback $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return DataCallback.fromReference( + $i.implementReference(), + ); } } -abstract interface class $DataCallbackImpl { - factory $DataCallbackImpl({ - required void Function(jni.JArray bs) onDataRead, +abstract base mixin class $DataCallback { + factory $DataCallback({ + required void Function(_$jni.JArray<_$jni.jbyte> bs) onDataRead, + bool onDataRead$async, required void Function() onFinished, - required void Function(jni.JObject iOException) onError, - }) = _$DataCallbackImpl; + bool onFinished$async, + required void Function(_$jni.JObject iOException) onError, + bool onError$async, + }) = _$DataCallback; - void onDataRead(jni.JArray bs); + void onDataRead(_$jni.JArray<_$jni.jbyte> bs); + bool get onDataRead$async => false; void onFinished(); - void onError(jni.JObject iOException); + bool get onFinished$async => false; + void onError(_$jni.JObject iOException); + bool get onError$async => false; } -class _$DataCallbackImpl implements $DataCallbackImpl { - _$DataCallbackImpl({ - required void Function(jni.JArray bs) onDataRead, +final class _$DataCallback with $DataCallback { + _$DataCallback({ + required void Function(_$jni.JArray<_$jni.jbyte> bs) onDataRead, + this.onDataRead$async = false, required void Function() onFinished, - required void Function(jni.JObject iOException) onError, + this.onFinished$async = false, + required void Function(_$jni.JObject iOException) onError, + this.onError$async = false, }) : _onDataRead = onDataRead, _onFinished = onFinished, _onError = onError; - final void Function(jni.JArray bs) _onDataRead; + final void Function(_$jni.JArray<_$jni.jbyte> bs) _onDataRead; + final bool onDataRead$async; final void Function() _onFinished; - final void Function(jni.JObject iOException) _onError; + final bool onFinished$async; + final void Function(_$jni.JObject iOException) _onError; + final bool onError$async; - void onDataRead(jni.JArray bs) { + void onDataRead(_$jni.JArray<_$jni.jbyte> bs) { return _onDataRead(bs); } @@ -10422,95 +11428,104 @@ class _$DataCallbackImpl implements $DataCallbackImpl { return _onFinished(); } - void onError(jni.JObject iOException) { + void onError(_$jni.JObject iOException) { return _onError(iOException); } } -final class $DataCallbackType extends jni.JObjType { - const $DataCallbackType(); +final class $DataCallback$Type extends _$jni.JObjType { + @_$jni.internal + const $DataCallback$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lcom/example/ok_http/DataCallback;'; - @override - DataCallback fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + DataCallback fromReference(_$jni.JReference reference) => DataCallback.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($DataCallbackType).hashCode; + @_$core.override + int get hashCode => ($DataCallback$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($DataCallbackType) && - other is $DataCallbackType; + return other.runtimeType == ($DataCallback$Type) && + other is $DataCallback$Type; } } -/// from: okhttp3.WebSocket$Factory -class WebSocket_Factory extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.WebSocket$Factory` +class WebSocket_Factory extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal WebSocket_Factory.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/WebSocket$Factory'); + static final _class = _$jni.JClass.forName(r'okhttp3/WebSocket$Factory'); /// The type which includes information such as the signature of this class. - static const type = $WebSocket_FactoryType(); + static const type = $WebSocket_Factory$Type(); static final _id_newWebSocket = _class.instanceMethodId( r'newWebSocket', r'(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;', ); - static final _newWebSocket = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _newWebSocket = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract okhttp3.WebSocket newWebSocket(okhttp3.Request request, okhttp3.WebSocketListener webSocketListener) + /// from: `public abstract okhttp3.WebSocket newWebSocket(okhttp3.Request request, okhttp3.WebSocketListener webSocketListener)` /// The returned object must be released after use, by calling the [release] method. WebSocket newWebSocket( Request request, - jni.JObject webSocketListener, + _$jni.JObject webSocketListener, ) { return _newWebSocket( reference.pointer, - _id_newWebSocket as jni.JMethodIDPtr, + _id_newWebSocket as _$jni.JMethodIDPtr, request.reference.pointer, webSocketListener.reference.pointer) - .object(const $WebSocketType()); + .object(const $WebSocket$Type()); } /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( + static final _$core.Map _$impls = {}; + static _$jni.JObjectPtr _$invoke( int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, ) { return _$invokeMethod( port, - $MethodInvocation.fromAddresses( + _$jni.MethodInvocation.fromAddresses( 0, descriptor.address, args.address, @@ -10518,15 +11533,15 @@ class WebSocket_Factory extends jni.JObject { ); } - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); - static ffi.Pointer _$invokeMethod( + static _$jni.Pointer<_$jni.Void> _$invokeMethod( int $p, - $MethodInvocation $i, + _$jni.MethodInvocation $i, ) { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); @@ -10534,131 +11549,150 @@ class WebSocket_Factory extends jni.JObject { if ($d == r'newWebSocket(Lokhttp3/Request;Lokhttp3/WebSocketListener;)Lokhttp3/WebSocket;') { final $r = _$impls[$p]!.newWebSocket( - $a[0].castTo(const $RequestType(), releaseOriginal: true), - $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), + $a[0].as(const $Request$Type(), releaseOriginal: true), + $a[1].as(const _$jni.JObjectType(), releaseOriginal: true), ); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) .reference .toPointer(); } } catch (e) { - return ProtectedJniExtensions.newDartException(e); + return _$jni.ProtectedJniExtensions.newDartException(e); } - return jni.nullptr; + return _$jni.nullptr; } - factory WebSocket_Factory.implement( - $WebSocket_FactoryImpl $impl, - ) { - final $p = ReceivePort(); - final $x = WebSocket_Factory.fromReference( - ProtectedJniExtensions.newPortProxy( - r'okhttp3.WebSocket$Factory', - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { + static void implementIn( + _$jni.JImplementer implementer, + $WebSocket_Factory $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { if ($m == null) { _$impls.remove($p.sendPort.nativePort); $p.close(); return; } - final $i = $MethodInvocation.fromMessage($m as List); + final $i = _$jni.MethodInvocation.fromMessage($m); final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); }); - return $x; + implementer.add( + r'okhttp3.WebSocket$Factory', + $p, + _$invokePointer, + [], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory WebSocket_Factory.implement( + $WebSocket_Factory $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return WebSocket_Factory.fromReference( + $i.implementReference(), + ); } } -abstract interface class $WebSocket_FactoryImpl { - factory $WebSocket_FactoryImpl({ - required WebSocket Function(Request request, jni.JObject webSocketListener) +abstract base mixin class $WebSocket_Factory { + factory $WebSocket_Factory({ + required WebSocket Function( + Request request, _$jni.JObject webSocketListener) newWebSocket, - }) = _$WebSocket_FactoryImpl; + }) = _$WebSocket_Factory; - WebSocket newWebSocket(Request request, jni.JObject webSocketListener); + WebSocket newWebSocket(Request request, _$jni.JObject webSocketListener); } -class _$WebSocket_FactoryImpl implements $WebSocket_FactoryImpl { - _$WebSocket_FactoryImpl({ - required WebSocket Function(Request request, jni.JObject webSocketListener) +final class _$WebSocket_Factory with $WebSocket_Factory { + _$WebSocket_Factory({ + required WebSocket Function( + Request request, _$jni.JObject webSocketListener) newWebSocket, }) : _newWebSocket = newWebSocket; - final WebSocket Function(Request request, jni.JObject webSocketListener) + final WebSocket Function(Request request, _$jni.JObject webSocketListener) _newWebSocket; - WebSocket newWebSocket(Request request, jni.JObject webSocketListener) { + WebSocket newWebSocket(Request request, _$jni.JObject webSocketListener) { return _newWebSocket(request, webSocketListener); } } -final class $WebSocket_FactoryType extends jni.JObjType { - const $WebSocket_FactoryType(); +final class $WebSocket_Factory$Type extends _$jni.JObjType { + @_$jni.internal + const $WebSocket_Factory$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/WebSocket$Factory;'; - @override - WebSocket_Factory fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + WebSocket_Factory fromReference(_$jni.JReference reference) => WebSocket_Factory.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($WebSocket_FactoryType).hashCode; + @_$core.override + int get hashCode => ($WebSocket_Factory$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($WebSocket_FactoryType) && - other is $WebSocket_FactoryType; + return other.runtimeType == ($WebSocket_Factory$Type) && + other is $WebSocket_Factory$Type; } } -/// from: okhttp3.WebSocket -class WebSocket extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okhttp3.WebSocket` +class WebSocket extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal WebSocket.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okhttp3/WebSocket'); + static final _class = _$jni.JClass.forName(r'okhttp3/WebSocket'); /// The type which includes information such as the signature of this class. - static const type = $WebSocketType(); + static const type = $WebSocket$Type(); static final _id_request = _class.instanceMethodId( r'request', r'()Lokhttp3/Request;', ); - static final _request = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _request = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract okhttp3.Request request() + /// from: `public abstract okhttp3.Request request()` /// The returned object must be released after use, by calling the [release] method. Request request() { - return _request(reference.pointer, _id_request as jni.JMethodIDPtr) - .object(const $RequestType()); + return _request(reference.pointer, _id_request as _$jni.JMethodIDPtr) + .object(const $Request$Type()); } static final _id_queueSize = _class.instanceMethodId( @@ -10666,21 +11700,21 @@ class WebSocket extends jni.JObject { r'()J', ); - static final _queueSize = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _queueSize = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract long queueSize() + /// from: `public abstract long queueSize()` int queueSize() { - return _queueSize(reference.pointer, _id_queueSize as jni.JMethodIDPtr) + return _queueSize(reference.pointer, _id_queueSize as _$jni.JMethodIDPtr) .long; } @@ -10689,47 +11723,47 @@ class WebSocket extends jni.JObject { r'(Ljava/lang/String;)Z', ); - static final _send = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _send = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract boolean send(java.lang.String string) + /// from: `public abstract boolean send(java.lang.String string)` bool send( - jni.JString string, + _$jni.JString string, ) { - return _send(reference.pointer, _id_send as jni.JMethodIDPtr, + return _send(reference.pointer, _id_send as _$jni.JMethodIDPtr, string.reference.pointer) .boolean; } - static final _id_send1 = _class.instanceMethodId( + static final _id_send$1 = _class.instanceMethodId( r'send', r'(Lokio/ByteString;)Z', ); - static final _send1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _send$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract boolean send(okio.ByteString byteString) - bool send1( + /// from: `public abstract boolean send(okio.ByteString byteString)` + bool send$1( ByteString byteString, ) { - return _send1(reference.pointer, _id_send1 as jni.JMethodIDPtr, + return _send$1(reference.pointer, _id_send$1 as _$jni.JMethodIDPtr, byteString.reference.pointer) .boolean; } @@ -10739,23 +11773,24 @@ class WebSocket extends jni.JObject { r'(ILjava/lang/String;)Z', ); - static final _close = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<($Int32, ffi.Pointer)>)>>( + static final _close = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Int32, _$jni.Pointer<_$jni.Void>)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract boolean close(int i, java.lang.String string) + /// from: `public abstract boolean close(int i, java.lang.String string)` bool close( int i, - jni.JString string, + _$jni.JString string, ) { - return _close(reference.pointer, _id_close as jni.JMethodIDPtr, i, + return _close(reference.pointer, _id_close as _$jni.JMethodIDPtr, i, string.reference.pointer) .boolean; } @@ -10765,35 +11800,33 @@ class WebSocket extends jni.JObject { r'()V', ); - static final _cancel = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _cancel = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public abstract void cancel() + /// from: `public abstract void cancel()` void cancel() { - _cancel(reference.pointer, _id_cancel as jni.JMethodIDPtr).check(); + _cancel(reference.pointer, _id_cancel as _$jni.JMethodIDPtr).check(); } /// Maps a specific port to the implemented interface. - static final Map _$impls = {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( + static final _$core.Map _$impls = {}; + static _$jni.JObjectPtr _$invoke( int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, ) { return _$invokeMethod( port, - $MethodInvocation.fromAddresses( + _$jni.MethodInvocation.fromAddresses( 0, descriptor.address, args.address, @@ -10801,127 +11834,142 @@ class WebSocket extends jni.JObject { ); } - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); - static ffi.Pointer _$invokeMethod( + static _$jni.Pointer<_$jni.Void> _$invokeMethod( int $p, - $MethodInvocation $i, + _$jni.MethodInvocation $i, ) { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; if ($d == r'request()Lokhttp3/Request;') { final $r = _$impls[$p]!.request(); - return ($r as jni.JObject) - .castTo(const jni.JObjectType()) + return ($r as _$jni.JObject) + .as(const _$jni.JObjectType()) .reference .toPointer(); } if ($d == r'queueSize()J') { final $r = _$impls[$p]!.queueSize(); - return jni.JLong($r).reference.toPointer(); + return _$jni.JLong($r).reference.toPointer(); } if ($d == r'send(Ljava/lang/String;)Z') { final $r = _$impls[$p]!.send( - $a[0].castTo(const jni.JStringType(), releaseOriginal: true), + $a[0].as(const _$jni.JStringType(), releaseOriginal: true), ); - return jni.JBoolean($r).reference.toPointer(); + return _$jni.JBoolean($r).reference.toPointer(); } if ($d == r'send(Lokio/ByteString;)Z') { - final $r = _$impls[$p]!.send1( - $a[0].castTo(const $ByteStringType(), releaseOriginal: true), + final $r = _$impls[$p]!.send$1( + $a[0].as(const $ByteString$Type(), releaseOriginal: true), ); - return jni.JBoolean($r).reference.toPointer(); + return _$jni.JBoolean($r).reference.toPointer(); } if ($d == r'close(ILjava/lang/String;)Z') { final $r = _$impls[$p]!.close( $a[0] - .castTo(const jni.JIntegerType(), releaseOriginal: true) + .as(const _$jni.JIntegerType(), releaseOriginal: true) .intValue(releaseOriginal: true), - $a[1].castTo(const jni.JStringType(), releaseOriginal: true), + $a[1].as(const _$jni.JStringType(), releaseOriginal: true), ); - return jni.JBoolean($r).reference.toPointer(); + return _$jni.JBoolean($r).reference.toPointer(); } if ($d == r'cancel()V') { _$impls[$p]!.cancel(); - return jni.nullptr; + return _$jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e); + return _$jni.ProtectedJniExtensions.newDartException(e); } - return jni.nullptr; + return _$jni.nullptr; } - factory WebSocket.implement( - $WebSocketImpl $impl, - ) { - final $p = ReceivePort(); - final $x = WebSocket.fromReference( - ProtectedJniExtensions.newPortProxy( - r'okhttp3.WebSocket', - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { + static void implementIn( + _$jni.JImplementer implementer, + $WebSocket $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { if ($m == null) { _$impls.remove($p.sendPort.nativePort); $p.close(); return; } - final $i = $MethodInvocation.fromMessage($m as List); + final $i = _$jni.MethodInvocation.fromMessage($m); final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); }); - return $x; + implementer.add( + r'okhttp3.WebSocket', + $p, + _$invokePointer, + [ + if ($impl.cancel$async) r'cancel()V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory WebSocket.implement( + $WebSocket $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return WebSocket.fromReference( + $i.implementReference(), + ); } } -abstract interface class $WebSocketImpl { - factory $WebSocketImpl({ +abstract base mixin class $WebSocket { + factory $WebSocket({ required Request Function() request, required int Function() queueSize, - required bool Function(jni.JString string) send, - required bool Function(ByteString byteString) send1, - required bool Function(int i, jni.JString string) close, + required bool Function(_$jni.JString string) send, + required bool Function(ByteString byteString) send$1, + required bool Function(int i, _$jni.JString string) close, required void Function() cancel, - }) = _$WebSocketImpl; + bool cancel$async, + }) = _$WebSocket; Request request(); int queueSize(); - bool send(jni.JString string); - bool send1(ByteString byteString); - bool close(int i, jni.JString string); + bool send(_$jni.JString string); + bool send$1(ByteString byteString); + bool close(int i, _$jni.JString string); void cancel(); + bool get cancel$async => false; } -class _$WebSocketImpl implements $WebSocketImpl { - _$WebSocketImpl({ +final class _$WebSocket with $WebSocket { + _$WebSocket({ required Request Function() request, required int Function() queueSize, - required bool Function(jni.JString string) send, - required bool Function(ByteString byteString) send1, - required bool Function(int i, jni.JString string) close, + required bool Function(_$jni.JString string) send, + required bool Function(ByteString byteString) send$1, + required bool Function(int i, _$jni.JString string) close, required void Function() cancel, + this.cancel$async = false, }) : _request = request, _queueSize = queueSize, _send = send, - _send1 = send1, + _send$1 = send$1, _close = close, _cancel = cancel; final Request Function() _request; final int Function() _queueSize; - final bool Function(jni.JString string) _send; - final bool Function(ByteString byteString) _send1; - final bool Function(int i, jni.JString string) _close; + final bool Function(_$jni.JString string) _send; + final bool Function(ByteString byteString) _send$1; + final bool Function(int i, _$jni.JString string) _close; final void Function() _cancel; + final bool cancel$async; Request request() { return _request(); @@ -10931,15 +11979,15 @@ class _$WebSocketImpl implements $WebSocketImpl { return _queueSize(); } - bool send(jni.JString string) { + bool send(_$jni.JString string) { return _send(string); } - bool send1(ByteString byteString) { - return _send1(byteString); + bool send$1(ByteString byteString) { + return _send$1(byteString); } - bool close(int i, jni.JString string) { + bool close(int i, _$jni.JString string) { return _close(i, string); } @@ -10948,71 +11996,81 @@ class _$WebSocketImpl implements $WebSocketImpl { } } -final class $WebSocketType extends jni.JObjType { - const $WebSocketType(); +final class $WebSocket$Type extends _$jni.JObjType { + @_$jni.internal + const $WebSocket$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokhttp3/WebSocket;'; - @override - WebSocket fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + WebSocket fromReference(_$jni.JReference reference) => WebSocket.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($WebSocketType).hashCode; + @_$core.override + int get hashCode => ($WebSocket$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($WebSocketType) && other is $WebSocketType; + return other.runtimeType == ($WebSocket$Type) && other is $WebSocket$Type; } } -/// from: com.example.ok_http.WebSocketListenerProxy$WebSocketListener -class WebSocketListenerProxy_WebSocketListener extends jni.JObject { - @override - late final jni.JObjType $type = - type; +/// from: `com.example.ok_http.WebSocketListenerProxy$WebSocketListener` +class WebSocketListenerProxy_WebSocketListener extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal WebSocketListenerProxy_WebSocketListener.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName( + static final _class = _$jni.JClass.forName( r'com/example/ok_http/WebSocketListenerProxy$WebSocketListener'); /// The type which includes information such as the signature of this class. - static const type = $WebSocketListenerProxy_WebSocketListenerType(); + static const type = $WebSocketListenerProxy_WebSocketListener$Type(); static final _id_onOpen = _class.instanceMethodId( r'onOpen', r'(Lokhttp3/WebSocket;Lokhttp3/Response;)V', ); - static final _onOpen = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onOpen = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response) + /// from: `public abstract void onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response)` void onOpen( WebSocket webSocket, Response response, ) { - _onOpen(reference.pointer, _id_onOpen as jni.JMethodIDPtr, + _onOpen(reference.pointer, _id_onOpen as _$jni.JMethodIDPtr, webSocket.reference.pointer, response.reference.pointer) .check(); } @@ -11022,55 +12080,61 @@ class WebSocketListenerProxy_WebSocketListener extends jni.JObject { r'(Lokhttp3/WebSocket;Ljava/lang/String;)V', ); - static final _onMessage = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onMessage = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onMessage(okhttp3.WebSocket webSocket, java.lang.String string) + /// from: `public abstract void onMessage(okhttp3.WebSocket webSocket, java.lang.String string)` void onMessage( WebSocket webSocket, - jni.JString string, + _$jni.JString string, ) { - _onMessage(reference.pointer, _id_onMessage as jni.JMethodIDPtr, + _onMessage(reference.pointer, _id_onMessage as _$jni.JMethodIDPtr, webSocket.reference.pointer, string.reference.pointer) .check(); } - static final _id_onMessage1 = _class.instanceMethodId( + static final _id_onMessage$1 = _class.instanceMethodId( r'onMessage', r'(Lokhttp3/WebSocket;Lokio/ByteString;)V', ); - static final _onMessage1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onMessage$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onMessage(okhttp3.WebSocket webSocket, okio.ByteString byteString) - void onMessage1( + /// from: `public abstract void onMessage(okhttp3.WebSocket webSocket, okio.ByteString byteString)` + void onMessage$1( WebSocket webSocket, ByteString byteString, ) { - _onMessage1(reference.pointer, _id_onMessage1 as jni.JMethodIDPtr, + _onMessage$1(reference.pointer, _id_onMessage$1 as _$jni.JMethodIDPtr, webSocket.reference.pointer, byteString.reference.pointer) .check(); } @@ -11080,28 +12144,32 @@ class WebSocketListenerProxy_WebSocketListener extends jni.JObject { r'(Lokhttp3/WebSocket;ILjava/lang/String;)V', ); - static final _onClosing = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onClosing = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - $Int32, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + int, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onClosing(okhttp3.WebSocket webSocket, int i, java.lang.String string) + /// from: `public abstract void onClosing(okhttp3.WebSocket webSocket, int i, java.lang.String string)` void onClosing( WebSocket webSocket, int i, - jni.JString string, + _$jni.JString string, ) { - _onClosing(reference.pointer, _id_onClosing as jni.JMethodIDPtr, + _onClosing(reference.pointer, _id_onClosing as _$jni.JMethodIDPtr, webSocket.reference.pointer, i, string.reference.pointer) .check(); } @@ -11111,34 +12179,34 @@ class WebSocketListenerProxy_WebSocketListener extends jni.JObject { r'(Lokhttp3/WebSocket;Ljava/lang/Throwable;Lokhttp3/Response;)V', ); - static final _onFailure = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onFailure = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public abstract void onFailure(okhttp3.WebSocket webSocket, java.lang.Throwable throwable, okhttp3.Response response) + /// from: `public abstract void onFailure(okhttp3.WebSocket webSocket, java.lang.Throwable throwable, okhttp3.Response response)` void onFailure( WebSocket webSocket, - jni.JObject throwable, + _$jni.JObject throwable, Response response, ) { _onFailure( reference.pointer, - _id_onFailure as jni.JMethodIDPtr, + _id_onFailure as _$jni.JMethodIDPtr, webSocket.reference.pointer, throwable.reference.pointer, response.reference.pointer) @@ -11146,18 +12214,16 @@ class WebSocketListenerProxy_WebSocketListener extends jni.JObject { } /// Maps a specific port to the implemented interface. - static final Map _$impls = - {}; - ReceivePort? _$p; - - static jni.JObjectPtr _$invoke( + static final _$core.Map + _$impls = {}; + static _$jni.JObjectPtr _$invoke( int port, - jni.JObjectPtr descriptor, - jni.JObjectPtr args, + _$jni.JObjectPtr descriptor, + _$jni.JObjectPtr args, ) { return _$invokeMethod( port, - $MethodInvocation.fromAddresses( + _$jni.MethodInvocation.fromAddresses( 0, descriptor.address, args.address, @@ -11165,226 +12231,276 @@ class WebSocketListenerProxy_WebSocketListener extends jni.JObject { ); } - static final ffi.Pointer< - ffi.NativeFunction< - jni.JObjectPtr Function( - ffi.Uint64, jni.JObjectPtr, jni.JObjectPtr)>> - _$invokePointer = ffi.Pointer.fromFunction(_$invoke); + static final _$jni.Pointer< + _$jni.NativeFunction< + _$jni.JObjectPtr Function( + _$jni.Int64, _$jni.JObjectPtr, _$jni.JObjectPtr)>> + _$invokePointer = _$jni.Pointer.fromFunction(_$invoke); - static ffi.Pointer _$invokeMethod( + static _$jni.Pointer<_$jni.Void> _$invokeMethod( int $p, - $MethodInvocation $i, + _$jni.MethodInvocation $i, ) { try { final $d = $i.methodDescriptor.toDartString(releaseOriginal: true); final $a = $i.args; if ($d == r'onOpen(Lokhttp3/WebSocket;Lokhttp3/Response;)V') { _$impls[$p]!.onOpen( - $a[0].castTo(const $WebSocketType(), releaseOriginal: true), - $a[1].castTo(const $ResponseType(), releaseOriginal: true), + $a[0].as(const $WebSocket$Type(), releaseOriginal: true), + $a[1].as(const $Response$Type(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'onMessage(Lokhttp3/WebSocket;Ljava/lang/String;)V') { _$impls[$p]!.onMessage( - $a[0].castTo(const $WebSocketType(), releaseOriginal: true), - $a[1].castTo(const jni.JStringType(), releaseOriginal: true), + $a[0].as(const $WebSocket$Type(), releaseOriginal: true), + $a[1].as(const _$jni.JStringType(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'onMessage(Lokhttp3/WebSocket;Lokio/ByteString;)V') { - _$impls[$p]!.onMessage1( - $a[0].castTo(const $WebSocketType(), releaseOriginal: true), - $a[1].castTo(const $ByteStringType(), releaseOriginal: true), + _$impls[$p]!.onMessage$1( + $a[0].as(const $WebSocket$Type(), releaseOriginal: true), + $a[1].as(const $ByteString$Type(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'onClosing(Lokhttp3/WebSocket;ILjava/lang/String;)V') { _$impls[$p]!.onClosing( - $a[0].castTo(const $WebSocketType(), releaseOriginal: true), + $a[0].as(const $WebSocket$Type(), releaseOriginal: true), $a[1] - .castTo(const jni.JIntegerType(), releaseOriginal: true) + .as(const _$jni.JIntegerType(), releaseOriginal: true) .intValue(releaseOriginal: true), - $a[2].castTo(const jni.JStringType(), releaseOriginal: true), + $a[2].as(const _$jni.JStringType(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } if ($d == r'onFailure(Lokhttp3/WebSocket;Ljava/lang/Throwable;Lokhttp3/Response;)V') { _$impls[$p]!.onFailure( - $a[0].castTo(const $WebSocketType(), releaseOriginal: true), - $a[1].castTo(const jni.JObjectType(), releaseOriginal: true), - $a[2].castTo(const $ResponseType(), releaseOriginal: true), + $a[0].as(const $WebSocket$Type(), releaseOriginal: true), + $a[1].as(const _$jni.JObjectType(), releaseOriginal: true), + $a[2].as(const $Response$Type(), releaseOriginal: true), ); - return jni.nullptr; + return _$jni.nullptr; } } catch (e) { - return ProtectedJniExtensions.newDartException(e); + return _$jni.ProtectedJniExtensions.newDartException(e); } - return jni.nullptr; + return _$jni.nullptr; } - factory WebSocketListenerProxy_WebSocketListener.implement( - $WebSocketListenerProxy_WebSocketListenerImpl $impl, - ) { - final $p = ReceivePort(); - final $x = WebSocketListenerProxy_WebSocketListener.fromReference( - ProtectedJniExtensions.newPortProxy( - r'com.example.ok_http.WebSocketListenerProxy$WebSocketListener', - $p, - _$invokePointer, - ), - ).._$p = $p; - final $a = $p.sendPort.nativePort; - _$impls[$a] = $impl; - $p.listen(($m) { + static void implementIn( + _$jni.JImplementer implementer, + $WebSocketListenerProxy_WebSocketListener $impl, + ) { + late final _$jni.RawReceivePort $p; + $p = _$jni.RawReceivePort(($m) { if ($m == null) { _$impls.remove($p.sendPort.nativePort); $p.close(); return; } - final $i = $MethodInvocation.fromMessage($m as List); + final $i = _$jni.MethodInvocation.fromMessage($m); final $r = _$invokeMethod($p.sendPort.nativePort, $i); - ProtectedJniExtensions.returnResult($i.result, $r); + _$jni.ProtectedJniExtensions.returnResult($i.result, $r); }); - return $x; + implementer.add( + r'com.example.ok_http.WebSocketListenerProxy$WebSocketListener', + $p, + _$invokePointer, + [ + if ($impl.onOpen$async) + r'onOpen(Lokhttp3/WebSocket;Lokhttp3/Response;)V', + if ($impl.onMessage$async) + r'onMessage(Lokhttp3/WebSocket;Ljava/lang/String;)V', + if ($impl.onMessage$1$async) + r'onMessage(Lokhttp3/WebSocket;Lokio/ByteString;)V', + if ($impl.onClosing$async) + r'onClosing(Lokhttp3/WebSocket;ILjava/lang/String;)V', + if ($impl.onFailure$async) + r'onFailure(Lokhttp3/WebSocket;Ljava/lang/Throwable;Lokhttp3/Response;)V', + ], + ); + final $a = $p.sendPort.nativePort; + _$impls[$a] = $impl; + } + + factory WebSocketListenerProxy_WebSocketListener.implement( + $WebSocketListenerProxy_WebSocketListener $impl, + ) { + final $i = _$jni.JImplementer(); + implementIn($i, $impl); + return WebSocketListenerProxy_WebSocketListener.fromReference( + $i.implementReference(), + ); } } -abstract interface class $WebSocketListenerProxy_WebSocketListenerImpl { - factory $WebSocketListenerProxy_WebSocketListenerImpl({ +abstract base mixin class $WebSocketListenerProxy_WebSocketListener { + factory $WebSocketListenerProxy_WebSocketListener({ required void Function(WebSocket webSocket, Response response) onOpen, - required void Function(WebSocket webSocket, jni.JString string) onMessage, + bool onOpen$async, + required void Function(WebSocket webSocket, _$jni.JString string) onMessage, + bool onMessage$async, required void Function(WebSocket webSocket, ByteString byteString) - onMessage1, - required void Function(WebSocket webSocket, int i, jni.JString string) + onMessage$1, + bool onMessage$1$async, + required void Function(WebSocket webSocket, int i, _$jni.JString string) onClosing, + bool onClosing$async, required void Function( - WebSocket webSocket, jni.JObject throwable, Response response) + WebSocket webSocket, _$jni.JObject throwable, Response response) onFailure, - }) = _$WebSocketListenerProxy_WebSocketListenerImpl; + bool onFailure$async, + }) = _$WebSocketListenerProxy_WebSocketListener; void onOpen(WebSocket webSocket, Response response); - void onMessage(WebSocket webSocket, jni.JString string); - void onMessage1(WebSocket webSocket, ByteString byteString); - void onClosing(WebSocket webSocket, int i, jni.JString string); - void onFailure(WebSocket webSocket, jni.JObject throwable, Response response); + bool get onOpen$async => false; + void onMessage(WebSocket webSocket, _$jni.JString string); + bool get onMessage$async => false; + void onMessage$1(WebSocket webSocket, ByteString byteString); + bool get onMessage$1$async => false; + void onClosing(WebSocket webSocket, int i, _$jni.JString string); + bool get onClosing$async => false; + void onFailure( + WebSocket webSocket, _$jni.JObject throwable, Response response); + bool get onFailure$async => false; } -class _$WebSocketListenerProxy_WebSocketListenerImpl - implements $WebSocketListenerProxy_WebSocketListenerImpl { - _$WebSocketListenerProxy_WebSocketListenerImpl({ +final class _$WebSocketListenerProxy_WebSocketListener + with $WebSocketListenerProxy_WebSocketListener { + _$WebSocketListenerProxy_WebSocketListener({ required void Function(WebSocket webSocket, Response response) onOpen, - required void Function(WebSocket webSocket, jni.JString string) onMessage, + this.onOpen$async = false, + required void Function(WebSocket webSocket, _$jni.JString string) onMessage, + this.onMessage$async = false, required void Function(WebSocket webSocket, ByteString byteString) - onMessage1, - required void Function(WebSocket webSocket, int i, jni.JString string) + onMessage$1, + this.onMessage$1$async = false, + required void Function(WebSocket webSocket, int i, _$jni.JString string) onClosing, + this.onClosing$async = false, required void Function( - WebSocket webSocket, jni.JObject throwable, Response response) + WebSocket webSocket, _$jni.JObject throwable, Response response) onFailure, + this.onFailure$async = false, }) : _onOpen = onOpen, _onMessage = onMessage, - _onMessage1 = onMessage1, + _onMessage$1 = onMessage$1, _onClosing = onClosing, _onFailure = onFailure; final void Function(WebSocket webSocket, Response response) _onOpen; - final void Function(WebSocket webSocket, jni.JString string) _onMessage; - final void Function(WebSocket webSocket, ByteString byteString) _onMessage1; - final void Function(WebSocket webSocket, int i, jni.JString string) + final bool onOpen$async; + final void Function(WebSocket webSocket, _$jni.JString string) _onMessage; + final bool onMessage$async; + final void Function(WebSocket webSocket, ByteString byteString) _onMessage$1; + final bool onMessage$1$async; + final void Function(WebSocket webSocket, int i, _$jni.JString string) _onClosing; + final bool onClosing$async; final void Function( - WebSocket webSocket, jni.JObject throwable, Response response) _onFailure; + WebSocket webSocket, _$jni.JObject throwable, Response response) + _onFailure; + final bool onFailure$async; void onOpen(WebSocket webSocket, Response response) { return _onOpen(webSocket, response); } - void onMessage(WebSocket webSocket, jni.JString string) { + void onMessage(WebSocket webSocket, _$jni.JString string) { return _onMessage(webSocket, string); } - void onMessage1(WebSocket webSocket, ByteString byteString) { - return _onMessage1(webSocket, byteString); + void onMessage$1(WebSocket webSocket, ByteString byteString) { + return _onMessage$1(webSocket, byteString); } - void onClosing(WebSocket webSocket, int i, jni.JString string) { + void onClosing(WebSocket webSocket, int i, _$jni.JString string) { return _onClosing(webSocket, i, string); } void onFailure( - WebSocket webSocket, jni.JObject throwable, Response response) { + WebSocket webSocket, _$jni.JObject throwable, Response response) { return _onFailure(webSocket, throwable, response); } } -final class $WebSocketListenerProxy_WebSocketListenerType - extends jni.JObjType { - const $WebSocketListenerProxy_WebSocketListenerType(); +final class $WebSocketListenerProxy_WebSocketListener$Type + extends _$jni.JObjType { + @_$jni.internal + const $WebSocketListenerProxy_WebSocketListener$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lcom/example/ok_http/WebSocketListenerProxy$WebSocketListener;'; - @override + @_$jni.internal + @_$core.override WebSocketListenerProxy_WebSocketListener fromReference( - jni.JReference reference) => + _$jni.JReference reference) => WebSocketListenerProxy_WebSocketListener.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($WebSocketListenerProxy_WebSocketListenerType).hashCode; + @_$core.override + int get hashCode => ($WebSocketListenerProxy_WebSocketListener$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { return other.runtimeType == - ($WebSocketListenerProxy_WebSocketListenerType) && - other is $WebSocketListenerProxy_WebSocketListenerType; + ($WebSocketListenerProxy_WebSocketListener$Type) && + other is $WebSocketListenerProxy_WebSocketListener$Type; } } -/// from: com.example.ok_http.WebSocketListenerProxy -class WebSocketListenerProxy extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `com.example.ok_http.WebSocketListenerProxy` +class WebSocketListenerProxy extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal WebSocketListenerProxy.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'com/example/ok_http/WebSocketListenerProxy'); + _$jni.JClass.forName(r'com/example/ok_http/WebSocketListenerProxy'); /// The type which includes information such as the signature of this class. - static const type = $WebSocketListenerProxyType(); - static final _id_new0 = _class.constructorId( + static const type = $WebSocketListenerProxy$Type(); + static final _id_new$ = _class.constructorId( r'(Lcom/example/ok_http/WebSocketListenerProxy$WebSocketListener;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (com.example.ok_http.WebSocketListenerProxy$WebSocketListener webSocketListener) + /// from: `public void (com.example.ok_http.WebSocketListenerProxy$WebSocketListener webSocketListener)` /// The returned object must be released after use, by calling the [release] method. factory WebSocketListenerProxy( WebSocketListenerProxy_WebSocketListener webSocketListener, ) { - return WebSocketListenerProxy.fromReference(_new0(_class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, webSocketListener.reference.pointer) + return WebSocketListenerProxy.fromReference(_new$(_class.reference.pointer, + _id_new$ as _$jni.JMethodIDPtr, webSocketListener.reference.pointer) .reference); } @@ -11393,26 +12509,29 @@ class WebSocketListenerProxy extends jni.JObject { r'(Lokhttp3/WebSocket;Lokhttp3/Response;)V', ); - static final _onOpen = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onOpen = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response) + /// from: `public void onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response)` void onOpen( WebSocket webSocket, Response response, ) { - _onOpen(reference.pointer, _id_onOpen as jni.JMethodIDPtr, + _onOpen(reference.pointer, _id_onOpen as _$jni.JMethodIDPtr, webSocket.reference.pointer, response.reference.pointer) .check(); } @@ -11422,55 +12541,61 @@ class WebSocketListenerProxy extends jni.JObject { r'(Lokhttp3/WebSocket;Ljava/lang/String;)V', ); - static final _onMessage = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onMessage = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void onMessage(okhttp3.WebSocket webSocket, java.lang.String string) + /// from: `public void onMessage(okhttp3.WebSocket webSocket, java.lang.String string)` void onMessage( WebSocket webSocket, - jni.JString string, + _$jni.JString string, ) { - _onMessage(reference.pointer, _id_onMessage as jni.JMethodIDPtr, + _onMessage(reference.pointer, _id_onMessage as _$jni.JMethodIDPtr, webSocket.reference.pointer, string.reference.pointer) .check(); } - static final _id_onMessage1 = _class.instanceMethodId( + static final _id_onMessage$1 = _class.instanceMethodId( r'onMessage', r'(Lokhttp3/WebSocket;Lokio/ByteString;)V', ); - static final _onMessage1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onMessage$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void onMessage(okhttp3.WebSocket webSocket, okio.ByteString byteString) - void onMessage1( + /// from: `public void onMessage(okhttp3.WebSocket webSocket, okio.ByteString byteString)` + void onMessage$1( WebSocket webSocket, ByteString byteString, ) { - _onMessage1(reference.pointer, _id_onMessage1 as jni.JMethodIDPtr, + _onMessage$1(reference.pointer, _id_onMessage$1 as _$jni.JMethodIDPtr, webSocket.reference.pointer, byteString.reference.pointer) .check(); } @@ -11480,28 +12605,32 @@ class WebSocketListenerProxy extends jni.JObject { r'(Lokhttp3/WebSocket;ILjava/lang/String;)V', ); - static final _onClosing = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onClosing = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - $Int32, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + int, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void onClosing(okhttp3.WebSocket webSocket, int i, java.lang.String string) + /// from: `public void onClosing(okhttp3.WebSocket webSocket, int i, java.lang.String string)` void onClosing( WebSocket webSocket, int i, - jni.JString string, + _$jni.JString string, ) { - _onClosing(reference.pointer, _id_onClosing as jni.JMethodIDPtr, + _onClosing(reference.pointer, _id_onClosing as _$jni.JMethodIDPtr, webSocket.reference.pointer, i, string.reference.pointer) .check(); } @@ -11511,34 +12640,34 @@ class WebSocketListenerProxy extends jni.JObject { r'(Lokhttp3/WebSocket;Ljava/lang/Throwable;Lokhttp3/Response;)V', ); - static final _onFailure = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _onFailure = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public void onFailure(okhttp3.WebSocket webSocket, java.lang.Throwable throwable, okhttp3.Response response) + /// from: `public void onFailure(okhttp3.WebSocket webSocket, java.lang.Throwable throwable, okhttp3.Response response)` void onFailure( WebSocket webSocket, - jni.JObject throwable, + _$jni.JObject throwable, Response response, ) { _onFailure( reference.pointer, - _id_onFailure as jni.JMethodIDPtr, + _id_onFailure as _$jni.JMethodIDPtr, webSocket.reference.pointer, throwable.reference.pointer, response.reference.pointer) @@ -11546,124 +12675,136 @@ class WebSocketListenerProxy extends jni.JObject { } } -final class $WebSocketListenerProxyType - extends jni.JObjType { - const $WebSocketListenerProxyType(); +final class $WebSocketListenerProxy$Type + extends _$jni.JObjType { + @_$jni.internal + const $WebSocketListenerProxy$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lcom/example/ok_http/WebSocketListenerProxy;'; - @override - WebSocketListenerProxy fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + WebSocketListenerProxy fromReference(_$jni.JReference reference) => WebSocketListenerProxy.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($WebSocketListenerProxyType).hashCode; + @_$core.override + int get hashCode => ($WebSocketListenerProxy$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($WebSocketListenerProxyType) && - other is $WebSocketListenerProxyType; + return other.runtimeType == ($WebSocketListenerProxy$Type) && + other is $WebSocketListenerProxy$Type; } } -/// from: okio.ByteString$Companion -class ByteString_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okio.ByteString$Companion` +class ByteString_Companion extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal ByteString_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okio/ByteString$Companion'); + static final _class = _$jni.JClass.forName(r'okio/ByteString$Companion'); /// The type which includes information such as the signature of this class. - static const type = $ByteString_CompanionType(); + static const type = $ByteString_Companion$Type(); static final _id_of = _class.instanceMethodId( r'of', r'([B)Lokio/ByteString;', ); - static final _of = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _of = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okio.ByteString of(byte[] bs) + /// from: `public final okio.ByteString of(byte[] bs)` /// The returned object must be released after use, by calling the [release] method. ByteString of( - jni.JArray bs, + _$jni.JArray<_$jni.jbyte> bs, ) { - return _of( - reference.pointer, _id_of as jni.JMethodIDPtr, bs.reference.pointer) - .object(const $ByteStringType()); + return _of(reference.pointer, _id_of as _$jni.JMethodIDPtr, + bs.reference.pointer) + .object(const $ByteString$Type()); } - static final _id_of1 = _class.instanceMethodId( + static final _id_of$1 = _class.instanceMethodId( r'of', r'([BII)Lokio/ByteString;', ); - static final _of1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( - 'globalEnv_CallObjectMethod') + static final _of$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32 + )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int, int)>(); - /// from: public final okio.ByteString of(byte[] bs, int i, int i1) + /// from: `public final okio.ByteString of(byte[] bs, int i, int i1)` /// The returned object must be released after use, by calling the [release] method. - ByteString of1( - jni.JArray bs, + ByteString of$1( + _$jni.JArray<_$jni.jbyte> bs, int i, int i1, ) { - return _of1(reference.pointer, _id_of1 as jni.JMethodIDPtr, + return _of$1(reference.pointer, _id_of$1 as _$jni.JMethodIDPtr, bs.reference.pointer, i, i1) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } - static final _id_of2 = _class.instanceMethodId( + static final _id_of$2 = _class.instanceMethodId( r'of', r'(Ljava/nio/ByteBuffer;)Lokio/ByteString;', ); - static final _of2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _of$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okio.ByteString of(java.nio.ByteBuffer byteBuffer) + /// from: `public final okio.ByteString of(java.nio.ByteBuffer byteBuffer)` /// The returned object must be released after use, by calling the [release] method. - ByteString of2( - jni.JByteBuffer byteBuffer, + ByteString of$2( + _$jni.JByteBuffer byteBuffer, ) { - return _of2(reference.pointer, _id_of2 as jni.JMethodIDPtr, + return _of$2(reference.pointer, _id_of$2 as _$jni.JMethodIDPtr, byteBuffer.reference.pointer) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } static final _id_encodeUtf8 = _class.instanceMethodId( @@ -11671,25 +12812,25 @@ class ByteString_Companion extends jni.JObject { r'(Ljava/lang/String;)Lokio/ByteString;', ); - static final _encodeUtf8 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _encodeUtf8 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okio.ByteString encodeUtf8(java.lang.String string) + /// from: `public final okio.ByteString encodeUtf8(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. ByteString encodeUtf8( - jni.JString string, + _$jni.JString string, ) { - return _encodeUtf8(reference.pointer, _id_encodeUtf8 as jni.JMethodIDPtr, + return _encodeUtf8(reference.pointer, _id_encodeUtf8 as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } static final _id_encodeString = _class.instanceMethodId( @@ -11697,32 +12838,35 @@ class ByteString_Companion extends jni.JObject { r'(Ljava/lang/String;Ljava/nio/charset/Charset;)Lokio/ByteString;', ); - static final _encodeString = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _encodeString = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okio.ByteString encodeString(java.lang.String string, java.nio.charset.Charset charset) + /// from: `public final okio.ByteString encodeString(java.lang.String string, java.nio.charset.Charset charset)` /// The returned object must be released after use, by calling the [release] method. ByteString encodeString( - jni.JString string, - jni.JObject charset, + _$jni.JString string, + _$jni.JObject charset, ) { return _encodeString( reference.pointer, - _id_encodeString as jni.JMethodIDPtr, + _id_encodeString as _$jni.JMethodIDPtr, string.reference.pointer, charset.reference.pointer) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } static final _id_decodeBase64 = _class.instanceMethodId( @@ -11730,25 +12874,25 @@ class ByteString_Companion extends jni.JObject { r'(Ljava/lang/String;)Lokio/ByteString;', ); - static final _decodeBase64 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _decodeBase64 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okio.ByteString decodeBase64(java.lang.String string) + /// from: `public final okio.ByteString decodeBase64(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. ByteString decodeBase64( - jni.JString string, + _$jni.JString string, ) { return _decodeBase64(reference.pointer, - _id_decodeBase64 as jni.JMethodIDPtr, string.reference.pointer) - .object(const $ByteStringType()); + _id_decodeBase64 as _$jni.JMethodIDPtr, string.reference.pointer) + .object(const $ByteString$Type()); } static final _id_decodeHex = _class.instanceMethodId( @@ -11756,25 +12900,25 @@ class ByteString_Companion extends jni.JObject { r'(Ljava/lang/String;)Lokio/ByteString;', ); - static final _decodeHex = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _decodeHex = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okio.ByteString decodeHex(java.lang.String string) + /// from: `public final okio.ByteString decodeHex(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. ByteString decodeHex( - jni.JString string, + _$jni.JString string, ) { - return _decodeHex(reference.pointer, _id_decodeHex as jni.JMethodIDPtr, + return _decodeHex(reference.pointer, _id_decodeHex as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } static final _id_read = _class.instanceMethodId( @@ -11782,137 +12926,147 @@ class ByteString_Companion extends jni.JObject { r'(Ljava/io/InputStream;I)Lokio/ByteString;', ); - static final _read = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + static final _read = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Pointer<_$jni.Void>, _$jni.Int32)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int)>(); - /// from: public final okio.ByteString read(java.io.InputStream inputStream, int i) + /// from: `public final okio.ByteString read(java.io.InputStream inputStream, int i)` /// The returned object must be released after use, by calling the [release] method. ByteString read( - jni.JObject inputStream, + _$jni.JObject inputStream, int i, ) { - return _read(reference.pointer, _id_read as jni.JMethodIDPtr, + return _read(reference.pointer, _id_read as _$jni.JMethodIDPtr, inputStream.reference.pointer, i) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` /// The returned object must be released after use, by calling the [release] method. factory ByteString_Companion( - jni.JObject defaultConstructorMarker, + _$jni.JObject defaultConstructorMarker, ) { - return ByteString_Companion.fromReference(_new0( + return ByteString_Companion.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, defaultConstructorMarker.reference.pointer) .reference); } } -final class $ByteString_CompanionType - extends jni.JObjType { - const $ByteString_CompanionType(); +final class $ByteString_Companion$Type + extends _$jni.JObjType { + @_$jni.internal + const $ByteString_Companion$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokio/ByteString$Companion;'; - @override - ByteString_Companion fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + ByteString_Companion fromReference(_$jni.JReference reference) => ByteString_Companion.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($ByteString_CompanionType).hashCode; + @_$core.override + int get hashCode => ($ByteString_Companion$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($ByteString_CompanionType) && - other is $ByteString_CompanionType; + return other.runtimeType == ($ByteString_Companion$Type) && + other is $ByteString_Companion$Type; } } -/// from: okio.ByteString -class ByteString extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `okio.ByteString` +class ByteString extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal ByteString.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'okio/ByteString'); + static final _class = _$jni.JClass.forName(r'okio/ByteString'); /// The type which includes information such as the signature of this class. - static const type = $ByteStringType(); + static const type = $ByteString$Type(); static final _id_Companion = _class.staticFieldId( r'Companion', r'Lokio/ByteString$Companion;', ); - /// from: static public final okio.ByteString$Companion Companion + /// from: `static public final okio.ByteString$Companion Companion` /// The returned object must be released after use, by calling the [release] method. static ByteString_Companion get Companion => - _id_Companion.get(_class, const $ByteString_CompanionType()); + _id_Companion.get(_class, const $ByteString_Companion$Type()); static final _id_EMPTY = _class.staticFieldId( r'EMPTY', r'Lokio/ByteString;', ); - /// from: static public final okio.ByteString EMPTY + /// from: `static public final okio.ByteString EMPTY` /// The returned object must be released after use, by calling the [release] method. - static ByteString get EMPTY => _id_EMPTY.get(_class, const $ByteStringType()); + static ByteString get EMPTY => + _id_EMPTY.get(_class, const $ByteString$Type()); - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'([B)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (byte[] bs) + /// from: `public void (byte[] bs)` /// The returned object must be released after use, by calling the [release] method. factory ByteString( - jni.JArray bs, + _$jni.JArray<_$jni.jbyte> bs, ) { - return ByteString.fromReference(_new0(_class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, bs.reference.pointer) + return ByteString.fromReference(_new$(_class.reference.pointer, + _id_new$ as _$jni.JMethodIDPtr, bs.reference.pointer) .reference); } @@ -11921,23 +13075,23 @@ class ByteString extends jni.JObject { r'()Ljava/lang/String;', ); - static final _utf8 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _utf8 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String utf8() + /// from: `public java.lang.String utf8()` /// The returned object must be released after use, by calling the [release] method. - jni.JString utf8() { - return _utf8(reference.pointer, _id_utf8 as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString utf8() { + return _utf8(reference.pointer, _id_utf8 as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_string = _class.instanceMethodId( @@ -11945,25 +13099,25 @@ class ByteString extends jni.JObject { r'(Ljava/nio/charset/Charset;)Ljava/lang/String;', ); - static final _string = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _string = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public java.lang.String string(java.nio.charset.Charset charset) + /// from: `public java.lang.String string(java.nio.charset.Charset charset)` /// The returned object must be released after use, by calling the [release] method. - jni.JString string( - jni.JObject charset, + _$jni.JString string( + _$jni.JObject charset, ) { - return _string(reference.pointer, _id_string as jni.JMethodIDPtr, + return _string(reference.pointer, _id_string as _$jni.JMethodIDPtr, charset.reference.pointer) - .object(const jni.JStringType()); + .object(const _$jni.JStringType()); } static final _id_base64 = _class.instanceMethodId( @@ -11971,23 +13125,23 @@ class ByteString extends jni.JObject { r'()Ljava/lang/String;', ); - static final _base64 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _base64 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String base64() + /// from: `public java.lang.String base64()` /// The returned object must be released after use, by calling the [release] method. - jni.JString base64() { - return _base64(reference.pointer, _id_base64 as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString base64() { + return _base64(reference.pointer, _id_base64 as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_md5 = _class.instanceMethodId( @@ -11995,23 +13149,23 @@ class ByteString extends jni.JObject { r'()Lokio/ByteString;', ); - static final _md5 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _md5 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okio.ByteString md5() + /// from: `public final okio.ByteString md5()` /// The returned object must be released after use, by calling the [release] method. ByteString md5() { - return _md5(reference.pointer, _id_md5 as jni.JMethodIDPtr) - .object(const $ByteStringType()); + return _md5(reference.pointer, _id_md5 as _$jni.JMethodIDPtr) + .object(const $ByteString$Type()); } static final _id_sha1 = _class.instanceMethodId( @@ -12019,23 +13173,23 @@ class ByteString extends jni.JObject { r'()Lokio/ByteString;', ); - static final _sha1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _sha1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okio.ByteString sha1() + /// from: `public final okio.ByteString sha1()` /// The returned object must be released after use, by calling the [release] method. ByteString sha1() { - return _sha1(reference.pointer, _id_sha1 as jni.JMethodIDPtr) - .object(const $ByteStringType()); + return _sha1(reference.pointer, _id_sha1 as _$jni.JMethodIDPtr) + .object(const $ByteString$Type()); } static final _id_sha256 = _class.instanceMethodId( @@ -12043,23 +13197,23 @@ class ByteString extends jni.JObject { r'()Lokio/ByteString;', ); - static final _sha256 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _sha256 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okio.ByteString sha256() + /// from: `public final okio.ByteString sha256()` /// The returned object must be released after use, by calling the [release] method. ByteString sha256() { - return _sha256(reference.pointer, _id_sha256 as jni.JMethodIDPtr) - .object(const $ByteStringType()); + return _sha256(reference.pointer, _id_sha256 as _$jni.JMethodIDPtr) + .object(const $ByteString$Type()); } static final _id_sha512 = _class.instanceMethodId( @@ -12067,23 +13221,23 @@ class ByteString extends jni.JObject { r'()Lokio/ByteString;', ); - static final _sha512 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _sha512 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okio.ByteString sha512() + /// from: `public final okio.ByteString sha512()` /// The returned object must be released after use, by calling the [release] method. ByteString sha512() { - return _sha512(reference.pointer, _id_sha512 as jni.JMethodIDPtr) - .object(const $ByteStringType()); + return _sha512(reference.pointer, _id_sha512 as _$jni.JMethodIDPtr) + .object(const $ByteString$Type()); } static final _id_hmacSha1 = _class.instanceMethodId( @@ -12091,25 +13245,25 @@ class ByteString extends jni.JObject { r'(Lokio/ByteString;)Lokio/ByteString;', ); - static final _hmacSha1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _hmacSha1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okio.ByteString hmacSha1(okio.ByteString byteString) + /// from: `public okio.ByteString hmacSha1(okio.ByteString byteString)` /// The returned object must be released after use, by calling the [release] method. ByteString hmacSha1( ByteString byteString, ) { - return _hmacSha1(reference.pointer, _id_hmacSha1 as jni.JMethodIDPtr, + return _hmacSha1(reference.pointer, _id_hmacSha1 as _$jni.JMethodIDPtr, byteString.reference.pointer) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } static final _id_hmacSha256 = _class.instanceMethodId( @@ -12117,25 +13271,25 @@ class ByteString extends jni.JObject { r'(Lokio/ByteString;)Lokio/ByteString;', ); - static final _hmacSha256 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _hmacSha256 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okio.ByteString hmacSha256(okio.ByteString byteString) + /// from: `public okio.ByteString hmacSha256(okio.ByteString byteString)` /// The returned object must be released after use, by calling the [release] method. ByteString hmacSha256( ByteString byteString, ) { - return _hmacSha256(reference.pointer, _id_hmacSha256 as jni.JMethodIDPtr, + return _hmacSha256(reference.pointer, _id_hmacSha256 as _$jni.JMethodIDPtr, byteString.reference.pointer) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } static final _id_hmacSha512 = _class.instanceMethodId( @@ -12143,25 +13297,25 @@ class ByteString extends jni.JObject { r'(Lokio/ByteString;)Lokio/ByteString;', ); - static final _hmacSha512 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _hmacSha512 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public okio.ByteString hmacSha512(okio.ByteString byteString) + /// from: `public okio.ByteString hmacSha512(okio.ByteString byteString)` /// The returned object must be released after use, by calling the [release] method. ByteString hmacSha512( ByteString byteString, ) { - return _hmacSha512(reference.pointer, _id_hmacSha512 as jni.JMethodIDPtr, + return _hmacSha512(reference.pointer, _id_hmacSha512 as _$jni.JMethodIDPtr, byteString.reference.pointer) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } static final _id_base64Url = _class.instanceMethodId( @@ -12169,23 +13323,23 @@ class ByteString extends jni.JObject { r'()Ljava/lang/String;', ); - static final _base64Url = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _base64Url = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String base64Url() + /// from: `public java.lang.String base64Url()` /// The returned object must be released after use, by calling the [release] method. - jni.JString base64Url() { - return _base64Url(reference.pointer, _id_base64Url as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString base64Url() { + return _base64Url(reference.pointer, _id_base64Url as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_hex = _class.instanceMethodId( @@ -12193,23 +13347,23 @@ class ByteString extends jni.JObject { r'()Ljava/lang/String;', ); - static final _hex = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _hex = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String hex() + /// from: `public java.lang.String hex()` /// The returned object must be released after use, by calling the [release] method. - jni.JString hex() { - return _hex(reference.pointer, _id_hex as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString hex() { + return _hex(reference.pointer, _id_hex as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } static final _id_toAsciiLowercase = _class.instanceMethodId( @@ -12217,24 +13371,24 @@ class ByteString extends jni.JObject { r'()Lokio/ByteString;', ); - static final _toAsciiLowercase = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _toAsciiLowercase = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public okio.ByteString toAsciiLowercase() + /// from: `public okio.ByteString toAsciiLowercase()` /// The returned object must be released after use, by calling the [release] method. ByteString toAsciiLowercase() { return _toAsciiLowercase( - reference.pointer, _id_toAsciiLowercase as jni.JMethodIDPtr) - .object(const $ByteStringType()); + reference.pointer, _id_toAsciiLowercase as _$jni.JMethodIDPtr) + .object(const $ByteString$Type()); } static final _id_toAsciiUppercase = _class.instanceMethodId( @@ -12242,24 +13396,24 @@ class ByteString extends jni.JObject { r'()Lokio/ByteString;', ); - static final _toAsciiUppercase = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _toAsciiUppercase = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public okio.ByteString toAsciiUppercase() + /// from: `public okio.ByteString toAsciiUppercase()` /// The returned object must be released after use, by calling the [release] method. ByteString toAsciiUppercase() { return _toAsciiUppercase( - reference.pointer, _id_toAsciiUppercase as jni.JMethodIDPtr) - .object(const $ByteStringType()); + reference.pointer, _id_toAsciiUppercase as _$jni.JMethodIDPtr) + .object(const $ByteString$Type()); } static final _id_substring = _class.instanceMethodId( @@ -12267,23 +13421,26 @@ class ByteString extends jni.JObject { r'(II)Lokio/ByteString;', ); - static final _substring = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32, $Int32)>)>>('globalEnv_CallObjectMethod') + static final _substring = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32, _$jni.Int32)>)>>( + 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int, int)>(); - /// from: public okio.ByteString substring(int i, int i1) + /// from: `public okio.ByteString substring(int i, int i1)` /// The returned object must be released after use, by calling the [release] method. ByteString substring( int i, int i1, ) { return _substring( - reference.pointer, _id_substring as jni.JMethodIDPtr, i, i1) - .object(const $ByteStringType()); + reference.pointer, _id_substring as _$jni.JMethodIDPtr, i, i1) + .object(const $ByteString$Type()); } static final _id_getByte = _class.instanceMethodId( @@ -12291,19 +13448,22 @@ class ByteString extends jni.JObject { r'(I)B', ); - static final _getByte = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallByteMethod') + static final _getByte = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallByteMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public final byte getByte(int i) + /// from: `public final byte getByte(int i)` int getByte( int i, ) { - return _getByte(reference.pointer, _id_getByte as jni.JMethodIDPtr, i).byte; + return _getByte(reference.pointer, _id_getByte as _$jni.JMethodIDPtr, i) + .byte; } static final _id_size = _class.instanceMethodId( @@ -12311,21 +13471,21 @@ class ByteString extends jni.JObject { r'()I', ); - static final _size = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _size = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final int size() + /// from: `public final int size()` int size() { - return _size(reference.pointer, _id_size as jni.JMethodIDPtr).integer; + return _size(reference.pointer, _id_size as _$jni.JMethodIDPtr).integer; } static final _id_toByteArray = _class.instanceMethodId( @@ -12333,23 +13493,24 @@ class ByteString extends jni.JObject { r'()[B', ); - static final _toByteArray = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _toByteArray = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public byte[] toByteArray() + /// from: `public byte[] toByteArray()` /// The returned object must be released after use, by calling the [release] method. - jni.JArray toByteArray() { - return _toByteArray(reference.pointer, _id_toByteArray as jni.JMethodIDPtr) - .object(const jni.JArrayType(jni.jbyteType())); + _$jni.JArray<_$jni.jbyte> toByteArray() { + return _toByteArray( + reference.pointer, _id_toByteArray as _$jni.JMethodIDPtr) + .object(const _$jni.JArrayType(_$jni.jbyteType())); } static final _id_asByteBuffer = _class.instanceMethodId( @@ -12357,24 +13518,24 @@ class ByteString extends jni.JObject { r'()Ljava/nio/ByteBuffer;', ); - static final _asByteBuffer = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _asByteBuffer = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.nio.ByteBuffer asByteBuffer() + /// from: `public java.nio.ByteBuffer asByteBuffer()` /// The returned object must be released after use, by calling the [release] method. - jni.JByteBuffer asByteBuffer() { + _$jni.JByteBuffer asByteBuffer() { return _asByteBuffer( - reference.pointer, _id_asByteBuffer as jni.JMethodIDPtr) - .object(const jni.JByteBufferType()); + reference.pointer, _id_asByteBuffer as _$jni.JMethodIDPtr) + .object(const _$jni.JByteBufferType()); } static final _id_write = _class.instanceMethodId( @@ -12382,22 +13543,22 @@ class ByteString extends jni.JObject { r'(Ljava/io/OutputStream;)V', ); - static final _write = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _write = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void write(java.io.OutputStream outputStream) + /// from: `public void write(java.io.OutputStream outputStream)` void write( - jni.JObject outputStream, + _$jni.JObject outputStream, ) { - _write(reference.pointer, _id_write as jni.JMethodIDPtr, + _write(reference.pointer, _id_write as _$jni.JMethodIDPtr, outputStream.reference.pointer) .check(); } @@ -12407,65 +13568,70 @@ class ByteString extends jni.JObject { r'(ILokio/ByteString;II)Z', ); - static final _rangeEquals = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _rangeEquals = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - $Int32, - ffi.Pointer, - $Int32, - $Int32 + _$jni.Int32, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32 )>)>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer, int, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>, int, int)>(); - /// from: public boolean rangeEquals(int i, okio.ByteString byteString, int i1, int i2) + /// from: `public boolean rangeEquals(int i, okio.ByteString byteString, int i1, int i2)` bool rangeEquals( int i, ByteString byteString, int i1, int i2, ) { - return _rangeEquals(reference.pointer, _id_rangeEquals as jni.JMethodIDPtr, - i, byteString.reference.pointer, i1, i2) + return _rangeEquals( + reference.pointer, + _id_rangeEquals as _$jni.JMethodIDPtr, + i, + byteString.reference.pointer, + i1, + i2) .boolean; } - static final _id_rangeEquals1 = _class.instanceMethodId( + static final _id_rangeEquals$1 = _class.instanceMethodId( r'rangeEquals', r'(I[BII)Z', ); - static final _rangeEquals1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _rangeEquals$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - $Int32, - ffi.Pointer, - $Int32, - $Int32 + _$jni.Int32, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32 )>)>>('globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer, int, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>, int, int)>(); - /// from: public boolean rangeEquals(int i, byte[] bs, int i1, int i2) - bool rangeEquals1( + /// from: `public boolean rangeEquals(int i, byte[] bs, int i1, int i2)` + bool rangeEquals$1( int i, - jni.JArray bs, + _$jni.JArray<_$jni.jbyte> bs, int i1, int i2, ) { - return _rangeEquals1( + return _rangeEquals$1( reference.pointer, - _id_rangeEquals1 as jni.JMethodIDPtr, + _id_rangeEquals$1 as _$jni.JMethodIDPtr, i, bs.reference.pointer, i1, @@ -12478,30 +13644,30 @@ class ByteString extends jni.JObject { r'(I[BII)V', ); - static final _copyInto = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _copyInto = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - $Int32, - ffi.Pointer, - $Int32, - $Int32 + _$jni.Int32, + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32 )>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - int, ffi.Pointer, int, int)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>, int, int)>(); - /// from: public void copyInto(int i, byte[] bs, int i1, int i2) + /// from: `public void copyInto(int i, byte[] bs, int i1, int i2)` void copyInto( int i, - jni.JArray bs, + _$jni.JArray<_$jni.jbyte> bs, int i1, int i2, ) { - _copyInto(reference.pointer, _id_copyInto as jni.JMethodIDPtr, i, + _copyInto(reference.pointer, _id_copyInto as _$jni.JMethodIDPtr, i, bs.reference.pointer, i1, i2) .check(); } @@ -12511,48 +13677,48 @@ class ByteString extends jni.JObject { r'(Lokio/ByteString;)Z', ); - static final _startsWith = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _startsWith = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final boolean startsWith(okio.ByteString byteString) + /// from: `public final boolean startsWith(okio.ByteString byteString)` bool startsWith( ByteString byteString, ) { - return _startsWith(reference.pointer, _id_startsWith as jni.JMethodIDPtr, + return _startsWith(reference.pointer, _id_startsWith as _$jni.JMethodIDPtr, byteString.reference.pointer) .boolean; } - static final _id_startsWith1 = _class.instanceMethodId( + static final _id_startsWith$1 = _class.instanceMethodId( r'startsWith', r'([B)Z', ); - static final _startsWith1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _startsWith$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final boolean startsWith(byte[] bs) - bool startsWith1( - jni.JArray bs, + /// from: `public final boolean startsWith(byte[] bs)` + bool startsWith$1( + _$jni.JArray<_$jni.jbyte> bs, ) { - return _startsWith1(reference.pointer, _id_startsWith1 as jni.JMethodIDPtr, - bs.reference.pointer) + return _startsWith$1(reference.pointer, + _id_startsWith$1 as _$jni.JMethodIDPtr, bs.reference.pointer) .boolean; } @@ -12561,47 +13727,47 @@ class ByteString extends jni.JObject { r'(Lokio/ByteString;)Z', ); - static final _endsWith = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _endsWith = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final boolean endsWith(okio.ByteString byteString) + /// from: `public final boolean endsWith(okio.ByteString byteString)` bool endsWith( ByteString byteString, ) { - return _endsWith(reference.pointer, _id_endsWith as jni.JMethodIDPtr, + return _endsWith(reference.pointer, _id_endsWith as _$jni.JMethodIDPtr, byteString.reference.pointer) .boolean; } - static final _id_endsWith1 = _class.instanceMethodId( + static final _id_endsWith$1 = _class.instanceMethodId( r'endsWith', r'([B)Z', ); - static final _endsWith1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _endsWith$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final boolean endsWith(byte[] bs) - bool endsWith1( - jni.JArray bs, + /// from: `public final boolean endsWith(byte[] bs)` + bool endsWith$1( + _$jni.JArray<_$jni.jbyte> bs, ) { - return _endsWith1(reference.pointer, _id_endsWith1 as jni.JMethodIDPtr, + return _endsWith$1(reference.pointer, _id_endsWith$1 as _$jni.JMethodIDPtr, bs.reference.pointer) .boolean; } @@ -12611,49 +13777,51 @@ class ByteString extends jni.JObject { r'(Lokio/ByteString;I)I', ); - static final _indexOf = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + static final _indexOf = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Pointer<_$jni.Void>, _$jni.Int32)>)>>( 'globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int)>(); - /// from: public final int indexOf(okio.ByteString byteString, int i) + /// from: `public final int indexOf(okio.ByteString byteString, int i)` int indexOf( ByteString byteString, int i, ) { - return _indexOf(reference.pointer, _id_indexOf as jni.JMethodIDPtr, + return _indexOf(reference.pointer, _id_indexOf as _$jni.JMethodIDPtr, byteString.reference.pointer, i) .integer; } - static final _id_indexOf1 = _class.instanceMethodId( + static final _id_indexOf$1 = _class.instanceMethodId( r'indexOf', r'([BI)I', ); - static final _indexOf1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + static final _indexOf$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Pointer<_$jni.Void>, _$jni.Int32)>)>>( 'globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int)>(); - /// from: public int indexOf(byte[] bs, int i) - int indexOf1( - jni.JArray bs, + /// from: `public int indexOf(byte[] bs, int i)` + int indexOf$1( + _$jni.JArray<_$jni.jbyte> bs, int i, ) { - return _indexOf1(reference.pointer, _id_indexOf1 as jni.JMethodIDPtr, + return _indexOf$1(reference.pointer, _id_indexOf$1 as _$jni.JMethodIDPtr, bs.reference.pointer, i) .integer; } @@ -12663,50 +13831,55 @@ class ByteString extends jni.JObject { r'(Lokio/ByteString;I)I', ); - static final _lastIndexOf = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + static final _lastIndexOf = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Pointer<_$jni.Void>, _$jni.Int32)>)>>( 'globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int)>(); - /// from: public final int lastIndexOf(okio.ByteString byteString, int i) + /// from: `public final int lastIndexOf(okio.ByteString byteString, int i)` int lastIndexOf( ByteString byteString, int i, ) { - return _lastIndexOf(reference.pointer, _id_lastIndexOf as jni.JMethodIDPtr, - byteString.reference.pointer, i) + return _lastIndexOf( + reference.pointer, + _id_lastIndexOf as _$jni.JMethodIDPtr, + byteString.reference.pointer, + i) .integer; } - static final _id_lastIndexOf1 = _class.instanceMethodId( + static final _id_lastIndexOf$1 = _class.instanceMethodId( r'lastIndexOf', r'([BI)I', ); - static final _lastIndexOf1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + static final _lastIndexOf$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Pointer<_$jni.Void>, _$jni.Int32)>)>>( 'globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int)>(); - /// from: public int lastIndexOf(byte[] bs, int i) - int lastIndexOf1( - jni.JArray bs, + /// from: `public int lastIndexOf(byte[] bs, int i)` + int lastIndexOf$1( + _$jni.JArray<_$jni.jbyte> bs, int i, ) { - return _lastIndexOf1(reference.pointer, - _id_lastIndexOf1 as jni.JMethodIDPtr, bs.reference.pointer, i) + return _lastIndexOf$1(reference.pointer, + _id_lastIndexOf$1 as _$jni.JMethodIDPtr, bs.reference.pointer, i) .integer; } @@ -12715,46 +13888,46 @@ class ByteString extends jni.JObject { r'(Ljava/lang/Object;)Z', ); - static final _equals = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _equals = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallBooleanMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public boolean equals(java.lang.Object object) + /// from: `public boolean equals(java.lang.Object object)` bool equals( - jni.JObject object, + _$jni.JObject object, ) { - return _equals(reference.pointer, _id_equals as jni.JMethodIDPtr, + return _equals(reference.pointer, _id_equals as _$jni.JMethodIDPtr, object.reference.pointer) .boolean; } - static final _id_hashCode1 = _class.instanceMethodId( + static final _id_hashCode$1 = _class.instanceMethodId( r'hashCode', r'()I', ); - static final _hashCode1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _hashCode$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public int hashCode() - int hashCode1() { - return _hashCode1(reference.pointer, _id_hashCode1 as jni.JMethodIDPtr) + /// from: `public int hashCode()` + int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1 as _$jni.JMethodIDPtr) .integer; } @@ -12763,193 +13936,199 @@ class ByteString extends jni.JObject { r'(Lokio/ByteString;)I', ); - static final _compareTo = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _compareTo = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public int compareTo(okio.ByteString byteString) + /// from: `public int compareTo(okio.ByteString byteString)` int compareTo( ByteString byteString, ) { - return _compareTo(reference.pointer, _id_compareTo as jni.JMethodIDPtr, + return _compareTo(reference.pointer, _id_compareTo as _$jni.JMethodIDPtr, byteString.reference.pointer) .integer; } - static final _id_toString1 = _class.instanceMethodId( + static final _id_toString$1 = _class.instanceMethodId( r'toString', r'()Ljava/lang/String;', ); - static final _toString1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _toString$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.lang.String toString() + /// from: `public java.lang.String toString()` /// The returned object must be released after use, by calling the [release] method. - jni.JString toString1() { - return _toString1(reference.pointer, _id_toString1 as jni.JMethodIDPtr) - .object(const jni.JStringType()); + _$jni.JString toString$1() { + return _toString$1(reference.pointer, _id_toString$1 as _$jni.JMethodIDPtr) + .object(const _$jni.JStringType()); } - static final _id_substring1 = _class.instanceMethodId( + static final _id_substring$1 = _class.instanceMethodId( r'substring', r'(I)Lokio/ByteString;', ); - static final _substring1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<($Int32,)>)>>('globalEnv_CallObjectMethod') + static final _substring$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int32,)>)>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public final okio.ByteString substring(int i) + /// from: `public final okio.ByteString substring(int i)` /// The returned object must be released after use, by calling the [release] method. - ByteString substring1( + ByteString substring$1( int i, ) { - return _substring1(reference.pointer, _id_substring1 as jni.JMethodIDPtr, i) - .object(const $ByteStringType()); + return _substring$1( + reference.pointer, _id_substring$1 as _$jni.JMethodIDPtr, i) + .object(const $ByteString$Type()); } - static final _id_substring2 = _class.instanceMethodId( + static final _id_substring$2 = _class.instanceMethodId( r'substring', r'()Lokio/ByteString;', ); - static final _substring2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _substring$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public final okio.ByteString substring() + /// from: `public final okio.ByteString substring()` /// The returned object must be released after use, by calling the [release] method. - ByteString substring2() { - return _substring2(reference.pointer, _id_substring2 as jni.JMethodIDPtr) - .object(const $ByteStringType()); + ByteString substring$2() { + return _substring$2( + reference.pointer, _id_substring$2 as _$jni.JMethodIDPtr) + .object(const $ByteString$Type()); } - static final _id_indexOf2 = _class.instanceMethodId( + static final _id_indexOf$2 = _class.instanceMethodId( r'indexOf', r'(Lokio/ByteString;)I', ); - static final _indexOf2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _indexOf$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final int indexOf(okio.ByteString byteString) - int indexOf2( + /// from: `public final int indexOf(okio.ByteString byteString)` + int indexOf$2( ByteString byteString, ) { - return _indexOf2(reference.pointer, _id_indexOf2 as jni.JMethodIDPtr, + return _indexOf$2(reference.pointer, _id_indexOf$2 as _$jni.JMethodIDPtr, byteString.reference.pointer) .integer; } - static final _id_indexOf3 = _class.instanceMethodId( + static final _id_indexOf$3 = _class.instanceMethodId( r'indexOf', r'([B)I', ); - static final _indexOf3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _indexOf$3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final int indexOf(byte[] bs) - int indexOf3( - jni.JArray bs, + /// from: `public final int indexOf(byte[] bs)` + int indexOf$3( + _$jni.JArray<_$jni.jbyte> bs, ) { - return _indexOf3(reference.pointer, _id_indexOf3 as jni.JMethodIDPtr, + return _indexOf$3(reference.pointer, _id_indexOf$3 as _$jni.JMethodIDPtr, bs.reference.pointer) .integer; } - static final _id_lastIndexOf2 = _class.instanceMethodId( + static final _id_lastIndexOf$2 = _class.instanceMethodId( r'lastIndexOf', r'(Lokio/ByteString;)I', ); - static final _lastIndexOf2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _lastIndexOf$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final int lastIndexOf(okio.ByteString byteString) - int lastIndexOf2( + /// from: `public final int lastIndexOf(okio.ByteString byteString)` + int lastIndexOf$2( ByteString byteString, ) { - return _lastIndexOf2(reference.pointer, - _id_lastIndexOf2 as jni.JMethodIDPtr, byteString.reference.pointer) + return _lastIndexOf$2( + reference.pointer, + _id_lastIndexOf$2 as _$jni.JMethodIDPtr, + byteString.reference.pointer) .integer; } - static final _id_lastIndexOf3 = _class.instanceMethodId( + static final _id_lastIndexOf$3 = _class.instanceMethodId( r'lastIndexOf', r'([B)I', ); - static final _lastIndexOf3 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _lastIndexOf$3 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallIntMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final int lastIndexOf(byte[] bs) - int lastIndexOf3( - jni.JArray bs, + /// from: `public final int lastIndexOf(byte[] bs)` + int lastIndexOf$3( + _$jni.JArray<_$jni.jbyte> bs, ) { - return _lastIndexOf3(reference.pointer, - _id_lastIndexOf3 as jni.JMethodIDPtr, bs.reference.pointer) + return _lastIndexOf$3(reference.pointer, + _id_lastIndexOf$3 as _$jni.JMethodIDPtr, bs.reference.pointer) .integer; } @@ -12958,79 +14137,83 @@ class ByteString extends jni.JObject { r'([B)Lokio/ByteString;', ); - static final _of = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _of = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okio.ByteString of(byte[] bs) + /// from: `static public final okio.ByteString of(byte[] bs)` /// The returned object must be released after use, by calling the [release] method. static ByteString of( - jni.JArray bs, + _$jni.JArray<_$jni.jbyte> bs, ) { - return _of(_class.reference.pointer, _id_of as jni.JMethodIDPtr, + return _of(_class.reference.pointer, _id_of as _$jni.JMethodIDPtr, bs.reference.pointer) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } - static final _id_of1 = _class.staticMethodId( + static final _id_of$1 = _class.staticMethodId( r'of', r'([BII)Lokio/ByteString;', ); - static final _of1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, $Int32, $Int32)>)>>( - 'globalEnv_CallStaticObjectMethod') + static final _of$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< + ( + _$jni.Pointer<_$jni.Void>, + _$jni.Int32, + _$jni.Int32 + )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int, int)>(); - /// from: static public final okio.ByteString of(byte[] bs, int i, int i1) + /// from: `static public final okio.ByteString of(byte[] bs, int i, int i1)` /// The returned object must be released after use, by calling the [release] method. - static ByteString of1( - jni.JArray bs, + static ByteString of$1( + _$jni.JArray<_$jni.jbyte> bs, int i, int i1, ) { - return _of1(_class.reference.pointer, _id_of1 as jni.JMethodIDPtr, + return _of$1(_class.reference.pointer, _id_of$1 as _$jni.JMethodIDPtr, bs.reference.pointer, i, i1) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } - static final _id_of2 = _class.staticMethodId( + static final _id_of$2 = _class.staticMethodId( r'of', r'(Ljava/nio/ByteBuffer;)Lokio/ByteString;', ); - static final _of2 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _of$2 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okio.ByteString of(java.nio.ByteBuffer byteBuffer) + /// from: `static public final okio.ByteString of(java.nio.ByteBuffer byteBuffer)` /// The returned object must be released after use, by calling the [release] method. - static ByteString of2( - jni.JByteBuffer byteBuffer, + static ByteString of$2( + _$jni.JByteBuffer byteBuffer, ) { - return _of2(_class.reference.pointer, _id_of2 as jni.JMethodIDPtr, + return _of$2(_class.reference.pointer, _id_of$2 as _$jni.JMethodIDPtr, byteBuffer.reference.pointer) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } static final _id_encodeUtf8 = _class.staticMethodId( @@ -13038,25 +14221,25 @@ class ByteString extends jni.JObject { r'(Ljava/lang/String;)Lokio/ByteString;', ); - static final _encodeUtf8 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _encodeUtf8 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okio.ByteString encodeUtf8(java.lang.String string) + /// from: `static public final okio.ByteString encodeUtf8(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. static ByteString encodeUtf8( - jni.JString string, + _$jni.JString string, ) { return _encodeUtf8(_class.reference.pointer, - _id_encodeUtf8 as jni.JMethodIDPtr, string.reference.pointer) - .object(const $ByteStringType()); + _id_encodeUtf8 as _$jni.JMethodIDPtr, string.reference.pointer) + .object(const $ByteString$Type()); } static final _id_encodeString = _class.staticMethodId( @@ -13064,32 +14247,35 @@ class ByteString extends jni.JObject { r'(Ljava/lang/String;Ljava/nio/charset/Charset;)Lokio/ByteString;', ); - static final _encodeString = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs< + static final _encodeString = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs< ( - ffi.Pointer, - ffi.Pointer + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void> )>)>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, ffi.Pointer)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.Pointer<_$jni.Void>, + _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okio.ByteString encodeString(java.lang.String string, java.nio.charset.Charset charset) + /// from: `static public final okio.ByteString encodeString(java.lang.String string, java.nio.charset.Charset charset)` /// The returned object must be released after use, by calling the [release] method. static ByteString encodeString( - jni.JString string, - jni.JObject charset, + _$jni.JString string, + _$jni.JObject charset, ) { return _encodeString( _class.reference.pointer, - _id_encodeString as jni.JMethodIDPtr, + _id_encodeString as _$jni.JMethodIDPtr, string.reference.pointer, charset.reference.pointer) - .object(const $ByteStringType()); + .object(const $ByteString$Type()); } static final _id_decodeBase64 = _class.staticMethodId( @@ -13097,25 +14283,25 @@ class ByteString extends jni.JObject { r'(Ljava/lang/String;)Lokio/ByteString;', ); - static final _decodeBase64 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _decodeBase64 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okio.ByteString decodeBase64(java.lang.String string) + /// from: `static public final okio.ByteString decodeBase64(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. static ByteString decodeBase64( - jni.JString string, + _$jni.JString string, ) { return _decodeBase64(_class.reference.pointer, - _id_decodeBase64 as jni.JMethodIDPtr, string.reference.pointer) - .object(const $ByteStringType()); + _id_decodeBase64 as _$jni.JMethodIDPtr, string.reference.pointer) + .object(const $ByteString$Type()); } static final _id_decodeHex = _class.staticMethodId( @@ -13123,25 +14309,25 @@ class ByteString extends jni.JObject { r'(Ljava/lang/String;)Lokio/ByteString;', ); - static final _decodeHex = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _decodeHex = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public final okio.ByteString decodeHex(java.lang.String string) + /// from: `static public final okio.ByteString decodeHex(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. static ByteString decodeHex( - jni.JString string, + _$jni.JString string, ) { return _decodeHex(_class.reference.pointer, - _id_decodeHex as jni.JMethodIDPtr, string.reference.pointer) - .object(const $ByteStringType()); + _id_decodeHex as _$jni.JMethodIDPtr, string.reference.pointer) + .object(const $ByteString$Type()); } static final _id_read = _class.staticMethodId( @@ -13149,352 +14335,356 @@ class ByteString extends jni.JObject { r'(Ljava/io/InputStream;I)Lokio/ByteString;', ); - static final _read = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, $Int32)>)>>( + static final _read = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Pointer<_$jni.Void>, _$jni.Int32)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int)>(); - /// from: static public final okio.ByteString read(java.io.InputStream inputStream, int i) + /// from: `static public final okio.ByteString read(java.io.InputStream inputStream, int i)` /// The returned object must be released after use, by calling the [release] method. static ByteString read( - jni.JObject inputStream, + _$jni.JObject inputStream, int i, ) { - return _read(_class.reference.pointer, _id_read as jni.JMethodIDPtr, + return _read(_class.reference.pointer, _id_read as _$jni.JMethodIDPtr, inputStream.reference.pointer, i) - .object(const $ByteStringType()); - } - - static final _id_compareTo1 = _class.instanceMethodId( - r'compareTo', - r'(Ljava/lang/Object;)I', - ); - - static final _compareTo1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( - 'globalEnv_CallIntMethod') - .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); - - /// from: public int compareTo(java.lang.Object object) - int compareTo1( - jni.JObject object, - ) { - return _compareTo1(reference.pointer, _id_compareTo1 as jni.JMethodIDPtr, - object.reference.pointer) - .integer; + .object(const $ByteString$Type()); } } -final class $ByteStringType extends jni.JObjType { - const $ByteStringType(); +final class $ByteString$Type extends _$jni.JObjType { + @_$jni.internal + const $ByteString$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lokio/ByteString;'; - @override - ByteString fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + ByteString fromReference(_$jni.JReference reference) => ByteString.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($ByteStringType).hashCode; + @_$core.override + int get hashCode => ($ByteString$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($ByteStringType) && other is $ByteStringType; + return other.runtimeType == ($ByteString$Type) && other is $ByteString$Type; } } -/// from: com.example.ok_http.WebSocketInterceptor$Companion -class WebSocketInterceptor_Companion extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `com.example.ok_http.WebSocketInterceptor$Companion` +class WebSocketInterceptor_Companion extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal WebSocketInterceptor_Companion.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = - jni.JClass.forName(r'com/example/ok_http/WebSocketInterceptor$Companion'); + static final _class = _$jni.JClass.forName( + r'com/example/ok_http/WebSocketInterceptor$Companion'); /// The type which includes information such as the signature of this class. - static const type = $WebSocketInterceptor_CompanionType(); + static const type = $WebSocketInterceptor_Companion$Type(); static final _id_addWSInterceptor = _class.instanceMethodId( r'addWSInterceptor', r'(Lokhttp3/OkHttpClient$Builder;)Lokhttp3/OkHttpClient$Builder;', ); - static final _addWSInterceptor = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _addWSInterceptor = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public final okhttp3.OkHttpClient$Builder addWSInterceptor(okhttp3.OkHttpClient$Builder builder) + /// from: `public final okhttp3.OkHttpClient$Builder addWSInterceptor(okhttp3.OkHttpClient$Builder builder)` /// The returned object must be released after use, by calling the [release] method. OkHttpClient_Builder addWSInterceptor( OkHttpClient_Builder builder, ) { - return _addWSInterceptor(reference.pointer, - _id_addWSInterceptor as jni.JMethodIDPtr, builder.reference.pointer) - .object(const $OkHttpClient_BuilderType()); + return _addWSInterceptor( + reference.pointer, + _id_addWSInterceptor as _$jni.JMethodIDPtr, + builder.reference.pointer) + .object(const $OkHttpClient_Builder$Type()); } - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'(Lkotlin/jvm/internal/DefaultConstructorMarker;)V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_NewObject') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker) + /// from: `synthetic public void (kotlin.jvm.internal.DefaultConstructorMarker defaultConstructorMarker)` /// The returned object must be released after use, by calling the [release] method. factory WebSocketInterceptor_Companion( - jni.JObject defaultConstructorMarker, + _$jni.JObject defaultConstructorMarker, ) { - return WebSocketInterceptor_Companion.fromReference(_new0( + return WebSocketInterceptor_Companion.fromReference(_new$( _class.reference.pointer, - _id_new0 as jni.JMethodIDPtr, + _id_new$ as _$jni.JMethodIDPtr, defaultConstructorMarker.reference.pointer) .reference); } } -final class $WebSocketInterceptor_CompanionType - extends jni.JObjType { - const $WebSocketInterceptor_CompanionType(); +final class $WebSocketInterceptor_Companion$Type + extends _$jni.JObjType { + @_$jni.internal + const $WebSocketInterceptor_Companion$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lcom/example/ok_http/WebSocketInterceptor$Companion;'; - @override - WebSocketInterceptor_Companion fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + WebSocketInterceptor_Companion fromReference(_$jni.JReference reference) => WebSocketInterceptor_Companion.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($WebSocketInterceptor_CompanionType).hashCode; + @_$core.override + int get hashCode => ($WebSocketInterceptor_Companion$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($WebSocketInterceptor_CompanionType) && - other is $WebSocketInterceptor_CompanionType; + return other.runtimeType == ($WebSocketInterceptor_Companion$Type) && + other is $WebSocketInterceptor_Companion$Type; } } -/// from: com.example.ok_http.WebSocketInterceptor -class WebSocketInterceptor extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `com.example.ok_http.WebSocketInterceptor` +class WebSocketInterceptor extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal WebSocketInterceptor.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); static final _class = - jni.JClass.forName(r'com/example/ok_http/WebSocketInterceptor'); + _$jni.JClass.forName(r'com/example/ok_http/WebSocketInterceptor'); /// The type which includes information such as the signature of this class. - static const type = $WebSocketInterceptorType(); + static const type = $WebSocketInterceptor$Type(); static final _id_Companion = _class.staticFieldId( r'Companion', r'Lcom/example/ok_http/WebSocketInterceptor$Companion;', ); - /// from: static public final com.example.ok_http.WebSocketInterceptor$Companion Companion + /// from: `static public final com.example.ok_http.WebSocketInterceptor$Companion Companion` /// The returned object must be released after use, by calling the [release] method. static WebSocketInterceptor_Companion get Companion => - _id_Companion.get(_class, const $WebSocketInterceptor_CompanionType()); + _id_Companion.get(_class, const $WebSocketInterceptor_Companion$Type()); - static final _id_new0 = _class.constructorId( + static final _id_new$ = _class.constructorId( r'()V', ); - static final _new0 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _new$ = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_NewObject') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public void () + /// from: `public void ()` /// The returned object must be released after use, by calling the [release] method. factory WebSocketInterceptor() { return WebSocketInterceptor.fromReference( - _new0(_class.reference.pointer, _id_new0 as jni.JMethodIDPtr) + _new$(_class.reference.pointer, _id_new$ as _$jni.JMethodIDPtr) .reference); } } -final class $WebSocketInterceptorType - extends jni.JObjType { - const $WebSocketInterceptorType(); +final class $WebSocketInterceptor$Type + extends _$jni.JObjType { + @_$jni.internal + const $WebSocketInterceptor$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Lcom/example/ok_http/WebSocketInterceptor;'; - @override - WebSocketInterceptor fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + WebSocketInterceptor fromReference(_$jni.JReference reference) => WebSocketInterceptor.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($WebSocketInterceptorType).hashCode; + @_$core.override + int get hashCode => ($WebSocketInterceptor$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($WebSocketInterceptorType) && - other is $WebSocketInterceptorType; + return other.runtimeType == ($WebSocketInterceptor$Type) && + other is $WebSocketInterceptor$Type; } } -/// from: java.util.concurrent.TimeUnit -class TimeUnit extends jni.JObject { - @override - late final jni.JObjType $type = type; +/// from: `java.util.concurrent.TimeUnit` +class TimeUnit extends _$jni.JObject { + @_$jni.internal + @_$core.override + final _$jni.JObjType $type; + @_$jni.internal TimeUnit.fromReference( - jni.JReference reference, - ) : super.fromReference(reference); + _$jni.JReference reference, + ) : $type = type, + super.fromReference(reference); - static final _class = jni.JClass.forName(r'java/util/concurrent/TimeUnit'); + static final _class = _$jni.JClass.forName(r'java/util/concurrent/TimeUnit'); /// The type which includes information such as the signature of this class. - static const type = $TimeUnitType(); + static const type = $TimeUnit$Type(); static final _id_NANOSECONDS = _class.staticFieldId( r'NANOSECONDS', r'Ljava/util/concurrent/TimeUnit;', ); - /// from: static public final java.util.concurrent.TimeUnit NANOSECONDS + /// from: `static public final java.util.concurrent.TimeUnit NANOSECONDS` /// The returned object must be released after use, by calling the [release] method. static TimeUnit get NANOSECONDS => - _id_NANOSECONDS.get(_class, const $TimeUnitType()); + _id_NANOSECONDS.get(_class, const $TimeUnit$Type()); static final _id_MICROSECONDS = _class.staticFieldId( r'MICROSECONDS', r'Ljava/util/concurrent/TimeUnit;', ); - /// from: static public final java.util.concurrent.TimeUnit MICROSECONDS + /// from: `static public final java.util.concurrent.TimeUnit MICROSECONDS` /// The returned object must be released after use, by calling the [release] method. static TimeUnit get MICROSECONDS => - _id_MICROSECONDS.get(_class, const $TimeUnitType()); + _id_MICROSECONDS.get(_class, const $TimeUnit$Type()); static final _id_MILLISECONDS = _class.staticFieldId( r'MILLISECONDS', r'Ljava/util/concurrent/TimeUnit;', ); - /// from: static public final java.util.concurrent.TimeUnit MILLISECONDS + /// from: `static public final java.util.concurrent.TimeUnit MILLISECONDS` /// The returned object must be released after use, by calling the [release] method. static TimeUnit get MILLISECONDS => - _id_MILLISECONDS.get(_class, const $TimeUnitType()); + _id_MILLISECONDS.get(_class, const $TimeUnit$Type()); static final _id_SECONDS = _class.staticFieldId( r'SECONDS', r'Ljava/util/concurrent/TimeUnit;', ); - /// from: static public final java.util.concurrent.TimeUnit SECONDS + /// from: `static public final java.util.concurrent.TimeUnit SECONDS` /// The returned object must be released after use, by calling the [release] method. - static TimeUnit get SECONDS => _id_SECONDS.get(_class, const $TimeUnitType()); + static TimeUnit get SECONDS => + _id_SECONDS.get(_class, const $TimeUnit$Type()); static final _id_MINUTES = _class.staticFieldId( r'MINUTES', r'Ljava/util/concurrent/TimeUnit;', ); - /// from: static public final java.util.concurrent.TimeUnit MINUTES + /// from: `static public final java.util.concurrent.TimeUnit MINUTES` /// The returned object must be released after use, by calling the [release] method. - static TimeUnit get MINUTES => _id_MINUTES.get(_class, const $TimeUnitType()); + static TimeUnit get MINUTES => + _id_MINUTES.get(_class, const $TimeUnit$Type()); static final _id_HOURS = _class.staticFieldId( r'HOURS', r'Ljava/util/concurrent/TimeUnit;', ); - /// from: static public final java.util.concurrent.TimeUnit HOURS + /// from: `static public final java.util.concurrent.TimeUnit HOURS` /// The returned object must be released after use, by calling the [release] method. - static TimeUnit get HOURS => _id_HOURS.get(_class, const $TimeUnitType()); + static TimeUnit get HOURS => _id_HOURS.get(_class, const $TimeUnit$Type()); static final _id_DAYS = _class.staticFieldId( r'DAYS', r'Ljava/util/concurrent/TimeUnit;', ); - /// from: static public final java.util.concurrent.TimeUnit DAYS + /// from: `static public final java.util.concurrent.TimeUnit DAYS` /// The returned object must be released after use, by calling the [release] method. - static TimeUnit get DAYS => _id_DAYS.get(_class, const $TimeUnitType()); + static TimeUnit get DAYS => _id_DAYS.get(_class, const $TimeUnit$Type()); static final _id_values = _class.staticMethodId( r'values', r'()[Ljava/util/concurrent/TimeUnit;', ); - static final _values = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _values = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: static public java.util.concurrent.TimeUnit[] values() + /// from: `static public java.util.concurrent.TimeUnit[] values()` /// The returned object must be released after use, by calling the [release] method. - static jni.JArray values() { - return _values(_class.reference.pointer, _id_values as jni.JMethodIDPtr) - .object(const jni.JArrayType($TimeUnitType())); + static _$jni.JArray values() { + return _values(_class.reference.pointer, _id_values as _$jni.JMethodIDPtr) + .object(const _$jni.JArrayType($TimeUnit$Type())); } static final _id_valueOf = _class.staticMethodId( @@ -13502,25 +14692,25 @@ class TimeUnit extends jni.JObject { r'(Ljava/lang/String;)Ljava/util/concurrent/TimeUnit;', ); - static final _valueOf = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _valueOf = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.TimeUnit valueOf(java.lang.String string) + /// from: `static public java.util.concurrent.TimeUnit valueOf(java.lang.String string)` /// The returned object must be released after use, by calling the [release] method. static TimeUnit valueOf( - jni.JString string, + _$jni.JString string, ) { - return _valueOf(_class.reference.pointer, _id_valueOf as jni.JMethodIDPtr, + return _valueOf(_class.reference.pointer, _id_valueOf as _$jni.JMethodIDPtr, string.reference.pointer) - .object(const $TimeUnitType()); + .object(const $TimeUnit$Type()); } static final _id_convert = _class.instanceMethodId( @@ -13528,48 +14718,49 @@ class TimeUnit extends jni.JObject { r'(JLjava/util/concurrent/TimeUnit;)J', ); - static final _convert = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64, ffi.Pointer)>)>>( + static final _convert = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Int64, _$jni.Pointer<_$jni.Void>)>)>>( 'globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, int, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, int, _$jni.Pointer<_$jni.Void>)>(); - /// from: public long convert(long j, java.util.concurrent.TimeUnit timeUnit) + /// from: `public long convert(long j, java.util.concurrent.TimeUnit timeUnit)` int convert( int j, TimeUnit timeUnit, ) { - return _convert(reference.pointer, _id_convert as jni.JMethodIDPtr, j, + return _convert(reference.pointer, _id_convert as _$jni.JMethodIDPtr, j, timeUnit.reference.pointer) .long; } - static final _id_convert1 = _class.instanceMethodId( + static final _id_convert$1 = _class.instanceMethodId( r'convert', r'(Ljava/time/Duration;)J', ); - static final _convert1 = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _convert$1 = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: public long convert(java.time.Duration duration) - int convert1( - jni.JObject duration, + /// from: `public long convert(java.time.Duration duration)` + int convert$1( + _$jni.JObject duration, ) { - return _convert1(reference.pointer, _id_convert1 as jni.JMethodIDPtr, + return _convert$1(reference.pointer, _id_convert$1 as _$jni.JMethodIDPtr, duration.reference.pointer) .long; } @@ -13579,19 +14770,22 @@ class TimeUnit extends jni.JObject { r'(J)J', ); - static final _toNanos = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + static final _toNanos = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int64,)>)>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public long toNanos(long j) + /// from: `public long toNanos(long j)` int toNanos( int j, ) { - return _toNanos(reference.pointer, _id_toNanos as jni.JMethodIDPtr, j).long; + return _toNanos(reference.pointer, _id_toNanos as _$jni.JMethodIDPtr, j) + .long; } static final _id_toMicros = _class.instanceMethodId( @@ -13599,19 +14793,21 @@ class TimeUnit extends jni.JObject { r'(J)J', ); - static final _toMicros = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + static final _toMicros = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int64,)>)>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public long toMicros(long j) + /// from: `public long toMicros(long j)` int toMicros( int j, ) { - return _toMicros(reference.pointer, _id_toMicros as jni.JMethodIDPtr, j) + return _toMicros(reference.pointer, _id_toMicros as _$jni.JMethodIDPtr, j) .long; } @@ -13620,19 +14816,21 @@ class TimeUnit extends jni.JObject { r'(J)J', ); - static final _toMillis = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + static final _toMillis = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int64,)>)>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public long toMillis(long j) + /// from: `public long toMillis(long j)` int toMillis( int j, ) { - return _toMillis(reference.pointer, _id_toMillis as jni.JMethodIDPtr, j) + return _toMillis(reference.pointer, _id_toMillis as _$jni.JMethodIDPtr, j) .long; } @@ -13641,19 +14839,21 @@ class TimeUnit extends jni.JObject { r'(J)J', ); - static final _toSeconds = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + static final _toSeconds = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int64,)>)>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public long toSeconds(long j) + /// from: `public long toSeconds(long j)` int toSeconds( int j, ) { - return _toSeconds(reference.pointer, _id_toSeconds as jni.JMethodIDPtr, j) + return _toSeconds(reference.pointer, _id_toSeconds as _$jni.JMethodIDPtr, j) .long; } @@ -13662,19 +14862,21 @@ class TimeUnit extends jni.JObject { r'(J)J', ); - static final _toMinutes = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + static final _toMinutes = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int64,)>)>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public long toMinutes(long j) + /// from: `public long toMinutes(long j)` int toMinutes( int j, ) { - return _toMinutes(reference.pointer, _id_toMinutes as jni.JMethodIDPtr, j) + return _toMinutes(reference.pointer, _id_toMinutes as _$jni.JMethodIDPtr, j) .long; } @@ -13683,19 +14885,22 @@ class TimeUnit extends jni.JObject { r'(J)J', ); - static final _toHours = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + static final _toHours = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int64,)>)>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public long toHours(long j) + /// from: `public long toHours(long j)` int toHours( int j, ) { - return _toHours(reference.pointer, _id_toHours as jni.JMethodIDPtr, j).long; + return _toHours(reference.pointer, _id_toHours as _$jni.JMethodIDPtr, j) + .long; } static final _id_toDays = _class.instanceMethodId( @@ -13703,19 +14908,21 @@ class TimeUnit extends jni.JObject { r'(J)J', ); - static final _toDays = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallLongMethod') + static final _toDays = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int64,)>)>>('globalEnv_CallLongMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public long toDays(long j) + /// from: `public long toDays(long j)` int toDays( int j, ) { - return _toDays(reference.pointer, _id_toDays as jni.JMethodIDPtr, j).long; + return _toDays(reference.pointer, _id_toDays as _$jni.JMethodIDPtr, j).long; } static final _id_timedWait = _class.instanceMethodId( @@ -13723,23 +14930,24 @@ class TimeUnit extends jni.JObject { r'(Ljava/lang/Object;J)V', ); - static final _timedWait = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + static final _timedWait = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Pointer<_$jni.Void>, _$jni.Int64)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int)>(); - /// from: public void timedWait(java.lang.Object object, long j) + /// from: `public void timedWait(java.lang.Object object, long j)` void timedWait( - jni.JObject object, + _$jni.JObject object, int j, ) { - _timedWait(reference.pointer, _id_timedWait as jni.JMethodIDPtr, + _timedWait(reference.pointer, _id_timedWait as _$jni.JMethodIDPtr, object.reference.pointer, j) .check(); } @@ -13749,23 +14957,24 @@ class TimeUnit extends jni.JObject { r'(Ljava/lang/Thread;J)V', ); - static final _timedJoin = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer, ffi.Int64)>)>>( + static final _timedJoin = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni + .VarArgs<(_$jni.Pointer<_$jni.Void>, _$jni.Int64)>)>>( 'globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer, int)>(); + _$jni.JThrowablePtr Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>, int)>(); - /// from: public void timedJoin(java.lang.Thread thread, long j) + /// from: `public void timedJoin(java.lang.Thread thread, long j)` void timedJoin( - jni.JObject thread, + _$jni.JObject thread, int j, ) { - _timedJoin(reference.pointer, _id_timedJoin as jni.JMethodIDPtr, + _timedJoin(reference.pointer, _id_timedJoin as _$jni.JMethodIDPtr, thread.reference.pointer, j) .check(); } @@ -13775,21 +14984,21 @@ class TimeUnit extends jni.JObject { r'(J)V', ); - static final _sleep = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JThrowablePtr Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Int64,)>)>>('globalEnv_CallVoidMethod') + static final _sleep = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Int64,)>)>>('globalEnv_CallVoidMethod') .asFunction< - jni.JThrowablePtr Function( - ffi.Pointer, jni.JMethodIDPtr, int)>(); + _$jni.JThrowablePtr Function( + _$jni.Pointer<_$jni.Void>, _$jni.JMethodIDPtr, int)>(); - /// from: public void sleep(long j) + /// from: `public void sleep(long j)` void sleep( int j, ) { - _sleep(reference.pointer, _id_sleep as jni.JMethodIDPtr, j).check(); + _sleep(reference.pointer, _id_sleep as _$jni.JMethodIDPtr, j).check(); } static final _id_toChronoUnit = _class.instanceMethodId( @@ -13797,24 +15006,24 @@ class TimeUnit extends jni.JObject { r'()Ljava/time/temporal/ChronoUnit;', ); - static final _toChronoUnit = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + static final _toChronoUnit = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>>('globalEnv_CallObjectMethod') .asFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, )>(); - /// from: public java.time.temporal.ChronoUnit toChronoUnit() + /// from: `public java.time.temporal.ChronoUnit toChronoUnit()` /// The returned object must be released after use, by calling the [release] method. - jni.JObject toChronoUnit() { + _$jni.JObject toChronoUnit() { return _toChronoUnit( - reference.pointer, _id_toChronoUnit as jni.JMethodIDPtr) - .object(const jni.JObjectType()); + reference.pointer, _id_toChronoUnit as _$jni.JMethodIDPtr) + .object(const _$jni.JObjectType()); } static final _id_of = _class.staticMethodId( @@ -13822,49 +15031,54 @@ class TimeUnit extends jni.JObject { r'(Ljava/time/temporal/ChronoUnit;)Ljava/util/concurrent/TimeUnit;', ); - static final _of = ProtectedJniExtensions.lookup< - ffi.NativeFunction< - jni.JniResult Function( - ffi.Pointer, - jni.JMethodIDPtr, - ffi.VarArgs<(ffi.Pointer,)>)>>( + static final _of = _$jni.ProtectedJniExtensions.lookup< + _$jni.NativeFunction< + _$jni.JniResult Function( + _$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, + _$jni.VarArgs<(_$jni.Pointer<_$jni.Void>,)>)>>( 'globalEnv_CallStaticObjectMethod') .asFunction< - jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr, - ffi.Pointer)>(); + _$jni.JniResult Function(_$jni.Pointer<_$jni.Void>, + _$jni.JMethodIDPtr, _$jni.Pointer<_$jni.Void>)>(); - /// from: static public java.util.concurrent.TimeUnit of(java.time.temporal.ChronoUnit chronoUnit) + /// from: `static public java.util.concurrent.TimeUnit of(java.time.temporal.ChronoUnit chronoUnit)` /// The returned object must be released after use, by calling the [release] method. static TimeUnit of( - jni.JObject chronoUnit, + _$jni.JObject chronoUnit, ) { - return _of(_class.reference.pointer, _id_of as jni.JMethodIDPtr, + return _of(_class.reference.pointer, _id_of as _$jni.JMethodIDPtr, chronoUnit.reference.pointer) - .object(const $TimeUnitType()); + .object(const $TimeUnit$Type()); } } -final class $TimeUnitType extends jni.JObjType { - const $TimeUnitType(); +final class $TimeUnit$Type extends _$jni.JObjType { + @_$jni.internal + const $TimeUnit$Type(); - @override + @_$jni.internal + @_$core.override String get signature => r'Ljava/util/concurrent/TimeUnit;'; - @override - TimeUnit fromReference(jni.JReference reference) => + @_$jni.internal + @_$core.override + TimeUnit fromReference(_$jni.JReference reference) => TimeUnit.fromReference(reference); - @override - jni.JObjType get superType => const jni.JObjectType(); + @_$jni.internal + @_$core.override + _$jni.JObjType get superType => const _$jni.JObjectType(); - @override + @_$jni.internal + @_$core.override final superCount = 1; - @override - int get hashCode => ($TimeUnitType).hashCode; + @_$core.override + int get hashCode => ($TimeUnit$Type).hashCode; - @override + @_$core.override bool operator ==(Object other) { - return other.runtimeType == ($TimeUnitType) && other is $TimeUnitType; + return other.runtimeType == ($TimeUnit$Type) && other is $TimeUnit$Type; } } diff --git a/pkgs/ok_http/lib/src/ok_http_client.dart b/pkgs/ok_http/lib/src/ok_http_client.dart index 27af5bf3d7..5b81b34b8b 100644 --- a/pkgs/ok_http/lib/src/ok_http_client.dart +++ b/pkgs/ok_http/lib/src/ok_http_client.dart @@ -92,7 +92,7 @@ class OkHttpClient extends BaseClient { OkHttpClient({ this.configuration = const OkHttpClientConfiguration(), }) { - _client = bindings.OkHttpClient.new1(); + _client = bindings.OkHttpClient_Builder().build(); } @override @@ -170,7 +170,7 @@ class OkHttpClient extends BaseClient { final responseCompleter = Completer(); - var reqBuilder = bindings.Request_Builder().url1(requestUrl.toJString()); + var reqBuilder = bindings.Request_Builder().url$1(requestUrl.toJString()); requestHeaders.forEach((headerName, headerValue) { reqBuilder.addHeader(headerName.toJString(), headerValue.toJString()); @@ -180,7 +180,7 @@ class OkHttpClient extends BaseClient { // So, we need to handle this case separately. bindings.RequestBody okReqBody; if (requestMethod != 'GET' && requestMethod != 'HEAD') { - okReqBody = bindings.RequestBody.create10(requestBody.toJArray()); + okReqBody = bindings.RequestBody.create$10(requestBody.toJArray()); } else { okReqBody = bindings.RequestBody.fromReference(jNullReference); } @@ -203,7 +203,7 @@ class OkHttpClient extends BaseClient { _client.newBuilder().followRedirects(false), maxRedirects, followRedirects, bindings.RedirectReceivedCallback.implement( - bindings.$RedirectReceivedCallbackImpl( + bindings.$RedirectReceivedCallback( onRedirectReceived: (response, newLocation) { profile?.responseData.addRedirect(HttpProfileRedirectData( statusCode: response.code(), @@ -229,7 +229,7 @@ class OkHttpClient extends BaseClient { // https://square.github.io/okhttp/5.x/okhttp/okhttp3/-call/enqueue.html reqConfiguredClient .newCall(reqBuilder.build()) - .enqueue(bindings.Callback.implement(bindings.$CallbackImpl( + .enqueue(bindings.Callback.implement(bindings.$Callback( onResponse: (bindings.Call call, bindings.Response response) { var reader = bindings.AsyncInputStreamReader(); var respBodyStreamController = StreamController>(); @@ -258,7 +258,7 @@ class OkHttpClient extends BaseClient { reader.readAsync( responseBodyByteStream, bindings.DataCallback.implement( - bindings.$DataCallbackImpl( + bindings.$DataCallback( onDataRead: (JArray bytesRead) { var data = bytesRead.toUint8List(); diff --git a/pkgs/ok_http/lib/src/ok_http_web_socket.dart b/pkgs/ok_http/lib/src/ok_http_web_socket.dart index 16ed95ed1a..4d72994192 100644 --- a/pkgs/ok_http/lib/src/ok_http_web_socket.dart +++ b/pkgs/ok_http/lib/src/ok_http_web_socket.dart @@ -82,9 +82,8 @@ class OkHttpWebSocket implements WebSocket { throw ArgumentError.value( url, 'url', 'only ws: and wss: schemes are supported'); } - final requestBuilder = - bindings.Request_Builder().url1(url.toString().toJString()); + bindings.Request_Builder().url$1(url.toString().toJString()); if (protocols != null) { requestBuilder.addHeader('Sec-WebSocket-Protocol'.toJString(), @@ -97,12 +96,12 @@ class OkHttpWebSocket implements WebSocket { requestBuilder.build(), bindings.WebSocketListenerProxy( bindings.WebSocketListenerProxy_WebSocketListener.implement( - bindings.$WebSocketListenerProxy_WebSocketListenerImpl( + bindings.$WebSocketListenerProxy_WebSocketListener( onOpen: (webSocket, response) { _webSocket = webSocket; var protocolHeader = - response.header1('sec-websocket-protocol'.toJString()); + response.header$1('sec-websocket-protocol'.toJString()); if (!protocolHeader.isNull) { _protocol = protocolHeader.toDartString(releaseOriginal: true); if (!(protocols?.contains(_protocol) ?? true)) { @@ -119,7 +118,7 @@ class OkHttpWebSocket implements WebSocket { if (_events.isClosed) return; _events.add(TextDataReceived(string.toDartString())); }, - onMessage1: + onMessage$1: (bindings.WebSocket webSocket, bindings.ByteString byteString) { if (_events.isClosed) return; _events.add( @@ -202,7 +201,7 @@ class OkHttpWebSocket implements WebSocket { if (_events.isClosed) { throw WebSocketConnectionClosed(); } - _webSocket.send1(bindings.ByteString.of(b.toJArray())); + _webSocket.send$1(bindings.ByteString.of(b.toJArray())); } @override diff --git a/pkgs/ok_http/pubspec.yaml b/pkgs/ok_http/pubspec.yaml index 93759491e5..7476f28bdd 100644 --- a/pkgs/ok_http/pubspec.yaml +++ b/pkgs/ok_http/pubspec.yaml @@ -13,13 +13,13 @@ dependencies: sdk: flutter http: ^1.2.1 http_profile: ^0.1.0 - jni: ^0.10.1 + jni: ^0.12.2 plugin_platform_interface: ^2.0.2 web_socket: ^0.1.5 dev_dependencies: dart_flutter_team_lints: ^3.0.0 - jnigen: ^0.10.0 + jnigen: ^0.12.2 flutter: plugin: From 09f076e97a5984ff43fd87b860a819f8e12a2593 Mon Sep 17 00:00:00 2001 From: Vladislav Date: Thu, 12 Dec 2024 16:56:51 +0300 Subject: [PATCH 448/448] fix https://github.com/dart-lang/http/issues/175 --- pkgs/http/lib/src/multipart_file.dart | 2 +- pkgs/http/lib/src/response.dart | 20 +++++++--------- pkgs/http/lib/src/utils.dart | 34 +++++++++++++++++---------- pkgs/http/test/response_test.dart | 33 +++++++++++--------------- 4 files changed, 45 insertions(+), 44 deletions(-) diff --git a/pkgs/http/lib/src/multipart_file.dart b/pkgs/http/lib/src/multipart_file.dart index c773098953..47ed3c96ac 100644 --- a/pkgs/http/lib/src/multipart_file.dart +++ b/pkgs/http/lib/src/multipart_file.dart @@ -73,7 +73,7 @@ class MultipartFile { factory MultipartFile.fromString(String field, String value, {String? filename, MediaType? contentType}) { contentType ??= MediaType('text', 'plain'); - var encoding = encodingForCharset(contentType.parameters['charset'], utf8); + var encoding = encodingForContentTypeHeader(contentType, utf8); contentType = contentType.change(parameters: {'charset': encoding.name}); return MultipartFile.fromBytes(field, encoding.encode(value), diff --git a/pkgs/http/lib/src/response.dart b/pkgs/http/lib/src/response.dart index 9d8cdb88f5..585583eb22 100644 --- a/pkgs/http/lib/src/response.dart +++ b/pkgs/http/lib/src/response.dart @@ -21,10 +21,10 @@ class Response extends BaseResponse { /// /// This is converted from [bodyBytes] using the `charset` parameter of the /// `Content-Type` header field, if available. If it's unavailable or if the - /// encoding name is unknown, [latin1] is used by default, as per - /// [RFC 2616][]. + /// encoding name is unknown, [utf8] is used by default, as per + /// [RFC3629][]. /// - /// [RFC 2616]: http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html + /// [RFC3629]:https://www.rfc-editor.org/rfc/rfc3629. String get body => _encodingForHeaders(headers).decode(bodyBytes); /// Creates a new HTTP response with a string body. @@ -43,11 +43,7 @@ class Response extends BaseResponse { /// Create a new HTTP response with a byte array body. Response.bytes(List bodyBytes, super.statusCode, - {super.request, - super.headers, - super.isRedirect, - super.persistentConnection, - super.reasonPhrase}) + {super.request, super.headers, super.isRedirect, super.persistentConnection, super.reasonPhrase}) : bodyBytes = toUint8List(bodyBytes), super(contentLength: bodyBytes.length); @@ -66,10 +62,12 @@ class Response extends BaseResponse { /// Returns the encoding to use for a response with the given headers. /// -/// Defaults to [latin1] if the headers don't specify a charset or if that -/// charset is unknown. +/// If the `Content-Type` header specifies a charset, it will use that charset. +/// If no charset is provided or the charset is unknown: +/// - Defaults to [utf8] if the `Content-Type` is `application/json` (since JSON is defined to use UTF-8 by default). +/// - Otherwise, defaults to [latin1] for compatibility. Encoding _encodingForHeaders(Map headers) => - encodingForCharset(_contentTypeForHeaders(headers).parameters['charset']); + encodingForContentTypeHeader(_contentTypeForHeaders(headers)); /// Returns the [MediaType] object for the given headers' content-type. /// diff --git a/pkgs/http/lib/src/utils.dart b/pkgs/http/lib/src/utils.dart index 72ec1529f2..e7277eb3ee 100644 --- a/pkgs/http/lib/src/utils.dart +++ b/pkgs/http/lib/src/utils.dart @@ -6,25 +6,34 @@ import 'dart:async'; import 'dart:convert'; import 'dart:typed_data'; +import 'package:http_parser/http_parser.dart'; + import 'byte_stream.dart'; /// Converts a [Map] from parameter names to values to a URL query string. /// /// mapToQuery({"foo": "bar", "baz": "bang"}); /// //=> "foo=bar&baz=bang" -String mapToQuery(Map map, {required Encoding encoding}) => - map.entries - .map((e) => '${Uri.encodeQueryComponent(e.key, encoding: encoding)}' - '=${Uri.encodeQueryComponent(e.value, encoding: encoding)}') - .join('&'); +String mapToQuery(Map map, {required Encoding encoding}) => map.entries + .map((e) => '${Uri.encodeQueryComponent(e.key, encoding: encoding)}' + '=${Uri.encodeQueryComponent(e.value, encoding: encoding)}') + .join('&'); -/// Returns the [Encoding] that corresponds to [charset]. +/// Determines the appropriate [Encoding] based on the given [contentTypeHeader]. /// -/// Returns [fallback] if [charset] is null or if no [Encoding] was found that -/// corresponds to [charset]. -Encoding encodingForCharset(String? charset, [Encoding fallback = latin1]) { - if (charset == null) return fallback; - return Encoding.getByName(charset) ?? fallback; +/// - If the `Content-Type` is `application/json` and no charset is specified, it defaults to [utf8]. +/// - If a charset is specified in the parameters, it attempts to find a matching [Encoding]. +/// - If no charset is specified or the charset is unknown, it falls back to the provided [fallback], which defaults to [latin1]. +Encoding encodingForContentTypeHeader(MediaType contentTypeHeader, [Encoding fallback = latin1]) { + final charset = contentTypeHeader.parameters['charset']; + + // Default to utf8 for application/json when charset is unspecified. + if (contentTypeHeader.type == 'application' && contentTypeHeader.subtype == 'json' && charset == null) { + return utf8; + } + + // Attempt to find the encoding or fall back to the default. + return charset != null ? Encoding.getByName(charset) ?? fallback : fallback; } /// Returns the [Encoding] that corresponds to [charset]. @@ -32,8 +41,7 @@ Encoding encodingForCharset(String? charset, [Encoding fallback = latin1]) { /// Throws a [FormatException] if no [Encoding] was found that corresponds to /// [charset]. Encoding requiredEncodingForCharset(String charset) => - Encoding.getByName(charset) ?? - (throw FormatException('Unsupported encoding "$charset".')); + Encoding.getByName(charset) ?? (throw FormatException('Unsupported encoding "$charset".')); /// A regular expression that matches strings that are composed entirely of /// ASCII-compatible characters. diff --git a/pkgs/http/test/response_test.dart b/pkgs/http/test/response_test.dart index 1bd9fd8e38..6f56f0af0d 100644 --- a/pkgs/http/test/response_test.dart +++ b/pkgs/http/test/response_test.dart @@ -16,17 +16,18 @@ void main() { test('sets bodyBytes', () { var response = http.Response('Hello, world!', 200); - expect( - response.bodyBytes, - equals( - [72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33])); + expect(response.bodyBytes, equals([72, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100, 33])); }); test('respects the inferred encoding', () { - var response = http.Response('föøbãr', 200, - headers: {'content-type': 'text/plain; charset=iso-8859-1'}); + var response = http.Response('föøbãr', 200, headers: {'content-type': 'text/plain; charset=iso-8859-1'}); expect(response.bodyBytes, equals([102, 246, 248, 98, 227, 114])); }); + + test('test empty charset', () { + var response = http.Response('{"foo":"Привет, мир!"}', 200, headers: {'content-type': 'application/json'}); + expect(response.body, equals('{"foo":"Привет, мир!"}')); + }); }); group('.bytes()', () { @@ -50,8 +51,7 @@ void main() { group('.fromStream()', () { test('sets body', () async { var controller = StreamController>(sync: true); - var streamResponse = - http.StreamedResponse(controller.stream, 200, contentLength: 13); + var streamResponse = http.StreamedResponse(controller.stream, 200, contentLength: 13); controller ..add([72, 101, 108, 108, 111, 44, 32]) ..add([119, 111, 114, 108, 100, 33]); @@ -62,8 +62,7 @@ void main() { test('sets bodyBytes', () async { var controller = StreamController>(sync: true); - var streamResponse = - http.StreamedResponse(controller.stream, 200, contentLength: 5); + var streamResponse = http.StreamedResponse(controller.stream, 200, contentLength: 5); controller.add([104, 101, 108, 108, 111]); unawaited(controller.close()); var response = await http.Response.fromStream(streamResponse); @@ -78,33 +77,29 @@ void main() { }); test('one header', () async { - var response = - http.Response('Hello, world!', 200, headers: {'fruit': 'apple'}); + var response = http.Response('Hello, world!', 200, headers: {'fruit': 'apple'}); expect(response.headersSplitValues, const { 'fruit': ['apple'] }); }); test('two headers', () async { - var response = http.Response('Hello, world!', 200, - headers: {'fruit': 'apple,banana'}); + var response = http.Response('Hello, world!', 200, headers: {'fruit': 'apple,banana'}); expect(response.headersSplitValues, const { 'fruit': ['apple', 'banana'] }); }); test('two headers with lots of spaces', () async { - var response = http.Response('Hello, world!', 200, - headers: {'fruit': 'apple \t , \tbanana'}); + var response = http.Response('Hello, world!', 200, headers: {'fruit': 'apple \t , \tbanana'}); expect(response.headersSplitValues, const { 'fruit': ['apple', 'banana'] }); }); test('one set-cookie', () async { - var response = http.Response('Hello, world!', 200, headers: { - 'set-cookie': 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT' - }); + var response = http.Response('Hello, world!', 200, + headers: {'set-cookie': 'id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT'}); expect(response.headersSplitValues, const { 'set-cookie': ['id=a3fWa; Expires=Wed, 21 Oct 2015 07:28:00 GMT'] });
Release notes

Sourced from actions/setup-java's releases.

v4.0.0

What's Changed

In the scope of this release, the version of the Node.js runtime was updated to 20. The majority of dependencies were updated to the latest versions. From now on, the code for the setup-java will run on Node.js 20 instead of Node.js 16.

Breaking changes

Non-breaking changes

New Contributors

Full Changelog: https://github.com/actions/setup-java/compare/v3...v4.0.0

v3.13.0

What's changed

In the scope of this release, support for Dragonwell JDK was added by @​Accelerator1996 in actions/setup-java#532

steps:
 - name: Checkout
   uses: actions/checkout@v3
 - name: Setup-java
   uses: actions/setup-java@v3
   with:
     distribution: 'dragonwell'
     java-version: '17'

Several inaccuracies were also fixed:

New Contributors

Full Changelog: https://github.com/actions/setup-java/compare/v3...v3.13.0

v3.12.0

... (truncated)